@abtnode/blocklet-services 1.17.0-beta-20251103-104515-e4795f0f → 1.17.0-beta-20251104-112713-e947b159
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/api/routes/federated.js +8 -16
- package/api/services/notification/queue.js +20 -1
- package/dist/assets/{access-control-DUN4yMpV.js → access-control-DeRZmmHW.js} +1 -1
- package/dist/assets/{add-component-core-DMK2vsvk.js → add-component-core-CB3Z_tio.js} +1 -1
- package/dist/assets/{add-resource-PqL0Uuh0.js → add-resource-CCTsswQz.js} +1 -1
- package/dist/assets/{addon-BAbveuTG.js → addon-CQMBWXij.js} +1 -1
- package/dist/assets/{advanced-CqU1HF2W.js → advanced-DwXInVBG.js} +1 -1
- package/dist/assets/{aigne-CYw3V7gk.js → aigne-DHc1tJm6.js} +1 -1
- package/dist/assets/{appearance-9XVnA1iX.js → appearance-CvCbU39V.js} +1 -1
- package/dist/assets/{ar-BQm9lQ4M.js → ar-CCM7LUa7.js} +1 -1
- package/dist/assets/{arrow-down.svg-Besyj_iW.js → arrow-down.svg-DYdzNpAQ.js} +1 -1
- package/dist/assets/{audit-logs-F_X6iNpj.js → audit-logs-5mTYZKV1.js} +1 -1
- package/dist/assets/{authorize-CBV5UwkO.js → authorize-BfkXf6G0.js} +1 -1
- package/dist/assets/{bind-account-D7Y2ZFOP.js → bind-account-BC8VQXvm.js} +1 -1
- package/dist/assets/{branding-CHlEfgod.js → branding-2dWKGu90.js} +1 -1
- package/dist/assets/{branding-BydTr2Hx.js → branding-7XUcxGmI.js} +1 -1
- package/dist/assets/{branding-D6Usg0HW.js → branding-DV5KIxNj.js} +1 -1
- package/dist/assets/{bundle-avatar-BiAxerwR.js → bundle-avatar-Edt0e34F.js} +1 -1
- package/dist/assets/{complete-Cb2Sxmlf.js → complete--uTpwi8F.js} +1 -1
- package/dist/assets/{component-DZcFf12l.js → component-BVl40muz.js} +2 -2
- package/dist/assets/{config-n2q-SpRg.js → config-B6xx5Ruh.js} +1 -1
- package/dist/assets/{config-aky-uFqe.js → config-D9zrtkNt.js} +1 -1
- package/dist/assets/{config-d19JwT_g.js → config-dsw6u7QS.js} +1 -1
- package/dist/assets/{config-navigation-B7evgHX9.js → config-navigation-DFyttFiT.js} +2 -2
- package/dist/assets/{config-space-CaGV6_fe.js → config-space-0Usu_97A.js} +1 -1
- package/dist/assets/{confirm-DbyIloSE.js → confirm-DK89V84H.js} +1 -1
- package/dist/assets/{connect-BCEnEcC8.js → connect-CfMU05qb.js} +1 -1
- package/dist/assets/{connect-1kvc2acD.js → connect-CxECECho.js} +1 -1
- package/dist/assets/{connect-to-C6Uwxunl.js → connect-to-DRAd7i9J.js} +1 -1
- package/dist/assets/{dashboard-DPsCdbTO.js → dashboard-C9Qtd5rI.js} +2 -2
- package/dist/assets/{de-D0uPENSq.js → de-STCToRpb.js} +1 -1
- package/dist/assets/{delete-confirm-BvaT7EVX.js → delete-confirm-Bwhg916Y.js} +1 -1
- package/dist/assets/{domain-CPNAkz5L.js → domain-D55gMP_T.js} +1 -1
- package/dist/assets/{domain-action-card-B17HlcP3.js → domain-action-card-BZKoL_Hh.js} +1 -1
- package/dist/assets/{domains-CjSBT2F0.js → domains-B68IENPq.js} +1 -1
- package/dist/assets/{email-CQS2-3wX.js → email-lJEVkuhh.js} +1 -1
- package/dist/assets/engine-HllL7ndi.js +1 -0
- package/dist/assets/{es-Dh4_UfCu.js → es-CrUw-8oc.js} +1 -1
- package/dist/assets/{exchange-passport-dOjc-SfK.js → exchange-passport-O8PN-vEa.js} +1 -1
- package/dist/assets/{form-OjuupVuN.js → form-HILzmtS4.js} +1 -1
- package/dist/assets/{fr-CzZWQkiT.js → fr-B6GuZu9m.js} +1 -1
- package/dist/assets/{fuel-Bb7IQ07a.js → fuel-9ToDglZ4.js} +1 -1
- package/dist/assets/{gen-access-key-BxLvOQ2N.js → gen-access-key-RAY3R1wL.js} +1 -1
- package/dist/assets/{gen-simple-access-key-3hz8MRZ9.js → gen-simple-access-key-CPyew41i.js} +1 -1
- package/dist/assets/{get-safe-url-DMMzbtm3.js → get-safe-url-BJkYMXT3.js} +1 -1
- package/dist/assets/{hi-Do9VCuRi.js → hi-Cw_VH7M3.js} +1 -1
- package/dist/assets/{home-CkT3uBov.js → home-C6yH6iXB.js} +1 -1
- package/dist/assets/{id-Dhhrveu9.js → id-ErxRX4DU.js} +1 -1
- package/dist/assets/{iframe-CRrwun_M.js → iframe-CHUN17ve.js} +1 -1
- package/dist/assets/{index-K0yqveeg.js → index-B-XlfvkZ.js} +6 -6
- package/dist/assets/{index-D7z04OzK.js → index-B2BVBFP1.js} +1 -1
- package/dist/assets/{index-BbRfaHya.js → index-B6AIfiH6.js} +1 -1
- package/dist/assets/{index-BjQ77Vh8.js → index-B8wgXU-M.js} +1 -1
- package/dist/assets/{index-D3eL8pu7.js → index-BAxVZet9.js} +1 -1
- package/dist/assets/{index-CTM3rEfI.js → index-BDgx7EkS.js} +2 -2
- package/dist/assets/{index-BBeKNAGs.js → index-BSauF6RI.js} +1 -1
- package/dist/assets/{index-vNtwd6yT.js → index-BYHO9_8F.js} +1 -1
- package/dist/assets/{index-C9bI-Nzc.js → index-B_LOh3-7.js} +1 -1
- package/dist/assets/{index-DzrP_XzR.js → index-BcSuA3_M.js} +1 -1
- package/dist/assets/{index-C7GALc-0.js → index-Bdfvhhor.js} +1 -1
- package/dist/assets/{index-CFIM7xiP.js → index-Be2S1b8R.js} +1 -1
- package/dist/assets/index-Bp_5Qnng.js +55 -0
- package/dist/assets/{index-BU__bkv8.js → index-C5W1sNxF.js} +1 -1
- package/dist/assets/{index-CqTMHIO1.js → index-CHVQCEyp.js} +1 -1
- package/dist/assets/index-ChdnEUnd.js +1 -0
- package/dist/assets/{index-iRMyHUCz.js → index-CktHtJue.js} +1 -1
- package/dist/assets/{index-BE2C5_JW.js → index-Crh53cke.js} +1 -1
- package/dist/assets/{index-SlnENsoJ.js → index-CsYbXfj1.js} +1 -1
- package/dist/assets/{index-DdiwPErA.js → index-CyALrDx6.js} +1 -1
- package/dist/assets/{index-DVpni4Ko.js → index-DIx7BUTi.js} +1 -1
- package/dist/assets/{index-D5LzuXsQ.js → index-Dh2Rf2Hx.js} +14 -14
- package/dist/assets/{index-d-vNIJ-l.js → index-FbQLWg2H.js} +1 -1
- package/dist/assets/{index-DSv0DNq1.js → index-R_6vOn5c.js} +1 -1
- package/dist/assets/{index-CJZ9mOFb.js → index-e_3-iMyP.js} +1 -1
- package/dist/assets/{index-DqUvDRpE.js → index-qu80tqs0.js} +1 -1
- package/dist/assets/{index-I3TWG_pC.js → index-yi6WvhoN.js} +1 -1
- package/dist/assets/{invitation-D2VMdkP-.js → invitation-BZCAm4go.js} +1 -1
- package/dist/assets/{invitations-BeeGtTYL.js → invitations-DOKvWh-D.js} +1 -1
- package/dist/assets/{invite-IciZALDI.js → invite-_7I-iD9F.js} +1 -1
- package/dist/assets/{isURL-CGr-JE-8.js → isURL-shHw2FLx.js} +1 -1
- package/dist/assets/{issue-passport-BEAP1Vya.js → issue-passport-4Pjg5_J2.js} +1 -1
- package/dist/assets/{item-DTxtmjGC.js → item-DWQamqmG.js} +1 -1
- package/dist/assets/{ja-B70UYq5X.js → ja-CvssCilG.js} +1 -1
- package/dist/assets/{ko-C7TZwmXC.js → ko-CwfYSSYs.js} +1 -1
- package/dist/assets/{landing-page-BlJ7mZTr.js → landing-page-DHzhfnIo.js} +1 -1
- package/dist/assets/{layout-DTju743y.js → layout-1j-FirqT.js} +1 -1
- package/dist/assets/{list-DwxLS-e9.js → list-82I80nT4.js} +1 -1
- package/dist/assets/{list-BtwRcB4J.js → list-GFQ23C96.js} +1 -1
- package/dist/assets/{localization-DGJotPOl.js → localization-D_sXjdOF.js} +1 -1
- package/dist/assets/{log-DRYhQxxl.js → log-DSlLPNrL.js} +1 -1
- package/dist/assets/{login-E8t_yCpZ.js → login-BCmON-gb.js} +1 -1
- package/dist/assets/{login-oauth-callback-C8-7sEby.js → login-oauth-callback-BJoNAJDQ.js} +1 -1
- package/dist/assets/{logo-uploader-Jhaa03fx.js → logo-uploader-Blzn_BDN.js} +1 -1
- package/dist/assets/{lost-passport-ImvC2R58.js → lost-passport-BMVsDg1D.js} +1 -1
- package/dist/assets/{open-window-IssZedoH.js → open-window-3fNVG3jy.js} +1 -1
- package/dist/assets/{over-due-invoice-payment-BW0n6lOg.js → over-due-invoice-payment-MS2Z5Q7I.js} +1 -1
- package/dist/assets/{overview-B89tHFJO.js → overview-CUrNqNDE.js} +1 -1
- package/dist/assets/{passport-Dv9ta38t.js → passport-BmUaoAYN.js} +1 -1
- package/dist/assets/{passport-item-DDwjarHk.js → passport-item-C75Jm1_H.js} +1 -1
- package/dist/assets/{permission-hhKy6YZK.js → permission-mw1ZNsp2.js} +1 -1
- package/dist/assets/{preferences-BuVpQJCz.js → preferences-nc4oRkZr.js} +1 -1
- package/dist/assets/{profile-embed-DuKHNcoq.js → profile-embed-COBooKOy.js} +1 -1
- package/dist/assets/{pt-DObJ_ADK.js → pt-DiKRyIZy.js} +1 -1
- package/dist/assets/{publish-resource-ClW3LtZQ.js → publish-resource-CUhJuUtt.js} +1 -1
- package/dist/assets/ru-5wNmeEUO.js +5 -0
- package/dist/assets/{runtime-DjxpZPhA.js → runtime-wYAsV832.js} +1 -1
- package/dist/assets/sdk-oOD0ugLK.js +1 -0
- package/dist/assets/{security-DUYDGAtr.js → security--siQ5O1l.js} +1 -1
- package/dist/assets/{session-CMe2VPXM.js → session-zaFSgetw.js} +1 -1
- package/dist/assets/{setup-D2YBC-OI.js → setup-2wB1RpQx.js} +1 -1
- package/dist/assets/{simple-select-BDpFwLvy.js → simple-select-DhYZPYiw.js} +1 -1
- package/dist/assets/{spaces-DaOMHVWc.js → spaces-D5ZbqByE.js} +1 -1
- package/dist/assets/{start-CsO7coxD.js → start-Bj3IUKjU.js} +1 -1
- package/dist/assets/{starting-progress-X694I5CE.js → starting-progress-QpbqpMn4.js} +1 -1
- package/dist/assets/{status-DDizCqY5.js → status-DdYVVFLE.js} +1 -1
- package/dist/assets/{step-actions-xPcYINWA.js → step-actions-DsK7No59.js} +1 -1
- package/dist/assets/{studio-B0WlSlNP.js → studio-B_8_8ekc.js} +1 -1
- package/dist/assets/{team-cjsm8iuN.js → team-BLHzIk1L.js} +1 -1
- package/dist/assets/th-B6ebKspD.js +5 -0
- package/dist/assets/{traffic-DvyU88z0.js → traffic-BVXNh0NF.js} +1 -1
- package/dist/assets/{transfer-DpP71rCR.js → transfer-B8aeHYnn.js} +1 -1
- package/dist/assets/{unsubscribe-CK-BhVdP.js → unsubscribe-Cfv9XkeO.js} +1 -1
- package/dist/assets/{use-app-logo-C_P-ZZre.js → use-app-logo-B8kguOVt.js} +1 -1
- package/dist/assets/{user-center-CcCslD-7.js → user-center-BK3PLY7H.js} +2 -2
- package/dist/assets/{user-follower-Chiru_S3.js → user-follower-ClQHH3Bs.js} +1 -1
- package/dist/assets/{util-DwCjHwi2.js → util-C0VnVv6a.js} +1 -1
- package/dist/assets/{util-KdfVIssi.js → util-Dgt9KiDQ.js} +1 -1
- package/dist/assets/vi-PpVWvm1I.js +5 -0
- package/dist/assets/{wait-connect-CHtirPXD.js → wait-connect-DrsxOKar.js} +1 -1
- package/dist/assets/{wizard-DFDRdTlG.js → wizard-CjSRXNxn.js} +1 -1
- package/dist/assets/{wizard-components-DU__q4Hx.js → wizard-components-DDoE7ozK.js} +1 -1
- package/dist/assets/{wrap-locale-CMSOcnOQ.js → wrap-locale-CcKDlll4.js} +1 -1
- package/dist/assets/{zh-4tEjx001.js → zh-Coo9u8yK.js} +1 -1
- package/dist/assets/{zh-DCABA61W.js → zh-Daif36Hm.js} +1 -1
- package/dist/assets/{zh-tw-M_0Y4wmR.js → zh-tw-C3Px30Ps.js} +1 -1
- package/dist/index.html +1 -1
- package/dist/service-worker.js +1 -1
- package/package.json +23 -23
- package/dist/assets/engine-CExnjfYh.js +0 -1
- package/dist/assets/index-DON2xT5N.js +0 -1
- package/dist/assets/index-Dv1U_077.js +0 -55
- package/dist/assets/ru-nYDmEUmY.js +0 -5
- package/dist/assets/sdk-DVe2E97G.js +0 -1
- package/dist/assets/th-DMcUw_9_.js +0 -5
- package/dist/assets/vi-B73oWQBC.js +0 -5
package/dist/service-worker.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
try{self["workbox:core:7.0.0"]&&_()}catch{}const de=(s,...e)=>{let t=s;return e.length>0&&(t+=` :: ${JSON.stringify(e)}`),t},pe=de;let R=class extends Error{constructor(e,t){const n=pe(e,t);super(n),this.name=e,this.details=t}};const ge=new Set,d={googleAnalytics:"googleAnalytics",precache:"precache-v2",prefix:"workbox",runtime:"runtime",suffix:typeof registration<"u"?registration.scope:""},A=s=>[d.prefix,s,d.suffix].filter(e=>e&&e.length>0).join("-"),me=s=>{for(const e of Object.keys(d))s(e)},we={updateDetails:s=>{me(e=>{typeof s[e]=="string"&&(d[e]=s[e])})},getGoogleAnalyticsName:s=>s||A(d.googleAnalytics),getPrecacheName:s=>s||A(d.precache),getPrefix:()=>d.prefix,getRuntimeName:s=>s||A(d.runtime),getSuffix:()=>d.suffix};function V(s,e){const t=new URL(s);for(const n of e)t.searchParams.delete(n);return t.href}async function ye(s,e,t,n){const a=V(e.url,t);if(e.url===a)return s.match(e,n);const r=Object.assign(Object.assign({},n),{ignoreSearch:!0}),i=await s.keys(e,r);for(const c of i){const o=V(c.url,t);if(a===o)return s.match(c,n)}}let _e=class{constructor(){this.promise=new Promise((e,t)=>{this.resolve=e,this.reject=t})}};async function Re(){for(const s of ge)await s()}const be=s=>new URL(String(s),location.href).href.replace(new RegExp(`^${location.origin}`),"");function Ce(s){return new Promise(e=>setTimeout(e,s))}function xe(){self.addEventListener("activate",()=>self.clients.claim())}try{self["workbox:core:7.0.0"]&&_()}catch{}const Ee=(s,...e)=>{let t=s;return e.length>0&&(t+=` :: ${JSON.stringify(e)}`),t},ke=Ee;let u=class extends Error{constructor(e,t){const n=ke(e,t);super(n),this.name=e,this.details=t}};const p={googleAnalytics:"googleAnalytics",precache:"precache-v2",prefix:"workbox",runtime:"runtime",suffix:typeof registration<"u"?registration.scope:""},O=s=>[p.prefix,s,p.suffix].filter(e=>e&&e.length>0).join("-"),De=s=>{for(const e of Object.keys(p))s(e)},B={updateDetails:s=>{De(e=>{typeof s[e]=="string"&&(p[e]=s[e])})},getGoogleAnalyticsName:s=>s||O(p.googleAnalytics),getPrecacheName:s=>s||O(p.precache),getPrefix:()=>p.prefix,getRuntimeName:s=>s||O(p.runtime),getSuffix:()=>p.suffix};function G(s,e){const t=e();return s.waitUntil(t),t}try{self["workbox:precaching:7.0.0"]&&_()}catch{}const Ue="__WB_REVISION__";function Le(s){if(!s)throw new u("add-to-cache-list-unexpected-type",{entry:s});if(typeof s=="string"){const r=new URL(s,location.href);return{cacheKey:r.href,url:r.href}}const{revision:e,url:t}=s;if(!t)throw new u("add-to-cache-list-unexpected-type",{entry:s});if(!e){const r=new URL(t,location.href);return{cacheKey:r.href,url:r.href}}const n=new URL(t,location.href),a=new URL(t,location.href);return n.searchParams.set(Ue,e),{cacheKey:n.href,url:a.href}}class Pe{constructor(){this.updatedURLs=[],this.notUpdatedURLs=[],this.handlerWillStart=async({request:e,state:t})=>{t&&(t.originalRequest=e)},this.cachedResponseWillBeUsed=async({event:e,state:t,cachedResponse:n})=>{if(e.type==="install"&&t&&t.originalRequest&&t.originalRequest instanceof Request){const a=t.originalRequest.url;n?this.notUpdatedURLs.push(a):this.updatedURLs.push(a)}return n}}}class Te{constructor({precacheController:e}){this.cacheKeyWillBeUsed=async({request:t,params:n})=>{const a=n?.cacheKey||this._precacheController.getCacheKeyForURL(t.url);return a?new Request(a,{headers:t.headers}):t},this._precacheController=e}}let C;function Ne(){if(C===void 0){const s=new Response("");if("body"in s)try{new Response(s.body),C=!0}catch{C=!1}C=!1}return C}async function ve(s,e){let t=null;if(s.url&&(t=new URL(s.url).origin),t!==self.location.origin)throw new u("cross-origin-copy-response",{origin:t});const n=s.clone(),r={headers:new Headers(n.headers),status:n.status,statusText:n.statusText},i=Ne()?n.body:await n.blob();return new Response(i,r)}const Me=s=>new URL(String(s),location.href).href.replace(new RegExp(`^${location.origin}`),"");function J(s,e){const t=new URL(s);for(const n of e)t.searchParams.delete(n);return t.href}async function Ae(s,e,t,n){const a=J(e.url,t);if(e.url===a)return s.match(e,n);const r=Object.assign(Object.assign({},n),{ignoreSearch:!0}),i=await s.keys(e,r);for(const c of i){const o=J(c.url,t);if(a===o)return s.match(c,n)}}class Oe{constructor(){this.promise=new Promise((e,t)=>{this.resolve=e,this.reject=t})}}const Se=new Set;async function Ie(){for(const s of Se)await s()}function We(s){return new Promise(e=>setTimeout(e,s))}try{self["workbox:strategies:7.0.0"]&&_()}catch{}function L(s){return typeof s=="string"?new Request(s):s}let Ke=class{constructor(e,t){this._cacheKeys={},Object.assign(this,t),this.event=t.event,this._strategy=e,this._handlerDeferred=new Oe,this._extendLifetimePromises=[],this._plugins=[...e.plugins],this._pluginStateMap=new Map;for(const n of this._plugins)this._pluginStateMap.set(n,{});this.event.waitUntil(this._handlerDeferred.promise)}async fetch(e){const{event:t}=this;let n=L(e);if(n.mode==="navigate"&&t instanceof FetchEvent&&t.preloadResponse){const i=await t.preloadResponse;if(i)return i}const a=this.hasCallback("fetchDidFail")?n.clone():null;try{for(const i of this.iterateCallbacks("requestWillFetch"))n=await i({request:n.clone(),event:t})}catch(i){if(i instanceof Error)throw new u("plugin-error-request-will-fetch",{thrownErrorMessage:i.message})}const r=n.clone();try{let i;i=await fetch(n,n.mode==="navigate"?void 0:this._strategy.fetchOptions);for(const c of this.iterateCallbacks("fetchDidSucceed"))i=await c({event:t,request:r,response:i});return i}catch(i){throw a&&await this.runCallbacks("fetchDidFail",{error:i,event:t,originalRequest:a.clone(),request:r.clone()}),i}}async fetchAndCachePut(e){const t=await this.fetch(e),n=t.clone();return this.waitUntil(this.cachePut(e,n)),t}async cacheMatch(e){const t=L(e);let n;const{cacheName:a,matchOptions:r}=this._strategy,i=await this.getCacheKey(t,"read"),c=Object.assign(Object.assign({},r),{cacheName:a});n=await caches.match(i,c);for(const o of this.iterateCallbacks("cachedResponseWillBeUsed"))n=await o({cacheName:a,matchOptions:r,cachedResponse:n,request:i,event:this.event})||void 0;return n}async cachePut(e,t){const n=L(e);await We(0);const a=await this.getCacheKey(n,"write");if(!t)throw new u("cache-put-with-no-response",{url:Me(a.url)});const r=await this._ensureResponseSafeToCache(t);if(!r)return!1;const{cacheName:i,matchOptions:c}=this._strategy,o=await self.caches.open(i),l=this.hasCallback("cacheDidUpdate"),f=l?await Ae(o,a.clone(),["__WB_REVISION__"],c):null;try{await o.put(a,l?r.clone():r)}catch(h){if(h instanceof Error)throw h.name==="QuotaExceededError"&&await Ie(),h}for(const h of this.iterateCallbacks("cacheDidUpdate"))await h({cacheName:i,oldResponse:f,newResponse:r.clone(),request:a,event:this.event});return!0}async getCacheKey(e,t){const n=`${e.url} | ${t}`;if(!this._cacheKeys[n]){let a=e;for(const r of this.iterateCallbacks("cacheKeyWillBeUsed"))a=L(await r({mode:t,request:a,event:this.event,params:this.params}));this._cacheKeys[n]=a}return this._cacheKeys[n]}hasCallback(e){for(const t of this._strategy.plugins)if(e in t)return!0;return!1}async runCallbacks(e,t){for(const n of this.iterateCallbacks(e))await n(t)}*iterateCallbacks(e){for(const t of this._strategy.plugins)if(typeof t[e]=="function"){const n=this._pluginStateMap.get(t);yield r=>{const i=Object.assign(Object.assign({},r),{state:n});return t[e](i)}}}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,n=!1;for(const a of this.iterateCallbacks("cacheWillUpdate"))if(t=await a({request:this.request,response:t,event:this.event})||void 0,n=!0,!t)break;return n||t&&t.status!==200&&(t=void 0),t}},$e=class{constructor(e={}){this.cacheName=B.getRuntimeName(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,n=typeof e.request=="string"?new Request(e.request):e.request,a="params"in e?e.params:void 0,r=new Ke(this,{event:t,request:n,params:a}),i=this._getResponse(r,n,t),c=this._awaitComplete(i,r,n,t);return[i,c]}async _getResponse(e,t,n){await e.runCallbacks("handlerWillStart",{event:n,request:t});let a;try{if(a=await this._handle(t,e),!a||a.type==="error")throw new u("no-response",{url:t.url})}catch(r){if(r instanceof Error){for(const i of e.iterateCallbacks("handlerDidError"))if(a=await i({error:r,event:n,request:t}),a)break}if(!a)throw r}for(const r of e.iterateCallbacks("handlerWillRespond"))a=await r({event:n,request:t,response:a});return a}async _awaitComplete(e,t,n,a){let r,i;try{r=await e}catch{}try{await t.runCallbacks("handlerDidRespond",{event:a,request:n,response:r}),await t.doneWaiting()}catch(c){c instanceof Error&&(i=c)}if(await t.runCallbacks("handlerDidComplete",{event:a,request:n,response:r,error:i}),t.destroy(),i)throw i}};class y extends $e{constructor(e={}){e.cacheName=B.getPrecacheName(e.cacheName),super(e),this._fallbackToNetwork=e.fallbackToNetwork!==!1,this.plugins.push(y.copyRedirectedCacheableResponsesPlugin)}async _handle(e,t){const n=await t.cacheMatch(e);return n||(t.event&&t.event.type==="install"?await this._handleInstall(e,t):await this._handleFetch(e,t))}async _handleFetch(e,t){let n;const a=t.params||{};if(this._fallbackToNetwork){const r=a.integrity,i=e.integrity,c=!i||i===r;n=await t.fetch(new Request(e,{integrity:e.mode!=="no-cors"?i||r:void 0})),r&&c&&e.mode!=="no-cors"&&(this._useDefaultCacheabilityPluginIfNeeded(),await t.cachePut(e,n.clone()))}else throw new u("missing-precache-entry",{cacheName:this.cacheName,url:e.url});return n}async _handleInstall(e,t){this._useDefaultCacheabilityPluginIfNeeded();const n=await t.fetch(e);if(!await t.cachePut(e,n.clone()))throw new u("bad-precaching-response",{url:e.url,status:n.status});return n}_useDefaultCacheabilityPluginIfNeeded(){let e=null,t=0;for(const[n,a]of this.plugins.entries())a!==y.copyRedirectedCacheableResponsesPlugin&&(a===y.defaultPrecacheCacheabilityPlugin&&(e=n),a.cacheWillUpdate&&t++);t===0?this.plugins.push(y.defaultPrecacheCacheabilityPlugin):t>1&&e!==null&&this.plugins.splice(e,1)}}y.defaultPrecacheCacheabilityPlugin={async cacheWillUpdate({response:s}){return!s||s.status>=400?null:s}};y.copyRedirectedCacheableResponsesPlugin={async cacheWillUpdate({response:s}){return s.redirected?await ve(s):s}};class je{constructor({cacheName:e,plugins:t=[],fallbackToNetwork:n=!0}={}){this._urlsToCacheKeys=new Map,this._urlsToCacheModes=new Map,this._cacheKeysToIntegrities=new Map,this._strategy=new y({cacheName:B.getPrecacheName(e),plugins:[...t,new Te({precacheController:this})],fallbackToNetwork:n}),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 t=[];for(const n of e){typeof n=="string"?t.push(n):n&&n.revision===void 0&&t.push(n.url);const{cacheKey:a,url:r}=Le(n),i=typeof n!="string"&&n.revision?"reload":"default";if(this._urlsToCacheKeys.has(r)&&this._urlsToCacheKeys.get(r)!==a)throw new u("add-to-cache-list-conflicting-entries",{firstEntry:this._urlsToCacheKeys.get(r),secondEntry:a});if(typeof n!="string"&&n.integrity){if(this._cacheKeysToIntegrities.has(a)&&this._cacheKeysToIntegrities.get(a)!==n.integrity)throw new u("add-to-cache-list-conflicting-integrities",{url:r});this._cacheKeysToIntegrities.set(a,n.integrity)}if(this._urlsToCacheKeys.set(r,a),this._urlsToCacheModes.set(r,i),t.length>0){const c=`Workbox is precaching URLs without revision info: ${t.join(", ")}
|
|
2
|
-
This is generally NOT safe. Learn more at https://bit.ly/wb-precache`;console.warn(c)}}}install(e){return G(e,async()=>{const t=new Pe;this.strategy.plugins.push(t);for(const[r,i]of this._urlsToCacheKeys){const c=this._cacheKeysToIntegrities.get(i),o=this._urlsToCacheModes.get(r),l=new Request(r,{integrity:c,cache:o,credentials:"same-origin"});await Promise.all(this.strategy.handleAll({params:{cacheKey:i},request:l,event:e}))}const{updatedURLs:n,notUpdatedURLs:a}=t;return{updatedURLs:n,notUpdatedURLs:a}})}activate(e){return G(e,async()=>{const t=await self.caches.open(this.strategy.cacheName),n=await t.keys(),a=new Set(this._urlsToCacheKeys.values()),r=[];for(const i of n)a.has(i.url)||(await t.delete(i),r.push(i.url));return{deletedURLs:r}})}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,n=this.getCacheKeyForURL(t);if(n)return(await self.caches.open(this.strategy.cacheName)).match(n)}createHandlerBoundToURL(e){const t=this.getCacheKeyForURL(e);if(!t)throw new u("non-precached-url",{url:e});return n=>(n.request=new Request(e),n.params=Object.assign({cacheKey:t},n.params),this.strategy.handle(n))}}let S;const te=()=>(S||(S=new je),S);try{self["workbox:routing:7.0.0"]&&_()}catch{}const se="GET",N=s=>s&&typeof s=="object"?s:{handle:s};let D=class{constructor(e,t,n=se){this.handler=N(t),this.match=e,this.method=n}setCatchHandler(e){this.catchHandler=N(e)}},He=class extends D{constructor(e,t,n){const a=({url:r})=>{const i=e.exec(r.href);if(i&&!(r.origin!==location.origin&&i.index!==0))return i.slice(1)};super(a,t,n)}},Fe=class{constructor(){this._routes=new Map,this._defaultHandlerMap=new Map}get routes(){return this._routes}addFetchListener(){self.addEventListener("fetch",e=>{const{request:t}=e,n=this.handleRequest({request:t,event:e});n&&e.respondWith(n)})}addCacheListener(){self.addEventListener("message",e=>{if(e.data&&e.data.type==="CACHE_URLS"){const{payload:t}=e.data,n=Promise.all(t.urlsToCache.map(a=>{typeof a=="string"&&(a=[a]);const r=new Request(...a);return this.handleRequest({request:r,event:e})}));e.waitUntil(n),e.ports&&e.ports[0]&&n.then(()=>e.ports[0].postMessage(!0))}})}handleRequest({request:e,event:t}){const n=new URL(e.url,location.href);if(!n.protocol.startsWith("http"))return;const a=n.origin===location.origin,{params:r,route:i}=this.findMatchingRoute({event:t,request:e,sameOrigin:a,url:n});let c=i&&i.handler;const o=e.method;if(!c&&this._defaultHandlerMap.has(o)&&(c=this._defaultHandlerMap.get(o)),!c)return;let l;try{l=c.handle({url:n,request:e,event:t,params:r})}catch(h){l=Promise.reject(h)}const f=i&&i.catchHandler;return l instanceof Promise&&(this._catchHandler||f)&&(l=l.catch(async h=>{if(f)try{return await f.handle({url:n,request:e,event:t,params:r})}catch(b){b instanceof Error&&(h=b)}if(this._catchHandler)return this._catchHandler.handle({url:n,request:e,event:t});throw h})),l}findMatchingRoute({url:e,sameOrigin:t,request:n,event:a}){const r=this._routes.get(n.method)||[];for(const i of r){let c;const o=i.match({url:e,sameOrigin:t,request:n,event:a});if(o)return c=o,(Array.isArray(c)&&c.length===0||o.constructor===Object&&Object.keys(o).length===0||typeof o=="boolean")&&(c=void 0),{route:i,params:c}}return{}}setDefaultHandler(e,t=se){this._defaultHandlerMap.set(t,N(e))}setCatchHandler(e){this._catchHandler=N(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 u("unregister-route-but-not-found-with-method",{method:e.method});const t=this._routes.get(e.method).indexOf(e);if(t>-1)this._routes.get(e.method).splice(t,1);else throw new u("unregister-route-route-not-registered")}},x;const Be=()=>(x||(x=new Fe,x.addFetchListener(),x.addCacheListener()),x);function qe(s,e,t){let n;if(typeof s=="string"){const r=new URL(s,location.href),i=({url:c})=>c.href===r.href;n=new D(i,e,t)}else if(s instanceof RegExp)n=new He(s,e,t);else if(typeof s=="function")n=new D(s,e,t);else if(s instanceof D)n=s;else throw new u("unsupported-route-type",{moduleName:"workbox-routing",funcName:"registerRoute",paramName:"capture"});return Be().registerRoute(n),n}function Ve(s,e=[]){for(const t of[...s.searchParams.keys()])e.some(n=>n.test(t))&&s.searchParams.delete(t);return s}function*Ge(s,{ignoreURLParametersMatching:e=[/^utm_/,/^fbclid$/],directoryIndex:t="index.html",cleanURLs:n=!0,urlManipulation:a}={}){const r=new URL(s,location.href);r.hash="",yield r.href;const i=Ve(r,e);if(yield i.href,t&&i.pathname.endsWith("/")){const c=new URL(i.href);c.pathname+=t,yield c.href}if(n){const c=new URL(i.href);c.pathname+=".html",yield c.href}if(a){const c=a({url:r});for(const o of c)yield o.href}}class Je extends D{constructor(e,t){const n=({request:a})=>{const r=e.getURLsToCacheKeys();for(const i of Ge(a.url,t)){const c=r.get(i);if(c){const o=e.getIntegrityForCacheKey(c);return{cacheKey:c,integrity:o}}}};super(n,e.strategy)}}function Qe(s){const e=te(),t=new Je(e,s);qe(t)}function ze(s){te().precache(s)}function Xe(s,e){ze(s),Qe(e)}try{self["workbox:core:7.0.0"]&&_()}catch{}const Ye=(s,...e)=>{let t=s;return e.length>0&&(t+=` :: ${JSON.stringify(e)}`),t},Ze=Ye;class et extends Error{constructor(e,t){const n=Ze(e,t);super(n),this.name=e,this.details=t}}function ne(s){s.then(()=>{})}const tt=(s,e)=>e.some(t=>s instanceof t);let Q,z;function st(){return Q||(Q=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function nt(){return z||(z=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const ae=new WeakMap,j=new WeakMap,re=new WeakMap,I=new WeakMap,q=new WeakMap;function at(s){const e=new Promise((t,n)=>{const a=()=>{s.removeEventListener("success",r),s.removeEventListener("error",i)},r=()=>{t(m(s.result)),a()},i=()=>{n(s.error),a()};s.addEventListener("success",r),s.addEventListener("error",i)});return e.then(t=>{t instanceof IDBCursor&&ae.set(t,s)}).catch(()=>{}),q.set(e,s),e}function rt(s){if(j.has(s))return;const e=new Promise((t,n)=>{const a=()=>{s.removeEventListener("complete",r),s.removeEventListener("error",i),s.removeEventListener("abort",i)},r=()=>{t(),a()},i=()=>{n(s.error||new DOMException("AbortError","AbortError")),a()};s.addEventListener("complete",r),s.addEventListener("error",i),s.addEventListener("abort",i)});j.set(s,e)}let H={get(s,e,t){if(s instanceof IDBTransaction){if(e==="done")return j.get(s);if(e==="objectStoreNames")return s.objectStoreNames||re.get(s);if(e==="store")return t.objectStoreNames[1]?void 0:t.objectStore(t.objectStoreNames[0])}return m(s[e])},set(s,e,t){return s[e]=t,!0},has(s,e){return s instanceof IDBTransaction&&(e==="done"||e==="store")?!0:e in s}};function it(s){H=s(H)}function ct(s){return s===IDBDatabase.prototype.transaction&&!("objectStoreNames"in IDBTransaction.prototype)?function(e,...t){const n=s.call(W(this),e,...t);return re.set(n,e.sort?e.sort():[e]),m(n)}:nt().includes(s)?function(...e){return s.apply(W(this),e),m(ae.get(this))}:function(...e){return m(s.apply(W(this),e))}}function ot(s){return typeof s=="function"?ct(s):(s instanceof IDBTransaction&&rt(s),tt(s,st())?new Proxy(s,H):s)}function m(s){if(s instanceof IDBRequest)return at(s);if(I.has(s))return I.get(s);const e=ot(s);return e!==s&&(I.set(s,e),q.set(e,s)),e}const W=s=>q.get(s);function lt(s,e,{blocked:t,upgrade:n,blocking:a,terminated:r}={}){const i=indexedDB.open(s,e),c=m(i);return n&&i.addEventListener("upgradeneeded",o=>{n(m(i.result),o.oldVersion,o.newVersion,m(i.transaction),o)}),t&&i.addEventListener("blocked",o=>t(o.oldVersion,o.newVersion,o)),c.then(o=>{r&&o.addEventListener("close",()=>r()),a&&o.addEventListener("versionchange",l=>a(l.oldVersion,l.newVersion,l))}).catch(()=>{}),c}function ht(s,{blocked:e}={}){const t=indexedDB.deleteDatabase(s);return e&&t.addEventListener("blocked",n=>e(n.oldVersion,n)),m(t).then(()=>{})}const ut=["get","getKey","getAll","getAllKeys","count"],ft=["put","add","delete","clear"],K=new Map;function X(s,e){if(!(s instanceof IDBDatabase&&!(e in s)&&typeof e=="string"))return;if(K.get(e))return K.get(e);const t=e.replace(/FromIndex$/,""),n=e!==t,a=ft.includes(t);if(!(t in(n?IDBIndex:IDBObjectStore).prototype)||!(a||ut.includes(t)))return;const r=async function(i,...c){const o=this.transaction(i,a?"readwrite":"readonly");let l=o.store;return n&&(l=l.index(c.shift())),(await Promise.all([l[t](...c),a&&o.done]))[0]};return K.set(e,r),r}it(s=>({...s,get:(e,t,n)=>X(e,t)||s.get(e,t,n),has:(e,t)=>!!X(e,t)||s.has(e,t)}));try{self["workbox:expiration:7.0.0"]&&_()}catch{}const dt="workbox-expiration",E="cache-entries",Y=s=>{const e=new URL(s,location.href);return e.hash="",e.href};class pt{constructor(e){this._db=null,this._cacheName=e}_upgradeDb(e){const t=e.createObjectStore(E,{keyPath:"id"});t.createIndex("cacheName","cacheName",{unique:!1}),t.createIndex("timestamp","timestamp",{unique:!1})}_upgradeDbAndDeleteOldDbs(e){this._upgradeDb(e),this._cacheName&&ht(this._cacheName)}async setTimestamp(e,t){e=Y(e);const n={url:e,timestamp:t,cacheName:this._cacheName,id:this._getId(e)},r=(await this.getDb()).transaction(E,"readwrite",{durability:"relaxed"});await r.store.put(n),await r.done}async getTimestamp(e){const n=await(await this.getDb()).get(E,this._getId(e));return n?.timestamp}async expireEntries(e,t){const n=await this.getDb();let a=await n.transaction(E).store.index("timestamp").openCursor(null,"prev");const r=[];let i=0;for(;a;){const o=a.value;o.cacheName===this._cacheName&&(e&&o.timestamp<e||t&&i>=t?r.push(a.value):i++),a=await a.continue()}const c=[];for(const o of r)await n.delete(E,o.id),c.push(o.url);return c}_getId(e){return this._cacheName+"|"+Y(e)}async getDb(){return this._db||(this._db=await lt(dt,1,{upgrade:this._upgradeDbAndDeleteOldDbs.bind(this)})),this._db}}class gt{constructor(e,t={}){this._isRunning=!1,this._rerunRequested=!1,this._maxEntries=t.maxEntries,this._maxAgeSeconds=t.maxAgeSeconds,this._matchOptions=t.matchOptions,this._cacheName=e,this._timestampModel=new pt(e)}async expireEntries(){if(this._isRunning){this._rerunRequested=!0;return}this._isRunning=!0;const e=this._maxAgeSeconds?Date.now()-this._maxAgeSeconds*1e3:0,t=await this._timestampModel.expireEntries(e,this._maxEntries),n=await self.caches.open(this._cacheName);for(const a of t)await n.delete(a,this._matchOptions);this._isRunning=!1,this._rerunRequested&&(this._rerunRequested=!1,ne(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),n=Date.now()-this._maxAgeSeconds*1e3;return t!==void 0?t<n:!0}else return!1}async delete(){this._rerunRequested=!1,await this._timestampModel.expireEntries(1/0)}}const g={googleAnalytics:"googleAnalytics",precache:"precache-v2",prefix:"workbox",runtime:"runtime",suffix:typeof registration<"u"?registration.scope:""},$=s=>[g.prefix,s,g.suffix].filter(e=>e&&e.length>0).join("-"),mt=s=>{for(const e of Object.keys(g))s(e)},wt={updateDetails:s=>{mt(e=>{typeof s[e]=="string"&&(g[e]=s[e])})},getGoogleAnalyticsName:s=>s||$(g.googleAnalytics),getPrecacheName:s=>s||$(g.precache),getPrefix:()=>g.prefix,getRuntimeName:s=>s||$(g.runtime),getSuffix:()=>g.suffix},yt=new Set;function _t(s){yt.add(s)}class Rt{constructor(e={}){this.cachedResponseWillBeUsed=async({event:t,request:n,cacheName:a,cachedResponse:r})=>{if(!r)return null;const i=this._isResponseDateFresh(r),c=this._getCacheExpiration(a);ne(c.expireEntries());const o=c.updateTimestamp(n.url);if(t)try{t.waitUntil(o)}catch{}return i?r:null},this.cacheDidUpdate=async({cacheName:t,request:n})=>{const a=this._getCacheExpiration(t);await a.updateTimestamp(n.url),await a.expireEntries()},this._config=e,this._maxAgeSeconds=e.maxAgeSeconds,this._cacheExpirations=new Map,e.purgeOnQuotaError&&_t(()=>this.deleteCacheAndMetadata())}_getCacheExpiration(e){if(e===wt.getRuntimeName())throw new et("expire-custom-caches-only");let t=this._cacheExpirations.get(e);return t||(t=new gt(e,this._config),this._cacheExpirations.set(e,t)),t}_isResponseDateFresh(e){if(!this._maxAgeSeconds)return!0;const t=this._getDateHeaderTimestamp(e);if(t===null)return!0;const n=Date.now();return t>=n-this._maxAgeSeconds*1e3}_getDateHeaderTimestamp(e){if(!e.headers.has("date"))return null;const t=e.headers.get("date"),a=new Date(t).getTime();return isNaN(a)?null:a}async deleteCacheAndMetadata(){for(const[e,t]of this._cacheExpirations)await self.caches.delete(e),await t.delete();this._cacheExpirations=new Map}}try{self["workbox:routing:7.0.0"]&&_()}catch{}const ie="GET",v=s=>s&&typeof s=="object"?s:{handle:s};class T{constructor(e,t,n=ie){this.handler=v(t),this.match=e,this.method=n}setCatchHandler(e){this.catchHandler=v(e)}}class bt extends T{constructor(e,t,n){const a=({url:r})=>{const i=e.exec(r.href);if(i&&!(r.origin!==location.origin&&i.index!==0))return i.slice(1)};super(a,t,n)}}class Ct{constructor(){this._routes=new Map,this._defaultHandlerMap=new Map}get routes(){return this._routes}addFetchListener(){self.addEventListener("fetch",e=>{const{request:t}=e,n=this.handleRequest({request:t,event:e});n&&e.respondWith(n)})}addCacheListener(){self.addEventListener("message",e=>{if(e.data&&e.data.type==="CACHE_URLS"){const{payload:t}=e.data,n=Promise.all(t.urlsToCache.map(a=>{typeof a=="string"&&(a=[a]);const r=new Request(...a);return this.handleRequest({request:r,event:e})}));e.waitUntil(n),e.ports&&e.ports[0]&&n.then(()=>e.ports[0].postMessage(!0))}})}handleRequest({request:e,event:t}){const n=new URL(e.url,location.href);if(!n.protocol.startsWith("http"))return;const a=n.origin===location.origin,{params:r,route:i}=this.findMatchingRoute({event:t,request:e,sameOrigin:a,url:n});let c=i&&i.handler;const o=e.method;if(!c&&this._defaultHandlerMap.has(o)&&(c=this._defaultHandlerMap.get(o)),!c)return;let l;try{l=c.handle({url:n,request:e,event:t,params:r})}catch(h){l=Promise.reject(h)}const f=i&&i.catchHandler;return l instanceof Promise&&(this._catchHandler||f)&&(l=l.catch(async h=>{if(f)try{return await f.handle({url:n,request:e,event:t,params:r})}catch(b){b instanceof Error&&(h=b)}if(this._catchHandler)return this._catchHandler.handle({url:n,request:e,event:t});throw h})),l}findMatchingRoute({url:e,sameOrigin:t,request:n,event:a}){const r=this._routes.get(n.method)||[];for(const i of r){let c;const o=i.match({url:e,sameOrigin:t,request:n,event:a});if(o)return c=o,(Array.isArray(c)&&c.length===0||o.constructor===Object&&Object.keys(o).length===0||typeof o=="boolean")&&(c=void 0),{route:i,params:c}}return{}}setDefaultHandler(e,t=ie){this._defaultHandlerMap.set(t,v(e))}setCatchHandler(e){this._catchHandler=v(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 R("unregister-route-but-not-found-with-method",{method:e.method});const t=this._routes.get(e.method).indexOf(e);if(t>-1)this._routes.get(e.method).splice(t,1);else throw new R("unregister-route-route-not-registered")}}let k;const xt=()=>(k||(k=new Ct,k.addFetchListener(),k.addCacheListener()),k);function M(s,e,t){let n;if(typeof s=="string"){const r=new URL(s,location.href),i=({url:c})=>c.href===r.href;n=new T(i,e,t)}else if(s instanceof RegExp)n=new bt(s,e,t);else if(typeof s=="function")n=new T(s,e,t);else if(s instanceof T)n=s;else throw new R("unsupported-route-type",{moduleName:"workbox-routing",funcName:"registerRoute",paramName:"capture"});return xt().registerRoute(n),n}try{self["workbox:strategies:7.0.0"]&&_()}catch{}function P(s){return typeof s=="string"?new Request(s):s}class Et{constructor(e,t){this._cacheKeys={},Object.assign(this,t),this.event=t.event,this._strategy=e,this._handlerDeferred=new _e,this._extendLifetimePromises=[],this._plugins=[...e.plugins],this._pluginStateMap=new Map;for(const n of this._plugins)this._pluginStateMap.set(n,{});this.event.waitUntil(this._handlerDeferred.promise)}async fetch(e){const{event:t}=this;let n=P(e);if(n.mode==="navigate"&&t instanceof FetchEvent&&t.preloadResponse){const i=await t.preloadResponse;if(i)return i}const a=this.hasCallback("fetchDidFail")?n.clone():null;try{for(const i of this.iterateCallbacks("requestWillFetch"))n=await i({request:n.clone(),event:t})}catch(i){if(i instanceof Error)throw new R("plugin-error-request-will-fetch",{thrownErrorMessage:i.message})}const r=n.clone();try{let i;i=await fetch(n,n.mode==="navigate"?void 0:this._strategy.fetchOptions);for(const c of this.iterateCallbacks("fetchDidSucceed"))i=await c({event:t,request:r,response:i});return i}catch(i){throw a&&await this.runCallbacks("fetchDidFail",{error:i,event:t,originalRequest:a.clone(),request:r.clone()}),i}}async fetchAndCachePut(e){const t=await this.fetch(e),n=t.clone();return this.waitUntil(this.cachePut(e,n)),t}async cacheMatch(e){const t=P(e);let n;const{cacheName:a,matchOptions:r}=this._strategy,i=await this.getCacheKey(t,"read"),c=Object.assign(Object.assign({},r),{cacheName:a});n=await caches.match(i,c);for(const o of this.iterateCallbacks("cachedResponseWillBeUsed"))n=await o({cacheName:a,matchOptions:r,cachedResponse:n,request:i,event:this.event})||void 0;return n}async cachePut(e,t){const n=P(e);await Ce(0);const a=await this.getCacheKey(n,"write");if(!t)throw new R("cache-put-with-no-response",{url:be(a.url)});const r=await this._ensureResponseSafeToCache(t);if(!r)return!1;const{cacheName:i,matchOptions:c}=this._strategy,o=await self.caches.open(i),l=this.hasCallback("cacheDidUpdate"),f=l?await ye(o,a.clone(),["__WB_REVISION__"],c):null;try{await o.put(a,l?r.clone():r)}catch(h){if(h instanceof Error)throw h.name==="QuotaExceededError"&&await Re(),h}for(const h of this.iterateCallbacks("cacheDidUpdate"))await h({cacheName:i,oldResponse:f,newResponse:r.clone(),request:a,event:this.event});return!0}async getCacheKey(e,t){const n=`${e.url} | ${t}`;if(!this._cacheKeys[n]){let a=e;for(const r of this.iterateCallbacks("cacheKeyWillBeUsed"))a=P(await r({mode:t,request:a,event:this.event,params:this.params}));this._cacheKeys[n]=a}return this._cacheKeys[n]}hasCallback(e){for(const t of this._strategy.plugins)if(e in t)return!0;return!1}async runCallbacks(e,t){for(const n of this.iterateCallbacks(e))await n(t)}*iterateCallbacks(e){for(const t of this._strategy.plugins)if(typeof t[e]=="function"){const n=this._pluginStateMap.get(t);yield r=>{const i=Object.assign(Object.assign({},r),{state:n});return t[e](i)}}}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,n=!1;for(const a of this.iterateCallbacks("cacheWillUpdate"))if(t=await a({request:this.request,response:t,event:this.event})||void 0,n=!0,!t)break;return n||t&&t.status!==200&&(t=void 0),t}}class ce{constructor(e={}){this.cacheName=we.getRuntimeName(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,n=typeof e.request=="string"?new Request(e.request):e.request,a="params"in e?e.params:void 0,r=new Et(this,{event:t,request:n,params:a}),i=this._getResponse(r,n,t),c=this._awaitComplete(i,r,n,t);return[i,c]}async _getResponse(e,t,n){await e.runCallbacks("handlerWillStart",{event:n,request:t});let a;try{if(a=await this._handle(t,e),!a||a.type==="error")throw new R("no-response",{url:t.url})}catch(r){if(r instanceof Error){for(const i of e.iterateCallbacks("handlerDidError"))if(a=await i({error:r,event:n,request:t}),a)break}if(!a)throw r}for(const r of e.iterateCallbacks("handlerWillRespond"))a=await r({event:n,request:t,response:a});return a}async _awaitComplete(e,t,n,a){let r,i;try{r=await e}catch{}try{await t.runCallbacks("handlerDidRespond",{event:a,request:n,response:r}),await t.doneWaiting()}catch(c){c instanceof Error&&(i=c)}if(await t.runCallbacks("handlerDidComplete",{event:a,request:n,response:r,error:i}),t.destroy(),i)throw i}}class oe extends ce{async _handle(e,t){let n=await t.cacheMatch(e),a;if(!n)try{n=await t.fetchAndCachePut(e)}catch(r){r instanceof Error&&(a=r)}if(!n)throw new R("no-response",{url:e.url,error:a});return n}}const kt={cacheWillUpdate:async({response:s})=>s.status===200||s.status===0?s:null};class le extends ce{constructor(e={}){super(e),this.plugins.some(t=>"cacheWillUpdate"in t)||this.plugins.unshift(kt)}async _handle(e,t){const n=t.fetchAndCachePut(e).catch(()=>{});t.waitUntil(n);let a=await t.cacheMatch(e),r;if(!a)try{a=await n}catch(i){i instanceof Error&&(r=i)}if(!a)throw new R("no-response",{url:e.url,error:r});return a}}function Dt(s=""){return s.startsWith("/")}function Z(s=""){return(Dt(s)?s.slice(1):s)||"/"}const U="/.well-known/service",F="sw-update-reload-times",he="/lastUpdateMsgTimestamps",Ut=10,Lt=20*1e3;let ue=!1;function Pt(s,e){let t;return(...n)=>{clearTimeout(t),t=setTimeout(()=>{s.apply(this,n)},e)}}function Tt(s,e=50,t=5e3){return new Promise(n=>{const a=Date.now(),r=()=>{s()||Date.now()-a>=t?n():setTimeout(r,e)};r()})}self.addEventListener("message",s=>{s.data&&s.data.type==="CLIENT_UPDATE_READY"&&(console.log("Service Worker: client ready"),ue=!0)});async function Nt(s){const t=await(await caches.open(F)).match(`${he}-${s}`);if(t)try{const n=await t.text();return JSON.parse(n)}catch{return[]}return[]}async function vt(s,e){const t=await caches.open(F);if((await t.keys()).length>100){await caches.delete(F);return}const a=new Response(JSON.stringify(s));await t.put(`${he}-${e}`,a)}const Mt=Pt(async()=>{(await self.clients.matchAll()).forEach(e=>{e.postMessage({type:"SW_DOCUMENT_UPDATED"})})},100),ee=/updatedAt:\s*\d+,/g,At={cacheDidUpdate:async({request:s,oldResponse:e,newResponse:t})=>{if(e)try{let n=await e.clone().text(),a=await t.clone().text();if(s.url.includes("__blocklet__.js")&&(n=n.replace(ee,"updatedAt: ,"),a=a.replace(ee,"updatedAt: ,")),n!==a){const r=Date.now(),c=(await Nt(s.url)).filter(o=>r-o<Lt);if(c.length>=Ut){console.warn("[SW] update too frequent, skip:",s.url);return}await Tt(()=>ue),await vt(c,s.url),console.log("[SW] document version or session updated",s.url),Mt()}}catch(n){console.error("[SW] Error comparing document responses:",n)}}};Xe(([{"revision":null,"url":"assets/access-control-DUN4yMpV.js"},{"revision":null,"url":"assets/actions-DqoNrBDK.js"},{"revision":null,"url":"assets/AdapterDayjs-Dxut8SOC.js"},{"revision":null,"url":"assets/add-component-core-DMK2vsvk.js"},{"revision":null,"url":"assets/add-component-core-G0iZE90Q.css"},{"revision":null,"url":"assets/add-resource-PqL0Uuh0.js"},{"revision":null,"url":"assets/addon-BAbveuTG.js"},{"revision":null,"url":"assets/advanced-CqU1HF2W.js"},{"revision":null,"url":"assets/aigne-CYw3V7gk.js"},{"revision":null,"url":"assets/api-Btn0Tp3W.js"},{"revision":null,"url":"assets/appearance-9XVnA1iX.js"},{"revision":null,"url":"assets/ar-BQm9lQ4M.js"},{"revision":null,"url":"assets/ar-DW15ct8A.js"},{"revision":null,"url":"assets/arrow-down.svg-Besyj_iW.js"},{"revision":null,"url":"assets/audit-logs-F_X6iNpj.js"},{"revision":null,"url":"assets/authorize-CBV5UwkO.js"},{"revision":null,"url":"assets/base-chart-C-Raz4Q-.js"},{"revision":null,"url":"assets/base32-BozpD0f9.js"},{"revision":null,"url":"assets/bind-account-D7Y2ZFOP.js"},{"revision":null,"url":"assets/branding-BydTr2Hx.js"},{"revision":null,"url":"assets/branding-CHlEfgod.js"},{"revision":null,"url":"assets/branding-D6Usg0HW.js"},{"revision":null,"url":"assets/bundle-avatar-BiAxerwR.js"},{"revision":null,"url":"assets/button-CubXLpb7.js"},{"revision":null,"url":"assets/click-to-copy-BoG45bWR.js"},{"revision":null,"url":"assets/cloneDeep-C6qewg0C.js"},{"revision":null,"url":"assets/collapse-BMy0GGFk.js"},{"revision":null,"url":"assets/Community-ClHGTbNM.js"},{"revision":null,"url":"assets/complete-Cb2Sxmlf.js"},{"revision":null,"url":"assets/component-DZcFf12l.js"},{"revision":null,"url":"assets/config-aky-uFqe.js"},{"revision":null,"url":"assets/config-d19JwT_g.js"},{"revision":null,"url":"assets/config-n2q-SpRg.js"},{"revision":null,"url":"assets/config-navigation-B7evgHX9.js"},{"revision":null,"url":"assets/config-space-CaGV6_fe.js"},{"revision":null,"url":"assets/confirm-DbyIloSE.js"},{"revision":null,"url":"assets/connect-1kvc2acD.js"},{"revision":null,"url":"assets/connect-BCEnEcC8.js"},{"revision":null,"url":"assets/connect-to-C6Uwxunl.js"},{"revision":null,"url":"assets/content-layout-oyz1EqNZ.js"},{"revision":null,"url":"assets/create-passport-svg-CUotftEJ.js"},{"revision":null,"url":"assets/createClass-D2cbgKRl.js"},{"revision":null,"url":"assets/dark-animation.json-DxDR1cr6.js"},{"revision":null,"url":"assets/dashboard-DPsCdbTO.js"},{"revision":null,"url":"assets/de-D0uPENSq.js"},{"revision":null,"url":"assets/de-DomrlJGv.js"},{"revision":null,"url":"assets/default-animation.json-Bwjw6UFO.js"},{"revision":null,"url":"assets/delete-confirm-BvaT7EVX.js"},{"revision":null,"url":"assets/did-address-6rS8aBAV.js"},{"revision":null,"url":"assets/domain-action-card-B17HlcP3.js"},{"revision":null,"url":"assets/domain-CPNAkz5L.js"},{"revision":null,"url":"assets/domains-CjSBT2F0.js"},{"revision":null,"url":"assets/edit.svg-DycWG9v3.js"},{"revision":null,"url":"assets/email-CQS2-3wX.js"},{"revision":null,"url":"assets/empty-spinner-DYOzicuy.js"},{"revision":null,"url":"assets/engine-CExnjfYh.js"},{"revision":null,"url":"assets/es-BWRncAvl.js"},{"revision":null,"url":"assets/es-Dh4_UfCu.js"},{"revision":null,"url":"assets/exchange-passport-dOjc-SfK.js"},{"revision":null,"url":"assets/form-OjuupVuN.js"},{"revision":null,"url":"assets/form-text-input-DVzTem6p.js"},{"revision":null,"url":"assets/form-wrapper-C8oo_Fdy.js"},{"revision":null,"url":"assets/fr-CzZWQkiT.js"},{"revision":null,"url":"assets/fr-DkEISw5U.js"},{"revision":null,"url":"assets/fuel-Bb7IQ07a.js"},{"revision":null,"url":"assets/gen-access-key-BxLvOQ2N.js"},{"revision":null,"url":"assets/gen-simple-access-key-3hz8MRZ9.js"},{"revision":null,"url":"assets/get-safe-url-DMMzbtm3.js"},{"revision":null,"url":"assets/Google-BcAmgU5I.js"},{"revision":null,"url":"assets/hi-CNLsAFCp.js"},{"revision":null,"url":"assets/hi-Do9VCuRi.js"},{"revision":null,"url":"assets/Holiday-D8fmDxt6.js"},{"revision":null,"url":"assets/home-CkT3uBov.js"},{"revision":null,"url":"assets/id-CiNosIvh.js"},{"revision":null,"url":"assets/id-Dhhrveu9.js"},{"revision":null,"url":"assets/iframe-CRrwun_M.js"},{"revision":null,"url":"assets/index-B5LvOF-F.css"},{"revision":null,"url":"assets/index-BBeKNAGs.js"},{"revision":null,"url":"assets/index-BbRfaHya.js"},{"revision":null,"url":"assets/index-BDVkvtSV.js"},{"revision":null,"url":"assets/index-BE2C5_JW.js"},{"revision":null,"url":"assets/index-BjQ77Vh8.js"},{"revision":null,"url":"assets/index-BojVbZw0.js"},{"revision":null,"url":"assets/index-BPy8_fa2.js"},{"revision":null,"url":"assets/index-BU__bkv8.js"},{"revision":null,"url":"assets/index-BymvP8Hj.js"},{"revision":null,"url":"assets/index-C7GALc-0.js"},{"revision":null,"url":"assets/index-C9bI-Nzc.js"},{"revision":null,"url":"assets/index-CFIM7xiP.js"},{"revision":null,"url":"assets/index-CgdhTqWX.js"},{"revision":null,"url":"assets/index-CJZ9mOFb.js"},{"revision":null,"url":"assets/index-CqTMHIO1.js"},{"revision":null,"url":"assets/index-CRtYD69s.js"},{"revision":null,"url":"assets/index-CTM3rEfI.js"},{"revision":null,"url":"assets/index-d-vNIJ-l.js"},{"revision":null,"url":"assets/index-D3eL8pu7.js"},{"revision":null,"url":"assets/index-D5LzuXsQ.js"},{"revision":null,"url":"assets/index-D5TNmV3K.js"},{"revision":null,"url":"assets/index-D7z04OzK.js"},{"revision":null,"url":"assets/index-DBs9Ljax.js"},{"revision":null,"url":"assets/index-DcnBbXEh.js"},{"revision":null,"url":"assets/index-DdiwPErA.js"},{"revision":null,"url":"assets/index-De-Vgsb6.js"},{"revision":null,"url":"assets/index-DON2xT5N.js"},{"revision":null,"url":"assets/index-DqUvDRpE.js"},{"revision":null,"url":"assets/index-DrVXX4fX.css"},{"revision":null,"url":"assets/index-DRYJ0xIl.js"},{"revision":null,"url":"assets/index-DSv0DNq1.js"},{"revision":null,"url":"assets/index-Dv1U_077.js"},{"revision":null,"url":"assets/index-DVpni4Ko.js"},{"revision":null,"url":"assets/index-DzrP_XzR.js"},{"revision":null,"url":"assets/index-gnjjKJuC.css"},{"revision":null,"url":"assets/index-I3TWG_pC.js"},{"revision":null,"url":"assets/index-iRMyHUCz.js"},{"revision":null,"url":"assets/index-K0yqveeg.js"},{"revision":null,"url":"assets/index-NomqB6Iy.js"},{"revision":null,"url":"assets/index-SlnENsoJ.js"},{"revision":null,"url":"assets/index-vNtwd6yT.js"},{"revision":null,"url":"assets/index.esm-JPZAjt0x.js"},{"revision":null,"url":"assets/invitation-D2VMdkP-.js"},{"revision":null,"url":"assets/invitations-BeeGtTYL.js"},{"revision":null,"url":"assets/invite-IciZALDI.js"},{"revision":null,"url":"assets/issue-passport-BEAP1Vya.js"},{"revision":null,"url":"assets/isURL-CGr-JE-8.js"},{"revision":null,"url":"assets/item-DTxtmjGC.js"},{"revision":null,"url":"assets/ja-B70UYq5X.js"},{"revision":null,"url":"assets/ja-D5EfJGvg.js"},{"revision":null,"url":"assets/keyboard-arrow-down-rounded-8U0_i9QO.js"},{"revision":null,"url":"assets/ko-C7TZwmXC.js"},{"revision":null,"url":"assets/ko-DIYdQvvz.js"},{"revision":null,"url":"assets/landing-page-BlJ7mZTr.js"},{"revision":null,"url":"assets/launch-result-message-DWeUg9rM.js"},{"revision":null,"url":"assets/layout-DTju743y.js"},{"revision":null,"url":"assets/list-BtwRcB4J.js"},{"revision":null,"url":"assets/list-DwxLS-e9.js"},{"revision":null,"url":"assets/list-header-BE2kzda_.js"},{"revision":null,"url":"assets/localization-DGJotPOl.js"},{"revision":null,"url":"assets/lock.svg-COUP8tyO.js"},{"revision":null,"url":"assets/log-DRYhQxxl.js"},{"revision":null,"url":"assets/logger-CRs1-njY.js"},{"revision":null,"url":"assets/login-E8t_yCpZ.js"},{"revision":null,"url":"assets/login-oauth-callback-C8-7sEby.js"},{"revision":null,"url":"assets/logo-uploader-Jhaa03fx.js"},{"revision":null,"url":"assets/lost-passport-ImvC2R58.js"},{"revision":null,"url":"assets/lottie-error-DeJ4jU66.js"},{"revision":null,"url":"assets/lottie-loading-Npqo86wA.js"},{"revision":null,"url":"assets/lottie-react.esm-M5fKy3fg.js"},{"revision":null,"url":"assets/lottie-web-4koyQiv_.js"},{"revision":null,"url":"assets/lottie-welcome-oyMgXGo-.js"},{"revision":null,"url":"assets/Meeting-CF7NtQe5.js"},{"revision":null,"url":"assets/observability-Zow0Sv-X.js"},{"revision":null,"url":"assets/OffSick-CWwGwWYY.js"},{"revision":null,"url":"assets/omit-hhiOJGRf.js"},{"revision":null,"url":"assets/open-window-IssZedoH.js"},{"revision":null,"url":"assets/over-due-invoice-payment-BW0n6lOg.js"},{"revision":null,"url":"assets/overview-B89tHFJO.js"},{"revision":null,"url":"assets/page-header-DCvzRay5.js"},{"revision":null,"url":"assets/passport-Dv9ta38t.js"},{"revision":null,"url":"assets/passport-item-DDwjarHk.js"},{"revision":null,"url":"assets/permission-hhKy6YZK.js"},{"revision":null,"url":"assets/playground-CAOOFQT1.js"},{"revision":null,"url":"assets/preferences-BuVpQJCz.js"},{"revision":null,"url":"assets/profile-embed-DuKHNcoq.js"},{"revision":null,"url":"assets/pt-aIOBgpHE.js"},{"revision":null,"url":"assets/pt-DObJ_ADK.js"},{"revision":null,"url":"assets/publish-resource-ClW3LtZQ.js"},{"revision":null,"url":"assets/question-mark-circle.svg-B4stD6SS.js"},{"revision":null,"url":"assets/raf-schd.esm-CHNehTG3.js"},{"revision":null,"url":"assets/react-beautiful-dnd.esm-CArJPjh2.js"},{"revision":null,"url":"assets/react-stripe.esm-Dc9snvfb.js"},{"revision":null,"url":"assets/required-BGaDOGrj.js"},{"revision":null,"url":"assets/revoke.svg-CmffMlcP.js"},{"revision":null,"url":"assets/ru-Bt8-v101.js"},{"revision":null,"url":"assets/ru-nYDmEUmY.js"},{"revision":null,"url":"assets/runtime-DjxpZPhA.js"},{"revision":null,"url":"assets/sanitize-BEqBHa8a.js"},{"revision":null,"url":"assets/sdk-DVe2E97G.js"},{"revision":null,"url":"assets/search-4YYphs0l.js"},{"revision":null,"url":"assets/section-C75bzkkL.js"},{"revision":null,"url":"assets/security-DUYDGAtr.js"},{"revision":null,"url":"assets/server-logo-notext.svg-CKQB0tIp.js"},{"revision":null,"url":"assets/session-CMe2VPXM.js"},{"revision":null,"url":"assets/setup-D2YBC-OI.js"},{"revision":null,"url":"assets/shorten-label-RqvHqcC3.js"},{"revision":null,"url":"assets/simple-select-BDpFwLvy.js"},{"revision":null,"url":"assets/spaces-DaOMHVWc.js"},{"revision":null,"url":"assets/start-CsO7coxD.js"},{"revision":null,"url":"assets/starting-progress-X694I5CE.js"},{"revision":null,"url":"assets/status-DDizCqY5.js"},{"revision":null,"url":"assets/step-actions-xPcYINWA.js"},{"revision":null,"url":"assets/stripe.esm-BCCu7gPj.js"},{"revision":null,"url":"assets/studio-B0WlSlNP.js"},{"revision":null,"url":"assets/switch-control-DFAD8EW8.js"},{"revision":null,"url":"assets/table-tips-l51OFH7y.js"},{"revision":null,"url":"assets/team-cjsm8iuN.js"},{"revision":null,"url":"assets/th-DMcUw_9_.js"},{"revision":null,"url":"assets/th-QYkziTlm.js"},{"revision":null,"url":"assets/traffic-DvyU88z0.js"},{"revision":null,"url":"assets/transfer-DpP71rCR.js"},{"revision":null,"url":"assets/ua-parser-DP5omx3I.js"},{"revision":null,"url":"assets/unsubscribe-CK-BhVdP.js"},{"revision":null,"url":"assets/use-app-logo-C_P-ZZre.js"},{"revision":null,"url":"assets/use-mobile-DCNBsOlH.js"},{"revision":null,"url":"assets/use-mobile-maRlSUwU.js"},{"revision":null,"url":"assets/use-passport-id-B-b-_oYF.js"},{"revision":null,"url":"assets/use-server-logo-n_aaKVoZ.js"},{"revision":null,"url":"assets/use-window-close-B5H67t66.js"},{"revision":null,"url":"assets/useAsync-BcVLpt2E.js"},{"revision":null,"url":"assets/useAsync-cZ_FPf9k.js"},{"revision":null,"url":"assets/useAsyncRetry-DwwEjrjs.js"},{"revision":null,"url":"assets/useLocalStorage-B6EKILzf.js"},{"revision":null,"url":"assets/user-center-CcCslD-7.js"},{"revision":null,"url":"assets/user-follower-Chiru_S3.js"},{"revision":null,"url":"assets/useSetState-DFuQZPPV.js"},{"revision":null,"url":"assets/util-DwCjHwi2.js"},{"revision":null,"url":"assets/util-KdfVIssi.js"},{"revision":null,"url":"assets/vendor-arcblock-BwXbOk2K.js"},{"revision":null,"url":"assets/vendor-hooks-CjESGRlR.js"},{"revision":null,"url":"assets/vendor-mui-core-CnXrAOs3.js"},{"revision":null,"url":"assets/vendor-mui-x-bJ5idfMH.js"},{"revision":null,"url":"assets/vendor-react-Dvs43sk9.js"},{"revision":null,"url":"assets/vendor-utils-cJEl_UEd.js"},{"revision":null,"url":"assets/vendor-ux-BzbOqBel.js"},{"revision":null,"url":"assets/vendor-ux-DYcPPYq2.css"},{"revision":null,"url":"assets/vi-B73oWQBC.js"},{"revision":null,"url":"assets/vi-BIkODa3n.js"},{"revision":null,"url":"assets/wait-connect-CHtirPXD.js"},{"revision":null,"url":"assets/wizard-components-DU__q4Hx.js"},{"revision":null,"url":"assets/wizard-DFDRdTlG.js"},{"revision":null,"url":"assets/WorkingRemotely-CD8ntsiV.js"},{"revision":null,"url":"assets/wrap-locale-CMSOcnOQ.js"},{"revision":null,"url":"assets/zh-4tEjx001.js"},{"revision":null,"url":"assets/zh-CPf0Aw2x.js"},{"revision":null,"url":"assets/zh-DCABA61W.js"},{"revision":null,"url":"assets/zh-tw-CYPf8U5U.js"},{"revision":null,"url":"assets/zh-tw-M_0Y4wmR.js"},{"revision":"8e967497d8887f17e6c251b6eeda2d4c","url":"index.html"},{"revision":"629a14a7e3397a134f5a30b5dc735183","url":"registerSW.js"},{"revision":"07a287e43ae8e959a20d6b367a581667","url":"router-template-styles/styles.css"},{"revision":"8f9b8997bf5804519b8e9f8dd1bb6ef9","url":"share/shared-bridge.html"},{"revision":"3c1549cff96a2d2baec44397663c083e","url":"share/shared-service-worker.js"},{"revision":"19d4c6a99cb8ed11e68209a612e7ec44","url":"share/workbox-v7.3.0/workbox-background-sync.prod.js"},{"revision":"d9d631014689e2b4b0e343c129671749","url":"share/workbox-v7.3.0/workbox-broadcast-update.prod.js"},{"revision":"bdb39ceb7380dcb1483c543e8856242b","url":"share/workbox-v7.3.0/workbox-cacheable-response.prod.js"},{"revision":"b84dd900eb18e8bc842666bbb740604e","url":"share/workbox-v7.3.0/workbox-core.prod.js"},{"revision":"c582a61c037234d8283eea0b97693b1b","url":"share/workbox-v7.3.0/workbox-expiration.prod.js"},{"revision":"866ba7d03bd871fa990976e4db312ab3","url":"share/workbox-v7.3.0/workbox-navigation-preload.prod.js"},{"revision":"0c55bb581ea7ce5ebfac1ce95cdda21f","url":"share/workbox-v7.3.0/workbox-offline-ga.prod.js"},{"revision":"770d183cf1f189a1ceb11ba8b5d808fa","url":"share/workbox-v7.3.0/workbox-precaching.prod.js"},{"revision":"295decbe1eb3b073a2a8d67cfbdf5692","url":"share/workbox-v7.3.0/workbox-range-requests.prod.js"},{"revision":"0bcb90677f3508ebc8a3571d14194478","url":"share/workbox-v7.3.0/workbox-recipes.prod.js"},{"revision":"4af96b70b2d20b041e2edd7ef1a8ef27","url":"share/workbox-v7.3.0/workbox-routing.prod.js"},{"revision":"c78c21b4058a1134ad3e12286c57cb2f","url":"share/workbox-v7.3.0/workbox-strategies.prod.js"},{"revision":"7eeb2d820d409221e076d31951fdcf79","url":"share/workbox-v7.3.0/workbox-streams.prod.js"},{"revision":"aa7368887577b9719a46b585d5dcc7a5","url":"share/workbox-v7.3.0/workbox-sw.js"},{"revision":"e768668db4eeefde11b58542900ab2ad","url":"share/workbox-v7.3.0/workbox-window.prod.umd.js"},{"revision":"8d6f3db88a274aef54e88b09ee2cefd5","url":"manifest.webmanifest"}]||[]).filter(s=>s.url!=="/"&&!s.url.includes("index.html")));xe();self.addEventListener("activate",()=>{console.log("Service Worker activated")});self.addEventListener("install",s=>{console.log("Service Worker installed"),s.waitUntil(self.skipWaiting())});const fe=s=>!!(s.method!=="GET"||s.url.includes("/api")||s.url.includes("__meta__.js")||s.url.includes("__blocklet__.js"));M(({request:s})=>fe(s)?!1:s.url.includes("/static/"),new oe({cacheName:`static-${self.registration.scope}`,plugins:[new Rt({maxEntries:200})]}));M(({request:s,url:e})=>self.blocklet?.canCache?.({url:e})?["image","font","style","script"].includes(s.destination):!1,new oe({cacheName:`static-resources-${self.registration.scope}`}));M(({request:s})=>fe(s)?!1:s.url.includes("/images/")||s.url.includes("/router/-template-styles/"),new le({cacheName:`StaleWhileRevalidate-${self.registration.scope}`}));const Ot={cacheKeyWillBeUsed({request:s}){const e=new URL(s.url);return s.destination==="document"&&e.pathname.startsWith(`${U}/admin`)?(e.pathname=`${U}/admin`,e.search="",e.toString()):s.url}},w={};M(({request:s})=>{const e=new URL(s.url);return s.destination==="document"&&e.pathname.startsWith(`${U}/admin`)?(Object.keys(w).forEach(t=>delete w[t]),!0):!w.env&&s.url.includes(`${Z(U)}/api/env`)?(w.env=!0,!0):!w.session&&s.url.includes(`${Z(U)}/api/did/session`)?(w.session=!0,!0):!w.blocklet&&s.url.endsWith("__blocklet__.js")?(w.blocklet=!0,!0):!1},new le({cacheName:`documents-${self.registration.scope}`,plugins:[At,Ot]}));
|
|
2
|
+
This is generally NOT safe. Learn more at https://bit.ly/wb-precache`;console.warn(c)}}}install(e){return G(e,async()=>{const t=new Pe;this.strategy.plugins.push(t);for(const[r,i]of this._urlsToCacheKeys){const c=this._cacheKeysToIntegrities.get(i),o=this._urlsToCacheModes.get(r),l=new Request(r,{integrity:c,cache:o,credentials:"same-origin"});await Promise.all(this.strategy.handleAll({params:{cacheKey:i},request:l,event:e}))}const{updatedURLs:n,notUpdatedURLs:a}=t;return{updatedURLs:n,notUpdatedURLs:a}})}activate(e){return G(e,async()=>{const t=await self.caches.open(this.strategy.cacheName),n=await t.keys(),a=new Set(this._urlsToCacheKeys.values()),r=[];for(const i of n)a.has(i.url)||(await t.delete(i),r.push(i.url));return{deletedURLs:r}})}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,n=this.getCacheKeyForURL(t);if(n)return(await self.caches.open(this.strategy.cacheName)).match(n)}createHandlerBoundToURL(e){const t=this.getCacheKeyForURL(e);if(!t)throw new u("non-precached-url",{url:e});return n=>(n.request=new Request(e),n.params=Object.assign({cacheKey:t},n.params),this.strategy.handle(n))}}let S;const te=()=>(S||(S=new je),S);try{self["workbox:routing:7.0.0"]&&_()}catch{}const se="GET",N=s=>s&&typeof s=="object"?s:{handle:s};let D=class{constructor(e,t,n=se){this.handler=N(t),this.match=e,this.method=n}setCatchHandler(e){this.catchHandler=N(e)}},He=class extends D{constructor(e,t,n){const a=({url:r})=>{const i=e.exec(r.href);if(i&&!(r.origin!==location.origin&&i.index!==0))return i.slice(1)};super(a,t,n)}},Fe=class{constructor(){this._routes=new Map,this._defaultHandlerMap=new Map}get routes(){return this._routes}addFetchListener(){self.addEventListener("fetch",e=>{const{request:t}=e,n=this.handleRequest({request:t,event:e});n&&e.respondWith(n)})}addCacheListener(){self.addEventListener("message",e=>{if(e.data&&e.data.type==="CACHE_URLS"){const{payload:t}=e.data,n=Promise.all(t.urlsToCache.map(a=>{typeof a=="string"&&(a=[a]);const r=new Request(...a);return this.handleRequest({request:r,event:e})}));e.waitUntil(n),e.ports&&e.ports[0]&&n.then(()=>e.ports[0].postMessage(!0))}})}handleRequest({request:e,event:t}){const n=new URL(e.url,location.href);if(!n.protocol.startsWith("http"))return;const a=n.origin===location.origin,{params:r,route:i}=this.findMatchingRoute({event:t,request:e,sameOrigin:a,url:n});let c=i&&i.handler;const o=e.method;if(!c&&this._defaultHandlerMap.has(o)&&(c=this._defaultHandlerMap.get(o)),!c)return;let l;try{l=c.handle({url:n,request:e,event:t,params:r})}catch(h){l=Promise.reject(h)}const f=i&&i.catchHandler;return l instanceof Promise&&(this._catchHandler||f)&&(l=l.catch(async h=>{if(f)try{return await f.handle({url:n,request:e,event:t,params:r})}catch(b){b instanceof Error&&(h=b)}if(this._catchHandler)return this._catchHandler.handle({url:n,request:e,event:t});throw h})),l}findMatchingRoute({url:e,sameOrigin:t,request:n,event:a}){const r=this._routes.get(n.method)||[];for(const i of r){let c;const o=i.match({url:e,sameOrigin:t,request:n,event:a});if(o)return c=o,(Array.isArray(c)&&c.length===0||o.constructor===Object&&Object.keys(o).length===0||typeof o=="boolean")&&(c=void 0),{route:i,params:c}}return{}}setDefaultHandler(e,t=se){this._defaultHandlerMap.set(t,N(e))}setCatchHandler(e){this._catchHandler=N(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 u("unregister-route-but-not-found-with-method",{method:e.method});const t=this._routes.get(e.method).indexOf(e);if(t>-1)this._routes.get(e.method).splice(t,1);else throw new u("unregister-route-route-not-registered")}},x;const Be=()=>(x||(x=new Fe,x.addFetchListener(),x.addCacheListener()),x);function qe(s,e,t){let n;if(typeof s=="string"){const r=new URL(s,location.href),i=({url:c})=>c.href===r.href;n=new D(i,e,t)}else if(s instanceof RegExp)n=new He(s,e,t);else if(typeof s=="function")n=new D(s,e,t);else if(s instanceof D)n=s;else throw new u("unsupported-route-type",{moduleName:"workbox-routing",funcName:"registerRoute",paramName:"capture"});return Be().registerRoute(n),n}function Ve(s,e=[]){for(const t of[...s.searchParams.keys()])e.some(n=>n.test(t))&&s.searchParams.delete(t);return s}function*Ge(s,{ignoreURLParametersMatching:e=[/^utm_/,/^fbclid$/],directoryIndex:t="index.html",cleanURLs:n=!0,urlManipulation:a}={}){const r=new URL(s,location.href);r.hash="",yield r.href;const i=Ve(r,e);if(yield i.href,t&&i.pathname.endsWith("/")){const c=new URL(i.href);c.pathname+=t,yield c.href}if(n){const c=new URL(i.href);c.pathname+=".html",yield c.href}if(a){const c=a({url:r});for(const o of c)yield o.href}}class Je extends D{constructor(e,t){const n=({request:a})=>{const r=e.getURLsToCacheKeys();for(const i of Ge(a.url,t)){const c=r.get(i);if(c){const o=e.getIntegrityForCacheKey(c);return{cacheKey:c,integrity:o}}}};super(n,e.strategy)}}function Qe(s){const e=te(),t=new Je(e,s);qe(t)}function ze(s){te().precache(s)}function Xe(s,e){ze(s),Qe(e)}try{self["workbox:core:7.0.0"]&&_()}catch{}const Ye=(s,...e)=>{let t=s;return e.length>0&&(t+=` :: ${JSON.stringify(e)}`),t},Ze=Ye;class et extends Error{constructor(e,t){const n=Ze(e,t);super(n),this.name=e,this.details=t}}function ne(s){s.then(()=>{})}const tt=(s,e)=>e.some(t=>s instanceof t);let Q,z;function st(){return Q||(Q=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function nt(){return z||(z=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const ae=new WeakMap,j=new WeakMap,re=new WeakMap,I=new WeakMap,q=new WeakMap;function at(s){const e=new Promise((t,n)=>{const a=()=>{s.removeEventListener("success",r),s.removeEventListener("error",i)},r=()=>{t(m(s.result)),a()},i=()=>{n(s.error),a()};s.addEventListener("success",r),s.addEventListener("error",i)});return e.then(t=>{t instanceof IDBCursor&&ae.set(t,s)}).catch(()=>{}),q.set(e,s),e}function rt(s){if(j.has(s))return;const e=new Promise((t,n)=>{const a=()=>{s.removeEventListener("complete",r),s.removeEventListener("error",i),s.removeEventListener("abort",i)},r=()=>{t(),a()},i=()=>{n(s.error||new DOMException("AbortError","AbortError")),a()};s.addEventListener("complete",r),s.addEventListener("error",i),s.addEventListener("abort",i)});j.set(s,e)}let H={get(s,e,t){if(s instanceof IDBTransaction){if(e==="done")return j.get(s);if(e==="objectStoreNames")return s.objectStoreNames||re.get(s);if(e==="store")return t.objectStoreNames[1]?void 0:t.objectStore(t.objectStoreNames[0])}return m(s[e])},set(s,e,t){return s[e]=t,!0},has(s,e){return s instanceof IDBTransaction&&(e==="done"||e==="store")?!0:e in s}};function it(s){H=s(H)}function ct(s){return s===IDBDatabase.prototype.transaction&&!("objectStoreNames"in IDBTransaction.prototype)?function(e,...t){const n=s.call(W(this),e,...t);return re.set(n,e.sort?e.sort():[e]),m(n)}:nt().includes(s)?function(...e){return s.apply(W(this),e),m(ae.get(this))}:function(...e){return m(s.apply(W(this),e))}}function ot(s){return typeof s=="function"?ct(s):(s instanceof IDBTransaction&&rt(s),tt(s,st())?new Proxy(s,H):s)}function m(s){if(s instanceof IDBRequest)return at(s);if(I.has(s))return I.get(s);const e=ot(s);return e!==s&&(I.set(s,e),q.set(e,s)),e}const W=s=>q.get(s);function lt(s,e,{blocked:t,upgrade:n,blocking:a,terminated:r}={}){const i=indexedDB.open(s,e),c=m(i);return n&&i.addEventListener("upgradeneeded",o=>{n(m(i.result),o.oldVersion,o.newVersion,m(i.transaction),o)}),t&&i.addEventListener("blocked",o=>t(o.oldVersion,o.newVersion,o)),c.then(o=>{r&&o.addEventListener("close",()=>r()),a&&o.addEventListener("versionchange",l=>a(l.oldVersion,l.newVersion,l))}).catch(()=>{}),c}function ht(s,{blocked:e}={}){const t=indexedDB.deleteDatabase(s);return e&&t.addEventListener("blocked",n=>e(n.oldVersion,n)),m(t).then(()=>{})}const ut=["get","getKey","getAll","getAllKeys","count"],ft=["put","add","delete","clear"],K=new Map;function X(s,e){if(!(s instanceof IDBDatabase&&!(e in s)&&typeof e=="string"))return;if(K.get(e))return K.get(e);const t=e.replace(/FromIndex$/,""),n=e!==t,a=ft.includes(t);if(!(t in(n?IDBIndex:IDBObjectStore).prototype)||!(a||ut.includes(t)))return;const r=async function(i,...c){const o=this.transaction(i,a?"readwrite":"readonly");let l=o.store;return n&&(l=l.index(c.shift())),(await Promise.all([l[t](...c),a&&o.done]))[0]};return K.set(e,r),r}it(s=>({...s,get:(e,t,n)=>X(e,t)||s.get(e,t,n),has:(e,t)=>!!X(e,t)||s.has(e,t)}));try{self["workbox:expiration:7.0.0"]&&_()}catch{}const dt="workbox-expiration",E="cache-entries",Y=s=>{const e=new URL(s,location.href);return e.hash="",e.href};class pt{constructor(e){this._db=null,this._cacheName=e}_upgradeDb(e){const t=e.createObjectStore(E,{keyPath:"id"});t.createIndex("cacheName","cacheName",{unique:!1}),t.createIndex("timestamp","timestamp",{unique:!1})}_upgradeDbAndDeleteOldDbs(e){this._upgradeDb(e),this._cacheName&&ht(this._cacheName)}async setTimestamp(e,t){e=Y(e);const n={url:e,timestamp:t,cacheName:this._cacheName,id:this._getId(e)},r=(await this.getDb()).transaction(E,"readwrite",{durability:"relaxed"});await r.store.put(n),await r.done}async getTimestamp(e){const n=await(await this.getDb()).get(E,this._getId(e));return n?.timestamp}async expireEntries(e,t){const n=await this.getDb();let a=await n.transaction(E).store.index("timestamp").openCursor(null,"prev");const r=[];let i=0;for(;a;){const o=a.value;o.cacheName===this._cacheName&&(e&&o.timestamp<e||t&&i>=t?r.push(a.value):i++),a=await a.continue()}const c=[];for(const o of r)await n.delete(E,o.id),c.push(o.url);return c}_getId(e){return this._cacheName+"|"+Y(e)}async getDb(){return this._db||(this._db=await lt(dt,1,{upgrade:this._upgradeDbAndDeleteOldDbs.bind(this)})),this._db}}class gt{constructor(e,t={}){this._isRunning=!1,this._rerunRequested=!1,this._maxEntries=t.maxEntries,this._maxAgeSeconds=t.maxAgeSeconds,this._matchOptions=t.matchOptions,this._cacheName=e,this._timestampModel=new pt(e)}async expireEntries(){if(this._isRunning){this._rerunRequested=!0;return}this._isRunning=!0;const e=this._maxAgeSeconds?Date.now()-this._maxAgeSeconds*1e3:0,t=await this._timestampModel.expireEntries(e,this._maxEntries),n=await self.caches.open(this._cacheName);for(const a of t)await n.delete(a,this._matchOptions);this._isRunning=!1,this._rerunRequested&&(this._rerunRequested=!1,ne(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),n=Date.now()-this._maxAgeSeconds*1e3;return t!==void 0?t<n:!0}else return!1}async delete(){this._rerunRequested=!1,await this._timestampModel.expireEntries(1/0)}}const g={googleAnalytics:"googleAnalytics",precache:"precache-v2",prefix:"workbox",runtime:"runtime",suffix:typeof registration<"u"?registration.scope:""},$=s=>[g.prefix,s,g.suffix].filter(e=>e&&e.length>0).join("-"),mt=s=>{for(const e of Object.keys(g))s(e)},wt={updateDetails:s=>{mt(e=>{typeof s[e]=="string"&&(g[e]=s[e])})},getGoogleAnalyticsName:s=>s||$(g.googleAnalytics),getPrecacheName:s=>s||$(g.precache),getPrefix:()=>g.prefix,getRuntimeName:s=>s||$(g.runtime),getSuffix:()=>g.suffix},yt=new Set;function _t(s){yt.add(s)}class Rt{constructor(e={}){this.cachedResponseWillBeUsed=async({event:t,request:n,cacheName:a,cachedResponse:r})=>{if(!r)return null;const i=this._isResponseDateFresh(r),c=this._getCacheExpiration(a);ne(c.expireEntries());const o=c.updateTimestamp(n.url);if(t)try{t.waitUntil(o)}catch{}return i?r:null},this.cacheDidUpdate=async({cacheName:t,request:n})=>{const a=this._getCacheExpiration(t);await a.updateTimestamp(n.url),await a.expireEntries()},this._config=e,this._maxAgeSeconds=e.maxAgeSeconds,this._cacheExpirations=new Map,e.purgeOnQuotaError&&_t(()=>this.deleteCacheAndMetadata())}_getCacheExpiration(e){if(e===wt.getRuntimeName())throw new et("expire-custom-caches-only");let t=this._cacheExpirations.get(e);return t||(t=new gt(e,this._config),this._cacheExpirations.set(e,t)),t}_isResponseDateFresh(e){if(!this._maxAgeSeconds)return!0;const t=this._getDateHeaderTimestamp(e);if(t===null)return!0;const n=Date.now();return t>=n-this._maxAgeSeconds*1e3}_getDateHeaderTimestamp(e){if(!e.headers.has("date"))return null;const t=e.headers.get("date"),a=new Date(t).getTime();return isNaN(a)?null:a}async deleteCacheAndMetadata(){for(const[e,t]of this._cacheExpirations)await self.caches.delete(e),await t.delete();this._cacheExpirations=new Map}}try{self["workbox:routing:7.0.0"]&&_()}catch{}const ie="GET",v=s=>s&&typeof s=="object"?s:{handle:s};class T{constructor(e,t,n=ie){this.handler=v(t),this.match=e,this.method=n}setCatchHandler(e){this.catchHandler=v(e)}}class bt extends T{constructor(e,t,n){const a=({url:r})=>{const i=e.exec(r.href);if(i&&!(r.origin!==location.origin&&i.index!==0))return i.slice(1)};super(a,t,n)}}class Ct{constructor(){this._routes=new Map,this._defaultHandlerMap=new Map}get routes(){return this._routes}addFetchListener(){self.addEventListener("fetch",e=>{const{request:t}=e,n=this.handleRequest({request:t,event:e});n&&e.respondWith(n)})}addCacheListener(){self.addEventListener("message",e=>{if(e.data&&e.data.type==="CACHE_URLS"){const{payload:t}=e.data,n=Promise.all(t.urlsToCache.map(a=>{typeof a=="string"&&(a=[a]);const r=new Request(...a);return this.handleRequest({request:r,event:e})}));e.waitUntil(n),e.ports&&e.ports[0]&&n.then(()=>e.ports[0].postMessage(!0))}})}handleRequest({request:e,event:t}){const n=new URL(e.url,location.href);if(!n.protocol.startsWith("http"))return;const a=n.origin===location.origin,{params:r,route:i}=this.findMatchingRoute({event:t,request:e,sameOrigin:a,url:n});let c=i&&i.handler;const o=e.method;if(!c&&this._defaultHandlerMap.has(o)&&(c=this._defaultHandlerMap.get(o)),!c)return;let l;try{l=c.handle({url:n,request:e,event:t,params:r})}catch(h){l=Promise.reject(h)}const f=i&&i.catchHandler;return l instanceof Promise&&(this._catchHandler||f)&&(l=l.catch(async h=>{if(f)try{return await f.handle({url:n,request:e,event:t,params:r})}catch(b){b instanceof Error&&(h=b)}if(this._catchHandler)return this._catchHandler.handle({url:n,request:e,event:t});throw h})),l}findMatchingRoute({url:e,sameOrigin:t,request:n,event:a}){const r=this._routes.get(n.method)||[];for(const i of r){let c;const o=i.match({url:e,sameOrigin:t,request:n,event:a});if(o)return c=o,(Array.isArray(c)&&c.length===0||o.constructor===Object&&Object.keys(o).length===0||typeof o=="boolean")&&(c=void 0),{route:i,params:c}}return{}}setDefaultHandler(e,t=ie){this._defaultHandlerMap.set(t,v(e))}setCatchHandler(e){this._catchHandler=v(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 R("unregister-route-but-not-found-with-method",{method:e.method});const t=this._routes.get(e.method).indexOf(e);if(t>-1)this._routes.get(e.method).splice(t,1);else throw new R("unregister-route-route-not-registered")}}let k;const xt=()=>(k||(k=new Ct,k.addFetchListener(),k.addCacheListener()),k);function M(s,e,t){let n;if(typeof s=="string"){const r=new URL(s,location.href),i=({url:c})=>c.href===r.href;n=new T(i,e,t)}else if(s instanceof RegExp)n=new bt(s,e,t);else if(typeof s=="function")n=new T(s,e,t);else if(s instanceof T)n=s;else throw new R("unsupported-route-type",{moduleName:"workbox-routing",funcName:"registerRoute",paramName:"capture"});return xt().registerRoute(n),n}try{self["workbox:strategies:7.0.0"]&&_()}catch{}function P(s){return typeof s=="string"?new Request(s):s}class Et{constructor(e,t){this._cacheKeys={},Object.assign(this,t),this.event=t.event,this._strategy=e,this._handlerDeferred=new _e,this._extendLifetimePromises=[],this._plugins=[...e.plugins],this._pluginStateMap=new Map;for(const n of this._plugins)this._pluginStateMap.set(n,{});this.event.waitUntil(this._handlerDeferred.promise)}async fetch(e){const{event:t}=this;let n=P(e);if(n.mode==="navigate"&&t instanceof FetchEvent&&t.preloadResponse){const i=await t.preloadResponse;if(i)return i}const a=this.hasCallback("fetchDidFail")?n.clone():null;try{for(const i of this.iterateCallbacks("requestWillFetch"))n=await i({request:n.clone(),event:t})}catch(i){if(i instanceof Error)throw new R("plugin-error-request-will-fetch",{thrownErrorMessage:i.message})}const r=n.clone();try{let i;i=await fetch(n,n.mode==="navigate"?void 0:this._strategy.fetchOptions);for(const c of this.iterateCallbacks("fetchDidSucceed"))i=await c({event:t,request:r,response:i});return i}catch(i){throw a&&await this.runCallbacks("fetchDidFail",{error:i,event:t,originalRequest:a.clone(),request:r.clone()}),i}}async fetchAndCachePut(e){const t=await this.fetch(e),n=t.clone();return this.waitUntil(this.cachePut(e,n)),t}async cacheMatch(e){const t=P(e);let n;const{cacheName:a,matchOptions:r}=this._strategy,i=await this.getCacheKey(t,"read"),c=Object.assign(Object.assign({},r),{cacheName:a});n=await caches.match(i,c);for(const o of this.iterateCallbacks("cachedResponseWillBeUsed"))n=await o({cacheName:a,matchOptions:r,cachedResponse:n,request:i,event:this.event})||void 0;return n}async cachePut(e,t){const n=P(e);await Ce(0);const a=await this.getCacheKey(n,"write");if(!t)throw new R("cache-put-with-no-response",{url:be(a.url)});const r=await this._ensureResponseSafeToCache(t);if(!r)return!1;const{cacheName:i,matchOptions:c}=this._strategy,o=await self.caches.open(i),l=this.hasCallback("cacheDidUpdate"),f=l?await ye(o,a.clone(),["__WB_REVISION__"],c):null;try{await o.put(a,l?r.clone():r)}catch(h){if(h instanceof Error)throw h.name==="QuotaExceededError"&&await Re(),h}for(const h of this.iterateCallbacks("cacheDidUpdate"))await h({cacheName:i,oldResponse:f,newResponse:r.clone(),request:a,event:this.event});return!0}async getCacheKey(e,t){const n=`${e.url} | ${t}`;if(!this._cacheKeys[n]){let a=e;for(const r of this.iterateCallbacks("cacheKeyWillBeUsed"))a=P(await r({mode:t,request:a,event:this.event,params:this.params}));this._cacheKeys[n]=a}return this._cacheKeys[n]}hasCallback(e){for(const t of this._strategy.plugins)if(e in t)return!0;return!1}async runCallbacks(e,t){for(const n of this.iterateCallbacks(e))await n(t)}*iterateCallbacks(e){for(const t of this._strategy.plugins)if(typeof t[e]=="function"){const n=this._pluginStateMap.get(t);yield r=>{const i=Object.assign(Object.assign({},r),{state:n});return t[e](i)}}}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,n=!1;for(const a of this.iterateCallbacks("cacheWillUpdate"))if(t=await a({request:this.request,response:t,event:this.event})||void 0,n=!0,!t)break;return n||t&&t.status!==200&&(t=void 0),t}}class ce{constructor(e={}){this.cacheName=we.getRuntimeName(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,n=typeof e.request=="string"?new Request(e.request):e.request,a="params"in e?e.params:void 0,r=new Et(this,{event:t,request:n,params:a}),i=this._getResponse(r,n,t),c=this._awaitComplete(i,r,n,t);return[i,c]}async _getResponse(e,t,n){await e.runCallbacks("handlerWillStart",{event:n,request:t});let a;try{if(a=await this._handle(t,e),!a||a.type==="error")throw new R("no-response",{url:t.url})}catch(r){if(r instanceof Error){for(const i of e.iterateCallbacks("handlerDidError"))if(a=await i({error:r,event:n,request:t}),a)break}if(!a)throw r}for(const r of e.iterateCallbacks("handlerWillRespond"))a=await r({event:n,request:t,response:a});return a}async _awaitComplete(e,t,n,a){let r,i;try{r=await e}catch{}try{await t.runCallbacks("handlerDidRespond",{event:a,request:n,response:r}),await t.doneWaiting()}catch(c){c instanceof Error&&(i=c)}if(await t.runCallbacks("handlerDidComplete",{event:a,request:n,response:r,error:i}),t.destroy(),i)throw i}}class oe extends ce{async _handle(e,t){let n=await t.cacheMatch(e),a;if(!n)try{n=await t.fetchAndCachePut(e)}catch(r){r instanceof Error&&(a=r)}if(!n)throw new R("no-response",{url:e.url,error:a});return n}}const kt={cacheWillUpdate:async({response:s})=>s.status===200||s.status===0?s:null};class le extends ce{constructor(e={}){super(e),this.plugins.some(t=>"cacheWillUpdate"in t)||this.plugins.unshift(kt)}async _handle(e,t){const n=t.fetchAndCachePut(e).catch(()=>{});t.waitUntil(n);let a=await t.cacheMatch(e),r;if(!a)try{a=await n}catch(i){i instanceof Error&&(r=i)}if(!a)throw new R("no-response",{url:e.url,error:r});return a}}function Dt(s=""){return s.startsWith("/")}function Z(s=""){return(Dt(s)?s.slice(1):s)||"/"}const U="/.well-known/service",F="sw-update-reload-times",he="/lastUpdateMsgTimestamps",Ut=10,Lt=20*1e3;let ue=!1;function Pt(s,e){let t;return(...n)=>{clearTimeout(t),t=setTimeout(()=>{s.apply(this,n)},e)}}function Tt(s,e=50,t=5e3){return new Promise(n=>{const a=Date.now(),r=()=>{s()||Date.now()-a>=t?n():setTimeout(r,e)};r()})}self.addEventListener("message",s=>{s.data&&s.data.type==="CLIENT_UPDATE_READY"&&(console.log("Service Worker: client ready"),ue=!0)});async function Nt(s){const t=await(await caches.open(F)).match(`${he}-${s}`);if(t)try{const n=await t.text();return JSON.parse(n)}catch{return[]}return[]}async function vt(s,e){const t=await caches.open(F);if((await t.keys()).length>100){await caches.delete(F);return}const a=new Response(JSON.stringify(s));await t.put(`${he}-${e}`,a)}const Mt=Pt(async()=>{(await self.clients.matchAll()).forEach(e=>{e.postMessage({type:"SW_DOCUMENT_UPDATED"})})},100),ee=/updatedAt:\s*\d+,/g,At={cacheDidUpdate:async({request:s,oldResponse:e,newResponse:t})=>{if(e)try{let n=await e.clone().text(),a=await t.clone().text();if(s.url.includes("__blocklet__.js")&&(n=n.replace(ee,"updatedAt: ,"),a=a.replace(ee,"updatedAt: ,")),n!==a){const r=Date.now(),c=(await Nt(s.url)).filter(o=>r-o<Lt);if(c.length>=Ut){console.warn("[SW] update too frequent, skip:",s.url);return}await Tt(()=>ue),await vt(c,s.url),console.log("[SW] document version or session updated",s.url),Mt()}}catch(n){console.error("[SW] Error comparing document responses:",n)}}};Xe(([{"revision":null,"url":"assets/access-control-DeRZmmHW.js"},{"revision":null,"url":"assets/actions-DqoNrBDK.js"},{"revision":null,"url":"assets/AdapterDayjs-Dxut8SOC.js"},{"revision":null,"url":"assets/add-component-core-CB3Z_tio.js"},{"revision":null,"url":"assets/add-component-core-G0iZE90Q.css"},{"revision":null,"url":"assets/add-resource-CCTsswQz.js"},{"revision":null,"url":"assets/addon-CQMBWXij.js"},{"revision":null,"url":"assets/advanced-DwXInVBG.js"},{"revision":null,"url":"assets/aigne-DHc1tJm6.js"},{"revision":null,"url":"assets/api-Btn0Tp3W.js"},{"revision":null,"url":"assets/appearance-CvCbU39V.js"},{"revision":null,"url":"assets/ar-CCM7LUa7.js"},{"revision":null,"url":"assets/ar-DW15ct8A.js"},{"revision":null,"url":"assets/arrow-down.svg-DYdzNpAQ.js"},{"revision":null,"url":"assets/audit-logs-5mTYZKV1.js"},{"revision":null,"url":"assets/authorize-BfkXf6G0.js"},{"revision":null,"url":"assets/base-chart-C-Raz4Q-.js"},{"revision":null,"url":"assets/base32-BozpD0f9.js"},{"revision":null,"url":"assets/bind-account-BC8VQXvm.js"},{"revision":null,"url":"assets/branding-2dWKGu90.js"},{"revision":null,"url":"assets/branding-7XUcxGmI.js"},{"revision":null,"url":"assets/branding-DV5KIxNj.js"},{"revision":null,"url":"assets/bundle-avatar-Edt0e34F.js"},{"revision":null,"url":"assets/button-CubXLpb7.js"},{"revision":null,"url":"assets/click-to-copy-BoG45bWR.js"},{"revision":null,"url":"assets/cloneDeep-C6qewg0C.js"},{"revision":null,"url":"assets/collapse-BMy0GGFk.js"},{"revision":null,"url":"assets/Community-ClHGTbNM.js"},{"revision":null,"url":"assets/complete--uTpwi8F.js"},{"revision":null,"url":"assets/component-BVl40muz.js"},{"revision":null,"url":"assets/config-B6xx5Ruh.js"},{"revision":null,"url":"assets/config-D9zrtkNt.js"},{"revision":null,"url":"assets/config-dsw6u7QS.js"},{"revision":null,"url":"assets/config-navigation-DFyttFiT.js"},{"revision":null,"url":"assets/config-space-0Usu_97A.js"},{"revision":null,"url":"assets/confirm-DK89V84H.js"},{"revision":null,"url":"assets/connect-CfMU05qb.js"},{"revision":null,"url":"assets/connect-CxECECho.js"},{"revision":null,"url":"assets/connect-to-DRAd7i9J.js"},{"revision":null,"url":"assets/content-layout-oyz1EqNZ.js"},{"revision":null,"url":"assets/create-passport-svg-CUotftEJ.js"},{"revision":null,"url":"assets/createClass-D2cbgKRl.js"},{"revision":null,"url":"assets/dark-animation.json-DxDR1cr6.js"},{"revision":null,"url":"assets/dashboard-C9Qtd5rI.js"},{"revision":null,"url":"assets/de-DomrlJGv.js"},{"revision":null,"url":"assets/de-STCToRpb.js"},{"revision":null,"url":"assets/default-animation.json-Bwjw6UFO.js"},{"revision":null,"url":"assets/delete-confirm-Bwhg916Y.js"},{"revision":null,"url":"assets/did-address-6rS8aBAV.js"},{"revision":null,"url":"assets/domain-action-card-BZKoL_Hh.js"},{"revision":null,"url":"assets/domain-D55gMP_T.js"},{"revision":null,"url":"assets/domains-B68IENPq.js"},{"revision":null,"url":"assets/edit.svg-DycWG9v3.js"},{"revision":null,"url":"assets/email-lJEVkuhh.js"},{"revision":null,"url":"assets/empty-spinner-DYOzicuy.js"},{"revision":null,"url":"assets/engine-HllL7ndi.js"},{"revision":null,"url":"assets/es-BWRncAvl.js"},{"revision":null,"url":"assets/es-CrUw-8oc.js"},{"revision":null,"url":"assets/exchange-passport-O8PN-vEa.js"},{"revision":null,"url":"assets/form-HILzmtS4.js"},{"revision":null,"url":"assets/form-text-input-DVzTem6p.js"},{"revision":null,"url":"assets/form-wrapper-C8oo_Fdy.js"},{"revision":null,"url":"assets/fr-B6GuZu9m.js"},{"revision":null,"url":"assets/fr-DkEISw5U.js"},{"revision":null,"url":"assets/fuel-9ToDglZ4.js"},{"revision":null,"url":"assets/gen-access-key-RAY3R1wL.js"},{"revision":null,"url":"assets/gen-simple-access-key-CPyew41i.js"},{"revision":null,"url":"assets/get-safe-url-BJkYMXT3.js"},{"revision":null,"url":"assets/Google-BcAmgU5I.js"},{"revision":null,"url":"assets/hi-CNLsAFCp.js"},{"revision":null,"url":"assets/hi-Cw_VH7M3.js"},{"revision":null,"url":"assets/Holiday-D8fmDxt6.js"},{"revision":null,"url":"assets/home-C6yH6iXB.js"},{"revision":null,"url":"assets/id-CiNosIvh.js"},{"revision":null,"url":"assets/id-ErxRX4DU.js"},{"revision":null,"url":"assets/iframe-CHUN17ve.js"},{"revision":null,"url":"assets/index-B_LOh3-7.js"},{"revision":null,"url":"assets/index-B-XlfvkZ.js"},{"revision":null,"url":"assets/index-B2BVBFP1.js"},{"revision":null,"url":"assets/index-B5LvOF-F.css"},{"revision":null,"url":"assets/index-B6AIfiH6.js"},{"revision":null,"url":"assets/index-B8wgXU-M.js"},{"revision":null,"url":"assets/index-BAxVZet9.js"},{"revision":null,"url":"assets/index-BcSuA3_M.js"},{"revision":null,"url":"assets/index-Bdfvhhor.js"},{"revision":null,"url":"assets/index-BDgx7EkS.js"},{"revision":null,"url":"assets/index-BDVkvtSV.js"},{"revision":null,"url":"assets/index-Be2S1b8R.js"},{"revision":null,"url":"assets/index-BojVbZw0.js"},{"revision":null,"url":"assets/index-Bp_5Qnng.js"},{"revision":null,"url":"assets/index-BPy8_fa2.js"},{"revision":null,"url":"assets/index-BSauF6RI.js"},{"revision":null,"url":"assets/index-BYHO9_8F.js"},{"revision":null,"url":"assets/index-BymvP8Hj.js"},{"revision":null,"url":"assets/index-C5W1sNxF.js"},{"revision":null,"url":"assets/index-CgdhTqWX.js"},{"revision":null,"url":"assets/index-ChdnEUnd.js"},{"revision":null,"url":"assets/index-CHVQCEyp.js"},{"revision":null,"url":"assets/index-CktHtJue.js"},{"revision":null,"url":"assets/index-Crh53cke.js"},{"revision":null,"url":"assets/index-CRtYD69s.js"},{"revision":null,"url":"assets/index-CsYbXfj1.js"},{"revision":null,"url":"assets/index-CyALrDx6.js"},{"revision":null,"url":"assets/index-D5TNmV3K.js"},{"revision":null,"url":"assets/index-DBs9Ljax.js"},{"revision":null,"url":"assets/index-DcnBbXEh.js"},{"revision":null,"url":"assets/index-De-Vgsb6.js"},{"revision":null,"url":"assets/index-Dh2Rf2Hx.js"},{"revision":null,"url":"assets/index-DIx7BUTi.js"},{"revision":null,"url":"assets/index-DrVXX4fX.css"},{"revision":null,"url":"assets/index-DRYJ0xIl.js"},{"revision":null,"url":"assets/index-e_3-iMyP.js"},{"revision":null,"url":"assets/index-FbQLWg2H.js"},{"revision":null,"url":"assets/index-gnjjKJuC.css"},{"revision":null,"url":"assets/index-NomqB6Iy.js"},{"revision":null,"url":"assets/index-qu80tqs0.js"},{"revision":null,"url":"assets/index-R_6vOn5c.js"},{"revision":null,"url":"assets/index-yi6WvhoN.js"},{"revision":null,"url":"assets/index.esm-JPZAjt0x.js"},{"revision":null,"url":"assets/invitation-BZCAm4go.js"},{"revision":null,"url":"assets/invitations-DOKvWh-D.js"},{"revision":null,"url":"assets/invite-_7I-iD9F.js"},{"revision":null,"url":"assets/issue-passport-4Pjg5_J2.js"},{"revision":null,"url":"assets/isURL-shHw2FLx.js"},{"revision":null,"url":"assets/item-DWQamqmG.js"},{"revision":null,"url":"assets/ja-CvssCilG.js"},{"revision":null,"url":"assets/ja-D5EfJGvg.js"},{"revision":null,"url":"assets/keyboard-arrow-down-rounded-8U0_i9QO.js"},{"revision":null,"url":"assets/ko-CwfYSSYs.js"},{"revision":null,"url":"assets/ko-DIYdQvvz.js"},{"revision":null,"url":"assets/landing-page-DHzhfnIo.js"},{"revision":null,"url":"assets/launch-result-message-DWeUg9rM.js"},{"revision":null,"url":"assets/layout-1j-FirqT.js"},{"revision":null,"url":"assets/list-82I80nT4.js"},{"revision":null,"url":"assets/list-GFQ23C96.js"},{"revision":null,"url":"assets/list-header-BE2kzda_.js"},{"revision":null,"url":"assets/localization-D_sXjdOF.js"},{"revision":null,"url":"assets/lock.svg-COUP8tyO.js"},{"revision":null,"url":"assets/log-DSlLPNrL.js"},{"revision":null,"url":"assets/logger-CRs1-njY.js"},{"revision":null,"url":"assets/login-BCmON-gb.js"},{"revision":null,"url":"assets/login-oauth-callback-BJoNAJDQ.js"},{"revision":null,"url":"assets/logo-uploader-Blzn_BDN.js"},{"revision":null,"url":"assets/lost-passport-BMVsDg1D.js"},{"revision":null,"url":"assets/lottie-error-DeJ4jU66.js"},{"revision":null,"url":"assets/lottie-loading-Npqo86wA.js"},{"revision":null,"url":"assets/lottie-react.esm-M5fKy3fg.js"},{"revision":null,"url":"assets/lottie-web-4koyQiv_.js"},{"revision":null,"url":"assets/lottie-welcome-oyMgXGo-.js"},{"revision":null,"url":"assets/Meeting-CF7NtQe5.js"},{"revision":null,"url":"assets/observability-Zow0Sv-X.js"},{"revision":null,"url":"assets/OffSick-CWwGwWYY.js"},{"revision":null,"url":"assets/omit-hhiOJGRf.js"},{"revision":null,"url":"assets/open-window-3fNVG3jy.js"},{"revision":null,"url":"assets/over-due-invoice-payment-MS2Z5Q7I.js"},{"revision":null,"url":"assets/overview-CUrNqNDE.js"},{"revision":null,"url":"assets/page-header-DCvzRay5.js"},{"revision":null,"url":"assets/passport-BmUaoAYN.js"},{"revision":null,"url":"assets/passport-item-C75Jm1_H.js"},{"revision":null,"url":"assets/permission-mw1ZNsp2.js"},{"revision":null,"url":"assets/playground-CAOOFQT1.js"},{"revision":null,"url":"assets/preferences-nc4oRkZr.js"},{"revision":null,"url":"assets/profile-embed-COBooKOy.js"},{"revision":null,"url":"assets/pt-aIOBgpHE.js"},{"revision":null,"url":"assets/pt-DiKRyIZy.js"},{"revision":null,"url":"assets/publish-resource-CUhJuUtt.js"},{"revision":null,"url":"assets/question-mark-circle.svg-B4stD6SS.js"},{"revision":null,"url":"assets/raf-schd.esm-CHNehTG3.js"},{"revision":null,"url":"assets/react-beautiful-dnd.esm-CArJPjh2.js"},{"revision":null,"url":"assets/react-stripe.esm-Dc9snvfb.js"},{"revision":null,"url":"assets/required-BGaDOGrj.js"},{"revision":null,"url":"assets/revoke.svg-CmffMlcP.js"},{"revision":null,"url":"assets/ru-5wNmeEUO.js"},{"revision":null,"url":"assets/ru-Bt8-v101.js"},{"revision":null,"url":"assets/runtime-wYAsV832.js"},{"revision":null,"url":"assets/sanitize-BEqBHa8a.js"},{"revision":null,"url":"assets/sdk-oOD0ugLK.js"},{"revision":null,"url":"assets/search-4YYphs0l.js"},{"revision":null,"url":"assets/section-C75bzkkL.js"},{"revision":null,"url":"assets/security--siQ5O1l.js"},{"revision":null,"url":"assets/server-logo-notext.svg-CKQB0tIp.js"},{"revision":null,"url":"assets/session-zaFSgetw.js"},{"revision":null,"url":"assets/setup-2wB1RpQx.js"},{"revision":null,"url":"assets/shorten-label-RqvHqcC3.js"},{"revision":null,"url":"assets/simple-select-DhYZPYiw.js"},{"revision":null,"url":"assets/spaces-D5ZbqByE.js"},{"revision":null,"url":"assets/start-Bj3IUKjU.js"},{"revision":null,"url":"assets/starting-progress-QpbqpMn4.js"},{"revision":null,"url":"assets/status-DdYVVFLE.js"},{"revision":null,"url":"assets/step-actions-DsK7No59.js"},{"revision":null,"url":"assets/stripe.esm-BCCu7gPj.js"},{"revision":null,"url":"assets/studio-B_8_8ekc.js"},{"revision":null,"url":"assets/switch-control-DFAD8EW8.js"},{"revision":null,"url":"assets/table-tips-l51OFH7y.js"},{"revision":null,"url":"assets/team-BLHzIk1L.js"},{"revision":null,"url":"assets/th-B6ebKspD.js"},{"revision":null,"url":"assets/th-QYkziTlm.js"},{"revision":null,"url":"assets/traffic-BVXNh0NF.js"},{"revision":null,"url":"assets/transfer-B8aeHYnn.js"},{"revision":null,"url":"assets/ua-parser-DP5omx3I.js"},{"revision":null,"url":"assets/unsubscribe-Cfv9XkeO.js"},{"revision":null,"url":"assets/use-app-logo-B8kguOVt.js"},{"revision":null,"url":"assets/use-mobile-DCNBsOlH.js"},{"revision":null,"url":"assets/use-mobile-maRlSUwU.js"},{"revision":null,"url":"assets/use-passport-id-B-b-_oYF.js"},{"revision":null,"url":"assets/use-server-logo-n_aaKVoZ.js"},{"revision":null,"url":"assets/use-window-close-B5H67t66.js"},{"revision":null,"url":"assets/useAsync-BcVLpt2E.js"},{"revision":null,"url":"assets/useAsync-cZ_FPf9k.js"},{"revision":null,"url":"assets/useAsyncRetry-DwwEjrjs.js"},{"revision":null,"url":"assets/useLocalStorage-B6EKILzf.js"},{"revision":null,"url":"assets/user-center-BK3PLY7H.js"},{"revision":null,"url":"assets/user-follower-ClQHH3Bs.js"},{"revision":null,"url":"assets/useSetState-DFuQZPPV.js"},{"revision":null,"url":"assets/util-C0VnVv6a.js"},{"revision":null,"url":"assets/util-Dgt9KiDQ.js"},{"revision":null,"url":"assets/vendor-arcblock-BwXbOk2K.js"},{"revision":null,"url":"assets/vendor-hooks-CjESGRlR.js"},{"revision":null,"url":"assets/vendor-mui-core-CnXrAOs3.js"},{"revision":null,"url":"assets/vendor-mui-x-bJ5idfMH.js"},{"revision":null,"url":"assets/vendor-react-Dvs43sk9.js"},{"revision":null,"url":"assets/vendor-utils-cJEl_UEd.js"},{"revision":null,"url":"assets/vendor-ux-BzbOqBel.js"},{"revision":null,"url":"assets/vendor-ux-DYcPPYq2.css"},{"revision":null,"url":"assets/vi-BIkODa3n.js"},{"revision":null,"url":"assets/vi-PpVWvm1I.js"},{"revision":null,"url":"assets/wait-connect-DrsxOKar.js"},{"revision":null,"url":"assets/wizard-CjSRXNxn.js"},{"revision":null,"url":"assets/wizard-components-DDoE7ozK.js"},{"revision":null,"url":"assets/WorkingRemotely-CD8ntsiV.js"},{"revision":null,"url":"assets/wrap-locale-CcKDlll4.js"},{"revision":null,"url":"assets/zh-Coo9u8yK.js"},{"revision":null,"url":"assets/zh-CPf0Aw2x.js"},{"revision":null,"url":"assets/zh-Daif36Hm.js"},{"revision":null,"url":"assets/zh-tw-C3Px30Ps.js"},{"revision":null,"url":"assets/zh-tw-CYPf8U5U.js"},{"revision":"f847f5993f436dc07e54a82df26161a0","url":"index.html"},{"revision":"629a14a7e3397a134f5a30b5dc735183","url":"registerSW.js"},{"revision":"07a287e43ae8e959a20d6b367a581667","url":"router-template-styles/styles.css"},{"revision":"8f9b8997bf5804519b8e9f8dd1bb6ef9","url":"share/shared-bridge.html"},{"revision":"3c1549cff96a2d2baec44397663c083e","url":"share/shared-service-worker.js"},{"revision":"19d4c6a99cb8ed11e68209a612e7ec44","url":"share/workbox-v7.3.0/workbox-background-sync.prod.js"},{"revision":"d9d631014689e2b4b0e343c129671749","url":"share/workbox-v7.3.0/workbox-broadcast-update.prod.js"},{"revision":"bdb39ceb7380dcb1483c543e8856242b","url":"share/workbox-v7.3.0/workbox-cacheable-response.prod.js"},{"revision":"b84dd900eb18e8bc842666bbb740604e","url":"share/workbox-v7.3.0/workbox-core.prod.js"},{"revision":"c582a61c037234d8283eea0b97693b1b","url":"share/workbox-v7.3.0/workbox-expiration.prod.js"},{"revision":"866ba7d03bd871fa990976e4db312ab3","url":"share/workbox-v7.3.0/workbox-navigation-preload.prod.js"},{"revision":"0c55bb581ea7ce5ebfac1ce95cdda21f","url":"share/workbox-v7.3.0/workbox-offline-ga.prod.js"},{"revision":"770d183cf1f189a1ceb11ba8b5d808fa","url":"share/workbox-v7.3.0/workbox-precaching.prod.js"},{"revision":"295decbe1eb3b073a2a8d67cfbdf5692","url":"share/workbox-v7.3.0/workbox-range-requests.prod.js"},{"revision":"0bcb90677f3508ebc8a3571d14194478","url":"share/workbox-v7.3.0/workbox-recipes.prod.js"},{"revision":"4af96b70b2d20b041e2edd7ef1a8ef27","url":"share/workbox-v7.3.0/workbox-routing.prod.js"},{"revision":"c78c21b4058a1134ad3e12286c57cb2f","url":"share/workbox-v7.3.0/workbox-strategies.prod.js"},{"revision":"7eeb2d820d409221e076d31951fdcf79","url":"share/workbox-v7.3.0/workbox-streams.prod.js"},{"revision":"aa7368887577b9719a46b585d5dcc7a5","url":"share/workbox-v7.3.0/workbox-sw.js"},{"revision":"e768668db4eeefde11b58542900ab2ad","url":"share/workbox-v7.3.0/workbox-window.prod.umd.js"},{"revision":"8d6f3db88a274aef54e88b09ee2cefd5","url":"manifest.webmanifest"}]||[]).filter(s=>s.url!=="/"&&!s.url.includes("index.html")));xe();self.addEventListener("activate",()=>{console.log("Service Worker activated")});self.addEventListener("install",s=>{console.log("Service Worker installed"),s.waitUntil(self.skipWaiting())});const fe=s=>!!(s.method!=="GET"||s.url.includes("/api")||s.url.includes("__meta__.js")||s.url.includes("__blocklet__.js"));M(({request:s})=>fe(s)?!1:s.url.includes("/static/"),new oe({cacheName:`static-${self.registration.scope}`,plugins:[new Rt({maxEntries:200})]}));M(({request:s,url:e})=>self.blocklet?.canCache?.({url:e})?["image","font","style","script"].includes(s.destination):!1,new oe({cacheName:`static-resources-${self.registration.scope}`}));M(({request:s})=>fe(s)?!1:s.url.includes("/images/")||s.url.includes("/router/-template-styles/"),new le({cacheName:`StaleWhileRevalidate-${self.registration.scope}`}));const Ot={cacheKeyWillBeUsed({request:s}){const e=new URL(s.url);return s.destination==="document"&&e.pathname.startsWith(`${U}/admin`)?(e.pathname=`${U}/admin`,e.search="",e.toString()):s.url}},w={};M(({request:s})=>{const e=new URL(s.url);return s.destination==="document"&&e.pathname.startsWith(`${U}/admin`)?(Object.keys(w).forEach(t=>delete w[t]),!0):!w.env&&s.url.includes(`${Z(U)}/api/env`)?(w.env=!0,!0):!w.session&&s.url.includes(`${Z(U)}/api/did/session`)?(w.session=!0,!0):!w.blocklet&&s.url.endsWith("__blocklet__.js")?(w.blocklet=!0,!0):!1},new le({cacheName:`documents-${self.registration.scope}`,plugins:[At,Ot]}));
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"publishConfig": {
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
|
-
"version": "1.17.0-beta-
|
|
6
|
+
"version": "1.17.0-beta-20251104-112713-e947b159",
|
|
7
7
|
"description": "Provide unified services for every blocklet",
|
|
8
8
|
"main": "api/index.js",
|
|
9
9
|
"files": [
|
|
@@ -32,17 +32,17 @@
|
|
|
32
32
|
"author": "wangshijun <wangshijun2010@gmail.com> (http://github.com/wangshijun)",
|
|
33
33
|
"license": "Apache-2.0",
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@abtnode/analytics": "1.17.0-beta-
|
|
36
|
-
"@abtnode/auth": "1.17.0-beta-
|
|
37
|
-
"@abtnode/connect-storage": "1.17.0-beta-
|
|
38
|
-
"@abtnode/constant": "1.17.0-beta-
|
|
39
|
-
"@abtnode/core": "1.17.0-beta-
|
|
40
|
-
"@abtnode/cron": "1.17.0-beta-
|
|
41
|
-
"@abtnode/db-cache": "1.17.0-beta-
|
|
42
|
-
"@abtnode/logger": "1.17.0-beta-
|
|
43
|
-
"@abtnode/models": "1.17.0-beta-
|
|
44
|
-
"@abtnode/router-templates": "1.17.0-beta-
|
|
45
|
-
"@abtnode/util": "1.17.0-beta-
|
|
35
|
+
"@abtnode/analytics": "1.17.0-beta-20251104-112713-e947b159",
|
|
36
|
+
"@abtnode/auth": "1.17.0-beta-20251104-112713-e947b159",
|
|
37
|
+
"@abtnode/connect-storage": "1.17.0-beta-20251104-112713-e947b159",
|
|
38
|
+
"@abtnode/constant": "1.17.0-beta-20251104-112713-e947b159",
|
|
39
|
+
"@abtnode/core": "1.17.0-beta-20251104-112713-e947b159",
|
|
40
|
+
"@abtnode/cron": "1.17.0-beta-20251104-112713-e947b159",
|
|
41
|
+
"@abtnode/db-cache": "1.17.0-beta-20251104-112713-e947b159",
|
|
42
|
+
"@abtnode/logger": "1.17.0-beta-20251104-112713-e947b159",
|
|
43
|
+
"@abtnode/models": "1.17.0-beta-20251104-112713-e947b159",
|
|
44
|
+
"@abtnode/router-templates": "1.17.0-beta-20251104-112713-e947b159",
|
|
45
|
+
"@abtnode/util": "1.17.0-beta-20251104-112713-e947b159",
|
|
46
46
|
"@arcblock/did": "^1.27.1",
|
|
47
47
|
"@arcblock/did-connect-js": "^1.27.1",
|
|
48
48
|
"@arcblock/did-ext": "^1.27.1",
|
|
@@ -52,18 +52,18 @@
|
|
|
52
52
|
"@arcblock/jwt": "^1.27.1",
|
|
53
53
|
"@arcblock/validator": "^1.27.1",
|
|
54
54
|
"@arcblock/ws": "^1.27.1",
|
|
55
|
-
"@blocklet/constant": "1.17.0-beta-
|
|
55
|
+
"@blocklet/constant": "1.17.0-beta-20251104-112713-e947b159",
|
|
56
56
|
"@blocklet/dbhub": "^0.2.9",
|
|
57
|
-
"@blocklet/env": "1.17.0-beta-
|
|
57
|
+
"@blocklet/env": "1.17.0-beta-20251104-112713-e947b159",
|
|
58
58
|
"@blocklet/error": "^0.3.0",
|
|
59
59
|
"@blocklet/form-builder": "^0.1.12",
|
|
60
60
|
"@blocklet/form-collector": "^0.1.8",
|
|
61
|
-
"@blocklet/images": "1.17.0-beta-
|
|
62
|
-
"@blocklet/js-sdk": "1.17.0-beta-
|
|
63
|
-
"@blocklet/meta": "1.17.0-beta-
|
|
64
|
-
"@blocklet/rate-limit": "1.17.0-beta-
|
|
65
|
-
"@blocklet/sdk": "1.17.0-beta-
|
|
66
|
-
"@blocklet/server-js": "1.17.0-beta-
|
|
61
|
+
"@blocklet/images": "1.17.0-beta-20251104-112713-e947b159",
|
|
62
|
+
"@blocklet/js-sdk": "1.17.0-beta-20251104-112713-e947b159",
|
|
63
|
+
"@blocklet/meta": "1.17.0-beta-20251104-112713-e947b159",
|
|
64
|
+
"@blocklet/rate-limit": "1.17.0-beta-20251104-112713-e947b159",
|
|
65
|
+
"@blocklet/sdk": "1.17.0-beta-20251104-112713-e947b159",
|
|
66
|
+
"@blocklet/server-js": "1.17.0-beta-20251104-112713-e947b159",
|
|
67
67
|
"@blocklet/theme": "^3.1.54",
|
|
68
68
|
"@blocklet/theme-builder": "0.4.8",
|
|
69
69
|
"@blocklet/uploader-server": "^0.3.3",
|
|
@@ -123,7 +123,7 @@
|
|
|
123
123
|
"whatwg-url": "14.0.0"
|
|
124
124
|
},
|
|
125
125
|
"devDependencies": {
|
|
126
|
-
"@abtnode/ux": "1.17.0-beta-
|
|
126
|
+
"@abtnode/ux": "1.17.0-beta-20251104-112713-e947b159",
|
|
127
127
|
"@arcblock/bridge": "^3.1.54",
|
|
128
128
|
"@arcblock/did-connect-react": "^3.1.54",
|
|
129
129
|
"@arcblock/icons": "^3.1.54",
|
|
@@ -133,7 +133,7 @@
|
|
|
133
133
|
"@blocklet/did-space-react": "^1.2.0",
|
|
134
134
|
"@blocklet/launcher-layout": "^3.1.54",
|
|
135
135
|
"@blocklet/payment-react": "^1.22.2",
|
|
136
|
-
"@blocklet/tracker": "1.17.0-beta-
|
|
136
|
+
"@blocklet/tracker": "1.17.0-beta-20251104-112713-e947b159",
|
|
137
137
|
"@blocklet/ui-react": "^3.1.54",
|
|
138
138
|
"@blocklet/uploader": "^0.3.3",
|
|
139
139
|
"@emotion/react": "^11.14.0",
|
|
@@ -213,5 +213,5 @@
|
|
|
213
213
|
"url": "https://github.com/ArcBlock/blocklet-server/issues",
|
|
214
214
|
"email": "shijun@arcblock.io"
|
|
215
215
|
},
|
|
216
|
-
"gitHead": "
|
|
216
|
+
"gitHead": "66c9180952f1dab415ff16b3ccd8eafd61baabf9"
|
|
217
217
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a5 as e}from"./index-K0yqveeg.js";var a=e();export{a as e};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{_ as r}from"./vendor-ux-BzbOqBel.js";import{V as _,W as e}from"./index-K0yqveeg.js";const m={en:_(e),ar:()=>r(()=>import("./ar-BQm9lQ4M.js"),[],import.meta.url).then(t=>_(t.default)),de:()=>r(()=>import("./de-D0uPENSq.js"),[],import.meta.url).then(t=>_(t.default)),es:()=>r(()=>import("./es-Dh4_UfCu.js"),[],import.meta.url).then(t=>_(t.default)),fr:()=>r(()=>import("./fr-CzZWQkiT.js"),[],import.meta.url).then(t=>_(t.default)),hi:()=>r(()=>import("./hi-Do9VCuRi.js"),[],import.meta.url).then(t=>_(t.default)),id:()=>r(()=>import("./id-Dhhrveu9.js"),[],import.meta.url).then(t=>_(t.default)),ja:()=>r(()=>import("./ja-B70UYq5X.js"),[],import.meta.url).then(t=>_(t.default)),ko:()=>r(()=>import("./ko-C7TZwmXC.js"),[],import.meta.url).then(t=>_(t.default)),pt:()=>r(()=>import("./pt-DObJ_ADK.js"),[],import.meta.url).then(t=>_(t.default)),ru:()=>r(()=>import("./ru-nYDmEUmY.js"),[],import.meta.url).then(t=>_(t.default)),th:()=>r(()=>import("./th-DMcUw_9_.js"),[],import.meta.url).then(t=>_(t.default)),vi:()=>r(()=>import("./vi-B73oWQBC.js"),[],import.meta.url).then(t=>_(t.default)),"zh-TW":()=>r(()=>import("./zh-tw-M_0Y4wmR.js"),[],import.meta.url).then(t=>_(t.default)),zh:()=>r(()=>import("./zh-DCABA61W.js"),[],import.meta.url).then(t=>_(t.default))};export{m as t};
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import{V as ee,H as O,U as X,a7 as Ee,a8 as Ue,a9 as We,aa as Ve,p as K,J as je,b as ke,q as Me,n as z,ab as _e,h as Ne,j as $e,k as Ie}from"./vendor-ux-BzbOqBel.js";import{b as u,a as H,g as ie,c as He}from"./vendor-hooks-CjESGRlR.js";import{r as D}from"./vendor-react-Dvs43sk9.js";import{j as e,ak as a,b6 as R,am as ce,y as B,z as F,Q as V,T as Y,I as le,a3 as oe,W as E,b1 as W,bb as qe,cb as Le,cE as Je,at as Fe,D as ye,ah as Be,cF as Oe,a6 as be,cG as Ze,a$ as Ke}from"./vendor-mui-core-CnXrAOs3.js";import{_ as N,ac as M,Y as G,bd as se,c as ve,b8 as Ge,aw as Ye,Z as Qe}from"./index-K0yqveeg.js";import{A as Z,Q as Xe,b as de,Z as et,n as Q,$ as tt,C as nt,a as st}from"./vendor-utils-cJEl_UEd.js";import{u as te,C as k,a as De}from"./index.esm-JPZAjt0x.js";import{S as ae}from"./switch-control-DFAD8EW8.js";import{S as y}from"./section-C75bzkkL.js";import{d as ot}from"./keyboard-arrow-down-rounded-8U0_i9QO.js";import{u as it}from"./index-CRtYD69s.js";import{v as at}from"./index-DcnBbXEh.js";import{r as rt}from"./base32-BozpD0f9.js";import{u as lt}from"./use-mobile-maRlSUwU.js";import"./lottie-web-4koyQiv_.js";import"./vendor-arcblock-BwXbOk2K.js";import"./required-BGaDOGrj.js";const we={width:24,height:24,body:'<path fill="currentColor" d="M5 4v16V4v5v-5Zm3 10h2.675q.275-.575.638-1.075t.812-.925H8q-.425 0-.713.288T7 13q0 .425.288.713T8 14Zm0 4h2.075Q10 17.5 10 17t.075-1H8q-.425 0-.713.288T7 17q0 .425.288.713T8 18Zm-3 4q-.825 0-1.413-.588T3 20V4q0-.825.588-1.413T5 2h7.175q.4 0 .763.15t.637.425l4.85 4.85q.275.275.425.638t.15.762V10.3q-.475-.15-.975-.225T17 10V9h-4q-.425 0-.713-.288T12 8V4H5v16h5.675q.275.575.638 1.075t.812.925H5Zm12-10q2.075 0 3.538 1.463T22 17q0 2.075-1.463 3.538T17 22q-2.075 0-3.538-1.463T12 17q0-2.075 1.463-3.538T17 12Zm0 8q.275 0 .463-.188t.187-.462q0-.275-.187-.463T17 18.7q-.275 0-.463.188t-.187.462q0 .275.188.463T17 20Zm0-6q-.475 0-.875.238t-.65.637q-.1.15-.025.313t.25.237q.15.075.3 0t.275-.2q.125-.175.313-.275t.412-.1q.325 0 .563.213t.237.537q0 .275-.15.463t-.35.387q-.15.15-.313.3t-.287.35q-.075.15-.113.313t-.037.337q0 .225.125.413t.325.187q.2 0 .325-.15t.125-.35q0-.275.15-.488t.35-.412q.3-.275.525-.613t.225-.737q0-.675-.5-1.138T17 14Z"/>'},ue={enabled:!1,domain:"",clientId:"",clientSecret:""};function ct(){const{api:b}=N(),{blocklet:c}=M(),{t,locale:n}=ee(),o=c?.meta?.did,r=Object.assign({...ue},c?.settings?.oauth?.auth0||{}),{handleSubmit:x,control:i,formState:p,watch:d,reset:f}=te({defaultValues:Z(r,Object.keys(ue))}),l=d("enabled"),j=u(async s=>{try{const{blocklet:I}=await b.configOAuth({input:{did:o,oauth:JSON.stringify({auth0:s})}}),L=Object.assign({...ue},I?.settings?.oauth?.auth0||{});f(L),O.success(t("oauth.saveSuccess"))}catch(I){O.error(I.message||t("oauth.saveFailed"))}}),v=u(s=>s?.trim()?!0:t("oauth.auth0.domainDescription")),S=u(s=>s?.trim()?!0:t("oauth.auth0.clientIdDescription")),g=u(s=>s?.trim()?!0:t("oauth.auth0.clientSecretDescription")),w=u(()=>!0),h=H(()=>n==="zh"?"https://www.arcblock.io/blog/docs/did-connect/zh/oauth-config-auth0":"https://www.arcblock.io/blog/docs/did-connect/en/oauth-config-auth0",[n]);return e.jsx(a,{children:e.jsxs("form",{onSubmit:x(j),disabled:!0,children:[e.jsx(y,{title:e.jsxs(a,{sx:{display:"flex",alignItems:"center",gap:1},children:[e.jsx("span",{children:t("oauth.auth0.enable")}),e.jsx(ce,{title:t("oauth.viewDocument"),children:e.jsx(a,{component:"a",sx:{display:"inline-block",color:"inherit",fontSize:0,lineHeight:1},href:h,target:"_blank",rel:"noreferrer",children:e.jsx(X,{icon:we,fontSize:20})})})]}),mb:2.5,children:e.jsx(k,{name:"enabled",control:i,render:({field:s})=>e.jsx(R,{control:e.jsx(ae,{sx:{ml:1},checked:s.value,...s})})})}),e.jsx(y,{title:t("oauth.auth0.domain"),children:e.jsx(k,{name:"domain",control:i,rules:{validate:l?v:w},render:({field:s})=>e.jsx(B,{fullWidth:!0,children:e.jsx(F,{...s,size:"small",label:t("oauth.auth0.domain"),error:!!p.errors[s.name],helperText:p.errors[s.name]?.message||" ",disabled:!l})})})}),e.jsx(y,{title:t("oauth.auth0.clientId"),children:e.jsx(k,{name:"clientId",control:i,rules:{validate:l?S:w},render:({field:s})=>e.jsx(B,{fullWidth:!0,children:e.jsx(F,{...s,size:"small",label:t("oauth.auth0.clientId"),error:!!p.errors[s.name],helperText:p.errors[s.name]?.message||" ",disabled:!l})})})}),e.jsx(y,{title:t("oauth.auth0.clientSecret"),children:e.jsx(k,{name:"clientSecret",control:i,rules:{validate:l?g:w},render:({field:s})=>e.jsx(B,{fullWidth:!0,children:e.jsx(F,{...s,size:"small",type:"password",label:t("oauth.auth0.clientSecret"),error:!!p.errors[s.name],helperText:p.errors[s.name]?.message||" ",disabled:!l})})})}),e.jsx(V,{type:"submit",variant:"contained",onSubmit:x(j),disabled:!p.isDirty,children:t("oauth.save")})]})})}const he={enabled:!1,clientId:"",clientSecret:""};function dt(){const{api:b}=N(),{blocklet:c}=M(),{t,locale:n}=ee(),o=c?.meta?.did,r=Object.assign({...he},c?.settings?.oauth?.github||{}),{handleSubmit:x,control:i,formState:p,watch:d,reset:f}=te({defaultValues:Z(r,Object.keys(he))}),l=d("enabled"),j=u(async h=>{try{const{blocklet:s}=await b.configOAuth({input:{did:o,oauth:JSON.stringify({github:h})}}),I=Object.assign({...he},s?.settings?.oauth?.github||{});f(I),O.success(t("oauth.saveSuccess"))}catch(s){O.error(s.message||t("oauth.saveFailed"))}}),v=u(h=>h?.trim()?!0:t("oauth.github.clientIdDescription")),S=u(h=>h?.trim()?!0:t("oauth.github.clientSecretDescription")),g=u(()=>!0),w=H(()=>n==="zh"?"https://www.arcblock.io/blog/docs/did-connect/zh/oauth-config-github":"https://www.arcblock.io/blog/docs/did-connect/en/oauth-config-github",[n]);return e.jsx(a,{children:e.jsxs("form",{onSubmit:x(j),disabled:!0,children:[e.jsx(y,{title:e.jsxs(a,{sx:{display:"flex",alignItems:"center",gap:1},children:[e.jsx("span",{children:t("oauth.github.enable")}),e.jsx(ce,{title:t("oauth.viewDocument"),children:e.jsx(a,{component:"a",sx:{display:"inline-block",color:"inherit",fontSize:0,lineHeight:1},href:w,target:"_blank",rel:"noreferrer",children:e.jsx(X,{icon:we,fontSize:20})})})]}),mb:2.5,sx:{"& .section-content":{alignItems:"center"}},children:e.jsx(k,{name:"enabled",control:i,sx:{alignItems:"center"},render:({field:h})=>e.jsx(R,{control:e.jsx(ae,{sx:{ml:1},size:"small",checked:h.value,...h})})})}),e.jsx(y,{title:t("oauth.github.clientId"),children:e.jsx(k,{name:"clientId",control:i,rules:{validate:l?v:g},render:({field:h})=>e.jsx(B,{fullWidth:!0,children:e.jsx(F,{...h,size:"small",label:t("oauth.github.clientId"),error:!!p.errors[h.name],helperText:p.errors[h.name]?.message||" ",disabled:!l})})})}),e.jsx(y,{title:t("oauth.github.clientSecret"),children:e.jsx(k,{name:"clientSecret",control:i,rules:{validate:l?S:g},render:({field:h})=>e.jsx(B,{fullWidth:!0,children:e.jsx(F,{...h,size:"small",type:"password",label:t("oauth.github.clientSecret"),error:!!p.errors[h.name],helperText:p.errors[h.name]?.message||" ",disabled:!l})})})}),e.jsx(V,{type:"submit",variant:"contained",onSubmit:x(j),disabled:!p.isDirty,children:t("oauth.save")})]})})}const me={enabled:!1,clientId:"",clientSecret:""};function ut(){const{api:b}=N(),{blocklet:c}=M(),{t,locale:n}=ee(),o=c?.meta?.did,r=Object.assign({...me},c?.settings?.oauth?.google||{}),{handleSubmit:x,control:i,formState:p,watch:d,reset:f}=te({defaultValues:Z(r,Object.keys(me))}),l=d("enabled"),j=u(async h=>{try{const{blocklet:s}=await b.configOAuth({input:{did:o,oauth:JSON.stringify({google:h})}}),I=Object.assign({...me},s?.settings?.oauth?.google||{});f(I),O.success(t("oauth.saveSuccess"))}catch(s){O.error(s.message||t("oauth.saveFailed"))}}),v=u(h=>h?.trim()?!0:t("oauth.google.clientIdDescription")),S=u(h=>h?.trim()?!0:t("oauth.google.clientSecretDescription")),g=u(()=>!0),w=H(()=>n==="zh"?"https://www.arcblock.io/blog/docs/did-connect/zh/oauth-config-google":"https://www.arcblock.io/blog/docs/did-connect/en/oauth-config-google",[n]);return e.jsx(a,{children:e.jsxs("form",{onSubmit:x(j),disabled:!0,children:[e.jsx(y,{title:e.jsxs(a,{sx:{display:"flex",alignItems:"center",gap:1},children:[e.jsx("span",{children:t("oauth.google.enable")}),e.jsx(ce,{title:t("oauth.viewDocument"),children:e.jsx(a,{component:"a",sx:{display:"inline-block",color:"inherit",fontSize:0,lineHeight:1},href:w,target:"_blank",rel:"noreferrer",children:e.jsx(X,{icon:we,fontSize:20})})})]}),mb:2.5,children:e.jsx(k,{name:"enabled",control:i,render:({field:h})=>e.jsx(R,{control:e.jsx(ae,{sx:{ml:1},checked:h.value,...h})})})}),e.jsx(y,{title:t("oauth.google.clientId"),children:e.jsx(k,{name:"clientId",control:i,rules:{validate:l?v:g},render:({field:h})=>e.jsx(B,{fullWidth:!0,children:e.jsx(F,{...h,size:"small",label:t("oauth.google.clientId"),error:!!p.errors[h.name],helperText:p.errors[h.name]?.message||" ",disabled:!l})})})}),e.jsx(y,{title:t("oauth.google.clientSecret"),children:e.jsx(k,{name:"clientSecret",control:i,rules:{validate:l?S:g},render:({field:h})=>e.jsx(B,{fullWidth:!0,children:e.jsx(F,{...h,size:"small",type:"password",label:t("oauth.google.clientSecret"),error:!!p.errors[h.name],helperText:p.errors[h.name]?.message||" ",disabled:!l})})})}),e.jsx(V,{type:"submit",variant:"contained",onSubmit:x(j),disabled:!p.isDirty,children:t("oauth.save")})]})})}const pe={enabled:!1,teamId:"",serviceId:"",keyId:"",authKey:"",bundleId:""};function ht(){const{api:b}=N(),{blocklet:c}=M(),{t}=ee(),n=c?.meta?.did,o=Object.assign({...pe},c?.settings?.oauth?.apple||{}),{handleSubmit:r,control:x,formState:i,watch:p,reset:d}=te({defaultValues:Z(o,Object.keys(pe))}),f=p("enabled"),l=u(async s=>{try{const{blocklet:I}=await b.configOAuth({input:{did:n,oauth:JSON.stringify({apple:s})}}),L=Object.assign({...pe},I?.settings?.oauth?.apple||{});d(L),O.success(t("oauth.saveSuccess"))}catch(I){O.error(I.message||t("oauth.saveFailed"))}}),j=u(s=>s?.trim()?!0:t("oauth.apple.teamIdDescription")),v=u(s=>s?.trim()?!0:t("oauth.apple.serviceIdDescription")),S=u(s=>s?.trim()?!0:t("oauth.apple.keyIdDescription")),g=u(s=>s?.trim()?!0:t("oauth.apple.authKeyDescription")),w=u(s=>s?.trim()?!0:t("oauth.apple.bundleIdDescription")),h=u(()=>!0);return e.jsx(a,{children:e.jsxs("form",{onSubmit:r(l),disabled:!0,children:[e.jsx(y,{title:t("oauth.apple.enable"),mb:2.5,children:e.jsx(k,{name:"enabled",control:x,render:({field:s})=>e.jsx(R,{control:e.jsx(ae,{sx:{ml:1},checked:s.value,...s})})})}),e.jsx(y,{title:t("oauth.apple.teamId"),children:e.jsx(k,{name:"teamId",control:x,rules:{validate:f?j:h},render:({field:s})=>e.jsx(B,{fullWidth:!0,children:e.jsx(F,{...s,size:"small",label:t("oauth.apple.teamId"),error:!!i.errors[s.name],helperText:i.errors[s.name]?.message||" ",disabled:!f})})})}),e.jsx(y,{title:t("oauth.apple.bundleId"),children:e.jsx(k,{name:"bundleId",control:x,rules:{validate:f?w:h},render:({field:s})=>e.jsx(B,{fullWidth:!0,children:e.jsx(F,{...s,size:"small",label:t("oauth.apple.bundleId"),error:!!i.errors[s.name],helperText:i.errors[s.name]?.message||" ",disabled:!f})})})}),e.jsx(y,{title:t("oauth.apple.serviceId"),children:e.jsx(k,{name:"serviceId",control:x,rules:{validate:f?v:h},render:({field:s})=>e.jsx(B,{fullWidth:!0,children:e.jsx(F,{...s,size:"small",label:t("oauth.apple.serviceId"),error:!!i.errors[s.name],helperText:i.errors[s.name]?.message||" ",disabled:!f})})})}),e.jsx(y,{title:t("oauth.apple.keyId"),children:e.jsx(k,{name:"keyId",control:x,rules:{validate:f?S:h},render:({field:s})=>e.jsx(B,{fullWidth:!0,children:e.jsx(F,{...s,size:"small",label:t("oauth.apple.keyId"),error:!!i.errors[s.name],helperText:i.errors[s.name]?.message||" ",disabled:!f})})})}),e.jsx(y,{title:t("oauth.apple.authKey"),children:e.jsx(k,{name:"authKey",control:x,rules:{validate:f?g:h},render:({field:s})=>e.jsx(B,{fullWidth:!0,children:e.jsx(F,{...s,size:"small",type:"password",label:t("oauth.apple.authKey"),multiline:!0,rows:4,error:!!i.errors[s.name],helperText:i.errors[s.name]?.message||" ",disabled:!f})})})}),e.jsx(V,{type:"submit",variant:"contained",onSubmit:r(l),disabled:!i.isDirty,children:t("oauth.save")})]})})}const xe={enabled:!1,clientId:"",clientSecret:""};function mt(){const{api:b}=N(),{blocklet:c}=M(),{t}=ee(),n=c?.meta?.did,o=Object.assign({...xe},c?.settings?.oauth?.twitter||{}),{handleSubmit:r,control:x,formState:i,watch:p,reset:d}=te({defaultValues:Z(o,Object.keys(xe))}),f=p("enabled"),l=u(async g=>{try{const{blocklet:w}=await b.configOAuth({input:{did:n,oauth:JSON.stringify({twitter:g})}}),h=Object.assign({...xe},w?.settings?.oauth?.twitter||{});d(h),O.success(t("oauth.saveSuccess"))}catch(w){O.error(w.message||t("oauth.saveFailed"))}}),j=u(g=>g?.trim()?!0:t("oauth.twitter.clientIdDescription")),v=u(g=>g?.trim()?!0:t("oauth.twitter.clientSecretDescription")),S=u(()=>!0);return e.jsx(a,{children:e.jsxs("form",{onSubmit:r(l),disabled:!0,children:[e.jsx(y,{title:e.jsx(a,{sx:{display:"flex",alignItems:"center",gap:1},children:e.jsx("span",{children:t("oauth.twitter.enable")})}),mb:2.5,sx:{"& .section-content":{alignItems:"center"}},children:e.jsx(k,{name:"enabled",control:x,sx:{alignItems:"center"},render:({field:g})=>e.jsx(R,{control:e.jsx(ae,{sx:{ml:1},size:"small",checked:g.value,...g})})})}),e.jsx(y,{title:t("oauth.twitter.clientId"),children:e.jsx(k,{name:"clientId",control:x,rules:{validate:f?j:S},render:({field:g})=>e.jsx(B,{fullWidth:!0,children:e.jsx(F,{...g,size:"small",label:t("oauth.twitter.clientId"),error:!!i.errors[g.name],helperText:i.errors[g.name]?.message||" ",disabled:!f})})})}),e.jsx(y,{title:t("oauth.twitter.clientSecret"),children:e.jsx(k,{name:"clientSecret",control:x,rules:{validate:f?v:S},render:({field:g})=>e.jsx(B,{fullWidth:!0,children:e.jsx(F,{...g,size:"small",type:"password",label:t("oauth.twitter.clientSecret"),error:!!i.errors[g.name],helperText:i.errors[g.name]?.message||" ",disabled:!f})})})}),e.jsx(V,{type:"submit",variant:"contained",onSubmit:r(l),disabled:!i.isDirty,children:t("oauth.save")})]})})}const pt={width:24,height:24,body:'<path fill="currentColor" d="M9 20q-.825 0-1.413-.588T7 18q0-.825.588-1.413T9 16q.825 0 1.413.588T11 18q0 .825-.588 1.413T9 20Zm6 0q-.825 0-1.413-.588T13 18q0-.825.588-1.413T15 16q.825 0 1.413.588T17 18q0 .825-.588 1.413T15 20Zm-6-6q-.825 0-1.413-.588T7 12q0-.825.588-1.413T9 10q.825 0 1.413.588T11 12q0 .825-.588 1.413T9 14Zm6 0q-.825 0-1.413-.588T13 12q0-.825.588-1.413T15 10q.825 0 1.413.588T17 12q0 .825-.588 1.413T15 14ZM9 8q-.825 0-1.413-.588T7 6q0-.825.588-1.413T9 4q.825 0 1.413.588T11 6q0 .825-.588 1.413T9 8Zm6 0q-.825 0-1.413-.588T13 6q0-.825.588-1.413T15 4q.825 0 1.413.588T17 6q0 .825-.588 1.413T15 8Z"/>'};function Re({id:b,title:c,children:t,index:n,onMove:o,defaultExpand:r=!1,onEnd:x,icon:i=null}){const[p,d]=D.useState(r),f=D.useRef(null),l=D.useRef(null),[{handlerId:j},v]=Ee({accept:"dragItem",collect(s){return{handlerId:s.getHandlerId()}},hover(s,I){if(!f.current)return;const L=s.index,m=n;if(L===m)return;const A=f.current?.getBoundingClientRect(),_=l.current?.getBoundingClientRect(),re=(_.bottom-_.top)/2,$=I.getClientOffset().y-A.top;L<m&&$<re||L>m&&$>re||(o(L,m),s.index=m)}}),[{isDragging:S},g]=Ue({item:{index:n,type:"dragItem"},collect:s=>({isDragging:s.isDragging()}),end:x});g(l),v(f);const w=S?.5:1,h=u(s=>{s.preventDefault(),s.stopPropagation(),d(!p)});return e.jsxs(a,{ref:f,children:[e.jsxs(a,{sx:{cursor:"pointer","&:hover":{backgroundColor:"grey.100"}},ref:l,"data-handler-id":j,children:[e.jsxs(a,{sx:{py:2,px:1,opacity:w,display:"flex",alignItems:"center",gap:.5},draggable:!1,onClick:h,children:[e.jsx(a,{sx:{pointerEvents:"auto",cursor:"grab","&:active":{cursor:"grabbing"},fontSize:0,color:"text.hint","&:hover":{color:"text.secondary"}},children:e.jsx(X,{fontSize:20,icon:pt})}),e.jsx(a,{sx:{display:"flex",alignItems:"center",flexShrink:0,mr:.5,transform:"translateY(-1px)"},children:i}),e.jsx(Y,{sx:{flex:1},children:c}),e.jsx(le,{size:"small",sx:{pointerEvents:"auto",transform:p?"":"rotate(180deg)",transition:"transform 0.3s ease"},children:e.jsx(X,{icon:ot,style:{transform:"scale(1.5)"}})})]}),e.jsx(oe,{})]}),e.jsx(a,{sx:{pl:4,py:2.5,display:p?"block":"none"},children:t})]})}Re.propTypes={title:E.string.isRequired,id:E.string.isRequired,children:E.node.isRequired,index:E.number.isRequired,onMove:E.func.isRequired,onEnd:E.func.isRequired,defaultExpand:E.bool,icon:E.any};const xt=[{name:"github",title:G.PROVIDER_NAME.github,icon:e.jsx(se,{provider:"github",sx:{width:20,height:20}}),component:e.jsx(dt,{})},{name:"google",title:G.PROVIDER_NAME.google,icon:e.jsx(se,{provider:"google",sx:{width:20,height:20}}),component:e.jsx(ut,{})},{name:"apple",title:G.PROVIDER_NAME.apple,icon:e.jsx(se,{provider:"apple",sx:{width:20,height:20}}),component:e.jsx(ht,{})},{name:"twitter",title:G.PROVIDER_NAME.twitter,icon:e.jsx(se,{provider:"twitter",sx:{width:20,height:20}}),component:e.jsx(mt,{})},{name:"auth0",title:G.PROVIDER_NAME.auth0,icon:e.jsx(se,{provider:"auth0",sx:{width:20,height:20}}),component:e.jsx(ct,{})}],ft=["github","google","apple","twitter","auth0"];function gt(){const{api:b}=N(),{blocklet:c}=M(),t=c?.meta?.did,n=c?.settings?.oauth||{},o=Object.keys(n).sort((l,j)=>n[l]?.order!==void 0&&n[j]?.order!==void 0?n[l].order-n[j].order:n[l]?.order!==void 0?-1:1);for(const l of ft)o.includes(l)||o.push(l);const r=ie(o.reduce((l,j,v)=>Object.assign(l,{[j]:v}),{})),x=H(()=>{const l=[...xt];return l.sort((j,v)=>r[j.name]-r[v.name]),l.map(j=>({...j,enabled:n[j.name]?.enabled??!1}))},[r.auth0,r.github,r.google]),i={};typeof window<"u"&&(i.context=window);const p=u(async l=>{const j={};Object.keys(l).forEach(v=>{j[v]={order:l[v]}}),await b.configOAuth({input:{did:t,oauth:JSON.stringify(j)}})}),d=u((l,j)=>{const v=x[l],S=x[j];r[v.name]=j,r[S.name]=l}),f=u(async()=>{await p(r)});return e.jsx(a,{sx:{".section-left":{width:"180px"}},children:e.jsx(We,{backend:Ve,...i,children:x.map((l,j)=>e.jsx(Re,{index:j,id:l.name,title:l.title,icon:l.icon,onMove:d,onEnd:f,defaultExpand:l.enabled,children:l.component},l.name))})})}const J={ttl:ve.SESSION_TTL,cacheTtl:ve.SESSION_CACHE_TTL,email:{enabled:!1,requireVerified:!1,requireUnique:!1,trustOauthProviders:!1,trustedIssuers:[],enableDomainBlackList:!1,domainBlackList:[],enableDomainWhiteList:!1,domainWhiteList:[]},phone:{enabled:!1,requireVerified:!1,requireUnique:!1,regionBlackList:[],trustedIssuers:[]},enableBlacklist:!1};function U(b){return e.jsx(it,{...b,sx:{transform:"scale(0.75)"}})}function fe(b,c=!1){const t=c?b.ttl*86400:b.ttl/86400;return{...b,ttl:t}}function jt(){const{api:b}=N(),{blocklet:c}=M(),t=c?.meta?.did,n=Xe({},J,c?.settings?.session||{});de(n.ttl)&&(n.ttl=J.ttl),de(n.cacheTtl)&&(n.cacheTtl=J.cacheTtl),n.phone||(n.phone=J.phone),n.email||(n.email=J.email),de(n.enableBlacklist)&&(n.enableBlacklist=J.enableBlacklist);const{handleSubmit:o,control:r,formState:x,reset:i,watch:p}=te({defaultValues:Z(fe(n),["ttl","cacheTtl","email","phone","enableBlacklist"])}),{t:d}=ee(),f=p("email.enabled"),l=p("phone.enabled"),j=p("email.enableDomainBlackList"),v=p("email.enableDomainWhiteList"),{fields:S,append:g,remove:w}=De({control:r,name:"email.domainBlackList"}),{fields:h,append:s,remove:I}=De({control:r,name:"email.domainWhiteList"}),L=u(async m=>{try{const{blocklet:A}=await b.updateAppSessionConfig({input:{did:t,config:et(fe(m,!0),["phone"])}}),_=Object.assign({},J,Z(A?.settings?.session||{},["ttl","cacheTtl","email","phone","enableBlacklist"]));i(fe(_)),O.success(d("common.configSuccess"))}catch(A){O.error(A.message)}});return e.jsx(bt,{onSubmit:o(L),children:e.jsxs(W,{direction:"column",sx:{gap:6},children:[e.jsxs(a,{children:[e.jsxs(a,{children:[e.jsx(Y,{variant:"h6",sx:{fontWeight:600},children:d("blocklet.config.session.profile")}),e.jsx(a,{component:oe,sx:{my:3}})]}),e.jsxs(W,{sx:{gap:2},children:[e.jsx(y,{title:d("blocklet.config.session.fullNameEnabled"),sectionLeftSx:{width:"600px"},children:e.jsx(a,{sx:{alignSelf:"flex-start"},children:e.jsx(U,{disabled:!0,checked:!0})})}),e.jsx(y,{title:d("blocklet.config.session.avatarEnabled"),sectionLeftSx:{width:"600px"},children:e.jsx(a,{sx:{alignSelf:"flex-start"},children:e.jsx(U,{disabled:!0,checked:!0})})}),e.jsx(y,{title:d("blocklet.config.session.emailEnabled"),sectionLeftSx:{width:"600px"},children:e.jsx(a,{sx:{alignSelf:"flex-start"},children:e.jsx(k,{name:"email.enabled",control:r,render:({field:m})=>e.jsx(U,{...m,checked:m.value})})})}),f&&e.jsxs(W,{direction:"column",sx:{ml:2,gap:.5},children:[e.jsx(y,{title:d("blocklet.config.session.emailRequireVerified"),sectionLeftSx:{width:"600px"},children:e.jsx(a,{sx:{alignSelf:"flex-start"},children:e.jsx(k,{name:"email.requireVerified",control:r,render:({field:m})=>e.jsx(R,{sx:{ml:0},control:e.jsx(U,{...m,checked:m.value})})})})}),e.jsx(y,{title:d("blocklet.config.session.emailRequireUnique"),sectionLeftSx:{width:"600px"},children:e.jsx(a,{sx:{alignSelf:"flex-start"},children:e.jsx(k,{name:"email.requireUnique",control:r,render:({field:m})=>e.jsx(R,{sx:{ml:0},control:e.jsx(U,{...m,checked:m.value})})})})}),e.jsx(y,{title:d("blocklet.config.session.emailTrustOauthProviders"),sectionLeftSx:{width:"600px"},children:e.jsx(a,{sx:{alignSelf:"flex-start"},children:e.jsx(k,{name:"email.trustOauthProviders",control:r,render:({field:m})=>e.jsx(R,{sx:{ml:0},control:e.jsx(U,{...m,checked:m.value})})})})}),e.jsx(y,{title:d("blocklet.config.session.enableDomainBlackList"),sectionLeftSx:{width:"600px"},children:e.jsx(a,{sx:{alignSelf:"flex-start"},children:e.jsx(k,{name:"email.enableDomainBlackList",control:r,render:({field:m})=>e.jsx(R,{sx:{ml:0},control:e.jsx(U,{...m,checked:m.value})})})})}),j&&e.jsxs(a,{children:[S.map((m,A)=>e.jsxs(W,{direction:"row",sx:{alignItems:"center",my:1,maxWidth:"720px"},children:[e.jsx(k,{name:`email.domainBlackList.${A}`,control:r,render:_=>e.jsx(F,{..._.field,size:"small",fullWidth:!0})}),e.jsx(le,{onClick:()=>w(A),children:e.jsx(qe,{})})]},m.id)),e.jsx(V,{startIcon:e.jsx(Le,{}),onClick:()=>g(""),children:d("blocklet.config.session.addDomain")})]}),e.jsx(y,{title:d("blocklet.config.session.enableDomainWhiteList"),sectionLeftSx:{width:"600px"},children:e.jsx(a,{sx:{alignSelf:"flex-start"},children:e.jsx(k,{name:"email.enableDomainWhiteList",control:r,render:({field:m})=>e.jsx(R,{sx:{ml:0},control:e.jsx(U,{...m,checked:m.value})})})})}),v&&e.jsxs(a,{children:[h.map((m,A)=>e.jsxs(W,{direction:"row",sx:{alignItems:"center",my:1,maxWidth:"720px"},children:[e.jsx(k,{name:`email.domainWhiteList.${A}`,control:r,render:_=>e.jsx(F,{..._.field,size:"small",fullWidth:!0})}),e.jsx(le,{onClick:()=>I(A),children:e.jsx(qe,{})})]},m.id)),e.jsx(V,{startIcon:e.jsx(Le,{}),onClick:()=>s(""),children:d("blocklet.config.session.addDomain")})]})]}),e.jsxs(a,{sx:{display:"none"},children:[e.jsx(y,{title:d("blocklet.config.session.phoneEnabled"),sectionLeftSx:{width:"600px"},children:e.jsx(a,{sx:{alignSelf:"flex-start"},children:e.jsx(k,{name:"phone.enabled",control:r,disabled:!0,render:({field:m})=>e.jsx(R,{sx:{ml:0},control:e.jsx(U,{...m,checked:m.value})})})})}),l&&e.jsxs(W,{direction:"column",sx:{ml:2,mt:1},children:[e.jsx(y,{title:d("blocklet.config.session.phoneRequireVerified"),sectionLeftSx:{width:"600px"},children:e.jsx(a,{sx:{alignSelf:"flex-start"},children:e.jsx(k,{name:"phone.requireVerified",control:r,render:({field:m})=>e.jsx(R,{sx:{ml:0},control:e.jsx(U,{...m,checked:m.value})})})})}),e.jsx(y,{title:d("blocklet.config.session.phoneRequireUnique"),sectionLeftSx:{width:"600px"},children:e.jsx(a,{sx:{alignSelf:"flex-start"},children:e.jsx(k,{name:"phone.requireUnique",control:r,render:({field:m})=>e.jsx(R,{sx:{ml:0},control:e.jsx(U,{...m,checked:m.value})})})})})]})]})]})]}),e.jsxs(a,{children:[e.jsx(Y,{variant:"h6",sx:{fontWeight:600},children:d("blocklet.config.session.period")}),e.jsx(a,{component:oe,sx:{my:3}}),e.jsx(W,{direction:"column",spacing:2,children:e.jsx(k,{name:"ttl",control:r,rules:{min:1,max:30},render:({field:m})=>e.jsx(B,{fullWidth:!0,sx:{mb:2},children:e.jsx(y,{title:d("blocklet.config.session.ttl",{day:m.value}),sectionLeftSx:{width:"600px"},children:e.jsx(a,{sx:{width:"100%",maxWidth:500,px:2},children:e.jsx(Je,{...m,defaultValue:7,step:1,marks:[{value:1,label:d("blocklet.config.session.day",{day:1})},{value:7,label:d("blocklet.config.session.days",{day:7})},{value:14,label:d("blocklet.config.session.days",{day:14})},{value:21,label:d("blocklet.config.session.days",{day:21})},{value:30,label:d("blocklet.config.session.days",{day:30})}],min:1,max:30,valueLabelDisplay:"auto"})})})})})})]}),e.jsxs(a,{children:[e.jsx(Y,{variant:"h6",sx:{fontWeight:600},children:d("blocklet.config.session.experimentalSettings")}),e.jsx(a,{component:oe,sx:{my:3}}),e.jsx(W,{direction:"column",spacing:2,children:e.jsx(y,{title:d("blocklet.config.session.enableBlacklist"),sectionLeftSx:{width:"600px"},children:e.jsx(a,{sx:{alignSelf:"flex-start"},children:e.jsx(k,{name:"enableBlacklist",control:r,render:({field:m})=>e.jsx(R,{sx:{ml:0},control:e.jsx(U,{...m,checked:m.value})})})})})})]}),e.jsx(a,{children:e.jsx(V,{type:"submit",variant:"contained",disabled:!x.isDirty,children:d("oauth.save")})})]})})}const bt=Fe.form`
|
|
2
|
-
max-width: 1536px;
|
|
3
|
-
|
|
4
|
-
.advanced-config {
|
|
5
|
-
border: 0;
|
|
6
|
-
padding: 0;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
.config-form {
|
|
10
|
-
flex-grow: 1;
|
|
11
|
-
overflow-y: auto;
|
|
12
|
-
will-change: transform;
|
|
13
|
-
|
|
14
|
-
&:first-child {
|
|
15
|
-
margin: 0;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
${b=>b.theme.breakpoints.down("md")} {
|
|
19
|
-
width: 100%;
|
|
20
|
-
flex-shrink: 0;
|
|
21
|
-
padding: 0 24px;
|
|
22
|
-
transform: translate(0, 0);
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
.config-item {
|
|
27
|
-
display: flex;
|
|
28
|
-
align-items: center;
|
|
29
|
-
justify-content: space-between;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
.config-desc {
|
|
33
|
-
font-weight: normal;
|
|
34
|
-
font-size: 12px;
|
|
35
|
-
color: #666;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
.form-item {
|
|
39
|
-
margin-top: 0;
|
|
40
|
-
}
|
|
41
|
-
`,vt={width:24,height:24,body:'<path fill="currentColor" d="M6 12.05q0 1.125.425 2.188T7.75 16.2l.25.25V15q0-.425.288-.713T9 14q.425 0 .713.288T10 15v4q0 .425-.288.713T9 20H5q-.425 0-.713-.288T4 19q0-.425.288-.713T5 18h1.75l-.4-.35q-1.3-1.15-1.825-2.625T4 12.05Q4 9.7 5.2 7.787T8.425 4.85q.35-.2.738-.025t.512.575q.125.375-.013.75t-.487.575q-1.45.8-2.313 2.213T6 12.05Zm12-.1q0-1.125-.425-2.187T16.25 7.8L16 7.55V9q0 .425-.288.713T15 10q-.425 0-.713-.288T14 9V5q0-.425.288-.713T15 4h4q.425 0 .713.288T20 5q0 .425-.288.713T19 6h-1.75l.4.35q1.225 1.225 1.788 2.663T20 11.95q0 2.35-1.2 4.263t-3.225 2.937q-.35.2-.737.025t-.513-.575q-.125-.375.013-.75t.487-.575q1.45-.8 2.313-2.212T18 11.95Z"/>'};var ge,Ce;function kt(){if(Ce)return ge;Ce=1;const{DEFAULT_IP_DOMAIN_SUFFIX:b,SLOT_FOR_IP_DNS_SITE:c,DEFAULT_DID_DOMAIN:t}=Ge(),{encode:n}=rt();return ge={getIpDnsDomainForBlocklet:x=>`${n(x.meta.did)}-${c}.${b}`,getDidDomainForBlocklet:({did:x,didDomain:i=t})=>`${n(x)}.${i}`},ge}var yt=kt();function Ae({ref:b=null}){const{t:c}=D.useContext(K),{blocklet:t}=M(),{api:n}=N(),o=ie({loadingReject:!1,loadingApprove:!1,mode:"view",show:!1,data:{},callback:Q}),x=ye()?.transitions?.duration?.leavingScreen||300,i=u(()=>{o.mode="view",o.data={},o.callback=Q}),p=u(()=>{o.show=!1,setTimeout(()=>{i()},x)}),d=u(g=>{o.mode="view",o.show=!0,o.data=g}),f=u((g,w=Q)=>{o.mode="approve",o.show=!0,o.data=g,o.callback=w});D.useImperativeHandle(b,()=>({open:d,close:p,approve:f}),[d,p,f]);const l=H(()=>{if(!o.show)return[];o.data.migratedFrom=[o.data.appId,o.data.appPid];const g=["appName","appLogo","appId","appPid","migratedFrom","appDescription","appUrl","version","appliedAt","status","serverId","serverVersion"];return o.data.isMaster!==!1&&tt(g,"appliedAt","status"),g.map(w=>{const h=c(`federated.info.${w}`);let s=o.data[w];if(w==="appName"&&o.data.isMaster&&(s=e.jsxs(a,{children:[e.jsx(Be,{component:Oe}),s]})),["appId","appPid","serverId"].includes(w)&&(s=e.jsx(je,{children:s})),["appUrl"].includes(w)&&(s=e.jsx(a,{component:"a",href:s,target:"_blank",children:s})),["appLogo"].includes(w)){const I=nt(`https://${yt.getDidDomainForBlocklet({did:o.data.appPid})}`,ve.WELLKNOWN_SERVICE_PATH_PREFIX,"/blocklet/logo");try{const L=new URL(I);L.searchParams.set("imageFilter","resize"),L.searchParams.set("w","80"),L.searchParams.set("h","80"),s=e.jsx("img",{src:L.href,width:"60",height:"60",alt:o.data.appName})}catch{s=e.jsx("img",{src:I,width:"60",height:"60",alt:o.data.appName})}}return w==="status"&&(s=s&&c(`federated.status.${s}`)),w==="migratedFrom"&&(s=(o.data.migratedFrom||[]).filter(m=>![o.data.appId,o.data.appPid].includes(m)).map(m=>e.jsx(je,{children:m}))),st(s)&&(s="-"),{name:h,value:s}})},[o.data]),j=o.mode==="approve",v=u(async()=>{try{o.loadingReject=!0,await n.auditFederatedLogin({input:{memberPid:o.data.appPid,did:t.appPid,status:"rejected"}}),p(),o?.callback(!1)}finally{o.loadingReject=!1}}),S=u(async()=>{try{o.loadingApprove=!0,await n.auditFederatedLogin({input:{memberPid:o.data.appPid,did:t.appPid,status:"approved"}}),p(),o?.callback(!0)}finally{o.loadingApprove=!1}});return e.jsx(ke,{open:o.show,title:c(j?"federated.approveToJoinLogin":"federated.siteDetail"),onClose:p,actions:j?e.jsxs(e.Fragment,{children:[e.jsxs(V,{color:"error",variant:"contained",onClick:v,disabled:o.loadingReject,children:[o.loadingReject?e.jsx(be,{size:16,color:"grey"}):null,c("common.reject")]}),e.jsxs(V,{variant:"contained",onClick:S,disabled:o.loadingApprove,children:[o.loadingApprove?e.jsx(be,{size:16,color:"grey"}):null,c("common.approve")]})]}):e.jsx(V,{variant:"outlined",onClick:p,children:c("common.close")}),children:l.map(g=>e.jsx(at,{style:{alignItems:"flex-start"},valueComponent:"div",nameWidth:180,name:g.name,children:g.value},g.name))})}Ae.propTypes={ref:E.any};function Se({ref:b=null}){const t=ye()?.transitions?.duration?.leavingScreen||300,{t:n}=D.useContext(K),o=ie({show:!1,data:{link:""}}),r=u(()=>{o.data.link=""}),x=u(()=>{o.show=!1,setTimeout(()=>{r()},t)}),i=u(({link:d})=>{o.show=!0,o.data.link=d});D.useImperativeHandle(b,()=>({open:i,close:x}),[i,x]);const p=u(()=>{He(o.data.link),x()});return e.jsxs(ke,{open:o.show,title:n("federated.joinFederatedLogin"),onClose:x,PaperProps:{style:{minHeight:"unset"}},actions:e.jsx(z,{color:"primary",autoFocus:!0,variant:"contained",onClick:p,children:n("common.copyAndClose")}),children:[e.jsx(a,{sx:{mb:1},children:n("federated.inviteJoinFederatedLoginDescription")}),e.jsx(a,{sx:{"& .copy-button":{display:"none !important"}},children:e.jsx(Me,{language:"shell",style:{marginBottom:0},children:o.data.link})})]})}Se.propTypes={ref:E.any};function Pe({mode:b="member"}){const c=D.useRef(null),t=D.useRef(null),{t:n,locale:o}=D.useContext(K),{blocklet:r,actions:{refreshBlocklet:x}}=M(),{confirmApi:i,confirmHolder:p}=Ye(),{api:d}=N(),f=r.settings.federated?.sites||[],l=r.settings.federated?.config||{},j=l.isMaster!==!1,v=f.find(T=>T.appPid===r.appPid),S=ie({loadingSync:!1}),g=u(T=>{t.current?.open(T)}),w=u(T=>{t.current?.approve(T,x)}),h=u(T=>{i.open({title:n("federated.removeFederatedLogin"),content:n("federated.removeFederatedLoginDescription"),confirmButtonText:n("common.confirm"),cancelButtonText:n("common.cancel"),confirmButtonProps:{color:"error"},async onConfirm(C){await d.quitFederatedLogin({input:{did:r.appPid,targetDid:T.appPid}}),C()}})}),s=u(T=>{i.open({title:n("federated.disableFederatedLogin"),content:n("federated.disableFederatedLoginDescription"),confirmButtonText:n("common.confirm"),cancelButtonText:n("common.cancel"),confirmButtonProps:{color:"error"},async onConfirm(C){await d.auditFederatedLogin({input:{memberPid:T.appPid,did:r.appPid,status:"revoked"}}),C()}})}),I=u(T=>{i.open({title:n("federated.enableFederatedLogin"),content:n("federated.enableFederatedLoginDescription"),confirmButtonText:n("common.confirm"),cancelButtonText:n("common.cancel"),async onConfirm(C){await d.auditFederatedLogin({input:{memberPid:T.appPid,did:r.appPid,status:"approved"}}),C()}})}),L=H(()=>{const T=[{label:n("common.name"),name:"appName",options:{customBodyRenderLite:C=>{const q=f[C],ne=q.isMaster!==!1;return e.jsx(a,{sx:{display:"inline-block"},children:e.jsxs(a,{component:"a",href:q.appUrl,target:"_blank",onClick:P=>{P.stopPropagation()},sx:{display:"flex",alignItems:"center"},children:[ne&&e.jsx(Be,{component:Oe,style:{marginRight:"4px"}}),q.appName]})})}}},{label:n("common.did"),name:"appId",options:{customBodyRenderLite:C=>{const q=f[C];return e.jsx(je,{children:q.appId})}}},{label:n("common.status"),name:"status",options:{customBodyRenderLite:C=>{const q=f[C],ne=q.isMaster!==!1;return e.jsx(a,{children:ne?"-":n(`federated.status.${q.status}`)})}}}];return j&&T.push({label:n("common.actions"),name:"actions",options:{customBodyRenderLite:C=>{const q=f[C],ne=q.isMaster!==!1;return e.jsx(a,{sx:{display:"flex",gap:1},children:ne?e.jsxs(e.Fragment,{children:[q.status==="rejected"&&e.jsx(z,{variant:"contained",color:"error",size:"small",onClick:P=>{P.stopPropagation()},children:n("federated.status.rejected")}),q.status==="revoked"&&e.jsx(z,{variant:"contained",color:"secondary",size:"small",onClick:P=>{P.stopPropagation()},children:n("federated.status.revoked")})]}):e.jsxs(e.Fragment,{children:[e.jsx(z,{variant:"contained",color:"error",size:"small",onClick:P=>{P.stopPropagation(),h(q)},children:n("federated.quitMember")},"quiteSite"),q.status==="pending"&&e.jsx(z,{variant:"contained",color:"primary",size:"small",onClick:P=>{P.stopPropagation(),w(q)},children:n("federated.status.pending")},"auditSite"),q.status==="approved"&&e.jsx(z,{variant:"contained",color:"error",size:"small",onClick:P=>{P.stopPropagation(),s(q)},style:{whiteSpace:"nowrap"},children:n("federated.revoke")},"revokeSite"),q.status==="revoked"&&e.jsx(z,{variant:"contained",color:"warning",size:"small",onClick:P=>{P.stopPropagation(),I(q)},style:{whiteSpace:"nowrap"},children:n("federated.approve")},"approveSite")]})})}}}),T},[l.appId,f,j,n]),m=H(()=>({sort:!0,download:!1,filter:!1,print:!1,expandableRowsOnClick:!0,onRowClick(T,{dataIndex:C}){const q=f[C];g(q)}}),[]),A=u(()=>{const T=r.environments.find(C=>C.key===G.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_URL);T?.value?c.current?.open({link:T.value}):O.error(n("federated.failedToGetFederatedLoginLink"))},[r.site?.domainAliases?.[0]?.href]),_=u(()=>{i.open({title:n("federated.quitFederatedLogin"),content:n("federated.quitFederatedLoginDescription"),confirmButtonText:n("common.confirm"),cancelButtonText:n("common.cancel"),confirmButtonProps:{color:"error"},async onConfirm(T){await d.quitFederatedLogin({input:{did:r.appPid}}),T()}})}),re=u(()=>{i.open({title:n("federated.disbandFederatedLogin"),content:n("federated.disbandFederatedLoginDescription"),confirmButtonText:n("common.confirm"),cancelButtonText:n("common.cancel"),confirmButtonProps:{color:"error"},async onConfirm(T){await d.disbandFederatedLogin({input:{did:r.appPid}}),T()}})}),Te=u(async()=>{try{S.loadingSync=!0,await Promise.all([await d.syncFederatedConfig({input:{did:r.appPid}}),_e(500)]),O.success(n("common.succeeded"))}finally{S.loadingSync=!1}}),$=[];return v.status!=="pending"&&$.push(e.jsx(ce,{title:n("federated.syncConfig"),children:e.jsx(le,{size:"small",onClick:Te,disabled:S.loadingSync,sx:[{"@keyframes spin":{from:{transform:"rotate(0deg)"},to:{transform:"rotate(360deg)"}}},S.loadingSync?{animation:"spin 1s linear infinite"}:{}],children:e.jsx(X,{icon:vt,style:{fontSize:24}})},"syncConfig")})),b==="master"?($.push(e.jsx(z,{size:"small",variant:"contained",onClick:A,sx:{ml:1},children:n("federated.inviteJoinFederatedLogin")},"inviteJoinFederatedLogin")),$.push(e.jsx(z,{color:"error",size:"small",variant:"contained",onClick:re,sx:{ml:1},children:n("federated.disbandFederatedLogin")},"disbandFederatedLogin"))):$.push(e.jsx(z,{size:"small",variant:"contained",color:"error",onClick:_,sx:{ml:1},children:n("federated.quitFederatedLogin")},"quitFederatedLogin")),e.jsxs(e.Fragment,{children:[e.jsx(Ne,{className:"main-table",locale:o,data:f,columns:L,customButtons:$,title:e.jsx(a,{className:"table-toolbar-left",children:n("oauth.federated")}),options:m}),p,e.jsx(Se,{ref:c}),e.jsx(Ae,{ref:t})]})}Pe.propTypes={mode:E.oneOf(["member","master"])};function ze({ref:b=null}){const{t:c}=D.useContext(K),{api:t}=N(),{blocklet:n}=M(),o=n?.appPid,x=ye()?.transitions?.duration?.leavingScreen||300,i=ie({loading:!1,show:!1,appUrl:"",appUrlError:"",callback:Q}),p=u(()=>{i.appUrl="",i.appUrlError="",i.callback=Q}),d=u(()=>{i.show=!1,setTimeout(()=>{p()},x)}),f=u((v=Q)=>{i.show=!0,i.callback=v});D.useImperativeHandle(b,()=>({open:f,close:d}),[f,d]);const l=u(v=>{if(!v)throw new Error(c("federated.federatedJoinAppUrlRequired"));if(!Qe(v))throw new Error(c("federated.federatedJoinAppUrlInvalid"))}),j=u(async()=>{try{l(i.appUrl),i.loading=!0;const v=await t.joinFederatedLogin({input:{did:o,appUrl:i.appUrl}});i.show=!1,d(),i?.callback(v)}catch(v){i.appUrlError=v.message}finally{i.loading=!1}});return e.jsxs(ke,{open:i.show,title:c("federated.joinFederatedLogin"),onClose:d,PaperProps:{style:{minHeight:"unset"}},actions:e.jsxs(z,{color:"primary",autoFocus:!0,variant:"contained",onClick:j,disabled:i.loading,children:[i.loading?e.jsx(be,{size:16,sx:{mr:1},color:"grey"}):null,c("common.confirm")]}),children:[e.jsx(a,{sx:{mb:1},children:c("federated.joinFederatedLoginDescription")}),e.jsx(F,{fullWidth:!0,variant:"outlined",margin:"dense",placeholder:c("federated.federatedJoinAppUrl"),label:c("federated.federatedJoinAppUrl"),value:i.appUrl,error:!!i.appUrlError,helperText:i.appUrlError||"eg: https://www.arcblock.io",onChange:v=>{i.appUrl=v.target.value}})]})}ze.propTypes={ref:E.any};function wt(){const{t:b}=D.useContext(K);return e.jsxs(W,{direction:"row",spacing:2,sx:{alignItems:"flex-start",p:2},children:[e.jsx(Ze,{fontSize:"large",color:"primary"}),e.jsxs(a,{children:[e.jsx(Y,{variant:"h6",gutterBottom:!0,children:b("federated.title")}),e.jsx(Y,{variant:"body2",sx:{color:"text.secondary"},children:b("federated.description")}),e.jsx(Ke,{href:"https://www.arcblock.io/blog/zh/did-connect-federated-login-support",underline:"hover",variant:"body2",color:"primary",target:"_blank",sx:{display:"inline-flex",alignItems:"center",mt:1},children:b("federated.link")})]})]})}function St(){const b=D.useRef(null),c=D.useRef(null),{t}=D.useContext(K),{blocklet:n,actions:{refreshBlocklet:o}}=M(),r=u(()=>{const i=n.site?.domainAliases?.[0]?.href;if(i)try{const p=new URL(i);b.current?.open({link:p.origin})}catch{O.error(t("federated.failedToGetFederatedLoginLink"))}},[n.site?.domainAliases?.[0]?.href]),x=u(()=>{c.current?.open(()=>{o()})});if(n.settings.federated?.sites.length>0){const i=n.settings.federated?.config.isMaster!==!1;return e.jsx(Pe,{mode:i?"master":"member"})}return e.jsxs(e.Fragment,{children:[e.jsx(a,{sx:{display:"flex",flexDirection:"column",gap:2,justifyContent:"center",alignItems:"center",minHeight:"200px"},children:e.jsxs(a,{sx:{maxWidth:400,borderRadius:2,border:"1px solid",borderColor:"divider"},children:[e.jsx(wt,{}),e.jsx(oe,{sx:{width:1}}),e.jsxs(W,{sx:{width:1,p:2,gap:1.5},children:[e.jsx(z,{variant:"contained",onClick:r,sx:{width:1},children:t("federated.inviteJoinFederatedLogin")}),e.jsx(z,{variant:"outlined",onClick:x,sx:{width:1},children:t("federated.joinFederatedLogin")})]})]})}),e.jsx(Se,{ref:b}),e.jsx(ze,{ref:c})]})}function Tt({orientation:b="horizontal"}){const{t:c}=D.useContext(K),t=lt({key:"lg"}),n=[{label:e.jsx(a,{sx:{textAlign:"center",width:"100%"},children:c("oauth.commonSettings")}),value:"settings"},{label:e.jsx(a,{sx:{textAlign:"center",width:"100%"},children:c("oauth.federated")}),value:"federated"},{label:e.jsx(a,{sx:{textAlign:"center",width:"100%"},children:c("oauth.oauth")}),value:"oauth"},{label:e.jsx(a,{sx:{textAlign:"center",width:"100%"},children:c("oauth.moreLogin")}),value:"more"}],[o,r]=D.useState(n[0].value),x=H(()=>({oauth:e.jsx(gt,{}),federated:e.jsx(St,{}),more:e.jsx($e,{children:c("oauth.comingSoon")}),settings:e.jsx(jt,{})}),[c]);return b==="vertical"?e.jsx(It,{children:e.jsxs(W,{direction:{md:"column",lg:"row"},sx:{gap:2},children:[e.jsx(a,{sx:{minWidth:"240px",flexShrink:0},children:e.jsx(Ie,{tabs:n,current:o,orientation:t?"horizontal":"vertical",onChange:r,sx:{borderRight:t?0:1,height:"100%",borderColor:"divider"}})}),e.jsx(a,{sx:{flexGrow:1,minWidth:0},children:e.jsx(a,{sx:{maxWidth:"1200px"},children:x[o]})})]})}):e.jsxs(a,{children:[e.jsx(Ie,{tabs:n,current:o,onChange:r}),e.jsx(a,{sx:{marginTop:"10px"},children:x[o]})]})}Tt.propTypes={orientation:E.oneOf(["horizontal","vertical"])};const It=Fe.div`
|
|
42
|
-
.MuiTab-root {
|
|
43
|
-
text-align: left;
|
|
44
|
-
align-items: flex-start;
|
|
45
|
-
font-weight: normal;
|
|
46
|
-
|
|
47
|
-
div {
|
|
48
|
-
text-align: left;
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
.Mui-selected {
|
|
53
|
-
font-weight: bold;
|
|
54
|
-
}
|
|
55
|
-
`;export{Tt as default};
|