function __vite__mapDeps(indexes) { if (!__vite__mapDeps.viteFileDeps) { __vite__mapDeps.viteFileDeps = ["./ai.CpYIZhOY.js","./SafeIcon.vue.BDcPo_mo.js","./Footer.vue.2xBXxw5h.js","./nuxt-link.sHp60w4E.js","./ai.C-C7v7Qn.css","./_type_.CZpDqcCu.js","./StyledLink.vue.Bfah9Gn7.js","./loadingBar.CY2HullU.js","./_commonjsHelpers.BosuxZz1.js","./loadingBar.DFEpitOt.css","./callback.Q9uhRXTV.js","./_id_.CjZbGdZe.js","./ErrorBanner.vue.DPay8c81.js","./DeckSelector.vue.DCMhbOV-.js","./transition.CmQdahoH.js","./keyboard.ByfE0G_y.js","./open-closed.sdySVmhb.js","./env.DaWd-ERT.js","./dialog.4oCZ_M34.js","./portal.B_Y3muFE.js","./hidden.DcY_hcDg.js","./CardButton.vue.CEVzhRY4.js","./Loading.D1A5vOPK.js","./DeckButton.vue.CPV7mk0b.js","./helpers.2e_jRVUR.js","./TrackButton.vue.mBVdWej2.js","./Avatar.vue.D7C8XhRc.js","./index.CPZVfTNk.js","./ClassroomPointGoalSelector.vue.13U--xHi.js","./betterRPC.CqYzKsQ3.js","./contact.B_kbhLNp.js","./files.CH739StK.js","./ProgressBar.vue.Be1RWCc1.js","./MediaDisplay.vue.CeP7A8ha.js","./asyncData.Cq14hwYe.js","./index.RRb8N6Js.js","./OnboardingTasks.vue.BGNWiUnS.js","./onboarding.B2bF--O1.js","./spaceResourceContext.B0EiNlao.js","./DarkModeToggle.vue.L0Ch5Bjw.js","./composables.B1c3Cx1P.js","./formatNum.2N5SPdLQ.js","./StyledButtonLink.vue.BonKmkHa.js","./IconPencil.BtAiT75B.js","./createVueComponent.DKqXQh7C.js","./EditDailyGoalButton.vue.DbUEzqZz.js","./popover.CsPq7YAt.js","./use-resolve-button-type.c75HUMIm.js","./StyledFadedDiv.vue.DPSh17aD.js","./Carousel.vue.Dkx_uksE.js","./IconChevronRight.ydgtoWHd.js","./Carousel.yZQEUcGD.css","./DeckPreview.vue.-FmwscSN.js","./IconCards.S8kRpqrW.js","./IconTrash.BMalfAqf.js","./IconHash.CwGP2BFb.js","./IconCheck.xPjtbvYD.js","./IconX.BM5sPq37.js","./IconFileText.BcFX1XDT.js","./IconCertificate.Dad-3Agc.js","./IconSparkles.vK5Sn6m8.js","./IconFlame.Cbcknb2V.js","./index.BZHpM4oa.css","./settings.C5dSH-a2.js","./switch.DRBs7Cd_.js","./form.DqKxCnKt.js","./GooglePlayBillingButton.vue.DcJi0o4w.js","./pro.hqbVbRHD.js","./settings.yP9N49dw.css","./_id_.DjufeNcS.js","./IconBook.DkmtEoSJ.js","./ResourceAddToLibraryButton.vue.NDjAC1PW.js","./userLibrary.DIXo-1Q0.js","./disclosure.DD5OVkP8.js","./InstantAnswerContainer.DTIpUPOJ.js","./InstantAnswerMessage.vue.CJ2NHbY2.js","./KitSquare.vue.TKvdjpvc.js","./Markdown.vue.BxJUCwSC.js","./kitAssist.BrKALSjH.js","./TestSwitch.vue.Cy-SCnO4.js","./InstantAnswerCollapsible.vue.CxPe8Ut6.js","./search.DTcjPPkM.js","./IconChevronDown.DRdALcNI.js","./InstantAnswerContainer.BglGdfAp.css","./SpeechSettings.vue.D41jF-re.js","./SpeechVoiceSelect.vue.oGy9c31J.js","./DeckCardListItem.vue.CDisytfa.js","./RichTextRenderer.DlnTiAMj.js","./SafeHtml.vue.BQ0YbmZ4.js","./RichTextRenderer.D3ZyqIVM.css","./IconDeviceGamepad.DYjHgtmy.js","./_id_.B5v2JAJL.js","./TagInput.vue.CkPCMz0G.js","./combobox.B07Yv4ol.js","./ResourceLinker.vue.CfkSn3bj.js","./CardImporter.vue.ClSgubyn.js","./SupporterFeatureCard.vue.BvxkIaWU.js","./transformers.BtQ2fV4w.js","./MediaUploader.vue.WZsWdyBV.js","./tabs.C-ZU1Xk5.js","./IconSearch.CzmNs_Ew.js","./MediaUploader.CxRjfNos.css","./_id_.C8ZONDX3.css","./index.BvXpMRnv.js","./IconPlus.C94miIAy.js","./search.Difaxmam.js","./_id_.CdH1a-73.js","./tiptap-markdown.es.5TG5bRfj.js","./notes.-Rq8fJ_E.js","./index.BY8-yLcm.js","./index.nYyux0kH.js","./katex.TTlFrSdt.js","./tiptap-markdown.DY_HmMAb.css","./KitIcon.vue.BSePTPsz.js","./ExploreResultCard.vue.vGWk-d7c.js","./TestAutoResizeTextArea.vue.D4vTWMN2.js","./index.CYviCAVX.js","./index.9OpoljAW.js","./index.C5w-bpgP.js","./index.BsYjz7li.js","./index.BkDrb0R_.js","./index.By5CEsNn.js","./index.BBkrQhUv.js","./_id_.s53snhP2.css","./katex.B66fnj69.css","./index.ybhOe_w4.js","./educators.DLFjb9sG.js","./Header.vue._BOAAIan.js","./TestimonialGrid.vue.-zqfUcR5.js","./educators.T3tUge0O.css","./externalresource.8B_tyqvq.js","./taskState.DEILOiqE.js","./index.CkO_QRKG.js","./games.BOVK4ADv.js","./marketing.CFRREiPk.js","./marketing.DPc1LsTd.css","./solo.vKKx7BLb.js","./lessons.oJfQ6t7p.js","./points.Bu269_Se.js","./spellbook.vHMLaavQ.js","./spellbook.8LL7eIOc.css","./index.DzYO1etx.js","./FeatureGrid.BSCVbcAT.js","./topics.C7LYsv37.js","./index.CwulTbu1.css","./_invite-id_.BSB_bSYp.js","./join.DE_sXh5T.js","./legal.BMHHz7_9.js","./library.Lc6ivic7.js","./ResourcePreview.vue.C3JAV3Nd.js","./deck.d1X2OHK5.js","./SubjectInput.vue.er3ni7Sp.js","./index.DoR6OtSl.js","./purchase.DH-doSLi.js","./confetti.QcwWLIPE.js","./index.KVnch9Mj.js","./index.CTMFMfkX.css","./index2.Dfv79-Gu.js","./index.Da8eskq7.js","./anime.es.CCJAq9PX.js","./howler.6FC8xqJb.js","./_id_.BDbWc1ge.js","./TickedMenu.vue.nHcRigCG.js","./IconStack2.CNZBGDi5.js","./PercentCircle.CuTC3UYI.js","./PercentCircle.DnEDhuhy.css","./StreakMessageCard.vue.3FOb2ehR.js","./index.G3e723Gj.js","./IconLogout.eQYEGaDs.js","./support-us.DDE7Z5-V.js","./IconUserPlus.C_d9H_mK.js","./IconHeartHandshake.DdnoYvDr.js","./IconGift.CQVzajNi.js","./support-us.219ZvyIT.css","./index.C_YhPGeT.js","./IncompatibleResourcesCard.vue.CvGG6ZoH.js","./ListLoader.vue.kBN-3VcM.js","./reader.-aHvRf6O.js","./TestFeedback.vue.B0D3juQM.js","./headlessTestCreator.ZCOpJOSM.js","./TestFillInTheBlank.DRjIn-_b.js","./TestMediaMatch.vTXvo8uJ.js","./testTypes.BCWIn9v0.js","./index.CRlyWIzD.js","./IconSelectAll.C2MSKAe7.js","./reader.DAoeF2fO.js","./vocab.C7TkEs35.js","./TrackCustomizer.vue.nHzotKUZ.js","./SupporterBadge.oS4LsALq.js","./CheckButton.vue.C7OBd2r5.js","./TrackCustomizer.BKWdH4uO.css","./index.dZrzvxSc.js","./test.CSmZoO8G.js","./_id_.D9fwBMp7.js","./index.B_hlx-3y.js","./DocImporter.vue.zVvTLl5T.js","./_id_.W5d0pooX.js","./start.SJvg7Ot4.js","./topicweb.CwmrrUso.js","./topicweb.d1QValSI.css","./_event_id_.CB44iV9u.js","./EventCreatePopup.vue.BqKiOHit.js","./PointsGoalSelector.vue.DlPd9yYk.js","./IconRoute.Cf8rfHtc.js","./IconCalendarEvent.DLWmwNhv.js","./_event_id_.DscobpX-.css","./index.IssM-9Ic.js","./EventPreview.vue.BkuuoeLu.js","./index.9Ws2-8wR.css","./compare.Bvti5UiV.js","./index.BwTHws6e.js","./_id_.CpZFIGtS.js","./new.C-hoFGhO.js","./search.D_1ZmFPJ.js","./zen.DBIldFqH.js","./zenSounds.DXX95AVP.js","./zenSounds.BERXNOXA.css","./zen.BHqYdKfI.css","./default.C8yz2l4f.js","./ConnectionBar.vue.Dw9tuyRT.js","./Palette.vue.Bvazpcp_.js","./game.CJ0E8s3Q.js","./index.CCbQsnNm.js","./game.Dfrj25di.css","./sidebar.COmbzpqf.js","./sidebar.D3e7h72F.css","./space.D2Bmbw0J.js","./task.Bb3ZjAqs.js","./sweetalert2.all.min.C8r_a7YB.js","./colyseus.CEN3tPL7.js","./browser.Bdhvn36h.js","./DailyGoalComplete.i5oWpxxF.js","./OnboardingNotification.Cy02L3ww.js","./PMFSurvey.DL1qwr-m.js","./error-404.lh6LsQiF.js","./error-404.1d3lYc-Y.css","./error-500.B0OvtOQi.js","./error-500.CkXysO2F.css"] } return indexes.map((i) => __vite__mapDeps.viteFileDeps[i]) } var Pv=Object.defineProperty;var Rv=(e,t,n)=>t in e?Pv(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Ss=(e,t,n)=>(Rv(e,typeof t!="symbol"?t+"":t,n),n);/** * @vue/shared v3.4.21 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT **/function Fl(e,t){const n=new Set(e.split(","));return t?r=>n.has(r.toLowerCase()):r=>n.has(r)}const Oe={},qr=[],cn=()=>{},Ov=()=>!1,ao=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),$l=e=>e.startsWith("onUpdate:"),De=Object.assign,Ul=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},Av=Object.prototype.hasOwnProperty,ge=(e,t)=>Av.call(e,t),ee=Array.isArray,Wr=e=>ms(e)==="[object Map]",vs=e=>ms(e)==="[object Set]",Wc=e=>ms(e)==="[object Date]",Cv=e=>ms(e)==="[object RegExp]",ae=e=>typeof e=="function",Le=e=>typeof e=="string",Qn=e=>typeof e=="symbol",Pe=e=>e!==null&&typeof e=="object",Hl=e=>(Pe(e)||ae(e))&&ae(e.then)&&ae(e.catch),Qf=Object.prototype.toString,ms=e=>Qf.call(e),Lv=e=>ms(e).slice(8,-1),Zf=e=>ms(e)==="[object Object]",Vl=e=>Le(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,Kr=Fl(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Ei=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},Iv=/-(\w)/g,yn=Ei(e=>e.replace(Iv,(t,n)=>n?n.toUpperCase():"")),xv=/\B([A-Z])/g,er=Ei(e=>e.replace(xv,"-$1").toLowerCase()),Si=Ei(e=>e.charAt(0).toUpperCase()+e.slice(1)),Xi=Ei(e=>e?`on${Si(e)}`:""),kn=(e,t)=>!Object.is(e,t),zr=(e,t)=>{for(let n=0;n{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value:n})},zs=e=>{const t=parseFloat(e);return isNaN(t)?e:t},ed=e=>{const t=Le(e)?Number(e):NaN;return isNaN(t)?e:t};let Kc;const td=()=>Kc||(Kc=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function ki(e){if(ee(e)){const t={};for(let n=0;n{if(n){const r=n.split(jv);r.length>1&&(t[r[0].trim()]=r[1].trim())}}),t}function lo(e){let t="";if(Le(e))t=e;else if(ee(e))for(let n=0;nyr(n,t))}const Vv=e=>Le(e)?e:e==null?"":ee(e)||Pe(e)&&(e.toString===Qf||!ae(e.toString))?JSON.stringify(e,rd,2):String(e),rd=(e,t)=>t&&t.__v_isRef?rd(e,t.value):Wr(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[r,s],o)=>(n[Qi(r,o)+" =>"]=s,n),{})}:vs(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>Qi(n))}:Qn(t)?Qi(t):Pe(t)&&!ee(t)&&!Zf(t)?String(t):t,Qi=(e,t="")=>{var n;return Qn(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};/** * @vue/reactivity v3.4.21 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT **/let nn;class sd{constructor(t=!1){this.detached=t,this._active=!0,this.effects=[],this.cleanups=[],this.parent=nn,!t&&nn&&(this.index=(nn.scopes||(nn.scopes=[])).push(this)-1)}get active(){return this._active}run(t){if(this._active){const n=nn;try{return nn=this,t()}finally{nn=n}}}on(){nn=this}off(){nn=this.parent}stop(t){if(this._active){let n,r;for(n=0,r=this.effects.length;n=4))break}this._dirtyLevel===1&&(this._dirtyLevel=0),Tr()}return this._dirtyLevel>=4}set dirty(t){this._dirtyLevel=t?4:0}run(){if(this._dirtyLevel=0,!this.active)return this.fn();let t=Jn,n=pr;try{return Jn=!0,pr=this,this._runnings++,zc(this),this.fn()}finally{Gc(this),this._runnings--,pr=n,Jn=t}}stop(){var t;this.active&&(zc(this),Gc(this),(t=this.onStop)==null||t.call(this),this.active=!1)}}function Wv(e){return e.value}function zc(e){e._trackId++,e._depsLength=0}function Gc(e){if(e.deps.length>e._depsLength){for(let t=e._depsLength;t{const n=new Map;return n.cleanup=e,n.computed=t,n},ei=new WeakMap,vr=Symbol(""),Ya=Symbol("");function ct(e,t,n){if(Jn&&pr){let r=ei.get(e);r||ei.set(e,r=new Map);let s=r.get(n);s||r.set(n,s=cd(()=>r.delete(n))),ad(pr,s)}}function Ln(e,t,n,r,s,o){const i=ei.get(e);if(!i)return;let a=[];if(t==="clear")a=[...i.values()];else if(n==="length"&&ee(e)){const l=Number(r);i.forEach((u,c)=>{(c==="length"||!Qn(c)&&c>=l)&&a.push(u)})}else switch(n!==void 0&&a.push(i.get(n)),t){case"add":ee(e)?Vl(n)&&a.push(i.get("length")):(a.push(i.get(vr)),Wr(e)&&a.push(i.get(Ya)));break;case"delete":ee(e)||(a.push(i.get(vr)),Wr(e)&&a.push(i.get(Ya)));break;case"set":Wr(e)&&a.push(i.get(vr));break}zl();for(const l of a)l&&ld(l,4);Gl()}function Kv(e,t){var n;return(n=ei.get(e))==null?void 0:n.get(t)}const zv=Fl("__proto__,__v_isRef,__isVue"),ud=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(Qn)),Jc=Gv();function Gv(){const e={};return["includes","indexOf","lastIndexOf"].forEach(t=>{e[t]=function(...n){const r=ve(this);for(let o=0,i=this.length;o{e[t]=function(...n){kr(),zl();const r=ve(this)[t].apply(this,n);return Gl(),Tr(),r}}),e}function Jv(e){const t=ve(this);return ct(t,"has",e),t.hasOwnProperty(e)}class fd{constructor(t=!1,n=!1){this._isReadonly=t,this._isShallow=n}get(t,n,r){const s=this._isReadonly,o=this._isShallow;if(n==="__v_isReactive")return!s;if(n==="__v_isReadonly")return s;if(n==="__v_isShallow")return o;if(n==="__v_raw")return r===(s?o?lm:vd:o?pd:hd).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(r)?t:void 0;const i=ee(t);if(!s){if(i&&ge(Jc,n))return Reflect.get(Jc,n,r);if(n==="hasOwnProperty")return Jv}const a=Reflect.get(t,n,r);return(Qn(n)?ud.has(n):zv(n))||(s||ct(t,"get",n),o)?a:we(a)?i&&Vl(n)?a:a.value:Pe(a)?s?ze(a):Ee(a):a}}class dd extends fd{constructor(t=!1){super(!1,t)}set(t,n,r,s){let o=t[n];if(!this._isShallow){const l=Tn(o);if(!ti(r)&&!Tn(r)&&(o=ve(o),r=ve(r)),!ee(t)&&we(o)&&!we(r))return l?!1:(o.value=r,!0)}const i=ee(t)&&Vl(n)?Number(n)e,Ti=e=>Reflect.getPrototypeOf(e);function Po(e,t,n=!1,r=!1){e=e.__v_raw;const s=ve(e),o=ve(t);n||(kn(t,o)&&ct(s,"get",t),ct(s,"get",o));const{has:i}=Ti(s),a=r?Jl:n?Zl:Gs;if(i.call(s,t))return a(e.get(t));if(i.call(s,o))return a(e.get(o));e!==s&&e.get(t)}function Ro(e,t=!1){const n=this.__v_raw,r=ve(n),s=ve(e);return t||(kn(e,s)&&ct(r,"has",e),ct(r,"has",s)),e===s?n.has(e):n.has(e)||n.has(s)}function Oo(e,t=!1){return e=e.__v_raw,!t&&ct(ve(e),"iterate",vr),Reflect.get(e,"size",e)}function Yc(e){e=ve(e);const t=ve(this);return Ti(t).has.call(t,e)||(t.add(e),Ln(t,"add",e,e)),this}function Xc(e,t){t=ve(t);const n=ve(this),{has:r,get:s}=Ti(n);let o=r.call(n,e);o||(e=ve(e),o=r.call(n,e));const i=s.call(n,e);return n.set(e,t),o?kn(t,i)&&Ln(n,"set",e,t):Ln(n,"add",e,t),this}function Qc(e){const t=ve(this),{has:n,get:r}=Ti(t);let s=n.call(t,e);s||(e=ve(e),s=n.call(t,e)),r&&r.call(t,e);const o=t.delete(e);return s&&Ln(t,"delete",e,void 0),o}function Zc(){const e=ve(this),t=e.size!==0,n=e.clear();return t&&Ln(e,"clear",void 0,void 0),n}function Ao(e,t){return function(r,s){const o=this,i=o.__v_raw,a=ve(i),l=t?Jl:e?Zl:Gs;return!e&&ct(a,"iterate",vr),i.forEach((u,c)=>r.call(s,l(u),l(c),o))}}function Co(e,t,n){return function(...r){const s=this.__v_raw,o=ve(s),i=Wr(o),a=e==="entries"||e===Symbol.iterator&&i,l=e==="keys"&&i,u=s[e](...r),c=n?Jl:t?Zl:Gs;return!t&&ct(o,"iterate",l?Ya:vr),{next(){const{value:f,done:d}=u.next();return d?{value:f,done:d}:{value:a?[c(f[0]),c(f[1])]:c(f),done:d}},[Symbol.iterator](){return this}}}}function Mn(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function em(){const e={get(o){return Po(this,o)},get size(){return Oo(this)},has:Ro,add:Yc,set:Xc,delete:Qc,clear:Zc,forEach:Ao(!1,!1)},t={get(o){return Po(this,o,!1,!0)},get size(){return Oo(this)},has:Ro,add:Yc,set:Xc,delete:Qc,clear:Zc,forEach:Ao(!1,!0)},n={get(o){return Po(this,o,!0)},get size(){return Oo(this,!0)},has(o){return Ro.call(this,o,!0)},add:Mn("add"),set:Mn("set"),delete:Mn("delete"),clear:Mn("clear"),forEach:Ao(!0,!1)},r={get(o){return Po(this,o,!0,!0)},get size(){return Oo(this,!0)},has(o){return Ro.call(this,o,!0)},add:Mn("add"),set:Mn("set"),delete:Mn("delete"),clear:Mn("clear"),forEach:Ao(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach(o=>{e[o]=Co(o,!1,!1),n[o]=Co(o,!0,!1),t[o]=Co(o,!1,!0),r[o]=Co(o,!0,!0)}),[e,n,t,r]}const[tm,nm,rm,sm]=em();function Yl(e,t){const n=t?e?sm:rm:e?nm:tm;return(r,s,o)=>s==="__v_isReactive"?!e:s==="__v_isReadonly"?e:s==="__v_raw"?r:Reflect.get(ge(n,s)&&s in r?n:r,s,o)}const om={get:Yl(!1,!1)},im={get:Yl(!1,!0)},am={get:Yl(!0,!1)},hd=new WeakMap,pd=new WeakMap,vd=new WeakMap,lm=new WeakMap;function cm(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function um(e){return e.__v_skip||!Object.isExtensible(e)?0:cm(Lv(e))}function Ee(e){return Tn(e)?e:Xl(e,!1,Xv,om,hd)}function In(e){return Xl(e,!1,Zv,im,pd)}function ze(e){return Xl(e,!0,Qv,am,vd)}function Xl(e,t,n,r,s){if(!Pe(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const o=s.get(e);if(o)return o;const i=um(e);if(i===0)return e;const a=new Proxy(e,i===2?r:n);return s.set(e,a),a}function mr(e){return Tn(e)?mr(e.__v_raw):!!(e&&e.__v_isReactive)}function Tn(e){return!!(e&&e.__v_isReadonly)}function ti(e){return!!(e&&e.__v_isShallow)}function md(e){return mr(e)||Tn(e)}function ve(e){const t=e&&e.__v_raw;return t?ve(t):e}function Ql(e){return Object.isExtensible(e)&&Zo(e,"__v_skip",!0),e}const Gs=e=>Pe(e)?Ee(e):e,Zl=e=>Pe(e)?ze(e):e;class gd{constructor(t,n,r,s){this.getter=t,this._setter=n,this.dep=void 0,this.__v_isRef=!0,this.__v_isReadonly=!1,this.effect=new Kl(()=>t(this._value),()=>Gr(this,this.effect._dirtyLevel===2?2:3)),this.effect.computed=this,this.effect.active=this._cacheable=!s,this.__v_isReadonly=r}get value(){const t=ve(this);return(!t._cacheable||t.effect.dirty)&&kn(t._value,t._value=t.effect.run())&&Gr(t,4),ec(t),t.effect._dirtyLevel>=2&&Gr(t,2),t._value}set value(t){this._setter(t)}get _dirty(){return this.effect.dirty}set _dirty(t){this.effect.dirty=t}}function fm(e,t,n=!1){let r,s;const o=ae(e);return o?(r=e,s=cn):(r=e.get,s=e.set),new gd(r,s,o||!s,n)}function ec(e){var t;Jn&&pr&&(e=ve(e),ad(pr,(t=e.dep)!=null?t:e.dep=cd(()=>e.dep=void 0,e instanceof gd?e:void 0)))}function Gr(e,t=4,n){e=ve(e);const r=e.dep;r&&ld(r,t)}function we(e){return!!(e&&e.__v_isRef===!0)}function S(e){return yd(e,!1)}function be(e){return yd(e,!0)}function yd(e,t){return we(e)?e:new dm(e,t)}class dm{constructor(t,n){this.__v_isShallow=n,this.dep=void 0,this.__v_isRef=!0,this._rawValue=n?t:ve(t),this._value=n?t:Gs(t)}get value(){return ec(this),this._value}set value(t){const n=this.__v_isShallow||ti(t)||Tn(t);t=n?t:ve(t),kn(t,this._rawValue)&&(this._rawValue=t,this._value=n?t:Gs(t),Gr(this,4))}}function hO(e){Gr(e,4)}function oe(e){return we(e)?e.value:e}const hm={get:(e,t,n)=>oe(Reflect.get(e,t,n)),set:(e,t,n,r)=>{const s=e[t];return we(s)&&!we(n)?(s.value=n,!0):Reflect.set(e,t,n,r)}};function wd(e){return mr(e)?e:new Proxy(e,hm)}class pm{constructor(t){this.dep=void 0,this.__v_isRef=!0;const{get:n,set:r}=t(()=>ec(this),()=>Gr(this));this._get=n,this._set=r}get value(){return this._get()}set value(t){this._set(t)}}function Pr(e){return new pm(e)}function ni(e){const t=ee(e)?new Array(e.length):{};for(const n in e)t[n]=bd(e,n);return t}class vm{constructor(t,n,r){this._object=t,this._key=n,this._defaultValue=r,this.__v_isRef=!0}get value(){const t=this._object[this._key];return t===void 0?this._defaultValue:t}set value(t){this._object[this._key]=t}get dep(){return Kv(ve(this._object),this._key)}}class mm{constructor(t){this._getter=t,this.__v_isRef=!0,this.__v_isReadonly=!0}get value(){return this._getter()}}function tc(e,t,n){return we(e)?e:ae(e)?new mm(e):Pe(e)&&arguments.length>1?bd(e,t,n):S(e)}function bd(e,t,n){const r=e[t];return we(r)?r:new vm(e,t,n)}/** * @vue/runtime-core v3.4.21 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT **/function Yn(e,t,n,r){try{return r?e(...r):e()}catch(s){gs(s,t,n)}}function fn(e,t,n,r){if(ae(e)){const o=Yn(e,t,n,r);return o&&Hl(o)&&o.catch(i=>{gs(i,t,n)}),o}const s=[];for(let o=0;o>>1,s=Qe[r],o=Ys(s);oSn&&Qe.splice(t,1)}function Qa(e){ee(e)?Jr.push(...e):(!Hn||!Hn.includes(e,e.allowRecurse?cr+1:cr))&&Jr.push(e),Ed()}function eu(e,t,n=Js?Sn+1:0){for(;nYs(n)-Ys(r));if(Jr.length=0,Hn){Hn.push(...t);return}for(Hn=t,cr=0;cre.id==null?1/0:e.id,bm=(e,t)=>{const n=Ys(e)-Ys(t);if(n===0){if(e.pre&&!t.pre)return-1;if(t.pre&&!e.pre)return 1}return n};function Sd(e){Xa=!1,Js=!0,Qe.sort(bm);try{for(Sn=0;SnLe(h)?h.trim():h)),f&&(s=n.map(zs))}let a,l=r[a=Xi(t)]||r[a=Xi(yn(t))];!l&&o&&(l=r[a=Xi(er(t))]),l&&fn(l,e,6,s);const u=r[a+"Once"];if(u){if(!e.emitted)e.emitted={};else if(e.emitted[a])return;e.emitted[a]=!0,fn(u,e,6,s)}}function kd(e,t,n=!1){const r=t.emitsCache,s=r.get(e);if(s!==void 0)return s;const o=e.emits;let i={},a=!1;if(!ae(e)){const l=u=>{const c=kd(u,t,!0);c&&(a=!0,De(i,c))};!n&&t.mixins.length&&t.mixins.forEach(l),e.extends&&l(e.extends),e.mixins&&e.mixins.forEach(l)}return!o&&!a?(Pe(e)&&r.set(e,null),null):(ee(o)?o.forEach(l=>i[l]=null):De(i,o),Pe(e)&&r.set(e,i),i)}function Ri(e,t){return!e||!ao(t)?!1:(t=t.slice(2).replace(/Once$/,""),ge(e,t[0].toLowerCase()+t.slice(1))||ge(e,er(t))||ge(e,t))}let Me=null,Oi=null;function si(e){const t=Me;return Me=e,Oi=e&&e.type.__scopeId||null,t}function pO(e){Oi=e}function vO(){Oi=null}function fr(e,t=Me,n){if(!t||e._n)return e;const r=(...s)=>{r._d&&pu(-1);const o=si(t);let i;try{i=e(...s)}finally{si(o),r._d&&pu(1)}return i};return r._n=!0,r._c=!0,r._d=!0,r}function Zi(e){const{type:t,vnode:n,proxy:r,withProxy:s,props:o,propsOptions:[i],slots:a,attrs:l,emit:u,render:c,renderCache:f,data:d,setupState:h,ctx:p,inheritAttrs:g}=e;let y,w;const m=si(e);try{if(n.shapeFlag&4){const b=s||r,E=b;y=ln(c.call(E,b,f,o,h,d,p)),w=l}else{const b=t;y=ln(b.length>1?b(o,{attrs:l,slots:a,emit:u}):b(o,null)),w=t.props?l:Sm(l)}}catch(b){$s.length=0,gs(b,e,1),y=ye(tt)}let v=y;if(w&&g!==!1){const b=Object.keys(w),{shapeFlag:E}=v;b.length&&E&7&&(i&&b.some($l)&&(w=km(w,i)),v=xn(v,w))}return n.dirs&&(v=xn(v),v.dirs=v.dirs?v.dirs.concat(n.dirs):n.dirs),n.transition&&(v.transition=n.transition),y=v,si(m),y}function Em(e,t=!0){let n;for(let r=0;r{let t;for(const n in e)(n==="class"||n==="style"||ao(n))&&((t||(t={}))[n]=e[n]);return t},km=(e,t)=>{const n={};for(const r in e)(!$l(r)||!(r.slice(9)in t))&&(n[r]=e[r]);return n};function Tm(e,t,n){const{props:r,children:s,component:o}=e,{props:i,children:a,patchFlag:l}=t,u=o.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&l>=0){if(l&1024)return!0;if(l&16)return r?tu(r,i,u):!!i;if(l&8){const c=t.dynamicProps;for(let f=0;fe.__isSuspense;let Za=0;const Om={name:"Suspense",__isSuspense:!0,process(e,t,n,r,s,o,i,a,l,u){if(e==null)Am(t,n,r,s,o,i,a,l,u);else{if(o&&o.deps>0&&!e.suspense.isInFallback){t.suspense=e.suspense,t.suspense.vnode=t,t.el=e.el;return}Cm(e,t,n,r,s,i,a,l,u)}},hydrate:Lm,create:ac,normalize:Im},ic=Om;function Xs(e,t){const n=e.props&&e.props[t];ae(n)&&n()}function Am(e,t,n,r,s,o,i,a,l){const{p:u,o:{createElement:c}}=l,f=c("div"),d=e.suspense=ac(e,s,r,t,f,n,o,i,a,l);u(null,d.pendingBranch=e.ssContent,f,null,r,d,o,i),d.deps>0?(Xs(e,"onPending"),Xs(e,"onFallback"),u(null,e.ssFallback,t,n,r,null,o,i),Yr(d,e.ssFallback)):d.resolve(!1,!0)}function Cm(e,t,n,r,s,o,i,a,{p:l,um:u,o:{createElement:c}}){const f=t.suspense=e.suspense;f.vnode=t,t.el=e.el;const d=t.ssContent,h=t.ssFallback,{activeBranch:p,pendingBranch:g,isInFallback:y,isHydrating:w}=f;if(g)f.pendingBranch=d,gn(d,g)?(l(g,d,f.hiddenContainer,null,s,f,o,i,a),f.deps<=0?f.resolve():y&&(w||(l(p,h,n,r,s,null,o,i,a),Yr(f,h)))):(f.pendingId=Za++,w?(f.isHydrating=!1,f.activeBranch=g):u(g,s,f),f.deps=0,f.effects.length=0,f.hiddenContainer=c("div"),y?(l(null,d,f.hiddenContainer,null,s,f,o,i,a),f.deps<=0?f.resolve():(l(p,h,n,r,s,null,o,i,a),Yr(f,h))):p&&gn(d,p)?(l(p,d,n,r,s,f,o,i,a),f.resolve(!0)):(l(null,d,f.hiddenContainer,null,s,f,o,i,a),f.deps<=0&&f.resolve()));else if(p&&gn(d,p))l(p,d,n,r,s,f,o,i,a),Yr(f,d);else if(Xs(t,"onPending"),f.pendingBranch=d,d.shapeFlag&512?f.pendingId=d.component.suspenseId:f.pendingId=Za++,l(null,d,f.hiddenContainer,null,s,f,o,i,a),f.deps<=0)f.resolve();else{const{timeout:m,pendingId:v}=f;m>0?setTimeout(()=>{f.pendingId===v&&f.fallback(h)},m):m===0&&f.fallback(h)}}function ac(e,t,n,r,s,o,i,a,l,u,c=!1){const{p:f,m:d,um:h,n:p,o:{parentNode:g,remove:y}}=u;let w;const m=xm(e);m&&t!=null&&t.pendingBranch&&(w=t.pendingId,t.deps++);const v=e.props?ed(e.props.timeout):void 0,b=o,E={vnode:e,parent:t,parentComponent:n,namespace:i,container:r,hiddenContainer:s,deps:0,pendingId:Za++,timeout:typeof v=="number"?v:-1,activeBranch:null,pendingBranch:null,isInFallback:!c,isHydrating:c,isUnmounted:!1,effects:[],resolve(R=!1,k=!1){const{vnode:C,activeBranch:A,pendingBranch:T,pendingId:L,effects:x,parentComponent:W,container:ie}=E;let ne=!1;E.isHydrating?E.isHydrating=!1:R||(ne=A&&T.transition&&T.transition.mode==="out-in",ne&&(A.transition.afterLeave=()=>{L===E.pendingId&&(d(T,ie,o===b?p(A):o,0),Qa(x))}),A&&(g(A.el)!==E.hiddenContainer&&(o=p(A)),h(A,W,E,!0)),ne||d(T,ie,o,0)),Yr(E,T),E.pendingBranch=null,E.isInFallback=!1;let M=E.parent,Y=!1;for(;M;){if(M.pendingBranch){M.effects.push(...x),Y=!0;break}M=M.parent}!Y&&!ne&&Qa(x),E.effects=[],m&&t&&t.pendingBranch&&w===t.pendingId&&(t.deps--,t.deps===0&&!k&&t.resolve()),Xs(C,"onResolve")},fallback(R){if(!E.pendingBranch)return;const{vnode:k,activeBranch:C,parentComponent:A,container:T,namespace:L}=E;Xs(k,"onFallback");const x=p(C),W=()=>{E.isInFallback&&(f(null,R,T,x,A,null,L,a,l),Yr(E,R))},ie=R.transition&&R.transition.mode==="out-in";ie&&(C.transition.afterLeave=W),E.isInFallback=!0,h(C,A,null,!0),ie||W()},move(R,k,C){E.activeBranch&&d(E.activeBranch,R,k,C),E.container=R},next(){return E.activeBranch&&p(E.activeBranch)},registerDep(R,k){const C=!!E.pendingBranch;C&&E.deps++;const A=R.vnode.el;R.asyncDep.catch(T=>{gs(T,R,0)}).then(T=>{if(R.isUnmounted||E.isUnmounted||E.pendingId!==R.suspenseId)return;R.asyncResolved=!0;const{vnode:L}=R;al(R,T,!1),A&&(L.el=A);const x=!A&&R.subTree.el;k(R,L,g(A||R.subTree.el),A?null:p(R.subTree),E,i,l),x&&y(x),rc(R,L.el),C&&--E.deps===0&&E.resolve()})},unmount(R,k){E.isUnmounted=!0,E.activeBranch&&h(E.activeBranch,n,R,k),E.pendingBranch&&h(E.pendingBranch,n,R,k)}};return E}function Lm(e,t,n,r,s,o,i,a,l){const u=t.suspense=ac(t,r,n,e.parentNode,document.createElement("div"),null,s,o,i,a,!0),c=l(e,u.pendingBranch=t.ssContent,n,u,o,i);return u.deps===0&&u.resolve(!1,!0),c}function Im(e){const{shapeFlag:t,children:n}=e,r=t&32;e.ssContent=ru(r?n.default:n),e.ssFallback=r?ru(n.fallback):ye(tt)}function ru(e){let t;if(ae(e)){const n=rs&&e._c;n&&(e._d=!1,xe()),e=e(),n&&(e._d=!0,t=un,Jd())}return ee(e)&&(e=Em(e)),e=ln(e),t&&!e.dynamicChildren&&(e.dynamicChildren=t.filter(n=>n!==e)),e}function Rd(e,t){t&&t.pendingBranch?ee(e)?t.effects.push(...e):t.effects.push(e):Qa(e)}function Yr(e,t){e.activeBranch=t;const{vnode:n,parentComponent:r}=e;let s=t.el;for(;!s&&t.component;)t=t.component.subTree,s=t.el;n.el=s,r&&r.subTree===n&&(r.vnode.el=s,rc(r,s))}function xm(e){var t;return((t=e.props)==null?void 0:t.suspensible)!=null&&e.props.suspensible!==!1}const Dm=Symbol.for("v-scx"),jm=()=>Ne(Dm);function wr(e,t){return Ai(e,null,t)}function Mm(e,t){return Ai(e,null,{flush:"sync"})}const Lo={};function q(e,t,n){return Ai(e,t,n)}function Ai(e,t,{immediate:n,deep:r,flush:s,once:o,onTrack:i,onTrigger:a}=Oe){if(t&&o){const R=t;t=(...k)=>{R(...k),E()}}const l=$e,u=R=>r===!0?R:dr(R,r===!1?1:void 0);let c,f=!1,d=!1;if(we(e)?(c=()=>e.value,f=ti(e)):mr(e)?(c=()=>u(e),f=!0):ee(e)?(d=!0,f=e.some(R=>mr(R)||ti(R)),c=()=>e.map(R=>{if(we(R))return R.value;if(mr(R))return u(R);if(ae(R))return Yn(R,l,2)})):ae(e)?t?c=()=>Yn(e,l,2):c=()=>(h&&h(),fn(e,l,3,[p])):c=cn,t&&r){const R=c;c=()=>dr(R())}let h,p=R=>{h=v.onStop=()=>{Yn(R,l,4),h=v.onStop=void 0}},g;if(ho)if(p=cn,t?n&&fn(t,l,3,[c(),d?[]:void 0,p]):c(),s==="sync"){const R=jm();g=R.__watcherHandles||(R.__watcherHandles=[])}else return cn;let y=d?new Array(e.length).fill(Lo):Lo;const w=()=>{if(!(!v.active||!v.dirty))if(t){const R=v.run();(r||f||(d?R.some((k,C)=>kn(k,y[C])):kn(R,y)))&&(h&&h(),fn(t,l,3,[R,y===Lo?void 0:d&&y[0]===Lo?[]:y,p]),y=R)}else v.run()};w.allowRecurse=!!t;let m;s==="sync"?m=w:s==="post"?m=()=>Ke(w,l&&l.suspense):(w.pre=!0,l&&(w.id=l.uid),m=()=>Pi(w));const v=new Kl(c,cn,m),b=Wl(),E=()=>{v.stop(),b&&Ul(b.effects,v)};return t?n?w():y=v.run():s==="post"?Ke(v.run.bind(v),l&&l.suspense):v.run(),g&&g.push(E),E}function Nm(e,t,n){const r=this.proxy,s=Le(e)?e.includes(".")?Od(r,e):()=>r[e]:e.bind(r,r);let o;ae(t)?o=t:(o=t.handler,n=t);const i=br(this),a=Ai(s,o.bind(r),n);return i(),a}function Od(e,t){const n=t.split(".");return()=>{let r=e;for(let s=0;s0){if(n>=t)return e;n++}if(r=r||new Set,r.has(e))return e;if(r.add(e),we(e))dr(e.value,t,n,r);else if(ee(e))for(let s=0;s{dr(s,t,n,r)});else if(Zf(e))for(const s in e)dr(e[s],t,n,r);return e}function yO(e,t){if(Me===null)return e;const n=xi(Me)||Me.proxy,r=e.dirs||(e.dirs=[]);for(let s=0;s{e.isMounted=!0}),fo(()=>{e.isUnmounting=!0}),e}const on=[Function,Array],Cd={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:on,onEnter:on,onAfterEnter:on,onEnterCancelled:on,onBeforeLeave:on,onLeave:on,onAfterLeave:on,onLeaveCancelled:on,onBeforeAppear:on,onAppear:on,onAfterAppear:on,onAppearCancelled:on},Fm={name:"BaseTransition",props:Cd,setup(e,{slots:t}){const n=ut(),r=Ad();return()=>{const s=t.default&&lc(t.default(),!0);if(!s||!s.length)return;let o=s[0];if(s.length>1){for(const d of s)if(d.type!==tt){o=d;break}}const i=ve(e),{mode:a}=i;if(r.isLeaving)return ea(o);const l=su(o);if(!l)return ea(o);const u=Qs(l,i,r,n);ts(l,u);const c=n.subTree,f=c&&su(c);if(f&&f.type!==tt&&!gn(l,f)){const d=Qs(f,i,r,n);if(ts(f,d),a==="out-in")return r.isLeaving=!0,d.afterLeave=()=>{r.isLeaving=!1,n.update.active!==!1&&(n.effect.dirty=!0,n.update())},ea(o);a==="in-out"&&l.type!==tt&&(d.delayLeave=(h,p,g)=>{const y=Ld(r,f);y[String(f.key)]=f,h[Vn]=()=>{p(),h[Vn]=void 0,delete u.delayedLeave},u.delayedLeave=g})}return o}}},$m=Fm;function Ld(e,t){const{leavingVNodes:n}=e;let r=n.get(t.type);return r||(r=Object.create(null),n.set(t.type,r)),r}function Qs(e,t,n,r){const{appear:s,mode:o,persisted:i=!1,onBeforeEnter:a,onEnter:l,onAfterEnter:u,onEnterCancelled:c,onBeforeLeave:f,onLeave:d,onAfterLeave:h,onLeaveCancelled:p,onBeforeAppear:g,onAppear:y,onAfterAppear:w,onAppearCancelled:m}=t,v=String(e.key),b=Ld(n,e),E=(C,A)=>{C&&fn(C,r,9,A)},R=(C,A)=>{const T=A[1];E(C,A),ee(C)?C.every(L=>L.length<=1)&&T():C.length<=1&&T()},k={mode:o,persisted:i,beforeEnter(C){let A=a;if(!n.isMounted)if(s)A=g||a;else return;C[Vn]&&C[Vn](!0);const T=b[v];T&&gn(e,T)&&T.el[Vn]&&T.el[Vn](),E(A,[C])},enter(C){let A=l,T=u,L=c;if(!n.isMounted)if(s)A=y||l,T=w||u,L=m||c;else return;let x=!1;const W=C[Io]=ie=>{x||(x=!0,ie?E(L,[C]):E(T,[C]),k.delayedLeave&&k.delayedLeave(),C[Io]=void 0)};A?R(A,[C,W]):W()},leave(C,A){const T=String(e.key);if(C[Io]&&C[Io](!0),n.isUnmounting)return A();E(f,[C]);let L=!1;const x=C[Vn]=W=>{L||(L=!0,A(),W?E(p,[C]):E(h,[C]),C[Vn]=void 0,b[T]===e&&delete b[T])};b[T]=e,d?R(d,[C,x]):x()},clone(C){return Qs(C,t,n,r)}};return k}function ea(e){if(co(e))return e=xn(e),e.children=null,e}function su(e){return co(e)?e.children?e.children[0]:void 0:e}function ts(e,t){e.shapeFlag&6&&e.component?ts(e.component.subTree,t):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function lc(e,t=!1,n){let r=[],s=0;for(let o=0;o1)for(let o=0;o!!e.type.__asyncLoader;/*! #__NO_SIDE_EFFECTS__ */function Zs(e){ae(e)&&(e={loader:e});const{loader:t,loadingComponent:n,errorComponent:r,delay:s=200,timeout:o,suspensible:i=!0,onError:a}=e;let l=null,u,c=0;const f=()=>(c++,l=null,d()),d=()=>{let h;return l||(h=l=t().catch(p=>{if(p=p instanceof Error?p:new Error(String(p)),a)return new Promise((g,y)=>{a(p,()=>g(f()),()=>y(p),c+1)});throw p}).then(p=>h!==l&&l?l:(p&&(p.__esModule||p[Symbol.toStringTag]==="Module")&&(p=p.default),u=p,p)))};return Fe({name:"AsyncComponentWrapper",__asyncLoader:d,get __asyncResolved(){return u},setup(){const h=$e;if(u)return()=>ta(u,h);const p=m=>{l=null,gs(m,h,13,!r)};if(i&&h.suspense||ho)return d().then(m=>()=>ta(m,h)).catch(m=>(p(m),()=>r?ye(r,{error:m}):null));const g=S(!1),y=S(),w=S(!!s);return s&&setTimeout(()=>{w.value=!1},s),o!=null&&setTimeout(()=>{if(!g.value&&!y.value){const m=new Error(`Async component timed out after ${o}ms.`);p(m),y.value=m}},o),d().then(()=>{g.value=!0,h.parent&&co(h.parent.vnode)&&(h.parent.effect.dirty=!0,Pi(h.parent.update))}).catch(m=>{p(m),y.value=m}),()=>{if(g.value&&u)return ta(u,h);if(y.value&&r)return ye(r,{error:y.value});if(n&&!w.value)return ye(n)}}})}function ta(e,t){const{ref:n,props:r,children:s,ce:o}=t.vnode,i=ye(e,r,s);return i.ref=n,i.ce=o,delete t.vnode.ce,i}const co=e=>e.type.__isKeepAlive,Um={name:"KeepAlive",__isKeepAlive:!0,props:{include:[String,RegExp,Array],exclude:[String,RegExp,Array],max:[String,Number]},setup(e,{slots:t}){const n=ut(),r=n.ctx;if(!r.renderer)return()=>{const m=t.default&&t.default();return m&&m.length===1?m[0]:m};const s=new Map,o=new Set;let i=null;const a=n.suspense,{renderer:{p:l,m:u,um:c,o:{createElement:f}}}=r,d=f("div");r.activate=(m,v,b,E,R)=>{const k=m.component;u(m,v,b,0,a),l(k.vnode,m,v,b,k,a,E,m.slotScopeIds,R),Ke(()=>{k.isDeactivated=!1,k.a&&zr(k.a);const C=m.props&&m.props.onVnodeMounted;C&&ot(C,k.parent,m)},a)},r.deactivate=m=>{const v=m.component;u(m,d,null,1,a),Ke(()=>{v.da&&zr(v.da);const b=m.props&&m.props.onVnodeUnmounted;b&&ot(b,v.parent,m),v.isDeactivated=!0},a)};function h(m){na(m),c(m,n,a,!0)}function p(m){s.forEach((v,b)=>{const E=ll(v.type);E&&(!m||!m(E))&&g(b)})}function g(m){const v=s.get(m);!i||!gn(v,i)?h(v):i&&na(i),s.delete(m),o.delete(m)}q(()=>[e.include,e.exclude],([m,v])=>{m&&p(b=>Cs(m,b)),v&&p(b=>!Cs(v,b))},{flush:"post",deep:!0});let y=null;const w=()=>{y!=null&&s.set(y,ra(n.subTree))};return Rr(w),uo(w),fo(()=>{s.forEach(m=>{const{subTree:v,suspense:b}=n,E=ra(v);if(m.type===E.type&&m.key===E.key){na(E);const R=E.component.da;R&&Ke(R,b);return}h(m)})}),()=>{if(y=null,!t.default)return null;const m=t.default(),v=m[0];if(m.length>1)return i=null,m;if(!ss(v)||!(v.shapeFlag&4)&&!(v.shapeFlag&128))return i=null,v;let b=ra(v);const E=b.type,R=ll(gr(b)?b.type.__asyncResolved||{}:E),{include:k,exclude:C,max:A}=e;if(k&&(!R||!Cs(k,R))||C&&R&&Cs(C,R))return i=b,v;const T=b.key==null?E:b.key,L=s.get(T);return b.el&&(b=xn(b),v.shapeFlag&128&&(v.ssContent=b)),y=T,L?(b.el=L.el,b.component=L.component,b.transition&&ts(b,b.transition),b.shapeFlag|=512,o.delete(T),o.add(T)):(o.add(T),A&&o.size>parseInt(A,10)&&g(o.values().next().value)),b.shapeFlag|=256,i=b,Pd(v.type)?v:b}}},Hm=Um;function Cs(e,t){return ee(e)?e.some(n=>Cs(n,t)):Le(e)?e.split(",").includes(t):Cv(e)?e.test(t):!1}function cc(e,t){Id(e,"a",t)}function uc(e,t){Id(e,"da",t)}function Id(e,t,n=$e){const r=e.__wdc||(e.__wdc=()=>{let s=n;for(;s;){if(s.isDeactivated)return;s=s.parent}return e()});if(Ci(t,r,n),n){let s=n.parent;for(;s&&s.parent;)co(s.parent.vnode)&&Vm(r,t,n,s),s=s.parent}}function Vm(e,t,n,r){const s=Ci(t,e,r,!0);Li(()=>{Ul(r[t],s)},n)}function na(e){e.shapeFlag&=-257,e.shapeFlag&=-513}function ra(e){return e.shapeFlag&128?e.ssContent:e}function Ci(e,t,n=$e,r=!1){if(n){const s=n[e]||(n[e]=[]),o=t.__weh||(t.__weh=(...i)=>{if(n.isUnmounted)return;kr();const a=br(n),l=fn(t,n,e,i);return a(),Tr(),l});return r?s.unshift(o):s.push(o),o}}const Dn=e=>(t,n=$e)=>(!ho||e==="sp")&&Ci(e,(...r)=>t(...r),n),xd=Dn("bm"),Rr=Dn("m"),Dd=Dn("bu"),uo=Dn("u"),fo=Dn("bum"),Li=Dn("um"),Bm=Dn("sp"),qm=Dn("rtg"),Wm=Dn("rtc");function jd(e,t=$e){Ci("ec",e,t)}function wO(e,t,n,r){let s;const o=n&&n[r];if(ee(e)||Le(e)){s=new Array(e.length);for(let i=0,a=e.length;it(i,a,void 0,o&&o[a]));else{const i=Object.keys(e);s=new Array(i.length);for(let a=0,l=i.length;ass(t)?!(t.type===tt||t.type===Xe&&!Md(t.children)):!0)?e:null}const el=e=>e?eh(e)?xi(e)||e.proxy:el(e.parent):null,Ms=De(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>el(e.parent),$root:e=>el(e.root),$emit:e=>e.emit,$options:e=>fc(e),$forceUpdate:e=>e.f||(e.f=()=>{e.effect.dirty=!0,Pi(e.update)}),$nextTick:e=>e.n||(e.n=Be.bind(e.proxy)),$watch:e=>Nm.bind(e)}),sa=(e,t)=>e!==Oe&&!e.__isScriptSetup&&ge(e,t),zm={get({_:e},t){const{ctx:n,setupState:r,data:s,props:o,accessCache:i,type:a,appContext:l}=e;let u;if(t[0]!=="$"){const h=i[t];if(h!==void 0)switch(h){case 1:return r[t];case 2:return s[t];case 4:return n[t];case 3:return o[t]}else{if(sa(r,t))return i[t]=1,r[t];if(s!==Oe&&ge(s,t))return i[t]=2,s[t];if((u=e.propsOptions[0])&&ge(u,t))return i[t]=3,o[t];if(n!==Oe&&ge(n,t))return i[t]=4,n[t];tl&&(i[t]=0)}}const c=Ms[t];let f,d;if(c)return t==="$attrs"&&ct(e,"get",t),c(e);if((f=a.__cssModules)&&(f=f[t]))return f;if(n!==Oe&&ge(n,t))return i[t]=4,n[t];if(d=l.config.globalProperties,ge(d,t))return d[t]},set({_:e},t,n){const{data:r,setupState:s,ctx:o}=e;return sa(s,t)?(s[t]=n,!0):r!==Oe&&ge(r,t)?(r[t]=n,!0):ge(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(o[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:r,appContext:s,propsOptions:o}},i){let a;return!!n[i]||e!==Oe&&ge(e,i)||sa(t,i)||(a=o[0])&&ge(a,i)||ge(r,i)||ge(Ms,i)||ge(s.config.globalProperties,i)},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:ge(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function oi(e){return ee(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}function bO(e,t){return!e||!t?e||t:ee(e)&&ee(t)?e.concat(t):De({},oi(e),oi(t))}function _O(e){const t=ut();let n=e();return il(),Hl(n)&&(n=n.catch(r=>{throw br(t),r})),[n,()=>br(t)]}let tl=!0;function Gm(e){const t=fc(e),n=e.proxy,r=e.ctx;tl=!1,t.beforeCreate&&ou(t.beforeCreate,e,"bc");const{data:s,computed:o,methods:i,watch:a,provide:l,inject:u,created:c,beforeMount:f,mounted:d,beforeUpdate:h,updated:p,activated:g,deactivated:y,beforeDestroy:w,beforeUnmount:m,destroyed:v,unmounted:b,render:E,renderTracked:R,renderTriggered:k,errorCaptured:C,serverPrefetch:A,expose:T,inheritAttrs:L,components:x,directives:W,filters:ie}=t;if(u&&Jm(u,r,null),i)for(const Y in i){const z=i[Y];ae(z)&&(r[Y]=z.bind(n))}if(s){const Y=s.call(n,n);Pe(Y)&&(e.data=Ee(Y))}if(tl=!0,o)for(const Y in o){const z=o[Y],We=ae(z)?z.bind(n,n):ae(z.get)?z.get.bind(n,n):cn,Ge=!ae(z)&&ae(z.set)?z.set.bind(n):cn,dt=D({get:We,set:Ge});Object.defineProperty(r,Y,{enumerable:!0,configurable:!0,get:()=>dt.value,set:je=>dt.value=je})}if(a)for(const Y in a)Nd(a[Y],r,n,Y);if(l){const Y=ae(l)?l.call(n):l;Reflect.ownKeys(Y).forEach(z=>{Xn(z,Y[z])})}c&&ou(c,e,"c");function M(Y,z){ee(z)?z.forEach(We=>Y(We.bind(n))):z&&Y(z.bind(n))}if(M(xd,f),M(Rr,d),M(Dd,h),M(uo,p),M(cc,g),M(uc,y),M(jd,C),M(Wm,R),M(qm,k),M(fo,m),M(Li,b),M(Bm,A),ee(T))if(T.length){const Y=e.exposed||(e.exposed={});T.forEach(z=>{Object.defineProperty(Y,z,{get:()=>n[z],set:We=>n[z]=We})})}else e.exposed||(e.exposed={});E&&e.render===cn&&(e.render=E),L!=null&&(e.inheritAttrs=L),x&&(e.components=x),W&&(e.directives=W)}function Jm(e,t,n=cn){ee(e)&&(e=nl(e));for(const r in e){const s=e[r];let o;Pe(s)?"default"in s?o=Ne(s.from||r,s.default,!0):o=Ne(s.from||r):o=Ne(s),we(o)?Object.defineProperty(t,r,{enumerable:!0,configurable:!0,get:()=>o.value,set:i=>o.value=i}):t[r]=o}}function ou(e,t,n){fn(ee(e)?e.map(r=>r.bind(t.proxy)):e.bind(t.proxy),t,n)}function Nd(e,t,n,r){const s=r.includes(".")?Od(n,r):()=>n[r];if(Le(e)){const o=t[e];ae(o)&&q(s,o)}else if(ae(e))q(s,e.bind(n));else if(Pe(e))if(ee(e))e.forEach(o=>Nd(o,t,n,r));else{const o=ae(e.handler)?e.handler.bind(n):t[e.handler];ae(o)&&q(s,o,e)}}function fc(e){const t=e.type,{mixins:n,extends:r}=t,{mixins:s,optionsCache:o,config:{optionMergeStrategies:i}}=e.appContext,a=o.get(t);let l;return a?l=a:!s.length&&!n&&!r?l=t:(l={},s.length&&s.forEach(u=>ii(l,u,i,!0)),ii(l,t,i)),Pe(t)&&o.set(t,l),l}function ii(e,t,n,r=!1){const{mixins:s,extends:o}=t;o&&ii(e,o,n,!0),s&&s.forEach(i=>ii(e,i,n,!0));for(const i in t)if(!(r&&i==="expose")){const a=Ym[i]||n&&n[i];e[i]=a?a(e[i],t[i]):t[i]}return e}const Ym={data:iu,props:au,emits:au,methods:Ls,computed:Ls,beforeCreate:Ze,created:Ze,beforeMount:Ze,mounted:Ze,beforeUpdate:Ze,updated:Ze,beforeDestroy:Ze,beforeUnmount:Ze,destroyed:Ze,unmounted:Ze,activated:Ze,deactivated:Ze,errorCaptured:Ze,serverPrefetch:Ze,components:Ls,directives:Ls,watch:Qm,provide:iu,inject:Xm};function iu(e,t){return t?e?function(){return De(ae(e)?e.call(this,this):e,ae(t)?t.call(this,this):t)}:t:e}function Xm(e,t){return Ls(nl(e),nl(t))}function nl(e){if(ee(e)){const t={};for(let n=0;n1)return n&&ae(t)?t.call(r&&r.proxy):t}}function $d(){return!!($e||Me||Xr)}function tg(e,t,n,r=!1){const s={},o={};Zo(o,Ii,1),e.propsDefaults=Object.create(null),Ud(e,t,s,o);for(const i in e.propsOptions[0])i in s||(s[i]=void 0);n?e.props=r?s:In(s):e.type.props?e.props=s:e.props=o,e.attrs=o}function ng(e,t,n,r){const{props:s,attrs:o,vnode:{patchFlag:i}}=e,a=ve(s),[l]=e.propsOptions;let u=!1;if((r||i>0)&&!(i&16)){if(i&8){const c=e.vnode.dynamicProps;for(let f=0;f{l=!0;const[d,h]=Hd(f,t,!0);De(i,d),h&&a.push(...h)};!n&&t.mixins.length&&t.mixins.forEach(c),e.extends&&c(e.extends),e.mixins&&e.mixins.forEach(c)}if(!o&&!l)return Pe(e)&&r.set(e,qr),qr;if(ee(o))for(let c=0;c-1,h[1]=g<0||p-1||ge(h,"default"))&&a.push(f)}}}const u=[i,a];return Pe(e)&&r.set(e,u),u}function lu(e){return e[0]!=="$"&&!Kr(e)}function cu(e){return e===null?"null":typeof e=="function"?e.name||"":typeof e=="object"&&e.constructor&&e.constructor.name||""}function uu(e,t){return cu(e)===cu(t)}function fu(e,t){return ee(t)?t.findIndex(n=>uu(n,e)):ae(t)&&uu(t,e)?0:-1}const Vd=e=>e[0]==="_"||e==="$stable",dc=e=>ee(e)?e.map(ln):[ln(e)],rg=(e,t,n)=>{if(t._n)return t;const r=fr((...s)=>dc(t(...s)),n);return r._c=!1,r},Bd=(e,t,n)=>{const r=e._ctx;for(const s in e){if(Vd(s))continue;const o=e[s];if(ae(o))t[s]=rg(s,o,r);else if(o!=null){const i=dc(o);t[s]=()=>i}}},qd=(e,t)=>{const n=dc(t);e.slots.default=()=>n},sg=(e,t)=>{if(e.vnode.shapeFlag&32){const n=t._;n?(e.slots=ve(t),Zo(t,"_",n)):Bd(t,e.slots={})}else e.slots={},t&&qd(e,t);Zo(e.slots,Ii,1)},og=(e,t,n)=>{const{vnode:r,slots:s}=e;let o=!0,i=Oe;if(r.shapeFlag&32){const a=t._;a?n&&a===1?o=!1:(De(s,t),!n&&a===1&&delete s._):(o=!t.$stable,Bd(t,s)),i=t}else t&&(qd(e,t),i={default:1});if(o)for(const a in s)!Vd(a)&&i[a]==null&&delete s[a]};function ai(e,t,n,r,s=!1){if(ee(e)){e.forEach((d,h)=>ai(d,t&&(ee(t)?t[h]:t),n,r,s));return}if(gr(r)&&!s)return;const o=r.shapeFlag&4?xi(r.component)||r.component.proxy:r.el,i=s?null:o,{i:a,r:l}=e,u=t&&t.r,c=a.refs===Oe?a.refs={}:a.refs,f=a.setupState;if(u!=null&&u!==l&&(Le(u)?(c[u]=null,ge(f,u)&&(f[u]=null)):we(u)&&(u.value=null)),ae(l))Yn(l,a,12,[i,c]);else{const d=Le(l),h=we(l);if(d||h){const p=()=>{if(e.f){const g=d?ge(f,l)?f[l]:c[l]:l.value;s?ee(g)&&Ul(g,o):ee(g)?g.includes(o)||g.push(o):d?(c[l]=[o],ge(f,l)&&(f[l]=c[l])):(l.value=[o],e.k&&(c[e.k]=l.value))}else d?(c[l]=i,ge(f,l)&&(f[l]=i)):h&&(l.value=i,e.k&&(c[e.k]=i))};i?(p.id=-1,Ke(p,n)):p()}}}let Nn=!1;const ig=e=>e.namespaceURI.includes("svg")&&e.tagName!=="foreignObject",ag=e=>e.namespaceURI.includes("MathML"),xo=e=>{if(ig(e))return"svg";if(ag(e))return"mathml"},Do=e=>e.nodeType===8;function lg(e){const{mt:t,p:n,o:{patchProp:r,createText:s,nextSibling:o,parentNode:i,remove:a,insert:l,createComment:u}}=e,c=(v,b)=>{if(!b.hasChildNodes()){n(null,v,b),ri(),b._vnode=v;return}Nn=!1,f(b.firstChild,v,null,null,null),ri(),b._vnode=v,Nn&&console.error("Hydration completed but contains mismatches.")},f=(v,b,E,R,k,C=!1)=>{const A=Do(v)&&v.data==="[",T=()=>g(v,b,E,R,k,A),{type:L,ref:x,shapeFlag:W,patchFlag:ie}=b;let ne=v.nodeType;b.el=v,ie===-2&&(C=!1,b.dynamicChildren=null);let M=null;switch(L){case ns:ne!==3?b.children===""?(l(b.el=s(""),i(v),v),M=v):M=T():(v.data!==b.children&&(Nn=!0,v.data=b.children),M=o(v));break;case tt:m(v)?(M=o(v),w(b.el=v.content.firstChild,v,E)):ne!==8||A?M=T():M=o(v);break;case Fs:if(A&&(v=o(v),ne=v.nodeType),ne===1||ne===3){M=v;const Y=!b.children.length;for(let z=0;z{C=C||!!b.dynamicChildren;const{type:A,props:T,patchFlag:L,shapeFlag:x,dirs:W,transition:ie}=b,ne=A==="input"||A==="option";if(ne||L!==-1){W&&En(b,null,E,"created");let M=!1;if(m(v)){M=Kd(R,ie)&&E&&E.vnode.props&&E.vnode.props.appear;const z=v.content.firstChild;M&&ie.beforeEnter(z),w(z,v,E),b.el=v=z}if(x&16&&!(T&&(T.innerHTML||T.textContent))){let z=h(v.firstChild,b,v,E,R,k,C);for(;z;){Nn=!0;const We=z;z=z.nextSibling,a(We)}}else x&8&&v.textContent!==b.children&&(Nn=!0,v.textContent=b.children);if(T)if(ne||!C||L&48)for(const z in T)(ne&&(z.endsWith("value")||z==="indeterminate")||ao(z)&&!Kr(z)||z[0]===".")&&r(v,z,null,T[z],void 0,void 0,E);else T.onClick&&r(v,"onClick",null,T.onClick,void 0,void 0,E);let Y;(Y=T&&T.onVnodeBeforeMount)&&ot(Y,E,b),W&&En(b,null,E,"beforeMount"),((Y=T&&T.onVnodeMounted)||W||M)&&Rd(()=>{Y&&ot(Y,E,b),M&&ie.enter(v),W&&En(b,null,E,"mounted")},R)}return v.nextSibling},h=(v,b,E,R,k,C,A)=>{A=A||!!b.dynamicChildren;const T=b.children,L=T.length;for(let x=0;x{const{slotScopeIds:A}=b;A&&(k=k?k.concat(A):A);const T=i(v),L=h(o(v),b,T,E,R,k,C);return L&&Do(L)&&L.data==="]"?o(b.anchor=L):(Nn=!0,l(b.anchor=u("]"),T,L),L)},g=(v,b,E,R,k,C)=>{if(Nn=!0,b.el=null,C){const L=y(v);for(;;){const x=o(v);if(x&&x!==L)a(x);else break}}const A=o(v),T=i(v);return a(v),n(null,b,T,A,E,R,xo(T),k),A},y=(v,b="[",E="]")=>{let R=0;for(;v;)if(v=o(v),v&&Do(v)&&(v.data===b&&R++,v.data===E)){if(R===0)return o(v);R--}return v},w=(v,b,E)=>{const R=b.parentNode;R&&R.replaceChild(v,b);let k=E;for(;k;)k.vnode.el===b&&(k.vnode.el=k.subTree.el=v),k=k.parent},m=v=>v.nodeType===1&&v.tagName.toLowerCase()==="template";return[c,f]}const Ke=Rd;function cg(e){return Wd(e)}function ug(e){return Wd(e,lg)}function Wd(e,t){const n=td();n.__VUE__=!0;const{insert:r,remove:s,patchProp:o,createElement:i,createText:a,createComment:l,setText:u,setElementText:c,parentNode:f,nextSibling:d,setScopeId:h=cn,insertStaticContent:p}=e,g=(_,P,I,$=null,N=null,V=null,J=void 0,H=null,K=!!P.dynamicChildren)=>{if(_===P)return;_&&!gn(_,P)&&($=F(_),je(_,N,V,!0),_=null),P.patchFlag===-2&&(K=!1,P.dynamicChildren=null);const{type:U,ref:Q,shapeFlag:se}=P;switch(U){case ns:y(_,P,I,$);break;case tt:w(_,P,I,$);break;case Fs:_==null&&m(P,I,$,J);break;case Xe:x(_,P,I,$,N,V,J,H,K);break;default:se&1?E(_,P,I,$,N,V,J,H,K):se&6?W(_,P,I,$,N,V,J,H,K):(se&64||se&128)&&U.process(_,P,I,$,N,V,J,H,K,Z)}Q!=null&&N&&ai(Q,_&&_.ref,V,P||_,!P)},y=(_,P,I,$)=>{if(_==null)r(P.el=a(P.children),I,$);else{const N=P.el=_.el;P.children!==_.children&&u(N,P.children)}},w=(_,P,I,$)=>{_==null?r(P.el=l(P.children||""),I,$):P.el=_.el},m=(_,P,I,$)=>{[_.el,_.anchor]=p(_.children,P,I,$,_.el,_.anchor)},v=({el:_,anchor:P},I,$)=>{let N;for(;_&&_!==P;)N=d(_),r(_,I,$),_=N;r(P,I,$)},b=({el:_,anchor:P})=>{let I;for(;_&&_!==P;)I=d(_),s(_),_=I;s(P)},E=(_,P,I,$,N,V,J,H,K)=>{P.type==="svg"?J="svg":P.type==="math"&&(J="mathml"),_==null?R(P,I,$,N,V,J,H,K):A(_,P,N,V,J,H,K)},R=(_,P,I,$,N,V,J,H)=>{let K,U;const{props:Q,shapeFlag:se,transition:re,dirs:le}=_;if(K=_.el=i(_.type,V,Q&&Q.is,Q),se&8?c(K,_.children):se&16&&C(_.children,K,null,$,N,oa(_,V),J,H),le&&En(_,null,$,"created"),k(K,_,_.scopeId,J,$),Q){for(const Te in Q)Te!=="value"&&!Kr(Te)&&o(K,Te,null,Q[Te],V,_.children,$,N,Je);"value"in Q&&o(K,"value",null,Q.value,V),(U=Q.onVnodeBeforeMount)&&ot(U,$,_)}le&&En(_,null,$,"beforeMount");const ce=Kd(N,re);ce&&re.beforeEnter(K),r(K,P,I),((U=Q&&Q.onVnodeMounted)||ce||le)&&Ke(()=>{U&&ot(U,$,_),ce&&re.enter(K),le&&En(_,null,$,"mounted")},N)},k=(_,P,I,$,N)=>{if(I&&h(_,I),$)for(let V=0;V<$.length;V++)h(_,$[V]);if(N){let V=N.subTree;if(P===V){const J=N.vnode;k(_,J,J.scopeId,J.slotScopeIds,N.parent)}}},C=(_,P,I,$,N,V,J,H,K=0)=>{for(let U=K;U<_.length;U++){const Q=_[U]=H?Bn(_[U]):ln(_[U]);g(null,Q,P,I,$,N,V,J,H)}},A=(_,P,I,$,N,V,J)=>{const H=P.el=_.el;let{patchFlag:K,dynamicChildren:U,dirs:Q}=P;K|=_.patchFlag&16;const se=_.props||Oe,re=P.props||Oe;let le;if(I&&nr(I,!1),(le=re.onVnodeBeforeUpdate)&&ot(le,I,P,_),Q&&En(P,_,I,"beforeUpdate"),I&&nr(I,!0),U?T(_.dynamicChildren,U,H,I,$,oa(P,N),V):J||z(_,P,H,null,I,$,oa(P,N),V,!1),K>0){if(K&16)L(H,P,se,re,I,$,N);else if(K&2&&se.class!==re.class&&o(H,"class",null,re.class,N),K&4&&o(H,"style",se.style,re.style,N),K&8){const ce=P.dynamicProps;for(let Te=0;Te{le&&ot(le,I,P,_),Q&&En(P,_,I,"updated")},$)},T=(_,P,I,$,N,V,J)=>{for(let H=0;H{if(I!==$){if(I!==Oe)for(const H in I)!Kr(H)&&!(H in $)&&o(_,H,I[H],null,J,P.children,N,V,Je);for(const H in $){if(Kr(H))continue;const K=$[H],U=I[H];K!==U&&H!=="value"&&o(_,H,U,K,J,P.children,N,V,Je)}"value"in $&&o(_,"value",I.value,$.value,J)}},x=(_,P,I,$,N,V,J,H,K)=>{const U=P.el=_?_.el:a(""),Q=P.anchor=_?_.anchor:a("");let{patchFlag:se,dynamicChildren:re,slotScopeIds:le}=P;le&&(H=H?H.concat(le):le),_==null?(r(U,I,$),r(Q,I,$),C(P.children||[],I,Q,N,V,J,H,K)):se>0&&se&64&&re&&_.dynamicChildren?(T(_.dynamicChildren,re,I,N,V,J,H),(P.key!=null||N&&P===N.subTree)&&hc(_,P,!0)):z(_,P,I,Q,N,V,J,H,K)},W=(_,P,I,$,N,V,J,H,K)=>{P.slotScopeIds=H,_==null?P.shapeFlag&512?N.ctx.activate(P,I,$,J,K):ie(P,I,$,N,V,J,K):ne(_,P,K)},ie=(_,P,I,$,N,V,J)=>{const H=_.component=wg(_,$,N);if(co(_)&&(H.ctx.renderer=Z),bg(H),H.asyncDep){if(N&&N.registerDep(H,M),!_.el){const K=H.subTree=ye(tt);w(null,K,P,I)}}else M(H,_,P,I,N,V,J)},ne=(_,P,I)=>{const $=P.component=_.component;if(Tm(_,P,I))if($.asyncDep&&!$.asyncResolved){Y($,P,I);return}else $.next=P,wm($.update),$.effect.dirty=!0,$.update();else P.el=_.el,$.vnode=P},M=(_,P,I,$,N,V,J)=>{const H=()=>{if(_.isMounted){let{next:Q,bu:se,u:re,parent:le,vnode:ce}=_;{const Ir=zd(_);if(Ir){Q&&(Q.el=ce.el,Y(_,Q,J)),Ir.asyncDep.then(()=>{_.isUnmounted||H()});return}}let Te=Q,Ce;nr(_,!1),Q?(Q.el=ce.el,Y(_,Q,J)):Q=ce,se&&zr(se),(Ce=Q.props&&Q.props.onVnodeBeforeUpdate)&&ot(Ce,le,Q,ce),nr(_,!0);const He=Zi(_),hn=_.subTree;_.subTree=He,g(hn,He,f(hn.el),F(hn),_,N,V),Q.el=He.el,Te===null&&rc(_,He.el),re&&Ke(re,N),(Ce=Q.props&&Q.props.onVnodeUpdated)&&Ke(()=>ot(Ce,le,Q,ce),N)}else{let Q;const{el:se,props:re}=P,{bm:le,m:ce,parent:Te}=_,Ce=gr(P);if(nr(_,!1),le&&zr(le),!Ce&&(Q=re&&re.onVnodeBeforeMount)&&ot(Q,Te,P),nr(_,!0),se&&Ae){const He=()=>{_.subTree=Zi(_),Ae(se,_.subTree,_,N,null)};Ce?P.type.__asyncLoader().then(()=>!_.isUnmounted&&He()):He()}else{const He=_.subTree=Zi(_);g(null,He,I,$,_,N,V),P.el=He.el}if(ce&&Ke(ce,N),!Ce&&(Q=re&&re.onVnodeMounted)){const He=P;Ke(()=>ot(Q,Te,He),N)}(P.shapeFlag&256||Te&&gr(Te.vnode)&&Te.vnode.shapeFlag&256)&&_.a&&Ke(_.a,N),_.isMounted=!0,P=I=$=null}},K=_.effect=new Kl(H,cn,()=>Pi(U),_.scope),U=_.update=()=>{K.dirty&&K.run()};U.id=_.uid,nr(_,!0),U()},Y=(_,P,I)=>{P.component=_;const $=_.vnode.props;_.vnode=P,_.next=null,ng(_,P.props,$,I),og(_,P.children,I),kr(),eu(_),Tr()},z=(_,P,I,$,N,V,J,H,K=!1)=>{const U=_&&_.children,Q=_?_.shapeFlag:0,se=P.children,{patchFlag:re,shapeFlag:le}=P;if(re>0){if(re&128){Ge(U,se,I,$,N,V,J,H,K);return}else if(re&256){We(U,se,I,$,N,V,J,H,K);return}}le&8?(Q&16&&Je(U,N,V),se!==U&&c(I,se)):Q&16?le&16?Ge(U,se,I,$,N,V,J,H,K):Je(U,N,V,!0):(Q&8&&c(I,""),le&16&&C(se,I,$,N,V,J,H,K))},We=(_,P,I,$,N,V,J,H,K)=>{_=_||qr,P=P||qr;const U=_.length,Q=P.length,se=Math.min(U,Q);let re;for(re=0;reQ?Je(_,N,V,!0,!1,se):C(P,I,$,N,V,J,H,K,se)},Ge=(_,P,I,$,N,V,J,H,K)=>{let U=0;const Q=P.length;let se=_.length-1,re=Q-1;for(;U<=se&&U<=re;){const le=_[U],ce=P[U]=K?Bn(P[U]):ln(P[U]);if(gn(le,ce))g(le,ce,I,null,N,V,J,H,K);else break;U++}for(;U<=se&&U<=re;){const le=_[se],ce=P[re]=K?Bn(P[re]):ln(P[re]);if(gn(le,ce))g(le,ce,I,null,N,V,J,H,K);else break;se--,re--}if(U>se){if(U<=re){const le=re+1,ce=lere)for(;U<=se;)je(_[U],N,V,!0),U++;else{const le=U,ce=U,Te=new Map;for(U=ce;U<=re;U++){const pt=P[U]=K?Bn(P[U]):ln(P[U]);pt.key!=null&&Te.set(pt.key,U)}let Ce,He=0;const hn=re-ce+1;let Ir=!1,Vc=0;const Es=new Array(hn);for(U=0;U=hn){je(pt,N,V,!0);continue}let bn;if(pt.key!=null)bn=Te.get(pt.key);else for(Ce=ce;Ce<=re;Ce++)if(Es[Ce-ce]===0&&gn(pt,P[Ce])){bn=Ce;break}bn===void 0?je(pt,N,V,!0):(Es[bn-ce]=U+1,bn>=Vc?Vc=bn:Ir=!0,g(pt,P[bn],I,null,N,V,J,H,K),He++)}const Bc=Ir?fg(Es):qr;for(Ce=Bc.length-1,U=hn-1;U>=0;U--){const pt=ce+U,bn=P[pt],qc=pt+1{const{el:V,type:J,transition:H,children:K,shapeFlag:U}=_;if(U&6){dt(_.component.subTree,P,I,$);return}if(U&128){_.suspense.move(P,I,$);return}if(U&64){J.move(_,P,I,Z);return}if(J===Xe){r(V,P,I);for(let se=0;seH.enter(V),N);else{const{leave:se,delayLeave:re,afterLeave:le}=H,ce=()=>r(V,P,I),Te=()=>{se(V,()=>{ce(),le&&le()})};re?re(V,ce,Te):Te()}else r(V,P,I)},je=(_,P,I,$=!1,N=!1)=>{const{type:V,props:J,ref:H,children:K,dynamicChildren:U,shapeFlag:Q,patchFlag:se,dirs:re}=_;if(H!=null&&ai(H,null,I,_,!0),Q&256){P.ctx.deactivate(_);return}const le=Q&1&&re,ce=!gr(_);let Te;if(ce&&(Te=J&&J.onVnodeBeforeUnmount)&&ot(Te,P,_),Q&6)ht(_.component,I,$);else{if(Q&128){_.suspense.unmount(I,$);return}le&&En(_,null,P,"beforeUnmount"),Q&64?_.type.remove(_,P,I,N,Z,$):U&&(V!==Xe||se>0&&se&64)?Je(U,P,I,!1,!0):(V===Xe&&se&384||!N&&Q&16)&&Je(K,P,I),$&&st(_)}(ce&&(Te=J&&J.onVnodeUnmounted)||le)&&Ke(()=>{Te&&ot(Te,P,_),le&&En(_,null,P,"unmounted")},I)},st=_=>{const{type:P,el:I,anchor:$,transition:N}=_;if(P===Xe){Ie(I,$);return}if(P===Fs){b(_);return}const V=()=>{s(I),N&&!N.persisted&&N.afterLeave&&N.afterLeave()};if(_.shapeFlag&1&&N&&!N.persisted){const{leave:J,delayLeave:H}=N,K=()=>J(I,V);H?H(_.el,V,K):K()}else V()},Ie=(_,P)=>{let I;for(;_!==P;)I=d(_),s(_),_=I;s(P)},ht=(_,P,I)=>{const{bum:$,scope:N,update:V,subTree:J,um:H}=_;$&&zr($),N.stop(),V&&(V.active=!1,je(J,_,P,I)),H&&Ke(H,P),Ke(()=>{_.isUnmounted=!0},P),P&&P.pendingBranch&&!P.isUnmounted&&_.asyncDep&&!_.asyncResolved&&_.suspenseId===P.pendingId&&(P.deps--,P.deps===0&&P.resolve())},Je=(_,P,I,$=!1,N=!1,V=0)=>{for(let J=V;J<_.length;J++)je(_[J],P,I,$,N)},F=_=>_.shapeFlag&6?F(_.component.subTree):_.shapeFlag&128?_.suspense.next():d(_.anchor||_.el);let X=!1;const G=(_,P,I)=>{_==null?P._vnode&&je(P._vnode,null,null,!0):g(P._vnode||null,_,P,null,null,null,I),X||(X=!0,eu(),ri(),X=!1),P._vnode=_},Z={p:g,um:je,m:dt,r:st,mt:ie,mc:C,pc:z,pbc:T,n:F,o:e};let _e,Ae;return t&&([_e,Ae]=t(Z)),{render:G,hydrate:_e,createApp:eg(G,_e)}}function oa({type:e,props:t},n){return n==="svg"&&e==="foreignObject"||n==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function nr({effect:e,update:t},n){e.allowRecurse=t.allowRecurse=n}function Kd(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function hc(e,t,n=!1){const r=e.children,s=t.children;if(ee(r)&&ee(s))for(let o=0;o>1,e[n[a]]0&&(t[r]=n[o-1]),n[o]=r)}}for(o=n.length,i=n[o-1];o-- >0;)n[o]=i,i=t[i];return n}function zd(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:zd(t)}const dg=e=>e.__isTeleport,Ns=e=>e&&(e.disabled||e.disabled===""),du=e=>typeof SVGElement<"u"&&e instanceof SVGElement,hu=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,sl=(e,t)=>{const n=e&&e.to;return Le(n)?t?t(n):null:n},hg={name:"Teleport",__isTeleport:!0,process(e,t,n,r,s,o,i,a,l,u){const{mc:c,pc:f,pbc:d,o:{insert:h,querySelector:p,createText:g,createComment:y}}=u,w=Ns(t.props);let{shapeFlag:m,children:v,dynamicChildren:b}=t;if(e==null){const E=t.el=g(""),R=t.anchor=g("");h(E,n,r),h(R,n,r);const k=t.target=sl(t.props,p),C=t.targetAnchor=g("");k&&(h(C,k),i==="svg"||du(k)?i="svg":(i==="mathml"||hu(k))&&(i="mathml"));const A=(T,L)=>{m&16&&c(v,T,L,s,o,i,a,l)};w?A(n,R):k&&A(k,C)}else{t.el=e.el;const E=t.anchor=e.anchor,R=t.target=e.target,k=t.targetAnchor=e.targetAnchor,C=Ns(e.props),A=C?n:R,T=C?E:k;if(i==="svg"||du(R)?i="svg":(i==="mathml"||hu(R))&&(i="mathml"),b?(d(e.dynamicChildren,b,A,s,o,i,a),hc(e,t,!0)):l||f(e,t,A,T,s,o,i,a,!1),w)C?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):jo(t,n,E,u,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const L=t.target=sl(t.props,p);L&&jo(t,L,null,u,0)}else C&&jo(t,R,k,u,1)}Gd(t)},remove(e,t,n,r,{um:s,o:{remove:o}},i){const{shapeFlag:a,children:l,anchor:u,targetAnchor:c,target:f,props:d}=e;if(f&&o(c),i&&o(u),a&16){const h=i||!Ns(d);for(let p=0;p0?un||qr:null,Jd(),rs>0&&un&&un.push(e),e}function hr(e,t,n,r,s,o){return Yd(eo(e,t,n,r,s,o,!0))}function it(e,t,n,r,s){return Yd(ye(e,t,n,r,s,!0))}function ss(e){return e?e.__v_isVNode===!0:!1}function gn(e,t){return e.type===t.type&&e.key===t.key}const Ii="__vInternal",Xd=({key:e})=>e??null,Ko=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?Le(e)||we(e)||ae(e)?{i:Me,r:e,k:t,f:!!n}:e:null);function eo(e,t=null,n=null,r=0,s=null,o=e===Xe?0:1,i=!1,a=!1){const l={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Xd(t),ref:t&&Ko(t),scopeId:Oi,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetAnchor:null,staticCount:0,shapeFlag:o,patchFlag:r,dynamicProps:s,dynamicChildren:null,appContext:null,ctx:Me};return a?(vc(l,n),o&128&&e.normalize(l)):n&&(l.shapeFlag|=Le(n)?8:16),rs>0&&!i&&un&&(l.patchFlag>0||o&6)&&l.patchFlag!==32&&un.push(l),l}const ye=vg;function vg(e,t=null,n=null,r=0,s=null,o=!1){if((!e||e===Td)&&(e=tt),ss(e)){const a=xn(e,t,!0);return n&&vc(a,n),rs>0&&!o&&un&&(a.shapeFlag&6?un[un.indexOf(e)]=a:un.push(a)),a.patchFlag|=-2,a}if(kg(e)&&(e=e.__vccOpts),t){t=Qd(t);let{class:a,style:l}=t;a&&!Le(a)&&(t.class=lo(a)),Pe(l)&&(md(l)&&!ee(l)&&(l=De({},l)),t.style=ki(l))}const i=Le(e)?1:Pd(e)?128:dg(e)?64:Pe(e)?4:ae(e)?2:0;return eo(e,t,n,r,s,i,o,!0)}function Qd(e){return e?md(e)||Ii in e?De({},e):e:null}function xn(e,t,n=!1){const{props:r,ref:s,patchFlag:o,children:i}=e,a=t?Zd(r||{},t):r;return{__v_isVNode:!0,__v_skip:!0,type:e.type,props:a,key:a&&Xd(a),ref:t&&t.ref?n&&s?ee(s)?s.concat(Ko(t)):[s,Ko(t)]:Ko(t):s,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:i,target:e.target,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==Xe?o===-1?16:o|16:o,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:e.transition,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&xn(e.ssContent),ssFallback:e.ssFallback&&xn(e.ssFallback),el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce}}function pc(e=" ",t=0){return ye(ns,null,e,t)}function mg(e,t){const n=ye(Fs,null,e);return n.staticCount=t,n}function Is(e="",t=!1){return t?(xe(),it(tt,null,e)):ye(tt,null,e)}function ln(e){return e==null||typeof e=="boolean"?ye(tt):ee(e)?ye(Xe,null,e.slice()):typeof e=="object"?Bn(e):ye(ns,null,String(e))}function Bn(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:xn(e)}function vc(e,t){let n=0;const{shapeFlag:r}=e;if(t==null)t=null;else if(ee(t))n=16;else if(typeof t=="object")if(r&65){const s=t.default;s&&(s._c&&(s._d=!1),vc(e,s()),s._c&&(s._d=!0));return}else{n=32;const s=t._;!s&&!(Ii in t)?t._ctx=Me:s===3&&Me&&(Me.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else ae(t)?(t={default:t,_ctx:Me},n=32):(t=String(t),r&64?(n=16,t=[pc(t)]):n=8);e.children=t,e.shapeFlag|=n}function Zd(...e){const t={};for(let n=0;n$e||Me;let li,ol;{const e=td(),t=(n,r)=>{let s;return(s=e[n])||(s=e[n]=[]),s.push(r),o=>{s.length>1?s.forEach(i=>i(o)):s[0](o)}};li=t("__VUE_INSTANCE_SETTERS__",n=>$e=n),ol=t("__VUE_SSR_SETTERS__",n=>ho=n)}const br=e=>{const t=$e;return li(e),e.scope.on(),()=>{e.scope.off(),li(t)}},il=()=>{$e&&$e.scope.off(),li(null)};function eh(e){return e.vnode.shapeFlag&4}let ho=!1;function bg(e,t=!1){t&&ol(t);const{props:n,children:r}=e.vnode,s=eh(e);tg(e,n,s,t),sg(e,r);const o=s?_g(e,t):void 0;return t&&ol(!1),o}function _g(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=Ql(new Proxy(e.ctx,zm));const{setup:r}=n;if(r){const s=e.setupContext=r.length>1?Sg(e):null,o=br(e);kr();const i=Yn(r,e,0,[e.props,s]);if(Tr(),o(),Hl(i)){if(i.then(il,il),t)return i.then(a=>{al(e,a,t)}).catch(a=>{gs(a,e,0)});e.asyncDep=i}else al(e,i,t)}else th(e,t)}function al(e,t,n){ae(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:Pe(t)&&(e.setupState=wd(t)),th(e,n)}let vu;function th(e,t,n){const r=e.type;if(!e.render){if(!t&&vu&&!r.render){const s=r.template||fc(e).template;if(s){const{isCustomElement:o,compilerOptions:i}=e.appContext.config,{delimiters:a,compilerOptions:l}=r,u=De(De({isCustomElement:o,delimiters:a},i),l);r.render=vu(s,u)}}e.render=r.render||cn}{const s=br(e);kr();try{Gm(e)}finally{Tr(),s()}}}function Eg(e){return e.attrsProxy||(e.attrsProxy=new Proxy(e.attrs,{get(t,n){return ct(e,"get","$attrs"),t[n]}}))}function Sg(e){const t=n=>{e.exposed=n||{}};return{get attrs(){return Eg(e)},slots:e.slots,emit:e.emit,expose:t}}function xi(e){if(e.exposed)return e.exposeProxy||(e.exposeProxy=new Proxy(wd(Ql(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in Ms)return Ms[n](e)},has(t,n){return n in t||n in Ms}}))}function ll(e,t=!0){return ae(e)?e.displayName||e.name:e.name||t&&e.__name}function kg(e){return ae(e)&&"__vccOpts"in e}const D=(e,t)=>fm(e,t,ho);function SO(e,t,n=Oe){const r=ut(),s=yn(t),o=er(t),i=Pr((l,u)=>{let c;return Mm(()=>{const f=e[t];kn(c,f)&&(c=f,u())}),{get(){return l(),n.get?n.get(c):c},set(f){const d=r.vnode.props;!(d&&(t in d||s in d||o in d)&&(`onUpdate:${t}`in d||`onUpdate:${s}`in d||`onUpdate:${o}`in d))&&kn(f,c)&&(c=f,u()),r.emit(`update:${t}`,n.set?n.set(f):f)}}}),a=t==="modelValue"?"modelModifiers":`${t}Modifiers`;return i[Symbol.iterator]=()=>{let l=0;return{next(){return l<2?{value:l++?e[a]||{}:i,done:!1}:{done:!0}}}},i}function nt(e,t,n){const r=arguments.length;return r===2?Pe(t)&&!ee(t)?ss(t)?ye(e,null,[t]):ye(e,t):ye(e,null,t):(r>3?n=Array.prototype.slice.call(arguments,2):r===3&&ss(n)&&(n=[n]),ye(e,t,n))}const nh="3.4.21";/** * @vue/runtime-dom v3.4.21 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT **/const Tg="http://www.w3.org/2000/svg",Pg="http://www.w3.org/1998/Math/MathML",qn=typeof document<"u"?document:null,mu=qn&&qn.createElement("template"),Rg={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,r)=>{const s=t==="svg"?qn.createElementNS(Tg,e):t==="mathml"?qn.createElementNS(Pg,e):qn.createElement(e,n?{is:n}:void 0);return e==="select"&&r&&r.multiple!=null&&s.setAttribute("multiple",r.multiple),s},createText:e=>qn.createTextNode(e),createComment:e=>qn.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>qn.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,r,s,o){const i=n?n.previousSibling:t.lastChild;if(s&&(s===o||s.nextSibling))for(;t.insertBefore(s.cloneNode(!0),n),!(s===o||!(s=s.nextSibling)););else{mu.innerHTML=r==="svg"?`${e}`:r==="mathml"?`${e}`:e;const a=mu.content;if(r==="svg"||r==="mathml"){const l=a.firstChild;for(;l.firstChild;)a.appendChild(l.firstChild);a.removeChild(l)}t.insertBefore(a,n)}return[i?i.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},Fn="transition",ks="animation",os=Symbol("_vtc"),Di=(e,{slots:t})=>nt($m,sh(e),t);Di.displayName="Transition";const rh={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},Og=Di.props=De({},Cd,rh),rr=(e,t=[])=>{ee(e)?e.forEach(n=>n(...t)):e&&e(...t)},gu=e=>e?ee(e)?e.some(t=>t.length>1):e.length>1:!1;function sh(e){const t={};for(const x in e)x in rh||(t[x]=e[x]);if(e.css===!1)return t;const{name:n="v",type:r,duration:s,enterFromClass:o=`${n}-enter-from`,enterActiveClass:i=`${n}-enter-active`,enterToClass:a=`${n}-enter-to`,appearFromClass:l=o,appearActiveClass:u=i,appearToClass:c=a,leaveFromClass:f=`${n}-leave-from`,leaveActiveClass:d=`${n}-leave-active`,leaveToClass:h=`${n}-leave-to`}=e,p=Ag(s),g=p&&p[0],y=p&&p[1],{onBeforeEnter:w,onEnter:m,onEnterCancelled:v,onLeave:b,onLeaveCancelled:E,onBeforeAppear:R=w,onAppear:k=m,onAppearCancelled:C=v}=t,A=(x,W,ie)=>{Un(x,W?c:a),Un(x,W?u:i),ie&&ie()},T=(x,W)=>{x._isLeaving=!1,Un(x,f),Un(x,h),Un(x,d),W&&W()},L=x=>(W,ie)=>{const ne=x?k:m,M=()=>A(W,x,ie);rr(ne,[W,M]),yu(()=>{Un(W,x?l:o),On(W,x?c:a),gu(ne)||wu(W,r,g,M)})};return De(t,{onBeforeEnter(x){rr(w,[x]),On(x,o),On(x,i)},onBeforeAppear(x){rr(R,[x]),On(x,l),On(x,u)},onEnter:L(!1),onAppear:L(!0),onLeave(x,W){x._isLeaving=!0;const ie=()=>T(x,W);On(x,f),ih(),On(x,d),yu(()=>{x._isLeaving&&(Un(x,f),On(x,h),gu(b)||wu(x,r,y,ie))}),rr(b,[x,ie])},onEnterCancelled(x){A(x,!1),rr(v,[x])},onAppearCancelled(x){A(x,!0),rr(C,[x])},onLeaveCancelled(x){T(x),rr(E,[x])}})}function Ag(e){if(e==null)return null;if(Pe(e))return[ia(e.enter),ia(e.leave)];{const t=ia(e);return[t,t]}}function ia(e){return ed(e)}function On(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[os]||(e[os]=new Set)).add(t)}function Un(e,t){t.split(/\s+/).forEach(r=>r&&e.classList.remove(r));const n=e[os];n&&(n.delete(t),n.size||(e[os]=void 0))}function yu(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let Cg=0;function wu(e,t,n,r){const s=e._endId=++Cg,o=()=>{s===e._endId&&r()};if(n)return setTimeout(o,n);const{type:i,timeout:a,propCount:l}=oh(e,t);if(!i)return r();const u=i+"end";let c=0;const f=()=>{e.removeEventListener(u,d),o()},d=h=>{h.target===e&&++c>=l&&f()};setTimeout(()=>{c(n[p]||"").split(", "),s=r(`${Fn}Delay`),o=r(`${Fn}Duration`),i=bu(s,o),a=r(`${ks}Delay`),l=r(`${ks}Duration`),u=bu(a,l);let c=null,f=0,d=0;t===Fn?i>0&&(c=Fn,f=i,d=o.length):t===ks?u>0&&(c=ks,f=u,d=l.length):(f=Math.max(i,u),c=f>0?i>u?Fn:ks:null,d=c?c===Fn?o.length:l.length:0);const h=c===Fn&&/\b(transform|all)(,|$)/.test(r(`${Fn}Property`).toString());return{type:c,timeout:f,propCount:d,hasTransform:h}}function bu(e,t){for(;e.length_u(n)+_u(e[r])))}function _u(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function ih(){return document.body.offsetHeight}function Lg(e,t,n){const r=e[os];r&&(t=(t?[t,...r]:[...r]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const Eu=Symbol("_vod"),Ig=Symbol("_vsh"),xg=Symbol(""),Dg=/(^|;)\s*display\s*:/;function jg(e,t,n){const r=e.style,s=Le(n);let o=!1;if(n&&!s){if(t)if(Le(t))for(const i of t.split(";")){const a=i.slice(0,i.indexOf(":")).trim();n[a]==null&&zo(r,a,"")}else for(const i in t)n[i]==null&&zo(r,i,"");for(const i in n)i==="display"&&(o=!0),zo(r,i,n[i])}else if(s){if(t!==n){const i=r[xg];i&&(n+=";"+i),r.cssText=n,o=Dg.test(n)}}else t&&e.removeAttribute("style");Eu in e&&(e[Eu]=o?r.display:"",e[Ig]&&(r.display="none"))}const Su=/\s*!important$/;function zo(e,t,n){if(ee(n))n.forEach(r=>zo(e,t,r));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const r=Mg(e,t);Su.test(n)?e.setProperty(er(r),n.replace(Su,""),"important"):e[r]=n}}const ku=["Webkit","Moz","ms"],aa={};function Mg(e,t){const n=aa[t];if(n)return n;let r=yn(t);if(r!=="filter"&&r in e)return aa[t]=r;r=Si(r);for(let s=0;sla||(Vg.then(()=>la=0),la=Date.now());function qg(e,t){const n=r=>{if(!r._vts)r._vts=Date.now();else if(r._vts<=n.attached)return;fn(Wg(r,n.value),t,5,[r])};return n.value=e,n.attached=Bg(),n}function Wg(e,t){if(ee(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(r=>s=>!s._stopped&&r&&r(s))}else return t}const Ou=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,Kg=(e,t,n,r,s,o,i,a,l)=>{const u=s==="svg";t==="class"?Lg(e,r,u):t==="style"?jg(e,n,r):ao(t)?$l(t)||Ug(e,t,n,r,i):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):zg(e,t,r,u))?Fg(e,t,r,o,i,a,l):(t==="true-value"?e._trueValue=r:t==="false-value"&&(e._falseValue=r),Ng(e,t,r,u))};function zg(e,t,n,r){if(r)return!!(t==="innerHTML"||t==="textContent"||t in e&&Ou(t)&&ae(n));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const s=e.tagName;if(s==="IMG"||s==="VIDEO"||s==="CANVAS"||s==="SOURCE")return!1}return Ou(t)&&Le(n)?!1:t in e}const ah=new WeakMap,lh=new WeakMap,ci=Symbol("_moveCb"),Au=Symbol("_enterCb"),ch={name:"TransitionGroup",props:De({},Og,{tag:String,moveClass:String}),setup(e,{slots:t}){const n=ut(),r=Ad();let s,o;return uo(()=>{if(!s.length)return;const i=e.moveClass||`${e.name||"v"}-move`;if(!Zg(s[0].el,n.vnode.el,i))return;s.forEach(Yg),s.forEach(Xg);const a=s.filter(Qg);ih(),a.forEach(l=>{const u=l.el,c=u.style;On(u,i),c.transform=c.webkitTransform=c.transitionDuration="";const f=u[ci]=d=>{d&&d.target!==u||(!d||/transform$/.test(d.propertyName))&&(u.removeEventListener("transitionend",f),u[ci]=null,Un(u,i))};u.addEventListener("transitionend",f)})}),()=>{const i=ve(e),a=sh(i);let l=i.tag||Xe;s=o,o=t.default?lc(t.default()):[];for(let u=0;udelete e.mode;ch.props;const Jg=ch;function Yg(e){const t=e.el;t[ci]&&t[ci](),t[Au]&&t[Au]()}function Xg(e){lh.set(e,e.el.getBoundingClientRect())}function Qg(e){const t=ah.get(e),n=lh.get(e),r=t.left-n.left,s=t.top-n.top;if(r||s){const o=e.el.style;return o.transform=o.webkitTransform=`translate(${r}px,${s}px)`,o.transitionDuration="0s",e}}function Zg(e,t,n){const r=e.cloneNode(),s=e[os];s&&s.forEach(a=>{a.split(/\s+/).forEach(l=>l&&r.classList.remove(l))}),n.split(/\s+/).forEach(a=>a&&r.classList.add(a)),r.style.display="none";const o=t.nodeType===1?t:t.parentNode;o.appendChild(r);const{hasTransform:i}=oh(r);return o.removeChild(r),i}const Zn=e=>{const t=e.props["onUpdate:modelValue"]||!1;return ee(t)?n=>zr(t,n):t};function ey(e){e.target.composing=!0}function Cu(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const dn=Symbol("_assign"),kO={created(e,{modifiers:{lazy:t,trim:n,number:r}},s){e[dn]=Zn(s);const o=r||s.props&&s.props.type==="number";An(e,t?"change":"input",i=>{if(i.target.composing)return;let a=e.value;n&&(a=a.trim()),o&&(a=zs(a)),e[dn](a)}),n&&An(e,"change",()=>{e.value=e.value.trim()}),t||(An(e,"compositionstart",ey),An(e,"compositionend",Cu),An(e,"change",Cu))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,modifiers:{lazy:n,trim:r,number:s}},o){if(e[dn]=Zn(o),e.composing)return;const i=s||e.type==="number"?zs(e.value):e.value,a=t??"";i!==a&&(document.activeElement===e&&e.type!=="range"&&(n||r&&e.value.trim()===a)||(e.value=a))}},TO={deep:!0,created(e,t,n){e[dn]=Zn(n),An(e,"change",()=>{const r=e._modelValue,s=is(e),o=e.checked,i=e[dn];if(ee(r)){const a=Bl(r,s),l=a!==-1;if(o&&!l)i(r.concat(s));else if(!o&&l){const u=[...r];u.splice(a,1),i(u)}}else if(vs(r)){const a=new Set(r);o?a.add(s):a.delete(s),i(a)}else i(uh(e,o))})},mounted:Lu,beforeUpdate(e,t,n){e[dn]=Zn(n),Lu(e,t,n)}};function Lu(e,{value:t,oldValue:n},r){e._modelValue=t,ee(t)?e.checked=Bl(t,r.props.value)>-1:vs(t)?e.checked=t.has(r.props.value):t!==n&&(e.checked=yr(t,uh(e,!0)))}const PO={created(e,{value:t},n){e.checked=yr(t,n.props.value),e[dn]=Zn(n),An(e,"change",()=>{e[dn](is(e))})},beforeUpdate(e,{value:t,oldValue:n},r){e[dn]=Zn(r),t!==n&&(e.checked=yr(t,r.props.value))}},RO={deep:!0,created(e,{value:t,modifiers:{number:n}},r){const s=vs(t);An(e,"change",()=>{const o=Array.prototype.filter.call(e.options,i=>i.selected).map(i=>n?zs(is(i)):is(i));e[dn](e.multiple?s?new Set(o):o:o[0]),e._assigning=!0,Be(()=>{e._assigning=!1})}),e[dn]=Zn(r)},mounted(e,{value:t,modifiers:{number:n}}){Iu(e,t,n)},beforeUpdate(e,t,n){e[dn]=Zn(n)},updated(e,{value:t,modifiers:{number:n}}){e._assigning||Iu(e,t,n)}};function Iu(e,t,n){const r=e.multiple,s=ee(t);if(!(r&&!s&&!vs(t))){for(let o=0,i=e.options.length;o-1}else a.selected=t.has(l);else if(yr(is(a),t)){e.selectedIndex!==o&&(e.selectedIndex=o);return}}!r&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function is(e){return"_value"in e?e._value:e.value}function uh(e,t){const n=t?"_trueValue":"_falseValue";return n in e?e[n]:t}const ty=["ctrl","shift","alt","meta"],ny={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>ty.some(n=>e[`${n}Key`]&&!t.includes(n))},OO=(e,t)=>{const n=e._withMods||(e._withMods={}),r=t.join(".");return n[r]||(n[r]=(s,...o)=>{for(let i=0;i{const n=e._withKeys||(e._withKeys={}),r=t.join(".");return n[r]||(n[r]=s=>{if(!("key"in s))return;const o=er(s.key);if(t.some(i=>i===o||ry[i]===o))return e(s)})},fh=De({patchProp:Kg},Rg);let Us,xu=!1;function sy(){return Us||(Us=cg(fh))}function oy(){return Us=xu?Us:ug(fh),xu=!0,Us}const iy=(...e)=>{const t=sy().createApp(...e),{mount:n}=t;return t.mount=r=>{const s=hh(r);if(!s)return;const o=t._component;!ae(o)&&!o.render&&!o.template&&(o.template=s.innerHTML),s.innerHTML="";const i=n(s,!1,dh(s));return s instanceof Element&&(s.removeAttribute("v-cloak"),s.setAttribute("data-v-app","")),i},t},ay=(...e)=>{const t=oy().createApp(...e),{mount:n}=t;return t.mount=r=>{const s=hh(r);if(s)return n(s,!0,dh(s))},t};function dh(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function hh(e){return Le(e)?document.querySelector(e):e}const ly=/#/g,cy=/&/g,uy=/\//g,fy=/=/g,mc=/\+/g,dy=/%5e/gi,hy=/%60/gi,py=/%7c/gi,vy=/%20/gi;function my(e){return encodeURI(""+e).replace(py,"|")}function cl(e){return my(typeof e=="string"?e:JSON.stringify(e)).replace(mc,"%2B").replace(vy,"+").replace(ly,"%23").replace(cy,"%26").replace(hy,"`").replace(dy,"^").replace(uy,"%2F")}function ca(e){return cl(e).replace(fy,"%3D")}function ui(e=""){try{return decodeURIComponent(""+e)}catch{return""+e}}function gy(e){return ui(e.replace(mc," "))}function yy(e){return ui(e.replace(mc," "))}function wy(e=""){const t={};e[0]==="?"&&(e=e.slice(1));for(const n of e.split("&")){const r=n.match(/([^=]+)=?(.*)/)||[];if(r.length<2)continue;const s=gy(r[1]);if(s==="__proto__"||s==="constructor")continue;const o=yy(r[2]||"");t[s]===void 0?t[s]=o:Array.isArray(t[s])?t[s].push(o):t[s]=[t[s],o]}return t}function by(e,t){return(typeof t=="number"||typeof t=="boolean")&&(t=String(t)),t?Array.isArray(t)?t.map(n=>`${ca(e)}=${cl(n)}`).join("&"):`${ca(e)}=${cl(t)}`:ca(e)}function _y(e){return Object.keys(e).filter(t=>e[t]!==void 0).map(t=>by(t,e[t])).filter(Boolean).join("&")}const Ey=/^[\s\w\0+.-]{2,}:([/\\]{1,2})/,Sy=/^[\s\w\0+.-]{2,}:([/\\]{2})?/,ky=/^([/\\]\s*){2,}[^/\\]/,Ty=/^[\s\0]*(blob|data|javascript|vbscript):$/i,Py=/\/$|\/\?|\/#/,Ry=/^\.?\//;function po(e,t={}){return typeof t=="boolean"&&(t={acceptRelative:t}),t.strict?Ey.test(e):Sy.test(e)||(t.acceptRelative?ky.test(e):!1)}function Oy(e){return!!e&&Ty.test(e)}function ul(e="",t){return t?Py.test(e):e.endsWith("/")}function ph(e="",t){if(!t)return(ul(e)?e.slice(0,-1):e)||"/";if(!ul(e,!0))return e||"/";let n=e,r="";const s=e.indexOf("#");s>=0&&(n=e.slice(0,s),r=e.slice(s));const[o,...i]=n.split("?");return(o.slice(0,-1)||"/")+(i.length>0?`?${i.join("?")}`:"")+r}function fl(e="",t){if(!t)return e.endsWith("/")?e:e+"/";if(ul(e,!0))return e||"/";let n=e,r="";const s=e.indexOf("#");if(s>=0&&(n=e.slice(0,s),r=e.slice(s),!n))return r;const[o,...i]=n.split("?");return o+"/"+(i.length>0?`?${i.join("?")}`:"")+r}function Ay(e=""){return e.startsWith("/")}function Du(e=""){return Ay(e)?e:"/"+e}function Cy(e,t){if(mh(t)||po(e))return e;const n=ph(t);return e.startsWith(n)?e:vo(n,e)}function ju(e,t){if(mh(t))return e;const n=ph(t);if(!e.startsWith(n))return e;const r=e.slice(n.length);return r[0]==="/"?r:"/"+r}function vh(e,t){const n=ji(e),r={...wy(n.search),...t};return n.search=_y(r),xy(n)}function mh(e){return!e||e==="/"}function Ly(e){return e&&e!=="/"}function vo(e,...t){let n=e||"";for(const r of t.filter(s=>Ly(s)))if(n){const s=r.replace(Ry,"");n=fl(n)+s}else n=r;return n}function Iy(e,t,n={}){return n.trailingSlash||(e=fl(e),t=fl(t)),n.leadingSlash||(e=Du(e),t=Du(t)),n.encoding||(e=ui(e),t=ui(t)),e===t}const gh=Symbol.for("ufo:protocolRelative");function ji(e="",t){const n=e.match(/^[\s\0]*(blob:|data:|javascript:|vbscript:)(.*)/i);if(n){const[,f,d=""]=n;return{protocol:f.toLowerCase(),pathname:d,href:f+d,auth:"",host:"",search:"",hash:""}}if(!po(e,{acceptRelative:!0}))return t?ji(t+e):Mu(e);const[,r="",s,o=""]=e.replace(/\\/g,"/").match(/^[\s\0]*([\w+.-]{2,}:)?\/\/([^/@]+@)?(.*)/)||[],[,i="",a=""]=o.match(/([^#/?]*)(.*)?/)||[],{pathname:l,search:u,hash:c}=Mu(a.replace(/\/(?=[A-Za-z]:)/,""));return{protocol:r.toLowerCase(),auth:s?s.slice(0,Math.max(0,s.length-1)):"",host:i,pathname:l,search:u,hash:c,[gh]:!r}}function Mu(e=""){const[t="",n="",r=""]=(e.match(/([^#?]*)(\?[^#]*)?(#.*)?/)||[]).splice(1);return{pathname:t,search:n,hash:r}}function xy(e){const t=e.pathname||"",n=e.search?(e.search.startsWith("?")?"":"?")+e.search:"",r=e.hash||"",s=e.auth?e.auth+"@":"",o=e.host||"";return(e.protocol||e[gh]?(e.protocol||"")+"//":"")+s+o+t+n+r}const Dy=()=>{var e;return((e=window==null?void 0:window.__NUXT__)==null?void 0:e.config)||{}},fi=Dy().app,jy=()=>fi.baseURL,My=()=>fi.buildAssetsDir,Ny=(...e)=>vo(yh(),My(),...e),yh=(...e)=>{const t=fi.cdnURL||fi.baseURL;return e.length?vo(t,...e):t};globalThis.__buildAssetsURL=Ny,globalThis.__publicAssetsURL=yh;const Fy=/"(?:_|\\u0{2}5[Ff]){2}(?:p|\\u0{2}70)(?:r|\\u0{2}72)(?:o|\\u0{2}6[Ff])(?:t|\\u0{2}74)(?:o|\\u0{2}6[Ff])(?:_|\\u0{2}5[Ff]){2}"\s*:/,$y=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/,Uy=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/;function Hy(e,t){if(e==="__proto__"||e==="constructor"&&t&&typeof t=="object"&&"prototype"in t){Vy(e);return}return t}function Vy(e){console.warn(`[destr] Dropping "${e}" key to prevent prototype pollution.`)}function di(e,t={}){if(typeof e!="string")return e;const n=e.trim();if(e[0]==='"'&&e.endsWith('"')&&!e.includes("\\"))return n.slice(1,-1);if(n.length<=9){const r=n.toLowerCase();if(r==="true")return!0;if(r==="false")return!1;if(r==="undefined")return;if(r==="null")return null;if(r==="nan")return Number.NaN;if(r==="infinity")return Number.POSITIVE_INFINITY;if(r==="-infinity")return Number.NEGATIVE_INFINITY}if(!Uy.test(e)){if(t.strict)throw new SyntaxError("[destr] Invalid JSON");return e}try{if(Fy.test(e)||$y.test(e)){if(t.strict)throw new Error("[destr] Possible prototype pollution");return JSON.parse(e,Hy)}return JSON.parse(e)}catch(r){if(t.strict)throw r;return e}}class By extends Error{constructor(t,n){super(t,n),this.name="FetchError",n!=null&&n.cause&&!this.cause&&(this.cause=n.cause)}}function qy(e){var l,u,c,f,d;const t=((l=e.error)==null?void 0:l.message)||((u=e.error)==null?void 0:u.toString())||"",n=((c=e.request)==null?void 0:c.method)||((f=e.options)==null?void 0:f.method)||"GET",r=((d=e.request)==null?void 0:d.url)||String(e.request)||"/",s=`[${n}] ${JSON.stringify(r)}`,o=e.response?`${e.response.status} ${e.response.statusText}`:"",i=`${s}: ${o}${t?` ${t}`:""}`,a=new By(i,e.error?{cause:e.error}:void 0);for(const h of["request","options","response"])Object.defineProperty(a,h,{get(){return e[h]}});for(const[h,p]of[["data","_data"],["status","status"],["statusCode","status"],["statusText","statusText"],["statusMessage","statusText"]])Object.defineProperty(a,h,{get(){return e.response&&e.response[p]}});return a}const Wy=new Set(Object.freeze(["PATCH","POST","PUT","DELETE"]));function Nu(e="GET"){return Wy.has(e.toUpperCase())}function Ky(e){if(e===void 0)return!1;const t=typeof e;return t==="string"||t==="number"||t==="boolean"||t===null?!0:t!=="object"?!1:Array.isArray(e)?!0:e.buffer?!1:e.constructor&&e.constructor.name==="Object"||typeof e.toJSON=="function"}const zy=new Set(["image/svg","application/xml","application/xhtml","application/html"]),Gy=/^application\/(?:[\w!#$%&*.^`~-]*\+)?json(;.+)?$/i;function Jy(e=""){if(!e)return"json";const t=e.split(";").shift()||"";return Gy.test(t)?"json":zy.has(t)||t.startsWith("text/")?"text":"blob"}function Yy(e,t,n=globalThis.Headers){const r={...t,...e};if(t!=null&&t.params&&(e!=null&&e.params)&&(r.params={...t==null?void 0:t.params,...e==null?void 0:e.params}),t!=null&&t.query&&(e!=null&&e.query)&&(r.query={...t==null?void 0:t.query,...e==null?void 0:e.query}),t!=null&&t.headers&&(e!=null&&e.headers)){r.headers=new n((t==null?void 0:t.headers)||{});for(const[s,o]of new n((e==null?void 0:e.headers)||{}))r.headers.set(s,o)}return r}const Xy=new Set([408,409,425,429,500,502,503,504]),Qy=new Set([101,204,205,304]);function wh(e={}){const{fetch:t=globalThis.fetch,Headers:n=globalThis.Headers,AbortController:r=globalThis.AbortController}=e;async function s(a){const l=a.error&&a.error.name==="AbortError"&&!a.options.timeout||!1;if(a.options.retry!==!1&&!l){let c;typeof a.options.retry=="number"?c=a.options.retry:c=Nu(a.options.method)?0:1;const f=a.response&&a.response.status||500;if(c>0&&(Array.isArray(a.options.retryStatusCodes)?a.options.retryStatusCodes.includes(f):Xy.has(f))){const d=a.options.retryDelay||0;return d>0&&await new Promise(h=>setTimeout(h,d)),o(a.request,{...a.options,retry:c-1,timeout:a.options.timeout})}}const u=qy(a);throw Error.captureStackTrace&&Error.captureStackTrace(u,o),u}const o=async function(l,u={}){var d;const c={request:l,options:Yy(u,e.defaults,n),response:void 0,error:void 0};if(c.options.method=(d=c.options.method)==null?void 0:d.toUpperCase(),c.options.onRequest&&await c.options.onRequest(c),typeof c.request=="string"&&(c.options.baseURL&&(c.request=Cy(c.request,c.options.baseURL)),(c.options.query||c.options.params)&&(c.request=vh(c.request,{...c.options.params,...c.options.query}))),c.options.body&&Nu(c.options.method)&&(Ky(c.options.body)?(c.options.body=typeof c.options.body=="string"?c.options.body:JSON.stringify(c.options.body),c.options.headers=new n(c.options.headers||{}),c.options.headers.has("content-type")||c.options.headers.set("content-type","application/json"),c.options.headers.has("accept")||c.options.headers.set("accept","application/json")):("pipeTo"in c.options.body&&typeof c.options.body.pipeTo=="function"||typeof c.options.body.pipe=="function")&&("duplex"in c.options||(c.options.duplex="half"))),!c.options.signal&&c.options.timeout){const h=new r;setTimeout(()=>h.abort(),c.options.timeout),c.options.signal=h.signal}try{c.response=await t(c.request,c.options)}catch(h){return c.error=h,c.options.onRequestError&&await c.options.onRequestError(c),await s(c)}if(c.response.body&&!Qy.has(c.response.status)&&c.options.method!=="HEAD"){const h=(c.options.parseResponse?"json":c.options.responseType)||Jy(c.response.headers.get("content-type")||"");switch(h){case"json":{const p=await c.response.text(),g=c.options.parseResponse||di;c.response._data=g(p);break}case"stream":{c.response._data=c.response.body;break}default:c.response._data=await c.response[h]()}}return c.options.onResponse&&await c.options.onResponse(c),!c.options.ignoreResponseError&&c.response.status>=400&&c.response.status<600?(c.options.onResponseError&&await c.options.onResponseError(c),await s(c)):c.response},i=async function(l,u){return(await o(l,u))._data};return i.raw=o,i.native=(...a)=>t(...a),i.create=(a={})=>wh({...e,defaults:{...e.defaults,...a}}),i}const gc=function(){if(typeof globalThis<"u")return globalThis;if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("unable to locate global object")}(),Zy=gc.fetch||(()=>Promise.reject(new Error("[ofetch] global.fetch is not supported!"))),ew=gc.Headers,tw=gc.AbortController,nw=wh({fetch:Zy,Headers:ew,AbortController:tw}),rw=nw;globalThis.$fetch||(globalThis.$fetch=rw.create({baseURL:jy()}));function dl(e,t={},n){for(const r in e){const s=e[r],o=n?`${n}:${r}`:r;typeof s=="object"&&s!==null?dl(s,t,o):typeof s=="function"&&(t[o]=s)}return t}const sw={run:e=>e()},ow=()=>sw,bh=typeof console.createTask<"u"?console.createTask:ow;function iw(e,t){const n=t.shift(),r=bh(n);return e.reduce((s,o)=>s.then(()=>r.run(()=>o(...t))),Promise.resolve())}function aw(e,t){const n=t.shift(),r=bh(n);return Promise.all(e.map(s=>r.run(()=>s(...t))))}function ua(e,t){for(const n of[...e])n(t)}class lw{constructor(){this._hooks={},this._before=void 0,this._after=void 0,this._deprecatedMessages=void 0,this._deprecatedHooks={},this.hook=this.hook.bind(this),this.callHook=this.callHook.bind(this),this.callHookWith=this.callHookWith.bind(this)}hook(t,n,r={}){if(!t||typeof n!="function")return()=>{};const s=t;let o;for(;this._deprecatedHooks[t];)o=this._deprecatedHooks[t],t=o.to;if(o&&!r.allowDeprecated){let i=o.message;i||(i=`${s} hook has been deprecated`+(o.to?`, please use ${o.to}`:"")),this._deprecatedMessages||(this._deprecatedMessages=new Set),this._deprecatedMessages.has(i)||(console.warn(i),this._deprecatedMessages.add(i))}if(!n.name)try{Object.defineProperty(n,"name",{get:()=>"_"+t.replace(/\W+/g,"_")+"_hook_cb",configurable:!0})}catch{}return this._hooks[t]=this._hooks[t]||[],this._hooks[t].push(n),()=>{n&&(this.removeHook(t,n),n=void 0)}}hookOnce(t,n){let r,s=(...o)=>(typeof r=="function"&&r(),r=void 0,s=void 0,n(...o));return r=this.hook(t,s),r}removeHook(t,n){if(this._hooks[t]){const r=this._hooks[t].indexOf(n);r!==-1&&this._hooks[t].splice(r,1),this._hooks[t].length===0&&delete this._hooks[t]}}deprecateHook(t,n){this._deprecatedHooks[t]=typeof n=="string"?{to:n}:n;const r=this._hooks[t]||[];delete this._hooks[t];for(const s of r)this.hook(t,s)}deprecateHooks(t){Object.assign(this._deprecatedHooks,t);for(const n in t)this.deprecateHook(n,t[n])}addHooks(t){const n=dl(t),r=Object.keys(n).map(s=>this.hook(s,n[s]));return()=>{for(const s of r.splice(0,r.length))s()}}removeHooks(t){const n=dl(t);for(const r in n)this.removeHook(r,n[r])}removeAllHooks(){for(const t in this._hooks)delete this._hooks[t]}callHook(t,...n){return n.unshift(t),this.callHookWith(iw,t,...n)}callHookParallel(t,...n){return n.unshift(t),this.callHookWith(aw,t,...n)}callHookWith(t,n,...r){const s=this._before||this._after?{name:n,args:r,context:{}}:void 0;this._before&&ua(this._before,s);const o=t(n in this._hooks?[...this._hooks[n]]:[],r);return o instanceof Promise?o.finally(()=>{this._after&&s&&ua(this._after,s)}):(this._after&&s&&ua(this._after,s),o)}beforeEach(t){return this._before=this._before||[],this._before.push(t),()=>{if(this._before!==void 0){const n=this._before.indexOf(t);n!==-1&&this._before.splice(n,1)}}}afterEach(t){return this._after=this._after||[],this._after.push(t),()=>{if(this._after!==void 0){const n=this._after.indexOf(t);n!==-1&&this._after.splice(n,1)}}}}function _h(){return new lw}function cw(e={}){let t,n=!1;const r=i=>{if(t&&t!==i)throw new Error("Context conflict")};let s;if(e.asyncContext){const i=e.AsyncLocalStorage||globalThis.AsyncLocalStorage;i?s=new i:console.warn("[unctx] `AsyncLocalStorage` is not provided.")}const o=()=>{if(s&&t===void 0){const i=s.getStore();if(i!==void 0)return i}return t};return{use:()=>{const i=o();if(i===void 0)throw new Error("Context is not available");return i},tryUse:()=>o(),set:(i,a)=>{a||r(i),t=i,n=!0},unset:()=>{t=void 0,n=!1},call:(i,a)=>{r(i),t=i;try{return s?s.run(i,a):a()}finally{n||(t=void 0)}},async callAsync(i,a){t=i;const l=()=>{t=i},u=()=>t===i?l:void 0;hl.add(u);try{const c=s?s.run(i,a):a();return n||(t=void 0),await c}finally{hl.delete(u)}}}}function uw(e={}){const t={};return{get(n,r={}){return t[n]||(t[n]=cw({...e,...r})),t[n],t[n]}}}const hi=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof global<"u"?global:typeof window<"u"?window:{},Fu="__unctx__",fw=hi[Fu]||(hi[Fu]=uw()),dw=(e,t={})=>fw.get(e,t),$u="__unctx_async_handlers__",hl=hi[$u]||(hi[$u]=new Set);function as(e){const t=[];for(const s of hl){const o=s();o&&t.push(o)}const n=()=>{for(const s of t)s()};let r=e();return r&&typeof r=="object"&&"catch"in r&&(r=r.catch(s=>{throw n(),s})),[r,n]}const Eh=dw("nuxt-app",{asyncContext:!1}),hw="__nuxt_plugin";function pw(e){let t=0;const n={_scope:ql(),provide:void 0,globalName:"nuxt",versions:{get nuxt(){return"3.10.3"},get vue(){return n.vueApp.version}},payload:Ee({data:{},state:{},once:new Set,_errors:{},...window.__NUXT__??{}}),static:{data:{}},runWithContext:s=>n._scope.run(()=>gw(n,s)),isHydrating:!0,deferHydration(){if(!n.isHydrating)return()=>{};t++;let s=!1;return()=>{if(!s&&(s=!0,t--,t===0))return n.isHydrating=!1,n.callHook("app:suspense:resolve")}},_asyncDataPromises:{},_asyncData:{},_payloadRevivers:{},...e};n.hooks=_h(),n.hook=n.hooks.hook,n.callHook=n.hooks.callHook,n.provide=(s,o)=>{const i="$"+s;Mo(n,i,o),Mo(n.vueApp.config.globalProperties,i,o)},Mo(n.vueApp,"$nuxt",n),Mo(n.vueApp.config.globalProperties,"$nuxt",n);{window.addEventListener("nuxt.preloadError",o=>{n.callHook("app:chunkError",{error:o.payload})}),window.useNuxtApp=window.useNuxtApp||de;const s=n.hook("app:error",(...o)=>{console.error("[nuxt] error caught during app initialization",...o)});n.hook("app:mounted",s)}const r=Ee(n.payload.config);return n.provide("config",r),n}async function vw(e,t){if(t.hooks&&e.hooks.addHooks(t.hooks),typeof t=="function"){const{provide:n}=await e.runWithContext(()=>t(e))||{};if(n&&typeof n=="object")for(const r in n)e.provide(r,n[r])}}async function mw(e,t){const n=[],r=[],s=[],o=[];let i=0;async function a(l){var c;const u=((c=l.dependsOn)==null?void 0:c.filter(f=>t.some(d=>d._name===f)&&!n.includes(f)))??[];if(u.length>0)r.push([new Set(u),l]);else{const f=vw(e,l).then(async()=>{l._name&&(n.push(l._name),await Promise.all(r.map(async([d,h])=>{d.has(l._name)&&(d.delete(l._name),d.size===0&&(i++,await a(h)))})))});l.parallel?s.push(f.catch(d=>o.push(d))):await f}}for(const l of t)await a(l);if(await Promise.all(s),i)for(let l=0;l{}),e,{[hw]:!0,_name:t})}function gw(e,t,n){const r=()=>n?t(...n):t();return Eh.set(e),e.vueApp.runWithContext(r)}function yw(){var t;let e;return $d()&&(e=(t=ut())==null?void 0:t.appContext.app.$nuxt),e=e||Eh.tryUse(),e||null}function de(){const e=yw();if(!e)throw new Error("[nuxt] instance unavailable");return e}function mo(e){return de().$config}function Mo(e,t,n){Object.defineProperty(e,t,{get:()=>n})}function fa(e){if(e===null||typeof e!="object")return!1;const t=Object.getPrototypeOf(e);return t!==null&&t!==Object.prototype&&Object.getPrototypeOf(t)!==null||Symbol.iterator in e?!1:Symbol.toStringTag in e?Object.prototype.toString.call(e)==="[object Module]":!0}function pl(e,t,n=".",r){if(!fa(t))return pl(e,{},n,r);const s=Object.assign({},t);for(const o in e){if(o==="__proto__"||o==="constructor")continue;const i=e[o];i!=null&&(r&&r(s,o,i,n)||(Array.isArray(i)&&Array.isArray(s[o])?s[o]=[...i,...s[o]]:fa(i)&&fa(s[o])?s[o]=pl(i,s[o],(n?`${n}.`:"")+o.toString(),r):s[o]=i))}return s}function ww(e){return(...t)=>t.reduce((n,r)=>pl(n,r,"",e),{})}const bw=ww();function _w(e,t){try{return t in e}catch{return!1}}var Ew=Object.defineProperty,Sw=(e,t,n)=>t in e?Ew(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ar=(e,t,n)=>(Sw(e,typeof t!="symbol"?t+"":t,n),n);class vl extends Error{constructor(t,n={}){super(t,n),ar(this,"statusCode",500),ar(this,"fatal",!1),ar(this,"unhandled",!1),ar(this,"statusMessage"),ar(this,"data"),ar(this,"cause"),n.cause&&!this.cause&&(this.cause=n.cause)}toJSON(){const t={message:this.message,statusCode:gl(this.statusCode,500)};return this.statusMessage&&(t.statusMessage=Sh(this.statusMessage)),this.data!==void 0&&(t.data=this.data),t}}ar(vl,"__h3_error__",!0);function ml(e){if(typeof e=="string")return new vl(e);if(kw(e))return e;const t=new vl(e.message??e.statusMessage??"",{cause:e.cause||e});if(_w(e,"stack"))try{Object.defineProperty(t,"stack",{get(){return e.stack}})}catch{try{t.stack=e.stack}catch{}}if(e.data&&(t.data=e.data),e.statusCode?t.statusCode=gl(e.statusCode,t.statusCode):e.status&&(t.statusCode=gl(e.status,t.statusCode)),e.statusMessage?t.statusMessage=e.statusMessage:e.statusText&&(t.statusMessage=e.statusText),t.statusMessage){const n=t.statusMessage;Sh(t.statusMessage)!==n&&console.warn("[h3] Please prefer using `message` for longer error messages instead of `statusMessage`. In the future, `statusMessage` will be sanitized by default.")}return e.fatal!==void 0&&(t.fatal=e.fatal),e.unhandled!==void 0&&(t.unhandled=e.unhandled),t}function kw(e){var t;return((t=e==null?void 0:e.constructor)==null?void 0:t.__h3_error__)===!0}const Tw=/[^\u0009\u0020-\u007E]/g;function Sh(e=""){return e.replace(Tw,"")}function gl(e,t=200){return!e||(typeof e=="string"&&(e=Number.parseInt(e,10)),e<100||e>999)?t:e}const kh=Symbol("layout-meta"),go=Symbol("route"),sn=()=>{var e;return(e=de())==null?void 0:e.$router},yo=()=>$d()?Ne(go,de()._route):de()._route;function CO(e){return e}const Th=()=>{try{if(de()._processingMiddleware)return!0}catch{return!0}return!1},LO=(e,t)=>{e||(e="/");const n=typeof e=="string"?e:vh(e.path||"/",e.query||{})+(e.hash||"");if(t!=null&&t.open){{const{target:a="_blank",windowFeatures:l={}}=t.open,u=Object.entries(l).filter(([c,f])=>f!==void 0).map(([c,f])=>`${c.toLowerCase()}=${f}`).join(", ");open(n,a,u)}return Promise.resolve()}const r=(t==null?void 0:t.external)||po(n,{acceptRelative:!0});if(r){if(!(t!=null&&t.external))throw new Error("Navigating to an external URL is not allowed by default. Use `navigateTo(url, { external: true })`.");const a=ji(n).protocol;if(a&&Oy(a))throw new Error(`Cannot navigate to a URL with '${a}' protocol.`)}const s=Th();if(!r&&s)return e;const o=sn(),i=de();return r?(i._scope.stop(),t!=null&&t.replace?location.replace(n):location.href=n,s?i.isHydrating?new Promise(()=>{}):!1:Promise.resolve()):t!=null&&t.replace?o.replace(e):o.push(e)},IO=e=>{const t=de(),n=Th();if(n||t.isHydrating){const r=sn().beforeResolve(s=>{s.meta.layout=e,r()})}n||(yo().meta.layout=e)},Ph="__nuxt_error",Mi=()=>tc(de().payload,"error"),Vr=e=>{const t=Ni(e);try{const n=de(),r=Mi();n.hooks.callHook("app:error",t),r.value=r.value||t}catch{throw t}return t},Pw=async(e={})=>{const t=de(),n=Mi();t.callHook("app:error:cleared",e),e.redirect&&await sn().replace(e.redirect),n.value=null},Rw=e=>!!e&&typeof e=="object"&&Ph in e,Ni=e=>{const t=ml(e);return Object.defineProperty(t,Ph,{value:!0,configurable:!1,writable:!1}),t},Ow="modulepreload",Aw=function(e,t){return e[0]==="."?new URL(e,t).href:e},Uu={},Cw=function(t,n,r){let s=Promise.resolve();if(n&&n.length>0){const o=document.getElementsByTagName("link");s=Promise.all(n.map(i=>{if(i=Aw(i,r),i in Uu)return;Uu[i]=!0;const a=i.endsWith(".css"),l=a?'[rel="stylesheet"]':"";if(!!r)for(let f=o.length-1;f>=0;f--){const d=o[f];if(d.href===i&&(!a||d.rel==="stylesheet"))return}else if(document.querySelector(`link[href="proxy.php?url=https%3A%2F%2Fstudykit.app%2F%24%7Bi%7D"]${l}`))return;const c=document.createElement("link");if(c.rel=a?"stylesheet":Ow,a||(c.as="script",c.crossOrigin=""),c.href=i,document.head.appendChild(c),a)return new Promise((f,d)=>{c.addEventListener("load",f),c.addEventListener("error",()=>d(new Error(`Unable to preload CSS for ${i}`)))})}))}return s.then(()=>t()).catch(o=>{const i=new Event("vite:preloadError",{cancelable:!0});if(i.payload=o,window.dispatchEvent(i),!i.defaultPrevented)throw o})},B=(...e)=>Cw(...e).catch(t=>{const n=new Event("nuxt.preloadError");throw n.payload=t,window.dispatchEvent(n),t}),Lw=-1,Iw=-2,xw=-3,Dw=-4,jw=-5,Mw=-6;function Nw(e,t){return Fw(JSON.parse(e),t)}function Fw(e,t){if(typeof e=="number")return s(e,!0);if(!Array.isArray(e)||e.length===0)throw new Error("Invalid input");const n=e,r=Array(n.length);function s(o,i=!1){if(o===Lw)return;if(o===xw)return NaN;if(o===Dw)return 1/0;if(o===jw)return-1/0;if(o===Mw)return-0;if(i)throw new Error("Invalid input");if(o in r)return r[o];const a=n[o];if(!a||typeof a!="object")r[o]=a;else if(Array.isArray(a))if(typeof a[0]=="string"){const l=a[0],u=t==null?void 0:t[l];if(u)return r[o]=u(s(a[1]));switch(l){case"Date":r[o]=new Date(a[1]);break;case"Set":const c=new Set;r[o]=c;for(let h=1;h>>9)+65536).toString(16).substring(1,8).toLowerCase()}function Hu(e){return e._h||yc(e._d?e._d:`${e.tag}:${e.textContent||e.innerHTML||""}:${Object.entries(e.props).map(([t,n])=>`${t}:${String(n)}`).join(",")}`)}function Oh(e,t){const{props:n,tag:r}=e;if(Vw.includes(r))return r;if(r==="link"&&n.rel==="canonical")return"canonical";if(n.charset)return"charset";const s=["id"];r==="meta"&&s.push("name","property","http-equiv");for(const o of s)if(typeof n[o]<"u"){const i=String(n[o]);return t&&!t(i)?!1:`${r}:${o}:${i}`}return!1}function Vu(e,t){return e==null?t||null:typeof e=="function"?e(t):e}async function qw(e,t,n){const r={tag:e,props:await Ah(typeof t=="object"&&typeof t!="function"&&!(t instanceof Promise)?{...t}:{[["script","noscript","style"].includes(e)?"innerHTML":"textContent"]:t},["templateParams","titleTemplate"].includes(e))};return Rh.forEach(s=>{const o=typeof r.props[s]<"u"?r.props[s]:n[s];typeof o<"u"&&((!["innerHTML","textContent","children"].includes(s)||Uw.includes(r.tag))&&(r[s==="children"?"innerHTML":s]=o),delete r.props[s])}),r.props.body&&(r.tagPosition="bodyClose",delete r.props.body),r.tag==="script"&&typeof r.innerHTML=="object"&&(r.innerHTML=JSON.stringify(r.innerHTML),r.props.type=r.props.type||"application/json"),Array.isArray(r.props.content)?r.props.content.map(s=>({...r,props:{...r.props,content:s}})):r}function Ww(e){return typeof e=="object"&&!Array.isArray(e)&&(e=Object.keys(e).filter(t=>e[t])),(Array.isArray(e)?e.join(" "):e).split(" ").filter(t=>t.trim()).filter(Boolean).join(" ")}async function Ah(e,t){for(const n of Object.keys(e)){if(n==="class"){e[n]=Ww(e[n]);continue}if(e[n]instanceof Promise&&(e[n]=await e[n]),!t&&!Rh.includes(n)){const r=String(e[n]),s=n.startsWith("data-");r==="true"||r===""?e[n]=s?"true":!0:e[n]||(s&&r==="false"?e[n]="false":delete e[n])}}return e}const Kw=10;async function zw(e){const t=[];return Object.entries(e.resolvedInput).filter(([n,r])=>typeof r<"u"&&Hw.includes(n)).forEach(([n,r])=>{const s=$w(r);t.push(...s.map(o=>qw(n,o,e)).flat())}),(await Promise.all(t)).flat().filter(Boolean).map((n,r)=>(n._e=e._i,e.mode&&(n._m=e.mode),n._p=(e._i<l&&l[u]||void 0,t):a=t[i],typeof a<"u"?(a||"").replace(/"/g,'\\"'):!1}let s=e;try{s=decodeURI(e)}catch{}return(s.match(/%(\w+\.+\w+)|%(\w+)/g)||[]).sort().reverse().forEach(i=>{const a=r(i.slice(1));typeof a=="string"&&(e=e.replace(new RegExp(`\\${i}(\\W|$)`,"g"),(l,u)=>`${a}${u}`).trim())}),e.includes($n)&&(e.endsWith($n)&&(e=e.slice(0,-$n.length).trim()),e.startsWith($n)&&(e=e.slice($n.length).trim()),e=e.replace(new RegExp(`\\${$n}\\s*\\${$n}`,"g"),$n),e=Jo(e,{separator:n},n)),e}async function Lh(e,t={}){var c;const n=t.document||e.resolvedOptions.document;if(!n)return;const r={shouldRender:e.dirty,tags:[]};if(await e.hooks.callHook("dom:beforeRender",r),!r.shouldRender)return;const s=(await e.resolveTags()).map(f=>({tag:f,id:Go.includes(f.tag)?Hu(f):f.tag,shouldRender:!0}));let o=e._dom;if(!o){o={elMap:{htmlAttrs:n.documentElement,bodyAttrs:n.body}};for(const f of["body","head"]){const d=(c=n==null?void 0:n[f])==null?void 0:c.children,h=[];for(const p of[...d].filter(g=>Go.includes(g.tagName.toLowerCase()))){const g={tag:p.tagName.toLowerCase(),props:await Ah(p.getAttributeNames().reduce((m,v)=>({...m,[v]:p.getAttribute(v)}),{})),innerHTML:p.innerHTML};let y=1,w=Oh(g);for(;w&&h.find(m=>m._d===w);)w=`${w}:${y++}`;g._d=w||void 0,h.push(g),o.elMap[p.getAttribute("data-hid")||Hu(g)]=p}}}o.pendingSideEffects={...o.sideEffects||{}},o.sideEffects={};function i(f,d,h){const p=`${f}:${d}`;o.sideEffects[p]=h,delete o.pendingSideEffects[p]}function a({id:f,$el:d,tag:h}){const p=h.tag.endsWith("Attrs");o.elMap[f]=d,p||(["textContent","innerHTML"].forEach(g=>{h[g]&&h[g]!==d[g]&&(d[g]=h[g])}),i(f,"el",()=>{var g;(g=o.elMap[f])==null||g.remove(),delete o.elMap[f]})),Object.entries(h.props).forEach(([g,y])=>{const w=`attr:${g}`;if(g==="class")for(const m of(y||"").split(" ").filter(Boolean))p&&i(f,`${w}:${m}`,()=>d.classList.remove(m)),!d.classList.contains(m)&&d.classList.add(m);else if(g==="style")for(const m of(y||"").split(";").filter(Boolean)){const[v,b]=m.split(":").map(E=>E.trim());i(f,`${w}:${m}:${v}`,()=>{d.style.removeProperty(v)}),d.style.setProperty(v,b)}else d.getAttribute(g)!==y&&d.setAttribute(g,y===!0?"":String(y)),p&&i(f,w,()=>d.removeAttribute(g))})}const l=[],u={bodyClose:void 0,bodyOpen:void 0,head:void 0};for(const f of s){const{tag:d,shouldRender:h,id:p}=f;if(h){if(d.tag==="title"){n.title=d.textContent;continue}f.$el=f.$el||o.elMap[p],f.$el?a(f):Go.includes(d.tag)&&l.push(f)}}for(const f of l){const d=f.tag.tagPosition||"head";f.$el=n.createElement(f.tag.tag),a(f),u[d]=u[d]||n.createDocumentFragment(),u[d].appendChild(f.$el)}for(const f of s)await e.hooks.callHook("dom:renderTag",f,n,i);u.head&&n.head.appendChild(u.head),u.bodyOpen&&n.body.insertBefore(u.bodyOpen,n.body.firstChild),u.bodyClose&&n.body.appendChild(u.bodyClose),Object.values(o.pendingSideEffects).forEach(f=>f()),e._dom=o,e.dirty=!1,await e.hooks.callHook("dom:rendered",{renders:s})}async function Jw(e,t={}){const n=t.delayFn||(r=>setTimeout(r,10));return e._domUpdatePromise=e._domUpdatePromise||new Promise(r=>n(async()=>{await Lh(e,t),delete e._domUpdatePromise,r()}))}function Yw(e){return t=>{var r,s;const n=((s=(r=t.resolvedOptions.document)==null?void 0:r.head.querySelector('script[id="unhead:payload"]'))==null?void 0:s.innerHTML)||!1;return n&&t.push(JSON.parse(n)),{mode:"client",hooks:{"entries:updated":function(o){Jw(o,e)}}}}}const Xw=["templateParams","htmlAttrs","bodyAttrs"],Qw={hooks:{"tag:normalise":function({tag:e}){["hid","vmid","key"].forEach(r=>{e.props[r]&&(e.key=e.props[r],delete e.props[r])});const n=Oh(e)||(e.key?`${e.tag}:${e.key}`:!1);n&&(e._d=n)},"tags:resolve":function(e){const t={};e.tags.forEach(r=>{const s=(r.key?`${r.tag}:${r.key}`:r._d)||r._p,o=t[s];if(o){let a=r==null?void 0:r.tagDuplicateStrategy;if(!a&&Xw.includes(r.tag)&&(a="merge"),a==="merge"){const l=o.props;["class","style"].forEach(u=>{l[u]&&(r.props[u]?(u==="style"&&!l[u].endsWith(";")&&(l[u]+=";"),r.props[u]=`${l[u]} ${r.props[u]}`):r.props[u]=l[u])}),t[s].props={...l,...r.props};return}else if(r._e===o._e){o._duped=o._duped||[],r._d=`${o._d}:${o._duped.length+1}`,o._duped.push(r);return}else if(pi(r)>pi(o))return}const i=Object.keys(r.props).length+(r.innerHTML?1:0)+(r.textContent?1:0);if(Go.includes(r.tag)&&i===0){delete t[s];return}t[s]=r});const n=[];Object.values(t).forEach(r=>{const s=r._duped;delete r._duped,n.push(r),s&&n.push(...s)}),e.tags=n,e.tags=e.tags.filter(r=>!(r.tag==="meta"&&(r.props.name||r.props.property)&&!r.props.content))}}},Zw={mode:"server",hooks:{"tags:resolve":function(e){const t={};e.tags.filter(n=>["titleTemplate","templateParams","title"].includes(n.tag)&&n._m==="server").forEach(n=>{t[n.tag]=n.tag.startsWith("title")?n.textContent:n.props}),Object.keys(t).length&&e.tags.push({tag:"script",innerHTML:JSON.stringify(t),props:{id:"unhead:payload",type:"application/json"}})}}},e0=["script","link","bodyAttrs"];function t0(e){const t={},n={};return Object.entries(e.props).forEach(([r,s])=>{r.startsWith("on")&&typeof s=="function"?(Ch.includes(r)&&(t[r]=`this.dataset.${r} = true`),n[r]=s):t[r]=s}),{props:t,eventHandlers:n}}const n0=e=>({hooks:{"tags:resolve":function(t){for(const n of t.tags)if(e0.includes(n.tag)){const{props:r,eventHandlers:s}=t0(n);n.props=r,Object.keys(s).length&&((n.props.src||n.props.href)&&(n.key=n.key||yc(n.props.src||n.props.href)),n._eventHandlers=s)}},"dom:renderTag":function(t,n,r){if(!t.tag._eventHandlers)return;const s=t.tag.tag==="bodyAttrs"?n.defaultView:t.$el;Object.entries(t.tag._eventHandlers).forEach(([o,i])=>{const a=`${t.tag._d||t.tag._p}:${o}`,l=o.slice(2).toLowerCase(),u=`data-h-${l}`;if(r(t.id,a,()=>{}),t.$el.hasAttribute(u))return;t.$el.setAttribute(u,"");let c;const f=d=>{i(d),c==null||c.disconnect()};o in t.$el.dataset?f(new Event(o.replace("on",""))):Ch.includes(o)&&typeof MutationObserver<"u"?(c=new MutationObserver(d=>{d.some(p=>p.attributeName===`data-${o}`)&&(f(new Event(o.replace("on",""))),c==null||c.disconnect())}),c.observe(t.$el,{attributes:!0})):s.addEventListener(l,f),r(t.id,a,()=>{c==null||c.disconnect(),s.removeEventListener(l,f),t.$el.removeAttribute(u)})})}}}),r0=["link","style","script","noscript"],s0={hooks:{"tag:normalise":({tag:e})=>{e.key&&r0.includes(e.tag)&&(e.props["data-hid"]=e._h=yc(e.key))}}},o0={hooks:{"tags:resolve":e=>{const t=n=>{var r;return(r=e.tags.find(s=>s._d===n))==null?void 0:r._p};for(const{prefix:n,offset:r}of Gw)for(const s of e.tags.filter(o=>typeof o.tagPriority=="string"&&o.tagPriority.startsWith(n))){const o=t(s.tagPriority.replace(n,""));typeof o<"u"&&(s._p=o+r)}e.tags.sort((n,r)=>n._p-r._p).sort((n,r)=>pi(n)-pi(r))}}},i0={meta:"content",link:"href",htmlAttrs:"lang"},a0=e=>({hooks:{"tags:resolve":t=>{var a;const{tags:n}=t,r=(a=n.find(l=>l.tag==="title"))==null?void 0:a.textContent,s=n.findIndex(l=>l.tag==="templateParams"),o=s!==-1?n[s].props:{},i=o.separator||"|";delete o.separator,o.pageTitle=Jo(o.pageTitle||r||"",o,i);for(const l of n.filter(u=>u.processTemplateParams!==!1)){const u=i0[l.tag];u&&typeof l.props[u]=="string"?l.props[u]=Jo(l.props[u],o,i):(l.processTemplateParams===!0||["titleTemplate","title"].includes(l.tag))&&["innerHTML","textContent"].forEach(c=>{typeof l[c]=="string"&&(l[c]=Jo(l[c],o,i))})}e._templateParams=o,e._separator=i,t.tags=n.filter(l=>l.tag!=="templateParams")}}}),l0={hooks:{"tags:resolve":e=>{const{tags:t}=e;let n=t.findIndex(s=>s.tag==="titleTemplate");const r=t.findIndex(s=>s.tag==="title");if(r!==-1&&n!==-1){const s=Vu(t[n].textContent,t[r].textContent);s!==null?t[r].textContent=s||t[r].textContent:delete t[r]}else if(n!==-1){const s=Vu(t[n].textContent);s!==null&&(t[n].textContent=s,t[n].tag="title",n=-1)}n!==-1&&delete t[n],e.tags=t.filter(Boolean)}}},c0={hooks:{"tags:afterResolve":function(e){for(const t of e.tags)typeof t.innerHTML=="string"&&(t.innerHTML&&["application/ld+json","application/json"].includes(t.props.type)?t.innerHTML=t.innerHTML.replace(/{a.dirty=!0,t.callHook("entries:updated",a)};let s=0,o=[];const i=[],a={plugins:i,dirty:!1,resolvedOptions:e,hooks:t,headEntries(){return o},use(l){const u=typeof l=="function"?l(a):l;(!u.key||!i.some(c=>c.key===u.key))&&(i.push(u),Wu(u.mode,n)&&t.addHooks(u.hooks||{}))},push(l,u){u==null||delete u.head;const c={_i:s++,input:l,...u};return Wu(c.mode,n)&&(o.push(c),r()),{dispose(){o=o.filter(f=>f._i!==c._i),t.callHook("entries:updated",a),r()},patch(f){o=o.map(d=>(d._i===c._i&&(d.input=c.input=f),d)),r()}}},async resolveTags(){const l={tags:[],entries:[...o]};await t.callHook("entries:resolve",l);for(const u of l.entries){const c=u.resolvedInput||u.input;if(u.resolvedInput=await(u.transform?u.transform(c):c),u.resolvedInput)for(const f of await zw(u)){const d={tag:f,entry:u,resolvedOptions:a.resolvedOptions};await t.callHook("tag:normalise",d),l.tags.push(d.tag)}}return await t.callHook("tags:beforeResolve",l),await t.callHook("tags:resolve",l),await t.callHook("tags:afterResolve",l),l.tags},ssr:n};return[Qw,Zw,n0,s0,o0,a0,l0,c0,...(e==null?void 0:e.plugins)||[]].forEach(l=>a.use(l)),a.hooks.callHook("init",a),a}function d0(){return Ih}const h0=nh.startsWith("3");function p0(e){return typeof e=="function"?e():oe(e)}function vi(e,t=""){if(e instanceof Promise)return e;const n=p0(e);return!e||!n?n:Array.isArray(n)?n.map(r=>vi(r,t)):typeof n=="object"?Object.fromEntries(Object.entries(n).map(([r,s])=>r==="titleTemplate"||r.startsWith("on")?[r,oe(s)]:[r,vi(s,r)])):n}const v0={hooks:{"entries:resolve":function(e){for(const t of e.entries)t.resolvedInput=vi(t.input)}}},xh="usehead";function m0(e){return{install(n){h0&&(n.config.globalProperties.$unhead=e,n.config.globalProperties.$head=e,n.provide(xh,e))}}.install}function g0(e={}){e.domDelayFn=e.domDelayFn||(n=>Be(()=>setTimeout(()=>n(),0)));const t=u0(e);return t.use(v0),t.install=m0(t),t}const yl=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},wl="__unhead_injection_handler__";function y0(e){yl[wl]=e}function w0(){if(wl in yl)return yl[wl]();const e=Ne(xh);return e||d0()}function Dh(e,t={}){const n=t.head||w0();if(n)return n.ssr?n.push(e,t):b0(n,e,t)}function b0(e,t,n={}){const r=S(!1),s=S({});wr(()=>{s.value=r.value?{}:vi(t)});const o=e.push(s.value,n);return q(s,a=>{o.patch(a)}),ut()&&(fo(()=>{o.dispose()}),uc(()=>{r.value=!0}),cc(()=>{r.value=!1})),o}const _0=!1,bl=!1,E0=!1,xO={componentName:"NuxtLink"},DO={deep:!0},S0="#__nuxt";function Ku(e,t={}){const n=k0(e,t),r=de(),s=r._payloadCache=r._payloadCache||{};return n in s||(s[n]=T0(e).then(o=>o?jh(n).then(i=>i||(delete s[n],null)):(s[n]=null,null))),s[n]}const zu="json";function k0(e,t={}){const n=new URL(e,"http://localhost");if(n.host!=="localhost"||po(n.pathname,{acceptRelative:!0}))throw new Error("Payload URL must not include hostname: "+e);const r=t.hash||(t.fresh?Date.now():"");return vo(mo().app.baseURL,n.pathname,r?`_payload.${r}.${zu}`:`_payload.${zu}`)}async function jh(e){const t=fetch(e).then(n=>n.text().then(Mh));try{return await t}catch(n){console.warn("[nuxt] Cannot load payload ",e,n)}return null}async function T0(e=yo().path){return!!de().payload.prerenderedAt}let No=null;async function P0(){if(No)return No;const e=document.getElementById("__NUXT_DATA__");if(!e)return{};const t=await Mh(e.textContent||""),n=e.dataset.src?await jh(e.dataset.src):void 0;return No={...t,...n,...window.__NUXT__},No}async function Mh(e){return await Nw(e,de()._payloadRevivers)}function R0(e,t){de()._payloadRevivers[e]=t}const Gu={NuxtError:e=>Ni(e),EmptyShallowRef:e=>be(e==="_"?void 0:e==="0n"?BigInt(0):di(e)),EmptyRef:e=>S(e==="_"?void 0:e==="0n"?BigInt(0):di(e)),ShallowRef:e=>be(e),ShallowReactive:e=>In(e),Ref:e=>S(e),Reactive:e=>Ee(e)},O0=rn({name:"nuxt:revive-payload:client",order:-30,async setup(e){let t,n;for(const r in Gu)R0(r,Gu[r]);Object.assign(e.payload,([t,n]=as(()=>e.runWithContext(P0)),t=await t,n(),t)),window.__NUXT__=e.payload}}),A0=[],C0=rn({name:"nuxt:head",enforce:"pre",setup(e){const t=g0({plugins:A0});y0(()=>de().vueApp._context.provides.usehead),e.vueApp.use(t);{let n=!0;const r=async()=>{n=!1,await Lh(t)};t.hooks.hook("dom:beforeRender",s=>{s.shouldRender=!n}),e.hooks.hook("page:start",()=>{n=!0}),e.hooks.hook("page:finish",()=>{e.isHydrating||r()}),e.hooks.hook("app:error",r),e.hooks.hook("app:suspense:resolve",r)}}});/*! * vue-router v4.3.0 * (c) 2024 Eduardo San Martin Morote * @license MIT */const $r=typeof document<"u";function L0(e){return e.__esModule||e[Symbol.toStringTag]==="Module"}const Se=Object.assign;function da(e,t){const n={};for(const r in t){const s=t[r];n[r]=wn(s)?s.map(e):e(s)}return n}const Hs=()=>{},wn=Array.isArray,Nh=/#/g,I0=/&/g,x0=/\//g,D0=/=/g,j0=/\?/g,Fh=/\+/g,M0=/%5B/g,N0=/%5D/g,$h=/%5E/g,F0=/%60/g,Uh=/%7B/g,$0=/%7C/g,Hh=/%7D/g,U0=/%20/g;function wc(e){return encodeURI(""+e).replace($0,"|").replace(M0,"[").replace(N0,"]")}function H0(e){return wc(e).replace(Uh,"{").replace(Hh,"}").replace($h,"^")}function _l(e){return wc(e).replace(Fh,"%2B").replace(U0,"+").replace(Nh,"%23").replace(I0,"%26").replace(F0,"`").replace(Uh,"{").replace(Hh,"}").replace($h,"^")}function V0(e){return _l(e).replace(D0,"%3D")}function B0(e){return wc(e).replace(Nh,"%23").replace(j0,"%3F")}function q0(e){return e==null?"":B0(e).replace(x0,"%2F")}function to(e){try{return decodeURIComponent(""+e)}catch{}return""+e}const W0=/\/$/,K0=e=>e.replace(W0,"");function ha(e,t,n="/"){let r,s={},o="",i="";const a=t.indexOf("#");let l=t.indexOf("?");return a=0&&(l=-1),l>-1&&(r=t.slice(0,l),o=t.slice(l+1,a>-1?a:t.length),s=e(o)),a>-1&&(r=r||t.slice(0,a),i=t.slice(a,t.length)),r=Y0(r??t,n),{fullPath:r+(o&&"?")+o+i,path:r,query:s,hash:to(i)}}function z0(e,t){const n=t.query?e(t.query):"";return t.path+(n&&"?")+n+(t.hash||"")}function Ju(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function G0(e,t,n){const r=t.matched.length-1,s=n.matched.length-1;return r>-1&&r===s&&ls(t.matched[r],n.matched[s])&&Vh(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function ls(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function Vh(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(!J0(e[n],t[n]))return!1;return!0}function J0(e,t){return wn(e)?Yu(e,t):wn(t)?Yu(t,e):e===t}function Yu(e,t){return wn(t)?e.length===t.length&&e.every((n,r)=>n===t[r]):e.length===1&&e[0]===t}function Y0(e,t){if(e.startsWith("/"))return e;if(!e)return t;const n=t.split("/"),r=e.split("/"),s=r[r.length-1];(s===".."||s===".")&&r.push("");let o=n.length-1,i,a;for(i=0;i1&&o--;else break;return n.slice(0,o).join("/")+"/"+r.slice(i).join("/")}var no;(function(e){e.pop="pop",e.push="push"})(no||(no={}));var Vs;(function(e){e.back="back",e.forward="forward",e.unknown=""})(Vs||(Vs={}));function X0(e){if(!e)if($r){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),K0(e)}const Q0=/^[^#]+#/;function Z0(e,t){return e.replace(Q0,"#")+t}function eb(e,t){const n=document.documentElement.getBoundingClientRect(),r=e.getBoundingClientRect();return{behavior:t.behavior,left:r.left-n.left-(t.left||0),top:r.top-n.top-(t.top||0)}}const Fi=()=>({left:window.scrollX,top:window.scrollY});function tb(e){let t;if("el"in e){const n=e.el,r=typeof n=="string"&&n.startsWith("#"),s=typeof n=="string"?r?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!s)return;t=eb(s,e)}else t=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left!=null?t.left:window.scrollX,t.top!=null?t.top:window.scrollY)}function Xu(e,t){return(history.state?history.state.position-t:-1)+e}const El=new Map;function nb(e,t){El.set(e,t)}function rb(e){const t=El.get(e);return El.delete(e),t}let sb=()=>location.protocol+"//"+location.host;function Bh(e,t){const{pathname:n,search:r,hash:s}=t,o=e.indexOf("#");if(o>-1){let a=s.includes(e.slice(o))?e.slice(o).length:1,l=s.slice(a);return l[0]!=="/"&&(l="/"+l),Ju(l,"")}return Ju(n,e)+r+s}function ob(e,t,n,r){let s=[],o=[],i=null;const a=({state:d})=>{const h=Bh(e,location),p=n.value,g=t.value;let y=0;if(d){if(n.value=h,t.value=d,i&&i===p){i=null;return}y=g?d.position-g.position:0}else r(h);s.forEach(w=>{w(n.value,p,{delta:y,type:no.pop,direction:y?y>0?Vs.forward:Vs.back:Vs.unknown})})};function l(){i=n.value}function u(d){s.push(d);const h=()=>{const p=s.indexOf(d);p>-1&&s.splice(p,1)};return o.push(h),h}function c(){const{history:d}=window;d.state&&d.replaceState(Se({},d.state,{scroll:Fi()}),"")}function f(){for(const d of o)d();o=[],window.removeEventListener("popstate",a),window.removeEventListener("beforeunload",c)}return window.addEventListener("popstate",a),window.addEventListener("beforeunload",c,{passive:!0}),{pauseListeners:l,listen:u,destroy:f}}function Qu(e,t,n,r=!1,s=!1){return{back:e,current:t,forward:n,replaced:r,position:window.history.length,scroll:s?Fi():null}}function ib(e){const{history:t,location:n}=window,r={value:Bh(e,n)},s={value:t.state};s.value||o(r.value,{back:null,current:r.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function o(l,u,c){const f=e.indexOf("#"),d=f>-1?(n.host&&document.querySelector("base")?e:e.slice(f))+l:sb()+e+l;try{t[c?"replaceState":"pushState"](u,"",d),s.value=u}catch(h){console.error(h),n[c?"replace":"assign"](d)}}function i(l,u){const c=Se({},t.state,Qu(s.value.back,l,s.value.forward,!0),u,{position:s.value.position});o(l,c,!0),r.value=l}function a(l,u){const c=Se({},s.value,t.state,{forward:l,scroll:Fi()});o(c.current,c,!0);const f=Se({},Qu(r.value,l,null),{position:c.position+1},u);o(l,f,!1),r.value=l}return{location:r,state:s,push:a,replace:i}}function qh(e){e=X0(e);const t=ib(e),n=ob(e,t.state,t.location,t.replace);function r(o,i=!0){i||n.pauseListeners(),history.go(o)}const s=Se({location:"",base:e,go:r,createHref:Z0.bind(null,e)},t,n);return Object.defineProperty(s,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(s,"state",{enumerable:!0,get:()=>t.state.value}),s}function ab(e){return e=location.host?e||location.pathname+location.search:"",e.includes("#")||(e+="#"),qh(e)}function lb(e){return typeof e=="string"||e&&typeof e=="object"}function Wh(e){return typeof e=="string"||typeof e=="symbol"}const vn={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0},Kh=Symbol("");var Zu;(function(e){e[e.aborted=4]="aborted",e[e.cancelled=8]="cancelled",e[e.duplicated=16]="duplicated"})(Zu||(Zu={}));function cs(e,t){return Se(new Error,{type:e,[Kh]:!0},t)}function Pn(e,t){return e instanceof Error&&Kh in e&&(t==null||!!(e.type&t))}const ef="[^/]+?",cb={sensitive:!1,strict:!1,start:!0,end:!0},ub=/[.+*?^${}()[\]/\\]/g;function fb(e,t){const n=Se({},cb,t),r=[];let s=n.start?"^":"";const o=[];for(const u of e){const c=u.length?[]:[90];n.strict&&!u.length&&(s+="/");for(let f=0;ft.length?t.length===1&&t[0]===80?1:-1:0}function hb(e,t){let n=0;const r=e.score,s=t.score;for(;n0&&t[t.length-1]<0}const pb={type:0,value:""},vb=/[a-zA-Z0-9_]/;function mb(e){if(!e)return[[]];if(e==="/")return[[pb]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function t(h){throw new Error(`ERR (${n})/"${u}": ${h}`)}let n=0,r=n;const s=[];let o;function i(){o&&s.push(o),o=[]}let a=0,l,u="",c="";function f(){u&&(n===0?o.push({type:0,value:u}):n===1||n===2||n===3?(o.length>1&&(l==="*"||l==="+")&&t(`A repeatable param (${u}) must be alone in its segment. eg: '/:ids+.`),o.push({type:1,value:u,regexp:c,repeatable:l==="*"||l==="+",optional:l==="*"||l==="?"})):t("Invalid state to consume buffer"),u="")}function d(){u+=l}for(;a{i(m)}:Hs}function i(c){if(Wh(c)){const f=r.get(c);f&&(r.delete(c),n.splice(n.indexOf(f),1),f.children.forEach(i),f.alias.forEach(i))}else{const f=n.indexOf(c);f>-1&&(n.splice(f,1),c.record.name&&r.delete(c.record.name),c.children.forEach(i),c.alias.forEach(i))}}function a(){return n}function l(c){let f=0;for(;f=0&&(c.record.path!==n[f].record.path||!zh(c,n[f]));)f++;n.splice(f,0,c),c.record.name&&!rf(c)&&r.set(c.record.name,c)}function u(c,f){let d,h={},p,g;if("name"in c&&c.name){if(d=r.get(c.name),!d)throw cs(1,{location:c});g=d.record.name,h=Se(nf(f.params,d.keys.filter(m=>!m.optional).concat(d.parent?d.parent.keys.filter(m=>m.optional):[]).map(m=>m.name)),c.params&&nf(c.params,d.keys.map(m=>m.name))),p=d.stringify(h)}else if(c.path!=null)p=c.path,d=n.find(m=>m.re.test(p)),d&&(h=d.parse(p),g=d.record.name);else{if(d=f.name?r.get(f.name):n.find(m=>m.re.test(f.path)),!d)throw cs(1,{location:c,currentLocation:f});g=d.record.name,h=Se({},f.params,c.params),p=d.stringify(h)}const y=[];let w=d;for(;w;)y.unshift(w.record),w=w.parent;return{name:g,path:p,params:h,matched:y,meta:_b(y)}}return e.forEach(c=>o(c)),{addRoute:o,resolve:u,removeRoute:i,getRoutes:a,getRecordMatcher:s}}function nf(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}function wb(e){return{path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:void 0,beforeEnter:e.beforeEnter,props:bb(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in e?e.components||null:e.component&&{default:e.component}}}function bb(e){const t={},n=e.props||!1;if("component"in e)t.default=n;else for(const r in e.components)t[r]=typeof n=="object"?n[r]:n;return t}function rf(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function _b(e){return e.reduce((t,n)=>Se(t,n.meta),{})}function sf(e,t){const n={};for(const r in e)n[r]=r in t?t[r]:e[r];return n}function zh(e,t){return t.children.some(n=>n===e||zh(e,n))}function Eb(e){const t={};if(e===""||e==="?")return t;const r=(e[0]==="?"?e.slice(1):e).split("&");for(let s=0;so&&_l(o)):[r&&_l(r)]).forEach(o=>{o!==void 0&&(t+=(t.length?"&":"")+n,o!=null&&(t+="="+o))})}return t}function Sb(e){const t={};for(const n in e){const r=e[n];r!==void 0&&(t[n]=wn(r)?r.map(s=>s==null?null:""+s):r==null?r:""+r)}return t}const Gh=Symbol(""),af=Symbol(""),bc=Symbol(""),_c=Symbol(""),Sl=Symbol("");function Ts(){let e=[];function t(r){return e.push(r),()=>{const s=e.indexOf(r);s>-1&&e.splice(s,1)}}function n(){e=[]}return{add:t,list:()=>e.slice(),reset:n}}function kb(e,t,n){const r=()=>{e[t].delete(n)};Li(r),uc(r),cc(()=>{e[t].add(n)}),e[t].add(n)}function jO(e){const t=Ne(Gh,{}).value;t&&kb(t,"leaveGuards",e)}function Wn(e,t,n,r,s,o=i=>i()){const i=r&&(r.enterCallbacks[s]=r.enterCallbacks[s]||[]);return()=>new Promise((a,l)=>{const u=d=>{d===!1?l(cs(4,{from:n,to:t})):d instanceof Error?l(d):lb(d)?l(cs(2,{from:t,to:d})):(i&&r.enterCallbacks[s]===i&&typeof d=="function"&&i.push(d),a())},c=o(()=>e.call(r&&r.instances[s],t,n,u));let f=Promise.resolve(c);e.length<3&&(f=f.then(u)),f.catch(d=>l(d))})}function pa(e,t,n,r,s=o=>o()){const o=[];for(const i of e)for(const a in i.components){let l=i.components[a];if(!(t!=="beforeRouteEnter"&&!i.instances[a]))if(Tb(l)){const c=(l.__vccOpts||l)[t];c&&o.push(Wn(c,n,r,i,a,s))}else{let u=l();o.push(()=>u.then(c=>{if(!c)return Promise.reject(new Error(`Couldn't resolve component "${a}" at "${i.path}"`));const f=L0(c)?c.default:c;i.components[a]=f;const h=(f.__vccOpts||f)[t];return h&&Wn(h,n,r,i,a,s)()}))}}return o}function Tb(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function lf(e){const t=Ne(bc),n=Ne(_c),r=D(()=>t.resolve(oe(e.to))),s=D(()=>{const{matched:l}=r.value,{length:u}=l,c=l[u-1],f=n.matched;if(!c||!f.length)return-1;const d=f.findIndex(ls.bind(null,c));if(d>-1)return d;const h=cf(l[u-2]);return u>1&&cf(c)===h&&f[f.length-1].path!==h?f.findIndex(ls.bind(null,l[u-2])):d}),o=D(()=>s.value>-1&&Ab(n.params,r.value.params)),i=D(()=>s.value>-1&&s.value===n.matched.length-1&&Vh(n.params,r.value.params));function a(l={}){return Ob(l)?t[oe(e.replace)?"replace":"push"](oe(e.to)).catch(Hs):Promise.resolve()}return{route:r,href:D(()=>r.value.href),isActive:o,isExactActive:i,navigate:a}}const Pb=Fe({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"}},useLink:lf,setup(e,{slots:t}){const n=Ee(lf(e)),{options:r}=Ne(bc),s=D(()=>({[uf(e.activeClass,r.linkActiveClass,"router-link-active")]:n.isActive,[uf(e.exactActiveClass,r.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const o=t.default&&t.default(n);return e.custom?o:nt("a",{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:s.value},o)}}}),Rb=Pb;function Ob(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget&&e.currentTarget.getAttribute){const t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function Ab(e,t){for(const n in t){const r=t[n],s=e[n];if(typeof r=="string"){if(r!==s)return!1}else if(!wn(s)||s.length!==r.length||r.some((o,i)=>o!==s[i]))return!1}return!0}function cf(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const uf=(e,t,n)=>e??t??n,Cb=Fe({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){const r=Ne(Sl),s=D(()=>e.route||r.value),o=Ne(af,0),i=D(()=>{let u=oe(o);const{matched:c}=s.value;let f;for(;(f=c[u])&&!f.components;)u++;return u}),a=D(()=>s.value.matched[i.value]);Xn(af,D(()=>i.value+1)),Xn(Gh,a),Xn(Sl,s);const l=S();return q(()=>[l.value,a.value,e.name],([u,c,f],[d,h,p])=>{c&&(c.instances[f]=u,h&&h!==c&&u&&u===d&&(c.leaveGuards.size||(c.leaveGuards=h.leaveGuards),c.updateGuards.size||(c.updateGuards=h.updateGuards))),u&&c&&(!h||!ls(c,h)||!d)&&(c.enterCallbacks[f]||[]).forEach(g=>g(u))},{flush:"post"}),()=>{const u=s.value,c=e.name,f=a.value,d=f&&f.components[c];if(!d)return ff(n.default,{Component:d,route:u});const h=f.props[c],p=h?h===!0?u.params:typeof h=="function"?h(u):h:null,y=nt(d,Se({},p,t,{onVnodeUnmounted:w=>{w.component.isUnmounted&&(f.instances[c]=null)},ref:l}));return ff(n.default,{Component:y,route:u})||y}}});function ff(e,t){if(!e)return null;const n=e(t);return n.length===1?n[0]:n}const Jh=Cb;function Lb(e){const t=yb(e.routes,e),n=e.parseQuery||Eb,r=e.stringifyQuery||of,s=e.history,o=Ts(),i=Ts(),a=Ts(),l=be(vn);let u=vn;$r&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const c=da.bind(null,F=>""+F),f=da.bind(null,q0),d=da.bind(null,to);function h(F,X){let G,Z;return Wh(F)?(G=t.getRecordMatcher(F),Z=X):Z=F,t.addRoute(Z,G)}function p(F){const X=t.getRecordMatcher(F);X&&t.removeRoute(X)}function g(){return t.getRoutes().map(F=>F.record)}function y(F){return!!t.getRecordMatcher(F)}function w(F,X){if(X=Se({},X||l.value),typeof F=="string"){const P=ha(n,F,X.path),I=t.resolve({path:P.path},X),$=s.createHref(P.fullPath);return Se(P,I,{params:d(I.params),hash:to(P.hash),redirectedFrom:void 0,href:$})}let G;if(F.path!=null)G=Se({},F,{path:ha(n,F.path,X.path).path});else{const P=Se({},F.params);for(const I in P)P[I]==null&&delete P[I];G=Se({},F,{params:f(P)}),X.params=f(X.params)}const Z=t.resolve(G,X),_e=F.hash||"";Z.params=c(d(Z.params));const Ae=z0(r,Se({},F,{hash:H0(_e),path:Z.path})),_=s.createHref(Ae);return Se({fullPath:Ae,hash:_e,query:r===of?Sb(F.query):F.query||{}},Z,{redirectedFrom:void 0,href:_})}function m(F){return typeof F=="string"?ha(n,F,l.value.path):Se({},F)}function v(F,X){if(u!==F)return cs(8,{from:X,to:F})}function b(F){return k(F)}function E(F){return b(Se(m(F),{replace:!0}))}function R(F){const X=F.matched[F.matched.length-1];if(X&&X.redirect){const{redirect:G}=X;let Z=typeof G=="function"?G(F):G;return typeof Z=="string"&&(Z=Z.includes("?")||Z.includes("#")?Z=m(Z):{path:Z},Z.params={}),Se({query:F.query,hash:F.hash,params:Z.path!=null?{}:F.params},Z)}}function k(F,X){const G=u=w(F),Z=l.value,_e=F.state,Ae=F.force,_=F.replace===!0,P=R(G);if(P)return k(Se(m(P),{state:typeof P=="object"?Se({},_e,P.state):_e,force:Ae,replace:_}),X||G);const I=G;I.redirectedFrom=X;let $;return!Ae&&G0(r,Z,G)&&($=cs(16,{to:I,from:Z}),dt(Z,Z,!0,!1)),($?Promise.resolve($):T(I,Z)).catch(N=>Pn(N)?Pn(N,2)?N:Ge(N):z(N,I,Z)).then(N=>{if(N){if(Pn(N,2))return k(Se({replace:_},m(N.to),{state:typeof N.to=="object"?Se({},_e,N.to.state):_e,force:Ae}),X||I)}else N=x(I,Z,!0,_,_e);return L(I,Z,N),N})}function C(F,X){const G=v(F,X);return G?Promise.reject(G):Promise.resolve()}function A(F){const X=Ie.values().next().value;return X&&typeof X.runWithContext=="function"?X.runWithContext(F):F()}function T(F,X){let G;const[Z,_e,Ae]=Ib(F,X);G=pa(Z.reverse(),"beforeRouteLeave",F,X);for(const P of Z)P.leaveGuards.forEach(I=>{G.push(Wn(I,F,X))});const _=C.bind(null,F,X);return G.push(_),Je(G).then(()=>{G=[];for(const P of o.list())G.push(Wn(P,F,X));return G.push(_),Je(G)}).then(()=>{G=pa(_e,"beforeRouteUpdate",F,X);for(const P of _e)P.updateGuards.forEach(I=>{G.push(Wn(I,F,X))});return G.push(_),Je(G)}).then(()=>{G=[];for(const P of Ae)if(P.beforeEnter)if(wn(P.beforeEnter))for(const I of P.beforeEnter)G.push(Wn(I,F,X));else G.push(Wn(P.beforeEnter,F,X));return G.push(_),Je(G)}).then(()=>(F.matched.forEach(P=>P.enterCallbacks={}),G=pa(Ae,"beforeRouteEnter",F,X,A),G.push(_),Je(G))).then(()=>{G=[];for(const P of i.list())G.push(Wn(P,F,X));return G.push(_),Je(G)}).catch(P=>Pn(P,8)?P:Promise.reject(P))}function L(F,X,G){a.list().forEach(Z=>A(()=>Z(F,X,G)))}function x(F,X,G,Z,_e){const Ae=v(F,X);if(Ae)return Ae;const _=X===vn,P=$r?history.state:{};G&&(Z||_?s.replace(F.fullPath,Se({scroll:_&&P&&P.scroll},_e)):s.push(F.fullPath,_e)),l.value=F,dt(F,X,G,_),Ge()}let W;function ie(){W||(W=s.listen((F,X,G)=>{if(!ht.listening)return;const Z=w(F),_e=R(Z);if(_e){k(Se(_e,{replace:!0}),Z).catch(Hs);return}u=Z;const Ae=l.value;$r&&nb(Xu(Ae.fullPath,G.delta),Fi()),T(Z,Ae).catch(_=>Pn(_,12)?_:Pn(_,2)?(k(_.to,Z).then(P=>{Pn(P,20)&&!G.delta&&G.type===no.pop&&s.go(-1,!1)}).catch(Hs),Promise.reject()):(G.delta&&s.go(-G.delta,!1),z(_,Z,Ae))).then(_=>{_=_||x(Z,Ae,!1),_&&(G.delta&&!Pn(_,8)?s.go(-G.delta,!1):G.type===no.pop&&Pn(_,20)&&s.go(-1,!1)),L(Z,Ae,_)}).catch(Hs)}))}let ne=Ts(),M=Ts(),Y;function z(F,X,G){Ge(F);const Z=M.list();return Z.length?Z.forEach(_e=>_e(F,X,G)):console.error(F),Promise.reject(F)}function We(){return Y&&l.value!==vn?Promise.resolve():new Promise((F,X)=>{ne.add([F,X])})}function Ge(F){return Y||(Y=!F,ie(),ne.list().forEach(([X,G])=>F?G(F):X()),ne.reset()),F}function dt(F,X,G,Z){const{scrollBehavior:_e}=e;if(!$r||!_e)return Promise.resolve();const Ae=!G&&rb(Xu(F.fullPath,0))||(Z||!G)&&history.state&&history.state.scroll||null;return Be().then(()=>_e(F,X,Ae)).then(_=>_&&tb(_)).catch(_=>z(_,F,X))}const je=F=>s.go(F);let st;const Ie=new Set,ht={currentRoute:l,listening:!0,addRoute:h,removeRoute:p,hasRoute:y,getRoutes:g,resolve:w,options:e,push:b,replace:E,go:je,back:()=>je(-1),forward:()=>je(1),beforeEach:o.add,beforeResolve:i.add,afterEach:a.add,onError:M.add,isReady:We,install(F){const X=this;F.component("RouterLink",Rb),F.component("RouterView",Jh),F.config.globalProperties.$router=X,Object.defineProperty(F.config.globalProperties,"$route",{enumerable:!0,get:()=>oe(l)}),$r&&!st&&l.value===vn&&(st=!0,b(s.location).catch(_e=>{}));const G={};for(const _e in vn)Object.defineProperty(G,_e,{get:()=>l.value[_e],enumerable:!0});F.provide(bc,X),F.provide(_c,In(G)),F.provide(Sl,l);const Z=F.unmount;Ie.add(F),F.unmount=function(){Ie.delete(F),Ie.size<1&&(u=vn,W&&W(),W=null,l.value=vn,st=!1,Y=!1),Z()}}};function Je(F){return F.reduce((X,G)=>X.then(()=>A(G)),Promise.resolve())}return ht}function Ib(e,t){const n=[],r=[],s=[],o=Math.max(t.matched.length,e.matched.length);for(let i=0;ils(u,a))?r.push(a):n.push(a));const l=e.matched[i];l&&(t.matched.find(u=>ls(u,l))||s.push(l))}return[n,r,s]}function xb(){return Ne(_c)}const Db=(e,t)=>t.path.replace(/(:\w+)\([^)]+\)/g,"$1").replace(/(:\w+)[?+*]/g,"$1").replace(/:\w+/g,n=>{var r;return((r=e.params[n.slice(1)])==null?void 0:r.toString())||""}),kl=(e,t)=>{const n=e.route.matched.find(s=>{var o;return((o=s.components)==null?void 0:o.default)===e.Component.type}),r=t??(n==null?void 0:n.meta.key)??(n&&Db(e.route,n));return typeof r=="function"?r(e.route):r},jb=(e,t)=>({default:()=>e?nt(Hm,e===!0?{}:e,t):t});function Ec(e){return Array.isArray(e)?e:[e]}const va=null,vt={middleware:"guest"},ma=null,mt={layout:"sidebar",middleware:"authenticated"},gt={layout:"sidebar"},yt={layout:"sidebar"},wt={layout:"sidebar",middleware:["authenticated"]},bt={layout:"sidebar",middleware:["authenticated"]},_t={layout:"sidebar",middleware:["authenticated"]},Et={layout:"sidebar"},ga=null,St={layout:"sidebar",middleware:["authenticated"]},kt={layout:"sidebar"},ya=null,Tt={layout:"sidebar",middleware:["authenticated"]},wa=null,ba=null,Pt={layout:"sidebar"},_a=null,Rt={layout:"game",middleware:["require-game"]},Ea=null,Ot={layout:"game",middleware:["require-game"]},Sa=null,ka=null,Ta=null,Pa=null,At={layout:"sidebar",middleware:["authenticated"]},Ct={layout:"sidebar",middleware:["authenticated"]},Lt={middleware:async()=>{let e,t;[e,t]=as(()=>de().$getProfile()),e=await e,t(),e&&(window.location.href="proxy.php?url=https%3A%2F%2Fstudykit.app%2Fdashboard")}},Ra=null,Oa=null,It={layout:"sidebar"},xt={layout:"search",middleware:["authenticated"]},Dt={layout:"sidebar"},jt={layout:"sidebar"},Mt={layout:"sidebar",middleware:["authenticated"]},Nt={layout:"sidebar"},Ft={layout:"sidebar",middleware:["authenticated"]},$t={layout:"task"},Ut={layout:"sidebar",middleware:["authenticated"]},Ht={layout:"task"},Vt={layout:"sidebar",middleware:["authenticated"]},Aa=null,Bt={middleware:["authenticated"]},qt={layout:"sidebar",middleware:["authenticated"]},Wt={middleware:["authenticated"]},Kt={layout:"sidebar",middleware:["authenticated"]},Ca=null,zt={layout:"sidebar"},Gt={layout:"sidebar"},Jt={layout:"sidebar"},Yt={layout:"sidebar",middleware:["authenticated"]},Xt={layout:"sidebar"},Qt={layout:!1},Zt={layout:"sidebar"},La=null,df=[{name:"ai",path:"/ai",meta:{},alias:[],redirect:va==null?void 0:va.redirect,component:()=>B(()=>import("./ai.CpYIZhOY.js"),__vite__mapDeps([0,1,2,3,4]),import.meta.url).then(e=>e.default||e)},{name:(vt==null?void 0:vt.name)??"auth-type",path:(vt==null?void 0:vt.path)??"/auth/:type()",meta:vt||{},alias:(vt==null?void 0:vt.alias)||[],redirect:vt==null?void 0:vt.redirect,component:()=>B(()=>import("./_type_.CZpDqcCu.js"),__vite__mapDeps([5,3,6,1,7,8,9]),import.meta.url).then(e=>e.default||e)},{name:"callback",path:"/callback",meta:{},alias:[],redirect:ma==null?void 0:ma.redirect,component:()=>B(()=>import("./callback.Q9uhRXTV.js"),__vite__mapDeps([10,3]),import.meta.url).then(e=>e.default||e)},{name:(mt==null?void 0:mt.name)??"classes-id",path:(mt==null?void 0:mt.path)??"/classes/:id()",meta:mt||{},alias:(mt==null?void 0:mt.alias)||[],redirect:mt==null?void 0:mt.redirect,component:()=>B(()=>import("./_id_.CjZbGdZe.js"),__vite__mapDeps([11,12,3,1,13,14,15,16,17,18,19,20,21,22,6,23,24,25,26,7,8,9]),import.meta.url).then(e=>e.default||e)},{name:(gt==null?void 0:gt.name)??"classes",path:(gt==null?void 0:gt.path)??"/classes",meta:gt||{},alias:(gt==null?void 0:gt.alias)||[],redirect:gt==null?void 0:gt.redirect,component:()=>B(()=>import("./index.CPZVfTNk.js"),__vite__mapDeps([27,1,3,14,15,16,17,18,19,20,28,7,8,9,29]),import.meta.url).then(e=>e.default||e)},{name:(yt==null?void 0:yt.name)??"dashboard-contact",path:(yt==null?void 0:yt.path)??"/dashboard/contact",meta:yt||{},alias:(yt==null?void 0:yt.alias)||[],redirect:yt==null?void 0:yt.redirect,component:()=>B(()=>import("./contact.B_kbhLNp.js"),__vite__mapDeps([30,1]),import.meta.url).then(e=>e.default||e)},{name:(wt==null?void 0:wt.name)??"dashboard-files",path:(wt==null?void 0:wt.path)??"/dashboard/files",meta:wt||{},alias:(wt==null?void 0:wt.alias)||[],redirect:wt==null?void 0:wt.redirect,component:()=>B(()=>import("./files.CH739StK.js"),__vite__mapDeps([31,32,3,12,33,34,24,1]),import.meta.url).then(e=>e.default||e)},{name:(bt==null?void 0:bt.name)??"dashboard",path:(bt==null?void 0:bt.path)??"/dashboard",meta:bt||{},alias:(bt==null?void 0:bt.alias)||[],redirect:bt==null?void 0:bt.redirect,component:()=>B(()=>import("./index.RRb8N6Js.js"),__vite__mapDeps([35,36,32,1,37,38,6,3,39,40,41,26,42,43,44,45,46,19,17,15,20,47,16,29,48,49,50,51,52,24,53,54,55,34,56,57,58,59,60,61,62]),import.meta.url).then(e=>e.default||e)},{name:(_t==null?void 0:_t.name)??"dashboard-settings",path:(_t==null?void 0:_t.path)??"/dashboard/settings",meta:_t||{},alias:(_t==null?void 0:_t.alias)||[],redirect:_t==null?void 0:_t.redirect,component:()=>B(()=>import("./settings.C5dSH-a2.js"),__vite__mapDeps([63,1,39,40,64,65,15,47,20,22,6,3,24,29,32,66,7,8,9,67,68]),import.meta.url).then(e=>e.default||e)},{name:(Et==null?void 0:Et.name)??"decks-id",path:(Et==null?void 0:Et.path)??"/decks/:id()",meta:Et||{},alias:(Et==null?void 0:Et.alias)||[],redirect:Et==null?void 0:Et.redirect,component:()=>B(()=>import("./_id_.DjufeNcS.js"),__vite__mapDeps([69,12,3,1,46,19,17,15,20,47,16,37,38,70,44,71,72,42,73,74,75,76,26,6,77,24,7,8,9,78,67,79,64,65,80,50,81,34,82,83,84,85,86,87,88,89,33,90,43,54,55]),import.meta.url).then(e=>e.default||e)},{name:"decks-design-id",path:"/decks/design/:id()",meta:{},alias:[],redirect:ga==null?void 0:ga.redirect,component:()=>B(()=>import("./_id_.B5v2JAJL.js"),__vite__mapDeps([91,12,3,22,1,92,24,93,65,15,19,17,20,47,16,18,14,79,64,94,7,8,9,34,81,95,21,86,87,88,89,33,44,96,6,97,67,98,99,29,100,101,37,38,102]),import.meta.url).then(e=>e.default||e)},{name:(St==null?void 0:St.name)??"decks",path:(St==null?void 0:St.path)??"/decks",meta:St||{},alias:(St==null?void 0:St.alias)||[],redirect:St==null?void 0:St.redirect,component:()=>B(()=>import("./index.BvXpMRnv.js"),__vite__mapDeps([103,42,3,6,52,1,41,24,53,44,43,54,55,48,34,100,104]),import.meta.url).then(e=>e.default||e)},{name:(kt==null?void 0:kt.name)??"decks-search",path:(kt==null?void 0:kt.path)??"/decks/search",meta:kt||{},alias:(kt==null?void 0:kt.alias)||[],redirect:kt==null?void 0:kt.redirect,component:()=>B(()=>import("./search.Difaxmam.js"),__vite__mapDeps([105,1,12,3,23,7,8,9,24]),import.meta.url).then(e=>e.default||e)},{name:"docs-id",path:"/docs/:id()",meta:{},alias:[],redirect:ya==null?void 0:ya.redirect,component:()=>B(()=>import("./_id_.CdH1a-73.js"),__vite__mapDeps([106,6,3,12,1,107,108,67,109,110,111,8,112,113,92,24,94,7,9,34,81,79,64,65,15,47,20,74,75,76,26,77,44,78,73,16,80,50,82,83,114,87,88,89,115,71,72,37,38,98,14,17,18,19,99,29,100,101,116,117,118,119,120,121,122,123,124]),import.meta.url).then(e=>e.default||e)},{name:(Tt==null?void 0:Tt.name)??"docs",path:(Tt==null?void 0:Tt.path)??"/docs",meta:Tt||{},alias:(Tt==null?void 0:Tt.alias)||[],redirect:Tt==null?void 0:Tt.redirect,component:()=>B(()=>import("./index.ybhOe_w4.js"),__vite__mapDeps([125,1,7,8,9,108,81,67]),import.meta.url).then(e=>e.default||e)},{name:"educators",path:"/educators",meta:{},alias:[],redirect:wa==null?void 0:wa.redirect,component:()=>B(()=>import("./educators.DLFjb9sG.js"),__vite__mapDeps([126,127,3,1,26,25,128,129]),import.meta.url).then(e=>e.default||e)},{name:"externalresource",path:"/externalresource",meta:{},alias:[],redirect:ba==null?void 0:ba.redirect,component:()=>B(()=>import("./externalresource.8B_tyqvq.js"),__vite__mapDeps([130,131,7,8,9,67]),import.meta.url).then(e=>e.default||e)},{name:(Pt==null?void 0:Pt.name)??"games",path:(Pt==null?void 0:Pt.path)??"/games",meta:Pt||{},alias:(Pt==null?void 0:Pt.alias)||[],redirect:Pt==null?void 0:Pt.redirect,component:()=>B(()=>import("./index.CkO_QRKG.js"),__vite__mapDeps([132,1,6,3,133]),import.meta.url).then(e=>e.default||e)},{name:"games-launch-name",path:"/games/launch/:name()",meta:{},alias:[],redirect:_a==null?void 0:_a.redirect,component:()=>B(()=>import("./_name_.CIeDZMGY.js"),__vite__mapDeps([]),import.meta.url).then(e=>e.default||e)},{name:(Rt==null?void 0:Rt.name)??"games-marketing",path:(Rt==null?void 0:Rt.path)??"/games/marketing",meta:Rt||{},alias:(Rt==null?void 0:Rt.alias)||[],redirect:Rt==null?void 0:Rt.redirect,component:()=>B(()=>import("./marketing.CFRREiPk.js"),__vite__mapDeps([134,33,34,24,1,133,135]),import.meta.url).then(e=>e.default||e)},{name:"games-solo",path:"/games/solo",meta:{},alias:[],redirect:Ea==null?void 0:Ea.redirect,component:()=>B(()=>import("./solo.vKKx7BLb.js").then(e=>e.s),__vite__mapDeps([136,1,32,6,3,73,15,47,16,74,75,76,26,77,24,44,7,8,9,78,67,79,64,65,20,80,50,81,34,82,83,137,138,37,38,29,131]),import.meta.url).then(e=>e.default||e)},{name:(Ot==null?void 0:Ot.name)??"games-spellbook",path:(Ot==null?void 0:Ot.path)??"/games/spellbook",meta:Ot||{},alias:(Ot==null?void 0:Ot.alias)||[],redirect:Ot==null?void 0:Ot.redirect,component:()=>B(()=>import("./spellbook.vHMLaavQ.js"),__vite__mapDeps([139,33,34,24,1,133,140]),import.meta.url).then(e=>e.default||e)},{name:"index",path:"/",meta:{},alias:[],redirect:Sa==null?void 0:Sa.redirect,component:()=>B(()=>import("./index.DzYO1etx.js"),__vite__mapDeps([141,127,3,1,113,80,6,73,15,47,16,50,44,142,128,143,144]),import.meta.url).then(e=>e.default||e)},{name:"invite-inviteid",path:"/invite/:inviteid()",meta:{},alias:[],redirect:ka==null?void 0:ka.redirect,component:()=>B(()=>import("./_invite-id_.BSB_bSYp.js"),__vite__mapDeps([145,26,7,8,9,34,29,44]),import.meta.url).then(e=>e.default||e)},{name:"join",path:"/join",meta:{},alias:[],redirect:Ta==null?void 0:Ta.redirect,component:()=>B(()=>import("./join.DE_sXh5T.js"),__vite__mapDeps([146,3]),import.meta.url).then(e=>e.default||e)},{name:"legal",path:"/legal",meta:{},alias:[],redirect:Pa==null?void 0:Pa.redirect,component:()=>B(()=>import("./legal.BMHHz7_9.js"),__vite__mapDeps([147,127,3,2,1]),import.meta.url).then(e=>e.default||e)},{name:(At==null?void 0:At.name)??"library",path:(At==null?void 0:At.path)??"/library",meta:At||{},alias:(At==null?void 0:At.alias)||[],redirect:At==null?void 0:At.redirect,component:()=>B(()=>import("./library.Lc6ivic7.js"),__vite__mapDeps([148,3,6,48,149,1,24,81,72,34,104,44,100,54,57]),import.meta.url).then(e=>e.default||e)},{name:(Ct==null?void 0:Ct.name)??"onboarding-deck",path:(Ct==null?void 0:Ct.path)??"/onboarding/deck",meta:Ct||{},alias:(Ct==null?void 0:Ct.alias)||[],redirect:Ct==null?void 0:Ct.redirect,component:()=>B(()=>import("./deck.d1X2OHK5.js"),__vite__mapDeps([150,6,3,21,1,151,93,65,15,19,17,20,47,16,18,14,52,41,24,53,44,43,54,55,86,87,88,89,33,34,37,38]),import.meta.url).then(e=>e.default||e)},{name:(Lt==null?void 0:Lt.name)??"onboarding",path:(Lt==null?void 0:Lt.path)??"/onboarding",meta:Lt||{},alias:(Lt==null?void 0:Lt.alias)||[],redirect:Lt==null?void 0:Lt.redirect,component:()=>B(()=>import("./index.DoR6OtSl.js"),__vite__mapDeps([152,3,1,6,21,28,7,8,9,37,38,24,29]),import.meta.url).then(e=>e.default||e)},{name:"profiles-manage",path:"/profiles/manage",meta:{},alias:[],redirect:Ra==null?void 0:Ra.redirect,component:()=>B(()=>import("./manage.DkPy_7Eg.js"),__vite__mapDeps([]),import.meta.url).then(e=>e.default||e)},{name:"purchase",path:"/purchase",meta:{},alias:[],redirect:Oa==null?void 0:Oa.redirect,component:()=>B(()=>import("./purchase.DH-doSLi.js"),__vite__mapDeps([153,3,6,1,67,154]),import.meta.url).then(e=>e.default||e)},{name:(It==null?void 0:It.name)??"search",path:(It==null?void 0:It.path)??"/search",meta:It||{},alias:(It==null?void 0:It.alias)||[],redirect:It==null?void 0:It.redirect,component:()=>B(()=>import("./index.KVnch9Mj.js"),__vite__mapDeps([155,12,3,1,21,71,72,37,38,149,24,7,8,9,100,44,156]),import.meta.url).then(e=>e.default||e)},{name:(xt==null?void 0:xt.name)??"search-index2",path:(xt==null?void 0:xt.path)??"/search/index2",meta:xt||{},alias:(xt==null?void 0:xt.alias)||[],redirect:xt==null?void 0:xt.redirect,component:()=>B(()=>import("./index2.Dfv79-Gu.js"),__vite__mapDeps([157,149,1,24]),import.meta.url).then(e=>e.default||e)},{name:(Dt==null?void 0:Dt.name)??"shop",path:(Dt==null?void 0:Dt.path)??"/shop",meta:Dt||{},alias:(Dt==null?void 0:Dt.alias)||[],redirect:Dt==null?void 0:Dt.redirect,component:()=>B(()=>import("./index.Da8eskq7.js"),__vite__mapDeps([158,1,3,159,160,8,24,29]),import.meta.url).then(e=>e.default||e)},{name:(jt==null?void 0:jt.name)??"spaces-id",path:(jt==null?void 0:jt.path)??"/spaces/:id()",meta:jt||{},alias:(jt==null?void 0:jt.alias)||[],redirect:jt==null?void 0:jt.redirect,component:()=>B(()=>import("./_id_.BDbWc1ge.js"),__vite__mapDeps([161,12,3,36,32,1,37,38,99,15,47,20,19,17,14,16,113,46,162,24,163,44,55,53,18,115,70,59,6,34,67,164,165,64,65,86,87,88,89,33,74,75,76,26,77,7,8,9,78,73,79,80,50,81,82,83,131,166,61,45,29,54,60,56,57]),import.meta.url).then(e=>e.default||e)},{name:(Mt==null?void 0:Mt.name)??"spaces",path:(Mt==null?void 0:Mt.path)??"/spaces",meta:Mt||{},alias:(Mt==null?void 0:Mt.alias)||[],redirect:Mt==null?void 0:Mt.redirect,component:()=>B(()=>import("./index.G3e723Gj.js"),__vite__mapDeps([167,6,3,48,34,7,8,9,14,15,16,17,18,19,20,42,104,44,54,168]),import.meta.url).then(e=>e.default||e)},{name:(Nt==null?void 0:Nt.name)??"support-us",path:(Nt==null?void 0:Nt.path)??"/support-us",meta:Nt||{},alias:(Nt==null?void 0:Nt.alias)||[],redirect:Nt==null?void 0:Nt.redirect,component:()=>B(()=>import("./support-us.DDE7Z5-V.js"),__vite__mapDeps([169,113,6,3,96,1,80,73,15,47,16,50,44,86,87,88,89,33,34,24,66,7,8,9,67,154,59,82,56,170,171,172,173]),import.meta.url).then(e=>e.default||e)},{name:(Ft==null?void 0:Ft.name)??"tasks-review-notes",path:(Ft==null?void 0:Ft.path)??"/tasks/review-notes",meta:Ft||{},alias:(Ft==null?void 0:Ft.alias)||[],redirect:Ft==null?void 0:Ft.redirect,component:()=>B(()=>import("./index.C_YhPGeT.js"),__vite__mapDeps([174,1,175,94,7,8,9,34,81,24,149,57,44,26,176,48,45,6,3,46,19,17,15,20,47,16,29,49,50,51,14,77,96,18,38,78,131,67,58,70,56,104]),import.meta.url).then(e=>e.default||e)},{name:($t==null?void 0:$t.name)??"tasks-review-notes-reader",path:($t==null?void 0:$t.path)??"/tasks/review-notes/reader",meta:$t||{},alias:($t==null?void 0:$t.alias)||[],redirect:$t==null?void 0:$t.redirect,component:()=>B(()=>import("./reader.-aHvRf6O.js"),__vite__mapDeps([177,1,88,6,3,77,24,96,178,131,67,179,7,8,9,138,37,38,29,180,181,182]),import.meta.url).then(e=>e.default||e)},{name:(Ut==null?void 0:Ut.name)??"tasks-stories",path:(Ut==null?void 0:Ut.path)??"/tasks/stories",meta:Ut||{},alias:(Ut==null?void 0:Ut.alias)||[],redirect:Ut==null?void 0:Ut.redirect,component:()=>B(()=>import("./index.CRlyWIzD.js"),__vite__mapDeps([183,1,175,94,7,8,9,34,81,24,149,57,44,21,6,3,166,61,45,46,19,17,15,20,47,16,29,52,41,53,43,54,55,49,50,51,162,99,14,64,65,86,87,88,89,33,96,18,38,78,131,70,56,104,184]),import.meta.url).then(e=>e.default||e)},{name:(Ht==null?void 0:Ht.name)??"tasks-stories-reader",path:(Ht==null?void 0:Ht.path)??"/tasks/stories/reader",meta:Ht||{},alias:(Ht==null?void 0:Ht.alias)||[],redirect:Ht==null?void 0:Ht.redirect,component:()=>B(()=>import("./reader.DAoeF2fO.js"),__vite__mapDeps([185,85,14,15,16,17,96,1,3,18,19,20,131,138,37,38,29,67]),import.meta.url).then(e=>e.default||e)},{name:(Vt==null?void 0:Vt.name)??"tasks-vocab",path:(Vt==null?void 0:Vt.path)??"/tasks/vocab",meta:Vt||{},alias:(Vt==null?void 0:Vt.alias)||[],redirect:Vt==null?void 0:Vt.redirect,component:()=>B(()=>import("./vocab.C7TkEs35.js"),__vite__mapDeps([186,187,14,15,16,17,1,21,6,3,188,137,189,84,73,47,85,42,82,44,18,19,20,190,175,94,7,8,9,34,81,24,149,57,48,166,61,164,165,45,46,29,52,41,53,43,54,55,49,50,51,162,99,64,65,86,87,88,89,33,96,38,78,70,56,104,184]),import.meta.url).then(e=>e.default||e)},{name:"tests-id",path:"/tests/:id()",meta:{},alias:[],redirect:Aa==null?void 0:Aa.redirect,component:()=>B(()=>import("./index.dZrzvxSc.js"),__vite__mapDeps([191,1,87,88,89,178,6,3,32,192,7,8,9,29,138,37,38,67,131,180,181,182]),import.meta.url).then(e=>e.default||e)},{name:(Bt==null?void 0:Bt.name)??"tests-design-id",path:(Bt==null?void 0:Bt.path)??"/tests/design/:id()",meta:Bt||{},alias:(Bt==null?void 0:Bt.alias)||[],redirect:Bt==null?void 0:Bt.redirect,component:()=>B(()=>import("./_id_.D9fwBMp7.js"),__vite__mapDeps([193,1,6,3,113,93,65,15,19,17,20,47,16,18,14,115,92,24,94,7,8,9,34,81,182,79,64,67,37,38,180,181]),import.meta.url).then(e=>e.default||e)},{name:(qt==null?void 0:qt.name)??"tests",path:(qt==null?void 0:qt.path)??"/tests",meta:qt||{},alias:(qt==null?void 0:qt.alias)||[],redirect:qt==null?void 0:qt.redirect,component:()=>B(()=>import("./index.B_hlx-3y.js"),__vite__mapDeps([194,1,3,72,34,38,195,21,14,15,16,17,77,24,96,6,18,19,20,97,37,67]),import.meta.url).then(e=>e.default||e)},{name:(Wt==null?void 0:Wt.name)??"tests-responses-track_id-id",path:(Wt==null?void 0:Wt.path)??"/tests/responses/:track_id()/:id()",meta:Wt||{},alias:(Wt==null?void 0:Wt.alias)||[],redirect:Wt==null?void 0:Wt.redirect,component:()=>B(()=>import("./_id_.W5d0pooX.js"),__vite__mapDeps([196,1,87,88,89,178,6,3,180]),import.meta.url).then(e=>e.default||e)},{name:(Kt==null?void 0:Kt.name)??"tests-start",path:(Kt==null?void 0:Kt.path)??"/tests/start",meta:Kt||{},alias:(Kt==null?void 0:Kt.alias)||[],redirect:Kt==null?void 0:Kt.redirect,component:()=>B(()=>import("./start.SJvg7Ot4.js"),__vite__mapDeps([197,1,21,79,64,65,15,47,20,188,26,176,7,8,9,14,16,17,6,3,18,19,192,38,81,37,67,179,131,78,182]),import.meta.url).then(e=>e.default||e)},{name:"topicweb",path:"/topicweb",meta:{},alias:[],redirect:Ca==null?void 0:Ca.redirect,component:()=>B(()=>import("./topicweb.CwmrrUso.js"),__vite__mapDeps([198,114,1,8,199]),import.meta.url).then(e=>e.default||e)},{name:(zt==null?void 0:zt.name)??"tracks-id-events-event_id",path:(zt==null?void 0:zt.path)??"/tracks/:id()/events/:event_id()",meta:zt||{},alias:(zt==null?void 0:zt.alias)||[],redirect:zt==null?void 0:zt.redirect,component:()=>B(()=>import("./_event_id_.CB44iV9u.js"),__vite__mapDeps([200,187,14,15,16,17,1,21,6,3,188,137,189,84,73,47,85,42,82,44,18,19,20,190,12,201,24,64,65,202,164,165,48,52,41,53,43,54,55,49,50,51,46,162,99,86,87,88,89,33,34,192,29,203,70,204,170,61,56,57,59,184,205]),import.meta.url).then(e=>e.default||e)},{name:(Gt==null?void 0:Gt.name)??"tracks-id",path:(Gt==null?void 0:Gt.path)??"/tracks/:id()",meta:Gt||{},alias:(Gt==null?void 0:Gt.alias)||[],redirect:Gt==null?void 0:Gt.redirect,component:()=>B(()=>import("./index.IssM-9Ic.js"),__vite__mapDeps([206,187,14,15,16,17,1,21,6,3,188,137,189,84,73,47,85,42,82,44,18,19,20,190,12,26,32,64,65,202,164,165,48,96,7,8,9,67,143,86,87,88,89,33,34,24,70,59,104,100,54,52,41,53,43,55,49,50,51,207,74,75,76,77,78,79,80,81,83,46,162,99,192,37,38,29,204,170,61,56,57,184,208]),import.meta.url).then(e=>e.default||e)},{name:(Jt==null?void 0:Jt.name)??"tracks-compare",path:(Jt==null?void 0:Jt.path)??"/tracks/compare",meta:Jt||{},alias:(Jt==null?void 0:Jt.alias)||[],redirect:Jt==null?void 0:Jt.redirect,component:()=>B(()=>import("./compare.Bvti5UiV.js"),__vite__mapDeps([209,1,3,34]),import.meta.url).then(e=>e.default||e)},{name:(Yt==null?void 0:Yt.name)??"tracks",path:(Yt==null?void 0:Yt.path)??"/tracks",meta:Yt||{},alias:(Yt==null?void 0:Yt.alias)||[],redirect:Yt==null?void 0:Yt.redirect,component:()=>B(()=>import("./index.BwTHws6e.js"),__vite__mapDeps([210,1,3,42,6,41,70,44,60,61,48,34,100,104]),import.meta.url).then(e=>e.default||e)},{name:(Xt==null?void 0:Xt.name)??"tracks-manage-id",path:(Xt==null?void 0:Xt.path)??"/tracks/manage/:id()",meta:Xt||{},alias:(Xt==null?void 0:Xt.alias)||[],redirect:Xt==null?void 0:Xt.redirect,component:()=>B(()=>import("./_id_.CpZFIGtS.js"),__vite__mapDeps([211,12,3,1,6,24,7,8,9]),import.meta.url).then(e=>e.default||e)},{name:(Qt==null?void 0:Qt.name)??"tracks-new",path:(Qt==null?void 0:Qt.path)??"/tracks/new",meta:Qt||{},alias:(Qt==null?void 0:Qt.alias)||[],redirect:Qt==null?void 0:Qt.redirect,component:()=>B(()=>import("./new.C-hoFGhO.js"),__vite__mapDeps([212,6,3,151,93,65,15,19,17,20,47,16,18,14,1,52,41,24,53,44,43,54,55,86,87,88,89,33,34,21,13,22,23,202,7,8,9,29,138,37,38,192]),import.meta.url).then(e=>e.default||e)},{name:(Zt==null?void 0:Zt.name)??"tracks-search",path:(Zt==null?void 0:Zt.path)??"/tracks/search",meta:Zt||{},alias:(Zt==null?void 0:Zt.alias)||[],redirect:Zt==null?void 0:Zt.redirect,component:()=>B(()=>import("./search.D_1ZmFPJ.js"),__vite__mapDeps([213,1,12,3,6,25,7,8,9]),import.meta.url).then(e=>e.default||e)},{name:"zen",path:"/zen",meta:{},alias:[],redirect:La==null?void 0:La.redirect,component:()=>B(()=>import("./zen.DBIldFqH.js"),__vite__mapDeps([214,175,1,94,7,8,9,34,81,24,149,57,44,6,3,32,215,33,87,88,89,160,216,14,15,16,17,26,159,84,73,47,85,42,82,38,138,37,29,40,217]),import.meta.url).then(e=>e.default||e)}],Yh=(e,t,n)=>(t=t===!0?{}:t,{default:()=>{var r;return t?nt(e,t,n):(r=n.default)==null?void 0:r.call(n)}});function hf(e){const t=(e==null?void 0:e.meta.key)??e.path.replace(/(:\w+)\([^)]+\)/g,"$1").replace(/(:\w+)[?+*]/g,"$1").replace(/:\w+/g,n=>{var r;return((r=e.params[n.slice(1)])==null?void 0:r.toString())||""});return typeof t=="function"?t(e):t}function Mb(e,t){return e===t||t===vn?!1:hf(e)!==hf(t)?!0:!e.matched.every((r,s)=>{var o,i;return r.components&&r.components.default===((i=(o=t.matched[s])==null?void 0:o.components)==null?void 0:i.default)})}const Nb={scrollBehavior(e,t,n){var u;const r=de(),s=((u=sn().options)==null?void 0:u.scrollBehaviorType)??"auto";let o=n||void 0;const i=typeof e.meta.scrollToTop=="function"?e.meta.scrollToTop(e,t):e.meta.scrollToTop;if(!o&&t&&e&&i!==!1&&Mb(e,t)&&(o={left:0,top:0}),e.path===t.path)return t.hash&&!e.hash?{left:0,top:0}:e.hash?{el:e.hash,top:pf(e.hash),behavior:s}:!1;const a=c=>!!(c.meta.pageTransition??bl),l=a(t)&&a(e)?"page:transition:finish":"page:finish";return new Promise(c=>{r.hooks.hookOnce(l,async()=>{await new Promise(f=>setTimeout(f,0)),e.hash&&(o={el:e.hash,top:pf(e.hash),behavior:s}),c(o)})})}};function pf(e){try{const t=document.querySelector(e);if(t)return parseFloat(getComputedStyle(t).scrollMarginTop)}catch{}return 0}const Fb={hashMode:!1,scrollBehaviorType:"auto"},en={...Fb,...Nb},$b=async e=>{var l;let t,n;if(!((l=e.meta)!=null&&l.validate))return;const r=de(),s=sn();if(([t,n]=as(()=>Promise.resolve(e.meta.validate(e))),t=await t,n(),t)===!0)return;const i=Ni({statusCode:404,statusMessage:`Page Not Found: ${e.fullPath}`,data:{path:e.fullPath}}),a=s.beforeResolve(u=>{if(a(),u===e){const c=s.afterEach(async()=>{c(),await r.runWithContext(()=>Vr(i)),window.history.pushState({},"",e.fullPath)});return!1}})},Ub=[$b],Bs={authenticated:()=>B(()=>import("./authenticated.ClmpWp00.js"),__vite__mapDeps([]),import.meta.url),guest:()=>B(()=>import("./guest.DGGe3Nsg.js"),__vite__mapDeps([]),import.meta.url),"require-game":()=>B(()=>import("./requireGame.ePg4d_Oh.js"),__vite__mapDeps([]),import.meta.url)};function Hb(e,t,n){const{pathname:r,search:s,hash:o}=t,i=e.indexOf("#");if(i>-1){const u=o.includes(e.slice(i))?e.slice(i).length:1;let c=o.slice(u);return c[0]!=="/"&&(c="/"+c),ju(c,"")}const a=ju(r,e),l=!n||Iy(a,n,{trailingSlash:!0})?a:n;return l+(l.includes("?")?"":s)+o}const Vb=rn({name:"nuxt:router",enforce:"pre",async setup(e){var g,y;let t,n,r=mo().app.baseURL;en.hashMode&&!r.includes("#")&&(r+="#");const s=((g=en.history)==null?void 0:g.call(en,r))??(en.hashMode?ab(r):qh(r)),o=((y=en.routes)==null?void 0:y.call(en,df))??df;let i;const a=Hb(r,window.location,e.payload.path),l=Lb({...en,scrollBehavior:(w,m,v)=>{if(m===vn){i=v;return}if(en.scrollBehavior){if(l.options.scrollBehavior=en.scrollBehavior,"scrollRestoration"in window.history){const b=l.beforeEach(()=>{b(),window.history.scrollRestoration="manual"})}return en.scrollBehavior(w,vn,i||v)}},history:s,routes:o});"scrollRestoration"in window.history&&(window.history.scrollRestoration="auto"),e.vueApp.use(l);const u=be(l.currentRoute.value);l.afterEach((w,m)=>{u.value=m}),Object.defineProperty(e.vueApp.config.globalProperties,"previousRoute",{get:()=>u.value});const c=be(l.resolve(a)),f=()=>{c.value=l.currentRoute.value};e.hook("page:finish",f),l.afterEach((w,m)=>{var v,b,E,R;((b=(v=w.matched[0])==null?void 0:v.components)==null?void 0:b.default)===((R=(E=m.matched[0])==null?void 0:E.components)==null?void 0:R.default)&&f()});const d={};for(const w in c.value)Object.defineProperty(d,w,{get:()=>c.value[w]});e._route=In(d),e._middleware=e._middleware||{global:[],named:{}};const h=Mi();try{[t,n]=as(()=>l.isReady()),await t,n()}catch(w){[t,n]=as(()=>e.runWithContext(()=>Vr(w))),await t,n()}const p=e.payload.state._layout;return l.beforeEach(async(w,m)=>{var v;await e.callHook("page:loading:start"),w.meta=Ee(w.meta),e.isHydrating&&p&&!Tn(w.meta.layout)&&(w.meta.layout=p),e._processingMiddleware=!0;{const b=new Set([...Ub,...e._middleware.global]);for(const E of w.matched){const R=E.meta.middleware;if(R)for(const k of Ec(R))b.add(k)}for(const E of b){const R=typeof E=="string"?e._middleware.named[E]||await((v=Bs[E])==null?void 0:v.call(Bs).then(C=>C.default||C)):E;if(!R)throw new Error(`Unknown route middleware: '${E}'.`);const k=await e.runWithContext(()=>R(w,m));if(!e.payload.serverRendered&&e.isHydrating&&(k===!1||k instanceof Error)){const C=k||ml({statusCode:404,statusMessage:`Page Not Found: ${a}`});return await e.runWithContext(()=>Vr(C)),!1}if(k!==!0&&(k||k===!1))return k}}}),l.onError(async()=>{delete e._processingMiddleware,await e.callHook("page:loading:end")}),l.afterEach(async(w,m,v)=>{delete e._processingMiddleware,!e.isHydrating&&h.value&&await e.runWithContext(Pw),v&&await e.callHook("page:loading:end"),w.matched.length===0&&await e.runWithContext(()=>Vr(ml({statusCode:404,fatal:!1,statusMessage:`Page not found: ${w.fullPath}`,data:{path:w.fullPath}})))}),e.hooks.hookOnce("app:created",async()=>{try{const w=l.resolve(a);"name"in w&&(w.name=void 0),await l.replace({...w,force:!0}),l.options.scrollBehavior=en.scrollBehavior}catch(w){await e.runWithContext(()=>Vr(w))}}),{provide:{router:l}}}}),vf=globalThis.requestIdleCallback||(e=>{const t=Date.now(),n={didTimeout:!1,timeRemaining:()=>Math.max(0,50-(Date.now()-t))};return setTimeout(()=>{e(n)},1)}),MO=globalThis.cancelIdleCallback||(e=>{clearTimeout(e)}),Bb=e=>{const t=de();t.isHydrating?t.hooks.hookOnce("app:suspense:resolve",()=>{vf(e)}):vf(e)},qb=rn({name:"nuxt:payload",setup(e){sn().beforeResolve(async(t,n)=>{if(t.path===n.path)return;const r=await Ku(t.path);r&&Object.assign(e.static.data,r.data)}),Bb(()=>{e.hooks.hook("link:prefetch",async t=>{ji(t).protocol||await Ku(t)})})}}),Wb=rn({name:"nuxt:global-components"}),Gn={default:()=>B(()=>import("./default.C8yz2l4f.js"),__vite__mapDeps([218,219,1,220,14,15,16,17,3,81,72,34,24,7,8,9,67,18,19,20]),import.meta.url).then(e=>e.default||e),game:()=>B(()=>import("./game.CJ0E8s3Q.js"),__vite__mapDeps([221,219,1,220,14,15,16,17,3,81,72,34,24,7,8,9,67,18,19,20,6,222,160,223]),import.meta.url).then(e=>e.default||e),sidebar:()=>B(()=>import("./sidebar.COmbzpqf.js"),__vite__mapDeps([224,113,220,14,15,16,17,3,1,81,72,34,24,7,8,9,67,18,19,20,100,44,57,76,26,46,47,41,162,60,61,43,168,172,171,163,203,90,225]),import.meta.url).then(e=>e.default||e),space:()=>B(()=>import("./space.D2Bmbw0J.js"),__vite__mapDeps([226,220,14,15,16,17,3,1,81,72,34,24,7,8,9,67,18,19,20,38]),import.meta.url).then(e=>e.default||e),task:()=>B(()=>import("./task.Bb3ZjAqs.js"),__vite__mapDeps([227,220,14,15,16,17,3,1,81,72,34,24,7,8,9,67,18,19,20,32,131]),import.meta.url).then(e=>e.default||e)},Kb=rn({name:"nuxt:prefetch",setup(e){const t=sn();e.hooks.hook("app:mounted",()=>{t.beforeEach(async n=>{var s;const r=(s=n==null?void 0:n.meta)==null?void 0:s.layout;r&&typeof Gn[r]=="function"&&await Gn[r]()})}),e.hooks.hook("link:prefetch",n=>{if(po(n))return;const r=t.resolve(n);if(!r)return;const s=r.meta.layout;let o=Ec(r.meta.middleware);o=o.filter(i=>typeof i=="string");for(const i of o)typeof Bs[i]=="function"&&Bs[i]();s&&typeof Gn[s]=="function"&&Gn[s]()})}}),zb="$s";function jn(...e){const t=typeof e[e.length-1]=="string"?e.pop():void 0;typeof e[0]!="string"&&e.unshift(t);const[n,r]=e;if(!n||typeof n!="string")throw new TypeError("[nuxt] [useState] key must be a string: "+n);if(r!==void 0&&typeof r!="function")throw new Error("[nuxt] [useState] init must be a function: "+r);const s=zb+n,o=de(),i=tc(o.payload.state,s);if(i.value===void 0&&r){const a=r();if(we(a))return o.payload.state[s]=a,a;i.value=a}return i}const Gb="__NUXT_COLOR_MODE__",Ia="nuxt-color-mode",Jb="localStorage",Rn=window[Gb]||{},Yb=rn(e=>{const t=jn("color-mode",()=>Ee({preference:Rn.preference,value:Rn.value,unknown:!1,forced:!1})).value;sn().afterEach(o=>{const i=o.meta.colorMode;i&&i!=="system"?(t.value=i,t.forced=!0):(i==="system"&&console.warn("You cannot force the colorMode to system at the page level."),t.forced=!1,t.value=t.preference==="system"?Rn.getColorScheme():t.preference)});let n;function r(){n||!window.matchMedia||(n=window.matchMedia("(prefers-color-scheme: dark)"),n.addEventListener("change",()=>{!t.forced&&t.preference==="system"&&(t.value=Rn.getColorScheme())}))}function s(o,i){var a,l;switch(o){case"cookie":window.document.cookie=Ia+"="+i;break;case"sessionStorage":(a=window.sessionStorage)==null||a.setItem(Ia,i);break;case"localStorage":default:(l=window.localStorage)==null||l.setItem(Ia,i)}}q(()=>t.preference,o=>{t.forced||(o==="system"?(t.value=Rn.getColorScheme(),r()):t.value=o,s(Jb,o))},{immediate:!0}),q(()=>t.value,(o,i)=>{Rn.removeColorScheme(i),Rn.addColorScheme(o)}),t.preference==="system"&&r(),e.hook("app:mounted",()=>{t.unknown&&(t.preference=Rn.preference,t.value=Rn.value,t.unknown=!1)}),e.provide("colorMode",t)});function Xb(e={}){const{immediate:t=!1,onNeedRefresh:n,onOfflineReady:r,onRegistered:s,onRegisteredSW:o,onRegisterError:i}=e;let a,l,u;const c=async(d=!0)=>{await l,await(u==null?void 0:u())};async function f(){if("serviceWorker"in navigator){if(a=await B(()=>import("./workbox-window.prod.es5.DFjpnwFp.js"),__vite__mapDeps([]),import.meta.url).then(({Workbox:d})=>new d("/sw.js",{scope:"/",type:"classic"})).catch(d=>{i==null||i(d)}),!a)return;u=async()=>{await(a==null?void 0:a.messageSkipWaiting())};{let d=!1;const h=()=>{d=!0,a==null||a.addEventListener("controlling",p=>{p.isUpdate&&window.location.reload()}),n==null||n()};a.addEventListener("installed",p=>{typeof p.isUpdate>"u"?typeof p.isExternal<"u"?p.isExternal?h():!d&&(r==null||r()):p.isExternal?window.location.reload():!d&&(r==null||r()):p.isUpdate||r==null||r()}),a.addEventListener("waiting",h),a.addEventListener("externalwaiting",h)}a.register({immediate:t}).then(d=>{o?o("/sw.js",d):s==null||s(d)}).catch(d=>{i==null||i(d)})}}return l=f(),c}function Qb(e={}){const{immediate:t=!0,onNeedRefresh:n,onOfflineReady:r,onRegistered:s,onRegisteredSW:o,onRegisterError:i}=e,a=S(!1),l=S(!1);return{updateServiceWorker:Xb({immediate:t,onNeedRefresh(){a.value=!0,n==null||n()},onOfflineReady(){l.value=!0,r==null||r()},onRegistered:s,onRegisteredSW:o,onRegisterError:i}),offlineReady:l,needRefresh:a}}const Zb=void 0,e_=rn(()=>{const e=S(!1),t=S(!1),n=S(!1),r=S(!0),s=navigator.userAgent,o=s.match(/iPhone|iPad|iPod/),a=!!(window.matchMedia("(display-mode: standalone)").matches||o&&!s.match(/Safari/));let l;const u=()=>l,{offlineReady:c,needRefresh:f,updateServiceWorker:d}=Qb({immediate:!0,onRegisterError(){e.value=!0},onRegisteredSW(y,w){l=w}}),h=async()=>{c.value=!1,f.value=!1};let p=()=>Promise.resolve(),g=()=>{};if(!r.value){let y;const w=m=>{m.preventDefault(),y=m,n.value=!0};window.addEventListener("beforeinstallprompt",w),window.addEventListener("appinstalled",()=>{y=void 0,n.value=!1}),g=()=>{y=void 0,n.value=!1,window.removeEventListener("beforeinstallprompt",w),r.value=!0,localStorage.setItem(Zb,"true")},p=async()=>{if(!n.value||!y){n.value=!1;return}n.value=!1,await Be(),y.prompt(),await y.userChoice}}return{provide:{pwa:Ee({isInstalled:a,showInstallPrompt:n,cancelInstall:g,install:p,swActivated:t,registrationError:e,offlineReady:c,needRefresh:f,updateServiceWorker:d,cancelPrompt:h,getSWRegistration:u})}}});function t_(e={}){const t=e.path||window.location.pathname;let n={};try{n=di(sessionStorage.getItem("nuxt:reload")||"{}")}catch{}if(e.force||(n==null?void 0:n.path)!==t||(n==null?void 0:n.expires){r.clear()}),e.hook("app:chunkError",({error:o})=>{r.add(o)});function s(o){const a="href"in o&&o.href[0]==="#"?n.app.baseURL+o.href:vo(n.app.baseURL,o.fullPath);t_({path:a,persistState:!0})}e.hook("app:manifest:update",()=>{t.beforeResolve(s)}),t.onError((o,i)=>{r.has(o)&&s(i)})}}),Xh=new Set,lt=new WeakMap,Qr=new WeakMap,_r=new WeakMap,Tl=new WeakMap,r_=new WeakMap,us=new WeakMap,mi=new WeakMap,xs=new WeakSet;let Er;const Cn="__aa_tgt",Pl="__aa_del",s_=e=>{const t=c_(e);t&&t.forEach(n=>u_(n))},o_=e=>{e.forEach(t=>{t.target===Er&&a_(),lt.has(t.target)&&Or(t.target)})};function i_(e){const t=Tl.get(e);t==null||t.disconnect();let n=lt.get(e),r=0;const s=5;n||(n=fs(e),lt.set(e,n));const{offsetWidth:o,offsetHeight:i}=Er,l=[n.top-s,o-(n.left+s+n.width),i-(n.top+s+n.height),n.left-s].map(c=>`${-1*Math.floor(c)}px`).join(" "),u=new IntersectionObserver(()=>{++r>1&&Or(e)},{root:Er,threshold:1,rootMargin:l});u.observe(e),Tl.set(e,u)}function Or(e){clearTimeout(mi.get(e));const t=$i(e),n=typeof t=="function"?500:t.duration;mi.set(e,setTimeout(async()=>{const r=_r.get(e);try{await(r==null?void 0:r.finished),lt.set(e,fs(e)),i_(e)}catch{}},n))}function a_(){clearTimeout(mi.get(Er)),mi.set(Er,setTimeout(()=>{Xh.forEach(e=>tp(e,t=>Qh(()=>Or(t))))},100))}function l_(e){setTimeout(()=>{r_.set(e,setInterval(()=>Qh(Or.bind(null,e)),2e3))},Math.round(2e3*Math.random()))}function Qh(e){typeof requestIdleCallback=="function"?requestIdleCallback(()=>e()):requestAnimationFrame(()=>e())}let Rl,Br;typeof window<"u"&&(Er=document.documentElement,Rl=new MutationObserver(s_),Br=new ResizeObserver(o_),Br.observe(Er));function c_(e){return e.reduce((r,s)=>[...r,...Array.from(s.addedNodes),...Array.from(s.removedNodes)],[]).every(r=>r.nodeName==="#comment")?!1:e.reduce((r,s)=>{if(r===!1)return!1;if(s.target instanceof Element){if(xa(s.target),!r.has(s.target)){r.add(s.target);for(let o=0;on(e,us.has(e)));for(let n=0;ns(r,us.has(r)))}}function d_(e){const t=lt.get(e),n=fs(e);if(!Sc(e))return lt.set(e,n);let r;if(!t)return;const s=$i(e);if(typeof s!="function"){const o=t.left-n.left,i=t.top-n.top,[a,l,u,c]=Zh(e,t,n),f={transform:`translate(${o}px, ${i}px)`},d={transform:"translate(0, 0)"};a!==l&&(f.width=`${a}px`,d.width=`${l}px`),u!==c&&(f.height=`${u}px`,d.height=`${c}px`),r=e.animate([f,d],{duration:s.duration,easing:s.easing})}else r=new Animation(s(e,"remain",t,n)),r.play();_r.set(e,r),lt.set(e,n),r.addEventListener("finish",Or.bind(null,e))}function h_(e){const t=fs(e);lt.set(e,t);const n=$i(e);if(!Sc(e))return;let r;typeof n!="function"?r=e.animate([{transform:"scale(.98)",opacity:0},{transform:"scale(0.98)",opacity:0,offset:.5},{transform:"scale(1)",opacity:1}],{duration:n.duration*1.5,easing:"ease-in"}):(r=new Animation(n(e,"add",t)),r.play()),_r.set(e,r),r.addEventListener("finish",Or.bind(null,e))}function p_(e){var t;if(!Qr.has(e)||!lt.has(e))return;const[n,r]=Qr.get(e);Object.defineProperty(e,Pl,{value:!0}),r&&r.parentNode&&r.parentNode instanceof Element?r.parentNode.insertBefore(e,r):n&&n.parentNode?n.parentNode.appendChild(e):(t=ep(e))===null||t===void 0||t.appendChild(e);function s(){var d;e.remove(),lt.delete(e),Qr.delete(e),_r.delete(e),(d=Tl.get(e))===null||d===void 0||d.disconnect()}if(!Sc(e))return s();const[o,i,a,l]=v_(e),u=$i(e),c=lt.get(e);let f;Object.assign(e.style,{position:"absolute",top:`${o}px`,left:`${i}px`,width:`${a}px`,height:`${l}px`,margin:0,pointerEvents:"none",transformOrigin:"center",zIndex:100}),typeof u!="function"?f=e.animate([{transform:"scale(1)",opacity:1},{transform:"scale(.98)",opacity:0}],{duration:u.duration,easing:"ease-out"}):(f=new Animation(u(e,"remove",c)),f.play()),_r.set(e,f),f.addEventListener("finish",s)}function v_(e){const t=lt.get(e),[n,,r]=Zh(e,t,fs(e));let s=e.parentElement;for(;s&&(getComputedStyle(s).position==="static"||s instanceof HTMLBodyElement);)s=s.parentElement;s||(s=document.body);const o=getComputedStyle(s),i=lt.get(s)||fs(s),a=Math.round(t.top-i.top)-_n(o.borderTopWidth),l=Math.round(t.left-i.left)-_n(o.borderLeftWidth);return[a,l,n,r]}function m_(e,t={}){return Rl&&Br&&(window.matchMedia("(prefers-reduced-motion: reduce)").matches&&typeof t!="function"&&!t.disrespectUserMotionPreference||(xs.add(e),getComputedStyle(e).position==="static"&&Object.assign(e.style,{position:"relative"}),tp(e,Or,l_,s=>Br==null?void 0:Br.observe(s)),typeof t=="function"?us.set(e,t):us.set(e,{duration:250,easing:"ease-in-out",...t}),Rl.observe(e,{childList:!0}),Xh.add(e))),Object.freeze({parent:e,enable:()=>{xs.add(e)},disable:()=>{xs.delete(e)},isEnabled:()=>xs.has(e)})}const g_={mounted:(e,t)=>{m_(e,t.value||{})}},y_={install(e){e.directive("auto-animate",g_)}},w_=rn(()=>{de().vueApp.use(y_)});function ro(){return{async fire(e){return(await B(()=>import("./sweetalert2.all.min.C8r_a7YB.js").then(n=>n.s),__vite__mapDeps([228,8]),import.meta.url)).default.fire(e)},async showLoading(){return(await B(()=>import("./sweetalert2.all.min.C8r_a7YB.js").then(t=>t.s),__vite__mapDeps([228,8]),import.meta.url)).default.showLoading()},async hideLoading(){return(await B(()=>import("./sweetalert2.all.min.C8r_a7YB.js").then(t=>t.s),__vite__mapDeps([228,8]),import.meta.url)).default.hideLoading()},async close(){return(await B(()=>import("./sweetalert2.all.min.C8r_a7YB.js").then(t=>t.s),__vite__mapDeps([228,8]),import.meta.url)).default.close()},showValidationMessage(e){}}}const gi={true:["true","yes","y","t"],false:["false","no","n","f"]},yi=e=>{const t=e.toLowerCase().trim();return gi.true.includes(t)||gi.false.includes(t)},b_=e=>{const t=e.toLowerCase().trim();if(gi.true.includes(t))return!0;if(gi.false.includes(t))return!1;throw new Error("Not a true or false value")},NO=(e,t)=>{if(!isNaN(Number(e.answer))){const o=Number(e.answer),i=[o+1,o+2,o+3,o+4,o-1,o-2,o-3,o-4].map(l=>({question:l.toString(),answer:l.toString(),id:-1})).sort(()=>Math.random()-.5).slice(0,3);return{choices:[e,...i].sort(()=>Math.random()-.5),answer:e.answer}}if(yi(e.answer))return{choices:[{question:"true",answer:"true",id:-1},{question:"false",answer:"false",id:-1}],answer:b_(e.answer).toString()};const n=[];t.forEach(o=>{yi(o.answer)||o.answer.toLowerCase().trim()!==e.answer.toLowerCase().trim()&&n.push(o)});const r=[e],s=n.sort(()=>Math.random()-.5).slice(0,3);return r.push(...s),{choices:r.sort(()=>Math.random()-.5),answer:e.answer,rich_text_answer:e.rich_text_answer}},ys=()=>jn("user",()=>({data:null,profile:null,billingIDs:{user_id:""},isSupporter:!1,avatarItems:[],newEmail:null})),__=()=>{const e=window.location.hash.split("#message=")[1];if(e){const o=decodeURIComponent(e.replace(/\+/g,"%20"));ro().fire({text:o,icon:"info"})}const t=window.location.hash.split("error_description=")[1];if(t){const o=decodeURIComponent(t.replace(/\+/g,"%20"));ro().fire({text:o,icon:"error"})}const n=ys(),r=de().$db(),s=async()=>{const{data:{session:o}}=await r.auth.getSession();if(!o)return;const{user:i}=o;if(n.value.data===null){const a=de().$posthog();a&&a.identify(i.id,{$email:i.email})}n.value.data=i};r.auth.onAuthStateChange(async()=>{s()})},FO=async()=>{const e=ro(),t=de().$db(),n=de().$posthog(),r=ys();localStorage.removeItem("onboarding"),localStorage.removeItem("surveyState");const{error:s}=await t.auth.signOut();s?e.fire({title:"Error",text:s.message,icon:"error"}):(r.value.data=null,r.value.profile=null,n&&n.reset())},np=()=>jn("online",()=>!!window.navigator.onLine);let mf=0;const rp=async e=>{const t=np();if(!e&&t.value&&mf>Date.now()-1e3*60)return t.value;try{const n=new Date().getTime();(await fetch(`/online-check.txt?t=${n}`)).ok?t.value=!0:t.value=!1}catch{t.value=!1}finally{mf=new Date().getTime()}return t.value};function Ps(e){return e[Math.floor(Math.random()*e.length)]}class $O{constructor(t){Ss(this,"session");Ss(this,"config",{impacts:{small:1,normal:2,large:3,incorrect:-1,none:0}});Ss(this,"masteries",{});Ss(this,"incorrect",{});this.session=t;for(const n of this.session.cards)this.masteries[n.id]=n.mastery||0,n.review_rank=n.review_rank||0}get cards(){return this.session.cards}addMastery(t,n){if(n!=="none"){if(yi(t.question)||yi(t.answer)){if(this.masteries[t.id]+=this.config.impacts[n],this.masteries[t.id]=Math.min(10,Math.max(0,this.masteries[t.id])),t.mastery=this.masteries[t.id],n==="incorrect"){this.incorrect[t.id]=(this.incorrect[t.id]||0)+2,this.session.settings.addMissedtoReview&&t.review_rank++;return}this.incorrect[t.id]=Math.max((this.incorrect[t.id]||0)+-1,0)}else{const r=this.cards.filter(s=>s.question.toLowerCase().trim()===t.question.toLowerCase().trim()||s.answer.toLowerCase().trim()===t.answer.toLowerCase().trim());for(const s of r){if(this.masteries[s.id]+=this.config.impacts[n],this.masteries[s.id]=Math.min(10,Math.max(0,this.masteries[s.id])),s.mastery=this.masteries[s.id],n==="incorrect"){this.incorrect[s.id]=(this.incorrect[s.id]||0)+2,this.session.settings.addMissedtoReview&&s.review_rank++;return}this.incorrect[s.id]=Math.max((this.incorrect[s.id]||0)+-1,0)}}this.session.trackProgress.points_earned+=100,this.session.trackProgress.points_today+=100}}assignCard(t,n){const r=this.session.cards.filter(o=>!n||n.length===0||n.some(i=>i===void 0)?!0:n.some(i=>i?i(o):!0));let s=t.pickCard(r,this);return s||(s=sp.random.pickCard(r,this)),this.session.card=s,s}}const sp={random:{name:"Random",description:"Select a random card.",icon:"ion:dice",color:"bg-blue-400 hover:bg-blue-300 active:shadow-[0_1px_0_theme(colors.blue.300)] shadow-[0_3px_0_theme(colors.blue.600)] dark:bg-blue-700 dark:hover:bg-blue-600 dark:active:shadow-[0_1px_0_theme(colors.blue.600)] dark:shadow-[0_3px_0_theme(colors.blue.800)]",pickCard(e){return Ps(e)}},new:{name:"New",description:"Select a card that you have not seen as often.",icon:"pajamas:issue-new",color:"bg-sky-400 hover:bg-sky-300 active:shadow-[0_1px_0_theme(colors.sky.300)] shadow-[0_3px_0_theme(colors.sky.600)] dark:bg-sky-700 dark:hover:bg-sky-600 dark:active:shadow-[0_1px_0_theme(colors.sky.600)] dark:shadow-[0_3px_0_theme(colors.sky.800)]",pickCard(e,t){const n=Math.min(...e.map(r=>t.masteries[r.id]||0));return Ps(e.filter(r=>t.masteries[r.id]===n))}},familiar:{name:"Familiar",description:"Select a card you have seen a few times.",icon:"mdi:sprout",color:"bg-emerald-500 hover:bg-emerald-400 active:shadow-[0_1px_0_theme(colors.emerald.400)] shadow-[0_3px_0_theme(colors.emerald.700)] dark:bg-emerald-700 dark:hover:bg-emerald-600 dark:active:shadow-[0_1px_0_theme(colors.emerald.600)] dark:shadow-[0_3px_0_theme(colors.emerald.800)]",pickCard(e,t){const n=e.filter(r=>(t.masteries[r.id]||0)>0).sort((r,s)=>(t.masteries[r.id]||0)-(t.masteries[s.id]||0)).sort((r,s)=>(t.incorrect[r.id]||0)-(t.incorrect[s.id]||0)).filter(r=>{var s;return r.id!=((s=t.session.card)==null?void 0:s.id)});return n[Math.floor(n.length/2)]}},retry:{name:"Retry",description:"Select a card you have missed recently.",icon:"fa:refresh",color:"bg-rose-400 hover:bg-rose-300 active:shadow-[0_1px_0_theme(colors.rose.300)] shadow-[0_3px_0_theme(colors.rose.600)] dark:bg-rose-700 dark:hover:bg-rose-600 dark:active:shadow-[0_1px_0_theme(colors.rose.600)] dark:shadow-[0_3px_0_theme(colors.rose.800)]",pickCard(e,t){const n=e.filter(r=>(t.incorrect[r.id]||0)>0).sort((r,s)=>(t.incorrect[s.id]||-1)-(t.incorrect[r.id]||-1));return n.length===0?Ps(e):Ps(n.slice(0,5))}},remaster:{name:"Remaster",description:"Select a card you have seen a lot.",icon:"jam:crown-f",color:"bg-amber-500 hover:bg-amber-400 active:shadow-[0_1px_0_theme(colors.amber.400)] shadow-[0_3px_0_theme(colors.amber.700)] dark:bg-amber-700 dark:hover:bg-amber-600 dark:active:shadow-[0_1px_0_theme(colors.amber.600)] dark:shadow-[0_3px_0_theme(colors.amber.800)]",pickCard(e,t){const n=e.sort((r,s)=>(t.masteries[s.id]||0)-(t.masteries[r.id]||0)).filter(r=>{var s;return r.id!=((s=t.session.card)==null?void 0:s.id)});return Ps(n.slice(0,5))}}};function E_(e){return e.map(n=>sp[n])}const UO=async e=>{var o;const t=ys(),n=de().$db();if(!((o=t.value.profile)!=null&&o.id))return[];if(!await rp())return[];const{data:r,error:s}=await n.rpc("fetch_card_mastery_data",{_card_ids:e});if(s)throw console.error(s),s;return r};function gf(e,t){var n;const r=be();return wr(()=>{r.value=e()},{...t,flush:(n=t==null?void 0:t.flush)!=null?n:"sync"}),ze(r)}function Ol(e,t){let n,r,s;const o=S(!0),i=()=>{o.value=!0,s()};q(e,i,{flush:"sync"});const a=typeof t=="function"?t:t.get,l=typeof t=="function"?void 0:t.set,u=Pr((c,f)=>(r=c,s=f,{get(){return o.value&&(n=a(),o.value=!1),r(),n},set(d){l==null||l(d)}}));return Object.isExtensible(u)&&(u.trigger=i),u}function he(e){return Wl()?(qv(e),!0):!1}function et(){const e=new Set,t=s=>{e.delete(s)};return{on:s=>{e.add(s);const o=()=>t(s);return he(o),{off:o}},off:t,trigger:(...s)=>Promise.all(Array.from(e).map(o=>o(...s)))}}function S_(e){let t=!1,n;const r=ql(!0);return(...s)=>(t||(n=r.run(()=>e(...s)),t=!0),n)}const Zr=new WeakMap,op=(e,t)=>{var n;const r=(n=ut())==null?void 0:n.proxy;if(r==null)throw new Error("provideLocal must be called in setup");Zr.has(r)||Zr.set(r,Object.create(null));const s=Zr.get(r);s[e]=t,Xn(e,t)},ip=(...e)=>{var t;const n=e[0],r=(t=ut())==null?void 0:t.proxy;if(r==null)throw new Error("injectLocal must be called in setup");return Zr.has(r)&&n in Zr.get(r)?Zr.get(r)[n]:Ne(...e)};function k_(e,t){const n=(t==null?void 0:t.injectionKey)||Symbol(e.name||"InjectionState");return[(...o)=>{const i=e(...o);return op(n,i),i},()=>ip(n)]}function T_(e){let t=0,n,r;const s=()=>{t-=1,r&&t<=0&&(r.stop(),n=void 0,r=void 0)};return(...o)=>(t+=1,n||(r=ql(!0),n=r.run(()=>e(...o))),he(s),n)}function ap(e,t,{enumerable:n=!1,unwrap:r=!0}={}){for(const[s,o]of Object.entries(t))s!=="value"&&(we(o)&&r?Object.defineProperty(e,s,{get(){return o.value},set(i){o.value=i},enumerable:n}):Object.defineProperty(e,s,{value:o,enumerable:n}));return e}function P_(e,t){return t==null?oe(e):oe(e)[t]}function R_(e){return oe(e)!=null}function lp(e,t){if(typeof Symbol<"u"){const n={...e};return Object.defineProperty(n,Symbol.iterator,{enumerable:!1,value(){let r=0;return{next:()=>({value:t[r++],done:r>t.length})}}}),n}else return Object.assign([...t],e)}function O(e){return typeof e=="function"?e():oe(e)}const O_=O;function Al(e,t){const n=(t==null?void 0:t.computedGetter)===!1?oe:O;return function(...r){return D(()=>e.apply(this,r.map(s=>n(s))))}}function A_(e,t={}){let n=[],r;if(Array.isArray(t))n=t;else{r=t;const{includeOwnProperties:s=!0}=t;n.push(...Object.keys(e)),s&&n.push(...Object.getOwnPropertyNames(e))}return Object.fromEntries(n.map(s=>{const o=e[s];return[s,typeof o=="function"?Al(o.bind(e),r):o]}))}function cp(e){if(!we(e))return Ee(e);const t=new Proxy({},{get(n,r,s){return oe(Reflect.get(e.value,r,s))},set(n,r,s){return we(e.value[r])&&!we(s)?e.value[r].value=s:e.value[r]=s,!0},deleteProperty(n,r){return Reflect.deleteProperty(e.value,r)},has(n,r){return Reflect.has(e.value,r)},ownKeys(){return Object.keys(e.value)},getOwnPropertyDescriptor(){return{enumerable:!0,configurable:!0}}});return Ee(t)}function kc(e){return cp(D(e))}function C_(e,...t){const n=t.flat(),r=n[0];return kc(()=>Object.fromEntries(typeof r=="function"?Object.entries(ni(e)).filter(([s,o])=>!r(O(o),s)):Object.entries(ni(e)).filter(s=>!n.includes(s[0]))))}const Ve=typeof window<"u"&&typeof document<"u",up=typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope,fp=e=>typeof e<"u",Ui=e=>e!=null,L_=(e,...t)=>{e||console.warn(...t)},I_=Object.prototype.toString,wo=e=>I_.call(e)==="[object Object]",x_=()=>Date.now(),Sr=()=>+Date.now(),Yo=(e,t,n)=>Math.min(n,Math.max(t,e)),ke=()=>{},D_=(e,t)=>(e=Math.ceil(e),t=Math.floor(t),Math.floor(Math.random()*(t-e+1))+e),dp=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),wi=j_();function j_(){var e,t;return Ve&&((e=window==null?void 0:window.navigator)==null?void 0:e.userAgent)&&(/iP(ad|hone|od)/.test(window.navigator.userAgent)||((t=window==null?void 0:window.navigator)==null?void 0:t.maxTouchPoints)>2&&/iPad|Macintosh/.test(window==null?void 0:window.navigator.userAgent))}function Ar(e,t){function n(...r){return new Promise((s,o)=>{Promise.resolve(e(()=>t.apply(this,r),{fn:t,thisArg:this,args:r})).then(s).catch(o)})}return n}const bo=e=>e();function Hi(e,t={}){let n,r,s=ke;const o=a=>{clearTimeout(a),s(),s=ke};return a=>{const l=O(e),u=O(t.maxWait);return n&&o(n),l<=0||u!==void 0&&u<=0?(r&&(o(r),r=null),Promise.resolve(a())):new Promise((c,f)=>{s=t.rejectOnCancel?f:c,u&&!r&&(r=setTimeout(()=>{n&&o(n),r=null,c(a())},u)),n=setTimeout(()=>{r&&o(r),r=null,c(a())},l)})}}function _o(...e){let t=0,n,r=!0,s=ke,o,i,a,l,u;!we(e[0])&&typeof e[0]=="object"?{delay:i,trailing:a=!0,leading:l=!0,rejectOnCancel:u=!1}=e[0]:[i,a=!0,l=!0,u=!1]=e;const c=()=>{n&&(clearTimeout(n),n=void 0,s(),s=ke)};return d=>{const h=O(i),p=Date.now()-t,g=()=>o=d();return c(),h<=0?(t=Date.now(),g()):(p>h&&(l||!r)?(t=Date.now(),g()):a&&(o=new Promise((y,w)=>{s=u?w:y,n=setTimeout(()=>{t=Date.now(),r=!0,y(g()),c()},Math.max(0,h-p))})),!l&&!n&&(n=setTimeout(()=>r=!0,h)),r=!1,o)}}function Tc(e=bo){const t=S(!0);function n(){t.value=!1}function r(){t.value=!0}const s=(...o)=>{t.value&&e(...o)};return{isActive:ze(t),pause:n,resume:r,eventFilter:s}}const M_={mounted:"mounted",updated:"updated",unmounted:"unmounted"};function hp(e){const t=Object.create(null);return n=>t[n]||(t[n]=e(n))}const N_=/\B([A-Z])/g,F_=hp(e=>e.replace(N_,"-$1").toLowerCase()),$_=/-(\w)/g,pp=hp(e=>e.replace($_,(t,n)=>n?n.toUpperCase():""));function so(e,t=!1,n="Timeout"){return new Promise((r,s)=>{setTimeout(t?()=>s(n):r,e)})}function Pc(e){return e}function vp(e){let t;function n(){return t||(t=e()),t}return n.reset=async()=>{const r=t;t=void 0,r&&await r},n}function U_(e){return e()}function Rc(e,...t){return t.some(n=>n in e)}function mp(e,t){var n;if(typeof e=="number")return e+t;const r=((n=e.match(/^-?[0-9]+\.?[0-9]*/))==null?void 0:n[0])||"",s=e.slice(r.length),o=Number.parseFloat(r)+t;return Number.isNaN(o)?e:o+s}function gp(e,t,n=!1){return t.reduce((r,s)=>(s in e&&(!n||e[s]!==void 0)&&(r[s]=e[s]),r),{})}function yp(e,t,n=!1){return Object.fromEntries(Object.entries(e).filter(([r,s])=>(!n||s!==void 0)&&!t.includes(r)))}function wp(e){return Object.entries(e)}function Eo(e){return e||ut()}function Ue(...e){if(e.length!==1)return tc(...e);const t=e[0];return typeof t=="function"?ze(Pr(()=>({get:t,set:ke}))):S(t)}const H_=Ue;function V_(e,...t){const n=t.flat(),r=n[0];return kc(()=>Object.fromEntries(typeof r=="function"?Object.entries(ni(e)).filter(([s,o])=>r(O(o),s)):n.map(s=>[s,Ue(e,s)])))}function yf(e,t=1e4){return Pr((n,r)=>{let s=O(e),o;const i=()=>setTimeout(()=>{s=O(e),r()},O(t));return he(()=>{clearTimeout(o)}),{get(){return n(),s},set(a){s=a,r(),clearTimeout(o),o=i()}}})}function Vi(e,t=200,n={}){return Ar(Hi(t,n),e)}function Da(e,t=200,n={}){const r=S(e.value),s=Vi(()=>{r.value=e.value},t,n);return q(e,()=>s()),r}function B_(e,t){return D({get(){var n;return(n=e.value)!=null?n:t},set(n){e.value=n}})}function Oc(e,t=200,n=!1,r=!0,s=!1){return Ar(_o(t,n,r,s),e)}function ja(e,t=200,n=!0,r=!0){if(t<=0)return e;const s=S(e.value),o=Oc(()=>{s.value=e.value},t,n,r);return q(e,()=>o()),s}function bp(e,t={}){let n=e,r,s;const o=Pr((d,h)=>(r=d,s=h,{get(){return i()},set(p){a(p)}}));function i(d=!0){return d&&r(),n}function a(d,h=!0){var p,g;if(d===n)return;const y=n;((p=t.onBeforeChange)==null?void 0:p.call(t,d,y))!==!1&&(n=d,(g=t.onChanged)==null||g.call(t,d,y),h&&s())}return ap(o,{get:i,set:a,untrackedGet:()=>i(!1),silentSet:d=>a(d,!1),peek:()=>i(!1),lay:d=>a(d,!1)},{enumerable:!0})}const q_=bp;function W_(...e){if(e.length===2){const[t,n]=e;t.value=n}if(e.length===3){const[t,n,r]=e;t[n]=r}}function ws(e,t,n={}){const{eventFilter:r=bo,...s}=n;return q(e,Ar(r,t),s)}function ds(e,t,n={}){const{eventFilter:r,...s}=n,{eventFilter:o,pause:i,resume:a,isActive:l}=Tc(r);return{stop:ws(e,t,{...s,eventFilter:o}),pause:i,resume:a,isActive:l}}function Cl(e,t,...[n]){const{flush:r="sync",deep:s=!1,immediate:o=!0,direction:i="both",transform:a={}}=n||{},l=[],u="ltr"in a&&a.ltr||(d=>d),c="rtl"in a&&a.rtl||(d=>d);return(i==="both"||i==="ltr")&&l.push(ds(e,d=>{l.forEach(h=>h.pause()),t.value=u(d),l.forEach(h=>h.resume())},{flush:r,deep:s,immediate:o})),(i==="both"||i==="rtl")&&l.push(ds(t,d=>{l.forEach(h=>h.pause()),e.value=c(d),l.forEach(h=>h.resume())},{flush:r,deep:s,immediate:o})),()=>{l.forEach(d=>d.stop())}}function K_(e,t,n={}){const{flush:r="sync",deep:s=!1,immediate:o=!0}=n;return Array.isArray(t)||(t=[t]),q(e,i=>t.forEach(a=>a.value=i),{flush:r,deep:s,immediate:o})}function Ac(e,t={}){if(!we(e))return ni(e);const n=Array.isArray(e.value)?Array.from({length:e.value.length}):{};for(const r in e.value)n[r]=Pr(()=>({get(){return e.value[r]},set(s){var o;if((o=O(t.replaceRef))!=null?o:!0)if(Array.isArray(e.value)){const a=[...e.value];a[r]=s,e.value=a}else{const a={...e.value,[r]:s};Object.setPrototypeOf(a,Object.getPrototypeOf(e.value)),e.value=a}else e.value[r]=s}}));return n}function z_(e,t=!0,n){Eo(n)?xd(e,n):t?e():Be(e)}function _p(e,t){Eo(t)&&fo(e,t)}function qe(e,t=!0,n){Eo()?Rr(e,n):t?e():Be(e)}function Ep(e,t){Eo(t)&&Li(e,t)}function Ll(e,t=!1){function n(f,{flush:d="sync",deep:h=!1,timeout:p,throwOnTimeout:g}={}){let y=null;const m=[new Promise(v=>{y=q(e,b=>{f(b)!==t&&(y==null||y(),v(b))},{flush:d,deep:h,immediate:!0})})];return p!=null&&m.push(so(p,g).then(()=>O(e)).finally(()=>y==null?void 0:y())),Promise.race(m)}function r(f,d){if(!we(f))return n(b=>b===f,d);const{flush:h="sync",deep:p=!1,timeout:g,throwOnTimeout:y}=d??{};let w=null;const v=[new Promise(b=>{w=q([e,f],([E,R])=>{t!==(E===R)&&(w==null||w(),b(E))},{flush:h,deep:p,immediate:!0})})];return g!=null&&v.push(so(g,y).then(()=>O(e)).finally(()=>(w==null||w(),O(e)))),Promise.race(v)}function s(f){return n(d=>!!d,f)}function o(f){return r(null,f)}function i(f){return r(void 0,f)}function a(f){return n(Number.isNaN,f)}function l(f,d){return n(h=>{const p=Array.from(h);return p.includes(f)||p.includes(O(f))},d)}function u(f){return c(1,f)}function c(f=1,d){let h=-1;return n(()=>(h+=1,h>=f),d)}return Array.isArray(O(e))?{toMatch:n,toContains:l,changed:u,changedTimes:c,get not(){return Ll(e,!t)}}:{toMatch:n,toBe:r,toBeTruthy:s,toBeNull:o,toBeNaN:a,toBeUndefined:i,changed:u,changedTimes:c,get not(){return Ll(e,!t)}}}function oo(e){return Ll(e)}function G_(e,t){return e===t}function J_(...e){var t;const n=e[0],r=e[1];let s=(t=e[2])!=null?t:G_;if(typeof s=="string"){const o=s;s=(i,a)=>i[o]===a[o]}return D(()=>O(n).filter(o=>O(r).findIndex(i=>s(o,i))===-1))}function Y_(e,t){return D(()=>O(e).every((n,r,s)=>t(O(n),r,s)))}function X_(e,t){return D(()=>O(e).map(n=>O(n)).filter(t))}function Q_(e,t){return D(()=>O(O(e).find((n,r,s)=>t(O(n),r,s))))}function Z_(e,t){return D(()=>O(e).findIndex((n,r,s)=>t(O(n),r,s)))}function eE(e,t){let n=e.length;for(;n-- >0;)if(t(e[n],n,e))return e[n]}function tE(e,t){return D(()=>O(Array.prototype.findLast?O(e).findLast((n,r,s)=>t(O(n),r,s)):eE(O(e),(n,r,s)=>t(O(n),r,s))))}function nE(e){return wo(e)&&Rc(e,"formIndex","comparator")}function rE(...e){var t;const n=e[0],r=e[1];let s=e[2],o=0;if(nE(s)&&(o=(t=s.fromIndex)!=null?t:0,s=s.comparator),typeof s=="string"){const i=s;s=(a,l)=>a[i]===O(l)}return s=s??((i,a)=>i===O(a)),D(()=>O(n).slice(o).some((i,a,l)=>s(O(i),O(r),a,O(l))))}function sE(e,t){return D(()=>O(e).map(n=>O(n)).join(O(t)))}function oE(e,t){return D(()=>O(e).map(n=>O(n)).map(t))}function iE(e,t,...n){const r=(s,o,i)=>t(O(s),O(o),i);return D(()=>{const s=O(e);return n.length?s.reduce(r,O(n[0])):s.reduce(r)})}function aE(e,t){return D(()=>O(e).some((n,r,s)=>t(O(n),r,s)))}function lE(e){return Array.from(new Set(e))}function cE(e,t){return e.reduce((n,r)=>(n.some(s=>t(r,s,e))||n.push(r),n),[])}function uE(e,t){return D(()=>{const n=O(e).map(r=>O(r));return t?cE(n,t):lE(n)})}function fE(e=0,t={}){let n=oe(e);const r=S(e),{max:s=Number.POSITIVE_INFINITY,min:o=Number.NEGATIVE_INFINITY}=t,i=(f=1)=>r.value=Math.max(Math.min(s,r.value+f),o),a=(f=1)=>r.value=Math.min(Math.max(o,r.value-f),s),l=()=>r.value,u=f=>r.value=Math.max(o,Math.min(s,f));return{count:r,inc:i,dec:a,get:l,set:u,reset:(f=n)=>(n=f,u(f))}}const dE=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,hE=/[YMDHhms]o|\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a{1,2}|A{1,2}|m{1,2}|s{1,2}|Z{1,2}|SSS/g;function pE(e,t,n,r){let s=e<12?"AM":"PM";return r&&(s=s.split("").reduce((o,i)=>o+=`${i}.`,"")),n?s.toLowerCase():s}function sr(e){const t=["th","st","nd","rd"],n=e%100;return e+(t[(n-20)%10]||t[n]||t[0])}function Sp(e,t,n={}){var r;const s=e.getFullYear(),o=e.getMonth(),i=e.getDate(),a=e.getHours(),l=e.getMinutes(),u=e.getSeconds(),c=e.getMilliseconds(),f=e.getDay(),d=(r=n.customMeridiem)!=null?r:pE,h={Yo:()=>sr(s),YY:()=>String(s).slice(-2),YYYY:()=>s,M:()=>o+1,Mo:()=>sr(o+1),MM:()=>`${o+1}`.padStart(2,"0"),MMM:()=>e.toLocaleDateString(n.locales,{month:"short"}),MMMM:()=>e.toLocaleDateString(n.locales,{month:"long"}),D:()=>String(i),Do:()=>sr(i),DD:()=>`${i}`.padStart(2,"0"),H:()=>String(a),Ho:()=>sr(a),HH:()=>`${a}`.padStart(2,"0"),h:()=>`${a%12||12}`.padStart(1,"0"),ho:()=>sr(a%12||12),hh:()=>`${a%12||12}`.padStart(2,"0"),m:()=>String(l),mo:()=>sr(l),mm:()=>`${l}`.padStart(2,"0"),s:()=>String(u),so:()=>sr(u),ss:()=>`${u}`.padStart(2,"0"),SSS:()=>`${c}`.padStart(3,"0"),d:()=>f,dd:()=>e.toLocaleDateString(n.locales,{weekday:"narrow"}),ddd:()=>e.toLocaleDateString(n.locales,{weekday:"short"}),dddd:()=>e.toLocaleDateString(n.locales,{weekday:"long"}),A:()=>d(a,l),AA:()=>d(a,l,!1,!0),a:()=>d(a,l,!0),aa:()=>d(a,l,!0,!0)};return t.replace(hE,(p,g)=>{var y,w;return(w=g??((y=h[p])==null?void 0:y.call(h)))!=null?w:p})}function kp(e){if(e===null)return new Date(Number.NaN);if(e===void 0)return new Date;if(e instanceof Date)return new Date(e);if(typeof e=="string"&&!/Z$/i.test(e)){const t=e.match(dE);if(t){const n=t[2]-1||0,r=(t[7]||"0").substring(0,3);return new Date(t[1],n,t[3]||1,t[4]||0,t[5]||0,t[6]||0,r)}}return new Date(e)}function vE(e,t="HH:mm:ss",n={}){return D(()=>Sp(kp(O(e)),O(t),n))}function tr(e,t=1e3,n={}){const{immediate:r=!0,immediateCallback:s=!1}=n;let o=null;const i=S(!1);function a(){o&&(clearInterval(o),o=null)}function l(){i.value=!1,a()}function u(){const c=O(t);c<=0||(i.value=!0,s&&e(),a(),o=setInterval(e,c))}if(r&&Ve&&u(),we(t)||typeof t=="function"){const c=q(t,()=>{i.value&&Ve&&u()});he(c)}return he(l),{isActive:i,pause:l,resume:u}}function mE(e=1e3,t={}){const{controls:n=!1,immediate:r=!0,callback:s}=t,o=S(0),i=()=>o.value+=1,a=()=>{o.value=0},l=tr(s?()=>{i(),s(o.value)}:i,e,{immediate:r});return n?{counter:o,reset:a,...l}:o}function gE(e,t={}){var n;const r=S((n=t.initialValue)!=null?n:null);return q(e,()=>r.value=Sr(),t),r}function bs(e,t,n={}){const{immediate:r=!0}=n,s=S(!1);let o=null;function i(){o&&(clearTimeout(o),o=null)}function a(){s.value=!1,i()}function l(...u){i(),s.value=!0,o=setTimeout(()=>{s.value=!1,o=null,e(...u)},O(t))}return r&&(s.value=!0,Ve&&l()),he(a),{isPending:ze(s),start:l,stop:a}}function yE(e=1e3,t={}){const{controls:n=!1,callback:r}=t,s=bs(r??ke,e,t),o=D(()=>!s.isPending.value);return n?{ready:o,...s}:o}function wE(e,t={}){const{method:n="parseFloat",radix:r,nanToZero:s}=t;return D(()=>{let o=O(e);return typeof o=="string"&&(o=Number[n](o,r)),s&&Number.isNaN(o)&&(o=0),o})}function bE(e){return D(()=>`${O(e)}`)}function _E(e=!1,t={}){const{truthyValue:n=!0,falsyValue:r=!1}=t,s=we(e),o=S(e);function i(a){if(arguments.length)return o.value=a,o.value;{const l=O(n);return o.value=o.value===l?O(r):l,o.value}}return s?i:[o,i]}function EE(e,t,n){let r=n!=null&&n.immediate?[]:[...e instanceof Function?e():Array.isArray(e)?e:O(e)];return q(e,(s,o,i)=>{const a=Array.from({length:r.length}),l=[];for(const c of s){let f=!1;for(let d=0;d!a[f]);t(s,r,l,u,i),r=[...s]},n)}function SE(e,t,n){const{count:r,...s}=n,o=S(0),i=ws(e,(...a)=>{o.value+=1,o.value>=O(r)&&Be(()=>i()),t(...a)},s);return{count:o,stop:i}}function wf(e,t,n={}){const{debounce:r=0,maxWait:s=void 0,...o}=n;return ws(e,t,{...o,eventFilter:Hi(r,{maxWait:s})})}function kE(e,t,n){return q(e,t,{...n,deep:!0})}function hs(e,t,n={}){const{eventFilter:r=bo,...s}=n,o=Ar(r,t);let i,a,l;if(s.flush==="sync"){const u=S(!1);a=()=>{},i=c=>{u.value=!0,c(),u.value=!1},l=q(e,(...c)=>{u.value||o(...c)},s)}else{const u=[],c=S(0),f=S(0);a=()=>{c.value=f.value},u.push(q(e,()=>{f.value++},{...s,flush:"sync"})),i=d=>{const h=f.value;d(),c.value+=f.value-h},u.push(q(e,(...d)=>{const h=c.value>0&&c.value===f.value;c.value=0,f.value=0,!h&&o(...d)},s)),l=()=>{u.forEach(d=>d())}}return{stop:l,ignoreUpdates:i,ignorePrevAsyncUpdates:a}}function TE(e,t,n){return q(e,t,{...n,immediate:!0})}function PE(e,t,n){const r=q(e,(...s)=>(Be(()=>r()),t(...s)),n);return r}function bf(e,t,n={}){const{throttle:r=0,trailing:s=!0,leading:o=!0,...i}=n;return ws(e,t,{...i,eventFilter:_o(r,s,o)})}function RE(e,t,n={}){let r;function s(){if(!r)return;const c=r;r=void 0,c()}function o(c){r=c}const i=(c,f)=>(s(),t(c,f,o)),a=hs(e,i,n),{ignoreUpdates:l}=a;return{...a,trigger:()=>{let c;return l(()=>{c=i(OE(e),AE(e))}),c}}}function OE(e){return mr(e)?e:Array.isArray(e)?e.map(t=>O(t)):O(e)}function AE(e){return Array.isArray(e)?e.map(()=>{}):void 0}function CE(e,t,n){const r=q(e,(s,o,i)=>{s&&(n!=null&&n.once&&Be(()=>r()),t(s,o,i))},{...n,once:!1});return r}function _f(e,t,n){let r;we(n)?r={evaluating:n}:r=n||{};const{lazy:s=!1,evaluating:o=void 0,shallow:i=!0,onError:a=ke}=r,l=S(!s),u=i?be(t):S(t);let c=0;return wr(async f=>{if(!l.value)return;c++;const d=c;let h=!1;o&&Promise.resolve().then(()=>{o.value=!0});try{const p=await e(g=>{f(()=>{o&&(o.value=!1),h||g()})});d===c&&(u.value=p)}catch(p){a(p)}finally{o&&d===c&&(o.value=!1),h=!0}}),s?D(()=>(l.value=!0,u.value)):u}function LE(e,t,n,r){let s=Ne(e);return n&&(s=Ne(e,n)),r&&(s=Ne(e,n,r)),D(typeof t=="function"?o=>t(s,o):{get:o=>t.get(s,o),set:t.set})}function IE(e={}){const{inheritAttrs:t=!0}=e,n=be(),r=Fe({setup(o,{slots:i}){return()=>{n.value=i.default}}}),s=Fe({inheritAttrs:t,setup(o,{attrs:i,slots:a}){return()=>{var l;n.value;const u=(l=n.value)==null?void 0:l.call(n,{...xE(i),$slots:a});return t&&(u==null?void 0:u.length)===1?u[0]:u}}});return lp({define:r,reuse:s},[r,s])}function xE(e){const t={};for(const n in e)t[pp(n)]=e[n];return t}function DE(e={}){let t=0;const n=S([]);function r(...i){const a=In({key:t++,args:i,promise:void 0,resolve:()=>{},reject:()=>{},isResolving:!1,options:e});return n.value.push(a),a.promise=new Promise((l,u)=>{a.resolve=c=>(a.isResolving=!0,l(c)),a.reject=u}).finally(()=>{a.promise=void 0;const l=n.value.indexOf(a);l!==-1&&n.value.splice(l,1)}),a.promise}function s(...i){return e.singleton&&n.value.length>0?n.value[0].promise:r(...i)}const o=Fe((i,{slots:a})=>{const l=()=>n.value.map(u=>{var c;return nt(Xe,{key:u.key},(c=a.default)==null?void 0:c.call(a,u))});return e.transition?()=>nt(Jg,e.transition,l):l});return o.start=s,o}function jE(e){return function(...t){return e.apply(this,t.map(n=>O(n)))}}function fe(e){var t;const n=O(e);return(t=n==null?void 0:n.$el)!=null?t:n}const te=Ve?window:void 0,rt=Ve?window.document:void 0,ft=Ve?window.navigator:void 0,ME=Ve?window.location:void 0;function j(...e){let t,n,r,s;if(typeof e[0]=="string"||Array.isArray(e[0])?([n,r,s]=e,t=te):[t,n,r,s]=e,!t)return ke;Array.isArray(n)||(n=[n]),Array.isArray(r)||(r=[r]);const o=[],i=()=>{o.forEach(c=>c()),o.length=0},a=(c,f,d,h)=>(c.addEventListener(f,d,h),()=>c.removeEventListener(f,d,h)),l=q(()=>[fe(t),O(s)],([c,f])=>{if(i(),!c)return;const d=wo(f)?{...f}:f;o.push(...n.flatMap(h=>r.map(p=>a(c,h,p,d))))},{immediate:!0,flush:"post"}),u=()=>{l(),i()};return he(u),u}let Ef=!1;function NE(e,t,n={}){const{window:r=te,ignore:s=[],capture:o=!0,detectIframe:i=!1}=n;if(!r)return ke;wi&&!Ef&&(Ef=!0,Array.from(r.document.body.children).forEach(d=>d.addEventListener("click",ke)),r.document.documentElement.addEventListener("click",ke));let a=!0;const l=d=>s.some(h=>{if(typeof h=="string")return Array.from(r.document.querySelectorAll(h)).some(p=>p===d.target||d.composedPath().includes(p));{const p=fe(h);return p&&(d.target===p||d.composedPath().includes(p))}}),c=[j(r,"click",d=>{const h=fe(e);if(!(!h||h===d.target||d.composedPath().includes(h))){if(d.detail===0&&(a=!l(d)),!a){a=!0;return}t(d)}},{passive:!0,capture:o}),j(r,"pointerdown",d=>{const h=fe(e);a=!l(d)&&!!(h&&!d.composedPath().includes(h))},{passive:!0}),i&&j(r,"blur",d=>{setTimeout(()=>{var h;const p=fe(e);((h=r.document.activeElement)==null?void 0:h.tagName)==="IFRAME"&&!(p!=null&&p.contains(r.document.activeElement))&&t(d)},0)})].filter(Boolean);return()=>c.forEach(d=>d())}function FE(e){return typeof e=="function"?e:typeof e=="string"?t=>t.key===e:Array.isArray(e)?t=>e.includes(t.key):()=>!0}function Bi(...e){let t,n,r={};e.length===3?(t=e[0],n=e[1],r=e[2]):e.length===2?typeof e[1]=="object"?(t=!0,n=e[0],r=e[1]):(t=e[0],n=e[1]):(t=!0,n=e[0]);const{target:s=te,eventName:o="keydown",passive:i=!1,dedupe:a=!1}=r,l=FE(t);return j(s,o,c=>{c.repeat&&O(a)||l(c)&&n(c)},i)}function $E(e,t,n={}){return Bi(e,t,{...n,eventName:"keydown"})}function UE(e,t,n={}){return Bi(e,t,{...n,eventName:"keypress"})}function HE(e,t,n={}){return Bi(e,t,{...n,eventName:"keyup"})}const VE=500,BE=10;function qE(e,t,n){var r,s;const o=D(()=>fe(e));let i,a;function l(){i&&(clearTimeout(i),i=void 0),a=void 0}function u(p){var g,y,w,m;(g=n==null?void 0:n.modifiers)!=null&&g.self&&p.target!==o.value||(l(),(y=n==null?void 0:n.modifiers)!=null&&y.prevent&&p.preventDefault(),(w=n==null?void 0:n.modifiers)!=null&&w.stop&&p.stopPropagation(),a={x:p.x,y:p.y},i=setTimeout(()=>t(p),(m=n==null?void 0:n.delay)!=null?m:VE))}function c(p){var g,y,w,m;if((g=n==null?void 0:n.modifiers)!=null&&g.self&&p.target!==o.value||!a||(n==null?void 0:n.distanceThreshold)===!1)return;(y=n==null?void 0:n.modifiers)!=null&&y.prevent&&p.preventDefault(),(w=n==null?void 0:n.modifiers)!=null&&w.stop&&p.stopPropagation();const v=p.x-a.x,b=p.y-a.y;Math.sqrt(v*v+b*b)>=((m=n==null?void 0:n.distanceThreshold)!=null?m:BE)&&l()}const f={capture:(r=n==null?void 0:n.modifiers)==null?void 0:r.capture,once:(s=n==null?void 0:n.modifiers)==null?void 0:s.once},d=[j(o,"pointerdown",u,f),j(o,"pointermove",c,f),j(o,["pointerup","pointerleave"],l,f)];return()=>d.forEach(p=>p())}function WE(){const{activeElement:e,body:t}=document;if(!e||e===t)return!1;switch(e.tagName){case"INPUT":case"TEXTAREA":return!0}return e.hasAttribute("contenteditable")}function KE({keyCode:e,metaKey:t,ctrlKey:n,altKey:r}){return t||n||r?!1:e>=48&&e<=57||e>=65&&e<=90||e>=97&&e<=122}function zE(e,t={}){const{document:n=rt}=t;n&&j(n,"keydown",s=>{!WE()&&KE(s)&&e(s)},{passive:!0})}function GE(e,t=null){const n=ut();let r=()=>{};const s=Pr((o,i)=>(r=i,{get(){var a,l;return o(),(l=(a=n==null?void 0:n.proxy)==null?void 0:a.$refs[e])!=null?l:t},set(){}}));return qe(r),uo(r),s}function Tp(e={}){var t;const{window:n=te,deep:r=!0}=e,s=(t=e.document)!=null?t:n==null?void 0:n.document,o=()=>{var l;let u=s==null?void 0:s.activeElement;if(r)for(;u!=null&&u.shadowRoot;)u=(l=u==null?void 0:u.shadowRoot)==null?void 0:l.activeElement;return u},i=S(),a=()=>{i.value=o()};return n&&(j(n,"blur",l=>{l.relatedTarget===null&&a()},!0),j(n,"focus",a,!0)),a(),i}function Pp(){const e=S(!1),t=ut();return t&&Rr(()=>{e.value=!0},t),e}function me(e){const t=Pp();return D(()=>(t.value,!!e()))}function Cr(e,t={}){const{immediate:n=!0,fpsLimit:r=void 0,window:s=te}=t,o=S(!1),i=r?1e3/r:null;let a=0,l=null;function u(d){if(!o.value||!s)return;a||(a=d);const h=d-a;if(i&&h{console.error(M)}}=r,d=me(()=>o&&HTMLElement&&"animate"in HTMLElement.prototype),h=be(void 0),p=In({startTime:null,currentTime:null,timeline:null,playbackRate:u,pending:!1,playState:i?"idle":"paused",replaceState:"active"}),g=D(()=>p.pending),y=D(()=>p.playState),w=D(()=>p.replaceState),m=D({get(){return p.startTime},set(M){p.startTime=M,h.value&&(h.value.startTime=M)}}),v=D({get(){return p.currentTime},set(M){p.currentTime=M,h.value&&(h.value.currentTime=M,ie())}}),b=D({get(){return p.timeline},set(M){p.timeline=M,h.value&&(h.value.timeline=M)}}),E=D({get(){return p.playbackRate},set(M){p.playbackRate=M,h.value&&(h.value.playbackRate=M)}}),R=()=>{if(h.value)try{h.value.play(),ie()}catch(M){ne(),f(M)}else L()},k=()=>{var M;try{(M=h.value)==null||M.pause(),ne()}catch(Y){f(Y)}},C=()=>{var M;!h.value&&L();try{(M=h.value)==null||M.reverse(),ie()}catch(Y){ne(),f(Y)}},A=()=>{var M;try{(M=h.value)==null||M.finish(),ne()}catch(Y){f(Y)}},T=()=>{var M;try{(M=h.value)==null||M.cancel(),ne()}catch(Y){f(Y)}};q(()=>fe(e),M=>{M&&L()}),q(()=>t,M=>{!h.value&&L(),!fe(e)&&h.value&&(h.value.effect=new KeyframeEffect(fe(e),O(M),s))},{deep:!0}),qe(()=>{Be(()=>L(!0))}),he(T);function L(M){const Y=fe(e);!d.value||!Y||(h.value||(h.value=Y.animate(O(t),s)),a&&h.value.commitStyles(),l&&h.value.persist(),u!==1&&(h.value.playbackRate=u),M&&!i?h.value.pause():ie(),c==null||c(h.value))}j(h,["cancel","finish","remove"],ne);const{resume:x,pause:W}=Cr(()=>{h.value&&(p.pending=h.value.pending,p.playState=h.value.playState,p.replaceState=h.value.replaceState,p.startTime=h.value.startTime,p.currentTime=h.value.currentTime,p.timeline=h.value.timeline,p.playbackRate=h.value.playbackRate)},{immediate:!1});function ie(){d.value&&x()}function ne(){d.value&&o&&o.requestAnimationFrame(W)}return{isSupported:d,animate:h,play:R,pause:k,reverse:C,finish:A,cancel:T,pending:g,playState:y,replaceState:w,startTime:m,currentTime:v,timeline:b,playbackRate:E}}function YE(e,t){const{interrupt:n=!0,onError:r=ke,onFinished:s=ke,signal:o}=t||{},i={aborted:"aborted",fulfilled:"fulfilled",pending:"pending",rejected:"rejected"},a=Array.from(Array.from({length:e.length}),()=>({state:i.pending,data:null})),l=Ee(a),u=S(-1);if(!e||e.length===0)return s(),{activeIndex:u,result:l};function c(f,d){u.value++,l[u.value].data=d,l[u.value].state=f}return e.reduce((f,d)=>f.then(h=>{var p;if(o!=null&&o.aborted){c(i.aborted,new Error("aborted"));return}if(((p=l[u.value])==null?void 0:p.state)===i.rejected&&n){s();return}const g=d(h).then(y=>(c(i.fulfilled,y),u.value===e.length-1&&s(),y));return o?Promise.race([g,XE(o)]):g}).catch(h=>o!=null&&o.aborted?(c(i.aborted,h),h):(c(i.rejected,h),r(),h)),Promise.resolve()),{activeIndex:u,result:l}}function XE(e){return new Promise((t,n)=>{const r=new Error("aborted");e.aborted?n(r):e.addEventListener("abort",()=>n(r),{once:!0})})}function Rp(e,t,n){const{immediate:r=!0,delay:s=0,onError:o=ke,onSuccess:i=ke,resetOnExecute:a=!0,shallow:l=!0,throwError:u}=n??{},c=l?be(t):S(t),f=S(!1),d=S(!1),h=be(void 0);async function p(w=0,...m){a&&(c.value=t),h.value=void 0,f.value=!1,d.value=!0,w>0&&await so(w);const v=typeof e=="function"?e(...m):e;try{const b=await v;c.value=b,f.value=!0,i(b)}catch(b){if(h.value=b,o(b),u)throw b}finally{d.value=!1}return c.value}r&&p(s);const g={state:c,isReady:f,isLoading:d,error:h,execute:p};function y(){return new Promise((w,m)=>{oo(d).toBe(!1).then(()=>w(g)).catch(m)})}return{...g,then(w,m){return y().then(w,m)}}}const Rs={array:e=>JSON.stringify(e),object:e=>JSON.stringify(e),set:e=>JSON.stringify(Array.from(e)),map:e=>JSON.stringify(Object.fromEntries(e)),null:()=>""};function QE(e){return e?e instanceof Map?Rs.map:e instanceof Set?Rs.set:Array.isArray(e)?Rs.array:Rs.object:Rs.null}function ZE(e,t){const n=S(""),r=S();function s(){if(Ve)return r.value=new Promise((o,i)=>{try{const a=O(e);if(a==null)o("");else if(typeof a=="string")o(Ma(new Blob([a],{type:"text/plain"})));else if(a instanceof Blob)o(Ma(a));else if(a instanceof ArrayBuffer)o(window.btoa(String.fromCharCode(...new Uint8Array(a))));else if(a instanceof HTMLCanvasElement)o(a.toDataURL(t==null?void 0:t.type,t==null?void 0:t.quality));else if(a instanceof HTMLImageElement){const l=a.cloneNode(!1);l.crossOrigin="Anonymous",eS(l).then(()=>{const u=document.createElement("canvas"),c=u.getContext("2d");u.width=l.width,u.height=l.height,c.drawImage(l,0,0,u.width,u.height),o(u.toDataURL(t==null?void 0:t.type,t==null?void 0:t.quality))}).catch(i)}else if(typeof a=="object"){const u=((t==null?void 0:t.serializer)||QE(a))(a);return o(Ma(new Blob([u],{type:"application/json"})))}else i(new Error("target is unsupported types"))}catch(a){i(a)}}),r.value.then(o=>n.value=o),r.value}return we(e)||typeof e=="function"?q(e,s,{immediate:!0}):s(),{base64:n,promise:r,execute:s}}function eS(e){return new Promise((t,n)=>{e.complete?t():(e.onload=()=>{t()},e.onerror=n)})}function Ma(e){return new Promise((t,n)=>{const r=new FileReader;r.onload=s=>{t(s.target.result)},r.onerror=n,r.readAsDataURL(e)})}function tS(e={}){const{navigator:t=ft}=e,n=["chargingchange","chargingtimechange","dischargingtimechange","levelchange"],r=me(()=>t&&"getBattery"in t&&typeof t.getBattery=="function"),s=S(!1),o=S(0),i=S(0),a=S(1);let l;function u(){s.value=this.charging,o.value=this.chargingTime||0,i.value=this.dischargingTime||0,a.value=this.level}return r.value&&t.getBattery().then(c=>{l=c,u.call(l),j(l,n,u,{passive:!0})}),{isSupported:r,charging:s,chargingTime:o,dischargingTime:i,level:a}}function nS(e){let{acceptAllDevices:t=!1}=e||{};const{filters:n=void 0,optionalServices:r=void 0,navigator:s=ft}=e||{},o=me(()=>s&&"bluetooth"in s),i=be(void 0),a=be(null);q(i,()=>{f()});async function l(){if(o.value){a.value=null,n&&n.length>0&&(t=!1);try{i.value=await(s==null?void 0:s.bluetooth.requestDevice({acceptAllDevices:t,filters:n,optionalServices:r}))}catch(d){a.value=d}}}const u=S(),c=D(()=>{var d;return((d=u.value)==null?void 0:d.connected)||!1});async function f(){if(a.value=null,i.value&&i.value.gatt){i.value.addEventListener("gattserverdisconnected",()=>{});try{u.value=await i.value.gatt.connect()}catch(d){a.value=d}}}return qe(()=>{var d;i.value&&((d=i.value.gatt)==null||d.connect())}),he(()=>{var d;i.value&&((d=i.value.gatt)==null||d.disconnect())}),{isSupported:o,isConnected:c,device:i,requestDevice:l,server:u,error:a}}function at(e,t={}){const{window:n=te}=t,r=me(()=>n&&"matchMedia"in n&&typeof n.matchMedia=="function");let s;const o=S(!1),i=u=>{o.value=u.matches},a=()=>{s&&("removeEventListener"in s?s.removeEventListener("change",i):s.removeListener(i))},l=wr(()=>{r.value&&(a(),s=n.matchMedia(O(e)),"addEventListener"in s?s.addEventListener("change",i):s.addListener(i),o.value=s.matches)});return he(()=>{l(),a(),s=void 0}),o}const rS={sm:640,md:768,lg:1024,xl:1280,"2xl":1536},sS={xs:0,sm:576,md:768,lg:992,xl:1200,xxl:1400},Op={xs:0,sm:600,md:960,lg:1264,xl:1904},oS={xs:0,sm:600,md:960,lg:1280,xl:1920,xxl:2560},iS=Op,aS={xs:480,sm:576,md:768,lg:992,xl:1200,xxl:1600},lS={xs:0,sm:600,md:1024,lg:1440,xl:1920},cS={mobileS:320,mobileM:375,mobileL:425,tablet:768,laptop:1024,laptopL:1440,desktop4K:2560},uS={"3xs":360,"2xs":480,xs:600,sm:768,md:1024,lg:1280,xl:1440,"2xl":1600,"3xl":1920,"4xl":2560},fS={sm:576,md:768,lg:992,xl:1200};function dS(e,t={}){function n(c,f){let d=O(e[O(c)]);return f!=null&&(d=mp(d,f)),typeof d=="number"&&(d=`${d}px`),d}const{window:r=te,strategy:s="min-width"}=t;function o(c){return r?r.matchMedia(c).matches:!1}const i=c=>at(()=>`(min-width: ${n(c)})`,t),a=c=>at(()=>`(max-width: ${n(c)})`,t),l=Object.keys(e).reduce((c,f)=>(Object.defineProperty(c,f,{get:()=>s==="min-width"?i(f):a(f),enumerable:!0,configurable:!0}),c),{});function u(){const c=Object.keys(e).map(f=>[f,i(f)]);return D(()=>c.filter(([,f])=>f.value).map(([f])=>f))}return Object.assign(l,{greaterOrEqual:i,smallerOrEqual:a,greater(c){return at(()=>`(min-width: ${n(c,.1)})`,t)},smaller(c){return at(()=>`(max-width: ${n(c,-.1)})`,t)},between(c,f){return at(()=>`(min-width: ${n(c)}) and (max-width: ${n(f,-.1)})`,t)},isGreater(c){return o(`(min-width: ${n(c,.1)})`)},isGreaterOrEqual(c){return o(`(min-width: ${n(c)})`)},isSmaller(c){return o(`(max-width: ${n(c,-.1)})`)},isSmallerOrEqual(c){return o(`(max-width: ${n(c)})`)},isInBetween(c,f){return o(`(min-width: ${n(c)}) and (max-width: ${n(f,-.1)})`)},current:u,active(){const c=u();return D(()=>c.value.length===0?"":c.value.at(-1))}})}function hS(e){const{name:t,window:n=te}=e,r=me(()=>n&&"BroadcastChannel"in n),s=S(!1),o=S(),i=S(),a=be(null),l=c=>{o.value&&o.value.postMessage(c)},u=()=>{o.value&&o.value.close(),s.value=!0};return r.value&&qe(()=>{a.value=null,o.value=new BroadcastChannel(t),o.value.addEventListener("message",c=>{i.value=c.data},{passive:!0}),o.value.addEventListener("messageerror",c=>{a.value=c},{passive:!0}),o.value.addEventListener("close",()=>{s.value=!0})}),he(()=>{u()}),{isSupported:r,channel:o,data:i,post:l,close:u,error:a,isClosed:s}}const Sf=["hash","host","hostname","href","pathname","port","protocol","search"];function pS(e={}){const{window:t=te}=e,n=Object.fromEntries(Sf.map(o=>[o,S()]));for(const[o,i]of wp(n))q(i,a=>{!(t!=null&&t.location)||t.location[o]===a||(t.location[o]=a)});const r=o=>{var i;const{state:a,length:l}=(t==null?void 0:t.history)||{},{origin:u}=(t==null?void 0:t.location)||{};for(const c of Sf)n[c].value=(i=t==null?void 0:t.location)==null?void 0:i[c];return Ee({trigger:o,state:a,length:l,origin:u,...n})},s=S(r("load"));return t&&(j(t,"popstate",()=>s.value=r("popstate"),{passive:!0}),j(t,"hashchange",()=>s.value=r("hashchange"),{passive:!0})),s}function vS(e,t=(r,s)=>r===s,n){const r=S(e.value);return q(()=>e.value,s=>{t(s,r.value)||(r.value=s)},n),r}function bi(e,t={}){const{controls:n=!1,navigator:r=ft}=t,s=me(()=>r&&"permissions"in r);let o;const i=typeof e=="string"?{name:e}:e,a=S(),l=()=>{o&&(a.value=o.state)},u=vp(async()=>{if(s.value){if(!o)try{o=await r.permissions.query(i),j(o,"change",l),l()}catch{a.value="prompt"}return o}});return u(),n?{state:a,isSupported:s,query:u}:a}function mS(e={}){const{navigator:t=ft,read:n=!1,source:r,copiedDuring:s=1500,legacy:o=!1}=e,i=me(()=>t&&"clipboard"in t),a=bi("clipboard-read"),l=bi("clipboard-write"),u=D(()=>i.value||o),c=S(""),f=S(!1),d=bs(()=>f.value=!1,s);function h(){i.value&&w(a.value)?t.clipboard.readText().then(m=>{c.value=m}):c.value=y()}u.value&&n&&j(["copy","cut"],h);async function p(m=O(r)){u.value&&m!=null&&(i.value&&w(l.value)?await t.clipboard.writeText(m):g(m),c.value=m,f.value=!0,d.start())}function g(m){const v=document.createElement("textarea");v.value=m??"",v.style.position="absolute",v.style.opacity="0",document.body.appendChild(v),v.select(),document.execCommand("copy"),v.remove()}function y(){var m,v,b;return(b=(v=(m=document==null?void 0:document.getSelection)==null?void 0:m.call(document))==null?void 0:v.toString())!=null?b:""}function w(m){return m==="granted"||m==="prompt"}return{isSupported:u,text:c,copied:f,copy:p}}function gS(e={}){const{navigator:t=ft,read:n=!1,source:r,copiedDuring:s=1500}=e,o=me(()=>t&&"clipboard"in t),i=S([]),a=S(!1),l=bs(()=>a.value=!1,s);function u(){o.value&&t.clipboard.read().then(f=>{i.value=f})}o.value&&n&&j(["copy","cut"],u);async function c(f=O(r)){o.value&&f!=null&&(await t.clipboard.write(f),i.value=f,a.value=!0,l.start())}return{isSupported:o,content:i,copied:a,copy:c}}function So(e){return JSON.parse(JSON.stringify(e))}function yS(e,t={}){const n=S({}),{manual:r,clone:s=So,deep:o=!0,immediate:i=!0}=t;function a(){n.value=s(O(e))}return!r&&(we(e)||typeof e=="function")?q(e,a,{...t,deep:o,immediate:i}):a(),{cloned:n,sync:a}}const Fo=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},$o="__vueuse_ssr_handlers__",Ap=wS();function wS(){return $o in Fo||(Fo[$o]=Fo[$o]||{}),Fo[$o]}function qi(e,t){return Ap[e]||t}function bS(e,t){Ap[e]=t}function Cp(e){return e==null?"any":e instanceof Set?"set":e instanceof Map?"map":e instanceof Date?"date":typeof e=="boolean"?"boolean":typeof e=="string"?"string":typeof e=="object"?"object":Number.isNaN(e)?"any":"number"}const Cc={boolean:{read:e=>e==="true",write:e=>String(e)},object:{read:e=>JSON.parse(e),write:e=>JSON.stringify(e)},number:{read:e=>Number.parseFloat(e),write:e=>String(e)},any:{read:e=>e,write:e=>String(e)},string:{read:e=>e,write:e=>String(e)},map:{read:e=>new Map(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e.entries()))},set:{read:e=>new Set(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e))},date:{read:e=>new Date(e),write:e=>e.toISOString()}},Il="vueuse-storage";function Wi(e,t,n,r={}){var s;const{flush:o="pre",deep:i=!0,listenToStorageChanges:a=!0,writeDefaults:l=!0,mergeDefaults:u=!1,shallow:c,window:f=te,eventFilter:d,onError:h=T=>{console.error(T)},initOnMounted:p}=r,g=(c?be:S)(typeof t=="function"?t():t);if(!n)try{n=qi("getDefaultStorage",()=>{var T;return(T=te)==null?void 0:T.localStorage})()}catch(T){h(T)}if(!n)return g;const y=O(t),w=Cp(y),m=(s=r.serializer)!=null?s:Cc[w],{pause:v,resume:b}=ds(g,()=>R(g.value),{flush:o,deep:i,eventFilter:d});f&&a&&qe(()=>{j(f,"storage",C),j(f,Il,A),p&&C()}),p||C();function E(T,L){f&&f.dispatchEvent(new CustomEvent(Il,{detail:{key:e,oldValue:T,newValue:L,storageArea:n}}))}function R(T){try{const L=n.getItem(e);if(T==null)E(L,null),n.removeItem(e);else{const x=m.write(T);L!==x&&(n.setItem(e,x),E(L,x))}}catch(L){h(L)}}function k(T){const L=T?T.newValue:n.getItem(e);if(L==null)return l&&y!=null&&n.setItem(e,m.write(y)),y;if(!T&&u){const x=m.read(L);return typeof u=="function"?u(x,y):w==="object"&&!Array.isArray(x)?{...y,...x}:x}else return typeof L!="string"?L:m.read(L)}function C(T){if(!(T&&T.storageArea!==n)){if(T&&T.key==null){g.value=y;return}if(!(T&&T.key!==e)){v();try{(T==null?void 0:T.newValue)!==m.write(g.value)&&(g.value=k(T))}catch(L){h(L)}finally{T?Be(b):b()}}}}function A(T){C(T.detail)}return g}function Lc(e){return at("(prefers-color-scheme: dark)",e)}function Lp(e={}){const{selector:t="html",attribute:n="class",initialValue:r="auto",window:s=te,storage:o,storageKey:i="vueuse-color-scheme",listenToStorageChanges:a=!0,storageRef:l,emitAuto:u,disableTransition:c=!0}=e,f={auto:"",light:"light",dark:"dark",...e.modes||{}},d=Lc({window:s}),h=D(()=>d.value?"dark":"light"),p=l||(i==null?Ue(r):Wi(i,r,o,{window:s,listenToStorageChanges:a})),g=D(()=>p.value==="auto"?h.value:p.value),y=qi("updateHTMLAttrs",(b,E,R)=>{const k=typeof b=="string"?s==null?void 0:s.document.querySelector(b):fe(b);if(!k)return;let C;if(c&&(C=s.document.createElement("style"),C.appendChild(document.createTextNode("*,*::before,*::after{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),s.document.head.appendChild(C)),E==="class"){const A=R.split(/\s/g);Object.values(f).flatMap(T=>(T||"").split(/\s/g)).filter(Boolean).forEach(T=>{A.includes(T)?k.classList.add(T):k.classList.remove(T)})}else k.setAttribute(E,R);c&&(s.getComputedStyle(C).opacity,document.head.removeChild(C))});function w(b){var E;y(t,n,(E=f[b])!=null?E:b)}function m(b){e.onChanged?e.onChanged(b,w):w(b)}q(g,m,{flush:"post",immediate:!0}),qe(()=>m(g.value));const v=D({get(){return u?p.value:g.value},set(b){p.value=b}});try{return Object.assign(v,{store:p,system:h,state:g})}catch{return v}}function _S(e=S(!1)){const t=et(),n=et(),r=et();let s=ke;const o=l=>(r.trigger(l),e.value=!0,new Promise(u=>{s=u})),i=l=>{e.value=!1,t.trigger(l),s({data:l,isCanceled:!1})},a=l=>{e.value=!1,n.trigger(l),s({data:l,isCanceled:!0})};return{isRevealed:D(()=>e.value),reveal:o,confirm:i,cancel:a,onReveal:r.on,onConfirm:t.on,onCancel:n.on}}function ko(e,t,n={}){const{window:r=te,...s}=n;let o;const i=me(()=>r&&"MutationObserver"in r),a=()=>{o&&(o.disconnect(),o=void 0)},l=D(()=>{const d=O(e),h=(Array.isArray(d)?d:[d]).map(fe).filter(Ui);return new Set(h)}),u=q(()=>l.value,d=>{a(),i.value&&r&&d.size&&(o=new MutationObserver(t),d.forEach(h=>o.observe(h,s)))},{immediate:!0,flush:"post"}),c=()=>o==null?void 0:o.takeRecords(),f=()=>{a(),u()};return he(f),{isSupported:i,stop:f,takeRecords:c}}function Ds(e,t,n={}){const{window:r=te,initialValue:s="",observe:o=!1}=n,i=S(s),a=D(()=>{var u;return fe(t)||((u=r==null?void 0:r.document)==null?void 0:u.documentElement)});function l(){var u;const c=O(e),f=O(a);if(f&&r){const d=(u=r.getComputedStyle(f).getPropertyValue(c))==null?void 0:u.trim();i.value=d||s}}return o&&ko(a,l,{attributeFilter:["style","class"],window:r}),q([a,()=>O(e)],l,{immediate:!0}),q(i,u=>{var c;(c=a.value)!=null&&c.style&&a.value.style.setProperty(O(e),u)}),i}function Ip(e){const t=ut(),n=Ol(()=>null,()=>e?fe(e):t.proxy.$el);return uo(n.trigger),Rr(n.trigger),n}function ES(e,t){const n=be(u()),r=Ue(e),s=D({get(){var c;const f=r.value;let d=t!=null&&t.getIndexOf?t.getIndexOf(n.value,f):f.indexOf(n.value);return d<0&&(d=(c=t==null?void 0:t.fallbackIndex)!=null?c:0),d},set(c){o(c)}});function o(c){const f=r.value,d=f.length,h=(c%d+d)%d,p=f[h];return n.value=p,p}function i(c=1){return o(s.value+c)}function a(c=1){return i(c)}function l(c=1){return i(-c)}function u(){var c,f;return(f=O((c=t==null?void 0:t.initialValue)!=null?c:O(e)[0]))!=null?f:void 0}return q(r,()=>o(s.value)),{state:n,index:s,next:a,prev:l,go:o}}function SS(e={}){const{valueDark:t="dark",valueLight:n="",window:r=te}=e,s=Lp({...e,onChanged:(a,l)=>{var u;e.onChanged?(u=e.onChanged)==null||u.call(e,a==="dark",l,a):l(a)},modes:{dark:t,light:n}}),o=D(()=>s.system?s.system.value:Lc({window:r}).value?"dark":"light");return D({get(){return s.value==="dark"},set(a){const l=a?"dark":"light";o.value===l?s.value="auto":s.value=l}})}function xp(e){return e}function kS(e,t){return e.value=t}function TS(e){return e?typeof e=="function"?e:So:xp}function PS(e){return e?typeof e=="function"?e:So:xp}function Dp(e,t={}){const{clone:n=!1,dump:r=TS(n),parse:s=PS(n),setSource:o=kS}=t;function i(){return Ql({snapshot:r(e.value),timestamp:Sr()})}const a=S(i()),l=S([]),u=S([]),c=v=>{o(e,s(v.snapshot)),a.value=v},f=()=>{l.value.unshift(a.value),a.value=i(),t.capacity&&l.value.length>t.capacity&&l.value.splice(t.capacity,Number.POSITIVE_INFINITY),u.value.length&&u.value.splice(0,u.value.length)},d=()=>{l.value.splice(0,l.value.length),u.value.splice(0,u.value.length)},h=()=>{const v=l.value.shift();v&&(u.value.unshift(a.value),c(v))},p=()=>{const v=u.value.shift();v&&(l.value.unshift(a.value),c(v))},g=()=>{c(a.value)},y=D(()=>[a.value,...l.value]),w=D(()=>l.value.length>0),m=D(()=>u.value.length>0);return{source:e,undoStack:l,redoStack:u,last:a,history:y,canUndo:w,canRedo:m,clear:d,commit:f,reset:g,undo:h,redo:p}}function Ic(e,t={}){const{deep:n=!1,flush:r="pre",eventFilter:s}=t,{eventFilter:o,pause:i,resume:a,isActive:l}=Tc(s),{ignoreUpdates:u,ignorePrevAsyncUpdates:c,stop:f}=hs(e,y,{deep:n,flush:r,eventFilter:o});function d(b,E){c(),u(()=>{b.value=E})}const h=Dp(e,{...t,clone:t.clone||n,setSource:d}),{clear:p,commit:g}=h;function y(){c(),g()}function w(b){a(),b&&y()}function m(b){let E=!1;const R=()=>E=!0;u(()=>{b(R)}),E||y()}function v(){f(),p()}return{...h,isTracking:l,pause:i,resume:w,commit:y,batch:m,dispose:v}}function RS(e,t={}){const n=t.debounce?Hi(t.debounce):void 0;return{...Ic(e,{...t,eventFilter:n})}}function OS(e={}){const{window:t=te,eventFilter:n=bo}=e,r=S({x:null,y:null,z:null}),s=S({alpha:null,beta:null,gamma:null}),o=S(0),i=S({x:null,y:null,z:null});if(t){const a=Ar(n,l=>{r.value=l.acceleration,i.value=l.accelerationIncludingGravity,s.value=l.rotationRate,o.value=l.interval});j(t,"devicemotion",a)}return{acceleration:r,accelerationIncludingGravity:i,rotationRate:s,interval:o}}function jp(e={}){const{window:t=te}=e,n=me(()=>t&&"DeviceOrientationEvent"in t),r=S(!1),s=S(null),o=S(null),i=S(null);return t&&n.value&&j(t,"deviceorientation",a=>{r.value=a.absolute,s.value=a.alpha,o.value=a.beta,i.value=a.gamma}),{isSupported:n,isAbsolute:r,alpha:s,beta:o,gamma:i}}function AS(e={}){const{window:t=te}=e,n=S(1);if(t){let r=function(){n.value=t.devicePixelRatio,s(),o=t.matchMedia(`(resolution: ${n.value}dppx)`),o.addEventListener("change",r,{once:!0})},s=function(){o==null||o.removeEventListener("change",r)},o;r(),he(s)}return{pixelRatio:n}}function CS(e={}){const{navigator:t=ft,requestPermissions:n=!1,constraints:r={audio:!0,video:!0},onUpdated:s}=e,o=S([]),i=D(()=>o.value.filter(p=>p.kind==="videoinput")),a=D(()=>o.value.filter(p=>p.kind==="audioinput")),l=D(()=>o.value.filter(p=>p.kind==="audiooutput")),u=me(()=>t&&t.mediaDevices&&t.mediaDevices.enumerateDevices),c=S(!1);let f;async function d(){u.value&&(o.value=await t.mediaDevices.enumerateDevices(),s==null||s(o.value),f&&(f.getTracks().forEach(p=>p.stop()),f=null))}async function h(){if(!u.value)return!1;if(c.value)return!0;const{state:p,query:g}=bi("camera",{controls:!0});return await g(),p.value!=="granted"&&(f=await t.mediaDevices.getUserMedia(r),d()),c.value=!0,c.value}return u.value&&(n&&h(),j(t.mediaDevices,"devicechange",d),d()),{devices:o,ensurePermissions:h,permissionGranted:c,videoInputs:i,audioInputs:a,audioOutputs:l,isSupported:u}}function LS(e={}){var t;const n=S((t=e.enabled)!=null?t:!1),r=e.video,s=e.audio,{navigator:o=ft}=e,i=me(()=>{var h;return(h=o==null?void 0:o.mediaDevices)==null?void 0:h.getDisplayMedia}),a={audio:s,video:r},l=be();async function u(){if(!(!i.value||l.value))return l.value=await o.mediaDevices.getDisplayMedia(a),l.value}async function c(){var h;(h=l.value)==null||h.getTracks().forEach(p=>p.stop()),l.value=void 0}function f(){c(),n.value=!1}async function d(){return await u(),l.value&&(n.value=!0),l.value}return q(n,h=>{h?u():c()},{immediate:!0}),{isSupported:i,stream:l,start:d,stop:f,enabled:n}}function IS(e={}){const{document:t=rt}=e;if(!t)return S("visible");const n=S(t.visibilityState);return j(t,"visibilitychange",()=>{n.value=t.visibilityState}),n}function xS(e,t={}){var n,r;const{pointerTypes:s,preventDefault:o,stopPropagation:i,exact:a,onMove:l,onEnd:u,onStart:c,initialValue:f,axis:d="both",draggingElement:h=te,containerElement:p,handle:g=e}=t,y=S((n=O(f))!=null?n:{x:0,y:0}),w=S(),m=k=>s?s.includes(k.pointerType):!0,v=k=>{O(o)&&k.preventDefault(),O(i)&&k.stopPropagation()},b=k=>{var C;if(O(t.disabled)||!m(k)||O(a)&&k.target!==O(e))return;const A=O(p),T=(C=A==null?void 0:A.getBoundingClientRect)==null?void 0:C.call(A),L=O(e).getBoundingClientRect(),x={x:k.clientX-(A?L.left-T.left+A.scrollLeft:L.left),y:k.clientY-(A?L.top-T.top+A.scrollTop:L.top)};(c==null?void 0:c(x,k))!==!1&&(w.value=x,v(k))},E=k=>{if(O(t.disabled)||!m(k)||!w.value)return;const C=O(p),A=O(e).getBoundingClientRect();let{x:T,y:L}=y.value;(d==="x"||d==="both")&&(T=k.clientX-w.value.x,C&&(T=Math.min(Math.max(0,T),C.scrollWidth-A.width))),(d==="y"||d==="both")&&(L=k.clientY-w.value.y,C&&(L=Math.min(Math.max(0,L),C.scrollHeight-A.height))),y.value={x:T,y:L},l==null||l(y.value,k),v(k)},R=k=>{O(t.disabled)||!m(k)||w.value&&(w.value=void 0,u==null||u(y.value,k),v(k))};if(Ve){const k={capture:(r=t.capture)!=null?r:!0};j(g,"pointerdown",b,k),j(h,"pointermove",E,k),j(h,"pointerup",R,k)}return{...Ac(y),position:y,isDragging:D(()=>!!w.value),style:D(()=>`left:${y.value.x}px;top:${y.value.y}px;`)}}function DS(e,t={}){const n=S(!1),r=be(null);let s=0,o=!0;if(Ve){const i=typeof t=="function"?{onDrop:t}:t,a=l=>{var u,c;const f=Array.from((c=(u=l.dataTransfer)==null?void 0:u.files)!=null?c:[]);return r.value=f.length===0?null:f};j(e,"dragenter",l=>{var u,c;const f=Array.from(((u=l==null?void 0:l.dataTransfer)==null?void 0:u.items)||[]).map(d=>d.kind==="file"?d.type:null).filter(Ui);if(i.dataTypes&&l.dataTransfer){const d=oe(i.dataTypes);if(o=typeof d=="function"?d(f):d?d.some(h=>f.includes(h)):!0,!o)return}l.preventDefault(),s+=1,n.value=!0,(c=i.onEnter)==null||c.call(i,a(l),l)}),j(e,"dragover",l=>{var u;o&&(l.preventDefault(),(u=i.onOver)==null||u.call(i,a(l),l))}),j(e,"dragleave",l=>{var u;o&&(l.preventDefault(),s-=1,s===0&&(n.value=!1),(u=i.onLeave)==null||u.call(i,a(l),l))}),j(e,"drop",l=>{var u;l.preventDefault(),s=0,n.value=!1,(u=i.onDrop)==null||u.call(i,a(l),l)})}return{files:r,isOverDropZone:n}}function Ki(e,t,n={}){const{window:r=te,...s}=n;let o;const i=me(()=>r&&"ResizeObserver"in r),a=()=>{o&&(o.disconnect(),o=void 0)},l=D(()=>Array.isArray(e)?e.map(f=>fe(f)):[fe(e)]),u=q(l,f=>{if(a(),i.value&&r){o=new ResizeObserver(t);for(const d of f)d&&o.observe(d,s)}},{immediate:!0,flush:"post"}),c=()=>{a(),u()};return he(c),{isSupported:i,stop:c}}function jS(e,t={}){const{reset:n=!0,windowResize:r=!0,windowScroll:s=!0,immediate:o=!0}=t,i=S(0),a=S(0),l=S(0),u=S(0),c=S(0),f=S(0),d=S(0),h=S(0);function p(){const g=fe(e);if(!g){n&&(i.value=0,a.value=0,l.value=0,u.value=0,c.value=0,f.value=0,d.value=0,h.value=0);return}const y=g.getBoundingClientRect();i.value=y.height,a.value=y.bottom,l.value=y.left,u.value=y.right,c.value=y.top,f.value=y.width,d.value=y.x,h.value=y.y}return Ki(e,p),q(()=>fe(e),g=>!g&&p()),ko(e,p,{attributeFilter:["style","class"]}),s&&j("scroll",p,{capture:!0,passive:!0}),r&&j("resize",p,{passive:!0}),qe(()=>{o&&p()}),{height:i,bottom:a,left:l,right:u,top:c,width:f,x:d,y:h,update:p}}function MS(e){const{x:t,y:n,document:r=rt,multiple:s,interval:o="requestAnimationFrame",immediate:i=!0}=e,a=me(()=>O(s)?r&&"elementsFromPoint"in r:r&&"elementFromPoint"in r),l=S(null),u=()=>{var f,d;l.value=O(s)?(f=r==null?void 0:r.elementsFromPoint(O(t),O(n)))!=null?f:[]:(d=r==null?void 0:r.elementFromPoint(O(t),O(n)))!=null?d:null},c=o==="requestAnimationFrame"?Cr(u,{immediate:i}):tr(u,o,{immediate:i});return{isSupported:a,element:l,...c}}function NS(e,t={}){const{delayEnter:n=0,delayLeave:r=0,window:s=te}=t,o=S(!1);let i;const a=l=>{const u=l?n:r;i&&(clearTimeout(i),i=void 0),u?i=setTimeout(()=>o.value=l,u):o.value=l};return s&&(j(e,"mouseenter",()=>a(!0),{passive:!0}),j(e,"mouseleave",()=>a(!1),{passive:!0})),o}function Mp(e,t={width:0,height:0},n={}){const{window:r=te,box:s="content-box"}=n,o=D(()=>{var f,d;return(d=(f=fe(e))==null?void 0:f.namespaceURI)==null?void 0:d.includes("svg")}),i=S(t.width),a=S(t.height),{stop:l}=Ki(e,([f])=>{const d=s==="border-box"?f.borderBoxSize:s==="content-box"?f.contentBoxSize:f.devicePixelContentBoxSize;if(r&&o.value){const h=fe(e);if(h){const p=r.getComputedStyle(h);i.value=Number.parseFloat(p.width),a.value=Number.parseFloat(p.height)}}else if(d){const h=Array.isArray(d)?d:[d];i.value=h.reduce((p,{inlineSize:g})=>p+g,0),a.value=h.reduce((p,{blockSize:g})=>p+g,0)}else i.value=f.contentRect.width,a.value=f.contentRect.height},n);qe(()=>{const f=fe(e);f&&(i.value="offsetWidth"in f?f.offsetWidth:t.width,a.value="offsetHeight"in f?f.offsetHeight:t.height)});const u=q(()=>fe(e),f=>{i.value=f?t.width:0,a.value=f?t.height:0});function c(){l(),u()}return{width:i,height:a,stop:c}}function Np(e,t,n={}){const{root:r,rootMargin:s="0px",threshold:o=.1,window:i=te,immediate:a=!0}=n,l=me(()=>i&&"IntersectionObserver"in i),u=D(()=>{const p=O(e);return(Array.isArray(p)?p:[p]).map(fe).filter(Ui)});let c=ke;const f=S(a),d=l.value?q(()=>[u.value,fe(r),f.value],([p,g])=>{if(c(),!f.value||!p.length)return;const y=new IntersectionObserver(t,{root:fe(g),rootMargin:s,threshold:o});p.forEach(w=>w&&y.observe(w)),c=()=>{y.disconnect(),c=ke}},{immediate:a,flush:"post"}):ke,h=()=>{c(),d(),f.value=!1};return he(h),{isSupported:l,isActive:f,pause(){c(),f.value=!1},resume(){f.value=!0},stop:h}}function Fp(e,t={}){const{window:n=te,scrollTarget:r,threshold:s=0}=t,o=S(!1);return Np(e,i=>{let a=o.value,l=0;for(const u of i)u.time>=l&&(l=u.time,a=u.isIntersecting);o.value=a},{root:r,window:n,threshold:s}),o}const Os=new Map;function FS(e){const t=Wl();function n(a){var l;const u=Os.get(e)||new Set;u.add(a),Os.set(e,u);const c=()=>s(a);return(l=t==null?void 0:t.cleanups)==null||l.push(c),c}function r(a){function l(...u){s(l),a(...u)}return n(l)}function s(a){const l=Os.get(e);l&&(l.delete(a),l.size||o())}function o(){Os.delete(e)}function i(a,l){var u;(u=Os.get(e))==null||u.forEach(c=>c(a,l))}return{on:n,once:r,off:s,emit:i,reset:o}}function $S(e){return e===!0?{}:e}function US(e,t=[],n={}){const r=S(null),s=S(null),o=S("CONNECTING"),i=S(null),a=be(null),l=Ue(e);let u=!1,c=0;const{withCredentials:f=!1,immediate:d=!0}=n,h=()=>{Ve&&i.value&&(i.value.close(),i.value=null,o.value="CLOSED",u=!0)},p=()=>{if(u||typeof l.value>"u")return;const y=new EventSource(l.value,{withCredentials:f});o.value="CONNECTING",i.value=y,y.onopen=()=>{o.value="OPEN",a.value=null},y.onerror=w=>{if(o.value="CLOSED",a.value=w,y.readyState===2&&!u&&n.autoReconnect){y.close();const{retries:m=-1,delay:v=1e3,onFailed:b}=$S(n.autoReconnect);c+=1,typeof m=="number"&&(m<0||c{r.value=null,s.value=w.data};for(const w of t)j(y,w,m=>{r.value=w,s.value=m.data||null})},g=()=>{Ve&&(h(),u=!1,c=0,p())};return d&&q(l,g,{immediate:!0}),he(h),{eventSource:i,event:r,data:s,status:o,error:a,open:g,close:h}}function HS(e={}){const{initialValue:t=""}=e,n=me(()=>typeof window<"u"&&"EyeDropper"in window),r=S(t);async function s(o){if(!n.value)return;const a=await new window.EyeDropper().open(o);return r.value=a.sRGBHex,a}return{isSupported:n,sRGBHex:r,open:s}}function VS(e=null,t={}){const{baseUrl:n="",rel:r="icon",document:s=rt}=t,o=Ue(e),i=a=>{const l=s==null?void 0:s.head.querySelectorAll(`link[rel*="${r}"]`);if(!l||l.length===0){const u=s==null?void 0:s.createElement("link");u&&(u.rel=r,u.href=`${n}${a}`,u.type=`image/${a.split(".").pop()}`,s==null||s.head.append(u));return}l==null||l.forEach(u=>u.href=`${n}${a}`)};return q(o,(a,l)=>{typeof a=="string"&&a!==l&&i(a)},{immediate:!0}),o}const BS={json:"application/json",text:"text/plain"};function _i(e){return e&&Rc(e,"immediate","refetch","initialData","timeout","beforeFetch","afterFetch","onFetchError","fetch","updateDataOnError")}function qS(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function qs(e){return typeof Headers<"u"&&e instanceof Headers?Object.fromEntries(e.entries()):e}function xr(e,...t){return e==="overwrite"?async n=>{const r=t[t.length-1];return r?{...n,...await r(n)}:n}:async n=>{for(const r of t)r&&(n={...n,...await r(n)});return n}}function WS(e={}){const t=e.combination||"chain",n=e.options||{},r=e.fetchOptions||{};function s(o,...i){const a=D(()=>{const c=O(e.baseUrl),f=O(o);return c&&!qS(f)?KS(c,f):f});let l=n,u=r;return i.length>0&&(_i(i[0])?l={...l,...i[0],beforeFetch:xr(t,n.beforeFetch,i[0].beforeFetch),afterFetch:xr(t,n.afterFetch,i[0].afterFetch),onFetchError:xr(t,n.onFetchError,i[0].onFetchError)}:u={...u,...i[0],headers:{...qs(u.headers)||{},...qs(i[0].headers)||{}}}),i.length>1&&_i(i[1])&&(l={...l,...i[1],beforeFetch:xr(t,n.beforeFetch,i[1].beforeFetch),afterFetch:xr(t,n.afterFetch,i[1].afterFetch),onFetchError:xr(t,n.onFetchError,i[1].onFetchError)}),$p(a,u,l)}return s}function $p(e,...t){var n;const r=typeof AbortController=="function";let s={},o={immediate:!0,refetch:!1,timeout:0,updateDataOnError:!1};const i={method:"GET",type:"text",payload:void 0};t.length>0&&(_i(t[0])?o={...o,...t[0]}:s=t[0]),t.length>1&&_i(t[1])&&(o={...o,...t[1]});const{fetch:a=(n=te)==null?void 0:n.fetch,initialData:l,timeout:u}=o,c=et(),f=et(),d=et(),h=S(!1),p=S(!1),g=S(!1),y=S(null),w=be(null),m=be(null),v=be(l||null),b=D(()=>r&&p.value);let E,R;const k=()=>{r&&(E==null||E.abort(),E=new AbortController,E.signal.onabort=()=>g.value=!0,s={...s,signal:E.signal})},C=M=>{p.value=M,h.value=!M};u&&(R=bs(k,u,{immediate:!1}));let A=0;const T=async(M=!1)=>{var Y,z;k(),C(!0),m.value=null,y.value=null,g.value=!1,A+=1;const We=A,Ge={method:i.method,headers:{}};if(i.payload){const Ie=qs(Ge.headers),ht=O(i.payload);!i.payloadType&&ht&&Object.getPrototypeOf(ht)===Object.prototype&&!(ht instanceof FormData)&&(i.payloadType="json"),i.payloadType&&(Ie["Content-Type"]=(Y=BS[i.payloadType])!=null?Y:i.payloadType),Ge.body=i.payloadType==="json"?JSON.stringify(ht):ht}let dt=!1;const je={url:O(e),options:{...Ge,...s},cancel:()=>{dt=!0}};if(o.beforeFetch&&Object.assign(je,await o.beforeFetch(je)),dt||!a)return C(!1),Promise.resolve(null);let st=null;return R&&R.start(),a(je.url,{...Ge,...je.options,headers:{...qs(Ge.headers),...qs((z=je.options)==null?void 0:z.headers)}}).then(async Ie=>{if(w.value=Ie,y.value=Ie.status,st=await Ie.clone()[i.type](),!Ie.ok)throw v.value=l||null,new Error(Ie.statusText);return o.afterFetch&&({data:st}=await o.afterFetch({data:st,response:Ie})),v.value=st,c.trigger(Ie),Ie}).catch(async Ie=>{let ht=Ie.message||Ie.name;if(o.onFetchError&&({error:ht,data:st}=await o.onFetchError({data:st,error:Ie,response:w.value})),m.value=ht,o.updateDataOnError&&(v.value=st),f.trigger(Ie),M)throw Ie;return null}).finally(()=>{We===A&&C(!1),R&&R.stop(),d.trigger(null)})},L=Ue(o.refetch);q([L,Ue(e)],([M])=>M&&T(),{deep:!0});const x={isFinished:ze(h),isFetching:ze(p),statusCode:y,response:w,error:m,data:v,canAbort:b,aborted:g,abort:k,execute:T,onFetchResponse:c.on,onFetchError:f.on,onFetchFinally:d.on,get:W("GET"),put:W("PUT"),post:W("POST"),delete:W("DELETE"),patch:W("PATCH"),head:W("HEAD"),options:W("OPTIONS"),json:ne("json"),text:ne("text"),blob:ne("blob"),arrayBuffer:ne("arrayBuffer"),formData:ne("formData")};function W(M){return(Y,z)=>{if(!p.value)return i.method=M,i.payload=Y,i.payloadType=z,we(i.payload)&&q([L,Ue(i.payload)],([We])=>We&&T(),{deep:!0}),{...x,then(We,Ge){return ie().then(We,Ge)}}}}function ie(){return new Promise((M,Y)=>{oo(h).toBe(!0).then(()=>M(x)).catch(z=>Y(z))})}function ne(M){return()=>{if(!p.value)return i.type=M,{...x,then(Y,z){return ie().then(Y,z)}}}}return o.immediate&&Promise.resolve().then(()=>T()),{...x,then(M,Y){return ie().then(M,Y)}}}function KS(e,t){return!e.endsWith("/")&&!t.startsWith("/")?`${e}/${t}`:`${e}${t}`}const zS={multiple:!0,accept:"*",reset:!1,directory:!1};function GS(e={}){const{document:t=rt}=e,n=S(null),{on:r,trigger:s}=et();let o;t&&(o=t.createElement("input"),o.type="file",o.onchange=l=>{const u=l.target;n.value=u.files,s(n.value)});const i=()=>{n.value=null,o&&(o.value="",s(null))},a=l=>{if(!o)return;const u={...zS,...e,...l};o.multiple=u.multiple,o.accept=u.accept,o.webkitdirectory=u.directory,dp(u,"capture")&&(o.capture=u.capture),u.reset&&i(),o.click()};return{files:ze(n),open:a,reset:i,onChange:r}}function JS(e={}){const{window:t=te,dataType:n="Text"}=e,r=t,s=me(()=>r&&"showSaveFilePicker"in r&&"showOpenFilePicker"in r),o=S(),i=S(),a=S(),l=D(()=>{var m,v;return(v=(m=a.value)==null?void 0:m.name)!=null?v:""}),u=D(()=>{var m,v;return(v=(m=a.value)==null?void 0:m.type)!=null?v:""}),c=D(()=>{var m,v;return(v=(m=a.value)==null?void 0:m.size)!=null?v:0}),f=D(()=>{var m,v;return(v=(m=a.value)==null?void 0:m.lastModified)!=null?v:0});async function d(m={}){if(!s.value)return;const[v]=await r.showOpenFilePicker({...O(e),...m});o.value=v,await w()}async function h(m={}){s.value&&(o.value=await r.showSaveFilePicker({...e,...m}),i.value=void 0,await w())}async function p(m={}){if(s.value){if(!o.value)return g(m);if(i.value){const v=await o.value.createWritable();await v.write(i.value),await v.close()}await y()}}async function g(m={}){if(s.value){if(o.value=await r.showSaveFilePicker({...e,...m}),i.value){const v=await o.value.createWritable();await v.write(i.value),await v.close()}await y()}}async function y(){var m;a.value=await((m=o.value)==null?void 0:m.getFile())}async function w(){var m,v;await y();const b=O(n);b==="Text"?i.value=await((m=a.value)==null?void 0:m.text()):b==="ArrayBuffer"?i.value=await((v=a.value)==null?void 0:v.arrayBuffer()):b==="Blob"&&(i.value=a.value)}return q(()=>O(n),w),{isSupported:s,data:i,file:a,fileName:l,fileMIME:u,fileSize:c,fileLastModified:f,open:d,create:h,save:p,saveAs:g,updateData:w}}function YS(e,t={}){const{initialValue:n=!1,focusVisible:r=!1}=t,s=S(!1),o=D(()=>fe(e));j(o,"focus",a=>{var l,u;(!r||(u=(l=a.target).matches)!=null&&u.call(l,":focus-visible"))&&(s.value=!0)}),j(o,"blur",()=>s.value=!1);const i=D({get:()=>s.value,set(a){var l,u;!a&&s.value?(l=o.value)==null||l.blur():a&&!s.value&&((u=o.value)==null||u.focus())}});return q(o,()=>{i.value=n},{immediate:!0,flush:"post"}),{focused:i}}function XS(e,t={}){const n=Tp(t),r=D(()=>fe(e));return{focused:D(()=>r.value&&n.value?r.value.contains(n.value):!1)}}function QS(e){var t;const n=S(0);if(typeof performance>"u")return n;const r=(t=e==null?void 0:e.every)!=null?t:10;let s=performance.now(),o=0;return Cr(()=>{if(o+=1,o>=r){const i=performance.now(),a=i-s;n.value=Math.round(1e3/(a/o)),s=i,o=0}}),n}const kf=["fullscreenchange","webkitfullscreenchange","webkitendfullscreen","mozfullscreenchange","MSFullscreenChange"];function ZS(e,t={}){const{document:n=rt,autoExit:r=!1}=t,s=D(()=>{var w;return(w=fe(e))!=null?w:n==null?void 0:n.querySelector("html")}),o=S(!1),i=D(()=>["requestFullscreen","webkitRequestFullscreen","webkitEnterFullscreen","webkitEnterFullScreen","webkitRequestFullScreen","mozRequestFullScreen","msRequestFullscreen"].find(w=>n&&w in n||s.value&&w in s.value)),a=D(()=>["exitFullscreen","webkitExitFullscreen","webkitExitFullScreen","webkitCancelFullScreen","mozCancelFullScreen","msExitFullscreen"].find(w=>n&&w in n||s.value&&w in s.value)),l=D(()=>["fullScreen","webkitIsFullScreen","webkitDisplayingFullscreen","mozFullScreen","msFullscreenElement"].find(w=>n&&w in n||s.value&&w in s.value)),u=["fullscreenElement","webkitFullscreenElement","mozFullScreenElement","msFullscreenElement"].find(w=>n&&w in n),c=me(()=>s.value&&n&&i.value!==void 0&&a.value!==void 0&&l.value!==void 0),f=()=>u?(n==null?void 0:n[u])===s.value:!1,d=()=>{if(l.value){if(n&&n[l.value]!=null)return n[l.value];{const w=s.value;if((w==null?void 0:w[l.value])!=null)return!!w[l.value]}}return!1};async function h(){if(!(!c.value||!o.value)){if(a.value)if((n==null?void 0:n[a.value])!=null)await n[a.value]();else{const w=s.value;(w==null?void 0:w[a.value])!=null&&await w[a.value]()}o.value=!1}}async function p(){if(!c.value||o.value)return;d()&&await h();const w=s.value;i.value&&(w==null?void 0:w[i.value])!=null&&(await w[i.value](),o.value=!0)}async function g(){await(o.value?h():p())}const y=()=>{const w=d();(!w||w&&f())&&(o.value=w)};return j(n,kf,y,!1),j(()=>fe(s),kf,y,!1),r&&he(h),{isSupported:c,isFullscreen:o,enter:p,exit:h,toggle:g}}function ek(e){return D(()=>e.value?{buttons:{a:e.value.buttons[0],b:e.value.buttons[1],x:e.value.buttons[2],y:e.value.buttons[3]},bumper:{left:e.value.buttons[4],right:e.value.buttons[5]},triggers:{left:e.value.buttons[6],right:e.value.buttons[7]},stick:{left:{horizontal:e.value.axes[0],vertical:e.value.axes[1],button:e.value.buttons[10]},right:{horizontal:e.value.axes[2],vertical:e.value.axes[3],button:e.value.buttons[11]}},dpad:{up:e.value.buttons[12],down:e.value.buttons[13],left:e.value.buttons[14],right:e.value.buttons[15]},back:e.value.buttons[8],start:e.value.buttons[9]}:null)}function tk(e={}){const{navigator:t=ft}=e,n=me(()=>t&&"getGamepads"in t),r=S([]),s=et(),o=et(),i=h=>{const p=[],g="vibrationActuator"in h?h.vibrationActuator:null;return g&&p.push(g),h.hapticActuators&&p.push(...h.hapticActuators),{...h,id:h.id,hapticActuators:p,axes:h.axes.map(y=>y),buttons:h.buttons.map(y=>({pressed:y.pressed,touched:y.touched,value:y.value})),index:h.index}},a=()=>{const h=(t==null?void 0:t.getGamepads())||[];for(const p of h)p&&r.value[p.index]&&(r.value[p.index]=i(p))},{isActive:l,pause:u,resume:c}=Cr(a),f=h=>{r.value.some(({index:p})=>p===h.index)||(r.value.push(i(h)),s.trigger(h.index)),c()},d=h=>{r.value=r.value.filter(p=>p.index!==h.index),o.trigger(h.index)};return j("gamepadconnected",h=>f(h.gamepad)),j("gamepaddisconnected",h=>d(h.gamepad)),qe(()=>{const h=(t==null?void 0:t.getGamepads())||[];for(const p of h)p&&r.value[p.index]&&f(p)}),u(),{isSupported:n,onConnected:s.on,onDisconnected:o.on,gamepads:r,pause:u,resume:c,isActive:l}}function nk(e={}){const{enableHighAccuracy:t=!0,maximumAge:n=3e4,timeout:r=27e3,navigator:s=ft,immediate:o=!0}=e,i=me(()=>s&&"geolocation"in s),a=S(null),l=be(null),u=S({accuracy:0,latitude:Number.POSITIVE_INFINITY,longitude:Number.POSITIVE_INFINITY,altitude:null,altitudeAccuracy:null,heading:null,speed:null});function c(p){a.value=p.timestamp,u.value=p.coords,l.value=null}let f;function d(){i.value&&(f=s.geolocation.watchPosition(c,p=>l.value=p,{enableHighAccuracy:t,maximumAge:n,timeout:r}))}o&&d();function h(){f&&s&&s.geolocation.clearWatch(f)}return he(()=>{h()}),{isSupported:i,coords:u,locatedAt:a,error:l,resume:d,pause:h}}const rk=["mousemove","mousedown","resize","keydown","touchstart","wheel"],sk=6e4;function ok(e=sk,t={}){const{initialState:n=!1,listenForVisibilityChange:r=!0,events:s=rk,window:o=te,eventFilter:i=_o(50)}=t,a=S(n),l=S(Sr());let u;const c=()=>{a.value=!1,clearTimeout(u),u=setTimeout(()=>a.value=!0,e)},f=Ar(i,()=>{l.value=Sr(),c()});if(o){const d=o.document;for(const h of s)j(o,h,f,{passive:!0});r&&j(d,"visibilitychange",()=>{d.hidden||f()}),c()}return{idle:a,lastActive:l,reset:c}}async function ik(e){return new Promise((t,n)=>{const r=new Image,{src:s,srcset:o,sizes:i,class:a,loading:l,crossorigin:u,referrerPolicy:c}=e;r.src=s,o&&(r.srcset=o),i&&(r.sizes=i),a&&(r.className=a),l&&(r.loading=l),u&&(r.crossOrigin=u),c&&(r.referrerPolicy=c),r.onload=()=>t(r),r.onerror=n})}function ak(e,t={}){const n=Rp(()=>ik(O(e)),void 0,{resetOnExecute:!0,...t});return q(()=>O(e),()=>n.execute(t.delay),{deep:!0}),n}const Tf=1;function Up(e,t={}){const{throttle:n=0,idle:r=200,onStop:s=ke,onScroll:o=ke,offset:i={left:0,right:0,top:0,bottom:0},eventListenerOptions:a={capture:!1,passive:!0},behavior:l="auto",window:u=te,onError:c=k=>{console.error(k)}}=t,f=S(0),d=S(0),h=D({get(){return f.value},set(k){g(k,void 0)}}),p=D({get(){return d.value},set(k){g(void 0,k)}});function g(k,C){var A,T,L;if(!u)return;const x=O(e);x&&((L=x instanceof Document?u.document.body:x)==null||L.scrollTo({top:(A=O(C))!=null?A:p.value,left:(T=O(k))!=null?T:h.value,behavior:O(l)}))}const y=S(!1),w=Ee({left:!0,right:!1,top:!0,bottom:!1}),m=Ee({left:!1,right:!1,top:!1,bottom:!1}),v=k=>{y.value&&(y.value=!1,m.left=!1,m.right=!1,m.top=!1,m.bottom=!1,s(k))},b=Vi(v,n+r),E=k=>{var C;if(!u)return;const A=((C=k==null?void 0:k.document)==null?void 0:C.documentElement)||(k==null?void 0:k.documentElement)||fe(k),{display:T,flexDirection:L}=getComputedStyle(A),x=A.scrollLeft;m.left=xf.value;const W=Math.abs(x)<=(i.left||0),ie=Math.abs(x)+A.clientWidth>=A.scrollWidth-(i.right||0)-Tf;T==="flex"&&L==="row-reverse"?(w.left=ie,w.right=W):(w.left=W,w.right=ie),f.value=x;let ne=A.scrollTop;k===u.document&&!ne&&(ne=u.document.body.scrollTop),m.top=ned.value;const M=Math.abs(ne)<=(i.top||0),Y=Math.abs(ne)+A.clientHeight>=A.scrollHeight-(i.bottom||0)-Tf;T==="flex"&&L==="column-reverse"?(w.top=Y,w.bottom=M):(w.top=M,w.bottom=Y),d.value=ne},R=k=>{var C;if(!u)return;const A=(C=k.target.documentElement)!=null?C:k.target;E(A),y.value=!0,b(k),o(k)};return j(e,"scroll",n?Oc(R,n,!0,!1):R,a),qe(()=>{try{const k=O(e);if(!k)return;E(k)}catch(k){c(k)}}),j(e,"scrollend",v,a),{x:h,y:p,isScrolling:y,arrivedState:w,directions:m,measure(){const k=O(e);u&&k&&E(k)}}}function Xo(e){return typeof Window<"u"&&e instanceof Window?e.document.documentElement:typeof Document<"u"&&e instanceof Document?e.documentElement:e}function lk(e,t,n={}){var r;const{direction:s="bottom",interval:o=100,canLoadMore:i=()=>!0}=n,a=Ee(Up(e,{...n,offset:{[s]:(r=n.distance)!=null?r:0,...n.offset}})),l=S(),u=D(()=>!!l.value),c=D(()=>Xo(O(e))),f=Fp(c);function d(){if(a.measure(),!c.value||!f.value||!i(c.value))return;const{scrollHeight:h,clientHeight:p,scrollWidth:g,clientWidth:y}=c.value,w=s==="bottom"||s==="top"?h<=p:g<=y;(a.arrivedState[s]||w)&&(l.value||(l.value=Promise.all([t(a),new Promise(m=>setTimeout(m,o))]).finally(()=>{l.value=null,Be(()=>d())})))}return q(()=>[a.arrivedState[s],f.value],d,{immediate:!0}),{isLoading:u}}const ck=["mousedown","mouseup","keydown","keyup"];function uk(e,t={}){const{events:n=ck,document:r=rt,initial:s=null}=t,o=S(s);return r&&n.forEach(i=>{j(r,i,a=>{typeof a.getModifierState=="function"&&(o.value=a.getModifierState(e))})}),o}function zi(e,t,n={}){const{window:r=te}=n;return Wi(e,t,r==null?void 0:r.localStorage,n)}const Hp={ctrl:"control",command:"meta",cmd:"meta",option:"alt",up:"arrowup",down:"arrowdown",left:"arrowleft",right:"arrowright"};function fk(e={}){const{reactive:t=!1,target:n=te,aliasMap:r=Hp,passive:s=!0,onEventFired:o=ke}=e,i=Ee(new Set),a={toJSON(){return{}},current:i},l=t?Ee(a):a,u=new Set,c=new Set;function f(g,y){g in l&&(t?l[g]=y:l[g].value=y)}function d(){i.clear();for(const g of c)f(g,!1)}function h(g,y){var w,m;const v=(w=g.key)==null?void 0:w.toLowerCase(),E=[(m=g.code)==null?void 0:m.toLowerCase(),v].filter(Boolean);v&&(y?i.add(v):i.delete(v));for(const R of E)c.add(R),f(R,y);v==="meta"&&!y?(u.forEach(R=>{i.delete(R),f(R,!1)}),u.clear()):typeof g.getModifierState=="function"&&g.getModifierState("Meta")&&y&&[...i,...E].forEach(R=>u.add(R))}j(n,"keydown",g=>(h(g,!0),o(g)),{passive:s}),j(n,"keyup",g=>(h(g,!1),o(g)),{passive:s}),j("blur",d,{passive:!0}),j("focus",d,{passive:!0});const p=new Proxy(l,{get(g,y,w){if(typeof y!="string")return Reflect.get(g,y,w);if(y=y.toLowerCase(),y in r&&(y=r[y]),!(y in l))if(/[+_-]/.test(y)){const v=y.split(/[+_-]/g).map(b=>b.trim());l[y]=D(()=>v.every(b=>O(p[b])))}else l[y]=S(!1);const m=Reflect.get(g,y,w);return t?O(m):m}});return p}function Na(e,t){O(e)&&t(O(e))}function dk(e){let t=[];for(let n=0;n({id:l,label:t,kind:n,language:r,mode:s,activeCues:o,cues:i,inBandMetadataTrackDispatchType:a}))}const hk={src:"",tracks:[]};function pk(e,t={}){t={...hk,...t};const{document:n=rt}=t,r=S(0),s=S(0),o=S(!1),i=S(1),a=S(!1),l=S(!1),u=S(!1),c=S(1),f=S(!1),d=S([]),h=S([]),p=S(-1),g=S(!1),y=S(!1),w=n&&"pictureInPictureEnabled"in n,m=et(),v=T=>{Na(e,L=>{if(T){const x=typeof T=="number"?T:T.id;L.textTracks[x].mode="disabled"}else for(let x=0;x{Na(e,x=>{const W=typeof T=="number"?T:T.id;L&&v(),x.textTracks[W].mode="showing",p.value=W})},E=()=>new Promise((T,L)=>{Na(e,async x=>{w&&(g.value?n.exitPictureInPicture().then(T).catch(L):x.requestPictureInPicture().then(T).catch(L))})});wr(()=>{if(!n)return;const T=O(e);if(!T)return;const L=O(t.src);let x=[];L&&(typeof L=="string"?x=[{src:L}]:Array.isArray(L)?x=L:wo(L)&&(x=[L]),T.querySelectorAll("source").forEach(W=>{W.removeEventListener("error",m.trigger),W.remove()}),x.forEach(({src:W,type:ie})=>{const ne=n.createElement("source");ne.setAttribute("src",W),ne.setAttribute("type",ie||""),ne.addEventListener("error",m.trigger),T.appendChild(ne)}),T.load())}),he(()=>{const T=O(e);T&&T.querySelectorAll("source").forEach(L=>L.removeEventListener("error",m.trigger))}),q([e,i],()=>{const T=O(e);T&&(T.volume=i.value)}),q([e,y],()=>{const T=O(e);T&&(T.muted=y.value)}),q([e,c],()=>{const T=O(e);T&&(T.playbackRate=c.value)}),wr(()=>{if(!n)return;const T=O(t.tracks),L=O(e);!T||!T.length||!L||(L.querySelectorAll("track").forEach(x=>x.remove()),T.forEach(({default:x,kind:W,label:ie,src:ne,srcLang:M},Y)=>{const z=n.createElement("track");z.default=x||!1,z.kind=W,z.label=ie,z.src=ne,z.srclang=M,z.default&&(p.value=Y),L.appendChild(z)}))});const{ignoreUpdates:R}=hs(r,T=>{const L=O(e);L&&(L.currentTime=T)}),{ignoreUpdates:k}=hs(u,T=>{const L=O(e);L&&(T?L.play():L.pause())});j(e,"timeupdate",()=>R(()=>r.value=O(e).currentTime)),j(e,"durationchange",()=>s.value=O(e).duration),j(e,"progress",()=>d.value=dk(O(e).buffered)),j(e,"seeking",()=>o.value=!0),j(e,"seeked",()=>o.value=!1),j(e,["waiting","loadstart"],()=>{a.value=!0,k(()=>u.value=!1)}),j(e,"loadeddata",()=>a.value=!1),j(e,"playing",()=>{a.value=!1,l.value=!1,k(()=>u.value=!0)}),j(e,"ratechange",()=>c.value=O(e).playbackRate),j(e,"stalled",()=>f.value=!0),j(e,"ended",()=>l.value=!0),j(e,"pause",()=>k(()=>u.value=!1)),j(e,"play",()=>k(()=>u.value=!0)),j(e,"enterpictureinpicture",()=>g.value=!0),j(e,"leavepictureinpicture",()=>g.value=!1),j(e,"volumechange",()=>{const T=O(e);T&&(i.value=T.volume,y.value=T.muted)});const C=[],A=q([e],()=>{const T=O(e);T&&(A(),C[0]=j(T.textTracks,"addtrack",()=>h.value=Fa(T.textTracks)),C[1]=j(T.textTracks,"removetrack",()=>h.value=Fa(T.textTracks)),C[2]=j(T.textTracks,"change",()=>h.value=Fa(T.textTracks)))});return he(()=>C.forEach(T=>T())),{currentTime:r,duration:s,waiting:a,seeking:o,ended:l,stalled:f,buffered:d,playing:u,rate:c,volume:i,muted:y,tracks:h,selectedTrack:p,enableTrack:b,disableTrack:v,supportsPictureInPicture:w,togglePictureInPicture:E,isPictureInPicture:g,onSourceError:m.on}}function vk(e,t){const r=t!=null&&t.cache?In(t.cache):In(new Map),s=(...c)=>t!=null&&t.getKey?t.getKey(...c):JSON.stringify(c),o=(c,...f)=>(r.set(c,e(...f)),r.get(c)),i=(...c)=>o(s(...c),...c),a=(...c)=>{r.delete(s(...c))},l=()=>{r.clear()},u=(...c)=>{const f=s(...c);return r.has(f)?r.get(f):o(f,...c)};return u.load=i,u.delete=a,u.clear=l,u.generateKey=s,u.cache=r,u}function mk(e={}){const t=S(),n=me(()=>typeof performance<"u"&&"memory"in performance);if(n.value){const{interval:r=1e3}=e;tr(()=>{t.value=performance.memory},r,{immediate:e.immediate,immediateCallback:e.immediateCallback})}return{isSupported:n,memory:t}}const gk={page:e=>[e.pageX,e.pageY],client:e=>[e.clientX,e.clientY],screen:e=>[e.screenX,e.screenY],movement:e=>e instanceof Touch?null:[e.movementX,e.movementY]};function Vp(e={}){const{type:t="page",touch:n=!0,resetOnTouchEnds:r=!1,initialValue:s={x:0,y:0},window:o=te,target:i=o,scroll:a=!0,eventFilter:l}=e;let u=null;const c=S(s.x),f=S(s.y),d=S(null),h=typeof t=="function"?t:gk[t],p=E=>{const R=h(E);u=E,R&&([c.value,f.value]=R,d.value="mouse")},g=E=>{if(E.touches.length>0){const R=h(E.touches[0]);R&&([c.value,f.value]=R,d.value="touch")}},y=()=>{if(!u||!o)return;const E=h(u);u instanceof MouseEvent&&E&&(c.value=E[0]+o.scrollX,f.value=E[1]+o.scrollY)},w=()=>{c.value=s.x,f.value=s.y},m=l?E=>l(()=>p(E),{}):E=>p(E),v=l?E=>l(()=>g(E),{}):E=>g(E),b=l?()=>l(()=>y(),{}):()=>y();if(i){const E={passive:!0};j(i,["mousemove","dragover"],m,E),n&&t!=="movement"&&(j(i,["touchstart","touchmove"],v,E),r&&j(i,"touchend",w,E)),a&&t==="page"&&j(o,"scroll",b,{passive:!0})}return{x:c,y:f,sourceType:d}}function Bp(e,t={}){const{handleOutside:n=!0,window:r=te}=t,s=t.type||"page",{x:o,y:i,sourceType:a}=Vp(t),l=S(e??(r==null?void 0:r.document.body)),u=S(0),c=S(0),f=S(0),d=S(0),h=S(0),p=S(0),g=S(!0);let y=()=>{};return r&&(y=q([l,o,i],()=>{const w=fe(l);if(!w)return;const{left:m,top:v,width:b,height:E}=w.getBoundingClientRect();f.value=m+(s==="page"?r.pageXOffset:0),d.value=v+(s==="page"?r.pageYOffset:0),h.value=E,p.value=b;const R=o.value-f.value,k=i.value-d.value;g.value=b===0||E===0||R<0||k<0||R>b||k>E,(n||!g.value)&&(u.value=R,c.value=k)},{immediate:!0}),j(document,"mouseleave",()=>{g.value=!0})),{x:o,y:i,sourceType:a,elementX:u,elementY:c,elementPositionX:f,elementPositionY:d,elementHeight:h,elementWidth:p,isOutside:g,stop:y}}function yk(e={}){const{touch:t=!0,drag:n=!0,capture:r=!1,initialValue:s=!1,window:o=te}=e,i=S(s),a=S(null);if(!o)return{pressed:i,sourceType:a};const l=f=>()=>{i.value=!0,a.value=f},u=()=>{i.value=!1,a.value=null},c=D(()=>fe(e.target)||o);return j(c,"mousedown",l("mouse"),{passive:!0,capture:r}),j(o,"mouseleave",u,{passive:!0,capture:r}),j(o,"mouseup",u,{passive:!0,capture:r}),n&&(j(c,"dragstart",l("mouse"),{passive:!0,capture:r}),j(o,"drop",u,{passive:!0,capture:r}),j(o,"dragend",u,{passive:!0,capture:r})),t&&(j(c,"touchstart",l("touch"),{passive:!0,capture:r}),j(o,"touchend",u,{passive:!0,capture:r}),j(o,"touchcancel",u,{passive:!0,capture:r})),{pressed:i,sourceType:a}}function wk(e={}){const{window:t=te}=e,n=t==null?void 0:t.navigator,r=me(()=>n&&"language"in n),s=S(n==null?void 0:n.language);return j(t,"languagechange",()=>{n&&(s.value=n.language)}),{isSupported:r,language:s}}function qp(e={}){const{window:t=te}=e,n=t==null?void 0:t.navigator,r=me(()=>n&&"connection"in n),s=S(!0),o=S(!1),i=S(void 0),a=S(void 0),l=S(void 0),u=S(void 0),c=S(void 0),f=S(void 0),d=S("unknown"),h=r.value&&n.connection;function p(){n&&(s.value=n.onLine,i.value=s.value?void 0:Date.now(),a.value=s.value?Date.now():void 0,h&&(l.value=h.downlink,u.value=h.downlinkMax,f.value=h.effectiveType,c.value=h.rtt,o.value=h.saveData,d.value=h.type))}return t&&(j(t,"offline",()=>{s.value=!1,i.value=Date.now()}),j(t,"online",()=>{s.value=!0,a.value=Date.now()})),h&&j(h,"change",p,!1),p(),{isSupported:r,isOnline:s,saveData:o,offlineAt:i,onlineAt:a,downlink:l,downlinkMax:u,effectiveType:f,rtt:c,type:d}}function Wp(e={}){const{controls:t=!1,interval:n="requestAnimationFrame"}=e,r=S(new Date),s=()=>r.value=new Date,o=n==="requestAnimationFrame"?Cr(s,{immediate:!0}):tr(s,n,{immediate:!0});return t?{now:r,...o}:r}function bk(e){const t=S(),n=()=>{t.value&&URL.revokeObjectURL(t.value),t.value=void 0};return q(()=>O(e),r=>{n(),r&&(t.value=URL.createObjectURL(r))},{immediate:!0}),he(n),ze(t)}function Pf(e,t,n){if(typeof e=="function"||Tn(e))return D(()=>Yo(O(e),O(t),O(n)));const r=S(e);return D({get(){return r.value=Yo(r.value,O(t),O(n))},set(s){r.value=Yo(s,O(t),O(n))}})}function _k(e){const{total:t=Number.POSITIVE_INFINITY,pageSize:n=10,page:r=1,onPageChange:s=ke,onPageSizeChange:o=ke,onPageCountChange:i=ke}=e,a=Pf(n,1,Number.POSITIVE_INFINITY),l=D(()=>Math.max(1,Math.ceil(O(t)/O(a)))),u=Pf(r,1,l),c=D(()=>u.value===1),f=D(()=>u.value===l.value);we(r)&&Cl(r,u,{direction:Tn(r)?"ltr":"both"}),we(n)&&Cl(n,a,{direction:Tn(n)?"ltr":"both"});function d(){u.value--}function h(){u.value++}const p={currentPage:u,currentPageSize:a,pageCount:l,isFirstPage:c,isLastPage:f,prev:d,next:h};return q(u,()=>{s(Ee(p))}),q(a,()=>{o(Ee(p))}),q(l,()=>{i(Ee(p))}),p}function Ek(e={}){const{isOnline:t}=qp(e);return t}function Sk(e={}){const{window:t=te}=e,n=S(!1),r=s=>{if(!t)return;s=s||t.event;const o=s.relatedTarget||s.toElement;n.value=!o};return t&&(j(t,"mouseout",r,{passive:!0}),j(t.document,"mouseleave",r,{passive:!0}),j(t.document,"mouseenter",r,{passive:!0})),n}function Kp(e={}){const{window:t=te}=e,n=me(()=>t&&"screen"in t&&"orientation"in t.screen),r=n.value?t.screen.orientation:{},s=S(r.type),o=S(r.angle||0);return n.value&&j(t,"orientationchange",()=>{s.value=r.type,o.value=r.angle}),{isSupported:n,orientation:s,angle:o,lockOrientation:l=>n.value&&typeof r.lock=="function"?r.lock(l):Promise.reject(new Error("Not supported")),unlockOrientation:()=>{n.value&&typeof r.unlock=="function"&&r.unlock()}}}function kk(e,t={}){const{deviceOrientationTiltAdjust:n=y=>y,deviceOrientationRollAdjust:r=y=>y,mouseTiltAdjust:s=y=>y,mouseRollAdjust:o=y=>y,window:i=te}=t,a=Ee(jp({window:i})),l=Ee(Kp({window:i})),{elementX:u,elementY:c,elementWidth:f,elementHeight:d}=Bp(e,{handleOutside:!1,window:i}),h=D(()=>a.isSupported&&(a.alpha!=null&&a.alpha!==0||a.gamma!=null&&a.gamma!==0)?"deviceOrientation":"mouse"),p=D(()=>{if(h.value==="deviceOrientation"){let y;switch(l.orientation){case"landscape-primary":y=a.gamma/90;break;case"landscape-secondary":y=-a.gamma/90;break;case"portrait-primary":y=-a.beta/90;break;case"portrait-secondary":y=a.beta/90;break;default:y=-a.beta/90}return r(y)}else{const y=-(c.value-d.value/2)/d.value;return o(y)}}),g=D(()=>{if(h.value==="deviceOrientation"){let y;switch(l.orientation){case"landscape-primary":y=a.beta/90;break;case"landscape-secondary":y=-a.beta/90;break;case"portrait-primary":y=a.gamma/90;break;case"portrait-secondary":y=-a.gamma/90;break;default:y=a.gamma/90}return n(y)}else{const y=(u.value-f.value/2)/f.value;return s(y)}});return{roll:p,tilt:g,source:h}}function Tk(e=Ip()){const t=be(),n=()=>{const r=fe(e);r&&(t.value=r.parentElement)};return qe(n),q(()=>O(e),n),t}function Pk(e,t){const{window:n=te,immediate:r=!0,...s}=e,o=me(()=>n&&"PerformanceObserver"in n);let i;const a=()=>{i==null||i.disconnect()},l=()=>{o.value&&(a(),i=new PerformanceObserver(t),i.observe(s))};return he(a),r&&l(),{isSupported:o,start:l,stop:a}}const zp={x:0,y:0,pointerId:0,pressure:0,tiltX:0,tiltY:0,width:0,height:0,twist:0,pointerType:null},Rk=Object.keys(zp);function Ok(e={}){const{target:t=te}=e,n=S(!1),r=S(e.initialValue||{});Object.assign(r.value,zp,r.value);const s=o=>{n.value=!0,!(e.pointerTypes&&!e.pointerTypes.includes(o.pointerType))&&(r.value=gp(o,Rk,!1))};if(t){const o={passive:!0};j(t,["pointerdown","pointermove","pointerup"],s,o),j(t,"pointerleave",()=>n.value=!1,o)}return{...Ac(r),isInside:n}}function Ak(e,t={}){const{document:n=rt}=t,r=me(()=>n&&"pointerLockElement"in n),s=S(),o=S();let i;r.value&&(j(n,"pointerlockchange",()=>{var u;const c=(u=n.pointerLockElement)!=null?u:s.value;i&&c===i&&(s.value=n.pointerLockElement,s.value||(i=o.value=null))}),j(n,"pointerlockerror",()=>{var u;const c=(u=n.pointerLockElement)!=null?u:s.value;if(i&&c===i){const f=n.pointerLockElement?"release":"acquire";throw new Error(`Failed to ${f} pointer lock.`)}}));async function a(u){var c;if(!r.value)throw new Error("Pointer Lock API is not supported by your browser.");if(o.value=u instanceof Event?u.currentTarget:null,i=u instanceof Event?(c=fe(e))!=null?c:o.value:fe(u),!i)throw new Error("Target element undefined.");return i.requestPointerLock(),await oo(s).toBe(i)}async function l(){return s.value?(n.exitPointerLock(),await oo(s).toBeNull(),!0):!1}return{isSupported:r,element:s,triggerElement:o,lock:a,unlock:l}}function Ck(e,t={}){const n=Ue(e),{threshold:r=50,onSwipe:s,onSwipeEnd:o,onSwipeStart:i,disableTextSelect:a=!1}=t,l=Ee({x:0,y:0}),u=(k,C)=>{l.x=k,l.y=C},c=Ee({x:0,y:0}),f=(k,C)=>{c.x=k,c.y=C},d=D(()=>l.x-c.x),h=D(()=>l.y-c.y),{max:p,abs:g}=Math,y=D(()=>p(g(d.value),g(h.value))>=r),w=S(!1),m=S(!1),v=D(()=>y.value?g(d.value)>g(h.value)?d.value>0?"left":"right":h.value>0?"up":"down":"none"),b=k=>{var C,A,T;const L=k.buttons===0,x=k.buttons===1;return(T=(A=(C=t.pointerTypes)==null?void 0:C.includes(k.pointerType))!=null?A:L||x)!=null?T:!0},E=[j(e,"pointerdown",k=>{if(!b(k))return;m.value=!0;const C=k.target;C==null||C.setPointerCapture(k.pointerId);const{clientX:A,clientY:T}=k;u(A,T),f(A,T),i==null||i(k)}),j(e,"pointermove",k=>{if(!b(k)||!m.value)return;const{clientX:C,clientY:A}=k;f(C,A),!w.value&&y.value&&(w.value=!0),w.value&&(s==null||s(k))}),j(e,"pointerup",k=>{b(k)&&(w.value&&(o==null||o(k,v.value)),m.value=!1,w.value=!1)})];qe(()=>{var k,C,A,T,L,x,W,ie;(C=(k=n.value)==null?void 0:k.style)==null||C.setProperty("touch-action","none"),a&&((T=(A=n.value)==null?void 0:A.style)==null||T.setProperty("-webkit-user-select","none"),(x=(L=n.value)==null?void 0:L.style)==null||x.setProperty("-ms-user-select","none"),(ie=(W=n.value)==null?void 0:W.style)==null||ie.setProperty("user-select","none"))});const R=()=>E.forEach(k=>k());return{isSwiping:ze(w),direction:ze(v),posStart:ze(l),posEnd:ze(c),distanceX:d,distanceY:h,stop:R}}function Lk(e){const t=at("(prefers-color-scheme: light)",e),n=at("(prefers-color-scheme: dark)",e);return D(()=>n.value?"dark":t.value?"light":"no-preference")}function Ik(e){const t=at("(prefers-contrast: more)",e),n=at("(prefers-contrast: less)",e),r=at("(prefers-contrast: custom)",e);return D(()=>t.value?"more":n.value?"less":r.value?"custom":"no-preference")}function xk(e={}){const{window:t=te}=e;if(!t)return S(["en"]);const n=t.navigator,r=S(n.languages);return j(t,"languagechange",()=>{r.value=n.languages}),r}function Dk(e){const t=at("(prefers-reduced-motion: reduce)",e);return D(()=>t.value?"reduce":"no-preference")}function jk(e,t){const n=be(t);return q(Ue(e),(r,s)=>{n.value=s},{flush:"sync"}),ze(n)}const Rf="--vueuse-safe-area-top",Of="--vueuse-safe-area-right",Af="--vueuse-safe-area-bottom",Cf="--vueuse-safe-area-left";function Mk(){const e=S(""),t=S(""),n=S(""),r=S("");if(Ve){const o=Ds(Rf),i=Ds(Of),a=Ds(Af),l=Ds(Cf);o.value="env(safe-area-inset-top, 0px)",i.value="env(safe-area-inset-right, 0px)",a.value="env(safe-area-inset-bottom, 0px)",l.value="env(safe-area-inset-left, 0px)",s(),j("resize",Vi(s))}function s(){e.value=Uo(Rf),t.value=Uo(Of),n.value=Uo(Af),r.value=Uo(Cf)}return{top:e,right:t,bottom:n,left:r,update:s}}function Uo(e){return getComputedStyle(document.documentElement).getPropertyValue(e)}function Nk(e,t=ke,n={}){const{immediate:r=!0,manual:s=!1,type:o="text/javascript",async:i=!0,crossOrigin:a,referrerPolicy:l,noModule:u,defer:c,document:f=rt,attrs:d={}}=n,h=S(null);let p=null;const g=m=>new Promise((v,b)=>{const E=C=>(h.value=C,v(C),C);if(!f){v(!1);return}let R=!1,k=f.querySelector(`script[src="proxy.php?url=https%3A%2F%2Fstudykit.app%2F%24%7BO%28e%29%7D"]`);k?k.hasAttribute("data-loaded")&&E(k):(k=f.createElement("script"),k.type=o,k.async=i,k.src=O(e),c&&(k.defer=c),a&&(k.crossOrigin=a),u&&(k.noModule=u),l&&(k.referrerPolicy=l),Object.entries(d).forEach(([C,A])=>k==null?void 0:k.setAttribute(C,A)),R=!0),k.addEventListener("error",C=>b(C)),k.addEventListener("abort",C=>b(C)),k.addEventListener("load",()=>{k.setAttribute("data-loaded","true"),t(k),E(k)}),R&&(k=f.head.appendChild(k)),m||E(k)}),y=(m=!0)=>(p||(p=g(m)),p),w=()=>{if(!f)return;p=null,h.value&&(h.value=null);const m=f.querySelector(`script[src="proxy.php?url=https%3A%2F%2Fstudykit.app%2F%24%7BO%28e%29%7D"]`);m&&f.head.removeChild(m)};return r&&!s&&qe(y),s||Ep(w),{scriptTag:h,load:y,unload:w}}function Gp(e){const t=window.getComputedStyle(e);if(t.overflowX==="scroll"||t.overflowY==="scroll"||t.overflowX==="auto"&&e.clientWidth1?!0:(t.preventDefault&&t.preventDefault(),!1)}const Ho=new WeakMap;function $k(e,t=!1){const n=S(t);let r=null;q(Ue(e),i=>{const a=Xo(O(i));if(a){const l=a;Ho.get(l)||Ho.set(l,l.style.overflow),n.value&&(l.style.overflow="hidden")}},{immediate:!0});const s=()=>{const i=Xo(O(e));!i||n.value||(wi&&(r=j(i,"touchmove",a=>{Fk(a)},{passive:!1})),i.style.overflow="hidden",n.value=!0)},o=()=>{var i;const a=Xo(O(e));!a||!n.value||(wi&&(r==null||r()),a.style.overflow=(i=Ho.get(a))!=null?i:"",Ho.delete(a),n.value=!1)};return he(o),D({get(){return n.value},set(i){i?s():o()}})}function Jp(e,t,n={}){const{window:r=te}=n;return Wi(e,t,r==null?void 0:r.sessionStorage,n)}function Uk(e={},t={}){const{navigator:n=ft}=t,r=n,s=me(()=>r&&"canShare"in r);return{isSupported:s,share:async(i={})=>{if(s.value){const a={...O(e),...O(i)};let l=!0;if(a.files&&r.canShare&&(l=r.canShare({files:a.files})),l)return r.share(a)}}}}const Hk=(e,t)=>e.sort(t),Vo=(e,t)=>e-t;function Vk(...e){var t,n,r,s;const[o]=e;let i=Vo,a={};e.length===2?typeof e[1]=="object"?(a=e[1],i=(t=a.compareFn)!=null?t:Vo):i=(n=e[1])!=null?n:Vo:e.length>2&&(i=(r=e[1])!=null?r:Vo,a=(s=e[2])!=null?s:{});const{dirty:l=!1,sortFn:u=Hk}=a;return l?(wr(()=>{const c=u(O(o),i);we(o)?o.value=c:o.splice(0,o.length,...c)}),o):D(()=>u([...O(o)],i))}function Bk(e={}){const{interimResults:t=!0,continuous:n=!0,window:r=te}=e,s=Ue(e.lang||"en-US"),o=S(!1),i=S(!1),a=S(""),l=be(void 0),u=(g=!o.value)=>{o.value=g},c=()=>{o.value=!0},f=()=>{o.value=!1},d=r&&(r.SpeechRecognition||r.webkitSpeechRecognition),h=me(()=>d);let p;return h.value&&(p=new d,p.continuous=n,p.interimResults=t,p.lang=O(s),p.onstart=()=>{i.value=!1},q(s,g=>{p&&!o.value&&(p.lang=g)}),p.onresult=g=>{const y=Array.from(g.results).map(w=>(i.value=w.isFinal,w[0])).map(w=>w.transcript).join("");a.value=y,l.value=void 0},p.onerror=g=>{l.value=g},p.onend=()=>{o.value=!1,p.lang=O(s)},q(o,()=>{o.value?p.start():p.stop()})),he(()=>{o.value=!1}),{isSupported:h,isListening:o,isFinal:i,recognition:p,result:a,error:l,toggle:u,start:c,stop:f}}function qk(e,t={}){const{pitch:n=1,rate:r=1,volume:s=1,window:o=te}=t,i=o&&o.speechSynthesis,a=me(()=>i),l=S(!1),u=S("init"),c=Ue(e||""),f=Ue(t.lang||"en-US"),d=be(void 0),h=(m=!l.value)=>{l.value=m},p=m=>{m.lang=O(f),m.voice=O(t.voice)||null,m.pitch=O(n),m.rate=O(r),m.volume=s,m.onstart=()=>{l.value=!0,u.value="play"},m.onpause=()=>{l.value=!1,u.value="pause"},m.onresume=()=>{l.value=!0,u.value="play"},m.onend=()=>{l.value=!1,u.value="end"},m.onerror=v=>{d.value=v}},g=D(()=>{l.value=!1,u.value="init";const m=new SpeechSynthesisUtterance(c.value);return p(m),m}),y=()=>{i.cancel(),g&&i.speak(g.value)},w=()=>{i.cancel(),l.value=!1};return a.value&&(p(g.value),q(f,m=>{g.value&&!l.value&&(g.value.lang=m)}),t.voice&&q(t.voice,()=>{i.cancel()}),q(l,()=>{l.value?i.resume():i.pause()})),he(()=>{l.value=!1}),{isSupported:a,isPlaying:l,status:u,utterance:g,error:d,stop:w,toggle:h,speak:y}}function Wk(e,t){const n=S(e),r=D(()=>Array.isArray(n.value)?n.value:Object.keys(n.value)),s=S(r.value.indexOf(t??r.value[0])),o=D(()=>c(s.value)),i=D(()=>s.value===0),a=D(()=>s.value===r.value.length-1),l=D(()=>r.value[s.value+1]),u=D(()=>r.value[s.value-1]);function c(E){return Array.isArray(n.value)?n.value[E]:n.value[r.value[E]]}function f(E){if(r.value.includes(E))return c(r.value.indexOf(E))}function d(E){r.value.includes(E)&&(s.value=r.value.indexOf(E))}function h(){a.value||s.value++}function p(){i.value||s.value--}function g(E){b(E)&&d(E)}function y(E){return r.value.indexOf(E)===s.value+1}function w(E){return r.value.indexOf(E)===s.value-1}function m(E){return r.value.indexOf(E)===s.value}function v(E){return s.valuer.value.indexOf(E)}return{steps:n,stepNames:r,index:s,current:o,next:l,previous:u,isFirst:i,isLast:a,at:c,get:f,goTo:d,goToNext:h,goToPrevious:p,goBackTo:g,isNext:y,isPrevious:w,isCurrent:m,isBefore:v,isAfter:b}}function Kk(e,t,n,r={}){var s;const{flush:o="pre",deep:i=!0,listenToStorageChanges:a=!0,writeDefaults:l=!0,mergeDefaults:u=!1,shallow:c,window:f=te,eventFilter:d,onError:h=v=>{console.error(v)}}=r,p=O(t),g=Cp(p),y=(c?be:S)(t),w=(s=r.serializer)!=null?s:Cc[g];if(!n)try{n=qi("getDefaultStorageAsync",()=>{var v;return(v=te)==null?void 0:v.localStorage})()}catch(v){h(v)}async function m(v){if(!(!n||v&&v.key!==e))try{const b=v?v.newValue:await n.getItem(e);if(b==null)y.value=p,l&&p!==null&&await n.setItem(e,await w.write(p));else if(u){const E=await w.read(b);typeof u=="function"?y.value=u(E,p):g==="object"&&!Array.isArray(E)?y.value={...p,...E}:y.value=E}else y.value=await w.read(b)}catch(b){h(b)}}return m(),f&&a&&j(f,"storage",v=>Promise.resolve().then(()=>m(v))),n&&ws(y,async()=>{try{y.value==null?await n.removeItem(e):await n.setItem(e,await w.write(y.value))}catch(v){h(v)}},{flush:o,deep:i,eventFilter:d}),y}let zk=0;function Gk(e,t={}){const n=S(!1),{document:r=rt,immediate:s=!0,manual:o=!1,id:i=`vueuse_styletag_${++zk}`}=t,a=S(e);let l=()=>{};const u=()=>{if(!r)return;const f=r.getElementById(i)||r.createElement("style");f.isConnected||(f.id=i,t.media&&(f.media=t.media),r.head.appendChild(f)),!n.value&&(l=q(a,d=>{f.textContent=d},{immediate:!0}),n.value=!0)},c=()=>{!r||!n.value||(l(),r.head.removeChild(r.getElementById(i)),n.value=!1)};return s&&!o&&qe(u),o||he(c),{id:i,css:a,unload:c,load:u,isLoaded:ze(n)}}function Jk(e,t={}){const{threshold:n=50,onSwipe:r,onSwipeEnd:s,onSwipeStart:o,passive:i=!0,window:a=te}=t,l=Ee({x:0,y:0}),u=Ee({x:0,y:0}),c=D(()=>l.x-u.x),f=D(()=>l.y-u.y),{max:d,abs:h}=Math,p=D(()=>d(h(c.value),h(f.value))>=n),g=S(!1),y=D(()=>p.value?h(c.value)>h(f.value)?c.value>0?"left":"right":f.value>0?"up":"down":"none"),w=A=>[A.touches[0].clientX,A.touches[0].clientY],m=(A,T)=>{l.x=A,l.y=T},v=(A,T)=>{u.x=A,u.y=T};let b;const E=Yk(a==null?void 0:a.document);i?b=E?{passive:!0}:{capture:!1}:b=E?{passive:!1,capture:!0}:{capture:!0};const R=A=>{g.value&&(s==null||s(A,y.value)),g.value=!1},k=[j(e,"touchstart",A=>{if(A.touches.length!==1)return;b.capture&&!b.passive&&A.preventDefault();const[T,L]=w(A);m(T,L),v(T,L),o==null||o(A)},b),j(e,"touchmove",A=>{if(A.touches.length!==1)return;const[T,L]=w(A);v(T,L),!g.value&&p.value&&(g.value=!0),g.value&&(r==null||r(A))},b),j(e,["touchend","touchcancel"],R,b)];return{isPassiveEventSupported:E,isSwiping:g,direction:y,coordsStart:l,coordsEnd:u,lengthX:c,lengthY:f,stop:()=>k.forEach(A=>A())}}function Yk(e){if(!e)return!1;let t=!1;const n={get passive(){return t=!0,!1}};return e.addEventListener("x",ke,n),e.removeEventListener("x",ke),t}function Xk(){const e=S([]);return e.value.set=t=>{t&&e.value.push(t)},Dd(()=>{e.value.length=0}),e}function Qk(e={}){const{document:t=rt,selector:n="html",observe:r=!1,initialValue:s="ltr"}=e;function o(){var a,l;return(l=(a=t==null?void 0:t.querySelector(n))==null?void 0:a.getAttribute("dir"))!=null?l:s}const i=S(o());return qe(()=>i.value=o()),r&&t&&ko(t.querySelector(n),()=>i.value=o(),{attributes:!0}),D({get(){return i.value},set(a){var l,u;i.value=a,t&&(i.value?(l=t.querySelector(n))==null||l.setAttribute("dir",i.value):(u=t.querySelector(n))==null||u.removeAttribute("dir"))}})}function Zk(e){var t;const n=(t=e.rangeCount)!=null?t:0;return Array.from({length:n},(r,s)=>e.getRangeAt(s))}function eT(e={}){const{window:t=te}=e,n=S(null),r=D(()=>{var a,l;return(l=(a=n.value)==null?void 0:a.toString())!=null?l:""}),s=D(()=>n.value?Zk(n.value):[]),o=D(()=>s.value.map(a=>a.getBoundingClientRect()));function i(){n.value=null,t&&(n.value=t.getSelection())}return t&&j(t.document,"selectionchange",i),{text:r,rects:o,ranges:s,selection:n}}function tT(e){var t;const n=S(e==null?void 0:e.element),r=S(e==null?void 0:e.input),s=(t=e==null?void 0:e.styleProp)!=null?t:"height",o=S(1);function i(){var a,l;if(!n.value)return;let u="";n.value.style[s]="1px",o.value=(a=n.value)==null?void 0:a.scrollHeight,e!=null&&e.styleTarget?O(e.styleTarget).style[s]=`${o.value}px`:u=`${o.value}px`,n.value.style[s]=u,(l=e==null?void 0:e.onResize)==null||l.call(e)}return q([r,n],()=>Be(i),{immediate:!0}),Ki(n,()=>i()),e!=null&&e.watch&&q(e.watch,i,{immediate:!0,deep:!0}),{textarea:n,input:r,triggerResize:i}}function nT(e,t={}){const{throttle:n=200,trailing:r=!0}=t,s=_o(n,r);return{...Ic(e,{...t,eventFilter:s})}}const rT=[{max:6e4,value:1e3,name:"second"},{max:276e4,value:6e4,name:"minute"},{max:72e6,value:36e5,name:"hour"},{max:5184e5,value:864e5,name:"day"},{max:24192e5,value:6048e5,name:"week"},{max:28512e6,value:2592e6,name:"month"},{max:Number.POSITIVE_INFINITY,value:31536e6,name:"year"}],sT={justNow:"just now",past:e=>e.match(/\d/)?`${e} ago`:e,future:e=>e.match(/\d/)?`in ${e}`:e,month:(e,t)=>e===1?t?"last month":"next month":`${e} month${e>1?"s":""}`,year:(e,t)=>e===1?t?"last year":"next year":`${e} year${e>1?"s":""}`,day:(e,t)=>e===1?t?"yesterday":"tomorrow":`${e} day${e>1?"s":""}`,week:(e,t)=>e===1?t?"last week":"next week":`${e} week${e>1?"s":""}`,hour:e=>`${e} hour${e>1?"s":""}`,minute:e=>`${e} minute${e>1?"s":""}`,second:e=>`${e} second${e>1?"s":""}`,invalid:""};function oT(e){return e.toISOString().slice(0,10)}function iT(e,t={}){const{controls:n=!1,updateInterval:r=3e4}=t,{now:s,...o}=Wp({interval:r,controls:!0}),i=D(()=>Yp(new Date(O(e)),t,O(s)));return n?{timeAgo:i,...o}:i}function Yp(e,t={},n=Date.now()){var r;const{max:s,messages:o=sT,fullDateFormatter:i=oT,units:a=rT,showSecond:l=!1,rounding:u="round"}=t,c=typeof u=="number"?y=>+y.toFixed(u):Math[u],f=+n-+e,d=Math.abs(f);function h(y,w){return c(Math.abs(y)/w.value)}function p(y,w){const m=h(y,w),v=y>0,b=g(w.name,m,v);return g(v?"past":"future",b,v)}function g(y,w,m){const v=o[y];return typeof v=="function"?v(w,m):v.replace("{0}",w.toString())}if(d<6e4&&!l)return o.justNow;if(typeof s=="number"&&d>s)return i(new Date(e));if(typeof s=="string"){const y=(r=a.find(w=>w.name===s))==null?void 0:r.max;if(y&&d>y)return i(new Date(e))}for(const[y,w]of a.entries()){if(h(f,w)<=0&&a[y-1])return p(f,a[y-1]);if(di.value=Sr()+n,l=o?()=>{a(),o(i.value)}:a,u=s==="requestAnimationFrame"?Cr(l,{immediate:r}):tr(l,s,{immediate:r});return t?{timestamp:i,...u}:i}function cT(e=null,t={}){var n,r,s;const{document:o=rt,restoreOnUnmount:i=f=>f}=t,a=(n=o==null?void 0:o.title)!=null?n:"",l=Ue((r=e??(o==null?void 0:o.title))!=null?r:null),u=e&&typeof e=="function";function c(f){if(!("titleTemplate"in t))return f;const d=t.titleTemplate||"%s";return typeof d=="function"?d(f):O(d).replace(/%s/g,f)}return q(l,(f,d)=>{f!==d&&o&&(o.title=c(typeof f=="string"?f:""))},{immediate:!0}),t.observe&&!t.titleTemplate&&o&&!u&&ko((s=o.head)==null?void 0:s.querySelector("title"),()=>{o&&o.title!==l.value&&(l.value=c(o.title))},{childList:!0}),_p(()=>{if(i){const f=i(a,l.value||"");f!=null&&o&&(o.title=f)}}),l}const uT={easeInSine:[.12,0,.39,0],easeOutSine:[.61,1,.88,1],easeInOutSine:[.37,0,.63,1],easeInQuad:[.11,0,.5,0],easeOutQuad:[.5,1,.89,1],easeInOutQuad:[.45,0,.55,1],easeInCubic:[.32,0,.67,0],easeOutCubic:[.33,1,.68,1],easeInOutCubic:[.65,0,.35,1],easeInQuart:[.5,0,.75,0],easeOutQuart:[.25,1,.5,1],easeInOutQuart:[.76,0,.24,1],easeInQuint:[.64,0,.78,0],easeOutQuint:[.22,1,.36,1],easeInOutQuint:[.83,0,.17,1],easeInExpo:[.7,0,.84,0],easeOutExpo:[.16,1,.3,1],easeInOutExpo:[.87,0,.13,1],easeInCirc:[.55,0,1,.45],easeOutCirc:[0,.55,.45,1],easeInOutCirc:[.85,0,.15,1],easeInBack:[.36,0,.66,-.56],easeOutBack:[.34,1.56,.64,1],easeInOutBack:[.68,-.6,.32,1.6]},fT=Object.assign({},{linear:Pc},uT);function dT([e,t,n,r]){const s=(c,f)=>1-3*f+3*c,o=(c,f)=>3*f-6*c,i=c=>3*c,a=(c,f,d)=>((s(f,d)*c+o(f,d))*c+i(f))*c,l=(c,f,d)=>3*s(f,d)*c*c+2*o(f,d)*c+i(f),u=c=>{let f=c;for(let d=0;d<4;++d){const h=l(f,e,n);if(h===0)return f;const p=a(f,e,n)-c;f-=p/h}return f};return c=>e===t&&n===r?c:a(u(c),t,r)}function Lf(e,t,n){return e+n*(t-e)}function $a(e){return(typeof e=="number"?[e]:e)||[]}function Xp(e,t,n,r={}){var s,o;const i=O(t),a=O(n),l=$a(i),u=$a(a),c=(s=O(r.duration))!=null?s:1e3,f=Date.now(),d=Date.now()+c,h=typeof r.transition=="function"?r.transition:(o=O(r.transition))!=null?o:Pc,p=typeof h=="function"?h:dT(h);return new Promise(g=>{e.value=i;const y=()=>{var w;if((w=r.abort)!=null&&w.call(r)){g();return}const m=Date.now(),v=p((m-f)/c),b=$a(e.value).map((E,R)=>Lf(l[R],u[R],v));Array.isArray(e.value)?e.value=b.map((E,R)=>{var k,C;return Lf((k=l[R])!=null?k:0,(C=u[R])!=null?C:0,v)}):typeof e.value=="number"&&(e.value=b[0]),m{const o=O(e);return typeof o=="number"?o:o.map(O)},s=S(r());return q(r,async o=>{var i,a;if(O(t.disabled))return;const l=++n;if(t.delay&&await so(O(t.delay)),l!==n)return;const u=Array.isArray(o)?o.map(O):O(o);(i=t.onStarted)==null||i.call(t),await Xp(s,s.value,u,{...t,abort:()=>{var c;return l!==n||((c=t.abort)==null?void 0:c.call(t))}}),(a=t.onFinished)==null||a.call(t)},{deep:!0}),q(()=>O(t.disabled),o=>{o&&(n++,s.value=r())}),he(()=>{n++}),D(()=>O(t.disabled)?r():s.value)}function pT(e="history",t={}){const{initialValue:n={},removeNullishValues:r=!0,removeFalsyValues:s=!1,write:o=!0,window:i=te}=t;if(!i)return Ee(n);const a=Ee({});function l(){if(e==="history")return i.location.search||"";if(e==="hash"){const w=i.location.hash||"",m=w.indexOf("?");return m>0?w.slice(m):""}else return(i.location.hash||"").replace(/^#/,"")}function u(w){const m=w.toString();if(e==="history")return`${m?`?${m}`:""}${i.location.hash||""}`;if(e==="hash-params")return`${i.location.search||""}${m?`#${m}`:""}`;const v=i.location.hash||"#",b=v.indexOf("?");return b>0?`${v.slice(0,b)}${m?`?${m}`:""}`:`${v}${m?`?${m}`:""}`}function c(){return new URLSearchParams(l())}function f(w){const m=new Set(Object.keys(a));for(const v of w.keys()){const b=w.getAll(v);a[v]=b.length>1?b:w.get(v)||"",m.delete(v)}Array.from(m).forEach(v=>delete a[v])}const{pause:d,resume:h}=ds(a,()=>{const w=new URLSearchParams("");Object.keys(a).forEach(m=>{const v=a[m];Array.isArray(v)?v.forEach(b=>w.append(m,b)):r&&v==null||s&&!v?w.delete(m):w.set(m,v)}),p(w)},{deep:!0});function p(w,m){d(),m&&f(w),i.history.replaceState(i.history.state,i.document.title,i.location.pathname+u(w)),h()}function g(){o&&p(c(),!0)}j(i,"popstate",g,!1),e!=="history"&&j(i,"hashchange",g,!1);const y=c();return y.keys().next().value?f(y):Object.assign(a,n),a}function vT(e={}){var t,n;const r=S((t=e.enabled)!=null?t:!1),s=S((n=e.autoSwitch)!=null?n:!0),o=S(e.constraints),{navigator:i=ft}=e,a=me(()=>{var g;return(g=i==null?void 0:i.mediaDevices)==null?void 0:g.getUserMedia}),l=be();function u(g){switch(g){case"video":{if(o.value)return o.value.video||!1;break}case"audio":{if(o.value)return o.value.audio||!1;break}}}async function c(){if(!(!a.value||l.value))return l.value=await i.mediaDevices.getUserMedia({video:u("video"),audio:u("audio")}),l.value}function f(){var g;(g=l.value)==null||g.getTracks().forEach(y=>y.stop()),l.value=void 0}function d(){f(),r.value=!1}async function h(){return await c(),l.value&&(r.value=!0),l.value}async function p(){return f(),await h()}return q(r,g=>{g?c():f()},{immediate:!0}),q(o,()=>{s.value&&l.value&&p()},{immediate:!0}),he(()=>{d()}),{isSupported:a,stream:l,start:h,stop:d,restart:p,constraints:o,enabled:r,autoSwitch:s}}function Qp(e,t,n,r={}){var s,o,i;const{clone:a=!1,passive:l=!1,eventName:u,deep:c=!1,defaultValue:f,shouldEmit:d}=r,h=ut(),p=n||(h==null?void 0:h.emit)||((s=h==null?void 0:h.$emit)==null?void 0:s.bind(h))||((i=(o=h==null?void 0:h.proxy)==null?void 0:o.$emit)==null?void 0:i.bind(h==null?void 0:h.proxy));let g=u;t||(t="modelValue"),g=g||`update:${t.toString()}`;const y=v=>a?typeof a=="function"?a(v):So(v):v,w=()=>fp(e[t])?y(e[t]):f,m=v=>{d?d(v)&&p(g,v):p(g,v)};if(l){const v=w(),b=S(v);let E=!1;return q(()=>e[t],R=>{E||(E=!0,b.value=y(R),Be(()=>E=!1))}),q(b,R=>{!E&&(R!==e[t]||c)&&m(R)},{deep:c}),b}else return D({get(){return w()},set(v){m(v)}})}function mT(e,t,n={}){const r={};for(const s in e)r[s]=Qp(e,s,t,n);return r}function gT(e){const{pattern:t=[],interval:n=0,navigator:r=ft}=e||{},s=me(()=>typeof r<"u"&&"vibrate"in r),o=Ue(t);let i;const a=(u=o.value)=>{s.value&&r.vibrate(u)},l=()=>{s.value&&r.vibrate(0),i==null||i.pause()};return n>0&&(i=tr(a,n,{immediate:!1,immediateCallback:!1})),{isSupported:s,pattern:t,intervalControls:i,vibrate:a,stop:l}}function yT(e,t){const{containerStyle:n,wrapperProps:r,scrollTo:s,calculateRange:o,currentList:i,containerRef:a}="itemHeight"in t?_T(t,e):bT(t,e);return{list:i,scrollTo:s,containerProps:{ref:a,onScroll:()=>{o()},style:n},wrapperProps:r}}function Zp(e){const t=S(null),n=Mp(t),r=S([]),s=be(e);return{state:S({start:0,end:10}),source:s,currentList:r,size:n,containerRef:t}}function ev(e,t,n){return r=>{if(typeof n=="number")return Math.ceil(r/n);const{start:s=0}=e.value;let o=0,i=0;for(let a=s;ar)break}return i-s}}function tv(e,t){return n=>{if(typeof t=="number")return Math.floor(n/t)+1;let r=0,s=0;for(let o=0;o=n){s=o;break}}return s+1}}function nv(e,t,n,r,{containerRef:s,state:o,currentList:i,source:a}){return()=>{const l=s.value;if(l){const u=n(e==="vertical"?l.scrollTop:l.scrollLeft),c=r(e==="vertical"?l.clientHeight:l.clientWidth),f=u-t,d=u+c+t;o.value={start:f<0?0:f,end:d>a.value.length?a.value.length:d},i.value=a.value.slice(o.value.start,o.value.end).map((h,p)=>({data:h,index:p+o.value.start}))}}}function rv(e,t){return n=>typeof e=="number"?n*e:t.value.slice(0,n).reduce((s,o,i)=>s+e(i),0)}function sv(e,t,n){q([e.width,e.height,t],()=>{n()})}function ov(e,t){return D(()=>typeof e=="number"?t.value.length*e:t.value.reduce((n,r,s)=>n+e(s),0))}const wT={horizontal:"scrollLeft",vertical:"scrollTop"};function iv(e,t,n,r){return s=>{r.value&&(r.value[wT[e]]=n(s),t())}}function bT(e,t){const n=Zp(t),{state:r,source:s,currentList:o,size:i,containerRef:a}=n,l={overflowX:"auto"},{itemWidth:u,overscan:c=5}=e,f=ev(r,s,u),d=tv(s,u),h=nv("horizontal",c,d,f,n),p=rv(u,s),g=D(()=>p(r.value.start)),y=ov(u,s);sv(i,t,h);const w=iv("horizontal",h,p,a),m=D(()=>({style:{height:"100%",width:`${y.value-g.value}px`,marginLeft:`${g.value}px`,display:"flex"}}));return{scrollTo:w,calculateRange:h,wrapperProps:m,containerStyle:l,currentList:o,containerRef:a}}function _T(e,t){const n=Zp(t),{state:r,source:s,currentList:o,size:i,containerRef:a}=n,l={overflowY:"auto"},{itemHeight:u,overscan:c=5}=e,f=ev(r,s,u),d=tv(s,u),h=nv("vertical",c,d,f,n),p=rv(u,s),g=D(()=>p(r.value.start)),y=ov(u,s);sv(i,t,h);const w=iv("vertical",h,p,a),m=D(()=>({style:{width:"100%",height:`${y.value-g.value}px`,marginTop:`${g.value}px`}}));return{calculateRange:h,scrollTo:w,containerStyle:l,wrapperProps:m,currentList:o,containerRef:a}}function ET(e={}){const{navigator:t=ft,document:n=rt}=e;let r;const s=me(()=>t&&"wakeLock"in t),o=S(!1);async function i(){!s.value||!r||(n&&n.visibilityState==="visible"&&(r=await t.wakeLock.request("screen")),o.value=!r.released)}n&&j(n,"visibilitychange",i,{passive:!0});async function a(u){s.value&&(r=await t.wakeLock.request(u),o.value=!r.released)}async function l(){!s.value||!r||(await r.release(),o.value=!r.released,r=null)}return{isSupported:s,isActive:o,request:a,release:l}}function ST(e={}){const{window:t=te,requestPermissions:n=!0}=e,r=e,s=me(()=>!!t&&"Notification"in t),o=S(s.value&&"permission"in Notification&&Notification.permission==="granted"),i=S(null),a=async()=>{if(s.value)return!o.value&&Notification.permission!=="denied"&&await Notification.requestPermission()==="granted"&&(o.value=!0),o.value},{on:l,trigger:u}=et(),{on:c,trigger:f}=et(),{on:d,trigger:h}=et(),{on:p,trigger:g}=et(),y=async m=>{if(!s.value||!o.value)return;const v=Object.assign({},r,m);return i.value=new Notification(v.title||"",v),i.value.onclick=u,i.value.onshow=f,i.value.onerror=h,i.value.onclose=g,i.value},w=()=>{i.value&&i.value.close(),i.value=null};if(n&&qe(a),he(w),s.value&&t){const m=t.document;j(m,"visibilitychange",v=>{v.preventDefault(),m.visibilityState==="visible"&&w()})}return{isSupported:s,notification:i,ensurePermissions:a,permissionGranted:o,show:y,close:w,onClick:l,onShow:c,onError:d,onClose:p}}const If="ping";function Ua(e){return e===!0?{}:e}function kT(e,t={}){const{onConnected:n,onDisconnected:r,onError:s,onMessage:o,immediate:i=!0,autoClose:a=!0,protocols:l=[]}=t,u=S(null),c=S("CLOSED"),f=S(),d=Ue(e);let h,p,g=!1,y=0,w=[],m;const v=()=>{if(w.length&&f.value&&c.value==="OPEN"){for(const A of w)f.value.send(A);w=[]}},b=()=>{clearTimeout(m),m=void 0},E=(A=1e3,T)=>{!Ve||!f.value||(g=!0,b(),h==null||h(),f.value.close(A,T),f.value=void 0)},R=(A,T=!0)=>!f.value||c.value!=="OPEN"?(T&&w.push(A),!1):(v(),f.value.send(A),!0),k=()=>{if(g||typeof d.value>"u")return;const A=new WebSocket(d.value,l);f.value=A,c.value="CONNECTING",A.onopen=()=>{c.value="OPEN",n==null||n(A),p==null||p(),v()},A.onclose=T=>{if(c.value="CLOSED",r==null||r(A,T),!g&&t.autoReconnect){const{retries:L=-1,delay:x=1e3,onFailed:W}=Ua(t.autoReconnect);y+=1,typeof L=="number"&&(L<0||y{s==null||s(A,T)},A.onmessage=T=>{if(t.heartbeat){b();const{message:L=If}=Ua(t.heartbeat);if(T.data===L)return}u.value=T.data,o==null||o(A,T)}};if(t.heartbeat){const{message:A=If,interval:T=1e3,pongTimeout:L=1e3}=Ua(t.heartbeat),{pause:x,resume:W}=tr(()=>{R(A,!1),m==null&&(m=setTimeout(()=>{E(),g=!1},L))},T,{immediate:!1});h=x,p=W}a&&(Ve&&j("beforeunload",()=>E()),he(E));const C=()=>{!Ve&&!up||(E(),g=!1,y=0,k())};return i&&C(),{data:u,status:c,close:E,send:R,open:C,ws:f}}function TT(e,t,n){const{window:r=te}=n??{},s=S(null),o=be(),i=(...l)=>{o.value&&o.value.postMessage(...l)},a=function(){o.value&&o.value.terminate()};return r&&(typeof e=="string"?o.value=new Worker(e,t):typeof e=="function"?o.value=e():o.value=e,o.value.onmessage=l=>{s.value=l.data},he(()=>{o.value&&o.value.terminate()})),{data:s,post:i,terminate:a,worker:o}}function PT(e){return t=>{const n=t.data[0];return Promise.resolve(e.apply(void 0,n)).then(r=>{postMessage(["SUCCESS",r])}).catch(r=>{postMessage(["ERROR",r])})}}function RT(e){return e.length===0?"":`importScripts(${e.map(n=>`'${n}'`).toString()})`}function OT(e,t){const n=`${RT(t)}; onmessage=(${PT})(${e})`,r=new Blob([n],{type:"text/javascript"});return URL.createObjectURL(r)}function AT(e,t={}){const{dependencies:n=[],timeout:r,window:s=te}=t,o=S(),i=S("PENDING"),a=S({}),l=S(),u=(h="PENDING")=>{o.value&&o.value._url&&s&&(o.value.terminate(),URL.revokeObjectURL(o.value._url),a.value={},o.value=void 0,s.clearTimeout(l.value),i.value=h)};u(),he(u);const c=()=>{const h=OT(e,n),p=new Worker(h);return p._url=h,p.onmessage=g=>{const{resolve:y=()=>{},reject:w=()=>{}}=a.value,[m,v]=g.data;switch(m){case"SUCCESS":y(v),u(m);break;default:w(v),u("ERROR");break}},p.onerror=g=>{const{reject:y=()=>{}}=a.value;g.preventDefault(),y(g),u("ERROR")},r&&(l.value=setTimeout(()=>u("TIMEOUT_EXPIRED"),r)),p},f=(...h)=>new Promise((p,g)=>{a.value={resolve:p,reject:g},o.value&&o.value.postMessage([[...h]]),i.value="RUNNING"});return{workerFn:(...h)=>i.value==="RUNNING"?(console.error("[useWebWorkerFn] You can only run one instance of the worker at a time."),Promise.reject()):(o.value=c(),f(...h)),workerStatus:i,workerTerminate:u}}function CT(e={}){const{window:t=te}=e;if(!t)return S(!1);const n=S(t.document.hasFocus());return j(t,"blur",()=>{n.value=!1}),j(t,"focus",()=>{n.value=!0}),n}function LT(e={}){const{window:t=te,behavior:n="auto"}=e;if(!t)return{x:S(0),y:S(0)};const r=S(t.scrollX),s=S(t.scrollY),o=D({get(){return r.value},set(a){scrollTo({left:a,behavior:n})}}),i=D({get(){return s.value},set(a){scrollTo({top:a,behavior:n})}});return j(t,"scroll",()=>{r.value=t.scrollX,s.value=t.scrollY},{capture:!1,passive:!0}),{x:o,y:i}}function IT(e={}){const{window:t=te,initialWidth:n=Number.POSITIVE_INFINITY,initialHeight:r=Number.POSITIVE_INFINITY,listenOrientation:s=!0,includeScrollbar:o=!0}=e,i=S(n),a=S(r),l=()=>{t&&(o?(i.value=t.innerWidth,a.value=t.innerHeight):(i.value=t.document.documentElement.clientWidth,a.value=t.document.documentElement.clientHeight))};if(l(),qe(l),j("resize",l,{passive:!0}),s){const u=at("(orientation: portrait)");q(u,()=>l())}return{width:i,height:a}}const xT=Object.freeze(Object.defineProperty({__proto__:null,DefaultMagicKeysAliasMap:Hp,StorageSerializers:Cc,TransitionPresets:fT,assert:L_,asyncComputed:_f,autoResetRef:yf,breakpointsAntDesign:aS,breakpointsBootstrapV5:sS,breakpointsMasterCss:uS,breakpointsPrimeFlex:fS,breakpointsQuasar:lS,breakpointsSematic:cS,breakpointsTailwind:rS,breakpointsVuetify:iS,breakpointsVuetifyV2:Op,breakpointsVuetifyV3:oS,bypassFilter:bo,camelize:pp,clamp:Yo,cloneFnJSON:So,computedAsync:_f,computedEager:gf,computedInject:LE,computedWithControl:Ol,containsProp:Rc,controlledComputed:Ol,controlledRef:q_,createEventHook:et,createFetch:WS,createFilterWrapper:Ar,createGlobalState:S_,createInjectionState:k_,createReactiveFn:Al,createReusableTemplate:IE,createSharedComposable:T_,createSingletonPromise:vp,createTemplatePromise:DE,createUnrefFn:jE,customStorageEventName:Il,debounceFilter:Hi,debouncedRef:Da,debouncedWatch:wf,defaultDocument:rt,defaultLocation:ME,defaultNavigator:ft,defaultWindow:te,directiveHooks:M_,eagerComputed:gf,executeTransition:Xp,extendRef:ap,formatDate:Sp,formatTimeAgo:Yp,get:P_,getLifeCycleTarget:Eo,getSSRHandler:qi,hasOwn:dp,hyphenate:F_,identity:Pc,ignorableWatch:hs,increaseWithUnit:mp,injectLocal:ip,invoke:U_,isClient:Ve,isDef:fp,isDefined:R_,isIOS:wi,isObject:wo,isWorker:up,makeDestructurable:lp,mapGamepadToXbox360Controller:ek,noop:ke,normalizeDate:kp,notNullish:Ui,now:x_,objectEntries:wp,objectOmit:yp,objectPick:gp,onClickOutside:NE,onKeyDown:$E,onKeyPressed:UE,onKeyStroke:Bi,onKeyUp:HE,onLongPress:qE,onStartTyping:zE,pausableFilter:Tc,pausableWatch:ds,promiseTimeout:so,provideLocal:op,rand:D_,reactify:Al,reactifyObject:A_,reactiveComputed:kc,reactiveOmit:C_,reactivePick:V_,refAutoReset:yf,refDebounced:Da,refDefault:B_,refThrottled:ja,refWithControl:bp,resolveRef:H_,resolveUnref:O_,set:W_,setSSRHandler:bS,syncRef:Cl,syncRefs:K_,templateRef:GE,throttleFilter:_o,throttledRef:ja,throttledWatch:bf,timestamp:Sr,toReactive:cp,toRef:Ue,toRefs:Ac,toValue:O,tryOnBeforeMount:z_,tryOnBeforeUnmount:_p,tryOnMounted:qe,tryOnScopeDispose:he,tryOnUnmounted:Ep,unrefElement:fe,until:oo,useActiveElement:Tp,useAnimate:JE,useArrayDifference:J_,useArrayEvery:Y_,useArrayFilter:X_,useArrayFind:Q_,useArrayFindIndex:Z_,useArrayFindLast:tE,useArrayIncludes:rE,useArrayJoin:sE,useArrayMap:oE,useArrayReduce:iE,useArraySome:aE,useArrayUnique:uE,useAsyncQueue:YE,useAsyncState:Rp,useBase64:ZE,useBattery:tS,useBluetooth:nS,useBreakpoints:dS,useBroadcastChannel:hS,useBrowserLocation:pS,useCached:vS,useClipboard:mS,useClipboardItems:gS,useCloned:yS,useColorMode:Lp,useConfirmDialog:_S,useCounter:fE,useCssVar:Ds,useCurrentElement:Ip,useCycleList:ES,useDark:SS,useDateFormat:vE,useDebounce:Da,useDebounceFn:Vi,useDebouncedRefHistory:RS,useDeviceMotion:OS,useDeviceOrientation:jp,useDevicePixelRatio:AS,useDevicesList:CS,useDisplayMedia:LS,useDocumentVisibility:IS,useDraggable:xS,useDropZone:DS,useElementBounding:jS,useElementByPoint:MS,useElementHover:NS,useElementSize:Mp,useElementVisibility:Fp,useEventBus:FS,useEventListener:j,useEventSource:US,useEyeDropper:HS,useFavicon:VS,useFetch:$p,useFileDialog:GS,useFileSystemAccess:JS,useFocus:YS,useFocusWithin:XS,useFps:QS,useFullscreen:ZS,useGamepad:tk,useGeolocation:nk,useIdle:ok,useImage:ak,useInfiniteScroll:lk,useIntersectionObserver:Np,useInterval:mE,useIntervalFn:tr,useKeyModifier:uk,useLastChanged:gE,useLocalStorage:zi,useMagicKeys:fk,useManualRefHistory:Dp,useMediaControls:pk,useMediaQuery:at,useMemoize:vk,useMemory:mk,useMounted:Pp,useMouse:Vp,useMouseInElement:Bp,useMousePressed:yk,useMutationObserver:ko,useNavigatorLanguage:wk,useNetwork:qp,useNow:Wp,useObjectUrl:bk,useOffsetPagination:_k,useOnline:Ek,usePageLeave:Sk,useParallax:kk,useParentElement:Tk,usePerformanceObserver:Pk,usePermission:bi,usePointer:Ok,usePointerLock:Ak,usePointerSwipe:Ck,usePreferredColorScheme:Lk,usePreferredContrast:Ik,usePreferredDark:Lc,usePreferredLanguages:xk,usePreferredReducedMotion:Dk,usePrevious:jk,useRafFn:Cr,useRefHistory:Ic,useResizeObserver:Ki,useScreenOrientation:Kp,useScreenSafeArea:Mk,useScriptTag:Nk,useScroll:Up,useScrollLock:$k,useSessionStorage:Jp,useShare:Uk,useSorted:Vk,useSpeechRecognition:Bk,useSpeechSynthesis:qk,useStepper:Wk,useStorage:Wi,useStorageAsync:Kk,useStyleTag:Gk,useSupported:me,useSwipe:Jk,useTemplateRefsList:Xk,useTextDirection:Qk,useTextSelection:eT,useTextareaAutosize:tT,useThrottle:ja,useThrottleFn:Oc,useThrottledRefHistory:nT,useTimeAgo:iT,useTimeout:yE,useTimeoutFn:bs,useTimeoutPoll:aT,useTimestamp:lT,useTitle:cT,useToNumber:wE,useToString:bE,useToggle:_E,useTransition:hT,useUrlSearchParams:pT,useUserMedia:vT,useVModel:Qp,useVModels:mT,useVibrate:gT,useVirtualList:yT,useWakeLock:ET,useWebNotification:ST,useWebSocket:kT,useWebWorker:TT,useWebWorkerFn:AT,useWindowFocus:CT,useWindowScroll:LT,useWindowSize:IT,watchArray:EE,watchAtMost:SE,watchDebounced:wf,watchDeep:kE,watchIgnorable:hs,watchImmediate:TE,watchOnce:PE,watchPausable:ds,watchThrottled:bf,watchTriggerable:RE,watchWithFilter:ws,whenever:CE},Symbol.toStringTag,{value:"Module"})),DT=()=>zi("voices-prefs",{}),jT=()=>zi("study-session-settings",{}),av=(e,t)=>{const n=jT();n.value[e]=t},HO=()=>jn("config",()=>({maxPlayers:8,timeBetweenRounds:10,roundDuration:60,deck:null})),lv=()=>jn("gameState",()=>null),cv=()=>jn("connectionState",()=>({loading:!1,customEventsRegistered:!1,disconnected:!1,room:null})),VO=()=>{const e=lv(),t=cv();return D(()=>!e.value||!e.value.players?null:e.value.players[t.value.room.sessionId])},uv=()=>({caseSensitive:!1,autoSpeak:!1,strict:!1,addMissedtoReview:!0,ignoreDeterminers:!1,ignoreArticles:!1,ignoreArguments:!1,ignoredCards:[],isFlipped:!1,autoFlipQuestionAnswer:!1,enabledLessons:["zen-cards","multiple-choice"],order:E_(["new","new","familiar","retry","remaster"]),configuredLessons:[]}),Gi=()=>jn("soloStudyCard",()=>({cards:[],settings:uv()}));function BO(){const e=Gi();e.value={cards:[],settings:uv()}}function qO(e=!1){const t=Gi(),n=t.value.settingsID;e!==!1&&(t.value.settings={...t.value.settings,isFlipped:!t.value.settings.isFlipped}),av(n,t.value.settings),t.value.cards.forEach(r=>{const s=""+r.question,o=""+r.answer,i=r.rich_text_question?""+r.rich_text_question:null,a=r.rich_text_answer?""+r.rich_text_answer:null,l=r.media_url,u=r.media_url_question;r.question=o,r.answer=s,r.rich_text_question=a,r.rich_text_answer=i,r.media_url=u,r.media_url_question=l})}function WO(){const e=Gi();e.value.cards.length!==0&&e.value.cards.forEach(t=>{const n=t.media_url,r=t.media_url_question;t.media_url=r,t.media_url_question=n})}function KO(e){const t=Gi(),n=t.value.settingsID;!t.value.settings.configuredLessons.includes(e)&&n&&(t.value.settings.configuredLessons.push(e),av(n,t.value.settings))}const MT=ro();async function Ha(){const e=await B(()=>import("./colyseus.CEN3tPL7.js").then(t=>t.c),__vite__mapDeps([229,8]),import.meta.url);return new e.Client(window.__NUXT__.config.public.serverUrl)}const NT=rn(()=>{let e=null;const t=cv(),n={async leaveRoom(){t.value.room&&await t.value.room.leave()},async createRoom(r,s,o){e||(e=await Ha()),t.value.loading=!0,await n.leaveRoom();try{t.value.room=await e.create(r,{...o,name:s}),n.registerEvents()}catch(i){throw t.value.loading=!1,new Error(i.message||"Could not create room")}t.value.loading=!1},async joinRoom(r,s){e||(e=await Ha()),t.value.loading=!0,await n.leaveRoom();try{t.value.room=await e.joinById(r.toUpperCase(),{name:s}),n.registerEvents()}catch(o){throw t.value.loading=!1,new Error(o.message||"Could not join room. Please check the code and try again.")}t.value.loading=!1},storeSession(){localStorage.setItem("lastSession",JSON.stringify({roomID:t.value.room.id,playerID:t.value.room.sessionId,timestamp:Date.now()}))},getLastSession(){const r=localStorage.getItem("lastSession");return r?JSON.parse(r):null},async reconnect(){e||(e=await Ha());const r=localStorage.getItem("lastSession");if(!r)return;const s=JSON.parse(r);if(t.value.loading=!0,!t.value.room){try{const o=await e.reconnect(s.roomID,s.playerID);if(!o)throw new Error("Could not reconnect to room. The game has likely ended or you were removed for inactivty.");t.value.room=o,n.registerEvents()}catch{MT.fire({title:"Could not reconnect to room",text:"The game has likely ended or you were removed for inactivty.",icon:"error"})}t.value.loading=!1}},registerEvents(){const r=lv();t.value.room&&(n.storeSession(),t.value.room.onStateChange(s=>{r.value=JSON.parse(JSON.stringify(s))}),t.value.room.onLeave(s=>{s>1e3&&(t.value.disconnected=!0),t.value.room=null,r.value=null}),r.value=JSON.parse(JSON.stringify(t.value.room.state)))}};return{provide:{connectionHelpers:()=>({...n,state:t.value})}}}),FT=e=>{let t;return e?t=e:typeof fetch>"u"?t=(...n)=>B(()=>Promise.resolve().then(()=>To),void 0,import.meta.url).then(({default:r})=>r(...n)):t=fetch,(...n)=>t(...n)};class xc extends Error{constructor(t,n="FunctionsError",r){super(t),this.name=n,this.context=r}}class $T extends xc{constructor(t){super("Failed to send a request to the Edge Function","FunctionsFetchError",t)}}class UT extends xc{constructor(t){super("Relay Error invoking the Edge Function","FunctionsRelayError",t)}}class HT extends xc{constructor(t){super("Edge Function returned a non-2xx status code","FunctionsHttpError",t)}}var VT=function(e,t,n,r){function s(o){return o instanceof n?o:new n(function(i){i(o)})}return new(n||(n=Promise))(function(o,i){function a(c){try{u(r.next(c))}catch(f){i(f)}}function l(c){try{u(r.throw(c))}catch(f){i(f)}}function u(c){c.done?o(c.value):s(c.value).then(a,l)}u((r=r.apply(e,t||[])).next())})};class BT{constructor(t,{headers:n={},customFetch:r}={}){this.url=t,this.headers=n,this.fetch=FT(r)}setAuth(t){this.headers.Authorization=`Bearer ${t}`}invoke(t,n={}){var r;return VT(this,void 0,void 0,function*(){try{const{headers:s,method:o,body:i}=n;let a={},l;i&&(s&&!Object.prototype.hasOwnProperty.call(s,"Content-Type")||!s)&&(typeof Blob<"u"&&i instanceof Blob||i instanceof ArrayBuffer?(a["Content-Type"]="application/octet-stream",l=i):typeof i=="string"?(a["Content-Type"]="text/plain",l=i):typeof FormData<"u"&&i instanceof FormData?l=i:(a["Content-Type"]="application/json",l=JSON.stringify(i)));const u=yield this.fetch(`${this.url}/${t}`,{method:o||"POST",headers:Object.assign(Object.assign(Object.assign({},a),this.headers),s),body:l}).catch(h=>{throw new $T(h)}),c=u.headers.get("x-relay-error");if(c&&c==="true")throw new UT(u);if(!u.ok)throw new HT(u);let f=((r=u.headers.get("Content-Type"))!==null&&r!==void 0?r:"text/plain").split(";")[0].trim(),d;return f==="application/json"?d=yield u.json():f==="application/octet-stream"?d=yield u.blob():f==="multipart/form-data"?d=yield u.formData():d=yield u.text(),{data:d,error:null}}catch(s){return{data:null,error:s}}})}}var qT=function(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("unable to locate global object")},ps=qT();const WT=ps.fetch,Dc=ps.fetch.bind(ps),fv=ps.Headers,KT=ps.Request,zT=ps.Response,To=Object.freeze(Object.defineProperty({__proto__:null,Headers:fv,Request:KT,Response:zT,default:Dc,fetch:WT},Symbol.toStringTag,{value:"Module"}));class GT extends Error{constructor(t){super(t.message),this.name="PostgrestError",this.details=t.details,this.hint=t.hint,this.code=t.code}}class JT{constructor(t){this.shouldThrowOnError=!1,this.method=t.method,this.url=t.url,this.headers=t.headers,this.schema=t.schema,this.body=t.body,this.shouldThrowOnError=t.shouldThrowOnError,this.signal=t.signal,this.isMaybeSingle=t.isMaybeSingle,t.fetch?this.fetch=t.fetch:typeof fetch>"u"?this.fetch=Dc:this.fetch=fetch}throwOnError(){return this.shouldThrowOnError=!0,this}then(t,n){this.schema===void 0||(["GET","HEAD"].includes(this.method)?this.headers["Accept-Profile"]=this.schema:this.headers["Content-Profile"]=this.schema),this.method!=="GET"&&this.method!=="HEAD"&&(this.headers["Content-Type"]="application/json");const r=this.fetch;let s=r(this.url.toString(),{method:this.method,headers:this.headers,body:JSON.stringify(this.body),signal:this.signal}).then(async o=>{var i,a,l;let u=null,c=null,f=null,d=o.status,h=o.statusText;if(o.ok){if(this.method!=="HEAD"){const w=await o.text();w===""||(this.headers.Accept==="text/csv"||this.headers.Accept&&this.headers.Accept.includes("application/vnd.pgrst.plan+text")?c=w:c=JSON.parse(w))}const g=(i=this.headers.Prefer)===null||i===void 0?void 0:i.match(/count=(exact|planned|estimated)/),y=(a=o.headers.get("content-range"))===null||a===void 0?void 0:a.split("/");g&&y&&y.length>1&&(f=parseInt(y[1])),this.isMaybeSingle&&this.method==="GET"&&Array.isArray(c)&&(c.length>1?(u={code:"PGRST116",details:`Results contain ${c.length} rows, application/vnd.pgrst.object+json requires 1 row`,hint:null,message:"JSON object requested, multiple (or no) rows returned"},c=null,f=null,d=406,h="Not Acceptable"):c.length===1?c=c[0]:c=null)}else{const g=await o.text();try{u=JSON.parse(g),Array.isArray(u)&&o.status===404&&(c=[],u=null,d=200,h="OK")}catch{o.status===404&&g===""?(d=204,h="No Content"):u={message:g}}if(u&&this.isMaybeSingle&&(!((l=u==null?void 0:u.details)===null||l===void 0)&&l.includes("0 rows"))&&(u=null,d=200,h="OK"),u&&this.shouldThrowOnError)throw new GT(u)}return{error:u,data:c,count:f,status:d,statusText:h}});return this.shouldThrowOnError||(s=s.catch(o=>{var i,a,l;return{error:{message:`${(i=o==null?void 0:o.name)!==null&&i!==void 0?i:"FetchError"}: ${o==null?void 0:o.message}`,details:`${(a=o==null?void 0:o.stack)!==null&&a!==void 0?a:""}`,hint:"",code:`${(l=o==null?void 0:o.code)!==null&&l!==void 0?l:""}`},data:null,count:null,status:0,statusText:""}})),s.then(t,n)}}class YT extends JT{select(t){let n=!1;const r=(t??"*").split("").map(s=>/\s/.test(s)&&!n?"":(s==='"'&&(n=!n),s)).join("");return this.url.searchParams.set("select",r),this.headers.Prefer&&(this.headers.Prefer+=","),this.headers.Prefer+="return=representation",this}order(t,{ascending:n=!0,nullsFirst:r,foreignTable:s,referencedTable:o=s}={}){const i=o?`${o}.order`:"order",a=this.url.searchParams.get(i);return this.url.searchParams.set(i,`${a?`${a},`:""}${t}.${n?"asc":"desc"}${r===void 0?"":r?".nullsfirst":".nullslast"}`),this}limit(t,{foreignTable:n,referencedTable:r=n}={}){const s=typeof r>"u"?"limit":`${r}.limit`;return this.url.searchParams.set(s,`${t}`),this}range(t,n,{foreignTable:r,referencedTable:s=r}={}){const o=typeof s>"u"?"offset":`${s}.offset`,i=typeof s>"u"?"limit":`${s}.limit`;return this.url.searchParams.set(o,`${t}`),this.url.searchParams.set(i,`${n-t+1}`),this}abortSignal(t){return this.signal=t,this}single(){return this.headers.Accept="application/vnd.pgrst.object+json",this}maybeSingle(){return this.method==="GET"?this.headers.Accept="application/json":this.headers.Accept="application/vnd.pgrst.object+json",this.isMaybeSingle=!0,this}csv(){return this.headers.Accept="text/csv",this}geojson(){return this.headers.Accept="application/geo+json",this}explain({analyze:t=!1,verbose:n=!1,settings:r=!1,buffers:s=!1,wal:o=!1,format:i="text"}={}){var a;const l=[t?"analyze":null,n?"verbose":null,r?"settings":null,s?"buffers":null,o?"wal":null].filter(Boolean).join("|"),u=(a=this.headers.Accept)!==null&&a!==void 0?a:"application/json";return this.headers.Accept=`application/vnd.pgrst.plan+${i}; for="${u}"; options=${l};`,i==="json"?this:this}rollback(){var t;return((t=this.headers.Prefer)!==null&&t!==void 0?t:"").trim().length>0?this.headers.Prefer+=",tx=rollback":this.headers.Prefer="tx=rollback",this}returns(){return this}}class Ur extends YT{eq(t,n){return this.url.searchParams.append(t,`eq.${n}`),this}neq(t,n){return this.url.searchParams.append(t,`neq.${n}`),this}gt(t,n){return this.url.searchParams.append(t,`gt.${n}`),this}gte(t,n){return this.url.searchParams.append(t,`gte.${n}`),this}lt(t,n){return this.url.searchParams.append(t,`lt.${n}`),this}lte(t,n){return this.url.searchParams.append(t,`lte.${n}`),this}like(t,n){return this.url.searchParams.append(t,`like.${n}`),this}likeAllOf(t,n){return this.url.searchParams.append(t,`like(all).{${n.join(",")}}`),this}likeAnyOf(t,n){return this.url.searchParams.append(t,`like(any).{${n.join(",")}}`),this}ilike(t,n){return this.url.searchParams.append(t,`ilike.${n}`),this}ilikeAllOf(t,n){return this.url.searchParams.append(t,`ilike(all).{${n.join(",")}}`),this}ilikeAnyOf(t,n){return this.url.searchParams.append(t,`ilike(any).{${n.join(",")}}`),this}is(t,n){return this.url.searchParams.append(t,`is.${n}`),this}in(t,n){const r=n.map(s=>typeof s=="string"&&new RegExp("[,()]").test(s)?`"${s}"`:`${s}`).join(",");return this.url.searchParams.append(t,`in.(${r})`),this}contains(t,n){return typeof n=="string"?this.url.searchParams.append(t,`cs.${n}`):Array.isArray(n)?this.url.searchParams.append(t,`cs.{${n.join(",")}}`):this.url.searchParams.append(t,`cs.${JSON.stringify(n)}`),this}containedBy(t,n){return typeof n=="string"?this.url.searchParams.append(t,`cd.${n}`):Array.isArray(n)?this.url.searchParams.append(t,`cd.{${n.join(",")}}`):this.url.searchParams.append(t,`cd.${JSON.stringify(n)}`),this}rangeGt(t,n){return this.url.searchParams.append(t,`sr.${n}`),this}rangeGte(t,n){return this.url.searchParams.append(t,`nxl.${n}`),this}rangeLt(t,n){return this.url.searchParams.append(t,`sl.${n}`),this}rangeLte(t,n){return this.url.searchParams.append(t,`nxr.${n}`),this}rangeAdjacent(t,n){return this.url.searchParams.append(t,`adj.${n}`),this}overlaps(t,n){return typeof n=="string"?this.url.searchParams.append(t,`ov.${n}`):this.url.searchParams.append(t,`ov.{${n.join(",")}}`),this}textSearch(t,n,{config:r,type:s}={}){let o="";s==="plain"?o="pl":s==="phrase"?o="ph":s==="websearch"&&(o="w");const i=r===void 0?"":`(${r})`;return this.url.searchParams.append(t,`${o}fts${i}.${n}`),this}match(t){return Object.entries(t).forEach(([n,r])=>{this.url.searchParams.append(n,`eq.${r}`)}),this}not(t,n,r){return this.url.searchParams.append(t,`not.${n}.${r}`),this}or(t,{foreignTable:n,referencedTable:r=n}={}){const s=r?`${r}.or`:"or";return this.url.searchParams.append(s,`(${t})`),this}filter(t,n,r){return this.url.searchParams.append(t,`${n}.${r}`),this}}class XT{constructor(t,{headers:n={},schema:r,fetch:s}){this.url=t,this.headers=n,this.schema=r,this.fetch=s}select(t,{head:n=!1,count:r}={}){const s=n?"HEAD":"GET";let o=!1;const i=(t??"*").split("").map(a=>/\s/.test(a)&&!o?"":(a==='"'&&(o=!o),a)).join("");return this.url.searchParams.set("select",i),r&&(this.headers.Prefer=`count=${r}`),new Ur({method:s,url:this.url,headers:this.headers,schema:this.schema,fetch:this.fetch,allowEmpty:!1})}insert(t,{count:n,defaultToNull:r=!0}={}){const s="POST",o=[];if(this.headers.Prefer&&o.push(this.headers.Prefer),n&&o.push(`count=${n}`),r||o.push("missing=default"),this.headers.Prefer=o.join(","),Array.isArray(t)){const i=t.reduce((a,l)=>a.concat(Object.keys(l)),[]);if(i.length>0){const a=[...new Set(i)].map(l=>`"${l}"`);this.url.searchParams.set("columns",a.join(","))}}return new Ur({method:s,url:this.url,headers:this.headers,schema:this.schema,body:t,fetch:this.fetch,allowEmpty:!1})}upsert(t,{onConflict:n,ignoreDuplicates:r=!1,count:s,defaultToNull:o=!0}={}){const i="POST",a=[`resolution=${r?"ignore":"merge"}-duplicates`];if(n!==void 0&&this.url.searchParams.set("on_conflict",n),this.headers.Prefer&&a.push(this.headers.Prefer),s&&a.push(`count=${s}`),o||a.push("missing=default"),this.headers.Prefer=a.join(","),Array.isArray(t)){const l=t.reduce((u,c)=>u.concat(Object.keys(c)),[]);if(l.length>0){const u=[...new Set(l)].map(c=>`"${c}"`);this.url.searchParams.set("columns",u.join(","))}}return new Ur({method:i,url:this.url,headers:this.headers,schema:this.schema,body:t,fetch:this.fetch,allowEmpty:!1})}update(t,{count:n}={}){const r="PATCH",s=[];return this.headers.Prefer&&s.push(this.headers.Prefer),n&&s.push(`count=${n}`),this.headers.Prefer=s.join(","),new Ur({method:r,url:this.url,headers:this.headers,schema:this.schema,body:t,fetch:this.fetch,allowEmpty:!1})}delete({count:t}={}){const n="DELETE",r=[];return t&&r.push(`count=${t}`),this.headers.Prefer&&r.unshift(this.headers.Prefer),this.headers.Prefer=r.join(","),new Ur({method:n,url:this.url,headers:this.headers,schema:this.schema,fetch:this.fetch,allowEmpty:!1})}}const QT="1.9.2",ZT={"X-Client-Info":`postgrest-js/${QT}`};class jc{constructor(t,{headers:n={},schema:r,fetch:s}={}){this.url=t,this.headers=Object.assign(Object.assign({},ZT),n),this.schemaName=r,this.fetch=s}from(t){const n=new URL(`${this.url}/${t}`);return new XT(n,{headers:Object.assign({},this.headers),schema:this.schemaName,fetch:this.fetch})}schema(t){return new jc(this.url,{headers:this.headers,schema:t,fetch:this.fetch})}rpc(t,n={},{head:r=!1,count:s}={}){let o;const i=new URL(`${this.url}/rpc/${t}`);let a;r?(o="HEAD",Object.entries(n).forEach(([u,c])=>{i.searchParams.append(u,`${c}`)})):(o="POST",a=n);const l=Object.assign({},this.headers);return s&&(l.Prefer=`count=${s}`),new Ur({method:o,url:i,headers:l,schema:this.schemaName,body:a,fetch:this.fetch,allowEmpty:!1})}}const eP="2.9.3",tP={"X-Client-Info":`realtime-js/${eP}`},nP="1.0.0",dv=1e4,rP=1e3;var es;(function(e){e[e.connecting=0]="connecting",e[e.open=1]="open",e[e.closing=2]="closing",e[e.closed=3]="closed"})(es||(es={}));var tn;(function(e){e.closed="closed",e.errored="errored",e.joined="joined",e.joining="joining",e.leaving="leaving"})(tn||(tn={}));var mn;(function(e){e.close="phx_close",e.error="phx_error",e.join="phx_join",e.reply="phx_reply",e.leave="phx_leave",e.access_token="access_token"})(mn||(mn={}));var xl;(function(e){e.websocket="websocket"})(xl||(xl={}));var ur;(function(e){e.Connecting="connecting",e.Open="open",e.Closing="closing",e.Closed="closed"})(ur||(ur={}));class hv{constructor(t,n){this.callback=t,this.timerCalc=n,this.timer=void 0,this.tries=0,this.callback=t,this.timerCalc=n}reset(){this.tries=0,clearTimeout(this.timer)}scheduleTimeout(){clearTimeout(this.timer),this.timer=setTimeout(()=>{this.tries=this.tries+1,this.callback()},this.timerCalc(this.tries+1))}}class sP{constructor(){this.HEADER_LENGTH=1}decode(t,n){return t.constructor===ArrayBuffer?n(this._binaryDecode(t)):n(typeof t=="string"?JSON.parse(t):{})}_binaryDecode(t){const n=new DataView(t),r=new TextDecoder;return this._decodeBroadcast(t,n,r)}_decodeBroadcast(t,n,r){const s=n.getUint8(1),o=n.getUint8(2);let i=this.HEADER_LENGTH+2;const a=r.decode(t.slice(i,i+s));i=i+s;const l=r.decode(t.slice(i,i+o));i=i+o;const u=JSON.parse(r.decode(t.slice(i,t.byteLength)));return{ref:null,topic:a,event:l,payload:u}}}class Va{constructor(t,n,r={},s=dv){this.channel=t,this.event=n,this.payload=r,this.timeout=s,this.sent=!1,this.timeoutTimer=void 0,this.ref="",this.receivedResp=null,this.recHooks=[],this.refEvent=null}resend(t){this.timeout=t,this._cancelRefEvent(),this.ref="",this.refEvent=null,this.receivedResp=null,this.sent=!1,this.send()}send(){this._hasReceived("timeout")||(this.startTimeout(),this.sent=!0,this.channel.socket.push({topic:this.channel.topic,event:this.event,payload:this.payload,ref:this.ref,join_ref:this.channel._joinRef()}))}updatePayload(t){this.payload=Object.assign(Object.assign({},this.payload),t)}receive(t,n){var r;return this._hasReceived(t)&&n((r=this.receivedResp)===null||r===void 0?void 0:r.response),this.recHooks.push({status:t,callback:n}),this}startTimeout(){if(this.timeoutTimer)return;this.ref=this.channel.socket._makeRef(),this.refEvent=this.channel._replyEventName(this.ref);const t=n=>{this._cancelRefEvent(),this._cancelTimeout(),this.receivedResp=n,this._matchReceive(n)};this.channel._on(this.refEvent,{},t),this.timeoutTimer=setTimeout(()=>{this.trigger("timeout",{})},this.timeout)}trigger(t,n){this.refEvent&&this.channel._trigger(this.refEvent,{status:t,response:n})}destroy(){this._cancelRefEvent(),this._cancelTimeout()}_cancelRefEvent(){this.refEvent&&this.channel._off(this.refEvent,{})}_cancelTimeout(){clearTimeout(this.timeoutTimer),this.timeoutTimer=void 0}_matchReceive({status:t,response:n}){this.recHooks.filter(r=>r.status===t).forEach(r=>r.callback(n))}_hasReceived(t){return this.receivedResp&&this.receivedResp.status===t}}var xf;(function(e){e.SYNC="sync",e.JOIN="join",e.LEAVE="leave"})(xf||(xf={}));class Ws{constructor(t,n){this.channel=t,this.state={},this.pendingDiffs=[],this.joinRef=null,this.caller={onJoin:()=>{},onLeave:()=>{},onSync:()=>{}};const r=(n==null?void 0:n.events)||{state:"presence_state",diff:"presence_diff"};this.channel._on(r.state,{},s=>{const{onJoin:o,onLeave:i,onSync:a}=this.caller;this.joinRef=this.channel._joinRef(),this.state=Ws.syncState(this.state,s,o,i),this.pendingDiffs.forEach(l=>{this.state=Ws.syncDiff(this.state,l,o,i)}),this.pendingDiffs=[],a()}),this.channel._on(r.diff,{},s=>{const{onJoin:o,onLeave:i,onSync:a}=this.caller;this.inPendingSyncState()?this.pendingDiffs.push(s):(this.state=Ws.syncDiff(this.state,s,o,i),a())}),this.onJoin((s,o,i)=>{this.channel._trigger("presence",{event:"join",key:s,currentPresences:o,newPresences:i})}),this.onLeave((s,o,i)=>{this.channel._trigger("presence",{event:"leave",key:s,currentPresences:o,leftPresences:i})}),this.onSync(()=>{this.channel._trigger("presence",{event:"sync"})})}static syncState(t,n,r,s){const o=this.cloneDeep(t),i=this.transformState(n),a={},l={};return this.map(o,(u,c)=>{i[u]||(l[u]=c)}),this.map(i,(u,c)=>{const f=o[u];if(f){const d=c.map(y=>y.presence_ref),h=f.map(y=>y.presence_ref),p=c.filter(y=>h.indexOf(y.presence_ref)<0),g=f.filter(y=>d.indexOf(y.presence_ref)<0);p.length>0&&(a[u]=p),g.length>0&&(l[u]=g)}else a[u]=c}),this.syncDiff(o,{joins:a,leaves:l},r,s)}static syncDiff(t,n,r,s){const{joins:o,leaves:i}={joins:this.transformState(n.joins),leaves:this.transformState(n.leaves)};return r||(r=()=>{}),s||(s=()=>{}),this.map(o,(a,l)=>{var u;const c=(u=t[a])!==null&&u!==void 0?u:[];if(t[a]=this.cloneDeep(l),c.length>0){const f=t[a].map(h=>h.presence_ref),d=c.filter(h=>f.indexOf(h.presence_ref)<0);t[a].unshift(...d)}r(a,c,l)}),this.map(i,(a,l)=>{let u=t[a];if(!u)return;const c=l.map(f=>f.presence_ref);u=u.filter(f=>c.indexOf(f.presence_ref)<0),t[a]=u,s(a,u,l),u.length===0&&delete t[a]}),t}static map(t,n){return Object.getOwnPropertyNames(t).map(r=>n(r,t[r]))}static transformState(t){return t=this.cloneDeep(t),Object.getOwnPropertyNames(t).reduce((n,r)=>{const s=t[r];return"metas"in s?n[r]=s.metas.map(o=>(o.presence_ref=o.phx_ref,delete o.phx_ref,delete o.phx_ref_prev,o)):n[r]=s,n},{})}static cloneDeep(t){return JSON.parse(JSON.stringify(t))}onJoin(t){this.caller.onJoin=t}onLeave(t){this.caller.onLeave=t}onSync(t){this.caller.onSync=t}inPendingSyncState(){return!this.joinRef||this.joinRef!==this.channel._joinRef()}}var Re;(function(e){e.abstime="abstime",e.bool="bool",e.date="date",e.daterange="daterange",e.float4="float4",e.float8="float8",e.int2="int2",e.int4="int4",e.int4range="int4range",e.int8="int8",e.int8range="int8range",e.json="json",e.jsonb="jsonb",e.money="money",e.numeric="numeric",e.oid="oid",e.reltime="reltime",e.text="text",e.time="time",e.timestamp="timestamp",e.timestamptz="timestamptz",e.timetz="timetz",e.tsrange="tsrange",e.tstzrange="tstzrange"})(Re||(Re={}));const Df=(e,t,n={})=>{var r;const s=(r=n.skipTypes)!==null&&r!==void 0?r:[];return Object.keys(t).reduce((o,i)=>(o[i]=oP(i,e,t,s),o),{})},oP=(e,t,n,r)=>{const s=t.find(a=>a.name===e),o=s==null?void 0:s.type,i=n[e];return o&&!r.includes(o)?pv(o,i):Dl(i)},pv=(e,t)=>{if(e.charAt(0)==="_"){const n=e.slice(1,e.length);return cP(t,n)}switch(e){case Re.bool:return iP(t);case Re.float4:case Re.float8:case Re.int2:case Re.int4:case Re.int8:case Re.numeric:case Re.oid:return aP(t);case Re.json:case Re.jsonb:return lP(t);case Re.timestamp:return uP(t);case Re.abstime:case Re.date:case Re.daterange:case Re.int4range:case Re.int8range:case Re.money:case Re.reltime:case Re.text:case Re.time:case Re.timestamptz:case Re.timetz:case Re.tsrange:case Re.tstzrange:return Dl(t);default:return Dl(t)}},Dl=e=>e,iP=e=>{switch(e){case"t":return!0;case"f":return!1;default:return e}},aP=e=>{if(typeof e=="string"){const t=parseFloat(e);if(!Number.isNaN(t))return t}return e},lP=e=>{if(typeof e=="string")try{return JSON.parse(e)}catch(t){return console.log(`JSON parse error: ${t}`),e}return e},cP=(e,t)=>{if(typeof e!="string")return e;const n=e.length-1,r=e[n];if(e[0]==="{"&&r==="}"){let o;const i=e.slice(1,n);try{o=JSON.parse("["+i+"]")}catch{o=i?i.split(","):[]}return o.map(a=>pv(t,a))}return e},uP=e=>typeof e=="string"?e.replace(" ","T"):e;var jf;(function(e){e.ALL="*",e.INSERT="INSERT",e.UPDATE="UPDATE",e.DELETE="DELETE"})(jf||(jf={}));var Mf;(function(e){e.BROADCAST="broadcast",e.PRESENCE="presence",e.POSTGRES_CHANGES="postgres_changes"})(Mf||(Mf={}));var Nf;(function(e){e.SUBSCRIBED="SUBSCRIBED",e.TIMED_OUT="TIMED_OUT",e.CLOSED="CLOSED",e.CHANNEL_ERROR="CHANNEL_ERROR"})(Nf||(Nf={}));class Mc{constructor(t,n={config:{}},r){this.topic=t,this.params=n,this.socket=r,this.bindings={},this.state=tn.closed,this.joinedOnce=!1,this.pushBuffer=[],this.subTopic=t.replace(/^realtime:/i,""),this.params.config=Object.assign({broadcast:{ack:!1,self:!1},presence:{key:""}},n.config),this.timeout=this.socket.timeout,this.joinPush=new Va(this,mn.join,this.params,this.timeout),this.rejoinTimer=new hv(()=>this._rejoinUntilConnected(),this.socket.reconnectAfterMs),this.joinPush.receive("ok",()=>{this.state=tn.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach(s=>s.send()),this.pushBuffer=[]}),this._onClose(()=>{this.rejoinTimer.reset(),this.socket.log("channel",`close ${this.topic} ${this._joinRef()}`),this.state=tn.closed,this.socket._remove(this)}),this._onError(s=>{this._isLeaving()||this._isClosed()||(this.socket.log("channel",`error ${this.topic}`,s),this.state=tn.errored,this.rejoinTimer.scheduleTimeout())}),this.joinPush.receive("timeout",()=>{this._isJoining()&&(this.socket.log("channel",`timeout ${this.topic}`,this.joinPush.timeout),this.state=tn.errored,this.rejoinTimer.scheduleTimeout())}),this._on(mn.reply,{},(s,o)=>{this._trigger(this._replyEventName(o),s)}),this.presence=new Ws(this),this.broadcastEndpointURL=this._broadcastEndpointURL()}subscribe(t,n=this.timeout){var r,s;if(this.socket.isConnected()||this.socket.connect(),this.joinedOnce)throw"tried to subscribe multiple times. 'subscribe' can only be called a single time per channel instance";{const{config:{broadcast:o,presence:i}}=this.params;this._onError(u=>t&&t("CHANNEL_ERROR",u)),this._onClose(()=>t&&t("CLOSED"));const a={},l={broadcast:o,presence:i,postgres_changes:(s=(r=this.bindings.postgres_changes)===null||r===void 0?void 0:r.map(u=>u.filter))!==null&&s!==void 0?s:[]};this.socket.accessToken&&(a.access_token=this.socket.accessToken),this.updateJoinPayload(Object.assign({config:l},a)),this.joinedOnce=!0,this._rejoin(n),this.joinPush.receive("ok",({postgres_changes:u})=>{var c;if(this.socket.accessToken&&this.socket.setAuth(this.socket.accessToken),u===void 0){t&&t("SUBSCRIBED");return}else{const f=this.bindings.postgres_changes,d=(c=f==null?void 0:f.length)!==null&&c!==void 0?c:0,h=[];for(let p=0;p{t&&t("CHANNEL_ERROR",new Error(JSON.stringify(Object.values(u).join(", ")||"error")))}).receive("timeout",()=>{t&&t("TIMED_OUT")})}return this}presenceState(){return this.presence.state}async track(t,n={}){return await this.send({type:"presence",event:"track",payload:t},n.timeout||this.timeout)}async untrack(t={}){return await this.send({type:"presence",event:"untrack"},t)}on(t,n,r){return this._on(t,n,r)}async send(t,n={}){var r,s;if(!this._canPush()&&t.type==="broadcast"){const{event:o,payload:i}=t,a={method:"POST",headers:{apikey:(r=this.socket.apiKey)!==null&&r!==void 0?r:"","Content-Type":"application/json"},body:JSON.stringify({messages:[{topic:this.subTopic,event:o,payload:i}]})};try{return(await this._fetchWithTimeout(this.broadcastEndpointURL,a,(s=n.timeout)!==null&&s!==void 0?s:this.timeout)).ok?"ok":"error"}catch(l){return l.name==="AbortError"?"timed out":"error"}}else return new Promise(o=>{var i,a,l;const u=this._push(t.type,t,n.timeout||this.timeout);t.type==="broadcast"&&!(!((l=(a=(i=this.params)===null||i===void 0?void 0:i.config)===null||a===void 0?void 0:a.broadcast)===null||l===void 0)&&l.ack)&&o("ok"),u.receive("ok",()=>o("ok")),u.receive("timeout",()=>o("timed out"))})}updateJoinPayload(t){this.joinPush.updatePayload(t)}unsubscribe(t=this.timeout){this.state=tn.leaving;const n=()=>{this.socket.log("channel",`leave ${this.topic}`),this._trigger(mn.close,"leave",this._joinRef())};return this.rejoinTimer.reset(),this.joinPush.destroy(),new Promise(r=>{const s=new Va(this,mn.leave,{},t);s.receive("ok",()=>{n(),r("ok")}).receive("timeout",()=>{n(),r("timed out")}).receive("error",()=>{r("error")}),s.send(),this._canPush()||s.trigger("ok",{})})}_broadcastEndpointURL(){let t=this.socket.endPoint;return t=t.replace(/^ws/i,"http"),t=t.replace(/(\/socket\/websocket|\/socket|\/websocket)\/?$/i,""),t.replace(/\/+$/,"")+"/api/broadcast"}async _fetchWithTimeout(t,n,r){const s=new AbortController,o=setTimeout(()=>s.abort(),r),i=await this.socket.fetch(t,Object.assign(Object.assign({},n),{signal:s.signal}));return clearTimeout(o),i}_push(t,n,r=this.timeout){if(!this.joinedOnce)throw`tried to push '${t}' to '${this.topic}' before joining. Use channel.subscribe() before pushing events`;let s=new Va(this,t,n,r);return this._canPush()?s.send():(s.startTimeout(),this.pushBuffer.push(s)),s}_onMessage(t,n,r){return n}_isMember(t){return this.topic===t}_joinRef(){return this.joinPush.ref}_trigger(t,n,r){var s,o;const i=t.toLocaleLowerCase(),{close:a,error:l,leave:u,join:c}=mn;if(r&&[a,l,u,c].indexOf(i)>=0&&r!==this._joinRef())return;let d=this._onMessage(i,n,r);if(n&&!d)throw"channel onMessage callbacks must return the payload, modified or unmodified";["insert","update","delete"].includes(i)?(s=this.bindings.postgres_changes)===null||s===void 0||s.filter(h=>{var p,g,y;return((p=h.filter)===null||p===void 0?void 0:p.event)==="*"||((y=(g=h.filter)===null||g===void 0?void 0:g.event)===null||y===void 0?void 0:y.toLocaleLowerCase())===i}).map(h=>h.callback(d,r)):(o=this.bindings[i])===null||o===void 0||o.filter(h=>{var p,g,y,w,m,v;if(["broadcast","presence","postgres_changes"].includes(i))if("id"in h){const b=h.id,E=(p=h.filter)===null||p===void 0?void 0:p.event;return b&&((g=n.ids)===null||g===void 0?void 0:g.includes(b))&&(E==="*"||(E==null?void 0:E.toLocaleLowerCase())===((y=n.data)===null||y===void 0?void 0:y.type.toLocaleLowerCase()))}else{const b=(m=(w=h==null?void 0:h.filter)===null||w===void 0?void 0:w.event)===null||m===void 0?void 0:m.toLocaleLowerCase();return b==="*"||b===((v=n==null?void 0:n.event)===null||v===void 0?void 0:v.toLocaleLowerCase())}else return h.type.toLocaleLowerCase()===i}).map(h=>{if(typeof d=="object"&&"ids"in d){const p=d.data,{schema:g,table:y,commit_timestamp:w,type:m,errors:v}=p;d=Object.assign(Object.assign({},{schema:g,table:y,commit_timestamp:w,eventType:m,new:{},old:{},errors:v}),this._getPayloadRecords(p))}h.callback(d,r)})}_isClosed(){return this.state===tn.closed}_isJoined(){return this.state===tn.joined}_isJoining(){return this.state===tn.joining}_isLeaving(){return this.state===tn.leaving}_replyEventName(t){return`chan_reply_${t}`}_on(t,n,r){const s=t.toLocaleLowerCase(),o={type:s,filter:n,callback:r};return this.bindings[s]?this.bindings[s].push(o):this.bindings[s]=[o],this}_off(t,n){const r=t.toLocaleLowerCase();return this.bindings[r]=this.bindings[r].filter(s=>{var o;return!(((o=s.type)===null||o===void 0?void 0:o.toLocaleLowerCase())===r&&Mc.isEqual(s.filter,n))}),this}static isEqual(t,n){if(Object.keys(t).length!==Object.keys(n).length)return!1;for(const r in t)if(t[r]!==n[r])return!1;return!0}_rejoinUntilConnected(){this.rejoinTimer.scheduleTimeout(),this.socket.isConnected()&&this._rejoin()}_onClose(t){this._on(mn.close,{},t)}_onError(t){this._on(mn.error,{},n=>t(n))}_canPush(){return this.socket.isConnected()&&this._isJoined()}_rejoin(t=this.timeout){this._isLeaving()||(this.socket._leaveOpenTopic(this.topic),this.state=tn.joining,this.joinPush.resend(t))}_getPayloadRecords(t){const n={new:{},old:{}};return(t.type==="INSERT"||t.type==="UPDATE")&&(n.new=Df(t.columns,t.record)),(t.type==="UPDATE"||t.type==="DELETE")&&(n.old=Df(t.columns,t.old_record)),n}}const fP=()=>{},dP=typeof WebSocket<"u";class hP{constructor(t,n){var r;this.accessToken=null,this.apiKey=null,this.channels=[],this.endPoint="",this.headers=tP,this.params={},this.timeout=dv,this.heartbeatIntervalMs=3e4,this.heartbeatTimer=void 0,this.pendingHeartbeatRef=null,this.ref=0,this.logger=fP,this.conn=null,this.sendBuffer=[],this.serializer=new sP,this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this._resolveFetch=o=>{let i;return o?i=o:typeof fetch>"u"?i=(...a)=>B(()=>Promise.resolve().then(()=>To),void 0,import.meta.url).then(({default:l})=>l(...a)):i=fetch,(...a)=>i(...a)},this.endPoint=`${t}/${xl.websocket}`,n!=null&&n.transport?this.transport=n.transport:this.transport=null,n!=null&&n.params&&(this.params=n.params),n!=null&&n.headers&&(this.headers=Object.assign(Object.assign({},this.headers),n.headers)),n!=null&&n.timeout&&(this.timeout=n.timeout),n!=null&&n.logger&&(this.logger=n.logger),n!=null&&n.heartbeatIntervalMs&&(this.heartbeatIntervalMs=n.heartbeatIntervalMs);const s=(r=n==null?void 0:n.params)===null||r===void 0?void 0:r.apikey;s&&(this.accessToken=s,this.apiKey=s),this.reconnectAfterMs=n!=null&&n.reconnectAfterMs?n.reconnectAfterMs:o=>[1e3,2e3,5e3,1e4][o-1]||1e4,this.encode=n!=null&&n.encode?n.encode:(o,i)=>i(JSON.stringify(o)),this.decode=n!=null&&n.decode?n.decode:this.serializer.decode.bind(this.serializer),this.reconnectTimer=new hv(async()=>{this.disconnect(),this.connect()},this.reconnectAfterMs),this.fetch=this._resolveFetch(n==null?void 0:n.fetch)}connect(){if(!this.conn){if(this.transport){this.conn=new this.transport(this._endPointURL(),void 0,{headers:this.headers});return}if(dP){this.conn=new WebSocket(this._endPointURL()),this.setupConnection();return}this.conn=new pP(this._endPointURL(),void 0,{close:()=>{this.conn=null}}),B(()=>import("./browser.Bdhvn36h.js").then(t=>t.b),__vite__mapDeps([230,8]),import.meta.url).then(({default:t})=>{this.conn=new t(this._endPointURL(),void 0,{headers:this.headers}),this.setupConnection()})}}disconnect(t,n){this.conn&&(this.conn.onclose=function(){},t?this.conn.close(t,n??""):this.conn.close(),this.conn=null,this.heartbeatTimer&&clearInterval(this.heartbeatTimer),this.reconnectTimer.reset())}getChannels(){return this.channels}async removeChannel(t){const n=await t.unsubscribe();return this.channels.length===0&&this.disconnect(),n}async removeAllChannels(){const t=await Promise.all(this.channels.map(n=>n.unsubscribe()));return this.disconnect(),t}log(t,n,r){this.logger(t,n,r)}connectionState(){switch(this.conn&&this.conn.readyState){case es.connecting:return ur.Connecting;case es.open:return ur.Open;case es.closing:return ur.Closing;default:return ur.Closed}}isConnected(){return this.connectionState()===ur.Open}channel(t,n={config:{}}){const r=new Mc(`realtime:${t}`,n,this);return this.channels.push(r),r}push(t){const{topic:n,event:r,payload:s,ref:o}=t,i=()=>{this.encode(t,a=>{var l;(l=this.conn)===null||l===void 0||l.send(a)})};this.log("push",`${n} ${r} (${o})`,s),this.isConnected()?i():this.sendBuffer.push(i)}setAuth(t){this.accessToken=t,this.channels.forEach(n=>{t&&n.updateJoinPayload({access_token:t}),n.joinedOnce&&n._isJoined()&&n._push(mn.access_token,{access_token:t})})}_makeRef(){let t=this.ref+1;return t===this.ref?this.ref=0:this.ref=t,this.ref.toString()}_leaveOpenTopic(t){let n=this.channels.find(r=>r.topic===t&&(r._isJoined()||r._isJoining()));n&&(this.log("transport",`leaving duplicate topic "${t}"`),n.unsubscribe())}_remove(t){this.channels=this.channels.filter(n=>n._joinRef()!==t._joinRef())}setupConnection(){this.conn&&(this.conn.binaryType="arraybuffer",this.conn.onopen=()=>this._onConnOpen(),this.conn.onerror=t=>this._onConnError(t),this.conn.onmessage=t=>this._onConnMessage(t),this.conn.onclose=t=>this._onConnClose(t))}_endPointURL(){return this._appendParams(this.endPoint,Object.assign({},this.params,{vsn:nP}))}_onConnMessage(t){this.decode(t.data,n=>{let{topic:r,event:s,payload:o,ref:i}=n;(i&&i===this.pendingHeartbeatRef||s===(o==null?void 0:o.type))&&(this.pendingHeartbeatRef=null),this.log("receive",`${o.status||""} ${r} ${s} ${i&&"("+i+")"||""}`,o),this.channels.filter(a=>a._isMember(r)).forEach(a=>a._trigger(s,o,i)),this.stateChangeCallbacks.message.forEach(a=>a(n))})}_onConnOpen(){this.log("transport",`connected to ${this._endPointURL()}`),this._flushSendBuffer(),this.reconnectTimer.reset(),this.heartbeatTimer&&clearInterval(this.heartbeatTimer),this.heartbeatTimer=setInterval(()=>this._sendHeartbeat(),this.heartbeatIntervalMs),this.stateChangeCallbacks.open.forEach(t=>t())}_onConnClose(t){this.log("transport","close",t),this._triggerChanError(),this.heartbeatTimer&&clearInterval(this.heartbeatTimer),this.reconnectTimer.scheduleTimeout(),this.stateChangeCallbacks.close.forEach(n=>n(t))}_onConnError(t){this.log("transport",t.message),this._triggerChanError(),this.stateChangeCallbacks.error.forEach(n=>n(t))}_triggerChanError(){this.channels.forEach(t=>t._trigger(mn.error))}_appendParams(t,n){if(Object.keys(n).length===0)return t;const r=t.match(/\?/)?"&":"?",s=new URLSearchParams(n);return`${t}${r}${s}`}_flushSendBuffer(){this.isConnected()&&this.sendBuffer.length>0&&(this.sendBuffer.forEach(t=>t()),this.sendBuffer=[])}_sendHeartbeat(){var t;if(this.isConnected()){if(this.pendingHeartbeatRef){this.pendingHeartbeatRef=null,this.log("transport","heartbeat timeout. Attempting to re-establish connection"),(t=this.conn)===null||t===void 0||t.close(rP,"hearbeat timeout");return}this.pendingHeartbeatRef=this._makeRef(),this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:this.pendingHeartbeatRef}),this.setAuth(this.accessToken)}}}class pP{constructor(t,n,r){this.binaryType="arraybuffer",this.onclose=()=>{},this.onerror=()=>{},this.onmessage=()=>{},this.onopen=()=>{},this.readyState=es.connecting,this.send=()=>{},this.url=null,this.url=t,this.close=r.close}}class Nc extends Error{constructor(t){super(t),this.__isStorageError=!0,this.name="StorageError"}}function Ye(e){return typeof e=="object"&&e!==null&&"__isStorageError"in e}class vP extends Nc{constructor(t,n){super(t),this.name="StorageApiError",this.status=n}toJSON(){return{name:this.name,message:this.message,status:this.status}}}class Ff extends Nc{constructor(t,n){super(t),this.name="StorageUnknownError",this.originalError=n}}var mP=function(e,t,n,r){function s(o){return o instanceof n?o:new n(function(i){i(o)})}return new(n||(n=Promise))(function(o,i){function a(c){try{u(r.next(c))}catch(f){i(f)}}function l(c){try{u(r.throw(c))}catch(f){i(f)}}function u(c){c.done?o(c.value):s(c.value).then(a,l)}u((r=r.apply(e,t||[])).next())})};const vv=e=>{let t;return e?t=e:typeof fetch>"u"?t=(...n)=>B(()=>Promise.resolve().then(()=>To),void 0,import.meta.url).then(({default:r})=>r(...n)):t=fetch,(...n)=>t(...n)},gP=()=>mP(void 0,void 0,void 0,function*(){return typeof Response>"u"?(yield B(()=>Promise.resolve().then(()=>To),void 0,import.meta.url)).Response:Response});var _s=function(e,t,n,r){function s(o){return o instanceof n?o:new n(function(i){i(o)})}return new(n||(n=Promise))(function(o,i){function a(c){try{u(r.next(c))}catch(f){i(f)}}function l(c){try{u(r.throw(c))}catch(f){i(f)}}function u(c){c.done?o(c.value):s(c.value).then(a,l)}u((r=r.apply(e,t||[])).next())})};const Ba=e=>e.msg||e.message||e.error_description||e.error||JSON.stringify(e),yP=(e,t)=>_s(void 0,void 0,void 0,function*(){const n=yield gP();e instanceof n?e.json().then(r=>{t(new vP(Ba(r),e.status||500))}).catch(r=>{t(new Ff(Ba(r),r))}):t(new Ff(Ba(e),e))}),wP=(e,t,n,r)=>{const s={method:e,headers:(t==null?void 0:t.headers)||{}};return e==="GET"?s:(s.headers=Object.assign({"Content-Type":"application/json"},t==null?void 0:t.headers),s.body=JSON.stringify(r),Object.assign(Object.assign({},s),n))};function Ji(e,t,n,r,s,o){return _s(this,void 0,void 0,function*(){return new Promise((i,a)=>{e(n,wP(t,r,s,o)).then(l=>{if(!l.ok)throw l;return r!=null&&r.noResolveJson?l:l.json()}).then(l=>i(l)).catch(l=>yP(l,a))})})}function jl(e,t,n,r){return _s(this,void 0,void 0,function*(){return Ji(e,"GET",t,n,r)})}function Kn(e,t,n,r,s){return _s(this,void 0,void 0,function*(){return Ji(e,"POST",t,r,s,n)})}function bP(e,t,n,r,s){return _s(this,void 0,void 0,function*(){return Ji(e,"PUT",t,r,s,n)})}function mv(e,t,n,r,s){return _s(this,void 0,void 0,function*(){return Ji(e,"DELETE",t,r,s,n)})}var an=function(e,t,n,r){function s(o){return o instanceof n?o:new n(function(i){i(o)})}return new(n||(n=Promise))(function(o,i){function a(c){try{u(r.next(c))}catch(f){i(f)}}function l(c){try{u(r.throw(c))}catch(f){i(f)}}function u(c){c.done?o(c.value):s(c.value).then(a,l)}u((r=r.apply(e,t||[])).next())})};const _P={limit:100,offset:0,sortBy:{column:"name",order:"asc"}},$f={cacheControl:"3600",contentType:"text/plain;charset=UTF-8",upsert:!1};class EP{constructor(t,n={},r,s){this.url=t,this.headers=n,this.bucketId=r,this.fetch=vv(s)}uploadOrUpdate(t,n,r,s){return an(this,void 0,void 0,function*(){try{let o;const i=Object.assign(Object.assign({},$f),s),a=Object.assign(Object.assign({},this.headers),t==="POST"&&{"x-upsert":String(i.upsert)});typeof Blob<"u"&&r instanceof Blob?(o=new FormData,o.append("cacheControl",i.cacheControl),o.append("",r)):typeof FormData<"u"&&r instanceof FormData?(o=r,o.append("cacheControl",i.cacheControl)):(o=r,a["cache-control"]=`max-age=${i.cacheControl}`,a["content-type"]=i.contentType);const l=this._removeEmptyFolders(n),u=this._getFinalPath(l),c=yield this.fetch(`${this.url}/object/${u}`,Object.assign({method:t,body:o,headers:a},i!=null&&i.duplex?{duplex:i.duplex}:{})),f=yield c.json();return c.ok?{data:{path:l,id:f.Id,fullPath:f.Key},error:null}:{data:null,error:f}}catch(o){if(Ye(o))return{data:null,error:o};throw o}})}upload(t,n,r){return an(this,void 0,void 0,function*(){return this.uploadOrUpdate("POST",t,n,r)})}uploadToSignedUrl(t,n,r,s){return an(this,void 0,void 0,function*(){const o=this._removeEmptyFolders(t),i=this._getFinalPath(o),a=new URL(this.url+`/object/upload/sign/${i}`);a.searchParams.set("token",n);try{let l;const u=Object.assign({upsert:$f.upsert},s),c=Object.assign(Object.assign({},this.headers),{"x-upsert":String(u.upsert)});typeof Blob<"u"&&r instanceof Blob?(l=new FormData,l.append("cacheControl",u.cacheControl),l.append("",r)):typeof FormData<"u"&&r instanceof FormData?(l=r,l.append("cacheControl",u.cacheControl)):(l=r,c["cache-control"]=`max-age=${u.cacheControl}`,c["content-type"]=u.contentType);const f=yield this.fetch(a.toString(),{method:"PUT",body:l,headers:c}),d=yield f.json();return f.ok?{data:{path:o,fullPath:d.Key},error:null}:{data:null,error:d}}catch(l){if(Ye(l))return{data:null,error:l};throw l}})}createSignedUploadUrl(t){return an(this,void 0,void 0,function*(){try{let n=this._getFinalPath(t);const r=yield Kn(this.fetch,`${this.url}/object/upload/sign/${n}`,{},{headers:this.headers}),s=new URL(this.url+r.url),o=s.searchParams.get("token");if(!o)throw new Nc("No token returned by API");return{data:{signedUrl:s.toString(),path:t,token:o},error:null}}catch(n){if(Ye(n))return{data:null,error:n};throw n}})}update(t,n,r){return an(this,void 0,void 0,function*(){return this.uploadOrUpdate("PUT",t,n,r)})}move(t,n){return an(this,void 0,void 0,function*(){try{return{data:yield Kn(this.fetch,`${this.url}/object/move`,{bucketId:this.bucketId,sourceKey:t,destinationKey:n},{headers:this.headers}),error:null}}catch(r){if(Ye(r))return{data:null,error:r};throw r}})}copy(t,n){return an(this,void 0,void 0,function*(){try{return{data:{path:(yield Kn(this.fetch,`${this.url}/object/copy`,{bucketId:this.bucketId,sourceKey:t,destinationKey:n},{headers:this.headers})).Key},error:null}}catch(r){if(Ye(r))return{data:null,error:r};throw r}})}createSignedUrl(t,n,r){return an(this,void 0,void 0,function*(){try{let s=this._getFinalPath(t),o=yield Kn(this.fetch,`${this.url}/object/sign/${s}`,Object.assign({expiresIn:n},r!=null&&r.transform?{transform:r.transform}:{}),{headers:this.headers});const i=r!=null&&r.download?`&download=${r.download===!0?"":r.download}`:"";return o={signedUrl:encodeURI(`${this.url}${o.signedURL}${i}`)},{data:o,error:null}}catch(s){if(Ye(s))return{data:null,error:s};throw s}})}createSignedUrls(t,n,r){return an(this,void 0,void 0,function*(){try{const s=yield Kn(this.fetch,`${this.url}/object/sign/${this.bucketId}`,{expiresIn:n,paths:t},{headers:this.headers}),o=r!=null&&r.download?`&download=${r.download===!0?"":r.download}`:"";return{data:s.map(i=>Object.assign(Object.assign({},i),{signedUrl:i.signedURL?encodeURI(`${this.url}${i.signedURL}${o}`):null})),error:null}}catch(s){if(Ye(s))return{data:null,error:s};throw s}})}download(t,n){return an(this,void 0,void 0,function*(){const s=typeof(n==null?void 0:n.transform)<"u"?"render/image/authenticated":"object",o=this.transformOptsToQueryString((n==null?void 0:n.transform)||{}),i=o?`?${o}`:"";try{const a=this._getFinalPath(t);return{data:yield(yield jl(this.fetch,`${this.url}/${s}/${a}${i}`,{headers:this.headers,noResolveJson:!0})).blob(),error:null}}catch(a){if(Ye(a))return{data:null,error:a};throw a}})}getPublicUrl(t,n){const r=this._getFinalPath(t),s=[],o=n!=null&&n.download?`download=${n.download===!0?"":n.download}`:"";o!==""&&s.push(o);const a=typeof(n==null?void 0:n.transform)<"u"?"render/image":"object",l=this.transformOptsToQueryString((n==null?void 0:n.transform)||{});l!==""&&s.push(l);let u=s.join("&");return u!==""&&(u=`?${u}`),{data:{publicUrl:encodeURI(`${this.url}/${a}/public/${r}${u}`)}}}remove(t){return an(this,void 0,void 0,function*(){try{return{data:yield mv(this.fetch,`${this.url}/object/${this.bucketId}`,{prefixes:t},{headers:this.headers}),error:null}}catch(n){if(Ye(n))return{data:null,error:n};throw n}})}list(t,n,r){return an(this,void 0,void 0,function*(){try{const s=Object.assign(Object.assign(Object.assign({},_P),n),{prefix:t||""});return{data:yield Kn(this.fetch,`${this.url}/object/list/${this.bucketId}`,s,{headers:this.headers},r),error:null}}catch(s){if(Ye(s))return{data:null,error:s};throw s}})}_getFinalPath(t){return`${this.bucketId}/${t}`}_removeEmptyFolders(t){return t.replace(/^\/|\/$/g,"").replace(/\/+/g,"/")}transformOptsToQueryString(t){const n=[];return t.width&&n.push(`width=${t.width}`),t.height&&n.push(`height=${t.height}`),t.resize&&n.push(`resize=${t.resize}`),t.format&&n.push(`format=${t.format}`),t.quality&&n.push(`quality=${t.quality}`),n.join("&")}}const SP="2.5.5",kP={"X-Client-Info":`storage-js/${SP}`};var Dr=function(e,t,n,r){function s(o){return o instanceof n?o:new n(function(i){i(o)})}return new(n||(n=Promise))(function(o,i){function a(c){try{u(r.next(c))}catch(f){i(f)}}function l(c){try{u(r.throw(c))}catch(f){i(f)}}function u(c){c.done?o(c.value):s(c.value).then(a,l)}u((r=r.apply(e,t||[])).next())})};class TP{constructor(t,n={},r){this.url=t,this.headers=Object.assign(Object.assign({},kP),n),this.fetch=vv(r)}listBuckets(){return Dr(this,void 0,void 0,function*(){try{return{data:yield jl(this.fetch,`${this.url}/bucket`,{headers:this.headers}),error:null}}catch(t){if(Ye(t))return{data:null,error:t};throw t}})}getBucket(t){return Dr(this,void 0,void 0,function*(){try{return{data:yield jl(this.fetch,`${this.url}/bucket/${t}`,{headers:this.headers}),error:null}}catch(n){if(Ye(n))return{data:null,error:n};throw n}})}createBucket(t,n={public:!1}){return Dr(this,void 0,void 0,function*(){try{return{data:yield Kn(this.fetch,`${this.url}/bucket`,{id:t,name:t,public:n.public,file_size_limit:n.fileSizeLimit,allowed_mime_types:n.allowedMimeTypes},{headers:this.headers}),error:null}}catch(r){if(Ye(r))return{data:null,error:r};throw r}})}updateBucket(t,n){return Dr(this,void 0,void 0,function*(){try{return{data:yield bP(this.fetch,`${this.url}/bucket/${t}`,{id:t,name:t,public:n.public,file_size_limit:n.fileSizeLimit,allowed_mime_types:n.allowedMimeTypes},{headers:this.headers}),error:null}}catch(r){if(Ye(r))return{data:null,error:r};throw r}})}emptyBucket(t){return Dr(this,void 0,void 0,function*(){try{return{data:yield Kn(this.fetch,`${this.url}/bucket/${t}/empty`,{},{headers:this.headers}),error:null}}catch(n){if(Ye(n))return{data:null,error:n};throw n}})}deleteBucket(t){return Dr(this,void 0,void 0,function*(){try{return{data:yield mv(this.fetch,`${this.url}/bucket/${t}`,{},{headers:this.headers}),error:null}}catch(n){if(Ye(n))return{data:null,error:n};throw n}})}}class PP extends TP{constructor(t,n={},r){super(t,n,r)}from(t){return new EP(this.url,this.headers,t,this.fetch)}}const RP="2.39.7";let js="";typeof Deno<"u"?js="deno":typeof document<"u"?js="web":typeof navigator<"u"&&navigator.product==="ReactNative"?js="react-native":js="node";const OP={"X-Client-Info":`supabase-js-${js}/${RP}`},AP={headers:OP},CP={schema:"public"},LP={autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,flowType:"implicit"},IP={};var xP=function(e,t,n,r){function s(o){return o instanceof n?o:new n(function(i){i(o)})}return new(n||(n=Promise))(function(o,i){function a(c){try{u(r.next(c))}catch(f){i(f)}}function l(c){try{u(r.throw(c))}catch(f){i(f)}}function u(c){c.done?o(c.value):s(c.value).then(a,l)}u((r=r.apply(e,t||[])).next())})};const DP=e=>{let t;return e?t=e:typeof fetch>"u"?t=Dc:t=fetch,(...n)=>t(...n)},jP=()=>typeof Headers>"u"?fv:Headers,MP=(e,t,n)=>{const r=DP(n),s=jP();return(o,i)=>xP(void 0,void 0,void 0,function*(){var a;const l=(a=yield t())!==null&&a!==void 0?a:e;let u=new s(i==null?void 0:i.headers);return u.has("apikey")||u.set("apikey",e),u.has("Authorization")||u.set("Authorization",`Bearer ${l}`),r(o,Object.assign(Object.assign({},i),{headers:u}))})};function NP(e){return e.replace(/\/$/,"")}function FP(e,t){const{db:n,auth:r,realtime:s,global:o}=e,{db:i,auth:a,realtime:l,global:u}=t;return{db:Object.assign(Object.assign({},i),n),auth:Object.assign(Object.assign({},a),r),realtime:Object.assign(Object.assign({},l),s),global:Object.assign(Object.assign({},u),o)}}function $P(e){return Math.round(Date.now()/1e3)+e}function UP(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){const t=Math.random()*16|0;return(e=="x"?t:t&3|8).toString(16)})}const pn=()=>typeof document<"u",or={tested:!1,writable:!1},Ks=()=>{if(!pn())return!1;try{if(typeof globalThis.localStorage!="object")return!1}catch{return!1}if(or.tested)return or.writable;const e=`lswt-${Math.random()}${Math.random()}`;try{globalThis.localStorage.setItem(e,e),globalThis.localStorage.removeItem(e),or.tested=!0,or.writable=!0}catch{or.tested=!0,or.writable=!1}return or.writable};function qa(e){const t={},n=new URL(e);if(n.hash&&n.hash[0]==="#")try{new URLSearchParams(n.hash.substring(1)).forEach((s,o)=>{t[o]=s})}catch{}return n.searchParams.forEach((r,s)=>{t[s]=r}),t}const gv=e=>{let t;return e?t=e:typeof fetch>"u"?t=(...n)=>B(()=>Promise.resolve().then(()=>To),void 0,import.meta.url).then(({default:r})=>r(...n)):t=fetch,(...n)=>t(...n)},HP=e=>typeof e=="object"&&e!==null&&"status"in e&&"ok"in e&&"json"in e&&typeof e.json=="function",ir=async(e,t,n)=>{await e.setItem(t,JSON.stringify(n))},Bo=async(e,t)=>{const n=await e.getItem(t);if(!n)return null;try{return JSON.parse(n)}catch{return n}},Wa=async(e,t)=>{await e.removeItem(t)};function VP(e){const t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";let n="",r,s,o,i,a,l,u,c=0;for(e=e.replace("-","+").replace("_","/");c>4,s=(a&15)<<4|l>>2,o=(l&3)<<6|u,n=n+String.fromCharCode(r),l!=64&&s!=0&&(n=n+String.fromCharCode(s)),u!=64&&o!=0&&(n=n+String.fromCharCode(o));return n}class Yi{constructor(){this.promise=new Yi.promiseConstructor((t,n)=>{this.resolve=t,this.reject=n})}}Yi.promiseConstructor=Promise;function Uf(e){const t=/^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}=?$|[a-z0-9_-]{2}(==)?$)$/i,n=e.split(".");if(n.length!==3)throw new Error("JWT is not valid: not a JWT structure");if(!t.test(n[1]))throw new Error("JWT is not valid: payload is not in base64url format");const r=n[1];return JSON.parse(VP(r))}async function BP(e){return await new Promise(t=>{setTimeout(()=>t(null),e)})}function qP(e,t){return new Promise((r,s)=>{(async()=>{for(let o=0;o<1/0;o++)try{const i=await e(o);if(!t(o,null,i)){r(i);return}}catch(i){if(!t(o,i)){s(i);return}}})()})}function WP(e){return("0"+e.toString(16)).substr(-2)}function jr(){const t=new Uint32Array(56);if(typeof crypto>"u"){const n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~",r=n.length;let s="";for(let o=0;o<56;o++)s+=n.charAt(Math.floor(Math.random()*r));return s}return crypto.getRandomValues(t),Array.from(t,WP).join("")}async function KP(e){const n=new TextEncoder().encode(e),r=await crypto.subtle.digest("SHA-256",n),s=new Uint8Array(r);return Array.from(s).map(o=>String.fromCharCode(o)).join("")}function zP(e){return btoa(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}async function Mr(e){if(!(typeof crypto<"u"&&typeof crypto.subtle<"u"&&typeof TextEncoder<"u"))return console.warn("WebCrypto API is not supported. Code challenge method will default to use plain instead of sha256."),e;const n=await KP(e);return zP(n)}class Fc extends Error{constructor(t,n){super(t),this.__isAuthError=!0,this.name="AuthError",this.status=n}}function ue(e){return typeof e=="object"&&e!==null&&"__isAuthError"in e}class GP extends Fc{constructor(t,n){super(t,n),this.name="AuthApiError",this.status=n}toJSON(){return{name:this.name,message:this.message,status:this.status}}}function JP(e){return ue(e)&&e.name==="AuthApiError"}class yv extends Fc{constructor(t,n){super(t),this.name="AuthUnknownError",this.originalError=n}}class Lr extends Fc{constructor(t,n,r){super(t),this.name=n,this.status=r}toJSON(){return{name:this.name,message:this.message,status:this.status}}}class Nr extends Lr{constructor(){super("Auth session missing!","AuthSessionMissingError",400)}}class Ka extends Lr{constructor(){super("Auth session or user missing","AuthInvalidTokenResponseError",500)}}class qo extends Lr{constructor(t){super(t,"AuthInvalidCredentialsError",400)}}class Wo extends Lr{constructor(t,n=null){super(t,"AuthImplicitGrantRedirectError",500),this.details=null,this.details=n}toJSON(){return{name:this.name,message:this.message,status:this.status,details:this.details}}}class Hf extends Lr{constructor(t,n=null){super(t,"AuthPKCEGrantCodeExchangeError",500),this.details=null,this.details=n}toJSON(){return{name:this.name,message:this.message,status:this.status,details:this.details}}}class Ml extends Lr{constructor(t,n){super(t,"AuthRetryableFetchError",n)}}function za(e){return ue(e)&&e.name==="AuthRetryableFetchError"}class YP extends Lr{constructor(t,n,r){super(t,"AuthWeakPasswordError",n),this.reasons=r}}var XP=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,r=Object.getOwnPropertySymbols(e);se.msg||e.message||e.error_description||e.error||JSON.stringify(e),QP=[502,503,504];async function Vf(e){if(!HP(e))throw new Ml(Hr(e),0);if(QP.includes(e.status))throw new Ml(Hr(e),e.status);let t;try{t=await e.json()}catch(n){throw new yv(Hr(n),n)}throw typeof t=="object"&&t&&typeof t.weak_password=="object"&&t.weak_password&&Array.isArray(t.weak_password.reasons)&&t.weak_password.reasons.length&&t.weak_password.reasons.reduce((n,r)=>n&&typeof r=="string",!0)?new YP(Hr(t),e.status,t.weak_password.reasons):new GP(Hr(t),e.status||500)}const ZP=(e,t,n,r)=>{const s={method:e,headers:(t==null?void 0:t.headers)||{}};return e==="GET"?s:(s.headers=Object.assign({"Content-Type":"application/json;charset=UTF-8"},t==null?void 0:t.headers),s.body=JSON.stringify(r),Object.assign(Object.assign({},s),n))};async function pe(e,t,n,r){var s;const o=Object.assign({},r==null?void 0:r.headers);r!=null&&r.jwt&&(o.Authorization=`Bearer ${r.jwt}`);const i=(s=r==null?void 0:r.query)!==null&&s!==void 0?s:{};r!=null&&r.redirectTo&&(i.redirect_to=r.redirectTo);const a=Object.keys(i).length?"?"+new URLSearchParams(i).toString():"",l=await eR(e,t,n+a,{headers:o,noResolveJson:r==null?void 0:r.noResolveJson},{},r==null?void 0:r.body);return r!=null&&r.xform?r==null?void 0:r.xform(l):{data:Object.assign({},l),error:null}}async function eR(e,t,n,r,s,o){const i=ZP(t,r,s,o);let a;try{a=await e(n,i)}catch(l){throw console.error(l),new Ml(Hr(l),0)}if(a.ok||await Vf(a),r!=null&&r.noResolveJson)return a;try{return await a.json()}catch(l){await Vf(l)}}function lr(e){var t;let n=null;sR(e)&&(n=Object.assign({},e),e.expires_at||(n.expires_at=$P(e.expires_in)));const r=(t=e.user)!==null&&t!==void 0?t:e;return{data:{session:n,user:r},error:null}}function Bf(e){const t=lr(e);return!t.error&&e.weak_password&&typeof e.weak_password=="object"&&Array.isArray(e.weak_password.reasons)&&e.weak_password.reasons.length&&e.weak_password.message&&typeof e.weak_password.message=="string"&&e.weak_password.reasons.reduce((n,r)=>n&&typeof r=="string",!0)&&(t.data.weak_password=e.weak_password),t}function zn(e){var t;return{data:{user:(t=e.user)!==null&&t!==void 0?t:e},error:null}}function tR(e){return{data:e,error:null}}function nR(e){const{action_link:t,email_otp:n,hashed_token:r,redirect_to:s,verification_type:o}=e,i=XP(e,["action_link","email_otp","hashed_token","redirect_to","verification_type"]),a={action_link:t,email_otp:n,hashed_token:r,redirect_to:s,verification_type:o},l=Object.assign({},i);return{data:{properties:a,user:l},error:null}}function rR(e){return e}function sR(e){return e.access_token&&e.refresh_token&&e.expires_in}var oR=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,r=Object.getOwnPropertySymbols(e);s0&&(h.forEach(p=>{const g=parseInt(p.split(";")[0].split("=")[1].substring(0,1)),y=JSON.parse(p.split(";")[1].split("=")[1]);u[`${y}Page`]=g}),u.total=parseInt(d)),{data:Object.assign(Object.assign({},f),u),error:null}}catch(u){if(ue(u))return{data:{users:[]},error:u};throw u}}async getUserById(t){try{return await pe(this.fetch,"GET",`${this.url}/admin/users/${t}`,{headers:this.headers,xform:zn})}catch(n){if(ue(n))return{data:{user:null},error:n};throw n}}async updateUserById(t,n){try{return await pe(this.fetch,"PUT",`${this.url}/admin/users/${t}`,{body:n,headers:this.headers,xform:zn})}catch(r){if(ue(r))return{data:{user:null},error:r};throw r}}async deleteUser(t,n=!1){try{return await pe(this.fetch,"DELETE",`${this.url}/admin/users/${t}`,{headers:this.headers,body:{should_soft_delete:n},xform:zn})}catch(r){if(ue(r))return{data:{user:null},error:r};throw r}}async _listFactors(t){try{const{data:n,error:r}=await pe(this.fetch,"GET",`${this.url}/admin/users/${t.userId}/factors`,{headers:this.headers,xform:s=>({data:{factors:s},error:null})});return{data:n,error:r}}catch(n){if(ue(n))return{data:null,error:n};throw n}}async _deleteFactor(t){try{return{data:await pe(this.fetch,"DELETE",`${this.url}/admin/users/${t.userId}/factors/${t.id}`,{headers:this.headers}),error:null}}catch(n){if(ue(n))return{data:null,error:n};throw n}}}const wv="0.0.0",aR="http://localhost:9999",lR="supabase.auth.token",cR={"X-Client-Info":`gotrue-js/${wv}`},qf=10,uR={getItem:e=>Ks()?globalThis.localStorage.getItem(e):null,setItem:(e,t)=>{Ks()&&globalThis.localStorage.setItem(e,t)},removeItem:e=>{Ks()&&globalThis.localStorage.removeItem(e)}};function Wf(e={}){return{getItem:t=>e[t]||null,setItem:(t,n)=>{e[t]=n},removeItem:t=>{delete e[t]}}}function fR(){if(typeof globalThis!="object")try{Object.defineProperty(Object.prototype,"__magic__",{get:function(){return this},configurable:!0}),__magic__.globalThis=__magic__,delete Object.prototype.__magic__}catch{typeof self<"u"&&(self.globalThis=self)}}const Fr={debug:!!(globalThis&&Ks()&&globalThis.localStorage&&globalThis.localStorage.getItem("supabase.gotrue-js.locks.debug")==="true")};class bv extends Error{constructor(t){super(t),this.isAcquireTimeout=!0}}class dR extends bv{}async function hR(e,t,n){Fr.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquire lock",e,t);const r=new globalThis.AbortController;return t>0&&setTimeout(()=>{r.abort(),Fr.debug&&console.log("@supabase/gotrue-js: navigatorLock acquire timed out",e)},t),await globalThis.navigator.locks.request(e,t===0?{mode:"exclusive",ifAvailable:!0}:{mode:"exclusive",signal:r.signal},async s=>{if(s){Fr.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquired",e,s.name);try{return await n()}finally{Fr.debug&&console.log("@supabase/gotrue-js: navigatorLock: released",e,s.name)}}else{if(t===0)throw Fr.debug&&console.log("@supabase/gotrue-js: navigatorLock: not immediately available",e),new dR(`Acquiring an exclusive Navigator LockManager lock "${e}" immediately failed`);if(Fr.debug)try{const o=await globalThis.navigator.locks.query();console.log("@supabase/gotrue-js: Navigator LockManager state",JSON.stringify(o,null," "))}catch(o){console.warn("@supabase/gotrue-js: Error when querying Navigator LockManager state",o)}return console.warn("@supabase/gotrue-js: Navigator LockManager returned a null lock when using #request without ifAvailable set to true, it appears this browser is not following the LockManager spec https://developer.mozilla.org/en-US/docs/Web/API/LockManager/request"),await n()}})}fR();const pR={url:aR,storageKey:lR,autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,headers:cR,flowType:"implicit",debug:!1},As=30*1e3,Kf=3;async function zf(e,t,n){return await n()}class io{constructor(t){var n,r;this.memoryStorage=null,this.stateChangeEmitters=new Map,this.autoRefreshTicker=null,this.visibilityChangedCallback=null,this.refreshingDeferred=null,this.initializePromise=null,this.detectSessionInUrl=!0,this.lockAcquired=!1,this.pendingInLock=[],this.broadcastChannel=null,this.logger=console.log,this.instanceID=io.nextInstanceID,io.nextInstanceID+=1,this.instanceID>0&&pn()&&console.warn("Multiple GoTrueClient instances detected in the same browser context. It is not an error, but this should be avoided as it may produce undefined behavior when used concurrently under the same storage key.");const s=Object.assign(Object.assign({},pR),t);if(this.logDebugMessages=!!s.debug,typeof s.debug=="function"&&(this.logger=s.debug),this.persistSession=s.persistSession,this.storageKey=s.storageKey,this.autoRefreshToken=s.autoRefreshToken,this.admin=new iR({url:s.url,headers:s.headers,fetch:s.fetch}),this.url=s.url,this.headers=s.headers,this.fetch=gv(s.fetch),this.lock=s.lock||zf,this.detectSessionInUrl=s.detectSessionInUrl,this.flowType=s.flowType,s.lock?this.lock=s.lock:pn()&&(!((n=globalThis==null?void 0:globalThis.navigator)===null||n===void 0)&&n.locks)?this.lock=hR:this.lock=zf,this.mfa={verify:this._verify.bind(this),enroll:this._enroll.bind(this),unenroll:this._unenroll.bind(this),challenge:this._challenge.bind(this),listFactors:this._listFactors.bind(this),challengeAndVerify:this._challengeAndVerify.bind(this),getAuthenticatorAssuranceLevel:this._getAuthenticatorAssuranceLevel.bind(this)},this.persistSession?s.storage?this.storage=s.storage:Ks()?this.storage=uR:(this.memoryStorage={},this.storage=Wf(this.memoryStorage)):(this.memoryStorage={},this.storage=Wf(this.memoryStorage)),pn()&&globalThis.BroadcastChannel&&this.persistSession&&this.storageKey){try{this.broadcastChannel=new globalThis.BroadcastChannel(this.storageKey)}catch(o){console.error("Failed to create a new BroadcastChannel, multi-tab state changes will not be available",o)}(r=this.broadcastChannel)===null||r===void 0||r.addEventListener("message",async o=>{this._debug("received broadcast notification from other tab or client",o),await this._notifyAllSubscribers(o.data.event,o.data.session,!1)})}this.initialize()}_debug(...t){return this.logDebugMessages&&this.logger(`GoTrueClient@${this.instanceID} (${wv}) ${new Date().toISOString()}`,...t),this}async initialize(){return this.initializePromise?await this.initializePromise:(this.initializePromise=(async()=>await this._acquireLock(-1,async()=>await this._initialize()))(),await this.initializePromise)}async _initialize(){try{const t=pn()?await this._isPKCEFlow():!1;if(this._debug("#_initialize()","begin","is PKCE flow",t),t||this.detectSessionInUrl&&this._isImplicitGrantFlow()){const{data:n,error:r}=await this._getSessionFromURL(t);if(r)return this._debug("#_initialize()","error detecting session from URL",r),(r==null?void 0:r.message)==="Identity is already linked"||(r==null?void 0:r.message)==="Identity is already linked to another user"?{error:r}:(await this._removeSession(),{error:r});const{session:s,redirectType:o}=n;return this._debug("#_initialize()","detected session in URL",s,"redirect type",o),await this._saveSession(s),setTimeout(async()=>{o==="recovery"?await this._notifyAllSubscribers("PASSWORD_RECOVERY",s):await this._notifyAllSubscribers("SIGNED_IN",s)},0),{error:null}}return await this._recoverAndRefresh(),{error:null}}catch(t){return ue(t)?{error:t}:{error:new yv("Unexpected error during initialization",t)}}finally{await this._handleVisibilityChange(),this._debug("#_initialize()","end")}}async signUp(t){var n,r,s;try{await this._removeSession();let o;if("email"in t){const{email:c,password:f,options:d}=t;let h=null,p=null;if(this.flowType==="pkce"){const g=jr();await ir(this.storage,`${this.storageKey}-code-verifier`,g),h=await Mr(g),p=g===h?"plain":"s256"}o=await pe(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,redirectTo:d==null?void 0:d.emailRedirectTo,body:{email:c,password:f,data:(n=d==null?void 0:d.data)!==null&&n!==void 0?n:{},gotrue_meta_security:{captcha_token:d==null?void 0:d.captchaToken},code_challenge:h,code_challenge_method:p},xform:lr})}else if("phone"in t){const{phone:c,password:f,options:d}=t;o=await pe(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{phone:c,password:f,data:(r=d==null?void 0:d.data)!==null&&r!==void 0?r:{},channel:(s=d==null?void 0:d.channel)!==null&&s!==void 0?s:"sms",gotrue_meta_security:{captcha_token:d==null?void 0:d.captchaToken}},xform:lr})}else throw new qo("You must provide either an email or phone number and a password");const{data:i,error:a}=o;if(a||!i)return{data:{user:null,session:null},error:a};const l=i.session,u=i.user;return i.session&&(await this._saveSession(i.session),await this._notifyAllSubscribers("SIGNED_IN",l)),{data:{user:u,session:l},error:null}}catch(o){if(ue(o))return{data:{user:null,session:null},error:o};throw o}}async signInWithPassword(t){try{await this._removeSession();let n;if("email"in t){const{email:o,password:i,options:a}=t;n=await pe(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{email:o,password:i,gotrue_meta_security:{captcha_token:a==null?void 0:a.captchaToken}},xform:Bf})}else if("phone"in t){const{phone:o,password:i,options:a}=t;n=await pe(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{phone:o,password:i,gotrue_meta_security:{captcha_token:a==null?void 0:a.captchaToken}},xform:Bf})}else throw new qo("You must provide either an email or phone number and a password");const{data:r,error:s}=n;return s?{data:{user:null,session:null},error:s}:!r||!r.session||!r.user?{data:{user:null,session:null},error:new Ka}:(r.session&&(await this._saveSession(r.session),await this._notifyAllSubscribers("SIGNED_IN",r.session)),{data:Object.assign({user:r.user,session:r.session},r.weak_password?{weakPassword:r.weak_password}:null),error:s})}catch(n){if(ue(n))return{data:{user:null,session:null},error:n};throw n}}async signInWithOAuth(t){var n,r,s,o;return await this._removeSession(),await this._handleProviderSignIn(t.provider,{redirectTo:(n=t.options)===null||n===void 0?void 0:n.redirectTo,scopes:(r=t.options)===null||r===void 0?void 0:r.scopes,queryParams:(s=t.options)===null||s===void 0?void 0:s.queryParams,skipBrowserRedirect:(o=t.options)===null||o===void 0?void 0:o.skipBrowserRedirect})}async exchangeCodeForSession(t){return await this.initializePromise,this._acquireLock(-1,async()=>this._exchangeCodeForSession(t))}async _exchangeCodeForSession(t){const n=await Bo(this.storage,`${this.storageKey}-code-verifier`),[r,s]=(n??"").split("/"),{data:o,error:i}=await pe(this.fetch,"POST",`${this.url}/token?grant_type=pkce`,{headers:this.headers,body:{auth_code:t,code_verifier:r},xform:lr});return await Wa(this.storage,`${this.storageKey}-code-verifier`),i?{data:{user:null,session:null,redirectType:null},error:i}:!o||!o.session||!o.user?{data:{user:null,session:null,redirectType:null},error:new Ka}:(o.session&&(await this._saveSession(o.session),await this._notifyAllSubscribers("SIGNED_IN",o.session)),{data:Object.assign(Object.assign({},o),{redirectType:s??null}),error:i})}async signInWithIdToken(t){await this._removeSession();try{const{options:n,provider:r,token:s,access_token:o,nonce:i}=t,a=await pe(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,body:{provider:r,id_token:s,access_token:o,nonce:i,gotrue_meta_security:{captcha_token:n==null?void 0:n.captchaToken}},xform:lr}),{data:l,error:u}=a;return u?{data:{user:null,session:null},error:u}:!l||!l.session||!l.user?{data:{user:null,session:null},error:new Ka}:(l.session&&(await this._saveSession(l.session),await this._notifyAllSubscribers("SIGNED_IN",l.session)),{data:l,error:u})}catch(n){if(ue(n))return{data:{user:null,session:null},error:n};throw n}}async signInWithOtp(t){var n,r,s,o,i;try{if(await this._removeSession(),"email"in t){const{email:a,options:l}=t;let u=null,c=null;if(this.flowType==="pkce"){const d=jr();await ir(this.storage,`${this.storageKey}-code-verifier`,d),u=await Mr(d),c=d===u?"plain":"s256"}const{error:f}=await pe(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{email:a,data:(n=l==null?void 0:l.data)!==null&&n!==void 0?n:{},create_user:(r=l==null?void 0:l.shouldCreateUser)!==null&&r!==void 0?r:!0,gotrue_meta_security:{captcha_token:l==null?void 0:l.captchaToken},code_challenge:u,code_challenge_method:c},redirectTo:l==null?void 0:l.emailRedirectTo});return{data:{user:null,session:null},error:f}}if("phone"in t){const{phone:a,options:l}=t,{data:u,error:c}=await pe(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{phone:a,data:(s=l==null?void 0:l.data)!==null&&s!==void 0?s:{},create_user:(o=l==null?void 0:l.shouldCreateUser)!==null&&o!==void 0?o:!0,gotrue_meta_security:{captcha_token:l==null?void 0:l.captchaToken},channel:(i=l==null?void 0:l.channel)!==null&&i!==void 0?i:"sms"}});return{data:{user:null,session:null,messageId:u==null?void 0:u.message_id},error:c}}throw new qo("You must provide either an email or phone number.")}catch(a){if(ue(a))return{data:{user:null,session:null},error:a};throw a}}async verifyOtp(t){var n,r;try{t.type!=="email_change"&&t.type!=="phone_change"&&await this._removeSession();let s,o;"options"in t&&(s=(n=t.options)===null||n===void 0?void 0:n.redirectTo,o=(r=t.options)===null||r===void 0?void 0:r.captchaToken);const{data:i,error:a}=await pe(this.fetch,"POST",`${this.url}/verify`,{headers:this.headers,body:Object.assign(Object.assign({},t),{gotrue_meta_security:{captcha_token:o}}),redirectTo:s,xform:lr});if(a)throw a;if(!i)throw new Error("An error occurred on token verification.");const l=i.session,u=i.user;return l!=null&&l.access_token&&(await this._saveSession(l),await this._notifyAllSubscribers(t.type=="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",l)),{data:{user:u,session:l},error:null}}catch(s){if(ue(s))return{data:{user:null,session:null},error:s};throw s}}async signInWithSSO(t){var n,r,s;try{await this._removeSession();let o=null,i=null;if(this.flowType==="pkce"){const a=jr();await ir(this.storage,`${this.storageKey}-code-verifier`,a),o=await Mr(a),i=a===o?"plain":"s256"}return await pe(this.fetch,"POST",`${this.url}/sso`,{body:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},"providerId"in t?{provider_id:t.providerId}:null),"domain"in t?{domain:t.domain}:null),{redirect_to:(r=(n=t.options)===null||n===void 0?void 0:n.redirectTo)!==null&&r!==void 0?r:void 0}),!((s=t==null?void 0:t.options)===null||s===void 0)&&s.captchaToken?{gotrue_meta_security:{captcha_token:t.options.captchaToken}}:null),{skip_http_redirect:!0,code_challenge:o,code_challenge_method:i}),headers:this.headers,xform:tR})}catch(o){if(ue(o))return{data:null,error:o};throw o}}async reauthenticate(){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._reauthenticate())}async _reauthenticate(){try{return await this._useSession(async t=>{const{data:{session:n},error:r}=t;if(r)throw r;if(!n)throw new Nr;const{error:s}=await pe(this.fetch,"GET",`${this.url}/reauthenticate`,{headers:this.headers,jwt:n.access_token});return{data:{user:null,session:null},error:s}})}catch(t){if(ue(t))return{data:{user:null,session:null},error:t};throw t}}async resend(t){try{t.type!="email_change"&&t.type!="phone_change"&&await this._removeSession();const n=`${this.url}/resend`;if("email"in t){const{email:r,type:s,options:o}=t,{error:i}=await pe(this.fetch,"POST",n,{headers:this.headers,body:{email:r,type:s,gotrue_meta_security:{captcha_token:o==null?void 0:o.captchaToken}},redirectTo:o==null?void 0:o.emailRedirectTo});return{data:{user:null,session:null},error:i}}else if("phone"in t){const{phone:r,type:s,options:o}=t,{data:i,error:a}=await pe(this.fetch,"POST",n,{headers:this.headers,body:{phone:r,type:s,gotrue_meta_security:{captcha_token:o==null?void 0:o.captchaToken}}});return{data:{user:null,session:null,messageId:i==null?void 0:i.message_id},error:a}}throw new qo("You must provide either an email or phone number and a type")}catch(n){if(ue(n))return{data:{user:null,session:null},error:n};throw n}}async getSession(){return await this.initializePromise,this._acquireLock(-1,async()=>this._useSession(async t=>t))}async _acquireLock(t,n){this._debug("#_acquireLock","begin",t);try{if(this.lockAcquired){const r=this.pendingInLock.length?this.pendingInLock[this.pendingInLock.length-1]:Promise.resolve(),s=(async()=>(await r,await n()))();return this.pendingInLock.push((async()=>{try{await s}catch{}})()),s}return await this.lock(`lock:${this.storageKey}`,t,async()=>{this._debug("#_acquireLock","lock acquired for storage key",this.storageKey);try{this.lockAcquired=!0;const r=n();for(this.pendingInLock.push((async()=>{try{await r}catch{}})()),await r;this.pendingInLock.length;){const s=[...this.pendingInLock];await Promise.all(s),this.pendingInLock.splice(0,s.length)}return await r}finally{this._debug("#_acquireLock","lock released for storage key",this.storageKey),this.lockAcquired=!1}})}finally{this._debug("#_acquireLock","end")}}async _useSession(t){this._debug("#_useSession","begin");try{const n=await this.__loadSession();return await t(n)}finally{this._debug("#_useSession","end")}}async __loadSession(){this._debug("#__loadSession()","begin"),this.lockAcquired||this._debug("#__loadSession()","used outside of an acquired lock!",new Error().stack);try{let t=null;const n=await Bo(this.storage,this.storageKey);if(this._debug("#getSession()","session from storage",n),n!==null&&(this._isValidSession(n)?t=n:(this._debug("#getSession()","session from storage is not valid"),await this._removeSession())),!t)return{data:{session:null},error:null};const r=t.expires_at?t.expires_at<=Date.now()/1e3:!1;if(this._debug("#__loadSession()",`session has${r?"":" not"} expired`,"expires_at",t.expires_at),!r)return{data:{session:t},error:null};const{session:s,error:o}=await this._callRefreshToken(t.refresh_token);return o?{data:{session:null},error:o}:{data:{session:s},error:null}}finally{this._debug("#__loadSession()","end")}}async getUser(t){return t?await this._getUser(t):(await this.initializePromise,this._acquireLock(-1,async()=>await this._getUser()))}async _getUser(t){try{return t?await pe(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:t,xform:zn}):await this._useSession(async n=>{var r,s;const{data:o,error:i}=n;if(i)throw i;return await pe(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:(s=(r=o.session)===null||r===void 0?void 0:r.access_token)!==null&&s!==void 0?s:void 0,xform:zn})})}catch(n){if(ue(n))return{data:{user:null},error:n};throw n}}async updateUser(t,n={}){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._updateUser(t,n))}async _updateUser(t,n={}){try{return await this._useSession(async r=>{const{data:s,error:o}=r;if(o)throw o;if(!s.session)throw new Nr;const i=s.session;let a=null,l=null;if(this.flowType==="pkce"&&t.email!=null){const f=jr();await ir(this.storage,`${this.storageKey}-code-verifier`,f),a=await Mr(f),l=f===a?"plain":"s256"}const{data:u,error:c}=await pe(this.fetch,"PUT",`${this.url}/user`,{headers:this.headers,redirectTo:n==null?void 0:n.emailRedirectTo,body:Object.assign(Object.assign({},t),{code_challenge:a,code_challenge_method:l}),jwt:i.access_token,xform:zn});if(c)throw c;return i.user=u.user,await this._saveSession(i),await this._notifyAllSubscribers("USER_UPDATED",i),{data:{user:i.user},error:null}})}catch(r){if(ue(r))return{data:{user:null},error:r};throw r}}_decodeJWT(t){return Uf(t)}async setSession(t){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._setSession(t))}async _setSession(t){try{if(!t.access_token||!t.refresh_token)throw new Nr;const n=Date.now()/1e3;let r=n,s=!0,o=null;const i=Uf(t.access_token);if(i.exp&&(r=i.exp,s=r<=n),s){const{session:a,error:l}=await this._callRefreshToken(t.refresh_token);if(l)return{data:{user:null,session:null},error:l};if(!a)return{data:{user:null,session:null},error:null};o=a}else{const{data:a,error:l}=await this._getUser(t.access_token);if(l)throw l;o={access_token:t.access_token,refresh_token:t.refresh_token,user:a.user,token_type:"bearer",expires_in:r-n,expires_at:r},await this._saveSession(o),await this._notifyAllSubscribers("SIGNED_IN",o)}return{data:{user:o.user,session:o},error:null}}catch(n){if(ue(n))return{data:{session:null,user:null},error:n};throw n}}async refreshSession(t){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._refreshSession(t))}async _refreshSession(t){try{return await this._useSession(async n=>{var r;if(!t){const{data:i,error:a}=n;if(a)throw a;t=(r=i.session)!==null&&r!==void 0?r:void 0}if(!(t!=null&&t.refresh_token))throw new Nr;const{session:s,error:o}=await this._callRefreshToken(t.refresh_token);return o?{data:{user:null,session:null},error:o}:s?{data:{user:s.user,session:s},error:null}:{data:{user:null,session:null},error:null}})}catch(n){if(ue(n))return{data:{user:null,session:null},error:n};throw n}}async _getSessionFromURL(t){try{if(!pn())throw new Wo("No browser detected.");if(this.flowType==="implicit"&&!this._isImplicitGrantFlow())throw new Wo("Not a valid implicit grant flow url.");if(this.flowType=="pkce"&&!t)throw new Hf("Not a valid PKCE flow url.");const n=qa(window.location.href);if(t){if(!n.code)throw new Hf("No code detected.");const{data:m,error:v}=await this._exchangeCodeForSession(n.code);if(v)throw v;const b=new URL(window.location.href);return b.searchParams.delete("code"),window.history.replaceState(window.history.state,"",b.toString()),{data:{session:m.session,redirectType:null},error:null}}if(n.error||n.error_description||n.error_code)throw new Wo(n.error_description||"Error in URL with unspecified error_description",{error:n.error||"unspecified_error",code:n.error_code||"unspecified_code"});const{provider_token:r,provider_refresh_token:s,access_token:o,refresh_token:i,expires_in:a,expires_at:l,token_type:u}=n;if(!o||!a||!i||!u)throw new Wo("No session defined in URL");const c=Math.round(Date.now()/1e3),f=parseInt(a);let d=c+f;l&&(d=parseInt(l));const h=d-c;h*1e3<=As&&console.warn(`@supabase/gotrue-js: Session as retrieved from URL expires in ${h}s, should have been closer to ${f}s`);const p=d-f;c-p>=120?console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued over 120s ago, URL could be stale",p,d,c):c-p<0&&console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued in the future? Check the device clok for skew",p,d,c);const{data:g,error:y}=await this._getUser(o);if(y)throw y;const w={provider_token:r,provider_refresh_token:s,access_token:o,expires_in:f,expires_at:d,refresh_token:i,token_type:u,user:g.user};return window.location.hash="",this._debug("#_getSessionFromURL()","clearing window.location.hash"),{data:{session:w,redirectType:n.type},error:null}}catch(n){if(ue(n))return{data:{session:null,redirectType:null},error:n};throw n}}_isImplicitGrantFlow(){const t=qa(window.location.href);return!!(pn()&&(t.access_token||t.error_description))}async _isPKCEFlow(){const t=qa(window.location.href),n=await Bo(this.storage,`${this.storageKey}-code-verifier`);return!!(t.code&&n)}async signOut(t={scope:"global"}){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._signOut(t))}async _signOut({scope:t}={scope:"global"}){return await this._useSession(async n=>{var r;const{data:s,error:o}=n;if(o)return{error:o};const i=(r=s.session)===null||r===void 0?void 0:r.access_token;if(i){const{error:a}=await this.admin.signOut(i,t);if(a&&!(JP(a)&&(a.status===404||a.status===401)))return{error:a}}return t!=="others"&&(await this._removeSession(),await Wa(this.storage,`${this.storageKey}-code-verifier`),await this._notifyAllSubscribers("SIGNED_OUT",null)),{error:null}})}onAuthStateChange(t){const n=UP(),r={id:n,callback:t,unsubscribe:()=>{this._debug("#unsubscribe()","state change callback with id removed",n),this.stateChangeEmitters.delete(n)}};return this._debug("#onAuthStateChange()","registered callback with id",n),this.stateChangeEmitters.set(n,r),(async()=>(await this.initializePromise,await this._acquireLock(-1,async()=>{this._emitInitialSession(n)})))(),{data:{subscription:r}}}async _emitInitialSession(t){return await this._useSession(async n=>{var r,s;try{const{data:{session:o},error:i}=n;if(i)throw i;await((r=this.stateChangeEmitters.get(t))===null||r===void 0?void 0:r.callback("INITIAL_SESSION",o)),this._debug("INITIAL_SESSION","callback id",t,"session",o)}catch(o){await((s=this.stateChangeEmitters.get(t))===null||s===void 0?void 0:s.callback("INITIAL_SESSION",null)),this._debug("INITIAL_SESSION","callback id",t,"error",o),console.error(o)}})}async resetPasswordForEmail(t,n={}){let r=null,s=null;if(this.flowType==="pkce"){const o=jr();await ir(this.storage,`${this.storageKey}-code-verifier`,`${o}/PASSWORD_RECOVERY`),r=await Mr(o),s=o===r?"plain":"s256"}try{return await pe(this.fetch,"POST",`${this.url}/recover`,{body:{email:t,code_challenge:r,code_challenge_method:s,gotrue_meta_security:{captcha_token:n.captchaToken}},headers:this.headers,redirectTo:n.redirectTo})}catch(o){if(ue(o))return{data:null,error:o};throw o}}async getUserIdentities(){var t;try{const{data:n,error:r}=await this.getUser();if(r)throw r;return{data:{identities:(t=n.user.identities)!==null&&t!==void 0?t:[]},error:null}}catch(n){if(ue(n))return{data:null,error:n};throw n}}async linkIdentity(t){var n;try{const{data:r,error:s}=await this._useSession(async o=>{var i,a,l,u,c;const{data:f,error:d}=o;if(d)throw d;const h=await this._getUrlForProvider(`${this.url}/user/identities/authorize`,t.provider,{redirectTo:(i=t.options)===null||i===void 0?void 0:i.redirectTo,scopes:(a=t.options)===null||a===void 0?void 0:a.scopes,queryParams:(l=t.options)===null||l===void 0?void 0:l.queryParams,skipBrowserRedirect:!0});return await pe(this.fetch,"GET",h,{headers:this.headers,jwt:(c=(u=f.session)===null||u===void 0?void 0:u.access_token)!==null&&c!==void 0?c:void 0})});if(s)throw s;return pn()&&!(!((n=t.options)===null||n===void 0)&&n.skipBrowserRedirect)&&window.location.assign(r==null?void 0:r.url),{data:{provider:t.provider,url:r==null?void 0:r.url},error:null}}catch(r){if(ue(r))return{data:{provider:t.provider,url:null},error:r};throw r}}async unlinkIdentity(t){try{return await this._useSession(async n=>{var r,s;const{data:o,error:i}=n;if(i)throw i;return await pe(this.fetch,"DELETE",`${this.url}/user/identities/${t.identity_id}`,{headers:this.headers,jwt:(s=(r=o.session)===null||r===void 0?void 0:r.access_token)!==null&&s!==void 0?s:void 0})})}catch(n){if(ue(n))return{data:null,error:n};throw n}}async _refreshAccessToken(t){const n=`#_refreshAccessToken(${t.substring(0,5)}...)`;this._debug(n,"begin");try{const r=Date.now();return await qP(async s=>(await BP(s*200),this._debug(n,"refreshing attempt",s),await pe(this.fetch,"POST",`${this.url}/token?grant_type=refresh_token`,{body:{refresh_token:t},headers:this.headers,xform:lr})),(s,o,i)=>i&&i.error&&za(i.error)&&Date.now()+(s+1)*200-r{try{await a.callback(t,n)}catch(l){o.push(l)}});if(await Promise.all(i),o.length>0){for(let a=0;athis._autoRefreshTokenTick(),As);this.autoRefreshTicker=t,t&&typeof t=="object"&&typeof t.unref=="function"?t.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(t),setTimeout(async()=>{await this.initializePromise,await this._autoRefreshTokenTick()},0)}async _stopAutoRefresh(){this._debug("#_stopAutoRefresh()");const t=this.autoRefreshTicker;this.autoRefreshTicker=null,t&&clearInterval(t)}async startAutoRefresh(){this._removeVisibilityChangedCallback(),await this._startAutoRefresh()}async stopAutoRefresh(){this._removeVisibilityChangedCallback(),await this._stopAutoRefresh()}async _autoRefreshTokenTick(){this._debug("#_autoRefreshTokenTick()","begin");try{await this._acquireLock(0,async()=>{try{const t=Date.now();try{return await this._useSession(async n=>{const{data:{session:r}}=n;if(!r||!r.refresh_token||!r.expires_at){this._debug("#_autoRefreshTokenTick()","no session");return}const s=Math.floor((r.expires_at*1e3-t)/As);this._debug("#_autoRefreshTokenTick()",`access token expires in ${s} ticks, a tick lasts ${As}ms, refresh threshold is ${Kf} ticks`),s<=Kf&&await this._callRefreshToken(r.refresh_token)})}catch(n){console.error("Auto refresh tick failed with error. This is likely a transient error.",n)}}finally{this._debug("#_autoRefreshTokenTick()","end")}})}catch(t){if(t.isAcquireTimeout||t instanceof bv)this._debug("auto refresh token tick lock not available");else throw t}}async _handleVisibilityChange(){if(this._debug("#_handleVisibilityChange()"),!pn()||!(window!=null&&window.addEventListener))return this.autoRefreshToken&&this.startAutoRefresh(),!1;try{this.visibilityChangedCallback=async()=>await this._onVisibilityChanged(!1),window==null||window.addEventListener("visibilitychange",this.visibilityChangedCallback),await this._onVisibilityChanged(!0)}catch(t){console.error("_handleVisibilityChange",t)}}async _onVisibilityChanged(t){const n=`#_onVisibilityChanged(${t})`;this._debug(n,"visibilityState",document.visibilityState),document.visibilityState==="visible"?(this.autoRefreshToken&&this._startAutoRefresh(),t||(await this.initializePromise,await this._acquireLock(-1,async()=>{if(document.visibilityState!=="visible"){this._debug(n,"acquired the lock to recover the session, but the browser visibilityState is no longer visible, aborting");return}await this._recoverAndRefresh()}))):document.visibilityState==="hidden"&&this.autoRefreshToken&&this._stopAutoRefresh()}async _getUrlForProvider(t,n,r){const s=[`provider=${encodeURIComponent(n)}`];if(r!=null&&r.redirectTo&&s.push(`redirect_to=${encodeURIComponent(r.redirectTo)}`),r!=null&&r.scopes&&s.push(`scopes=${encodeURIComponent(r.scopes)}`),this.flowType==="pkce"){const o=jr();await ir(this.storage,`${this.storageKey}-code-verifier`,o);const i=await Mr(o),a=o===i?"plain":"s256";this._debug("PKCE","code verifier",`${o.substring(0,5)}...`,"code challenge",i,"method",a);const l=new URLSearchParams({code_challenge:`${encodeURIComponent(i)}`,code_challenge_method:`${encodeURIComponent(a)}`});s.push(l.toString())}if(r!=null&&r.queryParams){const o=new URLSearchParams(r.queryParams);s.push(o.toString())}return r!=null&&r.skipBrowserRedirect&&s.push(`skip_http_redirect=${r.skipBrowserRedirect}`),`${t}?${s.join("&")}`}async _unenroll(t){try{return await this._useSession(async n=>{var r;const{data:s,error:o}=n;return o?{data:null,error:o}:await pe(this.fetch,"DELETE",`${this.url}/factors/${t.factorId}`,{headers:this.headers,jwt:(r=s==null?void 0:s.session)===null||r===void 0?void 0:r.access_token})})}catch(n){if(ue(n))return{data:null,error:n};throw n}}async _enroll(t){try{return await this._useSession(async n=>{var r,s;const{data:o,error:i}=n;if(i)return{data:null,error:i};const{data:a,error:l}=await pe(this.fetch,"POST",`${this.url}/factors`,{body:{friendly_name:t.friendlyName,factor_type:t.factorType,issuer:t.issuer},headers:this.headers,jwt:(r=o==null?void 0:o.session)===null||r===void 0?void 0:r.access_token});return l?{data:null,error:l}:(!((s=a==null?void 0:a.totp)===null||s===void 0)&&s.qr_code&&(a.totp.qr_code=`data:image/svg+xml;utf-8,${a.totp.qr_code}`),{data:a,error:null})})}catch(n){if(ue(n))return{data:null,error:n};throw n}}async _verify(t){return this._acquireLock(-1,async()=>{try{return await this._useSession(async n=>{var r;const{data:s,error:o}=n;if(o)return{data:null,error:o};const{data:i,error:a}=await pe(this.fetch,"POST",`${this.url}/factors/${t.factorId}/verify`,{body:{code:t.code,challenge_id:t.challengeId},headers:this.headers,jwt:(r=s==null?void 0:s.session)===null||r===void 0?void 0:r.access_token});return a?{data:null,error:a}:(await this._saveSession(Object.assign({expires_at:Math.round(Date.now()/1e3)+i.expires_in},i)),await this._notifyAllSubscribers("MFA_CHALLENGE_VERIFIED",i),{data:i,error:a})})}catch(n){if(ue(n))return{data:null,error:n};throw n}})}async _challenge(t){return this._acquireLock(-1,async()=>{try{return await this._useSession(async n=>{var r;const{data:s,error:o}=n;return o?{data:null,error:o}:await pe(this.fetch,"POST",`${this.url}/factors/${t.factorId}/challenge`,{headers:this.headers,jwt:(r=s==null?void 0:s.session)===null||r===void 0?void 0:r.access_token})})}catch(n){if(ue(n))return{data:null,error:n};throw n}})}async _challengeAndVerify(t){const{data:n,error:r}=await this._challenge({factorId:t.factorId});return r?{data:null,error:r}:await this._verify({factorId:t.factorId,challengeId:n.id,code:t.code})}async _listFactors(){const{data:{user:t},error:n}=await this.getUser();if(n)return{data:null,error:n};const r=(t==null?void 0:t.factors)||[],s=r.filter(o=>o.factor_type==="totp"&&o.status==="verified");return{data:{all:r,totp:s},error:null}}async _getAuthenticatorAssuranceLevel(){return this._acquireLock(-1,async()=>await this._useSession(async t=>{var n,r;const{data:{session:s},error:o}=t;if(o)return{data:null,error:o};if(!s)return{data:{currentLevel:null,nextLevel:null,currentAuthenticationMethods:[]},error:null};const i=this._decodeJWT(s.access_token);let a=null;i.aal&&(a=i.aal);let l=a;((r=(n=s.user.factors)===null||n===void 0?void 0:n.filter(f=>f.status==="verified"))!==null&&r!==void 0?r:[]).length>0&&(l="aal2");const c=i.amr||[];return{data:{currentLevel:a,nextLevel:l,currentAuthenticationMethods:c},error:null}}))}}io.nextInstanceID=0;class vR extends io{constructor(t){super(t)}}var mR=function(e,t,n,r){function s(o){return o instanceof n?o:new n(function(i){i(o)})}return new(n||(n=Promise))(function(o,i){function a(c){try{u(r.next(c))}catch(f){i(f)}}function l(c){try{u(r.throw(c))}catch(f){i(f)}}function u(c){c.done?o(c.value):s(c.value).then(a,l)}u((r=r.apply(e,t||[])).next())})};class gR{constructor(t,n,r){var s,o,i,a,l,u,c,f;if(this.supabaseUrl=t,this.supabaseKey=n,!t)throw new Error("supabaseUrl is required.");if(!n)throw new Error("supabaseKey is required.");const d=NP(t);this.realtimeUrl=`${d}/realtime/v1`.replace(/^http/i,"ws"),this.authUrl=`${d}/auth/v1`,this.storageUrl=`${d}/storage/v1`,this.functionsUrl=`${d}/functions/v1`;const h=`sb-${new URL(this.authUrl).hostname.split(".")[0]}-auth-token`,p={db:CP,realtime:IP,auth:Object.assign(Object.assign({},LP),{storageKey:h}),global:AP},g=FP(r??{},p);this.storageKey=(o=(s=g.auth)===null||s===void 0?void 0:s.storageKey)!==null&&o!==void 0?o:"",this.headers=(a=(i=g.global)===null||i===void 0?void 0:i.headers)!==null&&a!==void 0?a:{},this.auth=this._initSupabaseAuthClient((l=g.auth)!==null&&l!==void 0?l:{},this.headers,(u=g.global)===null||u===void 0?void 0:u.fetch),this.fetch=MP(n,this._getAccessToken.bind(this),(c=g.global)===null||c===void 0?void 0:c.fetch),this.realtime=this._initRealtimeClient(Object.assign({headers:this.headers},g.realtime)),this.rest=new jc(`${d}/rest/v1`,{headers:this.headers,schema:(f=g.db)===null||f===void 0?void 0:f.schema,fetch:this.fetch}),this._listenForAuthEvents()}get functions(){return new BT(this.functionsUrl,{headers:this.headers,customFetch:this.fetch})}get storage(){return new PP(this.storageUrl,this.headers,this.fetch)}from(t){return this.rest.from(t)}schema(t){return this.rest.schema(t)}rpc(t,n={},r={}){return this.rest.rpc(t,n,r)}channel(t,n={config:{}}){return this.realtime.channel(t,n)}getChannels(){return this.realtime.getChannels()}removeChannel(t){return this.realtime.removeChannel(t)}removeAllChannels(){return this.realtime.removeAllChannels()}_getAccessToken(){var t,n;return mR(this,void 0,void 0,function*(){const{data:r}=yield this.auth.getSession();return(n=(t=r.session)===null||t===void 0?void 0:t.access_token)!==null&&n!==void 0?n:null})}_initSupabaseAuthClient({autoRefreshToken:t,persistSession:n,detectSessionInUrl:r,storage:s,storageKey:o,flowType:i,debug:a},l,u){const c={Authorization:`Bearer ${this.supabaseKey}`,apikey:`${this.supabaseKey}`};return new vR({url:this.authUrl,headers:Object.assign(Object.assign({},c),l),storageKey:o,autoRefreshToken:t,persistSession:n,detectSessionInUrl:r,storage:s,flowType:i,debug:a,fetch:u})}_initRealtimeClient(t){return new hP(this.realtimeUrl,Object.assign(Object.assign({},t),{params:Object.assign({apikey:this.supabaseKey},t==null?void 0:t.params)}))}_listenForAuthEvents(){return this.auth.onAuthStateChange((n,r)=>{this._handleTokenChanged(n,"CLIENT",r==null?void 0:r.access_token)})}_handleTokenChanged(t,n,r){(t==="TOKEN_REFRESHED"||t==="SIGNED_IN")&&this.changedAccessToken!==r?(this.realtime.setAuth(r??null),this.changedAccessToken=r):t==="SIGNED_OUT"&&(this.realtime.setAuth(this.supabaseKey),n=="STORAGE"&&this.auth.signOut(),this.changedAccessToken=void 0)}}const yR=(e,t,n)=>new gR(e,t,n),wR=rn(()=>{const{supabaseUrl:e,supabaseToken:t}=mo().public,n=yR(e,t),r=ys();return{provide:{db:()=>n,getProfile:async(s=!1)=>{var i,a,l;const{data:{session:o}}=await n.auth.getSession();if(!(o!=null&&o.user))return null;if(r.value.data=o==null?void 0:o.user,r.value.profile&&!s)return r.value.profile;if(r.value.data){const{data:u}=await n.from("profiles").select("username,points,id,lifetime_points,is_teacher,max_files,max_private_decks,supporter,onboarding_step").eq("id",r.value.data.id).single();((i=r.value.profile)==null?void 0:i.onboarding_step)===2&&(u.onboarding_step=2),r.value.profile=u;const c=(a=r.value.profile)==null?void 0:a.supporter;r.value.isSupporter=c;const f=de().$posthog();f&&f.identify(r.value.data.id,{$email:r.value.data.email,$name:(l=r.value.profile)==null?void 0:l.username});const{data:d}=await n.from("billing_ids").select("*").eq("user_id",r.value.data.id).maybeSingle();return r.value.billingIDs={user_id:r.value.data.id,stripe_id:null,google_play_store_id:null,...d},u}return null},refreshAvatarItems:async s=>{var a;if(!r.value.data||s&&r.value.avatarItems.length>0)return;const{data:o,error:i}=await n.from("inventory").select("item_id,equipped,item:item_id(type)").eq("user_id",(a=r.value.data)==null?void 0:a.id).eq("equipped",!0);i&&console.error(i),r.value.avatarItems=o.map(l=>({...l.item,equipped:l.equipped,id:l.item_id}))}}}}),bR=rn(async e=>{let t,n;const r=mo(),{default:s}=([t,n]=as(()=>B(()=>import("./es.BqSIQFDT.js"),__vite__mapDeps([]),import.meta.url)),t=await t,n(),t),o=s.init(r.public.posthogPublicKey,{api_host:r.public.posthogHost||"https://app.posthog.com",persistence:"localStorage",autocapture:!1,opt_in_site_apps:!0,loaded:a=>{}});return sn().afterEach(a=>{s.capture("$pageview",{current_url:a.fullPath})}),{provide:{posthog:()=>o}}}),_R=[O0,C0,Vb,qb,Wb,Kb,Yb,e_,n_,w_,NT,wR,bR],ER=e=>{const t=Object.create(null);for(const n in e){const r=e[n];r!==void 0&&(t[n]=r)}return t},$c=(e,t)=>(n,r)=>(Dh(()=>e({...ER(n),...r.attrs},r)),()=>{var s,o;return t?(o=(s=r.slots).default)==null?void 0:o.call(s):null}),Uc={accesskey:String,autocapitalize:String,autofocus:{type:Boolean,default:void 0},class:[String,Object,Array],contenteditable:{type:Boolean,default:void 0},contextmenu:String,dir:String,draggable:{type:Boolean,default:void 0},enterkeyhint:String,exportparts:String,hidden:{type:Boolean,default:void 0},id:String,inputmode:String,is:String,itemid:String,itemprop:String,itemref:String,itemscope:String,itemtype:String,lang:String,nonce:String,part:String,slot:String,spellcheck:{type:Boolean,default:void 0},style:String,tabindex:String,title:String,translate:String},SR=Fe({name:"Link",inheritAttrs:!1,props:{...Uc,as:String,crossorigin:String,disabled:Boolean,fetchpriority:String,href:String,hreflang:String,imagesizes:String,imagesrcset:String,integrity:String,media:String,prefetch:{type:Boolean,default:void 0},referrerpolicy:String,rel:String,sizes:String,title:String,type:String,methods:String,target:String,body:Boolean,renderPriority:[String,Number]},setup:$c(e=>({link:[e]}))}),kR=Fe({name:"Head",inheritAttrs:!1,setup:(e,t)=>()=>{var n,r;return(r=(n=t.slots).default)==null?void 0:r.call(n)}}),TR=Fe({name:"Html",inheritAttrs:!1,props:{...Uc,manifest:String,version:String,xmlns:String,renderPriority:[String,Number]},setup:$c(e=>({htmlAttrs:e}),!0)}),PR=Fe({name:"Body",inheritAttrs:!1,props:{...Uc,renderPriority:[String,Number]},setup:$c(e=>({bodyAttrs:e}),!0)}),Gf={pwaInDevEnvironment:!1,webManifest:{href:"/manifest.webmanifest",useCredentials:!1,linkTag:''}},RR=Fe({async setup(){if(Gf){const e=S({link:[]});Dh(e);const{webManifest:t}=Gf;if(t){const{href:n,useCredentials:r}=t;r?e.value.link.push({rel:"manifest",href:n,crossorigin:"use-credentials"}):e.value.link.push({rel:"manifest",href:n})}}return()=>null}}),OR={class:"bg-kit-500 px-4 py-3 text-white"},AR={class:"text-center text-sm font-medium"},CR=["disabled"],LR=Fe({__name:"OfflineBanner",setup(e){const t=S(!1),n=async()=>{t.value=!0,await rp(!0),setTimeout(()=>{t.value=!1},1e3)};return(r,s)=>(xe(),hr("div",OR,[eo("p",AR,[pc(" You Are Offline, StudyKit is in read-only mode and many features will not be available. "),eo("button",{disabled:oe(t),onClick:n,class:"inline-block underline"},Vv(oe(t)?"Reconnecting...":"Reconnect"),9,CR)])]))}}),IR=(e,t)=>{const n=e.__vccOpts||e;for(const[r,s]of t)n[r]=s;return n},xR={},DR={class:"h-0"},jR=mg('',1),MR=[jR];function NR(e,t){return xe(),hr("svg",DR,MR)}const FR=IR(xR,[["render",NR]]),$R=Fe({props:{vnode:{type:Object,required:!0},route:{type:Object,required:!0},vnodeRef:Object,renderKey:String,trackRootNodes:Boolean},setup(e){const t=e.renderKey,n=e.route,r={};for(const s in e.route)Object.defineProperty(r,s,{get:()=>t===e.renderKey?e.route[s]:n[s]});return Xn(go,In(r)),()=>nt(e.vnode,{ref:e.vnodeRef})}}),UR=Fe({name:"NuxtPage",inheritAttrs:!1,props:{name:{type:String},transition:{type:[Boolean,Object],default:void 0},keepalive:{type:[Boolean,Object],default:void 0},route:{type:Object},pageKey:{type:[Function,String],default:null}},setup(e,{attrs:t,expose:n}){const r=de(),s=S(),o=Ne(go,null);let i;n({pageRef:s});const a=Ne(kh,null);let l;const u=r.deferHydration();if(r.isHydrating){const c=r.hooks.hookOnce("app:error",u);sn().beforeEach(c)}return e.pageKey&&q(()=>e.pageKey,(c,f)=>{c!==f&&r.callHook("page:loading:start")}),()=>nt(Jh,{name:e.name,route:e.route,...t},{default:c=>{const f=VR(o,c.route,c.Component),d=o&&o.matched.length===c.route.matched.length;if(!c.Component){if(l&&!d)return l;u();return}if(l&&a&&!a.isCurrent(c.route))return l;if(f&&o&&(!a||a!=null&&a.isCurrent(o)))return d?l:null;const h=kl(c,e.pageKey);!r.isHydrating&&!BR(o,c.route,c.Component)&&i===h&&r.callHook("page:loading:end"),i=h;const p=!!(e.transition??c.route.meta.pageTransition??bl),g=p&&HR([e.transition,c.route.meta.pageTransition,bl,{onAfterLeave:()=>{r.callHook("page:transition:finish",c.Component)}}].filter(Boolean)),y=e.keepalive??c.route.meta.keepalive??E0;return l=Yh(Di,p&&g,jb(y,nt(ic,{suspensible:!0,onPending:()=>r.callHook("page:start",c.Component),onResolve:()=>{Be(()=>r.callHook("page:finish",c.Component).then(()=>r.callHook("page:loading:end")).finally(u))}},{default:()=>{const w=nt($R,{key:h||void 0,vnode:c.Component,route:c.route,renderKey:h||void 0,trackRootNodes:p,vnodeRef:s});return y&&(w.type.name=c.Component.type.name||c.Component.type.__name||"RouteProvider"),w}}))).default(),l}})}});function HR(e){const t=e.map(n=>({...n,onAfterLeave:n.onAfterLeave?Ec(n.onAfterLeave):void 0}));return bw(...t)}function VR(e,t,n){if(!e)return!1;const r=t.matched.findIndex(s=>{var o;return((o=s.components)==null?void 0:o.default)===(n==null?void 0:n.type)});return!r||r===-1?!1:t.matched.slice(0,r).some((s,o)=>{var i,a,l;return((i=s.components)==null?void 0:i.default)!==((l=(a=e.matched[o])==null?void 0:a.components)==null?void 0:l.default)})||n&&kl({route:t,Component:n})!==kl({route:e,Component:n})}function BR(e,t,n){return e?t.matched.findIndex(s=>{var o;return((o=s.components)==null?void 0:o.default)===(n==null?void 0:n.type)})r.default||r);return()=>nt(n,e.layoutProps,t.slots)}}),WR=Fe({name:"NuxtLayout",inheritAttrs:!1,props:{name:{type:[String,Boolean,Object],default:null},fallback:{type:[String,Object],default:null}},setup(e,t){const n=de(),r=Ne(go),s=r===yo()?xb():r,o=D(()=>{let l=oe(e.name)??s.meta.layout??"default";return l&&!(l in Gn)&&e.fallback&&(l=oe(e.fallback)),l}),i=S();t.expose({layoutRef:i});const a=n.deferHydration();if(n.isHydrating){const l=n.hooks.hookOnce("app:error",a);sn().beforeEach(l)}return()=>{const l=o.value&&o.value in Gn,u=s.meta.layoutTransition??_0;return Yh(Di,l&&u,{default:()=>nt(ic,{suspensible:!0,onResolve:()=>{Be(a)}},{default:()=>nt(KR,{layoutProps:Zd(t.attrs,{ref:i}),key:o.value||void 0,name:o.value,shouldProvide:!e.name,hasTransition:!!u},t.slots)})}).default()}}}),KR=Fe({name:"NuxtLayoutProvider",inheritAttrs:!1,props:{name:{type:[String,Boolean]},layoutProps:{type:Object},hasTransition:{type:Boolean},shouldProvide:{type:Boolean}},setup(e,t){const n=e.name;return e.shouldProvide&&Xn(kh,{isCurrent:r=>n===(r.meta.layout??"default")}),()=>{var r,s;return!n||typeof n=="string"&&!(n in Gn)?(s=(r=t.slots).default)==null?void 0:s.call(r):nt(qR,{key:n,layoutProps:e.layoutProps,name:n},t.slots)}}}),zR=Fe({__name:"StyledCard",props:{kit:{type:Boolean},unpad:{type:Boolean}},setup(e){return(t,n)=>(xe(),hr("div",{class:lo(["rounded border-2",[t.unpad?"":"p-3 @sm:p-4",t.kit?"border-kit-100 bg-kit-50 dark:border-kit-800 dark:bg-kit-900":"border-brown-100 bg-white dark:border-zinc-800 dark:bg-zinc-900"]])},[Km(t.$slots,"default")],2))}}),GR={class:"message"},JR={key:0},YR={key:1},XR=Fe({__name:"PWAUpdate",setup(e){const{$pwa:t}=de();async function n(){t&&(t.offlineReady=!1,t.needRefresh=!1)}return(r,s)=>{const o=zR;return oe(t)&&(oe(t).offlineReady||oe(t).needRefresh)?(xe(),it(o,{key:0,class:"pwa-toast",role:"alert"},{default:fr(()=>[eo("div",GR,[oe(t).offlineReady?(xe(),hr("span",JR," App ready to work offline ")):(xe(),hr("span",YR," New update available, click on reload button to update. "))]),oe(t).needRefresh?(xe(),hr("button",{key:0,class:"btn btn-white",onClick:s[0]||(s[0]=i=>oe(t).updateServiceWorker())}," Reload ")):(xe(),hr("button",{key:1,class:"btn btn-white",onClick:n}," Close "))]),_:1})):Is("",!0)}}});function _v(e){return!0}function Ev(e){return!1}function QR(e,t){return t.cards.filter(n=>e==="written"?_v():Ev())}function Sv(e,t){const[n,r]=Hc(e),s=new Date(n.getTime()-1e3*60*60*24),o=new Date(r.getTime()-1e3*60*60*24);return t.getTime()>=s.getTime()&&t.getTime()<=o.getTime()}function Hc(e,t=null){if(t===null){const n=new Date(e.getFullYear(),e.getMonth(),e.getDate()+1,0,0,0,0),r=new Date(n.getTime()+24*60*60*1e3);return[n,r]}else{const s=new Date(e.getTime()-t*60*60*1e3).getDate()!==e.getDate()?new Date(e.getFullYear(),e.getMonth(),e.getDate(),0,0,0,0):new Date(e.getFullYear(),e.getMonth(),e.getDate()+1,0,0,0,0),o=new Date(s.getTime()+24*60*60*1e3);return s.setHours(s.getHours()+t),o.setHours(o.getHours()+t),[s,o]}}function kv(e,t,n){const[r,s]=Hc(e,n);return t.getTime()s.getTime()?"expired":"update"}function Tv(e,t){const n=new Date,r=new Date(e.streak_updated_at),s=new Date(e.points_updated_at),o=kv(r,n,t);return o==="expired"&&(e.streak=0),Sv(s,n)||(e.points_today=0),{...e,streak_state:o}}function ZR(e){return e.replace(/>\s+<").trim()}function eO(e){var t=" ",n="",r="";return e.split(/>\s*\r `,s.match(/^]*[^\/]$/)&&!s.startsWith("input")&&(r+=t)}),n.substring(1,n.length-3).trim()}const tO=(e,t=1e4)=>{const n=[];for(let r=0;r<=e.length;r+=t){const s=e.substring(r,r+t);n.push(s)}return n},zO=Object.freeze(Object.defineProperty({__proto__:null,arePointsValid:Sv,canStreakBeContinued:kv,chunkText:tO,filterCards:QR,formatHTML:eO,getStreakBounds:Hc,isMultipleChoice:Ev,isWrittenResponse:_v,minimizeHTML:ZR,validateTrackProgress:Tv},Symbol.toStringTag,{value:"Module"})),Qo=()=>jn("showDailyGoalComplete",()=>({show:!1,dismiss:!1,points_today:0,streak:0,points_goal:1e3,streakState:"expired"})),nO=()=>zi("lastDismissedDailyGoal",new Date(0).toDateString());async function GO(e){const{force:t}=e||{force:!1},n=ys();if(!n.value.data)return Qo();const r=de().$db(),{data:s}=await r.from("profile_progress").select("streak_updated_at, points_updated_at, points_today, streak, points_goal").eq("user_id",n.value.data.id).maybeSingle(),o=s;if(!o)return Qo();const i=Qo(),a=t||i.value.points_goal===o.points_goal,l=Tv(o);if(i.value.points_today=a?l.points_today:i.value.points_today,i.value.streak=a?l.streak:i.value.streak,i.value.points_goal=a?l.points_goal:i.value.points_goal,i.value.streakState=l.streak_state,l.points_today>=l.points_goal){const u=yo(),{until:c}=await B(()=>Promise.resolve().then(()=>xT),void 0,import.meta.url);await c(()=>!u.fullPath.includes("solo")&&!(u.fullPath.includes("tests/")&&!u.fullPath.endsWith("tests/"))&&!u.fullPath.includes("tasks")).toBe(!0),i.value.show=!0}return i}const rO=window.setInterval,sO=ro();function Jf(e){return e?e.toLowerCase()==="none"?null:speechSynthesis.getVoices().find(t=>t.voiceURI===e):speechSynthesis.getVoices()[0]}function oO(e){const t=DT();let n=t.value[e];if(!n){const s=Object.keys(t.value).find(o=>e.includes(o));if(s&&t.value[s])n=t.value[s];else return null}return{question:Jf(n.question),answer:Jf(n.answer)}}function JO(e,t,n){const r=window&&window.speechSynthesis;if(!r)return sO.fire({title:"Speech Synthesis not supported",text:"Your browser does not support speech synthesis",icon:"error",toast:!0,position:"top-end",showConfirmButton:!1,timer:3e3,timerProgressBar:!0}),0;r.speaking&&r.cancel();const o=new SpeechSynthesisUtterance(e),i=oO(t);if(!i||!i[n]||(o.voice=i[n],!o.voice))return 0;r.speak(o);const c=e.split(" ").length/183*60;return Math.max(c*1e3,2e3)}function YO(e,t){if(t.toLowerCase()==="none")return!1;const n=window&&window.speechSynthesis;if(!n)return!1;const s=t.split("-")[0],i=n.getVoices().find(l=>l.lang.split("-")[0].toLowerCase()===s.toLowerCase());if(!i)return!1;const a=new SpeechSynthesisUtterance(e);return a.voice=i,n.speak(a),!0}const Nl=()=>jn("voiceList",()=>[]);window.speechSynthesis.onvoiceschanged=()=>{const e=window&&window.speechSynthesis;e&&(Nl().value=[{name:"No Voice",lang:"None"},...e.getVoices()])};function iO(){const e=window&&window.speechSynthesis;if(e)if(e.getVoices().length===0){let t=0;const n=rO(()=>{(e.getVoices().length>0||t>60)&&(clearInterval(n),Nl().value=[{name:"No Voice",lang:"None"},...e.getVoices()]),t++},1e3)}else Nl().value=[{name:"No Voice",lang:"None"},...e.getVoices()]}const aO=Zs(()=>B(()=>import("./DailyGoalComplete.i5oWpxxF.js"),__vite__mapDeps([231,154,57,44,171]),import.meta.url).then(e=>e.default||e)),lO=Zs(()=>B(()=>import("./OnboardingNotification.Cy02L3ww.js"),__vite__mapDeps([232,1,6,3,37,38,29]),import.meta.url).then(e=>e.default||e)),cO=Zs(()=>B(()=>import("./PMFSurvey.DL1qwr-m.js"),__vite__mapDeps([233,6,3]),import.meta.url).then(e=>e.default||e)),uO=Fe({__name:"app",setup(e){__();const t=ys(),n=Qo(),r=nO(),s=np(),o=D(()=>new Date(r.value).toDateString()===new Date().toDateString()),i=D(()=>{var a,l;return((a=t.value.profile)==null?void 0:a.onboarding_step)===0||((l=t.value.profile)==null?void 0:l.onboarding_step)===2});return Rr(async()=>{iO(),await de().$getProfile(),de().$refreshAvatarItems();const a=window.document.referrer.includes("android-app://");Jp("isTWA",a)}),(a,l)=>{const u=SR,c=kR,f=RR,d=LR,h=FR,p=UR,g=WR,y=aO,w=lO,m=cO,v=XR,b=PR,E=TR;return xe(),it(E,null,{default:fr(()=>[ye(b,{class:"bg-kit-25 text-brown-600 dark:text-brown-200 dark:bg-brown-950"},{default:fr(()=>[ye(c,null,{default:fr(()=>[ye(u,{rel:"preconnect",href:"https://fonts.googleapis.com"}),ye(u,{rel:"preconnect",href:"https://fonts.gstatic.com",crossorigin:"anonymous"}),ye(u,{href:"https://fonts.googleapis.com/css2?family=Rubik:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap",rel:"stylesheet"})]),_:1}),ye(f),ye(g,null,{default:fr(()=>[oe(s)?Is("",!0):(xe(),it(d,{key:0})),ye(h),ye(p)]),_:1}),!oe(o)&&oe(n).show&&!oe(n).dismiss&&!oe(i)?(xe(),it(y,{key:0})):Is("",!0),oe(t).profile&&oe(i)?(xe(),it(w,{key:1})):Is("",!0),oe(t).profile?(xe(),it(m,{key:2})):Is("",!0),ye(v)]),_:1})]),_:1})}}}),fO={__name:"nuxt-error-page",props:{error:Object},setup(e){const n=e.error;(n.stack||"").split(` `).splice(1).map(f=>({text:f.replace("webpack:/","").replace(".vue",".js").trim(),internal:f.includes("node_modules")&&!f.includes(".cache")||f.includes("internal")||f.includes("new Promise")})).map(f=>`${f.text}`).join(` `);const r=Number(n.statusCode||500),s=r===404,o=n.statusMessage??(s?"Page Not Found":"Internal Server Error"),i=n.message||n.toString(),a=void 0,c=s?Zs(()=>B(()=>import("./error-404.lh6LsQiF.js"),__vite__mapDeps([234,3,235]),import.meta.url).then(f=>f.default||f)):Zs(()=>B(()=>import("./error-500.B0OvtOQi.js"),__vite__mapDeps([236,237]),import.meta.url).then(f=>f.default||f));return(f,d)=>(xe(),it(oe(c),Fv(Qd({statusCode:oe(r),statusMessage:oe(o),description:oe(i),stack:oe(a)})),null,16))}},Yf={__name:"nuxt-root",setup(e){const t=()=>null,n=de(),r=n.deferHydration();if(n.isHydrating){const a=n.hooks.hookOnce("app:error",r);sn().beforeEach(a)}const s=!1;Xn(go,yo()),n.hooks.callHookWith(a=>a.map(l=>l()),"vue:setup");const o=Mi();jd((a,l,u)=>{if(n.hooks.callHook("vue:error",a,l,u).catch(c=>console.error("[nuxt] Error in `vue:error` hook",c)),Rw(a)&&(a.fatal||a.unhandled))return n.runWithContext(()=>Vr(a)),!1});const i=!1;return(a,l)=>(xe(),it(ic,{onResolve:oe(r)},{default:fr(()=>[oe(o)?(xe(),it(oe(fO),{key:0,error:oe(o)},null,8,["error"])):oe(i)?(xe(),it(oe(t),{key:1,context:oe(i)},null,8,["context"])):oe(s)?(xe(),it(Rm(oe(s)),{key:2})):(xe(),it(oe(uO),{key:3}))]),_:1},8,["onResolve"]))}};let Xf;{let e;Xf=async function(){var i,a;if(e)return e;const r=!!((i=window.__NUXT__)!=null&&i.serverRendered||((a=document.getElementById("__NUXT_DATA__"))==null?void 0:a.dataset.ssr)==="true")?ay(Yf):iy(Yf),s=pw({vueApp:r});async function o(l){await s.callHook("app:error",l),s.payload.error=s.payload.error||Ni(l)}r.config.errorHandler=o;try{await mw(s,_R)}catch(l){o(l)}try{await s.hooks.callHook("app:created",r),await s.hooks.callHook("app:beforeMount",r),r.mount(S0),await s.hooks.callHook("app:mounted",r),await Be()}catch(l){o(l)}return r.config.errorHandler===o&&(r.config.errorHandler=void 0),r},e=Xf().catch(t=>{throw console.error("Error while mounting app:",t),t})}export{Jp as $,Is as A,zR as B,ro as C,Wi as D,it as E,Xe as F,wO as G,PO as H,kO as I,IR as J,Dh as K,pO as L,vO as M,sn as N,wr as O,OO as P,RO as Q,we as R,lo as S,Np as T,xd as U,ki as V,Rm as W,Zd as X,Km as Y,mg as Z,B as _,yo as a,PE as a$,kv as a0,wf as a1,Gi as a2,EO as a3,Di as a4,HO as a5,Fv as a6,Qd as a7,rp as a8,DS as a9,vf as aA,MO as aB,vo as aC,ji as aD,wy as aE,xO as aF,fl as aG,ph as aH,Wl as aI,qv as aJ,FO as aK,iT as aL,Li as aM,Ne as aN,be as aO,xn as aP,ut as aQ,DO as aR,tc as aS,Ni as aT,GO as aU,qk as aV,DT as aW,Nl as aX,np as aY,Oc as aZ,lk as a_,jO as aa,j as ab,rO as ac,_k as ad,Vi as ae,fk as af,CE as ag,di as ah,AO as ai,lv as aj,VO as ak,fo as al,$O as am,BO as an,qO as ao,IT as ap,JO as aq,jn as ar,mO as as,nt as at,Xn as au,HT as av,UT as aw,$T as ax,po as ay,Bb as az,Qo as b,hO as b0,ve as b1,Ql as b2,Pr as b3,tT as b4,TO as b5,bO as b6,dS as b7,rS as b8,SO as b9,Jg as bA,Bk as bB,YO as bC,KO as bD,xT as bE,zO as bF,UO as ba,oo as bb,Tv as bc,eO as bd,ZR as be,LT as bf,av as bg,NE as bh,jT as bi,E_ as bj,uv as bk,sp as bl,Uk as bm,zi as bn,vE as bo,IO as bp,Jk as bq,ok as br,WO as bs,CO as bt,as as bu,cv as bv,go as bw,NO as bx,yi as by,b_ as bz,nO as c,Fe as d,mo as e,xe as f,hr as g,eo as h,ye as i,oe as j,pc as k,Zs as l,Ee as m,LO as n,Rr as o,D as p,de as q,S as r,q as s,Vv as t,ys as u,Be as v,_O as w,gO as x,fr as y,yO as z};