@abtnode/webapp 1.16.21-beta-e828f413 → 1.16.21-beta-7b40ffb4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/blocklet.yml +1 -1
- package/build/asset-manifest.json +3 -3
- package/build/index.html +1 -1
- package/build/service-worker.js +1 -1
- package/build/static/js/4549.329cdc3b.chunk.js +1 -0
- package/build/static/js/{main.b3ba7d08.js → main.0b0bf90f.js} +2 -2
- package/package.json +1 -1
- package/build/static/js/4549.5fda7728.chunk.js +0 -1
- /package/build/static/js/{main.b3ba7d08.js.LICENSE.txt → main.0b0bf90f.js.LICENSE.txt} +0 -0
package/blocklet.yml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"files": {
|
|
3
3
|
"main.css": "./static/css/main.c9e90622.css",
|
|
4
|
-
"main.js": "./static/js/main.
|
|
4
|
+
"main.js": "./static/js/main.0b0bf90f.js",
|
|
5
5
|
"static/js/9041.77cacdd7.chunk.js": "./static/js/9041.77cacdd7.chunk.js",
|
|
6
6
|
"static/js/2960.6a54b27f.chunk.js": "./static/js/2960.6a54b27f.chunk.js",
|
|
7
7
|
"static/js/3389.282a0683.chunk.js": "./static/js/3389.282a0683.chunk.js",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"static/js/1366.da3d7a8e.chunk.js": "./static/js/1366.da3d7a8e.chunk.js",
|
|
23
23
|
"static/js/6580.fc3c74eb.chunk.js": "./static/js/6580.fc3c74eb.chunk.js",
|
|
24
24
|
"static/js/2365.a3571172.chunk.js": "./static/js/2365.a3571172.chunk.js",
|
|
25
|
-
"static/js/4549.
|
|
25
|
+
"static/js/4549.329cdc3b.chunk.js": "./static/js/4549.329cdc3b.chunk.js",
|
|
26
26
|
"static/css/6230.9cab926a.chunk.css": "./static/css/6230.9cab926a.chunk.css",
|
|
27
27
|
"static/js/6230.b1753197.chunk.js": "./static/js/6230.b1753197.chunk.js",
|
|
28
28
|
"static/js/4775.19ec4c25.chunk.js": "./static/js/4775.19ec4c25.chunk.js",
|
|
@@ -132,6 +132,6 @@
|
|
|
132
132
|
},
|
|
133
133
|
"entrypoints": [
|
|
134
134
|
"static/css/main.c9e90622.css",
|
|
135
|
-
"static/js/main.
|
|
135
|
+
"static/js/main.0b0bf90f.js"
|
|
136
136
|
]
|
|
137
137
|
}
|
package/build/index.html
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<!doctype html><html lang="en"><head><base href="/"/><meta charset="utf-8"/><link rel="shortcut icon" href="favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=0"/><meta name="theme-color" content="#000000"/><script>"https:"===window.location.protocol&&document.write('<meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests" />')</script><link rel="manifest" href="manifest.json"/><link rel="stylesheet" href="icons/css/all.css"/><title>Blocklet Server</title><script src="api/env"></script><script defer="defer" src="./static/js/main.
|
|
1
|
+
<!doctype html><html lang="en"><head><base href="/"/><meta charset="utf-8"/><link rel="shortcut icon" href="favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=0"/><meta name="theme-color" content="#000000"/><script>"https:"===window.location.protocol&&document.write('<meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests" />')</script><link rel="manifest" href="manifest.json"/><link rel="stylesheet" href="icons/css/all.css"/><title>Blocklet Server</title><script src="api/env"></script><script defer="defer" src="./static/js/main.0b0bf90f.js"></script><link href="./static/css/main.c9e90622.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>
|
package/build/service-worker.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{"use strict";var e={522:()=>{try{self["workbox:core:6.5.3"]&&_()}catch(e){}},434:()=>{try{self["workbox:expiration:6.5.3"]&&_()}catch(e){}},290:()=>{try{self["workbox:precaching:6.5.3"]&&_()}catch(e){}},92:()=>{try{self["workbox:routing:6.5.3"]&&_()}catch(e){}},559:()=>{try{self["workbox:strategies:6.5.3"]&&_()}catch(e){}}},t={};function s(n){var a=t[n];if(void 0!==a)return a.exports;var r=t[n]={exports:{}};return e[n](r,r.exports,s),r.exports}(()=>{s(522);const e=function(e){let t=e;for(var s=arguments.length,n=new Array(s>1?s-1:0),a=1;a<s;a++)n[a-1]=arguments[a];return n.length>0&&(t+=" :: ".concat(JSON.stringify(n))),t};class t extends Error{constructor(t,s){super(e(t,s)),this.name=t,this.details=s}}const n=new Set;const a={googleAnalytics:"googleAnalytics",precache:"precache-v2",prefix:"workbox",runtime:"runtime",suffix:"undefined"!==typeof registration?registration.scope:""},r=e=>[a.prefix,e,a.suffix].filter((e=>e&&e.length>0)).join("-"),i=e=>e||r(a.precache),c=e=>e||r(a.runtime);function o(e,t){const s=new URL(e);for(const n of t)s.searchParams.delete(n);return s.href}let h;function l(e){e.then((()=>{}))}class u{constructor(){this.promise=new Promise(((e,t)=>{this.resolve=e,this.reject=t}))}}const d=e=>new URL(String(e),location.href).href.replace(new RegExp("^".concat(location.origin)),"");function f(e,t){const s=t();return e.waitUntil(s),s}async function p(e,s){let n=null;if(e.url){n=new URL(e.url).origin}if(n!==self.location.origin)throw new t("cross-origin-copy-response",{origin:n});const a=e.clone(),r={headers:new Headers(a.headers),status:a.status,statusText:a.statusText},i=s?s(r):r,c=function(){if(void 0===h){const t=new Response("");if("body"in t)try{new Response(t.body),h=!0}catch(e){h=!1}h=!1}return h}()?a.body:await a.blob();return new Response(c,i)}s(290);function g(e){if(!e)throw new t("add-to-cache-list-unexpected-type",{entry:e});if("string"===typeof e){const t=new URL(e,location.href);return{cacheKey:t.href,url:t.href}}const{revision:s,url:n}=e;if(!n)throw new t("add-to-cache-list-unexpected-type",{entry:e});if(!s){const e=new URL(n,location.href);return{cacheKey:e.href,url:e.href}}const a=new URL(n,location.href),r=new URL(n,location.href);return a.searchParams.set("__WB_REVISION__",s),{cacheKey:a.href,url:r.href}}class w{constructor(){this.updatedURLs=[],this.notUpdatedURLs=[],this.handlerWillStart=async e=>{let{request:t,state:s}=e;s&&(s.originalRequest=t)},this.cachedResponseWillBeUsed=async e=>{let{event:t,state:s,cachedResponse:n}=e;if("install"===t.type&&s&&s.originalRequest&&s.originalRequest instanceof Request){const e=s.originalRequest.url;n?this.notUpdatedURLs.push(e):this.updatedURLs.push(e)}return n}}}class y{constructor(e){let{precacheController:t}=e;this.cacheKeyWillBeUsed=async e=>{let{request:t,params:s}=e;const n=(null===s||void 0===s?void 0:s.cacheKey)||this._precacheController.getCacheKeyForURL(t.url);return n?new Request(n,{headers:t.headers}):t},this._precacheController=t}}s(559);function m(e){return"string"===typeof e?new Request(e):e}class _{constructor(e,t){this._cacheKeys={},Object.assign(this,t),this.event=t.event,this._strategy=e,this._handlerDeferred=new u,this._extendLifetimePromises=[],this._plugins=[...e.plugins],this._pluginStateMap=new Map;for(const s of this._plugins)this._pluginStateMap.set(s,{});this.event.waitUntil(this._handlerDeferred.promise)}async fetch(e){const{event:s}=this;let n=m(e);if("navigate"===n.mode&&s instanceof FetchEvent&&s.preloadResponse){const e=await s.preloadResponse;if(e)return e}const a=this.hasCallback("fetchDidFail")?n.clone():null;try{for(const e of this.iterateCallbacks("requestWillFetch"))n=await e({request:n.clone(),event:s})}catch(i){if(i instanceof Error)throw new t("plugin-error-request-will-fetch",{thrownErrorMessage:i.message})}const r=n.clone();try{let e;e=await fetch(n,"navigate"===n.mode?void 0:this._strategy.fetchOptions);for(const t of this.iterateCallbacks("fetchDidSucceed"))e=await t({event:s,request:r,response:e});return e}catch(c){throw a&&await this.runCallbacks("fetchDidFail",{error:c,event:s,originalRequest:a.clone(),request:r.clone()}),c}}async fetchAndCachePut(e){const t=await this.fetch(e),s=t.clone();return this.waitUntil(this.cachePut(e,s)),t}async cacheMatch(e){const t=m(e);let s;const{cacheName:n,matchOptions:a}=this._strategy,r=await this.getCacheKey(t,"read"),i=Object.assign(Object.assign({},a),{cacheName:n});s=await caches.match(r,i);for(const c of this.iterateCallbacks("cachedResponseWillBeUsed"))s=await c({cacheName:n,matchOptions:a,cachedResponse:s,request:r,event:this.event})||void 0;return s}async cachePut(e,s){const a=m(e);var r;await(r=0,new Promise((e=>setTimeout(e,r))));const i=await this.getCacheKey(a,"write");if(!s)throw new t("cache-put-with-no-response",{url:d(i.url)});const c=await this._ensureResponseSafeToCache(s);if(!c)return!1;const{cacheName:h,matchOptions:l}=this._strategy,u=await self.caches.open(h),f=this.hasCallback("cacheDidUpdate"),p=f?await async function(e,t,s,n){const a=o(t.url,s);if(t.url===a)return e.match(t,n);const r=Object.assign(Object.assign({},n),{ignoreSearch:!0}),i=await e.keys(t,r);for(const c of i)if(a===o(c.url,s))return e.match(c,n)}(u,i.clone(),["__WB_REVISION__"],l):null;try{await u.put(i,f?c.clone():c)}catch(g){if(g instanceof Error)throw"QuotaExceededError"===g.name&&await async function(){for(const e of n)await e()}(),g}for(const t of this.iterateCallbacks("cacheDidUpdate"))await t({cacheName:h,oldResponse:p,newResponse:c.clone(),request:i,event:this.event});return!0}async getCacheKey(e,t){const s="".concat(e.url," | ").concat(t);if(!this._cacheKeys[s]){let n=e;for(const e of this.iterateCallbacks("cacheKeyWillBeUsed"))n=m(await e({mode:t,request:n,event:this.event,params:this.params}));this._cacheKeys[s]=n}return this._cacheKeys[s]}hasCallback(e){for(const t of this._strategy.plugins)if(e in t)return!0;return!1}async runCallbacks(e,t){for(const s of this.iterateCallbacks(e))await s(t)}*iterateCallbacks(e){for(const t of this._strategy.plugins)if("function"===typeof t[e]){const s=this._pluginStateMap.get(t),n=n=>{const a=Object.assign(Object.assign({},n),{state:s});return t[e](a)};yield n}}waitUntil(e){return this._extendLifetimePromises.push(e),e}async doneWaiting(){let e;for(;e=this._extendLifetimePromises.shift();)await e}destroy(){this._handlerDeferred.resolve(null)}async _ensureResponseSafeToCache(e){let t=e,s=!1;for(const n of this.iterateCallbacks("cacheWillUpdate"))if(t=await n({request:this.request,response:t,event:this.event})||void 0,s=!0,!t)break;return s||t&&200!==t.status&&(t=void 0),t}}class v{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.cacheName=c(e.cacheName),this.plugins=e.plugins||[],this.fetchOptions=e.fetchOptions,this.matchOptions=e.matchOptions}handle(e){const[t]=this.handleAll(e);return t}handleAll(e){e instanceof FetchEvent&&(e={event:e,request:e.request});const t=e.event,s="string"===typeof e.request?new Request(e.request):e.request,n="params"in e?e.params:void 0,a=new _(this,{event:t,request:s,params:n}),r=this._getResponse(a,s,t);return[r,this._awaitComplete(r,a,s,t)]}async _getResponse(e,s,n){let a;await e.runCallbacks("handlerWillStart",{event:n,request:s});try{if(a=await this._handle(s,e),!a||"error"===a.type)throw new t("no-response",{url:s.url})}catch(r){if(r instanceof Error)for(const t of e.iterateCallbacks("handlerDidError"))if(a=await t({error:r,event:n,request:s}),a)break;if(!a)throw r}for(const t of e.iterateCallbacks("handlerWillRespond"))a=await t({event:n,request:s,response:a});return a}async _awaitComplete(e,t,s,n){let a,r;try{a=await e}catch(r){}try{await t.runCallbacks("handlerDidRespond",{event:n,request:s,response:a}),await t.doneWaiting()}catch(i){i instanceof Error&&(r=i)}if(await t.runCallbacks("handlerDidComplete",{event:n,request:s,response:a,error:r}),t.destroy(),r)throw r}}class b extends v{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.cacheName=i(e.cacheName),super(e),this._fallbackToNetwork=!1!==e.fallbackToNetwork,this.plugins.push(b.copyRedirectedCacheableResponsesPlugin)}async _handle(e,t){const s=await t.cacheMatch(e);return s||(t.event&&"install"===t.event.type?await this._handleInstall(e,t):await this._handleFetch(e,t))}async _handleFetch(e,s){let n;const a=s.params||{};if(!this._fallbackToNetwork)throw new t("missing-precache-entry",{cacheName:this.cacheName,url:e.url});{0;const t=a.integrity,r=e.integrity,i=!r||r===t;if(n=await s.fetch(new Request(e,{integrity:"no-cors"!==e.mode?r||t:void 0})),t&&i&&"no-cors"!==e.mode){this._useDefaultCacheabilityPluginIfNeeded();await s.cachePut(e,n.clone());0}}return n}async _handleInstall(e,s){this._useDefaultCacheabilityPluginIfNeeded();const n=await s.fetch(e);if(!await s.cachePut(e,n.clone()))throw new t("bad-precaching-response",{url:e.url,status:n.status});return n}_useDefaultCacheabilityPluginIfNeeded(){let e=null,t=0;for(const[s,n]of this.plugins.entries())n!==b.copyRedirectedCacheableResponsesPlugin&&(n===b.defaultPrecacheCacheabilityPlugin&&(e=s),n.cacheWillUpdate&&t++);0===t?this.plugins.push(b.defaultPrecacheCacheabilityPlugin):t>1&&null!==e&&this.plugins.splice(e,1)}}b.defaultPrecacheCacheabilityPlugin={async cacheWillUpdate(e){let{response:t}=e;return!t||t.status>=400?null:t}},b.copyRedirectedCacheableResponsesPlugin={async cacheWillUpdate(e){let{response:t}=e;return t.redirected?await p(t):t}};class R{constructor(){let{cacheName:e,plugins:t=[],fallbackToNetwork:s=!0}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this._urlsToCacheKeys=new Map,this._urlsToCacheModes=new Map,this._cacheKeysToIntegrities=new Map,this._strategy=new b({cacheName:i(e),plugins:[...t,new y({precacheController:this})],fallbackToNetwork:s}),this.install=this.install.bind(this),this.activate=this.activate.bind(this)}get strategy(){return this._strategy}precache(e){this.addToCacheList(e),this._installAndActiveListenersAdded||(self.addEventListener("install",this.install),self.addEventListener("activate",this.activate),this._installAndActiveListenersAdded=!0)}addToCacheList(e){const s=[];for(const n of e){"string"===typeof n?s.push(n):n&&void 0===n.revision&&s.push(n.url);const{cacheKey:e,url:a}=g(n),r="string"!==typeof n&&n.revision?"reload":"default";if(this._urlsToCacheKeys.has(a)&&this._urlsToCacheKeys.get(a)!==e)throw new t("add-to-cache-list-conflicting-entries",{firstEntry:this._urlsToCacheKeys.get(a),secondEntry:e});if("string"!==typeof n&&n.integrity){if(this._cacheKeysToIntegrities.has(e)&&this._cacheKeysToIntegrities.get(e)!==n.integrity)throw new t("add-to-cache-list-conflicting-integrities",{url:a});this._cacheKeysToIntegrities.set(e,n.integrity)}if(this._urlsToCacheKeys.set(a,e),this._urlsToCacheModes.set(a,r),s.length>0){const e="Workbox is precaching URLs without revision "+"info: ".concat(s.join(", "),"\nThis is generally NOT safe. ")+"Learn more at https://bit.ly/wb-precache";console.warn(e)}}}install(e){return f(e,(async()=>{const t=new w;this.strategy.plugins.push(t);for(const[a,r]of this._urlsToCacheKeys){const t=this._cacheKeysToIntegrities.get(r),s=this._urlsToCacheModes.get(a),n=new Request(a,{integrity:t,cache:s,credentials:"same-origin"});await Promise.all(this.strategy.handleAll({params:{cacheKey:r},request:n,event:e}))}const{updatedURLs:s,notUpdatedURLs:n}=t;return{updatedURLs:s,notUpdatedURLs:n}}))}activate(e){return f(e,(async()=>{const e=await self.caches.open(this.strategy.cacheName),t=await e.keys(),s=new Set(this._urlsToCacheKeys.values()),n=[];for(const a of t)s.has(a.url)||(await e.delete(a),n.push(a.url));return{deletedURLs:n}}))}getURLsToCacheKeys(){return this._urlsToCacheKeys}getCachedURLs(){return[...this._urlsToCacheKeys.keys()]}getCacheKeyForURL(e){const t=new URL(e,location.href);return this._urlsToCacheKeys.get(t.href)}getIntegrityForCacheKey(e){return this._cacheKeysToIntegrities.get(e)}async matchPrecache(e){const t=e instanceof Request?e.url:e,s=this.getCacheKeyForURL(t);if(s){return(await self.caches.open(this.strategy.cacheName)).match(s)}}createHandlerBoundToURL(e){const s=this.getCacheKeyForURL(e);if(!s)throw new t("non-precached-url",{url:e});return t=>(t.request=new Request(e),t.params=Object.assign({cacheKey:s},t.params),this.strategy.handle(t))}}let x;const C=()=>(x||(x=new R),x);s(92);const E=e=>e&&"object"===typeof e?e:{handle:e};class L{constructor(e,t){let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"GET";this.handler=E(t),this.match=e,this.method=s}setCatchHandler(e){this.catchHandler=E(e)}}class q extends L{constructor(e,t,s){super((t=>{let{url:s}=t;const n=e.exec(s.href);if(n&&(s.origin===location.origin||0===n.index))return n.slice(1)}),t,s)}}class D{constructor(){this._routes=new Map,this._defaultHandlerMap=new Map}get routes(){return this._routes}addFetchListener(){self.addEventListener("fetch",(e=>{const{request:t}=e,s=this.handleRequest({request:t,event:e});s&&e.respondWith(s)}))}addCacheListener(){self.addEventListener("message",(e=>{if(e.data&&"CACHE_URLS"===e.data.type){const{payload:t}=e.data;0;const s=Promise.all(t.urlsToCache.map((t=>{"string"===typeof t&&(t=[t]);const s=new Request(...t);return this.handleRequest({request:s,event:e})})));e.waitUntil(s),e.ports&&e.ports[0]&&s.then((()=>e.ports[0].postMessage(!0)))}}))}handleRequest(e){let{request:t,event:s}=e;const n=new URL(t.url,location.href);if(!n.protocol.startsWith("http"))return void 0;const a=n.origin===location.origin,{params:r,route:i}=this.findMatchingRoute({event:s,request:t,sameOrigin:a,url:n});let c=i&&i.handler;const o=t.method;if(!c&&this._defaultHandlerMap.has(o)&&(c=this._defaultHandlerMap.get(o)),!c)return void 0;let h;try{h=c.handle({url:n,request:t,event:s,params:r})}catch(u){h=Promise.reject(u)}const l=i&&i.catchHandler;return h instanceof Promise&&(this._catchHandler||l)&&(h=h.catch((async e=>{if(l){0;try{return await l.handle({url:n,request:t,event:s,params:r})}catch(a){a instanceof Error&&(e=a)}}if(this._catchHandler)return this._catchHandler.handle({url:n,request:t,event:s});throw e}))),h}findMatchingRoute(e){let{url:t,sameOrigin:s,request:n,event:a}=e;const r=this._routes.get(n.method)||[];for(const i of r){let e;const r=i.match({url:t,sameOrigin:s,request:n,event:a});if(r)return e=r,(Array.isArray(e)&&0===e.length||r.constructor===Object&&0===Object.keys(r).length||"boolean"===typeof r)&&(e=void 0),{route:i,params:e}}return{}}setDefaultHandler(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"GET";this._defaultHandlerMap.set(t,E(e))}setCatchHandler(e){this._catchHandler=E(e)}registerRoute(e){this._routes.has(e.method)||this._routes.set(e.method,[]),this._routes.get(e.method).push(e)}unregisterRoute(e){if(!this._routes.has(e.method))throw new t("unregister-route-but-not-found-with-method",{method:e.method});const s=this._routes.get(e.method).indexOf(e);if(!(s>-1))throw new t("unregister-route-route-not-registered");this._routes.get(e.method).splice(s,1)}}let U;const k=()=>(U||(U=new D,U.addFetchListener(),U.addCacheListener()),U);function T(e,s,n){let a;if("string"===typeof e){const t=new URL(e,location.href);0;a=new L((e=>{let{url:s}=e;return s.href===t.href}),s,n)}else if(e instanceof RegExp)a=new q(e,s,n);else if("function"===typeof e)a=new L(e,s,n);else{if(!(e instanceof L))throw new t("unsupported-route-type",{moduleName:"workbox-routing",funcName:"registerRoute",paramName:"capture"});a=e}return k().registerRoute(a),a}class N extends L{constructor(e,t){super((s=>{let{request:n}=s;const a=e.getURLsToCacheKeys();for(const r of function(e){let{ignoreURLParametersMatching:t=[/^utm_/,/^fbclid$/],directoryIndex:s="index.html",cleanURLs:n=!0,urlManipulation:a}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function*(){const r=new URL(e,location.href);r.hash="",yield r.href;const i=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];for(const s of[...e.searchParams.keys()])t.some((e=>e.test(s)))&&e.searchParams.delete(s);return e}(r,t);if(yield i.href,s&&i.pathname.endsWith("/")){const e=new URL(i.href);e.pathname+=s,yield e.href}if(n){const e=new URL(i.href);e.pathname+=".html",yield e.href}if(a){const e=a({url:r});for(const t of e)yield t.href}}()}(n.url,t)){const t=a.get(r);if(t){return{cacheKey:t,integrity:e.getIntegrityForCacheKey(t)}}}}),e.strategy)}}const I=(e,t)=>t.some((t=>e instanceof t));let K,M;const A=new WeakMap,P=new WeakMap,S=new WeakMap,O=new WeakMap,W=new WeakMap;let B={get(e,t,s){if(e instanceof IDBTransaction){if("done"===t)return P.get(e);if("objectStoreNames"===t)return e.objectStoreNames||S.get(e);if("store"===t)return s.objectStoreNames[1]?void 0:s.objectStore(s.objectStoreNames[0])}return H(e[t])},set:(e,t,s)=>(e[t]=s,!0),has:(e,t)=>e instanceof IDBTransaction&&("done"===t||"store"===t)||t in e};function j(e){return e!==IDBDatabase.prototype.transaction||"objectStoreNames"in IDBTransaction.prototype?(M||(M=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])).includes(e)?function(){for(var t=arguments.length,s=new Array(t),n=0;n<t;n++)s[n]=arguments[n];return e.apply(V(this),s),H(A.get(this))}:function(){for(var t=arguments.length,s=new Array(t),n=0;n<t;n++)s[n]=arguments[n];return H(e.apply(V(this),s))}:function(t){for(var s=arguments.length,n=new Array(s>1?s-1:0),a=1;a<s;a++)n[a-1]=arguments[a];const r=e.call(V(this),t,...n);return S.set(r,t.sort?t.sort():[t]),H(r)}}function F(e){return"function"===typeof e?j(e):(e instanceof IDBTransaction&&function(e){if(P.has(e))return;const t=new Promise(((t,s)=>{const n=()=>{e.removeEventListener("complete",a),e.removeEventListener("error",r),e.removeEventListener("abort",r)},a=()=>{t(),n()},r=()=>{s(e.error||new DOMException("AbortError","AbortError")),n()};e.addEventListener("complete",a),e.addEventListener("error",r),e.addEventListener("abort",r)}));P.set(e,t)}(e),I(e,K||(K=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction]))?new Proxy(e,B):e)}function H(e){if(e instanceof IDBRequest)return function(e){const t=new Promise(((t,s)=>{const n=()=>{e.removeEventListener("success",a),e.removeEventListener("error",r)},a=()=>{t(H(e.result)),n()},r=()=>{s(e.error),n()};e.addEventListener("success",a),e.addEventListener("error",r)}));return t.then((t=>{t instanceof IDBCursor&&A.set(t,e)})).catch((()=>{})),W.set(t,e),t}(e);if(O.has(e))return O.get(e);const t=F(e);return t!==e&&(O.set(e,t),W.set(t,e)),t}const V=e=>W.get(e);const G=["get","getKey","getAll","getAllKeys","count"],Q=["put","add","delete","clear"],$=new Map;function J(e,t){if(!(e instanceof IDBDatabase)||t in e||"string"!==typeof t)return;if($.get(t))return $.get(t);const s=t.replace(/FromIndex$/,""),n=t!==s,a=Q.includes(s);if(!(s in(n?IDBIndex:IDBObjectStore).prototype)||!a&&!G.includes(s))return;const r=async function(e){const t=this.transaction(e,a?"readwrite":"readonly");let r=t.store;for(var i=arguments.length,c=new Array(i>1?i-1:0),o=1;o<i;o++)c[o-1]=arguments[o];return n&&(r=r.index(c.shift())),(await Promise.all([r[s](...c),a&&t.done]))[0]};return $.set(t,r),r}B=(e=>({...e,get:(t,s,n)=>J(t,s)||e.get(t,s,n),has:(t,s)=>!!J(t,s)||e.has(t,s)}))(B);s(434);const z="cache-entries",X=e=>{const t=new URL(e,location.href);return t.hash="",t.href};class Y{constructor(e){this._db=null,this._cacheName=e}_upgradeDb(e){const t=e.createObjectStore(z,{keyPath:"id"});t.createIndex("cacheName","cacheName",{unique:!1}),t.createIndex("timestamp","timestamp",{unique:!1})}_upgradeDbAndDeleteOldDbs(e){this._upgradeDb(e),this._cacheName&&function(e){let{blocked:t}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const s=indexedDB.deleteDatabase(e);t&&s.addEventListener("blocked",(e=>t(e.oldVersion,e))),H(s).then((()=>{}))}(this._cacheName)}async setTimestamp(e,t){const s={url:e=X(e),timestamp:t,cacheName:this._cacheName,id:this._getId(e)},n=(await this.getDb()).transaction(z,"readwrite",{durability:"relaxed"});await n.store.put(s),await n.done}async getTimestamp(e){const t=await this.getDb(),s=await t.get(z,this._getId(e));return null===s||void 0===s?void 0:s.timestamp}async expireEntries(e,t){const s=await this.getDb();let n=await s.transaction(z).store.index("timestamp").openCursor(null,"prev");const a=[];let r=0;for(;n;){const s=n.value;s.cacheName===this._cacheName&&(e&&s.timestamp<e||t&&r>=t?a.push(n.value):r++),n=await n.continue()}const i=[];for(const c of a)await s.delete(z,c.id),i.push(c.url);return i}_getId(e){return this._cacheName+"|"+X(e)}async getDb(){return this._db||(this._db=await function(e,t){let{blocked:s,upgrade:n,blocking:a,terminated:r}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const i=indexedDB.open(e,t),c=H(i);return n&&i.addEventListener("upgradeneeded",(e=>{n(H(i.result),e.oldVersion,e.newVersion,H(i.transaction),e)})),s&&i.addEventListener("blocked",(e=>s(e.oldVersion,e.newVersion,e))),c.then((e=>{r&&e.addEventListener("close",(()=>r())),a&&e.addEventListener("versionchange",(e=>a(e.oldVersion,e.newVersion,e)))})).catch((()=>{})),c}("workbox-expiration",1,{upgrade:this._upgradeDbAndDeleteOldDbs.bind(this)})),this._db}}class Z{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this._isRunning=!1,this._rerunRequested=!1,this._maxEntries=t.maxEntries,this._maxAgeSeconds=t.maxAgeSeconds,this._matchOptions=t.matchOptions,this._cacheName=e,this._timestampModel=new Y(e)}async expireEntries(){if(this._isRunning)return void(this._rerunRequested=!0);this._isRunning=!0;const e=this._maxAgeSeconds?Date.now()-1e3*this._maxAgeSeconds:0,t=await this._timestampModel.expireEntries(e,this._maxEntries),s=await self.caches.open(this._cacheName);for(const n of t)await s.delete(n,this._matchOptions);this._isRunning=!1,this._rerunRequested&&(this._rerunRequested=!1,l(this.expireEntries()))}async updateTimestamp(e){await this._timestampModel.setTimestamp(e,Date.now())}async isURLExpired(e){if(this._maxAgeSeconds){const t=await this._timestampModel.getTimestamp(e),s=Date.now()-1e3*this._maxAgeSeconds;return void 0===t||t<s}return!1}async delete(){this._rerunRequested=!1,await this._timestampModel.expireEntries(1/0)}}const ee={cacheWillUpdate:async e=>{let{response:t}=e;return 200===t.status||0===t.status?t:null}};var te;(function(e){C().precache(e)})(([{'revision':'bb7a50860ab1d75802165fe09d599f77','url':'./index.html'},{'revision':null,'url':'./static/css/1371.f696fdbf.chunk.css'},{'revision':null,'url':'./static/css/4382.a5e3e6d6.chunk.css'},{'revision':null,'url':'./static/css/4665.5d6e9197.chunk.css'},{'revision':null,'url':'./static/css/6230.9cab926a.chunk.css'},{'revision':null,'url':'./static/css/7657.cc1ab277.chunk.css'},{'revision':null,'url':'./static/css/7676.7f909312.chunk.css'},{'revision':null,'url':'./static/css/8219.f696fdbf.chunk.css'},{'revision':null,'url':'./static/css/main.c9e90622.css'},{'revision':null,'url':'./static/js/1185.4672e754.chunk.js'},{'revision':null,'url':'./static/js/1294.5b08d5e3.chunk.js'},{'revision':null,'url':'./static/js/1361.c522d24a.chunk.js'},{'revision':null,'url':'./static/js/1366.da3d7a8e.chunk.js'},{'revision':null,'url':'./static/js/1371.08ecc84e.chunk.js'},{'revision':null,'url':'./static/js/1494.35b60e8f.chunk.js'},{'revision':null,'url':'./static/js/1524.dd0af8c0.chunk.js'},{'revision':null,'url':'./static/js/1667.488a600b.chunk.js'},{'revision':null,'url':'./static/js/1685.c6f7a83f.chunk.js'},{'revision':null,'url':'./static/js/1826.2ee3d019.chunk.js'},{'revision':null,'url':'./static/js/2129.fd2cfa2b.chunk.js'},{'revision':null,'url':'./static/js/2168.0e7f9ae7.chunk.js'},{'revision':null,'url':'./static/js/2183.e57ce8a2.chunk.js'},{'revision':null,'url':'./static/js/2294.6d1e1f1d.chunk.js'},{'revision':null,'url':'./static/js/2334.311ae46d.chunk.js'},{'revision':null,'url':'./static/js/2365.a3571172.chunk.js'},{'revision':null,'url':'./static/js/2435.88762f30.chunk.js'},{'revision':null,'url':'./static/js/2443.00426c01.chunk.js'},{'revision':null,'url':'./static/js/2529.061c5064.chunk.js'},{'revision':null,'url':'./static/js/253.e339f2b0.chunk.js'},{'revision':null,'url':'./static/js/2537.a919ce43.chunk.js'},{'revision':null,'url':'./static/js/2564.777b4d9f.chunk.js'},{'revision':null,'url':'./static/js/2611.3b62474f.chunk.js'},{'revision':null,'url':'./static/js/271.f7901bf2.chunk.js'},{'revision':null,'url':'./static/js/2720.147ae463.chunk.js'},{'revision':null,'url':'./static/js/2828.89d42424.chunk.js'},{'revision':null,'url':'./static/js/2911.92a82b04.chunk.js'},{'revision':null,'url':'./static/js/2960.6a54b27f.chunk.js'},{'revision':null,'url':'./static/js/3111.f44a8d78.chunk.js'},{'revision':null,'url':'./static/js/3135.f99a1aa8.chunk.js'},{'revision':null,'url':'./static/js/3137.93dab4d8.chunk.js'},{'revision':null,'url':'./static/js/3216.4aabeb78.chunk.js'},{'revision':null,'url':'./static/js/3389.282a0683.chunk.js'},{'revision':null,'url':'./static/js/3476.47d6170f.chunk.js'},{'revision':null,'url':'./static/js/3633.02809898.chunk.js'},{'revision':null,'url':'./static/js/3732.d5b401f7.chunk.js'},{'revision':null,'url':'./static/js/3829.2ca489ad.chunk.js'},{'revision':null,'url':'./static/js/3883.f14e204a.chunk.js'},{'revision':null,'url':'./static/js/3896.de9209b2.chunk.js'},{'revision':null,'url':'./static/js/4074.e94a9635.chunk.js'},{'revision':null,'url':'./static/js/4104.d4d484aa.chunk.js'},{'revision':null,'url':'./static/js/4240.ecc8270b.chunk.js'},{'revision':null,'url':'./static/js/4241.fe0e853e.chunk.js'},{'revision':null,'url':'./static/js/4274.75f87895.chunk.js'},{'revision':null,'url':'./static/js/4349.b225724a.chunk.js'},{'revision':null,'url':'./static/js/4382.0d3258d7.chunk.js'},{'revision':null,'url':'./static/js/442.d95b0c5a.chunk.js'},{'revision':null,'url':'./static/js/4471.a41284d9.chunk.js'},{'revision':null,'url':'./static/js/4509.231da63f.chunk.js'},{'revision':null,'url':'./static/js/4549.5fda7728.chunk.js'},{'revision':null,'url':'./static/js/4590.39f2b68f.chunk.js'},{'revision':null,'url':'./static/js/4631.f627efb4.chunk.js'},{'revision':null,'url':'./static/js/4775.19ec4c25.chunk.js'},{'revision':null,'url':'./static/js/4901.7dab9c36.chunk.js'},{'revision':null,'url':'./static/js/4906.aced1b76.chunk.js'},{'revision':null,'url':'./static/js/5059.b85795c1.chunk.js'},{'revision':null,'url':'./static/js/506.e1874511.chunk.js'},{'revision':null,'url':'./static/js/5074.5643e827.chunk.js'},{'revision':null,'url':'./static/js/5396.56766685.chunk.js'},{'revision':null,'url':'./static/js/5509.2e6eb7fd.chunk.js'},{'revision':null,'url':'./static/js/5526.1c49cfe0.chunk.js'},{'revision':null,'url':'./static/js/5555.3e38d927.chunk.js'},{'revision':null,'url':'./static/js/556.cfa178eb.chunk.js'},{'revision':null,'url':'./static/js/5672.19e3e3e6.chunk.js'},{'revision':null,'url':'./static/js/5760.82f7dc8f.chunk.js'},{'revision':null,'url':'./static/js/5804.c02bc104.chunk.js'},{'revision':null,'url':'./static/js/5979.4e4ebbf1.chunk.js'},{'revision':null,'url':'./static/js/6230.b1753197.chunk.js'},{'revision':null,'url':'./static/js/6511.623f368a.chunk.js'},{'revision':null,'url':'./static/js/6547.01abc819.chunk.js'},{'revision':null,'url':'./static/js/6580.fc3c74eb.chunk.js'},{'revision':null,'url':'./static/js/6602.34495e3d.chunk.js'},{'revision':null,'url':'./static/js/6780.0338caf8.chunk.js'},{'revision':null,'url':'./static/js/6830.1a23c027.chunk.js'},{'revision':null,'url':'./static/js/6931.a2586ea5.chunk.js'},{'revision':null,'url':'./static/js/6950.9b84af05.chunk.js'},{'revision':null,'url':'./static/js/7020.ccd573af.chunk.js'},{'revision':null,'url':'./static/js/7022.9d96c66f.chunk.js'},{'revision':null,'url':'./static/js/7150.ff7c498c.chunk.js'},{'revision':null,'url':'./static/js/744.74c12fbb.chunk.js'},{'revision':null,'url':'./static/js/7534.c27466a0.chunk.js'},{'revision':null,'url':'./static/js/7638.98fe2185.chunk.js'},{'revision':null,'url':'./static/js/7657.ec1da0b4.chunk.js'},{'revision':null,'url':'./static/js/7676.1bd862b3.chunk.js'},{'revision':null,'url':'./static/js/7687.1a079d52.chunk.js'},{'revision':null,'url':'./static/js/7706.74e51876.chunk.js'},{'revision':null,'url':'./static/js/7718.b0d91373.chunk.js'},{'revision':null,'url':'./static/js/7913.2359b90e.chunk.js'},{'revision':null,'url':'./static/js/8219.33f29652.chunk.js'},{'revision':null,'url':'./static/js/8249.b3efc43c.chunk.js'},{'revision':null,'url':'./static/js/8262.39716df6.chunk.js'},{'revision':null,'url':'./static/js/8537.b03e14a8.chunk.js'},{'revision':null,'url':'./static/js/8585.b9c88d3c.chunk.js'},{'revision':null,'url':'./static/js/8606.a872b105.chunk.js'},{'revision':null,'url':'./static/js/8986.d64838dd.chunk.js'},{'revision':null,'url':'./static/js/9038.aa97e3e5.chunk.js'},{'revision':null,'url':'./static/js/9041.77cacdd7.chunk.js'},{'revision':null,'url':'./static/js/9249.c5031d0b.chunk.js'},{'revision':null,'url':'./static/js/9327.4b32dd25.chunk.js'},{'revision':null,'url':'./static/js/95.08f81beb.chunk.js'},{'revision':null,'url':'./static/js/9517.ac659c32.chunk.js'},{'revision':null,'url':'./static/js/9552.3effa95b.chunk.js'},{'revision':null,'url':'./static/js/9580.5599a514.chunk.js'},{'revision':null,'url':'./static/js/9662.df51b9e7.chunk.js'},{'revision':null,'url':'./static/js/main.b3ba7d08.js'},{'revision':null,'url':'./static/media/lato-all-400-normal.3dc1eff492ab1f598560.woff'},{'revision':null,'url':'./static/media/lato-all-700-normal.1e7707c9ec98d9b97e7f.woff'},{'revision':null,'url':'./static/media/lato-latin-400-normal.be36596da218e1eec01c.woff2'},{'revision':null,'url':'./static/media/lato-latin-700-normal.8f28e0e1fdb195149f1c.woff2'},{'revision':null,'url':'./static/media/lato-latin-ext-400-normal.361f3dbb9db6a5980326.woff2'},{'revision':null,'url':'./static/media/lato-latin-ext-700-normal.9c8812eaec45956201e1.woff2'},{'revision':'3f75f5574309bf1ab1a642cae6cec338','url':'./static/media/logo.60f66bbe1ce9674a4df4e374c9d97fc4.svg'},{'revision':null,'url':'./static/media/ubuntu-mono-all-400-normal.c879328bc62e9c68268f.woff'},{'revision':null,'url':'./static/media/ubuntu-mono-cyrillic-400-normal.c367f416832eb8f1b846.woff2'},{'revision':null,'url':'./static/media/ubuntu-mono-cyrillic-ext-400-normal.eda1c4946b1f7bf58386.woff2'},{'revision':null,'url':'./static/media/ubuntu-mono-greek-400-normal.22f3bfc91f79c342bdf4.woff2'},{'revision':null,'url':'./static/media/ubuntu-mono-greek-ext-400-normal.b3459900ea8a25d1f7c2.woff2'},{'revision':null,'url':'./static/media/ubuntu-mono-latin-400-normal.18e32d9d743af28f913e.woff2'},{'revision':null,'url':'./static/media/ubuntu-mono-latin-ext-400-normal.b56e2315611d10838ad5.woff2'}]||[]).filter((e=>"/"!==e.url&&!e.url.includes("index.html")))),function(e){const t=C();T(new N(t,e))}(te),self.addEventListener("activate",(()=>self.clients.claim())),self.addEventListener("activate",(()=>{console.log("Service Worker activated")})),self.addEventListener("install",(e=>{console.log("Service Worker installed"),e.waitUntil(self.skipWaiting())}));const se=e=>"GET"!==e.method||(!!e.url.includes("/api")||(!!e.url.includes("__meta__.js")||!!e.url.includes("__blocklet__.js")));T((e=>{const{request:t}=e;return!se(t)&&t.url.includes("/static/")}),new class extends v{async _handle(e,s){let n,a=await s.cacheMatch(e);if(a)0;else{0;try{a=await s.fetchAndCachePut(e)}catch(r){r instanceof Error&&(n=r)}0}if(!a)throw new t("no-response",{url:e.url,error:n});return a}}({cacheName:"static",plugins:[new class{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.cachedResponseWillBeUsed=async e=>{let{event:t,request:s,cacheName:n,cachedResponse:a}=e;if(!a)return null;const r=this._isResponseDateFresh(a),i=this._getCacheExpiration(n);l(i.expireEntries());const c=i.updateTimestamp(s.url);if(t)try{t.waitUntil(c)}catch(o){0}return r?a:null},this.cacheDidUpdate=async e=>{let{cacheName:t,request:s}=e;const n=this._getCacheExpiration(t);await n.updateTimestamp(s.url),await n.expireEntries()},this._config=e,this._maxAgeSeconds=e.maxAgeSeconds,this._cacheExpirations=new Map,e.purgeOnQuotaError&&function(e){n.add(e)}((()=>this.deleteCacheAndMetadata()))}_getCacheExpiration(e){if(e===c())throw new t("expire-custom-caches-only");let s=this._cacheExpirations.get(e);return s||(s=new Z(e,this._config),this._cacheExpirations.set(e,s)),s}_isResponseDateFresh(e){if(!this._maxAgeSeconds)return!0;const t=this._getDateHeaderTimestamp(e);if(null===t)return!0;return t>=Date.now()-1e3*this._maxAgeSeconds}_getDateHeaderTimestamp(e){if(!e.headers.has("date"))return null;const t=e.headers.get("date"),s=new Date(t).getTime();return isNaN(s)?null:s}async deleteCacheAndMetadata(){for(const[e,t]of this._cacheExpirations)await self.caches.delete(e),await t.delete();this._cacheExpirations=new Map}}({maxEntries:200})]})),T((e=>{const{request:t}=e;return!se(t)&&(t.url.includes("/images/")||t.url.includes("/icons/"))}),new class extends v{constructor(){super(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),this.plugins.some((e=>"cacheWillUpdate"in e))||this.plugins.unshift(ee)}async _handle(e,s){const n=s.fetchAndCachePut(e).catch((()=>{}));s.waitUntil(n);let a,r=await s.cacheMatch(e);if(r)0;else{0;try{r=await n}catch(i){i instanceof Error&&(a=i)}}if(!r)throw new t("no-response",{url:e.url,error:a});return r}})})()})();
|
|
1
|
+
(()=>{"use strict";var e={522:()=>{try{self["workbox:core:6.5.3"]&&_()}catch(e){}},434:()=>{try{self["workbox:expiration:6.5.3"]&&_()}catch(e){}},290:()=>{try{self["workbox:precaching:6.5.3"]&&_()}catch(e){}},92:()=>{try{self["workbox:routing:6.5.3"]&&_()}catch(e){}},559:()=>{try{self["workbox:strategies:6.5.3"]&&_()}catch(e){}}},t={};function s(n){var a=t[n];if(void 0!==a)return a.exports;var r=t[n]={exports:{}};return e[n](r,r.exports,s),r.exports}(()=>{s(522);const e=function(e){let t=e;for(var s=arguments.length,n=new Array(s>1?s-1:0),a=1;a<s;a++)n[a-1]=arguments[a];return n.length>0&&(t+=" :: ".concat(JSON.stringify(n))),t};class t extends Error{constructor(t,s){super(e(t,s)),this.name=t,this.details=s}}const n=new Set;const a={googleAnalytics:"googleAnalytics",precache:"precache-v2",prefix:"workbox",runtime:"runtime",suffix:"undefined"!==typeof registration?registration.scope:""},r=e=>[a.prefix,e,a.suffix].filter((e=>e&&e.length>0)).join("-"),i=e=>e||r(a.precache),c=e=>e||r(a.runtime);function o(e,t){const s=new URL(e);for(const n of t)s.searchParams.delete(n);return s.href}let h;function l(e){e.then((()=>{}))}class u{constructor(){this.promise=new Promise(((e,t)=>{this.resolve=e,this.reject=t}))}}const d=e=>new URL(String(e),location.href).href.replace(new RegExp("^".concat(location.origin)),"");function f(e,t){const s=t();return e.waitUntil(s),s}async function p(e,s){let n=null;if(e.url){n=new URL(e.url).origin}if(n!==self.location.origin)throw new t("cross-origin-copy-response",{origin:n});const a=e.clone(),r={headers:new Headers(a.headers),status:a.status,statusText:a.statusText},i=s?s(r):r,c=function(){if(void 0===h){const t=new Response("");if("body"in t)try{new Response(t.body),h=!0}catch(e){h=!1}h=!1}return h}()?a.body:await a.blob();return new Response(c,i)}s(290);function g(e){if(!e)throw new t("add-to-cache-list-unexpected-type",{entry:e});if("string"===typeof e){const t=new URL(e,location.href);return{cacheKey:t.href,url:t.href}}const{revision:s,url:n}=e;if(!n)throw new t("add-to-cache-list-unexpected-type",{entry:e});if(!s){const e=new URL(n,location.href);return{cacheKey:e.href,url:e.href}}const a=new URL(n,location.href),r=new URL(n,location.href);return a.searchParams.set("__WB_REVISION__",s),{cacheKey:a.href,url:r.href}}class w{constructor(){this.updatedURLs=[],this.notUpdatedURLs=[],this.handlerWillStart=async e=>{let{request:t,state:s}=e;s&&(s.originalRequest=t)},this.cachedResponseWillBeUsed=async e=>{let{event:t,state:s,cachedResponse:n}=e;if("install"===t.type&&s&&s.originalRequest&&s.originalRequest instanceof Request){const e=s.originalRequest.url;n?this.notUpdatedURLs.push(e):this.updatedURLs.push(e)}return n}}}class y{constructor(e){let{precacheController:t}=e;this.cacheKeyWillBeUsed=async e=>{let{request:t,params:s}=e;const n=(null===s||void 0===s?void 0:s.cacheKey)||this._precacheController.getCacheKeyForURL(t.url);return n?new Request(n,{headers:t.headers}):t},this._precacheController=t}}s(559);function m(e){return"string"===typeof e?new Request(e):e}class _{constructor(e,t){this._cacheKeys={},Object.assign(this,t),this.event=t.event,this._strategy=e,this._handlerDeferred=new u,this._extendLifetimePromises=[],this._plugins=[...e.plugins],this._pluginStateMap=new Map;for(const s of this._plugins)this._pluginStateMap.set(s,{});this.event.waitUntil(this._handlerDeferred.promise)}async fetch(e){const{event:s}=this;let n=m(e);if("navigate"===n.mode&&s instanceof FetchEvent&&s.preloadResponse){const e=await s.preloadResponse;if(e)return e}const a=this.hasCallback("fetchDidFail")?n.clone():null;try{for(const e of this.iterateCallbacks("requestWillFetch"))n=await e({request:n.clone(),event:s})}catch(i){if(i instanceof Error)throw new t("plugin-error-request-will-fetch",{thrownErrorMessage:i.message})}const r=n.clone();try{let e;e=await fetch(n,"navigate"===n.mode?void 0:this._strategy.fetchOptions);for(const t of this.iterateCallbacks("fetchDidSucceed"))e=await t({event:s,request:r,response:e});return e}catch(c){throw a&&await this.runCallbacks("fetchDidFail",{error:c,event:s,originalRequest:a.clone(),request:r.clone()}),c}}async fetchAndCachePut(e){const t=await this.fetch(e),s=t.clone();return this.waitUntil(this.cachePut(e,s)),t}async cacheMatch(e){const t=m(e);let s;const{cacheName:n,matchOptions:a}=this._strategy,r=await this.getCacheKey(t,"read"),i=Object.assign(Object.assign({},a),{cacheName:n});s=await caches.match(r,i);for(const c of this.iterateCallbacks("cachedResponseWillBeUsed"))s=await c({cacheName:n,matchOptions:a,cachedResponse:s,request:r,event:this.event})||void 0;return s}async cachePut(e,s){const a=m(e);var r;await(r=0,new Promise((e=>setTimeout(e,r))));const i=await this.getCacheKey(a,"write");if(!s)throw new t("cache-put-with-no-response",{url:d(i.url)});const c=await this._ensureResponseSafeToCache(s);if(!c)return!1;const{cacheName:h,matchOptions:l}=this._strategy,u=await self.caches.open(h),f=this.hasCallback("cacheDidUpdate"),p=f?await async function(e,t,s,n){const a=o(t.url,s);if(t.url===a)return e.match(t,n);const r=Object.assign(Object.assign({},n),{ignoreSearch:!0}),i=await e.keys(t,r);for(const c of i)if(a===o(c.url,s))return e.match(c,n)}(u,i.clone(),["__WB_REVISION__"],l):null;try{await u.put(i,f?c.clone():c)}catch(g){if(g instanceof Error)throw"QuotaExceededError"===g.name&&await async function(){for(const e of n)await e()}(),g}for(const t of this.iterateCallbacks("cacheDidUpdate"))await t({cacheName:h,oldResponse:p,newResponse:c.clone(),request:i,event:this.event});return!0}async getCacheKey(e,t){const s="".concat(e.url," | ").concat(t);if(!this._cacheKeys[s]){let n=e;for(const e of this.iterateCallbacks("cacheKeyWillBeUsed"))n=m(await e({mode:t,request:n,event:this.event,params:this.params}));this._cacheKeys[s]=n}return this._cacheKeys[s]}hasCallback(e){for(const t of this._strategy.plugins)if(e in t)return!0;return!1}async runCallbacks(e,t){for(const s of this.iterateCallbacks(e))await s(t)}*iterateCallbacks(e){for(const t of this._strategy.plugins)if("function"===typeof t[e]){const s=this._pluginStateMap.get(t),n=n=>{const a=Object.assign(Object.assign({},n),{state:s});return t[e](a)};yield n}}waitUntil(e){return this._extendLifetimePromises.push(e),e}async doneWaiting(){let e;for(;e=this._extendLifetimePromises.shift();)await e}destroy(){this._handlerDeferred.resolve(null)}async _ensureResponseSafeToCache(e){let t=e,s=!1;for(const n of this.iterateCallbacks("cacheWillUpdate"))if(t=await n({request:this.request,response:t,event:this.event})||void 0,s=!0,!t)break;return s||t&&200!==t.status&&(t=void 0),t}}class v{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.cacheName=c(e.cacheName),this.plugins=e.plugins||[],this.fetchOptions=e.fetchOptions,this.matchOptions=e.matchOptions}handle(e){const[t]=this.handleAll(e);return t}handleAll(e){e instanceof FetchEvent&&(e={event:e,request:e.request});const t=e.event,s="string"===typeof e.request?new Request(e.request):e.request,n="params"in e?e.params:void 0,a=new _(this,{event:t,request:s,params:n}),r=this._getResponse(a,s,t);return[r,this._awaitComplete(r,a,s,t)]}async _getResponse(e,s,n){let a;await e.runCallbacks("handlerWillStart",{event:n,request:s});try{if(a=await this._handle(s,e),!a||"error"===a.type)throw new t("no-response",{url:s.url})}catch(r){if(r instanceof Error)for(const t of e.iterateCallbacks("handlerDidError"))if(a=await t({error:r,event:n,request:s}),a)break;if(!a)throw r}for(const t of e.iterateCallbacks("handlerWillRespond"))a=await t({event:n,request:s,response:a});return a}async _awaitComplete(e,t,s,n){let a,r;try{a=await e}catch(r){}try{await t.runCallbacks("handlerDidRespond",{event:n,request:s,response:a}),await t.doneWaiting()}catch(i){i instanceof Error&&(r=i)}if(await t.runCallbacks("handlerDidComplete",{event:n,request:s,response:a,error:r}),t.destroy(),r)throw r}}class b extends v{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.cacheName=i(e.cacheName),super(e),this._fallbackToNetwork=!1!==e.fallbackToNetwork,this.plugins.push(b.copyRedirectedCacheableResponsesPlugin)}async _handle(e,t){const s=await t.cacheMatch(e);return s||(t.event&&"install"===t.event.type?await this._handleInstall(e,t):await this._handleFetch(e,t))}async _handleFetch(e,s){let n;const a=s.params||{};if(!this._fallbackToNetwork)throw new t("missing-precache-entry",{cacheName:this.cacheName,url:e.url});{0;const t=a.integrity,r=e.integrity,i=!r||r===t;if(n=await s.fetch(new Request(e,{integrity:"no-cors"!==e.mode?r||t:void 0})),t&&i&&"no-cors"!==e.mode){this._useDefaultCacheabilityPluginIfNeeded();await s.cachePut(e,n.clone());0}}return n}async _handleInstall(e,s){this._useDefaultCacheabilityPluginIfNeeded();const n=await s.fetch(e);if(!await s.cachePut(e,n.clone()))throw new t("bad-precaching-response",{url:e.url,status:n.status});return n}_useDefaultCacheabilityPluginIfNeeded(){let e=null,t=0;for(const[s,n]of this.plugins.entries())n!==b.copyRedirectedCacheableResponsesPlugin&&(n===b.defaultPrecacheCacheabilityPlugin&&(e=s),n.cacheWillUpdate&&t++);0===t?this.plugins.push(b.defaultPrecacheCacheabilityPlugin):t>1&&null!==e&&this.plugins.splice(e,1)}}b.defaultPrecacheCacheabilityPlugin={async cacheWillUpdate(e){let{response:t}=e;return!t||t.status>=400?null:t}},b.copyRedirectedCacheableResponsesPlugin={async cacheWillUpdate(e){let{response:t}=e;return t.redirected?await p(t):t}};class R{constructor(){let{cacheName:e,plugins:t=[],fallbackToNetwork:s=!0}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this._urlsToCacheKeys=new Map,this._urlsToCacheModes=new Map,this._cacheKeysToIntegrities=new Map,this._strategy=new b({cacheName:i(e),plugins:[...t,new y({precacheController:this})],fallbackToNetwork:s}),this.install=this.install.bind(this),this.activate=this.activate.bind(this)}get strategy(){return this._strategy}precache(e){this.addToCacheList(e),this._installAndActiveListenersAdded||(self.addEventListener("install",this.install),self.addEventListener("activate",this.activate),this._installAndActiveListenersAdded=!0)}addToCacheList(e){const s=[];for(const n of e){"string"===typeof n?s.push(n):n&&void 0===n.revision&&s.push(n.url);const{cacheKey:e,url:a}=g(n),r="string"!==typeof n&&n.revision?"reload":"default";if(this._urlsToCacheKeys.has(a)&&this._urlsToCacheKeys.get(a)!==e)throw new t("add-to-cache-list-conflicting-entries",{firstEntry:this._urlsToCacheKeys.get(a),secondEntry:e});if("string"!==typeof n&&n.integrity){if(this._cacheKeysToIntegrities.has(e)&&this._cacheKeysToIntegrities.get(e)!==n.integrity)throw new t("add-to-cache-list-conflicting-integrities",{url:a});this._cacheKeysToIntegrities.set(e,n.integrity)}if(this._urlsToCacheKeys.set(a,e),this._urlsToCacheModes.set(a,r),s.length>0){const e="Workbox is precaching URLs without revision "+"info: ".concat(s.join(", "),"\nThis is generally NOT safe. ")+"Learn more at https://bit.ly/wb-precache";console.warn(e)}}}install(e){return f(e,(async()=>{const t=new w;this.strategy.plugins.push(t);for(const[a,r]of this._urlsToCacheKeys){const t=this._cacheKeysToIntegrities.get(r),s=this._urlsToCacheModes.get(a),n=new Request(a,{integrity:t,cache:s,credentials:"same-origin"});await Promise.all(this.strategy.handleAll({params:{cacheKey:r},request:n,event:e}))}const{updatedURLs:s,notUpdatedURLs:n}=t;return{updatedURLs:s,notUpdatedURLs:n}}))}activate(e){return f(e,(async()=>{const e=await self.caches.open(this.strategy.cacheName),t=await e.keys(),s=new Set(this._urlsToCacheKeys.values()),n=[];for(const a of t)s.has(a.url)||(await e.delete(a),n.push(a.url));return{deletedURLs:n}}))}getURLsToCacheKeys(){return this._urlsToCacheKeys}getCachedURLs(){return[...this._urlsToCacheKeys.keys()]}getCacheKeyForURL(e){const t=new URL(e,location.href);return this._urlsToCacheKeys.get(t.href)}getIntegrityForCacheKey(e){return this._cacheKeysToIntegrities.get(e)}async matchPrecache(e){const t=e instanceof Request?e.url:e,s=this.getCacheKeyForURL(t);if(s){return(await self.caches.open(this.strategy.cacheName)).match(s)}}createHandlerBoundToURL(e){const s=this.getCacheKeyForURL(e);if(!s)throw new t("non-precached-url",{url:e});return t=>(t.request=new Request(e),t.params=Object.assign({cacheKey:s},t.params),this.strategy.handle(t))}}let x;const C=()=>(x||(x=new R),x);s(92);const E=e=>e&&"object"===typeof e?e:{handle:e};class L{constructor(e,t){let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"GET";this.handler=E(t),this.match=e,this.method=s}setCatchHandler(e){this.catchHandler=E(e)}}class q extends L{constructor(e,t,s){super((t=>{let{url:s}=t;const n=e.exec(s.href);if(n&&(s.origin===location.origin||0===n.index))return n.slice(1)}),t,s)}}class D{constructor(){this._routes=new Map,this._defaultHandlerMap=new Map}get routes(){return this._routes}addFetchListener(){self.addEventListener("fetch",(e=>{const{request:t}=e,s=this.handleRequest({request:t,event:e});s&&e.respondWith(s)}))}addCacheListener(){self.addEventListener("message",(e=>{if(e.data&&"CACHE_URLS"===e.data.type){const{payload:t}=e.data;0;const s=Promise.all(t.urlsToCache.map((t=>{"string"===typeof t&&(t=[t]);const s=new Request(...t);return this.handleRequest({request:s,event:e})})));e.waitUntil(s),e.ports&&e.ports[0]&&s.then((()=>e.ports[0].postMessage(!0)))}}))}handleRequest(e){let{request:t,event:s}=e;const n=new URL(t.url,location.href);if(!n.protocol.startsWith("http"))return void 0;const a=n.origin===location.origin,{params:r,route:i}=this.findMatchingRoute({event:s,request:t,sameOrigin:a,url:n});let c=i&&i.handler;const o=t.method;if(!c&&this._defaultHandlerMap.has(o)&&(c=this._defaultHandlerMap.get(o)),!c)return void 0;let h;try{h=c.handle({url:n,request:t,event:s,params:r})}catch(u){h=Promise.reject(u)}const l=i&&i.catchHandler;return h instanceof Promise&&(this._catchHandler||l)&&(h=h.catch((async e=>{if(l){0;try{return await l.handle({url:n,request:t,event:s,params:r})}catch(a){a instanceof Error&&(e=a)}}if(this._catchHandler)return this._catchHandler.handle({url:n,request:t,event:s});throw e}))),h}findMatchingRoute(e){let{url:t,sameOrigin:s,request:n,event:a}=e;const r=this._routes.get(n.method)||[];for(const i of r){let e;const r=i.match({url:t,sameOrigin:s,request:n,event:a});if(r)return e=r,(Array.isArray(e)&&0===e.length||r.constructor===Object&&0===Object.keys(r).length||"boolean"===typeof r)&&(e=void 0),{route:i,params:e}}return{}}setDefaultHandler(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"GET";this._defaultHandlerMap.set(t,E(e))}setCatchHandler(e){this._catchHandler=E(e)}registerRoute(e){this._routes.has(e.method)||this._routes.set(e.method,[]),this._routes.get(e.method).push(e)}unregisterRoute(e){if(!this._routes.has(e.method))throw new t("unregister-route-but-not-found-with-method",{method:e.method});const s=this._routes.get(e.method).indexOf(e);if(!(s>-1))throw new t("unregister-route-route-not-registered");this._routes.get(e.method).splice(s,1)}}let U;const k=()=>(U||(U=new D,U.addFetchListener(),U.addCacheListener()),U);function T(e,s,n){let a;if("string"===typeof e){const t=new URL(e,location.href);0;a=new L((e=>{let{url:s}=e;return s.href===t.href}),s,n)}else if(e instanceof RegExp)a=new q(e,s,n);else if("function"===typeof e)a=new L(e,s,n);else{if(!(e instanceof L))throw new t("unsupported-route-type",{moduleName:"workbox-routing",funcName:"registerRoute",paramName:"capture"});a=e}return k().registerRoute(a),a}class N extends L{constructor(e,t){super((s=>{let{request:n}=s;const a=e.getURLsToCacheKeys();for(const r of function(e){let{ignoreURLParametersMatching:t=[/^utm_/,/^fbclid$/],directoryIndex:s="index.html",cleanURLs:n=!0,urlManipulation:a}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function*(){const r=new URL(e,location.href);r.hash="",yield r.href;const i=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];for(const s of[...e.searchParams.keys()])t.some((e=>e.test(s)))&&e.searchParams.delete(s);return e}(r,t);if(yield i.href,s&&i.pathname.endsWith("/")){const e=new URL(i.href);e.pathname+=s,yield e.href}if(n){const e=new URL(i.href);e.pathname+=".html",yield e.href}if(a){const e=a({url:r});for(const t of e)yield t.href}}()}(n.url,t)){const t=a.get(r);if(t){return{cacheKey:t,integrity:e.getIntegrityForCacheKey(t)}}}}),e.strategy)}}const I=(e,t)=>t.some((t=>e instanceof t));let K,M;const A=new WeakMap,P=new WeakMap,S=new WeakMap,O=new WeakMap,W=new WeakMap;let B={get(e,t,s){if(e instanceof IDBTransaction){if("done"===t)return P.get(e);if("objectStoreNames"===t)return e.objectStoreNames||S.get(e);if("store"===t)return s.objectStoreNames[1]?void 0:s.objectStore(s.objectStoreNames[0])}return H(e[t])},set:(e,t,s)=>(e[t]=s,!0),has:(e,t)=>e instanceof IDBTransaction&&("done"===t||"store"===t)||t in e};function j(e){return e!==IDBDatabase.prototype.transaction||"objectStoreNames"in IDBTransaction.prototype?(M||(M=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])).includes(e)?function(){for(var t=arguments.length,s=new Array(t),n=0;n<t;n++)s[n]=arguments[n];return e.apply(V(this),s),H(A.get(this))}:function(){for(var t=arguments.length,s=new Array(t),n=0;n<t;n++)s[n]=arguments[n];return H(e.apply(V(this),s))}:function(t){for(var s=arguments.length,n=new Array(s>1?s-1:0),a=1;a<s;a++)n[a-1]=arguments[a];const r=e.call(V(this),t,...n);return S.set(r,t.sort?t.sort():[t]),H(r)}}function F(e){return"function"===typeof e?j(e):(e instanceof IDBTransaction&&function(e){if(P.has(e))return;const t=new Promise(((t,s)=>{const n=()=>{e.removeEventListener("complete",a),e.removeEventListener("error",r),e.removeEventListener("abort",r)},a=()=>{t(),n()},r=()=>{s(e.error||new DOMException("AbortError","AbortError")),n()};e.addEventListener("complete",a),e.addEventListener("error",r),e.addEventListener("abort",r)}));P.set(e,t)}(e),I(e,K||(K=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction]))?new Proxy(e,B):e)}function H(e){if(e instanceof IDBRequest)return function(e){const t=new Promise(((t,s)=>{const n=()=>{e.removeEventListener("success",a),e.removeEventListener("error",r)},a=()=>{t(H(e.result)),n()},r=()=>{s(e.error),n()};e.addEventListener("success",a),e.addEventListener("error",r)}));return t.then((t=>{t instanceof IDBCursor&&A.set(t,e)})).catch((()=>{})),W.set(t,e),t}(e);if(O.has(e))return O.get(e);const t=F(e);return t!==e&&(O.set(e,t),W.set(t,e)),t}const V=e=>W.get(e);const G=["get","getKey","getAll","getAllKeys","count"],Q=["put","add","delete","clear"],$=new Map;function J(e,t){if(!(e instanceof IDBDatabase)||t in e||"string"!==typeof t)return;if($.get(t))return $.get(t);const s=t.replace(/FromIndex$/,""),n=t!==s,a=Q.includes(s);if(!(s in(n?IDBIndex:IDBObjectStore).prototype)||!a&&!G.includes(s))return;const r=async function(e){const t=this.transaction(e,a?"readwrite":"readonly");let r=t.store;for(var i=arguments.length,c=new Array(i>1?i-1:0),o=1;o<i;o++)c[o-1]=arguments[o];return n&&(r=r.index(c.shift())),(await Promise.all([r[s](...c),a&&t.done]))[0]};return $.set(t,r),r}B=(e=>({...e,get:(t,s,n)=>J(t,s)||e.get(t,s,n),has:(t,s)=>!!J(t,s)||e.has(t,s)}))(B);s(434);const z="cache-entries",X=e=>{const t=new URL(e,location.href);return t.hash="",t.href};class Y{constructor(e){this._db=null,this._cacheName=e}_upgradeDb(e){const t=e.createObjectStore(z,{keyPath:"id"});t.createIndex("cacheName","cacheName",{unique:!1}),t.createIndex("timestamp","timestamp",{unique:!1})}_upgradeDbAndDeleteOldDbs(e){this._upgradeDb(e),this._cacheName&&function(e){let{blocked:t}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const s=indexedDB.deleteDatabase(e);t&&s.addEventListener("blocked",(e=>t(e.oldVersion,e))),H(s).then((()=>{}))}(this._cacheName)}async setTimestamp(e,t){const s={url:e=X(e),timestamp:t,cacheName:this._cacheName,id:this._getId(e)},n=(await this.getDb()).transaction(z,"readwrite",{durability:"relaxed"});await n.store.put(s),await n.done}async getTimestamp(e){const t=await this.getDb(),s=await t.get(z,this._getId(e));return null===s||void 0===s?void 0:s.timestamp}async expireEntries(e,t){const s=await this.getDb();let n=await s.transaction(z).store.index("timestamp").openCursor(null,"prev");const a=[];let r=0;for(;n;){const s=n.value;s.cacheName===this._cacheName&&(e&&s.timestamp<e||t&&r>=t?a.push(n.value):r++),n=await n.continue()}const i=[];for(const c of a)await s.delete(z,c.id),i.push(c.url);return i}_getId(e){return this._cacheName+"|"+X(e)}async getDb(){return this._db||(this._db=await function(e,t){let{blocked:s,upgrade:n,blocking:a,terminated:r}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const i=indexedDB.open(e,t),c=H(i);return n&&i.addEventListener("upgradeneeded",(e=>{n(H(i.result),e.oldVersion,e.newVersion,H(i.transaction),e)})),s&&i.addEventListener("blocked",(e=>s(e.oldVersion,e.newVersion,e))),c.then((e=>{r&&e.addEventListener("close",(()=>r())),a&&e.addEventListener("versionchange",(e=>a(e.oldVersion,e.newVersion,e)))})).catch((()=>{})),c}("workbox-expiration",1,{upgrade:this._upgradeDbAndDeleteOldDbs.bind(this)})),this._db}}class Z{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this._isRunning=!1,this._rerunRequested=!1,this._maxEntries=t.maxEntries,this._maxAgeSeconds=t.maxAgeSeconds,this._matchOptions=t.matchOptions,this._cacheName=e,this._timestampModel=new Y(e)}async expireEntries(){if(this._isRunning)return void(this._rerunRequested=!0);this._isRunning=!0;const e=this._maxAgeSeconds?Date.now()-1e3*this._maxAgeSeconds:0,t=await this._timestampModel.expireEntries(e,this._maxEntries),s=await self.caches.open(this._cacheName);for(const n of t)await s.delete(n,this._matchOptions);this._isRunning=!1,this._rerunRequested&&(this._rerunRequested=!1,l(this.expireEntries()))}async updateTimestamp(e){await this._timestampModel.setTimestamp(e,Date.now())}async isURLExpired(e){if(this._maxAgeSeconds){const t=await this._timestampModel.getTimestamp(e),s=Date.now()-1e3*this._maxAgeSeconds;return void 0===t||t<s}return!1}async delete(){this._rerunRequested=!1,await this._timestampModel.expireEntries(1/0)}}const ee={cacheWillUpdate:async e=>{let{response:t}=e;return 200===t.status||0===t.status?t:null}};var te;(function(e){C().precache(e)})(([{'revision':'b45573ff2ff96626ca52c76e6fa864b6','url':'./index.html'},{'revision':null,'url':'./static/css/1371.f696fdbf.chunk.css'},{'revision':null,'url':'./static/css/4382.a5e3e6d6.chunk.css'},{'revision':null,'url':'./static/css/4665.5d6e9197.chunk.css'},{'revision':null,'url':'./static/css/6230.9cab926a.chunk.css'},{'revision':null,'url':'./static/css/7657.cc1ab277.chunk.css'},{'revision':null,'url':'./static/css/7676.7f909312.chunk.css'},{'revision':null,'url':'./static/css/8219.f696fdbf.chunk.css'},{'revision':null,'url':'./static/css/main.c9e90622.css'},{'revision':null,'url':'./static/js/1185.4672e754.chunk.js'},{'revision':null,'url':'./static/js/1294.5b08d5e3.chunk.js'},{'revision':null,'url':'./static/js/1361.c522d24a.chunk.js'},{'revision':null,'url':'./static/js/1366.da3d7a8e.chunk.js'},{'revision':null,'url':'./static/js/1371.08ecc84e.chunk.js'},{'revision':null,'url':'./static/js/1494.35b60e8f.chunk.js'},{'revision':null,'url':'./static/js/1524.dd0af8c0.chunk.js'},{'revision':null,'url':'./static/js/1667.488a600b.chunk.js'},{'revision':null,'url':'./static/js/1685.c6f7a83f.chunk.js'},{'revision':null,'url':'./static/js/1826.2ee3d019.chunk.js'},{'revision':null,'url':'./static/js/2129.fd2cfa2b.chunk.js'},{'revision':null,'url':'./static/js/2168.0e7f9ae7.chunk.js'},{'revision':null,'url':'./static/js/2183.e57ce8a2.chunk.js'},{'revision':null,'url':'./static/js/2294.6d1e1f1d.chunk.js'},{'revision':null,'url':'./static/js/2334.311ae46d.chunk.js'},{'revision':null,'url':'./static/js/2365.a3571172.chunk.js'},{'revision':null,'url':'./static/js/2435.88762f30.chunk.js'},{'revision':null,'url':'./static/js/2443.00426c01.chunk.js'},{'revision':null,'url':'./static/js/2529.061c5064.chunk.js'},{'revision':null,'url':'./static/js/253.e339f2b0.chunk.js'},{'revision':null,'url':'./static/js/2537.a919ce43.chunk.js'},{'revision':null,'url':'./static/js/2564.777b4d9f.chunk.js'},{'revision':null,'url':'./static/js/2611.3b62474f.chunk.js'},{'revision':null,'url':'./static/js/271.f7901bf2.chunk.js'},{'revision':null,'url':'./static/js/2720.147ae463.chunk.js'},{'revision':null,'url':'./static/js/2828.89d42424.chunk.js'},{'revision':null,'url':'./static/js/2911.92a82b04.chunk.js'},{'revision':null,'url':'./static/js/2960.6a54b27f.chunk.js'},{'revision':null,'url':'./static/js/3111.f44a8d78.chunk.js'},{'revision':null,'url':'./static/js/3135.f99a1aa8.chunk.js'},{'revision':null,'url':'./static/js/3137.93dab4d8.chunk.js'},{'revision':null,'url':'./static/js/3216.4aabeb78.chunk.js'},{'revision':null,'url':'./static/js/3389.282a0683.chunk.js'},{'revision':null,'url':'./static/js/3476.47d6170f.chunk.js'},{'revision':null,'url':'./static/js/3633.02809898.chunk.js'},{'revision':null,'url':'./static/js/3732.d5b401f7.chunk.js'},{'revision':null,'url':'./static/js/3829.2ca489ad.chunk.js'},{'revision':null,'url':'./static/js/3883.f14e204a.chunk.js'},{'revision':null,'url':'./static/js/3896.de9209b2.chunk.js'},{'revision':null,'url':'./static/js/4074.e94a9635.chunk.js'},{'revision':null,'url':'./static/js/4104.d4d484aa.chunk.js'},{'revision':null,'url':'./static/js/4240.ecc8270b.chunk.js'},{'revision':null,'url':'./static/js/4241.fe0e853e.chunk.js'},{'revision':null,'url':'./static/js/4274.75f87895.chunk.js'},{'revision':null,'url':'./static/js/4349.b225724a.chunk.js'},{'revision':null,'url':'./static/js/4382.0d3258d7.chunk.js'},{'revision':null,'url':'./static/js/442.d95b0c5a.chunk.js'},{'revision':null,'url':'./static/js/4471.a41284d9.chunk.js'},{'revision':null,'url':'./static/js/4509.231da63f.chunk.js'},{'revision':null,'url':'./static/js/4549.329cdc3b.chunk.js'},{'revision':null,'url':'./static/js/4590.39f2b68f.chunk.js'},{'revision':null,'url':'./static/js/4631.f627efb4.chunk.js'},{'revision':null,'url':'./static/js/4775.19ec4c25.chunk.js'},{'revision':null,'url':'./static/js/4901.7dab9c36.chunk.js'},{'revision':null,'url':'./static/js/4906.aced1b76.chunk.js'},{'revision':null,'url':'./static/js/5059.b85795c1.chunk.js'},{'revision':null,'url':'./static/js/506.e1874511.chunk.js'},{'revision':null,'url':'./static/js/5074.5643e827.chunk.js'},{'revision':null,'url':'./static/js/5396.56766685.chunk.js'},{'revision':null,'url':'./static/js/5509.2e6eb7fd.chunk.js'},{'revision':null,'url':'./static/js/5526.1c49cfe0.chunk.js'},{'revision':null,'url':'./static/js/5555.3e38d927.chunk.js'},{'revision':null,'url':'./static/js/556.cfa178eb.chunk.js'},{'revision':null,'url':'./static/js/5672.19e3e3e6.chunk.js'},{'revision':null,'url':'./static/js/5760.82f7dc8f.chunk.js'},{'revision':null,'url':'./static/js/5804.c02bc104.chunk.js'},{'revision':null,'url':'./static/js/5979.4e4ebbf1.chunk.js'},{'revision':null,'url':'./static/js/6230.b1753197.chunk.js'},{'revision':null,'url':'./static/js/6511.623f368a.chunk.js'},{'revision':null,'url':'./static/js/6547.01abc819.chunk.js'},{'revision':null,'url':'./static/js/6580.fc3c74eb.chunk.js'},{'revision':null,'url':'./static/js/6602.34495e3d.chunk.js'},{'revision':null,'url':'./static/js/6780.0338caf8.chunk.js'},{'revision':null,'url':'./static/js/6830.1a23c027.chunk.js'},{'revision':null,'url':'./static/js/6931.a2586ea5.chunk.js'},{'revision':null,'url':'./static/js/6950.9b84af05.chunk.js'},{'revision':null,'url':'./static/js/7020.ccd573af.chunk.js'},{'revision':null,'url':'./static/js/7022.9d96c66f.chunk.js'},{'revision':null,'url':'./static/js/7150.ff7c498c.chunk.js'},{'revision':null,'url':'./static/js/744.74c12fbb.chunk.js'},{'revision':null,'url':'./static/js/7534.c27466a0.chunk.js'},{'revision':null,'url':'./static/js/7638.98fe2185.chunk.js'},{'revision':null,'url':'./static/js/7657.ec1da0b4.chunk.js'},{'revision':null,'url':'./static/js/7676.1bd862b3.chunk.js'},{'revision':null,'url':'./static/js/7687.1a079d52.chunk.js'},{'revision':null,'url':'./static/js/7706.74e51876.chunk.js'},{'revision':null,'url':'./static/js/7718.b0d91373.chunk.js'},{'revision':null,'url':'./static/js/7913.2359b90e.chunk.js'},{'revision':null,'url':'./static/js/8219.33f29652.chunk.js'},{'revision':null,'url':'./static/js/8249.b3efc43c.chunk.js'},{'revision':null,'url':'./static/js/8262.39716df6.chunk.js'},{'revision':null,'url':'./static/js/8537.b03e14a8.chunk.js'},{'revision':null,'url':'./static/js/8585.b9c88d3c.chunk.js'},{'revision':null,'url':'./static/js/8606.a872b105.chunk.js'},{'revision':null,'url':'./static/js/8986.d64838dd.chunk.js'},{'revision':null,'url':'./static/js/9038.aa97e3e5.chunk.js'},{'revision':null,'url':'./static/js/9041.77cacdd7.chunk.js'},{'revision':null,'url':'./static/js/9249.c5031d0b.chunk.js'},{'revision':null,'url':'./static/js/9327.4b32dd25.chunk.js'},{'revision':null,'url':'./static/js/95.08f81beb.chunk.js'},{'revision':null,'url':'./static/js/9517.ac659c32.chunk.js'},{'revision':null,'url':'./static/js/9552.3effa95b.chunk.js'},{'revision':null,'url':'./static/js/9580.5599a514.chunk.js'},{'revision':null,'url':'./static/js/9662.df51b9e7.chunk.js'},{'revision':null,'url':'./static/js/main.0b0bf90f.js'},{'revision':null,'url':'./static/media/lato-all-400-normal.3dc1eff492ab1f598560.woff'},{'revision':null,'url':'./static/media/lato-all-700-normal.1e7707c9ec98d9b97e7f.woff'},{'revision':null,'url':'./static/media/lato-latin-400-normal.be36596da218e1eec01c.woff2'},{'revision':null,'url':'./static/media/lato-latin-700-normal.8f28e0e1fdb195149f1c.woff2'},{'revision':null,'url':'./static/media/lato-latin-ext-400-normal.361f3dbb9db6a5980326.woff2'},{'revision':null,'url':'./static/media/lato-latin-ext-700-normal.9c8812eaec45956201e1.woff2'},{'revision':'3f75f5574309bf1ab1a642cae6cec338','url':'./static/media/logo.60f66bbe1ce9674a4df4e374c9d97fc4.svg'},{'revision':null,'url':'./static/media/ubuntu-mono-all-400-normal.c879328bc62e9c68268f.woff'},{'revision':null,'url':'./static/media/ubuntu-mono-cyrillic-400-normal.c367f416832eb8f1b846.woff2'},{'revision':null,'url':'./static/media/ubuntu-mono-cyrillic-ext-400-normal.eda1c4946b1f7bf58386.woff2'},{'revision':null,'url':'./static/media/ubuntu-mono-greek-400-normal.22f3bfc91f79c342bdf4.woff2'},{'revision':null,'url':'./static/media/ubuntu-mono-greek-ext-400-normal.b3459900ea8a25d1f7c2.woff2'},{'revision':null,'url':'./static/media/ubuntu-mono-latin-400-normal.18e32d9d743af28f913e.woff2'},{'revision':null,'url':'./static/media/ubuntu-mono-latin-ext-400-normal.b56e2315611d10838ad5.woff2'}]||[]).filter((e=>"/"!==e.url&&!e.url.includes("index.html")))),function(e){const t=C();T(new N(t,e))}(te),self.addEventListener("activate",(()=>self.clients.claim())),self.addEventListener("activate",(()=>{console.log("Service Worker activated")})),self.addEventListener("install",(e=>{console.log("Service Worker installed"),e.waitUntil(self.skipWaiting())}));const se=e=>"GET"!==e.method||(!!e.url.includes("/api")||(!!e.url.includes("__meta__.js")||!!e.url.includes("__blocklet__.js")));T((e=>{const{request:t}=e;return!se(t)&&t.url.includes("/static/")}),new class extends v{async _handle(e,s){let n,a=await s.cacheMatch(e);if(a)0;else{0;try{a=await s.fetchAndCachePut(e)}catch(r){r instanceof Error&&(n=r)}0}if(!a)throw new t("no-response",{url:e.url,error:n});return a}}({cacheName:"static",plugins:[new class{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.cachedResponseWillBeUsed=async e=>{let{event:t,request:s,cacheName:n,cachedResponse:a}=e;if(!a)return null;const r=this._isResponseDateFresh(a),i=this._getCacheExpiration(n);l(i.expireEntries());const c=i.updateTimestamp(s.url);if(t)try{t.waitUntil(c)}catch(o){0}return r?a:null},this.cacheDidUpdate=async e=>{let{cacheName:t,request:s}=e;const n=this._getCacheExpiration(t);await n.updateTimestamp(s.url),await n.expireEntries()},this._config=e,this._maxAgeSeconds=e.maxAgeSeconds,this._cacheExpirations=new Map,e.purgeOnQuotaError&&function(e){n.add(e)}((()=>this.deleteCacheAndMetadata()))}_getCacheExpiration(e){if(e===c())throw new t("expire-custom-caches-only");let s=this._cacheExpirations.get(e);return s||(s=new Z(e,this._config),this._cacheExpirations.set(e,s)),s}_isResponseDateFresh(e){if(!this._maxAgeSeconds)return!0;const t=this._getDateHeaderTimestamp(e);if(null===t)return!0;return t>=Date.now()-1e3*this._maxAgeSeconds}_getDateHeaderTimestamp(e){if(!e.headers.has("date"))return null;const t=e.headers.get("date"),s=new Date(t).getTime();return isNaN(s)?null:s}async deleteCacheAndMetadata(){for(const[e,t]of this._cacheExpirations)await self.caches.delete(e),await t.delete();this._cacheExpirations=new Map}}({maxEntries:200})]})),T((e=>{const{request:t}=e;return!se(t)&&(t.url.includes("/images/")||t.url.includes("/icons/"))}),new class extends v{constructor(){super(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),this.plugins.some((e=>"cacheWillUpdate"in e))||this.plugins.unshift(ee)}async _handle(e,s){const n=s.fetchAndCachePut(e).catch((()=>{}));s.waitUntil(n);let a,r=await s.cacheMatch(e);if(r)0;else{0;try{r=await n}catch(i){i instanceof Error&&(a=i)}}if(!r)throw new t("no-response",{url:e.url,error:a});return r}})})()})();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_abtnode_webapp=self.webpackChunk_abtnode_webapp||[]).push([[4549],{56742:(e,n,i)=>{const{toBuffer:t,toAddress:o}=i(49394),{base32:r}=i(46422);e.exports={encode:e=>{if(!e)return e;const n=t(o(e));return r.encode(n)}}},44543:(e,n,i)=>{const t=i(57156);e.exports=(e,n)=>t(e)===t(n)},92726:(e,n,i)=>{"use strict";i.d(n,{Z:()=>x});var t,o=i(71171),r=i(5057),a=i(55898),s=i.n(a),l=i(33518),d=i(67680),c=i(61533),m=i(74490),u=i(45267),p=i(46954),f=i(44067),h=i(96266);function x(e){let{actions:n,size:i,...t}=e;const[o,a]=(0,r.useState)(null),s=Boolean(o),l=e=>{try{e.stopPropagation(),e.preventDefault()}catch{}a(null)};return(0,h.jsxs)(g,{...t,children:[(0,h.jsx)(d.Z,{"aria-label":"more","aria-controls":"actions-menu","aria-haspopup":"true","data-cy":"actions-menu-icon",onClick:e=>{try{e.stopPropagation(),e.preventDefault()}catch{}a(e.currentTarget)},size:i,children:(0,h.jsx)(u.Z,{})}),(0,h.jsx)(c.Z,{id:"actions-menu","data-cy":"actions-menu",anchorEl:o,keepMounted:!0,open:s,onClose:l,PaperProps:{},children:n.map(((e,n)=>{if("function"===typeof e)return e({close:l});const{icon:i,text:t,onClick:o,disabled:a=!1,...s}=e;return(0,r.createElement)(m.Z,{...s,disabled:a,dense:!0,onClick:async e=>{await o(e),l()},key:n,"data-cy":"actions-menu-".concat(n)},(0,h.jsx)(p.Z,{style:{minWidth:24,marginRight:8},children:i}),(0,h.jsx)(f.Z,{primary:t}))}))})]})}x.propTypes={actions:s().array,size:s().oneOf(["small","medium","large"])},x.defaultProps={actions:[],size:"small"};const g=l.Z.div(t||(t=(0,o.Z)([""])))},64549:(e,n,i)=>{"use strict";i.r(n),i.d(n,{default:()=>Ue});var t=i(71171),o=i(28726),r=i(33518),a=i(5057),s=i(17655),l=i(76720),d=i(64886),c=i(68420),m=i(19778),u=i(38242),p=i(11750),f=i(29054),h=i(58238),x=i(17450),g=i(14491),v=i(81010),j=i(4651),y=i(55898),b=i.n(y),Z=i(44919),D=i(76416),k=i(93938),P=i(39948),C=i(38763),T=i(75392),w=i(67680),S=i(11819),R=i(75239),E=i(96366),A=i(72904),I=i(56742),F=i(49714),q=i(18067),z=i(25710),N=i(44846),L=i(63406),_=i(74511),B=i(88574),O=i(86229),W=i(77277),M=i(70461),H=i(96266);const U=e=>["waiting","creating","renewaling"].includes(e);function K(e){var n,i;const{t:t}=(0,c.PE)(),[o,r]=(0,a.useState)(!1),{inService:s}=(0,h.h6)(),[l,d]=(0,a.useState)(null),{siteId:m,domain:u,onAdd:p,children:x,did:g}=e,[v,j]=(0,a.useState)(!1),{api:y,ws:{useSubscription:b}}=(0,h.h6)(),{mode:Z,actions:{refreshDomainStatus:D}}=(0,f.y0)(),k=(0,_.Z)((async()=>{const{cert:e}=await y.findCertificateByDomain({input:{domain:u,did:g}});return e})),P=(e,n)=>{e.domain===u&&(j(!1),r(!1),s&&"setup"!==Z&&("success"===n?O.Z.success(t("setup.domain.genCertSuccess",{domain:e.domain})):"error"===n&&O.Z.error(t("setup.domain.genCertFailed",{domain:e.domain,message:e.message}))))};if((0,a.useEffect)((()=>{var e;k.loading||j(U(null===(e=k.value)||void 0===e?void 0:e.status))}),[k.loading,null===(n=k.value)||void 0===n?void 0:n.status]),b(W.BlockletEvents.certError,(e=>P(e,"error"))),b(W.BlockletEvents.certIssued,(e=>{k.retry(),D(e.domain),P(e,"success")})),k.loading)return"";if("normal"===(null===(i=k.value)||void 0===i?void 0:i.status))return"";const C={title:t("router.cert.genLetsEncryptCert.title"),description:(0,H.jsxs)("div",{children:[(0,H.jsx)(B.Z,{type:"success",children:t("router.cert.genLetsEncryptCert.dnsTip")}),t("router.cert.genLetsEncryptCert.description")]}),confirm:t("common.confirm"),onConfirm:async()=>{r(!0);try{await y.issueLetsEncryptCert({input:{siteId:m,domain:u,did:g,inBlockletSetup:"setup"===Z}}),p(),j(!0)}catch(e){console.error(e),j(!1)}finally{r(!1),d(null)}},onCancel:()=>{r(!1),d(null)}};return(0,H.jsxs)(H.Fragment,{children:[v?(0,H.jsx)(R.Z,{title:t("router.cert.issuing"),children:(0,H.jsx)(N.Z,{size:12})}):x({loading:o,open:e=>{e.stopPropagation(),d(C)}}),l&&(0,H.jsx)(M.Z,{color:"primary",title:l.title,description:l.description,confirm:l.confirm,params:l.params,onConfirm:l.onConfirm,onCancel:l.onCancel})]})}function V(e){const{domain:n,domainStatus:i,...t}=e;return!(0,g.rM)(n)||null!==i&&void 0!==i&&i.isHttps?"":(0,H.jsx)(K,{domain:n,...t})}K.propTypes={domain:b().string.isRequired,did:b().string.isRequired,siteId:b().string.isRequired,onAdd:b().func,children:b().any},K.defaultProps={onAdd:()=>{},children:null},V.propTypes={domain:b().string.isRequired,domainStatus:b().shape({isHttps:b().bool}).isRequired,did:b().string.isRequired,onAdd:b().func,children:b().any},V.defaultProps={onAdd:()=>{},children:null};var Y=i(11593),G=i(74490),X=i(31853),J=i(11854),Q=i.n(J);const $=(0,a.createContext)({}),{Provider:ee,Consumer:ne}=$;function ie(e){let{children:n}=e;const[i,t]=(0,X.Z)({domain:"",error:null}),{locale:o,t:r}=(0,c.PE)(),{api:a}=(0,h.h6)(),s={error:i.error,domain:i.domain,setError:e=>{t({error:e})},setDomain:e=>{const n=Q()(e),i=(0,g.ub)(n,o);t({domain:n,error:i})},validateDomain:async(e,n)=>{if(!i.error&&n&&"nftDomain"!==n){if(!0===(await a.isDidDomain({input:{domain:e}})).value)return t({error:r("router.domainAlias.add.isDidDomainError")}),!1}return!0}};return(0,H.jsx)(ee,{value:{value:s},children:n})}function te(){const{value:e}=(0,a.useContext)($);return e}var oe=i(49983),re=i(34966),ae=i(96538),se=i(38898),le=i(47020),de=i(92706),ce=i.n(de),me=i(6352),ue=i.n(me),pe=i(60344),fe=i(12937);function he(e){let{domain:n,resolvedTarget:i,...t}=e;const{t:o,locale:r}=(0,c.PE)();return(0,H.jsxs)(P.Z,{sx:{backgroundColor:"rgb(236, 251, 253)",borderColor:"rgb(236, 251, 253)",borderRadius:"8px",padding:"12px"},...t,children:[(0,H.jsxs)(P.Z,{display:"flex",children:[o("router.domain.setup.tipStart"),n&&(0,H.jsx)(P.Z,{mx:.5,color:"primary.main",fontWeight:"fontWeightBold",children:n}),o("router.domain.setup.tipEnd"),":"]}),(0,H.jsxs)(P.Z,{sx:{"&>div":{mb:0},marginTop:"8px"},children:[(0,H.jsx)(xe,{label:o("router.domain.setup.recordType"),value:"CNAME",locale:r}),(0,H.jsx)(xe,{label:o("router.domain.setup.recordValue"),value:i,locale:r})]})]})}function xe(e){let{locale:n,label:i,value:t}=e;const o=(0,A.Z)((e=>e.breakpoints.down("md"))),r=(0,E.Z)();return(0,H.jsx)(d.Z,{name:i,nameWidth:120,children:(0,H.jsxs)(P.Z,{sx:{display:"flex",alignItems:"center",lineHeight:1},children:[(0,H.jsx)(p.Z,{component:"span",color:"primary.main",overflow:"auto",sx:o?{maxWidth:"95%",wordWrap:"break-word"}:{wordWrap:"break-word"},children:t}),(0,H.jsx)(fe.q,{content:t,locale:n,style:{marginLeft:"4px",color:r.palette.text.secondary}})]})})}he.propTypes={domain:b().string,resolvedTarget:b().string.isRequired},he.defaultProps={domain:""},xe.propTypes={locale:b().string.isRequired,label:b().string.isRequired,value:b().string.isRequired};var ge=i(51233);function ve(e){let{siteId:n,teamDid:i,cnameDomain:t,defaultCustomDomain:r,onInputDomain:a,appId:s,appPk:l,onSuccess:d,disabled:m,autoFocus:u,inBlockletSetup:p,...f}=e;const{t:x,locale:v}=(0,c.PE)(),{api:j,info:y}=(0,h.h6)(),b=te(),Z=(0,E.Z)(),[D,k]=(0,X.Z)({domain:r,error:null,type:null!==y&&void 0!==y&&y.nftDomainUrl?"nftDomain":"inputDomain",showNFTDomainAuth:!1,showDnsTip:!1});let C="";y.nftDomainUrl&&(C=ue()(y.nftDomainUrl,"/api"));const T=async e=>{let{domain:t,nftDid:o,chainHost:r}=e;try{const e=(0,ge.sf)(t);await j.addDomainAlias({input:{id:n,type:"nft-domain",domainAlias:e,nftDid:o,chainHost:r,teamDid:i,inBlockletSetup:p}}),await(0,g._v)(2e3),k({confirmSetting:null,showNFTDomainAuth:!1,type:"nftDomain"}),d({domain:e,type:D.type,nftDid:o,chainHost:r})}catch(w){O.Z.error(w.message)}finally{k({showNFTDomainAuth:!1})}},w=b.error||D.error,S={inputDomain:{name:x("router.domainAlias.inputDomain"),component:(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(le.Z,{label:x("router.domainAlias.add.domainDescription"),helperText:"inputDomain"===D.type&&w||x("router.domainAlias.add.helperText"),inputProps:{"data-cy":"domain-name-input"},fullWidth:!0,disabled:m,value:D.domain,size:"small",variant:"outlined",error:!!w&&"inputDomain"===D.type,onChange:e=>{var n;const i=Q()(null===(n=e.target)||void 0===n?void 0:n.value);b.setDomain(i);const t=(0,g.ub)(i,v);k({domain:i,error:t,type:"inputDomain"}),a({domain:i,error:t,type:"inputDomain"})},autoFocus:u,onBlur:()=>{b.domain||(k({error:null}),b.setError(null))}}),(0,H.jsxs)(P.Z,{sx:{cursor:"pointer",fontSize:"14px",display:"flex",alignItems:"center",gap:"4px",marginTop:"8px",lineHeight:1,color:Z.palette.primary.main},onClick:()=>k({showDnsTip:!D.showDnsTip}),children:[(0,H.jsx)(re.Z,{fontSize:"1em"}),x("router.domainAlias.showTipHint")]}),D.showDnsTip&&(0,H.jsx)(he,{domain:D.domain,resolvedTarget:t,style:{marginTop:"4px"}})]})}};null!==y&&void 0!==y&&y.nftDomainUrl&&(S.nftDomain={name:x("router.domainAlias.nftDomain"),component:(0,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)(P.Z,{sx:{maxWidth:"640px",color:"text.secondary",fontSize:"14px"},children:[(0,H.jsx)("div",{children:x("router.domainAlias.addDomainNFT.tips")}),(0,H.jsxs)("div",{children:[x("router.domainAlias.addDomainNFT.buyTip"),(0,H.jsxs)(se.Z,{href:y.nftDomainUrl,sx:{fontSize:"14px",display:"inline-flex",alignItems:"center"},target:"_blank",children:[(0,H.jsx)("i",{children:x("router.domainAlias.addDomainNFT.buy")}),(0,H.jsx)(ae.Z,{fontSize:"small"})]})]})]}),(0,H.jsx)(o.Z,{sx:{marginTop:"8px"},disabled:m,onClick:()=>k({showNFTDomainAuth:!0}),variant:"contained",children:x("router.domainAlias.addDomainNFT.showNFT")}),(0,H.jsx)(oe.Z,{open:D.showNFTDomainAuth,popup:!0,useSocket:!1,action:"authorize",baseUrl:C,checkFn:pe.od.create({baseURL:C}).get,extraParams:{delegatee:s,delegateePk:l},onSuccess:T,onClose:()=>k({showNFTDomainAuth:!1}),checkTimeout:3e5,showDownload:!1,messages:{title:x("router.domainAlias.addDomainNFT.connect.title"),scan:x("router.domainAlias.addDomainNFT.connect.scan"),confirm:x("router.domainAlias.addDomainNFT.connect.confirm"),success:x("router.domainAlias.addDomainNFT.connect.success")}})]})});const R=Object.keys(S);return R.sort((e=>"inputDomain"===e?1:-1)),(0,H.jsx)(P.Z,{...f,children:(0,H.jsx)(P.Z,{sx:{display:"flex",flexDirection:"column",justifyContent:"flex-start",gap:"1em"},children:R.map(((e,n)=>{var i,t;return(0,H.jsxs)(P.Z,{children:[R.length>1&&(0,H.jsx)(P.Z,{sx:{fontWeight:700,color:Z.palette.text.primary},children:"".concat(x("optionsOrder.".concat(n+1)),": ").concat(null===(i=S[e])||void 0===i?void 0:i.name)}),(0,H.jsx)(P.Z,{sx:{marginTop:"8px"},children:null===(t=S[e])||void 0===t?void 0:t.component})]},e)}))})})}function je(e){let{id:n,children:i,title:t,teamDid:o,systemDomains:r,appId:a,appPk:s}=e;const{t:l}=(0,c.PE)(),{api:d}=(0,h.h6)(),[m,u]=(0,X.Z)({loading:!1,confirmSetting:null}),p=r.find((e=>(0,F.isDidDomain)(e))),f=te(),x={title:t||l("router.domainAlias.add.title"),description:function(e,i,t){return(0,H.jsx)(ve,{siteId:n,teamDid:o,cnameDomain:p,onSuccess:()=>u({confirmSetting:null}),onInputDomain:n=>{let{domain:o,type:r,error:a}=n;i({...e,domain:o,type:r,__disableConfirm:!!a}),t(a)},appId:a,appPk:s})},confirm:l("common.confirm"),cancel:l("common.cancel"),params:{domain:"",__disableConfirm:!0},onConfirm:async e=>{if(!m.loading){u({loading:!0});try{const i=(0,ge.sf)(e.domain);if(!await f.validateDomain(i,e.type))return!1;await d.addDomainAlias({input:{id:n,domainAlias:i,teamDid:o}}),await(0,g._v)(2e3),u({confirmSetting:null})}catch(i){return f.setError(i.message),!1}finally{u({loading:!1})}}},onCancel:()=>{u({loading:!1,confirmSetting:null})}},v=e=>{e.stopPropagation(),u({confirmSetting:x})};return(0,H.jsxs)(H.Fragment,{children:["function"===typeof i?i({loading:m.loading,open:v}):(0,H.jsxs)(G.Z,{onClick:v,className:"rule-action","data-cy":"action-add-domain-alias",children:[m.loading?(0,H.jsx)(N.Z,{size:16}):(0,H.jsx)(Y.Z,{style:{fontSize:18,marginRight:5}}),l("router.domainAlias.add.title")]}),m.confirmSetting&&(0,H.jsx)(M.Z,{title:m.confirmSetting.title,description:m.confirmSetting.description,confirm:m.confirmSetting.confirm,cancel:m.confirmSetting.cancel,params:m.confirmSetting.params,onConfirm:m.confirmSetting.onConfirm,onCancel:m.confirmSetting.onCancel,displayError:!1,color:"primary",loading:m.loading,maxWidth:"lg"})]})}function ye(e){return(0,H.jsx)(ie,{children:(0,H.jsx)(je,{...e})})}ve.propTypes={siteId:b().string.isRequired,teamDid:b().string.isRequired,cnameDomain:b().string.isRequired,defaultCustomDomain:b().string,onInputDomain:b().func,onSuccess:b().func,appId:b().string,appPk:b().string,disabled:b().bool,autoFocus:b().bool,inBlockletSetup:b().bool},ve.defaultProps={defaultCustomDomain:"",onInputDomain:ce(),onSuccess:ce(),appId:"",appPk:"",disabled:!1,autoFocus:!0,inBlockletSetup:!1},je.propTypes={id:b().string.isRequired,children:b().any,title:b().string,teamDid:b().string,systemDomains:b().arrayOf(b().string).isRequired,appId:b().string,appPk:b().string.isRequired},je.defaultProps={children:null,title:"",teamDid:"",appId:null};var be=i(46954),Ze=i(44067),De=i(27773),ke=i(92726);function Pe(e){const{t:n}=(0,c.PE)(),[i,t]=(0,a.useState)(!1),[r,s]=(0,a.useState)(null),{id:l,domain:d,children:m,teamDid:u}=e,{api:p}=(0,h.h6)(),f={title:n("router.domainAlias.delete.title"),description:n("router.domainAlias.delete.description"),confirm:n("common.confirm"),onConfirm:async()=>{t(!0);try{await p.deleteDomainAlias({input:{id:l,domainAlias:d,teamDid:u}}),await(0,g._v)(2e3)}catch(e){O.Z.error(e.message)}finally{s(null),t(!1)}},onCancel:()=>{t(!1),s(null)}},x=e=>{e.stopPropagation(),s(f)};return(0,H.jsxs)(H.Fragment,{children:["function"===typeof m?m({loading:i,open:x}):(0,H.jsxs)(o.Z,{edge:"end",onClick:x,size:"small",className:"rule-action",color:"error","data-cy":"action-delete-domain-alias",children:[i?(0,H.jsx)(N.Z,{size:16}):(0,H.jsx)(De.default,{style:{fontSize:16}}),n("router.domainAlias.delete.title")]}),r&&(0,H.jsx)(M.Z,{title:r.title,description:r.description,confirm:r.confirm,params:r.params,onConfirm:r.onConfirm,onCancel:r.onCancel})]})}function Ce(e){let{site:n,domain:i,blocklet:t}=e;const{t:o}=(0,c.PE)(),r=i.value===window.location.hostname;return(0,H.jsx)(ke.Z,{"data-cy":"domain-actions",size:"large",actions:[e=>{var a;let{close:s}=e;return(0,H.jsx)(Pe,{id:n.id,domain:i.value,teamDid:null===t||void 0===t||null===(a=t.meta)||void 0===a?void 0:a.did,children:e=>{let{open:n}=e;return(0,H.jsx)(R.Z,{title:r?o("blocklet.router.currentDomainTip"):"",children:(0,H.jsx)("span",{children:(0,H.jsxs)(G.Z,{disabled:i.isProtected||r,dense:!0,onClick:e=>{s(),n(e)},"data-cy":"action-toggle-block",children:[(0,H.jsx)(be.Z,{style:{minWidth:24,marginRight:8},children:(0,H.jsx)(De.default,{})}),(0,H.jsx)(Ze.Z,{primary:o("common.delete")})]},"remove")})})}})}]})}Pe.propTypes={id:b().string.isRequired,domain:b().string.isRequired,children:b().any,teamDid:b().string},Pe.defaultProps={children:null,teamDid:""},Ce.propTypes={site:b().object.isRequired,domain:b().object.isRequired,blocklet:b().object.isRequired},Ce.defaultProps={};var Te=i(31942),we=i(69569);const Se=b().shape({href:b().string,accessibility:b().shape({loading:b().bool,accessible:b().bool}),domainStatus:b().shape({isHttps:b().bool,matchedCert:b().object}),dns:b().shape({resolved:b().bool,ip:b().string})});var Re,Ee=i(43681),Ae=i.n(Ee);function Ie(e){let{certificate:n}=e;const[i,t]=(0,a.useState)(null),o=(0,h.h6)(),{t:r,locale:s}=(0,c.PE)(),l=()=>{t(null)},d=Boolean(i);return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(Te.Z,{"aria-owns":d?"mouse-over-popover":void 0,onMouseEnter:e=>{t(e.currentTarget)},onMouseLeave:l,style:{color:"#44cdc6",fontSize:20,cursor:"pointer"}}),(0,H.jsx)(S.ZP,{id:"mouse-over-popover",style:{pointerEvents:"none"},open:d,anchorEl:i,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},onClose:l,disableRestoreFocus:!0,children:(0,H.jsx)(C.Z,{children:(0,H.jsxs)(T.Z,{style:{display:"flex"},children:[(0,H.jsx)("div",{children:(0,H.jsx)("img",{src:"".concat(o.imgPrefix,"/https-certificate-icon.png"),alt:"certificate icon",style:{maxHeight:"100%",maxWidth:"100%"}})}),(0,H.jsxs)(p.Z,{component:"div",style:{marginLeft:"16px"},children:[(0,H.jsx)(p.Z,{component:"div",style:{fontWeight:"bold"},children:n.domain}),(0,H.jsx)(p.Z,{component:"div",children:"".concat(r("common.issuer"),": ").concat(Ae()(n,"issuer.commonName",""))}),(0,H.jsx)(p.Z,{component:"div",children:"".concat(r("router.cert.issuedOn"),": ").concat((0,g.pz)(n.validFrom,s))}),(0,H.jsx)(p.Z,{component:"div",children:"".concat(r("router.cert.expiryOn"),": ").concat((0,g.pz)(n.validTo,s))})]})]})})})]})}function Fe(e){let{domain:n,filters:i}=e;const{t:t}=(0,c.PE)(),{value:o,domainStatus:r}=n;if(!(0,g.rM)(o))return null;let s=null,l=null;const{isHttps:d,matchedCert:m}=r;if(!(0,g.ao)(o)){const{dns:{resolved:e,ip:n}={}}=r;s=e||"127.0.0.1"===n?(0,H.jsx)(R.Z,{title:t("router.domain.verify.ok"),children:(0,H.jsx)(we.Z,{color:"success"})}):(0,H.jsx)(R.Z,{title:t("router.domain.verify.notResolved"),children:(0,H.jsx)(we.Z,{color:"error"})})}l=d?(0,H.jsx)(Ie,{certificate:m}):(0,H.jsx)(R.Z,{title:t("router.domain.https.bad"),children:(0,H.jsx)(Te.Z,{style:{color:"#D0021B",fontSize:20,cursor:"pointer"}})});const u=i.map((e=>"domain"===e?s:"http"===e?l:null));return(0,a.createElement)(a.Fragment,null,...u)}Ie.propTypes={certificate:b().object},Ie.defaultProps={certificate:{}},Fe.propTypes={domain:Se.isRequired,filters:b().array},Fe.defaultProps={filters:["domain","http"]};const qe=(0,L.V)(Le,"mutate_blocklets"),ze=(0,L.V)(Le,"",g.Wf);function Ne(e){const{inService:n}=(0,h.h6)(),{blocklet:i,loadingRuntimeInfo:t}=(0,f.y0)();let o=qe;return n&&(o=ze),(0,H.jsx)(o,{...e,blocklet:i,inService:n,loadingRuntimeInfo:t})}function Le(e){var n,i,t,r;let{hasPermission:d,blocklet:m,loadingRuntimeInfo:p,inService:f,listOnly:h}=e;const{t:x}=(0,c.PE)(),[v,y]=(0,a.useState)(!1),b=(0,A.Z)((e=>e.breakpoints.down("md"))),D=(0,a.useMemo)((()=>{let e=d;return(0,j.ep)(m)&&(e=e&&f),e}),[d,f,m]),{site:C}=m,T=(0,a.useMemo)((()=>{var e;return(0,g.oE)(null===(e=m.site)||void 0===e?void 0:e.domainAliases)}),[null===(n=m.site)||void 0===n?void 0:n.domainAliases]),w=[],S=[],R=(0,I.encode)(m.appPid),E=null===(i=m.environments)||void 0===i||null===(t=i.find((e=>"BLOCKLET_APP_PK"===e.key)))||void 0===t?void 0:t.value,q=(0,g.M6)(T);return T.forEach((e=>{const n=e.value||"";(0,F.isDidDomain)(n)&&!n.startsWith(R)?S.push(e):w.push(e)})),(0,H.jsxs)(H.Fragment,{children:[!h&&(0,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)(P.Z,{className:"title first",display:"flex",justifyContent:"space-between",alignItems:"center",children:[(0,H.jsx)(P.Z,{children:x("common.domain")}),D&&(0,H.jsx)(ye,{id:C.id,title:x("router.domain.add.title"),teamDid:null===(r=m.meta)||void 0===r?void 0:r.did,appId:m.appPid,appPk:E,systemDomains:null===q||void 0===q?void 0:q.map((e=>e.value)),children:e=>{let{open:n}=e;return(0,H.jsxs)(o.Z,{style:{marginLeft:16},variant:"contained",color:"primary","data-cy":"add-domain-alias",onClick:n,disabled:(0,u.isInProgress)(m.status),children:[(0,H.jsx)(Z.Z,{style:{fontSize:"1.3em",marginRight:4}}),x("common.add")]})}})]}),!1===(0,u.isAccessible)(m.status)&&(0,H.jsx)(P.Z,{mt:1.5,mb:1.5,children:(0,H.jsx)(k.Z,{severity:"warning",children:x("blocklet.router.noRunning")})})]}),(0,H.jsx)(P.Z,{sx:{display:"flex",flexDirection:"column",gap:1},children:(v?T:w).map((e=>{var n,i;const t=e.value;return(0,H.jsxs)(a.Fragment,{children:[b&&(0,H.jsxs)(P.Z,{display:"flex",flexDirection:"column",children:[(0,H.jsx)(P.Z,{display:"flex",alignItems:"center",justifyContent:"flex-start",children:(0,H.jsx)(_e,{domain:e,target:"_blank",children:e.value})}),(0,H.jsxs)(P.Z,{display:"flex",alignItems:"center",justifyContent:"space-between",children:[(0,H.jsxs)(P.Z,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-start",gap:1},children:[(0,H.jsx)(Fe,{domain:e,filters:["domain"]},"".concat(e.value,"-domain")),(0,H.jsx)(We,{siteId:null===(n=m.site)||void 0===n?void 0:n.id,domain:e,blocklet:m,hasMutatePermission:D})]}),(0,H.jsx)(P.Z,{sx:{button:{padding:0}},children:(0,H.jsx)(Oe,{hasMutatePermission:D,site:C,domain:e,blocklet:m})})]})]},t),!b&&(0,H.jsxs)(P.Z,{display:"flex",alignItems:"center",justifyContent:"space-between",children:[(0,H.jsxs)(P.Z,{display:"flex",alignItems:"center",justifyContent:"flex-start",children:[(0,H.jsx)(Fe,{domain:e,filters:["domain"]},"".concat(e.value,"-domain")),(0,H.jsx)(P.Z,{sx:{ml:2,mr:.5},children:(0,H.jsx)(_e,{domain:e,target:"_blank",children:e.value})}),(0,H.jsx)(We,{siteId:null===(i=m.site)||void 0===i?void 0:i.id,domain:e,blocklet:m,hasMutatePermission:D})]}),(0,H.jsx)(P.Z,{sx:{button:{padding:0}},children:(0,H.jsx)(Oe,{hasMutatePermission:D,site:C,domain:e,blocklet:m})})]},t)]},t)}))}),S.length>0&&(0,H.jsx)("div",{style:{marginLeft:"20px",marginTop:"12px"},children:(0,H.jsx)(o.Z,{endIcon:v?(0,H.jsx)(s.Z,{}):(0,H.jsx)(l.Z,{}),onClick:()=>y(!v),children:x(v?"common.collapseAll":"blocklet.router.showAllDomains")})}),!T.length&&(p?(0,H.jsx)(N.Z,{size:16}):(0,H.jsx)(z.Z,{children:x("common.empty")}))]})}function _e(e){let{domain:n,children:i,...t}=e;const{t:o}=(0,c.PE)(),{href:r,accessibility:a}=n;return!a||a.loading?(0,H.jsxs)(Be,{...t,children:[i,(0,H.jsx)(R.Z,{title:o("blocklet.router.checkUrlAccessible"),placement:"top-end",children:(0,H.jsx)("span",{className:"status",children:(0,H.jsx)(N.Z,{size:12})})})]}):a.accessible?(0,H.jsx)(Be,{...t,children:(0,H.jsx)("a",{href:r,target:"_blank",rel:"noopener noreferrer",children:i})}):(0,H.jsx)(Be,{...t,children:(0,H.jsx)(R.Z,{title:o("blocklet.router.urlInaccessible"),placement:"top-end",children:(0,H.jsx)("span",{children:i})})})}Ne.propTypes={listOnly:b().bool},Ne.defaultProps={listOnly:!1},Le.propTypes={hasPermission:b().bool,blocklet:b().object.isRequired,loadingRuntimeInfo:b().bool,inService:b().bool.isRequired,listOnly:b().bool},Le.defaultProps={hasPermission:!1,loadingRuntimeInfo:!1,listOnly:!1},_e.propTypes={domain:Se.isRequired,children:b().any.isRequired};const Be=r.Z.span(Re||(Re=(0,t.Z)(["\n &,\n & > * {\n color: #222;\n font-size: 18px;\n word-break: break-all;\n }\n\n .status {\n margin-left: 8px;\n }\n"])));function Oe(e){let{hasMutatePermission:n,site:i,domain:t,blocklet:o}=e;const r=(0,E.Z)(),{t:a}=(0,c.PE)();return n&&!t.isProtected?(0,H.jsx)(Ce,{site:i,domain:t,blocklet:o}):(0,H.jsx)(R.Z,{title:a("blocklet.router.domainLockTooltip"),placement:"top",children:(0,H.jsx)(w.Z,{disabled:!0,size:"large",style:{pointerEvents:"auto",paddingTop:0,paddingBottom:0},children:(0,H.jsx)(q.Z,{style:{fill:r.palette.text.disabled}})})})}function We(e){let{siteId:n,domain:i,blocklet:t,hasMutatePermission:r}=e;const s=(0,E.Z)(),{t:l}=(0,c.PE)(),[d,m]=(0,a.useState)(null),u=()=>{m(null)};return(0,H.jsxs)(P.Z,{sx:{display:"flex",justifyContent:"flex-start",alignItems:"center",gap:1},children:["nft-domain"===i.type&&(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(D.Z,{onMouseEnter:e=>{m(e.currentTarget)},onMouseLeave:u,style:{cursor:"pointer",fill:s.palette.primary.main}}),(0,H.jsx)(S.ZP,{id:"mouse-over-popover",style:{pointerEvents:"none"},open:Boolean(d),anchorEl:d,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},onClose:u,disableRestoreFocus:!0,children:(0,H.jsx)(C.Z,{children:(0,H.jsxs)(T.Z,{style:{display:"flex",flexDirection:"column"},children:[(0,H.jsxs)(p.Z,{component:"div",style:{display:"flex",alignItems:"center"},children:[(0,H.jsx)(D.Z,{style:{fill:s.palette.primary.main}}),(0,H.jsx)(p.Z,{component:"span",style:{marginLeft:"8px",fontSize:"18px",fontWeight:"bolder"},children:l("router.domainAlias.nftDomain")})]}),(0,H.jsxs)(p.Z,{component:"div",style:{display:"flex",marginTop:"12px"},children:[(0,H.jsx)(p.Z,{component:"span",style:{width:"80px",marginRight:"8px"},children:l("common.domain")}),(0,H.jsx)(p.Z,{component:"span",children:i.value})]}),(0,H.jsxs)(p.Z,{component:"div",style:{display:"flex"},children:[(0,H.jsx)(p.Z,{component:"span",style:{width:"80px",marginRight:"8px"},children:"NFT"}),(0,H.jsx)(x.Z,{did:i.nftDid})]})]})})})]}),(0,H.jsx)(Fe,{domain:i,filters:["http"]},"".concat(i.value,"-http")),r&&(0,H.jsx)(V,{siteId:n,domain:i.value,domainStatus:i.domainStatus,did:t.meta.did,children:e=>{let{open:n}=e;return(0,H.jsx)(o.Z,{sx:{padding:0},size:"small",onClick:e=>n(e),children:l("router.cert.genLetsEncryptCert.title")})}})]})}var Me;Oe.propTypes={hasMutatePermission:b().bool.isRequired,site:b().object.isRequired,domain:Se.isRequired,blocklet:b().object.isRequired},We.propTypes={siteId:b().string.isRequired,domain:Se.isRequired,blocklet:b().object.isRequired,hasMutatePermission:b().bool.isRequired};const He={arcblock:"ArcBlock",ethereum:"Ethereum"};function Ue(){var e,n,i,t,r;const{t:p,locale:y}=(0,c.PE)(),{info:b,inService:Z}=(0,h.h6)(),[D,k]=(0,a.useState)(!1),{blocklet:P}=(0,f.y0)(),{appDid:C,appPid:T,migratedFrom:w=[]}=P,S=null===(e=P.environments.find((e=>"BLOCKLET_APP_CHAIN_TYPE"===e.key)))||void 0===e?void 0:e.value,R=[C?{name:p("blocklet.appId"),value:(0,H.jsx)(x.Z,{did:C})}:null,T?{name:p("blocklet.appPid"),value:(0,H.jsx)(x.Z,{did:T})}:null,(null===w||void 0===w?void 0:w.length)>1?{name:p("blocklet.alsoKnownAs"),value:(0,H.jsxs)("div",{children:[(D?w.slice(1):w.slice(1,2)).map((e=>(0,H.jsx)(x.Z,{did:e.appDid}))),w.length>2&&(0,H.jsx)(o.Z,{style:{marginLeft:"18px"},endIcon:D?(0,H.jsx)(s.Z,{}):(0,H.jsx)(l.Z,{}),onClick:()=>k(!D),children:p(D?"common.collapseAll":"blocklet.router.showAllDIDs")})]})}:null,{name:p("common.name"),value:(0,u.getDisplayName)(P,!0)},{name:p("common.status"),value:(0,H.jsx)(v.Z,{status:P.status,source:P.source})},(0,j.ep)(P)?{name:"NFT",value:(0,H.jsx)(x.Z,{external:!0,href:(0,g.E8)(null===P||void 0===P||null===(n=P.controller)||void 0===n?void 0:n.chainHost,null===P||void 0===P||null===(i=P.controller)||void 0===i?void 0:i.nftId,"asset"),did:null===P||void 0===P||null===(t=P.controller)||void 0===t?void 0:t.nftId})}:null,{name:p("blocklet.installedAt"),value:(0,g.B2)(P.installedAt,y)},{name:p("blocklet.overview.accessControl"),value:p("team.whoCanAccess.".concat((0,u.getWhoCanAccess)(P),".title"))},{name:p("common.owner"),value:null!==(r=P.settings)&&void 0!==r&&r.owner?(0,H.jsx)(x.Z,{did:P.settings.owner.did}):"--"},{name:p("blocklet.config.walletType.name"),value:He[S||"arcblock"]||S},P.externalSkSource?{name:p("blocklet.skSource"),value:P.externalSkSource}:null].filter(Boolean);Z&&R.push({name:p("common.serverDid"),value:(0,H.jsx)(x.Z,{did:b.did})},{name:p("common.serverVersion"),value:(0,H.jsx)(m.Z,{children:b.version})});return(0,H.jsxs)(Ke,{component:"div",children:[(0,H.jsx)(Ne,{}),(0,H.jsx)("div",{className:"title",children:(0,H.jsx)("span",{children:p("common.basicInfo")})}),(0,H.jsx)("div",{className:"basicInfo",children:(E=R,E.map((e=>(0,H.jsx)(d.Z,{style:{display:"flex",alignItems:"flex-start"},valueComponent:"div",nameWidth:120,name:e.name,nameFormatter:()=>e.name,children:e.value},e.name))))})]});var E}Ue.propTypes={};const Ke=(0,r.Z)(p.Z)(Me||(Me=(0,t.Z)(["\n .title {\n font-size: 1.2rem;\n font-weight: bold;\n margin-top: ",";\n margin-bottom: ",";\n\n &.first {\n margin-top: 0;\n }\n }\n"])),(e=>e.theme.spacing(5)),(e=>e.theme.spacing(3)))},51233:(e,n,i)=>{"use strict";i.d(n,{Rw:()=>c,fX:()=>d,sf:()=>m});var t=i(35432),o=i(44543),r=i.n(o),a=i(77277),s=i(32828);const l=(e,n)=>{if(e.type===t.ROUTING_RULE_TYPES.REDIRECT){if(!e.url)return new Error("".concat(n("router.validation.redirectUrlRequired")));if(!e.redirectCode)return new Error("redirect ".concat(n("router.validation.redirectCodeRequired")))}else if(e.type===t.ROUTING_RULE_TYPES.BLOCKLET&&!e.did)return new Error(n("router.validation.didRequired"));return null},d=(e,n)=>{const i=l(e,n);return i||(e.pathPrefix.length?e.pathPrefix.length>150?new Error(n("router.validation.pathPrefixTooLong",{length:150})):null:new Error(n("router.validation.pathPrefixCannotBeEmpty")))},c=e=>{let{params:n,blocklets:i,blocklet:t,locale:o="en"}=e;if(t){let e=(t.children||[]).find((e=>(0,s.default)(e.meta)&&r()(e.mountPoint,n.pathPrefix)));if("gateway"!==t.meta.group&&"/"===n.pathPrefix&&(e="/"),e)return{zh:"\u6302\u8f7d\u70b9 ".concat(n.pathPrefix," \u5df2\u5b58\u5728\uff0c\u8bf7\u4f7f\u7528\u5176\u4ed6\u6302\u8f7d\u70b9"),en:"The mount point ".concat(n.pathPrefix," already exist, please use another mount point")}[o]}const l=i.find((e=>e.meta.did===n.did));if(!l)return"";const d=l.meta.interfaces.find((e=>"web"===e.type));return d&&d.prefix!==a.BLOCKLET_DYNAMIC_PATH_PREFIX&&n.pathPrefix!==d.prefix?{zh:"\u8be5 blocklet \u53ea\u80fd\u6302\u8f7d\u5728 ".concat(d.prefix),en:"This blocklet can only be mounted on ".concat(d.prefix)}[o]:""},m=e=>{if(!e||"string"!==typeof e)return e;let n=e.trim();try{return n=n.toLowerCase(),n.startsWith("http://")||n.startsWith("https://")?new URL(n).hostname:n}catch(i){return console.error("format domain failed",i),n}}}}]);
|