@abtnode/webapp 1.16.20-beta-e6e3b017 → 1.16.20-beta-e363262e
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 +6 -6
- package/build/index.html +1 -1
- package/build/service-worker.js +1 -1
- package/build/static/js/{2334.0ef4187e.chunk.js → 2334.311ae46d.chunk.js} +1 -1
- package/build/static/js/{6950.f40eb57c.chunk.js → 6950.9b84af05.chunk.js} +1 -1
- package/build/static/js/{7913.2478e0c9.chunk.js → 7913.2359b90e.chunk.js} +1 -1
- package/build/static/js/{9249.4c9fcc4e.chunk.js → 9249.c5031d0b.chunk.js} +1 -1
- package/build/static/js/main.30420eb5.js +2 -0
- package/package.json +1 -1
- package/build/static/js/main.89e2ea62.js +0 -2
- /package/build/static/js/{main.89e2ea62.js.LICENSE.txt → main.30420eb5.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.30420eb5.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.72b7e591.chunk.js": "./static/js/3389.72b7e591.chunk.js",
|
|
@@ -13,12 +13,12 @@
|
|
|
13
13
|
"static/js/6511.978080d1.chunk.js": "./static/js/6511.978080d1.chunk.js",
|
|
14
14
|
"static/js/9038.aa97e3e5.chunk.js": "./static/js/9038.aa97e3e5.chunk.js",
|
|
15
15
|
"static/js/4448.d67840f3.chunk.js": "./static/js/4448.d67840f3.chunk.js",
|
|
16
|
-
"static/js/9249.
|
|
17
|
-
"static/js/2334.
|
|
18
|
-
"static/js/7913.
|
|
16
|
+
"static/js/9249.c5031d0b.chunk.js": "./static/js/9249.c5031d0b.chunk.js",
|
|
17
|
+
"static/js/2334.311ae46d.chunk.js": "./static/js/2334.311ae46d.chunk.js",
|
|
18
|
+
"static/js/7913.2359b90e.chunk.js": "./static/js/7913.2359b90e.chunk.js",
|
|
19
19
|
"static/js/1667.3001639f.chunk.js": "./static/js/1667.3001639f.chunk.js",
|
|
20
20
|
"static/js/5074.5643e827.chunk.js": "./static/js/5074.5643e827.chunk.js",
|
|
21
|
-
"static/js/6950.
|
|
21
|
+
"static/js/6950.9b84af05.chunk.js": "./static/js/6950.9b84af05.chunk.js",
|
|
22
22
|
"static/js/1366.da3d7a8e.chunk.js": "./static/js/1366.da3d7a8e.chunk.js",
|
|
23
23
|
"static/js/6580.8cdb4aa4.chunk.js": "./static/js/6580.8cdb4aa4.chunk.js",
|
|
24
24
|
"static/js/2365.a3571172.chunk.js": "./static/js/2365.a3571172.chunk.js",
|
|
@@ -131,6 +131,6 @@
|
|
|
131
131
|
},
|
|
132
132
|
"entrypoints": [
|
|
133
133
|
"static/css/main.c9e90622.css",
|
|
134
|
-
"static/js/main.
|
|
134
|
+
"static/js/main.30420eb5.js"
|
|
135
135
|
]
|
|
136
136
|
}
|
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.30420eb5.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':'dd4b301c10561c81234e9691598b0d4a','url':'./index.html'},{'revision':null,'url':'./static/css/1371.f696fdbf.chunk.css'},{'revision':null,'url':'./static/css/3826.a5e3e6d6.chunk.css'},{'revision':null,'url':'./static/css/4665.5d6e9197.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/8973.9cab926a.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.8ccea539.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/1633.5c43bf43.chunk.js'},{'revision':null,'url':'./static/js/1667.3001639f.chunk.js'},{'revision':null,'url':'./static/js/1685.00ac41cb.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/2294.6d1e1f1d.chunk.js'},{'revision':null,'url':'./static/js/2334.0ef4187e.chunk.js'},{'revision':null,'url':'./static/js/2365.a3571172.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.72b7e591.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/3826.d40f6fa7.chunk.js'},{'revision':null,'url':'./static/js/3829.2ca489ad.chunk.js'},{'revision':null,'url':'./static/js/3883.61409707.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/442.d95b0c5a.chunk.js'},{'revision':null,'url':'./static/js/4435.5212440d.chunk.js'},{'revision':null,'url':'./static/js/4448.d67840f3.chunk.js'},{'revision':null,'url':'./static/js/4471.c2380391.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.c9c59b2e.chunk.js'},{'revision':null,'url':'./static/js/4901.7dab9c36.chunk.js'},{'revision':null,'url':'./static/js/4906.b8af826c.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.b32c024f.chunk.js'},{'revision':null,'url':'./static/js/5760.82f7dc8f.chunk.js'},{'revision':null,'url':'./static/js/5804.996e83bb.chunk.js'},{'revision':null,'url':'./static/js/5979.bd3d3c0f.chunk.js'},{'revision':null,'url':'./static/js/6490.8f3553c2.chunk.js'},{'revision':null,'url':'./static/js/6511.978080d1.chunk.js'},{'revision':null,'url':'./static/js/6547.01abc819.chunk.js'},{'revision':null,'url':'./static/js/6580.8cdb4aa4.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.e9297d29.chunk.js'},{'revision':null,'url':'./static/js/6950.f40eb57c.chunk.js'},{'revision':null,'url':'./static/js/7020.2fd6f467.chunk.js'},{'revision':null,'url':'./static/js/7022.3ab32ae3.chunk.js'},{'revision':null,'url':'./static/js/7150.9849325f.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.380e09e9.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/7718.49194e44.chunk.js'},{'revision':null,'url':'./static/js/7913.2478e0c9.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/8382.e1c429ed.chunk.js'},{'revision':null,'url':'./static/js/8537.d5e4e119.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/8973.12ec2ee1.chunk.js'},{'revision':null,'url':'./static/js/8986.0c6ecc50.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.4c9fcc4e.chunk.js'},{'revision':null,'url':'./static/js/9277.b9c7a9e7.chunk.js'},{'revision':null,'url':'./static/js/9327.4b32dd25.chunk.js'},{'revision':null,'url':'./static/js/95.f2b78229.chunk.js'},{'revision':null,'url':'./static/js/9517.ac659c32.chunk.js'},{'revision':null,'url':'./static/js/9552.82c09530.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.89e2ea62.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':'91c68daa8b0b1c6d1bf476e4df0ab972','url':'./index.html'},{'revision':null,'url':'./static/css/1371.f696fdbf.chunk.css'},{'revision':null,'url':'./static/css/3826.a5e3e6d6.chunk.css'},{'revision':null,'url':'./static/css/4665.5d6e9197.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/8973.9cab926a.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.8ccea539.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/1633.5c43bf43.chunk.js'},{'revision':null,'url':'./static/js/1667.3001639f.chunk.js'},{'revision':null,'url':'./static/js/1685.00ac41cb.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/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/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.72b7e591.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/3826.d40f6fa7.chunk.js'},{'revision':null,'url':'./static/js/3829.2ca489ad.chunk.js'},{'revision':null,'url':'./static/js/3883.61409707.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/442.d95b0c5a.chunk.js'},{'revision':null,'url':'./static/js/4435.5212440d.chunk.js'},{'revision':null,'url':'./static/js/4448.d67840f3.chunk.js'},{'revision':null,'url':'./static/js/4471.c2380391.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.c9c59b2e.chunk.js'},{'revision':null,'url':'./static/js/4901.7dab9c36.chunk.js'},{'revision':null,'url':'./static/js/4906.b8af826c.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.b32c024f.chunk.js'},{'revision':null,'url':'./static/js/5760.82f7dc8f.chunk.js'},{'revision':null,'url':'./static/js/5804.996e83bb.chunk.js'},{'revision':null,'url':'./static/js/5979.bd3d3c0f.chunk.js'},{'revision':null,'url':'./static/js/6490.8f3553c2.chunk.js'},{'revision':null,'url':'./static/js/6511.978080d1.chunk.js'},{'revision':null,'url':'./static/js/6547.01abc819.chunk.js'},{'revision':null,'url':'./static/js/6580.8cdb4aa4.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.e9297d29.chunk.js'},{'revision':null,'url':'./static/js/6950.9b84af05.chunk.js'},{'revision':null,'url':'./static/js/7020.2fd6f467.chunk.js'},{'revision':null,'url':'./static/js/7022.3ab32ae3.chunk.js'},{'revision':null,'url':'./static/js/7150.9849325f.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.380e09e9.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/7718.49194e44.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/8382.e1c429ed.chunk.js'},{'revision':null,'url':'./static/js/8537.d5e4e119.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/8973.12ec2ee1.chunk.js'},{'revision':null,'url':'./static/js/8986.0c6ecc50.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/9277.b9c7a9e7.chunk.js'},{'revision':null,'url':'./static/js/9327.4b32dd25.chunk.js'},{'revision':null,'url':'./static/js/95.f2b78229.chunk.js'},{'revision':null,'url':'./static/js/9517.ac659c32.chunk.js'},{'revision':null,'url':'./static/js/9552.82c09530.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.30420eb5.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 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_abtnode_webapp=self.webpackChunk_abtnode_webapp||[]).push([[2334],{22334:(e,n,t)=>{t.r(n),t.d(n,{default:()=>U});var s,a=t(71171),o=t(5057),r=t(33518),i=t(85493),l=t(15849),c=t(11750),d=t(22139),p=t(76005),u=t(39948),h=t(20870),m=t(31089),x=t(71767),g=t(64185),v=t(41105),f=t(56184),w=t(62681),b=t(28726),j=t(68420),Z=t(60829),S=t(49983),y=t(35432),P=t(12673),k=t(55898),C=t.n(k),N=t(96266);function L(e){let{list:n,width:t,height:s,cardSpace:a,onSelect:r,defaultIndex:i}=e;const[l,c]=(0,o.useState)(0),[d,p]=(0,o.useState)(0),u=(0,o.useRef)(null),h=e=>{if(e<0||e>n.length-1)return;c(e);const s=u.current.clientWidth;p(e*(t+a)-(s-t)/2+.5*a),r(e)};let m;(0,o.useEffect)((()=>{h(i);u.current.addEventListener("touchmove",(e=>e.preventDefault()),{passive:!1})}),[]);return(0,N.jsx)(z,{ref:u,onTouchStart:e=>{const n=e.touches[0];m=n.clientX},onTouchEnd:e=>{const n=e.changedTouches[0],t=m-n.clientX;Math.abs(t)>60&&h(t>0?l+1:l-1)},children:(0,N.jsx)("div",{className:"card-container",style:{transform:"translate(".concat(-d,"px, 0)")},children:n.map(((e,n)=>(0,N.jsx)("div",{className:"card-item ".concat(n===l?"selected":""),style:{width:t,height:s,margin:a/2},onClick:()=>h(n),children:(0,N.jsx)("div",{className:"card-content",dangerouslySetInnerHTML:{__html:e.src}})},e.id)))})})}const z=r.Z.div(s||(s=(0,a.Z)(["\n overflow: hidden;\n mask-image: linear-gradient(to left, transparent, black 3%, black 97%, transparent);\n overflow: hidden;\n .card-container {\n display: flex;\n white-space: nowrap;\n width: max-content;\n transition: all ease 0.3s;\n }\n .card-item {\n display: inline-flex;\n justify-content: center;\n align-items: center;\n flex-shrink: 0;\n cursor: pointer;\n\n .card-content {\n pointer-events: none;\n max-width: 100%;\n max-height: 100%;\n width: auto;\n height: auto;\n outline: #526ded solid 0;\n transition: all ease 0.2s;\n box-shadow: rgba(0, 0, 0, 0.2) 0 0 10px;\n }\n &.selected {\n cursor: default;\n .card-content {\n outline: #526ded solid 5px;\n }\n }\n }\n"])));L.propTypes={list:C().array,width:C().number,height:C().number,cardSpace:C().number,onSelect:C().func,defaultIndex:C().number},L.defaultProps={list:"",width:300,height:400,cardSpace:40,onSelect:()=>{},defaultIndex:0};var I,H=t(17450),M=t(5766),T=t(70284);function W(e){let{icon:n,active:t,completed:s}=e;const a={1:(0,N.jsx)(g.Z,{className:"step-icon"}),2:(0,N.jsx)(v.Z,{className:"step-icon"}),3:(0,N.jsx)(f.Z,{className:"step-icon"})},o=["step-icon-w"];return t&&o.push("step-icon-w--active"),s&&o.push("step-icon-w--completed"),(0,N.jsx)("div",{className:o.join(" "),children:a[String(n)]})}const _=(0,r.Z)(d.Z)(I||(I=(0,a.Z)(["\n padding-top: 46px;\n padding-bottom: 46px;\n height: 100%;\n overflow: auto;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n @media (max-width: ","px) {\n display: block;\n }\n .header {\n text-align: center;\n margin-bottom: 24px;\n }\n\n .stepper {\n padding: 24px;\n height: auto;\n width: 100%;\n min-height: 640px;\n display: flex;\n flex-direction: column;\n\n .stepper-progress {\n padding: 0;\n flex: 0;\n margin-bottom: 24px;\n\n .MuiStepLabel-label.MuiStepLabel-alternativeLabel {\n margin-top: 8px;\n }\n\n .MuiStepConnector-alternativeLabel {\n top: 24px;\n }\n\n .MuiStepConnector-lineHorizontal {\n height: 3px;\n border: none;\n background-color: #eaeaf0;\n border-radius: 1px;\n }\n\n .step-icon-w {\n background-color: ",";\n z-index: 1;\n color: ",";\n width: 50px;\n height: 50px;\n display: flex;\n border-radius: 50%;\n justify-content: center;\n align-items: center;\n .step-icon {\n font-size: 30px;\n }\n }\n\n .step-icon-w--active {\n background-color: ",";\n }\n\n .step-icon-w--completed {\n background-color: ",";\n }\n }\n\n .stepper-content {\n padding: 0 64px;\n flex: 1;\n display: flex;\n justify-content: center;\n align-items: center;\n margin-bottom: 24px;\n\n .stepper-icon {\n margin-left: 40px;\n }\n\n .stepper-auth {\n padding: 0;\n\n .auth-title {\n margin-bottom: 16px;\n }\n }\n\n .stepper-tip {\n text-align: center;\n margin-bottom: 16px;\n }\n @media (max-width: ","px) {\n padding: 0;\n }\n }\n\n .stepper-actions {\n flex: 0;\n text-align: right;\n padding: 0 64px;\n display: none;\n .step-button {\n margin-right: 8px;\n }\n }\n\n .select-passport {\n width: 80%;\n @media (max-width: ","px) {\n width: 100%;\n }\n }\n\n .user-info {\n .name {\n font-weight: 500;\n font-size: 18px;\n line-height: 25px;\n color: #222222;\n }\n }\n }\n\n .connect {\n background: #fafafa;\n }\n"])),(e=>e.theme.breakpoints.values.sm),(e=>e.theme.palette.grey[500]),(e=>e.theme.palette.common.white),(e=>e.theme.palette.primary.main),(e=>e.theme.palette.secondary.main),(e=>e.theme.breakpoints.values.sm),(e=>e.theme.breakpoints.values.sm)),E=(0,M.Z)((function(e){let{SessionContext:n,webWalletUrl:s,createPassportSvg:a,passportColor:r}=e;const{api:d,session:g}=(0,o.useContext)(n),v=(0,P.Z)({user:null,passport:null,success:!1,activeStep:0}),{setPassportId:f,clearPassportId:k}=(0,T.Z)(),{t:C,locale:z}=(0,o.useContext)(j.RD),I=(0,i.useNavigate)(),{wallet:M}=(0,Z.Z)(),{searchParams:E}=new URL(window.location.href),R=()=>{v.activeStep++},A=e=>{v.user=e.user},D=e=>{null!==e&&void 0!==e&&e.passportId&&f(e.passportId),v.success=!0,R()},U=()=>{var e;if(M&&(()=>{const{searchParams:e}=new URL(window.location.href);return"1"===e.get("fromWallet")})())return void t.e(2365).then(t.t.bind(t,72365,23)).then((e=>{e.call("arcClosePage")}));try{g.logout()}catch(s){}const n=E.get("redirect");n?window.location.replace(n):((null===(e=window.env)||void 0===e?void 0:e.apiPrefix)||"").startsWith(y.WELLKNOWN_SERVICE_PATH_PREFIX)?I("".concat(y.WELLKNOWN_SERVICE_PATH_PREFIX,"/connect"),{replace:!0}):(k(),window.location.replace("/"))},V=[{label:C("lostPassport.selectPassport"),content:()=>v.user?(0,N.jsxs)(u.Z,{className:"select-passport",children:[(0,N.jsxs)(u.Z,{my:1,display:"flex",alignItems:"center",className:"user-info",children:[(0,N.jsx)(w.Z,{src:v.user.avatar,style:{width:48,height:48,backgroundColor:"transparent",marginRight:16}}),(0,N.jsxs)(u.Z,{children:[(0,N.jsx)(u.Z,{className:"name",children:v.user.fullName}),(0,N.jsx)(u.Z,{className:"did",mt:1,children:(0,N.jsx)(H.Z,{did:v.user.did})})]})]}),(0,N.jsx)("div",{children:(0,N.jsx)(L,{width:230,height:306,cardSpace:24,list:v.user.passportTypes.map((e=>({src:a({title:e.title,issuer:e.issuer.name,issuerDid:e.issuer.id,ownerDid:v.user.did,ownerName:v.user.fullName,ownerAvatarUrl:v.user.avatar,preferredColor:r||"auto"}),name:e.title,id:e.id}))),onSelect:e=>{return n={target:{value:v.user.passportTypes[e].name}},void(v.passport=n.target.value);var n},defaultIndex:0})}),(0,N.jsx)(u.Z,{textAlign:"center",children:(0,N.jsx)(b.Z,{variant:"contained",color:"primary",onClick:()=>{R()},disabled:!v.passport,children:C("common.next")})})]}):(0,N.jsx)(S.Z,{popup:!0,open:!0,hideCloseButton:!0,className:"connect",action:"lost-passport-list",forceConnected:!1,autoConnect:!1,checkFn:d.get,checkTimeout:6e5,webWalletUrl:s,onSuccess:A,locale:z,messages:{title:C("lostPassport.dialog.title"),scan:C("lostPassport.dialog.scan"),confirm:C("lostPassport.dialog.confirm"),success:C("lostPassport.dialog.success")}})},{label:C("lostPassport.receivePassport"),content:()=>{var e,n;const t={receiverDid:v.user.did,passportName:v.passport,teamDid:(null===(e=window)||void 0===e||null===(n=e.blocklet)||void 0===n?void 0:n.did)||""};return(0,N.jsx)(S.Z,{popup:!0,open:!0,hideCloseButton:!0,className:"connect",action:"lost-passport-issue",checkFn:d.get,checkTimeout:6e5,webWalletUrl:s,onSuccess:D,locale:z,messages:{title:"".concat(C("lostPassport.dialog.title")),scan:C("lostPassport.dialog.scan"),confirm:C("lostPassport.dialog.confirm"),success:C("lostPassport.dialog.success")},extraParams:t})}},{label:C("common.complete"),content:()=>(0,N.jsxs)(u.Z,{textAlign:"center",children:[(0,N.jsx)(u.Z,{mb:3,color:"success.main",children:(0,N.jsx)(p.Z,{style:{fontSize:60}})}),(0,N.jsx)(c.Z,{component:"p",variant:"body1",className:"subheader",children:C("issuePassport.dialog.success")}),(0,N.jsx)(b.Z,{style:{marginTop:40},variant:"contained",color:"primary",onClick:U,children:C("issuePassport.dialog.loginWithPassport")})]})}];return(0,N.jsx)(_,{children:(0,N.jsxs)("div",{className:"stepper",children:[(0,N.jsx)(h.Z,{className:"stepper-progress",alternativeLabel:!0,activeStep:v.activeStep,children:V.map((e=>{let{label:n}=e;return(0,N.jsx)(m.Z,{children:(0,N.jsx)(x.Z,{StepIconComponent:W,children:n})},n)}))}),(0,N.jsx)("div",{className:"stepper-content",children:V[v.activeStep].content()}),!v.success&&(0,N.jsx)(u.Z,{textAlign:"center",fontSize:12,children:(0,N.jsx)(l.Link,{to:"/",style:{color:"#4598FA"},children:C("lostPassport.return")})})]})})}));var R=t(25339),A=t(74094),D=t(75793);function U(){const{info:e}=(0,D.h6)(),n=(0,A.yP)(e);return(0,N.jsx)(E,{SessionContext:R.B3,webWalletUrl:n,createPassportSvg:n=>(0,A.Ju)(n,e),passportColor:"default"})}},5766:(e,n,t)=>{t.d(n,{Z:()=>l});var s=t(68420);const a=t(77668),o=t(2586),r={zh:a(t(56944)),en:a(o)};var i=t(96266);function l(e){return function(n){return(0,i.jsx)(s.Iw,{translations:r,children:(0,i.jsx)(e,{...n})})}}},76005:(e,n,t)=>{var s=t(71600);n.Z=void 0;var a=s(t(56930)),o=t(96266),r=(0,a.default)((0,o.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"}),"CheckCircle");n.Z=r},56184:(e,n,t)=>{var s=t(71600);n.Z=void 0;var a=s(t(56930)),o=t(96266),r=(0,a.default)((0,o.jsx)("path",{d:"M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4L9 16.2z"}),"Done");n.Z=r},41105:(e,n,t)=>{var s=t(71600);n.Z=void 0;var a=s(t(56930)),o=t(96266),r=(0,a.default)((0,o.jsx)("path",{d:"M19 9h-4V3H9v6H5l7 7 7-7zM5 18v2h14v-2H5z"}),"GetApp");n.Z=r},64185:(e,n,t)=>{var s=t(71600);n.Z=void 0;var a=s(t(56930)),o=t(96266),r=(0,a.default)((0,o.jsx)("path",{d:"M3 14h4v-4H3v4zm0 5h4v-4H3v4zM3 9h4V5H3v4zm5 5h13v-4H8v4zm0 5h13v-4H8v4zM8 5v4h13V5H8z"}),"ViewList");n.Z=r}}]);
|
|
1
|
+
"use strict";(self.webpackChunk_abtnode_webapp=self.webpackChunk_abtnode_webapp||[]).push([[2334],{22334:(e,n,t)=>{t.r(n),t.d(n,{default:()=>U});var s,a=t(71171),o=t(5057),r=t(33518),i=t(85493),l=t(15849),c=t(11750),d=t(22139),p=t(76005),u=t(39948),h=t(20870),m=t(31089),x=t(71767),g=t(64185),v=t(41105),f=t(56184),w=t(62681),b=t(28726),j=t(68420),Z=t(60829),S=t(49983),y=t(35432),P=t(12673),k=t(55898),C=t.n(k),N=t(96266);function L(e){let{list:n,width:t,height:s,cardSpace:a,onSelect:r,defaultIndex:i}=e;const[l,c]=(0,o.useState)(0),[d,p]=(0,o.useState)(0),u=(0,o.useRef)(null),h=e=>{if(e<0||e>n.length-1)return;c(e);const s=u.current.clientWidth;p(e*(t+a)-(s-t)/2+.5*a),r(e)};let m;(0,o.useEffect)((()=>{h(i);u.current.addEventListener("touchmove",(e=>e.preventDefault()),{passive:!1})}),[]);return(0,N.jsx)(z,{ref:u,onTouchStart:e=>{const n=e.touches[0];m=n.clientX},onTouchEnd:e=>{const n=e.changedTouches[0],t=m-n.clientX;Math.abs(t)>60&&h(t>0?l+1:l-1)},children:(0,N.jsx)("div",{className:"card-container",style:{transform:"translate(".concat(-d,"px, 0)")},children:n.map(((e,n)=>(0,N.jsx)("div",{className:"card-item ".concat(n===l?"selected":""),style:{width:t,height:s,margin:a/2},onClick:()=>h(n),children:(0,N.jsx)("div",{className:"card-content",dangerouslySetInnerHTML:{__html:e.src}})},e.id)))})})}const z=r.Z.div(s||(s=(0,a.Z)(["\n overflow: hidden;\n mask-image: linear-gradient(to left, transparent, black 3%, black 97%, transparent);\n overflow: hidden;\n .card-container {\n display: flex;\n white-space: nowrap;\n width: max-content;\n transition: all ease 0.3s;\n }\n .card-item {\n display: inline-flex;\n justify-content: center;\n align-items: center;\n flex-shrink: 0;\n cursor: pointer;\n\n .card-content {\n pointer-events: none;\n max-width: 100%;\n max-height: 100%;\n width: auto;\n height: auto;\n outline: #526ded solid 0;\n transition: all ease 0.2s;\n box-shadow: rgba(0, 0, 0, 0.2) 0 0 10px;\n }\n &.selected {\n cursor: default;\n .card-content {\n outline: #526ded solid 5px;\n }\n }\n }\n"])));L.propTypes={list:C().array,width:C().number,height:C().number,cardSpace:C().number,onSelect:C().func,defaultIndex:C().number},L.defaultProps={list:"",width:300,height:400,cardSpace:40,onSelect:()=>{},defaultIndex:0};var I,H=t(17450),M=t(5766),T=t(70284);function W(e){let{icon:n,active:t,completed:s}=e;const a={1:(0,N.jsx)(g.Z,{className:"step-icon"}),2:(0,N.jsx)(v.Z,{className:"step-icon"}),3:(0,N.jsx)(f.Z,{className:"step-icon"})},o=["step-icon-w"];return t&&o.push("step-icon-w--active"),s&&o.push("step-icon-w--completed"),(0,N.jsx)("div",{className:o.join(" "),children:a[String(n)]})}const _=(0,r.Z)(d.Z)(I||(I=(0,a.Z)(["\n padding-top: 46px;\n padding-bottom: 46px;\n height: 100%;\n overflow: auto;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n @media (max-width: ","px) {\n display: block;\n }\n .header {\n text-align: center;\n margin-bottom: 24px;\n }\n\n .stepper {\n padding: 24px;\n height: auto;\n width: 100%;\n min-height: 640px;\n display: flex;\n flex-direction: column;\n\n .stepper-progress {\n padding: 0;\n flex: 0;\n margin-bottom: 24px;\n\n .MuiStepLabel-label.MuiStepLabel-alternativeLabel {\n margin-top: 8px;\n }\n\n .MuiStepConnector-alternativeLabel {\n top: 24px;\n }\n\n .MuiStepConnector-lineHorizontal {\n height: 3px;\n border: none;\n background-color: #eaeaf0;\n border-radius: 1px;\n }\n\n .step-icon-w {\n background-color: ",";\n z-index: 1;\n color: ",";\n width: 50px;\n height: 50px;\n display: flex;\n border-radius: 50%;\n justify-content: center;\n align-items: center;\n .step-icon {\n font-size: 30px;\n }\n }\n\n .step-icon-w--active {\n background-color: ",";\n }\n\n .step-icon-w--completed {\n background-color: ",";\n }\n }\n\n .stepper-content {\n padding: 0 64px;\n flex: 1;\n display: flex;\n justify-content: center;\n align-items: center;\n margin-bottom: 24px;\n\n .stepper-icon {\n margin-left: 40px;\n }\n\n .stepper-auth {\n padding: 0;\n\n .auth-title {\n margin-bottom: 16px;\n }\n }\n\n .stepper-tip {\n text-align: center;\n margin-bottom: 16px;\n }\n @media (max-width: ","px) {\n padding: 0;\n }\n }\n\n .stepper-actions {\n flex: 0;\n text-align: right;\n padding: 0 64px;\n display: none;\n .step-button {\n margin-right: 8px;\n }\n }\n\n .select-passport {\n width: 80%;\n @media (max-width: ","px) {\n width: 100%;\n }\n }\n\n .user-info {\n .name {\n font-weight: 500;\n font-size: 18px;\n line-height: 25px;\n color: #222222;\n }\n }\n }\n\n .connect {\n background: #fafafa;\n }\n"])),(e=>e.theme.breakpoints.values.sm),(e=>e.theme.palette.grey[500]),(e=>e.theme.palette.common.white),(e=>e.theme.palette.primary.main),(e=>e.theme.palette.secondary.main),(e=>e.theme.breakpoints.values.sm),(e=>e.theme.breakpoints.values.sm)),E=(0,M.Z)((function(e){let{SessionContext:n,webWalletUrl:s,createPassportSvg:a,passportColor:r}=e;const{api:d,session:g}=(0,o.useContext)(n),v=(0,P.Z)({user:null,passport:null,success:!1,activeStep:0}),{setPassportId:f,clearPassportId:k}=(0,T.Z)(),{t:C,locale:z}=(0,o.useContext)(j.RD),I=(0,i.useNavigate)(),{wallet:M}=(0,Z.Z)(),{searchParams:E}=new URL(window.location.href),R=()=>{v.activeStep++},A=e=>{v.user=e.user},D=e=>{null!==e&&void 0!==e&&e.passportId&&f(e.passportId),v.success=!0,R()},U=()=>{var e;if(M&&(()=>{const{searchParams:e}=new URL(window.location.href);return"1"===e.get("fromWallet")})())return void t.e(2365).then(t.t.bind(t,72365,23)).then((e=>{e.call("arcClosePage")}));try{g.logout()}catch(s){}const n=E.get("redirect");n?window.location.replace(n):((null===(e=window.env)||void 0===e?void 0:e.apiPrefix)||"").startsWith(y.WELLKNOWN_SERVICE_PATH_PREFIX)?I("".concat(y.WELLKNOWN_SERVICE_PATH_PREFIX,"/connect"),{replace:!0}):(k(),window.location.replace("/"))},V=[{label:C("lostPassport.selectPassport"),content:()=>v.user?(0,N.jsxs)(u.Z,{className:"select-passport",children:[(0,N.jsxs)(u.Z,{my:1,display:"flex",alignItems:"center",className:"user-info",children:[(0,N.jsx)(w.Z,{src:v.user.avatar,style:{width:48,height:48,backgroundColor:"transparent",marginRight:16}}),(0,N.jsxs)(u.Z,{children:[(0,N.jsx)(u.Z,{className:"name",children:v.user.fullName}),(0,N.jsx)(u.Z,{className:"did",mt:1,children:(0,N.jsx)(H.Z,{did:v.user.did})})]})]}),(0,N.jsx)("div",{children:(0,N.jsx)(L,{width:230,height:306,cardSpace:24,list:v.user.passportTypes.map((e=>({src:a({title:e.title,issuer:e.issuer.name,issuerDid:e.issuer.id,ownerDid:v.user.did,ownerName:v.user.fullName,ownerAvatarUrl:v.user.avatar,preferredColor:r||"auto"}),name:e.title,id:e.id}))),onSelect:e=>{return n={target:{value:v.user.passportTypes[e].name}},void(v.passport=n.target.value);var n},defaultIndex:0})}),(0,N.jsx)(u.Z,{textAlign:"center",children:(0,N.jsx)(b.Z,{variant:"contained",color:"primary",onClick:()=>{R()},disabled:!v.passport,children:C("common.next")})})]}):(0,N.jsx)(S.Z,{popup:!0,open:!0,hideCloseButton:!0,className:"connect",action:"lost-passport-list",forceConnected:!1,autoConnect:!1,checkFn:d.get,checkTimeout:6e5,webWalletUrl:s,onSuccess:A,locale:z,messages:{title:C("lostPassport.dialog.title"),scan:C("lostPassport.dialog.scan"),confirm:C("lostPassport.dialog.confirm"),success:C("lostPassport.dialog.success")}})},{label:C("lostPassport.receivePassport"),content:()=>{var e,n;const t={receiverDid:v.user.did,passportName:v.passport,teamDid:(null===(e=window)||void 0===e||null===(n=e.blocklet)||void 0===n?void 0:n.did)||""};return(0,N.jsx)(S.Z,{popup:!0,open:!0,hideCloseButton:!0,className:"connect",action:"lost-passport-issue",checkFn:d.get,checkTimeout:6e5,webWalletUrl:s,onSuccess:D,locale:z,messages:{title:"".concat(C("lostPassport.dialog.title")),scan:C("lostPassport.dialog.scan"),confirm:C("lostPassport.dialog.confirm"),success:C("lostPassport.dialog.success")},extraParams:t})}},{label:C("common.complete"),content:()=>(0,N.jsxs)(u.Z,{textAlign:"center",children:[(0,N.jsx)(u.Z,{mb:3,color:"success.main",children:(0,N.jsx)(p.Z,{style:{fontSize:60}})}),(0,N.jsx)(c.Z,{component:"p",variant:"body1",className:"subheader",children:C("issuePassport.dialog.success")}),(0,N.jsx)(b.Z,{style:{marginTop:40},variant:"contained",color:"primary",onClick:U,children:C("issuePassport.dialog.loginWithPassport")})]})}];return(0,N.jsx)(_,{children:(0,N.jsxs)("div",{className:"stepper",children:[(0,N.jsx)(h.Z,{className:"stepper-progress",alternativeLabel:!0,activeStep:v.activeStep,children:V.map((e=>{let{label:n}=e;return(0,N.jsx)(m.Z,{children:(0,N.jsx)(x.Z,{StepIconComponent:W,children:n})},n)}))}),(0,N.jsx)("div",{className:"stepper-content",children:V[v.activeStep].content()}),!v.success&&(0,N.jsx)(u.Z,{textAlign:"center",fontSize:12,children:(0,N.jsx)(l.Link,{to:"/",style:{color:"#4598FA"},children:C("lostPassport.return")})})]})})}));var R=t(25339),A=t(74094),D=t(75793);function U(){const{info:e}=(0,D.h6)(),n=(0,A.yP)(e);return(0,N.jsx)(E,{SessionContext:R.B3,webWalletUrl:n,createPassportSvg:n=>(0,A.Ju)(n,e),passportColor:"default"})}},5766:(e,n,t)=>{t.d(n,{Z:()=>d});var s=t(68420),a=t(77668),o=t.n(a),r=t(2586),i=t(56944);const l={zh:o()(i.Z),en:o()(r.Z)};var c=t(96266);function d(e){return function(n){return(0,c.jsx)(s.Iw,{translations:l,children:(0,c.jsx)(e,{...n})})}}},76005:(e,n,t)=>{var s=t(71600);n.Z=void 0;var a=s(t(56930)),o=t(96266),r=(0,a.default)((0,o.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"}),"CheckCircle");n.Z=r},56184:(e,n,t)=>{var s=t(71600);n.Z=void 0;var a=s(t(56930)),o=t(96266),r=(0,a.default)((0,o.jsx)("path",{d:"M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4L9 16.2z"}),"Done");n.Z=r},41105:(e,n,t)=>{var s=t(71600);n.Z=void 0;var a=s(t(56930)),o=t(96266),r=(0,a.default)((0,o.jsx)("path",{d:"M19 9h-4V3H9v6H5l7 7 7-7zM5 18v2h14v-2H5z"}),"GetApp");n.Z=r},64185:(e,n,t)=>{var s=t(71600);n.Z=void 0;var a=s(t(56930)),o=t(96266),r=(0,a.default)((0,o.jsx)("path",{d:"M3 14h4v-4H3v4zm0 5h4v-4H3v4zM3 9h4V5H3v4zm5 5h13v-4H8v4zm0 5h13v-4H8v4zM8 5v4h13V5H8z"}),"ViewList");n.Z=r}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_abtnode_webapp=self.webpackChunk_abtnode_webapp||[]).push([[6950],{16950:(e,n,i)=>{i.r(n),i.d(n,{default:()=>fe});var t=i(71171),r=i(5057),o=i(33518),s=i(85493),a=i(10458),c=i.n(a),l=i(6352),p=i.n(l),d=i(43681),u=i.n(d),v=i(26796),f=i(55898),m=i.n(f),x=i(79366),g=i(44846),h=i(35474),_=i(68420),w=i(13128),j=i(57471),y=i(96266);const b=(0,j.Z)((0,y.jsx)("path",{d:"M19 3H4.99c-1.11 0-1.98.89-1.98 2L3 19c0 1.1.88 2 1.99 2H19c1.1 0 2-.9 2-2V5c0-1.11-.9-2-2-2zm0 12h-4c0 1.66-1.35 3-3 3s-3-1.34-3-3H4.99V5H19v10z"}),"Inbox");var k;function Z(e){let{invitation:n,createPassportSvg:i,passportColor:t}=e;const[o,s]=(0,r.useState)(!1),{t:a}=(0,r.useContext)(_.RD),c=(0,r.useMemo)((()=>(n.role.title||n.role.name).toUpperCase()),[n.role.title,n.role.name]),l=(0,r.useMemo)((()=>i({title:c,issuer:n.info.name,issuerDid:n.info.appDid,ownerName:"Your Name",ownerDid:n.info.appDid,preferredColor:n.info.passportColor||t})),[n,c]),p=(0,r.useCallback)((()=>{s(!0)}),[]),d=(0,r.useCallback)((()=>{s(!1)}),[]);return(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(S,{children:(0,y.jsx)("div",{className:"invite-passport__card",onClick:p,children:(0,y.jsx)("div",{className:"invite-passport__cover",dangerouslySetInnerHTML:{__html:l}})})}),(0,y.jsx)(w.ZP,{open:o,title:a("invite.viewPermission"),PaperProps:{style:{minHeight:"auto",paddingBottom:"20px"}},onClose:d,children:n.role.permissions&&n.role.permissions.length>0?(0,y.jsx)("ul",{style:{listStyle:"circle",padding:"0 20px"},children:n.role.permissions.map((e=>(0,y.jsx)("li",{style:{listStyle:"circle"},children:e.description},e.name)))}):(0,y.jsxs)("div",{style:{color:"#999",textAlign:"center"},children:[(0,y.jsx)(b,{style:{width:"30px",height:"30px"}}),(0,y.jsx)("div",{children:a("invite.emptyPermission")})]})})]})}Z.propTypes={invitation:m().object.isRequired,createPassportSvg:m().func.isRequired,passportColor:m().string},Z.defaultProps={passportColor:"auto"};const S=o.Z.div(k||(k=(0,t.Z)(["\n display: flex;\n max-width: 350px;\n margin: 30px auto;\n .invite-passport__card {\n margin: 0 auto;\n width: 228px;\n height: 258px;\n flex-shrink: 0;\n .invite-passport__cover {\n cursor: pointer;\n width: 100%;\n height: 100%;\n }\n }\n .invite-passport__content {\n flex: 1;\n display: flex;\n flex-direction: column;\n }\n .invite-passport__title {\n font-weight: 700;\n font-size: 16px;\n }\n .invite-passport__description {\n overflow: hidden;\n text-overflow: ellipsis;\n display: -webkit-box;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical;\n height: 3em;\n color: #999;\n font-size: 14px;\n }\n .invite-passport__view-permission {\n cursor: pointer;\n font-size: 14px;\n font-weight: 600;\n line-height: 18px;\n color: ",";\n }\n"])),(e=>{let{theme:n}=e;return n.palette.primary.main})),C=Z;var P,z=i(92459),N=i(74958),R=i(14491),T=i(70284),L=i(73545);function F(e){let{invitation:n,onLogin:i,onReceive:t,inService:o}=e;const{t:s,locale:a}=(0,_.PE)(),{connectApi:c}=(0,L.T)(),{getPassportId:l}=(0,T.Z)();let d;var u,v;"undefined"!==typeof window&&(d=null===(u=window)||void 0===u||null===(v=u.blocklet)||void 0===v?void 0:v.componentId);const f={passportId:l(),inviteId:n.inviteId,baseUrl:window.location.origin,componentId:d},m=(0,r.useCallback)((()=>{c.close()}),[c]),x=(0,r.useCallback)((function(){c.close(),i(...arguments)}),[i,c]),g=(0,r.useCallback)((()=>{"function"!==typeof t?o?c.openPopup({action:"invite",className:"connect",forceConnected:!1,autoConnect:!1,locale:a,extraParams:{provider:"wallet",...f},baseUrl:window.location.origin,prefix:p()(window.location.origin,N.Bu,N.nC),messages:{title:s("receive.dialog.title"),scan:s("receive.dialog.scan"),confirm:s("receive.dialog.confirm"),success:s("receive.dialog.success")},onSuccess:x,onClose:m},{locale:a}):c.open({action:"invite",className:"connect",forceConnected:!1,autoConnect:!1,locale:a,extraParams:f,messages:{title:s("receive.dialog.title"),scan:s("receive.dialog.scan"),confirm:s("receive.dialog.confirm"),success:s("receive.dialog.success")},onSuccess:x,onClose:m}):t()}),[c.openPopup]);return(0,y.jsxs)(I,{children:[(0,y.jsx)(z.Z,{size:"large",variant:"contained",className:"invite-receive__button","data-cy":"invite-receive-passport",color:"primary",onClick:g,children:s("invite.receive")}),(0,y.jsxs)("div",{className:"invite-receive__until",children:[s("invite.validUntil"),(0,R.o0)(n.expireDate,a)]})]})}F.propTypes={invitation:m().object.isRequired,onLogin:m().func,onReceive:m().func,inService:m().bool},F.defaultProps={onLogin:()=>{},onReceive:null,inService:!1};const I=o.Z.div(P||(P=(0,t.Z)(["\n text-align: center;\n .invite-receive__logo-wrapper {\n display: inline-flex;\n align-items: center;\n color: #9397a1;\n font-size: 14px;\n }\n .invite-receive__logo {\n height: 16px;\n margin-left: 8px;\n }\n .invite-receive__button {\n width: 100%;\n margin: 16px 0;\n white-space: nowrap;\n }\n .invite-receive__until {\n text-align: center;\n font-size: 14px;\n }\n .invite-receive__description {\n color: #999;\n text-align: left;\n list-style: decimal;\n padding: 0;\n padding-left: 1.2em;\n margin: 40px 0;\n }\n .invite-receive__description-item {\n list-style: decimal;\n }\n .invite-receive__link {\n color: ",";\n }\n"])),(e=>{let{theme:n}=e;return n.palette.primary.main})),E=F;var D;function U(e){let{onLogin:n}=e;const{t:i}=(0,_.PE)();return(0,y.jsx)(M,{children:(0,y.jsx)(z.Z,{size:"large",variant:"contained",className:"invite-receive__button","data-cy":"invite-receive-passport",color:"primary",onClick:()=>n(),children:i("common.connect")})})}U.propTypes={onLogin:m().func},U.defaultProps={onLogin:()=>{}};const M=o.Z.div(D||(D=(0,t.Z)(["\n text-align: center;\n .invite-receive__logo-wrapper {\n display: inline-flex;\n align-items: center;\n color: #9397a1;\n font-size: 14px;\n }\n .invite-receive__logo {\n height: 16px;\n margin-left: 8px;\n }\n .invite-receive__button {\n width: 100%;\n margin: 16px 0;\n white-space: nowrap;\n }\n .invite-receive__until {\n text-align: center;\n font-size: 14px;\n }\n .invite-receive__description {\n color: #999;\n text-align: left;\n list-style: decimal;\n padding: 0;\n padding-left: 1.2em;\n margin: 40px 0;\n }\n .invite-receive__description-item {\n list-style: decimal;\n }\n .invite-receive__link {\n color: ",";\n }\n"])),(e=>{let{theme:n}=e;return n.palette.primary.main})),q=U;var H,O=i(72333);function W(e){let{invitation:n}=e;const{t:i}=(0,_.PE)(),t=(0,r.useMemo)((()=>(n.role.title||n.role.name).toUpperCase()),[n.role.title,n.role.name]),o=(0,r.useMemo)((()=>i("invite.message",{name:"{{name}}",role:t,dapp:"{{dapp}}"})),[i,t]),s=(0,R.E8)(n.info.chainHost,n.inviter.did,"account"),a=(0,R.Zp)(o,{name:()=>s?(0,y.jsx)("a",{target:"_blank",href:s,className:"invite-user__link",rel:"noreferrer",children:n.inviter.fullName},"name"):n.inviter.fullName,dapp:()=>(0,y.jsx)("a",{target:"_blank",href:n.info.url,className:"invite-user__link",rel:"noreferrer",children:n.info.name},"dapp")});return(0,y.jsxs)(A,{children:[(0,y.jsx)(O.Z,{did:n.inviter.did,src:encodeURI(n.inviter.avatar),size:80,shape:"circle",variant:"circle"}),(0,y.jsx)("div",{className:"invite-user__message",children:a})]})}W.propTypes={invitation:m().object.isRequired};const A=o.Z.div(H||(H=(0,t.Z)(["\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n .invite-user__name {\n font-weight: 700;\n font-size: 16px;\n margin: 8px 0 2px 0;\n }\n .invite-user__address {\n font-size: 12px;\n }\n .invite-user__message {\n margin-top: 20px;\n font-weight: 700;\n /* width: 90%; */\n text-align: center;\n font-size: 18px;\n }\n .invite-user__link {\n color: ",";\n }\n"])),(e=>{let{theme:n}=e;return n.palette.primary.main})),B=W;var V,Y=i(39948),J=i(76005);function K(e){let{invitation:n,type:i}=e;const{t:t}=(0,_.PE)(),o=(0,r.useMemo)((()=>t("invite.success",{dapp:"{{dapp}}"})),[t]),s=(0,R.E8)(n.info.chainHost,n.inviter.did,"account"),a="receiver"===i?n.receiver:n.inviter,c=(0,R.Zp)(o,{name:()=>s?(0,y.jsx)("a",{target:"_blank",href:s,className:"invite-user__link",rel:"noreferrer",children:a.fullName},"name"):a.fullName,dapp:()=>(0,y.jsx)("a",{target:"_blank",href:n.info.url,className:"invite-user__link",rel:"noreferrer",children:n.info.name},"dapp")});return(0,y.jsxs)(G,{children:[(0,y.jsx)(Y.Z,{pt:1,color:"success.main",children:(0,y.jsx)(J.Z,{style:{fontSize:80}})}),(0,y.jsx)("div",{className:"invite-user__message",children:c})]})}K.propTypes={invitation:m().object.isRequired,type:m().oneOf("inviter","receiver")},K.defaultProps={type:"inviter"};const G=o.Z.div(V||(V=(0,t.Z)(["\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n .invite-user__name {\n font-weight: 700;\n font-size: 16px;\n margin: 8px 0 2px 0;\n }\n .invite-user__address {\n font-size: 12px;\n }\n .invite-user__message {\n margin-top: 20px;\n font-weight: 700;\n /* width: 90%; */\n text-align: center;\n font-size: 18px;\n }\n .invite-user__link {\n color: ",";\n }\n"])),(e=>{let{theme:n}=e;return n.palette.primary.main})),Q=K;var X;function $(e){let{invitation:n,...i}=e;return(0,y.jsxs)(ee,{...i,children:[(0,y.jsx)(O.Z,{did:n.info.did,src:n.info.logo,style:{flexShrink:0}}),(0,y.jsxs)("div",{className:"invite-app__content",children:[(0,y.jsx)("div",{className:"invite-app__title",children:n.info.name}),(0,y.jsx)("div",{className:"invite-app__description",children:n.info.description})]})]})}$.propTypes={invitation:m().object.isRequired};const ee=o.Z.div(X||(X=(0,t.Z)(["\n display: flex;\n justify-content: space-between;\n align-items: center;\n overflow: hidden;\n .invite-app__content {\n flex: 1;\n margin: 0 12px;\n font-weight: 700;\n overflow: hidden;\n }\n .invite-app__title {\n line-height: 1;\n margin-bottom: 2px;\n overflow: hidden;\n }\n .invite-app__description {\n font-size: 12px;\n white-space: nowrap;\n text-overflow: ellipsis;\n height: 1.3em;\n color: #999;\n overflow: hidden;\n }\n"]))),ne=$;var ie,te=i(5766);function re(e){let{getDataFn:n,passportColor:i,createPassportSvg:t,onLoginSuccess:r,checkFn:o,onReceive:s,inService:a}=e;const c=(0,x.Z)(n);if(c.loading)return(0,y.jsx)(g.Z,{});var l,p;if(c.error)return(0,y.jsx)(h.Z,{status:"404",title:null===(l=c.error)||void 0===l||null===(p=l.response)||void 0===p?void 0:p.data,description:""});const d="success"===c.data.status,u=d?Q:B,v=d?q:E;return(0,y.jsxs)(oe,{className:"page-invite__wrapper",children:[(0,y.jsx)(ne,{invitation:c.data}),(0,y.jsxs)("div",{className:"page-invite__card",children:[(0,y.jsx)(u,{invitation:c.data}),(0,y.jsx)(C,{invitation:c.data,createPassportSvg:t,passportColor:i}),(0,y.jsx)(v,{invitation:c.data,onLogin:r,checkFn:o,onReceive:s,inService:a})]})]})}re.propTypes={getDataFn:m().func.isRequired,checkFn:m().func.isRequired,createPassportSvg:m().func.isRequired,onLoginSuccess:m().func,onReceive:m().func,passportColor:m().string,inService:m().bool},re.defaultProps={onLoginSuccess:()=>{},passportColor:"auto",onReceive:null,inService:!1};const oe=o.Z.div(ie||(ie=(0,t.Z)(["\n max-width: 460px;\n max-height: 650px;\n min-height: 450px;\n width: 90%;\n height: 80%;\n display: flex;\n flex-direction: column;\n .page-invite__card {\n background-color: #fff;\n border-radius: 4px;\n flex: 1;\n padding: 20px 30px;\n margin-top: 10px;\n }\n .page-invite__app {\n margin-top: 20px;\n }\n"]))),se=(0,te.Z)(re);var ae,ce=i(49983),le=i(25339),pe=i(75793),de=i(74094);function ue(e){const{api:n,session:i}=(0,le.Tt)(),{info:t}=(0,pe.h6)(),o=(0,s.useLocation)(),a=(0,s.useNavigate)(),{t:l,locale:d}=(0,_.PE)(),{encryptKey:f,decrypt:m}=(0,ce.R)(),[x,h]=(0,r.useState)(!1),w=(0,r.useMemo)((()=>new URLSearchParams(o.search).get("inviteId")),[o]),j=(0,v.default)((async()=>{if(!w)return null;let e;const{data:i}=await n.get("/api/invitation",{params:{inviteId:w}}),r=!!u()(t,"ownerNft.did")&&"owner"===i.role.name;if(r){const i=new URL(window.location.href);i.pathname=p()((0,de.Y5)(),"/api/did/invite/token"),i.searchParams.set("_ek_",f),i.searchParams.set("inviteId",w);const{data:t}=await n.get(i.href);e=t}return{invitation:i,nextWorkflow:e,needReceiveNFT:r}})),b=(0,r.useCallback)((()=>{h(!0)}),[]),k=(0,r.useCallback)((()=>{if(j.error)throw j.error;return j.value.invitation}),[j]),Z=(0,r.useCallback)((async e=>{e&&(0,de.ZB)(m(e.sessionToken));const n=new URLSearchParams(o.search);n.delete("inviteId");const t=n.toString();await i.refresh(),a("/".concat(t?"?".concat(t):t),{replace:!0})}),[o,a,i]);if(j.loading)return(0,y.jsx)(g.Z,{});return(0,y.jsxs)(ve,{className:"page-invite",children:[u()(j,"value.needReceiveNFT")&&(0,y.jsx)(ce.Z,{action:"login",popup:!0,className:"connect",open:x,locale:d,baseUrl:t.launcher.url,checkFn:c().create({baseURL:t.launcher.url}).get,onSuccess:()=>{const e=new URL(window.location.href);e.pathname=p()((0,de.Y5)(),"/api/did/invite/status"),e.searchParams.set("_t_",j.value.nextWorkflow.token),e.searchParams.set("locale",d);const t=setInterval((async()=>{const{data:r}=await n.get(e.href);"succeed"===r.status&&(clearInterval(t),i.updateConnectedInfo(r),Z(r))}),2e3)},onClose:()=>{h(!1)},checkTimeout:3e5,webWalletUrl:(0,de.yP)(t),extraParams:{nw:u()(j,"value.nextWorkflow.url")},messages:{title:l("invite.transferNFTDialog.title",{name:t.name}),scan:l("invite.transferNFTDialog.scan"),confirm:l("invite.transferNFTDialog.confirm"),success:l("invite.transferNFTDialog.success")},prefix:"/.well-known/service/api/did"}),(0,y.jsx)(se,{...e,getDataFn:k,createPassportSvg:e=>(0,de.Ju)(e,t),checkFn:n.get,onLoginSuccess:Z,passportColor:"default",onReceive:u()(j,"value.needReceiveNFT")?b:null})]})}const ve=o.Z.div(ae||(ae=(0,t.Z)(["\n width: 100vw;\n height: 100%;\n min-height: 100vh;\n display: flex;\n justify-content: center;\n align-items: center;\n background-color: #f6f8fa;\n overflow: auto;\n padding: 20px;\n"])));function fe(){return(0,pe.h6)().loading?(0,y.jsx)(g.Z,{}):(0,y.jsx)(ue,{})}},5766:(e,n,i)=>{i.d(n,{Z:()=>c});var t=i(68420);const r=i(77668),o=i(2586),s={zh:r(i(56944)),en:r(o)};var a=i(96266);function c(e){return function(n){return(0,a.jsx)(t.Iw,{translations:s,children:(0,a.jsx)(e,{...n})})}}},92459:(e,n,i)=>{i.d(n,{Z:()=>c});var t=i(55898),r=i.n(t),o=i(28726),s=i(81089),a=i(96266);function c(e){let{children:n,...i}=e;return(0,a.jsxs)(o.Z,{color:"did",variant:"contained",...i,children:[(0,a.jsx)("span",{style:{fontWeight:400},children:n||"Continue With"}),(0,a.jsx)(s.Z,{style:{width:"auto",height:"1.2em",margin:"0 4px 0 8px"}})]})}c.propTypes={children:r().any},c.defaultProps={children:""}},35474:(e,n,i)=>{i.d(n,{Z:()=>N});var t={};i.r(t),i.d(t,{ComingSoon:()=>k,Error:()=>y,Forbidden:()=>w,Info:()=>Z,InternalServerError:()=>j,Maintenance:()=>b,PageNotFound:()=>_});var r,o=i(55898),s=i.n(o),a=i(71171),c=i(39948),l=i(47685),p=i(96266);function d(e){let{icon:n,title:i,description:t,extra:r,...o}=e;return(0,p.jsxs)(u,{...o,children:[n,"string"===typeof i?(0,p.jsx)(c.Z,{mt:3,fontSize:22,fontWeight:400,color:"#47494E",textAlign:"center",children:i}):i,"string"===typeof t?(0,p.jsx)(c.Z,{mt:1,fontSize:14,color:"#7F828B",textAlign:"center",children:t}):t,(0,p.jsx)(c.Z,{mt:3,children:r})]})}d.propTypes={icon:s().element,title:s().oneOfType([s().string,s().element]),description:s().oneOfType([s().string,s().element]),actions:s().any,extra:s().element},d.defaultProps={icon:void 0,title:"",description:"",actions:null,extra:void 0};const u=(0,l.zo)("div")(r||(r=(0,a.Z)(["\n box-sizing: border-box;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n height: 100%;\n padding: 16px;\n\n background-color: #f7f8fb;\n"]))),v=d;var f=i(36134),m=i(11532);const x={en:{404:{title:"404 - Page Not Found",description:"Sorry about that, the page you are looking for does not exist or has been moved."},403:{title:"403 \u2013 Forbidden",description:"Sorry, you are not authorized to access this page."},500:{title:"500 - Internal Server Error",description:"An internal server error has occurred. Please try again later."},error:{title:"Application Error",description:"Something went wrong. Please try again later."},maintenance:{title:"Offline for maintenance",description:"This app is undergoing maintenance right now. Please check back later."},comingSoon:{title:"Coming Soon",description:"Our website is under construction. We'll be here soon with our new website."}},zh:{404:{title:"404 - \u9875\u9762\u672a\u627e\u5230",description:"\u5f88\u62b1\u6b49\uff0c\u60a8\u6b63\u5728\u5bfb\u627e\u7684\u9875\u9762\u4e0d\u5b58\u5728\u6216\u5df2\u88ab\u79fb\u52a8\u3002"},403:{title:"403 \u2013 \u7981\u6b62\u8bbf\u95ee",description:"\u5f88\u62b1\u6b49\uff0c\u60a8\u6ca1\u6709\u6743\u9650\u8bbf\u95ee\u6b64\u9875\u9762\u3002"},500:{title:"500 - \u5185\u90e8\u670d\u52a1\u5668\u9519\u8bef",description:"\u53d1\u751f\u4e86\u4e00\u4e2a\u5185\u90e8\u670d\u52a1\u5668\u9519\u8bef\u3002\u8bf7\u7a0d\u540e\u518d\u8bd5\u3002"},error:{title:"Application Error",description:"\u51fa\u9519\u4e86, \u8bf7\u7a0d\u540e\u518d\u8bd5\u3002"},maintenance:{title:"\u7ef4\u62a4\u4e2d",description:"\u5e94\u7528\u7a0b\u5e8f\u6b63\u5728\u8fdb\u884c\u7ef4\u62a4\u3002\u8bf7\u7a0d\u540e\u518d\u67e5\u770b\u3002"},comingSoon:{title:"\u5373\u5c06\u4e0a\u7ebf",description:"\u6211\u4eec\u7684\u7f51\u7ad9\u6b63\u5728\u5efa\u8bbe\u4e2d\u3002\u6211\u4eec\u5f88\u5feb\u5c31\u4f1a\u5728\u8fd9\u91cc\u63a8\u51fa\u6211\u4eec\u7684\u65b0\u7f51\u7ad9\u3002"}}};var g=i(68420);const h=e=>{e=["zh","en"].includes(e)?e:"";const{locale:n}=(0,g.PE)()||{locale:"en"},i=e||n;return x[i]?i:"en"};function _(e){let{locale:n,...i}=e;return n=h(n),(0,p.jsx)(v,{icon:(0,p.jsx)(S,{}),title:x[n][404].title,description:x[n][404].description,...i})}function w(e){let{locale:n,...i}=e;return n=h(n),(0,p.jsx)(v,{icon:(0,p.jsx)(S,{}),title:x[n][403].title,description:x[n][403].description,...i})}function j(e){let{locale:n,...i}=e;return n=h(n),(0,p.jsx)(v,{icon:(0,p.jsx)(S,{}),title:x[n][500].title,description:x[n][500].description,...i})}function y(e){let{locale:n,...i}=e;return n=h(n),(0,p.jsx)(v,{icon:(0,p.jsx)(S,{}),title:x[n].error.title,description:x[n].error.description,...i})}function b(e){let{locale:n,...i}=e;return n=h(n),(0,p.jsx)(v,{icon:(0,p.jsx)(C,{}),title:x[n].maintenance.title,description:x[n].maintenance.description,...i})}function k(e){let{locale:n,...i}=e;return n=h(n),(0,p.jsx)(v,{icon:(0,p.jsx)(C,{}),title:x[n].comingSoon.title,description:x[n].comingSoon.description,...i})}function Z(e){return(0,p.jsx)(v,{icon:(0,p.jsx)(C,{}),...e})}function S(e){const n=(0,l.Fg)();return(0,p.jsx)(m.Z,{style:{color:n.palette.error.main,fontSize:72},...e})}function C(e){const n=(0,l.Fg)();return(0,p.jsx)(f.Z,{style:{color:n.palette.info.main,fontSize:72},...e})}_.status="404",w.status="403",j.status="500",y.status="error",b.status="maintenance",k.status="comingSoon",Z.status="info";const P=Object.keys(t).reduce(((e,n)=>({...e,[t[n].status||n]:t[n]})),{});function z(e){let{status:n,...i}=e;if(n){if(P[n]){const e=P[n];return(0,p.jsx)(e,{...i})}throw new Error("Please provide a valid status for Result.status. Valid values are: ".concat(Object.keys(P).join(", ")))}return(0,p.jsx)(v,{...i})}z.propTypes={status:s().oneOfType([s().string,s().number]),...v.propTypes},z.defaultProps={status:""};const N=z},11532:(e,n,i)=>{var t=i(71600);n.Z=void 0;var r=t(i(56930)),o=i(96266),s=(0,r.default)((0,o.jsx)("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm4.3 14.3c-.39.39-1.02.39-1.41 0L12 13.41 9.11 16.3c-.39.39-1.02.39-1.41 0a.9959.9959 0 0 1 0-1.41L10.59 12 7.7 9.11a.9959.9959 0 0 1 0-1.41c.39-.39 1.02-.39 1.41 0L12 10.59l2.89-2.89c.39-.39 1.02-.39 1.41 0 .39.39.39 1.02 0 1.41L13.41 12l2.89 2.89c.38.38.38 1.02 0 1.41z"}),"CancelRounded");n.Z=s},76005:(e,n,i)=>{var t=i(71600);n.Z=void 0;var r=t(i(56930)),o=i(96266),s=(0,r.default)((0,o.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"}),"CheckCircle");n.Z=s},36134:(e,n,i)=>{var t=i(71600);n.Z=void 0;var r=t(i(56930)),o=i(96266),s=(0,r.default)((0,o.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z"}),"Info");n.Z=s}}]);
|
|
1
|
+
"use strict";(self.webpackChunk_abtnode_webapp=self.webpackChunk_abtnode_webapp||[]).push([[6950],{16950:(e,n,i)=>{i.r(n),i.d(n,{default:()=>fe});var t=i(71171),r=i(5057),o=i(33518),s=i(85493),a=i(10458),c=i.n(a),l=i(6352),p=i.n(l),d=i(43681),u=i.n(d),v=i(26796),f=i(55898),m=i.n(f),x=i(79366),g=i(44846),h=i(35474),_=i(68420),w=i(13128),j=i(57471),y=i(96266);const b=(0,j.Z)((0,y.jsx)("path",{d:"M19 3H4.99c-1.11 0-1.98.89-1.98 2L3 19c0 1.1.88 2 1.99 2H19c1.1 0 2-.9 2-2V5c0-1.11-.9-2-2-2zm0 12h-4c0 1.66-1.35 3-3 3s-3-1.34-3-3H4.99V5H19v10z"}),"Inbox");var k;function Z(e){let{invitation:n,createPassportSvg:i,passportColor:t}=e;const[o,s]=(0,r.useState)(!1),{t:a}=(0,r.useContext)(_.RD),c=(0,r.useMemo)((()=>(n.role.title||n.role.name).toUpperCase()),[n.role.title,n.role.name]),l=(0,r.useMemo)((()=>i({title:c,issuer:n.info.name,issuerDid:n.info.appDid,ownerName:"Your Name",ownerDid:n.info.appDid,preferredColor:n.info.passportColor||t})),[n,c]),p=(0,r.useCallback)((()=>{s(!0)}),[]),d=(0,r.useCallback)((()=>{s(!1)}),[]);return(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(S,{children:(0,y.jsx)("div",{className:"invite-passport__card",onClick:p,children:(0,y.jsx)("div",{className:"invite-passport__cover",dangerouslySetInnerHTML:{__html:l}})})}),(0,y.jsx)(w.ZP,{open:o,title:a("invite.viewPermission"),PaperProps:{style:{minHeight:"auto",paddingBottom:"20px"}},onClose:d,children:n.role.permissions&&n.role.permissions.length>0?(0,y.jsx)("ul",{style:{listStyle:"circle",padding:"0 20px"},children:n.role.permissions.map((e=>(0,y.jsx)("li",{style:{listStyle:"circle"},children:e.description},e.name)))}):(0,y.jsxs)("div",{style:{color:"#999",textAlign:"center"},children:[(0,y.jsx)(b,{style:{width:"30px",height:"30px"}}),(0,y.jsx)("div",{children:a("invite.emptyPermission")})]})})]})}Z.propTypes={invitation:m().object.isRequired,createPassportSvg:m().func.isRequired,passportColor:m().string},Z.defaultProps={passportColor:"auto"};const S=o.Z.div(k||(k=(0,t.Z)(["\n display: flex;\n max-width: 350px;\n margin: 30px auto;\n .invite-passport__card {\n margin: 0 auto;\n width: 228px;\n height: 258px;\n flex-shrink: 0;\n .invite-passport__cover {\n cursor: pointer;\n width: 100%;\n height: 100%;\n }\n }\n .invite-passport__content {\n flex: 1;\n display: flex;\n flex-direction: column;\n }\n .invite-passport__title {\n font-weight: 700;\n font-size: 16px;\n }\n .invite-passport__description {\n overflow: hidden;\n text-overflow: ellipsis;\n display: -webkit-box;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical;\n height: 3em;\n color: #999;\n font-size: 14px;\n }\n .invite-passport__view-permission {\n cursor: pointer;\n font-size: 14px;\n font-weight: 600;\n line-height: 18px;\n color: ",";\n }\n"])),(e=>{let{theme:n}=e;return n.palette.primary.main})),C=Z;var P,z=i(92459),N=i(74958),R=i(14491),T=i(70284),L=i(73545);function F(e){let{invitation:n,onLogin:i,onReceive:t,inService:o}=e;const{t:s,locale:a}=(0,_.PE)(),{connectApi:c}=(0,L.T)(),{getPassportId:l}=(0,T.Z)();let d;var u,v;"undefined"!==typeof window&&(d=null===(u=window)||void 0===u||null===(v=u.blocklet)||void 0===v?void 0:v.componentId);const f={passportId:l(),inviteId:n.inviteId,baseUrl:window.location.origin,componentId:d},m=(0,r.useCallback)((()=>{c.close()}),[c]),x=(0,r.useCallback)((function(){c.close(),i(...arguments)}),[i,c]),g=(0,r.useCallback)((()=>{"function"!==typeof t?o?c.openPopup({action:"invite",className:"connect",forceConnected:!1,autoConnect:!1,locale:a,extraParams:{provider:"wallet",...f},baseUrl:window.location.origin,prefix:p()(window.location.origin,N.Bu,N.nC),messages:{title:s("receive.dialog.title"),scan:s("receive.dialog.scan"),confirm:s("receive.dialog.confirm"),success:s("receive.dialog.success")},onSuccess:x,onClose:m},{locale:a}):c.open({action:"invite",className:"connect",forceConnected:!1,autoConnect:!1,locale:a,extraParams:f,messages:{title:s("receive.dialog.title"),scan:s("receive.dialog.scan"),confirm:s("receive.dialog.confirm"),success:s("receive.dialog.success")},onSuccess:x,onClose:m}):t()}),[c.openPopup]);return(0,y.jsxs)(I,{children:[(0,y.jsx)(z.Z,{size:"large",variant:"contained",className:"invite-receive__button","data-cy":"invite-receive-passport",color:"primary",onClick:g,children:s("invite.receive")}),(0,y.jsxs)("div",{className:"invite-receive__until",children:[s("invite.validUntil"),(0,R.o0)(n.expireDate,a)]})]})}F.propTypes={invitation:m().object.isRequired,onLogin:m().func,onReceive:m().func,inService:m().bool},F.defaultProps={onLogin:()=>{},onReceive:null,inService:!1};const I=o.Z.div(P||(P=(0,t.Z)(["\n text-align: center;\n .invite-receive__logo-wrapper {\n display: inline-flex;\n align-items: center;\n color: #9397a1;\n font-size: 14px;\n }\n .invite-receive__logo {\n height: 16px;\n margin-left: 8px;\n }\n .invite-receive__button {\n width: 100%;\n margin: 16px 0;\n white-space: nowrap;\n }\n .invite-receive__until {\n text-align: center;\n font-size: 14px;\n }\n .invite-receive__description {\n color: #999;\n text-align: left;\n list-style: decimal;\n padding: 0;\n padding-left: 1.2em;\n margin: 40px 0;\n }\n .invite-receive__description-item {\n list-style: decimal;\n }\n .invite-receive__link {\n color: ",";\n }\n"])),(e=>{let{theme:n}=e;return n.palette.primary.main})),E=F;var D;function U(e){let{onLogin:n}=e;const{t:i}=(0,_.PE)();return(0,y.jsx)(M,{children:(0,y.jsx)(z.Z,{size:"large",variant:"contained",className:"invite-receive__button","data-cy":"invite-receive-passport",color:"primary",onClick:()=>n(),children:i("common.connect")})})}U.propTypes={onLogin:m().func},U.defaultProps={onLogin:()=>{}};const M=o.Z.div(D||(D=(0,t.Z)(["\n text-align: center;\n .invite-receive__logo-wrapper {\n display: inline-flex;\n align-items: center;\n color: #9397a1;\n font-size: 14px;\n }\n .invite-receive__logo {\n height: 16px;\n margin-left: 8px;\n }\n .invite-receive__button {\n width: 100%;\n margin: 16px 0;\n white-space: nowrap;\n }\n .invite-receive__until {\n text-align: center;\n font-size: 14px;\n }\n .invite-receive__description {\n color: #999;\n text-align: left;\n list-style: decimal;\n padding: 0;\n padding-left: 1.2em;\n margin: 40px 0;\n }\n .invite-receive__description-item {\n list-style: decimal;\n }\n .invite-receive__link {\n color: ",";\n }\n"])),(e=>{let{theme:n}=e;return n.palette.primary.main})),q=U;var H,O=i(72333);function W(e){let{invitation:n}=e;const{t:i}=(0,_.PE)(),t=(0,r.useMemo)((()=>(n.role.title||n.role.name).toUpperCase()),[n.role.title,n.role.name]),o=(0,r.useMemo)((()=>i("invite.message",{name:"{{name}}",role:t,dapp:"{{dapp}}"})),[i,t]),s=(0,R.E8)(n.info.chainHost,n.inviter.did,"account"),a=(0,R.Zp)(o,{name:()=>s?(0,y.jsx)("a",{target:"_blank",href:s,className:"invite-user__link",rel:"noreferrer",children:n.inviter.fullName},"name"):n.inviter.fullName,dapp:()=>(0,y.jsx)("a",{target:"_blank",href:n.info.url,className:"invite-user__link",rel:"noreferrer",children:n.info.name},"dapp")});return(0,y.jsxs)(A,{children:[(0,y.jsx)(O.Z,{did:n.inviter.did,src:encodeURI(n.inviter.avatar),size:80,shape:"circle",variant:"circle"}),(0,y.jsx)("div",{className:"invite-user__message",children:a})]})}W.propTypes={invitation:m().object.isRequired};const A=o.Z.div(H||(H=(0,t.Z)(["\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n .invite-user__name {\n font-weight: 700;\n font-size: 16px;\n margin: 8px 0 2px 0;\n }\n .invite-user__address {\n font-size: 12px;\n }\n .invite-user__message {\n margin-top: 20px;\n font-weight: 700;\n /* width: 90%; */\n text-align: center;\n font-size: 18px;\n }\n .invite-user__link {\n color: ",";\n }\n"])),(e=>{let{theme:n}=e;return n.palette.primary.main})),B=W;var V,Y=i(39948),J=i(76005);function K(e){let{invitation:n,type:i}=e;const{t:t}=(0,_.PE)(),o=(0,r.useMemo)((()=>t("invite.success",{dapp:"{{dapp}}"})),[t]),s=(0,R.E8)(n.info.chainHost,n.inviter.did,"account"),a="receiver"===i?n.receiver:n.inviter,c=(0,R.Zp)(o,{name:()=>s?(0,y.jsx)("a",{target:"_blank",href:s,className:"invite-user__link",rel:"noreferrer",children:a.fullName},"name"):a.fullName,dapp:()=>(0,y.jsx)("a",{target:"_blank",href:n.info.url,className:"invite-user__link",rel:"noreferrer",children:n.info.name},"dapp")});return(0,y.jsxs)(G,{children:[(0,y.jsx)(Y.Z,{pt:1,color:"success.main",children:(0,y.jsx)(J.Z,{style:{fontSize:80}})}),(0,y.jsx)("div",{className:"invite-user__message",children:c})]})}K.propTypes={invitation:m().object.isRequired,type:m().oneOf("inviter","receiver")},K.defaultProps={type:"inviter"};const G=o.Z.div(V||(V=(0,t.Z)(["\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n .invite-user__name {\n font-weight: 700;\n font-size: 16px;\n margin: 8px 0 2px 0;\n }\n .invite-user__address {\n font-size: 12px;\n }\n .invite-user__message {\n margin-top: 20px;\n font-weight: 700;\n /* width: 90%; */\n text-align: center;\n font-size: 18px;\n }\n .invite-user__link {\n color: ",";\n }\n"])),(e=>{let{theme:n}=e;return n.palette.primary.main})),Q=K;var X;function $(e){let{invitation:n,...i}=e;return(0,y.jsxs)(ee,{...i,children:[(0,y.jsx)(O.Z,{did:n.info.did,src:n.info.logo,style:{flexShrink:0}}),(0,y.jsxs)("div",{className:"invite-app__content",children:[(0,y.jsx)("div",{className:"invite-app__title",children:n.info.name}),(0,y.jsx)("div",{className:"invite-app__description",children:n.info.description})]})]})}$.propTypes={invitation:m().object.isRequired};const ee=o.Z.div(X||(X=(0,t.Z)(["\n display: flex;\n justify-content: space-between;\n align-items: center;\n overflow: hidden;\n .invite-app__content {\n flex: 1;\n margin: 0 12px;\n font-weight: 700;\n overflow: hidden;\n }\n .invite-app__title {\n line-height: 1;\n margin-bottom: 2px;\n overflow: hidden;\n }\n .invite-app__description {\n font-size: 12px;\n white-space: nowrap;\n text-overflow: ellipsis;\n height: 1.3em;\n color: #999;\n overflow: hidden;\n }\n"]))),ne=$;var ie,te=i(5766);function re(e){let{getDataFn:n,passportColor:i,createPassportSvg:t,onLoginSuccess:r,checkFn:o,onReceive:s,inService:a}=e;const c=(0,x.Z)(n);if(c.loading)return(0,y.jsx)(g.Z,{});var l,p;if(c.error)return(0,y.jsx)(h.Z,{status:"404",title:null===(l=c.error)||void 0===l||null===(p=l.response)||void 0===p?void 0:p.data,description:""});const d="success"===c.data.status,u=d?Q:B,v=d?q:E;return(0,y.jsxs)(oe,{className:"page-invite__wrapper",children:[(0,y.jsx)(ne,{invitation:c.data}),(0,y.jsxs)("div",{className:"page-invite__card",children:[(0,y.jsx)(u,{invitation:c.data}),(0,y.jsx)(C,{invitation:c.data,createPassportSvg:t,passportColor:i}),(0,y.jsx)(v,{invitation:c.data,onLogin:r,checkFn:o,onReceive:s,inService:a})]})]})}re.propTypes={getDataFn:m().func.isRequired,checkFn:m().func.isRequired,createPassportSvg:m().func.isRequired,onLoginSuccess:m().func,onReceive:m().func,passportColor:m().string,inService:m().bool},re.defaultProps={onLoginSuccess:()=>{},passportColor:"auto",onReceive:null,inService:!1};const oe=o.Z.div(ie||(ie=(0,t.Z)(["\n max-width: 460px;\n max-height: 650px;\n min-height: 450px;\n width: 90%;\n height: 80%;\n display: flex;\n flex-direction: column;\n .page-invite__card {\n background-color: #fff;\n border-radius: 4px;\n flex: 1;\n padding: 20px 30px;\n margin-top: 10px;\n }\n .page-invite__app {\n margin-top: 20px;\n }\n"]))),se=(0,te.Z)(re);var ae,ce=i(49983),le=i(25339),pe=i(75793),de=i(74094);function ue(e){const{api:n,session:i}=(0,le.Tt)(),{info:t}=(0,pe.h6)(),o=(0,s.useLocation)(),a=(0,s.useNavigate)(),{t:l,locale:d}=(0,_.PE)(),{encryptKey:f,decrypt:m}=(0,ce.R)(),[x,h]=(0,r.useState)(!1),w=(0,r.useMemo)((()=>new URLSearchParams(o.search).get("inviteId")),[o]),j=(0,v.default)((async()=>{if(!w)return null;let e;const{data:i}=await n.get("/api/invitation",{params:{inviteId:w}}),r=!!u()(t,"ownerNft.did")&&"owner"===i.role.name;if(r){const i=new URL(window.location.href);i.pathname=p()((0,de.Y5)(),"/api/did/invite/token"),i.searchParams.set("_ek_",f),i.searchParams.set("inviteId",w);const{data:t}=await n.get(i.href);e=t}return{invitation:i,nextWorkflow:e,needReceiveNFT:r}})),b=(0,r.useCallback)((()=>{h(!0)}),[]),k=(0,r.useCallback)((()=>{if(j.error)throw j.error;return j.value.invitation}),[j]),Z=(0,r.useCallback)((async e=>{e&&(0,de.ZB)(m(e.sessionToken));const n=new URLSearchParams(o.search);n.delete("inviteId");const t=n.toString();await i.refresh(),a("/".concat(t?"?".concat(t):t),{replace:!0})}),[o,a,i]);if(j.loading)return(0,y.jsx)(g.Z,{});return(0,y.jsxs)(ve,{className:"page-invite",children:[u()(j,"value.needReceiveNFT")&&(0,y.jsx)(ce.Z,{action:"login",popup:!0,className:"connect",open:x,locale:d,baseUrl:t.launcher.url,checkFn:c().create({baseURL:t.launcher.url}).get,onSuccess:()=>{const e=new URL(window.location.href);e.pathname=p()((0,de.Y5)(),"/api/did/invite/status"),e.searchParams.set("_t_",j.value.nextWorkflow.token),e.searchParams.set("locale",d);const t=setInterval((async()=>{const{data:r}=await n.get(e.href);"succeed"===r.status&&(clearInterval(t),i.updateConnectedInfo(r),Z(r))}),2e3)},onClose:()=>{h(!1)},checkTimeout:3e5,webWalletUrl:(0,de.yP)(t),extraParams:{nw:u()(j,"value.nextWorkflow.url")},messages:{title:l("invite.transferNFTDialog.title",{name:t.name}),scan:l("invite.transferNFTDialog.scan"),confirm:l("invite.transferNFTDialog.confirm"),success:l("invite.transferNFTDialog.success")},prefix:"/.well-known/service/api/did"}),(0,y.jsx)(se,{...e,getDataFn:k,createPassportSvg:e=>(0,de.Ju)(e,t),checkFn:n.get,onLoginSuccess:Z,passportColor:"default",onReceive:u()(j,"value.needReceiveNFT")?b:null})]})}const ve=o.Z.div(ae||(ae=(0,t.Z)(["\n width: 100vw;\n height: 100%;\n min-height: 100vh;\n display: flex;\n justify-content: center;\n align-items: center;\n background-color: #f6f8fa;\n overflow: auto;\n padding: 20px;\n"])));function fe(){return(0,pe.h6)().loading?(0,y.jsx)(g.Z,{}):(0,y.jsx)(ue,{})}},5766:(e,n,i)=>{i.d(n,{Z:()=>p});var t=i(68420),r=i(77668),o=i.n(r),s=i(2586),a=i(56944);const c={zh:o()(a.Z),en:o()(s.Z)};var l=i(96266);function p(e){return function(n){return(0,l.jsx)(t.Iw,{translations:c,children:(0,l.jsx)(e,{...n})})}}},92459:(e,n,i)=>{i.d(n,{Z:()=>c});var t=i(55898),r=i.n(t),o=i(28726),s=i(81089),a=i(96266);function c(e){let{children:n,...i}=e;return(0,a.jsxs)(o.Z,{color:"did",variant:"contained",...i,children:[(0,a.jsx)("span",{style:{fontWeight:400},children:n||"Continue With"}),(0,a.jsx)(s.Z,{style:{width:"auto",height:"1.2em",margin:"0 4px 0 8px"}})]})}c.propTypes={children:r().any},c.defaultProps={children:""}},35474:(e,n,i)=>{i.d(n,{Z:()=>N});var t={};i.r(t),i.d(t,{ComingSoon:()=>k,Error:()=>y,Forbidden:()=>w,Info:()=>Z,InternalServerError:()=>j,Maintenance:()=>b,PageNotFound:()=>_});var r,o=i(55898),s=i.n(o),a=i(71171),c=i(39948),l=i(47685),p=i(96266);function d(e){let{icon:n,title:i,description:t,extra:r,...o}=e;return(0,p.jsxs)(u,{...o,children:[n,"string"===typeof i?(0,p.jsx)(c.Z,{mt:3,fontSize:22,fontWeight:400,color:"#47494E",textAlign:"center",children:i}):i,"string"===typeof t?(0,p.jsx)(c.Z,{mt:1,fontSize:14,color:"#7F828B",textAlign:"center",children:t}):t,(0,p.jsx)(c.Z,{mt:3,children:r})]})}d.propTypes={icon:s().element,title:s().oneOfType([s().string,s().element]),description:s().oneOfType([s().string,s().element]),actions:s().any,extra:s().element},d.defaultProps={icon:void 0,title:"",description:"",actions:null,extra:void 0};const u=(0,l.zo)("div")(r||(r=(0,a.Z)(["\n box-sizing: border-box;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n height: 100%;\n padding: 16px;\n\n background-color: #f7f8fb;\n"]))),v=d;var f=i(36134),m=i(11532);const x={en:{404:{title:"404 - Page Not Found",description:"Sorry about that, the page you are looking for does not exist or has been moved."},403:{title:"403 \u2013 Forbidden",description:"Sorry, you are not authorized to access this page."},500:{title:"500 - Internal Server Error",description:"An internal server error has occurred. Please try again later."},error:{title:"Application Error",description:"Something went wrong. Please try again later."},maintenance:{title:"Offline for maintenance",description:"This app is undergoing maintenance right now. Please check back later."},comingSoon:{title:"Coming Soon",description:"Our website is under construction. We'll be here soon with our new website."}},zh:{404:{title:"404 - \u9875\u9762\u672a\u627e\u5230",description:"\u5f88\u62b1\u6b49\uff0c\u60a8\u6b63\u5728\u5bfb\u627e\u7684\u9875\u9762\u4e0d\u5b58\u5728\u6216\u5df2\u88ab\u79fb\u52a8\u3002"},403:{title:"403 \u2013 \u7981\u6b62\u8bbf\u95ee",description:"\u5f88\u62b1\u6b49\uff0c\u60a8\u6ca1\u6709\u6743\u9650\u8bbf\u95ee\u6b64\u9875\u9762\u3002"},500:{title:"500 - \u5185\u90e8\u670d\u52a1\u5668\u9519\u8bef",description:"\u53d1\u751f\u4e86\u4e00\u4e2a\u5185\u90e8\u670d\u52a1\u5668\u9519\u8bef\u3002\u8bf7\u7a0d\u540e\u518d\u8bd5\u3002"},error:{title:"Application Error",description:"\u51fa\u9519\u4e86, \u8bf7\u7a0d\u540e\u518d\u8bd5\u3002"},maintenance:{title:"\u7ef4\u62a4\u4e2d",description:"\u5e94\u7528\u7a0b\u5e8f\u6b63\u5728\u8fdb\u884c\u7ef4\u62a4\u3002\u8bf7\u7a0d\u540e\u518d\u67e5\u770b\u3002"},comingSoon:{title:"\u5373\u5c06\u4e0a\u7ebf",description:"\u6211\u4eec\u7684\u7f51\u7ad9\u6b63\u5728\u5efa\u8bbe\u4e2d\u3002\u6211\u4eec\u5f88\u5feb\u5c31\u4f1a\u5728\u8fd9\u91cc\u63a8\u51fa\u6211\u4eec\u7684\u65b0\u7f51\u7ad9\u3002"}}};var g=i(68420);const h=e=>{e=["zh","en"].includes(e)?e:"";const{locale:n}=(0,g.PE)()||{locale:"en"},i=e||n;return x[i]?i:"en"};function _(e){let{locale:n,...i}=e;return n=h(n),(0,p.jsx)(v,{icon:(0,p.jsx)(S,{}),title:x[n][404].title,description:x[n][404].description,...i})}function w(e){let{locale:n,...i}=e;return n=h(n),(0,p.jsx)(v,{icon:(0,p.jsx)(S,{}),title:x[n][403].title,description:x[n][403].description,...i})}function j(e){let{locale:n,...i}=e;return n=h(n),(0,p.jsx)(v,{icon:(0,p.jsx)(S,{}),title:x[n][500].title,description:x[n][500].description,...i})}function y(e){let{locale:n,...i}=e;return n=h(n),(0,p.jsx)(v,{icon:(0,p.jsx)(S,{}),title:x[n].error.title,description:x[n].error.description,...i})}function b(e){let{locale:n,...i}=e;return n=h(n),(0,p.jsx)(v,{icon:(0,p.jsx)(C,{}),title:x[n].maintenance.title,description:x[n].maintenance.description,...i})}function k(e){let{locale:n,...i}=e;return n=h(n),(0,p.jsx)(v,{icon:(0,p.jsx)(C,{}),title:x[n].comingSoon.title,description:x[n].comingSoon.description,...i})}function Z(e){return(0,p.jsx)(v,{icon:(0,p.jsx)(C,{}),...e})}function S(e){const n=(0,l.Fg)();return(0,p.jsx)(m.Z,{style:{color:n.palette.error.main,fontSize:72},...e})}function C(e){const n=(0,l.Fg)();return(0,p.jsx)(f.Z,{style:{color:n.palette.info.main,fontSize:72},...e})}_.status="404",w.status="403",j.status="500",y.status="error",b.status="maintenance",k.status="comingSoon",Z.status="info";const P=Object.keys(t).reduce(((e,n)=>({...e,[t[n].status||n]:t[n]})),{});function z(e){let{status:n,...i}=e;if(n){if(P[n]){const e=P[n];return(0,p.jsx)(e,{...i})}throw new Error("Please provide a valid status for Result.status. Valid values are: ".concat(Object.keys(P).join(", ")))}return(0,p.jsx)(v,{...i})}z.propTypes={status:s().oneOfType([s().string,s().number]),...v.propTypes},z.defaultProps={status:""};const N=z},11532:(e,n,i)=>{var t=i(71600);n.Z=void 0;var r=t(i(56930)),o=i(96266),s=(0,r.default)((0,o.jsx)("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm4.3 14.3c-.39.39-1.02.39-1.41 0L12 13.41 9.11 16.3c-.39.39-1.02.39-1.41 0a.9959.9959 0 0 1 0-1.41L10.59 12 7.7 9.11a.9959.9959 0 0 1 0-1.41c.39-.39 1.02-.39 1.41 0L12 10.59l2.89-2.89c.39-.39 1.02-.39 1.41 0 .39.39.39 1.02 0 1.41L13.41 12l2.89 2.89c.38.38.38 1.02 0 1.41z"}),"CancelRounded");n.Z=s},76005:(e,n,i)=>{var t=i(71600);n.Z=void 0;var r=t(i(56930)),o=i(96266),s=(0,r.default)((0,o.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"}),"CheckCircle");n.Z=s},36134:(e,n,i)=>{var t=i(71600);n.Z=void 0;var r=t(i(56930)),o=i(96266),s=(0,r.default)((0,o.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z"}),"Info");n.Z=s}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_abtnode_webapp=self.webpackChunk_abtnode_webapp||[]).push([[7913],{77913:(e,n,s)=>{s.r(n),s.d(n,{default:()=>
|
|
1
|
+
"use strict";(self.webpackChunk_abtnode_webapp=self.webpackChunk_abtnode_webapp||[]).push([[7913],{77913:(e,n,s)=>{s.r(n),s.d(n,{default:()=>Z});var o,t=s(71171),a=s(5057),c=s(33518),r=s(85493),i=s(44846),l=s(35966),d=s(86229),p=s(49983),u=s(68420),h=s(35432),x=s(5766),w=s(96266);const f=(0,x.Z)((function(e){let{SessionContext:n,webWalletUrl:s,onSuccess:o}=e;const{api:t,session:c}=(0,a.useContext)(n),{t:x,locale:f}=(0,u.PE)(),m=(0,r.useNavigate)(),{searchParams:b}=new URL(window.location.href),P=b.get("redirect"),Z={},v=b.get("componentId");return v&&(Z.componentId=v),c.loading?(0,w.jsx)(l.Z,{children:(0,w.jsx)(i.Z,{})}):(0,w.jsx)(g,{children:(0,w.jsx)("div",{className:"connect-wrapper",children:(0,w.jsx)(p.Z,{className:"connect",action:"exchange-passport",checkFn:t.get,checkTimeout:6e5,webWalletUrl:s,onSuccess:async(e,n)=>{o(e,n),await c.refresh(),d.Z.success(x("exchangePassport.success")),setTimeout((()=>{if(P){const e=decodeURIComponent(P);e.startsWith(h.WELLKNOWN_SERVICE_PATH_PREFIX)?m(e,{replace:!0}):window.location=e}else window.location=window.env.pathPrefix||window.env.apiPrefix||"/"}),3e3)},onError:e=>{d.Z.error(e.message)},locale:f,messages:{title:x("exchangePassport.dialog.title"),scan:x("exchangePassport.dialog.scan"),confirm:x("exchangePassport.dialog.confirm"),success:x("exchangePassport.dialog.success")},extraParams:Z,extraContent:null})})})})),g=c.Z.div(o||(o=(0,t.Z)(["\n box-sizing: border-box;\n width: 100%;\n height: 100vh;\n position: relative;\n display: flex;\n flex-direction: column;\n .connect-wrapper {\n flex: 1;\n }\n .connect {\n background: #fafafa;\n }\n"])));var m=s(75793),b=s(25339),P=s(74094);function Z(){const{info:e}=(0,m.h6)(),n=(0,P.yP)(e);return(0,w.jsx)(f,{SessionContext:b.B3,webWalletUrl:n,onSuccess:(e,n)=>{e.sessionToken&&(0,P.ZB)(n(e.sessionToken))}})}},5766:(e,n,s)=>{s.d(n,{Z:()=>d});var o=s(68420),t=s(77668),a=s.n(t),c=s(2586),r=s(56944);const i={zh:a()(r.Z),en:a()(c.Z)};var l=s(96266);function d(e){return function(n){return(0,l.jsx)(o.Iw,{translations:i,children:(0,l.jsx)(e,{...n})})}}}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_abtnode_webapp=self.webpackChunk_abtnode_webapp||[]).push([[9249],{49249:(e,n,s)=>{s.r(n),s.d(n,{default:()=>C});var t,a=s(71171),o=s(5057),i=s(33518),c=s(85493),r=s(11750),l=s(76005),d=s(39948),u=s(35966),p=s(28726),h=s(49983),x=s(68420),m=s(35432),g=s(5766),f=s(70284),v=s(96266);const
|
|
1
|
+
"use strict";(self.webpackChunk_abtnode_webapp=self.webpackChunk_abtnode_webapp||[]).push([[9249],{49249:(e,n,s)=>{s.r(n),s.d(n,{default:()=>C});var t,a=s(71171),o=s(5057),i=s(33518),c=s(85493),r=s(11750),l=s(76005),d=s(39948),u=s(35966),p=s(28726),h=s(49983),x=s(68420),m=s(35432),g=s(5766),f=s(70284),v=s(96266);const Z=(0,i.Z)(u.Z)(t||(t=(0,a.Z)(["\n .header {\n text-align: center;\n margin-bottom: 8px;\n }\n\n .subheader {\n text-align: center;\n margin-bottom: 24px;\n }\n\n .login {\n padding: 24px;\n height: auto;\n min-height: 480px;\n display: flex;\n flex-direction: column;\n }\n\n .connect {\n background: #fafafa;\n }\n"]))),b=(0,g.Z)((function(e){let{SessionContext:n,webWalletUrl:s}=e;const{api:t,session:a}=(0,o.useContext)(n),{t:i,locale:u}=(0,o.useContext)(x.RD),[g,b]=(0,o.useState)(!1),P=(0,c.useNavigate)(),{setPassportId:w}=(0,f.Z)(),j={},{searchParams:C}=new URL(window.location.href),N=C.get("id");return N&&(j.id=N),(0,v.jsx)(Z,{children:g?(0,v.jsx)("div",{className:"login",children:(0,v.jsx)("div",{className:"connect",children:(0,v.jsxs)(d.Z,{textAlign:"center",children:[(0,v.jsx)(d.Z,{mb:3,color:"success.main",children:(0,v.jsx)(l.Z,{style:{fontSize:60}})}),(0,v.jsx)(r.Z,{component:"p",variant:"body1",className:"subheader",children:i("issuePassport.dialog.success")}),(0,v.jsx)(d.Z,{mt:3,children:(0,v.jsx)(p.Z,{variant:"contained",color:"primary",onClick:()=>{var e;try{a.logout()}catch(n){}((null===(e=window.env)||void 0===e?void 0:e.apiPrefix)||"").startsWith(m.WELLKNOWN_SERVICE_PATH_PREFIX)?P("".concat(m.WELLKNOWN_SERVICE_PATH_PREFIX,"/login"),{replace:!0}):P("/",{replace:!0})},children:i("issuePassport.dialog.loginWithPassport")})})]})})}):(0,v.jsx)(h.Z,{className:"connect",action:"issue-passport",forceConnected:!1,autoConnect:!1,checkFn:t.get,checkTimeout:6e5,webWalletUrl:s,onSuccess:e=>{null!==e&&void 0!==e&&e.passportId&&w(e.passportId),b(!0)},locale:u,messages:{title:i("issuePassport.title"),scan:i("issuePassport.description",{name:window.env.appName}),confirm:i("issuePassport.dialog.confirm"),success:i("issuePassport.dialog.success")},extraParams:j})})}));var P=s(75793),w=s(25339),j=s(74094);function C(){const{info:e}=(0,P.h6)(),n=(0,j.yP)(e);return(0,v.jsx)(b,{SessionContext:w.B3,webWalletUrl:n})}},5766:(e,n,s)=>{s.d(n,{Z:()=>d});var t=s(68420),a=s(77668),o=s.n(a),i=s(2586),c=s(56944);const r={zh:o()(c.Z),en:o()(i.Z)};var l=s(96266);function d(e){return function(n){return(0,l.jsx)(t.Iw,{translations:r,children:(0,l.jsx)(e,{...n})})}}},76005:(e,n,s)=>{var t=s(71600);n.Z=void 0;var a=t(s(56930)),o=s(96266),i=(0,a.default)((0,o.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"}),"CheckCircle");n.Z=i}}]);
|