@xcpcio/board-app 0.55.2 → 0.57.0

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.
Files changed (74) hide show
  1. package/dist/404.html +1 -1
  2. package/dist/assets/Balloon.vue_vue_type_script_setup_true_lang-BZ_MJL62.js +1 -0
  3. package/dist/assets/{Board-DI2_Xyh3.css → Board-DnZBiplC.css} +1 -1
  4. package/dist/assets/Board-M3nEiC5v.js +1 -0
  5. package/dist/assets/{ContestStateBadge-DawlTsHs.css → ContestStateBadge-BqhxSQpe.css} +1 -1
  6. package/dist/assets/ContestStateBadge-IsAa8PiB.js +1 -0
  7. package/dist/assets/Countdown-BwX0pjKA.js +1 -0
  8. package/dist/assets/{DataSourceInput.vue_vue_type_script_setup_true_lang-J0bb2eXG.js → DataSourceInput.vue_vue_type_script_setup_true_lang-CwVxRE-c.js} +1 -1
  9. package/dist/assets/Footer.vue_vue_type_script_setup_true_lang-MkbrUjXL.js +1 -0
  10. package/dist/assets/NavBar-BmAanNCq.js +1 -0
  11. package/dist/assets/{Resolver-B6m5f_LD.css → Resolver-BTlxgfNF.css} +1 -1
  12. package/dist/assets/Resolver-RnjyvoQY.js +22 -0
  13. package/dist/assets/RightArrowIcon-Dma7noLJ.js +1 -0
  14. package/dist/assets/{TheInput.vue_vue_type_script_setup_true_lang-DsqG2YZ8.js → TheInput.vue_vue_type_script_setup_true_lang-CX1T1Yaw.js} +1 -1
  15. package/dist/assets/Tooltip.vue_vue_type_script_setup_true_lang-C4y8ve-6.js +27 -0
  16. package/dist/assets/{_...all_-Dkuyof0N.js → _...all_-B68s9hsC.js} +1 -1
  17. package/dist/assets/{_...all_-CWEYFf-1.js → _...all_-mCyltngd.js} +2 -2
  18. package/dist/assets/{_name_-DkCB2ylA.js → _name_-CjfqvPfr.js} +1 -1
  19. package/dist/assets/{about-Bei-zdpH.js → about-C-cjF9jO.js} +2 -2
  20. package/dist/assets/board-DiVdPUVH.js +1 -0
  21. package/dist/assets/{board-layout-K8sw8NsP.js → board-layout-Ddotwr4-.js} +1 -1
  22. package/dist/assets/{constant-2MSuUQN9.js → constant-CGob-gWE.js} +1 -1
  23. package/dist/assets/{default-1E2MOw97.js → default-BV_KbRwY.js} +1 -1
  24. package/dist/assets/{headless-Sa2QJJjX.js → headless-Cxtb9X1L.js} +1 -1
  25. package/dist/assets/{home-CtJUZVCZ.js → home-B31uh5iL.js} +1 -1
  26. package/dist/assets/index-BPqC3WJ9.js +198 -0
  27. package/dist/assets/{index-BNZRV8LR.js → index-BfIZBk7d.js} +1 -1
  28. package/dist/assets/{index-DIl_xwmv.js → index-CAgdB_-E.js} +1 -1
  29. package/dist/assets/{index-D0wLFbYO.css → index-CD2Bzcv5.css} +1 -1
  30. package/dist/assets/{index-BZMvrIyG.css → index-CTdHCzhg.css} +3 -3
  31. package/dist/assets/{index-B15dCUpg.js → index-Cy4xbqNj.js} +1 -1
  32. package/dist/assets/index-DPh0sBpA.js +1 -0
  33. package/dist/assets/{index-DXMw63yv.js → index-DmBTAYlT.js} +1 -1
  34. package/dist/assets/{index-CPJc3gEW.js → index-d753Ov31.js} +2 -2
  35. package/dist/assets/index-hXLRQaA1.js +1 -0
  36. package/dist/assets/index-kacUN_O7.js +67 -0
  37. package/dist/assets/{index-CkWanoDO.css → index-kywOXmCz.css} +1 -1
  38. package/dist/assets/{index-layout-D7MYCKsY.js → index-layout-BaQrY3iI.js} +1 -1
  39. package/dist/assets/pagination-ClXw8clh.js +3 -0
  40. package/dist/assets/query-Chl7pD8x.js +1 -0
  41. package/dist/assets/{test-C0jX_snI.js → test-DKJ99bxw.js} +1 -1
  42. package/dist/assets/{use-vmodel-CT985YGh.js → use-vmodel-DBwTGXRm.js} +1 -1
  43. package/dist/assets/user-DeAJw0vU.js +1 -0
  44. package/dist/assets/virtual_pwa-register-CsMcElxS.js +1 -0
  45. package/dist/assets/workbox-window.prod.es5-CwtvwXb3.js +2 -0
  46. package/dist/index.html +1 -1
  47. package/dist/sw.js +1 -1
  48. package/package.json +47 -47
  49. package/src/auto-imports.d.ts +7 -1
  50. package/src/components/Balloon.vue +1 -1
  51. package/src/components/Resolver.vue +1 -1
  52. package/src/components/board/Board.vue +11 -1
  53. package/src/components/board/Progress.vue +1 -1
  54. package/src/typed-router.d.ts +68 -0
  55. package/vite.config.ts +11 -11
  56. package/dist/assets/Balloon.vue_vue_type_script_setup_true_lang-CmkJalmb.js +0 -1
  57. package/dist/assets/Board-Dum-tExZ.js +0 -1
  58. package/dist/assets/ContestStateBadge-hRbbyZ5a.js +0 -1
  59. package/dist/assets/Countdown-DAdiIlkO.js +0 -1
  60. package/dist/assets/Footer.vue_vue_type_script_setup_true_lang-CZWhuawj.js +0 -1
  61. package/dist/assets/NavBar-o7LroIec.js +0 -1
  62. package/dist/assets/Resolver-DQAiggp3.js +0 -25
  63. package/dist/assets/RightArrowIcon-DcfHXHHq.js +0 -1
  64. package/dist/assets/Tooltip.vue_vue_type_script_setup_true_lang-OTaxJAgs.js +0 -27
  65. package/dist/assets/board-DYwZDF6d.js +0 -1
  66. package/dist/assets/index-6jZiIup0.js +0 -1
  67. package/dist/assets/index-BYh7ktqe.js +0 -198
  68. package/dist/assets/index-Biv_orBr.js +0 -1
  69. package/dist/assets/index-CYsJ2gG-.js +0 -67
  70. package/dist/assets/pagination-D1pCU19r.js +0 -3
  71. package/dist/assets/query-DfOnN8jV.js +0 -1
  72. package/dist/assets/user-bpzU-F74.js +0 -1
  73. package/dist/assets/virtual_pwa-register-C3KS-ZjO.js +0 -1
  74. package/dist/assets/workbox-window.prod.es5-B9K5rw8f.js +0 -2
