cista 1.1.1__py3-none-any.whl → 1.2.1__py3-none-any.whl
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.
- cista/_version.py +1 -1
- cista/app.py +14 -13
- cista/auth.py +101 -0
- cista/util/lrucache.py +2 -2
- cista/wwwroot/assets/{add-file-6a41e251.js → add-file-8c95935e.js} +1 -1
- cista/wwwroot/assets/{add-folder-62d934ef.js → add-folder-86d38756.js} +1 -1
- cista/wwwroot/assets/{arrow-a3a583f8.js → arrow-75fe0244.js} +1 -1
- cista/wwwroot/assets/{arrows-h-d9e36082.js → arrows-h-7cc7ed45.js} +1 -1
- cista/wwwroot/assets/{arrows-v-5223491a.js → arrows-v-6ba20f93.js} +1 -1
- cista/wwwroot/assets/{check-f7566407.js → check-2847ad21.js} +1 -1
- cista/wwwroot/assets/{code-8e0123d4.js → code-a7719923.js} +1 -1
- cista/wwwroot/assets/{copy-a70a3d1c.js → copy-3449d27d.js} +1 -1
- cista/wwwroot/assets/{create-file-d995875e.js → create-file-a1cd75fd.js} +1 -1
- cista/wwwroot/assets/{create-folder-c448deda.js → create-folder-59db9ded.js} +1 -1
- cista/wwwroot/assets/{cross-e74ed6f4.js → cross-38ada808.js} +1 -1
- cista/wwwroot/assets/{disk-f1376321.js → disk-39a6808b.js} +1 -1
- cista/wwwroot/assets/{download-bad67930.js → download-dfa3cb2c.js} +1 -1
- cista/wwwroot/assets/{exclamation-afec06bb.js → exclamation-1b2064ee.js} +1 -1
- cista/wwwroot/assets/{eye-5fde34a1.js → eye-8ad3b932.js} +1 -1
- cista/wwwroot/assets/{find-11711648.js → find-7e0bf1e0.js} +1 -1
- cista/wwwroot/assets/{fullscreen-7f61e522.js → fullscreen-e21f0ea1.js} +1 -1
- cista/wwwroot/assets/{github-c9475017.js → github-33a0fb51.js} +1 -1
- cista/wwwroot/assets/index-1cae47bc.css +1 -0
- cista/wwwroot/assets/index-5b083aad.js +28 -0
- cista/wwwroot/assets/{info-b3d76e57.js → info-f30cd4b4.js} +1 -1
- cista/wwwroot/assets/{link-5cd893e4.js → link-3a6a01b8.js} +1 -1
- cista/wwwroot/assets/{logo-6090454d.js → logo-a02885a3.js} +1 -1
- cista/wwwroot/assets/{loop-531f6994.js → loop-17dda54a.js} +1 -1
- cista/wwwroot/assets/{menu-ed0d8c47.js → menu-e088a6cc.js} +1 -1
- cista/wwwroot/assets/{next-ee82241a.js → next-c83214f4.js} +1 -1
- cista/wwwroot/assets/{open-8364df82.js → open-bdcf30c3.js} +1 -1
- cista/wwwroot/assets/{paste-0f86e193.js → paste-b1ebeeae.js} +1 -1
- cista/wwwroot/assets/{pause-a2dd4670.js → pause-c44d983d.js} +1 -1
- cista/wwwroot/assets/{pencil-bfd02151.js → pencil-70ceb3cc.js} +1 -1
- cista/wwwroot/assets/{play-83e40a03.js → play-38e640b3.js} +1 -1
- cista/wwwroot/assets/{plus-f463cfbc.js → plus-d2e20553.js} +1 -1
- cista/wwwroot/assets/{previous-cbb778b5.js → previous-78dea9b8.js} +1 -1
- cista/wwwroot/assets/{reload-907eb866.js → reload-61c8cee7.js} +1 -1
- cista/wwwroot/assets/{rename-51dadde6.js → rename-202f8bc5.js} +1 -1
- cista/wwwroot/assets/{scissors-d32350cc.js → scissors-9235051c.js} +1 -1
- cista/wwwroot/assets/{shuffle-00a003ad.js → shuffle-fd56ec51.js} +1 -1
- cista/wwwroot/assets/{signin-d7bd57fd.js → signin-494e0573.js} +1 -1
- cista/wwwroot/assets/{signout-4c4ff7fb.js → signout-4047ccde.js} +1 -1
- cista/wwwroot/assets/{skip-0069d8d7.js → skip-bb8e721d.js} +1 -1
- cista/wwwroot/assets/{spinner-164c9b34.js → spinner-8c3861ee.js} +1 -1
- cista/wwwroot/assets/{stop-3717c27d.js → stop-d670a372.js} +1 -1
- cista/wwwroot/assets/{trash-449f81ef.js → trash-6a339a1b.js} +1 -1
- cista/wwwroot/assets/{triangle-3ecaf29c.js → triangle-9358f5e4.js} +1 -1
- cista/wwwroot/assets/{unfullscreen-175d46cd.js → unfullscreen-792a694f.js} +1 -1
- cista/wwwroot/assets/{up-arrow-164a366e.js → up-arrow-f518550f.js} +1 -1
- cista/wwwroot/assets/{upload-cloud-df377f1a.js → upload-cloud-5f1a71c5.js} +1 -1
- cista/wwwroot/assets/{user-3b5a32bc.js → user-2d17adce.js} +1 -1
- cista/wwwroot/assets/{user-cog-27e2c201.js → user-cog-5cefd313.js} +1 -1
- cista/wwwroot/assets/{volume-high-f4e07edd.js → volume-high-151aaf83.js} +1 -1
- cista/wwwroot/assets/{volume-low-f754322d.js → volume-low-8ffa3894.js} +1 -1
- cista/wwwroot/assets/{volume-medium-a5806088.js → volume-medium-7b38c87d.js} +1 -1
- cista/wwwroot/assets/{volume-mute-405763b1.js → volume-mute-4e81ae44.js} +1 -1
- cista/wwwroot/assets/{window-cross-86cb8236.js → window-cross-ce8f66c3.js} +1 -1
- cista/wwwroot/assets/{window-d99968ac.js → window-dec8f28e.js} +1 -1
- cista/wwwroot/assets/{wordwrap-cdcd3f93.js → wordwrap-4618846d.js} +1 -1
- cista/wwwroot/assets/{zoomin-7d13bb9b.js → zoomin-d821154d.js} +1 -1
- cista/wwwroot/assets/{zoomout-daf52018.js → zoomout-faf726ac.js} +1 -1
- cista/wwwroot/index.html +2 -2
- {cista-1.1.1.dist-info → cista-1.2.1.dist-info}/METADATA +2 -2
- cista-1.2.1.dist-info/RECORD +86 -0
- cista/wwwroot/assets/index-0ccc4ea2.js +0 -28
- cista/wwwroot/assets/index-89d850f4.css +0 -1
- cista-1.1.1.dist-info/RECORD +0 -86
- {cista-1.1.1.dist-info → cista-1.2.1.dist-info}/WHEEL +0 -0
- {cista-1.1.1.dist-info → cista-1.2.1.dist-info}/entry_points.txt +0 -0
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
var Hc=Object.defineProperty;var Bc=(e,t,n)=>t in e?Hc(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var kt=(e,t,n)=>(Bc(e,typeof t!="symbol"?t+"":t,n),n);(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))s(o);new MutationObserver(o=>{for(const r of o)if(r.type==="childList")for(const l of r.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&s(l)}).observe(document,{childList:!0,subtree:!0});function n(o){const r={};return o.integrity&&(r.integrity=o.integrity),o.referrerPolicy&&(r.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?r.credentials="include":o.crossOrigin==="anonymous"?r.credentials="omit":r.credentials="same-origin",r}function s(o){if(o.ep)return;o.ep=!0;const r=n(o);fetch(o.href,r)}})();/**
|
|
2
|
+
* @vue/shared v3.5.18
|
|
3
|
+
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
|
+
* @license MIT
|
|
5
|
+
**//*! #__NO_SIDE_EFFECTS__ */function No(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const xe={},vn=[],at=()=>{},jc=()=>!1,$s=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),Ho=e=>e.startsWith("onUpdate:"),Le=Object.assign,Bo=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},Vc=Object.prototype.hasOwnProperty,be=(e,t)=>Vc.call(e,t),oe=Array.isArray,_n=e=>is(e)==="[object Map]",Ts=e=>is(e)==="[object Set]",_r=e=>is(e)==="[object Date]",ae=e=>typeof e=="function",Ae=e=>typeof e=="string",dt=e=>typeof e=="symbol",Ee=e=>e!==null&&typeof e=="object",jl=e=>(Ee(e)||ae(e))&&ae(e.then)&&ae(e.catch),Vl=Object.prototype.toString,is=e=>Vl.call(e),Wc=e=>is(e).slice(8,-1),Wl=e=>is(e)==="[object Object]",jo=e=>Ae(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,Ln=No(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Os=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},Uc=/-(\w)/g,rt=Os(e=>e.replace(Uc,(t,n)=>n?n.toUpperCase():"")),zc=/\B([A-Z])/g,Jt=Os(e=>e.replace(zc,"-$1").toLowerCase()),Ls=Os(e=>e.charAt(0).toUpperCase()+e.slice(1)),Xs=Os(e=>e?`on${Ls(e)}`:""),Ut=(e,t)=>!Object.is(e,t),_s=(e,...t)=>{for(let n=0;n<e.length;n++)e[n](...t)},_o=(e,t,n,s=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:s,value:n})},yo=e=>{const t=parseFloat(e);return isNaN(t)?e:t},Kc=e=>{const t=Ae(e)?Number(e):NaN;return isNaN(t)?e:t};let yr;const Ds=()=>yr||(yr=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function At(e){if(oe(e)){const t={};for(let n=0;n<e.length;n++){const s=e[n],o=Ae(s)?Yc(s):At(s);if(o)for(const r in o)t[r]=o[r]}return t}else if(Ae(e)||Ee(e))return e}const qc=/;(?![^(]*\))/g,Gc=/:([^]+)/,Jc=/\/\*[^]*?\*\//g;function Yc(e){const t={};return e.replace(Jc,"").split(qc).forEach(n=>{if(n){const s=n.split(Gc);s.length>1&&(t[s[0].trim()]=s[1].trim())}}),t}function De(e){let t="";if(Ae(e))t=e;else if(oe(e))for(let n=0;n<e.length;n++){const s=De(e[n]);s&&(t+=s+" ")}else if(Ee(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}function Zc(e){if(!e)return null;let{class:t,style:n}=e;return t&&!Ae(t)&&(e.class=De(t)),n&&(e.style=At(n)),e}const Xc="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",Qc=No(Xc);function Ul(e){return!!e||e===""}function ea(e,t){if(e.length!==t.length)return!1;let n=!0;for(let s=0;n&&s<e.length;s++)n=Fs(e[s],t[s]);return n}function Fs(e,t){if(e===t)return!0;let n=_r(e),s=_r(t);if(n||s)return n&&s?e.getTime()===t.getTime():!1;if(n=dt(e),s=dt(t),n||s)return e===t;if(n=oe(e),s=oe(t),n||s)return n&&s?ea(e,t):!1;if(n=Ee(e),s=Ee(t),n||s){if(!n||!s)return!1;const o=Object.keys(e).length,r=Object.keys(t).length;if(o!==r)return!1;for(const l in e){const i=e.hasOwnProperty(l),c=t.hasOwnProperty(l);if(i&&!c||!i&&c||!Fs(e[l],t[l]))return!1}}return String(e)===String(t)}function zl(e,t){return e.findIndex(n=>Fs(n,t))}const Kl=e=>!!(e&&e.__v_isRef===!0),Pe=e=>Ae(e)?e:e==null?"":oe(e)||Ee(e)&&(e.toString===Vl||!ae(e.toString))?Kl(e)?Pe(e.value):JSON.stringify(e,ql,2):String(e),ql=(e,t)=>Kl(t)?ql(e,t.value):_n(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[s,o],r)=>(n[Qs(s,r)+" =>"]=o,n),{})}:Ts(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>Qs(n))}:dt(t)?Qs(t):Ee(t)&&!oe(t)&&!Wl(t)?String(t):t,Qs=(e,t="")=>{var n;return dt(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};/**
|
|
6
|
+
* @vue/reactivity v3.5.18
|
|
7
|
+
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
8
|
+
* @license MIT
|
|
9
|
+
**/let Ue;class Gl{constructor(t=!1){this.detached=t,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=Ue,!t&&Ue&&(this.index=(Ue.scopes||(Ue.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,n;if(this.scopes)for(t=0,n=this.scopes.length;t<n;t++)this.scopes[t].pause();for(t=0,n=this.effects.length;t<n;t++)this.effects[t].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let t,n;if(this.scopes)for(t=0,n=this.scopes.length;t<n;t++)this.scopes[t].resume();for(t=0,n=this.effects.length;t<n;t++)this.effects[t].resume()}}run(t){if(this._active){const n=Ue;try{return Ue=this,t()}finally{Ue=n}}}on(){++this._on===1&&(this.prevScope=Ue,Ue=this)}off(){this._on>0&&--this._on===0&&(Ue=this.prevScope,this.prevScope=void 0)}stop(t){if(this._active){this._active=!1;let n,s;for(n=0,s=this.effects.length;n<s;n++)this.effects[n].stop();for(this.effects.length=0,n=0,s=this.cleanups.length;n<s;n++)this.cleanups[n]();if(this.cleanups.length=0,this.scopes){for(n=0,s=this.scopes.length;n<s;n++)this.scopes[n].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!t){const o=this.parent.scopes.pop();o&&o!==this&&(this.parent.scopes[this.index]=o,o.index=this.index)}this.parent=void 0}}}function Jl(e){return new Gl(e)}function Yl(){return Ue}function ta(e,t=!1){Ue&&Ue.cleanups.push(e)}let Me;const eo=new WeakSet;class Zl{constructor(t){this.fn=t,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,Ue&&Ue.active&&Ue.effects.push(this)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,eo.has(this)&&(eo.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||Ql(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,br(this),ei(this);const t=Me,n=ut;Me=this,ut=!0;try{return this.fn()}finally{ti(this),Me=t,ut=n,this.flags&=-3}}stop(){if(this.flags&1){for(let t=this.deps;t;t=t.nextDep)Uo(t);this.deps=this.depsTail=void 0,br(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?eo.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){bo(this)&&this.run()}get dirty(){return bo(this)}}let Xl=0,Dn,Fn;function Ql(e,t=!1){if(e.flags|=8,t){e.next=Fn,Fn=e;return}e.next=Dn,Dn=e}function Vo(){Xl++}function Wo(){if(--Xl>0)return;if(Fn){let t=Fn;for(Fn=void 0;t;){const n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;for(;Dn;){let t=Dn;for(Dn=void 0;t;){const n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(s){e||(e=s)}t=n}}if(e)throw e}function ei(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function ti(e){let t,n=e.depsTail,s=n;for(;s;){const o=s.prevDep;s.version===-1?(s===n&&(n=o),Uo(s),na(s)):t=s,s.dep.activeLink=s.prevActiveLink,s.prevActiveLink=void 0,s=o}e.deps=t,e.depsTail=n}function bo(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(ni(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function ni(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===Jn)||(e.globalVersion=Jn,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!bo(e))))return;e.flags|=2;const t=e.dep,n=Me,s=ut;Me=e,ut=!0;try{ei(e);const o=e.fn(e._value);(t.version===0||Ut(o,e._value))&&(e.flags|=128,e._value=o,t.version++)}catch(o){throw t.version++,o}finally{Me=n,ut=s,ti(e),e.flags&=-3}}function Uo(e,t=!1){const{dep:n,prevSub:s,nextSub:o}=e;if(s&&(s.nextSub=o,e.prevSub=void 0),o&&(o.prevSub=s,e.nextSub=void 0),n.subs===e&&(n.subs=s,!s&&n.computed)){n.computed.flags&=-5;for(let r=n.computed.deps;r;r=r.nextDep)Uo(r,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function na(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}let ut=!0;const si=[];function $t(){si.push(ut),ut=!1}function Tt(){const e=si.pop();ut=e===void 0?!0:e}function br(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=Me;Me=void 0;try{t()}finally{Me=n}}}let Jn=0;class sa{constructor(t,n){this.sub=t,this.dep=n,this.version=n.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class zo{constructor(t){this.computed=t,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(t){if(!Me||!ut||Me===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==Me)n=this.activeLink=new sa(Me,this),Me.deps?(n.prevDep=Me.depsTail,Me.depsTail.nextDep=n,Me.depsTail=n):Me.deps=Me.depsTail=n,oi(n);else if(n.version===-1&&(n.version=this.version,n.nextDep)){const s=n.nextDep;s.prevDep=n.prevDep,n.prevDep&&(n.prevDep.nextDep=s),n.prevDep=Me.depsTail,n.nextDep=void 0,Me.depsTail.nextDep=n,Me.depsTail=n,Me.deps===n&&(Me.deps=s)}return n}trigger(t){this.version++,Jn++,this.notify(t)}notify(t){Vo();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{Wo()}}}function oi(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let s=t.deps;s;s=s.nextDep)oi(s)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}const ks=new WeakMap,rn=Symbol(""),wo=Symbol(""),Yn=Symbol("");function ze(e,t,n){if(ut&&Me){let s=ks.get(e);s||ks.set(e,s=new Map);let o=s.get(n);o||(s.set(n,o=new zo),o.map=s,o.key=n),o.track()}}function Mt(e,t,n,s,o,r){const l=ks.get(e);if(!l){Jn++;return}const i=c=>{c&&c.trigger()};if(Vo(),t==="clear")l.forEach(i);else{const c=oe(e),a=c&&jo(n);if(c&&n==="length"){const u=Number(s);l.forEach((f,d)=>{(d==="length"||d===Yn||!dt(d)&&d>=u)&&i(f)})}else switch((n!==void 0||l.has(void 0))&&i(l.get(n)),a&&i(l.get(Yn)),t){case"add":c?a&&i(l.get("length")):(i(l.get(rn)),_n(e)&&i(l.get(wo)));break;case"delete":c||(i(l.get(rn)),_n(e)&&i(l.get(wo)));break;case"set":_n(e)&&i(l.get(rn));break}}Wo()}function oa(e,t){const n=ks.get(e);return n&&n.get(t)}function pn(e){const t=me(e);return t===e?t:(ze(t,"iterate",Yn),ot(e)?t:t.map(Be))}function Ns(e){return ze(e=me(e),"iterate",Yn),e}const ra={__proto__:null,[Symbol.iterator](){return to(this,Symbol.iterator,Be)},concat(...e){return pn(this).concat(...e.map(t=>oe(t)?pn(t):t))},entries(){return to(this,"entries",e=>(e[1]=Be(e[1]),e))},every(e,t){return xt(this,"every",e,t,void 0,arguments)},filter(e,t){return xt(this,"filter",e,t,n=>n.map(Be),arguments)},find(e,t){return xt(this,"find",e,t,Be,arguments)},findIndex(e,t){return xt(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return xt(this,"findLast",e,t,Be,arguments)},findLastIndex(e,t){return xt(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return xt(this,"forEach",e,t,void 0,arguments)},includes(...e){return no(this,"includes",e)},indexOf(...e){return no(this,"indexOf",e)},join(e){return pn(this).join(e)},lastIndexOf(...e){return no(this,"lastIndexOf",e)},map(e,t){return xt(this,"map",e,t,void 0,arguments)},pop(){return An(this,"pop")},push(...e){return An(this,"push",e)},reduce(e,...t){return wr(this,"reduce",e,t)},reduceRight(e,...t){return wr(this,"reduceRight",e,t)},shift(){return An(this,"shift")},some(e,t){return xt(this,"some",e,t,void 0,arguments)},splice(...e){return An(this,"splice",e)},toReversed(){return pn(this).toReversed()},toSorted(e){return pn(this).toSorted(e)},toSpliced(...e){return pn(this).toSpliced(...e)},unshift(...e){return An(this,"unshift",e)},values(){return to(this,"values",Be)}};function to(e,t,n){const s=Ns(e),o=s[t]();return s!==e&&!ot(e)&&(o._next=o.next,o.next=()=>{const r=o._next();return r.value&&(r.value=n(r.value)),r}),o}const la=Array.prototype;function xt(e,t,n,s,o,r){const l=Ns(e),i=l!==e&&!ot(e),c=l[t];if(c!==la[t]){const f=c.apply(e,r);return i?Be(f):f}let a=n;l!==e&&(i?a=function(f,d){return n.call(this,Be(f),d,e)}:n.length>2&&(a=function(f,d){return n.call(this,f,d,e)}));const u=c.call(l,a,s);return i&&o?o(u):u}function wr(e,t,n,s){const o=Ns(e);let r=n;return o!==e&&(ot(e)?n.length>3&&(r=function(l,i,c){return n.call(this,l,i,c,e)}):r=function(l,i,c){return n.call(this,l,Be(i),c,e)}),o[t](r,...s)}function no(e,t,n){const s=me(e);ze(s,"iterate",Yn);const o=s[t](...n);return(o===-1||o===!1)&&Go(n[0])?(n[0]=me(n[0]),s[t](...n)):o}function An(e,t,n=[]){$t(),Vo();const s=me(e)[t].apply(e,n);return Wo(),Tt(),s}const ia=No("__proto__,__v_isRef,__isVue"),ri=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(dt));function ca(e){dt(e)||(e=String(e));const t=me(this);return ze(t,"has",e),t.hasOwnProperty(e)}class li{constructor(t=!1,n=!1){this._isReadonly=t,this._isShallow=n}get(t,n,s){if(n==="__v_skip")return t.__v_skip;const o=this._isReadonly,r=this._isShallow;if(n==="__v_isReactive")return!o;if(n==="__v_isReadonly")return o;if(n==="__v_isShallow")return r;if(n==="__v_raw")return s===(o?r?_a:ui:r?ai:ci).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(s)?t:void 0;const l=oe(t);if(!o){let c;if(l&&(c=ra[n]))return c;if(n==="hasOwnProperty")return ca}const i=Reflect.get(t,n,$e(t)?t:s);return(dt(n)?ri.has(n):ia(n))||(o||ze(t,"get",n),r)?i:$e(i)?l&&jo(n)?i:i.value:Ee(i)?o?di(i):Ct(i):i}}class ii extends li{constructor(t=!1){super(!1,t)}set(t,n,s,o){let r=t[n];if(!this._isShallow){const c=qt(r);if(!ot(s)&&!qt(s)&&(r=me(r),s=me(s)),!oe(t)&&$e(r)&&!$e(s))return c?!1:(r.value=s,!0)}const l=oe(t)&&jo(n)?Number(n)<t.length:be(t,n),i=Reflect.set(t,n,s,$e(t)?t:o);return t===me(o)&&(l?Ut(s,r)&&Mt(t,"set",n,s):Mt(t,"add",n,s)),i}deleteProperty(t,n){const s=be(t,n);t[n];const o=Reflect.deleteProperty(t,n);return o&&s&&Mt(t,"delete",n,void 0),o}has(t,n){const s=Reflect.has(t,n);return(!dt(n)||!ri.has(n))&&ze(t,"has",n),s}ownKeys(t){return ze(t,"iterate",oe(t)?"length":rn),Reflect.ownKeys(t)}}class aa extends li{constructor(t=!1){super(!0,t)}set(t,n){return!0}deleteProperty(t,n){return!0}}const ua=new ii,fa=new aa,da=new ii(!0);const Co=e=>e,ps=e=>Reflect.getPrototypeOf(e);function pa(e,t,n){return function(...s){const o=this.__v_raw,r=me(o),l=_n(r),i=e==="entries"||e===Symbol.iterator&&l,c=e==="keys"&&l,a=o[e](...s),u=n?Co:t?xs:Be;return!t&&ze(r,"iterate",c?wo:rn),{next(){const{value:f,done:d}=a.next();return d?{value:f,done:d}:{value:i?[u(f[0]),u(f[1])]:u(f),done:d}},[Symbol.iterator](){return this}}}}function hs(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function ha(e,t){const n={get(o){const r=this.__v_raw,l=me(r),i=me(o);e||(Ut(o,i)&&ze(l,"get",o),ze(l,"get",i));const{has:c}=ps(l),a=t?Co:e?xs:Be;if(c.call(l,o))return a(r.get(o));if(c.call(l,i))return a(r.get(i));r!==l&&r.get(o)},get size(){const o=this.__v_raw;return!e&&ze(me(o),"iterate",rn),Reflect.get(o,"size",o)},has(o){const r=this.__v_raw,l=me(r),i=me(o);return e||(Ut(o,i)&&ze(l,"has",o),ze(l,"has",i)),o===i?r.has(o):r.has(o)||r.has(i)},forEach(o,r){const l=this,i=l.__v_raw,c=me(i),a=t?Co:e?xs:Be;return!e&&ze(c,"iterate",rn),i.forEach((u,f)=>o.call(r,a(u),a(f),l))}};return Le(n,e?{add:hs("add"),set:hs("set"),delete:hs("delete"),clear:hs("clear")}:{add(o){!t&&!ot(o)&&!qt(o)&&(o=me(o));const r=me(this);return ps(r).has.call(r,o)||(r.add(o),Mt(r,"add",o,o)),this},set(o,r){!t&&!ot(r)&&!qt(r)&&(r=me(r));const l=me(this),{has:i,get:c}=ps(l);let a=i.call(l,o);a||(o=me(o),a=i.call(l,o));const u=c.call(l,o);return l.set(o,r),a?Ut(r,u)&&Mt(l,"set",o,r):Mt(l,"add",o,r),this},delete(o){const r=me(this),{has:l,get:i}=ps(r);let c=l.call(r,o);c||(o=me(o),c=l.call(r,o)),i&&i.call(r,o);const a=r.delete(o);return c&&Mt(r,"delete",o,void 0),a},clear(){const o=me(this),r=o.size!==0,l=o.clear();return r&&Mt(o,"clear",void 0,void 0),l}}),["keys","values","entries",Symbol.iterator].forEach(o=>{n[o]=pa(o,e,t)}),n}function Ko(e,t){const n=ha(e,t);return(s,o,r)=>o==="__v_isReactive"?!e:o==="__v_isReadonly"?e:o==="__v_raw"?s:Reflect.get(be(n,o)&&o in s?n:s,o,r)}const ga={get:Ko(!1,!1)},ma={get:Ko(!1,!0)},va={get:Ko(!0,!1)};const ci=new WeakMap,ai=new WeakMap,ui=new WeakMap,_a=new WeakMap;function ya(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function ba(e){return e.__v_skip||!Object.isExtensible(e)?0:ya(Wc(e))}function Ct(e){return qt(e)?e:qo(e,!1,ua,ga,ci)}function fi(e){return qo(e,!1,da,ma,ai)}function di(e){return qo(e,!0,fa,va,ui)}function qo(e,t,n,s,o){if(!Ee(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const r=ba(e);if(r===0)return e;const l=o.get(e);if(l)return l;const i=new Proxy(e,r===2?s:n);return o.set(e,i),i}function zt(e){return qt(e)?zt(e.__v_raw):!!(e&&e.__v_isReactive)}function qt(e){return!!(e&&e.__v_isReadonly)}function ot(e){return!!(e&&e.__v_isShallow)}function Go(e){return e?!!e.__v_raw:!1}function me(e){const t=e&&e.__v_raw;return t?me(t):e}function Jo(e){return!be(e,"__v_skip")&&Object.isExtensible(e)&&_o(e,"__v_skip",!0),e}const Be=e=>Ee(e)?Ct(e):e,xs=e=>Ee(e)?di(e):e;function $e(e){return e?e.__v_isRef===!0:!1}function ne(e){return pi(e,!1)}function Hs(e){return pi(e,!0)}function pi(e,t){return $e(e)?e:new wa(e,t)}class wa{constructor(t,n){this.dep=new zo,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:me(t),this._value=n?t:Be(t),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(t){const n=this._rawValue,s=this.__v_isShallow||ot(t)||qt(t);t=s?t:me(t),Ut(t,n)&&(this._rawValue=t,this._value=s?t:Be(t),this.dep.trigger())}}function M(e){return $e(e)?e.value:e}const Ca={get:(e,t,n)=>t==="__v_raw"?e:M(Reflect.get(e,t,n)),set:(e,t,n,s)=>{const o=e[t];return $e(o)&&!$e(n)?(o.value=n,!0):Reflect.set(e,t,n,s)}};function hi(e){return zt(e)?e:new Proxy(e,Ca)}function dn(e){const t=oe(e)?new Array(e.length):{};for(const n in e)t[n]=xa(e,n);return t}class ka{constructor(t,n,s){this._object=t,this._key=n,this._defaultValue=s,this.__v_isRef=!0,this._value=void 0}get value(){const t=this._object[this._key];return this._value=t===void 0?this._defaultValue:t}set value(t){this._object[this._key]=t}get dep(){return oa(me(this._object),this._key)}}function xa(e,t,n){const s=e[t];return $e(s)?s:new ka(e,t,n)}class Sa{constructor(t,n,s){this.fn=t,this.setter=n,this._value=void 0,this.dep=new zo(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Jn-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=s}notify(){if(this.flags|=16,!(this.flags&8)&&Me!==this)return Ql(this,!0),!0}get value(){const t=this.dep.track();return ni(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function Ea(e,t,n=!1){let s,o;return ae(e)?s=e:(s=e.get,o=e.set),new Sa(s,o,n)}const gs={},Ss=new WeakMap;let tn;function Ra(e,t=!1,n=tn){if(n){let s=Ss.get(n);s||Ss.set(n,s=[]),s.push(e)}}function Ma(e,t,n=xe){const{immediate:s,deep:o,once:r,scheduler:l,augmentJob:i,call:c}=n,a=_=>o?_:ot(_)||o===!1||o===0?Pt(_,1):Pt(_);let u,f,d,h,x=!1,y=!1;if($e(e)?(f=()=>e.value,x=ot(e)):zt(e)?(f=()=>a(e),x=!0):oe(e)?(y=!0,x=e.some(_=>zt(_)||ot(_)),f=()=>e.map(_=>{if($e(_))return _.value;if(zt(_))return a(_);if(ae(_))return c?c(_,2):_()})):ae(e)?t?f=c?()=>c(e,2):e:f=()=>{if(d){$t();try{d()}finally{Tt()}}const _=tn;tn=u;try{return c?c(e,3,[h]):e(h)}finally{tn=_}}:f=at,t&&o){const _=f,S=o===!0?1/0:o;f=()=>Pt(_(),S)}const I=Yl(),w=()=>{u.stop(),I&&I.active&&Bo(I.effects,u)};if(r&&t){const _=t;t=(...S)=>{_(...S),w()}}let v=y?new Array(e.length).fill(gs):gs;const m=_=>{if(!(!(u.flags&1)||!u.dirty&&!_))if(t){const S=u.run();if(o||x||(y?S.some((k,R)=>Ut(k,v[R])):Ut(S,v))){d&&d();const k=tn;tn=u;try{const R=[S,v===gs?void 0:y&&v[0]===gs?[]:v,h];v=S,c?c(t,3,R):t(...R)}finally{tn=k}}}else u.run()};return i&&i(m),u=new Zl(f),u.scheduler=l?()=>l(m,!1):m,h=_=>Ra(_,!1,u),d=u.onStop=()=>{const _=Ss.get(u);if(_){if(c)c(_,4);else for(const S of _)S();Ss.delete(u)}},t?s?m(!0):v=u.run():l?l(m.bind(null,!0),!0):u.run(),w.pause=u.pause.bind(u),w.resume=u.resume.bind(u),w.stop=w,w}function Pt(e,t=1/0,n){if(t<=0||!Ee(e)||e.__v_skip||(n=n||new Set,n.has(e)))return e;if(n.add(e),t--,$e(e))Pt(e.value,t,n);else if(oe(e))for(let s=0;s<e.length;s++)Pt(e[s],t,n);else if(Ts(e)||_n(e))e.forEach(s=>{Pt(s,t,n)});else if(Wl(e)){for(const s in e)Pt(e[s],t,n);for(const s of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,s)&&Pt(e[s],t,n)}return e}/**
|
|
10
|
+
* @vue/runtime-core v3.5.18
|
|
11
|
+
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
12
|
+
* @license MIT
|
|
13
|
+
**/function cs(e,t,n,s){try{return s?e(...s):e()}catch(o){as(o,t,n)}}function pt(e,t,n,s){if(ae(e)){const o=cs(e,t,n,s);return o&&jl(o)&&o.catch(r=>{as(r,t,n)}),o}if(oe(e)){const o=[];for(let r=0;r<e.length;r++)o.push(pt(e[r],t,n,s));return o}}function as(e,t,n,s=!0){const o=t?t.vnode:null,{errorHandler:r,throwUnhandledErrorInProduction:l}=t&&t.appContext.config||xe;if(t){let i=t.parent;const c=t.proxy,a=`https://vuejs.org/error-reference/#runtime-${n}`;for(;i;){const u=i.ec;if(u){for(let f=0;f<u.length;f++)if(u[f](e,c,a)===!1)return}i=i.parent}if(r){$t(),cs(r,null,10,[e,c,a]),Tt();return}}Pa(e,n,o,s,l)}function Pa(e,t,n,s=!0,o=!1){if(o)throw e;console.error(e)}const Ye=[];let _t=-1;const yn=[];let Bt=null,gn=0;const gi=Promise.resolve();let Es=null;function Ze(e){const t=Es||gi;return e?t.then(this?e.bind(this):e):t}function Aa(e){let t=_t+1,n=Ye.length;for(;t<n;){const s=t+n>>>1,o=Ye[s],r=Zn(o);r<e||r===e&&o.flags&2?t=s+1:n=s}return t}function Yo(e){if(!(e.flags&1)){const t=Zn(e),n=Ye[Ye.length-1];!n||!(e.flags&2)&&t>=Zn(n)?Ye.push(e):Ye.splice(Aa(t),0,e),e.flags|=1,mi()}}function mi(){Es||(Es=gi.then(_i))}function Ia(e){oe(e)?yn.push(...e):Bt&&e.id===-1?Bt.splice(gn+1,0,e):e.flags&1||(yn.push(e),e.flags|=1),mi()}function Cr(e,t,n=_t+1){for(;n<Ye.length;n++){const s=Ye[n];if(s&&s.flags&2){if(e&&s.id!==e.uid)continue;Ye.splice(n,1),n--,s.flags&4&&(s.flags&=-2),s(),s.flags&4||(s.flags&=-2)}}}function vi(e){if(yn.length){const t=[...new Set(yn)].sort((n,s)=>Zn(n)-Zn(s));if(yn.length=0,Bt){Bt.push(...t);return}for(Bt=t,gn=0;gn<Bt.length;gn++){const n=Bt[gn];n.flags&4&&(n.flags&=-2),n.flags&8||n(),n.flags&=-2}Bt=null,gn=0}}const Zn=e=>e.id==null?e.flags&2?-1:1/0:e.id;function _i(e){const t=at;try{for(_t=0;_t<Ye.length;_t++){const n=Ye[_t];n&&!(n.flags&8)&&(n.flags&4&&(n.flags&=-2),cs(n,n.i,n.i?15:14),n.flags&4||(n.flags&=-2))}}finally{for(;_t<Ye.length;_t++){const n=Ye[_t];n&&(n.flags&=-2)}_t=-1,Ye.length=0,vi(),Es=null,(Ye.length||yn.length)&&_i()}}let Ve=null,yi=null;function Rs(e){const t=Ve;return Ve=e,yi=e&&e.type.__scopeId||null,t}function ft(e,t=Ve,n){if(!t||e._n)return e;const s=(...o)=>{s._d&&Dr(-1);const r=Rs(t);let l;try{l=e(...o)}finally{Rs(r),s._d&&Dr(1)}return l};return s._n=!0,s._c=!0,s._d=!0,s}function cn(e,t){if(Ve===null)return e;const n=zs(Ve),s=e.dirs||(e.dirs=[]);for(let o=0;o<t.length;o++){let[r,l,i,c=xe]=t[o];r&&(ae(r)&&(r={mounted:r,updated:r}),r.deep&&Pt(l),s.push({dir:r,instance:n,value:l,oldValue:void 0,arg:i,modifiers:c}))}return e}function Zt(e,t,n,s){const o=e.dirs,r=t&&t.dirs;for(let l=0;l<o.length;l++){const i=o[l];r&&(i.oldValue=r[l].value);let c=i.dir[s];c&&($t(),pt(c,n,8,[e.el,i,e,t]),Tt())}}const bi=Symbol("_vte"),wi=e=>e.__isTeleport,Nn=e=>e&&(e.disabled||e.disabled===""),kr=e=>e&&(e.defer||e.defer===""),xr=e=>typeof SVGElement<"u"&&e instanceof SVGElement,Sr=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,ko=(e,t)=>{const n=e&&e.to;return Ae(n)?t?t(n):null:n},Ci={name:"Teleport",__isTeleport:!0,process(e,t,n,s,o,r,l,i,c,a){const{mc:u,pc:f,pbc:d,o:{insert:h,querySelector:x,createText:y,createComment:I}}=a,w=Nn(t.props);let{shapeFlag:v,children:m,dynamicChildren:_}=t;if(e==null){const S=t.el=y(""),k=t.anchor=y("");h(S,n,s),h(k,n,s);const R=(C,N)=>{v&16&&(o&&o.isCE&&(o.ce._teleportTarget=C),u(m,C,N,o,r,l,i,c))},D=()=>{const C=t.target=ko(t.props,x),N=xi(C,t,y,h);C&&(l!=="svg"&&xr(C)?l="svg":l!=="mathml"&&Sr(C)&&(l="mathml"),w||(R(C,N),ys(t,!1)))};w&&(R(n,k),ys(t,!0)),kr(t.props)?(t.el.__isMounted=!1,Ge(()=>{D(),delete t.el.__isMounted},r)):D()}else{if(kr(t.props)&&e.el.__isMounted===!1){Ge(()=>{Ci.process(e,t,n,s,o,r,l,i,c,a)},r);return}t.el=e.el,t.targetStart=e.targetStart;const S=t.anchor=e.anchor,k=t.target=e.target,R=t.targetAnchor=e.targetAnchor,D=Nn(e.props),C=D?n:k,N=D?S:R;if(l==="svg"||xr(k)?l="svg":(l==="mathml"||Sr(k))&&(l="mathml"),_?(d(e.dynamicChildren,_,C,o,r,l,i),sr(e,t,!0)):c||f(e,t,C,N,o,r,l,i,!1),w)D?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):ms(t,n,S,a,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const q=t.target=ko(t.props,x);q&&ms(t,q,null,a,0)}else D&&ms(t,k,R,a,1);ys(t,w)}},remove(e,t,n,{um:s,o:{remove:o}},r){const{shapeFlag:l,children:i,anchor:c,targetStart:a,targetAnchor:u,target:f,props:d}=e;if(f&&(o(a),o(u)),r&&o(c),l&16){const h=r||!Nn(d);for(let x=0;x<i.length;x++){const y=i[x];s(y,t,n,h,!!y.dynamicChildren)}}},move:ms,hydrate:$a};function ms(e,t,n,{o:{insert:s},m:o},r=2){r===0&&s(e.targetAnchor,t,n);const{el:l,anchor:i,shapeFlag:c,children:a,props:u}=e,f=r===2;if(f&&s(l,t,n),(!f||Nn(u))&&c&16)for(let d=0;d<a.length;d++)o(a[d],t,n,2);f&&s(i,t,n)}function $a(e,t,n,s,o,r,{o:{nextSibling:l,parentNode:i,querySelector:c,insert:a,createText:u}},f){const d=t.target=ko(t.props,c);if(d){const h=Nn(t.props),x=d._lpa||d.firstChild;if(t.shapeFlag&16)if(h)t.anchor=f(l(e),t,i(e),n,s,o,r),t.targetStart=x,t.targetAnchor=x&&l(x);else{t.anchor=l(e);let y=x;for(;y;){if(y&&y.nodeType===8){if(y.data==="teleport start anchor")t.targetStart=y;else if(y.data==="teleport anchor"){t.targetAnchor=y,d._lpa=t.targetAnchor&&l(t.targetAnchor);break}}y=l(y)}t.targetAnchor||xi(d,t,u,a),f(x&&l(x),t,d,n,s,o,r)}ys(t,h)}return t.anchor&&l(t.anchor)}const ki=Ci;function ys(e,t){const n=e.ctx;if(n&&n.ut){let s,o;for(t?(s=e.el,o=e.anchor):(s=e.targetStart,o=e.targetAnchor);s&&s!==o;)s.nodeType===1&&s.setAttribute("data-v-owner",n.uid),s=s.nextSibling;n.ut()}}function xi(e,t,n,s){const o=t.targetStart=n(""),r=t.targetAnchor=n("");return o[bi]=r,e&&(s(o,e),s(r,e)),r}const jt=Symbol("_leaveCb"),vs=Symbol("_enterCb");function Ta(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return Qe(()=>{e.isMounted=!0}),Rn(()=>{e.isUnmounting=!0}),e}const st=[Function,Array],Si={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:st,onEnter:st,onAfterEnter:st,onEnterCancelled:st,onBeforeLeave:st,onLeave:st,onAfterLeave:st,onLeaveCancelled:st,onBeforeAppear:st,onAppear:st,onAfterAppear:st,onAppearCancelled:st},Ei=e=>{const t=e.subTree;return t.component?Ei(t.component):t},Oa={name:"BaseTransition",props:Si,setup(e,{slots:t}){const n=Us(),s=Ta();return()=>{const o=t.default&&Pi(t.default(),!0);if(!o||!o.length)return;const r=Ri(o),l=me(e),{mode:i}=l;if(s.isLeaving)return so(r);const c=Er(r);if(!c)return so(r);let a=xo(c,l,s,n,f=>a=f);c.type!==Ke&&Xn(c,a);let u=n.subTree&&Er(n.subTree);if(u&&u.type!==Ke&&!nn(c,u)&&Ei(n).type!==Ke){let f=xo(u,l,s,n);if(Xn(u,f),i==="out-in"&&c.type!==Ke)return s.isLeaving=!0,f.afterLeave=()=>{s.isLeaving=!1,n.job.flags&8||n.update(),delete f.afterLeave,u=void 0},so(r);i==="in-out"&&c.type!==Ke?f.delayLeave=(d,h,x)=>{const y=Mi(s,u);y[String(u.key)]=u,d[jt]=()=>{h(),d[jt]=void 0,delete a.delayedLeave,u=void 0},a.delayedLeave=()=>{x(),delete a.delayedLeave,u=void 0}}:u=void 0}else u&&(u=void 0);return r}}};function Ri(e){let t=e[0];if(e.length>1){for(const n of e)if(n.type!==Ke){t=n;break}}return t}const La=Oa;function Mi(e,t){const{leavingVNodes:n}=e;let s=n.get(t.type);return s||(s=Object.create(null),n.set(t.type,s)),s}function xo(e,t,n,s,o){const{appear:r,mode:l,persisted:i=!1,onBeforeEnter:c,onEnter:a,onAfterEnter:u,onEnterCancelled:f,onBeforeLeave:d,onLeave:h,onAfterLeave:x,onLeaveCancelled:y,onBeforeAppear:I,onAppear:w,onAfterAppear:v,onAppearCancelled:m}=t,_=String(e.key),S=Mi(n,e),k=(C,N)=>{C&&pt(C,s,9,N)},R=(C,N)=>{const q=N[1];k(C,N),oe(C)?C.every(H=>H.length<=1)&&q():C.length<=1&&q()},D={mode:l,persisted:i,beforeEnter(C){let N=c;if(!n.isMounted)if(r)N=I||c;else return;C[jt]&&C[jt](!0);const q=S[_];q&&nn(e,q)&&q.el[jt]&&q.el[jt](),k(N,[C])},enter(C){let N=a,q=u,H=f;if(!n.isMounted)if(r)N=w||a,q=v||u,H=m||f;else return;let Z=!1;const Y=C[vs]=ce=>{Z||(Z=!0,ce?k(H,[C]):k(q,[C]),D.delayedLeave&&D.delayedLeave(),C[vs]=void 0)};N?R(N,[C,Y]):Y()},leave(C,N){const q=String(e.key);if(C[vs]&&C[vs](!0),n.isUnmounting)return N();k(d,[C]);let H=!1;const Z=C[jt]=Y=>{H||(H=!0,N(),Y?k(y,[C]):k(x,[C]),C[jt]=void 0,S[q]===e&&delete S[q])};S[q]=e,h?R(h,[C,Z]):Z()},clone(C){const N=xo(C,t,n,s,o);return o&&o(N),N}};return D}function so(e){if(us(e))return e=Gt(e),e.children=null,e}function Er(e){if(!us(e))return wi(e.type)&&e.children?Ri(e.children):e;if(e.component)return e.component.subTree;const{shapeFlag:t,children:n}=e;if(n){if(t&16)return n[0];if(t&32&&ae(n.default))return n.default()}}function Xn(e,t){e.shapeFlag&6&&e.component?(e.transition=t,Xn(e.component.subTree,t)):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function Pi(e,t=!1,n){let s=[],o=0;for(let r=0;r<e.length;r++){let l=e[r];const i=n==null?l.key:String(n)+String(l.key!=null?l.key:r);l.type===we?(l.patchFlag&128&&o++,s=s.concat(Pi(l.children,t,i))):(t||l.type!==Ke)&&s.push(i!=null?Gt(l,{key:i}):l)}if(o>1)for(let r=0;r<s.length;r++)s[r].patchFlag=-2;return s}/*! #__NO_SIDE_EFFECTS__ */function _e(e,t){return ae(e)?(()=>Le({name:e.name},t,{setup:e}))():e}function Zo(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function Hn(e,t,n,s,o=!1){if(oe(e)){e.forEach((x,y)=>Hn(x,t&&(oe(t)?t[y]:t),n,s,o));return}if(bn(s)&&!o){s.shapeFlag&512&&s.type.__asyncResolved&&s.component.subTree.component&&Hn(e,t,n,s.component.subTree);return}const r=s.shapeFlag&4?zs(s.component):s.el,l=o?null:r,{i,r:c}=e,a=t&&t.r,u=i.refs===xe?i.refs={}:i.refs,f=i.setupState,d=me(f),h=f===xe?()=>!1:x=>be(d,x);if(a!=null&&a!==c&&(Ae(a)?(u[a]=null,h(a)&&(f[a]=null)):$e(a)&&(a.value=null)),ae(c))cs(c,i,12,[l,u]);else{const x=Ae(c),y=$e(c);if(x||y){const I=()=>{if(e.f){const w=x?h(c)?f[c]:u[c]:c.value;o?oe(w)&&Bo(w,r):oe(w)?w.includes(r)||w.push(r):x?(u[c]=[r],h(c)&&(f[c]=u[c])):(c.value=[r],e.k&&(u[e.k]=c.value))}else x?(u[c]=l,h(c)&&(f[c]=l)):y&&(c.value=l,e.k&&(u[e.k]=l))};l?(I.id=-1,Ge(I,n)):I()}}}const Rr=e=>e.nodeType===8;Ds().requestIdleCallback;Ds().cancelIdleCallback;function Da(e,t){if(Rr(e)&&e.data==="["){let n=1,s=e.nextSibling;for(;s;){if(s.nodeType===1){if(t(s)===!1)break}else if(Rr(s))if(s.data==="]"){if(--n===0)break}else s.data==="["&&n++;s=s.nextSibling}}else t(e)}const bn=e=>!!e.type.__asyncLoader;/*! #__NO_SIDE_EFFECTS__ */function Fa(e){ae(e)&&(e={loader:e});const{loader:t,loadingComponent:n,errorComponent:s,delay:o=200,hydrate:r,timeout:l,suspensible:i=!0,onError:c}=e;let a=null,u,f=0;const d=()=>(f++,a=null,h()),h=()=>{let x;return a||(x=a=t().catch(y=>{if(y=y instanceof Error?y:new Error(String(y)),c)return new Promise((I,w)=>{c(y,()=>I(d()),()=>w(y),f+1)});throw y}).then(y=>x!==a&&a?a:(y&&(y.__esModule||y[Symbol.toStringTag]==="Module")&&(y=y.default),u=y,y)))};return _e({name:"AsyncComponentWrapper",__asyncLoader:h,__asyncHydrate(x,y,I){let w=!1;(y.bu||(y.bu=[])).push(()=>w=!0);const v=()=>{w||I()},m=r?()=>{const _=r(v,S=>Da(x,S));_&&(y.bum||(y.bum=[])).push(_)}:v;u?m():h().then(()=>!y.isUnmounted&&m())},get __asyncResolved(){return u},setup(){const x=je;if(Zo(x),u)return()=>oo(u,x);const y=m=>{a=null,as(m,x,13,!s)};if(i&&x.suspense||xn)return h().then(m=>()=>oo(m,x)).catch(m=>(y(m),()=>s?re(s,{error:m}):null));const I=ne(!1),w=ne(),v=ne(!!o);return o&&setTimeout(()=>{v.value=!1},o),l!=null&&setTimeout(()=>{if(!I.value&&!w.value){const m=new Error(`Async component timed out after ${l}ms.`);y(m),w.value=m}},l),h().then(()=>{I.value=!0,x.parent&&us(x.parent.vnode)&&x.parent.update()}).catch(m=>{y(m),w.value=m}),()=>{if(I.value&&u)return oo(u,x);if(w.value&&s)return re(s,{error:w.value});if(n&&!v.value)return re(n)}}})}function oo(e,t){const{ref:n,props:s,children:o,ce:r}=t.vnode,l=re(e,s,o);return l.ref=n,l.ce=r,delete t.vnode.ce,l}const us=e=>e.type.__isKeepAlive;function Na(e,t){Ai(e,"a",t)}function Ha(e,t){Ai(e,"da",t)}function Ai(e,t,n=je){const s=e.__wdc||(e.__wdc=()=>{let o=n;for(;o;){if(o.isDeactivated)return;o=o.parent}return e()});if(Bs(t,s,n),n){let o=n.parent;for(;o&&o.parent;)us(o.parent.vnode)&&Ba(s,t,n,o),o=o.parent}}function Ba(e,t,n,s){const o=Bs(t,e,s,!0);kn(()=>{Bo(s[t],o)},n)}function Bs(e,t,n=je,s=!1){if(n){const o=n[e]||(n[e]=[]),r=t.__weh||(t.__weh=(...l)=>{$t();const i=fs(n),c=pt(t,n,e,l);return i(),Tt(),c});return s?o.unshift(r):o.push(r),r}}const Lt=e=>(t,n=je)=>{(!xn||e==="sp")&&Bs(e,(...s)=>t(...s),n)},ja=Lt("bm"),Qe=Lt("m"),Ii=Lt("bu"),Va=Lt("u"),Rn=Lt("bum"),kn=Lt("um"),Wa=Lt("sp"),Ua=Lt("rtg"),za=Lt("rtc");function Ka(e,t=je){Bs("ec",e,t)}const Xo="components";function $i(e,t){return Oi(Xo,e,!0,t)||e}const Ti=Symbol.for("v-ndc");function Qo(e){return Ae(e)?Oi(Xo,e,!1)||e:e||Ti}function Oi(e,t,n=!0,s=!1){const o=Ve||je;if(o){const r=o.type;if(e===Xo){const i=Iu(r,!1);if(i&&(i===t||i===rt(t)||i===Ls(rt(t))))return r}const l=Mr(o[e]||r[e],t)||Mr(o.appContext[e],t);return!l&&s?r:l}}function Mr(e,t){return e&&(e[t]||e[rt(t)]||e[Ls(rt(t))])}function Mn(e,t,n,s){let o;const r=n&&n[s],l=oe(e);if(l||Ae(e)){const i=l&&zt(e);let c=!1,a=!1;i&&(c=!ot(e),a=qt(e),e=Ns(e)),o=new Array(e.length);for(let u=0,f=e.length;u<f;u++)o[u]=t(c?a?xs(Be(e[u])):Be(e[u]):e[u],u,void 0,r&&r[u])}else if(typeof e=="number"){o=new Array(e);for(let i=0;i<e;i++)o[i]=t(i+1,i,void 0,r&&r[i])}else if(Ee(e))if(e[Symbol.iterator])o=Array.from(e,(i,c)=>t(i,c,void 0,r&&r[c]));else{const i=Object.keys(e);o=new Array(i.length);for(let c=0,a=i.length;c<a;c++){const u=i[c];o[c]=t(e[u],u,c,r&&r[c])}}else o=[];return n&&(n[s]=o),o}function Li(e,t){for(let n=0;n<t.length;n++){const s=t[n];if(oe(s))for(let o=0;o<s.length;o++)e[s[o].name]=s[o].fn;else s&&(e[s.name]=s.key?(...o)=>{const r=s.fn(...o);return r&&(r.key=s.key),r}:s.fn)}return e}function Fe(e,t,n={},s,o){if(Ve.ce||Ve.parent&&bn(Ve.parent)&&Ve.parent.ce)return t!=="default"&&(n.name=t),$(),pe(we,null,[re("slot",n,s&&s())],64);let r=e[t];r&&r._c&&(r._d=!1),$();const l=r&&Di(r(n)),i=n.key||l&&l.key,c=pe(we,{key:(i&&!dt(i)?i:`_${t}`)+(!l&&s?"_fb":"")},l||(s?s():[]),l&&e._===1?64:-2);return!o&&c.scopeId&&(c.slotScopeIds=[c.scopeId+"-s"]),r&&r._c&&(r._d=!0),c}function Di(e){return e.some(t=>es(t)?!(t.type===Ke||t.type===we&&!Di(t.children)):!0)?e:null}const So=e=>e?tc(e)?zs(e):So(e.parent):null,Bn=Le(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>So(e.parent),$root:e=>So(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>er(e),$forceUpdate:e=>e.f||(e.f=()=>{Yo(e.update)}),$nextTick:e=>e.n||(e.n=Ze.bind(e.proxy)),$watch:e=>gu.bind(e)}),ro=(e,t)=>e!==xe&&!e.__isScriptSetup&&be(e,t),qa={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:s,data:o,props:r,accessCache:l,type:i,appContext:c}=e;let a;if(t[0]!=="$"){const h=l[t];if(h!==void 0)switch(h){case 1:return s[t];case 2:return o[t];case 4:return n[t];case 3:return r[t]}else{if(ro(s,t))return l[t]=1,s[t];if(o!==xe&&be(o,t))return l[t]=2,o[t];if((a=e.propsOptions[0])&&be(a,t))return l[t]=3,r[t];if(n!==xe&&be(n,t))return l[t]=4,n[t];Eo&&(l[t]=0)}}const u=Bn[t];let f,d;if(u)return t==="$attrs"&&ze(e.attrs,"get",""),u(e);if((f=i.__cssModules)&&(f=f[t]))return f;if(n!==xe&&be(n,t))return l[t]=4,n[t];if(d=c.config.globalProperties,be(d,t))return d[t]},set({_:e},t,n){const{data:s,setupState:o,ctx:r}=e;return ro(o,t)?(o[t]=n,!0):s!==xe&&be(s,t)?(s[t]=n,!0):be(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(r[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:s,appContext:o,propsOptions:r}},l){let i;return!!n[l]||e!==xe&&be(e,l)||ro(t,l)||(i=r[0])&&be(i,l)||be(s,l)||be(Bn,l)||be(o.config.globalProperties,l)},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:be(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function Fi(){return Ga().slots}function Ga(e){const t=Us();return t.setupContext||(t.setupContext=sc(t))}function Pr(e){return oe(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}let Eo=!0;function Ja(e){const t=er(e),n=e.proxy,s=e.ctx;Eo=!1,t.beforeCreate&&Ar(t.beforeCreate,e,"bc");const{data:o,computed:r,methods:l,watch:i,provide:c,inject:a,created:u,beforeMount:f,mounted:d,beforeUpdate:h,updated:x,activated:y,deactivated:I,beforeDestroy:w,beforeUnmount:v,destroyed:m,unmounted:_,render:S,renderTracked:k,renderTriggered:R,errorCaptured:D,serverPrefetch:C,expose:N,inheritAttrs:q,components:H,directives:Z,filters:Y}=t;if(a&&Ya(a,s,null),l)for(const ee in l){const ue=l[ee];ae(ue)&&(s[ee]=ue.bind(n))}if(o){const ee=o.call(n,n);Ee(ee)&&(e.data=Ct(ee))}if(Eo=!0,r)for(const ee in r){const ue=r[ee],Te=ae(ue)?ue.bind(n,n):ae(ue.get)?ue.get.bind(n,n):at,He=!ae(ue)&&ae(ue.set)?ue.set.bind(n):at,fe=ve({get:Te,set:He});Object.defineProperty(s,ee,{enumerable:!0,configurable:!0,get:()=>fe.value,set:Oe=>fe.value=Oe})}if(i)for(const ee in i)Ni(i[ee],s,n,ee);if(c){const ee=ae(c)?c.call(n):c;Reflect.ownKeys(ee).forEach(ue=>{Je(ue,ee[ue])})}u&&Ar(u,e,"c");function ie(ee,ue){oe(ue)?ue.forEach(Te=>ee(Te.bind(n))):ue&&ee(ue.bind(n))}if(ie(ja,f),ie(Qe,d),ie(Ii,h),ie(Va,x),ie(Na,y),ie(Ha,I),ie(Ka,D),ie(za,k),ie(Ua,R),ie(Rn,v),ie(kn,_),ie(Wa,C),oe(N))if(N.length){const ee=e.exposed||(e.exposed={});N.forEach(ue=>{Object.defineProperty(ee,ue,{get:()=>n[ue],set:Te=>n[ue]=Te,enumerable:!0})})}else e.exposed||(e.exposed={});S&&e.render===at&&(e.render=S),q!=null&&(e.inheritAttrs=q),H&&(e.components=H),Z&&(e.directives=Z),C&&Zo(e)}function Ya(e,t,n=at){oe(e)&&(e=Ro(e));for(const s in e){const o=e[s];let r;Ee(o)?"default"in o?r=Se(o.from||s,o.default,!0):r=Se(o.from||s):r=Se(o),$e(r)?Object.defineProperty(t,s,{enumerable:!0,configurable:!0,get:()=>r.value,set:l=>r.value=l}):t[s]=r}}function Ar(e,t,n){pt(oe(e)?e.map(s=>s.bind(t.proxy)):e.bind(t.proxy),t,n)}function Ni(e,t,n,s){let o=s.includes(".")?Ji(n,s):()=>n[s];if(Ae(e)){const r=t[e];ae(r)&&It(o,r)}else if(ae(e))It(o,e.bind(n));else if(Ee(e))if(oe(e))e.forEach(r=>Ni(r,t,n,s));else{const r=ae(e.handler)?e.handler.bind(n):t[e.handler];ae(r)&&It(o,r,e)}}function er(e){const t=e.type,{mixins:n,extends:s}=t,{mixins:o,optionsCache:r,config:{optionMergeStrategies:l}}=e.appContext,i=r.get(t);let c;return i?c=i:!o.length&&!n&&!s?c=t:(c={},o.length&&o.forEach(a=>Ms(c,a,l,!0)),Ms(c,t,l)),Ee(t)&&r.set(t,c),c}function Ms(e,t,n,s=!1){const{mixins:o,extends:r}=t;r&&Ms(e,r,n,!0),o&&o.forEach(l=>Ms(e,l,n,!0));for(const l in t)if(!(s&&l==="expose")){const i=Za[l]||n&&n[l];e[l]=i?i(e[l],t[l]):t[l]}return e}const Za={data:Ir,props:$r,emits:$r,methods:Tn,computed:Tn,beforeCreate:qe,created:qe,beforeMount:qe,mounted:qe,beforeUpdate:qe,updated:qe,beforeDestroy:qe,beforeUnmount:qe,destroyed:qe,unmounted:qe,activated:qe,deactivated:qe,errorCaptured:qe,serverPrefetch:qe,components:Tn,directives:Tn,watch:Qa,provide:Ir,inject:Xa};function Ir(e,t){return t?e?function(){return Le(ae(e)?e.call(this,this):e,ae(t)?t.call(this,this):t)}:t:e}function Xa(e,t){return Tn(Ro(e),Ro(t))}function Ro(e){if(oe(e)){const t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function qe(e,t){return e?[...new Set([].concat(e,t))]:t}function Tn(e,t){return e?Le(Object.create(null),e,t):t}function $r(e,t){return e?oe(e)&&oe(t)?[...new Set([...e,...t])]:Le(Object.create(null),Pr(e),Pr(t??{})):t}function Qa(e,t){if(!e)return t;if(!t)return e;const n=Le(Object.create(null),e);for(const s in t)n[s]=qe(e[s],t[s]);return n}function Hi(){return{app:null,config:{isNativeTag:jc,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 eu=0;function tu(e,t){return function(s,o=null){ae(s)||(s=Le({},s)),o!=null&&!Ee(o)&&(o=null);const r=Hi(),l=new WeakSet,i=[];let c=!1;const a=r.app={_uid:eu++,_component:s,_props:o,_container:null,_context:r,_instance:null,version:Tu,get config(){return r.config},set config(u){},use(u,...f){return l.has(u)||(u&&ae(u.install)?(l.add(u),u.install(a,...f)):ae(u)&&(l.add(u),u(a,...f))),a},mixin(u){return r.mixins.includes(u)||r.mixins.push(u),a},component(u,f){return f?(r.components[u]=f,a):r.components[u]},directive(u,f){return f?(r.directives[u]=f,a):r.directives[u]},mount(u,f,d){if(!c){const h=a._ceVNode||re(s,o);return h.appContext=r,d===!0?d="svg":d===!1&&(d=void 0),f&&t?t(h,u):e(h,u,d),c=!0,a._container=u,u.__vue_app__=a,zs(h.component)}},onUnmount(u){i.push(u)},unmount(){c&&(pt(i,a._instance,16),e(null,a._container),delete a._container.__vue_app__)},provide(u,f){return r.provides[u]=f,a},runWithContext(u){const f=ln;ln=a;try{return u()}finally{ln=f}}};return a}}let ln=null;function Je(e,t){if(je){let n=je.provides;const s=je.parent&&je.parent.provides;s===n&&(n=je.provides=Object.create(s)),n[e]=t}}function Se(e,t,n=!1){const s=Us();if(s||ln){let o=ln?ln._context.provides:s?s.parent==null||s.ce?s.vnode.appContext&&s.vnode.appContext.provides:s.parent.provides:void 0;if(o&&e in o)return o[e];if(arguments.length>1)return n&&ae(t)?t.call(s&&s.proxy):t}}function nu(){return!!(Us()||ln)}const Bi={},ji=()=>Object.create(Bi),Vi=e=>Object.getPrototypeOf(e)===Bi;function su(e,t,n,s=!1){const o={},r=ji();e.propsDefaults=Object.create(null),Wi(e,t,o,r);for(const l in e.propsOptions[0])l in o||(o[l]=void 0);n?e.props=s?o:fi(o):e.type.props?e.props=o:e.props=r,e.attrs=r}function ou(e,t,n,s){const{props:o,attrs:r,vnode:{patchFlag:l}}=e,i=me(o),[c]=e.propsOptions;let a=!1;if((s||l>0)&&!(l&16)){if(l&8){const u=e.vnode.dynamicProps;for(let f=0;f<u.length;f++){let d=u[f];if(js(e.emitsOptions,d))continue;const h=t[d];if(c)if(be(r,d))h!==r[d]&&(r[d]=h,a=!0);else{const x=rt(d);o[x]=Mo(c,i,x,h,e,!1)}else h!==r[d]&&(r[d]=h,a=!0)}}}else{Wi(e,t,o,r)&&(a=!0);let u;for(const f in i)(!t||!be(t,f)&&((u=Jt(f))===f||!be(t,u)))&&(c?n&&(n[f]!==void 0||n[u]!==void 0)&&(o[f]=Mo(c,i,f,void 0,e,!0)):delete o[f]);if(r!==i)for(const f in r)(!t||!be(t,f))&&(delete r[f],a=!0)}a&&Mt(e.attrs,"set","")}function Wi(e,t,n,s){const[o,r]=e.propsOptions;let l=!1,i;if(t)for(let c in t){if(Ln(c))continue;const a=t[c];let u;o&&be(o,u=rt(c))?!r||!r.includes(u)?n[u]=a:(i||(i={}))[u]=a:js(e.emitsOptions,c)||(!(c in s)||a!==s[c])&&(s[c]=a,l=!0)}if(r){const c=me(n),a=i||xe;for(let u=0;u<r.length;u++){const f=r[u];n[f]=Mo(o,c,f,a[f],e,!be(a,f))}}return l}function Mo(e,t,n,s,o,r){const l=e[n];if(l!=null){const i=be(l,"default");if(i&&s===void 0){const c=l.default;if(l.type!==Function&&!l.skipFactory&&ae(c)){const{propsDefaults:a}=o;if(n in a)s=a[n];else{const u=fs(o);s=a[n]=c.call(null,t),u()}}else s=c;o.ce&&o.ce._setProp(n,s)}l[0]&&(r&&!i?s=!1:l[1]&&(s===""||s===Jt(n))&&(s=!0))}return s}const ru=new WeakMap;function Ui(e,t,n=!1){const s=n?ru:t.propsCache,o=s.get(e);if(o)return o;const r=e.props,l={},i=[];let c=!1;if(!ae(e)){const u=f=>{c=!0;const[d,h]=Ui(f,t,!0);Le(l,d),h&&i.push(...h)};!n&&t.mixins.length&&t.mixins.forEach(u),e.extends&&u(e.extends),e.mixins&&e.mixins.forEach(u)}if(!r&&!c)return Ee(e)&&s.set(e,vn),vn;if(oe(r))for(let u=0;u<r.length;u++){const f=rt(r[u]);Tr(f)&&(l[f]=xe)}else if(r)for(const u in r){const f=rt(u);if(Tr(f)){const d=r[u],h=l[f]=oe(d)||ae(d)?{type:d}:Le({},d),x=h.type;let y=!1,I=!0;if(oe(x))for(let w=0;w<x.length;++w){const v=x[w],m=ae(v)&&v.name;if(m==="Boolean"){y=!0;break}else m==="String"&&(I=!1)}else y=ae(x)&&x.name==="Boolean";h[0]=y,h[1]=I,(y||be(h,"default"))&&i.push(f)}}const a=[l,i];return Ee(e)&&s.set(e,a),a}function Tr(e){return e[0]!=="$"&&!Ln(e)}const tr=e=>e==="_"||e==="__"||e==="_ctx"||e==="$stable",nr=e=>oe(e)?e.map(yt):[yt(e)],lu=(e,t,n)=>{if(t._n)return t;const s=ft((...o)=>nr(t(...o)),n);return s._c=!1,s},zi=(e,t,n)=>{const s=e._ctx;for(const o in e){if(tr(o))continue;const r=e[o];if(ae(r))t[o]=lu(o,r,s);else if(r!=null){const l=nr(r);t[o]=()=>l}}},Ki=(e,t)=>{const n=nr(t);e.slots.default=()=>n},qi=(e,t,n)=>{for(const s in t)(n||!tr(s))&&(e[s]=t[s])},iu=(e,t,n)=>{const s=e.slots=ji();if(e.vnode.shapeFlag&32){const o=t.__;o&&_o(s,"__",o,!0);const r=t._;r?(qi(s,t,n),n&&_o(s,"_",r,!0)):zi(t,s)}else t&&Ki(e,t)},cu=(e,t,n)=>{const{vnode:s,slots:o}=e;let r=!0,l=xe;if(s.shapeFlag&32){const i=t._;i?n&&i===1?r=!1:qi(o,t,n):(r=!t.$stable,zi(t,o)),l=t}else t&&(Ki(e,t),l={default:1});if(r)for(const i in o)!tr(i)&&l[i]==null&&delete o[i]},Ge=Cu;function au(e){return uu(e)}function uu(e,t){const n=Ds();n.__VUE__=!0;const{insert:s,remove:o,patchProp:r,createElement:l,createText:i,createComment:c,setText:a,setElementText:u,parentNode:f,nextSibling:d,setScopeId:h=at,insertStaticContent:x}=e,y=(p,g,E,T=null,P=null,O=null,U=void 0,V=null,j=!!g.dynamicChildren)=>{if(p===g)return;p&&!nn(p,g)&&(T=b(p),Oe(p,P,O,!0),p=null),g.patchFlag===-2&&(j=!1,g.dynamicChildren=null);const{type:F,ref:se,shapeFlag:z}=g;switch(F){case Vs:I(p,g,E,T);break;case Ke:w(p,g,E,T);break;case co:p==null&&v(g,E,T,U);break;case we:H(p,g,E,T,P,O,U,V,j);break;default:z&1?S(p,g,E,T,P,O,U,V,j):z&6?Z(p,g,E,T,P,O,U,V,j):(z&64||z&128)&&F.process(p,g,E,T,P,O,U,V,j,W)}se!=null&&P?Hn(se,p&&p.ref,O,g||p,!g):se==null&&p&&p.ref!=null&&Hn(p.ref,null,O,p,!0)},I=(p,g,E,T)=>{if(p==null)s(g.el=i(g.children),E,T);else{const P=g.el=p.el;g.children!==p.children&&a(P,g.children)}},w=(p,g,E,T)=>{p==null?s(g.el=c(g.children||""),E,T):g.el=p.el},v=(p,g,E,T)=>{[p.el,p.anchor]=x(p.children,g,E,T,p.el,p.anchor)},m=({el:p,anchor:g},E,T)=>{let P;for(;p&&p!==g;)P=d(p),s(p,E,T),p=P;s(g,E,T)},_=({el:p,anchor:g})=>{let E;for(;p&&p!==g;)E=d(p),o(p),p=E;o(g)},S=(p,g,E,T,P,O,U,V,j)=>{g.type==="svg"?U="svg":g.type==="math"&&(U="mathml"),p==null?k(g,E,T,P,O,U,V,j):C(p,g,P,O,U,V,j)},k=(p,g,E,T,P,O,U,V)=>{let j,F;const{props:se,shapeFlag:z,transition:X,dirs:le}=p;if(j=p.el=l(p.type,O,se&&se.is,se),z&8?u(j,p.children):z&16&&D(p.children,j,null,T,P,lo(p,O),U,V),le&&Zt(p,null,T,"created"),R(j,p,p.scopeId,U,T),se){for(const Re in se)Re!=="value"&&!Ln(Re)&&r(j,Re,null,se[Re],O,T);"value"in se&&r(j,"value",null,se.value,O),(F=se.onVnodeBeforeMount)&&mt(F,T,p)}le&&Zt(p,null,T,"beforeMount");const ge=fu(P,X);ge&&X.beforeEnter(j),s(j,g,E),((F=se&&se.onVnodeMounted)||ge||le)&&Ge(()=>{F&&mt(F,T,p),ge&&X.enter(j),le&&Zt(p,null,T,"mounted")},P)},R=(p,g,E,T,P)=>{if(E&&h(p,E),T)for(let O=0;O<T.length;O++)h(p,T[O]);if(P){let O=P.subTree;if(g===O||Zi(O.type)&&(O.ssContent===g||O.ssFallback===g)){const U=P.vnode;R(p,U,U.scopeId,U.slotScopeIds,P.parent)}}},D=(p,g,E,T,P,O,U,V,j=0)=>{for(let F=j;F<p.length;F++){const se=p[F]=V?Vt(p[F]):yt(p[F]);y(null,se,g,E,T,P,O,U,V)}},C=(p,g,E,T,P,O,U)=>{const V=g.el=p.el;let{patchFlag:j,dynamicChildren:F,dirs:se}=g;j|=p.patchFlag&16;const z=p.props||xe,X=g.props||xe;let le;if(E&&Xt(E,!1),(le=X.onVnodeBeforeUpdate)&&mt(le,E,g,p),se&&Zt(g,p,E,"beforeUpdate"),E&&Xt(E,!0),(z.innerHTML&&X.innerHTML==null||z.textContent&&X.textContent==null)&&u(V,""),F?N(p.dynamicChildren,F,V,E,T,lo(g,P),O):U||ue(p,g,V,null,E,T,lo(g,P),O,!1),j>0){if(j&16)q(V,z,X,E,P);else if(j&2&&z.class!==X.class&&r(V,"class",null,X.class,P),j&4&&r(V,"style",z.style,X.style,P),j&8){const ge=g.dynamicProps;for(let Re=0;Re<ge.length;Re++){const Ce=ge[Re],Xe=z[Ce],We=X[Ce];(We!==Xe||Ce==="value")&&r(V,Ce,Xe,We,P,E)}}j&1&&p.children!==g.children&&u(V,g.children)}else!U&&F==null&&q(V,z,X,E,P);((le=X.onVnodeUpdated)||se)&&Ge(()=>{le&&mt(le,E,g,p),se&&Zt(g,p,E,"updated")},T)},N=(p,g,E,T,P,O,U)=>{for(let V=0;V<g.length;V++){const j=p[V],F=g[V],se=j.el&&(j.type===we||!nn(j,F)||j.shapeFlag&198)?f(j.el):E;y(j,F,se,null,T,P,O,U,!0)}},q=(p,g,E,T,P)=>{if(g!==E){if(g!==xe)for(const O in g)!Ln(O)&&!(O in E)&&r(p,O,g[O],null,P,T);for(const O in E){if(Ln(O))continue;const U=E[O],V=g[O];U!==V&&O!=="value"&&r(p,O,V,U,P,T)}"value"in E&&r(p,"value",g.value,E.value,P)}},H=(p,g,E,T,P,O,U,V,j)=>{const F=g.el=p?p.el:i(""),se=g.anchor=p?p.anchor:i("");let{patchFlag:z,dynamicChildren:X,slotScopeIds:le}=g;le&&(V=V?V.concat(le):le),p==null?(s(F,E,T),s(se,E,T),D(g.children||[],E,se,P,O,U,V,j)):z>0&&z&64&&X&&p.dynamicChildren?(N(p.dynamicChildren,X,E,P,O,U,V),(g.key!=null||P&&g===P.subTree)&&sr(p,g,!0)):ue(p,g,E,se,P,O,U,V,j)},Z=(p,g,E,T,P,O,U,V,j)=>{g.slotScopeIds=V,p==null?g.shapeFlag&512?P.ctx.activate(g,E,T,U,j):Y(g,E,T,P,O,U,j):ce(p,g,j)},Y=(p,g,E,T,P,O,U)=>{const V=p.component=Ru(p,T,P);if(us(p)&&(V.ctx.renderer=W),Mu(V,!1,U),V.asyncDep){if(P&&P.registerDep(V,ie,U),!p.el){const j=V.subTree=re(Ke);w(null,j,g,E),p.placeholder=j.el}}else ie(V,p,g,E,P,O,U)},ce=(p,g,E)=>{const T=g.component=p.component;if(bu(p,g,E))if(T.asyncDep&&!T.asyncResolved){ee(T,g,E);return}else T.next=g,T.update();else g.el=p.el,T.vnode=g},ie=(p,g,E,T,P,O,U)=>{const V=()=>{if(p.isMounted){let{next:z,bu:X,u:le,parent:ge,vnode:Re}=p;{const et=Gi(p);if(et){z&&(z.el=Re.el,ee(p,z,U)),et.asyncDep.then(()=>{p.isUnmounted||V()});return}}let Ce=z,Xe;Xt(p,!1),z?(z.el=Re.el,ee(p,z,U)):z=Re,X&&_s(X),(Xe=z.props&&z.props.onVnodeBeforeUpdate)&&mt(Xe,ge,z,Re),Xt(p,!0);const We=io(p),ct=p.subTree;p.subTree=We,y(ct,We,f(ct.el),b(ct),p,P,O),z.el=We.el,Ce===null&&wu(p,We.el),le&&Ge(le,P),(Xe=z.props&&z.props.onVnodeUpdated)&&Ge(()=>mt(Xe,ge,z,Re),P)}else{let z;const{el:X,props:le}=g,{bm:ge,m:Re,parent:Ce,root:Xe,type:We}=p,ct=bn(g);if(Xt(p,!1),ge&&_s(ge),!ct&&(z=le&&le.onVnodeBeforeMount)&&mt(z,Ce,g),Xt(p,!0),X&&ke){const et=()=>{p.subTree=io(p),ke(X,p.subTree,p,P,null)};ct&&We.__asyncHydrate?We.__asyncHydrate(X,p,et):et()}else{Xe.ce&&Xe.ce._def.shadowRoot!==!1&&Xe.ce._injectChildStyle(We);const et=p.subTree=io(p);y(null,et,E,T,p,P,O),g.el=et.el}if(Re&&Ge(Re,P),!ct&&(z=le&&le.onVnodeMounted)){const et=g;Ge(()=>mt(z,Ce,et),P)}(g.shapeFlag&256||Ce&&bn(Ce.vnode)&&Ce.vnode.shapeFlag&256)&&p.a&&Ge(p.a,P),p.isMounted=!0,g=E=T=null}};p.scope.on();const j=p.effect=new Zl(V);p.scope.off();const F=p.update=j.run.bind(j),se=p.job=j.runIfDirty.bind(j);se.i=p,se.id=p.uid,j.scheduler=()=>Yo(se),Xt(p,!0),F()},ee=(p,g,E)=>{g.component=p;const T=p.vnode.props;p.vnode=g,p.next=null,ou(p,g.props,T,E),cu(p,g.children,E),$t(),Cr(p),Tt()},ue=(p,g,E,T,P,O,U,V,j=!1)=>{const F=p&&p.children,se=p?p.shapeFlag:0,z=g.children,{patchFlag:X,shapeFlag:le}=g;if(X>0){if(X&128){He(F,z,E,T,P,O,U,V,j);return}else if(X&256){Te(F,z,E,T,P,O,U,V,j);return}}le&8?(se&16&&Q(F,P,O),z!==F&&u(E,z)):se&16?le&16?He(F,z,E,T,P,O,U,V,j):Q(F,P,O,!0):(se&8&&u(E,""),le&16&&D(z,E,T,P,O,U,V,j))},Te=(p,g,E,T,P,O,U,V,j)=>{p=p||vn,g=g||vn;const F=p.length,se=g.length,z=Math.min(F,se);let X;for(X=0;X<z;X++){const le=g[X]=j?Vt(g[X]):yt(g[X]);y(p[X],le,E,null,P,O,U,V,j)}F>se?Q(p,P,O,!0,!1,z):D(g,E,T,P,O,U,V,j,z)},He=(p,g,E,T,P,O,U,V,j)=>{let F=0;const se=g.length;let z=p.length-1,X=se-1;for(;F<=z&&F<=X;){const le=p[F],ge=g[F]=j?Vt(g[F]):yt(g[F]);if(nn(le,ge))y(le,ge,E,null,P,O,U,V,j);else break;F++}for(;F<=z&&F<=X;){const le=p[z],ge=g[X]=j?Vt(g[X]):yt(g[X]);if(nn(le,ge))y(le,ge,E,null,P,O,U,V,j);else break;z--,X--}if(F>z){if(F<=X){const le=X+1,ge=le<se?g[le].el:T;for(;F<=X;)y(null,g[F]=j?Vt(g[F]):yt(g[F]),E,ge,P,O,U,V,j),F++}}else if(F>X)for(;F<=z;)Oe(p[F],P,O,!0),F++;else{const le=F,ge=F,Re=new Map;for(F=ge;F<=X;F++){const tt=g[F]=j?Vt(g[F]):yt(g[F]);tt.key!=null&&Re.set(tt.key,F)}let Ce,Xe=0;const We=X-ge+1;let ct=!1,et=0;const Pn=new Array(We);for(F=0;F<We;F++)Pn[F]=0;for(F=le;F<=z;F++){const tt=p[F];if(Xe>=We){Oe(tt,P,O,!0);continue}let gt;if(tt.key!=null)gt=Re.get(tt.key);else for(Ce=ge;Ce<=X;Ce++)if(Pn[Ce-ge]===0&&nn(tt,g[Ce])){gt=Ce;break}gt===void 0?Oe(tt,P,O,!0):(Pn[gt-ge]=F+1,gt>=et?et=gt:ct=!0,y(tt,g[gt],E,null,P,O,U,V,j),Xe++)}const gr=ct?du(Pn):vn;for(Ce=gr.length-1,F=We-1;F>=0;F--){const tt=ge+F,gt=g[tt],mr=g[tt+1],vr=tt+1<se?mr.el||mr.placeholder:T;Pn[F]===0?y(null,gt,E,vr,P,O,U,V,j):ct&&(Ce<0||F!==gr[Ce]?fe(gt,E,vr,2):Ce--)}}},fe=(p,g,E,T,P=null)=>{const{el:O,type:U,transition:V,children:j,shapeFlag:F}=p;if(F&6){fe(p.component.subTree,g,E,T);return}if(F&128){p.suspense.move(g,E,T);return}if(F&64){U.move(p,g,E,W);return}if(U===we){s(O,g,E);for(let z=0;z<j.length;z++)fe(j[z],g,E,T);s(p.anchor,g,E);return}if(U===co){m(p,g,E);return}if(T!==2&&F&1&&V)if(T===0)V.beforeEnter(O),s(O,g,E),Ge(()=>V.enter(O),P);else{const{leave:z,delayLeave:X,afterLeave:le}=V,ge=()=>{p.ctx.isUnmounted?o(O):s(O,g,E)},Re=()=>{z(O,()=>{ge(),le&&le()})};X?X(O,ge,Re):Re()}else s(O,g,E)},Oe=(p,g,E,T=!1,P=!1)=>{const{type:O,props:U,ref:V,children:j,dynamicChildren:F,shapeFlag:se,patchFlag:z,dirs:X,cacheIndex:le}=p;if(z===-2&&(P=!1),V!=null&&($t(),Hn(V,null,E,p,!0),Tt()),le!=null&&(g.renderCache[le]=void 0),se&256){g.ctx.deactivate(p);return}const ge=se&1&&X,Re=!bn(p);let Ce;if(Re&&(Ce=U&&U.onVnodeBeforeUnmount)&&mt(Ce,g,p),se&6)L(p.component,E,T);else{if(se&128){p.suspense.unmount(E,T);return}ge&&Zt(p,null,g,"beforeUnmount"),se&64?p.type.remove(p,g,E,W,T):F&&!F.hasOnce&&(O!==we||z>0&&z&64)?Q(F,g,E,!1,!0):(O===we&&z&384||!P&&se&16)&&Q(j,g,E),T&&it(p)}(Re&&(Ce=U&&U.onVnodeUnmounted)||ge)&&Ge(()=>{Ce&&mt(Ce,g,p),ge&&Zt(p,null,g,"unmounted")},E)},it=p=>{const{type:g,el:E,anchor:T,transition:P}=p;if(g===we){J(E,T);return}if(g===co){_(p);return}const O=()=>{o(E),P&&!P.persisted&&P.afterLeave&&P.afterLeave()};if(p.shapeFlag&1&&P&&!P.persisted){const{leave:U,delayLeave:V}=P,j=()=>U(E,O);V?V(p.el,O,j):j()}else O()},J=(p,g)=>{let E;for(;p!==g;)E=d(p),o(p),p=E;o(g)},L=(p,g,E)=>{const{bum:T,scope:P,job:O,subTree:U,um:V,m:j,a:F,parent:se,slots:{__:z}}=p;Or(j),Or(F),T&&_s(T),se&&oe(z)&&z.forEach(X=>{se.renderCache[X]=void 0}),P.stop(),O&&(O.flags|=8,Oe(U,p,g,E)),V&&Ge(V,g),Ge(()=>{p.isUnmounted=!0},g),g&&g.pendingBranch&&!g.isUnmounted&&p.asyncDep&&!p.asyncResolved&&p.suspenseId===g.pendingId&&(g.deps--,g.deps===0&&g.resolve())},Q=(p,g,E,T=!1,P=!1,O=0)=>{for(let U=O;U<p.length;U++)Oe(p[U],g,E,T,P)},b=p=>{if(p.shapeFlag&6)return b(p.component.subTree);if(p.shapeFlag&128)return p.suspense.next();const g=d(p.anchor||p.el),E=g&&g[bi];return E?d(E):g};let K=!1;const B=(p,g,E)=>{p==null?g._vnode&&Oe(g._vnode,null,null,!0):y(g._vnode||null,p,g,null,null,null,E),g._vnode=p,K||(K=!0,Cr(),vi(),K=!1)},W={p:y,um:Oe,m:fe,r:it,mt:Y,mc:D,pc:ue,pbc:N,n:b,o:e};let de,ke;return t&&([de,ke]=t(W)),{render:B,hydrate:de,createApp:tu(B,de)}}function lo({type:e,props:t},n){return n==="svg"&&e==="foreignObject"||n==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function Xt({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function fu(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function sr(e,t,n=!1){const s=e.children,o=t.children;if(oe(s)&&oe(o))for(let r=0;r<s.length;r++){const l=s[r];let i=o[r];i.shapeFlag&1&&!i.dynamicChildren&&((i.patchFlag<=0||i.patchFlag===32)&&(i=o[r]=Vt(o[r]),i.el=l.el),!n&&i.patchFlag!==-2&&sr(l,i)),i.type===Vs&&(i.el=l.el),i.type===Ke&&!i.el&&(i.el=l.el)}}function du(e){const t=e.slice(),n=[0];let s,o,r,l,i;const c=e.length;for(s=0;s<c;s++){const a=e[s];if(a!==0){if(o=n[n.length-1],e[o]<a){t[s]=o,n.push(s);continue}for(r=0,l=n.length-1;r<l;)i=r+l>>1,e[n[i]]<a?r=i+1:l=i;a<e[n[r]]&&(r>0&&(t[s]=n[r-1]),n[r]=s)}}for(r=n.length,l=n[r-1];r-- >0;)n[r]=l,l=t[l];return n}function Gi(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:Gi(t)}function Or(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}const pu=Symbol.for("v-scx"),hu=()=>Se(pu);function Ot(e,t){return or(e,null,t)}function It(e,t,n){return or(e,t,n)}function or(e,t,n=xe){const{immediate:s,deep:o,flush:r,once:l}=n,i=Le({},n),c=t&&s||!t&&r!=="post";let a;if(xn){if(r==="sync"){const h=hu();a=h.__watcherHandles||(h.__watcherHandles=[])}else if(!c){const h=()=>{};return h.stop=at,h.resume=at,h.pause=at,h}}const u=je;i.call=(h,x,y)=>pt(h,u,x,y);let f=!1;r==="post"?i.scheduler=h=>{Ge(h,u&&u.suspense)}:r!=="sync"&&(f=!0,i.scheduler=(h,x)=>{x?h():Yo(h)}),i.augmentJob=h=>{t&&(h.flags|=4),f&&(h.flags|=2,u&&(h.id=u.uid,h.i=u))};const d=Ma(e,t,i);return xn&&(a?a.push(d):c&&d()),d}function gu(e,t,n){const s=this.proxy,o=Ae(e)?e.includes(".")?Ji(s,e):()=>s[e]:e.bind(s,s);let r;ae(t)?r=t:(r=t.handler,n=t);const l=fs(this),i=or(o,r.bind(s),n);return l(),i}function Ji(e,t){const n=t.split(".");return()=>{let s=e;for(let o=0;o<n.length&&s;o++)s=s[n[o]];return s}}const mu=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${rt(t)}Modifiers`]||e[`${Jt(t)}Modifiers`];function vu(e,t,...n){if(e.isUnmounted)return;const s=e.vnode.props||xe;let o=n;const r=t.startsWith("update:"),l=r&&mu(s,t.slice(7));l&&(l.trim&&(o=n.map(u=>Ae(u)?u.trim():u)),l.number&&(o=n.map(yo)));let i,c=s[i=Xs(t)]||s[i=Xs(rt(t))];!c&&r&&(c=s[i=Xs(Jt(t))]),c&&pt(c,e,6,o);const a=s[i+"Once"];if(a){if(!e.emitted)e.emitted={};else if(e.emitted[i])return;e.emitted[i]=!0,pt(a,e,6,o)}}function Yi(e,t,n=!1){const s=t.emitsCache,o=s.get(e);if(o!==void 0)return o;const r=e.emits;let l={},i=!1;if(!ae(e)){const c=a=>{const u=Yi(a,t,!0);u&&(i=!0,Le(l,u))};!n&&t.mixins.length&&t.mixins.forEach(c),e.extends&&c(e.extends),e.mixins&&e.mixins.forEach(c)}return!r&&!i?(Ee(e)&&s.set(e,null),null):(oe(r)?r.forEach(c=>l[c]=null):Le(l,r),Ee(e)&&s.set(e,l),l)}function js(e,t){return!e||!$s(t)?!1:(t=t.slice(2).replace(/Once$/,""),be(e,t[0].toLowerCase()+t.slice(1))||be(e,Jt(t))||be(e,t))}function io(e){const{type:t,vnode:n,proxy:s,withProxy:o,propsOptions:[r],slots:l,attrs:i,emit:c,render:a,renderCache:u,props:f,data:d,setupState:h,ctx:x,inheritAttrs:y}=e,I=Rs(e);let w,v;try{if(n.shapeFlag&4){const _=o||s,S=_;w=yt(a.call(S,_,u,f,h,d,x)),v=i}else{const _=t;w=yt(_.length>1?_(f,{attrs:i,slots:l,emit:c}):_(f,null)),v=t.props?i:_u(i)}}catch(_){jn.length=0,as(_,e,1),w=re(Ke)}let m=w;if(v&&y!==!1){const _=Object.keys(v),{shapeFlag:S}=m;_.length&&S&7&&(r&&_.some(Ho)&&(v=yu(v,r)),m=Gt(m,v,!1,!0))}return n.dirs&&(m=Gt(m,null,!1,!0),m.dirs=m.dirs?m.dirs.concat(n.dirs):n.dirs),n.transition&&Xn(m,n.transition),w=m,Rs(I),w}const _u=e=>{let t;for(const n in e)(n==="class"||n==="style"||$s(n))&&((t||(t={}))[n]=e[n]);return t},yu=(e,t)=>{const n={};for(const s in e)(!Ho(s)||!(s.slice(9)in t))&&(n[s]=e[s]);return n};function bu(e,t,n){const{props:s,children:o,component:r}=e,{props:l,children:i,patchFlag:c}=t,a=r.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&c>=0){if(c&1024)return!0;if(c&16)return s?Lr(s,l,a):!!l;if(c&8){const u=t.dynamicProps;for(let f=0;f<u.length;f++){const d=u[f];if(l[d]!==s[d]&&!js(a,d))return!0}}}else return(o||i)&&(!i||!i.$stable)?!0:s===l?!1:s?l?Lr(s,l,a):!0:!!l;return!1}function Lr(e,t,n){const s=Object.keys(t);if(s.length!==Object.keys(e).length)return!0;for(let o=0;o<s.length;o++){const r=s[o];if(t[r]!==e[r]&&!js(n,r))return!0}return!1}function wu({vnode:e,parent:t},n){for(;t;){const s=t.subTree;if(s.suspense&&s.suspense.activeBranch===e&&(s.el=e.el),s===e)(e=t.vnode).el=n,t=t.parent;else break}}const Zi=e=>e.__isSuspense;function Cu(e,t){t&&t.pendingBranch?oe(e)?t.effects.push(...e):t.effects.push(e):Ia(e)}const we=Symbol.for("v-fgt"),Vs=Symbol.for("v-txt"),Ke=Symbol.for("v-cmt"),co=Symbol.for("v-stc"),jn=[];let nt=null;function $(e=!1){jn.push(nt=e?null:[])}function ku(){jn.pop(),nt=jn[jn.length-1]||null}let Qn=1;function Dr(e,t=!1){Qn+=e,e<0&&nt&&t&&(nt.hasOnce=!0)}function Xi(e){return e.dynamicChildren=Qn>0?nt||vn:null,ku(),Qn>0&&nt&&nt.push(e),e}function G(e,t,n,s,o,r){return Xi(A(e,t,n,s,o,r,!0))}function pe(e,t,n,s,o){return Xi(re(e,t,n,s,o,!0))}function es(e){return e?e.__v_isVNode===!0:!1}function nn(e,t){return e.type===t.type&&e.key===t.key}const Qi=({key:e})=>e??null,bs=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?Ae(e)||$e(e)||ae(e)?{i:Ve,r:e,k:t,f:!!n}:e:null);function A(e,t=null,n=null,s=0,o=null,r=e===we?0:1,l=!1,i=!1){const c={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Qi(t),ref:t&&bs(t),scopeId:yi,slotScopeIds:null,children:n,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:r,patchFlag:s,dynamicProps:o,dynamicChildren:null,appContext:null,ctx:Ve};return i?(rr(c,n),r&128&&e.normalize(c)):n&&(c.shapeFlag|=Ae(n)?8:16),Qn>0&&!l&&nt&&(c.patchFlag>0||r&6)&&c.patchFlag!==32&&nt.push(c),c}const re=xu;function xu(e,t=null,n=null,s=0,o=null,r=!1){if((!e||e===Ti)&&(e=Ke),es(e)){const i=Gt(e,t,!0);return n&&rr(i,n),Qn>0&&!r&&nt&&(i.shapeFlag&6?nt[nt.indexOf(e)]=i:nt.push(i)),i.patchFlag=-2,i}if($u(e)&&(e=e.__vccOpts),t){t=ec(t);let{class:i,style:c}=t;i&&!Ae(i)&&(t.class=De(i)),Ee(c)&&(Go(c)&&!oe(c)&&(c=Le({},c)),t.style=At(c))}const l=Ae(e)?1:Zi(e)?128:wi(e)?64:Ee(e)?4:ae(e)?2:0;return A(e,t,n,s,o,l,r,!0)}function ec(e){return e?Go(e)||Vi(e)?Le({},e):e:null}function Gt(e,t,n=!1,s=!1){const{props:o,ref:r,patchFlag:l,children:i,transition:c}=e,a=t?Ps(o||{},t):o,u={__v_isVNode:!0,__v_skip:!0,type:e.type,props:a,key:a&&Qi(a),ref:t&&t.ref?n&&r?oe(r)?r.concat(bs(t)):[r,bs(t)]:bs(t):r,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:i,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==we?l===-1?16:l|16:l,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:c,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Gt(e.ssContent),ssFallback:e.ssFallback&&Gt(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return c&&s&&Xn(u,c.clone(u)),u}function Ws(e=" ",t=0){return re(Vs,null,e,t)}function he(e="",t=!1){return t?($(),pe(Ke,null,e)):re(Ke,null,e)}function yt(e){return e==null||typeof e=="boolean"?re(Ke):oe(e)?re(we,null,e.slice()):es(e)?Vt(e):re(Vs,null,String(e))}function Vt(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:Gt(e)}function rr(e,t){let n=0;const{shapeFlag:s}=e;if(t==null)t=null;else if(oe(t))n=16;else if(typeof t=="object")if(s&65){const o=t.default;o&&(o._c&&(o._d=!1),rr(e,o()),o._c&&(o._d=!0));return}else{n=32;const o=t._;!o&&!Vi(t)?t._ctx=Ve:o===3&&Ve&&(Ve.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else ae(t)?(t={default:t,_ctx:Ve},n=32):(t=String(t),s&64?(n=16,t=[Ws(t)]):n=8);e.children=t,e.shapeFlag|=n}function Ps(...e){const t={};for(let n=0;n<e.length;n++){const s=e[n];for(const o in s)if(o==="class")t.class!==s.class&&(t.class=De([t.class,s.class]));else if(o==="style")t.style=At([t.style,s.style]);else if($s(o)){const r=t[o],l=s[o];l&&r!==l&&!(oe(r)&&r.includes(l))&&(t[o]=r?[].concat(r,l):l)}else o!==""&&(t[o]=s[o])}return t}function mt(e,t,n,s=null){pt(e,t,7,[n,s])}const Su=Hi();let Eu=0;function Ru(e,t,n){const s=e.type,o=(t?t.appContext:e.appContext)||Su,r={uid:Eu++,vnode:e,type:s,parent:t,appContext:o,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new Gl(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(o.provides),ids:t?t.ids:["",0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:Ui(s,o),emitsOptions:Yi(s,o),emit:null,emitted:null,propsDefaults:xe,inheritAttrs:s.inheritAttrs,ctx:xe,data:xe,props:xe,attrs:xe,slots:xe,refs:xe,setupState:xe,setupContext:null,suspense:n,suspenseId:n?n.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 r.ctx={_:r},r.root=t?t.root:r,r.emit=vu.bind(null,r),e.ce&&e.ce(r),r}let je=null;const Us=()=>je||Ve;let As,Po;{const e=Ds(),t=(n,s)=>{let o;return(o=e[n])||(o=e[n]=[]),o.push(s),r=>{o.length>1?o.forEach(l=>l(r)):o[0](r)}};As=t("__VUE_INSTANCE_SETTERS__",n=>je=n),Po=t("__VUE_SSR_SETTERS__",n=>xn=n)}const fs=e=>{const t=je;return As(e),e.scope.on(),()=>{e.scope.off(),As(t)}},Fr=()=>{je&&je.scope.off(),As(null)};function tc(e){return e.vnode.shapeFlag&4}let xn=!1;function Mu(e,t=!1,n=!1){t&&Po(t);const{props:s,children:o}=e.vnode,r=tc(e);su(e,s,r,t),iu(e,o,n||t);const l=r?Pu(e,t):void 0;return t&&Po(!1),l}function Pu(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,qa);const{setup:s}=n;if(s){$t();const o=e.setupContext=s.length>1?sc(e):null,r=fs(e),l=cs(s,e,0,[e.props,o]),i=jl(l);if(Tt(),r(),(i||e.sp)&&!bn(e)&&Zo(e),i){if(l.then(Fr,Fr),t)return l.then(c=>{Nr(e,c,t)}).catch(c=>{as(c,e,0)});e.asyncDep=l}else Nr(e,l,t)}else nc(e,t)}function Nr(e,t,n){ae(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:Ee(t)&&(e.setupState=hi(t)),nc(e,n)}let Hr;function nc(e,t,n){const s=e.type;if(!e.render){if(!t&&Hr&&!s.render){const o=s.template||er(e).template;if(o){const{isCustomElement:r,compilerOptions:l}=e.appContext.config,{delimiters:i,compilerOptions:c}=s,a=Le(Le({isCustomElement:r,delimiters:i},l),c);s.render=Hr(o,a)}}e.render=s.render||at}{const o=fs(e);$t();try{Ja(e)}finally{Tt(),o()}}}const Au={get(e,t){return ze(e,"get",""),e[t]}};function sc(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,Au),slots:e.slots,emit:e.emit,expose:t}}function zs(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(hi(Jo(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in Bn)return Bn[n](e)},has(t,n){return n in t||n in Bn}})):e.proxy}function Iu(e,t=!0){return ae(e)?e.displayName||e.name:e.name||t&&e.__name}function $u(e){return ae(e)&&"__vccOpts"in e}const ve=(e,t)=>Ea(e,t,xn);function an(e,t,n){const s=arguments.length;return s===2?Ee(t)&&!oe(t)?es(t)?re(e,null,[t]):re(e,t):re(e,null,t):(s>3?n=Array.prototype.slice.call(arguments,2):s===3&&es(n)&&(n=[n]),re(e,t,n))}const Tu="3.5.18";/**
|
|
14
|
+
* @vue/runtime-dom v3.5.18
|
|
15
|
+
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
16
|
+
* @license MIT
|
|
17
|
+
**/let Ao;const Br=typeof window<"u"&&window.trustedTypes;if(Br)try{Ao=Br.createPolicy("vue",{createHTML:e=>e})}catch{}const oc=Ao?e=>Ao.createHTML(e):e=>e,Ou="http://www.w3.org/2000/svg",Lu="http://www.w3.org/1998/Math/MathML",Rt=typeof document<"u"?document:null,jr=Rt&&Rt.createElement("template"),Du={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,s)=>{const o=t==="svg"?Rt.createElementNS(Ou,e):t==="mathml"?Rt.createElementNS(Lu,e):n?Rt.createElement(e,{is:n}):Rt.createElement(e);return e==="select"&&s&&s.multiple!=null&&o.setAttribute("multiple",s.multiple),o},createText:e=>Rt.createTextNode(e),createComment:e=>Rt.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Rt.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,s,o,r){const l=n?n.previousSibling:t.lastChild;if(o&&(o===r||o.nextSibling))for(;t.insertBefore(o.cloneNode(!0),n),!(o===r||!(o=o.nextSibling)););else{jr.innerHTML=oc(s==="svg"?`<svg>${e}</svg>`:s==="mathml"?`<math>${e}</math>`:e);const i=jr.content;if(s==="svg"||s==="mathml"){const c=i.firstChild;for(;c.firstChild;)i.appendChild(c.firstChild);i.removeChild(c)}t.insertBefore(i,n)}return[l?l.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},Dt="transition",In="animation",ts=Symbol("_vtc"),rc={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},Fu=Le({},Si,rc),Nu=e=>(e.displayName="Transition",e.props=Fu,e),Hu=Nu((e,{slots:t})=>an(La,Bu(e),t)),Qt=(e,t=[])=>{oe(e)?e.forEach(n=>n(...t)):e&&e(...t)},Vr=e=>e?oe(e)?e.some(t=>t.length>1):e.length>1:!1;function Bu(e){const t={};for(const H in e)H in rc||(t[H]=e[H]);if(e.css===!1)return t;const{name:n="v",type:s,duration:o,enterFromClass:r=`${n}-enter-from`,enterActiveClass:l=`${n}-enter-active`,enterToClass:i=`${n}-enter-to`,appearFromClass:c=r,appearActiveClass:a=l,appearToClass:u=i,leaveFromClass:f=`${n}-leave-from`,leaveActiveClass:d=`${n}-leave-active`,leaveToClass:h=`${n}-leave-to`}=e,x=ju(o),y=x&&x[0],I=x&&x[1],{onBeforeEnter:w,onEnter:v,onEnterCancelled:m,onLeave:_,onLeaveCancelled:S,onBeforeAppear:k=w,onAppear:R=v,onAppearCancelled:D=m}=t,C=(H,Z,Y,ce)=>{H._enterCancelled=ce,en(H,Z?u:i),en(H,Z?a:l),Y&&Y()},N=(H,Z)=>{H._isLeaving=!1,en(H,f),en(H,h),en(H,d),Z&&Z()},q=H=>(Z,Y)=>{const ce=H?R:v,ie=()=>C(Z,H,Y);Qt(ce,[Z,ie]),Wr(()=>{en(Z,H?c:r),St(Z,H?u:i),Vr(ce)||Ur(Z,s,y,ie)})};return Le(t,{onBeforeEnter(H){Qt(w,[H]),St(H,r),St(H,l)},onBeforeAppear(H){Qt(k,[H]),St(H,c),St(H,a)},onEnter:q(!1),onAppear:q(!0),onLeave(H,Z){H._isLeaving=!0;const Y=()=>N(H,Z);St(H,f),H._enterCancelled?(St(H,d),qr()):(qr(),St(H,d)),Wr(()=>{H._isLeaving&&(en(H,f),St(H,h),Vr(_)||Ur(H,s,I,Y))}),Qt(_,[H,Y])},onEnterCancelled(H){C(H,!1,void 0,!0),Qt(m,[H])},onAppearCancelled(H){C(H,!0,void 0,!0),Qt(D,[H])},onLeaveCancelled(H){N(H),Qt(S,[H])}})}function ju(e){if(e==null)return null;if(Ee(e))return[ao(e.enter),ao(e.leave)];{const t=ao(e);return[t,t]}}function ao(e){return Kc(e)}function St(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[ts]||(e[ts]=new Set)).add(t)}function en(e,t){t.split(/\s+/).forEach(s=>s&&e.classList.remove(s));const n=e[ts];n&&(n.delete(t),n.size||(e[ts]=void 0))}function Wr(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let Vu=0;function Ur(e,t,n,s){const o=e._endId=++Vu,r=()=>{o===e._endId&&s()};if(n!=null)return setTimeout(r,n);const{type:l,timeout:i,propCount:c}=Wu(e,t);if(!l)return s();const a=l+"end";let u=0;const f=()=>{e.removeEventListener(a,d),r()},d=h=>{h.target===e&&++u>=c&&f()};setTimeout(()=>{u<c&&f()},i+1),e.addEventListener(a,d)}function Wu(e,t){const n=window.getComputedStyle(e),s=x=>(n[x]||"").split(", "),o=s(`${Dt}Delay`),r=s(`${Dt}Duration`),l=zr(o,r),i=s(`${In}Delay`),c=s(`${In}Duration`),a=zr(i,c);let u=null,f=0,d=0;t===Dt?l>0&&(u=Dt,f=l,d=r.length):t===In?a>0&&(u=In,f=a,d=c.length):(f=Math.max(l,a),u=f>0?l>a?Dt:In:null,d=u?u===Dt?r.length:c.length:0);const h=u===Dt&&/\b(transform|all)(,|$)/.test(s(`${Dt}Property`).toString());return{type:u,timeout:f,propCount:d,hasTransform:h}}function zr(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map((n,s)=>Kr(n)+Kr(e[s])))}function Kr(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function qr(){return document.body.offsetHeight}function Uu(e,t,n){const s=e[ts];s&&(t=(t?[t,...s]:[...s]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const Gr=Symbol("_vod"),zu=Symbol("_vsh"),Ku=Symbol(""),qu=/(^|;)\s*display\s*:/;function Gu(e,t,n){const s=e.style,o=Ae(n);let r=!1;if(n&&!o){if(t)if(Ae(t))for(const l of t.split(";")){const i=l.slice(0,l.indexOf(":")).trim();n[i]==null&&ws(s,i,"")}else for(const l in t)n[l]==null&&ws(s,l,"");for(const l in n)l==="display"&&(r=!0),ws(s,l,n[l])}else if(o){if(t!==n){const l=s[Ku];l&&(n+=";"+l),s.cssText=n,r=qu.test(n)}}else t&&e.removeAttribute("style");Gr in e&&(e[Gr]=r?s.display:"",e[zu]&&(s.display="none"))}const Jr=/\s*!important$/;function ws(e,t,n){if(oe(n))n.forEach(s=>ws(e,t,s));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const s=Ju(e,t);Jr.test(n)?e.setProperty(Jt(s),n.replace(Jr,""),"important"):e[s]=n}}const Yr=["Webkit","Moz","ms"],uo={};function Ju(e,t){const n=uo[t];if(n)return n;let s=rt(t);if(s!=="filter"&&s in e)return uo[t]=s;s=Ls(s);for(let o=0;o<Yr.length;o++){const r=Yr[o]+s;if(r in e)return uo[t]=r}return t}const Zr="http://www.w3.org/1999/xlink";function Xr(e,t,n,s,o,r=Qc(t)){s&&t.startsWith("xlink:")?n==null?e.removeAttributeNS(Zr,t.slice(6,t.length)):e.setAttributeNS(Zr,t,n):n==null||r&&!Ul(n)?e.removeAttribute(t):e.setAttribute(t,r?"":dt(n)?String(n):n)}function Qr(e,t,n,s,o){if(t==="innerHTML"||t==="textContent"){n!=null&&(e[t]=t==="innerHTML"?oc(n):n);return}const r=e.tagName;if(t==="value"&&r!=="PROGRESS"&&!r.includes("-")){const i=r==="OPTION"?e.getAttribute("value")||"":e.value,c=n==null?e.type==="checkbox"?"on":"":String(n);(i!==c||!("_value"in e))&&(e.value=c),n==null&&e.removeAttribute(t),e._value=n;return}let l=!1;if(n===""||n==null){const i=typeof e[t];i==="boolean"?n=Ul(n):n==null&&i==="string"?(n="",l=!0):i==="number"&&(n=0,l=!0)}try{e[t]=n}catch{}l&&e.removeAttribute(o||t)}function sn(e,t,n,s){e.addEventListener(t,n,s)}function Yu(e,t,n,s){e.removeEventListener(t,n,s)}const el=Symbol("_vei");function Zu(e,t,n,s,o=null){const r=e[el]||(e[el]={}),l=r[t];if(s&&l)l.value=s;else{const[i,c]=Xu(t);if(s){const a=r[t]=tf(s,o);sn(e,i,a,c)}else l&&(Yu(e,i,l,c),r[t]=void 0)}}const tl=/(?:Once|Passive|Capture)$/;function Xu(e){let t;if(tl.test(e)){t={};let s;for(;s=e.match(tl);)e=e.slice(0,e.length-s[0].length),t[s[0].toLowerCase()]=!0}return[e[2]===":"?e.slice(3):Jt(e.slice(2)),t]}let fo=0;const Qu=Promise.resolve(),ef=()=>fo||(Qu.then(()=>fo=0),fo=Date.now());function tf(e,t){const n=s=>{if(!s._vts)s._vts=Date.now();else if(s._vts<=n.attached)return;pt(nf(s,n.value),t,5,[s])};return n.value=e,n.attached=ef(),n}function nf(e,t){if(oe(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(s=>o=>!o._stopped&&s&&s(o))}else return t}const nl=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,sf=(e,t,n,s,o,r)=>{const l=o==="svg";t==="class"?Uu(e,s,l):t==="style"?Gu(e,n,s):$s(t)?Ho(t)||Zu(e,t,n,s,r):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):of(e,t,s,l))?(Qr(e,t,s),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&Xr(e,t,s,l,r,t!=="value")):e._isVueCE&&(/[A-Z]/.test(t)||!Ae(s))?Qr(e,rt(t),s,r,t):(t==="true-value"?e._trueValue=s:t==="false-value"&&(e._falseValue=s),Xr(e,t,s,l))};function of(e,t,n,s){if(s)return!!(t==="innerHTML"||t==="textContent"||t in e&&nl(t)&&ae(n));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="autocorrect"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const o=e.tagName;if(o==="IMG"||o==="VIDEO"||o==="CANVAS"||o==="SOURCE")return!1}return nl(t)&&Ae(n)?!1:t in e}const Is=e=>{const t=e.props["onUpdate:modelValue"]||!1;return oe(t)?n=>_s(t,n):t};function rf(e){e.target.composing=!0}function sl(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const wn=Symbol("_assign"),ns={created(e,{modifiers:{lazy:t,trim:n,number:s}},o){e[wn]=Is(o);const r=s||o.props&&o.props.type==="number";sn(e,t?"change":"input",l=>{if(l.target.composing)return;let i=e.value;n&&(i=i.trim()),r&&(i=yo(i)),e[wn](i)}),n&&sn(e,"change",()=>{e.value=e.value.trim()}),t||(sn(e,"compositionstart",rf),sn(e,"compositionend",sl),sn(e,"change",sl))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:s,trim:o,number:r}},l){if(e[wn]=Is(l),e.composing)return;const i=(r||e.type==="number")&&!/^0\d/.test(e.value)?yo(e.value):e.value,c=t??"";i!==c&&(document.activeElement===e&&e.type!=="range"&&(s&&t===n||o&&e.value.trim()===c)||(e.value=c))}},lc={deep:!0,created(e,t,n){e[wn]=Is(n),sn(e,"change",()=>{const s=e._modelValue,o=lf(e),r=e.checked,l=e[wn];if(oe(s)){const i=zl(s,o),c=i!==-1;if(r&&!c)l(s.concat(o));else if(!r&&c){const a=[...s];a.splice(i,1),l(a)}}else if(Ts(s)){const i=new Set(s);r?i.add(o):i.delete(o),l(i)}else l(ic(e,r))})},mounted:ol,beforeUpdate(e,t,n){e[wn]=Is(n),ol(e,t,n)}};function ol(e,{value:t,oldValue:n},s){e._modelValue=t;let o;if(oe(t))o=zl(t,s.props.value)>-1;else if(Ts(t))o=t.has(s.props.value);else{if(t===n)return;o=Fs(t,ic(e,!0))}e.checked!==o&&(e.checked=o)}function lf(e){return"_value"in e?e._value:e.value}function ic(e,t){const n=t?"_trueValue":"_falseValue";return n in e?e[n]:t}const cf=["ctrl","shift","alt","meta"],af={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>cf.some(n=>e[`${n}Key`]&&!t.includes(n))},Ne=(e,t)=>{const n=e._withMods||(e._withMods={}),s=t.join(".");return n[s]||(n[s]=(o,...r)=>{for(let l=0;l<t.length;l++){const i=af[t[l]];if(i&&i(o,t))return}return e(o,...r)})},uf={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},Cn=(e,t)=>{const n=e._withKeys||(e._withKeys={}),s=t.join(".");return n[s]||(n[s]=o=>{if(!("key"in o))return;const r=Jt(o.key);if(t.some(l=>l===r||uf[l]===r))return e(o)})},ff=Le({patchProp:sf},Du);let rl;function cc(){return rl||(rl=au(ff))}const ll=(...e)=>{cc().render(...e)},df=(...e)=>{const t=cc().createApp(...e),{mount:n}=t;return t.mount=s=>{const o=hf(s);if(!o)return;const r=t._component;!ae(r)&&!r.render&&!r.template&&(r.template=o.innerHTML),o.nodeType===1&&(o.textContent="");const l=n(o,!1,pf(o));return o instanceof Element&&(o.removeAttribute("v-cloak"),o.setAttribute("data-v-app","")),l},t};function pf(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function hf(e){return Ae(e)?document.querySelector(e):e}var gf=!1;/*!
|
|
18
|
+
* pinia v2.3.1
|
|
19
|
+
* (c) 2025 Eduardo San Martin Morote
|
|
20
|
+
* @license MIT
|
|
21
|
+
*/let ac;const Ks=e=>ac=e,uc=Symbol();function Io(e){return e&&typeof e=="object"&&Object.prototype.toString.call(e)==="[object Object]"&&typeof e.toJSON!="function"}var Vn;(function(e){e.direct="direct",e.patchObject="patch object",e.patchFunction="patch function"})(Vn||(Vn={}));function mf(){const e=Jl(!0),t=e.run(()=>ne({}));let n=[],s=[];const o=Jo({install(r){Ks(o),o._a=r,r.provide(uc,o),r.config.globalProperties.$pinia=o,s.forEach(l=>n.push(l)),s=[]},use(r){return!this._a&&!gf?s.push(r):n.push(r),this},_p:n,_a:null,_e:e,_s:new Map,state:t});return o}const fc=()=>{};function il(e,t,n,s=fc){e.push(t);const o=()=>{const r=e.indexOf(t);r>-1&&(e.splice(r,1),s())};return!n&&Yl()&&ta(o),o}function hn(e,...t){e.slice().forEach(n=>{n(...t)})}const vf=e=>e(),cl=Symbol(),po=Symbol();function $o(e,t){e instanceof Map&&t instanceof Map?t.forEach((n,s)=>e.set(s,n)):e instanceof Set&&t instanceof Set&&t.forEach(e.add,e);for(const n in t){if(!t.hasOwnProperty(n))continue;const s=t[n],o=e[n];Io(o)&&Io(s)&&e.hasOwnProperty(n)&&!$e(s)&&!zt(s)?e[n]=$o(o,s):e[n]=s}return e}const _f=Symbol();function yf(e){return!Io(e)||!e.hasOwnProperty(_f)}const{assign:Ht}=Object;function bf(e){return!!($e(e)&&e.effect)}function wf(e,t,n,s){const{state:o,actions:r,getters:l}=t,i=n.state.value[e];let c;function a(){i||(n.state.value[e]=o?o():{});const u=dn(n.state.value[e]);return Ht(u,r,Object.keys(l||{}).reduce((f,d)=>(f[d]=Jo(ve(()=>{Ks(n);const h=n._s.get(e);return l[d].call(h,h)})),f),{}))}return c=dc(e,a,t,n,s,!0),c}function dc(e,t,n={},s,o,r){let l;const i=Ht({actions:{}},n),c={deep:!0};let a,u,f=[],d=[],h;const x=s.state.value[e];!r&&!x&&(s.state.value[e]={}),ne({});let y;function I(D){let C;a=u=!1,typeof D=="function"?(D(s.state.value[e]),C={type:Vn.patchFunction,storeId:e,events:h}):($o(s.state.value[e],D),C={type:Vn.patchObject,payload:D,storeId:e,events:h});const N=y=Symbol();Ze().then(()=>{y===N&&(a=!0)}),u=!0,hn(f,C,s.state.value[e])}const w=r?function(){const{state:C}=n,N=C?C():{};this.$patch(q=>{Ht(q,N)})}:fc;function v(){l.stop(),f=[],d=[],s._s.delete(e)}const m=(D,C="")=>{if(cl in D)return D[po]=C,D;const N=function(){Ks(s);const q=Array.from(arguments),H=[],Z=[];function Y(ee){H.push(ee)}function ce(ee){Z.push(ee)}hn(d,{args:q,name:N[po],store:S,after:Y,onError:ce});let ie;try{ie=D.apply(this&&this.$id===e?this:S,q)}catch(ee){throw hn(Z,ee),ee}return ie instanceof Promise?ie.then(ee=>(hn(H,ee),ee)).catch(ee=>(hn(Z,ee),Promise.reject(ee))):(hn(H,ie),ie)};return N[cl]=!0,N[po]=C,N},_={_p:s,$id:e,$onAction:il.bind(null,d),$patch:I,$reset:w,$subscribe(D,C={}){const N=il(f,D,C.detached,()=>q()),q=l.run(()=>It(()=>s.state.value[e],H=>{(C.flush==="sync"?u:a)&&D({storeId:e,type:Vn.direct,events:h},H)},Ht({},c,C)));return N},$dispose:v},S=Ct(_);s._s.set(e,S);const R=(s._a&&s._a.runWithContext||vf)(()=>s._e.run(()=>(l=Jl()).run(()=>t({action:m}))));for(const D in R){const C=R[D];if($e(C)&&!bf(C)||zt(C))r||(x&&yf(C)&&($e(C)?C.value=x[D]:$o(C,x[D])),s.state.value[e][D]=C);else if(typeof C=="function"){const N=m(C,D);R[D]=N,i.actions[D]=C}}return Ht(S,R),Ht(me(S),R),Object.defineProperty(S,"$state",{get:()=>s.state.value[e],set:D=>{I(C=>{Ht(C,D)})}}),s._p.forEach(D=>{Ht(S,l.run(()=>D({store:S,app:s._a,pinia:s,options:i})))}),x&&r&&n.hydrate&&n.hydrate(S.$state,x),a=!0,u=!0,S}/*! #__NO_SIDE_EFFECTS__ */function Cf(e,t,n){let s,o;const r=typeof t=="function";typeof e=="string"?(s=e,o=r?n:t):(o=e,s=e.id);function l(i,c){const a=nu();return i=i||(a?Se(uc,null):null),i&&Ks(i),i=ac,i._s.has(s)||(r?dc(s,t,o,i):wf(s,o,i)),i._s.get(s)}return l.$id=s,l}const kf={class:"statustext"},xf={key:0,class:"index"},Sf={class:"filename"},Ef={key:0,class:"percent"},Rf={key:1,class:"position"},Mf={class:"speed"},Pf=_e({__name:"TransferBar",props:{status:{}},emits:["cancel"],setup(e){const t=e,n=ve(()=>t.status.xfer/t.status.total*100),s=ve(()=>{let r=t.status.statbytes/t.status.statdur/1e3;const l=(Date.now()-t.status.tlast)/1e3;return l>5/r?0:l>1/r?1/l:r}),o=ve(()=>s.value?s.value.toFixed(s.value<10?1:0)+" MB/s":"stalled");return(r,l)=>r.status.total?($(),G("div",{key:0,class:"transferprogress",style:At(`background: linear-gradient(to right, var(--bar) 0, var(--bar) ${n.value}%, var(--nobar) ${n.value}%, var(--nobar) 100%);`)},[A("div",kf,[r.status.filecount>1?($(),G("span",xf," ["+Pe(r.status.fileidx)+"/"+Pe(r.status.filecount)+"] ",1)):he("",!0),A("span",Sf,[Ws(Pe(r.status.filename.split("/").pop())+" ",1),r.status.filesize>1e7?($(),G("span",Ef,Pe((r.status.filepos/r.status.filesize*100).toFixed(0)+" %"),1)):he("",!0)]),r.status.total>1e7?($(),G("span",Rf,Pe((r.status.xfer/1e6).toFixed(0)+" / "+(r.status.total/1e6).toFixed(0)+" MB"),1)):he("",!0),A("span",Mf,Pe(o.value),1),A("button",{class:"close",onClick:l[0]||(l[0]=i=>r.$emit("cancel"))},"❌")])],4)):he("",!0)}});const lt=(e,t)=>{const n=e.__vccOpts||e;for(const[s,o]of t)n[s]=o;return n},Af=lt(Pf,[["__scopeId","data-v-fc92216f"]]),If={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"};function pc(e,t){return $(),G("svg",If,t[0]||(t[0]=[A("path",{d:"M32 18.45 16 6.03 0 18.45V13.4L16 .96 32 13.4zM28 18v12h-8v-8h-8v8H4V18l12-9z"},null,-1)]))}const hc={render:pc},$f=Object.freeze(Object.defineProperty({__proto__:null,default:hc,render:pc},Symbol.toStringTag,{value:"Module"}));/*!
|
|
22
|
+
* vue-router v4.5.1
|
|
23
|
+
* (c) 2025 Eduardo San Martin Morote
|
|
24
|
+
* @license MIT
|
|
25
|
+
*/const mn=typeof document<"u";function gc(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function Tf(e){return e.__esModule||e[Symbol.toStringTag]==="Module"||e.default&&gc(e.default)}const ye=Object.assign;function ho(e,t){const n={};for(const s in t){const o=t[s];n[s]=ht(o)?o.map(e):e(o)}return n}const Wn=()=>{},ht=Array.isArray,mc=/#/g,Of=/&/g,Lf=/\//g,Df=/=/g,Ff=/\?/g,vc=/\+/g,Nf=/%5B/g,Hf=/%5D/g,_c=/%5E/g,Bf=/%60/g,yc=/%7B/g,jf=/%7C/g,bc=/%7D/g,Vf=/%20/g;function lr(e){return encodeURI(""+e).replace(jf,"|").replace(Nf,"[").replace(Hf,"]")}function Wf(e){return lr(e).replace(yc,"{").replace(bc,"}").replace(_c,"^")}function To(e){return lr(e).replace(vc,"%2B").replace(Vf,"+").replace(mc,"%23").replace(Of,"%26").replace(Bf,"`").replace(yc,"{").replace(bc,"}").replace(_c,"^")}function Uf(e){return To(e).replace(Df,"%3D")}function zf(e){return lr(e).replace(mc,"%23").replace(Ff,"%3F")}function Kf(e){return e==null?"":zf(e).replace(Lf,"%2F")}function ss(e){try{return decodeURIComponent(""+e)}catch{}return""+e}const qf=/\/$/,Gf=e=>e.replace(qf,"");function go(e,t,n="/"){let s,o={},r="",l="";const i=t.indexOf("#");let c=t.indexOf("?");return i<c&&i>=0&&(c=-1),c>-1&&(s=t.slice(0,c),r=t.slice(c+1,i>-1?i:t.length),o=e(r)),i>-1&&(s=s||t.slice(0,i),l=t.slice(i,t.length)),s=Xf(s??t,n),{fullPath:s+(r&&"?")+r+l,path:s,query:o,hash:ss(l)}}function Jf(e,t){const n=t.query?e(t.query):"";return t.path+(n&&"?")+n+(t.hash||"")}function al(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function Yf(e,t,n){const s=t.matched.length-1,o=n.matched.length-1;return s>-1&&s===o&&Sn(t.matched[s],n.matched[o])&&wc(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function Sn(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function wc(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(!Zf(e[n],t[n]))return!1;return!0}function Zf(e,t){return ht(e)?ul(e,t):ht(t)?ul(t,e):e===t}function ul(e,t){return ht(t)?e.length===t.length&&e.every((n,s)=>n===t[s]):e.length===1&&e[0]===t}function Xf(e,t){if(e.startsWith("/"))return e;if(!e)return t;const n=t.split("/"),s=e.split("/"),o=s[s.length-1];(o===".."||o===".")&&s.push("");let r=n.length-1,l,i;for(l=0;l<s.length;l++)if(i=s[l],i!==".")if(i==="..")r>1&&r--;else break;return n.slice(0,r).join("/")+"/"+s.slice(l).join("/")}const Ft={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0};var os;(function(e){e.pop="pop",e.push="push"})(os||(os={}));var Un;(function(e){e.back="back",e.forward="forward",e.unknown=""})(Un||(Un={}));function Qf(e){if(!e)if(mn){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),Gf(e)}const ed=/^[^#]+#/;function td(e,t){return e.replace(ed,"#")+t}function nd(e,t){const n=document.documentElement.getBoundingClientRect(),s=e.getBoundingClientRect();return{behavior:t.behavior,left:s.left-n.left-(t.left||0),top:s.top-n.top-(t.top||0)}}const qs=()=>({left:window.scrollX,top:window.scrollY});function sd(e){let t;if("el"in e){const n=e.el,s=typeof n=="string"&&n.startsWith("#"),o=typeof n=="string"?s?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!o)return;t=nd(o,e)}else t=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left!=null?t.left:window.scrollX,t.top!=null?t.top:window.scrollY)}function fl(e,t){return(history.state?history.state.position-t:-1)+e}const Oo=new Map;function od(e,t){Oo.set(e,t)}function rd(e){const t=Oo.get(e);return Oo.delete(e),t}let ld=()=>location.protocol+"//"+location.host;function Cc(e,t){const{pathname:n,search:s,hash:o}=t,r=e.indexOf("#");if(r>-1){let i=o.includes(e.slice(r))?e.slice(r).length:1,c=o.slice(i);return c[0]!=="/"&&(c="/"+c),al(c,"")}return al(n,e)+s+o}function id(e,t,n,s){let o=[],r=[],l=null;const i=({state:d})=>{const h=Cc(e,location),x=n.value,y=t.value;let I=0;if(d){if(n.value=h,t.value=d,l&&l===x){l=null;return}I=y?d.position-y.position:0}else s(h);o.forEach(w=>{w(n.value,x,{delta:I,type:os.pop,direction:I?I>0?Un.forward:Un.back:Un.unknown})})};function c(){l=n.value}function a(d){o.push(d);const h=()=>{const x=o.indexOf(d);x>-1&&o.splice(x,1)};return r.push(h),h}function u(){const{history:d}=window;d.state&&d.replaceState(ye({},d.state,{scroll:qs()}),"")}function f(){for(const d of r)d();r=[],window.removeEventListener("popstate",i),window.removeEventListener("beforeunload",u)}return window.addEventListener("popstate",i),window.addEventListener("beforeunload",u,{passive:!0}),{pauseListeners:c,listen:a,destroy:f}}function dl(e,t,n,s=!1,o=!1){return{back:e,current:t,forward:n,replaced:s,position:window.history.length,scroll:o?qs():null}}function cd(e){const{history:t,location:n}=window,s={value:Cc(e,n)},o={value:t.state};o.value||r(s.value,{back:null,current:s.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function r(c,a,u){const f=e.indexOf("#"),d=f>-1?(n.host&&document.querySelector("base")?e:e.slice(f))+c:ld()+e+c;try{t[u?"replaceState":"pushState"](a,"",d),o.value=a}catch(h){console.error(h),n[u?"replace":"assign"](d)}}function l(c,a){const u=ye({},t.state,dl(o.value.back,c,o.value.forward,!0),a,{position:o.value.position});r(c,u,!0),s.value=c}function i(c,a){const u=ye({},o.value,t.state,{forward:c,scroll:qs()});r(u.current,u,!0);const f=ye({},dl(s.value,c,null),{position:u.position+1},a);r(c,f,!1),s.value=c}return{location:s,state:o,push:i,replace:l}}function ad(e){e=Qf(e);const t=cd(e),n=id(e,t.state,t.location,t.replace);function s(r,l=!0){l||n.pauseListeners(),history.go(r)}const o=ye({location:"",base:e,go:s,createHref:td.bind(null,e)},t,n);return Object.defineProperty(o,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(o,"state",{enumerable:!0,get:()=>t.state.value}),o}function ud(e){return e=location.host?e||location.pathname+location.search:"",e.includes("#")||(e+="#"),ad(e)}function fd(e){return typeof e=="string"||e&&typeof e=="object"}function kc(e){return typeof e=="string"||typeof e=="symbol"}const xc=Symbol("");var pl;(function(e){e[e.aborted=4]="aborted",e[e.cancelled=8]="cancelled",e[e.duplicated=16]="duplicated"})(pl||(pl={}));function En(e,t){return ye(new Error,{type:e,[xc]:!0},t)}function Et(e,t){return e instanceof Error&&xc in e&&(t==null||!!(e.type&t))}const hl="[^/]+?",dd={sensitive:!1,strict:!1,start:!0,end:!0},pd=/[.+*?^${}()[\]/\\]/g;function hd(e,t){const n=ye({},dd,t),s=[];let o=n.start?"^":"";const r=[];for(const a of e){const u=a.length?[]:[90];n.strict&&!a.length&&(o+="/");for(let f=0;f<a.length;f++){const d=a[f];let h=40+(n.sensitive?.25:0);if(d.type===0)f||(o+="/"),o+=d.value.replace(pd,"\\$&"),h+=40;else if(d.type===1){const{value:x,repeatable:y,optional:I,regexp:w}=d;r.push({name:x,repeatable:y,optional:I});const v=w||hl;if(v!==hl){h+=10;try{new RegExp(`(${v})`)}catch(_){throw new Error(`Invalid custom RegExp for param "${x}" (${v}): `+_.message)}}let m=y?`((?:${v})(?:/(?:${v}))*)`:`(${v})`;f||(m=I&&a.length<2?`(?:/${m})`:"/"+m),I&&(m+="?"),o+=m,h+=20,I&&(h+=-8),y&&(h+=-20),v===".*"&&(h+=-50)}u.push(h)}s.push(u)}if(n.strict&&n.end){const a=s.length-1;s[a][s[a].length-1]+=.7000000000000001}n.strict||(o+="/?"),n.end?o+="$":n.strict&&!o.endsWith("/")&&(o+="(?:/|$)");const l=new RegExp(o,n.sensitive?"":"i");function i(a){const u=a.match(l),f={};if(!u)return null;for(let d=1;d<u.length;d++){const h=u[d]||"",x=r[d-1];f[x.name]=h&&x.repeatable?h.split("/"):h}return f}function c(a){let u="",f=!1;for(const d of e){(!f||!u.endsWith("/"))&&(u+="/"),f=!1;for(const h of d)if(h.type===0)u+=h.value;else if(h.type===1){const{value:x,repeatable:y,optional:I}=h,w=x in a?a[x]:"";if(ht(w)&&!y)throw new Error(`Provided param "${x}" is an array but it is not repeatable (* or + modifiers)`);const v=ht(w)?w.join("/"):w;if(!v)if(I)d.length<2&&(u.endsWith("/")?u=u.slice(0,-1):f=!0);else throw new Error(`Missing required param "${x}"`);u+=v}}return u||"/"}return{re:l,score:s,keys:r,parse:i,stringify:c}}function gd(e,t){let n=0;for(;n<e.length&&n<t.length;){const s=t[n]-e[n];if(s)return s;n++}return e.length<t.length?e.length===1&&e[0]===40+40?-1:1:e.length>t.length?t.length===1&&t[0]===40+40?1:-1:0}function Sc(e,t){let n=0;const s=e.score,o=t.score;for(;n<s.length&&n<o.length;){const r=gd(s[n],o[n]);if(r)return r;n++}if(Math.abs(o.length-s.length)===1){if(gl(s))return 1;if(gl(o))return-1}return o.length-s.length}function gl(e){const t=e[e.length-1];return e.length>0&&t[t.length-1]<0}const md={type:0,value:""},vd=/[a-zA-Z0-9_]/;function _d(e){if(!e)return[[]];if(e==="/")return[[md]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function t(h){throw new Error(`ERR (${n})/"${a}": ${h}`)}let n=0,s=n;const o=[];let r;function l(){r&&o.push(r),r=[]}let i=0,c,a="",u="";function f(){a&&(n===0?r.push({type:0,value:a}):n===1||n===2||n===3?(r.length>1&&(c==="*"||c==="+")&&t(`A repeatable param (${a}) must be alone in its segment. eg: '/:ids+.`),r.push({type:1,value:a,regexp:u,repeatable:c==="*"||c==="+",optional:c==="*"||c==="?"})):t("Invalid state to consume buffer"),a="")}function d(){a+=c}for(;i<e.length;){if(c=e[i++],c==="\\"&&n!==2){s=n,n=4;continue}switch(n){case 0:c==="/"?(a&&f(),l()):c===":"?(f(),n=1):d();break;case 4:d(),n=s;break;case 1:c==="("?n=2:vd.test(c)?d():(f(),n=0,c!=="*"&&c!=="?"&&c!=="+"&&i--);break;case 2:c===")"?u[u.length-1]=="\\"?u=u.slice(0,-1)+c:n=3:u+=c;break;case 3:f(),n=0,c!=="*"&&c!=="?"&&c!=="+"&&i--,u="";break;default:t("Unknown state");break}}return n===2&&t(`Unfinished custom RegExp for param "${a}"`),f(),l(),o}function yd(e,t,n){const s=hd(_d(e.path),n),o=ye(s,{record:e,parent:t,children:[],alias:[]});return t&&!o.record.aliasOf==!t.record.aliasOf&&t.children.push(o),o}function bd(e,t){const n=[],s=new Map;t=yl({strict:!1,end:!0,sensitive:!1},t);function o(f){return s.get(f)}function r(f,d,h){const x=!h,y=vl(f);y.aliasOf=h&&h.record;const I=yl(t,f),w=[y];if("alias"in f){const _=typeof f.alias=="string"?[f.alias]:f.alias;for(const S of _)w.push(vl(ye({},y,{components:h?h.record.components:y.components,path:S,aliasOf:h?h.record:y})))}let v,m;for(const _ of w){const{path:S}=_;if(d&&S[0]!=="/"){const k=d.record.path,R=k[k.length-1]==="/"?"":"/";_.path=d.record.path+(S&&R+S)}if(v=yd(_,d,I),h?h.alias.push(v):(m=m||v,m!==v&&m.alias.push(v),x&&f.name&&!_l(v)&&l(f.name)),Ec(v)&&c(v),y.children){const k=y.children;for(let R=0;R<k.length;R++)r(k[R],v,h&&h.children[R])}h=h||v}return m?()=>{l(m)}:Wn}function l(f){if(kc(f)){const d=s.get(f);d&&(s.delete(f),n.splice(n.indexOf(d),1),d.children.forEach(l),d.alias.forEach(l))}else{const d=n.indexOf(f);d>-1&&(n.splice(d,1),f.record.name&&s.delete(f.record.name),f.children.forEach(l),f.alias.forEach(l))}}function i(){return n}function c(f){const d=kd(f,n);n.splice(d,0,f),f.record.name&&!_l(f)&&s.set(f.record.name,f)}function a(f,d){let h,x={},y,I;if("name"in f&&f.name){if(h=s.get(f.name),!h)throw En(1,{location:f});I=h.record.name,x=ye(ml(d.params,h.keys.filter(m=>!m.optional).concat(h.parent?h.parent.keys.filter(m=>m.optional):[]).map(m=>m.name)),f.params&&ml(f.params,h.keys.map(m=>m.name))),y=h.stringify(x)}else if(f.path!=null)y=f.path,h=n.find(m=>m.re.test(y)),h&&(x=h.parse(y),I=h.record.name);else{if(h=d.name?s.get(d.name):n.find(m=>m.re.test(d.path)),!h)throw En(1,{location:f,currentLocation:d});I=h.record.name,x=ye({},d.params,f.params),y=h.stringify(x)}const w=[];let v=h;for(;v;)w.unshift(v.record),v=v.parent;return{name:I,path:y,params:x,matched:w,meta:Cd(w)}}e.forEach(f=>r(f));function u(){n.length=0,s.clear()}return{addRoute:r,resolve:a,removeRoute:l,clearRoutes:u,getRoutes:i,getRecordMatcher:o}}function ml(e,t){const n={};for(const s of t)s in e&&(n[s]=e[s]);return n}function vl(e){const t={path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:e.aliasOf,beforeEnter:e.beforeEnter,props:wd(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in e?e.components||null:e.component&&{default:e.component}};return Object.defineProperty(t,"mods",{value:{}}),t}function wd(e){const t={},n=e.props||!1;if("component"in e)t.default=n;else for(const s in e.components)t[s]=typeof n=="object"?n[s]:n;return t}function _l(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function Cd(e){return e.reduce((t,n)=>ye(t,n.meta),{})}function yl(e,t){const n={};for(const s in e)n[s]=s in t?t[s]:e[s];return n}function kd(e,t){let n=0,s=t.length;for(;n!==s;){const r=n+s>>1;Sc(e,t[r])<0?s=r:n=r+1}const o=xd(e);return o&&(s=t.lastIndexOf(o,s-1)),s}function xd(e){let t=e;for(;t=t.parent;)if(Ec(t)&&Sc(e,t)===0)return t}function Ec({record:e}){return!!(e.name||e.components&&Object.keys(e.components).length||e.redirect)}function Sd(e){const t={};if(e===""||e==="?")return t;const s=(e[0]==="?"?e.slice(1):e).split("&");for(let o=0;o<s.length;++o){const r=s[o].replace(vc," "),l=r.indexOf("="),i=ss(l<0?r:r.slice(0,l)),c=l<0?null:ss(r.slice(l+1));if(i in t){let a=t[i];ht(a)||(a=t[i]=[a]),a.push(c)}else t[i]=c}return t}function bl(e){let t="";for(let n in e){const s=e[n];if(n=Uf(n),s==null){s!==void 0&&(t+=(t.length?"&":"")+n);continue}(ht(s)?s.map(r=>r&&To(r)):[s&&To(s)]).forEach(r=>{r!==void 0&&(t+=(t.length?"&":"")+n,r!=null&&(t+="="+r))})}return t}function Ed(e){const t={};for(const n in e){const s=e[n];s!==void 0&&(t[n]=ht(s)?s.map(o=>o==null?null:""+o):s==null?s:""+s)}return t}const Rd=Symbol(""),wl=Symbol(""),Gs=Symbol(""),Rc=Symbol(""),Lo=Symbol("");function $n(){let e=[];function t(s){return e.push(s),()=>{const o=e.indexOf(s);o>-1&&e.splice(o,1)}}function n(){e=[]}return{add:t,list:()=>e.slice(),reset:n}}function Wt(e,t,n,s,o,r=l=>l()){const l=s&&(s.enterCallbacks[o]=s.enterCallbacks[o]||[]);return()=>new Promise((i,c)=>{const a=d=>{d===!1?c(En(4,{from:n,to:t})):d instanceof Error?c(d):fd(d)?c(En(2,{from:t,to:d})):(l&&s.enterCallbacks[o]===l&&typeof d=="function"&&l.push(d),i())},u=r(()=>e.call(s&&s.instances[o],t,n,a));let f=Promise.resolve(u);e.length<3&&(f=f.then(a)),f.catch(d=>c(d))})}function mo(e,t,n,s,o=r=>r()){const r=[];for(const l of e)for(const i in l.components){let c=l.components[i];if(!(t!=="beforeRouteEnter"&&!l.instances[i]))if(gc(c)){const u=(c.__vccOpts||c)[t];u&&r.push(Wt(u,n,s,l,i,o))}else{let a=c();r.push(()=>a.then(u=>{if(!u)throw new Error(`Couldn't resolve component "${i}" at "${l.path}"`);const f=Tf(u)?u.default:u;l.mods[i]=u,l.components[i]=f;const h=(f.__vccOpts||f)[t];return h&&Wt(h,n,s,l,i,o)()}))}}return r}function Cl(e){const t=Se(Gs),n=Se(Rc),s=ve(()=>{const c=M(e.to);return t.resolve(c)}),o=ve(()=>{const{matched:c}=s.value,{length:a}=c,u=c[a-1],f=n.matched;if(!u||!f.length)return-1;const d=f.findIndex(Sn.bind(null,u));if(d>-1)return d;const h=kl(c[a-2]);return a>1&&kl(u)===h&&f[f.length-1].path!==h?f.findIndex(Sn.bind(null,c[a-2])):d}),r=ve(()=>o.value>-1&&$d(n.params,s.value.params)),l=ve(()=>o.value>-1&&o.value===n.matched.length-1&&wc(n.params,s.value.params));function i(c={}){if(Id(c)){const a=t[M(e.replace)?"replace":"push"](M(e.to)).catch(Wn);return e.viewTransition&&typeof document<"u"&&"startViewTransition"in document&&document.startViewTransition(()=>a),a}return Promise.resolve()}return{route:s,href:ve(()=>s.value.href),isActive:r,isExactActive:l,navigate:i}}function Md(e){return e.length===1?e[0]:e}const Pd=_e({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:Cl,setup(e,{slots:t}){const n=Ct(Cl(e)),{options:s}=Se(Gs),o=ve(()=>({[xl(e.activeClass,s.linkActiveClass,"router-link-active")]:n.isActive,[xl(e.exactActiveClass,s.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const r=t.default&&Md(t.default(n));return e.custom?r:an("a",{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:o.value},r)}}}),Ad=Pd;function Id(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget&&e.currentTarget.getAttribute){const t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function $d(e,t){for(const n in t){const s=t[n],o=e[n];if(typeof s=="string"){if(s!==o)return!1}else if(!ht(o)||o.length!==s.length||s.some((r,l)=>r!==o[l]))return!1}return!0}function kl(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const xl=(e,t,n)=>e??t??n,Td=_e({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){const s=Se(Lo),o=ve(()=>e.route||s.value),r=Se(wl,0),l=ve(()=>{let a=M(r);const{matched:u}=o.value;let f;for(;(f=u[a])&&!f.components;)a++;return a}),i=ve(()=>o.value.matched[l.value]);Je(wl,ve(()=>l.value+1)),Je(Rd,i),Je(Lo,o);const c=ne();return It(()=>[c.value,i.value,e.name],([a,u,f],[d,h,x])=>{u&&(u.instances[f]=a,h&&h!==u&&a&&a===d&&(u.leaveGuards.size||(u.leaveGuards=h.leaveGuards),u.updateGuards.size||(u.updateGuards=h.updateGuards))),a&&u&&(!h||!Sn(u,h)||!d)&&(u.enterCallbacks[f]||[]).forEach(y=>y(a))},{flush:"post"}),()=>{const a=o.value,u=e.name,f=i.value,d=f&&f.components[u];if(!d)return Sl(n.default,{Component:d,route:a});const h=f.props[u],x=h?h===!0?a.params:typeof h=="function"?h(a):h:null,I=an(d,ye({},x,t,{onVnodeUnmounted:w=>{w.component.isUnmounted&&(f.instances[u]=null)},ref:c}));return Sl(n.default,{Component:I,route:a})||I}}});function Sl(e,t){if(!e)return null;const n=e(t);return n.length===1?n[0]:n}const Mc=Td;function Od(e){const t=bd(e.routes,e),n=e.parseQuery||Sd,s=e.stringifyQuery||bl,o=e.history,r=$n(),l=$n(),i=$n(),c=Hs(Ft);let a=Ft;mn&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const u=ho.bind(null,b=>""+b),f=ho.bind(null,Kf),d=ho.bind(null,ss);function h(b,K){let B,W;return kc(b)?(B=t.getRecordMatcher(b),W=K):W=b,t.addRoute(W,B)}function x(b){const K=t.getRecordMatcher(b);K&&t.removeRoute(K)}function y(){return t.getRoutes().map(b=>b.record)}function I(b){return!!t.getRecordMatcher(b)}function w(b,K){if(K=ye({},K||c.value),typeof b=="string"){const g=go(n,b,K.path),E=t.resolve({path:g.path},K),T=o.createHref(g.fullPath);return ye(g,E,{params:d(E.params),hash:ss(g.hash),redirectedFrom:void 0,href:T})}let B;if(b.path!=null)B=ye({},b,{path:go(n,b.path,K.path).path});else{const g=ye({},b.params);for(const E in g)g[E]==null&&delete g[E];B=ye({},b,{params:f(g)}),K.params=f(K.params)}const W=t.resolve(B,K),de=b.hash||"";W.params=u(d(W.params));const ke=Jf(s,ye({},b,{hash:Wf(de),path:W.path})),p=o.createHref(ke);return ye({fullPath:ke,hash:de,query:s===bl?Ed(b.query):b.query||{}},W,{redirectedFrom:void 0,href:p})}function v(b){return typeof b=="string"?go(n,b,c.value.path):ye({},b)}function m(b,K){if(a!==b)return En(8,{from:K,to:b})}function _(b){return R(b)}function S(b){return _(ye(v(b),{replace:!0}))}function k(b){const K=b.matched[b.matched.length-1];if(K&&K.redirect){const{redirect:B}=K;let W=typeof B=="function"?B(b):B;return typeof W=="string"&&(W=W.includes("?")||W.includes("#")?W=v(W):{path:W},W.params={}),ye({query:b.query,hash:b.hash,params:W.path!=null?{}:b.params},W)}}function R(b,K){const B=a=w(b),W=c.value,de=b.state,ke=b.force,p=b.replace===!0,g=k(B);if(g)return R(ye(v(g),{state:typeof g=="object"?ye({},de,g.state):de,force:ke,replace:p}),K||B);const E=B;E.redirectedFrom=K;let T;return!ke&&Yf(s,W,B)&&(T=En(16,{to:E,from:W}),fe(W,W,!0,!1)),(T?Promise.resolve(T):N(E,W)).catch(P=>Et(P)?Et(P,2)?P:He(P):ue(P,E,W)).then(P=>{if(P){if(Et(P,2))return R(ye({replace:p},v(P.to),{state:typeof P.to=="object"?ye({},de,P.to.state):de,force:ke}),K||E)}else P=H(E,W,!0,p,de);return q(E,W,P),P})}function D(b,K){const B=m(b,K);return B?Promise.reject(B):Promise.resolve()}function C(b){const K=J.values().next().value;return K&&typeof K.runWithContext=="function"?K.runWithContext(b):b()}function N(b,K){let B;const[W,de,ke]=Ld(b,K);B=mo(W.reverse(),"beforeRouteLeave",b,K);for(const g of W)g.leaveGuards.forEach(E=>{B.push(Wt(E,b,K))});const p=D.bind(null,b,K);return B.push(p),Q(B).then(()=>{B=[];for(const g of r.list())B.push(Wt(g,b,K));return B.push(p),Q(B)}).then(()=>{B=mo(de,"beforeRouteUpdate",b,K);for(const g of de)g.updateGuards.forEach(E=>{B.push(Wt(E,b,K))});return B.push(p),Q(B)}).then(()=>{B=[];for(const g of ke)if(g.beforeEnter)if(ht(g.beforeEnter))for(const E of g.beforeEnter)B.push(Wt(E,b,K));else B.push(Wt(g.beforeEnter,b,K));return B.push(p),Q(B)}).then(()=>(b.matched.forEach(g=>g.enterCallbacks={}),B=mo(ke,"beforeRouteEnter",b,K,C),B.push(p),Q(B))).then(()=>{B=[];for(const g of l.list())B.push(Wt(g,b,K));return B.push(p),Q(B)}).catch(g=>Et(g,8)?g:Promise.reject(g))}function q(b,K,B){i.list().forEach(W=>C(()=>W(b,K,B)))}function H(b,K,B,W,de){const ke=m(b,K);if(ke)return ke;const p=K===Ft,g=mn?history.state:{};B&&(W||p?o.replace(b.fullPath,ye({scroll:p&&g&&g.scroll},de)):o.push(b.fullPath,de)),c.value=b,fe(b,K,B,p),He()}let Z;function Y(){Z||(Z=o.listen((b,K,B)=>{if(!L.listening)return;const W=w(b),de=k(W);if(de){R(ye(de,{replace:!0,force:!0}),W).catch(Wn);return}a=W;const ke=c.value;mn&&od(fl(ke.fullPath,B.delta),qs()),N(W,ke).catch(p=>Et(p,12)?p:Et(p,2)?(R(ye(v(p.to),{force:!0}),W).then(g=>{Et(g,20)&&!B.delta&&B.type===os.pop&&o.go(-1,!1)}).catch(Wn),Promise.reject()):(B.delta&&o.go(-B.delta,!1),ue(p,W,ke))).then(p=>{p=p||H(W,ke,!1),p&&(B.delta&&!Et(p,8)?o.go(-B.delta,!1):B.type===os.pop&&Et(p,20)&&o.go(-1,!1)),q(W,ke,p)}).catch(Wn)}))}let ce=$n(),ie=$n(),ee;function ue(b,K,B){He(b);const W=ie.list();return W.length?W.forEach(de=>de(b,K,B)):console.error(b),Promise.reject(b)}function Te(){return ee&&c.value!==Ft?Promise.resolve():new Promise((b,K)=>{ce.add([b,K])})}function He(b){return ee||(ee=!b,Y(),ce.list().forEach(([K,B])=>b?B(b):K()),ce.reset()),b}function fe(b,K,B,W){const{scrollBehavior:de}=e;if(!mn||!de)return Promise.resolve();const ke=!B&&rd(fl(b.fullPath,0))||(W||!B)&&history.state&&history.state.scroll||null;return Ze().then(()=>de(b,K,ke)).then(p=>p&&sd(p)).catch(p=>ue(p,b,K))}const Oe=b=>o.go(b);let it;const J=new Set,L={currentRoute:c,listening:!0,addRoute:h,removeRoute:x,clearRoutes:t.clearRoutes,hasRoute:I,getRoutes:y,resolve:w,options:e,push:_,replace:S,go:Oe,back:()=>Oe(-1),forward:()=>Oe(1),beforeEach:r.add,beforeResolve:l.add,afterEach:i.add,onError:ie.add,isReady:Te,install(b){const K=this;b.component("RouterLink",Ad),b.component("RouterView",Mc),b.config.globalProperties.$router=K,Object.defineProperty(b.config.globalProperties,"$route",{enumerable:!0,get:()=>M(c)}),mn&&!it&&c.value===Ft&&(it=!0,_(o.location).catch(de=>{}));const B={};for(const de in Ft)Object.defineProperty(B,de,{get:()=>c.value[de],enumerable:!0});b.provide(Gs,K),b.provide(Rc,fi(B)),b.provide(Lo,c);const W=b.unmount;J.add(b),b.unmount=function(){J.delete(b),J.size<1&&(a=Ft,Z&&Z(),Z=null,c.value=Ft,it=!1,ee=!1),W()}}};function Q(b){return b.reduce((K,B)=>K.then(()=>C(B)),Promise.resolve())}return L}function Ld(e,t){const n=[],s=[],o=[],r=Math.max(t.matched.length,e.matched.length);for(let l=0;l<r;l++){const i=t.matched[l];i&&(e.matched.find(a=>Sn(a,i))?s.push(i):n.push(i));const c=e.matched[l];c&&(t.matched.find(a=>Sn(a,c))||o.push(c))}return[n,s,o]}function ir(){return Se(Gs)}function Pc(e){if(e===0)return"empty";for(const t of[null,"kB","MB","GB","TB","PB","EB"]){if(e<1e4)return e.toLocaleString().replace(","," ")+(t?` ${t}`:"");e=Math.round(e/1e3)}return"huge"}function Dd(e){const t=new Date(e*1e3),n=new Date,s=t.getTime()-n.getTime(),o=Math.abs(s),r=new Intl.RelativeTimeFormat("en",{numeric:"auto"});if(o<=5e3)return"now";if(o<=6e4)return r.format(Math.round(s/1e3),"second").replace(" ago","").replaceAll(" "," ");if(o<=36e5)return r.format(Math.round(s/6e4),"minute").replace("utes","").replace("ute","").replaceAll(" "," ");if(o<=864e5)return r.format(Math.round(s/36e5),"hour").replaceAll(" "," ");if(o<=6048e5)return r.format(Math.round(s/864e5),"day").replaceAll(" "," ");let l=t.toLocaleDateString("en-ie",{weekday:"short",year:"numeric",month:"short",day:"numeric"}).replace("Sept","Sep");return l.length===14&&(l=l.replace(" "," ")),l=l.replaceAll(" "," ").replace(" "," "),l=l.slice(0,-4)+l.slice(-2),l}const rs=new Intl.Collator("en",{sensitivity:"base",numeric:!0,usage:"search"});function Fd(e){return"^"+e.normalize("NFKD").replace(/[\u0300-\u036f]/g,"").toLowerCase()+"$"}function Nd(e){const t=e.normalize("NFKD").replace(/[\u0300-\u036f]/g,"").toLowerCase();return{based:t,words:t.split(/\s+/)}}function Hd(e,t){const{based:n,words:s}=t;return e.includes(n)||s&&s.every(o=>e.includes(o))}class cr{constructor(t={}){kt(this,"_name","");kt(this,"loc","");kt(this,"key","");kt(this,"size",0);kt(this,"mtime",0);kt(this,"haystack","");kt(this,"dir",!1);Object.assign(this,t)}get name(){return this._name}set name(t){if(t.includes("/")||t.startsWith("."))throw Error(`Invalid name: ${t}`);this._name=t,this.haystack=Fd(t)}get sizedisp(){return Pc(this.size)}get modified(){return Dd(this.mtime)}get url(){const t=this.loc?`${this.loc}/${this.name}`:this.name;return this.dir?"/#/"+`${t}/`.replaceAll("#","%23"):`/files/${t}`.replaceAll("?","%3F").replaceAll("#","%23")}get urlrouter(){return this.url.replace(/^\/#/,"")}get img(){return this.dir?!1:["jpg","jpeg","png","gif","webp","avif","heic","heif","svg"].includes(this.ext)}get previewable(){return this.dir?!1:this.img?!0:["mp4","mkv","webm","ogg","mp3","flac","aac","pdf"].includes(this.ext)}get previewurl(){return this.url.replace(/^\/files/,"/preview")}get ext(){const t=this.name.lastIndexOf(".");return t===-1||t===this.name.length-1?"":this.name.slice(t+1).toLowerCase()}}class Bd{async get(t){const n=await fetch(t,{method:"GET",headers:{accept:"application/json"}});let s;try{s=await n.json()}catch{throw new Nt(n.status,`🛑 ${n.status} ${n.statusText}`)}if("error"in s)throw new Nt(s.error.code,s.error.message);return s}async post(t,n){const s=await fetch(t,{method:"POST",headers:{accept:"application/json","content-type":"application/json"},body:n!==void 0?JSON.stringify(n):void 0});let o;try{o=await s.json()}catch{throw new Nt(s.status,`🛑 ${s.status} ${s.statusText}`)}if("error"in o)throw new Nt(o.error.code,o.error.message);return o}async put(t,n){const s=await fetch(t,{method:"PUT",headers:{accept:"application/json","content-type":"application/json"},body:n!==void 0?JSON.stringify(n):void 0});let o;try{o=await s.json()}catch{throw new Nt(s.status,`🛑 ${s.status} ${s.statusText}`)}if("error"in o)throw new Nt(o.error.code,o.error.message);return o}async delete(t){const n=await fetch(t,{method:"DELETE",headers:{accept:"application/json"}});let s;try{s=await n.json()}catch{throw new Nt(n.status,`🛑 ${n.status} ${n.statusText}`)}if("error"in s)throw new Nt(s.error.code,s.error.message);return s}}const Yt=new Bd;class Nt extends Error{constructor(n,s){super(s);kt(this,"code");this.code=n}}const jd="/login",Vd="/logout",Wd="/password-change";async function Ud(e,t){return await Yt.post(jd,{username:e,password:t})}async function zd(){return await Yt.post(Vd)}async function Kd(e,t,n){return await Yt.post(Wd,{username:e,passwordChange:t,password:n})}const Js="/users";async function qd(){return await Yt.get(Js)}async function El(e,t,n){return await Yt.post(Js,{username:e,password:t,privileged:n})}async function Rl(e,t){return await Yt.put(`${Js}/${e}`,t)}async function Ml(e){return await Yt.delete(`${Js}/${e}`)}async function Gd(e){return await Yt.put("/config/public",{public:e})}const ls="/api/control",Jd="/api/upload",Yd="/api/watch";let bt=[],Cs=500,zn=null;const Zd=()=>{const e=localStorage["cista-files"];if(!e)return!1;const t=Ie();try{return bt=JSON.parse(e),t.updateRoot(bt),console.log(`Loaded session with ${bt.length} items cached`),!0}catch(n){return console.log("Loading session failed",n),!1}},Ac=()=>{localStorage["cista-files"]=JSON.stringify(bt)},un=(e,t)=>{const n=new WebSocket(new URL(e,location.origin.replace(/^http/,"ws")));for(const[s,o]of Object.entries(t))n.addEventListener(s,o);return n},ar=()=>{on!==null&&(clearTimeout(on),on=null);const e=Ie();e.error!=="Reconnecting..."&&(e.error="Connecting..."),console.log(e.error),zn=un(Yd,{message:Qd,close:Ic}),zn.addEventListener("message",t=>{if(e.connected)return;const n=JSON.parse(t.data);if("error"in n){n.error.code===401?(e.user.isLoggedIn=!1,e.dialog="login"):e.error=n.error.message;return}"server"in n&&(console.log("Connected to backend",n),e.server=n.server,e.connected=!0,Cs=500,e.error="",n.user?e.login(n.user.username,n.user.privileged):e.isUserLogged&&e.logout(),!n.server.public&&!n.user&&(e.dialog="login"))})},Xd=()=>{zn&&(zn.close(),zn=null)};let on=null;const Ic=e=>{const t=Ie();if(t.connected&&(console.warn("Disconnected from server",e),t.connected=!1,t.error="Reconnecting..."),on!==null&&clearTimeout(on),t.dialog==="login"){on=setTimeout(Ic,100);return}Cs=Math.min(5e3,Cs+500),on=setTimeout(ar,Cs)},Qd=e=>{const t=JSON.parse(e.data);switch(!0){case!!t.root:ep(t);break;case!!t.update:tp(t);break;case!!t.space:console.log("Watch space",t.space);break;case!!t.error:np(t);break}};function ep({root:e}){const t=Ie();console.log("Watch root",e),t.updateRoot(e),bt=e,Ac()}function tp(e){const t=Ie(),n=e.update;if(console.log("Watch update",n),!bt)return console.error("Watch update before root");let s=[],o=0;for(const[r,l]of n)r==="k"?(s.push(...bt.slice(o,o+l)),o+=l):r==="d"?o+=l:r==="i"?s.push(...l):console.log("Unknown update action",r,l);if(o!=bt.length)throw Error(`Tree update out of sync, number of entries mismatch: got ${o}, expected ${bt.length}, new tree ${s.length}`);t.updateRoot(s),bt=s,Ac()}function np(e){const t=Ie();if(e.error.code===401){t.user.isLoggedIn=!1,t.dialog="login";return}}const sp={name:(e,t)=>rs.compare(e.name,t.name),modified:(e,t)=>t.mtime-e.mtime,size:(e,t)=>t.size-e.size},Do=(e,t)=>{if(!t)return e;const n=[...e];return n.sort(sp[t]),n},Ie=Cf({id:"main",state:()=>({document:Hs([]),selected:new Set([]),query:"",fileExplorer:null,error:"",connected:!1,cursor:"",server:{},dialog:"",uprogress:{},dprogress:{},prefs:{gallery:!1,sortListing:"",sortFiltered:""},user:{username:"",privileged:!1,isLoggedIn:!1}}),persist:{paths:["prefs","cursor","selected"],serializer:{deserialize:e=>{const t=JSON.parse(e);return t.selected=new Set(t.selected),t},serialize:e=>(e.selected=Array.from(e.selected),JSON.stringify(e))}},actions:{updateRoot(e){const t=[];let n=[];for(const[s,o,r,l,i,c]of e)n=n.slice(0,s-1),t.push(new cr({name:o,loc:s?n.join("/"):"/",key:r,size:i,mtime:l,dir:!c})),n.push(o);this.document=t},login(e,t){this.user.username=e,this.user.privileged=t,this.user.isLoggedIn=!0,this.dialog="",this.connected||ar()},loginDialog(){this.dialog="login"},async logout(){console.log("Logout"),await zd(),this.$reset(),localStorage.clear(),history.go()},toggleSort(e){this.query?this.prefs.sortFiltered=this.prefs.sortFiltered===e?"":e:this.prefs.sortListing=this.prefs.sortListing===e?"":e},sort(e){this.query?this.prefs.sortFiltered=e:this.prefs.sortListing=e},focusBreadcrumb(){document.querySelector(".breadcrumb").focus()},cancelDownloads(){location.reload()},cancelUploads(){location.reload()}},getters:{sortOrder(){return this.query?this.prefs.sortFiltered:this.prefs.sortListing},isUserLogged(){return this.user.isLoggedIn},recentDocuments(){return Do(this.document,"modified")},selectedFiles(){const e=this.selected,t=new Set,n={missing:new Set,docs:{},keys:[],recursive:[]};for(const r of this.document)e.has(r.key)&&(t.add(r.key),n.keys.push(r.key),n.docs[r.key]=r);for(const r of e)t.has(r)||n.missing.add(r);const s=new Set;function o(r,l,i){if(!i.dir&&s.has(r))throw Error(`Multiple selections conflict for: ${r}`);s.add(r),n.recursive.push([r,l,i])}for(const r of n.keys){const l=n.docs[r],i=l.loc?`${l.loc}/${l.name}`:l.name,c=l.loc.length;o(l.name,i,l);for(const a of this.document)if(a.loc===i||a.loc.startsWith(i)&&a.loc[i.length]==="/"){const u=a.loc?`${a.loc}/${a.name}`:a.name,f=u.slice(c);o(f,u,a)}}return n.recursive.sort((r,l)=>rs.compare(r[0],l[0])),n}}}),$c=e=>{const t=Ie(),n=e.join("/");return t.document.some(s=>(s.loc?`${s.loc}/${s.name}`:s.name)===n)},op=["aria-current"],rp=["href","aria-current","onClick","title"],ur=_e({__name:"BreadCrumb",props:{path:{},primary:{type:Boolean}},setup(e){const t=ir(),n=[],s=(u,f)=>{f&&(n[u]=f)};Ii(()=>{n.length=1});const o=e,r=ne([]),l=u=>u==o.path.length?"location":void 0,i=()=>{Ze(()=>{const u=o.path.length;u<n.length&&n[u].focus()})},c=u=>{if(!n[u])throw Error(`No link at index ${u} (path: ${o.path})`);const d=u?`/${r.value.slice(0,u).join("/")}/`:"/",h=r.value.length?`/${r.value.join("/")}/`:"/",x=decodeURIComponent(location.hash.slice(1).split("//")[0]),y=d.replaceAll("?","%3F").replaceAll("#","%23");l(u)?(r.value.splice(u),t.push(y)):h.startsWith(x)?t.replace(y):t.push(y)},a=u=>{const f=o.path.length+u;f<0||f>r.value.length||c(f)};return Ot(()=>{const u=r.value.slice(0,o.path.length);if(!u.every((d,h)=>d===o.path[h]))r.value=o.path;else if(o.path.length>u.length)r.value=u.concat(o.path.slice(u.length));else for(let d=o.path.length;d<r.value.length;++d)if(!$c(r.value.slice(0,d+1))){r.value=r.value.slice(0,d);break}o.primary&&Ze(()=>{const d=document.activeElement;(!d||[...n,document.body].includes(d))&&i()})}),(u,f)=>($(),G("nav",{class:"breadcrumb","aria-label":"Breadcrumb",onKeydown:[f[1]||(f[1]=Cn(Ne(d=>a(-1),["stop"]),["left"])),f[2]||(f[2]=Cn(Ne(d=>a(1),["stop"]),["right"]))],onKeyup:f[3]||(f[3]=Cn(d=>a(0),["enter"])),onFocus:i,tabindex:"0"},[A("a",{href:"#/",ref:d=>s(0,d),class:De(["home",{current:!!l(0)}]),"aria-current":l(0),onClick:f[0]||(f[0]=Ne(d=>c(0),["prevent"])),title:"/"},[($(),pe(Qo(M(hc))))],10,op),($(!0),G(we,null,Mn(r.value,(d,h)=>($(),G("a",{key:h,href:`/#/${r.value.slice(0,h+1).join("/")}/`,class:De({current:!!l(h+1)}),"aria-current":l(h+1),onClick:Ne(x=>c(h+1),["prevent"]),ref_for:!0,ref:x=>s(h+1,x),title:`/${r.value.slice(0,h+1).join("/")}`},Pe(d),11,rp))),128))],32))}});const lp="modulepreload",ip=function(e){return"/"+e},Pl={},te=function(t,n,s){if(!n||n.length===0)return t();const o=document.getElementsByTagName("link");return Promise.all(n.map(r=>{if(r=ip(r),r in Pl)return;Pl[r]=!0;const l=r.endsWith(".css"),i=l?'[rel="stylesheet"]':"";if(s)for(let a=o.length-1;a>=0;a--){const u=o[a];if(u.href===r&&(!l||u.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${r}"]${i}`))return;const c=document.createElement("link");if(c.rel=l?"stylesheet":lp,l||(c.as="script",c.crossOrigin=""),c.href=r,document.head.appendChild(c),l)return new Promise((a,u)=>{c.addEventListener("load",a),c.addEventListener("error",()=>u(new Error(`Unable to preload CSS for ${r}`)))})})).then(()=>t()).catch(r=>{const l=new Event("vite:preloadError",{cancelable:!0});if(l.payload=r,window.dispatchEvent(l),!l.defaultPrevented)throw r})},cp=(e,t)=>{const n=e[t];return n?typeof n=="function"?n():Promise.resolve(n):new Promise((s,o)=>{(typeof queueMicrotask=="function"?queueMicrotask:setTimeout)(o.bind(null,new Error("Unknown variable dynamic import: "+t)))})},ap={class:"action-button"},Ys=_e({__name:"SvgButton",props:{name:{}},setup(e){const t=e,n=Fa(()=>cp(Object.assign({"../assets/svg/add-file.svg":()=>te(()=>import("./add-file-8c95935e.js"),[]),"../assets/svg/add-folder.svg":()=>te(()=>import("./add-folder-86d38756.js"),[]),"../assets/svg/arrow.svg":()=>te(()=>import("./arrow-75fe0244.js"),[]),"../assets/svg/arrows-h.svg":()=>te(()=>import("./arrows-h-7cc7ed45.js"),[]),"../assets/svg/arrows-v.svg":()=>te(()=>import("./arrows-v-6ba20f93.js"),[]),"../assets/svg/check.svg":()=>te(()=>import("./check-2847ad21.js"),[]),"../assets/svg/code.svg":()=>te(()=>import("./code-a7719923.js"),[]),"../assets/svg/cog.svg":()=>te(()=>Promise.resolve().then(()=>Gp),void 0),"../assets/svg/copy.svg":()=>te(()=>import("./copy-3449d27d.js"),[]),"../assets/svg/create-file.svg":()=>te(()=>import("./create-file-a1cd75fd.js"),[]),"../assets/svg/create-folder.svg":()=>te(()=>import("./create-folder-59db9ded.js"),[]),"../assets/svg/cross.svg":()=>te(()=>import("./cross-38ada808.js"),[]),"../assets/svg/disk.svg":()=>te(()=>import("./disk-39a6808b.js"),[]),"../assets/svg/download.svg":()=>te(()=>import("./download-dfa3cb2c.js"),[]),"../assets/svg/exclamation.svg":()=>te(()=>import("./exclamation-1b2064ee.js"),[]),"../assets/svg/eye.svg":()=>te(()=>import("./eye-8ad3b932.js"),[]),"../assets/svg/find.svg":()=>te(()=>import("./find-7e0bf1e0.js"),[]),"../assets/svg/fullscreen.svg":()=>te(()=>import("./fullscreen-e21f0ea1.js"),[]),"../assets/svg/github.svg":()=>te(()=>import("./github-33a0fb51.js"),[]),"../assets/svg/home.svg":()=>te(()=>Promise.resolve().then(()=>$f),void 0),"../assets/svg/info.svg":()=>te(()=>import("./info-f30cd4b4.js"),[]),"../assets/svg/link.svg":()=>te(()=>import("./link-3a6a01b8.js"),[]),"../assets/svg/logo.svg":()=>te(()=>import("./logo-a02885a3.js"),[]),"../assets/svg/loop.svg":()=>te(()=>import("./loop-17dda54a.js"),[]),"../assets/svg/menu.svg":()=>te(()=>import("./menu-e088a6cc.js"),[]),"../assets/svg/next.svg":()=>te(()=>import("./next-c83214f4.js"),[]),"../assets/svg/open.svg":()=>te(()=>import("./open-bdcf30c3.js"),[]),"../assets/svg/paste.svg":()=>te(()=>import("./paste-b1ebeeae.js"),[]),"../assets/svg/pause.svg":()=>te(()=>import("./pause-c44d983d.js"),[]),"../assets/svg/pencil.svg":()=>te(()=>import("./pencil-70ceb3cc.js"),[]),"../assets/svg/play.svg":()=>te(()=>import("./play-38e640b3.js"),[]),"../assets/svg/plus.svg":()=>te(()=>import("./plus-d2e20553.js"),[]),"../assets/svg/previous.svg":()=>te(()=>import("./previous-78dea9b8.js"),[]),"../assets/svg/reload.svg":()=>te(()=>import("./reload-61c8cee7.js"),[]),"../assets/svg/rename.svg":()=>te(()=>import("./rename-202f8bc5.js"),[]),"../assets/svg/scissors.svg":()=>te(()=>import("./scissors-9235051c.js"),[]),"../assets/svg/shuffle.svg":()=>te(()=>import("./shuffle-fd56ec51.js"),[]),"../assets/svg/signin.svg":()=>te(()=>import("./signin-494e0573.js"),[]),"../assets/svg/signout.svg":()=>te(()=>import("./signout-4047ccde.js"),[]),"../assets/svg/skip.svg":()=>te(()=>import("./skip-bb8e721d.js"),[]),"../assets/svg/spinner.svg":()=>te(()=>import("./spinner-8c3861ee.js"),[]),"../assets/svg/stop.svg":()=>te(()=>import("./stop-d670a372.js"),[]),"../assets/svg/trash.svg":()=>te(()=>import("./trash-6a339a1b.js"),[]),"../assets/svg/triangle.svg":()=>te(()=>import("./triangle-9358f5e4.js"),[]),"../assets/svg/unfullscreen.svg":()=>te(()=>import("./unfullscreen-792a694f.js"),[]),"../assets/svg/up-arrow.svg":()=>te(()=>import("./up-arrow-f518550f.js"),[]),"../assets/svg/upload-cloud.svg":()=>te(()=>import("./upload-cloud-5f1a71c5.js"),[]),"../assets/svg/user-cog.svg":()=>te(()=>import("./user-cog-5cefd313.js"),[]),"../assets/svg/user.svg":()=>te(()=>import("./user-2d17adce.js"),[]),"../assets/svg/volume-high.svg":()=>te(()=>import("./volume-high-151aaf83.js"),[]),"../assets/svg/volume-low.svg":()=>te(()=>import("./volume-low-8ffa3894.js"),[]),"../assets/svg/volume-medium.svg":()=>te(()=>import("./volume-medium-7b38c87d.js"),[]),"../assets/svg/volume-mute.svg":()=>te(()=>import("./volume-mute-4e81ae44.js"),[]),"../assets/svg/window-cross.svg":()=>te(()=>import("./window-cross-ce8f66c3.js"),[]),"../assets/svg/window.svg":()=>te(()=>import("./window-dec8f28e.js"),[]),"../assets/svg/wordwrap.svg":()=>te(()=>import("./wordwrap-4618846d.js"),[]),"../assets/svg/zoomin.svg":()=>te(()=>import("./zoomin-d821154d.js"),[]),"../assets/svg/zoomout.svg":()=>te(()=>import("./zoomout-faf726ac.js"),[])}),`../assets/svg/${t.name}.svg`));return(s,o)=>($(),G("button",ap,[($(),pe(Qo(M(n)))),Fe(s.$slots,"default")]))}});const up=_e({__name:"UploadButton",props:{path:Array},setup(e){const t=ne(),n=ne(),s=Ie(),o=e;function r(_){var D;const S=Array.from(((D=_.clipboardData)==null?void 0:D.items)??[]),k=[],R=[];for(const C of S){if(C.kind!=="file")continue;const N=C.webkitGetAsEntry();if(N!=null&&N.isFile){const q=C.getAsFile();q&&k.push(q)}else N!=null&&N.isDirectory&&R.push(N)}if(k.length||R.length){_.preventDefault(),c(k);for(const C of R)l(C,`${o.path.join("/")}/${C.name}`)}}const l=async(_,S)=>{const k=_.createReader(),R=await new Promise(C=>k.readEntries(C)),D=[];for(const C of R){const N=`${S}/${C.name}`;if(C.isFile){const q=await new Promise(H=>C.file(H));D.push({file:q,cloudName:N,cloudPos:0})}else C.isDirectory&&await l(C,N)}D.length&&a(D)};function i(_){var R;_.preventDefault();const S=_.target,k=Array.from(((R=S??_.dataTransfer)==null?void 0:R.files)??[]);S&&(S.value=""),k.length&&c(k)}const c=_=>{const S=o.path.join("/");let k=[];for(const R of _)k.push({file:R,cloudName:S+"/"+(R.webkitRelativePath||R.name),cloudPos:0});a(k)},a=_=>{const S=_.filter(k=>k.cloudName.includes("/."));S.length&&(s.error="Won't upload dotfiles",console.log("Dotfiles omitted",S),_=_.filter(k=>!k.cloudName.includes("/."))),_.length&&(_.sort((k,R)=>rs.compare(k.cloudName,R.cloudName)),y=[...y,..._],x(_),m())},u={total:0,xfer:0,t0:0,tlast:0,statbytes:0,statdur:0,files:[],filestart:0,fileidx:0,filecount:0,filename:"",filesize:0,filepos:0,status:"idle"};s.uprogress={...u},setInterval(()=>{Date.now()-s.uprogress.tlast>3e3?(s.uprogress.statbytes=0,s.uprogress.statdur=1):(s.uprogress.statbytes*=.9,s.uprogress.statdur*=.9)},100);const f=({name:_,size:S,start:k,end:R})=>{if(_!==s.uprogress.filename)return;const D=Date.now();s.uprogress.xfer=s.uprogress.filestart+R,s.uprogress.filepos=R,s.uprogress.statbytes+=R-k,s.uprogress.statdur+=D-s.uprogress.tlast,s.uprogress.tlast=D,R===S&&(s.uprogress.filestart+=S,d(),++s.uprogress.fileidx>=s.uprogress.filecount&&h())},d=()=>{const _=s.uprogress.files.shift();if(!_)return h();s.uprogress.filepos=0,s.uprogress.filesize=_.file.size,s.uprogress.filename=_.cloudName},h=()=>{Object.assign(s.uprogress,u),s.uprogress.t0=Date.now(),s.uprogress.tlast=s.uprogress.t0+1},x=_=>{s.uprogress.files.length===0&&h(),s.uprogress.total+=_.reduce((S,k)=>S+k.file.size,0),s.uprogress.filecount+=_.length,s.uprogress.files=[...s.uprogress.files,..._],d()};let y=[];const I=async()=>await new Promise(_=>{const S=un(Jd,{open(k){_(S)},error(k){console.error("Upload socket error",k),s.error="Upload socket error"},message(k){const R=JSON.parse(k.data);if("error"in R){console.error("Upload socket error",R.error),s.error=R.error.message;return}R.status==="ack"?f(R.req):console.log("Unknown upload response",R)}});S.sendMsg=k=>S.send(JSON.stringify(k)),S.sendData=async k=>{s.uprogress.status="uploading",await new Promise(R=>{const D=setInterval(()=>{S.bufferedAmount>1048576||(R(void 0),clearInterval(D))},1)}),s.uprogress.status="processing",S.send(k)}}),w=async()=>{const _=await I();for(;y.length;){const S=y[0],k=S.cloudPos,R=Math.min(S.file.size,k+(1<<20)),D={name:S.cloudName,size:S.file.size,start:k,end:R},C=S.file.slice(k,R);S.cloudPos=R,_.sendMsg(D),await _.sendData(C),S.cloudPos===S.file.size&&y.shift()}y.length&&m(),s.uprogress.status="idle",v=!1};let v=!1;const m=()=>{v===!1&&(v=setTimeout(()=>{v=!0,w()},0))};return Qe(()=>{addEventListener("dragover",i),addEventListener("drop",i),addEventListener("paste",r)}),kn(()=>{removeEventListener("paste",r),removeEventListener("dragover",i),removeEventListener("drop",i)}),(_,S)=>{const k=Ys;return $(),G(we,null,[A("template",null,[A("input",{ref_key:"fileInput",ref:t,onChange:i,type:"file",multiple:""},null,544),A("input",{ref_key:"folderInput",ref:n,onChange:i,type:"file",webkitdirectory:""},null,544)]),re(k,{name:"add-file","data-tooltip":"Upload files",onClick:S[0]||(S[0]=R=>t.value.click())}),re(k,{name:"add-folder","data-tooltip":"Upload folder",onClick:S[1]||(S[1]=R=>n.value.click())})],64)}}});let Kt=null;function fp(){return Kt!==null}function dp(e){Kt&&Tc(),Kt=e}function Al(e){e===Kt&&(Kt=null)}function Tc(){Kt&&(Kt.closeMenu(),Kt=null)}const wt={defaultDirection:"br",defaultMinWidth:100,defaultMaxWidth:600,defaultZindex:100,defaultZoom:1,defaultAdjustPadding:{x:0,y:10}};function Kn(e,t){let n=e.offsetTop;return e.offsetParent!=null&&e.offsetParent!=t&&(n-=e.offsetParent.scrollTop,n+=Kn(e.offsetParent,t)),n}function qn(e,t){let n=e.offsetLeft;return e.offsetParent!=null&&e.offsetParent!=t&&(n-=e.offsetParent.scrollLeft,n+=qn(e.offsetParent,t)),n}function pp(e,t,n,s){return{x:qn(e,s)+t,y:Kn(e,s)+n}}const vo="mx-menu-default-container",hp="mx-menu-container-";let gp=0;function Oc(e){const{getContainer:t,zIndex:n}=e;if(t){const o=typeof t=="function"?t():t;if(o){let r=o.getAttribute("id");return r||(r=hp+gp++,o.setAttribute("id",r)),{eleId:r,container:o,isNew:!1}}}let s=document.getElementById(vo);return s||(s=document.createElement("div"),s.setAttribute("id",vo),s.setAttribute("class","mx-menu-ghost-host fullscreen"),document.body.appendChild(s)),s.style.zIndex=(n==null?void 0:n.toString())||wt.defaultZindex.toString(),{eleId:vo,container:s,isNew:!0}}function mp(e){let t=0;for(let n=0;n<e.length;n++){const s=e.charCodeAt(n);t=(t<<5)-t+s,t|=0}return t}function Il(e){return typeof e=="number"?`${e}px`:e}const vt=_e({props:{vnode:{type:null},data:{type:null,default:null}},setup(e){const{vnode:t,data:n}=dn(e);return()=>typeof t.value=="function"?t.value(n.value):t.value}});function vp(e,t){const n={...e};return delete n[t],n}var _p=Object.defineProperty,yp=(e,t,n)=>t in e?_p(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,$l=(e,t,n)=>yp(e,typeof t!="symbol"?t+"":t,n);class Tl{constructor(t,n){$l(this,"x",0),$l(this,"y",0),this.x=t||0,this.y=n||0}set(t,n){this.x=t,this.y=n}substract(t){this.x-=t.x,this.y-=t.y}}function Ol(e){const{onDown:t,onMove:n,onUp:s}=e,o=new Tl,r=new Tl;let l;function i(a){a.stopPropagation(),r.set(a.x,a.y),r.substract(o),n(o,r,a,l)}function c(a){s(a,l),o.set(0,0),document.removeEventListener("mousemove",i),document.removeEventListener("mouseup",c)}return(a,u)=>t(a,u)?(l=u,o.set(a.x,a.y),document.addEventListener("mousemove",i),document.addEventListener("mouseup",c),a.stopPropagation(),!0):!1}function bp(e,t){let n=0;return{start(){n>0&&clearInterval(n),n=setInterval(()=>{n=0,t()},e)},stop(){n>0&&(clearInterval(n),n=0)}}}const On=[],Ll=bp(100,()=>{for(const e of On)e()});function wp(e,t,n,s){let o=0,r=0;function l(){e.value&&(t&&o!==e.value.offsetWidth&&t(e.value.offsetWidth),n&&r!==e.value.offsetHeight&&n(e.value.offsetHeight),s&&(o!==e.value.offsetWidth||r!==e.value.offsetHeight)&&s(e.value.offsetWidth,e.value.offsetHeight),o=e.value.offsetWidth,r=e.value.offsetHeight)}return{startResizeChecker(){Ll.start(),On.push(l)},stopResizeChecker(){const i=On.indexOf(l);i>=0&&On.splice(i,1),On.length===0&&Ll.stop()}}}const Dl=140,Cp=70,kp=_e({__name:"ScrollRect",props:{scroll:{type:String,default:"both"},scrollBarAlwaysShow:{type:Boolean,default:!1},scrollBarBackgroundClickable:{type:Boolean,default:!1},height:{type:Number,default:void 0},width:{type:Number,default:void 0},maxHeight:{type:Number,default:void 0},maxWidth:{type:Number,default:void 0},containerClass:{type:String,default:""},containerStyle:{type:null}},emits:["scroll","resized"],setup(e,{expose:t,emit:n}){const s=e,o=n,r=ne(),l=ne(),i=ne(),c=ne(),a=ne(),u=ne(),f=ne(!1),d=ve(()=>s.scroll==="horizontal"||s.scroll==="both"),h=ve(()=>s.scroll==="vertical"||s.scroll==="both"),x=Ct({show:!1,size:0,sizeRaw:0,pos:0}),y=Ct({show:!1,size:0,sizeRaw:0,pos:0});let I=0,w=0,v=0,m=0,_=null;const S={attributes:!0,childList:!0};function k(){if(r.value){if(x.show){const L=r.value.offsetWidth/r.value.scrollWidth;x.sizeRaw=L*r.value.offsetWidth,x.size=L*100,x.pos=r.value.scrollLeft/(r.value.scrollWidth-r.value.offsetWidth)*(100-x.size),L>=1&&(x.show=!1)}if(y.show){const L=r.value.offsetHeight/r.value.scrollHeight;y.sizeRaw=L*r.value.offsetHeight,y.size=L*100,y.pos=r.value.scrollTop/(r.value.scrollHeight-r.value.offsetHeight)*(100-y.size),L>=1&&(y.show=!1)}o("scroll",r.value.scrollLeft,r.value.scrollTop)}}function R(L=!1){if(!r.value)return;let Q=d.value,b=h.value;const K=Q&&(I!==r.value.scrollWidth||v!==r.value.offsetWidth),B=h&&(w!==r.value.scrollHeight||m!==r.value.offsetHeight);if(!L&&!K&&!B)return;const W=window.getComputedStyle(r.value);(W.overflow==="hidden"||W.overflowX==="hidden")&&(Q=!1),(W.overflow==="hidden"||W.overflowY==="hidden")&&(b=!1),x.show=Q,y.show=b,k(),v=r.value.offsetWidth,m=r.value.offsetHeight,I=r.value.scrollWidth,w=r.value.scrollHeight,o("resized",I,w)}function D(L){var Q;s.scroll=="horizontal"&&(L.deltaMode==0&&((Q=r.value)==null||Q.scrollTo({left:r.value.scrollLeft+(L.deltaY>0?Dl:-140),behavior:"smooth"})),L.preventDefault(),L.stopPropagation())}function C(L){var Q;L.deltaMode==0&&((Q=r.value)==null||Q.scrollTo({left:r.value.scrollLeft+(L.deltaY>0?Dl:-140),behavior:"smooth"}),L.preventDefault(),L.stopPropagation())}function N(L){var Q;L.deltaMode==0&&((Q=r.value)==null||Q.scrollTo({top:r.value.scrollTop+(L.deltaY>0?Cp:-70),behavior:"smooth"}),L.preventDefault(),L.stopPropagation())}let q=0,H=0,Z=0,Y=0;const ce=Ol({onDown(L){return!i.value||!a.value?!1:(q=L.offsetX,H=L.x-L.offsetX-a.value.offsetLeft,L.preventDefault(),f.value=!0,!0)},onMove(L,Q,b){r.value&&i.value&&(Te(b.x-q-H),b.preventDefault(),b.stopPropagation())},onUp(){f.value=!1}}),ie=Ol({onDown(L){return!c.value||!u.value?!1:(Z=L.offsetY,Y=L.y-L.offsetY-u.value.offsetTop,L.preventDefault(),f.value=!0,!0)},onMove(L,Q,b){r.value&&c.value&&(He(b.y-Z-Y),b.preventDefault(),b.stopPropagation())},onUp(){f.value=!1}});function ee(L){r.value&&(r.value.scrollLeft=L/100*(r.value.scrollWidth-r.value.offsetWidth))}function ue(L){r.value&&(r.value.scrollLeft=L/100*(r.value.scrollHeight-r.value.offsetHeight))}function Te(L){r.value&&(r.value.scrollLeft=L/(r.value.offsetWidth-x.sizeRaw)*(r.value.scrollWidth-r.value.offsetWidth))}function He(L){r.value&&(r.value.scrollTop=L/(r.value.offsetHeight-y.sizeRaw)*(r.value.scrollHeight-r.value.offsetHeight))}function fe(L){s.scrollBarBackgroundClickable&&Te(L.offsetX-x.sizeRaw/2)}function Oe(L){s.scrollBarBackgroundClickable&&He(L.offsetY-y.sizeRaw/2)}const{startResizeChecker:it,stopResizeChecker:J}=wp(r,()=>R(),()=>R());return Qe(()=>{Ze(()=>{setTimeout(()=>R(!0),200),R(!0),it(),_=new MutationObserver(()=>R()),_.observe(r.value,S)})}),Rn(()=>{J(),_&&(_.disconnect(),_=null)}),t({refreshScrollState(){R(!0)},getScrollContainer(){return r.value},scrollTo(L,Q){var b;(b=r.value)==null||b.scrollTo(L,Q)},scrollToTop(){var L;(L=r.value)==null||L.scrollTo(0,0)},scrollToBottom(){var L;(L=r.value)==null||L.scrollTo(r.value.scrollWidth,r.value.scrollHeight)}}),(L,Q)=>($(),G("div",{ref_key:"scrollrect",ref:l,class:De(["vue-scroll-rect",e.scrollBarAlwaysShow?"always-show-scrollbar":"",e.scrollBarBackgroundClickable?"background-clickable":"",f.value?"dragging":""]),style:At({width:e.width?`${e.width}px`:void 0,height:e.height?`${e.height}px`:void 0}),onWheel:D},[A("div",{ref_key:"container",ref:r,class:De(["scroll-content",e.scroll,e.containerClass]),style:At({maxWidth:e.maxWidth?`${e.maxWidth}px`:void 0,maxHeight:e.maxHeight?`${e.maxHeight}px`:void 0,...e.containerStyle}),onScroll:k},[Fe(L.$slots,"default")],38),x.show?Fe(L.$slots,"scrollBarX",{key:0,scrollBarValue:x,onScroll:ee},()=>[A("div",{ref_key:"scrollBarRefX",ref:i,class:"scrollbar horizontal",onClick:fe,onWheel:C},[A("div",{class:"thumb",ref_key:"scrollBarThumbRefX",ref:a,style:At({left:`${x.pos}%`,width:`${x.size}%`}),onMousedown:Q[0]||(Q[0]=(...b)=>M(ce)&&M(ce)(...b)),onWheel:C},null,36)],544)]):he("",!0),y.show?Fe(L.$slots,"scrollBarY",{key:1,scrollBarValue:y,onScroll:ue},()=>[y.show?($(),G("div",{key:0,ref_key:"scrollBarRefY",ref:c,class:"scrollbar vertical",onClick:Oe,onWheel:N},[A("div",{class:"thumb",ref_key:"scrollBarThumbRefY",ref:u,style:At({top:`${y.pos}%`,height:`${y.size}%`}),onMousedown:Q[1]||(Q[1]=(...b)=>M(ie)&&M(ie)(...b)),onWheel:N},null,36)],544)):he("",!0)]):he("",!0)],38))}}),fr=(e,t)=>{const n=e.__vccOpts||e;for(const[s,o]of t)n[s]=o;return n},xp={},Sp={class:"mx-checked-mark","aria-hidden":"true",viewBox:"0 0 1024 1024"},Ep=A("path",{d:"M129.3,428.6L52,512l345,372.5l575-620.8l-69.5-75L400.4,718.2L129.3,428.6z"},null,-1),Rp=[Ep];function Mp(e,t){return $(),G("svg",Sp,Rp)}const Pp=fr(xp,[["render",Mp]]),Ap={},Ip={class:"mx-right-arrow","aria-hidden":"true",viewBox:"0 0 1024 1024"},$p=A("path",{d:"M307.018 49.445c11.517 0 23.032 4.394 31.819 13.18L756.404 480.18c8.439 8.438 13.181 19.885 13.181 31.82s-4.741 23.38-13.181 31.82L338.838 961.376c-17.574 17.573-46.065 17.573-63.64-0.001-17.573-17.573-17.573-46.065 0.001-63.64L660.944 512 275.198 126.265c-17.574-17.573-17.574-46.066-0.001-63.64C283.985 53.839 295.501 49.445 307.018 49.445z"},null,-1),Tp=[$p];function Op(e,t){return $(),G("svg",Ip,Tp)}const Lp=fr(Ap,[["render",Op]]),Dp={class:"mx-item-row"},Fp=["xlink:href"],Np={key:1,class:"label"},Hp={class:"mx-item-row"},Bp={class:"mx-shortcut"},dr=_e({__name:"ContextMenuItem",props:{disabled:{type:Boolean,default:!1},hidden:{type:Boolean,default:!1},customRender:{type:Function,default:null},customClass:{type:String,default:""},clickHandler:{type:Function,default:null},label:{type:[String,Object,Function],default:""},icon:{type:[String,Object,Function],default:""},iconFontClass:{type:String,default:"iconfont"},checked:{type:Boolean,default:!1},shortcut:{type:String,default:""},svgIcon:{type:String,default:""},svgProps:{type:Object,default:null},preserveIconWidth:{type:Boolean,default:!0},showRightArrow:{type:Boolean,default:!1},hasChildren:{type:Boolean,default:!1},clickClose:{type:Boolean,default:!0},clickableWhenHasChildren:{type:Boolean,default:!1},rawMenuItem:{type:Object,default:void 0}},emits:["click","subMenuOpen","subMenuClose"],setup(e,{expose:t,emit:n}){const s=e,o=n,{clickHandler:r,clickClose:l,clickableWhenHasChildren:i,disabled:c,hidden:a,label:u,icon:f,iconFontClass:d,showRightArrow:h,shortcut:x,hasChildren:y}=dn(s),I=ne(!1),w=ne(!1),v=ne(),m=Se("globalOptions"),_=Se("globalHasSlot"),S=Se("globalRenderSlot"),k=Se("globalCloseMenu"),R=Se("menuContext"),D=ve(()=>typeof u.value=="string"?u.value:typeof u.value=="function"?mp(u.value.toString()):"MenuItem[unknow]");Je("MenuItemName",D);const C={getSubMenuInstance:()=>{},showSubMenu:()=>I.value?(R.markActiveMenuItem(C,!0),!0):y.value?(q(),!0):!1,hideSubMenu:()=>{R.closeOtherSubMenu()},isDisabledOrHidden:()=>c.value||a.value,getElement:()=>v.value,focus:()=>w.value=!0,blur:()=>w.value=!1,click:N};Je("menuItemInstance",C),Qe(()=>{R.isMenuItemDataCollectedFlag()?Ze(()=>{let Y=0;const ce=R.getElement();if(ce){let ie=0;for(let ee=0;ee<ce.children.length;ee++){const ue=ce.children[ee];if(ue.getAttribute("data-type")==="ContextMenuItem"){if(ue===v.value){Y=ie;break}ie++}}}R.addChildMenuItem(C,Y)}):R.addChildMenuItem(C)}),Rn(()=>{R.removeChildMenuItem(C)});function N(Y){if(!c.value){if(Y){const ce=Y.target;if(ce.classList.contains("mx-context-no-clickable")||m.value.ignoreClickClassName&&ce.classList.contains(m.value.ignoreClickClassName))return;if(m.value.clickCloseClassName&&ce.classList.contains(m.value.clickCloseClassName)){Y.stopPropagation(),k(s.rawMenuItem);return}}y.value?i.value?(typeof r.value=="function"&&r.value(Y),o("click",Y)):I.value||q():(typeof r.value=="function"&&r.value(Y),o("click",Y),l.value&&k(s.rawMenuItem))}}function q(Y){w.value=!1,R.checkCloseOtherSubMenuTimeOut()||R.closeOtherSubMenu(),c.value||(R.markActiveMenuItem(C),y.value&&(Y||R.markThisOpenedByKeyBoard(),R.addOpenedSubMenu(H),I.value=!0,Ze(()=>o("subMenuOpen",C))))}function H(){w.value=!1,I.value=!1,o("subMenuClose",C)}function Z(){return{disabled:c.value,label:u.value,icon:f.value,iconFontClass:d.value,showRightArrow:h.value,clickClose:l.value,clickableWhenHasChildren:i.value,shortcut:x.value,theme:m.value.theme,isOpen:I,hasChildren:y,onClick:N,onMouseEnter:q,closeMenu:k}}return t(C),(Y,ce)=>M(a)?he("",!0):($(),G("div",{key:0,class:"mx-context-menu-item-wrapper",ref_key:"menuItemRef",ref:v,"data-type":"ContextMenuItem"},[M(_)("itemRender")?($(),pe(M(vt),{key:0,vnode:()=>M(S)("itemRender",Z())},null,8,["vnode"])):e.customRender?($(),pe(M(vt),{key:1,vnode:e.customRender,data:Z()},null,8,["vnode","data"])):($(),G("div",{key:2,class:De(["mx-context-menu-item",M(c)?"disabled":"",w.value?"keyboard-focus":"",e.customClass?" "+e.customClass:"",I.value?"open":""]),onClick:N,onMouseenter:q},[Fe(Y.$slots,"default",{},()=>[A("div",Dp,[A("div",{class:De(["mx-icon-placeholder",e.preserveIconWidth?"preserve-width":""])},[Fe(Y.$slots,"icon",{},()=>[M(_)("itemIconRender")?($(),pe(M(vt),{key:0,vnode:()=>M(S)("itemIconRender",Z())},null,8,["vnode"])):typeof e.svgIcon=="string"&&e.svgIcon?($(),G("svg",Ps({key:1,class:"icon svg"},e.svgProps),[A("use",{"xlink:href":e.svgIcon},null,8,Fp)],16)):typeof M(f)!="string"?($(),pe(M(vt),{key:2,vnode:M(f),data:M(f)},null,8,["vnode","data"])):typeof M(f)=="string"&&M(f)!==""?($(),G("i",{key:3,class:De(M(f)+" icon "+M(d)+" "+M(m).iconFontClass)},null,2)):he("",!0)]),e.checked?Fe(Y.$slots,"check",{key:0},()=>[M(_)("itemCheckRender")?($(),pe(M(vt),{key:0,vnode:()=>M(S)("itemCheckRender",Z())},null,8,["vnode"])):he("",!0),re(Pp)]):he("",!0)],2),Fe(Y.$slots,"label",{},()=>[M(_)("itemLabelRender")?($(),pe(M(vt),{key:0,vnode:()=>M(S)("itemLabelRender",Z())},null,8,["vnode"])):typeof M(u)=="string"?($(),G("span",Np,Pe(M(u)),1)):($(),pe(M(vt),{key:2,vnode:M(u),data:M(u)},null,8,["vnode","data"]))])]),A("div",Hp,[M(x)||Y.$slots.shortcut?Fe(Y.$slots,"shortcut",{key:0},()=>[M(_)("itemShortcutRender")?($(),pe(M(vt),{key:0,vnode:()=>M(S)("itemShortcutRender",Z())},null,8,["vnode"])):he("",!0),A("span",Bp,Pe(M(x)),1)]):he("",!0),M(h)?Fe(Y.$slots,"rightArrow",{key:1},()=>[M(_)("itemRightArrowRender")?($(),pe(M(vt),{key:0,vnode:()=>M(S)("itemRightArrowRender",Z())},null,8,["vnode"])):he("",!0),re(Lp)]):he("",!0)])])],34)),Fe(Y.$slots,"submenu",{context:C,show:I.value})],512))}}),jp=_e({name:"ContextMenuSperator",components:{VNodeRender:vt},setup(){const e=Se("globalHasSlot"),t=Se("globalRenderSlot");return{globalHasSlot:e,globalRenderSlot:t}}}),Vp={key:1,class:"mx-context-menu-item-sperator mx-context-no-clickable"};function Wp(e,t,n,s,o,r){const l=$i("VNodeRender");return e.globalHasSlot("separatorRender")?($(),pe(l,{key:0,vnode:()=>e.globalRenderSlot("separatorRender",{})},null,8,["vnode"])):($(),G("div",Vp))}const Gn=fr(jp,[["render",Wp]]),pr=_e({__name:"ContextSubMenu",props:{items:{type:Object,default:null},show:{type:Boolean,default:!1},maxHeight:{type:Number,default:0},maxWidth:{type:[String,Number],default:0},minWidth:{type:[String,Number],default:0},adjustPosition:{type:Boolean,default:!0},direction:{type:String,default:"br"},parentMenuItemContext:{type:Object,default:null}},emits:["closeAnimFinished"],setup(e,{expose:t,emit:n}){const s=e,o=n,r=ne(!1),l=Se("globalGetMenuHostId",""),i=Se("menuContext"),c=Se("globalOptions");Se("globalHasSlot"),Se("globalRenderSlot");const a=ne("UnknowOrRoot"),u=Se("MenuItemName",a),{zIndex:f,getParentWidth:d,getParentHeight:h,getZoom:x}=i,{adjustPosition:y}=dn(s),I=ne(),w=ne(),v=ne(),m=[],_=Se("globalSetCurrentSubMenu"),S=[];let k=null,R=0;function D(){k&&k.blur()}function C(J,L){if(J){for(let Q=L!==void 0?L:0;Q<S.length;Q++)if(!S[Q].isDisabledOrHidden()){N(Q);break}}else for(let Q=L!==void 0?L:S.length-1;Q>=0;Q--)if(!S[Q].isDisabledOrHidden()){N(Q);break}}function N(J){if(k&&D(),J!==void 0&&(k=S[Math.max(0,Math.min(J,S.length-1))]),!k)return;k.focus();const L=k.getElement();L&&L.scrollIntoView({behavior:"auto",block:"nearest",inline:"nearest"})}function q(){_(H)}const H={el:v,name:u,isTopLevel:()=>i.getParentContext()===null,closeSelfAndActiveParent:()=>{const J=ce.getParentContext();if(J){J.closeOtherSubMenu();const L=J.getSubMenuInstanceContext();if(L)return L.focusCurrentItem(),!0}return!1},closeCurrentSubMenu:()=>{var J;return(J=ce.getParentContext())==null?void 0:J.closeOtherSubMenu()},moveCurrentItemFirst:()=>C(!0),moveCurrentItemLast:()=>C(!1),moveCurrentItemDown:()=>C(!0,k?S.indexOf(k)+1:0),moveCurrentItemUp:()=>C(!1,k?S.indexOf(k)-1:0),focusCurrentItem:()=>N(),openCurrentItemSubMenu:()=>k?k==null?void 0:k.showSubMenu():!1,triggerCurrentItemClick:J=>k==null?void 0:k.click(J)};let Z=!1,Y=!1;const ce={zIndex:f+1,container:i.container,adjustPadding:c.value.adjustPadding||wt.defaultAdjustPadding,getParentWidth:()=>{var J;return((J=v.value)==null?void 0:J.offsetWidth)||0},getParentHeight:()=>{var J;return((J=v.value)==null?void 0:J.offsetHeight)||0},getPositon:()=>[fe.value.x,fe.value.y],getZoom:()=>c.value.zoom||wt.defaultZoom,addOpenedSubMenu(J){m.push(J)},closeOtherSubMenu(){m.forEach(J=>J()),m.splice(0,m.length),_(H)},checkCloseOtherSubMenuTimeOut(){return R?(clearTimeout(R),R=0,!0):!1},closeOtherSubMenuWithTimeOut(){R=setTimeout(()=>{R=0,this.closeOtherSubMenu()},200)},addChildMenuItem:(J,L)=>{L===void 0?S.push(J):S.splice(L,0,J)},removeChildMenuItem:J=>{S.splice(S.indexOf(J),1),J.getSubMenuInstance=()=>{}},markActiveMenuItem:(J,L=!1)=>{D(),k=J,L&&N()},markThisOpenedByKeyBoard:()=>{Z=!0},isOpenedByKeyBoardFlag:()=>Z?(Z=!1,!0):!1,isMenuItemDataCollectedFlag:()=>Y,getElement:()=>v.value||null,getParentContext:()=>i,getSubMenuInstanceContext:()=>H};Je("menuContext",ce);const ie={getChildItem:J=>S[J],getMenuDimensions:()=>w.value?{width:w.value.offsetWidth,height:w.value.offsetHeight}:{width:0,height:0},getSubmenuRoot:()=>w.value,getMenu:()=>v.value,getScrollValue:()=>{var J,L;return((L=(J=I.value)==null?void 0:J.getScrollContainer())==null?void 0:L.scrollTop)||0},setScrollValue:J=>{var L;return(L=I.value)==null?void 0:L.scrollTo(0,J)},getScrollHeight:()=>ue.value,adjustPosition:()=>{Oe()},getMaxHeight:()=>Te.value,getPosition:()=>fe.value,setPosition:(J,L)=>{fe.value.x=J,fe.value.y=L}},ee=Se("menuItemInstance",void 0);ee&&(ee.getSubMenuInstance=()=>ie);const ue=ne(0),Te=ne(0),He=ne(!1),fe=ne({x:0,y:0});function Oe(){Ze(()=>{const J=v.value,L=w.value;if(J&&L&&I.value){const{container:Q}=i,b=(d==null?void 0:d())??0,K=(h==null?void 0:h())??0,B=getComputedStyle(L),W=parseFloat(B.paddingLeft),de=parseFloat(B.paddingTop),ke=K>0?de:0,p=document.documentElement.scrollHeight/x(),g=document.documentElement.scrollWidth/x(),E=Math.min(g,Q.offsetWidth),T=Math.min(p,Q.offsetHeight);let P=qn(J,Q),O=Kn(J,Q);s.direction.includes("l")?fe.value.x-=J.offsetWidth+W:s.direction.includes("r")?fe.value.x+=b+W:(fe.value.x+=b/2,fe.value.x-=(J.offsetWidth+W)/2),s.direction.includes("t")?fe.value.y-=(J.offsetHeight+de*2)/x():s.direction.includes("b")?fe.value.y-=de/x():fe.value.y-=(J.offsetHeight+de)/2/x(),Ze(()=>{var U,V;P=qn(J,Q),O=Kn(J,Q);const j=((V=(U=I.value)==null?void 0:U.getScrollContainer())==null?void 0:V.scrollHeight)||0,F=s.maxHeight;ue.value=s.maxHeight?Math.min(j,s.maxHeight):j;const se=P+J.offsetWidth-E,z=O+ue.value+ke*2-T;if(He.value=z>0,y.value&&se>0){const X=b+J.offsetWidth-W,le=P;X>le?fe.value.x-=le:fe.value.x-=X}if(He.value){if(y.value){const X=z,le=O;X>le?fe.value.y-=le-ke:fe.value.y-=X-ke}Te.value=T-(fe.value.y+de)}else Te.value=F||0})}})}function it(){var J;const L=(J=s.parentMenuItemContext)==null?void 0:J.getElement();if(L){const Q=qn(L,i.container),b=Kn(L,i.container);fe.value.x=Q,fe.value.y=b}else{const[Q,b]=i.getPositon();fe.value.x=Q,fe.value.y=b}Ze(()=>{var Q;_(H),(Q=v.value)==null||Q.focus({preventScroll:!0}),i.isOpenedByKeyBoardFlag()&&Ze(()=>C(!0)),Y=!0}),Oe()}return It(()=>s.show,J=>{J&&it()}),Qe(()=>{r.value=!0,s.show?it():Oe()}),Rn(()=>{r.value=!1,ee&&(ee.getSubMenuInstance=()=>{})}),t(ie),(J,L)=>{const Q=$i("ContextSubMenu",!0);return r.value?($(),pe(ki,{key:0,to:`#${M(l)}`},[re(Hu,Ps({appear:""},M(c).menuTransitionProps||{duration:10},{onAfterLeave:L[0]||(L[0]=b=>o("closeAnimFinished"))}),{default:ft(()=>[e.show?($(),G("div",Ps({key:0,ref_key:"submenuRoot",ref:w},J.$attrs,{class:["mx-context-menu",M(c).customClass?M(c).customClass:"",M(c).theme??""],style:{maxWidth:e.maxWidth?M(Il)(e.maxWidth):`${M(wt).defaultMaxWidth}px`,minWidth:e.minWidth?M(Il)(e.minWidth):`${M(wt).defaultMinWidth}px`,zIndex:M(f),left:`${fe.value.x}px`,top:`${fe.value.y}px`},"data-type":"ContextSubMenu",onClick:q}),[re(M(kp),{ref_key:"scrollRectRef",ref:I,scroll:"vertical",maxHeight:Te.value,containerClass:"mx-context-menu-scroll"},{default:ft(()=>[A("div",{class:De(["mx-context-menu-items"]),ref_key:"menu",ref:v},[Fe(J.$slots,"default",{},()=>[($(!0),G(we,null,Mn(e.items,(b,K)=>($(),G(we,{key:K},[b.hidden!==!0&&b.divided==="up"?($(),pe(Gn,{key:0})):he("",!0),b.hidden!==!0&&b.divided==="self"?($(),pe(Gn,{key:1})):($(),pe(dr,{key:2,clickHandler:b.onClick?B=>b.onClick(B):void 0,disabled:typeof b.disabled=="object"?b.disabled.value:b.disabled,hidden:typeof b.hidden=="object"?b.hidden.value:b.hidden,icon:b.icon,iconFontClass:b.iconFontClass,svgIcon:b.svgIcon,svgProps:b.svgProps,label:b.label,customRender:b.customRender,customClass:b.customClass,checked:typeof b.checked=="object"?b.checked.value:b.checked,shortcut:b.shortcut,clickClose:b.clickClose,clickableWhenHasChildren:b.clickableWhenHasChildren,preserveIconWidth:b.preserveIconWidth!==void 0?b.preserveIconWidth:M(c).preserveIconWidth,showRightArrow:b.children&&b.children.length>0,hasChildren:b.children&&b.children.length>0,rawMenuItem:b,onSubMenuOpen:B=>{var W;return(W=b.onSubMenuOpen)==null?void 0:W.call(b,B)},onSubMenuClose:B=>{var W;return(W=b.onSubMenuClose)==null?void 0:W.call(b,B)}},Li({_:2},[b.children&&b.children.length>0?{name:"submenu",fn:ft(({context:B,show:W})=>[re(Q,{show:W,parentMenuItemContext:B,items:b.children,maxWidth:b.maxWidth,minWidth:b.minWidth,maxHeight:b.maxHeight,adjustPosition:b.adjustSubMenuPosition!==void 0?b.adjustSubMenuPosition:M(c).adjustPosition,direction:b.direction!==void 0?b.direction:M(c).direction},null,8,["show","parentMenuItemContext","items","maxWidth","minWidth","maxHeight","adjustPosition","direction"])]),key:"0"}:void 0]),1032,["clickHandler","disabled","hidden","icon","iconFontClass","svgIcon","svgProps","label","customRender","customClass","checked","shortcut","clickClose","clickableWhenHasChildren","preserveIconWidth","showRightArrow","hasChildren","rawMenuItem","onSubMenuOpen","onSubMenuClose"])),b.hidden!==!0&&(b.divided==="down"||b.divided===!0)?($(),pe(Gn,{key:3})):he("",!0)],64))),128))])],512)]),_:3},8,["maxHeight"])],16)):he("",!0)]),_:3},16)],8,["to"])):he("",!0)}}}),Lc=_e({__name:"ContextSubMenuWrapper",props:{options:{type:Object,default:null},show:{type:null,default:null},container:{type:Object,default:null},isFullScreenContainer:{type:Boolean,default:!0}},emits:["close","closeAnimFinished"],setup(e,{expose:t,emit:n}){const s=e,o=n,r=Fi(),l=ne(),{options:i,show:c,container:a}=dn(s);Qe(()=>{c.value&&d()}),Rn(()=>{I()}),It(c,k=>{k?d():(Al(u),I())});const u={closeMenu:h,isClosed:x,getMenuRef:()=>l.value,getMenuDimensions:()=>{var k;return((k=l.value)==null?void 0:k.getMenuDimensions())??{width:0,height:0}}};let f=!1;function d(){y(),dp(u)}function h(k){f=!0,o("close",k),i.value.menuTransitionProps||o("closeAnimFinished"),Al(u)}function x(){return f}function y(){setTimeout(()=>{document.addEventListener("click",_,!0),document.addEventListener("contextmenu",_,!0),document.addEventListener("scroll",m,!0),!s.isFullScreenContainer&&a.value&&a.value.addEventListener("scroll",m,!0),i.value.keyboardControl!==!1&&document.addEventListener("keydown",v,!0)},50)}function I(){document.removeEventListener("contextmenu",_,!0),document.removeEventListener("click",_,!0),document.removeEventListener("scroll",m,!0),!s.isFullScreenContainer&&a.value&&a.value.removeEventListener("scroll",m,!0),i.value.keyboardControl!==!1&&document.removeEventListener("keydown",v,!0)}const w=ne();Je("globalSetCurrentSubMenu",k=>w.value=k),Je("globalGetMenuHostId",a.value.id);function v(k){var R,D,C,N,q,H,Z,Y,ce,ie,ee,ue,Te;let He=!0;switch(k.key){case"Escape":{((R=w.value)==null?void 0:R.isTopLevel())===!1?(D=w.value)==null||D.closeCurrentSubMenu():h();break}case"ArrowDown":(C=w.value)==null||C.moveCurrentItemDown();break;case"ArrowUp":(N=w.value)==null||N.moveCurrentItemUp();break;case"Home":(q=w.value)==null||q.moveCurrentItemFirst();break;case"End":(H=w.value)==null||H.moveCurrentItemLast();break;case"ArrowLeft":{(Z=w.value)!=null&&Z.closeSelfAndActiveParent()||(ce=(Y=i.value).onKeyFocusMoveLeft)==null||ce.call(Y);break}case"ArrowRight":(ie=w.value)!=null&&ie.openCurrentItemSubMenu()||(ue=(ee=i.value).onKeyFocusMoveRight)==null||ue.call(ee);break;case"Enter":(Te=w.value)==null||Te.triggerCurrentItemClick(k);break;default:He=!1;break}He&&w.value&&(k.stopPropagation(),k.preventDefault())}function m(k){i.value.closeWhenScroll!==!1&&S(k.target,null)}function _(k){S(k.target,k)}function S(k,R){for(var D,C;k;){if(k.classList&&k.classList.contains("mx-context-menu"))return;k=k.parentNode}R?i.value.clickCloseOnOutside!==!1?(I(),h()):(C=(D=i.value).onClickOnOutside)==null||C.call(D,R):(I(),h())}return Je("globalOptions",i),Je("globalCloseMenu",h),Je("globalIsFullScreenContainer",s.isFullScreenContainer),Je("globalHasSlot",k=>r[k]!==void 0),Je("globalRenderSlot",(k,R)=>Fe(r,k,{...R},()=>[an("span","Render slot failed")],!1)),Je("menuContext",{zIndex:i.value.zIndex||wt.defaultZindex,container:a.value,adjustPadding:{x:0,y:0},getZoom:()=>i.value.zoom||wt.defaultZoom,getParentWidth:()=>0,getParentHeight:()=>0,getPositon:()=>[i.value.x,i.value.y],closeOtherSubMenuWithTimeOut:()=>{},checkCloseOtherSubMenuTimeOut:()=>!1,addOpenedSubMenu:()=>{},closeOtherSubMenu:()=>{},getParentContext:()=>null,getSubMenuInstanceContext:()=>null,getElement:()=>null,addChildMenuItem:()=>{},removeChildMenuItem:()=>{},markActiveMenuItem:()=>{},markThisOpenedByKeyBoard:()=>{},isOpenedByKeyBoardFlag:()=>!1,isMenuItemDataCollectedFlag:()=>!1}),t(u),(k,R)=>($(),pe(pr,{ref_key:"submenuInstance",ref:l,show:M(c),items:M(i).items,adjustPosition:M(i).adjustPosition,maxWidth:M(i).maxWidth||M(wt).defaultMaxWidth,minWidth:M(i).minWidth||M(wt).defaultMinWidth,maxHeight:M(i).maxHeight,direction:M(i).direction||M(wt).defaultDirection,onCloseAnimFinished:R[0]||(R[0]=D=>o("closeAnimFinished"))},{default:ft(()=>[Fe(k.$slots,"default")]),_:3},8,["show","items","adjustPosition","maxWidth","minWidth","maxHeight","direction"]))}}),Up=_e({__name:"ContextMenu",props:{options:{type:Object,default:null},show:{type:Boolean,default:!1}},emits:["update:show","close"],setup(e,{expose:t,emit:n}){const s=n,o=e,{options:r,show:l}=dn(o),{isNew:i,container:c,eleId:a}=Oc(r.value),u=ne(null),f=Fi();function d(h){var x,y;s("update:show",!1),s("close"),(y=(x=r.value).onClose)==null||y.call(x,h)}return t({closeMenu:()=>s("update:show",!1),isClosed:()=>!l.value,getMenuRef:()=>{var h;return(h=u.value)==null?void 0:h.getMenuRef()},getMenuDimensions:()=>{var h;return((h=u.value)==null?void 0:h.getMenuDimensions())??{width:0,height:0}}}),(h,x)=>($(),pe(ki,{to:`#${M(a)}`},[re(Lc,{ref_key:"menuRef",ref:u,options:M(r),show:M(l),container:M(c),isFullScreenContainer:!M(i),onClose:d},Li({_:2},[Mn(M(f),(y,I)=>({name:I,fn:ft(w=>[Fe(h.$slots,I,Zc(ec(w)))])}))]),1032,["options","show","container","isFullScreenContainer"])],8,["to"]))}}),zp=_e({name:"ContextMenuGroup",props:{disabled:{type:Boolean,default:!1},hidden:{type:Boolean,default:!1},clickHandler:{type:Function,default:null},label:{type:String,default:""},icon:{type:String,default:""},iconFontClass:{type:String,default:"iconfont"},checked:{type:Boolean,default:!1},shortcut:{type:String,default:""},svgIcon:{type:String,default:""},svgProps:{type:Object,default:null},preserveIconWidth:{type:Boolean,default:!0},showRightArrow:{type:Boolean,default:!1},clickClose:{type:Boolean,default:!0},adjustSubMenuPosition:{type:Boolean,default:void 0},maxHeight:{type:[String,Number],default:0},maxWidth:{type:[String,Number],default:0},minWidth:{type:[String,Number],default:0}},setup(e,t){const n=Se("globalOptions"),{adjustSubMenuPosition:s,maxWidth:o,minWidth:r,maxHeight:l}=dn(e),i=typeof s.value<"u"?s.value:n.value.adjustPosition,c=ne(),a=ne();return t.expose({getSubMenuRef:()=>c.value,getMenuItemRef:()=>a.value}),()=>an(dr,{...e,ref:a,showRightArrow:!0,maxWidth:void 0,minWidth:void 0,maxHeight:void 0,adjustSubMenuPosition:void 0,hasChildren:typeof t.slots.default!==void 0},t.slots.default?{submenu:u=>an(pr,{ref:c,show:u.show,maxWidth:o.value,minWidth:r.value,maxHeight:l.value,adjustPosition:i,parentMenuItemContext:u.context},{default:t.slots.default}),...vp(t.slots,"default")}:t.slots)}});function Kp(e,t,n,s){const o=ne(!0),r=an(Lc,{options:e,show:o,container:t,isFullScreenContainer:!n,onCloseAnimFinished:()=>{ll(null,t)},onClose:l=>{var i;(i=e.onClose)==null||i.call(e,l),o.value=!1}},s);return ll(r,t),r.component}function Fl(e,t){const n=Oc(e);return Kp(e,n.container,n.isNew,t).exposed}const Zs={install(e){e.config.globalProperties.$contextmenu=Fl,e.component("ContextMenu",Up),e.component("ContextMenuItem",dr),e.component("ContextMenuGroup",zp),e.component("ContextMenuSperator",Gn),e.component("ContextMenuSeparator",Gn),e.component("ContextSubMenu",pr)},showContextMenu(e,t){return Fl(e,t)},isAnyContextMenuOpen(){return fp()},closeContextMenu:Tc,transformMenuPosition:pp},qp={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512"};function Dc(e,t){return $(),G("svg",qp,t[0]||(t[0]=[A("path",{d:"M223.97 175A81 81 0 0 0 143 256c0 44.7 36.27 81.03 80.97 81.03 44.72 0 80.72-36.34 80.72-81.03 0-44.73-36-81-80.8-81zM386.3 302.53l-14.58 35.16 29.47 57.8-36.1 36.1-59.3-28-35.2 14.4-17.87 54.6-2.28 7.24h-51L177.4 418.2l-35.17-14.5-57.9 29.4-36.1-36.1 27.97-59.2-14.47-35.12L0 282.6v-51l61.7-22.1 14.5-35.1-25.96-51.23-3.43-6.72 36.1-36.03 59.3 27.92 35.1-14.5 17.9-54.6 2.3-7.24h51l22.1 61.73 35.07 14.52 58.04-29.4 36.06 36.03-27.96 59.2 14.42 35.17 61.8 20.13v50.97l-61.67 22.18z"},null,-1)]))}const Fc={render:Dc},Gp=Object.freeze(Object.defineProperty({__proto__:null,default:Fc,render:Dc},Symbol.toStringTag,{value:"Module"})),Jp={key:0,class:"empty-container"},Yp={key:0},Zp={key:1},Xp={key:2},Qp={key:3},eh={key:4},th=_e({__name:"EmptyFolder",props:{path:{},documents:{}},setup(e){const t=Ie(),n=e;return(s,o)=>!n.path||s.documents.length===0?($(),G("div",Jp,[($(),pe(Qo(M(Fc)),{class:"cog"})),M(t).connected?M(t).document.length===0?($(),G("p",Zp,"Waiting for File List")):M(t).query?($(),G("p",Xp,"No matches!")):M($c)(n.path)?($(),G("p",eh,"Empty folder")):($(),G("p",Qp,"Folder not found")):($(),G("p",Yp,"No Connection"))])):he("",!0)}});const nh=lt(th,[["__scopeId","data-v-92345830"]]),sh=["checked"],oh=_e({__name:"SelectBox",props:{doc:{}},setup(e){const t=Ie();return(n,s)=>($(),G("input",{type:"checkbox",tabindex:"-1",checked:M(t).selected.has(n.doc.key),onClick:s[0]||(s[0]=Ne(()=>{},["stop"])),onChange:s[1]||(s[1]=o=>{o.target.checked?M(t).selected.add(n.doc.key):M(t).selected.delete(n.doc.key)})},null,40,sh))}}),Fo=_e({__name:"FileRenameInput",props:{doc:{},rename:{type:Function},exit:{type:Function}},setup(e){const t=ne(null),n=ne("");Qe(()=>{n.value=s.doc.name;const r=n.value.lastIndexOf(".");Ze(()=>{t.value.focus(),t.value.setSelectionRange(0,r>0?r:n.value.length)})});const s=e,o=()=>{s.exit(),!(s.doc.key!=="new"&&(n.value===s.doc.name||n.value.length===0))&&s.rename(s.doc,n.value)};return(r,l)=>cn(($(),G("input",{ref_key:"input",ref:t,id:"FileRenameInput",type:"text",autocorrect:"off","onUpdate:modelValue":l[0]||(l[0]=i=>n.value=i),onBlur:l[1]||(l[1]=(...i)=>r.exit&&r.exit(...i)),onKeyup:[l[2]||(l[2]=Cn((...i)=>r.exit&&r.exit(...i),["esc"])),Cn(o,["enter"])]},null,544)),[[ns,n.value]])}});const rh=["src"],lh=["src"],ih={key:2,class:"folder icon"},ch=["src","poster"],ah={key:4,class:"audio icon"},uh=["src"],fh={key:5,class:"archive icon"},dh=_e({__name:"MediaPreview",props:{doc:{},quality:{}},setup(e,{expose:t}){const n=ne(null),s=ne(null),o=ve(()=>n.value||s.value),r=ve(()=>`${l.doc.previewurl}?${l.quality}&t=${l.doc.mtime}`),l=e,i=()=>{o.value&&(o.value.controls=!0,o.value.setAttribute("data-playing",""))},c=()=>{o.value&&(o.value.controls=!1,o.value.removeAttribute("data-playing"))};let a=null;const u=()=>{if(!o.value)return;o.value.load();const y=Array.from(document.querySelectorAll("video, audio"));if(y.length===0)return;let I=null;for(const w in y)if(y[w]===(a||o.value)){I=y[+w+1]||y[0];break}if(I)if(I.tagName==="VIDEO"&&document.fullscreenElement===o.value){const w=o.value,v=I;if(w===v){v.play();return}a||w.addEventListener("fullscreenchange",m=>{a&&(a.currentTime=w.currentTime,a.click(),w.paused||a.play(),a=null,w.src=l.doc.url,w.poster=r.value,c())},{once:!0}),a=v,w.src=v.src,w.poster="",w.play()}else document.exitFullscreen(),I.click()};t({play(){if(!o.value)return!1;if(o.value.paused){o.value.play();for(const y of Array.from(document.querySelectorAll("video, audio")))y!==o.value&&y.pause()}else o.value.pause();return!0},media:o});const f=()=>["mkv","mp4","webm","mov","avi"].includes(l.doc.ext),d=()=>["mp3","flac","ogg","aac"].includes(l.doc.ext),h=()=>["zip","tar","gz","bz2","xz","7z","rar"].includes(l.doc.ext),x=()=>["bmp","ico","tif","tiff","heic","heif","pdf","epub","mobi"].includes(l.doc.ext)||l.doc.size>5e5&&["avif","webp","png","jpg","jpeg"].includes(l.doc.ext);return(y,I)=>x()?($(),G("img",{key:0,src:`${y.doc.previewurl}?${y.quality}&t=${y.doc.mtime}`,alt:""},null,8,rh)):y.doc.img?($(),G("img",{key:1,src:y.doc.url,alt:""},null,8,lh)):y.doc.dir?($(),G("span",ih)):f()?($(),G("video",{key:3,ref_key:"vid",ref:s,src:y.doc.url,poster:r.value,preload:"none",onPlay:i,onPause:c,onEnded:u,onSeeking:I[0]||(I[0]=w=>o.value.play())},null,40,ch)):d()?($(),G("div",ah,[A("audio",{ref_key:"aud",ref:n,src:y.doc.url,class:"icon",preload:"none",onPlay:i,onPause:c,onEnded:u,onSeeking:I[1]||(I[1]=w=>o.value.play())},null,40,uh)])):h()?($(),G("span",fh)):($(),G("span",{key:6,class:De(["file icon",`ext-${y.doc.ext}`])},null,2))}});const ph=lt(dh,[["__scopeId","data-v-c582f4d9"]]),hh=["id","href"],gh=["title"],mh=_e({__name:"GalleryFigure",props:{doc:{},editing:{}},setup(e){const t=Ie(),n=e,s=ne(null),o=r=>{s.value.play()&&r.preventDefault(),t.cursor=n.doc.key};return(r,l)=>{const i=Fo,c=oh;return $(),G("a",{id:`file-${r.doc.key}`,href:r.doc.url,tabindex:"-1",class:De({file:!r.doc.dir,folder:r.doc.dir,cursor:M(t).cursor===r.doc.key}),onContextmenu:l[3]||(l[3]=Ne(()=>{},["stop"])),onFocus:l[4]||(l[4]=Ne(a=>M(t).cursor=r.doc.key,["stop"])),onClick:o},[A("figure",null,[Fe(r.$slots,"default",{},void 0,!0),re(ph,{ref_key:"m",ref:s,doc:r.doc,tabindex:"-1",quality:"sz=512",class:"figcontent"},null,8,["doc"]),l[6]||(l[6]=A("div",{class:"titlespacer"},null,-1)),A("figcaption",{onClick:l[1]||(l[1]=Ne(()=>{},["prevent"])),onContextmenu:l[2]||(l[2]=Ne(a=>r.$emit("menu",a),["prevent"]))},[r.editing?($(),pe(i,{key:0,doc:r.doc,rename:r.editing.rename,exit:r.editing.exit},null,8,["doc","rename","exit"])):($(),G(we,{key:1},[re(c,{doc:r.doc,onClick:l[0]||(l[0]=a=>M(t).cursor=r.doc.key)},null,8,["doc"]),A("span",{title:r.doc.name+`
|
|
26
|
+
`+r.doc.modified+`
|
|
27
|
+
`+r.doc.sizedisp},Pe(r.doc.name),9,gh),l[5]||(l[5]=A("div",{class:"namespacer"},null,-1))],64))],32)])],42,hh)}}});const vh=lt(mh,[["__scopeId","data-v-3e6b502c"]]),_h=_e({__name:"Gallery",props:{path:{},documents:{}},setup(e,{expose:t}){const n=e,s=Ie(),o=ir(),r=Hs(null),l=()=>{r.value=null},i=(v,m)=>{const _=v.name,S=un(ls,{message(k){const R=JSON.parse(k.data);"error"in R?(console.error("Rename failed",R.error.message,R.error),v.name=_):console.log("Rename succeeded",R)}});S.onopen=()=>{S.send(JSON.stringify({op:"rename",path:`${v.loc}/${_}`,to:m}))},v.name=m},c=ne(),a=ve(()=>c.value?getComputedStyle(c.value).gridTemplateColumns.split(" ").length:1);t({newFolder(){const v=Math.floor(Date.now()/1e3);r.value=new cr({loc:I.value,key:"new",name:"New Folder",dir:!0,mtime:v,size:0}),s.cursor=r.value.key},toggleSelectAll(){console.log("Select"),y.value=!y.value},toggleSortColumn(v){const m=["","name","modified","size",""][v];m&&s.toggleSort(m)},isCursor(){return s.cursor&&r.value===null},cursorRename(){r.value=n.documents.find(v=>v.key===s.cursor)??null},cursorSelect(){const v=s.cursor;v&&(s.selected.has(v)?s.selected.delete(v):s.selected.add(v),this.cursorMove(1,null))},up(v){this.cursorMove(-a.value,v)},down(v){this.cursorMove(a.value,v)},left(v){this.cursorMove(-1,v)},right(v){this.cursorMove(1,v)},cursorMove(v,m){var H;const _=!!(m!=null&&m.shiftKey),S=n.documents;if(S.length===0){s.cursor="";return}const k=S.length,R=(Z,Y)=>(Z%Y+Y)%Y,D=(Z,Y)=>R(Z+Y,k+1),C=s.cursor?S.findIndex(Z=>Z.key===s.cursor):k;if(m&&C===0&&m.key==="ArrowLeft"||m&&C===k-1&&m.key==="ArrowRight")return;let N;C===k?N=v>0?0:k-1:(N=D(C,v),(Math.abs(v)>=k||Math.sign(v)!==Math.sign(N-C))&&(N=k)),s.cursor=((H=S[N])==null?void 0:H.key)??"";const q=s.cursor?document.getElementById(`file-${s.cursor}`):"";if(_){let[Z,Y]=v>0?[C,N]:[N,C];for(let ce=Z;ce!==Y;ce=D(ce,1)){if(ce===k)continue;const ie=S[ce].key;s.selected.has(ie)?s.selected.delete(ie):s.selected.add(ie)}}d=q,f||(f=setTimeout(()=>{d&&d.scrollIntoView({block:"center",behavior:"smooth"}),f=null},300)),N===k&&u()}});const u=()=>{const v=document.querySelector(".breadcrumb");v&&v.focus()};let f=null,d=null;Ot(()=>{var v;if(s.cursor&&s.cursor!==((v=r.value)==null?void 0:v.key)&&(r.value=null),r.value&&(s.cursor=r.value.key),s.cursor){const m=document.querySelector(`#file-${s.cursor}`);m&&(m.focus(),m.scrollIntoView({block:"center",behavior:"smooth"}))}}),Ot(()=>{!n.documents.length&&s.cursor&&(s.cursor="",u())}),Qe(()=>{const v=document.querySelector(".cursor");v&&(v.scrollIntoView({block:"center",behavior:"instant"}),v.focus())});const h=(v,m)=>{const _=un(ls,{open(){_.send(JSON.stringify({op:"mkdir",path:`${v.loc}/${m}`}))},message(S){const k=JSON.parse(S.data);"error"in k?(console.error("Mkdir failed",k.error.message,k.error),r.value=null):(console.log("mkdir",k),o.push(v.urlrouter))}});v.name=m,v.key=crypto.randomUUID()},x=v=>{const m=n.documents,_=m[v].loc;return v===0?_!==I.value:_!==m[v-1].loc};ve({get:()=>n.documents.length>0&&n.documents.some(v=>s.selected.has(v.key))&&!y.value,set:v=>{}});const y=ve({get:()=>n.documents.length>0&&n.documents.every(v=>s.selected.has(v.key)),set:v=>{console.log("Setting allSelected",v);for(const m of n.documents)v?s.selected.add(m.key):s.selected.delete(m.key)}}),I=ve(()=>n.path.join("/")),w=(v,m)=>{s.cursor=m.key,Zs.showContextMenu({x:v.x,y:v.y,items:[{label:"Rename",onClick:()=>{r.value=m}}]})};return(v,m)=>{var k;const _=vh,S=ur;return n.documents.length||r.value?($(),G("div",{key:0,class:"gallery",ref_key:"gallery",ref:c},[((k=r.value)==null?void 0:k.key)==="new"?($(),pe(_,{doc:r.value,key:r.value.key,editing:{rename:h,exit:l}},null,8,["doc","editing"])):he("",!0),($(!0),G(we,null,Mn(v.documents,(R,D)=>($(),pe(_,{key:R.key,doc:R,editing:r.value===R?{rename:i,exit:l}:null,onMenu:C=>w(C,R)},{default:ft(()=>[x(D)?($(),G(we,{key:0},[re(S,{path:R.loc?R.loc.split("/"):[],class:"folder-change"},null,8,["path"]),m[0]||(m[0]=A("div",{class:"spacer"},null,-1))],64)):he("",!0)]),_:2},1032,["doc","editing","onMenu"]))),128))],512)):he("",!0)}}});const yh=lt(_h,[["__scopeId","data-v-b5d18e17"]]),bh=_e({__name:"FileSize",props:{doc:{}},setup(e){const t=ve(()=>{const s=n.doc.sizedisp.split(" ").slice(-1)[0];return+s?"bytes":s}),n=e;return(s,o)=>($(),G("td",{class:De(["size right",t.value])},Pe(s.doc.sizedisp),3))}});const wh=lt(bh,[["__scopeId","data-v-0f1301ed"]]),Ch={class:"modified right"},kh=["data-tooltip","datetime"],xh=_e({__name:"FileModified",props:{doc:{}},setup(e){const t=ve(()=>new Date(1e3*s.doc.mtime).toISOString().replace(".000Z","Z")),n=ve(()=>t.value.replace("T",`
|
|
28
|
+
`).replace("Z"," UTC")),s=e;return(o,r)=>($(),G("td",Ch,[A("time",{"data-tooltip":n.value,datetime:t.value},Pe(o.doc.modified),9,kh)]))}}),Sh={key:0},Eh={class:"selection"},Rh=["indeterminate"],Mh={key:0,class:"folder"},Ph={class:"name"},Ah={key:0,class:"folder-change"},Ih={colspan:"5"},$h=["id","onClick","onContextmenu"],Th=["onClick"],Oh=["checked","onChange"],Lh={class:"name"},Dh=["href","onFocus"],Fh=["onClick"],Nh={class:"menu"},Hh=["onClick"],Bh={key:1,class:"summary"},jh={colspan:"3",class:"right"},Vh={class:"size right"},Wh=_e({__name:"FileExplorer",props:{path:{},documents:{}},setup(e,{expose:t}){const n=e,s=Ie(),o=ir(),r=Hs(null),l=(m,_)=>{const S=m.name,k=un(ls,{message(R){const D=JSON.parse(R.data);"error"in D?(console.error("Rename failed",D.error.message,D.error),m.name=S):console.log("Rename succeeded",D)}});k.onopen=()=>{k.send(JSON.stringify({op:"rename",path:`${m.loc}/${S}`,to:_}))},m.name=_};t({newFolder(){console.log("New folder");const m=Math.floor(Date.now()/1e3);r.value=new cr({loc:w.value,key:"new",name:"New Folder",dir:!0,mtime:m,size:0}),s.cursor=r.value.key},toggleSelectAll(){console.log("Select"),I.value=!I.value},isCursor(){return s.cursor&&r.value===null},cursorRename(){r.value=n.documents.find(m=>m.key===s.cursor)??null},cursorSelect(){const m=s.cursor;m&&(s.selected.has(m)?s.selected.delete(m):s.selected.add(m),this.cursorMove(1,null))},up(m){this.cursorMove(-1,m)},down(m){this.cursorMove(1,m)},left(m){o.back()},right(m){const _=document.querySelector(`#file-${s.cursor} a`);_&&_.click()},cursorMove(m,_){var Z;const S=!!(_!=null&&_.shiftKey),k=n.documents;if(k.length===0){s.cursor="";return}const R=k.length,D=(Y,ce)=>(Y%ce+ce)%ce,C=(Y,ce)=>D(Y+ce,R+1),N=s.cursor?k.findIndex(Y=>Y.key===s.cursor):k.length,q=C(N,m);s.cursor=((Z=k[q])==null?void 0:Z.key)??"";const H=s.cursor?document.getElementById(`file-${s.cursor}`):"";if(S){let[Y,ce]=m>0?[N,q]:[q,N];for(let ie=Y;ie!==ce;ie=C(ie,1)){if(ie===R)continue;const ee=k[ie].key;s.selected.has(ee)?s.selected.delete(ee):s.selected.add(ee)}}a=H,c||(c=setTimeout(()=>{a&&a.scrollIntoView({block:"center",behavior:"smooth"}),c=null},300)),q===R&&i()}});const i=()=>{const m=document.querySelector(".breadcrumb");m&&m.focus()};let c=null,a=null;Ot(()=>{var m,_;if(s.cursor&&s.cursor!==((m=r.value)==null?void 0:m.key)&&(r.value=null),r.value&&(s.cursor=(_=r.value)==null?void 0:_.key),s.cursor){const S=document.querySelector(`#file-${s.cursor} .name a`);S&&S.focus()}}),Ot(()=>{!n.documents.length&&s.cursor&&(s.cursor="",i())});let u=ne(0),f=null;const d=()=>{u.value=Math.floor(Date.now()/1e3)};Qe(()=>{d(),f=setInterval(d,1e3);const m=document.querySelector(".cursor");m&&(m.scrollIntoView({block:"center",behavior:"instant"}),m.focus())}),kn(()=>{clearInterval(f)});const h=(m,_)=>{const S=un(ls,{open(){S.send(JSON.stringify({op:"mkdir",path:`${m.loc}/${_}`}))},message(k){const R=JSON.parse(k.data);"error"in R?(console.error("Mkdir failed",R.error.message,R.error),r.value=null):(console.log("mkdir",R),o.push(m.urlrouter))}});m.name=_,m.key=crypto.randomUUID()},x=m=>{const _=n.documents,S=_[m].loc;return m===0?S!==w.value:S!==_[m-1].loc},y=ve({get:()=>n.documents.length>0&&n.documents.some(m=>s.selected.has(m.key))&&!I.value,set:m=>{}}),I=ve({get:()=>n.documents.length>0&&n.documents.every(m=>s.selected.has(m.key)),set:m=>{console.log("Setting allSelected",m);for(const _ of n.documents)m?s.selected.add(_.key):s.selected.delete(_.key)}}),w=ve(()=>n.path.join("/")),v=(m,_)=>{s.cursor=_.key,Zs.showContextMenu({x:m.x,y:m.y,items:[{label:"Rename",onClick:()=>{r.value=_}}]})};return(m,_)=>{var D;const S=xh,k=wh,R=ur;return n.documents.length||r.value?($(),G("table",Sh,[A("thead",null,[A("tr",null,[A("th",Eh,[cn(A("input",{type:"checkbox",tabindex:"-1","onUpdate:modelValue":_[0]||(_[0]=C=>I.value=C),indeterminate:y.value},null,8,Rh),[[lc,I.value]])]),A("th",{class:De(["sortcolumn",{sortactive:M(s).sortOrder==="name"}]),onClick:_[1]||(_[1]=C=>M(s).toggleSort("name"))},"Name",2),A("th",{class:De(["sortcolumn modified right",{sortactive:M(s).sortOrder==="modified"}]),onClick:_[2]||(_[2]=C=>M(s).toggleSort("modified"))},"Modified",2),A("th",{class:De(["sortcolumn size right",{sortactive:M(s).sortOrder==="size"}]),onClick:_[3]||(_[3]=C=>M(s).toggleSort("size"))},"Size",2),_[5]||(_[5]=A("th",{class:"menu"},null,-1))])]),A("tbody",null,[((D=r.value)==null?void 0:D.key)==="new"?($(),G("tr",Mh,[_[6]||(_[6]=A("td",{class:"selection"},null,-1)),A("td",Ph,[re(Fo,{doc:r.value,rename:h,exit:()=>{r.value=null}},null,8,["doc","exit"])]),($(),pe(S,{doc:r.value,key:M(u)},null,8,["doc"])),re(k,{doc:r.value},null,8,["doc"]),_[7]||(_[7]=A("td",{class:"menu"},null,-1))])):he("",!0),($(!0),G(we,null,Mn(m.documents,(C,N)=>($(),G(we,{key:C.key},[x(N)?($(),G("tr",Ah,[A("th",Ih,[re(R,{path:C.loc?C.loc.split("/"):[]},null,8,["path"])])])):he("",!0),A("tr",{id:`file-${C.key}`,class:De({file:!C.dir,folder:C.dir,cursor:M(s).cursor===C.key}),onClick:q=>M(s).cursor=M(s).cursor===C.key?"":C.key,onContextmenu:Ne(q=>v(q,C),["prevent"])},[A("td",{class:"selection",onClick:Ne(q=>M(s).cursor=M(s).cursor===C.key?C.key:"",["stop"])},[A("input",{type:"checkbox",tabindex:"-1",checked:M(s).selected.has(C.key),onChange:q=>q.target.checked?M(s).selected.add(C.key):M(s).selected.delete(C.key)},null,40,Oh)],8,Th),A("td",Lh,[r.value===C?($(),pe(Fo,{key:0,doc:C,rename:l,exit:()=>{r.value=null}},null,8,["doc","exit"])):($(),G(we,{key:1},[A("a",{href:C.url,tabindex:"-1",onContextmenu:_[4]||(_[4]=Ne(()=>{},["stop"])),onFocus:Ne(q=>M(s).cursor=C.key,["stop"])},Pe(C.name),41,Dh),M(s).cursor==C.key?($(),G("button",{key:0,tabindex:"-1",class:"rename-button",onClick:()=>r.value=C},"🖊️",8,Fh)):he("",!0)],64))]),($(),pe(S,{doc:C,key:M(u)},null,8,["doc"])),re(k,{doc:C},null,8,["doc"]),A("td",Nh,[A("button",{tabindex:"-1",onClick:Ne(q=>v(q,C),["stop"])},"⋮",8,Hh)])],42,$h)],64))),128)),n.documents.length>1?($(),G("tr",Bh,[A("td",jh,Pe(n.documents.length)+" items",1),A("td",Vh,Pe(M(Pc)(n.documents.reduce((C,N)=>C+N.size,0))),1),_[8]||(_[8]=A("td",{class:"menu"},null,-1))])):he("",!0)])])):he("",!0)}}});const Uh=lt(Wh,[["__scopeId","data-v-765caf34"]]),zh=_e({__name:"ExplorerView",props:{path:{},query:{}},setup(e){const t=Ie(),n=ne(),s=e,o=ve(()=>{const r=s.path.join("/"),l=s.query;if(!l)return Do(t.document.filter(d=>d.loc===r),t.prefs.sortListing);const i=Nd(l);let c=100,a=[];for(const d of t.recentDocuments)if(Hd(d.haystack,i)&&(a.push(d),--c===0))break;const u=r+"/",f=t.prefs.sortFiltered;return f?Do(a,f):(a.sort((d,h)=>(h.loc===r)-(d.loc===r)||(h.loc.slice(0,u.length)===u)-(d.loc.slice(0,u.length)===u)||rs.compare(d.loc,h.loc)||(d.type==="file")-(h.type==="file")||h.name.includes(l)-d.name.includes(l)||rs.compare(d.name,h.name)),a)});return Ot(()=>{t.fileExplorer=n.value,t.query=s.query}),It([()=>s.path.join("/"),()=>s.query],()=>{t.prefs.gallery=o.value.some(r=>r.previewable)},{immediate:!0}),(r,l)=>{const i=yh,c=nh;return $(),G(we,null,[M(t).prefs.gallery?($(),pe(i,{ref_key:"fileExplorer",ref:n,key:`gallery-${M(fn).currentRoute.value.path}`,path:s.path,documents:o.value},null,8,["path","documents"])):($(),pe(Uh,{ref_key:"fileExplorer",ref:n,key:`explorer-${M(fn).currentRoute.value.path}`,path:s.path,documents:o.value},null,8,["path","documents"])),re(c,{documents:o.value,path:s.path},null,8,["documents","path"])],64)}}});const Kh=lt(zh,[["__scopeId","data-v-93eb97ee"]]),fn=Od({history:ud("/"),routes:[{path:"/:pathMatch(.*)*",name:"explorer",component:Kh}]}),qh={class:"headermain buttons"},Gh=["value"],Jh=_e({__name:"HeaderMain",props:{path:{},query:{}},setup(e,{expose:t}){const n=Ie(),s=ne(!1),o=ne(),r=ne(),l=e,i=f=>{if(!s.value)return;s.value=!1,document.querySelector(".breadcrumb").focus(),c(f)},c=f=>{const d=f.target.value;let h=l.path.join("/");h=h?`/${h}`:"";const y=(d?`${h}//${d}`:h||"/").replaceAll("?","%3F").replaceAll("#","%23");!l.query&&d?fn.push(y):fn.replace(y)},a=f=>{if(s.value=!s.value,!s.value)return i(f);Ze(()=>{const d=o.value;d&&d.focus()})};Ot(()=>{l.query&&(s.value=!0)});const u=f=>{const d=[];d.push({label:"Change Password",onClick:()=>{n.dialog="settings"}}),n.user.privileged&&d.push({label:"Admin Settings",onClick:()=>{n.dialog="usermgmt"}}),n.user.isLoggedIn?d.push({label:`Logout ${n.user.username??""}`,onClick:()=>n.logout()}):d.push({label:"Login",onClick:()=>n.loginDialog()}),Zs.showContextMenu({x:f.target.getBoundingClientRect().right,y:f.target.getBoundingClientRect().bottom,items:d})};return t({toggleSearchInput:a,closeSearch:i}),(f,d)=>{const h=up,x=Ys;return $(),G("nav",qh,[M(n).error?($(),G(we,{key:0},[A("div",{class:"error-message",onClick:d[0]||(d[0]=y=>M(n).error="")},Pe(M(n).error),1),d[3]||(d[3]=A("div",{class:"smallgap"},null,-1))],64)):he("",!0),re(h,{path:l.path},null,8,["path"]),re(x,{name:"create-folder","data-tooltip":"New folder",onClick:d[1]||(d[1]=()=>{console.log("New",M(n).fileExplorer),M(n).fileExplorer.newFolder(),console.log("Done")})}),Fe(f.$slots,"default",{},void 0,!0),d[4]||(d[4]=A("div",{class:"spacer smallgap"},null,-1)),s.value?($(),G("input",{key:1,ref_key:"search",ref:o,type:"search",value:f.query,onInput:c,placeholder:"Find files",class:"margin-input"},null,40,Gh)):he("",!0),re(x,{ref_key:"searchButton",ref:r,name:"find",onClick:Ne(a,["prevent"])},null,512),re(x,{name:"eye",onClick:d[2]||(d[2]=y=>M(n).prefs.gallery=!M(n).prefs.gallery)}),re(x,{name:"cog",onClick:u})])}}});const Yh=lt(Jh,[["__scopeId","data-v-f1d3ff25"]]),Zh=_e({__name:"DownloadButton",setup(e){const t=Ie(),n={total:0,xfer:0,t0:0,tlast:0,statbytes:0,statdur:0,files:[],filestart:0,fileidx:0,filecount:0,filename:"",filesize:0,filepos:0,status:"idle"};t.dprogress={...n},setInterval(()=>{Date.now()-t.dprogress.tlast>3e3?(t.dprogress.statbytes=0,t.dprogress.statdur=1):(t.dprogress.statbytes*=.9,t.dprogress.statdur*=.9)},100);const s=()=>{Object.assign(t.dprogress,n),t.dprogress.t0=Date.now(),t.dprogress.tlast=t.dprogress.t0+1},o=i=>{const c=document.createElement("a");c.href=i,c.download="",c.click()},r=async(i,c)=>{let a="",u=c;console.log("Downloading to filesystem",i.recursive);for(const[f,d,h]of i.recursive)h.dir||(t.dprogress.files.push(f),++t.dprogress.filecount,t.dprogress.total+=h.size);for(const[f,d,h]of i.recursive){a&&!f.startsWith(a+"/")&&(a="",u=c);const x=f.slice(a.length);for(const w of x.split("/").slice(0,h.dir?void 0:-1))if(w){a+=`${w}/`;try{u=await u.getDirectoryHandle(w.normalize("NFC"),{create:!0})}catch(v){throw console.error("Failed to create directory",a,v),new Error(`Failed to create directory ${a}: ${v}`)}console.log("Created",a)}if(h.dir)continue;const y=f.split("/").pop().normalize("NFC");let I;try{I=await u.getFileHandle(y,{create:!0})}catch(w){throw console.error("Failed to create file",f,d,a+y,w),new Error(`Failed to create file ${a+y}: ${w}`)}try{const w=await I.createWritable(),v=`/files/${f}`;console.log("Fetching",v);const m=await fetch(v);if(!m.ok)throw t.error=`Failed to download ${v}: ${m.status} ${m.statusText}`,new Error(`Failed to download ${v}: ${m.status} ${m.statusText}`);if(m.body){++t.dprogress.fileidx;const _=m.body.getReader();for(await w.truncate(0),t.error="Direct download.",t.dprogress.tlast=Date.now();;){const{value:S,done:k}=await _.read();if(k)break;await w.write(S);const R=Date.now(),D=S.byteLength;t.dprogress.xfer+=D,t.dprogress.filepos+=D,t.dprogress.statbytes+=D,t.dprogress.statdur+=R-t.dprogress.tlast,t.dprogress.tlast=R}}await w.close(),console.log("Saved",a+y)}catch(w){throw console.error("Failed to write file",a+y,w),new Error(`Failed to write file ${a+y}: ${w}`)}}s()},l=async()=>{const i=t.selectedFiles;if(console.log("Download",i),i.keys.length===0){console.warn("Attempted download but no files found. Missing selected keys:",i.missing),t.error="No existing files selected",t.selected.clear();return}const c=i.recursive.filter(([u,f,d])=>!d.dir);if(c.length===1)return t.selected.clear(),t.error="Single file via browser downloads",o(`/files/${c[0][1]}`);if("showDirectoryPicker"in window)try{const u=await window.showDirectoryPicker({startIn:"downloads",mode:"readwrite"});await r(i,u),t.selected.clear();return}catch(u){console.error("Download to folder aborted",u)}console.log("Falling back to zip download");const a=i.keys.length===1?i.docs[i.keys[0]].name:"download";o(`/zip/${Array.from(i.keys).join("+")}/${a}.zip`),t.error="Downloading as ZIP via browser downloads",t.selected.clear()};return(i,c)=>{const a=Ys;return $(),pe(a,{name:"download","data-tooltip":"Download",onClick:l})}}}),Xh={class:"select-text"},Qh=_e({__name:"HeaderSelected",props:{path:Array},setup(e){const t=Ie(),n=e,s=ve(()=>n.path.join("/")),o=(r,l)=>{const i=t.selectedFiles,c={op:r,sel:i.keys.map(u=>{const f=i.docs[u];return f.loc?`${f.loc}/${f.name}`:f.name})};l!==void 0&&(c.dst=l);const a=un(ls,{message(u){const f=JSON.parse(u.data);if("error"in f){console.error("Control socket error",c,f.error),t.error=f.error.message;return}else if(f.status==="ack"){console.log("Control ack OK",f),a.close(),t.selected.clear();return}else console.log("Unknown control response",c,f)}});a.onopen=()=>{a.send(JSON.stringify(c))}};return(r,l)=>{const i=Zh,c=Ys;return M(t).selected.size?($(),G(we,{key:0},[l[4]||(l[4]=A("div",{class:"smallgap"},null,-1)),A("p",Xh,Pe(M(t).selected.size)+" selected ➤",1),re(i),re(c,{name:"copy","data-tooltip":"Copy here",onClick:l[0]||(l[0]=a=>o("cp",s.value))}),re(c,{name:"paste","data-tooltip":"Move here",onClick:l[1]||(l[1]=a=>o("mv",s.value))}),re(c,{name:"trash","data-tooltip":"Delete ⚠️",onClick:l[2]||(l[2]=a=>o("rm"))}),A("button",{class:"action-button unselect","data-tooltip":"Unselect all",onClick:l[3]||(l[3]=a=>M(t).selected.clear())},"❌")],64)):he("",!0)}}});const eg=["id"],tg={key:0},hr=_e({__name:"ModalDialog",props:{title:{},name:{}},setup(e,{expose:t}){const n=ne(null),s=Ie(),o=()=>{n.value.close(),s.dialog=""},r=e,l=()=>{s.dialog=r.name,setTimeout(()=>{n.value.showModal(),Ze(()=>{const i=n.value.querySelector("input");i&&i.focus()})},0)};return t({show:l,close:o}),Ot(()=>{n.value&&l()}),(i,c)=>M(s).dialog===i.name?($(),G("dialog",{key:0,ref_key:"dialog",ref:n,id:r.name,onKeydown:Cn(o,["escape"])},[r.title?($(),G("h1",tg,Pe(r.title),1)):he("",!0),A("div",null,[Fe(i.$slots,"default",{},()=>[c[0]||(c[0]=Ws(" Dialog with no content ",-1)),A("button",{onClick:o},"OK")])])],40,eg)):he("",!0)}});const ng={class:"login-container"},sg={class:"error-text"},og={class:"dialog-buttons"},rg=_e({__name:"SettingsModal",setup(e){const t=ne(!1),n=Ie(),s=ne(),o=ne(),r=Ct({passwordChange:"",password:"",error:""}),l=()=>{r.passwordChange="",r.password="",r.error="",n.dialog=""},i=async c=>{c.preventDefault();try{if(r.error="",r.passwordChange){if(!r.password){r.error="⚠️ Current password is required",o.value.focus();return}await Kd(n.user.username,r.passwordChange,r.password)}l()}catch(a){const u=a;r.error=u.message||"🛑 Unknown error"}finally{t.value=!1}};return(c,a)=>{const u=hr;return $(),pe(u,{name:"settings",title:"Settings"},{default:ft(()=>[A("form",null,[M(n).user.isLoggedIn?($(),G(we,{key:0},[a[5]||(a[5]=A("h3",null,"Update your authentication",-1)),A("div",ng,[a[2]||(a[2]=A("label",{for:"username"},"New password:",-1)),cn(A("input",{ref_key:"passwordChange",ref:s,id:"passwordChange",type:"password",autocomplete:"new-password",spellcheck:"false",autocorrect:"off","onUpdate:modelValue":a[0]||(a[0]=f=>r.passwordChange=f)},null,512),[[ns,r.passwordChange]]),a[3]||(a[3]=A("label",{for:"password"},"Current password:",-1)),cn(A("input",{ref_key:"password",ref:o,id:"password",name:"password",type:"password",autocomplete:"current-password",spellcheck:"false",autocorrect:"off","onUpdate:modelValue":a[1]||(a[1]=f=>r.password=f)},null,512),[[ns,r.password]])]),A("h3",sg,Pe(r.error||" "),1),A("div",og,[A("input",{id:"close",type:"reset",value:"Close",class:"button",onClick:l}),a[4]||(a[4]=A("div",{class:"spacer"},null,-1)),A("input",{id:"submit",type:"submit",value:"Submit",class:"button",onClick:Ne(i,["prevent"])})])],64)):($(),G(we,{key:1},[a[7]||(a[7]=A("p",null,"No settings are available because you have not logged in.",-1)),A("div",{class:"dialog-buttons"},[a[6]||(a[6]=A("div",{class:"spacer"},null,-1)),A("input",{id:"close",type:"reset",value:"Close",class:"button",onClick:l})])],64))])]),_:1})}}});const lg=lt(rg,[["__scopeId","data-v-8df784f7"]]),ig={class:"login-container"},cg={class:"error-text"},ag=_e({__name:"LoginModal",setup(e){const t=ne(!1),n=Ie(),s=Ct({username:"",password:"",error:""}),o=async()=>{try{s.error="",t.value=!0;const r=await Ud(s.username,s.password);n.login(r.data.username,!!r.data.privileged)}catch(r){const l=r;s.error=l.message||"🛑 Unknown error"}finally{t.value=!1}};return(r,l)=>{const i=hr;return $(),pe(i,{name:"login",title:"Authentication required"},{default:ft(()=>[A("form",{onSubmit:Ne(o,["prevent"])},[A("div",ig,[l[2]||(l[2]=A("label",{for:"username"},"Username:",-1)),cn(A("input",{id:"username",name:"username",autocomplete:"username",spellcheck:"false",autocorrect:"off",required:"","onUpdate:modelValue":l[0]||(l[0]=c=>s.username=c)},null,512),[[ns,s.username]]),l[3]||(l[3]=A("label",{for:"password"},"Password:",-1)),cn(A("input",{id:"password",name:"password",type:"password",autocomplete:"current-password",spellcheck:"false",autocorrect:"off",required:"","onUpdate:modelValue":l[1]||(l[1]=c=>s.password=c)},null,512),[[ns,s.password]])]),A("h3",cg,Pe(s.error||" "),1),l[4]||(l[4]=A("div",{class:"dialog-buttons"},[A("div",{class:"spacer"}),A("input",{id:"submit",type:"submit",value:"Login",class:"button-login"})],-1))],32)]),_:1})}}});const ug=lt(ag,[["__scopeId","data-v-06fdc161"]]),fg={key:0,class:"loading"},dg={key:1},pg={class:"form-row"},hg={class:"user-table"},gg=["checked","onChange","disabled"],mg=["onClick"],vg=["onClick"],_g=["onClick","disabled"],yg={class:"error-text"},bg=_e({__name:"UserManagementModal",setup(e){const t=Ie(),n=ne(!0),s=ne([]),o=ne(""),r=ne(""),l=ne("📋"),i=Ct({public:!1}),c=()=>{t.dialog="",o.value="",r.value=""},a=async()=>{try{n.value=!0;const w=await qd();s.value=w.users}catch(w){const v=w;o.value=v.message||"Failed to load users"}finally{n.value=!1}},u=async()=>{const w=window.prompt("Enter username for new user:");if(!(!w||!w.trim()))try{o.value="",r.value="";const v=await El(w.trim(),void 0,!1);await a(),v.password&&(r.value=`User ${w.trim()} created. Password: ${v.password}`)}catch(v){const m=v;o.value=m.message||"Failed to add user"}},f=async(w,v)=>{const m=v.target;try{o.value="",await Rl(w.username,{privileged:m.checked}),w.privileged=m.checked}catch(_){const S=_;o.value=S.message||"Failed to update user",m.checked=w.privileged}},d=async w=>{const v=window.prompt("Enter new username:",w.username);if(!(!v||!v.trim()||v.trim()===w.username))try{o.value="",r.value="";const m=await El(v.trim(),void 0,w.privileged);await Ml(w.username),await a(),m.password&&(r.value=`User renamed to ${v.trim()}. New password: ${m.password}`)}catch(m){const _=m;o.value=_.message||"Failed to rename user"}},h=async w=>{if(confirm(`Reset password for ${w.username}? A new password will be generated.`))try{o.value="",r.value="";const v=await Rl(w.username,{password:""});v.password&&(r.value=`Password reset for ${w.username}. New password: ${v.password}`)}catch(v){const m=v;o.value=m.message||"Failed to reset password"}},x=async w=>{if(confirm(`Delete user ${w}?`))try{o.value="",await Ml(w),await a()}catch(v){const m=v;o.value=m.message||"Failed to delete user"}},y=async(w=!1)=>{const v=r.value.match(/(?:Password|New password): (.+)/);if(v)if(await navigator.clipboard.writeText(v[1]),w){l.value="✅ Copied!";const m=r.value.replace(/(?:Password|New password): .+/,"Password copied to clipboard!");r.value=m,setTimeout(()=>{r.value="",l.value="📋"},3e3)}else r.value=""},I=async()=>{try{o.value="",r.value="",await Gd(i.public),t.server.public=i.public,r.value="Server settings updated"}catch(w){const v=w;o.value=v.message||"Failed to update settings"}};return Qe(()=>{i.public=t.server.public,a()}),It(()=>t.server.public,w=>{i.public=w}),(w,v)=>{const m=hr;return $(),pe(m,{name:"usermgmt",title:"Admin Settings"},{default:ft(()=>[n.value?($(),G("div",fg,"Loading...")):($(),G("div",dg,[v[5]||(v[5]=A("h3",null,"Server Settings",-1)),A("div",pg,[cn(A("input",{id:"publicServer",type:"checkbox","onUpdate:modelValue":v[0]||(v[0]=_=>i.public=_),onChange:I},null,544),[[lc,i.public]]),v[3]||(v[3]=A("label",{for:"publicServer"},"Publicly accessible without any user account.",-1))]),v[6]||(v[6]=A("h3",null,"Users",-1)),A("button",{onClick:u,class:"button",title:"Add new user"},"➕ Add User"),r.value?($(),G("div",{key:0,class:"success-message",onClick:v[2]||(v[2]=_=>y(!1))},[Ws(Pe(r.value)+" ",1),r.value.includes("Password:")||r.value.includes("New password:")?($(),G("button",{key:0,onClick:v[1]||(v[1]=Ne(_=>y(!0),["stop"])),class:"button small",title:"Copy to clipboard"},Pe(l.value),1)):he("",!0)])):he("",!0),A("table",hg,[v[4]||(v[4]=A("thead",null,[A("tr",null,[A("th",null,"Username"),A("th",null,"Admin"),A("th",null,"Actions")])],-1)),A("tbody",null,[($(!0),G(we,null,Mn(s.value,_=>($(),G("tr",{key:_.username},[A("td",null,Pe(_.username),1),A("td",null,[A("input",{type:"checkbox",checked:_.privileged,onChange:S=>f(_,S),disabled:_.username===M(t).user.username},null,40,gg)]),A("td",null,[A("button",{onClick:S=>d(_),class:"button small",title:"Rename user"},"✏️",8,mg),A("button",{onClick:S=>h(_),class:"button small",title:"Reset password"},"🔑",8,vg),A("button",{onClick:S=>x(_.username),class:"button small danger",disabled:_.username===M(t).user.username,title:"Delete user"},"🗑️",8,_g)])]))),128))])]),A("h3",yg,Pe(o.value||" "),1),A("div",{class:"dialog-buttons"},[A("button",{onClick:c,class:"button"},"Close")])]))]),_:1})}}});const wg=lt(bg,[["__scopeId","data-v-785778fe"]]),Cg=_e({__name:"App",setup(e){const t=Ie(),n=ve(()=>{const l=decodeURIComponent(fn.currentRoute.value.path).split("//"),i=l[0].split("/").filter(a=>a!==""),c=l.slice(1).join("//");return{path:l[0],pathList:i,query:c}});Ot(()=>{document.title=n.value.path.replace(/\/$/,"").split("/").pop()||t.server.name||"Cista Storage"}),Qe(Zd),Qe(ar),kn(Xd);const s=ne(null);let o=null;const r=l=>{if(t.dialog){o&&(clearTimeout(o),o=null);return}const i=t.fileExplorer;if(!i)return;const c=i.isCursor(),a=l.target.tagName==="INPUT",u=l.type==="keyup";if(l.repeat){(l.key==="ArrowUp"||l.key==="ArrowDown"||l.key==="ArrowLeft"||l.key==="ArrowRight"||c&&l.code==="Space")&&(a||l.preventDefault());return}let f="";if(!a&&l.key.startsWith("Arrow"))f=l.key.slice(5).toLowerCase();else if(!u&&l.key==="f"&&(l.ctrlKey||l.metaKey))s.value.toggleSearchInput();else if(!a&&u&&l.key==="/")s.value.toggleSearchInput();else if(u&&l.key==="Escape")t.error="",s.value.closeSearch(l),t.focusBreadcrumb();else if(!a&&u&&l.key==="Backspace")fn.back();else if(!a&&!u&&l.key==="a"&&(l.ctrlKey||l.metaKey))i.toggleSelectAll();else if(!a&&u&&l.key==="g")t.prefs.gallery=!t.prefs.gallery;else if(!a&&u&&(l.code==="Backquote"||l.key==="1"||l.key==="2"||l.key==="3"))t.sort(["","name","modified","size"][+l.key||0]);else if(!a&&c&&u&&!l.ctrlKey&&(l.key==="F2"||l.key==="r"))i.cursorRename();else if(!a&&c&&l.code==="Space")u&&!l.altKey&&!l.ctrlKey&&i.cursorSelect();else return;l.preventDefault(),o&&(clearTimeout(o),o=null);let d;switch(f){case"up":d=()=>i.up(l);break;case"down":d=()=>i.down(l);break;case"left":d=()=>i.left(l);break;case"right":d=()=>i.right(l);break}if(d&&!u){const x=l.altKey?20:100;d(),o=setTimeout(()=>{o=setInterval(d,x)},200-x)}};return Qe(()=>{window.addEventListener("keydown",r),window.addEventListener("keyup",r)}),kn(()=>{window.removeEventListener("keydown",r),window.removeEventListener("keyup",r)}),(l,i)=>{const c=ug,a=lg,u=Qh,f=Yh,d=ur,h=Af;return $(),G(we,null,[re(c),re(a),re(wg),A("header",null,[re(f,{ref_key:"headerMain",ref:s,path:n.value.pathList,query:n.value.query},{default:ft(()=>[re(u,{path:n.value.pathList},null,8,["path"])]),_:1},8,["path","query"]),re(d,{path:n.value.pathList,primary:""},null,8,["path"])]),A("main",null,[re(M(Mc),{path:n.value.pathList,query:n.value.query},null,8,["path","query"])]),A("footer",null,[re(h,{status:M(t).uprogress,onCancel:M(t).cancelUploads,class:"upload"},null,8,["status","onCancel"]),re(h,{status:M(t).dprogress,onCancel:M(t).cancelDownloads,class:"download"},null,8,["status","onCancel"])])],64)}}});function kg(e){return typeof e=="object"&&e!==null}function Nl(e,t){return e=kg(e)?e:Object.create(null),new Proxy(e,{get(n,s,o){return s==="key"?Reflect.get(n,s,o):Reflect.get(n,s,o)||Reflect.get(t,s,o)}})}function xg(e,t){return t.reduce((n,s)=>n==null?void 0:n[s],e)}function Sg(e,t,n){return t.slice(0,-1).reduce((s,o)=>/^(__proto__)$/.test(o)?{}:s[o]=s[o]||{},e)[t[t.length-1]]=n,e}function Eg(e,t){return t.reduce((n,s)=>{const o=s.split(".");return Sg(n,o,xg(e,o))},{})}function Rg(e,t){return n=>{var s;try{const{storage:o=localStorage,beforeRestore:r=void 0,afterRestore:l=void 0,serializer:i={serialize:JSON.stringify,deserialize:JSON.parse},key:c=t.$id,paths:a=null,debug:u=!1}=n;return{storage:o,beforeRestore:r,afterRestore:l,serializer:i,key:((s=e.key)!=null?s:f=>f)(typeof c=="string"?c:c(t.$id)),paths:a,debug:u}}catch(o){return n.debug&&console.error("[pinia-plugin-persistedstate]",o),null}}}function Hl(e,{storage:t,serializer:n,key:s,debug:o}){try{const r=t==null?void 0:t.getItem(s);r&&e.$patch(n==null?void 0:n.deserialize(r))}catch(r){o&&console.error("[pinia-plugin-persistedstate]",r)}}function Bl(e,{storage:t,serializer:n,key:s,paths:o,debug:r}){try{const l=Array.isArray(o)?Eg(e,o):e;t.setItem(s,n.serialize(l))}catch(l){r&&console.error("[pinia-plugin-persistedstate]",l)}}function Mg(e={}){return t=>{const{auto:n=!1}=e,{options:{persist:s=n},store:o,pinia:r}=t;if(!s)return;if(!(o.$id in r.state.value)){const i=r._s.get(o.$id.replace("__hot:",""));i&&Promise.resolve().then(()=>i.$persist());return}const l=(Array.isArray(s)?s.map(i=>Nl(i,e)):[Nl(s,e)]).map(Rg(e,o)).filter(Boolean);o.$persist=()=>{l.forEach(i=>{Bl(o.$state,i)})},o.$hydrate=({runHooks:i=!0}={})=>{l.forEach(c=>{const{beforeRestore:a,afterRestore:u}=c;i&&(a==null||a(t)),Hl(o,c),i&&(u==null||u(t))})},l.forEach(i=>{const{beforeRestore:c,afterRestore:a}=i;c==null||c(t),Hl(o,i),a==null||a(t),o.$subscribe((u,f)=>{Bl(f,i)},{detached:!0})})}}var Pg=Mg();const ds=df(Cg);ds.config.errorHandler=e=>{console.log(e)};const Nc=mf();Nc.use(Pg);ds.use(Nc);ds.use(fn);ds.use(Zs);ds.mount("#app");export{A as a,G as c,$ as o};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o,c as t,a as c}from"./index-
|
|
1
|
+
import{o,c as t,a as c}from"./index-5b083aad.js";const n={xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 34 34"};function r(l,e){return o(),t("svg",n,e[0]||(e[0]=[c("path",{d:"M16 .6C7.5.6.6 7.6.6 16c0 8.5 7 15.4 15.4 15.4 8.5 0 15.4-7 15.4-15.4C31.4 7.5 24.4.6 16 .6m1.4 5.6c1.5 0 2 1 2 1.8 0 1.3-1 2.4-2.7 2.4-1.4 0-2-.7-2-2 0-.8.8-2.2 2.7-2.2m-3.8 19c-1 0-1.8-.6-1-3.4l1-4.8c.3-.8.4-1 0-1-.2 0-1.5.5-2.3 1l-.5-1c2.5-2 5.3-3 6.6-3q1.5 0 .6 3l-1.3 5c-.2 1 0 1.2 0 1.2.4 0 1.4-.3 2.4-1l1 .7c-2.4 2-5 3-6 3z"},null,-1)]))}const a={render:r};export{a as default,r as render};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as t,c,a as s}from"./index-
|
|
1
|
+
import{o as t,c,a as s}from"./index-5b083aad.js";const o={xmlns:"http://www.w3.org/2000/svg",width:"512",height:"512"};function n(r,e){return t(),c("svg",o,e[0]||(e[0]=[s("path",{d:"M384 128h-69c24 16 46.5 44.5 53.5 64h15c32.5 0 64 32 64 64s-32.5 64-64 64h-96c-31.5 0-64-32-64-64 0-11.5 3.5-22.5 9-32H164c-2.5 10.5-4 21-4 32 0 64 63.5 128 127.5 128H384c64 0 128-64 128-128s-64-128-128-128M143.5 320h-15c-32.5 0-64-32-64-64s32.5-64 64-64h96c31.5 0 64 32 64 64 0 11.5-3.5 22.5-9 32H348c2.5-10.5 4-21 4-32 0-64-63.5-128-127.5-128H128C64 128 0 192 0 256s64 128 128 128h69c-24-16-46.5-44.5-53.5-64"},null,-1)]))}const a={render:n};export{a as default,n as render};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as l,c as o,a as e}from"./index-
|
|
1
|
+
import{o as l,c as o,a as e}from"./index-5b083aad.js";const r={xmlns:"http://www.w3.org/2000/svg",width:"512",height:"512"};function h(n,t){return l(),o("svg",r,t[0]||(t[0]=[e("rect",{width:"512",height:"512",fill:"#26b",rx:"64",ry:"64"},null,-1),e("path",{fill:"#fff",d:"M381 298h-84V167h-66L339 35l108 132h-66zm-168-84h-84v131H63l108 132 108-132h-66z"},null,-1)]))}const a={render:h};export{a as default,h as render};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o,c as t,a as r}from"./index-
|
|
1
|
+
import{o,c as t,a as r}from"./index-5b083aad.js";const s={xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 36 36"};function c(n,e){return o(),t("svg",s,e[0]||(e[0]=[r("path",{d:"m23.53 8.44 3.13-3.13v9.4h-9.38l4.3-4.3C20.18 8.94 18.18 8 16 8c-4.45 0-8 3.56-8 8s3.55 8 8 8c3.5 0 6.5-2.2 7.55-5.3h2.75c-1.2 4.6-5.3 8-10.3 8-5.9 0-10.64-4.83-10.64-10.7S10.1 5.3 15.96 5.3c2.95 0 5.63 1.2 7.57 3.14"},null,-1)]))}const l={render:c};export{l as default,c as render};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as t,c as o,a as s}from"./index-
|
|
1
|
+
import{o as t,c as o,a as s}from"./index-5b083aad.js";const n={xmlns:"http://www.w3.org/2000/svg",viewBox:"4 0 24 32"};function r(c,e){return t(),o("svg",n,e[0]||(e[0]=[s("path",{d:"M16 21.3c1.4 0 2.7 1.3 2.7 2.7s-1.3 2.7-2.7 2.7-2.7-1.3-2.7-2.7 1.3-2.7 2.7-2.7m0-8c1.4 0 2.7 1.3 2.7 2.7s-1.3 2.7-2.7 2.7-2.7-1.3-2.7-2.7 1.3-2.7 2.7-2.7m0-2.6c-1.4 0-2.7-1.3-2.7-2.7s1.3-2.7 2.7-2.7 2.7 1.3 2.7 2.7-1.3 2.7-2.7 2.7"},null,-1)]))}const l={render:r};export{l as default,r as render};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as t,c as o,a as n}from"./index-
|
|
1
|
+
import{o as t,c as o,a as n}from"./index-5b083aad.js";const r={xmlns:"http://www.w3.org/2000/svg",viewBox:"2 0 32 32"};function s(a,e){return t(),o("svg",r,e[0]||(e[0]=[n("path",{d:"M24 4v24h-4V17L10 27V5l10 10V4z"},null,-1)]))}const c={render:s};export{c as default,s as render};
|