From 678c6dbfdf39a062e4cedcd49134ce8c2413a246 Mon Sep 17 00:00:00 2001 From: thinkinggis Date: Tue, 5 Nov 2019 17:57:30 +0800 Subject: [PATCH] Updates --- 404.html | 47 + 404/index.html | 47 + app-51e70f8e1fb75adb779d.js | 2 + app-51e70f8e1fb75adb779d.js.map | 1 + chunk-map.json | 1 + commons-f6783ede68f8c7ff9b6d.js | 2 + commons-f6783ede68f8c7ff9b6d.js.map | 1 + en/index.html | 47 + icons/icon-144x144.png | Bin 0 -> 13426 bytes icons/icon-192x192.png | Bin 0 -> 18027 bytes icons/icon-256x256.png | Bin 0 -> 24646 bytes icons/icon-384x384.png | Bin 0 -> 30126 bytes icons/icon-48x48.png | Bin 0 -> 3726 bytes icons/icon-512x512.png | Bin 0 -> 49174 bytes icons/icon-72x72.png | Bin 0 -> 6300 bytes icons/icon-96x96.png | Bin 0 -> 8506 bytes idb-keyval-iife.min.js | 1 + index.html | 47 + manifest.webmanifest | 1 + offline-plugin-app-shell-fallback/index.html | 47 + page-data/404.html/page-data.json | 1 + page-data/404/page-data.json | 1 + page-data/app-data.json | 1 + page-data/en/page-data.json | 1 + page-data/index/page-data.json | 1 + .../page-data.json | 1 + page-data/zh/docs/API/L7/page-data.json | 1 + .../docs/API/component/control/page-data.json | 1 + .../docs/API/component/marker/page-data.json | 1 + .../docs/API/component/popup/page-data.json | 1 + .../docs/manual/tutorial/data/page-data.json | 1 + .../manual/tutorial/quickStart/page-data.json | 1 + .../specification/introduction/page-data.json | 1 + .../zh/examples/point/basic/page-data.json | 1 + page-data/zh/page-data.json | 1 + static/d/2969191536.json | 1 + static/d/3147659733.json | 1 + static/d/3978990474.json | 1 + styles-5d5ac81f3c32d0998151.js | 2 + styles-5d5ac81f3c32d0998151.js.map | 1 + styles.e32956506dacddf17950.css | 4 + sw.js | 165 ++ webpack-runtime-c93a82d3addc73eb1b52.js | 2 + webpack-runtime-c93a82d3addc73eb1b52.js.map | 1 + webpack.stats.json | 1 + workbox-v4.3.1/workbox-background-sync.dev.js | 822 ++++++++ .../workbox-background-sync.dev.js.map | 1 + .../workbox-background-sync.prod.js | 2 + .../workbox-background-sync.prod.js.map | 1 + .../workbox-broadcast-update.dev.js | 496 +++++ .../workbox-broadcast-update.dev.js.map | 1 + .../workbox-broadcast-update.prod.js | 2 + .../workbox-broadcast-update.prod.js.map | 1 + .../workbox-cacheable-response.dev.js | 200 ++ .../workbox-cacheable-response.dev.js.map | 1 + .../workbox-cacheable-response.prod.js | 2 + .../workbox-cacheable-response.prod.js.map | 1 + workbox-v4.3.1/workbox-core.dev.js | 1712 +++++++++++++++++ workbox-v4.3.1/workbox-core.dev.js.map | 1 + workbox-v4.3.1/workbox-core.prod.js | 2 + workbox-v4.3.1/workbox-core.prod.js.map | 1 + workbox-v4.3.1/workbox-expiration.dev.js | 652 +++++++ workbox-v4.3.1/workbox-expiration.dev.js.map | 1 + workbox-v4.3.1/workbox-expiration.prod.js | 2 + workbox-v4.3.1/workbox-expiration.prod.js.map | 1 + .../workbox-navigation-preload.dev.js | 110 ++ .../workbox-navigation-preload.dev.js.map | 1 + .../workbox-navigation-preload.prod.js | 2 + .../workbox-navigation-preload.prod.js.map | 1 + workbox-v4.3.1/workbox-offline-ga.dev.js | 243 +++ workbox-v4.3.1/workbox-offline-ga.dev.js.map | 1 + workbox-v4.3.1/workbox-offline-ga.prod.js | 2 + workbox-v4.3.1/workbox-offline-ga.prod.js.map | 1 + workbox-v4.3.1/workbox-precaching.dev.js | 989 ++++++++++ workbox-v4.3.1/workbox-precaching.dev.js.map | 1 + workbox-v4.3.1/workbox-precaching.prod.js | 2 + workbox-v4.3.1/workbox-precaching.prod.js.map | 1 + workbox-v4.3.1/workbox-range-requests.dev.js | 268 +++ .../workbox-range-requests.dev.js.map | 1 + workbox-v4.3.1/workbox-range-requests.prod.js | 2 + .../workbox-range-requests.prod.js.map | 1 + workbox-v4.3.1/workbox-routing.dev.js | 1020 ++++++++++ workbox-v4.3.1/workbox-routing.dev.js.map | 1 + workbox-v4.3.1/workbox-routing.prod.js | 2 + workbox-v4.3.1/workbox-routing.prod.js.map | 1 + workbox-v4.3.1/workbox-strategies.dev.js | 1138 +++++++++++ workbox-v4.3.1/workbox-strategies.dev.js.map | 1 + workbox-v4.3.1/workbox-strategies.prod.js | 2 + workbox-v4.3.1/workbox-strategies.prod.js.map | 1 + workbox-v4.3.1/workbox-streams.dev.js | 337 ++++ workbox-v4.3.1/workbox-streams.dev.js.map | 1 + workbox-v4.3.1/workbox-streams.prod.js | 2 + workbox-v4.3.1/workbox-streams.prod.js.map | 1 + workbox-v4.3.1/workbox-sw.js | 2 + workbox-v4.3.1/workbox-sw.js.map | 1 + workbox-v4.3.1/workbox-window.dev.es5.mjs | 885 +++++++++ workbox-v4.3.1/workbox-window.dev.es5.mjs.map | 1 + workbox-v4.3.1/workbox-window.dev.mjs | 751 ++++++++ workbox-v4.3.1/workbox-window.dev.mjs.map | 1 + workbox-v4.3.1/workbox-window.dev.umd.js | 896 +++++++++ workbox-v4.3.1/workbox-window.dev.umd.js.map | 1 + workbox-v4.3.1/workbox-window.prod.es5.mjs | 2 + .../workbox-window.prod.es5.mjs.map | 1 + workbox-v4.3.1/workbox-window.prod.mjs | 2 + workbox-v4.3.1/workbox-window.prod.mjs.map | 1 + workbox-v4.3.1/workbox-window.prod.umd.js | 2 + workbox-v4.3.1/workbox-window.prod.umd.js.map | 1 + zh/docs/API/L7/index.html | 47 + zh/docs/API/component/control/index.html | 175 ++ zh/docs/API/component/marker/index.html | 139 ++ zh/docs/API/component/popup/index.html | 151 ++ zh/docs/API/index.html | 1 + zh/docs/manual/tutorial/data/index.html | 85 + zh/docs/manual/tutorial/quickStart/index.html | 47 + zh/docs/specification/index.html | 1 + zh/docs/specification/introduction/index.html | 47 + zh/docs/tutorial/index.html | 1 + zh/examples/index.html | 1 + zh/examples/point/basic/index.html | 49 + zh/index.html | 47 + 120 files changed, 11811 insertions(+) create mode 100644 404.html create mode 100644 404/index.html create mode 100644 app-51e70f8e1fb75adb779d.js create mode 100644 app-51e70f8e1fb75adb779d.js.map create mode 100644 chunk-map.json create mode 100644 commons-f6783ede68f8c7ff9b6d.js create mode 100644 commons-f6783ede68f8c7ff9b6d.js.map create mode 100644 en/index.html create mode 100644 icons/icon-144x144.png create mode 100644 icons/icon-192x192.png create mode 100644 icons/icon-256x256.png create mode 100644 icons/icon-384x384.png create mode 100644 icons/icon-48x48.png create mode 100644 icons/icon-512x512.png create mode 100644 icons/icon-72x72.png create mode 100644 icons/icon-96x96.png create mode 100644 idb-keyval-iife.min.js create mode 100644 index.html create mode 100644 manifest.webmanifest create mode 100644 offline-plugin-app-shell-fallback/index.html create mode 100644 page-data/404.html/page-data.json create mode 100644 page-data/404/page-data.json create mode 100644 page-data/app-data.json create mode 100644 page-data/en/page-data.json create mode 100644 page-data/index/page-data.json create mode 100644 page-data/offline-plugin-app-shell-fallback/page-data.json create mode 100644 page-data/zh/docs/API/L7/page-data.json create mode 100644 page-data/zh/docs/API/component/control/page-data.json create mode 100644 page-data/zh/docs/API/component/marker/page-data.json create mode 100644 page-data/zh/docs/API/component/popup/page-data.json create mode 100644 page-data/zh/docs/manual/tutorial/data/page-data.json create mode 100644 page-data/zh/docs/manual/tutorial/quickStart/page-data.json create mode 100644 page-data/zh/docs/specification/introduction/page-data.json create mode 100644 page-data/zh/examples/point/basic/page-data.json create mode 100644 page-data/zh/page-data.json create mode 100644 static/d/2969191536.json create mode 100644 static/d/3147659733.json create mode 100644 static/d/3978990474.json create mode 100644 styles-5d5ac81f3c32d0998151.js create mode 100644 styles-5d5ac81f3c32d0998151.js.map create mode 100644 styles.e32956506dacddf17950.css create mode 100644 sw.js create mode 100644 webpack-runtime-c93a82d3addc73eb1b52.js create mode 100644 webpack-runtime-c93a82d3addc73eb1b52.js.map create mode 100644 webpack.stats.json create mode 100644 workbox-v4.3.1/workbox-background-sync.dev.js create mode 100644 workbox-v4.3.1/workbox-background-sync.dev.js.map create mode 100644 workbox-v4.3.1/workbox-background-sync.prod.js create mode 100644 workbox-v4.3.1/workbox-background-sync.prod.js.map create mode 100644 workbox-v4.3.1/workbox-broadcast-update.dev.js create mode 100644 workbox-v4.3.1/workbox-broadcast-update.dev.js.map create mode 100644 workbox-v4.3.1/workbox-broadcast-update.prod.js create mode 100644 workbox-v4.3.1/workbox-broadcast-update.prod.js.map create mode 100644 workbox-v4.3.1/workbox-cacheable-response.dev.js create mode 100644 workbox-v4.3.1/workbox-cacheable-response.dev.js.map create mode 100644 workbox-v4.3.1/workbox-cacheable-response.prod.js create mode 100644 workbox-v4.3.1/workbox-cacheable-response.prod.js.map create mode 100644 workbox-v4.3.1/workbox-core.dev.js create mode 100644 workbox-v4.3.1/workbox-core.dev.js.map create mode 100644 workbox-v4.3.1/workbox-core.prod.js create mode 100644 workbox-v4.3.1/workbox-core.prod.js.map create mode 100644 workbox-v4.3.1/workbox-expiration.dev.js create mode 100644 workbox-v4.3.1/workbox-expiration.dev.js.map create mode 100644 workbox-v4.3.1/workbox-expiration.prod.js create mode 100644 workbox-v4.3.1/workbox-expiration.prod.js.map create mode 100644 workbox-v4.3.1/workbox-navigation-preload.dev.js create mode 100644 workbox-v4.3.1/workbox-navigation-preload.dev.js.map create mode 100644 workbox-v4.3.1/workbox-navigation-preload.prod.js create mode 100644 workbox-v4.3.1/workbox-navigation-preload.prod.js.map create mode 100644 workbox-v4.3.1/workbox-offline-ga.dev.js create mode 100644 workbox-v4.3.1/workbox-offline-ga.dev.js.map create mode 100644 workbox-v4.3.1/workbox-offline-ga.prod.js create mode 100644 workbox-v4.3.1/workbox-offline-ga.prod.js.map create mode 100644 workbox-v4.3.1/workbox-precaching.dev.js create mode 100644 workbox-v4.3.1/workbox-precaching.dev.js.map create mode 100644 workbox-v4.3.1/workbox-precaching.prod.js create mode 100644 workbox-v4.3.1/workbox-precaching.prod.js.map create mode 100644 workbox-v4.3.1/workbox-range-requests.dev.js create mode 100644 workbox-v4.3.1/workbox-range-requests.dev.js.map create mode 100644 workbox-v4.3.1/workbox-range-requests.prod.js create mode 100644 workbox-v4.3.1/workbox-range-requests.prod.js.map create mode 100644 workbox-v4.3.1/workbox-routing.dev.js create mode 100644 workbox-v4.3.1/workbox-routing.dev.js.map create mode 100644 workbox-v4.3.1/workbox-routing.prod.js create mode 100644 workbox-v4.3.1/workbox-routing.prod.js.map create mode 100644 workbox-v4.3.1/workbox-strategies.dev.js create mode 100644 workbox-v4.3.1/workbox-strategies.dev.js.map create mode 100644 workbox-v4.3.1/workbox-strategies.prod.js create mode 100644 workbox-v4.3.1/workbox-strategies.prod.js.map create mode 100644 workbox-v4.3.1/workbox-streams.dev.js create mode 100644 workbox-v4.3.1/workbox-streams.dev.js.map create mode 100644 workbox-v4.3.1/workbox-streams.prod.js create mode 100644 workbox-v4.3.1/workbox-streams.prod.js.map create mode 100644 workbox-v4.3.1/workbox-sw.js create mode 100644 workbox-v4.3.1/workbox-sw.js.map create mode 100644 workbox-v4.3.1/workbox-window.dev.es5.mjs create mode 100644 workbox-v4.3.1/workbox-window.dev.es5.mjs.map create mode 100644 workbox-v4.3.1/workbox-window.dev.mjs create mode 100644 workbox-v4.3.1/workbox-window.dev.mjs.map create mode 100644 workbox-v4.3.1/workbox-window.dev.umd.js create mode 100644 workbox-v4.3.1/workbox-window.dev.umd.js.map create mode 100644 workbox-v4.3.1/workbox-window.prod.es5.mjs create mode 100644 workbox-v4.3.1/workbox-window.prod.es5.mjs.map create mode 100644 workbox-v4.3.1/workbox-window.prod.mjs create mode 100644 workbox-v4.3.1/workbox-window.prod.mjs.map create mode 100644 workbox-v4.3.1/workbox-window.prod.umd.js create mode 100644 workbox-v4.3.1/workbox-window.prod.umd.js.map create mode 100644 zh/docs/API/L7/index.html create mode 100644 zh/docs/API/component/control/index.html create mode 100644 zh/docs/API/component/marker/index.html create mode 100644 zh/docs/API/component/popup/index.html create mode 100644 zh/docs/API/index.html create mode 100644 zh/docs/manual/tutorial/data/index.html create mode 100644 zh/docs/manual/tutorial/quickStart/index.html create mode 100644 zh/docs/specification/index.html create mode 100644 zh/docs/specification/introduction/index.html create mode 100644 zh/docs/tutorial/index.html create mode 100644 zh/examples/index.html create mode 100644 zh/examples/point/basic/index.html create mode 100644 zh/index.html diff --git a/404.html b/404.html new file mode 100644 index 0000000000..cd15a1b024 --- /dev/null +++ b/404.html @@ -0,0 +1,47 @@ +404: Not found | L7
\ No newline at end of file diff --git a/404/index.html b/404/index.html new file mode 100644 index 0000000000..6e12b18a4d --- /dev/null +++ b/404/index.html @@ -0,0 +1,47 @@ +404: Not found | L7
\ No newline at end of file diff --git a/app-51e70f8e1fb75adb779d.js b/app-51e70f8e1fb75adb779d.js new file mode 100644 index 0000000000..7443080d6d --- /dev/null +++ b/app-51e70f8e1fb75adb779d.js @@ -0,0 +1,2 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[0],{"+0R2":function(e,t,n){"use strict";n("rGqo"),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a,i,o,s,u,c,l=n("4cb6"),d=n("ewr5");function f(e,t,n,r){n&&Object.defineProperty(e,t,{enumerable:n.enumerable,configurable:n.configurable,writable:n.writable,value:n.initializer?n.initializer.call(r):void 0})}function p(e,t,n,r,a){var i={};return Object.keys(r).forEach((function(e){i[e]=r[e]})),i.enumerable=!!i.enumerable,i.configurable=!!i.configurable,("value"in i||i.initializer)&&(i.writable=!0),i=n.slice().reverse().reduce((function(n,r){return r(e,t,n)||n}),i),a&&void 0!==i.initializer&&(i.value=i.initializer?i.initializer.call(a):void 0,i.initializer=void 0),void 0===i.initializer&&(Object.defineProperty(e,t,i),i=null),i}var h=(r=(0,l.injectable)(),a=(0,l.inject)(d.TYPES.IRendererService),i=(0,l.inject)(d.TYPES.IGlobalConfigService),r((u=p((s=function(){function e(){this.layers=[],f(this,"renderService",u,this),f(this,"configService",c,this)}var t=e.prototype;return t.add=function(e){this.layers.push(e)},t.initLayers=function(){this.layers.forEach((function(e){var t=e.plugins,n=Array.isArray(t),r=0;for(t=n?t:t[Symbol.iterator]();;){var a;if(n){if(r>=t.length)break;a=t[r++]}else{if((r=t.next()).done)break;a=r.value}a.apply(e)}e.init()}))},t.renderLayers=function(){this.layers.forEach((function(e){e.hooks.beforeRender.call(),e.render(),e.hooks.afterRender.call()}))},t.destroy=function(){this.layers.forEach((function(e){return e.destroy()})),this.layers=[]},e}()).prototype,"renderService",[a],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),c=p(s.prototype,"configService",[i],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),o=s))||o);t.default=h},"+9rK":function(e,t,n){"use strict";function r(e,t,n){var r=n?" !== ":" === ",a=n?" || ":" && ",i=n?"!":"",o=n?"":"!";switch(e){case"null":return t+r+"null";case"array":return i+"Array.isArray("+t+")";case"object":return"("+i+t+a+"typeof "+t+r+'"object"'+a+o+"Array.isArray("+t+"))";case"integer":return"(typeof "+t+r+'"number"'+a+o+"("+t+" % 1)"+a+t+r+t+")";default:return"typeof "+t+r+'"'+e+'"'}}n("KKXr"),n("Oyvg"),n("SRfc"),n("pIFo"),n("LK8F"),e.exports={copy:function(e,t){for(var n in t=t||{},e)t[n]=e[n];return t},checkDataType:r,checkDataTypes:function(e,t){switch(e.length){case 1:return r(e[0],t,!0);default:var n="",a=i(e);for(var o in a.array&&a.object&&(n=a.null?"(":"(!"+t+" || ",n+="typeof "+t+' !== "object")',delete a.null,delete a.array,delete a.object),a.number&&delete a.integer,a)n+=(n?" && ":"")+r(o,t,!0);return n}},coerceToTypes:function(e,t){if(Array.isArray(t)){for(var n=[],r=0;r=t)throw new Error("Cannot access property/index "+r+" levels up, current level is "+t);return n[t-r]}if(r>t)throw new Error("Cannot access data "+r+" levels up, current level is "+t);if(i="data"+(t-r||""),!a)return i}for(var s=i,c=a.split("/"),l=0;l0)&&(r.unobserve(t),r.disconnect(),n())}))}))).observe(t),{instance:r,el:t}))},n.render=function(){var e=this,t=this.props,n=t.to,r=t.getProps,o=void 0===r?this.defaultGetProps:r,s=t.onClick,u=t.onMouseEnter,c=(t.activeClassName,t.activeStyle,t.innerRef,t.partiallyActive,t.state),h=t.replace,g=(0,a.default)(t,["to","getProps","onClick","onMouseEnter","activeClassName","activeStyle","innerRef","partiallyActive","state","replace"]);var v=p(n);return l.default.createElement(d.Link,(0,i.default)({to:v,state:c,getProps:o,innerRef:this.handleRef,onMouseEnter:function(e){u&&u(e),___loader.hovering((0,f.parsePath)(n).pathname)},onClick:function(t){return s&&s(t),0!==t.button||e.props.target||t.defaultPrevented||t.metaKey||t.altKey||t.ctrlKey||t.shiftKey||(t.preventDefault(),y(n,{state:c,replace:h})),!0}},g))},t}(l.default.Component);g.propTypes=(0,i.default)({},h,{onClick:c.default.func,to:c.default.string.isRequired,replace:c.default.bool});var v=function(e,t,n){return console.warn('The "'+e+'" method is now deprecated and will be removed in Gatsby v'+n+'. Please use "'+t+'" instead.')},m=l.default.forwardRef((function(e,t){return l.default.createElement(g,(0,i.default)({innerRef:t},e))}));t.default=m;var y=function(e,t){window.___navigate(p(e),t)};t.navigate=y;var b=function(e){v("push","navigate",3),window.___push(p(e))};t.push=b;t.replace=function(e){v("replace","navigate",3),window.___replace(p(e))};t.navigateTo=function(e){return v("navigateTo","navigate",3),b(e)}},"+cKO":function(e,t,n){"use strict";var r=n("TqRt");t.__esModule=!0,t.default=void 0;var a=r(n("t6We")),i=r(n("q1tI")),o=n("Wbzz"),s=r(n("XzT5")),u=n("9kay"),c=n("x0lo"),l=r(n("Q4oK")),d=r(n("H8Lq")),f=r(n("zP18"));s.default.use(u.initReactI18next).init({initImmediate:!1,resources:{en:{translation:{"所有产品":"All products","生态":"Ecosystem","搜索…":"Search...","中文首页":"Home Page","在 GitHub 上编辑":"Edit on GitHub","代码演示":"Examples","设计指引":"Design Guide","进入全屏":"Enter Fullscreen","离开全屏":"Exit Fullscreen"}}},fallbackLng:"zh",react:{useSuspense:!1}});var p=["zh","en"],h=function(e){var t=e.children,n=e.location,r=a.default.data.site.siteMetadata,u=r.title,h=r.navs,g=void 0===h?[]:h,v=r.githubUrl,m=(0,o.withPrefix)("/").replace(/\/$/,""),y=n.pathname.replace(m,""),b=(0,c.getCurrentLangKey)(p,"zh",y);return s.default.init({lng:b}),n.pathname===m||t&&t.type&&t.type.noLayout?t:i.default.createElement(i.default.Fragment,null,i.default.createElement(l.default,{subTitle:""===m?"":u,path:y,pathPrefix:m,navs:g,githubUrl:v,Link:o.Link}),i.default.createElement("main",{className:f.default.main},t),i.default.createElement(d.default,null))};t.default=h},"+dQi":function(e,t,n){n("f3/d"),n("V+eJ"),n("SRfc"),function(e){"use strict";e.defineMode("javascript",(function(t,n){var r,a,i=t.indentUnit,o=n.statementIndent,s=n.jsonld,u=n.json||s,c=n.typescript,l=n.wordCharacters||/[\w$\xa1-\uffff]/,d=function(){function e(e){return{type:e,style:"keyword"}}var t=e("keyword a"),n=e("keyword b"),r=e("keyword c"),a=e("keyword d"),i=e("operator"),o={type:"atom",style:"atom"};return{if:e("if"),while:t,with:t,else:n,do:n,try:n,finally:n,return:a,break:a,continue:a,new:e("new"),delete:r,void:r,throw:r,debugger:e("debugger"),var:e("var"),const:e("var"),let:e("var"),function:e("function"),catch:e("catch"),for:e("for"),switch:e("switch"),case:e("case"),default:e("default"),in:i,typeof:i,instanceof:i,true:o,false:o,null:o,undefined:o,NaN:o,Infinity:o,this:e("this"),class:e("class"),super:e("atom"),yield:r,export:e("export"),import:e("import"),extends:r,await:r}}(),f=/[+\-*&%=<>!?|~^@]/,p=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;function h(e,t,n){return r=e,a=n,t}function g(e,t){var n,r=e.next();if('"'==r||"'"==r)return t.tokenize=(n=r,function(e,t){var r,a=!1;if(s&&"@"==e.peek()&&e.match(p))return t.tokenize=g,h("jsonld-keyword","meta");for(;null!=(r=e.next())&&(r!=n||a);)a=!a&&"\\"==r;return a||(t.tokenize=g),h("string","string")}),t.tokenize(e,t);if("."==r&&e.match(/^\d[\d_]*(?:[eE][+\-]?[\d_]+)?/))return h("number","number");if("."==r&&e.match(".."))return h("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(r))return h(r);if("="==r&&e.eat(">"))return h("=>","operator");if("0"==r&&e.match(/^(?:x[\dA-Fa-f_]+|o[0-7_]+|b[01_]+)n?/))return h("number","number");if(/\d/.test(r))return e.match(/^[\d_]*(?:n|(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)?/),h("number","number");if("/"==r)return e.eat("*")?(t.tokenize=v,v(e,t)):e.eat("/")?(e.skipToEnd(),h("comment","comment")):Ye(e,t,1)?(function(e){for(var t,n=!1,r=!1;null!=(t=e.next());){if(!n){if("/"==t&&!r)return;"["==t?r=!0:r&&"]"==t&&(r=!1)}n=!n&&"\\"==t}}(e),e.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/),h("regexp","string-2")):(e.eat("="),h("operator","operator",e.current()));if("`"==r)return t.tokenize=m,m(e,t);if("#"==r)return e.skipToEnd(),h("error","error");if("<"==r&&e.match("!--")||"-"==r&&e.match("->"))return e.skipToEnd(),h("comment","comment");if(f.test(r))return">"==r&&t.lexical&&">"==t.lexical.type||(e.eat("=")?"!"!=r&&"="!=r||e.eat("="):/[<>*+\-]/.test(r)&&(e.eat(r),">"==r&&e.eat(r))),h("operator","operator",e.current());if(l.test(r)){e.eatWhile(l);var a=e.current();if("."!=t.lastType){if(d.propertyIsEnumerable(a)){var i=d[a];return h(i.type,i.style,a)}if("async"==a&&e.match(/^(\s|\/\*.*?\*\/)*[\[\(\w]/,!1))return h("async","keyword",a)}return h("variable","variable",a)}}function v(e,t){for(var n,r=!1;n=e.next();){if("/"==n&&r){t.tokenize=g;break}r="*"==n}return h("comment","comment")}function m(e,t){for(var n,r=!1;null!=(n=e.next());){if(!r&&("`"==n||"$"==n&&e.eat("{"))){t.tokenize=g;break}r=!r&&"\\"==n}return h("quasi","string-2",e.current())}var y="([{}])";function b(e,t){t.fatArrowAt&&(t.fatArrowAt=null);var n=e.string.indexOf("=>",e.start);if(!(n<0)){if(c){var r=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(e.string.slice(e.start,n));r&&(n=r.index)}for(var a=0,i=!1,o=n-1;o>=0;--o){var s=e.string.charAt(o),u=y.indexOf(s);if(u>=0&&u<3){if(!a){++o;break}if(0==--a){"("==s&&(i=!0);break}}else if(u>=3&&u<6)++a;else if(l.test(s))i=!0;else if(/["'\/`]/.test(s))for(;;--o){if(0==o)return;if(e.string.charAt(o-1)==s&&"\\"!=e.string.charAt(o-2)){o--;break}}else if(i&&!a){++o;break}}i&&!a&&(t.fatArrowAt=o)}}var _={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,"jsonld-keyword":!0};function x(e,t,n,r,a,i){this.indented=e,this.column=t,this.type=n,this.prev=a,this.info=i,null!=r&&(this.align=r)}function R(e,t){for(var n=e.localVars;n;n=n.next)if(n.name==t)return!0;for(var r=e.context;r;r=r.prev)for(n=r.vars;n;n=n.next)if(n.name==t)return!0}var w={state:null,column:null,marked:null,cc:null};function E(){for(var e=arguments.length-1;e>=0;e--)w.cc.push(arguments[e])}function S(){return E.apply(null,arguments),!0}function A(e,t){for(var n=t;n;n=n.next)if(n.name==e)return!0;return!1}function T(e){var t=w.state;if(w.marked="def",t.context)if("var"==t.lexical.info&&t.context&&t.context.block){var r=function e(t,n){if(n){if(n.block){var r=e(t,n.prev);return r?r==n.prev?n:new C(r,n.vars,!0):null}return A(t,n.vars)?n:new C(n.prev,new O(t,n.vars),!1)}return null}(e,t.context);if(null!=r)return void(t.context=r)}else if(!A(e,t.localVars))return void(t.localVars=new O(e,t.localVars));n.globalVars&&!A(e,t.globalVars)&&(t.globalVars=new O(e,t.globalVars))}function P(e){return"public"==e||"private"==e||"protected"==e||"abstract"==e||"readonly"==e}function C(e,t,n){this.prev=e,this.vars=t,this.block=n}function O(e,t){this.name=e,this.next=t}var M=new O("this",new O("arguments",null));function k(){w.state.context=new C(w.state.context,w.state.localVars,!1),w.state.localVars=M}function D(){w.state.context=new C(w.state.context,w.state.localVars,!0),w.state.localVars=null}function I(){w.state.localVars=w.state.context.vars,w.state.context=w.state.context.prev}function L(e,t){var n=function(){var n=w.state,r=n.indented;if("stat"==n.lexical.type)r=n.lexical.indented;else for(var a=n.lexical;a&&")"==a.type&&a.align;a=a.prev)r=a.indented;n.lexical=new x(r,w.stream.column(),e,null,n.lexical,t)};return n.lex=!0,n}function j(){var e=w.state;e.lexical.prev&&(")"==e.lexical.type&&(e.indented=e.lexical.indented),e.lexical=e.lexical.prev)}function F(e){return function t(n){return n==e?S():";"==e||"}"==n||")"==n||"]"==n?E():S(t)}}function z(e,t){return"var"==e?S(L("vardef",t),be,F(";"),j):"keyword a"==e?S(L("form"),H,z,j):"keyword b"==e?S(L("form"),z,j):"keyword d"==e?w.stream.match(/^\s*$/,!1)?S():S(L("stat"),W,F(";"),j):"debugger"==e?S(F(";")):"{"==e?S(L("}"),D,oe,j,I):";"==e?S():"if"==e?("else"==w.state.lexical.info&&w.state.cc[w.state.cc.length-1]==j&&w.state.cc.pop()(),S(L("form"),H,z,j,Se)):"function"==e?S(Ce):"for"==e?S(L("form"),Ae,z,j):"class"==e||c&&"interface"==t?(w.marked="keyword",S(L("form","class"==e?e:t),Ie,j)):"variable"==e?c&&"declare"==t?(w.marked="keyword",S(z)):c&&("module"==t||"enum"==t||"type"==t)&&w.stream.match(/^\s*\w/,!1)?(w.marked="keyword","enum"==t?S(Ge):"type"==t?S(Me,F("operator"),de,F(";")):S(L("form"),_e,F("{"),L("}"),oe,j,j)):c&&"namespace"==t?(w.marked="keyword",S(L("form"),B,z,j)):c&&"abstract"==t?(w.marked="keyword",S(z)):S(L("stat"),Q):"switch"==e?S(L("form"),H,F("{"),L("}","switch"),D,oe,j,j,I):"case"==e?S(B,F(":")):"default"==e?S(F(":")):"catch"==e?S(L("form"),k,N,z,j,I):"export"==e?S(L("stat"),ze,j):"import"==e?S(L("stat"),Be,j):"async"==e?S(z):"@"==t?S(B,z):E(L("stat"),B,F(";"),j)}function N(e){if("("==e)return S(ke,F(")"))}function B(e,t){return U(e,t,!1)}function V(e,t){return U(e,t,!0)}function H(e){return"("!=e?E():S(L(")"),B,F(")"),j)}function U(e,t,n){if(w.state.fatArrowAt==w.stream.start){var r=n?J:X;if("("==e)return S(k,L(")"),ae(ke,")"),j,F("=>"),r,I);if("variable"==e)return E(k,_e,F("=>"),r,I)}var a=n?G:q;return _.hasOwnProperty(e)?S(a):"function"==e?S(Ce,a):"class"==e||c&&"interface"==t?(w.marked="keyword",S(L("form"),De,j)):"keyword c"==e||"async"==e?S(n?V:B):"("==e?S(L(")"),W,F(")"),j,a):"operator"==e||"spread"==e?S(n?V:B):"["==e?S(L("]"),qe,j,a):"{"==e?ie(te,"}",null,a):"quasi"==e?E(K,a):"new"==e?S(function(e){return function(t){return"."==t?S(e?$:Z):"variable"==t&&c?S(ve,e?G:q):E(e?V:B)}}(n)):"import"==e?S(B):S()}function W(e){return e.match(/[;\}\)\],]/)?E():E(B)}function q(e,t){return","==e?S(B):G(e,t,!1)}function G(e,t,n){var r=0==n?q:G,a=0==n?B:V;return"=>"==e?S(k,n?J:X,I):"operator"==e?/\+\+|--/.test(t)||c&&"!"==t?S(r):c&&"<"==t&&w.stream.match(/^([^>]|<.*?>)*>\s*\(/,!1)?S(L(">"),ae(de,">"),j,r):"?"==t?S(B,F(":"),a):S(a):"quasi"==e?E(K,r):";"!=e?"("==e?ie(V,")","call",r):"."==e?S(ee,r):"["==e?S(L("]"),W,F("]"),j,r):c&&"as"==t?(w.marked="keyword",S(de,r)):"regexp"==e?(w.state.lastType=w.marked="operator",w.stream.backUp(w.stream.pos-w.stream.start-1),S(a)):void 0:void 0}function K(e,t){return"quasi"!=e?E():"${"!=t.slice(t.length-2)?S(K):S(B,Y)}function Y(e){if("}"==e)return w.marked="string-2",w.state.tokenize=m,S(K)}function X(e){return b(w.stream,w.state),E("{"==e?z:B)}function J(e){return b(w.stream,w.state),E("{"==e?z:V)}function Z(e,t){if("target"==t)return w.marked="keyword",S(q)}function $(e,t){if("target"==t)return w.marked="keyword",S(G)}function Q(e){return":"==e?S(j,z):E(q,F(";"),j)}function ee(e){if("variable"==e)return w.marked="property",S()}function te(e,t){return"async"==e?(w.marked="property",S(te)):"variable"==e||"keyword"==w.style?(w.marked="property","get"==t||"set"==t?S(ne):(c&&w.state.fatArrowAt==w.stream.start&&(n=w.stream.match(/^\s*:\s*/,!1))&&(w.state.fatArrowAt=w.stream.pos+n[0].length),S(re))):"number"==e||"string"==e?(w.marked=s?"property":w.style+" property",S(re)):"jsonld-keyword"==e?S(re):c&&P(t)?(w.marked="keyword",S(te)):"["==e?S(B,se,F("]"),re):"spread"==e?S(V,re):"*"==t?(w.marked="keyword",S(te)):":"==e?E(re):void 0;var n}function ne(e){return"variable"!=e?E(re):(w.marked="property",S(Ce))}function re(e){return":"==e?S(V):"("==e?E(Ce):void 0}function ae(e,t,n){function r(a,i){if(n?n.indexOf(a)>-1:","==a){var o=w.state.lexical;return"call"==o.info&&(o.pos=(o.pos||0)+1),S((function(n,r){return n==t||r==t?E():E(e)}),r)}return a==t||i==t?S():n&&n.indexOf(";")>-1?E(e):S(F(t))}return function(n,a){return n==t||a==t?S():E(e,r)}}function ie(e,t,n){for(var r=3;r"),de):void 0}function fe(e){if("=>"==e)return S(de)}function pe(e,t){return"variable"==e||"keyword"==w.style?(w.marked="property",S(pe)):"?"==t||"number"==e||"string"==e?S(pe):":"==e?S(de):"["==e?S(F("variable"),ue,F("]"),pe):"("==e?E(Oe,pe):void 0}function he(e,t){return"variable"==e&&w.stream.match(/^\s*[?:]/,!1)||"?"==t?S(he):":"==e?S(de):"spread"==e?S(he):E(de)}function ge(e,t){return"<"==t?S(L(">"),ae(de,">"),j,ge):"|"==t||"."==e||"&"==t?S(de):"["==e?S(de,F("]"),ge):"extends"==t||"implements"==t?(w.marked="keyword",S(de)):"?"==t?S(de,F(":"),de):void 0}function ve(e,t){if("<"==t)return S(L(">"),ae(de,">"),j,ge)}function me(){return E(de,ye)}function ye(e,t){if("="==t)return S(de)}function be(e,t){return"enum"==t?(w.marked="keyword",S(Ge)):E(_e,se,we,Ee)}function _e(e,t){return c&&P(t)?(w.marked="keyword",S(_e)):"variable"==e?(T(t),S()):"spread"==e?S(_e):"["==e?ie(Re,"]"):"{"==e?ie(xe,"}"):void 0}function xe(e,t){return"variable"!=e||w.stream.match(/^\s*:/,!1)?("variable"==e&&(w.marked="property"),"spread"==e?S(_e):"}"==e?E():"["==e?S(B,F("]"),F(":"),xe):S(F(":"),_e,we)):(T(t),S(we))}function Re(){return E(_e,we)}function we(e,t){if("="==t)return S(V)}function Ee(e){if(","==e)return S(be)}function Se(e,t){if("keyword b"==e&&"else"==t)return S(L("form","else"),z,j)}function Ae(e,t){return"await"==t?S(Ae):"("==e?S(L(")"),Te,j):void 0}function Te(e){return"var"==e?S(be,Pe):"variable"==e?S(Pe):E(Pe)}function Pe(e,t){return")"==e?S():";"==e?S(Pe):"in"==t||"of"==t?(w.marked="keyword",S(B,Pe)):E(B,Pe)}function Ce(e,t){return"*"==t?(w.marked="keyword",S(Ce)):"variable"==e?(T(t),S(Ce)):"("==e?S(k,L(")"),ae(ke,")"),j,ce,z,I):c&&"<"==t?S(L(">"),ae(me,">"),j,Ce):void 0}function Oe(e,t){return"*"==t?(w.marked="keyword",S(Oe)):"variable"==e?(T(t),S(Oe)):"("==e?S(k,L(")"),ae(ke,")"),j,ce,I):c&&"<"==t?S(L(">"),ae(me,">"),j,Oe):void 0}function Me(e,t){return"keyword"==e||"variable"==e?(w.marked="type",S(Me)):"<"==t?S(L(">"),ae(me,">"),j):void 0}function ke(e,t){return"@"==t&&S(B,ke),"spread"==e?S(ke):c&&P(t)?(w.marked="keyword",S(ke)):c&&"this"==e?S(se,we):E(_e,se,we)}function De(e,t){return"variable"==e?Ie(e,t):Le(e,t)}function Ie(e,t){if("variable"==e)return T(t),S(Le)}function Le(e,t){return"<"==t?S(L(">"),ae(me,">"),j,Le):"extends"==t||"implements"==t||c&&","==e?("implements"==t&&(w.marked="keyword"),S(c?de:B,Le)):"{"==e?S(L("}"),je,j):void 0}function je(e,t){return"async"==e||"variable"==e&&("static"==t||"get"==t||"set"==t||c&&P(t))&&w.stream.match(/^\s+[\w$\xa1-\uffff]/,!1)?(w.marked="keyword",S(je)):"variable"==e||"keyword"==w.style?(w.marked="property",S(c?Fe:Ce,je)):"number"==e||"string"==e?S(c?Fe:Ce,je):"["==e?S(B,se,F("]"),c?Fe:Ce,je):"*"==t?(w.marked="keyword",S(je)):c&&"("==e?E(Oe,je):";"==e||","==e?S(je):"}"==e?S():"@"==t?S(B,je):void 0}function Fe(e,t){if("?"==t)return S(Fe);if(":"==e)return S(de,we);if("="==t)return S(V);var n=w.state.lexical.prev;return E(n&&"interface"==n.info?Oe:Ce)}function ze(e,t){return"*"==t?(w.marked="keyword",S(We,F(";"))):"default"==t?(w.marked="keyword",S(B,F(";"))):"{"==e?S(ae(Ne,"}"),We,F(";")):E(z)}function Ne(e,t){return"as"==t?(w.marked="keyword",S(F("variable"))):"variable"==e?E(V,Ne):void 0}function Be(e){return"string"==e?S():"("==e?E(B):E(Ve,He,We)}function Ve(e,t){return"{"==e?ie(Ve,"}"):("variable"==e&&T(t),"*"==t&&(w.marked="keyword"),S(Ue))}function He(e){if(","==e)return S(Ve,He)}function Ue(e,t){if("as"==t)return w.marked="keyword",S(Ve)}function We(e,t){if("from"==t)return w.marked="keyword",S(B)}function qe(e){return"]"==e?S():E(ae(V,"]"))}function Ge(){return E(L("form"),_e,F("{"),L("}"),ae(Ke,"}"),j,j)}function Ke(){return E(_e,we)}function Ye(e,t,n){return t.tokenize==g&&/^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(t.lastType)||"quasi"==t.lastType&&/\{\s*$/.test(e.string.slice(0,e.pos-(n||0)))}return I.lex=!0,j.lex=!0,{startState:function(e){var t={tokenize:g,lastType:"sof",cc:[],lexical:new x((e||0)-i,0,"block",!1),localVars:n.localVars,context:n.localVars&&new C(null,null,!1),indented:e||0};return n.globalVars&&"object"==typeof n.globalVars&&(t.globalVars=n.globalVars),t},token:function(e,t){if(e.sol()&&(t.lexical.hasOwnProperty("align")||(t.lexical.align=!1),t.indented=e.indentation(),b(e,t)),t.tokenize!=v&&e.eatSpace())return null;var n=t.tokenize(e,t);return"comment"==r?n:(t.lastType="operator"!=r||"++"!=a&&"--"!=a?r:"incdec",function(e,t,n,r,a){var i=e.cc;for(w.state=e,w.stream=a,w.marked=null,w.cc=i,w.style=t,e.lexical.hasOwnProperty("align")||(e.lexical.align=!0);;)if((i.length?i.pop():u?B:z)(n,r)){for(;i.length&&i[i.length-1].lex;)i.pop()();return w.marked?w.marked:"variable"==n&&R(e,r)?"variable-2":t}}(t,n,r,a,e))},indent:function(t,r){if(t.tokenize==v)return e.Pass;if(t.tokenize!=g)return 0;var a,s=r&&r.charAt(0),u=t.lexical;if(!/^\s*else\b/.test(r))for(var c=t.cc.length-1;c>=0;--c){var l=t.cc[c];if(l==j)u=u.prev;else if(l!=Se)break}for(;("stat"==u.type||"form"==u.type)&&("}"==s||(a=t.cc[t.cc.length-1])&&(a==q||a==G)&&!/^[,\.=+\-*:?[\(]/.test(r));)u=u.prev;o&&")"==u.type&&"stat"==u.prev.type&&(u=u.prev);var d=u.type,p=s==d;return"vardef"==d?u.indented+("operator"==t.lastType||","==t.lastType?u.info.length+1:0):"form"==d&&"{"==s?u.indented:"form"==d?u.indented+i:"stat"==d?u.indented+(function(e,t){return"operator"==e.lastType||","==e.lastType||f.test(t.charAt(0))||/[,.]/.test(t.charAt(0))}(t,r)?o||i:0):"switch"!=u.info||p||0==n.doubleIndentSwitch?u.align?u.column+(p?0:1):u.indented+(p?0:i):u.indented+(/^(?:case|default)\b/.test(r)?i:2*i)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:u?null:"/*",blockCommentEnd:u?null:"*/",blockCommentContinue:u?null:" * ",lineComment:u?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:u?"json":"javascript",jsonldMode:s,jsonMode:u,expressionAllowed:Ye,skipExpression:function(e){var t=e.cc[e.cc.length-1];t!=B&&t!=V||e.cc.pop()}}})),e.registerHelper("wordChars","javascript",/[\w$]/),e.defineMIME("text/javascript","javascript"),e.defineMIME("text/ecmascript","javascript"),e.defineMIME("application/javascript","javascript"),e.defineMIME("application/x-javascript","javascript"),e.defineMIME("application/ecmascript","javascript"),e.defineMIME("application/json",{name:"javascript",json:!0}),e.defineMIME("application/x-json",{name:"javascript",json:!0}),e.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),e.defineMIME("text/typescript",{name:"javascript",typescript:!0}),e.defineMIME("application/typescript",{name:"javascript",typescript:!0})}(n("VrN/"))},"+gcA":function(e,t,n){n("SRfc"),e.exports=function(e){var t=String(e).match(/^function (\w*)/);return null==t?"":t[1]}},"+h27":function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.MapType=void 0,t.MapType=r,function(e){e.amap="amap",e.mapbox="mapbox"}(r||(t.MapType=r={}))},"+i7v":function(e,t,n){"use strict";var r=n("TqRt");t.__esModule=!0,t.default=function(e,t){var n=(0,a.default)(e);if(void 0===t)return n?"pageXOffset"in n?n.pageXOffset:n.document.documentElement.scrollLeft:e.scrollLeft;n?n.scrollTo(t,"pageYOffset"in n?n.pageYOffset:n.document.documentElement.scrollTop):e.scrollLeft=t};var a=r(n("8Y+z"));e.exports=t.default},"+lvF":function(e,t,n){e.exports=n("VTer")("native-function-to-string",Function.toString)},"+rDU":function(e,t,n){"use strict";var r=n("lwsE"),a=n("W8MJ"),i=n("a1gu"),o=n("Nsbk"),s=n("7W2i"),u=n("lMCK"),c=new(function(e){function t(){return r(this,t),i(this,o(t).apply(this,arguments))}return s(t,e),a(t,[{key:"content",value:function(e){var t=e.onError,n=e.onResult,r=e.onDone,a="";return a+="var _results = new Array(".concat(this.options.taps.length,");\n"),a+="var _checkDone = () => {\n",a+="for(var i = 0; i < _results.length; i++) {\n",a+="var item = _results[i];\n",a+="if(item === undefined) return false;\n",a+="if(item.result !== undefined) {\n",a+=n("item.result"),a+="return true;\n",a+="}\n",a+="if(item.error) {\n",a+=t("item.error"),a+="return true;\n",a+="}\n",a+="}\n",a+="return false;\n",a+="}\n",a+=this.callTapsParallel({onError:function(e,t,n,r){var a="";return a+="if(".concat(e," < _results.length && ((_results.length = ").concat(e+1,"), (_results[").concat(e,"] = { error: ").concat(t," }), _checkDone())) {\n"),a+=r(!0),a+="} else {\n",a+=n(),a+="}\n"},onResult:function(e,t,n,r){var a="";return a+="if(".concat(e," < _results.length && (").concat(t," !== undefined && (_results.length = ").concat(e+1,"), (_results[").concat(e,"] = { result: ").concat(t," }), _checkDone())) {\n"),a+=r(!0),a+="} else {\n",a+=n(),a+="}\n"},onTap:function(e,t,n,r){var a="";return e>0&&(a+="if(".concat(e," >= _results.length) {\n"),a+=n(),a+="} else {\n"),a+=t(),e>0&&(a+="}\n"),a},onDone:r})}}]),t}(n("hcU7"))),l=function(e){return c.setup(this,e),c.create(e)};function d(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,n=new u(e,t);return n.constructor=d,n.compile=l,n._call=void 0,n.call=void 0,n}d.prototype=null,e.exports=d},"+rLv":function(e,t,n){var r=n("dyZX").document;e.exports=r&&r.documentElement},"//Jx":function(e,t,n){"use strict";n("LK8F");var r=/^[a-z_$][a-z0-9_$-]*$/i,a=n("cjZW"),i=n("eXaU");e.exports={add:function(e,t){var n=this.RULES;if(n.keywords[e])throw new Error("Keyword "+e+" is already defined");if(!r.test(e))throw new Error("Keyword "+e+" is not a valid identifier");if(t){this.validateKeyword(t,!0);var i=t.type;if(Array.isArray(i))for(var o=0;o1&&void 0!==arguments[1]?arguments[1]:void 0;r(this,e),this._map=new Map,this.name=n,this._factory=t,this._interceptors=[]}return a(e,[{key:"get",value:function(e){return this._map.get(e)}},{key:"for",value:function(e){var t=this.get(e);if(void 0!==t)return t;for(var n=this._factory(e),r=this._interceptors,a=0;a=0))throw new Error("precision must be a positive number");var n=Math.pow(10,t||0);return Math.round(e*n)/n},t.radiansToLength=d,t.lengthToRadians=f,t.lengthToDegrees=function(e,t){return p(f(e,t))},t.bearingToAzimuth=function(e){var t=e%360;return t<0&&(t+=360),t},t.radiansToDegrees=p,t.degreesToRadians=function(e){return e%360*Math.PI/180},t.convertLength=function(e,t,n){if(void 0===t&&(t="kilometers"),void 0===n&&(n="kilometers"),!(e>=0))throw new Error("length must be a positive number");return d(f(e,t),n)},t.convertArea=function(e,n,r){if(void 0===n&&(n="meters"),void 0===r&&(r="kilometers"),!(e>=0))throw new Error("area must be a positive number");var a=t.areaFactors[n];if(!a)throw new Error("invalid original units");var i=t.areaFactors[r];if(!i)throw new Error("invalid final units");return e/a*i},t.isNumber=h,t.isObject=function(e){return!!e&&e.constructor===Object},t.validateBBox=function(e){if(!e)throw new Error("bbox is required");if(!Array.isArray(e))throw new Error("bbox must be an Array");if(4!==e.length&&6!==e.length)throw new Error("bbox must be an Array of 4 or 6 numbers");e.forEach((function(e){if(!h(e))throw new Error("bbox must only contain numbers")}))},t.validateId=function(e){if(!e)throw new Error("id is required");if(-1===["string","number"].indexOf(typeof e))throw new Error("id must be a number or a string")},t.radians2degrees=function(){throw new Error("method has been renamed to `radiansToDegrees`")},t.degrees2radians=function(){throw new Error("method has been renamed to `degreesToRadians`")},t.distanceToDegrees=function(){throw new Error("method has been renamed to `lengthToDegrees`")},t.distanceToRadians=function(){throw new Error("method has been renamed to `lengthToRadians`")},t.radiansToDistance=function(){throw new Error("method has been renamed to `radiansToLength`")},t.bearingToAngle=function(){throw new Error("method has been renamed to `bearingToAzimuth`")},t.convertDistance=function(){throw new Error("method has been renamed to `convertLength`")}},"/xgg":function(e,t,n){"use strict";n("VEUW"),n("vLCf")},"/zp3":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"BaseLayer",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(t,"HeatMapGridLayer",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(t,"HeatMapLayer",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(t,"ArcLineLayer",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(t,"Arc2DLineLayer",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(t,"LineLayer",{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(t,"Point3dLayer",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(t,"PointImageLayer",{enumerable:!0,get:function(){return d.default}}),Object.defineProperty(t,"PointLayer",{enumerable:!0,get:function(){return f.default}}),Object.defineProperty(t,"TextLayer",{enumerable:!0,get:function(){return p.default}}),Object.defineProperty(t,"PolygonLayer",{enumerable:!0,get:function(){return h.default}}),Object.defineProperty(t,"Polygon3DLayer",{enumerable:!0,get:function(){return g.default}}),Object.defineProperty(t,"ImageLayer",{enumerable:!0,get:function(){return v.default}}),Object.defineProperty(t,"RasterLayer",{enumerable:!0,get:function(){return m.default}});var r=n("pqXx"),a=P(n("iZF3")),i=P(n("Jvvl")),o=P(n("6BmI")),s=P(n("Ei+M")),u=P(n("UMR1")),c=P(n("dxie")),l=P(n("bk2D")),d=P(n("gLCq")),f=P(n("qxY9")),p=P(n("taAP")),h=P(n("akud")),g=P(n("bnbG")),v=P(n("4iVx")),m=P(n("e/Uk")),y=P(n("N8Xp")),b=P(n("y9yn")),_=P(n("ao0v")),x=P(n("nSjJ")),R=P(n("v3Hg")),w=P(n("VWQ8")),E=P(n("DXYV")),S=P(n("cdXC")),A=P(n("tHQj")),T=P(n("9AZ8"));function P(e){return e&&e.__esModule?e:{default:e}}r.container.bind(r.TYPES.ILayerPlugin).to(y.default),r.container.bind(r.TYPES.ILayerPlugin).to(_.default),r.container.bind(r.TYPES.ILayerPlugin).to(S.default),r.container.bind(r.TYPES.ILayerPlugin).to(x.default),r.container.bind(r.TYPES.ILayerPlugin).to(b.default),r.container.bind(r.TYPES.ILayerPlugin).to(T.default),r.container.bind(r.TYPES.ILayerPlugin).to(w.default),r.container.bind(r.TYPES.ILayerPlugin).to(A.default),r.container.bind(r.TYPES.ILayerPlugin).to(R.default),r.container.bind(r.TYPES.ILayerPlugin).to(E.default)},0:function(e,t){},"0/R4":function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},"083e":function(e,t,n){"use strict";n("rGqo"),n("yt8O"),n("Btvt"),n("XfO3"),n("EK0E"),n("HAE/"),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;var t=s();if(t&&t.has(e))return t.get(e);var n={};if(null!=e){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var i=r?Object.getOwnPropertyDescriptor(e,a):null;i&&(i.get||i.set)?Object.defineProperty(n,a,i):n[a]=e[a]}}n.default=e,t&&t.set(e,n);return n}(n("q1tI")),i=(r=n("kEgK"))&&r.__esModule?r:{default:r},o=n("vgIT");function s(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return s=function(){return e},e}var u=function(e){return a.createElement(o.ConfigConsumer,null,(function(t){var n=(0,t.getPrefixCls)("empty");switch(e){case"Table":case"List":return a.createElement(i.default,{image:i.default.PRESENTED_IMAGE_SIMPLE});case"Select":case"TreeSelect":case"Cascader":case"Transfer":case"Mentions":return a.createElement(i.default,{image:i.default.PRESENTED_IMAGE_SIMPLE,className:"".concat(n,"-small")});default:return a.createElement(i.default,null)}}))};t.default=u},"0BRo":function(e,t,n){n("V+eJ");var r=n("1s4d");e.exports=function(e,t,n){var a,i;if("function"==typeof e.indexOf)switch(typeof t){case"number":if(0===t){for(a=1/t;n0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,n=new u(e,t);return n.constructor=p,n.tapAsync=l,n.tapPromise=d,n.compile=f,n}p.prototype=null,e.exports=p},"0w4r":function(e,t,n){"use strict";n("V+eJ"),n("LK8F"),e.exports=function(e,t,n){var r,a=" ",i=e.level,o=e.dataLevel,s=e.schema[t],u=e.schemaPath+e.util.getProperty(t),c=e.errSchemaPath+"/"+t,l=!e.opts.allErrors,d="data"+(o||""),f="valid"+i,p=e.opts.$data&&s&&s.$data;if(p?(a+=" var schema"+i+" = "+e.util.getData(s.$data,o,e.dataPathArr)+"; ",r="schema"+i):r=s,(s||p)&&!1!==e.opts.uniqueItems){p&&(a+=" var "+f+"; if ("+r+" === false || "+r+" === undefined) "+f+" = true; else if (typeof "+r+" != 'boolean') "+f+" = false; else { "),a+=" var i = "+d+".length , "+f+" = true , j; if (i > 1) { ";var h=e.schema.items&&e.schema.items.type,g=Array.isArray(h);if(!h||"object"==h||"array"==h||g&&(h.indexOf("object")>=0||h.indexOf("array")>=0))a+=" outer: for (;i--;) { for (j = i; j--;) { if (equal("+d+"[i], "+d+"[j])) { "+f+" = false; break outer; } } } ";else{a+=" var itemIndices = {}, item; for (;i--;) { var item = "+d+"[i]; ";var v="checkDataType"+(g?"s":"");a+=" if ("+e.util[v](h,"item",!0)+") continue; ",g&&(a+=" if (typeof item == 'string') item = '\"' + item; "),a+=" if (typeof itemIndices[item] == 'number') { "+f+" = false; j = itemIndices[item]; break; } itemIndices[item] = i; } "}a+=" } ",p&&(a+=" } "),a+=" if (!"+f+") { ";var m=m||[];m.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'uniqueItems' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { i: i, j: j } ",!1!==e.opts.messages&&(a+=" , message: 'should NOT have duplicate items (items ## ' + j + ' and ' + i + ' are identical)' "),e.opts.verbose&&(a+=" , schema: ",a+=p?"validate.schema"+u:""+s,a+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),a+=" } "):a+=" {} ";var y=a;a=m.pop(),!e.compositeRule&&l?e.async?a+=" throw new ValidationError(["+y+"]); ":a+=" validate.errors = ["+y+"]; return false; ":a+=" var err = "+y+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } ",l&&(a+=" else { ")}else l&&(a+=" if (true) { ");return a}},"16Al":function(e,t,n){"use strict";n("f3/d");var r=n("WbBG");function a(){}function i(){}i.resetWarningCache=a,e.exports=function(){function e(e,t,n,a,i,o){if(o!==r){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:a};return n.PropTypes=n,n}},"17x9":function(e,t,n){e.exports=n("16Al")()},"1Bfj":function(e,t,n){"use strict";var r=n("TqRt");t.__esModule=!0,t.default=void 0;var a=r(n("q1tI")),i=r(n("TSYQ")),o=n("Wbzz"),s=n("9kay"),u=r(n("mo9N")),c=function(e){var t,n,r,c=e.active,l=e.slug,d=(0,s.useTranslation)().t;return a.default.createElement("ul",{className:u.default.tabs},a.default.createElement("li",{className:(0,i.default)((t={},t[u.default.active]="examples"===c,t))},a.default.createElement(o.Link,{to:l},d("代码演示"))),a.default.createElement("li",{className:(0,i.default)((n={},n[u.default.active]="API"===c,n))},a.default.createElement(o.Link,{to:l+"/API"},"API")),a.default.createElement("li",{className:(0,i.default)((r={},r[u.default.active]="design"===c,r))},a.default.createElement(o.Link,{to:l+"/design"},d("设计指引"))))};t.default=c},"1DYX":function(e,t,n){var r=n("ALMR"),a=n("5ktw"),i=n("SK8o"),o=n("rhzI");e.exports=function(){if(0===arguments.length)throw new Error("pipe requires at least one argument");return r(arguments[0].length,i(a,arguments[0],o(arguments)))}},"1MBn":function(e,t,n){var r=n("DVgA"),a=n("JiEa"),i=n("UqcF");e.exports=function(e){var t=r(e),n=a.f;if(n)for(var o,s=n(e),u=i.f,c=0;s.length>c;)u.call(e,o=s[c++])&&t.push(o);return t}},"1OpS":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=function(){function e(e,t){this.attribute=void 0,this.buffer=void 0;var n=t.buffer,r=t.offset,a=t.stride,i=t.normalized,o=t.size,s=t.divisor;this.buffer=n,this.attribute={buffer:n.get(),offset:r||0,stride:a||0,normalized:i||!1,divisor:s||0},o&&(this.attribute.size=o)}var t=e.prototype;return t.get=function(){return this.attribute},t.updateBuffer=function(e){this.buffer.subData(e)},t.destroy=function(){this.buffer.destroy()},e}();t.default=r},"1OyB":function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}n.d(t,"a",(function(){return r}))},"1QhW":function(e,t,n){"use strict";n("rGqo"),n("yt8O"),n("Btvt"),n("RW0V"),n("V+eJ"),n("LK8F"),e.exports=function(e,t,n){var r="",a=!0===e.schema.$async,i=e.util.schemaHasRulesExcept(e.schema,e.RULES.all,"$ref"),o=e.self._getId(e.schema);if(e.opts.strictKeywords){var s=e.util.schemaUnknownRules(e.schema,e.RULES.keywords);if(s){var u="unknown keyword: "+s;if("log"!==e.opts.strictKeywords)throw new Error(u);e.logger.warn(u)}}if(e.isTop&&(r+=" var validate = ",a&&(e.async=!0,r+="async "),r+="function(data, dataPath, parentData, parentDataProperty, rootData) { 'use strict'; ",o&&(e.opts.sourceCode||e.opts.processCode)&&(r+=" /*# sourceURL="+o+" */ ")),"boolean"==typeof e.schema||!i&&!e.schema.$ref){var c=e.level,l=e.dataLevel,d=e.schema["false schema"],f=e.schemaPath+e.util.getProperty("false schema"),p=e.errSchemaPath+"/false schema",h=!e.opts.allErrors,g="data"+(l||""),v="valid"+c;if(!1===e.schema){e.isTop?h=!0:r+=" var "+v+" = false; ",(Z=Z||[]).push(r),r="",!1!==e.createErrors?(r+=" { keyword: 'false schema' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(p)+" , params: {} ",!1!==e.opts.messages&&(r+=" , message: 'boolean schema is false' "),e.opts.verbose&&(r+=" , schema: false , parentSchema: validate.schema"+e.schemaPath+" , data: "+g+" "),r+=" } "):r+=" {} ";var m=r;r=Z.pop(),!e.compositeRule&&h?e.async?r+=" throw new ValidationError(["+m+"]); ":r+=" validate.errors = ["+m+"]; return false; ":r+=" var err = "+m+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}else e.isTop?r+=a?" return data; ":" validate.errors = null; return true; ":r+=" var "+v+" = true; ";return e.isTop&&(r+=" }; return validate; "),r}if(e.isTop){var y=e.isTop;c=e.level=0,l=e.dataLevel=0,g="data";if(e.rootId=e.resolve.fullPath(e.self._getId(e.root.schema)),e.baseId=e.baseId||e.rootId,delete e.isTop,e.dataPathArr=[void 0],void 0!==e.schema.default&&e.opts.useDefaults&&e.opts.strictDefaults){var b="default is ignored in the schema root";if("log"!==e.opts.strictDefaults)throw new Error(b);e.logger.warn(b)}r+=" var vErrors = null; ",r+=" var errors = 0; ",r+=" if (rootData === undefined) rootData = data; "}else{c=e.level,g="data"+((l=e.dataLevel)||"");if(o&&(e.baseId=e.resolve.url(e.baseId,o)),a&&!e.async)throw new Error("async schema in sync schema");r+=" var errs_"+c+" = errors;"}v="valid"+c,h=!e.opts.allErrors;var _="",x="",R=e.schema.type,w=Array.isArray(R);if(R&&e.opts.nullable&&!0===e.schema.nullable&&(w?-1==R.indexOf("null")&&(R=R.concat("null")):"null"!=R&&(R=[R,"null"],w=!0)),w&&1==R.length&&(R=R[0],w=!1),e.schema.$ref&&i){if("fail"==e.opts.extendRefs)throw new Error('$ref: validation keywords used in schema at path "'+e.errSchemaPath+'" (see option extendRefs)');!0!==e.opts.extendRefs&&(i=!1,e.logger.warn('$ref: keywords ignored in schema at path "'+e.errSchemaPath+'"'))}if(e.schema.$comment&&e.opts.$comment&&(r+=" "+e.RULES.all.$comment.code(e,"$comment")),R){if(e.opts.coerceTypes)var E=e.util.coerceToTypes(e.opts.coerceTypes,R);var S=e.RULES.types[R];if(E||w||!0===S||S&&!$(S)){f=e.schemaPath+".type",p=e.errSchemaPath+"/type",f=e.schemaPath+".type",p=e.errSchemaPath+"/type";var A=w?"checkDataTypes":"checkDataType";if(r+=" if ("+e.util[A](R,g,!0)+") { ",E){var T="dataType"+c,P="coerced"+c;r+=" var "+T+" = typeof "+g+"; ","array"==e.opts.coerceTypes&&(r+=" if ("+T+" == 'object' && Array.isArray("+g+")) "+T+" = 'array'; "),r+=" var "+P+" = undefined; ";var C="",O=E;if(O)for(var M,k=-1,D=O.length-1;k")):null:e.match("--")?n(p("comment","--\x3e")):e.match("DOCTYPE",!0,!0)?(e.eatWhile(/[\w\._\-]/),n(function e(t){return function(n,r){for(var a;null!=(a=n.next());){if("<"==a)return r.tokenize=e(t+1),r.tokenize(n,r);if(">"==a){if(1==t){r.tokenize=d;break}return r.tokenize=e(t-1),r.tokenize(n,r)}}return"meta"}}(1))):null:e.eat("?")?(e.eatWhile(/[\w\._\-]/),t.tokenize=p("meta","?>"),"meta"):(i=e.eat("/")?"closeTag":"openTag",t.tokenize=f,"tag bracket"):"&"==r?(e.eat("#")?e.eat("x")?e.eatWhile(/[a-fA-F\d]/)&&e.eat(";"):e.eatWhile(/[\d]/)&&e.eat(";"):e.eatWhile(/[\w\.\-:]/)&&e.eat(";"))?"atom":"error":(e.eatWhile(/[^&<]/),null)}function f(e,t){var n,r,a=e.next();if(">"==a||"/"==a&&e.eat(">"))return t.tokenize=d,i=">"==a?"endTag":"selfcloseTag","tag bracket";if("="==a)return i="equals",null;if("<"==a){t.tokenize=d,t.state=m,t.tagName=t.tagStart=null;var o=t.tokenize(e,t);return o?o+" tag error":"tag error"}return/[\'\"]/.test(a)?(t.tokenize=(n=a,(r=function(e,t){for(;!e.eol();)if(e.next()==n){t.tokenize=f;break}return"string"}).isInAttribute=!0,r),t.stringStartCol=e.column(),t.tokenize(e,t)):(e.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function p(e,t){return function(n,r){for(;!n.eol();){if(n.match(t)){r.tokenize=d;break}n.next()}return e}}function h(e,t,n){this.prev=e.context,this.tagName=t,this.indent=e.indented,this.startOfLine=n,(u.doNotIndent.hasOwnProperty(t)||e.context&&e.context.noIndent)&&(this.noIndent=!0)}function g(e){e.context&&(e.context=e.context.prev)}function v(e,t){for(var n;;){if(!e.context)return;if(n=e.context.tagName,!u.contextGrabbers.hasOwnProperty(n)||!u.contextGrabbers[n].hasOwnProperty(t))return;g(e)}}function m(e,t,n){return"openTag"==e?(n.tagStart=t.column(),y):"closeTag"==e?b:m}function y(e,t,n){return"word"==e?(n.tagName=t.current(),o="tag",R):u.allowMissingTagName&&"endTag"==e?(o="tag bracket",R(e,0,n)):(o="error",y)}function b(e,t,n){if("word"==e){var r=t.current();return n.context&&n.context.tagName!=r&&u.implicitlyClosed.hasOwnProperty(n.context.tagName)&&g(n),n.context&&n.context.tagName==r||!1===u.matchClosing?(o="tag",_):(o="tag error",x)}return u.allowMissingTagName&&"endTag"==e?(o="tag bracket",_(e,0,n)):(o="error",x)}function _(e,t,n){return"endTag"!=e?(o="error",_):(g(n),m)}function x(e,t,n){return o="error",_(e,0,n)}function R(e,t,n){if("word"==e)return o="attribute",w;if("endTag"==e||"selfcloseTag"==e){var r=n.tagName,a=n.tagStart;return n.tagName=n.tagStart=null,"selfcloseTag"==e||u.autoSelfClosers.hasOwnProperty(r)?v(n,r):(v(n,r),n.context=new h(n,r,a==n.indented)),m}return o="error",R}function w(e,t,n){return"equals"==e?E:(u.allowMissing||(o="error"),R(e,0,n))}function E(e,t,n){return"string"==e?S:"word"==e&&u.allowUnquoted?(o="string",R):(o="error",R(e,0,n))}function S(e,t,n){return"string"==e?S:R(e,0,n)}return d.isInText=!0,{startState:function(e){var t={tokenize:d,state:m,indented:e||0,tagName:null,tagStart:null,context:null};return null!=e&&(t.baseIndent=e),t},token:function(e,t){if(!t.tagName&&e.sol()&&(t.indented=e.indentation()),e.eatSpace())return null;i=null;var n=t.tokenize(e,t);return(n||i)&&"comment"!=n&&(o=null,t.state=t.state(i||n,e,t),o&&(n="error"==o?n+" error":o)),n},indent:function(t,n,r){var a=t.context;if(t.tokenize.isInAttribute)return t.tagStart==t.indented?t.stringStartCol+1:t.indented+s;if(a&&a.noIndent)return e.Pass;if(t.tokenize!=f&&t.tokenize!=d)return r?r.match(/^(\s*)/)[0].length:0;if(t.tagName)return!1!==u.multilineTagIndentPastTag?t.tagStart+t.tagName.length+2:t.tagStart+s*(u.multilineTagIndentFactor||1);if(u.alignCDATA&&/$/,blockCommentStart:"\x3c!--",blockCommentEnd:"--\x3e",configuration:u.htmlMode?"html":"xml",helperType:u.htmlMode?"html":"xml",skipAttribute:function(e){e.state==E&&(e.state=R)},xmlCurrentTag:function(e){return e.tagName?{name:e.tagName,close:"closeTag"==e.type}:null},xmlCurrentContext:function(e){for(var t=[],n=e.context;n;n=n.prev)n.tagName&&t.push(n.tagName);return t.reverse()}}})),e.defineMIME("text/xml","xml"),e.defineMIME("application/xml","xml"),e.mimeModes.hasOwnProperty("text/html")||e.defineMIME("text/html",{name:"xml",htmlMode:!0})}(n("VrN/"))},"1fHE":function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=function(){function e(){}var t=e.prototype;return t.read=function(e,t){var n=this.getStateKey(e,t);try{var r=window.sessionStorage.getItem(n);return JSON.parse(r)}catch(a){return window&&window.___GATSBY_REACT_ROUTER_SCROLL&&window.___GATSBY_REACT_ROUTER_SCROLL[n]?window.___GATSBY_REACT_ROUTER_SCROLL[n]:{}}},t.save=function(e,t,n){var r=this.getStateKey(e,t),a=JSON.stringify(n);try{window.sessionStorage.setItem(r,a)}catch(i){window&&window.___GATSBY_REACT_ROUTER_SCROLL?window.___GATSBY_REACT_ROUTER_SCROLL[r]=JSON.parse(a):(window.___GATSBY_REACT_ROUTER_SCROLL={},window.___GATSBY_REACT_ROUTER_SCROLL[r]=JSON.parse(a))}},t.getStateKey=function(e,t){var n="@@scroll|"+(e.key||e.pathname);return null==t?n:n+"|"+t},e}();t.default=r},"1gqn":function(e,t,n){n("bHtr"),e.exports=function(e){return e&&"object"==typeof e&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}},"1j5w":function(e,t,n){"use strict";n.r(t);n("91GP"),n("LK8F"),n("V+eJ"),n("hHhE"),n("/SS/"),n("HAE/"),n("WLL4"),n("jm62"),n("8+KV"),n("0l/t"),n("rGqo"),n("yt8O"),n("Btvt"),n("RW0V"),n("rE2o"),n("ioFf");var r=n("q1tI"),a=n.n(r),i=n("xI0J"),o=(n("bWfx"),n("2Spj"),n("4IlW"));function s(){var e=[].slice.call(arguments,0);return 1===e.length?e[0]:function(){for(var t=0;t=n.subMenuTitle.offsetWidth||(e.style.minWidth="".concat(n.subMenuTitle.offsetWidth,"px"))}},n.saveSubMenuTitle=function(e){n.subMenuTitle=e};var a=e.store,i=e.eventKey,s=a.getState().defaultActiveFirst;n.isRootMenu=!1;var u=!1;return s&&(u=s[i]),Ne(a,i,u),n}var n,a,i;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&De(e,t)}(t,e),n=t,(a=[{key:"componentDidMount",value:function(){this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){var e=this,t=this.props,n=t.mode,r=t.parentMenu,a=t.manualRef;a&&a(this),"horizontal"===n&&r.isRootMenu&&this.props.isOpen&&(this.minWidthTimeout=setTimeout((function(){return e.adjustWidth()}),0))}},{key:"componentWillUnmount",value:function(){var e=this.props,t=e.onDestroy,n=e.eventKey;t&&t(n),this.minWidthTimeout&&clearTimeout(this.minWidthTimeout),this.mouseenterTimeout&&clearTimeout(this.mouseenterTimeout)}},{key:"renderChildren",value:function(e){var t=this,n=this.props,a={mode:"horizontal"===n.mode?"vertical":n.mode,visible:this.props.isOpen,level:n.level+1,inlineIndent:n.inlineIndent,focusable:!1,onClick:this.onSubMenuClick,onSelect:this.onSelect,onDeselect:this.onDeselect,onDestroy:this.onDestroy,selectedKeys:n.selectedKeys,eventKey:"".concat(n.eventKey,"-menu-"),openKeys:n.openKeys,motion:n.motion,onOpenChange:this.onOpenChange,subMenuOpenDelay:n.subMenuOpenDelay,parentMenu:this,subMenuCloseDelay:n.subMenuCloseDelay,forceSubMenuRender:n.forceSubMenuRender,triggerSubMenuAction:n.triggerSubMenuAction,builtinPlacements:n.builtinPlacements,defaultActiveFirst:n.store.getState().defaultActiveFirst[L(n.eventKey)],multiple:n.multiple,prefixCls:n.rootPrefixCls,id:this.internalMenuId,manualRef:this.saveMenuInstance,itemIcon:n.itemIcon,expandIcon:n.expandIcon},i=this.haveRendered;if(this.haveRendered=!0,this.haveOpened=this.haveOpened||a.visible||a.forceSubMenuRender,!this.haveOpened)return r.createElement("div",null);var o=Le({},n.motion,{leavedClassName:"".concat(n.rootPrefixCls,"-hidden"),removeOnLeave:!1,motionAppear:i||!a.visible||"inline"!==a.mode});return r.createElement(Ae,Object.assign({visible:a.visible},o),(function(n){var i=n.className,o=n.style,s=d()("".concat(a.prefixCls,"-sub"),i);return r.createElement(yt,Object.assign({},a,{id:t.internalMenuId,className:s,style:o}),e)}))}},{key:"render",value:function(){var e,t=Le({},this.props),n=t.isOpen,a=this.getPrefixCls(),i="inline"===t.mode,o=d()(a,"".concat(a,"-").concat(t.mode),(je(e={},t.className,!!t.className),je(e,this.getOpenClassName(),n),je(e,this.getActiveClassName(),t.active||n&&!i),je(e,this.getDisabledClassName(),t.disabled),je(e,this.getSelectedClassName(),this.isChildrenSelected()),e));this.internalMenuId||(t.eventKey?this.internalMenuId="".concat(t.eventKey,"$Menu"):(Fe+=1,this.internalMenuId="$__$".concat(Fe,"$Menu")));var s={},u={},c={};t.disabled||(s={onMouseLeave:this.onMouseLeave,onMouseEnter:this.onMouseEnter},u={onClick:this.onTitleClick},c={onMouseEnter:this.onTitleMouseEnter,onMouseLeave:this.onTitleMouseLeave});var l={};i&&(l.paddingLeft=t.inlineIndent*t.level);var f={};this.props.isOpen&&(f={"aria-owns":this.internalMenuId});var p=null;"horizontal"!==t.mode&&(p=this.props.expandIcon,"function"==typeof this.props.expandIcon&&(p=r.createElement(this.props.expandIcon,Le({},this.props))));var h=r.createElement("div",Object.assign({ref:this.saveSubMenuTitle,style:l,className:"".concat(a,"-title")},c,u,{"aria-expanded":n},f,{"aria-haspopup":"true",title:"string"==typeof t.title?t.title:void 0}),t.title,p||r.createElement("i",{className:"".concat(a,"-arrow")})),g=this.renderChildren(t.children),v=t.parentMenu.isRootMenu?t.parentMenu.props.getPopupContainer:function(e){return e.parentNode},m=ze[t.mode],y=t.popupOffset?{offset:t.popupOffset}:{},b="inline"===t.mode?"":t.popupClassName,_=t.disabled,x=t.triggerSubMenuAction,R=t.subMenuOpenDelay,w=t.forceSubMenuRender,E=t.subMenuCloseDelay,S=t.builtinPlacements;return F.forEach((function(e){return delete t[e]})),delete t.onClick,r.createElement("li",Object.assign({},t,s,{className:o,role:"menuitem"}),i&&h,i&&g,!i&&r.createElement(W.a,{prefixCls:a,popupClassName:"".concat(a,"-popup ").concat(b),getPopupContainer:v,builtinPlacements:Object.assign({},Pe,S),popupPlacement:m,popupVisible:n,popupAlign:y,popup:g,action:_?[]:[x],mouseEnterDelay:R,mouseLeaveDelay:E,onPopupVisibleChange:this.onPopupVisibleChange,forceRender:w},h))}}])&&Oe(n.prototype,a),i&&Oe(n,i),t}(r.Component);Be.defaultProps={onMouseEnter:D,onMouseLeave:D,onTitleMouseEnter:D,onTitleMouseLeave:D,onTitleClick:D,manualRef:D,mode:"vertical",title:""};var Ve=Object(i.connect)((function(e,t){var n=e.openKeys,r=e.activeKey,a=e.selectedKeys,i=t.eventKey,o=t.subMenuKey;return{isOpen:n.indexOf(i)>-1,active:r[o]===i,selectedKeys:a}}))(Be);Ve.isSubMenu=!0;var He=Ve;function Ue(e){return(Ue="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function We(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function Xe(e,t){for(var n=0;n=0}));i.forEach((function(e){N(e,"display","inline-block")})),e.menuItemSizes=a.map((function(e){return z(e)})),i.forEach((function(e){N(e,"display","none")})),e.overflowedIndicatorWidth=z(t.children[t.children.length-1]),e.originalTotalWidth=e.menuItemSizes.reduce((function(e,t){return e+t}),0),e.handleResize(),N(r,"display","none")}}}},e.handleResize=function(){if("horizontal"===e.props.mode){var t=V.findDOMNode(Ze(e));if(t){var n=z(t);e.overflowedItems=[];var r,a=0;e.originalTotalWidth>n+tt&&(r=-1,e.menuItemSizes.forEach((function(t){(a+=t)+e.overflowedIndicatorWidth<=n&&(r+=1)}))),e.setState({lastVisibleIndex:r})}}},e}var n,a,i;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&$e(e,t)}(t,e),n=t,(a=[{key:"componentDidMount",value:function(){var e=this;if(this.setChildrenWidthAndResize(),1===this.props.level&&"horizontal"===this.props.mode){var t=V.findDOMNode(this);if(!t)return;this.resizeObserver=new U.default((function(t){t.forEach(e.setChildrenWidthAndResize)})),[].slice.call(t.children).concat(t).forEach((function(t){e.resizeObserver.observe(t)})),"undefined"!=typeof MutationObserver&&(this.mutationObserver=new MutationObserver((function(){e.resizeObserver.disconnect(),[].slice.call(t.children).concat(t).forEach((function(t){e.resizeObserver.observe(t)})),e.setChildrenWidthAndResize()})),this.mutationObserver.observe(t,{attributes:!1,childList:!0,subTree:!1}))}}},{key:"componentWillUnmount",value:function(){this.resizeObserver&&this.resizeObserver.disconnect(),this.mutationObserver&&this.resizeObserver.disconnect()}},{key:"renderChildren",value:function(e){var t=this,n=this.state.lastVisibleIndex;return(e||[]).reduce((function(a,i,o){var s=i;if("horizontal"===t.props.mode){var u=t.getOverflowedSubMenuItem(i.props.eventKey,[]);void 0!==n&&-1!==t.props.className.indexOf("".concat(t.props.prefixCls,"-root"))&&(o>n&&(s=r.cloneElement(i,{style:{display:"none"},eventKey:"".concat(i.props.eventKey,"-hidden"),className:"".concat(et)})),o===n+1&&(t.overflowedItems=e.slice(n+1).map((function(e){return r.cloneElement(e,{key:e.props.eventKey,mode:"vertical-left"})})),u=t.getOverflowedSubMenuItem(i.props.eventKey,t.overflowedItems)));var c=[].concat(We(a),[u,s]);return o===e.length-1&&c.push(t.getOverflowedSubMenuItem(i.props.eventKey,[],!0)),c}return[].concat(We(a),[s])}),[])}},{key:"render",value:function(){var e=this.props,t=(e.visible,e.prefixCls,e.overflowedIndicator,e.mode,e.level,e.tag),n=e.children,a=(e.theme,Ye(e,["visible","prefixCls","overflowedIndicator","mode","level","tag","children","theme"])),i=t;return r.createElement(i,Object.assign({},a),this.renderChildren(n))}}])&&Xe(n.prototype,a),i&&Xe(n,i),t}(r.Component);nt.defaultProps={tag:"div",className:""};var rt=nt;function at(e){return(at="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function it(){return(it=Object.assign||function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;r(this,e),this._args=t,this.name=n,this.taps=[],this.interceptors=[],this._call=o,this.call=o,this._callAsync=s,this.callAsync=s,this._promise=u,this.promise=u,this._x=void 0,this.compile=this.compile,this.tap=this.tap,this.tapAsync=this.tapAsync,this.tapPromise=this.tapPromise}return a(e,[{key:"compile",value:function(e){throw new Error("Abstract: should be overridden")}},{key:"_createCall",value:function(e){return this.compile({taps:this.taps,interceptors:this.interceptors,args:this._args,type:e})}},{key:"_tap",value:function(e,t,n){if("string"==typeof t)t={name:t};else if("object"!=typeof t||null===t)throw new Error("Invalid tap options");if("string"!=typeof t.name||""===t.name)throw new Error("Missing name for tap");void 0!==t.context&&i(),t=Object.assign({type:e,fn:n},t),t=this._runRegisterInterceptors(t),this._insert(t)}},{key:"tap",value:function(e,t){this._tap("sync",e,t)}},{key:"tapAsync",value:function(e,t){this._tap("async",e,t)}},{key:"tapPromise",value:function(e,t){this._tap("promise",e,t)}},{key:"_runRegisterInterceptors",value:function(e){var t=!0,n=!1,r=void 0;try{for(var a,i=this.interceptors[Symbol.iterator]();!(t=(a=i.next()).done);t=!0){var o=a.value;if(o.register){var s=o.register(e);void 0!==s&&(e=s)}}}catch(u){n=!0,r=u}finally{try{t||null==i.return||i.return()}finally{if(n)throw r}}return e}},{key:"withOptions",value:function(e){var t=this,n=function(t){return Object.assign({},e,"string"==typeof t?{name:t}:t)};return{name:this.name,tap:function(e,r){return t.tap(n(e),r)},tapAsync:function(e,r){return t.tapAsync(n(e),r)},tapPromise:function(e,r){return t.tapPromise(n(e),r)},intercept:function(e){return t.intercept(e)},isUsed:function(){return t.isUsed()},withOptions:function(e){return t.withOptions(n(e))}}}},{key:"isUsed",value:function(){return this.taps.length>0||this.interceptors.length>0}},{key:"intercept",value:function(e){if(this._resetCompilation(),this.interceptors.push(Object.assign({},e)),e.register)for(var t=0;t0;){r--;var a=this.taps[r];this.taps[r+1]=a;var i=a.stage||0;if(t){if(t.has(a.name)){t.delete(a.name);continue}if(t.size>0)continue}if(!(i>n)){r++;break}}this.taps[r]=e}}]),e}();Object.setPrototypeOf(c.prototype,null),e.exports=c},"1nQ/":function(e,t,n){"use strict";var r=n("lwsE"),a=n("W8MJ"),i=n("a1gu"),o=n("Nsbk"),s=n("7W2i"),u=n("lMCK"),c=new(function(e){function t(){return r(this,t),i(this,o(t).apply(this,arguments))}return s(t,e),a(t,[{key:"content",value:function(e){var t=e.onError,n=e.onDone,r=e.rethrowIfPossible;return this.callTapsLooping({onError:function(e,n){return t(n)},onDone:n,rethrowIfPossible:r})}}]),t}(n("hcU7"))),l=function(){throw new Error("tapAsync is not supported on a SyncLoopHook")},d=function(){throw new Error("tapPromise is not supported on a SyncLoopHook")},f=function(e){return c.setup(this,e),c.create(e)};function p(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,n=new u(e,t);return n.constructor=p,n.tapAsync=l,n.tapPromise=d,n.compile=f,n}p.prototype=null,e.exports=p},"1p+/":function(e,t,n){n("Oyvg"),n("SRfc"),n("OG14"),function(e){"use strict";var t={script:[["lang",/(javascript|babel)/i,"javascript"],["type",/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i,"javascript"],["type",/./,"text/plain"],[null,null,"javascript"]],style:[["lang",/^css$/i,"css"],["type",/^(text\/)?(x-)?(stylesheet|css)$/i,"css"],["type",/./,"text/plain"],[null,null,"css"]]},n={};function r(e,t){var r=e.match(function(e){var t=n[e];return t||(n[e]=new RegExp("\\s+"+e+"\\s*=\\s*('|\")?([^'\"]+)('|\")?\\s*"))}(t));return r?/^\s*(.*?)\s*$/.exec(r[2])[1]:""}function a(e,t){return new RegExp((t?"^":"")+"","i")}function i(e,t){for(var n in e)for(var r=t[n]||(t[n]=[]),a=e[n],i=a.length-1;i>=0;i--)r.unshift(a[i])}e.defineMode("htmlmixed",(function(n,o){var s=e.getMode(n,{name:"xml",htmlMode:!0,multilineTagIndentFactor:o.multilineTagIndentFactor,multilineTagIndentPastTag:o.multilineTagIndentPastTag}),u={},c=o&&o.tags,l=o&&o.scriptTypes;if(i(t,u),c&&i(c,u),l)for(var d=l.length-1;d>=0;d--)u.script.unshift(["type",l[d].matches,l[d].mode]);function f(t,i){var o,c=s.token(t,i.htmlState),l=/\btag\b/.test(c);if(l&&!/[<>\s\/]/.test(t.current())&&(o=i.htmlState.tagName&&i.htmlState.tagName.toLowerCase())&&u.hasOwnProperty(o))i.inTag=o+" ";else if(i.inTag&&l&&/>$/.test(t.current())){var d=/^([\S]+) (.*)/.exec(i.inTag);i.inTag=null;var p=">"==t.current()&&function(e,t){for(var n=0;n-1?e.backUp(r.length-a):r.match(/<\/?$/)&&(e.backUp(r.length),e.match(t,!1)||e.match(r)),n}(e,v,t.localMode.token(e,t.localState))},i.localMode=h,i.localState=e.startState(h,s.indent(i.htmlState,"",""))}else i.inTag&&(i.inTag+=t.current(),t.eol()&&(i.inTag+=" "));return c}return{startState:function(){return{token:f,inTag:null,localMode:null,localState:null,htmlState:e.startState(s)}},copyState:function(t){var n;return t.localState&&(n=e.copyState(t.localMode,t.localState)),{token:t.token,inTag:t.inTag,localMode:t.localMode,localState:n,htmlState:e.copyState(s,t.htmlState)}},token:function(e,t){return t.token(e,t)},indent:function(t,n,r){return!t.localMode||/^\s*<\//.test(n)?s.indent(t.htmlState,n,r):t.localMode.indent?t.localMode.indent(t.localState,n,r):e.Pass},innerMode:function(e){return{state:e.localState||e.htmlState,mode:e.localMode||s}}}}),"xml","javascript","css"),e.defineMIME("text/html","htmlmixed")}(n("VrN/"),n("1eCo"),n("+dQi"),n("ewDg"))},"1s4d":function(e,t,n){var r=n("Wnyi"),a=n("zgIM");e.exports=r((function(e,t){return a(e,t,[],[])}))},"1sa7":function(e,t){e.exports=Math.log1p||function(e){return(e=+e)>-1e-8&&e<1e-8?e-e*e/2:Math.log(1+e)}},"25dN":function(e,t,n){var r=n("XKFU");r(r.S,"Object",{is:n("g6HL")})},"27j4":function(e,t,n){"use strict";n("hHhE"),n("/SS/"),n("91GP"),n("rE2o"),n("ioFf"),n("rGqo"),n("yt8O"),n("Btvt"),n("XfO3"),n("EK0E"),n("HAE/"),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=function(e){if(e&&e.__esModule)return e;var t=l();if(t&&t.has(e))return t.get(e);var n={};if(null!=e){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var i=r?Object.getOwnPropertyDescriptor(e,a):null;i&&(i.get||i.set)?Object.defineProperty(n,a,i):n[a]=e[a]}}n.default=e,t&&t.set(e,n);return n}(n("q1tI")),a=n("94VI"),i=c(n("kYuu")),o=c(n("sA14")),s=n("vgIT"),u=n("MBvU");function c(e){return e&&e.__esModule?e:{default:e}}function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function d(e){return(d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function f(){return(f=Object.assign||function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,n=new u(e,t);return n.constructor=d,n.compile=l,n._call=void 0,n.call=void 0,n}d.prototype=null,e.exports=d},"2jsQ":function(e,t,n){"use strict";e.exports=function(e,t,n){var r,a=" ",i=e.level,o=e.dataLevel,s=e.schema[t],u=e.schemaPath+e.util.getProperty(t),c=e.errSchemaPath+"/"+t,l=!e.opts.allErrors,d="data"+(o||""),f=e.opts.$data&&s&&s.$data;f?(a+=" var schema"+i+" = "+e.util.getData(s.$data,o,e.dataPathArr)+"; ",r="schema"+i):r=s,a+="if ( ",f&&(a+=" ("+r+" !== undefined && typeof "+r+" != 'number') || "),a+=" "+d+".length "+("maxItems"==t?">":"<")+" "+r+") { ";var p=t,h=h||[];h.push(a),a="",!1!==e.createErrors?(a+=" { keyword: '"+(p||"_limitItems")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { limit: "+r+" } ",!1!==e.opts.messages&&(a+=" , message: 'should NOT have ",a+="maxItems"==t?"more":"fewer",a+=" than ",a+=f?"' + "+r+" + '":""+s,a+=" items' "),e.opts.verbose&&(a+=" , schema: ",a+=f?"validate.schema"+u:""+s,a+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),a+=" } "):a+=" {} ";var g=a;return a=h.pop(),!e.compositeRule&&l?e.async?a+=" throw new ValidationError(["+g+"]); ":a+=" validate.errors = ["+g+"]; return false; ":a+=" var err = "+g+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+="} ",l&&(a+=" else { "),a}},"2rxz":function(e,t,n){"use strict";var r=n("lwsE"),a=n("W8MJ"),i=n("a1gu"),o=n("Nsbk"),s=n("7W2i"),u=n("PyuW"),c=new(function(e){function t(){return r(this,t),i(this,o(t).apply(this,arguments))}return s(t,e),a(t,[{key:"content",value:function(e){var t=e.onError,n=e.onDone;return this.callTapsLooping({onError:function(e,n,r,a){return t(n)+a(!0)},onDone:n})}}]),t}(n("A5Zj"))),l=function(e){return c.setup(this,e),c.create(e)};function d(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,n=new u(e,t);return n.constructor=d,n.compile=l,n._call=void 0,n.call=void 0,n}d.prototype=null,e.exports=d},"2s43":function(e,t,n){"use strict";var r=n("lwsE"),a=n("W8MJ"),i=n("a1gu"),o=n("Nsbk"),s=n("7W2i"),u=n("lMCK"),c=new(function(e){function t(){return r(this,t),i(this,o(t).apply(this,arguments))}return s(t,e),a(t,[{key:"content",value:function(e){var t=e.onError,n=e.onResult,r=e.resultReturns,a=e.onDone,i=e.rethrowIfPossible;return this.callTapsSeries({onError:function(e,n){return t(n)},onResult:function(e,t,r){return"if(".concat(t," !== undefined) {\n").concat(n(t),";\n} else {\n").concat(r(),"}\n")},resultReturns:r,onDone:a,rethrowIfPossible:i})}}]),t}(n("hcU7"))),l=function(){throw new Error("tapAsync is not supported on a SyncBailHook")},d=function(){throw new Error("tapPromise is not supported on a SyncBailHook")},f=function(e){return c.setup(this,e),c.create(e)};function p(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,n=new u(e,t);return n.constructor=p,n.tapAsync=l,n.tapPromise=d,n.compile=f,n}p.prototype=null,e.exports=p},"2uu2":function(e,t,n){"use strict";var r=n("o0o1"),a=n("yXPU");Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i,o=n("4cb6"),s=h(n("fbvF")),u=h(n("1OpS")),c=h(n("QMan")),l=h(n("HLIj")),d=h(n("SgLm")),f=h(n("WGu1")),p=h(n("L2zO"));function h(e){return e&&e.__esModule?e:{default:e}}var g=(0,o.injectable)()(i=function(){function e(){var e=this;this.gl=void 0,this.$container=void 0,this.createModel=function(t){return new f.default(e.gl,t)},this.createAttribute=function(t){return new u.default(e.gl,t)},this.createBuffer=function(t){return new c.default(e.gl,t)},this.createElements=function(t){return new l.default(e.gl,t)},this.createTexture2D=function(t){return new p.default(e.gl,t)},this.createFramebuffer=function(t){return new d.default(e.gl,t)},this.useFramebuffer=function(t,n){e.gl({framebuffer:t?t.get():null})(n)},this.clear=function(t){var n=t.color,r=t.depth,a=t.stencil,i=t.framebuffer,o=void 0===i?null:i,s={color:n,depth:r,stencil:a};s.framebuffer=null===o?o:o.get(),e.gl.clear(s)},this.viewport=function(t){var n=t.x,r=t.y,a=t.width,i=t.height;e.gl._gl.viewport(n,r,a,i),e.gl._refresh()},this.readPixels=function(t){var n=t.framebuffer,r={x:t.x,y:t.y,width:t.width,height:t.height};return n&&(r.framebuffer=n.get()),e.gl.read(r)},this.getViewportSize=function(){return{width:e.gl._gl.drawingBufferWidth,height:e.gl._gl.drawingBufferHeight}},this.getContainer=function(){return e.$container},this.destroy=function(){e.gl.destroy()}}return e.prototype.init=function(){var e=a(r.mark((function e(t){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.$container=t,e.next=3,new Promise((function(e,n){(0,s.default)({container:t,attributes:{alpha:!0,antialias:!1,premultipliedAlpha:!0},extensions:["OES_element_index_uint","EXT_shader_texture_lod","OES_standard_derivatives","EXT_SRGB","OES_texture_float","WEBGL_depth_texture","angle_instanced_arrays","EXT_texture_filter_anisotropic"],optionalExtensions:["oes_texture_float_linear"],onDone:function(t,r){!t&&r||n(t),e(r)}})}));case 3:this.gl=e.sent;case 4:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}(),e}())||i;t.default=g},"2w5D":function(e,t,n){"use strict";var r=n("GfB1");e.exports=function(e){return function(t){return r("Type."+e+"() is being deprecated in favour of Type['fantasy-land/"+e+"'](). \n Your data structure is using the old-style fantasy-land methods,\n and these won't be supported in Folktale 3"),t}}},"2zWp":function(e,t,n){"use strict";var r=n("284h"),a=n("TqRt");t.__esModule=!0,t.default=function(e){var t=e.data,n=e.location,r=t.markdownRemark,a=t.allMarkdownRemark,d=t.site,R=r.frontmatter,w=r.html,E=r.tableOfContents,S=r.fields,A=S.slug,T=S.readingTime,P=r.parent.relativePath,C=a.edges,O=(void 0===C?[]:C).filter((function(e){return e.node.fields.slug.includes("/docs/")})),M=d.siteMetadata,k=M.docs,D=void 0===k?[]:k,I=M.githubUrl,L=d.pathPrefix,j=n.pathname.replace(new RegExp("^"+L),""),F=(0,p.useTranslation)(),z=F.t,N=F.i18n,B=(0,f.groupBy)(O,(function(e){return e.node.fields.slug.split("/").slice(0,-1).join("/")})),V=(0,l.useState)(Object.keys(B)),H=V[0],U=V[1];return l.default.createElement(l.default.Fragment,null,l.default.createElement(v.default,{title:R.title,lang:N.language}),l.default.createElement(u.default,{style:{background:"#fff"},hasSider:!0,className:m.default.layout},l.default.createElement(u.default.Sider,{width:"auto",theme:"light",className:m.default.sider},l.default.createElement(c.default,{mode:"inline",selectedKeys:[A],style:{height:"100%"},openKeys:H,onOpenChange:function(e){return U(e)}},Object.keys(B).filter((function(e){return e.startsWith("/"+N.language+"/")})).sort((function(e,t){var n=_(e),r=_(t),a=x(D,n),i=x(D,r);return a&&i?a.order-i.order:0})).map((function(e){if(!b(e,j))return null;if(e.split("/").length<=4)return y(B[e]);var t=_(e),n=x(D,t);return l.default.createElement(c.default.SubMenu,{key:e,title:n&&n.title?n.title[N.language]:t},y(B[e]))})))),l.default.createElement(h.default,{className:m.default.markdown},l.default.createElement(s.default,null,l.default.createElement("div",{className:m.default.toc,dangerouslySetInnerHTML:{__html:E}})),l.default.createElement("div",{className:m.default.main},l.default.createElement("h1",null,R.title,l.default.createElement(i.default,{title:z("在 GitHub 上编辑")},l.default.createElement("a",{href:I+"/edit/master/"+P,target:"_blank",className:m.default.editOnGtiHubButton},l.default.createElement(o.default,{type:"edit"})))),l.default.createElement("div",null,l.default.createElement(g.default,{readingTime:T})),l.default.createElement("div",{dangerouslySetInnerHTML:{__html:w}})))))},t.pageQuery=void 0,n("93XW");var i=a(n("d1El"));n("FGdI");var o=a(n("Pbn2"));n("bUaZ");var s=a(n("EujP"));n("ppZR");var u=a(n("d2CI"));n("PFYH");var c=a(n("Jv8k")),l=r(n("q1tI")),d=n("Wbzz"),f=n("T89o"),p=n("9kay"),h=a(n("fAB8")),g=a(n("YJhX")),v=a(n("wPmp")),m=a(n("HYfu")),y=function(e){return e.map((function(e){var t=e.node,n=t.frontmatter.title,r=t.fields.slug;return l.default.createElement(c.default.Item,{key:r},l.default.createElement(d.Link,{to:r},n))}))},b=function(e,t){var n=e.split("/").slice(e.split("/").indexOf("docs")+1),r=t.split("/").slice(e.split("/").indexOf("docs")+1);return n[0]===r[0]},_=function(e){void 0===e&&(e="");var t=e.split("/");return t.slice(t.indexOf("docs")+1).filter((function(e){return e})).join("/")},x=function(e,t){return void 0===t&&(t=""),e.find((function(e){return e.slug===t}))||{}};t.pageQuery="1730715052"},"3/ER":function(e,t,n){"use strict";(function(e){var r=n("Ju5/"),a="object"==typeof exports&&exports&&!exports.nodeType&&exports,i=a&&"object"==typeof e&&e&&!e.nodeType&&e,o=i&&i.exports===a?r.a.Buffer:void 0,s=o?o.allocUnsafe:void 0;t.a=function(e,t){if(t)return e.slice();var n=e.length,r=s?s(n):new e.constructor(n);return e.copy(r),r}}).call(this,n("3UD+")(e))},"30RF":function(e,t,n){"use strict";var r=n("TqRt");t.__esModule=!0,t.cleanPath=t.findPath=t.findMatchPath=t.setMatchPaths=void 0,n("rGqo");var a=n("LYrO"),i=r(n("cSJ8")),o=r(n("Z7Uv")),s=new Map,u=[],c=function(e){var t=decodeURIComponent(e);return(0,i.default)(t,"/gatsby-theme-antv").split("#")[0].split("?")[0]};t.setMatchPaths=function(e){u=e};var l=function(e){var t=d(e),n=u,r=Array.isArray(n),i=0;for(n=r?n:n[Symbol.iterator]();;){var s;if(r){if(i>=n.length)break;s=n[i++]}else{if((i=n.next()).done)break;s=i.value}var c=s,l=c.matchPath,f=c.path;if((0,a.match)(l,t))return(0,o.default)(f)}return null};t.findMatchPath=l;t.findPath=function(e){var t=c(e);if(s.has(t))return s.get(t);var n=l(t);return n||(n=d(e)),s.set(t,n),n};var d=function(e){var t=c(e);return"/index.html"===t&&(t="/"),t=(0,o.default)(t)};t.cleanPath=d},"30cx":function(e,t,n){"use strict";var r=n("TqRt"),a=n("284h");t.__esModule=!0,t.default=void 0;var i=a(n("q1tI")),o=r(n("TSYQ")),s=r(n("3Q4d")),u=r(n("44il")),c=function(e){var t=e.examples,n=void 0===t?[]:t,r=e.location,a=n.find((function(e){return"#"+e.filename.split(".")[0]===r.hash}))||n[0],c=(0,i.useState)(a),l=c[0],d=c[1];return i.default.createElement("div",{className:u.default.container},i.default.createElement("ul",{className:u.default.cards},n.map((function(e){var t;return i.default.createElement("li",{key:e.relativePath,onClick:function(){window.location.hash=e.filename.split(".")[0],d(e)},role:"button",className:(0,o.default)(u.default.card,(t={},t[u.default.current]=e.relativePath===l.relativePath,t)),title:e.title||l.relativePath},i.default.createElement("img",{src:e.screenshot||"https://gw.alipayobjects.com/os/s/prod/antv/assets/image/screenshot-placeholder-b8e70.png",alt:e.relativePath}))}))),i.default.createElement(s.default,{key:l.relativePath,relativePath:l.relativePath,source:l.source,babeledSource:l.babeledSource,filename:l.filename}))};t.default=c},"3DaA":function(e,t,n){"use strict";var r=n("5tHe"),a=r.Error,i=r.Ok;e.exports=function(e){try{return i(e())}catch(t){return a(t)}}},"3DfO":function(e,t){e.exports=function(e){return null==e}},"3GJH":function(e,t,n){n("lCc8");var r=n("WEpk").Object;e.exports=function(e,t){return r.create(e,t)}},"3Lyj":function(e,t,n){var r=n("KroJ");e.exports=function(e,t,n){for(var a in t)r(e,a,t[a],n);return e}},"3Mqf":function(e,t,n){"use strict";n("VEUW"),n("G3+4")},"3PeW":function(e,t,n){"use strict";n("V+eJ"),n("rE2o"),n("ioFf"),n("91GP"),n("rGqo"),n("yt8O"),n("Btvt"),n("XfO3"),n("EK0E"),n("HAE/"),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=function(e){if(e&&e.__esModule)return e;var t=s();if(t&&t.has(e))return t.get(e);var n={};if(null!=e){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var i=r?Object.getOwnPropertyDescriptor(e,a):null;i&&(i.get||i.set)?Object.defineProperty(n,a,i):n[a]=e[a]}}n.default=e,t&&t.set(e,n);return n}(n("q1tI")),a=o(n("aVg8")),i=o(n("g5iu"));function o(e){return e&&e.__esModule?e:{default:e}}function s(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return s=function(){return e},e}function u(){return(u=Object.assign||function(e){for(var t=1;t';var e=document.createElement("script");return e.innerHTML="\n try {\n "+w+"\n } catch(e) {\n if (window.__reportErrorInPlayGround) {\n window.__reportErrorInPlayGround(e);\n }\n }\n ",c.current.appendChild(e),function(){c&&c.current&&(c.current.innerHTML='
')}}}),[w,_]),l.default.createElement("div",{className:h.default.playground,ref:i},l.default.createElement("div",{className:h.default.preview},_?l.default.createElement(u.default,{status:"error",title:a("演示代码报错,请检查"),subTitle:l.default.createElement("pre",null,_&&_.message)}):l.default.createElement("div",{ref:c})),l.default.createElement("div",{className:h.default.editor},l.default.createElement("div",{className:h.default.toolbar},l.default.createElement(o.default,{title:a(m?"离开全屏":"进入全屏")},l.default.createElement(s.default,{type:m?"fullscreen-exit":"fullscreen",onClick:function(){y(!m),i.current&&(m||document.fullscreenElement?document.exitFullscreen&&document.exitFullscreen():i.current.requestFullscreen())}})),l.default.createElement(g,{copyable:{text:A}})),l.default.createElement("div",{className:h.default.codemirror},l.default.createElement(d.UnControlled,{value:t,options:{mode:"jsx",theme:"mdn-like",tabSize:2,styleActiveLine:!0,matchBrackets:!0,autoCloseBrackets:!0,autofocus:!1,matchTags:{bothTags:!0}},cursor:{line:-1,ch:-1},onChange:function(e,t,n){T(n);try{var a=(0,p.transform)(n,{filename:r,presets:["react","typescript","es2015","stage-3"],plugins:["transform-modules-umd"]}).code;E(a)}catch(i){return console.error(i),void x(i)}x(null)}}))))},m=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),a=0;a0:e.util.schemaHasRules(g,e.RULES.all)),y=void 0!==v&&(e.opts.strictKeywords?"object"==typeof v&&Object.keys(v).length>0:e.util.schemaHasRules(v,e.RULES.all)),b=p.baseId;if(m||y){var _;p.createErrors=!1,p.schema=o,p.schemaPath=s,p.errSchemaPath=u,r+=" var "+f+" = errors; var "+d+" = true; ";var x=e.compositeRule;e.compositeRule=p.compositeRule=!0,r+=" "+e.validate(p)+" ",p.baseId=b,p.createErrors=!0,r+=" errors = "+f+"; if (vErrors !== null) { if ("+f+") vErrors.length = "+f+"; else vErrors = null; } ",e.compositeRule=p.compositeRule=x,m?(r+=" if ("+h+") { ",p.schema=e.schema.then,p.schemaPath=e.schemaPath+".then",p.errSchemaPath=e.errSchemaPath+"/then",r+=" "+e.validate(p)+" ",p.baseId=b,r+=" "+d+" = "+h+"; ",m&&y?r+=" var "+(_="ifClause"+a)+" = 'then'; ":_="'then'",r+=" } ",y&&(r+=" else { ")):r+=" if (!"+h+") { ",y&&(p.schema=e.schema.else,p.schemaPath=e.schemaPath+".else",p.errSchemaPath=e.errSchemaPath+"/else",r+=" "+e.validate(p)+" ",p.baseId=b,r+=" "+d+" = "+h+"; ",m&&y?r+=" var "+(_="ifClause"+a)+" = 'else'; ":_="'else'",r+=" } "),r+=" if (!"+d+") { var err = ",!1!==e.createErrors?(r+=" { keyword: 'if' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { failingKeyword: "+_+" } ",!1!==e.opts.messages&&(r+=" , message: 'should match \"' + "+_+" + '\" schema' "),e.opts.verbose&&(r+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),r+=" } "):r+=" {} ",r+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&c&&(e.async?r+=" throw new ValidationError(vErrors); ":r+=" validate.errors = vErrors; return false; "),r+=" } ",c&&(r+=" else { "),r=e.util.cleanUpCode(r)}else c&&(r+=" if (true) { ");return r}},"3ljw":function(e,t,n){"use strict";n.r(t);n("8+KV"),n("f3/d");var r=n("YEIV"),a=n.n(r),i=n("QbLZ"),o=n.n(i),s=n("jo6Y"),u=n.n(s),c=n("iCc5"),l=n.n(c),d=n("V7oC"),f=n.n(d),p=n("FYw3"),h=n.n(p),g=n("mRg0"),v=n.n(g),m=n("q1tI"),y=n("bac3"),b={primaryColor:"#333",secondaryColor:"#E6E6E6"},_=function(e){function t(){return l()(this,t),h()(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return v()(t,e),f()(t,[{key:"render",value:function(){var e,n=this.props,r=n.type,i=n.className,s=n.onClick,c=n.style,l=n.primaryColor,d=n.secondaryColor,f=u()(n,["type","className","onClick","style","primaryColor","secondaryColor"]),p=void 0,h=b;if(l&&(h={primaryColor:l,secondaryColor:d||Object(y.c)(l)}),Object(y.d)(r))p=r;else if("string"==typeof r&&!(p=t.get(r,h)))return null;return p?(p&&"function"==typeof p.icon&&(p=o()({},p,{icon:p.icon(h.primaryColor,h.secondaryColor)})),Object(y.b)(p.icon,"svg-"+p.name,o()((e={className:i,onClick:s,style:c},a()(e,"data-icon",p.name),a()(e,"width","1em"),a()(e,"height","1em"),a()(e,"fill","currentColor"),a()(e,"aria-hidden","true"),a()(e,"focusable","false"),e),f))):(Object(y.e)("type should be string or icon definiton, but got "+r),null)}}],[{key:"add",value:function(){for(var e=this,t=arguments.length,n=Array(t),r=0;r1&&void 0!==arguments[1]?arguments[1]:b;if(e){var n=this.definitions.get(e);return n&&"function"==typeof n.icon&&(n=o()({},n,{icon:n.icon(t.primaryColor,t.secondaryColor)})),n}}},{key:"setTwoToneColors",value:function(e){var t=e.primaryColor,n=e.secondaryColor;b.primaryColor=t,b.secondaryColor=n||Object(y.c)(t)}},{key:"getTwoToneColors",value:function(){return o()({},b)}}]),t}(m.Component);_.displayName="IconReact",_.definitions=new y.a;var x=_;n.d(t,"default",(function(){return x}))},"3qD5":function(e,t,n){"use strict";function r(e){if(0===e.length)throw new Error("max requires at least one data point");for(var t=e[0],n=1;nt&&(t=e[n]);return t}function a(e){if(0===e.length)throw new Error("min requires at least one data point");for(var t=e[0],n=1;n=Math.abs(e[a])?r+=n-t+e[a]:r+=e[a]-t+n,n=t;return n+r}function o(e){if(0===e.length)throw new Error("mean requires at least one data point");return i(e)/e.length}Object.defineProperty(t,"__esModule",{value:!0}),t.sum=i,t.max=r,t.min=a,t.mean=o,t.statMap=void 0;var s={min:a,max:r,mean:o,sum:i};t.statMap=s},"3tmb":function(e,t,n){"use strict";n("8+KV"),n("HAE/"),Object.defineProperty(t,"__esModule",{value:!0});var r={transitionstart:{transition:"transitionstart",WebkitTransition:"webkitTransitionStart",MozTransition:"mozTransitionStart",OTransition:"oTransitionStart",msTransition:"MSTransitionStart"},animationstart:{animation:"animationstart",WebkitAnimation:"webkitAnimationStart",MozAnimation:"mozAnimationStart",OAnimation:"oAnimationStart",msAnimation:"MSAnimationStart"}},a={transitionend:{transition:"transitionend",WebkitTransition:"webkitTransitionEnd",MozTransition:"mozTransitionEnd",OTransition:"oTransitionEnd",msTransition:"MSTransitionEnd"},animationend:{animation:"animationend",WebkitAnimation:"webkitAnimationEnd",MozAnimation:"mozAnimationEnd",OAnimation:"oAnimationEnd",msAnimation:"MSAnimationEnd"}},i=[],o=[];function s(e,t,n){e.addEventListener(t,n,!1)}function u(e,t,n){e.removeEventListener(t,n,!1)}"undefined"!=typeof window&&"undefined"!=typeof document&&function(){var e=document.createElement("div").style;function t(t,n){for(var r in t)if(t.hasOwnProperty(r)){var a=t[r];for(var i in a)if(i in e){n.push(a[i]);break}}}"AnimationEvent"in window||(delete r.animationstart.animation,delete a.animationend.animation),"TransitionEvent"in window||(delete r.transitionstart.transition,delete a.transitionend.transition),t(r,i),t(a,o)}();var c={startEvents:i,addStartEventListener:function(e,t){0!==i.length?i.forEach((function(n){s(e,n,t)})):window.setTimeout(t,0)},removeStartEventListener:function(e,t){0!==i.length&&i.forEach((function(n){u(e,n,t)}))},endEvents:o,addEndEventListener:function(e,t){0!==o.length?o.forEach((function(n){s(e,n,t)})):window.setTimeout(t,0)},removeEndEventListener:function(e,t){0!==o.length&&o.forEach((function(n){u(e,n,t)}))}};t.default=c,e.exports=t.default},"3uiJ":function(e,t,n){"use strict";n("rGqo");var r=n("pVnL"),a=n("W8MJ");Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.DEFAULT_RADIUS=t.DEFAULT_CUTOFF=t.DEFAULT_BUFFER=t.DEFAULT_FONT_SIZE=t.DEFAULT_FONT_WEIGHT=t.DEFAULT_FONT_FAMILY=t.DEFAULT_CHAR_SET=void 0;var i,o,s=n("DLW2"),u=(i=n("rxlC"))&&i.__esModule?i:{default:i},c=n("4cb6"),l=n("J8dN");var d=function(){for(var e=[],t=32;t<128;t++)e.push(String.fromCharCode(t));return e}();t.DEFAULT_CHAR_SET=d;t.DEFAULT_FONT_FAMILY="sans-serif";t.DEFAULT_FONT_WEIGHT="normal";t.DEFAULT_FONT_SIZE=24;t.DEFAULT_BUFFER=3;t.DEFAULT_CUTOFF=.25;t.DEFAULT_RADIUS=8;var f=3;function p(e,t,n,r){e.font=r+" "+n+"px "+t,e.fillStyle="black",e.textBaseline="middle"}function h(e,t){for(var n=0;n=A.length)break;C=A[P++]}else{if((P=A.next()).done)break;C=P.value}var O=C;h(E.draw(O),S),m.putImageData(S,b[O].x,b[O].y)}}else{var M=t,k=Array.isArray(M),D=0;for(M=k?M:M[Symbol.iterator]();;){var I;if(k){if(D>=M.length)break;I=M[D++]}else{if((D=M.next()).done)break;I=D.value}var L=I;m.fillText(L,b[L].x,b[L].y+1*s)}}return{xOffset:x,yOffset:R,mapping:b,data:v,width:v.width,height:v.height}},t.getKey=function(){var e=this.fontOptions,t=e.fontFamily,n=e.fontWeight,r=e.fontSize,a=e.buffer,i=e.sdf,o=e.radius,s=e.cutoff;return i?t+" "+n+" "+r+" "+a+" "+o+" "+s:t+" "+n+" "+r+" "+a},t.getNewChars=function(e,t){var n=this.cache.get(e);if(!n)return t;var r=[],a=n.mapping,i=new Set(Object.keys(a));return new Set(t).forEach((function(e){i.has(e)||r.push(e)})),r},a(e,[{key:"scale",get:function(){return 1}},{key:"canvas",get:function(){var e=this.cache.get(this.key);return e&&e.data}},{key:"mapping",get:function(){var e=this.cache.get(this.key);return e&&e.mapping}}]),e}())||o;t.default=g},"406g":function(e,t,n){"use strict";n("HAE/"),Object.defineProperty(t,"__esModule",{value:!0});var r=n("z4Hk"),a=function(){function e(e){this._binding=e}return e.prototype.onActivation=function(e){return this._binding.onActivation=e,new r.BindingWhenSyntax(this._binding)},e}();t.BindingOnSyntax=a},"40oj":function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function a(e,t){"function"==typeof e?e(t):"object"===r(e)&&e&&"current"in e&&(e.current=t)}n("8+KV"),n("rE2o"),n("ioFf"),n("HAE/"),Object.defineProperty(t,"__esModule",{value:!0}),t.fillRef=a,t.composeRef=function(){for(var e=arguments.length,t=new Array(e),n=0;n=r.F1&&t<=r.F12)return!1;switch(t){case r.ALT:case r.CAPS_LOCK:case r.CONTEXT_MENU:case r.CTRL:case r.DOWN:case r.END:case r.ESC:case r.HOME:case r.INSERT:case r.LEFT:case r.MAC_FF_META:case r.META:case r.NUMLOCK:case r.NUM_CENTER:case r.PAGE_DOWN:case r.PAGE_UP:case r.PAUSE:case r.PRINT_SCREEN:case r.RIGHT:case r.SHIFT:case r.UP:case r.WIN_KEY:case r.WIN_KEY_RIGHT:return!1;default:return!0}},isCharacterKey:function(e){if(e>=r.ZERO&&e<=r.NINE)return!0;if(e>=r.NUM_ZERO&&e<=r.NUM_MULTIPLY)return!0;if(e>=r.A&&e<=r.Z)return!0;if(-1!==window.navigation.userAgent.indexOf("WebKit")&&0===e)return!0;switch(e){case r.SPACE:case r.QUESTION_MARK:case r.NUM_PLUS:case r.NUM_MINUS:case r.NUM_PERIOD:case r.NUM_DIVISION:case r.SEMICOLON:case r.DASH:case r.EQUALS:case r.COMMA:case r.PERIOD:case r.SLASH:case r.APOSTROPHE:case r.SINGLE_QUOTE:case r.OPEN_SQUARE_BRACKET:case r.BACKSLASH:case r.CLOSE_SQUARE_BRACKET:return!0;default:return!1}}};t.a=r},"4LiD":function(e,t,n){"use strict";var r=n("dyZX"),a=n("XKFU"),i=n("KroJ"),o=n("3Lyj"),s=n("Z6vF"),u=n("SlkY"),c=n("9gX7"),l=n("0/R4"),d=n("eeVq"),f=n("XMVh"),p=n("fyDq"),h=n("Xbzi");e.exports=function(e,t,n,g,v,m){var y=r[e],b=y,_=v?"set":"add",x=b&&b.prototype,R={},w=function(e){var t=x[e];i(x,e,"delete"==e?function(e){return!(m&&!l(e))&&t.call(this,0===e?0:e)}:"has"==e?function(e){return!(m&&!l(e))&&t.call(this,0===e?0:e)}:"get"==e?function(e){return m&&!l(e)?void 0:t.call(this,0===e?0:e)}:"add"==e?function(e){return t.call(this,0===e?0:e),this}:function(e,n){return t.call(this,0===e?0:e,n),this})};if("function"==typeof b&&(m||x.forEach&&!d((function(){(new b).entries().next()})))){var E=new b,S=E[_](m?{}:-0,1)!=E,A=d((function(){E.has(1)})),T=f((function(e){new b(e)})),P=!m&&d((function(){for(var e=new b,t=5;t--;)e[_](t,t);return!e.has(-0)}));T||((b=t((function(t,n){c(t,b,e);var r=h(new y,t,b);return null!=n&&u(n,v,r[_],r),r}))).prototype=x,x.constructor=b),(A||P)&&(w("delete"),w("has"),v&&w("get")),(P||S)&&w(_),m&&x.clear&&delete x.clear}else b=g.getConstructor(t,e,v,_),o(b.prototype,n),s.NEED=!0;return p(b,e),R[e]=b,a(a.G+a.W+a.F*(b!=y),R),m||g.setStrong(b,e,v),b}},"4Q1U":function(e,t,n){var r=n("cOqj");e.exports=r((function(e){return null==e}))},"4R4u":function(e,t){e.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},"4U9+":function(e,t,n){"use strict";n("XfO3"),n("HEwt"),n("LK8F"),n("HAE/"),Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,r.default)((0,o.default)(e)&&e.length>=1,"Must merge at least 1 JSON schema."),a.default.apply(void 0,[{}].concat(function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t(r=1))return r;for(;ni?n=a:r=a,a=.5*(r-n)+n}return a},r.prototype.solve=function(e,t){return this.sampleCurveY(this.solveCurveX(e,t))};var a=i;function i(e,t){this.x=e,this.y=t}function o(e,t){if(Array.isArray(e)){if(!Array.isArray(t)||e.length!==t.length)return!1;for(var n=0;n0;)t[n]=arguments[n+1];for(var r=0,a=t;r>t/4).toString(16):([1e7]+-[1e3]+-4e3+-8e3+-1e11).replace(/[018]/g,e)}()}function g(e){return!!e&&/^[0-9a-f]{8}-[0-9a-f]{4}-[4][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(e)}function v(e,t){e.forEach((function(e){t[e]&&(t[e]=t[e].bind(t))}))}function m(e,t){return-1!==e.indexOf(t,e.length-t.length)}function y(e,t,n){var r={};for(var a in e)r[a]=t.call(n||this,e[a],a,e);return r}function b(e,t,n){var r={};for(var a in e)t.call(n||this,e[a],a,e)&&(r[a]=e[a]);return r}function _(e){return Array.isArray(e)?e.map(_):"object"==typeof e&&e?y(e,_):e}var x={};function R(e){x[e]||("undefined"!=typeof console&&console.warn(e),x[e]=!0)}function w(e,t,n){return(n.y-e.y)*(t.x-e.x)>(t.y-e.y)*(n.x-e.x)}function E(e){for(var t=0,n=0,r=e.length,a=r-1,i=void 0,o=void 0;n@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,(function(e,n,r,a){var i=r||a;return t[n]=!i||i.toLowerCase(),""})),t["max-age"]){var n=parseInt(t["max-age"],10);isNaN(n)?delete t["max-age"]:t["max-age"]=n}return t}function A(e){try{var t=self[e];return t.setItem("_mapbox_test_",1),t.removeItem("_mapbox_test_"),!0}catch(e){return!1}}var T,P,C,O,M=self.performance&&self.performance.now?self.performance.now.bind(self.performance):Date.now.bind(Date),k=self.requestAnimationFrame||self.mozRequestAnimationFrame||self.webkitRequestAnimationFrame||self.msRequestAnimationFrame,D=self.cancelAnimationFrame||self.mozCancelAnimationFrame||self.webkitCancelAnimationFrame||self.msCancelAnimationFrame,I={now:M,frame:function(e){var t=k(e);return{cancel:function(){return D(t)}}},getImageData:function(e,t){void 0===t&&(t=0);var n=self.document.createElement("canvas"),r=n.getContext("2d");if(!r)throw new Error("failed to create canvas 2d context");return n.width=e.width,n.height=e.height,r.drawImage(e,0,0,e.width,e.height),r.getImageData(-t,-t,e.width+2*t,e.height+2*t)},resolveURL:function(e){return T||(T=self.document.createElement("a")),T.href=e,T.href},hardwareConcurrency:self.navigator.hardwareConcurrency||4,get devicePixelRatio(){return self.devicePixelRatio},get prefersReducedMotion(){return!!self.matchMedia&&(null==P&&(P=self.matchMedia("(prefers-reduced-motion: reduce)")),P.matches)}},L={API_URL:"https://api.mapbox.com",get EVENTS_URL(){return this.API_URL?0===this.API_URL.indexOf("https://api.mapbox.cn")?"https://events.mapbox.cn/events/v2":0===this.API_URL.indexOf("https://api.mapbox.com")?"https://events.mapbox.com/events/v2":null:null},FEEDBACK_URL:"https://apps.mapbox.com/feedback",REQUIRE_ACCESS_TOKEN:!0,ACCESS_TOKEN:null,MAX_PARALLEL_IMAGE_REQUESTS:16},j={supported:!1,testSupport:function(e){!F&&O&&(z?N(e):C=e)}},F=!1,z=!1;function N(e){var t=e.createTexture();e.bindTexture(e.TEXTURE_2D,t);try{if(e.texImage2D(e.TEXTURE_2D,0,e.RGBA,e.RGBA,e.UNSIGNED_BYTE,O),e.isContextLost())return;j.supported=!0}catch(e){}e.deleteTexture(t),F=!0}self.document&&((O=self.document.createElement("img")).onload=function(){C&&N(C),C=null,z=!0},O.onerror=function(){F=!0,C=null},O.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA=");var B="01",V=function(e,t){this._transformRequestFn=e,this._customAccessToken=t,this._createSkuToken()};function H(e){return 0===e.indexOf("mapbox:")}V.prototype._createSkuToken=function(){var e=function(){for(var e="",t=0;t<10;t++)e+="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"[Math.floor(62*Math.random())];return{token:["1",B,e].join(""),tokenExpiresAt:Date.now()+432e5}}();this._skuToken=e.token,this._skuTokenExpiresAt=e.tokenExpiresAt},V.prototype._isSkuTokenExpired=function(){return Date.now()>this._skuTokenExpiresAt},V.prototype.transformRequest=function(e,t){return this._transformRequestFn&&this._transformRequestFn(e,t)||{url:e}},V.prototype.normalizeStyleURL=function(e,t){if(!H(e))return e;var n=G(e);return n.path="/styles/v1"+n.path,this._makeAPIURL(n,this._customAccessToken||t)},V.prototype.normalizeGlyphsURL=function(e,t){if(!H(e))return e;var n=G(e);return n.path="/fonts/v1"+n.path,this._makeAPIURL(n,this._customAccessToken||t)},V.prototype.normalizeSourceURL=function(e,t){if(!H(e))return e;var n=G(e);return n.path="/v4/"+n.authority+".json",n.params.push("secure"),this._makeAPIURL(n,this._customAccessToken||t)},V.prototype.normalizeSpriteURL=function(e,t,n,r){var a=G(e);return H(e)?(a.path="/styles/v1"+a.path+"/sprite"+t+n,this._makeAPIURL(a,this._customAccessToken||r)):(a.path+=""+t+n,K(a))},V.prototype.normalizeTileURL=function(e,t,n){if(this._isSkuTokenExpired()&&this._createSkuToken(),!t||!H(t))return e;var r=G(e),a=I.devicePixelRatio>=2||512===n?"@2x":"",i=j.supported?".webp":"$1";return r.path=r.path.replace(/(\.(png|jpg)\d*)(?=$)/,""+a+i),r.path=r.path.replace(/^.+\/v4\//,"/"),r.path="/v4"+r.path,L.REQUIRE_ACCESS_TOKEN&&(L.ACCESS_TOKEN||this._customAccessToken)&&this._skuToken&&r.params.push("sku="+this._skuToken),this._makeAPIURL(r,this._customAccessToken)},V.prototype.canonicalizeTileURL=function(e){var t=G(e);if(!t.path.match(/(^\/v4\/)/)||!t.path.match(/\.[\w]+$/))return e;var n="mapbox://tiles/";n+=t.path.replace("/v4/","");var r=t.params.filter((function(e){return!e.match(/^access_token=/)}));return r.length&&(n+="?"+r.join("&")),n},V.prototype.canonicalizeTileset=function(e,t){if(!H(t))return e.tiles||[];for(var n=[],r=0,a=e.tiles;r=1&&self.localStorage.setItem(t,JSON.stringify(this.eventData))}catch(e){R("Unable to write to LocalStorage")}},X.prototype.processRequests=function(e){},X.prototype.postEvent=function(e,t,n,r){var a=this;if(L.EVENTS_URL){var i=G(L.EVENTS_URL);i.params.push("access_token="+(r||L.ACCESS_TOKEN||""));var o={event:this.type,created:new Date(e).toISOString(),sdkIdentifier:"mapbox-gl-js",sdkVersion:"1.5.0",skuId:B,userId:this.anonId},s=t?d(o,t):o,u={url:K(i),headers:{"Content-Type":"text/plain"},body:JSON.stringify([s])};this.pendingRequest=me(u,(function(e){a.pendingRequest=null,n(e),a.saveEventData(),a.processRequests(r)}))}},X.prototype.queueRequest=function(e,t){this.queue.push(e),this.processRequests(t)};var J,Z=function(e){function t(){e.call(this,"map.load"),this.success={},this.skuToken=""}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.postMapLoadEvent=function(e,t,n,r){this.skuToken=n,(L.EVENTS_URL&&r||L.ACCESS_TOKEN&&Array.isArray(e)&&e.some((function(e){return H(e)||W(e)})))&&this.queueRequest({id:t,timestamp:Date.now()},r)},t.prototype.processRequests=function(e){var t=this;if(!this.pendingRequest&&0!==this.queue.length){var n=this.queue.shift(),r=n.id,a=n.timestamp;r&&this.success[r]||(this.anonId||this.fetchEventData(),g(this.anonId)||(this.anonId=h()),this.postEvent(a,{skuToken:this.skuToken},(function(e){e||r&&(t.success[r]=!0)}),e))}},t}(X),$=new(function(e){function t(t){e.call(this,"appUserTurnstile"),this._customAccessToken=t}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.postTurnstileEvent=function(e,t){L.EVENTS_URL&&L.ACCESS_TOKEN&&Array.isArray(e)&&e.some((function(e){return H(e)||W(e)}))&&this.queueRequest(Date.now(),t)},t.prototype.processRequests=function(e){var t=this;if(!this.pendingRequest&&0!==this.queue.length){this.anonId&&this.eventData.lastSuccess&&this.eventData.tokenU||this.fetchEventData();var n=Y(L.ACCESS_TOKEN),r=n?n.u:L.ACCESS_TOKEN,a=r!==this.eventData.tokenU;g(this.anonId)||(this.anonId=h(),a=!0);var i=this.queue.shift();if(this.eventData.lastSuccess){var o=new Date(this.eventData.lastSuccess),s=new Date(i),u=(i-this.eventData.lastSuccess)/864e5;a=a||u>=1||u<-1||o.getDate()!==s.getDate()}else a=!0;if(!a)return this.processRequests();this.postEvent(i,{"enabled.telemetry":!1},(function(e){e||(t.eventData.lastSuccess=i,t.eventData.tokenU=r)}),e)}},t}(X)),Q=$.postTurnstileEvent.bind($),ee=new Z,te=ee.postMapLoadEvent.bind(ee),ne="mapbox-tiles",re=500,ae=50,ie=42e4;function oe(e){var t=e.indexOf("?");return t<0?e:e.slice(0,t)}var se=1/0,ue={Unknown:"Unknown",Style:"Style",Source:"Source",Tile:"Tile",Glyphs:"Glyphs",SpriteImage:"SpriteImage",SpriteJSON:"SpriteJSON",Image:"Image"};"function"==typeof Object.freeze&&Object.freeze(ue);var ce=function(e){function t(t,n,r){401===n&&W(r)&&(t+=": you may have provided an invalid Mapbox access token. See https://www.mapbox.com/api-documentation/#access-tokens-and-token-scopes"),e.call(this,t),this.status=n,this.url=r,this.name=this.constructor.name,this.message=t}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.toString=function(){return this.name+": "+this.message+" ("+this.status+"): "+this.url},t}(Error);function le(){return"undefined"!=typeof WorkerGlobalScope&&"undefined"!=typeof self&&self instanceof WorkerGlobalScope}var de=le()?function(){return self.worker&&self.worker.referrer}:function(){return("blob:"===self.location.protocol?self.parent:self).location.href};function fe(e,t){var n,r=new self.AbortController,a=new self.Request(e.url,{method:e.method||"GET",body:e.body,credentials:e.credentials,headers:e.headers,referrer:de(),signal:r.signal}),i=!1,o=!1,s=(n=a.url).indexOf("sku=")>0&&W(n);"json"===e.type&&a.headers.set("Accept","application/json");var u=function(n,r,i){if(!o){if(n&&"SecurityError"!==n.message&&R(n),r&&i)return c(r);var u=Date.now();self.fetch(a).then((function(n){if(n.ok){var r=s?n.clone():null;return c(n,r,u)}return t(new ce(n.statusText,n.status,e.url))})).catch((function(e){20!==e.code&&t(new Error(e.message))}))}},c=function(n,r,s){("arrayBuffer"===e.type?n.arrayBuffer():"json"===e.type?n.json():n.text()).then((function(e){o||(r&&s&&function(e,t,n){if(self.caches){var r={status:t.status,statusText:t.statusText,headers:new self.Headers};t.headers.forEach((function(e,t){return r.headers.set(t,e)}));var a=S(t.headers.get("Cache-Control")||"");a["no-store"]||(a["max-age"]&&r.headers.set("Expires",new Date(n+1e3*a["max-age"]).toUTCString()),new Date(r.headers.get("Expires")).getTime()-nDate.now()&&!n["no-cache"]}(r);e.delete(n),a&&e.put(n,r.clone()),t(null,r,a)})).catch(t)})).catch(t)}(a,u):u(null,null),{cancel:function(){o=!0,i||r.abort()}}}var pe,he,ge=function(e,t){if(n=e.url,!(/^file:/.test(n)||/^file:/.test(de())&&!/^\w+:/.test(n))){if(self.fetch&&self.Request&&self.AbortController&&self.Request.prototype.hasOwnProperty("signal"))return fe(e,t);if(le()&&self.worker&&self.worker.actor)return self.worker.actor.send("getResource",e,t)}var n;return function(e,t){var n=new self.XMLHttpRequest;for(var r in n.open(e.method||"GET",e.url,!0),"arrayBuffer"===e.type&&(n.responseType="arraybuffer"),e.headers)n.setRequestHeader(r,e.headers[r]);return"json"===e.type&&(n.responseType="text",n.setRequestHeader("Accept","application/json")),n.withCredentials="include"===e.credentials,n.onerror=function(){t(new Error(n.statusText))},n.onload=function(){if((n.status>=200&&n.status<300||0===n.status)&&null!==n.response){var r=n.response;if("json"===e.type)try{r=JSON.parse(n.response)}catch(e){return t(e)}t(null,r,n.getResponseHeader("Cache-Control"),n.getResponseHeader("Expires"))}else t(new ce(n.statusText,n.status,e.url))},n.send(e.body),{cancel:function(){return n.abort()}}}(e,t)},ve=function(e,t){return ge(d(e,{type:"arrayBuffer"}),t)},me=function(e,t){return ge(d(e,{method:"POST"}),t)};function ye(e,t,n){n[e]&&-1!==n[e].indexOf(t)||(n[e]=n[e]||[],n[e].push(t))}function be(e,t,n){if(n&&n[e]){var r=n[e].indexOf(t);-1!==r&&n[e].splice(r,1)}}pe=[],he=0;var _e=function(e,t){void 0===t&&(t={}),d(this,t),this.type=e},xe=function(e){function t(t,n){void 0===n&&(n={}),e.call(this,"error",d({error:t},n))}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t}(_e),Re=function(){};Re.prototype.on=function(e,t){return this._listeners=this._listeners||{},ye(e,t,this._listeners),this},Re.prototype.off=function(e,t){return be(e,t,this._listeners),be(e,t,this._oneTimeListeners),this},Re.prototype.once=function(e,t){return this._oneTimeListeners=this._oneTimeListeners||{},ye(e,t,this._oneTimeListeners),this},Re.prototype.fire=function(e,t){"string"==typeof e&&(e=new _e(e,t||{}));var n=e.type;if(this.listens(n)){e.target=this;for(var r=0,a=this._listeners&&this._listeners[n]?this._listeners[n].slice():[];r0||this._oneTimeListeners&&this._oneTimeListeners[e]&&this._oneTimeListeners[e].length>0||this._eventedParent&&this._eventedParent.listens(e)},Re.prototype.setEventedParent=function(e,t){return this._eventedParent=e,this._eventedParentData=t,this};var we={$version:8,$root:{version:{required:!0,type:"enum",values:[8]},name:{type:"string"},metadata:{type:"*"},center:{type:"array",value:"number"},zoom:{type:"number"},bearing:{type:"number",default:0,period:360,units:"degrees"},pitch:{type:"number",default:0,units:"degrees"},light:{type:"light"},sources:{required:!0,type:"sources"},sprite:{type:"string"},glyphs:{type:"string"},transition:{type:"transition"},layers:{required:!0,type:"array",value:"layer"}},sources:{"*":{type:"source"}},source:["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],source_vector:{type:{required:!0,type:"enum",values:{vector:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},attribution:{type:"string"},"*":{type:"*"}},source_raster:{type:{required:!0,type:"enum",values:{raster:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},attribution:{type:"string"},"*":{type:"*"}},source_raster_dem:{type:{required:!0,type:"enum",values:{"raster-dem":{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},attribution:{type:"string"},encoding:{type:"enum",values:{terrarium:{},mapbox:{}},default:"mapbox"},"*":{type:"*"}},source_geojson:{type:{required:!0,type:"enum",values:{geojson:{}}},data:{type:"*"},maxzoom:{type:"number",default:18},attribution:{type:"string"},buffer:{type:"number",default:128,maximum:512,minimum:0},tolerance:{type:"number",default:.375},cluster:{type:"boolean",default:!1},clusterRadius:{type:"number",default:50,minimum:0},clusterMaxZoom:{type:"number"},clusterProperties:{type:"*"},lineMetrics:{type:"boolean",default:!1},generateId:{type:"boolean",default:!1}},source_video:{type:{required:!0,type:"enum",values:{video:{}}},urls:{required:!0,type:"array",value:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},source_image:{type:{required:!0,type:"enum",values:{image:{}}},url:{required:!0,type:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},layer:{id:{type:"string",required:!0},type:{type:"enum",values:{fill:{},line:{},symbol:{},circle:{},heatmap:{},"fill-extrusion":{},raster:{},hillshade:{},background:{}},required:!0},metadata:{type:"*"},source:{type:"string"},"source-layer":{type:"string"},minzoom:{type:"number",minimum:0,maximum:24},maxzoom:{type:"number",minimum:0,maximum:24},filter:{type:"filter"},layout:{type:"layout"},paint:{type:"paint"}},layout:["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_background"],layout_background:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_fill:{"fill-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_circle:{"circle-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_heatmap:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_line:{"line-cap":{type:"enum",values:{butt:{},round:{},square:{}},default:"butt",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-join":{type:"enum",values:{bevel:{},round:{},miter:{}},default:"miter",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-miter-limit":{type:"number",default:2,requires:[{"line-join":"miter"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-round-limit":{type:"number",default:1.05,requires:[{"line-join":"round"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_symbol:{"symbol-placement":{type:"enum",values:{point:{},line:{},"line-center":{}},default:"point",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-spacing":{type:"number",default:250,minimum:1,units:"pixels",requires:[{"symbol-placement":"line"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"symbol-avoid-edges":{type:"boolean",default:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"symbol-z-order":{type:"enum",values:{auto:{},"viewport-y":{},source:{}},default:"auto",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-allow-overlap":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-ignore-placement":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-optional":{type:"boolean",default:!1,requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-size":{type:"number",default:1,minimum:0,units:"factor of the original icon size",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-text-fit":{type:"enum",values:{none:{},width:{},height:{},both:{}},default:"none",requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-text-fit-padding":{type:"array",value:"number",length:4,default:[0,0,0,0],units:"pixels",requires:["icon-image","text-field",{"icon-text-fit":["both","width","height"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-image":{type:"resolvedImage",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-keep-upright":{type:"boolean",default:!1,requires:["icon-image",{"icon-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-offset":{type:"array",value:"number",length:2,default:[0,0],requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-field":{type:"formatted",default:"",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-font":{type:"array",value:"string",default:["Open Sans Regular","Arial Unicode MS Regular"],requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-size":{type:"number",default:16,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-width":{type:"number",default:10,minimum:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-line-height":{type:"number",default:1.2,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-letter-spacing":{type:"number",default:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-justify":{type:"enum",values:{auto:{},left:{},center:{},right:{}},default:"center",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-radial-offset":{type:"number",units:"ems",default:0,requires:["text-field"],"property-type":"data-driven",expression:{interpolated:!0,parameters:["zoom","feature"]}},"text-variable-anchor":{type:"array",value:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["text-field",{"!":"text-variable-anchor"}],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-angle":{type:"number",default:45,units:"degrees",requires:["text-field",{"symbol-placement":["line","line-center"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-writing-mode":{type:"array",value:"enum",values:{horizontal:{},vertical:{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-keep-upright":{type:"boolean",default:!0,requires:["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-transform":{type:"enum",values:{none:{},uppercase:{},lowercase:{}},default:"none",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-offset":{type:"array",value:"number",units:"ems",length:2,default:[0,0],requires:["text-field",{"!":"text-radial-offset"}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-allow-overlap":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-ignore-placement":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-optional":{type:"boolean",default:!1,requires:["text-field","icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_raster:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_hillshade:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},filter:{type:"array",value:"*"},filter_operator:{type:"enum",values:{"==":{},"!=":{},">":{},">=":{},"<":{},"<=":{},in:{},"!in":{},all:{},any:{},none:{},has:{},"!has":{}}},geometry_type:{type:"enum",values:{Point:{},LineString:{},Polygon:{}}},function:{expression:{type:"expression"},stops:{type:"array",value:"function_stop"},base:{type:"number",default:1,minimum:0},property:{type:"string",default:"$zoom"},type:{type:"enum",values:{identity:{},exponential:{},interval:{},categorical:{}},default:"exponential"},colorSpace:{type:"enum",values:{rgb:{},lab:{},hcl:{}},default:"rgb"},default:{type:"*",required:!1}},function_stop:{type:"array",minimum:0,maximum:22,value:["number","color"],length:2},expression:{type:"array",value:"*",minimum:1},expression_name:{type:"enum",values:{let:{group:"Variable binding"},var:{group:"Variable binding"},literal:{group:"Types"},array:{group:"Types"},at:{group:"Lookup"},case:{group:"Decision"},match:{group:"Decision"},coalesce:{group:"Decision"},step:{group:"Ramps, scales, curves"},interpolate:{group:"Ramps, scales, curves"},"interpolate-hcl":{group:"Ramps, scales, curves"},"interpolate-lab":{group:"Ramps, scales, curves"},ln2:{group:"Math"},pi:{group:"Math"},e:{group:"Math"},typeof:{group:"Types"},string:{group:"Types"},number:{group:"Types"},boolean:{group:"Types"},object:{group:"Types"},collator:{group:"Types"},format:{group:"Types"},image:{group:"Types"},"number-format":{group:"Types"},"to-string":{group:"Types"},"to-number":{group:"Types"},"to-boolean":{group:"Types"},"to-rgba":{group:"Color"},"to-color":{group:"Types"},rgb:{group:"Color"},rgba:{group:"Color"},get:{group:"Lookup"},has:{group:"Lookup"},length:{group:"Lookup"},properties:{group:"Feature data"},"feature-state":{group:"Feature data"},"geometry-type":{group:"Feature data"},id:{group:"Feature data"},zoom:{group:"Zoom"},"heatmap-density":{group:"Heatmap"},"line-progress":{group:"Feature data"},accumulated:{group:"Feature data"},"+":{group:"Math"},"*":{group:"Math"},"-":{group:"Math"},"/":{group:"Math"},"%":{group:"Math"},"^":{group:"Math"},sqrt:{group:"Math"},log10:{group:"Math"},ln:{group:"Math"},log2:{group:"Math"},sin:{group:"Math"},cos:{group:"Math"},tan:{group:"Math"},asin:{group:"Math"},acos:{group:"Math"},atan:{group:"Math"},min:{group:"Math"},max:{group:"Math"},round:{group:"Math"},abs:{group:"Math"},ceil:{group:"Math"},floor:{group:"Math"},"==":{group:"Decision"},"!=":{group:"Decision"},">":{group:"Decision"},"<":{group:"Decision"},">=":{group:"Decision"},"<=":{group:"Decision"},all:{group:"Decision"},any:{group:"Decision"},"!":{group:"Decision"},"is-supported-script":{group:"String"},upcase:{group:"String"},downcase:{group:"String"},concat:{group:"String"},"resolved-locale":{group:"String"}}},light:{anchor:{type:"enum",default:"viewport",values:{map:{},viewport:{}},"property-type":"data-constant",transition:!1,expression:{interpolated:!1,parameters:["zoom"]}},position:{type:"array",default:[1.15,210,30],length:3,value:"number","property-type":"data-constant",transition:!0,expression:{interpolated:!0,parameters:["zoom"]}},color:{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},intensity:{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},paint:["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_background"],paint_fill:{"fill-antialias":{type:"boolean",default:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-outline-color":{type:"color",transition:!0,requires:[{"!":"fill-pattern"},{"fill-antialias":!0}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"}},"paint_fill-extrusion":{"fill-extrusion-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-extrusion-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-extrusion-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"fill-extrusion-height":{type:"number",default:0,minimum:0,units:"meters",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{type:"number",default:0,minimum:0,units:"meters",transition:!0,requires:["fill-extrusion-height"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-vertical-gradient":{type:"boolean",default:!0,transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_line:{"line-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"line-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["line-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-width":{type:"number",default:1,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-gap-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-offset":{type:"number",default:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-dasharray":{type:"array",value:"number",minimum:0,transition:!0,units:"line widths",requires:[{"!":"line-pattern"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"line-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-gradient":{type:"color",transition:!1,requires:[{"!":"line-dasharray"},{"!":"line-pattern"},{source:"geojson",has:{lineMetrics:!0}}],expression:{interpolated:!0,parameters:["line-progress"]},"property-type":"color-ramp"}},paint_circle:{"circle-radius":{type:"number",default:5,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-blur":{type:"number",default:0,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"circle-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["circle-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-scale":{type:"enum",values:{map:{},viewport:{}},default:"map",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-alignment":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-stroke-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"}},paint_heatmap:{"heatmap-radius":{type:"number",default:30,minimum:1,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-weight":{type:"number",default:1,minimum:0,transition:!1,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-intensity":{type:"number",default:1,minimum:0,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"heatmap-color":{type:"color",default:["interpolate",["linear"],["heatmap-density"],0,"rgba(0, 0, 255, 0)",.1,"royalblue",.3,"cyan",.5,"lime",.7,"yellow",1,"red"],transition:!1,expression:{interpolated:!0,parameters:["heatmap-density"]},"property-type":"color-ramp"},"heatmap-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_symbol:{"icon-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-color":{type:"color",default:"#000000",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["icon-image","icon-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-color":{type:"color",default:"#000000",transition:!0,overridable:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["text-field","text-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_raster:{"raster-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-hue-rotate":{type:"number",default:0,period:360,transition:!0,units:"degrees",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-min":{type:"number",default:0,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-max":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-saturation":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-contrast":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-resampling":{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"raster-fade-duration":{type:"number",default:300,minimum:0,transition:!1,units:"milliseconds",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_hillshade:{"hillshade-illumination-direction":{type:"number",default:335,minimum:0,maximum:359,transition:!1,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-anchor":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-exaggeration":{type:"number",default:.5,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-shadow-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-highlight-color":{type:"color",default:"#FFFFFF",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-accent-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_background:{"background-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"background-pattern"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"background-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"background-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},transition:{duration:{type:"number",default:300,minimum:0,units:"milliseconds"},delay:{type:"number",default:0,minimum:0,units:"milliseconds"}},"property-type":{"data-driven":{type:"property-type"},"cross-faded":{type:"property-type"},"cross-faded-data-driven":{type:"property-type"},"color-ramp":{type:"property-type"},"data-constant":{type:"property-type"},constant:{type:"property-type"}}},Ee=function(e,t,n,r){this.message=(e?e+": ":"")+n,r&&(this.identifier=r),null!=t&&t.__line__&&(this.line=t.__line__)};function Se(e){var t=e.key,n=e.value;return n?[new Ee(t,n,"constants have been deprecated as of v8")]:[]}function Ae(e){for(var t=[],n=arguments.length-1;n-- >0;)t[n]=arguments[n+1];for(var r=0,a=t;r":"value"===e.itemType.kind?"array":"array<"+t+">"}return e.kind}var We=[ke,De,Ie,Le,je,Be,Fe,He(ze),Ve];function qe(e,t){if("error"===t.kind)return null;if("array"===e.kind){if("array"===t.kind&&(0===t.N&&"value"===t.itemType.kind||!qe(e.itemType,t.itemType))&&("number"!=typeof e.N||e.N===t.N))return null}else{if(e.kind===t.kind)return null;if("value"===e.kind)for(var n=0,r=We;n255?255:e}function a(e){return e<0?0:e>1?1:e}function i(e){return"%"===e[e.length-1]?r(parseFloat(e)/100*255):r(parseInt(e))}function o(e){return"%"===e[e.length-1]?a(parseFloat(e)/100):a(parseFloat(e))}function s(e,t,n){return n<0?n+=1:n>1&&(n-=1),6*n<1?e+(t-e)*n*6:2*n<1?t:3*n<2?e+(t-e)*(2/3-n)*6:e}try{t.parseCSSColor=function(e){var t,a=e.replace(/ /g,"").toLowerCase();if(a in n)return n[a].slice();if("#"===a[0])return 4===a.length?(t=parseInt(a.substr(1),16))>=0&&t<=4095?[(3840&t)>>4|(3840&t)>>8,240&t|(240&t)>>4,15&t|(15&t)<<4,1]:null:7===a.length&&(t=parseInt(a.substr(1),16))>=0&&t<=16777215?[(16711680&t)>>16,(65280&t)>>8,255&t,1]:null;var u=a.indexOf("("),c=a.indexOf(")");if(-1!==u&&c+1===a.length){var l=a.substr(0,u),d=a.substr(u+1,c-(u+1)).split(","),f=1;switch(l){case"rgba":if(4!==d.length)return null;f=o(d.pop());case"rgb":return 3!==d.length?null:[i(d[0]),i(d[1]),i(d[2]),f];case"hsla":if(4!==d.length)return null;f=o(d.pop());case"hsl":if(3!==d.length)return null;var p=(parseFloat(d[0])%360+360)%360/360,h=o(d[1]),g=o(d[2]),v=g<=.5?g*(h+1):g+h-g*h,m=2*g-v;return[r(255*s(m,v,p+1/3)),r(255*s(m,v,p)),r(255*s(m,v,p-1/3)),f];default:return null}}return null}}catch(e){}})).parseCSSColor,Ke=function(e,t,n,r){void 0===r&&(r=1),this.r=e,this.g=t,this.b=n,this.a=r};Ke.parse=function(e){if(e){if(e instanceof Ke)return e;if("string"==typeof e){var t=Ge(e);if(t)return new Ke(t[0]/255*t[3],t[1]/255*t[3],t[2]/255*t[3],t[3])}}},Ke.prototype.toString=function(){var e=this.toArray(),t=e[0],n=e[1],r=e[2],a=e[3];return"rgba("+Math.round(t)+","+Math.round(n)+","+Math.round(r)+","+a+")"},Ke.prototype.toArray=function(){var e=this.r,t=this.g,n=this.b,r=this.a;return 0===r?[0,0,0,0]:[255*e/r,255*t/r,255*n/r,r]},Ke.black=new Ke(0,0,0,1),Ke.white=new Ke(1,1,1,1),Ke.transparent=new Ke(0,0,0,0),Ke.red=new Ke(1,0,0,1);var Ye=function(e,t,n){this.sensitivity=e?t?"variant":"case":t?"accent":"base",this.locale=n,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})};Ye.prototype.compare=function(e,t){return this.collator.compare(e,t)},Ye.prototype.resolvedLocale=function(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale};var Xe=function(e,t,n,r){this.text=e,this.scale=t,this.fontStack=n,this.textColor=r},Je=function(e){this.sections=e};Je.fromString=function(e){return new Je([new Xe(e,null,null,null)])},Je.prototype.toString=function(){return this.sections.map((function(e){return e.text})).join("")},Je.prototype.serialize=function(){for(var e=["format"],t=0,n=this.sections;t=0&&e<=255&&"number"==typeof t&&t>=0&&t<=255&&"number"==typeof n&&n>=0&&n<=255?void 0===r||"number"==typeof r&&r>=0&&r<=1?null:"Invalid rgba value ["+[e,t,n,r].join(", ")+"]: 'a' must be between 0 and 1.":"Invalid rgba value ["+("number"==typeof r?[e,t,n,r]:[e,t,n]).join(", ")+"]: 'r', 'g', and 'b' must be between 0 and 255."}function Qe(e){if(null===e)return ke;if("string"==typeof e)return Ie;if("boolean"==typeof e)return Le;if("number"==typeof e)return De;if(e instanceof Ke)return je;if(e instanceof Ye)return Ne;if(e instanceof Je)return Be;if(e instanceof Ze)return Ve;if(Array.isArray(e)){for(var t,n=e.length,r=0,a=e;r2){var s=e[1];if("string"!=typeof s||!(s in rt)||"object"===s)return t.error('The item type argument of "array" must be one of string, number, boolean',1);i=rt[s],r++}else i=ze;if(e.length>3){if(null!==e[2]&&("number"!=typeof e[2]||e[2]<0||e[2]!==Math.floor(e[2])))return t.error('The length argument to "array" must be a positive integer literal',2);o=e[2],r++}n=He(i,o)}else n=rt[a];for(var u=[];r1)&&t.push(r)}}return t.concat(this.args.map((function(e){return e.serialize()})))};var it=function(e){this.type=Be,this.sections=e};it.parse=function(e,t){if(e.length<3)return t.error("Expected at least two arguments.");if((e.length-1)%2!=0)return t.error("Expected an even number of arguments.");for(var n=[],r=1;r-1&&(n=!0),new Ze({name:t,available:n})},ot.prototype.eachChild=function(e){e(this.input)},ot.prototype.possibleOutputs=function(){return[void 0]},ot.prototype.serialize=function(){return["image",this.input.serialize()]};var st={"to-boolean":Le,"to-color":je,"to-number":De,"to-string":Ie},ut=function(e,t){this.type=e,this.args=t};ut.parse=function(e,t){if(e.length<2)return t.error("Expected at least one argument.");var n=e[0];if(("to-boolean"===n||"to-string"===n)&&2!==e.length)return t.error("Expected one argument.");for(var r=st[n],a=[],i=1;i4?"Invalid rbga value "+JSON.stringify(t)+": expected an array containing either three or four numeric values.":$e(t[0],t[1],t[2],t[3])))return new Ke(t[0]/255,t[1]/255,t[2]/255,t[3])}throw new nt(n||"Could not parse color from value '"+("string"==typeof t?t:String(JSON.stringify(t)))+"'")}if("number"===this.type.kind){for(var o=null,s=0,u=this.args;s=0)return!1;var n=!0;return e.eachChild((function(e){n&&!gt(e,t)&&(n=!1)})),n}ft.parse=function(e,t){if(2!==e.length)return t.error("Expected one argument.");var n=e[1];if("object"!=typeof n||Array.isArray(n))return t.error("Collator options argument must be an object.");var r=t.parse(void 0!==n["case-sensitive"]&&n["case-sensitive"],1,Le);if(!r)return null;var a=t.parse(void 0!==n["diacritic-sensitive"]&&n["diacritic-sensitive"],1,Le);if(!a)return null;var i=null;return n.locale&&!(i=t.parse(n.locale,1,Ie))?null:new ft(r,a,i)},ft.prototype.evaluate=function(e){return new Ye(this.caseSensitive.evaluate(e),this.diacriticSensitive.evaluate(e),this.locale?this.locale.evaluate(e):null)},ft.prototype.eachChild=function(e){e(this.caseSensitive),e(this.diacriticSensitive),this.locale&&e(this.locale)},ft.prototype.possibleOutputs=function(){return[void 0]},ft.prototype.serialize=function(){var e={};return e["case-sensitive"]=this.caseSensitive.serialize(),e["diacritic-sensitive"]=this.diacriticSensitive.serialize(),this.locale&&(e.locale=this.locale.serialize()),["collator",e]};var vt=function(e,t){this.type=t.type,this.name=e,this.boundExpression=t};vt.parse=function(e,t){if(2!==e.length||"string"!=typeof e[1])return t.error("'var' expression requires exactly one string literal argument.");var n=e[1];return t.scope.has(n)?new vt(n,t.scope.get(n)):t.error('Unknown variable "'+n+'". Make sure "'+n+'" has been bound in an enclosing "let" expression before using it.',1)},vt.prototype.evaluate=function(e){return this.boundExpression.evaluate(e)},vt.prototype.eachChild=function(){},vt.prototype.possibleOutputs=function(){return[void 0]},vt.prototype.serialize=function(){return["var",this.name]};var mt=function(e,t,n,r,a){void 0===t&&(t=[]),void 0===r&&(r=new Me),void 0===a&&(a=[]),this.registry=e,this.path=t,this.key=t.map((function(e){return"["+e+"]"})).join(""),this.scope=r,this.errors=a,this.expectedType=n};function yt(e,t){for(var n,r,a=e.length-1,i=0,o=a,s=0;i<=o;)if(n=e[s=Math.floor((i+o)/2)],r=e[s+1],n<=t){if(s===a||tt))throw new nt("Input is not a number.");o=s-1}return 0}mt.prototype.parse=function(e,t,n,r,a){return void 0===a&&(a={}),t?this.concat(t,n,r)._parse(e,a):this._parse(e,a)},mt.prototype._parse=function(e,t){function n(e,t,n){return"assert"===n?new at(t,[e]):"coerce"===n?new ut(t,[e]):e}if(null!==e&&"string"!=typeof e&&"boolean"!=typeof e&&"number"!=typeof e||(e=["literal",e]),Array.isArray(e)){if(0===e.length)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');var r=e[0];if("string"!=typeof r)return this.error("Expression name must be a string, but found "+typeof r+' instead. If you wanted a literal array, use ["literal", [...]].',0),null;var a=this.registry[r];if(a){var i=a.parse(e,this);if(!i)return null;if(this.expectedType){var o=this.expectedType,s=i.type;if("string"!==o.kind&&"number"!==o.kind&&"boolean"!==o.kind&&"object"!==o.kind&&"array"!==o.kind||"value"!==s.kind)if("color"!==o.kind&&"formatted"!==o.kind&&"resolvedImage"!==o.kind||"value"!==s.kind&&"string"!==s.kind){if(this.checkSubtype(o,s))return null}else i=n(i,o,t.typeAnnotation||"coerce");else i=n(i,o,t.typeAnnotation||"assert")}if(!(i instanceof tt)&&"resolvedImage"!==i.type.kind&&function e(t){if(t instanceof vt)return e(t.boundExpression);if(t instanceof dt&&"error"===t.name)return!1;if(t instanceof ft)return!1;var n=t instanceof ut||t instanceof at,r=!0;return t.eachChild((function(t){r=n?r&&e(t):r&&t instanceof tt})),!!r&&pt(t)&>(t,["zoom","heatmap-density","line-progress","accumulated","is-supported-script"])}(i)){var u=new lt;try{i=new tt(i.type,i.evaluate(u))}catch(e){return this.error(e.message),null}}return i}return this.error('Unknown expression "'+r+'". If you wanted a literal array, use ["literal", [...]].',0)}return void 0===e?this.error("'undefined' value invalid. Use null instead."):"object"==typeof e?this.error('Bare objects invalid. Use ["literal", {...}] instead.'):this.error("Expected an array, but found "+typeof e+" instead.")},mt.prototype.concat=function(e,t,n){var r="number"==typeof e?this.path.concat(e):this.path,a=n?this.scope.concat(n):this.scope;return new mt(this.registry,r,t||null,a,this.errors)},mt.prototype.error=function(e){for(var t=[],n=arguments.length-1;n-- >0;)t[n]=arguments[n+1];var r=""+this.key+t.map((function(e){return"["+e+"]"})).join("");this.errors.push(new Oe(r,e))},mt.prototype.checkSubtype=function(e,t){var n=qe(e,t);return n&&this.error(n),n};var bt=function(e,t,n){this.type=e,this.input=t,this.labels=[],this.outputs=[];for(var r=0,a=n;r=o)return t.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',u);var l=t.parse(s,c,a);if(!l)return null;a=a||l.type,r.push([o,l])}return new bt(a,n,r)},bt.prototype.evaluate=function(e){var t=this.labels,n=this.outputs;if(1===t.length)return n[0].evaluate(e);var r=this.input.evaluate(e);if(r<=t[0])return n[0].evaluate(e);var a=t.length;return r>=t[a-1]?n[a-1].evaluate(e):n[yt(t,r)].evaluate(e)},bt.prototype.eachChild=function(e){e(this.input);for(var t=0,n=this.outputs;t0&&e.push(this.labels[t]),e.push(this.outputs[t].serialize());return e};var _t=xt;function xt(e,t,n,r){this.cx=3*e,this.bx=3*(n-e)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*t,this.by=3*(r-t)-this.cy,this.ay=1-this.cy-this.by,this.p1x=e,this.p1y=r,this.p2x=n,this.p2y=r}function Rt(e,t,n){return e*(1-n)+t*n}xt.prototype.sampleCurveX=function(e){return((this.ax*e+this.bx)*e+this.cx)*e},xt.prototype.sampleCurveY=function(e){return((this.ay*e+this.by)*e+this.cy)*e},xt.prototype.sampleCurveDerivativeX=function(e){return(3*this.ax*e+2*this.bx)*e+this.cx},xt.prototype.solveCurveX=function(e,t){var n,r,a,i,o;for(void 0===t&&(t=1e-6),a=e,o=0;o<8;o++){if(i=this.sampleCurveX(a)-e,Math.abs(i)(r=1))return r;for(;ni?n=a:r=a,a=.5*(r-n)+n}return a},xt.prototype.solve=function(e,t){return this.sampleCurveY(this.solveCurveX(e,t))};var wt=Object.freeze({__proto__:null,number:Rt,color:function(e,t,n){return new Ke(Rt(e.r,t.r,n),Rt(e.g,t.g,n),Rt(e.b,t.b,n),Rt(e.a,t.a,n))},array:function(e,t,n){return e.map((function(e,r){return Rt(e,t[r],n)}))}}),Et=.95047,St=1,At=1.08883,Tt=4/29,Pt=6/29,Ct=3*Pt*Pt,Ot=Pt*Pt*Pt,Mt=Math.PI/180,kt=180/Math.PI;function Dt(e){return e>Ot?Math.pow(e,1/3):e/Ct+Tt}function It(e){return e>Pt?e*e*e:Ct*(e-Tt)}function Lt(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function jt(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function Ft(e){var t=jt(e.r),n=jt(e.g),r=jt(e.b),a=Dt((.4124564*t+.3575761*n+.1804375*r)/Et),i=Dt((.2126729*t+.7151522*n+.072175*r)/St);return{l:116*i-16,a:500*(a-i),b:200*(i-Dt((.0193339*t+.119192*n+.9503041*r)/At)),alpha:e.a}}function zt(e){var t=(e.l+16)/116,n=isNaN(e.a)?t:t+e.a/500,r=isNaN(e.b)?t:t-e.b/200;return t=St*It(t),n=Et*It(n),r=At*It(r),new Ke(Lt(3.2404542*n-1.5371385*t-.4985314*r),Lt(-.969266*n+1.8760108*t+.041556*r),Lt(.0556434*n-.2040259*t+1.0572252*r),e.alpha)}function Nt(e,t,n){var r=t-e;return e+n*(r>180||r<-180?r-360*Math.round(r/360):r)}var Bt={forward:Ft,reverse:zt,interpolate:function(e,t,n){return{l:Rt(e.l,t.l,n),a:Rt(e.a,t.a,n),b:Rt(e.b,t.b,n),alpha:Rt(e.alpha,t.alpha,n)}}},Vt={forward:function(e){var t=Ft(e),n=t.l,r=t.a,a=t.b,i=Math.atan2(a,r)*kt;return{h:i<0?i+360:i,c:Math.sqrt(r*r+a*a),l:n,alpha:e.a}},reverse:function(e){var t=e.h*Mt,n=e.c;return zt({l:e.l,a:Math.cos(t)*n,b:Math.sin(t)*n,alpha:e.alpha})},interpolate:function(e,t,n){return{h:Nt(e.h,t.h,n),c:Rt(e.c,t.c,n),l:Rt(e.l,t.l,n),alpha:Rt(e.alpha,t.alpha,n)}}},Ht=Object.freeze({__proto__:null,lab:Bt,hcl:Vt}),Ut=function(e,t,n,r,a){this.type=e,this.operator=t,this.interpolation=n,this.input=r,this.labels=[],this.outputs=[];for(var i=0,o=a;i1})))return t.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);r={name:"cubic-bezier",controlPoints:s}}if(e.length-1<4)return t.error("Expected at least 4 arguments, but found only "+(e.length-1)+".");if((e.length-1)%2!=0)return t.error("Expected an even number of arguments.");if(!(a=t.parse(a,2,De)))return null;var u=[],c=null;"interpolate-hcl"===n||"interpolate-lab"===n?c=je:t.expectedType&&"value"!==t.expectedType.kind&&(c=t.expectedType);for(var l=0;l=d)return t.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',p);var g=t.parse(f,h,c);if(!g)return null;c=c||g.type,u.push([d,g])}return"number"===c.kind||"color"===c.kind||"array"===c.kind&&"number"===c.itemType.kind&&"number"==typeof c.N?new Ut(c,n,r,a,u):t.error("Type "+Ue(c)+" is not interpolatable.")},Ut.prototype.evaluate=function(e){var t=this.labels,n=this.outputs;if(1===t.length)return n[0].evaluate(e);var r=this.input.evaluate(e);if(r<=t[0])return n[0].evaluate(e);var a=t.length;if(r>=t[a-1])return n[a-1].evaluate(e);var i=yt(t,r),o=t[i],s=t[i+1],u=Ut.interpolationFactor(this.interpolation,r,o,s),c=n[i].evaluate(e),l=n[i+1].evaluate(e);return"interpolate"===this.operator?wt[this.type.kind.toLowerCase()](c,l,u):"interpolate-hcl"===this.operator?Vt.reverse(Vt.interpolate(Vt.forward(c),Vt.forward(l),u)):Bt.reverse(Bt.interpolate(Bt.forward(c),Bt.forward(l),u))},Ut.prototype.eachChild=function(e){e(this.input);for(var t=0,n=this.outputs;t=n.length)throw new nt("Array index out of bounds: "+t+" > "+(n.length-1)+".");if(t!==Math.floor(t))throw new nt("Array index must be an integer, but found "+t+" instead.");return n[t]},Kt.prototype.eachChild=function(e){e(this.index),e(this.input)},Kt.prototype.possibleOutputs=function(){return[void 0]},Kt.prototype.serialize=function(){return["at",this.index.serialize(),this.input.serialize()]};var Yt=function(e,t,n,r,a,i){this.inputType=e,this.type=t,this.input=n,this.cases=r,this.outputs=a,this.otherwise=i};Yt.parse=function(e,t){if(e.length<5)return t.error("Expected at least 4 arguments, but found only "+(e.length-1)+".");if(e.length%2!=1)return t.error("Expected an even number of arguments.");var n,r;t.expectedType&&"value"!==t.expectedType.kind&&(r=t.expectedType);for(var a={},i=[],o=2;oNumber.MAX_SAFE_INTEGER)return c.error("Branch labels must be integers no larger than "+Number.MAX_SAFE_INTEGER+".");if("number"==typeof f&&Math.floor(f)!==f)return c.error("Numeric branch labels must be integer values.");if(n){if(c.checkSubtype(n,Qe(f)))return null}else n=Qe(f);if(void 0!==a[String(f)])return c.error("Branch labels must be unique.");a[String(f)]=i.length}var p=t.parse(u,o,r);if(!p)return null;r=r||p.type,i.push(p)}var h=t.parse(e[1],1,ze);if(!h)return null;var g=t.parse(e[e.length-1],e.length-1,r);return g?"value"!==h.type.kind&&t.concat(1).checkSubtype(n,h.type)?null:new Yt(n,r,h,a,i,g):null},Yt.prototype.evaluate=function(e){var t=this.input.evaluate(e);return(Qe(t)===this.inputType&&this.outputs[this.cases[t]]||this.otherwise).evaluate(e)},Yt.prototype.eachChild=function(e){e(this.input),this.outputs.forEach(e),e(this.otherwise)},Yt.prototype.possibleOutputs=function(){var e;return(e=[]).concat.apply(e,this.outputs.map((function(e){return e.possibleOutputs()}))).concat(this.otherwise.possibleOutputs())},Yt.prototype.serialize=function(){for(var e=this,t=["match",this.input.serialize()],n=[],r={},a=0,i=Object.keys(this.cases).sort();a",(function(e,t,n){return t>n}),(function(e,t,n,r){return r.compare(t,n)>0})),rn=$t("<=",(function(e,t,n){return t<=n}),(function(e,t,n,r){return r.compare(t,n)<=0})),an=$t(">=",(function(e,t,n){return t>=n}),(function(e,t,n,r){return r.compare(t,n)>=0})),on=function(e,t,n,r,a){this.type=Ie,this.number=e,this.locale=t,this.currency=n,this.minFractionDigits=r,this.maxFractionDigits=a};on.parse=function(e,t){if(3!==e.length)return t.error("Expected two arguments.");var n=t.parse(e[1],1,De);if(!n)return null;var r=e[2];if("object"!=typeof r||Array.isArray(r))return t.error("NumberFormat options argument must be an object.");var a=null;if(r.locale&&!(a=t.parse(r.locale,1,Ie)))return null;var i=null;if(r.currency&&!(i=t.parse(r.currency,1,Ie)))return null;var o=null;if(r["min-fraction-digits"]&&!(o=t.parse(r["min-fraction-digits"],1,De)))return null;var s=null;return r["max-fraction-digits"]&&!(s=t.parse(r["max-fraction-digits"],1,De))?null:new on(n,a,i,o,s)},on.prototype.evaluate=function(e){return new Intl.NumberFormat(this.locale?this.locale.evaluate(e):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(e):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(e):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(e):void 0}).format(this.number.evaluate(e))},on.prototype.eachChild=function(e){e(this.number),this.locale&&e(this.locale),this.currency&&e(this.currency),this.minFractionDigits&&e(this.minFractionDigits),this.maxFractionDigits&&e(this.maxFractionDigits)},on.prototype.possibleOutputs=function(){return[void 0]},on.prototype.serialize=function(){var e={};return this.locale&&(e.locale=this.locale.serialize()),this.currency&&(e.currency=this.currency.serialize()),this.minFractionDigits&&(e["min-fraction-digits"]=this.minFractionDigits.serialize()),this.maxFractionDigits&&(e["max-fraction-digits"]=this.maxFractionDigits.serialize()),["number-format",this.number.serialize(),e]};var sn=function(e){this.type=De,this.input=e};sn.parse=function(e,t){if(2!==e.length)return t.error("Expected 1 argument, but found "+(e.length-1)+" instead.");var n=t.parse(e[1],1);return n?"array"!==n.type.kind&&"string"!==n.type.kind&&"value"!==n.type.kind?t.error("Expected argument of type string or array, but found "+Ue(n.type)+" instead."):new sn(n):null},sn.prototype.evaluate=function(e){var t=this.input.evaluate(e);if("string"==typeof t)return t.length;if(Array.isArray(t))return t.length;throw new nt("Expected value to be of type string or array, but found "+Ue(Qe(t))+" instead.")},sn.prototype.eachChild=function(e){e(this.input)},sn.prototype.possibleOutputs=function(){return[void 0]},sn.prototype.serialize=function(){var e=["length"];return this.eachChild((function(t){e.push(t.serialize())})),e};var un={"==":Qt,"!=":en,">":nn,"<":tn,">=":an,"<=":rn,array:at,at:Kt,boolean:at,case:Xt,coalesce:qt,collator:ft,format:it,image:ot,interpolate:Ut,"interpolate-hcl":Ut,"interpolate-lab":Ut,length:sn,let:Gt,literal:tt,match:Yt,number:at,"number-format":on,object:at,step:bt,string:at,"to-boolean":ut,"to-color":ut,"to-number":ut,"to-string":ut,var:vt};function cn(e,t){var n=t[0],r=t[1],a=t[2],i=t[3];n=n.evaluate(e),r=r.evaluate(e),a=a.evaluate(e);var o=i?i.evaluate(e):1,s=$e(n,r,a,o);if(s)throw new nt(s);return new Ke(n/255*o,r/255*o,a/255*o,o)}function ln(e,t){return e in t}function dn(e,t){var n=t[e];return void 0===n?null:n}function fn(e){return{type:e}}function pn(e){return{result:"success",value:e}}function hn(e){return{result:"error",value:e}}function gn(e){return"data-driven"===e["property-type"]||"cross-faded-data-driven"===e["property-type"]}function vn(e){return!!e.expression&&e.expression.parameters.indexOf("zoom")>-1}function mn(e){return!!e.expression&&e.expression.interpolated}function yn(e){return e instanceof Number?"number":e instanceof String?"string":e instanceof Boolean?"boolean":Array.isArray(e)?"array":null===e?"null":typeof e}function bn(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}function _n(e){return e}function xn(e,t,n){return void 0!==e?e:void 0!==t?t:void 0!==n?n:void 0}function Rn(e,t,n,r,a){return xn(typeof n===a?r[n]:void 0,e.default,t.default)}function wn(e,t,n){if("number"!==yn(n))return xn(e.default,t.default);var r=e.stops.length;if(1===r)return e.stops[0][1];if(n<=e.stops[0][0])return e.stops[0][1];if(n>=e.stops[r-1][0])return e.stops[r-1][1];var a=yt(e.stops.map((function(e){return e[0]})),n);return e.stops[a][1]}function En(e,t,n){var r=void 0!==e.base?e.base:1;if("number"!==yn(n))return xn(e.default,t.default);var a=e.stops.length;if(1===a)return e.stops[0][1];if(n<=e.stops[0][0])return e.stops[0][1];if(n>=e.stops[a-1][0])return e.stops[a-1][1];var i=yt(e.stops.map((function(e){return e[0]})),n),o=function(e,t,n,r){var a=r-n,i=e-n;return 0===a?0:1===t?i/a:(Math.pow(t,i)-1)/(Math.pow(t,a)-1)}(n,r,e.stops[i][0],e.stops[i+1][0]),s=e.stops[i][1],u=e.stops[i+1][1],c=wt[t.type]||_n;if(e.colorSpace&&"rgb"!==e.colorSpace){var l=Ht[e.colorSpace];c=function(e,t){return l.reverse(l.interpolate(l.forward(e),l.forward(t),o))}}return"function"==typeof s.evaluate?{evaluate:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=s.evaluate.apply(void 0,e),r=u.evaluate.apply(void 0,e);if(void 0!==n&&void 0!==r)return c(n,r,o)}}:c(s,u,o)}function Sn(e,t,n){return"color"===t.type?n=Ke.parse(n):"formatted"===t.type?n=Je.fromString(n.toString()):"resolvedImage"===t.type?n=Ze.fromString(n.toString()):yn(n)===t.type||"enum"===t.type&&t.values[n]||(n=void 0),xn(n,e.default,t.default)}dt.register(un,{error:[{kind:"error"},[Ie],function(e,t){var n=t[0];throw new nt(n.evaluate(e))}],typeof:[Ie,[ze],function(e,t){return Ue(Qe(t[0].evaluate(e)))}],"to-rgba":[He(De,4),[je],function(e,t){return t[0].evaluate(e).toArray()}],rgb:[je,[De,De,De],cn],rgba:[je,[De,De,De,De],cn],has:{type:Le,overloads:[[[Ie],function(e,t){return ln(t[0].evaluate(e),e.properties())}],[[Ie,Fe],function(e,t){var n=t[0],r=t[1];return ln(n.evaluate(e),r.evaluate(e))}]]},get:{type:ze,overloads:[[[Ie],function(e,t){return dn(t[0].evaluate(e),e.properties())}],[[Ie,Fe],function(e,t){var n=t[0],r=t[1];return dn(n.evaluate(e),r.evaluate(e))}]]},"feature-state":[ze,[Ie],function(e,t){return dn(t[0].evaluate(e),e.featureState||{})}],properties:[Fe,[],function(e){return e.properties()}],"geometry-type":[Ie,[],function(e){return e.geometryType()}],id:[ze,[],function(e){return e.id()}],zoom:[De,[],function(e){return e.globals.zoom}],"heatmap-density":[De,[],function(e){return e.globals.heatmapDensity||0}],"line-progress":[De,[],function(e){return e.globals.lineProgress||0}],accumulated:[ze,[],function(e){return void 0===e.globals.accumulated?null:e.globals.accumulated}],"+":[De,fn(De),function(e,t){for(var n=0,r=0,a=t;r":[Le,[Ie,ze],function(e,t){var n=t[0],r=t[1],a=e.properties()[n.value],i=r.value;return typeof a==typeof i&&a>i}],"filter-id->":[Le,[ze],function(e,t){var n=t[0],r=e.id(),a=n.value;return typeof r==typeof a&&r>a}],"filter-<=":[Le,[Ie,ze],function(e,t){var n=t[0],r=t[1],a=e.properties()[n.value],i=r.value;return typeof a==typeof i&&a<=i}],"filter-id-<=":[Le,[ze],function(e,t){var n=t[0],r=e.id(),a=n.value;return typeof r==typeof a&&r<=a}],"filter->=":[Le,[Ie,ze],function(e,t){var n=t[0],r=t[1],a=e.properties()[n.value],i=r.value;return typeof a==typeof i&&a>=i}],"filter-id->=":[Le,[ze],function(e,t){var n=t[0],r=e.id(),a=n.value;return typeof r==typeof a&&r>=a}],"filter-has":[Le,[ze],function(e,t){return t[0].value in e.properties()}],"filter-has-id":[Le,[],function(e){return null!==e.id()}],"filter-type-in":[Le,[He(Ie)],function(e,t){return t[0].value.indexOf(e.geometryType())>=0}],"filter-id-in":[Le,[He(ze)],function(e,t){return t[0].value.indexOf(e.id())>=0}],"filter-in-small":[Le,[Ie,He(ze)],function(e,t){var n=t[0];return t[1].value.indexOf(e.properties()[n.value])>=0}],"filter-in-large":[Le,[Ie,He(ze)],function(e,t){var n=t[0],r=t[1];return function(e,t,n,r){for(;n<=r;){var a=n+r>>1;if(t[a]===e)return!0;t[a]>e?r=a-1:n=a+1}return!1}(e.properties()[n.value],r.value,0,r.value.length-1)}],all:{type:Le,overloads:[[[Le,Le],function(e,t){var n=t[0],r=t[1];return n.evaluate(e)&&r.evaluate(e)}],[fn(Le),function(e,t){for(var n=0,r=t;n0&&"string"==typeof e[0]&&e[0]in un}function Pn(e,t){var n=new mt(un,[],t?function(e){var t={color:je,string:Ie,number:De,enum:Ie,boolean:Le,formatted:Be,resolvedImage:Ve};return"array"===e.type?He(t[e.value]||ze,e.length):t[e.type]}(t):void 0),r=n.parse(e,void 0,void 0,void 0,t&&"string"===t.type?{typeAnnotation:"coerce"}:void 0);return r?pn(new An(r,t)):hn(n.errors)}An.prototype.evaluateWithoutErrorHandling=function(e,t,n,r,a){return this._evaluator.globals=e,this._evaluator.feature=t,this._evaluator.featureState=n,this._evaluator.availableImages=r||null,this._evaluator.formattedSection=a,this.expression.evaluate(this._evaluator)},An.prototype.evaluate=function(e,t,n,r,a){this._evaluator.globals=e,this._evaluator.feature=t||null,this._evaluator.featureState=n||null,this._evaluator.availableImages=r||null,this._evaluator.formattedSection=a||null;try{var i=this.expression.evaluate(this._evaluator);if(null==i)return this._defaultValue;if(this._enumValues&&!(i in this._enumValues))throw new nt("Expected value to be one of "+Object.keys(this._enumValues).map((function(e){return JSON.stringify(e)})).join(", ")+", but found "+JSON.stringify(i)+" instead.");return i}catch(e){return this._warningHistory[e.message]||(this._warningHistory[e.message]=!0,"undefined"!=typeof console&&console.warn(e.message)),this._defaultValue}};var Cn=function(e,t){this.kind=e,this._styleExpression=t,this.isStateDependent="constant"!==e&&!ht(t.expression)};Cn.prototype.evaluateWithoutErrorHandling=function(e,t,n,r,a){return this._styleExpression.evaluateWithoutErrorHandling(e,t,n,r,a)},Cn.prototype.evaluate=function(e,t,n,r,a){return this._styleExpression.evaluate(e,t,n,r,a)};var On=function(e,t,n,r){this.kind=e,this.zoomStops=n,this._styleExpression=t,this.isStateDependent="camera"!==e&&!ht(t.expression),this.interpolationType=r};function Mn(e,t){if("error"===(e=Pn(e,t)).result)return e;var n=e.value.expression,r=pt(n);if(!r&&!gn(t))return hn([new Oe("","data expressions not supported")]);var a=gt(n,["zoom"]);if(!a&&!vn(t))return hn([new Oe("","zoom expressions not supported")]);var i=function e(t){var n=null;if(t instanceof Gt)n=e(t.result);else if(t instanceof qt)for(var r=0,a=t.args;rr.maximum?[new Ee(t,n,n+" is greater than the maximum value "+r.maximum)]:[]}function jn(e){var t,n,r,a=e.valueSpec,i=Pe(e.value.type),o={},s="categorical"!==i&&void 0===e.value.property,u=!s,c="array"===yn(e.value.stops)&&"array"===yn(e.value.stops[0])&&"object"===yn(e.value.stops[0][0]),l=Dn({key:e.key,value:e.value,valueSpec:e.styleSpec.function,style:e.style,styleSpec:e.styleSpec,objectElementValidators:{stops:function(e){if("identity"===i)return[new Ee(e.key,e.value,'identity function may not have a "stops" property')];var t=[],n=e.value;return t=t.concat(In({key:e.key,value:n,valueSpec:e.valueSpec,style:e.style,styleSpec:e.styleSpec,arrayElementValidator:d})),"array"===yn(n)&&0===n.length&&t.push(new Ee(e.key,n,"array must have at least one stop")),t},default:function(e){return rr({key:e.key,value:e.value,valueSpec:a,style:e.style,styleSpec:e.styleSpec})}}});return"identity"===i&&s&&l.push(new Ee(e.key,e.value,'missing required property "property"')),"identity"===i||e.value.stops||l.push(new Ee(e.key,e.value,'missing required property "stops"')),"exponential"===i&&e.valueSpec.expression&&!mn(e.valueSpec)&&l.push(new Ee(e.key,e.value,"exponential functions not supported")),e.styleSpec.$version>=8&&(u&&!gn(e.valueSpec)?l.push(new Ee(e.key,e.value,"property functions not supported")):s&&!vn(e.valueSpec)&&l.push(new Ee(e.key,e.value,"zoom functions not supported"))),"categorical"!==i&&!c||void 0!==e.value.property||l.push(new Ee(e.key,e.value,'"property" property is required')),l;function d(e){var t=[],i=e.value,s=e.key;if("array"!==yn(i))return[new Ee(s,i,"array expected, "+yn(i)+" found")];if(2!==i.length)return[new Ee(s,i,"array length 2 expected, length "+i.length+" found")];if(c){if("object"!==yn(i[0]))return[new Ee(s,i,"object expected, "+yn(i[0])+" found")];if(void 0===i[0].zoom)return[new Ee(s,i,"object stop key must have zoom")];if(void 0===i[0].value)return[new Ee(s,i,"object stop key must have value")];if(r&&r>Pe(i[0].zoom))return[new Ee(s,i[0].zoom,"stop zoom values must appear in ascending order")];Pe(i[0].zoom)!==r&&(r=Pe(i[0].zoom),n=void 0,o={}),t=t.concat(Dn({key:s+"[0]",value:i[0],valueSpec:{zoom:{}},style:e.style,styleSpec:e.styleSpec,objectElementValidators:{zoom:Ln,value:f}}))}else t=t.concat(f({key:s+"[0]",value:i[0],valueSpec:{},style:e.style,styleSpec:e.styleSpec},i));return Tn(Ce(i[1]))?t.concat([new Ee(s+"[1]",i[1],"expressions are not allowed in function stops.")]):t.concat(rr({key:s+"[1]",value:i[1],valueSpec:a,style:e.style,styleSpec:e.styleSpec}))}function f(e,r){var s=yn(e.value),u=Pe(e.value),c=null!==e.value?e.value:r;if(t){if(s!==t)return[new Ee(e.key,c,s+" stop domain type must match previous stop domain type "+t)]}else t=s;if("number"!==s&&"string"!==s&&"boolean"!==s)return[new Ee(e.key,c,"stop domain value must be a number, string, or boolean")];if("number"!==s&&"categorical"!==i){var l="number expected, "+s+" found";return gn(a)&&void 0===i&&(l+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new Ee(e.key,c,l)]}return"categorical"!==i||"number"!==s||isFinite(u)&&Math.floor(u)===u?"categorical"!==i&&"number"===s&&void 0!==n&&u=2&&"$id"!==e[1]&&"$type"!==e[1];case"in":case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return 3!==e.length||Array.isArray(e[1])||Array.isArray(e[2]);case"any":case"all":for(var t=0,n=e.slice(1);tt?1:0}function Un(e){if(!e)return!0;var t,n=e[0];return e.length<=1?"any"!==n:"=="===n?Wn(e[1],e[2],"=="):"!="===n?Kn(Wn(e[1],e[2],"==")):"<"===n||">"===n||"<="===n||">="===n?Wn(e[1],e[2],n):"any"===n?(t=e.slice(1),["any"].concat(t.map(Un))):"all"===n?["all"].concat(e.slice(1).map(Un)):"none"===n?["all"].concat(e.slice(1).map(Un).map(Kn)):"in"===n?qn(e[1],e.slice(2)):"!in"===n?Kn(qn(e[1],e.slice(2))):"has"===n?Gn(e[1]):"!has"!==n||Kn(Gn(e[1]))}function Wn(e,t,n){switch(e){case"$type":return["filter-type-"+n,t];case"$id":return["filter-id-"+n,t];default:return["filter-"+n,e,t]}}function qn(e,t){if(0===t.length)return!1;switch(e){case"$type":return["filter-type-in",["literal",t]];case"$id":return["filter-id-in",["literal",t]];default:return t.length>200&&!t.some((function(e){return typeof e!=typeof t[0]}))?["filter-in-large",e,["literal",t.sort(Hn)]]:["filter-in-small",e,["literal",t]]}}function Gn(e){switch(e){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",e]}}function Kn(e){return["!",e]}function Yn(e){return Nn(Ce(e.value))?Fn(Ae({},e,{expressionContext:"filter",valueSpec:{value:"boolean"}})):function e(t){var n=t.value,r=t.key;if("array"!==yn(n))return[new Ee(r,n,"array expected, "+yn(n)+" found")];var a,i=t.styleSpec,o=[];if(n.length<1)return[new Ee(r,n,"filter array must have at least 1 element")];switch(o=o.concat(zn({key:r+"[0]",value:n[0],valueSpec:i.filter_operator,style:t.style,styleSpec:t.styleSpec})),Pe(n[0])){case"<":case"<=":case">":case">=":n.length>=2&&"$type"===Pe(n[1])&&o.push(new Ee(r,n,'"$type" cannot be use with operator "'+n[0]+'"'));case"==":case"!=":3!==n.length&&o.push(new Ee(r,n,'filter array for operator "'+n[0]+'" must have 3 elements'));case"in":case"!in":n.length>=2&&"string"!==(a=yn(n[1]))&&o.push(new Ee(r+"[1]",n[1],"string expected, "+a+" found"));for(var s=2;s=l[p+0]&&r>=l[p+1])?(o[f]=!0,i.push(c[f])):o[f]=!1}}},gr.prototype._forEachCell=function(e,t,n,r,a,i,o,s){for(var u=this._convertToCellCoord(e),c=this._convertToCellCoord(t),l=this._convertToCellCoord(n),d=this._convertToCellCoord(r),f=u;f<=l;f++)for(var p=c;p<=d;p++){var h=this.d*p+f;if((!s||s(this._convertFromCellCoord(f),this._convertFromCellCoord(p),this._convertFromCellCoord(f+1),this._convertFromCellCoord(p+1)))&&a.call(this,e,t,n,r,h,i,o,s))return}},gr.prototype._convertFromCellCoord=function(e){return(e-this.padding)/this.scale},gr.prototype._convertToCellCoord=function(e){return Math.max(0,Math.min(this.d-1,Math.floor(e*this.scale)+this.padding))},gr.prototype.toArrayBuffer=function(){if(this.arrayBuffer)return this.arrayBuffer;for(var e=this.cells,t=hr+this.cells.length+1+1,n=0,r=0;r=0)){var d=e[l];c[l]=mr[u].shallow.indexOf(l)>=0?d:xr(d,t)}e instanceof Error&&(c.message=e.message)}if(c.$name)throw new Error("$name property is reserved for worker serialization logic.");return"Object"!==u&&(c.$name=u),c}throw new Error("can't serialize object of type "+typeof e)}function Rr(e){if(null==e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||e instanceof Boolean||e instanceof Number||e instanceof String||e instanceof Date||e instanceof RegExp||_r(e)||ArrayBuffer.isView(e)||e instanceof vr)return e;if(Array.isArray(e))return e.map(Rr);if("object"==typeof e){var t=e.$name||"Object",n=mr[t].klass;if(!n)throw new Error("can't deserialize unregistered class "+t);if(n.deserialize)return n.deserialize(e);for(var r=Object.create(n.prototype),a=0,i=Object.keys(e);a=0?s:Rr(s)}}return r}throw new Error("can't deserialize object of type "+typeof e)}var wr=function(){this.first=!0};wr.prototype.update=function(e,t){var n=Math.floor(e);return this.first?(this.first=!1,this.lastIntegerZoom=n,this.lastIntegerZoomTime=0,this.lastZoom=e,this.lastFloorZoom=n,!0):(this.lastFloorZoom>n?(this.lastIntegerZoom=n+1,this.lastIntegerZoomTime=t):this.lastFloorZoom=128&&e<=255},Arabic:function(e){return e>=1536&&e<=1791},"Arabic Supplement":function(e){return e>=1872&&e<=1919},"Arabic Extended-A":function(e){return e>=2208&&e<=2303},"Hangul Jamo":function(e){return e>=4352&&e<=4607},"Unified Canadian Aboriginal Syllabics":function(e){return e>=5120&&e<=5759},Khmer:function(e){return e>=6016&&e<=6143},"Unified Canadian Aboriginal Syllabics Extended":function(e){return e>=6320&&e<=6399},"General Punctuation":function(e){return e>=8192&&e<=8303},"Letterlike Symbols":function(e){return e>=8448&&e<=8527},"Number Forms":function(e){return e>=8528&&e<=8591},"Miscellaneous Technical":function(e){return e>=8960&&e<=9215},"Control Pictures":function(e){return e>=9216&&e<=9279},"Optical Character Recognition":function(e){return e>=9280&&e<=9311},"Enclosed Alphanumerics":function(e){return e>=9312&&e<=9471},"Geometric Shapes":function(e){return e>=9632&&e<=9727},"Miscellaneous Symbols":function(e){return e>=9728&&e<=9983},"Miscellaneous Symbols and Arrows":function(e){return e>=11008&&e<=11263},"CJK Radicals Supplement":function(e){return e>=11904&&e<=12031},"Kangxi Radicals":function(e){return e>=12032&&e<=12255},"Ideographic Description Characters":function(e){return e>=12272&&e<=12287},"CJK Symbols and Punctuation":function(e){return e>=12288&&e<=12351},Hiragana:function(e){return e>=12352&&e<=12447},Katakana:function(e){return e>=12448&&e<=12543},Bopomofo:function(e){return e>=12544&&e<=12591},"Hangul Compatibility Jamo":function(e){return e>=12592&&e<=12687},Kanbun:function(e){return e>=12688&&e<=12703},"Bopomofo Extended":function(e){return e>=12704&&e<=12735},"CJK Strokes":function(e){return e>=12736&&e<=12783},"Katakana Phonetic Extensions":function(e){return e>=12784&&e<=12799},"Enclosed CJK Letters and Months":function(e){return e>=12800&&e<=13055},"CJK Compatibility":function(e){return e>=13056&&e<=13311},"CJK Unified Ideographs Extension A":function(e){return e>=13312&&e<=19903},"Yijing Hexagram Symbols":function(e){return e>=19904&&e<=19967},"CJK Unified Ideographs":function(e){return e>=19968&&e<=40959},"Yi Syllables":function(e){return e>=40960&&e<=42127},"Yi Radicals":function(e){return e>=42128&&e<=42191},"Hangul Jamo Extended-A":function(e){return e>=43360&&e<=43391},"Hangul Syllables":function(e){return e>=44032&&e<=55215},"Hangul Jamo Extended-B":function(e){return e>=55216&&e<=55295},"Private Use Area":function(e){return e>=57344&&e<=63743},"CJK Compatibility Ideographs":function(e){return e>=63744&&e<=64255},"Arabic Presentation Forms-A":function(e){return e>=64336&&e<=65023},"Vertical Forms":function(e){return e>=65040&&e<=65055},"CJK Compatibility Forms":function(e){return e>=65072&&e<=65103},"Small Form Variants":function(e){return e>=65104&&e<=65135},"Arabic Presentation Forms-B":function(e){return e>=65136&&e<=65279},"Halfwidth and Fullwidth Forms":function(e){return e>=65280&&e<=65519}};function Sr(e){for(var t=0,n=e;t=65097&&e<=65103)||Er["CJK Compatibility Ideographs"](e)||Er["CJK Compatibility"](e)||Er["CJK Radicals Supplement"](e)||Er["CJK Strokes"](e)||!(!Er["CJK Symbols and Punctuation"](e)||e>=12296&&e<=12305||e>=12308&&e<=12319||12336===e)||Er["CJK Unified Ideographs Extension A"](e)||Er["CJK Unified Ideographs"](e)||Er["Enclosed CJK Letters and Months"](e)||Er["Hangul Compatibility Jamo"](e)||Er["Hangul Jamo Extended-A"](e)||Er["Hangul Jamo Extended-B"](e)||Er["Hangul Jamo"](e)||Er["Hangul Syllables"](e)||Er.Hiragana(e)||Er["Ideographic Description Characters"](e)||Er.Kanbun(e)||Er["Kangxi Radicals"](e)||Er["Katakana Phonetic Extensions"](e)||Er.Katakana(e)&&12540!==e||!(!Er["Halfwidth and Fullwidth Forms"](e)||65288===e||65289===e||65293===e||e>=65306&&e<=65310||65339===e||65341===e||65343===e||e>=65371&&e<=65503||65507===e||e>=65512&&e<=65519)||!(!Er["Small Form Variants"](e)||e>=65112&&e<=65118||e>=65123&&e<=65126)||Er["Unified Canadian Aboriginal Syllabics"](e)||Er["Unified Canadian Aboriginal Syllabics Extended"](e)||Er["Vertical Forms"](e)||Er["Yijing Hexagram Symbols"](e)||Er["Yi Syllables"](e)||Er["Yi Radicals"](e))))}function Pr(e){return!(Tr(e)||function(e){return!!(Er["Latin-1 Supplement"](e)&&(167===e||169===e||174===e||177===e||188===e||189===e||190===e||215===e||247===e)||Er["General Punctuation"](e)&&(8214===e||8224===e||8225===e||8240===e||8241===e||8251===e||8252===e||8258===e||8263===e||8264===e||8265===e||8273===e)||Er["Letterlike Symbols"](e)||Er["Number Forms"](e)||Er["Miscellaneous Technical"](e)&&(e>=8960&&e<=8967||e>=8972&&e<=8991||e>=8996&&e<=9e3||9003===e||e>=9085&&e<=9114||e>=9150&&e<=9165||9167===e||e>=9169&&e<=9179||e>=9186&&e<=9215)||Er["Control Pictures"](e)&&9251!==e||Er["Optical Character Recognition"](e)||Er["Enclosed Alphanumerics"](e)||Er["Geometric Shapes"](e)||Er["Miscellaneous Symbols"](e)&&!(e>=9754&&e<=9759)||Er["Miscellaneous Symbols and Arrows"](e)&&(e>=11026&&e<=11055||e>=11088&&e<=11097||e>=11192&&e<=11243)||Er["CJK Symbols and Punctuation"](e)||Er.Katakana(e)||Er["Private Use Area"](e)||Er["CJK Compatibility Forms"](e)||Er["Small Form Variants"](e)||Er["Halfwidth and Fullwidth Forms"](e)||8734===e||8756===e||8757===e||e>=9984&&e<=10087||e>=10102&&e<=10131||65532===e||65533===e)}(e))}function Cr(e,t){return!(!t&&(e>=1424&&e<=2303||Er["Arabic Presentation Forms-A"](e)||Er["Arabic Presentation Forms-B"](e))||e>=2304&&e<=3583||e>=3840&&e<=4255||Er.Khmer(e))}var Or,Mr="unavailable",kr="loading",Dr="loaded",Ir=Mr,Lr=null,jr=new Re,Fr={applyArabicShaping:null,processBidirectionalText:null,processStyledBidirectionalText:null,isLoaded:function(){return Ir===Dr||null!=Fr.applyArabicShaping}},zr=function(e,t){this.zoom=e,t?(this.now=t.now,this.fadeDuration=t.fadeDuration,this.zoomHistory=t.zoomHistory,this.transition=t.transition):(this.now=0,this.fadeDuration=0,this.zoomHistory=new wr,this.transition={})};zr.prototype.isSupportedScript=function(e){return function(e,t){for(var n=0,r=e;nthis.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:t+(1-t)*n}:{fromScale:.5,toScale:1,t:1-(1-n)*t}};var Nr=function(e,t){this.property=e,this.value=t,this.expression=function(e,t){if(bn(e))return new kn(e,t);if(Tn(e)){var n=Mn(e,t);if("error"===n.result)throw new Error(n.value.map((function(e){return e.key+": "+e.message})).join(", "));return n.value}var r=e;return"string"==typeof e&&"color"===t.type&&(r=Ke.parse(e)),{kind:"constant",evaluate:function(){return r}}}(void 0===t?e.specification.default:t,e.specification)};Nr.prototype.isDataDriven=function(){return"source"===this.expression.kind||"composite"===this.expression.kind},Nr.prototype.possiblyEvaluate=function(e,t){return this.property.possiblyEvaluate(this,e,t)};var Br=function(e){this.property=e,this.value=new Nr(e,void 0)};Br.prototype.transitioned=function(e,t){return new Hr(this.property,this.value,t,d({},e.transition,this.transition),e.now)},Br.prototype.untransitioned=function(){return new Hr(this.property,this.value,null,{},0)};var Vr=function(e){this._properties=e,this._values=Object.create(e.defaultTransitionablePropertyValues)};Vr.prototype.getValue=function(e){return _(this._values[e].value.value)},Vr.prototype.setValue=function(e,t){this._values.hasOwnProperty(e)||(this._values[e]=new Br(this._values[e].property)),this._values[e].value=new Nr(this._values[e].property,null===t?void 0:_(t))},Vr.prototype.getTransition=function(e){return _(this._values[e].transition)},Vr.prototype.setTransition=function(e,t){this._values.hasOwnProperty(e)||(this._values[e]=new Br(this._values[e].property)),this._values[e].transition=_(t)||void 0},Vr.prototype.serialize=function(){for(var e={},t=0,n=Object.keys(this._values);tthis.end)return this.prior=null,r;if(this.value.isDataDriven())return this.prior=null,r;if(n=1)return 1;var t=e*e,n=t*e;return 4*(e<.5?n:3*(e-t)+n-.75)}(i))}return r};var Ur=function(e){this._properties=e,this._values=Object.create(e.defaultTransitioningPropertyValues)};Ur.prototype.possiblyEvaluate=function(e,t){for(var n=new Gr(this._properties),r=0,a=Object.keys(this._values);rr.zoomHistory.lastIntegerZoom?{from:e,to:t}:{from:n,to:t}},t.prototype.interpolate=function(e){return e},t}(Yr),Jr=function(e){this.specification=e};Jr.prototype.possiblyEvaluate=function(e,t,n){if(void 0!==e.value){if("constant"===e.expression.kind){var r=e.expression.evaluate(t,null,{},n);return this._calculate(r,r,r,t)}return this._calculate(e.expression.evaluate(new zr(Math.floor(t.zoom-1),t)),e.expression.evaluate(new zr(Math.floor(t.zoom),t)),e.expression.evaluate(new zr(Math.floor(t.zoom+1),t)),t)}},Jr.prototype._calculate=function(e,t,n,r){return r.zoom>r.zoomHistory.lastIntegerZoom?{from:e,to:t}:{from:n,to:t}},Jr.prototype.interpolate=function(e){return e};var Zr=function(e){this.specification=e};Zr.prototype.possiblyEvaluate=function(e,t,n){return!!e.expression.evaluate(t,null,{},n)},Zr.prototype.interpolate=function(){return!1};var $r=function(e){for(var t in this.properties=e,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[],e){var n=e[t];n.specification.overridable&&this.overridableProperties.push(t);var r=this.defaultPropertyValues[t]=new Nr(n,void 0),a=this.defaultTransitionablePropertyValues[t]=new Br(n);this.defaultTransitioningPropertyValues[t]=a.untransitioned(),this.defaultPossiblyEvaluatedValues[t]=r.possiblyEvaluate({})}};yr("DataDrivenProperty",Yr),yr("DataConstantProperty",Kr),yr("CrossFadedDataDrivenProperty",Xr),yr("CrossFadedProperty",Jr),yr("ColorRampProperty",Zr);var Qr=function(e){function t(t,n){if(e.call(this),this.id=t.id,this.type=t.type,this._featureFilter=function(){return!0},"custom"!==t.type&&(t=t,this.metadata=t.metadata,this.minzoom=t.minzoom,this.maxzoom=t.maxzoom,"background"!==t.type&&(this.source=t.source,this.sourceLayer=t["source-layer"],this.filter=t.filter),n.layout&&(this._unevaluatedLayout=new Wr(n.layout)),n.paint)){for(var r in this._transitionablePaint=new Vr(n.paint),t.paint)this.setPaintProperty(r,t.paint[r],{validate:!1});for(var a in t.layout)this.setLayoutProperty(a,t.layout[a],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned()}}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getCrossfadeParameters=function(){return this._crossfadeParameters},t.prototype.getLayoutProperty=function(e){return"visibility"===e?this.visibility:this._unevaluatedLayout.getValue(e)},t.prototype.setLayoutProperty=function(e,t,n){if(void 0===n&&(n={}),null!=t){var r="layers."+this.id+".layout."+e;if(this._validate(dr,r,e,t,n))return}"visibility"!==e?this._unevaluatedLayout.setValue(e,t):this.visibility=t},t.prototype.getPaintProperty=function(e){return m(e,"-transition")?this._transitionablePaint.getTransition(e.slice(0,-"-transition".length)):this._transitionablePaint.getValue(e)},t.prototype.setPaintProperty=function(e,t,n){if(void 0===n&&(n={}),null!=t){var r="layers."+this.id+".paint."+e;if(this._validate(lr,r,e,t,n))return!1}if(m(e,"-transition"))return this._transitionablePaint.setTransition(e.slice(0,-"-transition".length),t||void 0),!1;var a=this._transitionablePaint._values[e],i="cross-faded-data-driven"===a.property.specification["property-type"],o=a.value.isDataDriven(),s=a.value;this._transitionablePaint.setValue(e,t),this._handleSpecialPaintPropertyUpdate(e);var u=this._transitionablePaint._values[e].value;return u.isDataDriven()||o||i||this._handleOverridablePaintPropertyUpdate(e,s,u)},t.prototype._handleSpecialPaintPropertyUpdate=function(e){},t.prototype._handleOverridablePaintPropertyUpdate=function(e,t,n){return!1},t.prototype.isHidden=function(e){return!!(this.minzoom&&e=this.maxzoom)||"none"===this.visibility},t.prototype.updateTransitions=function(e){this._transitioningPaint=this._transitionablePaint.transitioned(e,this._transitioningPaint)},t.prototype.hasTransition=function(){return this._transitioningPaint.hasTransition()},t.prototype.recalculate=function(e,t){e.getCrossfadeParameters&&(this._crossfadeParameters=e.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(e,t)),this.paint=this._transitioningPaint.possiblyEvaluate(e,t)},t.prototype.serialize=function(){var e={id:this.id,type:this.type,source:this.source,"source-layer":this.sourceLayer,metadata:this.metadata,minzoom:this.minzoom,maxzoom:this.maxzoom,filter:this.filter,layout:this._unevaluatedLayout&&this._unevaluatedLayout.serialize(),paint:this._transitionablePaint&&this._transitionablePaint.serialize()};return this.visibility&&(e.layout=e.layout||{},e.layout.visibility=this.visibility),b(e,(function(e,t){return!(void 0===e||"layout"===t&&!Object.keys(e).length||"paint"===t&&!Object.keys(e).length)}))},t.prototype._validate=function(e,t,n,r,a){return void 0===a&&(a={}),(!a||!1!==a.validate)&&fr(this,e.call(ur,{key:t,layerType:this.type,objectKey:n,value:r,styleSpec:we,style:{glyphs:!0,sprite:!0}}))},t.prototype.is3D=function(){return!1},t.prototype.isTileClipped=function(){return!1},t.prototype.hasOffscreenPass=function(){return!1},t.prototype.resize=function(){},t.prototype.isStateDependent=function(){for(var e in this.paint._values){var t=this.paint.get(e);if(t instanceof qr&&gn(t.property.specification)&&("source"===t.value.kind||"composite"===t.value.kind)&&t.value.isStateDependent)return!0}return!1},t}(Re),ea={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array},ta=function(e,t){this._structArray=e,this._pos1=t*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8},na=function(){this.isTransferred=!1,this.capacity=-1,this.resize(0)};function ra(e,t){void 0===t&&(t=1);var n=0,r=0;return{members:e.map((function(e){var a,i=(a=e.type,ea[a].BYTES_PER_ELEMENT),o=n=aa(n,Math.max(t,i)),s=e.components||1;return r=Math.max(r,i),n+=i*s,{name:e.name,type:e.type,components:s,offset:o}})),size:aa(n,Math.max(r,t)),alignment:t}}function aa(e,t){return Math.ceil(e/t)*t}na.serialize=function(e,t){return e._trim(),t&&(e.isTransferred=!0,t.push(e.arrayBuffer)),{length:e.length,arrayBuffer:e.arrayBuffer}},na.deserialize=function(e){var t=Object.create(this.prototype);return t.arrayBuffer=e.arrayBuffer,t.length=e.length,t.capacity=e.arrayBuffer.byteLength/t.bytesPerElement,t._refreshViews(),t},na.prototype._trim=function(){this.length!==this.capacity&&(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews())},na.prototype.clear=function(){this.length=0},na.prototype.resize=function(e){this.reserve(e),this.length=e},na.prototype.reserve=function(e){if(e>this.capacity){this.capacity=Math.max(e,Math.floor(5*this.capacity),128),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);var t=this.uint8;this._refreshViews(),t&&this.uint8.set(t)}},na.prototype._refreshViews=function(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")};var ia=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t){var n=this.length;return this.resize(n+1),this.emplace(n,e,t)},t.prototype.emplace=function(e,t,n){var r=2*e;return this.int16[r+0]=t,this.int16[r+1]=n,e},t}(na);ia.prototype.bytesPerElement=4,yr("StructArrayLayout2i4",ia);var oa=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,n,r){var a=this.length;return this.resize(a+1),this.emplace(a,e,t,n,r)},t.prototype.emplace=function(e,t,n,r,a){var i=4*e;return this.int16[i+0]=t,this.int16[i+1]=n,this.int16[i+2]=r,this.int16[i+3]=a,e},t}(na);oa.prototype.bytesPerElement=8,yr("StructArrayLayout4i8",oa);var sa=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,n,r,a,i){var o=this.length;return this.resize(o+1),this.emplace(o,e,t,n,r,a,i)},t.prototype.emplace=function(e,t,n,r,a,i,o){var s=6*e;return this.int16[s+0]=t,this.int16[s+1]=n,this.int16[s+2]=r,this.int16[s+3]=a,this.int16[s+4]=i,this.int16[s+5]=o,e},t}(na);sa.prototype.bytesPerElement=12,yr("StructArrayLayout2i4i12",sa);var ua=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,n,r,a,i){var o=this.length;return this.resize(o+1),this.emplace(o,e,t,n,r,a,i)},t.prototype.emplace=function(e,t,n,r,a,i,o){var s=4*e,u=8*e;return this.int16[s+0]=t,this.int16[s+1]=n,this.uint8[u+4]=r,this.uint8[u+5]=a,this.uint8[u+6]=i,this.uint8[u+7]=o,e},t}(na);ua.prototype.bytesPerElement=8,yr("StructArrayLayout2i4ub8",ua);var ca=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,n,r,a,i,o,s){var u=this.length;return this.resize(u+1),this.emplace(u,e,t,n,r,a,i,o,s)},t.prototype.emplace=function(e,t,n,r,a,i,o,s,u){var c=8*e;return this.uint16[c+0]=t,this.uint16[c+1]=n,this.uint16[c+2]=r,this.uint16[c+3]=a,this.uint16[c+4]=i,this.uint16[c+5]=o,this.uint16[c+6]=s,this.uint16[c+7]=u,e},t}(na);ca.prototype.bytesPerElement=16,yr("StructArrayLayout8ui16",ca);var la=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,n,r,a,i,o,s){var u=this.length;return this.resize(u+1),this.emplace(u,e,t,n,r,a,i,o,s)},t.prototype.emplace=function(e,t,n,r,a,i,o,s,u){var c=8*e;return this.int16[c+0]=t,this.int16[c+1]=n,this.int16[c+2]=r,this.int16[c+3]=a,this.uint16[c+4]=i,this.uint16[c+5]=o,this.uint16[c+6]=s,this.uint16[c+7]=u,e},t}(na);la.prototype.bytesPerElement=16,yr("StructArrayLayout4i4ui16",la);var da=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,n){var r=this.length;return this.resize(r+1),this.emplace(r,e,t,n)},t.prototype.emplace=function(e,t,n,r){var a=3*e;return this.float32[a+0]=t,this.float32[a+1]=n,this.float32[a+2]=r,e},t}(na);da.prototype.bytesPerElement=12,yr("StructArrayLayout3f12",da);var fa=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e){var t=this.length;return this.resize(t+1),this.emplace(t,e)},t.prototype.emplace=function(e,t){var n=1*e;return this.uint32[n+0]=t,e},t}(na);fa.prototype.bytesPerElement=4,yr("StructArrayLayout1ul4",fa);var pa=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,n,r,a,i,o,s,u,c,l){var d=this.length;return this.resize(d+1),this.emplace(d,e,t,n,r,a,i,o,s,u,c,l)},t.prototype.emplace=function(e,t,n,r,a,i,o,s,u,c,l,d){var f=12*e,p=6*e;return this.int16[f+0]=t,this.int16[f+1]=n,this.int16[f+2]=r,this.int16[f+3]=a,this.int16[f+4]=i,this.int16[f+5]=o,this.uint32[p+3]=s,this.uint16[f+8]=u,this.uint16[f+9]=c,this.int16[f+10]=l,this.int16[f+11]=d,e},t}(na);pa.prototype.bytesPerElement=24,yr("StructArrayLayout6i1ul2ui2i24",pa);var ha=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,n,r,a,i){var o=this.length;return this.resize(o+1),this.emplace(o,e,t,n,r,a,i)},t.prototype.emplace=function(e,t,n,r,a,i,o){var s=6*e;return this.int16[s+0]=t,this.int16[s+1]=n,this.int16[s+2]=r,this.int16[s+3]=a,this.int16[s+4]=i,this.int16[s+5]=o,e},t}(na);ha.prototype.bytesPerElement=12,yr("StructArrayLayout2i2i2i12",ha);var ga=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,n,r){var a=this.length;return this.resize(a+1),this.emplace(a,e,t,n,r)},t.prototype.emplace=function(e,t,n,r,a){var i=12*e,o=3*e;return this.uint8[i+0]=t,this.uint8[i+1]=n,this.float32[o+1]=r,this.float32[o+2]=a,e},t}(na);ga.prototype.bytesPerElement=12,yr("StructArrayLayout2ub2f12",ga);var va=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,n,r,a,i,o,s,u,c,l,d,f,p,h,g,v){var m=this.length;return this.resize(m+1),this.emplace(m,e,t,n,r,a,i,o,s,u,c,l,d,f,p,h,g,v)},t.prototype.emplace=function(e,t,n,r,a,i,o,s,u,c,l,d,f,p,h,g,v,m){var y=24*e,b=12*e,_=48*e;return this.int16[y+0]=t,this.int16[y+1]=n,this.uint16[y+2]=r,this.uint16[y+3]=a,this.uint32[b+2]=i,this.uint32[b+3]=o,this.uint32[b+4]=s,this.uint16[y+10]=u,this.uint16[y+11]=c,this.uint16[y+12]=l,this.float32[b+7]=d,this.float32[b+8]=f,this.uint8[_+36]=p,this.uint8[_+37]=h,this.uint8[_+38]=g,this.uint32[b+10]=v,this.int16[y+22]=m,e},t}(na);va.prototype.bytesPerElement=48,yr("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",va);var ma=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,n,r,a,i,o,s,u,c,l,d,f,p,h,g,v,m,y,b,_,x,R,w,E,S){var A=this.length;return this.resize(A+1),this.emplace(A,e,t,n,r,a,i,o,s,u,c,l,d,f,p,h,g,v,m,y,b,_,x,R,w,E,S)},t.prototype.emplace=function(e,t,n,r,a,i,o,s,u,c,l,d,f,p,h,g,v,m,y,b,_,x,R,w,E,S,A){var T=30*e,P=15*e;return this.int16[T+0]=t,this.int16[T+1]=n,this.int16[T+2]=r,this.int16[T+3]=a,this.int16[T+4]=i,this.int16[T+5]=o,this.int16[T+6]=s,this.int16[T+7]=u,this.uint16[T+8]=c,this.uint16[T+9]=l,this.uint16[T+10]=d,this.uint16[T+11]=f,this.uint16[T+12]=p,this.uint16[T+13]=h,this.uint16[T+14]=g,this.uint16[T+15]=v,this.uint16[T+16]=m,this.uint16[T+17]=y,this.uint16[T+18]=b,this.uint16[T+19]=_,this.uint16[T+20]=x,this.uint16[T+21]=R,this.uint32[P+11]=w,this.float32[P+12]=E,this.float32[P+13]=S,this.float32[P+14]=A,e},t}(na);ma.prototype.bytesPerElement=60,yr("StructArrayLayout8i14ui1ul3f60",ma);var ya=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e){var t=this.length;return this.resize(t+1),this.emplace(t,e)},t.prototype.emplace=function(e,t){var n=1*e;return this.float32[n+0]=t,e},t}(na);ya.prototype.bytesPerElement=4,yr("StructArrayLayout1f4",ya);var ba=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,n){var r=this.length;return this.resize(r+1),this.emplace(r,e,t,n)},t.prototype.emplace=function(e,t,n,r){var a=3*e;return this.int16[a+0]=t,this.int16[a+1]=n,this.int16[a+2]=r,e},t}(na);ba.prototype.bytesPerElement=6,yr("StructArrayLayout3i6",ba);var _a=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,n){var r=this.length;return this.resize(r+1),this.emplace(r,e,t,n)},t.prototype.emplace=function(e,t,n,r){var a=2*e,i=4*e;return this.uint32[a+0]=t,this.uint16[i+2]=n,this.uint16[i+3]=r,e},t}(na);_a.prototype.bytesPerElement=8,yr("StructArrayLayout1ul2ui8",_a);var xa=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,n){var r=this.length;return this.resize(r+1),this.emplace(r,e,t,n)},t.prototype.emplace=function(e,t,n,r){var a=3*e;return this.uint16[a+0]=t,this.uint16[a+1]=n,this.uint16[a+2]=r,e},t}(na);xa.prototype.bytesPerElement=6,yr("StructArrayLayout3ui6",xa);var Ra=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t){var n=this.length;return this.resize(n+1),this.emplace(n,e,t)},t.prototype.emplace=function(e,t,n){var r=2*e;return this.uint16[r+0]=t,this.uint16[r+1]=n,e},t}(na);Ra.prototype.bytesPerElement=4,yr("StructArrayLayout2ui4",Ra);var wa=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e){var t=this.length;return this.resize(t+1),this.emplace(t,e)},t.prototype.emplace=function(e,t){var n=1*e;return this.uint16[n+0]=t,e},t}(na);wa.prototype.bytesPerElement=2,yr("StructArrayLayout1ui2",wa);var Ea=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t){var n=this.length;return this.resize(n+1),this.emplace(n,e,t)},t.prototype.emplace=function(e,t,n){var r=2*e;return this.float32[r+0]=t,this.float32[r+1]=n,e},t}(na);Ea.prototype.bytesPerElement=8,yr("StructArrayLayout2f8",Ea);var Sa=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,n,r){var a=this.length;return this.resize(a+1),this.emplace(a,e,t,n,r)},t.prototype.emplace=function(e,t,n,r,a){var i=4*e;return this.float32[i+0]=t,this.float32[i+1]=n,this.float32[i+2]=r,this.float32[i+3]=a,e},t}(na);Sa.prototype.bytesPerElement=16,yr("StructArrayLayout4f16",Sa);var Aa=function(e){function t(){e.apply(this,arguments)}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={anchorPointX:{configurable:!0},anchorPointY:{configurable:!0},x1:{configurable:!0},y1:{configurable:!0},x2:{configurable:!0},y2:{configurable:!0},featureIndex:{configurable:!0},sourceLayerIndex:{configurable:!0},bucketIndex:{configurable:!0},radius:{configurable:!0},signedDistanceFromAnchor:{configurable:!0},anchorPoint:{configurable:!0}};return n.anchorPointX.get=function(){return this._structArray.int16[this._pos2+0]},n.anchorPointX.set=function(e){this._structArray.int16[this._pos2+0]=e},n.anchorPointY.get=function(){return this._structArray.int16[this._pos2+1]},n.anchorPointY.set=function(e){this._structArray.int16[this._pos2+1]=e},n.x1.get=function(){return this._structArray.int16[this._pos2+2]},n.x1.set=function(e){this._structArray.int16[this._pos2+2]=e},n.y1.get=function(){return this._structArray.int16[this._pos2+3]},n.y1.set=function(e){this._structArray.int16[this._pos2+3]=e},n.x2.get=function(){return this._structArray.int16[this._pos2+4]},n.x2.set=function(e){this._structArray.int16[this._pos2+4]=e},n.y2.get=function(){return this._structArray.int16[this._pos2+5]},n.y2.set=function(e){this._structArray.int16[this._pos2+5]=e},n.featureIndex.get=function(){return this._structArray.uint32[this._pos4+3]},n.featureIndex.set=function(e){this._structArray.uint32[this._pos4+3]=e},n.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+8]},n.sourceLayerIndex.set=function(e){this._structArray.uint16[this._pos2+8]=e},n.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+9]},n.bucketIndex.set=function(e){this._structArray.uint16[this._pos2+9]=e},n.radius.get=function(){return this._structArray.int16[this._pos2+10]},n.radius.set=function(e){this._structArray.int16[this._pos2+10]=e},n.signedDistanceFromAnchor.get=function(){return this._structArray.int16[this._pos2+11]},n.signedDistanceFromAnchor.set=function(e){this._structArray.int16[this._pos2+11]=e},n.anchorPoint.get=function(){return new a(this.anchorPointX,this.anchorPointY)},Object.defineProperties(t.prototype,n),t}(ta);Aa.prototype.size=24;var Ta=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.get=function(e){return new Aa(this,e)},t}(pa);yr("CollisionBoxArray",Ta);var Pa=function(e){function t(){e.apply(this,arguments)}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={anchorX:{configurable:!0},anchorY:{configurable:!0},glyphStartIndex:{configurable:!0},numGlyphs:{configurable:!0},vertexStartIndex:{configurable:!0},lineStartIndex:{configurable:!0},lineLength:{configurable:!0},segment:{configurable:!0},lowerSize:{configurable:!0},upperSize:{configurable:!0},lineOffsetX:{configurable:!0},lineOffsetY:{configurable:!0},writingMode:{configurable:!0},placedOrientation:{configurable:!0},hidden:{configurable:!0},crossTileID:{configurable:!0},associatedIconIndex:{configurable:!0}};return n.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},n.anchorX.set=function(e){this._structArray.int16[this._pos2+0]=e},n.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},n.anchorY.set=function(e){this._structArray.int16[this._pos2+1]=e},n.glyphStartIndex.get=function(){return this._structArray.uint16[this._pos2+2]},n.glyphStartIndex.set=function(e){this._structArray.uint16[this._pos2+2]=e},n.numGlyphs.get=function(){return this._structArray.uint16[this._pos2+3]},n.numGlyphs.set=function(e){this._structArray.uint16[this._pos2+3]=e},n.vertexStartIndex.get=function(){return this._structArray.uint32[this._pos4+2]},n.vertexStartIndex.set=function(e){this._structArray.uint32[this._pos4+2]=e},n.lineStartIndex.get=function(){return this._structArray.uint32[this._pos4+3]},n.lineStartIndex.set=function(e){this._structArray.uint32[this._pos4+3]=e},n.lineLength.get=function(){return this._structArray.uint32[this._pos4+4]},n.lineLength.set=function(e){this._structArray.uint32[this._pos4+4]=e},n.segment.get=function(){return this._structArray.uint16[this._pos2+10]},n.segment.set=function(e){this._structArray.uint16[this._pos2+10]=e},n.lowerSize.get=function(){return this._structArray.uint16[this._pos2+11]},n.lowerSize.set=function(e){this._structArray.uint16[this._pos2+11]=e},n.upperSize.get=function(){return this._structArray.uint16[this._pos2+12]},n.upperSize.set=function(e){this._structArray.uint16[this._pos2+12]=e},n.lineOffsetX.get=function(){return this._structArray.float32[this._pos4+7]},n.lineOffsetX.set=function(e){this._structArray.float32[this._pos4+7]=e},n.lineOffsetY.get=function(){return this._structArray.float32[this._pos4+8]},n.lineOffsetY.set=function(e){this._structArray.float32[this._pos4+8]=e},n.writingMode.get=function(){return this._structArray.uint8[this._pos1+36]},n.writingMode.set=function(e){this._structArray.uint8[this._pos1+36]=e},n.placedOrientation.get=function(){return this._structArray.uint8[this._pos1+37]},n.placedOrientation.set=function(e){this._structArray.uint8[this._pos1+37]=e},n.hidden.get=function(){return this._structArray.uint8[this._pos1+38]},n.hidden.set=function(e){this._structArray.uint8[this._pos1+38]=e},n.crossTileID.get=function(){return this._structArray.uint32[this._pos4+10]},n.crossTileID.set=function(e){this._structArray.uint32[this._pos4+10]=e},n.associatedIconIndex.get=function(){return this._structArray.int16[this._pos2+22]},n.associatedIconIndex.set=function(e){this._structArray.int16[this._pos2+22]=e},Object.defineProperties(t.prototype,n),t}(ta);Pa.prototype.size=48;var Ca=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.get=function(e){return new Pa(this,e)},t}(va);yr("PlacedSymbolArray",Ca);var Oa=function(e){function t(){e.apply(this,arguments)}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={anchorX:{configurable:!0},anchorY:{configurable:!0},rightJustifiedTextSymbolIndex:{configurable:!0},centerJustifiedTextSymbolIndex:{configurable:!0},leftJustifiedTextSymbolIndex:{configurable:!0},verticalPlacedTextSymbolIndex:{configurable:!0},placedIconSymbolIndex:{configurable:!0},verticalPlacedIconSymbolIndex:{configurable:!0},key:{configurable:!0},textBoxStartIndex:{configurable:!0},textBoxEndIndex:{configurable:!0},verticalTextBoxStartIndex:{configurable:!0},verticalTextBoxEndIndex:{configurable:!0},iconBoxStartIndex:{configurable:!0},iconBoxEndIndex:{configurable:!0},verticalIconBoxStartIndex:{configurable:!0},verticalIconBoxEndIndex:{configurable:!0},featureIndex:{configurable:!0},numHorizontalGlyphVertices:{configurable:!0},numVerticalGlyphVertices:{configurable:!0},numIconVertices:{configurable:!0},numVerticalIconVertices:{configurable:!0},crossTileID:{configurable:!0},textBoxScale:{configurable:!0},textOffset0:{configurable:!0},textOffset1:{configurable:!0}};return n.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},n.anchorX.set=function(e){this._structArray.int16[this._pos2+0]=e},n.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},n.anchorY.set=function(e){this._structArray.int16[this._pos2+1]=e},n.rightJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+2]},n.rightJustifiedTextSymbolIndex.set=function(e){this._structArray.int16[this._pos2+2]=e},n.centerJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+3]},n.centerJustifiedTextSymbolIndex.set=function(e){this._structArray.int16[this._pos2+3]=e},n.leftJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+4]},n.leftJustifiedTextSymbolIndex.set=function(e){this._structArray.int16[this._pos2+4]=e},n.verticalPlacedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+5]},n.verticalPlacedTextSymbolIndex.set=function(e){this._structArray.int16[this._pos2+5]=e},n.placedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+6]},n.placedIconSymbolIndex.set=function(e){this._structArray.int16[this._pos2+6]=e},n.verticalPlacedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+7]},n.verticalPlacedIconSymbolIndex.set=function(e){this._structArray.int16[this._pos2+7]=e},n.key.get=function(){return this._structArray.uint16[this._pos2+8]},n.key.set=function(e){this._structArray.uint16[this._pos2+8]=e},n.textBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+9]},n.textBoxStartIndex.set=function(e){this._structArray.uint16[this._pos2+9]=e},n.textBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+10]},n.textBoxEndIndex.set=function(e){this._structArray.uint16[this._pos2+10]=e},n.verticalTextBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+11]},n.verticalTextBoxStartIndex.set=function(e){this._structArray.uint16[this._pos2+11]=e},n.verticalTextBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+12]},n.verticalTextBoxEndIndex.set=function(e){this._structArray.uint16[this._pos2+12]=e},n.iconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+13]},n.iconBoxStartIndex.set=function(e){this._structArray.uint16[this._pos2+13]=e},n.iconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+14]},n.iconBoxEndIndex.set=function(e){this._structArray.uint16[this._pos2+14]=e},n.verticalIconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+15]},n.verticalIconBoxStartIndex.set=function(e){this._structArray.uint16[this._pos2+15]=e},n.verticalIconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+16]},n.verticalIconBoxEndIndex.set=function(e){this._structArray.uint16[this._pos2+16]=e},n.featureIndex.get=function(){return this._structArray.uint16[this._pos2+17]},n.featureIndex.set=function(e){this._structArray.uint16[this._pos2+17]=e},n.numHorizontalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+18]},n.numHorizontalGlyphVertices.set=function(e){this._structArray.uint16[this._pos2+18]=e},n.numVerticalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+19]},n.numVerticalGlyphVertices.set=function(e){this._structArray.uint16[this._pos2+19]=e},n.numIconVertices.get=function(){return this._structArray.uint16[this._pos2+20]},n.numIconVertices.set=function(e){this._structArray.uint16[this._pos2+20]=e},n.numVerticalIconVertices.get=function(){return this._structArray.uint16[this._pos2+21]},n.numVerticalIconVertices.set=function(e){this._structArray.uint16[this._pos2+21]=e},n.crossTileID.get=function(){return this._structArray.uint32[this._pos4+11]},n.crossTileID.set=function(e){this._structArray.uint32[this._pos4+11]=e},n.textBoxScale.get=function(){return this._structArray.float32[this._pos4+12]},n.textBoxScale.set=function(e){this._structArray.float32[this._pos4+12]=e},n.textOffset0.get=function(){return this._structArray.float32[this._pos4+13]},n.textOffset0.set=function(e){this._structArray.float32[this._pos4+13]=e},n.textOffset1.get=function(){return this._structArray.float32[this._pos4+14]},n.textOffset1.set=function(e){this._structArray.float32[this._pos4+14]=e},Object.defineProperties(t.prototype,n),t}(ta);Oa.prototype.size=60;var Ma=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.get=function(e){return new Oa(this,e)},t}(ma);yr("SymbolInstanceArray",Ma);var ka=function(e){function t(){e.apply(this,arguments)}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={offsetX:{configurable:!0}};return n.offsetX.get=function(){return this._structArray.float32[this._pos4+0]},n.offsetX.set=function(e){this._structArray.float32[this._pos4+0]=e},Object.defineProperties(t.prototype,n),t}(ta);ka.prototype.size=4;var Da=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getoffsetX=function(e){return this.float32[1*e+0]},t.prototype.get=function(e){return new ka(this,e)},t}(ya);yr("GlyphOffsetArray",Da);var Ia=function(e){function t(){e.apply(this,arguments)}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={x:{configurable:!0},y:{configurable:!0},tileUnitDistanceFromAnchor:{configurable:!0}};return n.x.get=function(){return this._structArray.int16[this._pos2+0]},n.x.set=function(e){this._structArray.int16[this._pos2+0]=e},n.y.get=function(){return this._structArray.int16[this._pos2+1]},n.y.set=function(e){this._structArray.int16[this._pos2+1]=e},n.tileUnitDistanceFromAnchor.get=function(){return this._structArray.int16[this._pos2+2]},n.tileUnitDistanceFromAnchor.set=function(e){this._structArray.int16[this._pos2+2]=e},Object.defineProperties(t.prototype,n),t}(ta);Ia.prototype.size=6;var La=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getx=function(e){return this.int16[3*e+0]},t.prototype.gety=function(e){return this.int16[3*e+1]},t.prototype.gettileUnitDistanceFromAnchor=function(e){return this.int16[3*e+2]},t.prototype.get=function(e){return new Ia(this,e)},t}(ba);yr("SymbolLineVertexArray",La);var ja=function(e){function t(){e.apply(this,arguments)}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={featureIndex:{configurable:!0},sourceLayerIndex:{configurable:!0},bucketIndex:{configurable:!0}};return n.featureIndex.get=function(){return this._structArray.uint32[this._pos4+0]},n.featureIndex.set=function(e){this._structArray.uint32[this._pos4+0]=e},n.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+2]},n.sourceLayerIndex.set=function(e){this._structArray.uint16[this._pos2+2]=e},n.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+3]},n.bucketIndex.set=function(e){this._structArray.uint16[this._pos2+3]=e},Object.defineProperties(t.prototype,n),t}(ta);ja.prototype.size=8;var Fa=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.get=function(e){return new ja(this,e)},t}(_a);yr("FeatureIndexArray",Fa);var za=ra([{name:"a_pos",components:2,type:"Int16"}],4).members,Na=function(e){void 0===e&&(e=[]),this.segments=e};function Ba(e,t){return 256*(e=c(Math.floor(e),0,255))+c(Math.floor(t),0,255)}Na.prototype.prepareSegment=function(e,t,n,r){var a=this.segments[this.segments.length-1];return e>Na.MAX_VERTEX_ARRAY_LENGTH&&R("Max vertices per segment is "+Na.MAX_VERTEX_ARRAY_LENGTH+": bucket requested "+e),(!a||a.vertexLength+e>Na.MAX_VERTEX_ARRAY_LENGTH||a.sortKey!==r)&&(a={vertexOffset:t.length,primitiveOffset:n.length,vertexLength:0,primitiveLength:0},void 0!==r&&(a.sortKey=r),this.segments.push(a)),a},Na.prototype.get=function(){return this.segments},Na.prototype.destroy=function(){for(var e=0,t=this.segments;e>1;this.ids[r]>=e?n=r:t=r+1}for(var a=[];this.ids[t]===e;){var i=this.positions[3*t],o=this.positions[3*t+1],s=this.positions[3*t+2];a.push({index:i,start:o,end:s}),t++}return a},Va.serialize=function(e,t){var n=new Float64Array(e.ids),r=new Uint32Array(e.positions);return function e(t,n,r,a){if(!(r>=a)){for(var i=t[r+a>>1],o=r-1,s=a+1;;){do{o++}while(t[o]i);if(o>=s)break;Ha(t,o,s),Ha(n,3*o,3*s),Ha(n,3*o+1,3*s+1),Ha(n,3*o+2,3*s+2)}e(t,n,r,s),e(t,n,s+1,a)}}(n,r,0,n.length-1),t.push(n.buffer,r.buffer),{ids:n,positions:r}},Va.deserialize=function(e){var t=new Va;return t.ids=e.ids,t.positions=e.positions,t.indexed=!0,t},yr("FeaturePositionMap",Va);var Ua=function(e,t){this.gl=e.gl,this.location=t},Wa=function(e){function t(t,n){e.call(this,t,n),this.current=0}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.set=function(e){this.current!==e&&(this.current=e,this.gl.uniform1i(this.location,e))},t}(Ua),qa=function(e){function t(t,n){e.call(this,t,n),this.current=0}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.set=function(e){this.current!==e&&(this.current=e,this.gl.uniform1f(this.location,e))},t}(Ua),Ga=function(e){function t(t,n){e.call(this,t,n),this.current=[0,0]}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.set=function(e){e[0]===this.current[0]&&e[1]===this.current[1]||(this.current=e,this.gl.uniform2f(this.location,e[0],e[1]))},t}(Ua),Ka=function(e){function t(t,n){e.call(this,t,n),this.current=[0,0,0]}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.set=function(e){e[0]===this.current[0]&&e[1]===this.current[1]&&e[2]===this.current[2]||(this.current=e,this.gl.uniform3f(this.location,e[0],e[1],e[2]))},t}(Ua),Ya=function(e){function t(t,n){e.call(this,t,n),this.current=[0,0,0,0]}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.set=function(e){e[0]===this.current[0]&&e[1]===this.current[1]&&e[2]===this.current[2]&&e[3]===this.current[3]||(this.current=e,this.gl.uniform4f(this.location,e[0],e[1],e[2],e[3]))},t}(Ua),Xa=function(e){function t(t,n){e.call(this,t,n),this.current=Ke.transparent}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.set=function(e){e.r===this.current.r&&e.g===this.current.g&&e.b===this.current.b&&e.a===this.current.a||(this.current=e,this.gl.uniform4f(this.location,e.r,e.g,e.b,e.a))},t}(Ua),Ja=new Float32Array(16),Za=function(e){function t(t,n){e.call(this,t,n),this.current=Ja}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.set=function(e){if(e[12]!==this.current[12]||e[0]!==this.current[0])return this.current=e,void this.gl.uniformMatrix4fv(this.location,!1,e);for(var t=1;t<16;t++)if(e[t]!==this.current[t]){this.current=e,this.gl.uniformMatrix4fv(this.location,!1,e);break}},t}(Ua);function $a(e){return[Ba(255*e.r,255*e.g),Ba(255*e.b,255*e.a)]}var Qa=function(e,t,n){this.value=e,this.names=t,this.uniformNames=this.names.map((function(e){return"u_"+e})),this.type=n,this.maxValue=-1/0};Qa.prototype.defines=function(){return this.names.map((function(e){return"#define HAS_UNIFORM_u_"+e}))},Qa.prototype.setConstantPatternPositions=function(){},Qa.prototype.populatePaintArray=function(){},Qa.prototype.updatePaintArray=function(){},Qa.prototype.upload=function(){},Qa.prototype.destroy=function(){},Qa.prototype.setUniforms=function(e,t,n,r){t.set(r.constantOr(this.value))},Qa.prototype.getBinding=function(e,t){return"color"===this.type?new Xa(e,t):new qa(e,t)},Qa.serialize=function(e){var t=e.value,n=e.names,r=e.type;return{value:xr(t),names:n,type:r}},Qa.deserialize=function(e){var t=e.value,n=e.names,r=e.type;return new Qa(Rr(t),n,r)};var ei=function(e,t,n){this.value=e,this.names=t,this.uniformNames=this.names.map((function(e){return"u_"+e})),this.type=n,this.maxValue=-1/0,this.patternPositions={patternTo:null,patternFrom:null}};ei.prototype.defines=function(){return this.names.map((function(e){return"#define HAS_UNIFORM_u_"+e}))},ei.prototype.populatePaintArray=function(){},ei.prototype.updatePaintArray=function(){},ei.prototype.upload=function(){},ei.prototype.destroy=function(){},ei.prototype.setConstantPatternPositions=function(e,t){this.patternPositions.patternTo=e.tlbr,this.patternPositions.patternFrom=t.tlbr},ei.prototype.setUniforms=function(e,t,n,r,a){var i=this.patternPositions;"u_pattern_to"===a&&i.patternTo&&t.set(i.patternTo),"u_pattern_from"===a&&i.patternFrom&&t.set(i.patternFrom)},ei.prototype.getBinding=function(e,t){return new Ya(e,t)};var ti=function(e,t,n,r){this.expression=e,this.names=t,this.type=n,this.uniformNames=this.names.map((function(e){return"a_"+e})),this.maxValue=-1/0,this.paintVertexAttributes=t.map((function(e){return{name:"a_"+e,type:"Float32",components:"color"===n?2:1,offset:0}})),this.paintVertexArray=new r};ti.prototype.defines=function(){return[]},ti.prototype.setConstantPatternPositions=function(){},ti.prototype.populatePaintArray=function(e,t,n,r){var a=this.paintVertexArray,i=a.length;a.reserve(e);var o=this.expression.evaluate(new zr(0),t,{},[],r);if("color"===this.type)for(var s=$a(o),u=i;uci.max||o.yci.max)&&(R("Geometry exceeds allowed extent, reduce your vector tile buffer size"),o.x=c(o.x,ci.min,ci.max),o.y=c(o.y,ci.min,ci.max))}return n}function di(e,t,n,r,a){e.emplaceBack(2*t+(r+1)/2,2*n+(a+1)/2)}var fi=function(e){this.zoom=e.zoom,this.overscaling=e.overscaling,this.layers=e.layers,this.layerIds=this.layers.map((function(e){return e.id})),this.index=e.index,this.hasPattern=!1,this.layoutVertexArray=new ia,this.indexArray=new xa,this.segments=new Na,this.programConfigurations=new ii(za,e.layers,e.zoom),this.stateDependentLayerIds=this.layers.filter((function(e){return e.isStateDependent()})).map((function(e){return e.id}))};function pi(e,t){for(var n=0;n1){if(mi(e,t))return!0;for(var r=0;r1?e.distSqr(n):e.distSqr(n.sub(t)._mult(a)._add(t))}function xi(e,t){for(var n,r,a,i=!1,o=0;ot.y!=a.y>t.y&&t.x<(a.x-r.x)*(t.y-r.y)/(a.y-r.y)+r.x&&(i=!i);return i}function Ri(e,t){for(var n=!1,r=0,a=e.length-1;rt.y!=o.y>t.y&&t.x<(o.x-i.x)*(t.y-i.y)/(o.y-i.y)+i.x&&(n=!n)}return n}function wi(e,t,n){var r=n[0],a=n[2];if(e.xa.x&&t.x>a.x||e.ya.y&&t.y>a.y)return!1;var i=w(e,t,n[0]);return i!==w(e,t,n[1])||i!==w(e,t,n[2])||i!==w(e,t,n[3])}function Ei(e,t,n){var r=t.paint.get(e).value;return"constant"===r.kind?r.value:n.programConfigurations.get(t.id).binders[e].maxValue}function Si(e){return Math.sqrt(e[0]*e[0]+e[1]*e[1])}function Ai(e,t,n,r,i){if(!t[0]&&!t[1])return e;var o=a.convert(t)._mult(i);"viewport"===n&&o._rotate(-r);for(var s=[],u=0;u=ui||c<0||c>=ui)){var l=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray,e.sortKey),d=l.vertexLength;di(this.layoutVertexArray,u,c,-1,-1),di(this.layoutVertexArray,u,c,1,-1),di(this.layoutVertexArray,u,c,1,1),di(this.layoutVertexArray,u,c,-1,1),this.indexArray.emplaceBack(d,d+1,d+2),this.indexArray.emplaceBack(d,d+3,d+2),l.vertexLength+=4,l.primitiveLength+=2}}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,e,n,{})},yr("CircleBucket",fi,{omit:["layers"]});var Ti,Pi=new $r({"circle-sort-key":new Yr(we.layout_circle["circle-sort-key"])}),Ci={paint:new $r({"circle-radius":new Yr(we.paint_circle["circle-radius"]),"circle-color":new Yr(we.paint_circle["circle-color"]),"circle-blur":new Yr(we.paint_circle["circle-blur"]),"circle-opacity":new Yr(we.paint_circle["circle-opacity"]),"circle-translate":new Kr(we.paint_circle["circle-translate"]),"circle-translate-anchor":new Kr(we.paint_circle["circle-translate-anchor"]),"circle-pitch-scale":new Kr(we.paint_circle["circle-pitch-scale"]),"circle-pitch-alignment":new Kr(we.paint_circle["circle-pitch-alignment"]),"circle-stroke-width":new Yr(we.paint_circle["circle-stroke-width"]),"circle-stroke-color":new Yr(we.paint_circle["circle-stroke-color"]),"circle-stroke-opacity":new Yr(we.paint_circle["circle-stroke-opacity"])}),layout:Pi},Oi="undefined"!=typeof Float32Array?Float32Array:Array;function Mi(e,t,n){var r=t[0],a=t[1],i=t[2],o=t[3];return e[0]=n[0]*r+n[4]*a+n[8]*i+n[12]*o,e[1]=n[1]*r+n[5]*a+n[9]*i+n[13]*o,e[2]=n[2]*r+n[6]*a+n[10]*i+n[14]*o,e[3]=n[3]*r+n[7]*a+n[11]*i+n[15]*o,e}Math.hypot||(Math.hypot=function(){for(var e=arguments,t=0,n=arguments.length;n--;)t+=e[n]*e[n];return Math.sqrt(t)}),Ti=new Oi(3),Oi!=Float32Array&&(Ti[0]=0,Ti[1]=0,Ti[2]=0),function(){var e=new Oi(4);Oi!=Float32Array&&(e[0]=0,e[1]=0,e[2]=0,e[3]=0)}();var ki=function(e){function t(t){e.call(this,t,Ci)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.createBucket=function(e){return new fi(e)},t.prototype.queryRadius=function(e){var t=e;return Ei("circle-radius",this,t)+Ei("circle-stroke-width",this,t)+Si(this.paint.get("circle-translate"))},t.prototype.queryIntersectsFeature=function(e,t,n,r,a,i,o,s){for(var u=Ai(e,this.paint.get("circle-translate"),this.paint.get("circle-translate-anchor"),i.angle,o),c=this.paint.get("circle-radius").evaluate(t,n)+this.paint.get("circle-stroke-width").evaluate(t,n),l="map"===this.paint.get("circle-pitch-alignment"),d=l?u:function(e,t){return e.map((function(e){return Di(e,t)}))}(u,s),f=l?c*o:c,p=0,h=r;pe.width||a.height>e.height||n.x>e.width-a.width||n.y>e.height-a.height)throw new RangeError("out of range source coordinates for image copy");if(a.width>t.width||a.height>t.height||r.x>t.width-a.width||r.y>t.height-a.height)throw new RangeError("out of range destination coordinates for image copy");for(var o=e.data,s=t.data,u=0;u80*n){r=i=e[0],a=o=e[1];for(var h=n;hi&&(i=s),u>o&&(o=u);c=0!==(c=Math.max(i-r,o-a))?1/c:0}return Zi(f,p,n,r,a,c),p}function Xi(e,t,n,r,a){var i,o;if(a===_o(e,t,n,r)>0)for(i=t;i=t;i-=r)o=mo(i,e[i],e[i+1],o);return o&&lo(o,o.next)&&(yo(o),o=o.next),o}function Ji(e,t){if(!e)return e;t||(t=e);var n,r=e;do{if(n=!1,r.steiner||!lo(r,r.next)&&0!==co(r.prev,r,r.next))r=r.next;else{if(yo(r),(r=t=r.prev)===r.next)break;n=!0}}while(n||r!==t);return t}function Zi(e,t,n,r,a,i,o){if(e){!o&&i&&function(e,t,n,r){var a=e;do{null===a.z&&(a.z=io(a.x,a.y,t,n,r)),a.prevZ=a.prev,a.nextZ=a.next,a=a.next}while(a!==e);a.prevZ.nextZ=null,a.prevZ=null,function(e){var t,n,r,a,i,o,s,u,c=1;do{for(n=e,e=null,i=null,o=0;n;){for(o++,r=n,s=0,t=0;t0||u>0&&r;)0!==s&&(0===u||!r||n.z<=r.z)?(a=n,n=n.nextZ,s--):(a=r,r=r.nextZ,u--),i?i.nextZ=a:e=a,a.prevZ=i,i=a;n=r}i.nextZ=null,c*=2}while(o>1)}(a)}(e,r,a,i);for(var s,u,c=e;e.prev!==e.next;)if(s=e.prev,u=e.next,i?Qi(e,r,a,i):$i(e))t.push(s.i/n),t.push(e.i/n),t.push(u.i/n),yo(e),e=u.next,c=u.next;else if((e=u)===c){o?1===o?Zi(e=eo(Ji(e),t,n),t,n,r,a,i,2):2===o&&to(e,t,n,r,a,i):Zi(Ji(e),t,n,r,a,i,1);break}}}function $i(e){var t=e.prev,n=e,r=e.next;if(co(t,n,r)>=0)return!1;for(var a=e.next.next;a!==e.prev;){if(so(t.x,t.y,n.x,n.y,r.x,r.y,a.x,a.y)&&co(a.prev,a,a.next)>=0)return!1;a=a.next}return!0}function Qi(e,t,n,r){var a=e.prev,i=e,o=e.next;if(co(a,i,o)>=0)return!1;for(var s=a.xi.x?a.x>o.x?a.x:o.x:i.x>o.x?i.x:o.x,l=a.y>i.y?a.y>o.y?a.y:o.y:i.y>o.y?i.y:o.y,d=io(s,u,t,n,r),f=io(c,l,t,n,r),p=e.prevZ,h=e.nextZ;p&&p.z>=d&&h&&h.z<=f;){if(p!==e.prev&&p!==e.next&&so(a.x,a.y,i.x,i.y,o.x,o.y,p.x,p.y)&&co(p.prev,p,p.next)>=0)return!1;if(p=p.prevZ,h!==e.prev&&h!==e.next&&so(a.x,a.y,i.x,i.y,o.x,o.y,h.x,h.y)&&co(h.prev,h,h.next)>=0)return!1;h=h.nextZ}for(;p&&p.z>=d;){if(p!==e.prev&&p!==e.next&&so(a.x,a.y,i.x,i.y,o.x,o.y,p.x,p.y)&&co(p.prev,p,p.next)>=0)return!1;p=p.prevZ}for(;h&&h.z<=f;){if(h!==e.prev&&h!==e.next&&so(a.x,a.y,i.x,i.y,o.x,o.y,h.x,h.y)&&co(h.prev,h,h.next)>=0)return!1;h=h.nextZ}return!0}function eo(e,t,n){var r=e;do{var a=r.prev,i=r.next.next;!lo(a,i)&&fo(a,r,r.next,i)&&go(a,i)&&go(i,a)&&(t.push(a.i/n),t.push(r.i/n),t.push(i.i/n),yo(r),yo(r.next),r=e=i),r=r.next}while(r!==e);return Ji(r)}function to(e,t,n,r,a,i){var o=e;do{for(var s=o.next.next;s!==o.prev;){if(o.i!==s.i&&uo(o,s)){var u=vo(o,s);return o=Ji(o,o.next),u=Ji(u,u.next),Zi(o,t,n,r,a,i),void Zi(u,t,n,r,a,i)}s=s.next}o=o.next}while(o!==e)}function no(e,t){return e.x-t.x}function ro(e,t){if(t=function(e,t){var n,r=t,a=e.x,i=e.y,o=-1/0;do{if(i<=r.y&&i>=r.next.y&&r.next.y!==r.y){var s=r.x+(i-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(s<=a&&s>o){if(o=s,s===a){if(i===r.y)return r;if(i===r.next.y)return r.next}n=r.x=r.x&&r.x>=l&&a!==r.x&&so(in.x||r.x===n.x&&ao(n,r)))&&(n=r,f=u)),r=r.next}while(r!==c);return n}(e,t)){var n=vo(t,e);Ji(n,n.next)}}function ao(e,t){return co(e.prev,e,t.prev)<0&&co(t.next,e,e.next)<0}function io(e,t,n,r,a){return(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-n)*a)|e<<8))|e<<4))|e<<2))|e<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-r)*a)|t<<8))|t<<4))|t<<2))|t<<1))<<1}function oo(e){var t=e,n=e;do{(t.x=0&&(e-o)*(r-s)-(n-o)*(t-s)>=0&&(n-o)*(i-s)-(a-o)*(r-s)>=0}function uo(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!function(e,t){var n=e;do{if(n.i!==e.i&&n.next.i!==e.i&&n.i!==t.i&&n.next.i!==t.i&&fo(n,n.next,e,t))return!0;n=n.next}while(n!==e);return!1}(e,t)&&(go(e,t)&&go(t,e)&&function(e,t){var n=e,r=!1,a=(e.x+t.x)/2,i=(e.y+t.y)/2;do{n.y>i!=n.next.y>i&&n.next.y!==n.y&&a<(n.next.x-n.x)*(i-n.y)/(n.next.y-n.y)+n.x&&(r=!r),n=n.next}while(n!==e);return r}(e,t)&&(co(e.prev,e,t.prev)||co(e,t.prev,t))||lo(e,t)&&co(e.prev,e,e.next)>0&&co(t.prev,t,t.next)>0)}function co(e,t,n){return(t.y-e.y)*(n.x-t.x)-(t.x-e.x)*(n.y-t.y)}function lo(e,t){return e.x===t.x&&e.y===t.y}function fo(e,t,n,r){var a=ho(co(e,t,n)),i=ho(co(e,t,r)),o=ho(co(n,r,e)),s=ho(co(n,r,t));return a!==i&&o!==s||!(0!==a||!po(e,n,t))||!(0!==i||!po(e,r,t))||!(0!==o||!po(n,e,r))||!(0!==s||!po(n,t,r))}function po(e,t,n){return t.x<=Math.max(e.x,n.x)&&t.x>=Math.min(e.x,n.x)&&t.y<=Math.max(e.y,n.y)&&t.y>=Math.min(e.y,n.y)}function ho(e){return e>0?1:e<0?-1:0}function go(e,t){return co(e.prev,e,e.next)<0?co(e,t,e.next)>=0&&co(e,e.prev,t)>=0:co(e,t,e.prev)<0||co(e,e.next,t)<0}function vo(e,t){var n=new bo(e.i,e.x,e.y),r=new bo(t.i,t.x,t.y),a=e.next,i=t.prev;return e.next=t,t.prev=e,n.next=a,a.prev=n,r.next=n,n.prev=r,i.next=r,r.prev=i,r}function mo(e,t,n,r){var a=new bo(e,t,n);return r?(a.next=r.next,a.prev=r,r.next.prev=a,r.next=a):(a.prev=a,a.next=a),a}function yo(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function bo(e,t,n){this.i=e,this.x=t,this.y=n,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function _o(e,t,n,r){for(var a=0,i=t,o=n-r;ir;){if(a-r>600){var o=a-r+1,s=n-r+1,u=Math.log(o),c=.5*Math.exp(2*u/3),l=.5*Math.sqrt(u*c*(o-c)/o)*(s-o/2<0?-1:1);e(t,n,Math.max(r,Math.floor(n-s*c/o+l)),Math.min(a,Math.floor(n+(o-s)*c/o+l)),i)}var d=t[n],f=r,p=a;for(Ro(t,r,n),i(t[a],d)>0&&Ro(t,r,a);f0;)p--}0===i(t[r],d)?Ro(t,r,p):Ro(t,++p,a),p<=n&&(r=p+1),n<=p&&(a=p-1)}}(e,t,n||0,r||e.length-1,a||wo)}function Ro(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function wo(e,t){return et?1:0}function Eo(e,t){var n=e.length;if(n<=1)return[e];for(var r,a,i=[],o=0;o1)for(var u=0;u0&&(r+=e[a-1].length,n.holes.push(r))}return n},Gi.default=Ki;var Po=function(e){this.zoom=e.zoom,this.overscaling=e.overscaling,this.layers=e.layers,this.layerIds=this.layers.map((function(e){return e.id})),this.index=e.index,this.hasPattern=!1,this.patternFeatures=[],this.layoutVertexArray=new ia,this.indexArray=new xa,this.indexArray2=new Ra,this.programConfigurations=new ii(qi,e.layers,e.zoom),this.segments=new Na,this.segments2=new Na,this.stateDependentLayerIds=this.layers.filter((function(e){return e.isStateDependent()})).map((function(e){return e.id}))};Po.prototype.populate=function(e,t){this.hasPattern=Ao("fill",this.layers,t);for(var n=this.layers[0].layout.get("fill-sort-key"),r=[],a=0,i=e;a>3}if(i--,1===r||2===r)o+=e.readSVarint(),s+=e.readSVarint(),1===r&&(t&&u.push(t),t=[]),t.push(new a(o,s));else{if(7!==r)throw new Error("unknown command "+r);t&&t.push(t[0].clone())}}return t&&u.push(t),u},Io.prototype.bbox=function(){var e=this._pbf;e.pos=this._geometry;for(var t=e.readVarint()+e.pos,n=1,r=0,a=0,i=0,o=1/0,s=-1/0,u=1/0,c=-1/0;e.pos>3}if(r--,1===n||2===n)(a+=e.readSVarint())s&&(s=a),(i+=e.readSVarint())c&&(c=i);else if(7!==n)throw new Error("unknown command "+n)}return[o,u,s,c]},Io.prototype.toGeoJSON=function(e,t,n){var r,a,i=this.extent*Math.pow(2,n),o=this.extent*e,s=this.extent*t,u=this.loadGeometry(),c=Io.types[this.type];function l(e){for(var t=0;t>3;t=1===r?e.readString():2===r?e.readFloat():3===r?e.readDouble():4===r?e.readVarint64():5===r?e.readVarint():6===r?e.readSVarint():7===r?e.readBoolean():null}return t}(n))}function Bo(e,t,n){if(3===e){var r=new Fo(n,n.readVarint()+n.pos);r.length&&(t[r.name]=r)}}zo.prototype.feature=function(e){if(e<0||e>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[e];var t=this._pbf.readVarint()+this._pbf.pos;return new Do(this._pbf,t,this.extent,this._keys,this._values)};var Vo={VectorTile:function(e,t){this.layers=e.readFields(Bo,{},t)},VectorTileFeature:Do,VectorTileLayer:Fo},Ho=Vo.VectorTileFeature.types,Uo=Math.pow(2,13);function Wo(e,t,n,r,a,i,o,s){e.emplaceBack(t,n,2*Math.floor(r*Uo)+o,a*Uo*2,i*Uo*2,Math.round(s))}var qo=function(e){this.zoom=e.zoom,this.overscaling=e.overscaling,this.layers=e.layers,this.layerIds=this.layers.map((function(e){return e.id})),this.index=e.index,this.hasPattern=!1,this.layoutVertexArray=new sa,this.indexArray=new xa,this.programConfigurations=new ii(ko,e.layers,e.zoom),this.segments=new Na,this.stateDependentLayerIds=this.layers.filter((function(e){return e.isStateDependent()})).map((function(e){return e.id}))};function Go(e,t){return e.x===t.x&&(e.x<0||e.x>ui)||e.y===t.y&&(e.y<0||e.y>ui)}function Ko(e){return e.every((function(e){return e.x<0}))||e.every((function(e){return e.x>ui}))||e.every((function(e){return e.y<0}))||e.every((function(e){return e.y>ui}))}qo.prototype.populate=function(e,t){this.features=[],this.hasPattern=Ao("fill-extrusion",this.layers,t);for(var n=0,r=e;n=1){var m=p[g-1];if(!Go(v,m)){l.vertexLength+4>Na.MAX_VERTEX_ARRAY_LENGTH&&(l=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));var y=v.sub(m)._perp()._unit(),b=m.dist(v);h+b>32768&&(h=0),Wo(this.layoutVertexArray,v.x,v.y,y.x,y.y,0,0,h),Wo(this.layoutVertexArray,v.x,v.y,y.x,y.y,0,1,h),h+=b,Wo(this.layoutVertexArray,m.x,m.y,y.x,y.y,0,0,h),Wo(this.layoutVertexArray,m.x,m.y,y.x,y.y,0,1,h);var _=l.vertexLength;this.indexArray.emplaceBack(_,_+2,_+1),this.indexArray.emplaceBack(_+1,_+2,_+3),l.vertexLength+=4,l.primitiveLength+=2}}}}if(l.vertexLength+s>Na.MAX_VERTEX_ARRAY_LENGTH&&(l=this.segments.prepareSegment(s,this.layoutVertexArray,this.indexArray)),"Polygon"===Ho[e.type]){for(var x=[],R=[],w=l.vertexLength,E=0,S=o;E=2&&e[l-1].equals(e[l-2]);)l--;for(var d=0;d0;if(S&&b>d){var T=f.dist(g);if(T>2*p){var P=f.sub(f.sub(g)._mult(p/T)._round());this.updateDistance(g,P),this.addCurrentVertex(P,m,0,0,h),g=P}}var C=g&&v,O=C?n:c?"butt":r;if(C&&"round"===O&&(wa&&(O="bevel"),"bevel"===O&&(w>2&&(O="flipbevel"),w100)_=y.mult(-1);else{var M=w*m.add(y).mag()/m.sub(y).mag();_._perp()._mult(M*(A?-1:1))}this.addCurrentVertex(f,_,0,0,h),this.addCurrentVertex(f,_.mult(-1),0,0,h)}else if("bevel"===O||"fakeround"===O){var k=-Math.sqrt(w*w-1),D=A?k:0,I=A?0:k;if(g&&this.addCurrentVertex(f,m,D,I,h),"fakeround"===O)for(var L=Math.round(180*E/Math.PI/20),j=1;j2*p){var H=f.add(v.sub(f)._mult(p/V)._round());this.updateDistance(f,H),this.addCurrentVertex(H,y,0,0,h),f=H}}}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,t,o,s)}},ns.prototype.addCurrentVertex=function(e,t,n,r,a,i){void 0===i&&(i=!1);var o=t.x+t.y*n,s=t.y-t.x*n,u=-t.x+t.y*r,c=-t.y-t.x*r;this.addHalfVertex(e,o,s,i,!1,n,a),this.addHalfVertex(e,u,c,i,!0,-r,a),this.distance>ts/2&&0===this.totalDistance&&(this.distance=0,this.addCurrentVertex(e,t,n,r,a,i))},ns.prototype.addHalfVertex=function(e,t,n,r,a,i,o){var s=e.x,u=e.y,c=.5*this.scaledDistance;this.layoutVertexArray.emplaceBack((s<<1)+(r?1:0),(u<<1)+(a?1:0),Math.round(63*t)+128,Math.round(63*n)+128,1+(0===i?0:i<0?-1:1)|(63&c)<<2,c>>6);var l=o.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,this.e2,l),o.primitiveLength++),a?this.e2=l:this.e1=l},ns.prototype.updateDistance=function(e,t){this.distance+=e.dist(t),this.scaledDistance=this.totalDistance>0?(this.clipStart+(this.clipEnd-this.clipStart)*this.distance/this.totalDistance)*(ts-1):this.distance},yr("LineBucket",ns,{omit:["layers","patternFeatures"]});var rs=new $r({"line-cap":new Kr(we.layout_line["line-cap"]),"line-join":new Yr(we.layout_line["line-join"]),"line-miter-limit":new Kr(we.layout_line["line-miter-limit"]),"line-round-limit":new Kr(we.layout_line["line-round-limit"]),"line-sort-key":new Yr(we.layout_line["line-sort-key"])}),as={paint:new $r({"line-opacity":new Yr(we.paint_line["line-opacity"]),"line-color":new Yr(we.paint_line["line-color"]),"line-translate":new Kr(we.paint_line["line-translate"]),"line-translate-anchor":new Kr(we.paint_line["line-translate-anchor"]),"line-width":new Yr(we.paint_line["line-width"]),"line-gap-width":new Yr(we.paint_line["line-gap-width"]),"line-offset":new Yr(we.paint_line["line-offset"]),"line-blur":new Yr(we.paint_line["line-blur"]),"line-dasharray":new Jr(we.paint_line["line-dasharray"]),"line-pattern":new Xr(we.paint_line["line-pattern"]),"line-gradient":new Zr(we.paint_line["line-gradient"])}),layout:rs},is=new(function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.possiblyEvaluate=function(t,n){return n=new zr(Math.floor(n.zoom),{now:n.now,fadeDuration:n.fadeDuration,zoomHistory:n.zoomHistory,transition:n.transition}),e.prototype.possiblyEvaluate.call(this,t,n)},t.prototype.evaluate=function(t,n,r,a){return n=d({},n,{zoom:Math.floor(n.zoom)}),e.prototype.evaluate.call(this,t,n,r,a)},t}(Yr))(as.paint.properties["line-width"].specification);is.useIntegerZoom=!0;var os=function(e){function t(t){e.call(this,t,as)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._handleSpecialPaintPropertyUpdate=function(e){"line-gradient"===e&&this._updateGradient()},t.prototype._updateGradient=function(){var e=this._transitionablePaint._values["line-gradient"].value.expression;this.gradient=Vi(e,"lineProgress"),this.gradientTexture=null},t.prototype.recalculate=function(t,n){e.prototype.recalculate.call(this,t,n),this.paint._values["line-floorwidth"]=is.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,t)},t.prototype.createBucket=function(e){return new ns(e)},t.prototype.queryRadius=function(e){var t=e,n=ss(Ei("line-width",this,t),Ei("line-gap-width",this,t)),r=Ei("line-offset",this,t);return n/2+Math.abs(r)+Si(this.paint.get("line-translate"))},t.prototype.queryIntersectsFeature=function(e,t,n,r,i,o,s){var u=Ai(e,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),o.angle,s),c=s/2*ss(this.paint.get("line-width").evaluate(t,n),this.paint.get("line-gap-width").evaluate(t,n)),l=this.paint.get("line-offset").evaluate(t,n);return l&&(r=function(e,t){for(var n=[],r=new a(0,0),i=0;i=3)for(var i=0;i0?t+2*e:e}var us=ra([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint16"}]),cs=ra([{name:"a_projected_pos",components:3,type:"Float32"}],4),ls=(ra([{name:"a_fade_opacity",components:1,type:"Uint32"}],4),ra([{name:"a_placed",components:2,type:"Uint8"},{name:"a_shift",components:2,type:"Float32"}])),ds=(ra([{type:"Int16",name:"anchorPointX"},{type:"Int16",name:"anchorPointY"},{type:"Int16",name:"x1"},{type:"Int16",name:"y1"},{type:"Int16",name:"x2"},{type:"Int16",name:"y2"},{type:"Uint32",name:"featureIndex"},{type:"Uint16",name:"sourceLayerIndex"},{type:"Uint16",name:"bucketIndex"},{type:"Int16",name:"radius"},{type:"Int16",name:"signedDistanceFromAnchor"}]),ra([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4)),fs=ra([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4);function ps(e,t,n){return e.sections.forEach((function(e){e.text=function(e,t,n){var r=t.layout.get("text-transform").evaluate(n,{});return"uppercase"===r?e=e.toLocaleUpperCase():"lowercase"===r&&(e=e.toLocaleLowerCase()),Fr.applyArabicShaping&&(e=Fr.applyArabicShaping(e)),e}(e.text,t,n)})),e}ra([{type:"Int16",name:"anchorX"},{type:"Int16",name:"anchorY"},{type:"Uint16",name:"glyphStartIndex"},{type:"Uint16",name:"numGlyphs"},{type:"Uint32",name:"vertexStartIndex"},{type:"Uint32",name:"lineStartIndex"},{type:"Uint32",name:"lineLength"},{type:"Uint16",name:"segment"},{type:"Uint16",name:"lowerSize"},{type:"Uint16",name:"upperSize"},{type:"Float32",name:"lineOffsetX"},{type:"Float32",name:"lineOffsetY"},{type:"Uint8",name:"writingMode"},{type:"Uint8",name:"placedOrientation"},{type:"Uint8",name:"hidden"},{type:"Uint32",name:"crossTileID"},{type:"Int16",name:"associatedIconIndex"}]),ra([{type:"Int16",name:"anchorX"},{type:"Int16",name:"anchorY"},{type:"Int16",name:"rightJustifiedTextSymbolIndex"},{type:"Int16",name:"centerJustifiedTextSymbolIndex"},{type:"Int16",name:"leftJustifiedTextSymbolIndex"},{type:"Int16",name:"verticalPlacedTextSymbolIndex"},{type:"Int16",name:"placedIconSymbolIndex"},{type:"Int16",name:"verticalPlacedIconSymbolIndex"},{type:"Uint16",name:"key"},{type:"Uint16",name:"textBoxStartIndex"},{type:"Uint16",name:"textBoxEndIndex"},{type:"Uint16",name:"verticalTextBoxStartIndex"},{type:"Uint16",name:"verticalTextBoxEndIndex"},{type:"Uint16",name:"iconBoxStartIndex"},{type:"Uint16",name:"iconBoxEndIndex"},{type:"Uint16",name:"verticalIconBoxStartIndex"},{type:"Uint16",name:"verticalIconBoxEndIndex"},{type:"Uint16",name:"featureIndex"},{type:"Uint16",name:"numHorizontalGlyphVertices"},{type:"Uint16",name:"numVerticalGlyphVertices"},{type:"Uint16",name:"numIconVertices"},{type:"Uint16",name:"numVerticalIconVertices"},{type:"Uint32",name:"crossTileID"},{type:"Float32",name:"textBoxScale"},{type:"Float32",components:2,name:"textOffset"}]),ra([{type:"Float32",name:"offsetX"}]),ra([{type:"Int16",name:"x"},{type:"Int16",name:"y"},{type:"Int16",name:"tileUnitDistanceFromAnchor"}]);var hs={"!":"︕","#":"#",$:"$","%":"%","&":"&","(":"︵",")":"︶","*":"*","+":"+",",":"︐","-":"︲",".":"・","/":"/",":":"︓",";":"︔","<":"︿","=":"=",">":"﹀","?":"︖","@":"@","[":"﹇","\\":"\","]":"﹈","^":"^",_:"︳","`":"`","{":"︷","|":"―","}":"︸","~":"~","¢":"¢","£":"£","¥":"¥","¦":"¦","¬":"¬","¯":" ̄","–":"︲","—":"︱","‘":"﹃","’":"﹄","“":"﹁","”":"﹂","…":"︙","‧":"・","₩":"₩","、":"︑","。":"︒","〈":"︿","〉":"﹀","《":"︽","》":"︾","「":"﹁","」":"﹂","『":"﹃","』":"﹄","【":"︻","】":"︼","〔":"︹","〕":"︺","〖":"︗","〗":"︘","!":"︕","(":"︵",")":"︶",",":"︐","-":"︲",".":"・",":":"︓",";":"︔","<":"︿",">":"﹀","?":"︖","[":"﹇","]":"﹈","_":"︳","{":"︷","|":"―","}":"︸","⦅":"︵","⦆":"︶","。":"︒","「":"﹁","」":"﹂"},gs=24,vs={horizontal:1,vertical:2,horizontalOnly:3},ms=function(){this.text="",this.sectionIndex=[],this.sections=[]};function ys(e,t,n,r,a,i,o,s,u,c,l,d){var f,p=ms.fromFeature(e,n);c===vs.vertical&&p.verticalizePunctuation();var h=Fr.processBidirectionalText,g=Fr.processStyledBidirectionalText;if(h&&1===p.sections.length){f=[];for(var v=0,m=h(p.toString(),Es(p,s,r,t,d));v=0&&r>=e&&bs[this.text.charCodeAt(r)];r--)n--;this.text=this.text.substring(e,n),this.sectionIndex=this.sectionIndex.slice(e,n)},ms.prototype.substring=function(e,t){var n=new ms;return n.text=this.text.substring(e,t),n.sectionIndex=this.sectionIndex.slice(e,t),n.sections=this.sections,n},ms.prototype.toString=function(){return this.text},ms.prototype.getMaxScale=function(){var e=this;return this.sectionIndex.reduce((function(t,n){return Math.max(t,e.sections[n].scale)}),0)};var bs={9:!0,10:!0,11:!0,12:!0,13:!0,32:!0},_s={};function xs(e,t,n,r){var a=Math.pow(e-t,2);return r?e=0,c=0,l=0;l0)&&("constant"!==a.value.kind||a.value.value.length>0),u=("constant"!==o.value.kind||!!o.value.value)&&Object.keys(o.parameters).length>0,c=r.get("symbol-sort-key");if(this.features=[],s||u){for(var l=t.iconDependencies,d=t.glyphDependencies,f=t.availableImages,p=new zr(this.zoom),h=0,g=e;h=0;for(var P=0,C=_.sections;P=0;s--)i[s]={x:t[s].x,y:t[s].y,tileUnitDistanceFromAnchor:a},s>0&&(a+=t[s-1].dist(t[s]));for(var u=0;u0;this.addCollisionDebugVertices(o,s,u,c,l?r?this.textCollisionCircle:this.iconCollisionCircle:r?this.textCollisionBox:this.iconCollisionBox,i.anchorPoint,n,l)}},Bs.prototype.generateCollisionDebugBuffers=function(){for(var e=0;e0},Bs.prototype.hasIconData=function(){return this.icon.segments.get().length>0},Bs.prototype.hasTextCollisionBoxData=function(){return this.textCollisionBox.segments.get().length>0},Bs.prototype.hasIconCollisionBoxData=function(){return this.iconCollisionBox.segments.get().length>0},Bs.prototype.hasTextCollisionCircleData=function(){return this.textCollisionCircle.segments.get().length>0},Bs.prototype.hasIconCollisionCircleData=function(){return this.iconCollisionCircle.segments.get().length>0},Bs.prototype.addIndicesForPlacedTextSymbol=function(e){for(var t=this.text.placedSymbolArray.get(e),n=t.vertexStartIndex+4*t.numGlyphs,r=t.vertexStartIndex;r1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(e),this.sortedAngle=e,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(var n=0,r=this.symbolInstanceIndexes;n=0&&r.indexOf(e)===n&&t.addIndicesForPlacedTextSymbol(e)})),i.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedTextSymbol(i.verticalPlacedTextSymbolIndex),i.placedIconSymbolIndex>=0&&this.addIndicesForPlacedIconSymbol(i.placedIconSymbolIndex),i.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedIconSymbol(i.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}},yr("SymbolBucket",Bs,{omit:["layers","collisionBoxArray","features","compareText"]}),Bs.MAX_GLYPHS=65535,Bs.addDynamicAttributes=Fs;var Vs=new $r({"symbol-placement":new Kr(we.layout_symbol["symbol-placement"]),"symbol-spacing":new Kr(we.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new Kr(we.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new Yr(we.layout_symbol["symbol-sort-key"]),"symbol-z-order":new Kr(we.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new Kr(we.layout_symbol["icon-allow-overlap"]),"icon-ignore-placement":new Kr(we.layout_symbol["icon-ignore-placement"]),"icon-optional":new Kr(we.layout_symbol["icon-optional"]),"icon-rotation-alignment":new Kr(we.layout_symbol["icon-rotation-alignment"]),"icon-size":new Yr(we.layout_symbol["icon-size"]),"icon-text-fit":new Kr(we.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new Kr(we.layout_symbol["icon-text-fit-padding"]),"icon-image":new Yr(we.layout_symbol["icon-image"]),"icon-rotate":new Yr(we.layout_symbol["icon-rotate"]),"icon-padding":new Kr(we.layout_symbol["icon-padding"]),"icon-keep-upright":new Kr(we.layout_symbol["icon-keep-upright"]),"icon-offset":new Yr(we.layout_symbol["icon-offset"]),"icon-anchor":new Yr(we.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new Kr(we.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new Kr(we.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new Kr(we.layout_symbol["text-rotation-alignment"]),"text-field":new Yr(we.layout_symbol["text-field"]),"text-font":new Yr(we.layout_symbol["text-font"]),"text-size":new Yr(we.layout_symbol["text-size"]),"text-max-width":new Yr(we.layout_symbol["text-max-width"]),"text-line-height":new Kr(we.layout_symbol["text-line-height"]),"text-letter-spacing":new Yr(we.layout_symbol["text-letter-spacing"]),"text-justify":new Yr(we.layout_symbol["text-justify"]),"text-radial-offset":new Yr(we.layout_symbol["text-radial-offset"]),"text-variable-anchor":new Kr(we.layout_symbol["text-variable-anchor"]),"text-anchor":new Yr(we.layout_symbol["text-anchor"]),"text-max-angle":new Kr(we.layout_symbol["text-max-angle"]),"text-writing-mode":new Kr(we.layout_symbol["text-writing-mode"]),"text-rotate":new Yr(we.layout_symbol["text-rotate"]),"text-padding":new Kr(we.layout_symbol["text-padding"]),"text-keep-upright":new Kr(we.layout_symbol["text-keep-upright"]),"text-transform":new Yr(we.layout_symbol["text-transform"]),"text-offset":new Yr(we.layout_symbol["text-offset"]),"text-allow-overlap":new Kr(we.layout_symbol["text-allow-overlap"]),"text-ignore-placement":new Kr(we.layout_symbol["text-ignore-placement"]),"text-optional":new Kr(we.layout_symbol["text-optional"])}),Hs={paint:new $r({"icon-opacity":new Yr(we.paint_symbol["icon-opacity"]),"icon-color":new Yr(we.paint_symbol["icon-color"]),"icon-halo-color":new Yr(we.paint_symbol["icon-halo-color"]),"icon-halo-width":new Yr(we.paint_symbol["icon-halo-width"]),"icon-halo-blur":new Yr(we.paint_symbol["icon-halo-blur"]),"icon-translate":new Kr(we.paint_symbol["icon-translate"]),"icon-translate-anchor":new Kr(we.paint_symbol["icon-translate-anchor"]),"text-opacity":new Yr(we.paint_symbol["text-opacity"]),"text-color":new Yr(we.paint_symbol["text-color"],{runtimeType:je,getOverride:function(e){return e.textColor},hasOverride:function(e){return!!e.textColor}}),"text-halo-color":new Yr(we.paint_symbol["text-halo-color"]),"text-halo-width":new Yr(we.paint_symbol["text-halo-width"]),"text-halo-blur":new Yr(we.paint_symbol["text-halo-blur"]),"text-translate":new Kr(we.paint_symbol["text-translate"]),"text-translate-anchor":new Kr(we.paint_symbol["text-translate-anchor"])}),layout:Vs},Us=function(e){this.type=e.property.overrides?e.property.overrides.runtimeType:ke,this.defaultValue=e};Us.prototype.evaluate=function(e){if(e.formattedSection){var t=this.defaultValue.property.overrides;if(t&&t.hasOverride(e.formattedSection))return t.getOverride(e.formattedSection)}return e.feature&&e.featureState?this.defaultValue.evaluate(e.feature,e.featureState):this.defaultValue.property.specification.default},Us.prototype.eachChild=function(e){this.defaultValue.isConstant()||e(this.defaultValue.value._styleExpression.expression)},Us.prototype.possibleOutputs=function(){return[void 0]},Us.prototype.serialize=function(){return null},yr("FormatSectionOverride",Us,{omit:["defaultValue"]});var Ws=function(e){function t(t){e.call(this,t,Hs)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.recalculate=function(t,n){if(e.prototype.recalculate.call(this,t,n),"auto"===this.layout.get("icon-rotation-alignment")&&("point"!==this.layout.get("symbol-placement")?this.layout._values["icon-rotation-alignment"]="map":this.layout._values["icon-rotation-alignment"]="viewport"),"auto"===this.layout.get("text-rotation-alignment")&&("point"!==this.layout.get("symbol-placement")?this.layout._values["text-rotation-alignment"]="map":this.layout._values["text-rotation-alignment"]="viewport"),"auto"===this.layout.get("text-pitch-alignment")&&(this.layout._values["text-pitch-alignment"]=this.layout.get("text-rotation-alignment")),"auto"===this.layout.get("icon-pitch-alignment")&&(this.layout._values["icon-pitch-alignment"]=this.layout.get("icon-rotation-alignment")),"point"===this.layout.get("symbol-placement")){var r=this.layout.get("text-writing-mode");if(r){for(var a=[],i=0,o=r;i=0;f--){var p=o[f];if(!(d.w>p.w||d.h>p.h)){if(d.x=p.x,d.y=p.y,u=Math.max(u,d.y+d.h),s=Math.max(s,d.x+d.w),d.w===p.w&&d.h===p.h){var h=o.pop();f>1,l=-7,d=n?a-1:0,f=n?-1:1,p=e[t+d];for(d+=f,i=p&(1<<-l)-1,p>>=-l,l+=s;l>0;i=256*i+e[t+d],d+=f,l-=8);for(o=i&(1<<-l)-1,i>>=-l,l+=r;l>0;o=256*o+e[t+d],d+=f,l-=8);if(0===i)i=1-c;else{if(i===u)return o?NaN:1/0*(p?-1:1);o+=Math.pow(2,r),i-=c}return(p?-1:1)*o*Math.pow(2,i-r)},write:function(e,t,n,r,a,i){var o,s,u,c=8*i-a-1,l=(1<>1,f=23===a?Math.pow(2,-24)-Math.pow(2,-77):0,p=r?0:i-1,h=r?1:-1,g=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,o=l):(o=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-o))<1&&(o--,u*=2),(t+=o+d>=1?f/u:f*Math.pow(2,1-d))*u>=2&&(o++,u/=2),o+d>=l?(s=0,o=l):o+d>=1?(s=(t*u-1)*Math.pow(2,a),o+=d):(s=t*Math.pow(2,d-1)*Math.pow(2,a),o=0));a>=8;e[n+p]=255&s,p+=h,s/=256,a-=8);for(o=o<0;e[n+p]=255&o,p+=h,o/=256,c-=8);e[n+p-h]|=128*g}},su=uu;function uu(e){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(e)?e:new Uint8Array(e||0),this.pos=0,this.type=0,this.length=this.buf.length}uu.Varint=0,uu.Fixed64=1,uu.Bytes=2,uu.Fixed32=5;var cu="undefined"==typeof TextDecoder?null:new TextDecoder("utf8");function lu(e){return e.type===uu.Bytes?e.readVarint()+e.pos:e.pos+1}function du(e,t,n){return n?4294967296*t+(e>>>0):4294967296*(t>>>0)+(e>>>0)}function fu(e,t,n){var r=t<=16383?1:t<=2097151?2:t<=268435455?3:Math.floor(Math.log(t)/(7*Math.LN2));n.realloc(r);for(var a=n.pos-1;a>=e;a--)n.buf[a+r]=n.buf[a]}function pu(e,t){for(var n=0;n>>8,e[n+2]=t>>>16,e[n+3]=t>>>24}function Eu(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16)+(e[t+3]<<24)}uu.prototype={destroy:function(){this.buf=null},readFields:function(e,t,n){for(n=n||this.length;this.pos>3,i=this.pos;this.type=7&r,e(a,t,this),this.pos===i&&this.skip(r)}return t},readMessage:function(e,t){return this.readFields(e,t,this.readVarint()+this.pos)},readFixed32:function(){var e=Ru(this.buf,this.pos);return this.pos+=4,e},readSFixed32:function(){var e=Eu(this.buf,this.pos);return this.pos+=4,e},readFixed64:function(){var e=Ru(this.buf,this.pos)+4294967296*Ru(this.buf,this.pos+4);return this.pos+=8,e},readSFixed64:function(){var e=Ru(this.buf,this.pos)+4294967296*Eu(this.buf,this.pos+4);return this.pos+=8,e},readFloat:function(){var e=ou.read(this.buf,this.pos,!0,23,4);return this.pos+=4,e},readDouble:function(){var e=ou.read(this.buf,this.pos,!0,52,8);return this.pos+=8,e},readVarint:function(e){var t,n,r=this.buf;return t=127&(n=r[this.pos++]),n<128?t:(t|=(127&(n=r[this.pos++]))<<7,n<128?t:(t|=(127&(n=r[this.pos++]))<<14,n<128?t:(t|=(127&(n=r[this.pos++]))<<21,n<128?t:function(e,t,n){var r,a,i=n.buf;if(r=(112&(a=i[n.pos++]))>>4,a<128)return du(e,r,t);if(r|=(127&(a=i[n.pos++]))<<3,a<128)return du(e,r,t);if(r|=(127&(a=i[n.pos++]))<<10,a<128)return du(e,r,t);if(r|=(127&(a=i[n.pos++]))<<17,a<128)return du(e,r,t);if(r|=(127&(a=i[n.pos++]))<<24,a<128)return du(e,r,t);if(r|=(1&(a=i[n.pos++]))<<31,a<128)return du(e,r,t);throw new Error("Expected varint not more than 10 bytes")}(t|=(15&(n=r[this.pos]))<<28,e,this))))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var e=this.readVarint();return e%2==1?(e+1)/-2:e/2},readBoolean:function(){return Boolean(this.readVarint())},readString:function(){var e=this.readVarint()+this.pos,t=this.pos;return this.pos=e,e-t>=12&&cu?function(e,t,n){return cu.decode(e.subarray(t,n))}(this.buf,t,e):function(e,t,n){for(var r="",a=t;a239?4:u>223?3:u>191?2:1;if(a+l>n)break;1===l?u<128&&(c=u):2===l?128==(192&(i=e[a+1]))&&(c=(31&u)<<6|63&i)<=127&&(c=null):3===l?(i=e[a+1],o=e[a+2],128==(192&i)&&128==(192&o)&&((c=(15&u)<<12|(63&i)<<6|63&o)<=2047||c>=55296&&c<=57343)&&(c=null)):4===l&&(i=e[a+1],o=e[a+2],s=e[a+3],128==(192&i)&&128==(192&o)&&128==(192&s)&&((c=(15&u)<<18|(63&i)<<12|(63&o)<<6|63&s)<=65535||c>=1114112)&&(c=null)),null===c?(c=65533,l=1):c>65535&&(c-=65536,r+=String.fromCharCode(c>>>10&1023|55296),c=56320|1023&c),r+=String.fromCharCode(c),a+=l}return r}(this.buf,t,e)},readBytes:function(){var e=this.readVarint()+this.pos,t=this.buf.subarray(this.pos,e);return this.pos=e,t},readPackedVarint:function(e,t){if(this.type!==uu.Bytes)return e.push(this.readVarint(t));var n=lu(this);for(e=e||[];this.pos127;);else if(t===uu.Bytes)this.pos=this.readVarint()+this.pos;else if(t===uu.Fixed32)this.pos+=4;else{if(t!==uu.Fixed64)throw new Error("Unimplemented type: "+t);this.pos+=8}},writeTag:function(e,t){this.writeVarint(e<<3|t)},realloc:function(e){for(var t=this.length||16;t268435455||e<0?function(e,t){var n,r;if(e>=0?(n=e%4294967296|0,r=e/4294967296|0):(r=~(-e/4294967296),4294967295^(n=~(-e%4294967296))?n=n+1|0:(n=0,r=r+1|0)),e>=0x10000000000000000||e<-0x10000000000000000)throw new Error("Given varint doesn't fit into 10 bytes");t.realloc(10),function(e,t,n){n.buf[n.pos++]=127&e|128,e>>>=7,n.buf[n.pos++]=127&e|128,e>>>=7,n.buf[n.pos++]=127&e|128,e>>>=7,n.buf[n.pos++]=127&e|128,e>>>=7,n.buf[n.pos]=127&e}(n,0,t),function(e,t){var n=(7&e)<<4;t.buf[t.pos++]|=n|((e>>>=3)?128:0),e&&(t.buf[t.pos++]=127&e|((e>>>=7)?128:0),e&&(t.buf[t.pos++]=127&e|((e>>>=7)?128:0),e&&(t.buf[t.pos++]=127&e|((e>>>=7)?128:0),e&&(t.buf[t.pos++]=127&e|((e>>>=7)?128:0),e&&(t.buf[t.pos++]=127&e)))))}(r,t)}(e,this):(this.realloc(4),this.buf[this.pos++]=127&e|(e>127?128:0),e<=127||(this.buf[this.pos++]=127&(e>>>=7)|(e>127?128:0),e<=127||(this.buf[this.pos++]=127&(e>>>=7)|(e>127?128:0),e<=127||(this.buf[this.pos++]=e>>>7&127))))},writeSVarint:function(e){this.writeVarint(e<0?2*-e-1:2*e)},writeBoolean:function(e){this.writeVarint(Boolean(e))},writeString:function(e){e=String(e),this.realloc(4*e.length),this.pos++;var t=this.pos;this.pos=function(e,t,n){for(var r,a,i=0;i55295&&r<57344){if(!a){r>56319||i+1===t.length?(e[n++]=239,e[n++]=191,e[n++]=189):a=r;continue}if(r<56320){e[n++]=239,e[n++]=191,e[n++]=189,a=r;continue}r=a-55296<<10|r-56320|65536,a=null}else a&&(e[n++]=239,e[n++]=191,e[n++]=189,a=null);r<128?e[n++]=r:(r<2048?e[n++]=r>>6|192:(r<65536?e[n++]=r>>12|224:(e[n++]=r>>18|240,e[n++]=r>>12&63|128),e[n++]=r>>6&63|128),e[n++]=63&r|128)}return n}(this.buf,e,this.pos);var n=this.pos-t;n>=128&&fu(t,n,this),this.pos=t-1,this.writeVarint(n),this.pos+=n},writeFloat:function(e){this.realloc(4),ou.write(this.buf,e,this.pos,!0,23,4),this.pos+=4},writeDouble:function(e){this.realloc(8),ou.write(this.buf,e,this.pos,!0,52,8),this.pos+=8},writeBytes:function(e){var t=e.length;this.writeVarint(t),this.realloc(t);for(var n=0;n=128&&fu(n,r,this),this.pos=n-1,this.writeVarint(r),this.pos+=r},writeMessage:function(e,t,n){this.writeTag(e,uu.Bytes),this.writeRawMessage(t,n)},writePackedVarint:function(e,t){t.length&&this.writeMessage(e,pu,t)},writePackedSVarint:function(e,t){t.length&&this.writeMessage(e,hu,t)},writePackedBoolean:function(e,t){t.length&&this.writeMessage(e,mu,t)},writePackedFloat:function(e,t){t.length&&this.writeMessage(e,gu,t)},writePackedDouble:function(e,t){t.length&&this.writeMessage(e,vu,t)},writePackedFixed32:function(e,t){t.length&&this.writeMessage(e,yu,t)},writePackedSFixed32:function(e,t){t.length&&this.writeMessage(e,bu,t)},writePackedFixed64:function(e,t){t.length&&this.writeMessage(e,_u,t)},writePackedSFixed64:function(e,t){t.length&&this.writeMessage(e,xu,t)},writeBytesField:function(e,t){this.writeTag(e,uu.Bytes),this.writeBytes(t)},writeFixed32Field:function(e,t){this.writeTag(e,uu.Fixed32),this.writeFixed32(t)},writeSFixed32Field:function(e,t){this.writeTag(e,uu.Fixed32),this.writeSFixed32(t)},writeFixed64Field:function(e,t){this.writeTag(e,uu.Fixed64),this.writeFixed64(t)},writeSFixed64Field:function(e,t){this.writeTag(e,uu.Fixed64),this.writeSFixed64(t)},writeVarintField:function(e,t){this.writeTag(e,uu.Varint),this.writeVarint(t)},writeSVarintField:function(e,t){this.writeTag(e,uu.Varint),this.writeSVarint(t)},writeStringField:function(e,t){this.writeTag(e,uu.Bytes),this.writeString(t)},writeFloatField:function(e,t){this.writeTag(e,uu.Fixed32),this.writeFloat(t)},writeDoubleField:function(e,t){this.writeTag(e,uu.Fixed64),this.writeDouble(t)},writeBooleanField:function(e,t){this.writeVarintField(e,Boolean(t))}};var Su=3;function Au(e,t,n){1===e&&n.readMessage(Tu,t)}function Tu(e,t,n){if(3===e){var r=n.readMessage(Pu,{}),a=r.id,i=r.bitmap,o=r.width,s=r.height,u=r.left,c=r.top,l=r.advance;t.push({id:a,bitmap:new zi({width:o+2*Su,height:s+2*Su},i),metrics:{width:o,height:s,left:u,top:c,advance:l}})}}function Pu(e,t,n){1===e?t.id=n.readVarint():2===e?t.bitmap=n.readBytes():3===e?t.width=n.readVarint():4===e?t.height=n.readVarint():5===e?t.left=n.readSVarint():6===e?t.top=n.readSVarint():7===e&&(t.advance=n.readVarint())}var Cu=Su,Ou=function(e){var t=this;this._callback=e,this._triggered=!1,"undefined"!=typeof MessageChannel&&(this._channel=new MessageChannel,this._channel.port2.onmessage=function(){t._triggered=!1,t._callback()})};Ou.prototype.trigger=function(){var e=this;this._triggered||(this._triggered=!0,this._channel?this._channel.port1.postMessage(!0):setTimeout((function(){e._triggered=!1,e._callback()}),0))},Ou.prototype.remove=function(){delete this._channel,this._callback=function(){}};var Mu=function(e,t,n){this.target=e,this.parent=t,this.mapId=n,this.callbacks={},this.tasks={},this.taskQueue=[],this.cancelCallbacks={},v(["receive","process"],this),this.invoker=new Ou(this.process),this.target.addEventListener("message",this.receive,!1)};function ku(e,t,n){var r=2*Math.PI*6378137/256/Math.pow(2,n);return[e*r-2*Math.PI*6378137/2,t*r-2*Math.PI*6378137/2]}Mu.prototype.send=function(e,t,n,r){var a=this,i=Math.round(1e18*Math.random()).toString(36).substring(0,10);n&&(this.callbacks[i]=n);var o=[];return this.target.postMessage({id:i,type:e,hasCallback:!!n,targetMapId:r,sourceMapId:this.mapId,data:xr(t,o)},o),{cancel:function(){n&&delete a.callbacks[i],a.target.postMessage({id:i,type:"",targetMapId:r,sourceMapId:a.mapId})}}},Mu.prototype.receive=function(e){var t=e.data,n=t.id;if(n&&(!t.targetMapId||this.mapId===t.targetMapId))if(""===t.type){delete this.tasks[n];var r=this.cancelCallbacks[n];delete this.cancelCallbacks[n],r&&r()}else this.tasks[n]=t,this.taskQueue.push(n),this.invoker.trigger()},Mu.prototype.process=function(){var e=this;if(this.taskQueue.length){var t=this.taskQueue.shift(),n=this.tasks[t];if(delete this.tasks[t],this.taskQueue.length&&this.invoker.trigger(),n)if(""===n.type){var r=this.callbacks[t];delete this.callbacks[t],r&&(n.error?r(Rr(n.error)):r(null,Rr(n.data)))}else{var a=!1,i=n.hasCallback?function(n,r){a=!0,delete e.cancelCallbacks[t];var i=[];e.target.postMessage({id:t,type:"",sourceMapId:e.mapId,error:n?xr(n):null,data:xr(r,i)},i)}:function(e){a=!0},o=null,s=Rr(n.data);if(this.parent[n.type])o=this.parent[n.type](n.sourceMapId,s,i);else if(this.parent.getWorkerSource){var u=n.type.split(".");o=this.parent.getWorkerSource(n.sourceMapId,u[0],s.source)[u[1]](s,i)}else i(new Error("Could not find function "+n.type));!a&&o&&o.cancel&&(this.cancelCallbacks[t]=o.cancel)}}},Mu.prototype.remove=function(){this.invoker.remove(),this.target.removeEventListener("message",this.receive,!1)};var Du=function(e,t){e&&(t?this.setSouthWest(e).setNorthEast(t):4===e.length?this.setSouthWest([e[0],e[1]]).setNorthEast([e[2],e[3]]):this.setSouthWest(e[0]).setNorthEast(e[1]))};Du.prototype.setNorthEast=function(e){return this._ne=e instanceof Iu?new Iu(e.lng,e.lat):Iu.convert(e),this},Du.prototype.setSouthWest=function(e){return this._sw=e instanceof Iu?new Iu(e.lng,e.lat):Iu.convert(e),this},Du.prototype.extend=function(e){var t,n,r=this._sw,a=this._ne;if(e instanceof Iu)t=e,n=e;else{if(!(e instanceof Du))return Array.isArray(e)?e.every(Array.isArray)?this.extend(Du.convert(e)):this.extend(Iu.convert(e)):this;if(t=e._sw,n=e._ne,!t||!n)return this}return r||a?(r.lng=Math.min(t.lng,r.lng),r.lat=Math.min(t.lat,r.lat),a.lng=Math.max(n.lng,a.lng),a.lat=Math.max(n.lat,a.lat)):(this._sw=new Iu(t.lng,t.lat),this._ne=new Iu(n.lng,n.lat)),this},Du.prototype.getCenter=function(){return new Iu((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)},Du.prototype.getSouthWest=function(){return this._sw},Du.prototype.getNorthEast=function(){return this._ne},Du.prototype.getNorthWest=function(){return new Iu(this.getWest(),this.getNorth())},Du.prototype.getSouthEast=function(){return new Iu(this.getEast(),this.getSouth())},Du.prototype.getWest=function(){return this._sw.lng},Du.prototype.getSouth=function(){return this._sw.lat},Du.prototype.getEast=function(){return this._ne.lng},Du.prototype.getNorth=function(){return this._ne.lat},Du.prototype.toArray=function(){return[this._sw.toArray(),this._ne.toArray()]},Du.prototype.toString=function(){return"LngLatBounds("+this._sw.toString()+", "+this._ne.toString()+")"},Du.prototype.isEmpty=function(){return!(this._sw&&this._ne)},Du.convert=function(e){return!e||e instanceof Du?e:new Du(e)};var Iu=function(e,t){if(isNaN(e)||isNaN(t))throw new Error("Invalid LngLat object: ("+e+", "+t+")");if(this.lng=+e,this.lat=+t,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")};Iu.prototype.wrap=function(){return new Iu(l(this.lng,-180,180),this.lat)},Iu.prototype.toArray=function(){return[this.lng,this.lat]},Iu.prototype.toString=function(){return"LngLat("+this.lng+", "+this.lat+")"},Iu.prototype.toBounds=function(e){void 0===e&&(e=0);var t=360*e/40075017,n=t/Math.cos(Math.PI/180*this.lat);return new Du(new Iu(this.lng-n,this.lat-t),new Iu(this.lng+n,this.lat+t))},Iu.convert=function(e){if(e instanceof Iu)return e;if(Array.isArray(e)&&(2===e.length||3===e.length))return new Iu(Number(e[0]),Number(e[1]));if(!Array.isArray(e)&&"object"==typeof e&&null!==e)return new Iu(Number("lng"in e?e.lng:e.lon),Number(e.lat));throw new Error("`LngLatLike` argument must be specified as a LngLat instance, an object {lng: , lat: }, an object {lon: , lat: }, or an array of [, ]")};var Lu=2*Math.PI*6378137;function ju(e){return Lu*Math.cos(e*Math.PI/180)}function Fu(e){return(180+e)/360}function zu(e){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+e*Math.PI/360)))/360}function Nu(e,t){return e/ju(t)}function Bu(e){var t=180-360*e;return 360/Math.PI*Math.atan(Math.exp(t*Math.PI/180))-90}var Vu=function(e,t,n){void 0===n&&(n=0),this.x=+e,this.y=+t,this.z=+n};Vu.fromLngLat=function(e,t){void 0===t&&(t=0);var n=Iu.convert(e);return new Vu(Fu(n.lng),zu(n.lat),Nu(t,n.lat))},Vu.prototype.toLngLat=function(){return new Iu(360*this.x-180,Bu(this.y))},Vu.prototype.toAltitude=function(){return this.z*ju(Bu(this.y))},Vu.prototype.meterInMercatorCoordinateUnits=function(){return 1/Lu*(e=Bu(this.y),1/Math.cos(e*Math.PI/180));var e};var Hu=function(e,t,n){this.z=e,this.x=t,this.y=n,this.key=qu(0,e,t,n)};Hu.prototype.equals=function(e){return this.z===e.z&&this.x===e.x&&this.y===e.y},Hu.prototype.url=function(e,t){var n,r,a,i,o,s=(n=this.x,r=this.y,a=this.z,i=ku(256*n,256*(r=Math.pow(2,a)-r-1),a),o=ku(256*(n+1),256*(r+1),a),i[0]+","+i[1]+","+o[0]+","+o[1]),u=function(e,t,n){for(var r,a="",i=e;i>0;i--)a+=(t&(r=1<this.canonical.z?new Wu(e,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new Wu(e,this.wrap,e,this.canonical.x>>t,this.canonical.y>>t)},Wu.prototype.isChildOf=function(e){if(e.wrap!==this.wrap)return!1;var t=this.canonical.z-e.canonical.z;return 0===e.overscaledZ||e.overscaledZ>t&&e.canonical.y===this.canonical.y>>t},Wu.prototype.children=function(e){if(this.overscaledZ>=e)return[new Wu(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];var t=this.canonical.z+1,n=2*this.canonical.x,r=2*this.canonical.y;return[new Wu(t,this.wrap,t,n,r),new Wu(t,this.wrap,t,n+1,r),new Wu(t,this.wrap,t,n,r+1),new Wu(t,this.wrap,t,n+1,r+1)]},Wu.prototype.isLessThan=function(e){return this.wrape.wrap)&&(this.overscaledZe.overscaledZ)&&(this.canonical.xe.canonical.x)&&this.canonical.y=this.dim+1||t<-1||t>=this.dim+1)throw new RangeError("out of range source coordinates for DEM data");return(t+1)*this.stride+(e+1)},Gu.prototype._unpackMapbox=function(e,t,n){return(256*e*256+256*t+n)/10-1e4},Gu.prototype._unpackTerrarium=function(e,t,n){return 256*e+t+n/256-32768},Gu.prototype.getPixels=function(){return new Ni({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))},Gu.prototype.backfillBorder=function(e,t,n){if(this.dim!==e.dim)throw new Error("dem dimension mismatch");var r=t*this.dim,a=t*this.dim+this.dim,i=n*this.dim,o=n*this.dim+this.dim;switch(t){case-1:r=a-1;break;case 1:a=r+1}switch(n){case-1:i=o-1;break;case 1:o=i+1}for(var s=-t*this.dim,u=-n*this.dim,c=i;c=0)null!==this.deletedStates[e][r]&&(this.deletedStates[e][r]=this.deletedStates[e][r]||{},this.deletedStates[e][r][n]=null);else if(void 0!==t&&t>=0)if(this.stateChanges[e]&&this.stateChanges[e][r])for(n in this.deletedStates[e][r]={},this.stateChanges[e][r])this.deletedStates[e][r][n]=null;else this.deletedStates[e][r]=null;else this.deletedStates[e]=null}},Zu.prototype.getState=function(e,t){var n=String(t),r=this.state[e]||{},a=this.stateChanges[e]||{},i=d({},r[n],a[n]);if(null===this.deletedStates[e])return{};if(this.deletedStates[e]){var o=this.deletedStates[e][t];if(null===o)return{};for(var s in o)delete i[s]}return i},Zu.prototype.initializeTileState=function(e,t){e.setFeatureState(this.state,t)},Zu.prototype.coalesceChanges=function(e,t){var n={};for(var r in this.stateChanges){this.state[r]=this.state[r]||{};var a={};for(var i in this.stateChanges[r])this.state[r][i]||(this.state[r][i]={}),d(this.state[r][i],this.stateChanges[r][i]),a[i]=this.state[r][i];n[r]=a}for(var o in this.deletedStates){this.state[o]=this.state[o]||{};var s={};if(null===this.deletedStates[o])for(var u in this.state[o])s[u]={},this.state[o][u]={};else for(var c in this.deletedStates[o]){if(null===this.deletedStates[o][c])this.state[o][c]={};else for(var l=0,f=Object.keys(this.deletedStates[o][c]);l=0&&l[3]>=0&&s.insert(o,l[0],l[1],l[2],l[3])}},$u.prototype.loadVTLayers=function(){return this.vtLayers||(this.vtLayers=new Vo.VectorTile(new su(this.rawTileData)).layers,this.sourceLayerCoder=new Yu(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"])),this.vtLayers},$u.prototype.query=function(e,t,n){var r=this;this.loadVTLayers();for(var i=e.params||{},o=ui/e.tileSize/e.scale,s=Vn(i.filter),u=e.queryGeometry,c=e.queryPadding*o,l=Qu(u),d=this.grid.query(l.minX-c,l.minY-c,l.maxX+c,l.maxY+c),f=Qu(e.cameraQueryGeometry),p=0,h=this.grid3D.query(f.minX-c,f.minY-c,f.maxX+c,f.maxY+c,(function(t,n,r,i){return function(e,t,n,r,i){for(var o=0,s=e;o=u.x&&i>=u.y)return!0}var c=[new a(t,n),new a(t,i),new a(r,i),new a(r,n)];if(e.length>2)for(var l=0,d=c;l=0)return!0;return!1}(i,u)){var c=this.sourceLayerCoder.decode(n),l=this.vtLayers[c].feature(r);if(a(new zr(this.tileID.overscaledZ),l))for(var d=0;d-n/2;){if(--o<0)return!1;s-=e[o].dist(i),i=e[o]}s+=e[o].dist(e[o+1]),o++;for(var u=[],c=0;sr;)c-=u.shift().angleDelta;if(c>a)return!1;o++,s+=d.dist(f)}return!0}function rc(e){for(var t=0,n=0;nc){var h=(c-u)/p,g=Rt(d.x,f.x,h),v=Rt(d.y,f.y,h),m=new Ps(g,v,f.angleTo(d),l);return m._round(),!o||nc(e,m,s,o,t)?m:void 0}u+=p}}function sc(e,t,n,r,a,i,o,s,u){var c=ac(r,i,o),l=ic(r,a),d=l*o,f=0===e[0].x||e[0].x===u||0===e[0].y||e[0].y===u;return t-d=0&&x=0&&R=0&&p+l<=d){var w=new Ps(x,R,b,g);w._round(),a&&!nc(t,w,o,a,i)||h.push(w)}}f+=y}return u||h.length||s||(h=e(t,f/2,r,a,i,o,s,!0,c)),h}(e,f?t/2*s%t:(l/2+2*i)*o*s%t,t,c,n,d,f,!1,u)}function uc(e,t){var n=e.image,r=e.right-e.left,i=(r*n.paddedRect.w/(n.paddedRect.w-2)-r)/2,o=e.left-i,s=e.right+i,u=e.bottom-e.top,c=(u*n.paddedRect.h/(n.paddedRect.h-2)-u)/2,l=e.top-c,d=e.bottom+c,f=new a(o,l),p=new a(s,l),h=new a(s,d),g=new a(o,d),v=t*Math.PI/180;if(v){var m=Math.sin(v),y=Math.cos(v),b=[y,-m,m,y];f._matMult(b),p._matMult(b),g._matMult(b),h._matMult(b)}return[{tl:f,tr:p,bl:g,br:h,tex:n.paddedRect,writingMode:void 0,glyphOffset:[0,0],sectionIndex:0}]}tc.prototype.registerFadeDuration=function(e){var t=e+this.timeAdded;t>u.z,l=new a(u.x*c,u.y*c),d=new a(l.x+c,l.y+c),f=this.segments.prepareSegment(4,n,r);n.emplaceBack(l.x,l.y,l.x,l.y),n.emplaceBack(d.x,l.y,d.x,l.y),n.emplaceBack(l.x,d.y,l.x,d.y),n.emplaceBack(d.x,d.y,d.x,d.y);var p=f.vertexLength;r.emplaceBack(p,p+1,p+2),r.emplaceBack(p+1,p+2,p+3),f.vertexLength+=4,f.primitiveLength+=2}this.maskedBoundsBuffer=t.createVertexBuffer(n,Ku.members),this.maskedIndexBuffer=t.createIndexBuffer(r)}},tc.prototype.hasData=function(){return"loaded"===this.state||"reloading"===this.state||"expired"===this.state},tc.prototype.patternsLoaded=function(){return this.imageAtlas&&!!Object.keys(this.imageAtlas.patternPositions).length},tc.prototype.setExpiryData=function(e){var t=this.expirationTime;if(e.cacheControl){var n=S(e.cacheControl);n["max-age"]&&(this.expirationTime=Date.now()+1e3*n["max-age"])}else e.expires&&(this.expirationTime=new Date(e.expires).getTime());if(this.expirationTime){var r=Date.now(),a=!1;if(this.expirationTime>r)a=!1;else if(t)if(this.expirationTime0&&(m=Math.max(10*u,m),this._addLineCollisionCircles(e,t,n,n.segment,y,m,r,i,o,d))}else{if(f){var b=new a(g,p),_=new a(v,p),x=new a(g,h),R=new a(v,h),w=f*Math.PI/180;b._rotate(w),_._rotate(w),x._rotate(w),R._rotate(w),g=Math.min(b.x,_.x,x.x,R.x),v=Math.max(b.x,_.x,x.x,R.x),p=Math.min(b.y,_.y,x.y,R.y),h=Math.max(b.y,_.y,x.y,R.y)}e.emplaceBack(n.x,n.y,g,p,v,h,r,i,o,0,0)}this.boxEndIndex=e.length};cc.prototype._addLineCollisionCircles=function(e,t,n,r,a,i,o,s,u,c){var l=i/2,d=Math.floor(a/l)||1,f=1+.4*Math.log(c)/Math.LN2,p=Math.floor(d*f/2),h=-i/2,g=n,v=r+1,m=h,y=-a/2,b=y-a/4;do{if(--v<0){if(m>y)return;v=0;break}m-=t[v].dist(g),g=t[v]}while(m>b);for(var _=t[v].dist(t[v+1]),x=-p;xa&&(w+=R-a),!(w=t.length)return;_=t[v].dist(t[v+1])}var E=w-m,S=t[v],A=t[v+1].sub(S)._unit()._mult(E)._add(S)._round(),T=Math.abs(w-h)0)for(var n=(this.length>>1)-1;n>=0;n--)this._down(n)};function dc(e,t){return et?1:0}function fc(e,t,n){void 0===t&&(t=1),void 0===n&&(n=!1);for(var r=1/0,i=1/0,o=-1/0,s=-1/0,u=e[0],c=0;co)&&(o=l.x),(!c||l.y>s)&&(s=l.y)}var d=o-r,f=s-i,p=Math.min(d,f),h=p/2,g=new lc([],pc);if(0===p)return new a(r,i);for(var v=r;vy.d||!y.d)&&(y=_,n&&console.log("found best %d after %d probes",Math.round(1e4*_.d)/1e4,b)),_.max-y.d<=t||(h=_.h/2,g.push(new hc(_.p.x-h,_.p.y-h,h,e)),g.push(new hc(_.p.x+h,_.p.y-h,h,e)),g.push(new hc(_.p.x-h,_.p.y+h,h,e)),g.push(new hc(_.p.x+h,_.p.y+h,h,e)),b+=4)}return n&&(console.log("num probes: "+b),console.log("best distance: "+y.d)),y.p}function pc(e,t){return t.max-e.max}function hc(e,t,n,r){this.p=new a(e,t),this.h=n,this.d=function(e,t){for(var n=!1,r=1/0,a=0;ae.y!=l.y>e.y&&e.x<(l.x-c.x)*(e.y-c.y)/(l.y-c.y)+c.x&&(n=!n),r=Math.min(r,_i(e,c,l))}return(n?1:-1)*Math.sqrt(r)}(this.p,r),this.max=this.d+this.h*Math.SQRT2}lc.prototype.push=function(e){this.data.push(e),this.length++,this._up(this.length-1)},lc.prototype.pop=function(){if(0!==this.length){var e=this.data[0],t=this.data.pop();return this.length--,this.length>0&&(this.data[0]=t,this._down(0)),e}},lc.prototype.peek=function(){return this.data[0]},lc.prototype._up=function(e){for(var t=this.data,n=this.compare,r=t[e];e>0;){var a=e-1>>1,i=t[a];if(n(r,i)>=0)break;t[e]=i,e=a}t[e]=r},lc.prototype._down=function(e){for(var t=this.data,n=this.compare,r=this.length>>1,a=t[e];e=0)break;t[e]=o,e=i}t[e]=a};var gc=t((function(e){e.exports=function(e,t){var n,r,a,i,o,s,u,c;for(n=3&e.length,r=e.length-n,a=t,o=3432918353,s=461845907,c=0;c>>16)*o&65535)<<16)&4294967295)<<15|u>>>17))*s+(((u>>>16)*s&65535)<<16)&4294967295)<<13|a>>>19))+((5*(a>>>16)&65535)<<16)&4294967295))+((58964+(i>>>16)&65535)<<16);switch(u=0,n){case 3:u^=(255&e.charCodeAt(c+2))<<16;case 2:u^=(255&e.charCodeAt(c+1))<<8;case 1:a^=u=(65535&(u=(u=(65535&(u^=255&e.charCodeAt(c)))*o+(((u>>>16)*o&65535)<<16)&4294967295)<<15|u>>>17))*s+(((u>>>16)*s&65535)<<16)&4294967295}return a^=e.length,a=2246822507*(65535&(a^=a>>>16))+((2246822507*(a>>>16)&65535)<<16)&4294967295,a=3266489909*(65535&(a^=a>>>13))+((3266489909*(a>>>16)&65535)<<16)&4294967295,(a^=a>>>16)>>>0}})),vc=t((function(e){e.exports=function(e,t){for(var n,r=e.length,a=t^r,i=0;r>=4;)n=1540483477*(65535&(n=255&e.charCodeAt(i)|(255&e.charCodeAt(++i))<<8|(255&e.charCodeAt(++i))<<16|(255&e.charCodeAt(++i))<<24))+((1540483477*(n>>>16)&65535)<<16),a=1540483477*(65535&a)+((1540483477*(a>>>16)&65535)<<16)^(n=1540483477*(65535&(n^=n>>>24))+((1540483477*(n>>>16)&65535)<<16)),r-=4,++i;switch(r){case 3:a^=(255&e.charCodeAt(i+2))<<16;case 2:a^=(255&e.charCodeAt(i+1))<<8;case 1:a=1540483477*(65535&(a^=255&e.charCodeAt(i)))+((1540483477*(a>>>16)&65535)<<16)}return a=1540483477*(65535&(a^=a>>>13))+((1540483477*(a>>>16)&65535)<<16),(a^=a>>>15)>>>0}})),mc=gc,yc=gc,bc=vc;mc.murmur3=yc,mc.murmur2=bc;var _c=7,xc=Number.POSITIVE_INFINITY;function Rc(e,t){return t[1]!==xc?function(e,t,n){var r=0,a=0;switch(t=Math.abs(t),n=Math.abs(n),e){case"top-right":case"top-left":case"top":a=n-_c;break;case"bottom-right":case"bottom-left":case"bottom":a=-n+_c}switch(e){case"top-right":case"bottom-right":case"right":r=-t;break;case"top-left":case"bottom-left":case"left":r=t}return[r,a]}(e,t[0],t[1]):function(e,t){var n=0,r=0;t<0&&(t=0);var a=t/Math.sqrt(2);switch(e){case"top-right":case"top-left":r=a-_c;break;case"bottom-right":case"bottom-left":r=-a+_c;break;case"bottom":r=-t+_c;break;case"top":r=t-_c}switch(e){case"top-right":case"bottom-right":n=-a;break;case"top-left":case"bottom-left":n=a;break;case"left":n=t;break;case"right":n=-t}return[n,r]}(e,t[0])}function wc(e){switch(e){case"right":case"top-right":case"bottom-right":return"right";case"left":case"top-left":case"bottom-left":return"left"}return"center"}var Ec=65535;function Sc(e,t,n,r,i,o,s,u,c,l,d,f,p,h){var g=function(e,t,n,r,i,o,s,u){for(var c=r.layout.get("text-rotate").evaluate(o,{})*Math.PI/180,l=t.positionedGlyphs,d=[],f=0;fEc&&R(e.layerIds[0]+': Value for "text-size" is >= 256. Reduce your "text-size".'):"composite"===v.kind&&((m=[Cs*h.compositeTextSizes[0].evaluate(o,{}),Cs*h.compositeTextSizes[1].evaluate(o,{})])[0]>Ec||m[1]>Ec)&&R(e.layerIds[0]+': Value for "text-size" is >= 256. Reduce your "text-size".'),e.addSymbols(e.text,g,m,s,i,o,c,t,u.lineStartIndex,u.lineLength,p);for(var y=0,b=l;y=0;o--)if(r.dist(i[o])ae&&(e.getActor().send("enforceCacheSizeLimit",re),se=0)},e.clamp=c,e.clearTileCache=function(e){var t=self.caches.delete(ne);e&&t.catch(e).then((function(){return e()}))},e.clone=function(e){var t=new Oi(16);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t},e.clone$1=_,e.config=L,e.create=function(){var e=new Oi(16);return Oi!=Float32Array&&(e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[11]=0,e[12]=0,e[13]=0,e[14]=0),e[0]=1,e[5]=1,e[10]=1,e[15]=1,e},e.create$1=function(){var e=new Oi(9);return Oi!=Float32Array&&(e[1]=0,e[2]=0,e[3]=0,e[5]=0,e[6]=0,e[7]=0),e[0]=1,e[4]=1,e[8]=1,e},e.create$2=function(){var e=new Oi(4);return Oi!=Float32Array&&(e[1]=0,e[2]=0),e[0]=1,e[3]=1,e},e.createCommonjsModule=t,e.createExpression=Pn,e.createLayout=ra,e.createStyleLayer=function(e){return"custom"===e.type?new Xs(e):new Js[e.type](e)},e.deepEqual=o,e.ease=u,e.emitValidationErrors=fr,e.endsWith=m,e.enforceCacheSizeLimit=function(e){self.caches&&self.caches.open(ne).then((function(t){t.keys().then((function(n){for(var r=0;r=L.MAX_PARALLEL_IMAGE_REQUESTS){var r={requestParameters:t,callback:n,cancelled:!1,cancel:function(){this.cancelled=!0}};return pe.push(r),r}he++;var a=!1,i=function(){if(!a)for(a=!0,he--;pe.length&&he=ui||u.y<0||u.y>=ui||function(e,t,n,r,a,i,o,s,u,c,l,d,f,p,h,g,v,m,y,b,_,x){var w,E,S,A,T,P=e.addToLineVertexArray(t,n),C=0,O=0,M=0,k=0,D=-1,I=-1,L={},j=mc(""),F=0,z=0;if(void 0===o._unevaluatedLayout.getValue("text-radial-offset")?(F=(w=o.layout.get("text-offset").evaluate(b,{}).map((function(e){return e*gs})))[0],z=w[1]):(F=o.layout.get("text-radial-offset").evaluate(b,{})*gs,z=xc),e.allowVerticalPlacement&&r.vertical){var N=o.layout.get("text-rotate").evaluate(b,{})+90,B=r.vertical;A=new cc(s,n,t,u,c,l,B,d,f,p,e.overscaling,N),i&&(T=new cc(s,n,t,u,c,l,i,g,v,p,e.overscaling,N))}if(a){var V=o.layout.get("icon-rotate").evaluate(b,{}),H=uc(a,V),U=i?uc(i,V):void 0;S=new cc(s,n,t,u,c,l,a,g,v,!1,e.overscaling,V),C=4*H.length;var W=e.iconSizeData,q=null;"source"===W.kind?(q=[Cs*o.layout.get("icon-size").evaluate(b,{})])[0]>Ec&&R(e.layerIds[0]+': Value for "icon-size" is >= 256. Reduce your "icon-size".'):"composite"===W.kind&&((q=[Cs*x.compositeIconSizes[0].evaluate(b,{}),Cs*x.compositeIconSizes[1].evaluate(b,{})])[0]>Ec||q[1]>Ec)&&R(e.layerIds[0]+': Value for "icon-size" is >= 256. Reduce your "icon-size".'),e.addSymbols(e.icon,H,q,y,m,b,!1,t,P.lineStartIndex,P.lineLength,-1),D=e.icon.placedSymbolArray.length-1,U&&(O=4*U.length,e.addSymbols(e.icon,U,q,y,m,b,vs.vertical,t,P.lineStartIndex,P.lineLength,-1),I=e.icon.placedSymbolArray.length-1)}for(var G in r.horizontal){var K=r.horizontal[G];if(!E){j=mc(K.text);var Y=o.layout.get("text-rotate").evaluate(b,{});E=new cc(s,n,t,u,c,l,K,d,f,p,e.overscaling,Y)}var X=1===K.lineCount;if(M+=Sc(e,t,K,o,p,b,h,P,r.vertical?vs.horizontal:vs.horizontalOnly,X?Object.keys(r.horizontal):[G],L,_,D,x),X)break}r.vertical&&(k+=Sc(e,t,r.vertical,o,p,b,h,P,vs.vertical,["vertical"],L,_,I,x));var J=E?E.boxStartIndex:e.collisionBoxArray.length,Z=E?E.boxEndIndex:e.collisionBoxArray.length,$=A?A.boxStartIndex:e.collisionBoxArray.length,Q=A?A.boxEndIndex:e.collisionBoxArray.length,ee=S?S.boxStartIndex:e.collisionBoxArray.length,te=S?S.boxEndIndex:e.collisionBoxArray.length,ne=T?T.boxStartIndex:e.collisionBoxArray.length,re=T?T.boxEndIndex:e.collisionBoxArray.length;e.glyphOffsetArray.length>=Bs.MAX_GLYPHS&&R("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),e.symbolInstances.emplaceBack(t.x,t.y,L.right>=0?L.right:-1,L.center>=0?L.center:-1,L.left>=0?L.left:-1,L.vertical||-1,D,I,j,J,Z,$,Q,ee,te,ne,re,u,M,k,C,O,0,d,F,z)}(e,u,a,n,r,d,e.layers[0],e.collisionBoxArray,t.index,t.sourceLayerIndex,e.index,v,_,E,s,y,x,S,p,t,i,o)};if("line"===A)for(var O=0,M=function(e,t,n,r,i){for(var o=[],s=0;s=r&&f.x>=r||(d.x>=r?d=new a(r,d.y+(f.y-d.y)*((r-d.x)/(f.x-d.x)))._round():f.x>=r&&(f=new a(r,d.y+(f.y-d.y)*((r-d.x)/(f.x-d.x)))._round()),d.y>=i&&f.y>=i||(d.y>=i?d=new a(d.x+(f.x-d.x)*((i-d.y)/(f.y-d.y)),i)._round():f.y>=i&&(f=new a(d.x+(f.x-d.x)*((i-d.y)/(f.y-d.y)),i)._round()),c&&d.equals(c[c.length-1])||(c=[d],o.push(c)),c.push(f)))))}return o}(t.geometry,0,0,ui,ui);O1){var N=oc(z,w,n.vertical||h,r,24,m);N&&C(z,N)}}else if("Polygon"===t.type)for(var B=0,V=Eo(t.geometry,0);B=T.maxzoom||"none"!==T.visibility&&(o(A,this.zoom,r),(g[T.id]=T.createBucket({index:l.bucketLayerIDs.length,layers:A,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:_,sourceID:this.source})).populate(x,v),l.bucketLayerIDs.push(A.map((function(e){return e.id}))))}}}var P=e.mapObject(v.glyphDependencies,(function(e){return Object.keys(e).map(Number)}));Object.keys(P).length?i.send("getGlyphs",{uid:this.uid,stacks:P},(function(e,t){d||(d=e,f=t,M.call(u))})):f={};var C=Object.keys(v.iconDependencies);C.length?i.send("getImages",{icons:C},(function(e,t){d||(d=e,p=t,M.call(u))})):p={};var O=Object.keys(v.patternDependencies);function M(){if(d)return s(d);if(f&&p&&h){var t=new a(f),n=new e.ImageAtlas(p,h);for(var i in g){var u=g[i];u instanceof e.SymbolBucket?(o(u.layers,this.zoom,r),e.performSymbolLayout(u,f,t.positions,p,n.iconPositions,this.showCollisionBoxes)):u.hasPattern&&(u instanceof e.LineBucket||u instanceof e.FillBucket||u instanceof e.FillExtrusionBucket)&&(o(u.layers,this.zoom,r),u.addFeatures(v,n.patternPositions))}this.status="done",s(null,{buckets:e.values(g).filter((function(e){return!e.isEmpty()})),featureIndex:l,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:t.image,imageAtlas:n,glyphMap:this.returnDependencies?f:null,iconMap:this.returnDependencies?p:null,glyphPositions:this.returnDependencies?t.positions:null})}}O.length?i.send("getImages",{icons:O},(function(e,t){d||(d=e,h=t,M.call(u))})):h={},M.call(this)};var s="undefined"!=typeof performance,u={getEntriesByName:function(e){return!!(s&&performance&&performance.getEntriesByName)&&performance.getEntriesByName(e)},mark:function(e){return!!(s&&performance&&performance.mark)&&performance.mark(e)},measure:function(e,t,n){return!!(s&&performance&&performance.measure)&&performance.measure(e,t,n)},clearMarks:function(e){return!!(s&&performance&&performance.clearMarks)&&performance.clearMarks(e)},clearMeasures:function(e){return!!(s&&performance&&performance.clearMeasures)&&performance.clearMeasures(e)}},c=function(e){this._marks={start:[e.url,"start"].join("#"),end:[e.url,"end"].join("#"),measure:e.url.toString()},u.mark(this._marks.start)};function l(t,n){var r=e.getArrayBuffer(t.request,(function(t,r,a,i){t?n(t):r&&n(null,{vectorTile:new e.vectorTile.VectorTile(new e.Protobuf(r)),rawData:r,cacheControl:a,expires:i})}));return function(){r.cancel(),n()}}c.prototype.finish=function(){u.mark(this._marks.end);var e=u.getEntriesByName(this._marks.measure);return 0===e.length&&(u.measure(this._marks.measure,this._marks.start,this._marks.end),e=u.getEntriesByName(this._marks.measure),u.clearMarks(this._marks.start),u.clearMarks(this._marks.end),u.clearMeasures(this._marks.measure)),e},u.Performance=c;var d=function(e,t,n,r){this.actor=e,this.layerIndex=t,this.availableImages=n,this.loadVectorData=r||l,this.loading={},this.loaded={}};d.prototype.loadTile=function(t,n){var r=this,a=t.uid;this.loading||(this.loading={});var o=!!(t&&t.request&&t.request.collectResourceTiming)&&new u.Performance(t.request),s=this.loading[a]=new i(t);s.abort=this.loadVectorData(t,(function(t,i){if(delete r.loading[a],t||!i)return s.status="done",r.loaded[a]=s,n(t);var u=i.rawData,c={};i.expires&&(c.expires=i.expires),i.cacheControl&&(c.cacheControl=i.cacheControl);var l={};if(o){var d=o.finish();d&&(l.resourceTiming=JSON.parse(JSON.stringify(d)))}s.vectorTile=i.vectorTile,s.parse(i.vectorTile,r.layerIndex,r.availableImages,r.actor,(function(t,r){if(t||!r)return n(t);n(null,e.extend({rawTileData:u.slice(0)},r,c,l))})),r.loaded=r.loaded||{},r.loaded[a]=s}))},d.prototype.reloadTile=function(e,t){var n=this,r=this.loaded,a=e.uid,i=this;if(r&&r[a]){var o=r[a];o.showCollisionBoxes=e.showCollisionBoxes;var s=function(e,r){var a=o.reloadCallback;a&&(delete o.reloadCallback,o.parse(o.vectorTile,i.layerIndex,n.availableImages,i.actor,a)),t(e,r)};"parsing"===o.status?o.reloadCallback=s:"done"===o.status&&(o.vectorTile?o.parse(o.vectorTile,this.layerIndex,this.availableImages,this.actor,s):s())}},d.prototype.abortTile=function(e,t){var n=this.loading,r=e.uid;n&&n[r]&&n[r].abort&&(n[r].abort(),delete n[r]),t()},d.prototype.removeTile=function(e,t){var n=this.loaded,r=e.uid;n&&n[r]&&delete n[r],t()};var f=function(){this.loaded={}};f.prototype.loadTile=function(t,n){var r=t.uid,a=t.encoding,i=t.rawImageData,o=new e.DEMData(r,i,a);this.loaded=this.loaded||{},this.loaded[r]=o,n(null,o)},f.prototype.removeTile=function(e){var t=this.loaded,n=e.uid;t&&t[n]&&delete t[n]};var p={RADIUS:6378137,FLATTENING:1/298.257223563,POLAR_RADIUS:6356752.3142};function h(e){var t=0;if(e&&e.length>0){t+=Math.abs(g(e[0]));for(var n=1;n2){for(o=0;o=0}(e)===t?e:e.reverse()}var x=e.vectorTile.VectorTileFeature.prototype.toGeoJSON,R=function(t){this._feature=t,this.extent=e.EXTENT,this.type=t.type,this.properties=t.tags,"id"in t&&!isNaN(t.id)&&(this.id=parseInt(t.id,10))};R.prototype.loadGeometry=function(){if(1===this._feature.type){for(var t=[],n=0,r=this._feature.geometry;n>>0):4294967296*(t>>>0)+(e>>>0)}function P(e,t,n){var r=t<=16383?1:t<=2097151?2:t<=268435455?3:Math.floor(Math.log(t)/(7*Math.LN2));n.realloc(r);for(var a=n.pos-1;a>=e;a--)n.buf[a+r]=n.buf[a]}function C(e,t){for(var n=0;n>>8,e[n+2]=t>>>16,e[n+3]=t>>>24}function B(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16)+(e[t+3]<<24)}S.Varint=0,S.Fixed64=1,S.Bytes=2,S.Fixed32=5,S.prototype={destroy:function(){this.buf=null},readFields:function(e,t,n){for(n=n||this.length;this.pos>3,i=this.pos;this.type=7&r,e(a,t,this),this.pos===i&&this.skip(r)}return t},readMessage:function(e,t){return this.readFields(e,t,this.readVarint()+this.pos)},readFixed32:function(){var e=z(this.buf,this.pos);return this.pos+=4,e},readSFixed32:function(){var e=B(this.buf,this.pos);return this.pos+=4,e},readFixed64:function(){var e=z(this.buf,this.pos)+4294967296*z(this.buf,this.pos+4);return this.pos+=8,e},readSFixed64:function(){var e=z(this.buf,this.pos)+4294967296*B(this.buf,this.pos+4);return this.pos+=8,e},readFloat:function(){var t=e.ieee754.read(this.buf,this.pos,!0,23,4);return this.pos+=4,t},readDouble:function(){var t=e.ieee754.read(this.buf,this.pos,!0,52,8);return this.pos+=8,t},readVarint:function(e){var t,n,r=this.buf;return t=127&(n=r[this.pos++]),n<128?t:(t|=(127&(n=r[this.pos++]))<<7,n<128?t:(t|=(127&(n=r[this.pos++]))<<14,n<128?t:(t|=(127&(n=r[this.pos++]))<<21,n<128?t:function(e,t,n){var r,a,i=n.buf;if(r=(112&(a=i[n.pos++]))>>4,a<128)return T(e,r,t);if(r|=(127&(a=i[n.pos++]))<<3,a<128)return T(e,r,t);if(r|=(127&(a=i[n.pos++]))<<10,a<128)return T(e,r,t);if(r|=(127&(a=i[n.pos++]))<<17,a<128)return T(e,r,t);if(r|=(127&(a=i[n.pos++]))<<24,a<128)return T(e,r,t);if(r|=(1&(a=i[n.pos++]))<<31,a<128)return T(e,r,t);throw new Error("Expected varint not more than 10 bytes")}(t|=(15&(n=r[this.pos]))<<28,e,this))))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var e=this.readVarint();return e%2==1?(e+1)/-2:e/2},readBoolean:function(){return Boolean(this.readVarint())},readString:function(){var e=this.readVarint()+this.pos,t=function(e,t,n){for(var r="",a=t;a239?4:u>223?3:u>191?2:1;if(a+l>n)break;1===l?u<128&&(c=u):2===l?128==(192&(i=e[a+1]))&&(c=(31&u)<<6|63&i)<=127&&(c=null):3===l?(i=e[a+1],o=e[a+2],128==(192&i)&&128==(192&o)&&((c=(15&u)<<12|(63&i)<<6|63&o)<=2047||c>=55296&&c<=57343)&&(c=null)):4===l&&(i=e[a+1],o=e[a+2],s=e[a+3],128==(192&i)&&128==(192&o)&&128==(192&s)&&((c=(15&u)<<18|(63&i)<<12|(63&o)<<6|63&s)<=65535||c>=1114112)&&(c=null)),null===c?(c=65533,l=1):c>65535&&(c-=65536,r+=String.fromCharCode(c>>>10&1023|55296),c=56320|1023&c),r+=String.fromCharCode(c),a+=l}return r}(this.buf,this.pos,e);return this.pos=e,t},readBytes:function(){var e=this.readVarint()+this.pos,t=this.buf.subarray(this.pos,e);return this.pos=e,t},readPackedVarint:function(e,t){if(this.type!==S.Bytes)return e.push(this.readVarint(t));var n=A(this);for(e=e||[];this.pos127;);else if(t===S.Bytes)this.pos=this.readVarint()+this.pos;else if(t===S.Fixed32)this.pos+=4;else{if(t!==S.Fixed64)throw new Error("Unimplemented type: "+t);this.pos+=8}},writeTag:function(e,t){this.writeVarint(e<<3|t)},realloc:function(e){for(var t=this.length||16;t268435455||e<0?function(e,t){var n,r;if(e>=0?(n=e%4294967296|0,r=e/4294967296|0):(r=~(-e/4294967296),4294967295^(n=~(-e%4294967296))?n=n+1|0:(n=0,r=r+1|0)),e>=0x10000000000000000||e<-0x10000000000000000)throw new Error("Given varint doesn't fit into 10 bytes");t.realloc(10),function(e,t,n){n.buf[n.pos++]=127&e|128,e>>>=7,n.buf[n.pos++]=127&e|128,e>>>=7,n.buf[n.pos++]=127&e|128,e>>>=7,n.buf[n.pos++]=127&e|128,e>>>=7,n.buf[n.pos]=127&e}(n,0,t),function(e,t){var n=(7&e)<<4;t.buf[t.pos++]|=n|((e>>>=3)?128:0),e&&(t.buf[t.pos++]=127&e|((e>>>=7)?128:0),e&&(t.buf[t.pos++]=127&e|((e>>>=7)?128:0),e&&(t.buf[t.pos++]=127&e|((e>>>=7)?128:0),e&&(t.buf[t.pos++]=127&e|((e>>>=7)?128:0),e&&(t.buf[t.pos++]=127&e)))))}(r,t)}(e,this):(this.realloc(4),this.buf[this.pos++]=127&e|(e>127?128:0),e<=127||(this.buf[this.pos++]=127&(e>>>=7)|(e>127?128:0),e<=127||(this.buf[this.pos++]=127&(e>>>=7)|(e>127?128:0),e<=127||(this.buf[this.pos++]=e>>>7&127))))},writeSVarint:function(e){this.writeVarint(e<0?2*-e-1:2*e)},writeBoolean:function(e){this.writeVarint(Boolean(e))},writeString:function(e){e=String(e),this.realloc(4*e.length),this.pos++;var t=this.pos;this.pos=function(e,t,n){for(var r,a,i=0;i55295&&r<57344){if(!a){r>56319||i+1===t.length?(e[n++]=239,e[n++]=191,e[n++]=189):a=r;continue}if(r<56320){e[n++]=239,e[n++]=191,e[n++]=189,a=r;continue}r=a-55296<<10|r-56320|65536,a=null}else a&&(e[n++]=239,e[n++]=191,e[n++]=189,a=null);r<128?e[n++]=r:(r<2048?e[n++]=r>>6|192:(r<65536?e[n++]=r>>12|224:(e[n++]=r>>18|240,e[n++]=r>>12&63|128),e[n++]=r>>6&63|128),e[n++]=63&r|128)}return n}(this.buf,e,this.pos);var n=this.pos-t;n>=128&&P(t,n,this),this.pos=t-1,this.writeVarint(n),this.pos+=n},writeFloat:function(t){this.realloc(4),e.ieee754.write(this.buf,t,this.pos,!0,23,4),this.pos+=4},writeDouble:function(t){this.realloc(8),e.ieee754.write(this.buf,t,this.pos,!0,52,8),this.pos+=8},writeBytes:function(e){var t=e.length;this.writeVarint(t),this.realloc(t);for(var n=0;n=128&&P(n,r,this),this.pos=n-1,this.writeVarint(r),this.pos+=r},writeMessage:function(e,t,n){this.writeTag(e,S.Bytes),this.writeRawMessage(t,n)},writePackedVarint:function(e,t){t.length&&this.writeMessage(e,C,t)},writePackedSVarint:function(e,t){t.length&&this.writeMessage(e,O,t)},writePackedBoolean:function(e,t){t.length&&this.writeMessage(e,D,t)},writePackedFloat:function(e,t){t.length&&this.writeMessage(e,M,t)},writePackedDouble:function(e,t){t.length&&this.writeMessage(e,k,t)},writePackedFixed32:function(e,t){t.length&&this.writeMessage(e,I,t)},writePackedSFixed32:function(e,t){t.length&&this.writeMessage(e,L,t)},writePackedFixed64:function(e,t){t.length&&this.writeMessage(e,j,t)},writePackedSFixed64:function(e,t){t.length&&this.writeMessage(e,F,t)},writeBytesField:function(e,t){this.writeTag(e,S.Bytes),this.writeBytes(t)},writeFixed32Field:function(e,t){this.writeTag(e,S.Fixed32),this.writeFixed32(t)},writeSFixed32Field:function(e,t){this.writeTag(e,S.Fixed32),this.writeSFixed32(t)},writeFixed64Field:function(e,t){this.writeTag(e,S.Fixed64),this.writeFixed64(t)},writeSFixed64Field:function(e,t){this.writeTag(e,S.Fixed64),this.writeSFixed64(t)},writeVarintField:function(e,t){this.writeTag(e,S.Varint),this.writeVarint(t)},writeSVarintField:function(e,t){this.writeTag(e,S.Varint),this.writeSVarint(t)},writeStringField:function(e,t){this.writeTag(e,S.Bytes),this.writeString(t)},writeFloatField:function(e,t){this.writeTag(e,S.Fixed32),this.writeFloat(t)},writeDoubleField:function(e,t){this.writeTag(e,S.Fixed64),this.writeDouble(t)},writeBooleanField:function(e,t){this.writeVarintField(e,Boolean(t))}};var V=e.vectorTile.VectorTileFeature,H=U;function U(e,t){this.options=t||{},this.features=e,this.length=e.length}function W(e,t){this.id="number"==typeof e.id?e.id:void 0,this.type=e.type,this.rawGeometry=1===e.type?[e.geometry]:e.geometry,this.properties=e.tags,this.extent=t||4096}U.prototype.feature=function(e){return new W(this.features[e],this.options.extent)},W.prototype.loadGeometry=function(){var t=this.rawGeometry;this.geometry=[];for(var n=0;n>31}function ee(e,t){for(var n=e.loadGeometry(),r=e.type,a=0,i=0,o=n.length,s=0;s>1;!function e(t,n,r,a,i,o){for(;i>a;){if(i-a>600){var s=i-a+1,u=r-a+1,c=Math.log(s),l=.5*Math.exp(2*c/3),d=.5*Math.sqrt(c*l*(s-l)/s)*(u-s/2<0?-1:1);e(t,n,r,Math.max(a,Math.floor(r-u*l/s+d)),Math.min(i,Math.floor(r+(s-u)*l/s+d)),o)}var f=n[2*r+o],p=a,h=i;for(ne(t,n,a,r),n[2*i+o]>f&&ne(t,n,a,i);pf;)h--}n[2*a+o]===f?ne(t,n,a,h):ne(t,n,++h,i),h<=r&&(a=h+1),r<=h&&(i=h-1)}}(t,n,s,a,i,o%2),e(t,n,r,a,s-1,o+1),e(t,n,r,s+1,i,o+1)}}(o,s,r,0,o.length-1,0)};se.prototype.range=function(e,t,n,r){return function(e,t,n,r,a,i,o){for(var s,u,c=[0,e.length-1,0],l=[];c.length;){var d=c.pop(),f=c.pop(),p=c.pop();if(f-p<=o)for(var h=p;h<=f;h++)s=t[2*h],u=t[2*h+1],s>=n&&s<=a&&u>=r&&u<=i&&l.push(e[h]);else{var g=Math.floor((p+f)/2);s=t[2*g],u=t[2*g+1],s>=n&&s<=a&&u>=r&&u<=i&&l.push(e[g]);var v=(d+1)%2;(0===d?n<=s:r<=u)&&(c.push(p),c.push(g-1),c.push(v)),(0===d?a>=s:i>=u)&&(c.push(g+1),c.push(f),c.push(v))}}return l}(this.ids,this.coords,e,t,n,r,this.nodeSize)},se.prototype.within=function(e,t,n){return function(e,t,n,r,a,i){for(var o=[0,e.length-1,0],s=[],u=a*a;o.length;){var c=o.pop(),l=o.pop(),d=o.pop();if(l-d<=i)for(var f=d;f<=l;f++)ae(t[2*f],t[2*f+1],n,r)<=u&&s.push(e[f]);else{var p=Math.floor((d+l)/2),h=t[2*p],g=t[2*p+1];ae(h,g,n,r)<=u&&s.push(e[p]);var v=(c+1)%2;(0===c?n-a<=h:r-a<=g)&&(o.push(d),o.push(p-1),o.push(v)),(0===c?n+a>=h:r+a>=g)&&(o.push(p+1),o.push(l),o.push(v))}}return s}(this.ids,this.coords,e,t,n,this.nodeSize)};var ue={minZoom:0,maxZoom:16,radius:40,extent:512,nodeSize:64,log:!1,reduce:null,map:function(e){return e}},ce=function(e){this.options=ve(Object.create(ue),e),this.trees=new Array(this.options.maxZoom+1)};function le(e,t,n,r,a){return{x:e,y:t,zoom:1/0,id:n,parentId:-1,numPoints:r,properties:a}}function de(e,t){var n=e.geometry.coordinates,r=n[0],a=n[1];return{x:he(r),y:ge(a),zoom:1/0,index:t,parentId:-1}}function fe(e){return{type:"Feature",id:e.id,properties:pe(e),geometry:{type:"Point",coordinates:[(r=e.x,360*(r-.5)),(t=e.y,n=(180-360*t)*Math.PI/180,360*Math.atan(Math.exp(n))/Math.PI-90)]}};var t,n,r}function pe(e){var t=e.numPoints,n=t>=1e4?Math.round(t/1e3)+"k":t>=1e3?Math.round(t/100)/10+"k":t;return ve(ve({},e.properties),{cluster:!0,cluster_id:e.id,point_count:t,point_count_abbreviated:n})}function he(e){return e/360+.5}function ge(e){var t=Math.sin(e*Math.PI/180),n=.5-.25*Math.log((1+t)/(1-t))/Math.PI;return n<0?0:n>1?1:n}function ve(e,t){for(var n in t)e[n]=t[n];return e}function me(e){return e.x}function ye(e){return e.y}function be(e,t,n,r,a,i){var o=a-n,s=i-r;if(0!==o||0!==s){var u=((e-n)*o+(t-r)*s)/(o*o+s*s);u>1?(n=a,r=i):u>0&&(n+=o*u,r+=s*u)}return(o=e-n)*o+(s=t-r)*s}function _e(e,t,n,r){var a={id:void 0===e?null:e,type:t,geometry:n,tags:r,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};return function(e){var t=e.geometry,n=e.type;if("Point"===n||"MultiPoint"===n||"LineString"===n)xe(e,t);else if("Polygon"===n||"MultiLineString"===n)for(var r=0;r0&&(o+=r?(a*c-u*i)/2:Math.sqrt(Math.pow(u-a,2)+Math.pow(c-i,2))),a=u,i=c}var l=t.length-3;t[2]=1,function e(t,n,r,a){for(var i,o=a,s=r-n>>1,u=r-n,c=t[n],l=t[n+1],d=t[r],f=t[r+1],p=n+3;po)i=p,o=h;else if(h===o){var g=Math.abs(p-s);ga&&(i-n>3&&e(t,n,i,a),t[i+2]=o,r-i>3&&e(t,i,r,a))}(t,0,l,n),t[l+2]=1,t.size=Math.abs(o),t.start=0,t.end=t.size}function Se(e,t,n,r){for(var a=0;a1?1:n}function Pe(e,t,n,r,a,i,o,s){if(r/=t,i>=(n/=t)&&o=r)return null;for(var u=[],c=0;c=n&&h=r)){var g=[];if("Point"===f||"MultiPoint"===f)Ce(d,g,n,r,a);else if("LineString"===f)Oe(d,g,n,r,a,!1,s.lineMetrics);else if("MultiLineString"===f)ke(d,g,n,r,a,!1);else if("Polygon"===f)ke(d,g,n,r,a,!0);else if("MultiPolygon"===f)for(var v=0;v=n&&o<=r&&(t.push(e[i]),t.push(e[i+1]),t.push(e[i+2]))}}function Oe(e,t,n,r,a,i,o){for(var s,u,c=Me(e),l=0===a?Ie:Le,d=e.start,f=0;fn&&(u=l(c,p,h,v,m,n),o&&(c.start=d+s*u)):y>r?b=n&&(u=l(c,p,h,v,m,n),_=!0),b>r&&y<=r&&(u=l(c,p,h,v,m,r),_=!0),!i&&_&&(o&&(c.end=d+s*u),t.push(c),c=Me(e)),o&&(d+=s)}var x=e.length-3;p=e[x],h=e[x+1],g=e[x+2],(y=0===a?p:h)>=n&&y<=r&&De(c,p,h,g),x=c.length-3,i&&x>=3&&(c[x]!==c[0]||c[x+1]!==c[1])&&De(c,c[0],c[1],c[2]),c.length&&t.push(c)}function Me(e){var t=[];return t.size=e.size,t.start=e.start,t.end=e.end,t}function ke(e,t,n,r,a,i){for(var o=0;oo.maxX&&(o.maxX=l),d>o.maxY&&(o.maxY=d)}return o}function Ve(e,t,n,r){var a=t.geometry,i=t.type,o=[];if("Point"===i||"MultiPoint"===i)for(var s=0;s0&&t.size<(a?o:r))n.numPoints+=t.length/3;else{for(var s=[],u=0;uo)&&(n.numSimplified++,s.push(t[u]),s.push(t[u+1])),n.numPoints++;a&&function(e,t){for(var n=0,r=0,a=e.length,i=a-2;r0===t)for(r=0,a=e.length;r24)throw new Error("maxZoom should be in the 0-24 range");if(t.promoteId&&t.generateId)throw new Error("promoteId and generateId cannot be used together.");var r=function(e,t){var n=[];if("FeatureCollection"===e.type)for(var r=0;r=r;c--){var l=+Date.now();s=this._cluster(s,c),this.trees[c]=new se(s,me,ye,i,Float32Array),n&&console.log("z%d: %d clusters in %dms",c,s.length,+Date.now()-l)}return n&&console.timeEnd("total time"),this},ce.prototype.getClusters=function(e,t){var n=((e[0]+180)%360+360)%360-180,r=Math.max(-90,Math.min(90,e[1])),a=180===e[2]?180:((e[2]+180)%360+360)%360-180,i=Math.max(-90,Math.min(90,e[3]));if(e[2]-e[0]>=360)n=-180,a=180;else if(n>a){var o=this.getClusters([n,r,180,i],t),s=this.getClusters([-180,r,a,i],t);return o.concat(s)}for(var u=this.trees[this._limitZoom(t)],c=[],l=0,d=u.range(he(n),ge(i),he(a),ge(r));l>5,n=e%32,r="No cluster with the specified id.",a=this.trees[n];if(!a)throw new Error(r);var i=a.points[t];if(!i)throw new Error(r);for(var o=this.options.radius/(this.options.extent*Math.pow(2,n-1)),s=[],u=0,c=a.within(i.x,i.y,o);u1?this._map(c,!0):null,v=(u<<5)+(t+1),m=0,y=d;m1&&console.time("creation"),f=this.tiles[d]=Be(e,t,n,r,u),this.tileCoords.push({z:t,x:n,y:r}),c)){c>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",t,n,r,f.numFeatures,f.numPoints,f.numSimplified),console.timeEnd("creation"));var p="z"+t;this.stats[p]=(this.stats[p]||0)+1,this.total++}if(f.source=e,a){if(t===u.maxZoom||t===a)continue;var h=1<1&&console.time("clipping");var g,v,m,y,b,_,x=.5*u.buffer/u.extent,R=.5-x,w=.5+x,E=1+x;g=v=m=y=null,b=Pe(e,l,n-x,n+w,0,f.minX,f.maxX,u),_=Pe(e,l,n+R,n+E,0,f.minX,f.maxX,u),e=null,b&&(g=Pe(b,l,r-x,r+w,1,f.minY,f.maxY,u),v=Pe(b,l,r+R,r+E,1,f.minY,f.maxY,u),b=null),_&&(m=Pe(_,l,r-x,r+w,1,f.minY,f.maxY,u),y=Pe(_,l,r+R,r+E,1,f.minY,f.maxY,u),_=null),c>1&&console.timeEnd("clipping"),s.push(g||[],t+1,2*n,2*r),s.push(v||[],t+1,2*n,2*r+1),s.push(m||[],t+1,2*n+1,2*r),s.push(y||[],t+1,2*n+1,2*r+1)}}},Ue.prototype.getTile=function(e,t,n){var r=this.options,a=r.extent,i=r.debug;if(e<0||e>24)return null;var o=1<1&&console.log("drilling down to z%d-%d-%d",e,t,n);for(var u,c=e,l=t,d=n;!u&&c>0;)c--,l=Math.floor(l/2),d=Math.floor(d/2),u=this.tiles[We(c,l,d)];return u&&u.source?(i>1&&console.log("found parent tile z%d-%d-%d",c,l,d),i>1&&console.time("drilling down"),this.splitTile(u.source,c,l,d,e,t,n),i>1&&console.timeEnd("drilling down"),this.tiles[s]?ze(this.tiles[s],a):null):null};var Ge=function(t){function n(e,n,r,a){t.call(this,e,n,r,qe),a&&(this.loadGeoJSON=a)}return t&&(n.__proto__=t),n.prototype=Object.create(t&&t.prototype),n.prototype.constructor=n,n.prototype.loadData=function(e,t){this._pendingCallback&&this._pendingCallback(null,{abandoned:!0}),this._pendingCallback=t,this._pendingLoadDataParams=e,this._state&&"Idle"!==this._state?this._state="NeedsLoadData":(this._state="Coalescing",this._loadData())},n.prototype._loadData=function(){var t=this;if(this._pendingCallback&&this._pendingLoadDataParams){var n=this._pendingCallback,r=this._pendingLoadDataParams;delete this._pendingCallback,delete this._pendingLoadDataParams;var a=!!(r&&r.request&&r.request.collectResourceTiming)&&new u.Performance(r.request);this.loadGeoJSON(r,(function(i,o){if(i||!o)return n(i);if("object"!=typeof o)return n(new Error("Input data given to '"+r.source+"' is not a valid GeoJSON object."));!function e(t,n){switch(t&&t.type||null){case"FeatureCollection":return t.features=t.features.map(y(e,n)),t;case"GeometryCollection":return t.geometries=t.geometries.map(y(e,n)),t;case"Feature":return t.geometry=e(t.geometry,n),t;case"Polygon":case"MultiPolygon":return function(e,t){return"Polygon"===e.type?e.coordinates=b(e.coordinates,t):"MultiPolygon"===e.type&&(e.coordinates=e.coordinates.map(y(b,t))),e}(t,n);default:return t}}(o,!0);try{t._geoJSONIndex=r.cluster?new ce(function(t){var n=t.superclusterOptions,r=t.clusterProperties;if(!r||!n)return n;for(var a={},i={},o={accumulated:null,zoom:0},s={properties:null},u=Object.keys(r),c=0,l=u;c=0?0:t.button},n.remove=function(e){e.parentNode&&e.parentNode.removeChild(e)};var f=function(t){function n(){t.call(this),this.images={},this.updatedImages={},this.callbackDispatchedThisFrame={},this.loaded=!1,this.requestors=[],this.patterns={},this.atlasImage=new e.RGBAImage({width:1,height:1}),this.dirty=!0}return t&&(n.__proto__=t),n.prototype=Object.create(t&&t.prototype),n.prototype.constructor=n,n.prototype.isLoaded=function(){return this.loaded},n.prototype.setLoaded=function(e){if(this.loaded!==e&&(this.loaded=e,e)){for(var t=0,n=this.requestors;t=0?1.2:1))}function m(e,t,n,r,a,i,o){for(var s=0;s65535)t(new Error("glyphs > 65535 not supported"));else{var u=i.requests[s];u||(u=i.requests[s]=[],b.loadGlyphRange(n,s,r.url,r.requestManager,(function(e,t){if(t)for(var n in t)r._doesCharSupportLocalGlyph(+n)||(i.glyphs[+n]=t[+n]);for(var a=0,o=u;athis.height)return e.warnOnce("LineAtlas out of space"),null;for(var i=0,o=0;o=r&&t.x=a&&t.y0&&(u[new e.OverscaledTileID(t.overscaledZ,i,n.z,a,n.y-1).key]={backfilled:!1},u[new e.OverscaledTileID(t.overscaledZ,t.wrap,n.z,n.x,n.y-1).key]={backfilled:!1},u[new e.OverscaledTileID(t.overscaledZ,s,n.z,o,n.y-1).key]={backfilled:!1}),n.y+10&&(r.resourceTiming=t._resourceTiming,t._resourceTiming=[]),t.fire(new e.Event("data",r))}}))},n.prototype.onAdd=function(e){this.map=e,this.load()},n.prototype.setData=function(t){var n=this;return this._data=t,this.fire(new e.Event("dataloading",{dataType:"source"})),this._updateWorkerData((function(t){if(t)n.fire(new e.ErrorEvent(t));else{var r={dataType:"source",sourceDataType:"content"};n._collectResourceTiming&&n._resourceTiming&&n._resourceTiming.length>0&&(r.resourceTiming=n._resourceTiming,n._resourceTiming=[]),n.fire(new e.Event("data",r))}})),this},n.prototype.getClusterExpansionZoom=function(e,t){return this.actor.send("geojson.getClusterExpansionZoom",{clusterId:e,source:this.id},t),this},n.prototype.getClusterChildren=function(e,t){return this.actor.send("geojson.getClusterChildren",{clusterId:e,source:this.id},t),this},n.prototype.getClusterLeaves=function(e,t,n,r){return this.actor.send("geojson.getClusterLeaves",{source:this.id,clusterId:e,limit:t,offset:n},r),this},n.prototype._updateWorkerData=function(t){var n=this;this._loaded=!1;var r=e.extend({},this.workerOptions),a=this._data;"string"==typeof a?(r.request=this.map._requestManager.transformRequest(e.browser.resolveURL(a),e.ResourceType.Source),r.request.collectResourceTiming=this._collectResourceTiming):r.data=JSON.stringify(a),this.actor.send(this.type+".loadData",r,(function(e,a){n._removed||a&&a.abandoned||(n._loaded=!0,a&&a.resourceTiming&&a.resourceTiming[n.id]&&(n._resourceTiming=a.resourceTiming[n.id].slice(0)),n.actor.send(n.type+".coalesce",{source:r.source},null),t(e))}))},n.prototype.loaded=function(){return this._loaded},n.prototype.loadTile=function(t,n){var r=this,a=t.actor?"reloadTile":"loadTile";t.actor=this.actor;var i={type:this.type,uid:t.uid,tileID:t.tileID,zoom:t.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:e.browser.devicePixelRatio,showCollisionBoxes:this.map.showCollisionBoxes};t.request=this.actor.send(a,i,(function(e,i){return delete t.request,t.unloadVectorData(),t.aborted?n(null):e?n(e):(t.loadVectorData(i,r.map.painter,"reloadTile"===a),n(null))}))},n.prototype.abortTile=function(e){e.request&&(e.request.cancel(),delete e.request),e.aborted=!0},n.prototype.unloadTile=function(e){e.unloadVectorData(),e.clearMask(),this.actor.send("removeTile",{uid:e.uid,type:this.type,source:this.id})},n.prototype.onRemove=function(){this._removed=!0,this.actor.send("removeSource",{type:this.type,source:this.id})},n.prototype.serialize=function(){return e.extend({},this._options,{type:this.type,data:this._data})},n.prototype.hasTransition=function(){return!1},n}(e.Evented),M=function(t){function n(e,n,r,a){t.call(this),this.id=e,this.dispatcher=r,this.coordinates=n.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this._loaded=!1,this.setEventedParent(a),this.options=n}return t&&(n.__proto__=t),n.prototype=Object.create(t&&t.prototype),n.prototype.constructor=n,n.prototype.load=function(t,n){var r=this;this._loaded=!1,this.fire(new e.Event("dataloading",{dataType:"source"})),this.url=this.options.url,e.getImage(this.map._requestManager.transformRequest(this.url,e.ResourceType.Image),(function(a,i){r._loaded=!0,a?r.fire(new e.ErrorEvent(a)):i&&(r.image=i,t&&(r.coordinates=t),n&&n(),r._finishLoading())}))},n.prototype.loaded=function(){return this._loaded},n.prototype.updateImage=function(e){var t=this;return this.image&&e.url?(this.options.url=e.url,this.load(e.coordinates,(function(){t.texture=null})),this):this},n.prototype._finishLoading=function(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new e.Event("data",{dataType:"source",sourceDataType:"metadata"})))},n.prototype.onAdd=function(e){this.map=e,this.load()},n.prototype.setCoordinates=function(t){var n=this;this.coordinates=t;var r=t.map(e.MercatorCoordinate.fromLngLat);this.tileID=function(t){for(var n=1/0,r=1/0,a=-1/0,i=-1/0,o=0,s=t;on.end(0)?this.fire(new e.ErrorEvent(new e.ValidationError("Playback for this video can be set only between the "+n.start(0)+" and "+n.end(0)+"-second mark."))):this.video.currentTime=t}},n.prototype.getVideo=function(){return this.video},n.prototype.onAdd=function(e){this.map||(this.map=e,this.load(),this.video&&(this.video.play(),this.setCoordinates(this.coordinates)))},n.prototype.prepare=function(){if(!(0===Object.keys(this.tiles).length||this.video.readyState<2)){var t=this.map.painter.context,n=t.gl;for(var r in this.boundsBuffer||(this.boundsBuffer=t.createVertexBuffer(this._boundsArray,e.rasterBoundsAttributes.members)),this.boundsSegments||(this.boundsSegments=e.SegmentVector.simpleSegment(0,0,4,2)),this.texture?this.video.paused||(this.texture.bind(n.LINEAR,n.CLAMP_TO_EDGE),n.texSubImage2D(n.TEXTURE_2D,0,0,0,n.RGBA,n.UNSIGNED_BYTE,this.video)):(this.texture=new e.Texture(t,this.video,n.RGBA),this.texture.bind(n.LINEAR,n.CLAMP_TO_EDGE)),this.tiles){var a=this.tiles[r];"loaded"!==a.state&&(a.state="loaded",a.texture=this.texture)}}},n.prototype.serialize=function(){return{type:"video",urls:this.urls,coordinates:this.coordinates}},n.prototype.hasTransition=function(){return this.video&&!this.video.paused},n}(M),D=function(t){function n(n,r,a,i){t.call(this,n,r,a,i),r.coordinates?Array.isArray(r.coordinates)&&4===r.coordinates.length&&!r.coordinates.some((function(e){return!Array.isArray(e)||2!==e.length||e.some((function(e){return"number"!=typeof e}))}))||this.fire(new e.ErrorEvent(new e.ValidationError("sources."+n,null,'"coordinates" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new e.ErrorEvent(new e.ValidationError("sources."+n,null,'missing required property "coordinates"'))),r.animate&&"boolean"!=typeof r.animate&&this.fire(new e.ErrorEvent(new e.ValidationError("sources."+n,null,'optional "animate" property must be a boolean value'))),r.canvas?"string"==typeof r.canvas||r.canvas instanceof e.window.HTMLCanvasElement||this.fire(new e.ErrorEvent(new e.ValidationError("sources."+n,null,'"canvas" must be either a string representing the ID of the canvas element from which to read, or an HTMLCanvasElement instance'))):this.fire(new e.ErrorEvent(new e.ValidationError("sources."+n,null,'missing required property "canvas"'))),this.options=r,this.animate=void 0===r.animate||r.animate}return t&&(n.__proto__=t),n.prototype=Object.create(t&&t.prototype),n.prototype.constructor=n,n.prototype.load=function(){this._loaded=!0,this.canvas||(this.canvas=this.options.canvas instanceof e.window.HTMLCanvasElement?this.options.canvas:e.window.document.getElementById(this.options.canvas)),this.width=this.canvas.width,this.height=this.canvas.height,this._hasInvalidDimensions()?this.fire(new e.ErrorEvent(new Error("Canvas dimensions cannot be less than or equal to zero."))):(this.play=function(){this._playing=!0,this.map.triggerRepaint()},this.pause=function(){this._playing&&(this.prepare(),this._playing=!1)},this._finishLoading())},n.prototype.getCanvas=function(){return this.canvas},n.prototype.onAdd=function(e){this.map=e,this.load(),this.canvas&&this.animate&&this.play()},n.prototype.onRemove=function(){this.pause()},n.prototype.prepare=function(){var t=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,t=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,t=!0),!this._hasInvalidDimensions()&&0!==Object.keys(this.tiles).length){var n=this.map.painter.context,r=n.gl;for(var a in this.boundsBuffer||(this.boundsBuffer=n.createVertexBuffer(this._boundsArray,e.rasterBoundsAttributes.members)),this.boundsSegments||(this.boundsSegments=e.SegmentVector.simpleSegment(0,0,4,2)),this.texture?(t||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):this.texture=new e.Texture(n,this.canvas,r.RGBA,{premultiply:!0}),this.tiles){var i=this.tiles[a];"loaded"!==i.state&&(i.state="loaded",i.texture=this.texture)}}},n.prototype.serialize=function(){return{type:"canvas",coordinates:this.coordinates}},n.prototype.hasTransition=function(){return this._playing},n.prototype._hasInvalidDimensions=function(){for(var e=0,t=[this.canvas.width,this.canvas.height];ethis.max){var o=this._getAndRemoveByKey(this.order[0]);o&&this.onRemove(o)}return this},N.prototype.has=function(e){return e.wrapped().key in this.data},N.prototype.getAndRemove=function(e){return this.has(e)?this._getAndRemoveByKey(e.wrapped().key):null},N.prototype._getAndRemoveByKey=function(e){var t=this.data[e].shift();return t.timeout&&clearTimeout(t.timeout),0===this.data[e].length&&delete this.data[e],this.order.splice(this.order.indexOf(e),1),t.value},N.prototype.get=function(e){return this.has(e)?this.data[e.wrapped().key][0].value:null},N.prototype.remove=function(e,t){if(!this.has(e))return this;var n=e.wrapped().key,r=void 0===t?0:this.data[n].indexOf(t),a=this.data[n][r];return this.data[n].splice(r,1),a.timeout&&clearTimeout(a.timeout),0===this.data[n].length&&delete this.data[n],this.onRemove(a.value),this.order.splice(this.order.indexOf(n),1),this},N.prototype.setMaxSize=function(e){for(this.max=e;this.order.length>this.max;){var t=this._getAndRemoveByKey(this.order[0]);t&&this.onRemove(t)}return this};var B=function(e,t,n){this.context=e;var r=e.gl;this.buffer=r.createBuffer(),this.dynamicDraw=Boolean(n),this.context.unbindVAO(),e.bindElementBuffer.set(this.buffer),r.bufferData(r.ELEMENT_ARRAY_BUFFER,t.arrayBuffer,this.dynamicDraw?r.DYNAMIC_DRAW:r.STATIC_DRAW),this.dynamicDraw||delete t.arrayBuffer};B.prototype.bind=function(){this.context.bindElementBuffer.set(this.buffer)},B.prototype.updateData=function(e){var t=this.context.gl;this.context.unbindVAO(),this.bind(),t.bufferSubData(t.ELEMENT_ARRAY_BUFFER,0,e.arrayBuffer)},B.prototype.destroy=function(){var e=this.context.gl;this.buffer&&(e.deleteBuffer(this.buffer),delete this.buffer)};var V={Int8:"BYTE",Uint8:"UNSIGNED_BYTE",Int16:"SHORT",Uint16:"UNSIGNED_SHORT",Int32:"INT",Uint32:"UNSIGNED_INT",Float32:"FLOAT"},H=function(e,t,n,r){this.length=t.length,this.attributes=n,this.itemSize=t.bytesPerElement,this.dynamicDraw=r,this.context=e;var a=e.gl;this.buffer=a.createBuffer(),e.bindVertexBuffer.set(this.buffer),a.bufferData(a.ARRAY_BUFFER,t.arrayBuffer,this.dynamicDraw?a.DYNAMIC_DRAW:a.STATIC_DRAW),this.dynamicDraw||delete t.arrayBuffer};H.prototype.bind=function(){this.context.bindVertexBuffer.set(this.buffer)},H.prototype.updateData=function(e){var t=this.context.gl;this.bind(),t.bufferSubData(t.ARRAY_BUFFER,0,e.arrayBuffer)},H.prototype.enableAttributes=function(e,t){for(var n=0;n1||(Math.abs(n)>1&&(1===Math.abs(n+a)?n+=a:1===Math.abs(n-a)&&(n-=a)),t.dem&&e.dem&&(e.dem.backfillBorder(t.dem,n,r),e.neighboringTiles&&e.neighboringTiles[i]&&(e.neighboringTiles[i].backfilled=!0)))}},n.prototype.getTile=function(e){return this.getTileByID(e.key)},n.prototype.getTileByID=function(e){return this._tiles[e]},n.prototype.getZoom=function(e){return e.zoom+e.scaleZoom(e.tileSize/this._source.tileSize)},n.prototype._retainLoadedChildren=function(e,t,n,r){for(var a in this._tiles){var i=this._tiles[a];if(!(r[a]||!i.hasData()||i.tileID.overscaledZ<=t||i.tileID.overscaledZ>n)){for(var o=i.tileID;i&&i.tileID.overscaledZ>t+1;){var s=i.tileID.scaledTo(i.tileID.overscaledZ-1);(i=this._tiles[s.key])&&i.hasData()&&(o=s)}for(var u=o;u.overscaledZ>t;)if(e[(u=u.scaledTo(u.overscaledZ-1)).key]){r[o.key]=o;break}}}},n.prototype.findLoadedParent=function(e,t){for(var n=e.overscaledZ-1;n>=t;n--){var r=e.scaledTo(n);if(!r)return;var a=String(r.key),i=this._tiles[a];if(i&&i.hasData())return i;if(this._cache.has(r))return this._cache.get(r)}},n.prototype.updateCacheSize=function(e){var t=(Math.ceil(e.width/this._source.tileSize)+1)*(Math.ceil(e.height/this._source.tileSize)+1),n=Math.floor(5*t),r="number"==typeof this._maxTileCacheSize?Math.min(this._maxTileCacheSize,n):n;this._cache.setMaxSize(r)},n.prototype.handleWrapJump=function(e){var t=(e-(void 0===this._prevLng?e:this._prevLng))/360,n=Math.round(t);if(this._prevLng=e,n){var r={};for(var a in this._tiles){var i=this._tiles[a];i.tileID=i.tileID.unwrapTo(i.tileID.wrap+n),r[i.tileID.key]=i}for(var o in this._tiles=r,this._timers)clearTimeout(this._timers[o]),delete this._timers[o];for(var s in this._tiles){var u=this._tiles[s];this._setTileReloadTimer(s,u)}}},n.prototype.update=function(t){var r=this;if(this.transform=t,this._sourceLoaded&&!this._paused){var a;this.updateCacheSize(t),this.handleWrapJump(this.transform.center.lng),this._coveredTiles={},this.used?this._source.tileID?a=t.getVisibleUnwrappedCoordinates(this._source.tileID).map((function(t){return new e.OverscaledTileID(t.canonical.z,t.wrap,t.canonical.z,t.canonical.x,t.canonical.y)})):(a=t.coveringTiles({tileSize:this._source.tileSize,minzoom:this._source.minzoom,maxzoom:this._source.maxzoom,roundZoom:this._source.roundZoom,reparseOverscaled:this._source.reparseOverscaled}),this._source.hasTile&&(a=a.filter((function(e){return r._source.hasTile(e)})))):a=[];var i=(this._source.roundZoom?Math.round:Math.floor)(this.getZoom(t)),o=Math.max(i-n.maxOverzooming,this._source.minzoom),s=Math.max(i+n.maxUnderzooming,this._source.minzoom),u=this._updateRetainedTiles(a,i);if(ke(this._source.type)){for(var c={},l={},d=0,f=Object.keys(u);dthis._source.maxzoom){var v=h.children(this._source.maxzoom)[0],m=this.getTile(v);if(m&&m.hasData()){r[v.key]=v;continue}}else{var y=h.children(this._source.maxzoom);if(r[y[0].key]&&r[y[1].key]&&r[y[2].key]&&r[y[3].key])continue}for(var b=g.wasRequested(),_=h.overscaledZ-1;_>=i;--_){var x=h.scaledTo(_);if(a[x.key])break;if(a[x.key]=!0,!(g=this.getTile(x))&&b&&(g=this._addTile(x)),g&&(r[x.key]=x,b=g.wasRequested(),g.hasData()))break}}}return r},n.prototype._addTile=function(t){var n=this._tiles[t.key];if(n)return n;(n=this._cache.getAndRemove(t))&&(this._setTileReloadTimer(t.key,n),n.tileID=t,this._state.initializeTileState(n,this.map?this.map.painter:null),this._cacheTimers[t.key]&&(clearTimeout(this._cacheTimers[t.key]),delete this._cacheTimers[t.key],this._setTileReloadTimer(t.key,n)));var r=Boolean(n);return r||(n=new e.Tile(t,this._source.tileSize*t.overscaleFactor()),this._loadTile(n,this._tileLoaded.bind(this,n,t.key,n.state))),n?(n.uses++,this._tiles[t.key]=n,r||this._source.fire(new e.Event("dataloading",{tile:n,coord:n.tileID,dataType:"source"})),n):null},n.prototype._setTileReloadTimer=function(e,t){var n=this;e in this._timers&&(clearTimeout(this._timers[e]),delete this._timers[e]);var r=t.getExpiryTimeout();r&&(this._timers[e]=setTimeout((function(){n._reloadTile(e,"expired"),delete n._timers[e]}),r))},n.prototype._removeTile=function(e){var t=this._tiles[e];t&&(t.uses--,delete this._tiles[e],this._timers[e]&&(clearTimeout(this._timers[e]),delete this._timers[e]),t.uses>0||(t.hasData()&&"reloading"!==t.state?this._cache.add(t.tileID,t,t.getExpiryTimeout()):(t.aborted=!0,this._abortTile(t),this._unloadTile(t))))},n.prototype.clearTiles=function(){for(var e in this._shouldReloadOnResume=!1,this._paused=!1,this._tiles)this._removeTile(e);this._cache.reset()},n.prototype.tilesIn=function(t,n,r){var a=this,i=[],o=this.transform;if(!o)return i;for(var s=r?o.getCameraQueryGeometry(t):t,u=t.map((function(e){return o.pointCoordinate(e)})),c=s.map((function(e){return o.pointCoordinate(e)})),l=this.getIds(),d=1/0,f=1/0,p=-1/0,h=-1/0,g=0,v=c;g=0&&m[1].y+v>=0){var y=u.map((function(e){return s.getTilePoint(e)})),b=c.map((function(e){return s.getTilePoint(e)}));i.push({tile:r,tileID:s,queryGeometry:y,cameraQueryGeometry:b,scale:g})}}},b=0;b=e.browser.now())return!0}return!1},n.prototype.setFeatureState=function(e,t,n){e=e||"_geojsonTileLayer",this._state.updateState(e,t,n)},n.prototype.removeFeatureState=function(e,t,n){e=e||"_geojsonTileLayer",this._state.removeFeatureState(e,t,n)},n.prototype.getFeatureState=function(e,t){return e=e||"_geojsonTileLayer",this._state.getState(e,t)},n}(e.Evented);function Me(e,t){return e%32-t%32||t-e}function ke(e){return"raster"===e||"image"===e||"video"===e}function De(){return new e.window.Worker(ta.workerUrl)}Oe.maxOverzooming=10,Oe.maxUnderzooming=3;var Ie=function(){this.active={}};Ie.prototype.acquire=function(e){if(!this.workers)for(this.workers=[];this.workers.length=-t[0]&&n<=t[0]&&r>=-t[1]&&r<=t[1]}function $e(t,n,r,a,i,o,s,u){var c=a?t.textSizeData:t.iconSizeData,l=e.evaluateSizeForZoom(c,r.transform.zoom),d=[256/r.width*2+1,256/r.height*2+1],f=a?t.text.dynamicLayoutVertexArray:t.icon.dynamicLayoutVertexArray;f.clear();for(var p=t.lineVertexArray,h=a?t.text.placedSymbolArray:t.icon.placedSymbolArray,g=r.transform.width/r.transform.height,v=!1,m=0;mMath.abs(r.x-n.x)*a?{useVertical:!0}:(t===e.WritingMode.vertical?n.yr.x)?{needsFlipping:!0}:null}function tt(t,n,r,a,i,o,s,u,c,l,d,f,p,h){var g,v=n/24,m=t.lineOffsetX*v,y=t.lineOffsetY*v;if(t.numGlyphs>1){var b=t.glyphStartIndex+t.numGlyphs,_=t.lineStartIndex,x=t.lineStartIndex+t.lineLength,R=Qe(v,u,m,y,r,d,f,t,c,o,p,!1);if(!R)return{notEnoughRoom:!0};var w=Je(R.first.point,s).point,E=Je(R.last.point,s).point;if(a&&!r){var S=et(t.writingMode,w,E,h);if(S)return S}g=[R.first];for(var A=t.glyphStartIndex+1;A0?O.point:nt(f,C,T,1,i),k=et(t.writingMode,T,M,h);if(k)return k}var D=rt(v*u.getoffsetX(t.glyphStartIndex),m,y,r,d,f,t.segment,t.lineStartIndex,t.lineStartIndex+t.lineLength,c,o,p,!1);if(!D)return{notEnoughRoom:!0};g=[D]}for(var I=0,L=g;I0?1:-1,v=0;a&&(g*=-1,v=Math.PI),g<0&&(v+=Math.PI);for(var m=g>0?u+s:u+s+1,y=m,b=i,_=i,x=0,R=0,w=Math.abs(h);x+R<=w;){if((m+=g)=c)return null;if(_=b,void 0===(b=f[m])){var E=new e.Point(l.getx(m),l.gety(m)),S=Je(E,d);if(S.signedDistanceFromCamera>0)b=f[m]=S.point;else{var A=m-g;b=nt(0===x?o:new e.Point(l.getx(A),l.gety(A)),E,_,w-x+1,d)}}x+=R,R=_.dist(b)}var T=(w-x)/R,P=b.sub(_),C=P.mult(T)._add(_);return C._add(P._unit()._perp()._mult(r*g)),{point:C,angle:v+Math.atan2(b.y-_.y,b.x-_.x),tileDistance:p?{prevTileDistance:m-g===y?0:l.gettileUnitDistanceFromAnchor(m-g),lastSegmentViewportDistance:w-x}:null}}Ke.prototype.keysLength=function(){return this.boxKeys.length+this.circleKeys.length},Ke.prototype.insert=function(e,t,n,r,a){this._forEachCell(t,n,r,a,this._insertBoxCell,this.boxUid++),this.boxKeys.push(e),this.bboxes.push(t),this.bboxes.push(n),this.bboxes.push(r),this.bboxes.push(a)},Ke.prototype.insertCircle=function(e,t,n,r){this._forEachCell(t-r,n-r,t+r,n+r,this._insertCircleCell,this.circleUid++),this.circleKeys.push(e),this.circles.push(t),this.circles.push(n),this.circles.push(r)},Ke.prototype._insertBoxCell=function(e,t,n,r,a,i){this.boxCells[a].push(i)},Ke.prototype._insertCircleCell=function(e,t,n,r,a,i){this.circleCells[a].push(i)},Ke.prototype._query=function(e,t,n,r,a,i){if(n<0||e>this.width||r<0||t>this.height)return!a&&[];var o=[];if(e<=0&&t<=0&&this.width<=n&&this.height<=r){if(a)return!0;for(var s=0;s0:o},Ke.prototype._queryCircle=function(e,t,n,r,a){var i=e-n,o=e+n,s=t-n,u=t+n;if(o<0||i>this.width||u<0||s>this.height)return!r&&[];var c=[],l={hitTest:r,circle:{x:e,y:t,radius:n},seenUids:{box:{},circle:{}}};return this._forEachCell(i,s,o,u,this._queryCellCircle,c,l,a),r?c.length>0:c},Ke.prototype.query=function(e,t,n,r,a){return this._query(e,t,n,r,!1,a)},Ke.prototype.hitTest=function(e,t,n,r,a){return this._query(e,t,n,r,!0,a)},Ke.prototype.hitTestCircle=function(e,t,n,r){return this._queryCircle(e,t,n,!0,r)},Ke.prototype._queryCell=function(e,t,n,r,a,i,o,s){var u=o.seenUids,c=this.boxCells[a];if(null!==c)for(var l=this.bboxes,d=0,f=c;d=l[h+0]&&r>=l[h+1]&&(!s||s(this.boxKeys[p]))){if(o.hitTest)return i.push(!0),!0;i.push({key:this.boxKeys[p],x1:l[h],y1:l[h+1],x2:l[h+2],y2:l[h+3]})}}}var g=this.circleCells[a];if(null!==g)for(var v=this.circles,m=0,y=g;mo*o+s*s},Ke.prototype._circleAndRectCollide=function(e,t,n,r,a,i,o){var s=(i-r)/2,u=Math.abs(e-(r+s));if(u>s+n)return!1;var c=(o-a)/2,l=Math.abs(t-(a+c));if(l>c+n)return!1;if(u<=s||l<=c)return!0;var d=u-s,f=l-c;return d*d+f*f<=n*n};var at=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function it(e,t){for(var n=0;nT)ut(t,P,!1);else{var D=this.projectPoint(c,C,O),I=M*E;if(h.length>0){var L=D.x-h[h.length-4],j=D.y-h[h.length-3];if(I*I*2>L*L+j*j&&P+8-A&&F=this.screenRightBoundary||r<100||t>this.screenBottomBoundary},st.prototype.isInsideGrid=function(e,t,n,r){return n>=0&&e=0&&t0?(this.prevPlacement&&this.prevPlacement.variableOffsets[d.crossTileID]&&this.prevPlacement.placements[d.crossTileID]&&this.prevPlacement.placements[d.crossTileID].text&&(g=this.prevPlacement.variableOffsets[d.crossTileID].anchor),this.variableOffsets[d.crossTileID]={textOffset:v,width:n,height:r,anchor:e,textBoxScale:a,prevAnchor:g},this.markUsedJustification(f,e,d,p),f.allowVerticalPlacement&&(this.markUsedOrientation(f,p,d),this.placedOrientations[d.crossTileID]=p),{shift:m,placedGlyphBoxes:y}):void 0},mt.prototype.placeLayerBucket=function(t,n,r,a,i,o,s,u,c,l){var d=this,f=t.layers[0].layout,p=e.evaluateSizeForZoom(t.textSizeData,this.transform.zoom),h=f.get("text-optional"),g=f.get("icon-optional"),v=f.get("text-allow-overlap"),m=f.get("icon-allow-overlap"),y=v&&(m||!t.hasIconData()||g),b=m&&(v||!t.hasTextData()||h),_=this.collisionGroups.get(t.sourceID),x="map"===f.get("text-rotation-alignment"),R="map"===f.get("text-pitch-alignment"),w="none"!==f.get("icon-text-fit"),E="viewport-y"===f.get("symbol-z-order");!t.collisionArrays&&l&&t.deserializeCollisionBoxes(l);var S=function(a,l){if(!c[a.crossTileID])if(u)d.placements[a.crossTileID]=new ft(!1,!1,!1);else{var E,S=!1,A=!1,T=!0,P=null,C={box:null,offscreen:null},O={box:null,offscreen:null},M=null,k=null,D=0,I=0,L=0;l.textFeatureIndex&&(D=l.textFeatureIndex),l.verticalTextFeatureIndex&&(I=l.verticalTextFeatureIndex);var j=l.textBox;if(j){var F=function(n){var r=e.WritingMode.horizontal;if(t.allowVerticalPlacement&&!n&&d.prevPlacement){var i=d.prevPlacement.placedOrientations[a.crossTileID];i&&(d.placedOrientations[a.crossTileID]=i,r=i,d.markUsedOrientation(t,r,a))}return r},z=function(n,r){if(t.allowVerticalPlacement&&a.numVerticalGlyphVertices>0&&l.verticalTextBox)for(var i=0,o=t.writingModes;i0&&(N=N.filter((function(e){return e!==B.anchor}))).unshift(B.anchor)}var V=function(e,r,i){for(var s=e.x2-e.x1,u=e.y2-e.y1,c=a.textBoxScale,l=w&&!m?r:null,f={box:[],offscreen:!1},p=v?2*N.length:N.length,h=0;h=N.length,b=d.attemptAnchorPlacement(g,e,s,u,c,x,R,o,n,_,y,a,t,i,l);if(b&&(f=b.placedGlyphBoxes)&&f.box&&f.box.length){S=!0,P=b.shift;break}}return f};z((function(){return V(j,l.iconBox,e.WritingMode.horizontal)}),(function(){var n=l.verticalTextBox,r=C&&C.box&&C.box.length;return t.allowVerticalPlacement&&!r&&a.numVerticalGlyphVertices>0&&n?V(n,l.verticalIconBox,e.WritingMode.vertical):{box:null,offscreen:null}})),C&&(S=C.box,T=C.offscreen);var H=F(C&&C.box);if(!S&&d.prevPlacement){var U=d.prevPlacement.variableOffsets[a.crossTileID];U&&(d.variableOffsets[a.crossTileID]=U,d.markUsedJustification(t,U.anchor,a,H))}}else{var W=function(e,r){var i=d.collisionIndex.placeCollisionBox(e,f.get("text-allow-overlap"),o,n,_.predicate);return i&&i.box&&i.box.length&&(d.markUsedOrientation(t,r,a),d.placedOrientations[a.crossTileID]=r),i};z((function(){return W(j,e.WritingMode.horizontal)}),(function(){var n=l.verticalTextBox;return t.allowVerticalPlacement&&a.numVerticalGlyphVertices>0&&n?W(n,e.WritingMode.vertical):{box:null,offscreen:null}})),F(C&&C.box&&C.box.length)}}S=(E=C)&&E.box&&E.box.length>0,T=E&&E.offscreen;var q=l.textCircles;if(q){var G=t.text.placedSymbolArray.get(a.centerJustifiedTextSymbolIndex),K=e.evaluateSizeForFeature(t.textSizeData,p,G);M=d.collisionIndex.placeCollisionCircles(q,f.get("text-allow-overlap"),i,o,G,t.lineVertexArray,t.glyphOffsetArray,K,n,r,s,R,_.predicate),S=f.get("text-allow-overlap")||M.circles.length>0,T=T&&M.offscreen}if(l.iconFeatureIndex&&(L=l.iconFeatureIndex),l.iconBox){var Y=function(e){var t=w&&P?vt(e,P.x,P.y,x,R,d.transform.angle):e;return d.collisionIndex.placeCollisionBox(t,f.get("icon-allow-overlap"),o,n,_.predicate)};A=O&&O.box&&O.box.length&&l.verticalIconBox?(k=Y(l.verticalIconBox)).box.length>0:(k=Y(l.iconBox)).box.length>0,T=T&&k.offscreen}var X=h||0===a.numHorizontalGlyphVertices&&0===a.numVerticalGlyphVertices,J=g||0===a.numIconVertices;X||J?J?X||(A=A&&S):S=A&&S:A=S=A&&S,S&&E&&E.box&&(O&&O.box&&I?d.collisionIndex.insertCollisionBox(E.box,f.get("text-ignore-placement"),t.bucketInstanceId,I,_.ID):d.collisionIndex.insertCollisionBox(E.box,f.get("text-ignore-placement"),t.bucketInstanceId,D,_.ID)),A&&k&&d.collisionIndex.insertCollisionBox(k.box,f.get("icon-ignore-placement"),t.bucketInstanceId,L,_.ID),S&&M&&d.collisionIndex.insertCollisionCircles(M.circles,f.get("text-ignore-placement"),t.bucketInstanceId,D,_.ID),d.placements[a.crossTileID]=new ft(S||y,A||b,T||t.justReloaded),c[a.crossTileID]=!0}};if(E)for(var A=t.getSortedSymbolIndexes(this.transform.angle),T=A.length-1;T>=0;--T){var P=A[T];S(t.symbolInstances.get(P),t.collisionArrays[P])}else for(var C=0;C=0&&(t.text.placedSymbolArray.get(c).crossTileID=i>=0&&c!==i?0:r.crossTileID)}},mt.prototype.markUsedOrientation=function(t,n,r){for(var a=n===e.WritingMode.horizontal||n===e.WritingMode.horizontalOnly?n:0,i=n===e.WritingMode.vertical?n:0,o=0,s=[r.leftJustifiedTextSymbolIndex,r.centerJustifiedTextSymbolIndex,r.rightJustifiedTextSymbolIndex];o0||u>0,b=i.numIconVertices>0,_=a.placedOrientations[i.crossTileID],x=_===e.WritingMode.vertical,R=_===e.WritingMode.horizontal||_===e.WritingMode.horizontalOnly;if(y){var w=At(m.text),E=x?Tt:w;h(t.text,s,E);var S=R?Tt:w;h(t.text,u,S);var A=m.text.isHidden();[i.rightJustifiedTextSymbolIndex,i.centerJustifiedTextSymbolIndex,i.leftJustifiedTextSymbolIndex].forEach((function(e){e>=0&&(t.text.placedSymbolArray.get(e).hidden=A||x?1:0)})),i.verticalPlacedTextSymbolIndex>=0&&(t.text.placedSymbolArray.get(i.verticalPlacedTextSymbolIndex).hidden=A||R?1:0);var T=a.variableOffsets[i.crossTileID];T&&a.markUsedJustification(t,T.anchor,i,_);var P=a.placedOrientations[i.crossTileID];P&&(a.markUsedJustification(t,"left",i,P),a.markUsedOrientation(t,P,i))}if(b){var C=At(m.icon),O=!(f&&i.verticalPlacedIconSymbolIndex&&x);if(i.placedIconSymbolIndex>=0){var M=O?C:Tt;h(t.icon,i.numIconVertices,M),t.icon.placedSymbolArray.get(i.placedIconSymbolIndex).hidden=m.icon.isHidden()}if(i.verticalPlacedIconSymbolIndex>=0){var k=O?Tt:C;h(t.icon,i.numVerticalIconVertices,k),t.icon.placedSymbolArray.get(i.verticalPlacedIconSymbolIndex).hidden=m.icon.isHidden()}}if(t.hasIconCollisionBoxData()||t.hasIconCollisionCircleData()||t.hasTextCollisionBoxData()||t.hasTextCollisionCircleData()){var D=t.collisionArrays[r];if(D){var I=new e.Point(0,0);if(D.textBox||D.verticalTextBox){var L=!0;if(c){var j=a.variableOffsets[g];j?(I=gt(j.anchor,j.width,j.height,j.textOffset,j.textBoxScale),l&&I._rotate(d?a.transform.angle:-a.transform.angle)):L=!1}D.textBox&&yt(t.textCollisionBox.collisionVertexArray,m.text.placed,!L||x,I.x,I.y),D.verticalTextBox&&yt(t.textCollisionBox.collisionVertexArray,m.text.placed,!L||R,I.x,I.y)}var F=Boolean(!R&&D.verticalIconBox);D.iconBox&&yt(t.iconCollisionBox.collisionVertexArray,m.icon.placed,F,f?I.x:0,f?I.y:0),D.verticalIconBox&&yt(t.iconCollisionBox.collisionVertexArray,m.icon.placed,!F,f?I.x:0,f?I.y:0);var z=D.textCircles;if(z&&t.hasTextCollisionCircleData())for(var N=0;Ne},mt.prototype.setStale=function(){this.stale=!0};var bt=Math.pow(2,25),_t=Math.pow(2,24),xt=Math.pow(2,17),Rt=Math.pow(2,16),wt=Math.pow(2,9),Et=Math.pow(2,8),St=Math.pow(2,1);function At(e){if(0===e.opacity&&!e.placed)return 0;if(1===e.opacity&&e.placed)return 4294967295;var t=e.placed?1:0,n=Math.floor(127*e.opacity);return n*bt+t*_t+n*xt+t*Rt+n*wt+t*Et+n*St+t}var Tt=0,Pt=function(){this._currentTileIndex=0,this._seenCrossTileIDs={}};Pt.prototype.continuePlacement=function(e,t,n,r,a){for(;this._currentTileIndex2};this._currentPlacementIndex>=0;){var s=n[t[this._currentPlacementIndex]],u=this.placement.collisionIndex.transform.zoom;if("symbol"===s.type&&(!s.minzoom||s.minzoom<=u)&&(!s.maxzoom||s.maxzoom>u)){if(this._inProgressLayer||(this._inProgressLayer=new Pt),this._inProgressLayer.continuePlacement(r[s.source],this.placement,this._showCollisionBoxes,s,o))return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0},Ct.prototype.commit=function(e){return this.placement.commit(e),this.placement};var Ot=512/e.EXTENT/2,Mt=function(e,t,n){this.tileID=e,this.indexedSymbolInstances={},this.bucketInstanceId=n;for(var r=0;re.overscaledZ)for(var s in o){var u=o[s];u.tileID.isChildOf(e)&&u.findMatches(t.symbolInstances,e,a)}else{var c=o[e.scaledTo(Number(i)).key];c&&c.findMatches(t.symbolInstances,e,a)}}for(var l=0;l1?"@2x":"",u=e.getJSON(n.transformRequest(n.normalizeSpriteURL(t,s,".json"),e.ResourceType.SpriteJSON),(function(e,t){u=null,o||(o=e,a=t,l())})),c=e.getImage(n.transformRequest(n.normalizeSpriteURL(t,s,".png"),e.ResourceType.SpriteImage),(function(e,t){c=null,o||(o=e,i=t,l())}));function l(){if(o)r(o);else if(a&&i){var t=e.browser.getImageData(i),n={};for(var s in a){var u=a[s],c=u.width,l=u.height,d=u.x,f=u.y,p=u.sdf,h=u.pixelRatio,g=new e.RGBAImage({width:c,height:l});e.RGBAImage.copy(t,g,{x:d,y:f},{x:0,y:0},{width:c,height:l}),n[s]={data:g,pixelRatio:h,sdf:p}}r(null,n)}}return{cancel:function(){u&&(u.cancel(),u=null),c&&(c.cancel(),c=null)}}}(t.sprite,this.map._requestManager,(function(t,n){if(r._spriteRequest=null,t)r.fire(new e.ErrorEvent(t));else if(n)for(var a in n)r.imageManager.addImage(a,n[a]);r.imageManager.setLoaded(!0),r.dispatcher.broadcast("setImages",r.imageManager.listImages()),r.fire(new e.Event("data",{dataType:"style"}))})):this.imageManager.setLoaded(!0),this.glyphManager.setURL(t.glyphs);var i=ze(this.stylesheet.layers);this._order=i.map((function(e){return e.id})),this._layers={};for(var o=0,s=i;o0)throw new Error("Unimplemented: "+a.map((function(e){return e.command})).join(", ")+".");return r.forEach((function(e){"setTransition"!==e.command&&n[e.command].apply(n,e.args)})),this.stylesheet=t,!0},n.prototype.addImage=function(t,n){if(this.getImage(t))return this.fire(new e.ErrorEvent(new Error("An image with this name already exists.")));this.imageManager.addImage(t,n),this.fire(new e.Event("data",{dataType:"style"}))},n.prototype.updateImage=function(e,t){this.imageManager.updateImage(e,t)},n.prototype.getImage=function(e){return this.imageManager.getImage(e)},n.prototype.removeImage=function(t){if(!this.getImage(t))return this.fire(new e.ErrorEvent(new Error("No image with this name exists.")));this.imageManager.removeImage(t),this.fire(new e.Event("data",{dataType:"style"}))},n.prototype.listImages=function(){return this._checkLoaded(),this.imageManager.listImages()},n.prototype.addSource=function(t,n,r){var a=this;if(void 0===r&&(r={}),this._checkLoaded(),void 0!==this.sourceCaches[t])throw new Error("There is already a source with this ID");if(!n.type)throw new Error("The type property must be defined, but the only the following properties were given: "+Object.keys(n).join(", ")+".");if(!(["vector","raster","geojson","video","image"].indexOf(n.type)>=0&&this._validate(e.validateStyle.source,"sources."+t,n,null,r))){this.map&&this.map._collectResourceTiming&&(n.collectResourceTiming=!0);var i=this.sourceCaches[t]=new Oe(t,n,this.dispatcher);i.style=this,i.setEventedParent(this,(function(){return{isSourceLoaded:a.loaded(),source:i.serialize(),sourceId:t}})),i.onAdd(this.map),this._changed=!0}},n.prototype.removeSource=function(t){if(this._checkLoaded(),void 0===this.sourceCaches[t])throw new Error("There is no source with this ID");for(var n in this._layers)if(this._layers[n].source===t)return this.fire(new e.ErrorEvent(new Error('Source "'+t+'" cannot be removed while layer "'+n+'" is using it.')));var r=this.sourceCaches[t];delete this.sourceCaches[t],delete this._updatedSources[t],r.fire(new e.Event("data",{sourceDataType:"metadata",dataType:"source",sourceId:t})),r.setEventedParent(null),r.clearTiles(),r.onRemove&&r.onRemove(this.map),this._changed=!0},n.prototype.setGeoJSONSourceData=function(e,t){this._checkLoaded(),this.sourceCaches[e].getSource().setData(t),this._changed=!0},n.prototype.getSource=function(e){return this.sourceCaches[e]&&this.sourceCaches[e].getSource()},n.prototype.addLayer=function(t,n,r){void 0===r&&(r={}),this._checkLoaded();var a=t.id;if(this.getLayer(a))this.fire(new e.ErrorEvent(new Error('Layer with id "'+a+'" already exists on this map')));else{var i;if("custom"===t.type){if(Lt(this,e.validateCustomStyleLayer(t)))return;i=e.createStyleLayer(t)}else{if("object"==typeof t.source&&(this.addSource(a,t.source),t=e.clone$1(t),t=e.extend(t,{source:a})),this._validate(e.validateStyle.layer,"layers."+a,t,{arrayIndex:-1},r))return;i=e.createStyleLayer(t),this._validateLayer(i),i.setEventedParent(this,{layer:{id:a}})}var o=n?this._order.indexOf(n):this._order.length;if(n&&-1===o)this.fire(new e.ErrorEvent(new Error('Layer with id "'+n+'" does not exist on this map.')));else{if(this._order.splice(o,0,a),this._layerOrderChanged=!0,this._layers[a]=i,this._removedLayers[a]&&i.source&&"custom"!==i.type){var s=this._removedLayers[a];delete this._removedLayers[a],s.type!==i.type?this._updatedSources[i.source]="clear":(this._updatedSources[i.source]="reload",this.sourceCaches[i.source].pause())}this._updateLayer(i),i.onAdd&&i.onAdd(this.map)}}},n.prototype.moveLayer=function(t,n){if(this._checkLoaded(),this._changed=!0,this._layers[t]){if(t!==n){var r=this._order.indexOf(t);this._order.splice(r,1);var a=n?this._order.indexOf(n):this._order.length;n&&-1===a?this.fire(new e.ErrorEvent(new Error('Layer with id "'+n+'" does not exist on this map.'))):(this._order.splice(a,0,t),this._layerOrderChanged=!0)}}else this.fire(new e.ErrorEvent(new Error("The layer '"+t+"' does not exist in the map's style and cannot be moved.")))},n.prototype.removeLayer=function(t){this._checkLoaded();var n=this._layers[t];if(n){n.setEventedParent(null);var r=this._order.indexOf(t);this._order.splice(r,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[t]=n,delete this._layers[t],delete this._updatedLayers[t],delete this._updatedPaintProps[t],n.onRemove&&n.onRemove(this.map)}else this.fire(new e.ErrorEvent(new Error("The layer '"+t+"' does not exist in the map's style and cannot be removed.")))},n.prototype.getLayer=function(e){return this._layers[e]},n.prototype.setLayerZoomRange=function(t,n,r){this._checkLoaded();var a=this.getLayer(t);a?a.minzoom===n&&a.maxzoom===r||(null!=n&&(a.minzoom=n),null!=r&&(a.maxzoom=r),this._updateLayer(a)):this.fire(new e.ErrorEvent(new Error("The layer '"+t+"' does not exist in the map's style and cannot have zoom extent.")))},n.prototype.setFilter=function(t,n,r){void 0===r&&(r={}),this._checkLoaded();var a=this.getLayer(t);if(a){if(!e.deepEqual(a.filter,n))return null==n?(a.filter=void 0,void this._updateLayer(a)):void(this._validate(e.validateStyle.filter,"layers."+a.id+".filter",n,null,r)||(a.filter=e.clone$1(n),this._updateLayer(a)))}else this.fire(new e.ErrorEvent(new Error("The layer '"+t+"' does not exist in the map's style and cannot be filtered.")))},n.prototype.getFilter=function(t){return e.clone$1(this.getLayer(t).filter)},n.prototype.setLayoutProperty=function(t,n,r,a){void 0===a&&(a={}),this._checkLoaded();var i=this.getLayer(t);i?e.deepEqual(i.getLayoutProperty(n),r)||(i.setLayoutProperty(n,r,a),this._updateLayer(i)):this.fire(new e.ErrorEvent(new Error("The layer '"+t+"' does not exist in the map's style and cannot be styled.")))},n.prototype.getLayoutProperty=function(t,n){var r=this.getLayer(t);if(r)return r.getLayoutProperty(n);this.fire(new e.ErrorEvent(new Error("The layer '"+t+"' does not exist in the map's style.")))},n.prototype.setPaintProperty=function(t,n,r,a){void 0===a&&(a={}),this._checkLoaded();var i=this.getLayer(t);i?e.deepEqual(i.getPaintProperty(n),r)||(i.setPaintProperty(n,r,a)&&this._updateLayer(i),this._changed=!0,this._updatedPaintProps[t]=!0):this.fire(new e.ErrorEvent(new Error("The layer '"+t+"' does not exist in the map's style and cannot be styled.")))},n.prototype.getPaintProperty=function(e,t){return this.getLayer(e).getPaintProperty(t)},n.prototype.setFeatureState=function(t,n){this._checkLoaded();var r=t.source,a=t.sourceLayer,i=this.sourceCaches[r],o=parseInt(t.id,10);if(void 0!==i){var s=i.getSource().type;"geojson"===s&&a?this.fire(new e.ErrorEvent(new Error("GeoJSON sources cannot have a sourceLayer parameter."))):"vector"!==s||a?isNaN(o)||o<0?this.fire(new e.ErrorEvent(new Error("The feature id parameter must be provided and non-negative."))):i.setFeatureState(a,o,n):this.fire(new e.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")))}else this.fire(new e.ErrorEvent(new Error("The source '"+r+"' does not exist in the map's style.")))},n.prototype.removeFeatureState=function(t,n){this._checkLoaded();var r=t.source,a=this.sourceCaches[r];if(void 0!==a){var i=a.getSource().type,o="vector"===i?t.sourceLayer:void 0,s=parseInt(t.id,10);"vector"!==i||o?void 0!==t.id&&isNaN(s)||s<0?this.fire(new e.ErrorEvent(new Error("The feature id parameter must be non-negative."))):n&&"string"!=typeof t.id&&"number"!=typeof t.id?this.fire(new e.ErrorEvent(new Error("A feature id is requred to remove its specific state property."))):a.removeFeatureState(o,s,n):this.fire(new e.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")))}else this.fire(new e.ErrorEvent(new Error("The source '"+r+"' does not exist in the map's style.")))},n.prototype.getFeatureState=function(t){this._checkLoaded();var n=t.source,r=t.sourceLayer,a=this.sourceCaches[n],i=parseInt(t.id,10);if(void 0!==a)if("vector"!==a.getSource().type||r){if(!(isNaN(i)||i<0))return a.getFeatureState(r,i);this.fire(new e.ErrorEvent(new Error("The feature id parameter must be provided and non-negative.")))}else this.fire(new e.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")));else this.fire(new e.ErrorEvent(new Error("The source '"+n+"' does not exist in the map's style.")))},n.prototype.getTransition=function(){return e.extend({duration:300,delay:0},this.stylesheet&&this.stylesheet.transition)},n.prototype.serialize=function(){return e.filterObject({version:this.stylesheet.version,name:this.stylesheet.name,metadata:this.stylesheet.metadata,light:this.stylesheet.light,center:this.stylesheet.center,zoom:this.stylesheet.zoom,bearing:this.stylesheet.bearing,pitch:this.stylesheet.pitch,sprite:this.stylesheet.sprite,glyphs:this.stylesheet.glyphs,transition:this.stylesheet.transition,sources:e.mapObject(this.sourceCaches,(function(e){return e.serialize()})),layers:this._serializeLayers(this._order)},(function(e){return void 0!==e}))},n.prototype._updateLayer=function(e){this._updatedLayers[e.id]=!0,e.source&&!this._updatedSources[e.source]&&(this._updatedSources[e.source]="reload",this.sourceCaches[e.source].pause()),this._changed=!0},n.prototype._flattenAndSortRenderedFeatures=function(e){for(var t=this,n=function(e){return"fill-extrusion"===t._layers[e].type},r={},a=[],i=this._order.length-1;i>=0;i--){var o=this._order[i];if(n(o)){r[o]=i;for(var s=0,u=e;s=0;h--){var g=this._order[h];if(n(g))for(var v=a.length-1;v>=0;v--){var m=a[v].feature;if(r[m.layer.id] 0.5) {gl_FragColor=vec4(0.0,0.0,1.0,0.5)*alpha;}if (v_notUsed > 0.5) {gl_FragColor*=.1;}}","attribute vec2 a_pos;attribute vec2 a_anchor_pos;attribute vec2 a_extrude;attribute vec2 a_placed;attribute vec2 a_shift;uniform mat4 u_matrix;uniform vec2 u_extrude_scale;uniform float u_camera_to_center_distance;varying float v_placed;varying float v_notUsed;void main() {vec4 projectedPoint=u_matrix*vec4(a_anchor_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float collision_perspective_ratio=clamp(0.5+0.5*(u_camera_to_center_distance/camera_to_anchor_distance),0.0,4.0);gl_Position=u_matrix*vec4(a_pos,0.0,1.0);gl_Position.xy+=(a_extrude+a_shift)*u_extrude_scale*gl_Position.w*collision_perspective_ratio;v_placed=a_placed.x;v_notUsed=a_placed.y;}"),Yt=fn("uniform float u_overscale_factor;varying float v_placed;varying float v_notUsed;varying float v_radius;varying vec2 v_extrude;varying vec2 v_extrude_scale;void main() {float alpha=0.5;vec4 color=vec4(1.0,0.0,0.0,1.0)*alpha;if (v_placed > 0.5) {color=vec4(0.0,0.0,1.0,0.5)*alpha;}if (v_notUsed > 0.5) {color*=.2;}float extrude_scale_length=length(v_extrude_scale);float extrude_length=length(v_extrude)*extrude_scale_length;float stroke_width=15.0*extrude_scale_length/u_overscale_factor;float radius=v_radius*extrude_scale_length;float distance_to_edge=abs(extrude_length-radius);float opacity_t=smoothstep(-stroke_width,0.0,-distance_to_edge);gl_FragColor=opacity_t*color;}","attribute vec2 a_pos;attribute vec2 a_anchor_pos;attribute vec2 a_extrude;attribute vec2 a_placed;uniform mat4 u_matrix;uniform vec2 u_extrude_scale;uniform float u_camera_to_center_distance;varying float v_placed;varying float v_notUsed;varying float v_radius;varying vec2 v_extrude;varying vec2 v_extrude_scale;void main() {vec4 projectedPoint=u_matrix*vec4(a_anchor_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float collision_perspective_ratio=clamp(0.5+0.5*(u_camera_to_center_distance/camera_to_anchor_distance),0.0,4.0);gl_Position=u_matrix*vec4(a_pos,0.0,1.0);highp float padding_factor=1.2;gl_Position.xy+=a_extrude*u_extrude_scale*padding_factor*gl_Position.w*collision_perspective_ratio;v_placed=a_placed.x;v_notUsed=a_placed.y;v_radius=abs(a_extrude.y);v_extrude=a_extrude*padding_factor;v_extrude_scale=u_extrude_scale*u_camera_to_center_distance*collision_perspective_ratio;}"),Xt=fn("uniform highp vec4 u_color;void main() {gl_FragColor=u_color;}","attribute vec2 a_pos;uniform mat4 u_matrix;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);}"),Jt=fn("#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float opacity\ngl_FragColor=color*opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","attribute vec2 a_pos;uniform mat4 u_matrix;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float opacity\ngl_Position=u_matrix*vec4(a_pos,0,1);}"),Zt=fn("varying vec2 v_pos;\n#pragma mapbox: define highp vec4 outline_color\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 outline_color\n#pragma mapbox: initialize lowp float opacity\nfloat dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);gl_FragColor=outline_color*(alpha*opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","attribute vec2 a_pos;uniform mat4 u_matrix;uniform vec2 u_world;varying vec2 v_pos;\n#pragma mapbox: define highp vec4 outline_color\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 outline_color\n#pragma mapbox: initialize lowp float opacity\ngl_Position=u_matrix*vec4(a_pos,0,1);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;}"),$t=fn("uniform vec2 u_texsize;uniform sampler2D u_image;uniform float u_fade;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec2 v_pos;\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);float dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);gl_FragColor=mix(color1,color2,u_fade)*alpha*opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_world;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec4 u_scale;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec2 v_pos;\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float pixelRatio=u_scale.x;float tileRatio=u_scale.y;float fromScale=u_scale.z;float toScale=u_scale.w;gl_Position=u_matrix*vec4(a_pos,0,1);vec2 display_size_a=vec2((pattern_br_a.x-pattern_tl_a.x)/pixelRatio,(pattern_br_a.y-pattern_tl_a.y)/pixelRatio);vec2 display_size_b=vec2((pattern_br_b.x-pattern_tl_b.x)/pixelRatio,(pattern_br_b.y-pattern_tl_b.y)/pixelRatio);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,a_pos);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;}"),Qt=fn("uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);gl_FragColor=mix(color1,color2,u_fade)*opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec4 u_scale;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float pixelRatio=u_scale.x;float tileZoomRatio=u_scale.y;float fromScale=u_scale.z;float toScale=u_scale.w;vec2 display_size_a=vec2((pattern_br_a.x-pattern_tl_a.x)/pixelRatio,(pattern_br_a.y-pattern_tl_a.y)/pixelRatio);vec2 display_size_b=vec2((pattern_br_b.x-pattern_tl_b.x)/pixelRatio,(pattern_br_b.y-pattern_tl_b.y)/pixelRatio);gl_Position=u_matrix*vec4(a_pos,0,1);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileZoomRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileZoomRatio,a_pos);}"),en=fn("varying vec4 v_color;void main() {gl_FragColor=v_color;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp float u_lightintensity;uniform float u_vertical_gradient;uniform lowp float u_opacity;attribute vec2 a_pos;attribute vec4 a_normal_ed;varying vec4 v_color;\n#pragma mapbox: define highp float base\n#pragma mapbox: define highp float height\n#pragma mapbox: define highp vec4 color\nvoid main() {\n#pragma mapbox: initialize highp float base\n#pragma mapbox: initialize highp float height\n#pragma mapbox: initialize highp vec4 color\nvec3 normal=a_normal_ed.xyz;base=max(0.0,base);height=max(0.0,height);float t=mod(normal.x,2.0);gl_Position=u_matrix*vec4(a_pos,t > 0.0 ? height : base,1);float colorvalue=color.r*0.2126+color.g*0.7152+color.b*0.0722;v_color=vec4(0.0,0.0,0.0,1.0);vec4 ambientlight=vec4(0.03,0.03,0.03,1.0);color+=ambientlight;float directional=clamp(dot(normal/16384.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((1.0-colorvalue+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_color.r+=clamp(color.r*directional*u_lightcolor.r,mix(0.0,0.3,1.0-u_lightcolor.r),1.0);v_color.g+=clamp(color.g*directional*u_lightcolor.g,mix(0.0,0.3,1.0-u_lightcolor.g),1.0);v_color.b+=clamp(color.b*directional*u_lightcolor.b,mix(0.0,0.3,1.0-u_lightcolor.b),1.0);v_color*=u_opacity;}"),tn=fn("uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec4 v_lighting;\n#pragma mapbox: define lowp float base\n#pragma mapbox: define lowp float height\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\nvoid main() {\n#pragma mapbox: initialize lowp float base\n#pragma mapbox: initialize lowp float height\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);vec4 mixedColor=mix(color1,color2,u_fade);gl_FragColor=mixedColor*v_lighting;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_height_factor;uniform vec4 u_scale;uniform float u_vertical_gradient;uniform lowp float u_opacity;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp float u_lightintensity;attribute vec2 a_pos;attribute vec4 a_normal_ed;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec4 v_lighting;\n#pragma mapbox: define lowp float base\n#pragma mapbox: define lowp float height\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\nvoid main() {\n#pragma mapbox: initialize lowp float base\n#pragma mapbox: initialize lowp float height\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float pixelRatio=u_scale.x;float tileRatio=u_scale.y;float fromScale=u_scale.z;float toScale=u_scale.w;vec3 normal=a_normal_ed.xyz;float edgedistance=a_normal_ed.w;vec2 display_size_a=vec2((pattern_br_a.x-pattern_tl_a.x)/pixelRatio,(pattern_br_a.y-pattern_tl_a.y)/pixelRatio);vec2 display_size_b=vec2((pattern_br_b.x-pattern_tl_b.x)/pixelRatio,(pattern_br_b.y-pattern_tl_b.y)/pixelRatio);base=max(0.0,base);height=max(0.0,height);float t=mod(normal.x,2.0);float z=t > 0.0 ? height : base;gl_Position=u_matrix*vec4(a_pos,z,1);vec2 pos=normal.x==1.0 && normal.y==0.0 && normal.z==16384.0\n? a_pos\n: vec2(edgedistance,z*u_height_factor);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,pos);v_lighting=vec4(0.0,0.0,0.0,1.0);float directional=clamp(dot(normal/16383.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((0.5+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_lighting.rgb+=clamp(directional*u_lightcolor,mix(vec3(0.0),vec3(0.3),1.0-u_lightcolor),vec3(1.0));v_lighting*=u_opacity;}"),nn=fn("#ifdef GL_ES\nprecision highp float;\n#endif\nuniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_dimension;uniform float u_zoom;uniform float u_maxzoom;uniform vec4 u_unpack;float getElevation(vec2 coord,float bias) {vec4 data=texture2D(u_image,coord)*255.0;data.a=-1.0;return dot(data,u_unpack)/4.0;}void main() {vec2 epsilon=1.0/u_dimension;float a=getElevation(v_pos+vec2(-epsilon.x,-epsilon.y),0.0);float b=getElevation(v_pos+vec2(0,-epsilon.y),0.0);float c=getElevation(v_pos+vec2(epsilon.x,-epsilon.y),0.0);float d=getElevation(v_pos+vec2(-epsilon.x,0),0.0);float e=getElevation(v_pos,0.0);float f=getElevation(v_pos+vec2(epsilon.x,0),0.0);float g=getElevation(v_pos+vec2(-epsilon.x,epsilon.y),0.0);float h=getElevation(v_pos+vec2(0,epsilon.y),0.0);float i=getElevation(v_pos+vec2(epsilon.x,epsilon.y),0.0);float exaggeration=u_zoom < 2.0 ? 0.4 : u_zoom < 4.5 ? 0.35 : 0.3;vec2 deriv=vec2((c+f+f+i)-(a+d+d+g),(g+h+h+i)-(a+b+b+c))/ pow(2.0,(u_zoom-u_maxzoom)*exaggeration+19.2562-u_zoom);gl_FragColor=clamp(vec4(deriv.x/2.0+0.5,deriv.y/2.0+0.5,1.0,1.0),0.0,1.0);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_dimension;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);highp vec2 epsilon=1.0/u_dimension;float scale=(u_dimension.x-2.0)/u_dimension.x;v_pos=(a_texture_pos/8192.0)*scale+epsilon;}"),rn=fn("uniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_latrange;uniform vec2 u_light;uniform vec4 u_shadow;uniform vec4 u_highlight;uniform vec4 u_accent;\n#define PI 3.141592653589793\nvoid main() {vec4 pixel=texture2D(u_image,v_pos);vec2 deriv=((pixel.rg*2.0)-1.0);float scaleFactor=cos(radians((u_latrange[0]-u_latrange[1])*(1.0-v_pos.y)+u_latrange[1]));float slope=atan(1.25*length(deriv)/scaleFactor);float aspect=deriv.x !=0.0 ? atan(deriv.y,-deriv.x) : PI/2.0*(deriv.y > 0.0 ? 1.0 :-1.0);float intensity=u_light.x;float azimuth=u_light.y+PI;float base=1.875-intensity*1.75;float maxValue=0.5*PI;float scaledSlope=intensity !=0.5 ? ((pow(base,slope)-1.0)/(pow(base,maxValue)-1.0))*maxValue : slope;float accent=cos(scaledSlope);vec4 accent_color=(1.0-accent)*u_accent*clamp(intensity*2.0,0.0,1.0);float shade=abs(mod((aspect+azimuth)/PI+0.5,2.0)-1.0);vec4 shade_color=mix(u_shadow,u_highlight,shade)*sin(scaledSlope)*clamp(intensity*2.0,0.0,1.0);gl_FragColor=accent_color*(1.0-shade_color.a)+shade_color;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos=a_texture_pos/8192.0;}"),an=fn("uniform lowp float u_device_pixel_ratio;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\nfloat dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);gl_FragColor=color*(alpha*opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","\n#define scale 0.015873016\nattribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform vec2 u_units_to_pixels;uniform lowp float u_device_pixel_ratio;varying vec2 v_normal;varying vec2 v_width2;varying float v_gamma_scale;varying highp float v_linesofar;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float width\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump float gapwidth\n#pragma mapbox: initialize lowp float offset\n#pragma mapbox: initialize mediump float width\nfloat ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;v_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*2.0;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_width2=vec2(outset,inset);}"),on=fn("uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale;varying highp float v_lineprogress;\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\nfloat dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);vec4 color=texture2D(u_image,vec2(v_lineprogress,0.5));gl_FragColor=color*(alpha*opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","\n#define MAX_LINE_DISTANCE 32767.0\n#define scale 0.015873016\nattribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_units_to_pixels;varying vec2 v_normal;varying vec2 v_width2;varying float v_gamma_scale;varying highp float v_lineprogress;\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float width\nvoid main() {\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump float gapwidth\n#pragma mapbox: initialize lowp float offset\n#pragma mapbox: initialize mediump float width\nfloat ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;v_lineprogress=(floor(a_data.z/4.0)+a_data.w*64.0)*2.0/MAX_LINE_DISTANCE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_width2=vec2(outset,inset);}"),sn=fn("uniform lowp float u_device_pixel_ratio;uniform vec2 u_texsize;uniform float u_fade;uniform mediump vec4 u_scale;uniform sampler2D u_image;varying vec2 v_normal;varying vec2 v_width2;varying float v_linesofar;varying float v_gamma_scale;\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float pixelRatio=u_scale.x;float tileZoomRatio=u_scale.y;float fromScale=u_scale.z;float toScale=u_scale.w;vec2 display_size_a=vec2((pattern_br_a.x-pattern_tl_a.x)/pixelRatio,(pattern_br_a.y-pattern_tl_a.y)/pixelRatio);vec2 display_size_b=vec2((pattern_br_b.x-pattern_tl_b.x)/pixelRatio,(pattern_br_b.y-pattern_tl_b.y)/pixelRatio);vec2 pattern_size_a=vec2(display_size_a.x*fromScale/tileZoomRatio,display_size_a.y);vec2 pattern_size_b=vec2(display_size_b.x*toScale/tileZoomRatio,display_size_b.y);float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float x_a=mod(v_linesofar/pattern_size_a.x,1.0);float x_b=mod(v_linesofar/pattern_size_b.x,1.0);float y_a=0.5+(v_normal.y*clamp(v_width2.s,0.0,(pattern_size_a.y+2.0)/2.0)/pattern_size_a.y);float y_b=0.5+(v_normal.y*clamp(v_width2.s,0.0,(pattern_size_b.y+2.0)/2.0)/pattern_size_b.y);vec2 pos_a=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,vec2(x_a,y_a));vec2 pos_b=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,vec2(x_b,y_b));vec4 color=mix(texture2D(u_image,pos_a),texture2D(u_image,pos_b),u_fade);gl_FragColor=color*alpha*opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","\n#define scale 0.015873016\n#define LINE_DISTANCE_SCALE 2.0\nattribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform vec2 u_units_to_pixels;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;varying vec2 v_normal;varying vec2 v_width2;varying float v_linesofar;varying float v_gamma_scale;\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define mediump float width\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\nvoid main() {\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize lowp float offset\n#pragma mapbox: initialize mediump float gapwidth\n#pragma mapbox: initialize mediump float width\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\nfloat ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_linesofar=a_linesofar;v_width2=vec2(outset,inset);}"),un=fn("uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;uniform float u_sdfgamma;uniform float u_mix;varying vec2 v_normal;varying vec2 v_width2;varying vec2 v_tex_a;varying vec2 v_tex_b;varying float v_gamma_scale;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float width\n#pragma mapbox: define lowp float floorwidth\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump float width\n#pragma mapbox: initialize lowp float floorwidth\nfloat dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float sdfdist_a=texture2D(u_image,v_tex_a).a;float sdfdist_b=texture2D(u_image,v_tex_b).a;float sdfdist=mix(sdfdist_a,sdfdist_b,u_mix);alpha*=smoothstep(0.5-u_sdfgamma/floorwidth,0.5+u_sdfgamma/floorwidth,sdfdist);gl_FragColor=color*(alpha*opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","\n#define scale 0.015873016\n#define LINE_DISTANCE_SCALE 2.0\nattribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_patternscale_a;uniform float u_tex_y_a;uniform vec2 u_patternscale_b;uniform float u_tex_y_b;uniform vec2 u_units_to_pixels;varying vec2 v_normal;varying vec2 v_width2;varying vec2 v_tex_a;varying vec2 v_tex_b;varying float v_gamma_scale;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float width\n#pragma mapbox: define lowp float floorwidth\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump float gapwidth\n#pragma mapbox: initialize lowp float offset\n#pragma mapbox: initialize mediump float width\n#pragma mapbox: initialize lowp float floorwidth\nfloat ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_tex_a=vec2(a_linesofar*u_patternscale_a.x/floorwidth,normal.y*u_patternscale_a.y+u_tex_y_a);v_tex_b=vec2(a_linesofar*u_patternscale_b.x/floorwidth,normal.y*u_patternscale_b.y+u_tex_y_b);v_width2=vec2(outset,inset);}"),cn=fn("uniform float u_fade_t;uniform float u_opacity;uniform sampler2D u_image0;uniform sampler2D u_image1;varying vec2 v_pos0;varying vec2 v_pos1;uniform float u_brightness_low;uniform float u_brightness_high;uniform float u_saturation_factor;uniform float u_contrast_factor;uniform vec3 u_spin_weights;void main() {vec4 color0=texture2D(u_image0,v_pos0);vec4 color1=texture2D(u_image1,v_pos1);if (color0.a > 0.0) {color0.rgb=color0.rgb/color0.a;}if (color1.a > 0.0) {color1.rgb=color1.rgb/color1.a;}vec4 color=mix(color0,color1,u_fade_t);color.a*=u_opacity;vec3 rgb=color.rgb;rgb=vec3(dot(rgb,u_spin_weights.xyz),dot(rgb,u_spin_weights.zxy),dot(rgb,u_spin_weights.yzx));float average=(color.r+color.g+color.b)/3.0;rgb+=(average-rgb)*u_saturation_factor;rgb=(rgb-0.5)*u_contrast_factor+0.5;vec3 u_high_vec=vec3(u_brightness_low,u_brightness_low,u_brightness_low);vec3 u_low_vec=vec3(u_brightness_high,u_brightness_high,u_brightness_high);gl_FragColor=vec4(mix(u_high_vec,u_low_vec,rgb)*color.a,color.a);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_tl_parent;uniform float u_scale_parent;uniform float u_buffer_scale;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos0;varying vec2 v_pos1;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos0=(((a_texture_pos/8192.0)-0.5)/u_buffer_scale )+0.5;v_pos1=(v_pos0*u_scale_parent)+u_tl_parent;}"),ln=fn("uniform sampler2D u_texture;varying vec2 v_tex;varying float v_fade_opacity;\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\nlowp float alpha=opacity*v_fade_opacity;gl_FragColor=texture2D(u_texture,v_tex)*alpha;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform highp float u_camera_to_center_distance;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform float u_fade_change;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform vec2 u_texsize;varying vec2 v_tex;varying float v_fade_opacity;\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\nvec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size[0],a_size[1],u_size_t)/256.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size[0]/256.0;} else if (!u_is_size_zoom_constant && u_is_size_feature_constant) {size=u_size;} else {size=u_size;}vec4 projectedPoint=u_matrix*vec4(a_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?\ncamera_to_anchor_distance/u_camera_to_center_distance :\nu_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=u_matrix*vec4(a_pos+vec2(1,0),0,1);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,0.0,1.0);gl_Position=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale),0.0,1.0);v_tex=a_tex/u_texsize;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;v_fade_opacity=max(0.0,min(1.0,fade_opacity[0]+fade_change));}"),dn=fn("#define SDF_PX 8.0\nuniform bool u_is_halo;uniform sampler2D u_texture;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;uniform bool u_is_text;varying vec2 v_data0;varying vec3 v_data1;\n#pragma mapbox: define highp vec4 fill_color\n#pragma mapbox: define highp vec4 halo_color\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float halo_width\n#pragma mapbox: define lowp float halo_blur\nvoid main() {\n#pragma mapbox: initialize highp vec4 fill_color\n#pragma mapbox: initialize highp vec4 halo_color\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize lowp float halo_width\n#pragma mapbox: initialize lowp float halo_blur\nfloat EDGE_GAMMA=0.105/u_device_pixel_ratio;vec2 tex=v_data0.xy;float gamma_scale=v_data1.x;float size=v_data1.y;float fade_opacity=v_data1[2];float fontScale=u_is_text ? size/24.0 : size;lowp vec4 color=fill_color;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float buff=(256.0-64.0)/256.0;if (u_is_halo) {color=halo_color;gamma=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);buff=(6.0-halo_width/fontScale)/SDF_PX;}lowp float dist=texture2D(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(buff-gamma_scaled,buff+gamma_scaled,dist);gl_FragColor=color*(alpha*opacity*fade_opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;varying vec2 v_data0;varying vec3 v_data1;\n#pragma mapbox: define highp vec4 fill_color\n#pragma mapbox: define highp vec4 halo_color\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float halo_width\n#pragma mapbox: define lowp float halo_blur\nvoid main() {\n#pragma mapbox: initialize highp vec4 fill_color\n#pragma mapbox: initialize highp vec4 halo_color\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize lowp float halo_width\n#pragma mapbox: initialize lowp float halo_blur\nvec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size[0],a_size[1],u_size_t)/256.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size[0]/256.0;} else if (!u_is_size_zoom_constant && u_is_size_feature_constant) {size=u_size;} else {size=u_size;}vec4 projectedPoint=u_matrix*vec4(a_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?\ncamera_to_anchor_distance/u_camera_to_center_distance :\nu_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=u_matrix*vec4(a_pos+vec2(1,0),0,1);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,0.0,1.0);gl_Position=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale),0.0,1.0);float gamma_scale=gl_Position.w;vec2 tex=a_tex/u_texsize;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(1.0,fade_opacity[0]+fade_change));v_data0=vec2(tex.x,tex.y);v_data1=vec3(gamma_scale,size,interpolated_fade_opacity);}");function fn(e,t){var n=/#pragma mapbox: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g,r={};return{fragmentSource:e=e.replace(n,(function(e,t,n,a,i){return r[i]=!0,"define"===t?"\n#ifndef HAS_UNIFORM_u_"+i+"\nvarying "+n+" "+a+" "+i+";\n#else\nuniform "+n+" "+a+" u_"+i+";\n#endif\n":"\n#ifdef HAS_UNIFORM_u_"+i+"\n "+n+" "+a+" "+i+" = u_"+i+";\n#endif\n"})),vertexSource:t=t.replace(n,(function(e,t,n,a,i){var o="float"===a?"vec2":"vec4",s=i.match(/color/)?"color":o;return r[i]?"define"===t?"\n#ifndef HAS_UNIFORM_u_"+i+"\nuniform lowp float u_"+i+"_t;\nattribute "+n+" "+o+" a_"+i+";\nvarying "+n+" "+a+" "+i+";\n#else\nuniform "+n+" "+a+" u_"+i+";\n#endif\n":"vec4"===s?"\n#ifndef HAS_UNIFORM_u_"+i+"\n "+i+" = a_"+i+";\n#else\n "+n+" "+a+" "+i+" = u_"+i+";\n#endif\n":"\n#ifndef HAS_UNIFORM_u_"+i+"\n "+i+" = unpack_mix_"+s+"(a_"+i+", u_"+i+"_t);\n#else\n "+n+" "+a+" "+i+" = u_"+i+";\n#endif\n":"define"===t?"\n#ifndef HAS_UNIFORM_u_"+i+"\nuniform lowp float u_"+i+"_t;\nattribute "+n+" "+o+" a_"+i+";\n#else\nuniform "+n+" "+a+" u_"+i+";\n#endif\n":"vec4"===s?"\n#ifndef HAS_UNIFORM_u_"+i+"\n "+n+" "+a+" "+i+" = a_"+i+";\n#else\n "+n+" "+a+" "+i+" = u_"+i+";\n#endif\n":"\n#ifndef HAS_UNIFORM_u_"+i+"\n "+n+" "+a+" "+i+" = unpack_mix_"+s+"(a_"+i+", u_"+i+"_t);\n#else\n "+n+" "+a+" "+i+" = u_"+i+";\n#endif\n"}))}}var pn=Object.freeze({__proto__:null,prelude:Bt,background:Vt,backgroundPattern:Ht,circle:Ut,clippingMask:Wt,heatmap:qt,heatmapTexture:Gt,collisionBox:Kt,collisionCircle:Yt,debug:Xt,fill:Jt,fillOutline:Zt,fillOutlinePattern:$t,fillPattern:Qt,fillExtrusion:en,fillExtrusionPattern:tn,hillshadePrepare:nn,hillshade:rn,line:an,lineGradient:on,linePattern:sn,lineSDF:un,raster:cn,symbolIcon:ln,symbolSDF:dn}),hn=function(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null};hn.prototype.bind=function(e,t,n,r,a,i,o,s){this.context=e;for(var u=this.boundPaintVertexBuffers.length!==r.length,c=0;!u&&c>16,u>>16],u_pixel_coord_lower:[65535&s,65535&u]}}gn.prototype.draw=function(e,t,n,r,a,i,o,s,u,c,l,d,f,p,h,g){var v,m=e.gl;for(var y in e.program.set(this.program),e.setDepthMode(n),e.setStencilMode(r),e.setColorMode(a),e.setCullFace(i),this.fixedUniforms)this.fixedUniforms[y].set(o[y]);p&&p.setUniforms(e,this.binderUniforms,d,{zoom:f});for(var b=(v={},v[m.LINES]=2,v[m.TRIANGLES]=3,v[m.LINE_STRIP]=1,v)[t],_=0,x=l.get();_0?1-1/(1.001-o):-o),u_contrast_factor:(i=a.paint.get("raster-contrast"),i>0?1/(1-i):1+i),u_spin_weights:Nn(a.paint.get("raster-hue-rotate"))};var i,o};function Nn(e){e*=Math.PI/180;var t=Math.sin(e),n=Math.cos(e);return[(2*n+1)/3,(-Math.sqrt(3)*t-n+1)/3,(Math.sqrt(3)*t-n+1)/3]}var Bn=function(e,t,n,r,a,i,o,s,u,c){var l=a.transform;return{u_is_size_zoom_constant:+("constant"===e||"source"===e),u_is_size_feature_constant:+("constant"===e||"camera"===e),u_size_t:t?t.uSizeT:0,u_size:t?t.uSize:0,u_camera_to_center_distance:l.cameraToCenterDistance,u_pitch:l.pitch/360*2*Math.PI,u_rotate_symbol:+n,u_aspect_ratio:l.width/l.height,u_fade_change:a.options.fadeDuration?a.symbolFadeChange:1,u_matrix:i,u_label_plane_matrix:o,u_coord_matrix:s,u_is_text:+u,u_pitch_with_map:+r,u_texsize:c,u_texture:0}},Vn=function(t,n,r,a,i,o,s,u,c,l,d){var f=i.transform;return e.extend(Bn(t,n,r,a,i,o,s,u,c,l),{u_gamma_scale:a?Math.cos(f._pitch)*f.cameraToCenterDistance:1,u_device_pixel_ratio:e.browser.devicePixelRatio,u_is_halo:+d})},Hn=function(e,t,n){return{u_matrix:e,u_opacity:t,u_color:n}},Un=function(t,n,r,a,i,o){return e.extend(function(e,t,n,r){var a=n.imageManager.getPattern(e.from.toString()),i=n.imageManager.getPattern(e.to.toString()),o=n.imageManager.getPixelSize(),s=o.width,u=o.height,c=Math.pow(2,r.tileID.overscaledZ),l=r.tileSize*Math.pow(2,n.transform.tileZoom)/c,d=l*(r.tileID.canonical.x+r.tileID.wrap*c),f=l*r.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:a.tl,u_pattern_br_a:a.br,u_pattern_tl_b:i.tl,u_pattern_br_b:i.br,u_texsize:[s,u],u_mix:t.t,u_pattern_size_a:a.displaySize,u_pattern_size_b:i.displaySize,u_scale_a:t.fromScale,u_scale_b:t.toScale,u_tile_units_to_pixels:1/ct(r,1,n.transform.tileZoom),u_pixel_coord_upper:[d>>16,f>>16],u_pixel_coord_lower:[65535&d,65535&f]}}(a,o,r,i),{u_matrix:t,u_opacity:n})},Wn={fillExtrusion:function(t,n){return{u_matrix:new e.UniformMatrix4f(t,n.u_matrix),u_lightpos:new e.Uniform3f(t,n.u_lightpos),u_lightintensity:new e.Uniform1f(t,n.u_lightintensity),u_lightcolor:new e.Uniform3f(t,n.u_lightcolor),u_vertical_gradient:new e.Uniform1f(t,n.u_vertical_gradient),u_opacity:new e.Uniform1f(t,n.u_opacity)}},fillExtrusionPattern:function(t,n){return{u_matrix:new e.UniformMatrix4f(t,n.u_matrix),u_lightpos:new e.Uniform3f(t,n.u_lightpos),u_lightintensity:new e.Uniform1f(t,n.u_lightintensity),u_lightcolor:new e.Uniform3f(t,n.u_lightcolor),u_vertical_gradient:new e.Uniform1f(t,n.u_vertical_gradient),u_height_factor:new e.Uniform1f(t,n.u_height_factor),u_image:new e.Uniform1i(t,n.u_image),u_texsize:new e.Uniform2f(t,n.u_texsize),u_pixel_coord_upper:new e.Uniform2f(t,n.u_pixel_coord_upper),u_pixel_coord_lower:new e.Uniform2f(t,n.u_pixel_coord_lower),u_scale:new e.Uniform4f(t,n.u_scale),u_fade:new e.Uniform1f(t,n.u_fade),u_opacity:new e.Uniform1f(t,n.u_opacity)}},fill:function(t,n){return{u_matrix:new e.UniformMatrix4f(t,n.u_matrix)}},fillPattern:function(t,n){return{u_matrix:new e.UniformMatrix4f(t,n.u_matrix),u_image:new e.Uniform1i(t,n.u_image),u_texsize:new e.Uniform2f(t,n.u_texsize),u_pixel_coord_upper:new e.Uniform2f(t,n.u_pixel_coord_upper),u_pixel_coord_lower:new e.Uniform2f(t,n.u_pixel_coord_lower),u_scale:new e.Uniform4f(t,n.u_scale),u_fade:new e.Uniform1f(t,n.u_fade)}},fillOutline:function(t,n){return{u_matrix:new e.UniformMatrix4f(t,n.u_matrix),u_world:new e.Uniform2f(t,n.u_world)}},fillOutlinePattern:function(t,n){return{u_matrix:new e.UniformMatrix4f(t,n.u_matrix),u_world:new e.Uniform2f(t,n.u_world),u_image:new e.Uniform1i(t,n.u_image),u_texsize:new e.Uniform2f(t,n.u_texsize),u_pixel_coord_upper:new e.Uniform2f(t,n.u_pixel_coord_upper),u_pixel_coord_lower:new e.Uniform2f(t,n.u_pixel_coord_lower),u_scale:new e.Uniform4f(t,n.u_scale),u_fade:new e.Uniform1f(t,n.u_fade)}},circle:function(t,n){return{u_camera_to_center_distance:new e.Uniform1f(t,n.u_camera_to_center_distance),u_scale_with_map:new e.Uniform1i(t,n.u_scale_with_map),u_pitch_with_map:new e.Uniform1i(t,n.u_pitch_with_map),u_extrude_scale:new e.Uniform2f(t,n.u_extrude_scale),u_device_pixel_ratio:new e.Uniform1f(t,n.u_device_pixel_ratio),u_matrix:new e.UniformMatrix4f(t,n.u_matrix)}},collisionBox:En,collisionCircle:En,debug:function(t,n){return{u_color:new e.UniformColor(t,n.u_color),u_matrix:new e.UniformMatrix4f(t,n.u_matrix)}},clippingMask:function(t,n){return{u_matrix:new e.UniformMatrix4f(t,n.u_matrix)}},heatmap:function(t,n){return{u_extrude_scale:new e.Uniform1f(t,n.u_extrude_scale),u_intensity:new e.Uniform1f(t,n.u_intensity),u_matrix:new e.UniformMatrix4f(t,n.u_matrix)}},heatmapTexture:function(t,n){return{u_matrix:new e.UniformMatrix4f(t,n.u_matrix),u_world:new e.Uniform2f(t,n.u_world),u_image:new e.Uniform1i(t,n.u_image),u_color_ramp:new e.Uniform1i(t,n.u_color_ramp),u_opacity:new e.Uniform1f(t,n.u_opacity)}},hillshade:function(t,n){return{u_matrix:new e.UniformMatrix4f(t,n.u_matrix),u_image:new e.Uniform1i(t,n.u_image),u_latrange:new e.Uniform2f(t,n.u_latrange),u_light:new e.Uniform2f(t,n.u_light),u_shadow:new e.UniformColor(t,n.u_shadow),u_highlight:new e.UniformColor(t,n.u_highlight),u_accent:new e.UniformColor(t,n.u_accent)}},hillshadePrepare:function(t,n){return{u_matrix:new e.UniformMatrix4f(t,n.u_matrix),u_image:new e.Uniform1i(t,n.u_image),u_dimension:new e.Uniform2f(t,n.u_dimension),u_zoom:new e.Uniform1f(t,n.u_zoom),u_maxzoom:new e.Uniform1f(t,n.u_maxzoom),u_unpack:new e.Uniform4f(t,n.u_unpack)}},line:function(t,n){return{u_matrix:new e.UniformMatrix4f(t,n.u_matrix),u_ratio:new e.Uniform1f(t,n.u_ratio),u_device_pixel_ratio:new e.Uniform1f(t,n.u_device_pixel_ratio),u_units_to_pixels:new e.Uniform2f(t,n.u_units_to_pixels)}},lineGradient:function(t,n){return{u_matrix:new e.UniformMatrix4f(t,n.u_matrix),u_ratio:new e.Uniform1f(t,n.u_ratio),u_device_pixel_ratio:new e.Uniform1f(t,n.u_device_pixel_ratio),u_units_to_pixels:new e.Uniform2f(t,n.u_units_to_pixels),u_image:new e.Uniform1i(t,n.u_image)}},linePattern:function(t,n){return{u_matrix:new e.UniformMatrix4f(t,n.u_matrix),u_texsize:new e.Uniform2f(t,n.u_texsize),u_ratio:new e.Uniform1f(t,n.u_ratio),u_device_pixel_ratio:new e.Uniform1f(t,n.u_device_pixel_ratio),u_image:new e.Uniform1i(t,n.u_image),u_units_to_pixels:new e.Uniform2f(t,n.u_units_to_pixels),u_scale:new e.Uniform4f(t,n.u_scale),u_fade:new e.Uniform1f(t,n.u_fade)}},lineSDF:function(t,n){return{u_matrix:new e.UniformMatrix4f(t,n.u_matrix),u_ratio:new e.Uniform1f(t,n.u_ratio),u_device_pixel_ratio:new e.Uniform1f(t,n.u_device_pixel_ratio),u_units_to_pixels:new e.Uniform2f(t,n.u_units_to_pixels),u_patternscale_a:new e.Uniform2f(t,n.u_patternscale_a),u_patternscale_b:new e.Uniform2f(t,n.u_patternscale_b),u_sdfgamma:new e.Uniform1f(t,n.u_sdfgamma),u_image:new e.Uniform1i(t,n.u_image),u_tex_y_a:new e.Uniform1f(t,n.u_tex_y_a),u_tex_y_b:new e.Uniform1f(t,n.u_tex_y_b),u_mix:new e.Uniform1f(t,n.u_mix)}},raster:function(t,n){return{u_matrix:new e.UniformMatrix4f(t,n.u_matrix),u_tl_parent:new e.Uniform2f(t,n.u_tl_parent),u_scale_parent:new e.Uniform1f(t,n.u_scale_parent),u_buffer_scale:new e.Uniform1f(t,n.u_buffer_scale),u_fade_t:new e.Uniform1f(t,n.u_fade_t),u_opacity:new e.Uniform1f(t,n.u_opacity),u_image0:new e.Uniform1i(t,n.u_image0),u_image1:new e.Uniform1i(t,n.u_image1),u_brightness_low:new e.Uniform1f(t,n.u_brightness_low),u_brightness_high:new e.Uniform1f(t,n.u_brightness_high),u_saturation_factor:new e.Uniform1f(t,n.u_saturation_factor),u_contrast_factor:new e.Uniform1f(t,n.u_contrast_factor),u_spin_weights:new e.Uniform3f(t,n.u_spin_weights)}},symbolIcon:function(t,n){return{u_is_size_zoom_constant:new e.Uniform1i(t,n.u_is_size_zoom_constant),u_is_size_feature_constant:new e.Uniform1i(t,n.u_is_size_feature_constant),u_size_t:new e.Uniform1f(t,n.u_size_t),u_size:new e.Uniform1f(t,n.u_size),u_camera_to_center_distance:new e.Uniform1f(t,n.u_camera_to_center_distance),u_pitch:new e.Uniform1f(t,n.u_pitch),u_rotate_symbol:new e.Uniform1i(t,n.u_rotate_symbol),u_aspect_ratio:new e.Uniform1f(t,n.u_aspect_ratio),u_fade_change:new e.Uniform1f(t,n.u_fade_change),u_matrix:new e.UniformMatrix4f(t,n.u_matrix),u_label_plane_matrix:new e.UniformMatrix4f(t,n.u_label_plane_matrix),u_coord_matrix:new e.UniformMatrix4f(t,n.u_coord_matrix),u_is_text:new e.Uniform1f(t,n.u_is_text),u_pitch_with_map:new e.Uniform1i(t,n.u_pitch_with_map),u_texsize:new e.Uniform2f(t,n.u_texsize),u_texture:new e.Uniform1i(t,n.u_texture)}},symbolSDF:function(t,n){return{u_is_size_zoom_constant:new e.Uniform1i(t,n.u_is_size_zoom_constant),u_is_size_feature_constant:new e.Uniform1i(t,n.u_is_size_feature_constant),u_size_t:new e.Uniform1f(t,n.u_size_t),u_size:new e.Uniform1f(t,n.u_size),u_camera_to_center_distance:new e.Uniform1f(t,n.u_camera_to_center_distance),u_pitch:new e.Uniform1f(t,n.u_pitch),u_rotate_symbol:new e.Uniform1i(t,n.u_rotate_symbol),u_aspect_ratio:new e.Uniform1f(t,n.u_aspect_ratio),u_fade_change:new e.Uniform1f(t,n.u_fade_change),u_matrix:new e.UniformMatrix4f(t,n.u_matrix),u_label_plane_matrix:new e.UniformMatrix4f(t,n.u_label_plane_matrix),u_coord_matrix:new e.UniformMatrix4f(t,n.u_coord_matrix),u_is_text:new e.Uniform1f(t,n.u_is_text),u_pitch_with_map:new e.Uniform1i(t,n.u_pitch_with_map),u_texsize:new e.Uniform2f(t,n.u_texsize),u_texture:new e.Uniform1i(t,n.u_texture),u_gamma_scale:new e.Uniform1f(t,n.u_gamma_scale),u_device_pixel_ratio:new e.Uniform1f(t,n.u_device_pixel_ratio),u_is_halo:new e.Uniform1f(t,n.u_is_halo)}},background:function(t,n){return{u_matrix:new e.UniformMatrix4f(t,n.u_matrix),u_opacity:new e.Uniform1f(t,n.u_opacity),u_color:new e.UniformColor(t,n.u_color)}},backgroundPattern:function(t,n){return{u_matrix:new e.UniformMatrix4f(t,n.u_matrix),u_opacity:new e.Uniform1f(t,n.u_opacity),u_image:new e.Uniform1i(t,n.u_image),u_pattern_tl_a:new e.Uniform2f(t,n.u_pattern_tl_a),u_pattern_br_a:new e.Uniform2f(t,n.u_pattern_br_a),u_pattern_tl_b:new e.Uniform2f(t,n.u_pattern_tl_b),u_pattern_br_b:new e.Uniform2f(t,n.u_pattern_br_b),u_texsize:new e.Uniform2f(t,n.u_texsize),u_mix:new e.Uniform1f(t,n.u_mix),u_pattern_size_a:new e.Uniform2f(t,n.u_pattern_size_a),u_pattern_size_b:new e.Uniform2f(t,n.u_pattern_size_b),u_scale_a:new e.Uniform1f(t,n.u_scale_a),u_scale_b:new e.Uniform1f(t,n.u_scale_b),u_pixel_coord_upper:new e.Uniform2f(t,n.u_pixel_coord_upper),u_pixel_coord_lower:new e.Uniform2f(t,n.u_pixel_coord_lower),u_tile_units_to_pixels:new e.Uniform1f(t,n.u_tile_units_to_pixels)}}};function qn(t,n){for(var r=t.sort((function(e,t){return e.tileID.isLessThan(t.tileID)?-1:t.tileID.isLessThan(e.tileID)?1:0})),a=0;a=0&&(g[m.associatedIconIndex]={shiftedAnchor:T,angle:P})}else it(m.numGlyphs,p)}if(d){h.clear();for(var O=t.icon.placedSymbolArray,M=0;M0){var s=e.browser.now(),u=(s-t.timeAdded)/o,c=n?(s-n.timeAdded)/o:-1,l=r.getSource(),d=i.coveringZoomLevel({tileSize:l.tileSize,roundZoom:l.roundZoom}),f=!n||Math.abs(n.tileID.overscaledZ-d)>Math.abs(t.tileID.overscaledZ-d),p=f&&t.refreshedUponExpiration?1:e.clamp(f?u:1-c,0,1);return t.refreshedUponExpiration&&u>=1&&(t.refreshedUponExpiration=!1),n?{opacity:1,mix:1-p}:{opacity:p,mix:0}}return{opacity:1,mix:0}}function ir(t,n,r){var a=t.context,i=a.gl,o=r.posMatrix,s=t.useProgram("debug"),u=Se.disabled,c=Ae.disabled,l=t.colorModeForRenderPass(),d="$debug";s.draw(a,i.LINE_STRIP,u,c,l,Pe.disabled,An(o,e.Color.red),d,t.debugBuffer,t.tileBorderIndexBuffer,t.debugSegments);for(var f=n.getTileByID(r.key).latestRawTileData,p=f&&f.byteLength||0,h=Math.floor(p/1024),g=n.getTile(r).tileSize,v=512/Math.min(g,512),m=function(e,t,n,r){r=r||1;var a,i,o,s,u,c,l,d,f=[];for(a=0,i=e.length;a":[24,[4,18,20,9,4,0]],"?":[18,[3,16,3,17,4,19,5,20,7,21,11,21,13,20,14,19,15,17,15,15,14,13,13,12,9,10,9,7,-1,-1,9,2,8,1,9,0,10,1,9,2]],"@":[27,[18,13,17,15,15,16,12,16,10,15,9,14,8,11,8,8,9,6,11,5,14,5,16,6,17,8,-1,-1,12,16,10,14,9,11,9,8,10,6,11,5,-1,-1,18,16,17,8,17,6,19,5,21,5,23,7,24,10,24,12,23,15,22,17,20,19,18,20,15,21,12,21,9,20,7,19,5,17,4,15,3,12,3,9,4,6,5,4,7,2,9,1,12,0,15,0,18,1,20,2,21,3,-1,-1,19,16,18,8,18,6,19,5]],A:[18,[9,21,1,0,-1,-1,9,21,17,0,-1,-1,4,7,14,7]],B:[21,[4,21,4,0,-1,-1,4,21,13,21,16,20,17,19,18,17,18,15,17,13,16,12,13,11,-1,-1,4,11,13,11,16,10,17,9,18,7,18,4,17,2,16,1,13,0,4,0]],C:[21,[18,16,17,18,15,20,13,21,9,21,7,20,5,18,4,16,3,13,3,8,4,5,5,3,7,1,9,0,13,0,15,1,17,3,18,5]],D:[21,[4,21,4,0,-1,-1,4,21,11,21,14,20,16,18,17,16,18,13,18,8,17,5,16,3,14,1,11,0,4,0]],E:[19,[4,21,4,0,-1,-1,4,21,17,21,-1,-1,4,11,12,11,-1,-1,4,0,17,0]],F:[18,[4,21,4,0,-1,-1,4,21,17,21,-1,-1,4,11,12,11]],G:[21,[18,16,17,18,15,20,13,21,9,21,7,20,5,18,4,16,3,13,3,8,4,5,5,3,7,1,9,0,13,0,15,1,17,3,18,5,18,8,-1,-1,13,8,18,8]],H:[22,[4,21,4,0,-1,-1,18,21,18,0,-1,-1,4,11,18,11]],I:[8,[4,21,4,0]],J:[16,[12,21,12,5,11,2,10,1,8,0,6,0,4,1,3,2,2,5,2,7]],K:[21,[4,21,4,0,-1,-1,18,21,4,7,-1,-1,9,12,18,0]],L:[17,[4,21,4,0,-1,-1,4,0,16,0]],M:[24,[4,21,4,0,-1,-1,4,21,12,0,-1,-1,20,21,12,0,-1,-1,20,21,20,0]],N:[22,[4,21,4,0,-1,-1,4,21,18,0,-1,-1,18,21,18,0]],O:[22,[9,21,7,20,5,18,4,16,3,13,3,8,4,5,5,3,7,1,9,0,13,0,15,1,17,3,18,5,19,8,19,13,18,16,17,18,15,20,13,21,9,21]],P:[21,[4,21,4,0,-1,-1,4,21,13,21,16,20,17,19,18,17,18,14,17,12,16,11,13,10,4,10]],Q:[22,[9,21,7,20,5,18,4,16,3,13,3,8,4,5,5,3,7,1,9,0,13,0,15,1,17,3,18,5,19,8,19,13,18,16,17,18,15,20,13,21,9,21,-1,-1,12,4,18,-2]],R:[21,[4,21,4,0,-1,-1,4,21,13,21,16,20,17,19,18,17,18,15,17,13,16,12,13,11,4,11,-1,-1,11,11,18,0]],S:[20,[17,18,15,20,12,21,8,21,5,20,3,18,3,16,4,14,5,13,7,12,13,10,15,9,16,8,17,6,17,3,15,1,12,0,8,0,5,1,3,3]],T:[16,[8,21,8,0,-1,-1,1,21,15,21]],U:[22,[4,21,4,6,5,3,7,1,10,0,12,0,15,1,17,3,18,6,18,21]],V:[18,[1,21,9,0,-1,-1,17,21,9,0]],W:[24,[2,21,7,0,-1,-1,12,21,7,0,-1,-1,12,21,17,0,-1,-1,22,21,17,0]],X:[20,[3,21,17,0,-1,-1,17,21,3,0]],Y:[18,[1,21,9,11,9,0,-1,-1,17,21,9,11]],Z:[20,[17,21,3,0,-1,-1,3,21,17,21,-1,-1,3,0,17,0]],"[":[14,[4,25,4,-7,-1,-1,5,25,5,-7,-1,-1,4,25,11,25,-1,-1,4,-7,11,-7]],"\\":[14,[0,21,14,-3]],"]":[14,[9,25,9,-7,-1,-1,10,25,10,-7,-1,-1,3,25,10,25,-1,-1,3,-7,10,-7]],"^":[16,[6,15,8,18,10,15,-1,-1,3,12,8,17,13,12,-1,-1,8,17,8,0]],_:[16,[0,-2,16,-2]],"`":[10,[6,21,5,20,4,18,4,16,5,15,6,16,5,17]],a:[19,[15,14,15,0,-1,-1,15,11,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],b:[19,[4,21,4,0,-1,-1,4,11,6,13,8,14,11,14,13,13,15,11,16,8,16,6,15,3,13,1,11,0,8,0,6,1,4,3]],c:[18,[15,11,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],d:[19,[15,21,15,0,-1,-1,15,11,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],e:[18,[3,8,15,8,15,10,14,12,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],f:[12,[10,21,8,21,6,20,5,17,5,0,-1,-1,2,14,9,14]],g:[19,[15,14,15,-2,14,-5,13,-6,11,-7,8,-7,6,-6,-1,-1,15,11,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],h:[19,[4,21,4,0,-1,-1,4,10,7,13,9,14,12,14,14,13,15,10,15,0]],i:[8,[3,21,4,20,5,21,4,22,3,21,-1,-1,4,14,4,0]],j:[10,[5,21,6,20,7,21,6,22,5,21,-1,-1,6,14,6,-3,5,-6,3,-7,1,-7]],k:[17,[4,21,4,0,-1,-1,14,14,4,4,-1,-1,8,8,15,0]],l:[8,[4,21,4,0]],m:[30,[4,14,4,0,-1,-1,4,10,7,13,9,14,12,14,14,13,15,10,15,0,-1,-1,15,10,18,13,20,14,23,14,25,13,26,10,26,0]],n:[19,[4,14,4,0,-1,-1,4,10,7,13,9,14,12,14,14,13,15,10,15,0]],o:[19,[8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3,16,6,16,8,15,11,13,13,11,14,8,14]],p:[19,[4,14,4,-7,-1,-1,4,11,6,13,8,14,11,14,13,13,15,11,16,8,16,6,15,3,13,1,11,0,8,0,6,1,4,3]],q:[19,[15,14,15,-7,-1,-1,15,11,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],r:[13,[4,14,4,0,-1,-1,4,8,5,11,7,13,9,14,12,14]],s:[17,[14,11,13,13,10,14,7,14,4,13,3,11,4,9,6,8,11,7,13,6,14,4,14,3,13,1,10,0,7,0,4,1,3,3]],t:[12,[5,21,5,4,6,1,8,0,10,0,-1,-1,2,14,9,14]],u:[19,[4,14,4,4,5,1,7,0,10,0,12,1,15,4,-1,-1,15,14,15,0]],v:[16,[2,14,8,0,-1,-1,14,14,8,0]],w:[22,[3,14,7,0,-1,-1,11,14,7,0,-1,-1,11,14,15,0,-1,-1,19,14,15,0]],x:[17,[3,14,14,0,-1,-1,14,14,3,0]],y:[16,[2,14,8,0,-1,-1,14,14,8,0,6,-4,4,-6,2,-7,1,-7]],z:[17,[14,14,3,0,-1,-1,3,14,14,14,-1,-1,3,0,14,0]],"{":[14,[9,25,7,24,6,23,5,21,5,19,6,17,7,16,8,14,8,12,6,10,-1,-1,7,24,6,22,6,20,7,18,8,17,9,15,9,13,8,11,4,9,8,7,9,5,9,3,8,1,7,0,6,-2,6,-4,7,-6,-1,-1,6,8,8,6,8,4,7,2,6,1,5,-1,5,-3,6,-5,7,-6,9,-7]],"|":[8,[4,25,4,-7]],"}":[14,[5,25,7,24,8,23,9,21,9,19,8,17,7,16,6,14,6,12,8,10,-1,-1,7,24,8,22,8,20,7,18,6,17,5,15,5,13,6,11,10,9,6,7,5,5,5,3,6,1,7,0,8,-2,8,-4,7,-6,-1,-1,8,8,6,6,6,4,7,2,8,1,9,-1,9,-3,8,-5,7,-6,5,-7]],"~":[24,[3,6,3,8,4,11,6,12,8,12,10,11,14,8,16,7,18,7,20,8,21,10,-1,-1,3,8,4,10,6,11,8,11,10,10,14,7,16,6,18,6,20,7,21,10,21,12]]},sr={symbol:function(t,n,r,a,i){if("translucent"===t.renderPass){var o=Ae.disabled,s=t.colorModeForRenderPass();r.layout.get("text-variable-anchor")&&function(t,n,r,a,i,o,s){for(var u=n.transform,c="map"===i,l="map"===o,d=0,f=t;dt.y){var n=e;e=t,t=n}return{x0:e.x,y0:e.y,x1:t.x,y1:t.y,dx:t.x-e.x,dy:t.y-e.y}}function lr(e,t,n,r,a){var i=Math.max(n,Math.floor(t.y0)),o=Math.min(r,Math.ceil(t.y1));if(e.x0===t.x0&&e.y0===t.y0?e.x0+t.dy/e.dy*e.dx0,d=t.dx<0,f=i;fu.dy&&(o=s,s=u,u=o),s.dy>c.dy&&(o=s,s=c,c=o),u.dy>c.dy&&(o=u,u=c,c=o),s.dy&&lr(c,s,r,a,i),u.dy&&lr(c,u,r,a,i)}ur.prototype.resize=function(t,n){var r=this.context.gl;if(this.width=t*e.browser.devicePixelRatio,this.height=n*e.browser.devicePixelRatio,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(var a=0,i=this.style._order;a256&&this.clearStencil(),n.setColorMode(Te.disabled),n.setDepthMode(Se.disabled);var a=this.useProgram("clippingMask");this._tileClippingMaskIDs={};for(var i=0,o=t;i256&&this.clearStencil();var e=this.nextStencilID++,t=this.context.gl;return new Ae({func:t.NOTEQUAL,mask:255},e,255,t.KEEP,t.KEEP,t.REPLACE)},ur.prototype.stencilModeForClipping=function(e){var t=this.context.gl;return new Ae({func:t.EQUAL,mask:255},this._tileClippingMaskIDs[e.key],0,t.KEEP,t.KEEP,t.REPLACE)},ur.prototype.colorModeForRenderPass=function(){var t=this.context.gl;return this._showOverdrawInspector?new Te([t.CONSTANT_COLOR,t.ONE],new e.Color(1/8,1/8,1/8,0),[!0,!0,!0,!0]):"opaque"===this.renderPass?Te.unblended:Te.alphaBlended},ur.prototype.depthModeForSublayer=function(e,t,n){if(!this.opaquePassEnabledForLayer())return Se.disabled;var r=1-((1+this.currentLayer)*this.numSublayers+e)*this.depthEpsilon;return new Se(n||this.context.gl.LEQUAL,t,[r,r])},ur.prototype.opaquePassEnabledForLayer=function(){return this.currentLayer=0;this.currentLayer--){var A=this.style._layers[r[this.currentLayer]],T=a[A.source],P=s[A.source];this._renderTileClippingMasks(A,P),this.renderLayer(this,T,A,P)}for(this.renderPass="translucent",this.currentLayer=0;this.currentLayer0?t.pop():null},ur.prototype.isPatternMissing=function(e){if(!e)return!1;var t=this.imageManager.getPattern(e.from.toString()),n=this.imageManager.getPattern(e.to.toString());return!t||!n},ur.prototype.useProgram=function(e,t){void 0===t&&(t=this.emptyProgramConfiguration),this.cache=this.cache||{};var n=""+e+(t.cacheKey||"")+(this._showOverdrawInspector?"/overdraw":"");return this.cache[n]||(this.cache[n]=new gn(this.context,pn[e],t,Wn[e],this._showOverdrawInspector)),this.cache[n]},ur.prototype.setCustomLayerDefaults=function(){this.context.unbindVAO(),this.context.cullFace.setDefault(),this.context.activeTexture.setDefault(),this.context.pixelStoreUnpack.setDefault(),this.context.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.context.pixelStoreUnpackFlipY.setDefault()},ur.prototype.setBaseState=function(){var e=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(e.FUNC_ADD)};var fr=function(t,n,r){this.tileSize=512,this.maxValidLatitude=85.051129,this._renderWorldCopies=void 0===r||r,this._minZoom=t||0,this._maxZoom=n||22,this.setMaxBounds(),this.width=0,this.height=0,this._center=new e.LngLat(0,0),this.zoom=0,this.angle=0,this._fov=.6435011087932844,this._pitch=0,this._unmodified=!0,this._posMatrixCache={},this._alignedPosMatrixCache={}},pr={minZoom:{configurable:!0},maxZoom:{configurable:!0},renderWorldCopies:{configurable:!0},worldSize:{configurable:!0},centerPoint:{configurable:!0},size:{configurable:!0},bearing:{configurable:!0},pitch:{configurable:!0},fov:{configurable:!0},zoom:{configurable:!0},center:{configurable:!0},unmodified:{configurable:!0},point:{configurable:!0}};fr.prototype.clone=function(){var e=new fr(this._minZoom,this._maxZoom,this._renderWorldCopies);return e.tileSize=this.tileSize,e.latRange=this.latRange,e.width=this.width,e.height=this.height,e._center=this._center,e.zoom=this.zoom,e.angle=this.angle,e._fov=this._fov,e._pitch=this._pitch,e._unmodified=this._unmodified,e._calcMatrices(),e},pr.minZoom.get=function(){return this._minZoom},pr.minZoom.set=function(e){this._minZoom!==e&&(this._minZoom=e,this.zoom=Math.max(this.zoom,e))},pr.maxZoom.get=function(){return this._maxZoom},pr.maxZoom.set=function(e){this._maxZoom!==e&&(this._maxZoom=e,this.zoom=Math.min(this.zoom,e))},pr.renderWorldCopies.get=function(){return this._renderWorldCopies},pr.renderWorldCopies.set=function(e){void 0===e?e=!0:null===e&&(e=!1),this._renderWorldCopies=e},pr.worldSize.get=function(){return this.tileSize*this.scale},pr.centerPoint.get=function(){return this.size._div(2)},pr.size.get=function(){return new e.Point(this.width,this.height)},pr.bearing.get=function(){return-this.angle/Math.PI*180},pr.bearing.set=function(t){var n=-e.wrap(t,-180,180)*Math.PI/180;this.angle!==n&&(this._unmodified=!1,this.angle=n,this._calcMatrices(),this.rotationMatrix=e.create$2(),e.rotate(this.rotationMatrix,this.rotationMatrix,this.angle))},pr.pitch.get=function(){return this._pitch/Math.PI*180},pr.pitch.set=function(t){var n=e.clamp(t,0,60)/180*Math.PI;this._pitch!==n&&(this._unmodified=!1,this._pitch=n,this._calcMatrices())},pr.fov.get=function(){return this._fov/Math.PI*180},pr.fov.set=function(e){e=Math.max(.01,Math.min(60,e)),this._fov!==e&&(this._unmodified=!1,this._fov=e/180*Math.PI,this._calcMatrices())},pr.zoom.get=function(){return this._zoom},pr.zoom.set=function(e){var t=Math.min(Math.max(e,this.minZoom),this.maxZoom);this._zoom!==t&&(this._unmodified=!1,this._zoom=t,this.scale=this.zoomScale(t),this.tileZoom=Math.floor(t),this.zoomFraction=t-this.tileZoom,this._constrain(),this._calcMatrices())},pr.center.get=function(){return this._center},pr.center.set=function(e){e.lat===this._center.lat&&e.lng===this._center.lng||(this._unmodified=!1,this._center=e,this._constrain(),this._calcMatrices())},fr.prototype.coveringZoomLevel=function(e){return(e.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/e.tileSize))},fr.prototype.getVisibleUnwrappedCoordinates=function(t){var n=[new e.UnwrappedTileID(0,t)];if(this._renderWorldCopies)for(var r=this.pointCoordinate(new e.Point(0,0)),a=this.pointCoordinate(new e.Point(this.width,0)),i=this.pointCoordinate(new e.Point(this.width,this.height)),o=this.pointCoordinate(new e.Point(0,this.height)),s=Math.floor(Math.min(r.x,a.x,i.x,o.x)),u=Math.floor(Math.max(r.x,a.x,i.x,o.x)),c=s-1;c<=u+1;c++)0!==c&&n.push(new e.UnwrappedTileID(c,t));return n},fr.prototype.coveringTiles=function(t){var n=this.coveringZoomLevel(t),r=n;if(void 0!==t.minzoom&&nt.maxzoom&&(n=t.maxzoom);var a=e.MercatorCoordinate.fromLngLat(this.center),i=Math.pow(2,n),o=new e.Point(i*a.x-.5,i*a.y-.5);return function(t,n,r,a){void 0===a&&(a=!0);var i=1<=0&&u<=i)for(c=n;co&&(a=o-v)}if(this.lngRange){var m=p.x,y=c.x/2;m-yu&&(r=u-y)}void 0===r&&void 0===a||(this.center=this.unproject(new e.Point(void 0!==r?r:p.x,void 0!==a?a:p.y))),this._unmodified=l,this._constraining=!1}},fr.prototype._calcMatrices=function(){if(this.height){this.cameraToCenterDistance=.5/Math.tan(this._fov/2)*this.height;var t=this._fov/2,n=Math.PI/2+this._pitch,r=Math.sin(t)*this.cameraToCenterDistance/Math.sin(Math.PI-n-t),a=this.point,i=a.x,o=a.y,s=1.01*(Math.cos(Math.PI/2-this._pitch)*r+this.cameraToCenterDistance),u=this.height/50,c=new Float64Array(16);e.perspective(c,this._fov,this.width/this.height,u,s),e.scale(c,c,[1,-1,1]),e.translate(c,c,[0,0,-this.cameraToCenterDistance]),e.rotateX(c,c,this._pitch),e.rotateZ(c,c,this.angle),e.translate(c,c,[-i,-o,0]),this.mercatorMatrix=e.scale([],c,[this.worldSize,this.worldSize,this.worldSize]),e.scale(c,c,[1,1,e.mercatorZfromAltitude(1,this.center.lat)*this.worldSize,1]),this.projMatrix=c;var l=this.width%2/2,d=this.height%2/2,f=Math.cos(this.angle),p=Math.sin(this.angle),h=i-Math.round(i)+f*l+p*d,g=o-Math.round(o)+f*d+p*l,v=new Float64Array(c);if(e.translate(v,v,[h>.5?h-1:h,g>.5?g-1:g,0]),this.alignedProjMatrix=v,c=e.create(),e.scale(c,c,[this.width/2,-this.height/2,1]),e.translate(c,c,[1,-1,0]),this.labelPlaneMatrix=c,c=e.create(),e.scale(c,c,[1,-1,1]),e.translate(c,c,[-1,-1,0]),e.scale(c,c,[2/this.width,2/this.height,1]),this.glCoordMatrix=c,this.pixelMatrix=e.multiply(new Float64Array(16),this.labelPlaneMatrix,this.projMatrix),!(c=e.invert(new Float64Array(16),this.pixelMatrix)))throw new Error("failed to invert matrix");this.pixelMatrixInverse=c,this._posMatrixCache={},this._alignedPosMatrixCache={}}},fr.prototype.maxPitchScaleFactor=function(){if(!this.pixelMatrixInverse)return 1;var t=this.pointCoordinate(new e.Point(0,0)),n=[t.x*this.worldSize,t.y*this.worldSize,0,1];return e.transformMat4(n,n,this.pixelMatrix)[3]/this.cameraToCenterDistance},fr.prototype.getCameraPoint=function(){var t=this._pitch,n=Math.tan(t)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new e.Point(0,n))},fr.prototype.getCameraQueryGeometry=function(t){var n=this.getCameraPoint();if(1===t.length)return[t[0],n];for(var r=n.x,a=n.y,i=n.x,o=n.y,s=0,u=t;s=3&&!e.some((function(e){return isNaN(e)}))&&(this._map.jumpTo({center:[+e[2],+e[1]],zoom:+e[0],bearing:+(e[3]||0),pitch:+(e[4]||0)}),!0)},hr.prototype._updateHashUnthrottled=function(){var t=this.getHashString();try{e.window.history.replaceState(e.window.history.state,"",t)}catch(e){}};var gr=function(t){function r(r,a,i,o){void 0===o&&(o={});var s=n.mousePos(a.getCanvasContainer(),i),u=a.unproject(s);t.call(this,r,e.extend({point:s,lngLat:u,originalEvent:i},o)),this._defaultPrevented=!1,this.target=a}t&&(r.__proto__=t),r.prototype=Object.create(t&&t.prototype),r.prototype.constructor=r;var a={defaultPrevented:{configurable:!0}};return r.prototype.preventDefault=function(){this._defaultPrevented=!0},a.defaultPrevented.get=function(){return this._defaultPrevented},Object.defineProperties(r.prototype,a),r}(e.Event),vr=function(t){function r(r,a,i){var o=n.touchPos(a.getCanvasContainer(),i),s=o.map((function(e){return a.unproject(e)})),u=o.reduce((function(e,t,n,r){return e.add(t.div(r.length))}),new e.Point(0,0)),c=a.unproject(u);t.call(this,r,{points:o,point:u,lngLats:s,lngLat:c,originalEvent:i}),this._defaultPrevented=!1}t&&(r.__proto__=t),r.prototype=Object.create(t&&t.prototype),r.prototype.constructor=r;var a={defaultPrevented:{configurable:!0}};return r.prototype.preventDefault=function(){this._defaultPrevented=!0},a.defaultPrevented.get=function(){return this._defaultPrevented},Object.defineProperties(r.prototype,a),r}(e.Event),mr=function(e){function t(t,n,r){e.call(this,t,{originalEvent:r}),this._defaultPrevented=!1}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={defaultPrevented:{configurable:!0}};return t.prototype.preventDefault=function(){this._defaultPrevented=!0},n.defaultPrevented.get=function(){return this._defaultPrevented},Object.defineProperties(t.prototype,n),t}(e.Event),yr=function(t){this._map=t,this._el=t.getCanvasContainer(),this._delta=0,this._defaultZoomRate=.01,this._wheelZoomRate=1/450,e.bindAll(["_onWheel","_onTimeout","_onScrollFrame","_onScrollFinished"],this)};yr.prototype.setZoomRate=function(e){this._defaultZoomRate=e},yr.prototype.setWheelZoomRate=function(e){this._wheelZoomRate=e},yr.prototype.isEnabled=function(){return!!this._enabled},yr.prototype.isActive=function(){return!!this._active},yr.prototype.isZooming=function(){return!!this._zooming},yr.prototype.enable=function(e){this.isEnabled()||(this._enabled=!0,this._aroundCenter=e&&"center"===e.around)},yr.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},yr.prototype.onWheel=function(t){if(this.isEnabled()){var n=t.deltaMode===e.window.WheelEvent.DOM_DELTA_LINE?40*t.deltaY:t.deltaY,r=e.browser.now(),a=r-(this._lastWheelEventTime||0);this._lastWheelEventTime=r,0!==n&&n%4.000244140625==0?this._type="wheel":0!==n&&Math.abs(n)<4?this._type="trackpad":a>400?(this._type=null,this._lastValue=n,this._timeout=setTimeout(this._onTimeout,40,t)):this._type||(this._type=Math.abs(a*n)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,n+=this._lastValue)),t.shiftKey&&n&&(n/=4),this._type&&(this._lastWheelEvent=t,this._delta-=n,this.isActive()||this._start(t)),t.preventDefault()}},yr.prototype._onTimeout=function(e){this._type="wheel",this._delta-=this._lastValue,this.isActive()||this._start(e)},yr.prototype._start=function(t){if(this._delta){this._frameId&&(this._map._cancelRenderFrame(this._frameId),this._frameId=null),this._active=!0,this.isZooming()||(this._zooming=!0,this._map.fire(new e.Event("movestart",{originalEvent:t})),this._map.fire(new e.Event("zoomstart",{originalEvent:t}))),this._finishTimeout&&clearTimeout(this._finishTimeout);var r=n.mousePos(this._el,t);this._around=e.LngLat.convert(this._aroundCenter?this._map.getCenter():this._map.unproject(r)),this._aroundPoint=this._map.transform.locationPoint(this._around),this._frameId||(this._frameId=this._map._requestRenderFrame(this._onScrollFrame))}},yr.prototype._onScrollFrame=function(){var t=this;if(this._frameId=null,this.isActive()){var n=this._map.transform;if(0!==this._delta){var r="wheel"===this._type&&Math.abs(this._delta)>4.000244140625?this._wheelZoomRate:this._defaultZoomRate,a=2/(1+Math.exp(-Math.abs(this._delta*r)));this._delta<0&&0!==a&&(a=1/a);var i="number"==typeof this._targetZoom?n.zoomScale(this._targetZoom):n.scale;this._targetZoom=Math.min(n.maxZoom,Math.max(n.minZoom,n.scaleZoom(i*a))),"wheel"===this._type&&(this._startZoom=n.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}var o="number"==typeof this._targetZoom?this._targetZoom:n.zoom,s=this._startZoom,u=this._easing,c=!1;if("wheel"===this._type&&s&&u){var l=Math.min((e.browser.now()-this._lastWheelEventTime)/200,1),d=u(l);n.zoom=e.number(s,o,d),l<1?this._frameId||(this._frameId=this._map._requestRenderFrame(this._onScrollFrame)):c=!0}else n.zoom=o,c=!0;n.setLocationAtPoint(this._around,this._aroundPoint),this._map.fire(new e.Event("move",{originalEvent:this._lastWheelEvent})),this._map.fire(new e.Event("zoom",{originalEvent:this._lastWheelEvent})),c&&(this._active=!1,this._finishTimeout=setTimeout((function(){t._zooming=!1,t._map.fire(new e.Event("zoomend",{originalEvent:t._lastWheelEvent})),t._map.fire(new e.Event("moveend",{originalEvent:t._lastWheelEvent})),delete t._targetZoom}),200))}},yr.prototype._smoothOutEasing=function(t){var n=e.ease;if(this._prevEase){var r=this._prevEase,a=(e.browser.now()-r.start)/r.duration,i=r.easing(a+.01)-r.easing(a),o=.27/Math.sqrt(i*i+1e-4)*.01,s=Math.sqrt(.0729-o*o);n=e.bezier(o,s,.25,1)}return this._prevEase={start:e.browser.now(),duration:t,easing:n},n};var br=function(t,n){this._map=t,this._el=t.getCanvasContainer(),this._container=t.getContainer(),this._clickTolerance=n.clickTolerance||1,e.bindAll(["_onMouseMove","_onMouseUp","_onKeyDown"],this)};br.prototype.isEnabled=function(){return!!this._enabled},br.prototype.isActive=function(){return!!this._active},br.prototype.enable=function(){this.isEnabled()||(this._enabled=!0)},br.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},br.prototype.onMouseDown=function(t){this.isEnabled()&&t.shiftKey&&0===t.button&&(e.window.document.addEventListener("mousemove",this._onMouseMove,!1),e.window.document.addEventListener("keydown",this._onKeyDown,!1),e.window.document.addEventListener("mouseup",this._onMouseUp,!1),n.disableDrag(),this._startPos=this._lastPos=n.mousePos(this._el,t),this._active=!0)},br.prototype._onMouseMove=function(e){var t=n.mousePos(this._el,e);if(!(this._lastPos.equals(t)||!this._box&&t.dist(this._startPos)180&&(p=180);var h=p/180;c+=d*p*(h/2),Math.abs(n._normalizeBearing(c,0))0&&n-t[0][0]>160;)t.shift()};var Rr=e.bezier(0,0,.3,1),wr=function(t,n){this._map=t,this._el=t.getCanvasContainer(),this._state="disabled",this._clickTolerance=n.clickTolerance||1,e.bindAll(["_onMove","_onMouseUp","_onTouchEnd","_onBlur","_onDragFrame"],this)};wr.prototype.isEnabled=function(){return"disabled"!==this._state},wr.prototype.isActive=function(){return"active"===this._state},wr.prototype.enable=function(){this.isEnabled()||(this._el.classList.add("mapboxgl-touch-drag-pan"),this._state="enabled")},wr.prototype.disable=function(){if(this.isEnabled())switch(this._el.classList.remove("mapboxgl-touch-drag-pan"),this._state){case"active":this._state="disabled",this._unbind(),this._deactivate(),this._fireEvent("dragend"),this._fireEvent("moveend");break;case"pending":this._state="disabled",this._unbind();break;default:this._state="disabled"}},wr.prototype.onMouseDown=function(t){"enabled"===this._state&&(t.ctrlKey||0!==n.mouseButton(t)||(n.addEventListener(e.window.document,"mousemove",this._onMove,{capture:!0}),n.addEventListener(e.window.document,"mouseup",this._onMouseUp),this._start(t)))},wr.prototype.onTouchStart=function(t){this.isEnabled()&&(t.touches&&t.touches.length>1&&("pending"===this._state||"active"===this._state)||(n.addEventListener(e.window.document,"touchmove",this._onMove,{capture:!0,passive:!1}),n.addEventListener(e.window.document,"touchend",this._onTouchEnd),this._start(t)))},wr.prototype._start=function(t){e.window.addEventListener("blur",this._onBlur),this._state="pending",this._startPos=this._mouseDownPos=this._prevPos=this._lastPos=n.mousePos(this._el,t),this._startTouch=this._lastTouch=e.window.TouchEvent&&t instanceof e.window.TouchEvent?n.touchPos(this._el,t):null,this._inertia=[[e.browser.now(),this._startPos]]},wr.prototype._touchesMatch=function(e,t){return!(!e||!t||e.length!==t.length)&&e.every((function(e,n){return t[n]===e}))},wr.prototype._onMove=function(t){t.preventDefault();var r=e.window.TouchEvent&&t instanceof e.window.TouchEvent?n.touchPos(this._el,t):null,a=n.mousePos(this._el,t);(r?this._touchesMatch(this._lastTouch,r):this._lastPos.equals(a))||"pending"===this._state&&a.dist(this._mouseDownPos)1&&n.addEventListener(e.window.document,"touchend",this._onTouchEnd);break;case"pending":this._state="enabled",this._unbind();break;case"enabled":this._unbind()}},wr.prototype._onBlur=function(e){this._abort(e)},wr.prototype._unbind=function(){n.removeEventListener(e.window.document,"touchmove",this._onMove,{capture:!0,passive:!1}),n.removeEventListener(e.window.document,"touchend",this._onTouchEnd),n.removeEventListener(e.window.document,"mousemove",this._onMove,{capture:!0}),n.removeEventListener(e.window.document,"mouseup",this._onMouseUp),n.removeEventListener(e.window,"blur",this._onBlur)},wr.prototype._deactivate=function(){this._frameId&&(this._map._cancelRenderFrame(this._frameId),this._frameId=null),delete this._lastMoveEvent,delete this._startPos,delete this._prevPos,delete this._mouseDownPos,delete this._lastPos,delete this._startTouch,delete this._lastTouch,delete this._shouldStart},wr.prototype._inertialPan=function(e){this._fireEvent("dragend",e),this._drainInertiaBuffer();var t=this._inertia;if(t.length<2)this._fireEvent("moveend",e);else{var n=t[t.length-1],r=t[0],a=n[1].sub(r[1]),i=(n[0]-r[0])/1e3;if(0===i||n[1].equals(r[1]))this._fireEvent("moveend",e);else{var o=a.mult(.3/i),s=o.mag();s>1400&&(s=1400,o._unit()._mult(s));var u=s/750,c=o.mult(-u/2);this._map.panBy(c,{duration:1e3*u,easing:Rr,noMoveStart:!0},{originalEvent:e})}}},wr.prototype._fireEvent=function(t,n){return this._map.fire(new e.Event(t,n?{originalEvent:n}:{}))},wr.prototype._drainInertiaBuffer=function(){for(var t=this._inertia,n=e.browser.now();t.length>0&&n-t[0][0]>160;)t.shift()};var Er=function(t){this._map=t,this._el=t.getCanvasContainer(),e.bindAll(["_onKeyDown"],this)};function Sr(e){return e*(2-e)}Er.prototype.isEnabled=function(){return!!this._enabled},Er.prototype.enable=function(){this.isEnabled()||(this._el.addEventListener("keydown",this._onKeyDown,!1),this._enabled=!0)},Er.prototype.disable=function(){this.isEnabled()&&(this._el.removeEventListener("keydown",this._onKeyDown),this._enabled=!1)},Er.prototype._onKeyDown=function(e){if(!(e.altKey||e.ctrlKey||e.metaKey)){var t=0,n=0,r=0,a=0,i=0;switch(e.keyCode){case 61:case 107:case 171:case 187:t=1;break;case 189:case 109:case 173:t=-1;break;case 37:e.shiftKey?n=-1:(e.preventDefault(),a=-1);break;case 39:e.shiftKey?n=1:(e.preventDefault(),a=1);break;case 38:e.shiftKey?r=1:(e.preventDefault(),i=-1);break;case 40:e.shiftKey?r=-1:(i=1,e.preventDefault());break;default:return}var o=this._map,s=o.getZoom(),u={duration:300,delayEndEvents:500,easing:Sr,zoom:t?Math.round(s)+t*(e.shiftKey?2:1):s,bearing:o.getBearing()+15*n,pitch:o.getPitch()+10*r,offset:[100*-a,100*-i],center:o.getCenter()};o.easeTo(u,{originalEvent:e})}};var Ar=function(t){this._map=t,e.bindAll(["_onDblClick","_onZoomEnd"],this)};Ar.prototype.isEnabled=function(){return!!this._enabled},Ar.prototype.isActive=function(){return!!this._active},Ar.prototype.enable=function(){this.isEnabled()||(this._enabled=!0)},Ar.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},Ar.prototype.onTouchStart=function(e){var t=this;if(this.isEnabled()&&!(e.points.length>1))if(this._tapped){var n=e.points[0],r=this._tappedPoint;if(r&&r.dist(n)<=30){e.originalEvent.preventDefault();var a=function(){t._tapped&&t._zoom(e),t._map.off("touchcancel",i),t._resetTapped()},i=function(){t._map.off("touchend",a),t._resetTapped()};this._map.once("touchend",a),this._map.once("touchcancel",i)}else this._resetTapped()}else this._tappedPoint=e.points[0],this._tapped=setTimeout((function(){t._tapped=null,t._tappedPoint=null}),300)},Ar.prototype._resetTapped=function(){clearTimeout(this._tapped),this._tapped=null,this._tappedPoint=null},Ar.prototype.onDblClick=function(e){this.isEnabled()&&(e.originalEvent.preventDefault(),this._zoom(e))},Ar.prototype._zoom=function(e){this._active=!0,this._map.on("zoomend",this._onZoomEnd),this._map.zoomTo(this._map.getZoom()+(e.originalEvent.shiftKey?-1:1),{around:e.lngLat},e)},Ar.prototype._onZoomEnd=function(){this._active=!1,this._map.off("zoomend",this._onZoomEnd)};var Tr=e.bezier(0,0,.15,1),Pr=function(t){this._map=t,this._el=t.getCanvasContainer(),e.bindAll(["_onMove","_onEnd","_onTouchFrame"],this)};Pr.prototype.isEnabled=function(){return!!this._enabled},Pr.prototype.enable=function(e){this.isEnabled()||(this._el.classList.add("mapboxgl-touch-zoom-rotate"),this._enabled=!0,this._aroundCenter=!!e&&"center"===e.around)},Pr.prototype.disable=function(){this.isEnabled()&&(this._el.classList.remove("mapboxgl-touch-zoom-rotate"),this._enabled=!1)},Pr.prototype.disableRotation=function(){this._rotationDisabled=!0},Pr.prototype.enableRotation=function(){this._rotationDisabled=!1},Pr.prototype.isActive=function(){return this.isEnabled()&&!!this._gestureIntent},Pr.prototype.onStart=function(t){if(this.isEnabled()&&2===t.touches.length){var r=n.mousePos(this._el,t.touches[0]),a=n.mousePos(this._el,t.touches[1]),i=r.add(a).div(2);this._startVec=r.sub(a),this._startAround=this._map.transform.pointLocation(i),this._gestureIntent=void 0,this._inertia=[],n.addEventListener(e.window.document,"touchmove",this._onMove,{passive:!1}),n.addEventListener(e.window.document,"touchend",this._onEnd)}},Pr.prototype._getTouchEventData=function(e){var t=n.mousePos(this._el,e.touches[0]),r=n.mousePos(this._el,e.touches[1]),a=t.sub(r);return{vec:a,center:t.add(r).div(2),scale:a.mag()/this._startVec.mag(),bearing:this._rotationDisabled?0:180*a.angleWith(this._startVec)/Math.PI}},Pr.prototype._onMove=function(t){if(2===t.touches.length){var n=this._getTouchEventData(t),r=n.vec,a=n.scale,i=n.bearing;if(!this._gestureIntent){var o=this._rotationDisabled&&1!==a||Math.abs(1-a)>.15;Math.abs(i)>10?this._gestureIntent="rotate":o&&(this._gestureIntent="zoom"),this._gestureIntent&&(this._map.fire(new e.Event(this._gestureIntent+"start",{originalEvent:t})),this._map.fire(new e.Event("movestart",{originalEvent:t})),this._startVec=r)}this._lastTouchEvent=t,this._frameId||(this._frameId=this._map._requestRenderFrame(this._onTouchFrame)),t.preventDefault()}},Pr.prototype._onTouchFrame=function(){this._frameId=null;var t=this._gestureIntent;if(t){var n=this._map.transform;this._startScale||(this._startScale=n.scale,this._startBearing=n.bearing);var r=this._getTouchEventData(this._lastTouchEvent),a=r.center,i=r.bearing,o=r.scale,s=n.pointLocation(a),u=n.locationPoint(s);"rotate"===t&&(n.bearing=this._startBearing+i),n.zoom=n.scaleZoom(this._startScale*o),n.setLocationAtPoint(this._startAround,u),this._map.fire(new e.Event(t,{originalEvent:this._lastTouchEvent})),this._map.fire(new e.Event("move",{originalEvent:this._lastTouchEvent})),this._drainInertiaBuffer(),this._inertia.push([e.browser.now(),o,a])}},Pr.prototype._onEnd=function(t){n.removeEventListener(e.window.document,"touchmove",this._onMove,{passive:!1}),n.removeEventListener(e.window.document,"touchend",this._onEnd);var r=this._gestureIntent,a=this._startScale;if(this._frameId&&(this._map._cancelRenderFrame(this._frameId),this._frameId=null),delete this._gestureIntent,delete this._startScale,delete this._startBearing,delete this._lastTouchEvent,r){this._map.fire(new e.Event(r+"end",{originalEvent:t})),this._drainInertiaBuffer();var i=this._inertia,o=this._map;if(i.length<2)o.snapToNorth({},{originalEvent:t});else{var s=i[i.length-1],u=i[0],c=o.transform.scaleZoom(a*s[1]),l=o.transform.scaleZoom(a*u[1]),d=c-l,f=(s[0]-u[0])/1e3,p=s[2];if(0!==f&&c!==l){var h=.15*d/f;Math.abs(h)>2.5&&(h=h>0?2.5:-2.5);var g=1e3*Math.abs(h/(12*.15)),v=c+h*g/2e3;v<0&&(v=0),o.easeTo({zoom:v,duration:g,easing:Tr,around:this._aroundCenter?o.getCenter():o.unproject(p),noMoveStart:!0},{originalEvent:t})}else o.snapToNorth({},{originalEvent:t})}}},Pr.prototype._drainInertiaBuffer=function(){for(var t=this._inertia,n=e.browser.now();t.length>2&&n-t[0][0]>160;)t.shift()};var Cr={scrollZoom:yr,boxZoom:br,dragRotate:xr,dragPan:wr,keyboard:Er,doubleClickZoom:Ar,touchZoomRotate:Pr},Or=function(t){function n(n,r){t.call(this),this._moving=!1,this._zooming=!1,this.transform=n,this._bearingSnap=r.bearingSnap,e.bindAll(["_renderFrameCallback"],this)}return t&&(n.__proto__=t),n.prototype=Object.create(t&&t.prototype),n.prototype.constructor=n,n.prototype.getCenter=function(){return new e.LngLat(this.transform.center.lng,this.transform.center.lat)},n.prototype.setCenter=function(e,t){return this.jumpTo({center:e},t)},n.prototype.panBy=function(t,n,r){return t=e.Point.convert(t).mult(-1),this.panTo(this.transform.center,e.extend({offset:t},n),r)},n.prototype.panTo=function(t,n,r){return this.easeTo(e.extend({center:t},n),r)},n.prototype.getZoom=function(){return this.transform.zoom},n.prototype.setZoom=function(e,t){return this.jumpTo({zoom:e},t),this},n.prototype.zoomTo=function(t,n,r){return this.easeTo(e.extend({zoom:t},n),r)},n.prototype.zoomIn=function(e,t){return this.zoomTo(this.getZoom()+1,e,t),this},n.prototype.zoomOut=function(e,t){return this.zoomTo(this.getZoom()-1,e,t),this},n.prototype.getBearing=function(){return this.transform.bearing},n.prototype.setBearing=function(e,t){return this.jumpTo({bearing:e},t),this},n.prototype.rotateTo=function(t,n,r){return this.easeTo(e.extend({bearing:t},n),r)},n.prototype.resetNorth=function(t,n){return this.rotateTo(0,e.extend({duration:1e3},t),n),this},n.prototype.resetNorthPitch=function(t,n){return this.easeTo(e.extend({bearing:0,pitch:0,duration:1e3},t),n),this},n.prototype.snapToNorth=function(e,t){return Math.abs(this.getBearing())t?1:0})),["bottom","left","right","top"])){var o=this.transform,s=o.project(e.LngLat.convert(t)),u=o.project(e.LngLat.convert(n)),c=s.rotate(-r*Math.PI/180),l=u.rotate(-r*Math.PI/180),d=new e.Point(Math.max(c.x,l.x),Math.max(c.y,l.y)),f=new e.Point(Math.min(c.x,l.x),Math.min(c.y,l.y)),p=d.sub(f),h=(o.width-a.padding.left-a.padding.right)/p.x,g=(o.height-a.padding.top-a.padding.bottom)/p.y;if(!(g<0||h<0)){var v=Math.min(o.scaleZoom(o.scale*Math.min(h,g)),a.maxZoom),m=e.Point.convert(a.offset),y=(a.padding.left-a.padding.right)/2,b=(a.padding.top-a.padding.bottom)/2,_=new e.Point(m.x+y,m.y+b).mult(o.scale/o.zoomScale(v));return{center:o.unproject(s.add(u).div(2).sub(_)),zoom:v,bearing:r}}e.warnOnce("Map cannot fit within canvas with the given bounds, padding, and/or offset.")}else e.warnOnce("options.padding must be a positive number, or an Object with keys 'bottom', 'left', 'right', 'top'")},n.prototype.fitBounds=function(e,t,n){return this._fitInternal(this.cameraForBounds(e,t),t,n)},n.prototype.fitScreenCoordinates=function(t,n,r,a,i){return this._fitInternal(this._cameraForBoxAndBearing(this.transform.pointLocation(e.Point.convert(t)),this.transform.pointLocation(e.Point.convert(n)),r,a),a,i)},n.prototype._fitInternal=function(t,n,r){return t?(n=e.extend(t,n)).linear?this.easeTo(n,r):this.flyTo(n,r):this},n.prototype.jumpTo=function(t,n){this.stop();var r=this.transform,a=!1,i=!1,o=!1;return"zoom"in t&&r.zoom!==+t.zoom&&(a=!0,r.zoom=+t.zoom),void 0!==t.center&&(r.center=e.LngLat.convert(t.center)),"bearing"in t&&r.bearing!==+t.bearing&&(i=!0,r.bearing=+t.bearing),"pitch"in t&&r.pitch!==+t.pitch&&(o=!0,r.pitch=+t.pitch),this.fire(new e.Event("movestart",n)).fire(new e.Event("move",n)),a&&this.fire(new e.Event("zoomstart",n)).fire(new e.Event("zoom",n)).fire(new e.Event("zoomend",n)),i&&this.fire(new e.Event("rotatestart",n)).fire(new e.Event("rotate",n)).fire(new e.Event("rotateend",n)),o&&this.fire(new e.Event("pitchstart",n)).fire(new e.Event("pitch",n)).fire(new e.Event("pitchend",n)),this.fire(new e.Event("moveend",n))},n.prototype.easeTo=function(t,n){var r=this;this.stop(),(!1===(t=e.extend({offset:[0,0],duration:500,easing:e.ease},t)).animate||e.browser.prefersReducedMotion)&&(t.duration=0);var a=this.transform,i=this.getZoom(),o=this.getBearing(),s=this.getPitch(),u="zoom"in t?+t.zoom:i,c="bearing"in t?this._normalizeBearing(t.bearing,o):o,l="pitch"in t?+t.pitch:s,d=a.centerPoint.add(e.Point.convert(t.offset)),f=a.pointLocation(d),p=e.LngLat.convert(t.center||f);this._normalizeCenter(p);var h,g,v=a.project(f),m=a.project(p).sub(v),y=a.zoomScale(u-i);return t.around&&(h=e.LngLat.convert(t.around),g=a.locationPoint(h)),this._zooming=u!==i,this._rotating=o!==c,this._pitching=l!==s,this._prepareEase(n,t.noMoveStart),clearTimeout(this._easeEndTimeoutID),this._ease((function(t){if(r._zooming&&(a.zoom=e.number(i,u,t)),r._rotating&&(a.bearing=e.number(o,c,t)),r._pitching&&(a.pitch=e.number(s,l,t)),h)a.setLocationAtPoint(h,g);else{var f=a.zoomScale(a.zoom-i),p=u>i?Math.min(2,y):Math.max(.5,y),b=Math.pow(p,1-t),_=a.unproject(v.add(m.mult(t*b)).mult(f));a.setLocationAtPoint(a.renderWorldCopies?_.wrap():_,d)}r._fireMoveEvents(n)}),(function(){t.delayEndEvents?r._easeEndTimeoutID=setTimeout((function(){return r._afterEase(n)}),t.delayEndEvents):r._afterEase(n)}),t),this},n.prototype._prepareEase=function(t,n){this._moving=!0,n||this.fire(new e.Event("movestart",t)),this._zooming&&this.fire(new e.Event("zoomstart",t)),this._rotating&&this.fire(new e.Event("rotatestart",t)),this._pitching&&this.fire(new e.Event("pitchstart",t))},n.prototype._fireMoveEvents=function(t){this.fire(new e.Event("move",t)),this._zooming&&this.fire(new e.Event("zoom",t)),this._rotating&&this.fire(new e.Event("rotate",t)),this._pitching&&this.fire(new e.Event("pitch",t))},n.prototype._afterEase=function(t){var n=this._zooming,r=this._rotating,a=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,n&&this.fire(new e.Event("zoomend",t)),r&&this.fire(new e.Event("rotateend",t)),a&&this.fire(new e.Event("pitchend",t)),this.fire(new e.Event("moveend",t))},n.prototype.flyTo=function(t,n){var r=this;if(e.browser.prefersReducedMotion){var a=e.pick(t,["center","zoom","bearing","pitch","around"]);return this.jumpTo(a,n)}this.stop(),t=e.extend({offset:[0,0],speed:1.2,curve:1.42,easing:e.ease},t);var i=this.transform,o=this.getZoom(),s=this.getBearing(),u=this.getPitch(),c="zoom"in t?e.clamp(+t.zoom,i.minZoom,i.maxZoom):o,l="bearing"in t?this._normalizeBearing(t.bearing,s):s,d="pitch"in t?+t.pitch:u,f=i.zoomScale(c-o),p=i.centerPoint.add(e.Point.convert(t.offset)),h=i.pointLocation(p),g=e.LngLat.convert(t.center||h);this._normalizeCenter(g);var v=i.project(h),m=i.project(g).sub(v),y=t.curve,b=Math.max(i.width,i.height),_=b/f,x=m.mag();if("minZoom"in t){var R=e.clamp(Math.min(t.minZoom,o,c),i.minZoom,i.maxZoom),w=b/i.zoomScale(R-o);y=Math.sqrt(w/x*2)}var E=y*y;function S(e){var t=(_*_-b*b+(e?-1:1)*E*E*x*x)/(2*(e?_:b)*E*x);return Math.log(Math.sqrt(t*t+1)-t)}function A(e){return(Math.exp(e)-Math.exp(-e))/2}function T(e){return(Math.exp(e)+Math.exp(-e))/2}var P=S(0),C=function(e){return T(P)/T(P+y*e)},O=function(e){return b*((T(P)*(A(t=P+y*e)/T(t))-A(P))/E)/x;var t},M=(S(1)-P)/y;if(Math.abs(x)<1e-6||!isFinite(M)){if(Math.abs(b-_)<1e-6)return this.easeTo(t,n);var k=_t.maxDuration&&(t.duration=0),this._zooming=!0,this._rotating=s!==l,this._pitching=d!==u,this._prepareEase(n,!1),this._ease((function(t){var a=t*M,f=1/C(a);i.zoom=1===t?c:o+i.scaleZoom(f),r._rotating&&(i.bearing=e.number(s,l,t)),r._pitching&&(i.pitch=e.number(u,d,t));var h=1===t?g:i.unproject(v.add(m.mult(O(a))).mult(f));i.setLocationAtPoint(i.renderWorldCopies?h.wrap():h,p),r._fireMoveEvents(n)}),(function(){return r._afterEase(n)}),t),this},n.prototype.isEasing=function(){return!!this._easeFrameId},n.prototype.stop=function(){if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){var e=this._onEaseEnd;delete this._onEaseEnd,e.call(this)}return this},n.prototype._ease=function(t,n,r){!1===r.animate||0===r.duration?(t(1),n()):(this._easeStart=e.browser.now(),this._easeOptions=r,this._onEaseFrame=t,this._onEaseEnd=n,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))},n.prototype._renderFrameCallback=function(){var t=Math.min((e.browser.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(t)),t<1?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},n.prototype._normalizeBearing=function(t,n){t=e.wrap(t,-180,180);var r=Math.abs(t-n);return Math.abs(t-360-n)180?-360:n<-180?360:0}},n}(e.Evented),Mr=function(t){void 0===t&&(t={}),this.options=t,e.bindAll(["_updateEditLink","_updateData","_updateCompact"],this)};Mr.prototype.getDefaultPosition=function(){return"bottom-right"},Mr.prototype.onAdd=function(e){var t=this.options&&this.options.compact;return this._map=e,this._container=n.create("div","mapboxgl-ctrl mapboxgl-ctrl-attrib"),this._innerContainer=n.create("div","mapboxgl-ctrl-attrib-inner",this._container),t&&this._container.classList.add("mapboxgl-compact"),this._updateAttributions(),this._updateEditLink(),this._map.on("styledata",this._updateData),this._map.on("sourcedata",this._updateData),this._map.on("moveend",this._updateEditLink),void 0===t&&(this._map.on("resize",this._updateCompact),this._updateCompact()),this._container},Mr.prototype.onRemove=function(){n.remove(this._container),this._map.off("styledata",this._updateData),this._map.off("sourcedata",this._updateData),this._map.off("moveend",this._updateEditLink),this._map.off("resize",this._updateCompact),this._map=void 0},Mr.prototype._updateEditLink=function(){var t=this._editLink;t||(t=this._editLink=this._container.querySelector(".mapbox-improve-map"));var n=[{key:"owner",value:this.styleOwner},{key:"id",value:this.styleId},{key:"access_token",value:this._map._requestManager._customAccessToken||e.config.ACCESS_TOKEN}];if(t){var r=n.reduce((function(e,t,r){return t.value&&(e+=t.key+"="+t.value+(r=0)return!1;return!0}))).join(" | ");o!==this._attribHTML&&(this._attribHTML=o,e.length?(this._innerContainer.innerHTML=o,this._container.classList.remove("mapboxgl-attrib-empty")):this._container.classList.add("mapboxgl-attrib-empty"),this._editLink=null)}},Mr.prototype._updateCompact=function(){this._map.getCanvasContainer().offsetWidth<=640?this._container.classList.add("mapboxgl-compact"):this._container.classList.remove("mapboxgl-compact")};var kr=function(){e.bindAll(["_updateLogo"],this),e.bindAll(["_updateCompact"],this)};kr.prototype.onAdd=function(e){this._map=e,this._container=n.create("div","mapboxgl-ctrl");var t=n.create("a","mapboxgl-ctrl-logo");return t.target="_blank",t.rel="noopener nofollow",t.href="https://www.mapbox.com/",t.setAttribute("aria-label","Mapbox logo"),t.setAttribute("rel","noopener nofollow"),this._container.appendChild(t),this._container.style.display="none",this._map.on("sourcedata",this._updateLogo),this._updateLogo(),this._map.on("resize",this._updateCompact),this._updateCompact(),this._container},kr.prototype.onRemove=function(){n.remove(this._container),this._map.off("sourcedata",this._updateLogo),this._map.off("resize",this._updateCompact)},kr.prototype.getDefaultPosition=function(){return"bottom-left"},kr.prototype._updateLogo=function(e){e&&"metadata"!==e.sourceDataType||(this._container.style.display=this._logoRequired()?"block":"none")},kr.prototype._logoRequired=function(){if(this._map.style){var e=this._map.style.sourceCaches;for(var t in e)if(e[t].getSource().mapbox_logo)return!0;return!1}},kr.prototype._updateCompact=function(){var e=this._container.children;if(e.length){var t=e[0];this._map.getCanvasContainer().offsetWidth<250?t.classList.add("mapboxgl-compact"):t.classList.remove("mapboxgl-compact")}};var Dr=function(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1};Dr.prototype.add=function(e){var t=++this._id;return this._queue.push({callback:e,id:t,cancelled:!1}),t},Dr.prototype.remove=function(e){for(var t=this._currentlyRunning,n=0,r=t?this._queue.concat(t):this._queue;nt.maxZoom)throw new Error("maxZoom must be greater than minZoom");var i=new fr(t.minZoom,t.maxZoom,t.renderWorldCopies);if(r.call(this,i,t),this._interactive=t.interactive,this._maxTileCacheSize=t.maxTileCacheSize,this._failIfMajorPerformanceCaveat=t.failIfMajorPerformanceCaveat,this._preserveDrawingBuffer=t.preserveDrawingBuffer,this._antialias=t.antialias,this._trackResize=t.trackResize,this._bearingSnap=t.bearingSnap,this._refreshExpiredTiles=t.refreshExpiredTiles,this._fadeDuration=t.fadeDuration,this._crossSourceCollisions=t.crossSourceCollisions,this._crossFadingFactor=1,this._collectResourceTiming=t.collectResourceTiming,this._renderTaskQueue=new Dr,this._controls=[],this._mapId=e.uniqueId(),this._requestManager=new e.RequestManager(t.transformRequest,t.accessToken),"string"==typeof t.container){if(this._container=e.window.document.getElementById(t.container),!this._container)throw new Error("Container '"+t.container+"' not found.")}else{if(!(t.container instanceof Lr))throw new Error("Invalid type: 'container' must be a String or HTMLElement.");this._container=t.container}if(t.maxBounds&&this.setMaxBounds(t.maxBounds),e.bindAll(["_onWindowOnline","_onWindowResize","_contextLost","_contextRestored"],this),this._setupContainer(),this._setupPainter(),void 0===this.painter)throw new Error("Failed to initialize WebGL.");this.on("move",(function(){return a._update(!1)})),this.on("moveend",(function(){return a._update(!1)})),this.on("zoom",(function(){return a._update(!0)})),void 0!==e.window&&(e.window.addEventListener("online",this._onWindowOnline,!1),e.window.addEventListener("resize",this._onWindowResize,!1)),function(e,t){var r=e.getCanvasContainer(),a=null,i=!1,o=null;for(var s in Cr)e[s]=new Cr[s](e,t),t.interactive&&t[s]&&e[s].enable(t[s]);n.addEventListener(r,"mouseout",(function(t){e.fire(new gr("mouseout",e,t))})),n.addEventListener(r,"mousedown",(function(a){i=!0,o=n.mousePos(r,a);var s=new gr("mousedown",e,a);e.fire(s),s.defaultPrevented||(t.interactive&&!e.doubleClickZoom.isActive()&&e.stop(),e.boxZoom.onMouseDown(a),e.boxZoom.isActive()||e.dragPan.isActive()||e.dragRotate.onMouseDown(a),e.boxZoom.isActive()||e.dragRotate.isActive()||e.dragPan.onMouseDown(a))})),n.addEventListener(r,"mouseup",(function(t){var n=e.dragRotate.isActive();a&&!n&&e.fire(new gr("contextmenu",e,a)),a=null,i=!1,e.fire(new gr("mouseup",e,t))})),n.addEventListener(r,"mousemove",(function(t){if(!e.dragPan.isActive()&&!e.dragRotate.isActive()){for(var n=t.target;n&&n!==r;)n=n.parentNode;n===r&&e.fire(new gr("mousemove",e,t))}})),n.addEventListener(r,"mouseover",(function(t){for(var n=t.target;n&&n!==r;)n=n.parentNode;n===r&&e.fire(new gr("mouseover",e,t))})),n.addEventListener(r,"touchstart",(function(n){var r=new vr("touchstart",e,n);e.fire(r),r.defaultPrevented||(t.interactive&&e.stop(),e.boxZoom.isActive()||e.dragRotate.isActive()||e.dragPan.onTouchStart(n),e.touchZoomRotate.onStart(n),e.doubleClickZoom.onTouchStart(r))}),{passive:!1}),n.addEventListener(r,"touchmove",(function(t){e.fire(new vr("touchmove",e,t))}),{passive:!1}),n.addEventListener(r,"touchend",(function(t){e.fire(new vr("touchend",e,t))})),n.addEventListener(r,"touchcancel",(function(t){e.fire(new vr("touchcancel",e,t))})),n.addEventListener(r,"click",(function(a){var i=n.mousePos(r,a);(!o||i.equals(o)||i.dist(o)-1&&this._controls.splice(n,1),t.onRemove(this),this},a.prototype.resize=function(t){var n=this._containerDimensions(),r=n[0],a=n[1];return this._resizeCanvas(r,a),this.transform.resize(r,a),this.painter.resize(r,a),this.fire(new e.Event("movestart",t)).fire(new e.Event("move",t)).fire(new e.Event("resize",t)).fire(new e.Event("moveend",t)),this},a.prototype.getBounds=function(){return this.transform.getBounds()},a.prototype.getMaxBounds=function(){return this.transform.getMaxBounds()},a.prototype.setMaxBounds=function(t){return this.transform.setMaxBounds(e.LngLatBounds.convert(t)),this._update()},a.prototype.setMinZoom=function(e){if((e=null==e?0:e)>=0&&e<=this.transform.maxZoom)return this.transform.minZoom=e,this._update(),this.getZoom()=this.transform.minZoom)return this.transform.maxZoom=e,this._update(),this.getZoom()>e&&this.setZoom(e),this;throw new Error("maxZoom must be greater than the current minZoom")},a.prototype.getMaxZoom=function(){return this.transform.maxZoom},a.prototype.getRenderWorldCopies=function(){return this.transform.renderWorldCopies},a.prototype.setRenderWorldCopies=function(e){return this.transform.renderWorldCopies=e,this._update()},a.prototype.project=function(t){return this.transform.locationPoint(e.LngLat.convert(t))},a.prototype.unproject=function(t){return this.transform.pointLocation(e.Point.convert(t))},a.prototype.isMoving=function(){return this._moving||this.dragPan.isActive()||this.dragRotate.isActive()||this.scrollZoom.isActive()},a.prototype.isZooming=function(){return this._zooming||this.scrollZoom.isZooming()},a.prototype.isRotating=function(){return this._rotating||this.dragRotate.isActive()},a.prototype.on=function(e,t,n){var a=this;if(void 0===n)return r.prototype.on.call(this,e,t);var i=function(){var r;if("mouseenter"===e||"mouseover"===e){var i=!1;return{layer:t,listener:n,delegates:{mousemove:function(r){var o=a.getLayer(t)?a.queryRenderedFeatures(r.point,{layers:[t]}):[];o.length?i||(i=!0,n.call(a,new gr(e,a,r.originalEvent,{features:o}))):i=!1},mouseout:function(){i=!1}}}}if("mouseleave"===e||"mouseout"===e){var o=!1;return{layer:t,listener:n,delegates:{mousemove:function(r){(a.getLayer(t)?a.queryRenderedFeatures(r.point,{layers:[t]}):[]).length?o=!0:o&&(o=!1,n.call(a,new gr(e,a,r.originalEvent)))},mouseout:function(t){o&&(o=!1,n.call(a,new gr(e,a,t.originalEvent)))}}}}return{layer:t,listener:n,delegates:(r={},r[e]=function(e){var r=a.getLayer(t)?a.queryRenderedFeatures(e.point,{layers:[t]}):[];r.length&&(e.features=r,n.call(a,e),delete e.features)},r)}}();for(var o in this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[e]=this._delegatedListeners[e]||[],this._delegatedListeners[e].push(i),i.delegates)this.on(o,i.delegates[o]);return this},a.prototype.off=function(e,t,n){if(void 0===n)return r.prototype.off.call(this,e,t);if(this._delegatedListeners&&this._delegatedListeners[e])for(var a=this._delegatedListeners[e],i=0;i180;){var s=r.locationPoint(t);if(s.x>=0&&s.y>=0&&s.x<=r.width&&s.y<=r.height)break;t.lng>r.center.lng?t.lng-=360:t.lng+=360}return t}Br.prototype._updateZoomButtons=function(){var e=this._map.getZoom();e===this._map.getMaxZoom()?this._zoomInButton.classList.add("mapboxgl-ctrl-icon-disabled"):this._zoomInButton.classList.remove("mapboxgl-ctrl-icon-disabled"),e===this._map.getMinZoom()?this._zoomOutButton.classList.add("mapboxgl-ctrl-icon-disabled"):this._zoomOutButton.classList.remove("mapboxgl-ctrl-icon-disabled")},Br.prototype._rotateCompassArrow=function(){var e=this.options.visualizePitch?"scale("+1/Math.pow(Math.cos(this._map.transform.pitch*(Math.PI/180)),.5)+") rotateX("+this._map.transform.pitch+"deg) rotateZ("+this._map.transform.angle*(180/Math.PI)+"deg)":"rotate("+this._map.transform.angle*(180/Math.PI)+"deg)";this._compassArrow.style.transform=e},Br.prototype.onAdd=function(e){return this._map=e,this.options.showZoom&&(this._map.on("zoom",this._updateZoomButtons),this._updateZoomButtons()),this.options.showCompass&&(this.options.visualizePitch&&this._map.on("pitch",this._rotateCompassArrow),this._map.on("rotate",this._rotateCompassArrow),this._rotateCompassArrow(),this._handler=new xr(e,{button:"left",element:this._compass}),n.addEventListener(this._compass,"mousedown",this._handler.onMouseDown),n.addEventListener(this._compass,"touchstart",this._handler.onMouseDown,{passive:!1}),this._handler.enable()),this._container},Br.prototype.onRemove=function(){n.remove(this._container),this.options.showZoom&&this._map.off("zoom",this._updateZoomButtons),this.options.showCompass&&(this.options.visualizePitch&&this._map.off("pitch",this._rotateCompassArrow),this._map.off("rotate",this._rotateCompassArrow),n.removeEventListener(this._compass,"mousedown",this._handler.onMouseDown),n.removeEventListener(this._compass,"touchstart",this._handler.onMouseDown,{passive:!1}),this._handler.disable(),delete this._handler),delete this._map},Br.prototype._createButton=function(e,t,r){var a=n.create("button",e,this._container);return a.type="button",a.title=t,a.setAttribute("aria-label",t),a.addEventListener("click",r),a};var Hr={center:"translate(-50%,-50%)",top:"translate(-50%,0)","top-left":"translate(0,0)","top-right":"translate(-100%,0)",bottom:"translate(-50%,-100%)","bottom-left":"translate(0,-100%)","bottom-right":"translate(-100%,-100%)",left:"translate(0,-50%)",right:"translate(-100%,-50%)"};function Ur(e,t,n){var r=e.classList;for(var a in Hr)r.remove("mapboxgl-"+n+"-anchor-"+a);r.add("mapboxgl-"+n+"-anchor-"+t)}var Wr,qr=function(t){function r(r,a){if(t.call(this),(r instanceof e.window.HTMLElement||a)&&(r=e.extend({element:r},a)),e.bindAll(["_update","_onMove","_onUp","_addDragHandler","_onMapClick"],this),this._anchor=r&&r.anchor||"center",this._color=r&&r.color||"#3FB1CE",this._draggable=r&&r.draggable||!1,this._state="inactive",r&&r.element)this._element=r.element,this._offset=e.Point.convert(r&&r.offset||[0,0]);else{this._defaultMarker=!0,this._element=n.create("div");var i=n.createNS("http://www.w3.org/2000/svg","svg");i.setAttributeNS(null,"display","block"),i.setAttributeNS(null,"height","41px"),i.setAttributeNS(null,"width","27px"),i.setAttributeNS(null,"viewBox","0 0 27 41");var o=n.createNS("http://www.w3.org/2000/svg","g");o.setAttributeNS(null,"stroke","none"),o.setAttributeNS(null,"stroke-width","1"),o.setAttributeNS(null,"fill","none"),o.setAttributeNS(null,"fill-rule","evenodd");var s=n.createNS("http://www.w3.org/2000/svg","g");s.setAttributeNS(null,"fill-rule","nonzero");var u=n.createNS("http://www.w3.org/2000/svg","g");u.setAttributeNS(null,"transform","translate(3.0, 29.0)"),u.setAttributeNS(null,"fill","#000000");for(var c=0,l=[{rx:"10.5",ry:"5.25002273"},{rx:"10.5",ry:"5.25002273"},{rx:"9.5",ry:"4.77275007"},{rx:"8.5",ry:"4.29549936"},{rx:"7.5",ry:"3.81822308"},{rx:"6.5",ry:"3.34094679"},{rx:"5.5",ry:"2.86367051"},{rx:"4.5",ry:"2.38636864"}];ct.getEast()||n.latitudet.getNorth())},r.prototype._setErrorState=function(){switch(this._watchState){case"WAITING_ACTIVE":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error");break;case"ACTIVE_LOCK":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting");break;case"BACKGROUND":this._watchState="BACKGROUND_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting")}},r.prototype._onSuccess=function(t){if(this._isOutOfMapMaxBounds(t))return this._setErrorState(),this.fire(new e.Event("outofmaxbounds",t)),this._updateMarker(),void this._finish();if(this.options.trackUserLocation)switch(this._lastKnownPosition=t,this._watchState){case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"BACKGROUND":case"BACKGROUND_ERROR":this._watchState="BACKGROUND",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background")}this.options.showUserLocation&&"OFF"!==this._watchState&&this._updateMarker(t),this.options.trackUserLocation&&"ACTIVE_LOCK"!==this._watchState||this._updateCamera(t),this.options.showUserLocation&&this._dotElement.classList.remove("mapboxgl-user-location-dot-stale"),this.fire(new e.Event("geolocate",t)),this._finish()},r.prototype._updateCamera=function(t){var n=new e.LngLat(t.coords.longitude,t.coords.latitude),r=t.coords.accuracy,a=this._map.getBearing(),i=e.extend({bearing:a},this.options.fitBoundsOptions);this._map.fitBounds(n.toBounds(r),i,{geolocateSource:!0})},r.prototype._updateMarker=function(e){e?this._userLocationDotMarker.setLngLat([e.coords.longitude,e.coords.latitude]).addTo(this._map):this._userLocationDotMarker.remove()},r.prototype._onError=function(t){this.options.trackUserLocation&&(1===t.code?(this._watchState="OFF",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.disabled=!0,this._geolocateButton.title="Location not available",this._geolocateButton.setAttribute("aria-label","Location not available"),void 0!==this._geolocationWatchID&&this._clearWatch()):this._setErrorState()),"OFF"!==this._watchState&&this.options.showUserLocation&&this._dotElement.classList.add("mapboxgl-user-location-dot-stale"),this.fire(new e.Event("error",t)),this._finish()},r.prototype._finish=function(){this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},r.prototype._setupUI=function(t){var r=this;this._container.addEventListener("contextmenu",(function(e){return e.preventDefault()})),this._geolocateButton=n.create("button","mapboxgl-ctrl-icon mapboxgl-ctrl-geolocate",this._container),this._geolocateButton.type="button",this._geolocateButton.title="Find my location",this._geolocateButton.setAttribute("aria-label","Find my location"),!1===t&&(e.warnOnce("Geolocation support is not available so the GeolocateControl will be disabled."),this._geolocateButton.disabled=!0,this._geolocateButton.title="Location not available",this._geolocateButton.setAttribute("aria-label","Location not available")),this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=n.create("div","mapboxgl-user-location-dot"),this._userLocationDotMarker=new qr(this._dotElement),this.options.trackUserLocation&&(this._watchState="OFF")),this._geolocateButton.addEventListener("click",this.trigger.bind(this)),this._setup=!0,this.options.trackUserLocation&&this._map.on("movestart",(function(t){var n=t.originalEvent&&"resize"===t.originalEvent.type;t.geolocateSource||"ACTIVE_LOCK"!==r._watchState||n||(r._watchState="BACKGROUND",r._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background"),r._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),r.fire(new e.Event("trackuserlocationend")))}))},r.prototype.trigger=function(){if(!this._setup)return e.warnOnce("Geolocate control triggered before added to a map"),!1;if(this.options.trackUserLocation){switch(this._watchState){case"OFF":this._watchState="WAITING_ACTIVE",this.fire(new e.Event("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":this._watchState="OFF",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this.fire(new e.Event("trackuserlocationend"));break;case"BACKGROUND":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._lastKnownPosition&&this._updateCamera(this._lastKnownPosition),this.fire(new e.Event("trackuserlocationstart"))}switch(this._watchState){case"WAITING_ACTIVE":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"ACTIVE_LOCK":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"ACTIVE_ERROR":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error");break;case"BACKGROUND":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background");break;case"BACKGROUND_ERROR":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background-error")}"OFF"===this._watchState&&void 0!==this._geolocationWatchID?this._clearWatch():void 0===this._geolocationWatchID&&(this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),this._geolocationWatchID=e.window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,this.options.positionOptions))}else e.window.navigator.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4);return!0},r.prototype._clearWatch=function(){e.window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0,this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","false"),this.options.showUserLocation&&this._updateMarker(null)},r}(e.Evented),Yr={maxWidth:100,unit:"metric"},Xr=function(t){this.options=e.extend({},Yr,t),e.bindAll(["_onMove","setUnit"],this)};function Jr(e,t,n){var r,a,i,o,s,u,c=n&&n.maxWidth||100,l=e._container.clientHeight/2,d=(r=e.unproject([0,l]),a=e.unproject([c,l]),i=Math.PI/180,o=r.lat*i,s=a.lat*i,u=Math.sin(o)*Math.sin(s)+Math.cos(o)*Math.cos(s)*Math.cos((a.lng-r.lng)*i),6371e3*Math.acos(Math.min(u,1)));if(n&&"imperial"===n.unit){var f=3.2808*d;f>5280?Zr(t,c,f/5280,"mi"):Zr(t,c,f,"ft")}else n&&"nautical"===n.unit?Zr(t,c,d/1852,"nm"):Zr(t,c,d,"m")}function Zr(e,t,n,r){var a,i,o,s=(a=n,(i=Math.pow(10,(""+Math.floor(a)).length-1))*(o=(o=a/i)>=10?10:o>=5?5:o>=3?3:o>=2?2:o>=1?1:function(e){var t=Math.pow(10,Math.ceil(-Math.log(e)/Math.LN10));return Math.round(e*t)/t}(o))),u=s/n;"m"===r&&s>=1e3&&(s/=1e3,r="km"),e.style.width=t*u+"px",e.innerHTML=s+r}Xr.prototype.getDefaultPosition=function(){return"bottom-left"},Xr.prototype._onMove=function(){Jr(this._map,this._container,this.options)},Xr.prototype.onAdd=function(e){return this._map=e,this._container=n.create("div","mapboxgl-ctrl mapboxgl-ctrl-scale",e.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container},Xr.prototype.onRemove=function(){n.remove(this._container),this._map.off("move",this._onMove),this._map=void 0},Xr.prototype.setUnit=function(e){this.options.unit=e,Jr(this._map,this._container,this.options)};var $r=function(t){this._fullscreen=!1,t&&t.container&&(t.container instanceof e.window.HTMLElement?this._container=t.container:e.warnOnce("Full screen control 'container' must be a DOM element.")),e.bindAll(["_onClickFullscreen","_changeIcon"],this),"onfullscreenchange"in e.window.document?this._fullscreenchange="fullscreenchange":"onmozfullscreenchange"in e.window.document?this._fullscreenchange="mozfullscreenchange":"onwebkitfullscreenchange"in e.window.document?this._fullscreenchange="webkitfullscreenchange":"onmsfullscreenchange"in e.window.document&&(this._fullscreenchange="MSFullscreenChange"),this._className="mapboxgl-ctrl"};$r.prototype.onAdd=function(t){return this._map=t,this._container||(this._container=this._map.getContainer()),this._controlContainer=n.create("div",this._className+" mapboxgl-ctrl-group"),this._checkFullscreenSupport()?this._setupUI():(this._controlContainer.style.display="none",e.warnOnce("This device does not support fullscreen mode.")),this._controlContainer},$r.prototype.onRemove=function(){n.remove(this._controlContainer),this._map=null,e.window.document.removeEventListener(this._fullscreenchange,this._changeIcon)},$r.prototype._checkFullscreenSupport=function(){return!!(e.window.document.fullscreenEnabled||e.window.document.mozFullScreenEnabled||e.window.document.msFullscreenEnabled||e.window.document.webkitFullscreenEnabled)},$r.prototype._setupUI=function(){(this._fullscreenButton=n.create("button",this._className+"-icon "+this._className+"-fullscreen",this._controlContainer)).type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),e.window.document.addEventListener(this._fullscreenchange,this._changeIcon)},$r.prototype._updateTitle=function(){var e=this._isFullscreen()?"Exit fullscreen":"Enter fullscreen";this._fullscreenButton.setAttribute("aria-label",e),this._fullscreenButton.title=e},$r.prototype._isFullscreen=function(){return this._fullscreen},$r.prototype._changeIcon=function(){(e.window.document.fullscreenElement||e.window.document.mozFullScreenElement||e.window.document.webkitFullscreenElement||e.window.document.msFullscreenElement)===this._container!==this._fullscreen&&(this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle(this._className+"-shrink"),this._fullscreenButton.classList.toggle(this._className+"-fullscreen"),this._updateTitle())},$r.prototype._onClickFullscreen=function(){this._isFullscreen()?e.window.document.exitFullscreen?e.window.document.exitFullscreen():e.window.document.mozCancelFullScreen?e.window.document.mozCancelFullScreen():e.window.document.msExitFullscreen?e.window.document.msExitFullscreen():e.window.document.webkitCancelFullScreen&&e.window.document.webkitCancelFullScreen():this._container.requestFullscreen?this._container.requestFullscreen():this._container.mozRequestFullScreen?this._container.mozRequestFullScreen():this._container.msRequestFullscreen?this._container.msRequestFullscreen():this._container.webkitRequestFullscreen&&this._container.webkitRequestFullscreen()};var Qr={closeButton:!0,closeOnClick:!0,className:"",maxWidth:"240px"},ea=function(t){function r(n){t.call(this),this.options=e.extend(Object.create(Qr),n),e.bindAll(["_update","_onClickClose","remove"],this)}return t&&(r.__proto__=t),r.prototype=Object.create(t&&t.prototype),r.prototype.constructor=r,r.prototype.addTo=function(t){var n=this;return this._map=t,this.options.closeOnClick&&this._map.on("click",this._onClickClose),this._map.on("remove",this.remove),this._update(),this._trackPointer?(this._map.on("mousemove",(function(e){n._update(e.point)})),this._map.on("mouseup",(function(e){n._update(e.point)})),this._container&&this._container.classList.add("mapboxgl-popup-track-pointer"),this._map._canvasContainer.classList.add("mapboxgl-track-pointer")):this._map.on("move",this._update),this.fire(new e.Event("open")),this},r.prototype.isOpen=function(){return!!this._map},r.prototype.remove=function(){return this._content&&n.remove(this._content),this._container&&(n.remove(this._container),delete this._container),this._map&&(this._map.off("move",this._update),this._map.off("click",this._onClickClose),this._map.off("remove",this.remove),this._map.off("mousemove"),delete this._map),this.fire(new e.Event("close")),this},r.prototype.getLngLat=function(){return this._lngLat},r.prototype.setLngLat=function(t){return this._lngLat=e.LngLat.convert(t),this._pos=null,this._trackPointer=!1,this._update(),this._map&&(this._map.on("move",this._update),this._map.off("mousemove"),this._container&&this._container.classList.remove("mapboxgl-popup-track-pointer"),this._map._canvasContainer.classList.remove("mapboxgl-track-pointer")),this},r.prototype.trackPointer=function(){var e=this;return this._trackPointer=!0,this._pos=null,this._update(),this._map&&(this._map.off("move",this._update),this._map.on("mousemove",(function(t){e._update(t.point)})),this._map.on("drag",(function(t){e._update(t.point)})),this._container&&this._container.classList.add("mapboxgl-popup-track-pointer"),this._map._canvasContainer.classList.add("mapboxgl-track-pointer")),this},r.prototype.getElement=function(){return this._container},r.prototype.setText=function(t){return this.setDOMContent(e.window.document.createTextNode(t))},r.prototype.setHTML=function(t){var n,r=e.window.document.createDocumentFragment(),a=e.window.document.createElement("body");for(a.innerHTML=t;n=a.firstChild;)r.appendChild(n);return this.setDOMContent(r)},r.prototype.getMaxWidth=function(){return this._container.style.maxWidth},r.prototype.setMaxWidth=function(e){return this.options.maxWidth=e,this._update(),this},r.prototype.setDOMContent=function(e){return this._createContent(),this._content.appendChild(e),this._update(),this},r.prototype._createContent=function(){this._content&&n.remove(this._content),this._content=n.create("div","mapboxgl-popup-content",this._container),this.options.closeButton&&(this._closeButton=n.create("button","mapboxgl-popup-close-button",this._content),this._closeButton.type="button",this._closeButton.setAttribute("aria-label","Close popup"),this._closeButton.innerHTML="×",this._closeButton.addEventListener("click",this._onClickClose))},r.prototype._update=function(t){var r=this,a=this._lngLat||this._trackPointer;if(this._map&&a&&this._content&&(this._container||(this._container=n.create("div","mapboxgl-popup",this._map.getContainer()),this._tip=n.create("div","mapboxgl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className&&this.options.className.split(" ").forEach((function(e){return r._container.classList.add(e)})),this._trackPointer&&this._container.classList.add("mapboxgl-popup-track-pointer")),this.options.maxWidth&&this._container.style.maxWidth!==this.options.maxWidth&&(this._container.style.maxWidth=this.options.maxWidth),this._map.transform.renderWorldCopies&&!this._trackPointer&&(this._lngLat=Vr(this._lngLat,this._pos,this._map.transform)),!this._trackPointer||t)){var i=this._pos=this._trackPointer&&t?t:this._map.project(this._lngLat),o=this.options.anchor,s=function t(n){if(n){if("number"==typeof n){var r=Math.round(Math.sqrt(.5*Math.pow(n,2)));return{center:new e.Point(0,0),top:new e.Point(0,n),"top-left":new e.Point(r,r),"top-right":new e.Point(-r,r),bottom:new e.Point(0,-n),"bottom-left":new e.Point(r,-r),"bottom-right":new e.Point(-r,-r),left:new e.Point(n,0),right:new e.Point(-n,0)}}if(n instanceof e.Point||Array.isArray(n)){var a=e.Point.convert(n);return{center:a,top:a,"top-left":a,"top-right":a,bottom:a,"bottom-left":a,"bottom-right":a,left:a,right:a}}return{center:e.Point.convert(n.center||[0,0]),top:e.Point.convert(n.top||[0,0]),"top-left":e.Point.convert(n["top-left"]||[0,0]),"top-right":e.Point.convert(n["top-right"]||[0,0]),bottom:e.Point.convert(n.bottom||[0,0]),"bottom-left":e.Point.convert(n["bottom-left"]||[0,0]),"bottom-right":e.Point.convert(n["bottom-right"]||[0,0]),left:e.Point.convert(n.left||[0,0]),right:e.Point.convert(n.right||[0,0])}}return t(new e.Point(0,0))}(this.options.offset);if(!o){var u,c=this._container.offsetWidth,l=this._container.offsetHeight;u=i.y+s.bottom.ythis._map.transform.height-l?["bottom"]:[],i.xthis._map.transform.width-c/2&&u.push("right"),o=0===u.length?"bottom":u.join("-")}var d=i.add(s[o]).round();n.setTransform(this._container,Hr[o]+" translate("+d.x+"px,"+d.y+"px)"),Ur(this._container,o,"popup")}},r.prototype._onClickClose=function(){this.remove()},r}(e.Evented),ta={version:e.version,supported:t,setRTLTextPlugin:e.setRTLTextPlugin,getRTLTextPluginStatus:e.getRTLTextPluginStatus,Map:Fr,NavigationControl:Br,GeolocateControl:Kr,AttributionControl:Mr,ScaleControl:Xr,FullscreenControl:$r,Popup:ea,Marker:qr,Style:zt,LngLat:e.LngLat,LngLatBounds:e.LngLatBounds,Point:e.Point,MercatorCoordinate:e.MercatorCoordinate,Evented:e.Evented,config:e.config,get accessToken(){return e.config.ACCESS_TOKEN},set accessToken(t){e.config.ACCESS_TOKEN=t},get baseApiUrl(){return e.config.API_URL},set baseApiUrl(t){e.config.API_URL=t},get workerCount(){return Ie.workerCount},set workerCount(e){Ie.workerCount=e},get maxParallelImageRequests(){return e.config.MAX_PARALLEL_IMAGE_REQUESTS},set maxParallelImageRequests(t){e.config.MAX_PARALLEL_IMAGE_REQUESTS=t},clearStorage:function(t){e.clearTileCache(t)},workerUrl:""};return ta})),n}()},"4cb6":function(e,t,n){"use strict";n("HAE/"),Object.defineProperty(t,"__esModule",{value:!0});var r=n("xfSm");t.METADATA_KEY=r;var a=n("9Fde");t.Container=a.Container;var i=n("FV85");t.BindingScopeEnum=i.BindingScopeEnum,t.BindingTypeEnum=i.BindingTypeEnum,t.TargetTypeEnum=i.TargetTypeEnum;var o=n("dxzI");t.AsyncContainerModule=o.AsyncContainerModule,t.ContainerModule=o.ContainerModule;var s=n("cZ5Q");t.injectable=s.injectable;var u=n("0gSV");t.tagged=u.tagged;var c=n("ZzCi");t.named=c.named;var l=n("Yk9n");t.inject=l.inject,t.LazyServiceIdentifer=l.LazyServiceIdentifer;var d=n("jYx5");t.optional=d.optional;var f=n("n2J3");t.unmanaged=f.unmanaged;var p=n("jIg/");t.multiInject=p.multiInject;var h=n("oaX6");t.targetName=h.targetName;var g=n("Sk89");t.postConstruct=g.postConstruct;var v=n("wnjb");t.MetadataReader=v.MetadataReader;var m=n("d9O0");t.id=m.id;var y=n("Ztfv");t.decorate=y.decorate;var b=n("RR/i");t.traverseAncerstors=b.traverseAncerstors,t.taggedConstraint=b.taggedConstraint,t.namedConstraint=b.namedConstraint,t.typeConstraint=b.typeConstraint;var _=n("ujMp");t.getServiceIdentifierAsString=_.getServiceIdentifierAsString;var x=n("78VC");t.multiBindToService=x.multiBindToService},"4iVx":function(e,t,n){"use strict";var r=n("VbXa");Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a,i=n("pqXx"),o=(a=n("iZF3"))&&a.__esModule?a:{default:a},s=n("HJWE");var u=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),a=0;a0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;if(e.length<1)throw new Error("Waterfall hooks must have at least one argument");var n=new u(e,t);return n.constructor=p,n.tapAsync=l,n.tapPromise=d,n.compile=f,n}p.prototype=null,e.exports=p},"4yAn":function(e,t,n){"use strict";var r=n("pVnL"),a=n("RIqP");Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n=t.x,i=t.y,s=t.x1,u=t.y1,c=t.coordinates,l=[];return e.forEach((function(e,t){var d=[];if(n&&i&&(d=[parseFloat(e[n]),parseFloat(e[i])]),n&&i&&s&&u&&(d=[[parseFloat(e[n]),parseFloat(e[i])],[parseFloat(e[s]),parseFloat(e[u])]]),c){var f="Polygon";Array.isArray(c[0])||(f="Point"),Array.isArray(c[0])&&!Array.isArray(c[0][0])&&(f="LineString");var p={type:f,coordinates:a(e[c])};(0,o.default)(p,!0),d=p.coordinates}var h=r({},e,{_id:t,coordinates:d});l.push(h)})),{dataArray:l}};var i,o=(i=n("Aib3"))&&i.__esModule?i:{default:i}},"5GMY":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.rgb2arr=function(e){var t=r.color(e),n=[0,0,0,0];null!=t&&(n[0]=t.r/255,n[1]=t.g/255,n[2]=t.b/255,n[3]=t.opacity);return n},t.generateColorRamp=function(e){var t=document.createElement("canvas"),n=t.getContext("2d");t.width=256,t.height=1;for(var r,a=n.createLinearGradient(0,0,256,0),i=e.positions[0],o=e.positions[e.positions.length-1],s=0;s0&&(e+="var _taps = this.taps;\n",e+="var _interceptors = this.interceptors;\n");for(var t=0;t {\n"):"_err".concat(e," => {\n"),d+="if(_err".concat(e,") {\n"),d+=n("_err".concat(e)),d+="} else {\n",r&&(d+=r("_result".concat(e))),a&&(d+=a()),d+="}\n",d+="}",o+="_fn".concat(e,"(").concat(this.args({before:l.context?"_context":void 0,after:d}),");\n");break;case"promise":o+="var _hasResult".concat(e," = false;\n"),o+="var _promise".concat(e," = _fn").concat(e,"(").concat(this.args({before:l.context?"_context":void 0}),");\n"),o+="if (!_promise".concat(e," || !_promise").concat(e,".then)\n"),o+=" throw new Error('Tap function (tapPromise) did not return promise (returned ' + _promise".concat(e," + ')');\n"),o+="_promise".concat(e,".then(_result").concat(e," => {\n"),o+="_hasResult".concat(e," = true;\n"),r&&(o+=r("_result".concat(e))),a&&(o+=a()),o+="}, _err".concat(e," => {\n"),o+="if(_hasResult".concat(e,") throw _err").concat(e,";\n"),o+=n("_err".concat(e)),o+="});\n"}return o}},{key:"callTapsSeries",value:function(e){var t=this,n=e.onError,r=e.onResult,a=e.resultReturns,i=e.onDone,o=e.doneReturns,s=e.rethrowIfPossible;if(0===this.options.taps.length)return i();for(var u=this.options.taps.findIndex((function(e){return"sync"!==e.type})),c=a||o||!1,l="",d=i,f=function(e){var a=e;d!==i&&"sync"!==t.options.taps[a].type&&(l+="function _next".concat(a,"() {\n"),l+=d(),l+="}\n",d=function(){return"".concat(c?"return ":"","_next").concat(a,"();\n")});var o=d,f=function(e){return e?"":i()},p=t.callTap(a,{onError:function(e){return n(a,e,o,f)},onResult:r&&function(e){return r(a,e,o,f)},onDone:!r&&o,rethrowIfPossible:s&&(u<0||a=0;p--)f(p);return l+=d()}},{key:"callTapsLooping",value:function(e){var t=e.onError,n=e.onDone,r=e.rethrowIfPossible;if(0===this.options.taps.length)return n();var a=this.options.taps.every((function(e){return"sync"===e.type})),i="";a||(i+="var _looper = () => {\n",i+="var _loopAsync = false;\n"),i+="var _loop;\n",i+="do {\n",i+="_loop = false;\n";for(var o=0;o0&&void 0!==arguments[0]?arguments[0]:{},t=e.before,n=e.after,r=this._args;return t&&(r=[t].concat(r)),n&&(r=r.concat(n)),0===r.length?"":r.join(", ")}},{key:"getTapFn",value:function(e){return"_x[".concat(e,"]")}},{key:"getTap",value:function(e){return"_taps[".concat(e,"]")}},{key:"getInterceptor",value:function(e){return"_interceptors[".concat(e,"]")}}]),e}();e.exports=i},"5kUe":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createRendererContainer=function(e){var t=document.getElementById(e);if(t){var n=document.createElement("div");return n.style.cssText+="\n position: absolute;\n top: 0;\n z-index:2;\n height: 100%;\n width: 100%;\n pointer-events: none;\n ",n.id="l7_canvaslayer",t.appendChild(n),n}return null};window.document.documentElement.style},"5ktw":function(e,t){e.exports=function(e,t){return function(){return t.call(this,e.apply(this,arguments))}}},"5ku3":function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return o}));var r=n("U8pU"),a=n("I0ug");function i(){return!("object"===(void 0===e?"undefined":Object(r.a)(e))&&"[object process]"===String(e)&&!e.browser)||Object(a.a)()}function o(){return i()&&"undefined"!=typeof document}}).call(this,n("8oxB"))},"5tHe":function(e,t,n){"use strict";n("91GP"),n("bWfx");var r=n("gnJF"),a=n("rnYU"),i=n("UYkW"),o=i.union,s=i.derivations,u=n("6RdS"),c=n("d1Y1"),l=n("F7L5"),d=n("GfB1"),f=s.equality,p=s.debugRepresentation,h=s.serialization,g=o("folktale:Result",{Error:function(e){return{value:e}},Ok:function(e){return{value:e}}}).derive(f,p,h),v=g.Error,m=g.Ok,y=r(g);l(v.prototype,{get value(){throw new TypeError("`value` can’t be accessed in an abstract instance of Result.Error")}}),l(m.prototype,{get value(){throw new TypeError("`value` can’t be accessed in an abstract instance of Result.Ok")}}),c(g,{map:{Error:function(e){return a("Result.Error#map",e),this},Ok:function(e){return a("Result.Ok#map",e),m(e(this.value))}},apply:{Error:function(e){return y("Result.Error#apply",e),this},Ok:function(e){return y("Result.Ok#apply",e),e.map(this.value)}},chain:{Error:function(e){return a("Result.Error#chain",e),this},Ok:function(e){return a("Result.Ok#chain",e),e(this.value)}},unsafeGet:{Error:function(){throw new TypeError("Can't extract the value of an Error.\n\nError does not contain a normal value - it contains an error.\nYou might consider switching from Result#unsafeGet to Result#getOrElse,\nor some other method that is not partial.\n ")},Ok:function(){return this.value}},getOrElse:{Error:function(e){return e},Ok:function(e){return this.value}},orElse:{Error:function(e){return a("Result.Error#orElse",e),e(this.value)},Ok:function(e){return a("Result.Ok#orElse",e),this}},concat:{Error:function(e){return y("Result.Error#concat",e),this},Ok:function(e){var t=this;return y("Result.Ok#concat",e),e.map((function(e){return t.value.concat(e)}))}},fold:{Error:function(e,t){return a("Result.Error#fold",e),a("Result.Error#fold",t),e(this.value)},Ok:function(e,t){return a("Result.Ok#fold",e),a("Result.Ok#fold",t),t(this.value)}},swap:{Error:function(){return m(this.value)},Ok:function(){return v(this.value)}},bimap:{Error:function(e,t){return a("Result.Error#bimap",e),a("Result.Error#bimap",t),v(e(this.value))},Ok:function(e,t){return a("Result.Ok#bimap",e),a("Result.Ok#bimap",t),m(t(this.value))}},mapError:{Error:function(e){return a("Result.Error#mapError",e),v(e(this.value))},Ok:function(e){return a("Result.Ok#mapError",e),this}},filter:{Error:function(e){return a("Result.Error#filter",e),this},Ok:function(e){return a("Result.Ok#filter",e),e(this.value)?this:v(this.value)}}}),Object.assign(g,{of:function(e){return m(e)},get:function(){return d("`.get()` is deprecated, and has been renamed to `.unsafeGet()`."),this.unsafeGet()},merge:function(){return this.value},toValidation:function(){return n("5NW9")(this)},toMaybe:function(){return n("OzU1")(this)}}),u(v.prototype),u(m.prototype),u(g),e.exports=g},"5vMV":function(e,t,n){var r=n("B+OT"),a=n("NsO/"),i=n("W070")(!1),o=n("VVlx")("IE_PROTO");e.exports=function(e,t){var n,s=a(e),u=0,c=[];for(n in s)n!=o&&r(s,n)&&c.push(n);for(;t.length>u;)r(s,n=t[u++])&&(~i(c,n)||c.push(n));return c}},"5yr3":function(e,t,n){"use strict";var r=n("TqRt");t.__esModule=!0,t.default=void 0;var a=(0,r(n("FLdU")).default)();t.default=a},"6/1s":function(e,t,n){var r=n("YqAc")("meta"),a=n("93I4"),i=n("B+OT"),o=n("2faE").f,s=0,u=Object.isExtensible||function(){return!0},c=!n("KUxP")((function(){return u(Object.preventExtensions({}))})),l=function(e){o(e,r,{value:{i:"O"+ ++s,w:{}}})},d=e.exports={KEY:r,NEED:!1,fastKey:function(e,t){if(!a(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!i(e,r)){if(!u(e))return"F";if(!t)return"E";l(e)}return e[r].i},getWeak:function(e,t){if(!i(e,r)){if(!u(e))return!0;if(!t)return!1;l(e)}return e[r].w},onFreeze:function(e){return c&&d.NEED&&u(e)&&!i(e,r)&&l(e),e}}},6512:function(e,t,n){"use strict";var r=n("lwsE"),a=n("W8MJ"),i=n("a1gu"),o=n("Nsbk"),s=n("7W2i"),u=n("1ll/"),c=new(function(e){function t(){return r(this,t),i(this,o(t).apply(this,arguments))}return s(t,e),a(t,[{key:"content",value:function(e){var t=e.onError,n=e.onDone;return this.callTapsParallel({onError:function(e,n,r,a){return t(n)+a(!0)},onDone:n})}}]),t}(n("5cEH"))),l=function(e){return c.setup(this,e),c.create(e)};function d(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,n=new u(e,t);return n.constructor=d,n.compile=l,n._call=void 0,n.call=void 0,n}d.prototype=null,e.exports=d},"65HD":function(e,t,n){"use strict";n("V+eJ"),n("hHhE"),n("/SS/"),n("91GP"),n("rE2o"),n("ioFf"),n("rGqo"),n("yt8O"),n("Btvt"),n("XfO3"),n("EK0E"),n("HAE/"),Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.SiderContext=void 0;var r=p(n("foW8")),a=function(e){if(e&&e.__esModule)return e;var t=f();if(t&&t.has(e))return t.get(e);var n={};if(null!=e){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var i=r?Object.getOwnPropertyDescriptor(e,a):null;i&&(i.get||i.set)?Object.defineProperty(n,a,i):n[a]=e[a]}}n.default=e,t&&t.set(e,n);return n}(n("q1tI")),i=n("94VI"),o=p(n("TSYQ")),s=p(n("BGR+")),u=n("foUO"),c=n("vgIT"),l=p(n("Pbn2")),d=p(n("FbXp"));function f(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return f=function(){return e},e}function p(e){return e&&e.__esModule?e:{default:e}}function h(e){return(h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function g(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function v(){return(v=Object.assign||function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:"";return T+=1,"".concat(e).concat(T)}),C=function(e){function t(e){var n,r,i;return m(this,t),(n=_(this,x(t).call(this,e))).responsiveHandler=function(e){n.setState({below:e.matches});var t=n.props.onBreakpoint;t&&t(e.matches),n.state.collapsed!==e.matches&&n.setCollapsed(e.matches,"responsive")},n.setCollapsed=function(e,t){"collapsed"in n.props||n.setState({collapsed:e});var r=n.props.onCollapse;r&&r(e,t)},n.toggle=function(){var e=!n.state.collapsed;n.setCollapsed(e,"clickTrigger")},n.belowShowChange=function(){n.setState((function(e){return{belowShow:!e.belowShow}}))},n.renderSider=function(e){var t,r=e.getPrefixCls,i=n.props,u=i.prefixCls,c=i.className,f=i.theme,p=i.collapsible,h=i.reverseArrow,m=i.trigger,y=i.style,b=i.width,_=i.collapsedWidth,x=i.zeroWidthTriggerStyle,R=E(i,["prefixCls","className","theme","collapsible","reverseArrow","trigger","style","width","collapsedWidth","zeroWidthTriggerStyle"]),w=r("layout-sider",u),S=(0,s.default)(R,["collapsed","defaultCollapsed","onCollapse","breakpoint","onBreakpoint","siderHook","zeroWidthTriggerStyle"]),A=n.state.collapsed?_:b,T=(0,d.default)(A)?"".concat(A,"px"):String(A),P=0===parseFloat(String(_||0))?a.createElement("span",{onClick:n.toggle,className:"".concat(w,"-zero-width-trigger ").concat(w,"-zero-width-trigger-").concat(h?"right":"left"),style:x},a.createElement(l.default,{type:"bars"})):null,C={expanded:h?a.createElement(l.default,{type:"right"}):a.createElement(l.default,{type:"left"}),collapsed:h?a.createElement(l.default,{type:"left"}):a.createElement(l.default,{type:"right"})}[n.state.collapsed?"collapsed":"expanded"],O=null!==m?P||a.createElement("div",{className:"".concat(w,"-trigger"),onClick:n.toggle,style:{width:T}},m||C):null,M=v(v({},y),{flex:"0 0 ".concat(T),maxWidth:T,minWidth:T,width:T}),k=(0,o.default)(c,w,"".concat(w,"-").concat(f),(g(t={},"".concat(w,"-collapsed"),!!n.state.collapsed),g(t,"".concat(w,"-has-trigger"),p&&null!==m&&!P),g(t,"".concat(w,"-below"),!!n.state.below),g(t,"".concat(w,"-zero-width"),0===parseFloat(T)),t));return a.createElement("aside",v({className:k},S,{style:M}),a.createElement("div",{className:"".concat(w,"-children")},n.props.children),p||n.state.below&&P?O:null)},n.uniqueId=P("ant-sider-"),"undefined"!=typeof window&&(r=window.matchMedia),r&&e.breakpoint&&e.breakpoint in S&&(n.mql=r("(max-width: ".concat(S[e.breakpoint],")"))),i="collapsed"in e?e.collapsed:e.defaultCollapsed,n.state={collapsed:i,below:!1},n}return R(t,e),b(t,[{key:"componentDidMount",value:function(){this.mql&&(this.mql.addListener(this.responsiveHandler),this.responsiveHandler(this.mql)),this.props.siderHook&&this.props.siderHook.addSider(this.uniqueId)}},{key:"componentWillUnmount",value:function(){this.mql&&this.mql.removeListener(this.responsiveHandler),this.props.siderHook&&this.props.siderHook.removeSider(this.uniqueId)}},{key:"render",value:function(){var e=this.state.collapsed,t=this.props.collapsedWidth;return a.createElement(A.Provider,{value:{siderCollapsed:e,collapsedWidth:t}},a.createElement(c.ConfigConsumer,null,this.renderSider))}}],[{key:"getDerivedStateFromProps",value:function(e){return"collapsed"in e?{collapsed:e.collapsed}:null}}]),t}(a.Component);C.defaultProps={collapsible:!1,defaultCollapsed:!1,reverseArrow:!1,width:200,collapsedWidth:80,style:{},theme:"dark"},(0,i.polyfill)(C);var O=function(e){function t(){return m(this,t),_(this,x(t).apply(this,arguments))}return R(t,e),b(t,[{key:"render",value:function(){var e=this;return a.createElement(u.LayoutContext.Consumer,null,(function(t){return a.createElement(C,v({},t,e.props))}))}}]),t}(a.Component);t.default=O},"69bn":function(e,t,n){var r=n("y3w9"),a=n("2OiF"),i=n("K0xU")("species");e.exports=function(e,t){var n,o=r(e).constructor;return void 0===o||null==(n=r(o)[i])?t:a(n)}},"6AGu":function(e,t,n){"use strict";n("HAE/"),Object.defineProperty(t,"__esModule",{value:!0});var r=n("FV85"),a=n("LKzl"),i=function(){function e(e){this._binding=e}return e.prototype.inRequestScope=function(){return this._binding.scope=r.BindingScopeEnum.Request,new a.BindingWhenOnSyntax(this._binding)},e.prototype.inSingletonScope=function(){return this._binding.scope=r.BindingScopeEnum.Singleton,new a.BindingWhenOnSyntax(this._binding)},e.prototype.inTransientScope=function(){return this._binding.scope=r.BindingScopeEnum.Transient,new a.BindingWhenOnSyntax(this._binding)},e}();t.BindingInSyntax=i},"6B8Y":function(e,t,n){"use strict";function r(e,t){for(var n in t){var r=t[n];r.configurable=r.enumerable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,n,r)}return e}function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n("8+KV"),n("hHhE"),n("DNiP"),n("bWfx"),n("rGqo"),n("yt8O"),n("Btvt"),n("RW0V"),n("rE2o"),n("ioFf"),n("HAE/");var i=n("GfB1"),o=n("F7L5"),s=n("TVCR"),u=Symbol.for("@@folktale:adt:type"),c=Symbol.for("@@folktale:adt:tag"),l=Symbol.for("@@folktale:adt:default"),d=Symbol.for("@@meta:magical"),f=Object.keys;function p(e,t,n){return p=function(t,u){var f,p,h,g,v;function m(){}function y(){var e=new m;return o(e,u.apply(void 0,arguments)||{}),e}return m.prototype=Object.create(n),o(m.prototype,(a(p={},c,t),(h={}).constructor=h.constructor||{},h.constructor.get=function(){return m},h[f="is"+t]=h[f]||{},h[f].get=function(){return i(".is"+t+" is deprecated. Use "+t+".hasInstance(value)\ninstead to check if a value belongs to the ADT variant."),!0},a(p,"matchWith",(function(n){if(s(e+"'s "+t+"#matchWith",n),t in n)return n[t](this);if(l in n)return n[l]();throw new Error('Variant "'+(r=t)+"\" not covered in pattern.\nThis could mean you did not include all variants in your Union's matchWith function.\n\nFor example, if you had this Union:\n\nconst Operation = union({\n Add: (a, b) => ({ a, b }),\n Subtract: (a, b) => ({ a, b }),\n})\n\nBut wrote this matchWith:\n\nop.matchWith({\n Add: ({ a, b }) => a + b\n // Subtract not implemented!\n})\n\nIt would throw this error because we need to check against 'Subtract'. Check your matchWith function's argument, \nit's possibly missing the '"+r+"' method in the object you've passed.");var r})),r(p,h),p)),o(y,(a(g={},d,u[d]),(v={}).tag=v.tag||{},v.tag.get=function(){return t},v.type=v.type||{},v.type.get=function(){return e},v.constructor=v.constructor||{},v.constructor.get=function(){return m},a(g,"prototype",m.prototype),a(g,"hasInstance",(function(e){return Boolean(e)&&n.hasInstance(e)&&e[c]===t})),r(g,v),g)),y},f(u=t).reduce((function(e,t){return e[t]=p(t,u[t]),e}),{});var u,p}var h=function(e,t){var n,r,i=Object.create(g),s=p(e,t,i);return o(i,s,(a(n={},u,e),a(n,"variants",f(r=s).map((function(e){return r[e]}))),a(n,"hasInstance",(function(e){return Boolean(e)&&e[u]===this[u]})),n)),i},g={derive:function(){for(var e=this,t=arguments.length,n=Array(t),r=0;r0:e.util.schemaHasRules(h,e.RULES.all))&&(f=!1,u.schema=h,u.schemaPath=i+"["+g+"]",u.errSchemaPath=o+"/"+g,r+=" "+e.validate(u)+" ",u.baseId=d,s&&(r+=" if ("+l+") { ",c+="}"));return s&&(r+=f?" if (true) { ":" "+c.slice(0,-1)+" "),r=e.util.cleanUpCode(r)}},"6nwk":function(e,t,n){var r=n("Wnyi"),a=n("1s4d"),i=n("PhQ1");e.exports=r((function(e,t){return a(i(e.length,t),e)}))},"6pwk":function(e,t,n){"use strict";var r=e.exports=function(){this._cache={}};r.prototype.put=function(e,t){this._cache[e]=t},r.prototype.get=function(e){return this._cache[e]},r.prototype.del=function(e){delete this._cache[e]},r.prototype.clear=function(){this._cache={}}},"6tYh":function(e,t,n){var r=n("93I4"),a=n("5K7Z"),i=function(e,t){if(a(e),!r(t)&&null!==t)throw TypeError(t+": can't set as prototype!")};e.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(e,t,r){try{(r=n("2GTP")(Function.call,n("vwuL").f(Object.prototype,"__proto__").set,2))(e,[]),t=!(e instanceof Array)}catch(a){t=!0}return function(e,n){return i(e,n),t?e.__proto__=n:r(e,n),e}}({},!1):void 0),check:i}},"6wyt":function(e,t,n){n("SRfc"),n("V+eJ"),function(e){"use strict";e.multiplexingMode=function(t){var n=Array.prototype.slice.call(arguments,1);function r(e,t,n,r){if("string"==typeof t){var a=e.indexOf(t,n);return r&&a>-1?a+t.length:a}var i=t.exec(n?e.slice(n):e);return i?i.index+n+(r?i[0].length:0):-1}return{startState:function(){return{outer:e.startState(t),innerActive:null,inner:null}},copyState:function(n){return{outer:e.copyState(t,n.outer),innerActive:n.innerActive,inner:n.innerActive&&e.copyState(n.innerActive.mode,n.inner)}},token:function(a,i){if(i.innerActive){var o=i.innerActive;if(c=a.string,!o.close&&a.sol())return i.innerActive=i.inner=null,this.token(a,i);if((d=o.close?r(c,o.close,a.pos,o.parseDelimiters):-1)==a.pos&&!o.parseDelimiters)return a.match(o.close),i.innerActive=i.inner=null,o.delimStyle&&o.delimStyle+" "+o.delimStyle+"-close";d>-1&&(a.string=c.slice(0,d));var s=o.mode.token(a,i.inner);return d>-1&&(a.string=c),d==a.pos&&o.parseDelimiters&&(i.innerActive=i.inner=null),o.innerStyle&&(s=s?s+" "+o.innerStyle:o.innerStyle),s}for(var u=1/0,c=a.string,l=0;ln;)a[n]=t[n++];return a},Ce=function(e,t,n){V(e,t,{get:function(){return this._d[n]}})},Oe=function(e){var t,n,r,a,i,o,s=R(e),u=arguments.length,l=u>1?arguments[1]:void 0,d=void 0!==l,f=T(s);if(null!=f&&!w(f)){for(o=f.call(s),r=[],t=0;!(i=o.next()).done;t++)r.push(i.value);s=r}for(d&&u>2&&(l=c(l,arguments[2],2)),t=0,n=g(s.length),a=Ae(this,n);n>t;t++)a[t]=d?l(s[t],t):s[t];return a},Me=function(){for(var e=0,t=arguments.length,n=Ae(this,t);t>e;)n[e]=arguments[e++];return n},ke=!!q&&i((function(){pe.call(new q(1))})),De=function(){return pe.apply(ke?de.call(Se(this)):Se(this),arguments)},Ie={copyWithin:function(e,t){return z.call(Se(this),e,t,arguments.length>2?arguments[2]:void 0)},every:function(e){return $(Se(this),e,arguments.length>1?arguments[1]:void 0)},fill:function(e){return F.apply(Se(this),arguments)},filter:function(e){return Te(this,J(Se(this),e,arguments.length>1?arguments[1]:void 0))},find:function(e){return Q(Se(this),e,arguments.length>1?arguments[1]:void 0)},findIndex:function(e){return ee(Se(this),e,arguments.length>1?arguments[1]:void 0)},forEach:function(e){X(Se(this),e,arguments.length>1?arguments[1]:void 0)},indexOf:function(e){return ne(Se(this),e,arguments.length>1?arguments[1]:void 0)},includes:function(e){return te(Se(this),e,arguments.length>1?arguments[1]:void 0)},join:function(e){return ce.apply(Se(this),arguments)},lastIndexOf:function(e){return oe.apply(Se(this),arguments)},map:function(e){return xe(Se(this),e,arguments.length>1?arguments[1]:void 0)},reduce:function(e){return se.apply(Se(this),arguments)},reduceRight:function(e){return ue.apply(Se(this),arguments)},reverse:function(){for(var e,t=Se(this).length,n=Math.floor(t/2),r=0;r1?arguments[1]:void 0)},sort:function(e){return le.call(Se(this),e)},subarray:function(e,t){var n=Se(this),r=n.length,a=m(e,r);return new(k(n,n[me]))(n.buffer,n.byteOffset+a*n.BYTES_PER_ELEMENT,g((void 0===t?r:m(t,r))-a))}},Le=function(e,t){return Te(this,de.call(Se(this),e,t))},je=function(e){Se(this);var t=Ee(arguments[1],1),n=this.length,r=R(e),a=g(r.length),i=0;if(a+t>n)throw U("Wrong length!");for(;i255?255:255&r),a.v[p](n*t+a.o,r,Re)}(this,n,e)},enumerable:!0})};b?(h=n((function(e,n,r,a){l(e,h,c,"_d");var i,o,s,u,d=0,p=0;if(x(n)){if(!(n instanceof K||"ArrayBuffer"==(u=_(n))||"SharedArrayBuffer"==u))return be in n?Pe(h,n):Oe.call(h,n);i=n,p=Ee(r,t);var m=n.byteLength;if(void 0===a){if(m%t)throw U("Wrong length!");if((o=m-p)<0)throw U("Wrong length!")}else if((o=g(a)*t)+p>m)throw U("Wrong length!");s=o/t}else s=v(n),i=new K(o=s*t);for(f(e,"_d",{b:i,o:p,l:o,e:s,v:new Y(i)});d=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}n("bWfx"),n("91GP"),n("V+eJ"),n("HAE/"),n("WLL4"),n("jm62"),n("8+KV"),n("0l/t"),n("ioFf"),n("rGqo"),n("yt8O"),n("Btvt"),n("RW0V");var s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var u=s(n("q1tI")),c=s(n("TSYQ")),l=s(n("xXc7"));t.default=function(e){var t=e.prefixCls,n=void 0===t?"rc-footer":t,r=e.className,s=e.style,d=e.bottom,f=e.columns,p=e.backgroundColor,h=e.columnLayout,g=e.theme,v=void 0===g?"dark":g,m=o(e,["prefixCls","className","style","bottom","columns","backgroundColor","columnLayout","theme"]),y=c.default("".concat(n),r,i({},"".concat(n,"-").concat(v),!!v));return u.default.createElement("footer",Object.assign({},m,{className:y,style:a({},s,{backgroundColor:p})}),u.default.createElement("section",{className:"".concat(n,"-container")},f&&f.length>0&&u.default.createElement("section",{className:"".concat(n,"-columns"),style:{justifyContent:h}},f.map((function(e,t){var r=e.title,a=e.icon,i=e.style,o=e.className,s=e.items,c=void 0===s?[]:s;return u.default.createElement(l.default,{key:t,prefixCls:n,title:r,icon:a,items:c,style:i,className:o})})))),d&&u.default.createElement("section",{className:"".concat(n,"-bottom")},u.default.createElement("div",{className:"".concat(n,"-bottom-container")},d)))}},"7QdS":function(e,t,n){"use strict";t.__esModule=!0;var r={adjustX:1,adjustY:1},a=[0,0],i=t.placements={left:{points:["cr","cl"],overflow:r,offset:[-4,0],targetOffset:a},right:{points:["cl","cr"],overflow:r,offset:[4,0],targetOffset:a},top:{points:["bc","tc"],overflow:r,offset:[0,-4],targetOffset:a},bottom:{points:["tc","bc"],overflow:r,offset:[0,4],targetOffset:a},topLeft:{points:["bl","tl"],overflow:r,offset:[0,-4],targetOffset:a},leftTop:{points:["tr","tl"],overflow:r,offset:[-4,0],targetOffset:a},topRight:{points:["br","tr"],overflow:r,offset:[0,-4],targetOffset:a},rightTop:{points:["tl","tr"],overflow:r,offset:[4,0],targetOffset:a},bottomRight:{points:["tr","br"],overflow:r,offset:[0,4],targetOffset:a},rightBottom:{points:["bl","br"],overflow:r,offset:[4,0],targetOffset:a},bottomLeft:{points:["tl","bl"],overflow:r,offset:[0,4],targetOffset:a},leftBottom:{points:["br","bl"],overflow:r,offset:[-4,0],targetOffset:a}};t.default=i},"7Qtz":function(e,t,n){"use strict";var r=n("dyZX"),a=n("nh4g"),i=n("LQAc"),o=n("D4iV"),s=n("Mukb"),u=n("3Lyj"),c=n("eeVq"),l=n("9gX7"),d=n("RYi7"),f=n("ne8i"),p=n("Cfrj"),h=n("kJMx").f,g=n("hswa").f,v=n("Nr18"),m=n("fyDq"),y="prototype",b="Wrong index!",_=r.ArrayBuffer,x=r.DataView,R=r.Math,w=r.RangeError,E=r.Infinity,S=_,A=R.abs,T=R.pow,P=R.floor,C=R.log,O=R.LN2,M=a?"_b":"buffer",k=a?"_l":"byteLength",D=a?"_o":"byteOffset";function I(e,t,n){var r,a,i,o=new Array(n),s=8*n-t-1,u=(1<>1,l=23===t?T(2,-24)-T(2,-77):0,d=0,f=e<0||0===e&&1/e<0?1:0;for((e=A(e))!=e||e===E?(a=e!=e?1:0,r=u):(r=P(C(e)/O),e*(i=T(2,-r))<1&&(r--,i*=2),(e+=r+c>=1?l/i:l*T(2,1-c))*i>=2&&(r++,i/=2),r+c>=u?(a=0,r=u):r+c>=1?(a=(e*i-1)*T(2,t),r+=c):(a=e*T(2,c-1)*T(2,t),r=0));t>=8;o[d++]=255&a,a/=256,t-=8);for(r=r<0;o[d++]=255&r,r/=256,s-=8);return o[--d]|=128*f,o}function L(e,t,n){var r,a=8*n-t-1,i=(1<>1,s=a-7,u=n-1,c=e[u--],l=127&c;for(c>>=7;s>0;l=256*l+e[u],u--,s-=8);for(r=l&(1<<-s)-1,l>>=-s,s+=t;s>0;r=256*r+e[u],u--,s-=8);if(0===l)l=1-o;else{if(l===i)return r?NaN:c?-E:E;r+=T(2,t),l-=o}return(c?-1:1)*r*T(2,l-t)}function j(e){return e[3]<<24|e[2]<<16|e[1]<<8|e[0]}function F(e){return[255&e]}function z(e){return[255&e,e>>8&255]}function N(e){return[255&e,e>>8&255,e>>16&255,e>>24&255]}function B(e){return I(e,52,8)}function V(e){return I(e,23,4)}function H(e,t,n){g(e[y],t,{get:function(){return this[n]}})}function U(e,t,n,r){var a=p(+n);if(a+t>e[k])throw w(b);var i=e[M]._b,o=a+e[D],s=i.slice(o,o+t);return r?s:s.reverse()}function W(e,t,n,r,a,i){var o=p(+n);if(o+t>e[k])throw w(b);for(var s=e[M]._b,u=o+e[D],c=r(+a),l=0;lY;)(q=K[Y++])in _||s(_,q,S[q]);i||(G.constructor=_)}var X=new x(new _(2)),J=x[y].setInt8;X.setInt8(0,2147483648),X.setInt8(1,2147483649),!X.getInt8(0)&&X.getInt8(1)||u(x[y],{setInt8:function(e,t){J.call(this,e,t<<24>>24)},setUint8:function(e,t){J.call(this,e,t<<24>>24)}},!0)}else _=function(e){l(this,_,"ArrayBuffer");var t=p(e);this._b=v.call(new Array(t),0),this[k]=t},x=function(e,t,n){l(this,x,"DataView"),l(e,_,"DataView");var r=e[k],a=d(t);if(a<0||a>r)throw w("Wrong offset!");if(a+(n=void 0===n?r-a:f(n))>r)throw w("Wrong length!");this[M]=e,this[D]=a,this[k]=n},a&&(H(_,"byteLength","_l"),H(x,"buffer","_b"),H(x,"byteLength","_l"),H(x,"byteOffset","_o")),u(x[y],{getInt8:function(e){return U(this,1,e)[0]<<24>>24},getUint8:function(e){return U(this,1,e)[0]},getInt16:function(e){var t=U(this,2,e,arguments[1]);return(t[1]<<8|t[0])<<16>>16},getUint16:function(e){var t=U(this,2,e,arguments[1]);return t[1]<<8|t[0]},getInt32:function(e){return j(U(this,4,e,arguments[1]))},getUint32:function(e){return j(U(this,4,e,arguments[1]))>>>0},getFloat32:function(e){return L(U(this,4,e,arguments[1]),23,4)},getFloat64:function(e){return L(U(this,8,e,arguments[1]),52,8)},setInt8:function(e,t){W(this,1,e,F,t)},setUint8:function(e,t){W(this,1,e,F,t)},setInt16:function(e,t){W(this,2,e,z,t,arguments[2])},setUint16:function(e,t){W(this,2,e,z,t,arguments[2])},setInt32:function(e,t){W(this,4,e,N,t,arguments[2])},setUint32:function(e,t){W(this,4,e,N,t,arguments[2])},setFloat32:function(e,t){W(this,4,e,V,t,arguments[2])},setFloat64:function(e,t){W(this,8,e,B,t,arguments[2])}});m(_,"ArrayBuffer"),m(x,"DataView"),s(x[y],o.VIEW,!0),t.ArrayBuffer=_,t.DataView=x},"7S3h":function(e){e.exports=JSON.parse('{"data":{"site":{"siteMetadata":{"title":"L7","description":"Large-scale WebGL-powered Geospatial data visualization analysis framework"}}}}')},"7VC1":function(e,t,n){"use strict";var r=n("XKFU"),a=n("Lgjv"),i=n("ol8x"),o=/Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(i);r(r.P+r.F*o,"String",{padEnd:function(e){return a(this,e,arguments.length>1?arguments[1]:void 0,!1)}})},"7W2i":function(e,t,n){var r=n("SksO");e.exports=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&r(e,t)}},"7ZZO":function(e,t,n){var r=n("Wnyi"),a=n("rJtk");e.exports=function(){function e(e,t){this.xf=t,this.f=e}return e.prototype["@@transducer/init"]=a.init,e.prototype["@@transducer/result"]=a.result,e.prototype["@@transducer/step"]=function(e,t){return this.f(t)?this.xf["@@transducer/step"](e,t):e},r((function(t,n){return new e(t,n)}))}()},"7bfE":function(e,t,n){"use strict";var r=n("lwsE"),a=n("W8MJ"),i=n("a1gu"),o=n("Nsbk"),s=n("7W2i"),u=n("1ll/"),c=new(function(e){function t(){return r(this,t),i(this,o(t).apply(this,arguments))}return s(t,e),a(t,[{key:"content",value:function(e){var t=this,n=e.onError,r=e.onResult;e.onDone;return this.callTapsSeries({onError:function(e,t,r,a){return n(t)+a(!0)},onResult:function(e,n,r){var a="";return a+="if(".concat(n," !== undefined) {\n"),a+="".concat(t._args[0]," = ").concat(n,";\n"),a+="}\n",a+=r()},onDone:function(){return r(t._args[0])}})}}]),t}(n("5cEH"))),l=function(e){return c.setup(this,e),c.create(e)};function d(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;if(e.length<1)throw new Error("Waterfall hooks must have at least one argument");var n=new u(e,t);return n.constructor=d,n.compile=l,n._call=void 0,n.call=void 0,n}d.prototype=null,e.exports=d},"7e6P":function(e,t,n){n("rGqo"),n("yt8O"),n("Btvt"),n("RW0V");var r,a,i,o,s=n("cOqj"),u=n("Av+g"),c=n("l7rt");e.exports=(r=!{toString:null}.propertyIsEnumerable("toString"),a=["constructor","valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],i=function(){"use strict";return arguments.propertyIsEnumerable("length")}(),o=function(e,t){for(var n=0;n=0;)u(t=a[n],e)&&!o(s,t)&&(s[s.length]=t),n-=1;return s})):s((function(e){return Object(e)!==e?[]:Object.keys(e)})))},"7h0T":function(e,t,n){var r=n("XKFU");r(r.S,"Number",{isNaN:function(e){return e!=e}})},"7hJ6":function(e,t,n){"use strict";var r=n("TqRt"),a=r(n("444f")),i=r(n("IVHb"));t.ScrollContainer=i.default,t.ScrollContext=a.default},"7lDU":function(e,t,n){"use strict";t.__esModule=!0,t.SyncHook=n("RSNF"),t.SyncBailHook=n("egiQ"),t.SyncWaterfallHook=n("SzTz"),t.SyncLoopHook=n("PnET"),t.AsyncParallelHook=n("mxgU"),t.AsyncParallelBailHook=n("xZMM"),t.AsyncSeriesHook=n("zzZ3"),t.AsyncSeriesBailHook=n("xCfg"),t.AsyncSeriesLoopHook=n("2rxz"),t.AsyncSeriesWaterfallHook=n("yifc"),t.HookMap=n("aukf"),t.MultiHook=n("wcuK")},"7ssf":function(e,t,n){"use strict";n.d(t,"b",(function(){return o})),n.d(t,"c",(function(){return s}));var r=Math.sqrt(50),a=Math.sqrt(10),i=Math.sqrt(2);function o(e,t,n){var o=(t-e)/Math.max(0,n),s=Math.floor(Math.log(o)/Math.LN10),u=o/Math.pow(10,s);return s>=0?(u>=r?10:u>=a?5:u>=i?2:1)*Math.pow(10,s):-Math.pow(10,-s)/(u>=r?10:u>=a?5:u>=i?2:1)}function s(e,t,n){var o=Math.abs(t-e)/Math.max(0,n),s=Math.pow(10,Math.floor(Math.log(o)/Math.LN10)),u=o/s;return u>=r?s*=10:u>=a?s*=5:u>=i&&(s*=2),t0)return[e];if((r=t0)for(e=Math.ceil(e/s),t=Math.floor(t/s),i=new Array(a=Math.ceil(t-e+1));++u=0||(a[n]=e[n]);return a}},"8Y+z":function(e,t,n){"use strict";t.__esModule=!0,t.default=function(e){return e===e.window?e:9===e.nodeType&&(e.defaultView||e.parentWindow)},e.exports=t.default},"8a7r":function(e,t,n){"use strict";var r=n("hswa"),a=n("RjD/");e.exports=function(e,t,n){t in e?r.f(e,t,a(0,n)):e[t]=n}},"8i6C":function(e,t,n){"use strict";var r=n("VbXa");Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=n("DLW2"),i=n("uhBA"),o=n("LvDl"),s=n("f6Iy"),u=n("G5r2"),c=function(e){function t(t,n){var r;return(r=e.call(this)||this).data=void 0,r.extent=void 0,r.hooks={init:new s.SyncHook(["source"]),layout:new s.SyncHook(["source"]),update:new s.SyncHook(["source"])},r.parser={type:"geojson"},r.transforms=[],r.originData=void 0,r.data=(0,o.cloneDeep)(t),r.originData=t,n&&(n.parser&&(r.parser=n.parser),n.transforms&&(r.transforms=n.transforms)),r.hooks.init.tap("parser",(function(){r.excuteParser()})),r.hooks.init.tap("transform",(function(){r.executeTrans()})),r.init(),r}r(t,e);var n=t.prototype;return n.excuteParser=function(){var e=this.parser,t=e.type||"geojson",n=(0,u.getParser)(t);this.data=n(this.originData,e),this.extent=(0,a.extent)(this.data.dataArray)},n.executeTrans=function(){var e=this;this.transforms.forEach((function(t){var n=t.type,r=(0,u.getTransform)(n)(e.data,t);Object.assign(e.data,r)}))},n.init=function(){this.hooks.init.call(this)},t}(i.EventEmitter);t.default=c},"8oxB":function(e,t){var n,r,a=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function s(e){if(n===setTimeout)return setTimeout(e,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:i}catch(e){n=i}try{r="function"==typeof clearTimeout?clearTimeout:o}catch(e){r=o}}();var u,c=[],l=!1,d=-1;function f(){l&&u&&(l=!1,u.length?c=u.concat(c):d=-1,c.length&&p())}function p(){if(!l){var e=s(f);l=!0;for(var t=c.length;t;){for(u=c,c=[];++d1)for(var n=1;n0?arguments[0]:void 0)}}),{get:function(e){var t=r.getEntry(a(this,"Map"),e);return t&&t.v},set:function(e,t){return r.def(a(this,"Map"),0===e?0:e,t)}},r,!0)},"9AZ8":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a,i,o,s,u,c=n("pqXx"),l=n("4cb6");var d,f,p,h,g,v,m=(r=(0,l.injectable)(),a=(0,l.inject)(c.TYPES.ILogService),r((u=function(){function e(){var e,t,n,r;e=this,t="logger",r=this,(n=s)&&Object.defineProperty(e,t,{enumerable:n.enumerable,configurable:n.configurable,writable:n.writable,value:n.initializer?n.initializer.call(r):void 0})}return e.prototype.apply=function(e){var t=this;e.hooks.beforeRender.tap("UpdateStyleAttributePlugin",(function(){(e.styleAttributeService.getLayerStyleAttributes()||[]).filter((function(e){return e.needRegenerateVertices})).forEach((function(n){e.styleAttributeService.updateAttributeByFeatureRange(n.name,e.getEncodedData(),n.featureRange.startIndex,n.featureRange.endIndex),n.needRegenerateVertices=!1,t.logger.info("regenerate vertex attributes: "+n.name+" finished")}))}))},e}(),d=(o=u).prototype,f="logger",p=[a],h={configurable:!0,enumerable:!0,writable:!0,initializer:null},v={},Object.keys(h).forEach((function(e){v[e]=h[e]})),v.enumerable=!!v.enumerable,v.configurable=!!v.configurable,("value"in v||v.initializer)&&(v.writable=!0),v=p.slice().reverse().reduce((function(e,t){return t(d,f,e)||e}),v),g&&void 0!==v.initializer&&(v.value=v.initializer?v.initializer.call(g):void 0,v.initializer=void 0),void 0===v.initializer&&(Object.defineProperty(d,f,v),v=null),s=v,i=o))||i);t.default=m},"9Do8":function(e,t,n){"use strict";e.exports=n("zt9T")},"9Fde":function(e,t,n){"use strict";n("DNiP"),n("dZ+Y"),n("2Spj"),n("8+KV"),n("HAE/"),n("rE2o"),n("ioFf"),n("VRzm"),n("Btvt");var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(a,i){function o(e){try{u(r.next(e))}catch(t){i(t)}}function s(e){try{u(r.throw(e))}catch(t){i(t)}}function u(e){e.done?a(e.value):new n((function(t){t(e.value)})).then(o,s)}u((r=r.apply(e,t||[])).next())}))},a=this&&this.__generator||function(e,t){var n,r,a,i,o={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,r&&(a=r[2&i[0]?"return":i[0]?"throw":"next"])&&!(a=a.call(r,i[1])).done)return a;switch(r=0,a&&(i=[0,a.value]),i[0]){case 0:case 1:a=i;break;case 4:return o.label++,{value:i[1],done:!1};case 5:o.label++,r=i[1],i=[0];continue;case 7:i=o.ops.pop(),o.trys.pop();continue;default:if(!(a=(a=o.trys).length>0&&a[a.length-1])&&(6===i[0]||2===i[0])){o=0;continue}if(3===i[0]&&(!a||i[1]>a[0]&&i[1]1?arguments[1]:void 0,t.length)),r=String(e);return o?o.call(t,r,n):t.slice(n,n+r.length)===r}})},"9XZr":function(e,t,n){"use strict";var r=n("XKFU"),a=n("Lgjv"),i=n("ol8x"),o=/Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(i);r(r.P+r.F*o,"String",{padStart:function(e){return a(this,e,arguments.length>1?arguments[1]:void 0,!0)}})},"9Xx/":function(e,t,n){"use strict";n.r(t),n.d(t,"globalHistory",(function(){return u})),n.d(t,"navigate",(function(){return c})),n.d(t,"createHistory",(function(){return i})),n.d(t,"createMemorySource",(function(){return o}));n("KKXr"),n("8+KV"),n("VRzm"),n("Btvt"),n("eM6i"),n("pIFo"),n("0l/t"),n("91GP");var r=Object.assign||function(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:{},c=u.state,l=u.replace,d=void 0!==l&&l;c=r({},c,{key:Date.now()+""});try{o||d?e.history.replaceState(c,null,t):e.history.pushState(c,null,t)}catch(p){e.location[d?"replace":"assign"](t)}i=a(e),o=!0;var f=new Promise((function(e){return s=e}));return n.forEach((function(e){return e({location:i,action:"PUSH"})})),f}}},o=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"/",t=0,n=[{pathname:e,search:""}],r=[];return{get location(){return n[t]},addEventListener:function(e,t){},removeEventListener:function(e,t){},history:{get entries(){return n},get index(){return t},get state(){return r[t]},pushState:function(e,a,i){var o=i.split("?"),s=o[0],u=o[1],c=void 0===u?"":u;t++,n.push({pathname:s,search:c}),r.push(e)},replaceState:function(e,a,i){var o=i.split("?"),s=o[0],u=o[1],c=void 0===u?"":u;n[t]={pathname:s,search:c},r[t]=e}}}},s=!("undefined"==typeof window||!window.document||!window.document.createElement),u=i(s?window:o()),c=u.navigate},"9gHp":function(e,t,n){var r=n("hOtR"),a=n("/W8u");e.exports=function(e,t,n){return function(){if(0===arguments.length)return n();var i=Array.prototype.slice.call(arguments,0),o=i.pop();if(!r(o)){for(var s=0;s0&&void 0!==arguments[0]?arguments[0]:{};x=y({},x,{},e)}function S(){return x}var A=function(){function e(){h()(this,e),this.usedNamespaces={}}return v()(e,[{key:"addUsedNamespaces",value:function(e){var t=this;e.forEach((function(e){t.usedNamespaces[e]||(t.usedNamespaces[e]=!0)}))}},{key:"getUsedNamespaces",value:function(){return Object.keys(this.usedNamespaces)}}]),e}();function T(e){b=e}function P(){return b}var C={type:"3rdParty",init:function(e){E(e.options.react),T(e)}};function O(e){return function(t){return new Promise((function(n){var r=M();e.getInitialProps?e.getInitialProps(t).then((function(e){n(y({},e,{},r))})):n(r)}))}}function M(){var e=P(),t=e.reportNamespaces?e.reportNamespaces.getUsedNamespaces():[],n={},r={};return e.languages.forEach((function(n){r[n]={},t.forEach((function(t){r[n][t]=e.getResourceBundle(n,t)||{}}))})),n.initialI18nStore=r,n.initialLanguage=e.language,n}function k(){if(console&&console.warn){for(var e,t=arguments.length,n=new Array(t),r=0;r0?e:"Unknown")}function F(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function z(e){for(var t=1;t-1)if(n.voidElement)t.push(l.a.createElement(n.name,{key:"".concat(n.name,"-").concat(s)}));else{var m=e(a,n.children);t.push(l.a.createElement(n.name,{key:"".concat(n.name,"-").concat(s)},m))}else if(n.voidElement)t.push("<".concat(n.name," />"));else{var y=e(a,n.children);t.push("<".concat(n.name,">").concat(y,""))}else if("object"!==u()(d)||f)1===n.children.length&&c?t.push(l.a.cloneElement(d,z({},d.props,{key:s}),c)):t.push(l.a.cloneElement(d,z({},d.props,{key:s})));else{var b=n.children[0]?c:null;b&&t.push(b)}}else"text"===n.type&&t.push(n.content);return t}),[])}([{dummy:!0,children:e}],f.a.parse("<0>".concat(c,"")));return B(d[0])}function U(e){var t=e.children,n=e.count,r=e.parent,i=e.i18nKey,o=e.tOptions,s=e.values,d=e.defaults,f=e.components,p=e.ns,h=e.i18n,g=e.t,v=a()(e,["children","count","parent","i18nKey","tOptions","values","defaults","components","ns","i18n","t"]),m=w()&&Object(c.useContext)(R)||{},y=m.i18n,b=m.defaultNS,_=h||y||P();if(!_)return I("You will need pass in an i18next instance by using i18nextReactModule"),t;var x=g||_.t.bind(_)||function(e){return e},E=z({},S(),{},_.options&&_.options.react),A=void 0!==r?r:E.defaultTransParent,T=p||x.ns||b||_.options&&_.options.defaultNS;T="string"==typeof T?[T]:T||["translation"];var C=d||function e(t,n,r,a){if(!n)return"";var i=t,o=V(n),s=a.transKeepBasicHtmlNodesFor||[];return o.forEach((function(t,n){var r="".concat(n);if("string"==typeof t)i="".concat(i).concat(t);else if(N(t)){var o=s.indexOf(t.type)>-1&&1===Object.keys(t.props).length&&"string"==typeof N(t)?t.type:r;i=t.props&&t.props.i18nIsDynamicList?"".concat(i,"<").concat(o,">"):"".concat(i,"<").concat(o,">").concat(e("",B(t),n+1,a),"")}else if(l.a.isValidElement(t))i=s.indexOf(t.type)>-1&&0===Object.keys(t.props).length?"".concat(i,"<").concat(t.type,"/>"):"".concat(i,"<").concat(r,">");else if("object"===u()(t)){var c=z({},t),d=c.format;delete c.format;var f=Object.keys(c);d&&1===f.length?i="".concat(i,"{{").concat(f[0],", ").concat(d,"}}"):1===f.length?i="".concat(i,"{{").concat(f[0],"}}"):k("react-i18next: the passed in object contained more than one variable - the object should look like {{ value, format }} where format is optional.",t)}else k("Trans: the passed in value is invalid - seems you passed in a variable like {number} - please pass in variables for interpolation as full objects like {{number}}.",t)})),i}("",t,0,E)||E.transEmptyNodeValue,O=E.hashTransKey,M=i||(O?O(C):C),D=z({},o,{count:n},s,{},s?{}:{interpolation:{prefix:"#$?",suffix:"?$#"}},{defaultValue:C,ns:T}),L=M?x(M,D):C;return A?l.a.createElement(A,v,H(f||t,L,_,E,D)):H(f||t,L,_,E,D)}n("KKXr");var W=n("J4zp"),q=n.n(W);function G(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function K(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.i18n,r=Object(c.useContext)(R),a=w()&&r||{},i=a.i18n,s=a.defaultNS,u=n||i||P();if(u&&!u.reportNamespaces&&(u.reportNamespaces=new A),!u){I("You will need pass in an i18next instance by using initReactI18next");var l=[function(e){return e},{},!1];return l.t=function(e){return e},l.i18n={},l.ready=!1,l}var d=function(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:{};if(!t.languages||!t.languages.length)return I("i18n.languages were undefined or empty",t.languages),!0;var r=t.languages[0],a=!!t.options&&t.options.fallbackLng,i=t.languages[t.languages.length-1];if("cimode"===r.toLowerCase())return!0;var o=function(e,n){var r=t.services.backendConnector.state["".concat(e,"|").concat(n)];return-1===r||2===r};return!(n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&t.services.backendConnector.backend&&t.isLanguageChangingTo&&!o(t.isLanguageChangingTo,e))&&(!!t.hasResourceBundle(r,e)||(!t.services.backendConnector.backend||!(!o(r,e)||a&&!o(i,e))))}(e,u,d)}));function g(){return{t:u.getFixedT(null,"fallback"===d.nsMode?p:p[0])}}var v=Object(c.useState)(g()),m=q()(v,2),y=m[0],b=m[1];Object(c.useEffect)((function(){var e=!0,t=d.bindI18n,n=d.bindI18nStore;function r(){e&&b(g())}return h||f||L(u,p,(function(){e&&b(g())})),t&&u&&u.on(t,r),n&&u&&u.store.on(n,r),function(){e=!1,t&&u&&t.split(" ").forEach((function(e){return u.off(e,r)})),n&&u&&n.split(" ").forEach((function(e){return u.store.off(e,r)}))}}),[p.join()]);var _=[y.t,u,h];if(_.t=y.t,_.i18n=u,_.ready=h,h)return _;if(!h&&!f)return _;throw new Promise((function(e){L(u,p,(function(){b(g()),e()}))}))}var Y=n("pVnL"),X=n.n(Y);function J(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Z(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(n){function r(r){var i=r.forwardedRef,s=a()(r,["forwardedRef"]),u=K(e,s),c=q()(u,3),d=function(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:{}).i18n,r=Object(c.useContext)(R),a=(w()&&r||{}).i18n,i=n||a||P();i.options&&i.options.isClone||(e&&!i.initializedStoreOnce&&(i.services.resourceStore.data=e,i.initializedStoreOnce=!0),t&&!i.initializedLanguageOnce&&(i.changeLanguage(t),i.initializedLanguageOnce=!0))}function te(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ne(){return function(e){function t(t){var n=t.initialI18nStore,r=t.initialLanguage,i=a()(t,["initialI18nStore","initialLanguage"]);return ee(n,r),l.a.createElement(e,function(e){for(var t=1;t=0;c--)if(l[c]!==d[c])return!1;for(c=l.length-1;c>=0;c--)if(s=l[c],!b(e[s],t[s],n,r))return!1;return!0}(e,t,n,r))}return n?e===t:e==t}function _(e){return"[object Arguments]"==Object.prototype.toString.call(e)}function x(e,t){if(!e||!t)return!1;if("[object RegExp]"==Object.prototype.toString.call(t))return t.test(e);try{if(e instanceof t)return!0}catch(n){}return!Error.isPrototypeOf(t)&&!0===t.call({},e)}function R(e,t,n,r){var a;if("function"!=typeof t)throw new TypeError('"block" argument must be a function');"string"==typeof n&&(r=n,n=null),a=function(e){var t;try{e()}catch(n){t=n}return t}(t),r=(n&&n.name?" ("+n.name+").":".")+(r?" "+r:"."),e&&!a&&m(a,n,"Missing expected exception"+r);var i="string"==typeof r,s=!e&&a&&!n;if((!e&&o.isError(a)&&i&&x(a,n)||s)&&m(a,n,"Got unwanted exception"+r),e&&a&&n&&!x(a,n)||!e&&a)throw a}f.AssertionError=function(e){this.name="AssertionError",this.actual=e.actual,this.expected=e.expected,this.operator=e.operator,e.message?(this.message=e.message,this.generatedMessage=!1):(this.message=function(e){return g(v(e.actual),128)+" "+e.operator+" "+g(v(e.expected),128)}(this),this.generatedMessage=!0);var t=e.stackStartFunction||m;if(Error.captureStackTrace)Error.captureStackTrace(this,t);else{var n=new Error;if(n.stack){var r=n.stack,a=h(t),i=r.indexOf("\n"+a);if(i>=0){var o=r.indexOf("\n",i+1);r=r.substring(o+1)}this.stack=r}}},o.inherits(f.AssertionError,Error),f.fail=m,f.ok=y,f.equal=function(e,t,n){e!=t&&m(e,t,n,"==",f.equal)},f.notEqual=function(e,t,n){e==t&&m(e,t,n,"!=",f.notEqual)},f.deepEqual=function(e,t,n){b(e,t,!1)||m(e,t,n,"deepEqual",f.deepEqual)},f.deepStrictEqual=function(e,t,n){b(e,t,!0)||m(e,t,n,"deepStrictEqual",f.deepStrictEqual)},f.notDeepEqual=function(e,t,n){b(e,t,!1)&&m(e,t,n,"notDeepEqual",f.notDeepEqual)},f.notDeepStrictEqual=function e(t,n,r){b(t,n,!0)&&m(t,n,r,"notDeepStrictEqual",e)},f.strictEqual=function(e,t,n){e!==t&&m(e,t,n,"===",f.strictEqual)},f.notStrictEqual=function(e,t,n){e===t&&m(e,t,n,"!==",f.notStrictEqual)},f.throws=function(e,t,n){R(!0,e,t,n)},f.doesNotThrow=function(e,t,n){R(!1,e,t,n)},f.ifError=function(e){if(e)throw e},f.strict=r((function e(t,n){t||m(t,!0,n,"==",e)}),f,{equal:f.strictEqual,deepEqual:f.deepStrictEqual,notEqual:f.notStrictEqual,notDeepEqual:f.notDeepStrictEqual}),f.strict.strict=f.strict;var w=Object.keys||function(e){var t=[];for(var n in e)s.call(e,n)&&t.push(n);return t}}).call(this,n("yLpj"))},"9x6x":function(e,t,n){"use strict";n("rGqo"),n("yt8O"),n("Btvt"),n("RW0V"),n("Vd3H"),n("V+eJ"),n("LK8F"),n("AphP"),e.exports=function(e,t){t||(t={}),"function"==typeof t&&(t={cmp:t});var n,r="boolean"==typeof t.cycles&&t.cycles,a=t.cmp&&(n=t.cmp,function(e){return function(t,r){var a={key:t,value:e[t]},i={key:r,value:e[r]};return n(a,i)}}),i=[];return function e(t){if(t&&t.toJSON&&"function"==typeof t.toJSON&&(t=t.toJSON()),void 0!==t){if("number"==typeof t)return isFinite(t)?""+t:"null";if("object"!=typeof t)return JSON.stringify(t);var n,o;if(Array.isArray(t)){for(o="[",n=0;n0&&(e+="var _taps = this.taps;\n",e+="var _interceptors = this.interceptors;\n");for(var t=0;t {\n"):"_err".concat(e," => {\n"),d+="if(_err".concat(e,") {\n"),d+=n("_err".concat(e)),d+="} else {\n",r&&(d+=r("_result".concat(e))),a&&(d+=a()),d+="}\n",d+="}",o+="_fn".concat(e,"(").concat(this.args({before:l.context?"_context":void 0,after:d}),");\n");break;case"promise":o+="var _hasResult".concat(e," = false;\n"),o+="var _promise".concat(e," = _fn").concat(e,"(").concat(this.args({before:l.context?"_context":void 0}),");\n"),o+="if (!_promise".concat(e," || !_promise").concat(e,".then)\n"),o+=" throw new Error('Tap function (tapPromise) did not return promise (returned ' + _promise".concat(e," + ')');\n"),o+="_promise".concat(e,".then(_result").concat(e," => {\n"),o+="_hasResult".concat(e," = true;\n"),r&&(o+=r("_result".concat(e))),a&&(o+=a()),o+="}, _err".concat(e," => {\n"),o+="if(_hasResult".concat(e,") throw _err").concat(e,";\n"),o+=n("_err".concat(e)),o+="});\n"}return o}},{key:"callTapsSeries",value:function(e){var t=this,n=e.onError,r=e.onResult,a=e.resultReturns,i=e.onDone,o=e.doneReturns,s=e.rethrowIfPossible;if(0===this.options.taps.length)return i();for(var u=this.options.taps.findIndex((function(e){return"sync"!==e.type})),c=a||o||!1,l="",d=i,f=function(e){var a=e;d!==i&&"sync"!==t.options.taps[a].type&&(l+="function _next".concat(a,"() {\n"),l+=d(),l+="}\n",d=function(){return"".concat(c?"return ":"","_next").concat(a,"();\n")});var o=d,f=function(e){return e?"":i()},p=t.callTap(a,{onError:function(e){return n(a,e,o,f)},onResult:r&&function(e){return r(a,e,o,f)},onDone:!r&&o,rethrowIfPossible:s&&(u<0||a=0;p--)f(p);return l+=d()}},{key:"callTapsLooping",value:function(e){var t=e.onError,n=e.onDone,r=e.rethrowIfPossible;if(0===this.options.taps.length)return n();var a=this.options.taps.every((function(e){return"sync"===e.type})),i="";a||(i+="var _looper = () => {\n",i+="var _loopAsync = false;\n"),i+="var _loop;\n",i+="do {\n",i+="_loop = false;\n";for(var o=0;o0&&void 0!==arguments[0]?arguments[0]:{},t=e.before,n=e.after,r=this._args;return t&&(r=[t].concat(r)),n&&(r=r.concat(n)),0===r.length?"":r.join(", ")}},{key:"getTapFn",value:function(e){return"_x[".concat(e,"]")}},{key:"getTap",value:function(e){return"_taps[".concat(e,"]")}},{key:"getInterceptor",value:function(e){return"_interceptors[".concat(e,"]")}}]),e}();e.exports=i},ABxe:function(e,t){e.exports=function(e){return null!=e&&"object"==typeof e&&!0===e["@@functional/placeholder"]}},AK1u:function(e,t,n){"use strict";n("Oyvg"),n("V+eJ"),n("LK8F"),e.exports=function(e,t,n){var r=" ",a=e.level,i=e.dataLevel,o=e.schema[t],s=e.schemaPath+e.util.getProperty(t),u=e.errSchemaPath+"/"+t,c=!e.opts.allErrors,l="data"+(i||"");if(!1===e.opts.format)return c&&(r+=" if (true) { "),r;var d,f=e.opts.$data&&o&&o.$data;f?(r+=" var schema"+a+" = "+e.util.getData(o.$data,i,e.dataPathArr)+"; ",d="schema"+a):d=o;var p=e.opts.unknownFormats,h=Array.isArray(p);if(f){r+=" var "+(g="format"+a)+" = formats["+d+"]; var "+(v="isObject"+a)+" = typeof "+g+" == 'object' && !("+g+" instanceof RegExp) && "+g+".validate; var "+(m="formatType"+a)+" = "+v+" && "+g+".type || 'string'; if ("+v+") { ",e.async&&(r+=" var async"+a+" = "+g+".async; "),r+=" "+g+" = "+g+".validate; } if ( ",f&&(r+=" ("+d+" !== undefined && typeof "+d+" != 'string') || "),r+=" (","ignore"!=p&&(r+=" ("+d+" && !"+g+" ",h&&(r+=" && self._opts.unknownFormats.indexOf("+d+") == -1 "),r+=") || "),r+=" ("+g+" && "+m+" == '"+n+"' && !(typeof "+g+" == 'function' ? ",e.async?r+=" (async"+a+" ? await "+g+"("+l+") : "+g+"("+l+")) ":r+=" "+g+"("+l+") ",r+=" : "+g+".test("+l+"))))) {"}else{var g;if(!(g=e.formats[o])){if("ignore"==p)return e.logger.warn('unknown format "'+o+'" ignored in schema at path "'+e.errSchemaPath+'"'),c&&(r+=" if (true) { "),r;if(h&&p.indexOf(o)>=0)return c&&(r+=" if (true) { "),r;throw new Error('unknown format "'+o+'" is used in schema at path "'+e.errSchemaPath+'"')}var v,m=(v="object"==typeof g&&!(g instanceof RegExp)&&g.validate)&&g.type||"string";if(v){var y=!0===g.async;g=g.validate}if(m!=n)return c&&(r+=" if (true) { "),r;if(y){if(!e.async)throw new Error("async format in sync schema");r+=" if (!(await "+(b="formats"+e.util.getProperty(o)+".validate")+"("+l+"))) { "}else{r+=" if (! ";var b="formats"+e.util.getProperty(o);v&&(b+=".validate"),r+="function"==typeof g?" "+b+"("+l+") ":" "+b+".test("+l+") ",r+=") { "}}var _=_||[];_.push(r),r="",!1!==e.createErrors?(r+=" { keyword: 'format' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { format: ",r+=f?""+d:""+e.util.toQuotedString(o),r+=" } ",!1!==e.opts.messages&&(r+=" , message: 'should match format \"",r+=f?"' + "+d+" + '":""+e.util.escapeQuotes(o),r+="\"' "),e.opts.verbose&&(r+=" , schema: ",r+=f?"validate.schema"+s:""+e.util.toQuotedString(o),r+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),r+=" } "):r+=" {} ";var x=r;return r=_.pop(),!e.compositeRule&&c?e.async?r+=" throw new ValidationError(["+x+"]); ":r+=" validate.errors = ["+x+"]; return false; ":r+=" var err = "+x+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",r+=" } ",c&&(r+=" else { "),r}},AKIq:function(e,t,n){"use strict";n("LK8F"),n("HAE/"),Object.defineProperty(t,"__esModule",{value:!0});var r=n("/rf6");t.getCoord=function(e){if(!e)throw new Error("coord is required");if(!Array.isArray(e)){if("Feature"===e.type&&null!==e.geometry&&"Point"===e.geometry.type)return e.geometry.coordinates;if("Point"===e.type)return e.coordinates}if(Array.isArray(e)&&e.length>=2&&!Array.isArray(e[0])&&!Array.isArray(e[1]))return e;throw new Error("coord must be GeoJSON Point or an Array of numbers")},t.getCoords=function(e){if(Array.isArray(e))return e;if("Feature"===e.type){if(null!==e.geometry)return e.geometry.coordinates}else if(e.coordinates)return e.coordinates;throw new Error("coords must be GeoJSON Feature, Geometry Object or an Array")},t.containsNumber=function e(t){if(t.length>1&&r.isNumber(t[0])&&r.isNumber(t[1]))return!0;if(Array.isArray(t[0])&&t[0].length)return e(t[0]);throw new Error("coordinates must only contain numbers")},t.geojsonType=function(e,t,n){if(!t||!n)throw new Error("type and name required");if(!e||e.type!==t)throw new Error("Invalid input to "+n+": must be a "+t+", given "+e.type)},t.featureOf=function(e,t,n){if(!e)throw new Error("No feature passed");if(!n)throw new Error(".featureOf() requires a name");if(!e||"Feature"!==e.type||!e.geometry)throw new Error("Invalid input to "+n+", Feature with geometry required");if(!e.geometry||e.geometry.type!==t)throw new Error("Invalid input to "+n+": must be a "+t+", given "+e.geometry.type)},t.collectionOf=function(e,t,n){if(!e)throw new Error("No featureCollection passed");if(!n)throw new Error(".collectionOf() requires a name");if(!e||"FeatureCollection"!==e.type)throw new Error("Invalid input to "+n+", FeatureCollection required");for(var r=0,a=e.features;r0:e.util.schemaHasRules(o,e.RULES.all)){f.schema=o,f.schemaPath=s,f.errSchemaPath=u,r+=" var "+d+" = errors; ";var h,g=e.compositeRule;e.compositeRule=f.compositeRule=!0,f.createErrors=!1,f.opts.allErrors&&(h=f.opts.allErrors,f.opts.allErrors=!1),r+=" "+e.validate(f)+" ",f.createErrors=!0,h&&(f.opts.allErrors=h),e.compositeRule=f.compositeRule=g,r+=" if ("+p+") { ";var v=v||[];v.push(r),r="",!1!==e.createErrors?(r+=" { keyword: 'not' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: {} ",!1!==e.opts.messages&&(r+=" , message: 'should NOT be valid' "),e.opts.verbose&&(r+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),r+=" } "):r+=" {} ";var m=r;r=v.pop(),!e.compositeRule&&c?e.async?r+=" throw new ValidationError(["+m+"]); ":r+=" validate.errors = ["+m+"]; return false; ":r+=" var err = "+m+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",r+=" } else { errors = "+d+"; if (vErrors !== null) { if ("+d+") vErrors.length = "+d+"; else vErrors = null; } ",e.opts.allErrors&&(r+=" } ")}else r+=" var err = ",!1!==e.createErrors?(r+=" { keyword: 'not' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: {} ",!1!==e.opts.messages&&(r+=" , message: 'should NOT be valid' "),e.opts.verbose&&(r+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),r+=" } "):r+=" {} ",r+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",c&&(r+=" if (false) { ");return r}},APuy:function(e,t,n){"use strict";t.a=function(e,t){return et?1:e>=t?0:NaN}},APxj:function(e,t,n){"use strict";n("HAE/"),Object.defineProperty(t,"__esModule",{value:!0});var r=n("Ucsi");t.default=function(e,t){return void 0===t&&(t=!0),{lazyInject:r.makePropertyInjectDecorator(e,t),lazyInjectNamed:r.makePropertyInjectNamedDecorator(e,t),lazyInjectTagged:r.makePropertyInjectTaggedDecorator(e,t),lazyMultiInject:r.makePropertyMultiInjectDecorator(e,t)}}},AUvm:function(e,t,n){"use strict";var r=n("5T2Y"),a=n("B+OT"),i=n("jmDH"),o=n("Y7ZC"),s=n("kTiW"),u=n("6/1s").KEY,c=n("KUxP"),l=n("29s/"),d=n("RfKB"),f=n("YqAc"),p=n("UWiX"),h=n("zLkG"),g=n("Zxgi"),v=n("R+7+"),m=n("kAMH"),y=n("5K7Z"),b=n("93I4"),_=n("JB68"),x=n("NsO/"),R=n("G8Mo"),w=n("rr1i"),E=n("oVml"),S=n("A5Xg"),A=n("vwuL"),T=n("mqlF"),P=n("2faE"),C=n("w6GO"),O=A.f,M=P.f,k=S.f,D=r.Symbol,I=r.JSON,L=I&&I.stringify,j=p("_hidden"),F=p("toPrimitive"),z={}.propertyIsEnumerable,N=l("symbol-registry"),B=l("symbols"),V=l("op-symbols"),H=Object.prototype,U="function"==typeof D&&!!T.f,W=r.QObject,q=!W||!W.prototype||!W.prototype.findChild,G=i&&c((function(){return 7!=E(M({},"a",{get:function(){return M(this,"a",{value:7}).a}})).a}))?function(e,t,n){var r=O(H,t);r&&delete H[t],M(e,t,n),r&&e!==H&&M(H,t,r)}:M,K=function(e){var t=B[e]=E(D.prototype);return t._k=e,t},Y=U&&"symbol"==typeof D.iterator?function(e){return"symbol"==typeof e}:function(e){return e instanceof D},X=function(e,t,n){return e===H&&X(V,t,n),y(e),t=R(t,!0),y(n),a(B,t)?(n.enumerable?(a(e,j)&&e[j][t]&&(e[j][t]=!1),n=E(n,{enumerable:w(0,!1)})):(a(e,j)||M(e,j,w(1,{})),e[j][t]=!0),G(e,t,n)):M(e,t,n)},J=function(e,t){y(e);for(var n,r=v(t=x(t)),a=0,i=r.length;i>a;)X(e,n=r[a++],t[n]);return e},Z=function(e){var t=z.call(this,e=R(e,!0));return!(this===H&&a(B,e)&&!a(V,e))&&(!(t||!a(this,e)||!a(B,e)||a(this,j)&&this[j][e])||t)},$=function(e,t){if(e=x(e),t=R(t,!0),e!==H||!a(B,t)||a(V,t)){var n=O(e,t);return!n||!a(B,t)||a(e,j)&&e[j][t]||(n.enumerable=!0),n}},Q=function(e){for(var t,n=k(x(e)),r=[],i=0;n.length>i;)a(B,t=n[i++])||t==j||t==u||r.push(t);return r},ee=function(e){for(var t,n=e===H,r=k(n?V:x(e)),i=[],o=0;r.length>o;)!a(B,t=r[o++])||n&&!a(H,t)||i.push(B[t]);return i};U||(s((D=function(){if(this instanceof D)throw TypeError("Symbol is not a constructor!");var e=f(arguments.length>0?arguments[0]:void 0),t=function(n){this===H&&t.call(V,n),a(this,j)&&a(this[j],e)&&(this[j][e]=!1),G(this,e,w(1,n))};return i&&q&&G(H,e,{configurable:!0,set:t}),K(e)}).prototype,"toString",(function(){return this._k})),A.f=$,P.f=X,n("ar/p").f=S.f=Q,n("NV0k").f=Z,T.f=ee,i&&!n("uOPS")&&s(H,"propertyIsEnumerable",Z,!0),h.f=function(e){return K(p(e))}),o(o.G+o.W+o.F*!U,{Symbol:D});for(var te="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),ne=0;te.length>ne;)p(te[ne++]);for(var re=C(p.store),ae=0;re.length>ae;)g(re[ae++]);o(o.S+o.F*!U,"Symbol",{for:function(e){return a(N,e+="")?N[e]:N[e]=D(e)},keyFor:function(e){if(!Y(e))throw TypeError(e+" is not a symbol!");for(var t in N)if(N[t]===e)return t},useSetter:function(){q=!0},useSimple:function(){q=!1}}),o(o.S+o.F*!U,"Object",{create:function(e,t){return void 0===t?E(e):J(E(e),t)},defineProperty:X,defineProperties:J,getOwnPropertyDescriptor:$,getOwnPropertyNames:Q,getOwnPropertySymbols:ee});var ie=c((function(){T.f(1)}));o(o.S+o.F*ie,"Object",{getOwnPropertySymbols:function(e){return T.f(_(e))}}),I&&o(o.S+o.F*(!U||c((function(){var e=D();return"[null]"!=L([e])||"{}"!=L({a:e})||"{}"!=L(Object(e))}))),"JSON",{stringify:function(e){for(var t,n,r=[e],a=1;arguments.length>a;)r.push(arguments[a++]);if(n=t=r[1],(b(t)||void 0!==e)&&!Y(e))return m(t)||(t=function(e,t){if("function"==typeof n&&(t=n.call(this,e,t)),!Y(t))return t}),r[1]=t,L.apply(I,r)}}),D.prototype[F]||n("NegM")(D.prototype,F,D.prototype.valueOf),d(D,"Symbol"),d(Math,"Math",!0),d(r.JSON,"JSON",!0)},Afnz:function(e,t,n){"use strict";var r=n("LQAc"),a=n("XKFU"),i=n("KroJ"),o=n("Mukb"),s=n("hPIQ"),u=n("QaDb"),c=n("fyDq"),l=n("OP3Y"),d=n("K0xU")("iterator"),f=!([].keys&&"next"in[].keys()),p=function(){return this};e.exports=function(e,t,n,h,g,v,m){u(n,t,h);var y,b,_,x=function(e){if(!f&&e in S)return S[e];switch(e){case"keys":case"values":return function(){return new n(this,e)}}return function(){return new n(this,e)}},R=t+" Iterator",w="values"==g,E=!1,S=e.prototype,A=S[d]||S["@@iterator"]||g&&S[g],T=A||x(g),P=g?w?x("entries"):T:void 0,C="Array"==t&&S.entries||A;if(C&&(_=l(C.call(new e)))!==Object.prototype&&_.next&&(c(_,R,!0),r||"function"==typeof _[d]||o(_,d,p)),w&&A&&"values"!==A.name&&(E=!0,T=function(){return A.call(this)}),r&&!m||!f&&!E&&S[d]||o(S,d,T),s[t]=T,s[R]=p,g)if(y={values:w?T:x("values"),keys:v?T:x("keys"),entries:P},m)for(b in y)b in S||i(S,b,y[b]);else a(a.P+a.F*(f||E),t,y);return y}},Aib3:function(e,t,n){n("bWfx");var r=n("mhV4");function a(e,t){return function(n){return e(n,t)}}function i(e,t){t=!!t,e[0]=o(e[0],t);for(var n=1;n=0}(e)===t?e:e.reverse()}e.exports=function e(t,n){switch(t&&t.type||null){case"FeatureCollection":return t.features=t.features.map(a(e,n)),t;case"GeometryCollection":return t.geometries=t.geometries.map(a(e,n)),t;case"Feature":return t.geometry=e(t.geometry,n),t;case"Polygon":case"MultiPolygon":return function(e,t){"Polygon"===e.type?e.coordinates=i(e.coordinates,t):"MultiPolygon"===e.type&&(e.coordinates=e.coordinates.map(a(i,t)));return e}(t,n);default:return t}}},AphP:function(e,t,n){"use strict";var r=n("XKFU"),a=n("S/j/"),i=n("apmT");r(r.P+r.F*n("eeVq")((function(){return null!==new Date(NaN).toJSON()||1!==Date.prototype.toJSON.call({toISOString:function(){return 1}})})),"Date",{toJSON:function(e){var t=a(this),n=i(t);return"number"!=typeof n||isFinite(n)?t.toISOString():null}})},"Av+g":function(e,t){e.exports=function(e,t){return Object.prototype.hasOwnProperty.call(t,e)}},AvRE:function(e,t,n){var r=n("RYi7"),a=n("vhPU");e.exports=function(e){return function(t,n){var i,o,s=String(a(t)),u=r(n),c=s.length;return u<0||u>=c?e?"":void 0:(i=s.charCodeAt(u))<55296||i>56319||u+1===c||(o=s.charCodeAt(u+1))<56320||o>57343?e?s.charAt(u):i:e?s.slice(u,u+2):o-56320+(i-55296<<10)+65536}}},AwBQ:function(e,t,n){"use strict";n("0l/t"),n("8+KV"),n("rGqo"),n("yt8O"),n("Btvt"),n("XfO3"),n("9AAn"),n("HAE/"),Object.defineProperty(t,"__esModule",{value:!0});var r=n("MON2"),a=function(){function e(){this._map=new Map}return e.prototype.getMap=function(){return this._map},e.prototype.add=function(e,t){if(null==e)throw new Error(r.NULL_ARGUMENT);if(null==t)throw new Error(r.NULL_ARGUMENT);var n=this._map.get(e);void 0!==n?(n.push(t),this._map.set(e,n)):this._map.set(e,[t])},e.prototype.get=function(e){if(null==e)throw new Error(r.NULL_ARGUMENT);var t=this._map.get(e);if(void 0!==t)return t;throw new Error(r.KEY_NOT_FOUND)},e.prototype.remove=function(e){if(null==e)throw new Error(r.NULL_ARGUMENT);if(!this._map.delete(e))throw new Error(r.KEY_NOT_FOUND)},e.prototype.removeByCondition=function(e){var t=this;this._map.forEach((function(n,r){var a=n.filter((function(t){return!e(t)}));a.length>0?t._map.set(r,a):t._map.delete(r)}))},e.prototype.hasKey=function(e){if(null==e)throw new Error(r.NULL_ARGUMENT);return this._map.has(e)},e.prototype.clone=function(){var t=new e;return this._map.forEach((function(e,n){e.forEach((function(e){return t.add(n,e.clone())}))})),t},e.prototype.traverse=function(e){this._map.forEach((function(t,n){e(n,t)}))},e}();t.Lookup=a},AwJw:function(e,t,n){"use strict";e.exports=function(e,t,n){var r=" ",a=e.level,i=e.dataLevel,o=e.schema[t],s=e.schemaPath+e.util.getProperty(t),u=e.errSchemaPath+"/"+t,c=!e.opts.allErrors,l="data"+(i||""),d="valid"+a,f=e.opts.$data&&o&&o.$data;f&&(r+=" var schema"+a+" = "+e.util.getData(o.$data,i,e.dataPathArr)+"; "),f||(r+=" var schema"+a+" = validate.schema"+s+";"),r+="var "+d+" = equal("+l+", schema"+a+"); if (!"+d+") { ";var p=p||[];p.push(r),r="",!1!==e.createErrors?(r+=" { keyword: 'const' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { allowedValue: schema"+a+" } ",!1!==e.opts.messages&&(r+=" , message: 'should be equal to constant' "),e.opts.verbose&&(r+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),r+=" } "):r+=" {} ";var h=r;return r=p.pop(),!e.compositeRule&&c?e.async?r+=" throw new ValidationError(["+h+"]); ":r+=" validate.errors = ["+h+"]; return false; ":r+=" var err = "+h+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",r+=" }",c&&(r+=" else { "),r}},AyUB:function(e,t,n){e.exports={default:n("3GJH"),__esModule:!0}},"B+G4":function(e,t,n){"use strict";var r=n("pVnL");Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a,i=n("4cb6"),o=n("LvDl"),s=n("TDna"),u="#define PI 3.14159265359",c=/precision\s+(high|low|medium)p\s+float/,l=/#pragma include (["^+"]?["\ "[a-zA-Z_0-9](.*)"]*?)/g,d=(0,i.injectable)()(a=function(){function e(){this.moduleCache={},this.rawContentCache={}}var t=e.prototype;return t.registerBuiltinModules=function(){this.registerModule("common",{vs:u,fs:u}),this.registerModule("decode",{vs:"#define SHIFT_RIGHT17 1.0 / 131072.0\n#define SHIFT_RIGHT18 1.0 / 262144.0\n#define SHIFT_RIGHT19 1.0 / 524288.0\n#define SHIFT_RIGHT20 1.0 / 1048576.0\n#define SHIFT_RIGHT21 1.0 / 2097152.0\n#define SHIFT_RIGHT22 1.0 / 4194304.0\n#define SHIFT_RIGHT23 1.0 / 8388608.0\n#define SHIFT_RIGHT24 1.0 / 16777216.0\n\n#define SHIFT_LEFT17 131072.0\n#define SHIFT_LEFT18 262144.0\n#define SHIFT_LEFT19 524288.0\n#define SHIFT_LEFT20 1048576.0\n#define SHIFT_LEFT21 2097152.0\n#define SHIFT_LEFT22 4194304.0\n#define SHIFT_LEFT23 8388608.0\n#define SHIFT_LEFT24 16777216.0\n\nvec2 unpack_float(const float packedValue) {\n int packedIntValue = int(packedValue);\n int v0 = packedIntValue / 256;\n return vec2(v0, packedIntValue - v0 * 256);\n}\n\nvec4 decode_color(const vec2 encodedColor) {\n return vec4(\n unpack_float(encodedColor[0]) / 255.0,\n unpack_float(encodedColor[1]) / 255.0\n );\n}",fs:""}),this.registerModule("projection",{vs:"#define TILE_SIZE 512.0\n#define PI 3.1415926536\n#define WORLD_SCALE TILE_SIZE / (PI * 2.0)\n\n#define COORDINATE_SYSTEM_LNGLAT 1.0\n#define COORDINATE_SYSTEM_LNGLAT_OFFSET 2.0\n#define COORDINATE_SYSTEM_VECTOR_TILE 3.0\n#define COORDINATE_SYSTEM_IDENTITY 4.0\n#define COORDINATE_SYSTEM_P20 5.0\n#define COORDINATE_SYSTEM_P20_OFFSET 6.0\n#define COORDINATE_SYSTEM_METER_OFFSET 7.0\n\nuniform mat4 u_ViewMatrix;\nuniform mat4 u_ProjectionMatrix;\nuniform mat4 u_ViewProjectionMatrix;\nuniform float u_Zoom : 1;\nuniform float u_ZoomScale : 1;\n\nuniform float u_CoordinateSystem;\nuniform vec2 u_ViewportCenter;\nuniform vec4 u_ViewportCenterProjection;\nuniform vec3 u_PixelsPerDegree;\nuniform vec3 u_PixelsPerDegree2;\nuniform vec3 u_PixelsPerMeter;\n\nuniform vec2 u_ViewportSize;\nuniform float u_DevicePixelRatio;\nuniform float u_FocalDistance;\nuniform vec3 u_CameraPosition;\n\n// web mercator coords -> world coords\nvec2 project_mercator(vec2 lnglat) {\n float x = lnglat.x;\n return vec2(\n radians(x) + PI,\n PI - log(tan(PI * 0.25 + radians(lnglat.y) * 0.5))\n );\n}\n\nfloat project_scale(float meters) {\n return meters * u_PixelsPerMeter.z;\n}\n\n// offset coords -> world coords\nvec4 project_offset(vec4 offset) {\n float dy = offset.y;\n dy = clamp(dy, -1., 1.);\n vec3 pixels_per_unit = u_PixelsPerDegree + u_PixelsPerDegree2 * dy;\n return vec4(offset.xyz * pixels_per_unit, offset.w);\n}\n\nvec3 project_normal(vec3 normal) {\n vec4 normal_modelspace = u_ModelMatrix * vec4(normal, 0.0);\n return normalize(normal_modelspace.xyz * u_PixelsPerMeter);\n}\n\nvec3 project_offset_normal(vec3 vector) {\n if (u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT\n || u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT_OFFSET) {\n // normals generated by the polygon tesselator are in lnglat offsets instead of meters\n return normalize(vector * u_PixelsPerDegree);\n }\n return project_normal(vector);\n}\n\nvec4 project_position(vec4 position) {\n if (u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT_OFFSET\n || u_CoordinateSystem == COORDINATE_SYSTEM_P20_OFFSET) {\n float X = position.x - u_ViewportCenter.x;\n float Y = position.y - u_ViewportCenter.y;\n return project_offset(vec4(X, Y, position.z, position.w));\n }\n\n if (u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT) {\n return vec4(\n project_mercator(position.xy) * WORLD_SCALE * u_ZoomScale,\n project_scale(position.z),\n position.w\n );\n }\n\n if (u_CoordinateSystem == COORDINATE_SYSTEM_P20) {\n return vec4(\n (project_mercator(position.xy) * WORLD_SCALE * u_ZoomScale - vec2(215440491., 106744817.)) * vec2(1., -1.),\n project_scale(position.z),\n position.w\n );\n }\n\n // TODO: 瓦片坐标系 & 常规世界坐标系\n}\n\nvec2 project_pixel_size_to_clipspace(vec2 pixels) {\n vec2 offset = pixels / u_ViewportSize * u_DevicePixelRatio * 2.0;\n return offset * u_FocalDistance;\n}\n\nvec2 project_pixel(vec2 pixel) {\n if (u_CoordinateSystem == COORDINATE_SYSTEM_P20\n || u_CoordinateSystem == COORDINATE_SYSTEM_P20_OFFSET) {\n // P20 坐标系下,为了和 Web 墨卡托坐标系统一,zoom 默认减1\n return pixel * pow(2.0, (19.0 - u_Zoom));\n }\n return pixel;\n}\n\nvec4 project_common_position_to_clipspace(vec4 position, mat4 viewProjectionMatrix, vec4 center) {\n if (u_CoordinateSystem == COORDINATE_SYSTEM_METER_OFFSET ||\n u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT_OFFSET) {\n // Needs to be divided with project_uCommonUnitsPerMeter\n position.w *= u_PixelsPerMeter.z;\n }\n return viewProjectionMatrix * position + center;\n}\n\n// Projects from common space coordinates to clip space\nvec4 project_common_position_to_clipspace(vec4 position) {\n return project_common_position_to_clipspace(\n position,\n u_ViewProjectionMatrix,\n u_ViewportCenterProjection\n );\n}\n\nvec4 unproject_clipspace_to_position(vec4 clipspacePos, mat4 u_InverseViewProjectionMatrix) {\n vec4 pos = u_InverseViewProjectionMatrix * (clipspacePos - u_ViewportCenterProjection);\n if (u_CoordinateSystem == COORDINATE_SYSTEM_METER_OFFSET ||\n u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT_OFFSET) {\n // Needs to be divided with project_uCommonUnitsPerMeter\n pos.w /= u_PixelsPerMeter.z;\n }\n return pos;\n}\n",fs:""}),this.registerModule("sdf_2d",{vs:"",fs:"/**\n * 2D signed distance field functions\n * @see http://www.iquilezles.org/www/articles/distfunctions2d/distfunctions2d.htm\n */\n\nfloat ndot(vec2 a, vec2 b ) { return a.x*b.x - a.y*b.y; }\n\nfloat sdCircle(vec2 p, float r) {\n return length(p) - r;\n}\n\nfloat sdEquilateralTriangle(vec2 p) {\n const float k = sqrt(3.0);\n p.x = abs(p.x) - 1.0;\n p.y = p.y + 1.0/k;\n if( p.x + k*p.y > 0.0 ) p = vec2(p.x-k*p.y,-k*p.x-p.y)/2.0;\n p.x -= clamp( p.x, -2.0, 0.0 );\n return -length(p)*sign(p.y);\n}\n\nfloat sdBox(vec2 p, vec2 b) {\n vec2 d = abs(p)-b;\n return length(max(d,vec2(0))) + min(max(d.x,d.y),0.0);\n}\n\nfloat sdPentagon(vec2 p, float r) {\n const vec3 k = vec3(0.809016994,0.587785252,0.726542528);\n p.x = abs(p.x);\n p -= 2.0*min(dot(vec2(-k.x,k.y),p),0.0)*vec2(-k.x,k.y);\n p -= 2.0*min(dot(vec2( k.x,k.y),p),0.0)*vec2( k.x,k.y);\n p -= vec2(clamp(p.x,-r*k.z,r*k.z),r); \n return length(p)*sign(p.y);\n}\n\nfloat sdHexagon(vec2 p, float r) {\n const vec3 k = vec3(-0.866025404,0.5,0.577350269);\n p = abs(p);\n p -= 2.0*min(dot(k.xy,p),0.0)*k.xy;\n p -= vec2(clamp(p.x, -k.z*r, k.z*r), r);\n return length(p)*sign(p.y);\n}\n\nfloat sdOctogon(vec2 p, float r) {\n const vec3 k = vec3(-0.9238795325, 0.3826834323, 0.4142135623 );\n p = abs(p);\n p -= 2.0*min(dot(vec2( k.x,k.y),p),0.0)*vec2( k.x,k.y);\n p -= 2.0*min(dot(vec2(-k.x,k.y),p),0.0)*vec2(-k.x,k.y);\n p -= vec2(clamp(p.x, -k.z*r, k.z*r), r);\n return length(p)*sign(p.y);\n}\n\nfloat sdHexagram(vec2 p, float r) {\n const vec4 k=vec4(-0.5,0.8660254038,0.5773502692,1.7320508076);\n p = abs(p);\n p -= 2.0*min(dot(k.xy,p),0.0)*k.xy;\n p -= 2.0*min(dot(k.yx,p),0.0)*k.yx;\n p -= vec2(clamp(p.x,r*k.z,r*k.w),r);\n return length(p)*sign(p.y);\n}\n\nfloat sdRhombus(vec2 p, vec2 b) {\n vec2 q = abs(p);\n float h = clamp((-2.0*ndot(q,b)+ndot(b,b))/dot(b,b),-1.0,1.0);\n float d = length( q - 0.5*b*vec2(1.0-h,1.0+h) );\n return d * sign( q.x*b.y + q.y*b.x - b.x*b.y );\n}\n\nfloat sdVesica(vec2 p, float r, float d) {\n p = abs(p);\n float b = sqrt(r*r-d*d); // can delay this sqrt\n return ((p.y-b)*d>p.x*b) \n ? length(p-vec2(0.0,b))\n : length(p-vec2(-d,0.0))-r;\n}"}),this.registerModule("lighting",{vs:"// Blinn-Phong model\n// apply lighting in vertex shader instead of fragment shader\n// @see https://learnopengl.com/Advanced-Lighting/Advanced-Lighting\nuniform float u_Ambient : 1.0;\nuniform float u_Diffuse : 1.0;\nuniform float u_Specular : 1.0;\nuniform int u_NumOfDirectionalLights : 1;\nuniform int u_NumOfSpotLights : 0;\n\n#define SHININESS 32.0\n#define MAX_NUM_OF_DIRECTIONAL_LIGHTS 3\n#define MAX_NUM_OF_SPOT_LIGHTS 3\n\nstruct DirectionalLight {\n vec3 direction;\n vec3 ambient;\n vec3 diffuse;\n vec3 specular;\n};\n\nstruct SpotLight {\n vec3 position;\n vec3 direction;\n vec3 ambient;\n vec3 diffuse;\n vec3 specular;\n float constant;\n float linear;\n float quadratic;\n float angle;\n float blur;\n float exponent;\n};\n\nuniform DirectionalLight u_DirectionalLights[MAX_NUM_OF_DIRECTIONAL_LIGHTS];\nuniform SpotLight u_SpotLights[MAX_NUM_OF_SPOT_LIGHTS];\n\nvec3 calc_directional_light(DirectionalLight light, vec3 normal, vec3 viewDir) {\n vec3 lightDir = normalize(light.direction);\n // diffuse shading\n float diff = max(dot(normal, lightDir), 0.0);\n // Blinn-Phong specular shading\n vec3 halfwayDir = normalize(lightDir + viewDir);\n float spec = pow(max(dot(normal, halfwayDir), 0.0), SHININESS);\n\n vec3 ambient = light.ambient * u_Ambient;\n vec3 diffuse = light.diffuse * diff * u_Diffuse;\n vec3 specular = light.specular * spec * u_Specular;\n\n return ambient + diffuse + specular;\n}\n\n// vec3 calc_spot_light(SpotLight light, vec3 normal, vec3 fragPos, vec3 viewDir) {\n// vec3 lightDir = normalize(light.position - fragPos);\n// // diffuse shading\n// float diff = max(dot(normal, lightDir), 0.0);\n// // specular shading\n// vec3 reflectDir = reflect(-lightDir, normal);\n// float spec = pow(max(dot(viewDir, reflectDir), 0.0), SHININESS);\n// // attenuation\n// float distance = length(light.position - fragPos);\n// float attenuation = 1.0 / (light.constant + light.linear * distance + \n// light.quadratic * (distance * distance)); \n\n// vec3 ambient = light.ambient * u_Ambient;\n// vec3 diffuse = light.diffuse * diff * u_Diffuse;\n// vec3 specular = light.specular * spec * u_Specular;\n\n// float spotEffect = dot(normalize(light.direction), -lightDir);\n// float spotCosCutoff = cos(light.angle / 180.0 * PI);\n// float spotCosOuterCutoff = cos((light.angle + light.blur) / 180.0 * PI);\n// float spotCosInnerCutoff = cos((light.angle - light.blur) / 180.0 * PI);\n// if (spotEffect > spotCosCutoff) {\n// spotEffect = pow(smoothstep(spotCosOuterCutoff, spotCosInnerCutoff, spotEffect), light.exponent);\n// } else {\n// spotEffect = 0.0;\n// }\n\n// return ambient + attenuation * (spotEffect * diffuse + specular);\n// }\n\nvec3 calc_lighting(vec3 position, vec3 normal, vec3 viewDir) {\n vec3 weight = vec3(0.0);\n for (int i = 0; i < MAX_NUM_OF_DIRECTIONAL_LIGHTS; i++) {\n if (i >= u_NumOfDirectionalLights) {\n break;\n }\n weight += calc_directional_light(u_DirectionalLights[i], normal, viewDir);\n }\n // for (int i = 0; i < MAX_NUM_OF_SPOT_LIGHTS; i++) {\n // if (i >= u_NumOfSpotLights) {\n // break;\n // }\n // weight += calc_spot_light(u_SpotLights[i], normal, position, viewDir);\n // }\n return weight;\n}",fs:""}),this.registerModule("picking",{vs:"attribute vec3 a_PickingColor;\nvarying vec4 v_PickingResult;\n\nuniform vec3 u_PickingColor : [0, 0, 0];\nuniform vec4 u_HighlightColor : [0, 0, 0, 0];\nuniform float u_PickingStage : 0.0;\nuniform float u_PickingThreshold : 1.0;\n\n#define PICKING_NONE 0.0\n#define PICKING_ENCODE 1.0\n#define PICKING_HIGHLIGHT 2.0\n#define COLOR_SCALE 1. / 255.\n\nbool isVertexPicked(vec3 vertexColor) {\n return\n abs(vertexColor.r - u_PickingColor.r) < u_PickingThreshold &&\n abs(vertexColor.g - u_PickingColor.g) < u_PickingThreshold &&\n abs(vertexColor.b - u_PickingColor.b) < u_PickingThreshold;\n}\n\nvoid setPickingColor(vec3 pickingColor) {\n // compares only in highlight stage\n v_PickingResult.a = float((u_PickingStage == PICKING_HIGHLIGHT) && isVertexPicked(pickingColor));\n\n // Stores the picking color so that the fragment shader can render it during picking\n v_PickingResult.rgb = pickingColor * COLOR_SCALE;\n}\n",fs:"varying vec4 v_PickingResult;\nuniform vec4 u_HighlightColor : [0, 0, 0, 0];\nuniform float u_PickingStage : 0.0;\n\n#define PICKING_NONE 0.0\n#define PICKING_ENCODE 1.0\n#define PICKING_HIGHLIGHT 2.0\n#define COLOR_SCALE 1. / 255.\n\n/*\n * Returns highlight color if this item is selected.\n */\nvec4 filterHighlightColor(vec4 color) {\n bool selected = bool(v_PickingResult.a);\n\n if (selected) {\n vec4 highLightColor = u_HighlightColor * COLOR_SCALE;\n\n float highLightAlpha = highLightColor.a;\n float highLightRatio = highLightAlpha / (highLightAlpha + color.a * (1.0 - highLightAlpha));\n\n vec3 resultRGB = mix(color.rgb, highLightColor.rgb, highLightRatio);\n return vec4(resultRGB, color.a);\n } else {\n return color;\n }\n}\n\n/*\n * Returns picking color if picking enabled else unmodified argument.\n */\nvec4 filterPickingColor(vec4 color) {\n vec3 pickingColor = v_PickingResult.rgb;\n if (u_PickingStage == PICKING_ENCODE && length(pickingColor) < 0.001) {\n discard;\n }\n return u_PickingStage == PICKING_ENCODE ? vec4(pickingColor, 1.0) : color;\n}\n\n/*\n * Returns picking color if picking is enabled if not\n * highlight color if this item is selected, otherwise unmodified argument.\n */\nvec4 filterColor(vec4 color) {\n return filterPickingColor(filterHighlightColor(color));\n}"})},t.registerModule=function(e,t){if(!this.rawContentCache[e]){var n=t.vs,a=t.fs,i=t.uniforms,o=(0,s.extractUniforms)(n),u=o.content,c=o.uniforms,l=(0,s.extractUniforms)(a),d=l.content,f=l.uniforms;this.rawContentCache[e]={fs:d,uniforms:r({},c,{},f,{},i),vs:u}}},t.getModule=function(e){var t=this;if(this.moduleCache[e])return this.moduleCache[e];var n=this.rawContentCache[e].vs,a=this.rawContentCache[e].fs,i=this.processModule(n,[],"vs"),s=i.content,u=i.includeList,l=this.processModule(a,[],"fs"),d=l.content,f=l.includeList,p=d,h=(0,o.uniq)(u.concat(f).concat(e)).reduce((function(e,n){return r({},e,{},t.rawContentCache[n].uniforms)}),{});return c.test(d)||(p="#ifdef GL_FRAGMENT_PRECISION_HIGH\n precision highp float;\n #else\n precision mediump float;\n#endif\n"+d),this.moduleCache[e]={fs:p.trim(),uniforms:h,vs:s.trim()},this.moduleCache[e]},t.processModule=function(e,t,n){var r=this;return{content:e.replace(l,(function(e,a){var i=a.split(" ")[0].replace(/"/g,"");if(t.indexOf(i)>-1)return"";var o=r.rawContentCache[i][n];return t.push(i),r.processModule(o,t,n).content})),includeList:t}},e}())||a;t.default=d},"B+OT":function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},B1zD:function(e,t,n){"use strict";n("Tze0"),n("pIFo"),n("hHhE"),n("/SS/"),n("rE2o"),n("ioFf"),n("rGqo"),n("yt8O"),n("Btvt"),n("XfO3"),n("EK0E"),n("HAE/"),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=function(e){if(e&&e.__esModule)return e;var t=c();if(t&&t.has(e))return t.get(e);var n={};if(null!=e){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var i=r?Object.getOwnPropertyDescriptor(e,a):null;i&&(i.get||i.set)?Object.defineProperty(n,a,i):n[a]=e[a]}}n.default=e,t&&t.set(e,n);return n}(n("q1tI")),a=u(n("Fcj4")),i=n("94VI"),o=u(n("Pbn2")),s=u(n("27j4"));function u(e){return e&&e.__esModule?e:{default:e}}function c(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return c=function(){return e},e}function l(e){return(l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function d(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:r({},n,t),i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=e["@@type"],s=e["@@tag"],u=e["@@value"];p(n,o);var g=i?a:f(l(a)),v=c(u,h(g));return d(Object.create(t[s].prototype),v)}}},BXJl:function(e,t,n){"use strict";var r=n("lwsE"),a=n("W8MJ"),i=n("a1gu"),o=n("Nsbk"),s=n("7W2i"),u=n("1ll/"),c=new(function(e){function t(){return r(this,t),i(this,o(t).apply(this,arguments))}return s(t,e),a(t,[{key:"content",value:function(e){var t=e.onError,n=e.onResult,r=e.resultReturns,a=e.onDone,i=e.rethrowIfPossible;return this.callTapsSeries({onError:function(e,n){return t(n)},onResult:function(e,t,r){return"if(".concat(t," !== undefined) {\n").concat(n(t),";\n} else {\n").concat(r(),"}\n")},resultReturns:r,onDone:a,rethrowIfPossible:i})}}]),t}(n("5cEH"))),l=function(){throw new Error("tapAsync is not supported on a SyncBailHook")},d=function(){throw new Error("tapPromise is not supported on a SyncBailHook")},f=function(e){return c.setup(this,e),c.create(e)};function p(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,n=new u(e,t);return n.constructor=p,n.tapAsync=l,n.tapPromise=d,n.compile=f,n}p.prototype=null,e.exports=p},BmM1:function(e,t,n){"use strict";n("pIFo"),n("HAE/"),Object.defineProperty(t,"__esModule",{value:!0}),t.getThemeFromTypeName=function(e){var t=null;i.test(e)?t="filled":o.test(e)?t="outlined":s.test(e)&&(t="twoTone");return t},t.removeTypeTheme=function(e){return e.replace(i,"").replace(o,"").replace(s,"")},t.withThemeSuffix=function(e,t){var n=e;"filled"===t?n+="-fill":"outlined"===t?n+="-o":"twoTone"===t?n+="-twotone":(0,a.default)(!1,"Icon","This icon '".concat(e,"' has unknown theme '").concat(t,"'"));return n},t.alias=function(e){var t=e;switch(e){case"cross":t="close";break;case"interation":t="interaction";break;case"canlendar":t="calendar";break;case"colum-height":t="column-height"}return(0,a.default)(t===e,"Icon","Icon '".concat(e,"' was a typo and is now deprecated, please use '").concat(t,"' instead.")),t},t.svgBaseProps=void 0;var r,a=(r=n("aVg8"))&&r.__esModule?r:{default:r};t.svgBaseProps={width:"1em",height:"1em",fill:"currentColor","aria-hidden":!0,focusable:"false"};var i=/-fill$/,o=/-o$/,s=/-twotone$/},Bnag:function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}},"Bo/e":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.heatMap3DTriangulation=function(e,t){for(var n=[],r=[],a=[],i=e+1,o=t+1,s=e/2,u=t/2,c=0;cx;x++)if((f||x in y)&&(v=b(g=y[x],x,m),e))if(n)R[x]=v;else if(v)switch(e){case 3:return!0;case 5:return g;case 6:return x;case 2:R.push(g)}else if(l)return!1;return d?-1:c||l?l:R}}},CyHz:function(e,t,n){var r=n("XKFU");r(r.S,"Math",{sign:n("lvtm")})},D4S3:function(e,t,n){"use strict";var r=n("o0o1"),a=n("yXPU"),i=n("PJYZ"),o=n("VbXa");Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var s,u,c,l,d,f,p,h,g,v,m,y,b,_,x,R,w,E,S,A,T,P,C,O,M,k,D=n("uhBA"),I=n("4cb6"),L=n("IqPU"),j=n("ewr5"),F=n("5kUe");function z(e,t,n,r){n&&Object.defineProperty(e,t,{enumerable:n.enumerable,configurable:n.configurable,writable:n.writable,value:n.initializer?n.initializer.call(r):void 0})}function N(e,t,n,r,a){var i={};return Object.keys(r).forEach((function(e){i[e]=r[e]})),i.enumerable=!!i.enumerable,i.configurable=!!i.configurable,("value"in i||i.initializer)&&(i.writable=!0),i=n.slice().reverse().reduce((function(n,r){return r(e,t,n)||n}),i),a&&void 0!==i.initializer&&(i.value=i.initializer?i.initializer.call(a):void 0,i.initializer=void 0),void 0===i.initializer&&(Object.defineProperty(e,t,i),i=null),i}var B=(s=(0,I.injectable)(),u=(0,I.inject)(j.TYPES.IIconService),c=(0,I.inject)(j.TYPES.IFontService),l=(0,I.inject)(j.TYPES.IControlService),d=(0,I.inject)(j.TYPES.ILogService),f=(0,I.inject)(j.TYPES.IGlobalConfigService),p=(0,I.inject)(j.TYPES.IMapService),h=(0,I.inject)(j.TYPES.IRendererService),g=(0,I.inject)(j.TYPES.ILayerService),v=(0,I.inject)(j.TYPES.ICameraService),m=(0,I.inject)(j.TYPES.IInteractionService),y=(0,I.inject)(j.TYPES.IShaderModuleService),s((k=function(e){function t(){var t;return t=e.call(this)||this,z(i(t),"iconService",x,i(t)),z(i(t),"fontService",R,i(t)),z(i(t),"controlService",w,i(t)),z(i(t),"logger",E,i(t)),z(i(t),"configService",S,i(t)),z(i(t),"map",A,i(t)),z(i(t),"rendererService",T,i(t)),z(i(t),"layerService",P,i(t)),z(i(t),"cameraService",C,i(t)),z(i(t),"interactionService",O,i(t)),z(i(t),"shaderModule",M,i(t)),t.inited=void 0,t.$container=void 0,t.hooks=void 0,t.handleWindowResized=function(){if(t.emit("resize"),t.$container){var e=window.devicePixelRatio,n=window.innerWidth,r=window.innerHeight;if(t.$container!==document.body){var a=t.$container.getBoundingClientRect();n=a.right-a.left,r=a.bottom-a.top}t.rendererService.viewport({x:0,y:0,width:e*n,height:e*r}),t.render()}},t.handleMapCameraChanged=function(e){t.cameraService.update(e),t.render()},t.hooks={init:new L.AsyncParallelHook(["config"])},t}o(t,e);var n=t.prototype;return n.init=function(e){var t=this;this.configService.setAndCheckConfig(e),this.iconService.init(),this.fontService.init(),this.controlService.init({container:document.getElementById(this.configService.getConfig().id||"map")}),this.hooks.init.tapPromise("initMap",function(){var e=a(r.mark((function e(n){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,new Promise((function(e){t.map.onCameraChanged((function(n){t.cameraService.init(),t.cameraService.update(n),e()})),t.map.init(n)}));case 2:t.map.onCameraChanged(t.handleMapCameraChanged),t.logger.info("map loaded");case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),this.hooks.init.tapPromise("initRenderer",a(r.mark((function e(){var n;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(0,F.createRendererContainer)(t.configService.getConfig().id||""),t.$container=n,!n){e.next=8;break}return e.next=5,t.rendererService.init(n);case 5:window.addEventListener("resize",t.handleWindowResized,!1),e.next=9;break;case 8:t.logger.error("容器 id 不存在");case 9:t.shaderModule.registerBuiltinModules(),t.interactionService.init(),t.logger.info("renderer loaded");case 12:case"end":return e.stop()}}),e)}))))},n.addLayer=function(e){this.logger.info("add layer "+e.name),this.layerService.add(e)},n.render=function(){var e=a(r.mark((function e(){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.inited){e.next=7;break}return e.next=3,this.hooks.init.promise(this.configService.getConfig());case 3:this.map.addMarkerContainer(),this.emit("loaded"),this.inited=!0,this.layerService.initLayers();case 7:this.layerService.renderLayers();case 8:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}(),n.destroy=function(){this.emit("destroy"),this.inited=!1,this.layerService.destroy(),this.configService.reset(),this.interactionService.destroy(),this.controlService.destroy(),this.removeAllListeners(),this.rendererService.destroy(),this.map.destroy(),window.removeEventListener("resize",this.handleWindowResized,!1)},t}(D.EventEmitter),x=N((_=k).prototype,"iconService",[u],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),R=N(_.prototype,"fontService",[c],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),w=N(_.prototype,"controlService",[l],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),E=N(_.prototype,"logger",[d],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),S=N(_.prototype,"configService",[f],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),A=N(_.prototype,"map",[p],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),T=N(_.prototype,"rendererService",[h],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),P=N(_.prototype,"layerService",[g],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),C=N(_.prototype,"cameraService",[v],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),O=N(_.prototype,"interactionService",[m],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),M=N(_.prototype,"shaderModule",[y],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),b=_))||b);t.default=B},D4iV:function(e,t,n){for(var r,a=n("dyZX"),i=n("Mukb"),o=n("ylqs"),s=o("typed_array"),u=o("view"),c=!(!a.ArrayBuffer||!a.DataView),l=c,d=0,f="Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array".split(",");d<9;)(r=a[f[d++]])?(i(r.prototype,s,!0),i(r.prototype,u,!0)):l=!1;e.exports={ABV:c,CONSTR:l,TYPED:s,VIEW:u}},D8kY:function(e,t,n){var r=n("Ojgd"),a=Math.max,i=Math.min;e.exports=function(e,t){return(e=r(e))<0?a(e+t,0):i(e,t)}},D9lx:function(e,t,n){"use strict";n("HAE/"),Object.defineProperty(t,"__esModule",{value:!0});var r=n("6AGu"),a=n("406g"),i=n("z4Hk"),o=function(){function e(e){this._binding=e,this._bindingWhenSyntax=new i.BindingWhenSyntax(this._binding),this._bindingOnSyntax=new a.BindingOnSyntax(this._binding),this._bindingInSyntax=new r.BindingInSyntax(e)}return e.prototype.inRequestScope=function(){return this._bindingInSyntax.inRequestScope()},e.prototype.inSingletonScope=function(){return this._bindingInSyntax.inSingletonScope()},e.prototype.inTransientScope=function(){return this._bindingInSyntax.inTransientScope()},e.prototype.when=function(e){return this._bindingWhenSyntax.when(e)},e.prototype.whenTargetNamed=function(e){return this._bindingWhenSyntax.whenTargetNamed(e)},e.prototype.whenTargetIsDefault=function(){return this._bindingWhenSyntax.whenTargetIsDefault()},e.prototype.whenTargetTagged=function(e,t){return this._bindingWhenSyntax.whenTargetTagged(e,t)},e.prototype.whenInjectedInto=function(e){return this._bindingWhenSyntax.whenInjectedInto(e)},e.prototype.whenParentNamed=function(e){return this._bindingWhenSyntax.whenParentNamed(e)},e.prototype.whenParentTagged=function(e,t){return this._bindingWhenSyntax.whenParentTagged(e,t)},e.prototype.whenAnyAncestorIs=function(e){return this._bindingWhenSyntax.whenAnyAncestorIs(e)},e.prototype.whenNoAncestorIs=function(e){return this._bindingWhenSyntax.whenNoAncestorIs(e)},e.prototype.whenAnyAncestorNamed=function(e){return this._bindingWhenSyntax.whenAnyAncestorNamed(e)},e.prototype.whenAnyAncestorTagged=function(e,t){return this._bindingWhenSyntax.whenAnyAncestorTagged(e,t)},e.prototype.whenNoAncestorNamed=function(e){return this._bindingWhenSyntax.whenNoAncestorNamed(e)},e.prototype.whenNoAncestorTagged=function(e,t){return this._bindingWhenSyntax.whenNoAncestorTagged(e,t)},e.prototype.whenAnyAncestorMatches=function(e){return this._bindingWhenSyntax.whenAnyAncestorMatches(e)},e.prototype.whenNoAncestorMatches=function(e){return this._bindingWhenSyntax.whenNoAncestorMatches(e)},e.prototype.onActivation=function(e){return this._bindingOnSyntax.onActivation(e)},e}();t.BindingInWhenOnSyntax=o},DIja:function(e,t,n){"use strict";var r=n("VbXa");Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a,i=n("uhBA"),o=n("4cb6"),s=n("J8dN"),u=(0,o.injectable)()(a=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),a=0;a=p&&(t.push(n({type:"childList",target:r,addedNodes:[c],removedNodes:[c],nextSibling:c.nextSibling,previousSibling:c.previousSibling})),u--),s.b&&d.b&&a(t,c,d.b,s.f),s.a&&3===c.nodeType&&c.nodeValue!==d.a&&t.push(n({type:"characterData",target:c,oldValue:d.a})),s.g&&l(c,d)}function l(r,i){for(var f,p,h,g,v,m=r.childNodes,y=i.c,b=m.length,_=y?y.length:0,x=0,R=0,w=0;R0&&void 0!==arguments[0]?arguments[0]:{},t=e.arrowWidth,n=void 0===t?5:t,i=e.horizontalArrowShift,o=void 0===i?16:i,c=e.verticalArrowShift,l=void 0===c?12:c,d=e.autoAdjustOverflow,f=void 0===d||d,p={left:{points:["cr","cl"],offset:[-4,0]},right:{points:["cl","cr"],offset:[4,0]},top:{points:["bc","tc"],offset:[0,-4]},bottom:{points:["tc","bc"],offset:[0,4]},topLeft:{points:["bl","tc"],offset:[-(o+n),-4]},leftTop:{points:["tr","cl"],offset:[-4,-(l+n)]},topRight:{points:["br","tc"],offset:[o+n,-4]},rightTop:{points:["tl","cr"],offset:[4,-(l+n)]},bottomRight:{points:["tr","bc"],offset:[o+n,4]},rightBottom:{points:["bl","cr"],offset:[4,l+n]},bottomLeft:{points:["tl","bc"],offset:[-(o+n),4]},leftBottom:{points:["br","cl"],offset:[-4,l+n]}};return Object.keys(p).forEach((function(t){p[t]=e.arrowPointAtCenter?a(a({},p[t]),{overflow:u(f),targetOffset:s}):a(a({},r.placements[t]),{overflow:u(f)}),p[t].ignoreShake=!0})),p};var r=n("7QdS");function a(){return(a=Object.assign||function(e){for(var t=1;t>8&255,e+1>>8>>8&255]}(n):[0,0,0]}}})})),e.hooks.beforePickingEncode.tap("PixelPickingPlugin",(function(){e.getStyleOptions().enablePicking&&e.models.forEach((function(e){return e.addUniforms({u_PickingStage:b})}))})),e.hooks.afterPickingEncode.tap("PixelPickingPlugin",(function(){e.getStyleOptions().enablePicking&&e.models.forEach((function(e){return e.addUniforms({u_PickingStage:y,u_PickingColor:[0,0,0],u_HighlightColor:[0,0,0,0]})}))})),e.hooks.beforeHighlight.tap("PixelPickingPlugin",(function(t){var n=e.getStyleOptions().highlightColor,r="string"==typeof n?(0,d.rgb2arr)(n):n||[1,0,0,1];e.models.forEach((function(e){return e.addUniforms({u_PickingStage:_,u_PickingColor:t,u_HighlightColor:r.map((function(e){return 255*e}))})}))}))},e}(),f=(o=u).prototype,p="rendererService",h=[a],g={configurable:!0,enumerable:!0,writable:!0,initializer:null},m={},Object.keys(g).forEach((function(e){m[e]=g[e]})),m.enumerable=!!m.enumerable,m.configurable=!!m.configurable,("value"in m||m.initializer)&&(m.writable=!0),m=h.slice().reverse().reduce((function(e,t){return t(f,p,e)||e}),m),v&&void 0!==m.initializer&&(m.value=m.initializer?m.initializer.call(v):void 0,m.initializer=void 0),void 0===m.initializer&&(Object.defineProperty(f,p,m),m=null),s=m,i=o))||i);t.default=x},DXtu:function(e,t,n){"use strict";var r=n("pVnL");Object.defineProperty(t,"__esModule",{value:!0}),t.cluster=function(e,t){var n=t.radius,a=void 0===n?80:n,s=t.maxZoom,u=void 0===s?18:s,c=t.minZoom,l=void 0===c?0:c,d=t.field,f=t.zoom,p=void 0===f?2:f;if(e.pointIndex){var h=e.pointIndex.getClusters(e.extent,p);return e.dataArray=o(h),e}var g=new i.default({radius:a,minZoom:l,maxZoom:u,map:function(e){return{sum:e[d]}},reduce:function(e,t){e.sum+=t.sum}}),v={type:"FeatureCollection",features:[]};v.features=e.dataArray.map((function(e){var t;return{type:"Feature",properties:(t={},t[d]=e[d],t),geometry:{type:"Point",coordinates:e.coordinates}}})),g.load(v.features);var m=g.getClusters(e.extent,p).map((function(e,t){return r({coordinates:e.geometry.coordinates,_id:t+1},e.properties)}));return e.dataArray=m,e.pointIndex=g,e},t.formatData=o;var a,i=(a=n("b/Yd"))&&a.__esModule?a:{default:a};function o(e){return e.map((function(e,t){return r({coordinates:e.geometry.coordinates,_id:t+1},e.properties)}))}},DjAY:function(e,t,n){var r=n("cOqj"),a=n("Wnyi"),i=n("ABxe");e.exports=function(e){return function t(n,o,s){switch(arguments.length){case 0:return t;case 1:return i(n)?t:a((function(t,r){return e(n,t,r)}));case 2:return i(n)&&i(o)?t:i(n)?a((function(t,n){return e(t,o,n)})):i(o)?a((function(t,r){return e(n,t,r)})):r((function(t){return e(n,o,t)}));default:return i(n)&&i(o)&&i(s)?t:i(n)&&i(o)?a((function(t,n){return e(t,n,s)})):i(n)&&i(s)?a((function(t,n){return e(t,o,n)})):i(o)&&i(s)?a((function(t,r){return e(n,t,r)})):i(n)?r((function(t){return e(t,o,s)})):i(o)?r((function(t){return e(n,t,s)})):i(s)?r((function(t){return e(n,o,t)})):e(n,o,s)}}}},E0u0:function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}n("eM6i"),n("SRfc"),n("8+KV"),n("HAE/"),Object.defineProperty(t,"__esModule",{value:!0});var a=r(n("QDlc")),i=r(n("MgzW")),o=!0,s=!1,u=["altKey","bubbles","cancelable","ctrlKey","currentTarget","eventPhase","metaKey","shiftKey","target","timeStamp","view","type"];function c(e){return null==e}var l=[{reg:/^key/,props:["char","charCode","key","keyCode","which"],fix:function(e,t){c(e.which)&&(e.which=c(t.charCode)?t.keyCode:t.charCode),void 0===e.metaKey&&(e.metaKey=e.ctrlKey)}},{reg:/^touch/,props:["touches","changedTouches","targetTouches"]},{reg:/^hashchange$/,props:["newURL","oldURL"]},{reg:/^gesturechange$/i,props:["rotation","scale"]},{reg:/^(mousewheel|DOMMouseScroll)$/,props:[],fix:function(e,t){var n=void 0,r=void 0,a=void 0,i=t.wheelDelta,o=t.axis,s=t.wheelDeltaY,u=t.wheelDeltaX,c=t.detail;i&&(a=i/120),c&&(a=0-(c%3==0?c/3:c)),void 0!==o&&(o===e.HORIZONTAL_AXIS?(r=0,n=0-a):o===e.VERTICAL_AXIS&&(n=0,r=a)),void 0!==s&&(r=s/120),void 0!==u&&(n=-1*u/120),n||r||(r=a),void 0!==n&&(e.deltaX=n),void 0!==r&&(e.deltaY=r),void 0!==a&&(e.delta=a)}},{reg:/^mouse|contextmenu|click|mspointer|(^DOMMouseScroll$)/i,props:["buttons","clientX","clientY","button","offsetX","relatedTarget","which","fromElement","toElement","offsetY","pageX","pageY","screenX","screenY"],fix:function(e,t){var n=void 0,r=void 0,a=void 0,i=e.target,o=t.button;return i&&c(e.pageX)&&!c(t.clientX)&&(r=(n=i.ownerDocument||document).documentElement,a=n.body,e.pageX=t.clientX+(r&&r.scrollLeft||a&&a.scrollLeft||0)-(r&&r.clientLeft||a&&a.clientLeft||0),e.pageY=t.clientY+(r&&r.scrollTop||a&&a.scrollTop||0)-(r&&r.clientTop||a&&a.clientTop||0)),e.which||void 0===o||(e.which=1&o?1:2&o?3:4&o?2:0),!e.relatedTarget&&e.fromElement&&(e.relatedTarget=e.fromElement===i?e.toElement:e.fromElement),e}}];function d(){return o}function f(){return s}function p(e){var t=e.type,n="function"==typeof e.stopPropagation||"boolean"==typeof e.cancelBubble;a.default.call(this),this.nativeEvent=e;var r=f;"defaultPrevented"in e?r=e.defaultPrevented?d:f:"getPreventDefault"in e?r=e.getPreventDefault()?d:f:"returnValue"in e&&(r=e.returnValue===s?d:f),this.isDefaultPrevented=r;var i=[],o=void 0,c=void 0,p=u.concat();for(l.forEach((function(e){t.match(e.reg)&&(p=p.concat(e.props),e.fix&&i.push(e.fix))})),o=p.length;o;)this[c=p[--o]]=e[c];for(!this.target&&n&&(this.target=e.srcElement||document),this.target&&3===this.target.nodeType&&(this.target=this.target.parentNode),o=i.length;o;)(0,i[--o])(this,e);this.timeStamp=e.timeStamp||Date.now()}var h=a.default.prototype;(0,i.default)(p.prototype,h,{constructor:p,preventDefault:function(){var e=this.nativeEvent;e.preventDefault?e.preventDefault():e.returnValue=s,h.preventDefault.call(this)},stopPropagation:function(){var e=this.nativeEvent;e.stopPropagation?e.stopPropagation():e.cancelBubble=o,h.stopPropagation.call(this)}}),t.default=p,e.exports=t.default},E1XU:function(e,t,n){"use strict";n("91GP"),n("bWfx");var r=n("gnJF"),a=n("rnYU"),i=n("UYkW"),o=i.union,s=i.derivations,u=n("6RdS"),c=n("d1Y1"),l=n("F7L5"),d=n("GfB1"),f=s.equality,p=s.debugRepresentation,h=s.serialization,g=o("folktale:Validation",{Failure:function(e){return{value:e}},Success:function(e){return{value:e}}}).derive(f,p,h),v=g.Success,m=g.Failure,y=r(g);l(m.prototype,{get value(){throw new TypeError("`value` can’t be accessed in an abstract instance of Validation.Failure")}}),l(v.prototype,{get value(){throw new TypeError("`value` can’t be accessed in an abstract instance of Validation.Success")}}),c(g,{map:{Failure:function(e){return a("Validation.Failure#map",e),this},Success:function(e){return a("Validation.Success#map",e),v(e(this.value))}},apply:{Failure:function(e){return y("Failure#apply",e),m.hasInstance(e)?m(this.value.concat(e.value)):this},Success:function(e){return y("Success#apply",e),m.hasInstance(e)?e:e.map(this.value)}},unsafeGet:{Failure:function(){throw new TypeError("Can't extract the value of a Failure.\n\n Failure does not contain a normal value - it contains an error.\n You might consider switching from Validation#get to Validation#getOrElse, or some other method\n that is not partial.\n ")},Success:function(){return this.value}},getOrElse:{Failure:function(e){return e},Success:function(e){return this.value}},orElse:{Failure:function(e){return a("Validation.Failure#orElse",e),e(this.value)},Success:function(e){return a("Validation.Success#orElse",e),this}},concat:{Failure:function(e){return y("Validation.Failure#concat",e),m.hasInstance(e)?m(this.value.concat(e.value)):this},Success:function(e){return y("Validation.Success#concat",e),e}},fold:{Failure:function(e,t){return a("Validation.Failure#fold",e),a("Validation.Failure#fold",t),e(this.value)},Success:function(e,t){return a("Validation.Success#fold",e),a("Validation.Success#fold",t),t(this.value)}},swap:{Failure:function(){return v(this.value)},Success:function(){return m(this.value)}},bimap:{Failure:function(e,t){return a("Validation.Failure#fold",e),a("Validation.Failure#fold",t),m(e(this.value))},Success:function(e,t){return a("Validation.Success#fold",e),a("Validation.Success#fold",t),v(t(this.value))}},mapFailure:{Failure:function(e){return a("Validation.Failure#mapFailure",e),m(e(this.value))},Success:function(e){return a("Validation.Failure#mapFailure",e),this}}}),Object.assign(g,{of:function(e){return v(e)},get:function(){return d("`.get()` is deprecated, and has been renamed to `.unsafeGet()`."),this.unsafeGet()},merge:function(){return this.value},toResult:function(){return n("b2+F")(this)},toMaybe:function(){return n("JYJV")(this)}}),u(v.prototype),u(m.prototype),u(g),e.exports=g},E9nw:function(e,t,n){n("8+KV"),e.exports=function(){var e=document.getSelection();if(!e.rangeCount)return function(){};for(var t=document.activeElement,n=[],r=0;r0?arguments[0]:void 0)}},y={get:function(e){if(l(e)){var t=h(e);return!0===t?v(d(this,"WeakMap")).get(e):t?t[this._i]:void 0}},set:function(e,t){return c.def(d(this,"WeakMap"),e,t)}},b=e.exports=n("4LiD")("WeakMap",m,y,c,!0,!0);f&&p&&(u((r=c.getConstructor(m,"WeakMap")).prototype,y),s.NEED=!0,i(["delete","has","get","set"],(function(e){var t=b.prototype,n=t[e];o(t,e,(function(t,a){if(l(t)&&!g(t)){this._f||(this._f=new r);var i=this._f[e](t,a);return"set"==e?this:i}return n.call(this,t,a)}))})))},ELLl:function(e,t,n){n("hEkN"),n("V+eJ"),function(e){var t={pairs:"()[]{}''\"\"",closeBefore:")]}'\":;>",triples:"",explode:"[]{}"},n=e.Pos;function r(e,n){return"pairs"==n&&"string"==typeof e?e:"object"==typeof e&&null!=e[n]?e[n]:t[n]}e.defineOption("autoCloseBrackets",!1,(function(t,n,o){o&&o!=e.Init&&(t.removeKeyMap(a),t.state.closeBrackets=null),n&&(i(r(n,"pairs")),t.state.closeBrackets=n,t.addKeyMap(a))}));var a={Backspace:function(t){var a=s(t);if(!a||t.getOption("disableInput"))return e.Pass;for(var i=r(a,"pairs"),o=t.listSelections(),c=0;c=0;c--){var d=o[c].head;t.replaceRange("",n(d.line,d.ch-1),n(d.line,d.ch+1),"+delete")}},Enter:function(t){var n=s(t),a=n&&r(n,"explode");if(!a||t.getOption("disableInput"))return e.Pass;for(var i=t.listSelections(),o=0;o1&&f.indexOf(a)>=0&&t.getRange(n(b.line,b.ch-2),b)==a+a){if(b.ch>2&&/\bstring/.test(t.getTokenTypeAt(n(b.line,b.ch-2))))return e.Pass;m="addFour"}else if(p){var x=0==b.ch?" ":t.getRange(n(b.line,b.ch-1),b);if(e.isWordChar(_)||x==a||e.isWordChar(x))return e.Pass;m="both"}else{if(!g||!(0===_.length||/\s/.test(_)||d.indexOf(_)>-1))return e.Pass;m="both"}else m=p&&c(t,b)?"both":f.indexOf(a)>=0&&t.getRange(b,n(b.line,b.ch+3))==a+a+a?"skipThree":"skip";if(l){if(l!=m)return e.Pass}else l=m}var R=u%2?o.charAt(u-1):a,w=u%2?a:o.charAt(u+1);t.operation((function(){if("skip"==l)t.execCommand("goCharRight");else if("skipThree"==l)for(var r=0;r<3;r++)t.execCommand("goCharRight");else if("surround"==l){var a=t.getSelections();for(r=0;r0,{anchor:new n(i.anchor.line,i.anchor.ch+(o?-1:1)),head:new n(i.head.line,i.head.ch+(o?1:-1))});t.setSelections(a)}else"both"==l?(t.replaceSelection(R+w,null),t.triggerElectric(R+w),t.execCommand("goCharLeft")):"addFour"==l&&(t.replaceSelection(R+R+R+R,"before"),t.execCommand("goCharRight"));var i,o}))}(a,t)}}function s(e){var t=e.state.closeBrackets;return!t||t.override?t:e.getModeAt(e.getCursor()).closeBrackets||t}function u(e,t){var r=e.getRange(n(t.line,t.ch-1),n(t.line,t.ch+1));return 2==r.length?r:null}function c(e,t){var r=e.getTokenAt(n(t.line,t.ch+1));return/\bstring/.test(r.type)&&r.start==t.ch&&(0==t.ch||!/\bstring/.test(e.getTokenTypeAt(t)))}i(t.pairs+"`")}(n("VrN/"))},EQeY:function(e,t,n){"use strict";n("Oyvg"),n("V+eJ"),n("hHhE"),n("/SS/"),n("91GP"),n("rE2o"),n("ioFf"),n("rGqo"),n("yt8O"),n("Btvt"),n("XfO3"),n("EK0E"),n("HAE/"),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=function(e){if(e&&e.__esModule)return e;var t=h();if(t&&t.has(e))return t.get(e);var n={};if(null!=e){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var i=r?Object.getOwnPropertyDescriptor(e,a):null;i&&(i.get||i.set)?Object.defineProperty(n,a,i):n[a]=e[a]}}n.default=e,t&&t.set(e,n);return n}(n("q1tI")),a=p(n("TSYQ")),i=p(n("BGR+")),o=n("94VI"),s=p(n("Pbn2")),u=p(n("QG2g")),c=n("vgIT"),l=n("dANV"),d=p(n("aVg8")),f=p(n("ev5A"));function p(e){return e&&e.__esModule?e:{default:e}}function h(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return h=function(){return e},e}function g(e){return(g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function v(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function m(){return(m=Object.assign||function(e){for(var t=1;t=0;s--)(a=e[s])&&(o=(i<3?a(o):i>3?a(t,n,o):a(t,n))||o);return i>3&&o&&Object.defineProperty(t,n,o),o};!function(e){e[e.None=0]="None",e[e.Prepare=1]="Prepare"}(_||(_={}));var R=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=v(this,m(t).apply(this,arguments))).state={status:_.None,lastAffix:!1,prevTarget:null},e.getOffsetTop=function(){var t=e.props,n=t.offset,r=t.offsetBottom,a=e.props.offsetTop;return void 0===a&&(a=n,(0,l.default)(void 0===n,"Affix","`offset` is deprecated. Please use `offsetTop` instead.")),void 0===r&&void 0===a&&(a=0),a},e.getOffsetBottom=function(){return e.props.offsetBottom},e.savePlaceholderNode=function(t){e.placeholderNode=t},e.saveFixedNode=function(t){e.fixedNode=t},e.measure=function(){var t=e.state,n=t.status,r=t.lastAffix,a=e.props,i=a.target,o=a.onChange;if(n===_.Prepare&&e.fixedNode&&e.placeholderNode&&i){var s=e.getOffsetTop(),u=e.getOffsetBottom(),c=i();if(c){var l={status:_.None},f=(0,d.getTargetRect)(c),p=(0,d.getTargetRect)(e.placeholderNode),h=(0,d.getFixedTop)(p,f,s),g=(0,d.getFixedBottom)(p,f,u);void 0!==h?(l.affixStyle={position:"fixed",top:h,width:p.width,height:p.height},l.placeholderStyle={width:p.width,height:p.height}):void 0!==g&&(l.affixStyle={position:"fixed",bottom:g,width:p.width,height:p.height},l.placeholderStyle={width:p.width,height:p.height}),l.lastAffix=!!l.affixStyle,o&&r!==l.lastAffix&&o(l.lastAffix),e.setState(l)}}},e.prepareMeasure=function(){e.setState({status:_.Prepare,affixStyle:void 0,placeholderStyle:void 0})},e.renderAffix=function(t){var n,a,u,c=t.getPrefixCls,l=e.state,d=l.affixStyle,f=l.placeholderStyle,p=e.props,g=p.prefixCls,v=p.children,m=(0,i.default)((n={},a=c("affix",g),u=d,a in n?Object.defineProperty(n,a,{value:u,enumerable:!0,configurable:!0,writable:!0}):n[a]=u,n)),y=(0,o.default)(e.props,["prefixCls","offsetTop","offsetBottom","target","onChange"]);return r.createElement(s.default,{onResize:function(){e.updatePosition()}},r.createElement("div",h({},y,{ref:e.savePlaceholderNode}),d&&r.createElement("div",{style:f,"aria-hidden":"true"}),r.createElement("div",{className:m,ref:e.saveFixedNode,style:d},r.createElement(s.default,{onResize:function(){e.updatePosition()}},v))))},e}var n,a,c;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&y(e,t)}(t,e),n=t,(a=[{key:"componentDidMount",value:function(){var e=this,t=this.props.target;t&&(this.timeout=setTimeout((function(){(0,d.addObserveTarget)(t(),e),e.updatePosition()})))}},{key:"componentDidUpdate",value:function(e){var t=this.state.prevTarget,n=this.props.target,r=null;n&&(r=n()||null),t!==r&&((0,d.removeObserveTarget)(this),r&&((0,d.addObserveTarget)(r,this),this.updatePosition()),this.setState({prevTarget:r})),e.offsetTop===this.props.offsetTop&&e.offsetBottom===this.props.offsetBottom||this.updatePosition(),this.measure()}},{key:"componentWillUnmount",value:function(){clearTimeout(this.timeout),(0,d.removeObserveTarget)(this),this.updatePosition.cancel()}},{key:"updatePosition",value:function(){this.prepareMeasure()}},{key:"lazyUpdatePosition",value:function(){var e=this.props.target,t=this.state.affixStyle;if(e&&t){var n=this.getOffsetTop(),r=this.getOffsetBottom(),a=e();if(a){var i=(0,d.getTargetRect)(a),o=(0,d.getTargetRect)(this.placeholderNode),s=(0,d.getFixedTop)(o,i,n),u=(0,d.getFixedBottom)(o,i,r);if(void 0!==s&&t.top===s||void 0!==u&&t.bottom===u)return}}this.prepareMeasure()}},{key:"render",value:function(){return r.createElement(u.ConfigConsumer,null,this.renderAffix)}}])&&g(n.prototype,a),c&&g(n,c),t}(r.Component);R.defaultProps={target:function(){return"undefined"!=typeof window?window:null}},x([(0,c.throttleByAnimationFrameDecorator)()],R.prototype,"updatePosition",null),x([(0,c.throttleByAnimationFrameDecorator)()],R.prototype,"lazyUpdatePosition",null),(0,a.polyfill)(R);var w=R;t.default=w},EyBi:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.extent=function(e){var t=[1/0,1/0,-1/0,-1/0];return e.forEach((function(e){var n=e.coordinates;!function e(t,n){Array.isArray(n[0])?n.forEach((function(n){e(t,n)})):(t[0]>n[0]&&(t[0]=n[0]),t[1]>n[1]&&(t[1]=n[1]),t[2]180||e<-180)&&((e%=360)>180&&(e=-360+e),e<-180&&(e=360+e),0===e&&(e=0)),e}function o(e){if(null==e)throw new Error("lat is required");return(e>90||e<-90)&&((e%=180)>90&&(e=-180+e),e<-90&&(e=180+e),0===e&&(e=0)),e}function s(e,t){if(!1===t)return e;var n=i(e[0]),r=o(e[1]);return r>85&&(r=85),r<-85&&(r=-85),3===e.length?[n,r,e[2]]:[n,r]}},"F+2o":function(e,t,n){e.exports={default:n("2Nb0"),__esModule:!0}},"F/fo":function(e,t,n){"use strict";var r=n("VbXa");Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a,i,o=n("4cb6"),s=(a=n("iT+1"))&&a.__esModule?a:{default:a};var u=(0,o.injectable)()(i=function(e){function t(){return e.apply(this,arguments)||this}r(t,e);var n=t.prototype;return n.getName=function(){return"copy"},n.setupShaders=function(){return this.shaderModule.registerModule("copy-pass",{vs:"attribute vec2 a_Position;\n\nvarying vec2 v_UV;\n\nvoid main() {\n v_UV = 0.5 * (a_Position + 1.0);\n gl_Position = vec4(a_Position, 0., 1.);\n}",fs:"varying vec2 v_UV;\n\nuniform sampler2D u_Texture;\n\nvoid main() {\n gl_FragColor = vec4(texture2D(u_Texture, v_UV));\n}"}),this.shaderModule.getModule("copy-pass")},n.convertOptionsToUniforms=function(e){return{}},t}(s.default))||i;t.default=u},F0ff:function(e,t,n){var r=n("Wnyi"),a=n("9gHp"),i=n("msMc"),o=n("b/Vg");e.exports=r(a(["drop"],i,(function(e,t){return o(Math.max(0,e),1/0,t)})))},F3Iy:function(e,t,n){n("a1Th"),n("h7Nl"),n("Btvt"),e.exports=function(e){return"[object String]"===Object.prototype.toString.call(e)}},F7L5:function(e,t,n){"use strict";n("8+KV"),n("HAE/"),n("ioFf"),n("rGqo"),n("yt8O"),n("Btvt"),n("RW0V");var r=Object.keys,a=Object.getOwnPropertySymbols,i=Object.defineProperty,o=Object.getOwnPropertyDescriptor;e.exports=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),s=1;s0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,n=new u(e,t);return n.constructor=d,n.compile=l,n._call=void 0,n.call=void 0,n}d.prototype=null,e.exports=d},FGdI:function(e,t,n){"use strict";n("VEUW"),n("Ibq+")},FILD:function(e,t,n){},FJW5:function(e,t,n){var r=n("hswa"),a=n("y3w9"),i=n("DVgA");e.exports=n("nh4g")?Object.defineProperties:function(e,t){a(e);for(var n,o=i(t),s=o.length,u=0;s>u;)r.f(e,n=o[u++],t[n]);return e}},FLdU:function(e,t,n){"use strict";n.r(t);n("bWfx"),n("V+eJ"),n("hHhE");t.default=function(e){return e=e||Object.create(null),{on:function(t,n){(e[t]||(e[t]=[])).push(n)},off:function(t,n){e[t]&&e[t].splice(e[t].indexOf(n)>>>0,1)},emit:function(t,n){(e[t]||[]).slice().map((function(e){e(n)})),(e["*"]||[]).slice().map((function(e){e(t,n)}))}}}},FLlr:function(e,t,n){var r=n("XKFU");r(r.P,"String",{repeat:n("l0Rn")})},FQBR:function(e,t,n){"use strict";var r;function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n("HAE/");var i=n("5tHe"),o=n("6B8Y").typeSymbol;e.exports=(a(r={Error:i.Error,Ok:i.Ok,hasInstance:i.hasInstance,of:i.of,fromJSON:i.fromJSON},o,i[o]),a(r,"try",n("3DaA")),a(r,"fromNullable",(function(e,t){var r=n("LQ/9");return arguments.length>1?r(e,t):r(e)})),a(r,"fromValidation",(function(e){return n("b2+F")(e)})),a(r,"fromMaybe",(function(e,t){return n("dtAR")(e,t)})),r)},FV85:function(e,t,n){"use strict";n("HAE/"),Object.defineProperty(t,"__esModule",{value:!0});t.BindingScopeEnum={Request:"Request",Singleton:"Singleton",Transient:"Transient"};t.BindingTypeEnum={ConstantValue:"ConstantValue",Constructor:"Constructor",DynamicValue:"DynamicValue",Factory:"Factory",Function:"Function",Instance:"Instance",Invalid:"Invalid",Provider:"Provider"};t.TargetTypeEnum={ClassProperty:"ClassProperty",ConstructorArgument:"ConstructorArgument",Variable:"Variable"}},FYw3:function(e,t,n){"use strict";t.__esModule=!0;var r,a=n("EJiy"),i=(r=a)&&r.__esModule?r:{default:r};t.default=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==(void 0===t?"undefined":(0,i.default)(t))&&"function"!=typeof t?e:t}},Faen:function(e,t,n){"use strict";n.d(t,"a",(function(){return h}));var r=n("Y62N"),a=n("FmoU"),i=n("Uwo/"),o=-.14861,s=1.78277,u=-.29227,c=-.90649,l=1.97294,d=l*c,f=l*s,p=s*u-c*o;function h(e,t,n,r){return 1===arguments.length?function(e){if(e instanceof g)return new g(e.h,e.s,e.l,e.opacity);e instanceof a.b||(e=Object(a.h)(e));var t=e.r/255,n=e.g/255,r=e.b/255,o=(p*r+d*t-f*n)/(p+d-f),s=r-o,h=(l*(n-o)-u*s)/c,v=Math.sqrt(h*h+s*s)/(l*o*(1-o)),m=v?Math.atan2(h,s)*i.b-120:NaN;return new g(m<0?m+360:m,v,o,e.opacity)}(e):new g(e,t,n,null==r?1:r)}function g(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}Object(r.a)(g,h,Object(r.b)(a.a,{brighter:function(e){return e=null==e?a.c:Math.pow(a.c,e),new g(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?a.d:Math.pow(a.d,e),new g(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=isNaN(this.h)?0:(this.h+120)*i.a,t=+this.l,n=isNaN(this.s)?0:this.s*t*(1-t),r=Math.cos(e),d=Math.sin(e);return new a.b(255*(t+n*(o*r+s*d)),255*(t+n*(u*r+c*d)),255*(t+n*(l*r)),this.opacity)}}))},Faw5:function(e,t,n){n("7DDg")("Int16",2,(function(e){return function(t,n,r){return e(this,t,n,r)}}))},FbXp:function(e,t,n){"use strict";n("HAE/"),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=function(e){return!isNaN(parseFloat(e))&&isFinite(e)};t.default=r},Fcj4:function(e,t,n){"use strict";n("V+eJ"),n("HAE/"),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={MAC_ENTER:3,BACKSPACE:8,TAB:9,NUM_CENTER:12,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:44,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,QUESTION_MARK:63,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,META:91,WIN_KEY_RIGHT:92,CONTEXT_MENU:93,NUM_ZERO:96,NUM_ONE:97,NUM_TWO:98,NUM_THREE:99,NUM_FOUR:100,NUM_FIVE:101,NUM_SIX:102,NUM_SEVEN:103,NUM_EIGHT:104,NUM_NINE:105,NUM_MULTIPLY:106,NUM_PLUS:107,NUM_MINUS:109,NUM_PERIOD:110,NUM_DIVISION:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,NUMLOCK:144,SEMICOLON:186,DASH:189,EQUALS:187,COMMA:188,PERIOD:190,SLASH:191,APOSTROPHE:192,SINGLE_QUOTE:222,OPEN_SQUARE_BRACKET:219,BACKSLASH:220,CLOSE_SQUARE_BRACKET:221,WIN_KEY:224,MAC_FF_META:224,WIN_IME:229,isTextModifyingKeyEvent:function(e){var t=e.keyCode;if(e.altKey&&!e.ctrlKey||e.metaKey||t>=r.F1&&t<=r.F12)return!1;switch(t){case r.ALT:case r.CAPS_LOCK:case r.CONTEXT_MENU:case r.CTRL:case r.DOWN:case r.END:case r.ESC:case r.HOME:case r.INSERT:case r.LEFT:case r.MAC_FF_META:case r.META:case r.NUMLOCK:case r.NUM_CENTER:case r.PAGE_DOWN:case r.PAGE_UP:case r.PAUSE:case r.PRINT_SCREEN:case r.RIGHT:case r.SHIFT:case r.UP:case r.WIN_KEY:case r.WIN_KEY_RIGHT:return!1;default:return!0}},isCharacterKey:function(e){if(e>=r.ZERO&&e<=r.NINE)return!0;if(e>=r.NUM_ZERO&&e<=r.NUM_MULTIPLY)return!0;if(e>=r.A&&e<=r.Z)return!0;if(-1!==window.navigation.userAgent.indexOf("WebKit")&&0===e)return!0;switch(e){case r.SPACE:case r.QUESTION_MARK:case r.NUM_PLUS:case r.NUM_MINUS:case r.NUM_PERIOD:case r.NUM_DIVISION:case r.SEMICOLON:case r.DASH:case r.EQUALS:case r.COMMA:case r.PERIOD:case r.SLASH:case r.APOSTROPHE:case r.SINGLE_QUOTE:case r.OPEN_SQUARE_BRACKET:case r.BACKSLASH:case r.CLOSE_SQUARE_BRACKET:return!0;default:return!1}}},a=r;t.default=a},FlQf:function(e,t,n){"use strict";var r=n("ccE7")(!0);n("MPFp")(String,"String",(function(e){this._t=String(e),this._i=0}),(function(){var e,t=this._t,n=this._i;return n>=t.length?{value:void 0,done:!0}:(e=r(t,n),this._i+=e.length,{value:e,done:!1})}))},FlsD:function(e,t,n){var r=n("0/R4");n("Xtr8")("isExtensible",(function(e){return function(t){return!!r(t)&&(!e||e(t))}}))},FmoU:function(e,t,n){"use strict";n.d(t,"a",(function(){return a})),n.d(t,"d",(function(){return i})),n.d(t,"c",(function(){return o})),n.d(t,"e",(function(){return _})),n.d(t,"h",(function(){return w})),n.d(t,"g",(function(){return E})),n.d(t,"b",(function(){return S})),n.d(t,"f",(function(){return M}));n("a1Th"),n("h7Nl"),n("Btvt"),n("Tze0"),n("91GP"),n("Oyvg");var r=n("Y62N");function a(){}var i=.7,o=1/i,s="\\s*([+-]?\\d+)\\s*",u="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",c="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",l=/^#([0-9a-f]{3,8})$/,d=new RegExp("^rgb\\("+[s,s,s]+"\\)$"),f=new RegExp("^rgb\\("+[c,c,c]+"\\)$"),p=new RegExp("^rgba\\("+[s,s,s,u]+"\\)$"),h=new RegExp("^rgba\\("+[c,c,c,u]+"\\)$"),g=new RegExp("^hsl\\("+[u,c,c]+"\\)$"),v=new RegExp("^hsla\\("+[u,c,c,u]+"\\)$"),m={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function y(){return this.rgb().formatHex()}function b(){return this.rgb().formatRgb()}function _(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=l.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?x(t):3===n?new S(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?new S(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?new S(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=d.exec(e))?new S(t[1],t[2],t[3],1):(t=f.exec(e))?new S(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=p.exec(e))?R(t[1],t[2],t[3],t[4]):(t=h.exec(e))?R(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=g.exec(e))?C(t[1],t[2]/100,t[3]/100,1):(t=v.exec(e))?C(t[1],t[2]/100,t[3]/100,t[4]):m.hasOwnProperty(e)?x(m[e]):"transparent"===e?new S(NaN,NaN,NaN,0):null}function x(e){return new S(e>>16&255,e>>8&255,255&e,1)}function R(e,t,n,r){return r<=0&&(e=t=n=NaN),new S(e,t,n,r)}function w(e){return e instanceof a||(e=_(e)),e?new S((e=e.rgb()).r,e.g,e.b,e.opacity):new S}function E(e,t,n,r){return 1===arguments.length?w(e):new S(e,t,n,null==r?1:r)}function S(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function A(){return"#"+P(this.r)+P(this.g)+P(this.b)}function T(){var e=this.opacity;return(1===(e=isNaN(e)?1:Math.max(0,Math.min(1,e)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===e?")":", "+e+")")}function P(e){return((e=Math.max(0,Math.min(255,Math.round(e)||0)))<16?"0":"")+e.toString(16)}function C(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new k(e,t,n,r)}function O(e){if(e instanceof k)return new k(e.h,e.s,e.l,e.opacity);if(e instanceof a||(e=_(e)),!e)return new k;if(e instanceof k)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),o=Math.max(t,n,r),s=NaN,u=o-i,c=(o+i)/2;return u?(s=t===o?(n-r)/u+6*(n0&&c<1?0:s,new k(s,u,c,e.opacity)}function M(e,t,n,r){return 1===arguments.length?O(e):new k(e,t,n,null==r?1:r)}function k(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function D(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}Object(r.a)(a,_,{copy:function(e){return Object.assign(new this.constructor,this,e)},displayable:function(){return this.rgb().displayable()},hex:y,formatHex:y,formatHsl:function(){return O(this).formatHsl()},formatRgb:b,toString:b}),Object(r.a)(S,E,Object(r.b)(a,{brighter:function(e){return e=null==e?o:Math.pow(o,e),new S(this.r*e,this.g*e,this.b*e,this.opacity)},darker:function(e){return e=null==e?i:Math.pow(i,e),new S(this.r*e,this.g*e,this.b*e,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:A,formatHex:A,formatRgb:T,toString:T})),Object(r.a)(k,M,Object(r.b)(a,{brighter:function(e){return e=null==e?o:Math.pow(o,e),new k(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?i:Math.pow(i,e),new k(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,a=2*n-r;return new S(D(e>=240?e-240:e+120,a,r),D(e,a,r),D(e<120?e+240:e-120,a,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var e=this.opacity;return(1===(e=isNaN(e)?1:Math.max(0,Math.min(1,e)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===e?")":", "+e+")")}}))},FpHa:function(e,t){e.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},Fvdg:function(e,t,n){"use strict";n("bWfx"),n("hHhE"),n("/SS/"),n("LK8F"),n("HEwt"),n("a1Th"),n("h7Nl"),n("rE2o"),n("ioFf"),n("rGqo"),n("yt8O"),n("Btvt"),n("XfO3"),n("EK0E"),n("HAE/"),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e){if(e&&e.__esModule)return e;var t=o();if(t&&t.has(e))return t.get(e);var n={};if(null!=e){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var i=r?Object.getOwnPropertyDescriptor(e,a):null;i&&(i.get||i.set)?Object.defineProperty(n,a,i):n[a]=e[a]}}n.default=e,t&&t.set(e,n);return n}(n("q1tI")),i=(r=n("TSYQ"))&&r.__esModule?r:{default:r};function o(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return o=function(){return e},e}function s(e){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function u(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t=c)){s.next=11;break}return s.next=11,c;case 11:n=!0,s.next=6;break;case 14:s.next=20;break;case 16:s.prev=16,s.t0=s.catch(4),r=!0,a=s.t0;case 20:s.prev=20,s.prev=21,n||null==i.return||i.return();case 23:if(s.prev=23,!r){s.next=26;break}throw a;case 26:return s.finish(23);case 27:return s.finish(20);case 28:s.next=58;break;case 30:l=-1,d=!0,f=!1,p=void 0,s.prev=34,h=e[Symbol.iterator]();case 36:if(d=(g=h.next()).done){s.next=44;break}if(v=g.value,!(null!=(v=t(v,++l,e))&&(v=+v)>=v)){s.next=41;break}return s.next=41,v;case 41:d=!0,s.next=36;break;case 44:s.next=50;break;case 46:s.prev=46,s.t1=s.catch(34),f=!0,p=s.t1;case 50:s.prev=50,s.prev=51,d||null==h.return||h.return();case 53:if(s.prev=53,!f){s.next=56;break}throw p;case 56:return s.finish(53);case 57:return s.finish(50);case 58:case"end":return s.stop()}}),u,null,[[4,16,20,28],[21,,23,27],[34,46,50,58],[51,,53,57]])}function d(e,t,n){if(o=(e=Float64Array.from(l(e,n))).length){if((t=+t)<=0||o<2)return Object(a.a)(e);if(t>=1)return Object(r.a)(e);var o,s=(o-1)*t,u=Math.floor(s),c=Object(r.a)(Object(i.a)(e,u).subarray(0,u+1));return c+(Object(a.a)(e.subarray(u+1))-c)*(s-u)}}function f(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:c;if(r=e.length){if((t=+t)<=0||r<2)return+n(e[0],0,e);if(t>=1)return+n(e[r-1],r-1,e);var r,a=(r-1)*t,i=Math.floor(a),o=+n(e[i],i,e);return o+(+n(e[i+1],i+1,e)-o)*(a-i)}}n.d(t,"a",(function(){return d})),n.d(t,"b",(function(){return f}))},GXnB:function(e,t,n){"use strict";n("a1Th"),n("h7Nl"),n("Btvt"),n("HAE/"),Object.defineProperty(t,"__esModule",{value:!0});var r=n("xfSm"),a=function(){function e(e,t){this.key=e,this.value=t}return e.prototype.toString=function(){return this.key===r.NAMED_TAG?"named: "+this.value.toString()+" ":"tagged: { key:"+this.key.toString()+", value: "+this.value+" }"},e}();t.Metadata=a},GZEu:function(e,t,n){var r,a,i,o=n("m0Pp"),s=n("MfQN"),u=n("+rLv"),c=n("Iw71"),l=n("dyZX"),d=l.process,f=l.setImmediate,p=l.clearImmediate,h=l.MessageChannel,g=l.Dispatch,v=0,m={},y=function(){var e=+this;if(m.hasOwnProperty(e)){var t=m[e];delete m[e],t()}},b=function(e){y.call(e.data)};f&&p||(f=function(e){for(var t=[],n=1;arguments.length>n;)t.push(arguments[n++]);return m[++v]=function(){s("function"==typeof e?e:Function(e),t)},r(v),v},p=function(e){delete m[e]},"process"==n("LZWt")(d)?r=function(e){d.nextTick(o(y,e,1))}:g&&g.now?r=function(e){g.now(o(y,e,1))}:h?(i=(a=new h).port2,a.port1.onmessage=b,r=o(i.postMessage,i,1)):l.addEventListener&&"function"==typeof postMessage&&!l.importScripts?(r=function(e){l.postMessage(e+"","*")},l.addEventListener("message",b,!1)):r="onreadystatechange"in c("script")?function(e){u.appendChild(c("script")).onreadystatechange=function(){u.removeChild(this),y.call(e)}}:function(e){setTimeout(o(y,e,1),0)}),e.exports={set:f,clear:p}},GddB:function(e,t,n){window.scene=n("hs8S"),window.layers=n("/zp3")},GfB1:function(e,t,n){"use strict";n("Tze0"),n("KKXr");var r=3;e.exports=function(e){if("none"!=={}.FOLKTALE_ASSERTIONS){var t=new Error("").stack,n=void 0;if(t)n=t.split("\n")[r];n?console.warn(e+"\n Blame: "+n.trim()):console.warn(e)}}},GuhU:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a,i,o,s,u,c=n("IOcx"),l=n("4cb6"),d=n("ewr5"),f=n("Q7Ku"),p=n("4jdm");var h,g,v,m,y,b,_=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0],x=(r=(0,l.injectable)(),a=(0,l.inject)(d.TYPES.ICameraService),r((u=function(){function e(){var e,t,n,r;e=this,t="cameraService",r=this,(n=s)&&Object.defineProperty(e,t,{enumerable:n.enumerable,configurable:n.configurable,writable:n.writable,value:n.initializer?n.initializer.call(r):void 0}),this.coordinateSystem=void 0,this.viewportCenter=void 0,this.viewportCenterProjection=void 0,this.pixelsPerDegree=void 0,this.pixelsPerDegree2=void 0,this.pixelsPerMeter=void 0}var t=e.prototype;return t.refresh=function(){var e=this.cameraService.getZoom(),t=this.cameraService.getZoomScale(),n=this.cameraService.getCenter(),r=(0,f.getDistanceScales)({latitude:n[1],zoom:e}),a=r.pixelsPerMeter,i=r.pixelsPerDegree;this.viewportCenter=n,this.viewportCenterProjection=[0,0,0,0],this.pixelsPerMeter=a,this.pixelsPerDegree=i,this.pixelsPerDegree2=[0,0,0],this.coordinateSystem===p.CoordinateSystem.LNGLAT||this.coordinateSystem===p.CoordinateSystem.P20?this.cameraService.setViewProjectionMatrix(void 0):this.coordinateSystem===p.CoordinateSystem.LNGLAT_OFFSET?this.calculateLnglatOffset(n,e):this.coordinateSystem===p.CoordinateSystem.P20_OFFSET&&this.calculateLnglatOffset(n,e,t,!0)},t.getCoordinateSystem=function(){return this.coordinateSystem},t.setCoordinateSystem=function(e){this.coordinateSystem=e},t.getViewportCenter=function(){return this.viewportCenter},t.getViewportCenterProjection=function(){return this.viewportCenterProjection},t.getPixelsPerDegree=function(){return this.pixelsPerDegree},t.getPixelsPerDegree2=function(){return this.pixelsPerDegree2},t.getPixelsPerMeter=function(){return this.pixelsPerMeter},t.calculateLnglatOffset=function(e,t,n,r){var a=(0,f.getDistanceScales)({latitude:e[1],zoom:t,scale:n,flipY:r,highPrecision:!0}),i=a.pixelsPerMeter,o=a.pixelsPerDegree,s=a.pixelsPerDegree2,u=this.cameraService.getViewMatrix(),l=this.cameraService.getProjectionMatrix(),d=c.mat4.multiply([],l,u),p=this.cameraService.projectFlat([Math.fround(e[0]),Math.fround(e[1])],Math.pow(2,t));this.viewportCenterProjection=c.vec4.transformMat4([],[p[0],p[1],0,1],d),u=this.cameraService.getViewMatrixUncentered()||u,d=c.mat4.multiply([],l,u),d=c.mat4.multiply([],d,_),this.cameraService.setViewProjectionMatrix(d),this.pixelsPerMeter=i,this.pixelsPerDegree=o,this.pixelsPerDegree2=s},e}(),h=(o=u).prototype,g="cameraService",v=[a],m={configurable:!0,enumerable:!0,writable:!0,initializer:null},b={},Object.keys(m).forEach((function(e){b[e]=m[e]})),b.enumerable=!!b.enumerable,b.configurable=!!b.configurable,("value"in b||b.initializer)&&(b.writable=!0),b=v.slice().reverse().reduce((function(e,t){return t(h,g,e)||e}),b),y&&void 0!==b.initializer&&(b.value=b.initializer?b.initializer.call(y):void 0,b.initializer=void 0),void 0===b.initializer&&(Object.defineProperty(h,g,b),b=null),s=b,i=o))||i);t.default=x},Gytx:function(e,t,n){n("2Spj"),n("rGqo"),n("yt8O"),n("Btvt"),n("RW0V"),e.exports=function(e,t,n,r){var a=n?n.call(r,e,t):void 0;if(void 0!==a)return!!a;if(e===t)return!0;if("object"!=typeof e||!e||"object"!=typeof t||!t)return!1;var i=Object.keys(e),o=Object.keys(t);if(i.length!==o.length)return!1;for(var s=Object.prototype.hasOwnProperty.bind(t),u=0;u1?arguments[1]:void 0,v=void 0!==g,m=0,y=l(f);if(v&&(g=r(g,h>2?arguments[2]:void 0,2)),null==y||p==Array&&s(y))for(n=new p(t=u(f.length));t>m;m++)c(n,m,v?g(f[m],m):f[m]);else for(d=y.call(f),n=new p;!(a=d.next()).done;m++)c(n,m,v?o(d,g,[a.value,m],!0):a.value);return n.length=m,n}})},HJWE:function(e,t,n){"use strict";var r=n("RIqP");Object.defineProperty(t,"__esModule",{value:!0}),t.PointFillTriangulation=function(e){var t=e.coordinates;return{vertices:[].concat(r(t),r(t),r(t),r(t)),indices:[0,1,2,2,3,0],size:t.length}},t.PointExtrudeTriangulation=function(e){var t=function(e){if(l&&l[e])return l[e];var t=u.geometryShape[e]?u.geometryShape[e]():u.geometryShape.cylinder(),n=(0,s.default)([t]);return l[e]=n,n}(e.shape),n=t.positions,r=t.index;return{vertices:n,indices:r,normals:Array.from(d(n,r)),size:3}},t.PointImageTriangulation=function(e){var t=e.coordinates;return{vertices:r(t),indices:[0],size:t.length}},t.LineTriangulation=function(e){var t=e.coordinates,n=(0,o.default)(t,!1,0);return{vertices:n.attrPos,indices:n.attrIndex,normals:n.normals,size:5}},t.PolygonExtrudeTriangulation=function(e){var t=e.coordinates,n=(0,s.default)(t),r=n.positions,a=n.index;return{vertices:r,indices:a,normals:Array.from(d(r,a)),size:3}},t.HeatmapGridTriangulation=function(e){var t=function(e){var t=u.geometryShape[e]?u.geometryShape[e]():u.geometryShape.circle();return(0,s.fillPolygon)([t])}(e.shape),n=t.positions,r=t.index;return{vertices:n,indices:r,normals:Array.from(d(n,r)),size:3}},t.RasterImageTriangulation=function(e){var t=e.coordinates;return{vertices:[].concat(r(t[0]),[0,0,1,t[1][0],t[0][1],0,1,1],r(t[1]),[0,1,0],r(t[0]),[0,0,1],r(t[1]),[0,1,0,t[0][0],t[1][1],0,0,0]),indices:[0,1,2,3,4,5],size:5}},t.LineArcTriangulation=function(e){for(var t=e.coordinates,n=[],a=[],i=function(e){n.push(e,1,e,t[0][0],t[0][1],t[1][0],t[1][1],e,-1,e,t[0][0],t[0][1],t[1][0],t[1][1]),29!==e&&a.push.apply(a,r([0,1,2,1,3,2].map((function(t){return 2*e+t}))))},o=0;o<30;o++)i(o);return{vertices:n,indices:a,size:7}},t.HeatmapTriangulation=function(e){var t=e.coordinates;2===t.length&&t.push(0);e.size;var n=f(-1,1),a=f(1,1),i=f(-1,-1),o=f(1,-1);return{vertices:[].concat(r(t),r(n),r(t),r(i),r(t),r(o),r(t),r(a)),indices:[0,1,2,3,0,2],size:5}};var a,i=n("IOcx"),o=(a=n("h7d7"))&&a.__esModule?a:{default:a},s=function(e){if(e&&e.__esModule)return e;var t=c();if(t&&t.has(e))return t.get(e);var n={};if(null!=e){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var i=r?Object.getOwnPropertyDescriptor(e,a):null;i&&(i.get||i.set)?Object.defineProperty(n,a,i):n[a]=e[a]}}n.default=e,t&&t.set(e,n);return n}(n("T61M")),u=n("tQoc");function c(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return c=function(){return e},e}var l={};function d(e,t,n){void 0===n&&(n=3);for(var r,a,o,s=new Float32Array(e.length/n*3),u=i.vec3.create(),c=i.vec3.create(),l=i.vec3.create(),d=0,f=t.length;d1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;r||(r=document.createElement("textarea"),document.body.appendChild(r));e.getAttribute("wrap")?r.setAttribute("wrap",e.getAttribute("wrap")):r.removeAttribute("wrap");var o=s(e,t),u=o.paddingSize,c=o.borderSize,l=o.boxSizing,d=o.sizingStyle;r.setAttribute("style","".concat(d,";").concat(a)),r.value=e.value||e.placeholder||"";var f,p=Number.MIN_SAFE_INTEGER,h=Number.MAX_SAFE_INTEGER,g=r.scrollHeight;"border-box"===l?g+=c:"content-box"===l&&(g-=u);if(null!==n||null!==i){r.value=" ";var v=r.scrollHeight-u;null!==n&&(p=v*n,"border-box"===l&&(p=p+u+c),g=Math.max(p,g)),null!==i&&(h=v*i,"border-box"===l&&(h=h+u+c),f=g>h?"":"hidden",g=Math.min(h,g))}return{height:g,minHeight:p,maxHeight:h,overflowY:f}};var r,a="\n min-height:0 !important;\n max-height:none !important;\n height:0 !important;\n visibility:hidden !important;\n overflow:hidden !important;\n position:absolute !important;\n z-index:-1000 !important;\n top:0 !important;\n right:0 !important\n",i=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","font-variant","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing"],o={};function s(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=e.getAttribute("id")||e.getAttribute("data-reactid")||e.getAttribute("name");if(t&&o[n])return o[n];var r=window.getComputedStyle(e),a=r.getPropertyValue("box-sizing")||r.getPropertyValue("-moz-box-sizing")||r.getPropertyValue("-webkit-box-sizing"),s=parseFloat(r.getPropertyValue("padding-bottom"))+parseFloat(r.getPropertyValue("padding-top")),u=parseFloat(r.getPropertyValue("border-bottom-width"))+parseFloat(r.getPropertyValue("border-top-width")),c={sizingStyle:i.map((function(e){return"".concat(e,":").concat(r.getPropertyValue(e))})).join(";"),paddingSize:s,borderSize:u,boxSizing:a};return t&&n&&(o[n]=c),c}},I0ug:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return a}));n("V+eJ");var r=n("U8pU");function a(t){if("undefined"!=typeof window&&"object"===Object(r.a)(window.process)&&"renderer"===window.process.type)return!0;if(void 0!==e&&"object"===Object(r.a)(e.versions)&&Boolean(e.versions.electron))return!0;var n="object"===("undefined"==typeof navigator?"undefined":Object(r.a)(navigator))&&"string"==typeof navigator.userAgent&&navigator.userAgent,a=t||n;return!!(a&&a.indexOf("Electron")>=0)}}).call(this,n("8oxB"))},I6I4:function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.PositionType=void 0,t.PositionType=r,function(e){e.TOPRIGHT="topright",e.TOPLEFT="topleft",e.BOTTOMRIGHT="bottomright",e.BOTTOMLEFT="bottomleft"}(r||(t.PositionType=r={}))},I74W:function(e,t,n){"use strict";n("qncB")("trimLeft",(function(e){return function(){return e(this,1)}}),"trimStart")},"I8a+":function(e,t,n){var r=n("LZWt"),a=n("K0xU")("toStringTag"),i="Arguments"==r(function(){return arguments}());e.exports=function(e){var t,n,o;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(n){}}(t=Object(e),a))?n:i?r(t):"Object"==(o=r(t))&&"function"==typeof t.callee?"Arguments":o}},I9y7:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createRendererContainer=function(e){var t=document.getElementById(e);if(t){var n=document.createElement("div");return n.style.cssText+="\n position: absolute;\n top: 0;\n z-index:2;\n height: 100%;\n width: 100%;\n pointer-events: none;\n ",n.id="l7_canvaslayer",t.appendChild(n),n}return null},t.trim=a,t.splitWords=i,t.create=function(e,t,n){var r=document.createElement(e);r.className=t||"",n&&n.appendChild(r);return r},t.remove=function(e){var t=e.parentNode;t&&t.removeChild(e)},t.addClass=function(e,t){if(void 0!==e.classList)for(var n=i(t),r=0,a=n.length;r0&&new RegExp("(^|\\s)"+t+"(\\s|$)").test(n)}function s(e,t){e instanceof HTMLElement?e.className=t:e.className.baseVal=t}function u(e){return e instanceof SVGElement&&(e=e.correspondingElement),void 0===e.className.baseVal?e.className:e.className.baseVal}var c=function(e){if(!r)return e[0];for(var t in e)if(e[t]&&e[t]in r)return e[t];return e[0]}(["transform","WebkitTransform"])},INYr:function(e,t,n){"use strict";var r=n("XKFU"),a=n("CkkT")(6),i="findIndex",o=!0;i in[]&&Array(1)[i]((function(){o=!1})),r(r.P+r.F*o,"Array",{findIndex:function(e){return a(this,e,arguments.length>1?arguments[1]:void 0)}}),n("nGyu")(i)},IOVJ:function(e,t,n){"use strict";var r=n("284h"),a=n("TqRt");t.__esModule=!0,t.default=void 0;var i=a(n("pVnL")),o=a(n("VbXa")),s=r(n("q1tI")),u=a(n("17x9")),c=n("emEt"),l=n("xtsi"),d=function(e){function t(){return e.apply(this,arguments)||this}return(0,o.default)(t,e),t.prototype.render=function(){var e=(0,i.default)({},this.props,{pathContext:this.props.pageContext}),t=(0,l.apiRunner)("replaceComponentRenderer",{props:this.props,loader:c.publicLoader})[0]||(0,s.createElement)(this.props.pageResources.component,(0,i.default)({},e,{key:this.props.path||this.props.pageResources.page.path}));return(0,l.apiRunner)("wrapPageElement",{element:t,props:e},t,(function(t){return{element:t.result,props:e}})).pop()},t}(s.default.Component);d.propTypes={location:u.default.object.isRequired,pageResources:u.default.object.isRequired,data:u.default.object,pageContext:u.default.object.isRequired};var f=d;t.default=f},IOcx:function(e,t,n){"use strict";n.r(t);var r={};n.r(r),n.d(r,"create",(function(){return c})),n.d(r,"clone",(function(){return l})),n.d(r,"copy",(function(){return d})),n.d(r,"identity",(function(){return f})),n.d(r,"fromValues",(function(){return p})),n.d(r,"set",(function(){return h})),n.d(r,"transpose",(function(){return g})),n.d(r,"invert",(function(){return v})),n.d(r,"adjoint",(function(){return m})),n.d(r,"determinant",(function(){return y})),n.d(r,"multiply",(function(){return b})),n.d(r,"rotate",(function(){return _})),n.d(r,"scale",(function(){return x})),n.d(r,"fromRotation",(function(){return R})),n.d(r,"fromScaling",(function(){return w})),n.d(r,"str",(function(){return E})),n.d(r,"frob",(function(){return S})),n.d(r,"LDU",(function(){return A})),n.d(r,"add",(function(){return T})),n.d(r,"subtract",(function(){return P})),n.d(r,"exactEquals",(function(){return C})),n.d(r,"equals",(function(){return O})),n.d(r,"multiplyScalar",(function(){return M})),n.d(r,"multiplyScalarAndAdd",(function(){return k})),n.d(r,"mul",(function(){return D})),n.d(r,"sub",(function(){return I}));var a={};n.r(a),n.d(a,"create",(function(){return L})),n.d(a,"clone",(function(){return j})),n.d(a,"copy",(function(){return F})),n.d(a,"identity",(function(){return z})),n.d(a,"fromValues",(function(){return N})),n.d(a,"set",(function(){return B})),n.d(a,"invert",(function(){return V})),n.d(a,"determinant",(function(){return H})),n.d(a,"multiply",(function(){return U})),n.d(a,"rotate",(function(){return W})),n.d(a,"scale",(function(){return q})),n.d(a,"translate",(function(){return G})),n.d(a,"fromRotation",(function(){return K})),n.d(a,"fromScaling",(function(){return Y})),n.d(a,"fromTranslation",(function(){return X})),n.d(a,"str",(function(){return J})),n.d(a,"frob",(function(){return Z})),n.d(a,"add",(function(){return $})),n.d(a,"subtract",(function(){return Q})),n.d(a,"multiplyScalar",(function(){return ee})),n.d(a,"multiplyScalarAndAdd",(function(){return te})),n.d(a,"exactEquals",(function(){return ne})),n.d(a,"equals",(function(){return re})),n.d(a,"mul",(function(){return ae})),n.d(a,"sub",(function(){return ie}));var i={};n.r(i),n.d(i,"create",(function(){return oe})),n.d(i,"fromMat4",(function(){return se})),n.d(i,"clone",(function(){return ue})),n.d(i,"copy",(function(){return ce})),n.d(i,"fromValues",(function(){return le})),n.d(i,"set",(function(){return de})),n.d(i,"identity",(function(){return fe})),n.d(i,"transpose",(function(){return pe})),n.d(i,"invert",(function(){return he})),n.d(i,"adjoint",(function(){return ge})),n.d(i,"determinant",(function(){return ve})),n.d(i,"multiply",(function(){return me})),n.d(i,"translate",(function(){return ye})),n.d(i,"rotate",(function(){return be})),n.d(i,"scale",(function(){return _e})),n.d(i,"fromTranslation",(function(){return xe})),n.d(i,"fromRotation",(function(){return Re})),n.d(i,"fromScaling",(function(){return we})),n.d(i,"fromMat2d",(function(){return Ee})),n.d(i,"fromQuat",(function(){return Se})),n.d(i,"normalFromMat4",(function(){return Ae})),n.d(i,"projection",(function(){return Te})),n.d(i,"str",(function(){return Pe})),n.d(i,"frob",(function(){return Ce})),n.d(i,"add",(function(){return Oe})),n.d(i,"subtract",(function(){return Me})),n.d(i,"multiplyScalar",(function(){return ke})),n.d(i,"multiplyScalarAndAdd",(function(){return De})),n.d(i,"exactEquals",(function(){return Ie})),n.d(i,"equals",(function(){return Le})),n.d(i,"mul",(function(){return je})),n.d(i,"sub",(function(){return Fe}));var o={};n.r(o),n.d(o,"create",(function(){return Ve})),n.d(o,"identity",(function(){return He})),n.d(o,"setAxisAngle",(function(){return Ue})),n.d(o,"getAxisAngle",(function(){return We})),n.d(o,"getAngle",(function(){return qe})),n.d(o,"multiply",(function(){return Ge})),n.d(o,"rotateX",(function(){return Ke})),n.d(o,"rotateY",(function(){return Ye})),n.d(o,"rotateZ",(function(){return Xe})),n.d(o,"calculateW",(function(){return Je})),n.d(o,"exp",(function(){return Ze})),n.d(o,"ln",(function(){return $e})),n.d(o,"pow",(function(){return Qe})),n.d(o,"slerp",(function(){return et})),n.d(o,"random",(function(){return tt})),n.d(o,"invert",(function(){return nt})),n.d(o,"conjugate",(function(){return rt})),n.d(o,"fromMat3",(function(){return at})),n.d(o,"fromEuler",(function(){return it})),n.d(o,"str",(function(){return ot})),n.d(o,"clone",(function(){return pt})),n.d(o,"fromValues",(function(){return ht})),n.d(o,"copy",(function(){return gt})),n.d(o,"set",(function(){return vt})),n.d(o,"add",(function(){return mt})),n.d(o,"mul",(function(){return yt})),n.d(o,"scale",(function(){return bt})),n.d(o,"dot",(function(){return _t})),n.d(o,"lerp",(function(){return xt})),n.d(o,"length",(function(){return Rt})),n.d(o,"len",(function(){return wt})),n.d(o,"squaredLength",(function(){return Et})),n.d(o,"sqrLen",(function(){return St})),n.d(o,"normalize",(function(){return At})),n.d(o,"exactEquals",(function(){return Tt})),n.d(o,"equals",(function(){return Pt})),n.d(o,"rotationTo",(function(){return Ct})),n.d(o,"sqlerp",(function(){return Ot})),n.d(o,"setAxes",(function(){return Mt}));var s={};n.r(s),n.d(s,"create",(function(){return kt})),n.d(s,"clone",(function(){return Dt})),n.d(s,"fromValues",(function(){return It})),n.d(s,"fromRotationTranslationValues",(function(){return Lt})),n.d(s,"fromRotationTranslation",(function(){return jt})),n.d(s,"fromTranslation",(function(){return Ft})),n.d(s,"fromRotation",(function(){return zt})),n.d(s,"fromMat4",(function(){return Nt})),n.d(s,"copy",(function(){return Bt})),n.d(s,"identity",(function(){return Vt})),n.d(s,"set",(function(){return Ht})),n.d(s,"getReal",(function(){return Ut})),n.d(s,"getDual",(function(){return Wt})),n.d(s,"setReal",(function(){return qt})),n.d(s,"setDual",(function(){return Gt})),n.d(s,"getTranslation",(function(){return Kt})),n.d(s,"translate",(function(){return Yt})),n.d(s,"rotateX",(function(){return Xt})),n.d(s,"rotateY",(function(){return Jt})),n.d(s,"rotateZ",(function(){return Zt})),n.d(s,"rotateByQuatAppend",(function(){return $t})),n.d(s,"rotateByQuatPrepend",(function(){return Qt})),n.d(s,"rotateAroundAxis",(function(){return en})),n.d(s,"add",(function(){return tn})),n.d(s,"multiply",(function(){return nn})),n.d(s,"mul",(function(){return rn})),n.d(s,"scale",(function(){return an})),n.d(s,"dot",(function(){return on})),n.d(s,"lerp",(function(){return sn})),n.d(s,"invert",(function(){return un})),n.d(s,"conjugate",(function(){return cn})),n.d(s,"length",(function(){return ln})),n.d(s,"len",(function(){return dn})),n.d(s,"squaredLength",(function(){return fn})),n.d(s,"sqrLen",(function(){return pn})),n.d(s,"normalize",(function(){return hn})),n.d(s,"str",(function(){return gn})),n.d(s,"exactEquals",(function(){return vn})),n.d(s,"equals",(function(){return mn}));var u=n("yU0y");n("x8ZO"),n("Y9lz");function c(){var e=new u.ARRAY_TYPE(4);return u.ARRAY_TYPE!=Float32Array&&(e[1]=0,e[2]=0),e[0]=1,e[3]=1,e}function l(e){var t=new u.ARRAY_TYPE(4);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}function d(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}function f(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=1,e}function p(e,t,n,r){var a=new u.ARRAY_TYPE(4);return a[0]=e,a[1]=t,a[2]=n,a[3]=r,a}function h(e,t,n,r,a){return e[0]=t,e[1]=n,e[2]=r,e[3]=a,e}function g(e,t){if(e===t){var n=t[1];e[1]=t[2],e[2]=n}else e[0]=t[0],e[1]=t[2],e[2]=t[1],e[3]=t[3];return e}function v(e,t){var n=t[0],r=t[1],a=t[2],i=t[3],o=n*i-a*r;return o?(o=1/o,e[0]=i*o,e[1]=-r*o,e[2]=-a*o,e[3]=n*o,e):null}function m(e,t){var n=t[0];return e[0]=t[3],e[1]=-t[1],e[2]=-t[2],e[3]=n,e}function y(e){return e[0]*e[3]-e[2]*e[1]}function b(e,t,n){var r=t[0],a=t[1],i=t[2],o=t[3],s=n[0],u=n[1],c=n[2],l=n[3];return e[0]=r*s+i*u,e[1]=a*s+o*u,e[2]=r*c+i*l,e[3]=a*c+o*l,e}function _(e,t,n){var r=t[0],a=t[1],i=t[2],o=t[3],s=Math.sin(n),u=Math.cos(n);return e[0]=r*u+i*s,e[1]=a*u+o*s,e[2]=r*-s+i*u,e[3]=a*-s+o*u,e}function x(e,t,n){var r=t[0],a=t[1],i=t[2],o=t[3],s=n[0],u=n[1];return e[0]=r*s,e[1]=a*s,e[2]=i*u,e[3]=o*u,e}function R(e,t){var n=Math.sin(t),r=Math.cos(t);return e[0]=r,e[1]=n,e[2]=-n,e[3]=r,e}function w(e,t){return e[0]=t[0],e[1]=0,e[2]=0,e[3]=t[1],e}function E(e){return"mat2("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+")"}function S(e){return Math.hypot(e[0],e[1],e[2],e[3])}function A(e,t,n,r){return e[2]=r[2]/r[0],n[0]=r[0],n[1]=r[1],n[3]=r[3]-e[2]*n[1],[e,t,n]}function T(e,t,n){return e[0]=t[0]+n[0],e[1]=t[1]+n[1],e[2]=t[2]+n[2],e[3]=t[3]+n[3],e}function P(e,t,n){return e[0]=t[0]-n[0],e[1]=t[1]-n[1],e[2]=t[2]-n[2],e[3]=t[3]-n[3],e}function C(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]}function O(e,t){var n=e[0],r=e[1],a=e[2],i=e[3],o=t[0],s=t[1],c=t[2],l=t[3];return Math.abs(n-o)<=u.EPSILON*Math.max(1,Math.abs(n),Math.abs(o))&&Math.abs(r-s)<=u.EPSILON*Math.max(1,Math.abs(r),Math.abs(s))&&Math.abs(a-c)<=u.EPSILON*Math.max(1,Math.abs(a),Math.abs(c))&&Math.abs(i-l)<=u.EPSILON*Math.max(1,Math.abs(i),Math.abs(l))}function M(e,t,n){return e[0]=t[0]*n,e[1]=t[1]*n,e[2]=t[2]*n,e[3]=t[3]*n,e}function k(e,t,n,r){return e[0]=t[0]+n[0]*r,e[1]=t[1]+n[1]*r,e[2]=t[2]+n[2]*r,e[3]=t[3]+n[3]*r,e}var D=b,I=P;function L(){var e=new u.ARRAY_TYPE(6);return u.ARRAY_TYPE!=Float32Array&&(e[1]=0,e[2]=0,e[4]=0,e[5]=0),e[0]=1,e[3]=1,e}function j(e){var t=new u.ARRAY_TYPE(6);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t}function F(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}function z(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=1,e[4]=0,e[5]=0,e}function N(e,t,n,r,a,i){var o=new u.ARRAY_TYPE(6);return o[0]=e,o[1]=t,o[2]=n,o[3]=r,o[4]=a,o[5]=i,o}function B(e,t,n,r,a,i,o){return e[0]=t,e[1]=n,e[2]=r,e[3]=a,e[4]=i,e[5]=o,e}function V(e,t){var n=t[0],r=t[1],a=t[2],i=t[3],o=t[4],s=t[5],u=n*i-r*a;return u?(u=1/u,e[0]=i*u,e[1]=-r*u,e[2]=-a*u,e[3]=n*u,e[4]=(a*s-i*o)*u,e[5]=(r*o-n*s)*u,e):null}function H(e){return e[0]*e[3]-e[1]*e[2]}function U(e,t,n){var r=t[0],a=t[1],i=t[2],o=t[3],s=t[4],u=t[5],c=n[0],l=n[1],d=n[2],f=n[3],p=n[4],h=n[5];return e[0]=r*c+i*l,e[1]=a*c+o*l,e[2]=r*d+i*f,e[3]=a*d+o*f,e[4]=r*p+i*h+s,e[5]=a*p+o*h+u,e}function W(e,t,n){var r=t[0],a=t[1],i=t[2],o=t[3],s=t[4],u=t[5],c=Math.sin(n),l=Math.cos(n);return e[0]=r*l+i*c,e[1]=a*l+o*c,e[2]=r*-c+i*l,e[3]=a*-c+o*l,e[4]=s,e[5]=u,e}function q(e,t,n){var r=t[0],a=t[1],i=t[2],o=t[3],s=t[4],u=t[5],c=n[0],l=n[1];return e[0]=r*c,e[1]=a*c,e[2]=i*l,e[3]=o*l,e[4]=s,e[5]=u,e}function G(e,t,n){var r=t[0],a=t[1],i=t[2],o=t[3],s=t[4],u=t[5],c=n[0],l=n[1];return e[0]=r,e[1]=a,e[2]=i,e[3]=o,e[4]=r*c+i*l+s,e[5]=a*c+o*l+u,e}function K(e,t){var n=Math.sin(t),r=Math.cos(t);return e[0]=r,e[1]=n,e[2]=-n,e[3]=r,e[4]=0,e[5]=0,e}function Y(e,t){return e[0]=t[0],e[1]=0,e[2]=0,e[3]=t[1],e[4]=0,e[5]=0,e}function X(e,t){return e[0]=1,e[1]=0,e[2]=0,e[3]=1,e[4]=t[0],e[5]=t[1],e}function J(e){return"mat2d("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+", "+e[4]+", "+e[5]+")"}function Z(e){return Math.hypot(e[0],e[1],e[2],e[3],e[4],e[5],1)}function $(e,t,n){return e[0]=t[0]+n[0],e[1]=t[1]+n[1],e[2]=t[2]+n[2],e[3]=t[3]+n[3],e[4]=t[4]+n[4],e[5]=t[5]+n[5],e}function Q(e,t,n){return e[0]=t[0]-n[0],e[1]=t[1]-n[1],e[2]=t[2]-n[2],e[3]=t[3]-n[3],e[4]=t[4]-n[4],e[5]=t[5]-n[5],e}function ee(e,t,n){return e[0]=t[0]*n,e[1]=t[1]*n,e[2]=t[2]*n,e[3]=t[3]*n,e[4]=t[4]*n,e[5]=t[5]*n,e}function te(e,t,n,r){return e[0]=t[0]+n[0]*r,e[1]=t[1]+n[1]*r,e[2]=t[2]+n[2]*r,e[3]=t[3]+n[3]*r,e[4]=t[4]+n[4]*r,e[5]=t[5]+n[5]*r,e}function ne(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]&&e[4]===t[4]&&e[5]===t[5]}function re(e,t){var n=e[0],r=e[1],a=e[2],i=e[3],o=e[4],s=e[5],c=t[0],l=t[1],d=t[2],f=t[3],p=t[4],h=t[5];return Math.abs(n-c)<=u.EPSILON*Math.max(1,Math.abs(n),Math.abs(c))&&Math.abs(r-l)<=u.EPSILON*Math.max(1,Math.abs(r),Math.abs(l))&&Math.abs(a-d)<=u.EPSILON*Math.max(1,Math.abs(a),Math.abs(d))&&Math.abs(i-f)<=u.EPSILON*Math.max(1,Math.abs(i),Math.abs(f))&&Math.abs(o-p)<=u.EPSILON*Math.max(1,Math.abs(o),Math.abs(p))&&Math.abs(s-h)<=u.EPSILON*Math.max(1,Math.abs(s),Math.abs(h))}var ae=U,ie=Q;function oe(){var e=new u.ARRAY_TYPE(9);return u.ARRAY_TYPE!=Float32Array&&(e[1]=0,e[2]=0,e[3]=0,e[5]=0,e[6]=0,e[7]=0),e[0]=1,e[4]=1,e[8]=1,e}function se(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[4],e[4]=t[5],e[5]=t[6],e[6]=t[8],e[7]=t[9],e[8]=t[10],e}function ue(e){var t=new u.ARRAY_TYPE(9);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t}function ce(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e}function le(e,t,n,r,a,i,o,s,c){var l=new u.ARRAY_TYPE(9);return l[0]=e,l[1]=t,l[2]=n,l[3]=r,l[4]=a,l[5]=i,l[6]=o,l[7]=s,l[8]=c,l}function de(e,t,n,r,a,i,o,s,u,c){return e[0]=t,e[1]=n,e[2]=r,e[3]=a,e[4]=i,e[5]=o,e[6]=s,e[7]=u,e[8]=c,e}function fe(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=1,e[5]=0,e[6]=0,e[7]=0,e[8]=1,e}function pe(e,t){if(e===t){var n=t[1],r=t[2],a=t[5];e[1]=t[3],e[2]=t[6],e[3]=n,e[5]=t[7],e[6]=r,e[7]=a}else e[0]=t[0],e[1]=t[3],e[2]=t[6],e[3]=t[1],e[4]=t[4],e[5]=t[7],e[6]=t[2],e[7]=t[5],e[8]=t[8];return e}function he(e,t){var n=t[0],r=t[1],a=t[2],i=t[3],o=t[4],s=t[5],u=t[6],c=t[7],l=t[8],d=l*o-s*c,f=-l*i+s*u,p=c*i-o*u,h=n*d+r*f+a*p;return h?(h=1/h,e[0]=d*h,e[1]=(-l*r+a*c)*h,e[2]=(s*r-a*o)*h,e[3]=f*h,e[4]=(l*n-a*u)*h,e[5]=(-s*n+a*i)*h,e[6]=p*h,e[7]=(-c*n+r*u)*h,e[8]=(o*n-r*i)*h,e):null}function ge(e,t){var n=t[0],r=t[1],a=t[2],i=t[3],o=t[4],s=t[5],u=t[6],c=t[7],l=t[8];return e[0]=o*l-s*c,e[1]=a*c-r*l,e[2]=r*s-a*o,e[3]=s*u-i*l,e[4]=n*l-a*u,e[5]=a*i-n*s,e[6]=i*c-o*u,e[7]=r*u-n*c,e[8]=n*o-r*i,e}function ve(e){var t=e[0],n=e[1],r=e[2],a=e[3],i=e[4],o=e[5],s=e[6],u=e[7],c=e[8];return t*(c*i-o*u)+n*(-c*a+o*s)+r*(u*a-i*s)}function me(e,t,n){var r=t[0],a=t[1],i=t[2],o=t[3],s=t[4],u=t[5],c=t[6],l=t[7],d=t[8],f=n[0],p=n[1],h=n[2],g=n[3],v=n[4],m=n[5],y=n[6],b=n[7],_=n[8];return e[0]=f*r+p*o+h*c,e[1]=f*a+p*s+h*l,e[2]=f*i+p*u+h*d,e[3]=g*r+v*o+m*c,e[4]=g*a+v*s+m*l,e[5]=g*i+v*u+m*d,e[6]=y*r+b*o+_*c,e[7]=y*a+b*s+_*l,e[8]=y*i+b*u+_*d,e}function ye(e,t,n){var r=t[0],a=t[1],i=t[2],o=t[3],s=t[4],u=t[5],c=t[6],l=t[7],d=t[8],f=n[0],p=n[1];return e[0]=r,e[1]=a,e[2]=i,e[3]=o,e[4]=s,e[5]=u,e[6]=f*r+p*o+c,e[7]=f*a+p*s+l,e[8]=f*i+p*u+d,e}function be(e,t,n){var r=t[0],a=t[1],i=t[2],o=t[3],s=t[4],u=t[5],c=t[6],l=t[7],d=t[8],f=Math.sin(n),p=Math.cos(n);return e[0]=p*r+f*o,e[1]=p*a+f*s,e[2]=p*i+f*u,e[3]=p*o-f*r,e[4]=p*s-f*a,e[5]=p*u-f*i,e[6]=c,e[7]=l,e[8]=d,e}function _e(e,t,n){var r=n[0],a=n[1];return e[0]=r*t[0],e[1]=r*t[1],e[2]=r*t[2],e[3]=a*t[3],e[4]=a*t[4],e[5]=a*t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e}function xe(e,t){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=1,e[5]=0,e[6]=t[0],e[7]=t[1],e[8]=1,e}function Re(e,t){var n=Math.sin(t),r=Math.cos(t);return e[0]=r,e[1]=n,e[2]=0,e[3]=-n,e[4]=r,e[5]=0,e[6]=0,e[7]=0,e[8]=1,e}function we(e,t){return e[0]=t[0],e[1]=0,e[2]=0,e[3]=0,e[4]=t[1],e[5]=0,e[6]=0,e[7]=0,e[8]=1,e}function Ee(e,t){return e[0]=t[0],e[1]=t[1],e[2]=0,e[3]=t[2],e[4]=t[3],e[5]=0,e[6]=t[4],e[7]=t[5],e[8]=1,e}function Se(e,t){var n=t[0],r=t[1],a=t[2],i=t[3],o=n+n,s=r+r,u=a+a,c=n*o,l=r*o,d=r*s,f=a*o,p=a*s,h=a*u,g=i*o,v=i*s,m=i*u;return e[0]=1-d-h,e[3]=l-m,e[6]=f+v,e[1]=l+m,e[4]=1-c-h,e[7]=p-g,e[2]=f-v,e[5]=p+g,e[8]=1-c-d,e}function Ae(e,t){var n=t[0],r=t[1],a=t[2],i=t[3],o=t[4],s=t[5],u=t[6],c=t[7],l=t[8],d=t[9],f=t[10],p=t[11],h=t[12],g=t[13],v=t[14],m=t[15],y=n*s-r*o,b=n*u-a*o,_=n*c-i*o,x=r*u-a*s,R=r*c-i*s,w=a*c-i*u,E=l*g-d*h,S=l*v-f*h,A=l*m-p*h,T=d*v-f*g,P=d*m-p*g,C=f*m-p*v,O=y*C-b*P+_*T+x*A-R*S+w*E;return O?(O=1/O,e[0]=(s*C-u*P+c*T)*O,e[1]=(u*A-o*C-c*S)*O,e[2]=(o*P-s*A+c*E)*O,e[3]=(a*P-r*C-i*T)*O,e[4]=(n*C-a*A+i*S)*O,e[5]=(r*A-n*P-i*E)*O,e[6]=(g*w-v*R+m*x)*O,e[7]=(v*_-h*w-m*b)*O,e[8]=(h*R-g*_+m*y)*O,e):null}function Te(e,t,n){return e[0]=2/t,e[1]=0,e[2]=0,e[3]=0,e[4]=-2/n,e[5]=0,e[6]=-1,e[7]=1,e[8]=1,e}function Pe(e){return"mat3("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+", "+e[4]+", "+e[5]+", "+e[6]+", "+e[7]+", "+e[8]+")"}function Ce(e){return Math.hypot(e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8])}function Oe(e,t,n){return e[0]=t[0]+n[0],e[1]=t[1]+n[1],e[2]=t[2]+n[2],e[3]=t[3]+n[3],e[4]=t[4]+n[4],e[5]=t[5]+n[5],e[6]=t[6]+n[6],e[7]=t[7]+n[7],e[8]=t[8]+n[8],e}function Me(e,t,n){return e[0]=t[0]-n[0],e[1]=t[1]-n[1],e[2]=t[2]-n[2],e[3]=t[3]-n[3],e[4]=t[4]-n[4],e[5]=t[5]-n[5],e[6]=t[6]-n[6],e[7]=t[7]-n[7],e[8]=t[8]-n[8],e}function ke(e,t,n){return e[0]=t[0]*n,e[1]=t[1]*n,e[2]=t[2]*n,e[3]=t[3]*n,e[4]=t[4]*n,e[5]=t[5]*n,e[6]=t[6]*n,e[7]=t[7]*n,e[8]=t[8]*n,e}function De(e,t,n,r){return e[0]=t[0]+n[0]*r,e[1]=t[1]+n[1]*r,e[2]=t[2]+n[2]*r,e[3]=t[3]+n[3]*r,e[4]=t[4]+n[4]*r,e[5]=t[5]+n[5]*r,e[6]=t[6]+n[6]*r,e[7]=t[7]+n[7]*r,e[8]=t[8]+n[8]*r,e}function Ie(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]&&e[4]===t[4]&&e[5]===t[5]&&e[6]===t[6]&&e[7]===t[7]&&e[8]===t[8]}function Le(e,t){var n=e[0],r=e[1],a=e[2],i=e[3],o=e[4],s=e[5],c=e[6],l=e[7],d=e[8],f=t[0],p=t[1],h=t[2],g=t[3],v=t[4],m=t[5],y=t[6],b=t[7],_=t[8];return Math.abs(n-f)<=u.EPSILON*Math.max(1,Math.abs(n),Math.abs(f))&&Math.abs(r-p)<=u.EPSILON*Math.max(1,Math.abs(r),Math.abs(p))&&Math.abs(a-h)<=u.EPSILON*Math.max(1,Math.abs(a),Math.abs(h))&&Math.abs(i-g)<=u.EPSILON*Math.max(1,Math.abs(i),Math.abs(g))&&Math.abs(o-v)<=u.EPSILON*Math.max(1,Math.abs(o),Math.abs(v))&&Math.abs(s-m)<=u.EPSILON*Math.max(1,Math.abs(s),Math.abs(m))&&Math.abs(c-y)<=u.EPSILON*Math.max(1,Math.abs(c),Math.abs(y))&&Math.abs(l-b)<=u.EPSILON*Math.max(1,Math.abs(l),Math.abs(b))&&Math.abs(d-_)<=u.EPSILON*Math.max(1,Math.abs(d),Math.abs(_))}var je=me,Fe=Me,ze=n("ZaHm"),Ne=n("n+fv"),Be=n("bl9R");function Ve(){var e=new u.ARRAY_TYPE(4);return u.ARRAY_TYPE!=Float32Array&&(e[0]=0,e[1]=0,e[2]=0),e[3]=1,e}function He(e){return e[0]=0,e[1]=0,e[2]=0,e[3]=1,e}function Ue(e,t,n){n*=.5;var r=Math.sin(n);return e[0]=r*t[0],e[1]=r*t[1],e[2]=r*t[2],e[3]=Math.cos(n),e}function We(e,t){var n=2*Math.acos(t[3]),r=Math.sin(n/2);return r>u.EPSILON?(e[0]=t[0]/r,e[1]=t[1]/r,e[2]=t[2]/r):(e[0]=1,e[1]=0,e[2]=0),n}function qe(e,t){var n=_t(e,t);return Math.acos(2*n*n-1)}function Ge(e,t,n){var r=t[0],a=t[1],i=t[2],o=t[3],s=n[0],u=n[1],c=n[2],l=n[3];return e[0]=r*l+o*s+a*c-i*u,e[1]=a*l+o*u+i*s-r*c,e[2]=i*l+o*c+r*u-a*s,e[3]=o*l-r*s-a*u-i*c,e}function Ke(e,t,n){n*=.5;var r=t[0],a=t[1],i=t[2],o=t[3],s=Math.sin(n),u=Math.cos(n);return e[0]=r*u+o*s,e[1]=a*u+i*s,e[2]=i*u-a*s,e[3]=o*u-r*s,e}function Ye(e,t,n){n*=.5;var r=t[0],a=t[1],i=t[2],o=t[3],s=Math.sin(n),u=Math.cos(n);return e[0]=r*u-i*s,e[1]=a*u+o*s,e[2]=i*u+r*s,e[3]=o*u-a*s,e}function Xe(e,t,n){n*=.5;var r=t[0],a=t[1],i=t[2],o=t[3],s=Math.sin(n),u=Math.cos(n);return e[0]=r*u+a*s,e[1]=a*u-r*s,e[2]=i*u+o*s,e[3]=o*u-i*s,e}function Je(e,t){var n=t[0],r=t[1],a=t[2];return e[0]=n,e[1]=r,e[2]=a,e[3]=Math.sqrt(Math.abs(1-n*n-r*r-a*a)),e}function Ze(e,t){var n=t[0],r=t[1],a=t[2],i=t[3],o=Math.sqrt(n*n+r*r+a*a),s=Math.exp(i),u=o>0?s*Math.sin(o)/o:0;return e[0]=n*u,e[1]=r*u,e[2]=a*u,e[3]=s*Math.cos(o),e}function $e(e,t){var n=t[0],r=t[1],a=t[2],i=t[3],o=Math.sqrt(n*n+r*r+a*a),s=o>0?Math.atan2(o,i)/o:0;return e[0]=n*s,e[1]=r*s,e[2]=a*s,e[3]=.5*Math.log(n*n+r*r+a*a+i*i),e}function Qe(e,t,n){return $e(e,t),bt(e,e,n),Ze(e,e),e}function et(e,t,n,r){var a,i,o,s,c,l=t[0],d=t[1],f=t[2],p=t[3],h=n[0],g=n[1],v=n[2],m=n[3];return(i=l*h+d*g+f*v+p*m)<0&&(i=-i,h=-h,g=-g,v=-v,m=-m),1-i>u.EPSILON?(a=Math.acos(i),o=Math.sin(a),s=Math.sin((1-r)*a)/o,c=Math.sin(r*a)/o):(s=1-r,c=r),e[0]=s*l+c*h,e[1]=s*d+c*g,e[2]=s*f+c*v,e[3]=s*p+c*m,e}function tt(e){var t=u.RANDOM(),n=u.RANDOM(),r=u.RANDOM(),a=Math.sqrt(1-t),i=Math.sqrt(t);return e[0]=a*Math.sin(2*Math.PI*n),e[1]=a*Math.cos(2*Math.PI*n),e[2]=i*Math.sin(2*Math.PI*r),e[3]=i*Math.cos(2*Math.PI*r),e}function nt(e,t){var n=t[0],r=t[1],a=t[2],i=t[3],o=n*n+r*r+a*a+i*i,s=o?1/o:0;return e[0]=-n*s,e[1]=-r*s,e[2]=-a*s,e[3]=i*s,e}function rt(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e[3]=t[3],e}function at(e,t){var n,r=t[0]+t[4]+t[8];if(r>0)n=Math.sqrt(r+1),e[3]=.5*n,n=.5/n,e[0]=(t[5]-t[7])*n,e[1]=(t[6]-t[2])*n,e[2]=(t[1]-t[3])*n;else{var a=0;t[4]>t[0]&&(a=1),t[8]>t[3*a+a]&&(a=2);var i=(a+1)%3,o=(a+2)%3;n=Math.sqrt(t[3*a+a]-t[3*i+i]-t[3*o+o]+1),e[a]=.5*n,n=.5/n,e[3]=(t[3*i+o]-t[3*o+i])*n,e[i]=(t[3*i+a]+t[3*a+i])*n,e[o]=(t[3*o+a]+t[3*a+o])*n}return e}function it(e,t,n,r){var a=.5*Math.PI/180;t*=a,n*=a,r*=a;var i=Math.sin(t),o=Math.cos(t),s=Math.sin(n),u=Math.cos(n),c=Math.sin(r),l=Math.cos(r);return e[0]=i*u*l-o*s*c,e[1]=o*s*l+i*u*c,e[2]=o*u*c-i*s*l,e[3]=o*u*l+i*s*c,e}function ot(e){return"quat("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+")"}var st,ut,ct,lt,dt,ft,pt=Be.clone,ht=Be.fromValues,gt=Be.copy,vt=Be.set,mt=Be.add,yt=Ge,bt=Be.scale,_t=Be.dot,xt=Be.lerp,Rt=Be.length,wt=Rt,Et=Be.squaredLength,St=Et,At=Be.normalize,Tt=Be.exactEquals,Pt=Be.equals,Ct=(st=Ne.create(),ut=Ne.fromValues(1,0,0),ct=Ne.fromValues(0,1,0),function(e,t,n){var r=Ne.dot(t,n);return r<-.999999?(Ne.cross(st,ut,t),Ne.len(st)<1e-6&&Ne.cross(st,ct,t),Ne.normalize(st,st),Ue(e,st,Math.PI),e):r>.999999?(e[0]=0,e[1]=0,e[2]=0,e[3]=1,e):(Ne.cross(st,t,n),e[0]=st[0],e[1]=st[1],e[2]=st[2],e[3]=1+r,At(e,e))}),Ot=(lt=Ve(),dt=Ve(),function(e,t,n,r,a,i){return et(lt,t,a,i),et(dt,n,r,i),et(e,lt,dt,2*i*(1-i)),e}),Mt=(ft=oe(),function(e,t,n,r){return ft[0]=n[0],ft[3]=n[1],ft[6]=n[2],ft[1]=r[0],ft[4]=r[1],ft[7]=r[2],ft[2]=-t[0],ft[5]=-t[1],ft[8]=-t[2],At(e,at(e,ft))});function kt(){var e=new u.ARRAY_TYPE(8);return u.ARRAY_TYPE!=Float32Array&&(e[0]=0,e[1]=0,e[2]=0,e[4]=0,e[5]=0,e[6]=0,e[7]=0),e[3]=1,e}function Dt(e){var t=new u.ARRAY_TYPE(8);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t}function It(e,t,n,r,a,i,o,s){var c=new u.ARRAY_TYPE(8);return c[0]=e,c[1]=t,c[2]=n,c[3]=r,c[4]=a,c[5]=i,c[6]=o,c[7]=s,c}function Lt(e,t,n,r,a,i,o){var s=new u.ARRAY_TYPE(8);s[0]=e,s[1]=t,s[2]=n,s[3]=r;var c=.5*a,l=.5*i,d=.5*o;return s[4]=c*r+l*n-d*t,s[5]=l*r+d*e-c*n,s[6]=d*r+c*t-l*e,s[7]=-c*e-l*t-d*n,s}function jt(e,t,n){var r=.5*n[0],a=.5*n[1],i=.5*n[2],o=t[0],s=t[1],u=t[2],c=t[3];return e[0]=o,e[1]=s,e[2]=u,e[3]=c,e[4]=r*c+a*u-i*s,e[5]=a*c+i*o-r*u,e[6]=i*c+r*s-a*o,e[7]=-r*o-a*s-i*u,e}function Ft(e,t){return e[0]=0,e[1]=0,e[2]=0,e[3]=1,e[4]=.5*t[0],e[5]=.5*t[1],e[6]=.5*t[2],e[7]=0,e}function zt(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=0,e[5]=0,e[6]=0,e[7]=0,e}function Nt(e,t){var n=Ve();ze.getRotation(n,t);var r=new u.ARRAY_TYPE(3);return ze.getTranslation(r,t),jt(e,n,r),e}function Bt(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e}function Vt(e){return e[0]=0,e[1]=0,e[2]=0,e[3]=1,e[4]=0,e[5]=0,e[6]=0,e[7]=0,e}function Ht(e,t,n,r,a,i,o,s,u){return e[0]=t,e[1]=n,e[2]=r,e[3]=a,e[4]=i,e[5]=o,e[6]=s,e[7]=u,e}var Ut=gt;function Wt(e,t){return e[0]=t[4],e[1]=t[5],e[2]=t[6],e[3]=t[7],e}var qt=gt;function Gt(e,t){return e[4]=t[0],e[5]=t[1],e[6]=t[2],e[7]=t[3],e}function Kt(e,t){var n=t[4],r=t[5],a=t[6],i=t[7],o=-t[0],s=-t[1],u=-t[2],c=t[3];return e[0]=2*(n*c+i*o+r*u-a*s),e[1]=2*(r*c+i*s+a*o-n*u),e[2]=2*(a*c+i*u+n*s-r*o),e}function Yt(e,t,n){var r=t[0],a=t[1],i=t[2],o=t[3],s=.5*n[0],u=.5*n[1],c=.5*n[2],l=t[4],d=t[5],f=t[6],p=t[7];return e[0]=r,e[1]=a,e[2]=i,e[3]=o,e[4]=o*s+a*c-i*u+l,e[5]=o*u+i*s-r*c+d,e[6]=o*c+r*u-a*s+f,e[7]=-r*s-a*u-i*c+p,e}function Xt(e,t,n){var r=-t[0],a=-t[1],i=-t[2],o=t[3],s=t[4],u=t[5],c=t[6],l=t[7],d=s*o+l*r+u*i-c*a,f=u*o+l*a+c*r-s*i,p=c*o+l*i+s*a-u*r,h=l*o-s*r-u*a-c*i;return Ke(e,t,n),r=e[0],a=e[1],i=e[2],o=e[3],e[4]=d*o+h*r+f*i-p*a,e[5]=f*o+h*a+p*r-d*i,e[6]=p*o+h*i+d*a-f*r,e[7]=h*o-d*r-f*a-p*i,e}function Jt(e,t,n){var r=-t[0],a=-t[1],i=-t[2],o=t[3],s=t[4],u=t[5],c=t[6],l=t[7],d=s*o+l*r+u*i-c*a,f=u*o+l*a+c*r-s*i,p=c*o+l*i+s*a-u*r,h=l*o-s*r-u*a-c*i;return Ye(e,t,n),r=e[0],a=e[1],i=e[2],o=e[3],e[4]=d*o+h*r+f*i-p*a,e[5]=f*o+h*a+p*r-d*i,e[6]=p*o+h*i+d*a-f*r,e[7]=h*o-d*r-f*a-p*i,e}function Zt(e,t,n){var r=-t[0],a=-t[1],i=-t[2],o=t[3],s=t[4],u=t[5],c=t[6],l=t[7],d=s*o+l*r+u*i-c*a,f=u*o+l*a+c*r-s*i,p=c*o+l*i+s*a-u*r,h=l*o-s*r-u*a-c*i;return Xe(e,t,n),r=e[0],a=e[1],i=e[2],o=e[3],e[4]=d*o+h*r+f*i-p*a,e[5]=f*o+h*a+p*r-d*i,e[6]=p*o+h*i+d*a-f*r,e[7]=h*o-d*r-f*a-p*i,e}function $t(e,t,n){var r=n[0],a=n[1],i=n[2],o=n[3],s=t[0],u=t[1],c=t[2],l=t[3];return e[0]=s*o+l*r+u*i-c*a,e[1]=u*o+l*a+c*r-s*i,e[2]=c*o+l*i+s*a-u*r,e[3]=l*o-s*r-u*a-c*i,s=t[4],u=t[5],c=t[6],l=t[7],e[4]=s*o+l*r+u*i-c*a,e[5]=u*o+l*a+c*r-s*i,e[6]=c*o+l*i+s*a-u*r,e[7]=l*o-s*r-u*a-c*i,e}function Qt(e,t,n){var r=t[0],a=t[1],i=t[2],o=t[3],s=n[0],u=n[1],c=n[2],l=n[3];return e[0]=r*l+o*s+a*c-i*u,e[1]=a*l+o*u+i*s-r*c,e[2]=i*l+o*c+r*u-a*s,e[3]=o*l-r*s-a*u-i*c,s=n[4],u=n[5],c=n[6],l=n[7],e[4]=r*l+o*s+a*c-i*u,e[5]=a*l+o*u+i*s-r*c,e[6]=i*l+o*c+r*u-a*s,e[7]=o*l-r*s-a*u-i*c,e}function en(e,t,n,r){if(Math.abs(r)0){n=Math.sqrt(n);var r=t[0]/n,a=t[1]/n,i=t[2]/n,o=t[3]/n,s=t[4],u=t[5],c=t[6],l=t[7],d=r*s+a*u+i*c+o*l;e[0]=r,e[1]=a,e[2]=i,e[3]=o,e[4]=(s-r*d)/n,e[5]=(u-a*d)/n,e[6]=(c-i*d)/n,e[7]=(l-o*d)/n}return e}function gn(e){return"quat2("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+", "+e[4]+", "+e[5]+", "+e[6]+", "+e[7]+")"}function vn(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]&&e[4]===t[4]&&e[5]===t[5]&&e[6]===t[6]&&e[7]===t[7]}function mn(e,t){var n=e[0],r=e[1],a=e[2],i=e[3],o=e[4],s=e[5],c=e[6],l=e[7],d=t[0],f=t[1],p=t[2],h=t[3],g=t[4],v=t[5],m=t[6],y=t[7];return Math.abs(n-d)<=u.EPSILON*Math.max(1,Math.abs(n),Math.abs(d))&&Math.abs(r-f)<=u.EPSILON*Math.max(1,Math.abs(r),Math.abs(f))&&Math.abs(a-p)<=u.EPSILON*Math.max(1,Math.abs(a),Math.abs(p))&&Math.abs(i-h)<=u.EPSILON*Math.max(1,Math.abs(i),Math.abs(h))&&Math.abs(o-g)<=u.EPSILON*Math.max(1,Math.abs(o),Math.abs(g))&&Math.abs(s-v)<=u.EPSILON*Math.max(1,Math.abs(s),Math.abs(v))&&Math.abs(c-m)<=u.EPSILON*Math.max(1,Math.abs(c),Math.abs(m))&&Math.abs(l-y)<=u.EPSILON*Math.max(1,Math.abs(l),Math.abs(y))}var yn=n("ZxFD");n.d(t,"glMatrix",(function(){return u})),n.d(t,"mat2",(function(){return r})),n.d(t,"mat2d",(function(){return a})),n.d(t,"mat3",(function(){return i})),n.d(t,"mat4",(function(){return ze})),n.d(t,"quat",(function(){return o})),n.d(t,"quat2",(function(){return s})),n.d(t,"vec2",(function(){return yn})),n.d(t,"vec3",(function(){return Ne})),n.d(t,"vec4",(function(){return Be}))},IS96:function(e,t,n){var r=n("cOqj"),a=n("a2QF"),i=n("1s4d");e.exports=r((function(e){return null!=e&&i(e,a(e))}))},"IU+Z":function(e,t,n){"use strict";n("sMXx");var r=n("KroJ"),a=n("Mukb"),i=n("eeVq"),o=n("vhPU"),s=n("K0xU"),u=n("Ugos"),c=s("species"),l=!i((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$")})),d=function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var n="ab".split(e);return 2===n.length&&"a"===n[0]&&"b"===n[1]}();e.exports=function(e,t,n){var f=s(e),p=!i((function(){var t={};return t[f]=function(){return 7},7!=""[e](t)})),h=p?!i((function(){var t=!1,n=/a/;return n.exec=function(){return t=!0,null},"split"===e&&(n.constructor={},n.constructor[c]=function(){return n}),n[f](""),!t})):void 0;if(!p||!h||"replace"===e&&!l||"split"===e&&!d){var g=/./[f],v=n(o,f,""[e],(function(e,t,n,r,a){return t.exec===u?p&&!a?{done:!0,value:g.call(t,n,r)}:{done:!0,value:e.call(n,t,r)}:{done:!1}})),m=v[0],y=v[1];r(String.prototype,e,m),a(RegExp.prototype,f,2==t?function(e,t){return y.call(e,this,t)}:function(e){return y.call(e,this)})}}},IVHb:function(e,t,n){"use strict";var r=n("TqRt");t.__esModule=!0,t.default=void 0;var a=r(n("PJYZ")),i=r(n("VbXa")),o=r(n("lSNA")),s=r(n("q1tI")),u=r(n("i8i4")),c=r(n("dpYK")),l=r(n("17x9")),d={scrollKey:l.default.string.isRequired,shouldUpdateScroll:l.default.func,children:l.default.element.isRequired},f={scrollBehavior:l.default.object},p=function(e){function t(t,n){var r;return r=e.call(this,t,n)||this,(0,o.default)((0,a.default)(r),"shouldUpdateScroll",(function(e,t){var n=r.props.shouldUpdateScroll;return!n||n.call(r.context.scrollBehavior.scrollBehavior,e,t)})),r.scrollKey=t.scrollKey,r}(0,i.default)(t,e);var n=t.prototype;return n.componentDidMount=function(){this.context.scrollBehavior.registerElement(this.props.scrollKey,u.default.findDOMNode(this),this.shouldUpdateScroll)},n.componentDidUpdate=function(e){(0,c.default)(e.scrollKey===this.props.scrollKey," does not support changing scrollKey.")},n.componentWillUnmount=function(){this.context.scrollBehavior.unregisterElement(this.scrollKey)},n.render=function(){return this.props.children},t}(s.default.Component);p.propTypes=d,p.contextTypes=f;var h=p;t.default=h},IXHI:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.registerTransform=t.getTransform=t.registerParser=t.getParser=void 0;var r={},a={};t.getParser=function(e){return a[e]};t.registerParser=function(e,t){a[e]=t};t.getTransform=function(e){return r[e]};t.registerTransform=function(e,t){r[e]=t}},Ijbi:function(e,t){e.exports=function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);ts&&(g=0,h++),c[e]={x:g,y:p+h*a,width:a,height:a,advance:r},g+=a}}));var v=r+2*i;return{mapping:c,xOffset:g,yOffset:p+h*v,canvasHeight:o(p+(h+1)*v)}},t.buildIconMaping=function(e,t,n){var r=0,a=0,s=0,u=[],c={},l=e,d=Array.isArray(l),f=0;for(l=d?l:l[Symbol.iterator]();;){var p;if(d){if(f>=l.length)break;p=l[f++]}else{if((f=l.next()).done)break;p=f.value}var h=p;if(!c[h.id]){var g=h.height,v=h.width;r+v+t>n&&(i(c,u,a),r=0,a=s+a+t,s=0,u=[]),u.push({icon:h,xOffset:r}),r=r+v+t,s=Math.max(s,g)}}u.length>0&&i(c,u,a);var m=o(s+a+t);return{mapping:c,canvasHeight:m}},t.nextPowOfTwo=o;var a=30;function i(e,t,n){var a=t,i=Array.isArray(a),o=0;for(a=i?a:a[Symbol.iterator]();;){var s;if(i){if(o>=a.length)break;s=a[o++]}else{if((o=a.next()).done)break;s=o.value}var u=s,c=u.icon,l=u.xOffset;e[c.id]=r({},c,{x:l,y:n,image:c.image})}}function o(e){return Math.pow(2,Math.ceil(Math.log2(e)))}},JB68:function(e,t,n){var r=n("Jes0");e.exports=function(e){return Object(r(e))}},JX7q:function(e,t,n){"use strict";function r(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}n.d(t,"a",(function(){return r}))},JYJV:function(e,t,n){"use strict";var r=n("rfz3"),a=r.Just,i=r.Nothing;e.exports=function(e){return e.matchWith({Failure:function(){return i()},Success:function(e){var t=e.value;return a(t)}})}},JbBM:function(e,t,n){n("Hfiw"),e.exports=n("WEpk").Object.setPrototypeOf},Jcmo:function(e,t,n){var r=n("XKFU"),a=Math.exp;r(r.S,"Math",{cosh:function(e){return(a(e=+e)+a(-e))/2}})},Jes0:function(e,t){e.exports=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e}},"Ji/l":function(e,t,n){var r=n("XKFU");r(r.G+r.W+r.F*!n("D4iV").ABV,{DataView:n("7Qtz").DataView})},Ji7U:function(e,t,n){"use strict";function r(e,t){return(r=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&r(e,t)}n.d(t,"a",(function(){return a}))},JiEa:function(e,t){t.f=Object.getOwnPropertySymbols},Jktv:function(e,t,n){"use strict";var r=n("lwsE"),a=n("W8MJ"),i=n("a1gu"),o=n("Nsbk"),s=n("7W2i"),u=n("1ll/"),c=new(function(e){function t(){return r(this,t),i(this,o(t).apply(this,arguments))}return s(t,e),a(t,[{key:"content",value:function(e){var t=e.onError,n=e.onResult,r=e.onDone,a="";return a+="var _results = new Array(".concat(this.options.taps.length,");\n"),a+="var _checkDone = () => {\n",a+="for(var i = 0; i < _results.length; i++) {\n",a+="var item = _results[i];\n",a+="if(item === undefined) return false;\n",a+="if(item.result !== undefined) {\n",a+=n("item.result"),a+="return true;\n",a+="}\n",a+="if(item.error) {\n",a+=t("item.error"),a+="return true;\n",a+="}\n",a+="}\n",a+="return false;\n",a+="}\n",a+=this.callTapsParallel({onError:function(e,t,n,r){var a="";return a+="if(".concat(e," < _results.length && ((_results.length = ").concat(e+1,"), (_results[").concat(e,"] = { error: ").concat(t," }), _checkDone())) {\n"),a+=r(!0),a+="} else {\n",a+=n(),a+="}\n"},onResult:function(e,t,n,r){var a="";return a+="if(".concat(e," < _results.length && (").concat(t," !== undefined && (_results.length = ").concat(e+1,"), (_results[").concat(e,"] = { result: ").concat(t," }), _checkDone())) {\n"),a+=r(!0),a+="} else {\n",a+=n(),a+="}\n"},onTap:function(e,t,n,r){var a="";return e>0&&(a+="if(".concat(e," >= _results.length) {\n"),a+=n(),a+="} else {\n"),a+=t(),e>0&&(a+="}\n"),a},onDone:r})}}]),t}(n("5cEH"))),l=function(e){return c.setup(this,e),c.create(e)};function d(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,n=new u(e,t);return n.constructor=d,n.compile=l,n._call=void 0,n.call=void 0,n}d.prototype=null,e.exports=d},Jnvq:function(e,t,n){"use strict";var r=n("pVnL");Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a,i,o,s,u,c,l,d,f,p,h,g=n("4cb6"),v=n("pqXx"),m=n("ewr5"),y=n("i0Ec"),b=n("jCeW");function _(e,t,n,r){n&&Object.defineProperty(e,t,{enumerable:n.enumerable,configurable:n.configurable,writable:n.writable,value:n.initializer?n.initializer.call(r):void 0})}function x(e,t,n,r,a){var i={};return Object.keys(r).forEach((function(e){i[e]=r[e]})),i.enumerable=!!i.enumerable,i.configurable=!!i.configurable,("value"in i||i.initializer)&&(i.writable=!0),i=n.slice().reverse().reduce((function(n,r){return r(e,t,n)||n}),i),a&&void 0!==i.initializer&&(i.value=i.initializer?i.initializer.call(a):void 0,i.initializer=void 0),void 0===i.initializer&&(Object.defineProperty(e,t,i),i=null),i}var R="varying vec2 v_UV;\n\nuniform sampler2D u_Texture;\n\nvoid main() {\n gl_FragColor = vec4(texture2D(u_Texture, v_UV));\n}";function w(e,t){for(var n=0,r=1/t,a=e;a>0;)n+=r*(a%t),a=Math.floor(a/t),r/=t;return n}var E=1,S=(a=(0,g.injectable)(),i=(0,v.lazyInject)(m.TYPES.IRendererService),o=(0,v.lazyInject)(m.TYPES.IShaderModuleService),s=(0,v.lazyInject)(m.TYPES.ICameraService),u=(0,v.lazyInject)(m.TYPES.ILogService),a((d=x((l=function(){function e(){_(this,"rendererService",d,this),_(this,"shaderModule",f,this),_(this,"cameraService",p,this),_(this,"logger",h,this),this.haltonSequence=[],this.accumulatingId=0,this.frame=0,this.timer=void 0,this.sampleRenderTarget=void 0,this.prevRenderTarget=void 0,this.outputRenderTarget=void 0,this.copyRenderTarget=void 0,this.blendModel=void 0,this.outputModel=void 0,this.copyModel=void 0}var t=e.prototype;return t.getType=function(){return b.PassType.Normal},t.getName=function(){return"taa"},t.init=function(e){var t=this.rendererService,n=t.createFramebuffer,r=t.createTexture2D;this.sampleRenderTarget=n({color:r({width:1,height:1,wrapS:y.gl.CLAMP_TO_EDGE,wrapT:y.gl.CLAMP_TO_EDGE})}),this.prevRenderTarget=n({color:r({width:1,height:1,wrapS:y.gl.CLAMP_TO_EDGE,wrapT:y.gl.CLAMP_TO_EDGE})}),this.outputRenderTarget=n({color:r({width:1,height:1,wrapS:y.gl.CLAMP_TO_EDGE,wrapT:y.gl.CLAMP_TO_EDGE})}),this.copyRenderTarget=n({color:r({width:1,height:1,wrapS:y.gl.CLAMP_TO_EDGE,wrapT:y.gl.CLAMP_TO_EDGE})});for(var a=0;a<30;a++)this.haltonSequence.push([w(a,2),w(a,3)]);this.blendModel=this.createTriangleModel("blend-pass","uniform float u_Opacity : 1.0;\nuniform float u_MixRatio : 0.5;\n\nuniform sampler2D u_Diffuse1;\nuniform sampler2D u_Diffuse2;\n\nvarying vec2 v_UV;\n\nvoid main() {\n vec4 texel1 = texture2D(u_Diffuse1, v_UV);\n vec4 texel2 = texture2D(u_Diffuse2, v_UV);\n gl_FragColor = u_Opacity * mix(texel1, texel2, u_MixRatio);\n}"),this.outputModel=this.createTriangleModel("copy-pass",R,{blend:{enable:!0,func:{srcRGB:y.gl.ONE,dstRGB:y.gl.ONE_MINUS_SRC_ALPHA,srcAlpha:y.gl.ONE,dstAlpha:y.gl.ONE_MINUS_SRC_ALPHA},equation:{rgb:y.gl.FUNC_ADD,alpha:y.gl.FUNC_ADD}}}),this.copyModel=this.createTriangleModel("copy-pass",R)},t.render=function(e){var t=this,n=this.rendererService,r=n.clear,a=n.getViewportSize,i=n.useFramebuffer,o=a(),s=o.width,u=o.height;this.sampleRenderTarget.resize({width:s,height:u}),this.prevRenderTarget.resize({width:s,height:u}),this.outputRenderTarget.resize({width:s,height:u}),this.copyRenderTarget.resize({width:s,height:u}),this.resetFrame(),this.stopAccumulating();var c=e.multiPassRenderer.getPostProcessor().getReadFBO();i(c,(function(){r({color:[0,0,0,0],depth:1,stencil:0,framebuffer:c}),e.multiPassRenderer.setRenderFlag(!1),e.render(),e.multiPassRenderer.setRenderFlag(!0)}));this.accumulatingId=E++,this.timer=window.setTimeout((function(){!function n(r){t.accumulatingId&&r===t.accumulatingId&&(t.isFinished()||(t.doRender(e),requestAnimationFrame((function(){n(r)}))))}(t.accumulatingId)}),50)},t.doRender=function(e){var t=this;this.logger.info("accumulatingId: "+this.accumulatingId);var n=this.rendererService,r=n.clear,a=n.getViewportSize,i=n.useFramebuffer,o=a(),s=o.width,u=o.height,c=e.getStyleOptions().jitterScale,l=void 0===c?1:c,d=this.haltonSequence[this.frame%this.haltonSequence.length];this.cameraService.jitterProjectionMatrix((2*d[0]-1)/s*l,(2*d[1]-1)/u*l),e.multiPassRenderer.setRenderFlag(!1),e.hooks.beforeRender.call(),i(this.sampleRenderTarget,(function(){r({color:[0,0,0,0],depth:1,stencil:0,framebuffer:t.sampleRenderTarget}),e.render()})),e.hooks.afterRender.call(),e.multiPassRenderer.setRenderFlag(!0);var f=e.getStyleOptions();i(this.outputRenderTarget,(function(){t.blendModel.draw({uniforms:{u_Opacity:f.opacity||1,u_MixRatio:0===t.frame?1:.9,u_Diffuse1:t.sampleRenderTarget,u_Diffuse2:0===t.frame?e.multiPassRenderer.getPostProcessor().getReadFBO():t.prevRenderTarget}})})),0===this.frame&&r({color:[0,0,0,0],depth:1,stencil:0,framebuffer:this.copyRenderTarget}),this.frame>=1&&(i(this.copyRenderTarget,(function(){t.outputModel.draw({uniforms:{u_Texture:t.outputRenderTarget}})})),i(e.multiPassRenderer.getPostProcessor().getReadFBO(),(function(){t.copyModel.draw({uniforms:{u_Texture:t.copyRenderTarget}})})),e.multiPassRenderer.getPostProcessor().render(e));var p=this.prevRenderTarget;this.prevRenderTarget=this.outputRenderTarget,this.outputRenderTarget=p,this.frame++,this.cameraService.clearJitterProjectionMatrix()},t.isFinished=function(){return this.frame>=this.haltonSequence.length},t.resetFrame=function(){this.frame=0},t.stopAccumulating=function(){this.accumulatingId=0,window.clearTimeout(this.timer)},t.createTriangleModel=function(e,t,n){this.shaderModule.registerModule(e,{vs:"attribute vec2 a_Position;\n\nvarying vec2 v_UV;\n\nvoid main() {\n v_UV = 0.5 * (a_Position + 1.0);\n gl_Position = vec4(a_Position, 0., 1.);\n}",fs:t});var a=this.shaderModule.getModule(e),i=a.vs,o=a.fs,s=a.uniforms,u=this.rendererService,c=u.createAttribute,l=u.createBuffer;return(0,u.createModel)(r({vs:i,fs:o,attributes:{a_Position:c({buffer:l({data:[-4,-4,4,-4,0,4],type:y.gl.FLOAT}),size:2})},uniforms:r({},s),depth:{enable:!1},count:3},n))},e}()).prototype,"rendererService",[i],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),f=x(l.prototype,"shaderModule",[o],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),p=x(l.prototype,"cameraService",[s],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),h=x(l.prototype,"logger",[u],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),c=l))||c);t.default=S},Jrzw:function(e,t,n){"use strict";var r;n("HAE/"),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=((r=n("PE/4"))&&r.__esModule?r:{default:r}).default;t.default=a},"Ju5/":function(e,t,n){"use strict";var r=n("XqMk"),a="object"==typeof self&&self&&self.Object===Object&&self,i=r.a||a||Function("return this")();t.a=i},Jv8k:function(e,t,n){"use strict";n("V+eJ"),n("a1Th"),n("h7Nl"),n("hHhE"),n("/SS/"),n("91GP"),n("rE2o"),n("ioFf"),n("rGqo"),n("yt8O"),n("Btvt"),n("XfO3"),n("EK0E"),n("HAE/"),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=y(n("q1tI")),a=y(n("1j5w")),i=v(n("TSYQ")),o=v(n("BGR+")),s=n("94VI"),u=v(n("mXFb")),c=v(n("Mp7j")),l=n("vgIT"),d=v(n("aVg8")),f=n("65HD"),p=v(n("i6dq")),h=v(n("StrI")),g=v(n("bRFr"));function v(e){return e&&e.__esModule?e:{default:e}}function m(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return m=function(){return e},e}function y(e){if(e&&e.__esModule)return e;var t=m();if(t&&t.has(e))return t.get(e);var n={};if(null!=e){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var i=r?Object.getOwnPropertyDescriptor(e,a):null;i&&(i.get||i.set)?Object.defineProperty(n,a,i):n[a]=e[a]}}return n.default=e,t&&t.set(e,n),n}function b(e){return(b="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _(){return(_=Object.assign||function(e){for(var t=1;t=0;(t||i)&&n.restoreModeVerticalFromInline()},n.handleClick=function(e){n.handleOpenChange([]);var t=n.props.onClick;t&&t(e)},n.handleOpenChange=function(e){n.setOpenKeys(e);var t=n.props.onOpenChange;t&&t(e)},n.renderMenu=function(e){var t,s,u,c=e.getPopupContainer,l=e.getPrefixCls,d=n.props,f=d.prefixCls,p=d.className,h=d.theme,g=d.collapsedWidth,v=(0,o.default)(n.props,["collapsedWidth","siderCollapsed"]),m=n.getRealMenuMode(),y=n.getOpenMotionProps(m),b=l("menu",f),x=(0,i.default)(p,"".concat(b,"-").concat(h),(t={},s="".concat(b,"-inline-collapsed"),u=n.getInlineCollapsed(),s in t?Object.defineProperty(t,s,{value:u,enumerable:!0,configurable:!0,writable:!0}):t[s]=u,t)),R=_({openKeys:n.state.openKeys,onOpenChange:n.handleOpenChange,className:x,mode:m},y);return"inline"!==m&&(R.onClick=n.handleClick),n.getInlineCollapsed()&&(0===g||"0"===g||"0px"===g)&&(R.openKeys=[]),r.createElement(a.default,_({getPopupContainer:c},v,R,{prefixCls:b,onTransitionEnd:n.handleTransitionEnd,onMouseEnter:n.handleMouseEnter}))},(0,d.default)(!("onOpen"in e||"onClose"in e),"Menu","`onOpen` and `onClose` are removed, please use `onOpenChange` instead, see: https://u.ant.design/menu-on-open-change."),(0,d.default)(!("inlineCollapsed"in e&&"inline"!==e.mode),"Menu","`inlineCollapsed` should only be used when `mode` is inline."),(0,d.default)(!(void 0!==e.siderCollapsed&&"inlineCollapsed"in e),"Menu","`inlineCollapsed` not control Menu under Sider. Should set `collapsed` on Sider instead."),"openKeys"in e?s=e.openKeys:"defaultOpenKeys"in e&&(s=e.defaultOpenKeys),n.state={openKeys:s||[],switchingModeFromInline:!1,inlineOpenKeys:[],prevProps:e},n}return A(t,e),w(t,[{key:"componentWillUnmount",value:function(){p.default.cancel(this.mountRafId)}},{key:"setOpenKeys",value:function(e){"openKeys"in this.props||this.setState({openKeys:e})}},{key:"getRealMenuMode",value:function(){var e=this.getInlineCollapsed();if(this.state.switchingModeFromInline&&e)return"inline";var t=this.props.mode;return e?"vertical":t}},{key:"getInlineCollapsed",value:function(){var e=this.props.inlineCollapsed;return void 0!==this.props.siderCollapsed?this.props.siderCollapsed:e}},{key:"getOpenMotionProps",value:function(e){var t=this.props,n=t.openTransitionName,r=t.openAnimation,a=t.motion;return a?{motion:a}:r?((0,d.default)("string"==typeof r,"Menu","`openAnimation` do not support object. Please use `motion` instead."),{openAnimation:r}):n?{openTransitionName:n}:"horizontal"===e?{motion:{motionName:"slide-up"}}:"inline"===e?{motion:h.default}:{motion:{motionName:this.state.switchingModeFromInline?"":"zoom-big"}}}},{key:"restoreModeVerticalFromInline",value:function(){this.state.switchingModeFromInline&&this.setState({switchingModeFromInline:!1})}},{key:"render",value:function(){return r.createElement(g.default.Provider,{value:{inlineCollapsed:this.getInlineCollapsed()||!1,antdMenuTheme:this.props.theme}},r.createElement(l.ConfigConsumer,null,this.renderMenu))}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n=t.prevProps,r={prevProps:e};return"inline"===n.mode&&"inline"!==e.mode&&(r.switchingModeFromInline=!0),"openKeys"in e?r.openKeys=e.openKeys:((e.inlineCollapsed&&!n.inlineCollapsed||e.siderCollapsed&&!n.siderCollapsed)&&(r.switchingModeFromInline=!0,r.inlineOpenKeys=t.openKeys,r.openKeys=[]),(!e.inlineCollapsed&&n.inlineCollapsed||!e.siderCollapsed&&n.siderCollapsed)&&(r.openKeys=t.inlineOpenKeys,r.inlineOpenKeys=[])),r}}]),t}(r.Component);P.defaultProps={className:"",theme:"light",focusable:!1},(0,s.polyfill)(P);var C=function(e){function t(){return x(this,t),E(this,S(t).apply(this,arguments))}return A(t,e),w(t,[{key:"render",value:function(){var e=this;return r.createElement(f.SiderContext.Consumer,null,(function(t){return r.createElement(P,_({},e.props,t))}))}}]),t}(r.Component);t.default=C,C.Divider=a.Divider,C.Item=c.default,C.SubMenu=u.default,C.ItemGroup=a.ItemGroup},Jvvl:function(e,t,n){"use strict";var r=n("VbXa");Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a,i=n("pqXx"),o=(a=n("iZF3"))&&a.__esModule?a:{default:a},s=n("HJWE");var u=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),a=0;a1||"".split(/.?/).length?function(e,t){var a=String(this);if(void 0===e&&0===t)return[];if(!r(e))return n.call(a,e,t);for(var i,o,s,u=[],l=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")+(e.sticky?"y":""),d=0,p=void 0===t?4294967295:t>>>0,h=new RegExp(e.source,l+"g");(i=c.call(h,a))&&!((o=h.lastIndex)>d&&(u.push(a.slice(d,i.index)),i.length>1&&i.index=p));)h.lastIndex===i.index&&h.lastIndex++;return d===a.length?!s&&h.test("")||u.push(""):u.push(a.slice(d)),u.length>p?u.slice(0,p):u}:"0".split(void 0,0).length?function(e,t){return void 0===e&&0===t?[]:n.call(this,e,t)}:n,[function(n,r){var a=e(this),i=null==n?void 0:n[t];return void 0!==i?i.call(n,a,r):h.call(String(a),n,r)},function(e,t){var r=l(h,e,this,t,h!==n);if(r.done)return r.value;var c=a(e),f=String(this),g=i(c,RegExp),v=c.unicode,m=(c.ignoreCase?"i":"")+(c.multiline?"m":"")+(c.unicode?"u":"")+(p?"y":"g"),y=new g(p?c:"^(?:"+c.source+")",m),b=void 0===t?4294967295:t>>>0;if(0===b)return[];if(0===f.length)return null===u(y,f)?[f]:[];for(var _=0,x=0,R=[];x>>1;e(t[i],n)<0?r=i+1:a=i}return r},right:function(t,n,r,a){for(null==r&&(r=0),null==a&&(a=t.length);r>>1;e(t[i],n)>0?a=i:r=i+1}return r}}}},KroJ:function(e,t,n){var r=n("dyZX"),a=n("Mukb"),i=n("aagx"),o=n("ylqs")("src"),s=n("+lvF"),u=(""+s).split("toString");n("g3g5").inspectSource=function(e){return s.call(e)},(e.exports=function(e,t,n,s){var c="function"==typeof n;c&&(i(n,"name")||a(n,"name",t)),e[t]!==n&&(c&&(i(n,o)||a(n,o,e[t]?""+e[t]:u.join(String(t)))),e===r?e[t]=n:s?e[t]?e[t]=n:a(e,t,n):(delete e[t],a(e,t,n)))})(Function.prototype,"toString",(function(){return"function"==typeof this&&this[o]||s.call(this)}))},Kuth:function(e,t,n){var r=n("y3w9"),a=n("FJW5"),i=n("4R4u"),o=n("YTvA")("IE_PROTO"),s=function(){},u=function(){var e,t=n("Iw71")("iframe"),r=i.length;for(t.style.display="none",n("+rLv").appendChild(t),t.src="javascript:",(e=t.contentWindow.document).open(),e.write(" \ No newline at end of file diff --git a/icons/icon-144x144.png b/icons/icon-144x144.png new file mode 100644 index 0000000000000000000000000000000000000000..ad7e9aad6bdc68995c0af24dbbea4f2030938706 GIT binary patch literal 13426 zcmbVzWl&wgvM#c5LSW-=8+UgnxVvl6V8J1{LvVL@cY?;-Qht_ow{|a-j7%B z$C@=Wy?WMI_jG?V6RIF5{s|rj9t;fZlca>G()&C5?AZDz`zht zKOS(f)O0K`Fd{HXQ6UxA#S>2$N4z<=Q`*E&U^Ie0L?L8C$j4}{5@94?oI-(Ait)vk zlJ%fm6sO4_FcJpfe(j-_i6#r7S@K4m@n$?j(nbRVC6UHi_rDn;@p;C*8VQ$CzdN7a zb!eN`GdJ5MGdeB)&h0FWFN* zDI%ziuT(GI!j?IGKCv-WwFy$~fK&Tz?I$=**^I7sM_Rq=nc%kC+o^2GX5-Ix&05|u zkYWmVl_8sU13n0{hg`c5wmbSF6vAO>skiNcZ*bj` z0Oc@xezc&i*3nCaFuUs0MG;W96Rs*lojb2V*_x2I?O2>YnxPz=tBn?tmDa)%w#_(f zRHS^iwMMG((SWsG0lFTALg#*G5?ZRqTQv<$IB!I*C<|pfZ>;cd^5kp7#|?=%cee3s z`o?nR$y0;AnrVH0yDC{t%Xepay$X5e`?SG#PgH}y+7Y~QvIb|nuILIA(!Fv{;102x z!`Bzr$8t{KhP0Xo9Pb@zyd-#|Y@^U8*E4KAnL2TOM%O61%B4UZ8>>6-7xwhB@g-Xw zl|?4h-v6EUv(0r&#ILQh@2HueEirH8Rtqa-n6tL^bSi;1g|1u~B&*}k@Wz=S{`Ul* z_;09Z5;;)rd;Qz1l&9S0dYm-xoK^-X1`wJ*@@t}}41xA&-8tuV!JbAKYD`*;S$D)) ztz|=$7&;^eHPEjs2NjB>%K@Ta4?^Y#uRdVx{>!>!3M_yC(|5OlM1e~jK>gREPBfcb zJa5>HQ5{fP_psn`)v1G0tP6s0`uQc>D-@QMmMjs4Ml?IdT&rNRO>A$aRt~T@i~8Pq zBoiH>zhnX2>^}wfFgB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@Rp0vG+?vV3J?tL@R|2{QeJUBZ$fX literal 0 HcmV?d00001 diff --git a/icons/icon-192x192.png b/icons/icon-192x192.png new file mode 100644 index 0000000000000000000000000000000000000000..344c3e966c750dbbcfeaf86e766106e8aafca1c6 GIT binary patch literal 18027 zcmZsDbx>Q~7i|)PyE_DTEfgsd+_kuCTdWjoae}*Ri@R&_V#O&fZpF2DaSM`1f8Trm zy_wv5Gn11uCr9>Pd#yEz)Kpi%#-P9e007uZin7|z&z^r58p`usd)X27`GNjH(a;S5 zz$E;40RdmK$N&HcKuK0g$8+)64?RO?$m8$v`;6@0LKb8wZx;0Hc|bq{5FK3tR1p%G zU~%oYcH@T<=4alRH{5V8a_!T6LGbG1W@*Q*$n~gOR>p#7ECGwxM@N-3>rwYL(UaN= zw{R3XbdMV>q~*=~?&+1j>UQ0$-0HvDVV0!d76!OK)<>HjS^fXs{w>!QjZVq3N|?NZ zkSlylb|DgOP#{CPhmkT33peVMq2@4c^|%3hY4}kfxP{eevo<>FkV3}Dn1)E3nQ?|f zONkG(XFLoH>b>d(~i1lM{+gx`f(g}-g@^>p^9sfCGeH4o?{I^mxO_%lh5-9#o-?9(#}nT4eMB%m|Zh)noP-7`&JnokaPpN@PrgmlnsEbX%iutE56+ttsMC`Ng%X z+fL@@{wNL*OI46O?~M~YII5_QyXmBwZDKx zNY-9oITH}y#!T!g4}c$k!#nNyP0LX#rszsR(|gLX{qF7BLcx558EX0mOn)X)!@MYB zF9Pq~m((!#m0wIWkQsnDi#e(ZM)#F7`!U+5{3Yw6YTT<(XaIBX+{G33+i5{_g*?y` z`E`7YWR%`Kj>pXXAAwvwdhM>7o9OMX@4gLgl#*#or!u?>GX_IcQ6xv3E%7l`}tC@t_$Csb?BiKzKNqL>UEi~Qkdp9 z3J*jalsgjCrr>w#D7$xM?3qlWx~wV~44GF!f_4hVP$Md)BYtcK3UhHJ!E9oGxWt^v z>az8K9}tlgg2@8*)8yo`9m3h$BMU*-5 z)qxF^XS!m_tVPCLkn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(N>;0>NIulZU$CRle~w@8%*y zuZLw4Zm;{>Wh9iH>;Y7jS2CD8!(T!L|SApsNLjBL5{$ydAk?$avCT^0doH zEBl%JnJ%3WL(Yd1ya%s9`=t^%loSm55U9WN|Gk>4L!TdKj^@O7)Zl89J>Yg3dF4fZ z^++~fAqHU|M?T=rkxF3D)f>EkxQSTe(aX@Z2;MuQjx}vtMj$mph?& z-^={nOe;wJC6N3_Apb9bpX2lQ@!RL|w<;vO8G|0h(8t!vWmbF5-!6BQ zCqO7v!rlO%2PyV%7pcCm|H>|z(Y*u^e( b@vHoQ)><*I79B=800000NkvXXu0mjfOwj%4 literal 0 HcmV?d00001 diff --git a/icons/icon-256x256.png b/icons/icon-256x256.png new file mode 100644 index 0000000000000000000000000000000000000000..af67dafa75d48ea6b933527754c9cffb73de035c GIT binary patch literal 24646 zcmb4r1y`F*)NK-iyE_E8Qlz*Bic{QOTcDIeaVJ=D2t`YADN?LBEfAm-ElvwXgA^^r zB>}?6``vqgz+G#yo{3D(%sg}UoZ0&%3HrL~!~_fk004kkQ$xiN002HzfdD+5hl{m$ z)r*GC_Ty}C4z5+zb!Pb^AAj17g3c#Ct7nDpt%$xo_Wzt@^VgB~>%#Z{ z&+6DKA&>cYO+WdZ&tG$v9k7X7`oEjLjE@nv{Ii2QQnmc-En!4}XA{jIM*TGp=dPKj zgEw|;PFohCLIX!`Rf^F>lf>7DBBF1ndK_8~A+_#;@WhCslgDiLhc5v;yCi+m7=;d) zmOUPwEolhPqX|FrBKIo$%R|Uux4+ngX_?qPx-bIAOdtOZ2Iv8*&Qo z+@>lCu9+0yM?9DHOkqpblOLBiZ_Z4{gz)~IGNKAEkIx^n*^;wRTCW`Ay){O0>Sp8b zxZNH;tBCc=IC~{7Jvk3QGsl;f_2hE#Ad$8q9I+^TrrQoyFay<7L8vvpc{UdMdYe9n zH_JT1yKZMmu=f77wQe5t%AMdiNJRP|TXa81gyF=>DN>ECF>{(T5+NzX<1$77UHWB` z-1f7Vp{<~idEU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dHrshI+@JAzPY42OETi| zeAjnCgf%pOPbm9L^oC200f2}{`DV>e8?tMg_X zLy?y(-@4ZMvrBHH2>x{~m+#IJlW5+>V$)jFXd@K(i6YfGg2>x3<{UOM~DUG3Nu(ACj3o+6YR4N&gxu;UKL;GWW8-p4Cr19z1f)qU(#r zZGYLf4$koO<5TFd0W{X2SQ!=y1B!-!02^s2WMK+YKrI3)x&Mzx`p7%tff!p~^Eh%d R^arefZxRaP)uM(${|Df4fPnx2 literal 0 HcmV?d00001 diff --git a/icons/icon-48x48.png b/icons/icon-48x48.png new file mode 100644 index 0000000000000000000000000000000000000000..368ae152aa938c91944dd8fc743ed3e588245d1a GIT binary patch literal 3726 zcmV;94sr2`P)&oRf-yK4 zCzuTeoS*>4l6BAMoY7&OmSmmQ;e!y2?NF&4wN$c6b~l?%6{*~8j;d@bREnxxm8#t$ zz^oxf(7e~*e%<{>Qb6n))-g=gSAW0$yZ`RL|Eu2{!{Be~ei)~#VV$WZYL;-e4%VrM zVYQdQ^5?*6SqH1N09G5HJIY}NZ-CXc8CK6WSiLvF>fZ@#a5t-f!UicKK-F!UmJD@bt9(ZX1@7Mu&ClA6qeLuW2hlO|U)7X6OaU{7)C`&k} z^-1EHvP@ho-GYl7yzc}Np_fW;z|VH7`NqI*q|H4h{`t%?;9MkS+kpO?fWckBi3(t34{&lHFn$1-ItZLP1k4_$yiWtC zkKi}ws^P>PTm7C zelNu2Cm*Kxjxj6$0bR{#f>ih0WGe`d@+ ziq{E;5E3(wPyud!l#ACULo}qrY0QE{1)SzQI8?x)0uB{$sDMKka;Shq1sp2iPyvSu zI8?x)0uB{$sDMKSoY_j)w5oIV82ULeI&vl_8y3p`47h()x+I1l+ zfQ$9Y0zbmnE0ho0r;0K#o%<5bQuuT(F!L5nD~PwzQ;NP~ocffwd!B-)KM98rQ-^8p zN}B&;K>Zq^Aq|(Cvhb=e2O(M@#2^kajfQA}5G@d*1wynyh(R2p1wsts5YuRg76>to zh9>Ssh-oxL3%p7NU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W#Yq1i40h5s}m(HAn!F&Io^@*>G8kwWk6jq znlfNA8%ZntZNBUKv$f#HbbV5!clmhntWSqS2qN5^!40P4-z2|g4b1v9J(hhJS~Aqw zaD$!`ZqZ{aU4E2n*}v_d6EY}klVH@R>XcZYiZ3^(0(Gef*GamD!AZ*gLy~1g#!~SHTCJ77ji#BQ4$7i;O$ZKlS zJX`Zbgm)n#qnfoMBJ-O3j;-c`JgwS9omT4;ky4X@-`6E_g9&g5Nd@~+uls}xr&d2- z=2-PfZc#?+wf&#Yki|v?YP_~WO&lI+j029vAxsDtjtkjVyry_65QpIMx%J7{c=O6_ zl7$N9nrIk@6ZHm;#o+t(u|RbU!i1#4g>2ikn)hptQJ)oRVtM6A6f#>G@5`??UR&W< zv_47F-Bbuw(GV-Zt|PBH8u!bw)$W{{L}9$IKY5CeF$k+x=?zsy;Zpr7;Aj-W1YCsc z*hk*K$}vZxVOCpEbLmF!uLAUILvLKyh3Zu(JZj-J0)$OCE~En6TqV`mW3lh^<|99D zTG6AXwgPFe(Vzmv<3y8en__PHn8=(D#IGs_#u46Ms!aFuB;O&p`Dt$cGVwa`G~+`B zF2|^}SsnWUQb29Ya$U(>+87H|W|g6@*UL8_8T*0z9W|GfIASb)4q=d+Ri=I?peq?4 s=-*KzqJ)rb^Qa-rDz`7fyPCiM0osA;8&>6(z5oCK07*qoM6N<$g6MBG=>Px# literal 0 HcmV?d00001 diff --git a/icons/icon-512x512.png b/icons/icon-512x512.png new file mode 100644 index 0000000000000000000000000000000000000000..216fb7fa76fda788a2eb64185532f4a68fa98cdf GIT binary patch literal 49174 zcmdSB1ydZ|^ENz-ySux)1Ofq;;2zxFJp>3O1Xu{}u0cX@cY+f%xCfVDf#B}D@8);^ zpAYd?&D3m76{pX1_qn?J^mT}QqppCBL4g4P0Jf5%tQG(uz<(kDXejWAzRO2Bs0Ks}4}(fpAlWxa$eM`-gX^(_{p%`6ows3D zyhO+coh?O+DlzO7FqUbZS-}lwnq%)`$YqGb z6Jtn>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oH(`IC%8MQSf-`JSG3KRS&Q36xj{Iz+B44U2T35QVC zx7`pH+amT~NXv{a#w>fyKb#YjSo)Vc&&3|h`MtPIsrb@@!C0hLaaldckF_~r%K8~NT} zj1EjZxO08e-b@+5Ih4WW=Jdsi1ZgMfT4VHx=1ct0J=Okzd+?bcM3*z_&CW*aWyFNO zMu|mH*H*&K`TmaJ%aVJTVE68z+^%MfTSrA215m1^2Oi(KZ1+iST)YeCk!4UAguTz7 zjZAYNrwr2KRMIKA1m)zOH@^HJ>wIxN7*j4hQ!{Pp;8ad(gi`jWFpaLrw-HUF5wtAV zP5=(7Bu?uFvC|BqV7D%v|GcpG+r;5p9cG#0L++WD3ATiM=3I8mJ|gWXKmK`UbQ88Z z_rZibsfGa3G4zu(+xm&zU+U~08zhS*YiodgRfZp$xC zBXG=T(}55(jO| zp;>#kNq+ANt9lb!qi`moN-3f9kLdg@wbo1O12M~^BbryLiM#;+iAZ<=r;NwV3;(dF zk9Xp(=!Z)TSiO z!Ja=t=Vtl>VSsy};rIKG=V;j8wi+4*(?w@pcUj!TQZmJYy5^(k*>ylqJ!hC+w&)G{ z-=JT#ZW^LTBZ@A9Ze(jHT6;gBOBJ$kGQA%6`OOginO`mG;^5pkgtM9vhCz9|;oICE z1e?g>d-d>|QA`Y{ZhV<8dBu}7H&Z=Op)IM1C;d9FpE;S1RlG1(Yr43FeKqJElX^Gk zog3$hb`YK7s7(`T?gH0pPZ}-mL;#)+|Fa!}?jL4GXQ;63lhR<_x;CQ6?*=rmvZhkC If>p$S02Fu=SpWb4 literal 0 HcmV?d00001 diff --git a/icons/icon-96x96.png b/icons/icon-96x96.png new file mode 100644 index 0000000000000000000000000000000000000000..558b0e5fd07c5d7dcbda40a6835375f35e965390 GIT binary patch literal 8506 zcmb7qWl)?k+wNk81qzE5cPM3{xVyW%ySo%A4#nMz6?b=cx8hbPQk=zEC=MTezxU@k zGv`bu@*|l^^4z&3Pa>2QB;O+wAOiq^_tH{gDsQ#Xzl`+mt=v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&dlh|`ac%IyCp3CIy}n0*nBF5Z-Obikw>GFY(aN@h?ZhD{!$VrNv->$ zZ+04e!e{a|>yo608TQz<2`4kp)HzaF2-!Wk1Q0??MJE2r2m^!u`%7!|l@apGj*>R* ziiW%EK{>9tRC0|IU*T=(qkK+9Rd`G)6}DUV(@9td%GOb*1TqIU$ujhZ~5)p8-gy2_y`rh+?5nnPz!aOChE?@ufxekTxBU zYg0a2qI0n#D6wq04tGqJvLy-o=cTW_K-r!7OeC^$U)z6Qn!*o$?A5a9#I>47q0T+e{mjoDL+OcTyb9VgT4X`B-CEk$rDdLAo5&h|w-u-S%YeB4yW z-+;)pr}@RF=7uz!wBdztwbX|i{VryEyY@D>`NC;q)L@Gw3R`7PcY!nLihE&F7Bp8d zjP0$OEfg}FSmkR`nSDNRi|pHLD-diruYz}U*5PE<4adP@i+NKD_Kyz8T)UDp6cT@k z@u?L8uZd7i=QkOmfbza2QymjSb@XK49tdpxdkbLt{P5e^bo^C|kk@FUV$>(cvqDVw zDQs@8fL>5+h%&Bc7P5#a47KOa@bZfeh--Pyw(pNK^cX!68&T~O{4~21`}~0j?!Jhd zD1OP&Gz_Ti=X#b#;aDabO9+9x{%k9VS^8u;=vdT`QkhqKt-t>(xBq()bR5mI656E> zYt^TA!i1?tb2`FSOj;;uXS`W!ReD|N4h1X_`S+^ir8*Z+%x9dnaeTDmd${5{2oz(oc PR)Dm)f>^bPQPBSYkIyc$ literal 0 HcmV?d00001 diff --git a/idb-keyval-iife.min.js b/idb-keyval-iife.min.js new file mode 100644 index 0000000000..067a966f6d --- /dev/null +++ b/idb-keyval-iife.min.js @@ -0,0 +1 @@ +var idbKeyval=function(e){"use strict";class t{constructor(e="keyval-store",t="keyval"){this.storeName=t,this._dbp=new Promise((r,n)=>{const o=indexedDB.open(e,1);o.onerror=(()=>n(o.error)),o.onsuccess=(()=>r(o.result)),o.onupgradeneeded=(()=>{o.result.createObjectStore(t)})})}_withIDBStore(e,t){return this._dbp.then(r=>new Promise((n,o)=>{const s=r.transaction(this.storeName,e);s.oncomplete=(()=>n()),s.onabort=s.onerror=(()=>o(s.error)),t(s.objectStore(this.storeName))}))}}let r;function n(){return r||(r=new t),r}return e.Store=t,e.get=function(e,t=n()){let r;return t._withIDBStore("readonly",t=>{r=t.get(e)}).then(()=>r.result)},e.set=function(e,t,r=n()){return r._withIDBStore("readwrite",r=>{r.put(t,e)})},e.del=function(e,t=n()){return t._withIDBStore("readwrite",t=>{t.delete(e)})},e.clear=function(e=n()){return e._withIDBStore("readwrite",e=>{e.clear()})},e.keys=function(e=n()){const t=[];return e._withIDBStore("readonly",e=>{(e.openKeyCursor||e.openCursor).call(e).onsuccess=function(){this.result&&(t.push(this.result.key),this.result.continue())}}).then(()=>t)},e}({}); \ No newline at end of file diff --git a/index.html b/index.html new file mode 100644 index 0000000000..a03060e282 --- /dev/null +++ b/index.html @@ -0,0 +1,47 @@ +

\ No newline at end of file diff --git a/manifest.webmanifest b/manifest.webmanifest new file mode 100644 index 0000000000..9d043ac336 --- /dev/null +++ b/manifest.webmanifest @@ -0,0 +1 @@ +{"name":"gatsby-starter-default","short_name":"starter","start_url":"/","background_color":"#722ED1","theme_color":"#722ED1","display":"minimal-ui","icons":[{"src":"icons/icon-48x48.png?v=40b8872b4d87c3cdc6162b11ecf88dc1","sizes":"48x48","type":"image/png"},{"src":"icons/icon-72x72.png?v=40b8872b4d87c3cdc6162b11ecf88dc1","sizes":"72x72","type":"image/png"},{"src":"icons/icon-96x96.png?v=40b8872b4d87c3cdc6162b11ecf88dc1","sizes":"96x96","type":"image/png"},{"src":"icons/icon-144x144.png?v=40b8872b4d87c3cdc6162b11ecf88dc1","sizes":"144x144","type":"image/png"},{"src":"icons/icon-192x192.png?v=40b8872b4d87c3cdc6162b11ecf88dc1","sizes":"192x192","type":"image/png"},{"src":"icons/icon-256x256.png?v=40b8872b4d87c3cdc6162b11ecf88dc1","sizes":"256x256","type":"image/png"},{"src":"icons/icon-384x384.png?v=40b8872b4d87c3cdc6162b11ecf88dc1","sizes":"384x384","type":"image/png"},{"src":"icons/icon-512x512.png?v=40b8872b4d87c3cdc6162b11ecf88dc1","sizes":"512x512","type":"image/png"}]} \ No newline at end of file diff --git a/offline-plugin-app-shell-fallback/index.html b/offline-plugin-app-shell-fallback/index.html new file mode 100644 index 0000000000..252d6f898d --- /dev/null +++ b/offline-plugin-app-shell-fallback/index.html @@ -0,0 +1,47 @@ + \ No newline at end of file diff --git a/page-data/404.html/page-data.json b/page-data/404.html/page-data.json new file mode 100644 index 0000000000..6aa78f65ca --- /dev/null +++ b/page-data/404.html/page-data.json @@ -0,0 +1 @@ +{"componentChunkName":"component---node-modules-antv-gatsby-theme-antv-site-pages-404-tsx","path":"/404.html","result":{"pageContext":{"isCreatedByStatefulCreatePages":true,"slug":"/404/","langKey":"zh"}}} \ No newline at end of file diff --git a/page-data/404/page-data.json b/page-data/404/page-data.json new file mode 100644 index 0000000000..9b866fd399 --- /dev/null +++ b/page-data/404/page-data.json @@ -0,0 +1 @@ +{"componentChunkName":"component---node-modules-antv-gatsby-theme-antv-site-pages-404-tsx","path":"/404","result":{"pageContext":{"isCreatedByStatefulCreatePages":true,"slug":"/404/","langKey":"zh"}}} \ No newline at end of file diff --git a/page-data/app-data.json b/page-data/app-data.json new file mode 100644 index 0000000000..f073b28858 --- /dev/null +++ b/page-data/app-data.json @@ -0,0 +1 @@ +{"webpackCompilationHash":"7bfb4d1a12c65b5c3447"} diff --git a/page-data/en/page-data.json b/page-data/en/page-data.json new file mode 100644 index 0000000000..857a249026 --- /dev/null +++ b/page-data/en/page-data.json @@ -0,0 +1 @@ +{"componentChunkName":"component---site-pages-index-en-ts","path":"/en","result":{"pageContext":{"isCreatedByStatefulCreatePages":true,"slug":"/en/","langKey":"en"}}} \ No newline at end of file diff --git a/page-data/index/page-data.json b/page-data/index/page-data.json new file mode 100644 index 0000000000..ad239041b4 --- /dev/null +++ b/page-data/index/page-data.json @@ -0,0 +1 @@ +{"componentChunkName":"component---node-modules-antv-gatsby-theme-antv-site-pages-index-tsx","path":"/","result":{"pageContext":{"isCreatedByStatefulCreatePages":true,"slug":"/","langKey":"zh"}}} \ No newline at end of file diff --git a/page-data/offline-plugin-app-shell-fallback/page-data.json b/page-data/offline-plugin-app-shell-fallback/page-data.json new file mode 100644 index 0000000000..ae9deb29a7 --- /dev/null +++ b/page-data/offline-plugin-app-shell-fallback/page-data.json @@ -0,0 +1 @@ +{"componentChunkName":"component---node-modules-gatsby-plugin-offline-app-shell-js","path":"/offline-plugin-app-shell-fallback","result":{"pageContext":{"isCreatedByStatefulCreatePages":false}}} \ No newline at end of file diff --git a/page-data/zh/docs/API/L7/page-data.json b/page-data/zh/docs/API/L7/page-data.json new file mode 100644 index 0000000000..e78657e7fe --- /dev/null +++ b/page-data/zh/docs/API/L7/page-data.json @@ -0,0 +1 @@ +{"componentChunkName":"component---node-modules-antv-gatsby-theme-antv-site-templates-document-tsx","path":"/zh/docs/API/L7","result":{"data":{"site":{"siteMetadata":{"title":"L7","githubUrl":"https://github.com/antvis/antvis.github.io","docs":[{"slug":"specification","title":{"zh":"简介","en":"introduction"},"order":null},{"slug":"manual/tutorial","title":{"zh":"教程","en":"tutorial"},"order":null},{"slug":"API/L7.md","title":{"zh":"简介","en":"intro"},"order":1},{"slug":"API/component","title":{"zh":"组件","en":"Component"},"order":1}]},"pathPrefix":"/gatsby-theme-antv"},"markdownRemark":{"html":"","tableOfContents":"","fields":{"slug":"/zh/docs/API/L7","readingTime":{"text":"0 min read","time":0}},"frontmatter":{"title":"简介"},"parent":{"__typename":"File","relativePath":"API/L7.md"}},"allMarkdownRemark":{"edges":[{"node":{"fields":{"slug":"/zh/docs/manual/tutorial/quickStart"},"frontmatter":{"title":"快速上手"}}},{"node":{"fields":{"slug":"/zh/docs/API/L7"},"frontmatter":{"title":"简介"}}},{"node":{"fields":{"slug":"/zh/docs/API/component/popup"},"frontmatter":{"title":"地图信息框"}}},{"node":{"fields":{"slug":"/zh/docs/API/component/marker"},"frontmatter":{"title":"地图标注"}}},{"node":{"fields":{"slug":"/zh/examples/point/basic"},"frontmatter":{"title":"气泡图"}}},{"node":{"fields":{"slug":"/zh/docs/manual/tutorial/data"},"frontmatter":{"title":"数据"}}},{"node":{"fields":{"slug":"/zh/docs/API/component/control"},"frontmatter":{"title":"地图组件"}}},{"node":{"fields":{"slug":"/zh/docs/specification/introduction"},"frontmatter":{"title":"简介"}}}]}},"pageContext":{"isCreatedByStatefulCreatePages":false,"prev":{"fields":{"slug":"/zh/docs/manual/tutorial/quickStart"}},"next":{"fields":{"slug":"/zh/docs/manual/tutorial/data"}}}}} \ No newline at end of file diff --git a/page-data/zh/docs/API/component/control/page-data.json b/page-data/zh/docs/API/component/control/page-data.json new file mode 100644 index 0000000000..3d9803068d --- /dev/null +++ b/page-data/zh/docs/API/component/control/page-data.json @@ -0,0 +1 @@ +{"componentChunkName":"component---node-modules-antv-gatsby-theme-antv-site-templates-document-tsx","path":"/zh/docs/API/component/control","result":{"data":{"site":{"siteMetadata":{"title":"L7","githubUrl":"https://github.com/antvis/antvis.github.io","docs":[{"slug":"specification","title":{"zh":"简介","en":"introduction"},"order":null},{"slug":"manual/tutorial","title":{"zh":"教程","en":"tutorial"},"order":null},{"slug":"API/L7.md","title":{"zh":"简介","en":"intro"},"order":1},{"slug":"API/component","title":{"zh":"组件","en":"Component"},"order":1}]},"pathPrefix":"/gatsby-theme-antv"},"markdownRemark":{"html":"

control

\n

地图组件 用于控制地图的状态如果平移,缩放,或者展示地图一些的辅助信息如图例,比例尺

\n

构造函数

\n
const baseControl = new L7.Control.Base(option);\n
\n

option

\n

 position: string 控件位置支持是个方位 bottomright, topright, bottomleft, topleft

\n

scene 内置地图组件

\n

zoom 地图放大缩小  默认添加
Scale 地图比例尺   默认添加
attribution 地图数据属性  默认添加
layer 图层列表

\n

scene配置项设置控件添加状态

\n
scene = new L7.scene({\n  zoomControl: true,\n  scaleControl: true,\n  attributionControl: true,\n});\n
\n

\n

Zoom

\n

放大缩小组件 默认 左上角

\n
new L7.Control.Zoom({\n  position: 'topleft',\n}).addTo(scene);\n
\n

Scale

\n

比例尺组件默认左下角

\n
new L7.Control.Scale({\n  position: 'bottomleft',\n}).addTo(scene);\n
\n

attribution

\n

默认右下角

\n
new L7.Control.Attribution({\n  position: 'bottomleft',\n}).addTo(scene);\n
\n

layer

\n

图层列表目前只支持可视化overlayers 图层控制

\n
var overlayers = {\n  围栏填充: layer,\n  围栏边界: layer2,\n};\nnew L7.Control.Layers({\n  overlayers: overlayers,\n}).addTo(scene);\n
\n

方法

\n

onAdd

\n

组件添加到地图Scene时调用,自定义组件时需要实现此方法

\n

addTo

\n

添加到地图scene

\n
control.addTo(scene);\n
\n

setPosition

\n

设置组件位置

\n
control.setPosition('bottomright');\n
\n

remove

\n

移除地图组件

\n
control.remove();\n
\n

示例代码

\n

自定义图例控件

\n

源码

\n
var legend = new L7.Control.Base({\n  position: 'bottomright',\n});\nlegend.onAdd = function() {\n  var el = document.createElement('div');\n  el.className = 'infolegend legend';\n  var grades = [0, 8, 15, 30, 65, 120];\n  for (var i = 0; i < grades.length; i++) {\n    el.innerHTML +=\n      '<i style=\"background:' +\n      colors[i] +\n      '\"></i> ' +\n      grades[i] +\n      (grades[i + 1] ? '–' + grades[i + 1] + '<br>' : '+');\n  }\n  return el;\n};\nlegend.addTo(scene);\n
\n

\n

FAQ

","tableOfContents":"","fields":{"slug":"/zh/docs/API/component/control","readingTime":{"text":"2 min read","time":60899.99999999999}},"frontmatter":{"title":"地图组件"},"parent":{"__typename":"File","relativePath":"API/component/control.md"}},"allMarkdownRemark":{"edges":[{"node":{"fields":{"slug":"/zh/docs/manual/tutorial/quickStart"},"frontmatter":{"title":"快速上手"}}},{"node":{"fields":{"slug":"/zh/docs/API/L7"},"frontmatter":{"title":"简介"}}},{"node":{"fields":{"slug":"/zh/docs/API/component/popup"},"frontmatter":{"title":"地图信息框"}}},{"node":{"fields":{"slug":"/zh/docs/API/component/marker"},"frontmatter":{"title":"地图标注"}}},{"node":{"fields":{"slug":"/zh/examples/point/basic"},"frontmatter":{"title":"气泡图"}}},{"node":{"fields":{"slug":"/zh/docs/manual/tutorial/data"},"frontmatter":{"title":"数据"}}},{"node":{"fields":{"slug":"/zh/docs/API/component/control"},"frontmatter":{"title":"地图组件"}}},{"node":{"fields":{"slug":"/zh/docs/specification/introduction"},"frontmatter":{"title":"简介"}}}]}},"pageContext":{"isCreatedByStatefulCreatePages":false,"prev":{"fields":{"slug":"/zh/docs/manual/tutorial/data"}},"next":{"fields":{"slug":"/zh/docs/specification/introduction"}}}}} \ No newline at end of file diff --git a/page-data/zh/docs/API/component/marker/page-data.json b/page-data/zh/docs/API/component/marker/page-data.json new file mode 100644 index 0000000000..1ea9f7a34d --- /dev/null +++ b/page-data/zh/docs/API/component/marker/page-data.json @@ -0,0 +1 @@ +{"componentChunkName":"component---node-modules-antv-gatsby-theme-antv-site-templates-document-tsx","path":"/zh/docs/API/component/marker","result":{"data":{"site":{"siteMetadata":{"title":"L7","githubUrl":"https://github.com/antvis/antvis.github.io","docs":[{"slug":"specification","title":{"zh":"简介","en":"introduction"},"order":null},{"slug":"manual/tutorial","title":{"zh":"教程","en":"tutorial"},"order":null},{"slug":"API/L7.md","title":{"zh":"简介","en":"intro"},"order":1},{"slug":"API/component","title":{"zh":"组件","en":"Component"},"order":1}]},"pathPrefix":"/gatsby-theme-antv"},"markdownRemark":{"html":"

Marker 地图标注 目前只支持2D dom标注

\n

构造函数

\n

Marker
const Marker = new L7.Marker(option)

\n

option

\n
    \n
  • color        string   \"map-marker.png\" 设置默认marker的颜色
  • \n
  • element    Dom|string    自定义marker Dom节点,可以是dom实例,也可以是dom id
  • \n
  • anchor     string  锚点位置  支持 center, top, top-left, top-right, bottom, bottom-left,bottom-                        right,left, right
  • \n
  • offset    Array  偏移量 [ 0, 0 ] 分别表示 X, Y 的偏移量
  • \n
\n

方法

\n

setLnglat

\n

设置marker经纬度位置

\n

addTo

\n

将marker添加到地图Scene

\n

remove

\n

移除marker

\n

getElement

\n

获取marker dom Element

\n

getLngLat

\n

获取marker经纬度坐标

\n

togglePopup

\n

开启或者关闭marker弹出框

\n

setPopup

\n

为marker设置popup

\n

getPopup

\n

获取marker弹出框

\n

示例代码

\n

默认Marker

\n

**
const marker = new L7.Marker({color:'blue'})

\n

自定义Marker

\n
var el = document.createElement('label');\nel.className = 'lableclass';\nel.textContent = data[i].v;\nel.style.background = getColor(data[i].v);\nnew L7.Marker({\n  element: el,\n})\n  .setLnglat([data[i].x * 1, data[i].y])\n  .addTo(scene);\n
\n

设置 popup

\n
var popup = new L7.Popup({\n  anchor: 'left',\n}).setText(item.name);\n\nnew L7.Marker({\n  element: el,\n})\n  .setLnglat(item.coordinates)\n  .setPopup(popup)\n  .addTo(scene);\n
","tableOfContents":"","fields":{"slug":"/zh/docs/API/component/marker","readingTime":{"text":"1 min read","time":42300}},"frontmatter":{"title":"地图标注"},"parent":{"__typename":"File","relativePath":"API/component/marker.md"}},"allMarkdownRemark":{"edges":[{"node":{"fields":{"slug":"/zh/docs/manual/tutorial/quickStart"},"frontmatter":{"title":"快速上手"}}},{"node":{"fields":{"slug":"/zh/docs/API/L7"},"frontmatter":{"title":"简介"}}},{"node":{"fields":{"slug":"/zh/docs/API/component/popup"},"frontmatter":{"title":"地图信息框"}}},{"node":{"fields":{"slug":"/zh/docs/API/component/marker"},"frontmatter":{"title":"地图标注"}}},{"node":{"fields":{"slug":"/zh/examples/point/basic"},"frontmatter":{"title":"气泡图"}}},{"node":{"fields":{"slug":"/zh/docs/manual/tutorial/data"},"frontmatter":{"title":"数据"}}},{"node":{"fields":{"slug":"/zh/docs/API/component/control"},"frontmatter":{"title":"地图组件"}}},{"node":{"fields":{"slug":"/zh/docs/specification/introduction"},"frontmatter":{"title":"简介"}}}]}},"pageContext":{"isCreatedByStatefulCreatePages":false,"prev":{"fields":{"slug":"/zh/docs/API/component/popup"}},"next":{"fields":{"slug":"/zh/examples/point/basic"}}}}} \ No newline at end of file diff --git a/page-data/zh/docs/API/component/popup/page-data.json b/page-data/zh/docs/API/component/popup/page-data.json new file mode 100644 index 0000000000..a65d27b60f --- /dev/null +++ b/page-data/zh/docs/API/component/popup/page-data.json @@ -0,0 +1 @@ +{"componentChunkName":"component---node-modules-antv-gatsby-theme-antv-site-templates-document-tsx","path":"/zh/docs/API/component/popup","result":{"data":{"site":{"siteMetadata":{"title":"L7","githubUrl":"https://github.com/antvis/antvis.github.io","docs":[{"slug":"specification","title":{"zh":"简介","en":"introduction"},"order":null},{"slug":"manual/tutorial","title":{"zh":"教程","en":"tutorial"},"order":null},{"slug":"API/L7.md","title":{"zh":"简介","en":"intro"},"order":1},{"slug":"API/component","title":{"zh":"组件","en":"Component"},"order":1}]},"pathPrefix":"/gatsby-theme-antv"},"markdownRemark":{"html":"

popup

\n

地图标注信息窗口,用于展示地图要素的属性信息

\n

构造函数

\n

Popup

\n
const popup = new L7.Popup(option);\n
\n

option

\n
    \n
  • closeButton
  • \n
  • closeOnClick
  • \n
  • maxWidth
  • \n
  • anchor
  • \n
\n

方法

\n

setLnglat

\n

设置popup的经纬度位置
参数:lnglat 经纬度数组 [112,32]

\n
popup.setLnglat([112, 32]);\n
\n

addTo

\n

参数:scene 地图scene实例

\n

将popup添加到地图scene显示

\n
popup.addTo(scene);\n
\n

setHtml

\n

参数:html 字符串

\n

设置popup html 内容

\n
var html =\n  '<p>\\u7701\\u4EFD\\uFF1A' +\n  feature.s +\n  '</p>\\n        <p>\\u5730\\u533A\\uFF1A' +\n  feature.m +\n  '</p>\\n        <p>\\u6E29\\u5EA6\\uFF1A' +\n  feature.t +\n  '</p>\\n        ';\npopup.setHtml(html);\n
\n

setText

\n

设置 popup 显示文本内容

\n
popup.setText('hello world');\n
\n

remove

\n

移除popup

\n
popup.remove();\n
\n

事件

\n

close

\n
popup.on('close', () => {});\n
\n

示例代码

\n

添加popup

\n
  \n  var html = '<p>'+feature.m+'</p>';\n  const new L7.Popup().setLnglat([112, 32]).setHTML(html).addTo(scene);
\n

FAQ

","tableOfContents":"","fields":{"slug":"/zh/docs/API/component/popup","readingTime":{"text":"1 min read","time":33000}},"frontmatter":{"title":"地图信息框"},"parent":{"__typename":"File","relativePath":"API/component/popup.md"}},"allMarkdownRemark":{"edges":[{"node":{"fields":{"slug":"/zh/docs/manual/tutorial/quickStart"},"frontmatter":{"title":"快速上手"}}},{"node":{"fields":{"slug":"/zh/docs/API/L7"},"frontmatter":{"title":"简介"}}},{"node":{"fields":{"slug":"/zh/docs/API/component/popup"},"frontmatter":{"title":"地图信息框"}}},{"node":{"fields":{"slug":"/zh/docs/API/component/marker"},"frontmatter":{"title":"地图标注"}}},{"node":{"fields":{"slug":"/zh/examples/point/basic"},"frontmatter":{"title":"气泡图"}}},{"node":{"fields":{"slug":"/zh/docs/manual/tutorial/data"},"frontmatter":{"title":"数据"}}},{"node":{"fields":{"slug":"/zh/docs/API/component/control"},"frontmatter":{"title":"地图组件"}}},{"node":{"fields":{"slug":"/zh/docs/specification/introduction"},"frontmatter":{"title":"简介"}}}]}},"pageContext":{"isCreatedByStatefulCreatePages":false,"prev":{"fields":{"slug":"/zh/docs/specification/introduction"}},"next":{"fields":{"slug":"/zh/docs/API/component/marker"}}}}} \ No newline at end of file diff --git a/page-data/zh/docs/manual/tutorial/data/page-data.json b/page-data/zh/docs/manual/tutorial/data/page-data.json new file mode 100644 index 0000000000..80438c4c17 --- /dev/null +++ b/page-data/zh/docs/manual/tutorial/data/page-data.json @@ -0,0 +1 @@ +{"componentChunkName":"component---node-modules-antv-gatsby-theme-antv-site-templates-document-tsx","path":"/zh/docs/manual/tutorial/data","result":{"data":{"site":{"siteMetadata":{"title":"L7","githubUrl":"https://github.com/antvis/antvis.github.io","docs":[{"slug":"specification","title":{"zh":"简介","en":"introduction"},"order":null},{"slug":"manual/tutorial","title":{"zh":"教程","en":"tutorial"},"order":null},{"slug":"API/L7.md","title":{"zh":"简介","en":"intro"},"order":1},{"slug":"API/component","title":{"zh":"组件","en":"Component"},"order":1}]},"pathPrefix":"/gatsby-theme-antv"},"markdownRemark":{"html":"

数据

\n

目前L7支持的数据格式有GeoJson,CSV,JSon Image

\n

GeoJSON 支持点、线、面,等所有的空间数据格式。
CSV 支持,点,线段,弧线的支持。
JSON 支持简单的点、线,面,不支持多点,多线的,多面数据格式。

\n

GeoJSON

\n
\n

GeoJSON是一种对各种地理数据结构进行编码的格式。GeoJSON对象可以表示几何、特征或者特征集合。GeoJSON支持下面几何类型:点、线、面、多点、多线、多面和几何集合。GeoJSON里的特征包含一个几何对象和其他属性,特征集合表示一系列特征。

\n
\n
{\n  \"type\": \"FeatureCollection\",\n  \"features\": [\n    {\n      \"type\": \"Feature\",\n      \"properties\": {},\n      \"geometry\": {\n        \"type\": \"Polygon\",\n        \"coordinates\": [\n          [\n            [110.478515625, 32.76880048488168],\n            [117.68554687499999, 32.76880048488168],\n            [117.68554687499999, 37.64903402157866],\n            [110.478515625, 37.64903402157866],\n            [110.478515625, 32.76880048488168]\n          ]\n        ]\n      }\n    }\n  ]\n}\n
\n

地理统计分析工具

\n

turfjs:  地理数据计算,处理,统计,分析的Javascript 库

\n

在线工具

\n

http://geojson.io/    可以在线查看,绘制,修改GeoJSON数据

\n

https://mapshaper.org/  可以查看较大的geojson,还能够简化GeoJSON数据

","tableOfContents":"","fields":{"slug":"/zh/docs/manual/tutorial/data","readingTime":{"text":"1 min read","time":21299.999999999996}},"frontmatter":{"title":"数据"},"parent":{"__typename":"File","relativePath":"manual/tutorial/data.md"}},"allMarkdownRemark":{"edges":[{"node":{"fields":{"slug":"/zh/docs/manual/tutorial/quickStart"},"frontmatter":{"title":"快速上手"}}},{"node":{"fields":{"slug":"/zh/docs/API/L7"},"frontmatter":{"title":"简介"}}},{"node":{"fields":{"slug":"/zh/docs/API/component/popup"},"frontmatter":{"title":"地图信息框"}}},{"node":{"fields":{"slug":"/zh/docs/API/component/marker"},"frontmatter":{"title":"地图标注"}}},{"node":{"fields":{"slug":"/zh/examples/point/basic"},"frontmatter":{"title":"气泡图"}}},{"node":{"fields":{"slug":"/zh/docs/manual/tutorial/data"},"frontmatter":{"title":"数据"}}},{"node":{"fields":{"slug":"/zh/docs/API/component/control"},"frontmatter":{"title":"地图组件"}}},{"node":{"fields":{"slug":"/zh/docs/specification/introduction"},"frontmatter":{"title":"简介"}}}]}},"pageContext":{"isCreatedByStatefulCreatePages":false,"prev":{"fields":{"slug":"/zh/docs/API/L7"}},"next":{"fields":{"slug":"/zh/docs/API/component/control"}}}}} \ No newline at end of file diff --git a/page-data/zh/docs/manual/tutorial/quickStart/page-data.json b/page-data/zh/docs/manual/tutorial/quickStart/page-data.json new file mode 100644 index 0000000000..9c3629cbb9 --- /dev/null +++ b/page-data/zh/docs/manual/tutorial/quickStart/page-data.json @@ -0,0 +1 @@ +{"componentChunkName":"component---node-modules-antv-gatsby-theme-antv-site-templates-document-tsx","path":"/zh/docs/manual/tutorial/quickStart","result":{"data":{"site":{"siteMetadata":{"title":"L7","githubUrl":"https://github.com/antvis/antvis.github.io","docs":[{"slug":"specification","title":{"zh":"简介","en":"introduction"},"order":null},{"slug":"manual/tutorial","title":{"zh":"教程","en":"tutorial"},"order":null},{"slug":"API/L7.md","title":{"zh":"简介","en":"intro"},"order":1},{"slug":"API/component","title":{"zh":"组件","en":"Component"},"order":1}]},"pathPrefix":"/gatsby-theme-antv"},"markdownRemark":{"html":"

内容

","tableOfContents":"","fields":{"slug":"/zh/docs/manual/tutorial/quickStart","readingTime":{"text":"1 min read","time":300}},"frontmatter":{"title":"快速上手"},"parent":{"__typename":"File","relativePath":"manual/tutorial/quickStart.md"}},"allMarkdownRemark":{"edges":[{"node":{"fields":{"slug":"/zh/docs/manual/tutorial/quickStart"},"frontmatter":{"title":"快速上手"}}},{"node":{"fields":{"slug":"/zh/docs/API/L7"},"frontmatter":{"title":"简介"}}},{"node":{"fields":{"slug":"/zh/docs/API/component/popup"},"frontmatter":{"title":"地图信息框"}}},{"node":{"fields":{"slug":"/zh/docs/API/component/marker"},"frontmatter":{"title":"地图标注"}}},{"node":{"fields":{"slug":"/zh/examples/point/basic"},"frontmatter":{"title":"气泡图"}}},{"node":{"fields":{"slug":"/zh/docs/manual/tutorial/data"},"frontmatter":{"title":"数据"}}},{"node":{"fields":{"slug":"/zh/docs/API/component/control"},"frontmatter":{"title":"地图组件"}}},{"node":{"fields":{"slug":"/zh/docs/specification/introduction"},"frontmatter":{"title":"简介"}}}]}},"pageContext":{"isCreatedByStatefulCreatePages":false,"prev":null,"next":{"fields":{"slug":"/zh/docs/API/L7"}}}}} \ No newline at end of file diff --git a/page-data/zh/docs/specification/introduction/page-data.json b/page-data/zh/docs/specification/introduction/page-data.json new file mode 100644 index 0000000000..e185a212a3 --- /dev/null +++ b/page-data/zh/docs/specification/introduction/page-data.json @@ -0,0 +1 @@ +{"componentChunkName":"component---node-modules-antv-gatsby-theme-antv-site-templates-document-tsx","path":"/zh/docs/specification/introduction","result":{"data":{"site":{"siteMetadata":{"title":"L7","githubUrl":"https://github.com/antvis/antvis.github.io","docs":[{"slug":"specification","title":{"zh":"简介","en":"introduction"},"order":null},{"slug":"manual/tutorial","title":{"zh":"教程","en":"tutorial"},"order":null},{"slug":"API/L7.md","title":{"zh":"简介","en":"intro"},"order":1},{"slug":"API/component","title":{"zh":"组件","en":"Component"},"order":1}]},"pathPrefix":"/gatsby-theme-antv"},"markdownRemark":{"html":"

L7 地理空间可视化设计语言

","tableOfContents":"","fields":{"slug":"/zh/docs/specification/introduction","readingTime":{"text":"1 min read","time":600}},"frontmatter":{"title":"简介"},"parent":{"__typename":"File","relativePath":"specification/introduction.md"}},"allMarkdownRemark":{"edges":[{"node":{"fields":{"slug":"/zh/docs/manual/tutorial/quickStart"},"frontmatter":{"title":"快速上手"}}},{"node":{"fields":{"slug":"/zh/docs/API/L7"},"frontmatter":{"title":"简介"}}},{"node":{"fields":{"slug":"/zh/docs/API/component/popup"},"frontmatter":{"title":"地图信息框"}}},{"node":{"fields":{"slug":"/zh/docs/API/component/marker"},"frontmatter":{"title":"地图标注"}}},{"node":{"fields":{"slug":"/zh/examples/point/basic"},"frontmatter":{"title":"气泡图"}}},{"node":{"fields":{"slug":"/zh/docs/manual/tutorial/data"},"frontmatter":{"title":"数据"}}},{"node":{"fields":{"slug":"/zh/docs/API/component/control"},"frontmatter":{"title":"地图组件"}}},{"node":{"fields":{"slug":"/zh/docs/specification/introduction"},"frontmatter":{"title":"简介"}}}]}},"pageContext":{"isCreatedByStatefulCreatePages":false,"prev":{"fields":{"slug":"/zh/docs/API/component/control"}},"next":{"fields":{"slug":"/zh/docs/API/component/popup"}}}}} \ No newline at end of file diff --git a/page-data/zh/examples/point/basic/page-data.json b/page-data/zh/examples/point/basic/page-data.json new file mode 100644 index 0000000000..c97f90215e --- /dev/null +++ b/page-data/zh/examples/point/basic/page-data.json @@ -0,0 +1 @@ +{"componentChunkName":"component---node-modules-antv-gatsby-theme-antv-site-templates-example-tsx","path":"/zh/examples/point/basic","result":{"data":{"site":{"siteMetadata":{"title":"L7","githubUrl":"https://github.com/antvis/antvis.github.io","examples":[{"slug":"point","icon":"point","title":{"zh":"点图层","en":"PointLayer"}}]},"pathPrefix":"/gatsby-theme-antv"},"allMarkdownRemark":{"edges":[{"node":{"html":"

内容

","fields":{"slug":"/zh/docs/manual/tutorial/quickStart"},"frontmatter":{"title":"快速上手","order":0,"icon":null},"parent":{"__typename":"File","relativePath":"manual/tutorial/quickStart.md"}}},{"node":{"html":"","fields":{"slug":"/zh/docs/API/L7"},"frontmatter":{"title":"简介","order":0,"icon":null},"parent":{"__typename":"File","relativePath":"API/L7.md"}}},{"node":{"html":"

popup

\n

地图标注信息窗口,用于展示地图要素的属性信息

\n

构造函数

\n

Popup

\n
const popup = new L7.Popup(option);\n
\n

option

\n
    \n
  • closeButton
  • \n
  • closeOnClick
  • \n
  • maxWidth
  • \n
  • anchor
  • \n
\n

方法

\n

setLnglat

\n

设置popup的经纬度位置
参数:lnglat 经纬度数组 [112,32]

\n
popup.setLnglat([112, 32]);\n
\n

addTo

\n

参数:scene 地图scene实例

\n

将popup添加到地图scene显示

\n
popup.addTo(scene);\n
\n

setHtml

\n

参数:html 字符串

\n

设置popup html 内容

\n
var html =\n  '<p>\\u7701\\u4EFD\\uFF1A' +\n  feature.s +\n  '</p>\\n        <p>\\u5730\\u533A\\uFF1A' +\n  feature.m +\n  '</p>\\n        <p>\\u6E29\\u5EA6\\uFF1A' +\n  feature.t +\n  '</p>\\n        ';\npopup.setHtml(html);\n
\n

setText

\n

设置 popup 显示文本内容

\n
popup.setText('hello world');\n
\n

remove

\n

移除popup

\n
popup.remove();\n
\n

事件

\n

close

\n
popup.on('close', () => {});\n
\n

示例代码

\n

添加popup

\n
  \n  var html = '<p>'+feature.m+'</p>';\n  const new L7.Popup().setLnglat([112, 32]).setHTML(html).addTo(scene);
\n

FAQ

","fields":{"slug":"/zh/docs/API/component/popup"},"frontmatter":{"title":"地图信息框","order":0,"icon":null},"parent":{"__typename":"File","relativePath":"API/component/popup.md"}}},{"node":{"html":"

Marker 地图标注 目前只支持2D dom标注

\n

构造函数

\n

Marker
const Marker = new L7.Marker(option)

\n

option

\n
    \n
  • color        string   \"map-marker.png\" 设置默认marker的颜色
  • \n
  • element    Dom|string    自定义marker Dom节点,可以是dom实例,也可以是dom id
  • \n
  • anchor     string  锚点位置  支持 center, top, top-left, top-right, bottom, bottom-left,bottom-                        right,left, right
  • \n
  • offset    Array  偏移量 [ 0, 0 ] 分别表示 X, Y 的偏移量
  • \n
\n

方法

\n

setLnglat

\n

设置marker经纬度位置

\n

addTo

\n

将marker添加到地图Scene

\n

remove

\n

移除marker

\n

getElement

\n

获取marker dom Element

\n

getLngLat

\n

获取marker经纬度坐标

\n

togglePopup

\n

开启或者关闭marker弹出框

\n

setPopup

\n

为marker设置popup

\n

getPopup

\n

获取marker弹出框

\n

示例代码

\n

默认Marker

\n

**
const marker = new L7.Marker({color:'blue'})

\n

自定义Marker

\n
var el = document.createElement('label');\nel.className = 'lableclass';\nel.textContent = data[i].v;\nel.style.background = getColor(data[i].v);\nnew L7.Marker({\n  element: el,\n})\n  .setLnglat([data[i].x * 1, data[i].y])\n  .addTo(scene);\n
\n

设置 popup

\n
var popup = new L7.Popup({\n  anchor: 'left',\n}).setText(item.name);\n\nnew L7.Marker({\n  element: el,\n})\n  .setLnglat(item.coordinates)\n  .setPopup(popup)\n  .addTo(scene);\n
","fields":{"slug":"/zh/docs/API/component/marker"},"frontmatter":{"title":"地图标注","order":0,"icon":null},"parent":{"__typename":"File","relativePath":"API/component/marker.md"}}},{"node":{"html":"

图表的基本描述。

\n

何时使用

\n

何时使用何时使用何时使用何时使用何时使用何时使用何时使用何时使用何时使用。

","fields":{"slug":"/zh/examples/point/basic"},"frontmatter":{"title":"气泡图","order":0,"icon":null},"parent":{"__typename":"File","relativePath":"point/basic/index.zh.md"}}},{"node":{"html":"

数据

\n

目前L7支持的数据格式有GeoJson,CSV,JSon Image

\n

GeoJSON 支持点、线、面,等所有的空间数据格式。
CSV 支持,点,线段,弧线的支持。
JSON 支持简单的点、线,面,不支持多点,多线的,多面数据格式。

\n

GeoJSON

\n
\n

GeoJSON是一种对各种地理数据结构进行编码的格式。GeoJSON对象可以表示几何、特征或者特征集合。GeoJSON支持下面几何类型:点、线、面、多点、多线、多面和几何集合。GeoJSON里的特征包含一个几何对象和其他属性,特征集合表示一系列特征。

\n
\n
{\n  \"type\": \"FeatureCollection\",\n  \"features\": [\n    {\n      \"type\": \"Feature\",\n      \"properties\": {},\n      \"geometry\": {\n        \"type\": \"Polygon\",\n        \"coordinates\": [\n          [\n            [110.478515625, 32.76880048488168],\n            [117.68554687499999, 32.76880048488168],\n            [117.68554687499999, 37.64903402157866],\n            [110.478515625, 37.64903402157866],\n            [110.478515625, 32.76880048488168]\n          ]\n        ]\n      }\n    }\n  ]\n}\n
\n

地理统计分析工具

\n

turfjs:  地理数据计算,处理,统计,分析的Javascript 库

\n

在线工具

\n

http://geojson.io/    可以在线查看,绘制,修改GeoJSON数据

\n

https://mapshaper.org/  可以查看较大的geojson,还能够简化GeoJSON数据

","fields":{"slug":"/zh/docs/manual/tutorial/data"},"frontmatter":{"title":"数据","order":1,"icon":null},"parent":{"__typename":"File","relativePath":"manual/tutorial/data.md"}}},{"node":{"html":"

control

\n

地图组件 用于控制地图的状态如果平移,缩放,或者展示地图一些的辅助信息如图例,比例尺

\n

构造函数

\n
const baseControl = new L7.Control.Base(option);\n
\n

option

\n

 position: string 控件位置支持是个方位 bottomright, topright, bottomleft, topleft

\n

scene 内置地图组件

\n

zoom 地图放大缩小  默认添加
Scale 地图比例尺   默认添加
attribution 地图数据属性  默认添加
layer 图层列表

\n

scene配置项设置控件添加状态

\n
scene = new L7.scene({\n  zoomControl: true,\n  scaleControl: true,\n  attributionControl: true,\n});\n
\n

\n

Zoom

\n

放大缩小组件 默认 左上角

\n
new L7.Control.Zoom({\n  position: 'topleft',\n}).addTo(scene);\n
\n

Scale

\n

比例尺组件默认左下角

\n
new L7.Control.Scale({\n  position: 'bottomleft',\n}).addTo(scene);\n
\n

attribution

\n

默认右下角

\n
new L7.Control.Attribution({\n  position: 'bottomleft',\n}).addTo(scene);\n
\n

layer

\n

图层列表目前只支持可视化overlayers 图层控制

\n
var overlayers = {\n  围栏填充: layer,\n  围栏边界: layer2,\n};\nnew L7.Control.Layers({\n  overlayers: overlayers,\n}).addTo(scene);\n
\n

方法

\n

onAdd

\n

组件添加到地图Scene时调用,自定义组件时需要实现此方法

\n

addTo

\n

添加到地图scene

\n
control.addTo(scene);\n
\n

setPosition

\n

设置组件位置

\n
control.setPosition('bottomright');\n
\n

remove

\n

移除地图组件

\n
control.remove();\n
\n

示例代码

\n

自定义图例控件

\n

源码

\n
var legend = new L7.Control.Base({\n  position: 'bottomright',\n});\nlegend.onAdd = function() {\n  var el = document.createElement('div');\n  el.className = 'infolegend legend';\n  var grades = [0, 8, 15, 30, 65, 120];\n  for (var i = 0; i < grades.length; i++) {\n    el.innerHTML +=\n      '<i style=\"background:' +\n      colors[i] +\n      '\"></i> ' +\n      grades[i] +\n      (grades[i + 1] ? '–' + grades[i + 1] + '<br>' : '+');\n  }\n  return el;\n};\nlegend.addTo(scene);\n
\n

\n

FAQ

","fields":{"slug":"/zh/docs/API/component/control"},"frontmatter":{"title":"地图组件","order":1,"icon":null},"parent":{"__typename":"File","relativePath":"API/component/control.md"}}},{"node":{"html":"

L7 地理空间可视化设计语言

","fields":{"slug":"/zh/docs/specification/introduction"},"frontmatter":{"title":"简介","order":1,"icon":null},"parent":{"__typename":"File","relativePath":"specification/introduction.md"}}}]}},"pageContext":{"isCreatedByStatefulCreatePages":false,"prev":{"fields":{"slug":"/zh/docs/API/component/marker"}},"next":null,"exampleSections":{"examples":[{"relativePath":"point/basic/demo/point.js","absolutePath":"/Users/lizhengxue/Documents/AntV/github/L7_2.0/L7/examples/point/basic/demo/point.js","source":"import { Scene } from '@l7/scene';\nimport { PointLayer } from '@l7/layers'\nconst container = document.getElementById('container');\ncontainer.style.minHeight = '620px';\n// import data from '../data.json';\nconst scene = new Scene({\n id: 'container',\n pitch: 0,\n type: 'mapbox',\n style: 'mapbox://styles/mapbox/light-v10',\n center: [121.40, 31.258134],\n zoom: 15,\n});\nfetch('https://gw.alipayobjects.com/os/basement_prod/893d1d5f-11d9-45f3-8322-ee9140d288ae.json')\n .then((res) => res.json())\n .then((data) => {\n console.log(data);\n const pointLayer =\n new PointLayer()\n .source(data, {\n parser: {\n type: 'json',\n x: 'longitude',\n y: 'latitude'\n }\n }).shape('circle')\n .size('unit_price', [5, 25])\n .color('#2F54EB')\n .style({\n opacity: 1.0\n })\n scene.addLayer(pointLayer);\n scene.render();\n });\n\n\n","babeledSource":"(function (global, factory) {\n if (typeof define === \"function\" && define.amd) {\n define([\"@l7/scene\", \"@l7/layers\"], factory);\n } else if (typeof exports !== \"undefined\") {\n factory(require(\"@l7/scene\"), require(\"@l7/layers\"));\n } else {\n var mod = {\n exports: {}\n };\n factory(global.scene, global.layers);\n global.point = mod.exports;\n }\n})(this, function (_scene, _layers) {\n \"use strict\";\n\n var container = document.getElementById('container');\n container.style.minHeight = '620px'; // import data from '../data.json';\n\n var scene = new _scene.Scene({\n id: 'container',\n pitch: 0,\n type: 'mapbox',\n style: 'mapbox://styles/mapbox/light-v10',\n center: [121.40, 31.258134],\n zoom: 15\n });\n fetch('https://gw.alipayobjects.com/os/basement_prod/893d1d5f-11d9-45f3-8322-ee9140d288ae.json').then(function (res) {\n return res.json();\n }).then(function (data) {\n console.log(data);\n var pointLayer = new _layers.PointLayer().source(data, {\n parser: {\n type: 'json',\n x: 'longitude',\n y: 'latitude'\n }\n }).shape('circle').size('unit_price', [5, 25]).color('#2F54EB').style({\n opacity: 1.0\n });\n scene.addLayer(pointLayer);\n scene.render();\n });\n});","order":0,"filename":"point.js","title":"气泡图","screenshot":"https://gw.alipayobjects.com/mdn/antv_site/afts/img/A*KCyXTJrePiYAAAAAAAAAAABkARQnAQ"}]}}}} \ No newline at end of file diff --git a/page-data/zh/page-data.json b/page-data/zh/page-data.json new file mode 100644 index 0000000000..cafa7f124e --- /dev/null +++ b/page-data/zh/page-data.json @@ -0,0 +1 @@ +{"componentChunkName":"component---site-pages-index-zh-ts","path":"/zh","result":{"pageContext":{"isCreatedByStatefulCreatePages":true,"slug":"/zh/","langKey":"zh"}}} \ No newline at end of file diff --git a/static/d/2969191536.json b/static/d/2969191536.json new file mode 100644 index 0000000000..0dad385a49 --- /dev/null +++ b/static/d/2969191536.json @@ -0,0 +1 @@ +{"data":{"placeholderImage":null}} \ No newline at end of file diff --git a/static/d/3147659733.json b/static/d/3147659733.json new file mode 100644 index 0000000000..1573cbc16d --- /dev/null +++ b/static/d/3147659733.json @@ -0,0 +1 @@ +{"data":{"site":{"siteMetadata":{"title":"L7","githubUrl":"https://github.com/antvis/antvis.github.io","navs":[{"slug":"docs/specification","title":{"zh":"设计语言","en":"Specification"},"target":null},{"slug":"docs/API","title":{"zh":"文档","en":"document"},"target":null},{"slug":"docs/tutorial","title":{"zh":"教程","en":"tutorial"},"target":null},{"slug":"examples","title":{"zh":"图表演示","en":"Examples"},"target":null}]}}}} \ No newline at end of file diff --git a/static/d/3978990474.json b/static/d/3978990474.json new file mode 100644 index 0000000000..5279852f7c --- /dev/null +++ b/static/d/3978990474.json @@ -0,0 +1 @@ +{"data":{"site":{"siteMetadata":{"title":"L7","description":"Large-scale WebGL-powered Geospatial data visualization analysis framework"}}}} \ No newline at end of file diff --git a/styles-5d5ac81f3c32d0998151.js b/styles-5d5ac81f3c32d0998151.js new file mode 100644 index 0000000000..f4f599918e --- /dev/null +++ b/styles-5d5ac81f3c32d0998151.js @@ -0,0 +1,2 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[2],{"3GoW":function(o,n,e){o.exports={input:"Search-module--input--lOvOF"}},"44il":function(o,n,e){o.exports={container:"PlayGrounds-module--container--17Tai",cards:"PlayGrounds-module--cards--3hJak",card:"PlayGrounds-module--card--3Vq_o",current:"PlayGrounds-module--current--2cQLr"}},"49qf":function(o,n,e){},6488:function(o,n,e){},"7H9b":function(o,n,e){},"8nl2":function(o,n,e){},"9d8Q":function(o,n,e){},FPB1:function(o,n,e){o.exports={header:"Header-module--header--hrdnh",left:"Header-module--left--1dVXS",divider:"Header-module--divider--2qNp3",subProduceName:"Header-module--subProduceName--NMLtC",nav:"Header-module--nav--2_Knj",menu:"Header-module--menu--3hWNx",activeItem:"Header-module--activeItem--2xNW-",githubCorner:"Header-module--githubCorner--14Csh"}},"FoS+":function(o,n,e){},"G3+4":function(o,n,e){},GiSQ:function(o,n,e){o.exports={article:"Article-module--article--1-Z4k"}},HYfu:function(o,n,e){o.exports={markdown:"markdown-module--markdown--1TLJm",editOnGtiHubButton:"markdown-module--editOnGtiHubButton--1hV6y",main:"markdown-module--main--1VRvj",toc:"markdown-module--toc--3a23c",sider:"markdown-module--sider--26riA",menuIcon:"markdown-module--menuIcon--hTGH6",layout:"markdown-module--layout--20GIh"}},IDGY:function(o,n,e){},"Ibq+":function(o,n,e){},"L/94":function(o,n,e){},Lk4S:function(o,n,e){o.exports={products:"Product-module--products--wZmFW",product:"Product-module--product--1pyvr",productContent:"Product-module--productContent--3xt59",productDescription:"Product-module--productDescription--3dOob",productLinks:"Product-module--productLinks--2gCa8"}},OwP9:function(o,n,e){},Svq7:function(o,n,e){},VEUW:function(o,n,e){},Wfs9:function(o,n,e){},XJbt:function(o,n,e){},YCql:function(o,n,e){},e0s7:function(o,n,e){},fcTV:function(o,n,e){},"h+Wa":function(o,n,e){},hEgN:function(o,n,e){},m7UV:function(o,n,e){o.exports={playground:"PlayGround-module--playground--20RTt",preview:"PlayGround-module--preview--6whqA",editor:"PlayGround-module--editor--1HTqe",toolbar:"PlayGround-module--toolbar--2i0SG",codemirror:"PlayGround-module--codemirror--nEJBa"}},mo9N:function(o,n,e){o.exports={tabs:"Tabs-module--tabs--3WFbV",active:"Tabs-module--active--2GIM4"}},"p77/":function(o,n,e){},slaK:function(o,n,e){o.exports={footer:"Footer-module--footer--1oDCB"}},vLCf:function(o,n,e){},zP18:function(o,n,e){o.exports={main:"layout-module--main--2k9yj"}}}]); +//# sourceMappingURL=styles-5d5ac81f3c32d0998151.js.map \ No newline at end of file diff --git a/styles-5d5ac81f3c32d0998151.js.map b/styles-5d5ac81f3c32d0998151.js.map new file mode 100644 index 0000000000..09fff4a0f2 --- /dev/null +++ b/styles-5d5ac81f3c32d0998151.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["webpack:///./node_modules/@antv/gatsby-theme-antv/site/components/Search.module.less","webpack:///./node_modules/@antv/gatsby-theme-antv/site/components/PlayGrounds.module.less","webpack:///./node_modules/@antv/gatsby-theme-antv/site/components/Header.module.less","webpack:///./node_modules/@antv/gatsby-theme-antv/site/components/Article.module.less","webpack:///./node_modules/@antv/gatsby-theme-antv/site/templates/markdown.module.less","webpack:///./node_modules/@antv/gatsby-theme-antv/site/components/Product.module.less","webpack:///./node_modules/@antv/gatsby-theme-antv/site/components/PlayGround.module.less","webpack:///./node_modules/@antv/gatsby-theme-antv/site/components/Tabs.module.less","webpack:///./node_modules/@antv/gatsby-theme-antv/site/components/Footer.module.less","webpack:///./node_modules/@antv/gatsby-theme-antv/site/layouts/layout.module.less"],"names":["module","exports"],"mappings":"gFACAA,EAAOC,QAAU,CAAC,MAAQ,gC,uBCA1BD,EAAOC,QAAU,CAAC,UAAY,uCAAuC,MAAQ,mCAAmC,KAAO,kCAAkC,QAAU,uC,gJCAnKD,EAAOC,QAAU,CAAC,OAAS,+BAA+B,KAAO,6BAA6B,QAAU,gCAAgC,eAAiB,uCAAuC,IAAM,4BAA4B,KAAO,6BAA6B,WAAa,mCAAmC,aAAe,uC,uECArUD,EAAOC,QAAU,CAAC,QAAU,mC,qBCA5BD,EAAOC,QAAU,CAAC,SAAW,mCAAmC,mBAAqB,6CAA6C,KAAO,+BAA+B,IAAM,8BAA8B,MAAQ,gCAAgC,SAAW,mCAAmC,OAAS,mC,8FCA3SD,EAAOC,QAAU,CAAC,SAAW,kCAAkC,QAAU,iCAAiC,eAAiB,wCAAwC,mBAAqB,4CAA4C,aAAe,wC,6PCAnPD,EAAOC,QAAU,CAAC,WAAa,uCAAuC,QAAU,oCAAoC,OAAS,mCAAmC,QAAU,oCAAoC,WAAa,yC,qBCA3ND,EAAOC,QAAU,CAAC,KAAO,2BAA2B,OAAS,+B,8CCA7DD,EAAOC,QAAU,CAAC,OAAS,iC,4CCA3BD,EAAOC,QAAU,CAAC,KAAO","file":"styles-5d5ac81f3c32d0998151.js","sourcesContent":["// extracted by mini-css-extract-plugin\nmodule.exports = {\"input\":\"Search-module--input--lOvOF\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"container\":\"PlayGrounds-module--container--17Tai\",\"cards\":\"PlayGrounds-module--cards--3hJak\",\"card\":\"PlayGrounds-module--card--3Vq_o\",\"current\":\"PlayGrounds-module--current--2cQLr\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"header\":\"Header-module--header--hrdnh\",\"left\":\"Header-module--left--1dVXS\",\"divider\":\"Header-module--divider--2qNp3\",\"subProduceName\":\"Header-module--subProduceName--NMLtC\",\"nav\":\"Header-module--nav--2_Knj\",\"menu\":\"Header-module--menu--3hWNx\",\"activeItem\":\"Header-module--activeItem--2xNW-\",\"githubCorner\":\"Header-module--githubCorner--14Csh\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"article\":\"Article-module--article--1-Z4k\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"markdown\":\"markdown-module--markdown--1TLJm\",\"editOnGtiHubButton\":\"markdown-module--editOnGtiHubButton--1hV6y\",\"main\":\"markdown-module--main--1VRvj\",\"toc\":\"markdown-module--toc--3a23c\",\"sider\":\"markdown-module--sider--26riA\",\"menuIcon\":\"markdown-module--menuIcon--hTGH6\",\"layout\":\"markdown-module--layout--20GIh\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"products\":\"Product-module--products--wZmFW\",\"product\":\"Product-module--product--1pyvr\",\"productContent\":\"Product-module--productContent--3xt59\",\"productDescription\":\"Product-module--productDescription--3dOob\",\"productLinks\":\"Product-module--productLinks--2gCa8\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"playground\":\"PlayGround-module--playground--20RTt\",\"preview\":\"PlayGround-module--preview--6whqA\",\"editor\":\"PlayGround-module--editor--1HTqe\",\"toolbar\":\"PlayGround-module--toolbar--2i0SG\",\"codemirror\":\"PlayGround-module--codemirror--nEJBa\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"tabs\":\"Tabs-module--tabs--3WFbV\",\"active\":\"Tabs-module--active--2GIM4\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"footer\":\"Footer-module--footer--1oDCB\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"main\":\"layout-module--main--2k9yj\"};"],"sourceRoot":""} \ No newline at end of file diff --git a/styles.e32956506dacddf17950.css b/styles.e32956506dacddf17950.css new file mode 100644 index 0000000000..ad5f93de9b --- /dev/null +++ b/styles.e32956506dacddf17950.css @@ -0,0 +1,4 @@ +body,html{width:100%;height:100%}input::-ms-clear,input::-ms-reveal{display:none}*,:after,:before{box-sizing:border-box}html{font-family:sans-serif;-ms-text-size-adjust:100%;-ms-overflow-style:scrollbar;-webkit-tap-highlight-color:rgba(0,0,0,0)}@-ms-viewport{width:device-width}article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}body{color:rgba(0,0,0,.65);font-size:14px;font-family:Avenir,-apple-system,BlinkMacSystemFont,Segoe UI,PingFang SC,Hiragino Sans GB,Microsoft YaHei,Helvetica Neue,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol;font-variant:tabular-nums;line-height:1.5;background-color:#fff;font-feature-settings:"tnum"}[tabindex="-1"]:focus{outline:none!important}h1,h2,h3,h4,h5,h6{margin-top:0;margin-bottom:.5em;color:rgba(0,0,0,.85);font-weight:500}p{margin-top:0;margin-bottom:1em}abbr[data-original-title],abbr[title]{text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;border-bottom:0;cursor:help}address{margin-bottom:1em;font-style:normal;line-height:inherit}input[type=number],input[type=password],input[type=text],textarea{-webkit-appearance:none}dl,ol,ul{margin-top:0;margin-bottom:1em}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}dt{font-weight:500}dd{margin-bottom:.5em;margin-left:0}blockquote{margin:0 0 1em}dfn{font-style:italic}a{color:#722ed1;text-decoration:none;outline:none;cursor:pointer;-webkit-transition:color .3s;transition:color .3s;-webkit-text-decoration-skip:objects}a:hover{color:#9254de}a:active{color:#531dab}a:active,a:hover{text-decoration:none;outline:0}a[disabled]{color:rgba(0,0,0,.25);cursor:not-allowed;pointer-events:none}code,kbd,pre,samp{font-size:1em;font-family:SFMono-Regular,Consolas,Liberation Mono,Menlo,Courier,monospace}pre{margin-top:0;margin-bottom:1em;overflow:auto}figure{margin:0 0 1em}img{vertical-align:middle}svg:not(:root){overflow:hidden}[role=button],a,area,button,input:not([type=range]),label,select,summary,textarea{touch-action:manipulation}table{border-collapse:collapse}caption{padding-top:.75em;padding-bottom:.3em;color:rgba(0,0,0,.45);text-align:left;caption-side:bottom}th{text-align:inherit}button,input,optgroup,select,textarea{color:inherit;font-size:inherit;line-height:inherit}[type=reset],[type=submit],button,html [type=button]{-webkit-appearance:button}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=date],input[type=datetime-local],input[type=month],input[type=time]{-webkit-appearance:listbox}textarea{resize:vertical}fieldset{min-width:0;margin:0;padding:0;border:0}legend{display:block;width:100%;margin-bottom:.5em;font-size:1.5em;line-height:inherit}[type=search]{-webkit-appearance:none}[type=search]::-webkit-search-cancel-button,[type=search]::-webkit-search-decoration{-webkit-appearance:none}output{display:inline-block}[hidden]{display:none!important}mark{padding:.2em;background-color:#feffe6}::selection{color:#fff;background:#722ed1}.clearfix{zoom:1}.clearfix:after,.clearfix:before{display:table;content:""}.clearfix:after{clear:both}.anticon{display:inline-block;color:inherit;font-style:normal;line-height:0;text-align:center;text-transform:none;vertical-align:-.125em;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.anticon>*{line-height:1}.anticon svg{display:inline-block}.anticon:before{display:none}.anticon .anticon-icon{display:block}.anticon[tabindex]{cursor:pointer}.anticon-spin,.anticon-spin:before{display:inline-block;-webkit-animation:loadingCircle 1s linear infinite;animation:loadingCircle 1s linear infinite}.fade-appear,.fade-enter,.fade-leave{-webkit-animation-duration:.2s;animation-duration:.2s;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-play-state:paused;animation-play-state:paused}.fade-appear.fade-appear-active,.fade-enter.fade-enter-active{-webkit-animation-name:antFadeIn;animation-name:antFadeIn;-webkit-animation-play-state:running;animation-play-state:running}.fade-leave.fade-leave-active{-webkit-animation-name:antFadeOut;animation-name:antFadeOut;-webkit-animation-play-state:running;animation-play-state:running;pointer-events:none}.fade-appear,.fade-enter{opacity:0}.fade-appear,.fade-enter,.fade-leave{-webkit-animation-timing-function:linear;animation-timing-function:linear}@-webkit-keyframes antFadeIn{0%{opacity:0}to{opacity:1}}@keyframes antFadeIn{0%{opacity:0}to{opacity:1}}@-webkit-keyframes antFadeOut{0%{opacity:1}to{opacity:0}}@keyframes antFadeOut{0%{opacity:1}to{opacity:0}}.move-up-appear,.move-up-enter,.move-up-leave{-webkit-animation-duration:.2s;animation-duration:.2s;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-play-state:paused;animation-play-state:paused}.move-up-appear.move-up-appear-active,.move-up-enter.move-up-enter-active{-webkit-animation-name:antMoveUpIn;animation-name:antMoveUpIn;-webkit-animation-play-state:running;animation-play-state:running}.move-up-leave.move-up-leave-active{-webkit-animation-name:antMoveUpOut;animation-name:antMoveUpOut;-webkit-animation-play-state:running;animation-play-state:running;pointer-events:none}.move-up-appear,.move-up-enter{opacity:0;-webkit-animation-timing-function:cubic-bezier(.08,.82,.17,1);animation-timing-function:cubic-bezier(.08,.82,.17,1)}.move-up-leave{-webkit-animation-timing-function:cubic-bezier(.6,.04,.98,.34);animation-timing-function:cubic-bezier(.6,.04,.98,.34)}.move-down-appear,.move-down-enter,.move-down-leave{-webkit-animation-duration:.2s;animation-duration:.2s;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-play-state:paused;animation-play-state:paused}.move-down-appear.move-down-appear-active,.move-down-enter.move-down-enter-active{-webkit-animation-name:antMoveDownIn;animation-name:antMoveDownIn;-webkit-animation-play-state:running;animation-play-state:running}.move-down-leave.move-down-leave-active{-webkit-animation-name:antMoveDownOut;animation-name:antMoveDownOut;-webkit-animation-play-state:running;animation-play-state:running;pointer-events:none}.move-down-appear,.move-down-enter{opacity:0;-webkit-animation-timing-function:cubic-bezier(.08,.82,.17,1);animation-timing-function:cubic-bezier(.08,.82,.17,1)}.move-down-leave{-webkit-animation-timing-function:cubic-bezier(.6,.04,.98,.34);animation-timing-function:cubic-bezier(.6,.04,.98,.34)}.move-left-appear,.move-left-enter,.move-left-leave{-webkit-animation-duration:.2s;animation-duration:.2s;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-play-state:paused;animation-play-state:paused}.move-left-appear.move-left-appear-active,.move-left-enter.move-left-enter-active{-webkit-animation-name:antMoveLeftIn;animation-name:antMoveLeftIn;-webkit-animation-play-state:running;animation-play-state:running}.move-left-leave.move-left-leave-active{-webkit-animation-name:antMoveLeftOut;animation-name:antMoveLeftOut;-webkit-animation-play-state:running;animation-play-state:running;pointer-events:none}.move-left-appear,.move-left-enter{opacity:0;-webkit-animation-timing-function:cubic-bezier(.08,.82,.17,1);animation-timing-function:cubic-bezier(.08,.82,.17,1)}.move-left-leave{-webkit-animation-timing-function:cubic-bezier(.6,.04,.98,.34);animation-timing-function:cubic-bezier(.6,.04,.98,.34)}.move-right-appear,.move-right-enter,.move-right-leave{-webkit-animation-duration:.2s;animation-duration:.2s;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-play-state:paused;animation-play-state:paused}.move-right-appear.move-right-appear-active,.move-right-enter.move-right-enter-active{-webkit-animation-name:antMoveRightIn;animation-name:antMoveRightIn;-webkit-animation-play-state:running;animation-play-state:running}.move-right-leave.move-right-leave-active{-webkit-animation-name:antMoveRightOut;animation-name:antMoveRightOut;-webkit-animation-play-state:running;animation-play-state:running;pointer-events:none}.move-right-appear,.move-right-enter{opacity:0;-webkit-animation-timing-function:cubic-bezier(.08,.82,.17,1);animation-timing-function:cubic-bezier(.08,.82,.17,1)}.move-right-leave{-webkit-animation-timing-function:cubic-bezier(.6,.04,.98,.34);animation-timing-function:cubic-bezier(.6,.04,.98,.34)}@-webkit-keyframes antMoveDownIn{0%{-webkit-transform:translateY(100%);transform:translateY(100%);-webkit-transform-origin:0 0;transform-origin:0 0;opacity:0}to{-webkit-transform:translateY(0);transform:translateY(0);-webkit-transform-origin:0 0;transform-origin:0 0;opacity:1}}@keyframes antMoveDownIn{0%{-webkit-transform:translateY(100%);transform:translateY(100%);-webkit-transform-origin:0 0;transform-origin:0 0;opacity:0}to{-webkit-transform:translateY(0);transform:translateY(0);-webkit-transform-origin:0 0;transform-origin:0 0;opacity:1}}@-webkit-keyframes antMoveDownOut{0%{-webkit-transform:translateY(0);transform:translateY(0);-webkit-transform-origin:0 0;transform-origin:0 0;opacity:1}to{-webkit-transform:translateY(100%);transform:translateY(100%);-webkit-transform-origin:0 0;transform-origin:0 0;opacity:0}}@keyframes antMoveDownOut{0%{-webkit-transform:translateY(0);transform:translateY(0);-webkit-transform-origin:0 0;transform-origin:0 0;opacity:1}to{-webkit-transform:translateY(100%);transform:translateY(100%);-webkit-transform-origin:0 0;transform-origin:0 0;opacity:0}}@-webkit-keyframes antMoveLeftIn{0%{-webkit-transform:translateX(-100%);transform:translateX(-100%);-webkit-transform-origin:0 0;transform-origin:0 0;opacity:0}to{-webkit-transform:translateX(0);transform:translateX(0);-webkit-transform-origin:0 0;transform-origin:0 0;opacity:1}}@keyframes antMoveLeftIn{0%{-webkit-transform:translateX(-100%);transform:translateX(-100%);-webkit-transform-origin:0 0;transform-origin:0 0;opacity:0}to{-webkit-transform:translateX(0);transform:translateX(0);-webkit-transform-origin:0 0;transform-origin:0 0;opacity:1}}@-webkit-keyframes antMoveLeftOut{0%{-webkit-transform:translateX(0);transform:translateX(0);-webkit-transform-origin:0 0;transform-origin:0 0;opacity:1}to{-webkit-transform:translateX(-100%);transform:translateX(-100%);-webkit-transform-origin:0 0;transform-origin:0 0;opacity:0}}@keyframes antMoveLeftOut{0%{-webkit-transform:translateX(0);transform:translateX(0);-webkit-transform-origin:0 0;transform-origin:0 0;opacity:1}to{-webkit-transform:translateX(-100%);transform:translateX(-100%);-webkit-transform-origin:0 0;transform-origin:0 0;opacity:0}}@-webkit-keyframes antMoveRightIn{0%{-webkit-transform:translateX(100%);transform:translateX(100%);-webkit-transform-origin:0 0;transform-origin:0 0;opacity:0}to{-webkit-transform:translateX(0);transform:translateX(0);-webkit-transform-origin:0 0;transform-origin:0 0;opacity:1}}@keyframes antMoveRightIn{0%{-webkit-transform:translateX(100%);transform:translateX(100%);-webkit-transform-origin:0 0;transform-origin:0 0;opacity:0}to{-webkit-transform:translateX(0);transform:translateX(0);-webkit-transform-origin:0 0;transform-origin:0 0;opacity:1}}@-webkit-keyframes antMoveRightOut{0%{-webkit-transform:translateX(0);transform:translateX(0);-webkit-transform-origin:0 0;transform-origin:0 0;opacity:1}to{-webkit-transform:translateX(100%);transform:translateX(100%);-webkit-transform-origin:0 0;transform-origin:0 0;opacity:0}}@keyframes antMoveRightOut{0%{-webkit-transform:translateX(0);transform:translateX(0);-webkit-transform-origin:0 0;transform-origin:0 0;opacity:1}to{-webkit-transform:translateX(100%);transform:translateX(100%);-webkit-transform-origin:0 0;transform-origin:0 0;opacity:0}}@-webkit-keyframes antMoveUpIn{0%{-webkit-transform:translateY(-100%);transform:translateY(-100%);-webkit-transform-origin:0 0;transform-origin:0 0;opacity:0}to{-webkit-transform:translateY(0);transform:translateY(0);-webkit-transform-origin:0 0;transform-origin:0 0;opacity:1}}@keyframes antMoveUpIn{0%{-webkit-transform:translateY(-100%);transform:translateY(-100%);-webkit-transform-origin:0 0;transform-origin:0 0;opacity:0}to{-webkit-transform:translateY(0);transform:translateY(0);-webkit-transform-origin:0 0;transform-origin:0 0;opacity:1}}@-webkit-keyframes antMoveUpOut{0%{-webkit-transform:translateY(0);transform:translateY(0);-webkit-transform-origin:0 0;transform-origin:0 0;opacity:1}to{-webkit-transform:translateY(-100%);transform:translateY(-100%);-webkit-transform-origin:0 0;transform-origin:0 0;opacity:0}}@keyframes antMoveUpOut{0%{-webkit-transform:translateY(0);transform:translateY(0);-webkit-transform-origin:0 0;transform-origin:0 0;opacity:1}to{-webkit-transform:translateY(-100%);transform:translateY(-100%);-webkit-transform-origin:0 0;transform-origin:0 0;opacity:0}}@-webkit-keyframes loadingCircle{to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes loadingCircle{to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}[ant-click-animating-without-extra-node=true],[ant-click-animating=true]{position:relative}html{--antd-wave-shadow-color:#722ed1}.ant-click-animating-node,[ant-click-animating-without-extra-node=true]:after{position:absolute;top:0;right:0;bottom:0;left:0;display:block;border-radius:inherit;box-shadow:0 0 0 0 #722ed1;box-shadow:0 0 0 0 var(--antd-wave-shadow-color);opacity:.2;-webkit-animation:fadeEffect 2s cubic-bezier(.08,.82,.17,1),waveEffect .4s cubic-bezier(.08,.82,.17,1);animation:fadeEffect 2s cubic-bezier(.08,.82,.17,1),waveEffect .4s cubic-bezier(.08,.82,.17,1);-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards;content:"";pointer-events:none}@-webkit-keyframes waveEffect{to{box-shadow:0 0 0 #722ed1;box-shadow:0 0 0 6px var(--antd-wave-shadow-color)}}@keyframes waveEffect{to{box-shadow:0 0 0 #722ed1;box-shadow:0 0 0 6px var(--antd-wave-shadow-color)}}@-webkit-keyframes fadeEffect{to{opacity:0}}@keyframes fadeEffect{to{opacity:0}}.slide-up-appear,.slide-up-enter,.slide-up-leave{-webkit-animation-duration:.2s;animation-duration:.2s;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-play-state:paused;animation-play-state:paused}.slide-up-appear.slide-up-appear-active,.slide-up-enter.slide-up-enter-active{-webkit-animation-name:antSlideUpIn;animation-name:antSlideUpIn;-webkit-animation-play-state:running;animation-play-state:running}.slide-up-leave.slide-up-leave-active{-webkit-animation-name:antSlideUpOut;animation-name:antSlideUpOut;-webkit-animation-play-state:running;animation-play-state:running;pointer-events:none}.slide-up-appear,.slide-up-enter{opacity:0;-webkit-animation-timing-function:cubic-bezier(.23,1,.32,1);animation-timing-function:cubic-bezier(.23,1,.32,1)}.slide-up-leave{-webkit-animation-timing-function:cubic-bezier(.755,.05,.855,.06);animation-timing-function:cubic-bezier(.755,.05,.855,.06)}.slide-down-appear,.slide-down-enter,.slide-down-leave{-webkit-animation-duration:.2s;animation-duration:.2s;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-play-state:paused;animation-play-state:paused}.slide-down-appear.slide-down-appear-active,.slide-down-enter.slide-down-enter-active{-webkit-animation-name:antSlideDownIn;animation-name:antSlideDownIn;-webkit-animation-play-state:running;animation-play-state:running}.slide-down-leave.slide-down-leave-active{-webkit-animation-name:antSlideDownOut;animation-name:antSlideDownOut;-webkit-animation-play-state:running;animation-play-state:running;pointer-events:none}.slide-down-appear,.slide-down-enter{opacity:0;-webkit-animation-timing-function:cubic-bezier(.23,1,.32,1);animation-timing-function:cubic-bezier(.23,1,.32,1)}.slide-down-leave{-webkit-animation-timing-function:cubic-bezier(.755,.05,.855,.06);animation-timing-function:cubic-bezier(.755,.05,.855,.06)}.slide-left-appear,.slide-left-enter,.slide-left-leave{-webkit-animation-duration:.2s;animation-duration:.2s;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-play-state:paused;animation-play-state:paused}.slide-left-appear.slide-left-appear-active,.slide-left-enter.slide-left-enter-active{-webkit-animation-name:antSlideLeftIn;animation-name:antSlideLeftIn;-webkit-animation-play-state:running;animation-play-state:running}.slide-left-leave.slide-left-leave-active{-webkit-animation-name:antSlideLeftOut;animation-name:antSlideLeftOut;-webkit-animation-play-state:running;animation-play-state:running;pointer-events:none}.slide-left-appear,.slide-left-enter{opacity:0;-webkit-animation-timing-function:cubic-bezier(.23,1,.32,1);animation-timing-function:cubic-bezier(.23,1,.32,1)}.slide-left-leave{-webkit-animation-timing-function:cubic-bezier(.755,.05,.855,.06);animation-timing-function:cubic-bezier(.755,.05,.855,.06)}.slide-right-appear,.slide-right-enter,.slide-right-leave{-webkit-animation-duration:.2s;animation-duration:.2s;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-play-state:paused;animation-play-state:paused}.slide-right-appear.slide-right-appear-active,.slide-right-enter.slide-right-enter-active{-webkit-animation-name:antSlideRightIn;animation-name:antSlideRightIn;-webkit-animation-play-state:running;animation-play-state:running}.slide-right-leave.slide-right-leave-active{-webkit-animation-name:antSlideRightOut;animation-name:antSlideRightOut;-webkit-animation-play-state:running;animation-play-state:running;pointer-events:none}.slide-right-appear,.slide-right-enter{opacity:0;-webkit-animation-timing-function:cubic-bezier(.23,1,.32,1);animation-timing-function:cubic-bezier(.23,1,.32,1)}.slide-right-leave{-webkit-animation-timing-function:cubic-bezier(.755,.05,.855,.06);animation-timing-function:cubic-bezier(.755,.05,.855,.06)}@-webkit-keyframes antSlideUpIn{0%{-webkit-transform:scaleY(.8);transform:scaleY(.8);-webkit-transform-origin:0 0;transform-origin:0 0;opacity:0}to{-webkit-transform:scaleY(1);transform:scaleY(1);-webkit-transform-origin:0 0;transform-origin:0 0;opacity:1}}@keyframes antSlideUpIn{0%{-webkit-transform:scaleY(.8);transform:scaleY(.8);-webkit-transform-origin:0 0;transform-origin:0 0;opacity:0}to{-webkit-transform:scaleY(1);transform:scaleY(1);-webkit-transform-origin:0 0;transform-origin:0 0;opacity:1}}@-webkit-keyframes antSlideUpOut{0%{-webkit-transform:scaleY(1);transform:scaleY(1);-webkit-transform-origin:0 0;transform-origin:0 0;opacity:1}to{-webkit-transform:scaleY(.8);transform:scaleY(.8);-webkit-transform-origin:0 0;transform-origin:0 0;opacity:0}}@keyframes antSlideUpOut{0%{-webkit-transform:scaleY(1);transform:scaleY(1);-webkit-transform-origin:0 0;transform-origin:0 0;opacity:1}to{-webkit-transform:scaleY(.8);transform:scaleY(.8);-webkit-transform-origin:0 0;transform-origin:0 0;opacity:0}}@-webkit-keyframes antSlideDownIn{0%{-webkit-transform:scaleY(.8);transform:scaleY(.8);-webkit-transform-origin:100% 100%;transform-origin:100% 100%;opacity:0}to{-webkit-transform:scaleY(1);transform:scaleY(1);-webkit-transform-origin:100% 100%;transform-origin:100% 100%;opacity:1}}@keyframes antSlideDownIn{0%{-webkit-transform:scaleY(.8);transform:scaleY(.8);-webkit-transform-origin:100% 100%;transform-origin:100% 100%;opacity:0}to{-webkit-transform:scaleY(1);transform:scaleY(1);-webkit-transform-origin:100% 100%;transform-origin:100% 100%;opacity:1}}@-webkit-keyframes antSlideDownOut{0%{-webkit-transform:scaleY(1);transform:scaleY(1);-webkit-transform-origin:100% 100%;transform-origin:100% 100%;opacity:1}to{-webkit-transform:scaleY(.8);transform:scaleY(.8);-webkit-transform-origin:100% 100%;transform-origin:100% 100%;opacity:0}}@keyframes antSlideDownOut{0%{-webkit-transform:scaleY(1);transform:scaleY(1);-webkit-transform-origin:100% 100%;transform-origin:100% 100%;opacity:1}to{-webkit-transform:scaleY(.8);transform:scaleY(.8);-webkit-transform-origin:100% 100%;transform-origin:100% 100%;opacity:0}}@-webkit-keyframes antSlideLeftIn{0%{-webkit-transform:scaleX(.8);transform:scaleX(.8);-webkit-transform-origin:0 0;transform-origin:0 0;opacity:0}to{-webkit-transform:scaleX(1);transform:scaleX(1);-webkit-transform-origin:0 0;transform-origin:0 0;opacity:1}}@keyframes antSlideLeftIn{0%{-webkit-transform:scaleX(.8);transform:scaleX(.8);-webkit-transform-origin:0 0;transform-origin:0 0;opacity:0}to{-webkit-transform:scaleX(1);transform:scaleX(1);-webkit-transform-origin:0 0;transform-origin:0 0;opacity:1}}@-webkit-keyframes antSlideLeftOut{0%{-webkit-transform:scaleX(1);transform:scaleX(1);-webkit-transform-origin:0 0;transform-origin:0 0;opacity:1}to{-webkit-transform:scaleX(.8);transform:scaleX(.8);-webkit-transform-origin:0 0;transform-origin:0 0;opacity:0}}@keyframes antSlideLeftOut{0%{-webkit-transform:scaleX(1);transform:scaleX(1);-webkit-transform-origin:0 0;transform-origin:0 0;opacity:1}to{-webkit-transform:scaleX(.8);transform:scaleX(.8);-webkit-transform-origin:0 0;transform-origin:0 0;opacity:0}}@-webkit-keyframes antSlideRightIn{0%{-webkit-transform:scaleX(.8);transform:scaleX(.8);-webkit-transform-origin:100% 0;transform-origin:100% 0;opacity:0}to{-webkit-transform:scaleX(1);transform:scaleX(1);-webkit-transform-origin:100% 0;transform-origin:100% 0;opacity:1}}@keyframes antSlideRightIn{0%{-webkit-transform:scaleX(.8);transform:scaleX(.8);-webkit-transform-origin:100% 0;transform-origin:100% 0;opacity:0}to{-webkit-transform:scaleX(1);transform:scaleX(1);-webkit-transform-origin:100% 0;transform-origin:100% 0;opacity:1}}@-webkit-keyframes antSlideRightOut{0%{-webkit-transform:scaleX(1);transform:scaleX(1);-webkit-transform-origin:100% 0;transform-origin:100% 0;opacity:1}to{-webkit-transform:scaleX(.8);transform:scaleX(.8);-webkit-transform-origin:100% 0;transform-origin:100% 0;opacity:0}}@keyframes antSlideRightOut{0%{-webkit-transform:scaleX(1);transform:scaleX(1);-webkit-transform-origin:100% 0;transform-origin:100% 0;opacity:1}to{-webkit-transform:scaleX(.8);transform:scaleX(.8);-webkit-transform-origin:100% 0;transform-origin:100% 0;opacity:0}}.swing-appear,.swing-enter{-webkit-animation-duration:.2s;animation-duration:.2s;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-play-state:paused;animation-play-state:paused}.swing-appear.swing-appear-active,.swing-enter.swing-enter-active{-webkit-animation-name:antSwingIn;animation-name:antSwingIn;-webkit-animation-play-state:running;animation-play-state:running}@-webkit-keyframes antSwingIn{0%,to{-webkit-transform:translateX(0);transform:translateX(0)}20%{-webkit-transform:translateX(-10px);transform:translateX(-10px)}40%{-webkit-transform:translateX(10px);transform:translateX(10px)}60%{-webkit-transform:translateX(-5px);transform:translateX(-5px)}80%{-webkit-transform:translateX(5px);transform:translateX(5px)}}@keyframes antSwingIn{0%,to{-webkit-transform:translateX(0);transform:translateX(0)}20%{-webkit-transform:translateX(-10px);transform:translateX(-10px)}40%{-webkit-transform:translateX(10px);transform:translateX(10px)}60%{-webkit-transform:translateX(-5px);transform:translateX(-5px)}80%{-webkit-transform:translateX(5px);transform:translateX(5px)}}.zoom-appear,.zoom-enter,.zoom-leave{-webkit-animation-duration:.2s;animation-duration:.2s;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-play-state:paused;animation-play-state:paused}.zoom-appear.zoom-appear-active,.zoom-enter.zoom-enter-active{-webkit-animation-name:antZoomIn;animation-name:antZoomIn;-webkit-animation-play-state:running;animation-play-state:running}.zoom-leave.zoom-leave-active{-webkit-animation-name:antZoomOut;animation-name:antZoomOut;-webkit-animation-play-state:running;animation-play-state:running;pointer-events:none}.zoom-appear,.zoom-enter{-webkit-transform:scale(0);transform:scale(0);opacity:0;-webkit-animation-timing-function:cubic-bezier(.08,.82,.17,1);animation-timing-function:cubic-bezier(.08,.82,.17,1)}.zoom-leave{-webkit-animation-timing-function:cubic-bezier(.78,.14,.15,.86);animation-timing-function:cubic-bezier(.78,.14,.15,.86)}.zoom-big-appear,.zoom-big-enter,.zoom-big-leave{-webkit-animation-duration:.2s;animation-duration:.2s;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-play-state:paused;animation-play-state:paused}.zoom-big-appear.zoom-big-appear-active,.zoom-big-enter.zoom-big-enter-active{-webkit-animation-name:antZoomBigIn;animation-name:antZoomBigIn;-webkit-animation-play-state:running;animation-play-state:running}.zoom-big-leave.zoom-big-leave-active{-webkit-animation-name:antZoomBigOut;animation-name:antZoomBigOut;-webkit-animation-play-state:running;animation-play-state:running;pointer-events:none}.zoom-big-appear,.zoom-big-enter{-webkit-transform:scale(0);transform:scale(0);opacity:0;-webkit-animation-timing-function:cubic-bezier(.08,.82,.17,1);animation-timing-function:cubic-bezier(.08,.82,.17,1)}.zoom-big-leave{-webkit-animation-timing-function:cubic-bezier(.78,.14,.15,.86);animation-timing-function:cubic-bezier(.78,.14,.15,.86)}.zoom-big-fast-appear,.zoom-big-fast-enter,.zoom-big-fast-leave{-webkit-animation-duration:.1s;animation-duration:.1s;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-play-state:paused;animation-play-state:paused}.zoom-big-fast-appear.zoom-big-fast-appear-active,.zoom-big-fast-enter.zoom-big-fast-enter-active{-webkit-animation-name:antZoomBigIn;animation-name:antZoomBigIn;-webkit-animation-play-state:running;animation-play-state:running}.zoom-big-fast-leave.zoom-big-fast-leave-active{-webkit-animation-name:antZoomBigOut;animation-name:antZoomBigOut;-webkit-animation-play-state:running;animation-play-state:running;pointer-events:none}.zoom-big-fast-appear,.zoom-big-fast-enter{-webkit-transform:scale(0);transform:scale(0);opacity:0;-webkit-animation-timing-function:cubic-bezier(.08,.82,.17,1);animation-timing-function:cubic-bezier(.08,.82,.17,1)}.zoom-big-fast-leave{-webkit-animation-timing-function:cubic-bezier(.78,.14,.15,.86);animation-timing-function:cubic-bezier(.78,.14,.15,.86)}.zoom-up-appear,.zoom-up-enter,.zoom-up-leave{-webkit-animation-duration:.2s;animation-duration:.2s;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-play-state:paused;animation-play-state:paused}.zoom-up-appear.zoom-up-appear-active,.zoom-up-enter.zoom-up-enter-active{-webkit-animation-name:antZoomUpIn;animation-name:antZoomUpIn;-webkit-animation-play-state:running;animation-play-state:running}.zoom-up-leave.zoom-up-leave-active{-webkit-animation-name:antZoomUpOut;animation-name:antZoomUpOut;-webkit-animation-play-state:running;animation-play-state:running;pointer-events:none}.zoom-up-appear,.zoom-up-enter{-webkit-transform:scale(0);transform:scale(0);opacity:0;-webkit-animation-timing-function:cubic-bezier(.08,.82,.17,1);animation-timing-function:cubic-bezier(.08,.82,.17,1)}.zoom-up-leave{-webkit-animation-timing-function:cubic-bezier(.78,.14,.15,.86);animation-timing-function:cubic-bezier(.78,.14,.15,.86)}.zoom-down-appear,.zoom-down-enter,.zoom-down-leave{-webkit-animation-duration:.2s;animation-duration:.2s;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-play-state:paused;animation-play-state:paused}.zoom-down-appear.zoom-down-appear-active,.zoom-down-enter.zoom-down-enter-active{-webkit-animation-name:antZoomDownIn;animation-name:antZoomDownIn;-webkit-animation-play-state:running;animation-play-state:running}.zoom-down-leave.zoom-down-leave-active{-webkit-animation-name:antZoomDownOut;animation-name:antZoomDownOut;-webkit-animation-play-state:running;animation-play-state:running;pointer-events:none}.zoom-down-appear,.zoom-down-enter{-webkit-transform:scale(0);transform:scale(0);opacity:0;-webkit-animation-timing-function:cubic-bezier(.08,.82,.17,1);animation-timing-function:cubic-bezier(.08,.82,.17,1)}.zoom-down-leave{-webkit-animation-timing-function:cubic-bezier(.78,.14,.15,.86);animation-timing-function:cubic-bezier(.78,.14,.15,.86)}.zoom-left-appear,.zoom-left-enter,.zoom-left-leave{-webkit-animation-duration:.2s;animation-duration:.2s;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-play-state:paused;animation-play-state:paused}.zoom-left-appear.zoom-left-appear-active,.zoom-left-enter.zoom-left-enter-active{-webkit-animation-name:antZoomLeftIn;animation-name:antZoomLeftIn;-webkit-animation-play-state:running;animation-play-state:running}.zoom-left-leave.zoom-left-leave-active{-webkit-animation-name:antZoomLeftOut;animation-name:antZoomLeftOut;-webkit-animation-play-state:running;animation-play-state:running;pointer-events:none}.zoom-left-appear,.zoom-left-enter{-webkit-transform:scale(0);transform:scale(0);opacity:0;-webkit-animation-timing-function:cubic-bezier(.08,.82,.17,1);animation-timing-function:cubic-bezier(.08,.82,.17,1)}.zoom-left-leave{-webkit-animation-timing-function:cubic-bezier(.78,.14,.15,.86);animation-timing-function:cubic-bezier(.78,.14,.15,.86)}.zoom-right-appear,.zoom-right-enter,.zoom-right-leave{-webkit-animation-duration:.2s;animation-duration:.2s;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-play-state:paused;animation-play-state:paused}.zoom-right-appear.zoom-right-appear-active,.zoom-right-enter.zoom-right-enter-active{-webkit-animation-name:antZoomRightIn;animation-name:antZoomRightIn;-webkit-animation-play-state:running;animation-play-state:running}.zoom-right-leave.zoom-right-leave-active{-webkit-animation-name:antZoomRightOut;animation-name:antZoomRightOut;-webkit-animation-play-state:running;animation-play-state:running;pointer-events:none}.zoom-right-appear,.zoom-right-enter{-webkit-transform:scale(0);transform:scale(0);opacity:0;-webkit-animation-timing-function:cubic-bezier(.08,.82,.17,1);animation-timing-function:cubic-bezier(.08,.82,.17,1)}.zoom-right-leave{-webkit-animation-timing-function:cubic-bezier(.78,.14,.15,.86);animation-timing-function:cubic-bezier(.78,.14,.15,.86)}@-webkit-keyframes antZoomIn{0%{-webkit-transform:scale(.2);transform:scale(.2);opacity:0}to{-webkit-transform:scale(1);transform:scale(1);opacity:1}}@keyframes antZoomIn{0%{-webkit-transform:scale(.2);transform:scale(.2);opacity:0}to{-webkit-transform:scale(1);transform:scale(1);opacity:1}}@-webkit-keyframes antZoomOut{0%{-webkit-transform:scale(1);transform:scale(1)}to{-webkit-transform:scale(.2);transform:scale(.2);opacity:0}}@keyframes antZoomOut{0%{-webkit-transform:scale(1);transform:scale(1)}to{-webkit-transform:scale(.2);transform:scale(.2);opacity:0}}@-webkit-keyframes antZoomBigIn{0%{-webkit-transform:scale(.8);transform:scale(.8);opacity:0}to{-webkit-transform:scale(1);transform:scale(1);opacity:1}}@keyframes antZoomBigIn{0%{-webkit-transform:scale(.8);transform:scale(.8);opacity:0}to{-webkit-transform:scale(1);transform:scale(1);opacity:1}}@-webkit-keyframes antZoomBigOut{0%{-webkit-transform:scale(1);transform:scale(1)}to{-webkit-transform:scale(.8);transform:scale(.8);opacity:0}}@keyframes antZoomBigOut{0%{-webkit-transform:scale(1);transform:scale(1)}to{-webkit-transform:scale(.8);transform:scale(.8);opacity:0}}@-webkit-keyframes antZoomUpIn{0%{-webkit-transform:scale(.8);transform:scale(.8);-webkit-transform-origin:50% 0;transform-origin:50% 0;opacity:0}to{-webkit-transform:scale(1);transform:scale(1);-webkit-transform-origin:50% 0;transform-origin:50% 0}}@keyframes antZoomUpIn{0%{-webkit-transform:scale(.8);transform:scale(.8);-webkit-transform-origin:50% 0;transform-origin:50% 0;opacity:0}to{-webkit-transform:scale(1);transform:scale(1);-webkit-transform-origin:50% 0;transform-origin:50% 0}}@-webkit-keyframes antZoomUpOut{0%{-webkit-transform:scale(1);transform:scale(1);-webkit-transform-origin:50% 0;transform-origin:50% 0}to{-webkit-transform:scale(.8);transform:scale(.8);-webkit-transform-origin:50% 0;transform-origin:50% 0;opacity:0}}@keyframes antZoomUpOut{0%{-webkit-transform:scale(1);transform:scale(1);-webkit-transform-origin:50% 0;transform-origin:50% 0}to{-webkit-transform:scale(.8);transform:scale(.8);-webkit-transform-origin:50% 0;transform-origin:50% 0;opacity:0}}@-webkit-keyframes antZoomLeftIn{0%{-webkit-transform:scale(.8);transform:scale(.8);-webkit-transform-origin:0 50%;transform-origin:0 50%;opacity:0}to{-webkit-transform:scale(1);transform:scale(1);-webkit-transform-origin:0 50%;transform-origin:0 50%}}@keyframes antZoomLeftIn{0%{-webkit-transform:scale(.8);transform:scale(.8);-webkit-transform-origin:0 50%;transform-origin:0 50%;opacity:0}to{-webkit-transform:scale(1);transform:scale(1);-webkit-transform-origin:0 50%;transform-origin:0 50%}}@-webkit-keyframes antZoomLeftOut{0%{-webkit-transform:scale(1);transform:scale(1);-webkit-transform-origin:0 50%;transform-origin:0 50%}to{-webkit-transform:scale(.8);transform:scale(.8);-webkit-transform-origin:0 50%;transform-origin:0 50%;opacity:0}}@keyframes antZoomLeftOut{0%{-webkit-transform:scale(1);transform:scale(1);-webkit-transform-origin:0 50%;transform-origin:0 50%}to{-webkit-transform:scale(.8);transform:scale(.8);-webkit-transform-origin:0 50%;transform-origin:0 50%;opacity:0}}@-webkit-keyframes antZoomRightIn{0%{-webkit-transform:scale(.8);transform:scale(.8);-webkit-transform-origin:100% 50%;transform-origin:100% 50%;opacity:0}to{-webkit-transform:scale(1);transform:scale(1);-webkit-transform-origin:100% 50%;transform-origin:100% 50%}}@keyframes antZoomRightIn{0%{-webkit-transform:scale(.8);transform:scale(.8);-webkit-transform-origin:100% 50%;transform-origin:100% 50%;opacity:0}to{-webkit-transform:scale(1);transform:scale(1);-webkit-transform-origin:100% 50%;transform-origin:100% 50%}}@-webkit-keyframes antZoomRightOut{0%{-webkit-transform:scale(1);transform:scale(1);-webkit-transform-origin:100% 50%;transform-origin:100% 50%}to{-webkit-transform:scale(.8);transform:scale(.8);-webkit-transform-origin:100% 50%;transform-origin:100% 50%;opacity:0}}@keyframes antZoomRightOut{0%{-webkit-transform:scale(1);transform:scale(1);-webkit-transform-origin:100% 50%;transform-origin:100% 50%}to{-webkit-transform:scale(.8);transform:scale(.8);-webkit-transform-origin:100% 50%;transform-origin:100% 50%;opacity:0}}@-webkit-keyframes antZoomDownIn{0%{-webkit-transform:scale(.8);transform:scale(.8);-webkit-transform-origin:50% 100%;transform-origin:50% 100%;opacity:0}to{-webkit-transform:scale(1);transform:scale(1);-webkit-transform-origin:50% 100%;transform-origin:50% 100%}}@keyframes antZoomDownIn{0%{-webkit-transform:scale(.8);transform:scale(.8);-webkit-transform-origin:50% 100%;transform-origin:50% 100%;opacity:0}to{-webkit-transform:scale(1);transform:scale(1);-webkit-transform-origin:50% 100%;transform-origin:50% 100%}}@-webkit-keyframes antZoomDownOut{0%{-webkit-transform:scale(1);transform:scale(1);-webkit-transform-origin:50% 100%;transform-origin:50% 100%}to{-webkit-transform:scale(.8);transform:scale(.8);-webkit-transform-origin:50% 100%;transform-origin:50% 100%;opacity:0}}@keyframes antZoomDownOut{0%{-webkit-transform:scale(1);transform:scale(1);-webkit-transform-origin:50% 100%;transform-origin:50% 100%}to{-webkit-transform:scale(.8);transform:scale(.8);-webkit-transform-origin:50% 100%;transform-origin:50% 100%;opacity:0}}.ant-motion-collapse-legacy{overflow:hidden}.ant-motion-collapse,.ant-motion-collapse-legacy-active{-webkit-transition:height .15s cubic-bezier(.645,.045,.355,1),opacity .15s cubic-bezier(.645,.045,.355,1)!important;transition:height .15s cubic-bezier(.645,.045,.355,1),opacity .15s cubic-bezier(.645,.045,.355,1)!important}.ant-motion-collapse{overflow:hidden}.ant-popover{box-sizing:border-box;margin:0;padding:0;color:rgba(0,0,0,.65);font-size:14px;font-variant:tabular-nums;line-height:1.5;list-style:none;font-feature-settings:"tnum";position:absolute;top:0;left:0;z-index:1030;font-weight:400;white-space:normal;text-align:left;cursor:auto;-webkit-user-select:text;-moz-user-select:text;-ms-user-select:text;user-select:text}.ant-popover:after{position:absolute;background:hsla(0,0%,100%,.01);content:""}.ant-popover-hidden{display:none}.ant-popover-placement-top,.ant-popover-placement-topLeft,.ant-popover-placement-topRight{padding-bottom:10px}.ant-popover-placement-right,.ant-popover-placement-rightBottom,.ant-popover-placement-rightTop{padding-left:10px}.ant-popover-placement-bottom,.ant-popover-placement-bottomLeft,.ant-popover-placement-bottomRight{padding-top:10px}.ant-popover-placement-left,.ant-popover-placement-leftBottom,.ant-popover-placement-leftTop{padding-right:10px}.ant-popover-inner{background-color:#fff;background-clip:padding-box;border-radius:4px;box-shadow:0 2px 8px rgba(0,0,0,.15);box-shadow:0 0 8px rgba(0,0,0,.15)\9}@media (-ms-high-contrast:none),screen and (-ms-high-contrast:active){.ant-popover-inner{box-shadow:0 2px 8px rgba(0,0,0,.15)}}.ant-popover-title{min-width:177px;min-height:32px;margin:0;padding:5px 16px 4px;color:rgba(0,0,0,.85);font-weight:500;border-bottom:1px solid #e8e8e8}.ant-popover-inner-content{padding:12px 16px;color:rgba(0,0,0,.65)}.ant-popover-message{position:relative;padding:4px 0 12px;color:rgba(0,0,0,.65);font-size:14px}.ant-popover-message>.anticon{position:absolute;top:8px;color:#faad14;font-size:14px}.ant-popover-message-title{padding-left:22px}.ant-popover-buttons{margin-bottom:4px;text-align:right}.ant-popover-buttons button{margin-left:8px}.ant-popover-arrow{position:absolute;display:block;width:8.48528137px;height:8.48528137px;background:transparent;border-style:solid;border-width:4.24264069px;-webkit-transform:rotate(45deg);transform:rotate(45deg)}.ant-popover-placement-top>.ant-popover-content>.ant-popover-arrow,.ant-popover-placement-topLeft>.ant-popover-content>.ant-popover-arrow,.ant-popover-placement-topRight>.ant-popover-content>.ant-popover-arrow{bottom:6.2px;border-color:transparent #fff #fff transparent;box-shadow:3px 3px 7px rgba(0,0,0,.07)}.ant-popover-placement-top>.ant-popover-content>.ant-popover-arrow{left:50%;-webkit-transform:translateX(-50%) rotate(45deg);transform:translateX(-50%) rotate(45deg)}.ant-popover-placement-topLeft>.ant-popover-content>.ant-popover-arrow{left:16px}.ant-popover-placement-topRight>.ant-popover-content>.ant-popover-arrow{right:16px}.ant-popover-placement-right>.ant-popover-content>.ant-popover-arrow,.ant-popover-placement-rightBottom>.ant-popover-content>.ant-popover-arrow,.ant-popover-placement-rightTop>.ant-popover-content>.ant-popover-arrow{left:6px;border-color:transparent transparent #fff #fff;box-shadow:-3px 3px 7px rgba(0,0,0,.07)}.ant-popover-placement-right>.ant-popover-content>.ant-popover-arrow{top:50%;-webkit-transform:translateY(-50%) rotate(45deg);transform:translateY(-50%) rotate(45deg)}.ant-popover-placement-rightTop>.ant-popover-content>.ant-popover-arrow{top:12px}.ant-popover-placement-rightBottom>.ant-popover-content>.ant-popover-arrow{bottom:12px}.ant-popover-placement-bottom>.ant-popover-content>.ant-popover-arrow,.ant-popover-placement-bottomLeft>.ant-popover-content>.ant-popover-arrow,.ant-popover-placement-bottomRight>.ant-popover-content>.ant-popover-arrow{top:6px;border-color:#fff transparent transparent #fff;box-shadow:-2px -2px 5px rgba(0,0,0,.06)}.ant-popover-placement-bottom>.ant-popover-content>.ant-popover-arrow{left:50%;-webkit-transform:translateX(-50%) rotate(45deg);transform:translateX(-50%) rotate(45deg)}.ant-popover-placement-bottomLeft>.ant-popover-content>.ant-popover-arrow{left:16px}.ant-popover-placement-bottomRight>.ant-popover-content>.ant-popover-arrow{right:16px}.ant-popover-placement-left>.ant-popover-content>.ant-popover-arrow,.ant-popover-placement-leftBottom>.ant-popover-content>.ant-popover-arrow,.ant-popover-placement-leftTop>.ant-popover-content>.ant-popover-arrow{right:6px;border-color:#fff #fff transparent transparent;box-shadow:3px -3px 7px rgba(0,0,0,.07)}.ant-popover-placement-left>.ant-popover-content>.ant-popover-arrow{top:50%;-webkit-transform:translateY(-50%) rotate(45deg);transform:translateY(-50%) rotate(45deg)}.ant-popover-placement-leftTop>.ant-popover-content>.ant-popover-arrow{top:12px}.ant-popover-placement-leftBottom>.ant-popover-content>.ant-popover-arrow{bottom:12px}.ant-select{box-sizing:border-box;color:rgba(0,0,0,.65);font-size:14px;font-variant:tabular-nums;line-height:1.5;font-feature-settings:"tnum";position:relative;display:inline-block;outline:0}.ant-select,.ant-select ol,.ant-select ul{margin:0;padding:0;list-style:none}.ant-select>ul>li>a{padding:0;background-color:#fff}.ant-select-arrow{display:inline-block;color:inherit;font-style:normal;line-height:0;text-align:center;text-transform:none;vertical-align:-.125em;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;position:absolute;top:50%;right:11px;margin-top:-6px;color:rgba(0,0,0,.25);font-size:12px;line-height:1;-webkit-transform-origin:50% 50%;transform-origin:50% 50%}.ant-select-arrow>*{line-height:1}.ant-select-arrow svg{display:inline-block}.ant-select-arrow:before{display:none}.ant-select-arrow .ant-select-arrow-icon{display:block}.ant-select-arrow .ant-select-arrow-icon svg{-webkit-transition:-webkit-transform .3s;transition:-webkit-transform .3s;transition:transform .3s;transition:transform .3s,-webkit-transform .3s}.ant-select-selection{display:block;box-sizing:border-box;background-color:#fff;border:1px solid #d9d9d9;border-top:1.02px solid #d9d9d9;border-radius:4px;outline:none;-webkit-transition:all .3s cubic-bezier(.645,.045,.355,1);transition:all .3s cubic-bezier(.645,.045,.355,1);-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.ant-select-selection:hover{border-color:#9254de;border-right-width:1px!important}.ant-select-focused .ant-select-selection,.ant-select-selection:active,.ant-select-selection:focus{border-color:#9254de;border-right-width:1px!important;outline:0;box-shadow:0 0 0 2px rgba(114,46,209,.2)}.ant-select-selection__clear{position:absolute;top:50%;right:11px;z-index:1;display:inline-block;width:12px;height:12px;margin-top:-6px;color:rgba(0,0,0,.25);font-size:12px;font-style:normal;line-height:12px;text-align:center;text-transform:none;background:#fff;cursor:pointer;opacity:0;-webkit-transition:color .3s ease,opacity .15s ease;transition:color .3s ease,opacity .15s ease;text-rendering:auto}.ant-select-selection__clear:before{display:block}.ant-select-selection__clear:hover{color:rgba(0,0,0,.45)}.ant-select-selection:hover .ant-select-selection__clear{opacity:1}.ant-select-selection-selected-value{float:left;max-width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.ant-select-no-arrow .ant-select-selection-selected-value{padding-right:0}.ant-select-disabled{color:rgba(0,0,0,.25)}.ant-select-disabled .ant-select-selection{background:#f5f5f5;cursor:not-allowed}.ant-select-disabled .ant-select-selection:active,.ant-select-disabled .ant-select-selection:focus,.ant-select-disabled .ant-select-selection:hover{border-color:#d9d9d9;box-shadow:none}.ant-select-disabled .ant-select-selection__clear{display:none;visibility:hidden;pointer-events:none}.ant-select-disabled .ant-select-selection--multiple .ant-select-selection__choice{padding-right:10px;color:rgba(0,0,0,.33);background:#f5f5f5}.ant-select-disabled .ant-select-selection--multiple .ant-select-selection__choice__remove{display:none}.ant-select-selection--single{position:relative;height:32px;cursor:pointer}.ant-select-selection--single .ant-select-selection__rendered{margin-right:24px}.ant-select-no-arrow .ant-select-selection__rendered{margin-right:11px}.ant-select-selection__rendered{position:relative;display:block;margin-right:11px;margin-left:11px;line-height:30px}.ant-select-selection__rendered:after{display:inline-block;width:0;visibility:hidden;content:".";pointer-events:none}.ant-select-lg{font-size:16px}.ant-select-lg .ant-select-selection--single{height:40px}.ant-select-lg .ant-select-selection__rendered{line-height:38px}.ant-select-lg .ant-select-selection--multiple{min-height:40px}.ant-select-lg .ant-select-selection--multiple .ant-select-selection__rendered li{height:32px;line-height:32px}.ant-select-lg .ant-select-selection--multiple .ant-select-arrow,.ant-select-lg .ant-select-selection--multiple .ant-select-selection__clear{top:20px}.ant-select-sm .ant-select-selection--single{height:24px}.ant-select-sm .ant-select-selection__rendered{margin-left:7px;line-height:22px}.ant-select-sm .ant-select-selection--multiple{min-height:24px}.ant-select-sm .ant-select-selection--multiple .ant-select-selection__rendered li{height:16px;line-height:14px}.ant-select-sm .ant-select-selection--multiple .ant-select-arrow,.ant-select-sm .ant-select-selection--multiple .ant-select-selection__clear{top:12px}.ant-select-sm .ant-select-arrow,.ant-select-sm .ant-select-selection__clear{right:8px}.ant-select-disabled .ant-select-selection__choice__remove{color:rgba(0,0,0,.25);cursor:default}.ant-select-disabled .ant-select-selection__choice__remove:hover{color:rgba(0,0,0,.25)}.ant-select-search__field__wrap{position:relative;display:inline-block}.ant-select-search__field__placeholder,.ant-select-selection__placeholder{position:absolute;top:50%;right:9px;left:0;max-width:100%;height:20px;margin-top:-10px;overflow:hidden;color:#bfbfbf;line-height:20px;white-space:nowrap;text-align:left;text-overflow:ellipsis}.ant-select-search__field__placeholder{left:12px}.ant-select-search__field__mirror{position:absolute;top:0;left:0;white-space:pre;opacity:0;pointer-events:none}.ant-select-search--inline{position:absolute;width:100%;height:100%}.ant-select-search--inline .ant-select-search__field__wrap{width:100%;height:100%}.ant-select-search--inline .ant-select-search__field{width:100%;height:100%;font-size:100%;line-height:1;background:transparent;border-width:0;border-radius:4px;outline:0}.ant-select-search--inline>i{float:right}.ant-select-selection--multiple{min-height:32px;padding-bottom:3px;cursor:text;zoom:1}.ant-select-selection--multiple:after,.ant-select-selection--multiple:before{display:table;content:""}.ant-select-selection--multiple:after{clear:both}.ant-select-selection--multiple .ant-select-search--inline{position:static;float:left;width:auto;max-width:100%;padding:0}.ant-select-selection--multiple .ant-select-search--inline .ant-select-search__field{width:.75em;max-width:100%}.ant-select-selection--multiple .ant-select-selection__rendered{height:auto;margin-bottom:-3px;margin-left:5px}.ant-select-selection--multiple .ant-select-selection__placeholder{margin-left:6px}.ant-select-selection--multiple .ant-select-selection__rendered>ul>li,.ant-select-selection--multiple>ul>li{height:24px;margin-top:3px;line-height:22px}.ant-select-selection--multiple .ant-select-selection__choice{position:relative;float:left;max-width:99%;margin-right:4px;padding:0 20px 0 10px;overflow:hidden;color:rgba(0,0,0,.65);background-color:#fafafa;border:1px solid #e8e8e8;border-radius:2px;cursor:default;-webkit-transition:padding .3s cubic-bezier(.645,.045,.355,1);transition:padding .3s cubic-bezier(.645,.045,.355,1)}.ant-select-selection--multiple .ant-select-selection__choice__disabled{padding:0 10px}.ant-select-selection--multiple .ant-select-selection__choice__content{display:inline-block;max-width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;-webkit-transition:margin .3s cubic-bezier(.645,.045,.355,1);transition:margin .3s cubic-bezier(.645,.045,.355,1)}.ant-select-selection--multiple .ant-select-selection__choice__remove{color:inherit;font-style:normal;line-height:0;text-align:center;text-transform:none;vertical-align:-.125em;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;position:absolute;right:4px;color:rgba(0,0,0,.45);font-weight:700;line-height:inherit;cursor:pointer;-webkit-transition:all .3s;transition:all .3s;display:inline-block;font-size:12px;font-size:10px\9;-webkit-transform:scale(.83333333) rotate(0deg);transform:scale(.83333333) rotate(0deg)}.ant-select-selection--multiple .ant-select-selection__choice__remove>*{line-height:1}.ant-select-selection--multiple .ant-select-selection__choice__remove svg{display:inline-block}.ant-select-selection--multiple .ant-select-selection__choice__remove:before{display:none}.ant-select-selection--multiple .ant-select-selection__choice__remove .ant-select-selection--multiple .ant-select-selection__choice__remove-icon{display:block}:root .ant-select-selection--multiple .ant-select-selection__choice__remove{font-size:12px}.ant-select-selection--multiple .ant-select-selection__choice__remove:hover{color:rgba(0,0,0,.75)}.ant-select-selection--multiple .ant-select-arrow,.ant-select-selection--multiple .ant-select-selection__clear{top:16px}.ant-select-allow-clear .ant-select-selection--multiple .ant-select-selection__rendered,.ant-select-show-arrow .ant-select-selection--multiple .ant-select-selection__rendered{margin-right:20px}.ant-select-open .ant-select-arrow-icon svg{-webkit-transform:rotate(180deg);transform:rotate(180deg)}.ant-select-open .ant-select-selection{border-color:#9254de;border-right-width:1px!important;outline:0;box-shadow:0 0 0 2px rgba(114,46,209,.2)}.ant-select-combobox .ant-select-arrow{display:none}.ant-select-combobox .ant-select-search--inline{float:none;width:100%;height:100%}.ant-select-combobox .ant-select-search__field__wrap{width:100%;height:100%}.ant-select-combobox .ant-select-search__field{position:relative;z-index:1;width:100%;height:100%;box-shadow:none;-webkit-transition:all .3s cubic-bezier(.645,.045,.355,1),height 0s;transition:all .3s cubic-bezier(.645,.045,.355,1),height 0s}.ant-select-combobox.ant-select-allow-clear .ant-select-selection:hover .ant-select-selection__rendered,.ant-select-combobox.ant-select-show-arrow .ant-select-selection:hover .ant-select-selection__rendered{margin-right:20px}.ant-select-dropdown{margin:0;padding:0;color:rgba(0,0,0,.65);font-variant:tabular-nums;line-height:1.5;list-style:none;font-feature-settings:"tnum";position:absolute;top:-9999px;left:-9999px;z-index:1050;box-sizing:border-box;font-size:14px;font-variant:normal;background-color:#fff;border-radius:4px;outline:none;box-shadow:0 2px 8px rgba(0,0,0,.15)}.ant-select-dropdown.slide-up-appear.slide-up-appear-active.ant-select-dropdown-placement-bottomLeft,.ant-select-dropdown.slide-up-enter.slide-up-enter-active.ant-select-dropdown-placement-bottomLeft{-webkit-animation-name:antSlideUpIn;animation-name:antSlideUpIn}.ant-select-dropdown.slide-up-appear.slide-up-appear-active.ant-select-dropdown-placement-topLeft,.ant-select-dropdown.slide-up-enter.slide-up-enter-active.ant-select-dropdown-placement-topLeft{-webkit-animation-name:antSlideDownIn;animation-name:antSlideDownIn}.ant-select-dropdown.slide-up-leave.slide-up-leave-active.ant-select-dropdown-placement-bottomLeft{-webkit-animation-name:antSlideUpOut;animation-name:antSlideUpOut}.ant-select-dropdown.slide-up-leave.slide-up-leave-active.ant-select-dropdown-placement-topLeft{-webkit-animation-name:antSlideDownOut;animation-name:antSlideDownOut}.ant-select-dropdown-hidden{display:none}.ant-select-dropdown-menu{max-height:250px;margin-bottom:0;padding-left:0;overflow:auto;list-style:none;outline:none}.ant-select-dropdown-menu-item-group-list{margin:0;padding:0}.ant-select-dropdown-menu-item-group-list>.ant-select-dropdown-menu-item{padding-left:20px}.ant-select-dropdown-menu-item-group-title{height:32px;padding:0 12px;color:rgba(0,0,0,.45);font-size:12px;line-height:32px}.ant-select-dropdown-menu-item-group-list .ant-select-dropdown-menu-item:first-child:not(:last-child),.ant-select-dropdown-menu-item-group:not(:last-child) .ant-select-dropdown-menu-item-group-list .ant-select-dropdown-menu-item:last-child{border-radius:0}.ant-select-dropdown-menu-item{position:relative;display:block;padding:5px 12px;overflow:hidden;color:rgba(0,0,0,.65);font-weight:400;line-height:22px;white-space:nowrap;text-overflow:ellipsis;cursor:pointer;-webkit-transition:background .3s ease;transition:background .3s ease}.ant-select-dropdown-menu-item:hover:not(.ant-select-dropdown-menu-item-disabled){background-color:#f9f0ff}.ant-select-dropdown-menu-item:first-child{border-radius:4px 4px 0 0}.ant-select-dropdown-menu-item:last-child{border-radius:0 0 4px 4px}.ant-select-dropdown-menu-item-selected{color:rgba(0,0,0,.65);font-weight:600;background-color:#fafafa}.ant-select-dropdown-menu-item-disabled,.ant-select-dropdown-menu-item-disabled:hover{color:rgba(0,0,0,.25);cursor:not-allowed}.ant-select-dropdown-menu-item-active:not(.ant-select-dropdown-menu-item-disabled){background-color:#f9f0ff}.ant-select-dropdown-menu-item-divider{height:1px;margin:1px 0;overflow:hidden;line-height:0;background-color:#e8e8e8}.ant-select-dropdown.ant-select-dropdown--multiple .ant-select-dropdown-menu-item{padding-right:32px}.ant-select-dropdown.ant-select-dropdown--multiple .ant-select-dropdown-menu-item .ant-select-selected-icon{position:absolute;top:50%;right:12px;color:transparent;font-weight:700;font-size:12px;text-shadow:0 .1px 0,.1px 0 0,0 -.1px 0,-.1px 0;-webkit-transform:translateY(-50%);transform:translateY(-50%);-webkit-transition:all .2s;transition:all .2s}.ant-select-dropdown.ant-select-dropdown--multiple .ant-select-dropdown-menu-item:hover .ant-select-selected-icon{color:rgba(0,0,0,.87)}.ant-select-dropdown.ant-select-dropdown--multiple .ant-select-dropdown-menu-item-disabled .ant-select-selected-icon{display:none}.ant-select-dropdown.ant-select-dropdown--multiple .ant-select-dropdown-menu-item-selected .ant-select-selected-icon,.ant-select-dropdown.ant-select-dropdown--multiple .ant-select-dropdown-menu-item-selected:hover .ant-select-selected-icon{display:inline-block;color:#722ed1}.ant-select-dropdown--empty.ant-select-dropdown--multiple .ant-select-dropdown-menu-item{padding-right:12px}.ant-select-dropdown-container-open .ant-select-dropdown,.ant-select-dropdown-open .ant-select-dropdown{display:block}.ant-empty{margin:0 8px;font-size:14px;line-height:22px;text-align:center}.ant-empty-image{height:100px;margin-bottom:8px}.ant-empty-image img{height:100%}.ant-empty-image svg{height:100%;margin:auto}.ant-empty-description{margin:0}.ant-empty-footer{margin-top:16px}.ant-empty-normal{margin:32px 0;color:rgba(0,0,0,.25)}.ant-empty-normal .ant-empty-image{height:40px}.ant-empty-small{margin:8px 0;color:rgba(0,0,0,.25)}.ant-empty-small .ant-empty-image{height:35px}.Search-module--input--lOvOF{border:none;height:32px;outline:none;margin-left:48px}@media only screen and (max-width:767.99px){.Search-module--input--lOvOF{display:none}}.Product-module--products--wZmFW{width:600px;padding:0 12px;max-width:calc(100vw - 30px)}.Product-module--products--wZmFW h3{font-size:16px;margin:8px 0 24px}.Product-module--products--wZmFW ul{list-style:none;padding:0;margin:0}.Product-module--products--wZmFW .Product-module--product--1pyvr{overflow:hidden;width:calc(50% - 16px);display:inline-block;margin-bottom:16px}.Product-module--products--wZmFW .Product-module--product--1pyvr img{width:28px;height:28px;border-radius:100%;margin-right:8px;float:left;display:block}.Product-module--products--wZmFW .Product-module--product--1pyvr .Product-module--productContent--3xt59{overflow:hidden}.Product-module--products--wZmFW .Product-module--product--1pyvr .Product-module--productContent--3xt59 h4{margin-bottom:12px;color:rgba(0,0,0,.85)}.Product-module--products--wZmFW .Product-module--product--1pyvr .Product-module--productContent--3xt59 h4 a{color:rgba(0,0,0,.85)}.Product-module--products--wZmFW .Product-module--product--1pyvr .Product-module--productContent--3xt59 .Product-module--productDescription--3dOob{margin-bottom:8px;color:rgba(0,0,0,.45)}.Product-module--products--wZmFW .Product-module--product--1pyvr .Product-module--productContent--3xt59 .Product-module--productLinks--2gCa8>a{margin-right:8px;color:rgba(0,0,0,.65);-webkit-transition:all .3s;transition:all .3s}.Product-module--products--wZmFW .Product-module--product--1pyvr .Product-module--productContent--3xt59 .Product-module--productLinks--2gCa8>a:hover{color:rgba(0,0,0,.85)}.Header-module--header--hrdnh{height:64px;line-height:64px;background:#fff;box-shadow:0 2px 8px hsla(0,0%,89.8%,.5);justify-content:space-between;padding:0 60px;position:relative;z-index:1;font-family:Avenir,-apple-system,BlinkMacSystemFont,Segoe UI,PingFang SC,Hiragino Sans GB,Microsoft YaHei,Helvetica Neue,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol}.Header-module--header--hrdnh,.Header-module--header--hrdnh .Header-module--left--1dVXS{display:flex;align-items:center}.Header-module--header--hrdnh .Header-module--left--1dVXS h1{margin:0}.Header-module--header--hrdnh .Header-module--left--1dVXS h1 img{display:block}.Header-module--header--hrdnh .Header-module--left--1dVXS .Header-module--divider--2qNp3{width:1px;height:24px;background-color:#ccc;display:inline-block;margin:0 16px}.Header-module--header--hrdnh .Header-module--left--1dVXS .Header-module--subProduceName--NMLtC{margin:0}.Header-module--header--hrdnh .Header-module--left--1dVXS .Header-module--subProduceName--NMLtC a{color:rgba(0,0,0,.9)}.Header-module--header--hrdnh .Header-module--nav--2_Knj{display:flex;align-items:center}.Header-module--header--hrdnh .Header-module--nav--2_Knj .Header-module--menu--3hWNx{font-weight:500;color:rgba(0,0,0,.65);margin:0;padding:0;list-style:none;white-space:nowrap}.Header-module--header--hrdnh .Header-module--nav--2_Knj .Header-module--menu--3hWNx li{display:inline-block;margin-right:24px;-webkit-transition:box-shadow .3s;transition:box-shadow .3s}.Header-module--header--hrdnh .Header-module--nav--2_Knj .Header-module--menu--3hWNx li.Header-module--activeItem--2xNW-{box-shadow:inset 0 2px 0 #722ed1}.Header-module--header--hrdnh .Header-module--nav--2_Knj .Header-module--menu--3hWNx li.Header-module--activeItem--2xNW- a{color:#722ed1}.Header-module--header--hrdnh .Header-module--nav--2_Knj .Header-module--menu--3hWNx li a{color:rgba(0,0,0,.65);-webkit-transition:color .3s;transition:color .3s;display:block}.Header-module--header--hrdnh .Header-module--nav--2_Knj .Header-module--menu--3hWNx li a:hover{color:#722ed1}@media only screen and (max-width:767.99px){.Header-module--header--hrdnh .Header-module--nav--2_Knj .Header-module--githubCorner--14Csh,.Header-module--header--hrdnh .Header-module--nav--2_Knj .Header-module--menu--3hWNx{display:none}}.Footer-module--footer--1oDCB{font-family:Avenir,-apple-system,BlinkMacSystemFont,Segoe UI,PingFang SC,Hiragino Sans GB,Microsoft YaHei,Helvetica Neue,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol}.rc-footer{position:relative;clear:both;color:hsla(0,0%,100%,.4);font-size:14px;line-height:1.5;background-color:#000}.rc-footer a{-webkit-transition:all .3s;transition:all .3s;color:hsla(0,0%,100%,.9);text-decoration:none}.rc-footer a:hover{color:#40a9ff}.rc-footer-container{width:100%;max-width:1200px;padding:80px 0;margin:auto}.rc-footer-columns{display:flex;justify-content:space-around}.rc-footer-column h2{position:relative;margin:0 auto 24px;font-weight:500;font-size:16px;color:#fff}.rc-footer-column-icon{margin-right:.5em;width:22px;display:inline-block;vertical-align:middle;top:-1px;position:relative;text-align:center}.rc-footer-column-icon>span,.rc-footer-column-icon>svg,.rc-footer-column-icon img{width:100%;display:block}.rc-footer-item{margin:12px 0}.rc-footer-item-icon{margin-right:.4em;width:16px;display:inline-block;vertical-align:middle;top:-1px;position:relative;text-align:center}.rc-footer-item-icon>span,.rc-footer-item-icon>svg,.rc-footer-item-icon img{width:100%;display:block}.rc-footer-item-separator{margin:0 .3em}.rc-footer-bottom-container{border-top:1px solid hsla(0,0%,100%,.25);width:100%;max-width:1200px;text-align:center;margin:0 auto;padding:16px 0;line-height:32px;font-size:16px}.rc-footer-light{background-color:transparent}.rc-footer-light,.rc-footer-light a,.rc-footer-light h2{color:rgba(0,0,0,.85)}.rc-footer-light .rc-footer-bottom-container{border-top-color:#e8e8e8}.rc-footer-light .rc-footer-item-description,.rc-footer-light .rc-footer-item-separator{color:rgba(0,0,0,.45)}@media only screen and (max-width:767.99px){.rc-footer{text-align:center}.rc-footer-container{padding:40px 0}.rc-footer-columns{display:block}.rc-footer-column{display:block;margin-bottom:40px}.rc-footer-column:last-child{margin-bottom:0}}.gatsby-highlight-code-line{background-color:#feb;display:block;margin-right:-1em;margin-left:-1em;padding-right:1em;padding-left:.75em;border-left:.25em solid #f99}.layout-module--main--2k9yj{margin:24px 0;min-height:66vh} + +/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%}body{margin:0}main{display:block}h1{font-size:2em;margin:.67em 0}hr{box-sizing:content-box;height:0;overflow:visible}pre{font-family:monospace,monospace;font-size:1em}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button,input{overflow:visible}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{border-style:none;padding:0}[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring,button:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:.35em .75em .625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress{vertical-align:baseline}textarea{overflow:auto}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}details{display:block}summary{display:list-item}[hidden],template{display:none}code[class*=language-],pre[class*=language-]{font-family:Consolas,Menlo,Monaco,Andale Mono WT,Andale Mono,Lucida Console,Lucida Sans Typewriter,DejaVu Sans Mono,Bitstream Vera Sans Mono,Liberation Mono,Nimbus Mono L,Courier New,Courier,monospace;font-size:14px;line-height:1.375;direction:ltr;text-align:left;white-space:pre;word-spacing:normal;word-break:normal;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;-ms-hyphens:none;hyphens:none;background:#f5f7ff;color:#5e6687}pre>code[class*=language-]{font-size:1em}code[class*=language-]::selection,code[class*=language-] ::selection,pre[class*=language-]::selection,pre[class*=language-] ::selection{text-shadow:none;background:#dfe2f1}pre[class*=language-]{padding:1em;margin:.5em 0;overflow:auto}:not(pre)>code[class*=language-]{padding:.1em;border-radius:.3em}.token.cdata,.token.comment,.token.doctype,.token.prolog{color:#898ea4}.token.punctuation{color:#5e6687}.token.namespace{opacity:.7}.token.boolean,.token.number,.token.operator{color:#c76b29}.token.property{color:#c08b30}.token.tag{color:#3d8fd1}.token.string{color:#22a2c9}.token.selector{color:#6679cc}.token.attr-name{color:#c76b29}.language-css .token.string,.style .token.string,.token.entity,.token.url{color:#22a2c9}.token.attr-value,.token.control,.token.directive,.token.keyword,.token.unit{color:#ac9739}.token.atrule,.token.regex,.token.statement{color:#22a2c9}.token.placeholder,.token.variable{color:#3d8fd1}.token.deleted{text-decoration:line-through}.token.inserted{border-bottom:1px dotted #202746;text-decoration:none}.token.italic{font-style:italic}.token.bold,.token.important{font-weight:700}.token.important{color:#c94922}.token.entity{cursor:help}pre>code.highlight{outline:.4em solid #c94922;outline-offset:.4em}.line-numbers .line-numbers-rows{border-right-color:#dfe2f1}.line-numbers-rows>span:before{color:#979db4}.line-highlight{background:rgba(107,115,148,.2);background:-webkit-gradient(linear,left top,right top,color-stop(70%,rgba(107,115,148,.2)),to(rgba(107,115,148,0)));background:linear-gradient(90deg,rgba(107,115,148,.2) 70%,rgba(107,115,148,0))}.command-line-prompt{border-right:1px solid #999;display:block;float:left;font-size:100%;letter-spacing:-1px;margin-right:1em;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.command-line-prompt>span:before{color:#999;content:" ";display:block;padding-right:.8em}.command-line-prompt>span[data-user]:before{content:"[" attr(data-user) "@" attr(data-host) "] $"}.command-line-prompt>span[data-user=root]:before{content:"[" attr(data-user) "@" attr(data-host) "] #"}.command-line-prompt>span[data-prompt]:before{content:attr(data-prompt)}.CodeMirror{font-family:monospace;height:300px;color:#000;direction:ltr}.CodeMirror-lines{padding:4px 0}.CodeMirror pre.CodeMirror-line,.CodeMirror pre.CodeMirror-line-like{padding:0 4px}.CodeMirror-gutter-filler,.CodeMirror-scrollbar-filler{background-color:#fff}.CodeMirror-gutters{border-right:1px solid #ddd;background-color:#f7f7f7;white-space:nowrap}.CodeMirror-linenumber{padding:0 3px 0 5px;min-width:20px;text-align:right;color:#999;white-space:nowrap}.CodeMirror-guttermarker{color:#000}.CodeMirror-guttermarker-subtle{color:#999}.CodeMirror-cursor{border-left:1px solid #000;border-right:none;width:0}.CodeMirror div.CodeMirror-secondarycursor{border-left:1px solid silver}.cm-fat-cursor .CodeMirror-cursor{width:auto;border:0!important;background:#7e7}.cm-fat-cursor div.CodeMirror-cursors{z-index:1}.cm-fat-cursor-mark{background-color:rgba(20,255,20,.5)}.cm-animate-fat-cursor,.cm-fat-cursor-mark{-webkit-animation:blink 1.06s steps(1) infinite;animation:blink 1.06s steps(1) infinite}.cm-animate-fat-cursor{width:auto;border:0;background-color:#7e7}@-webkit-keyframes blink{50%{background-color:transparent}}@keyframes blink{50%{background-color:transparent}}.cm-tab{display:inline-block;text-decoration:inherit}.CodeMirror-rulers{position:absolute;left:0;right:0;top:-50px;bottom:0;overflow:hidden}.CodeMirror-ruler{border-left:1px solid #ccc;top:0;bottom:0;position:absolute}.cm-s-default .cm-header{color:#00f}.cm-s-default .cm-quote{color:#090}.cm-negative{color:#d44}.cm-positive{color:#292}.cm-header,.cm-strong{font-weight:700}.cm-em{font-style:italic}.cm-link{text-decoration:underline}.cm-strikethrough{text-decoration:line-through}.cm-s-default .cm-keyword{color:#708}.cm-s-default .cm-atom{color:#219}.cm-s-default .cm-number{color:#164}.cm-s-default .cm-def{color:#00f}.cm-s-default .cm-variable-2{color:#05a}.cm-s-default .cm-type,.cm-s-default .cm-variable-3{color:#085}.cm-s-default .cm-comment{color:#a50}.cm-s-default .cm-string{color:#a11}.cm-s-default .cm-string-2{color:#f50}.cm-s-default .cm-meta,.cm-s-default .cm-qualifier{color:#555}.cm-s-default .cm-builtin{color:#30a}.cm-s-default .cm-bracket{color:#997}.cm-s-default .cm-tag{color:#170}.cm-s-default .cm-attribute{color:#00c}.cm-s-default .cm-hr{color:#999}.cm-s-default .cm-link{color:#00c}.cm-invalidchar,.cm-s-default .cm-error{color:red}.CodeMirror-composing{border-bottom:2px solid}div.CodeMirror span.CodeMirror-matchingbracket{color:#0b0}div.CodeMirror span.CodeMirror-nonmatchingbracket{color:#a22}.CodeMirror-matchingtag{background:rgba(255,150,0,.3)}.CodeMirror-activeline-background{background:#e8f2ff}.CodeMirror{position:relative;overflow:hidden;background:#fff}.CodeMirror-scroll{overflow:scroll!important;margin-bottom:-30px;margin-right:-30px;padding-bottom:30px;height:100%;outline:none;position:relative}.CodeMirror-sizer{position:relative;border-right:30px solid transparent}.CodeMirror-gutter-filler,.CodeMirror-hscrollbar,.CodeMirror-scrollbar-filler,.CodeMirror-vscrollbar{position:absolute;z-index:6;display:none}.CodeMirror-vscrollbar{right:0;top:0;overflow-x:hidden;overflow-y:scroll}.CodeMirror-hscrollbar{bottom:0;left:0;overflow-y:hidden;overflow-x:scroll}.CodeMirror-scrollbar-filler{right:0;bottom:0}.CodeMirror-gutter-filler{left:0;bottom:0}.CodeMirror-gutters{position:absolute;left:0;top:0;min-height:100%;z-index:3}.CodeMirror-gutter{white-space:normal;height:100%;display:inline-block;vertical-align:top;margin-bottom:-30px}.CodeMirror-gutter-wrapper{position:absolute;z-index:4;background:none!important;border:none!important}.CodeMirror-gutter-background{position:absolute;top:0;bottom:0;z-index:4}.CodeMirror-gutter-elt{position:absolute;cursor:default;z-index:4}.CodeMirror-gutter-wrapper ::selection{background-color:transparent}.CodeMirror-gutter-wrapper ::-moz-selection{background-color:transparent}.CodeMirror-lines{cursor:text;min-height:1px}.CodeMirror pre.CodeMirror-line,.CodeMirror pre.CodeMirror-line-like{border-radius:0;border-width:0;background:transparent;font-family:inherit;font-size:inherit;margin:0;white-space:pre;word-wrap:normal;line-height:inherit;color:inherit;z-index:2;position:relative;overflow:visible;-webkit-tap-highlight-color:transparent;font-variant-ligatures:contextual}.CodeMirror-wrap pre.CodeMirror-line,.CodeMirror-wrap pre.CodeMirror-line-like{word-wrap:break-word;white-space:pre-wrap;word-break:normal}.CodeMirror-linebackground{position:absolute;left:0;right:0;top:0;bottom:0;z-index:0}.CodeMirror-linewidget{position:relative;z-index:2;padding:.1px}.CodeMirror-rtl pre{direction:rtl}.CodeMirror-code{outline:none}.CodeMirror-gutter,.CodeMirror-gutters,.CodeMirror-linenumber,.CodeMirror-scroll,.CodeMirror-sizer{box-sizing:content-box}.CodeMirror-measure{position:absolute;width:100%;height:0;overflow:hidden;visibility:hidden}.CodeMirror-cursor{position:absolute;pointer-events:none}.CodeMirror-measure pre{position:static}div.CodeMirror-cursors{visibility:hidden;position:relative;z-index:3}.CodeMirror-focused div.CodeMirror-cursors,div.CodeMirror-dragcursors{visibility:visible}.CodeMirror-selected{background:#d9d9d9}.CodeMirror-focused .CodeMirror-selected{background:#d7d4f0}.CodeMirror-crosshair{cursor:crosshair}.CodeMirror-line::selection,.CodeMirror-line>span::selection,.CodeMirror-line>span>span::selection{background:#d7d4f0}.CodeMirror-line::-moz-selection,.CodeMirror-line>span::-moz-selection,.CodeMirror-line>span>span::-moz-selection{background:#d7d4f0}.cm-searching{background-color:#ffa;background-color:rgba(255,255,0,.4)}.cm-force-border{padding-right:.1px}@media print{.CodeMirror div.CodeMirror-cursors{visibility:hidden}}.cm-tab-wrap-hack:after{content:""}span.CodeMirror-selectedtext{background:none}.cm-s-mdn-like.CodeMirror{color:#999;background-color:#fff}.cm-s-mdn-like div.CodeMirror-selected{background:#cfc}.cm-s-mdn-like .CodeMirror-line::selection,.cm-s-mdn-like .CodeMirror-line>span::selection,.cm-s-mdn-like .CodeMirror-line>span>span::selection{background:#cfc}.cm-s-mdn-like .CodeMirror-line::-moz-selection,.cm-s-mdn-like .CodeMirror-line>span::-moz-selection,.cm-s-mdn-like .CodeMirror-line>span>span::-moz-selection{background:#cfc}.cm-s-mdn-like .CodeMirror-gutters{background:#f8f8f8;border-left:6px solid rgba(0,83,159,.65);color:#333}.cm-s-mdn-like .CodeMirror-linenumber{color:#aaa;padding-left:8px}.cm-s-mdn-like .CodeMirror-cursor{border-left:2px solid #222}.cm-s-mdn-like .cm-keyword{color:#6262ff}.cm-s-mdn-like .cm-atom{color:#f90}.cm-s-mdn-like .cm-number{color:#ca7841}.cm-s-mdn-like .cm-def{color:#8da6ce}.cm-s-mdn-like span.cm-tag,.cm-s-mdn-like span.cm-variable-2{color:#690}.cm-s-mdn-like .cm-variable,.cm-s-mdn-like span.cm-def,.cm-s-mdn-like span.cm-type,.cm-s-mdn-like span.cm-variable-3{color:#07a}.cm-s-mdn-like .cm-property{color:#905}.cm-s-mdn-like .cm-qualifier{color:#690}.cm-s-mdn-like .cm-operator{color:#cda869}.cm-s-mdn-like .cm-comment{color:#777;font-weight:400}.cm-s-mdn-like .cm-string{color:#07a;font-style:italic}.cm-s-mdn-like .cm-string-2{color:#bd6b18}.cm-s-mdn-like .cm-meta{color:#000}.cm-s-mdn-like .cm-builtin{color:#9b7536}.cm-s-mdn-like .cm-tag{color:#997643}.cm-s-mdn-like .cm-attribute{color:#d6bb6d}.cm-s-mdn-like .cm-header{color:#ff6400}.cm-s-mdn-like .cm-hr{color:#aeaeae}.cm-s-mdn-like .cm-link{color:#ad9361;font-style:italic;text-decoration:none}.cm-s-mdn-like .cm-error{border-bottom:1px solid red}div.cm-s-mdn-like .CodeMirror-activeline-background{background:#efefff}div.cm-s-mdn-like span.CodeMirror-matchingbracket{outline:1px solid grey;color:inherit}.cm-s-mdn-like.CodeMirror{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFcAAAAyCAYAAAAp8UeFAAAHvklEQVR42s2b63bcNgyEQZCSHCdt2vd/0tWF7I+Q6XgMXiTtuvU5Pl57ZQKkKHzEAOtF5KeIJBGJ8uvL599FRFREZhFx8DeXv8trn68RuGaC8TRfo3SNp9dlDDHedyLyTUTeRWStXKPZrjtpZxaRw5hPqozRs1N8/enzIiQRWcCgy4MUA0f+XWliDhyL8Lfyvx7ei/Ae3iQFHyw7U/59pQVIMEEPEz0G7XiwdRjzSfC3UTtz9vchIntxvry5iMgfIhJoEflOz2CQr3F5h/HfeFe+GTdLaKcu9L8LTeQb/R/7GgbsfKedyNdoHsN31uRPWrfZ5wsj/NzzRQHuToIdU3ahwnsKPxXCjJITuOsi7XLc7SG/v5GdALs7wf8JjTFiB5+QvTEfRyGOfX3Lrx8wxyQi3sNq46O7QahQiCsRFgqddjBouVEHOKDgXAQHD9gJCr5sMKkEdjwsarG/ww3BMHBU7OBjXnzdyY7SfCxf5/z6ATccrwlKuwC/jhznnPF4CgVzhhVf4xp2EixcBActO75iZ8/fM9zAs2OMzKdslgXWJ9XG8PQoOAMA5fGcsvORgv0doBXyHrCwfLJAOwo71QLNkb8n2Pl6EWiR7OCibtkPaz4Kc/0NNAze2gju3zOwekALDaCFPI5vjPFmgGY5AZqyGEvH1x7QfIb8YtxMnA/b+QQ0aQDAwc6JMFg8CbQZ4qoYEEHbRwNojuK3EHwd7VALSgq+MNDKzfT58T8qdpADrgW0GmgcAS1lhzztJmkAzcPNOQbsWEALBDSlMKUG0Eq4CLAQWvEVQ9WU57gZJwZtgPO3r9oBTQ9WO8TjqXINx8R0EYpiZEUWOF3FxkbJkgU9B2f41YBrIj5ZfsQ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rSA5qTecWn5agK6BzSpgAyD+wFaqhnYoSZ1Vwr8CmlTQbrcO3ZaX0NAEyMbYaAlyquFoLKK3SPby9CeVUPThrSJmkCAE0CrKUQadi4DrdSlWhmah0YL9z9vClH59YGbHx1J8VZTyAjQepJjmXwAKTDQI3omc3p1U4gDUf6RfcdYfrUp5ClAi2J3Ba6UOXGo+K+bQrjjssitG2SJzshaLwMtXgRagUNpYYoVkMSBLM+9GGiJZMvduG6DRZ4qc04DMPtQQxOjEtACmhO7K1AbNbQDEggZyJwscFpAGwENhoBeUwh3bWolhe8BTYVKxQEWrSUn/uhcM5KhvUu/+eQu0Lzhi+VrK0PrZZNDQKs9cpYUuFYgMVpD4/NxenJTiMCNqdUEUf1qZWjppLT5qSkkUZbCwkbZMSuVnu80hfSkzRbQeqCZSAh6huR4VtoM2gHAlLf72smuWgE+VV7XpE25Ab2WFDgyhnSuKbs4GuGzCjR+tIoUuMFg3kgcWKLTwRqanJQ2W00hAsenfaApRC42hbCvK1SlE0HtE9BGgneJO+ELamitD1YjjOYnNYVcraGhtKkW0EqVVeDx733I2NH581k1NNxNLG0i0IJ8/NjVaOZ0tYZ2Vtr0Xv7tPV3hkWp9EFkgS/J0vosngTaSoaG06WHi+xObQkaAdlbanP8B2+2l0f90LmUAAAAASUVORK5CYII=)}body,html{overflow-x:hidden}.ant-tooltip{box-sizing:border-box;margin:0;padding:0;color:rgba(0,0,0,.65);font-size:14px;font-variant:tabular-nums;line-height:1.5;list-style:none;font-feature-settings:"tnum";position:absolute;z-index:1060;display:block;max-width:250px;visibility:visible}.ant-tooltip-hidden{display:none}.ant-tooltip-placement-top,.ant-tooltip-placement-topLeft,.ant-tooltip-placement-topRight{padding-bottom:8px}.ant-tooltip-placement-right,.ant-tooltip-placement-rightBottom,.ant-tooltip-placement-rightTop{padding-left:8px}.ant-tooltip-placement-bottom,.ant-tooltip-placement-bottomLeft,.ant-tooltip-placement-bottomRight{padding-top:8px}.ant-tooltip-placement-left,.ant-tooltip-placement-leftBottom,.ant-tooltip-placement-leftTop{padding-right:8px}.ant-tooltip-inner{min-width:30px;min-height:32px;padding:6px 8px;color:#fff;text-align:left;text-decoration:none;word-wrap:break-word;background-color:rgba(0,0,0,.75);border-radius:4px;box-shadow:0 2px 8px rgba(0,0,0,.15)}.ant-tooltip-arrow{position:absolute;display:block;width:13.07106781px;height:13.07106781px;overflow:hidden;background:transparent;pointer-events:none}.ant-tooltip-arrow:before{position:absolute;top:0;right:0;bottom:0;left:0;display:block;width:5px;height:5px;margin:auto;background-color:rgba(0,0,0,.75);content:"";pointer-events:auto}.ant-tooltip-placement-top .ant-tooltip-arrow,.ant-tooltip-placement-topLeft .ant-tooltip-arrow,.ant-tooltip-placement-topRight .ant-tooltip-arrow{bottom:-5.07106781px}.ant-tooltip-placement-top .ant-tooltip-arrow:before,.ant-tooltip-placement-topLeft .ant-tooltip-arrow:before,.ant-tooltip-placement-topRight .ant-tooltip-arrow:before{box-shadow:3px 3px 7px rgba(0,0,0,.07);-webkit-transform:translateY(-6.53553391px) rotate(45deg);transform:translateY(-6.53553391px) rotate(45deg)}.ant-tooltip-placement-top .ant-tooltip-arrow{left:50%;-webkit-transform:translateX(-50%);transform:translateX(-50%)}.ant-tooltip-placement-topLeft .ant-tooltip-arrow{left:13px}.ant-tooltip-placement-topRight .ant-tooltip-arrow{right:13px}.ant-tooltip-placement-right .ant-tooltip-arrow,.ant-tooltip-placement-rightBottom .ant-tooltip-arrow,.ant-tooltip-placement-rightTop .ant-tooltip-arrow{left:-5.07106781px}.ant-tooltip-placement-right .ant-tooltip-arrow:before,.ant-tooltip-placement-rightBottom .ant-tooltip-arrow:before,.ant-tooltip-placement-rightTop .ant-tooltip-arrow:before{box-shadow:-3px 3px 7px rgba(0,0,0,.07);-webkit-transform:translateX(6.53553391px) rotate(45deg);transform:translateX(6.53553391px) rotate(45deg)}.ant-tooltip-placement-right .ant-tooltip-arrow{top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%)}.ant-tooltip-placement-rightTop .ant-tooltip-arrow{top:5px}.ant-tooltip-placement-rightBottom .ant-tooltip-arrow{bottom:5px}.ant-tooltip-placement-left .ant-tooltip-arrow,.ant-tooltip-placement-leftBottom .ant-tooltip-arrow,.ant-tooltip-placement-leftTop .ant-tooltip-arrow{right:-5.07106781px}.ant-tooltip-placement-left .ant-tooltip-arrow:before,.ant-tooltip-placement-leftBottom .ant-tooltip-arrow:before,.ant-tooltip-placement-leftTop .ant-tooltip-arrow:before{box-shadow:3px -3px 7px rgba(0,0,0,.07);-webkit-transform:translateX(-6.53553391px) rotate(45deg);transform:translateX(-6.53553391px) rotate(45deg)}.ant-tooltip-placement-left .ant-tooltip-arrow{top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%)}.ant-tooltip-placement-leftTop .ant-tooltip-arrow{top:5px}.ant-tooltip-placement-leftBottom .ant-tooltip-arrow{bottom:5px}.ant-tooltip-placement-bottom .ant-tooltip-arrow,.ant-tooltip-placement-bottomLeft .ant-tooltip-arrow,.ant-tooltip-placement-bottomRight .ant-tooltip-arrow{top:-5.07106781px}.ant-tooltip-placement-bottom .ant-tooltip-arrow:before,.ant-tooltip-placement-bottomLeft .ant-tooltip-arrow:before,.ant-tooltip-placement-bottomRight .ant-tooltip-arrow:before{box-shadow:-3px -3px 7px rgba(0,0,0,.07);-webkit-transform:translateY(6.53553391px) rotate(45deg);transform:translateY(6.53553391px) rotate(45deg)}.ant-tooltip-placement-bottom .ant-tooltip-arrow{left:50%;-webkit-transform:translateX(-50%);transform:translateX(-50%)}.ant-tooltip-placement-bottomLeft .ant-tooltip-arrow{left:13px}.ant-tooltip-placement-bottomRight .ant-tooltip-arrow{right:13px}.ant-affix{position:fixed;z-index:10}.ant-layout{display:flex;flex:auto;flex-direction:column;min-height:0;background:#f0f2f5}.ant-layout,.ant-layout *{box-sizing:border-box}.ant-layout.ant-layout-has-sider{flex-direction:row}.ant-layout.ant-layout-has-sider>.ant-layout,.ant-layout.ant-layout-has-sider>.ant-layout-content{overflow-x:hidden}.ant-layout-footer,.ant-layout-header{flex:0 0 auto}.ant-layout-header{height:64px;padding:0 50px;line-height:64px;background:#001529}.ant-layout-footer{padding:24px 50px;color:rgba(0,0,0,.65);font-size:14px;background:#f0f2f5}.ant-layout-content{flex:auto;min-height:0}.ant-layout-sider{position:relative;min-width:0;background:#001529;-webkit-transition:all .2s;transition:all .2s}.ant-layout-sider-children{height:100%;margin-top:-.1px;padding-top:.1px}.ant-layout-sider-has-trigger{padding-bottom:48px}.ant-layout-sider-right{order:1}.ant-layout-sider-trigger{position:fixed;bottom:0;z-index:1;height:48px;color:#fff;line-height:48px;text-align:center;background:#002140;cursor:pointer;-webkit-transition:all .2s;transition:all .2s}.ant-layout-sider-zero-width>*{overflow:hidden}.ant-layout-sider-zero-width-trigger{position:absolute;top:64px;right:-36px;z-index:1;width:36px;height:42px;color:#fff;font-size:18px;line-height:42px;text-align:center;background:#001529;border-radius:0 4px 4px 0;cursor:pointer;-webkit-transition:background .3s ease;transition:background .3s ease}.ant-layout-sider-zero-width-trigger:hover{background:#192c3e}.ant-layout-sider-zero-width-trigger-right{left:-36px;border-radius:4px 0 0 4px}.ant-layout-sider-light{background:#fff}.ant-layout-sider-light .ant-layout-sider-trigger,.ant-layout-sider-light .ant-layout-sider-zero-width-trigger,.ant-menu{color:rgba(0,0,0,.65);background:#fff}.ant-menu{box-sizing:border-box;font-size:14px;font-variant:tabular-nums;line-height:1.5;font-feature-settings:"tnum";margin:0;padding:0;line-height:0;list-style:none;outline:none;box-shadow:0 2px 8px rgba(0,0,0,.15);-webkit-transition:background .3s,width .2s;transition:background .3s,width .2s;zoom:1}.ant-menu:after,.ant-menu:before{display:table;content:""}.ant-menu:after{clear:both}.ant-menu ol,.ant-menu ul{margin:0;padding:0;list-style:none}.ant-menu-hidden{display:none}.ant-menu-item-group-title{padding:8px 16px;color:rgba(0,0,0,.45);font-size:14px;line-height:1.5;-webkit-transition:all .3s;transition:all .3s}.ant-menu-submenu,.ant-menu-submenu-inline{-webkit-transition:border-color .3s cubic-bezier(.645,.045,.355,1),background .3s cubic-bezier(.645,.045,.355,1),padding .15s cubic-bezier(.645,.045,.355,1);transition:border-color .3s cubic-bezier(.645,.045,.355,1),background .3s cubic-bezier(.645,.045,.355,1),padding .15s cubic-bezier(.645,.045,.355,1)}.ant-menu-submenu-selected{color:#722ed1}.ant-menu-item:active,.ant-menu-submenu-title:active{background:#f9f0ff}.ant-menu-submenu .ant-menu-sub{cursor:auto;-webkit-transition:background .3s cubic-bezier(.645,.045,.355,1),padding .3s cubic-bezier(.645,.045,.355,1);transition:background .3s cubic-bezier(.645,.045,.355,1),padding .3s cubic-bezier(.645,.045,.355,1)}.ant-menu-item>a{display:block;color:rgba(0,0,0,.65)}.ant-menu-item>a:hover{color:#722ed1}.ant-menu-item>a:before{position:absolute;top:0;right:0;bottom:0;left:0;background-color:transparent;content:""}.ant-menu-item-divider{height:1px;overflow:hidden;line-height:0;background-color:#e8e8e8}.ant-menu-item-active,.ant-menu-item:hover,.ant-menu-submenu-active,.ant-menu-submenu-title:hover,.ant-menu:not(.ant-menu-inline) .ant-menu-submenu-open{color:#722ed1}.ant-menu-horizontal .ant-menu-item,.ant-menu-horizontal .ant-menu-submenu{margin-top:-1px}.ant-menu-horizontal>.ant-menu-item-active,.ant-menu-horizontal>.ant-menu-item:hover,.ant-menu-horizontal>.ant-menu-submenu .ant-menu-submenu-title:hover{background-color:transparent}.ant-menu-item-selected,.ant-menu-item-selected>a,.ant-menu-item-selected>a:hover{color:#722ed1}.ant-menu:not(.ant-menu-horizontal) .ant-menu-item-selected{background-color:#f9f0ff}.ant-menu-inline,.ant-menu-vertical,.ant-menu-vertical-left{border-right:1px solid #e8e8e8}.ant-menu-vertical-right{border-left:1px solid #e8e8e8}.ant-menu-vertical-left.ant-menu-sub,.ant-menu-vertical-right.ant-menu-sub,.ant-menu-vertical.ant-menu-sub{min-width:160px;padding:0;border-right:0;-webkit-transform-origin:0 0;transform-origin:0 0}.ant-menu-vertical-left.ant-menu-sub .ant-menu-item,.ant-menu-vertical-right.ant-menu-sub .ant-menu-item,.ant-menu-vertical.ant-menu-sub .ant-menu-item{left:0;margin-left:0;border-right:0}.ant-menu-vertical-left.ant-menu-sub .ant-menu-item:after,.ant-menu-vertical-right.ant-menu-sub .ant-menu-item:after,.ant-menu-vertical.ant-menu-sub .ant-menu-item:after{border-right:0}.ant-menu-vertical-left.ant-menu-sub>.ant-menu-item,.ant-menu-vertical-left.ant-menu-sub>.ant-menu-submenu,.ant-menu-vertical-right.ant-menu-sub>.ant-menu-item,.ant-menu-vertical-right.ant-menu-sub>.ant-menu-submenu,.ant-menu-vertical.ant-menu-sub>.ant-menu-item,.ant-menu-vertical.ant-menu-sub>.ant-menu-submenu{-webkit-transform-origin:0 0;transform-origin:0 0}.ant-menu-horizontal.ant-menu-sub{min-width:114px}.ant-menu-item,.ant-menu-submenu-title{position:relative;display:block;margin:0;padding:0 20px;white-space:nowrap;cursor:pointer;-webkit-transition:color .3s cubic-bezier(.645,.045,.355,1),border-color .3s cubic-bezier(.645,.045,.355,1),background .3s cubic-bezier(.645,.045,.355,1),padding .15s cubic-bezier(.645,.045,.355,1);transition:color .3s cubic-bezier(.645,.045,.355,1),border-color .3s cubic-bezier(.645,.045,.355,1),background .3s cubic-bezier(.645,.045,.355,1),padding .15s cubic-bezier(.645,.045,.355,1)}.ant-menu-item .anticon,.ant-menu-submenu-title .anticon{min-width:14px;margin-right:10px;font-size:14px;-webkit-transition:font-size .15s cubic-bezier(.215,.61,.355,1),margin .3s cubic-bezier(.645,.045,.355,1);transition:font-size .15s cubic-bezier(.215,.61,.355,1),margin .3s cubic-bezier(.645,.045,.355,1)}.ant-menu-item .anticon+span,.ant-menu-submenu-title .anticon+span{opacity:1;-webkit-transition:opacity .3s cubic-bezier(.645,.045,.355,1),width .3s cubic-bezier(.645,.045,.355,1);transition:opacity .3s cubic-bezier(.645,.045,.355,1),width .3s cubic-bezier(.645,.045,.355,1)}.ant-menu>.ant-menu-item-divider{height:1px;margin:1px 0;padding:0;overflow:hidden;line-height:0;background-color:#e8e8e8}.ant-menu-submenu-popup{position:absolute;z-index:1050;background:#fff;border-radius:4px}.ant-menu-submenu-popup .submenu-title-wrapper{padding-right:20px}.ant-menu-submenu-popup:before{position:absolute;top:-7px;right:0;bottom:0;left:0;opacity:.0001;content:" "}.ant-menu-submenu>.ant-menu{background-color:#fff;border-radius:4px}.ant-menu-submenu>.ant-menu-submenu-title:after{-webkit-transition:-webkit-transform .3s cubic-bezier(.645,.045,.355,1);transition:-webkit-transform .3s cubic-bezier(.645,.045,.355,1);transition:transform .3s cubic-bezier(.645,.045,.355,1);transition:transform .3s cubic-bezier(.645,.045,.355,1),-webkit-transform .3s cubic-bezier(.645,.045,.355,1)}.ant-menu-submenu-inline>.ant-menu-submenu-title .ant-menu-submenu-arrow,.ant-menu-submenu-vertical-left>.ant-menu-submenu-title .ant-menu-submenu-arrow,.ant-menu-submenu-vertical-right>.ant-menu-submenu-title .ant-menu-submenu-arrow,.ant-menu-submenu-vertical>.ant-menu-submenu-title .ant-menu-submenu-arrow{position:absolute;top:50%;right:16px;width:10px;-webkit-transition:-webkit-transform .3s cubic-bezier(.645,.045,.355,1);transition:-webkit-transform .3s cubic-bezier(.645,.045,.355,1);transition:transform .3s cubic-bezier(.645,.045,.355,1);transition:transform .3s cubic-bezier(.645,.045,.355,1),-webkit-transform .3s cubic-bezier(.645,.045,.355,1)}.ant-menu-submenu-inline>.ant-menu-submenu-title .ant-menu-submenu-arrow:after,.ant-menu-submenu-inline>.ant-menu-submenu-title .ant-menu-submenu-arrow:before,.ant-menu-submenu-vertical-left>.ant-menu-submenu-title .ant-menu-submenu-arrow:after,.ant-menu-submenu-vertical-left>.ant-menu-submenu-title .ant-menu-submenu-arrow:before,.ant-menu-submenu-vertical-right>.ant-menu-submenu-title .ant-menu-submenu-arrow:after,.ant-menu-submenu-vertical-right>.ant-menu-submenu-title .ant-menu-submenu-arrow:before,.ant-menu-submenu-vertical>.ant-menu-submenu-title .ant-menu-submenu-arrow:after,.ant-menu-submenu-vertical>.ant-menu-submenu-title .ant-menu-submenu-arrow:before{position:absolute;width:6px;height:1.5px;background:#fff;background:rgba(0,0,0,.65)\9;background-image:-webkit-gradient(linear,left top,right top,from(rgba(0,0,0,.65)),to(rgba(0,0,0,.65)));background-image:linear-gradient(90deg,rgba(0,0,0,.65),rgba(0,0,0,.65));background-image:none\9;border-radius:2px;-webkit-transition:background .3s cubic-bezier(.645,.045,.355,1),top .3s cubic-bezier(.645,.045,.355,1),-webkit-transform .3s cubic-bezier(.645,.045,.355,1);transition:background .3s cubic-bezier(.645,.045,.355,1),top .3s cubic-bezier(.645,.045,.355,1),-webkit-transform .3s cubic-bezier(.645,.045,.355,1);transition:background .3s cubic-bezier(.645,.045,.355,1),transform .3s cubic-bezier(.645,.045,.355,1),top .3s cubic-bezier(.645,.045,.355,1);transition:background .3s cubic-bezier(.645,.045,.355,1),transform .3s cubic-bezier(.645,.045,.355,1),top .3s cubic-bezier(.645,.045,.355,1),-webkit-transform .3s cubic-bezier(.645,.045,.355,1);content:""}.ant-menu-submenu-inline>.ant-menu-submenu-title .ant-menu-submenu-arrow:before,.ant-menu-submenu-vertical-left>.ant-menu-submenu-title .ant-menu-submenu-arrow:before,.ant-menu-submenu-vertical-right>.ant-menu-submenu-title .ant-menu-submenu-arrow:before,.ant-menu-submenu-vertical>.ant-menu-submenu-title .ant-menu-submenu-arrow:before{-webkit-transform:rotate(45deg) translateY(-2px);transform:rotate(45deg) translateY(-2px)}.ant-menu-submenu-inline>.ant-menu-submenu-title .ant-menu-submenu-arrow:after,.ant-menu-submenu-vertical-left>.ant-menu-submenu-title .ant-menu-submenu-arrow:after,.ant-menu-submenu-vertical-right>.ant-menu-submenu-title .ant-menu-submenu-arrow:after,.ant-menu-submenu-vertical>.ant-menu-submenu-title .ant-menu-submenu-arrow:after{-webkit-transform:rotate(-45deg) translateY(2px);transform:rotate(-45deg) translateY(2px)}.ant-menu-submenu-inline>.ant-menu-submenu-title:hover .ant-menu-submenu-arrow:after,.ant-menu-submenu-inline>.ant-menu-submenu-title:hover .ant-menu-submenu-arrow:before,.ant-menu-submenu-vertical-left>.ant-menu-submenu-title:hover .ant-menu-submenu-arrow:after,.ant-menu-submenu-vertical-left>.ant-menu-submenu-title:hover .ant-menu-submenu-arrow:before,.ant-menu-submenu-vertical-right>.ant-menu-submenu-title:hover .ant-menu-submenu-arrow:after,.ant-menu-submenu-vertical-right>.ant-menu-submenu-title:hover .ant-menu-submenu-arrow:before,.ant-menu-submenu-vertical>.ant-menu-submenu-title:hover .ant-menu-submenu-arrow:after,.ant-menu-submenu-vertical>.ant-menu-submenu-title:hover .ant-menu-submenu-arrow:before{background:-webkit-gradient(linear,left top,right top,from(#722ed1),to(#722ed1));background:linear-gradient(90deg,#722ed1,#722ed1)}.ant-menu-submenu-inline>.ant-menu-submenu-title .ant-menu-submenu-arrow:before{-webkit-transform:rotate(-45deg) translateX(2px);transform:rotate(-45deg) translateX(2px)}.ant-menu-submenu-inline>.ant-menu-submenu-title .ant-menu-submenu-arrow:after{-webkit-transform:rotate(45deg) translateX(-2px);transform:rotate(45deg) translateX(-2px)}.ant-menu-submenu-open.ant-menu-submenu-inline>.ant-menu-submenu-title .ant-menu-submenu-arrow{-webkit-transform:translateY(-2px);transform:translateY(-2px)}.ant-menu-submenu-open.ant-menu-submenu-inline>.ant-menu-submenu-title .ant-menu-submenu-arrow:after{-webkit-transform:rotate(-45deg) translateX(-2px);transform:rotate(-45deg) translateX(-2px)}.ant-menu-submenu-open.ant-menu-submenu-inline>.ant-menu-submenu-title .ant-menu-submenu-arrow:before{-webkit-transform:rotate(45deg) translateX(2px);transform:rotate(45deg) translateX(2px)}.ant-menu-vertical-left .ant-menu-submenu-selected,.ant-menu-vertical-left .ant-menu-submenu-selected>a,.ant-menu-vertical-right .ant-menu-submenu-selected,.ant-menu-vertical-right .ant-menu-submenu-selected>a,.ant-menu-vertical .ant-menu-submenu-selected,.ant-menu-vertical .ant-menu-submenu-selected>a{color:#722ed1}.ant-menu-horizontal{line-height:46px;white-space:nowrap;border:0;border-bottom:1px solid #e8e8e8;box-shadow:none}.ant-menu-horizontal>.ant-menu-item,.ant-menu-horizontal>.ant-menu-submenu{position:relative;top:1px;display:inline-block;vertical-align:bottom;border-bottom:2px solid transparent}.ant-menu-horizontal>.ant-menu-item-active,.ant-menu-horizontal>.ant-menu-item-open,.ant-menu-horizontal>.ant-menu-item-selected,.ant-menu-horizontal>.ant-menu-item:hover,.ant-menu-horizontal>.ant-menu-submenu-active,.ant-menu-horizontal>.ant-menu-submenu-open,.ant-menu-horizontal>.ant-menu-submenu-selected,.ant-menu-horizontal>.ant-menu-submenu:hover{color:#722ed1;border-bottom:2px solid #722ed1}.ant-menu-horizontal>.ant-menu-item>a{display:block;color:rgba(0,0,0,.65)}.ant-menu-horizontal>.ant-menu-item>a:hover{color:#722ed1}.ant-menu-horizontal>.ant-menu-item>a:before{bottom:-2px}.ant-menu-horizontal>.ant-menu-item-selected>a{color:#722ed1}.ant-menu-horizontal:after{display:block;clear:both;height:0;content:" "}.ant-menu-inline .ant-menu-item,.ant-menu-vertical-left .ant-menu-item,.ant-menu-vertical-right .ant-menu-item,.ant-menu-vertical .ant-menu-item{position:relative}.ant-menu-inline .ant-menu-item:after,.ant-menu-vertical-left .ant-menu-item:after,.ant-menu-vertical-right .ant-menu-item:after,.ant-menu-vertical .ant-menu-item:after{position:absolute;top:0;right:0;bottom:0;border-right:3px solid #722ed1;-webkit-transform:scaleY(.0001);transform:scaleY(.0001);opacity:0;-webkit-transition:opacity .15s cubic-bezier(.215,.61,.355,1),-webkit-transform .15s cubic-bezier(.215,.61,.355,1);transition:opacity .15s cubic-bezier(.215,.61,.355,1),-webkit-transform .15s cubic-bezier(.215,.61,.355,1);transition:transform .15s cubic-bezier(.215,.61,.355,1),opacity .15s cubic-bezier(.215,.61,.355,1);transition:transform .15s cubic-bezier(.215,.61,.355,1),opacity .15s cubic-bezier(.215,.61,.355,1),-webkit-transform .15s cubic-bezier(.215,.61,.355,1);content:""}.ant-menu-inline .ant-menu-item,.ant-menu-inline .ant-menu-submenu-title,.ant-menu-vertical-left .ant-menu-item,.ant-menu-vertical-left .ant-menu-submenu-title,.ant-menu-vertical-right .ant-menu-item,.ant-menu-vertical-right .ant-menu-submenu-title,.ant-menu-vertical .ant-menu-item,.ant-menu-vertical .ant-menu-submenu-title{height:40px;margin-top:4px;margin-bottom:4px;padding:0 16px;overflow:hidden;font-size:14px;line-height:40px;text-overflow:ellipsis}.ant-menu-inline .ant-menu-submenu,.ant-menu-vertical-left .ant-menu-submenu,.ant-menu-vertical-right .ant-menu-submenu,.ant-menu-vertical .ant-menu-submenu{padding-bottom:.02px}.ant-menu-inline .ant-menu-item:not(:last-child),.ant-menu-vertical-left .ant-menu-item:not(:last-child),.ant-menu-vertical-right .ant-menu-item:not(:last-child),.ant-menu-vertical .ant-menu-item:not(:last-child){margin-bottom:8px}.ant-menu-inline>.ant-menu-item,.ant-menu-inline>.ant-menu-submenu>.ant-menu-submenu-title,.ant-menu-vertical-left>.ant-menu-item,.ant-menu-vertical-left>.ant-menu-submenu>.ant-menu-submenu-title,.ant-menu-vertical-right>.ant-menu-item,.ant-menu-vertical-right>.ant-menu-submenu>.ant-menu-submenu-title,.ant-menu-vertical>.ant-menu-item,.ant-menu-vertical>.ant-menu-submenu>.ant-menu-submenu-title{height:40px;line-height:40px}.ant-menu-inline{width:100%}.ant-menu-inline .ant-menu-item-selected:after,.ant-menu-inline .ant-menu-selected:after{-webkit-transform:scaleY(1);transform:scaleY(1);opacity:1;-webkit-transition:opacity .15s cubic-bezier(.645,.045,.355,1),-webkit-transform .15s cubic-bezier(.645,.045,.355,1);transition:opacity .15s cubic-bezier(.645,.045,.355,1),-webkit-transform .15s cubic-bezier(.645,.045,.355,1);transition:transform .15s cubic-bezier(.645,.045,.355,1),opacity .15s cubic-bezier(.645,.045,.355,1);transition:transform .15s cubic-bezier(.645,.045,.355,1),opacity .15s cubic-bezier(.645,.045,.355,1),-webkit-transform .15s cubic-bezier(.645,.045,.355,1)}.ant-menu-inline .ant-menu-item,.ant-menu-inline .ant-menu-submenu-title{width:calc(100% + 1px)}.ant-menu-inline .ant-menu-submenu-title{padding-right:34px}.ant-menu-inline-collapsed{width:80px}.ant-menu-inline-collapsed>.ant-menu-item,.ant-menu-inline-collapsed>.ant-menu-item-group>.ant-menu-item-group-list>.ant-menu-item,.ant-menu-inline-collapsed>.ant-menu-item-group>.ant-menu-item-group-list>.ant-menu-submenu>.ant-menu-submenu-title,.ant-menu-inline-collapsed>.ant-menu-submenu>.ant-menu-submenu-title{left:0;padding:0 32px!important;text-overflow:clip}.ant-menu-inline-collapsed>.ant-menu-item-group>.ant-menu-item-group-list>.ant-menu-item .ant-menu-submenu-arrow,.ant-menu-inline-collapsed>.ant-menu-item-group>.ant-menu-item-group-list>.ant-menu-submenu>.ant-menu-submenu-title .ant-menu-submenu-arrow,.ant-menu-inline-collapsed>.ant-menu-item .ant-menu-submenu-arrow,.ant-menu-inline-collapsed>.ant-menu-submenu>.ant-menu-submenu-title .ant-menu-submenu-arrow{display:none}.ant-menu-inline-collapsed>.ant-menu-item-group>.ant-menu-item-group-list>.ant-menu-item .anticon,.ant-menu-inline-collapsed>.ant-menu-item-group>.ant-menu-item-group-list>.ant-menu-submenu>.ant-menu-submenu-title .anticon,.ant-menu-inline-collapsed>.ant-menu-item .anticon,.ant-menu-inline-collapsed>.ant-menu-submenu>.ant-menu-submenu-title .anticon{margin:0;font-size:16px;line-height:40px}.ant-menu-inline-collapsed>.ant-menu-item-group>.ant-menu-item-group-list>.ant-menu-item .anticon+span,.ant-menu-inline-collapsed>.ant-menu-item-group>.ant-menu-item-group-list>.ant-menu-submenu>.ant-menu-submenu-title .anticon+span,.ant-menu-inline-collapsed>.ant-menu-item .anticon+span,.ant-menu-inline-collapsed>.ant-menu-submenu>.ant-menu-submenu-title .anticon+span{display:inline-block;max-width:0;opacity:0}.ant-menu-inline-collapsed-tooltip{pointer-events:none}.ant-menu-inline-collapsed-tooltip .anticon{display:none}.ant-menu-inline-collapsed-tooltip a{color:hsla(0,0%,100%,.85)}.ant-menu-inline-collapsed .ant-menu-item-group-title{padding-right:4px;padding-left:4px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.ant-menu-item-group-list{margin:0;padding:0}.ant-menu-item-group-list .ant-menu-item,.ant-menu-item-group-list .ant-menu-submenu-title{padding:0 16px 0 28px}.ant-menu-root.ant-menu-inline,.ant-menu-root.ant-menu-vertical,.ant-menu-root.ant-menu-vertical-left,.ant-menu-root.ant-menu-vertical-right{box-shadow:none}.ant-menu-sub.ant-menu-inline{padding:0;border:0;border-radius:0;box-shadow:none}.ant-menu-sub.ant-menu-inline>.ant-menu-item,.ant-menu-sub.ant-menu-inline>.ant-menu-submenu>.ant-menu-submenu-title{height:40px;line-height:40px;list-style-position:inside;list-style-type:disc}.ant-menu-sub.ant-menu-inline .ant-menu-item-group-title{padding-left:32px}.ant-menu-item-disabled,.ant-menu-submenu-disabled{color:rgba(0,0,0,.25)!important;background:none;border-color:transparent!important;cursor:not-allowed}.ant-menu-item-disabled>a,.ant-menu-submenu-disabled>a{color:rgba(0,0,0,.25)!important;pointer-events:none}.ant-menu-item-disabled>.ant-menu-submenu-title,.ant-menu-submenu-disabled>.ant-menu-submenu-title{color:rgba(0,0,0,.25)!important;cursor:not-allowed}.ant-menu-item-disabled>.ant-menu-submenu-title>.ant-menu-submenu-arrow:after,.ant-menu-item-disabled>.ant-menu-submenu-title>.ant-menu-submenu-arrow:before,.ant-menu-submenu-disabled>.ant-menu-submenu-title>.ant-menu-submenu-arrow:after,.ant-menu-submenu-disabled>.ant-menu-submenu-title>.ant-menu-submenu-arrow:before{background:rgba(0,0,0,.25)!important}.ant-menu-dark,.ant-menu-dark .ant-menu-sub{color:hsla(0,0%,100%,.65);background:#001529}.ant-menu-dark .ant-menu-sub .ant-menu-submenu-title .ant-menu-submenu-arrow,.ant-menu-dark .ant-menu-submenu-title .ant-menu-submenu-arrow{opacity:.45;-webkit-transition:all .3s;transition:all .3s}.ant-menu-dark .ant-menu-sub .ant-menu-submenu-title .ant-menu-submenu-arrow:after,.ant-menu-dark .ant-menu-sub .ant-menu-submenu-title .ant-menu-submenu-arrow:before,.ant-menu-dark .ant-menu-submenu-title .ant-menu-submenu-arrow:after,.ant-menu-dark .ant-menu-submenu-title .ant-menu-submenu-arrow:before{background:#fff}.ant-menu-dark.ant-menu-submenu-popup{background:transparent}.ant-menu-dark .ant-menu-inline.ant-menu-sub{background:#000c17;box-shadow:inset 0 2px 8px rgba(0,0,0,.45)}.ant-menu-dark.ant-menu-horizontal{border-bottom:0}.ant-menu-dark.ant-menu-horizontal>.ant-menu-item,.ant-menu-dark.ant-menu-horizontal>.ant-menu-submenu{top:0;margin-top:0;border-color:#001529;border-bottom:0}.ant-menu-dark.ant-menu-horizontal>.ant-menu-item>a:before{bottom:0}.ant-menu-dark .ant-menu-item,.ant-menu-dark .ant-menu-item-group-title,.ant-menu-dark .ant-menu-item>a{color:hsla(0,0%,100%,.65)}.ant-menu-dark.ant-menu-inline,.ant-menu-dark.ant-menu-vertical,.ant-menu-dark.ant-menu-vertical-left,.ant-menu-dark.ant-menu-vertical-right{border-right:0}.ant-menu-dark.ant-menu-inline .ant-menu-item,.ant-menu-dark.ant-menu-vertical-left .ant-menu-item,.ant-menu-dark.ant-menu-vertical-right .ant-menu-item,.ant-menu-dark.ant-menu-vertical .ant-menu-item{left:0;margin-left:0;border-right:0}.ant-menu-dark.ant-menu-inline .ant-menu-item:after,.ant-menu-dark.ant-menu-vertical-left .ant-menu-item:after,.ant-menu-dark.ant-menu-vertical-right .ant-menu-item:after,.ant-menu-dark.ant-menu-vertical .ant-menu-item:after{border-right:0}.ant-menu-dark.ant-menu-inline .ant-menu-item,.ant-menu-dark.ant-menu-inline .ant-menu-submenu-title{width:100%}.ant-menu-dark .ant-menu-item-active,.ant-menu-dark .ant-menu-item:hover,.ant-menu-dark .ant-menu-submenu-active,.ant-menu-dark .ant-menu-submenu-open,.ant-menu-dark .ant-menu-submenu-selected,.ant-menu-dark .ant-menu-submenu-title:hover{color:#fff;background-color:transparent}.ant-menu-dark .ant-menu-item-active>a,.ant-menu-dark .ant-menu-item:hover>a,.ant-menu-dark .ant-menu-submenu-active>a,.ant-menu-dark .ant-menu-submenu-open>a,.ant-menu-dark .ant-menu-submenu-selected>a,.ant-menu-dark .ant-menu-submenu-title:hover>a{color:#fff}.ant-menu-dark .ant-menu-item-active>.ant-menu-submenu-title:hover>.ant-menu-submenu-arrow,.ant-menu-dark .ant-menu-item-active>.ant-menu-submenu-title>.ant-menu-submenu-arrow,.ant-menu-dark .ant-menu-item:hover>.ant-menu-submenu-title:hover>.ant-menu-submenu-arrow,.ant-menu-dark .ant-menu-item:hover>.ant-menu-submenu-title>.ant-menu-submenu-arrow,.ant-menu-dark .ant-menu-submenu-active>.ant-menu-submenu-title:hover>.ant-menu-submenu-arrow,.ant-menu-dark .ant-menu-submenu-active>.ant-menu-submenu-title>.ant-menu-submenu-arrow,.ant-menu-dark .ant-menu-submenu-open>.ant-menu-submenu-title:hover>.ant-menu-submenu-arrow,.ant-menu-dark .ant-menu-submenu-open>.ant-menu-submenu-title>.ant-menu-submenu-arrow,.ant-menu-dark .ant-menu-submenu-selected>.ant-menu-submenu-title:hover>.ant-menu-submenu-arrow,.ant-menu-dark .ant-menu-submenu-selected>.ant-menu-submenu-title>.ant-menu-submenu-arrow,.ant-menu-dark .ant-menu-submenu-title:hover>.ant-menu-submenu-title:hover>.ant-menu-submenu-arrow,.ant-menu-dark .ant-menu-submenu-title:hover>.ant-menu-submenu-title>.ant-menu-submenu-arrow{opacity:1}.ant-menu-dark .ant-menu-item-active>.ant-menu-submenu-title:hover>.ant-menu-submenu-arrow:after,.ant-menu-dark .ant-menu-item-active>.ant-menu-submenu-title:hover>.ant-menu-submenu-arrow:before,.ant-menu-dark .ant-menu-item-active>.ant-menu-submenu-title>.ant-menu-submenu-arrow:after,.ant-menu-dark .ant-menu-item-active>.ant-menu-submenu-title>.ant-menu-submenu-arrow:before,.ant-menu-dark .ant-menu-item:hover>.ant-menu-submenu-title:hover>.ant-menu-submenu-arrow:after,.ant-menu-dark .ant-menu-item:hover>.ant-menu-submenu-title:hover>.ant-menu-submenu-arrow:before,.ant-menu-dark .ant-menu-item:hover>.ant-menu-submenu-title>.ant-menu-submenu-arrow:after,.ant-menu-dark .ant-menu-item:hover>.ant-menu-submenu-title>.ant-menu-submenu-arrow:before,.ant-menu-dark .ant-menu-submenu-active>.ant-menu-submenu-title:hover>.ant-menu-submenu-arrow:after,.ant-menu-dark .ant-menu-submenu-active>.ant-menu-submenu-title:hover>.ant-menu-submenu-arrow:before,.ant-menu-dark .ant-menu-submenu-active>.ant-menu-submenu-title>.ant-menu-submenu-arrow:after,.ant-menu-dark .ant-menu-submenu-active>.ant-menu-submenu-title>.ant-menu-submenu-arrow:before,.ant-menu-dark .ant-menu-submenu-open>.ant-menu-submenu-title:hover>.ant-menu-submenu-arrow:after,.ant-menu-dark .ant-menu-submenu-open>.ant-menu-submenu-title:hover>.ant-menu-submenu-arrow:before,.ant-menu-dark .ant-menu-submenu-open>.ant-menu-submenu-title>.ant-menu-submenu-arrow:after,.ant-menu-dark .ant-menu-submenu-open>.ant-menu-submenu-title>.ant-menu-submenu-arrow:before,.ant-menu-dark .ant-menu-submenu-selected>.ant-menu-submenu-title:hover>.ant-menu-submenu-arrow:after,.ant-menu-dark .ant-menu-submenu-selected>.ant-menu-submenu-title:hover>.ant-menu-submenu-arrow:before,.ant-menu-dark .ant-menu-submenu-selected>.ant-menu-submenu-title>.ant-menu-submenu-arrow:after,.ant-menu-dark .ant-menu-submenu-selected>.ant-menu-submenu-title>.ant-menu-submenu-arrow:before,.ant-menu-dark .ant-menu-submenu-title:hover>.ant-menu-submenu-title:hover>.ant-menu-submenu-arrow:after,.ant-menu-dark .ant-menu-submenu-title:hover>.ant-menu-submenu-title:hover>.ant-menu-submenu-arrow:before,.ant-menu-dark .ant-menu-submenu-title:hover>.ant-menu-submenu-title>.ant-menu-submenu-arrow:after,.ant-menu-dark .ant-menu-submenu-title:hover>.ant-menu-submenu-title>.ant-menu-submenu-arrow:before{background:#fff}.ant-menu-dark .ant-menu-item:hover{background-color:transparent}.ant-menu-dark .ant-menu-item-selected{color:#fff;border-right:0}.ant-menu-dark .ant-menu-item-selected:after{border-right:0}.ant-menu-dark .ant-menu-item-selected .anticon,.ant-menu-dark .ant-menu-item-selected .anticon+span,.ant-menu-dark .ant-menu-item-selected>a,.ant-menu-dark .ant-menu-item-selected>a:hover{color:#fff}.ant-menu-submenu-popup.ant-menu-dark .ant-menu-item-selected,.ant-menu.ant-menu-dark .ant-menu-item-selected{background-color:#722ed1}.ant-menu-dark .ant-menu-item-disabled,.ant-menu-dark .ant-menu-item-disabled>a,.ant-menu-dark .ant-menu-submenu-disabled,.ant-menu-dark .ant-menu-submenu-disabled>a{color:hsla(0,0%,100%,.35)!important;opacity:.8}.ant-menu-dark .ant-menu-item-disabled>.ant-menu-submenu-title,.ant-menu-dark .ant-menu-submenu-disabled>.ant-menu-submenu-title{color:hsla(0,0%,100%,.35)!important}.ant-menu-dark .ant-menu-item-disabled>.ant-menu-submenu-title>.ant-menu-submenu-arrow:after,.ant-menu-dark .ant-menu-item-disabled>.ant-menu-submenu-title>.ant-menu-submenu-arrow:before,.ant-menu-dark .ant-menu-submenu-disabled>.ant-menu-submenu-title>.ant-menu-submenu-arrow:after,.ant-menu-dark .ant-menu-submenu-disabled>.ant-menu-submenu-title>.ant-menu-submenu-arrow:before{background:hsla(0,0%,100%,.35)!important}.Article-module--article--1-Z4k{padding:0 16px 0 48px;min-height:600px}.Article-module--article--1-Z4k h2{font-size:36px;margin-top:0}.ant-tag{box-sizing:border-box;color:rgba(0,0,0,.65);font-size:14px;font-variant:tabular-nums;line-height:1.5;list-style:none;font-feature-settings:"tnum";display:inline-block;height:auto;margin:0 8px 0 0;padding:0 7px;font-size:12px;line-height:20px;white-space:nowrap;background:#fafafa;border:1px solid #d9d9d9;border-radius:4px;cursor:default;opacity:1;-webkit-transition:all .3s cubic-bezier(.78,.14,.15,.86);transition:all .3s cubic-bezier(.78,.14,.15,.86)}.ant-tag:hover{opacity:.85}.ant-tag,.ant-tag a,.ant-tag a:hover{color:rgba(0,0,0,.65)}.ant-tag>a:first-child:last-child{display:inline-block;margin:0 -8px;padding:0 8px}.ant-tag .anticon-close{display:inline-block;font-size:12px;font-size:10px\9;-webkit-transform:scale(.83333333) rotate(0deg);transform:scale(.83333333) rotate(0deg);margin-left:3px;color:rgba(0,0,0,.45);font-weight:700;cursor:pointer;-webkit-transition:all .3s cubic-bezier(.78,.14,.15,.86);transition:all .3s cubic-bezier(.78,.14,.15,.86)}:root .ant-tag .anticon-close{font-size:12px}.ant-tag .anticon-close:hover{color:rgba(0,0,0,.85)}.ant-tag-has-color{border-color:transparent}.ant-tag-has-color,.ant-tag-has-color .anticon-close,.ant-tag-has-color .anticon-close:hover,.ant-tag-has-color a,.ant-tag-has-color a:hover{color:#fff}.ant-tag-checkable{background-color:transparent;border-color:transparent}.ant-tag-checkable:not(.ant-tag-checkable-checked):hover{color:#722ed1}.ant-tag-checkable-checked,.ant-tag-checkable:active{color:#fff}.ant-tag-checkable-checked{background-color:#722ed1}.ant-tag-checkable:active{background-color:#531dab}.ant-tag-hidden{display:none}.ant-tag-pink{color:#eb2f96;background:#fff0f6;border-color:#ffadd2}.ant-tag-pink-inverse{color:#fff;background:#eb2f96;border-color:#eb2f96}.ant-tag-magenta{color:#eb2f96;background:#fff0f6;border-color:#ffadd2}.ant-tag-magenta-inverse{color:#fff;background:#eb2f96;border-color:#eb2f96}.ant-tag-red{color:#f5222d;background:#fff1f0;border-color:#ffa39e}.ant-tag-red-inverse{color:#fff;background:#f5222d;border-color:#f5222d}.ant-tag-volcano{color:#fa541c;background:#fff2e8;border-color:#ffbb96}.ant-tag-volcano-inverse{color:#fff;background:#fa541c;border-color:#fa541c}.ant-tag-orange{color:#fa8c16;background:#fff7e6;border-color:#ffd591}.ant-tag-orange-inverse{color:#fff;background:#fa8c16;border-color:#fa8c16}.ant-tag-yellow{color:#fadb14;background:#feffe6;border-color:#fffb8f}.ant-tag-yellow-inverse{color:#fff;background:#fadb14;border-color:#fadb14}.ant-tag-gold{color:#faad14;background:#fffbe6;border-color:#ffe58f}.ant-tag-gold-inverse{color:#fff;background:#faad14;border-color:#faad14}.ant-tag-cyan{color:#13c2c2;background:#e6fffb;border-color:#87e8de}.ant-tag-cyan-inverse{color:#fff;background:#13c2c2;border-color:#13c2c2}.ant-tag-lime{color:#a0d911;background:#fcffe6;border-color:#eaff8f}.ant-tag-lime-inverse{color:#fff;background:#a0d911;border-color:#a0d911}.ant-tag-green{color:#52c41a;background:#f6ffed;border-color:#b7eb8f}.ant-tag-green-inverse{color:#fff;background:#52c41a;border-color:#52c41a}.ant-tag-blue{color:#1890ff;background:#e6f7ff;border-color:#91d5ff}.ant-tag-blue-inverse{color:#fff;background:#1890ff;border-color:#1890ff}.ant-tag-geekblue{color:#2f54eb;background:#f0f5ff;border-color:#adc6ff}.ant-tag-geekblue-inverse{color:#fff;background:#2f54eb;border-color:#2f54eb}.ant-tag-purple{color:#722ed1;background:#f9f0ff;border-color:#d3adf7}.ant-tag-purple-inverse{color:#fff;background:#722ed1;border-color:#722ed1}.markdown-module--markdown--1TLJm{font-size:14px;line-height:2;color:#222}.markdown-module--markdown--1TLJm>img{max-width:calc(100% - 32px);margin:34px 0}.markdown-module--markdown--1TLJm h1{margin-top:8px;margin-bottom:20px;font-weight:500;font-size:30px;font-family:Avenir,-apple-system,BlinkMacSystemFont,Segoe UI,PingFang SC,Hiragino Sans GB,Microsoft YaHei,Helvetica Neue,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol;line-height:38px}.markdown-module--markdown--1TLJm h2{font-size:24px;line-height:32px}.markdown-module--markdown--1TLJm h2,.markdown-module--markdown--1TLJm h3,.markdown-module--markdown--1TLJm h4,.markdown-module--markdown--1TLJm h5,.markdown-module--markdown--1TLJm h6{clear:both;margin:1.6em 0 .6em;font-weight:500;font-family:Avenir,-apple-system,BlinkMacSystemFont,Segoe UI,PingFang SC,Hiragino Sans GB,Microsoft YaHei,Helvetica Neue,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol}.markdown-module--markdown--1TLJm h3{font-size:18px}.markdown-module--markdown--1TLJm h4{font-size:16px}.markdown-module--markdown--1TLJm h5{font-size:14px}.markdown-module--markdown--1TLJm h6{font-size:12px}.markdown-module--markdown--1TLJm hr{clear:both;height:1px;margin:56px 0;background:#e8e8e8;border:0}.markdown-module--markdown--1TLJm p,.markdown-module--markdown--1TLJm pre{margin:1em 0}.markdown-module--markdown--1TLJm ol,.markdown-module--markdown--1TLJm ul{margin:0;padding:0}.markdown-module--markdown--1TLJm ul>li{margin-left:20px;padding-left:4px;list-style-type:circle}.markdown-module--markdown--1TLJm ul>li:empty{display:none}.markdown-module--markdown--1TLJm ol>li{margin-left:20px;padding-left:4px;list-style-type:decimal}.markdown-module--markdown--1TLJm ol>li>p,.markdown-module--markdown--1TLJm ul>li>p{margin:.2em 0}.markdown-module--markdown--1TLJm b,.markdown-module--markdown--1TLJm strong{font-weight:500}.markdown-module--markdown--1TLJm table{width:100%;margin:24px 0;empty-cells:show;border:1px solid #e8e8e8;border-collapse:collapse;border-spacing:0}.markdown-module--markdown--1TLJm table th{color:#5c6b77;font-weight:500;white-space:nowrap;background:rgba(0,0,0,.02)}.markdown-module--markdown--1TLJm table td,.markdown-module--markdown--1TLJm table th{padding:12px 16px;text-align:left;border:1px solid #e8e8e8}.markdown-module--markdown--1TLJm blockquote{margin:1em 0;padding-left:.8em;color:rgba(0,0,0,.45);font-size:90%;border-left:4px solid #e8e8e8}.markdown-module--markdown--1TLJm blockquote p{margin:0}.markdown-module--markdown--1TLJm>br,.markdown-module--markdown--1TLJm>p>br{clear:both}.markdown-module--editOnGtiHubButton--1hV6y{margin-left:.5em;font-size:16px;color:#999;vertical-align:middle;position:relative;top:-2px}.markdown-module--main--1VRvj{width:calc(100% - 160px);padding-right:24px;padding-bottom:60px;overflow:hidden}.markdown-module--toc--3a23c{width:160px;border-left:2px solid #eee;float:right;font-size:13px;background:#fff}.markdown-module--toc--3a23c ul>li{list-style:none;padding:0;margin-left:16px}.markdown-module--toc--3a23c ul>li a{color:rgba(0,0,0,.65)}.markdown-module--sider--26riA{width:260px!important}.markdown-module--menuIcon--hTGH6{color:#abb3c9}@media only screen and (max-width:991.99px){.markdown-module--markdown--1TLJm .markdown-module--main--1VRvj{width:100%}.markdown-module--markdown--1TLJm .markdown-module--toc--3a23c{display:none}.markdown-module--sider--26riA{width:240px!important}}@media only screen and (max-width:767.99px){.markdown-module--layout--20GIh{flex-direction:column!important}.markdown-module--sider--26riA{width:100%!important;margin-bottom:32px;padding-bottom:32px;border-bottom:1px solid #e8e8e8}}ul.Tabs-module--tabs--3WFbV{font-size:24px!important;margin:40px 0 32px!important;padding:0;list-style:none}ul.Tabs-module--tabs--3WFbV>li{padding:0 0 12px;margin-right:36px;margin-left:0;list-style:none;display:inline-block;line-height:1;cursor:pointer;-webkit-transition:all .3s;transition:all .3s;border-bottom:2px solid transparent}ul.Tabs-module--tabs--3WFbV>li a{color:#697b8c}ul.Tabs-module--tabs--3WFbV>li:hover a{color:#274057}ul.Tabs-module--tabs--3WFbV>li:last-child{margin-right:0}ul.Tabs-module--tabs--3WFbV>li.Tabs-module--active--2GIM4{border-color:#1890ff}ul.Tabs-module--tabs--3WFbV>li.Tabs-module--active--2GIM4 a,ul.Tabs-module--tabs--3WFbV>li.Tabs-module--active--2GIM4:hover a{color:#1890ff}.ant-result{padding:48px 32px}.ant-result-success .ant-result-icon>.anticon{color:#52c41a}.ant-result-error .ant-result-icon>.anticon{color:#f5222d}.ant-result-info .ant-result-icon>.anticon{color:#1890ff}.ant-result-warning .ant-result-icon>.anticon{color:#faad14}.ant-result-image{width:250px;height:295px;margin:auto}.ant-result-icon{margin-bottom:24px;text-align:center}.ant-result-icon>.anticon{font-size:72px}.ant-result-title{color:rgba(0,0,0,.85);font-size:24px;line-height:1.8;text-align:center}.ant-result-subtitle{color:rgba(0,0,0,.45);font-size:14px;line-height:1.6;text-align:center}.ant-result-extra{margin-top:32px;text-align:center}.ant-result-extra>*{margin-right:8px}.ant-result-extra>:last-child{margin-right:0}.ant-result-content{margin-top:24px;padding:24px 40px;background-color:#fafafa}.ant-typography{color:rgba(0,0,0,.65)}.ant-typography.ant-typography-secondary{color:rgba(0,0,0,.45)}.ant-typography.ant-typography-warning{color:#faad14}.ant-typography.ant-typography-danger{color:#f5222d}.ant-typography.ant-typography-disabled{color:rgba(0,0,0,.25);cursor:not-allowed;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.ant-typography p,div.ant-typography{margin-bottom:1em}.ant-typography h1,h1.ant-typography{margin-bottom:.5em;color:rgba(0,0,0,.85);font-weight:600;font-size:38px;line-height:1.23}.ant-typography h2,h2.ant-typography{margin-bottom:.5em;color:rgba(0,0,0,.85);font-weight:600;font-size:30px;line-height:1.35}.ant-typography h3,h3.ant-typography{margin-bottom:.5em;color:rgba(0,0,0,.85);font-weight:600;font-size:24px;line-height:1.35}.ant-typography h4,h4.ant-typography{margin-bottom:.5em;color:rgba(0,0,0,.85);font-weight:600;font-size:20px;line-height:1.4}.ant-typography+h1.ant-typography,.ant-typography+h2.ant-typography,.ant-typography+h3.ant-typography,.ant-typography+h4.ant-typography,.ant-typography div+h1,.ant-typography div+h2,.ant-typography div+h3,.ant-typography div+h4,.ant-typography h1+h1,.ant-typography h1+h2,.ant-typography h1+h3,.ant-typography h1+h4,.ant-typography h2+h1,.ant-typography h2+h2,.ant-typography h2+h3,.ant-typography h2+h4,.ant-typography h3+h1,.ant-typography h3+h2,.ant-typography h3+h3,.ant-typography h3+h4,.ant-typography h4+h1,.ant-typography h4+h2,.ant-typography h4+h3,.ant-typography h4+h4,.ant-typography li+h1,.ant-typography li+h2,.ant-typography li+h3,.ant-typography li+h4,.ant-typography p+h1,.ant-typography p+h2,.ant-typography p+h3,.ant-typography p+h4,.ant-typography ul+h1,.ant-typography ul+h2,.ant-typography ul+h3,.ant-typography ul+h4{margin-top:1.2em}span.ant-typography-ellipsis{display:inline-block}.ant-typography a{color:#722ed1;text-decoration:none;outline:none;cursor:pointer;-webkit-transition:color .3s;transition:color .3s}.ant-typography a:focus,.ant-typography a:hover{color:#9254de}.ant-typography a:active{color:#531dab}.ant-typography a:active,.ant-typography a:hover{text-decoration:none}.ant-typography a[disabled]{color:rgba(0,0,0,.25);cursor:not-allowed;pointer-events:none}.ant-typography code{margin:0 .2em;padding:.2em .4em .1em;font-size:85%;background:rgba(0,0,0,.06);border:1px solid rgba(0,0,0,.06);border-radius:3px}.ant-typography mark{padding:0;background-color:#ffe58f}.ant-typography ins,.ant-typography u{text-decoration:underline;-webkit-text-decoration-skip:ink;text-decoration-skip-ink:auto}.ant-typography del,.ant-typography s{text-decoration:line-through}.ant-typography strong{font-weight:600}.ant-typography-copy,.ant-typography-edit,.ant-typography-expand{color:#722ed1;text-decoration:none;outline:none;cursor:pointer;-webkit-transition:color .3s;transition:color .3s;margin-left:8px}.ant-typography-copy:focus,.ant-typography-copy:hover,.ant-typography-edit:focus,.ant-typography-edit:hover,.ant-typography-expand:focus,.ant-typography-expand:hover{color:#9254de}.ant-typography-copy:active,.ant-typography-edit:active,.ant-typography-expand:active{color:#531dab}.ant-typography-copy-success,.ant-typography-copy-success:focus,.ant-typography-copy-success:hover{color:#52c41a}.ant-typography-edit-content{position:relative}div.ant-typography-edit-content{left:-12px;margin-top:-5px;margin-bottom:calc(1em - 6px)}.ant-typography-edit-content-confirm{position:absolute;right:10px;bottom:8px;color:rgba(0,0,0,.45);pointer-events:none}.ant-typography ol,.ant-typography ul{margin:0 0 1em;padding:0}.ant-typography ol li,.ant-typography ul li{margin:0 0 0 20px;padding:0 0 0 4px}.ant-typography ul li{list-style-type:circle}.ant-typography ul li li{list-style-type:disc}.ant-typography ol li{list-style-type:decimal}.ant-typography-ellipsis-single-line{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.ant-typography-ellipsis-multiple-line{display:-webkit-box;-webkit-line-clamp:3; + /*! autoprefixer: ignore next */-webkit-box-orient:vertical;overflow:hidden}.ant-input{box-sizing:border-box;margin:0;font-variant:tabular-nums;list-style:none;font-feature-settings:"tnum";position:relative;display:inline-block;width:100%;height:32px;padding:4px 11px;color:rgba(0,0,0,.65);font-size:14px;line-height:1.5;background-color:#fff;background-image:none;border:1px solid #d9d9d9;border-radius:4px;-webkit-transition:all .3s;transition:all .3s}.ant-input::-moz-placeholder{color:#bfbfbf;opacity:1}.ant-input:-ms-input-placeholder{color:#bfbfbf}.ant-input::-webkit-input-placeholder{color:#bfbfbf}.ant-input:placeholder-shown{text-overflow:ellipsis}.ant-input:focus,.ant-input:hover{border-color:#9254de;border-right-width:1px!important}.ant-input:focus{outline:0;box-shadow:0 0 0 2px rgba(114,46,209,.2)}.ant-input-disabled{color:rgba(0,0,0,.25);background-color:#f5f5f5;cursor:not-allowed;opacity:1}.ant-input-disabled:hover{border-color:#d9d9d9;border-right-width:1px!important}.ant-input[disabled]{color:rgba(0,0,0,.25);background-color:#f5f5f5;cursor:not-allowed;opacity:1}.ant-input[disabled]:hover{border-color:#d9d9d9;border-right-width:1px!important}textarea.ant-input{max-width:100%;height:auto;min-height:32px;line-height:1.5;vertical-align:bottom;-webkit-transition:all .3s,height 0s;transition:all .3s,height 0s}.ant-input-lg{height:40px;padding:6px 11px;font-size:16px}.ant-input-sm{height:24px;padding:1px 7px}.ant-input-group{box-sizing:border-box;margin:0;padding:0;color:rgba(0,0,0,.65);font-size:14px;font-variant:tabular-nums;line-height:1.5;list-style:none;font-feature-settings:"tnum";position:relative;display:table;width:100%;border-collapse:separate;border-spacing:0}.ant-input-group[class*=col-]{float:none;padding-right:0;padding-left:0}.ant-input-group>[class*=col-]{padding-right:8px}.ant-input-group>[class*=col-]:last-child{padding-right:0}.ant-input-group-addon,.ant-input-group-wrap,.ant-input-group>.ant-input{display:table-cell}.ant-input-group-addon:not(:first-child):not(:last-child),.ant-input-group-wrap:not(:first-child):not(:last-child),.ant-input-group>.ant-input:not(:first-child):not(:last-child){border-radius:0}.ant-input-group-addon,.ant-input-group-wrap{width:1px;white-space:nowrap;vertical-align:middle}.ant-input-group-wrap>*{display:block!important}.ant-input-group .ant-input{float:left;width:100%;margin-bottom:0;text-align:inherit}.ant-input-group .ant-input:focus,.ant-input-group .ant-input:hover{z-index:1;border-right-width:1px}.ant-input-group-addon{position:relative;padding:0 11px;color:rgba(0,0,0,.65);font-weight:400;font-size:14px;text-align:center;background-color:#fafafa;border:1px solid #d9d9d9;border-radius:4px;-webkit-transition:all .3s;transition:all .3s}.ant-input-group-addon .ant-select{margin:-5px -11px}.ant-input-group-addon .ant-select .ant-select-selection{margin:-1px;background-color:inherit;border:1px solid transparent;box-shadow:none}.ant-input-group-addon .ant-select-focused .ant-select-selection,.ant-input-group-addon .ant-select-open .ant-select-selection{color:#722ed1}.ant-input-group-addon>i:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;content:""}.ant-input-group-addon:first-child,.ant-input-group-addon:first-child .ant-select .ant-select-selection,.ant-input-group>.ant-input:first-child,.ant-input-group>.ant-input:first-child .ant-select .ant-select-selection{border-top-right-radius:0;border-bottom-right-radius:0}.ant-input-group>.ant-input-affix-wrapper:not(:first-child) .ant-input{border-top-left-radius:0;border-bottom-left-radius:0}.ant-input-group>.ant-input-affix-wrapper:not(:last-child) .ant-input{border-top-right-radius:0;border-bottom-right-radius:0}.ant-input-group-addon:first-child{border-right:0}.ant-input-group-addon:last-child{border-left:0}.ant-input-group-addon:last-child,.ant-input-group-addon:last-child .ant-select .ant-select-selection,.ant-input-group>.ant-input:last-child,.ant-input-group>.ant-input:last-child .ant-select .ant-select-selection{border-top-left-radius:0;border-bottom-left-radius:0}.ant-input-group-lg .ant-input,.ant-input-group-lg>.ant-input-group-addon{height:40px;padding:6px 11px;font-size:16px}.ant-input-group-sm .ant-input,.ant-input-group-sm>.ant-input-group-addon{height:24px;padding:1px 7px}.ant-input-group-lg .ant-select-selection--single{height:40px}.ant-input-group-sm .ant-select-selection--single{height:24px}.ant-input-group .ant-input-affix-wrapper{display:table-cell;float:left;width:100%}.ant-input-group.ant-input-group-compact{display:block;zoom:1}.ant-input-group.ant-input-group-compact:after,.ant-input-group.ant-input-group-compact:before{display:table;content:""}.ant-input-group.ant-input-group-compact:after{clear:both}.ant-input-group.ant-input-group-compact-addon:not(:first-child):not(:last-child),.ant-input-group.ant-input-group-compact-wrap:not(:first-child):not(:last-child),.ant-input-group.ant-input-group-compact>.ant-input:not(:first-child):not(:last-child){border-right-width:1px}.ant-input-group.ant-input-group-compact-addon:not(:first-child):not(:last-child):focus,.ant-input-group.ant-input-group-compact-addon:not(:first-child):not(:last-child):hover,.ant-input-group.ant-input-group-compact-wrap:not(:first-child):not(:last-child):focus,.ant-input-group.ant-input-group-compact-wrap:not(:first-child):not(:last-child):hover,.ant-input-group.ant-input-group-compact>.ant-input:not(:first-child):not(:last-child):focus,.ant-input-group.ant-input-group-compact>.ant-input:not(:first-child):not(:last-child):hover{z-index:1}.ant-input-group.ant-input-group-compact>*{display:inline-block;float:none;vertical-align:top;border-radius:0}.ant-input-group.ant-input-group-compact>:not(:last-child){margin-right:-1px;border-right-width:1px}.ant-input-group.ant-input-group-compact .ant-input{float:none}.ant-input-group.ant-input-group-compact>.ant-calendar-picker .ant-input,.ant-input-group.ant-input-group-compact>.ant-cascader-picker .ant-input,.ant-input-group.ant-input-group-compact>.ant-mention-wrapper .ant-mention-editor,.ant-input-group.ant-input-group-compact>.ant-select-auto-complete .ant-input,.ant-input-group.ant-input-group-compact>.ant-select>.ant-select-selection,.ant-input-group.ant-input-group-compact>.ant-time-picker .ant-time-picker-input{border-right-width:1px;border-radius:0}.ant-input-group.ant-input-group-compact>.ant-calendar-picker .ant-input:focus,.ant-input-group.ant-input-group-compact>.ant-calendar-picker .ant-input:hover,.ant-input-group.ant-input-group-compact>.ant-cascader-picker .ant-input:focus,.ant-input-group.ant-input-group-compact>.ant-cascader-picker .ant-input:hover,.ant-input-group.ant-input-group-compact>.ant-mention-wrapper .ant-mention-editor:focus,.ant-input-group.ant-input-group-compact>.ant-mention-wrapper .ant-mention-editor:hover,.ant-input-group.ant-input-group-compact>.ant-select-auto-complete .ant-input:focus,.ant-input-group.ant-input-group-compact>.ant-select-auto-complete .ant-input:hover,.ant-input-group.ant-input-group-compact>.ant-select>.ant-select-selection:focus,.ant-input-group.ant-input-group-compact>.ant-select>.ant-select-selection:hover,.ant-input-group.ant-input-group-compact>.ant-time-picker .ant-time-picker-input:focus,.ant-input-group.ant-input-group-compact>.ant-time-picker .ant-time-picker-input:hover{z-index:1}.ant-input-group.ant-input-group-compact>.ant-calendar-picker:first-child .ant-input,.ant-input-group.ant-input-group-compact>.ant-cascader-picker:first-child .ant-input,.ant-input-group.ant-input-group-compact>.ant-mention-wrapper:first-child .ant-mention-editor,.ant-input-group.ant-input-group-compact>.ant-select-auto-complete:first-child .ant-input,.ant-input-group.ant-input-group-compact>.ant-select:first-child>.ant-select-selection,.ant-input-group.ant-input-group-compact>.ant-time-picker:first-child .ant-time-picker-input,.ant-input-group.ant-input-group-compact>:first-child{border-top-left-radius:4px;border-bottom-left-radius:4px}.ant-input-group.ant-input-group-compact>.ant-calendar-picker:last-child .ant-input,.ant-input-group.ant-input-group-compact>.ant-cascader-picker-focused:last-child .ant-input,.ant-input-group.ant-input-group-compact>.ant-cascader-picker:last-child .ant-input,.ant-input-group.ant-input-group-compact>.ant-mention-wrapper:last-child .ant-mention-editor,.ant-input-group.ant-input-group-compact>.ant-select-auto-complete:last-child .ant-input,.ant-input-group.ant-input-group-compact>.ant-select:last-child>.ant-select-selection,.ant-input-group.ant-input-group-compact>.ant-time-picker:last-child .ant-time-picker-input,.ant-input-group.ant-input-group-compact>:last-child{border-right-width:1px;border-top-right-radius:4px;border-bottom-right-radius:4px}.ant-input-group.ant-input-group-compact>.ant-select-auto-complete .ant-input{vertical-align:top}.ant-input-group-wrapper{display:inline-block;width:100%;text-align:start;vertical-align:top}.ant-input-affix-wrapper{box-sizing:border-box;margin:0;padding:0;color:rgba(0,0,0,.65);font-size:14px;font-variant:tabular-nums;line-height:1.5;list-style:none;font-feature-settings:"tnum";position:relative;display:inline-block;width:100%;text-align:start}.ant-input-affix-wrapper:hover .ant-input:not(.ant-input-disabled){border-color:#9254de;border-right-width:1px!important}.ant-input-affix-wrapper .ant-input{position:relative;text-align:inherit}.ant-input-affix-wrapper .ant-input-prefix,.ant-input-affix-wrapper .ant-input-suffix{position:absolute;top:50%;z-index:2;display:flex;align-items:center;color:rgba(0,0,0,.65);line-height:0;-webkit-transform:translateY(-50%);transform:translateY(-50%)}.ant-input-affix-wrapper .ant-input-prefix :not(.anticon),.ant-input-affix-wrapper .ant-input-suffix :not(.anticon){line-height:1.5}.ant-input-affix-wrapper .ant-input-disabled~.ant-input-suffix .anticon{color:rgba(0,0,0,.25);cursor:not-allowed}.ant-input-affix-wrapper .ant-input-prefix{left:12px}.ant-input-affix-wrapper .ant-input-suffix{right:12px}.ant-input-affix-wrapper .ant-input:not(:first-child){padding-left:30px}.ant-input-affix-wrapper .ant-input:not(:last-child){padding-right:30px}.ant-input-affix-wrapper.ant-input-affix-wrapper-input-with-clear-btn .ant-input:not(:last-child){padding-right:49px}.ant-input-affix-wrapper.ant-input-affix-wrapper-textarea-with-clear-btn .ant-input{padding-right:22px}.ant-input-affix-wrapper .ant-input{min-height:100%}.ant-input-password-icon{color:rgba(0,0,0,.45);cursor:pointer;-webkit-transition:all .3s;transition:all .3s}.ant-input-password-icon:hover{color:#333}.ant-input-clear-icon{color:rgba(0,0,0,.25);font-size:12px;cursor:pointer;-webkit-transition:color .3s;transition:color .3s;vertical-align:0}.ant-input-clear-icon:hover{color:rgba(0,0,0,.45)}.ant-input-clear-icon:active{color:rgba(0,0,0,.65)}.ant-input-clear-icon+i{margin-left:6px}.ant-input-textarea-clear-icon{color:rgba(0,0,0,.25);font-size:12px;cursor:pointer;-webkit-transition:color .3s;transition:color .3s;position:absolute;top:0;right:0;margin:8px 8px 0 0}.ant-input-textarea-clear-icon:hover{color:rgba(0,0,0,.45)}.ant-input-textarea-clear-icon:active{color:rgba(0,0,0,.65)}.ant-input-textarea-clear-icon+i{margin-left:6px}.ant-input-search-icon{color:rgba(0,0,0,.45);cursor:pointer;-webkit-transition:all .3s;transition:all .3s}.ant-input-search-icon:hover{color:rgba(0,0,0,.8)}.ant-input-search-enter-button input{border-right:0}.ant-input-search-enter-button+.ant-input-group-addon,.ant-input-search-enter-button input+.ant-input-group-addon{padding:0;border:0}.ant-input-search-enter-button+.ant-input-group-addon .ant-input-search-button,.ant-input-search-enter-button input+.ant-input-group-addon .ant-input-search-button{border-top-left-radius:0;border-bottom-left-radius:0}.ant-btn{line-height:1.5;position:relative;display:inline-block;font-weight:400;white-space:nowrap;text-align:center;background-image:none;box-shadow:0 2px 0 rgba(0,0,0,.015);cursor:pointer;-webkit-transition:all .3s cubic-bezier(.645,.045,.355,1);transition:all .3s cubic-bezier(.645,.045,.355,1);-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;touch-action:manipulation;height:32px;padding:0 15px;font-size:14px;border-radius:4px;color:rgba(0,0,0,.65);background-color:#fff;border:1px solid #d9d9d9}.ant-btn>.anticon{line-height:1}.ant-btn,.ant-btn:active,.ant-btn:focus{outline:0}.ant-btn:not([disabled]):hover{text-decoration:none}.ant-btn:not([disabled]):active{outline:0;box-shadow:none}.ant-btn.disabled,.ant-btn[disabled]{cursor:not-allowed}.ant-btn.disabled>*,.ant-btn[disabled]>*{pointer-events:none}.ant-btn-lg{height:40px;padding:0 15px;font-size:16px;border-radius:4px}.ant-btn-sm{height:24px;padding:0 7px;font-size:14px;border-radius:4px}.ant-btn>a:only-child{color:currentColor}.ant-btn>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn:focus,.ant-btn:hover{color:#9254de;background-color:#fff;border-color:#9254de}.ant-btn:focus>a:only-child,.ant-btn:hover>a:only-child{color:currentColor}.ant-btn:focus>a:only-child:after,.ant-btn:hover>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn.active,.ant-btn:active{color:#531dab;background-color:#fff;border-color:#531dab}.ant-btn.active>a:only-child,.ant-btn:active>a:only-child{color:currentColor}.ant-btn.active>a:only-child:after,.ant-btn:active>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn-disabled,.ant-btn-disabled.active,.ant-btn-disabled:active,.ant-btn-disabled:focus,.ant-btn-disabled:hover,.ant-btn.disabled,.ant-btn.disabled.active,.ant-btn.disabled:active,.ant-btn.disabled:focus,.ant-btn.disabled:hover,.ant-btn[disabled],.ant-btn[disabled].active,.ant-btn[disabled]:active,.ant-btn[disabled]:focus,.ant-btn[disabled]:hover{color:rgba(0,0,0,.25);background-color:#f5f5f5;border-color:#d9d9d9;text-shadow:none;box-shadow:none}.ant-btn-disabled.active>a:only-child,.ant-btn-disabled:active>a:only-child,.ant-btn-disabled:focus>a:only-child,.ant-btn-disabled:hover>a:only-child,.ant-btn-disabled>a:only-child,.ant-btn.disabled.active>a:only-child,.ant-btn.disabled:active>a:only-child,.ant-btn.disabled:focus>a:only-child,.ant-btn.disabled:hover>a:only-child,.ant-btn.disabled>a:only-child,.ant-btn[disabled].active>a:only-child,.ant-btn[disabled]:active>a:only-child,.ant-btn[disabled]:focus>a:only-child,.ant-btn[disabled]:hover>a:only-child,.ant-btn[disabled]>a:only-child{color:currentColor}.ant-btn-disabled.active>a:only-child:after,.ant-btn-disabled:active>a:only-child:after,.ant-btn-disabled:focus>a:only-child:after,.ant-btn-disabled:hover>a:only-child:after,.ant-btn-disabled>a:only-child:after,.ant-btn.disabled.active>a:only-child:after,.ant-btn.disabled:active>a:only-child:after,.ant-btn.disabled:focus>a:only-child:after,.ant-btn.disabled:hover>a:only-child:after,.ant-btn.disabled>a:only-child:after,.ant-btn[disabled].active>a:only-child:after,.ant-btn[disabled]:active>a:only-child:after,.ant-btn[disabled]:focus>a:only-child:after,.ant-btn[disabled]:hover>a:only-child:after,.ant-btn[disabled]>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn.active,.ant-btn:active,.ant-btn:focus,.ant-btn:hover{text-decoration:none;background:#fff}.ant-btn>i,.ant-btn>span{display:inline-block;-webkit-transition:margin-left .3s cubic-bezier(.645,.045,.355,1);transition:margin-left .3s cubic-bezier(.645,.045,.355,1);pointer-events:none}.ant-btn-primary{color:#fff;background-color:#722ed1;border-color:#722ed1;text-shadow:0 -1px 0 rgba(0,0,0,.12);box-shadow:0 2px 0 rgba(0,0,0,.045)}.ant-btn-primary>a:only-child{color:currentColor}.ant-btn-primary>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn-primary:focus,.ant-btn-primary:hover{color:#fff;background-color:#9254de;border-color:#9254de}.ant-btn-primary:focus>a:only-child,.ant-btn-primary:hover>a:only-child{color:currentColor}.ant-btn-primary:focus>a:only-child:after,.ant-btn-primary:hover>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn-primary.active,.ant-btn-primary:active{color:#fff;background-color:#531dab;border-color:#531dab}.ant-btn-primary.active>a:only-child,.ant-btn-primary:active>a:only-child{color:currentColor}.ant-btn-primary.active>a:only-child:after,.ant-btn-primary:active>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn-primary-disabled,.ant-btn-primary-disabled.active,.ant-btn-primary-disabled:active,.ant-btn-primary-disabled:focus,.ant-btn-primary-disabled:hover,.ant-btn-primary.disabled,.ant-btn-primary.disabled.active,.ant-btn-primary.disabled:active,.ant-btn-primary.disabled:focus,.ant-btn-primary.disabled:hover,.ant-btn-primary[disabled],.ant-btn-primary[disabled].active,.ant-btn-primary[disabled]:active,.ant-btn-primary[disabled]:focus,.ant-btn-primary[disabled]:hover{color:rgba(0,0,0,.25);background-color:#f5f5f5;border-color:#d9d9d9;text-shadow:none;box-shadow:none}.ant-btn-primary-disabled.active>a:only-child,.ant-btn-primary-disabled:active>a:only-child,.ant-btn-primary-disabled:focus>a:only-child,.ant-btn-primary-disabled:hover>a:only-child,.ant-btn-primary-disabled>a:only-child,.ant-btn-primary.disabled.active>a:only-child,.ant-btn-primary.disabled:active>a:only-child,.ant-btn-primary.disabled:focus>a:only-child,.ant-btn-primary.disabled:hover>a:only-child,.ant-btn-primary.disabled>a:only-child,.ant-btn-primary[disabled].active>a:only-child,.ant-btn-primary[disabled]:active>a:only-child,.ant-btn-primary[disabled]:focus>a:only-child,.ant-btn-primary[disabled]:hover>a:only-child,.ant-btn-primary[disabled]>a:only-child{color:currentColor}.ant-btn-primary-disabled.active>a:only-child:after,.ant-btn-primary-disabled:active>a:only-child:after,.ant-btn-primary-disabled:focus>a:only-child:after,.ant-btn-primary-disabled:hover>a:only-child:after,.ant-btn-primary-disabled>a:only-child:after,.ant-btn-primary.disabled.active>a:only-child:after,.ant-btn-primary.disabled:active>a:only-child:after,.ant-btn-primary.disabled:focus>a:only-child:after,.ant-btn-primary.disabled:hover>a:only-child:after,.ant-btn-primary.disabled>a:only-child:after,.ant-btn-primary[disabled].active>a:only-child:after,.ant-btn-primary[disabled]:active>a:only-child:after,.ant-btn-primary[disabled]:focus>a:only-child:after,.ant-btn-primary[disabled]:hover>a:only-child:after,.ant-btn-primary[disabled]>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn-group .ant-btn-primary:not(:first-child):not(:last-child){border-right-color:#9254de;border-left-color:#9254de}.ant-btn-group .ant-btn-primary:not(:first-child):not(:last-child):disabled{border-color:#d9d9d9}.ant-btn-group .ant-btn-primary:first-child:not(:last-child){border-right-color:#9254de}.ant-btn-group .ant-btn-primary:first-child:not(:last-child)[disabled]{border-right-color:#d9d9d9}.ant-btn-group .ant-btn-primary+.ant-btn-primary,.ant-btn-group .ant-btn-primary:last-child:not(:first-child){border-left-color:#9254de}.ant-btn-group .ant-btn-primary+.ant-btn-primary[disabled],.ant-btn-group .ant-btn-primary:last-child:not(:first-child)[disabled]{border-left-color:#d9d9d9}.ant-btn-ghost{color:rgba(0,0,0,.65);background-color:transparent;border-color:#d9d9d9}.ant-btn-ghost>a:only-child{color:currentColor}.ant-btn-ghost>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn-ghost:focus,.ant-btn-ghost:hover{color:#9254de;background-color:transparent;border-color:#9254de}.ant-btn-ghost:focus>a:only-child,.ant-btn-ghost:hover>a:only-child{color:currentColor}.ant-btn-ghost:focus>a:only-child:after,.ant-btn-ghost:hover>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn-ghost.active,.ant-btn-ghost:active{color:#531dab;background-color:transparent;border-color:#531dab}.ant-btn-ghost.active>a:only-child,.ant-btn-ghost:active>a:only-child{color:currentColor}.ant-btn-ghost.active>a:only-child:after,.ant-btn-ghost:active>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn-ghost-disabled,.ant-btn-ghost-disabled.active,.ant-btn-ghost-disabled:active,.ant-btn-ghost-disabled:focus,.ant-btn-ghost-disabled:hover,.ant-btn-ghost.disabled,.ant-btn-ghost.disabled.active,.ant-btn-ghost.disabled:active,.ant-btn-ghost.disabled:focus,.ant-btn-ghost.disabled:hover,.ant-btn-ghost[disabled],.ant-btn-ghost[disabled].active,.ant-btn-ghost[disabled]:active,.ant-btn-ghost[disabled]:focus,.ant-btn-ghost[disabled]:hover{color:rgba(0,0,0,.25);background-color:#f5f5f5;border-color:#d9d9d9;text-shadow:none;box-shadow:none}.ant-btn-ghost-disabled.active>a:only-child,.ant-btn-ghost-disabled:active>a:only-child,.ant-btn-ghost-disabled:focus>a:only-child,.ant-btn-ghost-disabled:hover>a:only-child,.ant-btn-ghost-disabled>a:only-child,.ant-btn-ghost.disabled.active>a:only-child,.ant-btn-ghost.disabled:active>a:only-child,.ant-btn-ghost.disabled:focus>a:only-child,.ant-btn-ghost.disabled:hover>a:only-child,.ant-btn-ghost.disabled>a:only-child,.ant-btn-ghost[disabled].active>a:only-child,.ant-btn-ghost[disabled]:active>a:only-child,.ant-btn-ghost[disabled]:focus>a:only-child,.ant-btn-ghost[disabled]:hover>a:only-child,.ant-btn-ghost[disabled]>a:only-child{color:currentColor}.ant-btn-ghost-disabled.active>a:only-child:after,.ant-btn-ghost-disabled:active>a:only-child:after,.ant-btn-ghost-disabled:focus>a:only-child:after,.ant-btn-ghost-disabled:hover>a:only-child:after,.ant-btn-ghost-disabled>a:only-child:after,.ant-btn-ghost.disabled.active>a:only-child:after,.ant-btn-ghost.disabled:active>a:only-child:after,.ant-btn-ghost.disabled:focus>a:only-child:after,.ant-btn-ghost.disabled:hover>a:only-child:after,.ant-btn-ghost.disabled>a:only-child:after,.ant-btn-ghost[disabled].active>a:only-child:after,.ant-btn-ghost[disabled]:active>a:only-child:after,.ant-btn-ghost[disabled]:focus>a:only-child:after,.ant-btn-ghost[disabled]:hover>a:only-child:after,.ant-btn-ghost[disabled]>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn-dashed{color:rgba(0,0,0,.65);background-color:#fff;border-color:#d9d9d9;border-style:dashed}.ant-btn-dashed>a:only-child{color:currentColor}.ant-btn-dashed>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn-dashed:focus,.ant-btn-dashed:hover{color:#9254de;background-color:#fff;border-color:#9254de}.ant-btn-dashed:focus>a:only-child,.ant-btn-dashed:hover>a:only-child{color:currentColor}.ant-btn-dashed:focus>a:only-child:after,.ant-btn-dashed:hover>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn-dashed.active,.ant-btn-dashed:active{color:#531dab;background-color:#fff;border-color:#531dab}.ant-btn-dashed.active>a:only-child,.ant-btn-dashed:active>a:only-child{color:currentColor}.ant-btn-dashed.active>a:only-child:after,.ant-btn-dashed:active>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn-dashed-disabled,.ant-btn-dashed-disabled.active,.ant-btn-dashed-disabled:active,.ant-btn-dashed-disabled:focus,.ant-btn-dashed-disabled:hover,.ant-btn-dashed.disabled,.ant-btn-dashed.disabled.active,.ant-btn-dashed.disabled:active,.ant-btn-dashed.disabled:focus,.ant-btn-dashed.disabled:hover,.ant-btn-dashed[disabled],.ant-btn-dashed[disabled].active,.ant-btn-dashed[disabled]:active,.ant-btn-dashed[disabled]:focus,.ant-btn-dashed[disabled]:hover{color:rgba(0,0,0,.25);background-color:#f5f5f5;border-color:#d9d9d9;text-shadow:none;box-shadow:none}.ant-btn-dashed-disabled.active>a:only-child,.ant-btn-dashed-disabled:active>a:only-child,.ant-btn-dashed-disabled:focus>a:only-child,.ant-btn-dashed-disabled:hover>a:only-child,.ant-btn-dashed-disabled>a:only-child,.ant-btn-dashed.disabled.active>a:only-child,.ant-btn-dashed.disabled:active>a:only-child,.ant-btn-dashed.disabled:focus>a:only-child,.ant-btn-dashed.disabled:hover>a:only-child,.ant-btn-dashed.disabled>a:only-child,.ant-btn-dashed[disabled].active>a:only-child,.ant-btn-dashed[disabled]:active>a:only-child,.ant-btn-dashed[disabled]:focus>a:only-child,.ant-btn-dashed[disabled]:hover>a:only-child,.ant-btn-dashed[disabled]>a:only-child{color:currentColor}.ant-btn-dashed-disabled.active>a:only-child:after,.ant-btn-dashed-disabled:active>a:only-child:after,.ant-btn-dashed-disabled:focus>a:only-child:after,.ant-btn-dashed-disabled:hover>a:only-child:after,.ant-btn-dashed-disabled>a:only-child:after,.ant-btn-dashed.disabled.active>a:only-child:after,.ant-btn-dashed.disabled:active>a:only-child:after,.ant-btn-dashed.disabled:focus>a:only-child:after,.ant-btn-dashed.disabled:hover>a:only-child:after,.ant-btn-dashed.disabled>a:only-child:after,.ant-btn-dashed[disabled].active>a:only-child:after,.ant-btn-dashed[disabled]:active>a:only-child:after,.ant-btn-dashed[disabled]:focus>a:only-child:after,.ant-btn-dashed[disabled]:hover>a:only-child:after,.ant-btn-dashed[disabled]>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn-danger{color:#fff;background-color:#ff4d4f;border-color:#ff4d4f;text-shadow:0 -1px 0 rgba(0,0,0,.12);box-shadow:0 2px 0 rgba(0,0,0,.045)}.ant-btn-danger>a:only-child{color:currentColor}.ant-btn-danger>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn-danger:focus,.ant-btn-danger:hover{color:#fff;background-color:#ff7875;border-color:#ff7875}.ant-btn-danger:focus>a:only-child,.ant-btn-danger:hover>a:only-child{color:currentColor}.ant-btn-danger:focus>a:only-child:after,.ant-btn-danger:hover>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn-danger.active,.ant-btn-danger:active{color:#fff;background-color:#d9363e;border-color:#d9363e}.ant-btn-danger.active>a:only-child,.ant-btn-danger:active>a:only-child{color:currentColor}.ant-btn-danger.active>a:only-child:after,.ant-btn-danger:active>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn-danger-disabled,.ant-btn-danger-disabled.active,.ant-btn-danger-disabled:active,.ant-btn-danger-disabled:focus,.ant-btn-danger-disabled:hover,.ant-btn-danger.disabled,.ant-btn-danger.disabled.active,.ant-btn-danger.disabled:active,.ant-btn-danger.disabled:focus,.ant-btn-danger.disabled:hover,.ant-btn-danger[disabled],.ant-btn-danger[disabled].active,.ant-btn-danger[disabled]:active,.ant-btn-danger[disabled]:focus,.ant-btn-danger[disabled]:hover{color:rgba(0,0,0,.25);background-color:#f5f5f5;border-color:#d9d9d9;text-shadow:none;box-shadow:none}.ant-btn-danger-disabled.active>a:only-child,.ant-btn-danger-disabled:active>a:only-child,.ant-btn-danger-disabled:focus>a:only-child,.ant-btn-danger-disabled:hover>a:only-child,.ant-btn-danger-disabled>a:only-child,.ant-btn-danger.disabled.active>a:only-child,.ant-btn-danger.disabled:active>a:only-child,.ant-btn-danger.disabled:focus>a:only-child,.ant-btn-danger.disabled:hover>a:only-child,.ant-btn-danger.disabled>a:only-child,.ant-btn-danger[disabled].active>a:only-child,.ant-btn-danger[disabled]:active>a:only-child,.ant-btn-danger[disabled]:focus>a:only-child,.ant-btn-danger[disabled]:hover>a:only-child,.ant-btn-danger[disabled]>a:only-child{color:currentColor}.ant-btn-danger-disabled.active>a:only-child:after,.ant-btn-danger-disabled:active>a:only-child:after,.ant-btn-danger-disabled:focus>a:only-child:after,.ant-btn-danger-disabled:hover>a:only-child:after,.ant-btn-danger-disabled>a:only-child:after,.ant-btn-danger.disabled.active>a:only-child:after,.ant-btn-danger.disabled:active>a:only-child:after,.ant-btn-danger.disabled:focus>a:only-child:after,.ant-btn-danger.disabled:hover>a:only-child:after,.ant-btn-danger.disabled>a:only-child:after,.ant-btn-danger[disabled].active>a:only-child:after,.ant-btn-danger[disabled]:active>a:only-child:after,.ant-btn-danger[disabled]:focus>a:only-child:after,.ant-btn-danger[disabled]:hover>a:only-child:after,.ant-btn-danger[disabled]>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn-link{color:#722ed1;background-color:transparent;border-color:transparent;box-shadow:none}.ant-btn-link>a:only-child{color:currentColor}.ant-btn-link>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn-link:focus,.ant-btn-link:hover{color:#9254de;background-color:transparent;border-color:#9254de}.ant-btn-link:focus>a:only-child,.ant-btn-link:hover>a:only-child{color:currentColor}.ant-btn-link:focus>a:only-child:after,.ant-btn-link:hover>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn-link.active,.ant-btn-link:active{color:#531dab;background-color:transparent;border-color:#531dab}.ant-btn-link.active>a:only-child,.ant-btn-link:active>a:only-child{color:currentColor}.ant-btn-link.active>a:only-child:after,.ant-btn-link:active>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn-link-disabled,.ant-btn-link-disabled.active,.ant-btn-link-disabled:active,.ant-btn-link-disabled:focus,.ant-btn-link-disabled:hover,.ant-btn-link.disabled,.ant-btn-link.disabled.active,.ant-btn-link.disabled:active,.ant-btn-link.disabled:focus,.ant-btn-link.disabled:hover,.ant-btn-link[disabled],.ant-btn-link[disabled].active,.ant-btn-link[disabled]:active,.ant-btn-link[disabled]:focus,.ant-btn-link[disabled]:hover{background-color:#f5f5f5;border-color:#d9d9d9}.ant-btn-link:active,.ant-btn-link:focus,.ant-btn-link:hover{border-color:transparent}.ant-btn-link-disabled,.ant-btn-link-disabled.active,.ant-btn-link-disabled:active,.ant-btn-link-disabled:focus,.ant-btn-link-disabled:hover,.ant-btn-link.disabled,.ant-btn-link.disabled.active,.ant-btn-link.disabled:active,.ant-btn-link.disabled:focus,.ant-btn-link.disabled:hover,.ant-btn-link[disabled],.ant-btn-link[disabled].active,.ant-btn-link[disabled]:active,.ant-btn-link[disabled]:focus,.ant-btn-link[disabled]:hover{color:rgba(0,0,0,.25);background-color:transparent;border-color:transparent;text-shadow:none;box-shadow:none}.ant-btn-link-disabled.active>a:only-child,.ant-btn-link-disabled:active>a:only-child,.ant-btn-link-disabled:focus>a:only-child,.ant-btn-link-disabled:hover>a:only-child,.ant-btn-link-disabled>a:only-child,.ant-btn-link.disabled.active>a:only-child,.ant-btn-link.disabled:active>a:only-child,.ant-btn-link.disabled:focus>a:only-child,.ant-btn-link.disabled:hover>a:only-child,.ant-btn-link.disabled>a:only-child,.ant-btn-link[disabled].active>a:only-child,.ant-btn-link[disabled]:active>a:only-child,.ant-btn-link[disabled]:focus>a:only-child,.ant-btn-link[disabled]:hover>a:only-child,.ant-btn-link[disabled]>a:only-child{color:currentColor}.ant-btn-link-disabled.active>a:only-child:after,.ant-btn-link-disabled:active>a:only-child:after,.ant-btn-link-disabled:focus>a:only-child:after,.ant-btn-link-disabled:hover>a:only-child:after,.ant-btn-link-disabled>a:only-child:after,.ant-btn-link.disabled.active>a:only-child:after,.ant-btn-link.disabled:active>a:only-child:after,.ant-btn-link.disabled:focus>a:only-child:after,.ant-btn-link.disabled:hover>a:only-child:after,.ant-btn-link.disabled>a:only-child:after,.ant-btn-link[disabled].active>a:only-child:after,.ant-btn-link[disabled]:active>a:only-child:after,.ant-btn-link[disabled]:focus>a:only-child:after,.ant-btn-link[disabled]:hover>a:only-child:after,.ant-btn-link[disabled]>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn-icon-only{width:32px;height:32px;padding:0;font-size:16px;border-radius:4px}.ant-btn-icon-only.ant-btn-lg{width:40px;height:40px;padding:0;font-size:18px;border-radius:4px}.ant-btn-icon-only.ant-btn-sm{width:24px;height:24px;padding:0;font-size:14px;border-radius:4px}.ant-btn-round{height:32px;padding:0 16px;font-size:14px;border-radius:32px}.ant-btn-round.ant-btn-lg{height:40px;padding:0 20px;font-size:16px;border-radius:40px}.ant-btn-round.ant-btn-sm{height:24px;padding:0 12px;font-size:14px;border-radius:24px}.ant-btn-round.ant-btn-icon-only{width:auto}.ant-btn-circle,.ant-btn-circle-outline{min-width:32px;padding-right:0;padding-left:0;text-align:center;border-radius:50%}.ant-btn-circle-outline.ant-btn-lg,.ant-btn-circle.ant-btn-lg{min-width:40px;border-radius:50%}.ant-btn-circle-outline.ant-btn-sm,.ant-btn-circle.ant-btn-sm{min-width:24px;border-radius:50%}.ant-btn:before{position:absolute;top:-1px;right:-1px;bottom:-1px;left:-1px;z-index:1;display:none;background:#fff;border-radius:inherit;opacity:.35;-webkit-transition:opacity .2s;transition:opacity .2s;content:"";pointer-events:none}.ant-btn .anticon{-webkit-transition:margin-left .3s cubic-bezier(.645,.045,.355,1);transition:margin-left .3s cubic-bezier(.645,.045,.355,1)}.ant-btn .anticon.anticon-minus>svg,.ant-btn .anticon.anticon-plus>svg{shape-rendering:optimizeSpeed}.ant-btn.ant-btn-loading{position:relative;pointer-events:none}.ant-btn.ant-btn-loading:before{display:block}.ant-btn.ant-btn-loading:not(.ant-btn-circle):not(.ant-btn-circle-outline):not(.ant-btn-icon-only){padding-left:29px}.ant-btn.ant-btn-loading:not(.ant-btn-circle):not(.ant-btn-circle-outline):not(.ant-btn-icon-only) .anticon:not(:last-child){margin-left:-14px}.ant-btn-sm.ant-btn-loading:not(.ant-btn-circle):not(.ant-btn-circle-outline):not(.ant-btn-icon-only){padding-left:24px}.ant-btn-sm.ant-btn-loading:not(.ant-btn-circle):not(.ant-btn-circle-outline):not(.ant-btn-icon-only) .anticon{margin-left:-17px}.ant-btn-group{display:inline-block}.ant-btn-group,.ant-btn-group>.ant-btn,.ant-btn-group>span>.ant-btn{position:relative}.ant-btn-group>.ant-btn.active,.ant-btn-group>.ant-btn:active,.ant-btn-group>.ant-btn:focus,.ant-btn-group>.ant-btn:hover,.ant-btn-group>span>.ant-btn.active,.ant-btn-group>span>.ant-btn:active,.ant-btn-group>span>.ant-btn:focus,.ant-btn-group>span>.ant-btn:hover{z-index:2}.ant-btn-group>.ant-btn:disabled,.ant-btn-group>span>.ant-btn:disabled{z-index:0}.ant-btn-group>.ant-btn-icon-only{font-size:14px}.ant-btn-group-lg>.ant-btn,.ant-btn-group-lg>span>.ant-btn{height:40px;padding:0 15px;font-size:16px;border-radius:0;line-height:38px}.ant-btn-group-lg>.ant-btn.ant-btn-icon-only{width:40px;height:40px;padding-right:0;padding-left:0}.ant-btn-group-sm>.ant-btn,.ant-btn-group-sm>span>.ant-btn{height:24px;padding:0 7px;font-size:14px;border-radius:0;line-height:22px}.ant-btn-group-sm>.ant-btn>.anticon,.ant-btn-group-sm>span>.ant-btn>.anticon{font-size:14px}.ant-btn-group-sm>.ant-btn.ant-btn-icon-only{width:24px;height:24px;padding-right:0;padding-left:0}.ant-btn+.ant-btn-group,.ant-btn-group+.ant-btn,.ant-btn-group+.ant-btn-group,.ant-btn-group .ant-btn+.ant-btn,.ant-btn-group .ant-btn+span,.ant-btn-group>span+span,.ant-btn-group span+.ant-btn{margin-left:-1px}.ant-btn-group .ant-btn-primary+.ant-btn:not(.ant-btn-primary):not([disabled]){border-left-color:transparent}.ant-btn-group .ant-btn{border-radius:0}.ant-btn-group>.ant-btn:first-child,.ant-btn-group>span:first-child>.ant-btn{margin-left:0}.ant-btn-group>.ant-btn:only-child,.ant-btn-group>span:only-child>.ant-btn{border-radius:4px}.ant-btn-group>.ant-btn:first-child:not(:last-child),.ant-btn-group>span:first-child:not(:last-child)>.ant-btn{border-top-left-radius:4px;border-bottom-left-radius:4px}.ant-btn-group>.ant-btn:last-child:not(:first-child),.ant-btn-group>span:last-child:not(:first-child)>.ant-btn{border-top-right-radius:4px;border-bottom-right-radius:4px}.ant-btn-group-sm>.ant-btn:only-child,.ant-btn-group-sm>span:only-child>.ant-btn{border-radius:4px}.ant-btn-group-sm>.ant-btn:first-child:not(:last-child),.ant-btn-group-sm>span:first-child:not(:last-child)>.ant-btn{border-top-left-radius:4px;border-bottom-left-radius:4px}.ant-btn-group-sm>.ant-btn:last-child:not(:first-child),.ant-btn-group-sm>span:last-child:not(:first-child)>.ant-btn{border-top-right-radius:4px;border-bottom-right-radius:4px}.ant-btn-group>.ant-btn-group{float:left}.ant-btn-group>.ant-btn-group:not(:first-child):not(:last-child)>.ant-btn{border-radius:0}.ant-btn-group>.ant-btn-group:first-child:not(:last-child)>.ant-btn:last-child{padding-right:8px;border-top-right-radius:0;border-bottom-right-radius:0}.ant-btn-group>.ant-btn-group:last-child:not(:first-child)>.ant-btn:first-child{padding-left:8px;border-top-left-radius:0;border-bottom-left-radius:0}.ant-btn:active>span,.ant-btn:focus>span{position:relative}.ant-btn>.anticon+span,.ant-btn>span+.anticon{margin-left:8px}.ant-btn-background-ghost{color:#fff;background:transparent!important;border-color:#fff}.ant-btn-background-ghost.ant-btn-primary{color:#722ed1;background-color:transparent;border-color:#722ed1;text-shadow:none}.ant-btn-background-ghost.ant-btn-primary>a:only-child{color:currentColor}.ant-btn-background-ghost.ant-btn-primary>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn-background-ghost.ant-btn-primary:focus,.ant-btn-background-ghost.ant-btn-primary:hover{color:#9254de;background-color:transparent;border-color:#9254de}.ant-btn-background-ghost.ant-btn-primary:focus>a:only-child,.ant-btn-background-ghost.ant-btn-primary:hover>a:only-child{color:currentColor}.ant-btn-background-ghost.ant-btn-primary:focus>a:only-child:after,.ant-btn-background-ghost.ant-btn-primary:hover>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn-background-ghost.ant-btn-primary.active,.ant-btn-background-ghost.ant-btn-primary:active{color:#531dab;background-color:transparent;border-color:#531dab}.ant-btn-background-ghost.ant-btn-primary.active>a:only-child,.ant-btn-background-ghost.ant-btn-primary:active>a:only-child{color:currentColor}.ant-btn-background-ghost.ant-btn-primary.active>a:only-child:after,.ant-btn-background-ghost.ant-btn-primary:active>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn-background-ghost.ant-btn-primary-disabled,.ant-btn-background-ghost.ant-btn-primary-disabled.active,.ant-btn-background-ghost.ant-btn-primary-disabled:active,.ant-btn-background-ghost.ant-btn-primary-disabled:focus,.ant-btn-background-ghost.ant-btn-primary-disabled:hover,.ant-btn-background-ghost.ant-btn-primary.disabled,.ant-btn-background-ghost.ant-btn-primary.disabled.active,.ant-btn-background-ghost.ant-btn-primary.disabled:active,.ant-btn-background-ghost.ant-btn-primary.disabled:focus,.ant-btn-background-ghost.ant-btn-primary.disabled:hover,.ant-btn-background-ghost.ant-btn-primary[disabled],.ant-btn-background-ghost.ant-btn-primary[disabled].active,.ant-btn-background-ghost.ant-btn-primary[disabled]:active,.ant-btn-background-ghost.ant-btn-primary[disabled]:focus,.ant-btn-background-ghost.ant-btn-primary[disabled]:hover{color:rgba(0,0,0,.25);background-color:#f5f5f5;border-color:#d9d9d9;text-shadow:none;box-shadow:none}.ant-btn-background-ghost.ant-btn-primary-disabled.active>a:only-child,.ant-btn-background-ghost.ant-btn-primary-disabled:active>a:only-child,.ant-btn-background-ghost.ant-btn-primary-disabled:focus>a:only-child,.ant-btn-background-ghost.ant-btn-primary-disabled:hover>a:only-child,.ant-btn-background-ghost.ant-btn-primary-disabled>a:only-child,.ant-btn-background-ghost.ant-btn-primary.disabled.active>a:only-child,.ant-btn-background-ghost.ant-btn-primary.disabled:active>a:only-child,.ant-btn-background-ghost.ant-btn-primary.disabled:focus>a:only-child,.ant-btn-background-ghost.ant-btn-primary.disabled:hover>a:only-child,.ant-btn-background-ghost.ant-btn-primary.disabled>a:only-child,.ant-btn-background-ghost.ant-btn-primary[disabled].active>a:only-child,.ant-btn-background-ghost.ant-btn-primary[disabled]:active>a:only-child,.ant-btn-background-ghost.ant-btn-primary[disabled]:focus>a:only-child,.ant-btn-background-ghost.ant-btn-primary[disabled]:hover>a:only-child,.ant-btn-background-ghost.ant-btn-primary[disabled]>a:only-child{color:currentColor}.ant-btn-background-ghost.ant-btn-primary-disabled.active>a:only-child:after,.ant-btn-background-ghost.ant-btn-primary-disabled:active>a:only-child:after,.ant-btn-background-ghost.ant-btn-primary-disabled:focus>a:only-child:after,.ant-btn-background-ghost.ant-btn-primary-disabled:hover>a:only-child:after,.ant-btn-background-ghost.ant-btn-primary-disabled>a:only-child:after,.ant-btn-background-ghost.ant-btn-primary.disabled.active>a:only-child:after,.ant-btn-background-ghost.ant-btn-primary.disabled:active>a:only-child:after,.ant-btn-background-ghost.ant-btn-primary.disabled:focus>a:only-child:after,.ant-btn-background-ghost.ant-btn-primary.disabled:hover>a:only-child:after,.ant-btn-background-ghost.ant-btn-primary.disabled>a:only-child:after,.ant-btn-background-ghost.ant-btn-primary[disabled].active>a:only-child:after,.ant-btn-background-ghost.ant-btn-primary[disabled]:active>a:only-child:after,.ant-btn-background-ghost.ant-btn-primary[disabled]:focus>a:only-child:after,.ant-btn-background-ghost.ant-btn-primary[disabled]:hover>a:only-child:after,.ant-btn-background-ghost.ant-btn-primary[disabled]>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn-background-ghost.ant-btn-danger{color:#ff4d4f;background-color:transparent;border-color:#ff4d4f;text-shadow:none}.ant-btn-background-ghost.ant-btn-danger>a:only-child{color:currentColor}.ant-btn-background-ghost.ant-btn-danger>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn-background-ghost.ant-btn-danger:focus,.ant-btn-background-ghost.ant-btn-danger:hover{color:#ff7875;background-color:transparent;border-color:#ff7875}.ant-btn-background-ghost.ant-btn-danger:focus>a:only-child,.ant-btn-background-ghost.ant-btn-danger:hover>a:only-child{color:currentColor}.ant-btn-background-ghost.ant-btn-danger:focus>a:only-child:after,.ant-btn-background-ghost.ant-btn-danger:hover>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn-background-ghost.ant-btn-danger.active,.ant-btn-background-ghost.ant-btn-danger:active{color:#d9363e;background-color:transparent;border-color:#d9363e}.ant-btn-background-ghost.ant-btn-danger.active>a:only-child,.ant-btn-background-ghost.ant-btn-danger:active>a:only-child{color:currentColor}.ant-btn-background-ghost.ant-btn-danger.active>a:only-child:after,.ant-btn-background-ghost.ant-btn-danger:active>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn-background-ghost.ant-btn-danger-disabled,.ant-btn-background-ghost.ant-btn-danger-disabled.active,.ant-btn-background-ghost.ant-btn-danger-disabled:active,.ant-btn-background-ghost.ant-btn-danger-disabled:focus,.ant-btn-background-ghost.ant-btn-danger-disabled:hover,.ant-btn-background-ghost.ant-btn-danger.disabled,.ant-btn-background-ghost.ant-btn-danger.disabled.active,.ant-btn-background-ghost.ant-btn-danger.disabled:active,.ant-btn-background-ghost.ant-btn-danger.disabled:focus,.ant-btn-background-ghost.ant-btn-danger.disabled:hover,.ant-btn-background-ghost.ant-btn-danger[disabled],.ant-btn-background-ghost.ant-btn-danger[disabled].active,.ant-btn-background-ghost.ant-btn-danger[disabled]:active,.ant-btn-background-ghost.ant-btn-danger[disabled]:focus,.ant-btn-background-ghost.ant-btn-danger[disabled]:hover{color:rgba(0,0,0,.25);background-color:#f5f5f5;border-color:#d9d9d9;text-shadow:none;box-shadow:none}.ant-btn-background-ghost.ant-btn-danger-disabled.active>a:only-child,.ant-btn-background-ghost.ant-btn-danger-disabled:active>a:only-child,.ant-btn-background-ghost.ant-btn-danger-disabled:focus>a:only-child,.ant-btn-background-ghost.ant-btn-danger-disabled:hover>a:only-child,.ant-btn-background-ghost.ant-btn-danger-disabled>a:only-child,.ant-btn-background-ghost.ant-btn-danger.disabled.active>a:only-child,.ant-btn-background-ghost.ant-btn-danger.disabled:active>a:only-child,.ant-btn-background-ghost.ant-btn-danger.disabled:focus>a:only-child,.ant-btn-background-ghost.ant-btn-danger.disabled:hover>a:only-child,.ant-btn-background-ghost.ant-btn-danger.disabled>a:only-child,.ant-btn-background-ghost.ant-btn-danger[disabled].active>a:only-child,.ant-btn-background-ghost.ant-btn-danger[disabled]:active>a:only-child,.ant-btn-background-ghost.ant-btn-danger[disabled]:focus>a:only-child,.ant-btn-background-ghost.ant-btn-danger[disabled]:hover>a:only-child,.ant-btn-background-ghost.ant-btn-danger[disabled]>a:only-child{color:currentColor}.ant-btn-background-ghost.ant-btn-danger-disabled.active>a:only-child:after,.ant-btn-background-ghost.ant-btn-danger-disabled:active>a:only-child:after,.ant-btn-background-ghost.ant-btn-danger-disabled:focus>a:only-child:after,.ant-btn-background-ghost.ant-btn-danger-disabled:hover>a:only-child:after,.ant-btn-background-ghost.ant-btn-danger-disabled>a:only-child:after,.ant-btn-background-ghost.ant-btn-danger.disabled.active>a:only-child:after,.ant-btn-background-ghost.ant-btn-danger.disabled:active>a:only-child:after,.ant-btn-background-ghost.ant-btn-danger.disabled:focus>a:only-child:after,.ant-btn-background-ghost.ant-btn-danger.disabled:hover>a:only-child:after,.ant-btn-background-ghost.ant-btn-danger.disabled>a:only-child:after,.ant-btn-background-ghost.ant-btn-danger[disabled].active>a:only-child:after,.ant-btn-background-ghost.ant-btn-danger[disabled]:active>a:only-child:after,.ant-btn-background-ghost.ant-btn-danger[disabled]:focus>a:only-child:after,.ant-btn-background-ghost.ant-btn-danger[disabled]:hover>a:only-child:after,.ant-btn-background-ghost.ant-btn-danger[disabled]>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn-background-ghost.ant-btn-link{color:#722ed1;background-color:transparent;border-color:transparent;text-shadow:none;color:#fff}.ant-btn-background-ghost.ant-btn-link>a:only-child{color:currentColor}.ant-btn-background-ghost.ant-btn-link>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn-background-ghost.ant-btn-link:focus,.ant-btn-background-ghost.ant-btn-link:hover{color:#9254de;background-color:transparent;border-color:transparent}.ant-btn-background-ghost.ant-btn-link:focus>a:only-child,.ant-btn-background-ghost.ant-btn-link:hover>a:only-child{color:currentColor}.ant-btn-background-ghost.ant-btn-link:focus>a:only-child:after,.ant-btn-background-ghost.ant-btn-link:hover>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn-background-ghost.ant-btn-link.active,.ant-btn-background-ghost.ant-btn-link:active{color:#531dab;background-color:transparent;border-color:transparent}.ant-btn-background-ghost.ant-btn-link.active>a:only-child,.ant-btn-background-ghost.ant-btn-link:active>a:only-child{color:currentColor}.ant-btn-background-ghost.ant-btn-link.active>a:only-child:after,.ant-btn-background-ghost.ant-btn-link:active>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn-background-ghost.ant-btn-link-disabled,.ant-btn-background-ghost.ant-btn-link-disabled.active,.ant-btn-background-ghost.ant-btn-link-disabled:active,.ant-btn-background-ghost.ant-btn-link-disabled:focus,.ant-btn-background-ghost.ant-btn-link-disabled:hover,.ant-btn-background-ghost.ant-btn-link.disabled,.ant-btn-background-ghost.ant-btn-link.disabled.active,.ant-btn-background-ghost.ant-btn-link.disabled:active,.ant-btn-background-ghost.ant-btn-link.disabled:focus,.ant-btn-background-ghost.ant-btn-link.disabled:hover,.ant-btn-background-ghost.ant-btn-link[disabled],.ant-btn-background-ghost.ant-btn-link[disabled].active,.ant-btn-background-ghost.ant-btn-link[disabled]:active,.ant-btn-background-ghost.ant-btn-link[disabled]:focus,.ant-btn-background-ghost.ant-btn-link[disabled]:hover{color:rgba(0,0,0,.25);background-color:#f5f5f5;border-color:#d9d9d9;text-shadow:none;box-shadow:none}.ant-btn-background-ghost.ant-btn-link-disabled.active>a:only-child,.ant-btn-background-ghost.ant-btn-link-disabled:active>a:only-child,.ant-btn-background-ghost.ant-btn-link-disabled:focus>a:only-child,.ant-btn-background-ghost.ant-btn-link-disabled:hover>a:only-child,.ant-btn-background-ghost.ant-btn-link-disabled>a:only-child,.ant-btn-background-ghost.ant-btn-link.disabled.active>a:only-child,.ant-btn-background-ghost.ant-btn-link.disabled:active>a:only-child,.ant-btn-background-ghost.ant-btn-link.disabled:focus>a:only-child,.ant-btn-background-ghost.ant-btn-link.disabled:hover>a:only-child,.ant-btn-background-ghost.ant-btn-link.disabled>a:only-child,.ant-btn-background-ghost.ant-btn-link[disabled].active>a:only-child,.ant-btn-background-ghost.ant-btn-link[disabled]:active>a:only-child,.ant-btn-background-ghost.ant-btn-link[disabled]:focus>a:only-child,.ant-btn-background-ghost.ant-btn-link[disabled]:hover>a:only-child,.ant-btn-background-ghost.ant-btn-link[disabled]>a:only-child{color:currentColor}.ant-btn-background-ghost.ant-btn-link-disabled.active>a:only-child:after,.ant-btn-background-ghost.ant-btn-link-disabled:active>a:only-child:after,.ant-btn-background-ghost.ant-btn-link-disabled:focus>a:only-child:after,.ant-btn-background-ghost.ant-btn-link-disabled:hover>a:only-child:after,.ant-btn-background-ghost.ant-btn-link-disabled>a:only-child:after,.ant-btn-background-ghost.ant-btn-link.disabled.active>a:only-child:after,.ant-btn-background-ghost.ant-btn-link.disabled:active>a:only-child:after,.ant-btn-background-ghost.ant-btn-link.disabled:focus>a:only-child:after,.ant-btn-background-ghost.ant-btn-link.disabled:hover>a:only-child:after,.ant-btn-background-ghost.ant-btn-link.disabled>a:only-child:after,.ant-btn-background-ghost.ant-btn-link[disabled].active>a:only-child:after,.ant-btn-background-ghost.ant-btn-link[disabled]:active>a:only-child:after,.ant-btn-background-ghost.ant-btn-link[disabled]:focus>a:only-child:after,.ant-btn-background-ghost.ant-btn-link[disabled]:hover>a:only-child:after,.ant-btn-background-ghost.ant-btn-link[disabled]>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn-two-chinese-chars:first-letter{letter-spacing:.34em}.ant-btn-two-chinese-chars>:not(.anticon){margin-right:-.34em;letter-spacing:.34em}.ant-btn-block{width:100%}.ant-btn:empty{vertical-align:top}a.ant-btn{padding-top:.1px;line-height:30px}a.ant-btn-lg{line-height:38px}a.ant-btn-sm{line-height:22px}.PlayGround-module--playground--20RTt{margin:0;padding:0;border:1px solid #efefef;border-radius:4px;display:flex;background:#fff;min-height:620px;overflow:hidden}.PlayGround-module--playground--20RTt .PlayGround-module--editor--1HTqe,.PlayGround-module--playground--20RTt .PlayGround-module--preview--6whqA{height:100%}.PlayGround-module--playground--20RTt .PlayGround-module--preview--6whqA{flex:2 1;border-right:1px solid #efefef;padding:24px 16px;overflow:auto;min-height:620px}.PlayGround-module--playground--20RTt .PlayGround-module--editor--1HTqe{flex:1.5 1;overflow:hidden;height:100%}.PlayGround-module--playground--20RTt .PlayGround-module--editor--1HTqe .PlayGround-module--toolbar--2i0SG{height:36px;line-height:36px;border-bottom:1px solid #efefef;width:100%;padding:0 16px;text-align:right;color:#777;background:#f9f9f9}.PlayGround-module--playground--20RTt .PlayGround-module--editor--1HTqe .PlayGround-module--toolbar--2i0SG>*{display:inline-block;margin-left:2px}.PlayGround-module--playground--20RTt .PlayGround-module--editor--1HTqe .PlayGround-module--toolbar--2i0SG .ant-typography-copy{color:#777}.PlayGround-module--playground--20RTt .PlayGround-module--editor--1HTqe .PlayGround-module--codemirror--nEJBa{overflow:hidden;height:100%}.PlayGround-module--playground--20RTt .PlayGround-module--editor--1HTqe .PlayGround-module--codemirror--nEJBa .react-codemirror2{height:100%;overflow:hidden;box-sizing:content-box;font-family:SFMono-Regular,Consolas,Liberation Mono,Menlo,Courier,monospace}.PlayGround-module--playground--20RTt .PlayGround-module--editor--1HTqe .PlayGround-module--codemirror--nEJBa .react-codemirror2 *{box-sizing:content-box}.PlayGround-module--playground--20RTt .PlayGround-module--editor--1HTqe .PlayGround-module--codemirror--nEJBa .CodeMirror-scroll{padding-bottom:32px;margin-right:-32px}.PlayGround-module--playground--20RTt .PlayGround-module--editor--1HTqe .PlayGround-module--codemirror--nEJBa .CodeMirror{background-image:none;line-height:1.5;font-size:13px;padding:8px 16px;height:calc(100% - 54px)}.PlayGrounds-module--container--17Tai{margin:0}.PlayGrounds-module--container--17Tai .PlayGrounds-module--cards--3hJak{max-width:100%;overflow-x:auto;overflow-y:hidden;white-space:nowrap;padding:1px;margin-bottom:12px}.PlayGrounds-module--container--17Tai .PlayGrounds-module--card--3Vq_o{display:inline-block;width:144px;height:100px;margin:0 16px 0 0;cursor:pointer;padding:0;position:relative;border:1px solid #efefef;border-radius:2px;-webkit-transition:all .3s;transition:all .3s}.PlayGrounds-module--container--17Tai .PlayGrounds-module--card--3Vq_o:after{-webkit-transition:all .3s;transition:all .3s;background-color:transparent;border:2px solid transparent;border-radius:4px;content:"";position:absolute;z-index:10;top:-2px;bottom:-2px;right:-2px;left:-2px}.PlayGrounds-module--container--17Tai .PlayGrounds-module--card--3Vq_o img{display:block;width:100%}.PlayGrounds-module--container--17Tai .PlayGrounds-module--card--3Vq_o:last-child{margin-right:0}.PlayGrounds-module--container--17Tai .PlayGrounds-module--card--3Vq_o:hover{border-color:#ddd}.PlayGrounds-module--container--17Tai .PlayGrounds-module--card--3Vq_o.PlayGrounds-module--current--2cQLr:after{background-color:rgba(24,144,255,.1);border-color:#1890ff}.ant-skeleton{display:table;width:100%}.ant-skeleton-header{display:table-cell;padding-right:16px;vertical-align:top}.ant-skeleton-header .ant-skeleton-avatar{display:inline-block;vertical-align:top;background:#f2f2f2;width:32px;height:32px;line-height:32px}.ant-skeleton-header .ant-skeleton-avatar.ant-skeleton-avatar-circle{border-radius:50%}.ant-skeleton-header .ant-skeleton-avatar-lg{width:40px;height:40px;line-height:40px}.ant-skeleton-header .ant-skeleton-avatar-lg.ant-skeleton-avatar-circle{border-radius:50%}.ant-skeleton-header .ant-skeleton-avatar-sm{width:24px;height:24px;line-height:24px}.ant-skeleton-header .ant-skeleton-avatar-sm.ant-skeleton-avatar-circle{border-radius:50%}.ant-skeleton-content{display:table-cell;width:100%;vertical-align:top}.ant-skeleton-content .ant-skeleton-title{width:100%;height:16px;margin-top:16px;background:#f2f2f2}.ant-skeleton-content .ant-skeleton-title+.ant-skeleton-paragraph{margin-top:24px}.ant-skeleton-content .ant-skeleton-paragraph{padding:0}.ant-skeleton-content .ant-skeleton-paragraph>li{width:100%;height:16px;list-style:none;background:#f2f2f2}.ant-skeleton-content .ant-skeleton-paragraph>li:last-child:not(:first-child):not(:nth-child(2)){width:61%}.ant-skeleton-content .ant-skeleton-paragraph>li+li{margin-top:16px}.ant-skeleton-with-avatar .ant-skeleton-content .ant-skeleton-title{margin-top:12px}.ant-skeleton-with-avatar .ant-skeleton-content .ant-skeleton-title+.ant-skeleton-paragraph{margin-top:28px}.ant-skeleton.ant-skeleton-active .ant-skeleton-avatar,.ant-skeleton.ant-skeleton-active .ant-skeleton-content .ant-skeleton-paragraph>li,.ant-skeleton.ant-skeleton-active .ant-skeleton-content .ant-skeleton-title{background:-webkit-gradient(linear,left top,right top,color-stop(25%,#f2f2f2),color-stop(37%,#e6e6e6),color-stop(63%,#f2f2f2));background:linear-gradient(90deg,#f2f2f2 25%,#e6e6e6 37%,#f2f2f2 63%);background-size:400% 100%;-webkit-animation:ant-skeleton-loading 1.4s ease infinite;animation:ant-skeleton-loading 1.4s ease infinite}@-webkit-keyframes ant-skeleton-loading{0%{background-position:100% 50%}to{background-position:0 50%}}@keyframes ant-skeleton-loading{0%{background-position:100% 50%}to{background-position:0 50%}} \ No newline at end of file diff --git a/sw.js b/sw.js new file mode 100644 index 0000000000..523951720e --- /dev/null +++ b/sw.js @@ -0,0 +1,165 @@ +/** + * Welcome to your Workbox-powered service worker! + * + * You'll need to register this file in your web app and you should + * disable HTTP caching for this file too. + * See https://goo.gl/nhQhGp + * + * The rest of the code is auto-generated. Please don't update this file + * directly; instead, make changes to your Workbox build configuration + * and re-run your build process. + * See https://goo.gl/2aRDsh + */ + +importScripts("workbox-v4.3.1/workbox-sw.js"); +workbox.setConfig({modulePathPrefix: "workbox-v4.3.1"}); + +workbox.core.setCacheNameDetails({prefix: "gatsby-plugin-offline"}); + +workbox.core.skipWaiting(); + +workbox.core.clientsClaim(); + +/** + * The workboxSW.precacheAndRoute() method efficiently caches and responds to + * requests for URLs in the manifest. + * See https://goo.gl/S9QRab + */ +self.__precacheManifest = [ + { + "url": "webpack-runtime-c93a82d3addc73eb1b52.js" + }, + { + "url": "styles.e32956506dacddf17950.css" + }, + { + "url": "styles-5d5ac81f3c32d0998151.js" + }, + { + "url": "commons-f6783ede68f8c7ff9b6d.js" + }, + { + "url": "offline-plugin-app-shell-fallback/index.html", + "revision": "3bb6e989197b330c20e203bdea194e49" + }, + { + "url": "page-data/offline-plugin-app-shell-fallback/page-data.json", + "revision": "5636d5ab217f85530a92b2939e270518" + }, + { + "url": "manifest.webmanifest", + "revision": "123daa3226c4e9bd715f027dfb4e03ab" + } +].concat(self.__precacheManifest || []); +workbox.precaching.precacheAndRoute(self.__precacheManifest, {}); + +workbox.routing.registerRoute(/(\.js$|\.css$|static\/)/, new workbox.strategies.CacheFirst(), 'GET'); +workbox.routing.registerRoute(/^https?:.*\page-data\/.*\/page-data\.json/, new workbox.strategies.NetworkFirst(), 'GET'); +workbox.routing.registerRoute(/^https?:.*\.(png|jpg|jpeg|webp|svg|gif|tiff|js|woff|woff2|json|css)$/, new workbox.strategies.StaleWhileRevalidate(), 'GET'); +workbox.routing.registerRoute(/^https?:\/\/fonts\.googleapis\.com\/css/, new workbox.strategies.StaleWhileRevalidate(), 'GET'); + +/* global importScripts, workbox, idbKeyval */ + +importScripts(`idb-keyval-iife.min.js`) + +const { NavigationRoute } = workbox.routing + +let lastNavigationRequest = null +let offlineShellEnabled = true + +// prefer standard object syntax to support more browsers +const MessageAPI = { + setPathResources: (event, { path, resources }) => { + event.waitUntil(idbKeyval.set(`resources:${path}`, resources)) + }, + + clearPathResources: event => { + event.waitUntil(idbKeyval.clear()) + }, + + enableOfflineShell: () => { + offlineShellEnabled = true + }, + + disableOfflineShell: () => { + offlineShellEnabled = false + }, +} + +self.addEventListener(`message`, event => { + const { gatsbyApi: api } = event.data + if (api) MessageAPI[api](event, event.data) +}) + +function handleAPIRequest({ event }) { + const { pathname } = new URL(event.request.url) + + const params = pathname.match(/:(.+)/)[1] + const data = {} + + if (params.indexOf(`=`) !== -1) { + params.split(`&`).forEach(param => { + const [key, val] = param.split(`=`) + data[key] = val + }) + } else { + data.api = params + } + + if (MessageAPI[data.api] !== undefined) { + MessageAPI[data.api]() + } + + if (!data.redirect) { + return new Response() + } + + return new Response(null, { + status: 302, + headers: { + Location: lastNavigationRequest, + }, + }) +} + +const navigationRoute = new NavigationRoute(async ({ event }) => { + // handle API requests separately to normal navigation requests, so do this + // check first + if (event.request.url.match(/\/.gatsby-plugin-offline:.+/)) { + return handleAPIRequest({ event }) + } + + if (!offlineShellEnabled) { + return await fetch(event.request) + } + + lastNavigationRequest = event.request.url + + let { pathname } = new URL(event.request.url) + pathname = pathname.replace(new RegExp(`^/gatsby-theme-antv`), ``) + + // Check for resources + the app bundle + // The latter may not exist if the SW is updating to a new version + const resources = await idbKeyval.get(`resources:${pathname}`) + if (!resources || !(await caches.match(`/gatsby-theme-antv/app-51e70f8e1fb75adb779d.js`))) { + return await fetch(event.request) + } + + for (const resource of resources) { + // As soon as we detect a failed resource, fetch the entire page from + // network - that way we won't risk being in an inconsistent state with + // some parts of the page failing. + if (!(await caches.match(resource))) { + return await fetch(event.request) + } + } + + const offlineShell = `/gatsby-theme-antv/offline-plugin-app-shell-fallback/index.html` + const offlineShellWithKey = workbox.precaching.getCacheKeyForURL(offlineShell) + return await caches.match(offlineShellWithKey) +}) + +workbox.routing.registerRoute(navigationRoute) + +// this route is used when performing a non-navigation request (e.g. fetch) +workbox.routing.registerRoute(/\/.gatsby-plugin-offline:.+/, handleAPIRequest) diff --git a/webpack-runtime-c93a82d3addc73eb1b52.js b/webpack-runtime-c93a82d3addc73eb1b52.js new file mode 100644 index 0000000000..4bb815ae1b --- /dev/null +++ b/webpack-runtime-c93a82d3addc73eb1b52.js @@ -0,0 +1,2 @@ +!function(e){function r(r){for(var n,l,a=r[0],f=r[1],i=r[2],c=0,s=[];c} + * @private + */ + + + async popEntry() { + return this._removeEntry({ + direction: 'prev' + }); + } + /** + * Removes and returns the first entry in the queue matching the `queueName`. + * + * @return {Promise} + * @private + */ + + + async shiftEntry() { + return this._removeEntry({ + direction: 'next' + }); + } + /** + * Returns all entries in the store matching the `queueName`. + * + * @param {Object} options See workbox.backgroundSync.Queue~getAll} + * @return {Promise>} + * @private + */ + + + async getAll() { + return await this._db.getAllMatching(OBJECT_STORE_NAME, { + index: INDEXED_PROP, + query: IDBKeyRange.only(this._queueName) + }); + } + /** + * Deletes the entry for the given ID. + * + * WARNING: this method does not ensure the deleted enry belongs to this + * queue (i.e. matches the `queueName`). But this limitation is acceptable + * as this class is not publicly exposed. An additional check would make + * this method slower than it needs to be. + * + * @private + * @param {number} id + */ + + + async deleteEntry(id) { + await this._db.delete(OBJECT_STORE_NAME, id); + } + /** + * Removes and returns the first or last entry in the queue (based on the + * `direction` argument) matching the `queueName`. + * + * @return {Promise} + * @private + */ + + + async _removeEntry({ + direction + }) { + const [entry] = await this._db.getAllMatching(OBJECT_STORE_NAME, { + direction, + index: INDEXED_PROP, + query: IDBKeyRange.only(this._queueName), + count: 1 + }); + + if (entry) { + await this.deleteEntry(entry.id); + return entry; + } + } + /** + * Upgrades the database given an `upgradeneeded` event. + * + * @param {Event} event + * @private + */ + + + _upgradeDb(event) { + const db = event.target.result; + + if (event.oldVersion > 0 && event.oldVersion < DB_VERSION) { + if (db.objectStoreNames.contains(OBJECT_STORE_NAME)) { + db.deleteObjectStore(OBJECT_STORE_NAME); + } + } + + const objStore = db.createObjectStore(OBJECT_STORE_NAME, { + autoIncrement: true, + keyPath: 'id' + }); + objStore.createIndex(INDEXED_PROP, INDEXED_PROP, { + unique: false + }); + } + + } + + /* + Copyright 2018 Google LLC + + Use of this source code is governed by an MIT-style + license that can be found in the LICENSE file or at + https://opensource.org/licenses/MIT. + */ + const serializableProperties = ['method', 'referrer', 'referrerPolicy', 'mode', 'credentials', 'cache', 'redirect', 'integrity', 'keepalive']; + /** + * A class to make it easier to serialize and de-serialize requests so they + * can be stored in IndexedDB. + * + * @private + */ + + class StorableRequest { + /** + * Converts a Request object to a plain object that can be structured + * cloned or JSON-stringified. + * + * @param {Request} request + * @return {Promise} + * + * @private + */ + static async fromRequest(request) { + const requestData = { + url: request.url, + headers: {} + }; // Set the body if present. + + if (request.method !== 'GET') { + // Use ArrayBuffer to support non-text request bodies. + // NOTE: we can't use Blobs becuse Safari doesn't support storing + // Blobs in IndexedDB in some cases: + // https://github.com/dfahlander/Dexie.js/issues/618#issuecomment-398348457 + requestData.body = await request.clone().arrayBuffer(); + } // Convert the headers from an iterable to an object. + + + for (const [key, value] of request.headers.entries()) { + requestData.headers[key] = value; + } // Add all other serializable request properties + + + for (const prop of serializableProperties) { + if (request[prop] !== undefined) { + requestData[prop] = request[prop]; + } + } + + return new StorableRequest(requestData); + } + /** + * Accepts an object of request data that can be used to construct a + * `Request` but can also be stored in IndexedDB. + * + * @param {Object} requestData An object of request data that includes the + * `url` plus any relevant properties of + * [requestInit]{@link https://fetch.spec.whatwg.org/#requestinit}. + * @private + */ + + + constructor(requestData) { + { + assert_mjs.assert.isType(requestData, 'object', { + moduleName: 'workbox-background-sync', + className: 'StorableRequest', + funcName: 'constructor', + paramName: 'requestData' + }); + assert_mjs.assert.isType(requestData.url, 'string', { + moduleName: 'workbox-background-sync', + className: 'StorableRequest', + funcName: 'constructor', + paramName: 'requestData.url' + }); + } // If the request's mode is `navigate`, convert it to `same-origin` since + // navigation requests can't be constructed via script. + + + if (requestData.mode === 'navigate') { + requestData.mode = 'same-origin'; + } + + this._requestData = requestData; + } + /** + * Returns a deep clone of the instances `_requestData` object. + * + * @return {Object} + * + * @private + */ + + + toObject() { + const requestData = Object.assign({}, this._requestData); + requestData.headers = Object.assign({}, this._requestData.headers); + + if (requestData.body) { + requestData.body = requestData.body.slice(0); + } + + return requestData; + } + /** + * Converts this instance to a Request. + * + * @return {Request} + * + * @private + */ + + + toRequest() { + return new Request(this._requestData.url, this._requestData); + } + /** + * Creates and returns a deep clone of the instance. + * + * @return {StorableRequest} + * + * @private + */ + + + clone() { + return new StorableRequest(this.toObject()); + } + + } + + /* + Copyright 2018 Google LLC + + Use of this source code is governed by an MIT-style + license that can be found in the LICENSE file or at + https://opensource.org/licenses/MIT. + */ + const TAG_PREFIX = 'workbox-background-sync'; + const MAX_RETENTION_TIME = 60 * 24 * 7; // 7 days in minutes + + const queueNames = new Set(); + /** + * A class to manage storing failed requests in IndexedDB and retrying them + * later. All parts of the storing and replaying process are observable via + * callbacks. + * + * @memberof workbox.backgroundSync + */ + + class Queue { + /** + * Creates an instance of Queue with the given options + * + * @param {string} name The unique name for this queue. This name must be + * unique as it's used to register sync events and store requests + * in IndexedDB specific to this instance. An error will be thrown if + * a duplicate name is detected. + * @param {Object} [options] + * @param {Function} [options.onSync] A function that gets invoked whenever + * the 'sync' event fires. The function is invoked with an object + * containing the `queue` property (referencing this instance), and you + * can use the callback to customize the replay behavior of the queue. + * When not set the `replayRequests()` method is called. + * Note: if the replay fails after a sync event, make sure you throw an + * error, so the browser knows to retry the sync event later. + * @param {number} [options.maxRetentionTime=7 days] The amount of time (in + * minutes) a request may be retried. After this amount of time has + * passed, the request will be deleted from the queue. + */ + constructor(name, { + onSync, + maxRetentionTime + } = {}) { + // Ensure the store name is not already being used + if (queueNames.has(name)) { + throw new WorkboxError_mjs.WorkboxError('duplicate-queue-name', { + name + }); + } else { + queueNames.add(name); + } + + this._name = name; + this._onSync = onSync || this.replayRequests; + this._maxRetentionTime = maxRetentionTime || MAX_RETENTION_TIME; + this._queueStore = new QueueStore(this._name); + + this._addSyncListener(); + } + /** + * @return {string} + */ + + + get name() { + return this._name; + } + /** + * Stores the passed request in IndexedDB (with its timestamp and any + * metadata) at the end of the queue. + * + * @param {Object} entry + * @param {Request} entry.request The request to store in the queue. + * @param {Object} [entry.metadata] Any metadata you want associated with the + * stored request. When requests are replayed you'll have access to this + * metadata object in case you need to modify the request beforehand. + * @param {number} [entry.timestamp] The timestamp (Epoch time in + * milliseconds) when the request was first added to the queue. This is + * used along with `maxRetentionTime` to remove outdated requests. In + * general you don't need to set this value, as it's automatically set + * for you (defaulting to `Date.now()`), but you can update it if you + * don't want particular requests to expire. + */ + + + async pushRequest(entry) { + { + assert_mjs.assert.isType(entry, 'object', { + moduleName: 'workbox-background-sync', + className: 'Queue', + funcName: 'pushRequest', + paramName: 'entry' + }); + assert_mjs.assert.isInstance(entry.request, Request, { + moduleName: 'workbox-background-sync', + className: 'Queue', + funcName: 'pushRequest', + paramName: 'entry.request' + }); + } + + await this._addRequest(entry, 'push'); + } + /** + * Stores the passed request in IndexedDB (with its timestamp and any + * metadata) at the beginning of the queue. + * + * @param {Object} entry + * @param {Request} entry.request The request to store in the queue. + * @param {Object} [entry.metadata] Any metadata you want associated with the + * stored request. When requests are replayed you'll have access to this + * metadata object in case you need to modify the request beforehand. + * @param {number} [entry.timestamp] The timestamp (Epoch time in + * milliseconds) when the request was first added to the queue. This is + * used along with `maxRetentionTime` to remove outdated requests. In + * general you don't need to set this value, as it's automatically set + * for you (defaulting to `Date.now()`), but you can update it if you + * don't want particular requests to expire. + */ + + + async unshiftRequest(entry) { + { + assert_mjs.assert.isType(entry, 'object', { + moduleName: 'workbox-background-sync', + className: 'Queue', + funcName: 'unshiftRequest', + paramName: 'entry' + }); + assert_mjs.assert.isInstance(entry.request, Request, { + moduleName: 'workbox-background-sync', + className: 'Queue', + funcName: 'unshiftRequest', + paramName: 'entry.request' + }); + } + + await this._addRequest(entry, 'unshift'); + } + /** + * Removes and returns the last request in the queue (along with its + * timestamp and any metadata). The returned object takes the form: + * `{request, timestamp, metadata}`. + * + * @return {Promise} + */ + + + async popRequest() { + return this._removeRequest('pop'); + } + /** + * Removes and returns the first request in the queue (along with its + * timestamp and any metadata). The returned object takes the form: + * `{request, timestamp, metadata}`. + * + * @return {Promise} + */ + + + async shiftRequest() { + return this._removeRequest('shift'); + } + /** + * Returns all the entries that have not expired (per `maxRetentionTime`). + * Any expired entries are removed from the queue. + * + * @return {Promise>} + */ + + + async getAll() { + const allEntries = await this._queueStore.getAll(); + const now = Date.now(); + const unexpiredEntries = []; + + for (const entry of allEntries) { + // Ignore requests older than maxRetentionTime. Call this function + // recursively until an unexpired request is found. + const maxRetentionTimeInMs = this._maxRetentionTime * 60 * 1000; + + if (now - entry.timestamp > maxRetentionTimeInMs) { + await this._queueStore.deleteEntry(entry.id); + } else { + unexpiredEntries.push(convertEntry(entry)); + } + } + + return unexpiredEntries; + } + /** + * Adds the entry to the QueueStore and registers for a sync event. + * + * @param {Object} entry + * @param {Request} entry.request + * @param {Object} [entry.metadata] + * @param {number} [entry.timestamp=Date.now()] + * @param {string} operation ('push' or 'unshift') + * @private + */ + + + async _addRequest({ + request, + metadata, + timestamp = Date.now() + }, operation) { + const storableRequest = await StorableRequest.fromRequest(request.clone()); + const entry = { + requestData: storableRequest.toObject(), + timestamp + }; // Only include metadata if it's present. + + if (metadata) { + entry.metadata = metadata; + } + + await this._queueStore[`${operation}Entry`](entry); + + { + logger_mjs.logger.log(`Request for '${getFriendlyURL_mjs.getFriendlyURL(request.url)}' has ` + `been added to background sync queue '${this._name}'.`); + } // Don't register for a sync if we're in the middle of a sync. Instead, + // we wait until the sync is complete and call register if + // `this._requestsAddedDuringSync` is true. + + + if (this._syncInProgress) { + this._requestsAddedDuringSync = true; + } else { + await this.registerSync(); + } + } + /** + * Removes and returns the first or last (depending on `operation`) entry + * from the QueueStore that's not older than the `maxRetentionTime`. + * + * @param {string} operation ('pop' or 'shift') + * @return {Object|undefined} + * @private + */ + + + async _removeRequest(operation) { + const now = Date.now(); + const entry = await this._queueStore[`${operation}Entry`](); + + if (entry) { + // Ignore requests older than maxRetentionTime. Call this function + // recursively until an unexpired request is found. + const maxRetentionTimeInMs = this._maxRetentionTime * 60 * 1000; + + if (now - entry.timestamp > maxRetentionTimeInMs) { + return this._removeRequest(operation); + } + + return convertEntry(entry); + } + } + /** + * Loops through each request in the queue and attempts to re-fetch it. + * If any request fails to re-fetch, it's put back in the same position in + * the queue (which registers a retry for the next sync event). + */ + + + async replayRequests() { + let entry; + + while (entry = await this.shiftRequest()) { + try { + await fetch(entry.request.clone()); + + { + logger_mjs.logger.log(`Request for '${getFriendlyURL_mjs.getFriendlyURL(entry.request.url)}'` + `has been replayed in queue '${this._name}'`); + } + } catch (error) { + await this.unshiftRequest(entry); + + { + logger_mjs.logger.log(`Request for '${getFriendlyURL_mjs.getFriendlyURL(entry.request.url)}'` + `failed to replay, putting it back in queue '${this._name}'`); + } + + throw new WorkboxError_mjs.WorkboxError('queue-replay-failed', { + name: this._name + }); + } + } + + { + logger_mjs.logger.log(`All requests in queue '${this.name}' have successfully ` + `replayed; the queue is now empty!`); + } + } + /** + * Registers a sync event with a tag unique to this instance. + */ + + + async registerSync() { + if ('sync' in registration) { + try { + await registration.sync.register(`${TAG_PREFIX}:${this._name}`); + } catch (err) { + // This means the registration failed for some reason, possibly due to + // the user disabling it. + { + logger_mjs.logger.warn(`Unable to register sync event for '${this._name}'.`, err); + } + } + } + } + /** + * In sync-supporting browsers, this adds a listener for the sync event. + * In non-sync-supporting browsers, this will retry the queue on service + * worker startup. + * + * @private + */ + + + _addSyncListener() { + if ('sync' in registration) { + self.addEventListener('sync', event => { + if (event.tag === `${TAG_PREFIX}:${this._name}`) { + { + logger_mjs.logger.log(`Background sync for tag '${event.tag}'` + `has been received`); + } + + const syncComplete = async () => { + this._syncInProgress = true; + let syncError; + + try { + await this._onSync({ + queue: this + }); + } catch (error) { + syncError = error; // Rethrow the error. Note: the logic in the finally clause + // will run before this gets rethrown. + + throw syncError; + } finally { + // New items may have been added to the queue during the sync, + // so we need to register for a new sync if that's happened... + // Unless there was an error during the sync, in which + // case the browser will automatically retry later, as long + // as `event.lastChance` is not true. + if (this._requestsAddedDuringSync && !(syncError && !event.lastChance)) { + await this.registerSync(); + } + + this._syncInProgress = false; + this._requestsAddedDuringSync = false; + } + }; + + event.waitUntil(syncComplete()); + } + }); + } else { + { + logger_mjs.logger.log(`Background sync replaying without background sync event`); + } // If the browser doesn't support background sync, retry + // every time the service worker starts up as a fallback. + + + this._onSync({ + queue: this + }); + } + } + /** + * Returns the set of queue names. This is primarily used to reset the list + * of queue names in tests. + * + * @return {Set} + * + * @private + */ + + + static get _queueNames() { + return queueNames; + } + + } + /** + * Converts a QueueStore entry into the format exposed by Queue. This entails + * converting the request data into a real request and omitting the `id` and + * `queueName` properties. + * + * @param {Object} queueStoreEntry + * @return {Object} + * @private + */ + + + const convertEntry = queueStoreEntry => { + const queueEntry = { + request: new StorableRequest(queueStoreEntry.requestData).toRequest(), + timestamp: queueStoreEntry.timestamp + }; + + if (queueStoreEntry.metadata) { + queueEntry.metadata = queueStoreEntry.metadata; + } + + return queueEntry; + }; + + /* + Copyright 2018 Google LLC + + Use of this source code is governed by an MIT-style + license that can be found in the LICENSE file or at + https://opensource.org/licenses/MIT. + */ + /** + * A class implementing the `fetchDidFail` lifecycle callback. This makes it + * easier to add failed requests to a background sync Queue. + * + * @memberof workbox.backgroundSync + */ + + class Plugin { + /** + * @param {...*} queueArgs Args to forward to the composed Queue instance. + * See the [Queue]{@link workbox.backgroundSync.Queue} documentation for + * parameter details. + */ + constructor(...queueArgs) { + this._queue = new Queue(...queueArgs); + this.fetchDidFail = this.fetchDidFail.bind(this); + } + /** + * @param {Object} options + * @param {Request} options.request + * @private + */ + + + async fetchDidFail({ + request + }) { + await this._queue.pushRequest({ + request + }); + } + + } + + /* + Copyright 2018 Google LLC + + Use of this source code is governed by an MIT-style + license that can be found in the LICENSE file or at + https://opensource.org/licenses/MIT. + */ + + exports.Queue = Queue; + exports.Plugin = Plugin; + + return exports; + +}({}, workbox.core._private, workbox.core._private, workbox.core._private, workbox.core._private, workbox.core._private)); +//# sourceMappingURL=workbox-background-sync.dev.js.map diff --git a/workbox-v4.3.1/workbox-background-sync.dev.js.map b/workbox-v4.3.1/workbox-background-sync.dev.js.map new file mode 100644 index 0000000000..8d8cfc0726 --- /dev/null +++ b/workbox-v4.3.1/workbox-background-sync.dev.js.map @@ -0,0 +1 @@ +{"version":3,"file":"workbox-background-sync.dev.js","sources":["../_version.mjs","../lib/QueueStore.mjs","../lib/StorableRequest.mjs","../Queue.mjs","../Plugin.mjs","../index.mjs"],"sourcesContent":["try{self['workbox:background-sync:4.3.1']&&_()}catch(e){}// eslint-disable-line","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport {assert} from 'workbox-core/_private/assert.mjs';\nimport {DBWrapper} from 'workbox-core/_private/DBWrapper.mjs';\nimport '../_version.mjs';\n\n\nconst DB_VERSION = 3;\nconst DB_NAME = 'workbox-background-sync';\nconst OBJECT_STORE_NAME = 'requests';\nconst INDEXED_PROP = 'queueName';\n\n/**\n * A class to manage storing requests from a Queue in IndexedbDB,\n * indexed by their queue name for easier access.\n *\n * @private\n */\nexport class QueueStore {\n /**\n * Associates this instance with a Queue instance, so entries added can be\n * identified by their queue name.\n *\n * @param {string} queueName\n * @private\n */\n constructor(queueName) {\n this._queueName = queueName;\n this._db = new DBWrapper(DB_NAME, DB_VERSION, {\n onupgradeneeded: this._upgradeDb,\n });\n }\n\n /**\n * Append an entry last in the queue.\n *\n * @param {Object} entry\n * @param {Object} entry.requestData\n * @param {number} [entry.timestamp]\n * @param {Object} [entry.metadata]\n * @private\n */\n async pushEntry(entry) {\n if (process.env.NODE_ENV !== 'production') {\n assert.isType(entry, 'object', {\n moduleName: 'workbox-background-sync',\n className: 'QueueStore',\n funcName: 'pushEntry',\n paramName: 'entry',\n });\n assert.isType(entry.requestData, 'object', {\n moduleName: 'workbox-background-sync',\n className: 'QueueStore',\n funcName: 'pushEntry',\n paramName: 'entry.requestData',\n });\n }\n\n // Don't specify an ID since one is automatically generated.\n delete entry.id;\n entry.queueName = this._queueName;\n\n await this._db.add(OBJECT_STORE_NAME, entry);\n }\n\n /**\n * Preppend an entry first in the queue.\n *\n * @param {Object} entry\n * @param {Object} entry.requestData\n * @param {number} [entry.timestamp]\n * @param {Object} [entry.metadata]\n * @private\n */\n async unshiftEntry(entry) {\n if (process.env.NODE_ENV !== 'production') {\n assert.isType(entry, 'object', {\n moduleName: 'workbox-background-sync',\n className: 'QueueStore',\n funcName: 'unshiftEntry',\n paramName: 'entry',\n });\n assert.isType(entry.requestData, 'object', {\n moduleName: 'workbox-background-sync',\n className: 'QueueStore',\n funcName: 'unshiftEntry',\n paramName: 'entry.requestData',\n });\n }\n\n const [firstEntry] = await this._db.getAllMatching(OBJECT_STORE_NAME, {\n count: 1,\n });\n\n if (firstEntry) {\n // Pick an ID one less than the lowest ID in the object store.\n entry.id = firstEntry.id - 1;\n } else {\n // Otherwise let the auto-incrementor assign the ID.\n delete entry.id;\n }\n entry.queueName = this._queueName;\n\n await this._db.add(OBJECT_STORE_NAME, entry);\n }\n\n /**\n * Removes and returns the last entry in the queue matching the `queueName`.\n *\n * @return {Promise}\n * @private\n */\n async popEntry() {\n return this._removeEntry({direction: 'prev'});\n }\n\n /**\n * Removes and returns the first entry in the queue matching the `queueName`.\n *\n * @return {Promise}\n * @private\n */\n async shiftEntry() {\n return this._removeEntry({direction: 'next'});\n }\n\n /**\n * Returns all entries in the store matching the `queueName`.\n *\n * @param {Object} options See workbox.backgroundSync.Queue~getAll}\n * @return {Promise>}\n * @private\n */\n async getAll() {\n return await this._db.getAllMatching(OBJECT_STORE_NAME, {\n index: INDEXED_PROP,\n query: IDBKeyRange.only(this._queueName),\n });\n }\n\n /**\n * Deletes the entry for the given ID.\n *\n * WARNING: this method does not ensure the deleted enry belongs to this\n * queue (i.e. matches the `queueName`). But this limitation is acceptable\n * as this class is not publicly exposed. An additional check would make\n * this method slower than it needs to be.\n *\n * @private\n * @param {number} id\n */\n async deleteEntry(id) {\n await this._db.delete(OBJECT_STORE_NAME, id);\n }\n\n /**\n * Removes and returns the first or last entry in the queue (based on the\n * `direction` argument) matching the `queueName`.\n *\n * @return {Promise}\n * @private\n */\n async _removeEntry({direction}) {\n const [entry] = await this._db.getAllMatching(OBJECT_STORE_NAME, {\n direction,\n index: INDEXED_PROP,\n query: IDBKeyRange.only(this._queueName),\n count: 1,\n });\n\n if (entry) {\n await this.deleteEntry(entry.id);\n return entry;\n }\n }\n\n /**\n * Upgrades the database given an `upgradeneeded` event.\n *\n * @param {Event} event\n * @private\n */\n _upgradeDb(event) {\n const db = event.target.result;\n\n if (event.oldVersion > 0 && event.oldVersion < DB_VERSION) {\n if (db.objectStoreNames.contains(OBJECT_STORE_NAME)) {\n db.deleteObjectStore(OBJECT_STORE_NAME);\n }\n }\n\n const objStore = db.createObjectStore(OBJECT_STORE_NAME, {\n autoIncrement: true,\n keyPath: 'id',\n });\n objStore.createIndex(INDEXED_PROP, INDEXED_PROP, {unique: false});\n }\n}\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport {assert} from 'workbox-core/_private/assert.mjs';\nimport '../_version.mjs';\n\n\nconst serializableProperties = [\n 'method',\n 'referrer',\n 'referrerPolicy',\n 'mode',\n 'credentials',\n 'cache',\n 'redirect',\n 'integrity',\n 'keepalive',\n];\n\n\n/**\n * A class to make it easier to serialize and de-serialize requests so they\n * can be stored in IndexedDB.\n *\n * @private\n */\nclass StorableRequest {\n /**\n * Converts a Request object to a plain object that can be structured\n * cloned or JSON-stringified.\n *\n * @param {Request} request\n * @return {Promise}\n *\n * @private\n */\n static async fromRequest(request) {\n const requestData = {\n url: request.url,\n headers: {},\n };\n\n // Set the body if present.\n if (request.method !== 'GET') {\n // Use ArrayBuffer to support non-text request bodies.\n // NOTE: we can't use Blobs becuse Safari doesn't support storing\n // Blobs in IndexedDB in some cases:\n // https://github.com/dfahlander/Dexie.js/issues/618#issuecomment-398348457\n requestData.body = await request.clone().arrayBuffer();\n }\n\n // Convert the headers from an iterable to an object.\n for (const [key, value] of request.headers.entries()) {\n requestData.headers[key] = value;\n }\n\n // Add all other serializable request properties\n for (const prop of serializableProperties) {\n if (request[prop] !== undefined) {\n requestData[prop] = request[prop];\n }\n }\n\n return new StorableRequest(requestData);\n }\n\n /**\n * Accepts an object of request data that can be used to construct a\n * `Request` but can also be stored in IndexedDB.\n *\n * @param {Object} requestData An object of request data that includes the\n * `url` plus any relevant properties of\n * [requestInit]{@link https://fetch.spec.whatwg.org/#requestinit}.\n * @private\n */\n constructor(requestData) {\n if (process.env.NODE_ENV !== 'production') {\n assert.isType(requestData, 'object', {\n moduleName: 'workbox-background-sync',\n className: 'StorableRequest',\n funcName: 'constructor',\n paramName: 'requestData',\n });\n assert.isType(requestData.url, 'string', {\n moduleName: 'workbox-background-sync',\n className: 'StorableRequest',\n funcName: 'constructor',\n paramName: 'requestData.url',\n });\n }\n\n // If the request's mode is `navigate`, convert it to `same-origin` since\n // navigation requests can't be constructed via script.\n if (requestData.mode === 'navigate') {\n requestData.mode = 'same-origin';\n }\n\n this._requestData = requestData;\n }\n\n /**\n * Returns a deep clone of the instances `_requestData` object.\n *\n * @return {Object}\n *\n * @private\n */\n toObject() {\n const requestData = Object.assign({}, this._requestData);\n requestData.headers = Object.assign({}, this._requestData.headers);\n if (requestData.body) {\n requestData.body = requestData.body.slice(0);\n }\n\n return requestData;\n }\n\n /**\n * Converts this instance to a Request.\n *\n * @return {Request}\n *\n * @private\n */\n toRequest() {\n return new Request(this._requestData.url, this._requestData);\n }\n\n /**\n * Creates and returns a deep clone of the instance.\n *\n * @return {StorableRequest}\n *\n * @private\n */\n clone() {\n return new StorableRequest(this.toObject());\n }\n}\n\nexport {StorableRequest};\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport {WorkboxError} from 'workbox-core/_private/WorkboxError.mjs';\nimport {logger} from 'workbox-core/_private/logger.mjs';\nimport {assert} from 'workbox-core/_private/assert.mjs';\nimport {getFriendlyURL} from 'workbox-core/_private/getFriendlyURL.mjs';\nimport {QueueStore} from './lib/QueueStore.mjs';\nimport {StorableRequest} from './lib/StorableRequest.mjs';\nimport './_version.mjs';\n\n\nconst TAG_PREFIX = 'workbox-background-sync';\nconst MAX_RETENTION_TIME = 60 * 24 * 7; // 7 days in minutes\n\nconst queueNames = new Set();\n\n/**\n * A class to manage storing failed requests in IndexedDB and retrying them\n * later. All parts of the storing and replaying process are observable via\n * callbacks.\n *\n * @memberof workbox.backgroundSync\n */\nclass Queue {\n /**\n * Creates an instance of Queue with the given options\n *\n * @param {string} name The unique name for this queue. This name must be\n * unique as it's used to register sync events and store requests\n * in IndexedDB specific to this instance. An error will be thrown if\n * a duplicate name is detected.\n * @param {Object} [options]\n * @param {Function} [options.onSync] A function that gets invoked whenever\n * the 'sync' event fires. The function is invoked with an object\n * containing the `queue` property (referencing this instance), and you\n * can use the callback to customize the replay behavior of the queue.\n * When not set the `replayRequests()` method is called.\n * Note: if the replay fails after a sync event, make sure you throw an\n * error, so the browser knows to retry the sync event later.\n * @param {number} [options.maxRetentionTime=7 days] The amount of time (in\n * minutes) a request may be retried. After this amount of time has\n * passed, the request will be deleted from the queue.\n */\n constructor(name, {onSync, maxRetentionTime} = {}) {\n // Ensure the store name is not already being used\n if (queueNames.has(name)) {\n throw new WorkboxError('duplicate-queue-name', {name});\n } else {\n queueNames.add(name);\n }\n\n this._name = name;\n this._onSync = onSync || this.replayRequests;\n this._maxRetentionTime = maxRetentionTime || MAX_RETENTION_TIME;\n this._queueStore = new QueueStore(this._name);\n\n this._addSyncListener();\n }\n\n /**\n * @return {string}\n */\n get name() {\n return this._name;\n }\n\n /**\n * Stores the passed request in IndexedDB (with its timestamp and any\n * metadata) at the end of the queue.\n *\n * @param {Object} entry\n * @param {Request} entry.request The request to store in the queue.\n * @param {Object} [entry.metadata] Any metadata you want associated with the\n * stored request. When requests are replayed you'll have access to this\n * metadata object in case you need to modify the request beforehand.\n * @param {number} [entry.timestamp] The timestamp (Epoch time in\n * milliseconds) when the request was first added to the queue. This is\n * used along with `maxRetentionTime` to remove outdated requests. In\n * general you don't need to set this value, as it's automatically set\n * for you (defaulting to `Date.now()`), but you can update it if you\n * don't want particular requests to expire.\n */\n async pushRequest(entry) {\n if (process.env.NODE_ENV !== 'production') {\n assert.isType(entry, 'object', {\n moduleName: 'workbox-background-sync',\n className: 'Queue',\n funcName: 'pushRequest',\n paramName: 'entry',\n });\n assert.isInstance(entry.request, Request, {\n moduleName: 'workbox-background-sync',\n className: 'Queue',\n funcName: 'pushRequest',\n paramName: 'entry.request',\n });\n }\n\n await this._addRequest(entry, 'push');\n }\n\n /**\n * Stores the passed request in IndexedDB (with its timestamp and any\n * metadata) at the beginning of the queue.\n *\n * @param {Object} entry\n * @param {Request} entry.request The request to store in the queue.\n * @param {Object} [entry.metadata] Any metadata you want associated with the\n * stored request. When requests are replayed you'll have access to this\n * metadata object in case you need to modify the request beforehand.\n * @param {number} [entry.timestamp] The timestamp (Epoch time in\n * milliseconds) when the request was first added to the queue. This is\n * used along with `maxRetentionTime` to remove outdated requests. In\n * general you don't need to set this value, as it's automatically set\n * for you (defaulting to `Date.now()`), but you can update it if you\n * don't want particular requests to expire.\n */\n async unshiftRequest(entry) {\n if (process.env.NODE_ENV !== 'production') {\n assert.isType(entry, 'object', {\n moduleName: 'workbox-background-sync',\n className: 'Queue',\n funcName: 'unshiftRequest',\n paramName: 'entry',\n });\n assert.isInstance(entry.request, Request, {\n moduleName: 'workbox-background-sync',\n className: 'Queue',\n funcName: 'unshiftRequest',\n paramName: 'entry.request',\n });\n }\n\n await this._addRequest(entry, 'unshift');\n }\n\n /**\n * Removes and returns the last request in the queue (along with its\n * timestamp and any metadata). The returned object takes the form:\n * `{request, timestamp, metadata}`.\n *\n * @return {Promise}\n */\n async popRequest() {\n return this._removeRequest('pop');\n }\n\n /**\n * Removes and returns the first request in the queue (along with its\n * timestamp and any metadata). The returned object takes the form:\n * `{request, timestamp, metadata}`.\n *\n * @return {Promise}\n */\n async shiftRequest() {\n return this._removeRequest('shift');\n }\n\n /**\n * Returns all the entries that have not expired (per `maxRetentionTime`).\n * Any expired entries are removed from the queue.\n *\n * @return {Promise>}\n */\n async getAll() {\n const allEntries = await this._queueStore.getAll();\n const now = Date.now();\n\n const unexpiredEntries = [];\n for (const entry of allEntries) {\n // Ignore requests older than maxRetentionTime. Call this function\n // recursively until an unexpired request is found.\n const maxRetentionTimeInMs = this._maxRetentionTime * 60 * 1000;\n if (now - entry.timestamp > maxRetentionTimeInMs) {\n await this._queueStore.deleteEntry(entry.id);\n } else {\n unexpiredEntries.push(convertEntry(entry));\n }\n }\n\n return unexpiredEntries;\n }\n\n\n /**\n * Adds the entry to the QueueStore and registers for a sync event.\n *\n * @param {Object} entry\n * @param {Request} entry.request\n * @param {Object} [entry.metadata]\n * @param {number} [entry.timestamp=Date.now()]\n * @param {string} operation ('push' or 'unshift')\n * @private\n */\n async _addRequest(\n {request, metadata, timestamp = Date.now()}, operation) {\n const storableRequest = await StorableRequest.fromRequest(request.clone());\n const entry = {\n requestData: storableRequest.toObject(),\n timestamp,\n };\n\n // Only include metadata if it's present.\n if (metadata) {\n entry.metadata = metadata;\n }\n\n await this._queueStore[`${operation}Entry`](entry);\n\n if (process.env.NODE_ENV !== 'production') {\n logger.log(`Request for '${getFriendlyURL(request.url)}' has ` +\n `been added to background sync queue '${this._name}'.`);\n }\n\n // Don't register for a sync if we're in the middle of a sync. Instead,\n // we wait until the sync is complete and call register if\n // `this._requestsAddedDuringSync` is true.\n if (this._syncInProgress) {\n this._requestsAddedDuringSync = true;\n } else {\n await this.registerSync();\n }\n }\n\n /**\n * Removes and returns the first or last (depending on `operation`) entry\n * from the QueueStore that's not older than the `maxRetentionTime`.\n *\n * @param {string} operation ('pop' or 'shift')\n * @return {Object|undefined}\n * @private\n */\n async _removeRequest(operation) {\n const now = Date.now();\n const entry = await this._queueStore[`${operation}Entry`]();\n\n if (entry) {\n // Ignore requests older than maxRetentionTime. Call this function\n // recursively until an unexpired request is found.\n const maxRetentionTimeInMs = this._maxRetentionTime * 60 * 1000;\n if (now - entry.timestamp > maxRetentionTimeInMs) {\n return this._removeRequest(operation);\n }\n\n return convertEntry(entry);\n }\n }\n\n /**\n * Loops through each request in the queue and attempts to re-fetch it.\n * If any request fails to re-fetch, it's put back in the same position in\n * the queue (which registers a retry for the next sync event).\n */\n async replayRequests() {\n let entry;\n while (entry = await this.shiftRequest()) {\n try {\n await fetch(entry.request.clone());\n\n if (process.env.NODE_ENV !== 'production') {\n logger.log(`Request for '${getFriendlyURL(entry.request.url)}'` +\n `has been replayed in queue '${this._name}'`);\n }\n } catch (error) {\n await this.unshiftRequest(entry);\n\n if (process.env.NODE_ENV !== 'production') {\n logger.log(`Request for '${getFriendlyURL(entry.request.url)}'` +\n `failed to replay, putting it back in queue '${this._name}'`);\n }\n throw new WorkboxError('queue-replay-failed', {name: this._name});\n }\n }\n if (process.env.NODE_ENV !== 'production') {\n logger.log(`All requests in queue '${this.name}' have successfully ` +\n `replayed; the queue is now empty!`);\n }\n }\n\n /**\n * Registers a sync event with a tag unique to this instance.\n */\n async registerSync() {\n if ('sync' in registration) {\n try {\n await registration.sync.register(`${TAG_PREFIX}:${this._name}`);\n } catch (err) {\n // This means the registration failed for some reason, possibly due to\n // the user disabling it.\n if (process.env.NODE_ENV !== 'production') {\n logger.warn(\n `Unable to register sync event for '${this._name}'.`, err);\n }\n }\n }\n }\n\n /**\n * In sync-supporting browsers, this adds a listener for the sync event.\n * In non-sync-supporting browsers, this will retry the queue on service\n * worker startup.\n *\n * @private\n */\n _addSyncListener() {\n if ('sync' in registration) {\n self.addEventListener('sync', (event) => {\n if (event.tag === `${TAG_PREFIX}:${this._name}`) {\n if (process.env.NODE_ENV !== 'production') {\n logger.log(`Background sync for tag '${event.tag}'` +\n `has been received`);\n }\n\n const syncComplete = async () => {\n this._syncInProgress = true;\n\n let syncError;\n try {\n await this._onSync({queue: this});\n } catch (error) {\n syncError = error;\n\n // Rethrow the error. Note: the logic in the finally clause\n // will run before this gets rethrown.\n throw syncError;\n } finally {\n // New items may have been added to the queue during the sync,\n // so we need to register for a new sync if that's happened...\n // Unless there was an error during the sync, in which\n // case the browser will automatically retry later, as long\n // as `event.lastChance` is not true.\n if (this._requestsAddedDuringSync &&\n !(syncError && !event.lastChance)) {\n await this.registerSync();\n }\n\n this._syncInProgress = false;\n this._requestsAddedDuringSync = false;\n }\n };\n event.waitUntil(syncComplete());\n }\n });\n } else {\n if (process.env.NODE_ENV !== 'production') {\n logger.log(`Background sync replaying without background sync event`);\n }\n // If the browser doesn't support background sync, retry\n // every time the service worker starts up as a fallback.\n this._onSync({queue: this});\n }\n }\n\n /**\n * Returns the set of queue names. This is primarily used to reset the list\n * of queue names in tests.\n *\n * @return {Set}\n *\n * @private\n */\n static get _queueNames() {\n return queueNames;\n }\n}\n\n\n/**\n * Converts a QueueStore entry into the format exposed by Queue. This entails\n * converting the request data into a real request and omitting the `id` and\n * `queueName` properties.\n *\n * @param {Object} queueStoreEntry\n * @return {Object}\n * @private\n */\nconst convertEntry = (queueStoreEntry) => {\n const queueEntry = {\n request: new StorableRequest(queueStoreEntry.requestData).toRequest(),\n timestamp: queueStoreEntry.timestamp,\n };\n if (queueStoreEntry.metadata) {\n queueEntry.metadata = queueStoreEntry.metadata;\n }\n return queueEntry;\n};\n\nexport {Queue};\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport {Queue} from './Queue.mjs';\nimport './_version.mjs';\n\n/**\n * A class implementing the `fetchDidFail` lifecycle callback. This makes it\n * easier to add failed requests to a background sync Queue.\n *\n * @memberof workbox.backgroundSync\n */\nclass Plugin {\n /**\n * @param {...*} queueArgs Args to forward to the composed Queue instance.\n * See the [Queue]{@link workbox.backgroundSync.Queue} documentation for\n * parameter details.\n */\n constructor(...queueArgs) {\n this._queue = new Queue(...queueArgs);\n this.fetchDidFail = this.fetchDidFail.bind(this);\n }\n\n /**\n * @param {Object} options\n * @param {Request} options.request\n * @private\n */\n async fetchDidFail({request}) {\n await this._queue.pushRequest({request});\n }\n}\n\nexport {Plugin};\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport {Queue} from './Queue.mjs';\nimport {Plugin} from './Plugin.mjs';\nimport './_version.mjs';\n\n\n/**\n * @namespace workbox.backgroundSync\n */\n\nexport {\n Queue,\n Plugin,\n};\n"],"names":["self","_","e","DB_VERSION","DB_NAME","OBJECT_STORE_NAME","INDEXED_PROP","QueueStore","constructor","queueName","_queueName","_db","DBWrapper","onupgradeneeded","_upgradeDb","pushEntry","entry","assert","isType","moduleName","className","funcName","paramName","requestData","id","add","unshiftEntry","firstEntry","getAllMatching","count","popEntry","_removeEntry","direction","shiftEntry","getAll","index","query","IDBKeyRange","only","deleteEntry","delete","event","db","target","result","oldVersion","objectStoreNames","contains","deleteObjectStore","objStore","createObjectStore","autoIncrement","keyPath","createIndex","unique","serializableProperties","StorableRequest","fromRequest","request","url","headers","method","body","clone","arrayBuffer","key","value","entries","prop","undefined","mode","_requestData","toObject","Object","assign","slice","toRequest","Request","TAG_PREFIX","MAX_RETENTION_TIME","queueNames","Set","Queue","name","onSync","maxRetentionTime","has","WorkboxError","_name","_onSync","replayRequests","_maxRetentionTime","_queueStore","_addSyncListener","pushRequest","isInstance","_addRequest","unshiftRequest","popRequest","_removeRequest","shiftRequest","allEntries","now","Date","unexpiredEntries","maxRetentionTimeInMs","timestamp","push","convertEntry","metadata","operation","storableRequest","logger","log","getFriendlyURL","_syncInProgress","_requestsAddedDuringSync","registerSync","fetch","error","registration","sync","register","err","warn","addEventListener","tag","syncComplete","syncError","queue","lastChance","waitUntil","_queueNames","queueStoreEntry","queueEntry","Plugin","queueArgs","_queue","fetchDidFail","bind"],"mappings":";;;;EAAA,IAAG;EAACA,EAAAA,IAAI,CAAC,+BAAD,CAAJ,IAAuCC,CAAC,EAAxC;EAA2C,CAA/C,CAA+C,OAAMC,CAAN,EAAQ;;ECAvD;;;;;;;AAQA,EAKA,MAAMC,UAAU,GAAG,CAAnB;EACA,MAAMC,OAAO,GAAG,yBAAhB;EACA,MAAMC,iBAAiB,GAAG,UAA1B;EACA,MAAMC,YAAY,GAAG,WAArB;EAEA;;;;;;;AAMA,EAAO,MAAMC,UAAN,CAAiB;EACtB;;;;;;;EAOAC,EAAAA,WAAW,CAACC,SAAD,EAAY;EACrB,SAAKC,UAAL,GAAkBD,SAAlB;EACA,SAAKE,GAAL,GAAW,IAAIC,uBAAJ,CAAcR,OAAd,EAAuBD,UAAvB,EAAmC;EAC5CU,MAAAA,eAAe,EAAE,KAAKC;EADsB,KAAnC,CAAX;EAGD;EAED;;;;;;;;;;;EASA,QAAMC,SAAN,CAAgBC,KAAhB,EAAuB;EACrB,IAA2C;EACzCC,MAAAA,iBAA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ACxC,QAAMC,UAAU,GAAG;EACjB5E,IAAAA,OAAO,EAAE,IAAIF,eAAJ,CAAoB6E,eAAe,CAAC9G,WAApC,EAAiDqD,SAAjD,EADQ;EAEjB8B,IAAAA,SAAS,EAAE2B,eAAe,CAAC3B;EAFV,GAAnB;;EAIA,MAAI2B,eAAe,CAACxB,QAApB,EAA8B;EAC5ByB,IAAAA,UAAU,CAACzB,QAAX,GAAsBwB,eAAe,CAACxB,QAAtC;EACD;;EACD,SAAOyB,UAAP;EACD,CATD;;EC9XA;;;;;;;AAQA,EAGA;;;;;;;EAMA,MAAMC,MAAN,CAAa;EACX;;;;;EAKA/H,EAAAA,WAAW,CAAC,GAAGgI,SAAJ,EAAe;EACxB,SAAKC,MAAL,GAAc,IAAIvD,KAAJ,CAAU,GAAGsD,SAAb,CAAd;EACA,SAAKE,YAAL,GAAoB,KAAKA,YAAL,CAAkBC,IAAlB,CAAuB,IAAvB,CAApB;EACD;EAED;;;;;;;EAKA,QAAMD,YAAN,CAAmB;EAAChF,IAAAA;EAAD,GAAnB,EAA8B;EAC5B,UAAM,KAAK+E,MAAL,CAAY3C,WAAZ,CAAwB;EAACpC,MAAAA;EAAD,KAAxB,CAAN;EACD;;EAlBU;;ECjBb;;;;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/workbox-v4.3.1/workbox-background-sync.prod.js b/workbox-v4.3.1/workbox-background-sync.prod.js new file mode 100644 index 0000000000..9c9051ade1 --- /dev/null +++ b/workbox-v4.3.1/workbox-background-sync.prod.js @@ -0,0 +1,2 @@ +this.workbox=this.workbox||{},this.workbox.backgroundSync=function(t,e,s){"use strict";try{self["workbox:background-sync:4.3.1"]&&_()}catch(t){}const i=3,n="workbox-background-sync",a="requests",r="queueName";class c{constructor(t){this.t=t,this.s=new s.DBWrapper(n,i,{onupgradeneeded:this.i})}async pushEntry(t){delete t.id,t.queueName=this.t,await this.s.add(a,t)}async unshiftEntry(t){const[e]=await this.s.getAllMatching(a,{count:1});e?t.id=e.id-1:delete t.id,t.queueName=this.t,await this.s.add(a,t)}async popEntry(){return this.h({direction:"prev"})}async shiftEntry(){return this.h({direction:"next"})}async getAll(){return await this.s.getAllMatching(a,{index:r,query:IDBKeyRange.only(this.t)})}async deleteEntry(t){await this.s.delete(a,t)}async h({direction:t}){const[e]=await this.s.getAllMatching(a,{direction:t,index:r,query:IDBKeyRange.only(this.t),count:1});if(e)return await this.deleteEntry(e.id),e}i(t){const e=t.target.result;t.oldVersion>0&&t.oldVersiont?await this.m.deleteEntry(i.id):s.push(f(i))}return s}async g({request:t,metadata:e,timestamp:s=Date.now()},i){const n={requestData:(await o.fromRequest(t.clone())).toObject(),timestamp:s};e&&(n.metadata=e),await this.m[`${i}Entry`](n),this.k?this.D=!0:await this.registerSync()}async R(t){const e=Date.now(),s=await this.m[`${t}Entry`]();if(s){const i=60*this.q*1e3;return e-s.timestamp>i?this.R(t):f(s)}}async replayRequests(){let t;for(;t=await this.shiftRequest();)try{await fetch(t.request.clone())}catch(s){throw await this.unshiftRequest(t),new e.WorkboxError("queue-replay-failed",{name:this.u})}}async registerSync(){if("sync"in registration)try{await registration.sync.register(`${u}:${this.u}`)}catch(t){}}p(){"sync"in registration?self.addEventListener("sync",t=>{if(t.tag===`${u}:${this.u}`){const e=async()=>{let e;this.k=!0;try{await this.l({queue:this})}catch(t){throw e=t}finally{!this.D||e&&!t.lastChance||await this.registerSync(),this.k=!1,this.D=!1}};t.waitUntil(e())}}):this.l({queue:this})}static get _(){return w}}const f=t=>{const e={request:new o(t.requestData).toRequest(),timestamp:t.timestamp};return t.metadata&&(e.metadata=t.metadata),e};return t.Queue=d,t.Plugin=class{constructor(...t){this.v=new d(...t),this.fetchDidFail=this.fetchDidFail.bind(this)}async fetchDidFail({request:t}){await this.v.pushRequest({request:t})}},t}({},workbox.core._private,workbox.core._private); +//# sourceMappingURL=workbox-background-sync.prod.js.map diff --git a/workbox-v4.3.1/workbox-background-sync.prod.js.map b/workbox-v4.3.1/workbox-background-sync.prod.js.map new file mode 100644 index 0000000000..4064edb649 --- /dev/null +++ b/workbox-v4.3.1/workbox-background-sync.prod.js.map @@ -0,0 +1 @@ +{"version":3,"file":"workbox-background-sync.prod.js","sources":["../_version.mjs","../lib/QueueStore.mjs","../lib/StorableRequest.mjs","../Queue.mjs","../Plugin.mjs"],"sourcesContent":["try{self['workbox:background-sync:4.3.1']&&_()}catch(e){}// eslint-disable-line","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport {assert} from 'workbox-core/_private/assert.mjs';\nimport {DBWrapper} from 'workbox-core/_private/DBWrapper.mjs';\nimport '../_version.mjs';\n\n\nconst DB_VERSION = 3;\nconst DB_NAME = 'workbox-background-sync';\nconst OBJECT_STORE_NAME = 'requests';\nconst INDEXED_PROP = 'queueName';\n\n/**\n * A class to manage storing requests from a Queue in IndexedbDB,\n * indexed by their queue name for easier access.\n *\n * @private\n */\nexport class QueueStore {\n /**\n * Associates this instance with a Queue instance, so entries added can be\n * identified by their queue name.\n *\n * @param {string} queueName\n * @private\n */\n constructor(queueName) {\n this._queueName = queueName;\n this._db = new DBWrapper(DB_NAME, DB_VERSION, {\n onupgradeneeded: this._upgradeDb,\n });\n }\n\n /**\n * Append an entry last in the queue.\n *\n * @param {Object} entry\n * @param {Object} entry.requestData\n * @param {number} [entry.timestamp]\n * @param {Object} [entry.metadata]\n * @private\n */\n async pushEntry(entry) {\n if (process.env.NODE_ENV !== 'production') {\n assert.isType(entry, 'object', {\n moduleName: 'workbox-background-sync',\n className: 'QueueStore',\n funcName: 'pushEntry',\n paramName: 'entry',\n });\n assert.isType(entry.requestData, 'object', {\n moduleName: 'workbox-background-sync',\n className: 'QueueStore',\n funcName: 'pushEntry',\n paramName: 'entry.requestData',\n });\n }\n\n // Don't specify an ID since one is automatically generated.\n delete entry.id;\n entry.queueName = this._queueName;\n\n await this._db.add(OBJECT_STORE_NAME, entry);\n }\n\n /**\n * Preppend an entry first in the queue.\n *\n * @param {Object} entry\n * @param {Object} entry.requestData\n * @param {number} [entry.timestamp]\n * @param {Object} [entry.metadata]\n * @private\n */\n async unshiftEntry(entry) {\n if (process.env.NODE_ENV !== 'production') {\n assert.isType(entry, 'object', {\n moduleName: 'workbox-background-sync',\n className: 'QueueStore',\n funcName: 'unshiftEntry',\n paramName: 'entry',\n });\n assert.isType(entry.requestData, 'object', {\n moduleName: 'workbox-background-sync',\n className: 'QueueStore',\n funcName: 'unshiftEntry',\n paramName: 'entry.requestData',\n });\n }\n\n const [firstEntry] = await this._db.getAllMatching(OBJECT_STORE_NAME, {\n count: 1,\n });\n\n if (firstEntry) {\n // Pick an ID one less than the lowest ID in the object store.\n entry.id = firstEntry.id - 1;\n } else {\n // Otherwise let the auto-incrementor assign the ID.\n delete entry.id;\n }\n entry.queueName = this._queueName;\n\n await this._db.add(OBJECT_STORE_NAME, entry);\n }\n\n /**\n * Removes and returns the last entry in the queue matching the `queueName`.\n *\n * @return {Promise}\n * @private\n */\n async popEntry() {\n return this._removeEntry({direction: 'prev'});\n }\n\n /**\n * Removes and returns the first entry in the queue matching the `queueName`.\n *\n * @return {Promise}\n * @private\n */\n async shiftEntry() {\n return this._removeEntry({direction: 'next'});\n }\n\n /**\n * Returns all entries in the store matching the `queueName`.\n *\n * @param {Object} options See workbox.backgroundSync.Queue~getAll}\n * @return {Promise>}\n * @private\n */\n async getAll() {\n return await this._db.getAllMatching(OBJECT_STORE_NAME, {\n index: INDEXED_PROP,\n query: IDBKeyRange.only(this._queueName),\n });\n }\n\n /**\n * Deletes the entry for the given ID.\n *\n * WARNING: this method does not ensure the deleted enry belongs to this\n * queue (i.e. matches the `queueName`). But this limitation is acceptable\n * as this class is not publicly exposed. An additional check would make\n * this method slower than it needs to be.\n *\n * @private\n * @param {number} id\n */\n async deleteEntry(id) {\n await this._db.delete(OBJECT_STORE_NAME, id);\n }\n\n /**\n * Removes and returns the first or last entry in the queue (based on the\n * `direction` argument) matching the `queueName`.\n *\n * @return {Promise}\n * @private\n */\n async _removeEntry({direction}) {\n const [entry] = await this._db.getAllMatching(OBJECT_STORE_NAME, {\n direction,\n index: INDEXED_PROP,\n query: IDBKeyRange.only(this._queueName),\n count: 1,\n });\n\n if (entry) {\n await this.deleteEntry(entry.id);\n return entry;\n }\n }\n\n /**\n * Upgrades the database given an `upgradeneeded` event.\n *\n * @param {Event} event\n * @private\n */\n _upgradeDb(event) {\n const db = event.target.result;\n\n if (event.oldVersion > 0 && event.oldVersion < DB_VERSION) {\n if (db.objectStoreNames.contains(OBJECT_STORE_NAME)) {\n db.deleteObjectStore(OBJECT_STORE_NAME);\n }\n }\n\n const objStore = db.createObjectStore(OBJECT_STORE_NAME, {\n autoIncrement: true,\n keyPath: 'id',\n });\n objStore.createIndex(INDEXED_PROP, INDEXED_PROP, {unique: false});\n }\n}\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport {assert} from 'workbox-core/_private/assert.mjs';\nimport '../_version.mjs';\n\n\nconst serializableProperties = [\n 'method',\n 'referrer',\n 'referrerPolicy',\n 'mode',\n 'credentials',\n 'cache',\n 'redirect',\n 'integrity',\n 'keepalive',\n];\n\n\n/**\n * A class to make it easier to serialize and de-serialize requests so they\n * can be stored in IndexedDB.\n *\n * @private\n */\nclass StorableRequest {\n /**\n * Converts a Request object to a plain object that can be structured\n * cloned or JSON-stringified.\n *\n * @param {Request} request\n * @return {Promise}\n *\n * @private\n */\n static async fromRequest(request) {\n const requestData = {\n url: request.url,\n headers: {},\n };\n\n // Set the body if present.\n if (request.method !== 'GET') {\n // Use ArrayBuffer to support non-text request bodies.\n // NOTE: we can't use Blobs becuse Safari doesn't support storing\n // Blobs in IndexedDB in some cases:\n // https://github.com/dfahlander/Dexie.js/issues/618#issuecomment-398348457\n requestData.body = await request.clone().arrayBuffer();\n }\n\n // Convert the headers from an iterable to an object.\n for (const [key, value] of request.headers.entries()) {\n requestData.headers[key] = value;\n }\n\n // Add all other serializable request properties\n for (const prop of serializableProperties) {\n if (request[prop] !== undefined) {\n requestData[prop] = request[prop];\n }\n }\n\n return new StorableRequest(requestData);\n }\n\n /**\n * Accepts an object of request data that can be used to construct a\n * `Request` but can also be stored in IndexedDB.\n *\n * @param {Object} requestData An object of request data that includes the\n * `url` plus any relevant properties of\n * [requestInit]{@link https://fetch.spec.whatwg.org/#requestinit}.\n * @private\n */\n constructor(requestData) {\n if (process.env.NODE_ENV !== 'production') {\n assert.isType(requestData, 'object', {\n moduleName: 'workbox-background-sync',\n className: 'StorableRequest',\n funcName: 'constructor',\n paramName: 'requestData',\n });\n assert.isType(requestData.url, 'string', {\n moduleName: 'workbox-background-sync',\n className: 'StorableRequest',\n funcName: 'constructor',\n paramName: 'requestData.url',\n });\n }\n\n // If the request's mode is `navigate`, convert it to `same-origin` since\n // navigation requests can't be constructed via script.\n if (requestData.mode === 'navigate') {\n requestData.mode = 'same-origin';\n }\n\n this._requestData = requestData;\n }\n\n /**\n * Returns a deep clone of the instances `_requestData` object.\n *\n * @return {Object}\n *\n * @private\n */\n toObject() {\n const requestData = Object.assign({}, this._requestData);\n requestData.headers = Object.assign({}, this._requestData.headers);\n if (requestData.body) {\n requestData.body = requestData.body.slice(0);\n }\n\n return requestData;\n }\n\n /**\n * Converts this instance to a Request.\n *\n * @return {Request}\n *\n * @private\n */\n toRequest() {\n return new Request(this._requestData.url, this._requestData);\n }\n\n /**\n * Creates and returns a deep clone of the instance.\n *\n * @return {StorableRequest}\n *\n * @private\n */\n clone() {\n return new StorableRequest(this.toObject());\n }\n}\n\nexport {StorableRequest};\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport {WorkboxError} from 'workbox-core/_private/WorkboxError.mjs';\nimport {logger} from 'workbox-core/_private/logger.mjs';\nimport {assert} from 'workbox-core/_private/assert.mjs';\nimport {getFriendlyURL} from 'workbox-core/_private/getFriendlyURL.mjs';\nimport {QueueStore} from './lib/QueueStore.mjs';\nimport {StorableRequest} from './lib/StorableRequest.mjs';\nimport './_version.mjs';\n\n\nconst TAG_PREFIX = 'workbox-background-sync';\nconst MAX_RETENTION_TIME = 60 * 24 * 7; // 7 days in minutes\n\nconst queueNames = new Set();\n\n/**\n * A class to manage storing failed requests in IndexedDB and retrying them\n * later. All parts of the storing and replaying process are observable via\n * callbacks.\n *\n * @memberof workbox.backgroundSync\n */\nclass Queue {\n /**\n * Creates an instance of Queue with the given options\n *\n * @param {string} name The unique name for this queue. This name must be\n * unique as it's used to register sync events and store requests\n * in IndexedDB specific to this instance. An error will be thrown if\n * a duplicate name is detected.\n * @param {Object} [options]\n * @param {Function} [options.onSync] A function that gets invoked whenever\n * the 'sync' event fires. The function is invoked with an object\n * containing the `queue` property (referencing this instance), and you\n * can use the callback to customize the replay behavior of the queue.\n * When not set the `replayRequests()` method is called.\n * Note: if the replay fails after a sync event, make sure you throw an\n * error, so the browser knows to retry the sync event later.\n * @param {number} [options.maxRetentionTime=7 days] The amount of time (in\n * minutes) a request may be retried. After this amount of time has\n * passed, the request will be deleted from the queue.\n */\n constructor(name, {onSync, maxRetentionTime} = {}) {\n // Ensure the store name is not already being used\n if (queueNames.has(name)) {\n throw new WorkboxError('duplicate-queue-name', {name});\n } else {\n queueNames.add(name);\n }\n\n this._name = name;\n this._onSync = onSync || this.replayRequests;\n this._maxRetentionTime = maxRetentionTime || MAX_RETENTION_TIME;\n this._queueStore = new QueueStore(this._name);\n\n this._addSyncListener();\n }\n\n /**\n * @return {string}\n */\n get name() {\n return this._name;\n }\n\n /**\n * Stores the passed request in IndexedDB (with its timestamp and any\n * metadata) at the end of the queue.\n *\n * @param {Object} entry\n * @param {Request} entry.request The request to store in the queue.\n * @param {Object} [entry.metadata] Any metadata you want associated with the\n * stored request. When requests are replayed you'll have access to this\n * metadata object in case you need to modify the request beforehand.\n * @param {number} [entry.timestamp] The timestamp (Epoch time in\n * milliseconds) when the request was first added to the queue. This is\n * used along with `maxRetentionTime` to remove outdated requests. In\n * general you don't need to set this value, as it's automatically set\n * for you (defaulting to `Date.now()`), but you can update it if you\n * don't want particular requests to expire.\n */\n async pushRequest(entry) {\n if (process.env.NODE_ENV !== 'production') {\n assert.isType(entry, 'object', {\n moduleName: 'workbox-background-sync',\n className: 'Queue',\n funcName: 'pushRequest',\n paramName: 'entry',\n });\n assert.isInstance(entry.request, Request, {\n moduleName: 'workbox-background-sync',\n className: 'Queue',\n funcName: 'pushRequest',\n paramName: 'entry.request',\n });\n }\n\n await this._addRequest(entry, 'push');\n }\n\n /**\n * Stores the passed request in IndexedDB (with its timestamp and any\n * metadata) at the beginning of the queue.\n *\n * @param {Object} entry\n * @param {Request} entry.request The request to store in the queue.\n * @param {Object} [entry.metadata] Any metadata you want associated with the\n * stored request. When requests are replayed you'll have access to this\n * metadata object in case you need to modify the request beforehand.\n * @param {number} [entry.timestamp] The timestamp (Epoch time in\n * milliseconds) when the request was first added to the queue. This is\n * used along with `maxRetentionTime` to remove outdated requests. In\n * general you don't need to set this value, as it's automatically set\n * for you (defaulting to `Date.now()`), but you can update it if you\n * don't want particular requests to expire.\n */\n async unshiftRequest(entry) {\n if (process.env.NODE_ENV !== 'production') {\n assert.isType(entry, 'object', {\n moduleName: 'workbox-background-sync',\n className: 'Queue',\n funcName: 'unshiftRequest',\n paramName: 'entry',\n });\n assert.isInstance(entry.request, Request, {\n moduleName: 'workbox-background-sync',\n className: 'Queue',\n funcName: 'unshiftRequest',\n paramName: 'entry.request',\n });\n }\n\n await this._addRequest(entry, 'unshift');\n }\n\n /**\n * Removes and returns the last request in the queue (along with its\n * timestamp and any metadata). The returned object takes the form:\n * `{request, timestamp, metadata}`.\n *\n * @return {Promise}\n */\n async popRequest() {\n return this._removeRequest('pop');\n }\n\n /**\n * Removes and returns the first request in the queue (along with its\n * timestamp and any metadata). The returned object takes the form:\n * `{request, timestamp, metadata}`.\n *\n * @return {Promise}\n */\n async shiftRequest() {\n return this._removeRequest('shift');\n }\n\n /**\n * Returns all the entries that have not expired (per `maxRetentionTime`).\n * Any expired entries are removed from the queue.\n *\n * @return {Promise>}\n */\n async getAll() {\n const allEntries = await this._queueStore.getAll();\n const now = Date.now();\n\n const unexpiredEntries = [];\n for (const entry of allEntries) {\n // Ignore requests older than maxRetentionTime. Call this function\n // recursively until an unexpired request is found.\n const maxRetentionTimeInMs = this._maxRetentionTime * 60 * 1000;\n if (now - entry.timestamp > maxRetentionTimeInMs) {\n await this._queueStore.deleteEntry(entry.id);\n } else {\n unexpiredEntries.push(convertEntry(entry));\n }\n }\n\n return unexpiredEntries;\n }\n\n\n /**\n * Adds the entry to the QueueStore and registers for a sync event.\n *\n * @param {Object} entry\n * @param {Request} entry.request\n * @param {Object} [entry.metadata]\n * @param {number} [entry.timestamp=Date.now()]\n * @param {string} operation ('push' or 'unshift')\n * @private\n */\n async _addRequest(\n {request, metadata, timestamp = Date.now()}, operation) {\n const storableRequest = await StorableRequest.fromRequest(request.clone());\n const entry = {\n requestData: storableRequest.toObject(),\n timestamp,\n };\n\n // Only include metadata if it's present.\n if (metadata) {\n entry.metadata = metadata;\n }\n\n await this._queueStore[`${operation}Entry`](entry);\n\n if (process.env.NODE_ENV !== 'production') {\n logger.log(`Request for '${getFriendlyURL(request.url)}' has ` +\n `been added to background sync queue '${this._name}'.`);\n }\n\n // Don't register for a sync if we're in the middle of a sync. Instead,\n // we wait until the sync is complete and call register if\n // `this._requestsAddedDuringSync` is true.\n if (this._syncInProgress) {\n this._requestsAddedDuringSync = true;\n } else {\n await this.registerSync();\n }\n }\n\n /**\n * Removes and returns the first or last (depending on `operation`) entry\n * from the QueueStore that's not older than the `maxRetentionTime`.\n *\n * @param {string} operation ('pop' or 'shift')\n * @return {Object|undefined}\n * @private\n */\n async _removeRequest(operation) {\n const now = Date.now();\n const entry = await this._queueStore[`${operation}Entry`]();\n\n if (entry) {\n // Ignore requests older than maxRetentionTime. Call this function\n // recursively until an unexpired request is found.\n const maxRetentionTimeInMs = this._maxRetentionTime * 60 * 1000;\n if (now - entry.timestamp > maxRetentionTimeInMs) {\n return this._removeRequest(operation);\n }\n\n return convertEntry(entry);\n }\n }\n\n /**\n * Loops through each request in the queue and attempts to re-fetch it.\n * If any request fails to re-fetch, it's put back in the same position in\n * the queue (which registers a retry for the next sync event).\n */\n async replayRequests() {\n let entry;\n while (entry = await this.shiftRequest()) {\n try {\n await fetch(entry.request.clone());\n\n if (process.env.NODE_ENV !== 'production') {\n logger.log(`Request for '${getFriendlyURL(entry.request.url)}'` +\n `has been replayed in queue '${this._name}'`);\n }\n } catch (error) {\n await this.unshiftRequest(entry);\n\n if (process.env.NODE_ENV !== 'production') {\n logger.log(`Request for '${getFriendlyURL(entry.request.url)}'` +\n `failed to replay, putting it back in queue '${this._name}'`);\n }\n throw new WorkboxError('queue-replay-failed', {name: this._name});\n }\n }\n if (process.env.NODE_ENV !== 'production') {\n logger.log(`All requests in queue '${this.name}' have successfully ` +\n `replayed; the queue is now empty!`);\n }\n }\n\n /**\n * Registers a sync event with a tag unique to this instance.\n */\n async registerSync() {\n if ('sync' in registration) {\n try {\n await registration.sync.register(`${TAG_PREFIX}:${this._name}`);\n } catch (err) {\n // This means the registration failed for some reason, possibly due to\n // the user disabling it.\n if (process.env.NODE_ENV !== 'production') {\n logger.warn(\n `Unable to register sync event for '${this._name}'.`, err);\n }\n }\n }\n }\n\n /**\n * In sync-supporting browsers, this adds a listener for the sync event.\n * In non-sync-supporting browsers, this will retry the queue on service\n * worker startup.\n *\n * @private\n */\n _addSyncListener() {\n if ('sync' in registration) {\n self.addEventListener('sync', (event) => {\n if (event.tag === `${TAG_PREFIX}:${this._name}`) {\n if (process.env.NODE_ENV !== 'production') {\n logger.log(`Background sync for tag '${event.tag}'` +\n `has been received`);\n }\n\n const syncComplete = async () => {\n this._syncInProgress = true;\n\n let syncError;\n try {\n await this._onSync({queue: this});\n } catch (error) {\n syncError = error;\n\n // Rethrow the error. Note: the logic in the finally clause\n // will run before this gets rethrown.\n throw syncError;\n } finally {\n // New items may have been added to the queue during the sync,\n // so we need to register for a new sync if that's happened...\n // Unless there was an error during the sync, in which\n // case the browser will automatically retry later, as long\n // as `event.lastChance` is not true.\n if (this._requestsAddedDuringSync &&\n !(syncError && !event.lastChance)) {\n await this.registerSync();\n }\n\n this._syncInProgress = false;\n this._requestsAddedDuringSync = false;\n }\n };\n event.waitUntil(syncComplete());\n }\n });\n } else {\n if (process.env.NODE_ENV !== 'production') {\n logger.log(`Background sync replaying without background sync event`);\n }\n // If the browser doesn't support background sync, retry\n // every time the service worker starts up as a fallback.\n this._onSync({queue: this});\n }\n }\n\n /**\n * Returns the set of queue names. This is primarily used to reset the list\n * of queue names in tests.\n *\n * @return {Set}\n *\n * @private\n */\n static get _queueNames() {\n return queueNames;\n }\n}\n\n\n/**\n * Converts a QueueStore entry into the format exposed by Queue. This entails\n * converting the request data into a real request and omitting the `id` and\n * `queueName` properties.\n *\n * @param {Object} queueStoreEntry\n * @return {Object}\n * @private\n */\nconst convertEntry = (queueStoreEntry) => {\n const queueEntry = {\n request: new StorableRequest(queueStoreEntry.requestData).toRequest(),\n timestamp: queueStoreEntry.timestamp,\n };\n if (queueStoreEntry.metadata) {\n queueEntry.metadata = queueStoreEntry.metadata;\n }\n return queueEntry;\n};\n\nexport {Queue};\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport {Queue} from './Queue.mjs';\nimport './_version.mjs';\n\n/**\n * A class implementing the `fetchDidFail` lifecycle callback. This makes it\n * easier to add failed requests to a background sync Queue.\n *\n * @memberof workbox.backgroundSync\n */\nclass Plugin {\n /**\n * @param {...*} queueArgs Args to forward to the composed Queue instance.\n * See the [Queue]{@link workbox.backgroundSync.Queue} documentation for\n * parameter details.\n */\n constructor(...queueArgs) {\n this._queue = new Queue(...queueArgs);\n this.fetchDidFail = this.fetchDidFail.bind(this);\n }\n\n /**\n * @param {Object} options\n * @param {Request} options.request\n * @private\n */\n async fetchDidFail({request}) {\n await this._queue.pushRequest({request});\n }\n}\n\nexport {Plugin};\n"],"names":["self","_","e","DB_VERSION","DB_NAME","OBJECT_STORE_NAME","INDEXED_PROP","QueueStore","constructor","queueName","_queueName","_db","DBWrapper","onupgradeneeded","this","_upgradeDb","entry","id","add","firstEntry","getAllMatching","count","_removeEntry","direction","index","query","IDBKeyRange","only","delete","deleteEntry","event","db","target","result","oldVersion","objectStoreNames","contains","deleteObjectStore","createObjectStore","autoIncrement","keyPath","createIndex","unique","serializableProperties","StorableRequest","request","requestData","url","headers","method","body","clone","arrayBuffer","key","value","entries","prop","undefined","mode","_requestData","toObject","Object","assign","slice","toRequest","Request","TAG_PREFIX","MAX_RETENTION_TIME","queueNames","Set","Queue","name","onSync","maxRetentionTime","has","WorkboxError","_name","_onSync","replayRequests","_maxRetentionTime","_queueStore","_addSyncListener","_addRequest","_removeRequest","allEntries","getAll","now","Date","unexpiredEntries","maxRetentionTimeInMs","timestamp","push","convertEntry","metadata","operation","fromRequest","_syncInProgress","_requestsAddedDuringSync","registerSync","shiftRequest","fetch","error","unshiftRequest","registration","sync","register","err","addEventListener","tag","syncComplete","async","syncError","queue","lastChance","waitUntil","queueStoreEntry","queueEntry","queueArgs","_queue","fetchDidFail","bind","pushRequest"],"mappings":"uFAAA,IAAIA,KAAK,kCAAkCC,IAAI,MAAMC,ICarD,MAAMC,EAAa,EACbC,EAAU,0BACVC,EAAoB,WACpBC,EAAe,YAQd,MAAMC,EAQXC,YAAYC,QACLC,EAAaD,OACbE,EAAM,IAAIC,YAAUR,EAASD,EAAY,CAC5CU,gBAAiBC,KAAKC,oBAaVC,UAiBPA,EAAMC,GACbD,EAAMP,UAAYK,KAAKJ,QAEjBI,KAAKH,EAAIO,IAAIb,EAAmBW,sBAYrBA,SAgBVG,SAAoBL,KAAKH,EAAIS,eAAef,EAAmB,CACpEgB,M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GAA2B,QAE1BnF,KAAKoF,uBAYMJ,SACbR,EAAMC,KAAKD,MACXtE,QAAcF,KAAKkE,KAAec,eAEpC9E,EAAO,OAGHyE,EAAgD,GAAzB3E,KAAKiE,EAAyB,WACvDO,EAAMtE,EAAM0E,UAAYD,EACnB3E,KAAKqE,EAAeW,GAGtBF,EAAa5E,+BAUlBA,OACGA,QAAcF,KAAKqF,0BAEhBC,MAAMpF,EAAM6B,QAAQM,SAM1B,MAAOkD,eACDvF,KAAKwF,eAAetF,GAMpB,IAAI2D,eAAa,sBAAuB,CAACJ,KAAMzD,KAAK8D,6BAa1D,SAAU2B,uBAEJA,aAAaC,KAAKC,YAAYvC,KAAcpD,KAAK8D,KACvD,MAAO8B,KAkBbzB,IACM,SAAUsB,aACZvG,KAAK2G,iBAAiB,OAAS7E,OACzBA,EAAM8E,SAAW1C,KAAcpD,KAAK8D,IAAS,OAMzCiC,EAAeC,cAGfC,OAFCf,GAAkB,YAIflF,KAAK+D,EAAQ,CAACmC,MAAOlG,OAC3B,MAAOuF,SACPU,EAAYV,WAWRvF,KAAKmF,GACHc,IAAcjF,EAAMmF,kBAClBnG,KAAKoF,oBAGRF,GAAkB,OAClBC,GAA2B,IAGpCnE,EAAMoF,UAAUL,aASfhC,EAAQ,CAACmC,MAAOlG,6BAahBsD,GAcX,MAAMwB,EAAgBuB,UACdC,EAAa,CACjBvE,QAAS,IAAID,EAAgBuE,EAAgBrE,aAAakB,YAC1D0B,UAAWyB,EAAgBzB,kBAEzByB,EAAgBtB,WAClBuB,EAAWvB,SAAWsB,EAAgBtB,UAEjCuB,6BCrXT,MAME5G,eAAe6G,QACRC,EAAS,IAAIhD,KAAS+C,QACtBE,aAAezG,KAAKyG,aAAaC,KAAK1G,0BAQ1B+B,QAACA,UACZ/B,KAAKwG,EAAOG,YAAY,CAAC5E,QAAAA"} \ No newline at end of file diff --git a/workbox-v4.3.1/workbox-broadcast-update.dev.js b/workbox-v4.3.1/workbox-broadcast-update.dev.js new file mode 100644 index 0000000000..79beb38aa4 --- /dev/null +++ b/workbox-v4.3.1/workbox-broadcast-update.dev.js @@ -0,0 +1,496 @@ +this.workbox = this.workbox || {}; +this.workbox.broadcastUpdate = (function (exports, assert_mjs, getFriendlyURL_mjs, logger_mjs, Deferred_mjs, WorkboxError_mjs) { + 'use strict'; + + try { + self['workbox:broadcast-update:4.3.1'] && _(); + } catch (e) {} // eslint-disable-line + + /* + Copyright 2018 Google LLC + + Use of this source code is governed by an MIT-style + license that can be found in the LICENSE file or at + https://opensource.org/licenses/MIT. + */ + /** + * Given two `Response's`, compares several header values to see if they are + * the same or not. + * + * @param {Response} firstResponse + * @param {Response} secondResponse + * @param {Array} headersToCheck + * @return {boolean} + * + * @memberof workbox.broadcastUpdate + * @private + */ + + const responsesAreSame = (firstResponse, secondResponse, headersToCheck) => { + { + if (!(firstResponse instanceof Response && secondResponse instanceof Response)) { + throw new WorkboxError_mjs.WorkboxError('invalid-responses-are-same-args'); + } + } + + const atLeastOneHeaderAvailable = headersToCheck.some(header => { + return firstResponse.headers.has(header) && secondResponse.headers.has(header); + }); + + if (!atLeastOneHeaderAvailable) { + { + logger_mjs.logger.warn(`Unable to determine where the response has been updated ` + `because none of the headers that would be checked are present.`); + logger_mjs.logger.debug(`Attempting to compare the following: `, firstResponse, secondResponse, headersToCheck); + } // Just return true, indicating the that responses are the same, since we + // can't determine otherwise. + + + return true; + } + + return headersToCheck.every(header => { + const headerStateComparison = firstResponse.headers.has(header) === secondResponse.headers.has(header); + const headerValueComparison = firstResponse.headers.get(header) === secondResponse.headers.get(header); + return headerStateComparison && headerValueComparison; + }); + }; + + /* + Copyright 2018 Google LLC + + Use of this source code is governed by an MIT-style + license that can be found in the LICENSE file or at + https://opensource.org/licenses/MIT. + */ + const CACHE_UPDATED_MESSAGE_TYPE = 'CACHE_UPDATED'; + const CACHE_UPDATED_MESSAGE_META = 'workbox-broadcast-update'; + const DEFAULT_BROADCAST_CHANNEL_NAME = 'workbox'; + const DEFAULT_DEFER_NOTIFICATION_TIMEOUT = 10000; + const DEFAULT_HEADERS_TO_CHECK = ['content-length', 'etag', 'last-modified']; + + /* + Copyright 2018 Google LLC + + Use of this source code is governed by an MIT-style + license that can be found in the LICENSE file or at + https://opensource.org/licenses/MIT. + */ + /** + * You would not normally call this method directly; it's called automatically + * by an instance of the {@link BroadcastCacheUpdate} class. It's exposed here + * for the benefit of developers who would rather not use the full + * `BroadcastCacheUpdate` implementation. + * + * Calling this will dispatch a message on the provided + * {@link https://developers.google.com/web/updates/2016/09/broadcastchannel|Broadcast Channel} + * to notify interested subscribers about a change to a cached resource. + * + * The message that's posted has a formation inspired by the + * [Flux standard action](https://github.com/acdlite/flux-standard-action#introduction) + * format like so: + * + * ``` + * { + * type: 'CACHE_UPDATED', + * meta: 'workbox-broadcast-update', + * payload: { + * cacheName: 'the-cache-name', + * updatedURL: 'https://example.com/' + * } + * } + * ``` + * + * (Usage of [Flux](https://facebook.github.io/flux/) itself is not at + * all required.) + * + * @param {Object} options + * @param {string} options.cacheName The name of the cache in which the updated + * `Response` was stored. + * @param {string} options.url The URL associated with the updated `Response`. + * @param {BroadcastChannel} [options.channel] The `BroadcastChannel` to use. + * If no channel is set or the browser doesn't support the BroadcastChannel + * api, then an attempt will be made to `postMessage` each window client. + * + * @memberof workbox.broadcastUpdate + */ + + const broadcastUpdate = async ({ + channel, + cacheName, + url + }) => { + { + assert_mjs.assert.isType(cacheName, 'string', { + moduleName: 'workbox-broadcast-update', + className: '~', + funcName: 'broadcastUpdate', + paramName: 'cacheName' + }); + assert_mjs.assert.isType(url, 'string', { + moduleName: 'workbox-broadcast-update', + className: '~', + funcName: 'broadcastUpdate', + paramName: 'url' + }); + } + + const data = { + type: CACHE_UPDATED_MESSAGE_TYPE, + meta: CACHE_UPDATED_MESSAGE_META, + payload: { + cacheName: cacheName, + updatedURL: url + } + }; + + if (channel) { + channel.postMessage(data); + } else { + const windows = await clients.matchAll({ + type: 'window' + }); + + for (const win of windows) { + win.postMessage(data); + } + } + }; + + /* + Copyright 2018 Google LLC + + Use of this source code is governed by an MIT-style + license that can be found in the LICENSE file or at + https://opensource.org/licenses/MIT. + */ + /** + * Uses the [Broadcast Channel API]{@link https://developers.google.com/web/updates/2016/09/broadcastchannel} + * to notify interested parties when a cached response has been updated. + * In browsers that do not support the Broadcast Channel API, the instance + * falls back to sending the update via `postMessage()` to all window clients. + * + * For efficiency's sake, the underlying response bodies are not compared; + * only specific response headers are checked. + * + * @memberof workbox.broadcastUpdate + */ + + class BroadcastCacheUpdate { + /** + * Construct a BroadcastCacheUpdate instance with a specific `channelName` to + * broadcast messages on + * + * @param {Object} options + * @param {Array} + * [options.headersToCheck=['content-length', 'etag', 'last-modified']] + * A list of headers that will be used to determine whether the responses + * differ. + * @param {string} [options.channelName='workbox'] The name that will be used + *. when creating the `BroadcastChannel`, which defaults to 'workbox' (the + * channel name used by the `workbox-window` package). + * @param {string} [options.deferNoticationTimeout=10000] The amount of time + * to wait for a ready message from the window on navigation requests + * before sending the update. + */ + constructor({ + headersToCheck, + channelName, + deferNoticationTimeout + } = {}) { + this._headersToCheck = headersToCheck || DEFAULT_HEADERS_TO_CHECK; + this._channelName = channelName || DEFAULT_BROADCAST_CHANNEL_NAME; + this._deferNoticationTimeout = deferNoticationTimeout || DEFAULT_DEFER_NOTIFICATION_TIMEOUT; + + { + assert_mjs.assert.isType(this._channelName, 'string', { + moduleName: 'workbox-broadcast-update', + className: 'BroadcastCacheUpdate', + funcName: 'constructor', + paramName: 'channelName' + }); + assert_mjs.assert.isArray(this._headersToCheck, { + moduleName: 'workbox-broadcast-update', + className: 'BroadcastCacheUpdate', + funcName: 'constructor', + paramName: 'headersToCheck' + }); + } + + this._initWindowReadyDeferreds(); + } + /** + * Compare two [Responses](https://developer.mozilla.org/en-US/docs/Web/API/Response) + * and send a message via the + * {@link https://developers.google.com/web/updates/2016/09/broadcastchannel|Broadcast Channel API} + * if they differ. + * + * Neither of the Responses can be {@link http://stackoverflow.com/questions/39109789|opaque}. + * + * @param {Object} options + * @param {Response} options.oldResponse Cached response to compare. + * @param {Response} options.newResponse Possibly updated response to compare. + * @param {string} options.url The URL of the request. + * @param {string} options.cacheName Name of the cache the responses belong + * to. This is included in the broadcast message. + * @param {Event} [options.event] event An optional event that triggered + * this possible cache update. + * @return {Promise} Resolves once the update is sent. + */ + + + notifyIfUpdated({ + oldResponse, + newResponse, + url, + cacheName, + event + }) { + if (!responsesAreSame(oldResponse, newResponse, this._headersToCheck)) { + { + logger_mjs.logger.log(`Newer response found (and cached) for:`, url); + } + + const sendUpdate = async () => { + // In the case of a navigation request, the requesting page will likely + // not have loaded its JavaScript in time to recevied the update + // notification, so we defer it until ready (or we timeout waiting). + if (event && event.request && event.request.mode === 'navigate') { + { + logger_mjs.logger.debug(`Original request was a navigation request, ` + `waiting for a ready message from the window`, event.request); + } + + await this._windowReadyOrTimeout(event); + } + + await this._broadcastUpdate({ + channel: this._getChannel(), + cacheName, + url + }); + }; // Send the update and ensure the SW stays alive until it's sent. + + + const done = sendUpdate(); + + if (event) { + try { + event.waitUntil(done); + } catch (error) { + { + logger_mjs.logger.warn(`Unable to ensure service worker stays alive ` + `when broadcasting cache update for ` + `${getFriendlyURL_mjs.getFriendlyURL(event.request.url)}'.`); + } + } + } + + return done; + } + } + /** + * NOTE: this is exposed on the instance primarily so it can be spied on + * in tests. + * + * @param {Object} opts + * @private + */ + + + async _broadcastUpdate(opts) { + await broadcastUpdate(opts); + } + /** + * @return {BroadcastChannel|undefined} The BroadcastChannel instance used for + * broadcasting updates, or undefined if the browser doesn't support the + * Broadcast Channel API. + * + * @private + */ + + + _getChannel() { + if ('BroadcastChannel' in self && !this._channel) { + this._channel = new BroadcastChannel(this._channelName); + } + + return this._channel; + } + /** + * Waits for a message from the window indicating that it's capable of + * receiving broadcasts. By default, this will only wait for the amount of + * time specified via the `deferNoticationTimeout` option. + * + * @param {Event} event The navigation fetch event. + * @return {Promise} + * @private + */ + + + _windowReadyOrTimeout(event) { + if (!this._navigationEventsDeferreds.has(event)) { + const deferred = new Deferred_mjs.Deferred(); // Set the deferred on the `_navigationEventsDeferreds` map so it will + // be resolved when the next ready message event comes. + + this._navigationEventsDeferreds.set(event, deferred); // But don't wait too long for the message since it may never come. + + + const timeout = setTimeout(() => { + { + logger_mjs.logger.debug(`Timed out after ${this._deferNoticationTimeout}` + `ms waiting for message from window`); + } + + deferred.resolve(); + }, this._deferNoticationTimeout); // Ensure the timeout is cleared if the deferred promise is resolved. + + deferred.promise.then(() => clearTimeout(timeout)); + } + + return this._navigationEventsDeferreds.get(event).promise; + } + /** + * Creates a mapping between navigation fetch events and deferreds, and adds + * a listener for message events from the window. When message events arrive, + * all deferreds in the mapping are resolved. + * + * Note: it would be easier if we could only resolve the deferred of + * navigation fetch event whose client ID matched the source ID of the + * message event, but currently client IDs are not exposed on navigation + * fetch events: https://www.chromestatus.com/feature/4846038800138240 + * + * @private + */ + + + _initWindowReadyDeferreds() { + // A mapping between navigation events and their deferreds. + this._navigationEventsDeferreds = new Map(); // The message listener needs to be added in the initial run of the + // service worker, but since we don't actually need to be listening for + // messages until the cache updates, we only invoke the callback if set. + + self.addEventListener('message', event => { + if (event.data.type === 'WINDOW_READY' && event.data.meta === 'workbox-window' && this._navigationEventsDeferreds.size > 0) { + { + logger_mjs.logger.debug(`Received WINDOW_READY event: `, event); + } // Resolve any pending deferreds. + + + for (const deferred of this._navigationEventsDeferreds.values()) { + deferred.resolve(); + } + + this._navigationEventsDeferreds.clear(); + } + }); + } + + } + + /* + Copyright 2018 Google LLC + + Use of this source code is governed by an MIT-style + license that can be found in the LICENSE file or at + https://opensource.org/licenses/MIT. + */ + /** + * This plugin will automatically broadcast a message whenever a cached response + * is updated. + * + * @memberof workbox.broadcastUpdate + */ + + class Plugin { + /** + * Construct a BroadcastCacheUpdate instance with the passed options and + * calls its `notifyIfUpdated()` method whenever the plugin's + * `cacheDidUpdate` callback is invoked. + * + * @param {Object} options + * @param {Array} + * [options.headersToCheck=['content-length', 'etag', 'last-modified']] + * A list of headers that will be used to determine whether the responses + * differ. + * @param {string} [options.channelName='workbox'] The name that will be used + *. when creating the `BroadcastChannel`, which defaults to 'workbox' (the + * channel name used by the `workbox-window` package). + * @param {string} [options.deferNoticationTimeout=10000] The amount of time + * to wait for a ready message from the window on navigation requests + * before sending the update. + */ + constructor(options) { + this._broadcastUpdate = new BroadcastCacheUpdate(options); + } + /** + * A "lifecycle" callback that will be triggered automatically by the + * `workbox-sw` and `workbox-runtime-caching` handlers when an entry is + * added to a cache. + * + * @private + * @param {Object} options The input object to this function. + * @param {string} options.cacheName Name of the cache being updated. + * @param {Response} [options.oldResponse] The previous cached value, if any. + * @param {Response} options.newResponse The new value in the cache. + * @param {Request} options.request The request that triggered the udpate. + * @param {Request} [options.event] The event that triggered the update. + */ + + + cacheDidUpdate({ + cacheName, + oldResponse, + newResponse, + request, + event + }) { + { + assert_mjs.assert.isType(cacheName, 'string', { + moduleName: 'workbox-broadcast-update', + className: 'Plugin', + funcName: 'cacheDidUpdate', + paramName: 'cacheName' + }); + assert_mjs.assert.isInstance(newResponse, Response, { + moduleName: 'workbox-broadcast-update', + className: 'Plugin', + funcName: 'cacheDidUpdate', + paramName: 'newResponse' + }); + assert_mjs.assert.isInstance(request, Request, { + moduleName: 'workbox-broadcast-update', + className: 'Plugin', + funcName: 'cacheDidUpdate', + paramName: 'request' + }); + } + + if (!oldResponse) { + // Without a two responses there is nothing to compare. + return; + } + + this._broadcastUpdate.notifyIfUpdated({ + cacheName, + oldResponse, + newResponse, + event, + url: request.url + }); + } + + } + + /* + Copyright 2018 Google LLC + + Use of this source code is governed by an MIT-style + license that can be found in the LICENSE file or at + https://opensource.org/licenses/MIT. + */ + + exports.BroadcastCacheUpdate = BroadcastCacheUpdate; + exports.Plugin = Plugin; + exports.broadcastUpdate = broadcastUpdate; + exports.responsesAreSame = responsesAreSame; + + return exports; + +}({}, workbox.core._private, workbox.core._private, workbox.core._private, workbox.core._private, workbox.core._private)); +//# sourceMappingURL=workbox-broadcast-update.dev.js.map diff --git a/workbox-v4.3.1/workbox-broadcast-update.dev.js.map b/workbox-v4.3.1/workbox-broadcast-update.dev.js.map new file mode 100644 index 0000000000..36fc8aad89 --- /dev/null +++ b/workbox-v4.3.1/workbox-broadcast-update.dev.js.map @@ -0,0 +1 @@ +{"version":3,"file":"workbox-broadcast-update.dev.js","sources":["../_version.mjs","../responsesAreSame.mjs","../utils/constants.mjs","../broadcastUpdate.mjs","../BroadcastCacheUpdate.mjs","../Plugin.mjs","../index.mjs"],"sourcesContent":["try{self['workbox:broadcast-update:4.3.1']&&_()}catch(e){}// eslint-disable-line","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport {WorkboxError} from 'workbox-core/_private/WorkboxError.mjs';\nimport {logger} from 'workbox-core/_private/logger.mjs';\nimport './_version.mjs';\n\n/**\n * Given two `Response's`, compares several header values to see if they are\n * the same or not.\n *\n * @param {Response} firstResponse\n * @param {Response} secondResponse\n * @param {Array} headersToCheck\n * @return {boolean}\n *\n * @memberof workbox.broadcastUpdate\n * @private\n */\nconst responsesAreSame = (firstResponse, secondResponse, headersToCheck) => {\n if (process.env.NODE_ENV !== 'production') {\n if (!(firstResponse instanceof Response &&\n secondResponse instanceof Response)) {\n throw new WorkboxError('invalid-responses-are-same-args');\n }\n }\n\n const atLeastOneHeaderAvailable = headersToCheck.some((header) => {\n return firstResponse.headers.has(header) &&\n secondResponse.headers.has(header);\n });\n\n if (!atLeastOneHeaderAvailable) {\n if (process.env.NODE_ENV !== 'production') {\n logger.warn(`Unable to determine where the response has been updated ` +\n `because none of the headers that would be checked are present.`);\n logger.debug(`Attempting to compare the following: `,\n firstResponse, secondResponse, headersToCheck);\n }\n\n // Just return true, indicating the that responses are the same, since we\n // can't determine otherwise.\n return true;\n }\n\n return headersToCheck.every((header) => {\n const headerStateComparison = firstResponse.headers.has(header) ===\n secondResponse.headers.has(header);\n const headerValueComparison = firstResponse.headers.get(header) ===\n secondResponse.headers.get(header);\n\n return headerStateComparison && headerValueComparison;\n });\n};\n\nexport {responsesAreSame};\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport '../_version.mjs';\n\nexport const CACHE_UPDATED_MESSAGE_TYPE = 'CACHE_UPDATED';\nexport const CACHE_UPDATED_MESSAGE_META = 'workbox-broadcast-update';\nexport const DEFAULT_BROADCAST_CHANNEL_NAME = 'workbox';\nexport const DEFAULT_DEFER_NOTIFICATION_TIMEOUT = 10000;\nexport const DEFAULT_HEADERS_TO_CHECK = [\n 'content-length',\n 'etag',\n 'last-modified',\n];\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport {assert} from 'workbox-core/_private/assert.mjs';\nimport {CACHE_UPDATED_MESSAGE_TYPE, CACHE_UPDATED_MESSAGE_META}\n from './utils/constants.mjs';\n\nimport './_version.mjs';\n\n/**\n * You would not normally call this method directly; it's called automatically\n * by an instance of the {@link BroadcastCacheUpdate} class. It's exposed here\n * for the benefit of developers who would rather not use the full\n * `BroadcastCacheUpdate` implementation.\n *\n * Calling this will dispatch a message on the provided\n * {@link https://developers.google.com/web/updates/2016/09/broadcastchannel|Broadcast Channel}\n * to notify interested subscribers about a change to a cached resource.\n *\n * The message that's posted has a formation inspired by the\n * [Flux standard action](https://github.com/acdlite/flux-standard-action#introduction)\n * format like so:\n *\n * ```\n * {\n * type: 'CACHE_UPDATED',\n * meta: 'workbox-broadcast-update',\n * payload: {\n * cacheName: 'the-cache-name',\n * updatedURL: 'https://example.com/'\n * }\n * }\n * ```\n *\n * (Usage of [Flux](https://facebook.github.io/flux/) itself is not at\n * all required.)\n *\n * @param {Object} options\n * @param {string} options.cacheName The name of the cache in which the updated\n * `Response` was stored.\n * @param {string} options.url The URL associated with the updated `Response`.\n * @param {BroadcastChannel} [options.channel] The `BroadcastChannel` to use.\n * If no channel is set or the browser doesn't support the BroadcastChannel\n * api, then an attempt will be made to `postMessage` each window client.\n *\n * @memberof workbox.broadcastUpdate\n */\nconst broadcastUpdate = async ({channel, cacheName, url}) => {\n if (process.env.NODE_ENV !== 'production') {\n assert.isType(cacheName, 'string', {\n moduleName: 'workbox-broadcast-update',\n className: '~',\n funcName: 'broadcastUpdate',\n paramName: 'cacheName',\n });\n assert.isType(url, 'string', {\n moduleName: 'workbox-broadcast-update',\n className: '~',\n funcName: 'broadcastUpdate',\n paramName: 'url',\n });\n }\n\n const data = {\n type: CACHE_UPDATED_MESSAGE_TYPE,\n meta: CACHE_UPDATED_MESSAGE_META,\n payload: {\n cacheName: cacheName,\n updatedURL: url,\n },\n };\n\n if (channel) {\n channel.postMessage(data);\n } else {\n const windows = await clients.matchAll({type: 'window'});\n for (const win of windows) {\n win.postMessage(data);\n }\n }\n};\n\nexport {broadcastUpdate};\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport {assert} from 'workbox-core/_private/assert.mjs';\nimport {getFriendlyURL} from 'workbox-core/_private/getFriendlyURL.mjs';\nimport {logger} from 'workbox-core/_private/logger.mjs';\nimport {Deferred} from 'workbox-core/_private/Deferred.mjs';\nimport {responsesAreSame} from './responsesAreSame.mjs';\nimport {broadcastUpdate} from './broadcastUpdate.mjs';\n\nimport {DEFAULT_HEADERS_TO_CHECK, DEFAULT_BROADCAST_CHANNEL_NAME,\n DEFAULT_DEFER_NOTIFICATION_TIMEOUT} from './utils/constants.mjs';\n\nimport './_version.mjs';\n\n/**\n * Uses the [Broadcast Channel API]{@link https://developers.google.com/web/updates/2016/09/broadcastchannel}\n * to notify interested parties when a cached response has been updated.\n * In browsers that do not support the Broadcast Channel API, the instance\n * falls back to sending the update via `postMessage()` to all window clients.\n *\n * For efficiency's sake, the underlying response bodies are not compared;\n * only specific response headers are checked.\n *\n * @memberof workbox.broadcastUpdate\n */\nclass BroadcastCacheUpdate {\n /**\n * Construct a BroadcastCacheUpdate instance with a specific `channelName` to\n * broadcast messages on\n *\n * @param {Object} options\n * @param {Array}\n * [options.headersToCheck=['content-length', 'etag', 'last-modified']]\n * A list of headers that will be used to determine whether the responses\n * differ.\n * @param {string} [options.channelName='workbox'] The name that will be used\n *. when creating the `BroadcastChannel`, which defaults to 'workbox' (the\n * channel name used by the `workbox-window` package).\n * @param {string} [options.deferNoticationTimeout=10000] The amount of time\n * to wait for a ready message from the window on navigation requests\n * before sending the update.\n */\n constructor({headersToCheck, channelName, deferNoticationTimeout} = {}) {\n this._headersToCheck = headersToCheck || DEFAULT_HEADERS_TO_CHECK;\n this._channelName = channelName || DEFAULT_BROADCAST_CHANNEL_NAME;\n this._deferNoticationTimeout =\n deferNoticationTimeout || DEFAULT_DEFER_NOTIFICATION_TIMEOUT;\n\n if (process.env.NODE_ENV !== 'production') {\n assert.isType(this._channelName, 'string', {\n moduleName: 'workbox-broadcast-update',\n className: 'BroadcastCacheUpdate',\n funcName: 'constructor',\n paramName: 'channelName',\n });\n assert.isArray(this._headersToCheck, {\n moduleName: 'workbox-broadcast-update',\n className: 'BroadcastCacheUpdate',\n funcName: 'constructor',\n paramName: 'headersToCheck',\n });\n }\n\n this._initWindowReadyDeferreds();\n }\n\n /**\n * Compare two [Responses](https://developer.mozilla.org/en-US/docs/Web/API/Response)\n * and send a message via the\n * {@link https://developers.google.com/web/updates/2016/09/broadcastchannel|Broadcast Channel API}\n * if they differ.\n *\n * Neither of the Responses can be {@link http://stackoverflow.com/questions/39109789|opaque}.\n *\n * @param {Object} options\n * @param {Response} options.oldResponse Cached response to compare.\n * @param {Response} options.newResponse Possibly updated response to compare.\n * @param {string} options.url The URL of the request.\n * @param {string} options.cacheName Name of the cache the responses belong\n * to. This is included in the broadcast message.\n * @param {Event} [options.event] event An optional event that triggered\n * this possible cache update.\n * @return {Promise} Resolves once the update is sent.\n */\n notifyIfUpdated({oldResponse, newResponse, url, cacheName, event}) {\n if (!responsesAreSame(oldResponse, newResponse, this._headersToCheck)) {\n if (process.env.NODE_ENV !== 'production') {\n logger.log(`Newer response found (and cached) for:`, url);\n }\n\n const sendUpdate = async () => {\n // In the case of a navigation request, the requesting page will likely\n // not have loaded its JavaScript in time to recevied the update\n // notification, so we defer it until ready (or we timeout waiting).\n if (event && event.request && event.request.mode === 'navigate') {\n if (process.env.NODE_ENV !== 'production') {\n logger.debug(`Original request was a navigation request, ` +\n `waiting for a ready message from the window`, event.request);\n }\n await this._windowReadyOrTimeout(event);\n }\n await this._broadcastUpdate({\n channel: this._getChannel(),\n cacheName,\n url,\n });\n };\n\n // Send the update and ensure the SW stays alive until it's sent.\n const done = sendUpdate();\n\n if (event) {\n try {\n event.waitUntil(done);\n } catch (error) {\n if (process.env.NODE_ENV !== 'production') {\n logger.warn(`Unable to ensure service worker stays alive ` +\n `when broadcasting cache update for ` +\n `${getFriendlyURL(event.request.url)}'.`);\n }\n }\n }\n return done;\n }\n }\n\n /**\n * NOTE: this is exposed on the instance primarily so it can be spied on\n * in tests.\n *\n * @param {Object} opts\n * @private\n */\n async _broadcastUpdate(opts) {\n await broadcastUpdate(opts);\n }\n\n /**\n * @return {BroadcastChannel|undefined} The BroadcastChannel instance used for\n * broadcasting updates, or undefined if the browser doesn't support the\n * Broadcast Channel API.\n *\n * @private\n */\n _getChannel() {\n if (('BroadcastChannel' in self) && !this._channel) {\n this._channel = new BroadcastChannel(this._channelName);\n }\n return this._channel;\n }\n\n /**\n * Waits for a message from the window indicating that it's capable of\n * receiving broadcasts. By default, this will only wait for the amount of\n * time specified via the `deferNoticationTimeout` option.\n *\n * @param {Event} event The navigation fetch event.\n * @return {Promise}\n * @private\n */\n _windowReadyOrTimeout(event) {\n if (!this._navigationEventsDeferreds.has(event)) {\n const deferred = new Deferred();\n\n // Set the deferred on the `_navigationEventsDeferreds` map so it will\n // be resolved when the next ready message event comes.\n this._navigationEventsDeferreds.set(event, deferred);\n\n // But don't wait too long for the message since it may never come.\n const timeout = setTimeout(() => {\n if (process.env.NODE_ENV !== 'production') {\n logger.debug(`Timed out after ${this._deferNoticationTimeout}` +\n `ms waiting for message from window`);\n }\n deferred.resolve();\n }, this._deferNoticationTimeout);\n\n // Ensure the timeout is cleared if the deferred promise is resolved.\n deferred.promise.then(() => clearTimeout(timeout));\n }\n return this._navigationEventsDeferreds.get(event).promise;\n }\n\n /**\n * Creates a mapping between navigation fetch events and deferreds, and adds\n * a listener for message events from the window. When message events arrive,\n * all deferreds in the mapping are resolved.\n *\n * Note: it would be easier if we could only resolve the deferred of\n * navigation fetch event whose client ID matched the source ID of the\n * message event, but currently client IDs are not exposed on navigation\n * fetch events: https://www.chromestatus.com/feature/4846038800138240\n *\n * @private\n */\n _initWindowReadyDeferreds() {\n // A mapping between navigation events and their deferreds.\n this._navigationEventsDeferreds = new Map();\n\n // The message listener needs to be added in the initial run of the\n // service worker, but since we don't actually need to be listening for\n // messages until the cache updates, we only invoke the callback if set.\n self.addEventListener('message', (event) => {\n if (event.data.type === 'WINDOW_READY' &&\n event.data.meta === 'workbox-window' &&\n this._navigationEventsDeferreds.size > 0) {\n if (process.env.NODE_ENV !== 'production') {\n logger.debug(`Received WINDOW_READY event: `, event);\n }\n // Resolve any pending deferreds.\n for (const deferred of this._navigationEventsDeferreds.values()) {\n deferred.resolve();\n }\n this._navigationEventsDeferreds.clear();\n }\n });\n }\n}\n\nexport {BroadcastCacheUpdate};\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport {assert} from 'workbox-core/_private/assert.mjs';\nimport {BroadcastCacheUpdate} from './BroadcastCacheUpdate.mjs';\nimport './_version.mjs';\n\n/**\n * This plugin will automatically broadcast a message whenever a cached response\n * is updated.\n *\n * @memberof workbox.broadcastUpdate\n */\nclass Plugin {\n /**\n * Construct a BroadcastCacheUpdate instance with the passed options and\n * calls its `notifyIfUpdated()` method whenever the plugin's\n * `cacheDidUpdate` callback is invoked.\n *\n * @param {Object} options\n * @param {Array}\n * [options.headersToCheck=['content-length', 'etag', 'last-modified']]\n * A list of headers that will be used to determine whether the responses\n * differ.\n * @param {string} [options.channelName='workbox'] The name that will be used\n *. when creating the `BroadcastChannel`, which defaults to 'workbox' (the\n * channel name used by the `workbox-window` package).\n * @param {string} [options.deferNoticationTimeout=10000] The amount of time\n * to wait for a ready message from the window on navigation requests\n * before sending the update.\n */\n constructor(options) {\n this._broadcastUpdate = new BroadcastCacheUpdate(options);\n }\n\n /**\n * A \"lifecycle\" callback that will be triggered automatically by the\n * `workbox-sw` and `workbox-runtime-caching` handlers when an entry is\n * added to a cache.\n *\n * @private\n * @param {Object} options The input object to this function.\n * @param {string} options.cacheName Name of the cache being updated.\n * @param {Response} [options.oldResponse] The previous cached value, if any.\n * @param {Response} options.newResponse The new value in the cache.\n * @param {Request} options.request The request that triggered the udpate.\n * @param {Request} [options.event] The event that triggered the update.\n */\n cacheDidUpdate({cacheName, oldResponse, newResponse, request, event}) {\n if (process.env.NODE_ENV !== 'production') {\n assert.isType(cacheName, 'string', {\n moduleName: 'workbox-broadcast-update',\n className: 'Plugin',\n funcName: 'cacheDidUpdate',\n paramName: 'cacheName',\n });\n assert.isInstance(newResponse, Response, {\n moduleName: 'workbox-broadcast-update',\n className: 'Plugin',\n funcName: 'cacheDidUpdate',\n paramName: 'newResponse',\n });\n assert.isInstance(request, Request, {\n moduleName: 'workbox-broadcast-update',\n className: 'Plugin',\n funcName: 'cacheDidUpdate',\n paramName: 'request',\n });\n }\n\n if (!oldResponse) {\n // Without a two responses there is nothing to compare.\n return;\n }\n this._broadcastUpdate.notifyIfUpdated({\n cacheName,\n oldResponse,\n newResponse,\n event,\n url: request.url,\n });\n }\n}\n\nexport {Plugin};\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport {BroadcastCacheUpdate} from './BroadcastCacheUpdate.mjs';\nimport {Plugin} from './Plugin.mjs';\nimport {broadcastUpdate} from './broadcastUpdate.mjs';\nimport {responsesAreSame} from './responsesAreSame.mjs';\nimport './_version.mjs';\n\n\n/**\n * @namespace workbox.broadcastUpdate\n */\n\nexport {\n BroadcastCacheUpdate,\n Plugin,\n broadcastUpdate,\n responsesAreSame,\n};\n"],"names":["self","_","e","responsesAreSame","firstResponse","secondResponse","headersToCheck","Response","WorkboxError","atLeastOneHeaderAvailable","some","header","headers","has","logger","warn","debug","every","headerStateComparison","headerValueComparison","get","CACHE_UPDATED_MESSAGE_TYPE","CACHE_UPDATED_MESSAGE_META","DEFAULT_BROADCAST_CHANNEL_NAME","DEFAULT_DEFER_NOTIFICATION_TIMEOUT","DEFAULT_HEADERS_TO_CHECK","broadcastUpdate","channel","cacheName","url","assert","isType","moduleName","className","funcName","paramName","data","type","meta","payload","updatedURL","postMessage","windows","clients","matchAll","win","BroadcastCacheUpdate","constructor","channelName","deferNoticationTimeout","_headersToCheck","_channelName","_deferNoticationTimeout","isArray","_initWindowReadyDeferreds","notifyIfUpdated","oldResponse","newResponse","event","log","sendUpdate","request","mode","_windowReadyOrTimeout","_broadcastUpdate","_getChannel","done","waitUntil","error","getFriendlyURL","opts","_channel","BroadcastChannel","_navigationEventsDeferreds","deferred","Deferred","set","timeout","setTimeout","resolve","promise","then","clearTimeout","Map","addEventListener","size","values","clear","Plugin","options","cacheDidUpdate","isInstance","Request"],"mappings":";;;;EAAA,IAAG;EAACA,EAAAA,IAAI,CAAC,gCAAD,CAAJ,IAAwCC,CAAC,EAAzC;EAA4C,CAAhD,CAAgD,OAAMC,CAAN,EAAQ;;ECAxD;;;;;;;AAQA,EAIA;;;;;;;;;;;;;AAYA,QAAMC,gBAAgB,GAAG,CAACC,aAAD,EAAgBC,cAAhB,EAAgCC,cAAhC,KAAmD;EAC1E,EAA2C;EACzC,QAAI,EA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;EApEU;;EClBb;;;;;;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/workbox-v4.3.1/workbox-broadcast-update.prod.js b/workbox-v4.3.1/workbox-broadcast-update.prod.js new file mode 100644 index 0000000000..b87c70f2a4 --- /dev/null +++ b/workbox-v4.3.1/workbox-broadcast-update.prod.js @@ -0,0 +1,2 @@ +this.workbox=this.workbox||{},this.workbox.broadcastUpdate=function(e,t){"use strict";try{self["workbox:broadcast-update:4.3.1"]&&_()}catch(e){}const s=(e,t,s)=>{return!s.some(s=>e.headers.has(s)&&t.headers.has(s))||s.every(s=>{const n=e.headers.has(s)===t.headers.has(s),a=e.headers.get(s)===t.headers.get(s);return n&&a})},n="workbox",a=1e4,i=["content-length","etag","last-modified"],o=async({channel:e,cacheName:t,url:s})=>{const n={type:"CACHE_UPDATED",meta:"workbox-broadcast-update",payload:{cacheName:t,updatedURL:s}};if(e)e.postMessage(n);else{const e=await clients.matchAll({type:"window"});for(const t of e)t.postMessage(n)}};class c{constructor({headersToCheck:e,channelName:t,deferNoticationTimeout:s}={}){this.t=e||i,this.s=t||n,this.i=s||a,this.o()}notifyIfUpdated({oldResponse:e,newResponse:t,url:n,cacheName:a,event:i}){if(!s(e,t,this.t)){const e=(async()=>{i&&i.request&&"navigate"===i.request.mode&&await this.h(i),await this.l({channel:this.u(),cacheName:a,url:n})})();if(i)try{i.waitUntil(e)}catch(e){}return e}}async l(e){await o(e)}u(){return"BroadcastChannel"in self&&!this.p&&(this.p=new BroadcastChannel(this.s)),this.p}h(e){if(!this.m.has(e)){const s=new t.Deferred;this.m.set(e,s);const n=setTimeout(()=>{s.resolve()},this.i);s.promise.then(()=>clearTimeout(n))}return this.m.get(e).promise}o(){this.m=new Map,self.addEventListener("message",e=>{if("WINDOW_READY"===e.data.type&&"workbox-window"===e.data.meta&&this.m.size>0){for(const e of this.m.values())e.resolve();this.m.clear()}})}}return e.BroadcastCacheUpdate=c,e.Plugin=class{constructor(e){this.l=new c(e)}cacheDidUpdate({cacheName:e,oldResponse:t,newResponse:s,request:n,event:a}){t&&this.l.notifyIfUpdated({cacheName:e,oldResponse:t,newResponse:s,event:a,url:n.url})}},e.broadcastUpdate=o,e.responsesAreSame=s,e}({},workbox.core._private); +//# sourceMappingURL=workbox-broadcast-update.prod.js.map diff --git a/workbox-v4.3.1/workbox-broadcast-update.prod.js.map b/workbox-v4.3.1/workbox-broadcast-update.prod.js.map new file mode 100644 index 0000000000..537aee0197 --- /dev/null +++ b/workbox-v4.3.1/workbox-broadcast-update.prod.js.map @@ -0,0 +1 @@ +{"version":3,"file":"workbox-broadcast-update.prod.js","sources":["../_version.mjs","../responsesAreSame.mjs","../utils/constants.mjs","../broadcastUpdate.mjs","../BroadcastCacheUpdate.mjs","../Plugin.mjs"],"sourcesContent":["try{self['workbox:broadcast-update:4.3.1']&&_()}catch(e){}// eslint-disable-line","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport {WorkboxError} from 'workbox-core/_private/WorkboxError.mjs';\nimport {logger} from 'workbox-core/_private/logger.mjs';\nimport './_version.mjs';\n\n/**\n * Given two `Response's`, compares several header values to see if they are\n * the same or not.\n *\n * @param {Response} firstResponse\n * @param {Response} secondResponse\n * @param {Array} headersToCheck\n * @return {boolean}\n *\n * @memberof workbox.broadcastUpdate\n * @private\n */\nconst responsesAreSame = (firstResponse, secondResponse, headersToCheck) => {\n if (process.env.NODE_ENV !== 'production') {\n if (!(firstResponse instanceof Response &&\n secondResponse instanceof Response)) {\n throw new WorkboxError('invalid-responses-are-same-args');\n }\n }\n\n const atLeastOneHeaderAvailable = headersToCheck.some((header) => {\n return firstResponse.headers.has(header) &&\n secondResponse.headers.has(header);\n });\n\n if (!atLeastOneHeaderAvailable) {\n if (process.env.NODE_ENV !== 'production') {\n logger.warn(`Unable to determine where the response has been updated ` +\n `because none of the headers that would be checked are present.`);\n logger.debug(`Attempting to compare the following: `,\n firstResponse, secondResponse, headersToCheck);\n }\n\n // Just return true, indicating the that responses are the same, since we\n // can't determine otherwise.\n return true;\n }\n\n return headersToCheck.every((header) => {\n const headerStateComparison = firstResponse.headers.has(header) ===\n secondResponse.headers.has(header);\n const headerValueComparison = firstResponse.headers.get(header) ===\n secondResponse.headers.get(header);\n\n return headerStateComparison && headerValueComparison;\n });\n};\n\nexport {responsesAreSame};\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport '../_version.mjs';\n\nexport const CACHE_UPDATED_MESSAGE_TYPE = 'CACHE_UPDATED';\nexport const CACHE_UPDATED_MESSAGE_META = 'workbox-broadcast-update';\nexport const DEFAULT_BROADCAST_CHANNEL_NAME = 'workbox';\nexport const DEFAULT_DEFER_NOTIFICATION_TIMEOUT = 10000;\nexport const DEFAULT_HEADERS_TO_CHECK = [\n 'content-length',\n 'etag',\n 'last-modified',\n];\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport {assert} from 'workbox-core/_private/assert.mjs';\nimport {CACHE_UPDATED_MESSAGE_TYPE, CACHE_UPDATED_MESSAGE_META}\n from './utils/constants.mjs';\n\nimport './_version.mjs';\n\n/**\n * You would not normally call this method directly; it's called automatically\n * by an instance of the {@link BroadcastCacheUpdate} class. It's exposed here\n * for the benefit of developers who would rather not use the full\n * `BroadcastCacheUpdate` implementation.\n *\n * Calling this will dispatch a message on the provided\n * {@link https://developers.google.com/web/updates/2016/09/broadcastchannel|Broadcast Channel}\n * to notify interested subscribers about a change to a cached resource.\n *\n * The message that's posted has a formation inspired by the\n * [Flux standard action](https://github.com/acdlite/flux-standard-action#introduction)\n * format like so:\n *\n * ```\n * {\n * type: 'CACHE_UPDATED',\n * meta: 'workbox-broadcast-update',\n * payload: {\n * cacheName: 'the-cache-name',\n * updatedURL: 'https://example.com/'\n * }\n * }\n * ```\n *\n * (Usage of [Flux](https://facebook.github.io/flux/) itself is not at\n * all required.)\n *\n * @param {Object} options\n * @param {string} options.cacheName The name of the cache in which the updated\n * `Response` was stored.\n * @param {string} options.url The URL associated with the updated `Response`.\n * @param {BroadcastChannel} [options.channel] The `BroadcastChannel` to use.\n * If no channel is set or the browser doesn't support the BroadcastChannel\n * api, then an attempt will be made to `postMessage` each window client.\n *\n * @memberof workbox.broadcastUpdate\n */\nconst broadcastUpdate = async ({channel, cacheName, url}) => {\n if (process.env.NODE_ENV !== 'production') {\n assert.isType(cacheName, 'string', {\n moduleName: 'workbox-broadcast-update',\n className: '~',\n funcName: 'broadcastUpdate',\n paramName: 'cacheName',\n });\n assert.isType(url, 'string', {\n moduleName: 'workbox-broadcast-update',\n className: '~',\n funcName: 'broadcastUpdate',\n paramName: 'url',\n });\n }\n\n const data = {\n type: CACHE_UPDATED_MESSAGE_TYPE,\n meta: CACHE_UPDATED_MESSAGE_META,\n payload: {\n cacheName: cacheName,\n updatedURL: url,\n },\n };\n\n if (channel) {\n channel.postMessage(data);\n } else {\n const windows = await clients.matchAll({type: 'window'});\n for (const win of windows) {\n win.postMessage(data);\n }\n }\n};\n\nexport {broadcastUpdate};\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport {assert} from 'workbox-core/_private/assert.mjs';\nimport {getFriendlyURL} from 'workbox-core/_private/getFriendlyURL.mjs';\nimport {logger} from 'workbox-core/_private/logger.mjs';\nimport {Deferred} from 'workbox-core/_private/Deferred.mjs';\nimport {responsesAreSame} from './responsesAreSame.mjs';\nimport {broadcastUpdate} from './broadcastUpdate.mjs';\n\nimport {DEFAULT_HEADERS_TO_CHECK, DEFAULT_BROADCAST_CHANNEL_NAME,\n DEFAULT_DEFER_NOTIFICATION_TIMEOUT} from './utils/constants.mjs';\n\nimport './_version.mjs';\n\n/**\n * Uses the [Broadcast Channel API]{@link https://developers.google.com/web/updates/2016/09/broadcastchannel}\n * to notify interested parties when a cached response has been updated.\n * In browsers that do not support the Broadcast Channel API, the instance\n * falls back to sending the update via `postMessage()` to all window clients.\n *\n * For efficiency's sake, the underlying response bodies are not compared;\n * only specific response headers are checked.\n *\n * @memberof workbox.broadcastUpdate\n */\nclass BroadcastCacheUpdate {\n /**\n * Construct a BroadcastCacheUpdate instance with a specific `channelName` to\n * broadcast messages on\n *\n * @param {Object} options\n * @param {Array}\n * [options.headersToCheck=['content-length', 'etag', 'last-modified']]\n * A list of headers that will be used to determine whether the responses\n * differ.\n * @param {string} [options.channelName='workbox'] The name that will be used\n *. when creating the `BroadcastChannel`, which defaults to 'workbox' (the\n * channel name used by the `workbox-window` package).\n * @param {string} [options.deferNoticationTimeout=10000] The amount of time\n * to wait for a ready message from the window on navigation requests\n * before sending the update.\n */\n constructor({headersToCheck, channelName, deferNoticationTimeout} = {}) {\n this._headersToCheck = headersToCheck || DEFAULT_HEADERS_TO_CHECK;\n this._channelName = channelName || DEFAULT_BROADCAST_CHANNEL_NAME;\n this._deferNoticationTimeout =\n deferNoticationTimeout || DEFAULT_DEFER_NOTIFICATION_TIMEOUT;\n\n if (process.env.NODE_ENV !== 'production') {\n assert.isType(this._channelName, 'string', {\n moduleName: 'workbox-broadcast-update',\n className: 'BroadcastCacheUpdate',\n funcName: 'constructor',\n paramName: 'channelName',\n });\n assert.isArray(this._headersToCheck, {\n moduleName: 'workbox-broadcast-update',\n className: 'BroadcastCacheUpdate',\n funcName: 'constructor',\n paramName: 'headersToCheck',\n });\n }\n\n this._initWindowReadyDeferreds();\n }\n\n /**\n * Compare two [Responses](https://developer.mozilla.org/en-US/docs/Web/API/Response)\n * and send a message via the\n * {@link https://developers.google.com/web/updates/2016/09/broadcastchannel|Broadcast Channel API}\n * if they differ.\n *\n * Neither of the Responses can be {@link http://stackoverflow.com/questions/39109789|opaque}.\n *\n * @param {Object} options\n * @param {Response} options.oldResponse Cached response to compare.\n * @param {Response} options.newResponse Possibly updated response to compare.\n * @param {string} options.url The URL of the request.\n * @param {string} options.cacheName Name of the cache the responses belong\n * to. This is included in the broadcast message.\n * @param {Event} [options.event] event An optional event that triggered\n * this possible cache update.\n * @return {Promise} Resolves once the update is sent.\n */\n notifyIfUpdated({oldResponse, newResponse, url, cacheName, event}) {\n if (!responsesAreSame(oldResponse, newResponse, this._headersToCheck)) {\n if (process.env.NODE_ENV !== 'production') {\n logger.log(`Newer response found (and cached) for:`, url);\n }\n\n const sendUpdate = async () => {\n // In the case of a navigation request, the requesting page will likely\n // not have loaded its JavaScript in time to recevied the update\n // notification, so we defer it until ready (or we timeout waiting).\n if (event && event.request && event.request.mode === 'navigate') {\n if (process.env.NODE_ENV !== 'production') {\n logger.debug(`Original request was a navigation request, ` +\n `waiting for a ready message from the window`, event.request);\n }\n await this._windowReadyOrTimeout(event);\n }\n await this._broadcastUpdate({\n channel: this._getChannel(),\n cacheName,\n url,\n });\n };\n\n // Send the update and ensure the SW stays alive until it's sent.\n const done = sendUpdate();\n\n if (event) {\n try {\n event.waitUntil(done);\n } catch (error) {\n if (process.env.NODE_ENV !== 'production') {\n logger.warn(`Unable to ensure service worker stays alive ` +\n `when broadcasting cache update for ` +\n `${getFriendlyURL(event.request.url)}'.`);\n }\n }\n }\n return done;\n }\n }\n\n /**\n * NOTE: this is exposed on the instance primarily so it can be spied on\n * in tests.\n *\n * @param {Object} opts\n * @private\n */\n async _broadcastUpdate(opts) {\n await broadcastUpdate(opts);\n }\n\n /**\n * @return {BroadcastChannel|undefined} The BroadcastChannel instance used for\n * broadcasting updates, or undefined if the browser doesn't support the\n * Broadcast Channel API.\n *\n * @private\n */\n _getChannel() {\n if (('BroadcastChannel' in self) && !this._channel) {\n this._channel = new BroadcastChannel(this._channelName);\n }\n return this._channel;\n }\n\n /**\n * Waits for a message from the window indicating that it's capable of\n * receiving broadcasts. By default, this will only wait for the amount of\n * time specified via the `deferNoticationTimeout` option.\n *\n * @param {Event} event The navigation fetch event.\n * @return {Promise}\n * @private\n */\n _windowReadyOrTimeout(event) {\n if (!this._navigationEventsDeferreds.has(event)) {\n const deferred = new Deferred();\n\n // Set the deferred on the `_navigationEventsDeferreds` map so it will\n // be resolved when the next ready message event comes.\n this._navigationEventsDeferreds.set(event, deferred);\n\n // But don't wait too long for the message since it may never come.\n const timeout = setTimeout(() => {\n if (process.env.NODE_ENV !== 'production') {\n logger.debug(`Timed out after ${this._deferNoticationTimeout}` +\n `ms waiting for message from window`);\n }\n deferred.resolve();\n }, this._deferNoticationTimeout);\n\n // Ensure the timeout is cleared if the deferred promise is resolved.\n deferred.promise.then(() => clearTimeout(timeout));\n }\n return this._navigationEventsDeferreds.get(event).promise;\n }\n\n /**\n * Creates a mapping between navigation fetch events and deferreds, and adds\n * a listener for message events from the window. When message events arrive,\n * all deferreds in the mapping are resolved.\n *\n * Note: it would be easier if we could only resolve the deferred of\n * navigation fetch event whose client ID matched the source ID of the\n * message event, but currently client IDs are not exposed on navigation\n * fetch events: https://www.chromestatus.com/feature/4846038800138240\n *\n * @private\n */\n _initWindowReadyDeferreds() {\n // A mapping between navigation events and their deferreds.\n this._navigationEventsDeferreds = new Map();\n\n // The message listener needs to be added in the initial run of the\n // service worker, but since we don't actually need to be listening for\n // messages until the cache updates, we only invoke the callback if set.\n self.addEventListener('message', (event) => {\n if (event.data.type === 'WINDOW_READY' &&\n event.data.meta === 'workbox-window' &&\n this._navigationEventsDeferreds.size > 0) {\n if (process.env.NODE_ENV !== 'production') {\n logger.debug(`Received WINDOW_READY event: `, event);\n }\n // Resolve any pending deferreds.\n for (const deferred of this._navigationEventsDeferreds.values()) {\n deferred.resolve();\n }\n this._navigationEventsDeferreds.clear();\n }\n });\n }\n}\n\nexport {BroadcastCacheUpdate};\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport {assert} from 'workbox-core/_private/assert.mjs';\nimport {BroadcastCacheUpdate} from './BroadcastCacheUpdate.mjs';\nimport './_version.mjs';\n\n/**\n * This plugin will automatically broadcast a message whenever a cached response\n * is updated.\n *\n * @memberof workbox.broadcastUpdate\n */\nclass Plugin {\n /**\n * Construct a BroadcastCacheUpdate instance with the passed options and\n * calls its `notifyIfUpdated()` method whenever the plugin's\n * `cacheDidUpdate` callback is invoked.\n *\n * @param {Object} options\n * @param {Array}\n * [options.headersToCheck=['content-length', 'etag', 'last-modified']]\n * A list of headers that will be used to determine whether the responses\n * differ.\n * @param {string} [options.channelName='workbox'] The name that will be used\n *. when creating the `BroadcastChannel`, which defaults to 'workbox' (the\n * channel name used by the `workbox-window` package).\n * @param {string} [options.deferNoticationTimeout=10000] The amount of time\n * to wait for a ready message from the window on navigation requests\n * before sending the update.\n */\n constructor(options) {\n this._broadcastUpdate = new BroadcastCacheUpdate(options);\n }\n\n /**\n * A \"lifecycle\" callback that will be triggered automatically by the\n * `workbox-sw` and `workbox-runtime-caching` handlers when an entry is\n * added to a cache.\n *\n * @private\n * @param {Object} options The input object to this function.\n * @param {string} options.cacheName Name of the cache being updated.\n * @param {Response} [options.oldResponse] The previous cached value, if any.\n * @param {Response} options.newResponse The new value in the cache.\n * @param {Request} options.request The request that triggered the udpate.\n * @param {Request} [options.event] The event that triggered the update.\n */\n cacheDidUpdate({cacheName, oldResponse, newResponse, request, event}) {\n if (process.env.NODE_ENV !== 'production') {\n assert.isType(cacheName, 'string', {\n moduleName: 'workbox-broadcast-update',\n className: 'Plugin',\n funcName: 'cacheDidUpdate',\n paramName: 'cacheName',\n });\n assert.isInstance(newResponse, Response, {\n moduleName: 'workbox-broadcast-update',\n className: 'Plugin',\n funcName: 'cacheDidUpdate',\n paramName: 'newResponse',\n });\n assert.isInstance(request, Request, {\n moduleName: 'workbox-broadcast-update',\n className: 'Plugin',\n funcName: 'cacheDidUpdate',\n paramName: 'request',\n });\n }\n\n if (!oldResponse) {\n // Without a two responses there is nothing to compare.\n return;\n }\n this._broadcastUpdate.notifyIfUpdated({\n cacheName,\n oldResponse,\n newResponse,\n event,\n url: request.url,\n });\n }\n}\n\nexport {Plugin};\n"],"names":["self","_","e","responsesAreSame","firstResponse","secondResponse","headersToCheck","some","header","headers","has","every","headerStateComparison","headerValueComparison","get","DEFAULT_BROADCAST_CHANNEL_NAME","DEFAULT_DEFER_NOTIFICATION_TIMEOUT","DEFAULT_HEADERS_TO_CHECK","broadcastUpdate","async","channel","cacheName","url","data","type","meta","payload","updatedURL","postMessage","windows","clients","matchAll","win","BroadcastCacheUpdate","constructor","channelName","deferNoticationTimeout","_headersToCheck","_channelName","_deferNoticationTimeout","_initWindowReadyDeferreds","notifyIfUpdated","oldResponse","newResponse","event","this","done","request","mode","_windowReadyOrTimeout","_broadcastUpdate","_getChannel","sendUpdate","waitUntil","error","opts","_channel","BroadcastChannel","_navigationEventsDeferreds","deferred","Deferred","set","timeout","setTimeout","resolve","promise","then","clearTimeout","Map","addEventListener","size","values","clear","options","cacheDidUpdate"],"mappings":"sFAAA,IAAIA,KAAK,mCAAmCC,IAAI,MAAMC,UCwBhDC,EAAmB,CAACC,EAAeC,EAAgBC,YAQrBA,EAAeC,KAAMC,GAC9CJ,EAAcK,QAAQC,IAAIF,IAC/BH,EAAeI,QAAQC,IAAIF,KAgBxBF,EAAeK,MAAOH,UACrBI,EAAwBR,EAAcK,QAAQC,IAAIF,KACtDH,EAAeI,QAAQC,IAAIF,GACvBK,EAAwBT,EAAcK,QAAQK,IAAIN,KACtDH,EAAeI,QAAQK,IAAIN,UAEtBI,GAAyBC,KC5CvBE,EAAiC,UACjCC,EAAqC,IACrCC,EAA2B,CACtC,iBACA,OACA,iBCmCIC,EAAkBC,OAAQC,QAAAA,EAASC,UAAAA,EAAWC,IAAAA,YAgB5CC,EAAO,CACXC,KD3DsC,gBC4DtCC,KD3DsC,2BC4DtCC,QAAS,CACPL,UAAWA,EACXM,WAAYL,OAIZF,EACFA,EAAQQ,YAAYL,OACf,OACCM,QAAgBC,QAAQC,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B,EAAqBwC,GAgBnDC,gBAAerD,UAACA,EAADqB,YAAYA,EAAZC,YAAyBA,EAAzBI,QAAsCA,EAAtCH,MAA+CA,IAsBvDF,QAIAQ,EAAiBT,gBAAgB,CACpCpB,UAAAA,EACAqB,YAAAA,EACAC,YAAAA,EACAC,MAAAA,EACAtB,IAAKyB,EAAQzB"} \ No newline at end of file diff --git a/workbox-v4.3.1/workbox-cacheable-response.dev.js b/workbox-v4.3.1/workbox-cacheable-response.dev.js new file mode 100644 index 0000000000..54a2e49997 --- /dev/null +++ b/workbox-v4.3.1/workbox-cacheable-response.dev.js @@ -0,0 +1,200 @@ +this.workbox = this.workbox || {}; +this.workbox.cacheableResponse = (function (exports, WorkboxError_mjs, assert_mjs, getFriendlyURL_mjs, logger_mjs) { + 'use strict'; + + try { + self['workbox:cacheable-response:4.3.1'] && _(); + } catch (e) {} // eslint-disable-line + + /* + Copyright 2018 Google LLC + + Use of this source code is governed by an MIT-style + license that can be found in the LICENSE file or at + https://opensource.org/licenses/MIT. + */ + /** + * This class allows you to set up rules determining what + * status codes and/or headers need to be present in order for a + * [`Response`](https://developer.mozilla.org/en-US/docs/Web/API/Response) + * to be considered cacheable. + * + * @memberof workbox.cacheableResponse + */ + + class CacheableResponse { + /** + * To construct a new CacheableResponse instance you must provide at least + * one of the `config` properties. + * + * If both `statuses` and `headers` are specified, then both conditions must + * be met for the `Response` to be considered cacheable. + * + * @param {Object} config + * @param {Array} [config.statuses] One or more status codes that a + * `Response` can have and be considered cacheable. + * @param {Object} [config.headers] A mapping of header names + * and expected values that a `Response` can have and be considered cacheable. + * If multiple headers are provided, only one needs to be present. + */ + constructor(config = {}) { + { + if (!(config.statuses || config.headers)) { + throw new WorkboxError_mjs.WorkboxError('statuses-or-headers-required', { + moduleName: 'workbox-cacheable-response', + className: 'CacheableResponse', + funcName: 'constructor' + }); + } + + if (config.statuses) { + assert_mjs.assert.isArray(config.statuses, { + moduleName: 'workbox-cacheable-response', + className: 'CacheableResponse', + funcName: 'constructor', + paramName: 'config.statuses' + }); + } + + if (config.headers) { + assert_mjs.assert.isType(config.headers, 'object', { + moduleName: 'workbox-cacheable-response', + className: 'CacheableResponse', + funcName: 'constructor', + paramName: 'config.headers' + }); + } + } + + this._statuses = config.statuses; + this._headers = config.headers; + } + /** + * Checks a response to see whether it's cacheable or not, based on this + * object's configuration. + * + * @param {Response} response The response whose cacheability is being + * checked. + * @return {boolean} `true` if the `Response` is cacheable, and `false` + * otherwise. + */ + + + isResponseCacheable(response) { + { + assert_mjs.assert.isInstance(response, Response, { + moduleName: 'workbox-cacheable-response', + className: 'CacheableResponse', + funcName: 'isResponseCacheable', + paramName: 'response' + }); + } + + let cacheable = true; + + if (this._statuses) { + cacheable = this._statuses.includes(response.status); + } + + if (this._headers && cacheable) { + cacheable = Object.keys(this._headers).some(headerName => { + return response.headers.get(headerName) === this._headers[headerName]; + }); + } + + { + if (!cacheable) { + logger_mjs.logger.groupCollapsed(`The request for ` + `'${getFriendlyURL_mjs.getFriendlyURL(response.url)}' returned a response that does ` + `not meet the criteria for being cached.`); + logger_mjs.logger.groupCollapsed(`View cacheability criteria here.`); + logger_mjs.logger.log(`Cacheable statuses: ` + JSON.stringify(this._statuses)); + logger_mjs.logger.log(`Cacheable headers: ` + JSON.stringify(this._headers, null, 2)); + logger_mjs.logger.groupEnd(); + const logFriendlyHeaders = {}; + response.headers.forEach((value, key) => { + logFriendlyHeaders[key] = value; + }); + logger_mjs.logger.groupCollapsed(`View response status and headers here.`); + logger_mjs.logger.log(`Response status: ` + response.status); + logger_mjs.logger.log(`Response headers: ` + JSON.stringify(logFriendlyHeaders, null, 2)); + logger_mjs.logger.groupEnd(); + logger_mjs.logger.groupCollapsed(`View full response details here.`); + logger_mjs.logger.log(response.headers); + logger_mjs.logger.log(response); + logger_mjs.logger.groupEnd(); + logger_mjs.logger.groupEnd(); + } + } + + return cacheable; + } + + } + + /* + Copyright 2018 Google LLC + + Use of this source code is governed by an MIT-style + license that can be found in the LICENSE file or at + https://opensource.org/licenses/MIT. + */ + /** + * A class implementing the `cacheWillUpdate` lifecycle callback. This makes it + * easier to add in cacheability checks to requests made via Workbox's built-in + * strategies. + * + * @memberof workbox.cacheableResponse + */ + + class Plugin { + /** + * To construct a new cacheable response Plugin instance you must provide at + * least one of the `config` properties. + * + * If both `statuses` and `headers` are specified, then both conditions must + * be met for the `Response` to be considered cacheable. + * + * @param {Object} config + * @param {Array} [config.statuses] One or more status codes that a + * `Response` can have and be considered cacheable. + * @param {Object} [config.headers] A mapping of header names + * and expected values that a `Response` can have and be considered cacheable. + * If multiple headers are provided, only one needs to be present. + */ + constructor(config) { + this._cacheableResponse = new CacheableResponse(config); + } + /** + * @param {Object} options + * @param {Response} options.response + * @return {boolean} + * @private + */ + + + cacheWillUpdate({ + response + }) { + if (this._cacheableResponse.isResponseCacheable(response)) { + return response; + } + + return null; + } + + } + + /* + Copyright 2018 Google LLC + + Use of this source code is governed by an MIT-style + license that can be found in the LICENSE file or at + https://opensource.org/licenses/MIT. + */ + + exports.CacheableResponse = CacheableResponse; + exports.Plugin = Plugin; + + return exports; + +}({}, workbox.core._private, workbox.core._private, workbox.core._private, workbox.core._private)); +//# sourceMappingURL=workbox-cacheable-response.dev.js.map diff --git a/workbox-v4.3.1/workbox-cacheable-response.dev.js.map b/workbox-v4.3.1/workbox-cacheable-response.dev.js.map new file mode 100644 index 0000000000..86bc689049 --- /dev/null +++ b/workbox-v4.3.1/workbox-cacheable-response.dev.js.map @@ -0,0 +1 @@ +{"version":3,"file":"workbox-cacheable-response.dev.js","sources":["../_version.mjs","../CacheableResponse.mjs","../Plugin.mjs","../index.mjs"],"sourcesContent":["try{self['workbox:cacheable-response:4.3.1']&&_()}catch(e){}// eslint-disable-line","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport {WorkboxError} from 'workbox-core/_private/WorkboxError.mjs';\nimport {assert} from 'workbox-core/_private/assert.mjs';\nimport {getFriendlyURL} from 'workbox-core/_private/getFriendlyURL.mjs';\nimport {logger} from 'workbox-core/_private/logger.mjs';\nimport './_version.mjs';\n\n/**\n * This class allows you to set up rules determining what\n * status codes and/or headers need to be present in order for a\n * [`Response`](https://developer.mozilla.org/en-US/docs/Web/API/Response)\n * to be considered cacheable.\n *\n * @memberof workbox.cacheableResponse\n */\nclass CacheableResponse {\n /**\n * To construct a new CacheableResponse instance you must provide at least\n * one of the `config` properties.\n *\n * If both `statuses` and `headers` are specified, then both conditions must\n * be met for the `Response` to be considered cacheable.\n *\n * @param {Object} config\n * @param {Array} [config.statuses] One or more status codes that a\n * `Response` can have and be considered cacheable.\n * @param {Object} [config.headers] A mapping of header names\n * and expected values that a `Response` can have and be considered cacheable.\n * If multiple headers are provided, only one needs to be present.\n */\n constructor(config = {}) {\n if (process.env.NODE_ENV !== 'production') {\n if (!(config.statuses || config.headers)) {\n throw new WorkboxError('statuses-or-headers-required', {\n moduleName: 'workbox-cacheable-response',\n className: 'CacheableResponse',\n funcName: 'constructor',\n });\n }\n\n if (config.statuses) {\n assert.isArray(config.statuses, {\n moduleName: 'workbox-cacheable-response',\n className: 'CacheableResponse',\n funcName: 'constructor',\n paramName: 'config.statuses',\n });\n }\n\n if (config.headers) {\n assert.isType(config.headers, 'object', {\n moduleName: 'workbox-cacheable-response',\n className: 'CacheableResponse',\n funcName: 'constructor',\n paramName: 'config.headers',\n });\n }\n }\n\n this._statuses = config.statuses;\n this._headers = config.headers;\n }\n\n /**\n * Checks a response to see whether it's cacheable or not, based on this\n * object's configuration.\n *\n * @param {Response} response The response whose cacheability is being\n * checked.\n * @return {boolean} `true` if the `Response` is cacheable, and `false`\n * otherwise.\n */\n isResponseCacheable(response) {\n if (process.env.NODE_ENV !== 'production') {\n assert.isInstance(response, Response, {\n moduleName: 'workbox-cacheable-response',\n className: 'CacheableResponse',\n funcName: 'isResponseCacheable',\n paramName: 'response',\n });\n }\n\n let cacheable = true;\n\n if (this._statuses) {\n cacheable = this._statuses.includes(response.status);\n }\n\n if (this._headers && cacheable) {\n cacheable = Object.keys(this._headers).some((headerName) => {\n return response.headers.get(headerName) === this._headers[headerName];\n });\n }\n\n if (process.env.NODE_ENV !== 'production') {\n if (!cacheable) {\n logger.groupCollapsed(`The request for ` +\n `'${getFriendlyURL(response.url)}' returned a response that does ` +\n `not meet the criteria for being cached.`);\n\n logger.groupCollapsed(`View cacheability criteria here.`);\n logger.log(`Cacheable statuses: ` +\n JSON.stringify(this._statuses));\n logger.log(`Cacheable headers: ` +\n JSON.stringify(this._headers, null, 2));\n logger.groupEnd();\n\n const logFriendlyHeaders = {};\n response.headers.forEach((value, key) => {\n logFriendlyHeaders[key] = value;\n });\n\n logger.groupCollapsed(`View response status and headers here.`);\n logger.log(`Response status: ` + response.status);\n logger.log(`Response headers: ` +\n JSON.stringify(logFriendlyHeaders, null, 2));\n logger.groupEnd();\n\n logger.groupCollapsed(`View full response details here.`);\n logger.log(response.headers);\n logger.log(response);\n logger.groupEnd();\n\n logger.groupEnd();\n }\n }\n\n return cacheable;\n }\n}\n\nexport {CacheableResponse};\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport {CacheableResponse} from './CacheableResponse.mjs';\nimport './_version.mjs';\n\n/**\n * A class implementing the `cacheWillUpdate` lifecycle callback. This makes it\n * easier to add in cacheability checks to requests made via Workbox's built-in\n * strategies.\n *\n * @memberof workbox.cacheableResponse\n */\nclass Plugin {\n /**\n * To construct a new cacheable response Plugin instance you must provide at\n * least one of the `config` properties.\n *\n * If both `statuses` and `headers` are specified, then both conditions must\n * be met for the `Response` to be considered cacheable.\n *\n * @param {Object} config\n * @param {Array} [config.statuses] One or more status codes that a\n * `Response` can have and be considered cacheable.\n * @param {Object} [config.headers] A mapping of header names\n * and expected values that a `Response` can have and be considered cacheable.\n * If multiple headers are provided, only one needs to be present.\n */\n constructor(config) {\n this._cacheableResponse = new CacheableResponse(config);\n }\n\n /**\n * @param {Object} options\n * @param {Response} options.response\n * @return {boolean}\n * @private\n */\n cacheWillUpdate({response}) {\n if (this._cacheableResponse.isResponseCacheable(response)) {\n return response;\n }\n return null;\n }\n}\n\nexport {Plugin};\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport {CacheableResponse} from './CacheableResponse.mjs';\nimport {Plugin} from './Plugin.mjs';\nimport './_version.mjs';\n\n\n/**\n * @namespace workbox.cacheableResponse\n */\n\nexport {\n CacheableResponse,\n Plugin,\n};\n"],"names":["self","_","e","CacheableResponse","constructor","config","statuses","headers","WorkboxError","moduleName","className","funcName","assert","isArray","paramName","isType","_statuses","_headers","isResponseCacheable","response","isInstance","Response","cacheable","includes","status","Object","keys","some","headerName","get","logger","groupCollapsed","getFriendlyURL","url","log","JSON","stringify","groupEnd","logFriendlyHeaders","forEach","value","key","Plugin","_cacheableResponse","cacheWillUpdate"],"mappings":";;;;EAAA,IAAG;EAACA,EAAAA,IAAI,CAAC,kCAAD,CAAJ,IAA0CC,CAAC,EAA3C;EAA8C,CAAlD,CAAkD,OAAMC,CAAN,EAAQ;;ECA1D;;;;;;;AAQA,EAMA;;;;;;;;;EAQA,MAAMC,iBAAN,CAAwB;EACtB;;;;;;;;;;;;;;EAcAC,EAAAA,WAAW,CAACC,MAAM,GAAG,EAAV,EAAc;EACvB,IAA2C;EACzC,UAAI,EAAEA,MAAM,CAACC,QAAP,IAAmBD,MAAM,CAACE,OAA5B,CAAJ,EAA0C;EACxC,cAAM,IAAIC,6BAAJ,CAAiB,8BAAjB,EAAiD;EACrDC,UAAAA,UAAU,EAAE,4BADyC;EAErDC,UAAAA,SAAS,EAAE,mBAF0C;EAGrDC,UAAAA,QAAQ,EAAE;EAH2C,SAAjD,CAAN;EAKD;;EAED,UAAIN,MAAM,CAACC,QAAX,EAAqB;EACnBM,QAA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EAP,QAAAA,iBAAM,CAACO,QAAP;EACD;EACF;;EAED,WAAOf,SAAP;EACD;;EAjHqB;;ECtBxB;;;;;;;AAQA,EAGA;;;;;;;;EAOA,MAAMoB,MAAN,CAAa;EACX;;;;;;;;;;;;;;EAcAtC,EAAAA,WAAW,CAACC,MAAD,EAAS;EAClB,SAAKsC,kBAAL,GAA0B,IAAIxC,iBAAJ,CAAsBE,MAAtB,CAA1B;EACD;EAED;;;;;;;;EAMAuC,EAAAA,eAAe,CAAC;EAACzB,IAAAA;EAAD,GAAD,EAAa;EAC1B,QAAI,KAAKwB,kBAAL,CAAwBzB,mBAAxB,CAA4CC,QAA5C,CAAJ,EAA2D;EACzD,aAAOA,QAAP;EACD;;EACD,WAAO,IAAP;EACD;;EA9BU;;EClBb;;;;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/workbox-v4.3.1/workbox-cacheable-response.prod.js b/workbox-v4.3.1/workbox-cacheable-response.prod.js new file mode 100644 index 0000000000..a7e42f263a --- /dev/null +++ b/workbox-v4.3.1/workbox-cacheable-response.prod.js @@ -0,0 +1,2 @@ +this.workbox=this.workbox||{},this.workbox.cacheableResponse=function(t){"use strict";try{self["workbox:cacheable-response:4.3.1"]&&_()}catch(t){}class s{constructor(t={}){this.t=t.statuses,this.s=t.headers}isResponseCacheable(t){let s=!0;return this.t&&(s=this.t.includes(t.status)),this.s&&s&&(s=Object.keys(this.s).some(s=>t.headers.get(s)===this.s[s])),s}}return t.CacheableResponse=s,t.Plugin=class{constructor(t){this.i=new s(t)}cacheWillUpdate({response:t}){return this.i.isResponseCacheable(t)?t:null}},t}({}); +//# sourceMappingURL=workbox-cacheable-response.prod.js.map diff --git a/workbox-v4.3.1/workbox-cacheable-response.prod.js.map b/workbox-v4.3.1/workbox-cacheable-response.prod.js.map new file mode 100644 index 0000000000..b1a0d1d2b7 --- /dev/null +++ b/workbox-v4.3.1/workbox-cacheable-response.prod.js.map @@ -0,0 +1 @@ +{"version":3,"file":"workbox-cacheable-response.prod.js","sources":["../_version.mjs","../CacheableResponse.mjs","../Plugin.mjs"],"sourcesContent":["try{self['workbox:cacheable-response:4.3.1']&&_()}catch(e){}// eslint-disable-line","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport {WorkboxError} from 'workbox-core/_private/WorkboxError.mjs';\nimport {assert} from 'workbox-core/_private/assert.mjs';\nimport {getFriendlyURL} from 'workbox-core/_private/getFriendlyURL.mjs';\nimport {logger} from 'workbox-core/_private/logger.mjs';\nimport './_version.mjs';\n\n/**\n * This class allows you to set up rules determining what\n * status codes and/or headers need to be present in order for a\n * [`Response`](https://developer.mozilla.org/en-US/docs/Web/API/Response)\n * to be considered cacheable.\n *\n * @memberof workbox.cacheableResponse\n */\nclass CacheableResponse {\n /**\n * To construct a new CacheableResponse instance you must provide at least\n * one of the `config` properties.\n *\n * If both `statuses` and `headers` are specified, then both conditions must\n * be met for the `Response` to be considered cacheable.\n *\n * @param {Object} config\n * @param {Array} [config.statuses] One or more status codes that a\n * `Response` can have and be considered cacheable.\n * @param {Object} [config.headers] A mapping of header names\n * and expected values that a `Response` can have and be considered cacheable.\n * If multiple headers are provided, only one needs to be present.\n */\n constructor(config = {}) {\n if (process.env.NODE_ENV !== 'production') {\n if (!(config.statuses || config.headers)) {\n throw new WorkboxError('statuses-or-headers-required', {\n moduleName: 'workbox-cacheable-response',\n className: 'CacheableResponse',\n funcName: 'constructor',\n });\n }\n\n if (config.statuses) {\n assert.isArray(config.statuses, {\n moduleName: 'workbox-cacheable-response',\n className: 'CacheableResponse',\n funcName: 'constructor',\n paramName: 'config.statuses',\n });\n }\n\n if (config.headers) {\n assert.isType(config.headers, 'object', {\n moduleName: 'workbox-cacheable-response',\n className: 'CacheableResponse',\n funcName: 'constructor',\n paramName: 'config.headers',\n });\n }\n }\n\n this._statuses = config.statuses;\n this._headers = config.headers;\n }\n\n /**\n * Checks a response to see whether it's cacheable or not, based on this\n * object's configuration.\n *\n * @param {Response} response The response whose cacheability is being\n * checked.\n * @return {boolean} `true` if the `Response` is cacheable, and `false`\n * otherwise.\n */\n isResponseCacheable(response) {\n if (process.env.NODE_ENV !== 'production') {\n assert.isInstance(response, Response, {\n moduleName: 'workbox-cacheable-response',\n className: 'CacheableResponse',\n funcName: 'isResponseCacheable',\n paramName: 'response',\n });\n }\n\n let cacheable = true;\n\n if (this._statuses) {\n cacheable = this._statuses.includes(response.status);\n }\n\n if (this._headers && cacheable) {\n cacheable = Object.keys(this._headers).some((headerName) => {\n return response.headers.get(headerName) === this._headers[headerName];\n });\n }\n\n if (process.env.NODE_ENV !== 'production') {\n if (!cacheable) {\n logger.groupCollapsed(`The request for ` +\n `'${getFriendlyURL(response.url)}' returned a response that does ` +\n `not meet the criteria for being cached.`);\n\n logger.groupCollapsed(`View cacheability criteria here.`);\n logger.log(`Cacheable statuses: ` +\n JSON.stringify(this._statuses));\n logger.log(`Cacheable headers: ` +\n JSON.stringify(this._headers, null, 2));\n logger.groupEnd();\n\n const logFriendlyHeaders = {};\n response.headers.forEach((value, key) => {\n logFriendlyHeaders[key] = value;\n });\n\n logger.groupCollapsed(`View response status and headers here.`);\n logger.log(`Response status: ` + response.status);\n logger.log(`Response headers: ` +\n JSON.stringify(logFriendlyHeaders, null, 2));\n logger.groupEnd();\n\n logger.groupCollapsed(`View full response details here.`);\n logger.log(response.headers);\n logger.log(response);\n logger.groupEnd();\n\n logger.groupEnd();\n }\n }\n\n return cacheable;\n }\n}\n\nexport {CacheableResponse};\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport {CacheableResponse} from './CacheableResponse.mjs';\nimport './_version.mjs';\n\n/**\n * A class implementing the `cacheWillUpdate` lifecycle callback. This makes it\n * easier to add in cacheability checks to requests made via Workbox's built-in\n * strategies.\n *\n * @memberof workbox.cacheableResponse\n */\nclass Plugin {\n /**\n * To construct a new cacheable response Plugin instance you must provide at\n * least one of the `config` properties.\n *\n * If both `statuses` and `headers` are specified, then both conditions must\n * be met for the `Response` to be considered cacheable.\n *\n * @param {Object} config\n * @param {Array} [config.statuses] One or more status codes that a\n * `Response` can have and be considered cacheable.\n * @param {Object} [config.headers] A mapping of header names\n * and expected values that a `Response` can have and be considered cacheable.\n * If multiple headers are provided, only one needs to be present.\n */\n constructor(config) {\n this._cacheableResponse = new CacheableResponse(config);\n }\n\n /**\n * @param {Object} options\n * @param {Response} options.response\n * @return {boolean}\n * @private\n */\n cacheWillUpdate({response}) {\n if (this._cacheableResponse.isResponseCacheable(response)) {\n return response;\n }\n return null;\n }\n}\n\nexport {Plugin};\n"],"names":["self","_","e","CacheableResponse","constructor","config","_statuses","statuses","_headers","headers","isResponseCacheable","response","cacheable","this","includes","status","Object","keys","some","headerName","get","_cacheableResponse","cacheWillUpdate"],"mappings":"sFAAA,IAAIA,KAAK,qCAAqCC,IAAI,MAAMC,ICsBxD,MAAMC,EAeJC,YAAYC,EAAS,SA6BdC,EAAYD,EAAOE,cACnBC,EAAWH,EAAOI,QAYzBC,oBAAoBC,OAUdC,GAAY,SAEZC,KAAKP,IACPM,EAAYC,KAAKP,EAAUQ,SAASH,EAASI,SAG3CF,KAAKL,GAAYI,IACnBA,EAAYI,OAAOC,KAAKJ,KAAKL,GAAUU,KAAMC,GACpCR,EAASF,QAAQW,IAAID,KAAgBN,KAAKL,EAASW,KAqCvDP,yCCpHX,MAeER,YAAYC,QACLgB,EAAqB,IAAIlB,EAAkBE,GASlDiB,iBAAgBX,SAACA,WACXE,KAAKQ,EAAmBX,oBAAoBC,GACvCA,EAEF"} \ No newline at end of file diff --git a/workbox-v4.3.1/workbox-core.dev.js b/workbox-v4.3.1/workbox-core.dev.js new file mode 100644 index 0000000000..18b8b85f19 --- /dev/null +++ b/workbox-v4.3.1/workbox-core.dev.js @@ -0,0 +1,1712 @@ +this.workbox = this.workbox || {}; +this.workbox.core = (function (exports) { + 'use strict'; + + try { + self['workbox:core:4.3.1'] && _(); + } catch (e) {} // eslint-disable-line + + /* + Copyright 2019 Google LLC + Use of this source code is governed by an MIT-style + license that can be found in the LICENSE file or at + https://opensource.org/licenses/MIT. + */ + const logger = (() => { + let inGroup = false; + const methodToColorMap = { + debug: `#7f8c8d`, + // Gray + log: `#2ecc71`, + // Green + warn: `#f39c12`, + // Yellow + error: `#c0392b`, + // Red + groupCollapsed: `#3498db`, + // Blue + groupEnd: null // No colored prefix on groupEnd + + }; + + const print = function (method, args) { + if (method === 'groupCollapsed') { + // Safari doesn't print all console.groupCollapsed() arguments: + // https://bugs.webkit.org/show_bug.cgi?id=182754 + if (/^((?!chrome|android).)*safari/i.test(navigator.userAgent)) { + console[method](...args); + return; + } + } + + const styles = [`background: ${methodToColorMap[method]}`, `border-radius: 0.5em`, `color: white`, `font-weight: bold`, `padding: 2px 0.5em`]; // When in a group, the workbox prefix is not displayed. + + const logPrefix = inGroup ? [] : ['%cworkbox', styles.join(';')]; + console[method](...logPrefix, ...args); + + if (method === 'groupCollapsed') { + inGroup = true; + } + + if (method === 'groupEnd') { + inGroup = false; + } + }; + + const api = {}; + + for (const method of Object.keys(methodToColorMap)) { + api[method] = (...args) => { + print(method, args); + }; + } + + return api; + })(); + + /* + Copyright 2018 Google LLC + + Use of this source code is governed by an MIT-style + license that can be found in the LICENSE file or at + https://opensource.org/licenses/MIT. + */ + const messages = { + 'invalid-value': ({ + paramName, + validValueDescription, + value + }) => { + if (!paramName || !validValueDescription) { + throw new Error(`Unexpected input to 'invalid-value' error.`); + } + + return `The '${paramName}' parameter was given a value with an ` + `unexpected value. ${validValueDescription} Received a value of ` + `${JSON.stringify(value)}.`; + }, + 'not-in-sw': ({ + moduleName + }) => { + if (!moduleName) { + throw new Error(`Unexpected input to 'not-in-sw' error.`); + } + + return `The '${moduleName}' must be used in a service worker.`; + }, + 'not-an-array': ({ + moduleName, + className, + funcName, + paramName + }) => { + if (!moduleName || !className || !funcName || !paramName) { + throw new Error(`Unexpected input to 'not-an-array' error.`); + } + + return `The parameter '${paramName}' passed into ` + `'${moduleName}.${className}.${funcName}()' must be an array.`; + }, + 'incorrect-type': ({ + expectedType, + paramName, + moduleName, + className, + funcName + }) => { + if (!expectedType || !paramName || !moduleName || !funcName) { + throw new Error(`Unexpected input to 'incorrect-type' error.`); + } + + return `The parameter '${paramName}' passed into ` + `'${moduleName}.${className ? className + '.' : ''}` + `${funcName}()' must be of type ${expectedType}.`; + }, + 'incorrect-class': ({ + expectedClass, + paramName, + moduleName, + className, + funcName, + isReturnValueProblem + }) => { + if (!expectedClass || !moduleName || !funcName) { + throw new Error(`Unexpected input to 'incorrect-class' error.`); + } + + if (isReturnValueProblem) { + return `The return value from ` + `'${moduleName}.${className ? className + '.' : ''}${funcName}()' ` + `must be an instance of class ${expectedClass.name}.`; + } + + return `The parameter '${paramName}' passed into ` + `'${moduleName}.${className ? className + '.' : ''}${funcName}()' ` + `must be an instance of class ${expectedClass.name}.`; + }, + 'missing-a-method': ({ + expectedMethod, + paramName, + moduleName, + className, + funcName + }) => { + if (!expectedMethod || !paramName || !moduleName || !className || !funcName) { + throw new Error(`Unexpected input to 'missing-a-method' error.`); + } + + return `${moduleName}.${className}.${funcName}() expected the ` + `'${paramName}' parameter to expose a '${expectedMethod}' method.`; + }, + 'add-to-cache-list-unexpected-type': ({ + entry + }) => { + return `An unexpected entry was passed to ` + `'workbox-precaching.PrecacheController.addToCacheList()' The entry ` + `'${JSON.stringify(entry)}' isn't supported. You must supply an array of ` + `strings with one or more characters, objects with a url property or ` + `Request objects.`; + }, + 'add-to-cache-list-conflicting-entries': ({ + firstEntry, + secondEntry + }) => { + if (!firstEntry || !secondEntry) { + throw new Error(`Unexpected input to ` + `'add-to-cache-list-duplicate-entries' error.`); + } + + return `Two of the entries passed to ` + `'workbox-precaching.PrecacheController.addToCacheList()' had the URL ` + `${firstEntry._entryId} but different revision details. Workbox is ` + `is unable to cache and version the asset correctly. Please remove one ` + `of the entries.`; + }, + 'plugin-error-request-will-fetch': ({ + thrownError + }) => { + if (!thrownError) { + throw new Error(`Unexpected input to ` + `'plugin-error-request-will-fetch', error.`); + } + + return `An error was thrown by a plugins 'requestWillFetch()' method. ` + `The thrown error message was: '${thrownError.message}'.`; + }, + 'invalid-cache-name': ({ + cacheNameId, + value + }) => { + if (!cacheNameId) { + throw new Error(`Expected a 'cacheNameId' for error 'invalid-cache-name'`); + } + + return `You must provide a name containing at least one character for ` + `setCacheDeatils({${cacheNameId}: '...'}). Received a value of ` + `'${JSON.stringify(value)}'`; + }, + 'unregister-route-but-not-found-with-method': ({ + method + }) => { + if (!method) { + throw new Error(`Unexpected input to ` + `'unregister-route-but-not-found-with-method' error.`); + } + + return `The route you're trying to unregister was not previously ` + `registered for the method type '${method}'.`; + }, + 'unregister-route-route-not-registered': () => { + return `The route you're trying to unregister was not previously ` + `registered.`; + }, + 'queue-replay-failed': ({ + name + }) => { + return `Replaying the background sync queue '${name}' failed.`; + }, + 'duplicate-queue-name': ({ + name + }) => { + return `The Queue name '${name}' is already being used. ` + `All instances of backgroundSync.Queue must be given unique names.`; + }, + 'expired-test-without-max-age': ({ + methodName, + paramName + }) => { + return `The '${methodName}()' method can only be used when the ` + `'${paramName}' is used in the constructor.`; + }, + 'unsupported-route-type': ({ + moduleName, + className, + funcName, + paramName + }) => { + return `The supplied '${paramName}' parameter was an unsupported type. ` + `Please check the docs for ${moduleName}.${className}.${funcName} for ` + `valid input types.`; + }, + 'not-array-of-class': ({ + value, + expectedClass, + moduleName, + className, + funcName, + paramName + }) => { + return `The supplied '${paramName}' parameter must be an array of ` + `'${expectedClass}' objects. Received '${JSON.stringify(value)},'. ` + `Please check the call to ${moduleName}.${className}.${funcName}() ` + `to fix the issue.`; + }, + 'max-entries-or-age-required': ({ + moduleName, + className, + funcName + }) => { + return `You must define either config.maxEntries or config.maxAgeSeconds` + `in ${moduleName}.${className}.${funcName}`; + }, + 'statuses-or-headers-required': ({ + moduleName, + className, + funcName + }) => { + return `You must define either config.statuses or config.headers` + `in ${moduleName}.${className}.${funcName}`; + }, + 'invalid-string': ({ + moduleName, + className, + funcName, + paramName + }) => { + if (!paramName || !moduleName || !funcName) { + throw new Error(`Unexpected input to 'invalid-string' error.`); + } + + return `When using strings, the '${paramName}' parameter must start with ` + `'http' (for cross-origin matches) or '/' (for same-origin matches). ` + `Please see the docs for ${moduleName}.${funcName}() for ` + `more info.`; + }, + 'channel-name-required': () => { + return `You must provide a channelName to construct a ` + `BroadcastCacheUpdate instance.`; + }, + 'invalid-responses-are-same-args': () => { + return `The arguments passed into responsesAreSame() appear to be ` + `invalid. Please ensure valid Responses are used.`; + }, + 'expire-custom-caches-only': () => { + return `You must provide a 'cacheName' property when using the ` + `expiration plugin with a runtime caching strategy.`; + }, + 'unit-must-be-bytes': ({ + normalizedRangeHeader + }) => { + if (!normalizedRangeHeader) { + throw new Error(`Unexpected input to 'unit-must-be-bytes' error.`); + } + + return `The 'unit' portion of the Range header must be set to 'bytes'. ` + `The Range header provided was "${normalizedRangeHeader}"`; + }, + 'single-range-only': ({ + normalizedRangeHeader + }) => { + if (!normalizedRangeHeader) { + throw new Error(`Unexpected input to 'single-range-only' error.`); + } + + return `Multiple ranges are not supported. Please use a single start ` + `value, and optional end value. The Range header provided was ` + `"${normalizedRangeHeader}"`; + }, + 'invalid-range-values': ({ + normalizedRangeHeader + }) => { + if (!normalizedRangeHeader) { + throw new Error(`Unexpected input to 'invalid-range-values' error.`); + } + + return `The Range header is missing both start and end values. At least ` + `one of those values is needed. The Range header provided was ` + `"${normalizedRangeHeader}"`; + }, + 'no-range-header': () => { + return `No Range header was found in the Request provided.`; + }, + 'range-not-satisfiable': ({ + size, + start, + end + }) => { + return `The start (${start}) and end (${end}) values in the Range are ` + `not satisfiable by the cached response, which is ${size} bytes.`; + }, + 'attempt-to-cache-non-get-request': ({ + url, + method + }) => { + return `Unable to cache '${url}' because it is a '${method}' request and ` + `only 'GET' requests can be cached.`; + }, + 'cache-put-with-no-response': ({ + url + }) => { + return `There was an attempt to cache '${url}' but the response was not ` + `defined.`; + }, + 'no-response': ({ + url, + error + }) => { + let message = `The strategy could not generate a response for '${url}'.`; + + if (error) { + message += ` The underlying error is ${error}.`; + } + + return message; + }, + 'bad-precaching-response': ({ + url, + status + }) => { + return `The precaching request for '${url}' failed with an HTTP ` + `status of ${status}.`; + } + }; + + /* + Copyright 2018 Google LLC + + Use of this source code is governed by an MIT-style + license that can be found in the LICENSE file or at + https://opensource.org/licenses/MIT. + */ + + const generatorFunction = (code, ...args) => { + const message = messages[code]; + + if (!message) { + throw new Error(`Unable to find message for code '${code}'.`); + } + + return message(...args); + }; + + const messageGenerator = generatorFunction; + + /* + Copyright 2018 Google LLC + + Use of this source code is governed by an MIT-style + license that can be found in the LICENSE file or at + https://opensource.org/licenses/MIT. + */ + /** + * Workbox errors should be thrown with this class. + * This allows use to ensure the type easily in tests, + * helps developers identify errors from workbox + * easily and allows use to optimise error + * messages correctly. + * + * @private + */ + + class WorkboxError extends Error { + /** + * + * @param {string} errorCode The error code that + * identifies this particular error. + * @param {Object=} details Any relevant arguments + * that will help developers identify issues should + * be added as a key on the context object. + */ + constructor(errorCode, details) { + let message = messageGenerator(errorCode, details); + super(message); + this.name = errorCode; + this.details = details; + } + + } + + /* + Copyright 2018 Google LLC + + Use of this source code is governed by an MIT-style + license that can be found in the LICENSE file or at + https://opensource.org/licenses/MIT. + */ + /* + * This method returns true if the current context is a service worker. + */ + + const isSWEnv = moduleName => { + if (!('ServiceWorkerGlobalScope' in self)) { + throw new WorkboxError('not-in-sw', { + moduleName + }); + } + }; + /* + * This method throws if the supplied value is not an array. + * The destructed values are required to produce a meaningful error for users. + * The destructed and restructured object is so it's clear what is + * needed. + */ + + + const isArray = (value, { + moduleName, + className, + funcName, + paramName + }) => { + if (!Array.isArray(value)) { + throw new WorkboxError('not-an-array', { + moduleName, + className, + funcName, + paramName + }); + } + }; + + const hasMethod = (object, expectedMethod, { + moduleName, + className, + funcName, + paramName + }) => { + const type = typeof object[expectedMethod]; + + if (type !== 'function') { + throw new WorkboxError('missing-a-method', { + paramName, + expectedMethod, + moduleName, + className, + funcName + }); + } + }; + + const isType = (object, expectedType, { + moduleName, + className, + funcName, + paramName + }) => { + if (typeof object !== expectedType) { + throw new WorkboxError('incorrect-type', { + paramName, + expectedType, + moduleName, + className, + funcName + }); + } + }; + + const isInstance = (object, expectedClass, { + moduleName, + className, + funcName, + paramName, + isReturnValueProblem + }) => { + if (!(object instanceof expectedClass)) { + throw new WorkboxError('incorrect-class', { + paramName, + expectedClass, + moduleName, + className, + funcName, + isReturnValueProblem + }); + } + }; + + const isOneOf = (value, validValues, { + paramName + }) => { + if (!validValues.includes(value)) { + throw new WorkboxError('invalid-value', { + paramName, + value, + validValueDescription: `Valid values are ${JSON.stringify(validValues)}.` + }); + } + }; + + const isArrayOfClass = (value, expectedClass, { + moduleName, + className, + funcName, + paramName + }) => { + const error = new WorkboxError('not-array-of-class', { + value, + expectedClass, + moduleName, + className, + funcName, + paramName + }); + + if (!Array.isArray(value)) { + throw error; + } + + for (let item of value) { + if (!(item instanceof expectedClass)) { + throw error; + } + } + }; + + const finalAssertExports = { + hasMethod, + isArray, + isInstance, + isOneOf, + isSWEnv, + isType, + isArrayOfClass + }; + + /* + Copyright 2018 Google LLC + + Use of this source code is governed by an MIT-style + license that can be found in the LICENSE file or at + https://opensource.org/licenses/MIT. + */ + + const quotaErrorCallbacks = new Set(); + + /* + Copyright 2019 Google LLC + + Use of this source code is governed by an MIT-style + license that can be found in the LICENSE file or at + https://opensource.org/licenses/MIT. + */ + /** + * Adds a function to the set of quotaErrorCallbacks that will be executed if + * there's a quota error. + * + * @param {Function} callback + * @memberof workbox.core + */ + + function registerQuotaErrorCallback(callback) { + { + finalAssertExports.isType(callback, 'function', { + moduleName: 'workbox-core', + funcName: 'register', + paramName: 'callback' + }); + } + + quotaErrorCallbacks.add(callback); + + { + logger.log('Registered a callback to respond to quota errors.', callback); + } + } + + /* + Copyright 2018 Google LLC + + Use of this source code is governed by an MIT-style + license that can be found in the LICENSE file or at + https://opensource.org/licenses/MIT. + */ + const _cacheNameDetails = { + googleAnalytics: 'googleAnalytics', + precache: 'precache-v2', + prefix: 'workbox', + runtime: 'runtime', + suffix: self.registration.scope + }; + + const _createCacheName = cacheName => { + return [_cacheNameDetails.prefix, cacheName, _cacheNameDetails.suffix].filter(value => value.length > 0).join('-'); + }; + + const cacheNames = { + updateDetails: details => { + Object.keys(_cacheNameDetails).forEach(key => { + if (typeof details[key] !== 'undefined') { + _cacheNameDetails[key] = details[key]; + } + }); + }, + getGoogleAnalyticsName: userCacheName => { + return userCacheName || _createCacheName(_cacheNameDetails.googleAnalytics); + }, + getPrecacheName: userCacheName => { + return userCacheName || _createCacheName(_cacheNameDetails.precache); + }, + getPrefix: () => { + return _cacheNameDetails.prefix; + }, + getRuntimeName: userCacheName => { + return userCacheName || _createCacheName(_cacheNameDetails.runtime); + }, + getSuffix: () => { + return _cacheNameDetails.suffix; + } + }; + + /* + Copyright 2018 Google LLC + + Use of this source code is governed by an MIT-style + license that can be found in the LICENSE file or at + https://opensource.org/licenses/MIT. + */ + + const getFriendlyURL = url => { + const urlObj = new URL(url, location); + + if (urlObj.origin === location.origin) { + return urlObj.pathname; + } + + return urlObj.href; + }; + + /* + Copyright 2018 Google LLC + + Use of this source code is governed by an MIT-style + license that can be found in the LICENSE file or at + https://opensource.org/licenses/MIT. + */ + /** + * Runs all of the callback functions, one at a time sequentially, in the order + * in which they were registered. + * + * @memberof workbox.core + * @private + */ + + async function executeQuotaErrorCallbacks() { + { + logger.log(`About to run ${quotaErrorCallbacks.size} ` + `callbacks to clean up caches.`); + } + + for (const callback of quotaErrorCallbacks) { + await callback(); + + { + logger.log(callback, 'is complete.'); + } + } + + { + logger.log('Finished running callbacks.'); + } + } + + /* + Copyright 2018 Google LLC + + Use of this source code is governed by an MIT-style + license that can be found in the LICENSE file or at + https://opensource.org/licenses/MIT. + */ + const pluginEvents = { + CACHE_DID_UPDATE: 'cacheDidUpdate', + CACHE_KEY_WILL_BE_USED: 'cacheKeyWillBeUsed', + CACHE_WILL_UPDATE: 'cacheWillUpdate', + CACHED_RESPONSE_WILL_BE_USED: 'cachedResponseWillBeUsed', + FETCH_DID_FAIL: 'fetchDidFail', + FETCH_DID_SUCCEED: 'fetchDidSucceed', + REQUEST_WILL_FETCH: 'requestWillFetch' + }; + + /* + Copyright 2018 Google LLC + + Use of this source code is governed by an MIT-style + license that can be found in the LICENSE file or at + https://opensource.org/licenses/MIT. + */ + const pluginUtils = { + filter: (plugins, callbackName) => { + return plugins.filter(plugin => callbackName in plugin); + } + }; + + /* + Copyright 2018 Google LLC + + Use of this source code is governed by an MIT-style + license that can be found in the LICENSE file or at + https://opensource.org/licenses/MIT. + */ + /** + * Wrapper around cache.put(). + * + * Will call `cacheDidUpdate` on plugins if the cache was updated, using + * `matchOptions` when determining what the old entry is. + * + * @param {Object} options + * @param {string} options.cacheName + * @param {Request} options.request + * @param {Response} options.response + * @param {Event} [options.event] + * @param {Array} [options.plugins=[]] + * @param {Object} [options.matchOptions] + * + * @private + * @memberof module:workbox-core + */ + + const putWrapper = async ({ + cacheName, + request, + response, + event, + plugins = [], + matchOptions + } = {}) => { + { + if (request.method && request.method !== 'GET') { + throw new WorkboxError('attempt-to-cache-non-get-request', { + url: getFriendlyURL(request.url), + method: request.method + }); + } + } + + const effectiveRequest = await _getEffectiveRequest({ + plugins, + request, + mode: 'write' + }); + + if (!response) { + { + logger.error(`Cannot cache non-existent response for ` + `'${getFriendlyURL(effectiveRequest.url)}'.`); + } + + throw new WorkboxError('cache-put-with-no-response', { + url: getFriendlyURL(effectiveRequest.url) + }); + } + + let responseToCache = await _isResponseSafeToCache({ + event, + plugins, + response, + request: effectiveRequest + }); + + if (!responseToCache) { + { + logger.debug(`Response '${getFriendlyURL(effectiveRequest.url)}' will ` + `not be cached.`, responseToCache); + } + + return; + } + + const cache = await caches.open(cacheName); + const updatePlugins = pluginUtils.filter(plugins, pluginEvents.CACHE_DID_UPDATE); + let oldResponse = updatePlugins.length > 0 ? await matchWrapper({ + cacheName, + matchOptions, + request: effectiveRequest + }) : null; + + { + logger.debug(`Updating the '${cacheName}' cache with a new Response for ` + `${getFriendlyURL(effectiveRequest.url)}.`); + } + + try { + await cache.put(effectiveRequest, responseToCache); + } catch (error) { + // See https://developer.mozilla.org/en-US/docs/Web/API/DOMException#exception-QuotaExceededError + if (error.name === 'QuotaExceededError') { + await executeQuotaErrorCallbacks(); + } + + throw error; + } + + for (let plugin of updatePlugins) { + await plugin[pluginEvents.CACHE_DID_UPDATE].call(plugin, { + cacheName, + event, + oldResponse, + newResponse: responseToCache, + request: effectiveRequest + }); + } + }; + /** + * This is a wrapper around cache.match(). + * + * @param {Object} options + * @param {string} options.cacheName Name of the cache to match against. + * @param {Request} options.request The Request that will be used to look up + * cache entries. + * @param {Event} [options.event] The event that propted the action. + * @param {Object} [options.matchOptions] Options passed to cache.match(). + * @param {Array} [options.plugins=[]] Array of plugins. + * @return {Response} A cached response if available. + * + * @private + * @memberof module:workbox-core + */ + + + const matchWrapper = async ({ + cacheName, + request, + event, + matchOptions, + plugins = [] + }) => { + const cache = await caches.open(cacheName); + const effectiveRequest = await _getEffectiveRequest({ + plugins, + request, + mode: 'read' + }); + let cachedResponse = await cache.match(effectiveRequest, matchOptions); + + { + if (cachedResponse) { + logger.debug(`Found a cached response in '${cacheName}'.`); + } else { + logger.debug(`No cached response found in '${cacheName}'.`); + } + } + + for (const plugin of plugins) { + if (pluginEvents.CACHED_RESPONSE_WILL_BE_USED in plugin) { + cachedResponse = await plugin[pluginEvents.CACHED_RESPONSE_WILL_BE_USED].call(plugin, { + cacheName, + event, + matchOptions, + cachedResponse, + request: effectiveRequest + }); + + { + if (cachedResponse) { + finalAssertExports.isInstance(cachedResponse, Response, { + moduleName: 'Plugin', + funcName: pluginEvents.CACHED_RESPONSE_WILL_BE_USED, + isReturnValueProblem: true + }); + } + } + } + } + + return cachedResponse; + }; + /** + * This method will call cacheWillUpdate on the available plugins (or use + * status === 200) to determine if the Response is safe and valid to cache. + * + * @param {Object} options + * @param {Request} options.request + * @param {Response} options.response + * @param {Event} [options.event] + * @param {Array} [options.plugins=[]] + * @return {Promise} + * + * @private + * @memberof module:workbox-core + */ + + + const _isResponseSafeToCache = async ({ + request, + response, + event, + plugins + }) => { + let responseToCache = response; + let pluginsUsed = false; + + for (let plugin of plugins) { + if (pluginEvents.CACHE_WILL_UPDATE in plugin) { + pluginsUsed = true; + responseToCache = await plugin[pluginEvents.CACHE_WILL_UPDATE].call(plugin, { + request, + response: responseToCache, + event + }); + + { + if (responseToCache) { + finalAssertExports.isInstance(responseToCache, Response, { + moduleName: 'Plugin', + funcName: pluginEvents.CACHE_WILL_UPDATE, + isReturnValueProblem: true + }); + } + } + + if (!responseToCache) { + break; + } + } + } + + if (!pluginsUsed) { + { + if (!responseToCache.status === 200) { + if (responseToCache.status === 0) { + logger.warn(`The response for '${request.url}' is an opaque ` + `response. The caching strategy that you're using will not ` + `cache opaque responses by default.`); + } else { + logger.debug(`The response for '${request.url}' returned ` + `a status code of '${response.status}' and won't be cached as a ` + `result.`); + } + } + } + + responseToCache = responseToCache.status === 200 ? responseToCache : null; + } + + return responseToCache ? responseToCache : null; + }; + /** + * Checks the list of plugins for the cacheKeyWillBeUsed callback, and + * executes any of those callbacks found in sequence. The final `Request` object + * returned by the last plugin is treated as the cache key for cache reads + * and/or writes. + * + * @param {Object} options + * @param {Request} options.request + * @param {string} options.mode + * @param {Array} [options.plugins=[]] + * @return {Promise} + * + * @private + * @memberof module:workbox-core + */ + + + const _getEffectiveRequest = async ({ + request, + mode, + plugins + }) => { + const cacheKeyWillBeUsedPlugins = pluginUtils.filter(plugins, pluginEvents.CACHE_KEY_WILL_BE_USED); + let effectiveRequest = request; + + for (const plugin of cacheKeyWillBeUsedPlugins) { + effectiveRequest = await plugin[pluginEvents.CACHE_KEY_WILL_BE_USED].call(plugin, { + mode, + request: effectiveRequest + }); + + if (typeof effectiveRequest === 'string') { + effectiveRequest = new Request(effectiveRequest); + } + + { + finalAssertExports.isInstance(effectiveRequest, Request, { + moduleName: 'Plugin', + funcName: pluginEvents.CACHE_KEY_WILL_BE_USED, + isReturnValueProblem: true + }); + } + } + + return effectiveRequest; + }; + + const cacheWrapper = { + put: putWrapper, + match: matchWrapper + }; + + /* + Copyright 2018 Google LLC + + Use of this source code is governed by an MIT-style + license that can be found in the LICENSE file or at + https://opensource.org/licenses/MIT. + */ + /** + * A class that wraps common IndexedDB functionality in a promise-based API. + * It exposes all the underlying power and functionality of IndexedDB, but + * wraps the most commonly used features in a way that's much simpler to use. + * + * @private + */ + + class DBWrapper { + /** + * @param {string} name + * @param {number} version + * @param {Object=} [callback] + * @param {!Function} [callbacks.onupgradeneeded] + * @param {!Function} [callbacks.onversionchange] Defaults to + * DBWrapper.prototype._onversionchange when not specified. + * @private + */ + constructor(name, version, { + onupgradeneeded, + onversionchange = this._onversionchange + } = {}) { + this._name = name; + this._version = version; + this._onupgradeneeded = onupgradeneeded; + this._onversionchange = onversionchange; // If this is null, it means the database isn't open. + + this._db = null; + } + /** + * Returns the IDBDatabase instance (not normally needed). + * + * @private + */ + + + get db() { + return this._db; + } + /** + * Opens a connected to an IDBDatabase, invokes any onupgradedneeded + * callback, and added an onversionchange callback to the database. + * + * @return {IDBDatabase} + * @private + */ + + + async open() { + if (this._db) return; + this._db = await new Promise((resolve, reject) => { + // This flag is flipped to true if the timeout callback runs prior + // to the request failing or succeeding. Note: we use a timeout instead + // of an onblocked handler since there are cases where onblocked will + // never never run. A timeout better handles all possible scenarios: + // https://github.com/w3c/IndexedDB/issues/223 + let openRequestTimedOut = false; + setTimeout(() => { + openRequestTimedOut = true; + reject(new Error('The open request was blocked and timed out')); + }, this.OPEN_TIMEOUT); + const openRequest = indexedDB.open(this._name, this._version); + + openRequest.onerror = () => reject(openRequest.error); + + openRequest.onupgradeneeded = evt => { + if (openRequestTimedOut) { + openRequest.transaction.abort(); + evt.target.result.close(); + } else if (this._onupgradeneeded) { + this._onupgradeneeded(evt); + } + }; + + openRequest.onsuccess = ({ + target + }) => { + const db = target.result; + + if (openRequestTimedOut) { + db.close(); + } else { + db.onversionchange = this._onversionchange.bind(this); + resolve(db); + } + }; + }); + return this; + } + /** + * Polyfills the native `getKey()` method. Note, this is overridden at + * runtime if the browser supports the native method. + * + * @param {string} storeName + * @param {*} query + * @return {Array} + * @private + */ + + + async getKey(storeName, query) { + return (await this.getAllKeys(storeName, query, 1))[0]; + } + /** + * Polyfills the native `getAll()` method. Note, this is overridden at + * runtime if the browser supports the native method. + * + * @param {string} storeName + * @param {*} query + * @param {number} count + * @return {Array} + * @private + */ + + + async getAll(storeName, query, count) { + return await this.getAllMatching(storeName, { + query, + count + }); + } + /** + * Polyfills the native `getAllKeys()` method. Note, this is overridden at + * runtime if the browser supports the native method. + * + * @param {string} storeName + * @param {*} query + * @param {number} count + * @return {Array} + * @private + */ + + + async getAllKeys(storeName, query, count) { + return (await this.getAllMatching(storeName, { + query, + count, + includeKeys: true + })).map(({ + key + }) => key); + } + /** + * Supports flexible lookup in an object store by specifying an index, + * query, direction, and count. This method returns an array of objects + * with the signature . + * + * @param {string} storeName + * @param {Object} [opts] + * @param {string} [opts.index] The index to use (if specified). + * @param {*} [opts.query] + * @param {IDBCursorDirection} [opts.direction] + * @param {number} [opts.count] The max number of results to return. + * @param {boolean} [opts.includeKeys] When true, the structure of the + * returned objects is changed from an array of values to an array of + * objects in the form {key, primaryKey, value}. + * @return {Array} + * @private + */ + + + async getAllMatching(storeName, { + index, + query = null, + // IE errors if query === `undefined`. + direction = 'next', + count, + includeKeys + } = {}) { + return await this.transaction([storeName], 'readonly', (txn, done) => { + const store = txn.objectStore(storeName); + const target = index ? store.index(index) : store; + const results = []; + + target.openCursor(query, direction).onsuccess = ({ + target + }) => { + const cursor = target.result; + + if (cursor) { + const { + primaryKey, + key, + value + } = cursor; + results.push(includeKeys ? { + primaryKey, + key, + value + } : value); + + if (count && results.length >= count) { + done(results); + } else { + cursor.continue(); + } + } else { + done(results); + } + }; + }); + } + /** + * Accepts a list of stores, a transaction type, and a callback and + * performs a transaction. A promise is returned that resolves to whatever + * value the callback chooses. The callback holds all the transaction logic + * and is invoked with two arguments: + * 1. The IDBTransaction object + * 2. A `done` function, that's used to resolve the promise when + * when the transaction is done, if passed a value, the promise is + * resolved to that value. + * + * @param {Array} storeNames An array of object store names + * involved in the transaction. + * @param {string} type Can be `readonly` or `readwrite`. + * @param {!Function} callback + * @return {*} The result of the transaction ran by the callback. + * @private + */ + + + async transaction(storeNames, type, callback) { + await this.open(); + return await new Promise((resolve, reject) => { + const txn = this._db.transaction(storeNames, type); + + txn.onabort = ({ + target + }) => reject(target.error); + + txn.oncomplete = () => resolve(); + + callback(txn, value => resolve(value)); + }); + } + /** + * Delegates async to a native IDBObjectStore method. + * + * @param {string} method The method name. + * @param {string} storeName The object store name. + * @param {string} type Can be `readonly` or `readwrite`. + * @param {...*} args The list of args to pass to the native method. + * @return {*} The result of the transaction. + * @private + */ + + + async _call(method, storeName, type, ...args) { + const callback = (txn, done) => { + txn.objectStore(storeName)[method](...args).onsuccess = ({ + target + }) => { + done(target.result); + }; + }; + + return await this.transaction([storeName], type, callback); + } + /** + * The default onversionchange handler, which closes the database so other + * connections can open without being blocked. + * + * @private + */ + + + _onversionchange() { + this.close(); + } + /** + * Closes the connection opened by `DBWrapper.open()`. Generally this method + * doesn't need to be called since: + * 1. It's usually better to keep a connection open since opening + * a new connection is somewhat slow. + * 2. Connections are automatically closed when the reference is + * garbage collected. + * The primary use case for needing to close a connection is when another + * reference (typically in another tab) needs to upgrade it and would be + * blocked by the current, open connection. + * + * @private + */ + + + close() { + if (this._db) { + this._db.close(); + + this._db = null; + } + } + + } // Exposed to let users modify the default timeout on a per-instance + // or global basis. + + DBWrapper.prototype.OPEN_TIMEOUT = 2000; // Wrap native IDBObjectStore methods according to their mode. + + const methodsToWrap = { + 'readonly': ['get', 'count', 'getKey', 'getAll', 'getAllKeys'], + 'readwrite': ['add', 'put', 'clear', 'delete'] + }; + + for (const [mode, methods] of Object.entries(methodsToWrap)) { + for (const method of methods) { + if (method in IDBObjectStore.prototype) { + // Don't use arrow functions here since we're outside of the class. + DBWrapper.prototype[method] = async function (storeName, ...args) { + return await this._call(method, storeName, mode, ...args); + }; + } + } + } + + /* + Copyright 2018 Google LLC + + Use of this source code is governed by an MIT-style + license that can be found in the LICENSE file or at + https://opensource.org/licenses/MIT. + */ + /** + * The Deferred class composes Promises in a way that allows for them to be + * resolved or rejected from outside the constructor. In most cases promises + * should be used directly, but Deferreds can be necessary when the logic to + * resolve a promise must be separate. + * + * @private + */ + + class Deferred { + /** + * Creates a promise and exposes its resolve and reject functions as methods. + */ + constructor() { + this.promise = new Promise((resolve, reject) => { + this.resolve = resolve; + this.reject = reject; + }); + } + + } + + /* + Copyright 2018 Google LLC + + Use of this source code is governed by an MIT-style + license that can be found in the LICENSE file or at + https://opensource.org/licenses/MIT. + */ + /** + * Deletes the database. + * Note: this is exported separately from the DBWrapper module because most + * usages of IndexedDB in workbox dont need deleting, and this way it can be + * reused in tests to delete databases without creating DBWrapper instances. + * + * @param {string} name The database name. + * @private + */ + + const deleteDatabase = async name => { + await new Promise((resolve, reject) => { + const request = indexedDB.deleteDatabase(name); + + request.onerror = ({ + target + }) => { + reject(target.error); + }; + + request.onblocked = () => { + reject(new Error('Delete blocked')); + }; + + request.onsuccess = () => { + resolve(); + }; + }); + }; + + /* + Copyright 2018 Google LLC + + Use of this source code is governed by an MIT-style + license that can be found in the LICENSE file or at + https://opensource.org/licenses/MIT. + */ + /** + * Wrapper around the fetch API. + * + * Will call requestWillFetch on available plugins. + * + * @param {Object} options + * @param {Request|string} options.request + * @param {Object} [options.fetchOptions] + * @param {Event} [options.event] + * @param {Array} [options.plugins=[]] + * @return {Promise} + * + * @private + * @memberof module:workbox-core + */ + + const wrappedFetch = async ({ + request, + fetchOptions, + event, + plugins = [] + }) => { + // We *should* be able to call `await event.preloadResponse` even if it's + // undefined, but for some reason, doing so leads to errors in our Node unit + // tests. To work around that, explicitly check preloadResponse's value first. + if (event && event.preloadResponse) { + const possiblePreloadResponse = await event.preloadResponse; + + if (possiblePreloadResponse) { + { + logger.log(`Using a preloaded navigation response for ` + `'${getFriendlyURL(request.url)}'`); + } + + return possiblePreloadResponse; + } + } + + if (typeof request === 'string') { + request = new Request(request); + } + + { + finalAssertExports.isInstance(request, Request, { + paramName: request, + expectedClass: 'Request', + moduleName: 'workbox-core', + className: 'fetchWrapper', + funcName: 'wrappedFetch' + }); + } + + const failedFetchPlugins = pluginUtils.filter(plugins, pluginEvents.FETCH_DID_FAIL); // If there is a fetchDidFail plugin, we need to save a clone of the + // original request before it's either modified by a requestWillFetch + // plugin or before the original request's body is consumed via fetch(). + + const originalRequest = failedFetchPlugins.length > 0 ? request.clone() : null; + + try { + for (let plugin of plugins) { + if (pluginEvents.REQUEST_WILL_FETCH in plugin) { + request = await plugin[pluginEvents.REQUEST_WILL_FETCH].call(plugin, { + request: request.clone(), + event + }); + + { + if (request) { + finalAssertExports.isInstance(request, Request, { + moduleName: 'Plugin', + funcName: pluginEvents.CACHED_RESPONSE_WILL_BE_USED, + isReturnValueProblem: true + }); + } + } + } + } + } catch (err) { + throw new WorkboxError('plugin-error-request-will-fetch', { + thrownError: err + }); + } // The request can be altered by plugins with `requestWillFetch` making + // the original request (Most likely from a `fetch` event) to be different + // to the Request we make. Pass both to `fetchDidFail` to aid debugging. + + + let pluginFilteredRequest = request.clone(); + + try { + let fetchResponse; // See https://github.com/GoogleChrome/workbox/issues/1796 + + if (request.mode === 'navigate') { + fetchResponse = await fetch(request); + } else { + fetchResponse = await fetch(request, fetchOptions); + } + + { + logger.debug(`Network request for ` + `'${getFriendlyURL(request.url)}' returned a response with ` + `status '${fetchResponse.status}'.`); + } + + for (const plugin of plugins) { + if (pluginEvents.FETCH_DID_SUCCEED in plugin) { + fetchResponse = await plugin[pluginEvents.FETCH_DID_SUCCEED].call(plugin, { + event, + request: pluginFilteredRequest, + response: fetchResponse + }); + + { + if (fetchResponse) { + finalAssertExports.isInstance(fetchResponse, Response, { + moduleName: 'Plugin', + funcName: pluginEvents.FETCH_DID_SUCCEED, + isReturnValueProblem: true + }); + } + } + } + } + + return fetchResponse; + } catch (error) { + { + logger.error(`Network request for ` + `'${getFriendlyURL(request.url)}' threw an error.`, error); + } + + for (const plugin of failedFetchPlugins) { + await plugin[pluginEvents.FETCH_DID_FAIL].call(plugin, { + error, + event, + originalRequest: originalRequest.clone(), + request: pluginFilteredRequest.clone() + }); + } + + throw error; + } + }; + + const fetchWrapper = { + fetch: wrappedFetch + }; + + /* + Copyright 2018 Google LLC + + Use of this source code is governed by an MIT-style + license that can be found in the LICENSE file or at + https://opensource.org/licenses/MIT. + */ + + var _private = /*#__PURE__*/Object.freeze({ + assert: finalAssertExports, + cacheNames: cacheNames, + cacheWrapper: cacheWrapper, + DBWrapper: DBWrapper, + Deferred: Deferred, + deleteDatabase: deleteDatabase, + executeQuotaErrorCallbacks: executeQuotaErrorCallbacks, + fetchWrapper: fetchWrapper, + getFriendlyURL: getFriendlyURL, + logger: logger, + WorkboxError: WorkboxError + }); + + /* + Copyright 2019 Google LLC + + Use of this source code is governed by an MIT-style + license that can be found in the LICENSE file or at + https://opensource.org/licenses/MIT. + */ + /** + * Claim any currently available clients once the service worker + * becomes active. This is normally used in conjunction with `skipWaiting()`. + * + * @alias workbox.core.clientsClaim + */ + + const clientsClaim = () => { + addEventListener('activate', () => clients.claim()); + }; + + /* + Copyright 2019 Google LLC + + Use of this source code is governed by an MIT-style + license that can be found in the LICENSE file or at + https://opensource.org/licenses/MIT. + */ + /** + * Get the current cache names and prefix/suffix used by Workbox. + * + * `cacheNames.precache` is used for precached assets, + * `cacheNames.googleAnalytics` is used by `workbox-google-analytics` to + * store `analytics.js`, and `cacheNames.runtime` is used for everything else. + * + * `cacheNames.prefix` can be used to retrieve just the current prefix value. + * `cacheNames.suffix` can be used to retrieve just the current suffix value. + * + * @return {Object} An object with `precache`, `runtime`, `prefix`, and + * `googleAnalytics` properties. + * + * @alias workbox.core.cacheNames + */ + + const cacheNames$1 = { + get googleAnalytics() { + return cacheNames.getGoogleAnalyticsName(); + }, + + get precache() { + return cacheNames.getPrecacheName(); + }, + + get prefix() { + return cacheNames.getPrefix(); + }, + + get runtime() { + return cacheNames.getRuntimeName(); + }, + + get suffix() { + return cacheNames.getSuffix(); + } + + }; + + /* + Copyright 2019 Google LLC + + Use of this source code is governed by an MIT-style + license that can be found in the LICENSE file or at + https://opensource.org/licenses/MIT. + */ + /** + * Modifies the default cache names used by the Workbox packages. + * Cache names are generated as `--`. + * + * @param {Object} details + * @param {Object} [details.prefix] The string to add to the beginning of + * the precache and runtime cache names. + * @param {Object} [details.suffix] The string to add to the end of + * the precache and runtime cache names. + * @param {Object} [details.precache] The cache name to use for precache + * caching. + * @param {Object} [details.runtime] The cache name to use for runtime caching. + * @param {Object} [details.googleAnalytics] The cache name to use for + * `workbox-google-analytics` caching. + * + * @alias workbox.core.setCacheNameDetails + */ + + const setCacheNameDetails = details => { + { + Object.keys(details).forEach(key => { + finalAssertExports.isType(details[key], 'string', { + moduleName: 'workbox-core', + funcName: 'setCacheNameDetails', + paramName: `details.${key}` + }); + }); + + if ('precache' in details && details.precache.length === 0) { + throw new WorkboxError('invalid-cache-name', { + cacheNameId: 'precache', + value: details.precache + }); + } + + if ('runtime' in details && details.runtime.length === 0) { + throw new WorkboxError('invalid-cache-name', { + cacheNameId: 'runtime', + value: details.runtime + }); + } + + if ('googleAnalytics' in details && details.googleAnalytics.length === 0) { + throw new WorkboxError('invalid-cache-name', { + cacheNameId: 'googleAnalytics', + value: details.googleAnalytics + }); + } + } + + cacheNames.updateDetails(details); + }; + + /* + Copyright 2019 Google LLC + + Use of this source code is governed by an MIT-style + license that can be found in the LICENSE file or at + https://opensource.org/licenses/MIT. + */ + /** + * Force a service worker to become active, instead of waiting. This is + * normally used in conjunction with `clientsClaim()`. + * + * @alias workbox.core.skipWaiting + */ + + const skipWaiting = () => { + // We need to explicitly call `self.skipWaiting()` here because we're + // shadowing `skipWaiting` with this local function. + addEventListener('install', () => self.skipWaiting()); + }; + + /* + Copyright 2018 Google LLC + + Use of this source code is governed by an MIT-style + license that can be found in the LICENSE file or at + https://opensource.org/licenses/MIT. + */ + + try { + self.workbox.v = self.workbox.v || {}; + } catch (errer) {} // NOOP + + exports._private = _private; + exports.clientsClaim = clientsClaim; + exports.cacheNames = cacheNames$1; + exports.registerQuotaErrorCallback = registerQuotaErrorCallback; + exports.setCacheNameDetails = setCacheNameDetails; + exports.skipWaiting = skipWaiting; + + return exports; + +}({})); +//# sourceMappingURL=workbox-core.dev.js.map diff --git a/workbox-v4.3.1/workbox-core.dev.js.map b/workbox-v4.3.1/workbox-core.dev.js.map new file mode 100644 index 0000000000..879a7658d3 --- /dev/null +++ b/workbox-v4.3.1/workbox-core.dev.js.map @@ -0,0 +1 @@ +{"version":3,"file":"workbox-core.dev.js","sources":["../_version.mjs","../_private/logger.mjs","../models/messages/messages.mjs","../models/messages/messageGenerator.mjs","../_private/WorkboxError.mjs","../_private/assert.mjs","../models/quotaErrorCallbacks.mjs","../registerQuotaErrorCallback.mjs","../_private/cacheNames.mjs","../_private/getFriendlyURL.mjs","../_private/executeQuotaErrorCallbacks.mjs","../models/pluginEvents.mjs","../utils/pluginUtils.mjs","../_private/cacheWrapper.mjs","../_private/DBWrapper.mjs","../_private/Deferred.mjs","../_private/deleteDatabase.mjs","../_private/fetchWrapper.mjs","../_private.mjs","../clientsClaim.mjs","../cacheNames.mjs","../setCacheNameDetails.mjs","../skipWaiting.mjs","../index.mjs"],"sourcesContent":["try{self['workbox:core:4.3.1']&&_()}catch(e){}// eslint-disable-line","/*\n Copyright 2019 Google LLC\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport '../_version.mjs';\n\n\nconst logger = process.env.NODE_ENV === 'production' ? null : (() => {\n let inGroup = false;\n\n const methodToColorMap = {\n debug: `#7f8c8d`, // Gray\n log: `#2ecc71`, // Green\n warn: `#f39c12`, // Yellow\n error: `#c0392b`, // Red\n groupCollapsed: `#3498db`, // Blue\n groupEnd: null, // No colored prefix on groupEnd\n };\n\n const print = function(method, args) {\n if (method === 'groupCollapsed') {\n // Safari doesn't print all console.groupCollapsed() arguments:\n // https://bugs.webkit.org/show_bug.cgi?id=182754\n if (/^((?!chrome|android).)*safari/i.test(navigator.userAgent)) {\n console[method](...args);\n return;\n }\n }\n\n const styles = [\n `background: ${methodToColorMap[method]}`,\n `border-radius: 0.5em`,\n `color: white`,\n `font-weight: bold`,\n `padding: 2px 0.5em`,\n ];\n\n // When in a group, the workbox prefix is not displayed.\n const logPrefix = inGroup ? [] : ['%cworkbox', styles.join(';')];\n\n console[method](...logPrefix, ...args);\n\n if (method === 'groupCollapsed') {\n inGroup = true;\n }\n if (method === 'groupEnd') {\n inGroup = false;\n }\n };\n\n const api = {};\n for (const method of Object.keys(methodToColorMap)) {\n api[method] = (...args) => {\n print(method, args);\n };\n }\n\n return api;\n})();\n\nexport {logger};\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport '../../_version.mjs';\n\n\nexport const messages = {\n 'invalid-value': ({paramName, validValueDescription, value}) => {\n if (!paramName || !validValueDescription) {\n throw new Error(`Unexpected input to 'invalid-value' error.`);\n }\n return `The '${paramName}' parameter was given a value with an ` +\n `unexpected value. ${validValueDescription} Received a value of ` +\n `${JSON.stringify(value)}.`;\n },\n\n 'not-in-sw': ({moduleName}) => {\n if (!moduleName) {\n throw new Error(`Unexpected input to 'not-in-sw' error.`);\n }\n return `The '${moduleName}' must be used in a service worker.`;\n },\n\n 'not-an-array': ({moduleName, className, funcName, paramName}) => {\n if (!moduleName || !className || !funcName || !paramName) {\n throw new Error(`Unexpected input to 'not-an-array' error.`);\n }\n return `The parameter '${paramName}' passed into ` +\n `'${moduleName}.${className}.${funcName}()' must be an array.`;\n },\n\n 'incorrect-type': ({expectedType, paramName, moduleName, className,\n funcName}) => {\n if (!expectedType || !paramName || !moduleName || !funcName) {\n throw new Error(`Unexpected input to 'incorrect-type' error.`);\n }\n return `The parameter '${paramName}' passed into ` +\n `'${moduleName}.${className ? (className + '.') : ''}` +\n `${funcName}()' must be of type ${expectedType}.`;\n },\n\n 'incorrect-class': ({expectedClass, paramName, moduleName, className,\n funcName, isReturnValueProblem}) => {\n if (!expectedClass || !moduleName || !funcName) {\n throw new Error(`Unexpected input to 'incorrect-class' error.`);\n }\n\n if (isReturnValueProblem) {\n return `The return value from ` +\n `'${moduleName}.${className ? (className + '.') : ''}${funcName}()' ` +\n `must be an instance of class ${expectedClass.name}.`;\n }\n\n return `The parameter '${paramName}' passed into ` +\n `'${moduleName}.${className ? (className + '.') : ''}${funcName}()' ` +\n `must be an instance of class ${expectedClass.name}.`;\n },\n\n 'missing-a-method': ({expectedMethod, paramName, moduleName, className,\n funcName}) => {\n if (!expectedMethod || !paramName || !moduleName || !className\n || !funcName) {\n throw new Error(`Unexpected input to 'missing-a-method' error.`);\n }\n return `${moduleName}.${className}.${funcName}() expected the ` +\n `'${paramName}' parameter to expose a '${expectedMethod}' method.`;\n },\n\n 'add-to-cache-list-unexpected-type': ({entry}) => {\n return `An unexpected entry was passed to ` +\n `'workbox-precaching.PrecacheController.addToCacheList()' The entry ` +\n `'${JSON.stringify(entry)}' isn't supported. You must supply an array of ` +\n `strings with one or more characters, objects with a url property or ` +\n `Request objects.`;\n },\n\n 'add-to-cache-list-conflicting-entries': ({firstEntry, secondEntry}) => {\n if (!firstEntry || !secondEntry) {\n throw new Error(`Unexpected input to ` +\n `'add-to-cache-list-duplicate-entries' error.`);\n }\n\n return `Two of the entries passed to ` +\n `'workbox-precaching.PrecacheController.addToCacheList()' had the URL ` +\n `${firstEntry._entryId} but different revision details. Workbox is ` +\n `is unable to cache and version the asset correctly. Please remove one ` +\n `of the entries.`;\n },\n\n 'plugin-error-request-will-fetch': ({thrownError}) => {\n if (!thrownError) {\n throw new Error(`Unexpected input to ` +\n `'plugin-error-request-will-fetch', error.`);\n }\n\n return `An error was thrown by a plugins 'requestWillFetch()' method. ` +\n `The thrown error message was: '${thrownError.message}'.`;\n },\n\n 'invalid-cache-name': ({cacheNameId, value}) => {\n if (!cacheNameId) {\n throw new Error(\n `Expected a 'cacheNameId' for error 'invalid-cache-name'`);\n }\n\n return `You must provide a name containing at least one character for ` +\n `setCacheDeatils({${cacheNameId}: '...'}). Received a value of ` +\n `'${JSON.stringify(value)}'`;\n },\n\n 'unregister-route-but-not-found-with-method': ({method}) => {\n if (!method) {\n throw new Error(`Unexpected input to ` +\n `'unregister-route-but-not-found-with-method' error.`);\n }\n\n return `The route you're trying to unregister was not previously ` +\n `registered for the method type '${method}'.`;\n },\n\n 'unregister-route-route-not-registered': () => {\n return `The route you're trying to unregister was not previously ` +\n `registered.`;\n },\n\n 'queue-replay-failed': ({name}) => {\n return `Replaying the background sync queue '${name}' failed.`;\n },\n\n 'duplicate-queue-name': ({name}) => {\n return `The Queue name '${name}' is already being used. ` +\n `All instances of backgroundSync.Queue must be given unique names.`;\n },\n\n 'expired-test-without-max-age': ({methodName, paramName}) => {\n return `The '${methodName}()' method can only be used when the ` +\n `'${paramName}' is used in the constructor.`;\n },\n\n 'unsupported-route-type': ({moduleName, className, funcName, paramName}) => {\n return `The supplied '${paramName}' parameter was an unsupported type. ` +\n `Please check the docs for ${moduleName}.${className}.${funcName} for ` +\n `valid input types.`;\n },\n\n 'not-array-of-class': ({value, expectedClass,\n moduleName, className, funcName, paramName}) => {\n return `The supplied '${paramName}' parameter must be an array of ` +\n `'${expectedClass}' objects. Received '${JSON.stringify(value)},'. ` +\n `Please check the call to ${moduleName}.${className}.${funcName}() ` +\n `to fix the issue.`;\n },\n\n 'max-entries-or-age-required': ({moduleName, className, funcName}) => {\n return `You must define either config.maxEntries or config.maxAgeSeconds` +\n `in ${moduleName}.${className}.${funcName}`;\n },\n\n 'statuses-or-headers-required': ({moduleName, className, funcName}) => {\n return `You must define either config.statuses or config.headers` +\n `in ${moduleName}.${className}.${funcName}`;\n },\n\n 'invalid-string': ({moduleName, className, funcName, paramName}) => {\n if (!paramName || !moduleName || !funcName) {\n throw new Error(`Unexpected input to 'invalid-string' error.`);\n }\n return `When using strings, the '${paramName}' parameter must start with ` +\n `'http' (for cross-origin matches) or '/' (for same-origin matches). ` +\n `Please see the docs for ${moduleName}.${funcName}() for ` +\n `more info.`;\n },\n\n 'channel-name-required': () => {\n return `You must provide a channelName to construct a ` +\n `BroadcastCacheUpdate instance.`;\n },\n\n 'invalid-responses-are-same-args': () => {\n return `The arguments passed into responsesAreSame() appear to be ` +\n `invalid. Please ensure valid Responses are used.`;\n },\n\n 'expire-custom-caches-only': () => {\n return `You must provide a 'cacheName' property when using the ` +\n `expiration plugin with a runtime caching strategy.`;\n },\n\n 'unit-must-be-bytes': ({normalizedRangeHeader}) => {\n if (!normalizedRangeHeader) {\n throw new Error(`Unexpected input to 'unit-must-be-bytes' error.`);\n }\n return `The 'unit' portion of the Range header must be set to 'bytes'. ` +\n `The Range header provided was \"${normalizedRangeHeader}\"`;\n },\n\n 'single-range-only': ({normalizedRangeHeader}) => {\n if (!normalizedRangeHeader) {\n throw new Error(`Unexpected input to 'single-range-only' error.`);\n }\n return `Multiple ranges are not supported. Please use a single start ` +\n `value, and optional end value. The Range header provided was ` +\n `\"${normalizedRangeHeader}\"`;\n },\n\n 'invalid-range-values': ({normalizedRangeHeader}) => {\n if (!normalizedRangeHeader) {\n throw new Error(`Unexpected input to 'invalid-range-values' error.`);\n }\n return `The Range header is missing both start and end values. At least ` +\n `one of those values is needed. The Range header provided was ` +\n `\"${normalizedRangeHeader}\"`;\n },\n\n 'no-range-header': () => {\n return `No Range header was found in the Request provided.`;\n },\n\n 'range-not-satisfiable': ({size, start, end}) => {\n return `The start (${start}) and end (${end}) values in the Range are ` +\n `not satisfiable by the cached response, which is ${size} bytes.`;\n },\n\n 'attempt-to-cache-non-get-request': ({url, method}) => {\n return `Unable to cache '${url}' because it is a '${method}' request and ` +\n `only 'GET' requests can be cached.`;\n },\n\n 'cache-put-with-no-response': ({url}) => {\n return `There was an attempt to cache '${url}' but the response was not ` +\n `defined.`;\n },\n\n 'no-response': ({url, error}) => {\n let message = `The strategy could not generate a response for '${url}'.`;\n if (error) {\n message += ` The underlying error is ${error}.`;\n }\n return message;\n },\n\n 'bad-precaching-response': ({url, status}) => {\n return `The precaching request for '${url}' failed with an HTTP ` +\n `status of ${status}.`;\n },\n};\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport {messages} from './messages.mjs';\nimport '../../_version.mjs';\n\nconst fallback = (code, ...args) => {\n let msg = code;\n if (args.length > 0) {\n msg += ` :: ${JSON.stringify(args)}`;\n }\n return msg;\n};\n\nconst generatorFunction = (code, ...args) => {\n const message = messages[code];\n if (!message) {\n throw new Error(`Unable to find message for code '${code}'.`);\n }\n\n return message(...args);\n};\n\nexport const messageGenerator = (process.env.NODE_ENV === 'production') ?\n fallback : generatorFunction;\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport {messageGenerator} from '../models/messages/messageGenerator.mjs';\nimport '../_version.mjs';\n\n/**\n * Workbox errors should be thrown with this class.\n * This allows use to ensure the type easily in tests,\n * helps developers identify errors from workbox\n * easily and allows use to optimise error\n * messages correctly.\n *\n * @private\n */\nclass WorkboxError extends Error {\n /**\n *\n * @param {string} errorCode The error code that\n * identifies this particular error.\n * @param {Object=} details Any relevant arguments\n * that will help developers identify issues should\n * be added as a key on the context object.\n */\n constructor(errorCode, details) {\n let message = messageGenerator(errorCode, details);\n\n super(message);\n\n this.name = errorCode;\n this.details = details;\n }\n}\n\nexport {WorkboxError};\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport {WorkboxError} from '../_private/WorkboxError.mjs';\nimport '../_version.mjs';\n\n/*\n * This method returns true if the current context is a service worker.\n */\nconst isSWEnv = (moduleName) => {\n if (!('ServiceWorkerGlobalScope' in self)) {\n throw new WorkboxError('not-in-sw', {moduleName});\n }\n};\n\n/*\n * This method throws if the supplied value is not an array.\n * The destructed values are required to produce a meaningful error for users.\n * The destructed and restructured object is so it's clear what is\n * needed.\n */\nconst isArray = (value, {moduleName, className, funcName, paramName}) => {\n if (!Array.isArray(value)) {\n throw new WorkboxError('not-an-array', {\n moduleName,\n className,\n funcName,\n paramName,\n });\n }\n};\n\nconst hasMethod = (object, expectedMethod,\n {moduleName, className, funcName, paramName}) => {\n const type = typeof object[expectedMethod];\n if (type !== 'function') {\n throw new WorkboxError('missing-a-method', {paramName, expectedMethod,\n moduleName, className, funcName});\n }\n};\n\nconst isType = (object, expectedType,\n {moduleName, className, funcName, paramName}) => {\n if (typeof object !== expectedType) {\n throw new WorkboxError('incorrect-type', {paramName, expectedType,\n moduleName, className, funcName});\n }\n};\n\nconst isInstance = (object, expectedClass,\n {moduleName, className, funcName,\n paramName, isReturnValueProblem}) => {\n if (!(object instanceof expectedClass)) {\n throw new WorkboxError('incorrect-class', {paramName, expectedClass,\n moduleName, className, funcName, isReturnValueProblem});\n }\n};\n\nconst isOneOf = (value, validValues, {paramName}) => {\n if (!validValues.includes(value)) {\n throw new WorkboxError('invalid-value', {\n paramName,\n value,\n validValueDescription: `Valid values are ${JSON.stringify(validValues)}.`,\n });\n }\n};\n\nconst isArrayOfClass = (value, expectedClass,\n {moduleName, className, funcName, paramName}) => {\n const error = new WorkboxError('not-array-of-class', {\n value, expectedClass,\n moduleName, className, funcName, paramName,\n });\n if (!Array.isArray(value)) {\n throw error;\n }\n\n for (let item of value) {\n if (!(item instanceof expectedClass)) {\n throw error;\n }\n }\n};\n\nconst finalAssertExports = process.env.NODE_ENV === 'production' ? null : {\n hasMethod,\n isArray,\n isInstance,\n isOneOf,\n isSWEnv,\n isType,\n isArrayOfClass,\n};\n\nexport {finalAssertExports as assert};\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport '../_version.mjs';\n\n\n// Callbacks to be executed whenever there's a quota error.\nconst quotaErrorCallbacks = new Set();\n\nexport {quotaErrorCallbacks};\n","/*\n Copyright 2019 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport {logger} from './_private/logger.mjs';\nimport {assert} from './_private/assert.mjs';\nimport {quotaErrorCallbacks} from './models/quotaErrorCallbacks.mjs';\nimport './_version.mjs';\n\n\n/**\n * Adds a function to the set of quotaErrorCallbacks that will be executed if\n * there's a quota error.\n *\n * @param {Function} callback\n * @memberof workbox.core\n */\nfunction registerQuotaErrorCallback(callback) {\n if (process.env.NODE_ENV !== 'production') {\n assert.isType(callback, 'function', {\n moduleName: 'workbox-core',\n funcName: 'register',\n paramName: 'callback',\n });\n }\n\n quotaErrorCallbacks.add(callback);\n\n if (process.env.NODE_ENV !== 'production') {\n logger.log('Registered a callback to respond to quota errors.', callback);\n }\n}\n\nexport {registerQuotaErrorCallback};\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport '../_version.mjs';\n\n\nconst _cacheNameDetails = {\n googleAnalytics: 'googleAnalytics',\n precache: 'precache-v2',\n prefix: 'workbox',\n runtime: 'runtime',\n suffix: self.registration.scope,\n};\n\nconst _createCacheName = (cacheName) => {\n return [_cacheNameDetails.prefix, cacheName, _cacheNameDetails.suffix]\n .filter((value) => value.length > 0)\n .join('-');\n};\n\nexport const cacheNames = {\n updateDetails: (details) => {\n Object.keys(_cacheNameDetails).forEach((key) => {\n if (typeof details[key] !== 'undefined') {\n _cacheNameDetails[key] = details[key];\n }\n });\n },\n getGoogleAnalyticsName: (userCacheName) => {\n return userCacheName || _createCacheName(_cacheNameDetails.googleAnalytics);\n },\n getPrecacheName: (userCacheName) => {\n return userCacheName || _createCacheName(_cacheNameDetails.precache);\n },\n getPrefix: () => {\n return _cacheNameDetails.prefix;\n },\n getRuntimeName: (userCacheName) => {\n return userCacheName || _createCacheName(_cacheNameDetails.runtime);\n },\n getSuffix: () => {\n return _cacheNameDetails.suffix;\n },\n};\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport '../_version.mjs';\n\nconst getFriendlyURL = (url) => {\n const urlObj = new URL(url, location);\n if (urlObj.origin === location.origin) {\n return urlObj.pathname;\n }\n return urlObj.href;\n};\n\nexport {getFriendlyURL};\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport {logger} from '../_private/logger.mjs';\nimport {quotaErrorCallbacks} from '../models/quotaErrorCallbacks.mjs';\nimport '../_version.mjs';\n\n\n/**\n * Runs all of the callback functions, one at a time sequentially, in the order\n * in which they were registered.\n *\n * @memberof workbox.core\n * @private\n */\nasync function executeQuotaErrorCallbacks() {\n if (process.env.NODE_ENV !== 'production') {\n logger.log(`About to run ${quotaErrorCallbacks.size} ` +\n `callbacks to clean up caches.`);\n }\n\n for (const callback of quotaErrorCallbacks) {\n await callback();\n if (process.env.NODE_ENV !== 'production') {\n logger.log(callback, 'is complete.');\n }\n }\n\n if (process.env.NODE_ENV !== 'production') {\n logger.log('Finished running callbacks.');\n }\n}\n\nexport {executeQuotaErrorCallbacks};\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport '../_version.mjs';\n\n\nexport const pluginEvents = {\n CACHE_DID_UPDATE: 'cacheDidUpdate',\n CACHE_KEY_WILL_BE_USED: 'cacheKeyWillBeUsed',\n CACHE_WILL_UPDATE: 'cacheWillUpdate',\n CACHED_RESPONSE_WILL_BE_USED: 'cachedResponseWillBeUsed',\n FETCH_DID_FAIL: 'fetchDidFail',\n FETCH_DID_SUCCEED: 'fetchDidSucceed',\n REQUEST_WILL_FETCH: 'requestWillFetch',\n};\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport '../_version.mjs';\n\nexport const pluginUtils = {\n filter: (plugins, callbackName) => {\n return plugins.filter((plugin) => callbackName in plugin);\n },\n};\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport {WorkboxError} from './WorkboxError.mjs';\nimport {assert} from './assert.mjs';\nimport {getFriendlyURL} from './getFriendlyURL.mjs';\nimport {logger} from './logger.mjs';\nimport {executeQuotaErrorCallbacks} from './executeQuotaErrorCallbacks.mjs';\nimport {pluginEvents} from '../models/pluginEvents.mjs';\nimport {pluginUtils} from '../utils/pluginUtils.mjs';\nimport '../_version.mjs';\n\n\n/**\n * Wrapper around cache.put().\n *\n * Will call `cacheDidUpdate` on plugins if the cache was updated, using\n * `matchOptions` when determining what the old entry is.\n *\n * @param {Object} options\n * @param {string} options.cacheName\n * @param {Request} options.request\n * @param {Response} options.response\n * @param {Event} [options.event]\n * @param {Array} [options.plugins=[]]\n * @param {Object} [options.matchOptions]\n *\n * @private\n * @memberof module:workbox-core\n */\nconst putWrapper = async ({\n cacheName,\n request,\n response,\n event,\n plugins = [],\n matchOptions,\n} = {}) => {\n if (process.env.NODE_ENV !== 'production') {\n if (request.method && request.method !== 'GET') {\n throw new WorkboxError('attempt-to-cache-non-get-request', {\n url: getFriendlyURL(request.url),\n method: request.method,\n });\n }\n }\n\n const effectiveRequest = await _getEffectiveRequest({\n plugins, request, mode: 'write'});\n\n if (!response) {\n if (process.env.NODE_ENV !== 'production') {\n logger.error(`Cannot cache non-existent response for ` +\n `'${getFriendlyURL(effectiveRequest.url)}'.`);\n }\n\n throw new WorkboxError('cache-put-with-no-response', {\n url: getFriendlyURL(effectiveRequest.url),\n });\n }\n\n let responseToCache = await _isResponseSafeToCache({\n event,\n plugins,\n response,\n request: effectiveRequest,\n });\n\n if (!responseToCache) {\n if (process.env.NODE_ENV !== 'production') {\n logger.debug(`Response '${getFriendlyURL(effectiveRequest.url)}' will ` +\n `not be cached.`, responseToCache);\n }\n return;\n }\n\n const cache = await caches.open(cacheName);\n\n const updatePlugins = pluginUtils.filter(\n plugins, pluginEvents.CACHE_DID_UPDATE);\n\n let oldResponse = updatePlugins.length > 0 ?\n await matchWrapper({cacheName, matchOptions, request: effectiveRequest}) :\n null;\n\n if (process.env.NODE_ENV !== 'production') {\n logger.debug(`Updating the '${cacheName}' cache with a new Response for ` +\n `${getFriendlyURL(effectiveRequest.url)}.`);\n }\n\n try {\n await cache.put(effectiveRequest, responseToCache);\n } catch (error) {\n // See https://developer.mozilla.org/en-US/docs/Web/API/DOMException#exception-QuotaExceededError\n if (error.name === 'QuotaExceededError') {\n await executeQuotaErrorCallbacks();\n }\n throw error;\n }\n\n for (let plugin of updatePlugins) {\n await plugin[pluginEvents.CACHE_DID_UPDATE].call(plugin, {\n cacheName,\n event,\n oldResponse,\n newResponse: responseToCache,\n request: effectiveRequest,\n });\n }\n};\n\n/**\n * This is a wrapper around cache.match().\n *\n * @param {Object} options\n * @param {string} options.cacheName Name of the cache to match against.\n * @param {Request} options.request The Request that will be used to look up\n * cache entries.\n * @param {Event} [options.event] The event that propted the action.\n * @param {Object} [options.matchOptions] Options passed to cache.match().\n * @param {Array} [options.plugins=[]] Array of plugins.\n * @return {Response} A cached response if available.\n *\n * @private\n * @memberof module:workbox-core\n */\nconst matchWrapper = async ({\n cacheName,\n request,\n event,\n matchOptions,\n plugins = [],\n}) => {\n const cache = await caches.open(cacheName);\n\n const effectiveRequest = await _getEffectiveRequest({\n plugins, request, mode: 'read'});\n\n let cachedResponse = await cache.match(effectiveRequest, matchOptions);\n if (process.env.NODE_ENV !== 'production') {\n if (cachedResponse) {\n logger.debug(`Found a cached response in '${cacheName}'.`);\n } else {\n logger.debug(`No cached response found in '${cacheName}'.`);\n }\n }\n\n for (const plugin of plugins) {\n if (pluginEvents.CACHED_RESPONSE_WILL_BE_USED in plugin) {\n cachedResponse = await plugin[pluginEvents.CACHED_RESPONSE_WILL_BE_USED]\n .call(plugin, {\n cacheName,\n event,\n matchOptions,\n cachedResponse,\n request: effectiveRequest,\n });\n if (process.env.NODE_ENV !== 'production') {\n if (cachedResponse) {\n assert.isInstance(cachedResponse, Response, {\n moduleName: 'Plugin',\n funcName: pluginEvents.CACHED_RESPONSE_WILL_BE_USED,\n isReturnValueProblem: true,\n });\n }\n }\n }\n }\n\n return cachedResponse;\n};\n\n/**\n * This method will call cacheWillUpdate on the available plugins (or use\n * status === 200) to determine if the Response is safe and valid to cache.\n *\n * @param {Object} options\n * @param {Request} options.request\n * @param {Response} options.response\n * @param {Event} [options.event]\n * @param {Array} [options.plugins=[]]\n * @return {Promise}\n *\n * @private\n * @memberof module:workbox-core\n */\nconst _isResponseSafeToCache = async ({request, response, event, plugins}) => {\n let responseToCache = response;\n let pluginsUsed = false;\n for (let plugin of plugins) {\n if (pluginEvents.CACHE_WILL_UPDATE in plugin) {\n pluginsUsed = true;\n responseToCache = await plugin[pluginEvents.CACHE_WILL_UPDATE]\n .call(plugin, {\n request,\n response: responseToCache,\n event,\n });\n\n if (process.env.NODE_ENV !== 'production') {\n if (responseToCache) {\n assert.isInstance(responseToCache, Response, {\n moduleName: 'Plugin',\n funcName: pluginEvents.CACHE_WILL_UPDATE,\n isReturnValueProblem: true,\n });\n }\n }\n\n if (!responseToCache) {\n break;\n }\n }\n }\n\n if (!pluginsUsed) {\n if (process.env.NODE_ENV !== 'production') {\n if (!responseToCache.status === 200) {\n if (responseToCache.status === 0) {\n logger.warn(`The response for '${request.url}' is an opaque ` +\n `response. The caching strategy that you're using will not ` +\n `cache opaque responses by default.`);\n } else {\n logger.debug(`The response for '${request.url}' returned ` +\n `a status code of '${response.status}' and won't be cached as a ` +\n `result.`);\n }\n }\n }\n responseToCache = responseToCache.status === 200 ? responseToCache : null;\n }\n\n return responseToCache ? responseToCache : null;\n};\n\n/**\n * Checks the list of plugins for the cacheKeyWillBeUsed callback, and\n * executes any of those callbacks found in sequence. The final `Request` object\n * returned by the last plugin is treated as the cache key for cache reads\n * and/or writes.\n *\n * @param {Object} options\n * @param {Request} options.request\n * @param {string} options.mode\n * @param {Array} [options.plugins=[]]\n * @return {Promise}\n *\n * @private\n * @memberof module:workbox-core\n */\nconst _getEffectiveRequest = async ({request, mode, plugins}) => {\n const cacheKeyWillBeUsedPlugins = pluginUtils.filter(\n plugins, pluginEvents.CACHE_KEY_WILL_BE_USED);\n\n let effectiveRequest = request;\n for (const plugin of cacheKeyWillBeUsedPlugins) {\n effectiveRequest = await plugin[pluginEvents.CACHE_KEY_WILL_BE_USED].call(\n plugin, {mode, request: effectiveRequest});\n\n if (typeof effectiveRequest === 'string') {\n effectiveRequest = new Request(effectiveRequest);\n }\n\n if (process.env.NODE_ENV !== 'production') {\n assert.isInstance(effectiveRequest, Request, {\n moduleName: 'Plugin',\n funcName: pluginEvents.CACHE_KEY_WILL_BE_USED,\n isReturnValueProblem: true,\n });\n }\n }\n\n return effectiveRequest;\n};\n\nexport const cacheWrapper = {\n put: putWrapper,\n match: matchWrapper,\n};\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport '../_version.mjs';\n\n\n/**\n * A class that wraps common IndexedDB functionality in a promise-based API.\n * It exposes all the underlying power and functionality of IndexedDB, but\n * wraps the most commonly used features in a way that's much simpler to use.\n *\n * @private\n */\nexport class DBWrapper {\n /**\n * @param {string} name\n * @param {number} version\n * @param {Object=} [callback]\n * @param {!Function} [callbacks.onupgradeneeded]\n * @param {!Function} [callbacks.onversionchange] Defaults to\n * DBWrapper.prototype._onversionchange when not specified.\n * @private\n */\n constructor(name, version, {\n onupgradeneeded,\n onversionchange = this._onversionchange,\n } = {}) {\n this._name = name;\n this._version = version;\n this._onupgradeneeded = onupgradeneeded;\n this._onversionchange = onversionchange;\n\n // If this is null, it means the database isn't open.\n this._db = null;\n }\n\n /**\n * Returns the IDBDatabase instance (not normally needed).\n *\n * @private\n */\n get db() {\n return this._db;\n }\n\n /**\n * Opens a connected to an IDBDatabase, invokes any onupgradedneeded\n * callback, and added an onversionchange callback to the database.\n *\n * @return {IDBDatabase}\n * @private\n */\n async open() {\n if (this._db) return;\n\n this._db = await new Promise((resolve, reject) => {\n // This flag is flipped to true if the timeout callback runs prior\n // to the request failing or succeeding. Note: we use a timeout instead\n // of an onblocked handler since there are cases where onblocked will\n // never never run. A timeout better handles all possible scenarios:\n // https://github.com/w3c/IndexedDB/issues/223\n let openRequestTimedOut = false;\n setTimeout(() => {\n openRequestTimedOut = true;\n reject(new Error('The open request was blocked and timed out'));\n }, this.OPEN_TIMEOUT);\n\n const openRequest = indexedDB.open(this._name, this._version);\n openRequest.onerror = () => reject(openRequest.error);\n openRequest.onupgradeneeded = (evt) => {\n if (openRequestTimedOut) {\n openRequest.transaction.abort();\n evt.target.result.close();\n } else if (this._onupgradeneeded) {\n this._onupgradeneeded(evt);\n }\n };\n openRequest.onsuccess = ({target}) => {\n const db = target.result;\n if (openRequestTimedOut) {\n db.close();\n } else {\n db.onversionchange = this._onversionchange.bind(this);\n resolve(db);\n }\n };\n });\n\n return this;\n }\n\n /**\n * Polyfills the native `getKey()` method. Note, this is overridden at\n * runtime if the browser supports the native method.\n *\n * @param {string} storeName\n * @param {*} query\n * @return {Array}\n * @private\n */\n async getKey(storeName, query) {\n return (await this.getAllKeys(storeName, query, 1))[0];\n }\n\n /**\n * Polyfills the native `getAll()` method. Note, this is overridden at\n * runtime if the browser supports the native method.\n *\n * @param {string} storeName\n * @param {*} query\n * @param {number} count\n * @return {Array}\n * @private\n */\n async getAll(storeName, query, count) {\n return await this.getAllMatching(storeName, {query, count});\n }\n\n\n /**\n * Polyfills the native `getAllKeys()` method. Note, this is overridden at\n * runtime if the browser supports the native method.\n *\n * @param {string} storeName\n * @param {*} query\n * @param {number} count\n * @return {Array}\n * @private\n */\n async getAllKeys(storeName, query, count) {\n return (await this.getAllMatching(\n storeName, {query, count, includeKeys: true})).map(({key}) => key);\n }\n\n /**\n * Supports flexible lookup in an object store by specifying an index,\n * query, direction, and count. This method returns an array of objects\n * with the signature .\n *\n * @param {string} storeName\n * @param {Object} [opts]\n * @param {string} [opts.index] The index to use (if specified).\n * @param {*} [opts.query]\n * @param {IDBCursorDirection} [opts.direction]\n * @param {number} [opts.count] The max number of results to return.\n * @param {boolean} [opts.includeKeys] When true, the structure of the\n * returned objects is changed from an array of values to an array of\n * objects in the form {key, primaryKey, value}.\n * @return {Array}\n * @private\n */\n async getAllMatching(storeName, {\n index,\n query = null, // IE errors if query === `undefined`.\n direction = 'next',\n count,\n includeKeys,\n } = {}) {\n return await this.transaction([storeName], 'readonly', (txn, done) => {\n const store = txn.objectStore(storeName);\n const target = index ? store.index(index) : store;\n const results = [];\n\n target.openCursor(query, direction).onsuccess = ({target}) => {\n const cursor = target.result;\n if (cursor) {\n const {primaryKey, key, value} = cursor;\n results.push(includeKeys ? {primaryKey, key, value} : value);\n if (count && results.length >= count) {\n done(results);\n } else {\n cursor.continue();\n }\n } else {\n done(results);\n }\n };\n });\n }\n\n /**\n * Accepts a list of stores, a transaction type, and a callback and\n * performs a transaction. A promise is returned that resolves to whatever\n * value the callback chooses. The callback holds all the transaction logic\n * and is invoked with two arguments:\n * 1. The IDBTransaction object\n * 2. A `done` function, that's used to resolve the promise when\n * when the transaction is done, if passed a value, the promise is\n * resolved to that value.\n *\n * @param {Array} storeNames An array of object store names\n * involved in the transaction.\n * @param {string} type Can be `readonly` or `readwrite`.\n * @param {!Function} callback\n * @return {*} The result of the transaction ran by the callback.\n * @private\n */\n async transaction(storeNames, type, callback) {\n await this.open();\n return await new Promise((resolve, reject) => {\n const txn = this._db.transaction(storeNames, type);\n txn.onabort = ({target}) => reject(target.error);\n txn.oncomplete = () => resolve();\n\n callback(txn, (value) => resolve(value));\n });\n }\n\n /**\n * Delegates async to a native IDBObjectStore method.\n *\n * @param {string} method The method name.\n * @param {string} storeName The object store name.\n * @param {string} type Can be `readonly` or `readwrite`.\n * @param {...*} args The list of args to pass to the native method.\n * @return {*} The result of the transaction.\n * @private\n */\n async _call(method, storeName, type, ...args) {\n const callback = (txn, done) => {\n txn.objectStore(storeName)[method](...args).onsuccess = ({target}) => {\n done(target.result);\n };\n };\n\n return await this.transaction([storeName], type, callback);\n }\n\n /**\n * The default onversionchange handler, which closes the database so other\n * connections can open without being blocked.\n *\n * @private\n */\n _onversionchange() {\n this.close();\n }\n\n /**\n * Closes the connection opened by `DBWrapper.open()`. Generally this method\n * doesn't need to be called since:\n * 1. It's usually better to keep a connection open since opening\n * a new connection is somewhat slow.\n * 2. Connections are automatically closed when the reference is\n * garbage collected.\n * The primary use case for needing to close a connection is when another\n * reference (typically in another tab) needs to upgrade it and would be\n * blocked by the current, open connection.\n *\n * @private\n */\n close() {\n if (this._db) {\n this._db.close();\n this._db = null;\n }\n }\n}\n\n// Exposed to let users modify the default timeout on a per-instance\n// or global basis.\nDBWrapper.prototype.OPEN_TIMEOUT = 2000;\n\n// Wrap native IDBObjectStore methods according to their mode.\nconst methodsToWrap = {\n 'readonly': ['get', 'count', 'getKey', 'getAll', 'getAllKeys'],\n 'readwrite': ['add', 'put', 'clear', 'delete'],\n};\nfor (const [mode, methods] of Object.entries(methodsToWrap)) {\n for (const method of methods) {\n if (method in IDBObjectStore.prototype) {\n // Don't use arrow functions here since we're outside of the class.\n DBWrapper.prototype[method] = async function(storeName, ...args) {\n return await this._call(method, storeName, mode, ...args);\n };\n }\n }\n}\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport '../_version.mjs';\n\n\n/**\n * The Deferred class composes Promises in a way that allows for them to be\n * resolved or rejected from outside the constructor. In most cases promises\n * should be used directly, but Deferreds can be necessary when the logic to\n * resolve a promise must be separate.\n *\n * @private\n */\nexport class Deferred {\n /**\n * Creates a promise and exposes its resolve and reject functions as methods.\n */\n constructor() {\n this.promise = new Promise((resolve, reject) => {\n this.resolve = resolve;\n this.reject = reject;\n });\n }\n}\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport '../_version.mjs';\n\n\n/**\n * Deletes the database.\n * Note: this is exported separately from the DBWrapper module because most\n * usages of IndexedDB in workbox dont need deleting, and this way it can be\n * reused in tests to delete databases without creating DBWrapper instances.\n *\n * @param {string} name The database name.\n * @private\n */\nexport const deleteDatabase = async (name) => {\n await new Promise((resolve, reject) => {\n const request = indexedDB.deleteDatabase(name);\n request.onerror = ({target}) => {\n reject(target.error);\n };\n request.onblocked = () => {\n reject(new Error('Delete blocked'));\n };\n request.onsuccess = () => {\n resolve();\n };\n });\n};\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport {WorkboxError} from './WorkboxError.mjs';\nimport {logger} from './logger.mjs';\nimport {assert} from './assert.mjs';\nimport {getFriendlyURL} from '../_private/getFriendlyURL.mjs';\nimport {pluginEvents} from '../models/pluginEvents.mjs';\nimport {pluginUtils} from '../utils/pluginUtils.mjs';\nimport '../_version.mjs';\n\n/**\n * Wrapper around the fetch API.\n *\n * Will call requestWillFetch on available plugins.\n *\n * @param {Object} options\n * @param {Request|string} options.request\n * @param {Object} [options.fetchOptions]\n * @param {Event} [options.event]\n * @param {Array} [options.plugins=[]]\n * @return {Promise}\n *\n * @private\n * @memberof module:workbox-core\n */\nconst wrappedFetch = async ({\n request,\n fetchOptions,\n event,\n plugins = []}) => {\n // We *should* be able to call `await event.preloadResponse` even if it's\n // undefined, but for some reason, doing so leads to errors in our Node unit\n // tests. To work around that, explicitly check preloadResponse's value first.\n if (event && event.preloadResponse) {\n const possiblePreloadResponse = await event.preloadResponse;\n if (possiblePreloadResponse) {\n if (process.env.NODE_ENV !== 'production') {\n logger.log(`Using a preloaded navigation response for ` +\n `'${getFriendlyURL(request.url)}'`);\n }\n return possiblePreloadResponse;\n }\n }\n\n if (typeof request === 'string') {\n request = new Request(request);\n }\n\n if (process.env.NODE_ENV !== 'production') {\n assert.isInstance(request, Request, {\n paramName: request,\n expectedClass: 'Request',\n moduleName: 'workbox-core',\n className: 'fetchWrapper',\n funcName: 'wrappedFetch',\n });\n }\n\n const failedFetchPlugins = pluginUtils.filter(\n plugins, pluginEvents.FETCH_DID_FAIL);\n\n // If there is a fetchDidFail plugin, we need to save a clone of the\n // original request before it's either modified by a requestWillFetch\n // plugin or before the original request's body is consumed via fetch().\n const originalRequest = failedFetchPlugins.length > 0 ?\n request.clone() : null;\n\n try {\n for (let plugin of plugins) {\n if (pluginEvents.REQUEST_WILL_FETCH in plugin) {\n request = await plugin[pluginEvents.REQUEST_WILL_FETCH].call(plugin, {\n request: request.clone(),\n event,\n });\n\n if (process.env.NODE_ENV !== 'production') {\n if (request) {\n assert.isInstance(request, Request, {\n moduleName: 'Plugin',\n funcName: pluginEvents.CACHED_RESPONSE_WILL_BE_USED,\n isReturnValueProblem: true,\n });\n }\n }\n }\n }\n } catch (err) {\n throw new WorkboxError('plugin-error-request-will-fetch', {\n thrownError: err,\n });\n }\n\n // The request can be altered by plugins with `requestWillFetch` making\n // the original request (Most likely from a `fetch` event) to be different\n // to the Request we make. Pass both to `fetchDidFail` to aid debugging.\n let pluginFilteredRequest = request.clone();\n\n try {\n let fetchResponse;\n\n // See https://github.com/GoogleChrome/workbox/issues/1796\n if (request.mode === 'navigate') {\n fetchResponse = await fetch(request);\n } else {\n fetchResponse = await fetch(request, fetchOptions);\n }\n\n if (process.env.NODE_ENV !== 'production') {\n logger.debug(`Network request for `+\n `'${getFriendlyURL(request.url)}' returned a response with ` +\n `status '${fetchResponse.status}'.`);\n }\n\n for (const plugin of plugins) {\n if (pluginEvents.FETCH_DID_SUCCEED in plugin) {\n fetchResponse = await plugin[pluginEvents.FETCH_DID_SUCCEED]\n .call(plugin, {\n event,\n request: pluginFilteredRequest,\n response: fetchResponse,\n });\n\n if (process.env.NODE_ENV !== 'production') {\n if (fetchResponse) {\n assert.isInstance(fetchResponse, Response, {\n moduleName: 'Plugin',\n funcName: pluginEvents.FETCH_DID_SUCCEED,\n isReturnValueProblem: true,\n });\n }\n }\n }\n }\n\n return fetchResponse;\n } catch (error) {\n if (process.env.NODE_ENV !== 'production') {\n logger.error(`Network request for `+\n `'${getFriendlyURL(request.url)}' threw an error.`, error);\n }\n\n for (const plugin of failedFetchPlugins) {\n await plugin[pluginEvents.FETCH_DID_FAIL].call(plugin, {\n error,\n event,\n originalRequest: originalRequest.clone(),\n request: pluginFilteredRequest.clone(),\n });\n }\n\n throw error;\n }\n};\n\nconst fetchWrapper = {\n fetch: wrappedFetch,\n};\n\nexport {fetchWrapper};\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\n// We either expose defaults or we expose every named export.\nimport {assert} from './_private/assert.mjs';\nimport {cacheNames} from './_private/cacheNames.mjs';\nimport {cacheWrapper} from './_private/cacheWrapper.mjs';\nimport {DBWrapper} from './_private/DBWrapper.mjs';\nimport {Deferred} from './_private/Deferred.mjs';\nimport {deleteDatabase} from './_private/deleteDatabase.mjs';\nimport {executeQuotaErrorCallbacks} from './_private/executeQuotaErrorCallbacks.mjs';\nimport {fetchWrapper} from './_private/fetchWrapper.mjs';\nimport {getFriendlyURL} from './_private/getFriendlyURL.mjs';\nimport {logger} from './_private/logger.mjs';\nimport {WorkboxError} from './_private/WorkboxError.mjs';\n\nimport './_version.mjs';\n\nexport {\n assert,\n cacheNames,\n cacheWrapper,\n DBWrapper,\n Deferred,\n deleteDatabase,\n executeQuotaErrorCallbacks,\n fetchWrapper,\n getFriendlyURL,\n logger,\n WorkboxError,\n};\n","/*\n Copyright 2019 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport './_version.mjs';\n\n\n/**\n * Claim any currently available clients once the service worker\n * becomes active. This is normally used in conjunction with `skipWaiting()`.\n *\n * @alias workbox.core.clientsClaim\n */\nexport const clientsClaim = () => {\n addEventListener('activate', () => clients.claim());\n};\n","/*\n Copyright 2019 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport {cacheNames as _cacheNames} from './_private/cacheNames.mjs';\nimport './_version.mjs';\n\n\n/**\n * Get the current cache names and prefix/suffix used by Workbox.\n *\n * `cacheNames.precache` is used for precached assets,\n * `cacheNames.googleAnalytics` is used by `workbox-google-analytics` to\n * store `analytics.js`, and `cacheNames.runtime` is used for everything else.\n *\n * `cacheNames.prefix` can be used to retrieve just the current prefix value.\n * `cacheNames.suffix` can be used to retrieve just the current suffix value.\n *\n * @return {Object} An object with `precache`, `runtime`, `prefix`, and\n * `googleAnalytics` properties.\n *\n * @alias workbox.core.cacheNames\n */\nexport const cacheNames = {\n get googleAnalytics() {\n return _cacheNames.getGoogleAnalyticsName();\n },\n get precache() {\n return _cacheNames.getPrecacheName();\n },\n get prefix() {\n return _cacheNames.getPrefix();\n },\n get runtime() {\n return _cacheNames.getRuntimeName();\n },\n get suffix() {\n return _cacheNames.getSuffix();\n },\n};\n","/*\n Copyright 2019 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport {assert} from './_private/assert.mjs';\nimport {cacheNames} from './_private/cacheNames.mjs';\nimport {WorkboxError} from './_private/WorkboxError.mjs';\nimport './_version.mjs';\n\n\n/**\n * Modifies the default cache names used by the Workbox packages.\n * Cache names are generated as `--`.\n *\n * @param {Object} details\n * @param {Object} [details.prefix] The string to add to the beginning of\n * the precache and runtime cache names.\n * @param {Object} [details.suffix] The string to add to the end of\n * the precache and runtime cache names.\n * @param {Object} [details.precache] The cache name to use for precache\n * caching.\n * @param {Object} [details.runtime] The cache name to use for runtime caching.\n * @param {Object} [details.googleAnalytics] The cache name to use for\n * `workbox-google-analytics` caching.\n *\n * @alias workbox.core.setCacheNameDetails\n */\nexport const setCacheNameDetails = (details) => {\n if (process.env.NODE_ENV !== 'production') {\n Object.keys(details).forEach((key) => {\n assert.isType(details[key], 'string', {\n moduleName: 'workbox-core',\n funcName: 'setCacheNameDetails',\n paramName: `details.${key}`,\n });\n });\n\n if ('precache' in details && details.precache.length === 0) {\n throw new WorkboxError('invalid-cache-name', {\n cacheNameId: 'precache',\n value: details.precache,\n });\n }\n\n if ('runtime' in details && details.runtime.length === 0) {\n throw new WorkboxError('invalid-cache-name', {\n cacheNameId: 'runtime',\n value: details.runtime,\n });\n }\n\n if ('googleAnalytics' in details && details.googleAnalytics.length === 0) {\n throw new WorkboxError('invalid-cache-name', {\n cacheNameId: 'googleAnalytics',\n value: details.googleAnalytics,\n });\n }\n }\n\n cacheNames.updateDetails(details);\n};\n","/*\n Copyright 2019 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport './_version.mjs';\n\n\n/**\n * Force a service worker to become active, instead of waiting. This is\n * normally used in conjunction with `clientsClaim()`.\n *\n * @alias workbox.core.skipWaiting\n */\nexport const skipWaiting = () => {\n // We need to explicitly call `self.skipWaiting()` here because we're\n // shadowing `skipWaiting` with this local function.\n addEventListener('install', () => self.skipWaiting());\n};\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport {registerQuotaErrorCallback} from './registerQuotaErrorCallback.mjs';\nimport * as _private from './_private.mjs';\nimport {clientsClaim} from './clientsClaim.mjs';\nimport {cacheNames} from './cacheNames.mjs';\nimport {setCacheNameDetails} from './setCacheNameDetails.mjs';\nimport {skipWaiting} from './skipWaiting.mjs';\nimport './_version.mjs';\n\n\n// Give our version strings something to hang off of.\ntry {\n self.workbox.v = self.workbox.v || {};\n} catch (errer) {\n // NOOP\n}\n\n/**\n * All of the Workbox service worker libraries use workbox-core for shared\n * code as well as setting default values that need to be shared (like cache\n * names).\n *\n * @namespace workbox.core\n */\n\nexport {\n _private,\n clientsClaim,\n cacheNames,\n registerQuotaErrorCallback,\n setCacheNameDetails,\n skipWaiting,\n};\n"],"names":["self","_","e","logger","process","inGroup","methodToColorMap","debug","log","warn","error","groupCollapsed","groupEnd","print","method","args","test","navigator","userAgent","console","styles","logPrefix","join","api","Object","keys","messages","paramName","validValueDescription","value","Error","JSON","stringify","moduleName","className","funcName","expectedType","expectedClass","isReturnValueProblem","name","expectedMethod","entry","firstEntry","secondEntry","_entryId","thrownError","message","cacheNameId","methodName","normalizedRangeHeader","size","start","end","url","status","generatorFunction","code","messageGenerator","WorkboxError","constructor","errorCode","details","isSWEnv","isArray","Array","hasMethod","object","type","isType","isInstance","isOneOf","validValues","includes","isArrayOfClass","item","finalAssertExports","quotaErrorCallbacks","Set","registerQuotaErrorCallback","callback","assert","add","_cacheNameDetails","googleAnalytics","precache","prefix","runtime","suffix","registration","scope","_createCacheName","cacheName","filter","length","cacheNames","updateDetails","forEach","key","getGoogleAnalyticsName","userCacheName","getPrecacheName","getPrefix","getRuntimeName","getSuffix","getFriendlyURL","urlObj","URL","location","origin","pathname","href","executeQuotaErrorCallbacks","pluginEvents","CACHE_DID_UPDATE","CACHE_KEY_WILL_BE_USED","CACHE_WILL_UPDATE","CACHED_RESPONSE_WILL_BE_USED","FETCH_DID_FAIL","FETCH_DID_SUCCEED","REQUEST_WILL_FETCH","pluginUtils","plugins","callbackName","plugin","putWrapper","request","response","event","matchOptions","effectiveRequest","_getEffectiveRequest","mode","responseToCache","_isResponseSafeToCache","cache","caches","open","updatePlugins","oldResponse","matchWrapper","put","call","newResponse","cachedResponse","match","Response","pluginsUsed","cacheKeyWillBeUsedPlugins","Request","cacheWrapper","DBWrapper","version","onupgradeneeded","onversionchange","_onversionchange","_name","_version","_onupgradeneeded","_db","db","Promise","resolve","reject","openRequestTimedOut","setTimeout","OPEN_TIMEOUT","openRequest","indexedDB","onerror","evt","transaction","abort","target","result","close","onsuccess","bind","getKey","storeName","query","getAllKeys","getAll","count","getAllMatching","includeKeys","map","index","direction","txn","done","store","objectStore","results","openCursor","cursor","primaryKey","push","continue","storeNames","onabort","oncomplete","_call","prototype","methodsToWrap","methods","entries","IDBObjectStore","Deferred","promise","deleteDatabase","onblocked","wrappedFetch","fetchOptions","preloadResponse","possiblePreloadResponse","failedFetchPlugins","originalRequest","clone","err","pluginFilteredRequest","fetchResponse","fetch","fetchWrapper","clientsClaim","addEventListener","clients","claim","_cacheNames","setCacheNameDetails","skipWaiting","workbox","v","errer"],"mappings":";;;;EAAA,IAAG;EAACA,EAAAA,IAAI,CAAC,oBAAD,CAAJ,IAA4BC,CAAC,EAA7B;EAAgC,CAApC,CAAoC,OAAMC,CAAN,EAAQ;;ECA5C;;;;;;AAOA,EAGA,MAAMC,MAAM,GAAGC,AAA+C,CAAC,MAAM;EACnE,MAAIC,OAAO,GAAG,KAAd;EAEA,QAAMC,gBAAgB,GAAG;EACvBC,IAAAA,KAAK,EAAG,SADe;EACL;EAClBC,IAAAA,GAAG,EAAG,SAFiB;EAEP;EAChBC,IAAAA,IAAI,EAAG,SAHgB;EAGN;EACjBC,IAAAA,KAAK,EAAG,SAJe;EAIL;EAClBC,IAAAA,cAAc,EAAG,SALM;EAKI;EAC3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AAA,KAAK,EAAEgC,OAAO,CAACsB;EAF4B,OAAvC,CAAN;EAID;EACF;;EAEDW,EAAAA,UAAU,CAACC,aAAX,CAAyBlC,OAAzB;EACD,CAjCM;;EC/BP;;;;;;;AAQA,EAGA;;;;;;;AAMA,QAAawK,WAAW,GAAG,MAAM;EAC/B;EACA;EACAL,EAAAA,gBAAgB,CAAC,SAAD,EAAY,MAAMhO,IAAI,CAACqO,WAAL,EAAlB,CAAhB;EACD,CAJM;;ECjBP;;;;;;;AAQA;EAUA,IAAI;EACFrO,EAAAA,IAAI,CAACsO,OAAL,CAAaC,CAAb,GAAiBvO,IAAI,CAACsO,OAAL,CAAaC,CAAb,IAAkB,EAAnC;EACD,CAFD,CAEE,OAAOC,KAAP,EAAc,EAAd;;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/workbox-v4.3.1/workbox-core.prod.js b/workbox-v4.3.1/workbox-core.prod.js new file mode 100644 index 0000000000..526e32b1d4 --- /dev/null +++ b/workbox-v4.3.1/workbox-core.prod.js @@ -0,0 +1,2 @@ +this.workbox=this.workbox||{},this.workbox.core=function(e){"use strict";try{self["workbox:core:4.3.1"]&&_()}catch(e){}const t=(e,...t)=>{let n=e;return t.length>0&&(n+=` :: ${JSON.stringify(t)}`),n};class n extends Error{constructor(e,n){super(t(e,n)),this.name=e,this.details=n}}const s=new Set;const r={googleAnalytics:"googleAnalytics",precache:"precache-v2",prefix:"workbox",runtime:"runtime",suffix:self.registration.scope},a=e=>[r.prefix,e,r.suffix].filter(e=>e.length>0).join("-"),i={updateDetails:e=>{Object.keys(r).forEach(t=>{void 0!==e[t]&&(r[t]=e[t])})},getGoogleAnalyticsName:e=>e||a(r.googleAnalytics),getPrecacheName:e=>e||a(r.precache),getPrefix:()=>r.prefix,getRuntimeName:e=>e||a(r.runtime),getSuffix:()=>r.suffix},c=e=>{const t=new URL(e,location);return t.origin===location.origin?t.pathname:t.href};async function o(){for(const e of s)await e()}const l="cacheDidUpdate",u="cacheKeyWillBeUsed",h="cacheWillUpdate",f="cachedResponseWillBeUsed",w="fetchDidFail",g="fetchDidSucceed",d="requestWillFetch",p=(e,t)=>e.filter(e=>t in e),y=async({cacheName:e,request:t,event:n,matchOptions:s,plugins:r=[]})=>{const a=await caches.open(e),i=await q({plugins:r,request:t,mode:"read"});let c=await a.match(i,s);for(const t of r)f in t&&(c=await t[f].call(t,{cacheName:e,event:n,matchOptions:s,cachedResponse:c,request:i}));return c},m=async({request:e,response:t,event:n,plugins:s})=>{let r=t,a=!1;for(let t of s)if(h in t&&(a=!0,!(r=await t[h].call(t,{request:e,response:r,event:n}))))break;return a||(r=200===r.status?r:null),r||null},q=async({request:e,mode:t,plugins:n})=>{const s=p(n,u);let r=e;for(const e of s)"string"==typeof(r=await e[u].call(e,{mode:t,request:r}))&&(r=new Request(r));return r},v={put:async({cacheName:e,request:t,response:s,event:r,plugins:a=[],matchOptions:i}={})=>{const u=await q({plugins:a,request:t,mode:"write"});if(!s)throw new n("cache-put-with-no-response",{url:c(u.url)});let h=await m({event:r,plugins:a,response:s,request:u});if(!h)return;const f=await caches.open(e),w=p(a,l);let g=w.length>0?await y({cacheName:e,matchOptions:i,request:u}):null;try{await f.put(u,h)}catch(e){throw"QuotaExceededError"===e.name&&await o(),e}for(let t of w)await t[l].call(t,{cacheName:e,event:r,oldResponse:g,newResponse:h,request:u})},match:y};class x{constructor(e,t,{onupgradeneeded:n,onversionchange:s=this.t}={}){this.s=e,this.i=t,this.o=n,this.t=s,this.l=null}get db(){return this.l}async open(){if(!this.l)return this.l=await new Promise((e,t)=>{let n=!1;setTimeout(()=>{n=!0,t(new Error("The open request was blocked and timed out"))},this.OPEN_TIMEOUT);const s=indexedDB.open(this.s,this.i);s.onerror=(()=>t(s.error)),s.onupgradeneeded=(e=>{n?(s.transaction.abort(),e.target.result.close()):this.o&&this.o(e)}),s.onsuccess=(({target:t})=>{const s=t.result;n?s.close():(s.onversionchange=this.t.bind(this),e(s))})}),this}async getKey(e,t){return(await this.getAllKeys(e,t,1))[0]}async getAll(e,t,n){return await this.getAllMatching(e,{query:t,count:n})}async getAllKeys(e,t,n){return(await this.getAllMatching(e,{query:t,count:n,includeKeys:!0})).map(({key:e})=>e)}async getAllMatching(e,{index:t,query:n=null,direction:s="next",count:r,includeKeys:a}={}){return await this.transaction([e],"readonly",(i,c)=>{const o=i.objectStore(e),l=t?o.index(t):o,u=[];l.openCursor(n,s).onsuccess=(({target:e})=>{const t=e.result;if(t){const{primaryKey:e,key:n,value:s}=t;u.push(a?{primaryKey:e,key:n,value:s}:s),r&&u.length>=r?c(u):t.continue()}else c(u)})})}async transaction(e,t,n){return await this.open(),await new Promise((s,r)=>{const a=this.l.transaction(e,t);a.onabort=(({target:e})=>r(e.error)),a.oncomplete=(()=>s()),n(a,e=>s(e))})}async u(e,t,n,...s){return await this.transaction([t],n,(n,r)=>{n.objectStore(t)[e](...s).onsuccess=(({target:e})=>{r(e.result)})})}t(){this.close()}close(){this.l&&(this.l.close(),this.l=null)}}x.prototype.OPEN_TIMEOUT=2e3;const b={readonly:["get","count","getKey","getAll","getAllKeys"],readwrite:["add","put","clear","delete"]};for(const[e,t]of Object.entries(b))for(const n of t)n in IDBObjectStore.prototype&&(x.prototype[n]=async function(t,...s){return await this.u(n,t,e,...s)});const D={fetch:async({request:e,fetchOptions:t,event:s,plugins:r=[]})=>{if(s&&s.preloadResponse){const e=await s.preloadResponse;if(e)return e}"string"==typeof e&&(e=new Request(e));const a=p(r,w),i=a.length>0?e.clone():null;try{for(let t of r)d in t&&(e=await t[d].call(t,{request:e.clone(),event:s}))}catch(e){throw new n("plugin-error-request-will-fetch",{thrownError:e})}let c=e.clone();try{let n;n="navigate"===e.mode?await fetch(e):await fetch(e,t);for(const e of r)g in e&&(n=await e[g].call(e,{event:s,request:c,response:n}));return n}catch(e){for(const t of a)await t[w].call(t,{error:e,event:s,originalRequest:i.clone(),request:c.clone()});throw e}}};var E=Object.freeze({assert:null,cacheNames:i,cacheWrapper:v,DBWrapper:x,Deferred:class{constructor(){this.promise=new Promise((e,t)=>{this.resolve=e,this.reject=t})}},deleteDatabase:async e=>{await new Promise((t,n)=>{const s=indexedDB.deleteDatabase(e);s.onerror=(({target:e})=>{n(e.error)}),s.onblocked=(()=>{n(new Error("Delete blocked"))}),s.onsuccess=(()=>{t()})})},executeQuotaErrorCallbacks:o,fetchWrapper:D,getFriendlyURL:c,logger:null,WorkboxError:n});const N={get googleAnalytics(){return i.getGoogleAnalyticsName()},get precache(){return i.getPrecacheName()},get prefix(){return i.getPrefix()},get runtime(){return i.getRuntimeName()},get suffix(){return i.getSuffix()}};try{self.workbox.v=self.workbox.v||{}}catch(e){}return e._private=E,e.clientsClaim=(()=>{addEventListener("activate",()=>clients.claim())}),e.cacheNames=N,e.registerQuotaErrorCallback=function(e){s.add(e)},e.setCacheNameDetails=(e=>{i.updateDetails(e)}),e.skipWaiting=(()=>{addEventListener("install",()=>self.skipWaiting())}),e}({}); +//# sourceMappingURL=workbox-core.prod.js.map diff --git a/workbox-v4.3.1/workbox-core.prod.js.map b/workbox-v4.3.1/workbox-core.prod.js.map new file mode 100644 index 0000000000..71b89fb5a7 --- /dev/null +++ b/workbox-v4.3.1/workbox-core.prod.js.map @@ -0,0 +1 @@ +{"version":3,"file":"workbox-core.prod.js","sources":["../_version.mjs","../_private/logger.mjs","../models/messages/messageGenerator.mjs","../_private/WorkboxError.mjs","../_private/assert.mjs","../models/quotaErrorCallbacks.mjs","../_private/cacheNames.mjs","../_private/getFriendlyURL.mjs","../_private/executeQuotaErrorCallbacks.mjs","../models/pluginEvents.mjs","../utils/pluginUtils.mjs","../_private/cacheWrapper.mjs","../_private/DBWrapper.mjs","../_private/deleteDatabase.mjs","../_private/fetchWrapper.mjs","../_private/Deferred.mjs","../cacheNames.mjs","../index.mjs","../clientsClaim.mjs","../registerQuotaErrorCallback.mjs","../setCacheNameDetails.mjs","../skipWaiting.mjs"],"sourcesContent":["try{self['workbox:core:4.3.1']&&_()}catch(e){}// eslint-disable-line","/*\n Copyright 2019 Google LLC\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport '../_version.mjs';\n\n\nconst logger = process.env.NODE_ENV === 'production' ? null : (() => {\n let inGroup = false;\n\n const methodToColorMap = {\n debug: `#7f8c8d`, // Gray\n log: `#2ecc71`, // Green\n warn: `#f39c12`, // Yellow\n error: `#c0392b`, // Red\n groupCollapsed: `#3498db`, // Blue\n groupEnd: null, // No colored prefix on groupEnd\n };\n\n const print = function(method, args) {\n if (method === 'groupCollapsed') {\n // Safari doesn't print all console.groupCollapsed() arguments:\n // https://bugs.webkit.org/show_bug.cgi?id=182754\n if (/^((?!chrome|android).)*safari/i.test(navigator.userAgent)) {\n console[method](...args);\n return;\n }\n }\n\n const styles = [\n `background: ${methodToColorMap[method]}`,\n `border-radius: 0.5em`,\n `color: white`,\n `font-weight: bold`,\n `padding: 2px 0.5em`,\n ];\n\n // When in a group, the workbox prefix is not displayed.\n const logPrefix = inGroup ? [] : ['%cworkbox', styles.join(';')];\n\n console[method](...logPrefix, ...args);\n\n if (method === 'groupCollapsed') {\n inGroup = true;\n }\n if (method === 'groupEnd') {\n inGroup = false;\n }\n };\n\n const api = {};\n for (const method of Object.keys(methodToColorMap)) {\n api[method] = (...args) => {\n print(method, args);\n };\n }\n\n return api;\n})();\n\nexport {logger};\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport {messages} from './messages.mjs';\nimport '../../_version.mjs';\n\nconst fallback = (code, ...args) => {\n let msg = code;\n if (args.length > 0) {\n msg += ` :: ${JSON.stringify(args)}`;\n }\n return msg;\n};\n\nconst generatorFunction = (code, ...args) => {\n const message = messages[code];\n if (!message) {\n throw new Error(`Unable to find message for code '${code}'.`);\n }\n\n return message(...args);\n};\n\nexport const messageGenerator = (process.env.NODE_ENV === 'production') ?\n fallback : generatorFunction;\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport {messageGenerator} from '../models/messages/messageGenerator.mjs';\nimport '../_version.mjs';\n\n/**\n * Workbox errors should be thrown with this class.\n * This allows use to ensure the type easily in tests,\n * helps developers identify errors from workbox\n * easily and allows use to optimise error\n * messages correctly.\n *\n * @private\n */\nclass WorkboxError extends Error {\n /**\n *\n * @param {string} errorCode The error code that\n * identifies this particular error.\n * @param {Object=} details Any relevant arguments\n * that will help developers identify issues should\n * be added as a key on the context object.\n */\n constructor(errorCode, details) {\n let message = messageGenerator(errorCode, details);\n\n super(message);\n\n this.name = errorCode;\n this.details = details;\n }\n}\n\nexport {WorkboxError};\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport {WorkboxError} from '../_private/WorkboxError.mjs';\nimport '../_version.mjs';\n\n/*\n * This method returns true if the current context is a service worker.\n */\nconst isSWEnv = (moduleName) => {\n if (!('ServiceWorkerGlobalScope' in self)) {\n throw new WorkboxError('not-in-sw', {moduleName});\n }\n};\n\n/*\n * This method throws if the supplied value is not an array.\n * The destructed values are required to produce a meaningful error for users.\n * The destructed and restructured object is so it's clear what is\n * needed.\n */\nconst isArray = (value, {moduleName, className, funcName, paramName}) => {\n if (!Array.isArray(value)) {\n throw new WorkboxError('not-an-array', {\n moduleName,\n className,\n funcName,\n paramName,\n });\n }\n};\n\nconst hasMethod = (object, expectedMethod,\n {moduleName, className, funcName, paramName}) => {\n const type = typeof object[expectedMethod];\n if (type !== 'function') {\n throw new WorkboxError('missing-a-method', {paramName, expectedMethod,\n moduleName, className, funcName});\n }\n};\n\nconst isType = (object, expectedType,\n {moduleName, className, funcName, paramName}) => {\n if (typeof object !== expectedType) {\n throw new WorkboxError('incorrect-type', {paramName, expectedType,\n moduleName, className, funcName});\n }\n};\n\nconst isInstance = (object, expectedClass,\n {moduleName, className, funcName,\n paramName, isReturnValueProblem}) => {\n if (!(object instanceof expectedClass)) {\n throw new WorkboxError('incorrect-class', {paramName, expectedClass,\n moduleName, className, funcName, isReturnValueProblem});\n }\n};\n\nconst isOneOf = (value, validValues, {paramName}) => {\n if (!validValues.includes(value)) {\n throw new WorkboxError('invalid-value', {\n paramName,\n value,\n validValueDescription: `Valid values are ${JSON.stringify(validValues)}.`,\n });\n }\n};\n\nconst isArrayOfClass = (value, expectedClass,\n {moduleName, className, funcName, paramName}) => {\n const error = new WorkboxError('not-array-of-class', {\n value, expectedClass,\n moduleName, className, funcName, paramName,\n });\n if (!Array.isArray(value)) {\n throw error;\n }\n\n for (let item of value) {\n if (!(item instanceof expectedClass)) {\n throw error;\n }\n }\n};\n\nconst finalAssertExports = process.env.NODE_ENV === 'production' ? null : {\n hasMethod,\n isArray,\n isInstance,\n isOneOf,\n isSWEnv,\n isType,\n isArrayOfClass,\n};\n\nexport {finalAssertExports as assert};\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport '../_version.mjs';\n\n\n// Callbacks to be executed whenever there's a quota error.\nconst quotaErrorCallbacks = new Set();\n\nexport {quotaErrorCallbacks};\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport '../_version.mjs';\n\n\nconst _cacheNameDetails = {\n googleAnalytics: 'googleAnalytics',\n precache: 'precache-v2',\n prefix: 'workbox',\n runtime: 'runtime',\n suffix: self.registration.scope,\n};\n\nconst _createCacheName = (cacheName) => {\n return [_cacheNameDetails.prefix, cacheName, _cacheNameDetails.suffix]\n .filter((value) => value.length > 0)\n .join('-');\n};\n\nexport const cacheNames = {\n updateDetails: (details) => {\n Object.keys(_cacheNameDetails).forEach((key) => {\n if (typeof details[key] !== 'undefined') {\n _cacheNameDetails[key] = details[key];\n }\n });\n },\n getGoogleAnalyticsName: (userCacheName) => {\n return userCacheName || _createCacheName(_cacheNameDetails.googleAnalytics);\n },\n getPrecacheName: (userCacheName) => {\n return userCacheName || _createCacheName(_cacheNameDetails.precache);\n },\n getPrefix: () => {\n return _cacheNameDetails.prefix;\n },\n getRuntimeName: (userCacheName) => {\n return userCacheName || _createCacheName(_cacheNameDetails.runtime);\n },\n getSuffix: () => {\n return _cacheNameDetails.suffix;\n },\n};\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport '../_version.mjs';\n\nconst getFriendlyURL = (url) => {\n const urlObj = new URL(url, location);\n if (urlObj.origin === location.origin) {\n return urlObj.pathname;\n }\n return urlObj.href;\n};\n\nexport {getFriendlyURL};\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport {logger} from '../_private/logger.mjs';\nimport {quotaErrorCallbacks} from '../models/quotaErrorCallbacks.mjs';\nimport '../_version.mjs';\n\n\n/**\n * Runs all of the callback functions, one at a time sequentially, in the order\n * in which they were registered.\n *\n * @memberof workbox.core\n * @private\n */\nasync function executeQuotaErrorCallbacks() {\n if (process.env.NODE_ENV !== 'production') {\n logger.log(`About to run ${quotaErrorCallbacks.size} ` +\n `callbacks to clean up caches.`);\n }\n\n for (const callback of quotaErrorCallbacks) {\n await callback();\n if (process.env.NODE_ENV !== 'production') {\n logger.log(callback, 'is complete.');\n }\n }\n\n if (process.env.NODE_ENV !== 'production') {\n logger.log('Finished running callbacks.');\n }\n}\n\nexport {executeQuotaErrorCallbacks};\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport '../_version.mjs';\n\n\nexport const pluginEvents = {\n CACHE_DID_UPDATE: 'cacheDidUpdate',\n CACHE_KEY_WILL_BE_USED: 'cacheKeyWillBeUsed',\n CACHE_WILL_UPDATE: 'cacheWillUpdate',\n CACHED_RESPONSE_WILL_BE_USED: 'cachedResponseWillBeUsed',\n FETCH_DID_FAIL: 'fetchDidFail',\n FETCH_DID_SUCCEED: 'fetchDidSucceed',\n REQUEST_WILL_FETCH: 'requestWillFetch',\n};\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport '../_version.mjs';\n\nexport const pluginUtils = {\n filter: (plugins, callbackName) => {\n return plugins.filter((plugin) => callbackName in plugin);\n },\n};\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport {WorkboxError} from './WorkboxError.mjs';\nimport {assert} from './assert.mjs';\nimport {getFriendlyURL} from './getFriendlyURL.mjs';\nimport {logger} from './logger.mjs';\nimport {executeQuotaErrorCallbacks} from './executeQuotaErrorCallbacks.mjs';\nimport {pluginEvents} from '../models/pluginEvents.mjs';\nimport {pluginUtils} from '../utils/pluginUtils.mjs';\nimport '../_version.mjs';\n\n\n/**\n * Wrapper around cache.put().\n *\n * Will call `cacheDidUpdate` on plugins if the cache was updated, using\n * `matchOptions` when determining what the old entry is.\n *\n * @param {Object} options\n * @param {string} options.cacheName\n * @param {Request} options.request\n * @param {Response} options.response\n * @param {Event} [options.event]\n * @param {Array} [options.plugins=[]]\n * @param {Object} [options.matchOptions]\n *\n * @private\n * @memberof module:workbox-core\n */\nconst putWrapper = async ({\n cacheName,\n request,\n response,\n event,\n plugins = [],\n matchOptions,\n} = {}) => {\n if (process.env.NODE_ENV !== 'production') {\n if (request.method && request.method !== 'GET') {\n throw new WorkboxError('attempt-to-cache-non-get-request', {\n url: getFriendlyURL(request.url),\n method: request.method,\n });\n }\n }\n\n const effectiveRequest = await _getEffectiveRequest({\n plugins, request, mode: 'write'});\n\n if (!response) {\n if (process.env.NODE_ENV !== 'production') {\n logger.error(`Cannot cache non-existent response for ` +\n `'${getFriendlyURL(effectiveRequest.url)}'.`);\n }\n\n throw new WorkboxError('cache-put-with-no-response', {\n url: getFriendlyURL(effectiveRequest.url),\n });\n }\n\n let responseToCache = await _isResponseSafeToCache({\n event,\n plugins,\n response,\n request: effectiveRequest,\n });\n\n if (!responseToCache) {\n if (process.env.NODE_ENV !== 'production') {\n logger.debug(`Response '${getFriendlyURL(effectiveRequest.url)}' will ` +\n `not be cached.`, responseToCache);\n }\n return;\n }\n\n const cache = await caches.open(cacheName);\n\n const updatePlugins = pluginUtils.filter(\n plugins, pluginEvents.CACHE_DID_UPDATE);\n\n let oldResponse = updatePlugins.length > 0 ?\n await matchWrapper({cacheName, matchOptions, request: effectiveRequest}) :\n null;\n\n if (process.env.NODE_ENV !== 'production') {\n logger.debug(`Updating the '${cacheName}' cache with a new Response for ` +\n `${getFriendlyURL(effectiveRequest.url)}.`);\n }\n\n try {\n await cache.put(effectiveRequest, responseToCache);\n } catch (error) {\n // See https://developer.mozilla.org/en-US/docs/Web/API/DOMException#exception-QuotaExceededError\n if (error.name === 'QuotaExceededError') {\n await executeQuotaErrorCallbacks();\n }\n throw error;\n }\n\n for (let plugin of updatePlugins) {\n await plugin[pluginEvents.CACHE_DID_UPDATE].call(plugin, {\n cacheName,\n event,\n oldResponse,\n newResponse: responseToCache,\n request: effectiveRequest,\n });\n }\n};\n\n/**\n * This is a wrapper around cache.match().\n *\n * @param {Object} options\n * @param {string} options.cacheName Name of the cache to match against.\n * @param {Request} options.request The Request that will be used to look up\n * cache entries.\n * @param {Event} [options.event] The event that propted the action.\n * @param {Object} [options.matchOptions] Options passed to cache.match().\n * @param {Array} [options.plugins=[]] Array of plugins.\n * @return {Response} A cached response if available.\n *\n * @private\n * @memberof module:workbox-core\n */\nconst matchWrapper = async ({\n cacheName,\n request,\n event,\n matchOptions,\n plugins = [],\n}) => {\n const cache = await caches.open(cacheName);\n\n const effectiveRequest = await _getEffectiveRequest({\n plugins, request, mode: 'read'});\n\n let cachedResponse = await cache.match(effectiveRequest, matchOptions);\n if (process.env.NODE_ENV !== 'production') {\n if (cachedResponse) {\n logger.debug(`Found a cached response in '${cacheName}'.`);\n } else {\n logger.debug(`No cached response found in '${cacheName}'.`);\n }\n }\n\n for (const plugin of plugins) {\n if (pluginEvents.CACHED_RESPONSE_WILL_BE_USED in plugin) {\n cachedResponse = await plugin[pluginEvents.CACHED_RESPONSE_WILL_BE_USED]\n .call(plugin, {\n cacheName,\n event,\n matchOptions,\n cachedResponse,\n request: effectiveRequest,\n });\n if (process.env.NODE_ENV !== 'production') {\n if (cachedResponse) {\n assert.isInstance(cachedResponse, Response, {\n moduleName: 'Plugin',\n funcName: pluginEvents.CACHED_RESPONSE_WILL_BE_USED,\n isReturnValueProblem: true,\n });\n }\n }\n }\n }\n\n return cachedResponse;\n};\n\n/**\n * This method will call cacheWillUpdate on the available plugins (or use\n * status === 200) to determine if the Response is safe and valid to cache.\n *\n * @param {Object} options\n * @param {Request} options.request\n * @param {Response} options.response\n * @param {Event} [options.event]\n * @param {Array} [options.plugins=[]]\n * @return {Promise}\n *\n * @private\n * @memberof module:workbox-core\n */\nconst _isResponseSafeToCache = async ({request, response, event, plugins}) => {\n let responseToCache = response;\n let pluginsUsed = false;\n for (let plugin of plugins) {\n if (pluginEvents.CACHE_WILL_UPDATE in plugin) {\n pluginsUsed = true;\n responseToCache = await plugin[pluginEvents.CACHE_WILL_UPDATE]\n .call(plugin, {\n request,\n response: responseToCache,\n event,\n });\n\n if (process.env.NODE_ENV !== 'production') {\n if (responseToCache) {\n assert.isInstance(responseToCache, Response, {\n moduleName: 'Plugin',\n funcName: pluginEvents.CACHE_WILL_UPDATE,\n isReturnValueProblem: true,\n });\n }\n }\n\n if (!responseToCache) {\n break;\n }\n }\n }\n\n if (!pluginsUsed) {\n if (process.env.NODE_ENV !== 'production') {\n if (!responseToCache.status === 200) {\n if (responseToCache.status === 0) {\n logger.warn(`The response for '${request.url}' is an opaque ` +\n `response. The caching strategy that you're using will not ` +\n `cache opaque responses by default.`);\n } else {\n logger.debug(`The response for '${request.url}' returned ` +\n `a status code of '${response.status}' and won't be cached as a ` +\n `result.`);\n }\n }\n }\n responseToCache = responseToCache.status === 200 ? responseToCache : null;\n }\n\n return responseToCache ? responseToCache : null;\n};\n\n/**\n * Checks the list of plugins for the cacheKeyWillBeUsed callback, and\n * executes any of those callbacks found in sequence. The final `Request` object\n * returned by the last plugin is treated as the cache key for cache reads\n * and/or writes.\n *\n * @param {Object} options\n * @param {Request} options.request\n * @param {string} options.mode\n * @param {Array} [options.plugins=[]]\n * @return {Promise}\n *\n * @private\n * @memberof module:workbox-core\n */\nconst _getEffectiveRequest = async ({request, mode, plugins}) => {\n const cacheKeyWillBeUsedPlugins = pluginUtils.filter(\n plugins, pluginEvents.CACHE_KEY_WILL_BE_USED);\n\n let effectiveRequest = request;\n for (const plugin of cacheKeyWillBeUsedPlugins) {\n effectiveRequest = await plugin[pluginEvents.CACHE_KEY_WILL_BE_USED].call(\n plugin, {mode, request: effectiveRequest});\n\n if (typeof effectiveRequest === 'string') {\n effectiveRequest = new Request(effectiveRequest);\n }\n\n if (process.env.NODE_ENV !== 'production') {\n assert.isInstance(effectiveRequest, Request, {\n moduleName: 'Plugin',\n funcName: pluginEvents.CACHE_KEY_WILL_BE_USED,\n isReturnValueProblem: true,\n });\n }\n }\n\n return effectiveRequest;\n};\n\nexport const cacheWrapper = {\n put: putWrapper,\n match: matchWrapper,\n};\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport '../_version.mjs';\n\n\n/**\n * A class that wraps common IndexedDB functionality in a promise-based API.\n * It exposes all the underlying power and functionality of IndexedDB, but\n * wraps the most commonly used features in a way that's much simpler to use.\n *\n * @private\n */\nexport class DBWrapper {\n /**\n * @param {string} name\n * @param {number} version\n * @param {Object=} [callback]\n * @param {!Function} [callbacks.onupgradeneeded]\n * @param {!Function} [callbacks.onversionchange] Defaults to\n * DBWrapper.prototype._onversionchange when not specified.\n * @private\n */\n constructor(name, version, {\n onupgradeneeded,\n onversionchange = this._onversionchange,\n } = {}) {\n this._name = name;\n this._version = version;\n this._onupgradeneeded = onupgradeneeded;\n this._onversionchange = onversionchange;\n\n // If this is null, it means the database isn't open.\n this._db = null;\n }\n\n /**\n * Returns the IDBDatabase instance (not normally needed).\n *\n * @private\n */\n get db() {\n return this._db;\n }\n\n /**\n * Opens a connected to an IDBDatabase, invokes any onupgradedneeded\n * callback, and added an onversionchange callback to the database.\n *\n * @return {IDBDatabase}\n * @private\n */\n async open() {\n if (this._db) return;\n\n this._db = await new Promise((resolve, reject) => {\n // This flag is flipped to true if the timeout callback runs prior\n // to the request failing or succeeding. Note: we use a timeout instead\n // of an onblocked handler since there are cases where onblocked will\n // never never run. A timeout better handles all possible scenarios:\n // https://github.com/w3c/IndexedDB/issues/223\n let openRequestTimedOut = false;\n setTimeout(() => {\n openRequestTimedOut = true;\n reject(new Error('The open request was blocked and timed out'));\n }, this.OPEN_TIMEOUT);\n\n const openRequest = indexedDB.open(this._name, this._version);\n openRequest.onerror = () => reject(openRequest.error);\n openRequest.onupgradeneeded = (evt) => {\n if (openRequestTimedOut) {\n openRequest.transaction.abort();\n evt.target.result.close();\n } else if (this._onupgradeneeded) {\n this._onupgradeneeded(evt);\n }\n };\n openRequest.onsuccess = ({target}) => {\n const db = target.result;\n if (openRequestTimedOut) {\n db.close();\n } else {\n db.onversionchange = this._onversionchange.bind(this);\n resolve(db);\n }\n };\n });\n\n return this;\n }\n\n /**\n * Polyfills the native `getKey()` method. Note, this is overridden at\n * runtime if the browser supports the native method.\n *\n * @param {string} storeName\n * @param {*} query\n * @return {Array}\n * @private\n */\n async getKey(storeName, query) {\n return (await this.getAllKeys(storeName, query, 1))[0];\n }\n\n /**\n * Polyfills the native `getAll()` method. Note, this is overridden at\n * runtime if the browser supports the native method.\n *\n * @param {string} storeName\n * @param {*} query\n * @param {number} count\n * @return {Array}\n * @private\n */\n async getAll(storeName, query, count) {\n return await this.getAllMatching(storeName, {query, count});\n }\n\n\n /**\n * Polyfills the native `getAllKeys()` method. Note, this is overridden at\n * runtime if the browser supports the native method.\n *\n * @param {string} storeName\n * @param {*} query\n * @param {number} count\n * @return {Array}\n * @private\n */\n async getAllKeys(storeName, query, count) {\n return (await this.getAllMatching(\n storeName, {query, count, includeKeys: true})).map(({key}) => key);\n }\n\n /**\n * Supports flexible lookup in an object store by specifying an index,\n * query, direction, and count. This method returns an array of objects\n * with the signature .\n *\n * @param {string} storeName\n * @param {Object} [opts]\n * @param {string} [opts.index] The index to use (if specified).\n * @param {*} [opts.query]\n * @param {IDBCursorDirection} [opts.direction]\n * @param {number} [opts.count] The max number of results to return.\n * @param {boolean} [opts.includeKeys] When true, the structure of the\n * returned objects is changed from an array of values to an array of\n * objects in the form {key, primaryKey, value}.\n * @return {Array}\n * @private\n */\n async getAllMatching(storeName, {\n index,\n query = null, // IE errors if query === `undefined`.\n direction = 'next',\n count,\n includeKeys,\n } = {}) {\n return await this.transaction([storeName], 'readonly', (txn, done) => {\n const store = txn.objectStore(storeName);\n const target = index ? store.index(index) : store;\n const results = [];\n\n target.openCursor(query, direction).onsuccess = ({target}) => {\n const cursor = target.result;\n if (cursor) {\n const {primaryKey, key, value} = cursor;\n results.push(includeKeys ? {primaryKey, key, value} : value);\n if (count && results.length >= count) {\n done(results);\n } else {\n cursor.continue();\n }\n } else {\n done(results);\n }\n };\n });\n }\n\n /**\n * Accepts a list of stores, a transaction type, and a callback and\n * performs a transaction. A promise is returned that resolves to whatever\n * value the callback chooses. The callback holds all the transaction logic\n * and is invoked with two arguments:\n * 1. The IDBTransaction object\n * 2. A `done` function, that's used to resolve the promise when\n * when the transaction is done, if passed a value, the promise is\n * resolved to that value.\n *\n * @param {Array} storeNames An array of object store names\n * involved in the transaction.\n * @param {string} type Can be `readonly` or `readwrite`.\n * @param {!Function} callback\n * @return {*} The result of the transaction ran by the callback.\n * @private\n */\n async transaction(storeNames, type, callback) {\n await this.open();\n return await new Promise((resolve, reject) => {\n const txn = this._db.transaction(storeNames, type);\n txn.onabort = ({target}) => reject(target.error);\n txn.oncomplete = () => resolve();\n\n callback(txn, (value) => resolve(value));\n });\n }\n\n /**\n * Delegates async to a native IDBObjectStore method.\n *\n * @param {string} method The method name.\n * @param {string} storeName The object store name.\n * @param {string} type Can be `readonly` or `readwrite`.\n * @param {...*} args The list of args to pass to the native method.\n * @return {*} The result of the transaction.\n * @private\n */\n async _call(method, storeName, type, ...args) {\n const callback = (txn, done) => {\n txn.objectStore(storeName)[method](...args).onsuccess = ({target}) => {\n done(target.result);\n };\n };\n\n return await this.transaction([storeName], type, callback);\n }\n\n /**\n * The default onversionchange handler, which closes the database so other\n * connections can open without being blocked.\n *\n * @private\n */\n _onversionchange() {\n this.close();\n }\n\n /**\n * Closes the connection opened by `DBWrapper.open()`. Generally this method\n * doesn't need to be called since:\n * 1. It's usually better to keep a connection open since opening\n * a new connection is somewhat slow.\n * 2. Connections are automatically closed when the reference is\n * garbage collected.\n * The primary use case for needing to close a connection is when another\n * reference (typically in another tab) needs to upgrade it and would be\n * blocked by the current, open connection.\n *\n * @private\n */\n close() {\n if (this._db) {\n this._db.close();\n this._db = null;\n }\n }\n}\n\n// Exposed to let users modify the default timeout on a per-instance\n// or global basis.\nDBWrapper.prototype.OPEN_TIMEOUT = 2000;\n\n// Wrap native IDBObjectStore methods according to their mode.\nconst methodsToWrap = {\n 'readonly': ['get', 'count', 'getKey', 'getAll', 'getAllKeys'],\n 'readwrite': ['add', 'put', 'clear', 'delete'],\n};\nfor (const [mode, methods] of Object.entries(methodsToWrap)) {\n for (const method of methods) {\n if (method in IDBObjectStore.prototype) {\n // Don't use arrow functions here since we're outside of the class.\n DBWrapper.prototype[method] = async function(storeName, ...args) {\n return await this._call(method, storeName, mode, ...args);\n };\n }\n }\n}\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport '../_version.mjs';\n\n\n/**\n * Deletes the database.\n * Note: this is exported separately from the DBWrapper module because most\n * usages of IndexedDB in workbox dont need deleting, and this way it can be\n * reused in tests to delete databases without creating DBWrapper instances.\n *\n * @param {string} name The database name.\n * @private\n */\nexport const deleteDatabase = async (name) => {\n await new Promise((resolve, reject) => {\n const request = indexedDB.deleteDatabase(name);\n request.onerror = ({target}) => {\n reject(target.error);\n };\n request.onblocked = () => {\n reject(new Error('Delete blocked'));\n };\n request.onsuccess = () => {\n resolve();\n };\n });\n};\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport {WorkboxError} from './WorkboxError.mjs';\nimport {logger} from './logger.mjs';\nimport {assert} from './assert.mjs';\nimport {getFriendlyURL} from '../_private/getFriendlyURL.mjs';\nimport {pluginEvents} from '../models/pluginEvents.mjs';\nimport {pluginUtils} from '../utils/pluginUtils.mjs';\nimport '../_version.mjs';\n\n/**\n * Wrapper around the fetch API.\n *\n * Will call requestWillFetch on available plugins.\n *\n * @param {Object} options\n * @param {Request|string} options.request\n * @param {Object} [options.fetchOptions]\n * @param {Event} [options.event]\n * @param {Array} [options.plugins=[]]\n * @return {Promise}\n *\n * @private\n * @memberof module:workbox-core\n */\nconst wrappedFetch = async ({\n request,\n fetchOptions,\n event,\n plugins = []}) => {\n // We *should* be able to call `await event.preloadResponse` even if it's\n // undefined, but for some reason, doing so leads to errors in our Node unit\n // tests. To work around that, explicitly check preloadResponse's value first.\n if (event && event.preloadResponse) {\n const possiblePreloadResponse = await event.preloadResponse;\n if (possiblePreloadResponse) {\n if (process.env.NODE_ENV !== 'production') {\n logger.log(`Using a preloaded navigation response for ` +\n `'${getFriendlyURL(request.url)}'`);\n }\n return possiblePreloadResponse;\n }\n }\n\n if (typeof request === 'string') {\n request = new Request(request);\n }\n\n if (process.env.NODE_ENV !== 'production') {\n assert.isInstance(request, Request, {\n paramName: request,\n expectedClass: 'Request',\n moduleName: 'workbox-core',\n className: 'fetchWrapper',\n funcName: 'wrappedFetch',\n });\n }\n\n const failedFetchPlugins = pluginUtils.filter(\n plugins, pluginEvents.FETCH_DID_FAIL);\n\n // If there is a fetchDidFail plugin, we need to save a clone of the\n // original request before it's either modified by a requestWillFetch\n // plugin or before the original request's body is consumed via fetch().\n const originalRequest = failedFetchPlugins.length > 0 ?\n request.clone() : null;\n\n try {\n for (let plugin of plugins) {\n if (pluginEvents.REQUEST_WILL_FETCH in plugin) {\n request = await plugin[pluginEvents.REQUEST_WILL_FETCH].call(plugin, {\n request: request.clone(),\n event,\n });\n\n if (process.env.NODE_ENV !== 'production') {\n if (request) {\n assert.isInstance(request, Request, {\n moduleName: 'Plugin',\n funcName: pluginEvents.CACHED_RESPONSE_WILL_BE_USED,\n isReturnValueProblem: true,\n });\n }\n }\n }\n }\n } catch (err) {\n throw new WorkboxError('plugin-error-request-will-fetch', {\n thrownError: err,\n });\n }\n\n // The request can be altered by plugins with `requestWillFetch` making\n // the original request (Most likely from a `fetch` event) to be different\n // to the Request we make. Pass both to `fetchDidFail` to aid debugging.\n let pluginFilteredRequest = request.clone();\n\n try {\n let fetchResponse;\n\n // See https://github.com/GoogleChrome/workbox/issues/1796\n if (request.mode === 'navigate') {\n fetchResponse = await fetch(request);\n } else {\n fetchResponse = await fetch(request, fetchOptions);\n }\n\n if (process.env.NODE_ENV !== 'production') {\n logger.debug(`Network request for `+\n `'${getFriendlyURL(request.url)}' returned a response with ` +\n `status '${fetchResponse.status}'.`);\n }\n\n for (const plugin of plugins) {\n if (pluginEvents.FETCH_DID_SUCCEED in plugin) {\n fetchResponse = await plugin[pluginEvents.FETCH_DID_SUCCEED]\n .call(plugin, {\n event,\n request: pluginFilteredRequest,\n response: fetchResponse,\n });\n\n if (process.env.NODE_ENV !== 'production') {\n if (fetchResponse) {\n assert.isInstance(fetchResponse, Response, {\n moduleName: 'Plugin',\n funcName: pluginEvents.FETCH_DID_SUCCEED,\n isReturnValueProblem: true,\n });\n }\n }\n }\n }\n\n return fetchResponse;\n } catch (error) {\n if (process.env.NODE_ENV !== 'production') {\n logger.error(`Network request for `+\n `'${getFriendlyURL(request.url)}' threw an error.`, error);\n }\n\n for (const plugin of failedFetchPlugins) {\n await plugin[pluginEvents.FETCH_DID_FAIL].call(plugin, {\n error,\n event,\n originalRequest: originalRequest.clone(),\n request: pluginFilteredRequest.clone(),\n });\n }\n\n throw error;\n }\n};\n\nconst fetchWrapper = {\n fetch: wrappedFetch,\n};\n\nexport {fetchWrapper};\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport '../_version.mjs';\n\n\n/**\n * The Deferred class composes Promises in a way that allows for them to be\n * resolved or rejected from outside the constructor. In most cases promises\n * should be used directly, but Deferreds can be necessary when the logic to\n * resolve a promise must be separate.\n *\n * @private\n */\nexport class Deferred {\n /**\n * Creates a promise and exposes its resolve and reject functions as methods.\n */\n constructor() {\n this.promise = new Promise((resolve, reject) => {\n this.resolve = resolve;\n this.reject = reject;\n });\n }\n}\n","/*\n Copyright 2019 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport {cacheNames as _cacheNames} from './_private/cacheNames.mjs';\nimport './_version.mjs';\n\n\n/**\n * Get the current cache names and prefix/suffix used by Workbox.\n *\n * `cacheNames.precache` is used for precached assets,\n * `cacheNames.googleAnalytics` is used by `workbox-google-analytics` to\n * store `analytics.js`, and `cacheNames.runtime` is used for everything else.\n *\n * `cacheNames.prefix` can be used to retrieve just the current prefix value.\n * `cacheNames.suffix` can be used to retrieve just the current suffix value.\n *\n * @return {Object} An object with `precache`, `runtime`, `prefix`, and\n * `googleAnalytics` properties.\n *\n * @alias workbox.core.cacheNames\n */\nexport const cacheNames = {\n get googleAnalytics() {\n return _cacheNames.getGoogleAnalyticsName();\n },\n get precache() {\n return _cacheNames.getPrecacheName();\n },\n get prefix() {\n return _cacheNames.getPrefix();\n },\n get runtime() {\n return _cacheNames.getRuntimeName();\n },\n get suffix() {\n return _cacheNames.getSuffix();\n },\n};\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport {registerQuotaErrorCallback} from './registerQuotaErrorCallback.mjs';\nimport * as _private from './_private.mjs';\nimport {clientsClaim} from './clientsClaim.mjs';\nimport {cacheNames} from './cacheNames.mjs';\nimport {setCacheNameDetails} from './setCacheNameDetails.mjs';\nimport {skipWaiting} from './skipWaiting.mjs';\nimport './_version.mjs';\n\n\n// Give our version strings something to hang off of.\ntry {\n self.workbox.v = self.workbox.v || {};\n} catch (errer) {\n // NOOP\n}\n\n/**\n * All of the Workbox service worker libraries use workbox-core for shared\n * code as well as setting default values that need to be shared (like cache\n * names).\n *\n * @namespace workbox.core\n */\n\nexport {\n _private,\n clientsClaim,\n cacheNames,\n registerQuotaErrorCallback,\n setCacheNameDetails,\n skipWaiting,\n};\n","/*\n Copyright 2019 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport './_version.mjs';\n\n\n/**\n * Claim any currently available clients once the service worker\n * becomes active. This is normally used in conjunction with `skipWaiting()`.\n *\n * @alias workbox.core.clientsClaim\n */\nexport const clientsClaim = () => {\n addEventListener('activate', () => clients.claim());\n};\n","/*\n Copyright 2019 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport {logger} from './_private/logger.mjs';\nimport {assert} from './_private/assert.mjs';\nimport {quotaErrorCallbacks} from './models/quotaErrorCallbacks.mjs';\nimport './_version.mjs';\n\n\n/**\n * Adds a function to the set of quotaErrorCallbacks that will be executed if\n * there's a quota error.\n *\n * @param {Function} callback\n * @memberof workbox.core\n */\nfunction registerQuotaErrorCallback(callback) {\n if (process.env.NODE_ENV !== 'production') {\n assert.isType(callback, 'function', {\n moduleName: 'workbox-core',\n funcName: 'register',\n paramName: 'callback',\n });\n }\n\n quotaErrorCallbacks.add(callback);\n\n if (process.env.NODE_ENV !== 'production') {\n logger.log('Registered a callback to respond to quota errors.', callback);\n }\n}\n\nexport {registerQuotaErrorCallback};\n","/*\n Copyright 2019 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport {assert} from './_private/assert.mjs';\nimport {cacheNames} from './_private/cacheNames.mjs';\nimport {WorkboxError} from './_private/WorkboxError.mjs';\nimport './_version.mjs';\n\n\n/**\n * Modifies the default cache names used by the Workbox packages.\n * Cache names are generated as `--`.\n *\n * @param {Object} details\n * @param {Object} [details.prefix] The string to add to the beginning of\n * the precache and runtime cache names.\n * @param {Object} [details.suffix] The string to add to the end of\n * the precache and runtime cache names.\n * @param {Object} [details.precache] The cache name to use for precache\n * caching.\n * @param {Object} [details.runtime] The cache name to use for runtime caching.\n * @param {Object} [details.googleAnalytics] The cache name to use for\n * `workbox-google-analytics` caching.\n *\n * @alias workbox.core.setCacheNameDetails\n */\nexport const setCacheNameDetails = (details) => {\n if (process.env.NODE_ENV !== 'production') {\n Object.keys(details).forEach((key) => {\n assert.isType(details[key], 'string', {\n moduleName: 'workbox-core',\n funcName: 'setCacheNameDetails',\n paramName: `details.${key}`,\n });\n });\n\n if ('precache' in details && details.precache.length === 0) {\n throw new WorkboxError('invalid-cache-name', {\n cacheNameId: 'precache',\n value: details.precache,\n });\n }\n\n if ('runtime' in details && details.runtime.length === 0) {\n throw new WorkboxError('invalid-cache-name', {\n cacheNameId: 'runtime',\n value: details.runtime,\n });\n }\n\n if ('googleAnalytics' in details && details.googleAnalytics.length === 0) {\n throw new WorkboxError('invalid-cache-name', {\n cacheNameId: 'googleAnalytics',\n value: details.googleAnalytics,\n });\n }\n }\n\n cacheNames.updateDetails(details);\n};\n","/*\n Copyright 2019 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport './_version.mjs';\n\n\n/**\n * Force a service worker to become active, instead of waiting. This is\n * normally used in conjunction with `clientsClaim()`.\n *\n * @alias workbox.core.skipWaiting\n */\nexport const skipWaiting = () => {\n // We need to explicitly call `self.skipWaiting()` here because we're\n // shadowing `skipWaiting` with this local function.\n addEventListener('install', () => self.skipWaiting());\n};\n"],"names":["self","_","e","messageGenerator","code","args","msg","length","JSON","stringify","WorkboxError","Error","constructor","errorCode","details","name","quotaErrorCallbacks","Set","_cacheNameDetails","googleAnalytics","precache","prefix","runtime","suffix","registration","scope","_createCacheName","cacheName","filter","value","join","cacheNames","updateDetails","Object","keys","forEach","key","getGoogleAnalyticsName","userCacheName","getPrecacheName","getPrefix","getRuntimeName","getSuffix","getFriendlyURL","url","urlObj","URL","location","origin","pathname","href","async","executeQuotaErrorCallbacks","callback","pluginEvents","pluginUtils","plugins","callbackName","plugin","matchWrapper","request","event","matchOptions","cache","caches","open","effectiveRequest","_getEffectiveRequest","mode","cachedResponse","match","call","_isResponseSafeToCache","response","responseToCache","pluginsUsed","status","cacheKeyWillBeUsedPlugins","Request","cacheWrapper","put","updatePlugins","oldResponse","error","newResponse","DBWrapper","version","onupgradeneeded","onversionchange","this","_onversionchange","_name","_version","_onupgradeneeded","_db","Promise","resolve","reject","openRequestTimedOut","setTimeout","OPEN_TIMEOUT","openRequest","indexedDB","onerror","evt","transaction","abort","target","result","close","onsuccess","db","bind","storeName","query","getAllKeys","count","getAllMatching","includeKeys","map","index","direction","txn","done","store","objectStore","results","openCursor","cursor","primaryKey","push","continue","storeNames","type","onabort","oncomplete","method","prototype","methodsToWrap","methods","entries","IDBObjectStore","_call","fetchWrapper","fetch","fetchOptions","preloadResponse","possiblePreloadResponse","failedFetchPlugins","originalRequest","clone","err","thrownError","pluginFilteredRequest","fetchResponse","process","promise","deleteDatabase","onblocked","_cacheNames","workbox","v","errer","addEventListener","clients","claim","add","skipWaiting"],"mappings":"yEAAA,IAAIA,KAAK,uBAAuBC,IAAI,MAAMC,ICU1C,MCkBaC,EAjBI,CAACC,KAASC,SACrBC,EAAMF,SACNC,EAAKE,OAAS,IAChBD,UAAcE,KAAKC,UAAUJ,MAExBC,GCIT,MAAMI,UAAqBC,MASzBC,YAAYC,EAAWC,SACPX,EAAiBU,EAAWC,SAIrCC,KAAOF,OACPC,QAAUA,GCuDnB,MC9EME,EAAsB,IAAIC,ICDhC,MAAMC,EAAoB,CACxBC,gBAAiB,kBACjBC,SAAU,cACVC,OAAQ,UACRC,QAAS,UACTC,OAAQvB,KAAKwB,aAAaC,OAGtBC,EAAoBC,GACjB,CAACT,EAAkBG,OAAQM,EAAWT,EAAkBK,QAC1DK,OAAQC,GAAUA,EAAMtB,OAAS,GACjCuB,KAAK,KAGCC,EAAa,CACxBC,cAAgBlB,IACdmB,OAAOC,KAAKhB,GAAmBiB,QAASC,SACV,IAAjBtB,EAAQsB,KACjBlB,EAAkBkB,GAAOtB,EAAQsB,OAIvCC,uBAAyBC,GAChBA,GAAiBZ,EAAiBR,EAAkBC,iBAE7DoB,gBAAkBD,GACTA,GAAiBZ,EAAiBR,EAAkBE,UAE7DoB,UAAW,IACFtB,EAAkBG,OAE3BoB,eAAiBH,GACRA,GAAiBZ,EAAiBR,EAAkBI,SAE7DoB,UAAW,IACFxB,EAAkBK,QCpCvBoB,EAAkBC,UAChBC,EAAS,IAAIC,IAAIF,EAAKG,iBACxBF,EAAOG,SAAWD,SAASC,OACtBH,EAAOI,SAETJ,EAAOK,MCKhBC,eAAeC,QAMR,MAAMC,KAAYrC,QACfqC,IChBH,MAAMC,EACO,iBADPA,EAEa,qBAFbA,EAGQ,kBAHRA,EAImB,2BAJnBA,EAKK,eALLA,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Kb,EAAQ,CACrDyB,MAAAA,EACAtB,MAAAA,EACAwF,gBAAiBA,EAAgBC,QACjC1F,QAAS6F,EAAsBH,gBAI7BnE,iCVlEiBwE,sDWvEpB,MAIL/I,mBACOgJ,QAAU,IAAI7D,QAAQ,CAACC,EAASC,UAC9BD,QAAUA,OACVC,OAASA,qBFNU9C,MAAAA,UACtB,IAAI4C,QAAQ,CAACC,EAASC,WACpBrC,EAAU0C,UAAUuD,eAAe9I,GACzC6C,EAAQ2C,QAAU,GAAEI,OAAAA,MAClBV,EAAOU,EAAOxB,SAEhBvB,EAAQkG,UAAY,MAClB7D,EAAO,IAAItF,MAAM,qBAEnBiD,EAAQkD,UAAY,MAClBd,6EZpBS2D,4BeiBF5H,EAAa,8BAEfgI,EAAY1H,gDAGZ0H,EAAYxH,uCAGZwH,EAAYvH,kCAGZuH,EAAYtH,sCAGZsH,EAAYrH,cCvBvB,IACE1C,KAAKgK,QAAQC,EAAIjK,KAAKgK,QAAQC,GAAK,GACnC,MAAOC,uCCHmB,MAC1BC,iBAAiB,WAAY,IAAMC,QAAQC,uDCG7C,SAAoChH,GASlCrC,EAAoBsJ,IAAIjH,0BCCUvC,CAAAA,IAgClCiB,EAAWC,cAAclB,mBC9CA,MAGzBqJ,iBAAiB,UAAW,IAAMnK,KAAKuK"} \ No newline at end of file diff --git a/workbox-v4.3.1/workbox-expiration.dev.js b/workbox-v4.3.1/workbox-expiration.dev.js new file mode 100644 index 0000000000..cbd068b4f0 --- /dev/null +++ b/workbox-v4.3.1/workbox-expiration.dev.js @@ -0,0 +1,652 @@ +this.workbox = this.workbox || {}; +this.workbox.expiration = (function (exports, DBWrapper_mjs, deleteDatabase_mjs, WorkboxError_mjs, assert_mjs, logger_mjs, cacheNames_mjs, getFriendlyURL_mjs, registerQuotaErrorCallback_mjs) { + 'use strict'; + + try { + self['workbox:expiration:4.3.1'] && _(); + } catch (e) {} // eslint-disable-line + + /* + Copyright 2018 Google LLC + + Use of this source code is governed by an MIT-style + license that can be found in the LICENSE file or at + https://opensource.org/licenses/MIT. + */ + const DB_NAME = 'workbox-expiration'; + const OBJECT_STORE_NAME = 'cache-entries'; + + const normalizeURL = unNormalizedUrl => { + const url = new URL(unNormalizedUrl, location); + url.hash = ''; + return url.href; + }; + /** + * Returns the timestamp model. + * + * @private + */ + + + class CacheTimestampsModel { + /** + * + * @param {string} cacheName + * + * @private + */ + constructor(cacheName) { + this._cacheName = cacheName; + this._db = new DBWrapper_mjs.DBWrapper(DB_NAME, 1, { + onupgradeneeded: event => this._handleUpgrade(event) + }); + } + /** + * Should perform an upgrade of indexedDB. + * + * @param {Event} event + * + * @private + */ + + + _handleUpgrade(event) { + const db = event.target.result; // TODO(philipwalton): EdgeHTML doesn't support arrays as a keyPath, so we + // have to use the `id` keyPath here and create our own values (a + // concatenation of `url + cacheName`) instead of simply using + // `keyPath: ['url', 'cacheName']`, which is supported in other browsers. + + const objStore = db.createObjectStore(OBJECT_STORE_NAME, { + keyPath: 'id' + }); // TODO(philipwalton): once we don't have to support EdgeHTML, we can + // create a single index with the keyPath `['cacheName', 'timestamp']` + // instead of doing both these indexes. + + objStore.createIndex('cacheName', 'cacheName', { + unique: false + }); + objStore.createIndex('timestamp', 'timestamp', { + unique: false + }); // Previous versions of `workbox-expiration` used `this._cacheName` + // as the IDBDatabase name. + + deleteDatabase_mjs.deleteDatabase(this._cacheName); + } + /** + * @param {string} url + * @param {number} timestamp + * + * @private + */ + + + async setTimestamp(url, timestamp) { + url = normalizeURL(url); + await this._db.put(OBJECT_STORE_NAME, { + url, + timestamp, + cacheName: this._cacheName, + // Creating an ID from the URL and cache name won't be necessary once + // Edge switches to Chromium and all browsers we support work with + // array keyPaths. + id: this._getId(url) + }); + } + /** + * Returns the timestamp stored for a given URL. + * + * @param {string} url + * @return {number} + * + * @private + */ + + + async getTimestamp(url) { + const entry = await this._db.get(OBJECT_STORE_NAME, this._getId(url)); + return entry.timestamp; + } + /** + * Iterates through all the entries in the object store (from newest to + * oldest) and removes entries once either `maxCount` is reached or the + * entry's timestamp is less than `minTimestamp`. + * + * @param {number} minTimestamp + * @param {number} maxCount + * + * @private + */ + + + async expireEntries(minTimestamp, maxCount) { + const entriesToDelete = await this._db.transaction(OBJECT_STORE_NAME, 'readwrite', (txn, done) => { + const store = txn.objectStore(OBJECT_STORE_NAME); + const entriesToDelete = []; + let entriesNotDeletedCount = 0; + + store.index('timestamp').openCursor(null, 'prev').onsuccess = ({ + target + }) => { + const cursor = target.result; + + if (cursor) { + const result = cursor.value; // TODO(philipwalton): once we can use a multi-key index, we + // won't have to check `cacheName` here. + + if (result.cacheName === this._cacheName) { + // Delete an entry if it's older than the max age or + // if we already have the max number allowed. + if (minTimestamp && result.timestamp < minTimestamp || maxCount && entriesNotDeletedCount >= maxCount) { + // TODO(philipwalton): we should be able to delete the + // entry right here, but doing so causes an iteration + // bug in Safari stable (fixed in TP). Instead we can + // store the keys of the entries to delete, and then + // delete the separate transactions. + // https://github.com/GoogleChrome/workbox/issues/1978 + // cursor.delete(); + // We only need to return the URL, not the whole entry. + entriesToDelete.push(cursor.value); + } else { + entriesNotDeletedCount++; + } + } + + cursor.continue(); + } else { + done(entriesToDelete); + } + }; + }); // TODO(philipwalton): once the Safari bug in the following issue is fixed, + // we should be able to remove this loop and do the entry deletion in the + // cursor loop above: + // https://github.com/GoogleChrome/workbox/issues/1978 + + const urlsDeleted = []; + + for (const entry of entriesToDelete) { + await this._db.delete(OBJECT_STORE_NAME, entry.id); + urlsDeleted.push(entry.url); + } + + return urlsDeleted; + } + /** + * Takes a URL and returns an ID that will be unique in the object store. + * + * @param {string} url + * @return {string} + * + * @private + */ + + + _getId(url) { + // Creating an ID from the URL and cache name won't be necessary once + // Edge switches to Chromium and all browsers we support work with + // array keyPaths. + return this._cacheName + '|' + normalizeURL(url); + } + + } + + /* + Copyright 2018 Google LLC + + Use of this source code is governed by an MIT-style + license that can be found in the LICENSE file or at + https://opensource.org/licenses/MIT. + */ + /** + * The `CacheExpiration` class allows you define an expiration and / or + * limit on the number of responses stored in a + * [`Cache`](https://developer.mozilla.org/en-US/docs/Web/API/Cache). + * + * @memberof workbox.expiration + */ + + class CacheExpiration { + /** + * To construct a new CacheExpiration instance you must provide at least + * one of the `config` properties. + * + * @param {string} cacheName Name of the cache to apply restrictions to. + * @param {Object} config + * @param {number} [config.maxEntries] The maximum number of entries to cache. + * Entries used the least will be removed as the maximum is reached. + * @param {number} [config.maxAgeSeconds] The maximum age of an entry before + * it's treated as stale and removed. + */ + constructor(cacheName, config = {}) { + { + assert_mjs.assert.isType(cacheName, 'string', { + moduleName: 'workbox-expiration', + className: 'CacheExpiration', + funcName: 'constructor', + paramName: 'cacheName' + }); + + if (!(config.maxEntries || config.maxAgeSeconds)) { + throw new WorkboxError_mjs.WorkboxError('max-entries-or-age-required', { + moduleName: 'workbox-expiration', + className: 'CacheExpiration', + funcName: 'constructor' + }); + } + + if (config.maxEntries) { + assert_mjs.assert.isType(config.maxEntries, 'number', { + moduleName: 'workbox-expiration', + className: 'CacheExpiration', + funcName: 'constructor', + paramName: 'config.maxEntries' + }); // TODO: Assert is positive + } + + if (config.maxAgeSeconds) { + assert_mjs.assert.isType(config.maxAgeSeconds, 'number', { + moduleName: 'workbox-expiration', + className: 'CacheExpiration', + funcName: 'constructor', + paramName: 'config.maxAgeSeconds' + }); // TODO: Assert is positive + } + } + + this._isRunning = false; + this._rerunRequested = false; + this._maxEntries = config.maxEntries; + this._maxAgeSeconds = config.maxAgeSeconds; + this._cacheName = cacheName; + this._timestampModel = new CacheTimestampsModel(cacheName); + } + /** + * Expires entries for the given cache and given criteria. + */ + + + async expireEntries() { + if (this._isRunning) { + this._rerunRequested = true; + return; + } + + this._isRunning = true; + const minTimestamp = this._maxAgeSeconds ? Date.now() - this._maxAgeSeconds * 1000 : undefined; + const urlsExpired = await this._timestampModel.expireEntries(minTimestamp, this._maxEntries); // Delete URLs from the cache + + const cache = await caches.open(this._cacheName); + + for (const url of urlsExpired) { + await cache.delete(url); + } + + { + if (urlsExpired.length > 0) { + logger_mjs.logger.groupCollapsed(`Expired ${urlsExpired.length} ` + `${urlsExpired.length === 1 ? 'entry' : 'entries'} and removed ` + `${urlsExpired.length === 1 ? 'it' : 'them'} from the ` + `'${this._cacheName}' cache.`); + logger_mjs.logger.log(`Expired the following ${urlsExpired.length === 1 ? 'URL' : 'URLs'}:`); + urlsExpired.forEach(url => logger_mjs.logger.log(` ${url}`)); + logger_mjs.logger.groupEnd(); + } else { + logger_mjs.logger.debug(`Cache expiration ran and found no entries to remove.`); + } + } + + this._isRunning = false; + + if (this._rerunRequested) { + this._rerunRequested = false; + this.expireEntries(); + } + } + /** + * Update the timestamp for the given URL. This ensures the when + * removing entries based on maximum entries, most recently used + * is accurate or when expiring, the timestamp is up-to-date. + * + * @param {string} url + */ + + + async updateTimestamp(url) { + { + assert_mjs.assert.isType(url, 'string', { + moduleName: 'workbox-expiration', + className: 'CacheExpiration', + funcName: 'updateTimestamp', + paramName: 'url' + }); + } + + await this._timestampModel.setTimestamp(url, Date.now()); + } + /** + * Can be used to check if a URL has expired or not before it's used. + * + * This requires a look up from IndexedDB, so can be slow. + * + * Note: This method will not remove the cached entry, call + * `expireEntries()` to remove indexedDB and Cache entries. + * + * @param {string} url + * @return {boolean} + */ + + + async isURLExpired(url) { + { + if (!this._maxAgeSeconds) { + throw new WorkboxError_mjs.WorkboxError(`expired-test-without-max-age`, { + methodName: 'isURLExpired', + paramName: 'maxAgeSeconds' + }); + } + } + + const timestamp = await this._timestampModel.getTimestamp(url); + const expireOlderThan = Date.now() - this._maxAgeSeconds * 1000; + return timestamp < expireOlderThan; + } + /** + * Removes the IndexedDB object store used to keep track of cache expiration + * metadata. + */ + + + async delete() { + // Make sure we don't attempt another rerun if we're called in the middle of + // a cache expiration. + this._rerunRequested = false; + await this._timestampModel.expireEntries(Infinity); // Expires all. + } + + } + + /* + Copyright 2018 Google LLC + + Use of this source code is governed by an MIT-style + license that can be found in the LICENSE file or at + https://opensource.org/licenses/MIT. + */ + /** + * This plugin can be used in the Workbox APIs to regularly enforce a + * limit on the age and / or the number of cached requests. + * + * Whenever a cached request is used or updated, this plugin will look + * at the used Cache and remove any old or extra requests. + * + * When using `maxAgeSeconds`, requests may be used *once* after expiring + * because the expiration clean up will not have occurred until *after* the + * cached request has been used. If the request has a "Date" header, then + * a light weight expiration check is performed and the request will not be + * used immediately. + * + * When using `maxEntries`, the entry least-recently requested will be removed from the cache first. + * + * @memberof workbox.expiration + */ + + class Plugin { + /** + * @param {Object} config + * @param {number} [config.maxEntries] The maximum number of entries to cache. + * Entries used the least will be removed as the maximum is reached. + * @param {number} [config.maxAgeSeconds] The maximum age of an entry before + * it's treated as stale and removed. + * @param {boolean} [config.purgeOnQuotaError] Whether to opt this cache in to + * automatic deletion if the available storage quota has been exceeded. + */ + constructor(config = {}) { + { + if (!(config.maxEntries || config.maxAgeSeconds)) { + throw new WorkboxError_mjs.WorkboxError('max-entries-or-age-required', { + moduleName: 'workbox-expiration', + className: 'Plugin', + funcName: 'constructor' + }); + } + + if (config.maxEntries) { + assert_mjs.assert.isType(config.maxEntries, 'number', { + moduleName: 'workbox-expiration', + className: 'Plugin', + funcName: 'constructor', + paramName: 'config.maxEntries' + }); + } + + if (config.maxAgeSeconds) { + assert_mjs.assert.isType(config.maxAgeSeconds, 'number', { + moduleName: 'workbox-expiration', + className: 'Plugin', + funcName: 'constructor', + paramName: 'config.maxAgeSeconds' + }); + } + } + + this._config = config; + this._maxAgeSeconds = config.maxAgeSeconds; + this._cacheExpirations = new Map(); + + if (config.purgeOnQuotaError) { + registerQuotaErrorCallback_mjs.registerQuotaErrorCallback(() => this.deleteCacheAndMetadata()); + } + } + /** + * A simple helper method to return a CacheExpiration instance for a given + * cache name. + * + * @param {string} cacheName + * @return {CacheExpiration} + * + * @private + */ + + + _getCacheExpiration(cacheName) { + if (cacheName === cacheNames_mjs.cacheNames.getRuntimeName()) { + throw new WorkboxError_mjs.WorkboxError('expire-custom-caches-only'); + } + + let cacheExpiration = this._cacheExpirations.get(cacheName); + + if (!cacheExpiration) { + cacheExpiration = new CacheExpiration(cacheName, this._config); + + this._cacheExpirations.set(cacheName, cacheExpiration); + } + + return cacheExpiration; + } + /** + * A "lifecycle" callback that will be triggered automatically by the + * `workbox.strategies` handlers when a `Response` is about to be returned + * from a [Cache](https://developer.mozilla.org/en-US/docs/Web/API/Cache) to + * the handler. It allows the `Response` to be inspected for freshness and + * prevents it from being used if the `Response`'s `Date` header value is + * older than the configured `maxAgeSeconds`. + * + * @param {Object} options + * @param {string} options.cacheName Name of the cache the response is in. + * @param {Response} options.cachedResponse The `Response` object that's been + * read from a cache and whose freshness should be checked. + * @return {Response} Either the `cachedResponse`, if it's + * fresh, or `null` if the `Response` is older than `maxAgeSeconds`. + * + * @private + */ + + + cachedResponseWillBeUsed({ + event, + request, + cacheName, + cachedResponse + }) { + if (!cachedResponse) { + return null; + } + + let isFresh = this._isResponseDateFresh(cachedResponse); // Expire entries to ensure that even if the expiration date has + // expired, it'll only be used once. + + + const cacheExpiration = this._getCacheExpiration(cacheName); + + cacheExpiration.expireEntries(); // Update the metadata for the request URL to the current timestamp, + // but don't `await` it as we don't want to block the response. + + const updateTimestampDone = cacheExpiration.updateTimestamp(request.url); + + if (event) { + try { + event.waitUntil(updateTimestampDone); + } catch (error) { + { + logger_mjs.logger.warn(`Unable to ensure service worker stays alive when ` + `updating cache entry for '${getFriendlyURL_mjs.getFriendlyURL(event.request.url)}'.`); + } + } + } + + return isFresh ? cachedResponse : null; + } + /** + * @param {Response} cachedResponse + * @return {boolean} + * + * @private + */ + + + _isResponseDateFresh(cachedResponse) { + if (!this._maxAgeSeconds) { + // We aren't expiring by age, so return true, it's fresh + return true; + } // Check if the 'date' header will suffice a quick expiration check. + // See https://github.com/GoogleChromeLabs/sw-toolbox/issues/164 for + // discussion. + + + const dateHeaderTimestamp = this._getDateHeaderTimestamp(cachedResponse); + + if (dateHeaderTimestamp === null) { + // Unable to parse date, so assume it's fresh. + return true; + } // If we have a valid headerTime, then our response is fresh iff the + // headerTime plus maxAgeSeconds is greater than the current time. + + + const now = Date.now(); + return dateHeaderTimestamp >= now - this._maxAgeSeconds * 1000; + } + /** + * This method will extract the data header and parse it into a useful + * value. + * + * @param {Response} cachedResponse + * @return {number} + * + * @private + */ + + + _getDateHeaderTimestamp(cachedResponse) { + if (!cachedResponse.headers.has('date')) { + return null; + } + + const dateHeader = cachedResponse.headers.get('date'); + const parsedDate = new Date(dateHeader); + const headerTime = parsedDate.getTime(); // If the Date header was invalid for some reason, parsedDate.getTime() + // will return NaN. + + if (isNaN(headerTime)) { + return null; + } + + return headerTime; + } + /** + * A "lifecycle" callback that will be triggered automatically by the + * `workbox.strategies` handlers when an entry is added to a cache. + * + * @param {Object} options + * @param {string} options.cacheName Name of the cache that was updated. + * @param {string} options.request The Request for the cached entry. + * + * @private + */ + + + async cacheDidUpdate({ + cacheName, + request + }) { + { + assert_mjs.assert.isType(cacheName, 'string', { + moduleName: 'workbox-expiration', + className: 'Plugin', + funcName: 'cacheDidUpdate', + paramName: 'cacheName' + }); + assert_mjs.assert.isInstance(request, Request, { + moduleName: 'workbox-expiration', + className: 'Plugin', + funcName: 'cacheDidUpdate', + paramName: 'request' + }); + } + + const cacheExpiration = this._getCacheExpiration(cacheName); + + await cacheExpiration.updateTimestamp(request.url); + await cacheExpiration.expireEntries(); + } + /** + * This is a helper method that performs two operations: + * + * - Deletes *all* the underlying Cache instances associated with this plugin + * instance, by calling caches.delete() on your behalf. + * - Deletes the metadata from IndexedDB used to keep track of expiration + * details for each Cache instance. + * + * When using cache expiration, calling this method is preferable to calling + * `caches.delete()` directly, since this will ensure that the IndexedDB + * metadata is also cleanly removed and open IndexedDB instances are deleted. + * + * Note that if you're *not* using cache expiration for a given cache, calling + * `caches.delete()` and passing in the cache's name should be sufficient. + * There is no Workbox-specific method needed for cleanup in that case. + */ + + + async deleteCacheAndMetadata() { + // Do this one at a time instead of all at once via `Promise.all()` to + // reduce the chance of inconsistency if a promise rejects. + for (const [cacheName, cacheExpiration] of this._cacheExpirations) { + await caches.delete(cacheName); + await cacheExpiration.delete(); + } // Reset this._cacheExpirations to its initial state. + + + this._cacheExpirations = new Map(); + } + + } + + /* + Copyright 2018 Google LLC + + Use of this source code is governed by an MIT-style + license that can be found in the LICENSE file or at + https://opensource.org/licenses/MIT. + */ + + exports.CacheExpiration = CacheExpiration; + exports.Plugin = Plugin; + + return exports; + +}({}, workbox.core._private, workbox.core._private, workbox.core._private, workbox.core._private, workbox.core._private, workbox.core._private, workbox.core._private, workbox.core)); +//# sourceMappingURL=workbox-expiration.dev.js.map diff --git a/workbox-v4.3.1/workbox-expiration.dev.js.map b/workbox-v4.3.1/workbox-expiration.dev.js.map new file mode 100644 index 0000000000..d0a03072a0 --- /dev/null +++ b/workbox-v4.3.1/workbox-expiration.dev.js.map @@ -0,0 +1 @@ +{"version":3,"file":"workbox-expiration.dev.js","sources":["../_version.mjs","../models/CacheTimestampsModel.mjs","../CacheExpiration.mjs","../Plugin.mjs","../index.mjs"],"sourcesContent":["try{self['workbox:expiration:4.3.1']&&_()}catch(e){}// eslint-disable-line","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport {DBWrapper} from 'workbox-core/_private/DBWrapper.mjs';\nimport {deleteDatabase} from 'workbox-core/_private/deleteDatabase.mjs';\nimport '../_version.mjs';\n\n\nconst DB_NAME = 'workbox-expiration';\nconst OBJECT_STORE_NAME = 'cache-entries';\n\nconst normalizeURL = (unNormalizedUrl) => {\n const url = new URL(unNormalizedUrl, location);\n url.hash = '';\n\n return url.href;\n};\n\n\n/**\n * Returns the timestamp model.\n *\n * @private\n */\nclass CacheTimestampsModel {\n /**\n *\n * @param {string} cacheName\n *\n * @private\n */\n constructor(cacheName) {\n this._cacheName = cacheName;\n\n this._db = new DBWrapper(DB_NAME, 1, {\n onupgradeneeded: (event) => this._handleUpgrade(event),\n });\n }\n\n /**\n * Should perform an upgrade of indexedDB.\n *\n * @param {Event} event\n *\n * @private\n */\n _handleUpgrade(event) {\n const db = event.target.result;\n\n // TODO(philipwalton): EdgeHTML doesn't support arrays as a keyPath, so we\n // have to use the `id` keyPath here and create our own values (a\n // concatenation of `url + cacheName`) instead of simply using\n // `keyPath: ['url', 'cacheName']`, which is supported in other browsers.\n const objStore = db.createObjectStore(OBJECT_STORE_NAME, {keyPath: 'id'});\n\n // TODO(philipwalton): once we don't have to support EdgeHTML, we can\n // create a single index with the keyPath `['cacheName', 'timestamp']`\n // instead of doing both these indexes.\n objStore.createIndex('cacheName', 'cacheName', {unique: false});\n objStore.createIndex('timestamp', 'timestamp', {unique: false});\n\n // Previous versions of `workbox-expiration` used `this._cacheName`\n // as the IDBDatabase name.\n deleteDatabase(this._cacheName);\n }\n\n /**\n * @param {string} url\n * @param {number} timestamp\n *\n * @private\n */\n async setTimestamp(url, timestamp) {\n url = normalizeURL(url);\n\n await this._db.put(OBJECT_STORE_NAME, {\n url,\n timestamp,\n cacheName: this._cacheName,\n // Creating an ID from the URL and cache name won't be necessary once\n // Edge switches to Chromium and all browsers we support work with\n // array keyPaths.\n id: this._getId(url),\n });\n }\n\n /**\n * Returns the timestamp stored for a given URL.\n *\n * @param {string} url\n * @return {number}\n *\n * @private\n */\n async getTimestamp(url) {\n const entry = await this._db.get(OBJECT_STORE_NAME, this._getId(url));\n return entry.timestamp;\n }\n\n /**\n * Iterates through all the entries in the object store (from newest to\n * oldest) and removes entries once either `maxCount` is reached or the\n * entry's timestamp is less than `minTimestamp`.\n *\n * @param {number} minTimestamp\n * @param {number} maxCount\n *\n * @private\n */\n async expireEntries(minTimestamp, maxCount) {\n const entriesToDelete = await this._db.transaction(\n OBJECT_STORE_NAME, 'readwrite', (txn, done) => {\n const store = txn.objectStore(OBJECT_STORE_NAME);\n const entriesToDelete = [];\n let entriesNotDeletedCount = 0;\n\n store.index('timestamp')\n .openCursor(null, 'prev')\n .onsuccess = ({target}) => {\n const cursor = target.result;\n if (cursor) {\n const result = cursor.value;\n // TODO(philipwalton): once we can use a multi-key index, we\n // won't have to check `cacheName` here.\n if (result.cacheName === this._cacheName) {\n // Delete an entry if it's older than the max age or\n // if we already have the max number allowed.\n if ((minTimestamp && result.timestamp < minTimestamp) ||\n (maxCount && entriesNotDeletedCount >= maxCount)) {\n // TODO(philipwalton): we should be able to delete the\n // entry right here, but doing so causes an iteration\n // bug in Safari stable (fixed in TP). Instead we can\n // store the keys of the entries to delete, and then\n // delete the separate transactions.\n // https://github.com/GoogleChrome/workbox/issues/1978\n // cursor.delete();\n\n // We only need to return the URL, not the whole entry.\n entriesToDelete.push(cursor.value);\n } else {\n entriesNotDeletedCount++;\n }\n }\n cursor.continue();\n } else {\n done(entriesToDelete);\n }\n };\n });\n\n // TODO(philipwalton): once the Safari bug in the following issue is fixed,\n // we should be able to remove this loop and do the entry deletion in the\n // cursor loop above:\n // https://github.com/GoogleChrome/workbox/issues/1978\n const urlsDeleted = [];\n for (const entry of entriesToDelete) {\n await this._db.delete(OBJECT_STORE_NAME, entry.id);\n urlsDeleted.push(entry.url);\n }\n\n return urlsDeleted;\n }\n\n /**\n * Takes a URL and returns an ID that will be unique in the object store.\n *\n * @param {string} url\n * @return {string}\n *\n * @private\n */\n _getId(url) {\n // Creating an ID from the URL and cache name won't be necessary once\n // Edge switches to Chromium and all browsers we support work with\n // array keyPaths.\n return this._cacheName + '|' + normalizeURL(url);\n }\n}\n\nexport {CacheTimestampsModel};\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport {CacheTimestampsModel} from './models/CacheTimestampsModel.mjs';\nimport {WorkboxError} from 'workbox-core/_private/WorkboxError.mjs';\nimport {assert} from 'workbox-core/_private/assert.mjs';\nimport {logger} from 'workbox-core/_private/logger.mjs';\n\nimport './_version.mjs';\n\n/**\n * The `CacheExpiration` class allows you define an expiration and / or\n * limit on the number of responses stored in a\n * [`Cache`](https://developer.mozilla.org/en-US/docs/Web/API/Cache).\n *\n * @memberof workbox.expiration\n */\nclass CacheExpiration {\n /**\n * To construct a new CacheExpiration instance you must provide at least\n * one of the `config` properties.\n *\n * @param {string} cacheName Name of the cache to apply restrictions to.\n * @param {Object} config\n * @param {number} [config.maxEntries] The maximum number of entries to cache.\n * Entries used the least will be removed as the maximum is reached.\n * @param {number} [config.maxAgeSeconds] The maximum age of an entry before\n * it's treated as stale and removed.\n */\n constructor(cacheName, config = {}) {\n if (process.env.NODE_ENV !== 'production') {\n assert.isType(cacheName, 'string', {\n moduleName: 'workbox-expiration',\n className: 'CacheExpiration',\n funcName: 'constructor',\n paramName: 'cacheName',\n });\n\n if (!(config.maxEntries || config.maxAgeSeconds)) {\n throw new WorkboxError('max-entries-or-age-required', {\n moduleName: 'workbox-expiration',\n className: 'CacheExpiration',\n funcName: 'constructor',\n });\n }\n\n if (config.maxEntries) {\n assert.isType(config.maxEntries, 'number', {\n moduleName: 'workbox-expiration',\n className: 'CacheExpiration',\n funcName: 'constructor',\n paramName: 'config.maxEntries',\n });\n\n // TODO: Assert is positive\n }\n\n if (config.maxAgeSeconds) {\n assert.isType(config.maxAgeSeconds, 'number', {\n moduleName: 'workbox-expiration',\n className: 'CacheExpiration',\n funcName: 'constructor',\n paramName: 'config.maxAgeSeconds',\n });\n\n // TODO: Assert is positive\n }\n }\n\n this._isRunning = false;\n this._rerunRequested = false;\n this._maxEntries = config.maxEntries;\n this._maxAgeSeconds = config.maxAgeSeconds;\n this._cacheName = cacheName;\n this._timestampModel = new CacheTimestampsModel(cacheName);\n }\n\n /**\n * Expires entries for the given cache and given criteria.\n */\n async expireEntries() {\n if (this._isRunning) {\n this._rerunRequested = true;\n return;\n }\n this._isRunning = true;\n\n const minTimestamp = this._maxAgeSeconds ?\n Date.now() - (this._maxAgeSeconds * 1000) : undefined;\n\n const urlsExpired = await this._timestampModel.expireEntries(\n minTimestamp, this._maxEntries);\n\n // Delete URLs from the cache\n const cache = await caches.open(this._cacheName);\n for (const url of urlsExpired) {\n await cache.delete(url);\n }\n\n if (process.env.NODE_ENV !== 'production') {\n if (urlsExpired.length > 0) {\n logger.groupCollapsed(\n `Expired ${urlsExpired.length} ` +\n `${urlsExpired.length === 1 ? 'entry' : 'entries'} and removed ` +\n `${urlsExpired.length === 1 ? 'it' : 'them'} from the ` +\n `'${this._cacheName}' cache.`);\n logger.log(`Expired the following ${urlsExpired.length === 1 ?\n 'URL' : 'URLs'}:`);\n urlsExpired.forEach((url) => logger.log(` ${url}`));\n logger.groupEnd();\n } else {\n logger.debug(`Cache expiration ran and found no entries to remove.`);\n }\n }\n\n this._isRunning = false;\n if (this._rerunRequested) {\n this._rerunRequested = false;\n this.expireEntries();\n }\n }\n\n /**\n * Update the timestamp for the given URL. This ensures the when\n * removing entries based on maximum entries, most recently used\n * is accurate or when expiring, the timestamp is up-to-date.\n *\n * @param {string} url\n */\n async updateTimestamp(url) {\n if (process.env.NODE_ENV !== 'production') {\n assert.isType(url, 'string', {\n moduleName: 'workbox-expiration',\n className: 'CacheExpiration',\n funcName: 'updateTimestamp',\n paramName: 'url',\n });\n }\n\n await this._timestampModel.setTimestamp(url, Date.now());\n }\n\n /**\n * Can be used to check if a URL has expired or not before it's used.\n *\n * This requires a look up from IndexedDB, so can be slow.\n *\n * Note: This method will not remove the cached entry, call\n * `expireEntries()` to remove indexedDB and Cache entries.\n *\n * @param {string} url\n * @return {boolean}\n */\n async isURLExpired(url) {\n if (process.env.NODE_ENV !== 'production') {\n if (!this._maxAgeSeconds) {\n throw new WorkboxError(`expired-test-without-max-age`, {\n methodName: 'isURLExpired',\n paramName: 'maxAgeSeconds',\n });\n }\n }\n\n const timestamp = await this._timestampModel.getTimestamp(url);\n const expireOlderThan = Date.now() - (this._maxAgeSeconds * 1000);\n return (timestamp < expireOlderThan);\n }\n\n /**\n * Removes the IndexedDB object store used to keep track of cache expiration\n * metadata.\n */\n async delete() {\n // Make sure we don't attempt another rerun if we're called in the middle of\n // a cache expiration.\n this._rerunRequested = false;\n await this._timestampModel.expireEntries(Infinity); // Expires all.\n }\n}\n\nexport {CacheExpiration};\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport {assert} from 'workbox-core/_private/assert.mjs';\nimport {cacheNames} from 'workbox-core/_private/cacheNames.mjs';\nimport {getFriendlyURL} from 'workbox-core/_private/getFriendlyURL.mjs';\nimport {logger} from 'workbox-core/_private/logger.mjs';\nimport {WorkboxError} from 'workbox-core/_private/WorkboxError.mjs';\nimport {registerQuotaErrorCallback}\n from 'workbox-core/registerQuotaErrorCallback.mjs';\n\nimport {CacheExpiration} from './CacheExpiration.mjs';\nimport './_version.mjs';\n\n/**\n * This plugin can be used in the Workbox APIs to regularly enforce a\n * limit on the age and / or the number of cached requests.\n *\n * Whenever a cached request is used or updated, this plugin will look\n * at the used Cache and remove any old or extra requests.\n *\n * When using `maxAgeSeconds`, requests may be used *once* after expiring\n * because the expiration clean up will not have occurred until *after* the\n * cached request has been used. If the request has a \"Date\" header, then\n * a light weight expiration check is performed and the request will not be\n * used immediately.\n *\n * When using `maxEntries`, the entry least-recently requested will be removed from the cache first.\n *\n * @memberof workbox.expiration\n */\nclass Plugin {\n /**\n * @param {Object} config\n * @param {number} [config.maxEntries] The maximum number of entries to cache.\n * Entries used the least will be removed as the maximum is reached.\n * @param {number} [config.maxAgeSeconds] The maximum age of an entry before\n * it's treated as stale and removed.\n * @param {boolean} [config.purgeOnQuotaError] Whether to opt this cache in to\n * automatic deletion if the available storage quota has been exceeded.\n */\n constructor(config = {}) {\n if (process.env.NODE_ENV !== 'production') {\n if (!(config.maxEntries || config.maxAgeSeconds)) {\n throw new WorkboxError('max-entries-or-age-required', {\n moduleName: 'workbox-expiration',\n className: 'Plugin',\n funcName: 'constructor',\n });\n }\n\n if (config.maxEntries) {\n assert.isType(config.maxEntries, 'number', {\n moduleName: 'workbox-expiration',\n className: 'Plugin',\n funcName: 'constructor',\n paramName: 'config.maxEntries',\n });\n }\n\n if (config.maxAgeSeconds) {\n assert.isType(config.maxAgeSeconds, 'number', {\n moduleName: 'workbox-expiration',\n className: 'Plugin',\n funcName: 'constructor',\n paramName: 'config.maxAgeSeconds',\n });\n }\n }\n\n this._config = config;\n this._maxAgeSeconds = config.maxAgeSeconds;\n this._cacheExpirations = new Map();\n\n if (config.purgeOnQuotaError) {\n registerQuotaErrorCallback(() => this.deleteCacheAndMetadata());\n }\n }\n\n /**\n * A simple helper method to return a CacheExpiration instance for a given\n * cache name.\n *\n * @param {string} cacheName\n * @return {CacheExpiration}\n *\n * @private\n */\n _getCacheExpiration(cacheName) {\n if (cacheName === cacheNames.getRuntimeName()) {\n throw new WorkboxError('expire-custom-caches-only');\n }\n\n let cacheExpiration = this._cacheExpirations.get(cacheName);\n if (!cacheExpiration) {\n cacheExpiration = new CacheExpiration(cacheName, this._config);\n this._cacheExpirations.set(cacheName, cacheExpiration);\n }\n return cacheExpiration;\n }\n\n /**\n * A \"lifecycle\" callback that will be triggered automatically by the\n * `workbox.strategies` handlers when a `Response` is about to be returned\n * from a [Cache](https://developer.mozilla.org/en-US/docs/Web/API/Cache) to\n * the handler. It allows the `Response` to be inspected for freshness and\n * prevents it from being used if the `Response`'s `Date` header value is\n * older than the configured `maxAgeSeconds`.\n *\n * @param {Object} options\n * @param {string} options.cacheName Name of the cache the response is in.\n * @param {Response} options.cachedResponse The `Response` object that's been\n * read from a cache and whose freshness should be checked.\n * @return {Response} Either the `cachedResponse`, if it's\n * fresh, or `null` if the `Response` is older than `maxAgeSeconds`.\n *\n * @private\n */\n cachedResponseWillBeUsed({event, request, cacheName, cachedResponse}) {\n if (!cachedResponse) {\n return null;\n }\n\n let isFresh = this._isResponseDateFresh(cachedResponse);\n\n // Expire entries to ensure that even if the expiration date has\n // expired, it'll only be used once.\n const cacheExpiration = this._getCacheExpiration(cacheName);\n cacheExpiration.expireEntries();\n\n // Update the metadata for the request URL to the current timestamp,\n // but don't `await` it as we don't want to block the response.\n const updateTimestampDone = cacheExpiration.updateTimestamp(request.url);\n if (event) {\n try {\n event.waitUntil(updateTimestampDone);\n } catch (error) {\n if (process.env.NODE_ENV !== 'production') {\n logger.warn(`Unable to ensure service worker stays alive when ` +\n `updating cache entry for '${getFriendlyURL(event.request.url)}'.`);\n }\n }\n }\n\n return isFresh ? cachedResponse : null;\n }\n\n /**\n * @param {Response} cachedResponse\n * @return {boolean}\n *\n * @private\n */\n _isResponseDateFresh(cachedResponse) {\n if (!this._maxAgeSeconds) {\n // We aren't expiring by age, so return true, it's fresh\n return true;\n }\n\n // Check if the 'date' header will suffice a quick expiration check.\n // See https://github.com/GoogleChromeLabs/sw-toolbox/issues/164 for\n // discussion.\n const dateHeaderTimestamp = this._getDateHeaderTimestamp(cachedResponse);\n if (dateHeaderTimestamp === null) {\n // Unable to parse date, so assume it's fresh.\n return true;\n }\n\n // If we have a valid headerTime, then our response is fresh iff the\n // headerTime plus maxAgeSeconds is greater than the current time.\n const now = Date.now();\n return dateHeaderTimestamp >= now - (this._maxAgeSeconds * 1000);\n }\n\n /**\n * This method will extract the data header and parse it into a useful\n * value.\n *\n * @param {Response} cachedResponse\n * @return {number}\n *\n * @private\n */\n _getDateHeaderTimestamp(cachedResponse) {\n if (!cachedResponse.headers.has('date')) {\n return null;\n }\n\n const dateHeader = cachedResponse.headers.get('date');\n const parsedDate = new Date(dateHeader);\n const headerTime = parsedDate.getTime();\n\n // If the Date header was invalid for some reason, parsedDate.getTime()\n // will return NaN.\n if (isNaN(headerTime)) {\n return null;\n }\n\n return headerTime;\n }\n\n /**\n * A \"lifecycle\" callback that will be triggered automatically by the\n * `workbox.strategies` handlers when an entry is added to a cache.\n *\n * @param {Object} options\n * @param {string} options.cacheName Name of the cache that was updated.\n * @param {string} options.request The Request for the cached entry.\n *\n * @private\n */\n async cacheDidUpdate({cacheName, request}) {\n if (process.env.NODE_ENV !== 'production') {\n assert.isType(cacheName, 'string', {\n moduleName: 'workbox-expiration',\n className: 'Plugin',\n funcName: 'cacheDidUpdate',\n paramName: 'cacheName',\n });\n assert.isInstance(request, Request, {\n moduleName: 'workbox-expiration',\n className: 'Plugin',\n funcName: 'cacheDidUpdate',\n paramName: 'request',\n });\n }\n\n const cacheExpiration = this._getCacheExpiration(cacheName);\n await cacheExpiration.updateTimestamp(request.url);\n await cacheExpiration.expireEntries();\n }\n\n\n /**\n * This is a helper method that performs two operations:\n *\n * - Deletes *all* the underlying Cache instances associated with this plugin\n * instance, by calling caches.delete() on your behalf.\n * - Deletes the metadata from IndexedDB used to keep track of expiration\n * details for each Cache instance.\n *\n * When using cache expiration, calling this method is preferable to calling\n * `caches.delete()` directly, since this will ensure that the IndexedDB\n * metadata is also cleanly removed and open IndexedDB instances are deleted.\n *\n * Note that if you're *not* using cache expiration for a given cache, calling\n * `caches.delete()` and passing in the cache's name should be sufficient.\n * There is no Workbox-specific method needed for cleanup in that case.\n */\n async deleteCacheAndMetadata() {\n // Do this one at a time instead of all at once via `Promise.all()` to\n // reduce the chance of inconsistency if a promise rejects.\n for (const [cacheName, cacheExpiration] of this._cacheExpirations) {\n await caches.delete(cacheName);\n await cacheExpiration.delete();\n }\n\n // Reset this._cacheExpirations to its initial state.\n this._cacheExpirations = new Map();\n }\n}\n\nexport {Plugin};\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport {CacheExpiration} from './CacheExpiration.mjs';\nimport {Plugin} from './Plugin.mjs';\nimport './_version.mjs';\n\n\n/**\n * @namespace workbox.expiration\n */\n\nexport {\n CacheExpiration,\n Plugin,\n};\n"],"names":["self","_","e","DB_NAME","OBJECT_STORE_NAME","normalizeURL","unNormalizedUrl","url","URL","location","hash","href","CacheTimestampsModel","constructor","cacheName","_cacheName","_db","DBWrapper","onupgradeneeded","event","_handleUpgrade","db","target","result","objStore","createObjectStore","keyPath","createIndex","unique","deleteDatabase","setTimestamp","timestamp","put","id","_getId","getTimestamp","entry","get","expireEntries","minTimestamp","maxCount","entriesToDelete","transaction","txn","done","store","objectStore","entriesNotDeletedCount","index","openCursor","onsuccess","cursor","value","push","continue","urlsDeleted","delete","CacheExpiration","config","assert","isType","moduleName","className","funcName","paramName","maxEntries","maxAgeSeconds","WorkboxError","_isRunning","_rerunRequested","_maxEntries","_maxAgeSeconds","_timestampModel","Date","now","undefined","urlsExpired","cache","caches","open","length","logger","groupCollapsed","log","forEach","groupEnd","debug","updateTimestamp","isURLExpired","methodName","expireOlderThan","Infinity","Plugin","_config","_cacheExpirations","Map","purgeOnQuotaError","registerQuotaErrorCallback","deleteCacheAndMetadata","_getCacheExpiration","cacheNames","getRuntimeName","cacheExpiration","set","cachedResponseWillBeUsed","request","cachedResponse","isFresh","_isResponseDateFresh","updateTimestampDone","waitUntil","error","warn","getFriendlyURL","dateHeaderTimestamp","_getDateHeaderTimestamp","headers","has","dateHeader","parsedDate","headerTime","getTime","isNaN","cacheDidUpdate","isInstance","Request"],"mappings":";;;;EAAA,IAAG;EAACA,EAAAA,IAAI,CAAC,0BAAD,CAAJ,IAAkCC,CAAC,EAAnC;EAAsC,CAA1C,CAA0C,OAAMC,CAAN,EAAQ;;ECAlD;;;;;;;AAQA,EAKA,MAAMC,OAAO,GAAG,oBAAhB;EACA,MAAMC,iBAAiB,GAAG,eAA1B;;EAEA,MAAMC,YAAY,GAAIC,eAAD,IAAqB;EACxC,QAAMC,GAAG,GAAG,IAAIC,GAAJ,CAAQF,eAAR,EAAyBG,QAAzB,CAAZ;EACAF,EAAAA,GAAG,CAACG,IAAJ,GAAW,EAAX;EAEA,SAAOH,GAAG,CAACI,IAAX;EACD,CALD;EAQA;;;;;;;EAKA,MAAMC,oBAAN,CAA2B;EACzB;;;;;;EAMAC,EAAAA,WAAW,CAACC,SAAD,EAAY;EACrB,SAAKC,UAAL,GAAkBD,SAAlB;EAEA,SAAKE,GAAL,GAAW,IAAIC,uBAAJ,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AL,GAAyB,IAAIC,GAAJ,EAAzB;EACD;;EApOU;;ECpCb;;;;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/workbox-v4.3.1/workbox-expiration.prod.js b/workbox-v4.3.1/workbox-expiration.prod.js new file mode 100644 index 0000000000..7c8f84040e --- /dev/null +++ b/workbox-v4.3.1/workbox-expiration.prod.js @@ -0,0 +1,2 @@ +this.workbox=this.workbox||{},this.workbox.expiration=function(t,e,s,i,a,n){"use strict";try{self["workbox:expiration:4.3.1"]&&_()}catch(t){}const h="workbox-expiration",c="cache-entries",r=t=>{const e=new URL(t,location);return e.hash="",e.href};class o{constructor(t){this.t=t,this.s=new e.DBWrapper(h,1,{onupgradeneeded:t=>this.i(t)})}i(t){const e=t.target.result.createObjectStore(c,{keyPath:"id"});e.createIndex("cacheName","cacheName",{unique:!1}),e.createIndex("timestamp","timestamp",{unique:!1}),s.deleteDatabase(this.t)}async setTimestamp(t,e){t=r(t),await this.s.put(c,{url:t,timestamp:e,cacheName:this.t,id:this.h(t)})}async getTimestamp(t){return(await this.s.get(c,this.h(t))).timestamp}async expireEntries(t,e){const s=await this.s.transaction(c,"readwrite",(s,i)=>{const a=s.objectStore(c),n=[];let h=0;a.index("timestamp").openCursor(null,"prev").onsuccess=(({target:s})=>{const a=s.result;if(a){const s=a.value;s.cacheName===this.t&&(t&&s.timestamp=e?n.push(a.value):h++),a.continue()}else i(n)})}),i=[];for(const t of s)await this.s.delete(c,t.id),i.push(t.url);return i}h(t){return this.t+"|"+r(t)}}class u{constructor(t,e={}){this.o=!1,this.u=!1,this.l=e.maxEntries,this.p=e.maxAgeSeconds,this.t=t,this.m=new o(t)}async expireEntries(){if(this.o)return void(this.u=!0);this.o=!0;const t=this.p?Date.now()-1e3*this.p:void 0,e=await this.m.expireEntries(t,this.l),s=await caches.open(this.t);for(const t of e)await s.delete(t);this.o=!1,this.u&&(this.u=!1,this.expireEntries())}async updateTimestamp(t){await this.m.setTimestamp(t,Date.now())}async isURLExpired(t){return await this.m.getTimestamp(t)this.deleteCacheAndMetadata())}k(t){if(t===a.cacheNames.getRuntimeName())throw new i.WorkboxError("expire-custom-caches-only");let e=this.g.get(t);return e||(e=new u(t,this.D),this.g.set(t,e)),e}cachedResponseWillBeUsed({event:t,request:e,cacheName:s,cachedResponse:i}){if(!i)return null;let a=this.N(i);const n=this.k(s);n.expireEntries();const h=n.updateTimestamp(e.url);if(t)try{t.waitUntil(h)}catch(t){}return a?i:null}N(t){if(!this.p)return!0;const e=this._(t);return null===e||e>=Date.now()-1e3*this.p}_(t){if(!t.headers.has("date"))return null;const e=t.headers.get("date"),s=new Date(e).getTime();return isNaN(s)?null:s}async cacheDidUpdate({cacheName:t,request:e}){const s=this.k(t);await s.updateTimestamp(e.url),await s.expireEntries()}async deleteCacheAndMetadata(){for(const[t,e]of this.g)await caches.delete(t),await e.delete();this.g=new Map}},t}({},workbox.core._private,workbox.core._private,workbox.core._private,workbox.core._private,workbox.core); +//# sourceMappingURL=workbox-expiration.prod.js.map diff --git a/workbox-v4.3.1/workbox-expiration.prod.js.map b/workbox-v4.3.1/workbox-expiration.prod.js.map new file mode 100644 index 0000000000..6cb8ede7ba --- /dev/null +++ b/workbox-v4.3.1/workbox-expiration.prod.js.map @@ -0,0 +1 @@ +{"version":3,"file":"workbox-expiration.prod.js","sources":["../_version.mjs","../models/CacheTimestampsModel.mjs","../CacheExpiration.mjs","../Plugin.mjs"],"sourcesContent":["try{self['workbox:expiration:4.3.1']&&_()}catch(e){}// eslint-disable-line","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport {DBWrapper} from 'workbox-core/_private/DBWrapper.mjs';\nimport {deleteDatabase} from 'workbox-core/_private/deleteDatabase.mjs';\nimport '../_version.mjs';\n\n\nconst DB_NAME = 'workbox-expiration';\nconst OBJECT_STORE_NAME = 'cache-entries';\n\nconst normalizeURL = (unNormalizedUrl) => {\n const url = new URL(unNormalizedUrl, location);\n url.hash = '';\n\n return url.href;\n};\n\n\n/**\n * Returns the timestamp model.\n *\n * @private\n */\nclass CacheTimestampsModel {\n /**\n *\n * @param {string} cacheName\n *\n * @private\n */\n constructor(cacheName) {\n this._cacheName = cacheName;\n\n this._db = new DBWrapper(DB_NAME, 1, {\n onupgradeneeded: (event) => this._handleUpgrade(event),\n });\n }\n\n /**\n * Should perform an upgrade of indexedDB.\n *\n * @param {Event} event\n *\n * @private\n */\n _handleUpgrade(event) {\n const db = event.target.result;\n\n // TODO(philipwalton): EdgeHTML doesn't support arrays as a keyPath, so we\n // have to use the `id` keyPath here and create our own values (a\n // concatenation of `url + cacheName`) instead of simply using\n // `keyPath: ['url', 'cacheName']`, which is supported in other browsers.\n const objStore = db.createObjectStore(OBJECT_STORE_NAME, {keyPath: 'id'});\n\n // TODO(philipwalton): once we don't have to support EdgeHTML, we can\n // create a single index with the keyPath `['cacheName', 'timestamp']`\n // instead of doing both these indexes.\n objStore.createIndex('cacheName', 'cacheName', {unique: false});\n objStore.createIndex('timestamp', 'timestamp', {unique: false});\n\n // Previous versions of `workbox-expiration` used `this._cacheName`\n // as the IDBDatabase name.\n deleteDatabase(this._cacheName);\n }\n\n /**\n * @param {string} url\n * @param {number} timestamp\n *\n * @private\n */\n async setTimestamp(url, timestamp) {\n url = normalizeURL(url);\n\n await this._db.put(OBJECT_STORE_NAME, {\n url,\n timestamp,\n cacheName: this._cacheName,\n // Creating an ID from the URL and cache name won't be necessary once\n // Edge switches to Chromium and all browsers we support work with\n // array keyPaths.\n id: this._getId(url),\n });\n }\n\n /**\n * Returns the timestamp stored for a given URL.\n *\n * @param {string} url\n * @return {number}\n *\n * @private\n */\n async getTimestamp(url) {\n const entry = await this._db.get(OBJECT_STORE_NAME, this._getId(url));\n return entry.timestamp;\n }\n\n /**\n * Iterates through all the entries in the object store (from newest to\n * oldest) and removes entries once either `maxCount` is reached or the\n * entry's timestamp is less than `minTimestamp`.\n *\n * @param {number} minTimestamp\n * @param {number} maxCount\n *\n * @private\n */\n async expireEntries(minTimestamp, maxCount) {\n const entriesToDelete = await this._db.transaction(\n OBJECT_STORE_NAME, 'readwrite', (txn, done) => {\n const store = txn.objectStore(OBJECT_STORE_NAME);\n const entriesToDelete = [];\n let entriesNotDeletedCount = 0;\n\n store.index('timestamp')\n .openCursor(null, 'prev')\n .onsuccess = ({target}) => {\n const cursor = target.result;\n if (cursor) {\n const result = cursor.value;\n // TODO(philipwalton): once we can use a multi-key index, we\n // won't have to check `cacheName` here.\n if (result.cacheName === this._cacheName) {\n // Delete an entry if it's older than the max age or\n // if we already have the max number allowed.\n if ((minTimestamp && result.timestamp < minTimestamp) ||\n (maxCount && entriesNotDeletedCount >= maxCount)) {\n // TODO(philipwalton): we should be able to delete the\n // entry right here, but doing so causes an iteration\n // bug in Safari stable (fixed in TP). Instead we can\n // store the keys of the entries to delete, and then\n // delete the separate transactions.\n // https://github.com/GoogleChrome/workbox/issues/1978\n // cursor.delete();\n\n // We only need to return the URL, not the whole entry.\n entriesToDelete.push(cursor.value);\n } else {\n entriesNotDeletedCount++;\n }\n }\n cursor.continue();\n } else {\n done(entriesToDelete);\n }\n };\n });\n\n // TODO(philipwalton): once the Safari bug in the following issue is fixed,\n // we should be able to remove this loop and do the entry deletion in the\n // cursor loop above:\n // https://github.com/GoogleChrome/workbox/issues/1978\n const urlsDeleted = [];\n for (const entry of entriesToDelete) {\n await this._db.delete(OBJECT_STORE_NAME, entry.id);\n urlsDeleted.push(entry.url);\n }\n\n return urlsDeleted;\n }\n\n /**\n * Takes a URL and returns an ID that will be unique in the object store.\n *\n * @param {string} url\n * @return {string}\n *\n * @private\n */\n _getId(url) {\n // Creating an ID from the URL and cache name won't be necessary once\n // Edge switches to Chromium and all browsers we support work with\n // array keyPaths.\n return this._cacheName + '|' + normalizeURL(url);\n }\n}\n\nexport {CacheTimestampsModel};\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport {CacheTimestampsModel} from './models/CacheTimestampsModel.mjs';\nimport {WorkboxError} from 'workbox-core/_private/WorkboxError.mjs';\nimport {assert} from 'workbox-core/_private/assert.mjs';\nimport {logger} from 'workbox-core/_private/logger.mjs';\n\nimport './_version.mjs';\n\n/**\n * The `CacheExpiration` class allows you define an expiration and / or\n * limit on the number of responses stored in a\n * [`Cache`](https://developer.mozilla.org/en-US/docs/Web/API/Cache).\n *\n * @memberof workbox.expiration\n */\nclass CacheExpiration {\n /**\n * To construct a new CacheExpiration instance you must provide at least\n * one of the `config` properties.\n *\n * @param {string} cacheName Name of the cache to apply restrictions to.\n * @param {Object} config\n * @param {number} [config.maxEntries] The maximum number of entries to cache.\n * Entries used the least will be removed as the maximum is reached.\n * @param {number} [config.maxAgeSeconds] The maximum age of an entry before\n * it's treated as stale and removed.\n */\n constructor(cacheName, config = {}) {\n if (process.env.NODE_ENV !== 'production') {\n assert.isType(cacheName, 'string', {\n moduleName: 'workbox-expiration',\n className: 'CacheExpiration',\n funcName: 'constructor',\n paramName: 'cacheName',\n });\n\n if (!(config.maxEntries || config.maxAgeSeconds)) {\n throw new WorkboxError('max-entries-or-age-required', {\n moduleName: 'workbox-expiration',\n className: 'CacheExpiration',\n funcName: 'constructor',\n });\n }\n\n if (config.maxEntries) {\n assert.isType(config.maxEntries, 'number', {\n moduleName: 'workbox-expiration',\n className: 'CacheExpiration',\n funcName: 'constructor',\n paramName: 'config.maxEntries',\n });\n\n // TODO: Assert is positive\n }\n\n if (config.maxAgeSeconds) {\n assert.isType(config.maxAgeSeconds, 'number', {\n moduleName: 'workbox-expiration',\n className: 'CacheExpiration',\n funcName: 'constructor',\n paramName: 'config.maxAgeSeconds',\n });\n\n // TODO: Assert is positive\n }\n }\n\n this._isRunning = false;\n this._rerunRequested = false;\n this._maxEntries = config.maxEntries;\n this._maxAgeSeconds = config.maxAgeSeconds;\n this._cacheName = cacheName;\n this._timestampModel = new CacheTimestampsModel(cacheName);\n }\n\n /**\n * Expires entries for the given cache and given criteria.\n */\n async expireEntries() {\n if (this._isRunning) {\n this._rerunRequested = true;\n return;\n }\n this._isRunning = true;\n\n const minTimestamp = this._maxAgeSeconds ?\n Date.now() - (this._maxAgeSeconds * 1000) : undefined;\n\n const urlsExpired = await this._timestampModel.expireEntries(\n minTimestamp, this._maxEntries);\n\n // Delete URLs from the cache\n const cache = await caches.open(this._cacheName);\n for (const url of urlsExpired) {\n await cache.delete(url);\n }\n\n if (process.env.NODE_ENV !== 'production') {\n if (urlsExpired.length > 0) {\n logger.groupCollapsed(\n `Expired ${urlsExpired.length} ` +\n `${urlsExpired.length === 1 ? 'entry' : 'entries'} and removed ` +\n `${urlsExpired.length === 1 ? 'it' : 'them'} from the ` +\n `'${this._cacheName}' cache.`);\n logger.log(`Expired the following ${urlsExpired.length === 1 ?\n 'URL' : 'URLs'}:`);\n urlsExpired.forEach((url) => logger.log(` ${url}`));\n logger.groupEnd();\n } else {\n logger.debug(`Cache expiration ran and found no entries to remove.`);\n }\n }\n\n this._isRunning = false;\n if (this._rerunRequested) {\n this._rerunRequested = false;\n this.expireEntries();\n }\n }\n\n /**\n * Update the timestamp for the given URL. This ensures the when\n * removing entries based on maximum entries, most recently used\n * is accurate or when expiring, the timestamp is up-to-date.\n *\n * @param {string} url\n */\n async updateTimestamp(url) {\n if (process.env.NODE_ENV !== 'production') {\n assert.isType(url, 'string', {\n moduleName: 'workbox-expiration',\n className: 'CacheExpiration',\n funcName: 'updateTimestamp',\n paramName: 'url',\n });\n }\n\n await this._timestampModel.setTimestamp(url, Date.now());\n }\n\n /**\n * Can be used to check if a URL has expired or not before it's used.\n *\n * This requires a look up from IndexedDB, so can be slow.\n *\n * Note: This method will not remove the cached entry, call\n * `expireEntries()` to remove indexedDB and Cache entries.\n *\n * @param {string} url\n * @return {boolean}\n */\n async isURLExpired(url) {\n if (process.env.NODE_ENV !== 'production') {\n if (!this._maxAgeSeconds) {\n throw new WorkboxError(`expired-test-without-max-age`, {\n methodName: 'isURLExpired',\n paramName: 'maxAgeSeconds',\n });\n }\n }\n\n const timestamp = await this._timestampModel.getTimestamp(url);\n const expireOlderThan = Date.now() - (this._maxAgeSeconds * 1000);\n return (timestamp < expireOlderThan);\n }\n\n /**\n * Removes the IndexedDB object store used to keep track of cache expiration\n * metadata.\n */\n async delete() {\n // Make sure we don't attempt another rerun if we're called in the middle of\n // a cache expiration.\n this._rerunRequested = false;\n await this._timestampModel.expireEntries(Infinity); // Expires all.\n }\n}\n\nexport {CacheExpiration};\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport {assert} from 'workbox-core/_private/assert.mjs';\nimport {cacheNames} from 'workbox-core/_private/cacheNames.mjs';\nimport {getFriendlyURL} from 'workbox-core/_private/getFriendlyURL.mjs';\nimport {logger} from 'workbox-core/_private/logger.mjs';\nimport {WorkboxError} from 'workbox-core/_private/WorkboxError.mjs';\nimport {registerQuotaErrorCallback}\n from 'workbox-core/registerQuotaErrorCallback.mjs';\n\nimport {CacheExpiration} from './CacheExpiration.mjs';\nimport './_version.mjs';\n\n/**\n * This plugin can be used in the Workbox APIs to regularly enforce a\n * limit on the age and / or the number of cached requests.\n *\n * Whenever a cached request is used or updated, this plugin will look\n * at the used Cache and remove any old or extra requests.\n *\n * When using `maxAgeSeconds`, requests may be used *once* after expiring\n * because the expiration clean up will not have occurred until *after* the\n * cached request has been used. If the request has a \"Date\" header, then\n * a light weight expiration check is performed and the request will not be\n * used immediately.\n *\n * When using `maxEntries`, the entry least-recently requested will be removed from the cache first.\n *\n * @memberof workbox.expiration\n */\nclass Plugin {\n /**\n * @param {Object} config\n * @param {number} [config.maxEntries] The maximum number of entries to cache.\n * Entries used the least will be removed as the maximum is reached.\n * @param {number} [config.maxAgeSeconds] The maximum age of an entry before\n * it's treated as stale and removed.\n * @param {boolean} [config.purgeOnQuotaError] Whether to opt this cache in to\n * automatic deletion if the available storage quota has been exceeded.\n */\n constructor(config = {}) {\n if (process.env.NODE_ENV !== 'production') {\n if (!(config.maxEntries || config.maxAgeSeconds)) {\n throw new WorkboxError('max-entries-or-age-required', {\n moduleName: 'workbox-expiration',\n className: 'Plugin',\n funcName: 'constructor',\n });\n }\n\n if (config.maxEntries) {\n assert.isType(config.maxEntries, 'number', {\n moduleName: 'workbox-expiration',\n className: 'Plugin',\n funcName: 'constructor',\n paramName: 'config.maxEntries',\n });\n }\n\n if (config.maxAgeSeconds) {\n assert.isType(config.maxAgeSeconds, 'number', {\n moduleName: 'workbox-expiration',\n className: 'Plugin',\n funcName: 'constructor',\n paramName: 'config.maxAgeSeconds',\n });\n }\n }\n\n this._config = config;\n this._maxAgeSeconds = config.maxAgeSeconds;\n this._cacheExpirations = new Map();\n\n if (config.purgeOnQuotaError) {\n registerQuotaErrorCallback(() => this.deleteCacheAndMetadata());\n }\n }\n\n /**\n * A simple helper method to return a CacheExpiration instance for a given\n * cache name.\n *\n * @param {string} cacheName\n * @return {CacheExpiration}\n *\n * @private\n */\n _getCacheExpiration(cacheName) {\n if (cacheName === cacheNames.getRuntimeName()) {\n throw new WorkboxError('expire-custom-caches-only');\n }\n\n let cacheExpiration = this._cacheExpirations.get(cacheName);\n if (!cacheExpiration) {\n cacheExpiration = new CacheExpiration(cacheName, this._config);\n this._cacheExpirations.set(cacheName, cacheExpiration);\n }\n return cacheExpiration;\n }\n\n /**\n * A \"lifecycle\" callback that will be triggered automatically by the\n * `workbox.strategies` handlers when a `Response` is about to be returned\n * from a [Cache](https://developer.mozilla.org/en-US/docs/Web/API/Cache) to\n * the handler. It allows the `Response` to be inspected for freshness and\n * prevents it from being used if the `Response`'s `Date` header value is\n * older than the configured `maxAgeSeconds`.\n *\n * @param {Object} options\n * @param {string} options.cacheName Name of the cache the response is in.\n * @param {Response} options.cachedResponse The `Response` object that's been\n * read from a cache and whose freshness should be checked.\n * @return {Response} Either the `cachedResponse`, if it's\n * fresh, or `null` if the `Response` is older than `maxAgeSeconds`.\n *\n * @private\n */\n cachedResponseWillBeUsed({event, request, cacheName, cachedResponse}) {\n if (!cachedResponse) {\n return null;\n }\n\n let isFresh = this._isResponseDateFresh(cachedResponse);\n\n // Expire entries to ensure that even if the expiration date has\n // expired, it'll only be used once.\n const cacheExpiration = this._getCacheExpiration(cacheName);\n cacheExpiration.expireEntries();\n\n // Update the metadata for the request URL to the current timestamp,\n // but don't `await` it as we don't want to block the response.\n const updateTimestampDone = cacheExpiration.updateTimestamp(request.url);\n if (event) {\n try {\n event.waitUntil(updateTimestampDone);\n } catch (error) {\n if (process.env.NODE_ENV !== 'production') {\n logger.warn(`Unable to ensure service worker stays alive when ` +\n `updating cache entry for '${getFriendlyURL(event.request.url)}'.`);\n }\n }\n }\n\n return isFresh ? cachedResponse : null;\n }\n\n /**\n * @param {Response} cachedResponse\n * @return {boolean}\n *\n * @private\n */\n _isResponseDateFresh(cachedResponse) {\n if (!this._maxAgeSeconds) {\n // We aren't expiring by age, so return true, it's fresh\n return true;\n }\n\n // Check if the 'date' header will suffice a quick expiration check.\n // See https://github.com/GoogleChromeLabs/sw-toolbox/issues/164 for\n // discussion.\n const dateHeaderTimestamp = this._getDateHeaderTimestamp(cachedResponse);\n if (dateHeaderTimestamp === null) {\n // Unable to parse date, so assume it's fresh.\n return true;\n }\n\n // If we have a valid headerTime, then our response is fresh iff the\n // headerTime plus maxAgeSeconds is greater than the current time.\n const now = Date.now();\n return dateHeaderTimestamp >= now - (this._maxAgeSeconds * 1000);\n }\n\n /**\n * This method will extract the data header and parse it into a useful\n * value.\n *\n * @param {Response} cachedResponse\n * @return {number}\n *\n * @private\n */\n _getDateHeaderTimestamp(cachedResponse) {\n if (!cachedResponse.headers.has('date')) {\n return null;\n }\n\n const dateHeader = cachedResponse.headers.get('date');\n const parsedDate = new Date(dateHeader);\n const headerTime = parsedDate.getTime();\n\n // If the Date header was invalid for some reason, parsedDate.getTime()\n // will return NaN.\n if (isNaN(headerTime)) {\n return null;\n }\n\n return headerTime;\n }\n\n /**\n * A \"lifecycle\" callback that will be triggered automatically by the\n * `workbox.strategies` handlers when an entry is added to a cache.\n *\n * @param {Object} options\n * @param {string} options.cacheName Name of the cache that was updated.\n * @param {string} options.request The Request for the cached entry.\n *\n * @private\n */\n async cacheDidUpdate({cacheName, request}) {\n if (process.env.NODE_ENV !== 'production') {\n assert.isType(cacheName, 'string', {\n moduleName: 'workbox-expiration',\n className: 'Plugin',\n funcName: 'cacheDidUpdate',\n paramName: 'cacheName',\n });\n assert.isInstance(request, Request, {\n moduleName: 'workbox-expiration',\n className: 'Plugin',\n funcName: 'cacheDidUpdate',\n paramName: 'request',\n });\n }\n\n const cacheExpiration = this._getCacheExpiration(cacheName);\n await cacheExpiration.updateTimestamp(request.url);\n await cacheExpiration.expireEntries();\n }\n\n\n /**\n * This is a helper method that performs two operations:\n *\n * - Deletes *all* the underlying Cache instances associated with this plugin\n * instance, by calling caches.delete() on your behalf.\n * - Deletes the metadata from IndexedDB used to keep track of expiration\n * details for each Cache instance.\n *\n * When using cache expiration, calling this method is preferable to calling\n * `caches.delete()` directly, since this will ensure that the IndexedDB\n * metadata is also cleanly removed and open IndexedDB instances are deleted.\n *\n * Note that if you're *not* using cache expiration for a given cache, calling\n * `caches.delete()` and passing in the cache's name should be sufficient.\n * There is no Workbox-specific method needed for cleanup in that case.\n */\n async deleteCacheAndMetadata() {\n // Do this one at a time instead of all at once via `Promise.all()` to\n // reduce the chance of inconsistency if a promise rejects.\n for (const [cacheName, cacheExpiration] of this._cacheExpirations) {\n await caches.delete(cacheName);\n await cacheExpiration.delete();\n }\n\n // Reset this._cacheExpirations to its initial state.\n this._cacheExpirations = new Map();\n }\n}\n\nexport {Plugin};\n"],"names":["self","_","e","DB_NAME","OBJECT_STORE_NAME","normalizeURL","unNormalizedUrl","url","URL","location","hash","href","CacheTimestampsModel","constructor","cacheName","_cacheName","_db","DBWrapper","onupgradeneeded","event","this","_handleUpgrade","objStore","target","result","createObjectStore","keyPath","createIndex","unique","deleteDatabase","timestamp","put","id","_getId","get","minTimestamp","maxCount","entriesToDelete","transaction","txn","done","store","objectStore","entriesNotDeletedCount","index","openCursor","onsuccess","cursor","value","push","continue","urlsDeleted","entry","delete","CacheExpiration","config","_isRunning","_rerunRequested","_maxEntries","maxEntries","_maxAgeSeconds","maxAgeSeconds","_timestampModel","Date","now","undefined","urlsExpired","expireEntries","cache","caches","open","setTimestamp","getTimestamp","Infinity","_config","_cacheExpirations","Map","purgeOnQuotaError","registerQuotaErrorCallback","deleteCacheAndMetadata","_getCacheExpiration","cacheNames","getRuntimeName","WorkboxError","cacheExpiration","set","cachedResponseWillBeUsed","request","cachedResponse","isFresh","_isResponseDateFresh","updateTimestampDone","updateTimestamp","waitUntil","error","dateHeaderTimestamp","_getDateHeaderTimestamp","headers","has","dateHeader","headerTime","getTime","isNaN"],"mappings":"yFAAA,IAAIA,KAAK,6BAA6BC,IAAI,MAAMC,ICahD,MAAMC,EAAU,qBACVC,EAAoB,gBAEpBC,EAAgBC,UACdC,EAAM,IAAIC,IAAIF,EAAiBG,iBACrCF,EAAIG,KAAO,GAEJH,EAAII,MASb,MAAMC,EAOJC,YAAYC,QACLC,EAAaD,OAEbE,EAAM,IAAIC,YAAUd,EAAS,EAAG,CACnCe,gBAAkBC,GAAUC,KAAKC,EAAeF,KAWpDE,EAAeF,SAOPG,EANKH,EAAMI,OAAOC,OAMJC,kBAAkBrB,EAAmB,CAACsB,QAAS,OAKnEJ,EAASK,YAAY,YAAa,YAAa,CAACC,QAAQ,IACxDN,EAASK,YAAY,YAAa,YAAa,CAACC,QAAQ,IAIxDC,iBAAeT,KAAKL,sBASHR,EAAKuB,GACtBvB,EAAMF,EAAaE,SAEba,KAAKJ,EAAIe,IAAI3B,EAAmB,CACpCG,IAAAA,EACAuB,UAAAA,EACAhB,UAAWM,KAAKL,EAIhBiB,GAAIZ,KAAKa,EAAO1B,wBAYDA,gBACGa,KAAKJ,EAAIkB,IAAI9B,EAAmBgB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} \ No newline at end of file diff --git a/workbox-v4.3.1/workbox-navigation-preload.dev.js b/workbox-v4.3.1/workbox-navigation-preload.dev.js new file mode 100644 index 0000000000..90832f364b --- /dev/null +++ b/workbox-v4.3.1/workbox-navigation-preload.dev.js @@ -0,0 +1,110 @@ +this.workbox = this.workbox || {}; +this.workbox.navigationPreload = (function (exports, logger_mjs) { + 'use strict'; + + try { + self['workbox:navigation-preload:4.3.1'] && _(); + } catch (e) {} // eslint-disable-line + + /* + Copyright 2018 Google LLC + + Use of this source code is governed by an MIT-style + license that can be found in the LICENSE file or at + https://opensource.org/licenses/MIT. + */ + /** + * @return {boolean} Whether or not the current browser supports enabling + * navigation preload. + * + * @memberof workbox.navigationPreload + */ + + function isSupported() { + return Boolean(self.registration && self.registration.navigationPreload); + } + + /* + Copyright 2018 Google LLC + + Use of this source code is governed by an MIT-style + license that can be found in the LICENSE file or at + https://opensource.org/licenses/MIT. + */ + /** + * If the browser supports Navigation Preload, then this will disable it. + * + * @memberof workbox.navigationPreload + */ + + function disable() { + if (isSupported()) { + self.addEventListener('activate', event => { + event.waitUntil(self.registration.navigationPreload.disable().then(() => { + { + logger_mjs.logger.log(`Navigation preload is disabled.`); + } + })); + }); + } else { + { + logger_mjs.logger.log(`Navigation preload is not supported in this browser.`); + } + } + } + + /* + Copyright 2018 Google LLC + + Use of this source code is governed by an MIT-style + license that can be found in the LICENSE file or at + https://opensource.org/licenses/MIT. + */ + /** + * If the browser supports Navigation Preload, then this will enable it. + * + * @param {string} [headerValue] Optionally, allows developers to + * [override](https://developers.google.com/web/updates/2017/02/navigation-preload#changing_the_header) + * the value of the `Service-Worker-Navigation-Preload` header which will be + * sent to the server when making the navigation request. + * + * @memberof workbox.navigationPreload + */ + + function enable(headerValue) { + if (isSupported()) { + self.addEventListener('activate', event => { + event.waitUntil(self.registration.navigationPreload.enable().then(() => { + // Defaults to Service-Worker-Navigation-Preload: true if not set. + if (headerValue) { + self.registration.navigationPreload.setHeaderValue(headerValue); + } + + { + logger_mjs.logger.log(`Navigation preload is enabled.`); + } + })); + }); + } else { + { + logger_mjs.logger.log(`Navigation preload is not supported in this browser.`); + } + } + } + + /* + Copyright 2018 Google LLC + + Use of this source code is governed by an MIT-style + license that can be found in the LICENSE file or at + https://opensource.org/licenses/MIT. + */ + + exports.disable = disable; + exports.enable = enable; + exports.isSupported = isSupported; + + return exports; + +}({}, workbox.core._private)); +//# sourceMappingURL=workbox-navigation-preload.dev.js.map diff --git a/workbox-v4.3.1/workbox-navigation-preload.dev.js.map b/workbox-v4.3.1/workbox-navigation-preload.dev.js.map new file mode 100644 index 0000000000..4fdadb22c6 --- /dev/null +++ b/workbox-v4.3.1/workbox-navigation-preload.dev.js.map @@ -0,0 +1 @@ +{"version":3,"file":"workbox-navigation-preload.dev.js","sources":["../_version.mjs","../isSupported.mjs","../disable.mjs","../enable.mjs","../index.mjs"],"sourcesContent":["try{self['workbox:navigation-preload:4.3.1']&&_()}catch(e){}// eslint-disable-line","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport './_version.mjs';\n\n/**\n * @return {boolean} Whether or not the current browser supports enabling\n * navigation preload.\n *\n * @memberof workbox.navigationPreload\n */\nfunction isSupported() {\n return Boolean(self.registration && self.registration.navigationPreload);\n}\n\nexport {isSupported};\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport {logger} from 'workbox-core/_private/logger.mjs';\n\nimport {isSupported} from './isSupported.mjs';\n\nimport './_version.mjs';\n\n/**\n * If the browser supports Navigation Preload, then this will disable it.\n *\n * @memberof workbox.navigationPreload\n */\nfunction disable() {\n if (isSupported()) {\n self.addEventListener('activate', (event) => {\n event.waitUntil(\n self.registration.navigationPreload.disable().then(() => {\n if (process.env.NODE_ENV !== 'production') {\n logger.log(`Navigation preload is disabled.`);\n }\n })\n );\n });\n } else {\n if (process.env.NODE_ENV !== 'production') {\n logger.log(`Navigation preload is not supported in this browser.`);\n }\n }\n}\n\nexport {disable};\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport {logger} from 'workbox-core/_private/logger.mjs';\n\nimport {isSupported} from './isSupported.mjs';\n\nimport './_version.mjs';\n\n/**\n * If the browser supports Navigation Preload, then this will enable it.\n *\n * @param {string} [headerValue] Optionally, allows developers to\n * [override](https://developers.google.com/web/updates/2017/02/navigation-preload#changing_the_header)\n * the value of the `Service-Worker-Navigation-Preload` header which will be\n * sent to the server when making the navigation request.\n *\n * @memberof workbox.navigationPreload\n */\nfunction enable(headerValue) {\n if (isSupported()) {\n self.addEventListener('activate', (event) => {\n event.waitUntil(\n self.registration.navigationPreload.enable().then(() => {\n // Defaults to Service-Worker-Navigation-Preload: true if not set.\n if (headerValue) {\n self.registration.navigationPreload.setHeaderValue(headerValue);\n }\n\n if (process.env.NODE_ENV !== 'production') {\n logger.log(`Navigation preload is enabled.`);\n }\n })\n );\n });\n } else {\n if (process.env.NODE_ENV !== 'production') {\n logger.log(`Navigation preload is not supported in this browser.`);\n }\n }\n}\n\nexport {enable};\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport {disable} from './disable.mjs';\nimport {enable} from './enable.mjs';\nimport {isSupported} from './isSupported.mjs';\nimport './_version.mjs';\n\n\n/**\n * @namespace workbox.navigationPreload\n */\n\nexport {\n disable,\n enable,\n isSupported,\n};\n"],"names":["self","_","e","isSupported","Boolean","registration","navigationPreload","disable","addEventListener","event","waitUntil","then","logger","log","enable","headerValue","setHeaderValue"],"mappings":";;;;EAAA,IAAG;EAACA,EAAAA,IAAI,CAAC,kCAAD,CAAJ,IAA0CC,CAAC,EAA3C;EAA8C,CAAlD,CAAkD,OAAMC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EACF;EACF;;EC7CD;;;;;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/workbox-v4.3.1/workbox-navigation-preload.prod.js b/workbox-v4.3.1/workbox-navigation-preload.prod.js new file mode 100644 index 0000000000..f03d65728e --- /dev/null +++ b/workbox-v4.3.1/workbox-navigation-preload.prod.js @@ -0,0 +1,2 @@ +this.workbox=this.workbox||{},this.workbox.navigationPreload=function(t){"use strict";try{self["workbox:navigation-preload:4.3.1"]&&_()}catch(t){}function e(){return Boolean(self.registration&&self.registration.navigationPreload)}return t.disable=function(){e()&&self.addEventListener("activate",t=>{t.waitUntil(self.registration.navigationPreload.disable().then(()=>{}))})},t.enable=function(t){e()&&self.addEventListener("activate",e=>{e.waitUntil(self.registration.navigationPreload.enable().then(()=>{t&&self.registration.navigationPreload.setHeaderValue(t)}))})},t.isSupported=e,t}({}); +//# sourceMappingURL=workbox-navigation-preload.prod.js.map diff --git a/workbox-v4.3.1/workbox-navigation-preload.prod.js.map b/workbox-v4.3.1/workbox-navigation-preload.prod.js.map new file mode 100644 index 0000000000..4de73935e7 --- /dev/null +++ b/workbox-v4.3.1/workbox-navigation-preload.prod.js.map @@ -0,0 +1 @@ +{"version":3,"file":"workbox-navigation-preload.prod.js","sources":["../_version.mjs","../isSupported.mjs","../disable.mjs","../enable.mjs"],"sourcesContent":["try{self['workbox:navigation-preload:4.3.1']&&_()}catch(e){}// eslint-disable-line","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport './_version.mjs';\n\n/**\n * @return {boolean} Whether or not the current browser supports enabling\n * navigation preload.\n *\n * @memberof workbox.navigationPreload\n */\nfunction isSupported() {\n return Boolean(self.registration && self.registration.navigationPreload);\n}\n\nexport {isSupported};\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport {logger} from 'workbox-core/_private/logger.mjs';\n\nimport {isSupported} from './isSupported.mjs';\n\nimport './_version.mjs';\n\n/**\n * If the browser supports Navigation Preload, then this will disable it.\n *\n * @memberof workbox.navigationPreload\n */\nfunction disable() {\n if (isSupported()) {\n self.addEventListener('activate', (event) => {\n event.waitUntil(\n self.registration.navigationPreload.disable().then(() => {\n if (process.env.NODE_ENV !== 'production') {\n logger.log(`Navigation preload is disabled.`);\n }\n })\n );\n });\n } else {\n if (process.env.NODE_ENV !== 'production') {\n logger.log(`Navigation preload is not supported in this browser.`);\n }\n }\n}\n\nexport {disable};\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport {logger} from 'workbox-core/_private/logger.mjs';\n\nimport {isSupported} from './isSupported.mjs';\n\nimport './_version.mjs';\n\n/**\n * If the browser supports Navigation Preload, then this will enable it.\n *\n * @param {string} [headerValue] Optionally, allows developers to\n * [override](https://developers.google.com/web/updates/2017/02/navigation-preload#changing_the_header)\n * the value of the `Service-Worker-Navigation-Preload` header which will be\n * sent to the server when making the navigation request.\n *\n * @memberof workbox.navigationPreload\n */\nfunction enable(headerValue) {\n if (isSupported()) {\n self.addEventListener('activate', (event) => {\n event.waitUntil(\n self.registration.navigationPreload.enable().then(() => {\n // Defaults to Service-Worker-Navigation-Preload: true if not set.\n if (headerValue) {\n self.registration.navigationPreload.setHeaderValue(headerValue);\n }\n\n if (process.env.NODE_ENV !== 'production') {\n logger.log(`Navigation preload is enabled.`);\n }\n })\n );\n });\n } else {\n if (process.env.NODE_ENV !== 'production') {\n logger.log(`Navigation preload is not supported in this browser.`);\n }\n }\n}\n\nexport {enable};\n"],"names":["self","_","e","isSupported","Boolean","registration","navigationPreload","addEventListener","event","waitUntil","disable","then","headerValue","enable","setHeaderValue"],"mappings":"sFAAA,IAAIA,KAAK,qCAAqCC,IAAI,MAAMC,ICgBxD,SAASC,WACAC,QAAQJ,KAAKK,cAAgBL,KAAKK,aAAaC,oCCExD,WACMH,KACFH,KAAKO,iBAAiB,WAAaC,IACjCA,EAAMC,UACFT,KAAKK,aAAaC,kBAAkBI,UAAUC,KAAK,qBCC7D,SAAgBC,GACVT,KACFH,KAAKO,iBAAiB,WAAaC,IACjCA,EAAMC,UACFT,KAAKK,aAAaC,kBAAkBO,SAASF,KAAK,KAE5CC,GACFZ,KAAKK,aAAaC,kBAAkBQ,eAAeF"} \ No newline at end of file diff --git a/workbox-v4.3.1/workbox-offline-ga.dev.js b/workbox-v4.3.1/workbox-offline-ga.dev.js new file mode 100644 index 0000000000..8d72aa6a04 --- /dev/null +++ b/workbox-v4.3.1/workbox-offline-ga.dev.js @@ -0,0 +1,243 @@ +this.workbox = this.workbox || {}; +this.workbox.googleAnalytics = (function (exports, Plugin_mjs, cacheNames_mjs, getFriendlyURL_mjs, logger_mjs, Route_mjs, Router_mjs, NetworkFirst_mjs, NetworkOnly_mjs) { + 'use strict'; + + try { + self['workbox:google-analytics:4.3.1'] && _(); + } catch (e) {} // eslint-disable-line + + /* + Copyright 2018 Google LLC + + Use of this source code is governed by an MIT-style + license that can be found in the LICENSE file or at + https://opensource.org/licenses/MIT. + */ + const QUEUE_NAME = 'workbox-google-analytics'; + const MAX_RETENTION_TIME = 60 * 48; // Two days in minutes + + const GOOGLE_ANALYTICS_HOST = 'www.google-analytics.com'; + const GTM_HOST = 'www.googletagmanager.com'; + const ANALYTICS_JS_PATH = '/analytics.js'; + const GTAG_JS_PATH = '/gtag/js'; + const GTM_JS_PATH = '/gtm.js'; + // endpoints. Most of the time the default path (/collect) is used, but + // occasionally an experimental endpoint is used when testing new features, + // (e.g. /r/collect or /j/collect) + + const COLLECT_PATHS_REGEX = /^\/(\w+\/)?collect/; + + /* + Copyright 2018 Google LLC + + Use of this source code is governed by an MIT-style + license that can be found in the LICENSE file or at + https://opensource.org/licenses/MIT. + */ + /** + * Creates the requestWillDequeue callback to be used with the background + * sync queue plugin. The callback takes the failed request and adds the + * `qt` param based on the current time, as well as applies any other + * user-defined hit modifications. + * + * @param {Object} config See workbox.googleAnalytics.initialize. + * @return {Function} The requestWillDequeu callback function. + * + * @private + */ + + const createOnSyncCallback = config => { + return async ({ + queue + }) => { + let entry; + + while (entry = await queue.shiftRequest()) { + const { + request, + timestamp + } = entry; + const url = new URL(request.url); + + try { + // Measurement protocol requests can set their payload parameters in + // either the URL query string (for GET requests) or the POST body. + const params = request.method === 'POST' ? new URLSearchParams((await request.clone().text())) : url.searchParams; // Calculate the qt param, accounting for the fact that an existing + // qt param may be present and should be updated rather than replaced. + + const originalHitTime = timestamp - (Number(params.get('qt')) || 0); + const queueTime = Date.now() - originalHitTime; // Set the qt param prior to applying hitFilter or parameterOverrides. + + params.set('qt', queueTime); // Apply `paramterOverrideds`, if set. + + if (config.parameterOverrides) { + for (const param of Object.keys(config.parameterOverrides)) { + const value = config.parameterOverrides[param]; + params.set(param, value); + } + } // Apply `hitFilter`, if set. + + + if (typeof config.hitFilter === 'function') { + config.hitFilter.call(null, params); + } // Retry the fetch. Ignore URL search params from the URL as they're + // now in the post body. + + + await fetch(new Request(url.origin + url.pathname, { + body: params.toString(), + method: 'POST', + mode: 'cors', + credentials: 'omit', + headers: { + 'Content-Type': 'text/plain' + } + })); + + { + logger_mjs.logger.log(`Request for '${getFriendlyURL_mjs.getFriendlyURL(url.href)}'` + `has been replayed`); + } + } catch (err) { + await queue.unshiftRequest(entry); + + { + logger_mjs.logger.log(`Request for '${getFriendlyURL_mjs.getFriendlyURL(url.href)}'` + `failed to replay, putting it back in the queue.`); + } + + throw err; + } + } + + { + logger_mjs.logger.log(`All Google Analytics request successfully replayed; ` + `the queue is now empty!`); + } + }; + }; + /** + * Creates GET and POST routes to catch failed Measurement Protocol hits. + * + * @param {Plugin} queuePlugin + * @return {Array} The created routes. + * + * @private + */ + + + const createCollectRoutes = queuePlugin => { + const match = ({ + url + }) => url.hostname === GOOGLE_ANALYTICS_HOST && COLLECT_PATHS_REGEX.test(url.pathname); + + const handler = new NetworkOnly_mjs.NetworkOnly({ + plugins: [queuePlugin] + }); + return [new Route_mjs.Route(match, handler, 'GET'), new Route_mjs.Route(match, handler, 'POST')]; + }; + /** + * Creates a route with a network first strategy for the analytics.js script. + * + * @param {string} cacheName + * @return {Route} The created route. + * + * @private + */ + + + const createAnalyticsJsRoute = cacheName => { + const match = ({ + url + }) => url.hostname === GOOGLE_ANALYTICS_HOST && url.pathname === ANALYTICS_JS_PATH; + + const handler = new NetworkFirst_mjs.NetworkFirst({ + cacheName + }); + return new Route_mjs.Route(match, handler, 'GET'); + }; + /** + * Creates a route with a network first strategy for the gtag.js script. + * + * @param {string} cacheName + * @return {Route} The created route. + * + * @private + */ + + + const createGtagJsRoute = cacheName => { + const match = ({ + url + }) => url.hostname === GTM_HOST && url.pathname === GTAG_JS_PATH; + + const handler = new NetworkFirst_mjs.NetworkFirst({ + cacheName + }); + return new Route_mjs.Route(match, handler, 'GET'); + }; + /** + * Creates a route with a network first strategy for the gtm.js script. + * + * @param {string} cacheName + * @return {Route} The created route. + * + * @private + */ + + + const createGtmJsRoute = cacheName => { + const match = ({ + url + }) => url.hostname === GTM_HOST && url.pathname === GTM_JS_PATH; + + const handler = new NetworkFirst_mjs.NetworkFirst({ + cacheName + }); + return new Route_mjs.Route(match, handler, 'GET'); + }; + /** + * @param {Object=} [options] + * @param {Object} [options.cacheName] The cache name to store and retrieve + * analytics.js. Defaults to the cache names provided by `workbox-core`. + * @param {Object} [options.parameterOverrides] + * [Measurement Protocol parameters](https://developers.google.com/analytics/devguides/collection/protocol/v1/parameters), + * expressed as key/value pairs, to be added to replayed Google Analytics + * requests. This can be used to, e.g., set a custom dimension indicating + * that the request was replayed. + * @param {Function} [options.hitFilter] A function that allows you to modify + * the hit parameters prior to replaying + * the hit. The function is invoked with the original hit's URLSearchParams + * object as its only argument. + * + * @memberof workbox.googleAnalytics + */ + + + const initialize = (options = {}) => { + const cacheName = cacheNames_mjs.cacheNames.getGoogleAnalyticsName(options.cacheName); + const queuePlugin = new Plugin_mjs.Plugin(QUEUE_NAME, { + maxRetentionTime: MAX_RETENTION_TIME, + onSync: createOnSyncCallback(options) + }); + const routes = [createGtmJsRoute(cacheName), createAnalyticsJsRoute(cacheName), createGtagJsRoute(cacheName), ...createCollectRoutes(queuePlugin)]; + const router = new Router_mjs.Router(); + + for (const route of routes) { + router.registerRoute(route); + } + + router.addFetchListener(); + }; + + /* + Copyright 2018 Google LLC + + Use of this source code is governed by an MIT-style + license that can be found in the LICENSE file or at + https://opensource.org/licenses/MIT. + */ + + exports.initialize = initialize; + + return exports; + +}({}, workbox.backgroundSync, workbox.core._private, workbox.core._private, workbox.core._private, workbox.routing, workbox.routing, workbox.strategies, workbox.strategies)); +//# sourceMappingURL=workbox-offline-ga.dev.js.map diff --git a/workbox-v4.3.1/workbox-offline-ga.dev.js.map b/workbox-v4.3.1/workbox-offline-ga.dev.js.map new file mode 100644 index 0000000000..f74ac92fc7 --- /dev/null +++ b/workbox-v4.3.1/workbox-offline-ga.dev.js.map @@ -0,0 +1 @@ +{"version":3,"file":"workbox-offline-ga.dev.js","sources":["../_version.mjs","../utils/constants.mjs","../initialize.mjs","../index.mjs"],"sourcesContent":["try{self['workbox:google-analytics:4.3.1']&&_()}catch(e){}// eslint-disable-line","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport '../_version.mjs';\n\nexport const QUEUE_NAME = 'workbox-google-analytics';\nexport const MAX_RETENTION_TIME = 60 * 48; // Two days in minutes\nexport const GOOGLE_ANALYTICS_HOST = 'www.google-analytics.com';\nexport const GTM_HOST = 'www.googletagmanager.com';\nexport const ANALYTICS_JS_PATH = '/analytics.js';\nexport const GTAG_JS_PATH = '/gtag/js';\nexport const GTM_JS_PATH = '/gtm.js';\nexport const COLLECT_DEFAULT_PATH = '/collect';\n\n// This RegExp matches all known Measurement Protocol single-hit collect\n// endpoints. Most of the time the default path (/collect) is used, but\n// occasionally an experimental endpoint is used when testing new features,\n// (e.g. /r/collect or /j/collect)\nexport const COLLECT_PATHS_REGEX = /^\\/(\\w+\\/)?collect/;\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport {Plugin} from 'workbox-background-sync/Plugin.mjs';\nimport {cacheNames} from 'workbox-core/_private/cacheNames.mjs';\nimport {getFriendlyURL} from 'workbox-core/_private/getFriendlyURL.mjs';\nimport {logger} from 'workbox-core/_private/logger.mjs';\nimport {Route} from 'workbox-routing/Route.mjs';\nimport {Router} from 'workbox-routing/Router.mjs';\nimport {NetworkFirst} from 'workbox-strategies/NetworkFirst.mjs';\nimport {NetworkOnly} from 'workbox-strategies/NetworkOnly.mjs';\nimport {\n QUEUE_NAME,\n MAX_RETENTION_TIME,\n GOOGLE_ANALYTICS_HOST,\n GTM_HOST,\n ANALYTICS_JS_PATH,\n GTAG_JS_PATH,\n GTM_JS_PATH,\n COLLECT_PATHS_REGEX,\n} from './utils/constants.mjs';\nimport './_version.mjs';\n\n/**\n * Creates the requestWillDequeue callback to be used with the background\n * sync queue plugin. The callback takes the failed request and adds the\n * `qt` param based on the current time, as well as applies any other\n * user-defined hit modifications.\n *\n * @param {Object} config See workbox.googleAnalytics.initialize.\n * @return {Function} The requestWillDequeu callback function.\n *\n * @private\n */\nconst createOnSyncCallback = (config) => {\n return async ({queue}) => {\n let entry;\n while (entry = await queue.shiftRequest()) {\n const {request, timestamp} = entry;\n const url = new URL(request.url);\n\n try {\n // Measurement protocol requests can set their payload parameters in\n // either the URL query string (for GET requests) or the POST body.\n const params = request.method === 'POST' ?\n new URLSearchParams(await request.clone().text()) :\n url.searchParams;\n\n // Calculate the qt param, accounting for the fact that an existing\n // qt param may be present and should be updated rather than replaced.\n const originalHitTime = timestamp - (Number(params.get('qt')) || 0);\n const queueTime = Date.now() - originalHitTime;\n\n // Set the qt param prior to applying hitFilter or parameterOverrides.\n params.set('qt', queueTime);\n\n // Apply `paramterOverrideds`, if set.\n if (config.parameterOverrides) {\n for (const param of Object.keys(config.parameterOverrides)) {\n const value = config.parameterOverrides[param];\n params.set(param, value);\n }\n }\n\n // Apply `hitFilter`, if set.\n if (typeof config.hitFilter === 'function') {\n config.hitFilter.call(null, params);\n }\n\n // Retry the fetch. Ignore URL search params from the URL as they're\n // now in the post body.\n await fetch(new Request(url.origin + url.pathname, {\n body: params.toString(),\n method: 'POST',\n mode: 'cors',\n credentials: 'omit',\n headers: {'Content-Type': 'text/plain'},\n }));\n\n\n if (process.env.NODE_ENV !== 'production') {\n logger.log(`Request for '${getFriendlyURL(url.href)}'` +\n `has been replayed`);\n }\n } catch (err) {\n await queue.unshiftRequest(entry);\n\n if (process.env.NODE_ENV !== 'production') {\n logger.log(`Request for '${getFriendlyURL(url.href)}'` +\n `failed to replay, putting it back in the queue.`);\n }\n throw err;\n }\n }\n if (process.env.NODE_ENV !== 'production') {\n logger.log(`All Google Analytics request successfully replayed; ` +\n `the queue is now empty!`);\n }\n };\n};\n\n/**\n * Creates GET and POST routes to catch failed Measurement Protocol hits.\n *\n * @param {Plugin} queuePlugin\n * @return {Array} The created routes.\n *\n * @private\n */\nconst createCollectRoutes = (queuePlugin) => {\n const match = ({url}) => url.hostname === GOOGLE_ANALYTICS_HOST &&\n COLLECT_PATHS_REGEX.test(url.pathname);\n\n const handler = new NetworkOnly({\n plugins: [queuePlugin],\n });\n\n return [\n new Route(match, handler, 'GET'),\n new Route(match, handler, 'POST'),\n ];\n};\n\n/**\n * Creates a route with a network first strategy for the analytics.js script.\n *\n * @param {string} cacheName\n * @return {Route} The created route.\n *\n * @private\n */\nconst createAnalyticsJsRoute = (cacheName) => {\n const match = ({url}) => url.hostname === GOOGLE_ANALYTICS_HOST &&\n url.pathname === ANALYTICS_JS_PATH;\n const handler = new NetworkFirst({cacheName});\n\n return new Route(match, handler, 'GET');\n};\n\n/**\n * Creates a route with a network first strategy for the gtag.js script.\n *\n * @param {string} cacheName\n * @return {Route} The created route.\n *\n * @private\n */\nconst createGtagJsRoute = (cacheName) => {\n const match = ({url}) => url.hostname === GTM_HOST &&\n url.pathname === GTAG_JS_PATH;\n const handler = new NetworkFirst({cacheName});\n\n return new Route(match, handler, 'GET');\n};\n\n/**\n * Creates a route with a network first strategy for the gtm.js script.\n *\n * @param {string} cacheName\n * @return {Route} The created route.\n *\n * @private\n */\nconst createGtmJsRoute = (cacheName) => {\n const match = ({url}) => url.hostname === GTM_HOST &&\n url.pathname === GTM_JS_PATH;\n const handler = new NetworkFirst({cacheName});\n\n return new Route(match, handler, 'GET');\n};\n\n/**\n * @param {Object=} [options]\n * @param {Object} [options.cacheName] The cache name to store and retrieve\n * analytics.js. Defaults to the cache names provided by `workbox-core`.\n * @param {Object} [options.parameterOverrides]\n * [Measurement Protocol parameters](https://developers.google.com/analytics/devguides/collection/protocol/v1/parameters),\n * expressed as key/value pairs, to be added to replayed Google Analytics\n * requests. This can be used to, e.g., set a custom dimension indicating\n * that the request was replayed.\n * @param {Function} [options.hitFilter] A function that allows you to modify\n * the hit parameters prior to replaying\n * the hit. The function is invoked with the original hit's URLSearchParams\n * object as its only argument.\n *\n * @memberof workbox.googleAnalytics\n */\nconst initialize = (options = {}) => {\n const cacheName = cacheNames.getGoogleAnalyticsName(options.cacheName);\n\n const queuePlugin = new Plugin(QUEUE_NAME, {\n maxRetentionTime: MAX_RETENTION_TIME,\n onSync: createOnSyncCallback(options),\n });\n\n const routes = [\n createGtmJsRoute(cacheName),\n createAnalyticsJsRoute(cacheName),\n createGtagJsRoute(cacheName),\n ...createCollectRoutes(queuePlugin),\n ];\n\n const router = new Router();\n for (const route of routes) {\n router.registerRoute(route);\n }\n\n router.addFetchListener();\n};\n\nexport {\n initialize,\n};\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport {initialize} from './initialize.mjs';\nimport './_version.mjs';\n\n\n/**\n * @namespace workbox.googleAnalytics\n */\n\nexport {\n initialize,\n};\n"],"names":["self","_","e","QUEUE_NAME","MAX_RETENTION_TIME","GOOGLE_ANALYTICS_HOST","GTM_HOST","ANALYTICS_JS_PATH","GTAG_JS_PATH","GTM_JS_PATH","COLLECT_PATHS_REGEX","createOnSyncCallback","config","queue","entry","shiftRequest","request","timestamp","url","URL","params","method","URLSearchParams","clone","text","searchParams","originalHitTime","Number","get","queueTime","Date","now","set","parameterOverrides","param","Object","keys","value","hitFilter","call","fetch","Request","origin","pathname","body","toString","mode","credentials","headers","logger","log","getFriendlyURL","href","err","unshiftRequest","createCollectRoutes","queuePlugin","match","hostname","test","handler","NetworkOnly","plugins","Route","createAnalyticsJsRoute","cacheName","NetworkFirst","createGtagJsRoute","createGtmJsRoute","initialize","options","cacheNames","getGoogleAnalyticsName","Plugin","maxRetentionTime","onSync","routes","router","Router","route","registerRoute","addFetchListener"],"mappings":";;;;EAAA,IAAG;EAACA,EAAAA,IAAI,CAAC,gCAAD,CAAJ,IAAwCC,CAAC,EAAzC;EAA4C,CAAhD,CAAgD,OAAMC,CAAN,EAAQ;;ECAxD;;;;;;;AAQA,EAEO,MAAMC,UAAU,GAAG,0BAAnB;AACP,EAAO,MAAMC,kBAAkB,GAAG,KAAK,EAAhC;;AACP,EAAO,MAAMC,qBAAqB,GAAG,0BAA9B;AACP,EAAO,MAAMC,QAAQ,GAAG,0BAAjB;AACP,EAAO,MAAMC,iBAAiB,GAAG,eAA1B;AACP,EAAO,MAAMC,YAAY,GAAG,UAArB;AACP,EAAO,MAAMC,WAAW,GAAG,SAApB;AACP,EAGA;EACA;EACA;;AACA,EAAO,MAAMC,mBAAmB,GAAG,oBAA5B;;ECvBP;;;;;;;AAQA,EAoBA;;;;;;;;;;;;EAWA,MAAMC,oBAAoB,GAAIC,MAAD,IAAY;EACvC,SAAO,OAAO;EAACC,IAAAA;EAAD,GAAP,KAAmB;EACxB,QAAIC,KAAJ;;EACA,W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ACL,SAA1C,CAAlB;EAEA,QAAMT,WAAW,GAAG,IAAIiB,iBAAJ,CAAWtE,UAAX,EAAuB;EACzCuE,IAAAA,gBAAgB,EAAEtE,kBADuB;EAEzCuE,IAAAA,MAAM,EAAEhE,oBAAoB,CAAC2D,OAAD;EAFa,GAAvB,CAApB;EAKA,QAAMM,MAAM,GAAG,CACbR,gBAAgB,CAACH,SAAD,CADH,EAEbD,sBAAsB,CAACC,SAAD,CAFT,EAGbE,iBAAiB,CAACF,SAAD,CAHJ,EAIb,GAAGV,mBAAmB,CAACC,WAAD,CAJT,CAAf;EAOA,QAAMqB,MAAM,GAAG,IAAIC,iBAAJ,EAAf;;EACA,OAAK,MAAMC,KAAX,IAAoBH,MAApB,EAA4B;EAC1BC,IAAAA,MAAM,CAACG,aAAP,CAAqBD,KAArB;EACD;;EAEDF,EAAAA,MAAM,CAACI,gBAAP;EACD,CArBD;;EChMA;;;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/workbox-v4.3.1/workbox-offline-ga.prod.js b/workbox-v4.3.1/workbox-offline-ga.prod.js new file mode 100644 index 0000000000..ca29dc743c --- /dev/null +++ b/workbox-v4.3.1/workbox-offline-ga.prod.js @@ -0,0 +1,2 @@ +this.workbox=this.workbox||{},this.workbox.googleAnalytics=function(e,t,o,n,a,c,w){"use strict";try{self["workbox:google-analytics:4.3.1"]&&_()}catch(e){}const r=/^\/(\w+\/)?collect/,s=e=>async({queue:t})=>{let o;for(;o=await t.shiftRequest();){const{request:n,timestamp:a}=o,c=new URL(n.url);try{const w="POST"===n.method?new URLSearchParams(await n.clone().text()):c.searchParams,r=a-(Number(w.get("qt"))||0),s=Date.now()-r;if(w.set("qt",s),e.parameterOverrides)for(const t of Object.keys(e.parameterOverrides)){const o=e.parameterOverrides[t];w.set(t,o)}"function"==typeof e.hitFilter&&e.hitFilter.call(null,w),await fetch(new Request(c.origin+c.pathname,{body:w.toString(),method:"POST",mode:"cors",credentials:"omit",headers:{"Content-Type":"text/plain"}}))}catch(e){throw await t.unshiftRequest(o),e}}},i=e=>{const t=({url:e})=>"www.google-analytics.com"===e.hostname&&r.test(e.pathname),o=new w.NetworkOnly({plugins:[e]});return[new n.Route(t,o,"GET"),new n.Route(t,o,"POST")]},l=e=>{const t=new c.NetworkFirst({cacheName:e});return new n.Route(({url:e})=>"www.google-analytics.com"===e.hostname&&"/analytics.js"===e.pathname,t,"GET")},m=e=>{const t=new c.NetworkFirst({cacheName:e});return new n.Route(({url:e})=>"www.googletagmanager.com"===e.hostname&&"/gtag/js"===e.pathname,t,"GET")},u=e=>{const t=new c.NetworkFirst({cacheName:e});return new n.Route(({url:e})=>"www.googletagmanager.com"===e.hostname&&"/gtm.js"===e.pathname,t,"GET")};return e.initialize=((e={})=>{const n=o.cacheNames.getGoogleAnalyticsName(e.cacheName),c=new t.Plugin("workbox-google-analytics",{maxRetentionTime:2880,onSync:s(e)}),w=[u(n),l(n),m(n),...i(c)],r=new a.Router;for(const e of w)r.registerRoute(e);r.addFetchListener()}),e}({},workbox.backgroundSync,workbox.core._private,workbox.routing,workbox.routing,workbox.strategies,workbox.strategies); +//# sourceMappingURL=workbox-offline-ga.prod.js.map diff --git a/workbox-v4.3.1/workbox-offline-ga.prod.js.map b/workbox-v4.3.1/workbox-offline-ga.prod.js.map new file mode 100644 index 0000000000..68d2fb8bd1 --- /dev/null +++ b/workbox-v4.3.1/workbox-offline-ga.prod.js.map @@ -0,0 +1 @@ +{"version":3,"file":"workbox-offline-ga.prod.js","sources":["../_version.mjs","../utils/constants.mjs","../initialize.mjs"],"sourcesContent":["try{self['workbox:google-analytics:4.3.1']&&_()}catch(e){}// eslint-disable-line","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport '../_version.mjs';\n\nexport const QUEUE_NAME = 'workbox-google-analytics';\nexport const MAX_RETENTION_TIME = 60 * 48; // Two days in minutes\nexport const GOOGLE_ANALYTICS_HOST = 'www.google-analytics.com';\nexport const GTM_HOST = 'www.googletagmanager.com';\nexport const ANALYTICS_JS_PATH = '/analytics.js';\nexport const GTAG_JS_PATH = '/gtag/js';\nexport const GTM_JS_PATH = '/gtm.js';\nexport const COLLECT_DEFAULT_PATH = '/collect';\n\n// This RegExp matches all known Measurement Protocol single-hit collect\n// endpoints. Most of the time the default path (/collect) is used, but\n// occasionally an experimental endpoint is used when testing new features,\n// (e.g. /r/collect or /j/collect)\nexport const COLLECT_PATHS_REGEX = /^\\/(\\w+\\/)?collect/;\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport {Plugin} from 'workbox-background-sync/Plugin.mjs';\nimport {cacheNames} from 'workbox-core/_private/cacheNames.mjs';\nimport {getFriendlyURL} from 'workbox-core/_private/getFriendlyURL.mjs';\nimport {logger} from 'workbox-core/_private/logger.mjs';\nimport {Route} from 'workbox-routing/Route.mjs';\nimport {Router} from 'workbox-routing/Router.mjs';\nimport {NetworkFirst} from 'workbox-strategies/NetworkFirst.mjs';\nimport {NetworkOnly} from 'workbox-strategies/NetworkOnly.mjs';\nimport {\n QUEUE_NAME,\n MAX_RETENTION_TIME,\n GOOGLE_ANALYTICS_HOST,\n GTM_HOST,\n ANALYTICS_JS_PATH,\n GTAG_JS_PATH,\n GTM_JS_PATH,\n COLLECT_PATHS_REGEX,\n} from './utils/constants.mjs';\nimport './_version.mjs';\n\n/**\n * Creates the requestWillDequeue callback to be used with the background\n * sync queue plugin. The callback takes the failed request and adds the\n * `qt` param based on the current time, as well as applies any other\n * user-defined hit modifications.\n *\n * @param {Object} config See workbox.googleAnalytics.initialize.\n * @return {Function} The requestWillDequeu callback function.\n *\n * @private\n */\nconst createOnSyncCallback = (config) => {\n return async ({queue}) => {\n let entry;\n while (entry = await queue.shiftRequest()) {\n const {request, timestamp} = entry;\n const url = new URL(request.url);\n\n try {\n // Measurement protocol requests can set their payload parameters in\n // either the URL query string (for GET requests) or the POST body.\n const params = request.method === 'POST' ?\n new URLSearchParams(await request.clone().text()) :\n url.searchParams;\n\n // Calculate the qt param, accounting for the fact that an existing\n // qt param may be present and should be updated rather than replaced.\n const originalHitTime = timestamp - (Number(params.get('qt')) || 0);\n const queueTime = Date.now() - originalHitTime;\n\n // Set the qt param prior to applying hitFilter or parameterOverrides.\n params.set('qt', queueTime);\n\n // Apply `paramterOverrideds`, if set.\n if (config.parameterOverrides) {\n for (const param of Object.keys(config.parameterOverrides)) {\n const value = config.parameterOverrides[param];\n params.set(param, value);\n }\n }\n\n // Apply `hitFilter`, if set.\n if (typeof config.hitFilter === 'function') {\n config.hitFilter.call(null, params);\n }\n\n // Retry the fetch. Ignore URL search params from the URL as they're\n // now in the post body.\n await fetch(new Request(url.origin + url.pathname, {\n body: params.toString(),\n method: 'POST',\n mode: 'cors',\n credentials: 'omit',\n headers: {'Content-Type': 'text/plain'},\n }));\n\n\n if (process.env.NODE_ENV !== 'production') {\n logger.log(`Request for '${getFriendlyURL(url.href)}'` +\n `has been replayed`);\n }\n } catch (err) {\n await queue.unshiftRequest(entry);\n\n if (process.env.NODE_ENV !== 'production') {\n logger.log(`Request for '${getFriendlyURL(url.href)}'` +\n `failed to replay, putting it back in the queue.`);\n }\n throw err;\n }\n }\n if (process.env.NODE_ENV !== 'production') {\n logger.log(`All Google Analytics request successfully replayed; ` +\n `the queue is now empty!`);\n }\n };\n};\n\n/**\n * Creates GET and POST routes to catch failed Measurement Protocol hits.\n *\n * @param {Plugin} queuePlugin\n * @return {Array} The created routes.\n *\n * @private\n */\nconst createCollectRoutes = (queuePlugin) => {\n const match = ({url}) => url.hostname === GOOGLE_ANALYTICS_HOST &&\n COLLECT_PATHS_REGEX.test(url.pathname);\n\n const handler = new NetworkOnly({\n plugins: [queuePlugin],\n });\n\n return [\n new Route(match, handler, 'GET'),\n new Route(match, handler, 'POST'),\n ];\n};\n\n/**\n * Creates a route with a network first strategy for the analytics.js script.\n *\n * @param {string} cacheName\n * @return {Route} The created route.\n *\n * @private\n */\nconst createAnalyticsJsRoute = (cacheName) => {\n const match = ({url}) => url.hostname === GOOGLE_ANALYTICS_HOST &&\n url.pathname === ANALYTICS_JS_PATH;\n const handler = new NetworkFirst({cacheName});\n\n return new Route(match, handler, 'GET');\n};\n\n/**\n * Creates a route with a network first strategy for the gtag.js script.\n *\n * @param {string} cacheName\n * @return {Route} The created route.\n *\n * @private\n */\nconst createGtagJsRoute = (cacheName) => {\n const match = ({url}) => url.hostname === GTM_HOST &&\n url.pathname === GTAG_JS_PATH;\n const handler = new NetworkFirst({cacheName});\n\n return new Route(match, handler, 'GET');\n};\n\n/**\n * Creates a route with a network first strategy for the gtm.js script.\n *\n * @param {string} cacheName\n * @return {Route} The created route.\n *\n * @private\n */\nconst createGtmJsRoute = (cacheName) => {\n const match = ({url}) => url.hostname === GTM_HOST &&\n url.pathname === GTM_JS_PATH;\n const handler = new NetworkFirst({cacheName});\n\n return new Route(match, handler, 'GET');\n};\n\n/**\n * @param {Object=} [options]\n * @param {Object} [options.cacheName] The cache name to store and retrieve\n * analytics.js. Defaults to the cache names provided by `workbox-core`.\n * @param {Object} [options.parameterOverrides]\n * [Measurement Protocol parameters](https://developers.google.com/analytics/devguides/collection/protocol/v1/parameters),\n * expressed as key/value pairs, to be added to replayed Google Analytics\n * requests. This can be used to, e.g., set a custom dimension indicating\n * that the request was replayed.\n * @param {Function} [options.hitFilter] A function that allows you to modify\n * the hit parameters prior to replaying\n * the hit. The function is invoked with the original hit's URLSearchParams\n * object as its only argument.\n *\n * @memberof workbox.googleAnalytics\n */\nconst initialize = (options = {}) => {\n const cacheName = cacheNames.getGoogleAnalyticsName(options.cacheName);\n\n const queuePlugin = new Plugin(QUEUE_NAME, {\n maxRetentionTime: MAX_RETENTION_TIME,\n onSync: createOnSyncCallback(options),\n });\n\n const routes = [\n createGtmJsRoute(cacheName),\n createAnalyticsJsRoute(cacheName),\n createGtagJsRoute(cacheName),\n ...createCollectRoutes(queuePlugin),\n ];\n\n const router = new Router();\n for (const route of routes) {\n router.registerRoute(route);\n }\n\n router.addFetchListener();\n};\n\nexport {\n initialize,\n};\n"],"names":["self","_","e","COLLECT_PATHS_REGEX","createOnSyncCallback","config","async","queue","entry","shiftRequest","request","timestamp","url","URL","params","method","URLSearchParams","clone","text","searchParams","originalHitTime","Number","get","queueTime","Date","now","set","parameterOverrides","param","Object","keys","value","hitFilter","call","fetch","Request","origin","pathname","body","toString","mode","credentials","headers","err","unshiftRequest","createCollectRoutes","queuePlugin","match","hostname","test","handler","NetworkOnly","plugins","Route","createAnalyticsJsRoute","cacheName","NetworkFirst","createGtagJsRoute","createGtmJsRoute","options","cacheNames","getGoogleAnalyticsName","Plugin","maxRetentionTime","onSync","routes","router","Router","route","registerRoute","addFetchListener"],"mappings":"gGAAA,IAAIA,KAAK,mCAAmCC,IAAI,MAAMC,ICU/C,MAaMC,EAAsB,qBCgB7BC,EAAwBC,GACrBC,OAAQC,MAAAA,UACTC,OACGA,QAAcD,EAAME,gBAAgB,OACnCC,QAACA,EAADC,UAAUA,GAAaH,EACvBI,EAAM,IAAIC,IAAIH,EAAQE,eAKpBE,EAA4B,SAAnBJ,EAAQK,OACnB,IAAIC,sBAAsBN,EAAQO,QAAQC,QAC1CN,EAAIO,aAIFC,EAAkBT,GAAaU,OAAOP,EAAOQ,IAAI,QAAU,GAC3DC,EAAYC,KAAKC,MAAQL,KAG/BN,EAAOY,IAAI,KAAMH,GAGblB,EAAOsB,uBACJ,MAAMC,KAASC,OAAOC,KAAKzB,EAAOsB,oBAAqB,OACpDI,EAAQ1B,EAAOsB,mBAAmBC,GACxCd,EAAOY,IAAIE,EAAOG,GAKU,mBAArB1B,EAAO2B,WAChB3B,EAAO2B,UAAUC,KAAK,KAAMnB,SAKxBoB,MAAM,IAAIC,QAAQvB,EAAIwB,OAASxB,EAAIyB,SAAU,CACjDC,KAAMxB,EAAOyB,WACbxB,OAAQ,OACRyB,KAAM,OACNC,YAAa,OACbC,QAAS,gBAAiB,iBAQ5B,MAAOC,eACDpC,EAAMqC,eAAepC,GAMrBmC,KAkBRE,EAAuBC,UACrBC,EAAQ,EAAEnC,IAAAA,KDvGmB,6BCuGVA,EAAIoC,UACzB7C,EAAoB8C,KAAKrC,EAAIyB,UAE3Ba,EAAU,IAAIC,cAAY,CAC9BC,QAAS,CAACN,WAGL,CACL,IAAIO,QAAMN,EAAOG,EAAS,OAC1B,IAAIG,QAAMN,EAAOG,EAAS,UAYxBI,EAA0BC,UAGxBL,EAAU,IAAIM,eAAa,CAACD,UAAAA,WAE3B,IAAIF,QAJG,EAAEzC,IAAAA,KD7HmB,6BC6HVA,EAAIoC,UD3HE,kBC4H3BpC,EAAIyB,SAGgBa,EAAS,QAW7BO,EAAqBF,UAGnBL,EAAU,IAAIM,eAAa,CAACD,UAAAA,WAE3B,IAAIF,QAJG,EAAEzC,IAAAA,KD5IM,6BC4IGA,EAAIoC,UD1IH,aC2ItBpC,EAAIyB,SAGgBa,EAAS,QAW7BQ,EAAoBH,UAGlBL,EAAU,IAAIM,eAAa,CAACD,UAAAA,WAE3B,IAAIF,QAJG,EAAEzC,IAAAA,KD5JM,6BC4JGA,EAAIoC,UDzJJ,YC0JrBpC,EAAIyB,SAGgBa,EAAS,4BAmBhB,EAACS,EAAU,YACtBJ,EAAYK,aAAWC,uBAAuBF,EAAQJ,WAEtDT,EAAc,IAAIgB,SDzLA,2BCyLmB,CACzCC,iBDzL8B,KC0L9BC,OAAQ5D,EAAqBuD,KAGzBM,EAAS,CACbP,EAAiBH,GACjBD,EAAuBC,GACvBE,EAAkBF,MACfV,EAAoBC,IAGnBoB,EAAS,IAAIC,aACd,MAAMC,KAASH,EAClBC,EAAOG,cAAcD,GAGvBF,EAAOI"} \ No newline at end of file diff --git a/workbox-v4.3.1/workbox-precaching.dev.js b/workbox-v4.3.1/workbox-precaching.dev.js new file mode 100644 index 0000000000..fb69211ecf --- /dev/null +++ b/workbox-v4.3.1/workbox-precaching.dev.js @@ -0,0 +1,989 @@ +this.workbox = this.workbox || {}; +this.workbox.precaching = (function (exports, assert_mjs, cacheNames_mjs, getFriendlyURL_mjs, logger_mjs, cacheWrapper_mjs, fetchWrapper_mjs, WorkboxError_mjs) { + 'use strict'; + + try { + self['workbox:precaching:4.3.1'] && _(); + } catch (e) {} // eslint-disable-line + + /* + Copyright 2019 Google LLC + + Use of this source code is governed by an MIT-style + license that can be found in the LICENSE file or at + https://opensource.org/licenses/MIT. + */ + const plugins = []; + const precachePlugins = { + /* + * @return {Array} + * @private + */ + get() { + return plugins; + }, + + /* + * @param {Array} newPlugins + * @private + */ + add(newPlugins) { + plugins.push(...newPlugins); + } + + }; + + /* + Copyright 2019 Google LLC + + Use of this source code is governed by an MIT-style + license that can be found in the LICENSE file or at + https://opensource.org/licenses/MIT. + */ + /** + * Adds plugins to precaching. + * + * @param {Array} newPlugins + * + * @alias workbox.precaching.addPlugins + */ + + const addPlugins = newPlugins => { + precachePlugins.add(newPlugins); + }; + + /* + Copyright 2018 Google LLC + + Use of this source code is governed by an MIT-style + license that can be found in the LICENSE file or at + https://opensource.org/licenses/MIT. + */ + /** + * @param {Response} response + * @return {Response} + * + * @private + * @memberof module:workbox-precaching + */ + + async function cleanRedirect(response) { + const clonedResponse = response.clone(); // Not all browsers support the Response.body stream, so fall back + // to reading the entire body into memory as a blob. + + const bodyPromise = 'body' in clonedResponse ? Promise.resolve(clonedResponse.body) : clonedResponse.blob(); + const body = await bodyPromise; // new Response() is happy when passed either a stream or a Blob. + + return new Response(body, { + headers: clonedResponse.headers, + status: clonedResponse.status, + statusText: clonedResponse.statusText + }); + } + + /* + Copyright 2018 Google LLC + + Use of this source code is governed by an MIT-style + license that can be found in the LICENSE file or at + https://opensource.org/licenses/MIT. + */ + + const REVISION_SEARCH_PARAM = '__WB_REVISION__'; + /** + * Converts a manifest entry into a versioned URL suitable for precaching. + * + * @param {Object} entry + * @return {string} A URL with versioning info. + * + * @private + * @memberof module:workbox-precaching + */ + + function createCacheKey(entry) { + if (!entry) { + throw new WorkboxError_mjs.WorkboxError('add-to-cache-list-unexpected-type', { + entry + }); + } // If a precache manifest entry is a string, it's assumed to be a versioned + // URL, like '/app.abcd1234.js'. Return as-is. + + + if (typeof entry === 'string') { + const urlObject = new URL(entry, location); + return { + cacheKey: urlObject.href, + url: urlObject.href + }; + } + + const { + revision, + url + } = entry; + + if (!url) { + throw new WorkboxError_mjs.WorkboxError('add-to-cache-list-unexpected-type', { + entry + }); + } // If there's just a URL and no revision, then it's also assumed to be a + // versioned URL. + + + if (!revision) { + const urlObject = new URL(url, location); + return { + cacheKey: urlObject.href, + url: urlObject.href + }; + } // Otherwise, construct a properly versioned URL using the custom Workbox + // search parameter along with the revision info. + + + const originalURL = new URL(url, location); + const cacheKeyURL = new URL(url, location); + cacheKeyURL.searchParams.set(REVISION_SEARCH_PARAM, revision); + return { + cacheKey: cacheKeyURL.href, + url: originalURL.href + }; + } + + /* + Copyright 2018 Google LLC + + Use of this source code is governed by an MIT-style + license that can be found in the LICENSE file or at + https://opensource.org/licenses/MIT. + */ + + const logGroup = (groupTitle, deletedURLs) => { + logger_mjs.logger.groupCollapsed(groupTitle); + + for (const url of deletedURLs) { + logger_mjs.logger.log(url); + } + + logger_mjs.logger.groupEnd(); + }; + /** + * @param {Array} deletedURLs + * + * @private + * @memberof module:workbox-precaching + */ + + + function printCleanupDetails(deletedURLs) { + const deletionCount = deletedURLs.length; + + if (deletionCount > 0) { + logger_mjs.logger.groupCollapsed(`During precaching cleanup, ` + `${deletionCount} cached ` + `request${deletionCount === 1 ? ' was' : 's were'} deleted.`); + logGroup('Deleted Cache Requests', deletedURLs); + logger_mjs.logger.groupEnd(); + } + } + + /* + Copyright 2018 Google LLC + + Use of this source code is governed by an MIT-style + license that can be found in the LICENSE file or at + https://opensource.org/licenses/MIT. + */ + /** + * @param {string} groupTitle + * @param {Array} urls + * + * @private + */ + + function _nestedGroup(groupTitle, urls) { + if (urls.length === 0) { + return; + } + + logger_mjs.logger.groupCollapsed(groupTitle); + + for (const url of urls) { + logger_mjs.logger.log(url); + } + + logger_mjs.logger.groupEnd(); + } + /** + * @param {Array} urlsToPrecache + * @param {Array} urlsAlreadyPrecached + * + * @private + * @memberof module:workbox-precaching + */ + + + function printInstallDetails(urlsToPrecache, urlsAlreadyPrecached) { + const precachedCount = urlsToPrecache.length; + const alreadyPrecachedCount = urlsAlreadyPrecached.length; + + if (precachedCount || alreadyPrecachedCount) { + let message = `Precaching ${precachedCount} file${precachedCount === 1 ? '' : 's'}.`; + + if (alreadyPrecachedCount > 0) { + message += ` ${alreadyPrecachedCount} ` + `file${alreadyPrecachedCount === 1 ? ' is' : 's are'} already cached.`; + } + + logger_mjs.logger.groupCollapsed(message); + + _nestedGroup(`View newly precached URLs.`, urlsToPrecache); + + _nestedGroup(`View previously precached URLs.`, urlsAlreadyPrecached); + + logger_mjs.logger.groupEnd(); + } + } + + /* + Copyright 2018 Google LLC + + Use of this source code is governed by an MIT-style + license that can be found in the LICENSE file or at + https://opensource.org/licenses/MIT. + */ + /** + * Performs efficient precaching of assets. + * + * @memberof module:workbox-precaching + */ + + class PrecacheController { + /** + * Create a new PrecacheController. + * + * @param {string} [cacheName] An optional name for the cache, to override + * the default precache name. + */ + constructor(cacheName) { + this._cacheName = cacheNames_mjs.cacheNames.getPrecacheName(cacheName); + this._urlsToCacheKeys = new Map(); + } + /** + * This method will add items to the precache list, removing duplicates + * and ensuring the information is valid. + * + * @param { + * Array + * } entries Array of entries to precache. + */ + + + addToCacheList(entries) { + { + assert_mjs.assert.isArray(entries, { + moduleName: 'workbox-precaching', + className: 'PrecacheController', + funcName: 'addToCacheList', + paramName: 'entries' + }); + } + + for (const entry of entries) { + const { + cacheKey, + url + } = createCacheKey(entry); + + if (this._urlsToCacheKeys.has(url) && this._urlsToCacheKeys.get(url) !== cacheKey) { + throw new WorkboxError_mjs.WorkboxError('add-to-cache-list-conflicting-entries', { + firstEntry: this._urlsToCacheKeys.get(url), + secondEntry: cacheKey + }); + } + + this._urlsToCacheKeys.set(url, cacheKey); + } + } + /** + * Precaches new and updated assets. Call this method from the service worker + * install event. + * + * @param {Object} options + * @param {Event} [options.event] The install event (if needed). + * @param {Array} [options.plugins] Plugins to be used for fetching + * and caching during install. + * @return {Promise} + */ + + + async install({ + event, + plugins + } = {}) { + { + if (plugins) { + assert_mjs.assert.isArray(plugins, { + moduleName: 'workbox-precaching', + className: 'PrecacheController', + funcName: 'install', + paramName: 'plugins' + }); + } + } + + const urlsToPrecache = []; + const urlsAlreadyPrecached = []; + const cache = await caches.open(this._cacheName); + const alreadyCachedRequests = await cache.keys(); + const alreadyCachedURLs = new Set(alreadyCachedRequests.map(request => request.url)); + + for (const cacheKey of this._urlsToCacheKeys.values()) { + if (alreadyCachedURLs.has(cacheKey)) { + urlsAlreadyPrecached.push(cacheKey); + } else { + urlsToPrecache.push(cacheKey); + } + } + + const precacheRequests = urlsToPrecache.map(url => { + return this._addURLToCache({ + event, + plugins, + url + }); + }); + await Promise.all(precacheRequests); + + { + printInstallDetails(urlsToPrecache, urlsAlreadyPrecached); + } + + return { + updatedURLs: urlsToPrecache, + notUpdatedURLs: urlsAlreadyPrecached + }; + } + /** + * Deletes assets that are no longer present in the current precache manifest. + * Call this method from the service worker activate event. + * + * @return {Promise} + */ + + + async activate() { + const cache = await caches.open(this._cacheName); + const currentlyCachedRequests = await cache.keys(); + const expectedCacheKeys = new Set(this._urlsToCacheKeys.values()); + const deletedURLs = []; + + for (const request of currentlyCachedRequests) { + if (!expectedCacheKeys.has(request.url)) { + await cache.delete(request); + deletedURLs.push(request.url); + } + } + + { + printCleanupDetails(deletedURLs); + } + + return { + deletedURLs + }; + } + /** + * Requests the entry and saves it to the cache if the response is valid. + * By default, any response with a status code of less than 400 (including + * opaque responses) is considered valid. + * + * If you need to use custom criteria to determine what's valid and what + * isn't, then pass in an item in `options.plugins` that implements the + * `cacheWillUpdate()` lifecycle event. + * + * @private + * @param {Object} options + * @param {string} options.url The URL to fetch and cache. + * @param {Event} [options.event] The install event (if passed). + * @param {Array} [options.plugins] An array of plugins to apply to + * fetch and caching. + */ + + + async _addURLToCache({ + url, + event, + plugins + }) { + const request = new Request(url, { + credentials: 'same-origin' + }); + let response = await fetchWrapper_mjs.fetchWrapper.fetch({ + event, + plugins, + request + }); // Allow developers to override the default logic about what is and isn't + // valid by passing in a plugin implementing cacheWillUpdate(), e.g. + // a workbox.cacheableResponse.Plugin instance. + + let cacheWillUpdateCallback; + + for (const plugin of plugins || []) { + if ('cacheWillUpdate' in plugin) { + cacheWillUpdateCallback = plugin.cacheWillUpdate.bind(plugin); + } + } + + const isValidResponse = cacheWillUpdateCallback ? // Use a callback if provided. It returns a truthy value if valid. + cacheWillUpdateCallback({ + event, + request, + response + }) : // Otherwise, default to considering any response status under 400 valid. + // This includes, by default, considering opaque responses valid. + response.status < 400; // Consider this a failure, leading to the `install` handler failing, if + // we get back an invalid response. + + if (!isValidResponse) { + throw new WorkboxError_mjs.WorkboxError('bad-precaching-response', { + url, + status: response.status + }); + } + + if (response.redirected) { + response = await cleanRedirect(response); + } + + await cacheWrapper_mjs.cacheWrapper.put({ + event, + plugins, + request, + response, + cacheName: this._cacheName, + matchOptions: { + ignoreSearch: true + } + }); + } + /** + * Returns a mapping of a precached URL to the corresponding cache key, taking + * into account the revision information for the URL. + * + * @return {Map} A URL to cache key mapping. + */ + + + getURLsToCacheKeys() { + return this._urlsToCacheKeys; + } + /** + * Returns a list of all the URLs that have been precached by the current + * service worker. + * + * @return {Array} The precached URLs. + */ + + + getCachedURLs() { + return [...this._urlsToCacheKeys.keys()]; + } + /** + * Returns the cache key used for storing a given URL. If that URL is + * unversioned, like `/index.html', then the cache key will be the original + * URL with a search parameter appended to it. + * + * @param {string} url A URL whose cache key you want to look up. + * @return {string} The versioned URL that corresponds to a cache key + * for the original URL, or undefined if that URL isn't precached. + */ + + + getCacheKeyForURL(url) { + const urlObject = new URL(url, location); + return this._urlsToCacheKeys.get(urlObject.href); + } + + } + + /* + Copyright 2019 Google LLC + + Use of this source code is governed by an MIT-style + license that can be found in the LICENSE file or at + https://opensource.org/licenses/MIT. + */ + let precacheController; + /** + * @return {PrecacheController} + * @private + */ + + const getOrCreatePrecacheController = () => { + if (!precacheController) { + precacheController = new PrecacheController(); + } + + return precacheController; + }; + + /* + Copyright 2018 Google LLC + + Use of this source code is governed by an MIT-style + license that can be found in the LICENSE file or at + https://opensource.org/licenses/MIT. + */ + /** + * Removes any URL search parameters that should be ignored. + * + * @param {URL} urlObject The original URL. + * @param {Array} ignoreURLParametersMatching RegExps to test against + * each search parameter name. Matches mean that the search parameter should be + * ignored. + * @return {URL} The URL with any ignored search parameters removed. + * + * @private + * @memberof module:workbox-precaching + */ + + function removeIgnoredSearchParams(urlObject, ignoreURLParametersMatching) { + // Convert the iterable into an array at the start of the loop to make sure + // deletion doesn't mess up iteration. + for (const paramName of [...urlObject.searchParams.keys()]) { + if (ignoreURLParametersMatching.some(regExp => regExp.test(paramName))) { + urlObject.searchParams.delete(paramName); + } + } + + return urlObject; + } + + /* + Copyright 2019 Google LLC + + Use of this source code is governed by an MIT-style + license that can be found in the LICENSE file or at + https://opensource.org/licenses/MIT. + */ + /** + * Generator function that yields possible variations on the original URL to + * check, one at a time. + * + * @param {string} url + * @param {Object} options + * + * @private + * @memberof module:workbox-precaching + */ + + function* generateURLVariations(url, { + ignoreURLParametersMatching, + directoryIndex, + cleanURLs, + urlManipulation + } = {}) { + const urlObject = new URL(url, location); + urlObject.hash = ''; + yield urlObject.href; + const urlWithoutIgnoredParams = removeIgnoredSearchParams(urlObject, ignoreURLParametersMatching); + yield urlWithoutIgnoredParams.href; + + if (directoryIndex && urlWithoutIgnoredParams.pathname.endsWith('/')) { + const directoryURL = new URL(urlWithoutIgnoredParams); + directoryURL.pathname += directoryIndex; + yield directoryURL.href; + } + + if (cleanURLs) { + const cleanURL = new URL(urlWithoutIgnoredParams); + cleanURL.pathname += '.html'; + yield cleanURL.href; + } + + if (urlManipulation) { + const additionalURLs = urlManipulation({ + url: urlObject + }); + + for (const urlToAttempt of additionalURLs) { + yield urlToAttempt.href; + } + } + } + + /* + Copyright 2019 Google LLC + + Use of this source code is governed by an MIT-style + license that can be found in the LICENSE file or at + https://opensource.org/licenses/MIT. + */ + /** + * This function will take the request URL and manipulate it based on the + * configuration options. + * + * @param {string} url + * @param {Object} options + * @return {string} Returns the URL in the cache that matches the request, + * if possible. + * + * @private + */ + + const getCacheKeyForURL = (url, options) => { + const precacheController = getOrCreatePrecacheController(); + const urlsToCacheKeys = precacheController.getURLsToCacheKeys(); + + for (const possibleURL of generateURLVariations(url, options)) { + const possibleCacheKey = urlsToCacheKeys.get(possibleURL); + + if (possibleCacheKey) { + return possibleCacheKey; + } + } + }; + + /* + Copyright 2019 Google LLC + + Use of this source code is governed by an MIT-style + license that can be found in the LICENSE file or at + https://opensource.org/licenses/MIT. + */ + /** + * Adds a `fetch` listener to the service worker that will + * respond to + * [network requests]{@link https://developer.mozilla.org/en-US/docs/Web/API/Service_Worker_API/Using_Service_Workers#Custom_responses_to_requests} + * with precached assets. + * + * Requests for assets that aren't precached, the `FetchEvent` will not be + * responded to, allowing the event to fall through to other `fetch` event + * listeners. + * + * NOTE: when called more than once this method will replace the previously set + * configuration options. Calling it more than once is not recommended outside + * of tests. + * + * @private + * @param {Object} options + * @param {string} [options.directoryIndex=index.html] The `directoryIndex` will + * check cache entries for a URLs ending with '/' to see if there is a hit when + * appending the `directoryIndex` value. + * @param {Array} [options.ignoreURLParametersMatching=[/^utm_/]] An + * array of regex's to remove search params when looking for a cache match. + * @param {boolean} [options.cleanURLs=true] The `cleanURLs` option will + * check the cache for the URL with a `.html` added to the end of the end. + * @param {workbox.precaching~urlManipulation} [options.urlManipulation] + * This is a function that should take a URL and return an array of + * alternative URL's that should be checked for precache matches. + */ + + const addFetchListener = ({ + ignoreURLParametersMatching = [/^utm_/], + directoryIndex = 'index.html', + cleanURLs = true, + urlManipulation = null + } = {}) => { + const cacheName = cacheNames_mjs.cacheNames.getPrecacheName(); + addEventListener('fetch', event => { + const precachedURL = getCacheKeyForURL(event.request.url, { + cleanURLs, + directoryIndex, + ignoreURLParametersMatching, + urlManipulation + }); + + if (!precachedURL) { + { + logger_mjs.logger.debug(`Precaching did not find a match for ` + getFriendlyURL_mjs.getFriendlyURL(event.request.url)); + } + + return; + } + + let responsePromise = caches.open(cacheName).then(cache => { + return cache.match(precachedURL); + }).then(cachedResponse => { + if (cachedResponse) { + return cachedResponse; + } // Fall back to the network if we don't have a cached response + // (perhaps due to manual cache cleanup). + + + { + logger_mjs.logger.warn(`The precached response for ` + `${getFriendlyURL_mjs.getFriendlyURL(precachedURL)} in ${cacheName} was not found. ` + `Falling back to the network instead.`); + } + + return fetch(precachedURL); + }); + + { + responsePromise = responsePromise.then(response => { + // Workbox is going to handle the route. + // print the routing details to the console. + logger_mjs.logger.groupCollapsed(`Precaching is responding to: ` + getFriendlyURL_mjs.getFriendlyURL(event.request.url)); + logger_mjs.logger.log(`Serving the precached url: ${precachedURL}`); + logger_mjs.logger.groupCollapsed(`View request details here.`); + logger_mjs.logger.log(event.request); + logger_mjs.logger.groupEnd(); + logger_mjs.logger.groupCollapsed(`View response details here.`); + logger_mjs.logger.log(response); + logger_mjs.logger.groupEnd(); + logger_mjs.logger.groupEnd(); + return response; + }); + } + + event.respondWith(responsePromise); + }); + }; + + /* + Copyright 2019 Google LLC + Use of this source code is governed by an MIT-style + license that can be found in the LICENSE file or at + https://opensource.org/licenses/MIT. + */ + let listenerAdded = false; + /** + * Add a `fetch` listener to the service worker that will + * respond to + * [network requests]{@link https://developer.mozilla.org/en-US/docs/Web/API/Service_Worker_API/Using_Service_Workers#Custom_responses_to_requests} + * with precached assets. + * + * Requests for assets that aren't precached, the `FetchEvent` will not be + * responded to, allowing the event to fall through to other `fetch` event + * listeners. + * + * @param {Object} options + * @param {string} [options.directoryIndex=index.html] The `directoryIndex` will + * check cache entries for a URLs ending with '/' to see if there is a hit when + * appending the `directoryIndex` value. + * @param {Array} [options.ignoreURLParametersMatching=[/^utm_/]] An + * array of regex's to remove search params when looking for a cache match. + * @param {boolean} [options.cleanURLs=true] The `cleanURLs` option will + * check the cache for the URL with a `.html` added to the end of the end. + * @param {workbox.precaching~urlManipulation} [options.urlManipulation] + * This is a function that should take a URL and return an array of + * alternative URL's that should be checked for precache matches. + * + * @alias workbox.precaching.addRoute + */ + + const addRoute = options => { + if (!listenerAdded) { + addFetchListener(options); + listenerAdded = true; + } + }; + + /* + Copyright 2018 Google LLC + + Use of this source code is governed by an MIT-style + license that can be found in the LICENSE file or at + https://opensource.org/licenses/MIT. + */ + const SUBSTRING_TO_FIND = '-precache-'; + /** + * Cleans up incompatible precaches that were created by older versions of + * Workbox, by a service worker registered under the current scope. + * + * This is meant to be called as part of the `activate` event. + * + * This should be safe to use as long as you don't include `substringToFind` + * (defaulting to `-precache-`) in your non-precache cache names. + * + * @param {string} currentPrecacheName The cache name currently in use for + * precaching. This cache won't be deleted. + * @param {string} [substringToFind='-precache-'] Cache names which include this + * substring will be deleted (excluding `currentPrecacheName`). + * @return {Array} A list of all the cache names that were deleted. + * + * @private + * @memberof module:workbox-precaching + */ + + const deleteOutdatedCaches = async (currentPrecacheName, substringToFind = SUBSTRING_TO_FIND) => { + const cacheNames = await caches.keys(); + const cacheNamesToDelete = cacheNames.filter(cacheName => { + return cacheName.includes(substringToFind) && cacheName.includes(self.registration.scope) && cacheName !== currentPrecacheName; + }); + await Promise.all(cacheNamesToDelete.map(cacheName => caches.delete(cacheName))); + return cacheNamesToDelete; + }; + + /* + Copyright 2019 Google LLC + + Use of this source code is governed by an MIT-style + license that can be found in the LICENSE file or at + https://opensource.org/licenses/MIT. + */ + /** + * Adds an `activate` event listener which will clean up incompatible + * precaches that were created by older versions of Workbox. + * + * @alias workbox.precaching.cleanupOutdatedCaches + */ + + const cleanupOutdatedCaches = () => { + addEventListener('activate', event => { + const cacheName = cacheNames_mjs.cacheNames.getPrecacheName(); + event.waitUntil(deleteOutdatedCaches(cacheName).then(cachesDeleted => { + { + if (cachesDeleted.length > 0) { + logger_mjs.logger.log(`The following out-of-date precaches were cleaned up ` + `automatically:`, cachesDeleted); + } + } + })); + }); + }; + + /* + Copyright 2019 Google LLC + + Use of this source code is governed by an MIT-style + license that can be found in the LICENSE file or at + https://opensource.org/licenses/MIT. + */ + /** + * Takes in a URL, and returns the corresponding URL that could be used to + * lookup the entry in the precache. + * + * If a relative URL is provided, the location of the service worker file will + * be used as the base. + * + * For precached entries without revision information, the cache key will be the + * same as the original URL. + * + * For precached entries with revision information, the cache key will be the + * original URL with the addition of a query parameter used for keeping track of + * the revision info. + * + * @param {string} url The URL whose cache key to look up. + * @return {string} The cache key that corresponds to that URL. + * + * @alias workbox.precaching.getCacheKeyForURL + */ + + const getCacheKeyForURL$1 = url => { + const precacheController = getOrCreatePrecacheController(); + return precacheController.getCacheKeyForURL(url); + }; + + /* + Copyright 2019 Google LLC + + Use of this source code is governed by an MIT-style + license that can be found in the LICENSE file or at + https://opensource.org/licenses/MIT. + */ + + const installListener = event => { + const precacheController = getOrCreatePrecacheController(); + const plugins = precachePlugins.get(); + event.waitUntil(precacheController.install({ + event, + plugins + }).catch(error => { + { + logger_mjs.logger.error(`Service worker installation failed. It will ` + `be retried automatically during the next navigation.`); + } // Re-throw the error to ensure installation fails. + + + throw error; + })); + }; + + const activateListener = event => { + const precacheController = getOrCreatePrecacheController(); + const plugins = precachePlugins.get(); + event.waitUntil(precacheController.activate({ + event, + plugins + })); + }; + /** + * Adds items to the precache list, removing any duplicates and + * stores the files in the + * ["precache cache"]{@link module:workbox-core.cacheNames} when the service + * worker installs. + * + * This method can be called multiple times. + * + * Please note: This method **will not** serve any of the cached files for you. + * It only precaches files. To respond to a network request you call + * [addRoute()]{@link module:workbox-precaching.addRoute}. + * + * If you have a single array of files to precache, you can just call + * [precacheAndRoute()]{@link module:workbox-precaching.precacheAndRoute}. + * + * @param {Array} entries Array of entries to precache. + * + * @alias workbox.precaching.precache + */ + + + const precache = entries => { + const precacheController = getOrCreatePrecacheController(); + precacheController.addToCacheList(entries); + + if (entries.length > 0) { + // NOTE: these listeners will only be added once (even if the `precache()` + // method is called multiple times) because event listeners are implemented + // as a set, where each listener must be unique. + addEventListener('install', installListener); + addEventListener('activate', activateListener); + } + }; + + /* + Copyright 2019 Google LLC + + Use of this source code is governed by an MIT-style + license that can be found in the LICENSE file or at + https://opensource.org/licenses/MIT. + */ + /** + * This method will add entries to the precache list and add a route to + * respond to fetch events. + * + * This is a convenience method that will call + * [precache()]{@link module:workbox-precaching.precache} and + * [addRoute()]{@link module:workbox-precaching.addRoute} in a single call. + * + * @param {Array} entries Array of entries to precache. + * @param {Object} options See + * [addRoute() options]{@link module:workbox-precaching.addRoute}. + * + * @alias workbox.precaching.precacheAndRoute + */ + + const precacheAndRoute = (entries, options) => { + precache(entries); + addRoute(options); + }; + + /* + Copyright 2018 Google LLC + + Use of this source code is governed by an MIT-style + license that can be found in the LICENSE file or at + https://opensource.org/licenses/MIT. + */ + + { + assert_mjs.assert.isSWEnv('workbox-precaching'); + } + + exports.addPlugins = addPlugins; + exports.addRoute = addRoute; + exports.cleanupOutdatedCaches = cleanupOutdatedCaches; + exports.getCacheKeyForURL = getCacheKeyForURL$1; + exports.precache = precache; + exports.precacheAndRoute = precacheAndRoute; + exports.PrecacheController = PrecacheController; + + return exports; + +}({}, workbox.core._private, workbox.core._private, workbox.core._private, workbox.core._private, workbox.core._private, workbox.core._private, workbox.core._private)); +//# sourceMappingURL=workbox-precaching.dev.js.map diff --git a/workbox-v4.3.1/workbox-precaching.dev.js.map b/workbox-v4.3.1/workbox-precaching.dev.js.map new file mode 100644 index 0000000000..364f81a279 --- /dev/null +++ b/workbox-v4.3.1/workbox-precaching.dev.js.map @@ -0,0 +1 @@ +{"version":3,"file":"workbox-precaching.dev.js","sources":["../_version.mjs","../utils/precachePlugins.mjs","../addPlugins.mjs","../utils/cleanRedirect.mjs","../utils/createCacheKey.mjs","../utils/printCleanupDetails.mjs","../utils/printInstallDetails.mjs","../PrecacheController.mjs","../utils/getOrCreatePrecacheController.mjs","../utils/removeIgnoredSearchParams.mjs","../utils/generateURLVariations.mjs","../utils/getCacheKeyForURL.mjs","../utils/addFetchListener.mjs","../addRoute.mjs","../utils/deleteOutdatedCaches.mjs","../cleanupOutdatedCaches.mjs","../getCacheKeyForURL.mjs","../precache.mjs","../precacheAndRoute.mjs","../index.mjs"],"sourcesContent":["try{self['workbox:precaching:4.3.1']&&_()}catch(e){}// eslint-disable-line","/*\n Copyright 2019 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport '../_version.mjs';\n\n\nconst plugins = [];\n\nexport const precachePlugins = {\n /*\n * @return {Array}\n * @private\n */\n get() {\n return plugins;\n },\n\n /*\n * @param {Array} newPlugins\n * @private\n */\n add(newPlugins) {\n plugins.push(...newPlugins);\n },\n};\n","/*\n Copyright 2019 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport {precachePlugins} from './utils/precachePlugins.mjs';\nimport './_version.mjs';\n\n\n/**\n * Adds plugins to precaching.\n *\n * @param {Array} newPlugins\n *\n * @alias workbox.precaching.addPlugins\n */\nconst addPlugins = (newPlugins) => {\n precachePlugins.add(newPlugins);\n};\n\nexport {addPlugins};\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport '../_version.mjs';\n\n/**\n * @param {Response} response\n * @return {Response}\n *\n * @private\n * @memberof module:workbox-precaching\n */\nexport async function cleanRedirect(response) {\n const clonedResponse = response.clone();\n\n // Not all browsers support the Response.body stream, so fall back\n // to reading the entire body into memory as a blob.\n const bodyPromise = 'body' in clonedResponse ?\n Promise.resolve(clonedResponse.body) :\n clonedResponse.blob();\n\n const body = await bodyPromise;\n\n // new Response() is happy when passed either a stream or a Blob.\n return new Response(body, {\n headers: clonedResponse.headers,\n status: clonedResponse.status,\n statusText: clonedResponse.statusText,\n });\n}\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport {WorkboxError} from 'workbox-core/_private/WorkboxError.mjs';\n\nimport '../_version.mjs';\n\n// Name of the search parameter used to store revision info.\nconst REVISION_SEARCH_PARAM = '__WB_REVISION__';\n\n/**\n * Converts a manifest entry into a versioned URL suitable for precaching.\n *\n * @param {Object} entry\n * @return {string} A URL with versioning info.\n *\n * @private\n * @memberof module:workbox-precaching\n */\nexport function createCacheKey(entry) {\n if (!entry) {\n throw new WorkboxError('add-to-cache-list-unexpected-type', {entry});\n }\n\n // If a precache manifest entry is a string, it's assumed to be a versioned\n // URL, like '/app.abcd1234.js'. Return as-is.\n if (typeof entry === 'string') {\n const urlObject = new URL(entry, location);\n return {\n cacheKey: urlObject.href,\n url: urlObject.href,\n };\n }\n\n const {revision, url} = entry;\n if (!url) {\n throw new WorkboxError('add-to-cache-list-unexpected-type', {entry});\n }\n\n // If there's just a URL and no revision, then it's also assumed to be a\n // versioned URL.\n if (!revision) {\n const urlObject = new URL(url, location);\n return {\n cacheKey: urlObject.href,\n url: urlObject.href,\n };\n }\n\n // Otherwise, construct a properly versioned URL using the custom Workbox\n // search parameter along with the revision info.\n const originalURL = new URL(url, location);\n const cacheKeyURL = new URL(url, location);\n cacheKeyURL.searchParams.set(REVISION_SEARCH_PARAM, revision);\n return {\n cacheKey: cacheKeyURL.href,\n url: originalURL.href,\n };\n}\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport {logger} from 'workbox-core/_private/logger.mjs';\n\nimport '../_version.mjs';\n\nconst logGroup = (groupTitle, deletedURLs) => {\n logger.groupCollapsed(groupTitle);\n\n for (const url of deletedURLs) {\n logger.log(url);\n }\n\n logger.groupEnd();\n};\n\n/**\n * @param {Array} deletedURLs\n *\n * @private\n * @memberof module:workbox-precaching\n */\nexport function printCleanupDetails(deletedURLs) {\n const deletionCount = deletedURLs.length;\n if (deletionCount > 0) {\n logger.groupCollapsed(`During precaching cleanup, ` +\n `${deletionCount} cached ` +\n `request${deletionCount === 1 ? ' was' : 's were'} deleted.`);\n logGroup('Deleted Cache Requests', deletedURLs);\n logger.groupEnd();\n }\n}\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport {logger} from 'workbox-core/_private/logger.mjs';\n\nimport '../_version.mjs';\n\n/**\n * @param {string} groupTitle\n * @param {Array} urls\n *\n * @private\n */\nfunction _nestedGroup(groupTitle, urls) {\n if (urls.length === 0) {\n return;\n }\n\n logger.groupCollapsed(groupTitle);\n\n for (const url of urls) {\n logger.log(url);\n }\n\n logger.groupEnd();\n}\n\n/**\n * @param {Array} urlsToPrecache\n * @param {Array} urlsAlreadyPrecached\n *\n * @private\n * @memberof module:workbox-precaching\n */\nexport function printInstallDetails(urlsToPrecache, urlsAlreadyPrecached) {\n const precachedCount = urlsToPrecache.length;\n const alreadyPrecachedCount = urlsAlreadyPrecached.length;\n\n if (precachedCount || alreadyPrecachedCount) {\n let message =\n `Precaching ${precachedCount} file${precachedCount === 1 ? '' : 's'}.`;\n\n if (alreadyPrecachedCount > 0) {\n message += ` ${alreadyPrecachedCount} ` +\n `file${alreadyPrecachedCount === 1 ? ' is' : 's are'} already cached.`;\n }\n\n logger.groupCollapsed(message);\n\n _nestedGroup(`View newly precached URLs.`, urlsToPrecache);\n _nestedGroup(`View previously precached URLs.`, urlsAlreadyPrecached);\n logger.groupEnd();\n }\n}\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport {assert} from 'workbox-core/_private/assert.mjs';\nimport {cacheNames} from 'workbox-core/_private/cacheNames.mjs';\nimport {cacheWrapper} from 'workbox-core/_private/cacheWrapper.mjs';\nimport {fetchWrapper} from 'workbox-core/_private/fetchWrapper.mjs';\nimport {WorkboxError} from 'workbox-core/_private/WorkboxError.mjs';\n\nimport {cleanRedirect} from './utils/cleanRedirect.mjs';\nimport {createCacheKey} from './utils/createCacheKey.mjs';\nimport {printCleanupDetails} from './utils/printCleanupDetails.mjs';\nimport {printInstallDetails} from './utils/printInstallDetails.mjs';\n\nimport './_version.mjs';\n\n\n/**\n * Performs efficient precaching of assets.\n *\n * @memberof module:workbox-precaching\n */\nclass PrecacheController {\n /**\n * Create a new PrecacheController.\n *\n * @param {string} [cacheName] An optional name for the cache, to override\n * the default precache name.\n */\n constructor(cacheName) {\n this._cacheName = cacheNames.getPrecacheName(cacheName);\n this._urlsToCacheKeys = new Map();\n }\n\n /**\n * This method will add items to the precache list, removing duplicates\n * and ensuring the information is valid.\n *\n * @param {\n * Array\n * } entries Array of entries to precache.\n */\n addToCacheList(entries) {\n if (process.env.NODE_ENV !== 'production') {\n assert.isArray(entries, {\n moduleName: 'workbox-precaching',\n className: 'PrecacheController',\n funcName: 'addToCacheList',\n paramName: 'entries',\n });\n }\n\n for (const entry of entries) {\n const {cacheKey, url} = createCacheKey(entry);\n if (this._urlsToCacheKeys.has(url) &&\n this._urlsToCacheKeys.get(url) !== cacheKey) {\n throw new WorkboxError('add-to-cache-list-conflicting-entries', {\n firstEntry: this._urlsToCacheKeys.get(url),\n secondEntry: cacheKey,\n });\n }\n this._urlsToCacheKeys.set(url, cacheKey);\n }\n }\n\n /**\n * Precaches new and updated assets. Call this method from the service worker\n * install event.\n *\n * @param {Object} options\n * @param {Event} [options.event] The install event (if needed).\n * @param {Array} [options.plugins] Plugins to be used for fetching\n * and caching during install.\n * @return {Promise}\n */\n async install({event, plugins} = {}) {\n if (process.env.NODE_ENV !== 'production') {\n if (plugins) {\n assert.isArray(plugins, {\n moduleName: 'workbox-precaching',\n className: 'PrecacheController',\n funcName: 'install',\n paramName: 'plugins',\n });\n }\n }\n\n const urlsToPrecache = [];\n const urlsAlreadyPrecached = [];\n\n const cache = await caches.open(this._cacheName);\n const alreadyCachedRequests = await cache.keys();\n const alreadyCachedURLs = new Set(alreadyCachedRequests.map(\n (request) => request.url));\n\n for (const cacheKey of this._urlsToCacheKeys.values()) {\n if (alreadyCachedURLs.has(cacheKey)) {\n urlsAlreadyPrecached.push(cacheKey);\n } else {\n urlsToPrecache.push(cacheKey);\n }\n }\n\n const precacheRequests = urlsToPrecache.map((url) => {\n return this._addURLToCache({event, plugins, url});\n });\n await Promise.all(precacheRequests);\n\n if (process.env.NODE_ENV !== 'production') {\n printInstallDetails(urlsToPrecache, urlsAlreadyPrecached);\n }\n\n return {\n updatedURLs: urlsToPrecache,\n notUpdatedURLs: urlsAlreadyPrecached,\n };\n }\n\n /**\n * Deletes assets that are no longer present in the current precache manifest.\n * Call this method from the service worker activate event.\n *\n * @return {Promise}\n */\n async activate() {\n const cache = await caches.open(this._cacheName);\n const currentlyCachedRequests = await cache.keys();\n const expectedCacheKeys = new Set(this._urlsToCacheKeys.values());\n\n const deletedURLs = [];\n for (const request of currentlyCachedRequests) {\n if (!expectedCacheKeys.has(request.url)) {\n await cache.delete(request);\n deletedURLs.push(request.url);\n }\n }\n\n if (process.env.NODE_ENV !== 'production') {\n printCleanupDetails(deletedURLs);\n }\n\n return {deletedURLs};\n }\n\n /**\n * Requests the entry and saves it to the cache if the response is valid.\n * By default, any response with a status code of less than 400 (including\n * opaque responses) is considered valid.\n *\n * If you need to use custom criteria to determine what's valid and what\n * isn't, then pass in an item in `options.plugins` that implements the\n * `cacheWillUpdate()` lifecycle event.\n *\n * @private\n * @param {Object} options\n * @param {string} options.url The URL to fetch and cache.\n * @param {Event} [options.event] The install event (if passed).\n * @param {Array} [options.plugins] An array of plugins to apply to\n * fetch and caching.\n */\n async _addURLToCache({url, event, plugins}) {\n const request = new Request(url, {credentials: 'same-origin'});\n let response = await fetchWrapper.fetch({\n event,\n plugins,\n request,\n });\n\n // Allow developers to override the default logic about what is and isn't\n // valid by passing in a plugin implementing cacheWillUpdate(), e.g.\n // a workbox.cacheableResponse.Plugin instance.\n let cacheWillUpdateCallback;\n for (const plugin of (plugins || [])) {\n if ('cacheWillUpdate' in plugin) {\n cacheWillUpdateCallback = plugin.cacheWillUpdate.bind(plugin);\n }\n }\n\n const isValidResponse = cacheWillUpdateCallback ?\n // Use a callback if provided. It returns a truthy value if valid.\n cacheWillUpdateCallback({event, request, response}) :\n // Otherwise, default to considering any response status under 400 valid.\n // This includes, by default, considering opaque responses valid.\n response.status < 400;\n\n // Consider this a failure, leading to the `install` handler failing, if\n // we get back an invalid response.\n if (!isValidResponse) {\n throw new WorkboxError('bad-precaching-response', {\n url,\n status: response.status,\n });\n }\n\n if (response.redirected) {\n response = await cleanRedirect(response);\n }\n\n await cacheWrapper.put({\n event,\n plugins,\n request,\n response,\n cacheName: this._cacheName,\n matchOptions: {\n ignoreSearch: true,\n },\n });\n }\n\n /**\n * Returns a mapping of a precached URL to the corresponding cache key, taking\n * into account the revision information for the URL.\n *\n * @return {Map} A URL to cache key mapping.\n */\n getURLsToCacheKeys() {\n return this._urlsToCacheKeys;\n }\n\n /**\n * Returns a list of all the URLs that have been precached by the current\n * service worker.\n *\n * @return {Array} The precached URLs.\n */\n getCachedURLs() {\n return [...this._urlsToCacheKeys.keys()];\n }\n\n /**\n * Returns the cache key used for storing a given URL. If that URL is\n * unversioned, like `/index.html', then the cache key will be the original\n * URL with a search parameter appended to it.\n *\n * @param {string} url A URL whose cache key you want to look up.\n * @return {string} The versioned URL that corresponds to a cache key\n * for the original URL, or undefined if that URL isn't precached.\n */\n getCacheKeyForURL(url) {\n const urlObject = new URL(url, location);\n return this._urlsToCacheKeys.get(urlObject.href);\n }\n}\n\nexport {PrecacheController};\n","/*\n Copyright 2019 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport {PrecacheController} from '../PrecacheController.mjs';\nimport '../_version.mjs';\n\n\nlet precacheController;\n\n/**\n * @return {PrecacheController}\n * @private\n */\nexport const getOrCreatePrecacheController = () => {\n if (!precacheController) {\n precacheController = new PrecacheController();\n }\n return precacheController;\n};\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport '../_version.mjs';\n\n/**\n * Removes any URL search parameters that should be ignored.\n *\n * @param {URL} urlObject The original URL.\n * @param {Array} ignoreURLParametersMatching RegExps to test against\n * each search parameter name. Matches mean that the search parameter should be\n * ignored.\n * @return {URL} The URL with any ignored search parameters removed.\n *\n * @private\n * @memberof module:workbox-precaching\n */\nexport function removeIgnoredSearchParams(urlObject,\n ignoreURLParametersMatching) {\n // Convert the iterable into an array at the start of the loop to make sure\n // deletion doesn't mess up iteration.\n for (const paramName of [...urlObject.searchParams.keys()]) {\n if (ignoreURLParametersMatching.some((regExp) => regExp.test(paramName))) {\n urlObject.searchParams.delete(paramName);\n }\n }\n\n return urlObject;\n}\n","/*\n Copyright 2019 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport {removeIgnoredSearchParams} from './removeIgnoredSearchParams.mjs';\n\nimport '../_version.mjs';\n\n/**\n * Generator function that yields possible variations on the original URL to\n * check, one at a time.\n *\n * @param {string} url\n * @param {Object} options\n *\n * @private\n * @memberof module:workbox-precaching\n */\nexport function* generateURLVariations(url, {\n ignoreURLParametersMatching,\n directoryIndex,\n cleanURLs,\n urlManipulation,\n} = {}) {\n const urlObject = new URL(url, location);\n urlObject.hash = '';\n yield urlObject.href;\n\n const urlWithoutIgnoredParams = removeIgnoredSearchParams(\n urlObject, ignoreURLParametersMatching);\n yield urlWithoutIgnoredParams.href;\n\n if (directoryIndex && urlWithoutIgnoredParams.pathname.endsWith('/')) {\n const directoryURL = new URL(urlWithoutIgnoredParams);\n directoryURL.pathname += directoryIndex;\n yield directoryURL.href;\n }\n\n if (cleanURLs) {\n const cleanURL = new URL(urlWithoutIgnoredParams);\n cleanURL.pathname += '.html';\n yield cleanURL.href;\n }\n\n if (urlManipulation) {\n const additionalURLs = urlManipulation({url: urlObject});\n for (const urlToAttempt of additionalURLs) {\n yield urlToAttempt.href;\n }\n }\n}\n","/*\n Copyright 2019 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport {getOrCreatePrecacheController}\n from './getOrCreatePrecacheController.mjs';\nimport {generateURLVariations} from './generateURLVariations.mjs';\nimport '../_version.mjs';\n\n/**\n * This function will take the request URL and manipulate it based on the\n * configuration options.\n *\n * @param {string} url\n * @param {Object} options\n * @return {string} Returns the URL in the cache that matches the request,\n * if possible.\n *\n * @private\n */\nexport const getCacheKeyForURL = (url, options) => {\n const precacheController = getOrCreatePrecacheController();\n\n const urlsToCacheKeys = precacheController.getURLsToCacheKeys();\n for (const possibleURL of generateURLVariations(url, options)) {\n const possibleCacheKey = urlsToCacheKeys.get(possibleURL);\n if (possibleCacheKey) {\n return possibleCacheKey;\n }\n }\n};\n","/*\n Copyright 2019 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport {cacheNames} from 'workbox-core/_private/cacheNames.mjs';\nimport {getFriendlyURL} from 'workbox-core/_private/getFriendlyURL.mjs';\nimport {logger} from 'workbox-core/_private/logger.mjs';\nimport {getCacheKeyForURL} from './getCacheKeyForURL.mjs';\nimport '../_version.mjs';\n\n\n/**\n * Adds a `fetch` listener to the service worker that will\n * respond to\n * [network requests]{@link https://developer.mozilla.org/en-US/docs/Web/API/Service_Worker_API/Using_Service_Workers#Custom_responses_to_requests}\n * with precached assets.\n *\n * Requests for assets that aren't precached, the `FetchEvent` will not be\n * responded to, allowing the event to fall through to other `fetch` event\n * listeners.\n *\n * NOTE: when called more than once this method will replace the previously set\n * configuration options. Calling it more than once is not recommended outside\n * of tests.\n *\n * @private\n * @param {Object} options\n * @param {string} [options.directoryIndex=index.html] The `directoryIndex` will\n * check cache entries for a URLs ending with '/' to see if there is a hit when\n * appending the `directoryIndex` value.\n * @param {Array} [options.ignoreURLParametersMatching=[/^utm_/]] An\n * array of regex's to remove search params when looking for a cache match.\n * @param {boolean} [options.cleanURLs=true] The `cleanURLs` option will\n * check the cache for the URL with a `.html` added to the end of the end.\n * @param {workbox.precaching~urlManipulation} [options.urlManipulation]\n * This is a function that should take a URL and return an array of\n * alternative URL's that should be checked for precache matches.\n */\nexport const addFetchListener = ({\n ignoreURLParametersMatching = [/^utm_/],\n directoryIndex = 'index.html',\n cleanURLs = true,\n urlManipulation = null,\n} = {}) => {\n const cacheName = cacheNames.getPrecacheName();\n\n addEventListener('fetch', (event) => {\n const precachedURL = getCacheKeyForURL(event.request.url, {\n cleanURLs,\n directoryIndex,\n ignoreURLParametersMatching,\n urlManipulation,\n });\n if (!precachedURL) {\n if (process.env.NODE_ENV !== 'production') {\n logger.debug(`Precaching did not find a match for ` +\n getFriendlyURL(event.request.url));\n }\n return;\n }\n\n let responsePromise = caches.open(cacheName).then((cache) => {\n return cache.match(precachedURL);\n }).then((cachedResponse) => {\n if (cachedResponse) {\n return cachedResponse;\n }\n\n // Fall back to the network if we don't have a cached response\n // (perhaps due to manual cache cleanup).\n if (process.env.NODE_ENV !== 'production') {\n logger.warn(`The precached response for ` +\n `${getFriendlyURL(precachedURL)} in ${cacheName} was not found. ` +\n `Falling back to the network instead.`);\n }\n\n return fetch(precachedURL);\n });\n\n if (process.env.NODE_ENV !== 'production') {\n responsePromise = responsePromise.then((response) => {\n // Workbox is going to handle the route.\n // print the routing details to the console.\n logger.groupCollapsed(`Precaching is responding to: ` +\n getFriendlyURL(event.request.url));\n logger.log(`Serving the precached url: ${precachedURL}`);\n\n logger.groupCollapsed(`View request details here.`);\n logger.log(event.request);\n logger.groupEnd();\n\n logger.groupCollapsed(`View response details here.`);\n logger.log(response);\n logger.groupEnd();\n\n logger.groupEnd();\n return response;\n });\n }\n\n event.respondWith(responsePromise);\n });\n};\n","\n/*\n Copyright 2019 Google LLC\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport {addFetchListener} from './utils/addFetchListener.mjs';\nimport './_version.mjs';\n\n\nlet listenerAdded = false;\n\n/**\n * Add a `fetch` listener to the service worker that will\n * respond to\n * [network requests]{@link https://developer.mozilla.org/en-US/docs/Web/API/Service_Worker_API/Using_Service_Workers#Custom_responses_to_requests}\n * with precached assets.\n *\n * Requests for assets that aren't precached, the `FetchEvent` will not be\n * responded to, allowing the event to fall through to other `fetch` event\n * listeners.\n *\n * @param {Object} options\n * @param {string} [options.directoryIndex=index.html] The `directoryIndex` will\n * check cache entries for a URLs ending with '/' to see if there is a hit when\n * appending the `directoryIndex` value.\n * @param {Array} [options.ignoreURLParametersMatching=[/^utm_/]] An\n * array of regex's to remove search params when looking for a cache match.\n * @param {boolean} [options.cleanURLs=true] The `cleanURLs` option will\n * check the cache for the URL with a `.html` added to the end of the end.\n * @param {workbox.precaching~urlManipulation} [options.urlManipulation]\n * This is a function that should take a URL and return an array of\n * alternative URL's that should be checked for precache matches.\n *\n * @alias workbox.precaching.addRoute\n */\nexport const addRoute = (options) => {\n if (!listenerAdded) {\n addFetchListener(options);\n listenerAdded = true;\n }\n};\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport '../_version.mjs';\n\nconst SUBSTRING_TO_FIND = '-precache-';\n\n/**\n * Cleans up incompatible precaches that were created by older versions of\n * Workbox, by a service worker registered under the current scope.\n *\n * This is meant to be called as part of the `activate` event.\n *\n * This should be safe to use as long as you don't include `substringToFind`\n * (defaulting to `-precache-`) in your non-precache cache names.\n *\n * @param {string} currentPrecacheName The cache name currently in use for\n * precaching. This cache won't be deleted.\n * @param {string} [substringToFind='-precache-'] Cache names which include this\n * substring will be deleted (excluding `currentPrecacheName`).\n * @return {Array} A list of all the cache names that were deleted.\n *\n * @private\n * @memberof module:workbox-precaching\n */\nconst deleteOutdatedCaches = async (\n currentPrecacheName,\n substringToFind = SUBSTRING_TO_FIND) => {\n const cacheNames = await caches.keys();\n\n const cacheNamesToDelete = cacheNames.filter((cacheName) => {\n return cacheName.includes(substringToFind) &&\n cacheName.includes(self.registration.scope) &&\n cacheName !== currentPrecacheName;\n });\n\n await Promise.all(\n cacheNamesToDelete.map((cacheName) => caches.delete(cacheName)));\n\n return cacheNamesToDelete;\n};\n\nexport {deleteOutdatedCaches};\n\n","/*\n Copyright 2019 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport {cacheNames} from 'workbox-core/_private/cacheNames.mjs';\nimport {logger} from 'workbox-core/_private/logger.mjs';\nimport {deleteOutdatedCaches} from './utils/deleteOutdatedCaches.mjs';\nimport './_version.mjs';\n\n\n/**\n * Adds an `activate` event listener which will clean up incompatible\n * precaches that were created by older versions of Workbox.\n *\n * @alias workbox.precaching.cleanupOutdatedCaches\n */\nexport const cleanupOutdatedCaches = () => {\n addEventListener('activate', (event) => {\n const cacheName = cacheNames.getPrecacheName();\n\n event.waitUntil(deleteOutdatedCaches(cacheName).then((cachesDeleted) => {\n if (process.env.NODE_ENV !== 'production') {\n if (cachesDeleted.length > 0) {\n logger.log(`The following out-of-date precaches were cleaned up ` +\n `automatically:`, cachesDeleted);\n }\n }\n }));\n });\n};\n","/*\n Copyright 2019 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport {getOrCreatePrecacheController}\n from './utils/getOrCreatePrecacheController.mjs';\nimport './_version.mjs';\n\n\n/**\n * Takes in a URL, and returns the corresponding URL that could be used to\n * lookup the entry in the precache.\n *\n * If a relative URL is provided, the location of the service worker file will\n * be used as the base.\n *\n * For precached entries without revision information, the cache key will be the\n * same as the original URL.\n *\n * For precached entries with revision information, the cache key will be the\n * original URL with the addition of a query parameter used for keeping track of\n * the revision info.\n *\n * @param {string} url The URL whose cache key to look up.\n * @return {string} The cache key that corresponds to that URL.\n *\n * @alias workbox.precaching.getCacheKeyForURL\n */\nexport const getCacheKeyForURL = (url) => {\n const precacheController = getOrCreatePrecacheController();\n return precacheController.getCacheKeyForURL(url);\n};\n","/*\n Copyright 2019 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport {logger} from 'workbox-core/_private/logger.mjs';\nimport {getOrCreatePrecacheController} from './utils/getOrCreatePrecacheController.mjs';\nimport {precachePlugins} from './utils/precachePlugins.mjs';\nimport './_version.mjs';\n\n\nconst installListener = (event) => {\n const precacheController = getOrCreatePrecacheController();\n const plugins = precachePlugins.get();\n\n event.waitUntil(\n precacheController.install({event, plugins})\n .catch((error) => {\n if (process.env.NODE_ENV !== 'production') {\n logger.error(`Service worker installation failed. It will ` +\n `be retried automatically during the next navigation.`);\n }\n // Re-throw the error to ensure installation fails.\n throw error;\n })\n );\n};\n\nconst activateListener = (event) => {\n const precacheController = getOrCreatePrecacheController();\n const plugins = precachePlugins.get();\n\n event.waitUntil(precacheController.activate({event, plugins}));\n};\n\n/**\n * Adds items to the precache list, removing any duplicates and\n * stores the files in the\n * [\"precache cache\"]{@link module:workbox-core.cacheNames} when the service\n * worker installs.\n *\n * This method can be called multiple times.\n *\n * Please note: This method **will not** serve any of the cached files for you.\n * It only precaches files. To respond to a network request you call\n * [addRoute()]{@link module:workbox-precaching.addRoute}.\n *\n * If you have a single array of files to precache, you can just call\n * [precacheAndRoute()]{@link module:workbox-precaching.precacheAndRoute}.\n *\n * @param {Array} entries Array of entries to precache.\n *\n * @alias workbox.precaching.precache\n */\nexport const precache = (entries) => {\n const precacheController = getOrCreatePrecacheController();\n precacheController.addToCacheList(entries);\n\n if (entries.length > 0) {\n // NOTE: these listeners will only be added once (even if the `precache()`\n // method is called multiple times) because event listeners are implemented\n // as a set, where each listener must be unique.\n addEventListener('install', installListener);\n addEventListener('activate', activateListener);\n }\n};\n","/*\n Copyright 2019 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport {addRoute} from './addRoute.mjs';\nimport {precache} from './precache.mjs';\nimport './_version.mjs';\n\n\n/**\n * This method will add entries to the precache list and add a route to\n * respond to fetch events.\n *\n * This is a convenience method that will call\n * [precache()]{@link module:workbox-precaching.precache} and\n * [addRoute()]{@link module:workbox-precaching.addRoute} in a single call.\n *\n * @param {Array} entries Array of entries to precache.\n * @param {Object} options See\n * [addRoute() options]{@link module:workbox-precaching.addRoute}.\n *\n * @alias workbox.precaching.precacheAndRoute\n */\nexport const precacheAndRoute = (entries, options) => {\n precache(entries);\n addRoute(options);\n};\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport {assert} from 'workbox-core/_private/assert.mjs';\nimport {addPlugins} from './addPlugins.mjs';\nimport {addRoute} from './addRoute.mjs';\nimport {cleanupOutdatedCaches} from './cleanupOutdatedCaches.mjs';\nimport {getCacheKeyForURL} from './getCacheKeyForURL.mjs';\nimport {precache} from './precache.mjs';\nimport {precacheAndRoute} from './precacheAndRoute.mjs';\nimport {PrecacheController} from './PrecacheController.mjs';\nimport './_version.mjs';\n\n\nif (process.env.NODE_ENV !== 'production') {\n assert.isSWEnv('workbox-precaching');\n}\n\n/**\n * Most consumers of this module will want to use the\n * [precacheAndRoute()]{@link workbox.precaching.precacheAndRoute}\n * method to add assets to the Cache and respond to network requests with these\n * cached assets.\n *\n * If you require finer grained control, you can use the\n * [PrecacheController]{@link workbox.precaching.PrecacheController}\n * to determine when performed.\n *\n * @namespace workbox.precaching\n */\n\nexport {\n addPlugins,\n addRoute,\n cleanupOutdatedCaches,\n getCacheKeyForURL,\n precache,\n precacheAndRoute,\n PrecacheController,\n};\n"],"names":["self","_","e","plugins","precachePlugins","get","add","newPlugins","push","addPlugins","cleanRedirect","response","clonedResponse","clone","bodyPromise","Promise","resolve","body","blob","Response","headers","status","statusText","REVISION_SEARCH_PARAM","createCacheKey","entry","WorkboxError","urlObject","URL","location","cacheKey","href","url","revision","originalURL","cacheKeyURL","searchParams","set","logGroup","groupTitle","deletedURLs","logger","groupCollapsed","log","groupEnd","printCleanupDetails","deletionCount","length","_nestedGroup","urls","printInstallDetails","urlsToPrecache","urlsAlreadyPrecached","precachedCount","alreadyPrecachedCount","message","PrecacheController","constructor","cacheName","_cacheName","cacheNames","getPrecacheName","_urlsToCacheKeys","Map","addToCacheList","entries","assert","isArray","moduleName","className","funcName","paramName","has","firstEntry","secondEntry","install","event","cache","caches","open","alreadyCachedRequests","keys","alreadyCachedURLs","Set","map","request","values","precacheRequests","_addURLToCache","all","updatedURLs","notUpdatedURLs","activate","currentlyCachedRequests","expectedCacheKeys","delete","Request","credentials","fetchWrapper","fetch","cacheWillUpdateCallback","plugin","cacheWillUpdate","bind","isValidResponse","redirected","cacheWrapper","put","matchOptions","ignoreSearch","getURLsToCacheKeys","getCachedURLs","getCacheKeyForURL","precacheController","getOrCreatePrecacheController","removeIgnoredSearchParams","ignoreURLParametersMatching","some","regExp","test","generateURLVariations","directoryIndex","cleanURLs","urlManipulation","hash","urlWithoutIgnoredParams","pathname","endsWith","directoryURL","cleanURL","additionalURLs","urlToAttempt","options","urlsToCacheKeys","possibleURL","possibleCacheKey","addFetchListener","addEventListener","precachedURL","debug","getFriendlyURL","responsePromise","then","match","cachedResponse","warn","respondWith","listenerAdded","addRoute","SUBSTRING_TO_FIND","deleteOutdatedCaches","currentPrecacheName","substringToFind","cacheNamesToDelete","filter","includes","registration","scope","cleanupOutdatedCaches","waitUntil","cachesDeleted","installList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A2C;EACzClE,EAAAA,iBAAM,CAACqG,OAAP,CAAe,oBAAf;EACD;;;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/workbox-v4.3.1/workbox-precaching.prod.js b/workbox-v4.3.1/workbox-precaching.prod.js new file mode 100644 index 0000000000..6521788e3e --- /dev/null +++ b/workbox-v4.3.1/workbox-precaching.prod.js @@ -0,0 +1,2 @@ +this.workbox=this.workbox||{},this.workbox.precaching=function(t,e,n,s,c){"use strict";try{self["workbox:precaching:4.3.1"]&&_()}catch(t){}const o=[],i={get:()=>o,add(t){o.push(...t)}};const a="__WB_REVISION__";function r(t){if(!t)throw new c.WorkboxError("add-to-cache-list-unexpected-type",{entry:t});if("string"==typeof t){const e=new URL(t,location);return{cacheKey:e.href,url:e.href}}const{revision:e,url:n}=t;if(!n)throw new c.WorkboxError("add-to-cache-list-unexpected-type",{entry:t});if(!e){const t=new URL(n,location);return{cacheKey:t.href,url:t.href}}const s=new URL(n,location),o=new URL(n,location);return o.searchParams.set(a,e),{cacheKey:o.href,url:s.href}}class l{constructor(t){this.t=e.cacheNames.getPrecacheName(t),this.s=new Map}addToCacheList(t){for(const e of t){const{cacheKey:t,url:n}=r(e);if(this.s.has(n)&&this.s.get(n)!==t)throw new c.WorkboxError("add-to-cache-list-conflicting-entries",{firstEntry:this.s.get(n),secondEntry:t});this.s.set(n,t)}}async install({event:t,plugins:e}={}){const n=[],s=[],c=await caches.open(this.t),o=await c.keys(),i=new Set(o.map(t=>t.url));for(const t of this.s.values())i.has(t)?s.push(t):n.push(t);const a=n.map(n=>this.o({event:t,plugins:e,url:n}));return await Promise.all(a),{updatedURLs:n,notUpdatedURLs:s}}async activate(){const t=await caches.open(this.t),e=await t.keys(),n=new Set(this.s.values()),s=[];for(const c of e)n.has(c.url)||(await t.delete(c),s.push(c.url));return{deletedURLs:s}}async o({url:t,event:e,plugins:o}){const i=new Request(t,{credentials:"same-origin"});let a,r=await s.fetchWrapper.fetch({event:e,plugins:o,request:i});for(const t of o||[])"cacheWillUpdate"in t&&(a=t.cacheWillUpdate.bind(t));if(!(a?a({event:e,request:i,response:r}):r.status<400))throw new c.WorkboxError("bad-precaching-response",{url:t,status:r.status});r.redirected&&(r=await async function(t){const e=t.clone(),n="body"in e?Promise.resolve(e.body):e.blob(),s=await n;return new Response(s,{headers:e.headers,status:e.status,statusText:e.statusText})}(r)),await n.cacheWrapper.put({event:e,plugins:o,request:i,response:r,cacheName:this.t,matchOptions:{ignoreSearch:!0}})}getURLsToCacheKeys(){return this.s}getCachedURLs(){return[...this.s.keys()]}getCacheKeyForURL(t){const e=new URL(t,location);return this.s.get(e.href)}}let u;const h=()=>(u||(u=new l),u);const d=(t,e)=>{const n=h().getURLsToCacheKeys();for(const s of function*(t,{ignoreURLParametersMatching:e,directoryIndex:n,cleanURLs:s,urlManipulation:c}={}){const o=new URL(t,location);o.hash="",yield o.href;const i=function(t,e){for(const n of[...t.searchParams.keys()])e.some(t=>t.test(n))&&t.searchParams.delete(n);return t}(o,e);if(yield i.href,n&&i.pathname.endsWith("/")){const t=new URL(i);t.pathname+=n,yield t.href}if(s){const t=new URL(i);t.pathname+=".html",yield t.href}if(c){const t=c({url:o});for(const e of t)yield e.href}}(t,e)){const t=n.get(s);if(t)return t}};let w=!1;const f=t=>{w||((({ignoreURLParametersMatching:t=[/^utm_/],directoryIndex:n="index.html",cleanURLs:s=!0,urlManipulation:c=null}={})=>{const o=e.cacheNames.getPrecacheName();addEventListener("fetch",e=>{const i=d(e.request.url,{cleanURLs:s,directoryIndex:n,ignoreURLParametersMatching:t,urlManipulation:c});if(!i)return;let a=caches.open(o).then(t=>t.match(i)).then(t=>t||fetch(i));e.respondWith(a)})})(t),w=!0)},y=t=>{const e=h(),n=i.get();t.waitUntil(e.install({event:t,plugins:n}).catch(t=>{throw t}))},p=t=>{const e=h(),n=i.get();t.waitUntil(e.activate({event:t,plugins:n}))},L=t=>{h().addToCacheList(t),t.length>0&&(addEventListener("install",y),addEventListener("activate",p))};return t.addPlugins=(t=>{i.add(t)}),t.addRoute=f,t.cleanupOutdatedCaches=(()=>{addEventListener("activate",t=>{const n=e.cacheNames.getPrecacheName();t.waitUntil((async(t,e="-precache-")=>{const n=(await caches.keys()).filter(n=>n.includes(e)&&n.includes(self.registration.scope)&&n!==t);return await Promise.all(n.map(t=>caches.delete(t))),n})(n).then(t=>{}))})}),t.getCacheKeyForURL=(t=>{return h().getCacheKeyForURL(t)}),t.precache=L,t.precacheAndRoute=((t,e)=>{L(t),f(e)}),t.PrecacheController=l,t}({},workbox.core._private,workbox.core._private,workbox.core._private,workbox.core._private); +//# sourceMappingURL=workbox-precaching.prod.js.map diff --git a/workbox-v4.3.1/workbox-precaching.prod.js.map b/workbox-v4.3.1/workbox-precaching.prod.js.map new file mode 100644 index 0000000000..a67bd4a931 --- /dev/null +++ b/workbox-v4.3.1/workbox-precaching.prod.js.map @@ -0,0 +1 @@ +{"version":3,"file":"workbox-precaching.prod.js","sources":["../_version.mjs","../utils/precachePlugins.mjs","../utils/createCacheKey.mjs","../PrecacheController.mjs","../utils/cleanRedirect.mjs","../utils/getOrCreatePrecacheController.mjs","../utils/getCacheKeyForURL.mjs","../utils/generateURLVariations.mjs","../utils/removeIgnoredSearchParams.mjs","../addRoute.mjs","../utils/addFetchListener.mjs","../precache.mjs","../addPlugins.mjs","../cleanupOutdatedCaches.mjs","../utils/deleteOutdatedCaches.mjs","../getCacheKeyForURL.mjs","../precacheAndRoute.mjs"],"sourcesContent":["try{self['workbox:precaching:4.3.1']&&_()}catch(e){}// eslint-disable-line","/*\n Copyright 2019 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport '../_version.mjs';\n\n\nconst plugins = [];\n\nexport const precachePlugins = {\n /*\n * @return {Array}\n * @private\n */\n get() {\n return plugins;\n },\n\n /*\n * @param {Array} newPlugins\n * @private\n */\n add(newPlugins) {\n plugins.push(...newPlugins);\n },\n};\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport {WorkboxError} from 'workbox-core/_private/WorkboxError.mjs';\n\nimport '../_version.mjs';\n\n// Name of the search parameter used to store revision info.\nconst REVISION_SEARCH_PARAM = '__WB_REVISION__';\n\n/**\n * Converts a manifest entry into a versioned URL suitable for precaching.\n *\n * @param {Object} entry\n * @return {string} A URL with versioning info.\n *\n * @private\n * @memberof module:workbox-precaching\n */\nexport function createCacheKey(entry) {\n if (!entry) {\n throw new WorkboxError('add-to-cache-list-unexpected-type', {entry});\n }\n\n // If a precache manifest entry is a string, it's assumed to be a versioned\n // URL, like '/app.abcd1234.js'. Return as-is.\n if (typeof entry === 'string') {\n const urlObject = new URL(entry, location);\n return {\n cacheKey: urlObject.href,\n url: urlObject.href,\n };\n }\n\n const {revision, url} = entry;\n if (!url) {\n throw new WorkboxError('add-to-cache-list-unexpected-type', {entry});\n }\n\n // If there's just a URL and no revision, then it's also assumed to be a\n // versioned URL.\n if (!revision) {\n const urlObject = new URL(url, location);\n return {\n cacheKey: urlObject.href,\n url: urlObject.href,\n };\n }\n\n // Otherwise, construct a properly versioned URL using the custom Workbox\n // search parameter along with the revision info.\n const originalURL = new URL(url, location);\n const cacheKeyURL = new URL(url, location);\n cacheKeyURL.searchParams.set(REVISION_SEARCH_PARAM, revision);\n return {\n cacheKey: cacheKeyURL.href,\n url: originalURL.href,\n };\n}\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport {assert} from 'workbox-core/_private/assert.mjs';\nimport {cacheNames} from 'workbox-core/_private/cacheNames.mjs';\nimport {cacheWrapper} from 'workbox-core/_private/cacheWrapper.mjs';\nimport {fetchWrapper} from 'workbox-core/_private/fetchWrapper.mjs';\nimport {WorkboxError} from 'workbox-core/_private/WorkboxError.mjs';\n\nimport {cleanRedirect} from './utils/cleanRedirect.mjs';\nimport {createCacheKey} from './utils/createCacheKey.mjs';\nimport {printCleanupDetails} from './utils/printCleanupDetails.mjs';\nimport {printInstallDetails} from './utils/printInstallDetails.mjs';\n\nimport './_version.mjs';\n\n\n/**\n * Performs efficient precaching of assets.\n *\n * @memberof module:workbox-precaching\n */\nclass PrecacheController {\n /**\n * Create a new PrecacheController.\n *\n * @param {string} [cacheName] An optional name for the cache, to override\n * the default precache name.\n */\n constructor(cacheName) {\n this._cacheName = cacheNames.getPrecacheName(cacheName);\n this._urlsToCacheKeys = new Map();\n }\n\n /**\n * This method will add items to the precache list, removing duplicates\n * and ensuring the information is valid.\n *\n * @param {\n * Array\n * } entries Array of entries to precache.\n */\n addToCacheList(entries) {\n if (process.env.NODE_ENV !== 'production') {\n assert.isArray(entries, {\n moduleName: 'workbox-precaching',\n className: 'PrecacheController',\n funcName: 'addToCacheList',\n paramName: 'entries',\n });\n }\n\n for (const entry of entries) {\n const {cacheKey, url} = createCacheKey(entry);\n if (this._urlsToCacheKeys.has(url) &&\n this._urlsToCacheKeys.get(url) !== cacheKey) {\n throw new WorkboxError('add-to-cache-list-conflicting-entries', {\n firstEntry: this._urlsToCacheKeys.get(url),\n secondEntry: cacheKey,\n });\n }\n this._urlsToCacheKeys.set(url, cacheKey);\n }\n }\n\n /**\n * Precaches new and updated assets. Call this method from the service worker\n * install event.\n *\n * @param {Object} options\n * @param {Event} [options.event] The install event (if needed).\n * @param {Array} [options.plugins] Plugins to be used for fetching\n * and caching during install.\n * @return {Promise}\n */\n async install({event, plugins} = {}) {\n if (process.env.NODE_ENV !== 'production') {\n if (plugins) {\n assert.isArray(plugins, {\n moduleName: 'workbox-precaching',\n className: 'PrecacheController',\n funcName: 'install',\n paramName: 'plugins',\n });\n }\n }\n\n const urlsToPrecache = [];\n const urlsAlreadyPrecached = [];\n\n const cache = await caches.open(this._cacheName);\n const alreadyCachedRequests = await cache.keys();\n const alreadyCachedURLs = new Set(alreadyCachedRequests.map(\n (request) => request.url));\n\n for (const cacheKey of this._urlsToCacheKeys.values()) {\n if (alreadyCachedURLs.has(cacheKey)) {\n urlsAlreadyPrecached.push(cacheKey);\n } else {\n urlsToPrecache.push(cacheKey);\n }\n }\n\n const precacheRequests = urlsToPrecache.map((url) => {\n return this._addURLToCache({event, plugins, url});\n });\n await Promise.all(precacheRequests);\n\n if (process.env.NODE_ENV !== 'production') {\n printInstallDetails(urlsToPrecache, urlsAlreadyPrecached);\n }\n\n return {\n updatedURLs: urlsToPrecache,\n notUpdatedURLs: urlsAlreadyPrecached,\n };\n }\n\n /**\n * Deletes assets that are no longer present in the current precache manifest.\n * Call this method from the service worker activate event.\n *\n * @return {Promise}\n */\n async activate() {\n const cache = await caches.open(this._cacheName);\n const currentlyCachedRequests = await cache.keys();\n const expectedCacheKeys = new Set(this._urlsToCacheKeys.values());\n\n const deletedURLs = [];\n for (const request of currentlyCachedRequests) {\n if (!expectedCacheKeys.has(request.url)) {\n await cache.delete(request);\n deletedURLs.push(request.url);\n }\n }\n\n if (process.env.NODE_ENV !== 'production') {\n printCleanupDetails(deletedURLs);\n }\n\n return {deletedURLs};\n }\n\n /**\n * Requests the entry and saves it to the cache if the response is valid.\n * By default, any response with a status code of less than 400 (including\n * opaque responses) is considered valid.\n *\n * If you need to use custom criteria to determine what's valid and what\n * isn't, then pass in an item in `options.plugins` that implements the\n * `cacheWillUpdate()` lifecycle event.\n *\n * @private\n * @param {Object} options\n * @param {string} options.url The URL to fetch and cache.\n * @param {Event} [options.event] The install event (if passed).\n * @param {Array} [options.plugins] An array of plugins to apply to\n * fetch and caching.\n */\n async _addURLToCache({url, event, plugins}) {\n const request = new Request(url, {credentials: 'same-origin'});\n let response = await fetchWrapper.fetch({\n event,\n plugins,\n request,\n });\n\n // Allow developers to override the default logic about what is and isn't\n // valid by passing in a plugin implementing cacheWillUpdate(), e.g.\n // a workbox.cacheableResponse.Plugin instance.\n let cacheWillUpdateCallback;\n for (const plugin of (plugins || [])) {\n if ('cacheWillUpdate' in plugin) {\n cacheWillUpdateCallback = plugin.cacheWillUpdate.bind(plugin);\n }\n }\n\n const isValidResponse = cacheWillUpdateCallback ?\n // Use a callback if provided. It returns a truthy value if valid.\n cacheWillUpdateCallback({event, request, response}) :\n // Otherwise, default to considering any response status under 400 valid.\n // This includes, by default, considering opaque responses valid.\n response.status < 400;\n\n // Consider this a failure, leading to the `install` handler failing, if\n // we get back an invalid response.\n if (!isValidResponse) {\n throw new WorkboxError('bad-precaching-response', {\n url,\n status: response.status,\n });\n }\n\n if (response.redirected) {\n response = await cleanRedirect(response);\n }\n\n await cacheWrapper.put({\n event,\n plugins,\n request,\n response,\n cacheName: this._cacheName,\n matchOptions: {\n ignoreSearch: true,\n },\n });\n }\n\n /**\n * Returns a mapping of a precached URL to the corresponding cache key, taking\n * into account the revision information for the URL.\n *\n * @return {Map} A URL to cache key mapping.\n */\n getURLsToCacheKeys() {\n return this._urlsToCacheKeys;\n }\n\n /**\n * Returns a list of all the URLs that have been precached by the current\n * service worker.\n *\n * @return {Array} The precached URLs.\n */\n getCachedURLs() {\n return [...this._urlsToCacheKeys.keys()];\n }\n\n /**\n * Returns the cache key used for storing a given URL. If that URL is\n * unversioned, like `/index.html', then the cache key will be the original\n * URL with a search parameter appended to it.\n *\n * @param {string} url A URL whose cache key you want to look up.\n * @return {string} The versioned URL that corresponds to a cache key\n * for the original URL, or undefined if that URL isn't precached.\n */\n getCacheKeyForURL(url) {\n const urlObject = new URL(url, location);\n return this._urlsToCacheKeys.get(urlObject.href);\n }\n}\n\nexport {PrecacheController};\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport '../_version.mjs';\n\n/**\n * @param {Response} response\n * @return {Response}\n *\n * @private\n * @memberof module:workbox-precaching\n */\nexport async function cleanRedirect(response) {\n const clonedResponse = response.clone();\n\n // Not all browsers support the Response.body stream, so fall back\n // to reading the entire body into memory as a blob.\n const bodyPromise = 'body' in clonedResponse ?\n Promise.resolve(clonedResponse.body) :\n clonedResponse.blob();\n\n const body = await bodyPromise;\n\n // new Response() is happy when passed either a stream or a Blob.\n return new Response(body, {\n headers: clonedResponse.headers,\n status: clonedResponse.status,\n statusText: clonedResponse.statusText,\n });\n}\n","/*\n Copyright 2019 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport {PrecacheController} from '../PrecacheController.mjs';\nimport '../_version.mjs';\n\n\nlet precacheController;\n\n/**\n * @return {PrecacheController}\n * @private\n */\nexport const getOrCreatePrecacheController = () => {\n if (!precacheController) {\n precacheController = new PrecacheController();\n }\n return precacheController;\n};\n","/*\n Copyright 2019 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport {getOrCreatePrecacheController}\n from './getOrCreatePrecacheController.mjs';\nimport {generateURLVariations} from './generateURLVariations.mjs';\nimport '../_version.mjs';\n\n/**\n * This function will take the request URL and manipulate it based on the\n * configuration options.\n *\n * @param {string} url\n * @param {Object} options\n * @return {string} Returns the URL in the cache that matches the request,\n * if possible.\n *\n * @private\n */\nexport const getCacheKeyForURL = (url, options) => {\n const precacheController = getOrCreatePrecacheController();\n\n const urlsToCacheKeys = precacheController.getURLsToCacheKeys();\n for (const possibleURL of generateURLVariations(url, options)) {\n const possibleCacheKey = urlsToCacheKeys.get(possibleURL);\n if (possibleCacheKey) {\n return possibleCacheKey;\n }\n }\n};\n","/*\n Copyright 2019 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport {removeIgnoredSearchParams} from './removeIgnoredSearchParams.mjs';\n\nimport '../_version.mjs';\n\n/**\n * Generator function that yields possible variations on the original URL to\n * check, one at a time.\n *\n * @param {string} url\n * @param {Object} options\n *\n * @private\n * @memberof module:workbox-precaching\n */\nexport function* generateURLVariations(url, {\n ignoreURLParametersMatching,\n directoryIndex,\n cleanURLs,\n urlManipulation,\n} = {}) {\n const urlObject = new URL(url, location);\n urlObject.hash = '';\n yield urlObject.href;\n\n const urlWithoutIgnoredParams = removeIgnoredSearchParams(\n urlObject, ignoreURLParametersMatching);\n yield urlWithoutIgnoredParams.href;\n\n if (directoryIndex && urlWithoutIgnoredParams.pathname.endsWith('/')) {\n const directoryURL = new URL(urlWithoutIgnoredParams);\n directoryURL.pathname += directoryIndex;\n yield directoryURL.href;\n }\n\n if (cleanURLs) {\n const cleanURL = new URL(urlWithoutIgnoredParams);\n cleanURL.pathname += '.html';\n yield cleanURL.href;\n }\n\n if (urlManipulation) {\n const additionalURLs = urlManipulation({url: urlObject});\n for (const urlToAttempt of additionalURLs) {\n yield urlToAttempt.href;\n }\n }\n}\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport '../_version.mjs';\n\n/**\n * Removes any URL search parameters that should be ignored.\n *\n * @param {URL} urlObject The original URL.\n * @param {Array} ignoreURLParametersMatching RegExps to test against\n * each search parameter name. Matches mean that the search parameter should be\n * ignored.\n * @return {URL} The URL with any ignored search parameters removed.\n *\n * @private\n * @memberof module:workbox-precaching\n */\nexport function removeIgnoredSearchParams(urlObject,\n ignoreURLParametersMatching) {\n // Convert the iterable into an array at the start of the loop to make sure\n // deletion doesn't mess up iteration.\n for (const paramName of [...urlObject.searchParams.keys()]) {\n if (ignoreURLParametersMatching.some((regExp) => regExp.test(paramName))) {\n urlObject.searchParams.delete(paramName);\n }\n }\n\n return urlObject;\n}\n","\n/*\n Copyright 2019 Google LLC\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport {addFetchListener} from './utils/addFetchListener.mjs';\nimport './_version.mjs';\n\n\nlet listenerAdded = false;\n\n/**\n * Add a `fetch` listener to the service worker that will\n * respond to\n * [network requests]{@link https://developer.mozilla.org/en-US/docs/Web/API/Service_Worker_API/Using_Service_Workers#Custom_responses_to_requests}\n * with precached assets.\n *\n * Requests for assets that aren't precached, the `FetchEvent` will not be\n * responded to, allowing the event to fall through to other `fetch` event\n * listeners.\n *\n * @param {Object} options\n * @param {string} [options.directoryIndex=index.html] The `directoryIndex` will\n * check cache entries for a URLs ending with '/' to see if there is a hit when\n * appending the `directoryIndex` value.\n * @param {Array} [options.ignoreURLParametersMatching=[/^utm_/]] An\n * array of regex's to remove search params when looking for a cache match.\n * @param {boolean} [options.cleanURLs=true] The `cleanURLs` option will\n * check the cache for the URL with a `.html` added to the end of the end.\n * @param {workbox.precaching~urlManipulation} [options.urlManipulation]\n * This is a function that should take a URL and return an array of\n * alternative URL's that should be checked for precache matches.\n *\n * @alias workbox.precaching.addRoute\n */\nexport const addRoute = (options) => {\n if (!listenerAdded) {\n addFetchListener(options);\n listenerAdded = true;\n }\n};\n","/*\n Copyright 2019 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport {cacheNames} from 'workbox-core/_private/cacheNames.mjs';\nimport {getFriendlyURL} from 'workbox-core/_private/getFriendlyURL.mjs';\nimport {logger} from 'workbox-core/_private/logger.mjs';\nimport {getCacheKeyForURL} from './getCacheKeyForURL.mjs';\nimport '../_version.mjs';\n\n\n/**\n * Adds a `fetch` listener to the service worker that will\n * respond to\n * [network requests]{@link https://developer.mozilla.org/en-US/docs/Web/API/Service_Worker_API/Using_Service_Workers#Custom_responses_to_requests}\n * with precached assets.\n *\n * Requests for assets that aren't precached, the `FetchEvent` will not be\n * responded to, allowing the event to fall through to other `fetch` event\n * listeners.\n *\n * NOTE: when called more than once this method will replace the previously set\n * configuration options. Calling it more than once is not recommended outside\n * of tests.\n *\n * @private\n * @param {Object} options\n * @param {string} [options.directoryIndex=index.html] The `directoryIndex` will\n * check cache entries for a URLs ending with '/' to see if there is a hit when\n * appending the `directoryIndex` value.\n * @param {Array} [options.ignoreURLParametersMatching=[/^utm_/]] An\n * array of regex's to remove search params when looking for a cache match.\n * @param {boolean} [options.cleanURLs=true] The `cleanURLs` option will\n * check the cache for the URL with a `.html` added to the end of the end.\n * @param {workbox.precaching~urlManipulation} [options.urlManipulation]\n * This is a function that should take a URL and return an array of\n * alternative URL's that should be checked for precache matches.\n */\nexport const addFetchListener = ({\n ignoreURLParametersMatching = [/^utm_/],\n directoryIndex = 'index.html',\n cleanURLs = true,\n urlManipulation = null,\n} = {}) => {\n const cacheName = cacheNames.getPrecacheName();\n\n addEventListener('fetch', (event) => {\n const precachedURL = getCacheKeyForURL(event.request.url, {\n cleanURLs,\n directoryIndex,\n ignoreURLParametersMatching,\n urlManipulation,\n });\n if (!precachedURL) {\n if (process.env.NODE_ENV !== 'production') {\n logger.debug(`Precaching did not find a match for ` +\n getFriendlyURL(event.request.url));\n }\n return;\n }\n\n let responsePromise = caches.open(cacheName).then((cache) => {\n return cache.match(precachedURL);\n }).then((cachedResponse) => {\n if (cachedResponse) {\n return cachedResponse;\n }\n\n // Fall back to the network if we don't have a cached response\n // (perhaps due to manual cache cleanup).\n if (process.env.NODE_ENV !== 'production') {\n logger.warn(`The precached response for ` +\n `${getFriendlyURL(precachedURL)} in ${cacheName} was not found. ` +\n `Falling back to the network instead.`);\n }\n\n return fetch(precachedURL);\n });\n\n if (process.env.NODE_ENV !== 'production') {\n responsePromise = responsePromise.then((response) => {\n // Workbox is going to handle the route.\n // print the routing details to the console.\n logger.groupCollapsed(`Precaching is responding to: ` +\n getFriendlyURL(event.request.url));\n logger.log(`Serving the precached url: ${precachedURL}`);\n\n logger.groupCollapsed(`View request details here.`);\n logger.log(event.request);\n logger.groupEnd();\n\n logger.groupCollapsed(`View response details here.`);\n logger.log(response);\n logger.groupEnd();\n\n logger.groupEnd();\n return response;\n });\n }\n\n event.respondWith(responsePromise);\n });\n};\n","/*\n Copyright 2019 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport {logger} from 'workbox-core/_private/logger.mjs';\nimport {getOrCreatePrecacheController} from './utils/getOrCreatePrecacheController.mjs';\nimport {precachePlugins} from './utils/precachePlugins.mjs';\nimport './_version.mjs';\n\n\nconst installListener = (event) => {\n const precacheController = getOrCreatePrecacheController();\n const plugins = precachePlugins.get();\n\n event.waitUntil(\n precacheController.install({event, plugins})\n .catch((error) => {\n if (process.env.NODE_ENV !== 'production') {\n logger.error(`Service worker installation failed. It will ` +\n `be retried automatically during the next navigation.`);\n }\n // Re-throw the error to ensure installation fails.\n throw error;\n })\n );\n};\n\nconst activateListener = (event) => {\n const precacheController = getOrCreatePrecacheController();\n const plugins = precachePlugins.get();\n\n event.waitUntil(precacheController.activate({event, plugins}));\n};\n\n/**\n * Adds items to the precache list, removing any duplicates and\n * stores the files in the\n * [\"precache cache\"]{@link module:workbox-core.cacheNames} when the service\n * worker installs.\n *\n * This method can be called multiple times.\n *\n * Please note: This method **will not** serve any of the cached files for you.\n * It only precaches files. To respond to a network request you call\n * [addRoute()]{@link module:workbox-precaching.addRoute}.\n *\n * If you have a single array of files to precache, you can just call\n * [precacheAndRoute()]{@link module:workbox-precaching.precacheAndRoute}.\n *\n * @param {Array} entries Array of entries to precache.\n *\n * @alias workbox.precaching.precache\n */\nexport const precache = (entries) => {\n const precacheController = getOrCreatePrecacheController();\n precacheController.addToCacheList(entries);\n\n if (entries.length > 0) {\n // NOTE: these listeners will only be added once (even if the `precache()`\n // method is called multiple times) because event listeners are implemented\n // as a set, where each listener must be unique.\n addEventListener('install', installListener);\n addEventListener('activate', activateListener);\n }\n};\n","/*\n Copyright 2019 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport {precachePlugins} from './utils/precachePlugins.mjs';\nimport './_version.mjs';\n\n\n/**\n * Adds plugins to precaching.\n *\n * @param {Array} newPlugins\n *\n * @alias workbox.precaching.addPlugins\n */\nconst addPlugins = (newPlugins) => {\n precachePlugins.add(newPlugins);\n};\n\nexport {addPlugins};\n","/*\n Copyright 2019 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport {cacheNames} from 'workbox-core/_private/cacheNames.mjs';\nimport {logger} from 'workbox-core/_private/logger.mjs';\nimport {deleteOutdatedCaches} from './utils/deleteOutdatedCaches.mjs';\nimport './_version.mjs';\n\n\n/**\n * Adds an `activate` event listener which will clean up incompatible\n * precaches that were created by older versions of Workbox.\n *\n * @alias workbox.precaching.cleanupOutdatedCaches\n */\nexport const cleanupOutdatedCaches = () => {\n addEventListener('activate', (event) => {\n const cacheName = cacheNames.getPrecacheName();\n\n event.waitUntil(deleteOutdatedCaches(cacheName).then((cachesDeleted) => {\n if (process.env.NODE_ENV !== 'production') {\n if (cachesDeleted.length > 0) {\n logger.log(`The following out-of-date precaches were cleaned up ` +\n `automatically:`, cachesDeleted);\n }\n }\n }));\n });\n};\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport '../_version.mjs';\n\nconst SUBSTRING_TO_FIND = '-precache-';\n\n/**\n * Cleans up incompatible precaches that were created by older versions of\n * Workbox, by a service worker registered under the current scope.\n *\n * This is meant to be called as part of the `activate` event.\n *\n * This should be safe to use as long as you don't include `substringToFind`\n * (defaulting to `-precache-`) in your non-precache cache names.\n *\n * @param {string} currentPrecacheName The cache name currently in use for\n * precaching. This cache won't be deleted.\n * @param {string} [substringToFind='-precache-'] Cache names which include this\n * substring will be deleted (excluding `currentPrecacheName`).\n * @return {Array} A list of all the cache names that were deleted.\n *\n * @private\n * @memberof module:workbox-precaching\n */\nconst deleteOutdatedCaches = async (\n currentPrecacheName,\n substringToFind = SUBSTRING_TO_FIND) => {\n const cacheNames = await caches.keys();\n\n const cacheNamesToDelete = cacheNames.filter((cacheName) => {\n return cacheName.includes(substringToFind) &&\n cacheName.includes(self.registration.scope) &&\n cacheName !== currentPrecacheName;\n });\n\n await Promise.all(\n cacheNamesToDelete.map((cacheName) => caches.delete(cacheName)));\n\n return cacheNamesToDelete;\n};\n\nexport {deleteOutdatedCaches};\n\n","/*\n Copyright 2019 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport {getOrCreatePrecacheController}\n from './utils/getOrCreatePrecacheController.mjs';\nimport './_version.mjs';\n\n\n/**\n * Takes in a URL, and returns the corresponding URL that could be used to\n * lookup the entry in the precache.\n *\n * If a relative URL is provided, the location of the service worker file will\n * be used as the base.\n *\n * For precached entries without revision information, the cache key will be the\n * same as the original URL.\n *\n * For precached entries with revision information, the cache key will be the\n * original URL with the addition of a query parameter used for keeping track of\n * the revision info.\n *\n * @param {string} url The URL whose cache key to look up.\n * @return {string} The cache key that corresponds to that URL.\n *\n * @alias workbox.precaching.getCacheKeyForURL\n */\nexport const getCacheKeyForURL = (url) => {\n const precacheController = getOrCreatePrecacheController();\n return precacheController.getCacheKeyForURL(url);\n};\n","/*\n Copyright 2019 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport {addRoute} from './addRoute.mjs';\nimport {precache} from './precache.mjs';\nimport './_version.mjs';\n\n\n/**\n * This method will add entries to the precache list and add a route to\n * respond to fetch events.\n *\n * This is a convenience method that will call\n * [precache()]{@link module:workbox-precaching.precache} and\n * [addRoute()]{@link module:workbox-precaching.addRoute} in a single call.\n *\n * @param {Array} entries Array of entries to precache.\n * @param {Object} options See\n * [addRoute() options]{@link module:workbox-precaching.addRoute}.\n *\n * @alias workbox.precaching.precacheAndRoute\n */\nexport const precacheAndRoute = (entries, options) => {\n precache(entries);\n addRoute(options);\n};\n"],"names":["self","_","e","plugins","precachePlugins","get","add","newPlugins","push","REVISION_SEARCH_PARAM","createCacheKey","entry","WorkboxError","urlObject","URL","location","cacheKey","href","url","revision","originalURL","cacheKeyURL","searchParams","set","PrecacheController","constructor","cacheName","_cacheName","cacheNames","getPrecacheName","_urlsToCacheKeys","Map","addToCacheList","entries","this","has","firstEntry","secondEntry","event","urlsToPrecache","urlsAlreadyPrecached","cache","caches","open","alreadyCachedRequests","keys","alreadyCachedURLs","Set","map","request","values","precacheRequests","_addURLToCache","Promise","all","updatedURLs","notUpdatedURLs","currentlyCachedRequests","expectedCacheKeys","deletedURLs","delete","Request","credentials","cacheWillUpdateCallback","response","fetchWrapper","fetch","plugin","cacheWillUpdate","bind","status","redirected","async","clonedResponse","clone","bodyPromise","resolve","body","blob","Response","headers","statusText","cleanRedirect","cacheWrapper","put","matchOptions","ignoreSearch","getURLsToCacheKeys","getCachedURLs","getCacheKeyForURL","precacheController","getOrCreatePrecacheController","options","urlsToCacheKeys","possibleURL","ignoreURLParametersMatching","directoryIndex","cleanURLs","urlManipulation","hash","urlWithoutIgnoredParams","paramName","some","regExp","test","removeIgnoredSearchParams","pathname","endsWith","directoryURL","cleanURL","additionalURLs","urlToAttempt","generateURLVariations","possibleCacheKey","listenerAdded","addRoute","addEventListener","precachedURL","responsePromise","then","match","cachedResponse","respondWith","addFetchListener","installListener","waitUntil","install","catch","error","activateListener","activate","precache","length","currentPrecacheName","substringToFind","cacheNamesToDelete","filter","includes","registration","scope","deleteOutdatedCaches","cachesDeleted"],"mappings":"uFAAA,IAAIA,KAAK,6BAA6BC,IAAI,MAAMC,ICWhD,MAAMC,EAAU,GAEHC,EAAkB,CAK7BC,IAAG,IACMF,EAOTG,IAAIC,GACFJ,EAAQK,QAAQD,KCdpB,MAAME,EAAwB,kBAWvB,SAASC,EAAeC,OACxBA,QACG,IAAIC,eAAa,oCAAqC,CAACD,MAAAA,OAK1C,iBAAVA,EAAoB,OACvBE,EAAY,IAAIC,IAAIH,EAAOI,gBAC1B,CACLC,SAAUH,EAAUI,KACpBC,IAAKL,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GvD,MAAMmD,IAwBf/E,EAAMoF,YAAYJ,MDhElBK,CAAiB/B,GACjBsB,GAAgB,IE3BdU,EAAmBtF,UACjBoD,EAAqBC,IACrBxF,EAAUC,EAAgBC,MAEhCiC,EAAMuF,UACFnC,EAAmBoC,QAAQ,CAACxF,MAAAA,EAAOnC,QAAAA,IAC9B4H,MAAOC,UAMAA,MAKZC,EAAoB3F,UAClBoD,EAAqBC,IACrBxF,EAAUC,EAAgBC,MAEhCiC,EAAMuF,UAAUnC,EAAmBwC,SAAS,CAAC5F,MAAAA,EAAOnC,QAAAA,MAsBzCgI,EAAYlG,IACI0D,IACR3D,eAAeC,GAE9BA,EAAQmG,OAAS,IAInBhB,iBAAiB,UAAWQ,GAC5BR,iBAAiB,WAAYa,yBC/Cb1H,CAAAA,IAClBH,EAAgBE,IAAIC,0CCAe,MACnC6G,iBAAiB,WAAa9E,UACtBZ,EAAYE,aAAWC,kBAE7BS,EAAMuF,UCMmBrD,OAC3B6D,EACAC,EAtBwB,sBAyBlBC,SAFmB7F,OAAOG,QAEM2F,OAAQ9G,GACrCA,EAAU+G,SAASH,IACnB5G,EAAU+G,SAASzI,KAAK0I,aAAaC,QACrCjH,IAAc2G,gBAGjBhF,QAAQC,IACViF,EAAmBvF,IAAKtB,GAAcgB,OAAOkB,OAAOlC,KAEjD6G,GDpBWK,CAAqBlH,GAAW6F,KAAMsB,gCEQxB3H,CAAAA,WACLyE,IACDF,kBAAkBvE,qCCPd,EAACe,EAAS2D,KACxCuC,EAASlG,GACTkF,EAASvB"} \ No newline at end of file diff --git a/workbox-v4.3.1/workbox-range-requests.dev.js b/workbox-v4.3.1/workbox-range-requests.dev.js new file mode 100644 index 0000000000..2c0609dcb2 --- /dev/null +++ b/workbox-v4.3.1/workbox-range-requests.dev.js @@ -0,0 +1,268 @@ +this.workbox = this.workbox || {}; +this.workbox.rangeRequests = (function (exports, WorkboxError_mjs, assert_mjs, logger_mjs) { + 'use strict'; + + try { + self['workbox:range-requests:4.3.1'] && _(); + } catch (e) {} // eslint-disable-line + + /* + Copyright 2018 Google LLC + + Use of this source code is governed by an MIT-style + license that can be found in the LICENSE file or at + https://opensource.org/licenses/MIT. + */ + /** + * @param {Blob} blob A source blob. + * @param {number|null} start The offset to use as the start of the + * slice. + * @param {number|null} end The offset to use as the end of the slice. + * @return {Object} An object with `start` and `end` properties, reflecting + * the effective boundaries to use given the size of the blob. + * + * @private + */ + + function calculateEffectiveBoundaries(blob, start, end) { + { + assert_mjs.assert.isInstance(blob, Blob, { + moduleName: 'workbox-range-requests', + funcName: 'calculateEffectiveBoundaries', + paramName: 'blob' + }); + } + + const blobSize = blob.size; + + if (end > blobSize || start < 0) { + throw new WorkboxError_mjs.WorkboxError('range-not-satisfiable', { + size: blobSize, + end, + start + }); + } + + let effectiveStart; + let effectiveEnd; + + if (start === null) { + effectiveStart = blobSize - end; + effectiveEnd = blobSize; + } else if (end === null) { + effectiveStart = start; + effectiveEnd = blobSize; + } else { + effectiveStart = start; // Range values are inclusive, so add 1 to the value. + + effectiveEnd = end + 1; + } + + return { + start: effectiveStart, + end: effectiveEnd + }; + } + + /* + Copyright 2018 Google LLC + + Use of this source code is governed by an MIT-style + license that can be found in the LICENSE file or at + https://opensource.org/licenses/MIT. + */ + /** + * @param {string} rangeHeader A Range: header value. + * @return {Object} An object with `start` and `end` properties, reflecting + * the parsed value of the Range: header. If either the `start` or `end` are + * omitted, then `null` will be returned. + * + * @private + */ + + function parseRangeHeader(rangeHeader) { + { + assert_mjs.assert.isType(rangeHeader, 'string', { + moduleName: 'workbox-range-requests', + funcName: 'parseRangeHeader', + paramName: 'rangeHeader' + }); + } + + const normalizedRangeHeader = rangeHeader.trim().toLowerCase(); + + if (!normalizedRangeHeader.startsWith('bytes=')) { + throw new WorkboxError_mjs.WorkboxError('unit-must-be-bytes', { + normalizedRangeHeader + }); + } // Specifying multiple ranges separate by commas is valid syntax, but this + // library only attempts to handle a single, contiguous sequence of bytes. + // https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Range#Syntax + + + if (normalizedRangeHeader.includes(',')) { + throw new WorkboxError_mjs.WorkboxError('single-range-only', { + normalizedRangeHeader + }); + } + + const rangeParts = /(\d*)-(\d*)/.exec(normalizedRangeHeader); // We need either at least one of the start or end values. + + if (rangeParts === null || !(rangeParts[1] || rangeParts[2])) { + throw new WorkboxError_mjs.WorkboxError('invalid-range-values', { + normalizedRangeHeader + }); + } + + return { + start: rangeParts[1] === '' ? null : Number(rangeParts[1]), + end: rangeParts[2] === '' ? null : Number(rangeParts[2]) + }; + } + + /* + Copyright 2018 Google LLC + + Use of this source code is governed by an MIT-style + license that can be found in the LICENSE file or at + https://opensource.org/licenses/MIT. + */ + /** + * Given a `Request` and `Response` objects as input, this will return a + * promise for a new `Response`. + * + * If the original `Response` already contains partial content (i.e. it has + * a status of 206), then this assumes it already fulfills the `Range:` + * requirements, and will return it as-is. + * + * @param {Request} request A request, which should contain a Range: + * header. + * @param {Response} originalResponse A response. + * @return {Promise} Either a `206 Partial Content` response, with + * the response body set to the slice of content specified by the request's + * `Range:` header, or a `416 Range Not Satisfiable` response if the + * conditions of the `Range:` header can't be met. + * + * @memberof workbox.rangeRequests + */ + + async function createPartialResponse(request, originalResponse) { + try { + { + assert_mjs.assert.isInstance(request, Request, { + moduleName: 'workbox-range-requests', + funcName: 'createPartialResponse', + paramName: 'request' + }); + assert_mjs.assert.isInstance(originalResponse, Response, { + moduleName: 'workbox-range-requests', + funcName: 'createPartialResponse', + paramName: 'originalResponse' + }); + } + + if (originalResponse.status === 206) { + // If we already have a 206, then just pass it through as-is; + // see https://github.com/GoogleChrome/workbox/issues/1720 + return originalResponse; + } + + const rangeHeader = request.headers.get('range'); + + if (!rangeHeader) { + throw new WorkboxError_mjs.WorkboxError('no-range-header'); + } + + const boundaries = parseRangeHeader(rangeHeader); + const originalBlob = await originalResponse.blob(); + const effectiveBoundaries = calculateEffectiveBoundaries(originalBlob, boundaries.start, boundaries.end); + const slicedBlob = originalBlob.slice(effectiveBoundaries.start, effectiveBoundaries.end); + const slicedBlobSize = slicedBlob.size; + const slicedResponse = new Response(slicedBlob, { + // Status code 206 is for a Partial Content response. + // See https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/206 + status: 206, + statusText: 'Partial Content', + headers: originalResponse.headers + }); + slicedResponse.headers.set('Content-Length', slicedBlobSize); + slicedResponse.headers.set('Content-Range', `bytes ${effectiveBoundaries.start}-${effectiveBoundaries.end - 1}/` + originalBlob.size); + return slicedResponse; + } catch (error) { + { + logger_mjs.logger.warn(`Unable to construct a partial response; returning a ` + `416 Range Not Satisfiable response instead.`); + logger_mjs.logger.groupCollapsed(`View details here.`); + logger_mjs.logger.log(error); + logger_mjs.logger.log(request); + logger_mjs.logger.log(originalResponse); + logger_mjs.logger.groupEnd(); + } + + return new Response('', { + status: 416, + statusText: 'Range Not Satisfiable' + }); + } + } + + /* + Copyright 2018 Google LLC + + Use of this source code is governed by an MIT-style + license that can be found in the LICENSE file or at + https://opensource.org/licenses/MIT. + */ + /** + * The range request plugin makes it easy for a request with a 'Range' header to + * be fulfilled by a cached response. + * + * It does this by intercepting the `cachedResponseWillBeUsed` plugin callback + * and returning the appropriate subset of the cached response body. + * + * @memberof workbox.rangeRequests + */ + + class Plugin { + /** + * @param {Object} options + * @param {Request} options.request The original request, which may or may not + * contain a Range: header. + * @param {Response} options.cachedResponse The complete cached response. + * @return {Promise} If request contains a 'Range' header, then a + * new response with status 206 whose body is a subset of `cachedResponse` is + * returned. Otherwise, `cachedResponse` is returned as-is. + * + * @private + */ + async cachedResponseWillBeUsed({ + request, + cachedResponse + }) { + // Only return a sliced response if there's something valid in the cache, + // and there's a Range: header in the request. + if (cachedResponse && request.headers.has('range')) { + return await createPartialResponse(request, cachedResponse); + } // If there was no Range: header, or if cachedResponse wasn't valid, just + // pass it through as-is. + + + return cachedResponse; + } + + } + + /* + Copyright 2018 Google LLC + + Use of this source code is governed by an MIT-style + license that can be found in the LICENSE file or at + https://opensource.org/licenses/MIT. + */ + + exports.createPartialResponse = createPartialResponse; + exports.Plugin = Plugin; + + return exports; + +}({}, workbox.core._private, workbox.core._private, workbox.core._private)); +//# sourceMappingURL=workbox-range-requests.dev.js.map diff --git a/workbox-v4.3.1/workbox-range-requests.dev.js.map b/workbox-v4.3.1/workbox-range-requests.dev.js.map new file mode 100644 index 0000000000..c1779fca59 --- /dev/null +++ b/workbox-v4.3.1/workbox-range-requests.dev.js.map @@ -0,0 +1 @@ +{"version":3,"file":"workbox-range-requests.dev.js","sources":["../_version.mjs","../utils/calculateEffectiveBoundaries.mjs","../utils/parseRangeHeader.mjs","../createPartialResponse.mjs","../Plugin.mjs","../index.mjs"],"sourcesContent":["try{self['workbox:range-requests:4.3.1']&&_()}catch(e){}// eslint-disable-line","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport {WorkboxError} from 'workbox-core/_private/WorkboxError.mjs';\nimport {assert} from 'workbox-core/_private/assert.mjs';\n\nimport '../_version.mjs';\n\n/**\n * @param {Blob} blob A source blob.\n * @param {number|null} start The offset to use as the start of the\n * slice.\n * @param {number|null} end The offset to use as the end of the slice.\n * @return {Object} An object with `start` and `end` properties, reflecting\n * the effective boundaries to use given the size of the blob.\n *\n * @private\n */\nfunction calculateEffectiveBoundaries(blob, start, end) {\n if (process.env.NODE_ENV !== 'production') {\n assert.isInstance(blob, Blob, {\n moduleName: 'workbox-range-requests',\n funcName: 'calculateEffectiveBoundaries',\n paramName: 'blob',\n });\n }\n\n const blobSize = blob.size;\n\n if (end > blobSize || start < 0) {\n throw new WorkboxError('range-not-satisfiable', {\n size: blobSize,\n end,\n start,\n });\n }\n\n let effectiveStart;\n let effectiveEnd;\n\n if (start === null) {\n effectiveStart = blobSize - end;\n effectiveEnd = blobSize;\n } else if (end === null) {\n effectiveStart = start;\n effectiveEnd = blobSize;\n } else {\n effectiveStart = start;\n // Range values are inclusive, so add 1 to the value.\n effectiveEnd = end + 1;\n }\n\n return {\n start: effectiveStart,\n end: effectiveEnd,\n };\n}\n\nexport {calculateEffectiveBoundaries};\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport {WorkboxError} from 'workbox-core/_private/WorkboxError.mjs';\nimport {assert} from 'workbox-core/_private/assert.mjs';\n\nimport '../_version.mjs';\n\n/**\n * @param {string} rangeHeader A Range: header value.\n * @return {Object} An object with `start` and `end` properties, reflecting\n * the parsed value of the Range: header. If either the `start` or `end` are\n * omitted, then `null` will be returned.\n *\n * @private\n */\nfunction parseRangeHeader(rangeHeader) {\n if (process.env.NODE_ENV !== 'production') {\n assert.isType(rangeHeader, 'string', {\n moduleName: 'workbox-range-requests',\n funcName: 'parseRangeHeader',\n paramName: 'rangeHeader',\n });\n }\n\n const normalizedRangeHeader = rangeHeader.trim().toLowerCase();\n if (!normalizedRangeHeader.startsWith('bytes=')) {\n throw new WorkboxError('unit-must-be-bytes', {normalizedRangeHeader});\n }\n\n // Specifying multiple ranges separate by commas is valid syntax, but this\n // library only attempts to handle a single, contiguous sequence of bytes.\n // https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Range#Syntax\n if (normalizedRangeHeader.includes(',')) {\n throw new WorkboxError('single-range-only', {normalizedRangeHeader});\n }\n\n const rangeParts = /(\\d*)-(\\d*)/.exec(normalizedRangeHeader);\n // We need either at least one of the start or end values.\n if (rangeParts === null || !(rangeParts[1] || rangeParts[2])) {\n throw new WorkboxError('invalid-range-values', {normalizedRangeHeader});\n }\n\n return {\n start: rangeParts[1] === '' ? null : Number(rangeParts[1]),\n end: rangeParts[2] === '' ? null : Number(rangeParts[2]),\n };\n}\n\nexport {parseRangeHeader};\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport {WorkboxError} from 'workbox-core/_private/WorkboxError.mjs';\nimport {assert} from 'workbox-core/_private/assert.mjs';\nimport {logger} from 'workbox-core/_private/logger.mjs';\n\nimport {calculateEffectiveBoundaries} from\n './utils/calculateEffectiveBoundaries.mjs';\nimport {parseRangeHeader} from './utils/parseRangeHeader.mjs';\n\nimport './_version.mjs';\n\n/**\n * Given a `Request` and `Response` objects as input, this will return a\n * promise for a new `Response`.\n *\n * If the original `Response` already contains partial content (i.e. it has\n * a status of 206), then this assumes it already fulfills the `Range:`\n * requirements, and will return it as-is.\n *\n * @param {Request} request A request, which should contain a Range:\n * header.\n * @param {Response} originalResponse A response.\n * @return {Promise} Either a `206 Partial Content` response, with\n * the response body set to the slice of content specified by the request's\n * `Range:` header, or a `416 Range Not Satisfiable` response if the\n * conditions of the `Range:` header can't be met.\n *\n * @memberof workbox.rangeRequests\n */\nasync function createPartialResponse(request, originalResponse) {\n try {\n if (process.env.NODE_ENV !== 'production') {\n assert.isInstance(request, Request, {\n moduleName: 'workbox-range-requests',\n funcName: 'createPartialResponse',\n paramName: 'request',\n });\n\n assert.isInstance(originalResponse, Response, {\n moduleName: 'workbox-range-requests',\n funcName: 'createPartialResponse',\n paramName: 'originalResponse',\n });\n }\n\n if (originalResponse.status === 206) {\n // If we already have a 206, then just pass it through as-is;\n // see https://github.com/GoogleChrome/workbox/issues/1720\n return originalResponse;\n }\n\n const rangeHeader = request.headers.get('range');\n if (!rangeHeader) {\n throw new WorkboxError('no-range-header');\n }\n\n const boundaries = parseRangeHeader(rangeHeader);\n const originalBlob = await originalResponse.blob();\n\n const effectiveBoundaries = calculateEffectiveBoundaries(\n originalBlob, boundaries.start, boundaries.end);\n\n const slicedBlob = originalBlob.slice(effectiveBoundaries.start,\n effectiveBoundaries.end);\n const slicedBlobSize = slicedBlob.size;\n\n const slicedResponse = new Response(slicedBlob, {\n // Status code 206 is for a Partial Content response.\n // See https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/206\n status: 206,\n statusText: 'Partial Content',\n headers: originalResponse.headers,\n });\n\n slicedResponse.headers.set('Content-Length', slicedBlobSize);\n slicedResponse.headers.set('Content-Range',\n `bytes ${effectiveBoundaries.start}-${effectiveBoundaries.end - 1}/` +\n originalBlob.size);\n\n return slicedResponse;\n } catch (error) {\n if (process.env.NODE_ENV !== 'production') {\n logger.warn(`Unable to construct a partial response; returning a ` +\n `416 Range Not Satisfiable response instead.`);\n logger.groupCollapsed(`View details here.`);\n logger.log(error);\n logger.log(request);\n logger.log(originalResponse);\n logger.groupEnd();\n }\n\n return new Response('', {\n status: 416,\n statusText: 'Range Not Satisfiable',\n });\n }\n}\n\nexport {createPartialResponse};\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport {createPartialResponse} from './createPartialResponse.mjs';\n\nimport './_version.mjs';\n\n/**\n * The range request plugin makes it easy for a request with a 'Range' header to\n * be fulfilled by a cached response.\n *\n * It does this by intercepting the `cachedResponseWillBeUsed` plugin callback\n * and returning the appropriate subset of the cached response body.\n *\n * @memberof workbox.rangeRequests\n */\nclass Plugin {\n /**\n * @param {Object} options\n * @param {Request} options.request The original request, which may or may not\n * contain a Range: header.\n * @param {Response} options.cachedResponse The complete cached response.\n * @return {Promise} If request contains a 'Range' header, then a\n * new response with status 206 whose body is a subset of `cachedResponse` is\n * returned. Otherwise, `cachedResponse` is returned as-is.\n *\n * @private\n */\n async cachedResponseWillBeUsed({request, cachedResponse}) {\n // Only return a sliced response if there's something valid in the cache,\n // and there's a Range: header in the request.\n if (cachedResponse && request.headers.has('range')) {\n return await createPartialResponse(request, cachedResponse);\n }\n\n // If there was no Range: header, or if cachedResponse wasn't valid, just\n // pass it through as-is.\n return cachedResponse;\n }\n}\n\nexport {Plugin};\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport {createPartialResponse} from './createPartialResponse.mjs';\nimport {Plugin} from './Plugin.mjs';\nimport './_version.mjs';\n\n\n/**\n * @namespace workbox.rangeRequests\n */\n\nexport {\n createPartialResponse,\n Plugin,\n};\n"],"names":["self","_","e","calculateEffectiveBoundaries","blob","start","end","assert","isInstance","Blob","moduleName","funcName","paramName","blobSize","size","WorkboxError","effectiveStart","effectiveEnd","parseRangeHeader","rangeHeader","isType","normalizedRangeHeader","trim","toLowerCase","startsWith","includes","rangeParts","exec","Number","createPartialResponse","request","originalResponse","Request","Response","status","headers","get","boundaries","originalBlob","effectiveBoundaries","slicedBlob","slice","slicedBlobSize","slicedResponse","statusText","set","error","logger","warn","groupCollapsed","log","groupEnd","Plugin","cachedResponseWillBeUsed","cachedResponse","has"],"mappings":";;;;EAAA,IAAG;EAACA,EAAAA,IAAI,CAAC,8BAAD,CAAJ,IAAsCC,CAAC,EAAvC;EAA0C,CAA9C,CAA8C,OAAMC,CAAN,EAAQ;;ECAtD;;;;;;;AAQA,EAKA;;;;;;;;;;;EAUA,SAASC,4BAAT,CAAsCC,IAAtC,EAA4CC,KAA5C,EAAmDC,GAAnD,EAAwD;EACtD,EAA2C;EACzCC,IAAAA,iBAAM,CAACC,UAAP,CAAkBJ,IAAlB,EAAwBK,IAAxB,EAA8B;EAC5BC,MAAAA,UAAU,EAAE,wBADgB;EAE5BC,MAAAA,QAAQ,EAAE,8BAFkB;EAG5BC,MAAAA,SAAS,EAAE;EAHiB,KAA9B;EAKD;;EAED,QAAMC,QAAQ,GAAGT,IAAI,CAACU,IAAtB;;EAEA,MAAIR,GAAG,GAAGO,QAAN,IAAkBR,KAAK,GAAG,CAA9B,EAAiC;EAC/B,UAAM,IAAIU,6BAAJ,CAAiB,uBAAjB,EAA0C;EAC9CD,MAAAA,IAAI,EAAED,QADwC;EAE9CP,MAAAA,GAF8C;EAG9CD,MAAAA;EAH8C,KAA1C,CAAN;EAKD;;EAED,MAAIW,cAAJ;EACA,MAAIC,YAAJ;;EAEA,MAAIZ,KAAK,KAAK,IAAd,E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,MAAAA,MAAM,EAAE,GADc;EAEtBU,MAAAA,UAAU,EAAE;EAFU,KAAjB,CAAP;EAID;EACF;;ECvGD;;;;;;;AAQA,EAIA;;;;;;;;;;EASA,MAAMQ,MAAN,CAAa;EACX;;;;;;;;;;;EAWA,QAAMC,wBAAN,CAA+B;EAACvB,IAAAA,OAAD;EAAUwB,IAAAA;EAAV,GAA/B,EAA0D;EACxD;EACA;EACA,QAAIA,cAAc,IAAIxB,OAAO,CAACK,OAAR,CAAgBoB,GAAhB,CAAoB,OAApB,CAAtB,EAAoD;EAClD,aAAO,MAAM1B,qBAAqB,CAACC,OAAD,EAAUwB,cAAV,CAAlC;EACD,KALuD;EAQxD;;;EACA,WAAOA,cAAP;EACD;;EAtBU;;ECrBb;;;;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/workbox-v4.3.1/workbox-range-requests.prod.js b/workbox-v4.3.1/workbox-range-requests.prod.js new file mode 100644 index 0000000000..e60370cb94 --- /dev/null +++ b/workbox-v4.3.1/workbox-range-requests.prod.js @@ -0,0 +1,2 @@ +this.workbox=this.workbox||{},this.workbox.rangeRequests=function(e,n){"use strict";try{self["workbox:range-requests:4.3.1"]&&_()}catch(e){}async function t(e,t){try{if(206===t.status)return t;const s=e.headers.get("range");if(!s)throw new n.WorkboxError("no-range-header");const a=function(e){const t=e.trim().toLowerCase();if(!t.startsWith("bytes="))throw new n.WorkboxError("unit-must-be-bytes",{normalizedRangeHeader:t});if(t.includes(","))throw new n.WorkboxError("single-range-only",{normalizedRangeHeader:t});const s=/(\d*)-(\d*)/.exec(t);if(null===s||!s[1]&&!s[2])throw new n.WorkboxError("invalid-range-values",{normalizedRangeHeader:t});return{start:""===s[1]?null:Number(s[1]),end:""===s[2]?null:Number(s[2])}}(s),r=await t.blob(),i=function(e,t,s){const a=e.size;if(s>a||t<0)throw new n.WorkboxError("range-not-satisfiable",{size:a,end:s,start:t});let r,i;return null===t?(r=a-s,i=a):null===s?(r=t,i=a):(r=t,i=s+1),{start:r,end:i}}(r,a.start,a.end),o=r.slice(i.start,i.end),u=o.size,l=new Response(o,{status:206,statusText:"Partial Content",headers:t.headers});return l.headers.set("Content-Length",u),l.headers.set("Content-Range",`bytes ${i.start}-${i.end-1}/`+r.size),l}catch(e){return new Response("",{status:416,statusText:"Range Not Satisfiable"})}}return e.createPartialResponse=t,e.Plugin=class{async cachedResponseWillBeUsed({request:e,cachedResponse:n}){return n&&e.headers.has("range")?await t(e,n):n}},e}({},workbox.core._private); +//# sourceMappingURL=workbox-range-requests.prod.js.map diff --git a/workbox-v4.3.1/workbox-range-requests.prod.js.map b/workbox-v4.3.1/workbox-range-requests.prod.js.map new file mode 100644 index 0000000000..89bef82721 --- /dev/null +++ b/workbox-v4.3.1/workbox-range-requests.prod.js.map @@ -0,0 +1 @@ +{"version":3,"file":"workbox-range-requests.prod.js","sources":["../_version.mjs","../createPartialResponse.mjs","../utils/parseRangeHeader.mjs","../utils/calculateEffectiveBoundaries.mjs","../Plugin.mjs"],"sourcesContent":["try{self['workbox:range-requests:4.3.1']&&_()}catch(e){}// eslint-disable-line","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport {WorkboxError} from 'workbox-core/_private/WorkboxError.mjs';\nimport {assert} from 'workbox-core/_private/assert.mjs';\nimport {logger} from 'workbox-core/_private/logger.mjs';\n\nimport {calculateEffectiveBoundaries} from\n './utils/calculateEffectiveBoundaries.mjs';\nimport {parseRangeHeader} from './utils/parseRangeHeader.mjs';\n\nimport './_version.mjs';\n\n/**\n * Given a `Request` and `Response` objects as input, this will return a\n * promise for a new `Response`.\n *\n * If the original `Response` already contains partial content (i.e. it has\n * a status of 206), then this assumes it already fulfills the `Range:`\n * requirements, and will return it as-is.\n *\n * @param {Request} request A request, which should contain a Range:\n * header.\n * @param {Response} originalResponse A response.\n * @return {Promise} Either a `206 Partial Content` response, with\n * the response body set to the slice of content specified by the request's\n * `Range:` header, or a `416 Range Not Satisfiable` response if the\n * conditions of the `Range:` header can't be met.\n *\n * @memberof workbox.rangeRequests\n */\nasync function createPartialResponse(request, originalResponse) {\n try {\n if (process.env.NODE_ENV !== 'production') {\n assert.isInstance(request, Request, {\n moduleName: 'workbox-range-requests',\n funcName: 'createPartialResponse',\n paramName: 'request',\n });\n\n assert.isInstance(originalResponse, Response, {\n moduleName: 'workbox-range-requests',\n funcName: 'createPartialResponse',\n paramName: 'originalResponse',\n });\n }\n\n if (originalResponse.status === 206) {\n // If we already have a 206, then just pass it through as-is;\n // see https://github.com/GoogleChrome/workbox/issues/1720\n return originalResponse;\n }\n\n const rangeHeader = request.headers.get('range');\n if (!rangeHeader) {\n throw new WorkboxError('no-range-header');\n }\n\n const boundaries = parseRangeHeader(rangeHeader);\n const originalBlob = await originalResponse.blob();\n\n const effectiveBoundaries = calculateEffectiveBoundaries(\n originalBlob, boundaries.start, boundaries.end);\n\n const slicedBlob = originalBlob.slice(effectiveBoundaries.start,\n effectiveBoundaries.end);\n const slicedBlobSize = slicedBlob.size;\n\n const slicedResponse = new Response(slicedBlob, {\n // Status code 206 is for a Partial Content response.\n // See https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/206\n status: 206,\n statusText: 'Partial Content',\n headers: originalResponse.headers,\n });\n\n slicedResponse.headers.set('Content-Length', slicedBlobSize);\n slicedResponse.headers.set('Content-Range',\n `bytes ${effectiveBoundaries.start}-${effectiveBoundaries.end - 1}/` +\n originalBlob.size);\n\n return slicedResponse;\n } catch (error) {\n if (process.env.NODE_ENV !== 'production') {\n logger.warn(`Unable to construct a partial response; returning a ` +\n `416 Range Not Satisfiable response instead.`);\n logger.groupCollapsed(`View details here.`);\n logger.log(error);\n logger.log(request);\n logger.log(originalResponse);\n logger.groupEnd();\n }\n\n return new Response('', {\n status: 416,\n statusText: 'Range Not Satisfiable',\n });\n }\n}\n\nexport {createPartialResponse};\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport {WorkboxError} from 'workbox-core/_private/WorkboxError.mjs';\nimport {assert} from 'workbox-core/_private/assert.mjs';\n\nimport '../_version.mjs';\n\n/**\n * @param {string} rangeHeader A Range: header value.\n * @return {Object} An object with `start` and `end` properties, reflecting\n * the parsed value of the Range: header. If either the `start` or `end` are\n * omitted, then `null` will be returned.\n *\n * @private\n */\nfunction parseRangeHeader(rangeHeader) {\n if (process.env.NODE_ENV !== 'production') {\n assert.isType(rangeHeader, 'string', {\n moduleName: 'workbox-range-requests',\n funcName: 'parseRangeHeader',\n paramName: 'rangeHeader',\n });\n }\n\n const normalizedRangeHeader = rangeHeader.trim().toLowerCase();\n if (!normalizedRangeHeader.startsWith('bytes=')) {\n throw new WorkboxError('unit-must-be-bytes', {normalizedRangeHeader});\n }\n\n // Specifying multiple ranges separate by commas is valid syntax, but this\n // library only attempts to handle a single, contiguous sequence of bytes.\n // https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Range#Syntax\n if (normalizedRangeHeader.includes(',')) {\n throw new WorkboxError('single-range-only', {normalizedRangeHeader});\n }\n\n const rangeParts = /(\\d*)-(\\d*)/.exec(normalizedRangeHeader);\n // We need either at least one of the start or end values.\n if (rangeParts === null || !(rangeParts[1] || rangeParts[2])) {\n throw new WorkboxError('invalid-range-values', {normalizedRangeHeader});\n }\n\n return {\n start: rangeParts[1] === '' ? null : Number(rangeParts[1]),\n end: rangeParts[2] === '' ? null : Number(rangeParts[2]),\n };\n}\n\nexport {parseRangeHeader};\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport {WorkboxError} from 'workbox-core/_private/WorkboxError.mjs';\nimport {assert} from 'workbox-core/_private/assert.mjs';\n\nimport '../_version.mjs';\n\n/**\n * @param {Blob} blob A source blob.\n * @param {number|null} start The offset to use as the start of the\n * slice.\n * @param {number|null} end The offset to use as the end of the slice.\n * @return {Object} An object with `start` and `end` properties, reflecting\n * the effective boundaries to use given the size of the blob.\n *\n * @private\n */\nfunction calculateEffectiveBoundaries(blob, start, end) {\n if (process.env.NODE_ENV !== 'production') {\n assert.isInstance(blob, Blob, {\n moduleName: 'workbox-range-requests',\n funcName: 'calculateEffectiveBoundaries',\n paramName: 'blob',\n });\n }\n\n const blobSize = blob.size;\n\n if (end > blobSize || start < 0) {\n throw new WorkboxError('range-not-satisfiable', {\n size: blobSize,\n end,\n start,\n });\n }\n\n let effectiveStart;\n let effectiveEnd;\n\n if (start === null) {\n effectiveStart = blobSize - end;\n effectiveEnd = blobSize;\n } else if (end === null) {\n effectiveStart = start;\n effectiveEnd = blobSize;\n } else {\n effectiveStart = start;\n // Range values are inclusive, so add 1 to the value.\n effectiveEnd = end + 1;\n }\n\n return {\n start: effectiveStart,\n end: effectiveEnd,\n };\n}\n\nexport {calculateEffectiveBoundaries};\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport {createPartialResponse} from './createPartialResponse.mjs';\n\nimport './_version.mjs';\n\n/**\n * The range request plugin makes it easy for a request with a 'Range' header to\n * be fulfilled by a cached response.\n *\n * It does this by intercepting the `cachedResponseWillBeUsed` plugin callback\n * and returning the appropriate subset of the cached response body.\n *\n * @memberof workbox.rangeRequests\n */\nclass Plugin {\n /**\n * @param {Object} options\n * @param {Request} options.request The original request, which may or may not\n * contain a Range: header.\n * @param {Response} options.cachedResponse The complete cached response.\n * @return {Promise} If request contains a 'Range' header, then a\n * new response with status 206 whose body is a subset of `cachedResponse` is\n * returned. Otherwise, `cachedResponse` is returned as-is.\n *\n * @private\n */\n async cachedResponseWillBeUsed({request, cachedResponse}) {\n // Only return a sliced response if there's something valid in the cache,\n // and there's a Range: header in the request.\n if (cachedResponse && request.headers.has('range')) {\n return await createPartialResponse(request, cachedResponse);\n }\n\n // If there was no Range: header, or if cachedResponse wasn't valid, just\n // pass it through as-is.\n return cachedResponse;\n }\n}\n\nexport {Plugin};\n"],"names":["self","_","e","async","createPartialResponse","request","originalResponse","status","rangeHeader","headers","get","WorkboxError","boundaries","normalizedRangeHeader","trim","toLowerCase","startsWith","includes","rangeParts","exec","start","Number","end","parseRangeHeader","originalBlob","blob","effectiveBoundaries","blobSize","size","effectiveStart","effectiveEnd","calculateEffectiveBoundaries","slicedBlob","slice","slicedBlobSize","slicedResponse","Response","statusText","set","error","cachedResponse","has"],"mappings":"oFAAA,IAAIA,KAAK,iCAAiCC,IAAI,MAAMC,ICoCpDC,eAAeC,EAAsBC,EAASC,UAgBV,MAA5BA,EAAiBC,cAGZD,QAGHE,EAAcH,EAAQI,QAAQC,IAAI,aACnCF,QACG,IAAIG,eAAa,yBAGnBC,EC1CV,SAA0BJ,SASlBK,EAAwBL,EAAYM,OAAOC,kBAC5CF,EAAsBG,WAAW,gBAC9B,IAAIL,eAAa,qBAAsB,CAACE,sBAAAA,OAM5CA,EAAsBI,SAAS,WAC3B,IAAIN,eAAa,oBAAqB,CAACE,sBAAAA,UAGzCK,EAAa,cAAcC,KAAKN,MAEnB,OAAfK,IAAyBA,EAAW,KAAMA,EAAW,SACjD,IAAIP,eAAa,uBAAwB,CAACE,sBAAAA,UAG3C,CACLO,MAAyB,KAAlBF,EAAW,GAAY,KAAOG,OAAOH,EAAW,IACvDI,IAAuB,KAAlBJ,EAAW,GAAY,KAAOG,OAAOH,EAAW,KDalCK,CAAiBf,GAC9BgB,QAAqBlB,EAAiBmB,OAEtCC,EE3CV,SAAsCD,EAAML,EAAOE,SAS3CK,EAAWF,EAAKG,QAElBN,EAAMK,GAAYP,EAAQ,QACtB,IAAIT,eAAa,wBAAyB,CAC9CiB,KAAMD,EACNL,IAAAA,EACAF,MAAAA,QAIAS,EACAC,SAEU,OAAVV,GACFS,EAAiBF,EAAWL,EAC5BQ,EAAeH,GACE,OAARL,GACTO,EAAiBT,EACjBU,EAAeH,IAEfE,EAAiBT,EAEjBU,EAAeR,EAAM,GAGhB,CACLF,MAAOS,EACPP,IAAKQ,GFOuBC,CACxBP,EAAcZ,EAAWQ,MAAOR,EAAWU,KAEzCU,EAAaR,EAAaS,MAAMP,EAAoBN,MACtDM,EAAoBJ,KAClBY,EAAiBF,EAAWJ,KAE5BO,EAAiB,IAAIC,SAASJ,EAAY,CAG9CzB,OAAQ,IACR8B,WAAY,kBACZ5B,QAASH,EAAiBG,iBAG5B0B,EAAe1B,QAAQ6B,IAAI,iBAAkBJ,GAC7CC,EAAe1B,QAAQ6B,IAAI,yBACdZ,EAAoBN,SAASM,EAAoBJ,IAAM,KAClEE,EAAaI,MAERO,EACP,MAAOI,UAWA,IAAIH,SAAS,GAAI,CACtB7B,OAAQ,IACR8B,WAAY,qEG/ElB,sCAYiChC,QAACA,EAADmC,eAAUA,WAGnCA,GAAkBnC,EAAQI,QAAQgC,IAAI,eAC3BrC,EAAsBC,EAASmC,GAKvCA"} \ No newline at end of file diff --git a/workbox-v4.3.1/workbox-routing.dev.js b/workbox-v4.3.1/workbox-routing.dev.js new file mode 100644 index 0000000000..b3acf069a4 --- /dev/null +++ b/workbox-v4.3.1/workbox-routing.dev.js @@ -0,0 +1,1020 @@ +this.workbox = this.workbox || {}; +this.workbox.routing = (function (exports, assert_mjs, logger_mjs, cacheNames_mjs, WorkboxError_mjs, getFriendlyURL_mjs) { + 'use strict'; + + try { + self['workbox:routing:4.3.1'] && _(); + } catch (e) {} // eslint-disable-line + + /* + Copyright 2018 Google LLC + + Use of this source code is governed by an MIT-style + license that can be found in the LICENSE file or at + https://opensource.org/licenses/MIT. + */ + /** + * The default HTTP method, 'GET', used when there's no specific method + * configured for a route. + * + * @type {string} + * + * @private + */ + + const defaultMethod = 'GET'; + /** + * The list of valid HTTP methods associated with requests that could be routed. + * + * @type {Array} + * + * @private + */ + + const validMethods = ['DELETE', 'GET', 'HEAD', 'PATCH', 'POST', 'PUT']; + + /* + Copyright 2018 Google LLC + + Use of this source code is governed by an MIT-style + license that can be found in the LICENSE file or at + https://opensource.org/licenses/MIT. + */ + /** + * @param {function()|Object} handler Either a function, or an object with a + * 'handle' method. + * @return {Object} An object with a handle method. + * + * @private + */ + + const normalizeHandler = handler => { + if (handler && typeof handler === 'object') { + { + assert_mjs.assert.hasMethod(handler, 'handle', { + moduleName: 'workbox-routing', + className: 'Route', + funcName: 'constructor', + paramName: 'handler' + }); + } + + return handler; + } else { + { + assert_mjs.assert.isType(handler, 'function', { + moduleName: 'workbox-routing', + className: 'Route', + funcName: 'constructor', + paramName: 'handler' + }); + } + + return { + handle: handler + }; + } + }; + + /* + Copyright 2018 Google LLC + + Use of this source code is governed by an MIT-style + license that can be found in the LICENSE file or at + https://opensource.org/licenses/MIT. + */ + /** + * A `Route` consists of a pair of callback functions, "match" and "handler". + * The "match" callback determine if a route should be used to "handle" a + * request by returning a non-falsy value if it can. The "handler" callback + * is called when there is a match and should return a Promise that resolves + * to a `Response`. + * + * @memberof workbox.routing + */ + + class Route { + /** + * Constructor for Route class. + * + * @param {workbox.routing.Route~matchCallback} match + * A callback function that determines whether the route matches a given + * `fetch` event by returning a non-falsy value. + * @param {workbox.routing.Route~handlerCallback} handler A callback + * function that returns a Promise resolving to a Response. + * @param {string} [method='GET'] The HTTP method to match the Route + * against. + */ + constructor(match, handler, method) { + { + assert_mjs.assert.isType(match, 'function', { + moduleName: 'workbox-routing', + className: 'Route', + funcName: 'constructor', + paramName: 'match' + }); + + if (method) { + assert_mjs.assert.isOneOf(method, validMethods, { + paramName: 'method' + }); + } + } // These values are referenced directly by Router so cannot be + // altered by minifification. + + + this.handler = normalizeHandler(handler); + this.match = match; + this.method = method || defaultMethod; + } + + } + + /* + Copyright 2018 Google LLC + + Use of this source code is governed by an MIT-style + license that can be found in the LICENSE file or at + https://opensource.org/licenses/MIT. + */ + /** + * NavigationRoute makes it easy to create a [Route]{@link + * workbox.routing.Route} that matches for browser + * [navigation requests]{@link https://developers.google.com/web/fundamentals/primers/service-workers/high-performance-loading#first_what_are_navigation_requests}. + * + * It will only match incoming Requests whose + * [`mode`]{@link https://fetch.spec.whatwg.org/#concept-request-mode} + * is set to `navigate`. + * + * You can optionally only apply this route to a subset of navigation requests + * by using one or both of the `blacklist` and `whitelist` parameters. + * + * @memberof workbox.routing + * @extends workbox.routing.Route + */ + + class NavigationRoute extends Route { + /** + * If both `blacklist` and `whiltelist` are provided, the `blacklist` will + * take precedence and the request will not match this route. + * + * The regular expressions in `whitelist` and `blacklist` + * are matched against the concatenated + * [`pathname`]{@link https://developer.mozilla.org/en-US/docs/Web/API/HTMLHyperlinkElementUtils/pathname} + * and [`search`]{@link https://developer.mozilla.org/en-US/docs/Web/API/HTMLHyperlinkElementUtils/search} + * portions of the requested URL. + * + * @param {workbox.routing.Route~handlerCallback} handler A callback + * function that returns a Promise resulting in a Response. + * @param {Object} options + * @param {Array} [options.blacklist] If any of these patterns match, + * the route will not handle the request (even if a whitelist RegExp matches). + * @param {Array} [options.whitelist=[/./]] If any of these patterns + * match the URL's pathname and search parameter, the route will handle the + * request (assuming the blacklist doesn't match). + */ + constructor(handler, { + whitelist = [/./], + blacklist = [] + } = {}) { + { + assert_mjs.assert.isArrayOfClass(whitelist, RegExp, { + moduleName: 'workbox-routing', + className: 'NavigationRoute', + funcName: 'constructor', + paramName: 'options.whitelist' + }); + assert_mjs.assert.isArrayOfClass(blacklist, RegExp, { + moduleName: 'workbox-routing', + className: 'NavigationRoute', + funcName: 'constructor', + paramName: 'options.blacklist' + }); + } + + super(options => this._match(options), handler); + this._whitelist = whitelist; + this._blacklist = blacklist; + } + /** + * Routes match handler. + * + * @param {Object} options + * @param {URL} options.url + * @param {Request} options.request + * @return {boolean} + * + * @private + */ + + + _match({ + url, + request + }) { + if (request.mode !== 'navigate') { + return false; + } + + const pathnameAndSearch = url.pathname + url.search; + + for (const regExp of this._blacklist) { + if (regExp.test(pathnameAndSearch)) { + { + logger_mjs.logger.log(`The navigation route is not being used, since the ` + `URL matches this blacklist pattern: ${regExp}`); + } + + return false; + } + } + + if (this._whitelist.some(regExp => regExp.test(pathnameAndSearch))) { + { + logger_mjs.logger.debug(`The navigation route is being used.`); + } + + return true; + } + + { + logger_mjs.logger.log(`The navigation route is not being used, since the URL ` + `being navigated to doesn't match the whitelist.`); + } + + return false; + } + + } + + /* + Copyright 2018 Google LLC + + Use of this source code is governed by an MIT-style + license that can be found in the LICENSE file or at + https://opensource.org/licenses/MIT. + */ + /** + * RegExpRoute makes it easy to create a regular expression based + * [Route]{@link workbox.routing.Route}. + * + * For same-origin requests the RegExp only needs to match part of the URL. For + * requests against third-party servers, you must define a RegExp that matches + * the start of the URL. + * + * [See the module docs for info.]{@link https://developers.google.com/web/tools/workbox/modules/workbox-routing} + * + * @memberof workbox.routing + * @extends workbox.routing.Route + */ + + class RegExpRoute extends Route { + /** + * If the regulard expression contains + * [capture groups]{@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp#grouping-back-references}, + * th ecaptured values will be passed to the + * [handler's]{@link workbox.routing.Route~handlerCallback} `params` + * argument. + * + * @param {RegExp} regExp The regular expression to match against URLs. + * @param {workbox.routing.Route~handlerCallback} handler A callback + * function that returns a Promise resulting in a Response. + * @param {string} [method='GET'] The HTTP method to match the Route + * against. + */ + constructor(regExp, handler, method) { + { + assert_mjs.assert.isInstance(regExp, RegExp, { + moduleName: 'workbox-routing', + className: 'RegExpRoute', + funcName: 'constructor', + paramName: 'pattern' + }); + } + + const match = ({ + url + }) => { + const result = regExp.exec(url.href); // Return null immediately if there's no match. + + if (!result) { + return null; + } // Require that the match start at the first character in the URL string + // if it's a cross-origin request. + // See https://github.com/GoogleChrome/workbox/issues/281 for the context + // behind this behavior. + + + if (url.origin !== location.origin && result.index !== 0) { + { + logger_mjs.logger.debug(`The regular expression '${regExp}' only partially matched ` + `against the cross-origin URL '${url}'. RegExpRoute's will only ` + `handle cross-origin requests if they match the entire URL.`); + } + + return null; + } // If the route matches, but there aren't any capture groups defined, then + // this will return [], which is truthy and therefore sufficient to + // indicate a match. + // If there are capture groups, then it will return their values. + + + return result.slice(1); + }; + + super(match, handler, method); + } + + } + + /* + Copyright 2018 Google LLC + + Use of this source code is governed by an MIT-style + license that can be found in the LICENSE file or at + https://opensource.org/licenses/MIT. + */ + /** + * The Router can be used to process a FetchEvent through one or more + * [Routes]{@link workbox.routing.Route} responding with a Request if + * a matching route exists. + * + * If no route matches a given a request, the Router will use a "default" + * handler if one is defined. + * + * Should the matching Route throw an error, the Router will use a "catch" + * handler if one is defined to gracefully deal with issues and respond with a + * Request. + * + * If a request matches multiple routes, the **earliest** registered route will + * be used to respond to the request. + * + * @memberof workbox.routing + */ + + class Router { + /** + * Initializes a new Router. + */ + constructor() { + this._routes = new Map(); + } + /** + * @return {Map>} routes A `Map` of HTTP + * method name ('GET', etc.) to an array of all the corresponding `Route` + * instances that are registered. + */ + + + get routes() { + return this._routes; + } + /** + * Adds a fetch event listener to respond to events when a route matches + * the event's request. + */ + + + addFetchListener() { + self.addEventListener('fetch', event => { + const { + request + } = event; + const responsePromise = this.handleRequest({ + request, + event + }); + + if (responsePromise) { + event.respondWith(responsePromise); + } + }); + } + /** + * Adds a message event listener for URLs to cache from the window. + * This is useful to cache resources loaded on the page prior to when the + * service worker started controlling it. + * + * The format of the message data sent from the window should be as follows. + * Where the `urlsToCache` array may consist of URL strings or an array of + * URL string + `requestInit` object (the same as you'd pass to `fetch()`). + * + * ``` + * { + * type: 'CACHE_URLS', + * payload: { + * urlsToCache: [ + * './script1.js', + * './script2.js', + * ['./script3.js', {mode: 'no-cors'}], + * ], + * }, + * } + * ``` + */ + + + addCacheListener() { + self.addEventListener('message', async event => { + if (event.data && event.data.type === 'CACHE_URLS') { + const { + payload + } = event.data; + + { + logger_mjs.logger.debug(`Caching URLs from the window`, payload.urlsToCache); + } + + const requestPromises = Promise.all(payload.urlsToCache.map(entry => { + if (typeof entry === 'string') { + entry = [entry]; + } + + const request = new Request(...entry); + return this.handleRequest({ + request + }); + })); + event.waitUntil(requestPromises); // If a MessageChannel was used, reply to the message on success. + + if (event.ports && event.ports[0]) { + await requestPromises; + event.ports[0].postMessage(true); + } + } + }); + } + /** + * Apply the routing rules to a FetchEvent object to get a Response from an + * appropriate Route's handler. + * + * @param {Object} options + * @param {Request} options.request The request to handle (this is usually + * from a fetch event, but it does not have to be). + * @param {FetchEvent} [options.event] The event that triggered the request, + * if applicable. + * @return {Promise|undefined} A promise is returned if a + * registered route can handle the request. If there is no matching + * route and there's no `defaultHandler`, `undefined` is returned. + */ + + + handleRequest({ + request, + event + }) { + { + assert_mjs.assert.isInstance(request, Request, { + moduleName: 'workbox-routing', + className: 'Router', + funcName: 'handleRequest', + paramName: 'options.request' + }); + } + + const url = new URL(request.url, location); + + if (!url.protocol.startsWith('http')) { + { + logger_mjs.logger.debug(`Workbox Router only supports URLs that start with 'http'.`); + } + + return; + } + + let { + params, + route + } = this.findMatchingRoute({ + url, + request, + event + }); + let handler = route && route.handler; + let debugMessages = []; + + { + if (handler) { + debugMessages.push([`Found a route to handle this request:`, route]); + + if (params) { + debugMessages.push([`Passing the following params to the route's handler:`, params]); + } + } + } // If we don't have a handler because there was no matching route, then + // fall back to defaultHandler if that's defined. + + + if (!handler && this._defaultHandler) { + { + debugMessages.push(`Failed to find a matching route. Falling ` + `back to the default handler.`); // This is used for debugging in logs in the case of an error. + + route = '[Default Handler]'; + } + + handler = this._defaultHandler; + } + + if (!handler) { + { + // No handler so Workbox will do nothing. If logs is set of debug + // i.e. verbose, we should print out this information. + logger_mjs.logger.debug(`No route found for: ${getFriendlyURL_mjs.getFriendlyURL(url)}`); + } + + return; + } + + { + // We have a handler, meaning Workbox is going to handle the route. + // print the routing details to the console. + logger_mjs.logger.groupCollapsed(`Router is responding to: ${getFriendlyURL_mjs.getFriendlyURL(url)}`); + debugMessages.forEach(msg => { + if (Array.isArray(msg)) { + logger_mjs.logger.log(...msg); + } else { + logger_mjs.logger.log(msg); + } + }); // The Request and Response objects contains a great deal of information, + // hide it under a group in case developers want to see it. + + logger_mjs.logger.groupCollapsed(`View request details here.`); + logger_mjs.logger.log(request); + logger_mjs.logger.groupEnd(); + logger_mjs.logger.groupEnd(); + } // Wrap in try and catch in case the handle method throws a synchronous + // error. It should still callback to the catch handler. + + + let responsePromise; + + try { + responsePromise = handler.handle({ + url, + request, + event, + params + }); + } catch (err) { + responsePromise = Promise.reject(err); + } + + if (responsePromise && this._catchHandler) { + responsePromise = responsePromise.catch(err => { + { + // Still include URL here as it will be async from the console group + // and may not make sense without the URL + logger_mjs.logger.groupCollapsed(`Error thrown when responding to: ` + ` ${getFriendlyURL_mjs.getFriendlyURL(url)}. Falling back to Catch Handler.`); + logger_mjs.logger.error(`Error thrown by:`, route); + logger_mjs.logger.error(err); + logger_mjs.logger.groupEnd(); + } + + return this._catchHandler.handle({ + url, + event, + err + }); + }); + } + + return responsePromise; + } + /** + * Checks a request and URL (and optionally an event) against the list of + * registered routes, and if there's a match, returns the corresponding + * route along with any params generated by the match. + * + * @param {Object} options + * @param {URL} options.url + * @param {Request} options.request The request to match. + * @param {FetchEvent} [options.event] The corresponding event (unless N/A). + * @return {Object} An object with `route` and `params` properties. + * They are populated if a matching route was found or `undefined` + * otherwise. + */ + + + findMatchingRoute({ + url, + request, + event + }) { + { + assert_mjs.assert.isInstance(url, URL, { + moduleName: 'workbox-routing', + className: 'Router', + funcName: 'findMatchingRoute', + paramName: 'options.url' + }); + assert_mjs.assert.isInstance(request, Request, { + moduleName: 'workbox-routing', + className: 'Router', + funcName: 'findMatchingRoute', + paramName: 'options.request' + }); + } + + const routes = this._routes.get(request.method) || []; + + for (const route of routes) { + let params; + let matchResult = route.match({ + url, + request, + event + }); + + if (matchResult) { + if (Array.isArray(matchResult) && matchResult.length > 0) { + // Instead of passing an empty array in as params, use undefined. + params = matchResult; + } else if (matchResult.constructor === Object && Object.keys(matchResult).length > 0) { + // Instead of passing an empty object in as params, use undefined. + params = matchResult; + } // Return early if have a match. + + + return { + route, + params + }; + } + } // If no match was found above, return and empty object. + + + return {}; + } + /** + * Define a default `handler` that's called when no routes explicitly + * match the incoming request. + * + * Without a default handler, unmatched requests will go against the + * network as if there were no service worker present. + * + * @param {workbox.routing.Route~handlerCallback} handler A callback + * function that returns a Promise resulting in a Response. + */ + + + setDefaultHandler(handler) { + this._defaultHandler = normalizeHandler(handler); + } + /** + * If a Route throws an error while handling a request, this `handler` + * will be called and given a chance to provide a response. + * + * @param {workbox.routing.Route~handlerCallback} handler A callback + * function that returns a Promise resulting in a Response. + */ + + + setCatchHandler(handler) { + this._catchHandler = normalizeHandler(handler); + } + /** + * Registers a route with the router. + * + * @param {workbox.routing.Route} route The route to register. + */ + + + registerRoute(route) { + { + assert_mjs.assert.isType(route, 'object', { + moduleName: 'workbox-routing', + className: 'Router', + funcName: 'registerRoute', + paramName: 'route' + }); + assert_mjs.assert.hasMethod(route, 'match', { + moduleName: 'workbox-routing', + className: 'Router', + funcName: 'registerRoute', + paramName: 'route' + }); + assert_mjs.assert.isType(route.handler, 'object', { + moduleName: 'workbox-routing', + className: 'Router', + funcName: 'registerRoute', + paramName: 'route' + }); + assert_mjs.assert.hasMethod(route.handler, 'handle', { + moduleName: 'workbox-routing', + className: 'Router', + funcName: 'registerRoute', + paramName: 'route.handler' + }); + assert_mjs.assert.isType(route.method, 'string', { + moduleName: 'workbox-routing', + className: 'Router', + funcName: 'registerRoute', + paramName: 'route.method' + }); + } + + if (!this._routes.has(route.method)) { + this._routes.set(route.method, []); + } // Give precedence to all of the earlier routes by adding this additional + // route to the end of the array. + + + this._routes.get(route.method).push(route); + } + /** + * Unregisters a route with the router. + * + * @param {workbox.routing.Route} route The route to unregister. + */ + + + unregisterRoute(route) { + if (!this._routes.has(route.method)) { + throw new WorkboxError_mjs.WorkboxError('unregister-route-but-not-found-with-method', { + method: route.method + }); + } + + const routeIndex = this._routes.get(route.method).indexOf(route); + + if (routeIndex > -1) { + this._routes.get(route.method).splice(routeIndex, 1); + } else { + throw new WorkboxError_mjs.WorkboxError('unregister-route-route-not-registered'); + } + } + + } + + /* + Copyright 2019 Google LLC + + Use of this source code is governed by an MIT-style + license that can be found in the LICENSE file or at + https://opensource.org/licenses/MIT. + */ + let defaultRouter; + /** + * Creates a new, singleton Router instance if one does not exist. If one + * does already exist, that instance is returned. + * + * @private + * @return {Router} + */ + + const getOrCreateDefaultRouter = () => { + if (!defaultRouter) { + defaultRouter = new Router(); // The helpers that use the default Router assume these listeners exist. + + defaultRouter.addFetchListener(); + defaultRouter.addCacheListener(); + } + + return defaultRouter; + }; + + /* + Copyright 2019 Google LLC + + Use of this source code is governed by an MIT-style + license that can be found in the LICENSE file or at + https://opensource.org/licenses/MIT. + */ + /** + * Registers a route that will return a precached file for a navigation + * request. This is useful for the + * [application shell pattern]{@link https://developers.google.com/web/fundamentals/architecture/app-shell}. + * + * When determining the URL of the precached HTML document, you will likely need + * to call `workbox.precaching.getCacheKeyForURL(originalUrl)`, to account for + * the fact that Workbox's precaching naming conventions often results in URL + * cache keys that contain extra revisioning info. + * + * This method will generate a + * [NavigationRoute]{@link workbox.routing.NavigationRoute} + * and call + * [Router.registerRoute()]{@link workbox.routing.Router#registerRoute} on a + * singleton Router instance. + * + * @param {string} cachedAssetUrl The cache key to use for the HTML file. + * @param {Object} [options] + * @param {string} [options.cacheName] Cache name to store and retrieve + * requests. Defaults to precache cache name provided by + * [workbox-core.cacheNames]{@link workbox.core.cacheNames}. + * @param {Array} [options.blacklist=[]] If any of these patterns + * match, the route will not handle the request (even if a whitelist entry + * matches). + * @param {Array} [options.whitelist=[/./]] If any of these patterns + * match the URL's pathname and search parameter, the route will handle the + * request (assuming the blacklist doesn't match). + * @return {workbox.routing.NavigationRoute} Returns the generated + * Route. + * + * @alias workbox.routing.registerNavigationRoute + */ + + const registerNavigationRoute = (cachedAssetUrl, options = {}) => { + { + assert_mjs.assert.isType(cachedAssetUrl, 'string', { + moduleName: 'workbox-routing', + funcName: 'registerNavigationRoute', + paramName: 'cachedAssetUrl' + }); + } + + const cacheName = cacheNames_mjs.cacheNames.getPrecacheName(options.cacheName); + + const handler = async () => { + try { + const response = await caches.match(cachedAssetUrl, { + cacheName + }); + + if (response) { + return response; + } // This shouldn't normally happen, but there are edge cases: + // https://github.com/GoogleChrome/workbox/issues/1441 + + + throw new Error(`The cache ${cacheName} did not have an entry for ` + `${cachedAssetUrl}.`); + } catch (error) { + // If there's either a cache miss, or the caches.match() call threw + // an exception, then attempt to fulfill the navigation request with + // a response from the network rather than leaving the user with a + // failed navigation. + { + logger_mjs.logger.debug(`Unable to respond to navigation request with ` + `cached response. Falling back to network.`, error); + } // This might still fail if the browser is offline... + + + return fetch(cachedAssetUrl); + } + }; + + const route = new NavigationRoute(handler, { + whitelist: options.whitelist, + blacklist: options.blacklist + }); + const defaultRouter = getOrCreateDefaultRouter(); + defaultRouter.registerRoute(route); + return route; + }; + + /* + Copyright 2019 Google LLC + + Use of this source code is governed by an MIT-style + license that can be found in the LICENSE file or at + https://opensource.org/licenses/MIT. + */ + /** + * Easily register a RegExp, string, or function with a caching + * strategy to a singleton Router instance. + * + * This method will generate a Route for you if needed and + * call [Router.registerRoute()]{@link + * workbox.routing.Router#registerRoute}. + * + * @param { + * RegExp| + * string| + * workbox.routing.Route~matchCallback| + * workbox.routing.Route + * } capture + * If the capture param is a `Route`, all other arguments will be ignored. + * @param {workbox.routing.Route~handlerCallback} handler A callback + * function that returns a Promise resulting in a Response. + * @param {string} [method='GET'] The HTTP method to match the Route + * against. + * @return {workbox.routing.Route} The generated `Route`(Useful for + * unregistering). + * + * @alias workbox.routing.registerRoute + */ + + const registerRoute = (capture, handler, method = 'GET') => { + let route; + + if (typeof capture === 'string') { + const captureUrl = new URL(capture, location); + + { + if (!(capture.startsWith('/') || capture.startsWith('http'))) { + throw new WorkboxError_mjs.WorkboxError('invalid-string', { + moduleName: 'workbox-routing', + funcName: 'registerRoute', + paramName: 'capture' + }); + } // We want to check if Express-style wildcards are in the pathname only. + // TODO: Remove this log message in v4. + + + const valueToCheck = capture.startsWith('http') ? captureUrl.pathname : capture; // See https://github.com/pillarjs/path-to-regexp#parameters + + const wildcards = '[*:?+]'; + + if (valueToCheck.match(new RegExp(`${wildcards}`))) { + logger_mjs.logger.debug(`The '$capture' parameter contains an Express-style wildcard ` + `character (${wildcards}). Strings are now always interpreted as ` + `exact matches; use a RegExp for partial or wildcard matches.`); + } + } + + const matchCallback = ({ + url + }) => { + { + if (url.pathname === captureUrl.pathname && url.origin !== captureUrl.origin) { + logger_mjs.logger.debug(`${capture} only partially matches the cross-origin URL ` + `${url}. This route will only handle cross-origin requests ` + `if they match the entire URL.`); + } + } + + return url.href === captureUrl.href; + }; + + route = new Route(matchCallback, handler, method); + } else if (capture instanceof RegExp) { + route = new RegExpRoute(capture, handler, method); + } else if (typeof capture === 'function') { + route = new Route(capture, handler, method); + } else if (capture instanceof Route) { + route = capture; + } else { + throw new WorkboxError_mjs.WorkboxError('unsupported-route-type', { + moduleName: 'workbox-routing', + funcName: 'registerRoute', + paramName: 'capture' + }); + } + + const defaultRouter = getOrCreateDefaultRouter(); + defaultRouter.registerRoute(route); + return route; + }; + + /* + Copyright 2019 Google LLC + + Use of this source code is governed by an MIT-style + license that can be found in the LICENSE file or at + https://opensource.org/licenses/MIT. + */ + /** + * If a Route throws an error while handling a request, this `handler` + * will be called and given a chance to provide a response. + * + * @param {workbox.routing.Route~handlerCallback} handler A callback + * function that returns a Promise resulting in a Response. + * + * @alias workbox.routing.setCatchHandler + */ + + const setCatchHandler = handler => { + const defaultRouter = getOrCreateDefaultRouter(); + defaultRouter.setCatchHandler(handler); + }; + + /* + Copyright 2019 Google LLC + + Use of this source code is governed by an MIT-style + license that can be found in the LICENSE file or at + https://opensource.org/licenses/MIT. + */ + /** + * Define a default `handler` that's called when no routes explicitly + * match the incoming request. + * + * Without a default handler, unmatched requests will go against the + * network as if there were no service worker present. + * + * @param {workbox.routing.Route~handlerCallback} handler A callback + * function that returns a Promise resulting in a Response. + * + * @alias workbox.routing.setDefaultHandler + */ + + const setDefaultHandler = handler => { + const defaultRouter = getOrCreateDefaultRouter(); + defaultRouter.setDefaultHandler(handler); + }; + + /* + Copyright 2018 Google LLC + + Use of this source code is governed by an MIT-style + license that can be found in the LICENSE file or at + https://opensource.org/licenses/MIT. + */ + + { + assert_mjs.assert.isSWEnv('workbox-routing'); + } + + exports.NavigationRoute = NavigationRoute; + exports.RegExpRoute = RegExpRoute; + exports.registerNavigationRoute = registerNavigationRoute; + exports.registerRoute = registerRoute; + exports.Route = Route; + exports.Router = Router; + exports.setCatchHandler = setCatchHandler; + exports.setDefaultHandler = setDefaultHandler; + + return exports; + +}({}, workbox.core._private, workbox.core._private, workbox.core._private, workbox.core._private, workbox.core._private)); +//# sourceMappingURL=workbox-routing.dev.js.map diff --git a/workbox-v4.3.1/workbox-routing.dev.js.map b/workbox-v4.3.1/workbox-routing.dev.js.map new file mode 100644 index 0000000000..7107132241 --- /dev/null +++ b/workbox-v4.3.1/workbox-routing.dev.js.map @@ -0,0 +1 @@ +{"version":3,"file":"workbox-routing.dev.js","sources":["../_version.mjs","../utils/constants.mjs","../utils/normalizeHandler.mjs","../Route.mjs","../NavigationRoute.mjs","../RegExpRoute.mjs","../Router.mjs","../utils/getOrCreateDefaultRouter.mjs","../registerNavigationRoute.mjs","../registerRoute.mjs","../setCatchHandler.mjs","../setDefaultHandler.mjs","../index.mjs"],"sourcesContent":["try{self['workbox:routing:4.3.1']&&_()}catch(e){}// eslint-disable-line","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport '../_version.mjs';\n\n/**\n * The default HTTP method, 'GET', used when there's no specific method\n * configured for a route.\n *\n * @type {string}\n *\n * @private\n */\nexport const defaultMethod = 'GET';\n\n/**\n * The list of valid HTTP methods associated with requests that could be routed.\n *\n * @type {Array}\n *\n * @private\n */\nexport const validMethods = [\n 'DELETE',\n 'GET',\n 'HEAD',\n 'PATCH',\n 'POST',\n 'PUT',\n];\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport {assert} from 'workbox-core/_private/assert.mjs';\nimport '../_version.mjs';\n\n/**\n * @param {function()|Object} handler Either a function, or an object with a\n * 'handle' method.\n * @return {Object} An object with a handle method.\n *\n * @private\n */\nexport const normalizeHandler = (handler) => {\n if (handler && typeof handler === 'object') {\n if (process.env.NODE_ENV !== 'production') {\n assert.hasMethod(handler, 'handle', {\n moduleName: 'workbox-routing',\n className: 'Route',\n funcName: 'constructor',\n paramName: 'handler',\n });\n }\n return handler;\n } else {\n if (process.env.NODE_ENV !== 'production') {\n assert.isType(handler, 'function', {\n moduleName: 'workbox-routing',\n className: 'Route',\n funcName: 'constructor',\n paramName: 'handler',\n });\n }\n return {handle: handler};\n }\n};\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport {assert} from 'workbox-core/_private/assert.mjs';\n\nimport {defaultMethod, validMethods} from './utils/constants.mjs';\nimport {normalizeHandler} from './utils/normalizeHandler.mjs';\nimport './_version.mjs';\n\n/**\n * A `Route` consists of a pair of callback functions, \"match\" and \"handler\".\n * The \"match\" callback determine if a route should be used to \"handle\" a\n * request by returning a non-falsy value if it can. The \"handler\" callback\n * is called when there is a match and should return a Promise that resolves\n * to a `Response`.\n *\n * @memberof workbox.routing\n */\nclass Route {\n /**\n * Constructor for Route class.\n *\n * @param {workbox.routing.Route~matchCallback} match\n * A callback function that determines whether the route matches a given\n * `fetch` event by returning a non-falsy value.\n * @param {workbox.routing.Route~handlerCallback} handler A callback\n * function that returns a Promise resolving to a Response.\n * @param {string} [method='GET'] The HTTP method to match the Route\n * against.\n */\n constructor(match, handler, method) {\n if (process.env.NODE_ENV !== 'production') {\n assert.isType(match, 'function', {\n moduleName: 'workbox-routing',\n className: 'Route',\n funcName: 'constructor',\n paramName: 'match',\n });\n\n if (method) {\n assert.isOneOf(method, validMethods, {paramName: 'method'});\n }\n }\n\n // These values are referenced directly by Router so cannot be\n // altered by minifification.\n this.handler = normalizeHandler(handler);\n this.match = match;\n this.method = method || defaultMethod;\n }\n}\n\nexport {Route};\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport {assert} from 'workbox-core/_private/assert.mjs';\nimport {logger} from 'workbox-core/_private/logger.mjs';\nimport {Route} from './Route.mjs';\nimport './_version.mjs';\n\n/**\n * NavigationRoute makes it easy to create a [Route]{@link\n * workbox.routing.Route} that matches for browser\n * [navigation requests]{@link https://developers.google.com/web/fundamentals/primers/service-workers/high-performance-loading#first_what_are_navigation_requests}.\n *\n * It will only match incoming Requests whose\n * [`mode`]{@link https://fetch.spec.whatwg.org/#concept-request-mode}\n * is set to `navigate`.\n *\n * You can optionally only apply this route to a subset of navigation requests\n * by using one or both of the `blacklist` and `whitelist` parameters.\n *\n * @memberof workbox.routing\n * @extends workbox.routing.Route\n */\nclass NavigationRoute extends Route {\n /**\n * If both `blacklist` and `whiltelist` are provided, the `blacklist` will\n * take precedence and the request will not match this route.\n *\n * The regular expressions in `whitelist` and `blacklist`\n * are matched against the concatenated\n * [`pathname`]{@link https://developer.mozilla.org/en-US/docs/Web/API/HTMLHyperlinkElementUtils/pathname}\n * and [`search`]{@link https://developer.mozilla.org/en-US/docs/Web/API/HTMLHyperlinkElementUtils/search}\n * portions of the requested URL.\n *\n * @param {workbox.routing.Route~handlerCallback} handler A callback\n * function that returns a Promise resulting in a Response.\n * @param {Object} options\n * @param {Array} [options.blacklist] If any of these patterns match,\n * the route will not handle the request (even if a whitelist RegExp matches).\n * @param {Array} [options.whitelist=[/./]] If any of these patterns\n * match the URL's pathname and search parameter, the route will handle the\n * request (assuming the blacklist doesn't match).\n */\n constructor(handler, {whitelist = [/./], blacklist = []} = {}) {\n if (process.env.NODE_ENV !== 'production') {\n assert.isArrayOfClass(whitelist, RegExp, {\n moduleName: 'workbox-routing',\n className: 'NavigationRoute',\n funcName: 'constructor',\n paramName: 'options.whitelist',\n });\n assert.isArrayOfClass(blacklist, RegExp, {\n moduleName: 'workbox-routing',\n className: 'NavigationRoute',\n funcName: 'constructor',\n paramName: 'options.blacklist',\n });\n }\n\n super((options) => this._match(options), handler);\n\n this._whitelist = whitelist;\n this._blacklist = blacklist;\n }\n\n /**\n * Routes match handler.\n *\n * @param {Object} options\n * @param {URL} options.url\n * @param {Request} options.request\n * @return {boolean}\n *\n * @private\n */\n _match({url, request}) {\n if (request.mode !== 'navigate') {\n return false;\n }\n\n const pathnameAndSearch = url.pathname + url.search;\n\n for (const regExp of this._blacklist) {\n if (regExp.test(pathnameAndSearch)) {\n if (process.env.NODE_ENV !== 'production') {\n logger.log(`The navigation route is not being used, since the ` +\n `URL matches this blacklist pattern: ${regExp}`);\n }\n return false;\n }\n }\n\n if (this._whitelist.some((regExp) => regExp.test(pathnameAndSearch))) {\n if (process.env.NODE_ENV !== 'production') {\n logger.debug(`The navigation route is being used.`);\n }\n return true;\n }\n\n if (process.env.NODE_ENV !== 'production') {\n logger.log(`The navigation route is not being used, since the URL ` +\n `being navigated to doesn't match the whitelist.`);\n }\n return false;\n }\n}\n\nexport {NavigationRoute};\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport {assert} from 'workbox-core/_private/assert.mjs';\nimport {logger} from 'workbox-core/_private/logger.mjs';\nimport {Route} from './Route.mjs';\nimport './_version.mjs';\n\n/**\n * RegExpRoute makes it easy to create a regular expression based\n * [Route]{@link workbox.routing.Route}.\n *\n * For same-origin requests the RegExp only needs to match part of the URL. For\n * requests against third-party servers, you must define a RegExp that matches\n * the start of the URL.\n *\n * [See the module docs for info.]{@link https://developers.google.com/web/tools/workbox/modules/workbox-routing}\n *\n * @memberof workbox.routing\n * @extends workbox.routing.Route\n */\nclass RegExpRoute extends Route {\n /**\n * If the regulard expression contains\n * [capture groups]{@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp#grouping-back-references},\n * th ecaptured values will be passed to the\n * [handler's]{@link workbox.routing.Route~handlerCallback} `params`\n * argument.\n *\n * @param {RegExp} regExp The regular expression to match against URLs.\n * @param {workbox.routing.Route~handlerCallback} handler A callback\n * function that returns a Promise resulting in a Response.\n * @param {string} [method='GET'] The HTTP method to match the Route\n * against.\n */\n constructor(regExp, handler, method) {\n if (process.env.NODE_ENV !== 'production') {\n assert.isInstance(regExp, RegExp, {\n moduleName: 'workbox-routing',\n className: 'RegExpRoute',\n funcName: 'constructor',\n paramName: 'pattern',\n });\n }\n\n const match = ({url}) => {\n const result = regExp.exec(url.href);\n\n // Return null immediately if there's no match.\n if (!result) {\n return null;\n }\n\n // Require that the match start at the first character in the URL string\n // if it's a cross-origin request.\n // See https://github.com/GoogleChrome/workbox/issues/281 for the context\n // behind this behavior.\n if ((url.origin !== location.origin) && (result.index !== 0)) {\n if (process.env.NODE_ENV !== 'production') {\n logger.debug(\n `The regular expression '${regExp}' only partially matched ` +\n `against the cross-origin URL '${url}'. RegExpRoute's will only ` +\n `handle cross-origin requests if they match the entire URL.`\n );\n }\n\n return null;\n }\n\n // If the route matches, but there aren't any capture groups defined, then\n // this will return [], which is truthy and therefore sufficient to\n // indicate a match.\n // If there are capture groups, then it will return their values.\n return result.slice(1);\n };\n\n super(match, handler, method);\n }\n}\n\nexport {RegExpRoute};\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport {assert} from 'workbox-core/_private/assert.mjs';\nimport {logger} from 'workbox-core/_private/logger.mjs';\nimport {WorkboxError} from 'workbox-core/_private/WorkboxError.mjs';\nimport {getFriendlyURL} from 'workbox-core/_private/getFriendlyURL.mjs';\n\nimport {normalizeHandler} from './utils/normalizeHandler.mjs';\nimport './_version.mjs';\n\n/**\n * The Router can be used to process a FetchEvent through one or more\n * [Routes]{@link workbox.routing.Route} responding with a Request if\n * a matching route exists.\n *\n * If no route matches a given a request, the Router will use a \"default\"\n * handler if one is defined.\n *\n * Should the matching Route throw an error, the Router will use a \"catch\"\n * handler if one is defined to gracefully deal with issues and respond with a\n * Request.\n *\n * If a request matches multiple routes, the **earliest** registered route will\n * be used to respond to the request.\n *\n * @memberof workbox.routing\n */\nclass Router {\n /**\n * Initializes a new Router.\n */\n constructor() {\n this._routes = new Map();\n }\n\n /**\n * @return {Map>} routes A `Map` of HTTP\n * method name ('GET', etc.) to an array of all the corresponding `Route`\n * instances that are registered.\n */\n get routes() {\n return this._routes;\n }\n\n /**\n * Adds a fetch event listener to respond to events when a route matches\n * the event's request.\n */\n addFetchListener() {\n self.addEventListener('fetch', (event) => {\n const {request} = event;\n const responsePromise = this.handleRequest({request, event});\n if (responsePromise) {\n event.respondWith(responsePromise);\n }\n });\n }\n\n /**\n * Adds a message event listener for URLs to cache from the window.\n * This is useful to cache resources loaded on the page prior to when the\n * service worker started controlling it.\n *\n * The format of the message data sent from the window should be as follows.\n * Where the `urlsToCache` array may consist of URL strings or an array of\n * URL string + `requestInit` object (the same as you'd pass to `fetch()`).\n *\n * ```\n * {\n * type: 'CACHE_URLS',\n * payload: {\n * urlsToCache: [\n * './script1.js',\n * './script2.js',\n * ['./script3.js', {mode: 'no-cors'}],\n * ],\n * },\n * }\n * ```\n */\n addCacheListener() {\n self.addEventListener('message', async (event) => {\n if (event.data && event.data.type === 'CACHE_URLS') {\n const {payload} = event.data;\n\n if (process.env.NODE_ENV !== 'production') {\n logger.debug(`Caching URLs from the window`, payload.urlsToCache);\n }\n\n const requestPromises = Promise.all(payload.urlsToCache.map((entry) => {\n if (typeof entry === 'string') {\n entry = [entry];\n }\n\n const request = new Request(...entry);\n return this.handleRequest({request});\n }));\n\n event.waitUntil(requestPromises);\n\n // If a MessageChannel was used, reply to the message on success.\n if (event.ports && event.ports[0]) {\n await requestPromises;\n event.ports[0].postMessage(true);\n }\n }\n });\n }\n\n /**\n * Apply the routing rules to a FetchEvent object to get a Response from an\n * appropriate Route's handler.\n *\n * @param {Object} options\n * @param {Request} options.request The request to handle (this is usually\n * from a fetch event, but it does not have to be).\n * @param {FetchEvent} [options.event] The event that triggered the request,\n * if applicable.\n * @return {Promise|undefined} A promise is returned if a\n * registered route can handle the request. If there is no matching\n * route and there's no `defaultHandler`, `undefined` is returned.\n */\n handleRequest({request, event}) {\n if (process.env.NODE_ENV !== 'production') {\n assert.isInstance(request, Request, {\n moduleName: 'workbox-routing',\n className: 'Router',\n funcName: 'handleRequest',\n paramName: 'options.request',\n });\n }\n\n const url = new URL(request.url, location);\n if (!url.protocol.startsWith('http')) {\n if (process.env.NODE_ENV !== 'production') {\n logger.debug(\n `Workbox Router only supports URLs that start with 'http'.`);\n }\n return;\n }\n\n let {params, route} = this.findMatchingRoute({url, request, event});\n let handler = route && route.handler;\n\n let debugMessages = [];\n if (process.env.NODE_ENV !== 'production') {\n if (handler) {\n debugMessages.push([\n `Found a route to handle this request:`, route,\n ]);\n\n if (params) {\n debugMessages.push([\n `Passing the following params to the route's handler:`, params,\n ]);\n }\n }\n }\n\n // If we don't have a handler because there was no matching route, then\n // fall back to defaultHandler if that's defined.\n if (!handler && this._defaultHandler) {\n if (process.env.NODE_ENV !== 'production') {\n debugMessages.push(`Failed to find a matching route. Falling ` +\n `back to the default handler.`);\n\n // This is used for debugging in logs in the case of an error.\n route = '[Default Handler]';\n }\n handler = this._defaultHandler;\n }\n\n if (!handler) {\n if (process.env.NODE_ENV !== 'production') {\n // No handler so Workbox will do nothing. If logs is set of debug\n // i.e. verbose, we should print out this information.\n logger.debug(`No route found for: ${getFriendlyURL(url)}`);\n }\n return;\n }\n\n if (process.env.NODE_ENV !== 'production') {\n // We have a handler, meaning Workbox is going to handle the route.\n // print the routing details to the console.\n logger.groupCollapsed(`Router is responding to: ${getFriendlyURL(url)}`);\n debugMessages.forEach((msg) => {\n if (Array.isArray(msg)) {\n logger.log(...msg);\n } else {\n logger.log(msg);\n }\n });\n\n // The Request and Response objects contains a great deal of information,\n // hide it under a group in case developers want to see it.\n logger.groupCollapsed(`View request details here.`);\n logger.log(request);\n logger.groupEnd();\n\n logger.groupEnd();\n }\n\n // Wrap in try and catch in case the handle method throws a synchronous\n // error. It should still callback to the catch handler.\n let responsePromise;\n try {\n responsePromise = handler.handle({url, request, event, params});\n } catch (err) {\n responsePromise = Promise.reject(err);\n }\n\n if (responsePromise && this._catchHandler) {\n responsePromise = responsePromise.catch((err) => {\n if (process.env.NODE_ENV !== 'production') {\n // Still include URL here as it will be async from the console group\n // and may not make sense without the URL\n logger.groupCollapsed(`Error thrown when responding to: ` +\n ` ${getFriendlyURL(url)}. Falling back to Catch Handler.`);\n logger.error(`Error thrown by:`, route);\n logger.error(err);\n logger.groupEnd();\n }\n return this._catchHandler.handle({url, event, err});\n });\n }\n\n return responsePromise;\n }\n\n /**\n * Checks a request and URL (and optionally an event) against the list of\n * registered routes, and if there's a match, returns the corresponding\n * route along with any params generated by the match.\n *\n * @param {Object} options\n * @param {URL} options.url\n * @param {Request} options.request The request to match.\n * @param {FetchEvent} [options.event] The corresponding event (unless N/A).\n * @return {Object} An object with `route` and `params` properties.\n * They are populated if a matching route was found or `undefined`\n * otherwise.\n */\n findMatchingRoute({url, request, event}) {\n if (process.env.NODE_ENV !== 'production') {\n assert.isInstance(url, URL, {\n moduleName: 'workbox-routing',\n className: 'Router',\n funcName: 'findMatchingRoute',\n paramName: 'options.url',\n });\n assert.isInstance(request, Request, {\n moduleName: 'workbox-routing',\n className: 'Router',\n funcName: 'findMatchingRoute',\n paramName: 'options.request',\n });\n }\n\n const routes = this._routes.get(request.method) || [];\n for (const route of routes) {\n let params;\n let matchResult = route.match({url, request, event});\n if (matchResult) {\n if (Array.isArray(matchResult) && matchResult.length > 0) {\n // Instead of passing an empty array in as params, use undefined.\n params = matchResult;\n } else if ((matchResult.constructor === Object &&\n Object.keys(matchResult).length > 0)) {\n // Instead of passing an empty object in as params, use undefined.\n params = matchResult;\n }\n\n // Return early if have a match.\n return {route, params};\n }\n }\n // If no match was found above, return and empty object.\n return {};\n }\n\n /**\n * Define a default `handler` that's called when no routes explicitly\n * match the incoming request.\n *\n * Without a default handler, unmatched requests will go against the\n * network as if there were no service worker present.\n *\n * @param {workbox.routing.Route~handlerCallback} handler A callback\n * function that returns a Promise resulting in a Response.\n */\n setDefaultHandler(handler) {\n this._defaultHandler = normalizeHandler(handler);\n }\n\n /**\n * If a Route throws an error while handling a request, this `handler`\n * will be called and given a chance to provide a response.\n *\n * @param {workbox.routing.Route~handlerCallback} handler A callback\n * function that returns a Promise resulting in a Response.\n */\n setCatchHandler(handler) {\n this._catchHandler = normalizeHandler(handler);\n }\n\n /**\n * Registers a route with the router.\n *\n * @param {workbox.routing.Route} route The route to register.\n */\n registerRoute(route) {\n if (process.env.NODE_ENV !== 'production') {\n assert.isType(route, 'object', {\n moduleName: 'workbox-routing',\n className: 'Router',\n funcName: 'registerRoute',\n paramName: 'route',\n });\n\n assert.hasMethod(route, 'match', {\n moduleName: 'workbox-routing',\n className: 'Router',\n funcName: 'registerRoute',\n paramName: 'route',\n });\n\n assert.isType(route.handler, 'object', {\n moduleName: 'workbox-routing',\n className: 'Router',\n funcName: 'registerRoute',\n paramName: 'route',\n });\n\n assert.hasMethod(route.handler, 'handle', {\n moduleName: 'workbox-routing',\n className: 'Router',\n funcName: 'registerRoute',\n paramName: 'route.handler',\n });\n\n assert.isType(route.method, 'string', {\n moduleName: 'workbox-routing',\n className: 'Router',\n funcName: 'registerRoute',\n paramName: 'route.method',\n });\n }\n\n if (!this._routes.has(route.method)) {\n this._routes.set(route.method, []);\n }\n\n // Give precedence to all of the earlier routes by adding this additional\n // route to the end of the array.\n this._routes.get(route.method).push(route);\n }\n\n /**\n * Unregisters a route with the router.\n *\n * @param {workbox.routing.Route} route The route to unregister.\n */\n unregisterRoute(route) {\n if (!this._routes.has(route.method)) {\n throw new WorkboxError(\n 'unregister-route-but-not-found-with-method', {\n method: route.method,\n }\n );\n }\n\n const routeIndex = this._routes.get(route.method).indexOf(route);\n if (routeIndex > -1) {\n this._routes.get(route.method).splice(routeIndex, 1);\n } else {\n throw new WorkboxError('unregister-route-route-not-registered');\n }\n }\n}\n\nexport {Router};\n","/*\n Copyright 2019 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport {Router} from '../Router.mjs';\nimport '../_version.mjs';\n\nlet defaultRouter;\n\n/**\n * Creates a new, singleton Router instance if one does not exist. If one\n * does already exist, that instance is returned.\n *\n * @private\n * @return {Router}\n */\nexport const getOrCreateDefaultRouter = () => {\n if (!defaultRouter) {\n defaultRouter = new Router();\n\n // The helpers that use the default Router assume these listeners exist.\n defaultRouter.addFetchListener();\n defaultRouter.addCacheListener();\n }\n return defaultRouter;\n};\n","/*\n Copyright 2019 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport {assert} from 'workbox-core/_private/assert.mjs';\nimport {cacheNames} from 'workbox-core/_private/cacheNames.mjs';\nimport {logger} from 'workbox-core/_private/logger.mjs';\nimport {NavigationRoute} from './NavigationRoute.mjs';\nimport {getOrCreateDefaultRouter} from './utils/getOrCreateDefaultRouter.mjs';\nimport './_version.mjs';\n\n\n/**\n * Registers a route that will return a precached file for a navigation\n * request. This is useful for the\n * [application shell pattern]{@link https://developers.google.com/web/fundamentals/architecture/app-shell}.\n *\n * When determining the URL of the precached HTML document, you will likely need\n * to call `workbox.precaching.getCacheKeyForURL(originalUrl)`, to account for\n * the fact that Workbox's precaching naming conventions often results in URL\n * cache keys that contain extra revisioning info.\n *\n * This method will generate a\n * [NavigationRoute]{@link workbox.routing.NavigationRoute}\n * and call\n * [Router.registerRoute()]{@link workbox.routing.Router#registerRoute} on a\n * singleton Router instance.\n *\n * @param {string} cachedAssetUrl The cache key to use for the HTML file.\n * @param {Object} [options]\n * @param {string} [options.cacheName] Cache name to store and retrieve\n * requests. Defaults to precache cache name provided by\n * [workbox-core.cacheNames]{@link workbox.core.cacheNames}.\n * @param {Array} [options.blacklist=[]] If any of these patterns\n * match, the route will not handle the request (even if a whitelist entry\n * matches).\n * @param {Array} [options.whitelist=[/./]] If any of these patterns\n * match the URL's pathname and search parameter, the route will handle the\n * request (assuming the blacklist doesn't match).\n * @return {workbox.routing.NavigationRoute} Returns the generated\n * Route.\n *\n * @alias workbox.routing.registerNavigationRoute\n */\nexport const registerNavigationRoute = (cachedAssetUrl, options = {}) => {\n if (process.env.NODE_ENV !== 'production') {\n assert.isType(cachedAssetUrl, 'string', {\n moduleName: 'workbox-routing',\n funcName: 'registerNavigationRoute',\n paramName: 'cachedAssetUrl',\n });\n }\n\n const cacheName = cacheNames.getPrecacheName(options.cacheName);\n const handler = async () => {\n try {\n const response = await caches.match(cachedAssetUrl, {cacheName});\n\n if (response) {\n return response;\n }\n\n // This shouldn't normally happen, but there are edge cases:\n // https://github.com/GoogleChrome/workbox/issues/1441\n throw new Error(`The cache ${cacheName} did not have an entry for ` +\n `${cachedAssetUrl}.`);\n } catch (error) {\n // If there's either a cache miss, or the caches.match() call threw\n // an exception, then attempt to fulfill the navigation request with\n // a response from the network rather than leaving the user with a\n // failed navigation.\n if (process.env.NODE_ENV !== 'production') {\n logger.debug(`Unable to respond to navigation request with ` +\n `cached response. Falling back to network.`, error);\n }\n\n // This might still fail if the browser is offline...\n return fetch(cachedAssetUrl);\n }\n };\n\n const route = new NavigationRoute(handler, {\n whitelist: options.whitelist,\n blacklist: options.blacklist,\n });\n\n const defaultRouter = getOrCreateDefaultRouter();\n defaultRouter.registerRoute(route);\n\n return route;\n};\n","/*\n Copyright 2019 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport {logger} from 'workbox-core/_private/logger.mjs';\nimport {WorkboxError} from 'workbox-core/_private/WorkboxError.mjs';\nimport {Route} from './Route.mjs';\nimport {RegExpRoute} from './RegExpRoute.mjs';\nimport {getOrCreateDefaultRouter} from './utils/getOrCreateDefaultRouter.mjs';\nimport './_version.mjs';\n\n\n/**\n * Easily register a RegExp, string, or function with a caching\n * strategy to a singleton Router instance.\n *\n * This method will generate a Route for you if needed and\n * call [Router.registerRoute()]{@link\n * workbox.routing.Router#registerRoute}.\n *\n * @param {\n * RegExp|\n * string|\n * workbox.routing.Route~matchCallback|\n * workbox.routing.Route\n * } capture\n * If the capture param is a `Route`, all other arguments will be ignored.\n * @param {workbox.routing.Route~handlerCallback} handler A callback\n * function that returns a Promise resulting in a Response.\n * @param {string} [method='GET'] The HTTP method to match the Route\n * against.\n * @return {workbox.routing.Route} The generated `Route`(Useful for\n * unregistering).\n *\n * @alias workbox.routing.registerRoute\n */\nexport const registerRoute = (capture, handler, method = 'GET') => {\n let route;\n\n if (typeof capture === 'string') {\n const captureUrl = new URL(capture, location);\n\n if (process.env.NODE_ENV !== 'production') {\n if (!(capture.startsWith('/') || capture.startsWith('http'))) {\n throw new WorkboxError('invalid-string', {\n moduleName: 'workbox-routing',\n funcName: 'registerRoute',\n paramName: 'capture',\n });\n }\n\n // We want to check if Express-style wildcards are in the pathname only.\n // TODO: Remove this log message in v4.\n const valueToCheck = capture.startsWith('http') ?\n captureUrl.pathname : capture;\n\n // See https://github.com/pillarjs/path-to-regexp#parameters\n const wildcards = '[*:?+]';\n if (valueToCheck.match(new RegExp(`${wildcards}`))) {\n logger.debug(\n `The '$capture' parameter contains an Express-style wildcard ` +\n `character (${wildcards}). Strings are now always interpreted as ` +\n `exact matches; use a RegExp for partial or wildcard matches.`\n );\n }\n }\n\n const matchCallback = ({url}) => {\n if (process.env.NODE_ENV !== 'production') {\n if ((url.pathname === captureUrl.pathname) &&\n (url.origin !== captureUrl.origin)) {\n logger.debug(\n `${capture} only partially matches the cross-origin URL ` +\n `${url}. This route will only handle cross-origin requests ` +\n `if they match the entire URL.`);\n }\n }\n\n return url.href === captureUrl.href;\n };\n\n route = new Route(matchCallback, handler, method);\n } else if (capture instanceof RegExp) {\n route = new RegExpRoute(capture, handler, method);\n } else if (typeof capture === 'function') {\n route = new Route(capture, handler, method);\n } else if (capture instanceof Route) {\n route = capture;\n } else {\n throw new WorkboxError('unsupported-route-type', {\n moduleName: 'workbox-routing',\n funcName: 'registerRoute',\n paramName: 'capture',\n });\n }\n\n const defaultRouter = getOrCreateDefaultRouter();\n defaultRouter.registerRoute(route);\n\n return route;\n};\n","/*\n Copyright 2019 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport {getOrCreateDefaultRouter} from './utils/getOrCreateDefaultRouter.mjs';\n\nimport './_version.mjs';\n\n/**\n * If a Route throws an error while handling a request, this `handler`\n * will be called and given a chance to provide a response.\n *\n * @param {workbox.routing.Route~handlerCallback} handler A callback\n * function that returns a Promise resulting in a Response.\n *\n * @alias workbox.routing.setCatchHandler\n */\nexport const setCatchHandler = (handler) => {\n const defaultRouter = getOrCreateDefaultRouter();\n defaultRouter.setCatchHandler(handler);\n};\n","/*\n Copyright 2019 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport {getOrCreateDefaultRouter} from './utils/getOrCreateDefaultRouter.mjs';\n\nimport './_version.mjs';\n\n/**\n * Define a default `handler` that's called when no routes explicitly\n * match the incoming request.\n *\n * Without a default handler, unmatched requests will go against the\n * network as if there were no service worker present.\n *\n * @param {workbox.routing.Route~handlerCallback} handler A callback\n * function that returns a Promise resulting in a Response.\n *\n * @alias workbox.routing.setDefaultHandler\n */\nexport const setDefaultHandler = (handler) => {\n const defaultRouter = getOrCreateDefaultRouter();\n defaultRouter.setDefaultHandler(handler);\n};\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport {assert} from 'workbox-core/_private/assert.mjs';\n\nimport {NavigationRoute} from './NavigationRoute.mjs';\nimport {RegExpRoute} from './RegExpRoute.mjs';\nimport {registerNavigationRoute} from './registerNavigationRoute.mjs';\nimport {registerRoute} from './registerRoute.mjs';\nimport {Route} from './Route.mjs';\nimport {Router} from './Router.mjs';\nimport {setCatchHandler} from './setCatchHandler.mjs';\nimport {setDefaultHandler} from './setDefaultHandler.mjs';\n\nimport './_version.mjs';\n\nif (process.env.NODE_ENV !== 'production') {\n assert.isSWEnv('workbox-routing');\n}\n\n/**\n * @namespace workbox.routing\n */\n\nexport {\n NavigationRoute,\n RegExpRoute,\n registerNavigationRoute,\n registerRoute,\n Route,\n Router,\n setCatchHandler,\n setDefaultHandler,\n};\n"],"names":["self","_","e","defaultMethod","validMethods","normalizeHandler","handler","assert","hasMethod","moduleName","className","funcName","paramName","isType","handle","Route","constructor","match","method","isOneOf","NavigationRoute","whitelist","blacklist","isArrayOfClass","RegExp","options","_match","_whitelist","_blacklist","url","request","mode","pathnameAndSearch","pathname","search","regExp","test","logger","log","some","debug","RegExpRoute","isInstance","result","exec","href","origin","location","index","slice","Router","_routes","Map","routes","addFetchListener","addEventListener","event","responsePromise","handleRequest","respondWith","addCacheListener","data","type","payload","urlsToCache","requestPromises","Promise","all","map","entry","Request","waitUntil","ports","postMessage","URL","protocol","startsWith","params","route","findMatchingRoute","debugMessages","push","_defaultHandler","getFriendlyURL","groupCollapsed","forEach","msg","Array","isArray","groupEnd","err","reject","_catchHandler","catch","error","get","matchResult","length","Object","keys","setDefaultHandler","setCatchHandler","registerRoute","has","set","unregisterRoute","WorkboxError","routeIndex","indexOf","splice","defaultRouter","getOrCreateDefaultRouter","registerNavigationRoute","cachedAssetUrl","cacheName","cacheNames","getPrecacheName","response","caches","Error","fetch","capture","captureUrl","valueToCheck","wildcards","matchCallback","isSWEnv"],"mappings":";;;;E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OAAO,YAAY1G,KAAvB,EAA8B;EACnC+D,IAAAA,KAAK,GAAG2C,OAAR;EACD,GAFM,MAEA;EACL,UAAM,IAAIf,6BAAJ,CAAiB,wBAAjB,EAA2C;EAC/CjG,MAAAA,UAAU,EAAE,iBADmC;EAE/CE,MAAAA,QAAQ,EAAE,eAFqC;EAG/CC,MAAAA,SAAS,EAAE;EAHoC,KAA3C,CAAN;EAKD;;EAED,QAAMkG,aAAa,GAAGC,wBAAwB,EAA9C;EACAD,EAAAA,aAAa,CAACR,aAAd,CAA4BxB,KAA5B;EAEA,SAAOA,KAAP;EACD,CAhEM;;ECxCP;;;;;;;AAQA,EAIA;;;;;;;;;;AASA,QAAauB,eAAe,GAAI/F,OAAD,IAAa;EAC1C,QAAMwG,aAAa,GAAGC,wBAAwB,EAA9C;EACAD,EAAAA,aAAa,CAACT,eAAd,CAA8B/F,OAA9B;EACD,CAHM;;ECrBP;;;;;;;AAQA,EAIA;;;;;;;;;;;;;AAYA,QAAa8F,iBAAiB,GAAI9F,OAAD,IAAa;EAC5C,QAAMwG,aAAa,GAAGC,wBAAwB,EAA9C;EACAD,EAAAA,aAAa,CAACV,iBAAd,CAAgC9F,OAAhC;EACD,CAHM;;ECxBP;;;;;;;AAQA;AAaA,EAA2C;EACzCC,EAAAA,iBAAM,CAACuH,OAAP,CAAe,iBAAf;EACD;;;;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/workbox-v4.3.1/workbox-routing.prod.js b/workbox-v4.3.1/workbox-routing.prod.js new file mode 100644 index 0000000000..ed87f9d141 --- /dev/null +++ b/workbox-v4.3.1/workbox-routing.prod.js @@ -0,0 +1,2 @@ +this.workbox=this.workbox||{},this.workbox.routing=function(t,e,r){"use strict";try{self["workbox:routing:4.3.1"]&&_()}catch(t){}const s="GET",n=t=>t&&"object"==typeof t?t:{handle:t};class o{constructor(t,e,r){this.handler=n(e),this.match=t,this.method=r||s}}class i extends o{constructor(t,{whitelist:e=[/./],blacklist:r=[]}={}){super(t=>this.t(t),t),this.s=e,this.o=r}t({url:t,request:e}){if("navigate"!==e.mode)return!1;const r=t.pathname+t.search;for(const t of this.o)if(t.test(r))return!1;return!!this.s.some(t=>t.test(r))}}class u extends o{constructor(t,e,r){super(({url:e})=>{const r=t.exec(e.href);return r?e.origin!==location.origin&&0!==r.index?null:r.slice(1):null},e,r)}}class c{constructor(){this.i=new Map}get routes(){return this.i}addFetchListener(){self.addEventListener("fetch",t=>{const{request:e}=t,r=this.handleRequest({request:e,event:t});r&&t.respondWith(r)})}addCacheListener(){self.addEventListener("message",async t=>{if(t.data&&"CACHE_URLS"===t.data.type){const{payload:e}=t.data,r=Promise.all(e.urlsToCache.map(t=>{"string"==typeof t&&(t=[t]);const e=new Request(...t);return this.handleRequest({request:e})}));t.waitUntil(r),t.ports&&t.ports[0]&&(await r,t.ports[0].postMessage(!0))}})}handleRequest({request:t,event:e}){const r=new URL(t.url,location);if(!r.protocol.startsWith("http"))return;let s,{params:n,route:o}=this.findMatchingRoute({url:r,request:t,event:e}),i=o&&o.handler;if(!i&&this.u&&(i=this.u),i){try{s=i.handle({url:r,request:t,event:e,params:n})}catch(t){s=Promise.reject(t)}return s&&this.h&&(s=s.catch(t=>this.h.handle({url:r,event:e,err:t}))),s}}findMatchingRoute({url:t,request:e,event:r}){const s=this.i.get(e.method)||[];for(const n of s){let s,o=n.match({url:t,request:e,event:r});if(o)return Array.isArray(o)&&o.length>0?s=o:o.constructor===Object&&Object.keys(o).length>0&&(s=o),{route:n,params:s}}return{}}setDefaultHandler(t){this.u=n(t)}setCatchHandler(t){this.h=n(t)}registerRoute(t){this.i.has(t.method)||this.i.set(t.method,[]),this.i.get(t.method).push(t)}unregisterRoute(t){if(!this.i.has(t.method))throw new r.WorkboxError("unregister-route-but-not-found-with-method",{method:t.method});const e=this.i.get(t.method).indexOf(t);if(!(e>-1))throw new r.WorkboxError("unregister-route-route-not-registered");this.i.get(t.method).splice(e,1)}}let a;const h=()=>(a||((a=new c).addFetchListener(),a.addCacheListener()),a);return t.NavigationRoute=i,t.RegExpRoute=u,t.registerNavigationRoute=((t,r={})=>{const s=e.cacheNames.getPrecacheName(r.cacheName),n=new i(async()=>{try{const e=await caches.match(t,{cacheName:s});if(e)return e;throw new Error(`The cache ${s} did not have an entry for `+`${t}.`)}catch(e){return fetch(t)}},{whitelist:r.whitelist,blacklist:r.blacklist});return h().registerRoute(n),n}),t.registerRoute=((t,e,s="GET")=>{let n;if("string"==typeof t){const r=new URL(t,location);n=new o(({url:t})=>t.href===r.href,e,s)}else if(t instanceof RegExp)n=new u(t,e,s);else if("function"==typeof t)n=new o(t,e,s);else{if(!(t instanceof o))throw new r.WorkboxError("unsupported-route-type",{moduleName:"workbox-routing",funcName:"registerRoute",paramName:"capture"});n=t}return h().registerRoute(n),n}),t.Route=o,t.Router=c,t.setCatchHandler=(t=>{h().setCatchHandler(t)}),t.setDefaultHandler=(t=>{h().setDefaultHandler(t)}),t}({},workbox.core._private,workbox.core._private); +//# sourceMappingURL=workbox-routing.prod.js.map diff --git a/workbox-v4.3.1/workbox-routing.prod.js.map b/workbox-v4.3.1/workbox-routing.prod.js.map new file mode 100644 index 0000000000..56e5c0eee4 --- /dev/null +++ b/workbox-v4.3.1/workbox-routing.prod.js.map @@ -0,0 +1 @@ +{"version":3,"file":"workbox-routing.prod.js","sources":["../_version.mjs","../utils/constants.mjs","../utils/normalizeHandler.mjs","../Route.mjs","../NavigationRoute.mjs","../RegExpRoute.mjs","../Router.mjs","../utils/getOrCreateDefaultRouter.mjs","../registerNavigationRoute.mjs","../registerRoute.mjs","../setCatchHandler.mjs","../setDefaultHandler.mjs"],"sourcesContent":["try{self['workbox:routing:4.3.1']&&_()}catch(e){}// eslint-disable-line","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport '../_version.mjs';\n\n/**\n * The default HTTP method, 'GET', used when there's no specific method\n * configured for a route.\n *\n * @type {string}\n *\n * @private\n */\nexport const defaultMethod = 'GET';\n\n/**\n * The list of valid HTTP methods associated with requests that could be routed.\n *\n * @type {Array}\n *\n * @private\n */\nexport const validMethods = [\n 'DELETE',\n 'GET',\n 'HEAD',\n 'PATCH',\n 'POST',\n 'PUT',\n];\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport {assert} from 'workbox-core/_private/assert.mjs';\nimport '../_version.mjs';\n\n/**\n * @param {function()|Object} handler Either a function, or an object with a\n * 'handle' method.\n * @return {Object} An object with a handle method.\n *\n * @private\n */\nexport const normalizeHandler = (handler) => {\n if (handler && typeof handler === 'object') {\n if (process.env.NODE_ENV !== 'production') {\n assert.hasMethod(handler, 'handle', {\n moduleName: 'workbox-routing',\n className: 'Route',\n funcName: 'constructor',\n paramName: 'handler',\n });\n }\n return handler;\n } else {\n if (process.env.NODE_ENV !== 'production') {\n assert.isType(handler, 'function', {\n moduleName: 'workbox-routing',\n className: 'Route',\n funcName: 'constructor',\n paramName: 'handler',\n });\n }\n return {handle: handler};\n }\n};\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport {assert} from 'workbox-core/_private/assert.mjs';\n\nimport {defaultMethod, validMethods} from './utils/constants.mjs';\nimport {normalizeHandler} from './utils/normalizeHandler.mjs';\nimport './_version.mjs';\n\n/**\n * A `Route` consists of a pair of callback functions, \"match\" and \"handler\".\n * The \"match\" callback determine if a route should be used to \"handle\" a\n * request by returning a non-falsy value if it can. The \"handler\" callback\n * is called when there is a match and should return a Promise that resolves\n * to a `Response`.\n *\n * @memberof workbox.routing\n */\nclass Route {\n /**\n * Constructor for Route class.\n *\n * @param {workbox.routing.Route~matchCallback} match\n * A callback function that determines whether the route matches a given\n * `fetch` event by returning a non-falsy value.\n * @param {workbox.routing.Route~handlerCallback} handler A callback\n * function that returns a Promise resolving to a Response.\n * @param {string} [method='GET'] The HTTP method to match the Route\n * against.\n */\n constructor(match, handler, method) {\n if (process.env.NODE_ENV !== 'production') {\n assert.isType(match, 'function', {\n moduleName: 'workbox-routing',\n className: 'Route',\n funcName: 'constructor',\n paramName: 'match',\n });\n\n if (method) {\n assert.isOneOf(method, validMethods, {paramName: 'method'});\n }\n }\n\n // These values are referenced directly by Router so cannot be\n // altered by minifification.\n this.handler = normalizeHandler(handler);\n this.match = match;\n this.method = method || defaultMethod;\n }\n}\n\nexport {Route};\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport {assert} from 'workbox-core/_private/assert.mjs';\nimport {logger} from 'workbox-core/_private/logger.mjs';\nimport {Route} from './Route.mjs';\nimport './_version.mjs';\n\n/**\n * NavigationRoute makes it easy to create a [Route]{@link\n * workbox.routing.Route} that matches for browser\n * [navigation requests]{@link https://developers.google.com/web/fundamentals/primers/service-workers/high-performance-loading#first_what_are_navigation_requests}.\n *\n * It will only match incoming Requests whose\n * [`mode`]{@link https://fetch.spec.whatwg.org/#concept-request-mode}\n * is set to `navigate`.\n *\n * You can optionally only apply this route to a subset of navigation requests\n * by using one or both of the `blacklist` and `whitelist` parameters.\n *\n * @memberof workbox.routing\n * @extends workbox.routing.Route\n */\nclass NavigationRoute extends Route {\n /**\n * If both `blacklist` and `whiltelist` are provided, the `blacklist` will\n * take precedence and the request will not match this route.\n *\n * The regular expressions in `whitelist` and `blacklist`\n * are matched against the concatenated\n * [`pathname`]{@link https://developer.mozilla.org/en-US/docs/Web/API/HTMLHyperlinkElementUtils/pathname}\n * and [`search`]{@link https://developer.mozilla.org/en-US/docs/Web/API/HTMLHyperlinkElementUtils/search}\n * portions of the requested URL.\n *\n * @param {workbox.routing.Route~handlerCallback} handler A callback\n * function that returns a Promise resulting in a Response.\n * @param {Object} options\n * @param {Array} [options.blacklist] If any of these patterns match,\n * the route will not handle the request (even if a whitelist RegExp matches).\n * @param {Array} [options.whitelist=[/./]] If any of these patterns\n * match the URL's pathname and search parameter, the route will handle the\n * request (assuming the blacklist doesn't match).\n */\n constructor(handler, {whitelist = [/./], blacklist = []} = {}) {\n if (process.env.NODE_ENV !== 'production') {\n assert.isArrayOfClass(whitelist, RegExp, {\n moduleName: 'workbox-routing',\n className: 'NavigationRoute',\n funcName: 'constructor',\n paramName: 'options.whitelist',\n });\n assert.isArrayOfClass(blacklist, RegExp, {\n moduleName: 'workbox-routing',\n className: 'NavigationRoute',\n funcName: 'constructor',\n paramName: 'options.blacklist',\n });\n }\n\n super((options) => this._match(options), handler);\n\n this._whitelist = whitelist;\n this._blacklist = blacklist;\n }\n\n /**\n * Routes match handler.\n *\n * @param {Object} options\n * @param {URL} options.url\n * @param {Request} options.request\n * @return {boolean}\n *\n * @private\n */\n _match({url, request}) {\n if (request.mode !== 'navigate') {\n return false;\n }\n\n const pathnameAndSearch = url.pathname + url.search;\n\n for (const regExp of this._blacklist) {\n if (regExp.test(pathnameAndSearch)) {\n if (process.env.NODE_ENV !== 'production') {\n logger.log(`The navigation route is not being used, since the ` +\n `URL matches this blacklist pattern: ${regExp}`);\n }\n return false;\n }\n }\n\n if (this._whitelist.some((regExp) => regExp.test(pathnameAndSearch))) {\n if (process.env.NODE_ENV !== 'production') {\n logger.debug(`The navigation route is being used.`);\n }\n return true;\n }\n\n if (process.env.NODE_ENV !== 'production') {\n logger.log(`The navigation route is not being used, since the URL ` +\n `being navigated to doesn't match the whitelist.`);\n }\n return false;\n }\n}\n\nexport {NavigationRoute};\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport {assert} from 'workbox-core/_private/assert.mjs';\nimport {logger} from 'workbox-core/_private/logger.mjs';\nimport {Route} from './Route.mjs';\nimport './_version.mjs';\n\n/**\n * RegExpRoute makes it easy to create a regular expression based\n * [Route]{@link workbox.routing.Route}.\n *\n * For same-origin requests the RegExp only needs to match part of the URL. For\n * requests against third-party servers, you must define a RegExp that matches\n * the start of the URL.\n *\n * [See the module docs for info.]{@link https://developers.google.com/web/tools/workbox/modules/workbox-routing}\n *\n * @memberof workbox.routing\n * @extends workbox.routing.Route\n */\nclass RegExpRoute extends Route {\n /**\n * If the regulard expression contains\n * [capture groups]{@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp#grouping-back-references},\n * th ecaptured values will be passed to the\n * [handler's]{@link workbox.routing.Route~handlerCallback} `params`\n * argument.\n *\n * @param {RegExp} regExp The regular expression to match against URLs.\n * @param {workbox.routing.Route~handlerCallback} handler A callback\n * function that returns a Promise resulting in a Response.\n * @param {string} [method='GET'] The HTTP method to match the Route\n * against.\n */\n constructor(regExp, handler, method) {\n if (process.env.NODE_ENV !== 'production') {\n assert.isInstance(regExp, RegExp, {\n moduleName: 'workbox-routing',\n className: 'RegExpRoute',\n funcName: 'constructor',\n paramName: 'pattern',\n });\n }\n\n const match = ({url}) => {\n const result = regExp.exec(url.href);\n\n // Return null immediately if there's no match.\n if (!result) {\n return null;\n }\n\n // Require that the match start at the first character in the URL string\n // if it's a cross-origin request.\n // See https://github.com/GoogleChrome/workbox/issues/281 for the context\n // behind this behavior.\n if ((url.origin !== location.origin) && (result.index !== 0)) {\n if (process.env.NODE_ENV !== 'production') {\n logger.debug(\n `The regular expression '${regExp}' only partially matched ` +\n `against the cross-origin URL '${url}'. RegExpRoute's will only ` +\n `handle cross-origin requests if they match the entire URL.`\n );\n }\n\n return null;\n }\n\n // If the route matches, but there aren't any capture groups defined, then\n // this will return [], which is truthy and therefore sufficient to\n // indicate a match.\n // If there are capture groups, then it will return their values.\n return result.slice(1);\n };\n\n super(match, handler, method);\n }\n}\n\nexport {RegExpRoute};\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport {assert} from 'workbox-core/_private/assert.mjs';\nimport {logger} from 'workbox-core/_private/logger.mjs';\nimport {WorkboxError} from 'workbox-core/_private/WorkboxError.mjs';\nimport {getFriendlyURL} from 'workbox-core/_private/getFriendlyURL.mjs';\n\nimport {normalizeHandler} from './utils/normalizeHandler.mjs';\nimport './_version.mjs';\n\n/**\n * The Router can be used to process a FetchEvent through one or more\n * [Routes]{@link workbox.routing.Route} responding with a Request if\n * a matching route exists.\n *\n * If no route matches a given a request, the Router will use a \"default\"\n * handler if one is defined.\n *\n * Should the matching Route throw an error, the Router will use a \"catch\"\n * handler if one is defined to gracefully deal with issues and respond with a\n * Request.\n *\n * If a request matches multiple routes, the **earliest** registered route will\n * be used to respond to the request.\n *\n * @memberof workbox.routing\n */\nclass Router {\n /**\n * Initializes a new Router.\n */\n constructor() {\n this._routes = new Map();\n }\n\n /**\n * @return {Map>} routes A `Map` of HTTP\n * method name ('GET', etc.) to an array of all the corresponding `Route`\n * instances that are registered.\n */\n get routes() {\n return this._routes;\n }\n\n /**\n * Adds a fetch event listener to respond to events when a route matches\n * the event's request.\n */\n addFetchListener() {\n self.addEventListener('fetch', (event) => {\n const {request} = event;\n const responsePromise = this.handleRequest({request, event});\n if (responsePromise) {\n event.respondWith(responsePromise);\n }\n });\n }\n\n /**\n * Adds a message event listener for URLs to cache from the window.\n * This is useful to cache resources loaded on the page prior to when the\n * service worker started controlling it.\n *\n * The format of the message data sent from the window should be as follows.\n * Where the `urlsToCache` array may consist of URL strings or an array of\n * URL string + `requestInit` object (the same as you'd pass to `fetch()`).\n *\n * ```\n * {\n * type: 'CACHE_URLS',\n * payload: {\n * urlsToCache: [\n * './script1.js',\n * './script2.js',\n * ['./script3.js', {mode: 'no-cors'}],\n * ],\n * },\n * }\n * ```\n */\n addCacheListener() {\n self.addEventListener('message', async (event) => {\n if (event.data && event.data.type === 'CACHE_URLS') {\n const {payload} = event.data;\n\n if (process.env.NODE_ENV !== 'production') {\n logger.debug(`Caching URLs from the window`, payload.urlsToCache);\n }\n\n const requestPromises = Promise.all(payload.urlsToCache.map((entry) => {\n if (typeof entry === 'string') {\n entry = [entry];\n }\n\n const request = new Request(...entry);\n return this.handleRequest({request});\n }));\n\n event.waitUntil(requestPromises);\n\n // If a MessageChannel was used, reply to the message on success.\n if (event.ports && event.ports[0]) {\n await requestPromises;\n event.ports[0].postMessage(true);\n }\n }\n });\n }\n\n /**\n * Apply the routing rules to a FetchEvent object to get a Response from an\n * appropriate Route's handler.\n *\n * @param {Object} options\n * @param {Request} options.request The request to handle (this is usually\n * from a fetch event, but it does not have to be).\n * @param {FetchEvent} [options.event] The event that triggered the request,\n * if applicable.\n * @return {Promise|undefined} A promise is returned if a\n * registered route can handle the request. If there is no matching\n * route and there's no `defaultHandler`, `undefined` is returned.\n */\n handleRequest({request, event}) {\n if (process.env.NODE_ENV !== 'production') {\n assert.isInstance(request, Request, {\n moduleName: 'workbox-routing',\n className: 'Router',\n funcName: 'handleRequest',\n paramName: 'options.request',\n });\n }\n\n const url = new URL(request.url, location);\n if (!url.protocol.startsWith('http')) {\n if (process.env.NODE_ENV !== 'production') {\n logger.debug(\n `Workbox Router only supports URLs that start with 'http'.`);\n }\n return;\n }\n\n let {params, route} = this.findMatchingRoute({url, request, event});\n let handler = route && route.handler;\n\n let debugMessages = [];\n if (process.env.NODE_ENV !== 'production') {\n if (handler) {\n debugMessages.push([\n `Found a route to handle this request:`, route,\n ]);\n\n if (params) {\n debugMessages.push([\n `Passing the following params to the route's handler:`, params,\n ]);\n }\n }\n }\n\n // If we don't have a handler because there was no matching route, then\n // fall back to defaultHandler if that's defined.\n if (!handler && this._defaultHandler) {\n if (process.env.NODE_ENV !== 'production') {\n debugMessages.push(`Failed to find a matching route. Falling ` +\n `back to the default handler.`);\n\n // This is used for debugging in logs in the case of an error.\n route = '[Default Handler]';\n }\n handler = this._defaultHandler;\n }\n\n if (!handler) {\n if (process.env.NODE_ENV !== 'production') {\n // No handler so Workbox will do nothing. If logs is set of debug\n // i.e. verbose, we should print out this information.\n logger.debug(`No route found for: ${getFriendlyURL(url)}`);\n }\n return;\n }\n\n if (process.env.NODE_ENV !== 'production') {\n // We have a handler, meaning Workbox is going to handle the route.\n // print the routing details to the console.\n logger.groupCollapsed(`Router is responding to: ${getFriendlyURL(url)}`);\n debugMessages.forEach((msg) => {\n if (Array.isArray(msg)) {\n logger.log(...msg);\n } else {\n logger.log(msg);\n }\n });\n\n // The Request and Response objects contains a great deal of information,\n // hide it under a group in case developers want to see it.\n logger.groupCollapsed(`View request details here.`);\n logger.log(request);\n logger.groupEnd();\n\n logger.groupEnd();\n }\n\n // Wrap in try and catch in case the handle method throws a synchronous\n // error. It should still callback to the catch handler.\n let responsePromise;\n try {\n responsePromise = handler.handle({url, request, event, params});\n } catch (err) {\n responsePromise = Promise.reject(err);\n }\n\n if (responsePromise && this._catchHandler) {\n responsePromise = responsePromise.catch((err) => {\n if (process.env.NODE_ENV !== 'production') {\n // Still include URL here as it will be async from the console group\n // and may not make sense without the URL\n logger.groupCollapsed(`Error thrown when responding to: ` +\n ` ${getFriendlyURL(url)}. Falling back to Catch Handler.`);\n logger.error(`Error thrown by:`, route);\n logger.error(err);\n logger.groupEnd();\n }\n return this._catchHandler.handle({url, event, err});\n });\n }\n\n return responsePromise;\n }\n\n /**\n * Checks a request and URL (and optionally an event) against the list of\n * registered routes, and if there's a match, returns the corresponding\n * route along with any params generated by the match.\n *\n * @param {Object} options\n * @param {URL} options.url\n * @param {Request} options.request The request to match.\n * @param {FetchEvent} [options.event] The corresponding event (unless N/A).\n * @return {Object} An object with `route` and `params` properties.\n * They are populated if a matching route was found or `undefined`\n * otherwise.\n */\n findMatchingRoute({url, request, event}) {\n if (process.env.NODE_ENV !== 'production') {\n assert.isInstance(url, URL, {\n moduleName: 'workbox-routing',\n className: 'Router',\n funcName: 'findMatchingRoute',\n paramName: 'options.url',\n });\n assert.isInstance(request, Request, {\n moduleName: 'workbox-routing',\n className: 'Router',\n funcName: 'findMatchingRoute',\n paramName: 'options.request',\n });\n }\n\n const routes = this._routes.get(request.method) || [];\n for (const route of routes) {\n let params;\n let matchResult = route.match({url, request, event});\n if (matchResult) {\n if (Array.isArray(matchResult) && matchResult.length > 0) {\n // Instead of passing an empty array in as params, use undefined.\n params = matchResult;\n } else if ((matchResult.constructor === Object &&\n Object.keys(matchResult).length > 0)) {\n // Instead of passing an empty object in as params, use undefined.\n params = matchResult;\n }\n\n // Return early if have a match.\n return {route, params};\n }\n }\n // If no match was found above, return and empty object.\n return {};\n }\n\n /**\n * Define a default `handler` that's called when no routes explicitly\n * match the incoming request.\n *\n * Without a default handler, unmatched requests will go against the\n * network as if there were no service worker present.\n *\n * @param {workbox.routing.Route~handlerCallback} handler A callback\n * function that returns a Promise resulting in a Response.\n */\n setDefaultHandler(handler) {\n this._defaultHandler = normalizeHandler(handler);\n }\n\n /**\n * If a Route throws an error while handling a request, this `handler`\n * will be called and given a chance to provide a response.\n *\n * @param {workbox.routing.Route~handlerCallback} handler A callback\n * function that returns a Promise resulting in a Response.\n */\n setCatchHandler(handler) {\n this._catchHandler = normalizeHandler(handler);\n }\n\n /**\n * Registers a route with the router.\n *\n * @param {workbox.routing.Route} route The route to register.\n */\n registerRoute(route) {\n if (process.env.NODE_ENV !== 'production') {\n assert.isType(route, 'object', {\n moduleName: 'workbox-routing',\n className: 'Router',\n funcName: 'registerRoute',\n paramName: 'route',\n });\n\n assert.hasMethod(route, 'match', {\n moduleName: 'workbox-routing',\n className: 'Router',\n funcName: 'registerRoute',\n paramName: 'route',\n });\n\n assert.isType(route.handler, 'object', {\n moduleName: 'workbox-routing',\n className: 'Router',\n funcName: 'registerRoute',\n paramName: 'route',\n });\n\n assert.hasMethod(route.handler, 'handle', {\n moduleName: 'workbox-routing',\n className: 'Router',\n funcName: 'registerRoute',\n paramName: 'route.handler',\n });\n\n assert.isType(route.method, 'string', {\n moduleName: 'workbox-routing',\n className: 'Router',\n funcName: 'registerRoute',\n paramName: 'route.method',\n });\n }\n\n if (!this._routes.has(route.method)) {\n this._routes.set(route.method, []);\n }\n\n // Give precedence to all of the earlier routes by adding this additional\n // route to the end of the array.\n this._routes.get(route.method).push(route);\n }\n\n /**\n * Unregisters a route with the router.\n *\n * @param {workbox.routing.Route} route The route to unregister.\n */\n unregisterRoute(route) {\n if (!this._routes.has(route.method)) {\n throw new WorkboxError(\n 'unregister-route-but-not-found-with-method', {\n method: route.method,\n }\n );\n }\n\n const routeIndex = this._routes.get(route.method).indexOf(route);\n if (routeIndex > -1) {\n this._routes.get(route.method).splice(routeIndex, 1);\n } else {\n throw new WorkboxError('unregister-route-route-not-registered');\n }\n }\n}\n\nexport {Router};\n","/*\n Copyright 2019 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport {Router} from '../Router.mjs';\nimport '../_version.mjs';\n\nlet defaultRouter;\n\n/**\n * Creates a new, singleton Router instance if one does not exist. If one\n * does already exist, that instance is returned.\n *\n * @private\n * @return {Router}\n */\nexport const getOrCreateDefaultRouter = () => {\n if (!defaultRouter) {\n defaultRouter = new Router();\n\n // The helpers that use the default Router assume these listeners exist.\n defaultRouter.addFetchListener();\n defaultRouter.addCacheListener();\n }\n return defaultRouter;\n};\n","/*\n Copyright 2019 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport {assert} from 'workbox-core/_private/assert.mjs';\nimport {cacheNames} from 'workbox-core/_private/cacheNames.mjs';\nimport {logger} from 'workbox-core/_private/logger.mjs';\nimport {NavigationRoute} from './NavigationRoute.mjs';\nimport {getOrCreateDefaultRouter} from './utils/getOrCreateDefaultRouter.mjs';\nimport './_version.mjs';\n\n\n/**\n * Registers a route that will return a precached file for a navigation\n * request. This is useful for the\n * [application shell pattern]{@link https://developers.google.com/web/fundamentals/architecture/app-shell}.\n *\n * When determining the URL of the precached HTML document, you will likely need\n * to call `workbox.precaching.getCacheKeyForURL(originalUrl)`, to account for\n * the fact that Workbox's precaching naming conventions often results in URL\n * cache keys that contain extra revisioning info.\n *\n * This method will generate a\n * [NavigationRoute]{@link workbox.routing.NavigationRoute}\n * and call\n * [Router.registerRoute()]{@link workbox.routing.Router#registerRoute} on a\n * singleton Router instance.\n *\n * @param {string} cachedAssetUrl The cache key to use for the HTML file.\n * @param {Object} [options]\n * @param {string} [options.cacheName] Cache name to store and retrieve\n * requests. Defaults to precache cache name provided by\n * [workbox-core.cacheNames]{@link workbox.core.cacheNames}.\n * @param {Array} [options.blacklist=[]] If any of these patterns\n * match, the route will not handle the request (even if a whitelist entry\n * matches).\n * @param {Array} [options.whitelist=[/./]] If any of these patterns\n * match the URL's pathname and search parameter, the route will handle the\n * request (assuming the blacklist doesn't match).\n * @return {workbox.routing.NavigationRoute} Returns the generated\n * Route.\n *\n * @alias workbox.routing.registerNavigationRoute\n */\nexport const registerNavigationRoute = (cachedAssetUrl, options = {}) => {\n if (process.env.NODE_ENV !== 'production') {\n assert.isType(cachedAssetUrl, 'string', {\n moduleName: 'workbox-routing',\n funcName: 'registerNavigationRoute',\n paramName: 'cachedAssetUrl',\n });\n }\n\n const cacheName = cacheNames.getPrecacheName(options.cacheName);\n const handler = async () => {\n try {\n const response = await caches.match(cachedAssetUrl, {cacheName});\n\n if (response) {\n return response;\n }\n\n // This shouldn't normally happen, but there are edge cases:\n // https://github.com/GoogleChrome/workbox/issues/1441\n throw new Error(`The cache ${cacheName} did not have an entry for ` +\n `${cachedAssetUrl}.`);\n } catch (error) {\n // If there's either a cache miss, or the caches.match() call threw\n // an exception, then attempt to fulfill the navigation request with\n // a response from the network rather than leaving the user with a\n // failed navigation.\n if (process.env.NODE_ENV !== 'production') {\n logger.debug(`Unable to respond to navigation request with ` +\n `cached response. Falling back to network.`, error);\n }\n\n // This might still fail if the browser is offline...\n return fetch(cachedAssetUrl);\n }\n };\n\n const route = new NavigationRoute(handler, {\n whitelist: options.whitelist,\n blacklist: options.blacklist,\n });\n\n const defaultRouter = getOrCreateDefaultRouter();\n defaultRouter.registerRoute(route);\n\n return route;\n};\n","/*\n Copyright 2019 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport {logger} from 'workbox-core/_private/logger.mjs';\nimport {WorkboxError} from 'workbox-core/_private/WorkboxError.mjs';\nimport {Route} from './Route.mjs';\nimport {RegExpRoute} from './RegExpRoute.mjs';\nimport {getOrCreateDefaultRouter} from './utils/getOrCreateDefaultRouter.mjs';\nimport './_version.mjs';\n\n\n/**\n * Easily register a RegExp, string, or function with a caching\n * strategy to a singleton Router instance.\n *\n * This method will generate a Route for you if needed and\n * call [Router.registerRoute()]{@link\n * workbox.routing.Router#registerRoute}.\n *\n * @param {\n * RegExp|\n * string|\n * workbox.routing.Route~matchCallback|\n * workbox.routing.Route\n * } capture\n * If the capture param is a `Route`, all other arguments will be ignored.\n * @param {workbox.routing.Route~handlerCallback} handler A callback\n * function that returns a Promise resulting in a Response.\n * @param {string} [method='GET'] The HTTP method to match the Route\n * against.\n * @return {workbox.routing.Route} The generated `Route`(Useful for\n * unregistering).\n *\n * @alias workbox.routing.registerRoute\n */\nexport const registerRoute = (capture, handler, method = 'GET') => {\n let route;\n\n if (typeof capture === 'string') {\n const captureUrl = new URL(capture, location);\n\n if (process.env.NODE_ENV !== 'production') {\n if (!(capture.startsWith('/') || capture.startsWith('http'))) {\n throw new WorkboxError('invalid-string', {\n moduleName: 'workbox-routing',\n funcName: 'registerRoute',\n paramName: 'capture',\n });\n }\n\n // We want to check if Express-style wildcards are in the pathname only.\n // TODO: Remove this log message in v4.\n const valueToCheck = capture.startsWith('http') ?\n captureUrl.pathname : capture;\n\n // See https://github.com/pillarjs/path-to-regexp#parameters\n const wildcards = '[*:?+]';\n if (valueToCheck.match(new RegExp(`${wildcards}`))) {\n logger.debug(\n `The '$capture' parameter contains an Express-style wildcard ` +\n `character (${wildcards}). Strings are now always interpreted as ` +\n `exact matches; use a RegExp for partial or wildcard matches.`\n );\n }\n }\n\n const matchCallback = ({url}) => {\n if (process.env.NODE_ENV !== 'production') {\n if ((url.pathname === captureUrl.pathname) &&\n (url.origin !== captureUrl.origin)) {\n logger.debug(\n `${capture} only partially matches the cross-origin URL ` +\n `${url}. This route will only handle cross-origin requests ` +\n `if they match the entire URL.`);\n }\n }\n\n return url.href === captureUrl.href;\n };\n\n route = new Route(matchCallback, handler, method);\n } else if (capture instanceof RegExp) {\n route = new RegExpRoute(capture, handler, method);\n } else if (typeof capture === 'function') {\n route = new Route(capture, handler, method);\n } else if (capture instanceof Route) {\n route = capture;\n } else {\n throw new WorkboxError('unsupported-route-type', {\n moduleName: 'workbox-routing',\n funcName: 'registerRoute',\n paramName: 'capture',\n });\n }\n\n const defaultRouter = getOrCreateDefaultRouter();\n defaultRouter.registerRoute(route);\n\n return route;\n};\n","/*\n Copyright 2019 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport {getOrCreateDefaultRouter} from './utils/getOrCreateDefaultRouter.mjs';\n\nimport './_version.mjs';\n\n/**\n * If a Route throws an error while handling a request, this `handler`\n * will be called and given a chance to provide a response.\n *\n * @param {workbox.routing.Route~handlerCallback} handler A callback\n * function that returns a Promise resulting in a Response.\n *\n * @alias workbox.routing.setCatchHandler\n */\nexport const setCatchHandler = (handler) => {\n const defaultRouter = getOrCreateDefaultRouter();\n defaultRouter.setCatchHandler(handler);\n};\n","/*\n Copyright 2019 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport {getOrCreateDefaultRouter} from './utils/getOrCreateDefaultRouter.mjs';\n\nimport './_version.mjs';\n\n/**\n * Define a default `handler` that's called when no routes explicitly\n * match the incoming request.\n *\n * Without a default handler, unmatched requests will go against the\n * network as if there were no service worker present.\n *\n * @param {workbox.routing.Route~handlerCallback} handler A callback\n * function that returns a Promise resulting in a Response.\n *\n * @alias workbox.routing.setDefaultHandler\n */\nexport const setDefaultHandler = (handler) => {\n const defaultRouter = getOrCreateDefaultRouter();\n defaultRouter.setDefaultHandler(handler);\n};\n"],"names":["self","_","e","defaultMethod","normalizeHandler","handler","handle","Route","constructor","match","method","NavigationRoute","whitelist","blacklist","options","this","_match","_whitelist","_blacklist","url","request","mode","pathnameAndSearch","pathname","search","regExp","test","some","RegExpRoute","result","exec","href","origin","location","index","slice","Router","_routes","Map","addFetchListener","addEventListener","event","responsePromise","handleRequest","respondWith","addCacheListener","async","data","type","payload","requestPromises","Promise","all","urlsToCache","map","entry","Request","waitUntil","ports","postMessage","URL","protocol","startsWith","params","route","findMatchingRoute","_defaultHandler","err","reject","_catchHandler","catch","routes","get","matchResult","Array","isArray","length","Object","keys","setDefaultHandler","setCatchHandler","registerRoute","has","set","push","unregisterRoute","WorkboxError","routeIndex","indexOf","splice","defaultRouter","getOrCreateDefaultRouter","cachedAssetUrl","cacheName","cacheNames","getPrecacheName","response","caches","Error","error","fetch","capture","captureUrl","RegExp","moduleName","funcName","paramName"],"mappings":"gFAAA,IAAIA,KAAK,0BAA0BC,IAAI,MAAMC,ICkBtC,MAAMC,EAAgB,MCAhBC,EAAoBC,GAC3BA,GAA8B,iBAAZA,EASbA,EAUA,CAACC,OAAQD,GCfpB,MAAME,EAYJC,YAAYC,EAAOJ,EAASK,QAgBrBL,QAAUD,EAAiBC,QAC3BI,MAAQA,OACRC,OAASA,GAAUP,GCzB5B,MAAMQ,UAAwBJ,EAoB5BC,YAAYH,GAASO,UAACA,EAAY,CAAC,KAAdC,UAAoBA,EAAY,IAAM,UAgBlDC,GAAYC,KAAKC,EAAOF,GAAUT,QAEpCY,EAAaL,OACbM,EAAaL,EAapBG,GAAOG,IAACA,EAADC,QAAMA,OACU,aAAjBA,EAAQC,YACH,QAGHC,EAAoBH,EAAII,SAAWJ,EAAIK,WAExC,MAAMC,KAAUV,KAAKG,KACpBO,EAAOC,KAAKJ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BACdmD,EAAc7C,oBAET6C,wECoB8B,EAACE,EAAgB9E,EAAU,YAS1D+E,EAAYC,aAAWC,gBAAgBjF,EAAQ+E,WA4B/C7B,EAAQ,IAAIrD,EA3BFmC,oBAENkD,QAAiBC,OAAOxF,MAAMmF,EAAgB,CAACC,UAAAA,OAEjDG,SACKA,QAKH,IAAIE,mBAAmBL,kCACtBD,MACP,MAAOO,UAWAC,MAAMR,KAI0B,CACzChF,UAAWE,EAAQF,UACnBC,UAAWC,EAAQD,mBAGC8E,IACRV,cAAcjB,GAErBA,oBCrDoB,EAACqC,EAAShG,EAASK,EAAS,aACnDsD,KAEmB,iBAAZqC,EAAsB,OACzBC,EAAa,IAAI1C,IAAIyC,EAASpE,UAyCpC+B,EAAQ,IAAIzD,EAdU,EAAEY,IAAAA,KAWfA,EAAIY,OAASuE,EAAWvE,KAGA1B,EAASK,QACrC,GAAI2F,aAAmBE,OAC5BvC,EAAQ,IAAIpC,EAAYyE,EAAShG,EAASK,QACrC,GAAuB,mBAAZ2F,EAChBrC,EAAQ,IAAIzD,EAAM8F,EAAShG,EAASK,OAC/B,CAAA,KAAI2F,aAAmB9F,SAGtB,IAAI+E,eAAa,yBAA0B,CAC/CkB,WAAY,kBACZC,SAAU,gBACVC,UAAW,YALb1C,EAAQqC,SASYV,IACRV,cAAcjB,GAErBA,2CClFuB3D,CAAAA,IACRsF,IACRX,gBAAgB3E,yBCCEA,CAAAA,IACVsF,IACRZ,kBAAkB1E"} \ No newline at end of file diff --git a/workbox-v4.3.1/workbox-strategies.dev.js b/workbox-v4.3.1/workbox-strategies.dev.js new file mode 100644 index 0000000000..e88a65d8b7 --- /dev/null +++ b/workbox-v4.3.1/workbox-strategies.dev.js @@ -0,0 +1,1138 @@ +this.workbox = this.workbox || {}; +this.workbox.strategies = (function (exports, logger_mjs, assert_mjs, cacheNames_mjs, cacheWrapper_mjs, fetchWrapper_mjs, getFriendlyURL_mjs, WorkboxError_mjs) { + 'use strict'; + + try { + self['workbox:strategies:4.3.1'] && _(); + } catch (e) {} // eslint-disable-line + + /* + Copyright 2018 Google LLC + + Use of this source code is governed by an MIT-style + license that can be found in the LICENSE file or at + https://opensource.org/licenses/MIT. + */ + + const getFriendlyURL = url => { + const urlObj = new URL(url, location); + + if (urlObj.origin === location.origin) { + return urlObj.pathname; + } + + return urlObj.href; + }; + + const messages = { + strategyStart: (strategyName, request) => `Using ${strategyName} to ` + `respond to '${getFriendlyURL(request.url)}'`, + printFinalResponse: response => { + if (response) { + logger_mjs.logger.groupCollapsed(`View the final response here.`); + logger_mjs.logger.log(response); + logger_mjs.logger.groupEnd(); + } + } + }; + + /* + Copyright 2018 Google LLC + + Use of this source code is governed by an MIT-style + license that can be found in the LICENSE file or at + https://opensource.org/licenses/MIT. + */ + /** + * An implementation of a [cache-first]{@link https://developers.google.com/web/fundamentals/instant-and-offline/offline-cookbook/#cache-falling-back-to-network} + * request strategy. + * + * A cache first strategy is useful for assets that have been revisioned, + * such as URLs like `/styles/example.a8f5f1.css`, since they + * can be cached for long periods of time. + * + * If the network request fails, and there is no cache match, this will throw + * a `WorkboxError` exception. + * + * @memberof workbox.strategies + */ + + class CacheFirst { + /** + * @param {Object} options + * @param {string} options.cacheName Cache name to store and retrieve + * requests. Defaults to cache names provided by + * [workbox-core]{@link workbox.core.cacheNames}. + * @param {Array} options.plugins [Plugins]{@link https://developers.google.com/web/tools/workbox/guides/using-plugins} + * to use in conjunction with this caching strategy. + * @param {Object} options.fetchOptions Values passed along to the + * [`init`](https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/fetch#Parameters) + * of all fetch() requests made by this strategy. + * @param {Object} options.matchOptions [`CacheQueryOptions`](https://w3c.github.io/ServiceWorker/#dictdef-cachequeryoptions) + */ + constructor(options = {}) { + this._cacheName = cacheNames_mjs.cacheNames.getRuntimeName(options.cacheName); + this._plugins = options.plugins || []; + this._fetchOptions = options.fetchOptions || null; + this._matchOptions = options.matchOptions || null; + } + /** + * This method will perform a request strategy and follows an API that + * will work with the + * [Workbox Router]{@link workbox.routing.Router}. + * + * @param {Object} options + * @param {Request} options.request The request to run this strategy for. + * @param {Event} [options.event] The event that triggered the request. + * @return {Promise} + */ + + + async handle({ + event, + request + }) { + return this.makeRequest({ + event, + request: request || event.request + }); + } + /** + * This method can be used to perform a make a standalone request outside the + * context of the [Workbox Router]{@link workbox.routing.Router}. + * + * See "[Advanced Recipes](https://developers.google.com/web/tools/workbox/guides/advanced-recipes#make-requests)" + * for more usage information. + * + * @param {Object} options + * @param {Request|string} options.request Either a + * [`Request`]{@link https://developer.mozilla.org/en-US/docs/Web/API/Request} + * object, or a string URL, corresponding to the request to be made. + * @param {FetchEvent} [options.event] If provided, `event.waitUntil()` will + be called automatically to extend the service worker's lifetime. + * @return {Promise} + */ + + + async makeRequest({ + event, + request + }) { + const logs = []; + + if (typeof request === 'string') { + request = new Request(request); + } + + { + assert_mjs.assert.isInstance(request, Request, { + moduleName: 'workbox-strategies', + className: 'CacheFirst', + funcName: 'makeRequest', + paramName: 'request' + }); + } + + let response = await cacheWrapper_mjs.cacheWrapper.match({ + cacheName: this._cacheName, + request, + event, + matchOptions: this._matchOptions, + plugins: this._plugins + }); + let error; + + if (!response) { + { + logs.push(`No response found in the '${this._cacheName}' cache. ` + `Will respond with a network request.`); + } + + try { + response = await this._getFromNetwork(request, event); + } catch (err) { + error = err; + } + + { + if (response) { + logs.push(`Got response from network.`); + } else { + logs.push(`Unable to get a response from the network.`); + } + } + } else { + { + logs.push(`Found a cached response in the '${this._cacheName}' cache.`); + } + } + + { + logger_mjs.logger.groupCollapsed(messages.strategyStart('CacheFirst', request)); + + for (let log of logs) { + logger_mjs.logger.log(log); + } + + messages.printFinalResponse(response); + logger_mjs.logger.groupEnd(); + } + + if (!response) { + throw new WorkboxError_mjs.WorkboxError('no-response', { + url: request.url, + error + }); + } + + return response; + } + /** + * Handles the network and cache part of CacheFirst. + * + * @param {Request} request + * @param {FetchEvent} [event] + * @return {Promise} + * + * @private + */ + + + async _getFromNetwork(request, event) { + const response = await fetchWrapper_mjs.fetchWrapper.fetch({ + request, + event, + fetchOptions: this._fetchOptions, + plugins: this._plugins + }); // Keep the service worker while we put the request to the cache + + const responseClone = response.clone(); + const cachePutPromise = cacheWrapper_mjs.cacheWrapper.put({ + cacheName: this._cacheName, + request, + response: responseClone, + event, + plugins: this._plugins + }); + + if (event) { + try { + event.waitUntil(cachePutPromise); + } catch (error) { + { + logger_mjs.logger.warn(`Unable to ensure service worker stays alive when ` + `updating cache for '${getFriendlyURL_mjs.getFriendlyURL(request.url)}'.`); + } + } + } + + return response; + } + + } + + /* + Copyright 2018 Google LLC + + Use of this source code is governed by an MIT-style + license that can be found in the LICENSE file or at + https://opensource.org/licenses/MIT. + */ + /** + * An implementation of a + * [cache-only]{@link https://developers.google.com/web/fundamentals/instant-and-offline/offline-cookbook/#cache-only} + * request strategy. + * + * This class is useful if you want to take advantage of any + * [Workbox plugins]{@link https://developers.google.com/web/tools/workbox/guides/using-plugins}. + * + * If there is no cache match, this will throw a `WorkboxError` exception. + * + * @memberof workbox.strategies + */ + + class CacheOnly { + /** + * @param {Object} options + * @param {string} options.cacheName Cache name to store and retrieve + * requests. Defaults to cache names provided by + * [workbox-core]{@link workbox.core.cacheNames}. + * @param {Array} options.plugins [Plugins]{@link https://developers.google.com/web/tools/workbox/guides/using-plugins} + * to use in conjunction with this caching strategy. + * @param {Object} options.matchOptions [`CacheQueryOptions`](https://w3c.github.io/ServiceWorker/#dictdef-cachequeryoptions) + */ + constructor(options = {}) { + this._cacheName = cacheNames_mjs.cacheNames.getRuntimeName(options.cacheName); + this._plugins = options.plugins || []; + this._matchOptions = options.matchOptions || null; + } + /** + * This method will perform a request strategy and follows an API that + * will work with the + * [Workbox Router]{@link workbox.routing.Router}. + * + * @param {Object} options + * @param {Request} options.request The request to run this strategy for. + * @param {Event} [options.event] The event that triggered the request. + * @return {Promise} + */ + + + async handle({ + event, + request + }) { + return this.makeRequest({ + event, + request: request || event.request + }); + } + /** + * This method can be used to perform a make a standalone request outside the + * context of the [Workbox Router]{@link workbox.routing.Router}. + * + * See "[Advanced Recipes](https://developers.google.com/web/tools/workbox/guides/advanced-recipes#make-requests)" + * for more usage information. + * + * @param {Object} options + * @param {Request|string} options.request Either a + * [`Request`]{@link https://developer.mozilla.org/en-US/docs/Web/API/Request} + * object, or a string URL, corresponding to the request to be made. + * @param {FetchEvent} [options.event] If provided, `event.waitUntil()` will + * be called automatically to extend the service worker's lifetime. + * @return {Promise} + */ + + + async makeRequest({ + event, + request + }) { + if (typeof request === 'string') { + request = new Request(request); + } + + { + assert_mjs.assert.isInstance(request, Request, { + moduleName: 'workbox-strategies', + className: 'CacheOnly', + funcName: 'makeRequest', + paramName: 'request' + }); + } + + const response = await cacheWrapper_mjs.cacheWrapper.match({ + cacheName: this._cacheName, + request, + event, + matchOptions: this._matchOptions, + plugins: this._plugins + }); + + { + logger_mjs.logger.groupCollapsed(messages.strategyStart('CacheOnly', request)); + + if (response) { + logger_mjs.logger.log(`Found a cached response in the '${this._cacheName}'` + ` cache.`); + messages.printFinalResponse(response); + } else { + logger_mjs.logger.log(`No response found in the '${this._cacheName}' cache.`); + } + + logger_mjs.logger.groupEnd(); + } + + if (!response) { + throw new WorkboxError_mjs.WorkboxError('no-response', { + url: request.url + }); + } + + return response; + } + + } + + /* + Copyright 2018 Google LLC + + Use of this source code is governed by an MIT-style + license that can be found in the LICENSE file or at + https://opensource.org/licenses/MIT. + */ + const cacheOkAndOpaquePlugin = { + /** + * Returns a valid response (to allow caching) if the status is 200 (OK) or + * 0 (opaque). + * + * @param {Object} options + * @param {Response} options.response + * @return {Response|null} + * + * @private + */ + cacheWillUpdate: ({ + response + }) => { + if (response.status === 200 || response.status === 0) { + return response; + } + + return null; + } + }; + + /* + Copyright 2018 Google LLC + + Use of this source code is governed by an MIT-style + license that can be found in the LICENSE file or at + https://opensource.org/licenses/MIT. + */ + /** + * An implementation of a + * [network first]{@link https://developers.google.com/web/fundamentals/instant-and-offline/offline-cookbook/#network-falling-back-to-cache} + * request strategy. + * + * By default, this strategy will cache responses with a 200 status code as + * well as [opaque responses]{@link https://developers.google.com/web/tools/workbox/guides/handle-third-party-requests}. + * Opaque responses are are cross-origin requests where the response doesn't + * support [CORS]{@link https://enable-cors.org/}. + * + * If the network request fails, and there is no cache match, this will throw + * a `WorkboxError` exception. + * + * @memberof workbox.strategies + */ + + class NetworkFirst { + /** + * @param {Object} options + * @param {string} options.cacheName Cache name to store and retrieve + * requests. Defaults to cache names provided by + * [workbox-core]{@link workbox.core.cacheNames}. + * @param {Array} options.plugins [Plugins]{@link https://developers.google.com/web/tools/workbox/guides/using-plugins} + * to use in conjunction with this caching strategy. + * @param {Object} options.fetchOptions Values passed along to the + * [`init`](https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/fetch#Parameters) + * of all fetch() requests made by this strategy. + * @param {Object} options.matchOptions [`CacheQueryOptions`](https://w3c.github.io/ServiceWorker/#dictdef-cachequeryoptions) + * @param {number} options.networkTimeoutSeconds If set, any network requests + * that fail to respond within the timeout will fallback to the cache. + * + * This option can be used to combat + * "[lie-fi]{@link https://developers.google.com/web/fundamentals/performance/poor-connectivity/#lie-fi}" + * scenarios. + */ + constructor(options = {}) { + this._cacheName = cacheNames_mjs.cacheNames.getRuntimeName(options.cacheName); + + if (options.plugins) { + let isUsingCacheWillUpdate = options.plugins.some(plugin => !!plugin.cacheWillUpdate); + this._plugins = isUsingCacheWillUpdate ? options.plugins : [cacheOkAndOpaquePlugin, ...options.plugins]; + } else { + // No plugins passed in, use the default plugin. + this._plugins = [cacheOkAndOpaquePlugin]; + } + + this._networkTimeoutSeconds = options.networkTimeoutSeconds; + + { + if (this._networkTimeoutSeconds) { + assert_mjs.assert.isType(this._networkTimeoutSeconds, 'number', { + moduleName: 'workbox-strategies', + className: 'NetworkFirst', + funcName: 'constructor', + paramName: 'networkTimeoutSeconds' + }); + } + } + + this._fetchOptions = options.fetchOptions || null; + this._matchOptions = options.matchOptions || null; + } + /** + * This method will perform a request strategy and follows an API that + * will work with the + * [Workbox Router]{@link workbox.routing.Router}. + * + * @param {Object} options + * @param {Request} options.request The request to run this strategy for. + * @param {Event} [options.event] The event that triggered the request. + * @return {Promise} + */ + + + async handle({ + event, + request + }) { + return this.makeRequest({ + event, + request: request || event.request + }); + } + /** + * This method can be used to perform a make a standalone request outside the + * context of the [Workbox Router]{@link workbox.routing.Router}. + * + * See "[Advanced Recipes](https://developers.google.com/web/tools/workbox/guides/advanced-recipes#make-requests)" + * for more usage information. + * + * @param {Object} options + * @param {Request|string} options.request Either a + * [`Request`]{@link https://developer.mozilla.org/en-US/docs/Web/API/Request} + * object, or a string URL, corresponding to the request to be made. + * @param {FetchEvent} [options.event] If provided, `event.waitUntil()` will + * be called automatically to extend the service worker's lifetime. + * @return {Promise} + */ + + + async makeRequest({ + event, + request + }) { + const logs = []; + + if (typeof request === 'string') { + request = new Request(request); + } + + { + assert_mjs.assert.isInstance(request, Request, { + moduleName: 'workbox-strategies', + className: 'NetworkFirst', + funcName: 'handle', + paramName: 'makeRequest' + }); + } + + const promises = []; + let timeoutId; + + if (this._networkTimeoutSeconds) { + const { + id, + promise + } = this._getTimeoutPromise({ + request, + event, + logs + }); + + timeoutId = id; + promises.push(promise); + } + + const networkPromise = this._getNetworkPromise({ + timeoutId, + request, + event, + logs + }); + + promises.push(networkPromise); // Promise.race() will resolve as soon as the first promise resolves. + + let response = await Promise.race(promises); // If Promise.race() resolved with null, it might be due to a network + // timeout + a cache miss. If that were to happen, we'd rather wait until + // the networkPromise resolves instead of returning null. + // Note that it's fine to await an already-resolved promise, so we don't + // have to check to see if it's still "in flight". + + if (!response) { + response = await networkPromise; + } + + { + logger_mjs.logger.groupCollapsed(messages.strategyStart('NetworkFirst', request)); + + for (let log of logs) { + logger_mjs.logger.log(log); + } + + messages.printFinalResponse(response); + logger_mjs.logger.groupEnd(); + } + + if (!response) { + throw new WorkboxError_mjs.WorkboxError('no-response', { + url: request.url + }); + } + + return response; + } + /** + * @param {Object} options + * @param {Request} options.request + * @param {Array} options.logs A reference to the logs array + * @param {Event} [options.event] + * @return {Promise} + * + * @private + */ + + + _getTimeoutPromise({ + request, + logs, + event + }) { + let timeoutId; + const timeoutPromise = new Promise(resolve => { + const onNetworkTimeout = async () => { + { + logs.push(`Timing out the network response at ` + `${this._networkTimeoutSeconds} seconds.`); + } + + resolve((await this._respondFromCache({ + request, + event + }))); + }; + + timeoutId = setTimeout(onNetworkTimeout, this._networkTimeoutSeconds * 1000); + }); + return { + promise: timeoutPromise, + id: timeoutId + }; + } + /** + * @param {Object} options + * @param {number|undefined} options.timeoutId + * @param {Request} options.request + * @param {Array} options.logs A reference to the logs Array. + * @param {Event} [options.event] + * @return {Promise} + * + * @private + */ + + + async _getNetworkPromise({ + timeoutId, + request, + logs, + event + }) { + let error; + let response; + + try { + response = await fetchWrapper_mjs.fetchWrapper.fetch({ + request, + event, + fetchOptions: this._fetchOptions, + plugins: this._plugins + }); + } catch (err) { + error = err; + } + + if (timeoutId) { + clearTimeout(timeoutId); + } + + { + if (response) { + logs.push(`Got response from network.`); + } else { + logs.push(`Unable to get a response from the network. Will respond ` + `with a cached response.`); + } + } + + if (error || !response) { + response = await this._respondFromCache({ + request, + event + }); + + { + if (response) { + logs.push(`Found a cached response in the '${this._cacheName}'` + ` cache.`); + } else { + logs.push(`No response found in the '${this._cacheName}' cache.`); + } + } + } else { + // Keep the service worker alive while we put the request in the cache + const responseClone = response.clone(); + const cachePut = cacheWrapper_mjs.cacheWrapper.put({ + cacheName: this._cacheName, + request, + response: responseClone, + event, + plugins: this._plugins + }); + + if (event) { + try { + // The event has been responded to so we can keep the SW alive to + // respond to the request + event.waitUntil(cachePut); + } catch (err) { + { + logger_mjs.logger.warn(`Unable to ensure service worker stays alive when ` + `updating cache for '${getFriendlyURL_mjs.getFriendlyURL(request.url)}'.`); + } + } + } + } + + return response; + } + /** + * Used if the network timeouts or fails to make the request. + * + * @param {Object} options + * @param {Request} request The request to match in the cache + * @param {Event} [options.event] + * @return {Promise} + * + * @private + */ + + + _respondFromCache({ + event, + request + }) { + return cacheWrapper_mjs.cacheWrapper.match({ + cacheName: this._cacheName, + request, + event, + matchOptions: this._matchOptions, + plugins: this._plugins + }); + } + + } + + /* + Copyright 2018 Google LLC + + Use of this source code is governed by an MIT-style + license that can be found in the LICENSE file or at + https://opensource.org/licenses/MIT. + */ + /** + * An implementation of a + * [network-only]{@link https://developers.google.com/web/fundamentals/instant-and-offline/offline-cookbook/#network-only} + * request strategy. + * + * This class is useful if you want to take advantage of any + * [Workbox plugins]{@link https://developers.google.com/web/tools/workbox/guides/using-plugins}. + * + * If the network request fails, this will throw a `WorkboxError` exception. + * + * @memberof workbox.strategies + */ + + class NetworkOnly { + /** + * @param {Object} options + * @param {string} options.cacheName Cache name to store and retrieve + * requests. Defaults to cache names provided by + * [workbox-core]{@link workbox.core.cacheNames}. + * @param {Array} options.plugins [Plugins]{@link https://developers.google.com/web/tools/workbox/guides/using-plugins} + * to use in conjunction with this caching strategy. + * @param {Object} options.fetchOptions Values passed along to the + * [`init`](https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/fetch#Parameters) + * of all fetch() requests made by this strategy. + */ + constructor(options = {}) { + this._cacheName = cacheNames_mjs.cacheNames.getRuntimeName(options.cacheName); + this._plugins = options.plugins || []; + this._fetchOptions = options.fetchOptions || null; + } + /** + * This method will perform a request strategy and follows an API that + * will work with the + * [Workbox Router]{@link workbox.routing.Router}. + * + * @param {Object} options + * @param {Request} options.request The request to run this strategy for. + * @param {Event} [options.event] The event that triggered the request. + * @return {Promise} + */ + + + async handle({ + event, + request + }) { + return this.makeRequest({ + event, + request: request || event.request + }); + } + /** + * This method can be used to perform a make a standalone request outside the + * context of the [Workbox Router]{@link workbox.routing.Router}. + * + * See "[Advanced Recipes](https://developers.google.com/web/tools/workbox/guides/advanced-recipes#make-requests)" + * for more usage information. + * + * @param {Object} options + * @param {Request|string} options.request Either a + * [`Request`]{@link https://developer.mozilla.org/en-US/docs/Web/API/Request} + * object, or a string URL, corresponding to the request to be made. + * @param {FetchEvent} [options.event] If provided, `event.waitUntil()` will + * be called automatically to extend the service worker's lifetime. + * @return {Promise} + */ + + + async makeRequest({ + event, + request + }) { + if (typeof request === 'string') { + request = new Request(request); + } + + { + assert_mjs.assert.isInstance(request, Request, { + moduleName: 'workbox-strategies', + className: 'NetworkOnly', + funcName: 'handle', + paramName: 'request' + }); + } + + let error; + let response; + + try { + response = await fetchWrapper_mjs.fetchWrapper.fetch({ + request, + event, + fetchOptions: this._fetchOptions, + plugins: this._plugins + }); + } catch (err) { + error = err; + } + + { + logger_mjs.logger.groupCollapsed(messages.strategyStart('NetworkOnly', request)); + + if (response) { + logger_mjs.logger.log(`Got response from network.`); + } else { + logger_mjs.logger.log(`Unable to get a response from the network.`); + } + + messages.printFinalResponse(response); + logger_mjs.logger.groupEnd(); + } + + if (!response) { + throw new WorkboxError_mjs.WorkboxError('no-response', { + url: request.url, + error + }); + } + + return response; + } + + } + + /* + Copyright 2018 Google LLC + + Use of this source code is governed by an MIT-style + license that can be found in the LICENSE file or at + https://opensource.org/licenses/MIT. + */ + /** + * An implementation of a + * [stale-while-revalidate]{@link https://developers.google.com/web/fundamentals/instant-and-offline/offline-cookbook/#stale-while-revalidate} + * request strategy. + * + * Resources are requested from both the cache and the network in parallel. + * The strategy will respond with the cached version if available, otherwise + * wait for the network response. The cache is updated with the network response + * with each successful request. + * + * By default, this strategy will cache responses with a 200 status code as + * well as [opaque responses]{@link https://developers.google.com/web/tools/workbox/guides/handle-third-party-requests}. + * Opaque responses are are cross-origin requests where the response doesn't + * support [CORS]{@link https://enable-cors.org/}. + * + * If the network request fails, and there is no cache match, this will throw + * a `WorkboxError` exception. + * + * @memberof workbox.strategies + */ + + class StaleWhileRevalidate { + /** + * @param {Object} options + * @param {string} options.cacheName Cache name to store and retrieve + * requests. Defaults to cache names provided by + * [workbox-core]{@link workbox.core.cacheNames}. + * @param {Array} options.plugins [Plugins]{@link https://developers.google.com/web/tools/workbox/guides/using-plugins} + * to use in conjunction with this caching strategy. + * @param {Object} options.fetchOptions Values passed along to the + * [`init`](https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/fetch#Parameters) + * of all fetch() requests made by this strategy. + * @param {Object} options.matchOptions [`CacheQueryOptions`](https://w3c.github.io/ServiceWorker/#dictdef-cachequeryoptions) + */ + constructor(options = {}) { + this._cacheName = cacheNames_mjs.cacheNames.getRuntimeName(options.cacheName); + this._plugins = options.plugins || []; + + if (options.plugins) { + let isUsingCacheWillUpdate = options.plugins.some(plugin => !!plugin.cacheWillUpdate); + this._plugins = isUsingCacheWillUpdate ? options.plugins : [cacheOkAndOpaquePlugin, ...options.plugins]; + } else { + // No plugins passed in, use the default plugin. + this._plugins = [cacheOkAndOpaquePlugin]; + } + + this._fetchOptions = options.fetchOptions || null; + this._matchOptions = options.matchOptions || null; + } + /** + * This method will perform a request strategy and follows an API that + * will work with the + * [Workbox Router]{@link workbox.routing.Router}. + * + * @param {Object} options + * @param {Request} options.request The request to run this strategy for. + * @param {Event} [options.event] The event that triggered the request. + * @return {Promise} + */ + + + async handle({ + event, + request + }) { + return this.makeRequest({ + event, + request: request || event.request + }); + } + /** + * This method can be used to perform a make a standalone request outside the + * context of the [Workbox Router]{@link workbox.routing.Router}. + * + * See "[Advanced Recipes](https://developers.google.com/web/tools/workbox/guides/advanced-recipes#make-requests)" + * for more usage information. + * + * @param {Object} options + * @param {Request|string} options.request Either a + * [`Request`]{@link https://developer.mozilla.org/en-US/docs/Web/API/Request} + * object, or a string URL, corresponding to the request to be made. + * @param {FetchEvent} [options.event] If provided, `event.waitUntil()` will + * be called automatically to extend the service worker's lifetime. + * @return {Promise} + */ + + + async makeRequest({ + event, + request + }) { + const logs = []; + + if (typeof request === 'string') { + request = new Request(request); + } + + { + assert_mjs.assert.isInstance(request, Request, { + moduleName: 'workbox-strategies', + className: 'StaleWhileRevalidate', + funcName: 'handle', + paramName: 'request' + }); + } + + const fetchAndCachePromise = this._getFromNetwork({ + request, + event + }); + + let response = await cacheWrapper_mjs.cacheWrapper.match({ + cacheName: this._cacheName, + request, + event, + matchOptions: this._matchOptions, + plugins: this._plugins + }); + let error; + + if (response) { + { + logs.push(`Found a cached response in the '${this._cacheName}'` + ` cache. Will update with the network response in the background.`); + } + + if (event) { + try { + event.waitUntil(fetchAndCachePromise); + } catch (error) { + { + logger_mjs.logger.warn(`Unable to ensure service worker stays alive when ` + `updating cache for '${getFriendlyURL_mjs.getFriendlyURL(request.url)}'.`); + } + } + } + } else { + { + logs.push(`No response found in the '${this._cacheName}' cache. ` + `Will wait for the network response.`); + } + + try { + response = await fetchAndCachePromise; + } catch (err) { + error = err; + } + } + + { + logger_mjs.logger.groupCollapsed(messages.strategyStart('StaleWhileRevalidate', request)); + + for (let log of logs) { + logger_mjs.logger.log(log); + } + + messages.printFinalResponse(response); + logger_mjs.logger.groupEnd(); + } + + if (!response) { + throw new WorkboxError_mjs.WorkboxError('no-response', { + url: request.url, + error + }); + } + + return response; + } + /** + * @param {Object} options + * @param {Request} options.request + * @param {Event} [options.event] + * @return {Promise} + * + * @private + */ + + + async _getFromNetwork({ + request, + event + }) { + const response = await fetchWrapper_mjs.fetchWrapper.fetch({ + request, + event, + fetchOptions: this._fetchOptions, + plugins: this._plugins + }); + const cachePutPromise = cacheWrapper_mjs.cacheWrapper.put({ + cacheName: this._cacheName, + request, + response: response.clone(), + event, + plugins: this._plugins + }); + + if (event) { + try { + event.waitUntil(cachePutPromise); + } catch (error) { + { + logger_mjs.logger.warn(`Unable to ensure service worker stays alive when ` + `updating cache for '${getFriendlyURL_mjs.getFriendlyURL(request.url)}'.`); + } + } + } + + return response; + } + + } + + /* + Copyright 2018 Google LLC + + Use of this source code is governed by an MIT-style + license that can be found in the LICENSE file or at + https://opensource.org/licenses/MIT. + */ + const mapping = { + cacheFirst: CacheFirst, + cacheOnly: CacheOnly, + networkFirst: NetworkFirst, + networkOnly: NetworkOnly, + staleWhileRevalidate: StaleWhileRevalidate + }; + + const deprecate = strategy => { + const StrategyCtr = mapping[strategy]; + return options => { + { + const strategyCtrName = strategy[0].toUpperCase() + strategy.slice(1); + logger_mjs.logger.warn(`The 'workbox.strategies.${strategy}()' function has been ` + `deprecated and will be removed in a future version of Workbox.\n` + `Please use 'new workbox.strategies.${strategyCtrName}()' instead.`); + } + + return new StrategyCtr(options); + }; + }; + /** + * @function workbox.strategies.cacheFirst + * @param {Object} options See the {@link workbox.strategies.CacheFirst} + * constructor for more info. + * @deprecated since v4.0.0 + */ + + + const cacheFirst = deprecate('cacheFirst'); + /** + * @function workbox.strategies.cacheOnly + * @param {Object} options See the {@link workbox.strategies.CacheOnly} + * constructor for more info. + * @deprecated since v4.0.0 + */ + + const cacheOnly = deprecate('cacheOnly'); + /** + * @function workbox.strategies.networkFirst + * @param {Object} options See the {@link workbox.strategies.NetworkFirst} + * constructor for more info. + * @deprecated since v4.0.0 + */ + + const networkFirst = deprecate('networkFirst'); + /** + * @function workbox.strategies.networkOnly + * @param {Object} options See the {@link workbox.strategies.NetworkOnly} + * constructor for more info. + * @deprecated since v4.0.0 + */ + + const networkOnly = deprecate('networkOnly'); + /** + * @function workbox.strategies.staleWhileRevalidate + * @param {Object} options See the + * {@link workbox.strategies.StaleWhileRevalidate} constructor for more info. + * @deprecated since v4.0.0 + */ + + const staleWhileRevalidate = deprecate('staleWhileRevalidate'); + + exports.CacheFirst = CacheFirst; + exports.CacheOnly = CacheOnly; + exports.NetworkFirst = NetworkFirst; + exports.NetworkOnly = NetworkOnly; + exports.StaleWhileRevalidate = StaleWhileRevalidate; + exports.cacheFirst = cacheFirst; + exports.cacheOnly = cacheOnly; + exports.networkFirst = networkFirst; + exports.networkOnly = networkOnly; + exports.staleWhileRevalidate = staleWhileRevalidate; + + return exports; + +}({}, workbox.core._private, workbox.core._private, workbox.core._private, workbox.core._private, workbox.core._private, workbox.core._private, workbox.core._private)); +//# sourceMappingURL=workbox-strategies.dev.js.map diff --git a/workbox-v4.3.1/workbox-strategies.dev.js.map b/workbox-v4.3.1/workbox-strategies.dev.js.map new file mode 100644 index 0000000000..12df5e6498 --- /dev/null +++ b/workbox-v4.3.1/workbox-strategies.dev.js.map @@ -0,0 +1 @@ +{"version":3,"file":"workbox-strategies.dev.js","sources":["../_version.mjs","../utils/messages.mjs","../CacheFirst.mjs","../CacheOnly.mjs","../plugins/cacheOkAndOpaquePlugin.mjs","../NetworkFirst.mjs","../NetworkOnly.mjs","../StaleWhileRevalidate.mjs","../index.mjs"],"sourcesContent":["try{self['workbox:strategies:4.3.1']&&_()}catch(e){}// eslint-disable-line","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport {logger} from 'workbox-core/_private/logger.mjs';\nimport '../_version.mjs';\n\nconst getFriendlyURL = (url) => {\n const urlObj = new URL(url, location);\n if (urlObj.origin === location.origin) {\n return urlObj.pathname;\n }\n return urlObj.href;\n};\n\nexport const messages = {\n strategyStart: (strategyName, request) => `Using ${strategyName} to ` +\n `respond to '${getFriendlyURL(request.url)}'`,\n printFinalResponse: (response) => {\n if (response) {\n logger.groupCollapsed(`View the final response here.`);\n logger.log(response);\n logger.groupEnd();\n }\n },\n};\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport {assert} from 'workbox-core/_private/assert.mjs';\nimport {cacheNames} from 'workbox-core/_private/cacheNames.mjs';\nimport {cacheWrapper} from 'workbox-core/_private/cacheWrapper.mjs';\nimport {fetchWrapper} from 'workbox-core/_private/fetchWrapper.mjs';\nimport {getFriendlyURL} from 'workbox-core/_private/getFriendlyURL.mjs';\nimport {logger} from 'workbox-core/_private/logger.mjs';\nimport {WorkboxError} from 'workbox-core/_private/WorkboxError.mjs';\n\nimport {messages} from './utils/messages.mjs';\nimport './_version.mjs';\n\n/**\n * An implementation of a [cache-first]{@link https://developers.google.com/web/fundamentals/instant-and-offline/offline-cookbook/#cache-falling-back-to-network}\n * request strategy.\n *\n * A cache first strategy is useful for assets that have been revisioned,\n * such as URLs like `/styles/example.a8f5f1.css`, since they\n * can be cached for long periods of time.\n *\n * If the network request fails, and there is no cache match, this will throw\n * a `WorkboxError` exception.\n *\n * @memberof workbox.strategies\n */\nclass CacheFirst {\n /**\n * @param {Object} options\n * @param {string} options.cacheName Cache name to store and retrieve\n * requests. Defaults to cache names provided by\n * [workbox-core]{@link workbox.core.cacheNames}.\n * @param {Array} options.plugins [Plugins]{@link https://developers.google.com/web/tools/workbox/guides/using-plugins}\n * to use in conjunction with this caching strategy.\n * @param {Object} options.fetchOptions Values passed along to the\n * [`init`](https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/fetch#Parameters)\n * of all fetch() requests made by this strategy.\n * @param {Object} options.matchOptions [`CacheQueryOptions`](https://w3c.github.io/ServiceWorker/#dictdef-cachequeryoptions)\n */\n constructor(options = {}) {\n this._cacheName = cacheNames.getRuntimeName(options.cacheName);\n this._plugins = options.plugins || [];\n this._fetchOptions = options.fetchOptions || null;\n this._matchOptions = options.matchOptions || null;\n }\n\n /**\n * This method will perform a request strategy and follows an API that\n * will work with the\n * [Workbox Router]{@link workbox.routing.Router}.\n *\n * @param {Object} options\n * @param {Request} options.request The request to run this strategy for.\n * @param {Event} [options.event] The event that triggered the request.\n * @return {Promise}\n */\n async handle({event, request}) {\n return this.makeRequest({\n event,\n request: request || event.request,\n });\n }\n\n /**\n * This method can be used to perform a make a standalone request outside the\n * context of the [Workbox Router]{@link workbox.routing.Router}.\n *\n * See \"[Advanced Recipes](https://developers.google.com/web/tools/workbox/guides/advanced-recipes#make-requests)\"\n * for more usage information.\n *\n * @param {Object} options\n * @param {Request|string} options.request Either a\n * [`Request`]{@link https://developer.mozilla.org/en-US/docs/Web/API/Request}\n * object, or a string URL, corresponding to the request to be made.\n * @param {FetchEvent} [options.event] If provided, `event.waitUntil()` will\n be called automatically to extend the service worker's lifetime.\n * @return {Promise}\n */\n async makeRequest({event, request}) {\n const logs = [];\n\n if (typeof request === 'string') {\n request = new Request(request);\n }\n\n if (process.env.NODE_ENV !== 'production') {\n assert.isInstance(request, Request, {\n moduleName: 'workbox-strategies',\n className: 'CacheFirst',\n funcName: 'makeRequest',\n paramName: 'request',\n });\n }\n\n let response = await cacheWrapper.match({\n cacheName: this._cacheName,\n request,\n event,\n matchOptions: this._matchOptions,\n plugins: this._plugins,\n });\n\n let error;\n if (!response) {\n if (process.env.NODE_ENV !== 'production') {\n logs.push(\n `No response found in the '${this._cacheName}' cache. ` +\n `Will respond with a network request.`);\n }\n try {\n response = await this._getFromNetwork(request, event);\n } catch (err) {\n error = err;\n }\n\n if (process.env.NODE_ENV !== 'production') {\n if (response) {\n logs.push(`Got response from network.`);\n } else {\n logs.push(`Unable to get a response from the network.`);\n }\n }\n } else {\n if (process.env.NODE_ENV !== 'production') {\n logs.push(\n `Found a cached response in the '${this._cacheName}' cache.`);\n }\n }\n\n if (process.env.NODE_ENV !== 'production') {\n logger.groupCollapsed(\n messages.strategyStart('CacheFirst', request));\n for (let log of logs) {\n logger.log(log);\n }\n messages.printFinalResponse(response);\n logger.groupEnd();\n }\n\n if (!response) {\n throw new WorkboxError('no-response', {url: request.url, error});\n }\n return response;\n }\n\n /**\n * Handles the network and cache part of CacheFirst.\n *\n * @param {Request} request\n * @param {FetchEvent} [event]\n * @return {Promise}\n *\n * @private\n */\n async _getFromNetwork(request, event) {\n const response = await fetchWrapper.fetch({\n request,\n event,\n fetchOptions: this._fetchOptions,\n plugins: this._plugins,\n });\n\n // Keep the service worker while we put the request to the cache\n const responseClone = response.clone();\n const cachePutPromise = cacheWrapper.put({\n cacheName: this._cacheName,\n request,\n response: responseClone,\n event,\n plugins: this._plugins,\n });\n\n if (event) {\n try {\n event.waitUntil(cachePutPromise);\n } catch (error) {\n if (process.env.NODE_ENV !== 'production') {\n logger.warn(`Unable to ensure service worker stays alive when ` +\n `updating cache for '${getFriendlyURL(request.url)}'.`);\n }\n }\n }\n\n return response;\n }\n}\n\nexport {CacheFirst};\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport {assert} from 'workbox-core/_private/assert.mjs';\nimport {cacheNames} from 'workbox-core/_private/cacheNames.mjs';\nimport {cacheWrapper} from 'workbox-core/_private/cacheWrapper.mjs';\nimport {logger} from 'workbox-core/_private/logger.mjs';\nimport {WorkboxError} from 'workbox-core/_private/WorkboxError.mjs';\n\nimport {messages} from './utils/messages.mjs';\nimport './_version.mjs';\n\n\n/**\n * An implementation of a\n * [cache-only]{@link https://developers.google.com/web/fundamentals/instant-and-offline/offline-cookbook/#cache-only}\n * request strategy.\n *\n * This class is useful if you want to take advantage of any\n * [Workbox plugins]{@link https://developers.google.com/web/tools/workbox/guides/using-plugins}.\n *\n * If there is no cache match, this will throw a `WorkboxError` exception.\n *\n * @memberof workbox.strategies\n */\nclass CacheOnly {\n /**\n * @param {Object} options\n * @param {string} options.cacheName Cache name to store and retrieve\n * requests. Defaults to cache names provided by\n * [workbox-core]{@link workbox.core.cacheNames}.\n * @param {Array} options.plugins [Plugins]{@link https://developers.google.com/web/tools/workbox/guides/using-plugins}\n * to use in conjunction with this caching strategy.\n * @param {Object} options.matchOptions [`CacheQueryOptions`](https://w3c.github.io/ServiceWorker/#dictdef-cachequeryoptions)\n */\n constructor(options = {}) {\n this._cacheName = cacheNames.getRuntimeName(options.cacheName);\n this._plugins = options.plugins || [];\n this._matchOptions = options.matchOptions || null;\n }\n\n /**\n * This method will perform a request strategy and follows an API that\n * will work with the\n * [Workbox Router]{@link workbox.routing.Router}.\n *\n * @param {Object} options\n * @param {Request} options.request The request to run this strategy for.\n * @param {Event} [options.event] The event that triggered the request.\n * @return {Promise}\n */\n async handle({event, request}) {\n return this.makeRequest({\n event,\n request: request || event.request,\n });\n }\n\n /**\n * This method can be used to perform a make a standalone request outside the\n * context of the [Workbox Router]{@link workbox.routing.Router}.\n *\n * See \"[Advanced Recipes](https://developers.google.com/web/tools/workbox/guides/advanced-recipes#make-requests)\"\n * for more usage information.\n *\n * @param {Object} options\n * @param {Request|string} options.request Either a\n * [`Request`]{@link https://developer.mozilla.org/en-US/docs/Web/API/Request}\n * object, or a string URL, corresponding to the request to be made.\n * @param {FetchEvent} [options.event] If provided, `event.waitUntil()` will\n * be called automatically to extend the service worker's lifetime.\n * @return {Promise}\n */\n async makeRequest({event, request}) {\n if (typeof request === 'string') {\n request = new Request(request);\n }\n\n if (process.env.NODE_ENV !== 'production') {\n assert.isInstance(request, Request, {\n moduleName: 'workbox-strategies',\n className: 'CacheOnly',\n funcName: 'makeRequest',\n paramName: 'request',\n });\n }\n\n const response = await cacheWrapper.match({\n cacheName: this._cacheName,\n request,\n event,\n matchOptions: this._matchOptions,\n plugins: this._plugins,\n });\n\n if (process.env.NODE_ENV !== 'production') {\n logger.groupCollapsed(\n messages.strategyStart('CacheOnly', request));\n if (response) {\n logger.log(`Found a cached response in the '${this._cacheName}'` +\n ` cache.`);\n messages.printFinalResponse(response);\n } else {\n logger.log(`No response found in the '${this._cacheName}' cache.`);\n }\n logger.groupEnd();\n }\n\n if (!response) {\n throw new WorkboxError('no-response', {url: request.url});\n }\n return response;\n }\n}\n\nexport {CacheOnly};\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport '../_version.mjs';\n\nexport const cacheOkAndOpaquePlugin = {\n /**\n * Returns a valid response (to allow caching) if the status is 200 (OK) or\n * 0 (opaque).\n *\n * @param {Object} options\n * @param {Response} options.response\n * @return {Response|null}\n *\n * @private\n */\n cacheWillUpdate: ({response}) => {\n if (response.status === 200 || response.status === 0) {\n return response;\n }\n return null;\n },\n};\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport {assert} from 'workbox-core/_private/assert.mjs';\nimport {cacheNames} from 'workbox-core/_private/cacheNames.mjs';\nimport {cacheWrapper} from 'workbox-core/_private/cacheWrapper.mjs';\nimport {fetchWrapper} from 'workbox-core/_private/fetchWrapper.mjs';\nimport {getFriendlyURL} from 'workbox-core/_private/getFriendlyURL.mjs';\nimport {logger} from 'workbox-core/_private/logger.mjs';\nimport {WorkboxError} from 'workbox-core/_private/WorkboxError.mjs';\n\nimport {messages} from './utils/messages.mjs';\nimport {cacheOkAndOpaquePlugin} from './plugins/cacheOkAndOpaquePlugin.mjs';\nimport './_version.mjs';\n\n/**\n * An implementation of a\n * [network first]{@link https://developers.google.com/web/fundamentals/instant-and-offline/offline-cookbook/#network-falling-back-to-cache}\n * request strategy.\n *\n * By default, this strategy will cache responses with a 200 status code as\n * well as [opaque responses]{@link https://developers.google.com/web/tools/workbox/guides/handle-third-party-requests}.\n * Opaque responses are are cross-origin requests where the response doesn't\n * support [CORS]{@link https://enable-cors.org/}.\n *\n * If the network request fails, and there is no cache match, this will throw\n * a `WorkboxError` exception.\n *\n * @memberof workbox.strategies\n */\nclass NetworkFirst {\n /**\n * @param {Object} options\n * @param {string} options.cacheName Cache name to store and retrieve\n * requests. Defaults to cache names provided by\n * [workbox-core]{@link workbox.core.cacheNames}.\n * @param {Array} options.plugins [Plugins]{@link https://developers.google.com/web/tools/workbox/guides/using-plugins}\n * to use in conjunction with this caching strategy.\n * @param {Object} options.fetchOptions Values passed along to the\n * [`init`](https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/fetch#Parameters)\n * of all fetch() requests made by this strategy.\n * @param {Object} options.matchOptions [`CacheQueryOptions`](https://w3c.github.io/ServiceWorker/#dictdef-cachequeryoptions)\n * @param {number} options.networkTimeoutSeconds If set, any network requests\n * that fail to respond within the timeout will fallback to the cache.\n *\n * This option can be used to combat\n * \"[lie-fi]{@link https://developers.google.com/web/fundamentals/performance/poor-connectivity/#lie-fi}\"\n * scenarios.\n */\n constructor(options = {}) {\n this._cacheName = cacheNames.getRuntimeName(options.cacheName);\n\n if (options.plugins) {\n let isUsingCacheWillUpdate =\n options.plugins.some((plugin) => !!plugin.cacheWillUpdate);\n this._plugins = isUsingCacheWillUpdate ?\n options.plugins : [cacheOkAndOpaquePlugin, ...options.plugins];\n } else {\n // No plugins passed in, use the default plugin.\n this._plugins = [cacheOkAndOpaquePlugin];\n }\n\n this._networkTimeoutSeconds = options.networkTimeoutSeconds;\n if (process.env.NODE_ENV !== 'production') {\n if (this._networkTimeoutSeconds) {\n assert.isType(this._networkTimeoutSeconds, 'number', {\n moduleName: 'workbox-strategies',\n className: 'NetworkFirst',\n funcName: 'constructor',\n paramName: 'networkTimeoutSeconds',\n });\n }\n }\n\n this._fetchOptions = options.fetchOptions || null;\n this._matchOptions = options.matchOptions || null;\n }\n\n /**\n * This method will perform a request strategy and follows an API that\n * will work with the\n * [Workbox Router]{@link workbox.routing.Router}.\n *\n * @param {Object} options\n * @param {Request} options.request The request to run this strategy for.\n * @param {Event} [options.event] The event that triggered the request.\n * @return {Promise}\n */\n async handle({event, request}) {\n return this.makeRequest({\n event,\n request: request || event.request,\n });\n }\n\n /**\n * This method can be used to perform a make a standalone request outside the\n * context of the [Workbox Router]{@link workbox.routing.Router}.\n *\n * See \"[Advanced Recipes](https://developers.google.com/web/tools/workbox/guides/advanced-recipes#make-requests)\"\n * for more usage information.\n *\n * @param {Object} options\n * @param {Request|string} options.request Either a\n * [`Request`]{@link https://developer.mozilla.org/en-US/docs/Web/API/Request}\n * object, or a string URL, corresponding to the request to be made.\n * @param {FetchEvent} [options.event] If provided, `event.waitUntil()` will\n * be called automatically to extend the service worker's lifetime.\n * @return {Promise}\n */\n async makeRequest({event, request}) {\n const logs = [];\n\n if (typeof request === 'string') {\n request = new Request(request);\n }\n\n if (process.env.NODE_ENV !== 'production') {\n assert.isInstance(request, Request, {\n moduleName: 'workbox-strategies',\n className: 'NetworkFirst',\n funcName: 'handle',\n paramName: 'makeRequest',\n });\n }\n\n const promises = [];\n let timeoutId;\n\n if (this._networkTimeoutSeconds) {\n const {id, promise} = this._getTimeoutPromise({request, event, logs});\n timeoutId = id;\n promises.push(promise);\n }\n\n const networkPromise =\n this._getNetworkPromise({timeoutId, request, event, logs});\n promises.push(networkPromise);\n\n // Promise.race() will resolve as soon as the first promise resolves.\n let response = await Promise.race(promises);\n // If Promise.race() resolved with null, it might be due to a network\n // timeout + a cache miss. If that were to happen, we'd rather wait until\n // the networkPromise resolves instead of returning null.\n // Note that it's fine to await an already-resolved promise, so we don't\n // have to check to see if it's still \"in flight\".\n if (!response) {\n response = await networkPromise;\n }\n\n if (process.env.NODE_ENV !== 'production') {\n logger.groupCollapsed(\n messages.strategyStart('NetworkFirst', request));\n for (let log of logs) {\n logger.log(log);\n }\n messages.printFinalResponse(response);\n logger.groupEnd();\n }\n\n if (!response) {\n throw new WorkboxError('no-response', {url: request.url});\n }\n return response;\n }\n\n /**\n * @param {Object} options\n * @param {Request} options.request\n * @param {Array} options.logs A reference to the logs array\n * @param {Event} [options.event]\n * @return {Promise}\n *\n * @private\n */\n _getTimeoutPromise({request, logs, event}) {\n let timeoutId;\n const timeoutPromise = new Promise((resolve) => {\n const onNetworkTimeout = async () => {\n if (process.env.NODE_ENV !== 'production') {\n logs.push(`Timing out the network response at ` +\n `${this._networkTimeoutSeconds} seconds.`);\n }\n\n resolve(await this._respondFromCache({request, event}));\n };\n\n timeoutId = setTimeout(\n onNetworkTimeout,\n this._networkTimeoutSeconds * 1000,\n );\n });\n\n return {\n promise: timeoutPromise,\n id: timeoutId,\n };\n }\n\n /**\n * @param {Object} options\n * @param {number|undefined} options.timeoutId\n * @param {Request} options.request\n * @param {Array} options.logs A reference to the logs Array.\n * @param {Event} [options.event]\n * @return {Promise}\n *\n * @private\n */\n async _getNetworkPromise({timeoutId, request, logs, event}) {\n let error;\n let response;\n try {\n response = await fetchWrapper.fetch({\n request,\n event,\n fetchOptions: this._fetchOptions,\n plugins: this._plugins,\n });\n } catch (err) {\n error = err;\n }\n\n if (timeoutId) {\n clearTimeout(timeoutId);\n }\n\n if (process.env.NODE_ENV !== 'production') {\n if (response) {\n logs.push(`Got response from network.`);\n } else {\n logs.push(`Unable to get a response from the network. Will respond ` +\n `with a cached response.`);\n }\n }\n\n if (error || !response) {\n response = await this._respondFromCache({request, event});\n if (process.env.NODE_ENV !== 'production') {\n if (response) {\n logs.push(`Found a cached response in the '${this._cacheName}'` +\n ` cache.`);\n } else {\n logs.push(`No response found in the '${this._cacheName}' cache.`);\n }\n }\n } else {\n // Keep the service worker alive while we put the request in the cache\n const responseClone = response.clone();\n const cachePut = cacheWrapper.put({\n cacheName: this._cacheName,\n request,\n response: responseClone,\n event,\n plugins: this._plugins,\n });\n\n if (event) {\n try {\n // The event has been responded to so we can keep the SW alive to\n // respond to the request\n event.waitUntil(cachePut);\n } catch (err) {\n if (process.env.NODE_ENV !== 'production') {\n logger.warn(`Unable to ensure service worker stays alive when ` +\n `updating cache for '${getFriendlyURL(request.url)}'.`);\n }\n }\n }\n }\n\n return response;\n }\n\n /**\n * Used if the network timeouts or fails to make the request.\n *\n * @param {Object} options\n * @param {Request} request The request to match in the cache\n * @param {Event} [options.event]\n * @return {Promise}\n *\n * @private\n */\n _respondFromCache({event, request}) {\n return cacheWrapper.match({\n cacheName: this._cacheName,\n request,\n event,\n matchOptions: this._matchOptions,\n plugins: this._plugins,\n });\n }\n}\n\nexport {NetworkFirst};\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport {assert} from 'workbox-core/_private/assert.mjs';\nimport {cacheNames} from 'workbox-core/_private/cacheNames.mjs';\nimport {fetchWrapper} from 'workbox-core/_private/fetchWrapper.mjs';\nimport {logger} from 'workbox-core/_private/logger.mjs';\nimport {WorkboxError} from 'workbox-core/_private/WorkboxError.mjs';\n\nimport {messages} from './utils/messages.mjs';\nimport './_version.mjs';\n\n/**\n * An implementation of a\n * [network-only]{@link https://developers.google.com/web/fundamentals/instant-and-offline/offline-cookbook/#network-only}\n * request strategy.\n *\n * This class is useful if you want to take advantage of any\n * [Workbox plugins]{@link https://developers.google.com/web/tools/workbox/guides/using-plugins}.\n *\n * If the network request fails, this will throw a `WorkboxError` exception.\n *\n * @memberof workbox.strategies\n */\nclass NetworkOnly {\n /**\n * @param {Object} options\n * @param {string} options.cacheName Cache name to store and retrieve\n * requests. Defaults to cache names provided by\n * [workbox-core]{@link workbox.core.cacheNames}.\n * @param {Array} options.plugins [Plugins]{@link https://developers.google.com/web/tools/workbox/guides/using-plugins}\n * to use in conjunction with this caching strategy.\n * @param {Object} options.fetchOptions Values passed along to the\n * [`init`](https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/fetch#Parameters)\n * of all fetch() requests made by this strategy.\n */\n constructor(options = {}) {\n this._cacheName = cacheNames.getRuntimeName(options.cacheName);\n this._plugins = options.plugins || [];\n this._fetchOptions = options.fetchOptions || null;\n }\n\n /**\n * This method will perform a request strategy and follows an API that\n * will work with the\n * [Workbox Router]{@link workbox.routing.Router}.\n *\n * @param {Object} options\n * @param {Request} options.request The request to run this strategy for.\n * @param {Event} [options.event] The event that triggered the request.\n * @return {Promise}\n */\n async handle({event, request}) {\n return this.makeRequest({\n event,\n request: request || event.request,\n });\n }\n\n /**\n * This method can be used to perform a make a standalone request outside the\n * context of the [Workbox Router]{@link workbox.routing.Router}.\n *\n * See \"[Advanced Recipes](https://developers.google.com/web/tools/workbox/guides/advanced-recipes#make-requests)\"\n * for more usage information.\n *\n * @param {Object} options\n * @param {Request|string} options.request Either a\n * [`Request`]{@link https://developer.mozilla.org/en-US/docs/Web/API/Request}\n * object, or a string URL, corresponding to the request to be made.\n * @param {FetchEvent} [options.event] If provided, `event.waitUntil()` will\n * be called automatically to extend the service worker's lifetime.\n * @return {Promise}\n */\n async makeRequest({event, request}) {\n if (typeof request === 'string') {\n request = new Request(request);\n }\n\n if (process.env.NODE_ENV !== 'production') {\n assert.isInstance(request, Request, {\n moduleName: 'workbox-strategies',\n className: 'NetworkOnly',\n funcName: 'handle',\n paramName: 'request',\n });\n }\n\n let error;\n let response;\n try {\n response = await fetchWrapper.fetch({\n request,\n event,\n fetchOptions: this._fetchOptions,\n plugins: this._plugins,\n });\n } catch (err) {\n error = err;\n }\n\n if (process.env.NODE_ENV !== 'production') {\n logger.groupCollapsed(\n messages.strategyStart('NetworkOnly', request));\n if (response) {\n logger.log(`Got response from network.`);\n } else {\n logger.log(`Unable to get a response from the network.`);\n }\n messages.printFinalResponse(response);\n logger.groupEnd();\n }\n\n if (!response) {\n throw new WorkboxError('no-response', {url: request.url, error});\n }\n return response;\n }\n}\n\nexport {NetworkOnly};\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport {assert} from 'workbox-core/_private/assert.mjs';\nimport {cacheNames} from 'workbox-core/_private/cacheNames.mjs';\nimport {cacheWrapper} from 'workbox-core/_private/cacheWrapper.mjs';\nimport {fetchWrapper} from 'workbox-core/_private/fetchWrapper.mjs';\nimport {getFriendlyURL} from 'workbox-core/_private/getFriendlyURL.mjs';\nimport {logger} from 'workbox-core/_private/logger.mjs';\nimport {WorkboxError} from 'workbox-core/_private/WorkboxError.mjs';\n\nimport {messages} from './utils/messages.mjs';\nimport {cacheOkAndOpaquePlugin} from './plugins/cacheOkAndOpaquePlugin.mjs';\nimport './_version.mjs';\n\n/**\n * An implementation of a\n * [stale-while-revalidate]{@link https://developers.google.com/web/fundamentals/instant-and-offline/offline-cookbook/#stale-while-revalidate}\n * request strategy.\n *\n * Resources are requested from both the cache and the network in parallel.\n * The strategy will respond with the cached version if available, otherwise\n * wait for the network response. The cache is updated with the network response\n * with each successful request.\n *\n * By default, this strategy will cache responses with a 200 status code as\n * well as [opaque responses]{@link https://developers.google.com/web/tools/workbox/guides/handle-third-party-requests}.\n * Opaque responses are are cross-origin requests where the response doesn't\n * support [CORS]{@link https://enable-cors.org/}.\n *\n * If the network request fails, and there is no cache match, this will throw\n * a `WorkboxError` exception.\n *\n * @memberof workbox.strategies\n */\nclass StaleWhileRevalidate {\n /**\n * @param {Object} options\n * @param {string} options.cacheName Cache name to store and retrieve\n * requests. Defaults to cache names provided by\n * [workbox-core]{@link workbox.core.cacheNames}.\n * @param {Array} options.plugins [Plugins]{@link https://developers.google.com/web/tools/workbox/guides/using-plugins}\n * to use in conjunction with this caching strategy.\n * @param {Object} options.fetchOptions Values passed along to the\n * [`init`](https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/fetch#Parameters)\n * of all fetch() requests made by this strategy.\n * @param {Object} options.matchOptions [`CacheQueryOptions`](https://w3c.github.io/ServiceWorker/#dictdef-cachequeryoptions)\n */\n constructor(options = {}) {\n this._cacheName = cacheNames.getRuntimeName(options.cacheName);\n this._plugins = options.plugins || [];\n\n if (options.plugins) {\n let isUsingCacheWillUpdate =\n options.plugins.some((plugin) => !!plugin.cacheWillUpdate);\n this._plugins = isUsingCacheWillUpdate ?\n options.plugins : [cacheOkAndOpaquePlugin, ...options.plugins];\n } else {\n // No plugins passed in, use the default plugin.\n this._plugins = [cacheOkAndOpaquePlugin];\n }\n\n this._fetchOptions = options.fetchOptions || null;\n this._matchOptions = options.matchOptions || null;\n }\n\n /**\n * This method will perform a request strategy and follows an API that\n * will work with the\n * [Workbox Router]{@link workbox.routing.Router}.\n *\n * @param {Object} options\n * @param {Request} options.request The request to run this strategy for.\n * @param {Event} [options.event] The event that triggered the request.\n * @return {Promise}\n */\n async handle({event, request}) {\n return this.makeRequest({\n event,\n request: request || event.request,\n });\n }\n /**\n * This method can be used to perform a make a standalone request outside the\n * context of the [Workbox Router]{@link workbox.routing.Router}.\n *\n * See \"[Advanced Recipes](https://developers.google.com/web/tools/workbox/guides/advanced-recipes#make-requests)\"\n * for more usage information.\n *\n * @param {Object} options\n * @param {Request|string} options.request Either a\n * [`Request`]{@link https://developer.mozilla.org/en-US/docs/Web/API/Request}\n * object, or a string URL, corresponding to the request to be made.\n * @param {FetchEvent} [options.event] If provided, `event.waitUntil()` will\n * be called automatically to extend the service worker's lifetime.\n * @return {Promise}\n */\n async makeRequest({event, request}) {\n const logs = [];\n\n if (typeof request === 'string') {\n request = new Request(request);\n }\n\n if (process.env.NODE_ENV !== 'production') {\n assert.isInstance(request, Request, {\n moduleName: 'workbox-strategies',\n className: 'StaleWhileRevalidate',\n funcName: 'handle',\n paramName: 'request',\n });\n }\n\n const fetchAndCachePromise = this._getFromNetwork({request, event});\n\n let response = await cacheWrapper.match({\n cacheName: this._cacheName,\n request,\n event,\n matchOptions: this._matchOptions,\n plugins: this._plugins,\n });\n let error;\n if (response) {\n if (process.env.NODE_ENV !== 'production') {\n logs.push(`Found a cached response in the '${this._cacheName}'` +\n ` cache. Will update with the network response in the background.`);\n }\n\n if (event) {\n try {\n event.waitUntil(fetchAndCachePromise);\n } catch (error) {\n if (process.env.NODE_ENV !== 'production') {\n logger.warn(`Unable to ensure service worker stays alive when ` +\n `updating cache for '${getFriendlyURL(request.url)}'.`);\n }\n }\n }\n } else {\n if (process.env.NODE_ENV !== 'production') {\n logs.push(`No response found in the '${this._cacheName}' cache. ` +\n `Will wait for the network response.`);\n }\n try {\n response = await fetchAndCachePromise;\n } catch (err) {\n error = err;\n }\n }\n\n if (process.env.NODE_ENV !== 'production') {\n logger.groupCollapsed(\n messages.strategyStart('StaleWhileRevalidate', request));\n for (let log of logs) {\n logger.log(log);\n }\n messages.printFinalResponse(response);\n logger.groupEnd();\n }\n\n if (!response) {\n throw new WorkboxError('no-response', {url: request.url, error});\n }\n return response;\n }\n\n /**\n * @param {Object} options\n * @param {Request} options.request\n * @param {Event} [options.event]\n * @return {Promise}\n *\n * @private\n */\n async _getFromNetwork({request, event}) {\n const response = await fetchWrapper.fetch({\n request,\n event,\n fetchOptions: this._fetchOptions,\n plugins: this._plugins,\n });\n\n const cachePutPromise = cacheWrapper.put({\n cacheName: this._cacheName,\n request,\n response: response.clone(),\n event,\n plugins: this._plugins,\n });\n\n if (event) {\n try {\n event.waitUntil(cachePutPromise);\n } catch (error) {\n if (process.env.NODE_ENV !== 'production') {\n logger.warn(`Unable to ensure service worker stays alive when ` +\n `updating cache for '${getFriendlyURL(request.url)}'.`);\n }\n }\n }\n\n return response;\n }\n}\n\nexport {StaleWhileRevalidate};\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport {logger} from 'workbox-core/_private/logger.mjs';\nimport {CacheFirst} from './CacheFirst.mjs';\nimport {CacheOnly} from './CacheOnly.mjs';\nimport {NetworkFirst} from './NetworkFirst.mjs';\nimport {NetworkOnly} from './NetworkOnly.mjs';\nimport {StaleWhileRevalidate} from './StaleWhileRevalidate.mjs';\nimport './_version.mjs';\n\n\nconst mapping = {\n cacheFirst: CacheFirst,\n cacheOnly: CacheOnly,\n networkFirst: NetworkFirst,\n networkOnly: NetworkOnly,\n staleWhileRevalidate: StaleWhileRevalidate,\n};\n\nconst deprecate = (strategy) => {\n const StrategyCtr = mapping[strategy];\n\n return (options) => {\n if (process.env.NODE_ENV !== 'production') {\n const strategyCtrName = strategy[0].toUpperCase() + strategy.slice(1);\n logger.warn(`The 'workbox.strategies.${strategy}()' function has been ` +\n `deprecated and will be removed in a future version of Workbox.\\n` +\n `Please use 'new workbox.strategies.${strategyCtrName}()' instead.`);\n }\n return new StrategyCtr(options);\n };\n};\n\n/**\n * @function workbox.strategies.cacheFirst\n * @param {Object} options See the {@link workbox.strategies.CacheFirst}\n * constructor for more info.\n * @deprecated since v4.0.0\n */\nconst cacheFirst = deprecate('cacheFirst');\n\n/**\n * @function workbox.strategies.cacheOnly\n * @param {Object} options See the {@link workbox.strategies.CacheOnly}\n * constructor for more info.\n * @deprecated since v4.0.0\n */\nconst cacheOnly = deprecate('cacheOnly');\n\n/**\n * @function workbox.strategies.networkFirst\n * @param {Object} options See the {@link workbox.strategies.NetworkFirst}\n * constructor for more info.\n * @deprecated since v4.0.0\n */\nconst networkFirst = deprecate('networkFirst');\n\n/**\n * @function workbox.strategies.networkOnly\n * @param {Object} options See the {@link workbox.strategies.NetworkOnly}\n * constructor for more info.\n * @deprecated since v4.0.0\n */\nconst networkOnly = deprecate('networkOnly');\n\n/**\n * @function workbox.strategies.staleWhileRevalidate\n * @param {Object} options See the\n * {@link workbox.strategies.StaleWhileRevalidate} constructor for more info.\n * @deprecated since v4.0.0\n */\nconst staleWhileRevalidate = deprecate('staleWhileRevalidate');\n\n/**\n * There are common caching strategies that most service workers will need\n * and use. This module provides simple implementations of these strategies.\n *\n * @namespace workbox.strategies\n */\n\nexport {\n CacheFirst,\n CacheOnly,\n NetworkFirst,\n NetworkOnly,\n StaleWhileRevalidate,\n\n // Deprecated...\n cacheFirst,\n cacheOnly,\n networkFirst,\n networkOnly,\n staleWhileRevalidate,\n};\n\n"],"names":["self","_","e","getFriendlyURL","url","urlObj","URL","location","origin","pathname","href","messages","strategyStart","strategyName","request","printFinalResponse","response","logger","groupCollapsed","log","groupEnd","CacheFirst","constructor","options","_cacheName","cacheNames","getRuntimeName","cacheName","_plugins","plugins","_fetchOptions","fetchOptions","_matchOptions","matchOptions","handle","event","makeRequest","logs","Request","assert","isInstance","moduleName","className","funcName","paramName","cacheWrapper","match","error","push","_getFromNetwork","err","WorkboxError","fetchWrapper","fetch","responseClone","clone","cachePutPromise","put","waitUntil","warn","CacheOnly","cacheOkAndOpaquePlugin","cacheWillUpdate","status","NetworkFirst","isUsingCacheWillUpdate","some","plugin","_networkTimeoutSeconds","networkTimeoutSeconds","isType","promises","timeoutId","id","promise","_getTimeoutPromise","networkPromise","_getNetworkPromise","Promise","race","timeoutPromise","resolve","onNetworkTimeout","_respondFromCache","setTimeout","clearTimeout","cachePut","NetworkOnly","StaleWhileRevalidate","fetchAndCachePromise","mapping","cacheFirst","cacheOnly","networkFirst","networkOnly","staleWhileRevalidate","deprecate","strategy","StrategyCtr","strategyCtrName","toUpperCase","slice"],"mappings":";;;;EAAA,IAAG;EAACA,EAAAA,IAAI,CAAC,0BAAD,CAAJ,IAAkCC,CAAC,EAAnC;EAAsC,CAA1C,CAA0C,OAAMC,CAAN,EAAQ;;ECAlD;;;;;;;AAQA;EAGA,MAAMC,cAAc,GAAIC,GAAD,IAAS;EAC9B,QAAMC,MAAM,GAAG,IAAIC,GAAJ,CAAQF,GAAR,EAAaG,QAAb,CAAf;;EACA,MAAIF,MAAM,CAACG,MAAP,KAAkBD,QAAQ,CAACC,MAA/B,EAAuC;EACrC,WAAOH,MAAM,CAACI,QAAd;EACD;;EACD,SAAOJ,MAAM,CAACK,IAAd;EACD,CAND;;AAQA,EAAO,MAAMC,QAAQ,GAAG;EACtBC,EAAAA,aAAa,EAAE,CAACC,YAAD,EAAeC,OAAf,KAA4B,SAAQD,YAAa,MAAtB,GACvC,eAAcV,cAAc,CAACW,OAAO,CAACV,GAAT,CAAc,GAFvB;EAGtBW,EAAAA,kBAAkB,EAAGC,QAAD,IAAc;EAChC,QAAIA,QAAJ,EAAc;EACZC,MAAAA,iBAAM,CAACC,cAAP,CAAuB,+BAAvB;EACAD,MAAAA,iBAAM,CAACE,GAAP,CAAWH,QAAX;EACAC,MAAAA,iBAAM,CAACG,QAAP;EACD;EACF;EATqB,CAAjB;;ECnBP;;;;;;;AAQA,EAWA;;;;;;;;;;;;;;EAaA,MAAMC,UAAN,CAAiB;EACf;;;;;;;;;;;;EAYAC,EAAAA,WAAW,CAACC,OAAO,GAAG,EAAX,EAAe;EACxB,SAAKC,UAAL,GAAkBC,yBAAU,CAACC,cAAX,CAA0BH,OAAO,CAACI,SAAlC,CAAlB;EACA,SAAKC,QAAL,GAAgBL,OAAO,CAACM,OAAR,IAAmB,EAAnC;EACA,SAAKC,aAAL,GAAqBP,OAAO,CAACQ,YAAR,IAAwB,IAA7C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EAGD;;EACD,WAAO,IAAID,WAAJ,CAAgB3E,OAAhB,CAAP;EACD,GARD;EASD,CAZD;EAcA;;;;;;;;AAMA,QAAMoE,UAAU,GAAGK,SAAS,CAAC,YAAD,CAA5B;EAEA;;;;;;;AAMA,QAAMJ,SAAS,GAAGI,SAAS,CAAC,WAAD,CAA3B;EAEA;;;;;;;AAMA,QAAMH,YAAY,GAAGG,SAAS,CAAC,cAAD,CAA9B;EAEA;;;;;;;AAMA,QAAMF,WAAW,GAAGE,SAAS,CAAC,aAAD,CAA7B;EAEA;;;;;;;AAMA,QAAMD,oBAAoB,GAAGC,SAAS,CAAC,sBAAD,CAAtC;;;;;;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/workbox-v4.3.1/workbox-strategies.prod.js b/workbox-v4.3.1/workbox-strategies.prod.js new file mode 100644 index 0000000000..29909af302 --- /dev/null +++ b/workbox-v4.3.1/workbox-strategies.prod.js @@ -0,0 +1,2 @@ +this.workbox=this.workbox||{},this.workbox.strategies=function(e,t,s,n,r){"use strict";try{self["workbox:strategies:4.3.1"]&&_()}catch(e){}class i{constructor(e={}){this.t=t.cacheNames.getRuntimeName(e.cacheName),this.s=e.plugins||[],this.i=e.fetchOptions||null,this.h=e.matchOptions||null}async handle({event:e,request:t}){return this.makeRequest({event:e,request:t||e.request})}async makeRequest({event:e,request:t}){"string"==typeof t&&(t=new Request(t));let n,i=await s.cacheWrapper.match({cacheName:this.t,request:t,event:e,matchOptions:this.h,plugins:this.s});if(!i)try{i=await this.u(t,e)}catch(e){n=e}if(!i)throw new r.WorkboxError("no-response",{url:t.url,error:n});return i}async u(e,t){const r=await n.fetchWrapper.fetch({request:e,event:t,fetchOptions:this.i,plugins:this.s}),i=r.clone(),h=s.cacheWrapper.put({cacheName:this.t,request:e,response:i,event:t,plugins:this.s});if(t)try{t.waitUntil(h)}catch(e){}return r}}class h{constructor(e={}){this.t=t.cacheNames.getRuntimeName(e.cacheName),this.s=e.plugins||[],this.h=e.matchOptions||null}async handle({event:e,request:t}){return this.makeRequest({event:e,request:t||e.request})}async makeRequest({event:e,request:t}){"string"==typeof t&&(t=new Request(t));const n=await s.cacheWrapper.match({cacheName:this.t,request:t,event:e,matchOptions:this.h,plugins:this.s});if(!n)throw new r.WorkboxError("no-response",{url:t.url});return n}}const u={cacheWillUpdate:({response:e})=>200===e.status||0===e.status?e:null};class a{constructor(e={}){if(this.t=t.cacheNames.getRuntimeName(e.cacheName),e.plugins){let t=e.plugins.some(e=>!!e.cacheWillUpdate);this.s=t?e.plugins:[u,...e.plugins]}else this.s=[u];this.o=e.networkTimeoutSeconds,this.i=e.fetchOptions||null,this.h=e.matchOptions||null}async handle({event:e,request:t}){return this.makeRequest({event:e,request:t||e.request})}async makeRequest({event:e,request:t}){const s=[];"string"==typeof t&&(t=new Request(t));const n=[];let i;if(this.o){const{id:r,promise:h}=this.l({request:t,event:e,logs:s});i=r,n.push(h)}const h=this.q({timeoutId:i,request:t,event:e,logs:s});n.push(h);let u=await Promise.race(n);if(u||(u=await h),!u)throw new r.WorkboxError("no-response",{url:t.url});return u}l({request:e,logs:t,event:s}){let n;return{promise:new Promise(t=>{n=setTimeout(async()=>{t(await this.p({request:e,event:s}))},1e3*this.o)}),id:n}}async q({timeoutId:e,request:t,logs:r,event:i}){let h,u;try{u=await n.fetchWrapper.fetch({request:t,event:i,fetchOptions:this.i,plugins:this.s})}catch(e){h=e}if(e&&clearTimeout(e),h||!u)u=await this.p({request:t,event:i});else{const e=u.clone(),n=s.cacheWrapper.put({cacheName:this.t,request:t,response:e,event:i,plugins:this.s});if(i)try{i.waitUntil(n)}catch(e){}}return u}p({event:e,request:t}){return s.cacheWrapper.match({cacheName:this.t,request:t,event:e,matchOptions:this.h,plugins:this.s})}}class c{constructor(e={}){this.t=t.cacheNames.getRuntimeName(e.cacheName),this.s=e.plugins||[],this.i=e.fetchOptions||null}async handle({event:e,request:t}){return this.makeRequest({event:e,request:t||e.request})}async makeRequest({event:e,request:t}){let s,i;"string"==typeof t&&(t=new Request(t));try{i=await n.fetchWrapper.fetch({request:t,event:e,fetchOptions:this.i,plugins:this.s})}catch(e){s=e}if(!i)throw new r.WorkboxError("no-response",{url:t.url,error:s});return i}}class o{constructor(e={}){if(this.t=t.cacheNames.getRuntimeName(e.cacheName),this.s=e.plugins||[],e.plugins){let t=e.plugins.some(e=>!!e.cacheWillUpdate);this.s=t?e.plugins:[u,...e.plugins]}else this.s=[u];this.i=e.fetchOptions||null,this.h=e.matchOptions||null}async handle({event:e,request:t}){return this.makeRequest({event:e,request:t||e.request})}async makeRequest({event:e,request:t}){"string"==typeof t&&(t=new Request(t));const n=this.u({request:t,event:e});let i,h=await s.cacheWrapper.match({cacheName:this.t,request:t,event:e,matchOptions:this.h,plugins:this.s});if(h){if(e)try{e.waitUntil(n)}catch(i){}}else try{h=await n}catch(e){i=e}if(!h)throw new r.WorkboxError("no-response",{url:t.url,error:i});return h}async u({request:e,event:t}){const r=await n.fetchWrapper.fetch({request:e,event:t,fetchOptions:this.i,plugins:this.s}),i=s.cacheWrapper.put({cacheName:this.t,request:e,response:r.clone(),event:t,plugins:this.s});if(t)try{t.waitUntil(i)}catch(e){}return r}}const l={cacheFirst:i,cacheOnly:h,networkFirst:a,networkOnly:c,staleWhileRevalidate:o},q=e=>{const t=l[e];return e=>new t(e)},w=q("cacheFirst"),p=q("cacheOnly"),v=q("networkFirst"),y=q("networkOnly"),m=q("staleWhileRevalidate");return e.CacheFirst=i,e.CacheOnly=h,e.NetworkFirst=a,e.NetworkOnly=c,e.StaleWhileRevalidate=o,e.cacheFirst=w,e.cacheOnly=p,e.networkFirst=v,e.networkOnly=y,e.staleWhileRevalidate=m,e}({},workbox.core._private,workbox.core._private,workbox.core._private,workbox.core._private); +//# sourceMappingURL=workbox-strategies.prod.js.map diff --git a/workbox-v4.3.1/workbox-strategies.prod.js.map b/workbox-v4.3.1/workbox-strategies.prod.js.map new file mode 100644 index 0000000000..6ad0b3e377 --- /dev/null +++ b/workbox-v4.3.1/workbox-strategies.prod.js.map @@ -0,0 +1 @@ +{"version":3,"file":"workbox-strategies.prod.js","sources":["../_version.mjs","../CacheFirst.mjs","../CacheOnly.mjs","../plugins/cacheOkAndOpaquePlugin.mjs","../NetworkFirst.mjs","../NetworkOnly.mjs","../StaleWhileRevalidate.mjs","../index.mjs"],"sourcesContent":["try{self['workbox:strategies:4.3.1']&&_()}catch(e){}// eslint-disable-line","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport {assert} from 'workbox-core/_private/assert.mjs';\nimport {cacheNames} from 'workbox-core/_private/cacheNames.mjs';\nimport {cacheWrapper} from 'workbox-core/_private/cacheWrapper.mjs';\nimport {fetchWrapper} from 'workbox-core/_private/fetchWrapper.mjs';\nimport {getFriendlyURL} from 'workbox-core/_private/getFriendlyURL.mjs';\nimport {logger} from 'workbox-core/_private/logger.mjs';\nimport {WorkboxError} from 'workbox-core/_private/WorkboxError.mjs';\n\nimport {messages} from './utils/messages.mjs';\nimport './_version.mjs';\n\n/**\n * An implementation of a [cache-first]{@link https://developers.google.com/web/fundamentals/instant-and-offline/offline-cookbook/#cache-falling-back-to-network}\n * request strategy.\n *\n * A cache first strategy is useful for assets that have been revisioned,\n * such as URLs like `/styles/example.a8f5f1.css`, since they\n * can be cached for long periods of time.\n *\n * If the network request fails, and there is no cache match, this will throw\n * a `WorkboxError` exception.\n *\n * @memberof workbox.strategies\n */\nclass CacheFirst {\n /**\n * @param {Object} options\n * @param {string} options.cacheName Cache name to store and retrieve\n * requests. Defaults to cache names provided by\n * [workbox-core]{@link workbox.core.cacheNames}.\n * @param {Array} options.plugins [Plugins]{@link https://developers.google.com/web/tools/workbox/guides/using-plugins}\n * to use in conjunction with this caching strategy.\n * @param {Object} options.fetchOptions Values passed along to the\n * [`init`](https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/fetch#Parameters)\n * of all fetch() requests made by this strategy.\n * @param {Object} options.matchOptions [`CacheQueryOptions`](https://w3c.github.io/ServiceWorker/#dictdef-cachequeryoptions)\n */\n constructor(options = {}) {\n this._cacheName = cacheNames.getRuntimeName(options.cacheName);\n this._plugins = options.plugins || [];\n this._fetchOptions = options.fetchOptions || null;\n this._matchOptions = options.matchOptions || null;\n }\n\n /**\n * This method will perform a request strategy and follows an API that\n * will work with the\n * [Workbox Router]{@link workbox.routing.Router}.\n *\n * @param {Object} options\n * @param {Request} options.request The request to run this strategy for.\n * @param {Event} [options.event] The event that triggered the request.\n * @return {Promise}\n */\n async handle({event, request}) {\n return this.makeRequest({\n event,\n request: request || event.request,\n });\n }\n\n /**\n * This method can be used to perform a make a standalone request outside the\n * context of the [Workbox Router]{@link workbox.routing.Router}.\n *\n * See \"[Advanced Recipes](https://developers.google.com/web/tools/workbox/guides/advanced-recipes#make-requests)\"\n * for more usage information.\n *\n * @param {Object} options\n * @param {Request|string} options.request Either a\n * [`Request`]{@link https://developer.mozilla.org/en-US/docs/Web/API/Request}\n * object, or a string URL, corresponding to the request to be made.\n * @param {FetchEvent} [options.event] If provided, `event.waitUntil()` will\n be called automatically to extend the service worker's lifetime.\n * @return {Promise}\n */\n async makeRequest({event, request}) {\n const logs = [];\n\n if (typeof request === 'string') {\n request = new Request(request);\n }\n\n if (process.env.NODE_ENV !== 'production') {\n assert.isInstance(request, Request, {\n moduleName: 'workbox-strategies',\n className: 'CacheFirst',\n funcName: 'makeRequest',\n paramName: 'request',\n });\n }\n\n let response = await cacheWrapper.match({\n cacheName: this._cacheName,\n request,\n event,\n matchOptions: this._matchOptions,\n plugins: this._plugins,\n });\n\n let error;\n if (!response) {\n if (process.env.NODE_ENV !== 'production') {\n logs.push(\n `No response found in the '${this._cacheName}' cache. ` +\n `Will respond with a network request.`);\n }\n try {\n response = await this._getFromNetwork(request, event);\n } catch (err) {\n error = err;\n }\n\n if (process.env.NODE_ENV !== 'production') {\n if (response) {\n logs.push(`Got response from network.`);\n } else {\n logs.push(`Unable to get a response from the network.`);\n }\n }\n } else {\n if (process.env.NODE_ENV !== 'production') {\n logs.push(\n `Found a cached response in the '${this._cacheName}' cache.`);\n }\n }\n\n if (process.env.NODE_ENV !== 'production') {\n logger.groupCollapsed(\n messages.strategyStart('CacheFirst', request));\n for (let log of logs) {\n logger.log(log);\n }\n messages.printFinalResponse(response);\n logger.groupEnd();\n }\n\n if (!response) {\n throw new WorkboxError('no-response', {url: request.url, error});\n }\n return response;\n }\n\n /**\n * Handles the network and cache part of CacheFirst.\n *\n * @param {Request} request\n * @param {FetchEvent} [event]\n * @return {Promise}\n *\n * @private\n */\n async _getFromNetwork(request, event) {\n const response = await fetchWrapper.fetch({\n request,\n event,\n fetchOptions: this._fetchOptions,\n plugins: this._plugins,\n });\n\n // Keep the service worker while we put the request to the cache\n const responseClone = response.clone();\n const cachePutPromise = cacheWrapper.put({\n cacheName: this._cacheName,\n request,\n response: responseClone,\n event,\n plugins: this._plugins,\n });\n\n if (event) {\n try {\n event.waitUntil(cachePutPromise);\n } catch (error) {\n if (process.env.NODE_ENV !== 'production') {\n logger.warn(`Unable to ensure service worker stays alive when ` +\n `updating cache for '${getFriendlyURL(request.url)}'.`);\n }\n }\n }\n\n return response;\n }\n}\n\nexport {CacheFirst};\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport {assert} from 'workbox-core/_private/assert.mjs';\nimport {cacheNames} from 'workbox-core/_private/cacheNames.mjs';\nimport {cacheWrapper} from 'workbox-core/_private/cacheWrapper.mjs';\nimport {logger} from 'workbox-core/_private/logger.mjs';\nimport {WorkboxError} from 'workbox-core/_private/WorkboxError.mjs';\n\nimport {messages} from './utils/messages.mjs';\nimport './_version.mjs';\n\n\n/**\n * An implementation of a\n * [cache-only]{@link https://developers.google.com/web/fundamentals/instant-and-offline/offline-cookbook/#cache-only}\n * request strategy.\n *\n * This class is useful if you want to take advantage of any\n * [Workbox plugins]{@link https://developers.google.com/web/tools/workbox/guides/using-plugins}.\n *\n * If there is no cache match, this will throw a `WorkboxError` exception.\n *\n * @memberof workbox.strategies\n */\nclass CacheOnly {\n /**\n * @param {Object} options\n * @param {string} options.cacheName Cache name to store and retrieve\n * requests. Defaults to cache names provided by\n * [workbox-core]{@link workbox.core.cacheNames}.\n * @param {Array} options.plugins [Plugins]{@link https://developers.google.com/web/tools/workbox/guides/using-plugins}\n * to use in conjunction with this caching strategy.\n * @param {Object} options.matchOptions [`CacheQueryOptions`](https://w3c.github.io/ServiceWorker/#dictdef-cachequeryoptions)\n */\n constructor(options = {}) {\n this._cacheName = cacheNames.getRuntimeName(options.cacheName);\n this._plugins = options.plugins || [];\n this._matchOptions = options.matchOptions || null;\n }\n\n /**\n * This method will perform a request strategy and follows an API that\n * will work with the\n * [Workbox Router]{@link workbox.routing.Router}.\n *\n * @param {Object} options\n * @param {Request} options.request The request to run this strategy for.\n * @param {Event} [options.event] The event that triggered the request.\n * @return {Promise}\n */\n async handle({event, request}) {\n return this.makeRequest({\n event,\n request: request || event.request,\n });\n }\n\n /**\n * This method can be used to perform a make a standalone request outside the\n * context of the [Workbox Router]{@link workbox.routing.Router}.\n *\n * See \"[Advanced Recipes](https://developers.google.com/web/tools/workbox/guides/advanced-recipes#make-requests)\"\n * for more usage information.\n *\n * @param {Object} options\n * @param {Request|string} options.request Either a\n * [`Request`]{@link https://developer.mozilla.org/en-US/docs/Web/API/Request}\n * object, or a string URL, corresponding to the request to be made.\n * @param {FetchEvent} [options.event] If provided, `event.waitUntil()` will\n * be called automatically to extend the service worker's lifetime.\n * @return {Promise}\n */\n async makeRequest({event, request}) {\n if (typeof request === 'string') {\n request = new Request(request);\n }\n\n if (process.env.NODE_ENV !== 'production') {\n assert.isInstance(request, Request, {\n moduleName: 'workbox-strategies',\n className: 'CacheOnly',\n funcName: 'makeRequest',\n paramName: 'request',\n });\n }\n\n const response = await cacheWrapper.match({\n cacheName: this._cacheName,\n request,\n event,\n matchOptions: this._matchOptions,\n plugins: this._plugins,\n });\n\n if (process.env.NODE_ENV !== 'production') {\n logger.groupCollapsed(\n messages.strategyStart('CacheOnly', request));\n if (response) {\n logger.log(`Found a cached response in the '${this._cacheName}'` +\n ` cache.`);\n messages.printFinalResponse(response);\n } else {\n logger.log(`No response found in the '${this._cacheName}' cache.`);\n }\n logger.groupEnd();\n }\n\n if (!response) {\n throw new WorkboxError('no-response', {url: request.url});\n }\n return response;\n }\n}\n\nexport {CacheOnly};\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport '../_version.mjs';\n\nexport const cacheOkAndOpaquePlugin = {\n /**\n * Returns a valid response (to allow caching) if the status is 200 (OK) or\n * 0 (opaque).\n *\n * @param {Object} options\n * @param {Response} options.response\n * @return {Response|null}\n *\n * @private\n */\n cacheWillUpdate: ({response}) => {\n if (response.status === 200 || response.status === 0) {\n return response;\n }\n return null;\n },\n};\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport {assert} from 'workbox-core/_private/assert.mjs';\nimport {cacheNames} from 'workbox-core/_private/cacheNames.mjs';\nimport {cacheWrapper} from 'workbox-core/_private/cacheWrapper.mjs';\nimport {fetchWrapper} from 'workbox-core/_private/fetchWrapper.mjs';\nimport {getFriendlyURL} from 'workbox-core/_private/getFriendlyURL.mjs';\nimport {logger} from 'workbox-core/_private/logger.mjs';\nimport {WorkboxError} from 'workbox-core/_private/WorkboxError.mjs';\n\nimport {messages} from './utils/messages.mjs';\nimport {cacheOkAndOpaquePlugin} from './plugins/cacheOkAndOpaquePlugin.mjs';\nimport './_version.mjs';\n\n/**\n * An implementation of a\n * [network first]{@link https://developers.google.com/web/fundamentals/instant-and-offline/offline-cookbook/#network-falling-back-to-cache}\n * request strategy.\n *\n * By default, this strategy will cache responses with a 200 status code as\n * well as [opaque responses]{@link https://developers.google.com/web/tools/workbox/guides/handle-third-party-requests}.\n * Opaque responses are are cross-origin requests where the response doesn't\n * support [CORS]{@link https://enable-cors.org/}.\n *\n * If the network request fails, and there is no cache match, this will throw\n * a `WorkboxError` exception.\n *\n * @memberof workbox.strategies\n */\nclass NetworkFirst {\n /**\n * @param {Object} options\n * @param {string} options.cacheName Cache name to store and retrieve\n * requests. Defaults to cache names provided by\n * [workbox-core]{@link workbox.core.cacheNames}.\n * @param {Array} options.plugins [Plugins]{@link https://developers.google.com/web/tools/workbox/guides/using-plugins}\n * to use in conjunction with this caching strategy.\n * @param {Object} options.fetchOptions Values passed along to the\n * [`init`](https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/fetch#Parameters)\n * of all fetch() requests made by this strategy.\n * @param {Object} options.matchOptions [`CacheQueryOptions`](https://w3c.github.io/ServiceWorker/#dictdef-cachequeryoptions)\n * @param {number} options.networkTimeoutSeconds If set, any network requests\n * that fail to respond within the timeout will fallback to the cache.\n *\n * This option can be used to combat\n * \"[lie-fi]{@link https://developers.google.com/web/fundamentals/performance/poor-connectivity/#lie-fi}\"\n * scenarios.\n */\n constructor(options = {}) {\n this._cacheName = cacheNames.getRuntimeName(options.cacheName);\n\n if (options.plugins) {\n let isUsingCacheWillUpdate =\n options.plugins.some((plugin) => !!plugin.cacheWillUpdate);\n this._plugins = isUsingCacheWillUpdate ?\n options.plugins : [cacheOkAndOpaquePlugin, ...options.plugins];\n } else {\n // No plugins passed in, use the default plugin.\n this._plugins = [cacheOkAndOpaquePlugin];\n }\n\n this._networkTimeoutSeconds = options.networkTimeoutSeconds;\n if (process.env.NODE_ENV !== 'production') {\n if (this._networkTimeoutSeconds) {\n assert.isType(this._networkTimeoutSeconds, 'number', {\n moduleName: 'workbox-strategies',\n className: 'NetworkFirst',\n funcName: 'constructor',\n paramName: 'networkTimeoutSeconds',\n });\n }\n }\n\n this._fetchOptions = options.fetchOptions || null;\n this._matchOptions = options.matchOptions || null;\n }\n\n /**\n * This method will perform a request strategy and follows an API that\n * will work with the\n * [Workbox Router]{@link workbox.routing.Router}.\n *\n * @param {Object} options\n * @param {Request} options.request The request to run this strategy for.\n * @param {Event} [options.event] The event that triggered the request.\n * @return {Promise}\n */\n async handle({event, request}) {\n return this.makeRequest({\n event,\n request: request || event.request,\n });\n }\n\n /**\n * This method can be used to perform a make a standalone request outside the\n * context of the [Workbox Router]{@link workbox.routing.Router}.\n *\n * See \"[Advanced Recipes](https://developers.google.com/web/tools/workbox/guides/advanced-recipes#make-requests)\"\n * for more usage information.\n *\n * @param {Object} options\n * @param {Request|string} options.request Either a\n * [`Request`]{@link https://developer.mozilla.org/en-US/docs/Web/API/Request}\n * object, or a string URL, corresponding to the request to be made.\n * @param {FetchEvent} [options.event] If provided, `event.waitUntil()` will\n * be called automatically to extend the service worker's lifetime.\n * @return {Promise}\n */\n async makeRequest({event, request}) {\n const logs = [];\n\n if (typeof request === 'string') {\n request = new Request(request);\n }\n\n if (process.env.NODE_ENV !== 'production') {\n assert.isInstance(request, Request, {\n moduleName: 'workbox-strategies',\n className: 'NetworkFirst',\n funcName: 'handle',\n paramName: 'makeRequest',\n });\n }\n\n const promises = [];\n let timeoutId;\n\n if (this._networkTimeoutSeconds) {\n const {id, promise} = this._getTimeoutPromise({request, event, logs});\n timeoutId = id;\n promises.push(promise);\n }\n\n const networkPromise =\n this._getNetworkPromise({timeoutId, request, event, logs});\n promises.push(networkPromise);\n\n // Promise.race() will resolve as soon as the first promise resolves.\n let response = await Promise.race(promises);\n // If Promise.race() resolved with null, it might be due to a network\n // timeout + a cache miss. If that were to happen, we'd rather wait until\n // the networkPromise resolves instead of returning null.\n // Note that it's fine to await an already-resolved promise, so we don't\n // have to check to see if it's still \"in flight\".\n if (!response) {\n response = await networkPromise;\n }\n\n if (process.env.NODE_ENV !== 'production') {\n logger.groupCollapsed(\n messages.strategyStart('NetworkFirst', request));\n for (let log of logs) {\n logger.log(log);\n }\n messages.printFinalResponse(response);\n logger.groupEnd();\n }\n\n if (!response) {\n throw new WorkboxError('no-response', {url: request.url});\n }\n return response;\n }\n\n /**\n * @param {Object} options\n * @param {Request} options.request\n * @param {Array} options.logs A reference to the logs array\n * @param {Event} [options.event]\n * @return {Promise}\n *\n * @private\n */\n _getTimeoutPromise({request, logs, event}) {\n let timeoutId;\n const timeoutPromise = new Promise((resolve) => {\n const onNetworkTimeout = async () => {\n if (process.env.NODE_ENV !== 'production') {\n logs.push(`Timing out the network response at ` +\n `${this._networkTimeoutSeconds} seconds.`);\n }\n\n resolve(await this._respondFromCache({request, event}));\n };\n\n timeoutId = setTimeout(\n onNetworkTimeout,\n this._networkTimeoutSeconds * 1000,\n );\n });\n\n return {\n promise: timeoutPromise,\n id: timeoutId,\n };\n }\n\n /**\n * @param {Object} options\n * @param {number|undefined} options.timeoutId\n * @param {Request} options.request\n * @param {Array} options.logs A reference to the logs Array.\n * @param {Event} [options.event]\n * @return {Promise}\n *\n * @private\n */\n async _getNetworkPromise({timeoutId, request, logs, event}) {\n let error;\n let response;\n try {\n response = await fetchWrapper.fetch({\n request,\n event,\n fetchOptions: this._fetchOptions,\n plugins: this._plugins,\n });\n } catch (err) {\n error = err;\n }\n\n if (timeoutId) {\n clearTimeout(timeoutId);\n }\n\n if (process.env.NODE_ENV !== 'production') {\n if (response) {\n logs.push(`Got response from network.`);\n } else {\n logs.push(`Unable to get a response from the network. Will respond ` +\n `with a cached response.`);\n }\n }\n\n if (error || !response) {\n response = await this._respondFromCache({request, event});\n if (process.env.NODE_ENV !== 'production') {\n if (response) {\n logs.push(`Found a cached response in the '${this._cacheName}'` +\n ` cache.`);\n } else {\n logs.push(`No response found in the '${this._cacheName}' cache.`);\n }\n }\n } else {\n // Keep the service worker alive while we put the request in the cache\n const responseClone = response.clone();\n const cachePut = cacheWrapper.put({\n cacheName: this._cacheName,\n request,\n response: responseClone,\n event,\n plugins: this._plugins,\n });\n\n if (event) {\n try {\n // The event has been responded to so we can keep the SW alive to\n // respond to the request\n event.waitUntil(cachePut);\n } catch (err) {\n if (process.env.NODE_ENV !== 'production') {\n logger.warn(`Unable to ensure service worker stays alive when ` +\n `updating cache for '${getFriendlyURL(request.url)}'.`);\n }\n }\n }\n }\n\n return response;\n }\n\n /**\n * Used if the network timeouts or fails to make the request.\n *\n * @param {Object} options\n * @param {Request} request The request to match in the cache\n * @param {Event} [options.event]\n * @return {Promise}\n *\n * @private\n */\n _respondFromCache({event, request}) {\n return cacheWrapper.match({\n cacheName: this._cacheName,\n request,\n event,\n matchOptions: this._matchOptions,\n plugins: this._plugins,\n });\n }\n}\n\nexport {NetworkFirst};\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport {assert} from 'workbox-core/_private/assert.mjs';\nimport {cacheNames} from 'workbox-core/_private/cacheNames.mjs';\nimport {fetchWrapper} from 'workbox-core/_private/fetchWrapper.mjs';\nimport {logger} from 'workbox-core/_private/logger.mjs';\nimport {WorkboxError} from 'workbox-core/_private/WorkboxError.mjs';\n\nimport {messages} from './utils/messages.mjs';\nimport './_version.mjs';\n\n/**\n * An implementation of a\n * [network-only]{@link https://developers.google.com/web/fundamentals/instant-and-offline/offline-cookbook/#network-only}\n * request strategy.\n *\n * This class is useful if you want to take advantage of any\n * [Workbox plugins]{@link https://developers.google.com/web/tools/workbox/guides/using-plugins}.\n *\n * If the network request fails, this will throw a `WorkboxError` exception.\n *\n * @memberof workbox.strategies\n */\nclass NetworkOnly {\n /**\n * @param {Object} options\n * @param {string} options.cacheName Cache name to store and retrieve\n * requests. Defaults to cache names provided by\n * [workbox-core]{@link workbox.core.cacheNames}.\n * @param {Array} options.plugins [Plugins]{@link https://developers.google.com/web/tools/workbox/guides/using-plugins}\n * to use in conjunction with this caching strategy.\n * @param {Object} options.fetchOptions Values passed along to the\n * [`init`](https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/fetch#Parameters)\n * of all fetch() requests made by this strategy.\n */\n constructor(options = {}) {\n this._cacheName = cacheNames.getRuntimeName(options.cacheName);\n this._plugins = options.plugins || [];\n this._fetchOptions = options.fetchOptions || null;\n }\n\n /**\n * This method will perform a request strategy and follows an API that\n * will work with the\n * [Workbox Router]{@link workbox.routing.Router}.\n *\n * @param {Object} options\n * @param {Request} options.request The request to run this strategy for.\n * @param {Event} [options.event] The event that triggered the request.\n * @return {Promise}\n */\n async handle({event, request}) {\n return this.makeRequest({\n event,\n request: request || event.request,\n });\n }\n\n /**\n * This method can be used to perform a make a standalone request outside the\n * context of the [Workbox Router]{@link workbox.routing.Router}.\n *\n * See \"[Advanced Recipes](https://developers.google.com/web/tools/workbox/guides/advanced-recipes#make-requests)\"\n * for more usage information.\n *\n * @param {Object} options\n * @param {Request|string} options.request Either a\n * [`Request`]{@link https://developer.mozilla.org/en-US/docs/Web/API/Request}\n * object, or a string URL, corresponding to the request to be made.\n * @param {FetchEvent} [options.event] If provided, `event.waitUntil()` will\n * be called automatically to extend the service worker's lifetime.\n * @return {Promise}\n */\n async makeRequest({event, request}) {\n if (typeof request === 'string') {\n request = new Request(request);\n }\n\n if (process.env.NODE_ENV !== 'production') {\n assert.isInstance(request, Request, {\n moduleName: 'workbox-strategies',\n className: 'NetworkOnly',\n funcName: 'handle',\n paramName: 'request',\n });\n }\n\n let error;\n let response;\n try {\n response = await fetchWrapper.fetch({\n request,\n event,\n fetchOptions: this._fetchOptions,\n plugins: this._plugins,\n });\n } catch (err) {\n error = err;\n }\n\n if (process.env.NODE_ENV !== 'production') {\n logger.groupCollapsed(\n messages.strategyStart('NetworkOnly', request));\n if (response) {\n logger.log(`Got response from network.`);\n } else {\n logger.log(`Unable to get a response from the network.`);\n }\n messages.printFinalResponse(response);\n logger.groupEnd();\n }\n\n if (!response) {\n throw new WorkboxError('no-response', {url: request.url, error});\n }\n return response;\n }\n}\n\nexport {NetworkOnly};\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport {assert} from 'workbox-core/_private/assert.mjs';\nimport {cacheNames} from 'workbox-core/_private/cacheNames.mjs';\nimport {cacheWrapper} from 'workbox-core/_private/cacheWrapper.mjs';\nimport {fetchWrapper} from 'workbox-core/_private/fetchWrapper.mjs';\nimport {getFriendlyURL} from 'workbox-core/_private/getFriendlyURL.mjs';\nimport {logger} from 'workbox-core/_private/logger.mjs';\nimport {WorkboxError} from 'workbox-core/_private/WorkboxError.mjs';\n\nimport {messages} from './utils/messages.mjs';\nimport {cacheOkAndOpaquePlugin} from './plugins/cacheOkAndOpaquePlugin.mjs';\nimport './_version.mjs';\n\n/**\n * An implementation of a\n * [stale-while-revalidate]{@link https://developers.google.com/web/fundamentals/instant-and-offline/offline-cookbook/#stale-while-revalidate}\n * request strategy.\n *\n * Resources are requested from both the cache and the network in parallel.\n * The strategy will respond with the cached version if available, otherwise\n * wait for the network response. The cache is updated with the network response\n * with each successful request.\n *\n * By default, this strategy will cache responses with a 200 status code as\n * well as [opaque responses]{@link https://developers.google.com/web/tools/workbox/guides/handle-third-party-requests}.\n * Opaque responses are are cross-origin requests where the response doesn't\n * support [CORS]{@link https://enable-cors.org/}.\n *\n * If the network request fails, and there is no cache match, this will throw\n * a `WorkboxError` exception.\n *\n * @memberof workbox.strategies\n */\nclass StaleWhileRevalidate {\n /**\n * @param {Object} options\n * @param {string} options.cacheName Cache name to store and retrieve\n * requests. Defaults to cache names provided by\n * [workbox-core]{@link workbox.core.cacheNames}.\n * @param {Array} options.plugins [Plugins]{@link https://developers.google.com/web/tools/workbox/guides/using-plugins}\n * to use in conjunction with this caching strategy.\n * @param {Object} options.fetchOptions Values passed along to the\n * [`init`](https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/fetch#Parameters)\n * of all fetch() requests made by this strategy.\n * @param {Object} options.matchOptions [`CacheQueryOptions`](https://w3c.github.io/ServiceWorker/#dictdef-cachequeryoptions)\n */\n constructor(options = {}) {\n this._cacheName = cacheNames.getRuntimeName(options.cacheName);\n this._plugins = options.plugins || [];\n\n if (options.plugins) {\n let isUsingCacheWillUpdate =\n options.plugins.some((plugin) => !!plugin.cacheWillUpdate);\n this._plugins = isUsingCacheWillUpdate ?\n options.plugins : [cacheOkAndOpaquePlugin, ...options.plugins];\n } else {\n // No plugins passed in, use the default plugin.\n this._plugins = [cacheOkAndOpaquePlugin];\n }\n\n this._fetchOptions = options.fetchOptions || null;\n this._matchOptions = options.matchOptions || null;\n }\n\n /**\n * This method will perform a request strategy and follows an API that\n * will work with the\n * [Workbox Router]{@link workbox.routing.Router}.\n *\n * @param {Object} options\n * @param {Request} options.request The request to run this strategy for.\n * @param {Event} [options.event] The event that triggered the request.\n * @return {Promise}\n */\n async handle({event, request}) {\n return this.makeRequest({\n event,\n request: request || event.request,\n });\n }\n /**\n * This method can be used to perform a make a standalone request outside the\n * context of the [Workbox Router]{@link workbox.routing.Router}.\n *\n * See \"[Advanced Recipes](https://developers.google.com/web/tools/workbox/guides/advanced-recipes#make-requests)\"\n * for more usage information.\n *\n * @param {Object} options\n * @param {Request|string} options.request Either a\n * [`Request`]{@link https://developer.mozilla.org/en-US/docs/Web/API/Request}\n * object, or a string URL, corresponding to the request to be made.\n * @param {FetchEvent} [options.event] If provided, `event.waitUntil()` will\n * be called automatically to extend the service worker's lifetime.\n * @return {Promise}\n */\n async makeRequest({event, request}) {\n const logs = [];\n\n if (typeof request === 'string') {\n request = new Request(request);\n }\n\n if (process.env.NODE_ENV !== 'production') {\n assert.isInstance(request, Request, {\n moduleName: 'workbox-strategies',\n className: 'StaleWhileRevalidate',\n funcName: 'handle',\n paramName: 'request',\n });\n }\n\n const fetchAndCachePromise = this._getFromNetwork({request, event});\n\n let response = await cacheWrapper.match({\n cacheName: this._cacheName,\n request,\n event,\n matchOptions: this._matchOptions,\n plugins: this._plugins,\n });\n let error;\n if (response) {\n if (process.env.NODE_ENV !== 'production') {\n logs.push(`Found a cached response in the '${this._cacheName}'` +\n ` cache. Will update with the network response in the background.`);\n }\n\n if (event) {\n try {\n event.waitUntil(fetchAndCachePromise);\n } catch (error) {\n if (process.env.NODE_ENV !== 'production') {\n logger.warn(`Unable to ensure service worker stays alive when ` +\n `updating cache for '${getFriendlyURL(request.url)}'.`);\n }\n }\n }\n } else {\n if (process.env.NODE_ENV !== 'production') {\n logs.push(`No response found in the '${this._cacheName}' cache. ` +\n `Will wait for the network response.`);\n }\n try {\n response = await fetchAndCachePromise;\n } catch (err) {\n error = err;\n }\n }\n\n if (process.env.NODE_ENV !== 'production') {\n logger.groupCollapsed(\n messages.strategyStart('StaleWhileRevalidate', request));\n for (let log of logs) {\n logger.log(log);\n }\n messages.printFinalResponse(response);\n logger.groupEnd();\n }\n\n if (!response) {\n throw new WorkboxError('no-response', {url: request.url, error});\n }\n return response;\n }\n\n /**\n * @param {Object} options\n * @param {Request} options.request\n * @param {Event} [options.event]\n * @return {Promise}\n *\n * @private\n */\n async _getFromNetwork({request, event}) {\n const response = await fetchWrapper.fetch({\n request,\n event,\n fetchOptions: this._fetchOptions,\n plugins: this._plugins,\n });\n\n const cachePutPromise = cacheWrapper.put({\n cacheName: this._cacheName,\n request,\n response: response.clone(),\n event,\n plugins: this._plugins,\n });\n\n if (event) {\n try {\n event.waitUntil(cachePutPromise);\n } catch (error) {\n if (process.env.NODE_ENV !== 'production') {\n logger.warn(`Unable to ensure service worker stays alive when ` +\n `updating cache for '${getFriendlyURL(request.url)}'.`);\n }\n }\n }\n\n return response;\n }\n}\n\nexport {StaleWhileRevalidate};\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport {logger} from 'workbox-core/_private/logger.mjs';\nimport {CacheFirst} from './CacheFirst.mjs';\nimport {CacheOnly} from './CacheOnly.mjs';\nimport {NetworkFirst} from './NetworkFirst.mjs';\nimport {NetworkOnly} from './NetworkOnly.mjs';\nimport {StaleWhileRevalidate} from './StaleWhileRevalidate.mjs';\nimport './_version.mjs';\n\n\nconst mapping = {\n cacheFirst: CacheFirst,\n cacheOnly: CacheOnly,\n networkFirst: NetworkFirst,\n networkOnly: NetworkOnly,\n staleWhileRevalidate: StaleWhileRevalidate,\n};\n\nconst deprecate = (strategy) => {\n const StrategyCtr = mapping[strategy];\n\n return (options) => {\n if (process.env.NODE_ENV !== 'production') {\n const strategyCtrName = strategy[0].toUpperCase() + strategy.slice(1);\n logger.warn(`The 'workbox.strategies.${strategy}()' function has been ` +\n `deprecated and will be removed in a future version of Workbox.\\n` +\n `Please use 'new workbox.strategies.${strategyCtrName}()' instead.`);\n }\n return new StrategyCtr(options);\n };\n};\n\n/**\n * @function workbox.strategies.cacheFirst\n * @param {Object} options See the {@link workbox.strategies.CacheFirst}\n * constructor for more info.\n * @deprecated since v4.0.0\n */\nconst cacheFirst = deprecate('cacheFirst');\n\n/**\n * @function workbox.strategies.cacheOnly\n * @param {Object} options See the {@link workbox.strategies.CacheOnly}\n * constructor for more info.\n * @deprecated since v4.0.0\n */\nconst cacheOnly = deprecate('cacheOnly');\n\n/**\n * @function workbox.strategies.networkFirst\n * @param {Object} options See the {@link workbox.strategies.NetworkFirst}\n * constructor for more info.\n * @deprecated since v4.0.0\n */\nconst networkFirst = deprecate('networkFirst');\n\n/**\n * @function workbox.strategies.networkOnly\n * @param {Object} options See the {@link workbox.strategies.NetworkOnly}\n * constructor for more info.\n * @deprecated since v4.0.0\n */\nconst networkOnly = deprecate('networkOnly');\n\n/**\n * @function workbox.strategies.staleWhileRevalidate\n * @param {Object} options See the\n * {@link workbox.strategies.StaleWhileRevalidate} constructor for more info.\n * @deprecated since v4.0.0\n */\nconst staleWhileRevalidate = deprecate('staleWhileRevalidate');\n\n/**\n * There are common caching strategies that most service workers will need\n * and use. This module provides simple implementations of these strategies.\n *\n * @namespace workbox.strategies\n */\n\nexport {\n CacheFirst,\n CacheOnly,\n NetworkFirst,\n NetworkOnly,\n StaleWhileRevalidate,\n\n // Deprecated...\n cacheFirst,\n cacheOnly,\n networkFirst,\n networkOnly,\n staleWhileRevalidate,\n};\n\n"],"names":["self","_","e","CacheFirst","constructor","options","_cacheName","cacheNames","getRuntimeName","cacheName","_plugins","plugins","_fetchOptions","fetchOptions","_matchOptions","matchOptions","event","request","this","makeRequest","Request","error","response","cacheWrapper","match","_getFromNetwork","err","WorkboxError","url","fetchWrapper","fetch","responseClone","clone","cachePutPromise","put","waitUntil","CacheOnly","cacheOkAndOpaquePlugin","cacheWillUpdate","status","NetworkFirst","isUsingCacheWillUpdate","some","plugin","_networkTimeoutSeconds","networkTimeoutSeconds","logs","promises","timeoutId","id","promise","_getTimeoutPromise","push","networkPromise","_getNetworkPromise","Promise","race","resolve","setTimeout","async","_respondFromCache","clearTimeout","cachePut","NetworkOnly","StaleWhileRevalidate","fetchAndCachePromise","mapping","cacheFirst","cacheOnly","networkFirst","networkOnly","staleWhileRevalidate","deprecate","strategy","StrategyCtr"],"mappings":"uFAAA,IAAIA,KAAK,6BAA6BC,IAAI,MAAMC,ICgChD,MAAMC,EAaJC,YAAYC,EAAU,SACfC,EAAaC,aAAWC,eAAeH,EAAQI,gBAC/CC,EAAWL,EAAQM,SAAW,QAC9BC,EAAgBP,EAAQQ,cAAgB,UACxCC,EAAgBT,EAAQU,cAAgB,mBAalCC,MAACA,EAADC,QAAQA,WACZC,KAAKC,YAAY,CACtBH,MAAAA,EACAC,QAASA,GAAWD,EAAMC,6BAmBZD,MAACA,EAADC,QAAQA,IAGD,iBAAZA,IACTA,EAAU,IAAIG,QAAQH,QAoBpBI,EARAC,QAAiBC,eAAaC,MAAM,CACtCf,UAAWS,KAAKZ,EAChBW,QAAAA,EACAD,MAAAA,EACAD,aAAcG,KAAKJ,EACnBH,QAASO,KAAKR,QAIXY,MAODA,QAAiBJ,KAAKO,EAAgBR,EAASD,GAC/C,MAAOU,GACPL,EAAQK,MA2BPJ,QACG,IAAIK,eAAa,cAAe,CAAC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gD,EAAuB/C,KAAKO,EAAgB,CAACR,QAAAA,EAASD,MAAAA,QASxDK,EAPAC,QAAiBC,eAAaC,MAAM,CACtCf,UAAWS,KAAKZ,EAChBW,QAAAA,EACAD,MAAAA,EACAD,aAAcG,KAAKJ,EACnBH,QAASO,KAAKR,OAGZY,MAMEN,MAEAA,EAAMmB,UAAU8B,GAChB,MAAO5C,cAaTC,QAAiB2C,EACjB,MAAOvC,GACPL,EAAQK,MAcPJ,QACG,IAAIK,eAAa,cAAe,CAACC,IAAKX,EAAQW,IAAKP,MAAAA,WAEpDC,WAWaL,QAACA,EAADD,MAAUA,UACxBM,QAAiBO,eAAaC,MAAM,CACxCb,QAAAA,EACAD,MAAAA,EACAH,aAAcK,KAAKN,EACnBD,QAASO,KAAKR,IAGVuB,EAAkBV,eAAaW,IAAI,CACvCzB,UAAWS,KAAKZ,EAChBW,QAAAA,EACAK,SAAUA,EAASU,QACnBhB,MAAAA,EACAL,QAASO,KAAKR,OAGZM,MAEAA,EAAMmB,UAAUF,GAChB,MAAOZ,WAQJC,GC9LX,MAAM4C,EAAU,CACdC,WAAYhE,EACZiE,UAAWhC,EACXiC,aAAc7B,EACd8B,YAAaP,EACbQ,qBAAsBP,GAGlBQ,EAAaC,UACXC,EAAcR,EAAQO,UAEpBpE,GAOC,IAAIqE,EAAYrE,IAUrB8D,EAAaK,EAAU,cAQvBJ,EAAYI,EAAU,aAQtBH,EAAeG,EAAU,gBAQzBF,EAAcE,EAAU,eAQxBD,EAAuBC,EAAU"} \ No newline at end of file diff --git a/workbox-v4.3.1/workbox-streams.dev.js b/workbox-v4.3.1/workbox-streams.dev.js new file mode 100644 index 0000000000..c90b3dcdae --- /dev/null +++ b/workbox-v4.3.1/workbox-streams.dev.js @@ -0,0 +1,337 @@ +this.workbox = this.workbox || {}; +this.workbox.streams = (function (exports, logger_mjs, assert_mjs) { + 'use strict'; + + try { + self['workbox:streams:4.3.1'] && _(); + } catch (e) {} // eslint-disable-line + + /* + Copyright 2018 Google LLC + + Use of this source code is governed by an MIT-style + license that can be found in the LICENSE file or at + https://opensource.org/licenses/MIT. + */ + /** + * Takes either a Response, a ReadableStream, or a + * [BodyInit](https://fetch.spec.whatwg.org/#bodyinit) and returns the + * ReadableStreamReader object associated with it. + * + * @param {workbox.streams.StreamSource} source + * @return {ReadableStreamReader} + * @private + */ + + function _getReaderFromSource(source) { + if (source.body && source.body.getReader) { + return source.body.getReader(); + } + + if (source.getReader) { + return source.getReader(); + } // TODO: This should be possible to do by constructing a ReadableStream, but + // I can't get it to work. As a hack, construct a new Response, and use the + // reader associated with its body. + + + return new Response(source).body.getReader(); + } + /** + * Takes multiple source Promises, each of which could resolve to a Response, a + * ReadableStream, or a [BodyInit](https://fetch.spec.whatwg.org/#bodyinit). + * + * Returns an object exposing a ReadableStream with each individual stream's + * data returned in sequence, along with a Promise which signals when the + * stream is finished (useful for passing to a FetchEvent's waitUntil()). + * + * @param {Array>} sourcePromises + * @return {Object<{done: Promise, stream: ReadableStream}>} + * + * @memberof workbox.streams + */ + + + function concatenate(sourcePromises) { + { + assert_mjs.assert.isArray(sourcePromises, { + moduleName: 'workbox-streams', + funcName: 'concatenate', + paramName: 'sourcePromises' + }); + } + + const readerPromises = sourcePromises.map(sourcePromise => { + return Promise.resolve(sourcePromise).then(source => { + return _getReaderFromSource(source); + }); + }); + let fullyStreamedResolve; + let fullyStreamedReject; + const done = new Promise((resolve, reject) => { + fullyStreamedResolve = resolve; + fullyStreamedReject = reject; + }); + let i = 0; + const logMessages = []; + const stream = new ReadableStream({ + pull(controller) { + return readerPromises[i].then(reader => reader.read()).then(result => { + if (result.done) { + { + logMessages.push(['Reached the end of source:', sourcePromises[i]]); + } + + i++; + + if (i >= readerPromises.length) { + // Log all the messages in the group at once in a single group. + { + logger_mjs.logger.groupCollapsed(`Concatenating ${readerPromises.length} sources.`); + + for (const message of logMessages) { + if (Array.isArray(message)) { + logger_mjs.logger.log(...message); + } else { + logger_mjs.logger.log(message); + } + } + + logger_mjs.logger.log('Finished reading all sources.'); + logger_mjs.logger.groupEnd(); + } + + controller.close(); + fullyStreamedResolve(); + return; + } + + return this.pull(controller); + } else { + controller.enqueue(result.value); + } + }).catch(error => { + { + logger_mjs.logger.error('An error occurred:', error); + } + + fullyStreamedReject(error); + throw error; + }); + }, + + cancel() { + { + logger_mjs.logger.warn('The ReadableStream was cancelled.'); + } + + fullyStreamedResolve(); + } + + }); + return { + done, + stream + }; + } + + /* + Copyright 2018 Google LLC + + Use of this source code is governed by an MIT-style + license that can be found in the LICENSE file or at + https://opensource.org/licenses/MIT. + */ + /** + * This is a utility method that determines whether the current browser supports + * the features required to create streamed responses. Currently, it checks if + * [`ReadableStream`](https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream/ReadableStream) + * is available. + * + * @param {HeadersInit} [headersInit] If there's no `Content-Type` specified, + * `'text/html'` will be used by default. + * @return {boolean} `true`, if the current browser meets the requirements for + * streaming responses, and `false` otherwise. + * + * @memberof workbox.streams + */ + + function createHeaders(headersInit = {}) { + // See https://github.com/GoogleChrome/workbox/issues/1461 + const headers = new Headers(headersInit); + + if (!headers.has('content-type')) { + headers.set('content-type', 'text/html'); + } + + return headers; + } + + /* + Copyright 2018 Google LLC + + Use of this source code is governed by an MIT-style + license that can be found in the LICENSE file or at + https://opensource.org/licenses/MIT. + */ + /** + * Takes multiple source Promises, each of which could resolve to a Response, a + * ReadableStream, or a [BodyInit](https://fetch.spec.whatwg.org/#bodyinit), + * along with a + * [HeadersInit](https://fetch.spec.whatwg.org/#typedefdef-headersinit). + * + * Returns an object exposing a Response whose body consists of each individual + * stream's data returned in sequence, along with a Promise which signals when + * the stream is finished (useful for passing to a FetchEvent's waitUntil()). + * + * @param {Array>} sourcePromises + * @param {HeadersInit} [headersInit] If there's no `Content-Type` specified, + * `'text/html'` will be used by default. + * @return {Object<{done: Promise, response: Response}>} + * + * @memberof workbox.streams + */ + + function concatenateToResponse(sourcePromises, headersInit) { + const { + done, + stream + } = concatenate(sourcePromises); + const headers = createHeaders(headersInit); + const response = new Response(stream, { + headers + }); + return { + done, + response + }; + } + + /* + Copyright 2018 Google LLC + + Use of this source code is governed by an MIT-style + license that can be found in the LICENSE file or at + https://opensource.org/licenses/MIT. + */ + let cachedIsSupported = undefined; + /** + * This is a utility method that determines whether the current browser supports + * the features required to create streamed responses. Currently, it checks if + * [`ReadableStream`](https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream/ReadableStream) + * can be created. + * + * @return {boolean} `true`, if the current browser meets the requirements for + * streaming responses, and `false` otherwise. + * + * @memberof workbox.streams + */ + + function isSupported() { + if (cachedIsSupported === undefined) { + // See https://github.com/GoogleChrome/workbox/issues/1473 + try { + new ReadableStream({ + start() {} + + }); + cachedIsSupported = true; + } catch (error) { + cachedIsSupported = false; + } + } + + return cachedIsSupported; + } + + /* + Copyright 2018 Google LLC + + Use of this source code is governed by an MIT-style + license that can be found in the LICENSE file or at + https://opensource.org/licenses/MIT. + */ + /** + * A shortcut to create a strategy that could be dropped-in to Workbox's router. + * + * On browsers that do not support constructing new `ReadableStream`s, this + * strategy will automatically wait for all the `sourceFunctions` to complete, + * and create a final response that concatenates their values together. + * + * @param { + * Array} sourceFunctions + * Each function should return a {@link workbox.streams.StreamSource} (or a + * Promise which resolves to one). + * @param {HeadersInit} [headersInit] If there's no `Content-Type` specified, + * `'text/html'` will be used by default. + * @return {workbox.routing.Route~handlerCallback} + * + * @memberof workbox.streams + */ + + function strategy(sourceFunctions, headersInit) { + return async ({ + event, + url, + params + }) => { + if (isSupported()) { + const { + done, + response + } = concatenateToResponse(sourceFunctions.map(fn => fn({ + event, + url, + params + })), headersInit); + event.waitUntil(done); + return response; + } + + { + logger_mjs.logger.log(`The current browser doesn't support creating response ` + `streams. Falling back to non-streaming response instead.`); + } // Fallback to waiting for everything to finish, and concatenating the + // responses. + + + const parts = await Promise.all(sourceFunctions.map(sourceFunction => sourceFunction({ + event, + url, + params + })).map(async responsePromise => { + const response = await responsePromise; + + if (response instanceof Response) { + return response.blob(); + } // Otherwise, assume it's something like a string which can be used + // as-is when constructing the final composite blob. + + + return response; + })); + const headers = createHeaders(headersInit); // Constructing a new Response from a Blob source is well-supported. + // So is constructing a new Blob from multiple source Blobs or strings. + + return new Response(new Blob(parts), { + headers + }); + }; + } + + /* + Copyright 2018 Google LLC + + Use of this source code is governed by an MIT-style + license that can be found in the LICENSE file or at + https://opensource.org/licenses/MIT. + */ + + exports.concatenate = concatenate; + exports.concatenateToResponse = concatenateToResponse; + exports.isSupported = isSupported; + exports.strategy = strategy; + + return exports; + +}({}, workbox.core._private, workbox.core._private)); +//# sourceMappingURL=workbox-streams.dev.js.map diff --git a/workbox-v4.3.1/workbox-streams.dev.js.map b/workbox-v4.3.1/workbox-streams.dev.js.map new file mode 100644 index 0000000000..c175f5e896 --- /dev/null +++ b/workbox-v4.3.1/workbox-streams.dev.js.map @@ -0,0 +1 @@ +{"version":3,"file":"workbox-streams.dev.js","sources":["../_version.mjs","../concatenate.mjs","../utils/createHeaders.mjs","../concatenateToResponse.mjs","../isSupported.mjs","../strategy.mjs","../index.mjs"],"sourcesContent":["try{self['workbox:streams:4.3.1']&&_()}catch(e){}// eslint-disable-line","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport {logger} from 'workbox-core/_private/logger.mjs';\nimport {assert} from 'workbox-core/_private/assert.mjs';\n\nimport './_version.mjs';\n\n/**\n * Takes either a Response, a ReadableStream, or a\n * [BodyInit](https://fetch.spec.whatwg.org/#bodyinit) and returns the\n * ReadableStreamReader object associated with it.\n *\n * @param {workbox.streams.StreamSource} source\n * @return {ReadableStreamReader}\n * @private\n */\nfunction _getReaderFromSource(source) {\n if (source.body && source.body.getReader) {\n return source.body.getReader();\n }\n\n if (source.getReader) {\n return source.getReader();\n }\n\n // TODO: This should be possible to do by constructing a ReadableStream, but\n // I can't get it to work. As a hack, construct a new Response, and use the\n // reader associated with its body.\n return new Response(source).body.getReader();\n}\n\n/**\n * Takes multiple source Promises, each of which could resolve to a Response, a\n * ReadableStream, or a [BodyInit](https://fetch.spec.whatwg.org/#bodyinit).\n *\n * Returns an object exposing a ReadableStream with each individual stream's\n * data returned in sequence, along with a Promise which signals when the\n * stream is finished (useful for passing to a FetchEvent's waitUntil()).\n *\n * @param {Array>} sourcePromises\n * @return {Object<{done: Promise, stream: ReadableStream}>}\n *\n * @memberof workbox.streams\n */\nfunction concatenate(sourcePromises) {\n if (process.env.NODE_ENV !== 'production') {\n assert.isArray(sourcePromises, {\n moduleName: 'workbox-streams',\n funcName: 'concatenate',\n paramName: 'sourcePromises',\n });\n }\n\n const readerPromises = sourcePromises.map((sourcePromise) => {\n return Promise.resolve(sourcePromise).then((source) => {\n return _getReaderFromSource(source);\n });\n });\n\n let fullyStreamedResolve;\n let fullyStreamedReject;\n const done = new Promise((resolve, reject) => {\n fullyStreamedResolve = resolve;\n fullyStreamedReject = reject;\n });\n\n let i = 0;\n const logMessages = [];\n const stream = new ReadableStream({\n pull(controller) {\n return readerPromises[i]\n .then((reader) => reader.read())\n .then((result) => {\n if (result.done) {\n if (process.env.NODE_ENV !== 'production') {\n logMessages.push(['Reached the end of source:',\n sourcePromises[i]]);\n }\n\n i++;\n if (i >= readerPromises.length) {\n // Log all the messages in the group at once in a single group.\n if (process.env.NODE_ENV !== 'production') {\n logger.groupCollapsed(\n `Concatenating ${readerPromises.length} sources.`);\n for (const message of logMessages) {\n if (Array.isArray(message)) {\n logger.log(...message);\n } else {\n logger.log(message);\n }\n }\n logger.log('Finished reading all sources.');\n logger.groupEnd();\n }\n\n controller.close();\n fullyStreamedResolve();\n return;\n }\n\n return this.pull(controller);\n } else {\n controller.enqueue(result.value);\n }\n }).catch((error) => {\n if (process.env.NODE_ENV !== 'production') {\n logger.error('An error occurred:', error);\n }\n fullyStreamedReject(error);\n throw error;\n });\n },\n\n cancel() {\n if (process.env.NODE_ENV !== 'production') {\n logger.warn('The ReadableStream was cancelled.');\n }\n\n fullyStreamedResolve();\n },\n });\n\n return {done, stream};\n}\n\nexport {concatenate};\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport '../_version.mjs';\n\n/**\n * This is a utility method that determines whether the current browser supports\n * the features required to create streamed responses. Currently, it checks if\n * [`ReadableStream`](https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream/ReadableStream)\n * is available.\n *\n * @param {HeadersInit} [headersInit] If there's no `Content-Type` specified,\n * `'text/html'` will be used by default.\n * @return {boolean} `true`, if the current browser meets the requirements for\n * streaming responses, and `false` otherwise.\n *\n * @memberof workbox.streams\n */\nfunction createHeaders(headersInit = {}) {\n // See https://github.com/GoogleChrome/workbox/issues/1461\n const headers = new Headers(headersInit);\n if (!headers.has('content-type')) {\n headers.set('content-type', 'text/html');\n }\n return headers;\n}\n\nexport {createHeaders};\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport {createHeaders} from './utils/createHeaders.mjs';\nimport {concatenate} from './concatenate.mjs';\n\nimport './_version.mjs';\n\n/**\n * Takes multiple source Promises, each of which could resolve to a Response, a\n * ReadableStream, or a [BodyInit](https://fetch.spec.whatwg.org/#bodyinit),\n * along with a\n * [HeadersInit](https://fetch.spec.whatwg.org/#typedefdef-headersinit).\n *\n * Returns an object exposing a Response whose body consists of each individual\n * stream's data returned in sequence, along with a Promise which signals when\n * the stream is finished (useful for passing to a FetchEvent's waitUntil()).\n *\n * @param {Array>} sourcePromises\n * @param {HeadersInit} [headersInit] If there's no `Content-Type` specified,\n * `'text/html'` will be used by default.\n * @return {Object<{done: Promise, response: Response}>}\n *\n * @memberof workbox.streams\n */\nfunction concatenateToResponse(sourcePromises, headersInit) {\n const {done, stream} = concatenate(sourcePromises);\n\n const headers = createHeaders(headersInit);\n const response = new Response(stream, {headers});\n\n return {done, response};\n}\n\nexport {concatenateToResponse};\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport './_version.mjs';\n\nlet cachedIsSupported = undefined;\n\n/**\n * This is a utility method that determines whether the current browser supports\n * the features required to create streamed responses. Currently, it checks if\n * [`ReadableStream`](https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream/ReadableStream)\n * can be created.\n *\n * @return {boolean} `true`, if the current browser meets the requirements for\n * streaming responses, and `false` otherwise.\n *\n * @memberof workbox.streams\n */\nfunction isSupported() {\n if (cachedIsSupported === undefined) {\n // See https://github.com/GoogleChrome/workbox/issues/1473\n try {\n new ReadableStream({start() {}});\n cachedIsSupported = true;\n } catch (error) {\n cachedIsSupported = false;\n }\n }\n\n return cachedIsSupported;\n}\n\nexport {isSupported};\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport {logger} from 'workbox-core/_private/logger.mjs';\n\nimport {createHeaders} from './utils/createHeaders.mjs';\nimport {concatenateToResponse} from './concatenateToResponse.mjs';\nimport {isSupported} from './isSupported.mjs';\n\nimport './_version.mjs';\n\n/**\n * A shortcut to create a strategy that could be dropped-in to Workbox's router.\n *\n * On browsers that do not support constructing new `ReadableStream`s, this\n * strategy will automatically wait for all the `sourceFunctions` to complete,\n * and create a final response that concatenates their values together.\n *\n * @param {\n * Array} sourceFunctions\n * Each function should return a {@link workbox.streams.StreamSource} (or a\n * Promise which resolves to one).\n * @param {HeadersInit} [headersInit] If there's no `Content-Type` specified,\n * `'text/html'` will be used by default.\n * @return {workbox.routing.Route~handlerCallback}\n *\n * @memberof workbox.streams\n */\nexport function strategy(sourceFunctions, headersInit) {\n return async ({event, url, params}) => {\n if (isSupported()) {\n const {done, response} = concatenateToResponse(sourceFunctions.map(\n (fn) => fn({event, url, params})), headersInit);\n event.waitUntil(done);\n return response;\n }\n\n if (process.env.NODE_ENV !== 'production') {\n logger.log(`The current browser doesn't support creating response ` +\n `streams. Falling back to non-streaming response instead.`);\n }\n\n // Fallback to waiting for everything to finish, and concatenating the\n // responses.\n const parts = await Promise.all(\n sourceFunctions.map(\n (sourceFunction) => sourceFunction({event, url, params})\n ).map(async (responsePromise) => {\n const response = await responsePromise;\n if (response instanceof Response) {\n return response.blob();\n }\n\n // Otherwise, assume it's something like a string which can be used\n // as-is when constructing the final composite blob.\n return response;\n })\n );\n\n const headers = createHeaders(headersInit);\n // Constructing a new Response from a Blob source is well-supported.\n // So is constructing a new Blob from multiple source Blobs or strings.\n return new Response(new Blob(parts), {headers});\n };\n}\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport {concatenate} from './concatenate.mjs';\nimport {concatenateToResponse} from './concatenateToResponse.mjs';\nimport {isSupported} from './isSupported.mjs';\nimport {strategy} from './strategy.mjs';\nimport './_version.mjs';\n\n\n/**\n * @namespace workbox.streams\n */\n\nexport {\n concatenate,\n concatenateToResponse,\n isSupported,\n strategy,\n};\n"],"names":["self","_","e","_getReaderFromSource","source","body","getReader","Response","concatenate","sourcePromises","assert","isArray","moduleName","funcName","paramName","readerPromises","map","sourcePromise","Promise","resolve","then","fullyStreamedResolve","fullyStreamedReject","done","reject","i","logMessages","stream","ReadableStream","pull","controller","reader","read","result","push","length","logger","groupCollapsed","message","Array","log","groupEnd","close","enqueue","value","catch","error","cancel","warn","createHeaders","headersInit","headers","Headers","has","set","concatenateToResponse","response","cachedIsSupported","undefined","isSupported","start","strategy","sourceFunctions","event","url","params","fn","waitUntil","parts","all","sourceFunction","responsePromise","blob","Blob"],"mappings":";;;;EAAA,IAAG;EAACA,EAAAA,IAAI,CAAC,uBAAD,CAAJ,IAA+BC,CAAC,EAAhC;EAAmC,CAAvC,CAAuC,OAAMC,CAAN,EAAQ;;ECA/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MAAAA;EAAD,KAA9B,CAAP;EACD,GAlCD;EAmCD;;ECrED;;;;;;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/workbox-v4.3.1/workbox-streams.prod.js b/workbox-v4.3.1/workbox-streams.prod.js new file mode 100644 index 0000000000..dc34844649 --- /dev/null +++ b/workbox-v4.3.1/workbox-streams.prod.js @@ -0,0 +1,2 @@ +this.workbox=this.workbox||{},this.workbox.streams=function(e){"use strict";try{self["workbox:streams:4.3.1"]&&_()}catch(e){}function n(e){const n=e.map(e=>Promise.resolve(e).then(e=>(function(e){return e.body&&e.body.getReader?e.body.getReader():e.getReader?e.getReader():new Response(e).body.getReader()})(e)));let t,r;const s=new Promise((e,n)=>{t=e,r=n});let o=0;return{done:s,stream:new ReadableStream({pull(e){return n[o].then(e=>e.read()).then(r=>{if(r.done)return++o>=n.length?(e.close(),void t()):this.pull(e);e.enqueue(r.value)}).catch(e=>{throw r(e),e})},cancel(){t()}})}}function t(e={}){const n=new Headers(e);return n.has("content-type")||n.set("content-type","text/html"),n}function r(e,r){const{done:s,stream:o}=n(e),a=t(r);return{done:s,response:new Response(o,{headers:a})}}let s=void 0;function o(){if(void 0===s)try{new ReadableStream({start(){}}),s=!0}catch(e){s=!1}return s}return e.concatenate=n,e.concatenateToResponse=r,e.isSupported=o,e.strategy=function(e,n){return async({event:s,url:a,params:c})=>{if(o()){const{done:t,response:o}=r(e.map(e=>e({event:s,url:a,params:c})),n);return s.waitUntil(t),o}const i=await Promise.all(e.map(e=>e({event:s,url:a,params:c})).map(async e=>{const n=await e;return n instanceof Response?n.blob():n})),u=t(n);return new Response(new Blob(i),{headers:u})}},e}({}); +//# sourceMappingURL=workbox-streams.prod.js.map diff --git a/workbox-v4.3.1/workbox-streams.prod.js.map b/workbox-v4.3.1/workbox-streams.prod.js.map new file mode 100644 index 0000000000..ac76d02e4a --- /dev/null +++ b/workbox-v4.3.1/workbox-streams.prod.js.map @@ -0,0 +1 @@ +{"version":3,"file":"workbox-streams.prod.js","sources":["../_version.mjs","../concatenate.mjs","../utils/createHeaders.mjs","../concatenateToResponse.mjs","../isSupported.mjs","../strategy.mjs"],"sourcesContent":["try{self['workbox:streams:4.3.1']&&_()}catch(e){}// eslint-disable-line","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport {logger} from 'workbox-core/_private/logger.mjs';\nimport {assert} from 'workbox-core/_private/assert.mjs';\n\nimport './_version.mjs';\n\n/**\n * Takes either a Response, a ReadableStream, or a\n * [BodyInit](https://fetch.spec.whatwg.org/#bodyinit) and returns the\n * ReadableStreamReader object associated with it.\n *\n * @param {workbox.streams.StreamSource} source\n * @return {ReadableStreamReader}\n * @private\n */\nfunction _getReaderFromSource(source) {\n if (source.body && source.body.getReader) {\n return source.body.getReader();\n }\n\n if (source.getReader) {\n return source.getReader();\n }\n\n // TODO: This should be possible to do by constructing a ReadableStream, but\n // I can't get it to work. As a hack, construct a new Response, and use the\n // reader associated with its body.\n return new Response(source).body.getReader();\n}\n\n/**\n * Takes multiple source Promises, each of which could resolve to a Response, a\n * ReadableStream, or a [BodyInit](https://fetch.spec.whatwg.org/#bodyinit).\n *\n * Returns an object exposing a ReadableStream with each individual stream's\n * data returned in sequence, along with a Promise which signals when the\n * stream is finished (useful for passing to a FetchEvent's waitUntil()).\n *\n * @param {Array>} sourcePromises\n * @return {Object<{done: Promise, stream: ReadableStream}>}\n *\n * @memberof workbox.streams\n */\nfunction concatenate(sourcePromises) {\n if (process.env.NODE_ENV !== 'production') {\n assert.isArray(sourcePromises, {\n moduleName: 'workbox-streams',\n funcName: 'concatenate',\n paramName: 'sourcePromises',\n });\n }\n\n const readerPromises = sourcePromises.map((sourcePromise) => {\n return Promise.resolve(sourcePromise).then((source) => {\n return _getReaderFromSource(source);\n });\n });\n\n let fullyStreamedResolve;\n let fullyStreamedReject;\n const done = new Promise((resolve, reject) => {\n fullyStreamedResolve = resolve;\n fullyStreamedReject = reject;\n });\n\n let i = 0;\n const logMessages = [];\n const stream = new ReadableStream({\n pull(controller) {\n return readerPromises[i]\n .then((reader) => reader.read())\n .then((result) => {\n if (result.done) {\n if (process.env.NODE_ENV !== 'production') {\n logMessages.push(['Reached the end of source:',\n sourcePromises[i]]);\n }\n\n i++;\n if (i >= readerPromises.length) {\n // Log all the messages in the group at once in a single group.\n if (process.env.NODE_ENV !== 'production') {\n logger.groupCollapsed(\n `Concatenating ${readerPromises.length} sources.`);\n for (const message of logMessages) {\n if (Array.isArray(message)) {\n logger.log(...message);\n } else {\n logger.log(message);\n }\n }\n logger.log('Finished reading all sources.');\n logger.groupEnd();\n }\n\n controller.close();\n fullyStreamedResolve();\n return;\n }\n\n return this.pull(controller);\n } else {\n controller.enqueue(result.value);\n }\n }).catch((error) => {\n if (process.env.NODE_ENV !== 'production') {\n logger.error('An error occurred:', error);\n }\n fullyStreamedReject(error);\n throw error;\n });\n },\n\n cancel() {\n if (process.env.NODE_ENV !== 'production') {\n logger.warn('The ReadableStream was cancelled.');\n }\n\n fullyStreamedResolve();\n },\n });\n\n return {done, stream};\n}\n\nexport {concatenate};\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport '../_version.mjs';\n\n/**\n * This is a utility method that determines whether the current browser supports\n * the features required to create streamed responses. Currently, it checks if\n * [`ReadableStream`](https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream/ReadableStream)\n * is available.\n *\n * @param {HeadersInit} [headersInit] If there's no `Content-Type` specified,\n * `'text/html'` will be used by default.\n * @return {boolean} `true`, if the current browser meets the requirements for\n * streaming responses, and `false` otherwise.\n *\n * @memberof workbox.streams\n */\nfunction createHeaders(headersInit = {}) {\n // See https://github.com/GoogleChrome/workbox/issues/1461\n const headers = new Headers(headersInit);\n if (!headers.has('content-type')) {\n headers.set('content-type', 'text/html');\n }\n return headers;\n}\n\nexport {createHeaders};\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport {createHeaders} from './utils/createHeaders.mjs';\nimport {concatenate} from './concatenate.mjs';\n\nimport './_version.mjs';\n\n/**\n * Takes multiple source Promises, each of which could resolve to a Response, a\n * ReadableStream, or a [BodyInit](https://fetch.spec.whatwg.org/#bodyinit),\n * along with a\n * [HeadersInit](https://fetch.spec.whatwg.org/#typedefdef-headersinit).\n *\n * Returns an object exposing a Response whose body consists of each individual\n * stream's data returned in sequence, along with a Promise which signals when\n * the stream is finished (useful for passing to a FetchEvent's waitUntil()).\n *\n * @param {Array>} sourcePromises\n * @param {HeadersInit} [headersInit] If there's no `Content-Type` specified,\n * `'text/html'` will be used by default.\n * @return {Object<{done: Promise, response: Response}>}\n *\n * @memberof workbox.streams\n */\nfunction concatenateToResponse(sourcePromises, headersInit) {\n const {done, stream} = concatenate(sourcePromises);\n\n const headers = createHeaders(headersInit);\n const response = new Response(stream, {headers});\n\n return {done, response};\n}\n\nexport {concatenateToResponse};\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport './_version.mjs';\n\nlet cachedIsSupported = undefined;\n\n/**\n * This is a utility method that determines whether the current browser supports\n * the features required to create streamed responses. Currently, it checks if\n * [`ReadableStream`](https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream/ReadableStream)\n * can be created.\n *\n * @return {boolean} `true`, if the current browser meets the requirements for\n * streaming responses, and `false` otherwise.\n *\n * @memberof workbox.streams\n */\nfunction isSupported() {\n if (cachedIsSupported === undefined) {\n // See https://github.com/GoogleChrome/workbox/issues/1473\n try {\n new ReadableStream({start() {}});\n cachedIsSupported = true;\n } catch (error) {\n cachedIsSupported = false;\n }\n }\n\n return cachedIsSupported;\n}\n\nexport {isSupported};\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport {logger} from 'workbox-core/_private/logger.mjs';\n\nimport {createHeaders} from './utils/createHeaders.mjs';\nimport {concatenateToResponse} from './concatenateToResponse.mjs';\nimport {isSupported} from './isSupported.mjs';\n\nimport './_version.mjs';\n\n/**\n * A shortcut to create a strategy that could be dropped-in to Workbox's router.\n *\n * On browsers that do not support constructing new `ReadableStream`s, this\n * strategy will automatically wait for all the `sourceFunctions` to complete,\n * and create a final response that concatenates their values together.\n *\n * @param {\n * Array} sourceFunctions\n * Each function should return a {@link workbox.streams.StreamSource} (or a\n * Promise which resolves to one).\n * @param {HeadersInit} [headersInit] If there's no `Content-Type` specified,\n * `'text/html'` will be used by default.\n * @return {workbox.routing.Route~handlerCallback}\n *\n * @memberof workbox.streams\n */\nexport function strategy(sourceFunctions, headersInit) {\n return async ({event, url, params}) => {\n if (isSupported()) {\n const {done, response} = concatenateToResponse(sourceFunctions.map(\n (fn) => fn({event, url, params})), headersInit);\n event.waitUntil(done);\n return response;\n }\n\n if (process.env.NODE_ENV !== 'production') {\n logger.log(`The current browser doesn't support creating response ` +\n `streams. Falling back to non-streaming response instead.`);\n }\n\n // Fallback to waiting for everything to finish, and concatenating the\n // responses.\n const parts = await Promise.all(\n sourceFunctions.map(\n (sourceFunction) => sourceFunction({event, url, params})\n ).map(async (responsePromise) => {\n const response = await responsePromise;\n if (response instanceof Response) {\n return response.blob();\n }\n\n // Otherwise, assume it's something like a string which can be used\n // as-is when constructing the final composite blob.\n return response;\n })\n );\n\n const headers = createHeaders(headersInit);\n // Constructing a new Response from a Blob source is well-supported.\n // So is constructing a new Blob from multiple source Blobs or strings.\n return new Response(new Blob(parts), {headers});\n };\n}\n"],"names":["self","_","e","concatenate","sourcePromises","readerPromises","map","sourcePromise","Promise","resolve","then","source","body","getReader","Response","_getReaderFromSource","fullyStreamedResolve","fullyStreamedReject","done","reject","i","stream","ReadableStream","pull","controller","reader","read","result","length","close","this","enqueue","value","catch","error","cancel","createHeaders","headersInit","headers","Headers","has","set","concatenateToResponse","response","cachedIsSupported","undefined","isSupported","start","sourceFunctions","async","event","url","params","fn","waitUntil","parts","all","sourceFunction","responsePromise","blob","Blob"],"mappings":"4EAAA,IAAIA,KAAK,0BAA0BC,IAAI,MAAMC,ICkD7C,SAASC,EAAYC,SASbC,EAAiBD,EAAeE,IAAKC,GAClCC,QAAQC,QAAQF,GAAeG,KAAMC,IAtChD,SAA8BA,UACxBA,EAAOC,MAAQD,EAAOC,KAAKC,UACtBF,EAAOC,KAAKC,YAGjBF,EAAOE,UACFF,EAAOE,YAMT,IAAIC,SAASH,GAAQC,KAAKC,aA2BtBE,CAAqBJ,SAI5BK,EACAC,QACEC,EAAO,IAAIV,QAAQ,CAACC,EAASU,KACjCH,EAAuBP,EACvBQ,EAAsBE,QAGpBC,EAAI,QAyDD,CAACF,KAAAA,EAAMG,OAvDC,IAAIC,eAAe,CAChCC,KAAKC,UACInB,EAAee,GACjBV,KAAMe,GAAWA,EAAOC,QACxBhB,KAAMiB,OACDA,EAAOT,aAMTE,GACSf,EAAeuB,QAgBtBJ,EAAWK,aACXb,KAIKc,KAAKP,KAAKC,GAEjBA,EAAWO,QAAQJ,EAAOK,SAE3BC,MAAOC,UAIRjB,EAAoBiB,GACdA,KAIdC,SAKEnB,QCtGN,SAASoB,EAAcC,EAAc,UAE7BC,EAAU,IAAIC,QAAQF,UACvBC,EAAQE,IAAI,iBACfF,EAAQG,IAAI,eAAgB,aAEvBH,ECCT,SAASI,EAAsBtC,EAAgBiC,SACvCnB,KAACA,EAADG,OAAOA,GAAUlB,EAAYC,GAE7BkC,EAAUF,EAAcC,SAGvB,CAACnB,KAAAA,EAAMyB,SAFG,IAAI7B,SAASO,EAAQ,CAACiB,QAAAA,KCxBzC,IAAIM,OAAoBC,EAaxB,SAASC,YACmBD,IAAtBD,UAGItB,eAAe,CAACyB,YACpBH,GAAoB,EACpB,MAAOV,GACPU,GAAoB,SAIjBA,8ECDF,SAAkBI,EAAiBX,UACjCY,OAAQC,MAAAA,EAAOC,IAAAA,EAAKC,OAAAA,SACrBN,IAAe,OACX5B,KAACA,EAADyB,SAAOA,GAAYD,EAAsBM,EAAgB1C,IAC1D+C,GAAOA,EAAG,CAACH,MAAAA,EAAOC,IAAAA,EAAKC,OAAAA,KAAWf,UACvCa,EAAMI,UAAUpC,GACTyB,QAUHY,QAAc/C,QAAQgD,IACxBR,EAAgB1C,IACXmD,GAAmBA,EAAe,CAACP,MAAAA,EAAOC,IAAAA,EAAKC,OAAAA,KAClD9C,IAAI2C,MAAAA,UACEN,QAAiBe,SACnBf,aAAoB7B,SACf6B,EAASgB,OAKXhB,KAIPL,EAAUF,EAAcC,UAGvB,IAAIvB,SAAS,IAAI8C,KAAKL,GAAQ,CAACjB,QAAAA"} \ No newline at end of file diff --git a/workbox-v4.3.1/workbox-sw.js b/workbox-v4.3.1/workbox-sw.js new file mode 100644 index 0000000000..61b3289a81 --- /dev/null +++ b/workbox-v4.3.1/workbox-sw.js @@ -0,0 +1,2 @@ +!function(){"use strict";try{self["workbox:sw:4.3.1"]&&_()}catch(t){}const t="https://storage.googleapis.com/workbox-cdn/releases/4.3.1",e={backgroundSync:"background-sync",broadcastUpdate:"broadcast-update",cacheableResponse:"cacheable-response",core:"core",expiration:"expiration",googleAnalytics:"offline-ga",navigationPreload:"navigation-preload",precaching:"precaching",rangeRequests:"range-requests",routing:"routing",strategies:"strategies",streams:"streams"};self.workbox=new class{constructor(){return this.v={},this.t={debug:"localhost"===self.location.hostname,modulePathPrefix:null,modulePathCb:null},this.s=this.t.debug?"dev":"prod",this.o=!1,new Proxy(this,{get(t,s){if(t[s])return t[s];const o=e[s];return o&&t.loadModule(`workbox-${o}`),t[s]}})}setConfig(t={}){if(this.o)throw new Error("Config must be set before accessing workbox.* modules");Object.assign(this.t,t),this.s=this.t.debug?"dev":"prod"}loadModule(t){const e=this.i(t);try{importScripts(e),this.o=!0}catch(s){throw console.error(`Unable to import module '${t}' from '${e}'.`),s}}i(e){if(this.t.modulePathCb)return this.t.modulePathCb(e,this.t.debug);let s=[t];const o=`${e}.${this.s}.js`,r=this.t.modulePathPrefix;return r&&""===(s=r.split("/"))[s.length-1]&&s.splice(s.length-1,1),s.push(o),s.join("/")}}}(); +//# sourceMappingURL=workbox-sw.js.map diff --git a/workbox-v4.3.1/workbox-sw.js.map b/workbox-v4.3.1/workbox-sw.js.map new file mode 100644 index 0000000000..efb3c3655e --- /dev/null +++ b/workbox-v4.3.1/workbox-sw.js.map @@ -0,0 +1 @@ +{"version":3,"file":"workbox-sw.js","sources":["../_version.mjs","../controllers/WorkboxSW.mjs","../index.mjs"],"sourcesContent":["try{self['workbox:sw:4.3.1']&&_()}catch(e){}// eslint-disable-line","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport '../_version.mjs';\n\nconst CDN_PATH = `WORKBOX_CDN_ROOT_URL`;\n\nconst MODULE_KEY_TO_NAME_MAPPING = {\n // TODO(philipwalton): add jsdoc tags to associate these with their module.\n // @name backgroundSync\n // @memberof workbox\n // @see module:workbox-background-sync\n backgroundSync: 'background-sync',\n broadcastUpdate: 'broadcast-update',\n cacheableResponse: 'cacheable-response',\n core: 'core',\n expiration: 'expiration',\n googleAnalytics: 'offline-ga',\n navigationPreload: 'navigation-preload',\n precaching: 'precaching',\n rangeRequests: 'range-requests',\n routing: 'routing',\n strategies: 'strategies',\n streams: 'streams',\n};\n\n/**\n * This class can be used to make it easy to use the various parts of\n * Workbox.\n *\n * @private\n */\nexport class WorkboxSW {\n /**\n * Creates a proxy that automatically loads workbox namespaces on demand.\n *\n * @private\n */\n constructor() {\n this.v = {};\n this._options = {\n debug: self.location.hostname === 'localhost',\n modulePathPrefix: null,\n modulePathCb: null,\n };\n\n this._env = this._options.debug ? 'dev' : 'prod';\n this._modulesLoaded = false;\n\n return new Proxy(this, {\n get(target, key) {\n if (target[key]) {\n return target[key];\n }\n\n const moduleName = MODULE_KEY_TO_NAME_MAPPING[key];\n if (moduleName) {\n target.loadModule(`workbox-${moduleName}`);\n }\n\n return target[key];\n },\n });\n }\n\n /**\n * Updates the configuration options. You can specify whether to treat as a\n * debug build and whether to use a CDN or a specific path when importing\n * other workbox-modules\n *\n * @param {Object} [options]\n * @param {boolean} [options.debug] If true, `dev` builds are using, otherwise\n * `prod` builds are used. By default, `prod` is used unless on localhost.\n * @param {Function} [options.modulePathPrefix] To avoid using the CDN with\n * `workbox-sw` set the path prefix of where modules should be loaded from.\n * For example `modulePathPrefix: '/third_party/workbox/v3.0.0/'`.\n * @param {workbox~ModulePathCallback} [options.modulePathCb] If defined,\n * this callback will be responsible for determining the path of each\n * workbox module.\n *\n * @alias workbox.setConfig\n */\n setConfig(options = {}) {\n if (!this._modulesLoaded) {\n Object.assign(this._options, options);\n this._env = this._options.debug ? 'dev' : 'prod';\n } else {\n throw new Error('Config must be set before accessing workbox.* modules');\n }\n }\n\n /**\n * Load a Workbox module by passing in the appropriate module name.\n *\n * This is not generally needed unless you know there are modules that are\n * dynamically used and you want to safe guard use of the module while the\n * user may be offline.\n *\n * @param {string} moduleName\n *\n * @alias workbox.loadModule\n */\n loadModule(moduleName) {\n const modulePath = this._getImportPath(moduleName);\n try {\n importScripts(modulePath);\n this._modulesLoaded = true;\n } catch (err) {\n // TODO Add context of this error if using the CDN vs the local file.\n\n // We can't rely on workbox-core being loaded so using console\n // eslint-disable-next-line\n console.error(\n `Unable to import module '${moduleName}' from '${modulePath}'.`);\n throw err;\n }\n }\n\n /**\n * This method will get the path / CDN URL to be used for importScript calls.\n *\n * @param {string} moduleName\n * @return {string} URL to the desired module.\n *\n * @private\n */\n _getImportPath(moduleName) {\n if (this._options.modulePathCb) {\n return this._options.modulePathCb(moduleName, this._options.debug);\n }\n\n // TODO: This needs to be dynamic some how.\n let pathParts = [CDN_PATH];\n\n const fileName = `${moduleName}.${this._env}.js`;\n\n const pathPrefix = this._options.modulePathPrefix;\n if (pathPrefix) {\n // Split to avoid issues with developers ending / not ending with slash\n pathParts = pathPrefix.split('/');\n\n // We don't need a slash at the end as we will be adding\n // a filename regardless\n if (pathParts[pathParts.length - 1] === '') {\n pathParts.splice(pathParts.length - 1, 1);\n }\n }\n\n pathParts.push(fileName);\n\n return pathParts.join('/');\n }\n}\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport {WorkboxSW} from './controllers/WorkboxSW.mjs';\nimport './_version.mjs';\n\n/**\n * @namespace workbox\n */\n\n// Don't export anything, just expose a global.\nself.workbox = new WorkboxSW();\n"],"names":["self","_","e","CDN_PATH","MODULE_KEY_TO_NAME_MAPPING","backgroundSync","broadcastUpdate","cacheableResponse","core","expiration","googleAnalytics","navigationPreload","precaching","rangeRequests","routing","strategies","streams","workbox","constructor","v","_options","debug","location","hostname","modulePathPrefix","modulePathCb","_env","this","_modulesLoaded","Proxy","get","target","key","moduleName","loadModule","setConfig","options","Error","Object","assign","modulePath","_getImportPath","importScripts","err","console","error","pathParts","fileName","pathPrefix","split","length","splice","push","join"],"mappings":"yBAAA,IAAIA,KAAK,qBAAqBC,IAAI,MAAMC,ICUxC,MAAMC,EAAY,4DAEZC,EAA6B,CAKjCC,eAAgB,kBAChBC,gBAAiB,mBACjBC,kBAAmB,qBACnBC,KAAM,OACNC,WAAY,aACZC,gBAAiB,aACjBC,kBAAmB,qBACnBC,WAAY,aACZC,cAAe,iBACfC,QAAS,UACTC,WAAY,aACZC,QAAS,WCZXhB,KAAKiB,QAAU,IDqBR,MAMLC,0BACOC,EAAI,QACJC,EAAW,CACdC,MAAkC,cAA3BrB,KAAKsB,SAASC,SACrBC,iBAAkB,KAClBC,aAAc,WAGXC,EAAOC,KAAKP,EAASC,MAAQ,MAAQ,YACrCO,GAAiB,EAEf,IAAIC,MAAMF,KAAM,CACrBG,IAAIC,EAAQC,MACND,EAAOC,UACFD,EAAOC,SAGVC,EAAa7B,EAA2B4B,UAC1CC,GACFF,EAAOG,sBAAsBD,KAGxBF,EAAOC,MAsBpBG,UAAUC,EAAU,OACbT,KAAKC,QAIF,IAAIS,MAAM,yDAHhBC,OAAOC,OAAOZ,KAAKP,EAAUgB,QACxBV,EAAOC,KAAKP,EAASC,MAAQ,MAAQ,OAiB9Ca,WAAWD,SACHO,EAAab,KAAKc,EAAeR,OAErCS,cAAcF,QACTZ,GAAiB,EACtB,MAAOe,SAKPC,QAAQC,kCACwBZ,YAAqBO,OAC/CG,GAYVF,EAAeR,MACTN,KAAKP,EAASK,oBACTE,KAAKP,EAASK,aAAaQ,EAAYN,KAAKP,EAASC,WAI1DyB,EAAY,CAAC3C,SAEX4C,KAAcd,KAAcN,KAAKD,OAEjCsB,EAAarB,KAAKP,EAASI,wBAC7BwB,GAMsC,MAJxCF,EAAYE,EAAWC,MAAM,MAIfH,EAAUI,OAAS,IAC/BJ,EAAUK,OAAOL,EAAUI,OAAS,EAAG,GAI3CJ,EAAUM,KAAKL,GAERD,EAAUO,KAAK"} \ No newline at end of file diff --git a/workbox-v4.3.1/workbox-window.dev.es5.mjs b/workbox-v4.3.1/workbox-window.dev.es5.mjs new file mode 100644 index 0000000000..73240674b8 --- /dev/null +++ b/workbox-v4.3.1/workbox-window.dev.es5.mjs @@ -0,0 +1,885 @@ +try { + self['workbox:window:4.3.1'] && _(); +} catch (e) {} // eslint-disable-line + +/* + Copyright 2019 Google LLC + + Use of this source code is governed by an MIT-style + license that can be found in the LICENSE file or at + https://opensource.org/licenses/MIT. +*/ +/** + * Sends a data object to a service worker via `postMessage` and resolves with + * a response (if any). + * + * A response can be set in a message handler in the service worker by + * calling `event.ports[0].postMessage(...)`, which will resolve the promise + * returned by `messageSW()`. If no response is set, the promise will not + * resolve. + * + * @param {ServiceWorker} sw The service worker to send the message to. + * @param {Object} data An object to send to the service worker. + * @return {Promise} + * + * @memberof module:workbox-window + */ + +var messageSW = function messageSW(sw, data) { + return new Promise(function (resolve) { + var messageChannel = new MessageChannel(); + + messageChannel.port1.onmessage = function (evt) { + return resolve(evt.data); + }; + + sw.postMessage(data, [messageChannel.port2]); + }); +}; + +function _defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ("value" in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } +} + +function _createClass(Constructor, protoProps, staticProps) { + if (protoProps) _defineProperties(Constructor.prototype, protoProps); + if (staticProps) _defineProperties(Constructor, staticProps); + return Constructor; +} + +function _inheritsLoose(subClass, superClass) { + subClass.prototype = Object.create(superClass.prototype); + subClass.prototype.constructor = subClass; + subClass.__proto__ = superClass; +} + +function _assertThisInitialized(self) { + if (self === void 0) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + + return self; +} + +try { + self['workbox:core:4.3.1'] && _(); +} catch (e) {} // eslint-disable-line + +/* + Copyright 2018 Google LLC + + Use of this source code is governed by an MIT-style + license that can be found in the LICENSE file or at + https://opensource.org/licenses/MIT. +*/ +/** + * The Deferred class composes Promises in a way that allows for them to be + * resolved or rejected from outside the constructor. In most cases promises + * should be used directly, but Deferreds can be necessary when the logic to + * resolve a promise must be separate. + * + * @private + */ + +var Deferred = +/** + * Creates a promise and exposes its resolve and reject functions as methods. + */ +function Deferred() { + var _this = this; + + this.promise = new Promise(function (resolve, reject) { + _this.resolve = resolve; + _this.reject = reject; + }); +}; + +/* + Copyright 2019 Google LLC + Use of this source code is governed by an MIT-style + license that can be found in the LICENSE file or at + https://opensource.org/licenses/MIT. +*/ +var logger = function () { + var inGroup = false; + var methodToColorMap = { + debug: "#7f8c8d", + // Gray + log: "#2ecc71", + // Green + warn: "#f39c12", + // Yellow + error: "#c0392b", + // Red + groupCollapsed: "#3498db", + // Blue + groupEnd: null // No colored prefix on groupEnd + + }; + + var print = function print(method, args) { + var _console2; + + if (method === 'groupCollapsed') { + // Safari doesn't print all console.groupCollapsed() arguments: + // https://bugs.webkit.org/show_bug.cgi?id=182754 + if (/^((?!chrome|android).)*safari/i.test(navigator.userAgent)) { + var _console; + + (_console = console)[method].apply(_console, args); + + return; + } + } + + var styles = ["background: " + methodToColorMap[method], "border-radius: 0.5em", "color: white", "font-weight: bold", "padding: 2px 0.5em"]; // When in a group, the workbox prefix is not displayed. + + var logPrefix = inGroup ? [] : ['%cworkbox', styles.join(';')]; + + (_console2 = console)[method].apply(_console2, logPrefix.concat(args)); + + if (method === 'groupCollapsed') { + inGroup = true; + } + + if (method === 'groupEnd') { + inGroup = false; + } + }; + + var api = {}; + + var _arr = Object.keys(methodToColorMap); + + var _loop = function _loop() { + var method = _arr[_i]; + + api[method] = function () { + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + print(method, args); + }; + }; + + for (var _i = 0; _i < _arr.length; _i++) { + _loop(); + } + + return api; +}(); + +/* + Copyright 2019 Google LLC + + Use of this source code is governed by an MIT-style + license that can be found in the LICENSE file or at + https://opensource.org/licenses/MIT. +*/ +/** + * A minimal `EventTarget` shim. + * This is necessary because not all browsers support constructable + * `EventTarget`, so using a real `EventTarget` will error. + * @private + */ + +var EventTargetShim = +/*#__PURE__*/ +function () { + /** + * Creates an event listener registry + * + * @private + */ + function EventTargetShim() { + // A registry of event types to listeners. + this._eventListenerRegistry = {}; + } + /** + * @param {string} type + * @param {Function} listener + * @private + */ + + + var _proto = EventTargetShim.prototype; + + _proto.addEventListener = function addEventListener(type, listener) { + this._getEventListenersByType(type).add(listener); + }; + /** + * @param {string} type + * @param {Function} listener + * @private + */ + + + _proto.removeEventListener = function removeEventListener(type, listener) { + this._getEventListenersByType(type).delete(listener); + }; + /** + * @param {Event} event + * @private + */ + + + _proto.dispatchEvent = function dispatchEvent(event) { + event.target = this; + + this._getEventListenersByType(event.type).forEach(function (listener) { + return listener(event); + }); + }; + /** + * Returns a Set of listeners associated with the passed event type. + * If no handlers have been registered, an empty Set is returned. + * + * @param {string} type The event type. + * @return {Set} An array of handler functions. + * @private + */ + + + _proto._getEventListenersByType = function _getEventListenersByType(type) { + return this._eventListenerRegistry[type] = this._eventListenerRegistry[type] || new Set(); + }; + + return EventTargetShim; +}(); + +/* + Copyright 2019 Google LLC + + Use of this source code is governed by an MIT-style + license that can be found in the LICENSE file or at + https://opensource.org/licenses/MIT. +*/ +/** + * Returns true if two URLs have the same `.href` property. The URLS can be + * relative, and if they are the current location href is used to resolve URLs. + * + * @private + * @param {string} url1 + * @param {string} url2 + * @return {boolean} + */ + +var urlsMatch = function urlsMatch(url1, url2) { + return new URL(url1, location).href === new URL(url2, location).href; +}; + +/* + Copyright 2019 Google LLC + + Use of this source code is governed by an MIT-style + license that can be found in the LICENSE file or at + https://opensource.org/licenses/MIT. +*/ +/** + * A minimal `Event` subclass shim. + * This doesn't *actually* subclass `Event` because not all browsers support + * constructable `EventTarget`, and using a real `Event` will error. + * @private + */ + +var WorkboxEvent = +/** + * @param {string} type + * @param {Object} props + */ +function WorkboxEvent(type, props) { + Object.assign(this, props, { + type: type + }); +}; + +function _catch(body, recover) { + try { + var result = body(); + } catch (e) { + return recover(e); + } + + if (result && result.then) { + return result.then(void 0, recover); + } + + return result; +} + +function _async(f) { + return function () { + for (var args = [], i = 0; i < arguments.length; i++) { + args[i] = arguments[i]; + } + + try { + return Promise.resolve(f.apply(this, args)); + } catch (e) { + return Promise.reject(e); + } + }; +} + +function _invoke(body, then) { + var result = body(); + + if (result && result.then) { + return result.then(then); + } + + return then(result); +} + +function _await(value, then, direct) { + if (direct) { + return then ? then(value) : value; + } + + if (!value || !value.then) { + value = Promise.resolve(value); + } + + return then ? value.then(then) : value; +} + +function _awaitIgnored(value, direct) { + if (!direct) { + return value && value.then ? value.then(_empty) : Promise.resolve(); + } +} + +function _empty() {} +// `skipWaiting()` wasn't called. This 200 amount wasn't scientifically +// chosen, but it seems to avoid false positives in my testing. + +var WAITING_TIMEOUT_DURATION = 200; // The amount of time after a registration that we can reasonably conclude +// that the registration didn't trigger an update. + +var REGISTRATION_TIMEOUT_DURATION = 60000; +/** + * A class to aid in handling service worker registration, updates, and + * reacting to service worker lifecycle events. + * + * @fires [message]{@link module:workbox-window.Workbox#message} + * @fires [installed]{@link module:workbox-window.Workbox#installed} + * @fires [waiting]{@link module:workbox-window.Workbox#waiting} + * @fires [controlling]{@link module:workbox-window.Workbox#controlling} + * @fires [activated]{@link module:workbox-window.Workbox#activated} + * @fires [redundant]{@link module:workbox-window.Workbox#redundant} + * @fires [externalinstalled]{@link module:workbox-window.Workbox#externalinstalled} + * @fires [externalwaiting]{@link module:workbox-window.Workbox#externalwaiting} + * @fires [externalactivated]{@link module:workbox-window.Workbox#externalactivated} + * + * @memberof module:workbox-window + */ + +var Workbox = +/*#__PURE__*/ +function (_EventTargetShim) { + _inheritsLoose(Workbox, _EventTargetShim); + + /** + * Creates a new Workbox instance with a script URL and service worker + * options. The script URL and options are the same as those used when + * calling `navigator.serviceWorker.register(scriptURL, options)`. See: + * https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerContainer/register + * + * @param {string} scriptURL The service worker script associated with this + * instance. + * @param {Object} [registerOptions] The service worker options associated + * with this instance. + */ + function Workbox(scriptURL, registerOptions) { + var _this; + + if (registerOptions === void 0) { + registerOptions = {}; + } + + _this = _EventTargetShim.call(this) || this; + _this._scriptURL = scriptURL; + _this._registerOptions = registerOptions; + _this._updateFoundCount = 0; // Deferreds we can resolve later. + + _this._swDeferred = new Deferred(); + _this._activeDeferred = new Deferred(); + _this._controllingDeferred = new Deferred(); // Bind event handler callbacks. + + _this._onMessage = _this._onMessage.bind(_assertThisInitialized(_assertThisInitialized(_this))); + _this._onStateChange = _this._onStateChange.bind(_assertThisInitialized(_assertThisInitialized(_this))); + _this._onUpdateFound = _this._onUpdateFound.bind(_assertThisInitialized(_assertThisInitialized(_this))); + _this._onControllerChange = _this._onControllerChange.bind(_assertThisInitialized(_assertThisInitialized(_this))); + return _this; + } + /** + * Registers a service worker for this instances script URL and service + * worker options. By default this method delays registration until after + * the window has loaded. + * + * @param {Object} [options] + * @param {Function} [options.immediate=false] Setting this to true will + * register the service worker immediately, even if the window has + * not loaded (not recommended). + */ + + + var _proto = Workbox.prototype; + _proto.register = _async(function (_temp) { + var _this2 = this; + + var _ref = _temp === void 0 ? {} : _temp, + _ref$immediate = _ref.immediate, + immediate = _ref$immediate === void 0 ? false : _ref$immediate; + + { + if (_this2._registrationTime) { + logger.error('Cannot re-register a Workbox instance after it has ' + 'been registered. Create a new instance instead.'); + return; + } + } + + return _invoke(function () { + if (!immediate && document.readyState !== 'complete') { + return _awaitIgnored(new Promise(function (res) { + return addEventListener('load', res); + })); + } + }, function () { + // Set this flag to true if any service worker was controlling the page + // at registration time. + _this2._isUpdate = Boolean(navigator.serviceWorker.controller); // Before registering, attempt to determine if a SW is already controlling + // the page, and if that SW script (and version, if specified) matches this + // instance's script. + + _this2._compatibleControllingSW = _this2._getControllingSWIfCompatible(); + return _await(_this2._registerScript(), function (_this2$_registerScrip) { + _this2._registration = _this2$_registerScrip; + + // If we have a compatible controller, store the controller as the "own" + // SW, resolve active/controlling deferreds and add necessary listeners. + if (_this2._compatibleControllingSW) { + _this2._sw = _this2._compatibleControllingSW; + + _this2._activeDeferred.resolve(_this2._compatibleControllingSW); + + _this2._controllingDeferred.resolve(_this2._compatibleControllingSW); + + _this2._reportWindowReady(_this2._compatibleControllingSW); + + _this2._compatibleControllingSW.addEventListener('statechange', _this2._onStateChange, { + once: true + }); + } // If there's a waiting service worker with a matching URL before the + // `updatefound` event fires, it likely means that this site is open + // in another tab, or the user refreshed the page (and thus the prevoius + // page wasn't fully unloaded before this page started loading). + // https://developers.google.com/web/fundamentals/primers/service-workers/lifecycle#waiting + + + var waitingSW = _this2._registration.waiting; + + if (waitingSW && urlsMatch(waitingSW.scriptURL, _this2._scriptURL)) { + // Store the waiting SW as the "own" Sw, even if it means overwriting + // a compatible controller. + _this2._sw = waitingSW; // Run this in the next microtask, so any code that adds an event + // listener after awaiting `register()` will get this event. + + Promise.resolve().then(function () { + _this2.dispatchEvent(new WorkboxEvent('waiting', { + sw: waitingSW, + wasWaitingBeforeRegister: true + })); + + { + logger.warn('A service worker was already waiting to activate ' + 'before this script was registered...'); + } + }); + } // If an "own" SW is already set, resolve the deferred. + + + if (_this2._sw) { + _this2._swDeferred.resolve(_this2._sw); + } + + { + logger.log('Successfully registered service worker.', _this2._scriptURL); + + if (navigator.serviceWorker.controller) { + if (_this2._compatibleControllingSW) { + logger.debug('A service worker with the same script URL ' + 'is already controlling this page.'); + } else { + logger.debug('A service worker with a different script URL is ' + 'currently controlling the page. The browser is now fetching ' + 'the new script now...'); + } + } + + var currentPageIsOutOfScope = function currentPageIsOutOfScope() { + var scopeURL = new URL(_this2._registerOptions.scope || _this2._scriptURL, document.baseURI); + var scopeURLBasePath = new URL('./', scopeURL.href).pathname; + return !location.pathname.startsWith(scopeURLBasePath); + }; + + if (currentPageIsOutOfScope()) { + logger.warn('The current page is not in scope for the registered ' + 'service worker. Was this a mistake?'); + } + } + + _this2._registration.addEventListener('updatefound', _this2._onUpdateFound); + + navigator.serviceWorker.addEventListener('controllerchange', _this2._onControllerChange, { + once: true + }); // Add message listeners. + + if ('BroadcastChannel' in self) { + _this2._broadcastChannel = new BroadcastChannel('workbox'); + + _this2._broadcastChannel.addEventListener('message', _this2._onMessage); + } + + navigator.serviceWorker.addEventListener('message', _this2._onMessage); + return _this2._registration; + }); + }); + }); + /** + * Resolves to the service worker registered by this instance as soon as it + * is active. If a service worker was already controlling at registration + * time then it will resolve to that if the script URLs (and optionally + * script versions) match, otherwise it will wait until an update is found + * and activates. + * + * @return {Promise} + */ + + /** + * Resolves with a reference to a service worker that matches the script URL + * of this instance, as soon as it's available. + * + * If, at registration time, there's already an active or waiting service + * worker with a matching script URL, it will be used (with the waiting + * service worker taking precedence over the active service worker if both + * match, since the waiting service worker would have been registered more + * recently). + * If there's no matching active or waiting service worker at registration + * time then the promise will not resolve until an update is found and starts + * installing, at which point the installing service worker is used. + * + * @return {Promise} + */ + _proto.getSW = _async(function () { + var _this3 = this; + + // If `this._sw` is set, resolve with that as we want `getSW()` to + // return the correct (new) service worker if an update is found. + return _this3._sw || _this3._swDeferred.promise; + }); + /** + * Sends the passed data object to the service worker registered by this + * instance (via [`getSW()`]{@link module:workbox-window.Workbox#getSW}) and resolves + * with a response (if any). + * + * A response can be set in a message handler in the service worker by + * calling `event.ports[0].postMessage(...)`, which will resolve the promise + * returned by `messageSW()`. If no response is set, the promise will never + * resolve. + * + * @param {Object} data An object to send to the service worker + * @return {Promise} + */ + + _proto.messageSW = _async(function (data) { + var _this4 = this; + + return _await(_this4.getSW(), function (sw) { + return messageSW(sw, data); + }); + }); + /** + * Checks for a service worker already controlling the page and returns + * it if its script URL matchs. + * + * @private + * @return {ServiceWorker|undefined} + */ + + _proto._getControllingSWIfCompatible = function _getControllingSWIfCompatible() { + var controller = navigator.serviceWorker.controller; + + if (controller && urlsMatch(controller.scriptURL, this._scriptURL)) { + return controller; + } + }; + /** + * Registers a service worker for this instances script URL and register + * options and tracks the time registration was complete. + * + * @private + */ + + + _proto._registerScript = _async(function () { + var _this5 = this; + + return _catch(function () { + return _await(navigator.serviceWorker.register(_this5._scriptURL, _this5._registerOptions), function (reg) { + // Keep track of when registration happened, so it can be used in the + // `this._onUpdateFound` heuristic. Also use the presence of this + // property as a way to see if `.register()` has been called. + _this5._registrationTime = performance.now(); + return reg; + }); + }, function (error) { + { + logger.error(error); + } // Re-throw the error. + + + throw error; + }); + }); + /** + * Sends a message to the passed service worker that the window is ready. + * + * @param {ServiceWorker} sw + * @private + */ + + _proto._reportWindowReady = function _reportWindowReady(sw) { + messageSW(sw, { + type: 'WINDOW_READY', + meta: 'workbox-window' + }); + }; + /** + * @private + */ + + + _proto._onUpdateFound = function _onUpdateFound() { + var installingSW = this._registration.installing; // If the script URL passed to `navigator.serviceWorker.register()` is + // different from the current controlling SW's script URL, we know any + // successful registration calls will trigger an `updatefound` event. + // But if the registered script URL is the same as the current controlling + // SW's script URL, we'll only get an `updatefound` event if the file + // changed since it was last registered. This can be a problem if the user + // opens up the same page in a different tab, and that page registers + // a SW that triggers an update. It's a problem because this page has no + // good way of knowing whether the `updatefound` event came from the SW + // script it registered or from a registration attempt made by a newer + // version of the page running in another tab. + // To minimize the possibility of a false positive, we use the logic here: + + var updateLikelyTriggeredExternally = // Since we enforce only calling `register()` once, and since we don't + // add the `updatefound` event listener until the `register()` call, if + // `_updateFoundCount` is > 0 then it means this method has already + // been called, thus this SW must be external + this._updateFoundCount > 0 || // If the script URL of the installing SW is different from this + // instance's script URL, we know it's definitely not from our + // registration. + !urlsMatch(installingSW.scriptURL, this._scriptURL) || // If all of the above are false, then we use a time-based heuristic: + // Any `updatefound` event that occurs long after our registration is + // assumed to be external. + performance.now() > this._registrationTime + REGISTRATION_TIMEOUT_DURATION ? // If any of the above are not true, we assume the update was + // triggered by this instance. + true : false; + + if (updateLikelyTriggeredExternally) { + this._externalSW = installingSW; + + this._registration.removeEventListener('updatefound', this._onUpdateFound); + } else { + // If the update was not triggered externally we know the installing + // SW is the one we registered, so we set it. + this._sw = installingSW; + + this._swDeferred.resolve(installingSW); // The `installing` state isn't something we have a dedicated + // callback for, but we do log messages for it in development. + + + { + if (navigator.serviceWorker.controller) { + logger.log('Updated service worker found. Installing now...'); + } else { + logger.log('Service worker is installing...'); + } + } + } // Increment the `updatefound` count, so future invocations of this + // method can be sure they were triggered externally. + + + ++this._updateFoundCount; // Add a `statechange` listener regardless of whether this update was + // triggered externally, since we have callbacks for both. + + installingSW.addEventListener('statechange', this._onStateChange); + }; + /** + * @private + * @param {Event} originalEvent + */ + + + _proto._onStateChange = function _onStateChange(originalEvent) { + var _this6 = this; + + var sw = originalEvent.target; + var state = sw.state; + var isExternal = sw === this._externalSW; + var eventPrefix = isExternal ? 'external' : ''; + var eventProps = { + sw: sw, + originalEvent: originalEvent + }; + + if (!isExternal && this._isUpdate) { + eventProps.isUpdate = true; + } + + this.dispatchEvent(new WorkboxEvent(eventPrefix + state, eventProps)); + + if (state === 'installed') { + // This timeout is used to ignore cases where the service worker calls + // `skipWaiting()` in the install event, thus moving it directly in the + // activating state. (Since all service workers *must* go through the + // waiting phase, the only way to detect `skipWaiting()` called in the + // install event is to observe that the time spent in the waiting phase + // is very short.) + // NOTE: we don't need separate timeouts for the own and external SWs + // since they can't go through these phases at the same time. + this._waitingTimeout = setTimeout(function () { + // Ensure the SW is still waiting (it may now be redundant). + if (state === 'installed' && _this6._registration.waiting === sw) { + _this6.dispatchEvent(new WorkboxEvent(eventPrefix + 'waiting', eventProps)); + + { + if (isExternal) { + logger.warn('An external service worker has installed but is ' + 'waiting for this client to close before activating...'); + } else { + logger.warn('The service worker has installed but is waiting ' + 'for existing clients to close before activating...'); + } + } + } + }, WAITING_TIMEOUT_DURATION); + } else if (state === 'activating') { + clearTimeout(this._waitingTimeout); + + if (!isExternal) { + this._activeDeferred.resolve(sw); + } + } + + { + switch (state) { + case 'installed': + if (isExternal) { + logger.warn('An external service worker has installed. ' + 'You may want to suggest users reload this page.'); + } else { + logger.log('Registered service worker installed.'); + } + + break; + + case 'activated': + if (isExternal) { + logger.warn('An external service worker has activated.'); + } else { + logger.log('Registered service worker activated.'); + + if (sw !== navigator.serviceWorker.controller) { + logger.warn('The registered service worker is active but ' + 'not yet controlling the page. Reload or run ' + '`clients.claim()` in the service worker.'); + } + } + + break; + + case 'redundant': + if (sw === this._compatibleControllingSW) { + logger.log('Previously controlling service worker now redundant!'); + } else if (!isExternal) { + logger.log('Registered service worker now redundant!'); + } + + break; + } + } + }; + /** + * @private + * @param {Event} originalEvent + */ + + + _proto._onControllerChange = function _onControllerChange(originalEvent) { + var sw = this._sw; + + if (sw === navigator.serviceWorker.controller) { + this.dispatchEvent(new WorkboxEvent('controlling', { + sw: sw, + originalEvent: originalEvent + })); + + { + logger.log('Registered service worker now controlling this page.'); + } + + this._controllingDeferred.resolve(sw); + } + }; + /** + * @private + * @param {Event} originalEvent + */ + + + _proto._onMessage = function _onMessage(originalEvent) { + var data = originalEvent.data; + this.dispatchEvent(new WorkboxEvent('message', { + data: data, + originalEvent: originalEvent + })); + }; + + _createClass(Workbox, [{ + key: "active", + get: function get() { + return this._activeDeferred.promise; + } + /** + * Resolves to the service worker registered by this instance as soon as it + * is controlling the page. If a service worker was already controlling at + * registration time then it will resolve to that if the script URLs (and + * optionally script versions) match, otherwise it will wait until an update + * is found and starts controlling the page. + * Note: the first time a service worker is installed it will active but + * not start controlling the page unless `clients.claim()` is called in the + * service worker. + * + * @return {Promise} + */ + + }, { + key: "controlling", + get: function get() { + return this._controllingDeferred.promise; + } + }]); + + return Workbox; +}(EventTargetShim); // The jsdoc comments below outline the events this instance may dispatch: + +/* + Copyright 2019 Google LLC + + Use of this source code is governed by an MIT-style + license that can be found in the LICENSE file or at + https://opensource.org/licenses/MIT. +*/ + +export { Workbox, messageSW }; +//# sourceMappingURL=workbox-window.dev.es5.mjs.map diff --git a/workbox-v4.3.1/workbox-window.dev.es5.mjs.map b/workbox-v4.3.1/workbox-window.dev.es5.mjs.map new file mode 100644 index 0000000000..f8eeed6105 --- /dev/null +++ b/workbox-v4.3.1/workbox-window.dev.es5.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"workbox-window.dev.es5.mjs","sources":["../_version.mjs","../messageSW.mjs","../../workbox-core/_version.mjs","../../workbox-core/_private/Deferred.mjs","../../workbox-core/_private/logger.mjs","../utils/EventTargetShim.mjs","../utils/urlsMatch.mjs","../utils/WorkboxEvent.mjs","../Workbox.mjs","../index.mjs"],"sourcesContent":["try{self['workbox:window:4.3.1']&&_()}catch(e){}// eslint-disable-line","/*\n Copyright 2019 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport './_version.mjs';\n\n\n/**\n * Sends a data object to a service worker via `postMessage` and resolves with\n * a response (if any).\n *\n * A response can be set in a message handler in the service worker by\n * calling `event.ports[0].postMessage(...)`, which will resolve the promise\n * returned by `messageSW()`. If no response is set, the promise will not\n * resolve.\n *\n * @param {ServiceWorker} sw The service worker to send the message to.\n * @param {Object} data An object to send to the service worker.\n * @return {Promise}\n *\n * @memberof module:workbox-window\n */\nconst messageSW = (sw, data) => {\n return new Promise((resolve) => {\n let messageChannel = new MessageChannel();\n messageChannel.port1.onmessage = (evt) => resolve(evt.data);\n sw.postMessage(data, [messageChannel.port2]);\n });\n};\n\nexport {messageSW};\n","try{self['workbox:core:4.3.1']&&_()}catch(e){}// eslint-disable-line","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport '../_version.mjs';\n\n\n/**\n * The Deferred class composes Promises in a way that allows for them to be\n * resolved or rejected from outside the constructor. In most cases promises\n * should be used directly, but Deferreds can be necessary when the logic to\n * resolve a promise must be separate.\n *\n * @private\n */\nexport class Deferred {\n /**\n * Creates a promise and exposes its resolve and reject functions as methods.\n */\n constructor() {\n this.promise = new Promise((resolve, reject) => {\n this.resolve = resolve;\n this.reject = reject;\n });\n }\n}\n","/*\n Copyright 2019 Google LLC\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport '../_version.mjs';\n\n\nconst logger = process.env.NODE_ENV === 'production' ? null : (() => {\n let inGroup = false;\n\n const methodToColorMap = {\n debug: `#7f8c8d`, // Gray\n log: `#2ecc71`, // Green\n warn: `#f39c12`, // Yellow\n error: `#c0392b`, // Red\n groupCollapsed: `#3498db`, // Blue\n groupEnd: null, // No colored prefix on groupEnd\n };\n\n const print = function(method, args) {\n if (method === 'groupCollapsed') {\n // Safari doesn't print all console.groupCollapsed() arguments:\n // https://bugs.webkit.org/show_bug.cgi?id=182754\n if (/^((?!chrome|android).)*safari/i.test(navigator.userAgent)) {\n console[method](...args);\n return;\n }\n }\n\n const styles = [\n `background: ${methodToColorMap[method]}`,\n `border-radius: 0.5em`,\n `color: white`,\n `font-weight: bold`,\n `padding: 2px 0.5em`,\n ];\n\n // When in a group, the workbox prefix is not displayed.\n const logPrefix = inGroup ? [] : ['%cworkbox', styles.join(';')];\n\n console[method](...logPrefix, ...args);\n\n if (method === 'groupCollapsed') {\n inGroup = true;\n }\n if (method === 'groupEnd') {\n inGroup = false;\n }\n };\n\n const api = {};\n for (const method of Object.keys(methodToColorMap)) {\n api[method] = (...args) => {\n print(method, args);\n };\n }\n\n return api;\n})();\n\nexport {logger};\n","/*\n Copyright 2019 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport '../_version.mjs';\n\n\n/**\n * A minimal `EventTarget` shim.\n * This is necessary because not all browsers support constructable\n * `EventTarget`, so using a real `EventTarget` will error.\n * @private\n */\nclass EventTargetShim {\n /**\n * Creates an event listener registry\n *\n * @private\n */\n constructor() {\n // A registry of event types to listeners.\n this._eventListenerRegistry = {};\n }\n /**\n * @param {string} type\n * @param {Function} listener\n * @private\n */\n addEventListener(type, listener) {\n this._getEventListenersByType(type).add(listener);\n }\n\n /**\n * @param {string} type\n * @param {Function} listener\n * @private\n */\n removeEventListener(type, listener) {\n this._getEventListenersByType(type).delete(listener);\n }\n\n /**\n * @param {Event} event\n * @private\n */\n dispatchEvent(event) {\n event.target = this;\n this._getEventListenersByType(event.type).forEach(\n (listener) => listener(event));\n }\n\n /**\n * Returns a Set of listeners associated with the passed event type.\n * If no handlers have been registered, an empty Set is returned.\n *\n * @param {string} type The event type.\n * @return {Set} An array of handler functions.\n * @private\n */\n _getEventListenersByType(type) {\n return this._eventListenerRegistry[type] =\n (this._eventListenerRegistry[type] || new Set());\n }\n}\n\nexport {EventTargetShim};\n","/*\n Copyright 2019 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport '../_version.mjs';\n\n\n/**\n * Returns true if two URLs have the same `.href` property. The URLS can be\n * relative, and if they are the current location href is used to resolve URLs.\n *\n * @private\n * @param {string} url1\n * @param {string} url2\n * @return {boolean}\n */\nconst urlsMatch = (url1, url2) => {\n return new URL(url1, location).href === new URL(url2, location).href;\n};\n\nexport {urlsMatch};\n","/*\n Copyright 2019 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport '../_version.mjs';\n\n/**\n * A minimal `Event` subclass shim.\n * This doesn't *actually* subclass `Event` because not all browsers support\n * constructable `EventTarget`, and using a real `Event` will error.\n * @private\n */\nclass WorkboxEvent {\n /**\n * @param {string} type\n * @param {Object} props\n */\n constructor(type, props) {\n Object.assign(this, props, {type});\n }\n}\n\nexport {WorkboxEvent};\n","/*\n Copyright 2019 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport {Deferred} from 'workbox-core/_private/Deferred.mjs';\nimport {logger} from 'workbox-core/_private/logger.mjs';\nimport {messageSW} from './messageSW.mjs';\nimport {EventTargetShim} from './utils/EventTargetShim.mjs';\nimport {urlsMatch} from './utils/urlsMatch.mjs';\nimport {WorkboxEvent} from './utils/WorkboxEvent.mjs';\nimport './_version.mjs';\n\n\n// The time a SW must be in the waiting phase before we can conclude\n// `skipWaiting()` wasn't called. This 200 amount wasn't scientifically\n// chosen, but it seems to avoid false positives in my testing.\nconst WAITING_TIMEOUT_DURATION = 200;\n\n// The amount of time after a registration that we can reasonably conclude\n// that the registration didn't trigger an update.\nconst REGISTRATION_TIMEOUT_DURATION = 60000;\n\n/**\n * A class to aid in handling service worker registration, updates, and\n * reacting to service worker lifecycle events.\n *\n * @fires [message]{@link module:workbox-window.Workbox#message}\n * @fires [installed]{@link module:workbox-window.Workbox#installed}\n * @fires [waiting]{@link module:workbox-window.Workbox#waiting}\n * @fires [controlling]{@link module:workbox-window.Workbox#controlling}\n * @fires [activated]{@link module:workbox-window.Workbox#activated}\n * @fires [redundant]{@link module:workbox-window.Workbox#redundant}\n * @fires [externalinstalled]{@link module:workbox-window.Workbox#externalinstalled}\n * @fires [externalwaiting]{@link module:workbox-window.Workbox#externalwaiting}\n * @fires [externalactivated]{@link module:workbox-window.Workbox#externalactivated}\n *\n * @memberof module:workbox-window\n */\nclass Workbox extends EventTargetShim {\n /**\n * Creates a new Workbox instance with a script URL and service worker\n * options. The script URL and options are the same as those used when\n * calling `navigator.serviceWorker.register(scriptURL, options)`. See:\n * https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerContainer/register\n *\n * @param {string} scriptURL The service worker script associated with this\n * instance.\n * @param {Object} [registerOptions] The service worker options associated\n * with this instance.\n */\n constructor(scriptURL, registerOptions = {}) {\n super();\n\n this._scriptURL = scriptURL;\n this._registerOptions = registerOptions;\n this._updateFoundCount = 0;\n\n // Deferreds we can resolve later.\n this._swDeferred = new Deferred();\n this._activeDeferred = new Deferred();\n this._controllingDeferred = new Deferred();\n\n // Bind event handler callbacks.\n this._onMessage = this._onMessage.bind(this);\n this._onStateChange = this._onStateChange.bind(this);\n this._onUpdateFound = this._onUpdateFound.bind(this);\n this._onControllerChange = this._onControllerChange.bind(this);\n }\n\n /**\n * Registers a service worker for this instances script URL and service\n * worker options. By default this method delays registration until after\n * the window has loaded.\n *\n * @param {Object} [options]\n * @param {Function} [options.immediate=false] Setting this to true will\n * register the service worker immediately, even if the window has\n * not loaded (not recommended).\n */\n async register({immediate = false} = {}) {\n if (process.env.NODE_ENV !== 'production') {\n if (this._registrationTime) {\n logger.error('Cannot re-register a Workbox instance after it has ' +\n 'been registered. Create a new instance instead.');\n return;\n }\n }\n\n if (!immediate && document.readyState !== 'complete') {\n await new Promise((res) => addEventListener('load', res));\n }\n\n // Set this flag to true if any service worker was controlling the page\n // at registration time.\n this._isUpdate = Boolean(navigator.serviceWorker.controller);\n\n // Before registering, attempt to determine if a SW is already controlling\n // the page, and if that SW script (and version, if specified) matches this\n // instance's script.\n this._compatibleControllingSW = this._getControllingSWIfCompatible();\n\n this._registration = await this._registerScript();\n\n // If we have a compatible controller, store the controller as the \"own\"\n // SW, resolve active/controlling deferreds and add necessary listeners.\n if (this._compatibleControllingSW) {\n this._sw = this._compatibleControllingSW;\n this._activeDeferred.resolve(this._compatibleControllingSW);\n this._controllingDeferred.resolve(this._compatibleControllingSW);\n\n this._reportWindowReady(this._compatibleControllingSW);\n this._compatibleControllingSW.addEventListener(\n 'statechange', this._onStateChange, {once: true});\n }\n\n // If there's a waiting service worker with a matching URL before the\n // `updatefound` event fires, it likely means that this site is open\n // in another tab, or the user refreshed the page (and thus the prevoius\n // page wasn't fully unloaded before this page started loading).\n // https://developers.google.com/web/fundamentals/primers/service-workers/lifecycle#waiting\n const waitingSW = this._registration.waiting;\n if (waitingSW && urlsMatch(waitingSW.scriptURL, this._scriptURL)) {\n // Store the waiting SW as the \"own\" Sw, even if it means overwriting\n // a compatible controller.\n this._sw = waitingSW;\n\n // Run this in the next microtask, so any code that adds an event\n // listener after awaiting `register()` will get this event.\n Promise.resolve().then(() => {\n this.dispatchEvent(new WorkboxEvent('waiting', {\n sw: waitingSW,\n wasWaitingBeforeRegister: true,\n }));\n if (process.env.NODE_ENV !== 'production') {\n logger.warn('A service worker was already waiting to activate ' +\n 'before this script was registered...');\n }\n });\n }\n\n // If an \"own\" SW is already set, resolve the deferred.\n if (this._sw) {\n this._swDeferred.resolve(this._sw);\n }\n\n if (process.env.NODE_ENV !== 'production') {\n logger.log('Successfully registered service worker.', this._scriptURL);\n\n if (navigator.serviceWorker.controller) {\n if (this._compatibleControllingSW) {\n logger.debug('A service worker with the same script URL ' +\n 'is already controlling this page.');\n } else {\n logger.debug('A service worker with a different script URL is ' +\n 'currently controlling the page. The browser is now fetching ' +\n 'the new script now...');\n }\n }\n\n const currentPageIsOutOfScope = () => {\n const scopeURL = new URL(\n this._registerOptions.scope || this._scriptURL, document.baseURI);\n const scopeURLBasePath = new URL('./', scopeURL.href).pathname;\n return !location.pathname.startsWith(scopeURLBasePath);\n };\n if (currentPageIsOutOfScope()) {\n logger.warn('The current page is not in scope for the registered ' +\n 'service worker. Was this a mistake?');\n }\n }\n\n this._registration.addEventListener('updatefound', this._onUpdateFound);\n navigator.serviceWorker.addEventListener(\n 'controllerchange', this._onControllerChange, {once: true});\n\n // Add message listeners.\n if ('BroadcastChannel' in self) {\n this._broadcastChannel = new BroadcastChannel('workbox');\n this._broadcastChannel.addEventListener('message', this._onMessage);\n }\n navigator.serviceWorker.addEventListener('message', this._onMessage);\n\n return this._registration;\n }\n\n /**\n * Resolves to the service worker registered by this instance as soon as it\n * is active. If a service worker was already controlling at registration\n * time then it will resolve to that if the script URLs (and optionally\n * script versions) match, otherwise it will wait until an update is found\n * and activates.\n *\n * @return {Promise}\n */\n get active() {\n return this._activeDeferred.promise;\n }\n\n /**\n * Resolves to the service worker registered by this instance as soon as it\n * is controlling the page. If a service worker was already controlling at\n * registration time then it will resolve to that if the script URLs (and\n * optionally script versions) match, otherwise it will wait until an update\n * is found and starts controlling the page.\n * Note: the first time a service worker is installed it will active but\n * not start controlling the page unless `clients.claim()` is called in the\n * service worker.\n *\n * @return {Promise}\n */\n get controlling() {\n return this._controllingDeferred.promise;\n }\n\n /**\n * Resolves with a reference to a service worker that matches the script URL\n * of this instance, as soon as it's available.\n *\n * If, at registration time, there's already an active or waiting service\n * worker with a matching script URL, it will be used (with the waiting\n * service worker taking precedence over the active service worker if both\n * match, since the waiting service worker would have been registered more\n * recently).\n * If there's no matching active or waiting service worker at registration\n * time then the promise will not resolve until an update is found and starts\n * installing, at which point the installing service worker is used.\n *\n * @return {Promise}\n */\n async getSW() {\n // If `this._sw` is set, resolve with that as we want `getSW()` to\n // return the correct (new) service worker if an update is found.\n return this._sw || this._swDeferred.promise;\n }\n\n /**\n * Sends the passed data object to the service worker registered by this\n * instance (via [`getSW()`]{@link module:workbox-window.Workbox#getSW}) and resolves\n * with a response (if any).\n *\n * A response can be set in a message handler in the service worker by\n * calling `event.ports[0].postMessage(...)`, which will resolve the promise\n * returned by `messageSW()`. If no response is set, the promise will never\n * resolve.\n *\n * @param {Object} data An object to send to the service worker\n * @return {Promise}\n */\n async messageSW(data) {\n const sw = await this.getSW();\n return messageSW(sw, data);\n }\n\n /**\n * Checks for a service worker already controlling the page and returns\n * it if its script URL matchs.\n *\n * @private\n * @return {ServiceWorker|undefined}\n */\n _getControllingSWIfCompatible() {\n const controller = navigator.serviceWorker.controller;\n if (controller && urlsMatch(controller.scriptURL, this._scriptURL)) {\n return controller;\n }\n }\n\n /**\n * Registers a service worker for this instances script URL and register\n * options and tracks the time registration was complete.\n *\n * @private\n */\n async _registerScript() {\n try {\n const reg = await navigator.serviceWorker.register(\n this._scriptURL, this._registerOptions);\n\n // Keep track of when registration happened, so it can be used in the\n // `this._onUpdateFound` heuristic. Also use the presence of this\n // property as a way to see if `.register()` has been called.\n this._registrationTime = performance.now();\n\n return reg;\n } catch (error) {\n if (process.env.NODE_ENV !== 'production') {\n logger.error(error);\n }\n // Re-throw the error.\n throw error;\n }\n }\n\n\n /**\n * Sends a message to the passed service worker that the window is ready.\n *\n * @param {ServiceWorker} sw\n * @private\n */\n _reportWindowReady(sw) {\n messageSW(sw, {\n type: 'WINDOW_READY',\n meta: 'workbox-window',\n });\n }\n\n /**\n * @private\n */\n _onUpdateFound() {\n const installingSW = this._registration.installing;\n\n // If the script URL passed to `navigator.serviceWorker.register()` is\n // different from the current controlling SW's script URL, we know any\n // successful registration calls will trigger an `updatefound` event.\n // But if the registered script URL is the same as the current controlling\n // SW's script URL, we'll only get an `updatefound` event if the file\n // changed since it was last registered. This can be a problem if the user\n // opens up the same page in a different tab, and that page registers\n // a SW that triggers an update. It's a problem because this page has no\n // good way of knowing whether the `updatefound` event came from the SW\n // script it registered or from a registration attempt made by a newer\n // version of the page running in another tab.\n // To minimize the possibility of a false positive, we use the logic here:\n let updateLikelyTriggeredExternally =\n // Since we enforce only calling `register()` once, and since we don't\n // add the `updatefound` event listener until the `register()` call, if\n // `_updateFoundCount` is > 0 then it means this method has already\n // been called, thus this SW must be external\n this._updateFoundCount > 0 ||\n // If the script URL of the installing SW is different from this\n // instance's script URL, we know it's definitely not from our\n // registration.\n !urlsMatch(installingSW.scriptURL, this._scriptURL) ||\n // If all of the above are false, then we use a time-based heuristic:\n // Any `updatefound` event that occurs long after our registration is\n // assumed to be external.\n (performance.now() >\n this._registrationTime + REGISTRATION_TIMEOUT_DURATION) ?\n // If any of the above are not true, we assume the update was\n // triggered by this instance.\n true : false;\n\n if (updateLikelyTriggeredExternally) {\n this._externalSW = installingSW;\n this._registration.removeEventListener(\n 'updatefound', this._onUpdateFound);\n } else {\n // If the update was not triggered externally we know the installing\n // SW is the one we registered, so we set it.\n this._sw = installingSW;\n this._swDeferred.resolve(installingSW);\n\n // The `installing` state isn't something we have a dedicated\n // callback for, but we do log messages for it in development.\n if (process.env.NODE_ENV !== 'production') {\n if (navigator.serviceWorker.controller) {\n logger.log('Updated service worker found. Installing now...');\n } else {\n logger.log('Service worker is installing...');\n }\n }\n }\n\n // Increment the `updatefound` count, so future invocations of this\n // method can be sure they were triggered externally.\n ++this._updateFoundCount;\n\n // Add a `statechange` listener regardless of whether this update was\n // triggered externally, since we have callbacks for both.\n installingSW.addEventListener('statechange', this._onStateChange);\n }\n\n /**\n * @private\n * @param {Event} originalEvent\n */\n _onStateChange(originalEvent) {\n const sw = originalEvent.target;\n const {state} = sw;\n const isExternal = sw === this._externalSW;\n const eventPrefix = isExternal ? 'external' : '';\n\n const eventProps = {sw, originalEvent};\n if (!isExternal && this._isUpdate) {\n eventProps.isUpdate = true;\n }\n\n this.dispatchEvent(new WorkboxEvent(\n eventPrefix + state, eventProps));\n\n if (state === 'installed') {\n // This timeout is used to ignore cases where the service worker calls\n // `skipWaiting()` in the install event, thus moving it directly in the\n // activating state. (Since all service workers *must* go through the\n // waiting phase, the only way to detect `skipWaiting()` called in the\n // install event is to observe that the time spent in the waiting phase\n // is very short.)\n // NOTE: we don't need separate timeouts for the own and external SWs\n // since they can't go through these phases at the same time.\n this._waitingTimeout = setTimeout(() => {\n // Ensure the SW is still waiting (it may now be redundant).\n if (state === 'installed' && this._registration.waiting === sw) {\n this.dispatchEvent(new WorkboxEvent(\n eventPrefix + 'waiting', eventProps));\n\n if (process.env.NODE_ENV !== 'production') {\n if (isExternal) {\n logger.warn('An external service worker has installed but is ' +\n 'waiting for this client to close before activating...');\n } else {\n logger.warn('The service worker has installed but is waiting ' +\n 'for existing clients to close before activating...');\n }\n }\n }\n }, WAITING_TIMEOUT_DURATION);\n } else if (state === 'activating') {\n clearTimeout(this._waitingTimeout);\n if (!isExternal) {\n this._activeDeferred.resolve(sw);\n }\n }\n\n if (process.env.NODE_ENV !== 'production') {\n switch (state) {\n case 'installed':\n if (isExternal) {\n logger.warn('An external service worker has installed. ' +\n 'You may want to suggest users reload this page.');\n } else {\n logger.log('Registered service worker installed.');\n }\n break;\n case 'activated':\n if (isExternal) {\n logger.warn('An external service worker has activated.');\n } else {\n logger.log('Registered service worker activated.');\n if (sw !== navigator.serviceWorker.controller) {\n logger.warn('The registered service worker is active but ' +\n 'not yet controlling the page. Reload or run ' +\n '`clients.claim()` in the service worker.');\n }\n }\n break;\n case 'redundant':\n if (sw === this._compatibleControllingSW) {\n logger.log('Previously controlling service worker now redundant!');\n } else if (!isExternal) {\n logger.log('Registered service worker now redundant!');\n }\n break;\n }\n }\n }\n\n /**\n * @private\n * @param {Event} originalEvent\n */\n _onControllerChange(originalEvent) {\n const sw = this._sw;\n if (sw === navigator.serviceWorker.controller) {\n this.dispatchEvent(new WorkboxEvent('controlling', {sw, originalEvent}));\n if (process.env.NODE_ENV !== 'production') {\n logger.log('Registered service worker now controlling this page.');\n }\n this._controllingDeferred.resolve(sw);\n }\n }\n\n /**\n * @private\n * @param {Event} originalEvent\n */\n _onMessage(originalEvent) {\n const {data} = originalEvent;\n this.dispatchEvent(new WorkboxEvent('message', {data, originalEvent}));\n }\n}\n\n// The jsdoc comments below outline the events this instance may dispatch:\n// -----------------------------------------------------------------------\n\n/**\n * The `message` event is dispatched any time a `postMessage` (or a\n * `BroadcastChannel` message with the `workbox` channel name) is received.\n *\n * @event module:workbox-window.Workbox#message\n * @type {WorkboxEvent}\n * @property {*} data The `data` property from the original `message` event.\n * @property {Event} originalEvent The original [`message`]{@link https://developer.mozilla.org/en-US/docs/Web/API/MessageEvent}\n * event.\n * @property {string} type `message`.\n * @property {Workbox} target The `Workbox` instance.\n */\n\n/**\n * The `installed` event is dispatched if the state of a\n * [`Workbox`]{@link module:workbox-window.Workbox} instance's\n * [registered service worker]{@link https://developers.google.com/web/tools/workbox/modules/workbox-precaching#def-registered-sw}\n * changes to `installed`.\n *\n * Then can happen either the very first time a service worker is installed,\n * or after an update to the current service worker is found. In the case\n * of an update being found, the event's `isUpdate` property will be `true`.\n *\n * @event module:workbox-window.Workbox#installed\n * @type {WorkboxEvent}\n * @property {ServiceWorker} sw The service worker instance.\n * @property {Event} originalEvent The original [`statechange`]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorker/onstatechange}\n * event.\n * @property {boolean|undefined} isUpdate True if a service worker was already\n * controlling when this `Workbox` instance called `register()`.\n * @property {string} type `installed`.\n * @property {Workbox} target The `Workbox` instance.\n */\n\n/**\n * The `waiting` event is dispatched if the state of a\n * [`Workbox`]{@link module:workbox-window.Workbox} instance's\n * [registered service worker]{@link https://developers.google.com/web/tools/workbox/modules/workbox-precaching#def-registered-sw}\n * changes to `installed` and then doesn't immediately change to `activating`.\n * It may also be dispatched if a service worker with the same\n * [`scriptURL`]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorker/scriptURL}\n * was already waiting when the [`register()`]{@link module:workbox-window.Workbox#register}\n * method was called.\n *\n * @event module:workbox-window.Workbox#waiting\n * @type {WorkboxEvent}\n * @property {ServiceWorker} sw The service worker instance.\n * @property {Event} originalEvent The native `controllerchange` event\n * @property {boolean|undefined} isUpdate True if a service worker was already\n * controlling when this `Workbox` instance called `register()`.\n * @property {boolean|undefined} wasWaitingBeforeRegister True if a service worker with\n * a matching `scriptURL` was already waiting when this `Workbox`\n * instance called `register()`.\n * @property {string} type `waiting`.\n * @property {Workbox} target The `Workbox` instance.\n */\n\n/**\n * The `controlling` event is dispatched if a\n * [`controllerchange`]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerContainer/oncontrollerchange}\n * fires on the service worker [container]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerContainer}\n * and the [`scriptURL`]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorker/scriptURL}\n * of the new [controller]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerContainer/controller}\n * matches the `scriptURL` of the `Workbox` instance's\n * [registered service worker]{@link https://developers.google.com/web/tools/workbox/modules/workbox-precaching#def-registered-sw}.\n *\n * @event module:workbox-window.Workbox#controlling\n * @type {WorkboxEvent}\n * @property {ServiceWorker} sw The service worker instance.\n * @property {Event} originalEvent The original [`controllerchange`]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerContainer/oncontrollerchange}\n * event.\n * @property {boolean|undefined} isUpdate True if a service worker was already\n * controlling when this service worker was registered.\n * @property {string} type `controlling`.\n * @property {Workbox} target The `Workbox` instance.\n */\n\n/**\n * The `activated` event is dispatched if the state of a\n * [`Workbox`]{@link module:workbox-window.Workbox} instance's\n * [registered service worker]{@link https://developers.google.com/web/tools/workbox/modules/workbox-precaching#def-registered-sw}\n * changes to `activated`.\n *\n * @event module:workbox-window.Workbox#activated\n * @type {WorkboxEvent}\n * @property {ServiceWorker} sw The service worker instance.\n * @property {Event} originalEvent The original [`statechange`]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorker/onstatechange}\n * event.\n * @property {boolean|undefined} isUpdate True if a service worker was already\n * controlling when this `Workbox` instance called `register()`.\n * @property {string} type `activated`.\n * @property {Workbox} target The `Workbox` instance.\n */\n\n/**\n * The `redundant` event is dispatched if the state of a\n * [`Workbox`]{@link module:workbox-window.Workbox} instance's\n * [registered service worker]{@link https://developers.google.com/web/tools/workbox/modules/workbox-precaching#def-registered-sw}\n * changes to `redundant`.\n *\n * @event module:workbox-window.Workbox#redundant\n * @type {WorkboxEvent}\n * @property {ServiceWorker} sw The service worker instance.\n * @property {Event} originalEvent The original [`statechange`]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorker/onstatechange}\n * event.\n * @property {boolean|undefined} isUpdate True if a service worker was already\n * controlling when this `Workbox` instance called `register()`.\n * @property {string} type `redundant`.\n * @property {Workbox} target The `Workbox` instance.\n */\n\n/**\n * The `externalinstalled` event is dispatched if the state of an\n * [external service worker]{@link https://developers.google.com/web/tools/workbox/modules/workbox-precaching#def-external-sw}\n * changes to `installed`.\n *\n * @event module:workbox-window.Workbox#externalinstalled\n * @type {WorkboxEvent}\n * @property {ServiceWorker} sw The service worker instance.\n * @property {Event} originalEvent The original [`statechange`]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorker/onstatechange}\n * event.\n * @property {string} type `externalinstalled`.\n * @property {Workbox} target The `Workbox` instance.\n */\n\n/**\n * The `externalwaiting` event is dispatched if the state of an\n * [external service worker]{@link https://developers.google.com/web/tools/workbox/modules/workbox-precaching#def-external-sw}\n * changes to `waiting`.\n *\n * @event module:workbox-window.Workbox#externalwaiting\n * @type {WorkboxEvent}\n * @property {ServiceWorker} sw The service worker instance.\n * @property {Event|undefined} originalEvent The original [`statechange`]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorker/onstatechange}\n * event.\n * @property {string} type `externalwaiting`.\n * @property {Workbox} target The `Workbox` instance.\n */\n\n/**\n * The `externalactivated` event is dispatched if the state of an\n * [external service worker]{@link https://developers.google.com/web/tools/workbox/modules/workbox-precaching#def-external-sw}\n * changes to `activated`.\n *\n * @event module:workbox-window.Workbox#externalactivated\n * @type {WorkboxEvent}\n * @property {ServiceWorker} sw The service worker instance.\n * @property {Event} originalEvent The original [`statechange`]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorker/onstatechange}\n * event.\n * @property {string} type `externalactivated`.\n * @property {Workbox} target The `Workbox` instance.\n */\n\nexport {Workbox};\n","/*\n Copyright 2019 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport {messageSW} from './messageSW.mjs';\nimport {Workbox} from './Workbox.mjs';\nimport './_version.mjs';\n\n\n/**\n * @module workbox-window\n */\nexport {\n Workbox,\n messageSW,\n};\n"],"names":["self","_","e","messageSW","sw","data","Promise","resolve","messageChannel","MessageChannel","port1","onmessage","evt","postMessage","port2","Deferred","promise","reject","logger","process","inGroup","methodToColorMap","debug","log","warn","error","groupCollapsed","groupEnd","print","method","args","test","navigator","userAgent","console","styles","logPrefix","join","api","Object","keys","EventTargetShim","_eventListenerRegistry","addEventListener","type","listener","_getEventListenersByType","add","removeEventListener","delete","dispatchEvent","event","target","forEach","Set","urlsMatch","url1","url2","URL","location","href","WorkboxEvent","props","assign","body","recover","result","then","f","i","arguments","length","apply","value","direct","WAITING_TIMEOUT_DURATION","REGISTRATION_TIMEOUT_DURATION","Workbox","scriptURL","registerOptions","_scriptURL","_registerOptions","_updateFoundCount","_swDeferred","_activeDeferred","_controllingDeferred","_onMessage","bind","_onStateChange","_onUpdateFound","_onControllerChange","register","immediate","_registrationTime","document","readyState","res","_isUpdate","Boolean","serviceWorker","controller","_compatibleControllingSW","_getControllingSWIfCompatible","_registerScript","_registration","_sw","_reportWindowReady","once","waitingSW","waiting","wasWaitingBeforeRegister","currentPageIsOutOfScope","scopeURL","scope","baseURI","scopeURLBasePath","pathname","startsWith","_broadcastChannel","BroadcastChannel","getSW","reg","performance","now","meta","installingSW","installing","updateLikelyTriggeredExternally","_externalSW","originalEvent","state","isExternal","eventPrefix","eventProps","isUpdate","_waitingTimeout","setTimeout","clearTimeout"],"mappings":"AAAA,IAAG;EAACA,IAAI,CAAC,sBAAD,CAAJ,IAA8BC,CAAC,EAA/B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AG,KAAKqG,GAAhB;;QACIrG,EAAE,KAAK4B,SAAS,CAACmE,aAAV,CAAwBC,UAAnC,EAA+C;WACxClD,aAAL,CAAmB,IAAIW,YAAJ,CAAiB,aAAjB,EAAgC;QAACzD,EAAE,EAAFA,EAAD;QAAK6H,aAAa,EAAbA;OAArC,CAAnB;;MAC2C;QACzC/G,MAAM,CAACK,GAAP,CAAW,sDAAX;;;WAEG8D,oBAAL,CAA0B9E,OAA1B,CAAkCH,EAAlC;;;;;;;;;SAQJkF,iCAAW2C,eAAe;QACjB5H,IADiB,GACT4H,aADS,CACjB5H,IADiB;SAEnB6C,aAAL,CAAmB,IAAIW,YAAJ,CAAiB,SAAjB,EAA4B;MAACxD,IAAI,EAAJA,IAAD;MAAO4H,aAAa,EAAbA;KAAnC,CAAnB;;;;;wBA7RW;aACJ,KAAK7C,eAAL,CAAqBpE,OAA5B;;;;;;;;;;;;;;;;;wBAegB;aACT,KAAKqE,oBAAL,CAA0BrE,OAAjC;;;;;EA7KkByB;;AC1CtB;;;;;;;;;;"} \ No newline at end of file diff --git a/workbox-v4.3.1/workbox-window.dev.mjs b/workbox-v4.3.1/workbox-window.dev.mjs new file mode 100644 index 0000000000..bc6380b16a --- /dev/null +++ b/workbox-v4.3.1/workbox-window.dev.mjs @@ -0,0 +1,751 @@ +try { + self['workbox:window:4.3.1'] && _(); +} catch (e) {} // eslint-disable-line + +/* + Copyright 2019 Google LLC + + Use of this source code is governed by an MIT-style + license that can be found in the LICENSE file or at + https://opensource.org/licenses/MIT. +*/ +/** + * Sends a data object to a service worker via `postMessage` and resolves with + * a response (if any). + * + * A response can be set in a message handler in the service worker by + * calling `event.ports[0].postMessage(...)`, which will resolve the promise + * returned by `messageSW()`. If no response is set, the promise will not + * resolve. + * + * @param {ServiceWorker} sw The service worker to send the message to. + * @param {Object} data An object to send to the service worker. + * @return {Promise} + * + * @memberof module:workbox-window + */ + +const messageSW = (sw, data) => { + return new Promise(resolve => { + let messageChannel = new MessageChannel(); + + messageChannel.port1.onmessage = evt => resolve(evt.data); + + sw.postMessage(data, [messageChannel.port2]); + }); +}; + +try { + self['workbox:core:4.3.1'] && _(); +} catch (e) {} // eslint-disable-line + +/* + Copyright 2018 Google LLC + + Use of this source code is governed by an MIT-style + license that can be found in the LICENSE file or at + https://opensource.org/licenses/MIT. +*/ +/** + * The Deferred class composes Promises in a way that allows for them to be + * resolved or rejected from outside the constructor. In most cases promises + * should be used directly, but Deferreds can be necessary when the logic to + * resolve a promise must be separate. + * + * @private + */ + +class Deferred { + /** + * Creates a promise and exposes its resolve and reject functions as methods. + */ + constructor() { + this.promise = new Promise((resolve, reject) => { + this.resolve = resolve; + this.reject = reject; + }); + } + +} + +/* + Copyright 2019 Google LLC + Use of this source code is governed by an MIT-style + license that can be found in the LICENSE file or at + https://opensource.org/licenses/MIT. +*/ +const logger = (() => { + let inGroup = false; + const methodToColorMap = { + debug: `#7f8c8d`, + // Gray + log: `#2ecc71`, + // Green + warn: `#f39c12`, + // Yellow + error: `#c0392b`, + // Red + groupCollapsed: `#3498db`, + // Blue + groupEnd: null // No colored prefix on groupEnd + + }; + + const print = function (method, args) { + if (method === 'groupCollapsed') { + // Safari doesn't print all console.groupCollapsed() arguments: + // https://bugs.webkit.org/show_bug.cgi?id=182754 + if (/^((?!chrome|android).)*safari/i.test(navigator.userAgent)) { + console[method](...args); + return; + } + } + + const styles = [`background: ${methodToColorMap[method]}`, `border-radius: 0.5em`, `color: white`, `font-weight: bold`, `padding: 2px 0.5em`]; // When in a group, the workbox prefix is not displayed. + + const logPrefix = inGroup ? [] : ['%cworkbox', styles.join(';')]; + console[method](...logPrefix, ...args); + + if (method === 'groupCollapsed') { + inGroup = true; + } + + if (method === 'groupEnd') { + inGroup = false; + } + }; + + const api = {}; + + for (const method of Object.keys(methodToColorMap)) { + api[method] = (...args) => { + print(method, args); + }; + } + + return api; +})(); + +/* + Copyright 2019 Google LLC + + Use of this source code is governed by an MIT-style + license that can be found in the LICENSE file or at + https://opensource.org/licenses/MIT. +*/ +/** + * A minimal `EventTarget` shim. + * This is necessary because not all browsers support constructable + * `EventTarget`, so using a real `EventTarget` will error. + * @private + */ + +class EventTargetShim { + /** + * Creates an event listener registry + * + * @private + */ + constructor() { + // A registry of event types to listeners. + this._eventListenerRegistry = {}; + } + /** + * @param {string} type + * @param {Function} listener + * @private + */ + + + addEventListener(type, listener) { + this._getEventListenersByType(type).add(listener); + } + /** + * @param {string} type + * @param {Function} listener + * @private + */ + + + removeEventListener(type, listener) { + this._getEventListenersByType(type).delete(listener); + } + /** + * @param {Event} event + * @private + */ + + + dispatchEvent(event) { + event.target = this; + + this._getEventListenersByType(event.type).forEach(listener => listener(event)); + } + /** + * Returns a Set of listeners associated with the passed event type. + * If no handlers have been registered, an empty Set is returned. + * + * @param {string} type The event type. + * @return {Set} An array of handler functions. + * @private + */ + + + _getEventListenersByType(type) { + return this._eventListenerRegistry[type] = this._eventListenerRegistry[type] || new Set(); + } + +} + +/* + Copyright 2019 Google LLC + + Use of this source code is governed by an MIT-style + license that can be found in the LICENSE file or at + https://opensource.org/licenses/MIT. +*/ +/** + * Returns true if two URLs have the same `.href` property. The URLS can be + * relative, and if they are the current location href is used to resolve URLs. + * + * @private + * @param {string} url1 + * @param {string} url2 + * @return {boolean} + */ + +const urlsMatch = (url1, url2) => { + return new URL(url1, location).href === new URL(url2, location).href; +}; + +/* + Copyright 2019 Google LLC + + Use of this source code is governed by an MIT-style + license that can be found in the LICENSE file or at + https://opensource.org/licenses/MIT. +*/ +/** + * A minimal `Event` subclass shim. + * This doesn't *actually* subclass `Event` because not all browsers support + * constructable `EventTarget`, and using a real `Event` will error. + * @private + */ + +class WorkboxEvent { + /** + * @param {string} type + * @param {Object} props + */ + constructor(type, props) { + Object.assign(this, props, { + type + }); + } + +} + +/* + Copyright 2019 Google LLC + + Use of this source code is governed by an MIT-style + license that can be found in the LICENSE file or at + https://opensource.org/licenses/MIT. +*/ +// `skipWaiting()` wasn't called. This 200 amount wasn't scientifically +// chosen, but it seems to avoid false positives in my testing. + +const WAITING_TIMEOUT_DURATION = 200; // The amount of time after a registration that we can reasonably conclude +// that the registration didn't trigger an update. + +const REGISTRATION_TIMEOUT_DURATION = 60000; +/** + * A class to aid in handling service worker registration, updates, and + * reacting to service worker lifecycle events. + * + * @fires [message]{@link module:workbox-window.Workbox#message} + * @fires [installed]{@link module:workbox-window.Workbox#installed} + * @fires [waiting]{@link module:workbox-window.Workbox#waiting} + * @fires [controlling]{@link module:workbox-window.Workbox#controlling} + * @fires [activated]{@link module:workbox-window.Workbox#activated} + * @fires [redundant]{@link module:workbox-window.Workbox#redundant} + * @fires [externalinstalled]{@link module:workbox-window.Workbox#externalinstalled} + * @fires [externalwaiting]{@link module:workbox-window.Workbox#externalwaiting} + * @fires [externalactivated]{@link module:workbox-window.Workbox#externalactivated} + * + * @memberof module:workbox-window + */ + +class Workbox extends EventTargetShim { + /** + * Creates a new Workbox instance with a script URL and service worker + * options. The script URL and options are the same as those used when + * calling `navigator.serviceWorker.register(scriptURL, options)`. See: + * https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerContainer/register + * + * @param {string} scriptURL The service worker script associated with this + * instance. + * @param {Object} [registerOptions] The service worker options associated + * with this instance. + */ + constructor(scriptURL, registerOptions = {}) { + super(); + this._scriptURL = scriptURL; + this._registerOptions = registerOptions; + this._updateFoundCount = 0; // Deferreds we can resolve later. + + this._swDeferred = new Deferred(); + this._activeDeferred = new Deferred(); + this._controllingDeferred = new Deferred(); // Bind event handler callbacks. + + this._onMessage = this._onMessage.bind(this); + this._onStateChange = this._onStateChange.bind(this); + this._onUpdateFound = this._onUpdateFound.bind(this); + this._onControllerChange = this._onControllerChange.bind(this); + } + /** + * Registers a service worker for this instances script URL and service + * worker options. By default this method delays registration until after + * the window has loaded. + * + * @param {Object} [options] + * @param {Function} [options.immediate=false] Setting this to true will + * register the service worker immediately, even if the window has + * not loaded (not recommended). + */ + + + async register({ + immediate = false + } = {}) { + { + if (this._registrationTime) { + logger.error('Cannot re-register a Workbox instance after it has ' + 'been registered. Create a new instance instead.'); + return; + } + } + + if (!immediate && document.readyState !== 'complete') { + await new Promise(res => addEventListener('load', res)); + } // Set this flag to true if any service worker was controlling the page + // at registration time. + + + this._isUpdate = Boolean(navigator.serviceWorker.controller); // Before registering, attempt to determine if a SW is already controlling + // the page, and if that SW script (and version, if specified) matches this + // instance's script. + + this._compatibleControllingSW = this._getControllingSWIfCompatible(); + this._registration = await this._registerScript(); // If we have a compatible controller, store the controller as the "own" + // SW, resolve active/controlling deferreds and add necessary listeners. + + if (this._compatibleControllingSW) { + this._sw = this._compatibleControllingSW; + + this._activeDeferred.resolve(this._compatibleControllingSW); + + this._controllingDeferred.resolve(this._compatibleControllingSW); + + this._reportWindowReady(this._compatibleControllingSW); + + this._compatibleControllingSW.addEventListener('statechange', this._onStateChange, { + once: true + }); + } // If there's a waiting service worker with a matching URL before the + // `updatefound` event fires, it likely means that this site is open + // in another tab, or the user refreshed the page (and thus the prevoius + // page wasn't fully unloaded before this page started loading). + // https://developers.google.com/web/fundamentals/primers/service-workers/lifecycle#waiting + + + const waitingSW = this._registration.waiting; + + if (waitingSW && urlsMatch(waitingSW.scriptURL, this._scriptURL)) { + // Store the waiting SW as the "own" Sw, even if it means overwriting + // a compatible controller. + this._sw = waitingSW; // Run this in the next microtask, so any code that adds an event + // listener after awaiting `register()` will get this event. + + Promise.resolve().then(() => { + this.dispatchEvent(new WorkboxEvent('waiting', { + sw: waitingSW, + wasWaitingBeforeRegister: true + })); + + { + logger.warn('A service worker was already waiting to activate ' + 'before this script was registered...'); + } + }); + } // If an "own" SW is already set, resolve the deferred. + + + if (this._sw) { + this._swDeferred.resolve(this._sw); + } + + { + logger.log('Successfully registered service worker.', this._scriptURL); + + if (navigator.serviceWorker.controller) { + if (this._compatibleControllingSW) { + logger.debug('A service worker with the same script URL ' + 'is already controlling this page.'); + } else { + logger.debug('A service worker with a different script URL is ' + 'currently controlling the page. The browser is now fetching ' + 'the new script now...'); + } + } + + const currentPageIsOutOfScope = () => { + const scopeURL = new URL(this._registerOptions.scope || this._scriptURL, document.baseURI); + const scopeURLBasePath = new URL('./', scopeURL.href).pathname; + return !location.pathname.startsWith(scopeURLBasePath); + }; + + if (currentPageIsOutOfScope()) { + logger.warn('The current page is not in scope for the registered ' + 'service worker. Was this a mistake?'); + } + } + + this._registration.addEventListener('updatefound', this._onUpdateFound); + + navigator.serviceWorker.addEventListener('controllerchange', this._onControllerChange, { + once: true + }); // Add message listeners. + + if ('BroadcastChannel' in self) { + this._broadcastChannel = new BroadcastChannel('workbox'); + + this._broadcastChannel.addEventListener('message', this._onMessage); + } + + navigator.serviceWorker.addEventListener('message', this._onMessage); + return this._registration; + } + /** + * Resolves to the service worker registered by this instance as soon as it + * is active. If a service worker was already controlling at registration + * time then it will resolve to that if the script URLs (and optionally + * script versions) match, otherwise it will wait until an update is found + * and activates. + * + * @return {Promise} + */ + + + get active() { + return this._activeDeferred.promise; + } + /** + * Resolves to the service worker registered by this instance as soon as it + * is controlling the page. If a service worker was already controlling at + * registration time then it will resolve to that if the script URLs (and + * optionally script versions) match, otherwise it will wait until an update + * is found and starts controlling the page. + * Note: the first time a service worker is installed it will active but + * not start controlling the page unless `clients.claim()` is called in the + * service worker. + * + * @return {Promise} + */ + + + get controlling() { + return this._controllingDeferred.promise; + } + /** + * Resolves with a reference to a service worker that matches the script URL + * of this instance, as soon as it's available. + * + * If, at registration time, there's already an active or waiting service + * worker with a matching script URL, it will be used (with the waiting + * service worker taking precedence over the active service worker if both + * match, since the waiting service worker would have been registered more + * recently). + * If there's no matching active or waiting service worker at registration + * time then the promise will not resolve until an update is found and starts + * installing, at which point the installing service worker is used. + * + * @return {Promise} + */ + + + async getSW() { + // If `this._sw` is set, resolve with that as we want `getSW()` to + // return the correct (new) service worker if an update is found. + return this._sw || this._swDeferred.promise; + } + /** + * Sends the passed data object to the service worker registered by this + * instance (via [`getSW()`]{@link module:workbox-window.Workbox#getSW}) and resolves + * with a response (if any). + * + * A response can be set in a message handler in the service worker by + * calling `event.ports[0].postMessage(...)`, which will resolve the promise + * returned by `messageSW()`. If no response is set, the promise will never + * resolve. + * + * @param {Object} data An object to send to the service worker + * @return {Promise} + */ + + + async messageSW(data) { + const sw = await this.getSW(); + return messageSW(sw, data); + } + /** + * Checks for a service worker already controlling the page and returns + * it if its script URL matchs. + * + * @private + * @return {ServiceWorker|undefined} + */ + + + _getControllingSWIfCompatible() { + const controller = navigator.serviceWorker.controller; + + if (controller && urlsMatch(controller.scriptURL, this._scriptURL)) { + return controller; + } + } + /** + * Registers a service worker for this instances script URL and register + * options and tracks the time registration was complete. + * + * @private + */ + + + async _registerScript() { + try { + const reg = await navigator.serviceWorker.register(this._scriptURL, this._registerOptions); // Keep track of when registration happened, so it can be used in the + // `this._onUpdateFound` heuristic. Also use the presence of this + // property as a way to see if `.register()` has been called. + + this._registrationTime = performance.now(); + return reg; + } catch (error) { + { + logger.error(error); + } // Re-throw the error. + + + throw error; + } + } + /** + * Sends a message to the passed service worker that the window is ready. + * + * @param {ServiceWorker} sw + * @private + */ + + + _reportWindowReady(sw) { + messageSW(sw, { + type: 'WINDOW_READY', + meta: 'workbox-window' + }); + } + /** + * @private + */ + + + _onUpdateFound() { + const installingSW = this._registration.installing; // If the script URL passed to `navigator.serviceWorker.register()` is + // different from the current controlling SW's script URL, we know any + // successful registration calls will trigger an `updatefound` event. + // But if the registered script URL is the same as the current controlling + // SW's script URL, we'll only get an `updatefound` event if the file + // changed since it was last registered. This can be a problem if the user + // opens up the same page in a different tab, and that page registers + // a SW that triggers an update. It's a problem because this page has no + // good way of knowing whether the `updatefound` event came from the SW + // script it registered or from a registration attempt made by a newer + // version of the page running in another tab. + // To minimize the possibility of a false positive, we use the logic here: + + let updateLikelyTriggeredExternally = // Since we enforce only calling `register()` once, and since we don't + // add the `updatefound` event listener until the `register()` call, if + // `_updateFoundCount` is > 0 then it means this method has already + // been called, thus this SW must be external + this._updateFoundCount > 0 || // If the script URL of the installing SW is different from this + // instance's script URL, we know it's definitely not from our + // registration. + !urlsMatch(installingSW.scriptURL, this._scriptURL) || // If all of the above are false, then we use a time-based heuristic: + // Any `updatefound` event that occurs long after our registration is + // assumed to be external. + performance.now() > this._registrationTime + REGISTRATION_TIMEOUT_DURATION ? // If any of the above are not true, we assume the update was + // triggered by this instance. + true : false; + + if (updateLikelyTriggeredExternally) { + this._externalSW = installingSW; + + this._registration.removeEventListener('updatefound', this._onUpdateFound); + } else { + // If the update was not triggered externally we know the installing + // SW is the one we registered, so we set it. + this._sw = installingSW; + + this._swDeferred.resolve(installingSW); // The `installing` state isn't something we have a dedicated + // callback for, but we do log messages for it in development. + + + { + if (navigator.serviceWorker.controller) { + logger.log('Updated service worker found. Installing now...'); + } else { + logger.log('Service worker is installing...'); + } + } + } // Increment the `updatefound` count, so future invocations of this + // method can be sure they were triggered externally. + + + ++this._updateFoundCount; // Add a `statechange` listener regardless of whether this update was + // triggered externally, since we have callbacks for both. + + installingSW.addEventListener('statechange', this._onStateChange); + } + /** + * @private + * @param {Event} originalEvent + */ + + + _onStateChange(originalEvent) { + const sw = originalEvent.target; + const { + state + } = sw; + const isExternal = sw === this._externalSW; + const eventPrefix = isExternal ? 'external' : ''; + const eventProps = { + sw, + originalEvent + }; + + if (!isExternal && this._isUpdate) { + eventProps.isUpdate = true; + } + + this.dispatchEvent(new WorkboxEvent(eventPrefix + state, eventProps)); + + if (state === 'installed') { + // This timeout is used to ignore cases where the service worker calls + // `skipWaiting()` in the install event, thus moving it directly in the + // activating state. (Since all service workers *must* go through the + // waiting phase, the only way to detect `skipWaiting()` called in the + // install event is to observe that the time spent in the waiting phase + // is very short.) + // NOTE: we don't need separate timeouts for the own and external SWs + // since they can't go through these phases at the same time. + this._waitingTimeout = setTimeout(() => { + // Ensure the SW is still waiting (it may now be redundant). + if (state === 'installed' && this._registration.waiting === sw) { + this.dispatchEvent(new WorkboxEvent(eventPrefix + 'waiting', eventProps)); + + { + if (isExternal) { + logger.warn('An external service worker has installed but is ' + 'waiting for this client to close before activating...'); + } else { + logger.warn('The service worker has installed but is waiting ' + 'for existing clients to close before activating...'); + } + } + } + }, WAITING_TIMEOUT_DURATION); + } else if (state === 'activating') { + clearTimeout(this._waitingTimeout); + + if (!isExternal) { + this._activeDeferred.resolve(sw); + } + } + + { + switch (state) { + case 'installed': + if (isExternal) { + logger.warn('An external service worker has installed. ' + 'You may want to suggest users reload this page.'); + } else { + logger.log('Registered service worker installed.'); + } + + break; + + case 'activated': + if (isExternal) { + logger.warn('An external service worker has activated.'); + } else { + logger.log('Registered service worker activated.'); + + if (sw !== navigator.serviceWorker.controller) { + logger.warn('The registered service worker is active but ' + 'not yet controlling the page. Reload or run ' + '`clients.claim()` in the service worker.'); + } + } + + break; + + case 'redundant': + if (sw === this._compatibleControllingSW) { + logger.log('Previously controlling service worker now redundant!'); + } else if (!isExternal) { + logger.log('Registered service worker now redundant!'); + } + + break; + } + } + } + /** + * @private + * @param {Event} originalEvent + */ + + + _onControllerChange(originalEvent) { + const sw = this._sw; + + if (sw === navigator.serviceWorker.controller) { + this.dispatchEvent(new WorkboxEvent('controlling', { + sw, + originalEvent + })); + + { + logger.log('Registered service worker now controlling this page.'); + } + + this._controllingDeferred.resolve(sw); + } + } + /** + * @private + * @param {Event} originalEvent + */ + + + _onMessage(originalEvent) { + const { + data + } = originalEvent; + this.dispatchEvent(new WorkboxEvent('message', { + data, + originalEvent + })); + } + +} // The jsdoc comments below outline the events this instance may dispatch: + +/* + Copyright 2019 Google LLC + + Use of this source code is governed by an MIT-style + license that can be found in the LICENSE file or at + https://opensource.org/licenses/MIT. +*/ + +export { Workbox, messageSW }; +//# sourceMappingURL=workbox-window.dev.mjs.map diff --git a/workbox-v4.3.1/workbox-window.dev.mjs.map b/workbox-v4.3.1/workbox-window.dev.mjs.map new file mode 100644 index 0000000000..8abff0374a --- /dev/null +++ b/workbox-v4.3.1/workbox-window.dev.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"workbox-window.dev.mjs","sources":["../_version.mjs","../messageSW.mjs","../../workbox-core/_version.mjs","../../workbox-core/_private/Deferred.mjs","../../workbox-core/_private/logger.mjs","../utils/EventTargetShim.mjs","../utils/urlsMatch.mjs","../utils/WorkboxEvent.mjs","../Workbox.mjs","../index.mjs"],"sourcesContent":["try{self['workbox:window:4.3.1']&&_()}catch(e){}// eslint-disable-line","/*\n Copyright 2019 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport './_version.mjs';\n\n\n/**\n * Sends a data object to a service worker via `postMessage` and resolves with\n * a response (if any).\n *\n * A response can be set in a message handler in the service worker by\n * calling `event.ports[0].postMessage(...)`, which will resolve the promise\n * returned by `messageSW()`. If no response is set, the promise will not\n * resolve.\n *\n * @param {ServiceWorker} sw The service worker to send the message to.\n * @param {Object} data An object to send to the service worker.\n * @return {Promise}\n *\n * @memberof module:workbox-window\n */\nconst messageSW = (sw, data) => {\n return new Promise((resolve) => {\n let messageChannel = new MessageChannel();\n messageChannel.port1.onmessage = (evt) => resolve(evt.data);\n sw.postMessage(data, [messageChannel.port2]);\n });\n};\n\nexport {messageSW};\n","try{self['workbox:core:4.3.1']&&_()}catch(e){}// eslint-disable-line","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport '../_version.mjs';\n\n\n/**\n * The Deferred class composes Promises in a way that allows for them to be\n * resolved or rejected from outside the constructor. In most cases promises\n * should be used directly, but Deferreds can be necessary when the logic to\n * resolve a promise must be separate.\n *\n * @private\n */\nexport class Deferred {\n /**\n * Creates a promise and exposes its resolve and reject functions as methods.\n */\n constructor() {\n this.promise = new Promise((resolve, reject) => {\n this.resolve = resolve;\n this.reject = reject;\n });\n }\n}\n","/*\n Copyright 2019 Google LLC\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport '../_version.mjs';\n\n\nconst logger = process.env.NODE_ENV === 'production' ? null : (() => {\n let inGroup = false;\n\n const methodToColorMap = {\n debug: `#7f8c8d`, // Gray\n log: `#2ecc71`, // Green\n warn: `#f39c12`, // Yellow\n error: `#c0392b`, // Red\n groupCollapsed: `#3498db`, // Blue\n groupEnd: null, // No colored prefix on groupEnd\n };\n\n const print = function(method, args) {\n if (method === 'groupCollapsed') {\n // Safari doesn't print all console.groupCollapsed() arguments:\n // https://bugs.webkit.org/show_bug.cgi?id=182754\n if (/^((?!chrome|android).)*safari/i.test(navigator.userAgent)) {\n console[method](...args);\n return;\n }\n }\n\n const styles = [\n `background: ${methodToColorMap[method]}`,\n `border-radius: 0.5em`,\n `color: white`,\n `font-weight: bold`,\n `padding: 2px 0.5em`,\n ];\n\n // When in a group, the workbox prefix is not displayed.\n const logPrefix = inGroup ? [] : ['%cworkbox', styles.join(';')];\n\n console[method](...logPrefix, ...args);\n\n if (method === 'groupCollapsed') {\n inGroup = true;\n }\n if (method === 'groupEnd') {\n inGroup = false;\n }\n };\n\n const api = {};\n for (const method of Object.keys(methodToColorMap)) {\n api[method] = (...args) => {\n print(method, args);\n };\n }\n\n return api;\n})();\n\nexport {logger};\n","/*\n Copyright 2019 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport '../_version.mjs';\n\n\n/**\n * A minimal `EventTarget` shim.\n * This is necessary because not all browsers support constructable\n * `EventTarget`, so using a real `EventTarget` will error.\n * @private\n */\nclass EventTargetShim {\n /**\n * Creates an event listener registry\n *\n * @private\n */\n constructor() {\n // A registry of event types to listeners.\n this._eventListenerRegistry = {};\n }\n /**\n * @param {string} type\n * @param {Function} listener\n * @private\n */\n addEventListener(type, listener) {\n this._getEventListenersByType(type).add(listener);\n }\n\n /**\n * @param {string} type\n * @param {Function} listener\n * @private\n */\n removeEventListener(type, listener) {\n this._getEventListenersByType(type).delete(listener);\n }\n\n /**\n * @param {Event} event\n * @private\n */\n dispatchEvent(event) {\n event.target = this;\n this._getEventListenersByType(event.type).forEach(\n (listener) => listener(event));\n }\n\n /**\n * Returns a Set of listeners associated with the passed event type.\n * If no handlers have been registered, an empty Set is returned.\n *\n * @param {string} type The event type.\n * @return {Set} An array of handler functions.\n * @private\n */\n _getEventListenersByType(type) {\n return this._eventListenerRegistry[type] =\n (this._eventListenerRegistry[type] || new Set());\n }\n}\n\nexport {EventTargetShim};\n","/*\n Copyright 2019 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport '../_version.mjs';\n\n\n/**\n * Returns true if two URLs have the same `.href` property. The URLS can be\n * relative, and if they are the current location href is used to resolve URLs.\n *\n * @private\n * @param {string} url1\n * @param {string} url2\n * @return {boolean}\n */\nconst urlsMatch = (url1, url2) => {\n return new URL(url1, location).href === new URL(url2, location).href;\n};\n\nexport {urlsMatch};\n","/*\n Copyright 2019 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport '../_version.mjs';\n\n/**\n * A minimal `Event` subclass shim.\n * This doesn't *actually* subclass `Event` because not all browsers support\n * constructable `EventTarget`, and using a real `Event` will error.\n * @private\n */\nclass WorkboxEvent {\n /**\n * @param {string} type\n * @param {Object} props\n */\n constructor(type, props) {\n Object.assign(this, props, {type});\n }\n}\n\nexport {WorkboxEvent};\n","/*\n Copyright 2019 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport {Deferred} from 'workbox-core/_private/Deferred.mjs';\nimport {logger} from 'workbox-core/_private/logger.mjs';\nimport {messageSW} from './messageSW.mjs';\nimport {EventTargetShim} from './utils/EventTargetShim.mjs';\nimport {urlsMatch} from './utils/urlsMatch.mjs';\nimport {WorkboxEvent} from './utils/WorkboxEvent.mjs';\nimport './_version.mjs';\n\n\n// The time a SW must be in the waiting phase before we can conclude\n// `skipWaiting()` wasn't called. This 200 amount wasn't scientifically\n// chosen, but it seems to avoid false positives in my testing.\nconst WAITING_TIMEOUT_DURATION = 200;\n\n// The amount of time after a registration that we can reasonably conclude\n// that the registration didn't trigger an update.\nconst REGISTRATION_TIMEOUT_DURATION = 60000;\n\n/**\n * A class to aid in handling service worker registration, updates, and\n * reacting to service worker lifecycle events.\n *\n * @fires [message]{@link module:workbox-window.Workbox#message}\n * @fires [installed]{@link module:workbox-window.Workbox#installed}\n * @fires [waiting]{@link module:workbox-window.Workbox#waiting}\n * @fires [controlling]{@link module:workbox-window.Workbox#controlling}\n * @fires [activated]{@link module:workbox-window.Workbox#activated}\n * @fires [redundant]{@link module:workbox-window.Workbox#redundant}\n * @fires [externalinstalled]{@link module:workbox-window.Workbox#externalinstalled}\n * @fires [externalwaiting]{@link module:workbox-window.Workbox#externalwaiting}\n * @fires [externalactivated]{@link module:workbox-window.Workbox#externalactivated}\n *\n * @memberof module:workbox-window\n */\nclass Workbox extends EventTargetShim {\n /**\n * Creates a new Workbox instance with a script URL and service worker\n * options. The script URL and options are the same as those used when\n * calling `navigator.serviceWorker.register(scriptURL, options)`. See:\n * https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerContainer/register\n *\n * @param {string} scriptURL The service worker script associated with this\n * instance.\n * @param {Object} [registerOptions] The service worker options associated\n * with this instance.\n */\n constructor(scriptURL, registerOptions = {}) {\n super();\n\n this._scriptURL = scriptURL;\n this._registerOptions = registerOptions;\n this._updateFoundCount = 0;\n\n // Deferreds we can resolve later.\n this._swDeferred = new Deferred();\n this._activeDeferred = new Deferred();\n this._controllingDeferred = new Deferred();\n\n // Bind event handler callbacks.\n this._onMessage = this._onMessage.bind(this);\n this._onStateChange = this._onStateChange.bind(this);\n this._onUpdateFound = this._onUpdateFound.bind(this);\n this._onControllerChange = this._onControllerChange.bind(this);\n }\n\n /**\n * Registers a service worker for this instances script URL and service\n * worker options. By default this method delays registration until after\n * the window has loaded.\n *\n * @param {Object} [options]\n * @param {Function} [options.immediate=false] Setting this to true will\n * register the service worker immediately, even if the window has\n * not loaded (not recommended).\n */\n async register({immediate = false} = {}) {\n if (process.env.NODE_ENV !== 'production') {\n if (this._registrationTime) {\n logger.error('Cannot re-register a Workbox instance after it has ' +\n 'been registered. Create a new instance instead.');\n return;\n }\n }\n\n if (!immediate && document.readyState !== 'complete') {\n await new Promise((res) => addEventListener('load', res));\n }\n\n // Set this flag to true if any service worker was controlling the page\n // at registration time.\n this._isUpdate = Boolean(navigator.serviceWorker.controller);\n\n // Before registering, attempt to determine if a SW is already controlling\n // the page, and if that SW script (and version, if specified) matches this\n // instance's script.\n this._compatibleControllingSW = this._getControllingSWIfCompatible();\n\n this._registration = await this._registerScript();\n\n // If we have a compatible controller, store the controller as the \"own\"\n // SW, resolve active/controlling deferreds and add necessary listeners.\n if (this._compatibleControllingSW) {\n this._sw = this._compatibleControllingSW;\n this._activeDeferred.resolve(this._compatibleControllingSW);\n this._controllingDeferred.resolve(this._compatibleControllingSW);\n\n this._reportWindowReady(this._compatibleControllingSW);\n this._compatibleControllingSW.addEventListener(\n 'statechange', this._onStateChange, {once: true});\n }\n\n // If there's a waiting service worker with a matching URL before the\n // `updatefound` event fires, it likely means that this site is open\n // in another tab, or the user refreshed the page (and thus the prevoius\n // page wasn't fully unloaded before this page started loading).\n // https://developers.google.com/web/fundamentals/primers/service-workers/lifecycle#waiting\n const waitingSW = this._registration.waiting;\n if (waitingSW && urlsMatch(waitingSW.scriptURL, this._scriptURL)) {\n // Store the waiting SW as the \"own\" Sw, even if it means overwriting\n // a compatible controller.\n this._sw = waitingSW;\n\n // Run this in the next microtask, so any code that adds an event\n // listener after awaiting `register()` will get this event.\n Promise.resolve().then(() => {\n this.dispatchEvent(new WorkboxEvent('waiting', {\n sw: waitingSW,\n wasWaitingBeforeRegister: true,\n }));\n if (process.env.NODE_ENV !== 'production') {\n logger.warn('A service worker was already waiting to activate ' +\n 'before this script was registered...');\n }\n });\n }\n\n // If an \"own\" SW is already set, resolve the deferred.\n if (this._sw) {\n this._swDeferred.resolve(this._sw);\n }\n\n if (process.env.NODE_ENV !== 'production') {\n logger.log('Successfully registered service worker.', this._scriptURL);\n\n if (navigator.serviceWorker.controller) {\n if (this._compatibleControllingSW) {\n logger.debug('A service worker with the same script URL ' +\n 'is already controlling this page.');\n } else {\n logger.debug('A service worker with a different script URL is ' +\n 'currently controlling the page. The browser is now fetching ' +\n 'the new script now...');\n }\n }\n\n const currentPageIsOutOfScope = () => {\n const scopeURL = new URL(\n this._registerOptions.scope || this._scriptURL, document.baseURI);\n const scopeURLBasePath = new URL('./', scopeURL.href).pathname;\n return !location.pathname.startsWith(scopeURLBasePath);\n };\n if (currentPageIsOutOfScope()) {\n logger.warn('The current page is not in scope for the registered ' +\n 'service worker. Was this a mistake?');\n }\n }\n\n this._registration.addEventListener('updatefound', this._onUpdateFound);\n navigator.serviceWorker.addEventListener(\n 'controllerchange', this._onControllerChange, {once: true});\n\n // Add message listeners.\n if ('BroadcastChannel' in self) {\n this._broadcastChannel = new BroadcastChannel('workbox');\n this._broadcastChannel.addEventListener('message', this._onMessage);\n }\n navigator.serviceWorker.addEventListener('message', this._onMessage);\n\n return this._registration;\n }\n\n /**\n * Resolves to the service worker registered by this instance as soon as it\n * is active. If a service worker was already controlling at registration\n * time then it will resolve to that if the script URLs (and optionally\n * script versions) match, otherwise it will wait until an update is found\n * and activates.\n *\n * @return {Promise}\n */\n get active() {\n return this._activeDeferred.promise;\n }\n\n /**\n * Resolves to the service worker registered by this instance as soon as it\n * is controlling the page. If a service worker was already controlling at\n * registration time then it will resolve to that if the script URLs (and\n * optionally script versions) match, otherwise it will wait until an update\n * is found and starts controlling the page.\n * Note: the first time a service worker is installed it will active but\n * not start controlling the page unless `clients.claim()` is called in the\n * service worker.\n *\n * @return {Promise}\n */\n get controlling() {\n return this._controllingDeferred.promise;\n }\n\n /**\n * Resolves with a reference to a service worker that matches the script URL\n * of this instance, as soon as it's available.\n *\n * If, at registration time, there's already an active or waiting service\n * worker with a matching script URL, it will be used (with the waiting\n * service worker taking precedence over the active service worker if both\n * match, since the waiting service worker would have been registered more\n * recently).\n * If there's no matching active or waiting service worker at registration\n * time then the promise will not resolve until an update is found and starts\n * installing, at which point the installing service worker is used.\n *\n * @return {Promise}\n */\n async getSW() {\n // If `this._sw` is set, resolve with that as we want `getSW()` to\n // return the correct (new) service worker if an update is found.\n return this._sw || this._swDeferred.promise;\n }\n\n /**\n * Sends the passed data object to the service worker registered by this\n * instance (via [`getSW()`]{@link module:workbox-window.Workbox#getSW}) and resolves\n * with a response (if any).\n *\n * A response can be set in a message handler in the service worker by\n * calling `event.ports[0].postMessage(...)`, which will resolve the promise\n * returned by `messageSW()`. If no response is set, the promise will never\n * resolve.\n *\n * @param {Object} data An object to send to the service worker\n * @return {Promise}\n */\n async messageSW(data) {\n const sw = await this.getSW();\n return messageSW(sw, data);\n }\n\n /**\n * Checks for a service worker already controlling the page and returns\n * it if its script URL matchs.\n *\n * @private\n * @return {ServiceWorker|undefined}\n */\n _getControllingSWIfCompatible() {\n const controller = navigator.serviceWorker.controller;\n if (controller && urlsMatch(controller.scriptURL, this._scriptURL)) {\n return controller;\n }\n }\n\n /**\n * Registers a service worker for this instances script URL and register\n * options and tracks the time registration was complete.\n *\n * @private\n */\n async _registerScript() {\n try {\n const reg = await navigator.serviceWorker.register(\n this._scriptURL, this._registerOptions);\n\n // Keep track of when registration happened, so it can be used in the\n // `this._onUpdateFound` heuristic. Also use the presence of this\n // property as a way to see if `.register()` has been called.\n this._registrationTime = performance.now();\n\n return reg;\n } catch (error) {\n if (process.env.NODE_ENV !== 'production') {\n logger.error(error);\n }\n // Re-throw the error.\n throw error;\n }\n }\n\n\n /**\n * Sends a message to the passed service worker that the window is ready.\n *\n * @param {ServiceWorker} sw\n * @private\n */\n _reportWindowReady(sw) {\n messageSW(sw, {\n type: 'WINDOW_READY',\n meta: 'workbox-window',\n });\n }\n\n /**\n * @private\n */\n _onUpdateFound() {\n const installingSW = this._registration.installing;\n\n // If the script URL passed to `navigator.serviceWorker.register()` is\n // different from the current controlling SW's script URL, we know any\n // successful registration calls will trigger an `updatefound` event.\n // But if the registered script URL is the same as the current controlling\n // SW's script URL, we'll only get an `updatefound` event if the file\n // changed since it was last registered. This can be a problem if the user\n // opens up the same page in a different tab, and that page registers\n // a SW that triggers an update. It's a problem because this page has no\n // good way of knowing whether the `updatefound` event came from the SW\n // script it registered or from a registration attempt made by a newer\n // version of the page running in another tab.\n // To minimize the possibility of a false positive, we use the logic here:\n let updateLikelyTriggeredExternally =\n // Since we enforce only calling `register()` once, and since we don't\n // add the `updatefound` event listener until the `register()` call, if\n // `_updateFoundCount` is > 0 then it means this method has already\n // been called, thus this SW must be external\n this._updateFoundCount > 0 ||\n // If the script URL of the installing SW is different from this\n // instance's script URL, we know it's definitely not from our\n // registration.\n !urlsMatch(installingSW.scriptURL, this._scriptURL) ||\n // If all of the above are false, then we use a time-based heuristic:\n // Any `updatefound` event that occurs long after our registration is\n // assumed to be external.\n (performance.now() >\n this._registrationTime + REGISTRATION_TIMEOUT_DURATION) ?\n // If any of the above are not true, we assume the update was\n // triggered by this instance.\n true : false;\n\n if (updateLikelyTriggeredExternally) {\n this._externalSW = installingSW;\n this._registration.removeEventListener(\n 'updatefound', this._onUpdateFound);\n } else {\n // If the update was not triggered externally we know the installing\n // SW is the one we registered, so we set it.\n this._sw = installingSW;\n this._swDeferred.resolve(installingSW);\n\n // The `installing` state isn't something we have a dedicated\n // callback for, but we do log messages for it in development.\n if (process.env.NODE_ENV !== 'production') {\n if (navigator.serviceWorker.controller) {\n logger.log('Updated service worker found. Installing now...');\n } else {\n logger.log('Service worker is installing...');\n }\n }\n }\n\n // Increment the `updatefound` count, so future invocations of this\n // method can be sure they were triggered externally.\n ++this._updateFoundCount;\n\n // Add a `statechange` listener regardless of whether this update was\n // triggered externally, since we have callbacks for both.\n installingSW.addEventListener('statechange', this._onStateChange);\n }\n\n /**\n * @private\n * @param {Event} originalEvent\n */\n _onStateChange(originalEvent) {\n const sw = originalEvent.target;\n const {state} = sw;\n const isExternal = sw === this._externalSW;\n const eventPrefix = isExternal ? 'external' : '';\n\n const eventProps = {sw, originalEvent};\n if (!isExternal && this._isUpdate) {\n eventProps.isUpdate = true;\n }\n\n this.dispatchEvent(new WorkboxEvent(\n eventPrefix + state, eventProps));\n\n if (state === 'installed') {\n // This timeout is used to ignore cases where the service worker calls\n // `skipWaiting()` in the install event, thus moving it directly in the\n // activating state. (Since all service workers *must* go through the\n // waiting phase, the only way to detect `skipWaiting()` called in the\n // install event is to observe that the time spent in the waiting phase\n // is very short.)\n // NOTE: we don't need separate timeouts for the own and external SWs\n // since they can't go through these phases at the same time.\n this._waitingTimeout = setTimeout(() => {\n // Ensure the SW is still waiting (it may now be redundant).\n if (state === 'installed' && this._registration.waiting === sw) {\n this.dispatchEvent(new WorkboxEvent(\n eventPrefix + 'waiting', eventProps));\n\n if (process.env.NODE_ENV !== 'production') {\n if (isExternal) {\n logger.warn('An external service worker has installed but is ' +\n 'waiting for this client to close before activating...');\n } else {\n logger.warn('The service worker has installed but is waiting ' +\n 'for existing clients to close before activating...');\n }\n }\n }\n }, WAITING_TIMEOUT_DURATION);\n } else if (state === 'activating') {\n clearTimeout(this._waitingTimeout);\n if (!isExternal) {\n this._activeDeferred.resolve(sw);\n }\n }\n\n if (process.env.NODE_ENV !== 'production') {\n switch (state) {\n case 'installed':\n if (isExternal) {\n logger.warn('An external service worker has installed. ' +\n 'You may want to suggest users reload this page.');\n } else {\n logger.log('Registered service worker installed.');\n }\n break;\n case 'activated':\n if (isExternal) {\n logger.warn('An external service worker has activated.');\n } else {\n logger.log('Registered service worker activated.');\n if (sw !== navigator.serviceWorker.controller) {\n logger.warn('The registered service worker is active but ' +\n 'not yet controlling the page. Reload or run ' +\n '`clients.claim()` in the service worker.');\n }\n }\n break;\n case 'redundant':\n if (sw === this._compatibleControllingSW) {\n logger.log('Previously controlling service worker now redundant!');\n } else if (!isExternal) {\n logger.log('Registered service worker now redundant!');\n }\n break;\n }\n }\n }\n\n /**\n * @private\n * @param {Event} originalEvent\n */\n _onControllerChange(originalEvent) {\n const sw = this._sw;\n if (sw === navigator.serviceWorker.controller) {\n this.dispatchEvent(new WorkboxEvent('controlling', {sw, originalEvent}));\n if (process.env.NODE_ENV !== 'production') {\n logger.log('Registered service worker now controlling this page.');\n }\n this._controllingDeferred.resolve(sw);\n }\n }\n\n /**\n * @private\n * @param {Event} originalEvent\n */\n _onMessage(originalEvent) {\n const {data} = originalEvent;\n this.dispatchEvent(new WorkboxEvent('message', {data, originalEvent}));\n }\n}\n\n// The jsdoc comments below outline the events this instance may dispatch:\n// -----------------------------------------------------------------------\n\n/**\n * The `message` event is dispatched any time a `postMessage` (or a\n * `BroadcastChannel` message with the `workbox` channel name) is received.\n *\n * @event module:workbox-window.Workbox#message\n * @type {WorkboxEvent}\n * @property {*} data The `data` property from the original `message` event.\n * @property {Event} originalEvent The original [`message`]{@link https://developer.mozilla.org/en-US/docs/Web/API/MessageEvent}\n * event.\n * @property {string} type `message`.\n * @property {Workbox} target The `Workbox` instance.\n */\n\n/**\n * The `installed` event is dispatched if the state of a\n * [`Workbox`]{@link module:workbox-window.Workbox} instance's\n * [registered service worker]{@link https://developers.google.com/web/tools/workbox/modules/workbox-precaching#def-registered-sw}\n * changes to `installed`.\n *\n * Then can happen either the very first time a service worker is installed,\n * or after an update to the current service worker is found. In the case\n * of an update being found, the event's `isUpdate` property will be `true`.\n *\n * @event module:workbox-window.Workbox#installed\n * @type {WorkboxEvent}\n * @property {ServiceWorker} sw The service worker instance.\n * @property {Event} originalEvent The original [`statechange`]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorker/onstatechange}\n * event.\n * @property {boolean|undefined} isUpdate True if a service worker was already\n * controlling when this `Workbox` instance called `register()`.\n * @property {string} type `installed`.\n * @property {Workbox} target The `Workbox` instance.\n */\n\n/**\n * The `waiting` event is dispatched if the state of a\n * [`Workbox`]{@link module:workbox-window.Workbox} instance's\n * [registered service worker]{@link https://developers.google.com/web/tools/workbox/modules/workbox-precaching#def-registered-sw}\n * changes to `installed` and then doesn't immediately change to `activating`.\n * It may also be dispatched if a service worker with the same\n * [`scriptURL`]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorker/scriptURL}\n * was already waiting when the [`register()`]{@link module:workbox-window.Workbox#register}\n * method was called.\n *\n * @event module:workbox-window.Workbox#waiting\n * @type {WorkboxEvent}\n * @property {ServiceWorker} sw The service worker instance.\n * @property {Event} originalEvent The native `controllerchange` event\n * @property {boolean|undefined} isUpdate True if a service worker was already\n * controlling when this `Workbox` instance called `register()`.\n * @property {boolean|undefined} wasWaitingBeforeRegister True if a service worker with\n * a matching `scriptURL` was already waiting when this `Workbox`\n * instance called `register()`.\n * @property {string} type `waiting`.\n * @property {Workbox} target The `Workbox` instance.\n */\n\n/**\n * The `controlling` event is dispatched if a\n * [`controllerchange`]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerContainer/oncontrollerchange}\n * fires on the service worker [container]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerContainer}\n * and the [`scriptURL`]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorker/scriptURL}\n * of the new [controller]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerContainer/controller}\n * matches the `scriptURL` of the `Workbox` instance's\n * [registered service worker]{@link https://developers.google.com/web/tools/workbox/modules/workbox-precaching#def-registered-sw}.\n *\n * @event module:workbox-window.Workbox#controlling\n * @type {WorkboxEvent}\n * @property {ServiceWorker} sw The service worker instance.\n * @property {Event} originalEvent The original [`controllerchange`]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerContainer/oncontrollerchange}\n * event.\n * @property {boolean|undefined} isUpdate True if a service worker was already\n * controlling when this service worker was registered.\n * @property {string} type `controlling`.\n * @property {Workbox} target The `Workbox` instance.\n */\n\n/**\n * The `activated` event is dispatched if the state of a\n * [`Workbox`]{@link module:workbox-window.Workbox} instance's\n * [registered service worker]{@link https://developers.google.com/web/tools/workbox/modules/workbox-precaching#def-registered-sw}\n * changes to `activated`.\n *\n * @event module:workbox-window.Workbox#activated\n * @type {WorkboxEvent}\n * @property {ServiceWorker} sw The service worker instance.\n * @property {Event} originalEvent The original [`statechange`]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorker/onstatechange}\n * event.\n * @property {boolean|undefined} isUpdate True if a service worker was already\n * controlling when this `Workbox` instance called `register()`.\n * @property {string} type `activated`.\n * @property {Workbox} target The `Workbox` instance.\n */\n\n/**\n * The `redundant` event is dispatched if the state of a\n * [`Workbox`]{@link module:workbox-window.Workbox} instance's\n * [registered service worker]{@link https://developers.google.com/web/tools/workbox/modules/workbox-precaching#def-registered-sw}\n * changes to `redundant`.\n *\n * @event module:workbox-window.Workbox#redundant\n * @type {WorkboxEvent}\n * @property {ServiceWorker} sw The service worker instance.\n * @property {Event} originalEvent The original [`statechange`]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorker/onstatechange}\n * event.\n * @property {boolean|undefined} isUpdate True if a service worker was already\n * controlling when this `Workbox` instance called `register()`.\n * @property {string} type `redundant`.\n * @property {Workbox} target The `Workbox` instance.\n */\n\n/**\n * The `externalinstalled` event is dispatched if the state of an\n * [external service worker]{@link https://developers.google.com/web/tools/workbox/modules/workbox-precaching#def-external-sw}\n * changes to `installed`.\n *\n * @event module:workbox-window.Workbox#externalinstalled\n * @type {WorkboxEvent}\n * @property {ServiceWorker} sw The service worker instance.\n * @property {Event} originalEvent The original [`statechange`]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorker/onstatechange}\n * event.\n * @property {string} type `externalinstalled`.\n * @property {Workbox} target The `Workbox` instance.\n */\n\n/**\n * The `externalwaiting` event is dispatched if the state of an\n * [external service worker]{@link https://developers.google.com/web/tools/workbox/modules/workbox-precaching#def-external-sw}\n * changes to `waiting`.\n *\n * @event module:workbox-window.Workbox#externalwaiting\n * @type {WorkboxEvent}\n * @property {ServiceWorker} sw The service worker instance.\n * @property {Event|undefined} originalEvent The original [`statechange`]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorker/onstatechange}\n * event.\n * @property {string} type `externalwaiting`.\n * @property {Workbox} target The `Workbox` instance.\n */\n\n/**\n * The `externalactivated` event is dispatched if the state of an\n * [external service worker]{@link https://developers.google.com/web/tools/workbox/modules/workbox-precaching#def-external-sw}\n * changes to `activated`.\n *\n * @event module:workbox-window.Workbox#externalactivated\n * @type {WorkboxEvent}\n * @property {ServiceWorker} sw The service worker instance.\n * @property {Event} originalEvent The original [`statechange`]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorker/onstatechange}\n * event.\n * @property {string} type `externalactivated`.\n * @property {Workbox} target The `Workbox` instance.\n */\n\nexport {Workbox};\n","/*\n Copyright 2019 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport {messageSW} from './messageSW.mjs';\nimport {Workbox} from './Workbox.mjs';\nimport './_version.mjs';\n\n\n/**\n * @module workbox-window\n */\nexport {\n Workbox,\n messageSW,\n};\n"],"names":["self","_","e","messageSW","sw","data","Promise","resolve","messageChannel","MessageChannel","port1","onmessage","evt","postMessage","port2","Deferred","constructor","promise","reject","logger","process","inGroup","methodToColorMap","debug","log","warn","error","groupCollapsed","groupEnd","print","method","args","test","navigator","userAgent","console","styles","logPrefix","join","api","Object","keys","EventTargetShim","_eventListenerRegistry","addEventListener","type","listener","_getEventListenersByType","add","removeEventListener","delete","dispatchEvent","event","target","forEach","Set","urlsMatch","url1","url2","URL","location","href","WorkboxEvent","props","assign","WAITING_TIMEOUT_DURATION","REGISTRATION_TIMEOUT_DURATION","Workbox","scriptURL","registerOptions","_scriptURL","_registerOptions","_updateFoundCount","_swDeferred","_activeDeferred","_controllingDeferred","_onMessage","bind","_onStateChange","_onUpdateFound","_onControllerChange","register","immediate","_registrationTime","document","readyState","res","_isUpdate","Boolean","serviceWorker","controller","_compatibleControllingSW","_getControllingSWIfCompatible","_registration","_registerScript","_sw","_reportWindowReady","once","waitingSW","waiting","then","wasWaitingBeforeRegister","currentPageIsOutOfScope","scopeURL","scope","baseURI","scopeURLBasePath","pathname","startsWith","_broadcastChannel","BroadcastChannel","active","controlling","getSW","reg","performance","now","meta","installingSW","installing","updateLikelyTriggeredExternally","_externalSW","originalEvent","state","isExternal","eventPrefix","eventProps","isUpdate","_waitingTimeout","setTimeout","clearTimeout"],"mappings":"AAAA,IAAG;EAACA,IAAI,CAAC,sBAAD,CAAJ,IAA8BC,CAAC,EAA/B;CAAJ,CAAsC,OAAMC,CAAN,EAAQ;;ACA9C;;;;;;;AAQA,AAGA;;;;;;;;;;;;;;;;AAeA,MAAMC,SAAS,GAAG,CAACC,EAAD,EAAKC,IAAL,KAAc;SACvB,IAAIC,OAAJ,CAAaC,OAAD,IAAa;QAC1BC,cAAc,GAAG,IAAIC,cAAJ,EAArB;;IACAD,cAAc,CAACE,KAAf,CAAqBC,SAArB,GAAkCC,GAAD,IAASL,OAAO,CAACK,GAAG,CAACP,IAAL,CAAjD;;IACAD,EAAE,CAACS,WAAH,CAAeR,IAAf,EAAqB,CAACG,cAAc,CAACM,KAAhB,CAArB;GAHK,CAAP;CADF;;AC1BA,IAAG;EAACd,IAAI,CAAC,oBAAD,CAAJ,IAA4BC,CAAC,EAA7B;CAAJ,CAAoC,OAAMC,CAAN,EAAQ;;ACA5C;;;;;;;AAQA,AAGA;;;;;;;;;AAQA,AAAO,MAAMa,QAAN,CAAe;;;;EAIpBC,WAAW,GAAG;SACPC,OAAL,GAAe,IAAIX,OAAJ,CAAY,CAACC,OAAD,EAAUW,MAAV,KAAqB;WACzCX,OAAL,GAAeA,OAAf;WACKW,MAAL,GAAcA,MAAd;KAFa,CAAf;;;;;ACxBJ;;;;;;AAOA,AAGA,MAAMC,MAAM,GAAGC,AAA+C,CAAC,MAAM;MAC/DC,OAAO,GAAG,KAAd;Q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pB,EAAE,KAAK6B,SAAS,CAACwD,aAAV,CAAwBC,UAAnC,EAA+C;cAC7CvE,MAAM,CAACM,IAAP,CAAY,iDACR,8CADQ,GAER,0CAFJ;;;;;;aAMD,WAAL;cACMrB,EAAE,KAAK,KAAKuF,wBAAhB,EAA0C;YACxCxE,MAAM,CAACK,GAAP,CAAW,sDAAX;WADF,MAEO,IAAI,CAACoG,UAAL,EAAiB;YACtBzG,MAAM,CAACK,GAAP,CAAW,0CAAX;;;;;;;;;;;;;EAWVwD,mBAAmB,CAAC0C,aAAD,EAAgB;UAC3BtH,EAAE,GAAG,KAAK2F,GAAhB;;QACI3F,EAAE,KAAK6B,SAAS,CAACwD,aAAV,CAAwBC,UAAnC,EAA+C;WACxCvC,aAAL,CAAmB,IAAIW,YAAJ,CAAiB,aAAjB,EAAgC;QAAC1D,EAAD;QAAKsH;OAArC,CAAnB;;MAC2C;QACzCvG,MAAM,CAACK,GAAP,CAAW,sDAAX;;;WAEGmD,oBAAL,CAA0BpE,OAA1B,CAAkCH,EAAlC;;;;;;;;;EAQJwE,UAAU,CAAC8C,aAAD,EAAgB;UAClB;MAACrH;QAAQqH,aAAf;SACKvE,aAAL,CAAmB,IAAIW,YAAJ,CAAiB,SAAjB,EAA4B;MAACzD,IAAD;MAAOqH;KAAnC,CAAnB;;;;;ACneJ;;;;;;;;;;"} \ No newline at end of file diff --git a/workbox-v4.3.1/workbox-window.dev.umd.js b/workbox-v4.3.1/workbox-window.dev.umd.js new file mode 100644 index 0000000000..7e13ff6a97 --- /dev/null +++ b/workbox-v4.3.1/workbox-window.dev.umd.js @@ -0,0 +1,896 @@ +(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : + typeof define === 'function' && define.amd ? define(['exports'], factory) : + (global = global || self, factory(global.workbox = {})); +}(this, function (exports) { 'use strict'; + + try { + self['workbox:window:4.3.1'] && _(); + } catch (e) {} // eslint-disable-line + + /* + Copyright 2019 Google LLC + + Use of this source code is governed by an MIT-style + license that can be found in the LICENSE file or at + https://opensource.org/licenses/MIT. + */ + /** + * Sends a data object to a service worker via `postMessage` and resolves with + * a response (if any). + * + * A response can be set in a message handler in the service worker by + * calling `event.ports[0].postMessage(...)`, which will resolve the promise + * returned by `messageSW()`. If no response is set, the promise will not + * resolve. + * + * @param {ServiceWorker} sw The service worker to send the message to. + * @param {Object} data An object to send to the service worker. + * @return {Promise} + * + * @memberof module:workbox-window + */ + + var messageSW = function messageSW(sw, data) { + return new Promise(function (resolve) { + var messageChannel = new MessageChannel(); + + messageChannel.port1.onmessage = function (evt) { + return resolve(evt.data); + }; + + sw.postMessage(data, [messageChannel.port2]); + }); + }; + + function _defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ("value" in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + + function _createClass(Constructor, protoProps, staticProps) { + if (protoProps) _defineProperties(Constructor.prototype, protoProps); + if (staticProps) _defineProperties(Constructor, staticProps); + return Constructor; + } + + function _inheritsLoose(subClass, superClass) { + subClass.prototype = Object.create(superClass.prototype); + subClass.prototype.constructor = subClass; + subClass.__proto__ = superClass; + } + + function _assertThisInitialized(self) { + if (self === void 0) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + + return self; + } + + try { + self['workbox:core:4.3.1'] && _(); + } catch (e) {} // eslint-disable-line + + /* + Copyright 2018 Google LLC + + Use of this source code is governed by an MIT-style + license that can be found in the LICENSE file or at + https://opensource.org/licenses/MIT. + */ + /** + * The Deferred class composes Promises in a way that allows for them to be + * resolved or rejected from outside the constructor. In most cases promises + * should be used directly, but Deferreds can be necessary when the logic to + * resolve a promise must be separate. + * + * @private + */ + + var Deferred = + /** + * Creates a promise and exposes its resolve and reject functions as methods. + */ + function Deferred() { + var _this = this; + + this.promise = new Promise(function (resolve, reject) { + _this.resolve = resolve; + _this.reject = reject; + }); + }; + + /* + Copyright 2019 Google LLC + Use of this source code is governed by an MIT-style + license that can be found in the LICENSE file or at + https://opensource.org/licenses/MIT. + */ + var logger = function () { + var inGroup = false; + var methodToColorMap = { + debug: "#7f8c8d", + // Gray + log: "#2ecc71", + // Green + warn: "#f39c12", + // Yellow + error: "#c0392b", + // Red + groupCollapsed: "#3498db", + // Blue + groupEnd: null // No colored prefix on groupEnd + + }; + + var print = function print(method, args) { + var _console2; + + if (method === 'groupCollapsed') { + // Safari doesn't print all console.groupCollapsed() arguments: + // https://bugs.webkit.org/show_bug.cgi?id=182754 + if (/^((?!chrome|android).)*safari/i.test(navigator.userAgent)) { + var _console; + + (_console = console)[method].apply(_console, args); + + return; + } + } + + var styles = ["background: " + methodToColorMap[method], "border-radius: 0.5em", "color: white", "font-weight: bold", "padding: 2px 0.5em"]; // When in a group, the workbox prefix is not displayed. + + var logPrefix = inGroup ? [] : ['%cworkbox', styles.join(';')]; + + (_console2 = console)[method].apply(_console2, logPrefix.concat(args)); + + if (method === 'groupCollapsed') { + inGroup = true; + } + + if (method === 'groupEnd') { + inGroup = false; + } + }; + + var api = {}; + + var _arr = Object.keys(methodToColorMap); + + var _loop = function _loop() { + var method = _arr[_i]; + + api[method] = function () { + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + print(method, args); + }; + }; + + for (var _i = 0; _i < _arr.length; _i++) { + _loop(); + } + + return api; + }(); + + /* + Copyright 2019 Google LLC + + Use of this source code is governed by an MIT-style + license that can be found in the LICENSE file or at + https://opensource.org/licenses/MIT. + */ + /** + * A minimal `EventTarget` shim. + * This is necessary because not all browsers support constructable + * `EventTarget`, so using a real `EventTarget` will error. + * @private + */ + + var EventTargetShim = + /*#__PURE__*/ + function () { + /** + * Creates an event listener registry + * + * @private + */ + function EventTargetShim() { + // A registry of event types to listeners. + this._eventListenerRegistry = {}; + } + /** + * @param {string} type + * @param {Function} listener + * @private + */ + + + var _proto = EventTargetShim.prototype; + + _proto.addEventListener = function addEventListener(type, listener) { + this._getEventListenersByType(type).add(listener); + }; + /** + * @param {string} type + * @param {Function} listener + * @private + */ + + + _proto.removeEventListener = function removeEventListener(type, listener) { + this._getEventListenersByType(type).delete(listener); + }; + /** + * @param {Event} event + * @private + */ + + + _proto.dispatchEvent = function dispatchEvent(event) { + event.target = this; + + this._getEventListenersByType(event.type).forEach(function (listener) { + return listener(event); + }); + }; + /** + * Returns a Set of listeners associated with the passed event type. + * If no handlers have been registered, an empty Set is returned. + * + * @param {string} type The event type. + * @return {Set} An array of handler functions. + * @private + */ + + + _proto._getEventListenersByType = function _getEventListenersByType(type) { + return this._eventListenerRegistry[type] = this._eventListenerRegistry[type] || new Set(); + }; + + return EventTargetShim; + }(); + + /* + Copyright 2019 Google LLC + + Use of this source code is governed by an MIT-style + license that can be found in the LICENSE file or at + https://opensource.org/licenses/MIT. + */ + /** + * Returns true if two URLs have the same `.href` property. The URLS can be + * relative, and if they are the current location href is used to resolve URLs. + * + * @private + * @param {string} url1 + * @param {string} url2 + * @return {boolean} + */ + + var urlsMatch = function urlsMatch(url1, url2) { + return new URL(url1, location).href === new URL(url2, location).href; + }; + + /* + Copyright 2019 Google LLC + + Use of this source code is governed by an MIT-style + license that can be found in the LICENSE file or at + https://opensource.org/licenses/MIT. + */ + /** + * A minimal `Event` subclass shim. + * This doesn't *actually* subclass `Event` because not all browsers support + * constructable `EventTarget`, and using a real `Event` will error. + * @private + */ + + var WorkboxEvent = + /** + * @param {string} type + * @param {Object} props + */ + function WorkboxEvent(type, props) { + Object.assign(this, props, { + type: type + }); + }; + + function _catch(body, recover) { + try { + var result = body(); + } catch (e) { + return recover(e); + } + + if (result && result.then) { + return result.then(void 0, recover); + } + + return result; + } + + function _async(f) { + return function () { + for (var args = [], i = 0; i < arguments.length; i++) { + args[i] = arguments[i]; + } + + try { + return Promise.resolve(f.apply(this, args)); + } catch (e) { + return Promise.reject(e); + } + }; + } + + function _invoke(body, then) { + var result = body(); + + if (result && result.then) { + return result.then(then); + } + + return then(result); + } + + function _await(value, then, direct) { + if (direct) { + return then ? then(value) : value; + } + + if (!value || !value.then) { + value = Promise.resolve(value); + } + + return then ? value.then(then) : value; + } + + function _awaitIgnored(value, direct) { + if (!direct) { + return value && value.then ? value.then(_empty) : Promise.resolve(); + } + } + + function _empty() {} + // `skipWaiting()` wasn't called. This 200 amount wasn't scientifically + // chosen, but it seems to avoid false positives in my testing. + + var WAITING_TIMEOUT_DURATION = 200; // The amount of time after a registration that we can reasonably conclude + // that the registration didn't trigger an update. + + var REGISTRATION_TIMEOUT_DURATION = 60000; + /** + * A class to aid in handling service worker registration, updates, and + * reacting to service worker lifecycle events. + * + * @fires [message]{@link module:workbox-window.Workbox#message} + * @fires [installed]{@link module:workbox-window.Workbox#installed} + * @fires [waiting]{@link module:workbox-window.Workbox#waiting} + * @fires [controlling]{@link module:workbox-window.Workbox#controlling} + * @fires [activated]{@link module:workbox-window.Workbox#activated} + * @fires [redundant]{@link module:workbox-window.Workbox#redundant} + * @fires [externalinstalled]{@link module:workbox-window.Workbox#externalinstalled} + * @fires [externalwaiting]{@link module:workbox-window.Workbox#externalwaiting} + * @fires [externalactivated]{@link module:workbox-window.Workbox#externalactivated} + * + * @memberof module:workbox-window + */ + + var Workbox = + /*#__PURE__*/ + function (_EventTargetShim) { + _inheritsLoose(Workbox, _EventTargetShim); + + /** + * Creates a new Workbox instance with a script URL and service worker + * options. The script URL and options are the same as those used when + * calling `navigator.serviceWorker.register(scriptURL, options)`. See: + * https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerContainer/register + * + * @param {string} scriptURL The service worker script associated with this + * instance. + * @param {Object} [registerOptions] The service worker options associated + * with this instance. + */ + function Workbox(scriptURL, registerOptions) { + var _this; + + if (registerOptions === void 0) { + registerOptions = {}; + } + + _this = _EventTargetShim.call(this) || this; + _this._scriptURL = scriptURL; + _this._registerOptions = registerOptions; + _this._updateFoundCount = 0; // Deferreds we can resolve later. + + _this._swDeferred = new Deferred(); + _this._activeDeferred = new Deferred(); + _this._controllingDeferred = new Deferred(); // Bind event handler callbacks. + + _this._onMessage = _this._onMessage.bind(_assertThisInitialized(_assertThisInitialized(_this))); + _this._onStateChange = _this._onStateChange.bind(_assertThisInitialized(_assertThisInitialized(_this))); + _this._onUpdateFound = _this._onUpdateFound.bind(_assertThisInitialized(_assertThisInitialized(_this))); + _this._onControllerChange = _this._onControllerChange.bind(_assertThisInitialized(_assertThisInitialized(_this))); + return _this; + } + /** + * Registers a service worker for this instances script URL and service + * worker options. By default this method delays registration until after + * the window has loaded. + * + * @param {Object} [options] + * @param {Function} [options.immediate=false] Setting this to true will + * register the service worker immediately, even if the window has + * not loaded (not recommended). + */ + + + var _proto = Workbox.prototype; + _proto.register = _async(function (_temp) { + var _this2 = this; + + var _ref = _temp === void 0 ? {} : _temp, + _ref$immediate = _ref.immediate, + immediate = _ref$immediate === void 0 ? false : _ref$immediate; + + { + if (_this2._registrationTime) { + logger.error('Cannot re-register a Workbox instance after it has ' + 'been registered. Create a new instance instead.'); + return; + } + } + + return _invoke(function () { + if (!immediate && document.readyState !== 'complete') { + return _awaitIgnored(new Promise(function (res) { + return addEventListener('load', res); + })); + } + }, function () { + // Set this flag to true if any service worker was controlling the page + // at registration time. + _this2._isUpdate = Boolean(navigator.serviceWorker.controller); // Before registering, attempt to determine if a SW is already controlling + // the page, and if that SW script (and version, if specified) matches this + // instance's script. + + _this2._compatibleControllingSW = _this2._getControllingSWIfCompatible(); + return _await(_this2._registerScript(), function (_this2$_registerScrip) { + _this2._registration = _this2$_registerScrip; + + // If we have a compatible controller, store the controller as the "own" + // SW, resolve active/controlling deferreds and add necessary listeners. + if (_this2._compatibleControllingSW) { + _this2._sw = _this2._compatibleControllingSW; + + _this2._activeDeferred.resolve(_this2._compatibleControllingSW); + + _this2._controllingDeferred.resolve(_this2._compatibleControllingSW); + + _this2._reportWindowReady(_this2._compatibleControllingSW); + + _this2._compatibleControllingSW.addEventListener('statechange', _this2._onStateChange, { + once: true + }); + } // If there's a waiting service worker with a matching URL before the + // `updatefound` event fires, it likely means that this site is open + // in another tab, or the user refreshed the page (and thus the prevoius + // page wasn't fully unloaded before this page started loading). + // https://developers.google.com/web/fundamentals/primers/service-workers/lifecycle#waiting + + + var waitingSW = _this2._registration.waiting; + + if (waitingSW && urlsMatch(waitingSW.scriptURL, _this2._scriptURL)) { + // Store the waiting SW as the "own" Sw, even if it means overwriting + // a compatible controller. + _this2._sw = waitingSW; // Run this in the next microtask, so any code that adds an event + // listener after awaiting `register()` will get this event. + + Promise.resolve().then(function () { + _this2.dispatchEvent(new WorkboxEvent('waiting', { + sw: waitingSW, + wasWaitingBeforeRegister: true + })); + + { + logger.warn('A service worker was already waiting to activate ' + 'before this script was registered...'); + } + }); + } // If an "own" SW is already set, resolve the deferred. + + + if (_this2._sw) { + _this2._swDeferred.resolve(_this2._sw); + } + + { + logger.log('Successfully registered service worker.', _this2._scriptURL); + + if (navigator.serviceWorker.controller) { + if (_this2._compatibleControllingSW) { + logger.debug('A service worker with the same script URL ' + 'is already controlling this page.'); + } else { + logger.debug('A service worker with a different script URL is ' + 'currently controlling the page. The browser is now fetching ' + 'the new script now...'); + } + } + + var currentPageIsOutOfScope = function currentPageIsOutOfScope() { + var scopeURL = new URL(_this2._registerOptions.scope || _this2._scriptURL, document.baseURI); + var scopeURLBasePath = new URL('./', scopeURL.href).pathname; + return !location.pathname.startsWith(scopeURLBasePath); + }; + + if (currentPageIsOutOfScope()) { + logger.warn('The current page is not in scope for the registered ' + 'service worker. Was this a mistake?'); + } + } + + _this2._registration.addEventListener('updatefound', _this2._onUpdateFound); + + navigator.serviceWorker.addEventListener('controllerchange', _this2._onControllerChange, { + once: true + }); // Add message listeners. + + if ('BroadcastChannel' in self) { + _this2._broadcastChannel = new BroadcastChannel('workbox'); + + _this2._broadcastChannel.addEventListener('message', _this2._onMessage); + } + + navigator.serviceWorker.addEventListener('message', _this2._onMessage); + return _this2._registration; + }); + }); + }); + /** + * Resolves to the service worker registered by this instance as soon as it + * is active. If a service worker was already controlling at registration + * time then it will resolve to that if the script URLs (and optionally + * script versions) match, otherwise it will wait until an update is found + * and activates. + * + * @return {Promise} + */ + + /** + * Resolves with a reference to a service worker that matches the script URL + * of this instance, as soon as it's available. + * + * If, at registration time, there's already an active or waiting service + * worker with a matching script URL, it will be used (with the waiting + * service worker taking precedence over the active service worker if both + * match, since the waiting service worker would have been registered more + * recently). + * If there's no matching active or waiting service worker at registration + * time then the promise will not resolve until an update is found and starts + * installing, at which point the installing service worker is used. + * + * @return {Promise} + */ + _proto.getSW = _async(function () { + var _this3 = this; + + // If `this._sw` is set, resolve with that as we want `getSW()` to + // return the correct (new) service worker if an update is found. + return _this3._sw || _this3._swDeferred.promise; + }); + /** + * Sends the passed data object to the service worker registered by this + * instance (via [`getSW()`]{@link module:workbox-window.Workbox#getSW}) and resolves + * with a response (if any). + * + * A response can be set in a message handler in the service worker by + * calling `event.ports[0].postMessage(...)`, which will resolve the promise + * returned by `messageSW()`. If no response is set, the promise will never + * resolve. + * + * @param {Object} data An object to send to the service worker + * @return {Promise} + */ + + _proto.messageSW = _async(function (data) { + var _this4 = this; + + return _await(_this4.getSW(), function (sw) { + return messageSW(sw, data); + }); + }); + /** + * Checks for a service worker already controlling the page and returns + * it if its script URL matchs. + * + * @private + * @return {ServiceWorker|undefined} + */ + + _proto._getControllingSWIfCompatible = function _getControllingSWIfCompatible() { + var controller = navigator.serviceWorker.controller; + + if (controller && urlsMatch(controller.scriptURL, this._scriptURL)) { + return controller; + } + }; + /** + * Registers a service worker for this instances script URL and register + * options and tracks the time registration was complete. + * + * @private + */ + + + _proto._registerScript = _async(function () { + var _this5 = this; + + return _catch(function () { + return _await(navigator.serviceWorker.register(_this5._scriptURL, _this5._registerOptions), function (reg) { + // Keep track of when registration happened, so it can be used in the + // `this._onUpdateFound` heuristic. Also use the presence of this + // property as a way to see if `.register()` has been called. + _this5._registrationTime = performance.now(); + return reg; + }); + }, function (error) { + { + logger.error(error); + } // Re-throw the error. + + + throw error; + }); + }); + /** + * Sends a message to the passed service worker that the window is ready. + * + * @param {ServiceWorker} sw + * @private + */ + + _proto._reportWindowReady = function _reportWindowReady(sw) { + messageSW(sw, { + type: 'WINDOW_READY', + meta: 'workbox-window' + }); + }; + /** + * @private + */ + + + _proto._onUpdateFound = function _onUpdateFound() { + var installingSW = this._registration.installing; // If the script URL passed to `navigator.serviceWorker.register()` is + // different from the current controlling SW's script URL, we know any + // successful registration calls will trigger an `updatefound` event. + // But if the registered script URL is the same as the current controlling + // SW's script URL, we'll only get an `updatefound` event if the file + // changed since it was last registered. This can be a problem if the user + // opens up the same page in a different tab, and that page registers + // a SW that triggers an update. It's a problem because this page has no + // good way of knowing whether the `updatefound` event came from the SW + // script it registered or from a registration attempt made by a newer + // version of the page running in another tab. + // To minimize the possibility of a false positive, we use the logic here: + + var updateLikelyTriggeredExternally = // Since we enforce only calling `register()` once, and since we don't + // add the `updatefound` event listener until the `register()` call, if + // `_updateFoundCount` is > 0 then it means this method has already + // been called, thus this SW must be external + this._updateFoundCount > 0 || // If the script URL of the installing SW is different from this + // instance's script URL, we know it's definitely not from our + // registration. + !urlsMatch(installingSW.scriptURL, this._scriptURL) || // If all of the above are false, then we use a time-based heuristic: + // Any `updatefound` event that occurs long after our registration is + // assumed to be external. + performance.now() > this._registrationTime + REGISTRATION_TIMEOUT_DURATION ? // If any of the above are not true, we assume the update was + // triggered by this instance. + true : false; + + if (updateLikelyTriggeredExternally) { + this._externalSW = installingSW; + + this._registration.removeEventListener('updatefound', this._onUpdateFound); + } else { + // If the update was not triggered externally we know the installing + // SW is the one we registered, so we set it. + this._sw = installingSW; + + this._swDeferred.resolve(installingSW); // The `installing` state isn't something we have a dedicated + // callback for, but we do log messages for it in development. + + + { + if (navigator.serviceWorker.controller) { + logger.log('Updated service worker found. Installing now...'); + } else { + logger.log('Service worker is installing...'); + } + } + } // Increment the `updatefound` count, so future invocations of this + // method can be sure they were triggered externally. + + + ++this._updateFoundCount; // Add a `statechange` listener regardless of whether this update was + // triggered externally, since we have callbacks for both. + + installingSW.addEventListener('statechange', this._onStateChange); + }; + /** + * @private + * @param {Event} originalEvent + */ + + + _proto._onStateChange = function _onStateChange(originalEvent) { + var _this6 = this; + + var sw = originalEvent.target; + var state = sw.state; + var isExternal = sw === this._externalSW; + var eventPrefix = isExternal ? 'external' : ''; + var eventProps = { + sw: sw, + originalEvent: originalEvent + }; + + if (!isExternal && this._isUpdate) { + eventProps.isUpdate = true; + } + + this.dispatchEvent(new WorkboxEvent(eventPrefix + state, eventProps)); + + if (state === 'installed') { + // This timeout is used to ignore cases where the service worker calls + // `skipWaiting()` in the install event, thus moving it directly in the + // activating state. (Since all service workers *must* go through the + // waiting phase, the only way to detect `skipWaiting()` called in the + // install event is to observe that the time spent in the waiting phase + // is very short.) + // NOTE: we don't need separate timeouts for the own and external SWs + // since they can't go through these phases at the same time. + this._waitingTimeout = setTimeout(function () { + // Ensure the SW is still waiting (it may now be redundant). + if (state === 'installed' && _this6._registration.waiting === sw) { + _this6.dispatchEvent(new WorkboxEvent(eventPrefix + 'waiting', eventProps)); + + { + if (isExternal) { + logger.warn('An external service worker has installed but is ' + 'waiting for this client to close before activating...'); + } else { + logger.warn('The service worker has installed but is waiting ' + 'for existing clients to close before activating...'); + } + } + } + }, WAITING_TIMEOUT_DURATION); + } else if (state === 'activating') { + clearTimeout(this._waitingTimeout); + + if (!isExternal) { + this._activeDeferred.resolve(sw); + } + } + + { + switch (state) { + case 'installed': + if (isExternal) { + logger.warn('An external service worker has installed. ' + 'You may want to suggest users reload this page.'); + } else { + logger.log('Registered service worker installed.'); + } + + break; + + case 'activated': + if (isExternal) { + logger.warn('An external service worker has activated.'); + } else { + logger.log('Registered service worker activated.'); + + if (sw !== navigator.serviceWorker.controller) { + logger.warn('The registered service worker is active but ' + 'not yet controlling the page. Reload or run ' + '`clients.claim()` in the service worker.'); + } + } + + break; + + case 'redundant': + if (sw === this._compatibleControllingSW) { + logger.log('Previously controlling service worker now redundant!'); + } else if (!isExternal) { + logger.log('Registered service worker now redundant!'); + } + + break; + } + } + }; + /** + * @private + * @param {Event} originalEvent + */ + + + _proto._onControllerChange = function _onControllerChange(originalEvent) { + var sw = this._sw; + + if (sw === navigator.serviceWorker.controller) { + this.dispatchEvent(new WorkboxEvent('controlling', { + sw: sw, + originalEvent: originalEvent + })); + + { + logger.log('Registered service worker now controlling this page.'); + } + + this._controllingDeferred.resolve(sw); + } + }; + /** + * @private + * @param {Event} originalEvent + */ + + + _proto._onMessage = function _onMessage(originalEvent) { + var data = originalEvent.data; + this.dispatchEvent(new WorkboxEvent('message', { + data: data, + originalEvent: originalEvent + })); + }; + + _createClass(Workbox, [{ + key: "active", + get: function get() { + return this._activeDeferred.promise; + } + /** + * Resolves to the service worker registered by this instance as soon as it + * is controlling the page. If a service worker was already controlling at + * registration time then it will resolve to that if the script URLs (and + * optionally script versions) match, otherwise it will wait until an update + * is found and starts controlling the page. + * Note: the first time a service worker is installed it will active but + * not start controlling the page unless `clients.claim()` is called in the + * service worker. + * + * @return {Promise} + */ + + }, { + key: "controlling", + get: function get() { + return this._controllingDeferred.promise; + } + }]); + + return Workbox; + }(EventTargetShim); // The jsdoc comments below outline the events this instance may dispatch: + + /* + Copyright 2019 Google LLC + + Use of this source code is governed by an MIT-style + license that can be found in the LICENSE file or at + https://opensource.org/licenses/MIT. + */ + + exports.Workbox = Workbox; + exports.messageSW = messageSW; + + Object.defineProperty(exports, '__esModule', { value: true }); + +})); +//# sourceMappingURL=workbox-window.dev.umd.js.map diff --git a/workbox-v4.3.1/workbox-window.dev.umd.js.map b/workbox-v4.3.1/workbox-window.dev.umd.js.map new file mode 100644 index 0000000000..0fc86b824d --- /dev/null +++ b/workbox-v4.3.1/workbox-window.dev.umd.js.map @@ -0,0 +1 @@ +{"version":3,"file":"workbox-window.dev.umd.js","sources":["../_version.mjs","../messageSW.mjs","../../workbox-core/_version.mjs","../../workbox-core/_private/Deferred.mjs","../../workbox-core/_private/logger.mjs","../utils/EventTargetShim.mjs","../utils/urlsMatch.mjs","../utils/WorkboxEvent.mjs","../Workbox.mjs","../index.mjs"],"sourcesContent":["try{self['workbox:window:4.3.1']&&_()}catch(e){}// eslint-disable-line","/*\n Copyright 2019 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport './_version.mjs';\n\n\n/**\n * Sends a data object to a service worker via `postMessage` and resolves with\n * a response (if any).\n *\n * A response can be set in a message handler in the service worker by\n * calling `event.ports[0].postMessage(...)`, which will resolve the promise\n * returned by `messageSW()`. If no response is set, the promise will not\n * resolve.\n *\n * @param {ServiceWorker} sw The service worker to send the message to.\n * @param {Object} data An object to send to the service worker.\n * @return {Promise}\n *\n * @memberof module:workbox-window\n */\nconst messageSW = (sw, data) => {\n return new Promise((resolve) => {\n let messageChannel = new MessageChannel();\n messageChannel.port1.onmessage = (evt) => resolve(evt.data);\n sw.postMessage(data, [messageChannel.port2]);\n });\n};\n\nexport {messageSW};\n","try{self['workbox:core:4.3.1']&&_()}catch(e){}// eslint-disable-line","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport '../_version.mjs';\n\n\n/**\n * The Deferred class composes Promises in a way that allows for them to be\n * resolved or rejected from outside the constructor. In most cases promises\n * should be used directly, but Deferreds can be necessary when the logic to\n * resolve a promise must be separate.\n *\n * @private\n */\nexport class Deferred {\n /**\n * Creates a promise and exposes its resolve and reject functions as methods.\n */\n constructor() {\n this.promise = new Promise((resolve, reject) => {\n this.resolve = resolve;\n this.reject = reject;\n });\n }\n}\n","/*\n Copyright 2019 Google LLC\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport '../_version.mjs';\n\n\nconst logger = process.env.NODE_ENV === 'production' ? null : (() => {\n let inGroup = false;\n\n const methodToColorMap = {\n debug: `#7f8c8d`, // Gray\n log: `#2ecc71`, // Green\n warn: `#f39c12`, // Yellow\n error: `#c0392b`, // Red\n groupCollapsed: `#3498db`, // Blue\n groupEnd: null, // No colored prefix on groupEnd\n };\n\n const print = function(method, args) {\n if (method === 'groupCollapsed') {\n // Safari doesn't print all console.groupCollapsed() arguments:\n // https://bugs.webkit.org/show_bug.cgi?id=182754\n if (/^((?!chrome|android).)*safari/i.test(navigator.userAgent)) {\n console[method](...args);\n return;\n }\n }\n\n const styles = [\n `background: ${methodToColorMap[method]}`,\n `border-radius: 0.5em`,\n `color: white`,\n `font-weight: bold`,\n `padding: 2px 0.5em`,\n ];\n\n // When in a group, the workbox prefix is not displayed.\n const logPrefix = inGroup ? [] : ['%cworkbox', styles.join(';')];\n\n console[method](...logPrefix, ...args);\n\n if (method === 'groupCollapsed') {\n inGroup = true;\n }\n if (method === 'groupEnd') {\n inGroup = false;\n }\n };\n\n const api = {};\n for (const method of Object.keys(methodToColorMap)) {\n api[method] = (...args) => {\n print(method, args);\n };\n }\n\n return api;\n})();\n\nexport {logger};\n","/*\n Copyright 2019 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport '../_version.mjs';\n\n\n/**\n * A minimal `EventTarget` shim.\n * This is necessary because not all browsers support constructable\n * `EventTarget`, so using a real `EventTarget` will error.\n * @private\n */\nclass EventTargetShim {\n /**\n * Creates an event listener registry\n *\n * @private\n */\n constructor() {\n // A registry of event types to listeners.\n this._eventListenerRegistry = {};\n }\n /**\n * @param {string} type\n * @param {Function} listener\n * @private\n */\n addEventListener(type, listener) {\n this._getEventListenersByType(type).add(listener);\n }\n\n /**\n * @param {string} type\n * @param {Function} listener\n * @private\n */\n removeEventListener(type, listener) {\n this._getEventListenersByType(type).delete(listener);\n }\n\n /**\n * @param {Event} event\n * @private\n */\n dispatchEvent(event) {\n event.target = this;\n this._getEventListenersByType(event.type).forEach(\n (listener) => listener(event));\n }\n\n /**\n * Returns a Set of listeners associated with the passed event type.\n * If no handlers have been registered, an empty Set is returned.\n *\n * @param {string} type The event type.\n * @return {Set} An array of handler functions.\n * @private\n */\n _getEventListenersByType(type) {\n return this._eventListenerRegistry[type] =\n (this._eventListenerRegistry[type] || new Set());\n }\n}\n\nexport {EventTargetShim};\n","/*\n Copyright 2019 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport '../_version.mjs';\n\n\n/**\n * Returns true if two URLs have the same `.href` property. The URLS can be\n * relative, and if they are the current location href is used to resolve URLs.\n *\n * @private\n * @param {string} url1\n * @param {string} url2\n * @return {boolean}\n */\nconst urlsMatch = (url1, url2) => {\n return new URL(url1, location).href === new URL(url2, location).href;\n};\n\nexport {urlsMatch};\n","/*\n Copyright 2019 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport '../_version.mjs';\n\n/**\n * A minimal `Event` subclass shim.\n * This doesn't *actually* subclass `Event` because not all browsers support\n * constructable `EventTarget`, and using a real `Event` will error.\n * @private\n */\nclass WorkboxEvent {\n /**\n * @param {string} type\n * @param {Object} props\n */\n constructor(type, props) {\n Object.assign(this, props, {type});\n }\n}\n\nexport {WorkboxEvent};\n","/*\n Copyright 2019 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport {Deferred} from 'workbox-core/_private/Deferred.mjs';\nimport {logger} from 'workbox-core/_private/logger.mjs';\nimport {messageSW} from './messageSW.mjs';\nimport {EventTargetShim} from './utils/EventTargetShim.mjs';\nimport {urlsMatch} from './utils/urlsMatch.mjs';\nimport {WorkboxEvent} from './utils/WorkboxEvent.mjs';\nimport './_version.mjs';\n\n\n// The time a SW must be in the waiting phase before we can conclude\n// `skipWaiting()` wasn't called. This 200 amount wasn't scientifically\n// chosen, but it seems to avoid false positives in my testing.\nconst WAITING_TIMEOUT_DURATION = 200;\n\n// The amount of time after a registration that we can reasonably conclude\n// that the registration didn't trigger an update.\nconst REGISTRATION_TIMEOUT_DURATION = 60000;\n\n/**\n * A class to aid in handling service worker registration, updates, and\n * reacting to service worker lifecycle events.\n *\n * @fires [message]{@link module:workbox-window.Workbox#message}\n * @fires [installed]{@link module:workbox-window.Workbox#installed}\n * @fires [waiting]{@link module:workbox-window.Workbox#waiting}\n * @fires [controlling]{@link module:workbox-window.Workbox#controlling}\n * @fires [activated]{@link module:workbox-window.Workbox#activated}\n * @fires [redundant]{@link module:workbox-window.Workbox#redundant}\n * @fires [externalinstalled]{@link module:workbox-window.Workbox#externalinstalled}\n * @fires [externalwaiting]{@link module:workbox-window.Workbox#externalwaiting}\n * @fires [externalactivated]{@link module:workbox-window.Workbox#externalactivated}\n *\n * @memberof module:workbox-window\n */\nclass Workbox extends EventTargetShim {\n /**\n * Creates a new Workbox instance with a script URL and service worker\n * options. The script URL and options are the same as those used when\n * calling `navigator.serviceWorker.register(scriptURL, options)`. See:\n * https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerContainer/register\n *\n * @param {string} scriptURL The service worker script associated with this\n * instance.\n * @param {Object} [registerOptions] The service worker options associated\n * with this instance.\n */\n constructor(scriptURL, registerOptions = {}) {\n super();\n\n this._scriptURL = scriptURL;\n this._registerOptions = registerOptions;\n this._updateFoundCount = 0;\n\n // Deferreds we can resolve later.\n this._swDeferred = new Deferred();\n this._activeDeferred = new Deferred();\n this._controllingDeferred = new Deferred();\n\n // Bind event handler callbacks.\n this._onMessage = this._onMessage.bind(this);\n this._onStateChange = this._onStateChange.bind(this);\n this._onUpdateFound = this._onUpdateFound.bind(this);\n this._onControllerChange = this._onControllerChange.bind(this);\n }\n\n /**\n * Registers a service worker for this instances script URL and service\n * worker options. By default this method delays registration until after\n * the window has loaded.\n *\n * @param {Object} [options]\n * @param {Function} [options.immediate=false] Setting this to true will\n * register the service worker immediately, even if the window has\n * not loaded (not recommended).\n */\n async register({immediate = false} = {}) {\n if (process.env.NODE_ENV !== 'production') {\n if (this._registrationTime) {\n logger.error('Cannot re-register a Workbox instance after it has ' +\n 'been registered. Create a new instance instead.');\n return;\n }\n }\n\n if (!immediate && document.readyState !== 'complete') {\n await new Promise((res) => addEventListener('load', res));\n }\n\n // Set this flag to true if any service worker was controlling the page\n // at registration time.\n this._isUpdate = Boolean(navigator.serviceWorker.controller);\n\n // Before registering, attempt to determine if a SW is already controlling\n // the page, and if that SW script (and version, if specified) matches this\n // instance's script.\n this._compatibleControllingSW = this._getControllingSWIfCompatible();\n\n this._registration = await this._registerScript();\n\n // If we have a compatible controller, store the controller as the \"own\"\n // SW, resolve active/controlling deferreds and add necessary listeners.\n if (this._compatibleControllingSW) {\n this._sw = this._compatibleControllingSW;\n this._activeDeferred.resolve(this._compatibleControllingSW);\n this._controllingDeferred.resolve(this._compatibleControllingSW);\n\n this._reportWindowReady(this._compatibleControllingSW);\n this._compatibleControllingSW.addEventListener(\n 'statechange', this._onStateChange, {once: true});\n }\n\n // If there's a waiting service worker with a matching URL before the\n // `updatefound` event fires, it likely means that this site is open\n // in another tab, or the user refreshed the page (and thus the prevoius\n // page wasn't fully unloaded before this page started loading).\n // https://developers.google.com/web/fundamentals/primers/service-workers/lifecycle#waiting\n const waitingSW = this._registration.waiting;\n if (waitingSW && urlsMatch(waitingSW.scriptURL, this._scriptURL)) {\n // Store the waiting SW as the \"own\" Sw, even if it means overwriting\n // a compatible controller.\n this._sw = waitingSW;\n\n // Run this in the next microtask, so any code that adds an event\n // listener after awaiting `register()` will get this event.\n Promise.resolve().then(() => {\n this.dispatchEvent(new WorkboxEvent('waiting', {\n sw: waitingSW,\n wasWaitingBeforeRegister: true,\n }));\n if (process.env.NODE_ENV !== 'production') {\n logger.warn('A service worker was already waiting to activate ' +\n 'before this script was registered...');\n }\n });\n }\n\n // If an \"own\" SW is already set, resolve the deferred.\n if (this._sw) {\n this._swDeferred.resolve(this._sw);\n }\n\n if (process.env.NODE_ENV !== 'production') {\n logger.log('Successfully registered service worker.', this._scriptURL);\n\n if (navigator.serviceWorker.controller) {\n if (this._compatibleControllingSW) {\n logger.debug('A service worker with the same script URL ' +\n 'is already controlling this page.');\n } else {\n logger.debug('A service worker with a different script URL is ' +\n 'currently controlling the page. The browser is now fetching ' +\n 'the new script now...');\n }\n }\n\n const currentPageIsOutOfScope = () => {\n const scopeURL = new URL(\n this._registerOptions.scope || this._scriptURL, document.baseURI);\n const scopeURLBasePath = new URL('./', scopeURL.href).pathname;\n return !location.pathname.startsWith(scopeURLBasePath);\n };\n if (currentPageIsOutOfScope()) {\n logger.warn('The current page is not in scope for the registered ' +\n 'service worker. Was this a mistake?');\n }\n }\n\n this._registration.addEventListener('updatefound', this._onUpdateFound);\n navigator.serviceWorker.addEventListener(\n 'controllerchange', this._onControllerChange, {once: true});\n\n // Add message listeners.\n if ('BroadcastChannel' in self) {\n this._broadcastChannel = new BroadcastChannel('workbox');\n this._broadcastChannel.addEventListener('message', this._onMessage);\n }\n navigator.serviceWorker.addEventListener('message', this._onMessage);\n\n return this._registration;\n }\n\n /**\n * Resolves to the service worker registered by this instance as soon as it\n * is active. If a service worker was already controlling at registration\n * time then it will resolve to that if the script URLs (and optionally\n * script versions) match, otherwise it will wait until an update is found\n * and activates.\n *\n * @return {Promise}\n */\n get active() {\n return this._activeDeferred.promise;\n }\n\n /**\n * Resolves to the service worker registered by this instance as soon as it\n * is controlling the page. If a service worker was already controlling at\n * registration time then it will resolve to that if the script URLs (and\n * optionally script versions) match, otherwise it will wait until an update\n * is found and starts controlling the page.\n * Note: the first time a service worker is installed it will active but\n * not start controlling the page unless `clients.claim()` is called in the\n * service worker.\n *\n * @return {Promise}\n */\n get controlling() {\n return this._controllingDeferred.promise;\n }\n\n /**\n * Resolves with a reference to a service worker that matches the script URL\n * of this instance, as soon as it's available.\n *\n * If, at registration time, there's already an active or waiting service\n * worker with a matching script URL, it will be used (with the waiting\n * service worker taking precedence over the active service worker if both\n * match, since the waiting service worker would have been registered more\n * recently).\n * If there's no matching active or waiting service worker at registration\n * time then the promise will not resolve until an update is found and starts\n * installing, at which point the installing service worker is used.\n *\n * @return {Promise}\n */\n async getSW() {\n // If `this._sw` is set, resolve with that as we want `getSW()` to\n // return the correct (new) service worker if an update is found.\n return this._sw || this._swDeferred.promise;\n }\n\n /**\n * Sends the passed data object to the service worker registered by this\n * instance (via [`getSW()`]{@link module:workbox-window.Workbox#getSW}) and resolves\n * with a response (if any).\n *\n * A response can be set in a message handler in the service worker by\n * calling `event.ports[0].postMessage(...)`, which will resolve the promise\n * returned by `messageSW()`. If no response is set, the promise will never\n * resolve.\n *\n * @param {Object} data An object to send to the service worker\n * @return {Promise}\n */\n async messageSW(data) {\n const sw = await this.getSW();\n return messageSW(sw, data);\n }\n\n /**\n * Checks for a service worker already controlling the page and returns\n * it if its script URL matchs.\n *\n * @private\n * @return {ServiceWorker|undefined}\n */\n _getControllingSWIfCompatible() {\n const controller = navigator.serviceWorker.controller;\n if (controller && urlsMatch(controller.scriptURL, this._scriptURL)) {\n return controller;\n }\n }\n\n /**\n * Registers a service worker for this instances script URL and register\n * options and tracks the time registration was complete.\n *\n * @private\n */\n async _registerScript() {\n try {\n const reg = await navigator.serviceWorker.register(\n this._scriptURL, this._registerOptions);\n\n // Keep track of when registration happened, so it can be used in the\n // `this._onUpdateFound` heuristic. Also use the presence of this\n // property as a way to see if `.register()` has been called.\n this._registrationTime = performance.now();\n\n return reg;\n } catch (error) {\n if (process.env.NODE_ENV !== 'production') {\n logger.error(error);\n }\n // Re-throw the error.\n throw error;\n }\n }\n\n\n /**\n * Sends a message to the passed service worker that the window is ready.\n *\n * @param {ServiceWorker} sw\n * @private\n */\n _reportWindowReady(sw) {\n messageSW(sw, {\n type: 'WINDOW_READY',\n meta: 'workbox-window',\n });\n }\n\n /**\n * @private\n */\n _onUpdateFound() {\n const installingSW = this._registration.installing;\n\n // If the script URL passed to `navigator.serviceWorker.register()` is\n // different from the current controlling SW's script URL, we know any\n // successful registration calls will trigger an `updatefound` event.\n // But if the registered script URL is the same as the current controlling\n // SW's script URL, we'll only get an `updatefound` event if the file\n // changed since it was last registered. This can be a problem if the user\n // opens up the same page in a different tab, and that page registers\n // a SW that triggers an update. It's a problem because this page has no\n // good way of knowing whether the `updatefound` event came from the SW\n // script it registered or from a registration attempt made by a newer\n // version of the page running in another tab.\n // To minimize the possibility of a false positive, we use the logic here:\n let updateLikelyTriggeredExternally =\n // Since we enforce only calling `register()` once, and since we don't\n // add the `updatefound` event listener until the `register()` call, if\n // `_updateFoundCount` is > 0 then it means this method has already\n // been called, thus this SW must be external\n this._updateFoundCount > 0 ||\n // If the script URL of the installing SW is different from this\n // instance's script URL, we know it's definitely not from our\n // registration.\n !urlsMatch(installingSW.scriptURL, this._scriptURL) ||\n // If all of the above are false, then we use a time-based heuristic:\n // Any `updatefound` event that occurs long after our registration is\n // assumed to be external.\n (performance.now() >\n this._registrationTime + REGISTRATION_TIMEOUT_DURATION) ?\n // If any of the above are not true, we assume the update was\n // triggered by this instance.\n true : false;\n\n if (updateLikelyTriggeredExternally) {\n this._externalSW = installingSW;\n this._registration.removeEventListener(\n 'updatefound', this._onUpdateFound);\n } else {\n // If the update was not triggered externally we know the installing\n // SW is the one we registered, so we set it.\n this._sw = installingSW;\n this._swDeferred.resolve(installingSW);\n\n // The `installing` state isn't something we have a dedicated\n // callback for, but we do log messages for it in development.\n if (process.env.NODE_ENV !== 'production') {\n if (navigator.serviceWorker.controller) {\n logger.log('Updated service worker found. Installing now...');\n } else {\n logger.log('Service worker is installing...');\n }\n }\n }\n\n // Increment the `updatefound` count, so future invocations of this\n // method can be sure they were triggered externally.\n ++this._updateFoundCount;\n\n // Add a `statechange` listener regardless of whether this update was\n // triggered externally, since we have callbacks for both.\n installingSW.addEventListener('statechange', this._onStateChange);\n }\n\n /**\n * @private\n * @param {Event} originalEvent\n */\n _onStateChange(originalEvent) {\n const sw = originalEvent.target;\n const {state} = sw;\n const isExternal = sw === this._externalSW;\n const eventPrefix = isExternal ? 'external' : '';\n\n const eventProps = {sw, originalEvent};\n if (!isExternal && this._isUpdate) {\n eventProps.isUpdate = true;\n }\n\n this.dispatchEvent(new WorkboxEvent(\n eventPrefix + state, eventProps));\n\n if (state === 'installed') {\n // This timeout is used to ignore cases where the service worker calls\n // `skipWaiting()` in the install event, thus moving it directly in the\n // activating state. (Since all service workers *must* go through the\n // waiting phase, the only way to detect `skipWaiting()` called in the\n // install event is to observe that the time spent in the waiting phase\n // is very short.)\n // NOTE: we don't need separate timeouts for the own and external SWs\n // since they can't go through these phases at the same time.\n this._waitingTimeout = setTimeout(() => {\n // Ensure the SW is still waiting (it may now be redundant).\n if (state === 'installed' && this._registration.waiting === sw) {\n this.dispatchEvent(new WorkboxEvent(\n eventPrefix + 'waiting', eventProps));\n\n if (process.env.NODE_ENV !== 'production') {\n if (isExternal) {\n logger.warn('An external service worker has installed but is ' +\n 'waiting for this client to close before activating...');\n } else {\n logger.warn('The service worker has installed but is waiting ' +\n 'for existing clients to close before activating...');\n }\n }\n }\n }, WAITING_TIMEOUT_DURATION);\n } else if (state === 'activating') {\n clearTimeout(this._waitingTimeout);\n if (!isExternal) {\n this._activeDeferred.resolve(sw);\n }\n }\n\n if (process.env.NODE_ENV !== 'production') {\n switch (state) {\n case 'installed':\n if (isExternal) {\n logger.warn('An external service worker has installed. ' +\n 'You may want to suggest users reload this page.');\n } else {\n logger.log('Registered service worker installed.');\n }\n break;\n case 'activated':\n if (isExternal) {\n logger.warn('An external service worker has activated.');\n } else {\n logger.log('Registered service worker activated.');\n if (sw !== navigator.serviceWorker.controller) {\n logger.warn('The registered service worker is active but ' +\n 'not yet controlling the page. Reload or run ' +\n '`clients.claim()` in the service worker.');\n }\n }\n break;\n case 'redundant':\n if (sw === this._compatibleControllingSW) {\n logger.log('Previously controlling service worker now redundant!');\n } else if (!isExternal) {\n logger.log('Registered service worker now redundant!');\n }\n break;\n }\n }\n }\n\n /**\n * @private\n * @param {Event} originalEvent\n */\n _onControllerChange(originalEvent) {\n const sw = this._sw;\n if (sw === navigator.serviceWorker.controller) {\n this.dispatchEvent(new WorkboxEvent('controlling', {sw, originalEvent}));\n if (process.env.NODE_ENV !== 'production') {\n logger.log('Registered service worker now controlling this page.');\n }\n this._controllingDeferred.resolve(sw);\n }\n }\n\n /**\n * @private\n * @param {Event} originalEvent\n */\n _onMessage(originalEvent) {\n const {data} = originalEvent;\n this.dispatchEvent(new WorkboxEvent('message', {data, originalEvent}));\n }\n}\n\n// The jsdoc comments below outline the events this instance may dispatch:\n// -----------------------------------------------------------------------\n\n/**\n * The `message` event is dispatched any time a `postMessage` (or a\n * `BroadcastChannel` message with the `workbox` channel name) is received.\n *\n * @event module:workbox-window.Workbox#message\n * @type {WorkboxEvent}\n * @property {*} data The `data` property from the original `message` event.\n * @property {Event} originalEvent The original [`message`]{@link https://developer.mozilla.org/en-US/docs/Web/API/MessageEvent}\n * event.\n * @property {string} type `message`.\n * @property {Workbox} target The `Workbox` instance.\n */\n\n/**\n * The `installed` event is dispatched if the state of a\n * [`Workbox`]{@link module:workbox-window.Workbox} instance's\n * [registered service worker]{@link https://developers.google.com/web/tools/workbox/modules/workbox-precaching#def-registered-sw}\n * changes to `installed`.\n *\n * Then can happen either the very first time a service worker is installed,\n * or after an update to the current service worker is found. In the case\n * of an update being found, the event's `isUpdate` property will be `true`.\n *\n * @event module:workbox-window.Workbox#installed\n * @type {WorkboxEvent}\n * @property {ServiceWorker} sw The service worker instance.\n * @property {Event} originalEvent The original [`statechange`]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorker/onstatechange}\n * event.\n * @property {boolean|undefined} isUpdate True if a service worker was already\n * controlling when this `Workbox` instance called `register()`.\n * @property {string} type `installed`.\n * @property {Workbox} target The `Workbox` instance.\n */\n\n/**\n * The `waiting` event is dispatched if the state of a\n * [`Workbox`]{@link module:workbox-window.Workbox} instance's\n * [registered service worker]{@link https://developers.google.com/web/tools/workbox/modules/workbox-precaching#def-registered-sw}\n * changes to `installed` and then doesn't immediately change to `activating`.\n * It may also be dispatched if a service worker with the same\n * [`scriptURL`]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorker/scriptURL}\n * was already waiting when the [`register()`]{@link module:workbox-window.Workbox#register}\n * method was called.\n *\n * @event module:workbox-window.Workbox#waiting\n * @type {WorkboxEvent}\n * @property {ServiceWorker} sw The service worker instance.\n * @property {Event} originalEvent The native `controllerchange` event\n * @property {boolean|undefined} isUpdate True if a service worker was already\n * controlling when this `Workbox` instance called `register()`.\n * @property {boolean|undefined} wasWaitingBeforeRegister True if a service worker with\n * a matching `scriptURL` was already waiting when this `Workbox`\n * instance called `register()`.\n * @property {string} type `waiting`.\n * @property {Workbox} target The `Workbox` instance.\n */\n\n/**\n * The `controlling` event is dispatched if a\n * [`controllerchange`]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerContainer/oncontrollerchange}\n * fires on the service worker [container]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerContainer}\n * and the [`scriptURL`]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorker/scriptURL}\n * of the new [controller]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerContainer/controller}\n * matches the `scriptURL` of the `Workbox` instance's\n * [registered service worker]{@link https://developers.google.com/web/tools/workbox/modules/workbox-precaching#def-registered-sw}.\n *\n * @event module:workbox-window.Workbox#controlling\n * @type {WorkboxEvent}\n * @property {ServiceWorker} sw The service worker instance.\n * @property {Event} originalEvent The original [`controllerchange`]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerContainer/oncontrollerchange}\n * event.\n * @property {boolean|undefined} isUpdate True if a service worker was already\n * controlling when this service worker was registered.\n * @property {string} type `controlling`.\n * @property {Workbox} target The `Workbox` instance.\n */\n\n/**\n * The `activated` event is dispatched if the state of a\n * [`Workbox`]{@link module:workbox-window.Workbox} instance's\n * [registered service worker]{@link https://developers.google.com/web/tools/workbox/modules/workbox-precaching#def-registered-sw}\n * changes to `activated`.\n *\n * @event module:workbox-window.Workbox#activated\n * @type {WorkboxEvent}\n * @property {ServiceWorker} sw The service worker instance.\n * @property {Event} originalEvent The original [`statechange`]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorker/onstatechange}\n * event.\n * @property {boolean|undefined} isUpdate True if a service worker was already\n * controlling when this `Workbox` instance called `register()`.\n * @property {string} type `activated`.\n * @property {Workbox} target The `Workbox` instance.\n */\n\n/**\n * The `redundant` event is dispatched if the state of a\n * [`Workbox`]{@link module:workbox-window.Workbox} instance's\n * [registered service worker]{@link https://developers.google.com/web/tools/workbox/modules/workbox-precaching#def-registered-sw}\n * changes to `redundant`.\n *\n * @event module:workbox-window.Workbox#redundant\n * @type {WorkboxEvent}\n * @property {ServiceWorker} sw The service worker instance.\n * @property {Event} originalEvent The original [`statechange`]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorker/onstatechange}\n * event.\n * @property {boolean|undefined} isUpdate True if a service worker was already\n * controlling when this `Workbox` instance called `register()`.\n * @property {string} type `redundant`.\n * @property {Workbox} target The `Workbox` instance.\n */\n\n/**\n * The `externalinstalled` event is dispatched if the state of an\n * [external service worker]{@link https://developers.google.com/web/tools/workbox/modules/workbox-precaching#def-external-sw}\n * changes to `installed`.\n *\n * @event module:workbox-window.Workbox#externalinstalled\n * @type {WorkboxEvent}\n * @property {ServiceWorker} sw The service worker instance.\n * @property {Event} originalEvent The original [`statechange`]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorker/onstatechange}\n * event.\n * @property {string} type `externalinstalled`.\n * @property {Workbox} target The `Workbox` instance.\n */\n\n/**\n * The `externalwaiting` event is dispatched if the state of an\n * [external service worker]{@link https://developers.google.com/web/tools/workbox/modules/workbox-precaching#def-external-sw}\n * changes to `waiting`.\n *\n * @event module:workbox-window.Workbox#externalwaiting\n * @type {WorkboxEvent}\n * @property {ServiceWorker} sw The service worker instance.\n * @property {Event|undefined} originalEvent The original [`statechange`]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorker/onstatechange}\n * event.\n * @property {string} type `externalwaiting`.\n * @property {Workbox} target The `Workbox` instance.\n */\n\n/**\n * The `externalactivated` event is dispatched if the state of an\n * [external service worker]{@link https://developers.google.com/web/tools/workbox/modules/workbox-precaching#def-external-sw}\n * changes to `activated`.\n *\n * @event module:workbox-window.Workbox#externalactivated\n * @type {WorkboxEvent}\n * @property {ServiceWorker} sw The service worker instance.\n * @property {Event} originalEvent The original [`statechange`]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorker/onstatechange}\n * event.\n * @property {string} type `externalactivated`.\n * @property {Workbox} target The `Workbox` instance.\n */\n\nexport {Workbox};\n","/*\n Copyright 2019 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport {messageSW} from './messageSW.mjs';\nimport {Workbox} from './Workbox.mjs';\nimport './_version.mjs';\n\n\n/**\n * @module workbox-window\n */\nexport {\n Workbox,\n messageSW,\n};\n"],"names":["self","_","e","messageSW","sw","data","Promise","resolve","messageChannel","MessageChannel","port1","onmessage","evt","postMessage","port2","Deferred","promise","reject","logger","process","inGroup","methodToColorMap","debug","log","warn","error","groupCollapsed","groupEnd","print","method","args","test","navigator","userAgent","console","styles","logPrefix","join","api","Object","keys","EventTargetShim","_eventListenerRegistry","addEventListener","type","listener","_getEventListenersByType","add","removeEventListener","delete","dispatchEvent","event","target","forEach","Set","urlsMatch","url1","url2","URL","location","href","WorkboxEvent","props","assign","body","recover","result","then","f","i","arguments","length","apply","value","direct","WAITING_TIMEOUT_DURATION","REGISTRATION_TIMEOUT_DURATION","Workbox","scriptURL","registerOptions","_scriptURL","_registerOptions","_updateFoundCount","_swDeferred","_activeDeferred","_controllingDeferred","_onMessage","bind","_onStateChange","_onUpdateFound","_onControllerChange","register","immediate","_registrationTime","document","readyState","res","_isUpdate","Boolean","serviceWorker","controller","_compatibleControllingSW","_getControllingSWIfCompatible","_registerScript","_registration","_sw","_reportWindowReady","once","waitingSW","waiting","wasWaitingBeforeRegister","currentPageIsOutOfScope","scopeURL","scope","baseURI","scopeURLBasePath","pathname","startsWith","_broadcastChannel","BroadcastChannel","getSW","reg","performance","now","meta","installingSW","installing","updateLikelyTriggeredExternally","_externalSW","originalEvent","state","isExternal","eventPrefix","eventProps","isUpdate","_waitingTimeout","setTimeout","clearTimeout"],"mappings":";;;;;;EAAA,IAAG;EAACA,EAAAA,IAAI,CAAC,sBAAD,CAAJ,IAA8BC,CAAC,EAA/B;EAAkC,CAAtC,CAAsC,OAAMC,CAAN,EAAQ;;ECA9C;;;;;;;AAQA,EAGA;;;;;;;;;;;;;;;;AAeA,MAAMC,SAAS,GAAG,SAAZA,SAAY,CAACC,EAAD,EAAKC,IAAL,EAAc;EAC9B,SAAO,IAAIC,OAAJ,CAAY,UAACC,OAAD,EAAa;EAC9B,QAAIC,cAAc,GAAG,IAAIC,cAAJ,EAArB;;EACAD,IAAAA,cAAc,CAACE,KAAf,CAAqBC,SAArB,GAAiC,UAACC,GAAD;EAAA,aAASL,OAAO,CAACK,GAAG,CAACP,IAAL,CAAhB;EAAA,KAAjC;;EACAD,IAAAA,EAAE,CAACS,WAAH,CAAeR,IAAf,EAAqB,CAACG,cAAc,CAACM,KAAhB,CAArB;EACD,GAJM,CAAP;EAKD,CAND;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EC1BA,IAAG;EAACd,EAAAA,IAAI,CAAC,oBAAD,CAAJ,IAA4BC,CAAC,EAA7B;EAAgC,CAApC,CAAoC,OAAMC,CAAN,EAAQ;;ECA5C;;;;;;;AAQA,EAGA;;;;;;;;;AAQA,MAAaa,QAAb;EACE;;;EAGA,oBAAc;EAAA;;EACZ,OAAKC,OAAL,GAAe,IAAIV,OAAJ,CAAY,UAACC,OAAD,EAAUU,MAAV,EAAqB;EAC9C,IAAA,KAAI,CAACV,OAAL,GAAeA,OAAf;EACA,IAAA,KAAI,CAACU,MAAL,GAAcA,MAAd;EACD,G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;;;;;;WAIAmE,mDAAoBuC,eAAe;EACjC,QAAM7H,EAAE,GAAG,KAAKqG,GAAhB;;EACA,QAAIrG,EAAE,KAAK4B,SAAS,CAACmE,aAAV,CAAwBC,UAAnC,EAA+C;EAC7C,WAAKlD,aAAL,CAAmB,IAAIW,YAAJ,CAAiB,aAAjB,EAAgC;EAACzD,QAAAA,EAAE,EAAFA,EAAD;EAAK6H,QAAAA,aAAa,EAAbA;EAAL,OAAhC,CAAnB;;EACA,MAA2C;EACzC/G,QAAAA,MAAM,CAACK,GAAP,CAAW,sDAAX;EACD;;EACD,WAAK8D,oBAAL,CAA0B9E,OAA1B,CAAkCH,EAAlC;EACD;EACF;EAED;;;;;;WAIAkF,iCAAW2C,eAAe;EAAA,QACjB5H,IADiB,GACT4H,aADS,CACjB5H,IADiB;EAExB,SAAK6C,aAAL,CAAmB,IAAIW,YAAJ,CAAiB,SAAjB,EAA4B;EAACxD,MAAAA,IAAI,EAAJA,IAAD;EAAO4H,MAAAA,aAAa,EAAbA;EAAP,KAA5B,CAAnB;EACD;;;;0BA9RY;EACX,aAAO,KAAK7C,eAAL,CAAqBpE,OAA5B;EACD;EAED;;;;;;;;;;;;;;;0BAYkB;EAChB,aAAO,KAAKqE,oBAAL,CAA0BrE,OAAjC;EACD;;;;IA9KmByB;;EC1CtB;;;;;;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/workbox-v4.3.1/workbox-window.prod.es5.mjs b/workbox-v4.3.1/workbox-window.prod.es5.mjs new file mode 100644 index 0000000000..7d15b62014 --- /dev/null +++ b/workbox-v4.3.1/workbox-window.prod.es5.mjs @@ -0,0 +1,2 @@ +try{self["workbox:window:4.3.1"]&&_()}catch(n){}var n=function(n,t){return new Promise(function(i){var e=new MessageChannel;e.port1.onmessage=function(n){return i(n.data)},n.postMessage(t,[e.port2])})};function t(n,t){for(var i=0;i0||!r(n.scriptURL,this.t)||performance.now()>this.L+6e4?(this.W=n,this.B.removeEventListener("updatefound",this.g)):(this.O=n,this.u.resolve(n)),++this.o,n.addEventListener("statechange",this.l)},d.l=function(n){var t=this,i=n.target,e=i.state,r=i===this.W,u=r?"external":"",a={sw:i,originalEvent:n};!r&&this.p&&(a.isUpdate=!0),this.dispatchEvent(new o(u+e,a)),"installed"===e?this._=setTimeout(function(){"installed"===e&&t.B.waiting===i&&t.dispatchEvent(new o(u+"waiting",a))},200):"activating"===e&&(clearTimeout(this._),r||this.s.resolve(i))},d.m=function(n){var t=this.O;t===navigator.serviceWorker.controller&&(this.dispatchEvent(new o("controlling",{sw:t,originalEvent:n})),this.h.resolve(t))},d.v=function(n){var t=n.data;this.dispatchEvent(new o("message",{data:t,originalEvent:n}))},l=v,(w=[{key:"active",get:function(){return this.s.promise}},{key:"controlling",get:function(){return this.h.promise}}])&&t(l.prototype,w),g&&t(l,g),v}(function(){function n(){this.D={}}var t=n.prototype;return t.addEventListener=function(n,t){this.T(n).add(t)},t.removeEventListener=function(n,t){this.T(n).delete(t)},t.dispatchEvent=function(n){n.target=this,this.T(n.type).forEach(function(t){return t(n)})},t.T=function(n){return this.D[n]=this.D[n]||new Set},n}());export{c as Workbox,n as messageSW}; +//# sourceMappingURL=workbox-window.prod.es5.mjs.map diff --git a/workbox-v4.3.1/workbox-window.prod.es5.mjs.map b/workbox-v4.3.1/workbox-window.prod.es5.mjs.map new file mode 100644 index 0000000000..d7e18f76c7 --- /dev/null +++ b/workbox-v4.3.1/workbox-window.prod.es5.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"workbox-window.prod.es5.mjs","sources":["../_version.mjs","../messageSW.mjs","../../workbox-core/_version.mjs","../../workbox-core/_private/Deferred.mjs","../utils/urlsMatch.mjs","../utils/WorkboxEvent.mjs","../Workbox.mjs","../utils/EventTargetShim.mjs"],"sourcesContent":["try{self['workbox:window:4.3.1']&&_()}catch(e){}// eslint-disable-line","/*\n Copyright 2019 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport './_version.mjs';\n\n\n/**\n * Sends a data object to a service worker via `postMessage` and resolves with\n * a response (if any).\n *\n * A response can be set in a message handler in the service worker by\n * calling `event.ports[0].postMessage(...)`, which will resolve the promise\n * returned by `messageSW()`. If no response is set, the promise will not\n * resolve.\n *\n * @param {ServiceWorker} sw The service worker to send the message to.\n * @param {Object} data An object to send to the service worker.\n * @return {Promise}\n *\n * @memberof module:workbox-window\n */\nconst messageSW = (sw, data) => {\n return new Promise((resolve) => {\n let messageChannel = new MessageChannel();\n messageChannel.port1.onmessage = (evt) => resolve(evt.data);\n sw.postMessage(data, [messageChannel.port2]);\n });\n};\n\nexport {messageSW};\n","try{self['workbox:core:4.3.1']&&_()}catch(e){}// eslint-disable-line","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport '../_version.mjs';\n\n\n/**\n * The Deferred class composes Promises in a way that allows for them to be\n * resolved or rejected from outside the constructor. In most cases promises\n * should be used directly, but Deferreds can be necessary when the logic to\n * resolve a promise must be separate.\n *\n * @private\n */\nexport class Deferred {\n /**\n * Creates a promise and exposes its resolve and reject functions as methods.\n */\n constructor() {\n this.promise = new Promise((resolve, reject) => {\n this.resolve = resolve;\n this.reject = reject;\n });\n }\n}\n","/*\n Copyright 2019 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport '../_version.mjs';\n\n\n/**\n * Returns true if two URLs have the same `.href` property. The URLS can be\n * relative, and if they are the current location href is used to resolve URLs.\n *\n * @private\n * @param {string} url1\n * @param {string} url2\n * @return {boolean}\n */\nconst urlsMatch = (url1, url2) => {\n return new URL(url1, location).href === new URL(url2, location).href;\n};\n\nexport {urlsMatch};\n","/*\n Copyright 2019 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport '../_version.mjs';\n\n/**\n * A minimal `Event` subclass shim.\n * This doesn't *actually* subclass `Event` because not all browsers support\n * constructable `EventTarget`, and using a real `Event` will error.\n * @private\n */\nclass WorkboxEvent {\n /**\n * @param {string} type\n * @param {Object} props\n */\n constructor(type, props) {\n Object.assign(this, props, {type});\n }\n}\n\nexport {WorkboxEvent};\n","/*\n Copyright 2019 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport {Deferred} from 'workbox-core/_private/Deferred.mjs';\nimport {logger} from 'workbox-core/_private/logger.mjs';\nimport {messageSW} from './messageSW.mjs';\nimport {EventTargetShim} from './utils/EventTargetShim.mjs';\nimport {urlsMatch} from './utils/urlsMatch.mjs';\nimport {WorkboxEvent} from './utils/WorkboxEvent.mjs';\nimport './_version.mjs';\n\n\n// The time a SW must be in the waiting phase before we can conclude\n// `skipWaiting()` wasn't called. This 200 amount wasn't scientifically\n// chosen, but it seems to avoid false positives in my testing.\nconst WAITING_TIMEOUT_DURATION = 200;\n\n// The amount of time after a registration that we can reasonably conclude\n// that the registration didn't trigger an update.\nconst REGISTRATION_TIMEOUT_DURATION = 60000;\n\n/**\n * A class to aid in handling service worker registration, updates, and\n * reacting to service worker lifecycle events.\n *\n * @fires [message]{@link module:workbox-window.Workbox#message}\n * @fires [installed]{@link module:workbox-window.Workbox#installed}\n * @fires [waiting]{@link module:workbox-window.Workbox#waiting}\n * @fires [controlling]{@link module:workbox-window.Workbox#controlling}\n * @fires [activated]{@link module:workbox-window.Workbox#activated}\n * @fires [redundant]{@link module:workbox-window.Workbox#redundant}\n * @fires [externalinstalled]{@link module:workbox-window.Workbox#externalinstalled}\n * @fires [externalwaiting]{@link module:workbox-window.Workbox#externalwaiting}\n * @fires [externalactivated]{@link module:workbox-window.Workbox#externalactivated}\n *\n * @memberof module:workbox-window\n */\nclass Workbox extends EventTargetShim {\n /**\n * Creates a new Workbox instance with a script URL and service worker\n * options. The script URL and options are the same as those used when\n * calling `navigator.serviceWorker.register(scriptURL, options)`. See:\n * https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerContainer/register\n *\n * @param {string} scriptURL The service worker script associated with this\n * instance.\n * @param {Object} [registerOptions] The service worker options associated\n * with this instance.\n */\n constructor(scriptURL, registerOptions = {}) {\n super();\n\n this._scriptURL = scriptURL;\n this._registerOptions = registerOptions;\n this._updateFoundCount = 0;\n\n // Deferreds we can resolve later.\n this._swDeferred = new Deferred();\n this._activeDeferred = new Deferred();\n this._controllingDeferred = new Deferred();\n\n // Bind event handler callbacks.\n this._onMessage = this._onMessage.bind(this);\n this._onStateChange = this._onStateChange.bind(this);\n this._onUpdateFound = this._onUpdateFound.bind(this);\n this._onControllerChange = this._onControllerChange.bind(this);\n }\n\n /**\n * Registers a service worker for this instances script URL and service\n * worker options. By default this method delays registration until after\n * the window has loaded.\n *\n * @param {Object} [options]\n * @param {Function} [options.immediate=false] Setting this to true will\n * register the service worker immediately, even if the window has\n * not loaded (not recommended).\n */\n async register({immediate = false} = {}) {\n if (process.env.NODE_ENV !== 'production') {\n if (this._registrationTime) {\n logger.error('Cannot re-register a Workbox instance after it has ' +\n 'been registered. Create a new instance instead.');\n return;\n }\n }\n\n if (!immediate && document.readyState !== 'complete') {\n await new Promise((res) => addEventListener('load', res));\n }\n\n // Set this flag to true if any service worker was controlling the page\n // at registration time.\n this._isUpdate = Boolean(navigator.serviceWorker.controller);\n\n // Before registering, attempt to determine if a SW is already controlling\n // the page, and if that SW script (and version, if specified) matches this\n // instance's script.\n this._compatibleControllingSW = this._getControllingSWIfCompatible();\n\n this._registration = await this._registerScript();\n\n // If we have a compatible controller, store the controller as the \"own\"\n // SW, resolve active/controlling deferreds and add necessary listeners.\n if (this._compatibleControllingSW) {\n this._sw = this._compatibleControllingSW;\n this._activeDeferred.resolve(this._compatibleControllingSW);\n this._controllingDeferred.resolve(this._compatibleControllingSW);\n\n this._reportWindowReady(this._compatibleControllingSW);\n this._compatibleControllingSW.addEventListener(\n 'statechange', this._onStateChange, {once: true});\n }\n\n // If there's a waiting service worker with a matching URL before the\n // `updatefound` event fires, it likely means that this site is open\n // in another tab, or the user refreshed the page (and thus the prevoius\n // page wasn't fully unloaded before this page started loading).\n // https://developers.google.com/web/fundamentals/primers/service-workers/lifecycle#waiting\n const waitingSW = this._registration.waiting;\n if (waitingSW && urlsMatch(waitingSW.scriptURL, this._scriptURL)) {\n // Store the waiting SW as the \"own\" Sw, even if it means overwriting\n // a compatible controller.\n this._sw = waitingSW;\n\n // Run this in the next microtask, so any code that adds an event\n // listener after awaiting `register()` will get this event.\n Promise.resolve().then(() => {\n this.dispatchEvent(new WorkboxEvent('waiting', {\n sw: waitingSW,\n wasWaitingBeforeRegister: true,\n }));\n if (process.env.NODE_ENV !== 'production') {\n logger.warn('A service worker was already waiting to activate ' +\n 'before this script was registered...');\n }\n });\n }\n\n // If an \"own\" SW is already set, resolve the deferred.\n if (this._sw) {\n this._swDeferred.resolve(this._sw);\n }\n\n if (process.env.NODE_ENV !== 'production') {\n logger.log('Successfully registered service worker.', this._scriptURL);\n\n if (navigator.serviceWorker.controller) {\n if (this._compatibleControllingSW) {\n logger.debug('A service worker with the same script URL ' +\n 'is already controlling this page.');\n } else {\n logger.debug('A service worker with a different script URL is ' +\n 'currently controlling the page. The browser is now fetching ' +\n 'the new script now...');\n }\n }\n\n const currentPageIsOutOfScope = () => {\n const scopeURL = new URL(\n this._registerOptions.scope || this._scriptURL, document.baseURI);\n const scopeURLBasePath = new URL('./', scopeURL.href).pathname;\n return !location.pathname.startsWith(scopeURLBasePath);\n };\n if (currentPageIsOutOfScope()) {\n logger.warn('The current page is not in scope for the registered ' +\n 'service worker. Was this a mistake?');\n }\n }\n\n this._registration.addEventListener('updatefound', this._onUpdateFound);\n navigator.serviceWorker.addEventListener(\n 'controllerchange', this._onControllerChange, {once: true});\n\n // Add message listeners.\n if ('BroadcastChannel' in self) {\n this._broadcastChannel = new BroadcastChannel('workbox');\n this._broadcastChannel.addEventListener('message', this._onMessage);\n }\n navigator.serviceWorker.addEventListener('message', this._onMessage);\n\n return this._registration;\n }\n\n /**\n * Resolves to the service worker registered by this instance as soon as it\n * is active. If a service worker was already controlling at registration\n * time then it will resolve to that if the script URLs (and optionally\n * script versions) match, otherwise it will wait until an update is found\n * and activates.\n *\n * @return {Promise}\n */\n get active() {\n return this._activeDeferred.promise;\n }\n\n /**\n * Resolves to the service worker registered by this instance as soon as it\n * is controlling the page. If a service worker was already controlling at\n * registration time then it will resolve to that if the script URLs (and\n * optionally script versions) match, otherwise it will wait until an update\n * is found and starts controlling the page.\n * Note: the first time a service worker is installed it will active but\n * not start controlling the page unless `clients.claim()` is called in the\n * service worker.\n *\n * @return {Promise}\n */\n get controlling() {\n return this._controllingDeferred.promise;\n }\n\n /**\n * Resolves with a reference to a service worker that matches the script URL\n * of this instance, as soon as it's available.\n *\n * If, at registration time, there's already an active or waiting service\n * worker with a matching script URL, it will be used (with the waiting\n * service worker taking precedence over the active service worker if both\n * match, since the waiting service worker would have been registered more\n * recently).\n * If there's no matching active or waiting service worker at registration\n * time then the promise will not resolve until an update is found and starts\n * installing, at which point the installing service worker is used.\n *\n * @return {Promise}\n */\n async getSW() {\n // If `this._sw` is set, resolve with that as we want `getSW()` to\n // return the correct (new) service worker if an update is found.\n return this._sw || this._swDeferred.promise;\n }\n\n /**\n * Sends the passed data object to the service worker registered by this\n * instance (via [`getSW()`]{@link module:workbox-window.Workbox#getSW}) and resolves\n * with a response (if any).\n *\n * A response can be set in a message handler in the service worker by\n * calling `event.ports[0].postMessage(...)`, which will resolve the promise\n * returned by `messageSW()`. If no response is set, the promise will never\n * resolve.\n *\n * @param {Object} data An object to send to the service worker\n * @return {Promise}\n */\n async messageSW(data) {\n const sw = await this.getSW();\n return messageSW(sw, data);\n }\n\n /**\n * Checks for a service worker already controlling the page and returns\n * it if its script URL matchs.\n *\n * @private\n * @return {ServiceWorker|undefined}\n */\n _getControllingSWIfCompatible() {\n const controller = navigator.serviceWorker.controller;\n if (controller && urlsMatch(controller.scriptURL, this._scriptURL)) {\n return controller;\n }\n }\n\n /**\n * Registers a service worker for this instances script URL and register\n * options and tracks the time registration was complete.\n *\n * @private\n */\n async _registerScript() {\n try {\n const reg = await navigator.serviceWorker.register(\n this._scriptURL, this._registerOptions);\n\n // Keep track of when registration happened, so it can be used in the\n // `this._onUpdateFound` heuristic. Also use the presence of this\n // property as a way to see if `.register()` has been called.\n this._registrationTime = performance.now();\n\n return reg;\n } catch (error) {\n if (process.env.NODE_ENV !== 'production') {\n logger.error(error);\n }\n // Re-throw the error.\n throw error;\n }\n }\n\n\n /**\n * Sends a message to the passed service worker that the window is ready.\n *\n * @param {ServiceWorker} sw\n * @private\n */\n _reportWindowReady(sw) {\n messageSW(sw, {\n type: 'WINDOW_READY',\n meta: 'workbox-window',\n });\n }\n\n /**\n * @private\n */\n _onUpdateFound() {\n const installingSW = this._registration.installing;\n\n // If the script URL passed to `navigator.serviceWorker.register()` is\n // different from the current controlling SW's script URL, we know any\n // successful registration calls will trigger an `updatefound` event.\n // But if the registered script URL is the same as the current controlling\n // SW's script URL, we'll only get an `updatefound` event if the file\n // changed since it was last registered. This can be a problem if the user\n // opens up the same page in a different tab, and that page registers\n // a SW that triggers an update. It's a problem because this page has no\n // good way of knowing whether the `updatefound` event came from the SW\n // script it registered or from a registration attempt made by a newer\n // version of the page running in another tab.\n // To minimize the possibility of a false positive, we use the logic here:\n let updateLikelyTriggeredExternally =\n // Since we enforce only calling `register()` once, and since we don't\n // add the `updatefound` event listener until the `register()` call, if\n // `_updateFoundCount` is > 0 then it means this method has already\n // been called, thus this SW must be external\n this._updateFoundCount > 0 ||\n // If the script URL of the installing SW is different from this\n // instance's script URL, we know it's definitely not from our\n // registration.\n !urlsMatch(installingSW.scriptURL, this._scriptURL) ||\n // If all of the above are false, then we use a time-based heuristic:\n // Any `updatefound` event that occurs long after our registration is\n // assumed to be external.\n (performance.now() >\n this._registrationTime + REGISTRATION_TIMEOUT_DURATION) ?\n // If any of the above are not true, we assume the update was\n // triggered by this instance.\n true : false;\n\n if (updateLikelyTriggeredExternally) {\n this._externalSW = installingSW;\n this._registration.removeEventListener(\n 'updatefound', this._onUpdateFound);\n } else {\n // If the update was not triggered externally we know the installing\n // SW is the one we registered, so we set it.\n this._sw = installingSW;\n this._swDeferred.resolve(installingSW);\n\n // The `installing` state isn't something we have a dedicated\n // callback for, but we do log messages for it in development.\n if (process.env.NODE_ENV !== 'production') {\n if (navigator.serviceWorker.controller) {\n logger.log('Updated service worker found. Installing now...');\n } else {\n logger.log('Service worker is installing...');\n }\n }\n }\n\n // Increment the `updatefound` count, so future invocations of this\n // method can be sure they were triggered externally.\n ++this._updateFoundCount;\n\n // Add a `statechange` listener regardless of whether this update was\n // triggered externally, since we have callbacks for both.\n installingSW.addEventListener('statechange', this._onStateChange);\n }\n\n /**\n * @private\n * @param {Event} originalEvent\n */\n _onStateChange(originalEvent) {\n const sw = originalEvent.target;\n const {state} = sw;\n const isExternal = sw === this._externalSW;\n const eventPrefix = isExternal ? 'external' : '';\n\n const eventProps = {sw, originalEvent};\n if (!isExternal && this._isUpdate) {\n eventProps.isUpdate = true;\n }\n\n this.dispatchEvent(new WorkboxEvent(\n eventPrefix + state, eventProps));\n\n if (state === 'installed') {\n // This timeout is used to ignore cases where the service worker calls\n // `skipWaiting()` in the install event, thus moving it directly in the\n // activating state. (Since all service workers *must* go through the\n // waiting phase, the only way to detect `skipWaiting()` called in the\n // install event is to observe that the time spent in the waiting phase\n // is very short.)\n // NOTE: we don't need separate timeouts for the own and external SWs\n // since they can't go through these phases at the same time.\n this._waitingTimeout = setTimeout(() => {\n // Ensure the SW is still waiting (it may now be redundant).\n if (state === 'installed' && this._registration.waiting === sw) {\n this.dispatchEvent(new WorkboxEvent(\n eventPrefix + 'waiting', eventProps));\n\n if (process.env.NODE_ENV !== 'production') {\n if (isExternal) {\n logger.warn('An external service worker has installed but is ' +\n 'waiting for this client to close before activating...');\n } else {\n logger.warn('The service worker has installed but is waiting ' +\n 'for existing clients to close before activating...');\n }\n }\n }\n }, WAITING_TIMEOUT_DURATION);\n } else if (state === 'activating') {\n clearTimeout(this._waitingTimeout);\n if (!isExternal) {\n this._activeDeferred.resolve(sw);\n }\n }\n\n if (process.env.NODE_ENV !== 'production') {\n switch (state) {\n case 'installed':\n if (isExternal) {\n logger.warn('An external service worker has installed. ' +\n 'You may want to suggest users reload this page.');\n } else {\n logger.log('Registered service worker installed.');\n }\n break;\n case 'activated':\n if (isExternal) {\n logger.warn('An external service worker has activated.');\n } else {\n logger.log('Registered service worker activated.');\n if (sw !== navigator.serviceWorker.controller) {\n logger.warn('The registered service worker is active but ' +\n 'not yet controlling the page. Reload or run ' +\n '`clients.claim()` in the service worker.');\n }\n }\n break;\n case 'redundant':\n if (sw === this._compatibleControllingSW) {\n logger.log('Previously controlling service worker now redundant!');\n } else if (!isExternal) {\n logger.log('Registered service worker now redundant!');\n }\n break;\n }\n }\n }\n\n /**\n * @private\n * @param {Event} originalEvent\n */\n _onControllerChange(originalEvent) {\n const sw = this._sw;\n if (sw === navigator.serviceWorker.controller) {\n this.dispatchEvent(new WorkboxEvent('controlling', {sw, originalEvent}));\n if (process.env.NODE_ENV !== 'production') {\n logger.log('Registered service worker now controlling this page.');\n }\n this._controllingDeferred.resolve(sw);\n }\n }\n\n /**\n * @private\n * @param {Event} originalEvent\n */\n _onMessage(originalEvent) {\n const {data} = originalEvent;\n this.dispatchEvent(new WorkboxEvent('message', {data, originalEvent}));\n }\n}\n\n// The jsdoc comments below outline the events this instance may dispatch:\n// -----------------------------------------------------------------------\n\n/**\n * The `message` event is dispatched any time a `postMessage` (or a\n * `BroadcastChannel` message with the `workbox` channel name) is received.\n *\n * @event module:workbox-window.Workbox#message\n * @type {WorkboxEvent}\n * @property {*} data The `data` property from the original `message` event.\n * @property {Event} originalEvent The original [`message`]{@link https://developer.mozilla.org/en-US/docs/Web/API/MessageEvent}\n * event.\n * @property {string} type `message`.\n * @property {Workbox} target The `Workbox` instance.\n */\n\n/**\n * The `installed` event is dispatched if the state of a\n * [`Workbox`]{@link module:workbox-window.Workbox} instance's\n * [registered service worker]{@link https://developers.google.com/web/tools/workbox/modules/workbox-precaching#def-registered-sw}\n * changes to `installed`.\n *\n * Then can happen either the very first time a service worker is installed,\n * or after an update to the current service worker is found. In the case\n * of an update being found, the event's `isUpdate` property will be `true`.\n *\n * @event module:workbox-window.Workbox#installed\n * @type {WorkboxEvent}\n * @property {ServiceWorker} sw The service worker instance.\n * @property {Event} originalEvent The original [`statechange`]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorker/onstatechange}\n * event.\n * @property {boolean|undefined} isUpdate True if a service worker was already\n * controlling when this `Workbox` instance called `register()`.\n * @property {string} type `installed`.\n * @property {Workbox} target The `Workbox` instance.\n */\n\n/**\n * The `waiting` event is dispatched if the state of a\n * [`Workbox`]{@link module:workbox-window.Workbox} instance's\n * [registered service worker]{@link https://developers.google.com/web/tools/workbox/modules/workbox-precaching#def-registered-sw}\n * changes to `installed` and then doesn't immediately change to `activating`.\n * It may also be dispatched if a service worker with the same\n * [`scriptURL`]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorker/scriptURL}\n * was already waiting when the [`register()`]{@link module:workbox-window.Workbox#register}\n * method was called.\n *\n * @event module:workbox-window.Workbox#waiting\n * @type {WorkboxEvent}\n * @property {ServiceWorker} sw The service worker instance.\n * @property {Event} originalEvent The native `controllerchange` event\n * @property {boolean|undefined} isUpdate True if a service worker was already\n * controlling when this `Workbox` instance called `register()`.\n * @property {boolean|undefined} wasWaitingBeforeRegister True if a service worker with\n * a matching `scriptURL` was already waiting when this `Workbox`\n * instance called `register()`.\n * @property {string} type `waiting`.\n * @property {Workbox} target The `Workbox` instance.\n */\n\n/**\n * The `controlling` event is dispatched if a\n * [`controllerchange`]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerContainer/oncontrollerchange}\n * fires on the service worker [container]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerContainer}\n * and the [`scriptURL`]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorker/scriptURL}\n * of the new [controller]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerContainer/controller}\n * matches the `scriptURL` of the `Workbox` instance's\n * [registered service worker]{@link https://developers.google.com/web/tools/workbox/modules/workbox-precaching#def-registered-sw}.\n *\n * @event module:workbox-window.Workbox#controlling\n * @type {WorkboxEvent}\n * @property {ServiceWorker} sw The service worker instance.\n * @property {Event} originalEvent The original [`controllerchange`]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerContainer/oncontrollerchange}\n * event.\n * @property {boolean|undefined} isUpdate True if a service worker was already\n * controlling when this service worker was registered.\n * @property {string} type `controlling`.\n * @property {Workbox} target The `Workbox` instance.\n */\n\n/**\n * The `activated` event is dispatched if the state of a\n * [`Workbox`]{@link module:workbox-window.Workbox} instance's\n * [registered service worker]{@link https://developers.google.com/web/tools/workbox/modules/workbox-precaching#def-registered-sw}\n * changes to `activated`.\n *\n * @event module:workbox-window.Workbox#activated\n * @type {WorkboxEvent}\n * @property {ServiceWorker} sw The service worker instance.\n * @property {Event} originalEvent The original [`statechange`]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorker/onstatechange}\n * event.\n * @property {boolean|undefined} isUpdate True if a service worker was already\n * controlling when this `Workbox` instance called `register()`.\n * @property {string} type `activated`.\n * @property {Workbox} target The `Workbox` instance.\n */\n\n/**\n * The `redundant` event is dispatched if the state of a\n * [`Workbox`]{@link module:workbox-window.Workbox} instance's\n * [registered service worker]{@link https://developers.google.com/web/tools/workbox/modules/workbox-precaching#def-registered-sw}\n * changes to `redundant`.\n *\n * @event module:workbox-window.Workbox#redundant\n * @type {WorkboxEvent}\n * @property {ServiceWorker} sw The service worker instance.\n * @property {Event} originalEvent The original [`statechange`]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorker/onstatechange}\n * event.\n * @property {boolean|undefined} isUpdate True if a service worker was already\n * controlling when this `Workbox` instance called `register()`.\n * @property {string} type `redundant`.\n * @property {Workbox} target The `Workbox` instance.\n */\n\n/**\n * The `externalinstalled` event is dispatched if the state of an\n * [external service worker]{@link https://developers.google.com/web/tools/workbox/modules/workbox-precaching#def-external-sw}\n * changes to `installed`.\n *\n * @event module:workbox-window.Workbox#externalinstalled\n * @type {WorkboxEvent}\n * @property {ServiceWorker} sw The service worker instance.\n * @property {Event} originalEvent The original [`statechange`]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorker/onstatechange}\n * event.\n * @property {string} type `externalinstalled`.\n * @property {Workbox} target The `Workbox` instance.\n */\n\n/**\n * The `externalwaiting` event is dispatched if the state of an\n * [external service worker]{@link https://developers.google.com/web/tools/workbox/modules/workbox-precaching#def-external-sw}\n * changes to `waiting`.\n *\n * @event module:workbox-window.Workbox#externalwaiting\n * @type {WorkboxEvent}\n * @property {ServiceWorker} sw The service worker instance.\n * @property {Event|undefined} originalEvent The original [`statechange`]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorker/onstatechange}\n * event.\n * @property {string} type `externalwaiting`.\n * @property {Workbox} target The `Workbox` instance.\n */\n\n/**\n * The `externalactivated` event is dispatched if the state of an\n * [external service worker]{@link https://developers.google.com/web/tools/workbox/modules/workbox-precaching#def-external-sw}\n * changes to `activated`.\n *\n * @event module:workbox-window.Workbox#externalactivated\n * @type {WorkboxEvent}\n * @property {ServiceWorker} sw The service worker instance.\n * @property {Event} originalEvent The original [`statechange`]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorker/onstatechange}\n * event.\n * @property {string} type `externalactivated`.\n * @property {Workbox} target The `Workbox` instance.\n */\n\nexport {Workbox};\n","/*\n Copyright 2019 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport '../_version.mjs';\n\n\n/**\n * A minimal `EventTarget` shim.\n * This is necessary because not all browsers support constructable\n * `EventTarget`, so using a real `EventTarget` will error.\n * @private\n */\nclass EventTargetShim {\n /**\n * Creates an event listener registry\n *\n * @private\n */\n constructor() {\n // A registry of event types to listeners.\n this._eventListenerRegistry = {};\n }\n /**\n * @param {string} type\n * @param {Function} listener\n * @private\n */\n addEventListener(type, listener) {\n this._getEventListenersByType(type).add(listener);\n }\n\n /**\n * @param {string} type\n * @param {Function} listener\n * @private\n */\n removeEventListener(type, listener) {\n this._getEventListenersByType(type).delete(listener);\n }\n\n /**\n * @param {Event} event\n * @private\n */\n dispatchEvent(event) {\n event.target = this;\n this._getEventListenersByType(event.type).forEach(\n (listener) => listener(event));\n }\n\n /**\n * Returns a Set of listeners associated with the passed event type.\n * If no handlers have been registered, an empty Set is returned.\n *\n * @param {string} type The event type.\n * @return {Set} An array of handler functions.\n * @private\n */\n _getEventListenersByType(type) {\n return this._eventListenerRegistry[type] =\n (this._eventListenerRegistry[type] || new Set());\n }\n}\n\nexport {EventTargetShim};\n"],"names":["self","_","e","messageSW","sw","data","Promise","resolve","messageChannel","MessageChannel","port1","onmessage","evt","postMessage","port2","Deferred","promise","reject","_this","urlsMatch","url1","url2","URL","location","href","WorkboxEvent","type","props","Object","assign","this","f","args","i","arguments","length","apply","value","then","direct","Workbox","scriptURL","registerOptions","_scriptURL","_registerOptions","_updateFoundCount","_swDeferred","_activeDeferred","_controllingDeferred","_onMessage","bind","_onStateChange","_onUpdateFound","_onControllerChange","register","result","immediate","_isUpdate","Boolean","navigator","serviceWorker","controller","_compatibleControllingSW","_this2","_getControllingSWIfCompatible","_registerScript","_registration","_sw","_reportWindowReady","addEventListener","once","waitingSW","waiting","dispatchEvent","wasWaitingBeforeRegister","_broadcastChannel","BroadcastChannel","document","readyState","res","body","getSW","recover","_this5","reg","_registrationTime","performance","now","error","meta","installingSW","installing","_externalSW","removeEventListener","originalEvent","target","state","isExternal","eventPrefix","eventProps","isUpdate","_waitingTimeout","setTimeout","_this6","clearTimeout","_eventListenerRegistry","listener","_getEventListenersByType","add","delete","event","forEach","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CAACrB,GAAAA,EAAI0F,cAAAA,UAInD9C,EAAqBzC,QAAQH,OAQtC6C,WAAW6C,OACFzF,EAAQyF,EAARzF,UACFoE,cAAc,IAAIhD,EAAa,UAAW,CAACpB,KAAAA,EAAMyF,cAAAA,kDA5R/ChE,KAAKiB,EAAgB/B,mDAgBrBc,KAAKkB,EAAqBhC,wEC9L5ByF,EAAyB,8BAOhCpC,0BAAiB3C,EAAMgF,QAChBC,EAAyBjF,GAAMkF,IAAIF,MAQ1Cb,6BAAoBnE,EAAMgF,QACnBC,EAAyBjF,GAAMmF,OAAOH,MAO7CjC,uBAAcqC,GACZA,EAAMf,OAASjE,UACV6E,EAAyBG,EAAMpF,MAAMqF,QACtC,SAACL,UAAaA,EAASI,QAW7BH,WAAyBjF,UAChBI,KAAK2E,EAAuB/E,GAC9BI,KAAK2E,EAAuB/E,IAAS,IAAIsF"} \ No newline at end of file diff --git a/workbox-v4.3.1/workbox-window.prod.mjs b/workbox-v4.3.1/workbox-window.prod.mjs new file mode 100644 index 0000000000..433ab7e4af --- /dev/null +++ b/workbox-v4.3.1/workbox-window.prod.mjs @@ -0,0 +1,2 @@ +try{self["workbox:window:4.3.1"]&&_()}catch(t){}const t=(t,s)=>new Promise(i=>{let e=new MessageChannel;e.port1.onmessage=(t=>i(t.data)),t.postMessage(s,[e.port2])});try{self["workbox:core:4.3.1"]&&_()}catch(t){}class s{constructor(){this.promise=new Promise((t,s)=>{this.resolve=t,this.reject=s})}}class i{constructor(){this.t={}}addEventListener(t,s){this.s(t).add(s)}removeEventListener(t,s){this.s(t).delete(s)}dispatchEvent(t){t.target=this,this.s(t.type).forEach(s=>s(t))}s(t){return this.t[t]=this.t[t]||new Set}}const e=(t,s)=>new URL(t,location).href===new URL(s,location).href;class n{constructor(t,s){Object.assign(this,s,{type:t})}}const h=200,a=6e4;class o extends i{constructor(t,i={}){super(),this.i=t,this.h=i,this.o=0,this.l=new s,this.g=new s,this.u=new s,this.m=this.m.bind(this),this.v=this.v.bind(this),this.p=this.p.bind(this),this._=this._.bind(this)}async register({immediate:t=!1}={}){t||"complete"===document.readyState||await new Promise(t=>addEventListener("load",t)),this.C=Boolean(navigator.serviceWorker.controller),this.W=this.L(),this.S=await this.B(),this.W&&(this.R=this.W,this.g.resolve(this.W),this.u.resolve(this.W),this.P(this.W),this.W.addEventListener("statechange",this.v,{once:!0}));const s=this.S.waiting;return s&&e(s.scriptURL,this.i)&&(this.R=s,Promise.resolve().then(()=>{this.dispatchEvent(new n("waiting",{sw:s,wasWaitingBeforeRegister:!0}))})),this.R&&this.l.resolve(this.R),this.S.addEventListener("updatefound",this.p),navigator.serviceWorker.addEventListener("controllerchange",this._,{once:!0}),"BroadcastChannel"in self&&(this.T=new BroadcastChannel("workbox"),this.T.addEventListener("message",this.m)),navigator.serviceWorker.addEventListener("message",this.m),this.S}get active(){return this.g.promise}get controlling(){return this.u.promise}async getSW(){return this.R||this.l.promise}async messageSW(s){const i=await this.getSW();return t(i,s)}L(){const t=navigator.serviceWorker.controller;if(t&&e(t.scriptURL,this.i))return t}async B(){try{const t=await navigator.serviceWorker.register(this.i,this.h);return this.U=performance.now(),t}catch(t){throw t}}P(s){t(s,{type:"WINDOW_READY",meta:"workbox-window"})}p(){const t=this.S.installing;this.o>0||!e(t.scriptURL,this.i)||performance.now()>this.U+a?(this.k=t,this.S.removeEventListener("updatefound",this.p)):(this.R=t,this.l.resolve(t)),++this.o,t.addEventListener("statechange",this.v)}v(t){const s=t.target,{state:i}=s,e=s===this.k,a=e?"external":"",o={sw:s,originalEvent:t};!e&&this.C&&(o.isUpdate=!0),this.dispatchEvent(new n(a+i,o)),"installed"===i?this.D=setTimeout(()=>{"installed"===i&&this.S.waiting===s&&this.dispatchEvent(new n(a+"waiting",o))},h):"activating"===i&&(clearTimeout(this.D),e||this.g.resolve(s))}_(t){const s=this.R;s===navigator.serviceWorker.controller&&(this.dispatchEvent(new n("controlling",{sw:s,originalEvent:t})),this.u.resolve(s))}m(t){const{data:s}=t;this.dispatchEvent(new n("message",{data:s,originalEvent:t}))}}export{o as Workbox,t as messageSW}; +//# sourceMappingURL=workbox-window.prod.mjs.map diff --git a/workbox-v4.3.1/workbox-window.prod.mjs.map b/workbox-v4.3.1/workbox-window.prod.mjs.map new file mode 100644 index 0000000000..e4febb0996 --- /dev/null +++ b/workbox-v4.3.1/workbox-window.prod.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"workbox-window.prod.mjs","sources":["../_version.mjs","../messageSW.mjs","../../workbox-core/_version.mjs","../../workbox-core/_private/Deferred.mjs","../utils/EventTargetShim.mjs","../utils/urlsMatch.mjs","../utils/WorkboxEvent.mjs","../Workbox.mjs"],"sourcesContent":["try{self['workbox:window:4.3.1']&&_()}catch(e){}// eslint-disable-line","/*\n Copyright 2019 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport './_version.mjs';\n\n\n/**\n * Sends a data object to a service worker via `postMessage` and resolves with\n * a response (if any).\n *\n * A response can be set in a message handler in the service worker by\n * calling `event.ports[0].postMessage(...)`, which will resolve the promise\n * returned by `messageSW()`. If no response is set, the promise will not\n * resolve.\n *\n * @param {ServiceWorker} sw The service worker to send the message to.\n * @param {Object} data An object to send to the service worker.\n * @return {Promise}\n *\n * @memberof module:workbox-window\n */\nconst messageSW = (sw, data) => {\n return new Promise((resolve) => {\n let messageChannel = new MessageChannel();\n messageChannel.port1.onmessage = (evt) => resolve(evt.data);\n sw.postMessage(data, [messageChannel.port2]);\n });\n};\n\nexport {messageSW};\n","try{self['workbox:core:4.3.1']&&_()}catch(e){}// eslint-disable-line","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport '../_version.mjs';\n\n\n/**\n * The Deferred class composes Promises in a way that allows for them to be\n * resolved or rejected from outside the constructor. In most cases promises\n * should be used directly, but Deferreds can be necessary when the logic to\n * resolve a promise must be separate.\n *\n * @private\n */\nexport class Deferred {\n /**\n * Creates a promise and exposes its resolve and reject functions as methods.\n */\n constructor() {\n this.promise = new Promise((resolve, reject) => {\n this.resolve = resolve;\n this.reject = reject;\n });\n }\n}\n","/*\n Copyright 2019 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport '../_version.mjs';\n\n\n/**\n * A minimal `EventTarget` shim.\n * This is necessary because not all browsers support constructable\n * `EventTarget`, so using a real `EventTarget` will error.\n * @private\n */\nclass EventTargetShim {\n /**\n * Creates an event listener registry\n *\n * @private\n */\n constructor() {\n // A registry of event types to listeners.\n this._eventListenerRegistry = {};\n }\n /**\n * @param {string} type\n * @param {Function} listener\n * @private\n */\n addEventListener(type, listener) {\n this._getEventListenersByType(type).add(listener);\n }\n\n /**\n * @param {string} type\n * @param {Function} listener\n * @private\n */\n removeEventListener(type, listener) {\n this._getEventListenersByType(type).delete(listener);\n }\n\n /**\n * @param {Event} event\n * @private\n */\n dispatchEvent(event) {\n event.target = this;\n this._getEventListenersByType(event.type).forEach(\n (listener) => listener(event));\n }\n\n /**\n * Returns a Set of listeners associated with the passed event type.\n * If no handlers have been registered, an empty Set is returned.\n *\n * @param {string} type The event type.\n * @return {Set} An array of handler functions.\n * @private\n */\n _getEventListenersByType(type) {\n return this._eventListenerRegistry[type] =\n (this._eventListenerRegistry[type] || new Set());\n }\n}\n\nexport {EventTargetShim};\n","/*\n Copyright 2019 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport '../_version.mjs';\n\n\n/**\n * Returns true if two URLs have the same `.href` property. The URLS can be\n * relative, and if they are the current location href is used to resolve URLs.\n *\n * @private\n * @param {string} url1\n * @param {string} url2\n * @return {boolean}\n */\nconst urlsMatch = (url1, url2) => {\n return new URL(url1, location).href === new URL(url2, location).href;\n};\n\nexport {urlsMatch};\n","/*\n Copyright 2019 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport '../_version.mjs';\n\n/**\n * A minimal `Event` subclass shim.\n * This doesn't *actually* subclass `Event` because not all browsers support\n * constructable `EventTarget`, and using a real `Event` will error.\n * @private\n */\nclass WorkboxEvent {\n /**\n * @param {string} type\n * @param {Object} props\n */\n constructor(type, props) {\n Object.assign(this, props, {type});\n }\n}\n\nexport {WorkboxEvent};\n","/*\n Copyright 2019 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport {Deferred} from 'workbox-core/_private/Deferred.mjs';\nimport {logger} from 'workbox-core/_private/logger.mjs';\nimport {messageSW} from './messageSW.mjs';\nimport {EventTargetShim} from './utils/EventTargetShim.mjs';\nimport {urlsMatch} from './utils/urlsMatch.mjs';\nimport {WorkboxEvent} from './utils/WorkboxEvent.mjs';\nimport './_version.mjs';\n\n\n// The time a SW must be in the waiting phase before we can conclude\n// `skipWaiting()` wasn't called. This 200 amount wasn't scientifically\n// chosen, but it seems to avoid false positives in my testing.\nconst WAITING_TIMEOUT_DURATION = 200;\n\n// The amount of time after a registration that we can reasonably conclude\n// that the registration didn't trigger an update.\nconst REGISTRATION_TIMEOUT_DURATION = 60000;\n\n/**\n * A class to aid in handling service worker registration, updates, and\n * reacting to service worker lifecycle events.\n *\n * @fires [message]{@link module:workbox-window.Workbox#message}\n * @fires [installed]{@link module:workbox-window.Workbox#installed}\n * @fires [waiting]{@link module:workbox-window.Workbox#waiting}\n * @fires [controlling]{@link module:workbox-window.Workbox#controlling}\n * @fires [activated]{@link module:workbox-window.Workbox#activated}\n * @fires [redundant]{@link module:workbox-window.Workbox#redundant}\n * @fires [externalinstalled]{@link module:workbox-window.Workbox#externalinstalled}\n * @fires [externalwaiting]{@link module:workbox-window.Workbox#externalwaiting}\n * @fires [externalactivated]{@link module:workbox-window.Workbox#externalactivated}\n *\n * @memberof module:workbox-window\n */\nclass Workbox extends EventTargetShim {\n /**\n * Creates a new Workbox instance with a script URL and service worker\n * options. The script URL and options are the same as those used when\n * calling `navigator.serviceWorker.register(scriptURL, options)`. See:\n * https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerContainer/register\n *\n * @param {string} scriptURL The service worker script associated with this\n * instance.\n * @param {Object} [registerOptions] The service worker options associated\n * with this instance.\n */\n constructor(scriptURL, registerOptions = {}) {\n super();\n\n this._scriptURL = scriptURL;\n this._registerOptions = registerOptions;\n this._updateFoundCount = 0;\n\n // Deferreds we can resolve later.\n this._swDeferred = new Deferred();\n this._activeDeferred = new Deferred();\n this._controllingDeferred = new Deferred();\n\n // Bind event handler callbacks.\n this._onMessage = this._onMessage.bind(this);\n this._onStateChange = this._onStateChange.bind(this);\n this._onUpdateFound = this._onUpdateFound.bind(this);\n this._onControllerChange = this._onControllerChange.bind(this);\n }\n\n /**\n * Registers a service worker for this instances script URL and service\n * worker options. By default this method delays registration until after\n * the window has loaded.\n *\n * @param {Object} [options]\n * @param {Function} [options.immediate=false] Setting this to true will\n * register the service worker immediately, even if the window has\n * not loaded (not recommended).\n */\n async register({immediate = false} = {}) {\n if (process.env.NODE_ENV !== 'production') {\n if (this._registrationTime) {\n logger.error('Cannot re-register a Workbox instance after it has ' +\n 'been registered. Create a new instance instead.');\n return;\n }\n }\n\n if (!immediate && document.readyState !== 'complete') {\n await new Promise((res) => addEventListener('load', res));\n }\n\n // Set this flag to true if any service worker was controlling the page\n // at registration time.\n this._isUpdate = Boolean(navigator.serviceWorker.controller);\n\n // Before registering, attempt to determine if a SW is already controlling\n // the page, and if that SW script (and version, if specified) matches this\n // instance's script.\n this._compatibleControllingSW = this._getControllingSWIfCompatible();\n\n this._registration = await this._registerScript();\n\n // If we have a compatible controller, store the controller as the \"own\"\n // SW, resolve active/controlling deferreds and add necessary listeners.\n if (this._compatibleControllingSW) {\n this._sw = this._compatibleControllingSW;\n this._activeDeferred.resolve(this._compatibleControllingSW);\n this._controllingDeferred.resolve(this._compatibleControllingSW);\n\n this._reportWindowReady(this._compatibleControllingSW);\n this._compatibleControllingSW.addEventListener(\n 'statechange', this._onStateChange, {once: true});\n }\n\n // If there's a waiting service worker with a matching URL before the\n // `updatefound` event fires, it likely means that this site is open\n // in another tab, or the user refreshed the page (and thus the prevoius\n // page wasn't fully unloaded before this page started loading).\n // https://developers.google.com/web/fundamentals/primers/service-workers/lifecycle#waiting\n const waitingSW = this._registration.waiting;\n if (waitingSW && urlsMatch(waitingSW.scriptURL, this._scriptURL)) {\n // Store the waiting SW as the \"own\" Sw, even if it means overwriting\n // a compatible controller.\n this._sw = waitingSW;\n\n // Run this in the next microtask, so any code that adds an event\n // listener after awaiting `register()` will get this event.\n Promise.resolve().then(() => {\n this.dispatchEvent(new WorkboxEvent('waiting', {\n sw: waitingSW,\n wasWaitingBeforeRegister: true,\n }));\n if (process.env.NODE_ENV !== 'production') {\n logger.warn('A service worker was already waiting to activate ' +\n 'before this script was registered...');\n }\n });\n }\n\n // If an \"own\" SW is already set, resolve the deferred.\n if (this._sw) {\n this._swDeferred.resolve(this._sw);\n }\n\n if (process.env.NODE_ENV !== 'production') {\n logger.log('Successfully registered service worker.', this._scriptURL);\n\n if (navigator.serviceWorker.controller) {\n if (this._compatibleControllingSW) {\n logger.debug('A service worker with the same script URL ' +\n 'is already controlling this page.');\n } else {\n logger.debug('A service worker with a different script URL is ' +\n 'currently controlling the page. The browser is now fetching ' +\n 'the new script now...');\n }\n }\n\n const currentPageIsOutOfScope = () => {\n const scopeURL = new URL(\n this._registerOptions.scope || this._scriptURL, document.baseURI);\n const scopeURLBasePath = new URL('./', scopeURL.href).pathname;\n return !location.pathname.startsWith(scopeURLBasePath);\n };\n if (currentPageIsOutOfScope()) {\n logger.warn('The current page is not in scope for the registered ' +\n 'service worker. Was this a mistake?');\n }\n }\n\n this._registration.addEventListener('updatefound', this._onUpdateFound);\n navigator.serviceWorker.addEventListener(\n 'controllerchange', this._onControllerChange, {once: true});\n\n // Add message listeners.\n if ('BroadcastChannel' in self) {\n this._broadcastChannel = new BroadcastChannel('workbox');\n this._broadcastChannel.addEventListener('message', this._onMessage);\n }\n navigator.serviceWorker.addEventListener('message', this._onMessage);\n\n return this._registration;\n }\n\n /**\n * Resolves to the service worker registered by this instance as soon as it\n * is active. If a service worker was already controlling at registration\n * time then it will resolve to that if the script URLs (and optionally\n * script versions) match, otherwise it will wait until an update is found\n * and activates.\n *\n * @return {Promise}\n */\n get active() {\n return this._activeDeferred.promise;\n }\n\n /**\n * Resolves to the service worker registered by this instance as soon as it\n * is controlling the page. If a service worker was already controlling at\n * registration time then it will resolve to that if the script URLs (and\n * optionally script versions) match, otherwise it will wait until an update\n * is found and starts controlling the page.\n * Note: the first time a service worker is installed it will active but\n * not start controlling the page unless `clients.claim()` is called in the\n * service worker.\n *\n * @return {Promise}\n */\n get controlling() {\n return this._controllingDeferred.promise;\n }\n\n /**\n * Resolves with a reference to a service worker that matches the script URL\n * of this instance, as soon as it's available.\n *\n * If, at registration time, there's already an active or waiting service\n * worker with a matching script URL, it will be used (with the waiting\n * service worker taking precedence over the active service worker if both\n * match, since the waiting service worker would have been registered more\n * recently).\n * If there's no matching active or waiting service worker at registration\n * time then the promise will not resolve until an update is found and starts\n * installing, at which point the installing service worker is used.\n *\n * @return {Promise}\n */\n async getSW() {\n // If `this._sw` is set, resolve with that as we want `getSW()` to\n // return the correct (new) service worker if an update is found.\n return this._sw || this._swDeferred.promise;\n }\n\n /**\n * Sends the passed data object to the service worker registered by this\n * instance (via [`getSW()`]{@link module:workbox-window.Workbox#getSW}) and resolves\n * with a response (if any).\n *\n * A response can be set in a message handler in the service worker by\n * calling `event.ports[0].postMessage(...)`, which will resolve the promise\n * returned by `messageSW()`. If no response is set, the promise will never\n * resolve.\n *\n * @param {Object} data An object to send to the service worker\n * @return {Promise}\n */\n async messageSW(data) {\n const sw = await this.getSW();\n return messageSW(sw, data);\n }\n\n /**\n * Checks for a service worker already controlling the page and returns\n * it if its script URL matchs.\n *\n * @private\n * @return {ServiceWorker|undefined}\n */\n _getControllingSWIfCompatible() {\n const controller = navigator.serviceWorker.controller;\n if (controller && urlsMatch(controller.scriptURL, this._scriptURL)) {\n return controller;\n }\n }\n\n /**\n * Registers a service worker for this instances script URL and register\n * options and tracks the time registration was complete.\n *\n * @private\n */\n async _registerScript() {\n try {\n const reg = await navigator.serviceWorker.register(\n this._scriptURL, this._registerOptions);\n\n // Keep track of when registration happened, so it can be used in the\n // `this._onUpdateFound` heuristic. Also use the presence of this\n // property as a way to see if `.register()` has been called.\n this._registrationTime = performance.now();\n\n return reg;\n } catch (error) {\n if (process.env.NODE_ENV !== 'production') {\n logger.error(error);\n }\n // Re-throw the error.\n throw error;\n }\n }\n\n\n /**\n * Sends a message to the passed service worker that the window is ready.\n *\n * @param {ServiceWorker} sw\n * @private\n */\n _reportWindowReady(sw) {\n messageSW(sw, {\n type: 'WINDOW_READY',\n meta: 'workbox-window',\n });\n }\n\n /**\n * @private\n */\n _onUpdateFound() {\n const installingSW = this._registration.installing;\n\n // If the script URL passed to `navigator.serviceWorker.register()` is\n // different from the current controlling SW's script URL, we know any\n // successful registration calls will trigger an `updatefound` event.\n // But if the registered script URL is the same as the current controlling\n // SW's script URL, we'll only get an `updatefound` event if the file\n // changed since it was last registered. This can be a problem if the user\n // opens up the same page in a different tab, and that page registers\n // a SW that triggers an update. It's a problem because this page has no\n // good way of knowing whether the `updatefound` event came from the SW\n // script it registered or from a registration attempt made by a newer\n // version of the page running in another tab.\n // To minimize the possibility of a false positive, we use the logic here:\n let updateLikelyTriggeredExternally =\n // Since we enforce only calling `register()` once, and since we don't\n // add the `updatefound` event listener until the `register()` call, if\n // `_updateFoundCount` is > 0 then it means this method has already\n // been called, thus this SW must be external\n this._updateFoundCount > 0 ||\n // If the script URL of the installing SW is different from this\n // instance's script URL, we know it's definitely not from our\n // registration.\n !urlsMatch(installingSW.scriptURL, this._scriptURL) ||\n // If all of the above are false, then we use a time-based heuristic:\n // Any `updatefound` event that occurs long after our registration is\n // assumed to be external.\n (performance.now() >\n this._registrationTime + REGISTRATION_TIMEOUT_DURATION) ?\n // If any of the above are not true, we assume the update was\n // triggered by this instance.\n true : false;\n\n if (updateLikelyTriggeredExternally) {\n this._externalSW = installingSW;\n this._registration.removeEventListener(\n 'updatefound', this._onUpdateFound);\n } else {\n // If the update was not triggered externally we know the installing\n // SW is the one we registered, so we set it.\n this._sw = installingSW;\n this._swDeferred.resolve(installingSW);\n\n // The `installing` state isn't something we have a dedicated\n // callback for, but we do log messages for it in development.\n if (process.env.NODE_ENV !== 'production') {\n if (navigator.serviceWorker.controller) {\n logger.log('Updated service worker found. Installing now...');\n } else {\n logger.log('Service worker is installing...');\n }\n }\n }\n\n // Increment the `updatefound` count, so future invocations of this\n // method can be sure they were triggered externally.\n ++this._updateFoundCount;\n\n // Add a `statechange` listener regardless of whether this update was\n // triggered externally, since we have callbacks for both.\n installingSW.addEventListener('statechange', this._onStateChange);\n }\n\n /**\n * @private\n * @param {Event} originalEvent\n */\n _onStateChange(originalEvent) {\n const sw = originalEvent.target;\n const {state} = sw;\n const isExternal = sw === this._externalSW;\n const eventPrefix = isExternal ? 'external' : '';\n\n const eventProps = {sw, originalEvent};\n if (!isExternal && this._isUpdate) {\n eventProps.isUpdate = true;\n }\n\n this.dispatchEvent(new WorkboxEvent(\n eventPrefix + state, eventProps));\n\n if (state === 'installed') {\n // This timeout is used to ignore cases where the service worker calls\n // `skipWaiting()` in the install event, thus moving it directly in the\n // activating state. (Since all service workers *must* go through the\n // waiting phase, the only way to detect `skipWaiting()` called in the\n // install event is to observe that the time spent in the waiting phase\n // is very short.)\n // NOTE: we don't need separate timeouts for the own and external SWs\n // since they can't go through these phases at the same time.\n this._waitingTimeout = setTimeout(() => {\n // Ensure the SW is still waiting (it may now be redundant).\n if (state === 'installed' && this._registration.waiting === sw) {\n this.dispatchEvent(new WorkboxEvent(\n eventPrefix + 'waiting', eventProps));\n\n if (process.env.NODE_ENV !== 'production') {\n if (isExternal) {\n logger.warn('An external service worker has installed but is ' +\n 'waiting for this client to close before activating...');\n } else {\n logger.warn('The service worker has installed but is waiting ' +\n 'for existing clients to close before activating...');\n }\n }\n }\n }, WAITING_TIMEOUT_DURATION);\n } else if (state === 'activating') {\n clearTimeout(this._waitingTimeout);\n if (!isExternal) {\n this._activeDeferred.resolve(sw);\n }\n }\n\n if (process.env.NODE_ENV !== 'production') {\n switch (state) {\n case 'installed':\n if (isExternal) {\n logger.warn('An external service worker has installed. ' +\n 'You may want to suggest users reload this page.');\n } else {\n logger.log('Registered service worker installed.');\n }\n break;\n case 'activated':\n if (isExternal) {\n logger.warn('An external service worker has activated.');\n } else {\n logger.log('Registered service worker activated.');\n if (sw !== navigator.serviceWorker.controller) {\n logger.warn('The registered service worker is active but ' +\n 'not yet controlling the page. Reload or run ' +\n '`clients.claim()` in the service worker.');\n }\n }\n break;\n case 'redundant':\n if (sw === this._compatibleControllingSW) {\n logger.log('Previously controlling service worker now redundant!');\n } else if (!isExternal) {\n logger.log('Registered service worker now redundant!');\n }\n break;\n }\n }\n }\n\n /**\n * @private\n * @param {Event} originalEvent\n */\n _onControllerChange(originalEvent) {\n const sw = this._sw;\n if (sw === navigator.serviceWorker.controller) {\n this.dispatchEvent(new WorkboxEvent('controlling', {sw, originalEvent}));\n if (process.env.NODE_ENV !== 'production') {\n logger.log('Registered service worker now controlling this page.');\n }\n this._controllingDeferred.resolve(sw);\n }\n }\n\n /**\n * @private\n * @param {Event} originalEvent\n */\n _onMessage(originalEvent) {\n const {data} = originalEvent;\n this.dispatchEvent(new WorkboxEvent('message', {data, originalEvent}));\n }\n}\n\n// The jsdoc comments below outline the events this instance may dispatch:\n// -----------------------------------------------------------------------\n\n/**\n * The `message` event is dispatched any time a `postMessage` (or a\n * `BroadcastChannel` message with the `workbox` channel name) is received.\n *\n * @event module:workbox-window.Workbox#message\n * @type {WorkboxEvent}\n * @property {*} data The `data` property from the original `message` event.\n * @property {Event} originalEvent The original [`message`]{@link https://developer.mozilla.org/en-US/docs/Web/API/MessageEvent}\n * event.\n * @property {string} type `message`.\n * @property {Workbox} target The `Workbox` instance.\n */\n\n/**\n * The `installed` event is dispatched if the state of a\n * [`Workbox`]{@link module:workbox-window.Workbox} instance's\n * [registered service worker]{@link https://developers.google.com/web/tools/workbox/modules/workbox-precaching#def-registered-sw}\n * changes to `installed`.\n *\n * Then can happen either the very first time a service worker is installed,\n * or after an update to the current service worker is found. In the case\n * of an update being found, the event's `isUpdate` property will be `true`.\n *\n * @event module:workbox-window.Workbox#installed\n * @type {WorkboxEvent}\n * @property {ServiceWorker} sw The service worker instance.\n * @property {Event} originalEvent The original [`statechange`]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorker/onstatechange}\n * event.\n * @property {boolean|undefined} isUpdate True if a service worker was already\n * controlling when this `Workbox` instance called `register()`.\n * @property {string} type `installed`.\n * @property {Workbox} target The `Workbox` instance.\n */\n\n/**\n * The `waiting` event is dispatched if the state of a\n * [`Workbox`]{@link module:workbox-window.Workbox} instance's\n * [registered service worker]{@link https://developers.google.com/web/tools/workbox/modules/workbox-precaching#def-registered-sw}\n * changes to `installed` and then doesn't immediately change to `activating`.\n * It may also be dispatched if a service worker with the same\n * [`scriptURL`]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorker/scriptURL}\n * was already waiting when the [`register()`]{@link module:workbox-window.Workbox#register}\n * method was called.\n *\n * @event module:workbox-window.Workbox#waiting\n * @type {WorkboxEvent}\n * @property {ServiceWorker} sw The service worker instance.\n * @property {Event} originalEvent The native `controllerchange` event\n * @property {boolean|undefined} isUpdate True if a service worker was already\n * controlling when this `Workbox` instance called `register()`.\n * @property {boolean|undefined} wasWaitingBeforeRegister True if a service worker with\n * a matching `scriptURL` was already waiting when this `Workbox`\n * instance called `register()`.\n * @property {string} type `waiting`.\n * @property {Workbox} target The `Workbox` instance.\n */\n\n/**\n * The `controlling` event is dispatched if a\n * [`controllerchange`]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerContainer/oncontrollerchange}\n * fires on the service worker [container]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerContainer}\n * and the [`scriptURL`]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorker/scriptURL}\n * of the new [controller]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerContainer/controller}\n * matches the `scriptURL` of the `Workbox` instance's\n * [registered service worker]{@link https://developers.google.com/web/tools/workbox/modules/workbox-precaching#def-registered-sw}.\n *\n * @event module:workbox-window.Workbox#controlling\n * @type {WorkboxEvent}\n * @property {ServiceWorker} sw The service worker instance.\n * @property {Event} originalEvent The original [`controllerchange`]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerContainer/oncontrollerchange}\n * event.\n * @property {boolean|undefined} isUpdate True if a service worker was already\n * controlling when this service worker was registered.\n * @property {string} type `controlling`.\n * @property {Workbox} target The `Workbox` instance.\n */\n\n/**\n * The `activated` event is dispatched if the state of a\n * [`Workbox`]{@link module:workbox-window.Workbox} instance's\n * [registered service worker]{@link https://developers.google.com/web/tools/workbox/modules/workbox-precaching#def-registered-sw}\n * changes to `activated`.\n *\n * @event module:workbox-window.Workbox#activated\n * @type {WorkboxEvent}\n * @property {ServiceWorker} sw The service worker instance.\n * @property {Event} originalEvent The original [`statechange`]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorker/onstatechange}\n * event.\n * @property {boolean|undefined} isUpdate True if a service worker was already\n * controlling when this `Workbox` instance called `register()`.\n * @property {string} type `activated`.\n * @property {Workbox} target The `Workbox` instance.\n */\n\n/**\n * The `redundant` event is dispatched if the state of a\n * [`Workbox`]{@link module:workbox-window.Workbox} instance's\n * [registered service worker]{@link https://developers.google.com/web/tools/workbox/modules/workbox-precaching#def-registered-sw}\n * changes to `redundant`.\n *\n * @event module:workbox-window.Workbox#redundant\n * @type {WorkboxEvent}\n * @property {ServiceWorker} sw The service worker instance.\n * @property {Event} originalEvent The original [`statechange`]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorker/onstatechange}\n * event.\n * @property {boolean|undefined} isUpdate True if a service worker was already\n * controlling when this `Workbox` instance called `register()`.\n * @property {string} type `redundant`.\n * @property {Workbox} target The `Workbox` instance.\n */\n\n/**\n * The `externalinstalled` event is dispatched if the state of an\n * [external service worker]{@link https://developers.google.com/web/tools/workbox/modules/workbox-precaching#def-external-sw}\n * changes to `installed`.\n *\n * @event module:workbox-window.Workbox#externalinstalled\n * @type {WorkboxEvent}\n * @property {ServiceWorker} sw The service worker instance.\n * @property {Event} originalEvent The original [`statechange`]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorker/onstatechange}\n * event.\n * @property {string} type `externalinstalled`.\n * @property {Workbox} target The `Workbox` instance.\n */\n\n/**\n * The `externalwaiting` event is dispatched if the state of an\n * [external service worker]{@link https://developers.google.com/web/tools/workbox/modules/workbox-precaching#def-external-sw}\n * changes to `waiting`.\n *\n * @event module:workbox-window.Workbox#externalwaiting\n * @type {WorkboxEvent}\n * @property {ServiceWorker} sw The service worker instance.\n * @property {Event|undefined} originalEvent The original [`statechange`]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorker/onstatechange}\n * event.\n * @property {string} type `externalwaiting`.\n * @property {Workbox} target The `Workbox` instance.\n */\n\n/**\n * The `externalactivated` event is dispatched if the state of an\n * [external service worker]{@link https://developers.google.com/web/tools/workbox/modules/workbox-precaching#def-external-sw}\n * changes to `activated`.\n *\n * @event module:workbox-window.Workbox#externalactivated\n * @type {WorkboxEvent}\n * @property {ServiceWorker} sw The service worker instance.\n * @property {Event} originalEvent The original [`statechange`]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorker/onstatechange}\n * event.\n * @property {string} type `externalactivated`.\n * @property {Workbox} target The `Workbox` instance.\n */\n\nexport {Workbox};\n"],"names":["self","_","e","messageSW","sw","data","Promise","resolve","messageChannel","MessageChannel","port1","onmessage","evt","postMessage","port2","Deferred","constructor","promise","reject","EventTargetShim","_eventListenerRegistry","addEventListener","type","listener","_getEventListenersByType","add","removeEventListener","delete","dispatchEvent","event","target","this","forEach","Set","urlsMatch","url1","url2","URL","location","href","WorkboxEvent","props","Object","assign","WAITING_TIMEOUT_DURATION","REGISTRATION_TIMEOUT_DURATION","Workbox","scriptURL","registerOptions","_scriptURL","_registerOptions","_updateFoundCount","_swDeferred","_activeDeferred","_controllingDeferred","_onMessage","bind","_onStateChange","_onUpdateFound","_onControllerChange","immediate","document","readyState","res","_isUpdate","Boolean","navigator","serviceWorker","controller","_compatibleControllingSW","_getControllingSWIfCompatible","_registration","_registerScript","_sw","_reportWindowReady","once","waitingSW","waiting","then","wasWaitingBeforeRegister","_broadcastChannel","BroadcastChannel","getSW","reg","register","_registrationTime","performance","now","error","meta","installingSW","installing","_externalSW","originalEvent","state","isExternal","eventPrefix","eventProps","isUpdate","_waitingTimeout","setTimeout","clearTimeout"],"mappings":"AAAA,IAAIA,KAAK,yBAAyBC,IAAI,MAAMC,UC0BtCC,EAAY,CAACC,EAAIC,IACd,IAAIC,QAASC,QACdC,EAAiB,IAAIC,eACzBD,EAAeE,MAAMC,UAAaC,CAAAA,GAAQL,EAAQK,EAAIP,OACtDD,EAAGS,YAAYR,EAAM,CAACG,EAAeM,UC9BzC,IAAId,KAAK,uBAAuBC,IAAI,MAAMC,ICmB1C,MAAaa,EAIXC,mBACOC,QAAU,IAAIX,QAAQ,CAACC,EAASW,UAC9BX,QAAUA,OACVW,OAASA,KCTpB,MAAMC,EAMJH,mBAEOI,EAAyB,GAOhCC,iBAAiBC,EAAMC,QAChBC,EAAyBF,GAAMG,IAAIF,GAQ1CG,oBAAoBJ,EAAMC,QACnBC,EAAyBF,GAAMK,OAAOJ,GAO7CK,cAAcC,GACZA,EAAMC,OAASC,UACVP,EAAyBK,EAAMP,MAAMU,QACrCT,GAAaA,EAASM,IAW7BL,EAAyBF,UAChBS,KAAKX,EAAuBE,GAC9BS,KAAKX,EAAuBE,IAAS,IAA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D,EAAcF,EAAOG,IAEX,cAAVH,OASGK,EAAkBC,WAAW,KAElB,cAAVN,GAAyB/D,KAAKwC,EAAcM,UAAYzE,QACrDwB,cAAc,IAAIY,EACnBwD,EAAc,UAAWC,KAY9BrD,GACgB,eAAVkD,IACTO,aAAatE,KAAKoE,GACbJ,QACE1C,EAAgB9C,QAAQH,IAyCnCuD,EAAoBkC,SACZzF,EAAK2B,KAAK0C,EACZrE,IAAO8D,UAAUC,cAAcC,kBAC5BxC,cAAc,IAAIY,EAAa,cAAe,CAACpC,GAAAA,EAAIyF,cAAAA,UAInDvC,EAAqB/C,QAAQH,IAQtCmD,EAAWsC,SACHxF,KAACA,GAAQwF,OACVjE,cAAc,IAAIY,EAAa,UAAW,CAACnC,KAAAA,EAAMwF,cAAAA"} \ No newline at end of file diff --git a/workbox-v4.3.1/workbox-window.prod.umd.js b/workbox-v4.3.1/workbox-window.prod.umd.js new file mode 100644 index 0000000000..173c4b43fd --- /dev/null +++ b/workbox-v4.3.1/workbox-window.prod.umd.js @@ -0,0 +1,2 @@ +!function(n,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((n=n||self).workbox={})}(this,function(n){"use strict";try{self["workbox:window:4.3.1"]&&_()}catch(n){}var t=function(n,t){return new Promise(function(i){var e=new MessageChannel;e.port1.onmessage=function(n){return i(n.data)},n.postMessage(t,[e.port2])})};function i(n,t){for(var i=0;i0||!o(n.scriptURL,this.t)||performance.now()>this.C+6e4?(this.L=n,this.R.removeEventListener("updatefound",this.g)):(this._=n,this.u.resolve(n)),++this.o,n.addEventListener("statechange",this.l)},g.l=function(n){var t=this,i=n.target,e=i.state,r=i===this.L,o=r?"external":"",s={sw:i,originalEvent:n};!r&&this.p&&(s.isUpdate=!0),this.dispatchEvent(new u(o+e,s)),"installed"===e?this.W=setTimeout(function(){"installed"===e&&t.R.waiting===i&&t.dispatchEvent(new u(o+"waiting",s))},200):"activating"===e&&(clearTimeout(this.W),r||this.s.resolve(i))},g.m=function(n){var t=this._;t===navigator.serviceWorker.controller&&(this.dispatchEvent(new u("controlling",{sw:t,originalEvent:n})),this.h.resolve(t))},g.v=function(n){var t=n.data;this.dispatchEvent(new u("message",{data:t,originalEvent:n}))},l=v,(w=[{key:"active",get:function(){return this.s.promise}},{key:"controlling",get:function(){return this.h.promise}}])&&i(l.prototype,w),d&&i(l,d),v}(function(){function n(){this.D={}}var t=n.prototype;return t.addEventListener=function(n,t){this.M(n).add(t)},t.removeEventListener=function(n,t){this.M(n).delete(t)},t.dispatchEvent=function(n){n.target=this,this.M(n.type).forEach(function(t){return t(n)})},t.M=function(n){return this.D[n]=this.D[n]||new Set},n}());n.Workbox=f,n.messageSW=t,Object.defineProperty(n,"__esModule",{value:!0})}); +//# sourceMappingURL=workbox-window.prod.umd.js.map diff --git a/workbox-v4.3.1/workbox-window.prod.umd.js.map b/workbox-v4.3.1/workbox-window.prod.umd.js.map new file mode 100644 index 0000000000..67eaa1d9ce --- /dev/null +++ b/workbox-v4.3.1/workbox-window.prod.umd.js.map @@ -0,0 +1 @@ +{"version":3,"file":"workbox-window.prod.umd.js","sources":["../_version.mjs","../messageSW.mjs","../../workbox-core/_version.mjs","../../workbox-core/_private/Deferred.mjs","../utils/urlsMatch.mjs","../utils/WorkboxEvent.mjs","../Workbox.mjs","../utils/EventTargetShim.mjs"],"sourcesContent":["try{self['workbox:window:4.3.1']&&_()}catch(e){}// eslint-disable-line","/*\n Copyright 2019 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport './_version.mjs';\n\n\n/**\n * Sends a data object to a service worker via `postMessage` and resolves with\n * a response (if any).\n *\n * A response can be set in a message handler in the service worker by\n * calling `event.ports[0].postMessage(...)`, which will resolve the promise\n * returned by `messageSW()`. If no response is set, the promise will not\n * resolve.\n *\n * @param {ServiceWorker} sw The service worker to send the message to.\n * @param {Object} data An object to send to the service worker.\n * @return {Promise}\n *\n * @memberof module:workbox-window\n */\nconst messageSW = (sw, data) => {\n return new Promise((resolve) => {\n let messageChannel = new MessageChannel();\n messageChannel.port1.onmessage = (evt) => resolve(evt.data);\n sw.postMessage(data, [messageChannel.port2]);\n });\n};\n\nexport {messageSW};\n","try{self['workbox:core:4.3.1']&&_()}catch(e){}// eslint-disable-line","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport '../_version.mjs';\n\n\n/**\n * The Deferred class composes Promises in a way that allows for them to be\n * resolved or rejected from outside the constructor. In most cases promises\n * should be used directly, but Deferreds can be necessary when the logic to\n * resolve a promise must be separate.\n *\n * @private\n */\nexport class Deferred {\n /**\n * Creates a promise and exposes its resolve and reject functions as methods.\n */\n constructor() {\n this.promise = new Promise((resolve, reject) => {\n this.resolve = resolve;\n this.reject = reject;\n });\n }\n}\n","/*\n Copyright 2019 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport '../_version.mjs';\n\n\n/**\n * Returns true if two URLs have the same `.href` property. The URLS can be\n * relative, and if they are the current location href is used to resolve URLs.\n *\n * @private\n * @param {string} url1\n * @param {string} url2\n * @return {boolean}\n */\nconst urlsMatch = (url1, url2) => {\n return new URL(url1, location).href === new URL(url2, location).href;\n};\n\nexport {urlsMatch};\n","/*\n Copyright 2019 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport '../_version.mjs';\n\n/**\n * A minimal `Event` subclass shim.\n * This doesn't *actually* subclass `Event` because not all browsers support\n * constructable `EventTarget`, and using a real `Event` will error.\n * @private\n */\nclass WorkboxEvent {\n /**\n * @param {string} type\n * @param {Object} props\n */\n constructor(type, props) {\n Object.assign(this, props, {type});\n }\n}\n\nexport {WorkboxEvent};\n","/*\n Copyright 2019 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport {Deferred} from 'workbox-core/_private/Deferred.mjs';\nimport {logger} from 'workbox-core/_private/logger.mjs';\nimport {messageSW} from './messageSW.mjs';\nimport {EventTargetShim} from './utils/EventTargetShim.mjs';\nimport {urlsMatch} from './utils/urlsMatch.mjs';\nimport {WorkboxEvent} from './utils/WorkboxEvent.mjs';\nimport './_version.mjs';\n\n\n// The time a SW must be in the waiting phase before we can conclude\n// `skipWaiting()` wasn't called. This 200 amount wasn't scientifically\n// chosen, but it seems to avoid false positives in my testing.\nconst WAITING_TIMEOUT_DURATION = 200;\n\n// The amount of time after a registration that we can reasonably conclude\n// that the registration didn't trigger an update.\nconst REGISTRATION_TIMEOUT_DURATION = 60000;\n\n/**\n * A class to aid in handling service worker registration, updates, and\n * reacting to service worker lifecycle events.\n *\n * @fires [message]{@link module:workbox-window.Workbox#message}\n * @fires [installed]{@link module:workbox-window.Workbox#installed}\n * @fires [waiting]{@link module:workbox-window.Workbox#waiting}\n * @fires [controlling]{@link module:workbox-window.Workbox#controlling}\n * @fires [activated]{@link module:workbox-window.Workbox#activated}\n * @fires [redundant]{@link module:workbox-window.Workbox#redundant}\n * @fires [externalinstalled]{@link module:workbox-window.Workbox#externalinstalled}\n * @fires [externalwaiting]{@link module:workbox-window.Workbox#externalwaiting}\n * @fires [externalactivated]{@link module:workbox-window.Workbox#externalactivated}\n *\n * @memberof module:workbox-window\n */\nclass Workbox extends EventTargetShim {\n /**\n * Creates a new Workbox instance with a script URL and service worker\n * options. The script URL and options are the same as those used when\n * calling `navigator.serviceWorker.register(scriptURL, options)`. See:\n * https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerContainer/register\n *\n * @param {string} scriptURL The service worker script associated with this\n * instance.\n * @param {Object} [registerOptions] The service worker options associated\n * with this instance.\n */\n constructor(scriptURL, registerOptions = {}) {\n super();\n\n this._scriptURL = scriptURL;\n this._registerOptions = registerOptions;\n this._updateFoundCount = 0;\n\n // Deferreds we can resolve later.\n this._swDeferred = new Deferred();\n this._activeDeferred = new Deferred();\n this._controllingDeferred = new Deferred();\n\n // Bind event handler callbacks.\n this._onMessage = this._onMessage.bind(this);\n this._onStateChange = this._onStateChange.bind(this);\n this._onUpdateFound = this._onUpdateFound.bind(this);\n this._onControllerChange = this._onControllerChange.bind(this);\n }\n\n /**\n * Registers a service worker for this instances script URL and service\n * worker options. By default this method delays registration until after\n * the window has loaded.\n *\n * @param {Object} [options]\n * @param {Function} [options.immediate=false] Setting this to true will\n * register the service worker immediately, even if the window has\n * not loaded (not recommended).\n */\n async register({immediate = false} = {}) {\n if (process.env.NODE_ENV !== 'production') {\n if (this._registrationTime) {\n logger.error('Cannot re-register a Workbox instance after it has ' +\n 'been registered. Create a new instance instead.');\n return;\n }\n }\n\n if (!immediate && document.readyState !== 'complete') {\n await new Promise((res) => addEventListener('load', res));\n }\n\n // Set this flag to true if any service worker was controlling the page\n // at registration time.\n this._isUpdate = Boolean(navigator.serviceWorker.controller);\n\n // Before registering, attempt to determine if a SW is already controlling\n // the page, and if that SW script (and version, if specified) matches this\n // instance's script.\n this._compatibleControllingSW = this._getControllingSWIfCompatible();\n\n this._registration = await this._registerScript();\n\n // If we have a compatible controller, store the controller as the \"own\"\n // SW, resolve active/controlling deferreds and add necessary listeners.\n if (this._compatibleControllingSW) {\n this._sw = this._compatibleControllingSW;\n this._activeDeferred.resolve(this._compatibleControllingSW);\n this._controllingDeferred.resolve(this._compatibleControllingSW);\n\n this._reportWindowReady(this._compatibleControllingSW);\n this._compatibleControllingSW.addEventListener(\n 'statechange', this._onStateChange, {once: true});\n }\n\n // If there's a waiting service worker with a matching URL before the\n // `updatefound` event fires, it likely means that this site is open\n // in another tab, or the user refreshed the page (and thus the prevoius\n // page wasn't fully unloaded before this page started loading).\n // https://developers.google.com/web/fundamentals/primers/service-workers/lifecycle#waiting\n const waitingSW = this._registration.waiting;\n if (waitingSW && urlsMatch(waitingSW.scriptURL, this._scriptURL)) {\n // Store the waiting SW as the \"own\" Sw, even if it means overwriting\n // a compatible controller.\n this._sw = waitingSW;\n\n // Run this in the next microtask, so any code that adds an event\n // listener after awaiting `register()` will get this event.\n Promise.resolve().then(() => {\n this.dispatchEvent(new WorkboxEvent('waiting', {\n sw: waitingSW,\n wasWaitingBeforeRegister: true,\n }));\n if (process.env.NODE_ENV !== 'production') {\n logger.warn('A service worker was already waiting to activate ' +\n 'before this script was registered...');\n }\n });\n }\n\n // If an \"own\" SW is already set, resolve the deferred.\n if (this._sw) {\n this._swDeferred.resolve(this._sw);\n }\n\n if (process.env.NODE_ENV !== 'production') {\n logger.log('Successfully registered service worker.', this._scriptURL);\n\n if (navigator.serviceWorker.controller) {\n if (this._compatibleControllingSW) {\n logger.debug('A service worker with the same script URL ' +\n 'is already controlling this page.');\n } else {\n logger.debug('A service worker with a different script URL is ' +\n 'currently controlling the page. The browser is now fetching ' +\n 'the new script now...');\n }\n }\n\n const currentPageIsOutOfScope = () => {\n const scopeURL = new URL(\n this._registerOptions.scope || this._scriptURL, document.baseURI);\n const scopeURLBasePath = new URL('./', scopeURL.href).pathname;\n return !location.pathname.startsWith(scopeURLBasePath);\n };\n if (currentPageIsOutOfScope()) {\n logger.warn('The current page is not in scope for the registered ' +\n 'service worker. Was this a mistake?');\n }\n }\n\n this._registration.addEventListener('updatefound', this._onUpdateFound);\n navigator.serviceWorker.addEventListener(\n 'controllerchange', this._onControllerChange, {once: true});\n\n // Add message listeners.\n if ('BroadcastChannel' in self) {\n this._broadcastChannel = new BroadcastChannel('workbox');\n this._broadcastChannel.addEventListener('message', this._onMessage);\n }\n navigator.serviceWorker.addEventListener('message', this._onMessage);\n\n return this._registration;\n }\n\n /**\n * Resolves to the service worker registered by this instance as soon as it\n * is active. If a service worker was already controlling at registration\n * time then it will resolve to that if the script URLs (and optionally\n * script versions) match, otherwise it will wait until an update is found\n * and activates.\n *\n * @return {Promise}\n */\n get active() {\n return this._activeDeferred.promise;\n }\n\n /**\n * Resolves to the service worker registered by this instance as soon as it\n * is controlling the page. If a service worker was already controlling at\n * registration time then it will resolve to that if the script URLs (and\n * optionally script versions) match, otherwise it will wait until an update\n * is found and starts controlling the page.\n * Note: the first time a service worker is installed it will active but\n * not start controlling the page unless `clients.claim()` is called in the\n * service worker.\n *\n * @return {Promise}\n */\n get controlling() {\n return this._controllingDeferred.promise;\n }\n\n /**\n * Resolves with a reference to a service worker that matches the script URL\n * of this instance, as soon as it's available.\n *\n * If, at registration time, there's already an active or waiting service\n * worker with a matching script URL, it will be used (with the waiting\n * service worker taking precedence over the active service worker if both\n * match, since the waiting service worker would have been registered more\n * recently).\n * If there's no matching active or waiting service worker at registration\n * time then the promise will not resolve until an update is found and starts\n * installing, at which point the installing service worker is used.\n *\n * @return {Promise}\n */\n async getSW() {\n // If `this._sw` is set, resolve with that as we want `getSW()` to\n // return the correct (new) service worker if an update is found.\n return this._sw || this._swDeferred.promise;\n }\n\n /**\n * Sends the passed data object to the service worker registered by this\n * instance (via [`getSW()`]{@link module:workbox-window.Workbox#getSW}) and resolves\n * with a response (if any).\n *\n * A response can be set in a message handler in the service worker by\n * calling `event.ports[0].postMessage(...)`, which will resolve the promise\n * returned by `messageSW()`. If no response is set, the promise will never\n * resolve.\n *\n * @param {Object} data An object to send to the service worker\n * @return {Promise}\n */\n async messageSW(data) {\n const sw = await this.getSW();\n return messageSW(sw, data);\n }\n\n /**\n * Checks for a service worker already controlling the page and returns\n * it if its script URL matchs.\n *\n * @private\n * @return {ServiceWorker|undefined}\n */\n _getControllingSWIfCompatible() {\n const controller = navigator.serviceWorker.controller;\n if (controller && urlsMatch(controller.scriptURL, this._scriptURL)) {\n return controller;\n }\n }\n\n /**\n * Registers a service worker for this instances script URL and register\n * options and tracks the time registration was complete.\n *\n * @private\n */\n async _registerScript() {\n try {\n const reg = await navigator.serviceWorker.register(\n this._scriptURL, this._registerOptions);\n\n // Keep track of when registration happened, so it can be used in the\n // `this._onUpdateFound` heuristic. Also use the presence of this\n // property as a way to see if `.register()` has been called.\n this._registrationTime = performance.now();\n\n return reg;\n } catch (error) {\n if (process.env.NODE_ENV !== 'production') {\n logger.error(error);\n }\n // Re-throw the error.\n throw error;\n }\n }\n\n\n /**\n * Sends a message to the passed service worker that the window is ready.\n *\n * @param {ServiceWorker} sw\n * @private\n */\n _reportWindowReady(sw) {\n messageSW(sw, {\n type: 'WINDOW_READY',\n meta: 'workbox-window',\n });\n }\n\n /**\n * @private\n */\n _onUpdateFound() {\n const installingSW = this._registration.installing;\n\n // If the script URL passed to `navigator.serviceWorker.register()` is\n // different from the current controlling SW's script URL, we know any\n // successful registration calls will trigger an `updatefound` event.\n // But if the registered script URL is the same as the current controlling\n // SW's script URL, we'll only get an `updatefound` event if the file\n // changed since it was last registered. This can be a problem if the user\n // opens up the same page in a different tab, and that page registers\n // a SW that triggers an update. It's a problem because this page has no\n // good way of knowing whether the `updatefound` event came from the SW\n // script it registered or from a registration attempt made by a newer\n // version of the page running in another tab.\n // To minimize the possibility of a false positive, we use the logic here:\n let updateLikelyTriggeredExternally =\n // Since we enforce only calling `register()` once, and since we don't\n // add the `updatefound` event listener until the `register()` call, if\n // `_updateFoundCount` is > 0 then it means this method has already\n // been called, thus this SW must be external\n this._updateFoundCount > 0 ||\n // If the script URL of the installing SW is different from this\n // instance's script URL, we know it's definitely not from our\n // registration.\n !urlsMatch(installingSW.scriptURL, this._scriptURL) ||\n // If all of the above are false, then we use a time-based heuristic:\n // Any `updatefound` event that occurs long after our registration is\n // assumed to be external.\n (performance.now() >\n this._registrationTime + REGISTRATION_TIMEOUT_DURATION) ?\n // If any of the above are not true, we assume the update was\n // triggered by this instance.\n true : false;\n\n if (updateLikelyTriggeredExternally) {\n this._externalSW = installingSW;\n this._registration.removeEventListener(\n 'updatefound', this._onUpdateFound);\n } else {\n // If the update was not triggered externally we know the installing\n // SW is the one we registered, so we set it.\n this._sw = installingSW;\n this._swDeferred.resolve(installingSW);\n\n // The `installing` state isn't something we have a dedicated\n // callback for, but we do log messages for it in development.\n if (process.env.NODE_ENV !== 'production') {\n if (navigator.serviceWorker.controller) {\n logger.log('Updated service worker found. Installing now...');\n } else {\n logger.log('Service worker is installing...');\n }\n }\n }\n\n // Increment the `updatefound` count, so future invocations of this\n // method can be sure they were triggered externally.\n ++this._updateFoundCount;\n\n // Add a `statechange` listener regardless of whether this update was\n // triggered externally, since we have callbacks for both.\n installingSW.addEventListener('statechange', this._onStateChange);\n }\n\n /**\n * @private\n * @param {Event} originalEvent\n */\n _onStateChange(originalEvent) {\n const sw = originalEvent.target;\n const {state} = sw;\n const isExternal = sw === this._externalSW;\n const eventPrefix = isExternal ? 'external' : '';\n\n const eventProps = {sw, originalEvent};\n if (!isExternal && this._isUpdate) {\n eventProps.isUpdate = true;\n }\n\n this.dispatchEvent(new WorkboxEvent(\n eventPrefix + state, eventProps));\n\n if (state === 'installed') {\n // This timeout is used to ignore cases where the service worker calls\n // `skipWaiting()` in the install event, thus moving it directly in the\n // activating state. (Since all service workers *must* go through the\n // waiting phase, the only way to detect `skipWaiting()` called in the\n // install event is to observe that the time spent in the waiting phase\n // is very short.)\n // NOTE: we don't need separate timeouts for the own and external SWs\n // since they can't go through these phases at the same time.\n this._waitingTimeout = setTimeout(() => {\n // Ensure the SW is still waiting (it may now be redundant).\n if (state === 'installed' && this._registration.waiting === sw) {\n this.dispatchEvent(new WorkboxEvent(\n eventPrefix + 'waiting', eventProps));\n\n if (process.env.NODE_ENV !== 'production') {\n if (isExternal) {\n logger.warn('An external service worker has installed but is ' +\n 'waiting for this client to close before activating...');\n } else {\n logger.warn('The service worker has installed but is waiting ' +\n 'for existing clients to close before activating...');\n }\n }\n }\n }, WAITING_TIMEOUT_DURATION);\n } else if (state === 'activating') {\n clearTimeout(this._waitingTimeout);\n if (!isExternal) {\n this._activeDeferred.resolve(sw);\n }\n }\n\n if (process.env.NODE_ENV !== 'production') {\n switch (state) {\n case 'installed':\n if (isExternal) {\n logger.warn('An external service worker has installed. ' +\n 'You may want to suggest users reload this page.');\n } else {\n logger.log('Registered service worker installed.');\n }\n break;\n case 'activated':\n if (isExternal) {\n logger.warn('An external service worker has activated.');\n } else {\n logger.log('Registered service worker activated.');\n if (sw !== navigator.serviceWorker.controller) {\n logger.warn('The registered service worker is active but ' +\n 'not yet controlling the page. Reload or run ' +\n '`clients.claim()` in the service worker.');\n }\n }\n break;\n case 'redundant':\n if (sw === this._compatibleControllingSW) {\n logger.log('Previously controlling service worker now redundant!');\n } else if (!isExternal) {\n logger.log('Registered service worker now redundant!');\n }\n break;\n }\n }\n }\n\n /**\n * @private\n * @param {Event} originalEvent\n */\n _onControllerChange(originalEvent) {\n const sw = this._sw;\n if (sw === navigator.serviceWorker.controller) {\n this.dispatchEvent(new WorkboxEvent('controlling', {sw, originalEvent}));\n if (process.env.NODE_ENV !== 'production') {\n logger.log('Registered service worker now controlling this page.');\n }\n this._controllingDeferred.resolve(sw);\n }\n }\n\n /**\n * @private\n * @param {Event} originalEvent\n */\n _onMessage(originalEvent) {\n const {data} = originalEvent;\n this.dispatchEvent(new WorkboxEvent('message', {data, originalEvent}));\n }\n}\n\n// The jsdoc comments below outline the events this instance may dispatch:\n// -----------------------------------------------------------------------\n\n/**\n * The `message` event is dispatched any time a `postMessage` (or a\n * `BroadcastChannel` message with the `workbox` channel name) is received.\n *\n * @event module:workbox-window.Workbox#message\n * @type {WorkboxEvent}\n * @property {*} data The `data` property from the original `message` event.\n * @property {Event} originalEvent The original [`message`]{@link https://developer.mozilla.org/en-US/docs/Web/API/MessageEvent}\n * event.\n * @property {string} type `message`.\n * @property {Workbox} target The `Workbox` instance.\n */\n\n/**\n * The `installed` event is dispatched if the state of a\n * [`Workbox`]{@link module:workbox-window.Workbox} instance's\n * [registered service worker]{@link https://developers.google.com/web/tools/workbox/modules/workbox-precaching#def-registered-sw}\n * changes to `installed`.\n *\n * Then can happen either the very first time a service worker is installed,\n * or after an update to the current service worker is found. In the case\n * of an update being found, the event's `isUpdate` property will be `true`.\n *\n * @event module:workbox-window.Workbox#installed\n * @type {WorkboxEvent}\n * @property {ServiceWorker} sw The service worker instance.\n * @property {Event} originalEvent The original [`statechange`]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorker/onstatechange}\n * event.\n * @property {boolean|undefined} isUpdate True if a service worker was already\n * controlling when this `Workbox` instance called `register()`.\n * @property {string} type `installed`.\n * @property {Workbox} target The `Workbox` instance.\n */\n\n/**\n * The `waiting` event is dispatched if the state of a\n * [`Workbox`]{@link module:workbox-window.Workbox} instance's\n * [registered service worker]{@link https://developers.google.com/web/tools/workbox/modules/workbox-precaching#def-registered-sw}\n * changes to `installed` and then doesn't immediately change to `activating`.\n * It may also be dispatched if a service worker with the same\n * [`scriptURL`]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorker/scriptURL}\n * was already waiting when the [`register()`]{@link module:workbox-window.Workbox#register}\n * method was called.\n *\n * @event module:workbox-window.Workbox#waiting\n * @type {WorkboxEvent}\n * @property {ServiceWorker} sw The service worker instance.\n * @property {Event} originalEvent The native `controllerchange` event\n * @property {boolean|undefined} isUpdate True if a service worker was already\n * controlling when this `Workbox` instance called `register()`.\n * @property {boolean|undefined} wasWaitingBeforeRegister True if a service worker with\n * a matching `scriptURL` was already waiting when this `Workbox`\n * instance called `register()`.\n * @property {string} type `waiting`.\n * @property {Workbox} target The `Workbox` instance.\n */\n\n/**\n * The `controlling` event is dispatched if a\n * [`controllerchange`]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerContainer/oncontrollerchange}\n * fires on the service worker [container]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerContainer}\n * and the [`scriptURL`]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorker/scriptURL}\n * of the new [controller]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerContainer/controller}\n * matches the `scriptURL` of the `Workbox` instance's\n * [registered service worker]{@link https://developers.google.com/web/tools/workbox/modules/workbox-precaching#def-registered-sw}.\n *\n * @event module:workbox-window.Workbox#controlling\n * @type {WorkboxEvent}\n * @property {ServiceWorker} sw The service worker instance.\n * @property {Event} originalEvent The original [`controllerchange`]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerContainer/oncontrollerchange}\n * event.\n * @property {boolean|undefined} isUpdate True if a service worker was already\n * controlling when this service worker was registered.\n * @property {string} type `controlling`.\n * @property {Workbox} target The `Workbox` instance.\n */\n\n/**\n * The `activated` event is dispatched if the state of a\n * [`Workbox`]{@link module:workbox-window.Workbox} instance's\n * [registered service worker]{@link https://developers.google.com/web/tools/workbox/modules/workbox-precaching#def-registered-sw}\n * changes to `activated`.\n *\n * @event module:workbox-window.Workbox#activated\n * @type {WorkboxEvent}\n * @property {ServiceWorker} sw The service worker instance.\n * @property {Event} originalEvent The original [`statechange`]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorker/onstatechange}\n * event.\n * @property {boolean|undefined} isUpdate True if a service worker was already\n * controlling when this `Workbox` instance called `register()`.\n * @property {string} type `activated`.\n * @property {Workbox} target The `Workbox` instance.\n */\n\n/**\n * The `redundant` event is dispatched if the state of a\n * [`Workbox`]{@link module:workbox-window.Workbox} instance's\n * [registered service worker]{@link https://developers.google.com/web/tools/workbox/modules/workbox-precaching#def-registered-sw}\n * changes to `redundant`.\n *\n * @event module:workbox-window.Workbox#redundant\n * @type {WorkboxEvent}\n * @property {ServiceWorker} sw The service worker instance.\n * @property {Event} originalEvent The original [`statechange`]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorker/onstatechange}\n * event.\n * @property {boolean|undefined} isUpdate True if a service worker was already\n * controlling when this `Workbox` instance called `register()`.\n * @property {string} type `redundant`.\n * @property {Workbox} target The `Workbox` instance.\n */\n\n/**\n * The `externalinstalled` event is dispatched if the state of an\n * [external service worker]{@link https://developers.google.com/web/tools/workbox/modules/workbox-precaching#def-external-sw}\n * changes to `installed`.\n *\n * @event module:workbox-window.Workbox#externalinstalled\n * @type {WorkboxEvent}\n * @property {ServiceWorker} sw The service worker instance.\n * @property {Event} originalEvent The original [`statechange`]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorker/onstatechange}\n * event.\n * @property {string} type `externalinstalled`.\n * @property {Workbox} target The `Workbox` instance.\n */\n\n/**\n * The `externalwaiting` event is dispatched if the state of an\n * [external service worker]{@link https://developers.google.com/web/tools/workbox/modules/workbox-precaching#def-external-sw}\n * changes to `waiting`.\n *\n * @event module:workbox-window.Workbox#externalwaiting\n * @type {WorkboxEvent}\n * @property {ServiceWorker} sw The service worker instance.\n * @property {Event|undefined} originalEvent The original [`statechange`]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorker/onstatechange}\n * event.\n * @property {string} type `externalwaiting`.\n * @property {Workbox} target The `Workbox` instance.\n */\n\n/**\n * The `externalactivated` event is dispatched if the state of an\n * [external service worker]{@link https://developers.google.com/web/tools/workbox/modules/workbox-precaching#def-external-sw}\n * changes to `activated`.\n *\n * @event module:workbox-window.Workbox#externalactivated\n * @type {WorkboxEvent}\n * @property {ServiceWorker} sw The service worker instance.\n * @property {Event} originalEvent The original [`statechange`]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorker/onstatechange}\n * event.\n * @property {string} type `externalactivated`.\n * @property {Workbox} target The `Workbox` instance.\n */\n\nexport {Workbox};\n","/*\n Copyright 2019 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport '../_version.mjs';\n\n\n/**\n * A minimal `EventTarget` shim.\n * This is necessary because not all browsers support constructable\n * `EventTarget`, so using a real `EventTarget` will error.\n * @private\n */\nclass EventTargetShim {\n /**\n * Creates an event listener registry\n *\n * @private\n */\n constructor() {\n // A registry of event types to listeners.\n this._eventListenerRegistry = {};\n }\n /**\n * @param {string} type\n * @param {Function} listener\n * @private\n */\n addEventListener(type, listener) {\n this._getEventListenersByType(type).add(listener);\n }\n\n /**\n * @param {string} type\n * @param {Function} listener\n * @private\n */\n removeEventListener(type, listener) {\n this._getEventListenersByType(type).delete(listener);\n }\n\n /**\n * @param {Event} event\n * @private\n */\n dispatchEvent(event) {\n event.target = this;\n this._getEventListenersByType(event.type).forEach(\n (listener) => listener(event));\n }\n\n /**\n * Returns a Set of listeners associated with the passed event type.\n * If no handlers have been registered, an empty Set is returned.\n *\n * @param {string} type The event type.\n * @return {Set} An array of handler functions.\n * @private\n */\n _getEventListenersByType(type) {\n return this._eventListenerRegistry[type] =\n (this._eventListenerRegistry[type] || new Set());\n }\n}\n\nexport {EventTargetShim};\n"],"names":["self","_","e","messageSW","sw","data","Promise","resolve","messageChannel","MessageChannel","port1","onmessage","evt","postMessage","port2","Deferred","promise","reject","_this","urlsMatch","url1","url2","URL","location","href","WorkboxEvent","type","props","Object","assign","this","f","args","i","arguments","length","apply","value","then","direct","Workbox","scriptURL","registerOptions","_scriptURL","_registerOptions","_updateFoundCount","_swDeferred","_activeDeferred","_controllingDeferred","_onMessage","bind","_onStateChange","_onUpdateFound","_onControllerChange","register","result","immediate","_isUpdate","Boolean","navigator","serviceWorker","controller","_compatibleControllingSW","_this2","_getControllingSWIfCompatible","_registerScript","_registration","_sw","_reportWindowReady","addEventListener","once","waitingSW","waiting","dispatchEvent","wasWaitingBeforeRegister","_broadcastChannel","BroadcastChannel","document","readyState","res","body","getSW","recover","_this5","reg","_registrationTime","performance","now","error","meta","installingSW","installing","_externalSW","removeEventListener","originalEvent","target","state","isExternal","eventPrefix","eventProps","isUpdate","_waitingTimeout","setTimeout","_this6","clearTimeout","_eventListenerRegistry","listener","_getEventListenersByType","add","delete","event","forEach","Set"],"mappings":"oMAAA,IAAIA,KAAK,yBAAyBC,IAAI,MAAMC,QC0BtCC,EAAY,SAACC,EAAIC,UACd,IAAIC,QAAQ,SAACC,OACdC,EAAiB,IAAIC,eACzBD,EAAeE,MAAMC,UAAY,SAACC,UAAQL,EAAQK,EAAIP,OACtDD,EAAGS,YAAYR,EAAM,CAACG,EAAeM,4SC9BzC,IAA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CpC,0BAAiB3C,EAAMgF,QAChBC,EAAyBjF,GAAMkF,IAAIF,MAQ1Cb,6BAAoBnE,EAAMgF,QACnBC,EAAyBjF,GAAMmF,OAAOH,MAO7CjC,uBAAcqC,GACZA,EAAMf,OAASjE,UACV6E,EAAyBG,EAAMpF,MAAMqF,QACtC,SAACL,UAAaA,EAASI,QAW7BH,WAAyBjF,UAChBI,KAAK2E,EAAuB/E,GAC9BI,KAAK2E,EAAuB/E,IAAS,IAAIsF"} \ No newline at end of file diff --git a/zh/docs/API/L7/index.html b/zh/docs/API/L7/index.html new file mode 100644 index 0000000000..58f22053f9 --- /dev/null +++ b/zh/docs/API/L7/index.html @@ -0,0 +1,47 @@ +简介 | L7 \ No newline at end of file diff --git a/zh/docs/API/component/control/index.html b/zh/docs/API/component/control/index.html new file mode 100644 index 0000000000..80a14adb78 --- /dev/null +++ b/zh/docs/API/component/control/index.html @@ -0,0 +1,175 @@ +地图组件 | L7

地图组件

阅读时间约 1 分钟

control

+

地图组件 用于控制地图的状态如果平移,缩放,或者展示地图一些的辅助信息如图例,比例尺

+

构造函数

+
const baseControl = new L7.Control.Base(option);
+
+

option

+

 position: string 控件位置支持是个方位 bottomright, topright, bottomleft, topleft

+

scene 内置地图组件

+

zoom 地图放大缩小  默认添加
Scale 地图比例尺   默认添加
attribution 地图数据属性  默认添加
layer 图层列表

+

scene配置项设置控件添加状态

+
scene = new L7.scene({
+  zoomControl: true,
+  scaleControl: true,
+  attributionControl: true,
+});
+
+

+

Zoom

+

放大缩小组件 默认 左上角

+
new L7.Control.Zoom({
+  position: 'topleft',
+}).addTo(scene);
+
+

Scale

+

比例尺组件默认左下角

+
new L7.Control.Scale({
+  position: 'bottomleft',
+}).addTo(scene);
+
+

attribution

+

默认右下角

+
new L7.Control.Attribution({
+  position: 'bottomleft',
+}).addTo(scene);
+
+

layer

+

图层列表目前只支持可视化overlayers 图层控制

+
var overlayers = {
+  围栏填充: layer,
+  围栏边界: layer2,
+};
+new L7.Control.Layers({
+  overlayers: overlayers,
+}).addTo(scene);
+
+

方法

+

onAdd

+

组件添加到地图Scene时调用,自定义组件时需要实现此方法

+

addTo

+

添加到地图scene

+
control.addTo(scene);
+
+

setPosition

+

设置组件位置

+
control.setPosition('bottomright');
+
+

remove

+

移除地图组件

+
control.remove();
+
+

示例代码

+

自定义图例控件

+

源码

+
var legend = new L7.Control.Base({
+  position: 'bottomright',
+});
+legend.onAdd = function() {
+  var el = document.createElement('div');
+  el.className = 'infolegend legend';
+  var grades = [0, 8, 15, 30, 65, 120];
+  for (var i = 0; i < grades.length; i++) {
+    el.innerHTML +=
+      '<i style="background:' +
+      colors[i] +
+      '"></i> ' +
+      grades[i] +
+      (grades[i + 1] ? '–' + grades[i + 1] + '<br>' : '+');
+  }
+  return el;
+};
+legend.addTo(scene);
+
+

+

FAQ

\ No newline at end of file diff --git a/zh/docs/API/component/marker/index.html b/zh/docs/API/component/marker/index.html new file mode 100644 index 0000000000..35bc5a5f23 --- /dev/null +++ b/zh/docs/API/component/marker/index.html @@ -0,0 +1,139 @@ +地图标注 | L7

地图标注

阅读时间约 1 分钟

Marker 地图标注 目前只支持2D dom标注

+

构造函数

+

Marker
const Marker = new L7.Marker(option)

+

option

+
    +
  • color        string   map-marker.png 设置默认marker的颜色
  • +
  • element    Dom|string    自定义marker Dom节点,可以是dom实例,也可以是dom id
  • +
  • anchor     string  锚点位置  支持 center, top, top-left, top-right, bottom, bottom-left,bottom-                        right,left, right
  • +
  • offset    Array  偏移量 [ 0, 0 ] 分别表示 X, Y 的偏移量
  • +
+

方法

+

setLnglat

+

设置marker经纬度位置

+

addTo

+

将marker添加到地图Scene

+

remove

+

移除marker

+

getElement

+

获取marker dom Element

+

getLngLat

+

获取marker经纬度坐标

+

togglePopup

+

开启或者关闭marker弹出框

+

setPopup

+

为marker设置popup

+

getPopup

+

获取marker弹出框

+

示例代码

+

默认Marker

+

**
const marker = new L7.Marker({color:'blue'})

+

自定义Marker

+
var el = document.createElement('label');
+el.className = 'lableclass';
+el.textContent = data[i].v;
+el.style.background = getColor(data[i].v);
+new L7.Marker({
+  element: el,
+})
+  .setLnglat([data[i].x * 1, data[i].y])
+  .addTo(scene);
+
+

设置 popup

+
var popup = new L7.Popup({
+  anchor: 'left',
+}).setText(item.name);
+
+new L7.Marker({
+  element: el,
+})
+  .setLnglat(item.coordinates)
+  .setPopup(popup)
+  .addTo(scene);
+
\ No newline at end of file diff --git a/zh/docs/API/component/popup/index.html b/zh/docs/API/component/popup/index.html new file mode 100644 index 0000000000..1f2aea009a --- /dev/null +++ b/zh/docs/API/component/popup/index.html @@ -0,0 +1,151 @@ +地图信息框 | L7

地图信息框

阅读时间约 1 分钟

popup

+

地图标注信息窗口,用于展示地图要素的属性信息

+

构造函数

+

Popup

+
const popup = new L7.Popup(option);
+
+

option

+
    +
  • closeButton
  • +
  • closeOnClick
  • +
  • maxWidth
  • +
  • anchor
  • +
+

方法

+

setLnglat

+

设置popup的经纬度位置
参数:lnglat 经纬度数组 [112,32]

+
popup.setLnglat([112, 32]);
+
+

addTo

+

参数:scene 地图scene实例

+

将popup添加到地图scene显示

+
popup.addTo(scene);
+
+

setHtml

+

参数:html 字符串

+

设置popup html 内容

+
var html =
+  '<p>\u7701\u4EFD\uFF1A' +
+  feature.s +
+  '</p>\n        <p>\u5730\u533A\uFF1A' +
+  feature.m +
+  '</p>\n        <p>\u6E29\u5EA6\uFF1A' +
+  feature.t +
+  '</p>\n        ';
+popup.setHtml(html);
+
+

setText

+

设置 popup 显示文本内容

+
popup.setText('hello world');
+
+

remove

+

移除popup

+
popup.remove();
+
+

事件

+

close

+
popup.on('close', () => {});
+
+

示例代码

+

添加popup

+
  
+  var html = '<p>'+feature.m+'</p>';
+  const new L7.Popup().setLnglat([112, 32]).setHTML(html).addTo(scene);
+

FAQ

\ No newline at end of file diff --git a/zh/docs/API/index.html b/zh/docs/API/index.html new file mode 100644 index 0000000000..62e7dde907 --- /dev/null +++ b/zh/docs/API/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/zh/docs/manual/tutorial/data/index.html b/zh/docs/manual/tutorial/data/index.html new file mode 100644 index 0000000000..45e8bce1ef --- /dev/null +++ b/zh/docs/manual/tutorial/data/index.html @@ -0,0 +1,85 @@ +数据 | L7

数据

阅读时间约 1 分钟

数据

+

目前L7支持的数据格式有GeoJson,CSV,JSon Image

+

GeoJSON 支持点、线、面,等所有的空间数据格式。
CSV 支持,点,线段,弧线的支持。
JSON 支持简单的点、线,面,不支持多点,多线的,多面数据格式。

+

GeoJSON

+
+

GeoJSON是一种对各种地理数据结构进行编码的格式。GeoJSON对象可以表示几何、特征或者特征集合。GeoJSON支持下面几何类型:点、线、面、多点、多线、多面和几何集合。GeoJSON里的特征包含一个几何对象和其他属性,特征集合表示一系列特征。

+
+
{
+  "type": "FeatureCollection",
+  "features": [
+    {
+      "type": "Feature",
+      "properties": {},
+      "geometry": {
+        "type": "Polygon",
+        "coordinates": [
+          [
+            [110.478515625, 32.76880048488168],
+            [117.68554687499999, 32.76880048488168],
+            [117.68554687499999, 37.64903402157866],
+            [110.478515625, 37.64903402157866],
+            [110.478515625, 32.76880048488168]
+          ]
+        ]
+      }
+    }
+  ]
+}
+
+

地理统计分析工具

+

turfjs:  地理数据计算,处理,统计,分析的Javascript 库

+

在线工具

+

http://geojson.io/    可以在线查看,绘制,修改GeoJSON数据

+

https://mapshaper.org/  可以查看较大的geojson,还能够简化GeoJSON数据

\ No newline at end of file diff --git a/zh/docs/manual/tutorial/quickStart/index.html b/zh/docs/manual/tutorial/quickStart/index.html new file mode 100644 index 0000000000..46816043f1 --- /dev/null +++ b/zh/docs/manual/tutorial/quickStart/index.html @@ -0,0 +1,47 @@ +快速上手 | L7 \ No newline at end of file diff --git a/zh/docs/specification/index.html b/zh/docs/specification/index.html new file mode 100644 index 0000000000..18d67d87fe --- /dev/null +++ b/zh/docs/specification/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/zh/docs/specification/introduction/index.html b/zh/docs/specification/introduction/index.html new file mode 100644 index 0000000000..235586a060 --- /dev/null +++ b/zh/docs/specification/introduction/index.html @@ -0,0 +1,47 @@ +简介 | L7 \ No newline at end of file diff --git a/zh/docs/tutorial/index.html b/zh/docs/tutorial/index.html new file mode 100644 index 0000000000..51cffd1710 --- /dev/null +++ b/zh/docs/tutorial/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/zh/examples/index.html b/zh/examples/index.html new file mode 100644 index 0000000000..c963d1f03e --- /dev/null +++ b/zh/examples/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/zh/examples/point/basic/index.html b/zh/examples/point/basic/index.html new file mode 100644 index 0000000000..8d3d81d4e4 --- /dev/null +++ b/zh/examples/point/basic/index.html @@ -0,0 +1,49 @@ +气泡图 | L7

气泡图

图表的基本描述。

+

何时使用

+

何时使用何时使用何时使用何时使用何时使用何时使用何时使用何时使用何时使用。

  • point/basic/demo/point.js
\ No newline at end of file diff --git a/zh/index.html b/zh/index.html new file mode 100644 index 0000000000..8c63ac546b --- /dev/null +++ b/zh/index.html @@ -0,0 +1,47 @@ + \ No newline at end of file