@@ -1 +0,0 @@
1
- var ut=i=>{throw TypeError(i)};var Y=(i,t,e)=>t.has(i)||ut("Cannot "+e);var s=(i,t,e)=>(Y(i,t,"read from private field"),e?e.call(i):t.get(i)),b=(i,t,e)=>t.has(i)?ut("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(i):t.set(i,e),c=(i,t,e,n)=>(Y(i,t,"write to private field"),n?n.call(i,e):t.set(i,e),e),d=(i,t,e)=>(Y(i,t,"access private method"),e);import{a4 as St,a5 as ct,a6 as w,a7 as q,a8 as K,a9 as wt,aa as lt,ab as ft,ac as Ct,ad as It,ae as Tt,af as dt,ag as Et,ah as Qt,ai as Dt,aj as Ut,f as Rt,ak as Ft,al as jt,C as H,am as pt,an as xt,ao as bt,ap as Pt}from"./index-CYsJ2gG-.js";import{a as Lt}from"./constant-2MSuUQN9.js";import{u as gt}from"./index-DXMw63yv.js";var v,r,B,y,D,A,T,S,V,_,k,U,F,E,N,u,W,J,X,Z,tt,et,st,it,Ot,vt,Mt=(vt=class extends St{constructor(t,e){super();b(this,u);b(this,v);b(this,r);b(this,B);b(this,y);b(this,D);b(this,A);b(this,T);b(this,S);b(this,V);b(this,_);b(this,k);b(this,U);b(this,F);b(this,E);b(this,N,new Set);this.options=e,c(this,v,t),c(this,S,null),c(this,T,ct()),this.options.experimental_prefetchInRender||s(this,T).reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(e)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(s(this,r).addObserver(this),mt(s(this,r),this.options)?d(this,u,W).call(this):this.updateResult(),d(this,u,tt).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return nt(s(this,r),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return nt(s(this,r),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,d(this,u,et).call(this),d(this,u,st).call(this),s(this,r).removeObserver(this)}setOptions(t){const e=this.options,n=s(this,r);if(this.options=s(this,v).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof w(this.options.enabled,s(this,r))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");d(this,u,it).call(this),s(this,r).setOptions(this.options),e._defaulted&&!q(this.options,e)&&s(this,v).getQueryCache().notify({type:"observerOptionsUpdated",query:s(this,r),observer:this});const o=this.hasListeners();o&&yt(s(this,r),n,this.options,e)&&d(this,u,W).call(this),this.updateResult(),o&&(s(this,r)!==n||w(this.options.enabled,s(this,r))!==w(e.enabled,s(this,r))||K(this.options.staleTime,s(this,r))!==K(e.staleTime,s(this,r)))&&d(this,u,J).call(this);const a=d(this,u,X).call(this);o&&(s(this,r)!==n||w(this.options.enabled,s(this,r))!==w(e.enabled,s(this,r))||a!==s(this,E))&&d(this,u,Z).call(this,a)}getOptimisticResult(t){const e=s(this,v).getQueryCache().build(s(this,v),t),n=this.createResult(e,t);return At(this,n)&&(c(this,y,n),c(this,A,this.options),c(this,D,s(this,r).state)),n}getCurrentResult(){return s(this,y)}trackResult(t,e){const n={};return Object.keys(t).forEach(o=>{Object.defineProperty(n,o,{configurable:!1,enumerable:!0,get:()=>(this.trackProp(o),e==null||e(o),t[o])})}),n}trackProp(t){s(this,N).add(t)}getCurrentQuery(){return s(this,r)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const e=s(this,v).defaultQueryOptions(t),n=s(this,v).getQueryCache().build(s(this,v),e);return n.fetch().then(()=>this.createResult(n,e))}fetch(t){return d(this,u,W).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),s(this,y)))}createResult(t,e){var ht;const n=s(this,r),o=this.options,a=s(this,y),l=s(this,D),R=s(this,A),j=t!==n?t.state:s(this,B),{state:p}=t;let f={...p},Q=!1,h;if(e._optimisticResults){const m=this.hasListeners(),M=!m&&mt(t,e),$=m&&yt(t,n,e,o);(M||$)&&(f={...f,...Tt(p.data,t.options)}),e._optimisticResults==="isRestoring"&&(f.fetchStatus="idle")}let{error:I,errorUpdatedAt:x,status:g}=f;if(e.select&&f.data!==void 0)if(a&&f.data===(l==null?void 0:l.data)&&e.select===s(this,V))h=s(this,_);else try{c(this,V,e.select),h=e.select(f.data),h=dt(a==null?void 0:a.data,h,e),c(this,_,h),c(this,S,null)}catch(m){c(this,S,m)}else h=f.data;if(e.placeholderData!==void 0&&h===void 0&&g==="pending"){let m;if(a!=null&&a.isPlaceholderData&&e.placeholderData===(R==null?void 0:R.placeholderData))m=a.data;else if(m=typeof e.placeholderData=="function"?e.placeholderData((ht=s(this,k))==null?void 0:ht.state.data,s(this,k)):e.placeholderData,e.select&&m!==void 0)try{m=e.select(m),c(this,S,null)}catch(M){c(this,S,M)}m!==void 0&&(g="success",h=dt(a==null?void 0:a.data,m,e),Q=!0)}s(this,S)&&(I=s(this,S),h=s(this,_),x=Date.now(),g="error");const P=f.fetchStatus==="fetching",L=g==="pending",G=g==="error",rt=L&&P,ot=h!==void 0,O={status:g,fetchStatus:f.fetchStatus,isPending:L,isSuccess:g==="success",isError:G,isInitialLoading:rt,isLoading:rt,data:h,dataUpdatedAt:f.dataUpdatedAt,error:I,errorUpdatedAt:x,failureCount:f.fetchFailureCount,failureReason:f.fetchFailureReason,errorUpdateCount:f.errorUpdateCount,isFetched:f.dataUpdateCount>0||f.errorUpdateCount>0,isFetchedAfterMount:f.dataUpdateCount>j.dataUpdateCount||f.errorUpdateCount>j.errorUpdateCount,isFetching:P,isRefetching:P&&!L,isLoadingError:G&&!ot,isPaused:f.fetchStatus==="paused",isPlaceholderData:Q,isRefetchError:G&&ot,isStale:at(t,e),refetch:this.refetch,promise:s(this,T)};if(this.options.experimental_prefetchInRender){const m=z=>{O.status==="error"?z.reject(O.error):O.data!==void 0&&z.resolve(O.data)},M=()=>{const z=c(this,T,O.promise=ct());m(z)},$=s(this,T);switch($.status){case"pending":t.queryHash===n.queryHash&&m($);break;case"fulfilled":(O.status==="error"||O.data!==$.value)&&M();break;case"rejected":(O.status!=="error"||O.error!==$.reason)&&M();break}}return O}updateResult(){const t=s(this,y),e=this.createResult(s(this,r),this.options);if(c(this,D,s(this,r).state),c(this,A,this.options),s(this,D).data!==void 0&&c(this,k,s(this,r)),q(e,t))return;c(this,y,e);const n=()=>{if(!t)return!0;const{notifyOnChangeProps:o}=this.options,a=typeof o=="function"?o():o;if(a==="all"||!a&&!s(this,N).size)return!0;const l=new Set(a??s(this,N));return this.options.throwOnError&&l.add("error"),Object.keys(s(this,y)).some(R=>{const C=R;return s(this,y)[C]!==t[C]&&l.has(C)})};d(this,u,Ot).call(this,{listeners:n()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&d(this,u,tt).call(this)}},v=new WeakMap,r=new WeakMap,B=new WeakMap,y=new WeakMap,D=new WeakMap,A=new WeakMap,T=new WeakMap,S=new WeakMap,V=new WeakMap,_=new WeakMap,k=new WeakMap,U=new WeakMap,F=new WeakMap,E=new WeakMap,N=new WeakMap,u=new WeakSet,W=function(t){d(this,u,it).call(this);let e=s(this,r).fetch(this.options,t);return t!=null&&t.throwOnError||(e=e.catch(wt)),e},J=function(){d(this,u,et).call(this);const t=K(this.options.staleTime,s(this,r));if(lt||s(this,y).isStale||!ft(t))return;const n=Ct(s(this,y).dataUpdatedAt,t)+1;c(this,U,setTimeout(()=>{s(this,y).isStale||this.updateResult()},n))},X=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(s(this,r)):this.options.refetchInterval)??!1},Z=function(t){d(this,u,st).call(this),c(this,E,t),!(lt||w(this.options.enabled,s(this,r))===!1||!ft(s(this,E))||s(this,E)===0)&&c(this,F,setInterval(()=>{(this.options.refetchIntervalInBackground||It.isFocused())&&d(this,u,W).call(this)},s(this,E)))},tt=function(){d(this,u,J).call(this),d(this,u,Z).call(this,d(this,u,X).call(this))},et=function(){s(this,U)&&(clearTimeout(s(this,U)),c(this,U,void 0))},st=function(){s(this,F)&&(clearInterval(s(this,F)),c(this,F,void 0))},it=function(){const t=s(this,v).getQueryCache().build(s(this,v),this.options);if(t===s(this,r))return;const e=s(this,r);c(this,r,t),c(this,B,t.state),this.hasListeners()&&(e==null||e.removeObserver(this),t.addObserver(this))},Ot=function(t){Et.batch(()=>{t.listeners&&this.listeners.forEach(e=>{e(s(this,y))}),s(this,v).getQueryCache().notify({query:s(this,r),type:"observerResultsUpdated"})})},vt);function $t(i,t){return w(t.enabled,i)!==!1&&i.state.data===void 0&&!(i.state.status==="error"&&t.retryOnMount===!1)}function mt(i,t){return $t(i,t)||i.state.data!==void 0&&nt(i,t,t.refetchOnMount)}function nt(i,t,e){if(w(t.enabled,i)!==!1){const n=typeof e=="function"?e(i):e;return n==="always"||n!==!1&&at(i,t)}return!1}function yt(i,t,e,n){return(i!==t||w(n.enabled,i)===!1)&&(!e.suspense||i.state.status!=="error")&&at(i,e)}function at(i,t){return w(t.enabled,i)!==!1&&i.isStaleByTime(K(t.staleTime,i))}function At(i,t){return!q(i.getCurrentResult(),t)}function _t(i=""){if(!Qt())throw new Error("vue-query hooks can only be used inside setup() function or functions that support injection context.");const t=Ut(i),e=Dt(t);if(!e)throw new Error("No 'queryClient' found in Vue context, use 'VueQueryPlugin' to properly initialize the library.");return e}function kt(i,t,e){const n=_t(),o=Rt(()=>{const h=Ft(t);typeof h.enabled=="function"&&(h.enabled=h.enabled());const I=n.defaultQueryOptions(h);return I._optimisticResults=n.isRestoring.value?"isRestoring":"optimistic",I}),a=new i(n,o.value),l=jt(a.getCurrentResult());let R=()=>{};H(n.isRestoring,h=>{h||(R(),R=a.subscribe(I=>{pt(l,I)}))},{immediate:!0});const C=()=>{a.setOptions(o.value),pt(l,a.getCurrentResult())};H(o,C),xt(()=>{R()});const j=(...h)=>(C(),l.refetch(...h)),p=()=>new Promise((h,I)=>{let x=()=>{};const g=()=>{if(o.value.enabled!==!1){a.setOptions(o.value);const P=a.getOptimisticResult(o.value);P.isStale?(x(),a.fetchOptimistic(o.value).then(h,L=>{bt(o.value.throwOnError,[L,a.getCurrentQuery()])?I(L):h(a.getCurrentResult())})):(x(),h(P))}};g(),x=H(o,g)});H(()=>l.error,h=>{if(l.isError&&!l.isFetching&&bt(o.value.throwOnError,[h,a.getCurrentQuery()]))throw h});const Q=Pt(l);for(const h in l)typeof l[h]=="function"&&(Q[h]=l[h]);return Q.suspense=p,Q.refetch=j,Q}function Nt(i,t){return kt(Mt,i)}const Wt=3;async function Bt(i,t){const e=i.startsWith("/")?i.slice(1):i;let n=`${window.DATA_HOST}${e}`;const o={allInOne:!1};if(n.includes("#")){const p=new URLSearchParams(n.split("#")[1]);o.allInOne=p.get("allInOne")==="true",n=n.split("#")[0]}i.startsWith("http")&&(n=i),n.endsWith("/")&&(n=n.slice(0,-1));const a=p=>p.includes("?")?`${p}&t=${t??0}`:`${p}?t=${t??0}`,l=o.allInOne?[await fetch(a(n))]:[await fetch(a(`${n}/config.json`)),await fetch(a(`${n}/team.json`)),await fetch(a(`${n}/run.json`))],{status:R,statusText:C}=l[0];if(R>=300||R<200)throw new Error(`fetch data failed. [status=${R}] [statusText=${C}]`);return Promise.all(l.map(p=>p.json())).then(p=>o.allInOne?p[0]:{contest:p[0],teams:p[1],submissions:p[2]})}function Yt(i,t,e=!1){let n=3e4,o=n;const a=Rt(()=>Math.floor(t.value.getTime()/1e3/10));return Lt.value==="I18N"&&(n=10*1e3,o=n),e&&(n=Number.POSITIVE_INFINITY,o=!1),Nt({queryKey:[i,a.value],queryFn:()=>Bt(i,a.value),retry:Wt,staleTime:n,refetchInterval:o})}function qt(){return gt("data-source","",{transform:String})}function Jt(){return gt("battle-of-giants","",{transform:String})}export{Jt as a,qt as g,Yt as u};
@@ -1 +0,0 @@
1
- import{au as m,p as r,f as t}from"./index-CYsJ2gG-.js";const f=m("user",()=>{const e=r(""),s=r(new Set),u=t(()=>Array.from(s.value)),o=t(()=>u.value.filter(a=>a!==e.value));function n(a){e.value&&s.value.add(e.value),e.value=a}return{setNewName:n,otherNames:o,savedName:e}});export{f as u};
@@ -1 +0,0 @@
1
- import{_ as u}from"./index-CYsJ2gG-.js";function _(c={}){const{immediate:o=!1,onNeedRefresh:p,onOfflineReady:a,onRegistered:r,onRegisteredSW:s,onRegisterError:t}=c;let i,n;const d=async(e=!0)=>{await n};async function l(){if("serviceWorker"in navigator){if(i=await u(async()=>{const{Workbox:e}=await import("./workbox-window.prod.es5-B9K5rw8f.js");return{Workbox:e}},[],import.meta.url).then(({Workbox:e})=>new e("/sw.js",{scope:"/",type:"classic"})).catch(e=>{t==null||t(e)}),!i)return;i.addEventListener("activated",e=>{(e.isUpdate||e.isExternal)&&window.location.reload()}),i.addEventListener("installed",e=>{e.isUpdate||a==null||a()}),i.register({immediate:o}).then(e=>{s?s("/sw.js",e):r==null||r(e)}).catch(e=>{t==null||t(e)})}}return n=l(),d}export{_ as registerSW};
@@ -1,2 +0,0 @@
1
- try{self["workbox:window:7.2.0"]&&_()}catch{}function E(n,r){return new Promise(function(t){var i=new MessageChannel;i.port1.onmessage=function(c){t(c.data)},n.postMessage(r,[i.port2])})}function W(n){var r=function(t,i){if(typeof t!="object"||!t)return t;var c=t[Symbol.toPrimitive];if(c!==void 0){var h=c.call(t,i);if(typeof h!="object")return h;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n,"string");return typeof r=="symbol"?r:r+""}function k(n,r){for(var t=0;t<r.length;t++){var i=r[t];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,W(i.key),i)}}function P(n,r){return P=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,i){return t.__proto__=i,t},P(n,r)}function j(n,r){(r==null||r>n.length)&&(r=n.length);for(var t=0,i=new Array(r);t<r;t++)i[t]=n[t];return i}function L(n,r){var t=typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(t)return(t=t.call(n)).next.bind(t);if(Array.isArray(n)||(t=function(c,h){if(c){if(typeof c=="string")return j(c,h);var l=Object.prototype.toString.call(c).slice(8,-1);return l==="Object"&&c.constructor&&(l=c.constructor.name),l==="Map"||l==="Set"?Array.from(c):l==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(l)?j(c,h):void 0}}(n))||r){t&&(n=t);var i=0;return function(){return i>=n.length?{done:!0}:{done:!1,value:n[i++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
2
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}try{self["workbox:core:7.2.0"]&&_()}catch{}var w=function(){var n=this;this.promise=new Promise(function(r,t){n.resolve=r,n.reject=t})};function b(n,r){var t=location.href;return new URL(n,t).href===new URL(r,t).href}var g=function(n,r){this.type=n,Object.assign(this,r)};function d(n,r,t){return t?r?r(n):n:(n&&n.then||(n=Promise.resolve(n)),r?n.then(r):n)}function O(){}var x={type:"SKIP_WAITING"};function S(n,r){return n&&n.then?n.then(O):Promise.resolve()}var U=function(n){function r(v,u){var e,o;return u===void 0&&(u={}),(e=n.call(this)||this).nn={},e.tn=0,e.rn=new w,e.en=new w,e.on=new w,e.un=0,e.an=new Set,e.cn=function(){var s=e.fn,a=s.installing;e.tn>0||!b(a.scriptURL,e.sn.toString())||performance.now()>e.un+6e4?(e.vn=a,s.removeEventListener("updatefound",e.cn)):(e.hn=a,e.an.add(a),e.rn.resolve(a)),++e.tn,a.addEventListener("statechange",e.ln)},e.ln=function(s){var a=e.fn,f=s.target,p=f.state,m=f===e.vn,y={sw:f,isExternal:m,originalEvent:s};!m&&e.mn&&(y.isUpdate=!0),e.dispatchEvent(new g(p,y)),p==="installed"?e.wn=self.setTimeout(function(){p==="installed"&&a.waiting===f&&e.dispatchEvent(new g("waiting",y))},200):p==="activating"&&(clearTimeout(e.wn),m||e.en.resolve(f))},e.yn=function(s){var a=e.hn,f=a!==navigator.serviceWorker.controller;e.dispatchEvent(new g("controlling",{isExternal:f,originalEvent:s,sw:a,isUpdate:e.mn})),f||e.on.resolve(a)},e.gn=(o=function(s){var a=s.data,f=s.ports,p=s.source;return d(e.getSW(),function(){e.an.has(p)&&e.dispatchEvent(new g("message",{data:a,originalEvent:s,ports:f,sw:p}))})},function(){for(var s=[],a=0;a<arguments.length;a++)s[a]=arguments[a];try{return Promise.resolve(o.apply(this,s))}catch(f){return Promise.reject(f)}}),e.sn=v,e.nn=u,navigator.serviceWorker.addEventListener("message",e.gn),e}var t,i;i=n,(t=r).prototype=Object.create(i.prototype),t.prototype.constructor=t,P(t,i);var c,h,l=r.prototype;return l.register=function(v){var u=(v===void 0?{}:v).immediate,e=u!==void 0&&u;try{var o=this;return d(function(s,a){var f=s();return f&&f.then?f.then(a):a(f)}(function(){if(!e&&document.readyState!=="complete")return S(new Promise(function(s){return window.addEventListener("load",s)}))},function(){return o.mn=!!navigator.serviceWorker.controller,o.dn=o.pn(),d(o.bn(),function(s){o.fn=s,o.dn&&(o.hn=o.dn,o.en.resolve(o.dn),o.on.resolve(o.dn),o.dn.addEventListener("statechange",o.ln,{once:!0}));var a=o.fn.waiting;return a&&b(a.scriptURL,o.sn.toString())&&(o.hn=a,Promise.resolve().then(function(){o.dispatchEvent(new g("waiting",{sw:a,wasWaitingBeforeRegister:!0}))}).then(function(){})),o.hn&&(o.rn.resolve(o.hn),o.an.add(o.hn)),o.fn.addEventListener("updatefound",o.cn),navigator.serviceWorker.addEventListener("controllerchange",o.yn),o.fn})}))}catch(s){return Promise.reject(s)}},l.update=function(){try{return this.fn?d(S(this.fn.update())):d()}catch(v){return Promise.reject(v)}},l.getSW=function(){return this.hn!==void 0?Promise.resolve(this.hn):this.rn.promise},l.messageSW=function(v){try{return d(this.getSW(),function(u){return E(u,v)})}catch(u){return Promise.reject(u)}},l.messageSkipWaiting=function(){this.fn&&this.fn.waiting&&E(this.fn.waiting,x)},l.pn=function(){var v=navigator.serviceWorker.controller;return v&&b(v.scriptURL,this.sn.toString())?v:void 0},l.bn=function(){try{var v=this;return d(function(u,e){try{var o=u()}catch(s){return e(s)}return o&&o.then?o.then(void 0,e):o}(function(){return d(navigator.serviceWorker.register(v.sn,v.nn),function(u){return v.un=performance.now(),u})},function(u){throw u}))}catch(u){return Promise.reject(u)}},c=r,(h=[{key:"active",get:function(){return this.en.promise}},{key:"controlling",get:function(){return this.on.promise}}])&&k(c.prototype,h),Object.defineProperty(c,"prototype",{writable:!1}),c}(function(){function n(){this.Pn=new Map}var r=n.prototype;return r.addEventListener=function(t,i){this.jn(t).add(i)},r.removeEventListener=function(t,i){this.jn(t).delete(i)},r.dispatchEvent=function(t){t.target=this;for(var i,c=L(this.jn(t.type));!(i=c()).done;)(0,i.value)(t)},r.jn=function(t){return this.Pn.has(t)||this.Pn.set(t,new Set),this.Pn.get(t)},n}());export{U as Workbox,g as WorkboxEvent,E as messageSW};