heyio 1.11.2 → 1.12.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api/server.js +4 -3
- package/dist/copilot/skills.js +50 -13
- package/package.json +1 -1
- package/web-dist/assets/{AuditLogView-876aBvp7.js → AuditLogView-C5QtUQBq.js} +1 -1
- package/web-dist/assets/ChatView-DLu9BMg8.js +1 -0
- package/web-dist/assets/{FeedView-Hr_p36PL.js → FeedView-6OV-l6Gl.js} +1 -1
- package/web-dist/assets/{HistoryView-D6AsI2YL.js → HistoryView-DizPqv0y.js} +1 -1
- package/web-dist/assets/{LoginView-JFudvzT9.js → LoginView-CG1O9fmR.js} +1 -1
- package/web-dist/assets/{McpView-DEKaxHvM.js → McpView-TJN-fZvI.js} +1 -1
- package/web-dist/assets/SchedulesView-BDFpImX6.js +6 -0
- package/web-dist/assets/{SettingsView--XVajvM6.js → SettingsView-D-K1iC1c.js} +1 -1
- package/web-dist/assets/{SkillsView-FxiFscAg.js → SkillsView-DnNmO192.js} +1 -1
- package/web-dist/assets/{SquadDetailView-yBpF2HPs.js → SquadDetailView-BBvrgHzn.js} +1 -1
- package/web-dist/assets/{SquadHealthView-tpKwrIpk.js → SquadHealthView-DF2zF9D3.js} +1 -1
- package/web-dist/assets/{SquadsView-B4DU2TM2.js → SquadsView-CPVzko7k.js} +1 -1
- package/web-dist/assets/{ToggleSwitch.vue_vue_type_script_setup_true_lang-DLrXkvGe.js → ToggleSwitch.vue_vue_type_script_setup_true_lang-Bk_t9_Rn.js} +1 -1
- package/web-dist/assets/{UsageView-8b6--5tz.js → UsageView-OcyM5k14.js} +1 -1
- package/web-dist/assets/{WikiView-wviS2lbH.js → WikiView-KhFqBZI0.js} +1 -1
- package/web-dist/assets/{api-CSt4Y_SE.js → api-BiDVwQrs.js} +1 -1
- package/web-dist/assets/{arrow-left-r91jNdw5.js → arrow-left-DFbf2tii.js} +1 -1
- package/web-dist/assets/{git-branch-DaWa7Suo.js → git-branch-BLstr_Gr.js} +1 -1
- package/web-dist/assets/index-B-o45ao1.css +1 -0
- package/web-dist/assets/{index-Bu8BI3Ga.js → index-DCJUYZtV.js} +12 -12
- package/web-dist/assets/{pencil-92uBAIoQ.js → pencil-D4Zz_t0y.js} +1 -1
- package/web-dist/assets/{plus-BWduphxA.js → plus-gmwiZVfr.js} +1 -1
- package/web-dist/assets/{save-sgq5DeZs.js → save-BvtAs5WB.js} +1 -1
- package/web-dist/assets/{search-Y6VQntGe.js → search-BabUvoGD.js} +1 -1
- package/web-dist/assets/{trash-2-C6yGK69f.js → trash-2-C21cNLJl.js} +1 -1
- package/web-dist/assets/{triangle-alert-ARN9gQNZ.js → triangle-alert-BrzY_E1n.js} +1 -1
- package/web-dist/assets/{x-TC2ojICC.js → x-xgLSmc9e.js} +1 -1
- package/web-dist/index.html +2 -2
- package/web-dist/assets/ChatView-BZEl1ckK.js +0 -1
- package/web-dist/assets/SchedulesView-9rmg2Q74.js +0 -6
- package/web-dist/assets/index-vcgp2T40.css +0 -1
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/ChatView-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/ChatView-DLu9BMg8.js","assets/x-xgLSmc9e.js","assets/SquadsView-CPVzko7k.js","assets/api-BiDVwQrs.js","assets/squad-colors-B8B_Y-lz.js","assets/git-branch-BLstr_Gr.js","assets/SquadHealthView-DF2zF9D3.js","assets/triangle-alert-BrzY_E1n.js","assets/SquadDetailView-BBvrgHzn.js","assets/trash-2-C21cNLJl.js","assets/arrow-left-DFbf2tii.js","assets/FeedView-6OV-l6Gl.js","assets/SkillsView-DnNmO192.js","assets/plus-gmwiZVfr.js","assets/search-BabUvoGD.js","assets/pencil-D4Zz_t0y.js","assets/save-BvtAs5WB.js","assets/McpView-TJN-fZvI.js","assets/ToggleSwitch.vue_vue_type_script_setup_true_lang-Bk_t9_Rn.js","assets/SchedulesView-BDFpImX6.js","assets/HistoryView-DizPqv0y.js","assets/WikiView-KhFqBZI0.js","assets/UsageView-OcyM5k14.js","assets/AuditLogView-C5QtUQBq.js","assets/SettingsView-D-K1iC1c.js"])))=>i.map(i=>d[i]);
|
|
2
2
|
var hh=Object.defineProperty;var dh=(t,e,r)=>e in t?hh(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var be=(t,e,r)=>dh(t,typeof e!="symbol"?e+"":e,r);(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))n(s);new MutationObserver(s=>{for(const i of s)if(i.type==="childList")for(const o of i.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&n(o)}).observe(document,{childList:!0,subtree:!0});function r(s){const i={};return s.integrity&&(i.integrity=s.integrity),s.referrerPolicy&&(i.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?i.credentials="include":s.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function n(s){if(s.ep)return;s.ep=!0;const i=r(s);fetch(s.href,i)}})();const fh="modulepreload",ph=function(t){return"/"+t},Jo={},Ke=function(e,r,n){let s=Promise.resolve();if(r&&r.length>0){let o=function(c){return Promise.all(c.map(u=>Promise.resolve(u).then(h=>({status:"fulfilled",value:h}),h=>({status:"rejected",reason:h}))))};document.getElementsByTagName("link");const a=document.querySelector("meta[property=csp-nonce]"),l=(a==null?void 0:a.nonce)||(a==null?void 0:a.getAttribute("nonce"));s=o(r.map(c=>{if(c=ph(c),c in Jo)return;Jo[c]=!0;const u=c.endsWith(".css"),h=u?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${c}"]${h}`))return;const d=document.createElement("link");if(d.rel=u?"stylesheet":fh,u||(d.as="script"),d.crossOrigin="",d.href=c,l&&d.setAttribute("nonce",l),document.head.appendChild(d),u)return new Promise((f,p)=>{d.addEventListener("load",f),d.addEventListener("error",()=>p(new Error(`Unable to preload CSS for ${c}`)))})}))}function i(o){const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=o,window.dispatchEvent(a),!a.defaultPrevented)throw o}return s.then(o=>{for(const a of o||[])a.status==="rejected"&&i(a.reason);return e().catch(i)})};/**
|
|
3
3
|
* @vue/shared v3.5.34
|
|
4
4
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
5
5
|
* @license MIT
|
|
6
|
-
**/function mo(t){const e=Object.create(null);for(const r of t.split(","))e[r]=1;return r=>r in e}const _e={},Kr=[],Nt=()=>{},Fl=()=>!1,Bs=t=>t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&(t.charCodeAt(2)>122||t.charCodeAt(2)<97),Ms=t=>t.startsWith("onUpdate:"),Ue=Object.assign,yo=(t,e)=>{const r=t.indexOf(e);r>-1&&t.splice(r,1)},gh=Object.prototype.hasOwnProperty,fe=(t,e)=>gh.call(t,e),F=Array.isArray,Gr=t=>Yn(t)==="[object Map]",sn=t=>Yn(t)==="[object Set]",Yo=t=>Yn(t)==="[object Date]",ee=t=>typeof t=="function",Te=t=>typeof t=="string",pt=t=>typeof t=="symbol",
|
|
6
|
+
**/function mo(t){const e=Object.create(null);for(const r of t.split(","))e[r]=1;return r=>r in e}const _e={},Kr=[],Nt=()=>{},Fl=()=>!1,Bs=t=>t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&(t.charCodeAt(2)>122||t.charCodeAt(2)<97),Ms=t=>t.startsWith("onUpdate:"),Ue=Object.assign,yo=(t,e)=>{const r=t.indexOf(e);r>-1&&t.splice(r,1)},gh=Object.prototype.hasOwnProperty,fe=(t,e)=>gh.call(t,e),F=Array.isArray,Gr=t=>Yn(t)==="[object Map]",sn=t=>Yn(t)==="[object Set]",Yo=t=>Yn(t)==="[object Date]",ee=t=>typeof t=="function",Te=t=>typeof t=="string",pt=t=>typeof t=="symbol",ge=t=>t!==null&&typeof t=="object",Vl=t=>(ge(t)||ee(t))&&ee(t.then)&&ee(t.catch),zl=Object.prototype.toString,Yn=t=>zl.call(t),mh=t=>Yn(t).slice(8,-1),Wl=t=>Yn(t)==="[object Object]",Hs=t=>Te(t)&&t!=="NaN"&&t[0]!=="-"&&""+parseInt(t,10)===t,kn=mo(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),qs=t=>{const e=Object.create(null);return(r=>e[r]||(e[r]=t(r)))},yh=/-\w/g,et=qs(t=>t.replace(yh,e=>e.slice(1).toUpperCase())),vh=/\B([A-Z])/g,fr=qs(t=>t.replace(vh,"-$1").toLowerCase()),Fs=qs(t=>t.charAt(0).toUpperCase()+t.slice(1)),hi=qs(t=>t?`on${Fs(t)}`:""),jt=(t,e)=>!Object.is(t,e),ms=(t,...e)=>{for(let r=0;r<t.length;r++)t[r](...e)},Kl=(t,e,r,n=!1)=>{Object.defineProperty(t,e,{configurable:!0,enumerable:!1,writable:n,value:r})},Vs=t=>{const e=parseFloat(t);return isNaN(e)?t:e},bh=t=>{const e=Te(t)?Number(t):NaN;return isNaN(e)?t:e};let Xo;const zs=()=>Xo||(Xo=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Ws(t){if(F(t)){const e={};for(let r=0;r<t.length;r++){const n=t[r],s=Te(n)?Sh(n):Ws(n);if(s)for(const i in s)e[i]=s[i]}return e}else if(Te(t)||ge(t))return t}const _h=/;(?![^(]*\))/g,wh=/:([^]+)/,kh=/\/\*[^]*?\*\//g;function Sh(t){const e={};return t.replace(kh,"").split(_h).forEach(r=>{if(r){const n=r.split(wh);n.length>1&&(e[n[0].trim()]=n[1].trim())}}),e}function Ye(t){let e="";if(Te(t))e=t;else if(F(t))for(let r=0;r<t.length;r++){const n=Ye(t[r]);n&&(e+=n+" ")}else if(ge(t))for(const r in t)t[r]&&(e+=r+" ");return e.trim()}const Eh="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",Th=mo(Eh);function Gl(t){return!!t||t===""}function Ah(t,e){if(t.length!==e.length)return!1;let r=!0;for(let n=0;r&&n<t.length;n++)r=on(t[n],e[n]);return r}function on(t,e){if(t===e)return!0;let r=Yo(t),n=Yo(e);if(r||n)return r&&n?t.getTime()===e.getTime():!1;if(r=pt(t),n=pt(e),r||n)return t===e;if(r=F(t),n=F(e),r||n)return r&&n?Ah(t,e):!1;if(r=ge(t),n=ge(e),r||n){if(!r||!n)return!1;const s=Object.keys(t).length,i=Object.keys(e).length;if(s!==i)return!1;for(const o in t){const a=t.hasOwnProperty(o),l=e.hasOwnProperty(o);if(a&&!l||!a&&l||!on(t[o],e[o]))return!1}}return String(t)===String(e)}function vo(t,e){return t.findIndex(r=>on(r,e))}const Jl=t=>!!(t&&t.__v_isRef===!0),it=t=>Te(t)?t:t==null?"":F(t)||ge(t)&&(t.toString===zl||!ee(t.toString))?Jl(t)?it(t.value):JSON.stringify(t,Yl,2):String(t),Yl=(t,e)=>Jl(e)?Yl(t,e.value):Gr(e)?{[`Map(${e.size})`]:[...e.entries()].reduce((r,[n,s],i)=>(r[di(n,i)+" =>"]=s,r),{})}:sn(e)?{[`Set(${e.size})`]:[...e.values()].map(r=>di(r))}:pt(e)?di(e):ge(e)&&!F(e)&&!Wl(e)?String(e):e,di=(t,e="")=>{var r;return pt(t)?`Symbol(${(r=t.description)!=null?r:e})`:t};/**
|
|
7
7
|
* @vue/reactivity v3.5.34
|
|
8
8
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
9
9
|
* @license MIT
|
|
10
|
-
**/let Le;class Xl{constructor(e=!1){this.detached=e,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this._warnOnRun=!0,this.__v_skip=!0,!e&&Le&&(Le.active?(this.parent=Le,this.index=(Le.scopes||(Le.scopes=[])).push(this)-1):(this._active=!1,this._warnOnRun=!1))}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let e,r;if(this.scopes)for(e=0,r=this.scopes.length;e<r;e++)this.scopes[e].pause();for(e=0,r=this.effects.length;e<r;e++)this.effects[e].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let e,r;if(this.scopes)for(e=0,r=this.scopes.length;e<r;e++)this.scopes[e].resume();for(e=0,r=this.effects.length;e<r;e++)this.effects[e].resume()}}run(e){if(this._active){const r=Le;try{return Le=this,e()}finally{Le=r}}}on(){++this._on===1&&(this.prevScope=Le,Le=this)}off(){if(this._on>0&&--this._on===0){if(Le===this)Le=this.prevScope;else{let e=Le;for(;e;){if(e.prevScope===this){e.prevScope=this.prevScope;break}e=e.prevScope}}this.prevScope=void 0}}stop(e){if(this._active){this._active=!1;let r,n;for(r=0,n=this.effects.length;r<n;r++)this.effects[r].stop();for(this.effects.length=0,r=0,n=this.cleanups.length;r<n;r++)this.cleanups[r]();if(this.cleanups.length=0,this.scopes){for(r=0,n=this.scopes.length;r<n;r++)this.scopes[r].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!e){const s=this.parent.scopes.pop();s&&s!==this&&(this.parent.scopes[this.index]=s,s.index=this.index)}this.parent=void 0}}}function Zl(t){return new Xl(t)}function Ql(){return Le}function xh(t,e=!1){Le&&Le.cleanups.push(t)}let Se;const fi=new WeakSet;class ec{constructor(e){this.fn=e,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,Le&&(Le.active?Le.effects.push(this):this.flags&=-2)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,fi.has(this)&&(fi.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||rc(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,Zo(this),nc(this);const e=Se,r=vt;Se=this,vt=!0;try{return this.fn()}finally{sc(this),Se=e,vt=r,this.flags&=-3}}stop(){if(this.flags&1){for(let e=this.deps;e;e=e.nextDep)wo(e);this.deps=this.depsTail=void 0,Zo(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?fi.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){Ni(this)&&this.run()}get dirty(){return Ni(this)}}let tc=0,Sn,En;function rc(t,e=!1){if(t.flags|=8,e){t.next=En,En=t;return}t.next=Sn,Sn=t}function bo(){tc++}function _o(){if(--tc>0)return;if(En){let e=En;for(En=void 0;e;){const r=e.next;e.next=void 0,e.flags&=-9,e=r}}let t;for(;Sn;){let e=Sn;for(Sn=void 0;e;){const r=e.next;if(e.next=void 0,e.flags&=-9,e.flags&1)try{e.trigger()}catch(n){t||(t=n)}e=r}}if(t)throw t}function nc(t){for(let e=t.deps;e;e=e.nextDep)e.version=-1,e.prevActiveLink=e.dep.activeLink,e.dep.activeLink=e}function sc(t){let e,r=t.depsTail,n=r;for(;n;){const s=n.prevDep;n.version===-1?(n===r&&(r=s),wo(n),Rh(n)):e=n,n.dep.activeLink=n.prevActiveLink,n.prevActiveLink=void 0,n=s}t.deps=e,t.depsTail=r}function Ni(t){for(let e=t.deps;e;e=e.nextDep)if(e.dep.version!==e.version||e.dep.computed&&(ic(e.dep.computed)||e.dep.version!==e.version))return!0;return!!t._dirty}function ic(t){if(t.flags&4&&!(t.flags&16)||(t.flags&=-17,t.globalVersion===Nn)||(t.globalVersion=Nn,!t.isSSR&&t.flags&128&&(!t.deps&&!t._dirty||!Ni(t))))return;t.flags|=2;const e=t.dep,r=Se,n=vt;Se=t,vt=!0;try{nc(t);const s=t.fn(t._value);(e.version===0||jt(s,t._value))&&(t.flags|=128,t._value=s,e.version++)}catch(s){throw e.version++,s}finally{Se=r,vt=n,sc(t),t.flags&=-3}}function wo(t,e=!1){const{dep:r,prevSub:n,nextSub:s}=t;if(n&&(n.nextSub=s,t.prevSub=void 0),s&&(s.prevSub=n,t.nextSub=void 0),r.subs===t&&(r.subs=n,!n&&r.computed)){r.computed.flags&=-5;for(let i=r.computed.deps;i;i=i.nextDep)wo(i,!0)}!e&&!--r.sc&&r.map&&r.map.delete(r.key)}function Rh(t){const{prevDep:e,nextDep:r}=t;e&&(e.nextDep=r,t.prevDep=void 0),r&&(r.prevDep=e,t.nextDep=void 0)}let vt=!0;const oc=[];function Zt(){oc.push(vt),vt=!1}function Qt(){const t=oc.pop();vt=t===void 0?!0:t}function Zo(t){const{cleanup:e}=t;if(t.cleanup=void 0,e){const r=Se;Se=void 0;try{e()}finally{Se=r}}}let Nn=0;class Ch{constructor(e,r){this.sub=e,this.dep=r,this.version=r.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class ko{constructor(e){this.computed=e,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(e){if(!Se||!vt||Se===this.computed)return;let r=this.activeLink;if(r===void 0||r.sub!==Se)r=this.activeLink=new Ch(Se,this),Se.deps?(r.prevDep=Se.depsTail,Se.depsTail.nextDep=r,Se.depsTail=r):Se.deps=Se.depsTail=r,ac(r);else if(r.version===-1&&(r.version=this.version,r.nextDep)){const n=r.nextDep;n.prevDep=r.prevDep,r.prevDep&&(r.prevDep.nextDep=n),r.prevDep=Se.depsTail,r.nextDep=void 0,Se.depsTail.nextDep=r,Se.depsTail=r,Se.deps===r&&(Se.deps=n)}return r}trigger(e){this.version++,Nn++,this.notify(e)}notify(e){bo();try{for(let r=this.subs;r;r=r.prevSub)r.sub.notify()&&r.sub.dep.notify()}finally{_o()}}}function ac(t){if(t.dep.sc++,t.sub.flags&4){const e=t.dep.computed;if(e&&!t.dep.subs){e.flags|=20;for(let n=e.deps;n;n=n.nextDep)ac(n)}const r=t.dep.subs;r!==t&&(t.prevSub=r,r&&(r.nextSub=t)),t.dep.subs=t}}const ws=new WeakMap,xr=Symbol(""),Li=Symbol(""),Ln=Symbol("");function Ve(t,e,r){if(vt&&Se){let n=ws.get(t);n||ws.set(t,n=new Map);let s=n.get(r);s||(n.set(r,s=new ko),s.map=n,s.key=r),s.track()}}function zt(t,e,r,n,s,i){const o=ws.get(t);if(!o){Nn++;return}const a=l=>{l&&l.trigger()};if(bo(),e==="clear")o.forEach(a);else{const l=F(t),c=l&&Hs(r);if(l&&r==="length"){const u=Number(n);o.forEach((h,d)=>{(d==="length"||d===Ln||!pt(d)&&d>=u)&&a(h)})}else switch((r!==void 0||o.has(void 0))&&a(o.get(r)),c&&a(o.get(Ln)),e){case"add":l?c&&a(o.get("length")):(a(o.get(xr)),Gr(t)&&a(o.get(Li)));break;case"delete":l||(a(o.get(xr)),Gr(t)&&a(o.get(Li)));break;case"set":Gr(t)&&a(o.get(xr));break}}_o()}function Oh(t,e){const r=ws.get(t);return r&&r.get(e)}function Ir(t){const e=le(t);return e===t?e:(Ve(e,"iterate",Ln),ct(t)?e:e.map(bt))}function Ks(t){return Ve(t=le(t),"iterate",Ln),t}function Pt(t,e){return er(t)?Zr(Yt(t)?bt(e):e):bt(e)}const Ph={__proto__:null,[Symbol.iterator](){return pi(this,Symbol.iterator,t=>Pt(this,t))},concat(...t){return Ir(this).concat(...t.map(e=>F(e)?Ir(e):e))},entries(){return pi(this,"entries",t=>(t[1]=Pt(this,t[1]),t))},every(t,e){return Dt(this,"every",t,e,void 0,arguments)},filter(t,e){return Dt(this,"filter",t,e,r=>r.map(n=>Pt(this,n)),arguments)},find(t,e){return Dt(this,"find",t,e,r=>Pt(this,r),arguments)},findIndex(t,e){return Dt(this,"findIndex",t,e,void 0,arguments)},findLast(t,e){return Dt(this,"findLast",t,e,r=>Pt(this,r),arguments)},findLastIndex(t,e){return Dt(this,"findLastIndex",t,e,void 0,arguments)},forEach(t,e){return Dt(this,"forEach",t,e,void 0,arguments)},includes(...t){return gi(this,"includes",t)},indexOf(...t){return gi(this,"indexOf",t)},join(t){return Ir(this).join(t)},lastIndexOf(...t){return gi(this,"lastIndexOf",t)},map(t,e){return Dt(this,"map",t,e,void 0,arguments)},pop(){return un(this,"pop")},push(...t){return un(this,"push",t)},reduce(t,...e){return Qo(this,"reduce",t,e)},reduceRight(t,...e){return Qo(this,"reduceRight",t,e)},shift(){return un(this,"shift")},some(t,e){return Dt(this,"some",t,e,void 0,arguments)},splice(...t){return un(this,"splice",t)},toReversed(){return Ir(this).toReversed()},toSorted(t){return Ir(this).toSorted(t)},toSpliced(...t){return Ir(this).toSpliced(...t)},unshift(...t){return un(this,"unshift",t)},values(){return pi(this,"values",t=>Pt(this,t))}};function pi(t,e,r){const n=Ks(t),s=n[e]();return n!==t&&!ct(t)&&(s._next=s.next,s.next=()=>{const i=s._next();return i.done||(i.value=r(i.value)),i}),s}const Ih=Array.prototype;function Dt(t,e,r,n,s,i){const o=Ks(t),a=o!==t&&!ct(t),l=o[e];if(l!==Ih[e]){const h=l.apply(t,i);return a?bt(h):h}let c=r;o!==t&&(a?c=function(h,d){return r.call(this,Pt(t,h),d,t)}:r.length>2&&(c=function(h,d){return r.call(this,h,d,t)}));const u=l.call(o,c,n);return a&&s?s(u):u}function Qo(t,e,r,n){const s=Ks(t),i=s!==t&&!ct(t);let o=r,a=!1;s!==t&&(i?(a=n.length===0,o=function(c,u,h){return a&&(a=!1,c=Pt(t,c)),r.call(this,c,Pt(t,u),h,t)}):r.length>3&&(o=function(c,u,h){return r.call(this,c,u,h,t)}));const l=s[e](o,...n);return a?Pt(t,l):l}function gi(t,e,r){const n=le(t);Ve(n,"iterate",Ln);const s=n[e](...r);return(s===-1||s===!1)&&Gs(r[0])?(r[0]=le(r[0]),n[e](...r)):s}function un(t,e,r=[]){Zt(),bo();const n=le(t)[e].apply(t,r);return _o(),Qt(),n}const $h=mo("__proto__,__v_isRef,__isVue"),lc=new Set(Object.getOwnPropertyNames(Symbol).filter(t=>t!=="arguments"&&t!=="caller").map(t=>Symbol[t]).filter(pt));function jh(t){pt(t)||(t=String(t));const e=le(this);return Ve(e,"has",t),e.hasOwnProperty(t)}class cc{constructor(e=!1,r=!1){this._isReadonly=e,this._isShallow=r}get(e,r,n){if(r==="__v_skip")return e.__v_skip;const s=this._isReadonly,i=this._isShallow;if(r==="__v_isReactive")return!s;if(r==="__v_isReadonly")return s;if(r==="__v_isShallow")return i;if(r==="__v_raw")return n===(s?i?Vh:fc:i?dc:hc).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(n)?e:void 0;const o=F(e);if(!s){let l;if(o&&(l=Ph[r]))return l;if(r==="hasOwnProperty")return jh}const a=Reflect.get(e,r,Ce(e)?e:n);if((pt(r)?lc.has(r):$h(r))||(s||Ve(e,"get",r),i))return a;if(Ce(a)){const l=o&&Hs(r)?a:a.value;return s&&pe(l)?Ui(l):l}return pe(a)?s?Ui(a):Xn(a):a}}class uc extends cc{constructor(e=!1){super(!1,e)}set(e,r,n,s){let i=e[r];const o=F(e)&&Hs(r);if(!this._isShallow){const c=er(i);if(!ct(n)&&!er(n)&&(i=le(i),n=le(n)),!o&&Ce(i)&&!Ce(n))return c||(i.value=n),!0}const a=o?Number(r)<e.length:fe(e,r),l=Reflect.set(e,r,n,Ce(e)?e:s);return e===le(s)&&(a?jt(n,i)&&zt(e,"set",r,n):zt(e,"add",r,n)),l}deleteProperty(e,r){const n=fe(e,r);e[r];const s=Reflect.deleteProperty(e,r);return s&&n&&zt(e,"delete",r,void 0),s}has(e,r){const n=Reflect.has(e,r);return(!pt(r)||!lc.has(r))&&Ve(e,"has",r),n}ownKeys(e){return Ve(e,"iterate",F(e)?"length":xr),Reflect.ownKeys(e)}}class Nh extends cc{constructor(e=!1){super(!0,e)}set(e,r){return!0}deleteProperty(e,r){return!0}}const Lh=new uc,Dh=new Nh,Uh=new uc(!0);const Di=t=>t,rs=t=>Reflect.getPrototypeOf(t);function Bh(t,e,r){return function(...n){const s=this.__v_raw,i=le(s),o=Gr(i),a=t==="entries"||t===Symbol.iterator&&o,l=t==="keys"&&o,c=s[t](...n),u=r?Di:e?Zr:bt;return!e&&Ve(i,"iterate",l?Li:xr),Ue(Object.create(c),{next(){const{value:h,done:d}=c.next();return d?{value:h,done:d}:{value:a?[u(h[0]),u(h[1])]:u(h),done:d}}})}}function ns(t){return function(...e){return t==="delete"?!1:t==="clear"?void 0:this}}function Mh(t,e){const r={get(s){const i=this.__v_raw,o=le(i),a=le(s);t||(jt(s,a)&&Ve(o,"get",s),Ve(o,"get",a));const{has:l}=rs(o),c=e?Di:t?Zr:bt;if(l.call(o,s))return c(i.get(s));if(l.call(o,a))return c(i.get(a));i!==o&&i.get(s)},get size(){const s=this.__v_raw;return!t&&Ve(le(s),"iterate",xr),s.size},has(s){const i=this.__v_raw,o=le(i),a=le(s);return t||(jt(s,a)&&Ve(o,"has",s),Ve(o,"has",a)),s===a?i.has(s):i.has(s)||i.has(a)},forEach(s,i){const o=this,a=o.__v_raw,l=le(a),c=e?Di:t?Zr:bt;return!t&&Ve(l,"iterate",xr),a.forEach((u,h)=>s.call(i,c(u),c(h),o))}};return Ue(r,t?{add:ns("add"),set:ns("set"),delete:ns("delete"),clear:ns("clear")}:{add(s){const i=le(this),o=rs(i),a=le(s),l=!e&&!ct(s)&&!er(s)?a:s;return o.has.call(i,l)||jt(s,l)&&o.has.call(i,s)||jt(a,l)&&o.has.call(i,a)||(i.add(l),zt(i,"add",l,l)),this},set(s,i){!e&&!ct(i)&&!er(i)&&(i=le(i));const o=le(this),{has:a,get:l}=rs(o);let c=a.call(o,s);c||(s=le(s),c=a.call(o,s));const u=l.call(o,s);return o.set(s,i),c?jt(i,u)&&zt(o,"set",s,i):zt(o,"add",s,i),this},delete(s){const i=le(this),{has:o,get:a}=rs(i);let l=o.call(i,s);l||(s=le(s),l=o.call(i,s)),a&&a.call(i,s);const c=i.delete(s);return l&&zt(i,"delete",s,void 0),c},clear(){const s=le(this),i=s.size!==0,o=s.clear();return i&&zt(s,"clear",void 0,void 0),o}}),["keys","values","entries",Symbol.iterator].forEach(s=>{r[s]=Bh(s,t,e)}),r}function So(t,e){const r=Mh(t,e);return(n,s,i)=>s==="__v_isReactive"?!t:s==="__v_isReadonly"?t:s==="__v_raw"?n:Reflect.get(fe(r,s)&&s in n?r:n,s,i)}const Hh={get:So(!1,!1)},qh={get:So(!1,!0)},Fh={get:So(!0,!1)};const hc=new WeakMap,dc=new WeakMap,fc=new WeakMap,Vh=new WeakMap;function zh(t){switch(t){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Wh(t){return t.__v_skip||!Object.isExtensible(t)?0:zh(mh(t))}function Xn(t){return er(t)?t:Eo(t,!1,Lh,Hh,hc)}function pc(t){return Eo(t,!1,Uh,qh,dc)}function Ui(t){return Eo(t,!0,Dh,Fh,fc)}function Eo(t,e,r,n,s){if(!pe(t)||t.__v_raw&&!(e&&t.__v_isReactive))return t;const i=Wh(t);if(i===0)return t;const o=s.get(t);if(o)return o;const a=new Proxy(t,i===2?n:r);return s.set(t,a),a}function Yt(t){return er(t)?Yt(t.__v_raw):!!(t&&t.__v_isReactive)}function er(t){return!!(t&&t.__v_isReadonly)}function ct(t){return!!(t&&t.__v_isShallow)}function Gs(t){return t?!!t.__v_raw:!1}function le(t){const e=t&&t.__v_raw;return e?le(e):t}function To(t){return!fe(t,"__v_skip")&&Object.isExtensible(t)&&Kl(t,"__v_skip",!0),t}const bt=t=>pe(t)?Xn(t):t,Zr=t=>pe(t)?Ui(t):t;function Ce(t){return t?t.__v_isRef===!0:!1}function Oe(t){return gc(t,!1)}function Kh(t){return gc(t,!0)}function gc(t,e){return Ce(t)?t:new Gh(t,e)}class Gh{constructor(e,r){this.dep=new ko,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=r?e:le(e),this._value=r?e:bt(e),this.__v_isShallow=r}get value(){return this.dep.track(),this._value}set value(e){const r=this._rawValue,n=this.__v_isShallow||ct(e)||er(e);e=n?e:le(e),jt(e,r)&&(this._rawValue=e,this._value=n?e:bt(e),this.dep.trigger())}}function re(t){return Ce(t)?t.value:t}const Jh={get:(t,e,r)=>e==="__v_raw"?t:re(Reflect.get(t,e,r)),set:(t,e,r,n)=>{const s=t[e];return Ce(s)&&!Ce(r)?(s.value=r,!0):Reflect.set(t,e,r,n)}};function mc(t){return Yt(t)?t:new Proxy(t,Jh)}function Yh(t){const e=F(t)?new Array(t.length):{};for(const r in t)e[r]=Zh(t,r);return e}class Xh{constructor(e,r,n){this._object=e,this._defaultValue=n,this.__v_isRef=!0,this._value=void 0,this._key=pt(r)?r:String(r),this._raw=le(e);let s=!0,i=e;if(!F(e)||pt(this._key)||!Hs(this._key))do s=!Gs(i)||ct(i);while(s&&(i=i.__v_raw));this._shallow=s}get value(){let e=this._object[this._key];return this._shallow&&(e=re(e)),this._value=e===void 0?this._defaultValue:e}set value(e){if(this._shallow&&Ce(this._raw[this._key])){const r=this._object[this._key];if(Ce(r)){r.value=e;return}}this._object[this._key]=e}get dep(){return Oh(this._raw,this._key)}}function Zh(t,e,r){return new Xh(t,e,r)}class Qh{constructor(e,r,n){this.fn=e,this.setter=r,this._value=void 0,this.dep=new ko(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Nn-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!r,this.isSSR=n}notify(){if(this.flags|=16,!(this.flags&8)&&Se!==this)return rc(this,!0),!0}get value(){const e=this.dep.track();return ic(this),e&&(e.version=this.dep.version),this._value}set value(e){this.setter&&this.setter(e)}}function ed(t,e,r=!1){let n,s;return ee(t)?n=t:(n=t.get,s=t.set),new Qh(n,s,r)}const ss={},ks=new WeakMap;let kr;function td(t,e=!1,r=kr){if(r){let n=ks.get(r);n||ks.set(r,n=[]),n.push(t)}}function rd(t,e,r=_e){const{immediate:n,deep:s,once:i,scheduler:o,augmentJob:a,call:l}=r,c=x=>s?x:ct(x)||s===!1||s===0?Wt(x,1):Wt(x);let u,h,d,f,p=!1,y=!1;if(Ce(t)?(h=()=>t.value,p=ct(t)):Yt(t)?(h=()=>c(t),p=!0):F(t)?(y=!0,p=t.some(x=>Yt(x)||ct(x)),h=()=>t.map(x=>{if(Ce(x))return x.value;if(Yt(x))return c(x);if(ee(x))return l?l(x,2):x()})):ee(t)?e?h=l?()=>l(t,2):t:h=()=>{if(d){Zt();try{d()}finally{Qt()}}const x=kr;kr=u;try{return l?l(t,3,[f]):t(f)}finally{kr=x}}:h=Nt,e&&s){const x=h,D=s===!0?1/0:s;h=()=>Wt(x(),D)}const w=Ql(),k=()=>{u.stop(),w&&w.active&&yo(w.effects,u)};if(i&&e){const x=e;e=(...D)=>{x(...D),k()}}let _=y?new Array(t.length).fill(ss):ss;const b=x=>{if(!(!(u.flags&1)||!u.dirty&&!x))if(e){const D=u.run();if(s||p||(y?D.some((M,U)=>jt(M,_[U])):jt(D,_))){d&&d();const M=kr;kr=u;try{const U=[D,_===ss?void 0:y&&_[0]===ss?[]:_,f];_=D,l?l(e,3,U):e(...U)}finally{kr=M}}}else u.run()};return a&&a(b),u=new ec(h),u.scheduler=o?()=>o(b,!1):b,f=x=>td(x,!1,u),d=u.onStop=()=>{const x=ks.get(u);if(x){if(l)l(x,4);else for(const D of x)D();ks.delete(u)}},e?n?b(!0):_=u.run():o?o(b.bind(null,!0),!0):u.run(),k.pause=u.pause.bind(u),k.resume=u.resume.bind(u),k.stop=k,k}function Wt(t,e=1/0,r){if(e<=0||!pe(t)||t.__v_skip||(r=r||new Map,(r.get(t)||0)>=e))return t;if(r.set(t,e),e--,Ce(t))Wt(t.value,e,r);else if(F(t))for(let n=0;n<t.length;n++)Wt(t[n],e,r);else if(sn(t)||Gr(t))t.forEach(n=>{Wt(n,e,r)});else if(Wl(t)){for(const n in t)Wt(t[n],e,r);for(const n of Object.getOwnPropertySymbols(t))Object.prototype.propertyIsEnumerable.call(t,n)&&Wt(t[n],e,r)}return t}/**
|
|
10
|
+
**/let De;class Xl{constructor(e=!1){this.detached=e,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this._warnOnRun=!0,this.__v_skip=!0,!e&&De&&(De.active?(this.parent=De,this.index=(De.scopes||(De.scopes=[])).push(this)-1):(this._active=!1,this._warnOnRun=!1))}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let e,r;if(this.scopes)for(e=0,r=this.scopes.length;e<r;e++)this.scopes[e].pause();for(e=0,r=this.effects.length;e<r;e++)this.effects[e].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let e,r;if(this.scopes)for(e=0,r=this.scopes.length;e<r;e++)this.scopes[e].resume();for(e=0,r=this.effects.length;e<r;e++)this.effects[e].resume()}}run(e){if(this._active){const r=De;try{return De=this,e()}finally{De=r}}}on(){++this._on===1&&(this.prevScope=De,De=this)}off(){if(this._on>0&&--this._on===0){if(De===this)De=this.prevScope;else{let e=De;for(;e;){if(e.prevScope===this){e.prevScope=this.prevScope;break}e=e.prevScope}}this.prevScope=void 0}}stop(e){if(this._active){this._active=!1;let r,n;for(r=0,n=this.effects.length;r<n;r++)this.effects[r].stop();for(this.effects.length=0,r=0,n=this.cleanups.length;r<n;r++)this.cleanups[r]();if(this.cleanups.length=0,this.scopes){for(r=0,n=this.scopes.length;r<n;r++)this.scopes[r].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!e){const s=this.parent.scopes.pop();s&&s!==this&&(this.parent.scopes[this.index]=s,s.index=this.index)}this.parent=void 0}}}function Zl(t){return new Xl(t)}function Ql(){return De}function xh(t,e=!1){De&&De.cleanups.push(t)}let Se;const fi=new WeakSet;class ec{constructor(e){this.fn=e,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,De&&(De.active?De.effects.push(this):this.flags&=-2)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,fi.has(this)&&(fi.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||rc(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,Zo(this),nc(this);const e=Se,r=vt;Se=this,vt=!0;try{return this.fn()}finally{sc(this),Se=e,vt=r,this.flags&=-3}}stop(){if(this.flags&1){for(let e=this.deps;e;e=e.nextDep)wo(e);this.deps=this.depsTail=void 0,Zo(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?fi.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){Ni(this)&&this.run()}get dirty(){return Ni(this)}}let tc=0,Sn,En;function rc(t,e=!1){if(t.flags|=8,e){t.next=En,En=t;return}t.next=Sn,Sn=t}function bo(){tc++}function _o(){if(--tc>0)return;if(En){let e=En;for(En=void 0;e;){const r=e.next;e.next=void 0,e.flags&=-9,e=r}}let t;for(;Sn;){let e=Sn;for(Sn=void 0;e;){const r=e.next;if(e.next=void 0,e.flags&=-9,e.flags&1)try{e.trigger()}catch(n){t||(t=n)}e=r}}if(t)throw t}function nc(t){for(let e=t.deps;e;e=e.nextDep)e.version=-1,e.prevActiveLink=e.dep.activeLink,e.dep.activeLink=e}function sc(t){let e,r=t.depsTail,n=r;for(;n;){const s=n.prevDep;n.version===-1?(n===r&&(r=s),wo(n),Rh(n)):e=n,n.dep.activeLink=n.prevActiveLink,n.prevActiveLink=void 0,n=s}t.deps=e,t.depsTail=r}function Ni(t){for(let e=t.deps;e;e=e.nextDep)if(e.dep.version!==e.version||e.dep.computed&&(ic(e.dep.computed)||e.dep.version!==e.version))return!0;return!!t._dirty}function ic(t){if(t.flags&4&&!(t.flags&16)||(t.flags&=-17,t.globalVersion===Nn)||(t.globalVersion=Nn,!t.isSSR&&t.flags&128&&(!t.deps&&!t._dirty||!Ni(t))))return;t.flags|=2;const e=t.dep,r=Se,n=vt;Se=t,vt=!0;try{nc(t);const s=t.fn(t._value);(e.version===0||jt(s,t._value))&&(t.flags|=128,t._value=s,e.version++)}catch(s){throw e.version++,s}finally{Se=r,vt=n,sc(t),t.flags&=-3}}function wo(t,e=!1){const{dep:r,prevSub:n,nextSub:s}=t;if(n&&(n.nextSub=s,t.prevSub=void 0),s&&(s.prevSub=n,t.nextSub=void 0),r.subs===t&&(r.subs=n,!n&&r.computed)){r.computed.flags&=-5;for(let i=r.computed.deps;i;i=i.nextDep)wo(i,!0)}!e&&!--r.sc&&r.map&&r.map.delete(r.key)}function Rh(t){const{prevDep:e,nextDep:r}=t;e&&(e.nextDep=r,t.prevDep=void 0),r&&(r.prevDep=e,t.nextDep=void 0)}let vt=!0;const oc=[];function Zt(){oc.push(vt),vt=!1}function Qt(){const t=oc.pop();vt=t===void 0?!0:t}function Zo(t){const{cleanup:e}=t;if(t.cleanup=void 0,e){const r=Se;Se=void 0;try{e()}finally{Se=r}}}let Nn=0;class Ch{constructor(e,r){this.sub=e,this.dep=r,this.version=r.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class ko{constructor(e){this.computed=e,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(e){if(!Se||!vt||Se===this.computed)return;let r=this.activeLink;if(r===void 0||r.sub!==Se)r=this.activeLink=new Ch(Se,this),Se.deps?(r.prevDep=Se.depsTail,Se.depsTail.nextDep=r,Se.depsTail=r):Se.deps=Se.depsTail=r,ac(r);else if(r.version===-1&&(r.version=this.version,r.nextDep)){const n=r.nextDep;n.prevDep=r.prevDep,r.prevDep&&(r.prevDep.nextDep=n),r.prevDep=Se.depsTail,r.nextDep=void 0,Se.depsTail.nextDep=r,Se.depsTail=r,Se.deps===r&&(Se.deps=n)}return r}trigger(e){this.version++,Nn++,this.notify(e)}notify(e){bo();try{for(let r=this.subs;r;r=r.prevSub)r.sub.notify()&&r.sub.dep.notify()}finally{_o()}}}function ac(t){if(t.dep.sc++,t.sub.flags&4){const e=t.dep.computed;if(e&&!t.dep.subs){e.flags|=20;for(let n=e.deps;n;n=n.nextDep)ac(n)}const r=t.dep.subs;r!==t&&(t.prevSub=r,r&&(r.nextSub=t)),t.dep.subs=t}}const ws=new WeakMap,xr=Symbol(""),Li=Symbol(""),Ln=Symbol("");function Ve(t,e,r){if(vt&&Se){let n=ws.get(t);n||ws.set(t,n=new Map);let s=n.get(r);s||(n.set(r,s=new ko),s.map=n,s.key=r),s.track()}}function zt(t,e,r,n,s,i){const o=ws.get(t);if(!o){Nn++;return}const a=l=>{l&&l.trigger()};if(bo(),e==="clear")o.forEach(a);else{const l=F(t),c=l&&Hs(r);if(l&&r==="length"){const u=Number(n);o.forEach((h,d)=>{(d==="length"||d===Ln||!pt(d)&&d>=u)&&a(h)})}else switch((r!==void 0||o.has(void 0))&&a(o.get(r)),c&&a(o.get(Ln)),e){case"add":l?c&&a(o.get("length")):(a(o.get(xr)),Gr(t)&&a(o.get(Li)));break;case"delete":l||(a(o.get(xr)),Gr(t)&&a(o.get(Li)));break;case"set":Gr(t)&&a(o.get(xr));break}}_o()}function Oh(t,e){const r=ws.get(t);return r&&r.get(e)}function Ir(t){const e=le(t);return e===t?e:(Ve(e,"iterate",Ln),ct(t)?e:e.map(bt))}function Ks(t){return Ve(t=le(t),"iterate",Ln),t}function Pt(t,e){return er(t)?Zr(Yt(t)?bt(e):e):bt(e)}const Ph={__proto__:null,[Symbol.iterator](){return pi(this,Symbol.iterator,t=>Pt(this,t))},concat(...t){return Ir(this).concat(...t.map(e=>F(e)?Ir(e):e))},entries(){return pi(this,"entries",t=>(t[1]=Pt(this,t[1]),t))},every(t,e){return Dt(this,"every",t,e,void 0,arguments)},filter(t,e){return Dt(this,"filter",t,e,r=>r.map(n=>Pt(this,n)),arguments)},find(t,e){return Dt(this,"find",t,e,r=>Pt(this,r),arguments)},findIndex(t,e){return Dt(this,"findIndex",t,e,void 0,arguments)},findLast(t,e){return Dt(this,"findLast",t,e,r=>Pt(this,r),arguments)},findLastIndex(t,e){return Dt(this,"findLastIndex",t,e,void 0,arguments)},forEach(t,e){return Dt(this,"forEach",t,e,void 0,arguments)},includes(...t){return gi(this,"includes",t)},indexOf(...t){return gi(this,"indexOf",t)},join(t){return Ir(this).join(t)},lastIndexOf(...t){return gi(this,"lastIndexOf",t)},map(t,e){return Dt(this,"map",t,e,void 0,arguments)},pop(){return un(this,"pop")},push(...t){return un(this,"push",t)},reduce(t,...e){return Qo(this,"reduce",t,e)},reduceRight(t,...e){return Qo(this,"reduceRight",t,e)},shift(){return un(this,"shift")},some(t,e){return Dt(this,"some",t,e,void 0,arguments)},splice(...t){return un(this,"splice",t)},toReversed(){return Ir(this).toReversed()},toSorted(t){return Ir(this).toSorted(t)},toSpliced(...t){return Ir(this).toSpliced(...t)},unshift(...t){return un(this,"unshift",t)},values(){return pi(this,"values",t=>Pt(this,t))}};function pi(t,e,r){const n=Ks(t),s=n[e]();return n!==t&&!ct(t)&&(s._next=s.next,s.next=()=>{const i=s._next();return i.done||(i.value=r(i.value)),i}),s}const Ih=Array.prototype;function Dt(t,e,r,n,s,i){const o=Ks(t),a=o!==t&&!ct(t),l=o[e];if(l!==Ih[e]){const h=l.apply(t,i);return a?bt(h):h}let c=r;o!==t&&(a?c=function(h,d){return r.call(this,Pt(t,h),d,t)}:r.length>2&&(c=function(h,d){return r.call(this,h,d,t)}));const u=l.call(o,c,n);return a&&s?s(u):u}function Qo(t,e,r,n){const s=Ks(t),i=s!==t&&!ct(t);let o=r,a=!1;s!==t&&(i?(a=n.length===0,o=function(c,u,h){return a&&(a=!1,c=Pt(t,c)),r.call(this,c,Pt(t,u),h,t)}):r.length>3&&(o=function(c,u,h){return r.call(this,c,u,h,t)}));const l=s[e](o,...n);return a?Pt(t,l):l}function gi(t,e,r){const n=le(t);Ve(n,"iterate",Ln);const s=n[e](...r);return(s===-1||s===!1)&&Gs(r[0])?(r[0]=le(r[0]),n[e](...r)):s}function un(t,e,r=[]){Zt(),bo();const n=le(t)[e].apply(t,r);return _o(),Qt(),n}const $h=mo("__proto__,__v_isRef,__isVue"),lc=new Set(Object.getOwnPropertyNames(Symbol).filter(t=>t!=="arguments"&&t!=="caller").map(t=>Symbol[t]).filter(pt));function jh(t){pt(t)||(t=String(t));const e=le(this);return Ve(e,"has",t),e.hasOwnProperty(t)}class cc{constructor(e=!1,r=!1){this._isReadonly=e,this._isShallow=r}get(e,r,n){if(r==="__v_skip")return e.__v_skip;const s=this._isReadonly,i=this._isShallow;if(r==="__v_isReactive")return!s;if(r==="__v_isReadonly")return s;if(r==="__v_isShallow")return i;if(r==="__v_raw")return n===(s?i?Vh:fc:i?dc:hc).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(n)?e:void 0;const o=F(e);if(!s){let l;if(o&&(l=Ph[r]))return l;if(r==="hasOwnProperty")return jh}const a=Reflect.get(e,r,Ce(e)?e:n);if((pt(r)?lc.has(r):$h(r))||(s||Ve(e,"get",r),i))return a;if(Ce(a)){const l=o&&Hs(r)?a:a.value;return s&&ge(l)?Ui(l):l}return ge(a)?s?Ui(a):Xn(a):a}}class uc extends cc{constructor(e=!1){super(!1,e)}set(e,r,n,s){let i=e[r];const o=F(e)&&Hs(r);if(!this._isShallow){const c=er(i);if(!ct(n)&&!er(n)&&(i=le(i),n=le(n)),!o&&Ce(i)&&!Ce(n))return c||(i.value=n),!0}const a=o?Number(r)<e.length:fe(e,r),l=Reflect.set(e,r,n,Ce(e)?e:s);return e===le(s)&&(a?jt(n,i)&&zt(e,"set",r,n):zt(e,"add",r,n)),l}deleteProperty(e,r){const n=fe(e,r);e[r];const s=Reflect.deleteProperty(e,r);return s&&n&&zt(e,"delete",r,void 0),s}has(e,r){const n=Reflect.has(e,r);return(!pt(r)||!lc.has(r))&&Ve(e,"has",r),n}ownKeys(e){return Ve(e,"iterate",F(e)?"length":xr),Reflect.ownKeys(e)}}class Nh extends cc{constructor(e=!1){super(!0,e)}set(e,r){return!0}deleteProperty(e,r){return!0}}const Lh=new uc,Dh=new Nh,Uh=new uc(!0);const Di=t=>t,rs=t=>Reflect.getPrototypeOf(t);function Bh(t,e,r){return function(...n){const s=this.__v_raw,i=le(s),o=Gr(i),a=t==="entries"||t===Symbol.iterator&&o,l=t==="keys"&&o,c=s[t](...n),u=r?Di:e?Zr:bt;return!e&&Ve(i,"iterate",l?Li:xr),Ue(Object.create(c),{next(){const{value:h,done:d}=c.next();return d?{value:h,done:d}:{value:a?[u(h[0]),u(h[1])]:u(h),done:d}}})}}function ns(t){return function(...e){return t==="delete"?!1:t==="clear"?void 0:this}}function Mh(t,e){const r={get(s){const i=this.__v_raw,o=le(i),a=le(s);t||(jt(s,a)&&Ve(o,"get",s),Ve(o,"get",a));const{has:l}=rs(o),c=e?Di:t?Zr:bt;if(l.call(o,s))return c(i.get(s));if(l.call(o,a))return c(i.get(a));i!==o&&i.get(s)},get size(){const s=this.__v_raw;return!t&&Ve(le(s),"iterate",xr),s.size},has(s){const i=this.__v_raw,o=le(i),a=le(s);return t||(jt(s,a)&&Ve(o,"has",s),Ve(o,"has",a)),s===a?i.has(s):i.has(s)||i.has(a)},forEach(s,i){const o=this,a=o.__v_raw,l=le(a),c=e?Di:t?Zr:bt;return!t&&Ve(l,"iterate",xr),a.forEach((u,h)=>s.call(i,c(u),c(h),o))}};return Ue(r,t?{add:ns("add"),set:ns("set"),delete:ns("delete"),clear:ns("clear")}:{add(s){const i=le(this),o=rs(i),a=le(s),l=!e&&!ct(s)&&!er(s)?a:s;return o.has.call(i,l)||jt(s,l)&&o.has.call(i,s)||jt(a,l)&&o.has.call(i,a)||(i.add(l),zt(i,"add",l,l)),this},set(s,i){!e&&!ct(i)&&!er(i)&&(i=le(i));const o=le(this),{has:a,get:l}=rs(o);let c=a.call(o,s);c||(s=le(s),c=a.call(o,s));const u=l.call(o,s);return o.set(s,i),c?jt(i,u)&&zt(o,"set",s,i):zt(o,"add",s,i),this},delete(s){const i=le(this),{has:o,get:a}=rs(i);let l=o.call(i,s);l||(s=le(s),l=o.call(i,s)),a&&a.call(i,s);const c=i.delete(s);return l&&zt(i,"delete",s,void 0),c},clear(){const s=le(this),i=s.size!==0,o=s.clear();return i&&zt(s,"clear",void 0,void 0),o}}),["keys","values","entries",Symbol.iterator].forEach(s=>{r[s]=Bh(s,t,e)}),r}function So(t,e){const r=Mh(t,e);return(n,s,i)=>s==="__v_isReactive"?!t:s==="__v_isReadonly"?t:s==="__v_raw"?n:Reflect.get(fe(r,s)&&s in n?r:n,s,i)}const Hh={get:So(!1,!1)},qh={get:So(!1,!0)},Fh={get:So(!0,!1)};const hc=new WeakMap,dc=new WeakMap,fc=new WeakMap,Vh=new WeakMap;function zh(t){switch(t){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Wh(t){return t.__v_skip||!Object.isExtensible(t)?0:zh(mh(t))}function Xn(t){return er(t)?t:Eo(t,!1,Lh,Hh,hc)}function pc(t){return Eo(t,!1,Uh,qh,dc)}function Ui(t){return Eo(t,!0,Dh,Fh,fc)}function Eo(t,e,r,n,s){if(!ge(t)||t.__v_raw&&!(e&&t.__v_isReactive))return t;const i=Wh(t);if(i===0)return t;const o=s.get(t);if(o)return o;const a=new Proxy(t,i===2?n:r);return s.set(t,a),a}function Yt(t){return er(t)?Yt(t.__v_raw):!!(t&&t.__v_isReactive)}function er(t){return!!(t&&t.__v_isReadonly)}function ct(t){return!!(t&&t.__v_isShallow)}function Gs(t){return t?!!t.__v_raw:!1}function le(t){const e=t&&t.__v_raw;return e?le(e):t}function To(t){return!fe(t,"__v_skip")&&Object.isExtensible(t)&&Kl(t,"__v_skip",!0),t}const bt=t=>ge(t)?Xn(t):t,Zr=t=>ge(t)?Ui(t):t;function Ce(t){return t?t.__v_isRef===!0:!1}function Oe(t){return gc(t,!1)}function Kh(t){return gc(t,!0)}function gc(t,e){return Ce(t)?t:new Gh(t,e)}class Gh{constructor(e,r){this.dep=new ko,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=r?e:le(e),this._value=r?e:bt(e),this.__v_isShallow=r}get value(){return this.dep.track(),this._value}set value(e){const r=this._rawValue,n=this.__v_isShallow||ct(e)||er(e);e=n?e:le(e),jt(e,r)&&(this._rawValue=e,this._value=n?e:bt(e),this.dep.trigger())}}function re(t){return Ce(t)?t.value:t}const Jh={get:(t,e,r)=>e==="__v_raw"?t:re(Reflect.get(t,e,r)),set:(t,e,r,n)=>{const s=t[e];return Ce(s)&&!Ce(r)?(s.value=r,!0):Reflect.set(t,e,r,n)}};function mc(t){return Yt(t)?t:new Proxy(t,Jh)}function Yh(t){const e=F(t)?new Array(t.length):{};for(const r in t)e[r]=Zh(t,r);return e}class Xh{constructor(e,r,n){this._object=e,this._defaultValue=n,this.__v_isRef=!0,this._value=void 0,this._key=pt(r)?r:String(r),this._raw=le(e);let s=!0,i=e;if(!F(e)||pt(this._key)||!Hs(this._key))do s=!Gs(i)||ct(i);while(s&&(i=i.__v_raw));this._shallow=s}get value(){let e=this._object[this._key];return this._shallow&&(e=re(e)),this._value=e===void 0?this._defaultValue:e}set value(e){if(this._shallow&&Ce(this._raw[this._key])){const r=this._object[this._key];if(Ce(r)){r.value=e;return}}this._object[this._key]=e}get dep(){return Oh(this._raw,this._key)}}function Zh(t,e,r){return new Xh(t,e,r)}class Qh{constructor(e,r,n){this.fn=e,this.setter=r,this._value=void 0,this.dep=new ko(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Nn-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!r,this.isSSR=n}notify(){if(this.flags|=16,!(this.flags&8)&&Se!==this)return rc(this,!0),!0}get value(){const e=this.dep.track();return ic(this),e&&(e.version=this.dep.version),this._value}set value(e){this.setter&&this.setter(e)}}function ed(t,e,r=!1){let n,s;return ee(t)?n=t:(n=t.get,s=t.set),new Qh(n,s,r)}const ss={},ks=new WeakMap;let kr;function td(t,e=!1,r=kr){if(r){let n=ks.get(r);n||ks.set(r,n=[]),n.push(t)}}function rd(t,e,r=_e){const{immediate:n,deep:s,once:i,scheduler:o,augmentJob:a,call:l}=r,c=x=>s?x:ct(x)||s===!1||s===0?Wt(x,1):Wt(x);let u,h,d,f,p=!1,y=!1;if(Ce(t)?(h=()=>t.value,p=ct(t)):Yt(t)?(h=()=>c(t),p=!0):F(t)?(y=!0,p=t.some(x=>Yt(x)||ct(x)),h=()=>t.map(x=>{if(Ce(x))return x.value;if(Yt(x))return c(x);if(ee(x))return l?l(x,2):x()})):ee(t)?e?h=l?()=>l(t,2):t:h=()=>{if(d){Zt();try{d()}finally{Qt()}}const x=kr;kr=u;try{return l?l(t,3,[f]):t(f)}finally{kr=x}}:h=Nt,e&&s){const x=h,D=s===!0?1/0:s;h=()=>Wt(x(),D)}const w=Ql(),k=()=>{u.stop(),w&&w.active&&yo(w.effects,u)};if(i&&e){const x=e;e=(...D)=>{x(...D),k()}}let _=y?new Array(t.length).fill(ss):ss;const b=x=>{if(!(!(u.flags&1)||!u.dirty&&!x))if(e){const D=u.run();if(s||p||(y?D.some((M,U)=>jt(M,_[U])):jt(D,_))){d&&d();const M=kr;kr=u;try{const U=[D,_===ss?void 0:y&&_[0]===ss?[]:_,f];_=D,l?l(e,3,U):e(...U)}finally{kr=M}}}else u.run()};return a&&a(b),u=new ec(h),u.scheduler=o?()=>o(b,!1):b,f=x=>td(x,!1,u),d=u.onStop=()=>{const x=ks.get(u);if(x){if(l)l(x,4);else for(const D of x)D();ks.delete(u)}},e?n?b(!0):_=u.run():o?o(b.bind(null,!0),!0):u.run(),k.pause=u.pause.bind(u),k.resume=u.resume.bind(u),k.stop=k,k}function Wt(t,e=1/0,r){if(e<=0||!ge(t)||t.__v_skip||(r=r||new Map,(r.get(t)||0)>=e))return t;if(r.set(t,e),e--,Ce(t))Wt(t.value,e,r);else if(F(t))for(let n=0;n<t.length;n++)Wt(t[n],e,r);else if(sn(t)||Gr(t))t.forEach(n=>{Wt(n,e,r)});else if(Wl(t)){for(const n in t)Wt(t[n],e,r);for(const n of Object.getOwnPropertySymbols(t))Object.prototype.propertyIsEnumerable.call(t,n)&&Wt(t[n],e,r)}return t}/**
|
|
11
11
|
* @vue/runtime-core v3.5.34
|
|
12
12
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
13
13
|
* @license MIT
|
|
14
|
-
**/function Zn(t,e,r,n){try{return n?t(...n):t()}catch(s){Js(s,e,r)}}function _t(t,e,r,n){if(ee(t)){const s=Zn(t,e,r,n);return s&&Vl(s)&&s.catch(i=>{Js(i,e,r)}),s}if(F(t)){const s=[];for(let i=0;i<t.length;i++)s.push(_t(t[i],e,r,n));return s}}function Js(t,e,r,n=!0){const s=e?e.vnode:null,{errorHandler:i,throwUnhandledErrorInProduction:o}=e&&e.appContext.config||_e;if(e){let a=e.parent;const l=e.proxy,c=`https://vuejs.org/error-reference/#runtime-${r}`;for(;a;){const u=a.ec;if(u){for(let h=0;h<u.length;h++)if(u[h](t,l,c)===!1)return}a=a.parent}if(i){Zt(),Zn(i,null,10,[t,l,c]),Qt();return}}nd(t,r,s,n,o)}function nd(t,e,r,n=!0,s=!1){if(s)throw t;console.error(t)}const Xe=[];let Rt=-1;const Jr=[];let or=null,Br=0;const yc=Promise.resolve();let Ss=null;function hr(t){const e=Ss||yc;return t?e.then(this?t.bind(this):t):e}function sd(t){let e=Rt+1,r=Xe.length;for(;e<r;){const n=e+r>>>1,s=Xe[n],i=Dn(s);i<t||i===t&&s.flags&2?e=n+1:r=n}return e}function Ao(t){if(!(t.flags&1)){const e=Dn(t),r=Xe[Xe.length-1];!r||!(t.flags&2)&&e>=Dn(r)?Xe.push(t):Xe.splice(sd(e),0,t),t.flags|=1,vc()}}function vc(){Ss||(Ss=yc.then(_c))}function id(t){F(t)?Jr.push(...t):or&&t.id===-1?or.splice(Br+1,0,t):t.flags&1||(Jr.push(t),t.flags|=1),vc()}function ea(t,e,r=Rt+1){for(;r<Xe.length;r++){const n=Xe[r];if(n&&n.flags&2){if(t&&n.id!==t.uid)continue;Xe.splice(r,1),r--,n.flags&4&&(n.flags&=-2),n(),n.flags&4||(n.flags&=-2)}}}function bc(t){if(Jr.length){const e=[...new Set(Jr)].sort((r,n)=>Dn(r)-Dn(n));if(Jr.length=0,or){or.push(...e);return}for(or=e,Br=0;Br<or.length;Br++){const r=or[Br];r.flags&4&&(r.flags&=-2),r.flags&8||r(),r.flags&=-2}or=null,Br=0}}const Dn=t=>t.id==null?t.flags&2?-1:1/0:t.id;function _c(t){try{for(Rt=0;Rt<Xe.length;Rt++){const e=Xe[Rt];e&&!(e.flags&8)&&(e.flags&4&&(e.flags&=-2),Zn(e,e.i,e.i?15:14),e.flags&4||(e.flags&=-2))}}finally{for(;Rt<Xe.length;Rt++){const e=Xe[Rt];e&&(e.flags&=-2)}Rt=-1,Xe.length=0,bc(),Ss=null,(Xe.length||Jr.length)&&_c()}}let at=null,wc=null;function Es(t){const e=at;return at=t,wc=t&&t.type.__scopeId||null,e}function Yr(t,e=at,r){if(!e||t._n)return t;const n=(...s)=>{n._d&&xs(-1);const i=Es(e);let o;try{o=t(...s)}finally{Es(i),n._d&&xs(1)}return o};return n._n=!0,n._c=!0,n._d=!0,n}function od(t,e){if(at===null)return t;const r=ti(at),n=t.dirs||(t.dirs=[]);for(let s=0;s<e.length;s++){let[i,o,a,l=_e]=e[s];i&&(ee(i)&&(i={mounted:i,updated:i}),i.deep&&Wt(o),n.push({dir:i,instance:r,value:o,oldValue:void 0,arg:a,modifiers:l}))}return t}function mr(t,e,r,n){const s=t.dirs,i=e&&e.dirs;for(let o=0;o<s.length;o++){const a=s[o];i&&(a.oldValue=i[o].value);let l=a.dir[n];l&&(Zt(),_t(l,r,8,[t.el,a,t,e]),Qt())}}function ys(t,e){if(ze){let r=ze.provides;const n=ze.parent&&ze.parent.provides;n===r&&(r=ze.provides=Object.create(n)),r[t]=e}}function ft(t,e,r=!1){const n=Po();if(n||Rr){let s=Rr?Rr._context.provides:n?n.parent==null||n.ce?n.vnode.appContext&&n.vnode.appContext.provides:n.parent.provides:void 0;if(s&&t in s)return s[t];if(arguments.length>1)return r&&ee(e)?e.call(n&&n.proxy):e}}function ad(){return!!(Po()||Rr)}const ld=Symbol.for("v-scx"),cd=()=>ft(ld);function Kt(t,e,r){return kc(t,e,r)}function kc(t,e,r=_e){const{immediate:n,deep:s,flush:i,once:o}=r,a=Ue({},r),l=e&&n||!e&&i!=="post";let c;if(Mn){if(i==="sync"){const f=cd();c=f.__watcherHandles||(f.__watcherHandles=[])}else if(!l){const f=()=>{};return f.stop=Nt,f.resume=Nt,f.pause=Nt,f}}const u=ze;a.call=(f,p,y)=>_t(f,u,p,y);let h=!1;i==="post"?a.scheduler=f=>{rt(f,u&&u.suspense)}:i!=="sync"&&(h=!0,a.scheduler=(f,p)=>{p?f():Ao(f)}),a.augmentJob=f=>{e&&(f.flags|=4),h&&(f.flags|=2,u&&(f.id=u.uid,f.i=u))};const d=rd(t,e,a);return Mn&&(c?c.push(d):l&&d()),d}function ud(t,e,r){const n=this.proxy,s=Te(t)?t.includes(".")?Sc(n,t):()=>n[t]:t.bind(n,n);let i;ee(e)?i=e:(i=e.handler,r=e);const o=Qn(this),a=kc(s,i.bind(n),r);return o(),a}function Sc(t,e){const r=e.split(".");return()=>{let n=t;for(let s=0;s<r.length&&n;s++)n=n[r[s]];return n}}const hd=Symbol("_vte"),Ec=t=>t.__isTeleport,Ct=Symbol("_leaveCb"),hn=Symbol("_enterCb");function dd(){const t={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return xo(()=>{t.isMounted=!0}),Ic(()=>{t.isUnmounting=!0}),t}const ht=[Function,Array],Tc={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:ht,onEnter:ht,onAfterEnter:ht,onEnterCancelled:ht,onBeforeLeave:ht,onLeave:ht,onAfterLeave:ht,onLeaveCancelled:ht,onBeforeAppear:ht,onAppear:ht,onAfterAppear:ht,onAppearCancelled:ht},Ac=t=>{const e=t.subTree;return e.component?Ac(e.component):e},fd={name:"BaseTransition",props:Tc,setup(t,{slots:e}){const r=Po(),n=dd();return()=>{const s=e.default&&Cc(e.default(),!0),i=s&&s.length?xc(s):r.subTree?De():void 0;if(!i)return;const o=le(t),{mode:a}=o;if(n.isLeaving)return mi(i);const l=ta(i);if(!l)return mi(i);let c=Bi(l,o,n,r,h=>c=h);l.type!==Ze&&Un(l,c);let u=r.subTree&&ta(r.subTree);if(u&&u.type!==Ze&&!Er(u,l)&&Ac(r).type!==Ze){let h=Bi(u,o,n,r);if(Un(u,h),a==="out-in"&&l.type!==Ze)return n.isLeaving=!0,h.afterLeave=()=>{n.isLeaving=!1,r.job.flags&8||r.update(),delete h.afterLeave,u=void 0},mi(i);a==="in-out"&&l.type!==Ze?h.delayLeave=(d,f,p)=>{const y=Rc(n,u);y[String(u.key)]=u,d[Ct]=()=>{f(),d[Ct]=void 0,delete c.delayedLeave,u=void 0},c.delayedLeave=()=>{p(),delete c.delayedLeave,u=void 0}}:u=void 0}else u&&(u=void 0);return i}}};function xc(t){let e=t[0];if(t.length>1){for(const r of t)if(r.type!==Ze){e=r;break}}return e}const pd=fd;function Rc(t,e){const{leavingVNodes:r}=t;let n=r.get(e.type);return n||(n=Object.create(null),r.set(e.type,n)),n}function Bi(t,e,r,n,s){const{appear:i,mode:o,persisted:a=!1,onBeforeEnter:l,onEnter:c,onAfterEnter:u,onEnterCancelled:h,onBeforeLeave:d,onLeave:f,onAfterLeave:p,onLeaveCancelled:y,onBeforeAppear:w,onAppear:k,onAfterAppear:_,onAppearCancelled:b}=e,x=String(t.key),D=Rc(r,t),M=(C,z)=>{C&&_t(C,n,9,z)},U=(C,z)=>{const Q=z[1];M(C,z),F(C)?C.every(O=>O.length<=1)&&Q():C.length<=1&&Q()},V={mode:o,persisted:a,beforeEnter(C){let z=l;if(!r.isMounted)if(i)z=w||l;else return;C[Ct]&&C[Ct](!0);const Q=D[x];Q&&Er(t,Q)&&Q.el[Ct]&&Q.el[Ct](),M(z,[C])},enter(C){if(D[x]===t)return;let z=c,Q=u,O=h;if(!r.isMounted)if(i)z=k||c,Q=_||u,O=b||h;else return;let Y=!1;C[hn]=je=>{Y||(Y=!0,je?M(O,[C]):M(Q,[C]),V.delayedLeave&&V.delayedLeave(),C[hn]=void 0)};const Ee=C[hn].bind(null,!1);z?U(z,[C,Ee]):Ee()},leave(C,z){const Q=String(t.key);if(C[hn]&&C[hn](!0),r.isUnmounting)return z();M(d,[C]);let O=!1;C[Ct]=Ee=>{O||(O=!0,z(),Ee?M(y,[C]):M(p,[C]),C[Ct]=void 0,D[Q]===t&&delete D[Q])};const Y=C[Ct].bind(null,!1);D[Q]=t,f?U(f,[C,Y]):Y()},clone(C){const z=Bi(C,e,r,n,s);return s&&s(z),z}};return V}function mi(t){if(Ys(t))return t=dr(t),t.children=null,t}function ta(t){if(!Ys(t))return Ec(t.type)&&t.children?xc(t.children):t;if(t.component)return t.component.subTree;const{shapeFlag:e,children:r}=t;if(r){if(e&16)return r[0];if(e&32&&ee(r.default))return r.default()}}function Un(t,e){t.shapeFlag&6&&t.component?(t.transition=e,Un(t.component.subTree,e)):t.shapeFlag&128?(t.ssContent.transition=e.clone(t.ssContent),t.ssFallback.transition=e.clone(t.ssFallback)):t.transition=e}function Cc(t,e=!1,r){let n=[],s=0;for(let i=0;i<t.length;i++){let o=t[i];const a=r==null?o.key:String(r)+String(o.key!=null?o.key:i);o.type===Fe?(o.patchFlag&128&&s++,n=n.concat(Cc(o.children,e,a))):(e||o.type!==Ze)&&n.push(a!=null?dr(o,{key:a}):o)}if(s>1)for(let i=0;i<n.length;i++)n[i].patchFlag=-2;return n}function pr(t,e){return ee(t)?Ue({name:t.name},e,{setup:t}):t}function Oc(t){t.ids=[t.ids[0]+t.ids[2]+++"-",0,0]}function ra(t,e){let r;return!!((r=Object.getOwnPropertyDescriptor(t,e))&&!r.configurable)}const Ts=new WeakMap;function Tn(t,e,r,n,s=!1){if(F(t)){t.forEach((y,w)=>Tn(y,e&&(F(e)?e[w]:e),r,n,s));return}if(An(n)&&!s){n.shapeFlag&512&&n.type.__asyncResolved&&n.component.subTree.component&&Tn(t,e,r,n.component.subTree);return}const i=n.shapeFlag&4?ti(n.component):n.el,o=s?null:i,{i:a,r:l}=t,c=e&&e.r,u=a.refs===_e?a.refs={}:a.refs,h=a.setupState,d=le(h),f=h===_e?Fl:y=>ra(u,y)?!1:fe(d,y),p=(y,w)=>!(w&&ra(u,w));if(c!=null&&c!==l){if(na(e),Te(c))u[c]=null,f(c)&&(h[c]=null);else if(Ce(c)){const y=e;p(c,y.k)&&(c.value=null),y.k&&(u[y.k]=null)}}if(ee(l))Zn(l,a,12,[o,u]);else{const y=Te(l),w=Ce(l);if(y||w){const k=()=>{if(t.f){const _=y?f(l)?h[l]:u[l]:p()||!t.k?l.value:u[t.k];if(s)F(_)&&yo(_,i);else if(F(_))_.includes(i)||_.push(i);else if(y)u[l]=[i],f(l)&&(h[l]=u[l]);else{const b=[i];p(l,t.k)&&(l.value=b),t.k&&(u[t.k]=b)}}else y?(u[l]=o,f(l)&&(h[l]=o)):w&&(p(l,t.k)&&(l.value=o),t.k&&(u[t.k]=o))};if(o){const _=()=>{k(),Ts.delete(t)};_.id=-1,Ts.set(t,_),rt(_,r)}else na(t),k()}}}function na(t){const e=Ts.get(t);e&&(e.flags|=8,Ts.delete(t))}zs().requestIdleCallback;zs().cancelIdleCallback;const An=t=>!!t.type.__asyncLoader,Ys=t=>t.type.__isKeepAlive;function gd(t,e){Pc(t,"a",e)}function md(t,e){Pc(t,"da",e)}function Pc(t,e,r=ze){const n=t.__wdc||(t.__wdc=()=>{let s=r;for(;s;){if(s.isDeactivated)return;s=s.parent}return t()});if(Xs(e,n,r),r){let s=r.parent;for(;s&&s.parent;)Ys(s.parent.vnode)&&yd(n,e,r,s),s=s.parent}}function yd(t,e,r,n){const s=Xs(e,t,n,!0);$c(()=>{yo(n[e],s)},r)}function Xs(t,e,r=ze,n=!1){if(r){const s=r[t]||(r[t]=[]),i=e.__weh||(e.__weh=(...o)=>{Zt();const a=Qn(r),l=_t(e,r,t,o);return a(),Qt(),l});return n?s.unshift(i):s.push(i),i}}const tr=t=>(e,r=ze)=>{(!Mn||t==="sp")&&Xs(t,(...n)=>e(...n),r)},vd=tr("bm"),xo=tr("m"),bd=tr("bu"),_d=tr("u"),Ic=tr("bum"),$c=tr("um"),wd=tr("sp"),kd=tr("rtg"),Sd=tr("rtc");function Ed(t,e=ze){Xs("ec",t,e)}const jc="components";function Zs(t,e){return Lc(jc,t,!0,e)||t}const Nc=Symbol.for("v-ndc");function sa(t){return Te(t)?Lc(jc,t,!1)||t:t||Nc}function Lc(t,e,r=!0,n=!1){const s=at||ze;if(s){const i=s.type;{const a=cf(i,!1);if(a&&(a===e||a===et(e)||a===Fs(et(e))))return i}const o=ia(s[t]||i[t],e)||ia(s.appContext[t],e);return!o&&n?i:o}}function ia(t,e){return t&&(t[e]||t[et(e)]||t[Fs(et(e))])}function zr(t,e,r,n){let s;const i=r,o=F(t);if(o||Te(t)){const a=o&&Yt(t);let l=!1,c=!1;a&&(l=!ct(t),c=er(t),t=Ks(t)),s=new Array(t.length);for(let u=0,h=t.length;u<h;u++)s[u]=e(l?c?Zr(bt(t[u])):bt(t[u]):t[u],u,void 0,i)}else if(typeof t=="number"){s=new Array(t);for(let a=0;a<t;a++)s[a]=e(a+1,a,void 0,i)}else if(pe(t))if(t[Symbol.iterator])s=Array.from(t,(a,l)=>e(a,l,void 0,i));else{const a=Object.keys(t);s=new Array(a.length);for(let l=0,c=a.length;l<c;l++){const u=a[l];s[l]=e(t[u],u,l,i)}}else s=[];return s}const Mi=t=>t?nu(t)?ti(t):Mi(t.parent):null,xn=Ue(Object.create(null),{$:t=>t,$el:t=>t.vnode.el,$data:t=>t.data,$props:t=>t.props,$attrs:t=>t.attrs,$slots:t=>t.slots,$refs:t=>t.refs,$parent:t=>Mi(t.parent),$root:t=>Mi(t.root),$host:t=>t.ce,$emit:t=>t.emit,$options:t=>Uc(t),$forceUpdate:t=>t.f||(t.f=()=>{Ao(t.update)}),$nextTick:t=>t.n||(t.n=hr.bind(t.proxy)),$watch:t=>ud.bind(t)}),yi=(t,e)=>t!==_e&&!t.__isScriptSetup&&fe(t,e),Td={get({_:t},e){if(e==="__v_skip")return!0;const{ctx:r,setupState:n,data:s,props:i,accessCache:o,type:a,appContext:l}=t;if(e[0]!=="$"){const d=o[e];if(d!==void 0)switch(d){case 1:return n[e];case 2:return s[e];case 4:return r[e];case 3:return i[e]}else{if(yi(n,e))return o[e]=1,n[e];if(s!==_e&&fe(s,e))return o[e]=2,s[e];if(fe(i,e))return o[e]=3,i[e];if(r!==_e&&fe(r,e))return o[e]=4,r[e];Hi&&(o[e]=0)}}const c=xn[e];let u,h;if(c)return e==="$attrs"&&Ve(t.attrs,"get",""),c(t);if((u=a.__cssModules)&&(u=u[e]))return u;if(r!==_e&&fe(r,e))return o[e]=4,r[e];if(h=l.config.globalProperties,fe(h,e))return h[e]},set({_:t},e,r){const{data:n,setupState:s,ctx:i}=t;return yi(s,e)?(s[e]=r,!0):n!==_e&&fe(n,e)?(n[e]=r,!0):fe(t.props,e)||e[0]==="$"&&e.slice(1)in t?!1:(i[e]=r,!0)},has({_:{data:t,setupState:e,accessCache:r,ctx:n,appContext:s,props:i,type:o}},a){let l;return!!(r[a]||t!==_e&&a[0]!=="$"&&fe(t,a)||yi(e,a)||fe(i,a)||fe(n,a)||fe(xn,a)||fe(s.config.globalProperties,a)||(l=o.__cssModules)&&l[a])},defineProperty(t,e,r){return r.get!=null?t._.accessCache[e]=0:fe(r,"value")&&this.set(t,e,r.value,null),Reflect.defineProperty(t,e,r)}};function oa(t){return F(t)?t.reduce((e,r)=>(e[r]=null,e),{}):t}let Hi=!0;function Ad(t){const e=Uc(t),r=t.proxy,n=t.ctx;Hi=!1,e.beforeCreate&&aa(e.beforeCreate,t,"bc");const{data:s,computed:i,methods:o,watch:a,provide:l,inject:c,created:u,beforeMount:h,mounted:d,beforeUpdate:f,updated:p,activated:y,deactivated:w,beforeDestroy:k,beforeUnmount:_,destroyed:b,unmounted:x,render:D,renderTracked:M,renderTriggered:U,errorCaptured:V,serverPrefetch:C,expose:z,inheritAttrs:Q,components:O,directives:Y,filters:Ee}=e;if(c&&xd(c,n,null),o)for(const te in o){const L=o[te];ee(L)&&(n[te]=L.bind(r))}if(s){const te=s.call(r,r);pe(te)&&(t.data=Xn(te))}if(Hi=!0,i)for(const te in i){const L=i[te],se=ee(L)?L.bind(r,r):ee(L.get)?L.get.bind(r,r):Nt,We=!ee(L)&&ee(L.set)?L.set.bind(r):Nt,ie=$e({get:se,set:We});Object.defineProperty(n,te,{enumerable:!0,configurable:!0,get:()=>ie.value,set:ae=>ie.value=ae})}if(a)for(const te in a)Dc(a[te],n,r,te);if(l){const te=ee(l)?l.call(r):l;Reflect.ownKeys(te).forEach(L=>{ys(L,te[L])})}u&&aa(u,t,"c");function me(te,L){F(L)?L.forEach(se=>te(se.bind(r))):L&&te(L.bind(r))}if(me(vd,h),me(xo,d),me(bd,f),me(_d,p),me(gd,y),me(md,w),me(Ed,V),me(Sd,M),me(kd,U),me(Ic,_),me($c,x),me(wd,C),F(z))if(z.length){const te=t.exposed||(t.exposed={});z.forEach(L=>{Object.defineProperty(te,L,{get:()=>r[L],set:se=>r[L]=se,enumerable:!0})})}else t.exposed||(t.exposed={});D&&t.render===Nt&&(t.render=D),Q!=null&&(t.inheritAttrs=Q),O&&(t.components=O),Y&&(t.directives=Y),C&&Oc(t)}function xd(t,e,r=Nt){F(t)&&(t=qi(t));for(const n in t){const s=t[n];let i;pe(s)?"default"in s?i=ft(s.from||n,s.default,!0):i=ft(s.from||n):i=ft(s),Ce(i)?Object.defineProperty(e,n,{enumerable:!0,configurable:!0,get:()=>i.value,set:o=>i.value=o}):e[n]=i}}function aa(t,e,r){_t(F(t)?t.map(n=>n.bind(e.proxy)):t.bind(e.proxy),e,r)}function Dc(t,e,r,n){let s=n.includes(".")?Sc(r,n):()=>r[n];if(Te(t)){const i=e[t];ee(i)&&Kt(s,i)}else if(ee(t))Kt(s,t.bind(r));else if(pe(t))if(F(t))t.forEach(i=>Dc(i,e,r,n));else{const i=ee(t.handler)?t.handler.bind(r):e[t.handler];ee(i)&&Kt(s,i,t)}}function Uc(t){const e=t.type,{mixins:r,extends:n}=e,{mixins:s,optionsCache:i,config:{optionMergeStrategies:o}}=t.appContext,a=i.get(e);let l;return a?l=a:!s.length&&!r&&!n?l=e:(l={},s.length&&s.forEach(c=>As(l,c,o,!0)),As(l,e,o)),pe(e)&&i.set(e,l),l}function As(t,e,r,n=!1){const{mixins:s,extends:i}=e;i&&As(t,i,r,!0),s&&s.forEach(o=>As(t,o,r,!0));for(const o in e)if(!(n&&o==="expose")){const a=Rd[o]||r&&r[o];t[o]=a?a(t[o],e[o]):e[o]}return t}const Rd={data:la,props:ca,emits:ca,methods:vn,computed:vn,beforeCreate:Ge,created:Ge,beforeMount:Ge,mounted:Ge,beforeUpdate:Ge,updated:Ge,beforeDestroy:Ge,beforeUnmount:Ge,destroyed:Ge,unmounted:Ge,activated:Ge,deactivated:Ge,errorCaptured:Ge,serverPrefetch:Ge,components:vn,directives:vn,watch:Od,provide:la,inject:Cd};function la(t,e){return e?t?function(){return Ue(ee(t)?t.call(this,this):t,ee(e)?e.call(this,this):e)}:e:t}function Cd(t,e){return vn(qi(t),qi(e))}function qi(t){if(F(t)){const e={};for(let r=0;r<t.length;r++)e[t[r]]=t[r];return e}return t}function Ge(t,e){return t?[...new Set([].concat(t,e))]:e}function vn(t,e){return t?Ue(Object.create(null),t,e):e}function ca(t,e){return t?F(t)&&F(e)?[...new Set([...t,...e])]:Ue(Object.create(null),oa(t),oa(e??{})):e}function Od(t,e){if(!t)return e;if(!e)return t;const r=Ue(Object.create(null),t);for(const n in e)r[n]=Ge(t[n],e[n]);return r}function Bc(){return{app:null,config:{isNativeTag:Fl,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let Pd=0;function Id(t,e){return function(n,s=null){ee(n)||(n=Ue({},n)),s!=null&&!pe(s)&&(s=null);const i=Bc(),o=new WeakSet,a=[];let l=!1;const c=i.app={_uid:Pd++,_component:n,_props:s,_container:null,_context:i,_instance:null,version:hf,get config(){return i.config},set config(u){},use(u,...h){return o.has(u)||(u&&ee(u.install)?(o.add(u),u.install(c,...h)):ee(u)&&(o.add(u),u(c,...h))),c},mixin(u){return i.mixins.includes(u)||i.mixins.push(u),c},component(u,h){return h?(i.components[u]=h,c):i.components[u]},directive(u,h){return h?(i.directives[u]=h,c):i.directives[u]},mount(u,h,d){if(!l){const f=c._ceVNode||he(n,s);return f.appContext=i,d===!0?d="svg":d===!1&&(d=void 0),t(f,u,d),l=!0,c._container=u,u.__vue_app__=c,ti(f.component)}},onUnmount(u){a.push(u)},unmount(){l&&(_t(a,c._instance,16),t(null,c._container),delete c._container.__vue_app__)},provide(u,h){return i.provides[u]=h,c},runWithContext(u){const h=Rr;Rr=c;try{return u()}finally{Rr=h}}};return c}}let Rr=null;const $d=(t,e)=>e==="modelValue"||e==="model-value"?t.modelModifiers:t[`${e}Modifiers`]||t[`${et(e)}Modifiers`]||t[`${fr(e)}Modifiers`];function jd(t,e,...r){if(t.isUnmounted)return;const n=t.vnode.props||_e;let s=r;const i=e.startsWith("update:"),o=i&&$d(n,e.slice(7));o&&(o.trim&&(s=r.map(u=>Te(u)?u.trim():u)),o.number&&(s=r.map(Vs)));let a,l=n[a=hi(e)]||n[a=hi(et(e))];!l&&i&&(l=n[a=hi(fr(e))]),l&&_t(l,t,6,s);const c=n[a+"Once"];if(c){if(!t.emitted)t.emitted={};else if(t.emitted[a])return;t.emitted[a]=!0,_t(c,t,6,s)}}const Nd=new WeakMap;function Mc(t,e,r=!1){const n=r?Nd:e.emitsCache,s=n.get(t);if(s!==void 0)return s;const i=t.emits;let o={},a=!1;if(!ee(t)){const l=c=>{const u=Mc(c,e,!0);u&&(a=!0,Ue(o,u))};!r&&e.mixins.length&&e.mixins.forEach(l),t.extends&&l(t.extends),t.mixins&&t.mixins.forEach(l)}return!i&&!a?(pe(t)&&n.set(t,null),null):(F(i)?i.forEach(l=>o[l]=null):Ue(o,i),pe(t)&&n.set(t,o),o)}function Qs(t,e){return!t||!Bs(e)?!1:(e=e.slice(2).replace(/Once$/,""),fe(t,e[0].toLowerCase()+e.slice(1))||fe(t,fr(e))||fe(t,e))}function ua(t){const{type:e,vnode:r,proxy:n,withProxy:s,propsOptions:[i],slots:o,attrs:a,emit:l,render:c,renderCache:u,props:h,data:d,setupState:f,ctx:p,inheritAttrs:y}=t,w=Es(t);let k,_;try{if(r.shapeFlag&4){const x=s||n,D=x;k=It(c.call(D,x,u,h,f,d,p)),_=a}else{const x=e;k=It(x.length>1?x(h,{attrs:a,slots:o,emit:l}):x(h,null)),_=e.props?a:Ld(a)}}catch(x){Rn.length=0,Js(x,t,1),k=he(Ze)}let b=k;if(_&&y!==!1){const x=Object.keys(_),{shapeFlag:D}=b;x.length&&D&7&&(i&&x.some(Ms)&&(_=Dd(_,i)),b=dr(b,_,!1,!0))}return r.dirs&&(b=dr(b,null,!1,!0),b.dirs=b.dirs?b.dirs.concat(r.dirs):r.dirs),r.transition&&Un(b,r.transition),k=b,Es(w),k}const Ld=t=>{let e;for(const r in t)(r==="class"||r==="style"||Bs(r))&&((e||(e={}))[r]=t[r]);return e},Dd=(t,e)=>{const r={};for(const n in t)(!Ms(n)||!(n.slice(9)in e))&&(r[n]=t[n]);return r};function Ud(t,e,r){const{props:n,children:s,component:i}=t,{props:o,children:a,patchFlag:l}=e,c=i.emitsOptions;if(e.dirs||e.transition)return!0;if(r&&l>=0){if(l&1024)return!0;if(l&16)return n?ha(n,o,c):!!o;if(l&8){const u=e.dynamicProps;for(let h=0;h<u.length;h++){const d=u[h];if(Hc(o,n,d)&&!Qs(c,d))return!0}}}else return(s||a)&&(!a||!a.$stable)?!0:n===o?!1:n?o?ha(n,o,c):!0:!!o;return!1}function ha(t,e,r){const n=Object.keys(e);if(n.length!==Object.keys(t).length)return!0;for(let s=0;s<n.length;s++){const i=n[s];if(Hc(e,t,i)&&!Qs(r,i))return!0}return!1}function Hc(t,e,r){const n=t[r],s=e[r];return r==="style"&&pe(n)&&pe(s)?!on(n,s):n!==s}function Bd({vnode:t,parent:e,suspense:r},n){for(;e;){const s=e.subTree;if(s.suspense&&s.suspense.activeBranch===t&&(s.suspense.vnode.el=s.el=n,t=s),s===t)(t=e.vnode).el=n,e=e.parent;else break}r&&r.activeBranch===t&&(r.vnode.el=n)}const qc={},Fc=()=>Object.create(qc),Vc=t=>Object.getPrototypeOf(t)===qc;function Md(t,e,r,n=!1){const s={},i=Fc();t.propsDefaults=Object.create(null),zc(t,e,s,i);for(const o in t.propsOptions[0])o in s||(s[o]=void 0);r?t.props=n?s:pc(s):t.type.props?t.props=s:t.props=i,t.attrs=i}function Hd(t,e,r,n){const{props:s,attrs:i,vnode:{patchFlag:o}}=t,a=le(s),[l]=t.propsOptions;let c=!1;if((n||o>0)&&!(o&16)){if(o&8){const u=t.vnode.dynamicProps;for(let h=0;h<u.length;h++){let d=u[h];if(Qs(t.emitsOptions,d))continue;const f=e[d];if(l)if(fe(i,d))f!==i[d]&&(i[d]=f,c=!0);else{const p=et(d);s[p]=Fi(l,a,p,f,t,!1)}else f!==i[d]&&(i[d]=f,c=!0)}}}else{zc(t,e,s,i)&&(c=!0);let u;for(const h in a)(!e||!fe(e,h)&&((u=fr(h))===h||!fe(e,u)))&&(l?r&&(r[h]!==void 0||r[u]!==void 0)&&(s[h]=Fi(l,a,h,void 0,t,!0)):delete s[h]);if(i!==a)for(const h in i)(!e||!fe(e,h))&&(delete i[h],c=!0)}c&&zt(t.attrs,"set","")}function zc(t,e,r,n){const[s,i]=t.propsOptions;let o=!1,a;if(e)for(let l in e){if(kn(l))continue;const c=e[l];let u;s&&fe(s,u=et(l))?!i||!i.includes(u)?r[u]=c:(a||(a={}))[u]=c:Qs(t.emitsOptions,l)||(!(l in n)||c!==n[l])&&(n[l]=c,o=!0)}if(i){const l=le(r),c=a||_e;for(let u=0;u<i.length;u++){const h=i[u];r[h]=Fi(s,l,h,c[h],t,!fe(c,h))}}return o}function Fi(t,e,r,n,s,i){const o=t[r];if(o!=null){const a=fe(o,"default");if(a&&n===void 0){const l=o.default;if(o.type!==Function&&!o.skipFactory&&ee(l)){const{propsDefaults:c}=s;if(r in c)n=c[r];else{const u=Qn(s);n=c[r]=l.call(null,e),u()}}else n=l;s.ce&&s.ce._setProp(r,n)}o[0]&&(i&&!a?n=!1:o[1]&&(n===""||n===fr(r))&&(n=!0))}return n}const qd=new WeakMap;function Wc(t,e,r=!1){const n=r?qd:e.propsCache,s=n.get(t);if(s)return s;const i=t.props,o={},a=[];let l=!1;if(!ee(t)){const u=h=>{l=!0;const[d,f]=Wc(h,e,!0);Ue(o,d),f&&a.push(...f)};!r&&e.mixins.length&&e.mixins.forEach(u),t.extends&&u(t.extends),t.mixins&&t.mixins.forEach(u)}if(!i&&!l)return pe(t)&&n.set(t,Kr),Kr;if(F(i))for(let u=0;u<i.length;u++){const h=et(i[u]);da(h)&&(o[h]=_e)}else if(i)for(const u in i){const h=et(u);if(da(h)){const d=i[u],f=o[h]=F(d)||ee(d)?{type:d}:Ue({},d),p=f.type;let y=!1,w=!0;if(F(p))for(let k=0;k<p.length;++k){const _=p[k],b=ee(_)&&_.name;if(b==="Boolean"){y=!0;break}else b==="String"&&(w=!1)}else y=ee(p)&&p.name==="Boolean";f[0]=y,f[1]=w,(y||fe(f,"default"))&&a.push(h)}}const c=[o,a];return pe(t)&&n.set(t,c),c}function da(t){return t[0]!=="$"&&!kn(t)}const Ro=t=>t==="_"||t==="_ctx"||t==="$stable",Co=t=>F(t)?t.map(It):[It(t)],Fd=(t,e,r)=>{if(e._n)return e;const n=Yr((...s)=>Co(e(...s)),r);return n._c=!1,n},Kc=(t,e,r)=>{const n=t._ctx;for(const s in t){if(Ro(s))continue;const i=t[s];if(ee(i))e[s]=Fd(s,i,n);else if(i!=null){const o=Co(i);e[s]=()=>o}}},Gc=(t,e)=>{const r=Co(e);t.slots.default=()=>r},Jc=(t,e,r)=>{for(const n in e)(r||!Ro(n))&&(t[n]=e[n])},Vd=(t,e,r)=>{const n=t.slots=Fc();if(t.vnode.shapeFlag&32){const s=e._;s?(Jc(n,e,r),r&&Kl(n,"_",s,!0)):Kc(e,n)}else e&&Gc(t,e)},zd=(t,e,r)=>{const{vnode:n,slots:s}=t;let i=!0,o=_e;if(n.shapeFlag&32){const a=e._;a?r&&a===1?i=!1:Jc(s,e,r):(i=!e.$stable,Kc(e,s)),o=e}else e&&(Gc(t,e),o={default:1});if(i)for(const a in s)!Ro(a)&&o[a]==null&&delete s[a]},rt=Yd;function Wd(t){return Kd(t)}function Kd(t,e){const r=zs();r.__VUE__=!0;const{insert:n,remove:s,patchProp:i,createElement:o,createText:a,createComment:l,setText:c,setElementText:u,parentNode:h,nextSibling:d,setScopeId:f=Nt,insertStaticContent:p}=t,y=(g,m,v,S=null,A=null,E=null,j=void 0,I=null,P=!!m.dynamicChildren)=>{if(g===m)return;g&&!Er(g,m)&&(S=T(g),ae(g,A,E,!0),g=null),m.patchFlag===-2&&(P=!1,m.dynamicChildren=null);const{type:R,ref:G,shapeFlag:B}=m;switch(R){case ei:w(g,m,v,S);break;case Ze:k(g,m,v,S);break;case bi:g==null&&_(m,v,S,j);break;case Fe:O(g,m,v,S,A,E,j,I,P);break;default:B&1?D(g,m,v,S,A,E,j,I,P):B&6?Y(g,m,v,S,A,E,j,I,P):(B&64||B&128)&&R.process(g,m,v,S,A,E,j,I,P,W)}G!=null&&A?Tn(G,g&&g.ref,E,m||g,!m):G==null&&g&&g.ref!=null&&Tn(g.ref,null,E,g,!0)},w=(g,m,v,S)=>{if(g==null)n(m.el=a(m.children),v,S);else{const A=m.el=g.el;m.children!==g.children&&c(A,m.children)}},k=(g,m,v,S)=>{g==null?n(m.el=l(m.children||""),v,S):m.el=g.el},_=(g,m,v,S)=>{[g.el,g.anchor]=p(g.children,m,v,S,g.el,g.anchor)},b=({el:g,anchor:m},v,S)=>{let A;for(;g&&g!==m;)A=d(g),n(g,v,S),g=A;n(m,v,S)},x=({el:g,anchor:m})=>{let v;for(;g&&g!==m;)v=d(g),s(g),g=v;s(m)},D=(g,m,v,S,A,E,j,I,P)=>{if(m.type==="svg"?j="svg":m.type==="math"&&(j="mathml"),g==null)M(m,v,S,A,E,j,I,P);else{const R=g.el&&g.el._isVueCE?g.el:null;try{R&&R._beginPatch(),C(g,m,A,E,j,I,P)}finally{R&&R._endPatch()}}},M=(g,m,v,S,A,E,j,I)=>{let P,R;const{props:G,shapeFlag:B,transition:K,dirs:X}=g;if(P=g.el=o(g.type,E,G&&G.is,G),B&8?u(P,g.children):B&16&&V(g.children,P,null,S,A,vi(g,E),j,I),X&&mr(g,null,S,"created"),U(P,g,g.scopeId,j,S),G){for(const ve in G)ve!=="value"&&!kn(ve)&&i(P,ve,null,G[ve],E,S);"value"in G&&i(P,"value",null,G.value,E),(R=G.onVnodeBeforeMount)&&Tt(R,S,g)}X&&mr(g,null,S,"beforeMount");const ce=Gd(A,K);ce&&K.beforeEnter(P),n(P,m,v),((R=G&&G.onVnodeMounted)||ce||X)&&rt(()=>{try{R&&Tt(R,S,g),ce&&K.enter(P),X&&mr(g,null,S,"mounted")}finally{}},A)},U=(g,m,v,S,A)=>{if(v&&f(g,v),S)for(let E=0;E<S.length;E++)f(g,S[E]);if(A){let E=A.subTree;if(m===E||Qc(E.type)&&(E.ssContent===m||E.ssFallback===m)){const j=A.vnode;U(g,j,j.scopeId,j.slotScopeIds,A.parent)}}},V=(g,m,v,S,A,E,j,I,P=0)=>{for(let R=P;R<g.length;R++){const G=g[R]=I?Vt(g[R]):It(g[R]);y(null,G,m,v,S,A,E,j,I)}},C=(g,m,v,S,A,E,j)=>{const I=m.el=g.el;let{patchFlag:P,dynamicChildren:R,dirs:G}=m;P|=g.patchFlag&16;const B=g.props||_e,K=m.props||_e;let X;if(v&&yr(v,!1),(X=K.onVnodeBeforeUpdate)&&Tt(X,v,m,g),G&&mr(m,g,v,"beforeUpdate"),v&&yr(v,!0),(B.innerHTML&&K.innerHTML==null||B.textContent&&K.textContent==null)&&u(I,""),R?z(g.dynamicChildren,R,I,v,S,vi(m,A),E):j||L(g,m,I,null,v,S,vi(m,A),E,!1),P>0){if(P&16)Q(I,B,K,v,A);else if(P&2&&B.class!==K.class&&i(I,"class",null,K.class,A),P&4&&i(I,"style",B.style,K.style,A),P&8){const ce=m.dynamicProps;for(let ve=0;ve<ce.length;ve++){const we=ce[ve],Pe=B[we],Me=K[we];(Me!==Pe||we==="value")&&i(I,we,Pe,Me,A,v)}}P&1&&g.children!==m.children&&u(I,m.children)}else!j&&R==null&&Q(I,B,K,v,A);((X=K.onVnodeUpdated)||G)&&rt(()=>{X&&Tt(X,v,m,g),G&&mr(m,g,v,"updated")},S)},z=(g,m,v,S,A,E,j)=>{for(let I=0;I<m.length;I++){const P=g[I],R=m[I],G=P.el&&(P.type===Fe||!Er(P,R)||P.shapeFlag&198)?h(P.el):v;y(P,R,G,null,S,A,E,j,!0)}},Q=(g,m,v,S,A)=>{if(m!==v){if(m!==_e)for(const E in m)!kn(E)&&!(E in v)&&i(g,E,m[E],null,A,S);for(const E in v){if(kn(E))continue;const j=v[E],I=m[E];j!==I&&E!=="value"&&i(g,E,I,j,A,S)}"value"in v&&i(g,"value",m.value,v.value,A)}},O=(g,m,v,S,A,E,j,I,P)=>{const R=m.el=g?g.el:a(""),G=m.anchor=g?g.anchor:a("");let{patchFlag:B,dynamicChildren:K,slotScopeIds:X}=m;X&&(I=I?I.concat(X):X),g==null?(n(R,v,S),n(G,v,S),V(m.children||[],v,G,A,E,j,I,P)):B>0&&B&64&&K&&g.dynamicChildren&&g.dynamicChildren.length===K.length?(z(g.dynamicChildren,K,v,A,E,j,I),(m.key!=null||A&&m===A.subTree)&&Yc(g,m,!0)):L(g,m,v,G,A,E,j,I,P)},Y=(g,m,v,S,A,E,j,I,P)=>{m.slotScopeIds=I,g==null?m.shapeFlag&512?A.ctx.activate(m,v,S,j,P):Ee(m,v,S,A,E,j,P):je(g,m,P)},Ee=(g,m,v,S,A,E,j)=>{const I=g.component=nf(g,S,A);if(Ys(g)&&(I.ctx.renderer=W),sf(I,!1,j),I.asyncDep){if(A&&A.registerDep(I,me,j),!g.el){const P=I.subTree=he(Ze);k(null,P,m,v),g.placeholder=P.el}}else me(I,g,m,v,A,E,j)},je=(g,m,v)=>{const S=m.component=g.component;if(Ud(g,m,v))if(S.asyncDep&&!S.asyncResolved){te(S,m,v);return}else S.next=m,S.update();else m.el=g.el,S.vnode=m},me=(g,m,v,S,A,E,j)=>{const I=()=>{if(g.isMounted){let{next:B,bu:K,u:X,parent:ce,vnode:ve}=g;{const St=Xc(g);if(St){B&&(B.el=ve.el,te(g,B,j)),St.asyncDep.then(()=>{rt(()=>{g.isUnmounted||R()},A)});return}}let we=B,Pe;yr(g,!1),B?(B.el=ve.el,te(g,B,j)):B=ve,K&&ms(K),(Pe=B.props&&B.props.onVnodeBeforeUpdate)&&Tt(Pe,ce,B,ve),yr(g,!0);const Me=ua(g),kt=g.subTree;g.subTree=Me,y(kt,Me,h(kt.el),T(kt),g,A,E),B.el=Me.el,we===null&&Bd(g,Me.el),X&&rt(X,A),(Pe=B.props&&B.props.onVnodeUpdated)&&rt(()=>Tt(Pe,ce,B,ve),A)}else{let B;const{el:K,props:X}=m,{bm:ce,m:ve,parent:we,root:Pe,type:Me}=g,kt=An(m);yr(g,!1),ce&&ms(ce),!kt&&(B=X&&X.onVnodeBeforeMount)&&Tt(B,we,m),yr(g,!0);{Pe.ce&&Pe.ce._hasShadowRoot()&&Pe.ce._injectChildStyle(Me,g.parent?g.parent.type:void 0);const St=g.subTree=ua(g);y(null,St,v,S,g,A,E),m.el=St.el}if(ve&&rt(ve,A),!kt&&(B=X&&X.onVnodeMounted)){const St=m;rt(()=>Tt(B,we,St),A)}(m.shapeFlag&256||we&&An(we.vnode)&&we.vnode.shapeFlag&256)&&g.a&&rt(g.a,A),g.isMounted=!0,m=v=S=null}};g.scope.on();const P=g.effect=new ec(I);g.scope.off();const R=g.update=P.run.bind(P),G=g.job=P.runIfDirty.bind(P);G.i=g,G.id=g.uid,P.scheduler=()=>Ao(G),yr(g,!0),R()},te=(g,m,v)=>{m.component=g;const S=g.vnode.props;g.vnode=m,g.next=null,Hd(g,m.props,S,v),zd(g,m.children,v),Zt(),ea(g),Qt()},L=(g,m,v,S,A,E,j,I,P=!1)=>{const R=g&&g.children,G=g?g.shapeFlag:0,B=m.children,{patchFlag:K,shapeFlag:X}=m;if(K>0){if(K&128){We(R,B,v,S,A,E,j,I,P);return}else if(K&256){se(R,B,v,S,A,E,j,I,P);return}}X&8?(G&16&&ut(R,A,E),B!==R&&u(v,B)):G&16?X&16?We(R,B,v,S,A,E,j,I,P):ut(R,A,E,!0):(G&8&&u(v,""),X&16&&V(B,v,S,A,E,j,I,P))},se=(g,m,v,S,A,E,j,I,P)=>{g=g||Kr,m=m||Kr;const R=g.length,G=m.length,B=Math.min(R,G);let K;for(K=0;K<B;K++){const X=m[K]=P?Vt(m[K]):It(m[K]);y(g[K],X,v,null,A,E,j,I,P)}R>G?ut(g,A,E,!0,!1,B):V(m,v,S,A,E,j,I,P,B)},We=(g,m,v,S,A,E,j,I,P)=>{let R=0;const G=m.length;let B=g.length-1,K=G-1;for(;R<=B&&R<=K;){const X=g[R],ce=m[R]=P?Vt(m[R]):It(m[R]);if(Er(X,ce))y(X,ce,v,null,A,E,j,I,P);else break;R++}for(;R<=B&&R<=K;){const X=g[B],ce=m[K]=P?Vt(m[K]):It(m[K]);if(Er(X,ce))y(X,ce,v,null,A,E,j,I,P);else break;B--,K--}if(R>B){if(R<=K){const X=K+1,ce=X<G?m[X].el:S;for(;R<=K;)y(null,m[R]=P?Vt(m[R]):It(m[R]),v,ce,A,E,j,I,P),R++}}else if(R>K)for(;R<=B;)ae(g[R],A,E,!0),R++;else{const X=R,ce=R,ve=new Map;for(R=ce;R<=K;R++){const st=m[R]=P?Vt(m[R]):It(m[R]);st.key!=null&&ve.set(st.key,R)}let we,Pe=0;const Me=K-ce+1;let kt=!1,St=0;const cn=new Array(Me);for(R=0;R<Me;R++)cn[R]=0;for(R=X;R<=B;R++){const st=g[R];if(Pe>=Me){ae(st,A,E,!0);continue}let Et;if(st.key!=null)Et=ve.get(st.key);else for(we=ce;we<=K;we++)if(cn[we-ce]===0&&Er(st,m[we])){Et=we;break}Et===void 0?ae(st,A,E,!0):(cn[Et-ce]=R+1,Et>=St?St=Et:kt=!0,y(st,m[Et],v,null,A,E,j,I,P),Pe++)}const Wo=kt?Jd(cn):Kr;for(we=Wo.length-1,R=Me-1;R>=0;R--){const st=ce+R,Et=m[st],Ko=m[st+1],Go=st+1<G?Ko.el||Zc(Ko):S;cn[R]===0?y(null,Et,v,Go,A,E,j,I,P):kt&&(we<0||R!==Wo[we]?ie(Et,v,Go,2):we--)}}},ie=(g,m,v,S,A=null)=>{const{el:E,type:j,transition:I,children:P,shapeFlag:R}=g;if(R&6){ie(g.component.subTree,m,v,S);return}if(R&128){g.suspense.move(m,v,S);return}if(R&64){j.move(g,m,v,W);return}if(j===Fe){n(E,m,v);for(let B=0;B<P.length;B++)ie(P[B],m,v,S);n(g.anchor,m,v);return}if(j===bi){b(g,m,v);return}if(S!==2&&R&1&&I)if(S===0)I.beforeEnter(E),n(E,m,v),rt(()=>I.enter(E),A);else{const{leave:B,delayLeave:K,afterLeave:X}=I,ce=()=>{g.ctx.isUnmounted?s(E):n(E,m,v)},ve=()=>{E._isLeaving&&E[Ct](!0),B(E,()=>{ce(),X&&X()})};K?K(E,ce,ve):ve()}else n(E,m,v)},ae=(g,m,v,S=!1,A=!1)=>{const{type:E,props:j,ref:I,children:P,dynamicChildren:R,shapeFlag:G,patchFlag:B,dirs:K,cacheIndex:X,memo:ce}=g;if(B===-2&&(A=!1),I!=null&&(Zt(),Tn(I,null,v,g,!0),Qt()),X!=null&&(m.renderCache[X]=void 0),G&256){m.ctx.deactivate(g);return}const ve=G&1&&K,we=!An(g);let Pe;if(we&&(Pe=j&&j.onVnodeBeforeUnmount)&&Tt(Pe,m,g),G&6)gr(g.component,v,S);else{if(G&128){g.suspense.unmount(v,S);return}ve&&mr(g,null,m,"beforeUnmount"),G&64?g.type.remove(g,m,v,W,S):R&&!R.hasOnce&&(E!==Fe||B>0&&B&64)?ut(R,m,v,!1,!0):(E===Fe&&B&384||!A&&G&16)&&ut(P,m,v),S&&Lt(g)}const Me=ce!=null&&X==null;(we&&(Pe=j&&j.onVnodeUnmounted)||ve||Me)&&rt(()=>{Pe&&Tt(Pe,m,g),ve&&mr(g,null,m,"unmounted"),Me&&(g.el=null)},v)},Lt=g=>{const{type:m,el:v,anchor:S,transition:A}=g;if(m===Fe){Pr(v,S);return}if(m===bi){x(g);return}const E=()=>{s(v),A&&!A.persisted&&A.afterLeave&&A.afterLeave()};if(g.shapeFlag&1&&A&&!A.persisted){const{leave:j,delayLeave:I}=A,P=()=>j(v,E);I?I(g.el,E,P):P()}else E()},Pr=(g,m)=>{let v;for(;g!==m;)v=d(g),s(g),g=v;s(m)},gr=(g,m,v)=>{const{bum:S,scope:A,job:E,subTree:j,um:I,m:P,a:R}=g;fa(P),fa(R),S&&ms(S),A.stop(),E&&(E.flags|=8,ae(j,g,m,v)),I&&rt(I,m),rt(()=>{g.isUnmounted=!0},m)},ut=(g,m,v,S=!1,A=!1,E=0)=>{for(let j=E;j<g.length;j++)ae(g[j],m,v,S,A)},T=g=>{if(g.shapeFlag&6)return T(g.component.subTree);if(g.shapeFlag&128)return g.suspense.next();const m=d(g.anchor||g.el),v=m&&m[hd];return v?d(v):m};let H=!1;const N=(g,m,v)=>{let S;g==null?m._vnode&&(ae(m._vnode,null,null,!0),S=m._vnode.component):y(m._vnode||null,g,m,null,null,null,v),m._vnode=g,H||(H=!0,ea(S),bc(),H=!1)},W={p:y,um:ae,m:ie,r:Lt,mt:Ee,mc:V,pc:L,pbc:z,n:T,o:t};return{render:N,hydrate:void 0,createApp:Id(N)}}function vi({type:t,props:e},r){return r==="svg"&&t==="foreignObject"||r==="mathml"&&t==="annotation-xml"&&e&&e.encoding&&e.encoding.includes("html")?void 0:r}function yr({effect:t,job:e},r){r?(t.flags|=32,e.flags|=4):(t.flags&=-33,e.flags&=-5)}function Gd(t,e){return(!t||t&&!t.pendingBranch)&&e&&!e.persisted}function Yc(t,e,r=!1){const n=t.children,s=e.children;if(F(n)&&F(s))for(let i=0;i<n.length;i++){const o=n[i];let a=s[i];a.shapeFlag&1&&!a.dynamicChildren&&((a.patchFlag<=0||a.patchFlag===32)&&(a=s[i]=Vt(s[i]),a.el=o.el),!r&&a.patchFlag!==-2&&Yc(o,a)),a.type===ei&&(a.patchFlag===-1&&(a=s[i]=Vt(a)),a.el=o.el),a.type===Ze&&!a.el&&(a.el=o.el)}}function Jd(t){const e=t.slice(),r=[0];let n,s,i,o,a;const l=t.length;for(n=0;n<l;n++){const c=t[n];if(c!==0){if(s=r[r.length-1],t[s]<c){e[n]=s,r.push(n);continue}for(i=0,o=r.length-1;i<o;)a=i+o>>1,t[r[a]]<c?i=a+1:o=a;c<t[r[i]]&&(i>0&&(e[n]=r[i-1]),r[i]=n)}}for(i=r.length,o=r[i-1];i-- >0;)r[i]=o,o=e[o];return r}function Xc(t){const e=t.subTree.component;if(e)return e.asyncDep&&!e.asyncResolved?e:Xc(e)}function fa(t){if(t)for(let e=0;e<t.length;e++)t[e].flags|=8}function Zc(t){if(t.placeholder)return t.placeholder;const e=t.component;return e?Zc(e.subTree):null}const Qc=t=>t.__isSuspense;function Yd(t,e){e&&e.pendingBranch?F(t)?e.effects.push(...t):e.effects.push(t):id(t)}const Fe=Symbol.for("v-fgt"),ei=Symbol.for("v-txt"),Ze=Symbol.for("v-cmt"),bi=Symbol.for("v-stc"),Rn=[];let lt=null;function Z(t=!1){Rn.push(lt=t?null:[])}function Xd(){Rn.pop(),lt=Rn[Rn.length-1]||null}let Bn=1;function xs(t,e=!1){Bn+=t,t<0&<&&e&&(lt.hasOnce=!0)}function eu(t){return t.dynamicChildren=Bn>0?lt||Kr:null,Xd(),Bn>0&<&<.push(t),t}function ue(t,e,r,n,s,i){return eu(ne(t,e,r,n,s,i,!0))}function nt(t,e,r,n,s){return eu(he(t,e,r,n,s,!0))}function Rs(t){return t?t.__v_isVNode===!0:!1}function Er(t,e){return t.type===e.type&&t.key===e.key}const tu=({key:t})=>t??null,vs=({ref:t,ref_key:e,ref_for:r})=>(typeof t=="number"&&(t=""+t),t!=null?Te(t)||Ce(t)||ee(t)?{i:at,r:t,k:e,f:!!r}:t:null);function ne(t,e=null,r=null,n=0,s=null,i=t===Fe?0:1,o=!1,a=!1){const l={__v_isVNode:!0,__v_skip:!0,type:t,props:e,key:e&&tu(e),ref:e&&vs(e),scopeId:wc,slotScopeIds:null,children:r,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:i,patchFlag:n,dynamicProps:s,dynamicChildren:null,appContext:null,ctx:at};return a?(Oo(l,r),i&128&&t.normalize(l)):r&&(l.shapeFlag|=Te(r)?8:16),Bn>0&&!o&<&&(l.patchFlag>0||i&6)&&l.patchFlag!==32&<.push(l),l}const he=Zd;function Zd(t,e=null,r=null,n=0,s=null,i=!1){if((!t||t===Nc)&&(t=Ze),Rs(t)){const a=dr(t,e,!0);return r&&Oo(a,r),Bn>0&&!i&<&&(a.shapeFlag&6?lt[lt.indexOf(t)]=a:lt.push(a)),a.patchFlag=-2,a}if(uf(t)&&(t=t.__vccOpts),e){e=Qd(e);let{class:a,style:l}=e;a&&!Te(a)&&(e.class=Ye(a)),pe(l)&&(Gs(l)&&!F(l)&&(l=Ue({},l)),e.style=Ws(l))}const o=Te(t)?1:Qc(t)?128:Ec(t)?64:pe(t)?4:ee(t)?2:0;return ne(t,e,r,n,s,o,i,!0)}function Qd(t){return t?Gs(t)||Vc(t)?Ue({},t):t:null}function dr(t,e,r=!1,n=!1){const{props:s,ref:i,patchFlag:o,children:a,transition:l}=t,c=e?ef(s||{},e):s,u={__v_isVNode:!0,__v_skip:!0,type:t.type,props:c,key:c&&tu(c),ref:e&&e.ref?r&&i?F(i)?i.concat(vs(e)):[i,vs(e)]:vs(e):i,scopeId:t.scopeId,slotScopeIds:t.slotScopeIds,children:a,target:t.target,targetStart:t.targetStart,targetAnchor:t.targetAnchor,staticCount:t.staticCount,shapeFlag:t.shapeFlag,patchFlag:e&&t.type!==Fe?o===-1?16:o|16:o,dynamicProps:t.dynamicProps,dynamicChildren:t.dynamicChildren,appContext:t.appContext,dirs:t.dirs,transition:l,component:t.component,suspense:t.suspense,ssContent:t.ssContent&&dr(t.ssContent),ssFallback:t.ssFallback&&dr(t.ssFallback),placeholder:t.placeholder,el:t.el,anchor:t.anchor,ctx:t.ctx,ce:t.ce};return l&&n&&Un(u,l.clone(u)),u}function ru(t=" ",e=0){return he(ei,null,t,e)}function De(t="",e=!1){return e?(Z(),nt(Ze,null,t)):he(Ze,null,t)}function It(t){return t==null||typeof t=="boolean"?he(Ze):F(t)?he(Fe,null,t.slice()):Rs(t)?Vt(t):he(ei,null,String(t))}function Vt(t){return t.el===null&&t.patchFlag!==-1||t.memo?t:dr(t)}function Oo(t,e){let r=0;const{shapeFlag:n}=t;if(e==null)e=null;else if(F(e))r=16;else if(typeof e=="object")if(n&65){const s=e.default;s&&(s._c&&(s._d=!1),Oo(t,s()),s._c&&(s._d=!0));return}else{r=32;const s=e._;!s&&!Vc(e)?e._ctx=at:s===3&&at&&(at.slots._===1?e._=1:(e._=2,t.patchFlag|=1024))}else ee(e)?(e={default:e,_ctx:at},r=32):(e=String(e),n&64?(r=16,e=[ru(e)]):r=8);t.children=e,t.shapeFlag|=r}function ef(...t){const e={};for(let r=0;r<t.length;r++){const n=t[r];for(const s in n)if(s==="class")e.class!==n.class&&(e.class=Ye([e.class,n.class]));else if(s==="style")e.style=Ws([e.style,n.style]);else if(Bs(s)){const i=e[s],o=n[s];o&&i!==o&&!(F(i)&&i.includes(o))?e[s]=i?[].concat(i,o):o:o==null&&i==null&&!Ms(s)&&(e[s]=o)}else s!==""&&(e[s]=n[s])}return e}function Tt(t,e,r,n=null){_t(t,e,7,[r,n])}const tf=Bc();let rf=0;function nf(t,e,r){const n=t.type,s=(e?e.appContext:t.appContext)||tf,i={uid:rf++,vnode:t,type:n,parent:e,appContext:s,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new Xl(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:e?e.provides:Object.create(s.provides),ids:e?e.ids:["",0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:Wc(n,s),emitsOptions:Mc(n,s),emit:null,emitted:null,propsDefaults:_e,inheritAttrs:n.inheritAttrs,ctx:_e,data:_e,props:_e,attrs:_e,slots:_e,refs:_e,setupState:_e,setupContext:null,suspense:r,suspenseId:r?r.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return i.ctx={_:i},i.root=e?e.root:i,i.emit=jd.bind(null,i),t.ce&&t.ce(i),i}let ze=null;const Po=()=>ze||at;let Cs,Vi;{const t=zs(),e=(r,n)=>{let s;return(s=t[r])||(s=t[r]=[]),s.push(n),i=>{s.length>1?s.forEach(o=>o(i)):s[0](i)}};Cs=e("__VUE_INSTANCE_SETTERS__",r=>ze=r),Vi=e("__VUE_SSR_SETTERS__",r=>Mn=r)}const Qn=t=>{const e=ze;return Cs(t),t.scope.on(),()=>{t.scope.off(),Cs(e)}},pa=()=>{ze&&ze.scope.off(),Cs(null)};function nu(t){return t.vnode.shapeFlag&4}let Mn=!1;function sf(t,e=!1,r=!1){e&&Vi(e);const{props:n,children:s}=t.vnode,i=nu(t);Md(t,n,i,e),Vd(t,s,r||e);const o=i?of(t,e):void 0;return e&&Vi(!1),o}function of(t,e){const r=t.type;t.accessCache=Object.create(null),t.proxy=new Proxy(t.ctx,Td);const{setup:n}=r;if(n){Zt();const s=t.setupContext=n.length>1?lf(t):null,i=Qn(t),o=Zn(n,t,0,[t.props,s]),a=Vl(o);if(Qt(),i(),(a||t.sp)&&!An(t)&&Oc(t),a){if(o.then(pa,pa),e)return o.then(l=>{ga(t,l)}).catch(l=>{Js(l,t,0)});t.asyncDep=o}else ga(t,o)}else su(t)}function ga(t,e,r){ee(e)?t.type.__ssrInlineRender?t.ssrRender=e:t.render=e:pe(e)&&(t.setupState=mc(e)),su(t)}function su(t,e,r){const n=t.type;t.render||(t.render=n.render||Nt);{const s=Qn(t);Zt();try{Ad(t)}finally{Qt(),s()}}}const af={get(t,e){return Ve(t,"get",""),t[e]}};function lf(t){const e=r=>{t.exposed=r||{}};return{attrs:new Proxy(t.attrs,af),slots:t.slots,emit:t.emit,expose:e}}function ti(t){return t.exposed?t.exposeProxy||(t.exposeProxy=new Proxy(mc(To(t.exposed)),{get(e,r){if(r in e)return e[r];if(r in xn)return xn[r](t)},has(e,r){return r in e||r in xn}})):t.proxy}function cf(t,e=!0){return ee(t)?t.displayName||t.name:t.name||e&&t.__name}function uf(t){return ee(t)&&"__vccOpts"in t}const $e=(t,e)=>ed(t,e,Mn);function Qr(t,e,r){try{xs(-1);const n=arguments.length;return n===2?pe(e)&&!F(e)?Rs(e)?he(t,null,[e]):he(t,e):he(t,null,e):(n>3?r=Array.prototype.slice.call(arguments,2):n===3&&Rs(r)&&(r=[r]),he(t,e,r))}finally{xs(1)}}const hf="3.5.34";/**
|
|
14
|
+
**/function Zn(t,e,r,n){try{return n?t(...n):t()}catch(s){Js(s,e,r)}}function _t(t,e,r,n){if(ee(t)){const s=Zn(t,e,r,n);return s&&Vl(s)&&s.catch(i=>{Js(i,e,r)}),s}if(F(t)){const s=[];for(let i=0;i<t.length;i++)s.push(_t(t[i],e,r,n));return s}}function Js(t,e,r,n=!0){const s=e?e.vnode:null,{errorHandler:i,throwUnhandledErrorInProduction:o}=e&&e.appContext.config||_e;if(e){let a=e.parent;const l=e.proxy,c=`https://vuejs.org/error-reference/#runtime-${r}`;for(;a;){const u=a.ec;if(u){for(let h=0;h<u.length;h++)if(u[h](t,l,c)===!1)return}a=a.parent}if(i){Zt(),Zn(i,null,10,[t,l,c]),Qt();return}}nd(t,r,s,n,o)}function nd(t,e,r,n=!0,s=!1){if(s)throw t;console.error(t)}const Xe=[];let Rt=-1;const Jr=[];let or=null,Br=0;const yc=Promise.resolve();let Ss=null;function hr(t){const e=Ss||yc;return t?e.then(this?t.bind(this):t):e}function sd(t){let e=Rt+1,r=Xe.length;for(;e<r;){const n=e+r>>>1,s=Xe[n],i=Dn(s);i<t||i===t&&s.flags&2?e=n+1:r=n}return e}function Ao(t){if(!(t.flags&1)){const e=Dn(t),r=Xe[Xe.length-1];!r||!(t.flags&2)&&e>=Dn(r)?Xe.push(t):Xe.splice(sd(e),0,t),t.flags|=1,vc()}}function vc(){Ss||(Ss=yc.then(_c))}function id(t){F(t)?Jr.push(...t):or&&t.id===-1?or.splice(Br+1,0,t):t.flags&1||(Jr.push(t),t.flags|=1),vc()}function ea(t,e,r=Rt+1){for(;r<Xe.length;r++){const n=Xe[r];if(n&&n.flags&2){if(t&&n.id!==t.uid)continue;Xe.splice(r,1),r--,n.flags&4&&(n.flags&=-2),n(),n.flags&4||(n.flags&=-2)}}}function bc(t){if(Jr.length){const e=[...new Set(Jr)].sort((r,n)=>Dn(r)-Dn(n));if(Jr.length=0,or){or.push(...e);return}for(or=e,Br=0;Br<or.length;Br++){const r=or[Br];r.flags&4&&(r.flags&=-2),r.flags&8||r(),r.flags&=-2}or=null,Br=0}}const Dn=t=>t.id==null?t.flags&2?-1:1/0:t.id;function _c(t){try{for(Rt=0;Rt<Xe.length;Rt++){const e=Xe[Rt];e&&!(e.flags&8)&&(e.flags&4&&(e.flags&=-2),Zn(e,e.i,e.i?15:14),e.flags&4||(e.flags&=-2))}}finally{for(;Rt<Xe.length;Rt++){const e=Xe[Rt];e&&(e.flags&=-2)}Rt=-1,Xe.length=0,bc(),Ss=null,(Xe.length||Jr.length)&&_c()}}let at=null,wc=null;function Es(t){const e=at;return at=t,wc=t&&t.type.__scopeId||null,e}function Yr(t,e=at,r){if(!e||t._n)return t;const n=(...s)=>{n._d&&xs(-1);const i=Es(e);let o;try{o=t(...s)}finally{Es(i),n._d&&xs(1)}return o};return n._n=!0,n._c=!0,n._d=!0,n}function od(t,e){if(at===null)return t;const r=ti(at),n=t.dirs||(t.dirs=[]);for(let s=0;s<e.length;s++){let[i,o,a,l=_e]=e[s];i&&(ee(i)&&(i={mounted:i,updated:i}),i.deep&&Wt(o),n.push({dir:i,instance:r,value:o,oldValue:void 0,arg:a,modifiers:l}))}return t}function mr(t,e,r,n){const s=t.dirs,i=e&&e.dirs;for(let o=0;o<s.length;o++){const a=s[o];i&&(a.oldValue=i[o].value);let l=a.dir[n];l&&(Zt(),_t(l,r,8,[t.el,a,t,e]),Qt())}}function ys(t,e){if(ze){let r=ze.provides;const n=ze.parent&&ze.parent.provides;n===r&&(r=ze.provides=Object.create(n)),r[t]=e}}function ft(t,e,r=!1){const n=Po();if(n||Rr){let s=Rr?Rr._context.provides:n?n.parent==null||n.ce?n.vnode.appContext&&n.vnode.appContext.provides:n.parent.provides:void 0;if(s&&t in s)return s[t];if(arguments.length>1)return r&&ee(e)?e.call(n&&n.proxy):e}}function ad(){return!!(Po()||Rr)}const ld=Symbol.for("v-scx"),cd=()=>ft(ld);function Kt(t,e,r){return kc(t,e,r)}function kc(t,e,r=_e){const{immediate:n,deep:s,flush:i,once:o}=r,a=Ue({},r),l=e&&n||!e&&i!=="post";let c;if(Mn){if(i==="sync"){const f=cd();c=f.__watcherHandles||(f.__watcherHandles=[])}else if(!l){const f=()=>{};return f.stop=Nt,f.resume=Nt,f.pause=Nt,f}}const u=ze;a.call=(f,p,y)=>_t(f,u,p,y);let h=!1;i==="post"?a.scheduler=f=>{rt(f,u&&u.suspense)}:i!=="sync"&&(h=!0,a.scheduler=(f,p)=>{p?f():Ao(f)}),a.augmentJob=f=>{e&&(f.flags|=4),h&&(f.flags|=2,u&&(f.id=u.uid,f.i=u))};const d=rd(t,e,a);return Mn&&(c?c.push(d):l&&d()),d}function ud(t,e,r){const n=this.proxy,s=Te(t)?t.includes(".")?Sc(n,t):()=>n[t]:t.bind(n,n);let i;ee(e)?i=e:(i=e.handler,r=e);const o=Qn(this),a=kc(s,i.bind(n),r);return o(),a}function Sc(t,e){const r=e.split(".");return()=>{let n=t;for(let s=0;s<r.length&&n;s++)n=n[r[s]];return n}}const hd=Symbol("_vte"),Ec=t=>t.__isTeleport,Ct=Symbol("_leaveCb"),hn=Symbol("_enterCb");function dd(){const t={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return xo(()=>{t.isMounted=!0}),Ic(()=>{t.isUnmounting=!0}),t}const ht=[Function,Array],Tc={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:ht,onEnter:ht,onAfterEnter:ht,onEnterCancelled:ht,onBeforeLeave:ht,onLeave:ht,onAfterLeave:ht,onLeaveCancelled:ht,onBeforeAppear:ht,onAppear:ht,onAfterAppear:ht,onAppearCancelled:ht},Ac=t=>{const e=t.subTree;return e.component?Ac(e.component):e},fd={name:"BaseTransition",props:Tc,setup(t,{slots:e}){const r=Po(),n=dd();return()=>{const s=e.default&&Cc(e.default(),!0),i=s&&s.length?xc(s):r.subTree?$e():void 0;if(!i)return;const o=le(t),{mode:a}=o;if(n.isLeaving)return mi(i);const l=ta(i);if(!l)return mi(i);let c=Bi(l,o,n,r,h=>c=h);l.type!==Ze&&Un(l,c);let u=r.subTree&&ta(r.subTree);if(u&&u.type!==Ze&&!Er(u,l)&&Ac(r).type!==Ze){let h=Bi(u,o,n,r);if(Un(u,h),a==="out-in"&&l.type!==Ze)return n.isLeaving=!0,h.afterLeave=()=>{n.isLeaving=!1,r.job.flags&8||r.update(),delete h.afterLeave,u=void 0},mi(i);a==="in-out"&&l.type!==Ze?h.delayLeave=(d,f,p)=>{const y=Rc(n,u);y[String(u.key)]=u,d[Ct]=()=>{f(),d[Ct]=void 0,delete c.delayedLeave,u=void 0},c.delayedLeave=()=>{p(),delete c.delayedLeave,u=void 0}}:u=void 0}else u&&(u=void 0);return i}}};function xc(t){let e=t[0];if(t.length>1){for(const r of t)if(r.type!==Ze){e=r;break}}return e}const pd=fd;function Rc(t,e){const{leavingVNodes:r}=t;let n=r.get(e.type);return n||(n=Object.create(null),r.set(e.type,n)),n}function Bi(t,e,r,n,s){const{appear:i,mode:o,persisted:a=!1,onBeforeEnter:l,onEnter:c,onAfterEnter:u,onEnterCancelled:h,onBeforeLeave:d,onLeave:f,onAfterLeave:p,onLeaveCancelled:y,onBeforeAppear:w,onAppear:k,onAfterAppear:_,onAppearCancelled:b}=e,x=String(t.key),D=Rc(r,t),M=(C,z)=>{C&&_t(C,n,9,z)},U=(C,z)=>{const Q=z[1];M(C,z),F(C)?C.every(O=>O.length<=1)&&Q():C.length<=1&&Q()},V={mode:o,persisted:a,beforeEnter(C){let z=l;if(!r.isMounted)if(i)z=w||l;else return;C[Ct]&&C[Ct](!0);const Q=D[x];Q&&Er(t,Q)&&Q.el[Ct]&&Q.el[Ct](),M(z,[C])},enter(C){if(D[x]===t)return;let z=c,Q=u,O=h;if(!r.isMounted)if(i)z=k||c,Q=_||u,O=b||h;else return;let Y=!1;C[hn]=Ne=>{Y||(Y=!0,Ne?M(O,[C]):M(Q,[C]),V.delayedLeave&&V.delayedLeave(),C[hn]=void 0)};const Ee=C[hn].bind(null,!1);z?U(z,[C,Ee]):Ee()},leave(C,z){const Q=String(t.key);if(C[hn]&&C[hn](!0),r.isUnmounting)return z();M(d,[C]);let O=!1;C[Ct]=Ee=>{O||(O=!0,z(),Ee?M(y,[C]):M(p,[C]),C[Ct]=void 0,D[Q]===t&&delete D[Q])};const Y=C[Ct].bind(null,!1);D[Q]=t,f?U(f,[C,Y]):Y()},clone(C){const z=Bi(C,e,r,n,s);return s&&s(z),z}};return V}function mi(t){if(Ys(t))return t=dr(t),t.children=null,t}function ta(t){if(!Ys(t))return Ec(t.type)&&t.children?xc(t.children):t;if(t.component)return t.component.subTree;const{shapeFlag:e,children:r}=t;if(r){if(e&16)return r[0];if(e&32&&ee(r.default))return r.default()}}function Un(t,e){t.shapeFlag&6&&t.component?(t.transition=e,Un(t.component.subTree,e)):t.shapeFlag&128?(t.ssContent.transition=e.clone(t.ssContent),t.ssFallback.transition=e.clone(t.ssFallback)):t.transition=e}function Cc(t,e=!1,r){let n=[],s=0;for(let i=0;i<t.length;i++){let o=t[i];const a=r==null?o.key:String(r)+String(o.key!=null?o.key:i);o.type===Fe?(o.patchFlag&128&&s++,n=n.concat(Cc(o.children,e,a))):(e||o.type!==Ze)&&n.push(a!=null?dr(o,{key:a}):o)}if(s>1)for(let i=0;i<n.length;i++)n[i].patchFlag=-2;return n}function pr(t,e){return ee(t)?Ue({name:t.name},e,{setup:t}):t}function Oc(t){t.ids=[t.ids[0]+t.ids[2]+++"-",0,0]}function ra(t,e){let r;return!!((r=Object.getOwnPropertyDescriptor(t,e))&&!r.configurable)}const Ts=new WeakMap;function Tn(t,e,r,n,s=!1){if(F(t)){t.forEach((y,w)=>Tn(y,e&&(F(e)?e[w]:e),r,n,s));return}if(An(n)&&!s){n.shapeFlag&512&&n.type.__asyncResolved&&n.component.subTree.component&&Tn(t,e,r,n.component.subTree);return}const i=n.shapeFlag&4?ti(n.component):n.el,o=s?null:i,{i:a,r:l}=t,c=e&&e.r,u=a.refs===_e?a.refs={}:a.refs,h=a.setupState,d=le(h),f=h===_e?Fl:y=>ra(u,y)?!1:fe(d,y),p=(y,w)=>!(w&&ra(u,w));if(c!=null&&c!==l){if(na(e),Te(c))u[c]=null,f(c)&&(h[c]=null);else if(Ce(c)){const y=e;p(c,y.k)&&(c.value=null),y.k&&(u[y.k]=null)}}if(ee(l))Zn(l,a,12,[o,u]);else{const y=Te(l),w=Ce(l);if(y||w){const k=()=>{if(t.f){const _=y?f(l)?h[l]:u[l]:p()||!t.k?l.value:u[t.k];if(s)F(_)&&yo(_,i);else if(F(_))_.includes(i)||_.push(i);else if(y)u[l]=[i],f(l)&&(h[l]=u[l]);else{const b=[i];p(l,t.k)&&(l.value=b),t.k&&(u[t.k]=b)}}else y?(u[l]=o,f(l)&&(h[l]=o)):w&&(p(l,t.k)&&(l.value=o),t.k&&(u[t.k]=o))};if(o){const _=()=>{k(),Ts.delete(t)};_.id=-1,Ts.set(t,_),rt(_,r)}else na(t),k()}}}function na(t){const e=Ts.get(t);e&&(e.flags|=8,Ts.delete(t))}zs().requestIdleCallback;zs().cancelIdleCallback;const An=t=>!!t.type.__asyncLoader,Ys=t=>t.type.__isKeepAlive;function gd(t,e){Pc(t,"a",e)}function md(t,e){Pc(t,"da",e)}function Pc(t,e,r=ze){const n=t.__wdc||(t.__wdc=()=>{let s=r;for(;s;){if(s.isDeactivated)return;s=s.parent}return t()});if(Xs(e,n,r),r){let s=r.parent;for(;s&&s.parent;)Ys(s.parent.vnode)&&yd(n,e,r,s),s=s.parent}}function yd(t,e,r,n){const s=Xs(e,t,n,!0);$c(()=>{yo(n[e],s)},r)}function Xs(t,e,r=ze,n=!1){if(r){const s=r[t]||(r[t]=[]),i=e.__weh||(e.__weh=(...o)=>{Zt();const a=Qn(r),l=_t(e,r,t,o);return a(),Qt(),l});return n?s.unshift(i):s.push(i),i}}const tr=t=>(e,r=ze)=>{(!Mn||t==="sp")&&Xs(t,(...n)=>e(...n),r)},vd=tr("bm"),xo=tr("m"),bd=tr("bu"),_d=tr("u"),Ic=tr("bum"),$c=tr("um"),wd=tr("sp"),kd=tr("rtg"),Sd=tr("rtc");function Ed(t,e=ze){Xs("ec",t,e)}const jc="components";function Zs(t,e){return Lc(jc,t,!0,e)||t}const Nc=Symbol.for("v-ndc");function sa(t){return Te(t)?Lc(jc,t,!1)||t:t||Nc}function Lc(t,e,r=!0,n=!1){const s=at||ze;if(s){const i=s.type;{const a=cf(i,!1);if(a&&(a===e||a===et(e)||a===Fs(et(e))))return i}const o=ia(s[t]||i[t],e)||ia(s.appContext[t],e);return!o&&n?i:o}}function ia(t,e){return t&&(t[e]||t[et(e)]||t[Fs(et(e))])}function zr(t,e,r,n){let s;const i=r,o=F(t);if(o||Te(t)){const a=o&&Yt(t);let l=!1,c=!1;a&&(l=!ct(t),c=er(t),t=Ks(t)),s=new Array(t.length);for(let u=0,h=t.length;u<h;u++)s[u]=e(l?c?Zr(bt(t[u])):bt(t[u]):t[u],u,void 0,i)}else if(typeof t=="number"){s=new Array(t);for(let a=0;a<t;a++)s[a]=e(a+1,a,void 0,i)}else if(ge(t))if(t[Symbol.iterator])s=Array.from(t,(a,l)=>e(a,l,void 0,i));else{const a=Object.keys(t);s=new Array(a.length);for(let l=0,c=a.length;l<c;l++){const u=a[l];s[l]=e(t[u],u,l,i)}}else s=[];return s}const Mi=t=>t?nu(t)?ti(t):Mi(t.parent):null,xn=Ue(Object.create(null),{$:t=>t,$el:t=>t.vnode.el,$data:t=>t.data,$props:t=>t.props,$attrs:t=>t.attrs,$slots:t=>t.slots,$refs:t=>t.refs,$parent:t=>Mi(t.parent),$root:t=>Mi(t.root),$host:t=>t.ce,$emit:t=>t.emit,$options:t=>Uc(t),$forceUpdate:t=>t.f||(t.f=()=>{Ao(t.update)}),$nextTick:t=>t.n||(t.n=hr.bind(t.proxy)),$watch:t=>ud.bind(t)}),yi=(t,e)=>t!==_e&&!t.__isScriptSetup&&fe(t,e),Td={get({_:t},e){if(e==="__v_skip")return!0;const{ctx:r,setupState:n,data:s,props:i,accessCache:o,type:a,appContext:l}=t;if(e[0]!=="$"){const d=o[e];if(d!==void 0)switch(d){case 1:return n[e];case 2:return s[e];case 4:return r[e];case 3:return i[e]}else{if(yi(n,e))return o[e]=1,n[e];if(s!==_e&&fe(s,e))return o[e]=2,s[e];if(fe(i,e))return o[e]=3,i[e];if(r!==_e&&fe(r,e))return o[e]=4,r[e];Hi&&(o[e]=0)}}const c=xn[e];let u,h;if(c)return e==="$attrs"&&Ve(t.attrs,"get",""),c(t);if((u=a.__cssModules)&&(u=u[e]))return u;if(r!==_e&&fe(r,e))return o[e]=4,r[e];if(h=l.config.globalProperties,fe(h,e))return h[e]},set({_:t},e,r){const{data:n,setupState:s,ctx:i}=t;return yi(s,e)?(s[e]=r,!0):n!==_e&&fe(n,e)?(n[e]=r,!0):fe(t.props,e)||e[0]==="$"&&e.slice(1)in t?!1:(i[e]=r,!0)},has({_:{data:t,setupState:e,accessCache:r,ctx:n,appContext:s,props:i,type:o}},a){let l;return!!(r[a]||t!==_e&&a[0]!=="$"&&fe(t,a)||yi(e,a)||fe(i,a)||fe(n,a)||fe(xn,a)||fe(s.config.globalProperties,a)||(l=o.__cssModules)&&l[a])},defineProperty(t,e,r){return r.get!=null?t._.accessCache[e]=0:fe(r,"value")&&this.set(t,e,r.value,null),Reflect.defineProperty(t,e,r)}};function oa(t){return F(t)?t.reduce((e,r)=>(e[r]=null,e),{}):t}let Hi=!0;function Ad(t){const e=Uc(t),r=t.proxy,n=t.ctx;Hi=!1,e.beforeCreate&&aa(e.beforeCreate,t,"bc");const{data:s,computed:i,methods:o,watch:a,provide:l,inject:c,created:u,beforeMount:h,mounted:d,beforeUpdate:f,updated:p,activated:y,deactivated:w,beforeDestroy:k,beforeUnmount:_,destroyed:b,unmounted:x,render:D,renderTracked:M,renderTriggered:U,errorCaptured:V,serverPrefetch:C,expose:z,inheritAttrs:Q,components:O,directives:Y,filters:Ee}=e;if(c&&xd(c,n,null),o)for(const te in o){const L=o[te];ee(L)&&(n[te]=L.bind(r))}if(s){const te=s.call(r,r);ge(te)&&(t.data=Xn(te))}if(Hi=!0,i)for(const te in i){const L=i[te],se=ee(L)?L.bind(r,r):ee(L.get)?L.get.bind(r,r):Nt,We=!ee(L)&&ee(L.set)?L.set.bind(r):Nt,ie=je({get:se,set:We});Object.defineProperty(n,te,{enumerable:!0,configurable:!0,get:()=>ie.value,set:ae=>ie.value=ae})}if(a)for(const te in a)Dc(a[te],n,r,te);if(l){const te=ee(l)?l.call(r):l;Reflect.ownKeys(te).forEach(L=>{ys(L,te[L])})}u&&aa(u,t,"c");function ye(te,L){F(L)?L.forEach(se=>te(se.bind(r))):L&&te(L.bind(r))}if(ye(vd,h),ye(xo,d),ye(bd,f),ye(_d,p),ye(gd,y),ye(md,w),ye(Ed,V),ye(Sd,M),ye(kd,U),ye(Ic,_),ye($c,x),ye(wd,C),F(z))if(z.length){const te=t.exposed||(t.exposed={});z.forEach(L=>{Object.defineProperty(te,L,{get:()=>r[L],set:se=>r[L]=se,enumerable:!0})})}else t.exposed||(t.exposed={});D&&t.render===Nt&&(t.render=D),Q!=null&&(t.inheritAttrs=Q),O&&(t.components=O),Y&&(t.directives=Y),C&&Oc(t)}function xd(t,e,r=Nt){F(t)&&(t=qi(t));for(const n in t){const s=t[n];let i;ge(s)?"default"in s?i=ft(s.from||n,s.default,!0):i=ft(s.from||n):i=ft(s),Ce(i)?Object.defineProperty(e,n,{enumerable:!0,configurable:!0,get:()=>i.value,set:o=>i.value=o}):e[n]=i}}function aa(t,e,r){_t(F(t)?t.map(n=>n.bind(e.proxy)):t.bind(e.proxy),e,r)}function Dc(t,e,r,n){let s=n.includes(".")?Sc(r,n):()=>r[n];if(Te(t)){const i=e[t];ee(i)&&Kt(s,i)}else if(ee(t))Kt(s,t.bind(r));else if(ge(t))if(F(t))t.forEach(i=>Dc(i,e,r,n));else{const i=ee(t.handler)?t.handler.bind(r):e[t.handler];ee(i)&&Kt(s,i,t)}}function Uc(t){const e=t.type,{mixins:r,extends:n}=e,{mixins:s,optionsCache:i,config:{optionMergeStrategies:o}}=t.appContext,a=i.get(e);let l;return a?l=a:!s.length&&!r&&!n?l=e:(l={},s.length&&s.forEach(c=>As(l,c,o,!0)),As(l,e,o)),ge(e)&&i.set(e,l),l}function As(t,e,r,n=!1){const{mixins:s,extends:i}=e;i&&As(t,i,r,!0),s&&s.forEach(o=>As(t,o,r,!0));for(const o in e)if(!(n&&o==="expose")){const a=Rd[o]||r&&r[o];t[o]=a?a(t[o],e[o]):e[o]}return t}const Rd={data:la,props:ca,emits:ca,methods:vn,computed:vn,beforeCreate:Ge,created:Ge,beforeMount:Ge,mounted:Ge,beforeUpdate:Ge,updated:Ge,beforeDestroy:Ge,beforeUnmount:Ge,destroyed:Ge,unmounted:Ge,activated:Ge,deactivated:Ge,errorCaptured:Ge,serverPrefetch:Ge,components:vn,directives:vn,watch:Od,provide:la,inject:Cd};function la(t,e){return e?t?function(){return Ue(ee(t)?t.call(this,this):t,ee(e)?e.call(this,this):e)}:e:t}function Cd(t,e){return vn(qi(t),qi(e))}function qi(t){if(F(t)){const e={};for(let r=0;r<t.length;r++)e[t[r]]=t[r];return e}return t}function Ge(t,e){return t?[...new Set([].concat(t,e))]:e}function vn(t,e){return t?Ue(Object.create(null),t,e):e}function ca(t,e){return t?F(t)&&F(e)?[...new Set([...t,...e])]:Ue(Object.create(null),oa(t),oa(e??{})):e}function Od(t,e){if(!t)return e;if(!e)return t;const r=Ue(Object.create(null),t);for(const n in e)r[n]=Ge(t[n],e[n]);return r}function Bc(){return{app:null,config:{isNativeTag:Fl,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let Pd=0;function Id(t,e){return function(n,s=null){ee(n)||(n=Ue({},n)),s!=null&&!ge(s)&&(s=null);const i=Bc(),o=new WeakSet,a=[];let l=!1;const c=i.app={_uid:Pd++,_component:n,_props:s,_container:null,_context:i,_instance:null,version:hf,get config(){return i.config},set config(u){},use(u,...h){return o.has(u)||(u&&ee(u.install)?(o.add(u),u.install(c,...h)):ee(u)&&(o.add(u),u(c,...h))),c},mixin(u){return i.mixins.includes(u)||i.mixins.push(u),c},component(u,h){return h?(i.components[u]=h,c):i.components[u]},directive(u,h){return h?(i.directives[u]=h,c):i.directives[u]},mount(u,h,d){if(!l){const f=c._ceVNode||he(n,s);return f.appContext=i,d===!0?d="svg":d===!1&&(d=void 0),t(f,u,d),l=!0,c._container=u,u.__vue_app__=c,ti(f.component)}},onUnmount(u){a.push(u)},unmount(){l&&(_t(a,c._instance,16),t(null,c._container),delete c._container.__vue_app__)},provide(u,h){return i.provides[u]=h,c},runWithContext(u){const h=Rr;Rr=c;try{return u()}finally{Rr=h}}};return c}}let Rr=null;const $d=(t,e)=>e==="modelValue"||e==="model-value"?t.modelModifiers:t[`${e}Modifiers`]||t[`${et(e)}Modifiers`]||t[`${fr(e)}Modifiers`];function jd(t,e,...r){if(t.isUnmounted)return;const n=t.vnode.props||_e;let s=r;const i=e.startsWith("update:"),o=i&&$d(n,e.slice(7));o&&(o.trim&&(s=r.map(u=>Te(u)?u.trim():u)),o.number&&(s=r.map(Vs)));let a,l=n[a=hi(e)]||n[a=hi(et(e))];!l&&i&&(l=n[a=hi(fr(e))]),l&&_t(l,t,6,s);const c=n[a+"Once"];if(c){if(!t.emitted)t.emitted={};else if(t.emitted[a])return;t.emitted[a]=!0,_t(c,t,6,s)}}const Nd=new WeakMap;function Mc(t,e,r=!1){const n=r?Nd:e.emitsCache,s=n.get(t);if(s!==void 0)return s;const i=t.emits;let o={},a=!1;if(!ee(t)){const l=c=>{const u=Mc(c,e,!0);u&&(a=!0,Ue(o,u))};!r&&e.mixins.length&&e.mixins.forEach(l),t.extends&&l(t.extends),t.mixins&&t.mixins.forEach(l)}return!i&&!a?(ge(t)&&n.set(t,null),null):(F(i)?i.forEach(l=>o[l]=null):Ue(o,i),ge(t)&&n.set(t,o),o)}function Qs(t,e){return!t||!Bs(e)?!1:(e=e.slice(2).replace(/Once$/,""),fe(t,e[0].toLowerCase()+e.slice(1))||fe(t,fr(e))||fe(t,e))}function ua(t){const{type:e,vnode:r,proxy:n,withProxy:s,propsOptions:[i],slots:o,attrs:a,emit:l,render:c,renderCache:u,props:h,data:d,setupState:f,ctx:p,inheritAttrs:y}=t,w=Es(t);let k,_;try{if(r.shapeFlag&4){const x=s||n,D=x;k=It(c.call(D,x,u,h,f,d,p)),_=a}else{const x=e;k=It(x.length>1?x(h,{attrs:a,slots:o,emit:l}):x(h,null)),_=e.props?a:Ld(a)}}catch(x){Rn.length=0,Js(x,t,1),k=he(Ze)}let b=k;if(_&&y!==!1){const x=Object.keys(_),{shapeFlag:D}=b;x.length&&D&7&&(i&&x.some(Ms)&&(_=Dd(_,i)),b=dr(b,_,!1,!0))}return r.dirs&&(b=dr(b,null,!1,!0),b.dirs=b.dirs?b.dirs.concat(r.dirs):r.dirs),r.transition&&Un(b,r.transition),k=b,Es(w),k}const Ld=t=>{let e;for(const r in t)(r==="class"||r==="style"||Bs(r))&&((e||(e={}))[r]=t[r]);return e},Dd=(t,e)=>{const r={};for(const n in t)(!Ms(n)||!(n.slice(9)in e))&&(r[n]=t[n]);return r};function Ud(t,e,r){const{props:n,children:s,component:i}=t,{props:o,children:a,patchFlag:l}=e,c=i.emitsOptions;if(e.dirs||e.transition)return!0;if(r&&l>=0){if(l&1024)return!0;if(l&16)return n?ha(n,o,c):!!o;if(l&8){const u=e.dynamicProps;for(let h=0;h<u.length;h++){const d=u[h];if(Hc(o,n,d)&&!Qs(c,d))return!0}}}else return(s||a)&&(!a||!a.$stable)?!0:n===o?!1:n?o?ha(n,o,c):!0:!!o;return!1}function ha(t,e,r){const n=Object.keys(e);if(n.length!==Object.keys(t).length)return!0;for(let s=0;s<n.length;s++){const i=n[s];if(Hc(e,t,i)&&!Qs(r,i))return!0}return!1}function Hc(t,e,r){const n=t[r],s=e[r];return r==="style"&&ge(n)&&ge(s)?!on(n,s):n!==s}function Bd({vnode:t,parent:e,suspense:r},n){for(;e;){const s=e.subTree;if(s.suspense&&s.suspense.activeBranch===t&&(s.suspense.vnode.el=s.el=n,t=s),s===t)(t=e.vnode).el=n,e=e.parent;else break}r&&r.activeBranch===t&&(r.vnode.el=n)}const qc={},Fc=()=>Object.create(qc),Vc=t=>Object.getPrototypeOf(t)===qc;function Md(t,e,r,n=!1){const s={},i=Fc();t.propsDefaults=Object.create(null),zc(t,e,s,i);for(const o in t.propsOptions[0])o in s||(s[o]=void 0);r?t.props=n?s:pc(s):t.type.props?t.props=s:t.props=i,t.attrs=i}function Hd(t,e,r,n){const{props:s,attrs:i,vnode:{patchFlag:o}}=t,a=le(s),[l]=t.propsOptions;let c=!1;if((n||o>0)&&!(o&16)){if(o&8){const u=t.vnode.dynamicProps;for(let h=0;h<u.length;h++){let d=u[h];if(Qs(t.emitsOptions,d))continue;const f=e[d];if(l)if(fe(i,d))f!==i[d]&&(i[d]=f,c=!0);else{const p=et(d);s[p]=Fi(l,a,p,f,t,!1)}else f!==i[d]&&(i[d]=f,c=!0)}}}else{zc(t,e,s,i)&&(c=!0);let u;for(const h in a)(!e||!fe(e,h)&&((u=fr(h))===h||!fe(e,u)))&&(l?r&&(r[h]!==void 0||r[u]!==void 0)&&(s[h]=Fi(l,a,h,void 0,t,!0)):delete s[h]);if(i!==a)for(const h in i)(!e||!fe(e,h))&&(delete i[h],c=!0)}c&&zt(t.attrs,"set","")}function zc(t,e,r,n){const[s,i]=t.propsOptions;let o=!1,a;if(e)for(let l in e){if(kn(l))continue;const c=e[l];let u;s&&fe(s,u=et(l))?!i||!i.includes(u)?r[u]=c:(a||(a={}))[u]=c:Qs(t.emitsOptions,l)||(!(l in n)||c!==n[l])&&(n[l]=c,o=!0)}if(i){const l=le(r),c=a||_e;for(let u=0;u<i.length;u++){const h=i[u];r[h]=Fi(s,l,h,c[h],t,!fe(c,h))}}return o}function Fi(t,e,r,n,s,i){const o=t[r];if(o!=null){const a=fe(o,"default");if(a&&n===void 0){const l=o.default;if(o.type!==Function&&!o.skipFactory&&ee(l)){const{propsDefaults:c}=s;if(r in c)n=c[r];else{const u=Qn(s);n=c[r]=l.call(null,e),u()}}else n=l;s.ce&&s.ce._setProp(r,n)}o[0]&&(i&&!a?n=!1:o[1]&&(n===""||n===fr(r))&&(n=!0))}return n}const qd=new WeakMap;function Wc(t,e,r=!1){const n=r?qd:e.propsCache,s=n.get(t);if(s)return s;const i=t.props,o={},a=[];let l=!1;if(!ee(t)){const u=h=>{l=!0;const[d,f]=Wc(h,e,!0);Ue(o,d),f&&a.push(...f)};!r&&e.mixins.length&&e.mixins.forEach(u),t.extends&&u(t.extends),t.mixins&&t.mixins.forEach(u)}if(!i&&!l)return ge(t)&&n.set(t,Kr),Kr;if(F(i))for(let u=0;u<i.length;u++){const h=et(i[u]);da(h)&&(o[h]=_e)}else if(i)for(const u in i){const h=et(u);if(da(h)){const d=i[u],f=o[h]=F(d)||ee(d)?{type:d}:Ue({},d),p=f.type;let y=!1,w=!0;if(F(p))for(let k=0;k<p.length;++k){const _=p[k],b=ee(_)&&_.name;if(b==="Boolean"){y=!0;break}else b==="String"&&(w=!1)}else y=ee(p)&&p.name==="Boolean";f[0]=y,f[1]=w,(y||fe(f,"default"))&&a.push(h)}}const c=[o,a];return ge(t)&&n.set(t,c),c}function da(t){return t[0]!=="$"&&!kn(t)}const Ro=t=>t==="_"||t==="_ctx"||t==="$stable",Co=t=>F(t)?t.map(It):[It(t)],Fd=(t,e,r)=>{if(e._n)return e;const n=Yr((...s)=>Co(e(...s)),r);return n._c=!1,n},Kc=(t,e,r)=>{const n=t._ctx;for(const s in t){if(Ro(s))continue;const i=t[s];if(ee(i))e[s]=Fd(s,i,n);else if(i!=null){const o=Co(i);e[s]=()=>o}}},Gc=(t,e)=>{const r=Co(e);t.slots.default=()=>r},Jc=(t,e,r)=>{for(const n in e)(r||!Ro(n))&&(t[n]=e[n])},Vd=(t,e,r)=>{const n=t.slots=Fc();if(t.vnode.shapeFlag&32){const s=e._;s?(Jc(n,e,r),r&&Kl(n,"_",s,!0)):Kc(e,n)}else e&&Gc(t,e)},zd=(t,e,r)=>{const{vnode:n,slots:s}=t;let i=!0,o=_e;if(n.shapeFlag&32){const a=e._;a?r&&a===1?i=!1:Jc(s,e,r):(i=!e.$stable,Kc(e,s)),o=e}else e&&(Gc(t,e),o={default:1});if(i)for(const a in s)!Ro(a)&&o[a]==null&&delete s[a]},rt=Yd;function Wd(t){return Kd(t)}function Kd(t,e){const r=zs();r.__VUE__=!0;const{insert:n,remove:s,patchProp:i,createElement:o,createText:a,createComment:l,setText:c,setElementText:u,parentNode:h,nextSibling:d,setScopeId:f=Nt,insertStaticContent:p}=t,y=(g,m,v,S=null,A=null,E=null,j=void 0,I=null,P=!!m.dynamicChildren)=>{if(g===m)return;g&&!Er(g,m)&&(S=T(g),ae(g,A,E,!0),g=null),m.patchFlag===-2&&(P=!1,m.dynamicChildren=null);const{type:R,ref:G,shapeFlag:B}=m;switch(R){case ei:w(g,m,v,S);break;case Ze:k(g,m,v,S);break;case bi:g==null&&_(m,v,S,j);break;case Fe:O(g,m,v,S,A,E,j,I,P);break;default:B&1?D(g,m,v,S,A,E,j,I,P):B&6?Y(g,m,v,S,A,E,j,I,P):(B&64||B&128)&&R.process(g,m,v,S,A,E,j,I,P,W)}G!=null&&A?Tn(G,g&&g.ref,E,m||g,!m):G==null&&g&&g.ref!=null&&Tn(g.ref,null,E,g,!0)},w=(g,m,v,S)=>{if(g==null)n(m.el=a(m.children),v,S);else{const A=m.el=g.el;m.children!==g.children&&c(A,m.children)}},k=(g,m,v,S)=>{g==null?n(m.el=l(m.children||""),v,S):m.el=g.el},_=(g,m,v,S)=>{[g.el,g.anchor]=p(g.children,m,v,S,g.el,g.anchor)},b=({el:g,anchor:m},v,S)=>{let A;for(;g&&g!==m;)A=d(g),n(g,v,S),g=A;n(m,v,S)},x=({el:g,anchor:m})=>{let v;for(;g&&g!==m;)v=d(g),s(g),g=v;s(m)},D=(g,m,v,S,A,E,j,I,P)=>{if(m.type==="svg"?j="svg":m.type==="math"&&(j="mathml"),g==null)M(m,v,S,A,E,j,I,P);else{const R=g.el&&g.el._isVueCE?g.el:null;try{R&&R._beginPatch(),C(g,m,A,E,j,I,P)}finally{R&&R._endPatch()}}},M=(g,m,v,S,A,E,j,I)=>{let P,R;const{props:G,shapeFlag:B,transition:K,dirs:X}=g;if(P=g.el=o(g.type,E,G&&G.is,G),B&8?u(P,g.children):B&16&&V(g.children,P,null,S,A,vi(g,E),j,I),X&&mr(g,null,S,"created"),U(P,g,g.scopeId,j,S),G){for(const ve in G)ve!=="value"&&!kn(ve)&&i(P,ve,null,G[ve],E,S);"value"in G&&i(P,"value",null,G.value,E),(R=G.onVnodeBeforeMount)&&Tt(R,S,g)}X&&mr(g,null,S,"beforeMount");const ce=Gd(A,K);ce&&K.beforeEnter(P),n(P,m,v),((R=G&&G.onVnodeMounted)||ce||X)&&rt(()=>{try{R&&Tt(R,S,g),ce&&K.enter(P),X&&mr(g,null,S,"mounted")}finally{}},A)},U=(g,m,v,S,A)=>{if(v&&f(g,v),S)for(let E=0;E<S.length;E++)f(g,S[E]);if(A){let E=A.subTree;if(m===E||Qc(E.type)&&(E.ssContent===m||E.ssFallback===m)){const j=A.vnode;U(g,j,j.scopeId,j.slotScopeIds,A.parent)}}},V=(g,m,v,S,A,E,j,I,P=0)=>{for(let R=P;R<g.length;R++){const G=g[R]=I?Vt(g[R]):It(g[R]);y(null,G,m,v,S,A,E,j,I)}},C=(g,m,v,S,A,E,j)=>{const I=m.el=g.el;let{patchFlag:P,dynamicChildren:R,dirs:G}=m;P|=g.patchFlag&16;const B=g.props||_e,K=m.props||_e;let X;if(v&&yr(v,!1),(X=K.onVnodeBeforeUpdate)&&Tt(X,v,m,g),G&&mr(m,g,v,"beforeUpdate"),v&&yr(v,!0),(B.innerHTML&&K.innerHTML==null||B.textContent&&K.textContent==null)&&u(I,""),R?z(g.dynamicChildren,R,I,v,S,vi(m,A),E):j||L(g,m,I,null,v,S,vi(m,A),E,!1),P>0){if(P&16)Q(I,B,K,v,A);else if(P&2&&B.class!==K.class&&i(I,"class",null,K.class,A),P&4&&i(I,"style",B.style,K.style,A),P&8){const ce=m.dynamicProps;for(let ve=0;ve<ce.length;ve++){const we=ce[ve],Pe=B[we],Me=K[we];(Me!==Pe||we==="value")&&i(I,we,Pe,Me,A,v)}}P&1&&g.children!==m.children&&u(I,m.children)}else!j&&R==null&&Q(I,B,K,v,A);((X=K.onVnodeUpdated)||G)&&rt(()=>{X&&Tt(X,v,m,g),G&&mr(m,g,v,"updated")},S)},z=(g,m,v,S,A,E,j)=>{for(let I=0;I<m.length;I++){const P=g[I],R=m[I],G=P.el&&(P.type===Fe||!Er(P,R)||P.shapeFlag&198)?h(P.el):v;y(P,R,G,null,S,A,E,j,!0)}},Q=(g,m,v,S,A)=>{if(m!==v){if(m!==_e)for(const E in m)!kn(E)&&!(E in v)&&i(g,E,m[E],null,A,S);for(const E in v){if(kn(E))continue;const j=v[E],I=m[E];j!==I&&E!=="value"&&i(g,E,I,j,A,S)}"value"in v&&i(g,"value",m.value,v.value,A)}},O=(g,m,v,S,A,E,j,I,P)=>{const R=m.el=g?g.el:a(""),G=m.anchor=g?g.anchor:a("");let{patchFlag:B,dynamicChildren:K,slotScopeIds:X}=m;X&&(I=I?I.concat(X):X),g==null?(n(R,v,S),n(G,v,S),V(m.children||[],v,G,A,E,j,I,P)):B>0&&B&64&&K&&g.dynamicChildren&&g.dynamicChildren.length===K.length?(z(g.dynamicChildren,K,v,A,E,j,I),(m.key!=null||A&&m===A.subTree)&&Yc(g,m,!0)):L(g,m,v,G,A,E,j,I,P)},Y=(g,m,v,S,A,E,j,I,P)=>{m.slotScopeIds=I,g==null?m.shapeFlag&512?A.ctx.activate(m,v,S,j,P):Ee(m,v,S,A,E,j,P):Ne(g,m,P)},Ee=(g,m,v,S,A,E,j)=>{const I=g.component=nf(g,S,A);if(Ys(g)&&(I.ctx.renderer=W),sf(I,!1,j),I.asyncDep){if(A&&A.registerDep(I,ye,j),!g.el){const P=I.subTree=he(Ze);k(null,P,m,v),g.placeholder=P.el}}else ye(I,g,m,v,A,E,j)},Ne=(g,m,v)=>{const S=m.component=g.component;if(Ud(g,m,v))if(S.asyncDep&&!S.asyncResolved){te(S,m,v);return}else S.next=m,S.update();else m.el=g.el,S.vnode=m},ye=(g,m,v,S,A,E,j)=>{const I=()=>{if(g.isMounted){let{next:B,bu:K,u:X,parent:ce,vnode:ve}=g;{const St=Xc(g);if(St){B&&(B.el=ve.el,te(g,B,j)),St.asyncDep.then(()=>{rt(()=>{g.isUnmounted||R()},A)});return}}let we=B,Pe;yr(g,!1),B?(B.el=ve.el,te(g,B,j)):B=ve,K&&ms(K),(Pe=B.props&&B.props.onVnodeBeforeUpdate)&&Tt(Pe,ce,B,ve),yr(g,!0);const Me=ua(g),kt=g.subTree;g.subTree=Me,y(kt,Me,h(kt.el),T(kt),g,A,E),B.el=Me.el,we===null&&Bd(g,Me.el),X&&rt(X,A),(Pe=B.props&&B.props.onVnodeUpdated)&&rt(()=>Tt(Pe,ce,B,ve),A)}else{let B;const{el:K,props:X}=m,{bm:ce,m:ve,parent:we,root:Pe,type:Me}=g,kt=An(m);yr(g,!1),ce&&ms(ce),!kt&&(B=X&&X.onVnodeBeforeMount)&&Tt(B,we,m),yr(g,!0);{Pe.ce&&Pe.ce._hasShadowRoot()&&Pe.ce._injectChildStyle(Me,g.parent?g.parent.type:void 0);const St=g.subTree=ua(g);y(null,St,v,S,g,A,E),m.el=St.el}if(ve&&rt(ve,A),!kt&&(B=X&&X.onVnodeMounted)){const St=m;rt(()=>Tt(B,we,St),A)}(m.shapeFlag&256||we&&An(we.vnode)&&we.vnode.shapeFlag&256)&&g.a&&rt(g.a,A),g.isMounted=!0,m=v=S=null}};g.scope.on();const P=g.effect=new ec(I);g.scope.off();const R=g.update=P.run.bind(P),G=g.job=P.runIfDirty.bind(P);G.i=g,G.id=g.uid,P.scheduler=()=>Ao(G),yr(g,!0),R()},te=(g,m,v)=>{m.component=g;const S=g.vnode.props;g.vnode=m,g.next=null,Hd(g,m.props,S,v),zd(g,m.children,v),Zt(),ea(g),Qt()},L=(g,m,v,S,A,E,j,I,P=!1)=>{const R=g&&g.children,G=g?g.shapeFlag:0,B=m.children,{patchFlag:K,shapeFlag:X}=m;if(K>0){if(K&128){We(R,B,v,S,A,E,j,I,P);return}else if(K&256){se(R,B,v,S,A,E,j,I,P);return}}X&8?(G&16&&ut(R,A,E),B!==R&&u(v,B)):G&16?X&16?We(R,B,v,S,A,E,j,I,P):ut(R,A,E,!0):(G&8&&u(v,""),X&16&&V(B,v,S,A,E,j,I,P))},se=(g,m,v,S,A,E,j,I,P)=>{g=g||Kr,m=m||Kr;const R=g.length,G=m.length,B=Math.min(R,G);let K;for(K=0;K<B;K++){const X=m[K]=P?Vt(m[K]):It(m[K]);y(g[K],X,v,null,A,E,j,I,P)}R>G?ut(g,A,E,!0,!1,B):V(m,v,S,A,E,j,I,P,B)},We=(g,m,v,S,A,E,j,I,P)=>{let R=0;const G=m.length;let B=g.length-1,K=G-1;for(;R<=B&&R<=K;){const X=g[R],ce=m[R]=P?Vt(m[R]):It(m[R]);if(Er(X,ce))y(X,ce,v,null,A,E,j,I,P);else break;R++}for(;R<=B&&R<=K;){const X=g[B],ce=m[K]=P?Vt(m[K]):It(m[K]);if(Er(X,ce))y(X,ce,v,null,A,E,j,I,P);else break;B--,K--}if(R>B){if(R<=K){const X=K+1,ce=X<G?m[X].el:S;for(;R<=K;)y(null,m[R]=P?Vt(m[R]):It(m[R]),v,ce,A,E,j,I,P),R++}}else if(R>K)for(;R<=B;)ae(g[R],A,E,!0),R++;else{const X=R,ce=R,ve=new Map;for(R=ce;R<=K;R++){const st=m[R]=P?Vt(m[R]):It(m[R]);st.key!=null&&ve.set(st.key,R)}let we,Pe=0;const Me=K-ce+1;let kt=!1,St=0;const cn=new Array(Me);for(R=0;R<Me;R++)cn[R]=0;for(R=X;R<=B;R++){const st=g[R];if(Pe>=Me){ae(st,A,E,!0);continue}let Et;if(st.key!=null)Et=ve.get(st.key);else for(we=ce;we<=K;we++)if(cn[we-ce]===0&&Er(st,m[we])){Et=we;break}Et===void 0?ae(st,A,E,!0):(cn[Et-ce]=R+1,Et>=St?St=Et:kt=!0,y(st,m[Et],v,null,A,E,j,I,P),Pe++)}const Wo=kt?Jd(cn):Kr;for(we=Wo.length-1,R=Me-1;R>=0;R--){const st=ce+R,Et=m[st],Ko=m[st+1],Go=st+1<G?Ko.el||Zc(Ko):S;cn[R]===0?y(null,Et,v,Go,A,E,j,I,P):kt&&(we<0||R!==Wo[we]?ie(Et,v,Go,2):we--)}}},ie=(g,m,v,S,A=null)=>{const{el:E,type:j,transition:I,children:P,shapeFlag:R}=g;if(R&6){ie(g.component.subTree,m,v,S);return}if(R&128){g.suspense.move(m,v,S);return}if(R&64){j.move(g,m,v,W);return}if(j===Fe){n(E,m,v);for(let B=0;B<P.length;B++)ie(P[B],m,v,S);n(g.anchor,m,v);return}if(j===bi){b(g,m,v);return}if(S!==2&&R&1&&I)if(S===0)I.beforeEnter(E),n(E,m,v),rt(()=>I.enter(E),A);else{const{leave:B,delayLeave:K,afterLeave:X}=I,ce=()=>{g.ctx.isUnmounted?s(E):n(E,m,v)},ve=()=>{E._isLeaving&&E[Ct](!0),B(E,()=>{ce(),X&&X()})};K?K(E,ce,ve):ve()}else n(E,m,v)},ae=(g,m,v,S=!1,A=!1)=>{const{type:E,props:j,ref:I,children:P,dynamicChildren:R,shapeFlag:G,patchFlag:B,dirs:K,cacheIndex:X,memo:ce}=g;if(B===-2&&(A=!1),I!=null&&(Zt(),Tn(I,null,v,g,!0),Qt()),X!=null&&(m.renderCache[X]=void 0),G&256){m.ctx.deactivate(g);return}const ve=G&1&&K,we=!An(g);let Pe;if(we&&(Pe=j&&j.onVnodeBeforeUnmount)&&Tt(Pe,m,g),G&6)gr(g.component,v,S);else{if(G&128){g.suspense.unmount(v,S);return}ve&&mr(g,null,m,"beforeUnmount"),G&64?g.type.remove(g,m,v,W,S):R&&!R.hasOnce&&(E!==Fe||B>0&&B&64)?ut(R,m,v,!1,!0):(E===Fe&&B&384||!A&&G&16)&&ut(P,m,v),S&&Lt(g)}const Me=ce!=null&&X==null;(we&&(Pe=j&&j.onVnodeUnmounted)||ve||Me)&&rt(()=>{Pe&&Tt(Pe,m,g),ve&&mr(g,null,m,"unmounted"),Me&&(g.el=null)},v)},Lt=g=>{const{type:m,el:v,anchor:S,transition:A}=g;if(m===Fe){Pr(v,S);return}if(m===bi){x(g);return}const E=()=>{s(v),A&&!A.persisted&&A.afterLeave&&A.afterLeave()};if(g.shapeFlag&1&&A&&!A.persisted){const{leave:j,delayLeave:I}=A,P=()=>j(v,E);I?I(g.el,E,P):P()}else E()},Pr=(g,m)=>{let v;for(;g!==m;)v=d(g),s(g),g=v;s(m)},gr=(g,m,v)=>{const{bum:S,scope:A,job:E,subTree:j,um:I,m:P,a:R}=g;fa(P),fa(R),S&&ms(S),A.stop(),E&&(E.flags|=8,ae(j,g,m,v)),I&&rt(I,m),rt(()=>{g.isUnmounted=!0},m)},ut=(g,m,v,S=!1,A=!1,E=0)=>{for(let j=E;j<g.length;j++)ae(g[j],m,v,S,A)},T=g=>{if(g.shapeFlag&6)return T(g.component.subTree);if(g.shapeFlag&128)return g.suspense.next();const m=d(g.anchor||g.el),v=m&&m[hd];return v?d(v):m};let H=!1;const N=(g,m,v)=>{let S;g==null?m._vnode&&(ae(m._vnode,null,null,!0),S=m._vnode.component):y(m._vnode||null,g,m,null,null,null,v),m._vnode=g,H||(H=!0,ea(S),bc(),H=!1)},W={p:y,um:ae,m:ie,r:Lt,mt:Ee,mc:V,pc:L,pbc:z,n:T,o:t};return{render:N,hydrate:void 0,createApp:Id(N)}}function vi({type:t,props:e},r){return r==="svg"&&t==="foreignObject"||r==="mathml"&&t==="annotation-xml"&&e&&e.encoding&&e.encoding.includes("html")?void 0:r}function yr({effect:t,job:e},r){r?(t.flags|=32,e.flags|=4):(t.flags&=-33,e.flags&=-5)}function Gd(t,e){return(!t||t&&!t.pendingBranch)&&e&&!e.persisted}function Yc(t,e,r=!1){const n=t.children,s=e.children;if(F(n)&&F(s))for(let i=0;i<n.length;i++){const o=n[i];let a=s[i];a.shapeFlag&1&&!a.dynamicChildren&&((a.patchFlag<=0||a.patchFlag===32)&&(a=s[i]=Vt(s[i]),a.el=o.el),!r&&a.patchFlag!==-2&&Yc(o,a)),a.type===ei&&(a.patchFlag===-1&&(a=s[i]=Vt(a)),a.el=o.el),a.type===Ze&&!a.el&&(a.el=o.el)}}function Jd(t){const e=t.slice(),r=[0];let n,s,i,o,a;const l=t.length;for(n=0;n<l;n++){const c=t[n];if(c!==0){if(s=r[r.length-1],t[s]<c){e[n]=s,r.push(n);continue}for(i=0,o=r.length-1;i<o;)a=i+o>>1,t[r[a]]<c?i=a+1:o=a;c<t[r[i]]&&(i>0&&(e[n]=r[i-1]),r[i]=n)}}for(i=r.length,o=r[i-1];i-- >0;)r[i]=o,o=e[o];return r}function Xc(t){const e=t.subTree.component;if(e)return e.asyncDep&&!e.asyncResolved?e:Xc(e)}function fa(t){if(t)for(let e=0;e<t.length;e++)t[e].flags|=8}function Zc(t){if(t.placeholder)return t.placeholder;const e=t.component;return e?Zc(e.subTree):null}const Qc=t=>t.__isSuspense;function Yd(t,e){e&&e.pendingBranch?F(t)?e.effects.push(...t):e.effects.push(t):id(t)}const Fe=Symbol.for("v-fgt"),ei=Symbol.for("v-txt"),Ze=Symbol.for("v-cmt"),bi=Symbol.for("v-stc"),Rn=[];let lt=null;function Z(t=!1){Rn.push(lt=t?null:[])}function Xd(){Rn.pop(),lt=Rn[Rn.length-1]||null}let Bn=1;function xs(t,e=!1){Bn+=t,t<0&<&&e&&(lt.hasOnce=!0)}function eu(t){return t.dynamicChildren=Bn>0?lt||Kr:null,Xd(),Bn>0&<&<.push(t),t}function ue(t,e,r,n,s,i){return eu(ne(t,e,r,n,s,i,!0))}function nt(t,e,r,n,s){return eu(he(t,e,r,n,s,!0))}function Rs(t){return t?t.__v_isVNode===!0:!1}function Er(t,e){return t.type===e.type&&t.key===e.key}const tu=({key:t})=>t??null,vs=({ref:t,ref_key:e,ref_for:r})=>(typeof t=="number"&&(t=""+t),t!=null?Te(t)||Ce(t)||ee(t)?{i:at,r:t,k:e,f:!!r}:t:null);function ne(t,e=null,r=null,n=0,s=null,i=t===Fe?0:1,o=!1,a=!1){const l={__v_isVNode:!0,__v_skip:!0,type:t,props:e,key:e&&tu(e),ref:e&&vs(e),scopeId:wc,slotScopeIds:null,children:r,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:i,patchFlag:n,dynamicProps:s,dynamicChildren:null,appContext:null,ctx:at};return a?(Oo(l,r),i&128&&t.normalize(l)):r&&(l.shapeFlag|=Te(r)?8:16),Bn>0&&!o&<&&(l.patchFlag>0||i&6)&&l.patchFlag!==32&<.push(l),l}const he=Zd;function Zd(t,e=null,r=null,n=0,s=null,i=!1){if((!t||t===Nc)&&(t=Ze),Rs(t)){const a=dr(t,e,!0);return r&&Oo(a,r),Bn>0&&!i&<&&(a.shapeFlag&6?lt[lt.indexOf(t)]=a:lt.push(a)),a.patchFlag=-2,a}if(uf(t)&&(t=t.__vccOpts),e){e=Qd(e);let{class:a,style:l}=e;a&&!Te(a)&&(e.class=Ye(a)),ge(l)&&(Gs(l)&&!F(l)&&(l=Ue({},l)),e.style=Ws(l))}const o=Te(t)?1:Qc(t)?128:Ec(t)?64:ge(t)?4:ee(t)?2:0;return ne(t,e,r,n,s,o,i,!0)}function Qd(t){return t?Gs(t)||Vc(t)?Ue({},t):t:null}function dr(t,e,r=!1,n=!1){const{props:s,ref:i,patchFlag:o,children:a,transition:l}=t,c=e?ef(s||{},e):s,u={__v_isVNode:!0,__v_skip:!0,type:t.type,props:c,key:c&&tu(c),ref:e&&e.ref?r&&i?F(i)?i.concat(vs(e)):[i,vs(e)]:vs(e):i,scopeId:t.scopeId,slotScopeIds:t.slotScopeIds,children:a,target:t.target,targetStart:t.targetStart,targetAnchor:t.targetAnchor,staticCount:t.staticCount,shapeFlag:t.shapeFlag,patchFlag:e&&t.type!==Fe?o===-1?16:o|16:o,dynamicProps:t.dynamicProps,dynamicChildren:t.dynamicChildren,appContext:t.appContext,dirs:t.dirs,transition:l,component:t.component,suspense:t.suspense,ssContent:t.ssContent&&dr(t.ssContent),ssFallback:t.ssFallback&&dr(t.ssFallback),placeholder:t.placeholder,el:t.el,anchor:t.anchor,ctx:t.ctx,ce:t.ce};return l&&n&&Un(u,l.clone(u)),u}function ru(t=" ",e=0){return he(ei,null,t,e)}function $e(t="",e=!1){return e?(Z(),nt(Ze,null,t)):he(Ze,null,t)}function It(t){return t==null||typeof t=="boolean"?he(Ze):F(t)?he(Fe,null,t.slice()):Rs(t)?Vt(t):he(ei,null,String(t))}function Vt(t){return t.el===null&&t.patchFlag!==-1||t.memo?t:dr(t)}function Oo(t,e){let r=0;const{shapeFlag:n}=t;if(e==null)e=null;else if(F(e))r=16;else if(typeof e=="object")if(n&65){const s=e.default;s&&(s._c&&(s._d=!1),Oo(t,s()),s._c&&(s._d=!0));return}else{r=32;const s=e._;!s&&!Vc(e)?e._ctx=at:s===3&&at&&(at.slots._===1?e._=1:(e._=2,t.patchFlag|=1024))}else ee(e)?(e={default:e,_ctx:at},r=32):(e=String(e),n&64?(r=16,e=[ru(e)]):r=8);t.children=e,t.shapeFlag|=r}function ef(...t){const e={};for(let r=0;r<t.length;r++){const n=t[r];for(const s in n)if(s==="class")e.class!==n.class&&(e.class=Ye([e.class,n.class]));else if(s==="style")e.style=Ws([e.style,n.style]);else if(Bs(s)){const i=e[s],o=n[s];o&&i!==o&&!(F(i)&&i.includes(o))?e[s]=i?[].concat(i,o):o:o==null&&i==null&&!Ms(s)&&(e[s]=o)}else s!==""&&(e[s]=n[s])}return e}function Tt(t,e,r,n=null){_t(t,e,7,[r,n])}const tf=Bc();let rf=0;function nf(t,e,r){const n=t.type,s=(e?e.appContext:t.appContext)||tf,i={uid:rf++,vnode:t,type:n,parent:e,appContext:s,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new Xl(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:e?e.provides:Object.create(s.provides),ids:e?e.ids:["",0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:Wc(n,s),emitsOptions:Mc(n,s),emit:null,emitted:null,propsDefaults:_e,inheritAttrs:n.inheritAttrs,ctx:_e,data:_e,props:_e,attrs:_e,slots:_e,refs:_e,setupState:_e,setupContext:null,suspense:r,suspenseId:r?r.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return i.ctx={_:i},i.root=e?e.root:i,i.emit=jd.bind(null,i),t.ce&&t.ce(i),i}let ze=null;const Po=()=>ze||at;let Cs,Vi;{const t=zs(),e=(r,n)=>{let s;return(s=t[r])||(s=t[r]=[]),s.push(n),i=>{s.length>1?s.forEach(o=>o(i)):s[0](i)}};Cs=e("__VUE_INSTANCE_SETTERS__",r=>ze=r),Vi=e("__VUE_SSR_SETTERS__",r=>Mn=r)}const Qn=t=>{const e=ze;return Cs(t),t.scope.on(),()=>{t.scope.off(),Cs(e)}},pa=()=>{ze&&ze.scope.off(),Cs(null)};function nu(t){return t.vnode.shapeFlag&4}let Mn=!1;function sf(t,e=!1,r=!1){e&&Vi(e);const{props:n,children:s}=t.vnode,i=nu(t);Md(t,n,i,e),Vd(t,s,r||e);const o=i?of(t,e):void 0;return e&&Vi(!1),o}function of(t,e){const r=t.type;t.accessCache=Object.create(null),t.proxy=new Proxy(t.ctx,Td);const{setup:n}=r;if(n){Zt();const s=t.setupContext=n.length>1?lf(t):null,i=Qn(t),o=Zn(n,t,0,[t.props,s]),a=Vl(o);if(Qt(),i(),(a||t.sp)&&!An(t)&&Oc(t),a){if(o.then(pa,pa),e)return o.then(l=>{ga(t,l)}).catch(l=>{Js(l,t,0)});t.asyncDep=o}else ga(t,o)}else su(t)}function ga(t,e,r){ee(e)?t.type.__ssrInlineRender?t.ssrRender=e:t.render=e:ge(e)&&(t.setupState=mc(e)),su(t)}function su(t,e,r){const n=t.type;t.render||(t.render=n.render||Nt);{const s=Qn(t);Zt();try{Ad(t)}finally{Qt(),s()}}}const af={get(t,e){return Ve(t,"get",""),t[e]}};function lf(t){const e=r=>{t.exposed=r||{}};return{attrs:new Proxy(t.attrs,af),slots:t.slots,emit:t.emit,expose:e}}function ti(t){return t.exposed?t.exposeProxy||(t.exposeProxy=new Proxy(mc(To(t.exposed)),{get(e,r){if(r in e)return e[r];if(r in xn)return xn[r](t)},has(e,r){return r in e||r in xn}})):t.proxy}function cf(t,e=!0){return ee(t)?t.displayName||t.name:t.name||e&&t.__name}function uf(t){return ee(t)&&"__vccOpts"in t}const je=(t,e)=>ed(t,e,Mn);function Qr(t,e,r){try{xs(-1);const n=arguments.length;return n===2?ge(e)&&!F(e)?Rs(e)?he(t,null,[e]):he(t,e):he(t,null,e):(n>3?r=Array.prototype.slice.call(arguments,2):n===3&&Rs(r)&&(r=[r]),he(t,e,r))}finally{xs(1)}}const hf="3.5.34";/**
|
|
15
15
|
* @vue/runtime-dom v3.5.34
|
|
16
16
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
17
17
|
* @license MIT
|
|
18
|
-
**/let zi;const ma=typeof window<"u"&&window.trustedTypes;if(ma)try{zi=ma.createPolicy("vue",{createHTML:t=>t})}catch{}const iu=zi?t=>zi.createHTML(t):t=>t,df="http://www.w3.org/2000/svg",ff="http://www.w3.org/1998/Math/MathML",Ht=typeof document<"u"?document:null,ya=Ht&&Ht.createElement("template"),pf={insert:(t,e,r)=>{e.insertBefore(t,r||null)},remove:t=>{const e=t.parentNode;e&&e.removeChild(t)},createElement:(t,e,r,n)=>{const s=e==="svg"?Ht.createElementNS(df,t):e==="mathml"?Ht.createElementNS(ff,t):r?Ht.createElement(t,{is:r}):Ht.createElement(t);return t==="select"&&n&&n.multiple!=null&&s.setAttribute("multiple",n.multiple),s},createText:t=>Ht.createTextNode(t),createComment:t=>Ht.createComment(t),setText:(t,e)=>{t.nodeValue=e},setElementText:(t,e)=>{t.textContent=e},parentNode:t=>t.parentNode,nextSibling:t=>t.nextSibling,querySelector:t=>Ht.querySelector(t),setScopeId(t,e){t.setAttribute(e,"")},insertStaticContent(t,e,r,n,s,i){const o=r?r.previousSibling:e.lastChild;if(s&&(s===i||s.nextSibling))for(;e.insertBefore(s.cloneNode(!0),r),!(s===i||!(s=s.nextSibling)););else{ya.innerHTML=iu(n==="svg"?`<svg>${t}</svg>`:n==="mathml"?`<math>${t}</math>`:t);const a=ya.content;if(n==="svg"||n==="mathml"){const l=a.firstChild;for(;l.firstChild;)a.appendChild(l.firstChild);a.removeChild(l)}e.insertBefore(a,r)}return[o?o.nextSibling:e.firstChild,r?r.previousSibling:e.lastChild]}},nr="transition",dn="animation",Hn=Symbol("_vtc"),ou={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},gf=Ue({},Tc,ou),mf=t=>(t.displayName="Transition",t.props=gf,t),yf=mf((t,{slots:e})=>Qr(pd,vf(t),e)),vr=(t,e=[])=>{F(t)?t.forEach(r=>r(...e)):t&&t(...e)},va=t=>t?F(t)?t.some(e=>e.length>1):t.length>1:!1;function vf(t){const e={};for(const O in t)O in ou||(e[O]=t[O]);if(t.css===!1)return e;const{name:r="v",type:n,duration:s,enterFromClass:i=`${r}-enter-from`,enterActiveClass:o=`${r}-enter-active`,enterToClass:a=`${r}-enter-to`,appearFromClass:l=i,appearActiveClass:c=o,appearToClass:u=a,leaveFromClass:h=`${r}-leave-from`,leaveActiveClass:d=`${r}-leave-active`,leaveToClass:f=`${r}-leave-to`}=t,p=bf(s),y=p&&p[0],w=p&&p[1],{onBeforeEnter:k,onEnter:_,onEnterCancelled:b,onLeave:x,onLeaveCancelled:D,onBeforeAppear:M=k,onAppear:U=_,onAppearCancelled:V=b}=e,C=(O,Y,Ee,je)=>{O._enterCancelled=je,br(O,Y?u:a),br(O,Y?c:o),Ee&&Ee()},z=(O,Y)=>{O._isLeaving=!1,br(O,h),br(O,f),br(O,d),Y&&Y()},Q=O=>(Y,Ee)=>{const je=O?U:_,me=()=>C(Y,O,Ee);vr(je,[Y,me]),ba(()=>{br(Y,O?l:i),Ut(Y,O?u:a),va(je)||_a(Y,n,y,me)})};return Ue(e,{onBeforeEnter(O){vr(k,[O]),Ut(O,i),Ut(O,o)},onBeforeAppear(O){vr(M,[O]),Ut(O,l),Ut(O,c)},onEnter:Q(!1),onAppear:Q(!0),onLeave(O,Y){O._isLeaving=!0;const Ee=()=>z(O,Y);Ut(O,h),O._enterCancelled?(Ut(O,d),Sa(O)):(Sa(O),Ut(O,d)),ba(()=>{O._isLeaving&&(br(O,h),Ut(O,f),va(x)||_a(O,n,w,Ee))}),vr(x,[O,Ee])},onEnterCancelled(O){C(O,!1,void 0,!0),vr(b,[O])},onAppearCancelled(O){C(O,!0,void 0,!0),vr(V,[O])},onLeaveCancelled(O){z(O),vr(D,[O])}})}function bf(t){if(t==null)return null;if(pe(t))return[_i(t.enter),_i(t.leave)];{const e=_i(t);return[e,e]}}function _i(t){return bh(t)}function Ut(t,e){e.split(/\s+/).forEach(r=>r&&t.classList.add(r)),(t[Hn]||(t[Hn]=new Set)).add(e)}function br(t,e){e.split(/\s+/).forEach(n=>n&&t.classList.remove(n));const r=t[Hn];r&&(r.delete(e),r.size||(t[Hn]=void 0))}function ba(t){requestAnimationFrame(()=>{requestAnimationFrame(t)})}let _f=0;function _a(t,e,r,n){const s=t._endId=++_f,i=()=>{s===t._endId&&n()};if(r!=null)return setTimeout(i,r);const{type:o,timeout:a,propCount:l}=wf(t,e);if(!o)return n();const c=o+"end";let u=0;const h=()=>{t.removeEventListener(c,d),i()},d=f=>{f.target===t&&++u>=l&&h()};setTimeout(()=>{u<l&&h()},a+1),t.addEventListener(c,d)}function wf(t,e){const r=window.getComputedStyle(t),n=p=>(r[p]||"").split(", "),s=n(`${nr}Delay`),i=n(`${nr}Duration`),o=wa(s,i),a=n(`${dn}Delay`),l=n(`${dn}Duration`),c=wa(a,l);let u=null,h=0,d=0;e===nr?o>0&&(u=nr,h=o,d=i.length):e===dn?c>0&&(u=dn,h=c,d=l.length):(h=Math.max(o,c),u=h>0?o>c?nr:dn:null,d=u?u===nr?i.length:l.length:0);const f=u===nr&&/\b(?:transform|all)(?:,|$)/.test(n(`${nr}Property`).toString());return{type:u,timeout:h,propCount:d,hasTransform:f}}function wa(t,e){for(;t.length<e.length;)t=t.concat(t);return Math.max(...e.map((r,n)=>ka(r)+ka(t[n])))}function ka(t){return t==="auto"?0:Number(t.slice(0,-1).replace(",","."))*1e3}function Sa(t){return(t?t.ownerDocument:document).body.offsetHeight}function kf(t,e,r){const n=t[Hn];n&&(e=(e?[e,...n]:[...n]).join(" ")),e==null?t.removeAttribute("class"):r?t.setAttribute("class",e):t.className=e}const Ea=Symbol("_vod"),Sf=Symbol("_vsh"),Ef=Symbol(""),Tf=/(?:^|;)\s*display\s*:/;function Af(t,e,r){const n=t.style,s=Te(r);let i=!1;if(r&&!s){if(e)if(Te(e))for(const o of e.split(";")){const a=o.slice(0,o.indexOf(":")).trim();r[a]==null&&bn(n,a,"")}else for(const o in e)r[o]==null&&bn(n,o,"");for(const o in r){o==="display"&&(i=!0);const a=r[o];a!=null?Rf(t,o,!Te(e)&&e?e[o]:void 0,a)||bn(n,o,a):bn(n,o,"")}}else if(s){if(e!==r){const o=n[Ef];o&&(r+=";"+o),n.cssText=r,i=Tf.test(r)}}else e&&t.removeAttribute("style");Ea in t&&(t[Ea]=i?n.display:"",t[Sf]&&(n.display="none"))}const Ta=/\s*!important$/;function bn(t,e,r){if(F(r))r.forEach(n=>bn(t,e,n));else if(r==null&&(r=""),e.startsWith("--"))t.setProperty(e,r);else{const n=xf(t,e);Ta.test(r)?t.setProperty(fr(n),r.replace(Ta,""),"important"):t[n]=r}}const Aa=["Webkit","Moz","ms"],wi={};function xf(t,e){const r=wi[e];if(r)return r;let n=et(e);if(n!=="filter"&&n in t)return wi[e]=n;n=Fs(n);for(let s=0;s<Aa.length;s++){const i=Aa[s]+n;if(i in t)return wi[e]=i}return e}function Rf(t,e,r,n){return t.tagName==="TEXTAREA"&&(e==="width"||e==="height")&&Te(n)&&r===n}const xa="http://www.w3.org/1999/xlink";function Ra(t,e,r,n,s,i=Th(e)){n&&e.startsWith("xlink:")?r==null?t.removeAttributeNS(xa,e.slice(6,e.length)):t.setAttributeNS(xa,e,r):r==null||i&&!Gl(r)?t.removeAttribute(e):t.setAttribute(e,i?"":pt(r)?String(r):r)}function Ca(t,e,r,n,s){if(e==="innerHTML"||e==="textContent"){r!=null&&(t[e]=e==="innerHTML"?iu(r):r);return}const i=t.tagName;if(e==="value"&&i!=="PROGRESS"&&!i.includes("-")){const a=i==="OPTION"?t.getAttribute("value")||"":t.value,l=r==null?t.type==="checkbox"?"on":"":String(r);(a!==l||!("_value"in t))&&(t.value=l),r==null&&t.removeAttribute(e),t._value=r;return}let o=!1;if(r===""||r==null){const a=typeof t[e];a==="boolean"?r=Gl(r):r==null&&a==="string"?(r="",o=!0):a==="number"&&(r=0,o=!0)}try{t[e]=r}catch{}o&&t.removeAttribute(s||e)}function lr(t,e,r,n){t.addEventListener(e,r,n)}function Cf(t,e,r,n){t.removeEventListener(e,r,n)}const Oa=Symbol("_vei");function Of(t,e,r,n,s=null){const i=t[Oa]||(t[Oa]={}),o=i[e];if(n&&o)o.value=n;else{const[a,l]=Pf(e);if(n){const c=i[e]=jf(n,s);lr(t,a,c,l)}else o&&(Cf(t,a,o,l),i[e]=void 0)}}const Pa=/(?:Once|Passive|Capture)$/;function Pf(t){let e;if(Pa.test(t)){e={};let n;for(;n=t.match(Pa);)t=t.slice(0,t.length-n[0].length),e[n[0].toLowerCase()]=!0}return[t[2]===":"?t.slice(3):fr(t.slice(2)),e]}let ki=0;const If=Promise.resolve(),$f=()=>ki||(If.then(()=>ki=0),ki=Date.now());function jf(t,e){const r=n=>{if(!n._vts)n._vts=Date.now();else if(n._vts<=r.attached)return;_t(Nf(n,r.value),e,5,[n])};return r.value=t,r.attached=$f(),r}function Nf(t,e){if(F(e)){const r=t.stopImmediatePropagation;return t.stopImmediatePropagation=()=>{r.call(t),t._stopped=!0},e.map(n=>s=>!s._stopped&&n&&n(s))}else return e}const Ia=t=>t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&t.charCodeAt(2)>96&&t.charCodeAt(2)<123,Lf=(t,e,r,n,s,i)=>{const o=s==="svg";e==="class"?kf(t,n,o):e==="style"?Af(t,r,n):Bs(e)?Ms(e)||Of(t,e,r,n,i):(e[0]==="."?(e=e.slice(1),!0):e[0]==="^"?(e=e.slice(1),!1):Df(t,e,n,o))?(Ca(t,e,n),!t.tagName.includes("-")&&(e==="value"||e==="checked"||e==="selected")&&Ra(t,e,n,o,i,e!=="value")):t._isVueCE&&(Uf(t,e)||t._def.__asyncLoader&&(/[A-Z]/.test(e)||!Te(n)))?Ca(t,et(e),n,i,e):(e==="true-value"?t._trueValue=n:e==="false-value"&&(t._falseValue=n),Ra(t,e,n,o))};function Df(t,e,r,n){if(n)return!!(e==="innerHTML"||e==="textContent"||e in t&&Ia(e)&&ee(r));if(e==="spellcheck"||e==="draggable"||e==="translate"||e==="autocorrect"||e==="sandbox"&&t.tagName==="IFRAME"||e==="form"||e==="list"&&t.tagName==="INPUT"||e==="type"&&t.tagName==="TEXTAREA")return!1;if(e==="width"||e==="height"){const s=t.tagName;if(s==="IMG"||s==="VIDEO"||s==="CANVAS"||s==="SOURCE")return!1}return Ia(e)&&Te(r)?!1:e in t}function Uf(t,e){const r=t._def.props;if(!r)return!1;const n=et(e);return Array.isArray(r)?r.some(s=>et(s)===n):Object.keys(r).some(s=>et(s)===n)}const en=t=>{const e=t.props["onUpdate:modelValue"]||!1;return F(e)?r=>ms(e,r):e};function Bf(t){t.target.composing=!0}function $a(t){const e=t.target;e.composing&&(e.composing=!1,e.dispatchEvent(new Event("input")))}const Xt=Symbol("_assign");function ja(t,e,r){return e&&(t=t.trim()),r&&(t=Vs(t)),t}const Mf={created(t,{modifiers:{lazy:e,trim:r,number:n}},s){t[Xt]=en(s);const i=n||s.props&&s.props.type==="number";lr(t,e?"change":"input",o=>{o.target.composing||t[Xt](ja(t.value,r,i))}),(r||i)&&lr(t,"change",()=>{t.value=ja(t.value,r,i)}),e||(lr(t,"compositionstart",Bf),lr(t,"compositionend",$a),lr(t,"change",$a))},mounted(t,{value:e}){t.value=e??""},beforeUpdate(t,{value:e,oldValue:r,modifiers:{lazy:n,trim:s,number:i}},o){if(t[Xt]=en(o),t.composing)return;const a=(i||t.type==="number")&&!/^0\d/.test(t.value)?Vs(t.value):t.value,l=e??"";if(a===l)return;const c=t.getRootNode();(c instanceof Document||c instanceof ShadowRoot)&&c.activeElement===t&&t.type!=="range"&&(n&&e===r||s&&t.value.trim()===l)||(t.value=l)}},d_={deep:!0,created(t,e,r){t[Xt]=en(r),lr(t,"change",()=>{const n=t._modelValue,s=qn(t),i=t.checked,o=t[Xt];if(F(n)){const a=vo(n,s),l=a!==-1;if(i&&!l)o(n.concat(s));else if(!i&&l){const c=[...n];c.splice(a,1),o(c)}}else if(sn(n)){const a=new Set(n);i?a.add(s):a.delete(s),o(a)}else o(au(t,i))})},mounted:Na,beforeUpdate(t,e,r){t[Xt]=en(r),Na(t,e,r)}};function Na(t,{value:e,oldValue:r},n){t._modelValue=e;let s;if(F(e))s=vo(e,n.props.value)>-1;else if(sn(e))s=e.has(n.props.value);else{if(e===r)return;s=on(e,au(t,!0))}t.checked!==s&&(t.checked=s)}const f_={deep:!0,created(t,{value:e,modifiers:{number:r}},n){const s=sn(e);lr(t,"change",()=>{const i=Array.prototype.filter.call(t.options,o=>o.selected).map(o=>r?Vs(qn(o)):qn(o));t[Xt](t.multiple?s?new Set(i):i:i[0]),t._assigning=!0,hr(()=>{t._assigning=!1})}),t[Xt]=en(n)},mounted(t,{value:e}){La(t,e)},beforeUpdate(t,e,r){t[Xt]=en(r)},updated(t,{value:e}){t._assigning||La(t,e)}};function La(t,e){const r=t.multiple,n=F(e);if(!(r&&!n&&!sn(e))){for(let s=0,i=t.options.length;s<i;s++){const o=t.options[s],a=qn(o);if(r)if(n){const l=typeof a;l==="string"||l==="number"?o.selected=e.some(c=>String(c)===String(a)):o.selected=vo(e,a)>-1}else o.selected=e.has(a);else if(on(qn(o),e)){t.selectedIndex!==s&&(t.selectedIndex=s);return}}!r&&t.selectedIndex!==-1&&(t.selectedIndex=-1)}}function qn(t){return"_value"in t?t._value:t.value}function au(t,e){const r=e?"_trueValue":"_falseValue";return r in t?t[r]:e}const Hf=["ctrl","shift","alt","meta"],qf={stop:t=>t.stopPropagation(),prevent:t=>t.preventDefault(),self:t=>t.target!==t.currentTarget,ctrl:t=>!t.ctrlKey,shift:t=>!t.shiftKey,alt:t=>!t.altKey,meta:t=>!t.metaKey,left:t=>"button"in t&&t.button!==0,middle:t=>"button"in t&&t.button!==1,right:t=>"button"in t&&t.button!==2,exact:(t,e)=>Hf.some(r=>t[`${r}Key`]&&!e.includes(r))},p_=(t,e)=>{if(!t)return t;const r=t._withMods||(t._withMods={}),n=e.join(".");return r[n]||(r[n]=((s,...i)=>{for(let o=0;o<e.length;o++){const a=qf[e[o]];if(a&&a(s,e))return}return t(s,...i)}))},Ff={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},g_=(t,e)=>{const r=t._withKeys||(t._withKeys={}),n=e.join(".");return r[n]||(r[n]=(s=>{if(!("key"in s))return;const i=fr(s.key);if(e.some(o=>o===i||Ff[o]===i))return t(s)}))},Vf=Ue({patchProp:Lf},pf);let Da;function zf(){return Da||(Da=Wd(Vf))}const Wf=((...t)=>{const e=zf().createApp(...t),{mount:r}=e;return e.mount=n=>{const s=Gf(n);if(!s)return;const i=e._component;!ee(i)&&!i.render&&!i.template&&(i.template=s.innerHTML),s.nodeType===1&&(s.textContent="");const o=r(s,!1,Kf(s));return s instanceof Element&&(s.removeAttribute("v-cloak"),s.setAttribute("data-v-app","")),o},e});function Kf(t){if(t instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&t instanceof MathMLElement)return"mathml"}function Gf(t){return Te(t)?document.querySelector(t):t}/*!
|
|
18
|
+
**/let zi;const ma=typeof window<"u"&&window.trustedTypes;if(ma)try{zi=ma.createPolicy("vue",{createHTML:t=>t})}catch{}const iu=zi?t=>zi.createHTML(t):t=>t,df="http://www.w3.org/2000/svg",ff="http://www.w3.org/1998/Math/MathML",Ht=typeof document<"u"?document:null,ya=Ht&&Ht.createElement("template"),pf={insert:(t,e,r)=>{e.insertBefore(t,r||null)},remove:t=>{const e=t.parentNode;e&&e.removeChild(t)},createElement:(t,e,r,n)=>{const s=e==="svg"?Ht.createElementNS(df,t):e==="mathml"?Ht.createElementNS(ff,t):r?Ht.createElement(t,{is:r}):Ht.createElement(t);return t==="select"&&n&&n.multiple!=null&&s.setAttribute("multiple",n.multiple),s},createText:t=>Ht.createTextNode(t),createComment:t=>Ht.createComment(t),setText:(t,e)=>{t.nodeValue=e},setElementText:(t,e)=>{t.textContent=e},parentNode:t=>t.parentNode,nextSibling:t=>t.nextSibling,querySelector:t=>Ht.querySelector(t),setScopeId(t,e){t.setAttribute(e,"")},insertStaticContent(t,e,r,n,s,i){const o=r?r.previousSibling:e.lastChild;if(s&&(s===i||s.nextSibling))for(;e.insertBefore(s.cloneNode(!0),r),!(s===i||!(s=s.nextSibling)););else{ya.innerHTML=iu(n==="svg"?`<svg>${t}</svg>`:n==="mathml"?`<math>${t}</math>`:t);const a=ya.content;if(n==="svg"||n==="mathml"){const l=a.firstChild;for(;l.firstChild;)a.appendChild(l.firstChild);a.removeChild(l)}e.insertBefore(a,r)}return[o?o.nextSibling:e.firstChild,r?r.previousSibling:e.lastChild]}},nr="transition",dn="animation",Hn=Symbol("_vtc"),ou={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},gf=Ue({},Tc,ou),mf=t=>(t.displayName="Transition",t.props=gf,t),yf=mf((t,{slots:e})=>Qr(pd,vf(t),e)),vr=(t,e=[])=>{F(t)?t.forEach(r=>r(...e)):t&&t(...e)},va=t=>t?F(t)?t.some(e=>e.length>1):t.length>1:!1;function vf(t){const e={};for(const O in t)O in ou||(e[O]=t[O]);if(t.css===!1)return e;const{name:r="v",type:n,duration:s,enterFromClass:i=`${r}-enter-from`,enterActiveClass:o=`${r}-enter-active`,enterToClass:a=`${r}-enter-to`,appearFromClass:l=i,appearActiveClass:c=o,appearToClass:u=a,leaveFromClass:h=`${r}-leave-from`,leaveActiveClass:d=`${r}-leave-active`,leaveToClass:f=`${r}-leave-to`}=t,p=bf(s),y=p&&p[0],w=p&&p[1],{onBeforeEnter:k,onEnter:_,onEnterCancelled:b,onLeave:x,onLeaveCancelled:D,onBeforeAppear:M=k,onAppear:U=_,onAppearCancelled:V=b}=e,C=(O,Y,Ee,Ne)=>{O._enterCancelled=Ne,br(O,Y?u:a),br(O,Y?c:o),Ee&&Ee()},z=(O,Y)=>{O._isLeaving=!1,br(O,h),br(O,f),br(O,d),Y&&Y()},Q=O=>(Y,Ee)=>{const Ne=O?U:_,ye=()=>C(Y,O,Ee);vr(Ne,[Y,ye]),ba(()=>{br(Y,O?l:i),Ut(Y,O?u:a),va(Ne)||_a(Y,n,y,ye)})};return Ue(e,{onBeforeEnter(O){vr(k,[O]),Ut(O,i),Ut(O,o)},onBeforeAppear(O){vr(M,[O]),Ut(O,l),Ut(O,c)},onEnter:Q(!1),onAppear:Q(!0),onLeave(O,Y){O._isLeaving=!0;const Ee=()=>z(O,Y);Ut(O,h),O._enterCancelled?(Ut(O,d),Sa(O)):(Sa(O),Ut(O,d)),ba(()=>{O._isLeaving&&(br(O,h),Ut(O,f),va(x)||_a(O,n,w,Ee))}),vr(x,[O,Ee])},onEnterCancelled(O){C(O,!1,void 0,!0),vr(b,[O])},onAppearCancelled(O){C(O,!0,void 0,!0),vr(V,[O])},onLeaveCancelled(O){z(O),vr(D,[O])}})}function bf(t){if(t==null)return null;if(ge(t))return[_i(t.enter),_i(t.leave)];{const e=_i(t);return[e,e]}}function _i(t){return bh(t)}function Ut(t,e){e.split(/\s+/).forEach(r=>r&&t.classList.add(r)),(t[Hn]||(t[Hn]=new Set)).add(e)}function br(t,e){e.split(/\s+/).forEach(n=>n&&t.classList.remove(n));const r=t[Hn];r&&(r.delete(e),r.size||(t[Hn]=void 0))}function ba(t){requestAnimationFrame(()=>{requestAnimationFrame(t)})}let _f=0;function _a(t,e,r,n){const s=t._endId=++_f,i=()=>{s===t._endId&&n()};if(r!=null)return setTimeout(i,r);const{type:o,timeout:a,propCount:l}=wf(t,e);if(!o)return n();const c=o+"end";let u=0;const h=()=>{t.removeEventListener(c,d),i()},d=f=>{f.target===t&&++u>=l&&h()};setTimeout(()=>{u<l&&h()},a+1),t.addEventListener(c,d)}function wf(t,e){const r=window.getComputedStyle(t),n=p=>(r[p]||"").split(", "),s=n(`${nr}Delay`),i=n(`${nr}Duration`),o=wa(s,i),a=n(`${dn}Delay`),l=n(`${dn}Duration`),c=wa(a,l);let u=null,h=0,d=0;e===nr?o>0&&(u=nr,h=o,d=i.length):e===dn?c>0&&(u=dn,h=c,d=l.length):(h=Math.max(o,c),u=h>0?o>c?nr:dn:null,d=u?u===nr?i.length:l.length:0);const f=u===nr&&/\b(?:transform|all)(?:,|$)/.test(n(`${nr}Property`).toString());return{type:u,timeout:h,propCount:d,hasTransform:f}}function wa(t,e){for(;t.length<e.length;)t=t.concat(t);return Math.max(...e.map((r,n)=>ka(r)+ka(t[n])))}function ka(t){return t==="auto"?0:Number(t.slice(0,-1).replace(",","."))*1e3}function Sa(t){return(t?t.ownerDocument:document).body.offsetHeight}function kf(t,e,r){const n=t[Hn];n&&(e=(e?[e,...n]:[...n]).join(" ")),e==null?t.removeAttribute("class"):r?t.setAttribute("class",e):t.className=e}const Ea=Symbol("_vod"),Sf=Symbol("_vsh"),Ef=Symbol(""),Tf=/(?:^|;)\s*display\s*:/;function Af(t,e,r){const n=t.style,s=Te(r);let i=!1;if(r&&!s){if(e)if(Te(e))for(const o of e.split(";")){const a=o.slice(0,o.indexOf(":")).trim();r[a]==null&&bn(n,a,"")}else for(const o in e)r[o]==null&&bn(n,o,"");for(const o in r){o==="display"&&(i=!0);const a=r[o];a!=null?Rf(t,o,!Te(e)&&e?e[o]:void 0,a)||bn(n,o,a):bn(n,o,"")}}else if(s){if(e!==r){const o=n[Ef];o&&(r+=";"+o),n.cssText=r,i=Tf.test(r)}}else e&&t.removeAttribute("style");Ea in t&&(t[Ea]=i?n.display:"",t[Sf]&&(n.display="none"))}const Ta=/\s*!important$/;function bn(t,e,r){if(F(r))r.forEach(n=>bn(t,e,n));else if(r==null&&(r=""),e.startsWith("--"))t.setProperty(e,r);else{const n=xf(t,e);Ta.test(r)?t.setProperty(fr(n),r.replace(Ta,""),"important"):t[n]=r}}const Aa=["Webkit","Moz","ms"],wi={};function xf(t,e){const r=wi[e];if(r)return r;let n=et(e);if(n!=="filter"&&n in t)return wi[e]=n;n=Fs(n);for(let s=0;s<Aa.length;s++){const i=Aa[s]+n;if(i in t)return wi[e]=i}return e}function Rf(t,e,r,n){return t.tagName==="TEXTAREA"&&(e==="width"||e==="height")&&Te(n)&&r===n}const xa="http://www.w3.org/1999/xlink";function Ra(t,e,r,n,s,i=Th(e)){n&&e.startsWith("xlink:")?r==null?t.removeAttributeNS(xa,e.slice(6,e.length)):t.setAttributeNS(xa,e,r):r==null||i&&!Gl(r)?t.removeAttribute(e):t.setAttribute(e,i?"":pt(r)?String(r):r)}function Ca(t,e,r,n,s){if(e==="innerHTML"||e==="textContent"){r!=null&&(t[e]=e==="innerHTML"?iu(r):r);return}const i=t.tagName;if(e==="value"&&i!=="PROGRESS"&&!i.includes("-")){const a=i==="OPTION"?t.getAttribute("value")||"":t.value,l=r==null?t.type==="checkbox"?"on":"":String(r);(a!==l||!("_value"in t))&&(t.value=l),r==null&&t.removeAttribute(e),t._value=r;return}let o=!1;if(r===""||r==null){const a=typeof t[e];a==="boolean"?r=Gl(r):r==null&&a==="string"?(r="",o=!0):a==="number"&&(r=0,o=!0)}try{t[e]=r}catch{}o&&t.removeAttribute(s||e)}function lr(t,e,r,n){t.addEventListener(e,r,n)}function Cf(t,e,r,n){t.removeEventListener(e,r,n)}const Oa=Symbol("_vei");function Of(t,e,r,n,s=null){const i=t[Oa]||(t[Oa]={}),o=i[e];if(n&&o)o.value=n;else{const[a,l]=Pf(e);if(n){const c=i[e]=jf(n,s);lr(t,a,c,l)}else o&&(Cf(t,a,o,l),i[e]=void 0)}}const Pa=/(?:Once|Passive|Capture)$/;function Pf(t){let e;if(Pa.test(t)){e={};let n;for(;n=t.match(Pa);)t=t.slice(0,t.length-n[0].length),e[n[0].toLowerCase()]=!0}return[t[2]===":"?t.slice(3):fr(t.slice(2)),e]}let ki=0;const If=Promise.resolve(),$f=()=>ki||(If.then(()=>ki=0),ki=Date.now());function jf(t,e){const r=n=>{if(!n._vts)n._vts=Date.now();else if(n._vts<=r.attached)return;_t(Nf(n,r.value),e,5,[n])};return r.value=t,r.attached=$f(),r}function Nf(t,e){if(F(e)){const r=t.stopImmediatePropagation;return t.stopImmediatePropagation=()=>{r.call(t),t._stopped=!0},e.map(n=>s=>!s._stopped&&n&&n(s))}else return e}const Ia=t=>t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&t.charCodeAt(2)>96&&t.charCodeAt(2)<123,Lf=(t,e,r,n,s,i)=>{const o=s==="svg";e==="class"?kf(t,n,o):e==="style"?Af(t,r,n):Bs(e)?Ms(e)||Of(t,e,r,n,i):(e[0]==="."?(e=e.slice(1),!0):e[0]==="^"?(e=e.slice(1),!1):Df(t,e,n,o))?(Ca(t,e,n),!t.tagName.includes("-")&&(e==="value"||e==="checked"||e==="selected")&&Ra(t,e,n,o,i,e!=="value")):t._isVueCE&&(Uf(t,e)||t._def.__asyncLoader&&(/[A-Z]/.test(e)||!Te(n)))?Ca(t,et(e),n,i,e):(e==="true-value"?t._trueValue=n:e==="false-value"&&(t._falseValue=n),Ra(t,e,n,o))};function Df(t,e,r,n){if(n)return!!(e==="innerHTML"||e==="textContent"||e in t&&Ia(e)&&ee(r));if(e==="spellcheck"||e==="draggable"||e==="translate"||e==="autocorrect"||e==="sandbox"&&t.tagName==="IFRAME"||e==="form"||e==="list"&&t.tagName==="INPUT"||e==="type"&&t.tagName==="TEXTAREA")return!1;if(e==="width"||e==="height"){const s=t.tagName;if(s==="IMG"||s==="VIDEO"||s==="CANVAS"||s==="SOURCE")return!1}return Ia(e)&&Te(r)?!1:e in t}function Uf(t,e){const r=t._def.props;if(!r)return!1;const n=et(e);return Array.isArray(r)?r.some(s=>et(s)===n):Object.keys(r).some(s=>et(s)===n)}const en=t=>{const e=t.props["onUpdate:modelValue"]||!1;return F(e)?r=>ms(e,r):e};function Bf(t){t.target.composing=!0}function $a(t){const e=t.target;e.composing&&(e.composing=!1,e.dispatchEvent(new Event("input")))}const Xt=Symbol("_assign");function ja(t,e,r){return e&&(t=t.trim()),r&&(t=Vs(t)),t}const Mf={created(t,{modifiers:{lazy:e,trim:r,number:n}},s){t[Xt]=en(s);const i=n||s.props&&s.props.type==="number";lr(t,e?"change":"input",o=>{o.target.composing||t[Xt](ja(t.value,r,i))}),(r||i)&&lr(t,"change",()=>{t.value=ja(t.value,r,i)}),e||(lr(t,"compositionstart",Bf),lr(t,"compositionend",$a),lr(t,"change",$a))},mounted(t,{value:e}){t.value=e??""},beforeUpdate(t,{value:e,oldValue:r,modifiers:{lazy:n,trim:s,number:i}},o){if(t[Xt]=en(o),t.composing)return;const a=(i||t.type==="number")&&!/^0\d/.test(t.value)?Vs(t.value):t.value,l=e??"";if(a===l)return;const c=t.getRootNode();(c instanceof Document||c instanceof ShadowRoot)&&c.activeElement===t&&t.type!=="range"&&(n&&e===r||s&&t.value.trim()===l)||(t.value=l)}},d_={deep:!0,created(t,e,r){t[Xt]=en(r),lr(t,"change",()=>{const n=t._modelValue,s=qn(t),i=t.checked,o=t[Xt];if(F(n)){const a=vo(n,s),l=a!==-1;if(i&&!l)o(n.concat(s));else if(!i&&l){const c=[...n];c.splice(a,1),o(c)}}else if(sn(n)){const a=new Set(n);i?a.add(s):a.delete(s),o(a)}else o(au(t,i))})},mounted:Na,beforeUpdate(t,e,r){t[Xt]=en(r),Na(t,e,r)}};function Na(t,{value:e,oldValue:r},n){t._modelValue=e;let s;if(F(e))s=vo(e,n.props.value)>-1;else if(sn(e))s=e.has(n.props.value);else{if(e===r)return;s=on(e,au(t,!0))}t.checked!==s&&(t.checked=s)}const f_={deep:!0,created(t,{value:e,modifiers:{number:r}},n){const s=sn(e);lr(t,"change",()=>{const i=Array.prototype.filter.call(t.options,o=>o.selected).map(o=>r?Vs(qn(o)):qn(o));t[Xt](t.multiple?s?new Set(i):i:i[0]),t._assigning=!0,hr(()=>{t._assigning=!1})}),t[Xt]=en(n)},mounted(t,{value:e}){La(t,e)},beforeUpdate(t,e,r){t[Xt]=en(r)},updated(t,{value:e}){t._assigning||La(t,e)}};function La(t,e){const r=t.multiple,n=F(e);if(!(r&&!n&&!sn(e))){for(let s=0,i=t.options.length;s<i;s++){const o=t.options[s],a=qn(o);if(r)if(n){const l=typeof a;l==="string"||l==="number"?o.selected=e.some(c=>String(c)===String(a)):o.selected=vo(e,a)>-1}else o.selected=e.has(a);else if(on(qn(o),e)){t.selectedIndex!==s&&(t.selectedIndex=s);return}}!r&&t.selectedIndex!==-1&&(t.selectedIndex=-1)}}function qn(t){return"_value"in t?t._value:t.value}function au(t,e){const r=e?"_trueValue":"_falseValue";return r in t?t[r]:e}const Hf=["ctrl","shift","alt","meta"],qf={stop:t=>t.stopPropagation(),prevent:t=>t.preventDefault(),self:t=>t.target!==t.currentTarget,ctrl:t=>!t.ctrlKey,shift:t=>!t.shiftKey,alt:t=>!t.altKey,meta:t=>!t.metaKey,left:t=>"button"in t&&t.button!==0,middle:t=>"button"in t&&t.button!==1,right:t=>"button"in t&&t.button!==2,exact:(t,e)=>Hf.some(r=>t[`${r}Key`]&&!e.includes(r))},p_=(t,e)=>{if(!t)return t;const r=t._withMods||(t._withMods={}),n=e.join(".");return r[n]||(r[n]=((s,...i)=>{for(let o=0;o<e.length;o++){const a=qf[e[o]];if(a&&a(s,e))return}return t(s,...i)}))},Ff={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},g_=(t,e)=>{const r=t._withKeys||(t._withKeys={}),n=e.join(".");return r[n]||(r[n]=(s=>{if(!("key"in s))return;const i=fr(s.key);if(e.some(o=>o===i||Ff[o]===i))return t(s)}))},Vf=Ue({patchProp:Lf},pf);let Da;function zf(){return Da||(Da=Wd(Vf))}const Wf=((...t)=>{const e=zf().createApp(...t),{mount:r}=e;return e.mount=n=>{const s=Gf(n);if(!s)return;const i=e._component;!ee(i)&&!i.render&&!i.template&&(i.template=s.innerHTML),s.nodeType===1&&(s.textContent="");const o=r(s,!1,Kf(s));return s instanceof Element&&(s.removeAttribute("v-cloak"),s.setAttribute("data-v-app","")),o},e});function Kf(t){if(t instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&t instanceof MathMLElement)return"mathml"}function Gf(t){return Te(t)?document.querySelector(t):t}/*!
|
|
19
19
|
* pinia v3.0.4
|
|
20
20
|
* (c) 2025 Eduardo San Martin Morote
|
|
21
21
|
* @license MIT
|
|
22
|
-
*/let lu;const ri=t=>lu=t,cu=Symbol();function Wi(t){return t&&typeof t=="object"&&Object.prototype.toString.call(t)==="[object Object]"&&typeof t.toJSON!="function"}var Cn;(function(t){t.direct="direct",t.patchObject="patch object",t.patchFunction="patch function"})(Cn||(Cn={}));function Jf(){const t=Zl(!0),e=t.run(()=>Oe({}));let r=[],n=[];const s=To({install(i){ri(s),s._a=i,i.provide(cu,s),i.config.globalProperties.$pinia=s,n.forEach(o=>r.push(o)),n=[]},use(i){return this._a?r.push(i):n.push(i),this},_p:r,_a:null,_e:t,_s:new Map,state:e});return s}const uu=()=>{};function Ua(t,e,r,n=uu){t.add(e);const s=()=>{t.delete(e)&&n()};return!r&&Ql()&&xh(s),s}function $r(t,...e){t.forEach(r=>{r(...e)})}const Yf=t=>t(),Ba=Symbol(),Si=Symbol();function Ki(t,e){t instanceof Map&&e instanceof Map?e.forEach((r,n)=>t.set(n,r)):t instanceof Set&&e instanceof Set&&e.forEach(t.add,t);for(const r in e){if(!e.hasOwnProperty(r))continue;const n=e[r],s=t[r];Wi(s)&&Wi(n)&&t.hasOwnProperty(r)&&!Ce(n)&&!Yt(n)?t[r]=Ki(s,n):t[r]=n}return t}const Xf=Symbol();function Zf(t){return!Wi(t)||!Object.prototype.hasOwnProperty.call(t,Xf)}const{assign:ir}=Object;function Qf(t){return!!(Ce(t)&&t.effect)}function ep(t,e,r,n){const{state:s,actions:i,getters:o}=e,a=r.state.value[t];let l;function c(){a||(r.state.value[t]=s?s():{});const u=Yh(r.state.value[t]);return ir(u,i,Object.keys(o||{}).reduce((h,d)=>(h[d]=To(
|
|
22
|
+
*/let lu;const ri=t=>lu=t,cu=Symbol();function Wi(t){return t&&typeof t=="object"&&Object.prototype.toString.call(t)==="[object Object]"&&typeof t.toJSON!="function"}var Cn;(function(t){t.direct="direct",t.patchObject="patch object",t.patchFunction="patch function"})(Cn||(Cn={}));function Jf(){const t=Zl(!0),e=t.run(()=>Oe({}));let r=[],n=[];const s=To({install(i){ri(s),s._a=i,i.provide(cu,s),i.config.globalProperties.$pinia=s,n.forEach(o=>r.push(o)),n=[]},use(i){return this._a?r.push(i):n.push(i),this},_p:r,_a:null,_e:t,_s:new Map,state:e});return s}const uu=()=>{};function Ua(t,e,r,n=uu){t.add(e);const s=()=>{t.delete(e)&&n()};return!r&&Ql()&&xh(s),s}function $r(t,...e){t.forEach(r=>{r(...e)})}const Yf=t=>t(),Ba=Symbol(),Si=Symbol();function Ki(t,e){t instanceof Map&&e instanceof Map?e.forEach((r,n)=>t.set(n,r)):t instanceof Set&&e instanceof Set&&e.forEach(t.add,t);for(const r in e){if(!e.hasOwnProperty(r))continue;const n=e[r],s=t[r];Wi(s)&&Wi(n)&&t.hasOwnProperty(r)&&!Ce(n)&&!Yt(n)?t[r]=Ki(s,n):t[r]=n}return t}const Xf=Symbol();function Zf(t){return!Wi(t)||!Object.prototype.hasOwnProperty.call(t,Xf)}const{assign:ir}=Object;function Qf(t){return!!(Ce(t)&&t.effect)}function ep(t,e,r,n){const{state:s,actions:i,getters:o}=e,a=r.state.value[t];let l;function c(){a||(r.state.value[t]=s?s():{});const u=Yh(r.state.value[t]);return ir(u,i,Object.keys(o||{}).reduce((h,d)=>(h[d]=To(je(()=>{ri(r);const f=r._s.get(t);return o[d].call(f,f)})),h),{}))}return l=hu(t,c,e,r,n,!0),l}function hu(t,e,r={},n,s,i){let o;const a=ir({actions:{}},r),l={deep:!0};let c,u,h=new Set,d=new Set,f;const p=n.state.value[t];!i&&!p&&(n.state.value[t]={});let y;function w(V){let C;c=u=!1,typeof V=="function"?(V(n.state.value[t]),C={type:Cn.patchFunction,storeId:t,events:f}):(Ki(n.state.value[t],V),C={type:Cn.patchObject,payload:V,storeId:t,events:f});const z=y=Symbol();hr().then(()=>{y===z&&(c=!0)}),u=!0,$r(h,C,n.state.value[t])}const k=i?function(){const{state:C}=r,z=C?C():{};this.$patch(Q=>{ir(Q,z)})}:uu;function _(){o.stop(),h.clear(),d.clear(),n._s.delete(t)}const b=(V,C="")=>{if(Ba in V)return V[Si]=C,V;const z=function(){ri(n);const Q=Array.from(arguments),O=new Set,Y=new Set;function Ee(te){O.add(te)}function Ne(te){Y.add(te)}$r(d,{args:Q,name:z[Si],store:D,after:Ee,onError:Ne});let ye;try{ye=V.apply(this&&this.$id===t?this:D,Q)}catch(te){throw $r(Y,te),te}return ye instanceof Promise?ye.then(te=>($r(O,te),te)).catch(te=>($r(Y,te),Promise.reject(te))):($r(O,ye),ye)};return z[Ba]=!0,z[Si]=C,z},x={_p:n,$id:t,$onAction:Ua.bind(null,d),$patch:w,$reset:k,$subscribe(V,C={}){const z=Ua(h,V,C.detached,()=>Q()),Q=o.run(()=>Kt(()=>n.state.value[t],O=>{(C.flush==="sync"?u:c)&&V({storeId:t,type:Cn.direct,events:f},O)},ir({},l,C)));return z},$dispose:_},D=Xn(x);n._s.set(t,D);const U=(n._a&&n._a.runWithContext||Yf)(()=>n._e.run(()=>(o=Zl()).run(()=>e({action:b}))));for(const V in U){const C=U[V];if(Ce(C)&&!Qf(C)||Yt(C))i||(p&&Zf(C)&&(Ce(C)?C.value=p[V]:Ki(C,p[V])),n.state.value[t][V]=C);else if(typeof C=="function"){const z=b(C,V);U[V]=z,a.actions[V]=C}}return ir(D,U),ir(le(D),U),Object.defineProperty(D,"$state",{get:()=>n.state.value[t],set:V=>{w(C=>{ir(C,V)})}}),n._p.forEach(V=>{ir(D,o.run(()=>V({store:D,app:n._a,pinia:n,options:a})))}),p&&i&&r.hydrate&&r.hydrate(D.$state,p),c=!0,u=!0,D}/*! #__NO_SIDE_EFFECTS__ */function du(t,e,r){let n;const s=typeof e=="function";n=s?r:e;function i(o,a){const l=ad();return o=o||(l?ft(cu,null):null),o&&ri(o),o=lu,o._s.has(t)||(s?hu(t,e,n,o):ep(t,n,o)),o._s.get(t)}return i.$id=t,i}/*!
|
|
23
23
|
* vue-router v4.6.4
|
|
24
24
|
* (c) 2025 Eduardo San Martin Morote
|
|
25
25
|
* @license MIT
|
|
@@ -27,7 +27,7 @@ var hh=Object.defineProperty;var dh=(t,e,r)=>e in t?hh(t,e,{enumerable:!0,config
|
|
|
27
27
|
* vue-router v4.6.4
|
|
28
28
|
* (c) 2025 Eduardo San Martin Morote
|
|
29
29
|
* @license MIT
|
|
30
|
-
*/let Np=()=>location.protocol+"//"+location.host;function ku(t,e){const{pathname:r,search:n,hash:s}=e,i=t.indexOf("#");if(i>-1){let o=s.includes(t.slice(i))?t.slice(i).length:1,a=s.slice(o);return a[0]!=="/"&&(a="/"+a),Ha(a,"")}return Ha(r,t)+n+s}function Lp(t,e,r,n){let s=[],i=[],o=null;const a=({state:d})=>{const f=ku(t,location),p=r.value,y=e.value;let w=0;if(d){if(r.value=f,e.value=d,o&&o===p){o=null;return}w=y?d.position-y.position:0}else n(f);s.forEach(k=>{k(r.value,p,{delta:w,type:Ji.pop,direction:w?w>0?Ai.forward:Ai.back:Ai.unknown})})};function l(){o=r.value}function c(d){s.push(d);const f=()=>{const p=s.indexOf(d);p>-1&&s.splice(p,1)};return i.push(f),f}function u(){if(document.visibilityState==="hidden"){const{history:d}=window;if(!d.state)return;d.replaceState(de({},d.state,{scroll:ni()}),"")}}function h(){for(const d of i)d();i=[],window.removeEventListener("popstate",a),window.removeEventListener("pagehide",u),document.removeEventListener("visibilitychange",u)}return window.addEventListener("popstate",a),window.addEventListener("pagehide",u),document.addEventListener("visibilitychange",u),{pauseListeners:l,listen:c,destroy:h}}function Wa(t,e,r,n=!1,s=!1){return{back:t,current:e,forward:r,replaced:n,position:window.history.length,scroll:s?ni():null}}function Dp(t){const{history:e,location:r}=window,n={value:ku(t,r)},s={value:e.state};s.value||i(n.value,{back:null,current:n.value,forward:null,position:e.length-1,replaced:!0,scroll:null},!0);function i(l,c,u){const h=t.indexOf("#"),d=h>-1?(r.host&&document.querySelector("base")?t:t.slice(h))+l:Np()+t+l;try{e[u?"replaceState":"pushState"](c,"",d),s.value=c}catch(f){console.error(f),r[u?"replace":"assign"](d)}}function o(l,c){i(l,de({},e.state,Wa(s.value.back,l,s.value.forward,!0),c,{position:s.value.position}),!0),n.value=l}function a(l,c){const u=de({},s.value,e.state,{forward:l,scroll:ni()});i(u.current,u,!0),i(l,de({},Wa(n.value,l,null),{position:u.position+1},c),!1),n.value=l}return{location:n,state:s,push:a,replace:o}}function Up(t){t=wp(t);const e=Dp(t),r=Lp(t,e.state,e.location,e.replace);function n(i,o=!0){o||r.pauseListeners(),history.go(i)}const s=de({location:"",base:t,go:n,createHref:Sp.bind(null,t)},e,r);return Object.defineProperty(s,"location",{enumerable:!0,get:()=>e.location.value}),Object.defineProperty(s,"state",{enumerable:!0,get:()=>e.state.value}),s}let Tr=(function(t){return t[t.Static=0]="Static",t[t.Param=1]="Param",t[t.Group=2]="Group",t})({});var Ne=(function(t){return t[t.Static=0]="Static",t[t.Param=1]="Param",t[t.ParamRegExp=2]="ParamRegExp",t[t.ParamRegExpEnd=3]="ParamRegExpEnd",t[t.EscapeNext=4]="EscapeNext",t})(Ne||{});const Bp={type:Tr.Static,value:""},Mp=/[a-zA-Z0-9_]/;function Hp(t){if(!t)return[[]];if(t==="/")return[[Bp]];if(!t.startsWith("/"))throw new Error(`Invalid path "${t}"`);function e(f){throw new Error(`ERR (${r})/"${c}": ${f}`)}let r=Ne.Static,n=r;const s=[];let i;function o(){i&&s.push(i),i=[]}let a=0,l,c="",u="";function h(){c&&(r===Ne.Static?i.push({type:Tr.Static,value:c}):r===Ne.Param||r===Ne.ParamRegExp||r===Ne.ParamRegExpEnd?(i.length>1&&(l==="*"||l==="+")&&e(`A repeatable param (${c}) must be alone in its segment. eg: '/:ids+.`),i.push({type:Tr.Param,value:c,regexp:u,repeatable:l==="*"||l==="+",optional:l==="*"||l==="?"})):e("Invalid state to consume buffer"),c="")}function d(){c+=l}for(;a<t.length;){if(l=t[a++],l==="\\"&&r!==Ne.ParamRegExp){n=r,r=Ne.EscapeNext;continue}switch(r){case Ne.Static:l==="/"?(c&&h(),o()):l===":"?(h(),r=Ne.Param):d();break;case Ne.EscapeNext:d(),r=n;break;case Ne.Param:l==="("?r=Ne.ParamRegExp:Mp.test(l)?d():(h(),r=Ne.Static,l!=="*"&&l!=="?"&&l!=="+"&&a--);break;case Ne.ParamRegExp:l===")"?u[u.length-1]=="\\"?u=u.slice(0,-1)+l:r=Ne.ParamRegExpEnd:u+=l;break;case Ne.ParamRegExpEnd:h(),r=Ne.Static,l!=="*"&&l!=="?"&&l!=="+"&&a--,u="";break;default:e("Unknown state");break}}return r===Ne.ParamRegExp&&e(`Unfinished custom RegExp for param "${c}"`),h(),o(),s}const Ka="[^/]+?",qp={sensitive:!1,strict:!1,start:!0,end:!0};var Je=(function(t){return t[t._multiplier=10]="_multiplier",t[t.Root=90]="Root",t[t.Segment=40]="Segment",t[t.SubSegment=30]="SubSegment",t[t.Static=40]="Static",t[t.Dynamic=20]="Dynamic",t[t.BonusCustomRegExp=10]="BonusCustomRegExp",t[t.BonusWildcard=-50]="BonusWildcard",t[t.BonusRepeatable=-20]="BonusRepeatable",t[t.BonusOptional=-8]="BonusOptional",t[t.BonusStrict=.7000000000000001]="BonusStrict",t[t.BonusCaseSensitive=.25]="BonusCaseSensitive",t})(Je||{});const Fp=/[.+*?^${}()[\]/\\]/g;function Vp(t,e){const r=de({},qp,e),n=[];let s=r.start?"^":"";const i=[];for(const c of t){const u=c.length?[]:[Je.Root];r.strict&&!c.length&&(s+="/");for(let h=0;h<c.length;h++){const d=c[h];let f=Je.Segment+(r.sensitive?Je.BonusCaseSensitive:0);if(d.type===Tr.Static)h||(s+="/"),s+=d.value.replace(Fp,"\\$&"),f+=Je.Static;else if(d.type===Tr.Param){const{value:p,repeatable:y,optional:w,regexp:k}=d;i.push({name:p,repeatable:y,optional:w});const _=k||Ka;if(_!==Ka){f+=Je.BonusCustomRegExp;try{`${_}`}catch(x){throw new Error(`Invalid custom RegExp for param "${p}" (${_}): `+x.message)}}let b=y?`((?:${_})(?:/(?:${_}))*)`:`(${_})`;h||(b=w&&c.length<2?`(?:/${b})`:"/"+b),w&&(b+="?"),s+=b,f+=Je.Dynamic,w&&(f+=Je.BonusOptional),y&&(f+=Je.BonusRepeatable),_===".*"&&(f+=Je.BonusWildcard)}u.push(f)}n.push(u)}if(r.strict&&r.end){const c=n.length-1;n[c][n[c].length-1]+=Je.BonusStrict}r.strict||(s+="/?"),r.end?s+="$":r.strict&&!s.endsWith("/")&&(s+="(?:/|$)");const o=new RegExp(s,r.sensitive?"":"i");function a(c){const u=c.match(o),h={};if(!u)return null;for(let d=1;d<u.length;d++){const f=u[d]||"",p=i[d-1];h[p.name]=f&&p.repeatable?f.split("/"):f}return h}function l(c){let u="",h=!1;for(const d of t){(!h||!u.endsWith("/"))&&(u+="/"),h=!1;for(const f of d)if(f.type===Tr.Static)u+=f.value;else if(f.type===Tr.Param){const{value:p,repeatable:y,optional:w}=f,k=p in c?c[p]:"";if(wt(k)&&!y)throw new Error(`Provided param "${p}" is an array but it is not repeatable (* or + modifiers)`);const _=wt(k)?k.join("/"):k;if(!_)if(w)d.length<2&&(u.endsWith("/")?u=u.slice(0,-1):h=!0);else throw new Error(`Missing required param "${p}"`);u+=_}}return u||"/"}return{re:o,score:n,keys:i,parse:a,stringify:l}}function zp(t,e){let r=0;for(;r<t.length&&r<e.length;){const n=e[r]-t[r];if(n)return n;r++}return t.length<e.length?t.length===1&&t[0]===Je.Static+Je.Segment?-1:1:t.length>e.length?e.length===1&&e[0]===Je.Static+Je.Segment?1:-1:0}function Su(t,e){let r=0;const n=t.score,s=e.score;for(;r<n.length&&r<s.length;){const i=zp(n[r],s[r]);if(i)return i;r++}if(Math.abs(s.length-n.length)===1){if(Ga(n))return 1;if(Ga(s))return-1}return s.length-n.length}function Ga(t){const e=t[t.length-1];return t.length>0&&e[e.length-1]<0}const Wp={strict:!1,end:!0,sensitive:!1};function Kp(t,e,r){const n=Vp(Hp(t.path),r),s=de(n,{record:t,parent:e,children:[],alias:[]});return e&&!s.record.aliasOf==!e.record.aliasOf&&e.children.push(s),s}function Gp(t,e){const r=[],n=new Map;e=Ma(Wp,e);function s(h){return n.get(h)}function i(h,d,f){const p=!f,y=Ya(h);y.aliasOf=f&&f.record;const w=Ma(e,h),k=[y];if("alias"in h){const x=typeof h.alias=="string"?[h.alias]:h.alias;for(const D of x)k.push(Ya(de({},y,{components:f?f.record.components:y.components,path:D,aliasOf:f?f.record:y})))}let _,b;for(const x of k){const{path:D}=x;if(d&&D[0]!=="/"){const M=d.record.path,U=M[M.length-1]==="/"?"":"/";x.path=d.record.path+(D&&U+D)}if(_=Kp(x,d,w),f?f.alias.push(_):(b=b||_,b!==_&&b.alias.push(_),p&&h.name&&!Xa(_)&&o(h.name)),Eu(_)&&l(_),y.children){const M=y.children;for(let U=0;U<M.length;U++)i(M[U],_,f&&f.children[U])}f=f||_}return b?()=>{o(b)}:On}function o(h){if(_u(h)){const d=n.get(h);d&&(n.delete(h),r.splice(r.indexOf(d),1),d.children.forEach(o),d.alias.forEach(o))}else{const d=r.indexOf(h);d>-1&&(r.splice(d,1),h.record.name&&n.delete(h.record.name),h.children.forEach(o),h.alias.forEach(o))}}function a(){return r}function l(h){const d=Xp(h,r);r.splice(d,0,h),h.record.name&&!Xa(h)&&n.set(h.record.name,h)}function c(h,d){let f,p={},y,w;if("name"in h&&h.name){if(f=n.get(h.name),!f)throw rn(xe.MATCHER_NOT_FOUND,{location:h});w=f.record.name,p=de(Ja(d.params,f.keys.filter(b=>!b.optional).concat(f.parent?f.parent.keys.filter(b=>b.optional):[]).map(b=>b.name)),h.params&&Ja(h.params,f.keys.map(b=>b.name))),y=f.stringify(p)}else if(h.path!=null)y=h.path,f=r.find(b=>b.re.test(y)),f&&(p=f.parse(y),w=f.record.name);else{if(f=d.name?n.get(d.name):r.find(b=>b.re.test(d.path)),!f)throw rn(xe.MATCHER_NOT_FOUND,{location:h,currentLocation:d});w=f.record.name,p=de({},d.params,h.params),y=f.stringify(p)}const k=[];let _=f;for(;_;)k.unshift(_.record),_=_.parent;return{name:w,path:y,params:p,matched:k,meta:Yp(k)}}t.forEach(h=>i(h));function u(){r.length=0,n.clear()}return{addRoute:i,resolve:c,removeRoute:o,clearRoutes:u,getRoutes:a,getRecordMatcher:s}}function Ja(t,e){const r={};for(const n of e)n in t&&(r[n]=t[n]);return r}function Ya(t){const e={path:t.path,redirect:t.redirect,name:t.name,meta:t.meta||{},aliasOf:t.aliasOf,beforeEnter:t.beforeEnter,props:Jp(t),children:t.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in t?t.components||null:t.component&&{default:t.component}};return Object.defineProperty(e,"mods",{value:{}}),e}function Jp(t){const e={},r=t.props||!1;if("component"in t)e.default=r;else for(const n in t.components)e[n]=typeof r=="object"?r[n]:r;return e}function Xa(t){for(;t;){if(t.record.aliasOf)return!0;t=t.parent}return!1}function Yp(t){return t.reduce((e,r)=>de(e,r.meta),{})}function Xp(t,e){let r=0,n=e.length;for(;r!==n;){const i=r+n>>1;Su(t,e[i])<0?n=i:r=i+1}const s=Zp(t);return s&&(n=e.lastIndexOf(s,n-1)),n}function Zp(t){let e=t;for(;e=e.parent;)if(Eu(e)&&Su(t,e)===0)return e}function Eu({record:t}){return!!(t.name||t.components&&Object.keys(t.components).length||t.redirect)}function Za(t){const e=ft(si),r=ft($o),n=$e(()=>{const l=re(t.to);return e.resolve(l)}),s=$e(()=>{const{matched:l}=n.value,{length:c}=l,u=l[c-1],h=r.matched;if(!u||!h.length)return-1;const d=h.findIndex(tn.bind(null,u));if(d>-1)return d;const f=Qa(l[c-2]);return c>1&&Qa(u)===f&&h[h.length-1].path!==f?h.findIndex(tn.bind(null,l[c-2])):d}),i=$e(()=>s.value>-1&&ng(r.params,n.value.params)),o=$e(()=>s.value>-1&&s.value===r.matched.length-1&&bu(r.params,n.value.params));function a(l={}){if(rg(l)){const c=e[re(t.replace)?"replace":"push"](re(t.to)).catch(On);return t.viewTransition&&typeof document<"u"&&"startViewTransition"in document&&document.startViewTransition(()=>c),c}return Promise.resolve()}return{route:n,href:$e(()=>n.value.href),isActive:i,isExactActive:o,navigate:a}}function Qp(t){return t.length===1?t[0]:t}const eg=pr({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"},viewTransition:Boolean},useLink:Za,setup(t,{slots:e}){const r=Xn(Za(t)),{options:n}=ft(si),s=$e(()=>({[el(t.activeClass,n.linkActiveClass,"router-link-active")]:r.isActive,[el(t.exactActiveClass,n.linkExactActiveClass,"router-link-exact-active")]:r.isExactActive}));return()=>{const i=e.default&&Qp(e.default(r));return t.custom?i:Qr("a",{"aria-current":r.isExactActive?t.ariaCurrentValue:null,href:r.href,onClick:r.navigate,class:s.value},i)}}}),tg=eg;function rg(t){if(!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)&&!t.defaultPrevented&&!(t.button!==void 0&&t.button!==0)){if(t.currentTarget&&t.currentTarget.getAttribute){const e=t.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(e))return}return t.preventDefault&&t.preventDefault(),!0}}function ng(t,e){for(const r in e){const n=e[r],s=t[r];if(typeof n=="string"){if(n!==s)return!1}else if(!wt(s)||s.length!==n.length||n.some((i,o)=>i.valueOf()!==s[o].valueOf()))return!1}return!0}function Qa(t){return t?t.aliasOf?t.aliasOf.path:t.path:""}const el=(t,e,r)=>t??e??r,sg=pr({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(t,{attrs:e,slots:r}){const n=ft(Xi),s=$e(()=>t.route||n.value),i=ft(za,0),o=$e(()=>{let c=re(i);const{matched:u}=s.value;let h;for(;(h=u[c])&&!h.components;)c++;return c}),a=$e(()=>s.value.matched[o.value]);ys(za,$e(()=>o.value+1)),ys($p,a),ys(Xi,s);const l=Oe();return Kt(()=>[l.value,a.value,t.name],([c,u,h],[d,f,p])=>{u&&(u.instances[h]=c,f&&f!==u&&c&&c===d&&(u.leaveGuards.size||(u.leaveGuards=f.leaveGuards),u.updateGuards.size||(u.updateGuards=f.updateGuards))),c&&u&&(!f||!tn(u,f)||!d)&&(u.enterCallbacks[h]||[]).forEach(y=>y(c))},{flush:"post"}),()=>{const c=s.value,u=t.name,h=a.value,d=h&&h.components[u];if(!d)return tl(r.default,{Component:d,route:c});const f=h.props[u],p=f?f===!0?c.params:typeof f=="function"?f(c):f:null,w=Qr(d,de({},p,e,{onVnodeUnmounted:k=>{k.component.isUnmounted&&(h.instances[u]=null)},ref:l}));return tl(r.default,{Component:w,route:c})||w}}});function tl(t,e){if(!t)return null;const r=t(e);return r.length===1?r[0]:r}const ig=sg;function og(t){const e=Gp(t.routes,t),r=t.parseQuery||Pp,n=t.stringifyQuery||Va,s=t.history,i=fn(),o=fn(),a=fn(),l=Kh(sr);let c=sr;Mr&&t.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const u=Ei.bind(null,T=>""+T),h=Ei.bind(null,pp),d=Ei.bind(null,Fn);function f(T,H){let N,W;return _u(T)?(N=e.getRecordMatcher(T),W=H):W=T,e.addRoute(W,N)}function p(T){const H=e.getRecordMatcher(T);H&&e.removeRoute(H)}function y(){return e.getRoutes().map(T=>T.record)}function w(T){return!!e.getRecordMatcher(T)}function k(T,H){if(H=de({},H||l.value),typeof T=="string"){const v=Ti(r,T,H.path),S=e.resolve({path:v.path},H),A=s.createHref(v.fullPath);return de(v,S,{params:d(S.params),hash:Fn(v.hash),redirectedFrom:void 0,href:A})}let N;if(T.path!=null)N=de({},T,{path:Ti(r,T.path,H.path).path});else{const v=de({},T.params);for(const S in v)v[S]==null&&delete v[S];N=de({},T,{params:h(v)}),H.params=h(H.params)}const W=e.resolve(N,H),oe=T.hash||"";W.params=u(d(W.params));const g=yp(n,de({},T,{hash:hp(oe),path:W.path})),m=s.createHref(g);return de({fullPath:g,hash:oe,query:n===Va?Ip(T.query):T.query||{}},W,{redirectedFrom:void 0,href:m})}function _(T){return typeof T=="string"?Ti(r,T,l.value.path):de({},T)}function b(T,H){if(c!==T)return rn(xe.NAVIGATION_CANCELLED,{from:H,to:T})}function x(T){return U(T)}function D(T){return x(de(_(T),{replace:!0}))}function M(T,H){const N=T.matched[T.matched.length-1];if(N&&N.redirect){const{redirect:W}=N;let oe=typeof W=="function"?W(T,H):W;return typeof oe=="string"&&(oe=oe.includes("?")||oe.includes("#")?oe=_(oe):{path:oe},oe.params={}),de({query:T.query,hash:T.hash,params:oe.path!=null?{}:T.params},oe)}}function U(T,H){const N=c=k(T),W=l.value,oe=T.state,g=T.force,m=T.replace===!0,v=M(N,W);if(v)return U(de(_(v),{state:typeof v=="object"?de({},oe,v.state):oe,force:g,replace:m}),H||N);const S=N;S.redirectedFrom=H;let A;return!g&&vp(n,W,N)&&(A=rn(xe.NAVIGATION_DUPLICATED,{to:S,from:W}),ie(W,W,!0,!1)),(A?Promise.resolve(A):z(S,W)).catch(E=>Bt(E)?Bt(E,xe.NAVIGATION_GUARD_REDIRECT)?E:We(E):L(E,S,W)).then(E=>{if(E){if(Bt(E,xe.NAVIGATION_GUARD_REDIRECT))return U(de({replace:m},_(E.to),{state:typeof E.to=="object"?de({},oe,E.to.state):oe,force:g}),H||S)}else E=O(S,W,!0,m,oe);return Q(S,W,E),E})}function V(T,H){const N=b(T,H);return N?Promise.reject(N):Promise.resolve()}function C(T){const H=Pr.values().next().value;return H&&typeof H.runWithContext=="function"?H.runWithContext(T):T()}function z(T,H){let N;const[W,oe,g]=jp(T,H);N=xi(W.reverse(),"beforeRouteLeave",T,H);for(const v of W)v.leaveGuards.forEach(S=>{N.push(ar(S,T,H))});const m=V.bind(null,T,H);return N.push(m),ut(N).then(()=>{N=[];for(const v of i.list())N.push(ar(v,T,H));return N.push(m),ut(N)}).then(()=>{N=xi(oe,"beforeRouteUpdate",T,H);for(const v of oe)v.updateGuards.forEach(S=>{N.push(ar(S,T,H))});return N.push(m),ut(N)}).then(()=>{N=[];for(const v of g)if(v.beforeEnter)if(wt(v.beforeEnter))for(const S of v.beforeEnter)N.push(ar(S,T,H));else N.push(ar(v.beforeEnter,T,H));return N.push(m),ut(N)}).then(()=>(T.matched.forEach(v=>v.enterCallbacks={}),N=xi(g,"beforeRouteEnter",T,H,C),N.push(m),ut(N))).then(()=>{N=[];for(const v of o.list())N.push(ar(v,T,H));return N.push(m),ut(N)}).catch(v=>Bt(v,xe.NAVIGATION_CANCELLED)?v:Promise.reject(v))}function Q(T,H,N){a.list().forEach(W=>C(()=>W(T,H,N)))}function O(T,H,N,W,oe){const g=b(T,H);if(g)return g;const m=H===sr,v=Mr?history.state:{};N&&(W||m?s.replace(T.fullPath,de({scroll:m&&v&&v.scroll},oe)):s.push(T.fullPath,oe)),l.value=T,ie(T,H,N,m),We()}let Y;function Ee(){Y||(Y=s.listen((T,H,N)=>{if(!gr.listening)return;const W=k(T),oe=M(W,gr.currentRoute.value);if(oe){U(de(oe,{replace:!0,force:!0}),W).catch(On);return}c=W;const g=l.value;Mr&&Ap(Fa(g.fullPath,N.delta),ni()),z(W,g).catch(m=>Bt(m,xe.NAVIGATION_ABORTED|xe.NAVIGATION_CANCELLED)?m:Bt(m,xe.NAVIGATION_GUARD_REDIRECT)?(U(de(_(m.to),{force:!0}),W).then(v=>{Bt(v,xe.NAVIGATION_ABORTED|xe.NAVIGATION_DUPLICATED)&&!N.delta&&N.type===Ji.pop&&s.go(-1,!1)}).catch(On),Promise.reject()):(N.delta&&s.go(-N.delta,!1),L(m,W,g))).then(m=>{m=m||O(W,g,!1),m&&(N.delta&&!Bt(m,xe.NAVIGATION_CANCELLED)?s.go(-N.delta,!1):N.type===Ji.pop&&Bt(m,xe.NAVIGATION_ABORTED|xe.NAVIGATION_DUPLICATED)&&s.go(-1,!1)),Q(W,g,m)}).catch(On)}))}let je=fn(),me=fn(),te;function L(T,H,N){We(T);const W=me.list();return W.length?W.forEach(oe=>oe(T,H,N)):console.error(T),Promise.reject(T)}function se(){return te&&l.value!==sr?Promise.resolve():new Promise((T,H)=>{je.add([T,H])})}function We(T){return te||(te=!T,Ee(),je.list().forEach(([H,N])=>T?N(T):H()),je.reset()),T}function ie(T,H,N,W){const{scrollBehavior:oe}=t;if(!Mr||!oe)return Promise.resolve();const g=!N&&xp(Fa(T.fullPath,0))||(W||!N)&&history.state&&history.state.scroll||null;return hr().then(()=>oe(T,H,g)).then(m=>m&&Tp(m)).catch(m=>L(m,T,H))}const ae=T=>s.go(T);let Lt;const Pr=new Set,gr={currentRoute:l,listening:!0,addRoute:f,removeRoute:p,clearRoutes:e.clearRoutes,hasRoute:w,getRoutes:y,resolve:k,options:t,push:x,replace:D,go:ae,back:()=>ae(-1),forward:()=>ae(1),beforeEach:i.add,beforeResolve:o.add,afterEach:a.add,onError:me.add,isReady:se,install(T){T.component("RouterLink",tg),T.component("RouterView",ig),T.config.globalProperties.$router=gr,Object.defineProperty(T.config.globalProperties,"$route",{enumerable:!0,get:()=>re(l)}),Mr&&!Lt&&l.value===sr&&(Lt=!0,x(s.location).catch(W=>{}));const H={};for(const W in sr)Object.defineProperty(H,W,{get:()=>l.value[W],enumerable:!0});T.provide(si,gr),T.provide($o,pc(H)),T.provide(Xi,l);const N=T.unmount;Pr.add(T),T.unmount=function(){Pr.delete(T),Pr.size<1&&(c=sr,Y&&Y(),Y=null,l.value=sr,Lt=!1,te=!1),N()}}};function ut(T){return T.reduce((H,N)=>H.then(()=>C(N)),Promise.resolve())}return gr}function ag(){return ft(si)}function jo(t){return ft($o)}const Tu="/logo.svg",lg=["width","height"],Zi=pr({__name:"LogoIcon",props:{size:{}},setup(t){return(e,r)=>(Z(),ue("img",{src:Tu,alt:"IO",width:t.size??32,height:t.size??32,class:"inline-block"},null,8,lg))}});/**
|
|
30
|
+
*/let Np=()=>location.protocol+"//"+location.host;function ku(t,e){const{pathname:r,search:n,hash:s}=e,i=t.indexOf("#");if(i>-1){let o=s.includes(t.slice(i))?t.slice(i).length:1,a=s.slice(o);return a[0]!=="/"&&(a="/"+a),Ha(a,"")}return Ha(r,t)+n+s}function Lp(t,e,r,n){let s=[],i=[],o=null;const a=({state:d})=>{const f=ku(t,location),p=r.value,y=e.value;let w=0;if(d){if(r.value=f,e.value=d,o&&o===p){o=null;return}w=y?d.position-y.position:0}else n(f);s.forEach(k=>{k(r.value,p,{delta:w,type:Ji.pop,direction:w?w>0?Ai.forward:Ai.back:Ai.unknown})})};function l(){o=r.value}function c(d){s.push(d);const f=()=>{const p=s.indexOf(d);p>-1&&s.splice(p,1)};return i.push(f),f}function u(){if(document.visibilityState==="hidden"){const{history:d}=window;if(!d.state)return;d.replaceState(de({},d.state,{scroll:ni()}),"")}}function h(){for(const d of i)d();i=[],window.removeEventListener("popstate",a),window.removeEventListener("pagehide",u),document.removeEventListener("visibilitychange",u)}return window.addEventListener("popstate",a),window.addEventListener("pagehide",u),document.addEventListener("visibilitychange",u),{pauseListeners:l,listen:c,destroy:h}}function Wa(t,e,r,n=!1,s=!1){return{back:t,current:e,forward:r,replaced:n,position:window.history.length,scroll:s?ni():null}}function Dp(t){const{history:e,location:r}=window,n={value:ku(t,r)},s={value:e.state};s.value||i(n.value,{back:null,current:n.value,forward:null,position:e.length-1,replaced:!0,scroll:null},!0);function i(l,c,u){const h=t.indexOf("#"),d=h>-1?(r.host&&document.querySelector("base")?t:t.slice(h))+l:Np()+t+l;try{e[u?"replaceState":"pushState"](c,"",d),s.value=c}catch(f){console.error(f),r[u?"replace":"assign"](d)}}function o(l,c){i(l,de({},e.state,Wa(s.value.back,l,s.value.forward,!0),c,{position:s.value.position}),!0),n.value=l}function a(l,c){const u=de({},s.value,e.state,{forward:l,scroll:ni()});i(u.current,u,!0),i(l,de({},Wa(n.value,l,null),{position:u.position+1},c),!1),n.value=l}return{location:n,state:s,push:a,replace:o}}function Up(t){t=wp(t);const e=Dp(t),r=Lp(t,e.state,e.location,e.replace);function n(i,o=!0){o||r.pauseListeners(),history.go(i)}const s=de({location:"",base:t,go:n,createHref:Sp.bind(null,t)},e,r);return Object.defineProperty(s,"location",{enumerable:!0,get:()=>e.location.value}),Object.defineProperty(s,"state",{enumerable:!0,get:()=>e.state.value}),s}let Tr=(function(t){return t[t.Static=0]="Static",t[t.Param=1]="Param",t[t.Group=2]="Group",t})({});var Le=(function(t){return t[t.Static=0]="Static",t[t.Param=1]="Param",t[t.ParamRegExp=2]="ParamRegExp",t[t.ParamRegExpEnd=3]="ParamRegExpEnd",t[t.EscapeNext=4]="EscapeNext",t})(Le||{});const Bp={type:Tr.Static,value:""},Mp=/[a-zA-Z0-9_]/;function Hp(t){if(!t)return[[]];if(t==="/")return[[Bp]];if(!t.startsWith("/"))throw new Error(`Invalid path "${t}"`);function e(f){throw new Error(`ERR (${r})/"${c}": ${f}`)}let r=Le.Static,n=r;const s=[];let i;function o(){i&&s.push(i),i=[]}let a=0,l,c="",u="";function h(){c&&(r===Le.Static?i.push({type:Tr.Static,value:c}):r===Le.Param||r===Le.ParamRegExp||r===Le.ParamRegExpEnd?(i.length>1&&(l==="*"||l==="+")&&e(`A repeatable param (${c}) must be alone in its segment. eg: '/:ids+.`),i.push({type:Tr.Param,value:c,regexp:u,repeatable:l==="*"||l==="+",optional:l==="*"||l==="?"})):e("Invalid state to consume buffer"),c="")}function d(){c+=l}for(;a<t.length;){if(l=t[a++],l==="\\"&&r!==Le.ParamRegExp){n=r,r=Le.EscapeNext;continue}switch(r){case Le.Static:l==="/"?(c&&h(),o()):l===":"?(h(),r=Le.Param):d();break;case Le.EscapeNext:d(),r=n;break;case Le.Param:l==="("?r=Le.ParamRegExp:Mp.test(l)?d():(h(),r=Le.Static,l!=="*"&&l!=="?"&&l!=="+"&&a--);break;case Le.ParamRegExp:l===")"?u[u.length-1]=="\\"?u=u.slice(0,-1)+l:r=Le.ParamRegExpEnd:u+=l;break;case Le.ParamRegExpEnd:h(),r=Le.Static,l!=="*"&&l!=="?"&&l!=="+"&&a--,u="";break;default:e("Unknown state");break}}return r===Le.ParamRegExp&&e(`Unfinished custom RegExp for param "${c}"`),h(),o(),s}const Ka="[^/]+?",qp={sensitive:!1,strict:!1,start:!0,end:!0};var Je=(function(t){return t[t._multiplier=10]="_multiplier",t[t.Root=90]="Root",t[t.Segment=40]="Segment",t[t.SubSegment=30]="SubSegment",t[t.Static=40]="Static",t[t.Dynamic=20]="Dynamic",t[t.BonusCustomRegExp=10]="BonusCustomRegExp",t[t.BonusWildcard=-50]="BonusWildcard",t[t.BonusRepeatable=-20]="BonusRepeatable",t[t.BonusOptional=-8]="BonusOptional",t[t.BonusStrict=.7000000000000001]="BonusStrict",t[t.BonusCaseSensitive=.25]="BonusCaseSensitive",t})(Je||{});const Fp=/[.+*?^${}()[\]/\\]/g;function Vp(t,e){const r=de({},qp,e),n=[];let s=r.start?"^":"";const i=[];for(const c of t){const u=c.length?[]:[Je.Root];r.strict&&!c.length&&(s+="/");for(let h=0;h<c.length;h++){const d=c[h];let f=Je.Segment+(r.sensitive?Je.BonusCaseSensitive:0);if(d.type===Tr.Static)h||(s+="/"),s+=d.value.replace(Fp,"\\$&"),f+=Je.Static;else if(d.type===Tr.Param){const{value:p,repeatable:y,optional:w,regexp:k}=d;i.push({name:p,repeatable:y,optional:w});const _=k||Ka;if(_!==Ka){f+=Je.BonusCustomRegExp;try{`${_}`}catch(x){throw new Error(`Invalid custom RegExp for param "${p}" (${_}): `+x.message)}}let b=y?`((?:${_})(?:/(?:${_}))*)`:`(${_})`;h||(b=w&&c.length<2?`(?:/${b})`:"/"+b),w&&(b+="?"),s+=b,f+=Je.Dynamic,w&&(f+=Je.BonusOptional),y&&(f+=Je.BonusRepeatable),_===".*"&&(f+=Je.BonusWildcard)}u.push(f)}n.push(u)}if(r.strict&&r.end){const c=n.length-1;n[c][n[c].length-1]+=Je.BonusStrict}r.strict||(s+="/?"),r.end?s+="$":r.strict&&!s.endsWith("/")&&(s+="(?:/|$)");const o=new RegExp(s,r.sensitive?"":"i");function a(c){const u=c.match(o),h={};if(!u)return null;for(let d=1;d<u.length;d++){const f=u[d]||"",p=i[d-1];h[p.name]=f&&p.repeatable?f.split("/"):f}return h}function l(c){let u="",h=!1;for(const d of t){(!h||!u.endsWith("/"))&&(u+="/"),h=!1;for(const f of d)if(f.type===Tr.Static)u+=f.value;else if(f.type===Tr.Param){const{value:p,repeatable:y,optional:w}=f,k=p in c?c[p]:"";if(wt(k)&&!y)throw new Error(`Provided param "${p}" is an array but it is not repeatable (* or + modifiers)`);const _=wt(k)?k.join("/"):k;if(!_)if(w)d.length<2&&(u.endsWith("/")?u=u.slice(0,-1):h=!0);else throw new Error(`Missing required param "${p}"`);u+=_}}return u||"/"}return{re:o,score:n,keys:i,parse:a,stringify:l}}function zp(t,e){let r=0;for(;r<t.length&&r<e.length;){const n=e[r]-t[r];if(n)return n;r++}return t.length<e.length?t.length===1&&t[0]===Je.Static+Je.Segment?-1:1:t.length>e.length?e.length===1&&e[0]===Je.Static+Je.Segment?1:-1:0}function Su(t,e){let r=0;const n=t.score,s=e.score;for(;r<n.length&&r<s.length;){const i=zp(n[r],s[r]);if(i)return i;r++}if(Math.abs(s.length-n.length)===1){if(Ga(n))return 1;if(Ga(s))return-1}return s.length-n.length}function Ga(t){const e=t[t.length-1];return t.length>0&&e[e.length-1]<0}const Wp={strict:!1,end:!0,sensitive:!1};function Kp(t,e,r){const n=Vp(Hp(t.path),r),s=de(n,{record:t,parent:e,children:[],alias:[]});return e&&!s.record.aliasOf==!e.record.aliasOf&&e.children.push(s),s}function Gp(t,e){const r=[],n=new Map;e=Ma(Wp,e);function s(h){return n.get(h)}function i(h,d,f){const p=!f,y=Ya(h);y.aliasOf=f&&f.record;const w=Ma(e,h),k=[y];if("alias"in h){const x=typeof h.alias=="string"?[h.alias]:h.alias;for(const D of x)k.push(Ya(de({},y,{components:f?f.record.components:y.components,path:D,aliasOf:f?f.record:y})))}let _,b;for(const x of k){const{path:D}=x;if(d&&D[0]!=="/"){const M=d.record.path,U=M[M.length-1]==="/"?"":"/";x.path=d.record.path+(D&&U+D)}if(_=Kp(x,d,w),f?f.alias.push(_):(b=b||_,b!==_&&b.alias.push(_),p&&h.name&&!Xa(_)&&o(h.name)),Eu(_)&&l(_),y.children){const M=y.children;for(let U=0;U<M.length;U++)i(M[U],_,f&&f.children[U])}f=f||_}return b?()=>{o(b)}:On}function o(h){if(_u(h)){const d=n.get(h);d&&(n.delete(h),r.splice(r.indexOf(d),1),d.children.forEach(o),d.alias.forEach(o))}else{const d=r.indexOf(h);d>-1&&(r.splice(d,1),h.record.name&&n.delete(h.record.name),h.children.forEach(o),h.alias.forEach(o))}}function a(){return r}function l(h){const d=Xp(h,r);r.splice(d,0,h),h.record.name&&!Xa(h)&&n.set(h.record.name,h)}function c(h,d){let f,p={},y,w;if("name"in h&&h.name){if(f=n.get(h.name),!f)throw rn(xe.MATCHER_NOT_FOUND,{location:h});w=f.record.name,p=de(Ja(d.params,f.keys.filter(b=>!b.optional).concat(f.parent?f.parent.keys.filter(b=>b.optional):[]).map(b=>b.name)),h.params&&Ja(h.params,f.keys.map(b=>b.name))),y=f.stringify(p)}else if(h.path!=null)y=h.path,f=r.find(b=>b.re.test(y)),f&&(p=f.parse(y),w=f.record.name);else{if(f=d.name?n.get(d.name):r.find(b=>b.re.test(d.path)),!f)throw rn(xe.MATCHER_NOT_FOUND,{location:h,currentLocation:d});w=f.record.name,p=de({},d.params,h.params),y=f.stringify(p)}const k=[];let _=f;for(;_;)k.unshift(_.record),_=_.parent;return{name:w,path:y,params:p,matched:k,meta:Yp(k)}}t.forEach(h=>i(h));function u(){r.length=0,n.clear()}return{addRoute:i,resolve:c,removeRoute:o,clearRoutes:u,getRoutes:a,getRecordMatcher:s}}function Ja(t,e){const r={};for(const n of e)n in t&&(r[n]=t[n]);return r}function Ya(t){const e={path:t.path,redirect:t.redirect,name:t.name,meta:t.meta||{},aliasOf:t.aliasOf,beforeEnter:t.beforeEnter,props:Jp(t),children:t.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in t?t.components||null:t.component&&{default:t.component}};return Object.defineProperty(e,"mods",{value:{}}),e}function Jp(t){const e={},r=t.props||!1;if("component"in t)e.default=r;else for(const n in t.components)e[n]=typeof r=="object"?r[n]:r;return e}function Xa(t){for(;t;){if(t.record.aliasOf)return!0;t=t.parent}return!1}function Yp(t){return t.reduce((e,r)=>de(e,r.meta),{})}function Xp(t,e){let r=0,n=e.length;for(;r!==n;){const i=r+n>>1;Su(t,e[i])<0?n=i:r=i+1}const s=Zp(t);return s&&(n=e.lastIndexOf(s,n-1)),n}function Zp(t){let e=t;for(;e=e.parent;)if(Eu(e)&&Su(t,e)===0)return e}function Eu({record:t}){return!!(t.name||t.components&&Object.keys(t.components).length||t.redirect)}function Za(t){const e=ft(si),r=ft($o),n=je(()=>{const l=re(t.to);return e.resolve(l)}),s=je(()=>{const{matched:l}=n.value,{length:c}=l,u=l[c-1],h=r.matched;if(!u||!h.length)return-1;const d=h.findIndex(tn.bind(null,u));if(d>-1)return d;const f=Qa(l[c-2]);return c>1&&Qa(u)===f&&h[h.length-1].path!==f?h.findIndex(tn.bind(null,l[c-2])):d}),i=je(()=>s.value>-1&&ng(r.params,n.value.params)),o=je(()=>s.value>-1&&s.value===r.matched.length-1&&bu(r.params,n.value.params));function a(l={}){if(rg(l)){const c=e[re(t.replace)?"replace":"push"](re(t.to)).catch(On);return t.viewTransition&&typeof document<"u"&&"startViewTransition"in document&&document.startViewTransition(()=>c),c}return Promise.resolve()}return{route:n,href:je(()=>n.value.href),isActive:i,isExactActive:o,navigate:a}}function Qp(t){return t.length===1?t[0]:t}const eg=pr({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"},viewTransition:Boolean},useLink:Za,setup(t,{slots:e}){const r=Xn(Za(t)),{options:n}=ft(si),s=je(()=>({[el(t.activeClass,n.linkActiveClass,"router-link-active")]:r.isActive,[el(t.exactActiveClass,n.linkExactActiveClass,"router-link-exact-active")]:r.isExactActive}));return()=>{const i=e.default&&Qp(e.default(r));return t.custom?i:Qr("a",{"aria-current":r.isExactActive?t.ariaCurrentValue:null,href:r.href,onClick:r.navigate,class:s.value},i)}}}),tg=eg;function rg(t){if(!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)&&!t.defaultPrevented&&!(t.button!==void 0&&t.button!==0)){if(t.currentTarget&&t.currentTarget.getAttribute){const e=t.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(e))return}return t.preventDefault&&t.preventDefault(),!0}}function ng(t,e){for(const r in e){const n=e[r],s=t[r];if(typeof n=="string"){if(n!==s)return!1}else if(!wt(s)||s.length!==n.length||n.some((i,o)=>i.valueOf()!==s[o].valueOf()))return!1}return!0}function Qa(t){return t?t.aliasOf?t.aliasOf.path:t.path:""}const el=(t,e,r)=>t??e??r,sg=pr({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(t,{attrs:e,slots:r}){const n=ft(Xi),s=je(()=>t.route||n.value),i=ft(za,0),o=je(()=>{let c=re(i);const{matched:u}=s.value;let h;for(;(h=u[c])&&!h.components;)c++;return c}),a=je(()=>s.value.matched[o.value]);ys(za,je(()=>o.value+1)),ys($p,a),ys(Xi,s);const l=Oe();return Kt(()=>[l.value,a.value,t.name],([c,u,h],[d,f,p])=>{u&&(u.instances[h]=c,f&&f!==u&&c&&c===d&&(u.leaveGuards.size||(u.leaveGuards=f.leaveGuards),u.updateGuards.size||(u.updateGuards=f.updateGuards))),c&&u&&(!f||!tn(u,f)||!d)&&(u.enterCallbacks[h]||[]).forEach(y=>y(c))},{flush:"post"}),()=>{const c=s.value,u=t.name,h=a.value,d=h&&h.components[u];if(!d)return tl(r.default,{Component:d,route:c});const f=h.props[u],p=f?f===!0?c.params:typeof f=="function"?f(c):f:null,w=Qr(d,de({},p,e,{onVnodeUnmounted:k=>{k.component.isUnmounted&&(h.instances[u]=null)},ref:l}));return tl(r.default,{Component:w,route:c})||w}}});function tl(t,e){if(!t)return null;const r=t(e);return r.length===1?r[0]:r}const ig=sg;function og(t){const e=Gp(t.routes,t),r=t.parseQuery||Pp,n=t.stringifyQuery||Va,s=t.history,i=fn(),o=fn(),a=fn(),l=Kh(sr);let c=sr;Mr&&t.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const u=Ei.bind(null,T=>""+T),h=Ei.bind(null,pp),d=Ei.bind(null,Fn);function f(T,H){let N,W;return _u(T)?(N=e.getRecordMatcher(T),W=H):W=T,e.addRoute(W,N)}function p(T){const H=e.getRecordMatcher(T);H&&e.removeRoute(H)}function y(){return e.getRoutes().map(T=>T.record)}function w(T){return!!e.getRecordMatcher(T)}function k(T,H){if(H=de({},H||l.value),typeof T=="string"){const v=Ti(r,T,H.path),S=e.resolve({path:v.path},H),A=s.createHref(v.fullPath);return de(v,S,{params:d(S.params),hash:Fn(v.hash),redirectedFrom:void 0,href:A})}let N;if(T.path!=null)N=de({},T,{path:Ti(r,T.path,H.path).path});else{const v=de({},T.params);for(const S in v)v[S]==null&&delete v[S];N=de({},T,{params:h(v)}),H.params=h(H.params)}const W=e.resolve(N,H),oe=T.hash||"";W.params=u(d(W.params));const g=yp(n,de({},T,{hash:hp(oe),path:W.path})),m=s.createHref(g);return de({fullPath:g,hash:oe,query:n===Va?Ip(T.query):T.query||{}},W,{redirectedFrom:void 0,href:m})}function _(T){return typeof T=="string"?Ti(r,T,l.value.path):de({},T)}function b(T,H){if(c!==T)return rn(xe.NAVIGATION_CANCELLED,{from:H,to:T})}function x(T){return U(T)}function D(T){return x(de(_(T),{replace:!0}))}function M(T,H){const N=T.matched[T.matched.length-1];if(N&&N.redirect){const{redirect:W}=N;let oe=typeof W=="function"?W(T,H):W;return typeof oe=="string"&&(oe=oe.includes("?")||oe.includes("#")?oe=_(oe):{path:oe},oe.params={}),de({query:T.query,hash:T.hash,params:oe.path!=null?{}:T.params},oe)}}function U(T,H){const N=c=k(T),W=l.value,oe=T.state,g=T.force,m=T.replace===!0,v=M(N,W);if(v)return U(de(_(v),{state:typeof v=="object"?de({},oe,v.state):oe,force:g,replace:m}),H||N);const S=N;S.redirectedFrom=H;let A;return!g&&vp(n,W,N)&&(A=rn(xe.NAVIGATION_DUPLICATED,{to:S,from:W}),ie(W,W,!0,!1)),(A?Promise.resolve(A):z(S,W)).catch(E=>Bt(E)?Bt(E,xe.NAVIGATION_GUARD_REDIRECT)?E:We(E):L(E,S,W)).then(E=>{if(E){if(Bt(E,xe.NAVIGATION_GUARD_REDIRECT))return U(de({replace:m},_(E.to),{state:typeof E.to=="object"?de({},oe,E.to.state):oe,force:g}),H||S)}else E=O(S,W,!0,m,oe);return Q(S,W,E),E})}function V(T,H){const N=b(T,H);return N?Promise.reject(N):Promise.resolve()}function C(T){const H=Pr.values().next().value;return H&&typeof H.runWithContext=="function"?H.runWithContext(T):T()}function z(T,H){let N;const[W,oe,g]=jp(T,H);N=xi(W.reverse(),"beforeRouteLeave",T,H);for(const v of W)v.leaveGuards.forEach(S=>{N.push(ar(S,T,H))});const m=V.bind(null,T,H);return N.push(m),ut(N).then(()=>{N=[];for(const v of i.list())N.push(ar(v,T,H));return N.push(m),ut(N)}).then(()=>{N=xi(oe,"beforeRouteUpdate",T,H);for(const v of oe)v.updateGuards.forEach(S=>{N.push(ar(S,T,H))});return N.push(m),ut(N)}).then(()=>{N=[];for(const v of g)if(v.beforeEnter)if(wt(v.beforeEnter))for(const S of v.beforeEnter)N.push(ar(S,T,H));else N.push(ar(v.beforeEnter,T,H));return N.push(m),ut(N)}).then(()=>(T.matched.forEach(v=>v.enterCallbacks={}),N=xi(g,"beforeRouteEnter",T,H,C),N.push(m),ut(N))).then(()=>{N=[];for(const v of o.list())N.push(ar(v,T,H));return N.push(m),ut(N)}).catch(v=>Bt(v,xe.NAVIGATION_CANCELLED)?v:Promise.reject(v))}function Q(T,H,N){a.list().forEach(W=>C(()=>W(T,H,N)))}function O(T,H,N,W,oe){const g=b(T,H);if(g)return g;const m=H===sr,v=Mr?history.state:{};N&&(W||m?s.replace(T.fullPath,de({scroll:m&&v&&v.scroll},oe)):s.push(T.fullPath,oe)),l.value=T,ie(T,H,N,m),We()}let Y;function Ee(){Y||(Y=s.listen((T,H,N)=>{if(!gr.listening)return;const W=k(T),oe=M(W,gr.currentRoute.value);if(oe){U(de(oe,{replace:!0,force:!0}),W).catch(On);return}c=W;const g=l.value;Mr&&Ap(Fa(g.fullPath,N.delta),ni()),z(W,g).catch(m=>Bt(m,xe.NAVIGATION_ABORTED|xe.NAVIGATION_CANCELLED)?m:Bt(m,xe.NAVIGATION_GUARD_REDIRECT)?(U(de(_(m.to),{force:!0}),W).then(v=>{Bt(v,xe.NAVIGATION_ABORTED|xe.NAVIGATION_DUPLICATED)&&!N.delta&&N.type===Ji.pop&&s.go(-1,!1)}).catch(On),Promise.reject()):(N.delta&&s.go(-N.delta,!1),L(m,W,g))).then(m=>{m=m||O(W,g,!1),m&&(N.delta&&!Bt(m,xe.NAVIGATION_CANCELLED)?s.go(-N.delta,!1):N.type===Ji.pop&&Bt(m,xe.NAVIGATION_ABORTED|xe.NAVIGATION_DUPLICATED)&&s.go(-1,!1)),Q(W,g,m)}).catch(On)}))}let Ne=fn(),ye=fn(),te;function L(T,H,N){We(T);const W=ye.list();return W.length?W.forEach(oe=>oe(T,H,N)):console.error(T),Promise.reject(T)}function se(){return te&&l.value!==sr?Promise.resolve():new Promise((T,H)=>{Ne.add([T,H])})}function We(T){return te||(te=!T,Ee(),Ne.list().forEach(([H,N])=>T?N(T):H()),Ne.reset()),T}function ie(T,H,N,W){const{scrollBehavior:oe}=t;if(!Mr||!oe)return Promise.resolve();const g=!N&&xp(Fa(T.fullPath,0))||(W||!N)&&history.state&&history.state.scroll||null;return hr().then(()=>oe(T,H,g)).then(m=>m&&Tp(m)).catch(m=>L(m,T,H))}const ae=T=>s.go(T);let Lt;const Pr=new Set,gr={currentRoute:l,listening:!0,addRoute:f,removeRoute:p,clearRoutes:e.clearRoutes,hasRoute:w,getRoutes:y,resolve:k,options:t,push:x,replace:D,go:ae,back:()=>ae(-1),forward:()=>ae(1),beforeEach:i.add,beforeResolve:o.add,afterEach:a.add,onError:ye.add,isReady:se,install(T){T.component("RouterLink",tg),T.component("RouterView",ig),T.config.globalProperties.$router=gr,Object.defineProperty(T.config.globalProperties,"$route",{enumerable:!0,get:()=>re(l)}),Mr&&!Lt&&l.value===sr&&(Lt=!0,x(s.location).catch(W=>{}));const H={};for(const W in sr)Object.defineProperty(H,W,{get:()=>l.value[W],enumerable:!0});T.provide(si,gr),T.provide($o,pc(H)),T.provide(Xi,l);const N=T.unmount;Pr.add(T),T.unmount=function(){Pr.delete(T),Pr.size<1&&(c=sr,Y&&Y(),Y=null,l.value=sr,Lt=!1,te=!1),N()}}};function ut(T){return T.reduce((H,N)=>H.then(()=>C(N)),Promise.resolve())}return gr}function ag(){return ft(si)}function jo(t){return ft($o)}const Tu="/logo.svg",lg=["width","height"],Zi=pr({__name:"LogoIcon",props:{size:{}},setup(t){return(e,r)=>(Z(),ue("img",{src:Tu,alt:"IO",width:t.size??32,height:t.size??32,class:"inline-block"},null,8,lg))}});/**
|
|
31
31
|
* @license lucide-vue-next v0.474.0 - ISC
|
|
32
32
|
*
|
|
33
33
|
* This source code is licensed under the ISC license.
|
|
@@ -167,7 +167,7 @@ var hh=Object.defineProperty;var dh=(t,e,r)=>e in t?hh(t,e,{enumerable:!0,config
|
|
|
167
167
|
*
|
|
168
168
|
* This source code is licensed under the ISC license.
|
|
169
169
|
* See the LICENSE file in the root directory of this source tree.
|
|
170
|
-
*/const Og=Ae("UsersIcon",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]]),Pg={key:0,class:"font-display text-[1.1rem] font-normal uppercase tracking-[0.18em] bg-gradient-brand bg-clip-text text-transparent"},Ig=["title"],$g={class:"flex-1 p-2 space-y-0.5 overflow-y-auto"},jg={key:0},Ng={class:"border-t border-border p-2 space-y-0.5"},Lg={key:0},Dg=["href"],sl="https://github.com/michaeljolley/io",Ug=pr({__name:"AppSidebar",setup(t){const e=jo(),r=Oe(!1),n=[{name:"History",icon:vg,path:"/history"},{name:"Squads",icon:Og,path:"/squads"},{name:"Health",icon:hg,path:"/squads/health"},{name:"Usage",icon:fg,path:"/usage"},{name:"Audit Log",icon:gg,path:"/audit-log"},{name:"Skills",icon:Eg,path:"/skills"},{name:"MCP Servers",icon:Ag,path:"/mcp"},{name:"Schedules",icon:mg,path:"/schedules"},{name:"Wiki",icon:dg,path:"/wiki"}],s=[{name:"Chat",icon:xu,path:"/"},{name:"Feed",icon:Au,path:"/feed"},{name:"Settings",icon:xg,path:"/settings"}],i="1.11.2",o=$e(()=>{let l="";const c=[...n,...s];for(const u of c){const h=u.path;(h==="/"?e.path==="/":e.path===h||e.path.startsWith(h+"/"))&&h.length>l.length&&(l=h)}return l});function a(){r.value=!r.value}return(l,c)=>{const u=Zs("router-link");return Z(),ue("aside",{class:Ye(["border-r border-border bg-sidebar flex flex-col h-full shrink-0 transition-all duration-200",r.value?"w-16":"w-56"])},[ne("div",{class:Ye(["p-3 border-b border-border flex items-center",r.value?"justify-center":"justify-between"])},[he(u,{to:"/",class:Ye(["flex items-center gap-2",r.value?"justify-center":""])},{default:Yr(()=>[he(Zi,{size:24}),r.value?De("",!0):(Z(),ue("h1",Pg,"IO"))]),_:1},8,["class"]),r.value?De("",!0):(Z(),ue("button",{key:0,onClick:a,class:"p-1 rounded-full hover:bg-accent/70 text-muted-foreground hover:text-foreground transition-colors",title:r.value?"Expand sidebar":"Collapse sidebar"},[he(re(wg),{class:"w-4 h-4"})],8,Ig))],2),r.value?(Z(),ue("button",{key:0,onClick:a,class:"mx-auto mt-2 p-1.5 rounded-full hover:bg-accent/70 text-muted-foreground hover:text-foreground transition-colors",title:"Expand sidebar"},[he(re(kg),{class:"w-4 h-4"})])):De("",!0),ne("nav",$g,[(Z(),ue(Fe,null,zr(n,h=>he(u,{key:h.path,to:h.path,class:Ye(["flex items-center gap-3 rounded-full text-sm transition-colors border border-transparent",[r.value?"justify-center px-2 py-2":"px-3 py-2",o.value===h.path?"bg-accent text-accent-foreground font-medium border border-white/10":"text-muted-foreground hover:bg-white/5 hover:text-foreground"]]),title:r.value?h.name:void 0},{default:Yr(()=>[(Z(),nt(sa(h.icon),{class:"w-4 h-4 shrink-0"})),r.value?De("",!0):(Z(),ue("span",jg,it(h.name),1))]),_:2},1032,["to","class","title"])),64))]),ne("div",Ng,[(Z(),ue(Fe,null,zr(s,h=>he(u,{key:h.path,to:h.path,class:Ye(["flex items-center gap-3 rounded-full text-sm transition-colors border border-transparent",[r.value?"justify-center px-2 py-2":"px-3 py-2",o.value===h.path?"bg-accent text-accent-foreground font-medium border border-white/10":"text-muted-foreground hover:bg-white/5 hover:text-foreground"]]),title:r.value?h.name:void 0},{default:Yr(()=>[(Z(),nt(sa(h.icon),{class:"w-4 h-4 shrink-0"})),r.value?De("",!0):(Z(),ue("span",Lg,it(h.name),1))]),_:2},1032,["to","class","title"])),64)),ne("div",{class:Ye(["flex items-center pt-2 mt-2 border-t border-border",r.value?"justify-center":"justify-between px-3"])},[r.value?De("",!0):(Z(),ue("a",{key:0,href:`${sl}/releases/tag/v${re(i)}`,target:"_blank",class:"text-[10px] text-muted-foreground hover:text-foreground transition-colors",title:"Release notes"}," v"+it(re(i)),9,Dg)),ne("a",{href:sl,target:"_blank",class:"p-1 rounded-full hover:bg-accent/70 text-muted-foreground hover:text-foreground transition-colors",title:"GitHub repository"},[he(re(yg),{class:"w-3.5 h-3.5"})])],2)])],2)}}});function ii(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,n=Object.getOwnPropertySymbols(t);s<n.length;s++)e.indexOf(n[s])<0&&Object.prototype.propertyIsEnumerable.call(t,n[s])&&(r[n[s]]=t[n[s]]);return r}function Bg(t,e,r,n){function s(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function a(u){try{c(n.next(u))}catch(h){o(h)}}function l(u){try{c(n.throw(u))}catch(h){o(h)}}function c(u){u.done?i(u.value):s(u.value).then(a,l)}c((n=n.apply(t,e||[])).next())})}const Mg=t=>t?(...e)=>t(...e):(...e)=>fetch(...e);class No extends Error{constructor(e,r="FunctionsError",n){super(e),this.name=r,this.context=n}toJSON(){return{name:this.name,message:this.message,context:this.context}}}class Hg extends No{constructor(e){super("Failed to send a request to the Edge Function","FunctionsFetchError",e)}}class il extends No{constructor(e){super("Relay Error invoking the Edge Function","FunctionsRelayError",e)}}class ol extends No{constructor(e){super("Edge Function returned a non-2xx status code","FunctionsHttpError",e)}}var Qi;(function(t){t.Any="any",t.ApNortheast1="ap-northeast-1",t.ApNortheast2="ap-northeast-2",t.ApSouth1="ap-south-1",t.ApSoutheast1="ap-southeast-1",t.ApSoutheast2="ap-southeast-2",t.CaCentral1="ca-central-1",t.EuCentral1="eu-central-1",t.EuWest1="eu-west-1",t.EuWest2="eu-west-2",t.EuWest3="eu-west-3",t.SaEast1="sa-east-1",t.UsEast1="us-east-1",t.UsWest1="us-west-1",t.UsWest2="us-west-2"})(Qi||(Qi={}));class qg{constructor(e,{headers:r={},customFetch:n,region:s=Qi.Any}={}){this.url=e,this.headers=r,this.region=s,this.fetch=Mg(n)}setAuth(e){this.headers.Authorization=`Bearer ${e}`}invoke(e){return Bg(this,arguments,void 0,function*(r,n={}){var s;let i,o;try{const{headers:a,method:l,body:c,signal:u,timeout:h}=n;let d={},{region:f}=n;f||(f=this.region);const p=new URL(`${this.url}/${r}`);f&&f!=="any"&&(d["x-region"]=f,p.searchParams.set("forceFunctionRegion",f));let y;c&&(a&&!Object.prototype.hasOwnProperty.call(a,"Content-Type")||!a)?typeof Blob<"u"&&c instanceof Blob||c instanceof ArrayBuffer?(d["Content-Type"]="application/octet-stream",y=c):typeof c=="string"?(d["Content-Type"]="text/plain",y=c):typeof FormData<"u"&&c instanceof FormData?y=c:(d["Content-Type"]="application/json",y=JSON.stringify(c)):c&&typeof c!="string"&&!(typeof Blob<"u"&&c instanceof Blob)&&!(c instanceof ArrayBuffer)&&!(typeof FormData<"u"&&c instanceof FormData)?y=JSON.stringify(c):y=c;let w=u;h&&(o=new AbortController,i=setTimeout(()=>o.abort(),h),u?(w=o.signal,u.addEventListener("abort",()=>o.abort())):w=o.signal);const k=yield this.fetch(p.toString(),{method:l||"POST",headers:Object.assign(Object.assign(Object.assign({},d),this.headers),a),body:y,signal:w}).catch(D=>{throw new Hg(D)}),_=k.headers.get("x-relay-error");if(_&&_==="true")throw new il(k);if(!k.ok)throw new ol(k);let b=((s=k.headers.get("Content-Type"))!==null&&s!==void 0?s:"text/plain").split(";")[0].trim(),x;return b==="application/json"?x=yield k.json():b==="application/octet-stream"||b==="application/pdf"?x=yield k.blob():b==="text/event-stream"?x=k:b==="multipart/form-data"?x=yield k.formData():x=yield k.text(),{data:x,error:null,response:k}}catch(a){return{data:null,error:a,response:a instanceof ol||a instanceof il?a.context:void 0}}finally{i&&clearTimeout(i)}})}}const Ru=3,al=t=>Math.min(1e3*2**t,3e4),Fg=[520,503],Cu=["GET","HEAD","OPTIONS"];var Vg=class extends Error{constructor(t){super(t.message),this.name="PostgrestError",this.details=t.details,this.hint=t.hint,this.code=t.code}toJSON(){return{name:this.name,message:this.message,details:this.details,hint:this.hint,code:this.code}}};function ll(t,e){return new Promise(r=>{if(e!=null&&e.aborted){r();return}const n=setTimeout(()=>{e==null||e.removeEventListener("abort",s),r()},t);function s(){clearTimeout(n),r()}e==null||e.addEventListener("abort",s)})}function zg(t,e,r,n){return!(!n||r>=Ru||!Cu.includes(t)||!Fg.includes(e))}var Wg=class{constructor(t){var e,r,n,s,i;this.shouldThrowOnError=!1,this.retryEnabled=!0,this.method=t.method,this.url=t.url,this.headers=new Headers(t.headers),this.schema=t.schema,this.body=t.body,this.shouldThrowOnError=(e=t.shouldThrowOnError)!==null&&e!==void 0?e:!1,this.signal=t.signal,this.isMaybeSingle=(r=t.isMaybeSingle)!==null&&r!==void 0?r:!1,this.shouldStripNulls=(n=t.shouldStripNulls)!==null&&n!==void 0?n:!1,this.urlLengthLimit=(s=t.urlLengthLimit)!==null&&s!==void 0?s:8e3,this.retryEnabled=(i=t.retry)!==null&&i!==void 0?i:!0,t.fetch?this.fetch=t.fetch:this.fetch=fetch}throwOnError(){return this.shouldThrowOnError=!0,this}stripNulls(){if(this.headers.get("Accept")==="text/csv")throw new Error("stripNulls() cannot be used with csv()");return this.shouldStripNulls=!0,this}setHeader(t,e){return this.headers=new Headers(this.headers),this.headers.set(t,e),this}retry(t){return this.retryEnabled=t,this}then(t,e){var r=this;if(this.schema===void 0||(["GET","HEAD"].includes(this.method)?this.headers.set("Accept-Profile",this.schema):this.headers.set("Content-Profile",this.schema)),this.method!=="GET"&&this.method!=="HEAD"&&this.headers.set("Content-Type","application/json"),this.shouldStripNulls){const o=this.headers.get("Accept");o==="application/vnd.pgrst.object+json"?this.headers.set("Accept","application/vnd.pgrst.object+json;nulls=stripped"):(!o||o==="application/json")&&this.headers.set("Accept","application/vnd.pgrst.array+json;nulls=stripped")}const n=this.fetch;let i=(async()=>{let o=0;for(;;){const c=new Headers(r.headers);o>0&&c.set("X-Retry-Count",String(o));let u;try{u=await n(r.url.toString(),{method:r.method,headers:c,body:JSON.stringify(r.body,(h,d)=>typeof d=="bigint"?d.toString():d),signal:r.signal})}catch(h){if((h==null?void 0:h.name)==="AbortError"||(h==null?void 0:h.code)==="ABORT_ERR"||!Cu.includes(r.method))throw h;if(r.retryEnabled&&o<Ru){const d=al(o);o++,await ll(d,r.signal);continue}throw h}if(zg(r.method,u.status,o,r.retryEnabled)){var a,l;const h=(a=(l=u.headers)===null||l===void 0?void 0:l.get("Retry-After"))!==null&&a!==void 0?a:null,d=h!==null?Math.max(0,parseInt(h,10)||0)*1e3:al(o);await u.text(),o++,await ll(d,r.signal);continue}return await r.processResponse(u)}})();return this.shouldThrowOnError||(i=i.catch(o=>{var a;let l="",c="",u="";const h=o==null?void 0:o.cause;if(h){var d,f,p,y;const _=(d=h==null?void 0:h.message)!==null&&d!==void 0?d:"",b=(f=h==null?void 0:h.code)!==null&&f!==void 0?f:"";l=`${(p=o==null?void 0:o.name)!==null&&p!==void 0?p:"FetchError"}: ${o==null?void 0:o.message}`,l+=`
|
|
170
|
+
*/const Og=Ae("UsersIcon",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]]),Pg={key:0,class:"font-display text-[1.1rem] font-normal uppercase tracking-[0.18em] bg-gradient-brand bg-clip-text text-transparent"},Ig=["title"],$g={class:"flex-1 p-2 space-y-0.5 overflow-y-auto"},jg={key:0},Ng={class:"border-t border-border p-2 space-y-0.5"},Lg={key:0},Dg=["href"],sl="https://github.com/michaeljolley/io",Ug=pr({__name:"AppSidebar",setup(t){const e=jo(),r=Oe(!1),n=[{name:"History",icon:vg,path:"/history"},{name:"Squads",icon:Og,path:"/squads"},{name:"Health",icon:hg,path:"/squads/health"},{name:"Usage",icon:fg,path:"/usage"},{name:"Audit Log",icon:gg,path:"/audit-log"},{name:"Skills",icon:Eg,path:"/skills"},{name:"MCP Servers",icon:Ag,path:"/mcp"},{name:"Schedules",icon:mg,path:"/schedules"},{name:"Wiki",icon:dg,path:"/wiki"}],s=[{name:"Chat",icon:xu,path:"/"},{name:"Feed",icon:Au,path:"/feed"},{name:"Settings",icon:xg,path:"/settings"}],i="1.12.1",o=je(()=>{let l="";const c=[...n,...s];for(const u of c){const h=u.path;(h==="/"?e.path==="/":e.path===h||e.path.startsWith(h+"/"))&&h.length>l.length&&(l=h)}return l});function a(){r.value=!r.value}return(l,c)=>{const u=Zs("router-link");return Z(),ue("aside",{class:Ye(["border-r border-border bg-sidebar flex flex-col h-full shrink-0 transition-all duration-200",r.value?"w-16":"w-56"])},[ne("div",{class:Ye(["p-3 border-b border-border flex items-center",r.value?"justify-center":"justify-between"])},[he(u,{to:"/",class:Ye(["flex items-center gap-2",r.value?"justify-center":""])},{default:Yr(()=>[he(Zi,{size:24}),r.value?$e("",!0):(Z(),ue("h1",Pg,"IO"))]),_:1},8,["class"]),r.value?$e("",!0):(Z(),ue("button",{key:0,onClick:a,class:"p-1 rounded-full hover:bg-accent/70 text-muted-foreground hover:text-foreground transition-colors",title:r.value?"Expand sidebar":"Collapse sidebar"},[he(re(wg),{class:"w-4 h-4"})],8,Ig))],2),r.value?(Z(),ue("button",{key:0,onClick:a,class:"mx-auto mt-2 p-1.5 rounded-full hover:bg-accent/70 text-muted-foreground hover:text-foreground transition-colors",title:"Expand sidebar"},[he(re(kg),{class:"w-4 h-4"})])):$e("",!0),ne("nav",$g,[(Z(),ue(Fe,null,zr(n,h=>he(u,{key:h.path,to:h.path,class:Ye(["flex items-center gap-3 rounded-full text-sm transition-colors border border-transparent",[r.value?"justify-center px-2 py-2":"px-3 py-2",o.value===h.path?"bg-accent text-accent-foreground font-medium border border-white/10":"text-muted-foreground hover:bg-white/5 hover:text-foreground"]]),title:r.value?h.name:void 0},{default:Yr(()=>[(Z(),nt(sa(h.icon),{class:"w-4 h-4 shrink-0"})),r.value?$e("",!0):(Z(),ue("span",jg,it(h.name),1))]),_:2},1032,["to","class","title"])),64))]),ne("div",Ng,[(Z(),ue(Fe,null,zr(s,h=>he(u,{key:h.path,to:h.path,class:Ye(["flex items-center gap-3 rounded-full text-sm transition-colors border border-transparent",[r.value?"justify-center px-2 py-2":"px-3 py-2",o.value===h.path?"bg-accent text-accent-foreground font-medium border border-white/10":"text-muted-foreground hover:bg-white/5 hover:text-foreground"]]),title:r.value?h.name:void 0},{default:Yr(()=>[(Z(),nt(sa(h.icon),{class:"w-4 h-4 shrink-0"})),r.value?$e("",!0):(Z(),ue("span",Lg,it(h.name),1))]),_:2},1032,["to","class","title"])),64)),ne("div",{class:Ye(["flex items-center pt-2 mt-2 border-t border-border",r.value?"justify-center":"justify-between px-3"])},[r.value?$e("",!0):(Z(),ue("a",{key:0,href:`${sl}/releases/tag/v${re(i)}`,target:"_blank",class:"text-[10px] text-muted-foreground hover:text-foreground transition-colors",title:"Release notes"}," v"+it(re(i)),9,Dg)),ne("a",{href:sl,target:"_blank",class:"p-1 rounded-full hover:bg-accent/70 text-muted-foreground hover:text-foreground transition-colors",title:"GitHub repository"},[he(re(yg),{class:"w-3.5 h-3.5"})])],2)])],2)}}});function ii(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,n=Object.getOwnPropertySymbols(t);s<n.length;s++)e.indexOf(n[s])<0&&Object.prototype.propertyIsEnumerable.call(t,n[s])&&(r[n[s]]=t[n[s]]);return r}function Bg(t,e,r,n){function s(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function a(u){try{c(n.next(u))}catch(h){o(h)}}function l(u){try{c(n.throw(u))}catch(h){o(h)}}function c(u){u.done?i(u.value):s(u.value).then(a,l)}c((n=n.apply(t,e||[])).next())})}const Mg=t=>t?(...e)=>t(...e):(...e)=>fetch(...e);class No extends Error{constructor(e,r="FunctionsError",n){super(e),this.name=r,this.context=n}toJSON(){return{name:this.name,message:this.message,context:this.context}}}class Hg extends No{constructor(e){super("Failed to send a request to the Edge Function","FunctionsFetchError",e)}}class il extends No{constructor(e){super("Relay Error invoking the Edge Function","FunctionsRelayError",e)}}class ol extends No{constructor(e){super("Edge Function returned a non-2xx status code","FunctionsHttpError",e)}}var Qi;(function(t){t.Any="any",t.ApNortheast1="ap-northeast-1",t.ApNortheast2="ap-northeast-2",t.ApSouth1="ap-south-1",t.ApSoutheast1="ap-southeast-1",t.ApSoutheast2="ap-southeast-2",t.CaCentral1="ca-central-1",t.EuCentral1="eu-central-1",t.EuWest1="eu-west-1",t.EuWest2="eu-west-2",t.EuWest3="eu-west-3",t.SaEast1="sa-east-1",t.UsEast1="us-east-1",t.UsWest1="us-west-1",t.UsWest2="us-west-2"})(Qi||(Qi={}));class qg{constructor(e,{headers:r={},customFetch:n,region:s=Qi.Any}={}){this.url=e,this.headers=r,this.region=s,this.fetch=Mg(n)}setAuth(e){this.headers.Authorization=`Bearer ${e}`}invoke(e){return Bg(this,arguments,void 0,function*(r,n={}){var s;let i,o;try{const{headers:a,method:l,body:c,signal:u,timeout:h}=n;let d={},{region:f}=n;f||(f=this.region);const p=new URL(`${this.url}/${r}`);f&&f!=="any"&&(d["x-region"]=f,p.searchParams.set("forceFunctionRegion",f));let y;c&&(a&&!Object.prototype.hasOwnProperty.call(a,"Content-Type")||!a)?typeof Blob<"u"&&c instanceof Blob||c instanceof ArrayBuffer?(d["Content-Type"]="application/octet-stream",y=c):typeof c=="string"?(d["Content-Type"]="text/plain",y=c):typeof FormData<"u"&&c instanceof FormData?y=c:(d["Content-Type"]="application/json",y=JSON.stringify(c)):c&&typeof c!="string"&&!(typeof Blob<"u"&&c instanceof Blob)&&!(c instanceof ArrayBuffer)&&!(typeof FormData<"u"&&c instanceof FormData)?y=JSON.stringify(c):y=c;let w=u;h&&(o=new AbortController,i=setTimeout(()=>o.abort(),h),u?(w=o.signal,u.addEventListener("abort",()=>o.abort())):w=o.signal);const k=yield this.fetch(p.toString(),{method:l||"POST",headers:Object.assign(Object.assign(Object.assign({},d),this.headers),a),body:y,signal:w}).catch(D=>{throw new Hg(D)}),_=k.headers.get("x-relay-error");if(_&&_==="true")throw new il(k);if(!k.ok)throw new ol(k);let b=((s=k.headers.get("Content-Type"))!==null&&s!==void 0?s:"text/plain").split(";")[0].trim(),x;return b==="application/json"?x=yield k.json():b==="application/octet-stream"||b==="application/pdf"?x=yield k.blob():b==="text/event-stream"?x=k:b==="multipart/form-data"?x=yield k.formData():x=yield k.text(),{data:x,error:null,response:k}}catch(a){return{data:null,error:a,response:a instanceof ol||a instanceof il?a.context:void 0}}finally{i&&clearTimeout(i)}})}}const Ru=3,al=t=>Math.min(1e3*2**t,3e4),Fg=[520,503],Cu=["GET","HEAD","OPTIONS"];var Vg=class extends Error{constructor(t){super(t.message),this.name="PostgrestError",this.details=t.details,this.hint=t.hint,this.code=t.code}toJSON(){return{name:this.name,message:this.message,details:this.details,hint:this.hint,code:this.code}}};function ll(t,e){return new Promise(r=>{if(e!=null&&e.aborted){r();return}const n=setTimeout(()=>{e==null||e.removeEventListener("abort",s),r()},t);function s(){clearTimeout(n),r()}e==null||e.addEventListener("abort",s)})}function zg(t,e,r,n){return!(!n||r>=Ru||!Cu.includes(t)||!Fg.includes(e))}var Wg=class{constructor(t){var e,r,n,s,i;this.shouldThrowOnError=!1,this.retryEnabled=!0,this.method=t.method,this.url=t.url,this.headers=new Headers(t.headers),this.schema=t.schema,this.body=t.body,this.shouldThrowOnError=(e=t.shouldThrowOnError)!==null&&e!==void 0?e:!1,this.signal=t.signal,this.isMaybeSingle=(r=t.isMaybeSingle)!==null&&r!==void 0?r:!1,this.shouldStripNulls=(n=t.shouldStripNulls)!==null&&n!==void 0?n:!1,this.urlLengthLimit=(s=t.urlLengthLimit)!==null&&s!==void 0?s:8e3,this.retryEnabled=(i=t.retry)!==null&&i!==void 0?i:!0,t.fetch?this.fetch=t.fetch:this.fetch=fetch}throwOnError(){return this.shouldThrowOnError=!0,this}stripNulls(){if(this.headers.get("Accept")==="text/csv")throw new Error("stripNulls() cannot be used with csv()");return this.shouldStripNulls=!0,this}setHeader(t,e){return this.headers=new Headers(this.headers),this.headers.set(t,e),this}retry(t){return this.retryEnabled=t,this}then(t,e){var r=this;if(this.schema===void 0||(["GET","HEAD"].includes(this.method)?this.headers.set("Accept-Profile",this.schema):this.headers.set("Content-Profile",this.schema)),this.method!=="GET"&&this.method!=="HEAD"&&this.headers.set("Content-Type","application/json"),this.shouldStripNulls){const o=this.headers.get("Accept");o==="application/vnd.pgrst.object+json"?this.headers.set("Accept","application/vnd.pgrst.object+json;nulls=stripped"):(!o||o==="application/json")&&this.headers.set("Accept","application/vnd.pgrst.array+json;nulls=stripped")}const n=this.fetch;let i=(async()=>{let o=0;for(;;){const c=new Headers(r.headers);o>0&&c.set("X-Retry-Count",String(o));let u;try{u=await n(r.url.toString(),{method:r.method,headers:c,body:JSON.stringify(r.body,(h,d)=>typeof d=="bigint"?d.toString():d),signal:r.signal})}catch(h){if((h==null?void 0:h.name)==="AbortError"||(h==null?void 0:h.code)==="ABORT_ERR"||!Cu.includes(r.method))throw h;if(r.retryEnabled&&o<Ru){const d=al(o);o++,await ll(d,r.signal);continue}throw h}if(zg(r.method,u.status,o,r.retryEnabled)){var a,l;const h=(a=(l=u.headers)===null||l===void 0?void 0:l.get("Retry-After"))!==null&&a!==void 0?a:null,d=h!==null?Math.max(0,parseInt(h,10)||0)*1e3:al(o);await u.text(),o++,await ll(d,r.signal);continue}return await r.processResponse(u)}})();return this.shouldThrowOnError||(i=i.catch(o=>{var a;let l="",c="",u="";const h=o==null?void 0:o.cause;if(h){var d,f,p,y;const _=(d=h==null?void 0:h.message)!==null&&d!==void 0?d:"",b=(f=h==null?void 0:h.code)!==null&&f!==void 0?f:"";l=`${(p=o==null?void 0:o.name)!==null&&p!==void 0?p:"FetchError"}: ${o==null?void 0:o.message}`,l+=`
|
|
171
171
|
|
|
172
172
|
Caused by: ${(y=h==null?void 0:h.name)!==null&&y!==void 0?y:"Error"}: ${_}`,b&&(l+=` (${b})`),h!=null&&h.stack&&(l+=`
|
|
173
173
|
${h.stack}`)}else{var w;l=(w=o==null?void 0:o.stack)!==null&&w!==void 0?w:""}const k=this.url.toString().length;return(o==null?void 0:o.name)==="AbortError"||(o==null?void 0:o.code)==="ABORT_ERR"?(u="",c="Request was aborted (timeout or manual cancellation)",k>this.urlLengthLimit&&(c+=`. Note: Your request URL is ${k} characters, which may exceed server limits. If selecting many fields, consider using views. If filtering with large arrays (e.g., .in('id', [many IDs])), consider using an RPC function to pass values server-side.`)):((h==null?void 0:h.name)==="HeadersOverflowError"||(h==null?void 0:h.code)==="UND_ERR_HEADERS_OVERFLOW")&&(u="",c="HTTP headers exceeded server limits (typically 16KB)",k>this.urlLengthLimit&&(c+=`. Your request URL is ${k} characters. If selecting many fields, consider using views. If filtering with large arrays (e.g., .in('id', [200+ IDs])), consider using an RPC function instead.`)),{success:!1,error:{message:`${(a=o==null?void 0:o.name)!==null&&a!==void 0?a:"FetchError"}: ${o==null?void 0:o.message}`,details:l,hint:c,code:u},data:null,count:null,status:0,statusText:""}})),i.then(t,e)}async processResponse(t){var e=this;let r=null,n=null,s=null,i=t.status,o=t.statusText;if(t.ok){var a,l;if(e.method!=="HEAD"){var c;const d=await t.text();d===""||(e.headers.get("Accept")==="text/csv"||e.headers.get("Accept")&&(!((c=e.headers.get("Accept"))===null||c===void 0)&&c.includes("application/vnd.pgrst.plan+text"))?n=d:n=JSON.parse(d))}const u=(a=e.headers.get("Prefer"))===null||a===void 0?void 0:a.match(/count=(exact|planned|estimated)/),h=(l=t.headers.get("content-range"))===null||l===void 0?void 0:l.split("/");u&&h&&h.length>1&&(s=parseInt(h[1])),e.isMaybeSingle&&Array.isArray(n)&&(n.length>1?(r={code:"PGRST116",details:`Results contain ${n.length} rows, application/vnd.pgrst.object+json requires 1 row`,hint:null,message:"JSON object requested, multiple (or no) rows returned"},n=null,s=null,i=406,o="Not Acceptable"):n.length===1?n=n[0]:n=null)}else{const u=await t.text();try{r=JSON.parse(u),Array.isArray(r)&&t.status===404&&(n=[],r=null,i=200,o="OK")}catch{t.status===404&&u===""?(i=204,o="No Content"):r={message:u}}if(r&&e.shouldThrowOnError)throw new Vg(r)}return{success:r===null,error:r,data:n,count:s,status:i,statusText:o}}returns(){return this}overrideTypes(){return this}},Kg=class extends Wg{select(t){let e=!1;const r=(t??"*").split("").map(n=>/\s/.test(n)&&!e?"":(n==='"'&&(e=!e),n)).join("");return this.url.searchParams.set("select",r),this.headers.append("Prefer","return=representation"),this}order(t,{ascending:e=!0,nullsFirst:r,foreignTable:n,referencedTable:s=n}={}){const i=s?`${s}.order`:"order",o=this.url.searchParams.get(i);return this.url.searchParams.set(i,`${o?`${o},`:""}${t}.${e?"asc":"desc"}${r===void 0?"":r?".nullsfirst":".nullslast"}`),this}limit(t,{foreignTable:e,referencedTable:r=e}={}){const n=typeof r>"u"?"limit":`${r}.limit`;return this.url.searchParams.set(n,`${t}`),this}range(t,e,{foreignTable:r,referencedTable:n=r}={}){const s=typeof n>"u"?"offset":`${n}.offset`,i=typeof n>"u"?"limit":`${n}.limit`;return this.url.searchParams.set(s,`${t}`),this.url.searchParams.set(i,`${e-t+1}`),this}abortSignal(t){return this.signal=t,this}single(){return this.headers.set("Accept","application/vnd.pgrst.object+json"),this}maybeSingle(){return this.isMaybeSingle=!0,this}csv(){return this.headers.set("Accept","text/csv"),this}geojson(){return this.headers.set("Accept","application/geo+json"),this}explain({analyze:t=!1,verbose:e=!1,settings:r=!1,buffers:n=!1,wal:s=!1,format:i="text"}={}){var o;const a=[t?"analyze":null,e?"verbose":null,r?"settings":null,n?"buffers":null,s?"wal":null].filter(Boolean).join("|"),l=(o=this.headers.get("Accept"))!==null&&o!==void 0?o:"application/json";return this.headers.set("Accept",`application/vnd.pgrst.plan+${i}; for="${l}"; options=${a};`),i==="json"?this:this}rollback(){return this.headers.append("Prefer","tx=rollback"),this}returns(){return this}maxAffected(t){return this.headers.append("Prefer","handling=strict"),this.headers.append("Prefer",`max-affected=${t}`),this}};const cl=new RegExp("[,()]");var Hr=class extends Kg{eq(t,e){return this.url.searchParams.append(t,`eq.${e}`),this}neq(t,e){return this.url.searchParams.append(t,`neq.${e}`),this}gt(t,e){return this.url.searchParams.append(t,`gt.${e}`),this}gte(t,e){return this.url.searchParams.append(t,`gte.${e}`),this}lt(t,e){return this.url.searchParams.append(t,`lt.${e}`),this}lte(t,e){return this.url.searchParams.append(t,`lte.${e}`),this}like(t,e){return this.url.searchParams.append(t,`like.${e}`),this}likeAllOf(t,e){return this.url.searchParams.append(t,`like(all).{${e.join(",")}}`),this}likeAnyOf(t,e){return this.url.searchParams.append(t,`like(any).{${e.join(",")}}`),this}ilike(t,e){return this.url.searchParams.append(t,`ilike.${e}`),this}ilikeAllOf(t,e){return this.url.searchParams.append(t,`ilike(all).{${e.join(",")}}`),this}ilikeAnyOf(t,e){return this.url.searchParams.append(t,`ilike(any).{${e.join(",")}}`),this}regexMatch(t,e){return this.url.searchParams.append(t,`match.${e}`),this}regexIMatch(t,e){return this.url.searchParams.append(t,`imatch.${e}`),this}is(t,e){return this.url.searchParams.append(t,`is.${e}`),this}isDistinct(t,e){return this.url.searchParams.append(t,`isdistinct.${e}`),this}in(t,e){const r=Array.from(new Set(e)).map(n=>typeof n=="string"&&cl.test(n)?`"${n}"`:`${n}`).join(",");return this.url.searchParams.append(t,`in.(${r})`),this}notIn(t,e){const r=Array.from(new Set(e)).map(n=>typeof n=="string"&&cl.test(n)?`"${n}"`:`${n}`).join(",");return this.url.searchParams.append(t,`not.in.(${r})`),this}contains(t,e){return typeof e=="string"?this.url.searchParams.append(t,`cs.${e}`):Array.isArray(e)?this.url.searchParams.append(t,`cs.{${e.join(",")}}`):this.url.searchParams.append(t,`cs.${JSON.stringify(e)}`),this}containedBy(t,e){return typeof e=="string"?this.url.searchParams.append(t,`cd.${e}`):Array.isArray(e)?this.url.searchParams.append(t,`cd.{${e.join(",")}}`):this.url.searchParams.append(t,`cd.${JSON.stringify(e)}`),this}rangeGt(t,e){return this.url.searchParams.append(t,`sr.${e}`),this}rangeGte(t,e){return this.url.searchParams.append(t,`nxl.${e}`),this}rangeLt(t,e){return this.url.searchParams.append(t,`sl.${e}`),this}rangeLte(t,e){return this.url.searchParams.append(t,`nxr.${e}`),this}rangeAdjacent(t,e){return this.url.searchParams.append(t,`adj.${e}`),this}overlaps(t,e){return typeof e=="string"?this.url.searchParams.append(t,`ov.${e}`):this.url.searchParams.append(t,`ov.{${e.join(",")}}`),this}textSearch(t,e,{config:r,type:n}={}){let s="";n==="plain"?s="pl":n==="phrase"?s="ph":n==="websearch"&&(s="w");const i=r===void 0?"":`(${r})`;return this.url.searchParams.append(t,`${s}fts${i}.${e}`),this}match(t){return Object.entries(t).filter(([e,r])=>r!==void 0).forEach(([e,r])=>{this.url.searchParams.append(e,`eq.${r}`)}),this}not(t,e,r){return this.url.searchParams.append(t,`not.${e}.${r}`),this}or(t,{foreignTable:e,referencedTable:r=e}={}){const n=r?`${r}.or`:"or";return this.url.searchParams.append(n,`(${t})`),this}filter(t,e,r){return this.url.searchParams.append(t,`${e}.${r}`),this}},Gg=class{constructor(t,{headers:e={},schema:r,fetch:n,urlLengthLimit:s=8e3,retry:i}){this.url=t,this.headers=new Headers(e),this.schema=r,this.fetch=n,this.urlLengthLimit=s,this.retry=i}cloneRequestState(){return{url:new URL(this.url.toString()),headers:new Headers(this.headers)}}select(t,e){const{head:r=!1,count:n}=e??{},s=r?"HEAD":"GET";let i=!1;const o=(t??"*").split("").map(c=>/\s/.test(c)&&!i?"":(c==='"'&&(i=!i),c)).join(""),{url:a,headers:l}=this.cloneRequestState();return a.searchParams.set("select",o),n&&l.append("Prefer",`count=${n}`),new Hr({method:s,url:a,headers:l,schema:this.schema,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}insert(t,{count:e,defaultToNull:r=!0}={}){var n;const s="POST",{url:i,headers:o}=this.cloneRequestState();if(e&&o.append("Prefer",`count=${e}`),r||o.append("Prefer","missing=default"),Array.isArray(t)){const a=t.reduce((l,c)=>l.concat(Object.keys(c)),[]);if(a.length>0){const l=[...new Set(a)].map(c=>`"${c}"`);i.searchParams.set("columns",l.join(","))}}return new Hr({method:s,url:i,headers:o,schema:this.schema,body:t,fetch:(n=this.fetch)!==null&&n!==void 0?n:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}upsert(t,{onConflict:e,ignoreDuplicates:r=!1,count:n,defaultToNull:s=!0}={}){var i;const o="POST",{url:a,headers:l}=this.cloneRequestState();if(l.append("Prefer",`resolution=${r?"ignore":"merge"}-duplicates`),e!==void 0&&a.searchParams.set("on_conflict",e),n&&l.append("Prefer",`count=${n}`),s||l.append("Prefer","missing=default"),Array.isArray(t)){const c=t.reduce((u,h)=>u.concat(Object.keys(h)),[]);if(c.length>0){const u=[...new Set(c)].map(h=>`"${h}"`);a.searchParams.set("columns",u.join(","))}}return new Hr({method:o,url:a,headers:l,schema:this.schema,body:t,fetch:(i=this.fetch)!==null&&i!==void 0?i:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}update(t,{count:e}={}){var r;const n="PATCH",{url:s,headers:i}=this.cloneRequestState();return e&&i.append("Prefer",`count=${e}`),new Hr({method:n,url:s,headers:i,schema:this.schema,body:t,fetch:(r=this.fetch)!==null&&r!==void 0?r:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}delete({count:t}={}){var e;const r="DELETE",{url:n,headers:s}=this.cloneRequestState();return t&&s.append("Prefer",`count=${t}`),new Hr({method:r,url:n,headers:s,schema:this.schema,fetch:(e=this.fetch)!==null&&e!==void 0?e:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}};function Vn(t){"@babel/helpers - typeof";return Vn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Vn(t)}function Jg(t,e){if(Vn(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(Vn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Yg(t){var e=Jg(t,"string");return Vn(e)=="symbol"?e:e+""}function Xg(t,e,r){return(e=Yg(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function ul(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),r.push.apply(r,n)}return r}function os(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?ul(Object(r),!0).forEach(function(n){Xg(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ul(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var Zg=class Ou{constructor(e,{headers:r={},schema:n,fetch:s,timeout:i,urlLengthLimit:o=8e3,retry:a}={}){this.url=e,this.headers=new Headers(r),this.schemaName=n,this.urlLengthLimit=o;const l=s??globalThis.fetch;i!==void 0&&i>0?this.fetch=(c,u)=>{const h=new AbortController,d=setTimeout(()=>h.abort(),i),f=u==null?void 0:u.signal;if(f){if(f.aborted)return clearTimeout(d),l(c,u);const p=()=>{clearTimeout(d),h.abort()};return f.addEventListener("abort",p,{once:!0}),l(c,os(os({},u),{},{signal:h.signal})).finally(()=>{clearTimeout(d),f.removeEventListener("abort",p)})}return l(c,os(os({},u),{},{signal:h.signal})).finally(()=>clearTimeout(d))}:this.fetch=l,this.retry=a}from(e){if(!e||typeof e!="string"||e.trim()==="")throw new Error("Invalid relation name: relation must be a non-empty string.");return new Gg(new URL(`${this.url}/${e}`),{headers:new Headers(this.headers),schema:this.schemaName,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}schema(e){return new Ou(this.url,{headers:this.headers,schema:e,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}rpc(e,r={},{head:n=!1,get:s=!1,count:i}={}){var o;let a;const l=new URL(`${this.url}/rpc/${e}`);let c;const u=f=>f!==null&&typeof f=="object"&&(!Array.isArray(f)||f.some(u)),h=n&&Object.values(r).some(u);h?(a="POST",c=r):n||s?(a=n?"HEAD":"GET",Object.entries(r).filter(([f,p])=>p!==void 0).map(([f,p])=>[f,Array.isArray(p)?`{${p.join(",")}}`:`${p}`]).forEach(([f,p])=>{l.searchParams.append(f,p)})):(a="POST",c=r);const d=new Headers(this.headers);return h?d.set("Prefer",i?`count=${i},return=minimal`:"return=minimal"):i&&d.set("Prefer",`count=${i}`),new Hr({method:a,url:l,headers:d,schema:this.schemaName,body:c,fetch:(o=this.fetch)!==null&&o!==void 0?o:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}};class Qg{constructor(){}static detectEnvironment(){var e;if(typeof WebSocket<"u")return{type:"native",wsConstructor:WebSocket};const r=globalThis;if(typeof globalThis<"u"&&typeof r.WebSocket<"u")return{type:"native",wsConstructor:r.WebSocket};const n=typeof global<"u"?global:void 0;if(n&&typeof n.WebSocket<"u")return{type:"native",wsConstructor:n.WebSocket};if(typeof globalThis<"u"&&typeof r.WebSocketPair<"u"&&typeof globalThis.WebSocket>"u")return{type:"cloudflare",error:"Cloudflare Workers detected. WebSocket clients are not supported in Cloudflare Workers.",workaround:"Use Cloudflare Workers WebSocket API for server-side WebSocket handling, or deploy to a different runtime."};if(typeof globalThis<"u"&&r.EdgeRuntime||typeof navigator<"u"&&(!((e=navigator.userAgent)===null||e===void 0)&&e.includes("Vercel-Edge")))return{type:"unsupported",error:"Edge runtime detected (Vercel Edge/Netlify Edge). WebSockets are not supported in edge functions.",workaround:"Use serverless functions or a different deployment target for WebSocket functionality."};const s=globalThis.process;if(s){const i=s.versions;if(i&&i.node){const o=i.node,a=parseInt(o.replace(/^v/,"").split(".")[0]);return a>=22?typeof globalThis.WebSocket<"u"?{type:"native",wsConstructor:globalThis.WebSocket}:{type:"unsupported",error:`Node.js ${a} detected but native WebSocket not found.`,workaround:"Provide a WebSocket implementation via the transport option."}:{type:"unsupported",error:`Node.js ${a} detected without native WebSocket support.`,workaround:`For Node.js < 22, install "ws" package and provide it via the transport option:
|
|
@@ -210,9 +210,9 @@ Request ID: ${l}`),c){let _=`
|
|
|
210
210
|
Resources:`;for(const b of c){if(!b||typeof b!="string")throw new Error(`@supabase/auth-js: Invalid SIWE message field "resources". Every resource must be a valid string. Provided value: ${b}`);_+=`
|
|
211
211
|
- ${b}`}k+=_}return`${w}
|
|
212
212
|
${k}`}class Ie extends Error{constructor({message:e,code:r,cause:n,name:s}){var i;super(e,{cause:n}),this.__isWebAuthnError=!0,this.name=(i=s??(n instanceof Error?n.name:void 0))!==null&&i!==void 0?i:"Unknown Error",this.code=r}toJSON(){return{name:this.name,message:this.message,code:this.code}}}class $s extends Ie{constructor(e,r){super({code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:r,message:e}),this.name="WebAuthnUnknownError",this.originalError=r}}function ev({error:t,options:e}){var r,n,s;const{publicKey:i}=e;if(!i)throw Error("options was missing required publicKey property");if(t.name==="AbortError"){if(e.signal instanceof AbortSignal)return new Ie({message:"Registration ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:t})}else if(t.name==="ConstraintError"){if(((r=i.authenticatorSelection)===null||r===void 0?void 0:r.requireResidentKey)===!0)return new Ie({message:"Discoverable credentials were required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_DISCOVERABLE_CREDENTIAL_SUPPORT",cause:t});if(e.mediation==="conditional"&&((n=i.authenticatorSelection)===null||n===void 0?void 0:n.userVerification)==="required")return new Ie({message:"User verification was required during automatic registration but it could not be performed",code:"ERROR_AUTO_REGISTER_USER_VERIFICATION_FAILURE",cause:t});if(((s=i.authenticatorSelection)===null||s===void 0?void 0:s.userVerification)==="required")return new Ie({message:"User verification was required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_USER_VERIFICATION_SUPPORT",cause:t})}else{if(t.name==="InvalidStateError")return new Ie({message:"The authenticator was previously registered",code:"ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED",cause:t});if(t.name==="NotAllowedError")return new Ie({message:t.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:t});if(t.name==="NotSupportedError")return i.pubKeyCredParams.filter(a=>a.type==="public-key").length===0?new Ie({message:'No entry in pubKeyCredParams was of type "public-key"',code:"ERROR_MALFORMED_PUBKEYCREDPARAMS",cause:t}):new Ie({message:"No available authenticator supported any of the specified pubKeyCredParams algorithms",code:"ERROR_AUTHENTICATOR_NO_SUPPORTED_PUBKEYCREDPARAMS_ALG",cause:t});if(t.name==="SecurityError"){const o=window.location.hostname;if(Ku(o)){if(i.rp.id!==o)return new Ie({message:`The RP ID "${i.rp.id}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:t})}else return new Ie({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:t})}else if(t.name==="TypeError"){if(i.user.id.byteLength<1||i.user.id.byteLength>64)return new Ie({message:"User ID was not between 1 and 64 characters",code:"ERROR_INVALID_USER_ID_LENGTH",cause:t})}else if(t.name==="UnknownError")return new Ie({message:"The authenticator was unable to process the specified options, or could not create a new credential",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:t})}return new Ie({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:t})}function tv({error:t,options:e}){const{publicKey:r}=e;if(!r)throw Error("options was missing required publicKey property");if(t.name==="AbortError"){if(e.signal instanceof AbortSignal)return new Ie({message:"Authentication ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:t})}else{if(t.name==="NotAllowedError")return new Ie({message:t.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:t});if(t.name==="SecurityError"){const n=window.location.hostname;if(Ku(n)){if(r.rpId!==n)return new Ie({message:`The RP ID "${r.rpId}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:t})}else return new Ie({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:t})}else if(t.name==="UnknownError")return new Ie({message:"The authenticator was unable to process the specified options, or could not create a new assertion signature",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:t})}return new Ie({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:t})}class rv{createNewAbortSignal(){if(this.controller){const r=new Error("Cancelling existing WebAuthn API call for new one");r.name="AbortError",this.controller.abort(r)}const e=new AbortController;return this.controller=e,e.signal}cancelCeremony(){if(this.controller){const e=new Error("Manually cancelling existing WebAuthn API call");e.name="AbortError",this.controller.abort(e),this.controller=void 0}}}const ho=new rv;function Ol(t){if(!t)throw new Error("Credential creation options are required");if(typeof PublicKeyCredential<"u"&&"parseCreationOptionsFromJSON"in PublicKeyCredential&&typeof PublicKeyCredential.parseCreationOptionsFromJSON=="function")return PublicKeyCredential.parseCreationOptionsFromJSON(t);const{challenge:e,user:r,excludeCredentials:n}=t,s=ii(t,["challenge","user","excludeCredentials"]),i=Xr(e).buffer,o=Object.assign(Object.assign({},r),{id:Xr(r.id).buffer}),a=Object.assign(Object.assign({},s),{challenge:i,user:o});if(n&&n.length>0){a.excludeCredentials=new Array(n.length);for(let l=0;l<n.length;l++){const c=n[l];a.excludeCredentials[l]=Object.assign(Object.assign({},c),{id:Xr(c.id).buffer,type:c.type||"public-key",transports:c.transports})}}return a}function Pl(t){if(!t)throw new Error("Credential request options are required");if(typeof PublicKeyCredential<"u"&&"parseRequestOptionsFromJSON"in PublicKeyCredential&&typeof PublicKeyCredential.parseRequestOptionsFromJSON=="function")return PublicKeyCredential.parseRequestOptionsFromJSON(t);const{challenge:e,allowCredentials:r}=t,n=ii(t,["challenge","allowCredentials"]),s=Xr(e).buffer,i=Object.assign(Object.assign({},n),{challenge:s});if(r&&r.length>0){i.allowCredentials=new Array(r.length);for(let o=0;o<r.length;o++){const a=r[o];i.allowCredentials[o]=Object.assign(Object.assign({},a),{id:Xr(a.id).buffer,type:a.type||"public-key",transports:a.transports})}}return i}function Il(t){var e;if("toJSON"in t&&typeof t.toJSON=="function")return t.toJSON();const r=t;return{id:t.id,rawId:t.id,response:{attestationObject:Ar(new Uint8Array(t.response.attestationObject)),clientDataJSON:Ar(new Uint8Array(t.response.clientDataJSON))},type:"public-key",clientExtensionResults:t.getClientExtensionResults(),authenticatorAttachment:(e=r.authenticatorAttachment)!==null&&e!==void 0?e:void 0}}function $l(t){var e;if("toJSON"in t&&typeof t.toJSON=="function")return t.toJSON();const r=t,n=t.getClientExtensionResults(),s=t.response;return{id:t.id,rawId:t.id,response:{authenticatorData:Ar(new Uint8Array(s.authenticatorData)),clientDataJSON:Ar(new Uint8Array(s.clientDataJSON)),signature:Ar(new Uint8Array(s.signature)),userHandle:s.userHandle?Ar(new Uint8Array(s.userHandle)):void 0},type:"public-key",clientExtensionResults:n,authenticatorAttachment:(e=r.authenticatorAttachment)!==null&&e!==void 0?e:void 0}}function Ku(t){return t==="localhost"||/^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(t)}function js(){var t,e;return!!(qe()&&"PublicKeyCredential"in window&&window.PublicKeyCredential&&"credentials"in navigator&&typeof((t=navigator==null?void 0:navigator.credentials)===null||t===void 0?void 0:t.create)=="function"&&typeof((e=navigator==null?void 0:navigator.credentials)===null||e===void 0?void 0:e.get)=="function")}async function Gu(t){try{const e=await navigator.credentials.create(t);return e?e instanceof PublicKeyCredential?{data:e,error:null}:{data:null,error:new $s("Browser returned unexpected credential type",e)}:{data:null,error:new $s("Empty credential response",e)}}catch(e){return{data:null,error:ev({error:e,options:t})}}}async function Ju(t){try{const e=await navigator.credentials.get(t);return e?e instanceof PublicKeyCredential?{data:e,error:null}:{data:null,error:new $s("Browser returned unexpected credential type",e)}:{data:null,error:new $s("Empty credential response",e)}}catch(e){return{data:null,error:tv({error:e,options:t})}}}const nv={hints:["security-key"],authenticatorSelection:{authenticatorAttachment:"cross-platform",requireResidentKey:!1,userVerification:"preferred",residentKey:"discouraged"},attestation:"direct"},sv={userVerification:"preferred",hints:["security-key"],attestation:"direct"};function Ns(...t){const e=s=>s!==null&&typeof s=="object"&&!Array.isArray(s),r=s=>s instanceof ArrayBuffer||ArrayBuffer.isView(s),n={};for(const s of t)if(s)for(const i in s){const o=s[i];if(o!==void 0)if(Array.isArray(o))n[i]=o;else if(r(o))n[i]=o;else if(e(o)){const a=n[i];e(a)?n[i]=Ns(a,o):n[i]=Ns(o)}else n[i]=o}return n}function iv(t,e){return Ns(nv,t,e||{})}function ov(t,e){return Ns(sv,t,e||{})}class av{constructor(e){this.client=e,this.enroll=this._enroll.bind(this),this.challenge=this._challenge.bind(this),this.verify=this._verify.bind(this),this.authenticate=this._authenticate.bind(this),this.register=this._register.bind(this)}async _enroll(e){return this.client.mfa.enroll(Object.assign(Object.assign({},e),{factorType:"webauthn"}))}async _challenge({factorId:e,webauthn:r,friendlyName:n,signal:s},i){var o;try{const{data:a,error:l}=await this.client.mfa.challenge({factorId:e,webauthn:r});if(!a)return{data:null,error:l};const c=s??ho.createNewAbortSignal();if(a.webauthn.type==="create"){const{user:u}=a.webauthn.credential_options.publicKey;if(!u.name){const h=n;if(h)u.name=`${u.id}:${h}`;else{const f=(await this.client.getUser()).data.user,p=((o=f==null?void 0:f.user_metadata)===null||o===void 0?void 0:o.name)||(f==null?void 0:f.email)||(f==null?void 0:f.id)||"User";u.name=`${u.id}:${p}`}}u.displayName||(u.displayName=u.name)}switch(a.webauthn.type){case"create":{const u=iv(a.webauthn.credential_options.publicKey,i==null?void 0:i.create),{data:h,error:d}=await Gu({publicKey:u,signal:c});return h?{data:{factorId:e,challengeId:a.id,webauthn:{type:a.webauthn.type,credential_response:h}},error:null}:{data:null,error:d}}case"request":{const u=ov(a.webauthn.credential_options.publicKey,i==null?void 0:i.request),{data:h,error:d}=await Ju(Object.assign(Object.assign({},a.webauthn.credential_options),{publicKey:u,signal:c}));return h?{data:{factorId:e,challengeId:a.id,webauthn:{type:a.webauthn.type,credential_response:h}},error:null}:{data:null,error:d}}}}catch(a){return $(a)?{data:null,error:a}:{data:null,error:new yt("Unexpected error in challenge",a)}}}async _verify({challengeId:e,factorId:r,webauthn:n}){return this.client.mfa.verify({factorId:r,challengeId:e,webauthn:n})}async _authenticate({factorId:e,webauthn:{rpId:r=typeof window<"u"?window.location.hostname:void 0,rpOrigins:n=typeof window<"u"?[window.location.origin]:void 0,signal:s}={}},i){if(!r)return{data:null,error:new nn("rpId is required for WebAuthn authentication")};try{if(!js())return{data:null,error:new yt("Browser does not support WebAuthn",null)};const{data:o,error:a}=await this.challenge({factorId:e,webauthn:{rpId:r,rpOrigins:n},signal:s},{request:i});if(!o)return{data:null,error:a};const{webauthn:l}=o;return this._verify({factorId:e,challengeId:o.challengeId,webauthn:{type:l.type,rpId:r,rpOrigins:n,credential_response:l.credential_response}})}catch(o){return $(o)?{data:null,error:o}:{data:null,error:new yt("Unexpected error in authenticate",o)}}}async _register({friendlyName:e,webauthn:{rpId:r=typeof window<"u"?window.location.hostname:void 0,rpOrigins:n=typeof window<"u"?[window.location.origin]:void 0,signal:s}={}},i){if(!r)return{data:null,error:new nn("rpId is required for WebAuthn registration")};try{if(!js())return{data:null,error:new yt("Browser does not support WebAuthn",null)};const{data:o,error:a}=await this._enroll({friendlyName:e});if(!o)return await this.client.mfa.listFactors().then(u=>{var h;return(h=u.data)===null||h===void 0?void 0:h.all.find(d=>d.factor_type==="webauthn"&&d.friendly_name===e&&d.status!=="unverified")}).then(u=>u?this.client.mfa.unenroll({factorId:u==null?void 0:u.id}):void 0),{data:null,error:a};const{data:l,error:c}=await this._challenge({factorId:o.id,friendlyName:o.friendly_name,webauthn:{rpId:r,rpOrigins:n},signal:s},{create:i});return l?this._verify({factorId:o.id,challengeId:l.challengeId,webauthn:{rpId:r,rpOrigins:n,type:l.webauthn.type,credential_response:l.webauthn.credential_response}}):{data:null,error:c}}catch(o){return $(o)?{data:null,error:o}:{data:null,error:new yt("Unexpected error in register",o)}}}}Yy();const lv={url:dy,storageKey:fy,autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,headers:py,flowType:"implicit",debug:!1,hasCustomAuthorizationHeader:!1,throwOnError:!1,lockAcquireTimeout:5e3,skipAutoInitialize:!1,experimental:{}};async function jl(t,e,r){return await r()}const Ur={};class Gn{get jwks(){var e,r;return(r=(e=Ur[this.storageKey])===null||e===void 0?void 0:e.jwks)!==null&&r!==void 0?r:{keys:[]}}set jwks(e){Ur[this.storageKey]=Object.assign(Object.assign({},Ur[this.storageKey]),{jwks:e})}get jwks_cached_at(){var e,r;return(r=(e=Ur[this.storageKey])===null||e===void 0?void 0:e.cachedAt)!==null&&r!==void 0?r:Number.MIN_SAFE_INTEGER}set jwks_cached_at(e){Ur[this.storageKey]=Object.assign(Object.assign({},Ur[this.storageKey]),{cachedAt:e})}constructor(e){var r,n,s,i;this.userStorage=null,this.memoryStorage=null,this.stateChangeEmitters=new Map,this.autoRefreshTicker=null,this.autoRefreshTickTimeout=null,this.visibilityChangedCallback=null,this.refreshingDeferred=null,this.initializePromise=null,this.detectSessionInUrl=!0,this.hasCustomAuthorizationHeader=!1,this.suppressGetSessionWarning=!1,this.lockAcquired=!1,this.pendingInLock=[],this.broadcastChannel=null,this.logger=console.log;const o=Object.assign(Object.assign({},lv),e);if(this.storageKey=o.storageKey,this.instanceID=(r=Gn.nextInstanceID[this.storageKey])!==null&&r!==void 0?r:0,Gn.nextInstanceID[this.storageKey]=this.instanceID+1,this.logDebugMessages=!!o.debug,typeof o.debug=="function"&&(this.logger=o.debug),this.instanceID>0&&qe()){const a=`${this._logPrefix()} 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.`;console.warn(a),this.logDebugMessages&&console.trace(a)}if(this.persistSession=o.persistSession,this.autoRefreshToken=o.autoRefreshToken,this.experimental=(n=o.experimental)!==null&&n!==void 0?n:{},this.admin=new Gy({url:o.url,headers:o.headers,fetch:o.fetch,experimental:this.experimental}),this.url=o.url,this.headers=o.headers,this.fetch=Vu(o.fetch),this.lock=o.lock||jl,this.detectSessionInUrl=o.detectSessionInUrl,this.flowType=o.flowType,this.hasCustomAuthorizationHeader=o.hasCustomAuthorizationHeader,this.throwOnError=o.throwOnError,this.lockAcquireTimeout=o.lockAcquireTimeout,o.lock?this.lock=o.lock:this.persistSession&&qe()&&(!((s=globalThis==null?void 0:globalThis.navigator)===null||s===void 0)&&s.locks)?this.lock=Jy:this.lock=jl,this.jwks||(this.jwks={keys:[]},this.jwks_cached_at=Number.MIN_SAFE_INTEGER),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),webauthn:new av(this)},this.oauth={getAuthorizationDetails:this._getAuthorizationDetails.bind(this),approveAuthorization:this._approveAuthorization.bind(this),denyAuthorization:this._denyAuthorization.bind(this),listGrants:this._listOAuthGrants.bind(this),revokeGrant:this._revokeOAuthGrant.bind(this)},this.passkey={startRegistration:this._startPasskeyRegistration.bind(this),verifyRegistration:this._verifyPasskeyRegistration.bind(this),startAuthentication:this._startPasskeyAuthentication.bind(this),verifyAuthentication:this._verifyPasskeyAuthentication.bind(this),list:this._listPasskeys.bind(this),update:this._updatePasskey.bind(this),delete:this._deletePasskey.bind(this)},this.persistSession?(o.storage?this.storage=o.storage:Fu()?this.storage=globalThis.localStorage:(this.memoryStorage={},this.storage=Rl(this.memoryStorage)),o.userStorage&&(this.userStorage=o.userStorage)):(this.memoryStorage={},this.storage=Rl(this.memoryStorage)),qe()&&globalThis.BroadcastChannel&&this.persistSession&&this.storageKey){try{this.broadcastChannel=new globalThis.BroadcastChannel(this.storageKey)}catch(a){console.error("Failed to create a new BroadcastChannel, multi-tab state changes will not be available",a)}(i=this.broadcastChannel)===null||i===void 0||i.addEventListener("message",async a=>{this._debug("received broadcast notification from other tab or client",a);try{await this._notifyAllSubscribers(a.data.event,a.data.session,!1)}catch(l){this._debug("#broadcastChannel","error",l)}})}o.skipAutoInitialize||this.initialize().catch(a=>{this._debug("#initialize()","error",a)})}isThrowOnErrorEnabled(){return this.throwOnError}_returnResult(e){if(this.throwOnError&&e&&e.error)throw e.error;return e}_logPrefix(){return`GoTrueClient@${this.storageKey}:${this.instanceID} (${Mu}) ${new Date().toISOString()}`}_debug(...e){return this.logDebugMessages&&this.logger(this._logPrefix(),...e),this}async initialize(){return this.initializePromise?await this.initializePromise:(this.initializePromise=(async()=>await this._acquireLock(this.lockAcquireTimeout,async()=>await this._initialize()))(),await this.initializePromise)}async _initialize(){var e;try{let r={},n="none";if(qe()&&(r=Ry(window.location.href),this._isImplicitGrantCallback(r)?n="implicit":await this._isPKCECallback(r)&&(n="pkce")),qe()&&this.detectSessionInUrl&&n!=="none"){const{data:s,error:i}=await this._getSessionFromURL(r,n);if(i){if(this._debug("#_initialize()","error detecting session from URL",i),by(i)){const l=(e=i.details)===null||e===void 0?void 0:e.code;if(l==="identity_already_exists"||l==="identity_not_found"||l==="single_identity_not_deletable")return{error:i}}return{error:i}}const{session:o,redirectType:a}=s;return this._debug("#_initialize()","detected session in URL",o,"redirect type",a),await this._saveSession(o),setTimeout(async()=>{a==="recovery"?await this._notifyAllSubscribers("PASSWORD_RECOVERY",o):await this._notifyAllSubscribers("SIGNED_IN",o)},0),{error:null}}return await this._recoverAndRefresh(),{error:null}}catch(r){return $(r)?this._returnResult({error:r}):this._returnResult({error:new yt("Unexpected error during initialization",r)})}finally{await this._handleVisibilityChange(),this._debug("#_initialize()","end")}}async signInAnonymously(e){var r,n,s;try{const i=await q(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{data:(n=(r=e==null?void 0:e.options)===null||r===void 0?void 0:r.data)!==null&&n!==void 0?n:{},gotrue_meta_security:{captcha_token:(s=e==null?void 0:e.options)===null||s===void 0?void 0:s.captchaToken}},xform:dt}),{data:o,error:a}=i;if(a||!o)return this._returnResult({data:{user:null,session:null},error:a});const l=o.session,c=o.user;return o.session&&(await this._saveSession(o.session),await this._notifyAllSubscribers("SIGNED_IN",l)),this._returnResult({data:{user:c,session:l},error:null})}catch(i){if($(i))return this._returnResult({data:{user:null,session:null},error:i});throw i}}async signUp(e){var r,n,s;try{let i;if("email"in e){const{email:u,password:h,options:d}=e;let f=null,p=null;this.flowType==="pkce"&&([f,p]=await Dr(this.storage,this.storageKey)),i=await q(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,redirectTo:d==null?void 0:d.emailRedirectTo,body:{email:u,password:h,data:(r=d==null?void 0:d.data)!==null&&r!==void 0?r:{},gotrue_meta_security:{captcha_token:d==null?void 0:d.captchaToken},code_challenge:f,code_challenge_method:p},xform:dt})}else if("phone"in e){const{phone:u,password:h,options:d}=e;i=await q(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{phone:u,password:h,data:(n=d==null?void 0:d.data)!==null&&n!==void 0?n:{},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:dt})}else throw new hs("You must provide either an email or phone number and a password");const{data:o,error:a}=i;if(a||!o)return await He(this.storage,`${this.storageKey}-code-verifier`),this._returnResult({data:{user:null,session:null},error:a});const l=o.session,c=o.user;return o.session&&(await this._saveSession(o.session),await this._notifyAllSubscribers("SIGNED_IN",l)),this._returnResult({data:{user:c,session:l},error:null})}catch(i){if(await He(this.storage,`${this.storageKey}-code-verifier`),$(i))return this._returnResult({data:{user:null,session:null},error:i});throw i}}async signInWithPassword(e){try{let r;if("email"in e){const{email:i,password:o,options:a}=e;r=await q(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{email:i,password:o,gotrue_meta_security:{captcha_token:a==null?void 0:a.captchaToken}},xform:Al})}else if("phone"in e){const{phone:i,password:o,options:a}=e;r=await q(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{phone:i,password:o,gotrue_meta_security:{captcha_token:a==null?void 0:a.captchaToken}},xform:Al})}else throw new hs("You must provide either an email or phone number and a password");const{data:n,error:s}=r;if(s)return this._returnResult({data:{user:null,session:null},error:s});if(!n||!n.session||!n.user){const i=new Lr;return this._returnResult({data:{user:null,session:null},error:i})}return n.session&&(await this._saveSession(n.session),await this._notifyAllSubscribers("SIGNED_IN",n.session)),this._returnResult({data:Object.assign({user:n.user,session:n.session},n.weak_password?{weakPassword:n.weak_password}:null),error:s})}catch(r){if($(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async signInWithOAuth(e){var r,n,s,i;return await this._handleProviderSignIn(e.provider,{redirectTo:(r=e.options)===null||r===void 0?void 0:r.redirectTo,scopes:(n=e.options)===null||n===void 0?void 0:n.scopes,queryParams:(s=e.options)===null||s===void 0?void 0:s.queryParams,skipBrowserRedirect:(i=e.options)===null||i===void 0?void 0:i.skipBrowserRedirect})}async exchangeCodeForSession(e){return await this.initializePromise,this._acquireLock(this.lockAcquireTimeout,async()=>this._exchangeCodeForSession(e))}async signInWithWeb3(e){const{chain:r}=e;switch(r){case"ethereum":return await this.signInWithEthereum(e);case"solana":return await this.signInWithSolana(e);default:throw new Error(`@supabase/auth-js: Unsupported chain "${r}"`)}}async signInWithEthereum(e){var r,n,s,i,o,a,l,c,u,h,d;let f,p;if("message"in e)f=e.message,p=e.signature;else{const{chain:y,wallet:w,statement:k,options:_}=e;let b;if(qe())if(typeof w=="object")b=w;else{const C=window;if("ethereum"in C&&typeof C.ethereum=="object"&&"request"in C.ethereum&&typeof C.ethereum.request=="function")b=C.ethereum;else throw new Error("@supabase/auth-js: No compatible Ethereum wallet interface on the window object (window.ethereum) detected. Make sure the user already has a wallet installed and connected for this app. Prefer passing the wallet interface object directly to signInWithWeb3({ chain: 'ethereum', wallet: resolvedUserWallet }) instead.")}else{if(typeof w!="object"||!(_!=null&&_.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");b=w}const x=new URL((r=_==null?void 0:_.url)!==null&&r!==void 0?r:window.location.href),D=await b.request({method:"eth_requestAccounts"}).then(C=>C).catch(()=>{throw new Error("@supabase/auth-js: Wallet method eth_requestAccounts is missing or invalid")});if(!D||D.length===0)throw new Error("@supabase/auth-js: No accounts available. Please ensure the wallet is connected.");const M=Wu(D[0]);let U=(n=_==null?void 0:_.signInWithEthereum)===null||n===void 0?void 0:n.chainId;if(!U){const C=await b.request({method:"eth_chainId"});U=Xy(C)}const V={domain:x.host,address:M,statement:k,uri:x.href,version:"1",chainId:U,nonce:(s=_==null?void 0:_.signInWithEthereum)===null||s===void 0?void 0:s.nonce,issuedAt:(o=(i=_==null?void 0:_.signInWithEthereum)===null||i===void 0?void 0:i.issuedAt)!==null&&o!==void 0?o:new Date,expirationTime:(a=_==null?void 0:_.signInWithEthereum)===null||a===void 0?void 0:a.expirationTime,notBefore:(l=_==null?void 0:_.signInWithEthereum)===null||l===void 0?void 0:l.notBefore,requestId:(c=_==null?void 0:_.signInWithEthereum)===null||c===void 0?void 0:c.requestId,resources:(u=_==null?void 0:_.signInWithEthereum)===null||u===void 0?void 0:u.resources};f=Qy(V),p=await b.request({method:"personal_sign",params:[Zy(f),M]})}try{const{data:y,error:w}=await q(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"ethereum",message:f,signature:p},!((h=e.options)===null||h===void 0)&&h.captchaToken?{gotrue_meta_security:{captcha_token:(d=e.options)===null||d===void 0?void 0:d.captchaToken}}:null),xform:dt});if(w)throw w;if(!y||!y.session||!y.user){const k=new Lr;return this._returnResult({data:{user:null,session:null},error:k})}return y.session&&(await this._saveSession(y.session),await this._notifyAllSubscribers("SIGNED_IN",y.session)),this._returnResult({data:Object.assign({},y),error:w})}catch(y){if($(y))return this._returnResult({data:{user:null,session:null},error:y});throw y}}async signInWithSolana(e){var r,n,s,i,o,a,l,c,u,h,d,f;let p,y;if("message"in e)p=e.message,y=e.signature;else{const{chain:w,wallet:k,statement:_,options:b}=e;let x;if(qe())if(typeof k=="object")x=k;else{const M=window;if("solana"in M&&typeof M.solana=="object"&&("signIn"in M.solana&&typeof M.solana.signIn=="function"||"signMessage"in M.solana&&typeof M.solana.signMessage=="function"))x=M.solana;else throw new Error("@supabase/auth-js: No compatible Solana wallet interface on the window object (window.solana) detected. Make sure the user already has a wallet installed and connected for this app. Prefer passing the wallet interface object directly to signInWithWeb3({ chain: 'solana', wallet: resolvedUserWallet }) instead.")}else{if(typeof k!="object"||!(b!=null&&b.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");x=k}const D=new URL((r=b==null?void 0:b.url)!==null&&r!==void 0?r:window.location.href);if("signIn"in x&&x.signIn){const M=await x.signIn(Object.assign(Object.assign(Object.assign({issuedAt:new Date().toISOString()},b==null?void 0:b.signInWithSolana),{version:"1",domain:D.host,uri:D.href}),_?{statement:_}:null));let U;if(Array.isArray(M)&&M[0]&&typeof M[0]=="object")U=M[0];else if(M&&typeof M=="object"&&"signedMessage"in M&&"signature"in M)U=M;else throw new Error("@supabase/auth-js: Wallet method signIn() returned unrecognized value");if("signedMessage"in U&&"signature"in U&&(typeof U.signedMessage=="string"||U.signedMessage instanceof Uint8Array)&&U.signature instanceof Uint8Array)p=typeof U.signedMessage=="string"?U.signedMessage:new TextDecoder().decode(U.signedMessage),y=U.signature;else throw new Error("@supabase/auth-js: Wallet method signIn() API returned object without signedMessage and signature fields")}else{if(!("signMessage"in x)||typeof x.signMessage!="function"||!("publicKey"in x)||typeof x!="object"||!x.publicKey||!("toBase58"in x.publicKey)||typeof x.publicKey.toBase58!="function")throw new Error("@supabase/auth-js: Wallet does not have a compatible signMessage() and publicKey.toBase58() API");p=[`${D.host} wants you to sign in with your Solana account:`,x.publicKey.toBase58(),..._?["",_,""]:[""],"Version: 1",`URI: ${D.href}`,`Issued At: ${(s=(n=b==null?void 0:b.signInWithSolana)===null||n===void 0?void 0:n.issuedAt)!==null&&s!==void 0?s:new Date().toISOString()}`,...!((i=b==null?void 0:b.signInWithSolana)===null||i===void 0)&&i.notBefore?[`Not Before: ${b.signInWithSolana.notBefore}`]:[],...!((o=b==null?void 0:b.signInWithSolana)===null||o===void 0)&&o.expirationTime?[`Expiration Time: ${b.signInWithSolana.expirationTime}`]:[],...!((a=b==null?void 0:b.signInWithSolana)===null||a===void 0)&&a.chainId?[`Chain ID: ${b.signInWithSolana.chainId}`]:[],...!((l=b==null?void 0:b.signInWithSolana)===null||l===void 0)&&l.nonce?[`Nonce: ${b.signInWithSolana.nonce}`]:[],...!((c=b==null?void 0:b.signInWithSolana)===null||c===void 0)&&c.requestId?[`Request ID: ${b.signInWithSolana.requestId}`]:[],...!((h=(u=b==null?void 0:b.signInWithSolana)===null||u===void 0?void 0:u.resources)===null||h===void 0)&&h.length?["Resources",...b.signInWithSolana.resources.map(U=>`- ${U}`)]:[]].join(`
|
|
213
|
-
`);const M=await x.signMessage(new TextEncoder().encode(p),"utf8");if(!M||!(M instanceof Uint8Array))throw new Error("@supabase/auth-js: Wallet signMessage() API returned an recognized value");y=M}}try{const{data:w,error:k}=await q(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"solana",message:p,signature:Ar(y)},!((d=e.options)===null||d===void 0)&&d.captchaToken?{gotrue_meta_security:{captcha_token:(f=e.options)===null||f===void 0?void 0:f.captchaToken}}:null),xform:dt});if(k)throw k;if(!w||!w.session||!w.user){const _=new Lr;return this._returnResult({data:{user:null,session:null},error:_})}return w.session&&(await this._saveSession(w.session),await this._notifyAllSubscribers("SIGNED_IN",w.session)),this._returnResult({data:Object.assign({},w),error:k})}catch(w){if($(w))return this._returnResult({data:{user:null,session:null},error:w});throw w}}async _exchangeCodeForSession(e){const r=await wr(this.storage,`${this.storageKey}-code-verifier`),[n,s]=(r??"").split("/");try{if(!n&&this.flowType==="pkce")throw new _y;const{data:i,error:o}=await q(this.fetch,"POST",`${this.url}/token?grant_type=pkce`,{headers:this.headers,body:{auth_code:e,code_verifier:n},xform:dt});if(await He(this.storage,`${this.storageKey}-code-verifier`),o)throw o;if(!i||!i.session||!i.user){const a=new Lr;return this._returnResult({data:{user:null,session:null,redirectType:null},error:a})}return i.session&&(await this._saveSession(i.session),await this._notifyAllSubscribers(s==="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",i.session)),this._returnResult({data:Object.assign(Object.assign({},i),{redirectType:s??null}),error:o})}catch(i){if(await He(this.storage,`${this.storageKey}-code-verifier`),$(i))return this._returnResult({data:{user:null,session:null,redirectType:null},error:i});throw i}}async signInWithIdToken(e){try{const{options:r,provider:n,token:s,access_token:i,nonce:o}=e,a=await q(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,body:{provider:n,id_token:s,access_token:i,nonce:o,gotrue_meta_security:{captcha_token:r==null?void 0:r.captchaToken}},xform:dt}),{data:l,error:c}=a;if(c)return this._returnResult({data:{user:null,session:null},error:c});if(!l||!l.session||!l.user){const u=new Lr;return this._returnResult({data:{user:null,session:null},error:u})}return l.session&&(await this._saveSession(l.session),await this._notifyAllSubscribers("SIGNED_IN",l.session)),this._returnResult({data:l,error:c})}catch(r){if($(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async signInWithOtp(e){var r,n,s,i,o;try{if("email"in e){const{email:a,options:l}=e;let c=null,u=null;this.flowType==="pkce"&&([c,u]=await Dr(this.storage,this.storageKey));const{error:h}=await q(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{email:a,data:(r=l==null?void 0:l.data)!==null&&r!==void 0?r:{},create_user:(n=l==null?void 0:l.shouldCreateUser)!==null&&n!==void 0?n:!0,gotrue_meta_security:{captcha_token:l==null?void 0:l.captchaToken},code_challenge:c,code_challenge_method:u},redirectTo:l==null?void 0:l.emailRedirectTo});return this._returnResult({data:{user:null,session:null},error:h})}if("phone"in e){const{phone:a,options:l}=e,{data:c,error:u}=await q(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:(i=l==null?void 0:l.shouldCreateUser)!==null&&i!==void 0?i:!0,gotrue_meta_security:{captcha_token:l==null?void 0:l.captchaToken},channel:(o=l==null?void 0:l.channel)!==null&&o!==void 0?o:"sms"}});return this._returnResult({data:{user:null,session:null,messageId:c==null?void 0:c.message_id},error:u})}throw new hs("You must provide either an email or phone number.")}catch(a){if(await He(this.storage,`${this.storageKey}-code-verifier`),$(a))return this._returnResult({data:{user:null,session:null},error:a});throw a}}async verifyOtp(e){var r,n;try{let s,i;"options"in e&&(s=(r=e.options)===null||r===void 0?void 0:r.redirectTo,i=(n=e.options)===null||n===void 0?void 0:n.captchaToken);const{data:o,error:a}=await q(this.fetch,"POST",`${this.url}/verify`,{headers:this.headers,body:Object.assign(Object.assign({},e),{gotrue_meta_security:{captcha_token:i}}),redirectTo:s,xform:dt});if(a)throw a;if(!o)throw new Error("An error occurred on token verification.");const l=o.session,c=o.user;return l!=null&&l.access_token&&(await this._saveSession(l),await this._notifyAllSubscribers(e.type=="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",l)),this._returnResult({data:{user:c,session:l},error:null})}catch(s){if($(s))return this._returnResult({data:{user:null,session:null},error:s});throw s}}async signInWithSSO(e){var r,n,s,i,o;try{let a=null,l=null;this.flowType==="pkce"&&([a,l]=await Dr(this.storage,this.storageKey));const c=await q(this.fetch,"POST",`${this.url}/sso`,{body:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},"providerId"in e?{provider_id:e.providerId}:null),"domain"in e?{domain:e.domain}:null),{redirect_to:(n=(r=e.options)===null||r===void 0?void 0:r.redirectTo)!==null&&n!==void 0?n:void 0}),!((s=e==null?void 0:e.options)===null||s===void 0)&&s.captchaToken?{gotrue_meta_security:{captcha_token:e.options.captchaToken}}:null),{skip_http_redirect:!0,code_challenge:a,code_challenge_method:l}),headers:this.headers,xform:zy});return!((i=c.data)===null||i===void 0)&&i.url&&qe()&&!(!((o=e.options)===null||o===void 0)&&o.skipBrowserRedirect)&&window.location.assign(c.data.url),this._returnResult(c)}catch(a){if(await He(this.storage,`${this.storageKey}-code-verifier`),$(a))return this._returnResult({data:null,error:a});throw a}}async reauthenticate(){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._reauthenticate())}async _reauthenticate(){try{return await this._useSession(async e=>{const{data:{session:r},error:n}=e;if(n)throw n;if(!r)throw new Be;const{error:s}=await q(this.fetch,"GET",`${this.url}/reauthenticate`,{headers:this.headers,jwt:r.access_token});return this._returnResult({data:{user:null,session:null},error:s})})}catch(e){if($(e))return this._returnResult({data:{user:null,session:null},error:e});throw e}}async resend(e){try{const r=`${this.url}/resend`;if("email"in e){const{email:n,type:s,options:i}=e,{error:o}=await q(this.fetch,"POST",r,{headers:this.headers,body:{email:n,type:s,gotrue_meta_security:{captcha_token:i==null?void 0:i.captchaToken}},redirectTo:i==null?void 0:i.emailRedirectTo});return this._returnResult({data:{user:null,session:null},error:o})}else if("phone"in e){const{phone:n,type:s,options:i}=e,{data:o,error:a}=await q(this.fetch,"POST",r,{headers:this.headers,body:{phone:n,type:s,gotrue_meta_security:{captcha_token:i==null?void 0:i.captchaToken}}});return this._returnResult({data:{user:null,session:null,messageId:o==null?void 0:o.message_id},error:a})}throw new hs("You must provide either an email or phone number and a type")}catch(r){if($(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async getSession(){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>this._useSession(async r=>r))}async _acquireLock(e,r){this._debug("#_acquireLock","begin",e);try{if(this.lockAcquired){const n=this.pendingInLock.length?this.pendingInLock[this.pendingInLock.length-1]:Promise.resolve(),s=(async()=>(await n,await r()))();return this.pendingInLock.push((async()=>{try{await s}catch{}})()),s}return await this.lock(`lock:${this.storageKey}`,e,async()=>{this._debug("#_acquireLock","lock acquired for storage key",this.storageKey);try{this.lockAcquired=!0;const n=r();for(this.pendingInLock.push((async()=>{try{await n}catch{}})()),await n;this.pendingInLock.length;){const s=[...this.pendingInLock];await Promise.all(s),this.pendingInLock.splice(0,s.length)}return await n}finally{this._debug("#_acquireLock","lock released for storage key",this.storageKey),this.lockAcquired=!1}})}finally{this._debug("#_acquireLock","end")}}async _useSession(e){this._debug("#_useSession","begin");try{const r=await this.__loadSession();return await e(r)}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 e=null;const r=await wr(this.storage,this.storageKey);if(this._debug("#getSession()","session from storage",r),r!==null&&(this._isValidSession(r)?e=r:(this._debug("#getSession()","session from storage is not valid"),await this._removeSession())),!e)return{data:{session:null},error:null};const n=e.expires_at?e.expires_at*1e3-Date.now()<Ri:!1;if(this._debug("#__loadSession()",`session has${n?"":" not"} expired`,"expires_at",e.expires_at),!n){if(this.userStorage){const o=await wr(this.userStorage,this.storageKey+"-user");o!=null&&o.user?e.user=o.user:e.user=Oi()}if(this.storage.isServer&&e.user&&!e.user.__isUserNotAvailableProxy){const o={value:this.suppressGetSessionWarning};e.user=Hy(e.user,o),o.value&&(this.suppressGetSessionWarning=!0)}return{data:{session:e},error:null}}const{data:s,error:i}=await this._callRefreshToken(e.refresh_token);return i?this._returnResult({data:{session:null},error:i}):this._returnResult({data:{session:s},error:null})}finally{this._debug("#__loadSession()","end")}}async getUser(e){if(e)return await this._getUser(e);await this.initializePromise;const r=await this._acquireLock(this.lockAcquireTimeout,async()=>await this._getUser());return r.data.user&&(this.suppressGetSessionWarning=!0),r}async _getUser(e){try{return e?await q(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:e,xform:ur}):await this._useSession(async r=>{var n,s,i;const{data:o,error:a}=r;if(a)throw a;return!(!((n=o.session)===null||n===void 0)&&n.access_token)&&!this.hasCustomAuthorizationHeader?{data:{user:null},error:new Be}:await q(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:(i=(s=o.session)===null||s===void 0?void 0:s.access_token)!==null&&i!==void 0?i:void 0,xform:ur})})}catch(r){if($(r))return us(r)&&(await this._removeSession(),await He(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({data:{user:null},error:r});throw r}}async updateUser(e,r={}){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._updateUser(e,r))}async _updateUser(e,r={}){try{return await this._useSession(async n=>{const{data:s,error:i}=n;if(i)throw i;if(!s.session)throw new Be;const o=s.session;let a=null,l=null;this.flowType==="pkce"&&e.email!=null&&([a,l]=await Dr(this.storage,this.storageKey));const{data:c,error:u}=await q(this.fetch,"PUT",`${this.url}/user`,{headers:this.headers,redirectTo:r==null?void 0:r.emailRedirectTo,body:Object.assign(Object.assign({},e),{code_challenge:a,code_challenge_method:l}),jwt:o.access_token,xform:ur});if(u)throw u;return o.user=c.user,await this._saveSession(o),await this._notifyAllSubscribers("USER_UPDATED",o),this._returnResult({data:{user:o.user},error:null})})}catch(n){if(await He(this.storage,`${this.storageKey}-code-verifier`),$(n))return this._returnResult({data:{user:null},error:n});throw n}}async setSession(e){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._setSession(e))}async _setSession(e){try{if(!e.access_token||!e.refresh_token)throw new Be;const r=Date.now()/1e3;let n=r,s=!0,i=null;const{payload:o}=fs(e.access_token);if(o.exp&&(n=o.exp,s=n<=r),s){const{data:a,error:l}=await this._callRefreshToken(e.refresh_token);if(l)return this._returnResult({data:{user:null,session:null},error:l});if(!a)return{data:{user:null,session:null},error:null};i=a}else{const{data:a,error:l}=await this._getUser(e.access_token);if(l)return this._returnResult({data:{user:null,session:null},error:l});i={access_token:e.access_token,refresh_token:e.refresh_token,user:a.user,token_type:"bearer",expires_in:n-r,expires_at:n},await this._saveSession(i),await this._notifyAllSubscribers("SIGNED_IN",i)}return this._returnResult({data:{user:i.user,session:i},error:null})}catch(r){if($(r))return this._returnResult({data:{session:null,user:null},error:r});throw r}}async refreshSession(e){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._refreshSession(e))}async _refreshSession(e){try{return await this._useSession(async r=>{var n;if(!e){const{data:o,error:a}=r;if(a)throw a;e=(n=o.session)!==null&&n!==void 0?n:void 0}if(!(e!=null&&e.refresh_token))throw new Be;const{data:s,error:i}=await this._callRefreshToken(e.refresh_token);return i?this._returnResult({data:{user:null,session:null},error:i}):s?this._returnResult({data:{user:s.user,session:s},error:null}):this._returnResult({data:{user:null,session:null},error:null})})}catch(r){if($(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async _getSessionFromURL(e,r){var n;try{if(!qe())throw new ds("No browser detected.");if(e.error||e.error_description||e.error_code)throw new ds(e.error_description||"Error in URL with unspecified error_description",{error:e.error||"unspecified_error",code:e.error_code||"unspecified_code"});switch(r){case"implicit":if(this.flowType==="pkce")throw new bl("Not a valid PKCE flow url.");break;case"pkce":if(this.flowType==="implicit")throw new ds("Not a valid implicit grant flow url.");break;default:}if(r==="pkce"){if(this._debug("#_initialize()","begin","is PKCE flow",!0),!e.code)throw new bl("No code detected.");const{data:b,error:x}=await this._exchangeCodeForSession(e.code);if(x)throw x;const D=new URL(window.location.href);return D.searchParams.delete("code"),window.history.replaceState(window.history.state,"",D.toString()),{data:{session:b.session,redirectType:(n=b.redirectType)!==null&&n!==void 0?n:null},error:null}}const{provider_token:s,provider_refresh_token:i,access_token:o,refresh_token:a,expires_in:l,expires_at:c,token_type:u}=e;if(!o||!l||!a||!u)throw new ds("No session defined in URL");const h=Math.round(Date.now()/1e3),d=parseInt(l);let f=h+d;c&&(f=parseInt(c));const p=f-h;p*1e3<=Fr&&console.warn(`@supabase/gotrue-js: Session as retrieved from URL expires in ${p}s, should have been closer to ${d}s`);const y=f-d;h-y>=120?console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued over 120s ago, URL could be stale",y,f,h):h-y<0&&console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued in the future? Check the device clock for skew",y,f,h);const{data:w,error:k}=await this._getUser(o);if(k)throw k;const _={provider_token:s,provider_refresh_token:i,access_token:o,expires_in:d,expires_at:f,refresh_token:a,token_type:u,user:w.user};return window.location.hash="",this._debug("#_getSessionFromURL()","clearing window.location.hash"),this._returnResult({data:{session:_,redirectType:e.type},error:null})}catch(s){if($(s))return this._returnResult({data:{session:null,redirectType:null},error:s});throw s}}_isImplicitGrantCallback(e){return typeof this.detectSessionInUrl=="function"?this.detectSessionInUrl(new URL(window.location.href),e):!!(e.access_token||e.error_description)}async _isPKCECallback(e){const r=await wr(this.storage,`${this.storageKey}-code-verifier`);return!!(e.code&&r)}async signOut(e={scope:"global"}){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._signOut(e))}async _signOut({scope:e}={scope:"global"}){return await this._useSession(async r=>{var n;const{data:s,error:i}=r;if(i&&!us(i))return this._returnResult({error:i});const o=(n=s.session)===null||n===void 0?void 0:n.access_token;if(o){const{error:a}=await this.admin.signOut(o,e);if(a&&!(vy(a)&&(a.status===404||a.status===401||a.status===403)||us(a)))return this._returnResult({error:a})}return e!=="others"&&(await this._removeSession(),await He(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({error:null})})}onAuthStateChange(e){const r=xy(),n={id:r,callback:e,unsubscribe:()=>{this._debug("#unsubscribe()","state change callback with id removed",r),this.stateChangeEmitters.delete(r)}};return this._debug("#onAuthStateChange()","registered callback with id",r),this.stateChangeEmitters.set(r,n),(async()=>(await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>{this._emitInitialSession(r)})))(),{data:{subscription:n}}}async _emitInitialSession(e){return await this._useSession(async r=>{var n,s;try{const{data:{session:i},error:o}=r;if(o)throw o;await((n=this.stateChangeEmitters.get(e))===null||n===void 0?void 0:n.callback("INITIAL_SESSION",i)),this._debug("INITIAL_SESSION","callback id",e,"session",i)}catch(i){await((s=this.stateChangeEmitters.get(e))===null||s===void 0?void 0:s.callback("INITIAL_SESSION",null)),this._debug("INITIAL_SESSION","callback id",e,"error",i),us(i)?console.warn(i):console.error(i)}})}async resetPasswordForEmail(e,r={}){let n=null,s=null;this.flowType==="pkce"&&([n,s]=await Dr(this.storage,this.storageKey,!0));try{return await q(this.fetch,"POST",`${this.url}/recover`,{body:{email:e,code_challenge:n,code_challenge_method:s,gotrue_meta_security:{captcha_token:r.captchaToken}},headers:this.headers,redirectTo:r.redirectTo})}catch(i){if(await He(this.storage,`${this.storageKey}-code-verifier`),$(i))return this._returnResult({data:null,error:i});throw i}}async getUserIdentities(){var e;try{const{data:r,error:n}=await this.getUser();if(n)throw n;return this._returnResult({data:{identities:(e=r.user.identities)!==null&&e!==void 0?e:[]},error:null})}catch(r){if($(r))return this._returnResult({data:null,error:r});throw r}}async linkIdentity(e){return"token"in e?this.linkIdentityIdToken(e):this.linkIdentityOAuth(e)}async linkIdentityOAuth(e){var r;try{const{data:n,error:s}=await this._useSession(async i=>{var o,a,l,c,u;const{data:h,error:d}=i;if(d)throw d;const f=await this._getUrlForProvider(`${this.url}/user/identities/authorize`,e.provider,{redirectTo:(o=e.options)===null||o===void 0?void 0:o.redirectTo,scopes:(a=e.options)===null||a===void 0?void 0:a.scopes,queryParams:(l=e.options)===null||l===void 0?void 0:l.queryParams,skipBrowserRedirect:!0});return await q(this.fetch,"GET",f,{headers:this.headers,jwt:(u=(c=h.session)===null||c===void 0?void 0:c.access_token)!==null&&u!==void 0?u:void 0})});if(s)throw s;return qe()&&!(!((r=e.options)===null||r===void 0)&&r.skipBrowserRedirect)&&window.location.assign(n==null?void 0:n.url),this._returnResult({data:{provider:e.provider,url:n==null?void 0:n.url},error:null})}catch(n){if($(n))return this._returnResult({data:{provider:e.provider,url:null},error:n});throw n}}async linkIdentityIdToken(e){return await this._useSession(async r=>{var n;try{const{error:s,data:{session:i}}=r;if(s)throw s;const{options:o,provider:a,token:l,access_token:c,nonce:u}=e,h=await q(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,jwt:(n=i==null?void 0:i.access_token)!==null&&n!==void 0?n:void 0,body:{provider:a,id_token:l,access_token:c,nonce:u,link_identity:!0,gotrue_meta_security:{captcha_token:o==null?void 0:o.captchaToken}},xform:dt}),{data:d,error:f}=h;return f?this._returnResult({data:{user:null,session:null},error:f}):!d||!d.session||!d.user?this._returnResult({data:{user:null,session:null},error:new Lr}):(d.session&&(await this._saveSession(d.session),await this._notifyAllSubscribers("USER_UPDATED",d.session)),this._returnResult({data:d,error:f}))}catch(s){if(await He(this.storage,`${this.storageKey}-code-verifier`),$(s))return this._returnResult({data:{user:null,session:null},error:s});throw s}})}async unlinkIdentity(e){try{return await this._useSession(async r=>{var n,s;const{data:i,error:o}=r;if(o)throw o;return await q(this.fetch,"DELETE",`${this.url}/user/identities/${e.identity_id}`,{headers:this.headers,jwt:(s=(n=i.session)===null||n===void 0?void 0:n.access_token)!==null&&s!==void 0?s:void 0})})}catch(r){if($(r))return this._returnResult({data:null,error:r});throw r}}async _refreshAccessToken(e){const r=`#_refreshAccessToken(${e.substring(0,5)}...)`;this._debug(r,"begin");try{const n=Date.now();return await Py(async s=>(s>0&&await Oy(200*Math.pow(2,s-1)),this._debug(r,"refreshing attempt",s),await q(this.fetch,"POST",`${this.url}/token?grant_type=refresh_token`,{body:{refresh_token:e},headers:this.headers,xform:dt})),(s,i)=>{const o=200*Math.pow(2,s);return i&&Ci(i)&&Date.now()+o-n<Fr})}catch(n){if(this._debug(r,"error",n),$(n))return this._returnResult({data:{session:null,user:null},error:n});throw n}finally{this._debug(r,"end")}}_isValidSession(e){return typeof e=="object"&&e!==null&&"access_token"in e&&"refresh_token"in e&&"expires_at"in e}async _handleProviderSignIn(e,r){const n=await this._getUrlForProvider(`${this.url}/authorize`,e,{redirectTo:r.redirectTo,scopes:r.scopes,queryParams:r.queryParams});return this._debug("#_handleProviderSignIn()","provider",e,"options",r,"url",n),qe()&&!r.skipBrowserRedirect&&window.location.assign(n),{data:{provider:e,url:n},error:null}}async _recoverAndRefresh(){var e,r;const n="#_recoverAndRefresh()";this._debug(n,"begin");try{const s=await wr(this.storage,this.storageKey);if(s&&this.userStorage){let o=await wr(this.userStorage,this.storageKey+"-user");!this.storage.isServer&&Object.is(this.storage,this.userStorage)&&!o&&(o={user:s.user},await Vr(this.userStorage,this.storageKey+"-user",o)),s.user=(e=o==null?void 0:o.user)!==null&&e!==void 0?e:Oi()}else if(s&&!s.user&&!s.user){const o=await wr(this.storage,this.storageKey+"-user");o&&(o!=null&&o.user)?(s.user=o.user,await He(this.storage,this.storageKey+"-user"),await Vr(this.storage,this.storageKey,s)):s.user=Oi()}if(this._debug(n,"session from storage",s),!this._isValidSession(s)){this._debug(n,"session is not valid"),s!==null&&await this._removeSession();return}const i=((r=s.expires_at)!==null&&r!==void 0?r:1/0)*1e3-Date.now()<Ri;if(this._debug(n,`session has${i?"":" not"} expired with margin of ${Ri}s`),i){if(this.autoRefreshToken&&s.refresh_token){const{error:o}=await this._callRefreshToken(s.refresh_token);o&&(console.error(o),Ci(o)||(this._debug(n,"refresh failed with a non-retryable error, removing the session",o),await this._removeSession()))}}else if(s.user&&s.user.__isUserNotAvailableProxy===!0)try{const{data:o,error:a}=await this._getUser(s.access_token);!a&&(o!=null&&o.user)?(s.user=o.user,await this._saveSession(s),await this._notifyAllSubscribers("SIGNED_IN",s)):this._debug(n,"could not get user data, skipping SIGNED_IN notification")}catch(o){console.error("Error getting user data:",o),this._debug(n,"error getting user data, skipping SIGNED_IN notification",o)}else await this._notifyAllSubscribers("SIGNED_IN",s)}catch(s){this._debug(n,"error",s),console.error(s);return}finally{this._debug(n,"end")}}async _callRefreshToken(e){var r,n;if(!e)throw new Be;if(this.refreshingDeferred)return this.refreshingDeferred.promise;const s=`#_callRefreshToken(${e.substring(0,5)}...)`;this._debug(s,"begin");try{this.refreshingDeferred=new li;const{data:i,error:o}=await this._refreshAccessToken(e);if(o)throw o;if(!i.session)throw new Be;await this._saveSession(i.session),await this._notifyAllSubscribers("TOKEN_REFRESHED",i.session);const a={data:i.session,error:null};return this.refreshingDeferred.resolve(a),a}catch(i){if(this._debug(s,"error",i),$(i)){const o={data:null,error:i};return Ci(i)||await this._removeSession(),(r=this.refreshingDeferred)===null||r===void 0||r.resolve(o),o}throw(n=this.refreshingDeferred)===null||n===void 0||n.reject(i),i}finally{this.refreshingDeferred=null,this._debug(s,"end")}}async _notifyAllSubscribers(e,r,n=!0){const s=`#_notifyAllSubscribers(${e})`;this._debug(s,"begin",r,`broadcast = ${n}`);try{this.broadcastChannel&&n&&this.broadcastChannel.postMessage({event:e,session:r});const i=[],o=Array.from(this.stateChangeEmitters.values()).map(async a=>{try{await a.callback(e,r)}catch(l){i.push(l)}});if(await Promise.all(o),i.length>0){for(let a=0;a<i.length;a+=1)console.error(i[a]);throw i[0]}}finally{this._debug(s,"end")}}async _saveSession(e){this._debug("#_saveSession()",e),this.suppressGetSessionWarning=!0,await He(this.storage,`${this.storageKey}-code-verifier`);const r=Object.assign({},e),n=r.user&&r.user.__isUserNotAvailableProxy===!0;if(this.userStorage){!n&&r.user&&await Vr(this.userStorage,this.storageKey+"-user",{user:r.user});const s=Object.assign({},r);delete s.user;const i=El(s);await Vr(this.storage,this.storageKey,i)}else{const s=El(r);await Vr(this.storage,this.storageKey,s)}}async _removeSession(){this._debug("#_removeSession()"),this.suppressGetSessionWarning=!1,await He(this.storage,this.storageKey),await He(this.storage,this.storageKey+"-code-verifier"),await He(this.storage,this.storageKey+"-user"),this.userStorage&&await He(this.userStorage,this.storageKey+"-user"),await this._notifyAllSubscribers("SIGNED_OUT",null)}_removeVisibilityChangedCallback(){this._debug("#_removeVisibilityChangedCallback()");const e=this.visibilityChangedCallback;this.visibilityChangedCallback=null;try{e&&qe()&&(window!=null&&window.removeEventListener)&&window.removeEventListener("visibilitychange",e)}catch(r){console.error("removing visibilitychange callback failed",r)}}async _startAutoRefresh(){await this._stopAutoRefresh(),this._debug("#_startAutoRefresh()");const e=setInterval(()=>this._autoRefreshTokenTick(),Fr);this.autoRefreshTicker=e,e&&typeof e=="object"&&typeof e.unref=="function"?e.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(e);const r=setTimeout(async()=>{await this.initializePromise,await this._autoRefreshTokenTick()},0);this.autoRefreshTickTimeout=r,r&&typeof r=="object"&&typeof r.unref=="function"?r.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(r)}async _stopAutoRefresh(){this._debug("#_stopAutoRefresh()");const e=this.autoRefreshTicker;this.autoRefreshTicker=null,e&&clearInterval(e);const r=this.autoRefreshTickTimeout;this.autoRefreshTickTimeout=null,r&&clearTimeout(r)}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 e=Date.now();try{return await this._useSession(async r=>{const{data:{session:n}}=r;if(!n||!n.refresh_token||!n.expires_at){this._debug("#_autoRefreshTokenTick()","no session");return}const s=Math.floor((n.expires_at*1e3-e)/Fr);this._debug("#_autoRefreshTokenTick()",`access token expires in ${s} ticks, a tick lasts ${Fr}ms, refresh threshold is ${ao} ticks`),s<=ao&&await this._callRefreshToken(n.refresh_token)})}catch(r){console.error("Auto refresh tick failed with error. This is likely a transient error.",r)}}finally{this._debug("#_autoRefreshTokenTick()","end")}})}catch(e){if(e instanceof zu)this._debug("auto refresh token tick lock not available");else throw e}}async _handleVisibilityChange(){if(this._debug("#_handleVisibilityChange()"),!qe()||!(window!=null&&window.addEventListener))return this.autoRefreshToken&&this.startAutoRefresh(),!1;try{this.visibilityChangedCallback=async()=>{try{await this._onVisibilityChanged(!1)}catch(e){this._debug("#visibilityChangedCallback","error",e)}},window==null||window.addEventListener("visibilitychange",this.visibilityChangedCallback),await this._onVisibilityChanged(!0)}catch(e){console.error("_handleVisibilityChange",e)}}async _onVisibilityChanged(e){const r=`#_onVisibilityChanged(${e})`;this._debug(r,"visibilityState",document.visibilityState),document.visibilityState==="visible"?(this.autoRefreshToken&&this._startAutoRefresh(),e||(await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>{if(document.visibilityState!=="visible"){this._debug(r,"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(e,r,n){const s=[`provider=${encodeURIComponent(r)}`];if(n!=null&&n.redirectTo&&s.push(`redirect_to=${encodeURIComponent(n.redirectTo)}`),n!=null&&n.scopes&&s.push(`scopes=${encodeURIComponent(n.scopes)}`),this.flowType==="pkce"){const[i,o]=await Dr(this.storage,this.storageKey),a=new URLSearchParams({code_challenge:`${encodeURIComponent(i)}`,code_challenge_method:`${encodeURIComponent(o)}`});s.push(a.toString())}if(n!=null&&n.queryParams){const i=new URLSearchParams(n.queryParams);s.push(i.toString())}return n!=null&&n.skipBrowserRedirect&&s.push(`skip_http_redirect=${n.skipBrowserRedirect}`),`${e}?${s.join("&")}`}async _unenroll(e){try{return await this._useSession(async r=>{var n;const{data:s,error:i}=r;return i?this._returnResult({data:null,error:i}):await q(this.fetch,"DELETE",`${this.url}/factors/${e.factorId}`,{headers:this.headers,jwt:(n=s==null?void 0:s.session)===null||n===void 0?void 0:n.access_token})})}catch(r){if($(r))return this._returnResult({data:null,error:r});throw r}}async _enroll(e){try{return await this._useSession(async r=>{var n,s;const{data:i,error:o}=r;if(o)return this._returnResult({data:null,error:o});const a=Object.assign({friendly_name:e.friendlyName,factor_type:e.factorType},e.factorType==="phone"?{phone:e.phone}:e.factorType==="totp"?{issuer:e.issuer}:{}),{data:l,error:c}=await q(this.fetch,"POST",`${this.url}/factors`,{body:a,headers:this.headers,jwt:(n=i==null?void 0:i.session)===null||n===void 0?void 0:n.access_token});return c?this._returnResult({data:null,error:c}):(e.factorType==="totp"&&l.type==="totp"&&(!((s=l==null?void 0:l.totp)===null||s===void 0)&&s.qr_code)&&(l.totp.qr_code=`data:image/svg+xml;utf-8,${l.totp.qr_code}`),this._returnResult({data:l,error:null}))})}catch(r){if($(r))return this._returnResult({data:null,error:r});throw r}}async _verify(e){return this._acquireLock(this.lockAcquireTimeout,async()=>{try{return await this._useSession(async r=>{var n;const{data:s,error:i}=r;if(i)return this._returnResult({data:null,error:i});const o=Object.assign({challenge_id:e.challengeId},"webauthn"in e?{webauthn:Object.assign(Object.assign({},e.webauthn),{credential_response:e.webauthn.type==="create"?Il(e.webauthn.credential_response):$l(e.webauthn.credential_response)})}:{code:e.code}),{data:a,error:l}=await q(this.fetch,"POST",`${this.url}/factors/${e.factorId}/verify`,{body:o,headers:this.headers,jwt:(n=s==null?void 0:s.session)===null||n===void 0?void 0:n.access_token});return l?this._returnResult({data:null,error:l}):(await this._saveSession(Object.assign({expires_at:Math.round(Date.now()/1e3)+a.expires_in},a)),await this._notifyAllSubscribers("MFA_CHALLENGE_VERIFIED",a),this._returnResult({data:a,error:l}))})}catch(r){if($(r))return this._returnResult({data:null,error:r});throw r}})}async _challenge(e){return this._acquireLock(this.lockAcquireTimeout,async()=>{try{return await this._useSession(async r=>{var n;const{data:s,error:i}=r;if(i)return this._returnResult({data:null,error:i});const o=await q(this.fetch,"POST",`${this.url}/factors/${e.factorId}/challenge`,{body:e,headers:this.headers,jwt:(n=s==null?void 0:s.session)===null||n===void 0?void 0:n.access_token});if(o.error)return o;const{data:a}=o;if(a.type!=="webauthn")return{data:a,error:null};switch(a.webauthn.type){case"create":return{data:Object.assign(Object.assign({},a),{webauthn:Object.assign(Object.assign({},a.webauthn),{credential_options:Object.assign(Object.assign({},a.webauthn.credential_options),{publicKey:Ol(a.webauthn.credential_options.publicKey)})})}),error:null};case"request":return{data:Object.assign(Object.assign({},a),{webauthn:Object.assign(Object.assign({},a.webauthn),{credential_options:Object.assign(Object.assign({},a.webauthn.credential_options),{publicKey:Pl(a.webauthn.credential_options.publicKey)})})}),error:null}}})}catch(r){if($(r))return this._returnResult({data:null,error:r});throw r}})}async _challengeAndVerify(e){const{data:r,error:n}=await this._challenge({factorId:e.factorId});return n?this._returnResult({data:null,error:n}):await this._verify({factorId:e.factorId,challengeId:r.id,code:e.code})}async _listFactors(){var e;const{data:{user:r},error:n}=await this.getUser();if(n)return{data:null,error:n};const s={all:[],phone:[],totp:[],webauthn:[]};for(const i of(e=r==null?void 0:r.factors)!==null&&e!==void 0?e:[])s.all.push(i),i.status==="verified"&&s[i.factor_type].push(i);return{data:s,error:null}}async _getAuthenticatorAssuranceLevel(e){var r,n,s,i;if(e)try{const{payload:f}=fs(e);let p=null;f.aal&&(p=f.aal);let y=p;const{data:{user:w},error:k}=await this.getUser(e);if(k)return this._returnResult({data:null,error:k});((n=(r=w==null?void 0:w.factors)===null||r===void 0?void 0:r.filter(x=>x.status==="verified"))!==null&&n!==void 0?n:[]).length>0&&(y="aal2");const b=f.amr||[];return{data:{currentLevel:p,nextLevel:y,currentAuthenticationMethods:b},error:null}}catch(f){if($(f))return this._returnResult({data:null,error:f});throw f}const{data:{session:o},error:a}=await this.getSession();if(a)return this._returnResult({data:null,error:a});if(!o)return{data:{currentLevel:null,nextLevel:null,currentAuthenticationMethods:[]},error:null};const{payload:l}=fs(o.access_token);let c=null;l.aal&&(c=l.aal);let u=c;((i=(s=o.user.factors)===null||s===void 0?void 0:s.filter(f=>f.status==="verified"))!==null&&i!==void 0?i:[]).length>0&&(u="aal2");const d=l.amr||[];return{data:{currentLevel:c,nextLevel:u,currentAuthenticationMethods:d},error:null}}async _getAuthorizationDetails(e){try{return await this._useSession(async r=>{const{data:{session:n},error:s}=r;return s?this._returnResult({data:null,error:s}):n?await q(this.fetch,"GET",`${this.url}/oauth/authorizations/${e}`,{headers:this.headers,jwt:n.access_token,xform:i=>({data:i,error:null})}):this._returnResult({data:null,error:new Be})})}catch(r){if($(r))return this._returnResult({data:null,error:r});throw r}}async _approveAuthorization(e,r){try{return await this._useSession(async n=>{const{data:{session:s},error:i}=n;if(i)return this._returnResult({data:null,error:i});if(!s)return this._returnResult({data:null,error:new Be});const o=await q(this.fetch,"POST",`${this.url}/oauth/authorizations/${e}/consent`,{headers:this.headers,jwt:s.access_token,body:{action:"approve"},xform:a=>({data:a,error:null})});return o.data&&o.data.redirect_url&&qe()&&!(r!=null&&r.skipBrowserRedirect)&&window.location.assign(o.data.redirect_url),o})}catch(n){if($(n))return this._returnResult({data:null,error:n});throw n}}async _denyAuthorization(e,r){try{return await this._useSession(async n=>{const{data:{session:s},error:i}=n;if(i)return this._returnResult({data:null,error:i});if(!s)return this._returnResult({data:null,error:new Be});const o=await q(this.fetch,"POST",`${this.url}/oauth/authorizations/${e}/consent`,{headers:this.headers,jwt:s.access_token,body:{action:"deny"},xform:a=>({data:a,error:null})});return o.data&&o.data.redirect_url&&qe()&&!(r!=null&&r.skipBrowserRedirect)&&window.location.assign(o.data.redirect_url),o})}catch(n){if($(n))return this._returnResult({data:null,error:n});throw n}}async _listOAuthGrants(){try{return await this._useSession(async e=>{const{data:{session:r},error:n}=e;return n?this._returnResult({data:null,error:n}):r?await q(this.fetch,"GET",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:r.access_token,xform:s=>({data:s,error:null})}):this._returnResult({data:null,error:new Be})})}catch(e){if($(e))return this._returnResult({data:null,error:e});throw e}}async _revokeOAuthGrant(e){try{return await this._useSession(async r=>{const{data:{session:n},error:s}=r;return s?this._returnResult({data:null,error:s}):n?(await q(this.fetch,"DELETE",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:n.access_token,query:{client_id:e.clientId},noResolveJson:!0}),{data:{},error:null}):this._returnResult({data:null,error:new Be})})}catch(r){if($(r))return this._returnResult({data:null,error:r});throw r}}async fetchJwk(e,r={keys:[]}){let n=r.keys.find(a=>a.kid===e);if(n)return n;const s=Date.now();if(n=this.jwks.keys.find(a=>a.kid===e),n&&this.jwks_cached_at+my>s)return n;const{data:i,error:o}=await q(this.fetch,"GET",`${this.url}/.well-known/jwks.json`,{headers:this.headers});if(o)throw o;return!i.keys||i.keys.length===0||(this.jwks=i,this.jwks_cached_at=s,n=i.keys.find(a=>a.kid===e),!n)?null:n}async getClaims(e,r={}){try{let n=e;if(!n){const{data:f,error:p}=await this.getSession();if(p||!f.session)return this._returnResult({data:null,error:p});n=f.session.access_token}const{header:s,payload:i,signature:o,raw:{header:a,payload:l}}=fs(n);r!=null&&r.allowExpired||Uy(i.exp);const c=!s.alg||s.alg.startsWith("HS")||!s.kid||!("crypto"in globalThis&&"subtle"in globalThis.crypto)?null:await this.fetchJwk(s.kid,r!=null&&r.keys?{keys:r.keys}:r==null?void 0:r.jwks);if(!c){const{error:f}=await this.getUser(n);if(f)throw f;return{data:{claims:i,header:s,signature:o},error:null}}const u=By(s.alg),h=await crypto.subtle.importKey("jwk",c,u,!0,["verify"]);if(!await crypto.subtle.verify(u,h,o,Ty(`${a}.${l}`)))throw new uo("Invalid JWT signature");return{data:{claims:i,header:s,signature:o},error:null}}catch(n){if($(n))return this._returnResult({data:null,error:n});throw n}}async signInWithPasskey(e){var r,n,s;gt(this.experimental);try{if(!js())return this._returnResult({data:null,error:new yt("Browser does not support WebAuthn",null)});const{data:i,error:o}=await this._startPasskeyAuthentication({options:{captchaToken:(r=e==null?void 0:e.options)===null||r===void 0?void 0:r.captchaToken}});if(o||!i)return this._returnResult({data:null,error:o});const a=Pl(i.options),l=(s=(n=e==null?void 0:e.options)===null||n===void 0?void 0:n.signal)!==null&&s!==void 0?s:ho.createNewAbortSignal(),{data:c,error:u}=await Ju({publicKey:a,signal:l});if(u||!c)return this._returnResult({data:null,error:u??new yt("WebAuthn ceremony failed",null)});const h=$l(c);return this._verifyPasskeyAuthentication({challengeId:i.challenge_id,credential:h})}catch(i){if($(i))return this._returnResult({data:null,error:i});throw i}}async registerPasskey(e){var r,n;gt(this.experimental);try{if(!js())return this._returnResult({data:null,error:new yt("Browser does not support WebAuthn",null)});const{data:s,error:i}=await this._startPasskeyRegistration();if(i||!s)return this._returnResult({data:null,error:i});const o=Ol(s.options),a=(n=(r=e==null?void 0:e.options)===null||r===void 0?void 0:r.signal)!==null&&n!==void 0?n:ho.createNewAbortSignal(),{data:l,error:c}=await Gu({publicKey:o,signal:a});if(c||!l)return this._returnResult({data:null,error:c??new yt("WebAuthn ceremony failed",null)});const u=Il(l);return this._verifyPasskeyRegistration({challengeId:s.challenge_id,credential:u})}catch(s){if($(s))return this._returnResult({data:null,error:s});throw s}}async _startPasskeyRegistration(){gt(this.experimental);try{return await this._useSession(async e=>{const{data:{session:r},error:n}=e;if(n)return this._returnResult({data:null,error:n});if(!r)return this._returnResult({data:null,error:new Be});const{data:s,error:i}=await q(this.fetch,"POST",`${this.url}/passkeys/registration/options`,{headers:this.headers,jwt:r.access_token,body:{}});return i?this._returnResult({data:null,error:i}):this._returnResult({data:s,error:null})})}catch(e){if($(e))return this._returnResult({data:null,error:e});throw e}}async _verifyPasskeyRegistration(e){gt(this.experimental);try{return await this._useSession(async r=>{const{data:{session:n},error:s}=r;if(s)return this._returnResult({data:null,error:s});if(!n)return this._returnResult({data:null,error:new Be});const{data:i,error:o}=await q(this.fetch,"POST",`${this.url}/passkeys/registration/verify`,{headers:this.headers,jwt:n.access_token,body:{challenge_id:e.challengeId,credential:e.credential}});return o?this._returnResult({data:null,error:o}):this._returnResult({data:i,error:null})})}catch(r){if($(r))return this._returnResult({data:null,error:r});throw r}}async _startPasskeyAuthentication(e){var r;gt(this.experimental);try{const{data:n,error:s}=await q(this.fetch,"POST",`${this.url}/passkeys/authentication/options`,{headers:this.headers,body:{gotrue_meta_security:{captcha_token:(r=e==null?void 0:e.options)===null||r===void 0?void 0:r.captchaToken}}});return s?this._returnResult({data:null,error:s}):this._returnResult({data:n,error:null})}catch(n){if($(n))return this._returnResult({data:null,error:n});throw n}}async _verifyPasskeyAuthentication(e){gt(this.experimental);try{const{data:r,error:n}=await q(this.fetch,"POST",`${this.url}/passkeys/authentication/verify`,{headers:this.headers,body:{challenge_id:e.challengeId,credential:e.credential},xform:dt});return n?this._returnResult({data:null,error:n}):(r.session&&(await this._saveSession(r.session),await this._notifyAllSubscribers("SIGNED_IN",r.session)),this._returnResult({data:r,error:null}))}catch(r){if($(r))return this._returnResult({data:null,error:r});throw r}}async _listPasskeys(){gt(this.experimental);try{return await this._useSession(async e=>{const{data:{session:r},error:n}=e;if(n)return this._returnResult({data:null,error:n});if(!r)return this._returnResult({data:null,error:new Be});const{data:s,error:i}=await q(this.fetch,"GET",`${this.url}/passkeys`,{headers:this.headers,jwt:r.access_token,xform:o=>({data:o,error:null})});return i?this._returnResult({data:null,error:i}):this._returnResult({data:s,error:null})})}catch(e){if($(e))return this._returnResult({data:null,error:e});throw e}}async _updatePasskey(e){gt(this.experimental);try{return await this._useSession(async r=>{const{data:{session:n},error:s}=r;if(s)return this._returnResult({data:null,error:s});if(!n)return this._returnResult({data:null,error:new Be});const{data:i,error:o}=await q(this.fetch,"PATCH",`${this.url}/passkeys/${e.passkeyId}`,{headers:this.headers,jwt:n.access_token,body:{friendly_name:e.friendlyName}});return o?this._returnResult({data:null,error:o}):this._returnResult({data:i,error:null})})}catch(r){if($(r))return this._returnResult({data:null,error:r});throw r}}async _deletePasskey(e){gt(this.experimental);try{return await this._useSession(async r=>{const{data:{session:n},error:s}=r;if(s)return this._returnResult({data:null,error:s});if(!n)return this._returnResult({data:null,error:new Be});const{error:i}=await q(this.fetch,"DELETE",`${this.url}/passkeys/${e.passkeyId}`,{headers:this.headers,jwt:n.access_token,noResolveJson:!0});return i?this._returnResult({data:null,error:i}):this._returnResult({data:null,error:null})})}catch(r){if($(r))return this._returnResult({data:null,error:r});throw r}}}Gn.nextInstanceID={};const cv=Gn,uv="2.106.2";let wn="";typeof Deno<"u"?wn="deno":typeof document<"u"?wn="web":typeof navigator<"u"&&navigator.product==="ReactNative"?wn="react-native":wn="node";const hv={"X-Client-Info":`supabase-js-${wn}/${uv}`},dv={headers:hv},fv={schema:"public"},pv={autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,flowType:"implicit"},gv={},mv={enabled:!1,respectSamplingDecision:!0};function yv(t,e,r,n){function s(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function a(u){try{c(n.next(u))}catch(h){o(h)}}function l(u){try{c(n.throw(u))}catch(h){o(h)}}function c(u){u.done?i(u.value):s(u.value).then(a,l)}c((n=n.apply(t,[])).next())})}let Ii=null;const vv="@opentelemetry/api";function bv(){return Ii===null&&(Ii=import(vv).catch(()=>null)),Ii}function _v(){return yv(this,void 0,void 0,function*(){try{const t=yield bv();if(!t||!t.propagation||!t.context)return null;const e={};t.propagation.inject(t.context.active(),e);const r=e.traceparent;return r?{traceparent:r,tracestate:e.tracestate,baggage:e.baggage}:null}catch{return null}})}function wv(t){if(!t||typeof t!="string")return null;const e=t.split("-");if(e.length!==4)return null;const[r,n,s,i]=e;if(r.length!==2||n.length!==32||s.length!==16||i.length!==2)return null;const o=/^[0-9a-f]+$/i;return!o.test(r)||!o.test(n)||!o.test(s)||!o.test(i)||n==="00000000000000000000000000000000"||s==="0000000000000000"?null:{version:r,traceId:n,parentId:s,traceFlags:i,isSampled:(parseInt(i,16)&1)===1}}function kv(t,e){if(!t||!e||e.length===0)return!1;let r;if(t instanceof URL)r=t;else try{r=new URL(t)}catch{return!1}for(const n of e)try{if(typeof n=="string"){if(Sv(r.hostname,n))return!0}else if(n instanceof RegExp){if(n.test(r.hostname))return!0}else if(typeof n=="function"&&n(r))return!0}catch{continue}return!1}function Sv(t,e){if(e===t)return!0;if(e.startsWith("*.")){const r=e.slice(2);if(t.endsWith(r)&&(t===r||t.endsWith("."+r)))return!0}return!1}function Ev(t){const e=[];try{const r=new URL(t);e.push(r.hostname)}catch{}return e.push("*.supabase.co","*.supabase.in"),e.push("localhost","127.0.0.1","[::1]"),e}function Jn(t){"@babel/helpers - typeof";return Jn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Jn(t)}function Tv(t,e){if(Jn(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(Jn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Av(t){var e=Tv(t,"string");return Jn(e)=="symbol"?e:e+""}function xv(t,e,r){return(e=Av(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Nl(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),r.push.apply(r,n)}return r}function Re(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Nl(Object(r),!0).forEach(function(n){xv(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Nl(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}const Rv=t=>t?(...e)=>t(...e):(...e)=>fetch(...e),Cv=()=>Headers,Ov=(t,e,r,n,s)=>{const i=Rv(n),o=Cv(),a=(s==null?void 0:s.enabled)===!0,l=(s==null?void 0:s.respectSamplingDecision)!==!1,c=a?Ev(e):null;return async(u,h)=>{var d;const f=(d=await r())!==null&&d!==void 0?d:t;let p=new o(h==null?void 0:h.headers);if(p.has("apikey")||p.set("apikey",t),p.has("Authorization")||p.set("Authorization",`Bearer ${f}`),c){const y=await Pv(u,c,l);y&&(y.traceparent&&!p.has("traceparent")&&p.set("traceparent",y.traceparent),y.tracestate&&!p.has("tracestate")&&p.set("tracestate",y.tracestate),y.baggage&&!p.has("baggage")&&p.set("baggage",y.baggage))}return i(u,Re(Re({},h),{},{headers:p}))}};async function Pv(t,e,r){if(!kv(typeof t=="string"||t instanceof URL?t:t.url,e))return null;const n=await _v();if(!n||!n.traceparent)return null;if(r){const s=wv(n.traceparent);if(s&&!s.isSampled)return null}return n}function Ll(t){return typeof t=="boolean"?{enabled:t}:t}function Iv(t){return t.endsWith("/")?t:t+"/"}function $v(t,e){var r,n,s,i,o,a;const{db:l,auth:c,realtime:u,global:h}=t,{db:d,auth:f,realtime:p,global:y}=e,w=Ll(t.tracePropagation),k=Ll(e.tracePropagation),_={db:Re(Re({},d),l),auth:Re(Re({},f),c),realtime:Re(Re({},p),u),storage:{},global:Re(Re(Re({},y),h),{},{headers:Re(Re({},(r=y==null?void 0:y.headers)!==null&&r!==void 0?r:{}),(n=h==null?void 0:h.headers)!==null&&n!==void 0?n:{})}),tracePropagation:{enabled:(s=(i=w==null?void 0:w.enabled)!==null&&i!==void 0?i:k==null?void 0:k.enabled)!==null&&s!==void 0?s:!1,respectSamplingDecision:(o=(a=w==null?void 0:w.respectSamplingDecision)!==null&&a!==void 0?a:k==null?void 0:k.respectSamplingDecision)!==null&&o!==void 0?o:!0},accessToken:async()=>""};return t.accessToken?_.accessToken=t.accessToken:delete _.accessToken,_}function jv(t){const e=t==null?void 0:t.trim();if(!e)throw new Error("supabaseUrl is required.");if(!e.match(/^https?:\/\//i))throw new Error("Invalid supabaseUrl: Must be a valid HTTP or HTTPS URL.");try{return new URL(Iv(e))}catch{throw Error("Invalid supabaseUrl: Provided URL is malformed.")}}var Nv=class extends cv{constructor(t){super(t)}},Lv=class{constructor(t,e,r){var n,s;this.supabaseUrl=t,this.supabaseKey=e;const i=jv(t);if(!e)throw new Error("supabaseKey is required.");this.realtimeUrl=new URL("realtime/v1",i),this.realtimeUrl.protocol=this.realtimeUrl.protocol.replace("http","ws"),this.authUrl=new URL("auth/v1",i),this.storageUrl=new URL("storage/v1",i),this.functionsUrl=new URL("functions/v1",i);const o=`sb-${i.hostname.split(".")[0]}-auth-token`,a={db:fv,realtime:gv,auth:Re(Re({},pv),{},{storageKey:o}),global:dv,tracePropagation:mv},l=$v(r??{},a);if(this.settings=l,this.storageKey=(n=l.auth.storageKey)!==null&&n!==void 0?n:"",this.headers=(s=l.global.headers)!==null&&s!==void 0?s:{},l.accessToken)this.accessToken=l.accessToken,this.auth=new Proxy({},{get:(u,h)=>{throw new Error(`@supabase/supabase-js: Supabase Client is configured with the accessToken option, accessing supabase.auth.${String(h)} is not possible`)}});else{var c;this.auth=this._initSupabaseAuthClient((c=l.auth)!==null&&c!==void 0?c:{},this.headers,l.global.fetch)}this.fetch=Ov(e,t,this._getAccessToken.bind(this),l.global.fetch,l.tracePropagation),this.realtime=this._initRealtimeClient(Re({headers:this.headers,accessToken:this._getAccessToken.bind(this),fetch:this.fetch},l.realtime)),this.accessToken&&Promise.resolve(this.accessToken()).then(u=>this.realtime.setAuth(u)).catch(u=>console.warn("Failed to set initial Realtime auth token:",u)),this.rest=new Zg(new URL("rest/v1",i).href,{headers:this.headers,schema:l.db.schema,fetch:this.fetch,timeout:l.db.timeout,urlLengthLimit:l.db.urlLengthLimit}),this.storage=new hy(this.storageUrl.href,this.headers,this.fetch,r==null?void 0:r.storage),l.accessToken||this._listenForAuthEvents()}get functions(){return new qg(this.functionsUrl.href,{headers:this.headers,customFetch:this.fetch})}from(t){return this.rest.from(t)}schema(t){return this.rest.schema(t)}rpc(t,e={},r={head:!1,get:!1,count:void 0}){return this.rest.rpc(t,e,r)}channel(t,e={config:{}}){return this.realtime.channel(t,e)}getChannels(){return this.realtime.getChannels()}removeChannel(t){return this.realtime.removeChannel(t)}removeAllChannels(){return this.realtime.removeAllChannels()}async _getAccessToken(){var t=this,e,r;if(t.accessToken)return await t.accessToken();const{data:n}=await t.auth.getSession();return(e=(r=n.session)===null||r===void 0?void 0:r.access_token)!==null&&e!==void 0?e:t.supabaseKey}_initSupabaseAuthClient({autoRefreshToken:t,persistSession:e,detectSessionInUrl:r,storage:n,userStorage:s,storageKey:i,flowType:o,lock:a,debug:l,throwOnError:c,experimental:u,lockAcquireTimeout:h,skipAutoInitialize:d},f,p){const y={Authorization:`Bearer ${this.supabaseKey}`,apikey:`${this.supabaseKey}`};return new Nv({url:this.authUrl.href,headers:Re(Re({},y),f),storageKey:i,autoRefreshToken:t,persistSession:e,detectSessionInUrl:r,storage:n,userStorage:s,flowType:o,lock:a,debug:l,throwOnError:c,experimental:u,fetch:p,lockAcquireTimeout:h,skipAutoInitialize:d,hasCustomAuthorizationHeader:Object.keys(this.headers).some(w=>w.toLowerCase()==="authorization")})}_initRealtimeClient(t){return new jm(this.realtimeUrl.href,Re(Re({},t),{},{params:Re(Re({},{apikey:this.supabaseKey}),t==null?void 0:t.params)}))}_listenForAuthEvents(){return this.auth.onAuthStateChange((t,e)=>{this._handleTokenChanged(t,"CLIENT",e==null?void 0:e.access_token)})}_handleTokenChanged(t,e,r){(t==="TOKEN_REFRESHED"||t==="SIGNED_IN")&&this.changedAccessToken!==r?(this.changedAccessToken=r,this.realtime.setAuth(r)):t==="SIGNED_OUT"&&(this.realtime.setAuth(),e=="STORAGE"&&this.auth.signOut(),this.changedAccessToken=void 0)}};const Dv=(t,e,r)=>new Lv(t,e,r);function Uv(){if(typeof window<"u")return!1;const t=globalThis.process;if(!t)return!1;const e=t.version;if(e==null)return!1;const r=e.match(/^v(\d+)\./);return r?parseInt(r[1],10)<=18:!1}Uv()&&console.warn("⚠️ Node.js 18 and below are deprecated and will no longer be supported in future versions of @supabase/supabase-js. Please upgrade to Node.js 20 or later. For more information, visit: https://github.com/orgs/supabase/discussions/37217");let Yu=null,Dl=!1;async function Bv(){if(!Dl){Dl=!0;try{const t=await fetch("/api/auth/config");if(!t.ok)return;const{supabaseUrl:e,supabaseAnonKey:r}=await t.json();e&&r&&(Yu=Dv(e,r))}catch{}}}function ps(){return Yu}const ln=du("auth",()=>{const t=Oe(localStorage.getItem("io_token")),e=Oe(localStorage.getItem("io_email")),r=Oe(!1);let n=null;const s=$e(()=>!!t.value);function i(h,d=3e5){try{return JSON.parse(atob(h.split(".")[1])).exp*1e3<=Date.now()+d}catch{return!0}}function o(){const h=ps();h&&(h.auth.onAuthStateChange((d,f)=>{var p,y;f?(t.value=f.access_token,e.value=((p=f.user)==null?void 0:p.email)??null,localStorage.setItem("io_token",f.access_token),(y=f.user)!=null&&y.email&&localStorage.setItem("io_email",f.user.email)):(t.value=null,e.value=null,localStorage.removeItem("io_token"),localStorage.removeItem("io_email"))}),a())}function a(){n||(n=setInterval(async()=>{t.value&&i(t.value)&&await u()},300*1e3))}async function l(h,d){var p,y;const f=ps();if(!f)throw new Error("Auth not configured");r.value=!0;try{const{data:w,error:k}=await f.auth.signInWithPassword({email:h,password:d});if(k)throw k;t.value=((p=w.session)==null?void 0:p.access_token)??null,e.value=((y=w.user)==null?void 0:y.email)??null,t.value&&localStorage.setItem("io_token",t.value),e.value&&localStorage.setItem("io_email",e.value)}finally{r.value=!1}}async function c(){const h=ps();h&&await h.auth.signOut(),t.value=null,e.value=null,localStorage.removeItem("io_token"),localStorage.removeItem("io_email"),n&&(clearInterval(n),n=null)}async function u(){const h=ps();if(!h)return;const{data:d,error:f}=await h.auth.refreshSession();if(!f&&d.session){t.value=d.session.access_token,localStorage.setItem("io_token",d.session.access_token);return}const{data:p}=await h.auth.getSession();if(p.session){t.value=p.session.access_token,localStorage.setItem("io_token",p.session.access_token);return}t.value=null,localStorage.removeItem("io_token")}return{token:t,email:e,loading:r,isAuthenticated:s,login:l,logout:c,refreshToken:u,initAuthListener:o}}),Mv=Object.freeze(Object.defineProperty({__proto__:null,useAuthStore:ln},Symbol.toStringTag,{value:"Module"})),Hv={class:"h-12 border-b border-border bg-header flex items-center justify-between px-4 shrink-0"},qv={class:"flex items-center gap-2"},Fv={class:"w-7 h-7 rounded-full bg-secondary flex items-center justify-center",title:"User"},Vv=pr({__name:"AppHeader",setup(t){const e=ln(),r=ag();async function n(){await e.logout(),r.push("/login")}return(s,i)=>{const o=Zs("router-link");return Z(),ue("header",Hv,[i[0]||(i[0]=ne("div",null,null,-1)),ne("div",qv,[he(o,{to:"/feed",class:"p-2 rounded-md hover:bg-accent text-muted-foreground hover:text-foreground transition-colors",title:"Inbox"},{default:Yr(()=>[he(re(Au),{class:"w-4 h-4"})]),_:1}),ne("div",Fv,[he(re(Cg),{class:"w-3.5 h-3.5 text-muted-foreground"})]),ne("button",{onClick:n,class:"p-2 rounded-md hover:bg-accent text-muted-foreground hover:text-foreground transition-colors",title:"Sign out"},[he(re(bg),{class:"w-4 h-4"})])])])}}}),zv=5e3;function Wv(t){try{return JSON.parse(atob(t.split(".")[1])).exp*1e3<=Date.now()+6e4}catch{return!0}}const Kv=du("chat",()=>{const t=Oe([]),e=Oe(!1),r=Oe(null),n=Oe(crypto.randomUUID()),s=Oe(null);function i(u,h=[]){const d={id:crypto.randomUUID(),role:"user",content:u,attachments:h,timestamp:new Date};return t.value.push(d),d}async function o(u,h=[]){i(u,h),e.value=!0;const d={id:crypto.randomUUID(),role:"assistant",content:"",attachments:[],timestamp:new Date,streaming:!0};t.value.push(d);let f=Date.now();try{const p=ln();p.token&&Wv(p.token)&&await p.refreshToken();const y={"Content-Type":"application/json"};p.token&&(y.Authorization=`Bearer ${p.token}`),s.value=new AbortController;const w=await fetch("/api/message",{method:"POST",headers:y,signal:s.value.signal,body:JSON.stringify({prompt:u,conversationId:n.value,attachments:h})});if(!w.ok||!w.body)throw new Error(`API error: ${w.status}`);const k=w.body.getReader(),_=new TextDecoder;let b="";for(;;){const{done:x,value:D}=await k.read();if(x)break;b+=_.decode(D,{stream:!0});const M=b.split(`
|
|
214
|
-
`);b=M.pop()??"";let U="";for(const V of M)if(V.startsWith("event: "))U=V.slice(7);else if(V.startsWith("data: ")){const C=V.slice(6);try{const z=JSON.parse(C);if(U==="delta"){const Q=Date.now(),O=t.value[t.value.length-1];if(O&&!O.streaming&&O.role==="assistant"&&Q-f>zv){const Y={id:crypto.randomUUID(),role:"assistant",content:z.content,attachments:[],timestamp:new Date,streaming:!0};t.value.push(Y)}else{const Y=t.value.filter(
|
|
215
|
-
]`).replace("lheading",Qu).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},ob=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,ab=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,th=/^( {2,}|\\)\n(?!\s*$)/,lb=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,ui=/[\p{P}\p{S}]/u,Fo=/[\s\p{P}\p{S}]/u,rh=/[^\s\p{P}\p{S}]/u,cb=
|
|
213
|
+
`);const M=await x.signMessage(new TextEncoder().encode(p),"utf8");if(!M||!(M instanceof Uint8Array))throw new Error("@supabase/auth-js: Wallet signMessage() API returned an recognized value");y=M}}try{const{data:w,error:k}=await q(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"solana",message:p,signature:Ar(y)},!((d=e.options)===null||d===void 0)&&d.captchaToken?{gotrue_meta_security:{captcha_token:(f=e.options)===null||f===void 0?void 0:f.captchaToken}}:null),xform:dt});if(k)throw k;if(!w||!w.session||!w.user){const _=new Lr;return this._returnResult({data:{user:null,session:null},error:_})}return w.session&&(await this._saveSession(w.session),await this._notifyAllSubscribers("SIGNED_IN",w.session)),this._returnResult({data:Object.assign({},w),error:k})}catch(w){if($(w))return this._returnResult({data:{user:null,session:null},error:w});throw w}}async _exchangeCodeForSession(e){const r=await wr(this.storage,`${this.storageKey}-code-verifier`),[n,s]=(r??"").split("/");try{if(!n&&this.flowType==="pkce")throw new _y;const{data:i,error:o}=await q(this.fetch,"POST",`${this.url}/token?grant_type=pkce`,{headers:this.headers,body:{auth_code:e,code_verifier:n},xform:dt});if(await He(this.storage,`${this.storageKey}-code-verifier`),o)throw o;if(!i||!i.session||!i.user){const a=new Lr;return this._returnResult({data:{user:null,session:null,redirectType:null},error:a})}return i.session&&(await this._saveSession(i.session),await this._notifyAllSubscribers(s==="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",i.session)),this._returnResult({data:Object.assign(Object.assign({},i),{redirectType:s??null}),error:o})}catch(i){if(await He(this.storage,`${this.storageKey}-code-verifier`),$(i))return this._returnResult({data:{user:null,session:null,redirectType:null},error:i});throw i}}async signInWithIdToken(e){try{const{options:r,provider:n,token:s,access_token:i,nonce:o}=e,a=await q(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,body:{provider:n,id_token:s,access_token:i,nonce:o,gotrue_meta_security:{captcha_token:r==null?void 0:r.captchaToken}},xform:dt}),{data:l,error:c}=a;if(c)return this._returnResult({data:{user:null,session:null},error:c});if(!l||!l.session||!l.user){const u=new Lr;return this._returnResult({data:{user:null,session:null},error:u})}return l.session&&(await this._saveSession(l.session),await this._notifyAllSubscribers("SIGNED_IN",l.session)),this._returnResult({data:l,error:c})}catch(r){if($(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async signInWithOtp(e){var r,n,s,i,o;try{if("email"in e){const{email:a,options:l}=e;let c=null,u=null;this.flowType==="pkce"&&([c,u]=await Dr(this.storage,this.storageKey));const{error:h}=await q(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{email:a,data:(r=l==null?void 0:l.data)!==null&&r!==void 0?r:{},create_user:(n=l==null?void 0:l.shouldCreateUser)!==null&&n!==void 0?n:!0,gotrue_meta_security:{captcha_token:l==null?void 0:l.captchaToken},code_challenge:c,code_challenge_method:u},redirectTo:l==null?void 0:l.emailRedirectTo});return this._returnResult({data:{user:null,session:null},error:h})}if("phone"in e){const{phone:a,options:l}=e,{data:c,error:u}=await q(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:(i=l==null?void 0:l.shouldCreateUser)!==null&&i!==void 0?i:!0,gotrue_meta_security:{captcha_token:l==null?void 0:l.captchaToken},channel:(o=l==null?void 0:l.channel)!==null&&o!==void 0?o:"sms"}});return this._returnResult({data:{user:null,session:null,messageId:c==null?void 0:c.message_id},error:u})}throw new hs("You must provide either an email or phone number.")}catch(a){if(await He(this.storage,`${this.storageKey}-code-verifier`),$(a))return this._returnResult({data:{user:null,session:null},error:a});throw a}}async verifyOtp(e){var r,n;try{let s,i;"options"in e&&(s=(r=e.options)===null||r===void 0?void 0:r.redirectTo,i=(n=e.options)===null||n===void 0?void 0:n.captchaToken);const{data:o,error:a}=await q(this.fetch,"POST",`${this.url}/verify`,{headers:this.headers,body:Object.assign(Object.assign({},e),{gotrue_meta_security:{captcha_token:i}}),redirectTo:s,xform:dt});if(a)throw a;if(!o)throw new Error("An error occurred on token verification.");const l=o.session,c=o.user;return l!=null&&l.access_token&&(await this._saveSession(l),await this._notifyAllSubscribers(e.type=="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",l)),this._returnResult({data:{user:c,session:l},error:null})}catch(s){if($(s))return this._returnResult({data:{user:null,session:null},error:s});throw s}}async signInWithSSO(e){var r,n,s,i,o;try{let a=null,l=null;this.flowType==="pkce"&&([a,l]=await Dr(this.storage,this.storageKey));const c=await q(this.fetch,"POST",`${this.url}/sso`,{body:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},"providerId"in e?{provider_id:e.providerId}:null),"domain"in e?{domain:e.domain}:null),{redirect_to:(n=(r=e.options)===null||r===void 0?void 0:r.redirectTo)!==null&&n!==void 0?n:void 0}),!((s=e==null?void 0:e.options)===null||s===void 0)&&s.captchaToken?{gotrue_meta_security:{captcha_token:e.options.captchaToken}}:null),{skip_http_redirect:!0,code_challenge:a,code_challenge_method:l}),headers:this.headers,xform:zy});return!((i=c.data)===null||i===void 0)&&i.url&&qe()&&!(!((o=e.options)===null||o===void 0)&&o.skipBrowserRedirect)&&window.location.assign(c.data.url),this._returnResult(c)}catch(a){if(await He(this.storage,`${this.storageKey}-code-verifier`),$(a))return this._returnResult({data:null,error:a});throw a}}async reauthenticate(){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._reauthenticate())}async _reauthenticate(){try{return await this._useSession(async e=>{const{data:{session:r},error:n}=e;if(n)throw n;if(!r)throw new Be;const{error:s}=await q(this.fetch,"GET",`${this.url}/reauthenticate`,{headers:this.headers,jwt:r.access_token});return this._returnResult({data:{user:null,session:null},error:s})})}catch(e){if($(e))return this._returnResult({data:{user:null,session:null},error:e});throw e}}async resend(e){try{const r=`${this.url}/resend`;if("email"in e){const{email:n,type:s,options:i}=e,{error:o}=await q(this.fetch,"POST",r,{headers:this.headers,body:{email:n,type:s,gotrue_meta_security:{captcha_token:i==null?void 0:i.captchaToken}},redirectTo:i==null?void 0:i.emailRedirectTo});return this._returnResult({data:{user:null,session:null},error:o})}else if("phone"in e){const{phone:n,type:s,options:i}=e,{data:o,error:a}=await q(this.fetch,"POST",r,{headers:this.headers,body:{phone:n,type:s,gotrue_meta_security:{captcha_token:i==null?void 0:i.captchaToken}}});return this._returnResult({data:{user:null,session:null,messageId:o==null?void 0:o.message_id},error:a})}throw new hs("You must provide either an email or phone number and a type")}catch(r){if($(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async getSession(){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>this._useSession(async r=>r))}async _acquireLock(e,r){this._debug("#_acquireLock","begin",e);try{if(this.lockAcquired){const n=this.pendingInLock.length?this.pendingInLock[this.pendingInLock.length-1]:Promise.resolve(),s=(async()=>(await n,await r()))();return this.pendingInLock.push((async()=>{try{await s}catch{}})()),s}return await this.lock(`lock:${this.storageKey}`,e,async()=>{this._debug("#_acquireLock","lock acquired for storage key",this.storageKey);try{this.lockAcquired=!0;const n=r();for(this.pendingInLock.push((async()=>{try{await n}catch{}})()),await n;this.pendingInLock.length;){const s=[...this.pendingInLock];await Promise.all(s),this.pendingInLock.splice(0,s.length)}return await n}finally{this._debug("#_acquireLock","lock released for storage key",this.storageKey),this.lockAcquired=!1}})}finally{this._debug("#_acquireLock","end")}}async _useSession(e){this._debug("#_useSession","begin");try{const r=await this.__loadSession();return await e(r)}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 e=null;const r=await wr(this.storage,this.storageKey);if(this._debug("#getSession()","session from storage",r),r!==null&&(this._isValidSession(r)?e=r:(this._debug("#getSession()","session from storage is not valid"),await this._removeSession())),!e)return{data:{session:null},error:null};const n=e.expires_at?e.expires_at*1e3-Date.now()<Ri:!1;if(this._debug("#__loadSession()",`session has${n?"":" not"} expired`,"expires_at",e.expires_at),!n){if(this.userStorage){const o=await wr(this.userStorage,this.storageKey+"-user");o!=null&&o.user?e.user=o.user:e.user=Oi()}if(this.storage.isServer&&e.user&&!e.user.__isUserNotAvailableProxy){const o={value:this.suppressGetSessionWarning};e.user=Hy(e.user,o),o.value&&(this.suppressGetSessionWarning=!0)}return{data:{session:e},error:null}}const{data:s,error:i}=await this._callRefreshToken(e.refresh_token);return i?this._returnResult({data:{session:null},error:i}):this._returnResult({data:{session:s},error:null})}finally{this._debug("#__loadSession()","end")}}async getUser(e){if(e)return await this._getUser(e);await this.initializePromise;const r=await this._acquireLock(this.lockAcquireTimeout,async()=>await this._getUser());return r.data.user&&(this.suppressGetSessionWarning=!0),r}async _getUser(e){try{return e?await q(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:e,xform:ur}):await this._useSession(async r=>{var n,s,i;const{data:o,error:a}=r;if(a)throw a;return!(!((n=o.session)===null||n===void 0)&&n.access_token)&&!this.hasCustomAuthorizationHeader?{data:{user:null},error:new Be}:await q(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:(i=(s=o.session)===null||s===void 0?void 0:s.access_token)!==null&&i!==void 0?i:void 0,xform:ur})})}catch(r){if($(r))return us(r)&&(await this._removeSession(),await He(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({data:{user:null},error:r});throw r}}async updateUser(e,r={}){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._updateUser(e,r))}async _updateUser(e,r={}){try{return await this._useSession(async n=>{const{data:s,error:i}=n;if(i)throw i;if(!s.session)throw new Be;const o=s.session;let a=null,l=null;this.flowType==="pkce"&&e.email!=null&&([a,l]=await Dr(this.storage,this.storageKey));const{data:c,error:u}=await q(this.fetch,"PUT",`${this.url}/user`,{headers:this.headers,redirectTo:r==null?void 0:r.emailRedirectTo,body:Object.assign(Object.assign({},e),{code_challenge:a,code_challenge_method:l}),jwt:o.access_token,xform:ur});if(u)throw u;return o.user=c.user,await this._saveSession(o),await this._notifyAllSubscribers("USER_UPDATED",o),this._returnResult({data:{user:o.user},error:null})})}catch(n){if(await He(this.storage,`${this.storageKey}-code-verifier`),$(n))return this._returnResult({data:{user:null},error:n});throw n}}async setSession(e){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._setSession(e))}async _setSession(e){try{if(!e.access_token||!e.refresh_token)throw new Be;const r=Date.now()/1e3;let n=r,s=!0,i=null;const{payload:o}=fs(e.access_token);if(o.exp&&(n=o.exp,s=n<=r),s){const{data:a,error:l}=await this._callRefreshToken(e.refresh_token);if(l)return this._returnResult({data:{user:null,session:null},error:l});if(!a)return{data:{user:null,session:null},error:null};i=a}else{const{data:a,error:l}=await this._getUser(e.access_token);if(l)return this._returnResult({data:{user:null,session:null},error:l});i={access_token:e.access_token,refresh_token:e.refresh_token,user:a.user,token_type:"bearer",expires_in:n-r,expires_at:n},await this._saveSession(i),await this._notifyAllSubscribers("SIGNED_IN",i)}return this._returnResult({data:{user:i.user,session:i},error:null})}catch(r){if($(r))return this._returnResult({data:{session:null,user:null},error:r});throw r}}async refreshSession(e){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._refreshSession(e))}async _refreshSession(e){try{return await this._useSession(async r=>{var n;if(!e){const{data:o,error:a}=r;if(a)throw a;e=(n=o.session)!==null&&n!==void 0?n:void 0}if(!(e!=null&&e.refresh_token))throw new Be;const{data:s,error:i}=await this._callRefreshToken(e.refresh_token);return i?this._returnResult({data:{user:null,session:null},error:i}):s?this._returnResult({data:{user:s.user,session:s},error:null}):this._returnResult({data:{user:null,session:null},error:null})})}catch(r){if($(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async _getSessionFromURL(e,r){var n;try{if(!qe())throw new ds("No browser detected.");if(e.error||e.error_description||e.error_code)throw new ds(e.error_description||"Error in URL with unspecified error_description",{error:e.error||"unspecified_error",code:e.error_code||"unspecified_code"});switch(r){case"implicit":if(this.flowType==="pkce")throw new bl("Not a valid PKCE flow url.");break;case"pkce":if(this.flowType==="implicit")throw new ds("Not a valid implicit grant flow url.");break;default:}if(r==="pkce"){if(this._debug("#_initialize()","begin","is PKCE flow",!0),!e.code)throw new bl("No code detected.");const{data:b,error:x}=await this._exchangeCodeForSession(e.code);if(x)throw x;const D=new URL(window.location.href);return D.searchParams.delete("code"),window.history.replaceState(window.history.state,"",D.toString()),{data:{session:b.session,redirectType:(n=b.redirectType)!==null&&n!==void 0?n:null},error:null}}const{provider_token:s,provider_refresh_token:i,access_token:o,refresh_token:a,expires_in:l,expires_at:c,token_type:u}=e;if(!o||!l||!a||!u)throw new ds("No session defined in URL");const h=Math.round(Date.now()/1e3),d=parseInt(l);let f=h+d;c&&(f=parseInt(c));const p=f-h;p*1e3<=Fr&&console.warn(`@supabase/gotrue-js: Session as retrieved from URL expires in ${p}s, should have been closer to ${d}s`);const y=f-d;h-y>=120?console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued over 120s ago, URL could be stale",y,f,h):h-y<0&&console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued in the future? Check the device clock for skew",y,f,h);const{data:w,error:k}=await this._getUser(o);if(k)throw k;const _={provider_token:s,provider_refresh_token:i,access_token:o,expires_in:d,expires_at:f,refresh_token:a,token_type:u,user:w.user};return window.location.hash="",this._debug("#_getSessionFromURL()","clearing window.location.hash"),this._returnResult({data:{session:_,redirectType:e.type},error:null})}catch(s){if($(s))return this._returnResult({data:{session:null,redirectType:null},error:s});throw s}}_isImplicitGrantCallback(e){return typeof this.detectSessionInUrl=="function"?this.detectSessionInUrl(new URL(window.location.href),e):!!(e.access_token||e.error_description)}async _isPKCECallback(e){const r=await wr(this.storage,`${this.storageKey}-code-verifier`);return!!(e.code&&r)}async signOut(e={scope:"global"}){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._signOut(e))}async _signOut({scope:e}={scope:"global"}){return await this._useSession(async r=>{var n;const{data:s,error:i}=r;if(i&&!us(i))return this._returnResult({error:i});const o=(n=s.session)===null||n===void 0?void 0:n.access_token;if(o){const{error:a}=await this.admin.signOut(o,e);if(a&&!(vy(a)&&(a.status===404||a.status===401||a.status===403)||us(a)))return this._returnResult({error:a})}return e!=="others"&&(await this._removeSession(),await He(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({error:null})})}onAuthStateChange(e){const r=xy(),n={id:r,callback:e,unsubscribe:()=>{this._debug("#unsubscribe()","state change callback with id removed",r),this.stateChangeEmitters.delete(r)}};return this._debug("#onAuthStateChange()","registered callback with id",r),this.stateChangeEmitters.set(r,n),(async()=>(await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>{this._emitInitialSession(r)})))(),{data:{subscription:n}}}async _emitInitialSession(e){return await this._useSession(async r=>{var n,s;try{const{data:{session:i},error:o}=r;if(o)throw o;await((n=this.stateChangeEmitters.get(e))===null||n===void 0?void 0:n.callback("INITIAL_SESSION",i)),this._debug("INITIAL_SESSION","callback id",e,"session",i)}catch(i){await((s=this.stateChangeEmitters.get(e))===null||s===void 0?void 0:s.callback("INITIAL_SESSION",null)),this._debug("INITIAL_SESSION","callback id",e,"error",i),us(i)?console.warn(i):console.error(i)}})}async resetPasswordForEmail(e,r={}){let n=null,s=null;this.flowType==="pkce"&&([n,s]=await Dr(this.storage,this.storageKey,!0));try{return await q(this.fetch,"POST",`${this.url}/recover`,{body:{email:e,code_challenge:n,code_challenge_method:s,gotrue_meta_security:{captcha_token:r.captchaToken}},headers:this.headers,redirectTo:r.redirectTo})}catch(i){if(await He(this.storage,`${this.storageKey}-code-verifier`),$(i))return this._returnResult({data:null,error:i});throw i}}async getUserIdentities(){var e;try{const{data:r,error:n}=await this.getUser();if(n)throw n;return this._returnResult({data:{identities:(e=r.user.identities)!==null&&e!==void 0?e:[]},error:null})}catch(r){if($(r))return this._returnResult({data:null,error:r});throw r}}async linkIdentity(e){return"token"in e?this.linkIdentityIdToken(e):this.linkIdentityOAuth(e)}async linkIdentityOAuth(e){var r;try{const{data:n,error:s}=await this._useSession(async i=>{var o,a,l,c,u;const{data:h,error:d}=i;if(d)throw d;const f=await this._getUrlForProvider(`${this.url}/user/identities/authorize`,e.provider,{redirectTo:(o=e.options)===null||o===void 0?void 0:o.redirectTo,scopes:(a=e.options)===null||a===void 0?void 0:a.scopes,queryParams:(l=e.options)===null||l===void 0?void 0:l.queryParams,skipBrowserRedirect:!0});return await q(this.fetch,"GET",f,{headers:this.headers,jwt:(u=(c=h.session)===null||c===void 0?void 0:c.access_token)!==null&&u!==void 0?u:void 0})});if(s)throw s;return qe()&&!(!((r=e.options)===null||r===void 0)&&r.skipBrowserRedirect)&&window.location.assign(n==null?void 0:n.url),this._returnResult({data:{provider:e.provider,url:n==null?void 0:n.url},error:null})}catch(n){if($(n))return this._returnResult({data:{provider:e.provider,url:null},error:n});throw n}}async linkIdentityIdToken(e){return await this._useSession(async r=>{var n;try{const{error:s,data:{session:i}}=r;if(s)throw s;const{options:o,provider:a,token:l,access_token:c,nonce:u}=e,h=await q(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,jwt:(n=i==null?void 0:i.access_token)!==null&&n!==void 0?n:void 0,body:{provider:a,id_token:l,access_token:c,nonce:u,link_identity:!0,gotrue_meta_security:{captcha_token:o==null?void 0:o.captchaToken}},xform:dt}),{data:d,error:f}=h;return f?this._returnResult({data:{user:null,session:null},error:f}):!d||!d.session||!d.user?this._returnResult({data:{user:null,session:null},error:new Lr}):(d.session&&(await this._saveSession(d.session),await this._notifyAllSubscribers("USER_UPDATED",d.session)),this._returnResult({data:d,error:f}))}catch(s){if(await He(this.storage,`${this.storageKey}-code-verifier`),$(s))return this._returnResult({data:{user:null,session:null},error:s});throw s}})}async unlinkIdentity(e){try{return await this._useSession(async r=>{var n,s;const{data:i,error:o}=r;if(o)throw o;return await q(this.fetch,"DELETE",`${this.url}/user/identities/${e.identity_id}`,{headers:this.headers,jwt:(s=(n=i.session)===null||n===void 0?void 0:n.access_token)!==null&&s!==void 0?s:void 0})})}catch(r){if($(r))return this._returnResult({data:null,error:r});throw r}}async _refreshAccessToken(e){const r=`#_refreshAccessToken(${e.substring(0,5)}...)`;this._debug(r,"begin");try{const n=Date.now();return await Py(async s=>(s>0&&await Oy(200*Math.pow(2,s-1)),this._debug(r,"refreshing attempt",s),await q(this.fetch,"POST",`${this.url}/token?grant_type=refresh_token`,{body:{refresh_token:e},headers:this.headers,xform:dt})),(s,i)=>{const o=200*Math.pow(2,s);return i&&Ci(i)&&Date.now()+o-n<Fr})}catch(n){if(this._debug(r,"error",n),$(n))return this._returnResult({data:{session:null,user:null},error:n});throw n}finally{this._debug(r,"end")}}_isValidSession(e){return typeof e=="object"&&e!==null&&"access_token"in e&&"refresh_token"in e&&"expires_at"in e}async _handleProviderSignIn(e,r){const n=await this._getUrlForProvider(`${this.url}/authorize`,e,{redirectTo:r.redirectTo,scopes:r.scopes,queryParams:r.queryParams});return this._debug("#_handleProviderSignIn()","provider",e,"options",r,"url",n),qe()&&!r.skipBrowserRedirect&&window.location.assign(n),{data:{provider:e,url:n},error:null}}async _recoverAndRefresh(){var e,r;const n="#_recoverAndRefresh()";this._debug(n,"begin");try{const s=await wr(this.storage,this.storageKey);if(s&&this.userStorage){let o=await wr(this.userStorage,this.storageKey+"-user");!this.storage.isServer&&Object.is(this.storage,this.userStorage)&&!o&&(o={user:s.user},await Vr(this.userStorage,this.storageKey+"-user",o)),s.user=(e=o==null?void 0:o.user)!==null&&e!==void 0?e:Oi()}else if(s&&!s.user&&!s.user){const o=await wr(this.storage,this.storageKey+"-user");o&&(o!=null&&o.user)?(s.user=o.user,await He(this.storage,this.storageKey+"-user"),await Vr(this.storage,this.storageKey,s)):s.user=Oi()}if(this._debug(n,"session from storage",s),!this._isValidSession(s)){this._debug(n,"session is not valid"),s!==null&&await this._removeSession();return}const i=((r=s.expires_at)!==null&&r!==void 0?r:1/0)*1e3-Date.now()<Ri;if(this._debug(n,`session has${i?"":" not"} expired with margin of ${Ri}s`),i){if(this.autoRefreshToken&&s.refresh_token){const{error:o}=await this._callRefreshToken(s.refresh_token);o&&(console.error(o),Ci(o)||(this._debug(n,"refresh failed with a non-retryable error, removing the session",o),await this._removeSession()))}}else if(s.user&&s.user.__isUserNotAvailableProxy===!0)try{const{data:o,error:a}=await this._getUser(s.access_token);!a&&(o!=null&&o.user)?(s.user=o.user,await this._saveSession(s),await this._notifyAllSubscribers("SIGNED_IN",s)):this._debug(n,"could not get user data, skipping SIGNED_IN notification")}catch(o){console.error("Error getting user data:",o),this._debug(n,"error getting user data, skipping SIGNED_IN notification",o)}else await this._notifyAllSubscribers("SIGNED_IN",s)}catch(s){this._debug(n,"error",s),console.error(s);return}finally{this._debug(n,"end")}}async _callRefreshToken(e){var r,n;if(!e)throw new Be;if(this.refreshingDeferred)return this.refreshingDeferred.promise;const s=`#_callRefreshToken(${e.substring(0,5)}...)`;this._debug(s,"begin");try{this.refreshingDeferred=new li;const{data:i,error:o}=await this._refreshAccessToken(e);if(o)throw o;if(!i.session)throw new Be;await this._saveSession(i.session),await this._notifyAllSubscribers("TOKEN_REFRESHED",i.session);const a={data:i.session,error:null};return this.refreshingDeferred.resolve(a),a}catch(i){if(this._debug(s,"error",i),$(i)){const o={data:null,error:i};return Ci(i)||await this._removeSession(),(r=this.refreshingDeferred)===null||r===void 0||r.resolve(o),o}throw(n=this.refreshingDeferred)===null||n===void 0||n.reject(i),i}finally{this.refreshingDeferred=null,this._debug(s,"end")}}async _notifyAllSubscribers(e,r,n=!0){const s=`#_notifyAllSubscribers(${e})`;this._debug(s,"begin",r,`broadcast = ${n}`);try{this.broadcastChannel&&n&&this.broadcastChannel.postMessage({event:e,session:r});const i=[],o=Array.from(this.stateChangeEmitters.values()).map(async a=>{try{await a.callback(e,r)}catch(l){i.push(l)}});if(await Promise.all(o),i.length>0){for(let a=0;a<i.length;a+=1)console.error(i[a]);throw i[0]}}finally{this._debug(s,"end")}}async _saveSession(e){this._debug("#_saveSession()",e),this.suppressGetSessionWarning=!0,await He(this.storage,`${this.storageKey}-code-verifier`);const r=Object.assign({},e),n=r.user&&r.user.__isUserNotAvailableProxy===!0;if(this.userStorage){!n&&r.user&&await Vr(this.userStorage,this.storageKey+"-user",{user:r.user});const s=Object.assign({},r);delete s.user;const i=El(s);await Vr(this.storage,this.storageKey,i)}else{const s=El(r);await Vr(this.storage,this.storageKey,s)}}async _removeSession(){this._debug("#_removeSession()"),this.suppressGetSessionWarning=!1,await He(this.storage,this.storageKey),await He(this.storage,this.storageKey+"-code-verifier"),await He(this.storage,this.storageKey+"-user"),this.userStorage&&await He(this.userStorage,this.storageKey+"-user"),await this._notifyAllSubscribers("SIGNED_OUT",null)}_removeVisibilityChangedCallback(){this._debug("#_removeVisibilityChangedCallback()");const e=this.visibilityChangedCallback;this.visibilityChangedCallback=null;try{e&&qe()&&(window!=null&&window.removeEventListener)&&window.removeEventListener("visibilitychange",e)}catch(r){console.error("removing visibilitychange callback failed",r)}}async _startAutoRefresh(){await this._stopAutoRefresh(),this._debug("#_startAutoRefresh()");const e=setInterval(()=>this._autoRefreshTokenTick(),Fr);this.autoRefreshTicker=e,e&&typeof e=="object"&&typeof e.unref=="function"?e.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(e);const r=setTimeout(async()=>{await this.initializePromise,await this._autoRefreshTokenTick()},0);this.autoRefreshTickTimeout=r,r&&typeof r=="object"&&typeof r.unref=="function"?r.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(r)}async _stopAutoRefresh(){this._debug("#_stopAutoRefresh()");const e=this.autoRefreshTicker;this.autoRefreshTicker=null,e&&clearInterval(e);const r=this.autoRefreshTickTimeout;this.autoRefreshTickTimeout=null,r&&clearTimeout(r)}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 e=Date.now();try{return await this._useSession(async r=>{const{data:{session:n}}=r;if(!n||!n.refresh_token||!n.expires_at){this._debug("#_autoRefreshTokenTick()","no session");return}const s=Math.floor((n.expires_at*1e3-e)/Fr);this._debug("#_autoRefreshTokenTick()",`access token expires in ${s} ticks, a tick lasts ${Fr}ms, refresh threshold is ${ao} ticks`),s<=ao&&await this._callRefreshToken(n.refresh_token)})}catch(r){console.error("Auto refresh tick failed with error. This is likely a transient error.",r)}}finally{this._debug("#_autoRefreshTokenTick()","end")}})}catch(e){if(e instanceof zu)this._debug("auto refresh token tick lock not available");else throw e}}async _handleVisibilityChange(){if(this._debug("#_handleVisibilityChange()"),!qe()||!(window!=null&&window.addEventListener))return this.autoRefreshToken&&this.startAutoRefresh(),!1;try{this.visibilityChangedCallback=async()=>{try{await this._onVisibilityChanged(!1)}catch(e){this._debug("#visibilityChangedCallback","error",e)}},window==null||window.addEventListener("visibilitychange",this.visibilityChangedCallback),await this._onVisibilityChanged(!0)}catch(e){console.error("_handleVisibilityChange",e)}}async _onVisibilityChanged(e){const r=`#_onVisibilityChanged(${e})`;this._debug(r,"visibilityState",document.visibilityState),document.visibilityState==="visible"?(this.autoRefreshToken&&this._startAutoRefresh(),e||(await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>{if(document.visibilityState!=="visible"){this._debug(r,"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(e,r,n){const s=[`provider=${encodeURIComponent(r)}`];if(n!=null&&n.redirectTo&&s.push(`redirect_to=${encodeURIComponent(n.redirectTo)}`),n!=null&&n.scopes&&s.push(`scopes=${encodeURIComponent(n.scopes)}`),this.flowType==="pkce"){const[i,o]=await Dr(this.storage,this.storageKey),a=new URLSearchParams({code_challenge:`${encodeURIComponent(i)}`,code_challenge_method:`${encodeURIComponent(o)}`});s.push(a.toString())}if(n!=null&&n.queryParams){const i=new URLSearchParams(n.queryParams);s.push(i.toString())}return n!=null&&n.skipBrowserRedirect&&s.push(`skip_http_redirect=${n.skipBrowserRedirect}`),`${e}?${s.join("&")}`}async _unenroll(e){try{return await this._useSession(async r=>{var n;const{data:s,error:i}=r;return i?this._returnResult({data:null,error:i}):await q(this.fetch,"DELETE",`${this.url}/factors/${e.factorId}`,{headers:this.headers,jwt:(n=s==null?void 0:s.session)===null||n===void 0?void 0:n.access_token})})}catch(r){if($(r))return this._returnResult({data:null,error:r});throw r}}async _enroll(e){try{return await this._useSession(async r=>{var n,s;const{data:i,error:o}=r;if(o)return this._returnResult({data:null,error:o});const a=Object.assign({friendly_name:e.friendlyName,factor_type:e.factorType},e.factorType==="phone"?{phone:e.phone}:e.factorType==="totp"?{issuer:e.issuer}:{}),{data:l,error:c}=await q(this.fetch,"POST",`${this.url}/factors`,{body:a,headers:this.headers,jwt:(n=i==null?void 0:i.session)===null||n===void 0?void 0:n.access_token});return c?this._returnResult({data:null,error:c}):(e.factorType==="totp"&&l.type==="totp"&&(!((s=l==null?void 0:l.totp)===null||s===void 0)&&s.qr_code)&&(l.totp.qr_code=`data:image/svg+xml;utf-8,${l.totp.qr_code}`),this._returnResult({data:l,error:null}))})}catch(r){if($(r))return this._returnResult({data:null,error:r});throw r}}async _verify(e){return this._acquireLock(this.lockAcquireTimeout,async()=>{try{return await this._useSession(async r=>{var n;const{data:s,error:i}=r;if(i)return this._returnResult({data:null,error:i});const o=Object.assign({challenge_id:e.challengeId},"webauthn"in e?{webauthn:Object.assign(Object.assign({},e.webauthn),{credential_response:e.webauthn.type==="create"?Il(e.webauthn.credential_response):$l(e.webauthn.credential_response)})}:{code:e.code}),{data:a,error:l}=await q(this.fetch,"POST",`${this.url}/factors/${e.factorId}/verify`,{body:o,headers:this.headers,jwt:(n=s==null?void 0:s.session)===null||n===void 0?void 0:n.access_token});return l?this._returnResult({data:null,error:l}):(await this._saveSession(Object.assign({expires_at:Math.round(Date.now()/1e3)+a.expires_in},a)),await this._notifyAllSubscribers("MFA_CHALLENGE_VERIFIED",a),this._returnResult({data:a,error:l}))})}catch(r){if($(r))return this._returnResult({data:null,error:r});throw r}})}async _challenge(e){return this._acquireLock(this.lockAcquireTimeout,async()=>{try{return await this._useSession(async r=>{var n;const{data:s,error:i}=r;if(i)return this._returnResult({data:null,error:i});const o=await q(this.fetch,"POST",`${this.url}/factors/${e.factorId}/challenge`,{body:e,headers:this.headers,jwt:(n=s==null?void 0:s.session)===null||n===void 0?void 0:n.access_token});if(o.error)return o;const{data:a}=o;if(a.type!=="webauthn")return{data:a,error:null};switch(a.webauthn.type){case"create":return{data:Object.assign(Object.assign({},a),{webauthn:Object.assign(Object.assign({},a.webauthn),{credential_options:Object.assign(Object.assign({},a.webauthn.credential_options),{publicKey:Ol(a.webauthn.credential_options.publicKey)})})}),error:null};case"request":return{data:Object.assign(Object.assign({},a),{webauthn:Object.assign(Object.assign({},a.webauthn),{credential_options:Object.assign(Object.assign({},a.webauthn.credential_options),{publicKey:Pl(a.webauthn.credential_options.publicKey)})})}),error:null}}})}catch(r){if($(r))return this._returnResult({data:null,error:r});throw r}})}async _challengeAndVerify(e){const{data:r,error:n}=await this._challenge({factorId:e.factorId});return n?this._returnResult({data:null,error:n}):await this._verify({factorId:e.factorId,challengeId:r.id,code:e.code})}async _listFactors(){var e;const{data:{user:r},error:n}=await this.getUser();if(n)return{data:null,error:n};const s={all:[],phone:[],totp:[],webauthn:[]};for(const i of(e=r==null?void 0:r.factors)!==null&&e!==void 0?e:[])s.all.push(i),i.status==="verified"&&s[i.factor_type].push(i);return{data:s,error:null}}async _getAuthenticatorAssuranceLevel(e){var r,n,s,i;if(e)try{const{payload:f}=fs(e);let p=null;f.aal&&(p=f.aal);let y=p;const{data:{user:w},error:k}=await this.getUser(e);if(k)return this._returnResult({data:null,error:k});((n=(r=w==null?void 0:w.factors)===null||r===void 0?void 0:r.filter(x=>x.status==="verified"))!==null&&n!==void 0?n:[]).length>0&&(y="aal2");const b=f.amr||[];return{data:{currentLevel:p,nextLevel:y,currentAuthenticationMethods:b},error:null}}catch(f){if($(f))return this._returnResult({data:null,error:f});throw f}const{data:{session:o},error:a}=await this.getSession();if(a)return this._returnResult({data:null,error:a});if(!o)return{data:{currentLevel:null,nextLevel:null,currentAuthenticationMethods:[]},error:null};const{payload:l}=fs(o.access_token);let c=null;l.aal&&(c=l.aal);let u=c;((i=(s=o.user.factors)===null||s===void 0?void 0:s.filter(f=>f.status==="verified"))!==null&&i!==void 0?i:[]).length>0&&(u="aal2");const d=l.amr||[];return{data:{currentLevel:c,nextLevel:u,currentAuthenticationMethods:d},error:null}}async _getAuthorizationDetails(e){try{return await this._useSession(async r=>{const{data:{session:n},error:s}=r;return s?this._returnResult({data:null,error:s}):n?await q(this.fetch,"GET",`${this.url}/oauth/authorizations/${e}`,{headers:this.headers,jwt:n.access_token,xform:i=>({data:i,error:null})}):this._returnResult({data:null,error:new Be})})}catch(r){if($(r))return this._returnResult({data:null,error:r});throw r}}async _approveAuthorization(e,r){try{return await this._useSession(async n=>{const{data:{session:s},error:i}=n;if(i)return this._returnResult({data:null,error:i});if(!s)return this._returnResult({data:null,error:new Be});const o=await q(this.fetch,"POST",`${this.url}/oauth/authorizations/${e}/consent`,{headers:this.headers,jwt:s.access_token,body:{action:"approve"},xform:a=>({data:a,error:null})});return o.data&&o.data.redirect_url&&qe()&&!(r!=null&&r.skipBrowserRedirect)&&window.location.assign(o.data.redirect_url),o})}catch(n){if($(n))return this._returnResult({data:null,error:n});throw n}}async _denyAuthorization(e,r){try{return await this._useSession(async n=>{const{data:{session:s},error:i}=n;if(i)return this._returnResult({data:null,error:i});if(!s)return this._returnResult({data:null,error:new Be});const o=await q(this.fetch,"POST",`${this.url}/oauth/authorizations/${e}/consent`,{headers:this.headers,jwt:s.access_token,body:{action:"deny"},xform:a=>({data:a,error:null})});return o.data&&o.data.redirect_url&&qe()&&!(r!=null&&r.skipBrowserRedirect)&&window.location.assign(o.data.redirect_url),o})}catch(n){if($(n))return this._returnResult({data:null,error:n});throw n}}async _listOAuthGrants(){try{return await this._useSession(async e=>{const{data:{session:r},error:n}=e;return n?this._returnResult({data:null,error:n}):r?await q(this.fetch,"GET",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:r.access_token,xform:s=>({data:s,error:null})}):this._returnResult({data:null,error:new Be})})}catch(e){if($(e))return this._returnResult({data:null,error:e});throw e}}async _revokeOAuthGrant(e){try{return await this._useSession(async r=>{const{data:{session:n},error:s}=r;return s?this._returnResult({data:null,error:s}):n?(await q(this.fetch,"DELETE",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:n.access_token,query:{client_id:e.clientId},noResolveJson:!0}),{data:{},error:null}):this._returnResult({data:null,error:new Be})})}catch(r){if($(r))return this._returnResult({data:null,error:r});throw r}}async fetchJwk(e,r={keys:[]}){let n=r.keys.find(a=>a.kid===e);if(n)return n;const s=Date.now();if(n=this.jwks.keys.find(a=>a.kid===e),n&&this.jwks_cached_at+my>s)return n;const{data:i,error:o}=await q(this.fetch,"GET",`${this.url}/.well-known/jwks.json`,{headers:this.headers});if(o)throw o;return!i.keys||i.keys.length===0||(this.jwks=i,this.jwks_cached_at=s,n=i.keys.find(a=>a.kid===e),!n)?null:n}async getClaims(e,r={}){try{let n=e;if(!n){const{data:f,error:p}=await this.getSession();if(p||!f.session)return this._returnResult({data:null,error:p});n=f.session.access_token}const{header:s,payload:i,signature:o,raw:{header:a,payload:l}}=fs(n);r!=null&&r.allowExpired||Uy(i.exp);const c=!s.alg||s.alg.startsWith("HS")||!s.kid||!("crypto"in globalThis&&"subtle"in globalThis.crypto)?null:await this.fetchJwk(s.kid,r!=null&&r.keys?{keys:r.keys}:r==null?void 0:r.jwks);if(!c){const{error:f}=await this.getUser(n);if(f)throw f;return{data:{claims:i,header:s,signature:o},error:null}}const u=By(s.alg),h=await crypto.subtle.importKey("jwk",c,u,!0,["verify"]);if(!await crypto.subtle.verify(u,h,o,Ty(`${a}.${l}`)))throw new uo("Invalid JWT signature");return{data:{claims:i,header:s,signature:o},error:null}}catch(n){if($(n))return this._returnResult({data:null,error:n});throw n}}async signInWithPasskey(e){var r,n,s;gt(this.experimental);try{if(!js())return this._returnResult({data:null,error:new yt("Browser does not support WebAuthn",null)});const{data:i,error:o}=await this._startPasskeyAuthentication({options:{captchaToken:(r=e==null?void 0:e.options)===null||r===void 0?void 0:r.captchaToken}});if(o||!i)return this._returnResult({data:null,error:o});const a=Pl(i.options),l=(s=(n=e==null?void 0:e.options)===null||n===void 0?void 0:n.signal)!==null&&s!==void 0?s:ho.createNewAbortSignal(),{data:c,error:u}=await Ju({publicKey:a,signal:l});if(u||!c)return this._returnResult({data:null,error:u??new yt("WebAuthn ceremony failed",null)});const h=$l(c);return this._verifyPasskeyAuthentication({challengeId:i.challenge_id,credential:h})}catch(i){if($(i))return this._returnResult({data:null,error:i});throw i}}async registerPasskey(e){var r,n;gt(this.experimental);try{if(!js())return this._returnResult({data:null,error:new yt("Browser does not support WebAuthn",null)});const{data:s,error:i}=await this._startPasskeyRegistration();if(i||!s)return this._returnResult({data:null,error:i});const o=Ol(s.options),a=(n=(r=e==null?void 0:e.options)===null||r===void 0?void 0:r.signal)!==null&&n!==void 0?n:ho.createNewAbortSignal(),{data:l,error:c}=await Gu({publicKey:o,signal:a});if(c||!l)return this._returnResult({data:null,error:c??new yt("WebAuthn ceremony failed",null)});const u=Il(l);return this._verifyPasskeyRegistration({challengeId:s.challenge_id,credential:u})}catch(s){if($(s))return this._returnResult({data:null,error:s});throw s}}async _startPasskeyRegistration(){gt(this.experimental);try{return await this._useSession(async e=>{const{data:{session:r},error:n}=e;if(n)return this._returnResult({data:null,error:n});if(!r)return this._returnResult({data:null,error:new Be});const{data:s,error:i}=await q(this.fetch,"POST",`${this.url}/passkeys/registration/options`,{headers:this.headers,jwt:r.access_token,body:{}});return i?this._returnResult({data:null,error:i}):this._returnResult({data:s,error:null})})}catch(e){if($(e))return this._returnResult({data:null,error:e});throw e}}async _verifyPasskeyRegistration(e){gt(this.experimental);try{return await this._useSession(async r=>{const{data:{session:n},error:s}=r;if(s)return this._returnResult({data:null,error:s});if(!n)return this._returnResult({data:null,error:new Be});const{data:i,error:o}=await q(this.fetch,"POST",`${this.url}/passkeys/registration/verify`,{headers:this.headers,jwt:n.access_token,body:{challenge_id:e.challengeId,credential:e.credential}});return o?this._returnResult({data:null,error:o}):this._returnResult({data:i,error:null})})}catch(r){if($(r))return this._returnResult({data:null,error:r});throw r}}async _startPasskeyAuthentication(e){var r;gt(this.experimental);try{const{data:n,error:s}=await q(this.fetch,"POST",`${this.url}/passkeys/authentication/options`,{headers:this.headers,body:{gotrue_meta_security:{captcha_token:(r=e==null?void 0:e.options)===null||r===void 0?void 0:r.captchaToken}}});return s?this._returnResult({data:null,error:s}):this._returnResult({data:n,error:null})}catch(n){if($(n))return this._returnResult({data:null,error:n});throw n}}async _verifyPasskeyAuthentication(e){gt(this.experimental);try{const{data:r,error:n}=await q(this.fetch,"POST",`${this.url}/passkeys/authentication/verify`,{headers:this.headers,body:{challenge_id:e.challengeId,credential:e.credential},xform:dt});return n?this._returnResult({data:null,error:n}):(r.session&&(await this._saveSession(r.session),await this._notifyAllSubscribers("SIGNED_IN",r.session)),this._returnResult({data:r,error:null}))}catch(r){if($(r))return this._returnResult({data:null,error:r});throw r}}async _listPasskeys(){gt(this.experimental);try{return await this._useSession(async e=>{const{data:{session:r},error:n}=e;if(n)return this._returnResult({data:null,error:n});if(!r)return this._returnResult({data:null,error:new Be});const{data:s,error:i}=await q(this.fetch,"GET",`${this.url}/passkeys`,{headers:this.headers,jwt:r.access_token,xform:o=>({data:o,error:null})});return i?this._returnResult({data:null,error:i}):this._returnResult({data:s,error:null})})}catch(e){if($(e))return this._returnResult({data:null,error:e});throw e}}async _updatePasskey(e){gt(this.experimental);try{return await this._useSession(async r=>{const{data:{session:n},error:s}=r;if(s)return this._returnResult({data:null,error:s});if(!n)return this._returnResult({data:null,error:new Be});const{data:i,error:o}=await q(this.fetch,"PATCH",`${this.url}/passkeys/${e.passkeyId}`,{headers:this.headers,jwt:n.access_token,body:{friendly_name:e.friendlyName}});return o?this._returnResult({data:null,error:o}):this._returnResult({data:i,error:null})})}catch(r){if($(r))return this._returnResult({data:null,error:r});throw r}}async _deletePasskey(e){gt(this.experimental);try{return await this._useSession(async r=>{const{data:{session:n},error:s}=r;if(s)return this._returnResult({data:null,error:s});if(!n)return this._returnResult({data:null,error:new Be});const{error:i}=await q(this.fetch,"DELETE",`${this.url}/passkeys/${e.passkeyId}`,{headers:this.headers,jwt:n.access_token,noResolveJson:!0});return i?this._returnResult({data:null,error:i}):this._returnResult({data:null,error:null})})}catch(r){if($(r))return this._returnResult({data:null,error:r});throw r}}}Gn.nextInstanceID={};const cv=Gn,uv="2.106.2";let wn="";typeof Deno<"u"?wn="deno":typeof document<"u"?wn="web":typeof navigator<"u"&&navigator.product==="ReactNative"?wn="react-native":wn="node";const hv={"X-Client-Info":`supabase-js-${wn}/${uv}`},dv={headers:hv},fv={schema:"public"},pv={autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,flowType:"implicit"},gv={},mv={enabled:!1,respectSamplingDecision:!0};function yv(t,e,r,n){function s(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function a(u){try{c(n.next(u))}catch(h){o(h)}}function l(u){try{c(n.throw(u))}catch(h){o(h)}}function c(u){u.done?i(u.value):s(u.value).then(a,l)}c((n=n.apply(t,[])).next())})}let Ii=null;const vv="@opentelemetry/api";function bv(){return Ii===null&&(Ii=import(vv).catch(()=>null)),Ii}function _v(){return yv(this,void 0,void 0,function*(){try{const t=yield bv();if(!t||!t.propagation||!t.context)return null;const e={};t.propagation.inject(t.context.active(),e);const r=e.traceparent;return r?{traceparent:r,tracestate:e.tracestate,baggage:e.baggage}:null}catch{return null}})}function wv(t){if(!t||typeof t!="string")return null;const e=t.split("-");if(e.length!==4)return null;const[r,n,s,i]=e;if(r.length!==2||n.length!==32||s.length!==16||i.length!==2)return null;const o=/^[0-9a-f]+$/i;return!o.test(r)||!o.test(n)||!o.test(s)||!o.test(i)||n==="00000000000000000000000000000000"||s==="0000000000000000"?null:{version:r,traceId:n,parentId:s,traceFlags:i,isSampled:(parseInt(i,16)&1)===1}}function kv(t,e){if(!t||!e||e.length===0)return!1;let r;if(t instanceof URL)r=t;else try{r=new URL(t)}catch{return!1}for(const n of e)try{if(typeof n=="string"){if(Sv(r.hostname,n))return!0}else if(n instanceof RegExp){if(n.test(r.hostname))return!0}else if(typeof n=="function"&&n(r))return!0}catch{continue}return!1}function Sv(t,e){if(e===t)return!0;if(e.startsWith("*.")){const r=e.slice(2);if(t.endsWith(r)&&(t===r||t.endsWith("."+r)))return!0}return!1}function Ev(t){const e=[];try{const r=new URL(t);e.push(r.hostname)}catch{}return e.push("*.supabase.co","*.supabase.in"),e.push("localhost","127.0.0.1","[::1]"),e}function Jn(t){"@babel/helpers - typeof";return Jn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Jn(t)}function Tv(t,e){if(Jn(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(Jn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Av(t){var e=Tv(t,"string");return Jn(e)=="symbol"?e:e+""}function xv(t,e,r){return(e=Av(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Nl(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),r.push.apply(r,n)}return r}function Re(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Nl(Object(r),!0).forEach(function(n){xv(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Nl(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}const Rv=t=>t?(...e)=>t(...e):(...e)=>fetch(...e),Cv=()=>Headers,Ov=(t,e,r,n,s)=>{const i=Rv(n),o=Cv(),a=(s==null?void 0:s.enabled)===!0,l=(s==null?void 0:s.respectSamplingDecision)!==!1,c=a?Ev(e):null;return async(u,h)=>{var d;const f=(d=await r())!==null&&d!==void 0?d:t;let p=new o(h==null?void 0:h.headers);if(p.has("apikey")||p.set("apikey",t),p.has("Authorization")||p.set("Authorization",`Bearer ${f}`),c){const y=await Pv(u,c,l);y&&(y.traceparent&&!p.has("traceparent")&&p.set("traceparent",y.traceparent),y.tracestate&&!p.has("tracestate")&&p.set("tracestate",y.tracestate),y.baggage&&!p.has("baggage")&&p.set("baggage",y.baggage))}return i(u,Re(Re({},h),{},{headers:p}))}};async function Pv(t,e,r){if(!kv(typeof t=="string"||t instanceof URL?t:t.url,e))return null;const n=await _v();if(!n||!n.traceparent)return null;if(r){const s=wv(n.traceparent);if(s&&!s.isSampled)return null}return n}function Ll(t){return typeof t=="boolean"?{enabled:t}:t}function Iv(t){return t.endsWith("/")?t:t+"/"}function $v(t,e){var r,n,s,i,o,a;const{db:l,auth:c,realtime:u,global:h}=t,{db:d,auth:f,realtime:p,global:y}=e,w=Ll(t.tracePropagation),k=Ll(e.tracePropagation),_={db:Re(Re({},d),l),auth:Re(Re({},f),c),realtime:Re(Re({},p),u),storage:{},global:Re(Re(Re({},y),h),{},{headers:Re(Re({},(r=y==null?void 0:y.headers)!==null&&r!==void 0?r:{}),(n=h==null?void 0:h.headers)!==null&&n!==void 0?n:{})}),tracePropagation:{enabled:(s=(i=w==null?void 0:w.enabled)!==null&&i!==void 0?i:k==null?void 0:k.enabled)!==null&&s!==void 0?s:!1,respectSamplingDecision:(o=(a=w==null?void 0:w.respectSamplingDecision)!==null&&a!==void 0?a:k==null?void 0:k.respectSamplingDecision)!==null&&o!==void 0?o:!0},accessToken:async()=>""};return t.accessToken?_.accessToken=t.accessToken:delete _.accessToken,_}function jv(t){const e=t==null?void 0:t.trim();if(!e)throw new Error("supabaseUrl is required.");if(!e.match(/^https?:\/\//i))throw new Error("Invalid supabaseUrl: Must be a valid HTTP or HTTPS URL.");try{return new URL(Iv(e))}catch{throw Error("Invalid supabaseUrl: Provided URL is malformed.")}}var Nv=class extends cv{constructor(t){super(t)}},Lv=class{constructor(t,e,r){var n,s;this.supabaseUrl=t,this.supabaseKey=e;const i=jv(t);if(!e)throw new Error("supabaseKey is required.");this.realtimeUrl=new URL("realtime/v1",i),this.realtimeUrl.protocol=this.realtimeUrl.protocol.replace("http","ws"),this.authUrl=new URL("auth/v1",i),this.storageUrl=new URL("storage/v1",i),this.functionsUrl=new URL("functions/v1",i);const o=`sb-${i.hostname.split(".")[0]}-auth-token`,a={db:fv,realtime:gv,auth:Re(Re({},pv),{},{storageKey:o}),global:dv,tracePropagation:mv},l=$v(r??{},a);if(this.settings=l,this.storageKey=(n=l.auth.storageKey)!==null&&n!==void 0?n:"",this.headers=(s=l.global.headers)!==null&&s!==void 0?s:{},l.accessToken)this.accessToken=l.accessToken,this.auth=new Proxy({},{get:(u,h)=>{throw new Error(`@supabase/supabase-js: Supabase Client is configured with the accessToken option, accessing supabase.auth.${String(h)} is not possible`)}});else{var c;this.auth=this._initSupabaseAuthClient((c=l.auth)!==null&&c!==void 0?c:{},this.headers,l.global.fetch)}this.fetch=Ov(e,t,this._getAccessToken.bind(this),l.global.fetch,l.tracePropagation),this.realtime=this._initRealtimeClient(Re({headers:this.headers,accessToken:this._getAccessToken.bind(this),fetch:this.fetch},l.realtime)),this.accessToken&&Promise.resolve(this.accessToken()).then(u=>this.realtime.setAuth(u)).catch(u=>console.warn("Failed to set initial Realtime auth token:",u)),this.rest=new Zg(new URL("rest/v1",i).href,{headers:this.headers,schema:l.db.schema,fetch:this.fetch,timeout:l.db.timeout,urlLengthLimit:l.db.urlLengthLimit}),this.storage=new hy(this.storageUrl.href,this.headers,this.fetch,r==null?void 0:r.storage),l.accessToken||this._listenForAuthEvents()}get functions(){return new qg(this.functionsUrl.href,{headers:this.headers,customFetch:this.fetch})}from(t){return this.rest.from(t)}schema(t){return this.rest.schema(t)}rpc(t,e={},r={head:!1,get:!1,count:void 0}){return this.rest.rpc(t,e,r)}channel(t,e={config:{}}){return this.realtime.channel(t,e)}getChannels(){return this.realtime.getChannels()}removeChannel(t){return this.realtime.removeChannel(t)}removeAllChannels(){return this.realtime.removeAllChannels()}async _getAccessToken(){var t=this,e,r;if(t.accessToken)return await t.accessToken();const{data:n}=await t.auth.getSession();return(e=(r=n.session)===null||r===void 0?void 0:r.access_token)!==null&&e!==void 0?e:t.supabaseKey}_initSupabaseAuthClient({autoRefreshToken:t,persistSession:e,detectSessionInUrl:r,storage:n,userStorage:s,storageKey:i,flowType:o,lock:a,debug:l,throwOnError:c,experimental:u,lockAcquireTimeout:h,skipAutoInitialize:d},f,p){const y={Authorization:`Bearer ${this.supabaseKey}`,apikey:`${this.supabaseKey}`};return new Nv({url:this.authUrl.href,headers:Re(Re({},y),f),storageKey:i,autoRefreshToken:t,persistSession:e,detectSessionInUrl:r,storage:n,userStorage:s,flowType:o,lock:a,debug:l,throwOnError:c,experimental:u,fetch:p,lockAcquireTimeout:h,skipAutoInitialize:d,hasCustomAuthorizationHeader:Object.keys(this.headers).some(w=>w.toLowerCase()==="authorization")})}_initRealtimeClient(t){return new jm(this.realtimeUrl.href,Re(Re({},t),{},{params:Re(Re({},{apikey:this.supabaseKey}),t==null?void 0:t.params)}))}_listenForAuthEvents(){return this.auth.onAuthStateChange((t,e)=>{this._handleTokenChanged(t,"CLIENT",e==null?void 0:e.access_token)})}_handleTokenChanged(t,e,r){(t==="TOKEN_REFRESHED"||t==="SIGNED_IN")&&this.changedAccessToken!==r?(this.changedAccessToken=r,this.realtime.setAuth(r)):t==="SIGNED_OUT"&&(this.realtime.setAuth(),e=="STORAGE"&&this.auth.signOut(),this.changedAccessToken=void 0)}};const Dv=(t,e,r)=>new Lv(t,e,r);function Uv(){if(typeof window<"u")return!1;const t=globalThis.process;if(!t)return!1;const e=t.version;if(e==null)return!1;const r=e.match(/^v(\d+)\./);return r?parseInt(r[1],10)<=18:!1}Uv()&&console.warn("⚠️ Node.js 18 and below are deprecated and will no longer be supported in future versions of @supabase/supabase-js. Please upgrade to Node.js 20 or later. For more information, visit: https://github.com/orgs/supabase/discussions/37217");let Yu=null,Dl=!1;async function Bv(){if(!Dl){Dl=!0;try{const t=await fetch("/api/auth/config");if(!t.ok)return;const{supabaseUrl:e,supabaseAnonKey:r}=await t.json();e&&r&&(Yu=Dv(e,r))}catch{}}}function ps(){return Yu}const ln=du("auth",()=>{const t=Oe(localStorage.getItem("io_token")),e=Oe(localStorage.getItem("io_email")),r=Oe(!1);let n=null;const s=je(()=>!!t.value);function i(h,d=3e5){try{return JSON.parse(atob(h.split(".")[1])).exp*1e3<=Date.now()+d}catch{return!0}}function o(){const h=ps();h&&(h.auth.onAuthStateChange((d,f)=>{var p,y;f?(t.value=f.access_token,e.value=((p=f.user)==null?void 0:p.email)??null,localStorage.setItem("io_token",f.access_token),(y=f.user)!=null&&y.email&&localStorage.setItem("io_email",f.user.email)):(t.value=null,e.value=null,localStorage.removeItem("io_token"),localStorage.removeItem("io_email"))}),a())}function a(){n||(n=setInterval(async()=>{t.value&&i(t.value)&&await u()},300*1e3))}async function l(h,d){var p,y;const f=ps();if(!f)throw new Error("Auth not configured");r.value=!0;try{const{data:w,error:k}=await f.auth.signInWithPassword({email:h,password:d});if(k)throw k;t.value=((p=w.session)==null?void 0:p.access_token)??null,e.value=((y=w.user)==null?void 0:y.email)??null,t.value&&localStorage.setItem("io_token",t.value),e.value&&localStorage.setItem("io_email",e.value)}finally{r.value=!1}}async function c(){const h=ps();h&&await h.auth.signOut(),t.value=null,e.value=null,localStorage.removeItem("io_token"),localStorage.removeItem("io_email"),n&&(clearInterval(n),n=null)}async function u(){const h=ps();if(!h)return;const{data:d,error:f}=await h.auth.refreshSession();if(!f&&d.session){t.value=d.session.access_token,localStorage.setItem("io_token",d.session.access_token);return}const{data:p}=await h.auth.getSession();if(p.session){t.value=p.session.access_token,localStorage.setItem("io_token",p.session.access_token);return}t.value=null,localStorage.removeItem("io_token")}return{token:t,email:e,loading:r,isAuthenticated:s,login:l,logout:c,refreshToken:u,initAuthListener:o}}),Mv=Object.freeze(Object.defineProperty({__proto__:null,useAuthStore:ln},Symbol.toStringTag,{value:"Module"})),Hv={class:"h-12 border-b border-border bg-header flex items-center justify-between px-4 shrink-0"},qv={class:"flex items-center gap-2"},Fv={class:"w-7 h-7 rounded-full bg-secondary flex items-center justify-center",title:"User"},Vv=pr({__name:"AppHeader",setup(t){const e=ln(),r=ag();async function n(){await e.logout(),r.push("/login")}return(s,i)=>{const o=Zs("router-link");return Z(),ue("header",Hv,[i[0]||(i[0]=ne("div",null,null,-1)),ne("div",qv,[he(o,{to:"/feed",class:"p-2 rounded-md hover:bg-accent text-muted-foreground hover:text-foreground transition-colors",title:"Inbox"},{default:Yr(()=>[he(re(Au),{class:"w-4 h-4"})]),_:1}),ne("div",Fv,[he(re(Cg),{class:"w-3.5 h-3.5 text-muted-foreground"})]),ne("button",{onClick:n,class:"p-2 rounded-md hover:bg-accent text-muted-foreground hover:text-foreground transition-colors",title:"Sign out"},[he(re(bg),{class:"w-4 h-4"})])])])}}}),zv=5e3;function Wv(t){try{return JSON.parse(atob(t.split(".")[1])).exp*1e3<=Date.now()+6e4}catch{return!0}}const Kv=du("chat",()=>{const t=Oe([]),e=Oe(!1),r=Oe(null),n=Oe(crypto.randomUUID()),s=Oe(null);function i(u,h=[]){const d={id:crypto.randomUUID(),role:"user",content:u,attachments:h,timestamp:new Date};return t.value.push(d),d}async function o(u,h=[]){i(u,h),e.value=!0;const d={id:crypto.randomUUID(),role:"assistant",content:"",attachments:[],timestamp:new Date,streaming:!0};t.value.push(d);let f=Date.now();try{const p=ln();p.token&&Wv(p.token)&&await p.refreshToken();const y={"Content-Type":"application/json"};p.token&&(y.Authorization=`Bearer ${p.token}`),s.value=new AbortController;const w=await fetch("/api/message",{method:"POST",headers:y,signal:s.value.signal,body:JSON.stringify({prompt:u,conversationId:n.value,attachments:h})});if(!w.ok||!w.body)throw new Error(`API error: ${w.status}`);const k=w.body.getReader(),_=new TextDecoder;let b="";for(;;){const{done:x,value:D}=await k.read();if(x)break;b+=_.decode(D,{stream:!0});const M=b.split(`
|
|
214
|
+
`);b=M.pop()??"";let U="";for(const V of M)if(V.startsWith("event: "))U=V.slice(7);else if(V.startsWith("data: ")){const C=V.slice(6);try{const z=JSON.parse(C);if(U==="delta"){const Q=Date.now(),O=t.value[t.value.length-1];if(O&&!O.streaming&&O.role==="assistant"&&Q-f>zv){const Y={id:crypto.randomUUID(),role:"assistant",content:z.content,attachments:[],timestamp:new Date,streaming:!0};t.value.push(Y)}else{const Y=t.value.filter(Ne=>Ne.streaming),Ee=Y[Y.length-1];Ee&&(Ee.content=z.content)}f=Q}else if(U==="done"){const Q=t.value.filter(Y=>Y.streaming),O=Q[Q.length-1];O&&(O.content=z.content,O.streaming=!1),z.conversationId&&(n.value=z.conversationId)}else if(U==="error"){const Q=t.value.filter(Y=>Y.streaming),O=Q[Q.length-1];O&&(O.content=`Error: ${z.error}`,O.streaming=!1)}}catch{}U=""}else V.startsWith(":")}}catch(p){const y=t.value.filter(k=>k.streaming),w=y[y.length-1];w&&((p==null?void 0:p.name)==="AbortError"||(w.content=`Error: ${p.message}`),w.streaming=!1)}finally{s.value=null,e.value=!1}}function a(){var u;(u=s.value)==null||u.abort()}function l(u){const h=t.value[t.value.length-1];h!=null&&h.streaming&&(h.content=u)}function c(){t.value=[],n.value=crypto.randomUUID()}return{messages:t,isStreaming:e,eventSource:r,conversationId:n,sendMessage:o,updateStreamingMessage:l,clearMessages:c,stopStreaming:a}});function Do(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Or=Do();function Xu(t){Or=t}var jn={exec:()=>null};function me(t,e=""){let r=typeof t=="string"?t:t.source;const n={replace:(s,i)=>{let o=typeof i=="string"?i:i.source;return o=o.replace(Qe.caret,"$1"),r=r.replace(s,o),n},getRegex:()=>new RegExp(r,e)};return n}var Qe={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:t=>new RegExp(`^( {0,3}${t})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}#`),htmlBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}<(?:[a-z].*>|!--)`,"i")},Gv=/^(?:[ \t]*(?:\n|$))+/,Jv=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Yv=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,ts=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Xv=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Uo=/(?:[*+-]|\d{1,9}[.)])/,Zu=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Qu=me(Zu).replace(/bull/g,Uo).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),Zv=me(Zu).replace(/bull/g,Uo).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),Bo=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Qv=/^[^\n]+/,Mo=/(?!\s*\])(?:\\.|[^\[\]\\])+/,eb=me(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Mo).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),tb=me(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Uo).getRegex(),ci="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Ho=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,rb=me("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",Ho).replace("tag",ci).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),eh=me(Bo).replace("hr",ts).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",ci).getRegex(),nb=me(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",eh).getRegex(),qo={blockquote:nb,code:Jv,def:eb,fences:Yv,heading:Xv,hr:ts,html:rb,lheading:Qu,list:tb,newline:Gv,paragraph:eh,table:jn,text:Qv},Ul=me("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",ts).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",ci).getRegex(),sb={...qo,lheading:Zv,table:Ul,paragraph:me(Bo).replace("hr",ts).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Ul).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",ci).getRegex()},ib={...qo,html:me(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Ho).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:jn,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:me(Bo).replace("hr",ts).replace("heading",` *#{1,6} *[^
|
|
215
|
+
]`).replace("lheading",Qu).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},ob=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,ab=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,th=/^( {2,}|\\)\n(?!\s*$)/,lb=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,ui=/[\p{P}\p{S}]/u,Fo=/[\s\p{P}\p{S}]/u,rh=/[^\s\p{P}\p{S}]/u,cb=me(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Fo).getRegex(),nh=/(?!~)[\p{P}\p{S}]/u,ub=/(?!~)[\s\p{P}\p{S}]/u,hb=/(?:[^\s\p{P}\p{S}]|~)/u,db=/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,sh=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,fb=me(sh,"u").replace(/punct/g,ui).getRegex(),pb=me(sh,"u").replace(/punct/g,nh).getRegex(),ih="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",gb=me(ih,"gu").replace(/notPunctSpace/g,rh).replace(/punctSpace/g,Fo).replace(/punct/g,ui).getRegex(),mb=me(ih,"gu").replace(/notPunctSpace/g,hb).replace(/punctSpace/g,ub).replace(/punct/g,nh).getRegex(),yb=me("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,rh).replace(/punctSpace/g,Fo).replace(/punct/g,ui).getRegex(),vb=me(/\\(punct)/,"gu").replace(/punct/g,ui).getRegex(),bb=me(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),_b=me(Ho).replace("(?:-->|$)","-->").getRegex(),wb=me("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",_b).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Ls=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,kb=me(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",Ls).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),oh=me(/^!?\[(label)\]\[(ref)\]/).replace("label",Ls).replace("ref",Mo).getRegex(),ah=me(/^!?\[(ref)\](?:\[\])?/).replace("ref",Mo).getRegex(),Sb=me("reflink|nolink(?!\\()","g").replace("reflink",oh).replace("nolink",ah).getRegex(),Vo={_backpedal:jn,anyPunctuation:vb,autolink:bb,blockSkip:db,br:th,code:ab,del:jn,emStrongLDelim:fb,emStrongRDelimAst:gb,emStrongRDelimUnd:yb,escape:ob,link:kb,nolink:ah,punctuation:cb,reflink:oh,reflinkSearch:Sb,tag:wb,text:lb,url:jn},Eb={...Vo,link:me(/^!?\[(label)\]\((.*?)\)/).replace("label",Ls).getRegex(),reflink:me(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Ls).getRegex()},fo={...Vo,emStrongRDelimAst:mb,emStrongLDelim:pb,url:me(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\.|[^\\])*?(?:\\.|[^\s~\\]))\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},Tb={...fo,br:me(th).replace("{2,}","*").getRegex(),text:me(fo.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},gs={normal:qo,gfm:sb,pedantic:ib},gn={normal:Vo,gfm:fo,breaks:Tb,pedantic:Eb},Ab={"&":"&","<":"<",">":">",'"':""","'":"'"},Bl=t=>Ab[t];function xt(t,e){if(e){if(Qe.escapeTest.test(t))return t.replace(Qe.escapeReplace,Bl)}else if(Qe.escapeTestNoEncode.test(t))return t.replace(Qe.escapeReplaceNoEncode,Bl);return t}function Ml(t){try{t=encodeURI(t).replace(Qe.percentDecode,"%")}catch{return null}return t}function Hl(t,e){var i;const r=t.replace(Qe.findPipe,(o,a,l)=>{let c=!1,u=a;for(;--u>=0&&l[u]==="\\";)c=!c;return c?"|":" |"}),n=r.split(Qe.splitPipe);let s=0;if(n[0].trim()||n.shift(),n.length>0&&!((i=n.at(-1))!=null&&i.trim())&&n.pop(),e)if(n.length>e)n.splice(e);else for(;n.length<e;)n.push("");for(;s<n.length;s++)n[s]=n[s].trim().replace(Qe.slashPipe,"|");return n}function mn(t,e,r){const n=t.length;if(n===0)return"";let s=0;for(;s<n&&t.charAt(n-s-1)===e;)s++;return t.slice(0,n-s)}function xb(t,e){if(t.indexOf(e[1])===-1)return-1;let r=0;for(let n=0;n<t.length;n++)if(t[n]==="\\")n++;else if(t[n]===e[0])r++;else if(t[n]===e[1]&&(r--,r<0))return n;return r>0?-2:-1}function ql(t,e,r,n,s){const i=e.href,o=e.title||null,a=t[1].replace(s.other.outputLinkReplace,"$1");n.state.inLink=!0;const l={type:t[0].charAt(0)==="!"?"image":"link",raw:r,href:i,title:o,text:a,tokens:n.inlineTokens(a)};return n.state.inLink=!1,l}function Rb(t,e,r){const n=t.match(r.other.indentCodeCompensation);if(n===null)return e;const s=n[1];return e.split(`
|
|
216
216
|
`).map(i=>{const o=i.match(r.other.beginningSpace);if(o===null)return i;const[a]=o;return a.length>=s.length?i.slice(s.length):i}).join(`
|
|
217
217
|
`)}var Ds=class{constructor(t){be(this,"options");be(this,"rules");be(this,"lexer");this.options=t||Or}space(t){const e=this.rules.block.newline.exec(t);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(t){const e=this.rules.block.code.exec(t);if(e){const r=e[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:e[0],codeBlockStyle:"indented",text:this.options.pedantic?r:mn(r,`
|
|
218
218
|
`)}}}fences(t){const e=this.rules.block.fences.exec(t);if(e){const r=e[0],n=Rb(r,e[3]||"",this.rules);return{type:"code",raw:r,lang:e[2]?e[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):e[2],text:n}}}heading(t){const e=this.rules.block.heading.exec(t);if(e){let r=e[2].trim();if(this.rules.other.endingHash.test(r)){const n=mn(r,"#");(this.options.pedantic||!n||this.rules.other.endingSpaceChar.test(n))&&(r=n.trim())}return{type:"heading",raw:e[0],depth:e[1].length,text:r,tokens:this.lexer.inline(r)}}}hr(t){const e=this.rules.block.hr.exec(t);if(e)return{type:"hr",raw:mn(e[0],`
|
|
@@ -266,4 +266,4 @@ ${t}</tr>
|
|
|
266
266
|
`}tablecell(t){const e=this.parser.parseInline(t.tokens),r=t.header?"th":"td";return(t.align?`<${r} align="${t.align}">`:`<${r}>`)+e+`</${r}>
|
|
267
267
|
`}strong({tokens:t}){return`<strong>${this.parser.parseInline(t)}</strong>`}em({tokens:t}){return`<em>${this.parser.parseInline(t)}</em>`}codespan({text:t}){return`<code>${xt(t,!0)}</code>`}br(t){return"<br>"}del({tokens:t}){return`<del>${this.parser.parseInline(t)}</del>`}link({href:t,title:e,tokens:r}){const n=this.parser.parseInline(r),s=Ml(t);if(s===null)return n;t=s;let i='<a href="'+t+'"';return e&&(i+=' title="'+xt(e)+'"'),i+=">"+n+"</a>",i}image({href:t,title:e,text:r,tokens:n}){n&&(r=this.parser.parseInline(n,this.parser.textRenderer));const s=Ml(t);if(s===null)return xt(r);t=s;let i=`<img src="${t}" alt="${r}"`;return e&&(i+=` title="${xt(e)}"`),i+=">",i}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:xt(t.text)}},zo=class{strong({text:t}){return t}em({text:t}){return t}codespan({text:t}){return t}del({text:t}){return t}html({text:t}){return t}text({text:t}){return t}link({text:t}){return""+t}image({text:t}){return""+t}br(){return""}},Jt=class go{constructor(e){be(this,"options");be(this,"renderer");be(this,"textRenderer");this.options=e||Or,this.options.renderer=this.options.renderer||new Us,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new zo}static parse(e,r){return new go(r).parse(e)}static parseInline(e,r){return new go(r).parseInline(e)}parse(e,r=!0){var s,i;let n="";for(let o=0;o<e.length;o++){const a=e[o];if((i=(s=this.options.extensions)==null?void 0:s.renderers)!=null&&i[a.type]){const c=a,u=this.options.extensions.renderers[c.type].call({parser:this},c);if(u!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(c.type)){n+=u||"";continue}}const l=a;switch(l.type){case"space":{n+=this.renderer.space(l);continue}case"hr":{n+=this.renderer.hr(l);continue}case"heading":{n+=this.renderer.heading(l);continue}case"code":{n+=this.renderer.code(l);continue}case"table":{n+=this.renderer.table(l);continue}case"blockquote":{n+=this.renderer.blockquote(l);continue}case"list":{n+=this.renderer.list(l);continue}case"html":{n+=this.renderer.html(l);continue}case"paragraph":{n+=this.renderer.paragraph(l);continue}case"text":{let c=l,u=this.renderer.text(c);for(;o+1<e.length&&e[o+1].type==="text";)c=e[++o],u+=`
|
|
268
268
|
`+this.renderer.text(c);r?n+=this.renderer.paragraph({type:"paragraph",raw:u,text:u,tokens:[{type:"text",raw:u,text:u,escaped:!0}]}):n+=u;continue}default:{const c='Token with "'+l.type+'" type was not found.';if(this.options.silent)return console.error(c),"";throw new Error(c)}}}return n}parseInline(e,r=this.renderer){var s,i;let n="";for(let o=0;o<e.length;o++){const a=e[o];if((i=(s=this.options.extensions)==null?void 0:s.renderers)!=null&&i[a.type]){const c=this.options.extensions.renderers[a.type].call({parser:this},a);if(c!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(a.type)){n+=c||"";continue}}const l=a;switch(l.type){case"escape":{n+=r.text(l);break}case"html":{n+=r.html(l);break}case"link":{n+=r.link(l);break}case"image":{n+=r.image(l);break}case"strong":{n+=r.strong(l);break}case"em":{n+=r.em(l);break}case"codespan":{n+=r.codespan(l);break}case"br":{n+=r.br(l);break}case"del":{n+=r.del(l);break}case"text":{n+=r.text(l);break}default:{const c='Token with "'+l.type+'" type was not found.';if(this.options.silent)return console.error(c),"";throw new Error(c)}}}return n}},ji,_s=(ji=class{constructor(t){be(this,"options");be(this,"block");this.options=t||Or}preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}provideLexer(){return this.block?Gt.lex:Gt.lexInline}provideParser(){return this.block?Jt.parse:Jt.parseInline}},be(ji,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens"])),ji),Cb=class{constructor(...t){be(this,"defaults",Do());be(this,"options",this.setOptions);be(this,"parse",this.parseMarkdown(!0));be(this,"parseInline",this.parseMarkdown(!1));be(this,"Parser",Jt);be(this,"Renderer",Us);be(this,"TextRenderer",zo);be(this,"Lexer",Gt);be(this,"Tokenizer",Ds);be(this,"Hooks",_s);this.use(...t)}walkTokens(t,e){var n,s;let r=[];for(const i of t)switch(r=r.concat(e.call(this,i)),i.type){case"table":{const o=i;for(const a of o.header)r=r.concat(this.walkTokens(a.tokens,e));for(const a of o.rows)for(const l of a)r=r.concat(this.walkTokens(l.tokens,e));break}case"list":{const o=i;r=r.concat(this.walkTokens(o.items,e));break}default:{const o=i;(s=(n=this.defaults.extensions)==null?void 0:n.childTokens)!=null&&s[o.type]?this.defaults.extensions.childTokens[o.type].forEach(a=>{const l=o[a].flat(1/0);r=r.concat(this.walkTokens(l,e))}):o.tokens&&(r=r.concat(this.walkTokens(o.tokens,e)))}}return r}use(...t){const e=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(r=>{const n={...r};if(n.async=this.defaults.async||n.async||!1,r.extensions&&(r.extensions.forEach(s=>{if(!s.name)throw new Error("extension name required");if("renderer"in s){const i=e.renderers[s.name];i?e.renderers[s.name]=function(...o){let a=s.renderer.apply(this,o);return a===!1&&(a=i.apply(this,o)),a}:e.renderers[s.name]=s.renderer}if("tokenizer"in s){if(!s.level||s.level!=="block"&&s.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");const i=e[s.level];i?i.unshift(s.tokenizer):e[s.level]=[s.tokenizer],s.start&&(s.level==="block"?e.startBlock?e.startBlock.push(s.start):e.startBlock=[s.start]:s.level==="inline"&&(e.startInline?e.startInline.push(s.start):e.startInline=[s.start]))}"childTokens"in s&&s.childTokens&&(e.childTokens[s.name]=s.childTokens)}),n.extensions=e),r.renderer){const s=this.defaults.renderer||new Us(this.defaults);for(const i in r.renderer){if(!(i in s))throw new Error(`renderer '${i}' does not exist`);if(["options","parser"].includes(i))continue;const o=i,a=r.renderer[o],l=s[o];s[o]=(...c)=>{let u=a.apply(s,c);return u===!1&&(u=l.apply(s,c)),u||""}}n.renderer=s}if(r.tokenizer){const s=this.defaults.tokenizer||new Ds(this.defaults);for(const i in r.tokenizer){if(!(i in s))throw new Error(`tokenizer '${i}' does not exist`);if(["options","rules","lexer"].includes(i))continue;const o=i,a=r.tokenizer[o],l=s[o];s[o]=(...c)=>{let u=a.apply(s,c);return u===!1&&(u=l.apply(s,c)),u}}n.tokenizer=s}if(r.hooks){const s=this.defaults.hooks||new _s;for(const i in r.hooks){if(!(i in s))throw new Error(`hook '${i}' does not exist`);if(["options","block"].includes(i))continue;const o=i,a=r.hooks[o],l=s[o];_s.passThroughHooks.has(i)?s[o]=c=>{if(this.defaults.async)return Promise.resolve(a.call(s,c)).then(h=>l.call(s,h));const u=a.call(s,c);return l.call(s,u)}:s[o]=(...c)=>{let u=a.apply(s,c);return u===!1&&(u=l.apply(s,c)),u}}n.hooks=s}if(r.walkTokens){const s=this.defaults.walkTokens,i=r.walkTokens;n.walkTokens=function(o){let a=[];return a.push(i.call(this,o)),s&&(a=a.concat(s.call(this,o))),a}}this.defaults={...this.defaults,...n}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,e){return Gt.lex(t,e??this.defaults)}parser(t,e){return Jt.parse(t,e??this.defaults)}parseMarkdown(t){return(r,n)=>{const s={...n},i={...this.defaults,...s},o=this.onError(!!i.silent,!!i.async);if(this.defaults.async===!0&&s.async===!1)return o(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof r>"u"||r===null)return o(new Error("marked(): input parameter is undefined or null"));if(typeof r!="string")return o(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(r)+", string expected"));i.hooks&&(i.hooks.options=i,i.hooks.block=t);const a=i.hooks?i.hooks.provideLexer():t?Gt.lex:Gt.lexInline,l=i.hooks?i.hooks.provideParser():t?Jt.parse:Jt.parseInline;if(i.async)return Promise.resolve(i.hooks?i.hooks.preprocess(r):r).then(c=>a(c,i)).then(c=>i.hooks?i.hooks.processAllTokens(c):c).then(c=>i.walkTokens?Promise.all(this.walkTokens(c,i.walkTokens)).then(()=>c):c).then(c=>l(c,i)).then(c=>i.hooks?i.hooks.postprocess(c):c).catch(o);try{i.hooks&&(r=i.hooks.preprocess(r));let c=a(r,i);i.hooks&&(c=i.hooks.processAllTokens(c)),i.walkTokens&&this.walkTokens(c,i.walkTokens);let u=l(c,i);return i.hooks&&(u=i.hooks.postprocess(u)),u}catch(c){return o(c)}}}onError(t,e){return r=>{if(r.message+=`
|
|
269
|
-
Please report this to https://github.com/markedjs/marked.`,t){const n="<p>An error occurred:</p><pre>"+xt(r.message+"",!0)+"</pre>";return e?Promise.resolve(n):n}if(e)return Promise.reject(r);throw r}}},Cr=new Cb;function ye(t,e){return Cr.parse(t,e)}ye.options=ye.setOptions=function(t){return Cr.setOptions(t),ye.defaults=Cr.defaults,Xu(ye.defaults),ye};ye.getDefaults=Do;ye.defaults=Or;ye.use=function(...t){return Cr.use(...t),ye.defaults=Cr.defaults,Xu(ye.defaults),ye};ye.walkTokens=function(t,e){return Cr.walkTokens(t,e)};ye.parseInline=Cr.parseInline;ye.Parser=Jt;ye.parser=Jt.parse;ye.Renderer=Us;ye.TextRenderer=zo;ye.Lexer=Gt;ye.lexer=Gt.lex;ye.Tokenizer=Ds;ye.Hooks=_s;ye.parse=ye;ye.options;ye.setOptions;ye.use;ye.walkTokens;ye.parseInline;Jt.parse;Gt.lex;const Ob=["innerHTML"],Pb=pr({__name:"MarkdownContent",props:{content:{}},setup(t){const e=t,r=$e(()=>e.content?ye.parse(e.content,{async:!1}):"");return(n,s)=>(Z(),ue("div",{class:"prose prose-sm dark:prose-invert max-w-none",innerHTML:r.value},null,8,Ob))}}),lh=10*1024*1024,ch=25*1024*1024;function yn(t){return t<1024?`${t} B`:t<1024*1024?`${(t/1024).toFixed(1)} KB`:`${(t/(1024*1024)).toFixed(1)} MB`}function $i(t){return t.mimeType.startsWith("image/")}function Ib(t){return`data:${t.mimeType};base64,${t.content}`}async function $b(t){const e=await new Promise((n,s)=>{const i=new FileReader;i.onload=()=>n(String(i.result??"")),i.onerror=()=>s(new Error("Unable to read file")),i.readAsDataURL(t)}),r=e.indexOf(",");if(r===-1)throw new Error(`Unable to parse file content for ${t.name}`);return{name:t.name,mimeType:t.type||"application/octet-stream",size:t.size,content:e.slice(r+1)}}function jb(t){for(const r of t)if(r.size>lh)return{ok:!1,error:`"${r.name}" exceeds the 10MB per-file limit.`};return t.reduce((r,n)=>r+n.size,0)>ch?{ok:!1,error:"Attachments exceed the 25MB per-message limit."}:{ok:!0}}const Nb={class:"overlay-header",style:{background:"linear-gradient(180deg, rgba(216,51,51,0.12) 0%, rgba(240,65,255,0.06) 100%)"}},Lb={key:0,class:"flex h-full items-center justify-center px-5 text-center"},Db={key:0,class:"overlay-avatar-letter"},Ub={key:0,class:"mb-2 space-y-2"},Bb=["src","alt"],Mb={class:"flex items-center gap-2 text-[9px]"},Hb={class:"truncate"},qb={class:"opacity-70"},Fb={key:2,class:"text-zinc-500"},Vb={key:0,class:"overlay-stream-indicator"},zb={class:"overlay-footer"},Wb={key:0,class:"mb-2 space-y-2"},Kb={class:"flex flex-wrap gap-1.5"},Gb={class:"max-w-[120px] truncate"},Jb={class:"opacity-65"},Yb=["onClick"],Xb={class:"overlay-meta text-zinc-500"},Zb={key:1,class:"mb-2 text-[11px] text-[#ef4444]"},Qb={class:"overlay-composer-field"},e_=["disabled"],t_=["disabled","aria-label","title"],r_=pr({__name:"ChatOverlay",setup(t){const e=Kv(),r=ln(),n=jo(),s=Oe(!1),i=Oe(""),o=Oe(""),a=Oe(!1),l=Oe([]),c=Oe(),u=Oe(),h=Oe(),d=Oe(!0),f=Oe(!1),p=[0,110,220],y=$e(()=>e.messages.length>0),w=()=>n.path==="/",k=$e(()=>l.value.reduce((L,se)=>L+se.size,0)),_=$e(()=>{const L=typeof r.email=="string"?r.email.trim():"";return L?L.charAt(0).toUpperCase():"U"}),b=$e(()=>!e.isStreaming&&(i.value.trim().length>0||l.value.length>0));function x(){w()||(s.value=!s.value)}function D(){h.value&&(h.value.style.height="auto",h.value.style.height=`${Math.min(h.value.scrollHeight,136)}px`)}function M(){if(!c.value)return;const L=c.value,se=L.scrollHeight-L.scrollTop-L.clientHeight;d.value=se<40,f.value=!d.value}function U(L=!1){c.value&&(L||d.value)&&(c.value.scrollTop=c.value.scrollHeight,f.value=!1)}async function V(L){if(!L||L.length===0)return;o.value="";const se=[];try{for(const ae of Array.from(L))se.push(await $b(ae))}catch(ae){o.value=(ae==null?void 0:ae.message)??"Unable to read one or more files.";return}const We=[...l.value,...se],ie=jb(We);if(!ie.ok){o.value=ie.error;return}l.value=We,u.value&&(u.value.value="")}function C(L){l.value.splice(L,1),o.value=""}function z(){var L;e.isStreaming||(L=u.value)==null||L.click()}function Q(L){const se=L.target;V((se==null?void 0:se.files)??null)}async function O(){if(!b.value)return;const L=i.value.trim(),se=[...l.value],We=L||"Please review the attached file(s).";i.value="",l.value=[],o.value="",D(),await e.sendMessage(We,se)}function Y(){e.stopStreaming()}function Ee(L){if(L.key==="Enter"&&!L.shiftKey){if(L.preventDefault(),e.isStreaming){Y();return}O()}}function je(L){L.preventDefault(),!e.isStreaming&&(a.value=!0)}function me(L){L.preventDefault(),a.value=!1}async function te(L){var se;L.preventDefault(),a.value=!1,!e.isStreaming&&await V(((se=L.dataTransfer)==null?void 0:se.files)??null)}return Kt(i,()=>D()),Kt(()=>e.messages.map(L=>L.content),async()=>{await hr(),M(),U()},{deep:!0}),Kt(()=>e.messages.length,async()=>{await hr(),M(),U(!0)}),Kt(s,async L=>{L&&(await hr(),D(),M(),U(!0))}),xo(async()=>{await hr(),D()}),(L,se)=>{const We=Zs("X");return Z(),ue(Fe,null,[!s.value&&!w()?(Z(),ue("button",{key:0,onClick:x,class:"overlay-fab",title:"Chat with IO","aria-label":"Open chat overlay"},[he(re(xu),{class:"h-4 w-4 text-white"})])):De("",!0),he(yf,{"enter-active-class":"transition-all duration-200 ease-out","enter-from-class":"opacity-0 translate-y-4 scale-[0.98]","enter-to-class":"opacity-100 translate-y-0 scale-100","leave-active-class":"transition-all duration-150 ease-in","leave-from-class":"opacity-100 translate-y-0 scale-100","leave-to-class":"opacity-0 translate-y-4 scale-[0.98]"},{default:Yr(()=>[s.value?(Z(),ue("section",{key:0,class:Ye(["overlay-panel",a.value?"overlay-panel-dragging":""]),"aria-label":"IO Assistant chat",onDragover:je,onDragleave:me,onDrop:te},[ne("header",Nb,[se[4]||(se[4]=ne("div",{class:"flex items-center gap-2.5"},[ne("div",{class:"overlay-brand-mark","aria-hidden":"true"},[ne("img",{src:Tu,alt:"IO",width:"18",height:"18",class:"shrink-0"})]),ne("div",{class:"flex items-center leading-none"},[ne("span",{class:"overlay-title"},"IO Chat")])],-1)),ne("button",{onClick:se[0]||(se[0]=ie=>s.value=!1),class:"overlay-icon-btn","aria-label":"Minimize chat overlay",title:"Minimize chat"},[he(re(_g),{class:"h-3.5 w-3.5"})])]),ne("div",{ref_key:"messagesContainer",ref:c,class:"overlay-messages",onScroll:M},[y.value?De("",!0):(Z(),ue("div",Lb,[ne("div",null,[he(Zi,{size:32,class:"mx-auto mb-3 shrink-0"}),se[5]||(se[5]=ne("p",{class:"overlay-empty-copy"},"Ask IO about your workspace, agents, or recent changes.",-1))])])),(Z(!0),ue(Fe,null,zr(re(e).messages,ie=>(Z(),ue("div",{key:ie.id,class:Ye(["flex",ie.role==="user"?"justify-end":"justify-start"])},[ne("div",{class:Ye(["flex max-w-full items-start gap-2",ie.role==="user"?"flex-row-reverse":""])},[ne("div",{class:Ye(["overlay-avatar",ie.role==="user"?"overlay-avatar-user":"overlay-avatar-assistant"]),"aria-hidden":"true"},[ie.role==="user"?(Z(),ue("span",Db,it(_.value),1)):(Z(),nt(Zi,{key:1,size:10,class:"shrink-0"}))],2),ne("article",{class:Ye(["overlay-bubble",ie.role==="user"?"overlay-bubble-user rounded-tr-sm":"overlay-bubble-assistant rounded-tl-sm"])},[ie.attachments.length>0?(Z(),ue("div",Ub,[(Z(!0),ue(Fe,null,zr(ie.attachments,(ae,Lt)=>(Z(),ue("div",{key:`${ie.id}-${Lt}`,class:"overlay-attachment"},[re($i)(ae)?(Z(),ue("img",{key:0,src:re(Ib)(ae),alt:ae.name,class:"mb-1 max-h-44 rounded-md object-contain"},null,8,Bb)):De("",!0),ne("div",Mb,[re($i)(ae)?(Z(),nt(re(nl),{key:0,class:"h-3.5 w-3.5"})):(Z(),nt(re(rl),{key:1,class:"h-3.5 w-3.5"})),ne("span",Hb,it(ae.name),1),ne("span",qb,it(re(yn)(ae.size)),1)])]))),128))])):De("",!0),ie.content?(Z(),nt(Pb,{key:1,content:ie.content,class:Ye(["overlay-markdown",ie.role==="user"?"prose-invert":""])},null,8,["content","class"])):(Z(),ue("span",Fb,"..."))],2)],2),ie.streaming&&ie.role==="assistant"?(Z(),ue("div",Vb,[(Z(),ue(Fe,null,zr(p,ae=>ne("span",{key:ae,class:"overlay-stream-dot",style:Ws({animationDelay:`${ae}ms`})},null,4)),64))])):De("",!0)],2))),128))],544),f.value?(Z(),ue("button",{key:0,class:"overlay-scroll-hint",type:"button",onClick:se[1]||(se[1]=ie=>U(!0)),"aria-label":"Scroll to latest message"},[he(re(pg),{class:"h-3.5 w-3.5"}),se[6]||(se[6]=ru(" Latest ",-1))])):De("",!0),ne("footer",zb,[ne("input",{ref_key:"fileInput",ref:u,type:"file",multiple:"",class:"hidden",onChange:Q},null,544),l.value.length>0?(Z(),ue("div",Wb,[ne("div",Kb,[(Z(!0),ue(Fe,null,zr(l.value,(ie,ae)=>(Z(),ue("div",{key:`${ie.name}-${ae}`,class:"overlay-chip"},[re($i)(ie)?(Z(),nt(re(nl),{key:0,class:"h-3.5 w-3.5"})):(Z(),nt(re(rl),{key:1,class:"h-3.5 w-3.5"})),ne("span",Gb,it(ie.name),1),ne("span",Jb,it(re(yn)(ie.size)),1),ne("button",{class:"hover:text-destructive",onClick:Lt=>C(ae)},[he(We,{class:"h-3.5 w-3.5"})],8,Yb)]))),128))]),ne("p",Xb,it(re(yn)(k.value))+" · Max "+it(re(yn)(re(lh)))+" file · "+it(re(yn)(re(ch)))+" total ",1)])):De("",!0),o.value?(Z(),ue("p",Zb,it(o.value),1)):De("",!0),ne("div",Qb,[ne("button",{class:"overlay-attach-btn",disabled:re(e).isStreaming,onClick:z,title:"Attach files","aria-label":"Attach files"},[he(re(Sg),{class:"h-4 w-4"})],8,e_),od(ne("textarea",{ref_key:"textareaRef",ref:h,"onUpdate:modelValue":se[2]||(se[2]=ie=>i.value=ie),onKeydown:Ee,placeholder:"Message IO…",rows:"1",class:"overlay-input"},null,544),[[Mf,i.value]]),ne("button",{onClick:se[3]||(se[3]=ie=>re(e).isStreaming?Y():O()),disabled:!b.value&&!re(e).isStreaming,class:"overlay-send-btn","aria-label":re(e).isStreaming?"Stop generation":"Send message",title:re(e).isStreaming?"Stop generation":"Send message"},[re(e).isStreaming?(Z(),nt(re(Rg),{key:1,class:"h-3 w-3"})):(Z(),nt(re(Tg),{key:0,class:"h-3 w-3"}))],8,t_)])])],34)):De("",!0)]),_:1})],64)}}}),n_=(t,e)=>{const r=t.__vccOpts||t;for(const[n,s]of e)r[n]=s;return r},s_=n_(r_,[["__scopeId","data-v-a7653537"]]),i_={class:"flex h-screen overflow-hidden"},o_={class:"flex-1 flex flex-col overflow-hidden"},a_={class:"flex-1 overflow-auto"},l_=pr({__name:"App",setup(t){const e=ln(),r=jo(),n=$e(()=>e.isAuthenticated&&r.name!=="login");return(s,i)=>{const o=Zs("router-view");return Z(),ue("div",i_,[n.value?(Z(),nt(Ug,{key:0})):De("",!0),ne("div",o_,[n.value?(Z(),nt(Vv,{key:0})):De("",!0),ne("main",a_,[he(o)])]),n.value?(Z(),nt(s_,{key:1})):De("",!0)])}}}),c_=[{path:"/login",name:"login",component:()=>Ke(()=>import("./LoginView-JFudvzT9.js"),[]),meta:{public:!0}},{path:"/",name:"chat",component:()=>Ke(()=>import("./ChatView-BZEl1ckK.js"),__vite__mapDeps([0,1]))},{path:"/squads",name:"squads",component:()=>Ke(()=>import("./SquadsView-B4DU2TM2.js"),__vite__mapDeps([2,3,4,5]))},{path:"/squads/health",name:"squad-health",component:()=>Ke(()=>import("./SquadHealthView-tpKwrIpk.js"),__vite__mapDeps([6,3,7,5]))},{path:"/squads/:id",name:"squad-detail",component:()=>Ke(()=>import("./SquadDetailView-yBpF2HPs.js"),__vite__mapDeps([8,3,4,1,5,9,10]))},{path:"/feed",name:"feed",component:()=>Ke(()=>import("./FeedView-Hr_p36PL.js"),__vite__mapDeps([11,3,4,9]))},{path:"/skills",name:"skills",component:()=>Ke(()=>import("./SkillsView-FxiFscAg.js"),__vite__mapDeps([12,3,13,14,15,16,1,9]))},{path:"/mcp",name:"mcp",component:()=>Ke(()=>import("./McpView-DEKaxHvM.js"),__vite__mapDeps([17,3,18,13,9]))},{path:"/schedules",name:"schedules",component:()=>Ke(()=>import("./SchedulesView-9rmg2Q74.js"),__vite__mapDeps([19,3,4,18,13,15,9]))},{path:"/history",name:"history",component:()=>Ke(()=>import("./HistoryView-D6AsI2YL.js"),__vite__mapDeps([20,3,14,10,9]))},{path:"/wiki",name:"wiki",component:()=>Ke(()=>import("./WikiView-wviS2lbH.js"),__vite__mapDeps([21,3,14,13,15,9,16,1]))},{path:"/usage",name:"usage",component:()=>Ke(()=>import("./UsageView-8b6--5tz.js"),__vite__mapDeps([22,3,7]))},{path:"/audit-log",name:"audit-log",component:()=>Ke(()=>import("./AuditLogView-876aBvp7.js"),__vite__mapDeps([23,3]))},{path:"/settings",name:"settings",component:()=>Ke(()=>import("./SettingsView--XVajvM6.js"),__vite__mapDeps([24,3]))}],uh=og({history:Up(),routes:c_});uh.beforeEach(t=>{const e=ln();if(!t.meta.public&&!e.isAuthenticated)return{name:"login"}});async function u_(){await Bv();const t=Wf(l_);t.use(Jf()),t.use(uh);const{useAuthStore:e}=await Ke(async()=>{const{useAuthStore:n}=await Promise.resolve().then(()=>Mv);return{useAuthStore:n}},void 0),r=e();r.initAuthListener(),r.token&&await r.refreshToken(),t.mount("#app")}u_();export{f_ as $,hg as A,dg as B,fg as C,Ws as D,xo as E,rl as F,$c as G,vg as H,nl as I,Z as J,Oe as K,zr as L,lh as M,Zs as N,uh as O,Sg as P,Ib as Q,it as R,Tg as S,re as T,Cg as U,ln as V,Kv as W,jo as X,ag as Y,d_ as Z,Zi as _,pg as a,Mf as a0,jb as a1,Kt as a2,Yr as a3,od as a4,g_ as a5,p_ as a6,gg as b,mg as c,Fe as d,Au as e,ch as f,xu as g,Eg as h,Ag as i,Rg as j,Og as k,Pb as l,$e as m,ne as n,nt as o,De as p,ue as q,Ae as r,ru as s,he as t,pr as u,$b as v,yn as w,$i as x,hr as y,Ye as z};
|
|
269
|
+
Please report this to https://github.com/markedjs/marked.`,t){const n="<p>An error occurred:</p><pre>"+xt(r.message+"",!0)+"</pre>";return e?Promise.resolve(n):n}if(e)return Promise.reject(r);throw r}}},Cr=new Cb;function pe(t,e){return Cr.parse(t,e)}pe.options=pe.setOptions=function(t){return Cr.setOptions(t),pe.defaults=Cr.defaults,Xu(pe.defaults),pe};pe.getDefaults=Do;pe.defaults=Or;pe.use=function(...t){return Cr.use(...t),pe.defaults=Cr.defaults,Xu(pe.defaults),pe};pe.walkTokens=function(t,e){return Cr.walkTokens(t,e)};pe.parseInline=Cr.parseInline;pe.Parser=Jt;pe.parser=Jt.parse;pe.Renderer=Us;pe.TextRenderer=zo;pe.Lexer=Gt;pe.lexer=Gt.lex;pe.Tokenizer=Ds;pe.Hooks=_s;pe.parse=pe;pe.options;pe.setOptions;pe.use;pe.walkTokens;pe.parseInline;Jt.parse;Gt.lex;const Ob=["innerHTML"],Pb=pr({__name:"MarkdownContent",props:{content:{}},setup(t){const e=t,r=new pe.Renderer;r.link=({href:s,title:i,text:o})=>{const a=s??"",l=i?` title="${i}"`:"";return`<a href="${a}"${l} target="_blank" rel="noopener noreferrer">${o}</a>`};const n=je(()=>e.content?pe.parse(e.content,{async:!1,renderer:r}):"");return(s,i)=>(Z(),ue("div",{class:"prose prose-sm dark:prose-invert max-w-none markdown-content",innerHTML:n.value},null,8,Ob))}}),lh=10*1024*1024,ch=25*1024*1024;function yn(t){return t<1024?`${t} B`:t<1024*1024?`${(t/1024).toFixed(1)} KB`:`${(t/(1024*1024)).toFixed(1)} MB`}function $i(t){return t.mimeType.startsWith("image/")}function Ib(t){return`data:${t.mimeType};base64,${t.content}`}async function $b(t){const e=await new Promise((n,s)=>{const i=new FileReader;i.onload=()=>n(String(i.result??"")),i.onerror=()=>s(new Error("Unable to read file")),i.readAsDataURL(t)}),r=e.indexOf(",");if(r===-1)throw new Error(`Unable to parse file content for ${t.name}`);return{name:t.name,mimeType:t.type||"application/octet-stream",size:t.size,content:e.slice(r+1)}}function jb(t){for(const r of t)if(r.size>lh)return{ok:!1,error:`"${r.name}" exceeds the 10MB per-file limit.`};return t.reduce((r,n)=>r+n.size,0)>ch?{ok:!1,error:"Attachments exceed the 25MB per-message limit."}:{ok:!0}}const Nb={class:"overlay-header",style:{background:"linear-gradient(180deg, rgba(216,51,51,0.12) 0%, rgba(240,65,255,0.06) 100%)"}},Lb={key:0,class:"flex h-full items-center justify-center px-5 text-center"},Db={key:0,class:"overlay-avatar-letter"},Ub={key:0,class:"mb-2 space-y-2"},Bb=["src","alt"],Mb={class:"flex items-center gap-2 text-[9px]"},Hb={class:"truncate"},qb={class:"opacity-70"},Fb={key:2,class:"text-zinc-500"},Vb={key:0,class:"overlay-stream-indicator"},zb={class:"overlay-footer"},Wb={key:0,class:"mb-2 space-y-2"},Kb={class:"flex flex-wrap gap-1.5"},Gb={class:"max-w-[120px] truncate"},Jb={class:"opacity-65"},Yb=["onClick"],Xb={class:"overlay-meta text-zinc-500"},Zb={key:1,class:"mb-2 text-[11px] text-[#ef4444]"},Qb={class:"overlay-composer-field"},e_=["disabled"],t_=["disabled","aria-label","title"],r_=pr({__name:"ChatOverlay",setup(t){const e=Kv(),r=ln(),n=jo(),s=Oe(!1),i=Oe(""),o=Oe(""),a=Oe(!1),l=Oe([]),c=Oe(),u=Oe(),h=Oe(),d=Oe(!0),f=Oe(!1),p=[0,110,220],y=je(()=>e.messages.length>0),w=()=>n.path==="/",k=je(()=>l.value.reduce((L,se)=>L+se.size,0)),_=je(()=>{const L=typeof r.email=="string"?r.email.trim():"";return L?L.charAt(0).toUpperCase():"U"}),b=je(()=>!e.isStreaming&&(i.value.trim().length>0||l.value.length>0));function x(){w()||(s.value=!s.value)}function D(){h.value&&(h.value.style.height="auto",h.value.style.height=`${Math.min(h.value.scrollHeight,136)}px`)}function M(){if(!c.value)return;const L=c.value,se=L.scrollHeight-L.scrollTop-L.clientHeight;d.value=se<40,f.value=!d.value}function U(L=!1){c.value&&(L||d.value)&&(c.value.scrollTop=c.value.scrollHeight,f.value=!1)}async function V(L){if(!L||L.length===0)return;o.value="";const se=[];try{for(const ae of Array.from(L))se.push(await $b(ae))}catch(ae){o.value=(ae==null?void 0:ae.message)??"Unable to read one or more files.";return}const We=[...l.value,...se],ie=jb(We);if(!ie.ok){o.value=ie.error;return}l.value=We,u.value&&(u.value.value="")}function C(L){l.value.splice(L,1),o.value=""}function z(){var L;e.isStreaming||(L=u.value)==null||L.click()}function Q(L){const se=L.target;V((se==null?void 0:se.files)??null)}async function O(){if(!b.value)return;const L=i.value.trim(),se=[...l.value],We=L||"Please review the attached file(s).";i.value="",l.value=[],o.value="",D(),await e.sendMessage(We,se)}function Y(){e.stopStreaming()}function Ee(L){if(L.key==="Enter"&&!L.shiftKey){if(L.preventDefault(),e.isStreaming){Y();return}O()}}function Ne(L){L.preventDefault(),!e.isStreaming&&(a.value=!0)}function ye(L){L.preventDefault(),a.value=!1}async function te(L){var se;L.preventDefault(),a.value=!1,!e.isStreaming&&await V(((se=L.dataTransfer)==null?void 0:se.files)??null)}return Kt(i,()=>D()),Kt(()=>e.messages.map(L=>L.content),async()=>{await hr(),M(),U()},{deep:!0}),Kt(()=>e.messages.length,async()=>{await hr(),M(),U(!0)}),Kt(s,async L=>{L&&(await hr(),D(),M(),U(!0))}),xo(async()=>{await hr(),D()}),(L,se)=>{const We=Zs("X");return Z(),ue(Fe,null,[!s.value&&!w()?(Z(),ue("button",{key:0,onClick:x,class:"overlay-fab",title:"Chat with IO","aria-label":"Open chat overlay"},[he(re(xu),{class:"h-4 w-4 text-white"})])):$e("",!0),he(yf,{"enter-active-class":"transition-all duration-200 ease-out","enter-from-class":"opacity-0 translate-y-4 scale-[0.98]","enter-to-class":"opacity-100 translate-y-0 scale-100","leave-active-class":"transition-all duration-150 ease-in","leave-from-class":"opacity-100 translate-y-0 scale-100","leave-to-class":"opacity-0 translate-y-4 scale-[0.98]"},{default:Yr(()=>[s.value?(Z(),ue("section",{key:0,class:Ye(["overlay-panel",a.value?"overlay-panel-dragging":""]),"aria-label":"IO Assistant chat",onDragover:Ne,onDragleave:ye,onDrop:te},[ne("header",Nb,[se[4]||(se[4]=ne("div",{class:"flex items-center gap-2.5"},[ne("div",{class:"overlay-brand-mark","aria-hidden":"true"},[ne("img",{src:Tu,alt:"IO",width:"18",height:"18",class:"shrink-0"})]),ne("div",{class:"flex items-center leading-none"},[ne("span",{class:"overlay-title"},"IO Chat")])],-1)),ne("button",{onClick:se[0]||(se[0]=ie=>s.value=!1),class:"overlay-icon-btn","aria-label":"Minimize chat overlay",title:"Minimize chat"},[he(re(_g),{class:"h-3.5 w-3.5"})])]),ne("div",{ref_key:"messagesContainer",ref:c,class:"overlay-messages",onScroll:M},[y.value?$e("",!0):(Z(),ue("div",Lb,[ne("div",null,[he(Zi,{size:32,class:"mx-auto mb-3 shrink-0"}),se[5]||(se[5]=ne("p",{class:"overlay-empty-copy"},"Ask IO about your workspace, agents, or recent changes.",-1))])])),(Z(!0),ue(Fe,null,zr(re(e).messages,ie=>(Z(),ue("div",{key:ie.id,class:Ye(["flex",ie.role==="user"?"justify-end":"justify-start"])},[ne("div",{class:Ye(["flex max-w-full items-start gap-2",ie.role==="user"?"flex-row-reverse":""])},[ne("div",{class:Ye(["overlay-avatar",ie.role==="user"?"overlay-avatar-user":"overlay-avatar-assistant"]),"aria-hidden":"true"},[ie.role==="user"?(Z(),ue("span",Db,it(_.value),1)):(Z(),nt(Zi,{key:1,size:10,class:"shrink-0"}))],2),ne("article",{class:Ye(["overlay-bubble",ie.role==="user"?"overlay-bubble-user rounded-tr-sm":"overlay-bubble-assistant rounded-tl-sm"])},[ie.attachments.length>0?(Z(),ue("div",Ub,[(Z(!0),ue(Fe,null,zr(ie.attachments,(ae,Lt)=>(Z(),ue("div",{key:`${ie.id}-${Lt}`,class:"overlay-attachment"},[re($i)(ae)?(Z(),ue("img",{key:0,src:re(Ib)(ae),alt:ae.name,class:"mb-1 max-h-44 rounded-md object-contain"},null,8,Bb)):$e("",!0),ne("div",Mb,[re($i)(ae)?(Z(),nt(re(nl),{key:0,class:"h-3.5 w-3.5"})):(Z(),nt(re(rl),{key:1,class:"h-3.5 w-3.5"})),ne("span",Hb,it(ae.name),1),ne("span",qb,it(re(yn)(ae.size)),1)])]))),128))])):$e("",!0),ie.content?(Z(),nt(Pb,{key:1,content:ie.content,class:Ye(["overlay-markdown",ie.role==="user"?"prose-invert":""])},null,8,["content","class"])):ie.streaming?$e("",!0):(Z(),ue("span",Fb,"..."))],2)],2),ie.streaming&&ie.role==="assistant"?(Z(),ue("div",Vb,[(Z(),ue(Fe,null,zr(p,ae=>ne("span",{key:ae,class:"overlay-stream-dot",style:Ws({animationDelay:`${ae}ms`})},null,4)),64))])):$e("",!0)],2))),128))],544),f.value?(Z(),ue("button",{key:0,class:"overlay-scroll-hint",type:"button",onClick:se[1]||(se[1]=ie=>U(!0)),"aria-label":"Scroll to latest message"},[he(re(pg),{class:"h-3.5 w-3.5"}),se[6]||(se[6]=ru(" Latest ",-1))])):$e("",!0),ne("footer",zb,[ne("input",{ref_key:"fileInput",ref:u,type:"file",multiple:"",class:"hidden",onChange:Q},null,544),l.value.length>0?(Z(),ue("div",Wb,[ne("div",Kb,[(Z(!0),ue(Fe,null,zr(l.value,(ie,ae)=>(Z(),ue("div",{key:`${ie.name}-${ae}`,class:"overlay-chip"},[re($i)(ie)?(Z(),nt(re(nl),{key:0,class:"h-3.5 w-3.5"})):(Z(),nt(re(rl),{key:1,class:"h-3.5 w-3.5"})),ne("span",Gb,it(ie.name),1),ne("span",Jb,it(re(yn)(ie.size)),1),ne("button",{class:"hover:text-destructive",onClick:Lt=>C(ae)},[he(We,{class:"h-3.5 w-3.5"})],8,Yb)]))),128))]),ne("p",Xb,it(re(yn)(k.value))+" · Max "+it(re(yn)(re(lh)))+" file · "+it(re(yn)(re(ch)))+" total ",1)])):$e("",!0),o.value?(Z(),ue("p",Zb,it(o.value),1)):$e("",!0),ne("div",Qb,[ne("button",{class:"overlay-attach-btn",disabled:re(e).isStreaming,onClick:z,title:"Attach files","aria-label":"Attach files"},[he(re(Sg),{class:"h-4 w-4"})],8,e_),od(ne("textarea",{ref_key:"textareaRef",ref:h,"onUpdate:modelValue":se[2]||(se[2]=ie=>i.value=ie),onKeydown:Ee,placeholder:"Message IO…",rows:"1",class:"overlay-input"},null,544),[[Mf,i.value]]),ne("button",{onClick:se[3]||(se[3]=ie=>re(e).isStreaming?Y():O()),disabled:!b.value&&!re(e).isStreaming,class:"overlay-send-btn","aria-label":re(e).isStreaming?"Stop generation":"Send message",title:re(e).isStreaming?"Stop generation":"Send message"},[re(e).isStreaming?(Z(),nt(re(Rg),{key:1,class:"h-3 w-3"})):(Z(),nt(re(Tg),{key:0,class:"h-3 w-3"}))],8,t_)])])],34)):$e("",!0)]),_:1})],64)}}}),n_=(t,e)=>{const r=t.__vccOpts||t;for(const[n,s]of e)r[n]=s;return r},s_=n_(r_,[["__scopeId","data-v-0be88a62"]]),i_={class:"flex h-screen overflow-hidden"},o_={class:"flex-1 flex flex-col overflow-hidden"},a_={class:"flex-1 overflow-auto"},l_=pr({__name:"App",setup(t){const e=ln(),r=jo(),n=je(()=>e.isAuthenticated&&r.name!=="login");return(s,i)=>{const o=Zs("router-view");return Z(),ue("div",i_,[n.value?(Z(),nt(Ug,{key:0})):$e("",!0),ne("div",o_,[n.value?(Z(),nt(Vv,{key:0})):$e("",!0),ne("main",a_,[he(o)])]),n.value?(Z(),nt(s_,{key:1})):$e("",!0)])}}}),c_=[{path:"/login",name:"login",component:()=>Ke(()=>import("./LoginView-CG1O9fmR.js"),[]),meta:{public:!0}},{path:"/",name:"chat",component:()=>Ke(()=>import("./ChatView-DLu9BMg8.js"),__vite__mapDeps([0,1]))},{path:"/squads",name:"squads",component:()=>Ke(()=>import("./SquadsView-CPVzko7k.js"),__vite__mapDeps([2,3,4,5]))},{path:"/squads/health",name:"squad-health",component:()=>Ke(()=>import("./SquadHealthView-DF2zF9D3.js"),__vite__mapDeps([6,3,7,5]))},{path:"/squads/:id",name:"squad-detail",component:()=>Ke(()=>import("./SquadDetailView-BBvrgHzn.js"),__vite__mapDeps([8,3,4,1,5,9,10]))},{path:"/feed",name:"feed",component:()=>Ke(()=>import("./FeedView-6OV-l6Gl.js"),__vite__mapDeps([11,3,4,9]))},{path:"/skills",name:"skills",component:()=>Ke(()=>import("./SkillsView-DnNmO192.js"),__vite__mapDeps([12,3,13,14,15,16,1,9]))},{path:"/mcp",name:"mcp",component:()=>Ke(()=>import("./McpView-TJN-fZvI.js"),__vite__mapDeps([17,3,18,13,9]))},{path:"/schedules",name:"schedules",component:()=>Ke(()=>import("./SchedulesView-BDFpImX6.js"),__vite__mapDeps([19,3,4,18,13,15,9]))},{path:"/history",name:"history",component:()=>Ke(()=>import("./HistoryView-DizPqv0y.js"),__vite__mapDeps([20,3,14,10,9]))},{path:"/wiki",name:"wiki",component:()=>Ke(()=>import("./WikiView-KhFqBZI0.js"),__vite__mapDeps([21,3,14,13,15,9,16,1]))},{path:"/usage",name:"usage",component:()=>Ke(()=>import("./UsageView-OcyM5k14.js"),__vite__mapDeps([22,3,7]))},{path:"/audit-log",name:"audit-log",component:()=>Ke(()=>import("./AuditLogView-C5QtUQBq.js"),__vite__mapDeps([23,3]))},{path:"/settings",name:"settings",component:()=>Ke(()=>import("./SettingsView-D-K1iC1c.js"),__vite__mapDeps([24,3]))}],uh=og({history:Up(),routes:c_});uh.beforeEach(t=>{const e=ln();if(!t.meta.public&&!e.isAuthenticated)return{name:"login"}});async function u_(){await Bv();const t=Wf(l_);t.use(Jf()),t.use(uh);const{useAuthStore:e}=await Ke(async()=>{const{useAuthStore:n}=await Promise.resolve().then(()=>Mv);return{useAuthStore:n}},void 0),r=e();r.initAuthListener(),r.token&&await r.refreshToken(),t.mount("#app")}u_();export{f_ as $,hg as A,dg as B,fg as C,Ws as D,xo as E,rl as F,$c as G,vg as H,nl as I,Z as J,Oe as K,zr as L,lh as M,Zs as N,uh as O,Sg as P,Ib as Q,it as R,Tg as S,re as T,Cg as U,ln as V,Kv as W,jo as X,ag as Y,d_ as Z,Zi as _,pg as a,Mf as a0,jb as a1,Kt as a2,Yr as a3,od as a4,g_ as a5,p_ as a6,gg as b,mg as c,Fe as d,Au as e,ch as f,xu as g,Eg as h,Ag as i,Rg as j,Og as k,Pb as l,je as m,ne as n,nt as o,$e as p,ue as q,Ae as r,ru as s,he as t,pr as u,$b as v,yn as w,$i as x,hr as y,Ye as z};
|