var e=Object.defineProperty,t=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),n=(t,n)=>{let r={};for(var i in t)e(r,i,{get:t[i],enumerable:!0});return n||e(r,Symbol.toStringTag,{value:`Module`}),r};(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();function r(e){let t=Object.create(null);for(let n of e.split(`,`))t[n]=1;return e=>e in t}var i={},a=[],o=()=>{},s=()=>!1,c=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),l=e=>e.startsWith(`onUpdate:`),u=Object.assign,d=(e,t)=>{let n=e.indexOf(t);n>-1&&e.splice(n,1)},f=Object.prototype.hasOwnProperty,p=(e,t)=>f.call(e,t),m=Array.isArray,h=e=>w(e)===`[object Map]`,g=e=>w(e)===`[object Set]`,_=e=>w(e)===`[object Date]`,v=e=>typeof e==`function`,y=e=>typeof e==`string`,b=e=>typeof e==`symbol`,x=e=>typeof e==`object`&&!!e,S=e=>(x(e)||v(e))&&v(e.then)&&v(e.catch),C=Object.prototype.toString,w=e=>C.call(e),ee=e=>w(e).slice(8,-1),te=e=>w(e)===`[object Object]`,T=e=>y(e)&&e!==`NaN`&&e[0]!==`-`&&``+parseInt(e,10)===e,E=r(`,key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted`),D=e=>{let t=Object.create(null);return(n=>t[n]||(t[n]=e(n)))},ne=/-\w/g,O=D(e=>e.replace(ne,e=>e.slice(1).toUpperCase())),re=/\B([A-Z])/g,ie=D(e=>e.replace(re,`-$1`).toLowerCase()),ae=D(e=>e.charAt(0).toUpperCase()+e.slice(1)),oe=D(e=>e?`on${ae(e)}`:``),se=(e,t)=>!Object.is(e,t),ce=(e,...t)=>{for(let n=0;n{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:r,value:n})},ue=e=>{let t=parseFloat(e);return isNaN(t)?e:t},de,fe=()=>de||=typeof globalThis<`u`?globalThis:typeof self<`u`?self:typeof window<`u`?window:typeof global<`u`?global:{};function pe(e){if(m(e)){let t={};for(let n=0;n{if(e){let n=e.split(he);n.length>1&&(t[n[0].trim()]=n[1].trim())}}),t}function k(e){let t=``;if(y(e))t=e;else if(m(e))for(let n=0;nSe(e,t))}var we=e=>!!(e&&e.__v_isRef===!0),A=e=>y(e)?e:e==null?``:m(e)||x(e)&&(e.toString===C||!v(e.toString))?we(e)?A(e.value):JSON.stringify(e,Te,2):String(e),Te=(e,t)=>we(t)?Te(e,t.value):h(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((e,[t,n],r)=>(e[Ee(t,r)+` =>`]=n,e),{})}:g(t)?{[`Set(${t.size})`]:[...t.values()].map(e=>Ee(e))}:b(t)?Ee(t):x(t)&&!m(t)&&!te(t)?String(t):t,Ee=(e,t=``)=>b(e)?`Symbol(${e.description??t})`:e,j,De=class{constructor(e=!1){this.detached=e,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this._warnOnRun=!0,this.__v_skip=!0,!e&&j&&(j.active?(this.parent=j,this.index=(j.scopes||=[]).push(this)-1):(this._active=!1,this._warnOnRun=!1))}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let e,t;if(this.scopes)for(e=0,t=this.scopes.length;e0&&--this._on===0){if(j===this)j=this.prevScope;else{let e=j;for(;e;){if(e.prevScope===this){e.prevScope=this.prevScope;break}e=e.prevScope}}this.prevScope=void 0}}stop(e){if(this._active){this._active=!1;let t,n;for(t=0,n=this.effects.length;t0)return;if(Fe){let e=Fe;for(Fe=void 0;e;){let t=e.next;e.next=void 0,e.flags&=-9,e=t}}let e;for(;Pe;){let t=Pe;for(Pe=void 0;t;){let n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(t){e||=t}t=n}}if(e)throw e}function ze(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function Be(e){let t,n=e.depsTail,r=n;for(;r;){let e=r.prevDep;r.version===-1?(r===n&&(n=e),Ue(r),We(r)):t=r,r.dep.activeLink=r.prevActiveLink,r.prevActiveLink=void 0,r=e}e.deps=t,e.depsTail=n}function Ve(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(He(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function He(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===Xe)||(e.globalVersion=Xe,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!Ve(e))))return;e.flags|=2;let t=e.dep,n=M,r=Ge;M=e,Ge=!0;try{ze(e);let n=e.fn(e._value);(t.version===0||se(n,e._value))&&(e.flags|=128,e._value=n,t.version++)}catch(e){throw t.version++,e}finally{M=n,Ge=r,Be(e),e.flags&=-3}}function Ue(e,t=!1){let{dep:n,prevSub:r,nextSub:i}=e;if(r&&(r.nextSub=i,e.prevSub=void 0),i&&(i.prevSub=r,e.nextSub=void 0),n.subs===e&&(n.subs=r,!r&&n.computed)){n.computed.flags&=-5;for(let e=n.computed.deps;e;e=e.nextDep)Ue(e,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function We(e){let{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}var Ge=!0,Ke=[];function qe(){Ke.push(Ge),Ge=!1}function Je(){let e=Ke.pop();Ge=e===void 0?!0:e}function Ye(e){let{cleanup:t}=e;if(e.cleanup=void 0,t){let e=M;M=void 0;try{t()}finally{M=e}}}var Xe=0,Ze=class{constructor(e,t){this.sub=e,this.dep=t,this.version=t.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}},Qe=class{constructor(e){this.computed=e,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(e){if(!M||!Ge||M===this.computed)return;let t=this.activeLink;if(t===void 0||t.sub!==M)t=this.activeLink=new Ze(M,this),M.deps?(t.prevDep=M.depsTail,M.depsTail.nextDep=t,M.depsTail=t):M.deps=M.depsTail=t,$e(t);else if(t.version===-1&&(t.version=this.version,t.nextDep)){let e=t.nextDep;e.prevDep=t.prevDep,t.prevDep&&(t.prevDep.nextDep=e),t.prevDep=M.depsTail,t.nextDep=void 0,M.depsTail.nextDep=t,M.depsTail=t,M.deps===t&&(M.deps=e)}return t}trigger(e){this.version++,Xe++,this.notify(e)}notify(e){Le();try{for(let e=this.subs;e;e=e.prevSub)e.sub.notify()&&e.sub.dep.notify()}finally{Re()}}};function $e(e){if(e.dep.sc++,e.sub.flags&4){let t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let e=t.deps;e;e=e.nextDep)$e(e)}let n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}var et=new WeakMap,tt=Symbol(``),nt=Symbol(``),rt=Symbol(``);function it(e,t,n){if(Ge&&M){let t=et.get(e);t||et.set(e,t=new Map);let r=t.get(n);r||(t.set(n,r=new Qe),r.map=t,r.key=n),r.track()}}function at(e,t,n,r,i,a){let o=et.get(e);if(!o){Xe++;return}let s=e=>{e&&e.trigger()};if(Le(),t===`clear`)o.forEach(s);else{let i=m(e),a=i&&T(n);if(i&&n===`length`){let e=Number(r);o.forEach((t,n)=>{(n===`length`||n===rt||!b(n)&&n>=e)&&s(t)})}else switch((n!==void 0||o.has(void 0))&&s(o.get(n)),a&&s(o.get(rt)),t){case`add`:i?a&&s(o.get(`length`)):(s(o.get(tt)),h(e)&&s(o.get(nt)));break;case`delete`:i||(s(o.get(tt)),h(e)&&s(o.get(nt)));break;case`set`:h(e)&&s(o.get(tt));break}}Re()}function ot(e,t){let n=et.get(e);return n&&n.get(t)}function st(e){let t=N(e);return t===e?t:(it(t,`iterate`,rt),qt(e)?t:t.map(Xt))}function ct(e){return it(e=N(e),`iterate`,rt),e}function lt(e,t){return Kt(e)?Zt(Gt(e)?Xt(t):t):Xt(t)}var ut={__proto__:null,[Symbol.iterator](){return dt(this,Symbol.iterator,e=>lt(this,e))},concat(...e){return st(this).concat(...e.map(e=>m(e)?st(e):e))},entries(){return dt(this,`entries`,e=>(e[1]=lt(this,e[1]),e))},every(e,t){return pt(this,`every`,e,t,void 0,arguments)},filter(e,t){return pt(this,`filter`,e,t,e=>e.map(e=>lt(this,e)),arguments)},find(e,t){return pt(this,`find`,e,t,e=>lt(this,e),arguments)},findIndex(e,t){return pt(this,`findIndex`,e,t,void 0,arguments)},findLast(e,t){return pt(this,`findLast`,e,t,e=>lt(this,e),arguments)},findLastIndex(e,t){return pt(this,`findLastIndex`,e,t,void 0,arguments)},forEach(e,t){return pt(this,`forEach`,e,t,void 0,arguments)},includes(...e){return ht(this,`includes`,e)},indexOf(...e){return ht(this,`indexOf`,e)},join(e){return st(this).join(e)},lastIndexOf(...e){return ht(this,`lastIndexOf`,e)},map(e,t){return pt(this,`map`,e,t,void 0,arguments)},pop(){return gt(this,`pop`)},push(...e){return gt(this,`push`,e)},reduce(e,...t){return mt(this,`reduce`,e,t)},reduceRight(e,...t){return mt(this,`reduceRight`,e,t)},shift(){return gt(this,`shift`)},some(e,t){return pt(this,`some`,e,t,void 0,arguments)},splice(...e){return gt(this,`splice`,e)},toReversed(){return st(this).toReversed()},toSorted(e){return st(this).toSorted(e)},toSpliced(...e){return st(this).toSpliced(...e)},unshift(...e){return gt(this,`unshift`,e)},values(){return dt(this,`values`,e=>lt(this,e))}};function dt(e,t,n){let r=ct(e),i=r[t]();return r!==e&&!qt(e)&&(i._next=i.next,i.next=()=>{let e=i._next();return e.done||(e.value=n(e.value)),e}),i}var ft=Array.prototype;function pt(e,t,n,r,i,a){let o=ct(e),s=o!==e&&!qt(e),c=o[t];if(c!==ft[t]){let t=c.apply(e,a);return s?Xt(t):t}let l=n;o!==e&&(s?l=function(t,r){return n.call(this,lt(e,t),r,e)}:n.length>2&&(l=function(t,r){return n.call(this,t,r,e)}));let u=c.call(o,l,r);return s&&i?i(u):u}function mt(e,t,n,r){let i=ct(e),a=i!==e&&!qt(e),o=n,s=!1;i!==e&&(a?(s=r.length===0,o=function(t,r,i){return s&&(s=!1,t=lt(e,t)),n.call(this,t,lt(e,r),i,e)}):n.length>3&&(o=function(t,r,i){return n.call(this,t,r,i,e)}));let c=i[t](o,...r);return s?lt(e,c):c}function ht(e,t,n){let r=N(e);it(r,`iterate`,rt);let i=r[t](...n);return(i===-1||i===!1)&&Jt(n[0])?(n[0]=N(n[0]),r[t](...n)):i}function gt(e,t,n=[]){qe(),Le();let r=N(e)[t].apply(e,n);return Re(),Je(),r}var _t=r(`__proto__,__v_isRef,__isVue`),vt=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!==`arguments`&&e!==`caller`).map(e=>Symbol[e]).filter(b));function yt(e){b(e)||(e=String(e));let t=N(this);return it(t,`has`,e),t.hasOwnProperty(e)}var bt=class{constructor(e=!1,t=!1){this._isReadonly=e,this._isShallow=t}get(e,t,n){if(t===`__v_skip`)return e.__v_skip;let r=this._isReadonly,i=this._isShallow;if(t===`__v_isReactive`)return!r;if(t===`__v_isReadonly`)return r;if(t===`__v_isShallow`)return i;if(t===`__v_raw`)return n===(r?i?Rt:Lt:i?It:Ft).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(n)?e:void 0;let a=m(e);if(!r){let e;if(a&&(e=ut[t]))return e;if(t===`hasOwnProperty`)return yt}let o=Reflect.get(e,t,P(e)?e:n);if((b(t)?vt.has(t):_t(t))||(r||it(e,`get`,t),i))return o;if(P(o)){let e=a&&T(t)?o:o.value;return r&&x(e)?Ut(e):e}return x(o)?r?Ut(o):Vt(o):o}},xt=class extends bt{constructor(e=!1){super(!1,e)}set(e,t,n,r){let i=e[t],a=m(e)&&T(t);if(!this._isShallow){let e=Kt(i);if(!qt(n)&&!Kt(n)&&(i=N(i),n=N(n)),!a&&P(i)&&!P(n))return e||(i.value=n),!0}let o=a?Number(t)e,Dt=e=>Reflect.getPrototypeOf(e);function Ot(e,t,n){return function(...r){let i=this.__v_raw,a=N(i),o=h(a),s=e===`entries`||e===Symbol.iterator&&o,c=e===`keys`&&o,l=i[e](...r),d=n?Et:t?Zt:Xt;return!t&&it(a,`iterate`,c?nt:tt),u(Object.create(l),{next(){let{value:e,done:t}=l.next();return t?{value:e,done:t}:{value:s?[d(e[0]),d(e[1])]:d(e),done:t}}})}}function kt(e){return function(...t){return e===`delete`?!1:e===`clear`?void 0:this}}function At(e,t){let n={get(n){let r=this.__v_raw,i=N(r),a=N(n);e||(se(n,a)&&it(i,`get`,n),it(i,`get`,a));let{has:o}=Dt(i),s=t?Et:e?Zt:Xt;if(o.call(i,n))return s(r.get(n));if(o.call(i,a))return s(r.get(a));r!==i&&r.get(n)},get size(){let t=this.__v_raw;return!e&&it(N(t),`iterate`,tt),t.size},has(t){let n=this.__v_raw,r=N(n),i=N(t);return e||(se(t,i)&&it(r,`has`,t),it(r,`has`,i)),t===i?n.has(t):n.has(t)||n.has(i)},forEach(n,r){let i=this,a=i.__v_raw,o=N(a),s=t?Et:e?Zt:Xt;return!e&&it(o,`iterate`,tt),a.forEach((e,t)=>n.call(r,s(e),s(t),i))}};return u(n,e?{add:kt(`add`),set:kt(`set`),delete:kt(`delete`),clear:kt(`clear`)}:{add(e){let n=N(this),r=Dt(n),i=N(e),a=!t&&!qt(e)&&!Kt(e)?i:e;return r.has.call(n,a)||se(e,a)&&r.has.call(n,e)||se(i,a)&&r.has.call(n,i)||(n.add(a),at(n,`add`,a,a)),this},set(e,n){!t&&!qt(n)&&!Kt(n)&&(n=N(n));let r=N(this),{has:i,get:a}=Dt(r),o=i.call(r,e);o||=(e=N(e),i.call(r,e));let s=a.call(r,e);return r.set(e,n),o?se(n,s)&&at(r,`set`,e,n,s):at(r,`add`,e,n),this},delete(e){let t=N(this),{has:n,get:r}=Dt(t),i=n.call(t,e);i||=(e=N(e),n.call(t,e));let a=r?r.call(t,e):void 0,o=t.delete(e);return i&&at(t,`delete`,e,void 0,a),o},clear(){let e=N(this),t=e.size!==0,n=e.clear();return t&&at(e,`clear`,void 0,void 0,void 0),n}}),[`keys`,`values`,`entries`,Symbol.iterator].forEach(r=>{n[r]=Ot(r,e,t)}),n}function jt(e,t){let n=At(e,t);return(t,r,i)=>r===`__v_isReactive`?!e:r===`__v_isReadonly`?e:r===`__v_raw`?t:Reflect.get(p(n,r)&&r in t?n:t,r,i)}var Mt={get:jt(!1,!1)},Nt={get:jt(!1,!0)},Pt={get:jt(!0,!1)},Ft=new WeakMap,It=new WeakMap,Lt=new WeakMap,Rt=new WeakMap;function zt(e){switch(e){case`Object`:case`Array`:return 1;case`Map`:case`Set`:case`WeakMap`:case`WeakSet`:return 2;default:return 0}}function Bt(e){return e.__v_skip||!Object.isExtensible(e)?0:zt(ee(e))}function Vt(e){return Kt(e)?e:Wt(e,!1,Ct,Mt,Ft)}function Ht(e){return Wt(e,!1,Tt,Nt,It)}function Ut(e){return Wt(e,!0,wt,Pt,Lt)}function Wt(e,t,n,r,i){if(!x(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;let a=Bt(e);if(a===0)return e;let o=i.get(e);if(o)return o;let s=new Proxy(e,a===2?r:n);return i.set(e,s),s}function Gt(e){return Kt(e)?Gt(e.__v_raw):!!(e&&e.__v_isReactive)}function Kt(e){return!!(e&&e.__v_isReadonly)}function qt(e){return!!(e&&e.__v_isShallow)}function Jt(e){return e?!!e.__v_raw:!1}function N(e){let t=e&&e.__v_raw;return t?N(t):e}function Yt(e){return!p(e,`__v_skip`)&&Object.isExtensible(e)&&le(e,`__v_skip`,!0),e}var Xt=e=>x(e)?Vt(e):e,Zt=e=>x(e)?Ut(e):e;function P(e){return e?e.__v_isRef===!0:!1}function F(e){return $t(e,!1)}function Qt(e){return $t(e,!0)}function $t(e,t){return P(e)?e:new en(e,t)}var en=class{constructor(e,t){this.dep=new Qe,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=t?e:N(e),this._value=t?e:Xt(e),this.__v_isShallow=t}get value(){return this.dep.track(),this._value}set value(e){let t=this._rawValue,n=this.__v_isShallow||qt(e)||Kt(e);e=n?e:N(e),se(e,t)&&(this._rawValue=e,this._value=n?e:Xt(e),this.dep.trigger())}};function I(e){return P(e)?e.value:e}var tn={get:(e,t,n)=>t===`__v_raw`?e:I(Reflect.get(e,t,n)),set:(e,t,n,r)=>{let i=e[t];return P(i)&&!P(n)?(i.value=n,!0):Reflect.set(e,t,n,r)}};function nn(e){return Gt(e)?e:new Proxy(e,tn)}function rn(e){let t=m(e)?Array(e.length):{};for(let n in e)t[n]=on(e,n);return t}var an=class{constructor(e,t,n){this._object=e,this._defaultValue=n,this.__v_isRef=!0,this._value=void 0,this._key=b(t)?t:String(t),this._raw=N(e);let r=!0,i=e;if(!m(e)||b(this._key)||!T(this._key))do r=!Jt(i)||qt(i);while(r&&(i=i.__v_raw));this._shallow=r}get value(){let e=this._object[this._key];return this._shallow&&(e=I(e)),this._value=e===void 0?this._defaultValue:e}set value(e){if(this._shallow&&P(this._raw[this._key])){let t=this._object[this._key];if(P(t)){t.value=e;return}}this._object[this._key]=e}get dep(){return ot(this._raw,this._key)}};function on(e,t,n){return new an(e,t,n)}var sn=class{constructor(e,t,n){this.fn=e,this.setter=t,this._value=void 0,this.dep=new Qe(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Xe-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!t,this.isSSR=n}notify(){if(this.flags|=16,!(this.flags&8)&&M!==this)return Ie(this,!0),!0}get value(){let e=this.dep.track();return He(this),e&&(e.version=this.dep.version),this._value}set value(e){this.setter&&this.setter(e)}};function cn(e,t,n=!1){let r,i;return v(e)?r=e:(r=e.get,i=e.set),new sn(r,i,n)}var ln={},un=new WeakMap,dn=void 0;function fn(e,t=!1,n=dn){if(n){let t=un.get(n);t||un.set(n,t=[]),t.push(e)}}function pn(e,t,n=i){let{immediate:r,deep:a,once:s,scheduler:c,augmentJob:l,call:u}=n,f=e=>a?e:qt(e)||a===!1||a===0?mn(e,1):mn(e),p,h,g,_,y=!1,b=!1;if(P(e)?(h=()=>e.value,y=qt(e)):Gt(e)?(h=()=>f(e),y=!0):m(e)?(b=!0,y=e.some(e=>Gt(e)||qt(e)),h=()=>e.map(e=>{if(P(e))return e.value;if(Gt(e))return f(e);if(v(e))return u?u(e,2):e()})):h=v(e)?t?u?()=>u(e,2):e:()=>{if(g){qe();try{g()}finally{Je()}}let t=dn;dn=p;try{return u?u(e,3,[_]):e(_)}finally{dn=t}}:o,t&&a){let e=h,t=a===!0?1/0:a;h=()=>mn(e(),t)}let x=ke(),S=()=>{p.stop(),x&&x.active&&d(x.effects,p)};if(s&&t){let e=t;t=(...t)=>{e(...t),S()}}let C=b?Array(e.length).fill(ln):ln,w=e=>{if(!(!(p.flags&1)||!p.dirty&&!e))if(t){let e=p.run();if(a||y||(b?e.some((e,t)=>se(e,C[t])):se(e,C))){g&&g();let n=dn;dn=p;try{let n=[e,C===ln?void 0:b&&C[0]===ln?[]:C,_];C=e,u?u(t,3,n):t(...n)}finally{dn=n}}}else p.run()};return l&&l(w),p=new Me(h),p.scheduler=c?()=>c(w,!1):w,_=e=>fn(e,!1,p),g=p.onStop=()=>{let e=un.get(p);if(e){if(u)u(e,4);else for(let t of e)t();un.delete(p)}},t?r?w(!0):C=p.run():c?c(w.bind(null,!0),!0):p.run(),S.pause=p.pause.bind(p),S.resume=p.resume.bind(p),S.stop=S,S}function mn(e,t=1/0,n){if(t<=0||!x(e)||e.__v_skip||(n||=new Map,(n.get(e)||0)>=t))return e;if(n.set(e,t),t--,P(e))mn(e.value,t,n);else if(m(e))for(let r=0;r{mn(e,t,n)});else if(te(e)){for(let r in e)mn(e[r],t,n);for(let r of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,r)&&mn(e[r],t,n)}return e}function hn(e,t,n,r){try{return r?e(...r):e()}catch(e){_n(e,t,n)}}function gn(e,t,n,r){if(v(e)){let i=hn(e,t,n,r);return i&&S(i)&&i.catch(e=>{_n(e,t,n)}),i}if(m(e)){let i=[];for(let a=0;a>>1,i=yn[r],a=Nn(i);a=Nn(n)?yn.push(e):yn.splice(Dn(t),0,e),e.flags|=1,kn()}}function kn(){Tn||=wn.then(Pn)}function An(e){m(e)?xn.push(...e):Sn&&e.id===-1?Sn.splice(Cn+1,0,e):e.flags&1||(xn.push(e),e.flags|=1),kn()}function jn(e,t,n=bn+1){for(;nNn(e)-Nn(t));if(xn.length=0,Sn){Sn.push(...e);return}for(Sn=e,Cn=0;Cne.id==null?e.flags&2?-1:1/0:e.id;function Pn(e){try{for(bn=0;bn{r._d&&Yi(-1);let i=Ln(t),a;try{a=e(...n)}finally{Ln(i),r._d&&Yi(1)}return a};return r._n=!0,r._c=!0,r._d=!0,r}function zn(e,t){if(Fn===null)return e;let n=Aa(Fn),r=e.dirs||=[];for(let e=0;e1)return n&&v(t)?t.call(r&&r.proxy):t}}function Un(){return!!(ha()||Qr)}var Wn=Symbol.for(`v-scx`),Gn=()=>Hn(Wn);function Kn(e,t,n){return qn(e,t,n)}function qn(e,t,n=i){let{immediate:r,deep:a,flush:s,once:c}=n,l=u({},n),d=t&&r||!t&&s!==`post`,f;if(xa){if(s===`sync`){let e=Gn();f=e.__watcherHandles||=[]}else if(!d){let e=()=>{};return e.stop=o,e.resume=o,e.pause=o,e}}let p=ma;l.call=(e,t,n)=>gn(e,p,t,n);let m=!1;s===`post`?l.scheduler=e=>{ki(e,p&&p.suspense)}:s!==`sync`&&(m=!0,l.scheduler=(e,t)=>{t?e():On(e)}),l.augmentJob=e=>{t&&(e.flags|=4),m&&(e.flags|=2,p&&(e.id=p.uid,e.i=p))};let h=pn(e,t,l);return xa&&(f?f.push(h):d&&h()),h}function Jn(e,t,n){let r=this.proxy,i=y(e)?e.includes(`.`)?Yn(r,e):()=>r[e]:e.bind(r,r),a;v(t)?a=t:(a=t.handler,n=t);let o=va(this),s=qn(i,a.bind(r),n);return o(),s}function Yn(e,t){let n=t.split(`.`);return()=>{let t=e;for(let e=0;ee.__isTeleport,Qn=Symbol(`_leaveCb`);function $n(e,t){e.shapeFlag&6&&e.component?(e.transition=t,$n(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 er(e,t){return v(e)?u({name:e.name},t,{setup:e}):e}function tr(e){e.ids=[e.ids[0]+ e.ids[2]+++`-`,0,0]}function nr(e,t){let n;return!!((n=Object.getOwnPropertyDescriptor(e,t))&&!n.configurable)}var rr=new WeakMap;function ir(e,t,n,r,a=!1){if(m(e)){e.forEach((e,i)=>ir(e,t&&(m(t)?t[i]:t),n,r,a));return}if(or(r)&&!a){r.shapeFlag&512&&r.type.__asyncResolved&&r.component.subTree.component&&ir(e,t,n,r.component.subTree);return}let o=r.shapeFlag&4?Aa(r.component):r.el,c=a?null:o,{i:l,r:u}=e,f=t&&t.r,h=l.refs===i?l.refs={}:l.refs,g=l.setupState,_=N(g),b=g===i?s:e=>nr(h,e)?!1:p(_,e),x=(e,t)=>!(t&&nr(h,t));if(f!=null&&f!==u){if(ar(t),y(f))h[f]=null,b(f)&&(g[f]=null);else if(P(f)){let e=t;x(f,e.k)&&(f.value=null),e.k&&(h[e.k]=null)}}if(v(u))hn(u,l,12,[c,h]);else{let t=y(u),r=P(u);if(t||r){let i=()=>{if(e.f){let n=t?b(u)?g[u]:h[u]:x(u)||!e.k?u.value:h[e.k];if(a)m(n)&&d(n,o);else if(m(n))n.includes(o)||n.push(o);else if(t)h[u]=[o],b(u)&&(g[u]=h[u]);else{let t=[o];x(u,e.k)&&(u.value=t),e.k&&(h[e.k]=t)}}else t?(h[u]=c,b(u)&&(g[u]=c)):r&&(x(u,e.k)&&(u.value=c),e.k&&(h[e.k]=c))};if(c){let t=()=>{i(),rr.delete(e)};t.id=-1,rr.set(e,t),ki(t,n)}else ar(e),i()}}}function ar(e){let t=rr.get(e);t&&(t.flags|=8,rr.delete(e))}fe().requestIdleCallback,fe().cancelIdleCallback;var or=e=>!!e.type.__asyncLoader,sr=e=>e.type.__isKeepAlive;function cr(e,t){ur(e,`a`,t)}function lr(e,t){ur(e,`da`,t)}function ur(e,t,n=ma){let r=e.__wdc||=()=>{let t=n;for(;t;){if(t.isDeactivated)return;t=t.parent}return e()};if(fr(t,r,n),n){let e=n.parent;for(;e&&e.parent;)sr(e.parent.vnode)&&dr(r,t,n,e),e=e.parent}}function dr(e,t,n,r){let i=fr(t,e,r,!0);yr(()=>{d(r[t],i)},n)}function fr(e,t,n=ma,r=!1){if(n){let i=n[e]||(n[e]=[]),a=t.__weh||=(...r)=>{qe();let i=va(n),a=gn(t,n,e,r);return i(),Je(),a};return r?i.unshift(a):i.push(a),a}}var pr=e=>(t,n=ma)=>{(!xa||e===`sp`)&&fr(e,(...e)=>t(...e),n)},mr=pr(`bm`),hr=pr(`m`),gr=pr(`bu`),_r=pr(`u`),vr=pr(`bum`),yr=pr(`um`),br=pr(`sp`),xr=pr(`rtg`),Sr=pr(`rtc`);function Cr(e,t=ma){fr(`ec`,e,t)}var wr=`components`;function Tr(e,t){return Dr(wr,e,!0,t)||e}var Er=Symbol.for(`v-ndc`);function Dr(e,t,n=!0,r=!1){let i=Fn||ma;if(i){let n=i.type;if(e===wr){let e=ja(n,!1);if(e&&(e===t||e===O(t)||e===ae(O(t))))return n}let a=Or(i[e]||n[e],t)||Or(i.appContext[e],t);return!a&&r?n:a}}function Or(e,t){return e&&(e[t]||e[O(t)]||e[ae(O(t))])}function L(e,t,n,r){let i,a=n&&n[r],o=m(e);if(o||y(e)){let n=o&&Gt(e),r=!1,s=!1;n&&(r=!qt(e),s=Kt(e),e=ct(e)),i=Array(e.length);for(let n=0,o=e.length;nt(e,n,void 0,a&&a[n]));else{let n=Object.keys(e);i=Array(n.length);for(let r=0,o=n.length;re?ba(e)?Aa(e):kr(e.parent):null,Ar=u(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=>kr(e.parent),$root:e=>kr(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>zr(e),$forceUpdate:e=>e.f||=()=>{On(e.update)},$nextTick:e=>e.n||=En.bind(e.proxy),$watch:e=>Jn.bind(e)}),jr=(e,t)=>e!==i&&!e.__isScriptSetup&&p(e,t),Mr={get({_:e},t){if(t===`__v_skip`)return!0;let{ctx:n,setupState:r,data:a,props:o,accessCache:s,type:c,appContext:l}=e;if(t[0]!==`$`){let e=s[t];if(e!==void 0)switch(e){case 1:return r[t];case 2:return a[t];case 4:return n[t];case 3:return o[t]}else if(jr(r,t))return s[t]=1,r[t];else if(a!==i&&p(a,t))return s[t]=2,a[t];else if(p(o,t))return s[t]=3,o[t];else if(n!==i&&p(n,t))return s[t]=4,n[t];else Pr&&(s[t]=0)}let u=Ar[t],d,f;if(u)return t===`$attrs`&&it(e.attrs,`get`,``),u(e);if((d=c.__cssModules)&&(d=d[t]))return d;if(n!==i&&p(n,t))return s[t]=4,n[t];if(f=l.config.globalProperties,p(f,t))return f[t]},set({_:e},t,n){let{data:r,setupState:a,ctx:o}=e;return jr(a,t)?(a[t]=n,!0):r!==i&&p(r,t)?(r[t]=n,!0):p(e.props,t)||t[0]===`$`&&t.slice(1)in e?!1:(o[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:r,appContext:a,props:o,type:s}},c){let l;return!!(n[c]||e!==i&&c[0]!==`$`&&p(e,c)||jr(t,c)||p(o,c)||p(r,c)||p(Ar,c)||p(a.config.globalProperties,c)||(l=s.__cssModules)&&l[c])},defineProperty(e,t,n){return n.get==null?p(n,`value`)&&this.set(e,t,n.value,null):e._.accessCache[t]=0,Reflect.defineProperty(e,t,n)}};function Nr(e){return m(e)?e.reduce((e,t)=>(e[t]=null,e),{}):e}var Pr=!0;function Fr(e){let t=zr(e),n=e.proxy,r=e.ctx;Pr=!1,t.beforeCreate&&Lr(t.beforeCreate,e,`bc`);let{data:i,computed:a,methods:s,watch:c,provide:l,inject:u,created:d,beforeMount:f,mounted:p,beforeUpdate:h,updated:g,activated:_,deactivated:y,beforeDestroy:b,beforeUnmount:S,destroyed:C,unmounted:w,render:ee,renderTracked:te,renderTriggered:T,errorCaptured:E,serverPrefetch:D,expose:ne,inheritAttrs:O,components:re,directives:ie,filters:ae}=t;if(u&&Ir(u,r,null),s)for(let e in s){let t=s[e];v(t)&&(r[e]=t.bind(n))}if(i){let t=i.call(n,n);x(t)&&(e.data=Vt(t))}if(Pr=!0,a)for(let e in a){let t=a[e],i=G({get:v(t)?t.bind(n,n):v(t.get)?t.get.bind(n,n):o,set:!v(t)&&v(t.set)?t.set.bind(n):o});Object.defineProperty(r,e,{enumerable:!0,configurable:!0,get:()=>i.value,set:e=>i.value=e})}if(c)for(let e in c)Rr(c[e],r,n,e);if(l){let e=v(l)?l.call(n):l;Reflect.ownKeys(e).forEach(t=>{Vn(t,e[t])})}d&&Lr(d,e,`c`);function oe(e,t){m(t)?t.forEach(t=>e(t.bind(n))):t&&e(t.bind(n))}if(oe(mr,f),oe(hr,p),oe(gr,h),oe(_r,g),oe(cr,_),oe(lr,y),oe(Cr,E),oe(Sr,te),oe(xr,T),oe(vr,S),oe(yr,w),oe(br,D),m(ne))if(ne.length){let t=e.exposed||={};ne.forEach(e=>{Object.defineProperty(t,e,{get:()=>n[e],set:t=>n[e]=t,enumerable:!0})})}else e.exposed||={};ee&&e.render===o&&(e.render=ee),O!=null&&(e.inheritAttrs=O),re&&(e.components=re),ie&&(e.directives=ie),D&&tr(e)}function Ir(e,t,n=o){m(e)&&(e=Wr(e));for(let n in e){let r=e[n],i;i=x(r)?`default`in r?Hn(r.from||n,r.default,!0):Hn(r.from||n):Hn(r),P(i)?Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:()=>i.value,set:e=>i.value=e}):t[n]=i}}function Lr(e,t,n){gn(m(e)?e.map(e=>e.bind(t.proxy)):e.bind(t.proxy),t,n)}function Rr(e,t,n,r){let i=r.includes(`.`)?Yn(n,r):()=>n[r];if(y(e)){let n=t[e];v(n)&&Kn(i,n)}else if(v(e))Kn(i,e.bind(n));else if(x(e))if(m(e))e.forEach(e=>Rr(e,t,n,r));else{let r=v(e.handler)?e.handler.bind(n):t[e.handler];v(r)&&Kn(i,r,e)}}function zr(e){let t=e.type,{mixins:n,extends:r}=t,{mixins:i,optionsCache:a,config:{optionMergeStrategies:o}}=e.appContext,s=a.get(t),c;return s?c=s:!i.length&&!n&&!r?c=t:(c={},i.length&&i.forEach(e=>Br(c,e,o,!0)),Br(c,t,o)),x(t)&&a.set(t,c),c}function Br(e,t,n,r=!1){let{mixins:i,extends:a}=t;a&&Br(e,a,n,!0),i&&i.forEach(t=>Br(e,t,n,!0));for(let i in t)if(!(r&&i===`expose`)){let r=Vr[i]||n&&n[i];e[i]=r?r(e[i],t[i]):t[i]}return e}var Vr={data:Hr,props:qr,emits:qr,methods:Kr,computed:Kr,beforeCreate:Gr,created:Gr,beforeMount:Gr,mounted:Gr,beforeUpdate:Gr,updated:Gr,beforeDestroy:Gr,beforeUnmount:Gr,destroyed:Gr,unmounted:Gr,activated:Gr,deactivated:Gr,errorCaptured:Gr,serverPrefetch:Gr,components:Kr,directives:Kr,watch:Jr,provide:Hr,inject:Ur};function Hr(e,t){return t?e?function(){return u(v(e)?e.call(this,this):e,v(t)?t.call(this,this):t)}:t:e}function Ur(e,t){return Kr(Wr(e),Wr(t))}function Wr(e){if(m(e)){let t={};for(let n=0;nt===`modelValue`||t===`model-value`?e.modelModifiers:e[`${t}Modifiers`]||e[`${O(t)}Modifiers`]||e[`${ie(t)}Modifiers`];function ei(e,t,...n){if(e.isUnmounted)return;let r=e.vnode.props||i,a=n,o=t.startsWith(`update:`),s=o&&$r(r,t.slice(7));s&&(s.trim&&(a=n.map(e=>y(e)?e.trim():e)),s.number&&(a=n.map(ue)));let c,l=r[c=oe(t)]||r[c=oe(O(t))];!l&&o&&(l=r[c=oe(ie(t))]),l&&gn(l,e,6,a);let u=r[c+`Once`];if(u){if(!e.emitted)e.emitted={};else if(e.emitted[c])return;e.emitted[c]=!0,gn(u,e,6,a)}}var ti=new WeakMap;function ni(e,t,n=!1){let r=n?ti:t.emitsCache,i=r.get(e);if(i!==void 0)return i;let a=e.emits,o={},s=!1;if(!v(e)){let r=e=>{let n=ni(e,t,!0);n&&(s=!0,u(o,n))};!n&&t.mixins.length&&t.mixins.forEach(r),e.extends&&r(e.extends),e.mixins&&e.mixins.forEach(r)}return!a&&!s?(x(e)&&r.set(e,null),null):(m(a)?a.forEach(e=>o[e]=null):u(o,a),x(e)&&r.set(e,o),o)}function ri(e,t){return!e||!c(t)?!1:(t=t.slice(2).replace(/Once$/,``),p(e,t[0].toLowerCase()+t.slice(1))||p(e,ie(t))||p(e,t))}function ii(e){let{type:t,vnode:n,proxy:r,withProxy:i,propsOptions:[a],slots:o,attrs:s,emit:c,render:u,renderCache:d,props:f,data:p,setupState:m,ctx:h,inheritAttrs:g}=e,_=Ln(e),v,y;try{if(n.shapeFlag&4){let e=i||r,t=e;v=oa(u.call(t,e,d,f,m,p,h)),y=s}else{let e=t;v=oa(e.length>1?e(f,{attrs:s,slots:o,emit:c}):e(f,null)),y=t.props?s:ai(s)}}catch(t){Gi.length=0,_n(t,e,1),v=H(Ui)}let b=v;if(y&&g!==!1){let e=Object.keys(y),{shapeFlag:t}=b;e.length&&t&7&&(a&&e.some(l)&&(y=oi(y,a)),b=ia(b,y,!1,!0))}return n.dirs&&(b=ia(b,null,!1,!0),b.dirs=b.dirs?b.dirs.concat(n.dirs):n.dirs),n.transition&&$n(b,n.transition),v=b,Ln(_),v}var ai=e=>{let t;for(let n in e)(n===`class`||n===`style`||c(n))&&((t||={})[n]=e[n]);return t},oi=(e,t)=>{let n={};for(let r in e)(!l(r)||!(r.slice(9)in t))&&(n[r]=e[r]);return n};function si(e,t,n){let{props:r,children:i,component:a}=e,{props:o,children:s,patchFlag:c}=t,l=a.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&c>=0){if(c&1024)return!0;if(c&16)return r?ci(r,o,l):!!o;if(c&8){let e=t.dynamicProps;for(let t=0;tObject.create(di),pi=e=>Object.getPrototypeOf(e)===di;function mi(e,t,n,r=!1){let i={},a=fi();e.propsDefaults=Object.create(null),gi(e,t,i,a);for(let t in e.propsOptions[0])t in i||(i[t]=void 0);n?e.props=r?i:Ht(i):e.type.props?e.props=i:e.props=a,e.attrs=a}function hi(e,t,n,r){let{props:i,attrs:a,vnode:{patchFlag:o}}=e,s=N(i),[c]=e.propsOptions,l=!1;if((r||o>0)&&!(o&16)){if(o&8){let n=e.vnode.dynamicProps;for(let r=0;r{d=!0;let[n,r]=yi(e,t,!0);u(c,n),r&&l.push(...r)};!n&&t.mixins.length&&t.mixins.forEach(r),e.extends&&r(e.extends),e.mixins&&e.mixins.forEach(r)}if(!s&&!d)return x(e)&&r.set(e,a),a;if(m(s))for(let e=0;ee===`_`||e===`_ctx`||e===`$stable`,Si=e=>m(e)?e.map(oa):[oa(e)],Ci=(e,t,n)=>{if(t._n)return t;let r=Rn((...e)=>Si(t(...e)),n);return r._c=!1,r},wi=(e,t,n)=>{let r=e._ctx;for(let n in e){if(xi(n))continue;let i=e[n];if(v(i))t[n]=Ci(n,i,r);else if(i!=null){let e=Si(i);t[n]=()=>e}}},Ti=(e,t)=>{let n=Si(t);e.slots.default=()=>n},Ei=(e,t,n)=>{for(let r in t)(n||!xi(r))&&(e[r]=t[r])},Di=(e,t,n)=>{let r=e.slots=fi();if(e.vnode.shapeFlag&32){let e=t._;e?(Ei(r,t,n),n&&le(r,`_`,e,!0)):wi(t,r)}else t&&Ti(e,t)},Oi=(e,t,n)=>{let{vnode:r,slots:a}=e,o=!0,s=i;if(r.shapeFlag&32){let e=t._;e?n&&e===1?o=!1:Ei(a,t,n):(o=!t.$stable,wi(t,a)),s=t}else t&&(Ti(e,t),s={default:1});if(o)for(let e in a)!xi(e)&&s[e]==null&&delete a[e]},ki=Vi;function Ai(e){return ji(e)}function ji(e,t){let n=fe();n.__VUE__=!0;let{insert:r,remove:s,patchProp:c,createElement:l,createText:u,createComment:d,setText:f,setElementText:p,parentNode:m,nextSibling:h,setScopeId:g=o,insertStaticContent:_}=e,v=(e,t,n,r=null,i=null,a=null,o=void 0,s=null,c=!!t.dynamicChildren)=>{if(e===t)return;e&&!$i(e,t)&&(r=ye(e),he(e,i,a,!0),e=null),t.patchFlag===-2&&(c=!1,t.dynamicChildren=null);let{type:l,ref:u,shapeFlag:d}=t;switch(l){case Hi:y(e,t,n,r);break;case Ui:b(e,t,n,r);break;case Wi:e??x(t,n,r,o);break;case R:re(e,t,n,r,i,a,o,s,c);break;default:d&1?w(e,t,n,r,i,a,o,s,c):d&6?ie(e,t,n,r,i,a,o,s,c):(d&64||d&128)&&l.process(e,t,n,r,i,a,o,s,c,Se)}u!=null&&i?ir(u,e&&e.ref,a,t||e,!t):u==null&&e&&e.ref!=null&&ir(e.ref,null,a,e,!0)},y=(e,t,n,i)=>{if(e==null)r(t.el=u(t.children),n,i);else{let n=t.el=e.el;t.children!==e.children&&f(n,t.children)}},b=(e,t,n,i)=>{e==null?r(t.el=d(t.children||``),n,i):t.el=e.el},x=(e,t,n,r)=>{[e.el,e.anchor]=_(e.children,t,n,r,e.el,e.anchor)},S=({el:e,anchor:t},n,i)=>{let a;for(;e&&e!==t;)a=h(e),r(e,n,i),e=a;r(t,n,i)},C=({el:e,anchor:t})=>{let n;for(;e&&e!==t;)n=h(e),s(e),e=n;s(t)},w=(e,t,n,r,i,a,o,s,c)=>{if(t.type===`svg`?o=`svg`:t.type===`math`&&(o=`mathml`),e==null)ee(t,n,r,i,a,o,s,c);else{let n=e.el&&e.el._isVueCE?e.el:null;try{n&&n._beginPatch(),D(e,t,i,a,o,s,c)}finally{n&&n._endPatch()}}},ee=(e,t,n,i,a,o,s,u)=>{let d,f,{props:m,shapeFlag:h,transition:g,dirs:_}=e;if(d=e.el=l(e.type,o,m&&m.is,m),h&8?p(d,e.children):h&16&&T(e.children,d,null,i,a,Mi(e,o),s,u),_&&Bn(e,null,i,`created`),te(d,e,e.scopeId,s,i),m){for(let e in m)e!==`value`&&!E(e)&&c(d,e,null,m[e],o,i);`value`in m&&c(d,`value`,null,m.value,o),(f=m.onVnodeBeforeMount)&&ua(f,i,e)}_&&Bn(e,null,i,`beforeMount`);let v=Pi(a,g);v&&g.beforeEnter(d),r(d,t,n),((f=m&&m.onVnodeMounted)||v||_)&&ki(()=>{try{f&&ua(f,i,e),v&&g.enter(d),_&&Bn(e,null,i,`mounted`)}finally{}},a)},te=(e,t,n,r,i)=>{if(n&&g(e,n),r)for(let t=0;t{for(let l=c;l{let l=t.el=e.el,{patchFlag:u,dynamicChildren:d,dirs:f}=t;u|=e.patchFlag&16;let m=e.props||i,h=t.props||i,g;if(n&&Ni(n,!1),(g=h.onVnodeBeforeUpdate)&&ua(g,n,t,e),f&&Bn(t,e,n,`beforeUpdate`),n&&Ni(n,!0),(m.innerHTML&&h.innerHTML==null||m.textContent&&h.textContent==null)&&p(l,``),d?ne(e.dynamicChildren,d,l,n,r,Mi(t,a),o):s||ue(e,t,l,null,n,r,Mi(t,a),o,!1),u>0){if(u&16)O(l,m,h,n,a);else if(u&2&&m.class!==h.class&&c(l,`class`,null,h.class,a),u&4&&c(l,`style`,m.style,h.style,a),u&8){let e=t.dynamicProps;for(let t=0;t{g&&ua(g,n,t,e),f&&Bn(t,e,n,`updated`)},r)},ne=(e,t,n,r,i,a,o)=>{for(let s=0;s{if(t!==n){if(t!==i)for(let i in t)!E(i)&&!(i in n)&&c(e,i,t[i],null,a,r);for(let i in n){if(E(i))continue;let o=n[i],s=t[i];o!==s&&i!==`value`&&c(e,i,s,o,a,r)}`value`in n&&c(e,`value`,t.value,n.value,a)}},re=(e,t,n,i,a,o,s,c,l)=>{let d=t.el=e?e.el:u(``),f=t.anchor=e?e.anchor:u(``),{patchFlag:p,dynamicChildren:m,slotScopeIds:h}=t;h&&(c=c?c.concat(h):h),e==null?(r(d,n,i),r(f,n,i),T(t.children||[],n,f,a,o,s,c,l)):p>0&&p&64&&m&&e.dynamicChildren&&e.dynamicChildren.length===m.length?(ne(e.dynamicChildren,m,n,a,o,s,c),(t.key!=null||a&&t===a.subTree)&&Fi(e,t,!0)):ue(e,t,n,f,a,o,s,c,l)},ie=(e,t,n,r,i,a,o,s,c)=>{t.slotScopeIds=s,e==null?t.shapeFlag&512?i.ctx.activate(t,n,r,o,c):ae(t,n,r,i,a,o,c):oe(e,t,c)},ae=(e,t,n,r,i,a,o)=>{let s=e.component=pa(e,r,i);if(sr(e)&&(s.ctx.renderer=Se),Sa(s,!1,o),s.asyncDep){if(i&&i.registerDep(s,se,o),!e.el){let r=s.subTree=H(Ui);b(null,r,t,n),e.placeholder=r.el}}else se(s,e,t,n,i,a,o)},oe=(e,t,n)=>{let r=t.component=e.component;if(si(e,t,n))if(r.asyncDep&&!r.asyncResolved){le(r,t,n);return}else r.next=t,r.update();else t.el=e.el,r.vnode=t},se=(e,t,n,r,i,a,o)=>{let s=()=>{if(e.isMounted){let{next:t,bu:n,u:r,parent:s,vnode:c}=e;{let n=Li(e);if(n){t&&(t.el=c.el,le(e,t,o)),n.asyncDep.then(()=>{ki(()=>{e.isUnmounted||l()},i)});return}}let u=t,d;Ni(e,!1),t?(t.el=c.el,le(e,t,o)):t=c,n&&ce(n),(d=t.props&&t.props.onVnodeBeforeUpdate)&&ua(d,s,t,c),Ni(e,!0);let f=ii(e),p=e.subTree;e.subTree=f,v(p,f,m(p.el),ye(p),e,i,a),t.el=f.el,u===null&&ui(e,f.el),r&&ki(r,i),(d=t.props&&t.props.onVnodeUpdated)&&ki(()=>ua(d,s,t,c),i)}else{let o,{el:s,props:c}=t,{bm:l,m:u,parent:d,root:f,type:p}=e,m=or(t);if(Ni(e,!1),l&&ce(l),!m&&(o=c&&c.onVnodeBeforeMount)&&ua(o,d,t),Ni(e,!0),s&&we){let t=()=>{e.subTree=ii(e),we(s,e.subTree,e,i,null)};m&&p.__asyncHydrate?p.__asyncHydrate(s,e,t):t()}else{f.ce&&f.ce._hasShadowRoot()&&f.ce._injectChildStyle(p,e.parent?e.parent.type:void 0);let o=e.subTree=ii(e);v(null,o,n,r,e,i,a),t.el=o.el}if(u&&ki(u,i),!m&&(o=c&&c.onVnodeMounted)){let e=t;ki(()=>ua(o,d,e),i)}(t.shapeFlag&256||d&&or(d.vnode)&&d.vnode.shapeFlag&256)&&e.a&&ki(e.a,i),e.isMounted=!0,t=n=r=null}};e.scope.on();let c=e.effect=new Me(s);e.scope.off();let l=e.update=c.run.bind(c),u=e.job=c.runIfDirty.bind(c);u.i=e,u.id=e.uid,c.scheduler=()=>On(u),Ni(e,!0),l()},le=(e,t,n)=>{t.component=e;let r=e.vnode.props;e.vnode=t,e.next=null,hi(e,t.props,r,n),Oi(e,t.children,n),qe(),jn(e),Je()},ue=(e,t,n,r,i,a,o,s,c=!1)=>{let l=e&&e.children,u=e?e.shapeFlag:0,d=t.children,{patchFlag:f,shapeFlag:m}=t;if(f>0){if(f&128){pe(l,d,n,r,i,a,o,s,c);return}else if(f&256){de(l,d,n,r,i,a,o,s,c);return}}m&8?(u&16&&ve(l,i,a),d!==l&&p(n,d)):u&16?m&16?pe(l,d,n,r,i,a,o,s,c):ve(l,i,a,!0):(u&8&&p(n,``),m&16&&T(d,n,r,i,a,o,s,c))},de=(e,t,n,r,i,o,s,c,l)=>{e||=a,t||=a;let u=e.length,d=t.length,f=Math.min(u,d),p;for(p=0;pd?ve(e,i,o,!0,!1,f):T(t,n,r,i,o,s,c,l,f)},pe=(e,t,n,r,i,o,s,c,l)=>{let u=0,d=t.length,f=e.length-1,p=d-1;for(;u<=f&&u<=p;){let r=e[u],a=t[u]=l?sa(t[u]):oa(t[u]);if($i(r,a))v(r,a,n,null,i,o,s,c,l);else break;u++}for(;u<=f&&u<=p;){let r=e[f],a=t[p]=l?sa(t[p]):oa(t[p]);if($i(r,a))v(r,a,n,null,i,o,s,c,l);else break;f--,p--}if(u>f){if(u<=p){let e=p+1,a=ep)for(;u<=f;)he(e[u],i,o,!0),u++;else{let m=u,h=u,g=new Map;for(u=h;u<=p;u++){let e=t[u]=l?sa(t[u]):oa(t[u]);e.key!=null&&g.set(e.key,u)}let _,y=0,b=p-h+1,x=!1,S=0,C=Array(b);for(u=0;u=b){he(r,i,o,!0);continue}let a;if(r.key!=null)a=g.get(r.key);else for(_=h;_<=p;_++)if(C[_-h]===0&&$i(r,t[_])){a=_;break}a===void 0?he(r,i,o,!0):(C[a-h]=u+1,a>=S?S=a:x=!0,v(r,t[a],n,null,i,o,s,c,l),y++)}let w=x?Ii(C):a;for(_=w.length-1,u=b-1;u>=0;u--){let e=h+u,a=t[e],f=t[e+1],p=e+1{let{el:o,type:c,transition:l,children:u,shapeFlag:d}=e;if(d&6){me(e.component.subTree,t,n,i);return}if(d&128){e.suspense.move(t,n,i);return}if(d&64){c.move(e,t,n,Se);return}if(c===R){r(o,t,n);for(let e=0;el.enter(o),a);else{let{leave:i,delayLeave:a,afterLeave:c}=l,u=()=>{e.ctx.isUnmounted?s(o):r(o,t,n)},d=()=>{o._isLeaving&&o[Qn](!0),i(o,()=>{u(),c&&c()})};a?a(o,u,d):d()}else r(o,t,n)},he=(e,t,n,r=!1,i=!1)=>{let{type:a,props:o,ref:s,children:c,dynamicChildren:l,shapeFlag:u,patchFlag:d,dirs:f,cacheIndex:p,memo:m}=e;if(d===-2&&(i=!1),s!=null&&(qe(),ir(s,null,n,e,!0),Je()),p!=null&&(t.renderCache[p]=void 0),u&256){t.ctx.deactivate(e);return}let h=u&1&&f,g=!or(e),_;if(g&&(_=o&&o.onVnodeBeforeUnmount)&&ua(_,t,e),u&6)k(e.component,n,r);else{if(u&128){e.suspense.unmount(n,r);return}h&&Bn(e,null,t,`beforeUnmount`),u&64?e.type.remove(e,t,n,Se,r):l&&!l.hasOnce&&(a!==R||d>0&&d&64)?ve(l,t,n,!1,!0):(a===R&&d&384||!i&&u&16)&&ve(c,t,n),r&&ge(e)}let v=m!=null&&p==null;(g&&(_=o&&o.onVnodeUnmounted)||h||v)&&ki(()=>{_&&ua(_,t,e),h&&Bn(e,null,t,`unmounted`),v&&(e.el=null)},n)},ge=e=>{let{type:t,el:n,anchor:r,transition:i}=e;if(t===R){_e(n,r);return}if(t===Wi){C(e);return}let a=()=>{s(n),i&&!i.persisted&&i.afterLeave&&i.afterLeave()};if(e.shapeFlag&1&&i&&!i.persisted){let{leave:t,delayLeave:r}=i,o=()=>t(n,a);r?r(e.el,a,o):o()}else a()},_e=(e,t)=>{let n;for(;e!==t;)n=h(e),s(e),e=n;s(t)},k=(e,t,n)=>{let{bum:r,scope:i,job:a,subTree:o,um:s,m:c,a:l}=e;Ri(c),Ri(l),r&&ce(r),i.stop(),a&&(a.flags|=8,he(o,e,t,n)),s&&ki(s,t),ki(()=>{e.isUnmounted=!0},t)},ve=(e,t,n,r=!1,i=!1,a=0)=>{for(let o=a;o{if(e.shapeFlag&6)return ye(e.component.subTree);if(e.shapeFlag&128)return e.suspense.next();let t=h(e.anchor||e.el),n=t&&t[Xn];return n?h(n):t},be=!1,xe=(e,t,n)=>{let r;e==null?t._vnode&&(he(t._vnode,null,null,!0),r=t._vnode.component):v(t._vnode||null,e,t,null,null,null,n),t._vnode=e,be||=(be=!0,jn(r),Mn(),!1)},Se={p:v,um:he,m:me,r:ge,mt:ae,mc:T,pc:ue,pbc:ne,n:ye,o:e},Ce,we;return t&&([Ce,we]=t(Se)),{render:xe,hydrate:Ce,createApp:Zr(xe,Ce)}}function Mi({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 Ni({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function Pi(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function Fi(e,t,n=!1){let r=e.children,i=t.children;if(m(r)&&m(i))for(let e=0;e>1,e[n[s]]0&&(t[r]=n[a-1]),n[a]=r)}}for(a=n.length,o=n[a-1];a-- >0;)n[a]=o,o=t[o];return n}function Li(e){let t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:Li(t)}function Ri(e){if(e)for(let t=0;te.__isSuspense;function Vi(e,t){t&&t.pendingBranch?m(e)?t.effects.push(...e):t.effects.push(e):An(e)}var R=Symbol.for(`v-fgt`),Hi=Symbol.for(`v-txt`),Ui=Symbol.for(`v-cmt`),Wi=Symbol.for(`v-stc`),Gi=[],Ki=null;function z(e=!1){Gi.push(Ki=e?null:[])}function qi(){Gi.pop(),Ki=Gi[Gi.length-1]||null}var Ji=1;function Yi(e,t=!1){Ji+=e,e<0&&Ki&&t&&(Ki.hasOnce=!0)}function Xi(e){return e.dynamicChildren=Ji>0?Ki||a:null,qi(),Ji>0&&Ki&&Ki.push(e),e}function B(e,t,n,r,i,a){return Xi(V(e,t,n,r,i,a,!0))}function Zi(e,t,n,r,i){return Xi(H(e,t,n,r,i,!0))}function Qi(e){return e?e.__v_isVNode===!0:!1}function $i(e,t){return e.type===t.type&&e.key===t.key}var ea=({key:e})=>e??null,ta=({ref:e,ref_key:t,ref_for:n})=>(typeof e==`number`&&(e=``+e),e==null?null:y(e)||P(e)||v(e)?{i:Fn,r:e,k:t,f:!!n}:e);function V(e,t=null,n=null,r=0,i=null,a=e===R?0:1,o=!1,s=!1){let c={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&ea(t),ref:t&&ta(t),scopeId:In,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:a,patchFlag:r,dynamicProps:i,dynamicChildren:null,appContext:null,ctx:Fn};return s?(ca(c,n),a&128&&e.normalize(c)):n&&(c.shapeFlag|=y(n)?8:16),Ji>0&&!o&&Ki&&(c.patchFlag>0||a&6)&&c.patchFlag!==32&&Ki.push(c),c}var H=na;function na(e,t=null,n=null,r=0,i=null,a=!1){if((!e||e===Er)&&(e=Ui),Qi(e)){let r=ia(e,t,!0);return n&&ca(r,n),Ji>0&&!a&&Ki&&(r.shapeFlag&6?Ki[Ki.indexOf(e)]=r:Ki.push(r)),r.patchFlag=-2,r}if(Ma(e)&&(e=e.__vccOpts),t){t=ra(t);let{class:e,style:n}=t;e&&!y(e)&&(t.class=k(e)),x(n)&&(Jt(n)&&!m(n)&&(n=u({},n)),t.style=pe(n))}let o=y(e)?1:Bi(e)?128:Zn(e)?64:x(e)?4:v(e)?2:0;return V(e,t,n,r,i,o,a,!0)}function ra(e){return e?Jt(e)||pi(e)?u({},e):e:null}function ia(e,t,n=!1,r=!1){let{props:i,ref:a,patchFlag:o,children:s,transition:c}=e,l=t?la(i||{},t):i,u={__v_isVNode:!0,__v_skip:!0,type:e.type,props:l,key:l&&ea(l),ref:t&&t.ref?n&&a?m(a)?a.concat(ta(t)):[a,ta(t)]:ta(t):a,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:s,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==R?o===-1?16:o|16:o,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:c,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&ia(e.ssContent),ssFallback:e.ssFallback&&ia(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return c&&r&&$n(u,c.clone(u)),u}function U(e=` `,t=0){return H(Hi,null,e,t)}function aa(e,t){let n=H(Wi,null,e);return n.staticCount=t,n}function W(e=``,t=!1){return t?(z(),Zi(Ui,null,e)):H(Ui,null,e)}function oa(e){return e==null||typeof e==`boolean`?H(Ui):m(e)?H(R,null,e.slice()):Qi(e)?sa(e):H(Hi,null,String(e))}function sa(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:ia(e)}function ca(e,t){let n=0,{shapeFlag:r}=e;if(t==null)t=null;else if(m(t))n=16;else if(typeof t==`object`)if(r&65){let n=t.default;n&&(n._c&&(n._d=!1),ca(e,n()),n._c&&(n._d=!0));return}else{n=32;let r=t._;!r&&!pi(t)?t._ctx=Fn:r===3&&Fn&&(Fn.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else v(t)?(t={default:t,_ctx:Fn},n=32):(t=String(t),r&64?(n=16,t=[U(t)]):n=8);e.children=t,e.shapeFlag|=n}function la(...e){let t={};for(let n=0;nma||Fn,ga,_a;{let e=fe(),t=(t,n)=>{let r;return(r=e[t])||(r=e[t]=[]),r.push(n),e=>{r.length>1?r.forEach(t=>t(e)):r[0](e)}};ga=t(`__VUE_INSTANCE_SETTERS__`,e=>ma=e),_a=t(`__VUE_SSR_SETTERS__`,e=>xa=e)}var va=e=>{let t=ma;return ga(e),e.scope.on(),()=>{e.scope.off(),ga(t)}},ya=()=>{ma&&ma.scope.off(),ga(null)};function ba(e){return e.vnode.shapeFlag&4}var xa=!1;function Sa(e,t=!1,n=!1){t&&_a(t);let{props:r,children:i}=e.vnode,a=ba(e);mi(e,r,a,t),Di(e,i,n||t);let o=a?Ca(e,t):void 0;return t&&_a(!1),o}function Ca(e,t){let n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,Mr);let{setup:r}=n;if(r){qe();let n=e.setupContext=r.length>1?ka(e):null,i=va(e),a=hn(r,e,0,[e.props,n]),o=S(a);if(Je(),i(),(o||e.sp)&&!or(e)&&tr(e),o){if(a.then(ya,ya),t)return a.then(n=>{wa(e,n,t)}).catch(t=>{_n(t,e,0)});e.asyncDep=a}else wa(e,a,t)}else Da(e,t)}function wa(e,t,n){v(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:x(t)&&(e.setupState=nn(t)),Da(e,n)}var Ta,Ea;function Da(e,t,n){let r=e.type;if(!e.render){if(!t&&Ta&&!r.render){let t=r.template||zr(e).template;if(t){let{isCustomElement:n,compilerOptions:i}=e.appContext.config,{delimiters:a,compilerOptions:o}=r;r.render=Ta(t,u(u({isCustomElement:n,delimiters:a},i),o))}}e.render=r.render||o,Ea&&Ea(e)}{let t=va(e);qe();try{Fr(e)}finally{Je(),t()}}}var Oa={get(e,t){return it(e,`get`,``),e[t]}};function ka(e){return{attrs:new Proxy(e.attrs,Oa),slots:e.slots,emit:e.emit,expose:t=>{e.exposed=t||{}}}}function Aa(e){return e.exposed?e.exposeProxy||=new Proxy(nn(Yt(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in Ar)return Ar[n](e)},has(e,t){return t in e||t in Ar}}):e.proxy}function ja(e,t=!0){return v(e)?e.displayName||e.name:e.name||t&&e.__name}function Ma(e){return v(e)&&`__vccOpts`in e}var G=(e,t)=>cn(e,t,xa);function Na(e,t,n){try{Yi(-1);let r=arguments.length;return r===2?x(t)&&!m(t)?Qi(t)?H(e,null,[t]):H(e,t):H(e,null,t):(r>3?n=Array.prototype.slice.call(arguments,2):r===3&&Qi(n)&&(n=[n]),H(e,t,n))}finally{Yi(1)}}var Pa=`3.5.34`,Fa=void 0,Ia=typeof window<`u`&&window.trustedTypes;if(Ia)try{Fa=Ia.createPolicy(`vue`,{createHTML:e=>e})}catch{}var La=Fa?e=>Fa.createHTML(e):e=>e,Ra=`http://www.w3.org/2000/svg`,za=`http://www.w3.org/1998/Math/MathML`,Ba=typeof document<`u`?document:null,Va=Ba&&Ba.createElement(`template`),Ha={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{let t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,r)=>{let i=t===`svg`?Ba.createElementNS(Ra,e):t===`mathml`?Ba.createElementNS(za,e):n?Ba.createElement(e,{is:n}):Ba.createElement(e);return e===`select`&&r&&r.multiple!=null&&i.setAttribute(`multiple`,r.multiple),i},createText:e=>Ba.createTextNode(e),createComment:e=>Ba.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Ba.querySelector(e),setScopeId(e,t){e.setAttribute(t,``)},insertStaticContent(e,t,n,r,i,a){let o=n?n.previousSibling:t.lastChild;if(i&&(i===a||i.nextSibling))for(;t.insertBefore(i.cloneNode(!0),n),!(i===a||!(i=i.nextSibling)););else{Va.innerHTML=La(r===`svg`?`${e}`:r===`mathml`?`${e}`:e);let i=Va.content;if(r===`svg`||r===`mathml`){let e=i.firstChild;for(;e.firstChild;)i.appendChild(e.firstChild);i.removeChild(e)}t.insertBefore(i,n)}return[o?o.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},Ua=Symbol(`_vtc`);function Wa(e,t,n){let r=e[Ua];r&&(t=(t?[t,...r]:[...r]).join(` `)),t==null?e.removeAttribute(`class`):n?e.setAttribute(`class`,t):e.className=t}var Ga=Symbol(`_vod`),Ka=Symbol(`_vsh`),qa=Symbol(``),Ja=/(?:^|;)\s*display\s*:/;function Ya(e,t,n){let r=e.style,i=y(n),a=!1;if(n&&!i){if(t)if(y(t))for(let e of t.split(`;`)){let t=e.slice(0,e.indexOf(`:`)).trim();n[t]??Za(r,t,``)}else for(let e in t)n[e]??Za(r,e,``);for(let i in n){i===`display`&&(a=!0);let o=n[i];o==null?Za(r,i,``):to(e,i,!y(t)&&t?t[i]:void 0,o)||Za(r,i,o)}}else if(i){if(t!==n){let e=r[qa];e&&(n+=`;`+e),r.cssText=n,a=Ja.test(n)}}else t&&e.removeAttribute(`style`);Ga in e&&(e[Ga]=a?r.display:``,e[Ka]&&(r.display=`none`))}var Xa=/\s*!important$/;function Za(e,t,n){if(m(n))n.forEach(n=>Za(e,t,n));else if(n??=``,t.startsWith(`--`))e.setProperty(t,n);else{let r=eo(e,t);Xa.test(n)?e.setProperty(ie(r),n.replace(Xa,``),`important`):e[r]=n}}var Qa=[`Webkit`,`Moz`,`ms`],$a={};function eo(e,t){let n=$a[t];if(n)return n;let r=O(t);if(r!==`filter`&&r in e)return $a[t]=r;r=ae(r);for(let n=0;nfo||=(po.then(()=>fo=0),Date.now());function ho(e,t){let n=e=>{if(!e._vts)e._vts=Date.now();else if(e._vts<=n.attached)return;gn(go(e,n.value),t,5,[e])};return n.value=e,n.attached=mo(),n}function go(e,t){if(m(t)){let n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(e=>t=>!t._stopped&&e&&e(t))}else return t}var _o=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,vo=(e,t,n,r,i,a)=>{let o=i===`svg`;t===`class`?Wa(e,r,o):t===`style`?Ya(e,n,r):c(t)?l(t)||co(e,t,n,r,a):(t[0]===`.`?(t=t.slice(1),!0):t[0]===`^`?(t=t.slice(1),!1):yo(e,t,r,o))?(io(e,t,r),!e.tagName.includes(`-`)&&(t===`value`||t===`checked`||t===`selected`)&&ro(e,t,r,o,a,t!==`value`)):e._isVueCE&&(bo(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!y(r)))?io(e,O(t),r,a,t):(t===`true-value`?e._trueValue=r:t===`false-value`&&(e._falseValue=r),ro(e,t,r,o))};function yo(e,t,n,r){if(r)return!!(t===`innerHTML`||t===`textContent`||t in e&&_o(t)&&v(n));if(t===`spellcheck`||t===`draggable`||t===`translate`||t===`autocorrect`||t===`sandbox`&&e.tagName===`IFRAME`||t===`form`||t===`list`&&e.tagName===`INPUT`||t===`type`&&e.tagName===`TEXTAREA`)return!1;if(t===`width`||t===`height`){let t=e.tagName;if(t===`IMG`||t===`VIDEO`||t===`CANVAS`||t===`SOURCE`)return!1}return _o(t)&&y(n)?!1:t in e}function bo(e,t){let n=e._def.props;if(!n)return!1;let r=O(t);return Array.isArray(n)?n.some(e=>O(e)===r):Object.keys(n).some(e=>O(e)===r)}var xo=e=>{let t=e.props[`onUpdate:modelValue`]||!1;return m(t)?e=>ce(t,e):t};function So(e){e.target.composing=!0}function Co(e){let t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event(`input`)))}var wo=Symbol(`_assign`);function To(e,t,n){return t&&(e=e.trim()),n&&(e=ue(e)),e}var K={created(e,{modifiers:{lazy:t,trim:n,number:r}},i){e[wo]=xo(i);let a=r||i.props&&i.props.type===`number`;ao(e,t?`change`:`input`,t=>{t.target.composing||e[wo](To(e.value,n,a))}),(n||a)&&ao(e,`change`,()=>{e.value=To(e.value,n,a)}),t||(ao(e,`compositionstart`,So),ao(e,`compositionend`,Co),ao(e,`change`,Co))},mounted(e,{value:t}){e.value=t??``},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:r,trim:i,number:a}},o){if(e[wo]=xo(o),e.composing)return;let s=(a||e.type===`number`)&&!/^0\d/.test(e.value)?ue(e.value):e.value,c=t??``;if(s===c)return;let l=e.getRootNode();(l instanceof Document||l instanceof ShadowRoot)&&l.activeElement===e&&e.type!==`range`&&(r&&t===n||i&&e.value.trim()===c)||(e.value=c)}},Eo={deep:!0,created(e,t,n){e[wo]=xo(n),ao(e,`change`,()=>{let t=e._modelValue,n=jo(e),r=e.checked,i=e[wo];if(m(t)){let e=Ce(t,n),a=e!==-1;if(r&&!a)i(t.concat(n));else if(!r&&a){let n=[...t];n.splice(e,1),i(n)}}else if(g(t)){let e=new Set(t);r?e.add(n):e.delete(n),i(e)}else i(Mo(e,r))})},mounted:Do,beforeUpdate(e,t,n){e[wo]=xo(n),Do(e,t,n)}};function Do(e,{value:t,oldValue:n},r){e._modelValue=t;let i;if(m(t))i=Ce(t,r.props.value)>-1;else if(g(t))i=t.has(r.props.value);else{if(t===n)return;i=Se(t,Mo(e,!0))}e.checked!==i&&(e.checked=i)}var Oo={created(e,{value:t},n){e.checked=Se(t,n.props.value),e[wo]=xo(n),ao(e,`change`,()=>{e[wo](jo(e))})},beforeUpdate(e,{value:t,oldValue:n},r){e[wo]=xo(r),t!==n&&(e.checked=Se(t,r.props.value))}},ko={deep:!0,created(e,{value:t,modifiers:{number:n}},r){let i=g(t);ao(e,`change`,()=>{let t=Array.prototype.filter.call(e.options,e=>e.selected).map(e=>n?ue(jo(e)):jo(e));e[wo](e.multiple?i?new Set(t):t:t[0]),e._assigning=!0,En(()=>{e._assigning=!1})}),e[wo]=xo(r)},mounted(e,{value:t}){Ao(e,t)},beforeUpdate(e,t,n){e[wo]=xo(n)},updated(e,{value:t}){e._assigning||Ao(e,t)}};function Ao(e,t){let n=e.multiple,r=m(t);if(!(n&&!r&&!g(t))){for(let i=0,a=e.options.length;iString(e)===String(o)):a.selected=Ce(t,o)>-1}else a.selected=t.has(o);else if(Se(jo(a),t)){e.selectedIndex!==i&&(e.selectedIndex=i);return}}!n&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function jo(e){return`_value`in e?e._value:e.value}function Mo(e,t){let n=t?`_trueValue`:`_falseValue`;return n in e?e[n]:t}var No={created(e,t,n){Fo(e,t,n,null,`created`)},mounted(e,t,n){Fo(e,t,n,null,`mounted`)},beforeUpdate(e,t,n,r){Fo(e,t,n,r,`beforeUpdate`)},updated(e,t,n,r){Fo(e,t,n,r,`updated`)}};function Po(e,t){switch(e){case`SELECT`:return ko;case`TEXTAREA`:return K;default:switch(t){case`checkbox`:return Eo;case`radio`:return Oo;default:return K}}}function Fo(e,t,n,r,i){let a=Po(e.tagName,n.props&&n.props.type)[i];a&&a(e,t,n,r)}var Io=[`ctrl`,`shift`,`alt`,`meta`],Lo={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)=>Io.some(n=>e[`${n}Key`]&&!t.includes(n))},Ro=(e,t)=>{if(!e)return e;let n=e._withMods||={},r=t.join(`.`);return n[r]||(n[r]=((n,...r)=>{for(let e=0;e{let n=e._withKeys||={},r=t.join(`.`);return n[r]||(n[r]=(n=>{if(!(`key`in n))return;let r=ie(n.key);if(t.some(e=>e===r||zo[e]===r))return e(n)}))},Vo=u({patchProp:vo},Ha),Ho;function Uo(){return Ho||=Ai(Vo)}var Wo=((...e)=>{let t=Uo().createApp(...e),{mount:n}=t;return t.mount=e=>{let r=Ko(e);if(!r)return;let i=t._component;!v(i)&&!i.render&&!i.template&&(i.template=r.innerHTML),r.nodeType===1&&(r.textContent=``);let a=n(r,!1,Go(r));return r instanceof Element&&(r.removeAttribute(`v-cloak`),r.setAttribute(`data-v-app`,``)),a},t});function Go(e){if(e instanceof SVGElement)return`svg`;if(typeof MathMLElement==`function`&&e instanceof MathMLElement)return`mathml`}function Ko(e){return y(e)?document.querySelector(e):e}var qo=typeof window<`u`,Jo,Yo=e=>Jo=e,Xo=Symbol();function Zo(e){return e&&typeof e==`object`&&Object.prototype.toString.call(e)===`[object Object]`&&typeof e.toJSON!=`function`}var Qo;(function(e){e.direct=`direct`,e.patchObject=`patch object`,e.patchFunction=`patch function`})(Qo||={});var $o=typeof window==`object`&&window.window===window?window:typeof self==`object`&&self.self===self?self:typeof global==`object`&&global.global===global?global:typeof globalThis==`object`?globalThis:{HTMLElement:null};function es(e,{autoBom:t=!1}={}){return t&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob([``,e],{type:e.type}):e}function ts(e,t,n){let r=new XMLHttpRequest;r.open(`GET`,e),r.responseType=`blob`,r.onload=function(){os(r.response,t,n)},r.onerror=function(){console.error(`could not download file`)},r.send()}function ns(e){let t=new XMLHttpRequest;t.open(`HEAD`,e,!1);try{t.send()}catch{}return t.status>=200&&t.status<=299}function rs(e){try{e.dispatchEvent(new MouseEvent(`click`))}catch{let t=new MouseEvent(`click`,{bubbles:!0,cancelable:!0,view:window,detail:0,screenX:80,screenY:20,clientX:80,clientY:20,ctrlKey:!1,altKey:!1,shiftKey:!1,metaKey:!1,button:0,relatedTarget:null});e.dispatchEvent(t)}}var is=typeof navigator==`object`?navigator:{userAgent:``},as=/Macintosh/.test(is.userAgent)&&/AppleWebKit/.test(is.userAgent)&&!/Safari/.test(is.userAgent),os=qo?typeof HTMLAnchorElement<`u`&&`download`in HTMLAnchorElement.prototype&&!as?ss:`msSaveOrOpenBlob`in is?cs:ls:()=>{};function ss(e,t=`download`,n){let r=document.createElement(`a`);r.download=t,r.rel=`noopener`,typeof e==`string`?(r.href=e,r.origin===location.origin?rs(r):ns(r.href)?ts(e,t,n):(r.target=`_blank`,rs(r))):(r.href=URL.createObjectURL(e),setTimeout(function(){URL.revokeObjectURL(r.href)},4e4),setTimeout(function(){rs(r)},0))}function cs(e,t=`download`,n){if(typeof e==`string`)if(ns(e))ts(e,t,n);else{let t=document.createElement(`a`);t.href=e,t.target=`_blank`,setTimeout(function(){rs(t)})}else navigator.msSaveOrOpenBlob(es(e,n),t)}function ls(e,t,n,r){if(r||=open(``,`_blank`),r&&(r.document.title=r.document.body.innerText=`downloading...`),typeof e==`string`)return ts(e,t,n);let i=e.type===`application/octet-stream`,a=/constructor/i.test(String($o.HTMLElement))||`safari`in $o,o=/CriOS\/[\d]+/.test(navigator.userAgent);if((o||i&&a||as)&&typeof FileReader<`u`){let t=new FileReader;t.onloadend=function(){let e=t.result;if(typeof e!=`string`)throw r=null,Error(`Wrong reader.result type`);e=o?e:e.replace(/^data:[^;]*;/,`data:attachment/file;`),r?r.location.href=e:location.assign(e),r=null},t.readAsDataURL(e)}else{let t=URL.createObjectURL(e);r?r.location.assign(t):location.href=t,r=null,setTimeout(function(){URL.revokeObjectURL(t)},4e4)}}var{assign:us}=Object;function ds(){let e=Oe(!0),t=e.run(()=>F({})),n=[],r=[],i=Yt({install(e){Yo(i),i._a=e,e.provide(Xo,i),e.config.globalProperties.$pinia=i,r.forEach(e=>n.push(e)),r=[]},use(e){return this._a?n.push(e):r.push(e),this},_p:n,_a:null,_e:e,_s:new Map,state:t});return i}var fs=()=>{};function ps(e,t,n,r=fs){e.add(t);let i=()=>{e.delete(t)&&r()};return!n&&ke()&&Ae(i),i}function ms(e,...t){e.forEach(e=>{e(...t)})}var hs=e=>e(),gs=Symbol(),_s=Symbol();function vs(e,t){e instanceof Map&&t instanceof Map?t.forEach((t,n)=>e.set(n,t)):e instanceof Set&&t instanceof Set&&t.forEach(e.add,e);for(let n in t){if(!t.hasOwnProperty(n))continue;let r=t[n],i=e[n];Zo(i)&&Zo(r)&&e.hasOwnProperty(n)&&!P(r)&&!Gt(r)?e[n]=vs(i,r):e[n]=r}return e}var ys=Symbol();function bs(e){return!Zo(e)||!Object.prototype.hasOwnProperty.call(e,ys)}var{assign:xs}=Object;function Ss(e){return!!(P(e)&&e.effect)}function Cs(e,t,n,r){let{state:i,actions:a,getters:o}=t,s=n.state.value[e],c;function l(){return s||(n.state.value[e]=i?i():{}),xs(rn(n.state.value[e]),a,Object.keys(o||{}).reduce((t,r)=>(t[r]=Yt(G(()=>{Yo(n);let t=n._s.get(e);return o[r].call(t,t)})),t),{}))}return c=ws(e,l,t,n,r,!0),c}function ws(e,t,n={},r,i,a){let o,s=xs({actions:{}},n),c={deep:!0},l,u,d=new Set,f=new Set,p=r.state.value[e];!a&&!p&&(r.state.value[e]={});let m;function h(t){let n;l=u=!1,typeof t==`function`?(t(r.state.value[e]),n={type:Qo.patchFunction,storeId:e,events:void 0}):(vs(r.state.value[e],t),n={type:Qo.patchObject,payload:t,storeId:e,events:void 0});let i=m=Symbol();En().then(()=>{m===i&&(l=!0)}),u=!0,ms(d,n,r.state.value[e])}let g=a?function(){let{state:e}=n,t=e?e():{};this.$patch(e=>{xs(e,t)})}:fs;function _(){o.stop(),d.clear(),f.clear(),r._s.delete(e)}let v=(t,n=``)=>{if(gs in t)return t[_s]=n,t;let i=function(){Yo(r);let n=Array.from(arguments),a=new Set,o=new Set;function s(e){a.add(e)}function c(e){o.add(e)}ms(f,{args:n,name:i[_s],store:y,after:s,onError:c});let l;try{l=t.apply(this&&this.$id===e?this:y,n)}catch(e){throw ms(o,e),e}return l instanceof Promise?l.then(e=>(ms(a,e),e)).catch(e=>(ms(o,e),Promise.reject(e))):(ms(a,l),l)};return i[gs]=!0,i[_s]=n,i},y=Vt({_p:r,$id:e,$onAction:ps.bind(null,f),$patch:h,$reset:g,$subscribe(t,n={}){let i=ps(d,t,n.detached,()=>a()),a=o.run(()=>Kn(()=>r.state.value[e],r=>{(n.flush===`sync`?u:l)&&t({storeId:e,type:Qo.direct,events:void 0},r)},xs({},c,n)));return i},$dispose:_});r._s.set(e,y);let b=(r._a&&r._a.runWithContext||hs)(()=>r._e.run(()=>(o=Oe()).run(()=>t({action:v}))));for(let t in b){let n=b[t];P(n)&&!Ss(n)||Gt(n)?a||(p&&bs(n)&&(P(n)?n.value=p[t]:vs(n,p[t])),r.state.value[e][t]=n):typeof n==`function`&&(b[t]=v(n,t),s.actions[t]=n)}return xs(y,b),xs(N(y),b),Object.defineProperty(y,"$state",{get:()=>r.state.value[e],set:e=>{h(t=>{xs(t,e)})}}),r._p.forEach(e=>{xs(y,o.run(()=>e({store:y,app:r._a,pinia:r,options:s})))}),p&&a&&n.hydrate&&n.hydrate(y.$state,p),l=!0,u=!0,y}function Ts(e,t,n){let r,i=typeof t==`function`;r=i?n:t;function a(n,a){let o=Un();return n||=o?Hn(Xo,null):null,n&&Yo(n),n=Jo,n._s.has(e)||(i?ws(e,t,r,n):Cs(e,r,n)),n._s.get(e)}return a.$id=e,a}var Es=typeof document<`u`;function Ds(e){return typeof e==`object`||`displayName`in e||`props`in e||`__vccOpts`in e}function Os(e){return e.__esModule||e[Symbol.toStringTag]===`Module`||e.default&&Ds(e.default)}var q=Object.assign;function ks(e,t){let n={};for(let r in t){let i=t[r];n[r]=js(i)?i.map(e):e(i)}return n}var As=()=>{},js=Array.isArray;function Ms(e,t){let n={};for(let r in e)n[r]=r in t?t[r]:e[r];return n}var Ns=/#/g,Ps=/&/g,Fs=/\//g,Is=/=/g,Ls=/\?/g,Rs=/\+/g,zs=/%5B/g,Bs=/%5D/g,Vs=/%5E/g,Hs=/%60/g,Us=/%7B/g,Ws=/%7C/g,Gs=/%7D/g,Ks=/%20/g;function qs(e){return e==null?``:encodeURI(``+e).replace(Ws,`|`).replace(zs,`[`).replace(Bs,`]`)}function Js(e){return qs(e).replace(Us,`{`).replace(Gs,`}`).replace(Vs,`^`)}function Ys(e){return qs(e).replace(Rs,`%2B`).replace(Ks,`+`).replace(Ns,`%23`).replace(Ps,`%26`).replace(Hs,"`").replace(Us,`{`).replace(Gs,`}`).replace(Vs,`^`)}function Xs(e){return Ys(e).replace(Is,`%3D`)}function Zs(e){return qs(e).replace(Ns,`%23`).replace(Ls,`%3F`)}function Qs(e){return Zs(e).replace(Fs,`%2F`)}function $s(e){if(e==null)return null;try{return decodeURIComponent(``+e)}catch{}return``+e}var ec=/\/$/,tc=e=>e.replace(ec,``);function nc(e,t,n=`/`){let r,i={},a=``,o=``,s=t.indexOf(`#`),c=t.indexOf(`?`);return c=s>=0&&c>s?-1:c,c>=0&&(r=t.slice(0,c),a=t.slice(c,s>0?s:t.length),i=e(a.slice(1))),s>=0&&(r||=t.slice(0,s),o=t.slice(s,t.length)),r=uc(r??t,n),{fullPath:r+a+o,path:r,query:i,hash:$s(o)}}function rc(e,t){let n=t.query?e(t.query):``;return t.path+(n&&`?`)+n+(t.hash||``)}function ic(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||`/`}function ac(e,t,n){let r=t.matched.length-1,i=n.matched.length-1;return r>-1&&r===i&&oc(t.matched[r],n.matched[i])&&sc(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function oc(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function sc(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var n in e)if(!cc(e[n],t[n]))return!1;return!0}function cc(e,t){return js(e)?lc(e,t):js(t)?lc(t,e):e?.valueOf()===t?.valueOf()}function lc(e,t){return js(t)?e.length===t.length&&e.every((e,n)=>e===t[n]):e.length===1&&e[0]===t}function uc(e,t){if(e.startsWith(`/`))return e;if(!e)return t;let n=t.split(`/`),r=e.split(`/`),i=r[r.length-1];(i===`..`||i===`.`)&&r.push(``);let a=n.length-1,o,s;for(o=0;o1&&a--;else break;return n.slice(0,a).join(`/`)+`/`+r.slice(o).join(`/`)}var dc={path:`/`,name:void 0,params:{},query:{},hash:``,fullPath:`/`,matched:[],meta:{},redirectedFrom:void 0},fc=function(e){return e.pop=`pop`,e.push=`push`,e}({}),pc=function(e){return e.back=`back`,e.forward=`forward`,e.unknown=``,e}({});function mc(e){if(!e)if(Es){let t=document.querySelector(`base`);e=t&&t.getAttribute(`href`)||`/`,e=e.replace(/^\w+:\/\/[^\/]+/,``)}else e=`/`;return e[0]!==`/`&&e[0]!==`#`&&(e=`/`+e),tc(e)}var hc=/^[^#]+#/;function gc(e,t){return e.replace(hc,`#`)+t}function _c(e,t){let n=document.documentElement.getBoundingClientRect(),r=e.getBoundingClientRect();return{behavior:t.behavior,left:r.left-n.left-(t.left||0),top:r.top-n.top-(t.top||0)}}var vc=()=>({left:window.scrollX,top:window.scrollY});function yc(e){let t;if(`el`in e){let n=e.el,r=typeof n==`string`&&n.startsWith(`#`),i=typeof n==`string`?r?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!i)return;t=_c(i,e)}else t=e;`scrollBehavior`in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left==null?window.scrollX:t.left,t.top==null?window.scrollY:t.top)}function bc(e,t){return(history.state?history.state.position-t:-1)+e}var xc=new Map;function Sc(e,t){xc.set(e,t)}function Cc(e){let t=xc.get(e);return xc.delete(e),t}function wc(e){return typeof e==`string`||e&&typeof e==`object`}function Tc(e){return typeof e==`string`||typeof e==`symbol`}var J=function(e){return e[e.MATCHER_NOT_FOUND=1]=`MATCHER_NOT_FOUND`,e[e.NAVIGATION_GUARD_REDIRECT=2]=`NAVIGATION_GUARD_REDIRECT`,e[e.NAVIGATION_ABORTED=4]=`NAVIGATION_ABORTED`,e[e.NAVIGATION_CANCELLED=8]=`NAVIGATION_CANCELLED`,e[e.NAVIGATION_DUPLICATED=16]=`NAVIGATION_DUPLICATED`,e}({}),Ec=Symbol(``);J.MATCHER_NOT_FOUND,J.NAVIGATION_GUARD_REDIRECT,J.NAVIGATION_ABORTED,J.NAVIGATION_CANCELLED,J.NAVIGATION_DUPLICATED;function Dc(e,t){return q(Error(),{type:e,[Ec]:!0},t)}function Oc(e,t){return e instanceof Error&&Ec in e&&(t==null||!!(e.type&t))}function kc(e){let t={};if(e===``||e===`?`)return t;let n=(e[0]===`?`?e.slice(1):e).split(`&`);for(let e=0;ee&&Ys(e)):[r&&Ys(r)]).forEach(e=>{e!==void 0&&(t+=(t.length?`&`:``)+n,e!=null&&(t+=`=`+e))})}return t}function jc(e){let t={};for(let n in e){let r=e[n];r!==void 0&&(t[n]=js(r)?r.map(e=>e==null?null:``+e):r==null?r:``+r)}return t}var Mc=Symbol(``),Nc=Symbol(``),Pc=Symbol(``),Fc=Symbol(``),Ic=Symbol(``);function Lc(){let e=[];function t(t){return e.push(t),()=>{let n=e.indexOf(t);n>-1&&e.splice(n,1)}}function n(){e=[]}return{add:t,list:()=>e.slice(),reset:n}}function Rc(e,t,n,r,i,a=e=>e()){let o=r&&(r.enterCallbacks[i]=r.enterCallbacks[i]||[]);return()=>new Promise((s,c)=>{let l=e=>{e===!1?c(Dc(J.NAVIGATION_ABORTED,{from:n,to:t})):e instanceof Error?c(e):wc(e)?c(Dc(J.NAVIGATION_GUARD_REDIRECT,{from:t,to:e})):(o&&r.enterCallbacks[i]===o&&typeof e==`function`&&o.push(e),s())},u=a(()=>e.call(r&&r.instances[i],t,n,l)),d=Promise.resolve(u);e.length<3&&(d=d.then(l)),d.catch(e=>c(e))})}function zc(e,t,n,r,i=e=>e()){let a=[];for(let o of e)for(let e in o.components){let s=o.components[e];if(!(t!==`beforeRouteEnter`&&!o.instances[e]))if(Ds(s)){let c=(s.__vccOpts||s)[t];c&&a.push(Rc(c,n,r,o,e,i))}else{let c=s();a.push(()=>c.then(a=>{if(!a)throw Error(`Couldn't resolve component "${e}" at "${o.path}"`);let s=Os(a)?a.default:a;o.mods[e]=a,o.components[e]=s;let c=(s.__vccOpts||s)[t];return c&&Rc(c,n,r,o,e,i)()}))}}return a}function Bc(e,t){let n=[],r=[],i=[],a=Math.max(t.matched.length,e.matched.length);for(let o=0;ooc(e,a))?r.push(a):n.push(a));let s=e.matched[o];s&&(t.matched.find(e=>oc(e,s))||i.push(s))}return[n,r,i]}var Vc=()=>location.protocol+`//`+location.host;function Hc(e,t){let{pathname:n,search:r,hash:i}=t,a=e.indexOf(`#`);if(a>-1){let t=i.includes(e.slice(a))?e.slice(a).length:1,n=i.slice(t);return n[0]!==`/`&&(n=`/`+n),ic(n,``)}return ic(n,e)+r+i}function Uc(e,t,n,r){let i=[],a=[],o=null,s=({state:a})=>{let s=Hc(e,location),c=n.value,l=t.value,u=0;if(a){if(n.value=s,t.value=a,o&&o===c){o=null;return}u=l?a.position-l.position:0}else r(s);i.forEach(e=>{e(n.value,c,{delta:u,type:fc.pop,direction:u?u>0?pc.forward:pc.back:pc.unknown})})};function c(){o=n.value}function l(e){i.push(e);let t=()=>{let t=i.indexOf(e);t>-1&&i.splice(t,1)};return a.push(t),t}function u(){if(document.visibilityState===`hidden`){let{history:e}=window;if(!e.state)return;e.replaceState(q({},e.state,{scroll:vc()}),``)}}function d(){for(let e of a)e();a=[],window.removeEventListener(`popstate`,s),window.removeEventListener(`pagehide`,u),document.removeEventListener(`visibilitychange`,u)}return window.addEventListener(`popstate`,s),window.addEventListener(`pagehide`,u),document.addEventListener(`visibilitychange`,u),{pauseListeners:c,listen:l,destroy:d}}function Wc(e,t,n,r=!1,i=!1){return{back:e,current:t,forward:n,replaced:r,position:window.history.length,scroll:i?vc():null}}function Gc(e){let{history:t,location:n}=window,r={value:Hc(e,n)},i={value:t.state};i.value||a(r.value,{back:null,current:r.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function a(r,a,o){let s=e.indexOf(`#`),c=s>-1?(n.host&&document.querySelector(`base`)?e:e.slice(s))+r:Vc()+e+r;try{t[o?`replaceState`:`pushState`](a,``,c),i.value=a}catch(e){console.error(e),n[o?`replace`:`assign`](c)}}function o(e,n){a(e,q({},t.state,Wc(i.value.back,e,i.value.forward,!0),n,{position:i.value.position}),!0),r.value=e}function s(e,n){let o=q({},i.value,t.state,{forward:e,scroll:vc()});a(o.current,o,!0),a(e,q({},Wc(r.value,e,null),{position:o.position+1},n),!1),r.value=e}return{location:r,state:i,push:s,replace:o}}function Kc(e){e=mc(e);let t=Gc(e),n=Uc(e,t.state,t.location,t.replace);function r(e,t=!0){t||n.pauseListeners(),history.go(e)}let i=q({location:``,base:e,go:r,createHref:gc.bind(null,e)},t,n);return Object.defineProperty(i,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(i,"state",{enumerable:!0,get:()=>t.state.value}),i}var qc=function(e){return e[e.Static=0]=`Static`,e[e.Param=1]=`Param`,e[e.Group=2]=`Group`,e}({}),Y=function(e){return e[e.Static=0]=`Static`,e[e.Param=1]=`Param`,e[e.ParamRegExp=2]=`ParamRegExp`,e[e.ParamRegExpEnd=3]=`ParamRegExpEnd`,e[e.EscapeNext=4]=`EscapeNext`,e}(Y||{}),Jc={type:qc.Static,value:``},Yc=/[a-zA-Z0-9_]/;function Xc(e){if(!e)return[[]];if(e===`/`)return[[Jc]];if(!e.startsWith(`/`))throw Error(`Invalid path "${e}"`);function t(e){throw Error(`ERR (${n})/"${l}": ${e}`)}let n=Y.Static,r=n,i=[],a;function o(){a&&i.push(a),a=[]}let s=0,c,l=``,u=``;function d(){l&&=(n===Y.Static?a.push({type:qc.Static,value:l}):n===Y.Param||n===Y.ParamRegExp||n===Y.ParamRegExpEnd?(a.length>1&&(c===`*`||c===`+`)&&t(`A repeatable param (${l}) must be alone in its segment. eg: '/:ids+.`),a.push({type:qc.Param,value:l,regexp:u,repeatable:c===`*`||c===`+`,optional:c===`*`||c===`?`})):t(`Invalid state to consume buffer`),``)}function f(){l+=c}for(;st.length?t.length===1&&t[0]===$c.Static+$c.Segment?1:-1:0}function rl(e,t){let n=0,r=e.score,i=t.score;for(;n0&&t[t.length-1]<0}var al={strict:!1,end:!0,sensitive:!1};function ol(e,t,n){let r=q(tl(Xc(e.path),n),{record:e,parent:t,children:[],alias:[]});return t&&!r.record.aliasOf==!t.record.aliasOf&&t.children.push(r),r}function sl(e,t){let n=[],r=new Map;t=Ms(al,t);function i(e){return r.get(e)}function a(e,n,r){let i=!r,s=ll(e);s.aliasOf=r&&r.record;let l=Ms(t,e),u=[s];if(`alias`in e){let t=typeof e.alias==`string`?[e.alias]:e.alias;for(let e of t)u.push(ll(q({},s,{components:r?r.record.components:s.components,path:e,aliasOf:r?r.record:s})))}let d,f;for(let t of u){let{path:u}=t;if(n&&u[0]!==`/`){let e=n.record.path,r=e[e.length-1]===`/`?``:`/`;t.path=n.record.path+(u&&r+u)}if(d=ol(t,n,l),r?r.alias.push(d):(f||=d,f!==d&&f.alias.push(d),i&&e.name&&!dl(d)&&o(e.name)),hl(d)&&c(d),s.children){let e=s.children;for(let t=0;t{o(f)}:As}function o(e){if(Tc(e)){let t=r.get(e);t&&(r.delete(e),n.splice(n.indexOf(t),1),t.children.forEach(o),t.alias.forEach(o))}else{let t=n.indexOf(e);t>-1&&(n.splice(t,1),e.record.name&&r.delete(e.record.name),e.children.forEach(o),e.alias.forEach(o))}}function s(){return n}function c(e){let t=pl(e,n);n.splice(t,0,e),e.record.name&&!dl(e)&&r.set(e.record.name,e)}function l(e,t){let i,a={},o,s;if(`name`in e&&e.name){if(i=r.get(e.name),!i)throw Dc(J.MATCHER_NOT_FOUND,{location:e});s=i.record.name,a=q(cl(t.params,i.keys.filter(e=>!e.optional).concat(i.parent?i.parent.keys.filter(e=>e.optional):[]).map(e=>e.name)),e.params&&cl(e.params,i.keys.map(e=>e.name))),o=i.stringify(a)}else if(e.path!=null)o=e.path,i=n.find(e=>e.re.test(o)),i&&(a=i.parse(o),s=i.record.name);else{if(i=t.name?r.get(t.name):n.find(e=>e.re.test(t.path)),!i)throw Dc(J.MATCHER_NOT_FOUND,{location:e,currentLocation:t});s=i.record.name,a=q({},t.params,e.params),o=i.stringify(a)}let c=[],l=i;for(;l;)c.unshift(l.record),l=l.parent;return{name:s,path:o,params:a,matched:c,meta:fl(c)}}e.forEach(e=>a(e));function u(){n.length=0,r.clear()}return{addRoute:a,resolve:l,removeRoute:o,clearRoutes:u,getRoutes:s,getRecordMatcher:i}}function cl(e,t){let n={};for(let r of t)r in e&&(n[r]=e[r]);return n}function ll(e){let t={path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:e.aliasOf,beforeEnter:e.beforeEnter,props:ul(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 ul(e){let t={},n=e.props||!1;if(`component`in e)t.default=n;else for(let r in e.components)t[r]=typeof n==`object`?n[r]:n;return t}function dl(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function fl(e){return e.reduce((e,t)=>q(e,t.meta),{})}function pl(e,t){let n=0,r=t.length;for(;n!==r;){let i=n+r>>1;rl(e,t[i])<0?r=i:n=i+1}let i=ml(e);return i&&(r=t.lastIndexOf(i,r-1)),r}function ml(e){let t=e;for(;t=t.parent;)if(hl(t)&&rl(e,t)===0)return t}function hl({record:e}){return!!(e.name||e.components&&Object.keys(e.components).length||e.redirect)}function gl(e){let t=Hn(Pc),n=Hn(Fc),r=G(()=>{let n=I(e.to);return t.resolve(n)}),i=G(()=>{let{matched:e}=r.value,{length:t}=e,i=e[t-1],a=n.matched;if(!i||!a.length)return-1;let o=a.findIndex(oc.bind(null,i));if(o>-1)return o;let s=xl(e[t-2]);return t>1&&xl(i)===s&&a[a.length-1].path!==s?a.findIndex(oc.bind(null,e[t-2])):o}),a=G(()=>i.value>-1&&bl(n.params,r.value.params)),o=G(()=>i.value>-1&&i.value===n.matched.length-1&&sc(n.params,r.value.params));function s(n={}){if(yl(n)){let n=t[I(e.replace)?`replace`:`push`](I(e.to)).catch(As);return e.viewTransition&&typeof document<`u`&&`startViewTransition`in document&&document.startViewTransition(()=>n),n}return Promise.resolve()}return{route:r,href:G(()=>r.value.href),isActive:a,isExactActive:o,navigate:s}}function _l(e){return e.length===1?e[0]:e}var vl=er({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:gl,setup(e,{slots:t}){let n=Vt(gl(e)),{options:r}=Hn(Pc),i=G(()=>({[Sl(e.activeClass,r.linkActiveClass,`router-link-active`)]:n.isActive,[Sl(e.exactActiveClass,r.linkExactActiveClass,`router-link-exact-active`)]:n.isExactActive}));return()=>{let r=t.default&&_l(t.default(n));return e.custom?r:Na(`a`,{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:i.value},r)}}});function yl(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){let t=e.currentTarget.getAttribute(`target`);if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function bl(e,t){for(let n in t){let r=t[n],i=e[n];if(typeof r==`string`){if(r!==i)return!1}else if(!js(i)||i.length!==r.length||r.some((e,t)=>e.valueOf()!==i[t].valueOf()))return!1}return!0}function xl(e){return e?e.aliasOf?e.aliasOf.path:e.path:``}var Sl=(e,t,n)=>e??t??n,Cl=er({name:`RouterView`,inheritAttrs:!1,props:{name:{type:String,default:`default`},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){let r=Hn(Ic),i=G(()=>e.route||r.value),a=Hn(Nc,0),o=G(()=>{let e=I(a),{matched:t}=i.value,n;for(;(n=t[e])&&!n.components;)e++;return e}),s=G(()=>i.value.matched[o.value]);Vn(Nc,G(()=>o.value+1)),Vn(Mc,s),Vn(Ic,i);let c=F();return Kn(()=>[c.value,s.value,e.name],([e,t,n],[r,i,a])=>{t&&(t.instances[n]=e,i&&i!==t&&e&&e===r&&(t.leaveGuards.size||(t.leaveGuards=i.leaveGuards),t.updateGuards.size||(t.updateGuards=i.updateGuards))),e&&t&&(!i||!oc(t,i)||!r)&&(t.enterCallbacks[n]||[]).forEach(t=>t(e))},{flush:`post`}),()=>{let r=i.value,a=e.name,o=s.value,l=o&&o.components[a];if(!l)return wl(n.default,{Component:l,route:r});let u=o.props[a],d=Na(l,q({},u?u===!0?r.params:typeof u==`function`?u(r):u:null,t,{onVnodeUnmounted:e=>{e.component.isUnmounted&&(o.instances[a]=null)},ref:c}));return wl(n.default,{Component:d,route:r})||d}}});function wl(e,t){if(!e)return null;let n=e(t);return n.length===1?n[0]:n}var Tl=Cl;function El(e){let t=sl(e.routes,e),n=e.parseQuery||kc,r=e.stringifyQuery||Ac,i=e.history,a=Lc(),o=Lc(),s=Lc(),c=Qt(dc),l=dc;Es&&e.scrollBehavior&&`scrollRestoration`in history&&(history.scrollRestoration=`manual`);let u=ks.bind(null,e=>``+e),d=ks.bind(null,Qs),f=ks.bind(null,$s);function p(e,n){let r,i;return Tc(e)?(r=t.getRecordMatcher(e),i=n):i=e,t.addRoute(i,r)}function m(e){let n=t.getRecordMatcher(e);n&&t.removeRoute(n)}function h(){return t.getRoutes().map(e=>e.record)}function g(e){return!!t.getRecordMatcher(e)}function _(e,a){if(a=q({},a||c.value),typeof e==`string`){let r=nc(n,e,a.path),o=t.resolve({path:r.path},a),s=i.createHref(r.fullPath);return q(r,o,{params:f(o.params),hash:$s(r.hash),redirectedFrom:void 0,href:s})}let o;if(e.path!=null)o=q({},e,{path:nc(n,e.path,a.path).path});else{let t=q({},e.params);for(let e in t)t[e]??delete t[e];o=q({},e,{params:d(t)}),a.params=d(a.params)}let s=t.resolve(o,a),l=e.hash||``;s.params=u(f(s.params));let p=rc(r,q({},e,{hash:Js(l),path:s.path})),m=i.createHref(p);return q({fullPath:p,hash:l,query:r===Ac?jc(e.query):e.query||{}},s,{redirectedFrom:void 0,href:m})}function v(e){return typeof e==`string`?nc(n,e,c.value.path):q({},e)}function y(e,t){if(l!==e)return Dc(J.NAVIGATION_CANCELLED,{from:t,to:e})}function b(e){return C(e)}function x(e){return b(q(v(e),{replace:!0}))}function S(e,t){let n=e.matched[e.matched.length-1];if(n&&n.redirect){let{redirect:r}=n,i=typeof r==`function`?r(e,t):r;return typeof i==`string`&&(i=i.includes(`?`)||i.includes(`#`)?i=v(i):{path:i},i.params={}),q({query:e.query,hash:e.hash,params:i.path==null?e.params:{}},i)}}function C(e,t){let n=l=_(e),i=c.value,a=e.state,o=e.force,s=e.replace===!0,u=S(n,i);if(u)return C(q(v(u),{state:typeof u==`object`?q({},a,u.state):a,force:o,replace:s}),t||n);let d=n;d.redirectedFrom=t;let f;return!o&&ac(r,i,n)&&(f=Dc(J.NAVIGATION_DUPLICATED,{to:d,from:i}),ce(i,i,!0,!1)),(f?Promise.resolve(f):te(d,i)).catch(e=>Oc(e)?Oc(e,J.NAVIGATION_GUARD_REDIRECT)?e:se(e):ae(e,d,i)).then(e=>{if(e){if(Oc(e,J.NAVIGATION_GUARD_REDIRECT))return C(q({replace:s},v(e.to),{state:typeof e.to==`object`?q({},a,e.to.state):a,force:o}),t||d)}else e=E(d,i,!0,s,a);return T(d,i,e),e})}function w(e,t){let n=y(e,t);return n?Promise.reject(n):Promise.resolve()}function ee(e){let t=de.values().next().value;return t&&typeof t.runWithContext==`function`?t.runWithContext(e):e()}function te(e,t){let n,[r,i,s]=Bc(e,t);n=zc(r.reverse(),`beforeRouteLeave`,e,t);for(let i of r)i.leaveGuards.forEach(r=>{n.push(Rc(r,e,t))});let c=w.bind(null,e,t);return n.push(c),pe(n).then(()=>{n=[];for(let r of a.list())n.push(Rc(r,e,t));return n.push(c),pe(n)}).then(()=>{n=zc(i,`beforeRouteUpdate`,e,t);for(let r of i)r.updateGuards.forEach(r=>{n.push(Rc(r,e,t))});return n.push(c),pe(n)}).then(()=>{n=[];for(let r of s)if(r.beforeEnter)if(js(r.beforeEnter))for(let i of r.beforeEnter)n.push(Rc(i,e,t));else n.push(Rc(r.beforeEnter,e,t));return n.push(c),pe(n)}).then(()=>(e.matched.forEach(e=>e.enterCallbacks={}),n=zc(s,`beforeRouteEnter`,e,t,ee),n.push(c),pe(n))).then(()=>{n=[];for(let r of o.list())n.push(Rc(r,e,t));return n.push(c),pe(n)}).catch(e=>Oc(e,J.NAVIGATION_CANCELLED)?e:Promise.reject(e))}function T(e,t,n){s.list().forEach(r=>ee(()=>r(e,t,n)))}function E(e,t,n,r,a){let o=y(e,t);if(o)return o;let s=t===dc,l=Es?history.state:{};n&&(r||s?i.replace(e.fullPath,q({scroll:s&&l&&l.scroll},a)):i.push(e.fullPath,a)),c.value=e,ce(e,t,n,s),se()}let D;function ne(){D||=i.listen((e,t,n)=>{if(!fe.listening)return;let r=_(e),a=S(r,fe.currentRoute.value);if(a){C(q(a,{replace:!0,force:!0}),r).catch(As);return}l=r;let o=c.value;Es&&Sc(bc(o.fullPath,n.delta),vc()),te(r,o).catch(e=>Oc(e,J.NAVIGATION_ABORTED|J.NAVIGATION_CANCELLED)?e:Oc(e,J.NAVIGATION_GUARD_REDIRECT)?(C(q(v(e.to),{force:!0}),r).then(e=>{Oc(e,J.NAVIGATION_ABORTED|J.NAVIGATION_DUPLICATED)&&!n.delta&&n.type===fc.pop&&i.go(-1,!1)}).catch(As),Promise.reject()):(n.delta&&i.go(-n.delta,!1),ae(e,r,o))).then(e=>{e||=E(r,o,!1),e&&(n.delta&&!Oc(e,J.NAVIGATION_CANCELLED)?i.go(-n.delta,!1):n.type===fc.pop&&Oc(e,J.NAVIGATION_ABORTED|J.NAVIGATION_DUPLICATED)&&i.go(-1,!1)),T(r,o,e)}).catch(As)})}let O=Lc(),re=Lc(),ie;function ae(e,t,n){se(e);let r=re.list();return r.length?r.forEach(r=>r(e,t,n)):console.error(e),Promise.reject(e)}function oe(){return ie&&c.value!==dc?Promise.resolve():new Promise((e,t)=>{O.add([e,t])})}function se(e){return ie||(ie=!e,ne(),O.list().forEach(([t,n])=>e?n(e):t()),O.reset()),e}function ce(t,n,r,i){let{scrollBehavior:a}=e;if(!Es||!a)return Promise.resolve();let o=!r&&Cc(bc(t.fullPath,0))||(i||!r)&&history.state&&history.state.scroll||null;return En().then(()=>a(t,n,o)).then(e=>e&&yc(e)).catch(e=>ae(e,t,n))}let le=e=>i.go(e),ue,de=new Set,fe={currentRoute:c,listening:!0,addRoute:p,removeRoute:m,clearRoutes:t.clearRoutes,hasRoute:g,getRoutes:h,resolve:_,options:e,push:b,replace:x,go:le,back:()=>le(-1),forward:()=>le(1),beforeEach:a.add,beforeResolve:o.add,afterEach:s.add,onError:re.add,isReady:oe,install(e){e.component(`RouterLink`,vl),e.component(`RouterView`,Tl),e.config.globalProperties.$router=fe,Object.defineProperty(e.config.globalProperties,"$route",{enumerable:!0,get:()=>I(c)}),Es&&!ue&&c.value===dc&&(ue=!0,b(i.location).catch(e=>{}));let t={};for(let e in dc)Object.defineProperty(t,e,{get:()=>c.value[e],enumerable:!0});e.provide(Pc,fe),e.provide(Fc,Ht(t)),e.provide(Ic,c);let n=e.unmount;de.add(e),e.unmount=function(){de.delete(e),de.size<1&&(l=dc,D&&D(),D=null,c.value=dc,ue=!1,ie=!1),n()}}};function pe(e){return e.reduce((e,t)=>e.then(()=>ee(t)),Promise.resolve())}return fe}function Dl(){return Hn(Pc)}function Ol(e){return Hn(Fc)}function kl(e,t){return function(){return e.apply(t,arguments)}}var{toString:Al}=Object.prototype,{getPrototypeOf:jl}=Object,{iterator:Ml,toStringTag:Nl}=Symbol,Pl=(e=>t=>{let n=Al.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Fl=e=>(e=e.toLowerCase(),t=>Pl(t)===e),Il=e=>t=>typeof t===e,{isArray:Ll}=Array,Rl=Il(`undefined`);function zl(e){return e!==null&&!Rl(e)&&e.constructor!==null&&!Rl(e.constructor)&&Ul(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}var Bl=Fl(`ArrayBuffer`);function Vl(e){let t;return t=typeof ArrayBuffer<`u`&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&Bl(e.buffer),t}var Hl=Il(`string`),Ul=Il(`function`),Wl=Il(`number`),Gl=e=>typeof e==`object`&&!!e,Kl=e=>e===!0||e===!1,ql=e=>{if(Pl(e)!==`object`)return!1;let t=jl(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Nl in e)&&!(Ml in e)},Jl=e=>{if(!Gl(e)||zl(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},Yl=Fl(`Date`),Xl=Fl(`File`),Zl=e=>!!(e&&e.uri!==void 0),Ql=e=>e&&e.getParts!==void 0,$l=Fl(`Blob`),eu=Fl(`FileList`),tu=e=>Gl(e)&&Ul(e.pipe);function nu(){return typeof globalThis<`u`?globalThis:typeof self<`u`?self:typeof window<`u`?window:typeof global<`u`?global:{}}var ru=nu(),iu=ru.FormData===void 0?void 0:ru.FormData,au=e=>{if(!e)return!1;if(iu&&e instanceof iu)return!0;let t=jl(e);if(!t||t===Object.prototype||!Ul(e.append))return!1;let n=Pl(e);return n===`formdata`||n===`object`&&Ul(e.toString)&&e.toString()===`[object FormData]`},ou=Fl(`URLSearchParams`),[su,cu,lu,uu]=[`ReadableStream`,`Request`,`Response`,`Headers`].map(Fl),du=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,``);function fu(e,t,{allOwnKeys:n=!1}={}){if(e==null)return;let r,i;if(typeof e!=`object`&&(e=[e]),Ll(e))for(r=0,i=e.length;r0;)if(i=n[r],t===i.toLowerCase())return i;return null}var mu=typeof globalThis<`u`?globalThis:typeof self<`u`?self:typeof window<`u`?window:global,hu=e=>!Rl(e)&&e!==mu;function gu(...e){let{caseless:t,skipUndefined:n}=hu(this)&&this||{},r={},i=(e,i)=>{if(i===`__proto__`||i===`constructor`||i===`prototype`)return;let a=t&&pu(r,i)||i,o=Ou(r,a)?r[a]:void 0;ql(o)&&ql(e)?r[a]=gu(o,e):ql(e)?r[a]=gu({},e):Ll(e)?r[a]=e.slice():(!n||!Rl(e))&&(r[a]=e)};for(let t=0,n=e.length;t(fu(t,(t,r)=>{n&&Ul(t)?Object.defineProperty(e,r,{__proto__:null,value:kl(t,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,r,{__proto__:null,value:t,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),e),vu=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),yu=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),Object.defineProperty(e.prototype,"constructor",{__proto__:null,value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{__proto__:null,value:t.prototype}),n&&Object.assign(e.prototype,n)},bu=(e,t,n,r)=>{let i,a,o,s={};if(t||={},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),a=i.length;a-- >0;)o=i[a],(!r||r(o,e,t))&&!s[o]&&(t[o]=e[o],s[o]=!0);e=n!==!1&&jl(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},xu=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;let r=e.indexOf(t,n);return r!==-1&&r===n},Su=e=>{if(!e)return null;if(Ll(e))return e;let t=e.length;if(!Wl(t))return null;let n=Array(t);for(;t-- >0;)n[t]=e[t];return n},Cu=(e=>t=>e&&t instanceof e)(typeof Uint8Array<`u`&&jl(Uint8Array)),wu=(e,t)=>{let n=(e&&e[Ml]).call(e),r;for(;(r=n.next())&&!r.done;){let n=r.value;t.call(e,n[0],n[1])}},Tu=(e,t)=>{let n,r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},Eu=Fl(`HTMLFormElement`),Du=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,t,n){return t.toUpperCase()+n}),Ou=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),ku=Fl(`RegExp`),Au=(e,t)=>{let n=Object.getOwnPropertyDescriptors(e),r={};fu(n,(n,i)=>{let a;(a=t(n,i,e))!==!1&&(r[i]=a||n)}),Object.defineProperties(e,r)},ju=e=>{Au(e,(t,n)=>{if(Ul(e)&&[`arguments`,`caller`,`callee`].includes(n))return!1;let r=e[n];if(Ul(r)){if(t.enumerable=!1,`writable`in t){t.writable=!1;return}t.set||=()=>{throw Error(`Can not rewrite read-only method '`+n+`'`)}}})},Mu=(e,t)=>{let n={},r=e=>{e.forEach(e=>{n[e]=!0})};return Ll(e)?r(e):r(String(e).split(t)),n},Nu=()=>{},Pu=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function Fu(e){return!!(e&&Ul(e.append)&&e[Nl]===`FormData`&&e[Ml])}var Iu=e=>{let t=new WeakSet,n=e=>{if(Gl(e)){if(t.has(e))return;if(zl(e))return e;if(!(`toJSON`in e)){t.add(e);let r=Ll(e)?[]:{};return fu(e,(e,t)=>{let i=n(e);!Rl(i)&&(r[t]=i)}),t.delete(e),r}}return e};return n(e)},Lu=Fl(`AsyncFunction`),Ru=e=>e&&(Gl(e)||Ul(e))&&Ul(e.then)&&Ul(e.catch),zu=((e,t)=>e?setImmediate:t?((e,t)=>(mu.addEventListener(`message`,({source:n,data:r})=>{n===mu&&r===e&&t.length&&t.shift()()},!1),n=>{t.push(n),mu.postMessage(e,`*`)}))(`axios@${Math.random()}`,[]):e=>setTimeout(e))(typeof setImmediate==`function`,Ul(mu.postMessage)),X={isArray:Ll,isArrayBuffer:Bl,isBuffer:zl,isFormData:au,isArrayBufferView:Vl,isString:Hl,isNumber:Wl,isBoolean:Kl,isObject:Gl,isPlainObject:ql,isEmptyObject:Jl,isReadableStream:su,isRequest:cu,isResponse:lu,isHeaders:uu,isUndefined:Rl,isDate:Yl,isFile:Xl,isReactNativeBlob:Zl,isReactNative:Ql,isBlob:$l,isRegExp:ku,isFunction:Ul,isStream:tu,isURLSearchParams:ou,isTypedArray:Cu,isFileList:eu,forEach:fu,merge:gu,extend:_u,trim:du,stripBOM:vu,inherits:yu,toFlatObject:bu,kindOf:Pl,kindOfTest:Fl,endsWith:xu,toArray:Su,forEachEntry:wu,matchAll:Tu,isHTMLForm:Eu,hasOwnProperty:Ou,hasOwnProp:Ou,reduceDescriptors:Au,freezeMethods:ju,toObjectSet:Mu,toCamelCase:Du,noop:Nu,toFiniteNumber:Pu,findKey:pu,global:mu,isContextDefined:hu,isSpecCompliantForm:Fu,toJSONObject:Iu,isAsyncFn:Lu,isThenable:Ru,setImmediate:zu,asap:typeof queueMicrotask<`u`?queueMicrotask.bind(mu):typeof process<`u`&&process.nextTick||zu,isIterable:e=>e!=null&&Ul(e[Ml])},Bu=X.toObjectSet([`age`,`authorization`,`content-length`,`content-type`,`etag`,`expires`,`from`,`host`,`if-modified-since`,`if-unmodified-since`,`last-modified`,`location`,`max-forwards`,`proxy-authorization`,`referer`,`retry-after`,`user-agent`]),Vu=e=>{let t={},n,r,i;return e&&e.split(` `).forEach(function(e){i=e.indexOf(`:`),n=e.substring(0,i).trim().toLowerCase(),r=e.substring(i+1).trim(),!(!n||t[n]&&Bu[n])&&(n===`set-cookie`?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+`, `+r:r)}),t};function Hu(e){let t=0,n=e.length;for(;tt;){let t=e.charCodeAt(n-1);if(t!==9&&t!==32)break;--n}return t===0&&n===e.length?e:e.slice(t,n)}var Uu=RegExp(`[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+`,`g`),Wu=RegExp(`[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+`,`g`);function Gu(e,t){return X.isArray(e)?e.map(e=>Gu(e,t)):Hu(String(e).replace(t,``))}var Ku=e=>Gu(e,Uu),qu=e=>Gu(e,Wu);function Ju(e){let t=Object.create(null);return X.forEach(e.toJSON(),(e,n)=>{t[n]=qu(e)}),t}var Yu=Symbol(`internals`);function Xu(e){return e&&String(e).trim().toLowerCase()}function Zu(e){return e===!1||e==null?e:X.isArray(e)?e.map(Zu):Ku(String(e))}function Qu(e){let t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g,r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}var $u=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function ed(e,t,n,r,i){if(X.isFunction(r))return r.call(this,t,n);if(i&&(t=n),X.isString(t)){if(X.isString(r))return t.indexOf(r)!==-1;if(X.isRegExp(r))return r.test(t)}}function td(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,n)=>t.toUpperCase()+n)}function nd(e,t){let n=X.toCamelCase(` `+t);[`get`,`set`,`has`].forEach(r=>{Object.defineProperty(e,r+n,{__proto__:null,value:function(e,n,i){return this[r].call(this,t,e,n,i)},configurable:!0})})}var rd=class{constructor(e){e&&this.set(e)}set(e,t,n){let r=this;function i(e,t,n){let i=Xu(t);if(!i)throw Error(`header name must be a non-empty string`);let a=X.findKey(r,i);(!a||r[a]===void 0||n===!0||n===void 0&&r[a]!==!1)&&(r[a||t]=Zu(e))}let a=(e,t)=>X.forEach(e,(e,n)=>i(e,n,t));if(X.isPlainObject(e)||e instanceof this.constructor)a(e,t);else if(X.isString(e)&&(e=e.trim())&&!$u(e))a(Vu(e),t);else if(X.isObject(e)&&X.isIterable(e)){let n={},r,i;for(let t of e){if(!X.isArray(t))throw TypeError(`Object iterator must return a key-value pair`);n[i=t[0]]=(r=n[i])?X.isArray(r)?[...r,t[1]]:[r,t[1]]:t[1]}a(n,t)}else e!=null&&i(t,e,n);return this}get(e,t){if(e=Xu(e),e){let n=X.findKey(this,e);if(n){let e=this[n];if(!t)return e;if(t===!0)return Qu(e);if(X.isFunction(t))return t.call(this,e,n);if(X.isRegExp(t))return t.exec(e);throw TypeError(`parser must be boolean|regexp|function`)}}}has(e,t){if(e=Xu(e),e){let n=X.findKey(this,e);return!!(n&&this[n]!==void 0&&(!t||ed(this,this[n],n,t)))}return!1}delete(e,t){let n=this,r=!1;function i(e){if(e=Xu(e),e){let i=X.findKey(n,e);i&&(!t||ed(n,n[i],i,t))&&(delete n[i],r=!0)}}return X.isArray(e)?e.forEach(i):i(e),r}clear(e){let t=Object.keys(this),n=t.length,r=!1;for(;n--;){let i=t[n];(!e||ed(this,this[i],i,e,!0))&&(delete this[i],r=!0)}return r}normalize(e){let t=this,n={};return X.forEach(this,(r,i)=>{let a=X.findKey(n,i);if(a){t[a]=Zu(r),delete t[i];return}let o=e?td(i):String(i).trim();o!==i&&delete t[i],t[o]=Zu(r),n[o]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){let t=Object.create(null);return X.forEach(this,(n,r)=>{n!=null&&n!==!1&&(t[r]=e&&X.isArray(n)?n.join(`, `):n)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+`: `+t).join(` `)}getSetCookie(){return this.get(`set-cookie`)||[]}get[Symbol.toStringTag](){return`AxiosHeaders`}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){let n=new this(e);return t.forEach(e=>n.set(e)),n}static accessor(e){let t=(this[Yu]=this[Yu]={accessors:{}}).accessors,n=this.prototype;function r(e){let r=Xu(e);t[r]||(nd(n,e),t[r]=!0)}return X.isArray(e)?e.forEach(r):r(e),this}};rd.accessor([`Content-Type`,`Content-Length`,`Accept`,`Accept-Encoding`,`User-Agent`,`Authorization`]),X.reduceDescriptors(rd.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[n]=e}}}),X.freezeMethods(rd);var id=`[REDACTED ****]`;function ad(e){if(X.hasOwnProp(e,`toJSON`))return!0;let t=Object.getPrototypeOf(e);for(;t&&t!==Object.prototype;){if(X.hasOwnProp(t,`toJSON`))return!0;t=Object.getPrototypeOf(t)}return!1}function od(e,t){let n=new Set(t.map(e=>String(e).toLowerCase())),r=[],i=e=>{if(typeof e!=`object`||!e||X.isBuffer(e))return e;if(r.indexOf(e)!==-1)return;e instanceof rd&&(e=e.toJSON()),r.push(e);let t;if(X.isArray(e))t=[],e.forEach((e,n)=>{let r=i(e);X.isUndefined(r)||(t[n]=r)});else{if(!X.isPlainObject(e)&&ad(e))return r.pop(),e;t=Object.create(null);for(let[r,a]of Object.entries(e)){let e=n.has(r.toLowerCase())?id:i(a);X.isUndefined(e)||(t[r]=e)}}return r.pop(),t};return i(e)}var Z=class e extends Error{static from(t,n,r,i,a,o){let s=new e(t.message,n||t.code,r,i,a);return s.cause=t,s.name=t.name,t.status!=null&&s.status==null&&(s.status=t.status),o&&Object.assign(s,o),s}constructor(e,t,n,r,i){super(e),Object.defineProperty(this,"message",{__proto__:null,value:e,enumerable:!0,writable:!0,configurable:!0}),this.name=`AxiosError`,this.isAxiosError=!0,t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i,this.status=i.status)}toJSON(){let e=this.config,t=e&&X.hasOwnProp(e,`redact`)?e.redact:void 0,n=X.isArray(t)&&t.length>0?od(e,t):X.toJSONObject(e);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:n,code:this.code,status:this.status}}};Z.ERR_BAD_OPTION_VALUE=`ERR_BAD_OPTION_VALUE`,Z.ERR_BAD_OPTION=`ERR_BAD_OPTION`,Z.ECONNABORTED=`ECONNABORTED`,Z.ETIMEDOUT=`ETIMEDOUT`,Z.ECONNREFUSED=`ECONNREFUSED`,Z.ERR_NETWORK=`ERR_NETWORK`,Z.ERR_FR_TOO_MANY_REDIRECTS=`ERR_FR_TOO_MANY_REDIRECTS`,Z.ERR_DEPRECATED=`ERR_DEPRECATED`,Z.ERR_BAD_RESPONSE=`ERR_BAD_RESPONSE`,Z.ERR_BAD_REQUEST=`ERR_BAD_REQUEST`,Z.ERR_CANCELED=`ERR_CANCELED`,Z.ERR_NOT_SUPPORT=`ERR_NOT_SUPPORT`,Z.ERR_INVALID_URL=`ERR_INVALID_URL`,Z.ERR_FORM_DATA_DEPTH_EXCEEDED=`ERR_FORM_DATA_DEPTH_EXCEEDED`;function sd(e){return X.isPlainObject(e)||X.isArray(e)}function cd(e){return X.endsWith(e,`[]`)?e.slice(0,-2):e}function ld(e,t,n){return e?e.concat(t).map(function(e,t){return e=cd(e),!n&&t?`[`+e+`]`:e}).join(n?`.`:``):t}function ud(e){return X.isArray(e)&&!e.some(sd)}var dd=X.toFlatObject(X,{},null,function(e){return/^is[A-Z]/.test(e)});function fd(e,t,n){if(!X.isObject(e))throw TypeError(`target must be an object`);t||=new FormData,n=X.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(e,t){return!X.isUndefined(t[e])});let r=n.metaTokens,i=n.visitor||d,a=n.dots,o=n.indexes,s=n.Blob||typeof Blob<`u`&&Blob,c=n.maxDepth===void 0?100:n.maxDepth,l=s&&X.isSpecCompliantForm(t);if(!X.isFunction(i))throw TypeError(`visitor must be a function`);function u(e){if(e===null)return``;if(X.isDate(e))return e.toISOString();if(X.isBoolean(e))return e.toString();if(!l&&X.isBlob(e))throw new Z(`Blob is not supported. Use a Buffer instead.`);return X.isArrayBuffer(e)||X.isTypedArray(e)?l&&typeof Blob==`function`?new Blob([e]):Buffer.from(e):e}function d(e,n,i){let s=e;if(X.isReactNative(t)&&X.isReactNativeBlob(e))return t.append(ld(i,n,a),u(e)),!1;if(e&&!i&&typeof e==`object`){if(X.endsWith(n,`{}`))n=r?n:n.slice(0,-2),e=JSON.stringify(e);else if(X.isArray(e)&&ud(e)||(X.isFileList(e)||X.endsWith(n,`[]`))&&(s=X.toArray(e)))return n=cd(n),s.forEach(function(e,r){!(X.isUndefined(e)||e===null)&&t.append(o===!0?ld([n],r,a):o===null?n:n+`[]`,u(e))}),!1}return sd(e)?!0:(t.append(ld(i,n,a),u(e)),!1)}let f=[],p=Object.assign(dd,{defaultVisitor:d,convertValue:u,isVisitable:sd});function m(e,n,r=0){if(!X.isUndefined(e)){if(r>c)throw new Z(`Object is too deeply nested (`+r+` levels). Max depth: `+c,Z.ERR_FORM_DATA_DEPTH_EXCEEDED);if(f.indexOf(e)!==-1)throw Error(`Circular reference detected in `+n.join(`.`));f.push(e),X.forEach(e,function(e,a){(!(X.isUndefined(e)||e===null)&&i.call(t,e,X.isString(a)?a.trim():a,n,p))===!0&&m(e,n?n.concat(a):[a],r+1)}),f.pop()}}if(!X.isObject(e))throw TypeError(`data must be an object`);return m(e),t}function pd(e){let t={"!":`%21`,"'":`%27`,"(":`%28`,")":`%29`,"~":`%7E`,"%20":`+`};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(e){return t[e]})}function md(e,t){this._pairs=[],e&&fd(e,this,t)}var hd=md.prototype;hd.append=function(e,t){this._pairs.push([e,t])},hd.toString=function(e){let t=e?function(t){return e.call(this,t,pd)}:pd;return this._pairs.map(function(e){return t(e[0])+`=`+t(e[1])},``).join(`&`)};function gd(e){return encodeURIComponent(e).replace(/%3A/gi,`:`).replace(/%24/g,`$`).replace(/%2C/gi,`,`).replace(/%20/g,`+`)}function _d(e,t,n){if(!t)return e;let r=n&&n.encode||gd,i=X.isFunction(n)?{serialize:n}:n,a=i&&i.serialize,o;if(o=a?a(t,i):X.isURLSearchParams(t)?t.toString():new md(t,i).toString(r),o){let t=e.indexOf(`#`);t!==-1&&(e=e.slice(0,t)),e+=(e.indexOf(`?`)===-1?`?`:`&`)+o}return e}var vd=class{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&=[]}forEach(e){X.forEach(this.handlers,function(t){t!==null&&e(t)})}},yd={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0},bd={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<`u`?URLSearchParams:md,FormData:typeof FormData<`u`?FormData:null,Blob:typeof Blob<`u`?Blob:null},protocols:[`http`,`https`,`file`,`blob`,`url`,`data`]},xd=n({hasBrowserEnv:()=>Sd,hasStandardBrowserEnv:()=>wd,hasStandardBrowserWebWorkerEnv:()=>Td,navigator:()=>Cd,origin:()=>Ed}),Sd=typeof window<`u`&&typeof document<`u`,Cd=typeof navigator==`object`&&navigator||void 0,wd=Sd&&(!Cd||[`ReactNative`,`NativeScript`,`NS`].indexOf(Cd.product)<0),Td=typeof WorkerGlobalScope<`u`&&self instanceof WorkerGlobalScope&&typeof self.importScripts==`function`,Ed=Sd&&window.location.href||`http://localhost`,Dd={...xd,...bd};function Od(e,t){return fd(e,new Dd.classes.URLSearchParams,{visitor:function(e,t,n,r){return Dd.isNode&&X.isBuffer(e)?(this.append(t,e.toString(`base64`)),!1):r.defaultVisitor.apply(this,arguments)},...t})}function kd(e){return X.matchAll(/\w+|\[(\w*)]/g,e).map(e=>e[0]===`[]`?``:e[1]||e[0])}function Ad(e){let t={},n=Object.keys(e),r,i=n.length,a;for(r=0;r=e.length;return a=!a&&X.isArray(r)?r.length:a,s?(X.hasOwnProp(r,a)?r[a]=X.isArray(r[a])?r[a].concat(n):[r[a],n]:r[a]=n,!o):((!X.hasOwnProp(r,a)||!X.isObject(r[a]))&&(r[a]=[]),t(e,n,r[a],i)&&X.isArray(r[a])&&(r[a]=Ad(r[a])),!o)}if(X.isFormData(e)&&X.isFunction(e.entries)){let n={};return X.forEachEntry(e,(e,r)=>{t(kd(e),r,n,0)}),n}return null}var Md=(e,t)=>e!=null&&X.hasOwnProp(e,t)?e[t]:void 0;function Nd(e,t,n){if(X.isString(e))try{return(t||JSON.parse)(e),X.trim(e)}catch(e){if(e.name!==`SyntaxError`)throw e}return(n||JSON.stringify)(e)}var Pd={transitional:yd,adapter:[`xhr`,`http`,`fetch`],transformRequest:[function(e,t){let n=t.getContentType()||``,r=n.indexOf(`application/json`)>-1,i=X.isObject(e);if(i&&X.isHTMLForm(e)&&(e=new FormData(e)),X.isFormData(e))return r?JSON.stringify(jd(e)):e;if(X.isArrayBuffer(e)||X.isBuffer(e)||X.isStream(e)||X.isFile(e)||X.isBlob(e)||X.isReadableStream(e))return e;if(X.isArrayBufferView(e))return e.buffer;if(X.isURLSearchParams(e))return t.setContentType(`application/x-www-form-urlencoded;charset=utf-8`,!1),e.toString();let a;if(i){let t=Md(this,`formSerializer`);if(n.indexOf(`application/x-www-form-urlencoded`)>-1)return Od(e,t).toString();if((a=X.isFileList(e))||n.indexOf(`multipart/form-data`)>-1){let n=Md(this,`env`),r=n&&n.FormData;return fd(a?{"files[]":e}:e,r&&new r,t)}}return i||r?(t.setContentType(`application/json`,!1),Nd(e)):e}],transformResponse:[function(e){let t=Md(this,`transitional`)||Pd.transitional,n=t&&t.forcedJSONParsing,r=Md(this,`responseType`),i=r===`json`;if(X.isResponse(e)||X.isReadableStream(e))return e;if(e&&X.isString(e)&&(n&&!r||i)){let n=!(t&&t.silentJSONParsing)&&i;try{return JSON.parse(e,Md(this,`parseReviver`))}catch(e){if(n)throw e.name===`SyntaxError`?Z.from(e,Z.ERR_BAD_RESPONSE,this,null,Md(this,`response`)):e}}return e}],timeout:0,xsrfCookieName:`XSRF-TOKEN`,xsrfHeaderName:`X-XSRF-TOKEN`,maxContentLength:-1,maxBodyLength:-1,env:{FormData:Dd.classes.FormData,Blob:Dd.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:`application/json, text/plain, */*`,"Content-Type":void 0}}};X.forEach([`delete`,`get`,`head`,`post`,`put`,`patch`,`query`],e=>{Pd.headers[e]={}});function Fd(e,t){let n=this||Pd,r=t||n,i=rd.from(r.headers),a=r.data;return X.forEach(e,function(e){a=e.call(n,a,i.normalize(),t?t.status:void 0)}),i.normalize(),a}function Id(e){return!!(e&&e.__CANCEL__)}var Ld=class extends Z{constructor(e,t,n){super(e??`canceled`,Z.ERR_CANCELED,t,n),this.name=`CanceledError`,this.__CANCEL__=!0}};function Rd(e,t,n){let r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new Z(`Request failed with status code `+n.status,n.status>=400&&n.status<500?Z.ERR_BAD_REQUEST:Z.ERR_BAD_RESPONSE,n.config,n.request,n))}function zd(e){let t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(e);return t&&t[1]||``}function Bd(e,t){e||=10;let n=Array(e),r=Array(e),i=0,a=0,o;return t=t===void 0?1e3:t,function(s){let c=Date.now(),l=r[a];o||=c,n[i]=s,r[i]=c;let u=a,d=0;for(;u!==i;)d+=n[u++],u%=e;if(i=(i+1)%e,i===a&&(a=(a+1)%e),c-o{n=r,i=null,a&&=(clearTimeout(a),null),e(...t)};return[(...e)=>{let t=Date.now(),s=t-n;s>=r?o(e,t):(i=e,a||=setTimeout(()=>{a=null,o(i)},r-s))},()=>i&&o(i)]}var Hd=(e,t,n=3)=>{let r=0,i=Bd(50,250);return Vd(n=>{if(!n||typeof n.loaded!=`number`)return;let a=n.loaded,o=n.lengthComputable?n.total:void 0,s=o==null?a:Math.min(a,o),c=Math.max(0,s-r),l=i(c);r=Math.max(r,s),e({loaded:s,total:o,progress:o?s/o:void 0,bytes:c,rate:l||void 0,estimated:l&&o?(o-s)/l:void 0,event:n,lengthComputable:o!=null,[t?`download`:`upload`]:!0})},n)},Ud=(e,t)=>{let n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},Wd=e=>(...t)=>X.asap(()=>e(...t)),Gd=Dd.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,Dd.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(Dd.origin),Dd.navigator&&/(msie|trident)/i.test(Dd.navigator.userAgent)):()=>!0,Kd=Dd.hasStandardBrowserEnv?{write(e,t,n,r,i,a,o){if(typeof document>`u`)return;let s=[`${e}=${encodeURIComponent(t)}`];X.isNumber(n)&&s.push(`expires=${new Date(n).toUTCString()}`),X.isString(r)&&s.push(`path=${r}`),X.isString(i)&&s.push(`domain=${i}`),a===!0&&s.push(`secure`),X.isString(o)&&s.push(`SameSite=${o}`),document.cookie=s.join(`; `)},read(e){if(typeof document>`u`)return null;let t=document.cookie.split(`;`);for(let n=0;ne instanceof rd?{...e}:e;function Zd(e,t){t||={};let n=Object.create(null);Object.defineProperty(n,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function r(e,t,n,r){return X.isPlainObject(e)&&X.isPlainObject(t)?X.merge.call({caseless:r},e,t):X.isPlainObject(t)?X.merge({},t):X.isArray(t)?t.slice():t}function i(e,t,n,i){if(!X.isUndefined(t))return r(e,t,n,i);if(!X.isUndefined(e))return r(void 0,e,n,i)}function a(e,t){if(!X.isUndefined(t))return r(void 0,t)}function o(e,t){if(!X.isUndefined(t))return r(void 0,t);if(!X.isUndefined(e))return r(void 0,e)}function s(n,i,a){if(X.hasOwnProp(t,a))return r(n,i);if(X.hasOwnProp(e,a))return r(void 0,n)}let c={url:a,method:a,data:a,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,allowedSocketPaths:o,responseEncoding:o,validateStatus:s,headers:(e,t,n)=>i(Xd(e),Xd(t),n,!0)};return X.forEach(Object.keys({...e,...t}),function(r){if(r===`__proto__`||r===`constructor`||r===`prototype`)return;let a=X.hasOwnProp(c,r)?c[r]:i,o=a(X.hasOwnProp(e,r)?e[r]:void 0,X.hasOwnProp(t,r)?t[r]:void 0,r);X.isUndefined(o)&&a!==s||(n[r]=o)}),n}var Qd=[`content-type`,`content-length`];function $d(e,t,n){if(n!==`content-only`){e.set(t);return}Object.entries(t).forEach(([t,n])=>{Qd.includes(t.toLowerCase())&&e.set(t,n)})}var ef=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(e,t)=>String.fromCharCode(parseInt(t,16))),tf=e=>{let t=Zd({},e),n=e=>X.hasOwnProp(t,e)?t[e]:void 0,r=n(`data`),i=n(`withXSRFToken`),a=n(`xsrfHeaderName`),o=n(`xsrfCookieName`),s=n(`headers`),c=n(`auth`),l=n(`baseURL`),u=n(`allowAbsoluteUrls`),d=n(`url`);if(t.headers=s=rd.from(s),t.url=_d(Yd(l,d,u),e.params,e.paramsSerializer),c&&s.set(`Authorization`,`Basic `+btoa((c.username||``)+`:`+(c.password?ef(c.password):``))),X.isFormData(r)&&(Dd.hasStandardBrowserEnv||Dd.hasStandardBrowserWebWorkerEnv?s.setContentType(void 0):X.isFunction(r.getHeaders)&&$d(s,r.getHeaders(),n(`formDataHeaderPolicy`))),Dd.hasStandardBrowserEnv&&(X.isFunction(i)&&(i=i(t)),i===!0||i==null&&Gd(t.url))){let e=a&&o&&Kd.read(o);e&&s.set(a,e)}return t},nf=typeof XMLHttpRequest<`u`&&function(e){return new Promise(function(t,n){let r=tf(e),i=r.data,a=rd.from(r.headers).normalize(),{responseType:o,onUploadProgress:s,onDownloadProgress:c}=r,l,u,d,f,p;function m(){f&&f(),p&&p(),r.cancelToken&&r.cancelToken.unsubscribe(l),r.signal&&r.signal.removeEventListener(`abort`,l)}let h=new XMLHttpRequest;h.open(r.method.toUpperCase(),r.url,!0),h.timeout=r.timeout;function g(){if(!h)return;let r=rd.from(`getAllResponseHeaders`in h&&h.getAllResponseHeaders());Rd(function(e){t(e),m()},function(e){n(e),m()},{data:!o||o===`text`||o===`json`?h.responseText:h.response,status:h.status,statusText:h.statusText,headers:r,config:e,request:h}),h=null}`onloadend`in h?h.onloadend=g:h.onreadystatechange=function(){!h||h.readyState!==4||h.status===0&&!(h.responseURL&&h.responseURL.startsWith(`file:`))||setTimeout(g)},h.onabort=function(){h&&=(n(new Z(`Request aborted`,Z.ECONNABORTED,e,h)),m(),null)},h.onerror=function(t){let r=new Z(t&&t.message?t.message:`Network Error`,Z.ERR_NETWORK,e,h);r.event=t||null,n(r),m(),h=null},h.ontimeout=function(){let t=r.timeout?`timeout of `+r.timeout+`ms exceeded`:`timeout exceeded`,i=r.transitional||yd;r.timeoutErrorMessage&&(t=r.timeoutErrorMessage),n(new Z(t,i.clarifyTimeoutError?Z.ETIMEDOUT:Z.ECONNABORTED,e,h)),m(),h=null},i===void 0&&a.setContentType(null),`setRequestHeader`in h&&X.forEach(Ju(a),function(e,t){h.setRequestHeader(t,e)}),X.isUndefined(r.withCredentials)||(h.withCredentials=!!r.withCredentials),o&&o!==`json`&&(h.responseType=r.responseType),c&&([d,p]=Hd(c,!0),h.addEventListener(`progress`,d)),s&&h.upload&&([u,f]=Hd(s),h.upload.addEventListener(`progress`,u),h.upload.addEventListener(`loadend`,f)),(r.cancelToken||r.signal)&&(l=t=>{h&&=(n(!t||t.type?new Ld(null,e,h):t),h.abort(),m(),null)},r.cancelToken&&r.cancelToken.subscribe(l),r.signal&&(r.signal.aborted?l():r.signal.addEventListener(`abort`,l)));let _=zd(r.url);if(_&&!Dd.protocols.includes(_)){n(new Z(`Unsupported protocol `+_+`:`,Z.ERR_BAD_REQUEST,e));return}h.send(i||null)})},rf=(e,t)=>{if(e=e?e.filter(Boolean):[],!t&&!e.length)return;let n=new AbortController,r=!1,i=function(e){if(!r){r=!0,o();let t=e instanceof Error?e:this.reason;n.abort(t instanceof Z?t:new Ld(t instanceof Error?t.message:t))}},a=t&&setTimeout(()=>{a=null,i(new Z(`timeout of ${t}ms exceeded`,Z.ETIMEDOUT))},t),o=()=>{e&&=(a&&clearTimeout(a),a=null,e.forEach(e=>{e.unsubscribe?e.unsubscribe(i):e.removeEventListener(`abort`,i)}),null)};e.forEach(e=>e.addEventListener(`abort`,i));let{signal:s}=n;return s.unsubscribe=()=>X.asap(o),s},af=function*(e,t){let n=e.byteLength;if(!t||n{let i=of(e,t),a=0,o,s=e=>{o||(o=!0,r&&r(e))};return new ReadableStream({async pull(e){try{let{done:t,value:r}=await i.next();if(t){s(),e.close();return}let o=r.byteLength;n&&n(a+=o),e.enqueue(new Uint8Array(r))}catch(e){throw s(e),e}},cancel(e){return s(e),i.return()}},{highWaterMark:2})};function lf(e){if(!e||typeof e!=`string`||!e.startsWith(`data:`))return 0;let t=e.indexOf(`,`);if(t<0)return 0;let n=e.slice(5,t),r=e.slice(t+1);if(/;base64/i.test(n)){let e=r.length,t=r.length;for(let n=0;n=48&&t<=57||t>=65&&t<=70||t>=97&&t<=102)&&(i>=48&&i<=57||i>=65&&i<=70||i>=97&&i<=102)&&(e-=2,n+=2)}let n=0,i=t-1,a=e=>e>=2&&r.charCodeAt(e-2)===37&&r.charCodeAt(e-1)===51&&(r.charCodeAt(e)===68||r.charCodeAt(e)===100);i>=0&&(r.charCodeAt(i)===61?(n++,i--):a(i)&&(n++,i-=3)),n===1&&i>=0&&(r.charCodeAt(i)===61||a(i))&&n++;let o=Math.floor(e/4)*3-(n||0);return o>0?o:0}if(typeof Buffer<`u`&&typeof Buffer.byteLength==`function`)return Buffer.byteLength(r,`utf8`);let i=0;for(let e=0,t=r.length;e=55296&&n<=56319&&e+1=56320&&t<=57343?(i+=4,e++):i+=3}else i+=3}return i}var uf=`1.16.1`,df=64*1024,{isFunction:ff}=X,pf=(e,...t)=>{try{return!!e(...t)}catch{return!1}},mf=e=>{let t=X.global!==void 0&&X.global!==null?X.global:globalThis,{ReadableStream:n,TextEncoder:r}=t;e=X.merge.call({skipUndefined:!0},{Request:t.Request,Response:t.Response},e);let{fetch:i,Request:a,Response:o}=e,s=i?ff(i):typeof fetch==`function`,c=ff(a),l=ff(o);if(!s)return!1;let u=s&&ff(n),d=s&&(typeof r==`function`?(e=>t=>e.encode(t))(new r):async e=>new Uint8Array(await new a(e).arrayBuffer())),f=c&&u&&pf(()=>{let e=!1,t=new a(Dd.origin,{body:new n,method:`POST`,get duplex(){return e=!0,`half`}}),r=t.headers.has(`Content-Type`);return t.body!=null&&t.body.cancel(),e&&!r}),p=l&&u&&pf(()=>X.isReadableStream(new o(``).body)),m={stream:p&&(e=>e.body)};s&&[`text`,`arrayBuffer`,`blob`,`formData`,`stream`].forEach(e=>{!m[e]&&(m[e]=(t,n)=>{let r=t&&t[e];if(r)return r.call(t);throw new Z(`Response type '${e}' is not supported`,Z.ERR_NOT_SUPPORT,n)})});let h=async e=>{if(e==null)return 0;if(X.isBlob(e))return e.size;if(X.isSpecCompliantForm(e))return(await new a(Dd.origin,{method:`POST`,body:e}).arrayBuffer()).byteLength;if(X.isArrayBufferView(e)||X.isArrayBuffer(e))return e.byteLength;if(X.isURLSearchParams(e)&&(e+=``),X.isString(e))return(await d(e)).byteLength},g=async(e,t)=>X.toFiniteNumber(e.getContentLength())??h(t);return async e=>{let{url:t,method:n,data:s,signal:l,cancelToken:u,timeout:d,onDownloadProgress:h,onUploadProgress:_,responseType:v,headers:y,withCredentials:b=`same-origin`,fetchOptions:x,maxContentLength:S,maxBodyLength:C}=tf(e),w=X.isNumber(S)&&S>-1,ee=X.isNumber(C)&&C>-1,te=i||fetch;v=v?(v+``).toLowerCase():`text`;let T=rf([l,u&&u.toAbortSignal()],d),E=null,D=T&&T.unsubscribe&&(()=>{T.unsubscribe()}),ne;try{if(w&&typeof t==`string`&&t.startsWith(`data:`)&&lf(t)>S)throw new Z(`maxContentLength size of `+S+` exceeded`,Z.ERR_BAD_RESPONSE,e,E);if(ee&&n!==`get`&&n!==`head`){let t=await g(y,s);if(typeof t==`number`&&isFinite(t)&&t>C)throw new Z(`Request body larger than maxBodyLength limit`,Z.ERR_BAD_REQUEST,e,E)}if(_&&f&&n!==`get`&&n!==`head`&&(ne=await g(y,s))!==0){let e=new a(t,{method:`POST`,body:s,duplex:`half`}),n;if(X.isFormData(s)&&(n=e.headers.get(`content-type`))&&y.setContentType(n),e.body){let[t,n]=Ud(ne,Hd(Wd(_)));s=cf(e.body,df,t,n)}}X.isString(b)||(b=b?`include`:`omit`);let i=c&&`credentials`in a.prototype;if(X.isFormData(s)){let e=y.getContentType();e&&/^multipart\/form-data/i.test(e)&&!/boundary=/i.test(e)&&y.delete(`content-type`)}y.set(`User-Agent`,`axios/`+uf,!1);let l={...x,signal:T,method:n.toUpperCase(),headers:Ju(y.normalize()),body:s,duplex:`half`,credentials:i?b:void 0};E=c&&new a(t,l);let u=await(c?te(E,x):te(t,l));if(w){let t=X.toFiniteNumber(u.headers.get(`content-length`));if(t!=null&&t>S)throw new Z(`maxContentLength size of `+S+` exceeded`,Z.ERR_BAD_RESPONSE,e,E)}let d=p&&(v===`stream`||v===`response`);if(p&&u.body&&(h||w||d&&D)){let t={};[`status`,`statusText`,`headers`].forEach(e=>{t[e]=u[e]});let n=X.toFiniteNumber(u.headers.get(`content-length`)),[r,i]=h&&Ud(n,Hd(Wd(h),!0))||[],a=0;u=new o(cf(u.body,df,t=>{if(w&&(a=t,a>S))throw new Z(`maxContentLength size of `+S+` exceeded`,Z.ERR_BAD_RESPONSE,e,E);r&&r(t)},()=>{i&&i(),D&&D()}),t)}v||=`text`;let O=await m[X.findKey(m,v)||`text`](u,e);if(w&&!p&&!d){let t;if(O!=null&&(typeof O.byteLength==`number`?t=O.byteLength:typeof O.size==`number`?t=O.size:typeof O==`string`&&(t=typeof r==`function`?new r().encode(O).byteLength:O.length)),typeof t==`number`&&t>S)throw new Z(`maxContentLength size of `+S+` exceeded`,Z.ERR_BAD_RESPONSE,e,E)}return!d&&D&&D(),await new Promise((t,n)=>{Rd(t,n,{data:O,headers:rd.from(u.headers),status:u.status,statusText:u.statusText,config:e,request:E})})}catch(t){if(D&&D(),T&&T.aborted&&T.reason instanceof Z){let n=T.reason;throw n.config=e,E&&(n.request=E),t!==n&&(n.cause=t),n}throw t&&t.name===`TypeError`&&/Load failed|fetch/i.test(t.message)?Object.assign(new Z(`Network Error`,Z.ERR_NETWORK,e,E,t&&t.response),{cause:t.cause||t}):Z.from(t,t&&t.code,e,E,t&&t.response)}}},hf=new Map,gf=e=>{let t=e&&e.env||{},{fetch:n,Request:r,Response:i}=t,a=[r,i,n],o=a.length,s,c,l=hf;for(;o--;)s=a[o],c=l.get(s),c===void 0&&l.set(s,c=o?new Map:mf(t)),l=c;return c};gf();var _f={http:null,xhr:nf,fetch:{get:gf}};X.forEach(_f,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{__proto__:null,value:t})}catch{}Object.defineProperty(e,"adapterName",{__proto__:null,value:t})}});var vf=e=>`- ${e}`,yf=e=>X.isFunction(e)||e===null||e===!1;function bf(e,t){e=X.isArray(e)?e:[e];let{length:n}=e,r,i,a={};for(let o=0;o`adapter ${e} `+(t===!1?`is not supported by the environment`:`is not available in the build`));throw new Z(`There is no suitable adapter to dispatch the request `+(n?e.length>1?`since : `+e.map(vf).join(` `):` `+vf(e[0]):`as no adapter specified`),`ERR_NOT_SUPPORT`)}return i}var xf={getAdapter:bf,adapters:_f};function Sf(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Ld(null,e)}function Cf(e){return Sf(e),e.headers=rd.from(e.headers),e.data=Fd.call(e,e.transformRequest),[`post`,`put`,`patch`].indexOf(e.method)!==-1&&e.headers.setContentType(`application/x-www-form-urlencoded`,!1),xf.getAdapter(e.adapter||Pd.adapter,e)(e).then(function(t){Sf(e),e.response=t;try{t.data=Fd.call(e,e.transformResponse,t)}finally{delete e.response}return t.headers=rd.from(t.headers),t},function(t){if(!Id(t)&&(Sf(e),t&&t.response)){e.response=t.response;try{t.response.data=Fd.call(e,e.transformResponse,t.response)}finally{delete e.response}t.response.headers=rd.from(t.response.headers)}return Promise.reject(t)})}var wf={};[`object`,`boolean`,`number`,`function`,`string`,`symbol`].forEach((e,t)=>{wf[e]=function(n){return typeof n===e||`a`+(t<1?`n `:` `)+e}});var Tf={};wf.transitional=function(e,t,n){function r(e,t){return`[Axios v`+uf+`] Transitional option '`+e+`'`+t+(n?`. `+n:``)}return(n,i,a)=>{if(e===!1)throw new Z(r(i,` has been removed`+(t?` in `+t:``)),Z.ERR_DEPRECATED);return t&&!Tf[i]&&(Tf[i]=!0,console.warn(r(i,` has been deprecated since v`+t+` and will be removed in the near future`))),e?e(n,i,a):!0}},wf.spelling=function(e){return(t,n)=>(console.warn(`${n} is likely a misspelling of ${e}`),!0)};function Ef(e,t,n){if(typeof e!=`object`)throw new Z(`options must be an object`,Z.ERR_BAD_OPTION_VALUE);let r=Object.keys(e),i=r.length;for(;i-- >0;){let a=r[i],o=Object.prototype.hasOwnProperty.call(t,a)?t[a]:void 0;if(o){let t=e[a],n=t===void 0||o(t,a,e);if(n!==!0)throw new Z(`option `+a+` must be `+n,Z.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new Z(`Unknown option `+a,Z.ERR_BAD_OPTION)}}var Df={assertOptions:Ef,validators:wf},Of=Df.validators,kf=class{constructor(e){this.defaults=e||{},this.interceptors={request:new vd,response:new vd}}async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error){let t={};Error.captureStackTrace?Error.captureStackTrace(t):t=Error();let n=(()=>{if(!t.stack)return``;let e=t.stack.indexOf(` `);return e===-1?``:t.stack.slice(e+1)})();try{if(!e.stack)e.stack=n;else if(n){let t=n.indexOf(` `),r=t===-1?-1:n.indexOf(` `,t+1),i=r===-1?``:n.slice(r+1);String(e.stack).endsWith(i)||(e.stack+=` `+n)}}catch{}}throw e}}_request(e,t){typeof e==`string`?(t||={},t.url=e):t=e||{},t=Zd(this.defaults,t);let{transitional:n,paramsSerializer:r,headers:i}=t;n!==void 0&&Df.assertOptions(n,{silentJSONParsing:Of.transitional(Of.boolean),forcedJSONParsing:Of.transitional(Of.boolean),clarifyTimeoutError:Of.transitional(Of.boolean),legacyInterceptorReqResOrdering:Of.transitional(Of.boolean)},!1),r!=null&&(X.isFunction(r)?t.paramsSerializer={serialize:r}:Df.assertOptions(r,{encode:Of.function,serialize:Of.function},!0)),t.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls===void 0?t.allowAbsoluteUrls=!0:t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls),Df.assertOptions(t,{baseUrl:Of.spelling(`baseURL`),withXsrfToken:Of.spelling(`withXSRFToken`)},!0),t.method=(t.method||this.defaults.method||`get`).toLowerCase();let a=i&&X.merge(i.common,i[t.method]);i&&X.forEach([`delete`,`get`,`head`,`post`,`put`,`patch`,`query`,`common`],e=>{delete i[e]}),t.headers=rd.concat(a,i);let o=[],s=!0;this.interceptors.request.forEach(function(e){if(typeof e.runWhen==`function`&&e.runWhen(t)===!1)return;s&&=e.synchronous;let n=t.transitional||yd;n&&n.legacyInterceptorReqResOrdering?o.unshift(e.fulfilled,e.rejected):o.push(e.fulfilled,e.rejected)});let c=[];this.interceptors.response.forEach(function(e){c.push(e.fulfilled,e.rejected)});let l,u=0,d;if(!s){let e=[Cf.bind(this),void 0];for(e.unshift(...o),e.push(...c),d=e.length,l=Promise.resolve(t);u{if(!n._listeners)return;let t=n._listeners.length;for(;t-- >0;)n._listeners[t](e);n._listeners=null}),this.promise.then=e=>{let t,r=new Promise(e=>{n.subscribe(e),t=e}).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e(function(e,r,i){n.reason||(n.reason=new Ld(e,r,i),t(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;let t=this._listeners.indexOf(e);t!==-1&&this._listeners.splice(t,1)}toAbortSignal(){let e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let t;return{token:new e(function(e){t=e}),cancel:t}}};function jf(e){return function(t){return e.apply(null,t)}}function Mf(e){return X.isObject(e)&&e.isAxiosError===!0}var Nf={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Nf).forEach(([e,t])=>{Nf[t]=e});function Pf(e){let t=new kf(e),n=kl(kf.prototype.request,t);return X.extend(n,kf.prototype,t,{allOwnKeys:!0}),X.extend(n,t,null,{allOwnKeys:!0}),n.create=function(t){return Pf(Zd(e,t))},n}var Q=Pf(Pd);Q.Axios=kf,Q.CanceledError=Ld,Q.CancelToken=Af,Q.isCancel=Id,Q.VERSION=uf,Q.toFormData=fd,Q.AxiosError=Z,Q.Cancel=Q.CanceledError,Q.all=function(e){return Promise.all(e)},Q.spread=jf,Q.isAxiosError=Mf,Q.mergeConfig=Zd,Q.AxiosHeaders=rd,Q.formToJSON=e=>jd(X.isHTMLForm(e)?new FormData(e):e),Q.getAdapter=xf.getAdapter,Q.HttpStatusCode=Nf,Q.default=Q;var $=Q.create({baseURL:`http://localhost:3000/api`,withCredentials:!0,headers:{"Content-Type":`application/json`}});$.interceptors.response.use(e=>e,async e=>{let t=e.config;if(e.response?.status===401&&!t._retry){t._retry=!0;try{return await Q.post(`${$.defaults.baseURL}/auth/refresh`,{},{withCredentials:!0}),$(t)}catch{return Promise.reject(e)}}return Promise.reject(e)});var Ff=Ts(`auth`,()=>{let e=F(null),t=F(!1),n=G(()=>!!e.value),r=G(()=>e.value?.role===`admin`),i=G(()=>e.value?.role===`artist`),a=G(()=>new Set(e.value?.likedTracks||[]));async function o(){try{let{data:t}=await $.get(`/auth/me`);t.success&&(e.value=t.data.user)}catch{e.value=null}}async function s(n,r){t.value=!0;try{let{data:t}=await $.post(`/auth/login`,{identifier:n,password:r});return t.success&&(e.value=t.data.user),{success:!0}}catch(e){return{success:!1,message:e.response?.data?.message||`Login failed`}}finally{t.value=!1}}async function c(n){t.value=!0;try{let{data:t}=await $.post(`/auth/register`,n);return t.success&&(e.value=t.data.user),{success:!0}}catch(e){return{success:!1,message:e.response?.data?.message||`Registration failed`}}finally{t.value=!1}}async function l(){try{await $.post(`/auth/logout`)}finally{e.value=null}}async function u(n){t.value=!0;try{let{data:t}=await $.put(`/auth/profile`,n,{headers:{"Content-Type":`multipart/form-data`}});return t.success&&(e.value=t.data),{success:!0}}catch(e){return{success:!1,message:e.response?.data?.message||`Update failed`}}finally{t.value=!1}}async function d(t){let n=a.value.has(t);try{n?(await $.delete(`/tracks/${t}/like`),e.value&&(e.value.likedTracks=e.value.likedTracks.filter(e=>e!==t))):(await $.post(`/tracks/${t}/like`),e.value&&e.value.likedTracks.push(t))}catch{}}return{user:e,loading:t,isLoggedIn:n,isAdmin:r,isArtist:i,likedTrackIds:a,checkSession:o,login:s,register:c,logout:l,updateProfile:u,toggleLike:d}}),If=n({useUiStore:()=>Lf}),Lf=Ts(`ui`,()=>{let e=F([]),t=0;function n(n,r=`info`){let i=++t;e.value.push({id:i,message:n,type:r}),setTimeout(()=>{e.value=e.value.filter(e=>e.id!==i)},3e3)}function r(t){e.value=e.value.filter(e=>e.id!==t)}return{toasts:e,showToast:n,dismissToast:r}}),Rf=t((e=>{(function(){var t=function(){this.init()};t.prototype={init:function(){var e=this||n;return e._counter=1e3,e._html5AudioPool=[],e.html5PoolSize=10,e._codecs={},e._howls=[],e._muted=!1,e._volume=1,e._canPlayEvent=`canplaythrough`,e._navigator=typeof window<`u`&&window.navigator?window.navigator:null,e.masterGain=null,e.noAudio=!1,e.usingWebAudio=!0,e.autoSuspend=!0,e.ctx=null,e.autoUnlock=!0,e._setup(),e},volume:function(e){var t=this||n;if(e=parseFloat(e),t.ctx||u(),e!==void 0&&e>=0&&e<=1){if(t._volume=e,t._muted)return t;t.usingWebAudio&&t.masterGain.gain.setValueAtTime(e,n.ctx.currentTime);for(var r=0;r=0;t--)e._howls[t].unload();return e.usingWebAudio&&e.ctx&&e.ctx.close!==void 0&&(e.ctx.close(),e.ctx=null,u()),e},codecs:function(e){return(this||n)._codecs[e.replace(/^x-/,``)]},_setup:function(){var e=this||n;if(e.state=e.ctx&&e.ctx.state||`suspended`,e._autoSuspend(),!e.usingWebAudio)if(typeof Audio<`u`)try{var t=new Audio;t.oncanplaythrough===void 0&&(e._canPlayEvent=`canplay`)}catch{e.noAudio=!0}else e.noAudio=!0;try{var t=new Audio;t.muted&&(e.noAudio=!0)}catch{}return e.noAudio||e._setupCodecs(),e},_setupCodecs:function(){var e=this||n,t=null;try{t=typeof Audio<`u`?new Audio:null}catch{return e}if(!t||typeof t.canPlayType!=`function`)return e;var r=t.canPlayType(`audio/mpeg;`).replace(/^no$/,``),i=e._navigator?e._navigator.userAgent:``,a=i.match(/OPR\/(\d+)/g),o=a&&parseInt(a[0].split(`/`)[1],10)<33,s=i.indexOf(`Safari`)!==-1&&i.indexOf(`Chrome`)===-1,c=i.match(/Version\/(.*?) /),l=s&&c&&parseInt(c[1],10)<15;return e._codecs={mp3:!!(!o&&(r||t.canPlayType(`audio/mp3;`).replace(/^no$/,``))),mpeg:!!r,opus:!!t.canPlayType(`audio/ogg; codecs="opus"`).replace(/^no$/,``),ogg:!!t.canPlayType(`audio/ogg; codecs="vorbis"`).replace(/^no$/,``),oga:!!t.canPlayType(`audio/ogg; codecs="vorbis"`).replace(/^no$/,``),wav:!!(t.canPlayType(`audio/wav; codecs="1"`)||t.canPlayType(`audio/wav`)).replace(/^no$/,``),aac:!!t.canPlayType(`audio/aac;`).replace(/^no$/,``),caf:!!t.canPlayType(`audio/x-caf;`).replace(/^no$/,``),m4a:!!(t.canPlayType(`audio/x-m4a;`)||t.canPlayType(`audio/m4a;`)||t.canPlayType(`audio/aac;`)).replace(/^no$/,``),m4b:!!(t.canPlayType(`audio/x-m4b;`)||t.canPlayType(`audio/m4b;`)||t.canPlayType(`audio/aac;`)).replace(/^no$/,``),mp4:!!(t.canPlayType(`audio/x-mp4;`)||t.canPlayType(`audio/mp4;`)||t.canPlayType(`audio/aac;`)).replace(/^no$/,``),weba:!!(!l&&t.canPlayType(`audio/webm; codecs="vorbis"`).replace(/^no$/,``)),webm:!!(!l&&t.canPlayType(`audio/webm; codecs="vorbis"`).replace(/^no$/,``)),dolby:!!t.canPlayType(`audio/mp4; codecs="ec-3"`).replace(/^no$/,``),flac:!!(t.canPlayType(`audio/x-flac;`)||t.canPlayType(`audio/flac;`)).replace(/^no$/,``)},e},_unlockAudio:function(){var e=this||n;if(!(e._audioUnlocked||!e.ctx)){e._audioUnlocked=!1,e.autoUnlock=!1,!e._mobileUnloaded&&e.ctx.sampleRate!==44100&&(e._mobileUnloaded=!0,e.unload()),e._scratchBuffer=e.ctx.createBuffer(1,1,22050);var t=function(n){for(;e._html5AudioPool.length0?s._seek:r._sprite[e][0]/1e3),u=Math.max(0,(r._sprite[e][0]+r._sprite[e][1])/1e3-l),d=u*1e3/Math.abs(s._rate),f=r._sprite[e][0]/1e3,p=(r._sprite[e][0]+r._sprite[e][1])/1e3;s._sprite=e,s._ended=!1;var m=function(){s._paused=!1,s._seek=l,s._start=f,s._stop=p,s._loop=!!(s._loop||r._sprite[e][2])};if(l>=p){r._ended(s);return}var h=s._node;if(r._webAudio){var g=function(){r._playLock=!1,m(),r._refreshBuffer(s);var e=s._muted||r._muted?0:s._volume;h.gain.setValueAtTime(e,n.ctx.currentTime),s._playStart=n.ctx.currentTime,h.bufferSource.start===void 0?s._loop?h.bufferSource.noteGrainOn(0,l,86400):h.bufferSource.noteGrainOn(0,l,u):s._loop?h.bufferSource.start(0,l,86400):h.bufferSource.start(0,l,u),d!==1/0&&(r._endTimers[s._id]=setTimeout(r._ended.bind(r,s),d)),t||setTimeout(function(){r._emit(`play`,s._id),r._loadQueue()},0)};n.state===`running`&&n.ctx.state!==`interrupted`?g():(r._playLock=!0,r.once(`resume`,g),r._clearTimer(s._id))}else{var _=function(){h.currentTime=l,h.muted=s._muted||r._muted||n._muted||h.muted,h.volume=s._volume*n.volume(),h.playbackRate=s._rate;try{var i=h.play();if(i&&typeof Promise<`u`&&(i instanceof Promise||typeof i.then==`function`)?(r._playLock=!0,m(),i.then(function(){r._playLock=!1,h._unlocked=!0,t?r._loadQueue():r._emit(`play`,s._id)}).catch(function(){r._playLock=!1,r._emit(`playerror`,s._id,`Playback was unable to start. This is most commonly an issue on mobile devices and Chrome where playback was not within a user interaction.`),s._ended=!0,s._paused=!0})):t||(r._playLock=!1,m(),r._emit(`play`,s._id)),h.playbackRate=s._rate,h.paused){r._emit(`playerror`,s._id,`Playback was unable to start. This is most commonly an issue on mobile devices and Chrome where playback was not within a user interaction.`);return}e!==`__default`||s._loop?r._endTimers[s._id]=setTimeout(r._ended.bind(r,s),d):(r._endTimers[s._id]=function(){r._ended(s),h.removeEventListener(`ended`,r._endTimers[s._id],!1)},h.addEventListener(`ended`,r._endTimers[s._id],!1))}catch(e){r._emit(`playerror`,s._id,e)}};h.src===`data:audio/wav;base64,UklGRigAAABXQVZFZm10IBIAAAABAAEARKwAAIhYAQACABAAAABkYXRhAgAAAAEA`&&(h.src=r._src,h.load());var v=window&&window.ejecta||!h.readyState&&n._navigator.isCocoonJS;if(h.readyState>=3||v)_();else{r._playLock=!0,r._state=`loading`;var y=function(){r._state=`loaded`,_(),h.removeEventListener(n._canPlayEvent,y,!1)};h.addEventListener(n._canPlayEvent,y,!1),r._clearTimer(s._id)}}return s._id},pause:function(e){var t=this;if(t._state!==`loaded`||t._playLock)return t._queue.push({event:`pause`,action:function(){t.pause(e)}}),t;for(var n=t._getSoundIds(e),r=0;r=0?i=parseInt(t[0],10):r=parseFloat(t[0]):t.length>=2&&(r=parseFloat(t[0]),i=parseInt(t[1],10));var a;if(r!==void 0&&r>=0&&r<=1){if(e._state!==`loaded`||e._playLock)return e._queue.push({event:`volume`,action:function(){e.volume.apply(e,t)}}),e;i===void 0&&(e._volume=r),i=e._getSoundIds(i);for(var o=0;o0?r/l:r),d=Date.now();e._fadeTo=n,e._interval=setInterval(function(){var i=(Date.now()-d)/r;d=Date.now(),s+=c*i,s=Math.round(s*100)/100,s=c<0?Math.max(n,s):Math.min(n,s),o._webAudio?e._volume=s:o.volume(s,e._id,!0),a&&(o._volume=s),(nt&&s>=n)&&(clearInterval(e._interval),e._interval=null,e._fadeTo=null,o.volume(n,e._id),o._emit(`fade`,e._id))},u)},_stopFade:function(e){var t=this,r=t._soundById(e);return r&&r._interval&&(t._webAudio&&r._node.gain.cancelScheduledValues(n.ctx.currentTime),clearInterval(r._interval),r._interval=null,t.volume(r._fadeTo,e),r._fadeTo=null,t._emit(`fade`,e)),t},loop:function(){var e=this,t=arguments,n,r,i;if(t.length===0)return e._loop;if(t.length===1)if(typeof t[0]==`boolean`)n=t[0],e._loop=n;else return i=e._soundById(parseInt(t[0],10)),i?i._loop:!1;else t.length===2&&(n=t[0],r=parseInt(t[1],10));for(var a=e._getSoundIds(r),o=0;o=0?i=parseInt(t[0],10):r=parseFloat(t[0]):t.length===2&&(r=parseFloat(t[0]),i=parseInt(t[1],10));var a;if(typeof r==`number`){if(e._state!==`loaded`||e._playLock)return e._queue.push({event:`rate`,action:function(){e.rate.apply(e,t)}}),e;i===void 0&&(e._rate=r),i=e._getSoundIds(i);for(var o=0;o=0?i=parseInt(t[0],10):e._sounds.length&&(i=e._sounds[0]._id,r=parseFloat(t[0])):t.length===2&&(r=parseFloat(t[0]),i=parseInt(t[1],10)),i===void 0)return 0;if(typeof r==`number`&&(e._state!==`loaded`||e._playLock))return e._queue.push({event:`seek`,action:function(){e.seek.apply(e,t)}}),e;var a=e._soundById(i);if(a)if(typeof r==`number`&&r>=0){var o=e.playing(i);o&&e.pause(i,!0),a._seek=r,a._ended=!1,e._clearTimer(i),!e._webAudio&&a._node&&!isNaN(a._node.duration)&&(a._node.currentTime=r);var s=function(){o&&e.play(i,!0),e._emit(`seek`,i)};if(o&&!e._webAudio){var c=function(){e._playLock?setTimeout(c,0):s()};setTimeout(c,0)}else s()}else if(e._webAudio){var l=e.playing(i)?n.ctx.currentTime-a._playStart:0,u=a._rateSeek?a._rateSeek-a._seek:0;return a._seek+(u+l*Math.abs(a._rate))}else return a._node.currentTime;return e},playing:function(e){var t=this;if(typeof e==`number`){var n=t._soundById(e);return n?!n._paused:!1}for(var r=0;r=0&&n._howls.splice(i,1);var o=!0;for(r=0;r=0){o=!1;break}return a&&o&&delete a[e._src],n.noAudio=!1,e._state=`unloaded`,e._sounds=[],e=null,null},on:function(e,t,n,r){var i=this,a=i[`_on`+e];return typeof t==`function`&&a.push(r?{id:n,fn:t,once:r}:{id:n,fn:t}),i},off:function(e,t,n){var r=this,i=r[`_on`+e],a=0;if(typeof t==`number`&&(n=t,t=null),t||n)for(a=0;a=0;a--)(!i[a].id||i[a].id===t||e===`load`)&&(setTimeout(function(e){e.call(this,t,n)}.bind(r,i[a].fn),0),i[a].once&&r.off(e,i[a].fn,i[a].id));return r._loadQueue(e),r},_loadQueue:function(e){var t=this;if(t._queue.length>0){var n=t._queue[0];n.event===e&&(t._queue.shift(),t._loadQueue()),e||n.action()}return t},_ended:function(e){var t=this,r=e._sprite;if(!t._webAudio&&e._node&&!e._node.paused&&!e._node.ended&&e._node.currentTime=0;r--){if(n<=t)return;e._sounds[r]._ended&&(e._webAudio&&e._sounds[r]._node&&e._sounds[r]._node.disconnect(0),e._sounds.splice(r,1),n--)}}},_getSoundIds:function(e){var t=this;if(e===void 0){for(var n=[],r=0;r=0;if(!e.bufferSource)return t;if(n._scratchBuffer&&e.bufferSource&&(e.bufferSource.onended=null,e.bufferSource.disconnect(0),r))try{e.bufferSource.buffer=n._scratchBuffer}catch{}return e.bufferSource=null,t},_clearSound:function(e){/MSIE |Trident\//.test(n._navigator&&n._navigator.userAgent)||(e.src=`data:audio/wav;base64,UklGRigAAABXQVZFZm10IBIAAAABAAEARKwAAIhYAQACABAAAABkYXRhAgAAAAEA`)}};var i=function(e){this._parent=e,this.init()};i.prototype={init:function(){var e=this,t=e._parent;return e._muted=t._muted,e._loop=t._loop,e._volume=t._volume,e._rate=t._rate,e._seek=0,e._paused=!0,e._ended=!0,e._sprite=`__default`,e._id=++n._counter,t._sounds.push(e),e.create(),e},create:function(){var e=this,t=e._parent,r=n._muted||e._muted||e._parent._muted?0:e._volume;return t._webAudio?(e._node=n.ctx.createGain===void 0?n.ctx.createGainNode():n.ctx.createGain(),e._node.gain.setValueAtTime(r,n.ctx.currentTime),e._node.paused=!0,e._node.connect(n.masterGain)):n.noAudio||(e._node=n._obtainHtml5Audio(),e._errorFn=e._errorListener.bind(e),e._node.addEventListener(`error`,e._errorFn,!1),e._loadFn=e._loadListener.bind(e),e._node.addEventListener(n._canPlayEvent,e._loadFn,!1),e._endFn=e._endListener.bind(e),e._node.addEventListener(`ended`,e._endFn,!1),e._node.src=t._src,e._node.preload=t._preload===!0?`auto`:t._preload,e._node.volume=r*n.volume(),e._node.load()),e},reset:function(){var e=this,t=e._parent;return e._muted=t._muted,e._loop=t._loop,e._volume=t._volume,e._rate=t._rate,e._seek=0,e._rateSeek=0,e._paused=!0,e._ended=!0,e._sprite=`__default`,e._id=++n._counter,e},_errorListener:function(){var e=this;e._parent._emit(`loaderror`,e._id,e._node.error?e._node.error.code:0),e._node.removeEventListener(`error`,e._errorFn,!1)},_loadListener:function(){var e=this,t=e._parent;t._duration=Math.ceil(e._node.duration*10)/10,Object.keys(t._sprite).length===0&&(t._sprite={__default:[0,t._duration*1e3]}),t._state!==`loaded`&&(t._state=`loaded`,t._emit(`load`),t._loadQueue()),e._node.removeEventListener(n._canPlayEvent,e._loadFn,!1)},_endListener:function(){var e=this,t=e._parent;t._duration===1/0&&(t._duration=Math.ceil(e._node.duration*10)/10,t._sprite.__default[1]===1/0&&(t._sprite.__default[1]=t._duration*1e3),t._ended(e)),e._node.removeEventListener(`ended`,e._endFn,!1)}};var a={},o=function(e){var t=e._src;if(a[t]){e._duration=a[t].duration,l(e);return}if(/^data:[^;]+;base64,/.test(t)){for(var n=atob(t.split(`,`)[1]),r=new Uint8Array(n.length),i=0;i0?(a[t._src]=e,l(t,e)):r()};typeof Promise<`u`&&n.ctx.decodeAudioData.length===1?n.ctx.decodeAudioData(e).then(i).catch(r):n.ctx.decodeAudioData(e,i,r)},l=function(e,t){t&&!e._duration&&(e._duration=t.duration),Object.keys(e._sprite).length===0&&(e._sprite={__default:[0,e._duration*1e3]}),e._state!==`loaded`&&(e._state=`loaded`,e._emit(`load`),e._loadQueue())},u=function(){if(n.usingWebAudio){try{typeof AudioContext<`u`?n.ctx=new AudioContext:typeof webkitAudioContext<`u`?n.ctx=new webkitAudioContext:n.usingWebAudio=!1}catch{n.usingWebAudio=!1}n.ctx||(n.usingWebAudio=!1);var e=/iP(hone|od|ad)/.test(n._navigator&&n._navigator.platform),t=n._navigator&&n._navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/),r=t?parseInt(t[1],10):null;if(e&&r&&r<9){var i=/safari/.test(n._navigator&&n._navigator.userAgent.toLowerCase());n._navigator&&!i&&(n.usingWebAudio=!1)}n.usingWebAudio&&(n.masterGain=n.ctx.createGain===void 0?n.ctx.createGainNode():n.ctx.createGain(),n.masterGain.gain.setValueAtTime(n._muted?0:n._volume,n.ctx.currentTime),n.masterGain.connect(n.ctx.destination)),n._setup()}};typeof define==`function`&&define.amd&&define([],function(){return{Howler:n,Howl:r}}),e!==void 0&&(e.Howler=n,e.Howl=r),typeof global<`u`?(global.HowlerGlobal=t,global.Howler=n,global.Howl=r,global.Sound=i):typeof window<`u`&&(window.HowlerGlobal=t,window.Howler=n,window.Howl=r,window.Sound=i)})(),(function(){HowlerGlobal.prototype._pos=[0,0,0],HowlerGlobal.prototype._orientation=[0,0,-1,0,1,0],HowlerGlobal.prototype.stereo=function(e){var t=this;if(!t.ctx||!t.ctx.listener)return t;for(var n=t._howls.length-1;n>=0;n--)t._howls[n].stereo(e);return t},HowlerGlobal.prototype.pos=function(e,t,n){var r=this;if(!r.ctx||!r.ctx.listener)return r;if(t=typeof t==`number`?t:r._pos[1],n=typeof n==`number`?n:r._pos[2],typeof e==`number`)r._pos=[e,t,n],r.ctx.listener.positionX===void 0?r.ctx.listener.setPosition(r._pos[0],r._pos[1],r._pos[2]):(r.ctx.listener.positionX.setTargetAtTime(r._pos[0],Howler.ctx.currentTime,.1),r.ctx.listener.positionY.setTargetAtTime(r._pos[1],Howler.ctx.currentTime,.1),r.ctx.listener.positionZ.setTargetAtTime(r._pos[2],Howler.ctx.currentTime,.1));else return r._pos;return r},HowlerGlobal.prototype.orientation=function(e,t,n,r,i,a){var o=this;if(!o.ctx||!o.ctx.listener)return o;var s=o._orientation;if(t=typeof t==`number`?t:s[1],n=typeof n==`number`?n:s[2],r=typeof r==`number`?r:s[3],i=typeof i==`number`?i:s[4],a=typeof a==`number`?a:s[5],typeof e==`number`)o._orientation=[e,t,n,r,i,a],o.ctx.listener.forwardX===void 0?o.ctx.listener.setOrientation(e,t,n,r,i,a):(o.ctx.listener.forwardX.setTargetAtTime(e,Howler.ctx.currentTime,.1),o.ctx.listener.forwardY.setTargetAtTime(t,Howler.ctx.currentTime,.1),o.ctx.listener.forwardZ.setTargetAtTime(n,Howler.ctx.currentTime,.1),o.ctx.listener.upX.setTargetAtTime(r,Howler.ctx.currentTime,.1),o.ctx.listener.upY.setTargetAtTime(i,Howler.ctx.currentTime,.1),o.ctx.listener.upZ.setTargetAtTime(a,Howler.ctx.currentTime,.1));else return s;return o},Howl.prototype.init=(function(e){return function(t){var n=this;return n._orientation=t.orientation||[1,0,0],n._stereo=t.stereo||null,n._pos=t.pos||null,n._pannerAttr={coneInnerAngle:t.coneInnerAngle===void 0?360:t.coneInnerAngle,coneOuterAngle:t.coneOuterAngle===void 0?360:t.coneOuterAngle,coneOuterGain:t.coneOuterGain===void 0?0:t.coneOuterGain,distanceModel:t.distanceModel===void 0?`inverse`:t.distanceModel,maxDistance:t.maxDistance===void 0?1e4:t.maxDistance,panningModel:t.panningModel===void 0?`HRTF`:t.panningModel,refDistance:t.refDistance===void 0?1:t.refDistance,rolloffFactor:t.rolloffFactor===void 0?1:t.rolloffFactor},n._onstereo=t.onstereo?[{fn:t.onstereo}]:[],n._onpos=t.onpos?[{fn:t.onpos}]:[],n._onorientation=t.onorientation?[{fn:t.onorientation}]:[],e.call(this,t)}})(Howl.prototype.init),Howl.prototype.stereo=function(t,n){var r=this;if(!r._webAudio)return r;if(r._state!==`loaded`)return r._queue.push({event:`stereo`,action:function(){r.stereo(t,n)}}),r;var i=Howler.ctx.createStereoPanner===void 0?`spatial`:`stereo`;if(n===void 0)if(typeof t==`number`)r._stereo=t,r._pos=[t,0,0];else return r._stereo;for(var a=r._getSoundIds(n),o=0;oBf.play?.(),onpause:()=>Bf.pause?.(),onend:()=>Bf.end?.(),onloaderror:()=>Bf.error?.(),onplayerror:()=>Bf.error?.()})}function Uf(){zf?.play()}function Wf(){zf?.pause()}function Gf(){zf?.playing()?zf.pause():zf.play()}function Kf(e){zf&&zf.seek(e)}function qf(){return zf?zf.seek():0}function Jf(e){return e!==void 0&&Howler.volume(e/100),Howler.volume()*100}function Yf(){return zf?zf.duration():0}function Xf(){return zf?zf.playing():!1}function Zf(e,t){Bf[e]=t}function Qf(e){delete Bf[e]}function $f(){zf&&=(zf.unload(),null),Bf={}}var ep={load:Hf,play:Uf,pause:Wf,togglePlay:Gf,seek:Kf,getSeek:qf,volume:Jf,duration:Yf,playing:Xf,on:Zf,off:Qf,destroy:$f,formatTime:Vf},tp=`http://localhost:3000`;function np(e){return e?e.startsWith(`http`)?e:`${tp}${e}`:``}var rp=Ts(`player`,()=>{let e=F(null),t=F(!1),n=F(0),r=F(0),i=F(80),a=F(null),o=F(null),s=G(()=>ep.formatTime(n.value)),c=G(()=>ep.formatTime(r.value));function l(i){if(!i)return;e.value=i,n.value=0,r.value=0,t.value=!1,g();let a=np(i.audioUrl);ep.load(a),ep.on(`play`,()=>{t.value=!0}),ep.on(`pause`,()=>{t.value=!1}),ep.on(`end`,()=>{t.value=!1,g(),o.value&&o.value()}),ep.on(`error`,()=>{t.value=!1})}function u(e){o.value=e}function d(){e.value&&(ep.playing()?(ep.pause(),g()):(ep.play(),h()))}function f(){e.value&&(ep.play(),h())}function p(e){ep.seek(e),n.value=e}function m(e){i.value=e,ep.volume(e)}function h(){g(),a.value=setInterval(()=>{ep.playing()&&(n.value=ep.getSeek(),r.value=ep.duration())},500)}function g(){a.value&&=(clearInterval(a.value),null)}function _(){g(),ep.destroy(),e.value=null,t.value=!1,n.value=0,r.value=0,o.value=null}return{currentTrack:e,isPlaying:t,progress:n,duration:r,volume:i,formattedProgress:s,formattedDuration:c,setTrack:l,onEnd:u,togglePlay:d,play:f,seek:p,setVolume:m,$reset:_}}),ip=Ts(`queue`,()=>{let e=F([]),t=F(-1),n=F(!1),r=F(`off`),i=G(()=>t.value<0||t.value>=e.value.length?null:e.value[t.value]);function a(n,r=0){e.value=n,t.value=r}function o(){if(e.value.length===0)return null;if(r.value===`one`)return e.value[t.value];let i;if(i=n.value?Math.floor(Math.random()*e.value.length):t.value+1,i>=e.value.length)if(r.value===`all`)i=0;else return null;return t.value=i,e.value[i]}function s(){if(e.value.length===0)return null;if(r.value===`one`)return e.value[t.value];let i;if(i=n.value?Math.floor(Math.random()*e.value.length):t.value-1,i<0)if(r.value===`all`)i=e.value.length-1;else return null;return t.value=i,e.value[i]}function c(){n.value=!n.value}function l(){let e=[`off`,`all`,`one`];r.value=e[(e.indexOf(r.value)+1)%e.length]}function u(){e.value=[],t.value=-1,n.value=!1,r.value=`off`}return{queue:e,currentIndex:t,shuffle:n,repeat:r,currentTrack:i,setQueue:a,nextTrack:o,prevTrack:s,toggleShuffle:c,cycleRepeat:l,$reset:u}}),ap={class:`min-h-screen bg-noctune-cream flex items-center justify-center p-8`},op={class:`w-full max-w-5xl bg-noctune-teal rounded-3xl border-4 border-black overflow-hidden flex shadow-2xl`},sp={class:`w-1/2 p-12 relative`},cp={class:`absolute top-8 right-12 grid grid-cols-4 gap-1`},lp={class:`absolute top-20 right-8 grid grid-cols-4 gap-1`},up={class:`absolute bottom-12 left-12 grid grid-cols-3 gap-1`},dp={class:`w-1/2 bg-white rounded-3xl m-4 p-10`},fp={key:0,class:`text-red-500 text-sm mb-4 font-medium`},pp={class:`mb-6`},mp={class:`flex border-2 border-black rounded-lg overflow-hidden`},hp={class:`mb-4`},gp={class:`flex border-2 border-black rounded-lg overflow-hidden`},_p=[`type`],vp={key:0,class:`w-5 h-5`,fill:`none`,stroke:`currentColor`,viewBox:`0 0 24 24`},yp={key:1,class:`w-5 h-5`,fill:`none`,stroke:`currentColor`,viewBox:`0 0 24 24`},bp=[`disabled`],xp={key:0,class:`inline-block w-5 h-5 border-2 border-white border-t-transparent rounded-full animate-spin`},Sp={class:`text-center mt-8 text-gray-600`},Cp={__name:`LoginPage`,setup(e){let t=Dl(),n=Ff(),r=F(``),i=F(``),a=F(!1),o=F(!1),s=F(``);async function c(){s.value=``,o.value=!0;let e=await n.login(r.value,i.value);o.value=!1,e.success?t.push(`/home`):s.value=e.message}return(e,t)=>{let n=Tr(`router-link`);return z(),B(`div`,ap,[V(`div`,op,[V(`div`,sp,[V(`div`,cp,[(z(),B(R,null,L(16,e=>V(`span`,{key:e,class:`w-2 h-2 bg-black/40 rounded-full`})),64))]),V(`div`,lp,[(z(),B(R,null,L(12,e=>V(`span`,{key:e,class:`w-2 h-2 bg-black/40 rounded-full`})),64))]),t[3]||=V(`div`,{class:`absolute top-16 left-20 text-black/60 text-4xl font-bold`},`+`,-1),t[4]||=V(`div`,{class:`absolute bottom-24 right-20 text-black/60 text-4xl font-bold`},`+`,-1),V(`div`,up,[(z(),B(R,null,L(12,e=>V(`span`,{key:e,class:`w-2 h-2 bg-black/40 rounded-full`})),64))]),t[5]||=V(`div`,{class:`flex flex-col items-center justify-center h-full`},[V(`img`,{src:`/logo_transparent.png`,alt:`Noctune`,class:`w-48 h-48 object-contain`,loading:`lazy`})],-1)]),V(`div`,dp,[t[16]||=V(`h2`,{class:`text-4xl font-black text-black mb-2`},`WELCOME!`,-1),t[17]||=V(`p`,{class:`text-gray-600 mb-8`},`Login to continue`,-1),s.value?(z(),B(`p`,fp,A(s.value),1)):W(``,!0),V(`div`,pp,[t[7]||=V(`label`,{class:`block text-xs font-bold text-gray-600 mb-2 tracking-wider`},`EMAIL/USERNAME`,-1),V(`div`,mp,[t[6]||=V(`div`,{class:`bg-noctune-teal p-3 border-r-2 border-black`},[V(`svg`,{class:`w-6 h-6 text-black`,fill:`currentColor`,viewBox:`0 0 24 24`},[V(`path`,{d:`M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z`})])],-1),zn(V(`input`,{type:`text`,"onUpdate:modelValue":t[0]||=e=>r.value=e,onKeyup:Bo(c,[`enter`]),class:`flex-1 px-4 py-3 focus:outline-none text-black`,placeholder:`Enter your email`},null,544),[[K,r.value]])])]),V(`div`,hp,[t[11]||=V(`label`,{class:`block text-xs font-bold text-gray-600 mb-2 tracking-wider`},`PASSWORD`,-1),V(`div`,gp,[t[10]||=V(`div`,{class:`bg-amber-200 p-3 border-r-2 border-black`},[V(`svg`,{class:`w-6 h-6 text-black`,fill:`currentColor`,viewBox:`0 0 24 24`},[V(`path`,{d:`M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2zm-6 9c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2zm3.1-9H8.9V6c0-1.71 1.39-3.1 3.1-3.1 1.71 0 3.1 1.39 3.1 3.1v2z`})])],-1),zn(V(`input`,{type:a.value?`text`:`password`,"onUpdate:modelValue":t[1]||=e=>i.value=e,onKeyup:Bo(c,[`enter`]),class:`flex-1 px-4 py-3 focus:outline-none text-black`,placeholder:`Enter your password`},null,40,_p),[[No,i.value]]),V(`button`,{onClick:t[2]||=e=>a.value=!a.value,class:`px-4 text-gray-500 hover:text-gray-700`},[a.value?(z(),B(`svg`,yp,[...t[9]||=[V(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M15 12a3 3 0 11-6 0 3 3 0 016 0z`},null,-1),V(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z`},null,-1)]])):(z(),B(`svg`,vp,[...t[8]||=[V(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M13.875 18.825A10.05 10.05 0 0112 19c-4.478 0-8.268-2.943-9.543-7a9.97 9.97 0 011.563-3.029m5.858.908a3 3 0 114.243 4.243M9.878 9.878l4.242 4.242M9.88 9.88l-3.29-3.29m7.532 7.532l3.29 3.29M3 3l3.59 3.59m0 0A9.953 9.953 0 0112 5c4.478 0 8.268 2.943 9.543 7a10.025 10.025 0 01-4.132 5.411m0 0L21 21`},null,-1)]]))])])]),t[18]||=V(`div`,{class:`text-right mb-6`},[V(`a`,{href:`#`,class:`text-sm text-gray-600 hover:text-black`},`Forgot password?`)],-1),V(`button`,{onClick:c,disabled:o.value,class:`w-full bg-noctune-orange border-2 border-black rounded-lg py-4 font-bold text-white text-xl flex items-center justify-center gap-3 hover:bg-orange-600 transition-colors disabled:opacity-50`},[o.value?(z(),B(`span`,xp)):(z(),B(R,{key:1},[t[12]||=V(`div`,{class:`bg-white/20 rounded p-1`},[V(`svg`,{class:`w-5 h-5`,fill:`currentColor`,viewBox:`0 0 24 24`},[V(`path`,{d:`M12 4l-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z`})])],-1),t[13]||=U(` LOGIN `,-1)],64))],8,bp),t[19]||=aa(`
OR SIGN IN WITH
`,2),V(`p`,Sp,[t[15]||=U(` Don't have an account yet? `,-1),H(n,{to:`/register`,class:`text-noctune-orange font-bold hover:underline`},{default:Rn(()=>[...t[14]||=[U(`Register now`,-1)]]),_:1})])])])])}}},wp={class:`min-h-screen bg-noctune-cream flex items-center justify-center p-8`},Tp={class:`w-full max-w-5xl bg-noctune-teal rounded-3xl border-4 border-black overflow-hidden flex shadow-2xl`},Ep={class:`w-1/2 p-12 relative`},Dp={class:`absolute top-8 right-12 grid grid-cols-4 gap-1`},Op={class:`w-1/2 bg-white rounded-3xl m-4 p-10`},kp={key:0,class:`text-red-500 text-sm mb-4 font-medium`},Ap={class:`mb-4`},jp={class:`mb-4`},Mp={class:`mb-4`},Np={class:`mb-6`},Pp=[`disabled`],Fp={key:0,class:`inline-block w-5 h-5 border-2 border-white border-t-transparent rounded-full animate-spin`},Ip={key:1},Lp={class:`text-center mt-6 text-gray-600`},Rp={__name:`RegisterPage`,setup(e){let t=Dl(),n=Ff(),r=F(``),i=F(``),a=F(``),o=F(``),s=F(!1),c=F(``);async function l(){c.value=``,s.value=!0;let e=await n.register({name:r.value,username:i.value,email:a.value,password:o.value});s.value=!1,e.success?t.push(`/home`):c.value=e.message}return(e,t)=>{let n=Tr(`router-link`);return z(),B(`div`,wp,[V(`div`,Tp,[V(`div`,Ep,[V(`div`,Dp,[(z(),B(R,null,L(16,e=>V(`span`,{key:e,class:`w-2 h-2 bg-black/40 rounded-full`})),64))]),t[4]||=V(`div`,{class:`flex flex-col items-center justify-center h-full`},[V(`img`,{src:`/logo_transparent.png`,alt:`Noctune`,class:`w-48 h-48 object-contain`,loading:`lazy`})],-1)]),V(`div`,Op,[t[11]||=V(`h2`,{class:`text-4xl font-black text-black mb-2`},`JOIN US!`,-1),t[12]||=V(`p`,{class:`text-gray-600 mb-6`},`Create your account`,-1),c.value?(z(),B(`p`,kp,A(c.value),1)):W(``,!0),V(`div`,Ap,[t[5]||=V(`label`,{class:`block text-xs font-bold text-gray-600 mb-2 tracking-wider`},`NAME`,-1),zn(V(`input`,{type:`text`,"onUpdate:modelValue":t[0]||=e=>r.value=e,class:`w-full border-2 border-black rounded-lg px-4 py-3 focus:outline-none text-black`,placeholder:`Your name`},null,512),[[K,r.value]])]),V(`div`,jp,[t[6]||=V(`label`,{class:`block text-xs font-bold text-gray-600 mb-2 tracking-wider`},`USERNAME`,-1),zn(V(`input`,{type:`text`,"onUpdate:modelValue":t[1]||=e=>i.value=e,class:`w-full border-2 border-black rounded-lg px-4 py-3 focus:outline-none text-black`,placeholder:`Choose a username`},null,512),[[K,i.value]])]),V(`div`,Mp,[t[7]||=V(`label`,{class:`block text-xs font-bold text-gray-600 mb-2 tracking-wider`},`EMAIL`,-1),zn(V(`input`,{type:`email`,"onUpdate:modelValue":t[2]||=e=>a.value=e,class:`w-full border-2 border-black rounded-lg px-4 py-3 focus:outline-none text-black`,placeholder:`Enter your email`},null,512),[[K,a.value]])]),V(`div`,Np,[t[8]||=V(`label`,{class:`block text-xs font-bold text-gray-600 mb-2 tracking-wider`},`PASSWORD`,-1),zn(V(`input`,{type:`password`,"onUpdate:modelValue":t[3]||=e=>o.value=e,class:`w-full border-2 border-black rounded-lg px-4 py-3 focus:outline-none text-black`,placeholder:`Create a password`},null,512),[[K,o.value]])]),V(`button`,{onClick:l,disabled:s.value,class:`w-full bg-noctune-orange border-2 border-black rounded-lg py-4 font-bold text-white text-xl flex items-center justify-center gap-3 hover:bg-orange-600 transition-colors disabled:opacity-50`},[s.value?(z(),B(`span`,Fp)):(z(),B(`span`,Ip,`REGISTER`))],8,Pp),V(`p`,Lp,[t[10]||=U(` Already have an account? `,-1),H(n,{to:`/login`,class:`text-noctune-orange font-bold hover:underline`},{default:Rn(()=>[...t[9]||=[U(`Login`,-1)]]),_:1})])])])])}}},zp={class:`bg-white rounded-2xl border-4 border-black p-6 w-full max-w-md mx-4 shadow-[8px_8px_0px_0px_#000]`},Bp={class:`flex items-center justify-between mb-6`},Vp={key:0,class:`text-red-500 text-sm mb-4 font-medium`},Hp={class:`space-y-4`},Up=[`disabled`],Wp={key:0,class:`inline-block w-4 h-4 border-2 border-black border-t-transparent rounded-full animate-spin mr-2`},Gp={__name:`CreatePlaylistModal`,props:{show:Boolean},emits:[`close`,`created`],setup(e,{emit:t}){let n=t,r=F(``),i=F(``),a=F(null),o=F(!1),s=F(``);function c(e){a.value=e.target.files[0]||null}async function l(){if(s.value=``,!r.value?.trim()){s.value=`Playlist name is required`;return}o.value=!0;try{let e=new FormData;e.append(`name`,r.value.trim()),i.value?.trim()&&e.append(`description`,i.value.trim()),a.value&&e.append(`playlistCover`,a.value);let{data:t}=await $.post(`/playlists`,e,{headers:{"Content-Type":`multipart/form-data`}});t.success&&(n(`created`,t.data),r.value=``,i.value=``,a.value=null)}catch(e){s.value=e.response?.data?.message||`Failed to create playlist`}finally{o.value=!1}}return(t,n)=>e.show?(z(),B(`div`,{key:0,class:`fixed inset-0 z-50 flex items-center justify-center bg-black/50`,onClick:n[3]||=Ro(e=>t.$emit(`close`),[`self`])},[V(`div`,zp,[V(`div`,Bp,[n[4]||=V(`h2`,{class:`text-xl font-black text-black`},`CREATE PLAYLIST`,-1),V(`button`,{onClick:n[0]||=e=>t.$emit(`close`),class:`text-gray-500 hover:text-black text-2xl leading-none`},`×`)]),s.value?(z(),B(`p`,Vp,A(s.value),1)):W(``,!0),V(`div`,Hp,[V(`div`,null,[n[5]||=V(`label`,{class:`block text-xs font-bold text-gray-600 mb-1 tracking-wider`},`NAME`,-1),zn(V(`input`,{"onUpdate:modelValue":n[1]||=e=>r.value=e,type:`text`,placeholder:`My awesome playlist`,class:`w-full border-2 border-black rounded-lg px-4 py-2 focus:outline-none text-black`},null,512),[[K,r.value]])]),V(`div`,null,[n[6]||=V(`label`,{class:`block text-xs font-bold text-gray-600 mb-1 tracking-wider`},`DESCRIPTION`,-1),zn(V(`textarea`,{"onUpdate:modelValue":n[2]||=e=>i.value=e,placeholder:`Optional description`,rows:`2`,class:`w-full border-2 border-black rounded-lg px-4 py-2 focus:outline-none resize-none text-black`},null,512),[[K,i.value]])]),V(`div`,null,[n[7]||=V(`label`,{class:`block text-xs font-bold text-gray-600 mb-1 tracking-wider`},`COVER IMAGE`,-1),V(`input`,{type:`file`,accept:`image/*`,onChange:c,class:`w-full text-sm text-gray-600 file:mr-3 file:py-2 file:px-4 file:border-2 file:border-black file:rounded-lg file:font-bold file:text-sm file:bg-noctune-yellow file:cursor-pointer`},null,32)]),V(`button`,{onClick:l,disabled:o.value,class:`w-full bg-noctune-teal border-2 border-black rounded-lg py-3 font-bold text-black hover:bg-teal-600 transition-colors disabled:opacity-50 cursor-pointer`},[o.value?(z(),B(`span`,Wp)):W(``,!0),U(` `+A(o.value?`Creating...`:`CREATE PLAYLIST`),1)],8,Up)])])])):W(``,!0)}},Kp={class:`bg-white rounded-2xl border-4 border-black p-6 w-full max-w-md mx-4 shadow-[8px_8px_0px_0px_#000]`},qp={class:`flex items-center justify-between mb-4`},Jp={key:0,class:`text-red-500 text-sm mb-3 font-medium`},Yp={key:1,class:`space-y-3`},Xp={key:2,class:`text-center py-8`},Zp={key:3,class:`max-h-80 overflow-y-auto space-y-2`},Qp=[`onClick`],$p={class:`w-12 h-12 rounded-lg overflow-hidden bg-gray-300 border border-black flex-shrink-0`},em=[`src`],tm={key:1,class:`w-full h-full flex items-center justify-center bg-gradient-to-br from-noctune-teal/20 to-noctune-yellow/20`},nm={class:`flex-1 min-w-0`},rm={class:`font-bold text-sm text-black truncate`},im={class:`text-xs text-gray-500`},am={key:0,class:`w-5 h-5 animate-spin text-noctune-teal`,fill:`none`,viewBox:`0 0 24 24`},om={key:1,class:`w-5 h-5 text-gray-400`,fill:`currentColor`,viewBox:`0 0 24 24`},sm={__name:`AddToPlaylistModal`,props:{show:Boolean,trackId:{type:String,default:null}},emits:[`close`],setup(e,{emit:t}){let n=e,r=t,i=Ff(),a=Lf(),o=F([]),s=F(!1),c=F(null),l=F(``),u=F(!1);function d(){u.value=!0}function f(e){u.value=!1,o.value.unshift(e)}async function p(e){if(n.trackId){c.value=e._id,l.value=``;try{let{data:t}=await $.post(`/playlists/${e._id}/tracks`,{trackId:n.trackId});t.success&&(a.showToast(`Saved to "${e.name}"`,`success`),r(`close`))}catch(t){let n=t.response?.data?.message||``;n.includes(`already`)||n.includes(`duplicate`)?(a.showToast(`Already in "${e.name}"`,`info`),r(`close`)):l.value=n||`Failed to save track`}finally{c.value=null}}}async function m(){if(i.isLoggedIn){s.value=!0;try{let{data:e}=await $.get(`/playlists`);e.success&&(o.value=e.data)}catch{}finally{s.value=!1}}}return Kn(()=>n.show,e=>{e&&m()}),(t,n)=>e.show?(z(),B(`div`,{key:0,class:`fixed inset-0 z-50 flex items-center justify-center bg-black/50`,onClick:n[2]||=Ro(e=>t.$emit(`close`),[`self`])},[V(`div`,Kp,[V(`div`,qp,[n[3]||=V(`h2`,{class:`text-xl font-black text-black`},`SAVE TO PLAYLIST`,-1),V(`button`,{onClick:n[0]||=e=>t.$emit(`close`),class:`text-gray-500 hover:text-black text-2xl leading-none`},`×`)]),l.value?(z(),B(`p`,Jp,A(l.value),1)):W(``,!0),s.value?(z(),B(`div`,Yp,[(z(),B(R,null,L(3,e=>V(`div`,{key:e,class:`h-14 bg-gray-200 animate-pulse rounded-lg border-2 border-black`})),64))])):o.value.length===0?(z(),B(`div`,Xp,[n[4]||=V(`svg`,{class:`w-16 h-16 mx-auto text-gray-300 mb-3`,fill:`currentColor`,viewBox:`0 0 24 24`},[V(`path`,{d:`M3 10h11v2H3v-2zm0-4h11v2H3V6zm0 8h7v2H3v-2zm13-1v8l6-4-6-4z`})],-1),n[5]||=V(`p`,{class:`text-gray-500 mb-2`},`No playlists yet`,-1),V(`button`,{onClick:d,class:`bg-noctune-yellow border-2 border-black px-4 py-2 font-bold rounded-lg text-sm hover:bg-yellow-400 transition-colors cursor-pointer`},` CREATE PLAYLIST `)])):(z(),B(`div`,Zp,[(z(!0),B(R,null,L(o.value,e=>(z(),B(`div`,{key:e._id,onClick:t=>p(e),class:k([`flex items-center gap-3 px-4 py-3 rounded-lg border-2 border-black cursor-pointer hover:bg-noctune-teal/10 transition-colors`,c.value===e._id?`opacity-50 pointer-events-none`:``])},[V(`div`,$p,[e.coverUrl?(z(),B(`img`,{key:0,src:I(np)(e.coverUrl),class:`w-full h-full object-cover`,loading:`lazy`},null,8,em)):(z(),B(`div`,tm,[...n[6]||=[V(`svg`,{class:`w-6 h-5 text-gray-400`,fill:`currentColor`,viewBox:`0 0 24 24`},[V(`path`,{d:`M3 10h11v2H3v-2zm0-4h11v2H3V6zm0 8h7v2H3v-2zm13-1v8l6-4-6-4z`})],-1)]]))]),V(`div`,nm,[V(`p`,rm,A(e.name),1),V(`p`,im,A(e.tracks?.length||0)+` songs`,1)]),c.value===e._id?(z(),B(`svg`,am,[...n[7]||=[V(`circle`,{class:`opacity-25`,cx:`12`,cy:`12`,r:`10`,stroke:`currentColor`,"stroke-width":`4`},null,-1),V(`path`,{class:`opacity-75`,fill:`currentColor`,d:`M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z`},null,-1)]])):(z(),B(`svg`,om,[...n[8]||=[V(`path`,{d:`M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z`},null,-1)]]))],10,Qp))),128))]))]),H(Gp,{show:u.value,onClose:n[1]||=e=>u.value=!1,onCreated:f},null,8,[`show`])])):W(``,!0)}},cm={class:`p-8`},lm={key:0,class:`mb-10`},um={class:`grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-5 gap-3`},dm=[`onClick`],fm={class:`aspect-square bg-gray-300 relative overflow-hidden`},pm=[`src`],mm={class:`p-2`},hm={class:`text-xs font-bold text-black truncate`},gm={class:`text-[10px] text-gray-500 truncate`},_m={key:0,class:`grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-4`},vm={key:1,class:`text-center py-20 bg-white rounded-2xl border-2 border-black`},ym={key:2,class:`grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-4`},bm=[`onClick`],xm={class:`aspect-square bg-gray-300 relative overflow-hidden`},Sm=[`src`],Cm={class:`absolute inset-0 bg-black/0 group-hover:bg-black/20 transition-colors flex items-center justify-center`},wm={key:0,class:`w-6 h-6 text-black`,fill:`currentColor`,viewBox:`0 0 24 24`},Tm={key:1,class:`w-6 h-6 ml-1 text-black`,fill:`currentColor`,viewBox:`0 0 24 24`},Em={class:`p-3`},Dm={class:`flex items-center justify-between`},Om={class:`flex-1 min-w-0`},km={class:`text-sm font-bold text-black truncate`},Am={class:`text-xs text-gray-500 truncate`},jm=[`onClick`],Mm=[`onClick`],Nm=`noctune_recently_played`,Pm={__name:`LandingPage`,setup(e){let t=rp(),n=ip(),r=Ff(),{requireAuth:i}=T_(),a=F([]),o=F(!0),s=F(null),c=F(!1),l=F([]);function u(){try{let e=localStorage.getItem(Nm);return e?JSON.parse(e):[]}catch{return[]}}function d(e){try{localStorage.setItem(Nm,JSON.stringify(e))}catch{}}function f(e){let t=u();t=t.filter(t=>t!==e),t.unshift(e),t.length>10&&(t=t.slice(0,10)),d(t)}async function p(){let e=u();if(e.length)try{let{data:t}=await $.post(`/tracks/by-ids`,{ids:e});if(t.success){let n=new Map(t.data.map(e=>[e._id,e]));l.value=e.map(e=>n.get(e)).filter(Boolean)}}catch{}}function m(e){s.value=e,i({redirectTo:`/login`,onAuthenticated:()=>{c.value=!0}})}function h(e){return t.currentTrack?._id===e._id}function g(e){return r.likedTrackIds?.has(e._id)}function _(e,r=!1){if(h(e)){t.togglePlay();return}f(e._id);let i=r?l.value:a.value,o=i.findIndex(t=>t._id===e._id);n.setQueue(i,o),t.setTrack(e),t.play()}function v(){a.value.length&&(f(a.value[0]._id),_(a.value[0],!1))}function y(e){i({redirectTo:`/login`,onAuthenticated:()=>r.toggleLike(e._id)})}function b(e){e.target.style.display=`none`}return hr(async()=>{try{let{data:e}=await $.get(`/tracks`);e.success&&(a.value=e.data)}catch{}finally{o.value=!1}p()}),(e,n)=>{let r=Tr(`router-link`);return z(),B(`div`,cm,[V(`div`,{class:`flex items-start gap-8 mb-12`},[V(`div`,{class:`flex-1`},[n[2]||=V(`h1`,{class:`text-5xl font-black text-black leading-tight mb-2`},[U(`MUSIC`),V(`br`),U(`THAT HITS`)],-1),n[3]||=V(`div`,{class:`inline-block bg-noctune-orange px-4 py-2 mb-4 border-b-4 border-black`},[V(`span`,{class:`text-4xl font-black text-black`},`DIFFERENT.`)],-1),n[4]||=V(`p`,{class:`text-gray-600 mb-6`},`You Vibe. Your sound. Only on Noctune.`,-1),V(`div`,{class:`flex gap-4`},[V(`button`,{onClick:v,class:`bg-noctune-yellow border-2 border-black px-6 py-3 font-bold hover:bg-yellow-400 transition-colors rounded-lg`},`PLAY NOW`),n[1]||=V(`button`,{class:`bg-gray-200 border-2 border-black px-6 py-3 font-bold hover:bg-gray-300 transition-colors rounded-lg`},`EXPLORE`,-1)])]),n[5]||=V(`div`,{class:`w-80 h-80 rounded-2xl overflow-hidden border-4 border-black flex-shrink-0`},[V(`img`,{src:`https://images.unsplash.com/photo-1470225620780-dba8ba36b745?w=400&h=400&fit=crop`,alt:`Music illustration`,class:`w-full h-full object-cover`,loading:`lazy`})],-1)]),l.value.length?(z(),B(`section`,lm,[n[6]||=V(`h2`,{class:`text-2xl font-black text-black mb-6 flex items-center`},[U(` RECENTLY PLAYED `),V(`svg`,{class:`w-5 h-5 ml-2`,fill:`currentColor`,viewBox:`0 0 24 24`},[V(`path`,{d:`M12 3c-4.97 0-9 4.03-9 9s4.03 9 9 9 9-4.03 9-9-4.03-9-9-9zm0 16c-3.86 0-7-3.14-7-7s3.14-7 7-7 7 3.14 7 7-3.14 7-7 7zm2-11H11v6l5.25 3.15.75-1.23-4.5-2.67z`})])],-1),V(`div`,um,[(z(!0),B(R,null,L(l.value,e=>(z(),B(`div`,{key:e._id,onClick:t=>_(e,!0),class:`bg-white rounded-xl border-2 border-black overflow-hidden hover:scale-[1.02] transition-transform cursor-pointer group`},[V(`div`,fm,[e.coverUrl?(z(),B(`img`,{key:0,src:I(np)(e.coverUrl),class:`w-full h-full object-cover`,loading:`lazy`,onError:b},null,40,pm)):W(``,!0)]),V(`div`,mm,[V(`p`,hm,A(e.title),1),V(`p`,gm,A(e.artist),1)])],8,dm))),128))])])):W(``,!0),V(`section`,null,[n[16]||=V(`h2`,{class:`text-2xl font-black text-black mb-6 flex items-center`},[U(` TRENDING NOW `),V(`svg`,{class:`w-5 h-5 ml-2`,fill:`currentColor`,viewBox:`0 0 24 24`},[V(`path`,{d:`M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z`})])],-1),o.value?(z(),B(`div`,_m,[(z(),B(R,null,L(4,e=>V(`div`,{key:e,class:`animate-pulse rounded-2xl border-2 border-black overflow-hidden`},[...n[7]||=[V(`div`,{class:`aspect-square bg-gray-300`},null,-1),V(`div`,{class:`p-3 space-y-2`},[V(`div`,{class:`h-3 bg-gray-300 rounded w-3/4`}),V(`div`,{class:`h-2 bg-gray-300 rounded w-1/2`})],-1)]])),64))])):a.value.length===0?(z(),B(`div`,vm,[n[9]||=V(`svg`,{class:`w-24 h-24 mx-auto text-gray-300 mb-4`,fill:`currentColor`,viewBox:`0 0 24 24`},[V(`path`,{d:`M12 3v10.55c-.59-.34-1.27-.55-2-.55C7.79 13 6 14.79 6 17s1.79 4 4 4 4-1.79 4-4V7h4V3h-6z`})],-1),n[10]||=V(`p`,{class:`text-gray-500 mb-2 text-lg`},`No tracks yet`,-1),n[11]||=V(`p`,{class:`text-gray-400 text-sm mb-4`},`Be the first to upload music!`,-1),H(r,{to:`/admin/tracks`,class:`inline-block bg-noctune-orange border-2 border-black px-6 py-3 font-bold rounded-lg hover:bg-orange-500 transition-colors`},{default:Rn(()=>[...n[8]||=[U(`UPLOAD TRACK`,-1)]]),_:1})])):(z(),B(`div`,ym,[(z(!0),B(R,null,L(a.value,e=>(z(),B(`div`,{key:e._id,onClick:t=>_(e),class:k([`bg-white rounded-2xl overflow-hidden hover:scale-[1.02] transition-transform cursor-pointer group`,h(e)?`border-4 border-noctune-teal`:`border-2 border-black`])},[V(`div`,xm,[e.coverUrl?(z(),B(`img`,{key:0,src:I(np)(e.coverUrl),class:`w-full h-full object-cover`,loading:`lazy`,onError:b},null,40,Sm)):W(``,!0),V(`div`,Cm,[V(`div`,{class:k([`w-12 h-12 rounded-full flex items-center justify-center border-2 border-black opacity-0 group-hover:opacity-100 transition-opacity`,h(e)&&I(t).isPlaying?`bg-white`:`bg-noctune-yellow`])},[h(e)&&I(t).isPlaying?(z(),B(`svg`,wm,[...n[12]||=[V(`path`,{d:`M6 19h4V5H6v14zm8-14v14h4V5h-4z`},null,-1)]])):(z(),B(`svg`,Tm,[...n[13]||=[V(`path`,{d:`M8 5v14l11-7z`},null,-1)]]))],2)])]),V(`div`,Em,[V(`div`,Dm,[V(`div`,Om,[V(`p`,km,A(e.title),1),V(`p`,Am,A(e.artist),1)]),V(`button`,{onClick:Ro(t=>y(e),[`stop`]),class:`ml-2 flex-shrink-0`},[(z(),B(`svg`,{class:k([`w-5 h-5`,g(e)?`fill-red-400 text-red-400`:`text-gray-400 hover:text-red-400`]),fill:`none`,stroke:`currentColor`,viewBox:`0 0 24 24`},[...n[14]||=[V(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M4.318 6.318a4.5 4.5 0 000 6.364L12 20.364l7.682-7.682a4.5 4.5 0 00-6.364-6.364L12 7.636l-1.318-1.318a4.5 4.5 0 00-6.364 0z`},null,-1)]],2))],8,jm),V(`button`,{onClick:Ro(t=>m(e),[`stop`]),class:`ml-1 flex-shrink-0 text-gray-400 hover:text-noctune-teal transition-colors`},[...n[15]||=[V(`svg`,{class:`w-5 h-5`,fill:`currentColor`,viewBox:`0 0 24 24`},[V(`path`,{d:`M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z`})],-1)]],8,Mm)])])],10,bm))),128))]))]),H(sm,{show:c.value,"track-id":s.value?._id,onClose:n[0]||=e=>c.value=!1},null,8,[`show`,`track-id`])])}}},Fm={class:`p-8`},Im={class:`mb-12`},Lm={key:0,class:`text-center py-12 text-gray-500`},Rm={key:1,class:`text-center py-12`},zm={key:2,class:`text-center py-12`},Bm={key:3,class:`grid grid-cols-4 gap-6`},Vm=[`onClick`],Hm={class:`aspect-square bg-gray-300 relative overflow-hidden`},Um=[`src`],Wm={key:0,class:`w-5 h-5 text-black`,fill:`currentColor`,viewBox:`0 0 24 24`},Gm={key:1,class:`w-5 h-5 ml-0.5 text-black`,fill:`currentColor`,viewBox:`0 0 24 24`},Km={class:`p-3`},qm={class:`flex items-center justify-between`},Jm={class:`flex-1 min-w-0`},Ym={class:`text-sm font-bold text-black truncate`},Xm={class:`text-xs text-gray-500 truncate`},Zm=[`onClick`],Qm={key:0,class:`space-y-3 p-4`},$m={key:1,class:`bg-white rounded-2xl border-4 border-black overflow-hidden`},eh={class:`divide-y divide-gray-200`},th=[`onClick`],nh={class:`flex-1 flex items-center gap-3`},rh={class:`text-sm text-gray-400 w-6`},ih={key:0,class:`w-4 h-4 text-noctune-teal inline`,fill:`currentColor`,viewBox:`0 0 24 24`},ah={key:1},oh={class:`w-10 h-10 rounded-lg flex-shrink-0 overflow-hidden bg-gray-300 border border-black`},sh=[`src`],ch={class:`w-40 text-center text-gray-600 text-sm truncate`},lh={class:`w-32 text-center text-gray-600 text-sm truncate`},uh=[`onClick`],dh=[`onClick`],fh={__name:`LibraryPage`,setup(e){let t=rp(),n=ip(),r=Ff(),{requireAuth:i}=T_(),a=F([]),o=F([]),s=F(!0),c=F(!0),l=F(null),u=F(!1);function d(e){l.value=e,i({redirectTo:`/login`,onAuthenticated:()=>{u.value=!0}})}function f(e){return t.currentTrack?._id===e._id}function p(e){return r.likedTrackIds?.has(e._id)}function m(e,r=!1,i){if(f(e)){t.togglePlay();return}let s=r?a.value:o.value,c=i??s.findIndex(t=>t._id===e._id);n.setQueue(s,c),t.setTrack(e),t.play()}function h(e){e.target.style.display=`none`}function g(e){let t=p(e);i({redirectTo:`/login`,onAuthenticated:async()=>{await r.toggleLike(e._id),t&&(a.value=a.value.filter(t=>t._id!==e._id))}})}return hr(async()=>{if(r.isLoggedIn)try{let{data:e}=await $.get(`/tracks/liked`);e.success&&(a.value=e.data||[])}catch{}s.value=!1;try{let{data:e}=await $.get(`/tracks`);e.success&&(o.value=e.data)}catch{}finally{c.value=!1}}),(e,n)=>{let i=Tr(`router-link`);return z(),B(`div`,Fm,[V(`section`,Im,[n[8]||=V(`h2`,{class:`text-3xl font-black text-black mb-6`},`Liked Tracks`,-1),s.value?(z(),B(`div`,Lm,`Loading...`)):I(r).isLoggedIn?a.value.length===0?(z(),B(`div`,zm,[n[4]||=V(`p`,{class:`text-gray-500 mb-4`},`No liked tracks yet`,-1),H(i,{to:`/home`,class:`bg-noctune-yellow border-2 border-black px-6 py-3 font-bold inline-block hover:bg-yellow-400 transition-colors rounded-lg`},{default:Rn(()=>[...n[3]||=[U(`Discover Music`,-1)]]),_:1})])):(z(),B(`div`,Bm,[(z(!0),B(R,null,L(a.value,e=>(z(),B(`div`,{key:e._id,onClick:t=>m(e,!0),class:`group cursor-pointer bg-white rounded-2xl border-2 border-black overflow-hidden hover:scale-[1.02] transition-transform`},[V(`div`,Hm,[e.coverUrl?(z(),B(`img`,{key:0,src:I(np)(e.coverUrl),class:`w-full h-full object-cover`,loading:`lazy`,onError:h},null,40,Um)):W(``,!0),V(`div`,{class:k([`absolute bottom-2 right-2 w-10 h-10 rounded-full flex items-center justify-center border-2 border-black opacity-0 group-hover:opacity-100 transition-opacity`,f(e)&&I(t).isPlaying?`bg-white`:`bg-noctune-yellow`])},[f(e)&&I(t).isPlaying?(z(),B(`svg`,Wm,[...n[5]||=[V(`path`,{d:`M6 19h4V5H6v14zm8-14v14h4V5h-4z`},null,-1)]])):(z(),B(`svg`,Gm,[...n[6]||=[V(`path`,{d:`M8 5v14l11-7z`},null,-1)]]))],2)]),V(`div`,Km,[V(`div`,qm,[V(`div`,Jm,[V(`p`,Ym,A(e.title),1),V(`p`,Xm,A(e.artist),1)]),V(`button`,{onClick:Ro(t=>d(e),[`stop`]),class:`ml-2 flex-shrink-0 text-gray-400 hover:text-noctune-teal transition-colors`},[...n[7]||=[V(`svg`,{class:`w-4 h-4`,fill:`currentColor`,viewBox:`0 0 24 24`},[V(`path`,{d:`M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z`})],-1)]],8,Zm)])])],8,Vm))),128))])):(z(),B(`div`,Rm,[n[2]||=V(`p`,{class:`text-gray-500 mb-4`},`Login to see your liked tracks`,-1),H(i,{to:`/login`,class:`bg-noctune-yellow border-2 border-black px-6 py-3 font-bold inline-block hover:bg-yellow-400 transition-colors rounded-lg`},{default:Rn(()=>[...n[1]||=[U(`Login`,-1)]]),_:1})]))]),V(`section`,null,[n[14]||=V(`h2`,{class:`text-2xl font-black text-black mb-6 flex items-center`},[U(` All Tracks `),V(`svg`,{class:`w-5 h-5 ml-2`,fill:`currentColor`,viewBox:`0 0 24 24`},[V(`path`,{d:`M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z`})])],-1),c.value?(z(),B(`div`,Qm,[(z(),B(R,null,L(5,e=>V(`div`,{key:e,class:`flex items-center gap-4 animate-pulse`},[...n[9]||=[aa(`
`,5)]])),64))])):(z(),B(`div`,$m,[n[13]||=aa(`
TITLEARTISTALBUM
`,1),V(`div`,eh,[(z(!0),B(R,null,L(o.value,(e,r)=>(z(),B(`div`,{key:e._id,onClick:t=>m(e,!1,r),class:k([`px-6 py-3 flex items-center hover:bg-gray-50 transition-colors cursor-pointer`,f(e)?`bg-noctune-teal/10`:``])},[V(`div`,nh,[V(`span`,rh,[f(e)&&I(t).isPlaying?(z(),B(`svg`,ih,[...n[10]||=[V(`path`,{d:`M6 19h4V5H6v14zm8-14v14h4V5h-4z`},null,-1)]])):(z(),B(`span`,ah,A(r+1),1))]),V(`div`,oh,[e.coverUrl?(z(),B(`img`,{key:0,src:I(np)(e.coverUrl),class:`w-full h-full object-cover`,loading:`lazy`,onError:h},null,40,sh)):W(``,!0)]),V(`span`,{class:k([`font-medium text-sm truncate`,f(e)?`text-noctune-teal`:`text-black`])},A(e.title),3)]),V(`span`,ch,A(e.artist),1),V(`span`,lh,A(e.album),1),V(`button`,{onClick:Ro(t=>g(e),[`stop`]),class:`w-10 flex justify-center transition-colors`},[(z(),B(`svg`,{class:k([`w-5 h-5`,p(e)?`fill-red-400 text-red-400`:`text-gray-400 hover:text-red-400`]),fill:`none`,stroke:`currentColor`,viewBox:`0 0 24 24`},[...n[11]||=[V(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M4.318 6.318a4.5 4.5 0 000 6.364L12 20.364l7.682-7.682a4.5 4.5 0 00-6.364-6.364L12 7.636l-1.318-1.318a4.5 4.5 0 00-6.364 0z`},null,-1)]],2))],8,uh),V(`button`,{onClick:Ro(t=>d(e),[`stop`]),class:`w-8 flex justify-center transition-colors text-gray-400 hover:text-noctune-teal`},[...n[12]||=[V(`svg`,{class:`w-5 h-5`,fill:`currentColor`,viewBox:`0 0 24 24`},[V(`path`,{d:`M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z`})],-1)]],8,dh)],10,th))),128))])]))]),H(sm,{show:u.value,"track-id":l.value?._id,onClose:n[0]||=e=>u.value=!1},null,8,[`show`,`track-id`])])}}},ph={class:`p-8`},mh={key:0,class:`grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-4`},hh={key:1,class:`text-center py-20`},gh={key:2,class:`grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-4`},_h=[`onClick`],vh={class:`aspect-square bg-gray-300 relative overflow-hidden`},yh=[`src`],bh={key:1,class:`w-full h-full flex items-center justify-center bg-gradient-to-br from-noctune-teal/20 to-noctune-yellow/20`},xh=[`onClick`],Sh={class:`p-3`},Ch={class:`font-bold text-sm truncate text-black`},wh={class:`text-xs text-gray-500`},Th={__name:`PlaylistPage`,setup(e){let t=Dl(),n=Ff(),r=Lf(),{requireAuth:i}=T_(),a=F([]),o=F(!0),s=F(!1);function c(e){e.target.style.display=`none`}function l(){i({redirectTo:`/login`,onAuthenticated:()=>{s.value=!0}})}function u(e){s.value=!1,a.value.unshift(e)}async function d(e){if(confirm(`Delete "${e.name}" forever?`))try{let{data:t}=await $.delete(`/playlists/${e._id}`);t.success&&(a.value=a.value.filter(t=>t._id!==e._id),r.showToast(`Playlist deleted`,`success`))}catch{r.showToast(`Failed to delete playlist`,`error`)}}return hr(async()=>{if(!n.isLoggedIn){o.value=!1;return}try{let{data:e}=await $.get(`/playlists`);e.success&&(a.value=e.data)}catch{}finally{o.value=!1}}),(e,n)=>(z(),B(`div`,ph,[V(`div`,{class:`flex items-center justify-between mb-6`},[n[2]||=V(`h1`,{class:`text-3xl font-black text-black`},`YOUR PLAYLISTS`,-1),V(`button`,{onClick:l,class:`bg-noctune-teal border-2 border-black px-4 py-2 font-bold flex items-center gap-2 rounded-lg hover:bg-teal-600 transition-colors cursor-pointer`},[...n[1]||=[V(`svg`,{class:`w-5 h-5`,fill:`none`,stroke:`currentColor`,"stroke-width":`3`,viewBox:`0 0 24 24`},[V(`path`,{d:`M12 4v16m8-8H4`})],-1),U(` NEW PLAYLIST `,-1)]])]),o.value?(z(),B(`div`,mh,[(z(),B(R,null,L(4,e=>V(`div`,{key:e,class:`animate-pulse bg-gray-200 rounded-2xl border-2 border-black h-64`})),64))])):a.value.length===0?(z(),B(`div`,hh,[n[3]||=V(`svg`,{class:`w-24 h-24 mx-auto text-gray-300 mb-4`,fill:`currentColor`,viewBox:`0 0 24 24`},[V(`path`,{d:`M3 10h11v2H3v-2zm0-4h11v2H3V6zm0 8h7v2H3v-2zm13-1v8l6-4-6-4z`})],-1),n[4]||=V(`p`,{class:`text-gray-500 mb-2 text-lg`},`No playlists yet`,-1),n[5]||=V(`p`,{class:`text-gray-400 text-sm mb-4`},`Create your first playlist to start organizing your music`,-1),V(`button`,{onClick:l,class:`bg-noctune-yellow border-2 border-black px-6 py-3 font-bold rounded-lg hover:bg-yellow-400 transition-colors cursor-pointer`},` CREATE YOUR FIRST PLAYLIST `)])):(z(),B(`div`,gh,[(z(!0),B(R,null,L(a.value,e=>(z(),B(`div`,{key:e._id,onClick:n=>I(t).push(`/playlist/${e._id}`),class:`bg-white rounded-2xl border-2 border-black overflow-hidden hover:scale-[1.02] transition-transform cursor-pointer group`},[V(`div`,vh,[e.coverUrl?(z(),B(`img`,{key:0,src:I(np)(e.coverUrl),class:`w-full h-full object-cover`,loading:`lazy`,onError:c},null,40,yh)):(z(),B(`div`,bh,[...n[6]||=[V(`svg`,{class:`w-20 h-16 text-gray-400`,fill:`currentColor`,viewBox:`0 0 24 24`},[V(`path`,{d:`M3 10h11v2H3v-2zm0-4h11v2H3V6zm0 8h7v2H3v-2zm13-1v8l6-4-6-4z`})],-1)]])),n[8]||=V(`div`,{class:`absolute inset-0 bg-black/0 group-hover:bg-black/10 transition-colors`},null,-1),V(`button`,{onClick:Ro(t=>d(e),[`stop`]),class:`absolute top-2 right-2 w-7 h-7 bg-red-400 border-2 border-black rounded-full flex items-center justify-center opacity-0 group-hover:opacity-100 transition-opacity hover:bg-red-500`},[...n[7]||=[V(`svg`,{class:`w-3 h-3 text-white`,fill:`none`,stroke:`currentColor`,"stroke-width":`3`,viewBox:`0 0 24 24`},[V(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,d:`M6 18L18 6M6 6l12 12`})],-1)]],8,xh)]),V(`div`,Sh,[V(`p`,Ch,A(e.name),1),V(`p`,wh,A(e.tracks?.length||0)+` songs`,1)])],8,_h))),128))])),H(Gp,{show:s.value,onClose:n[0]||=e=>s.value=!1,onCreated:u},null,8,[`show`])]))}},Eh={class:`p-8`},Dh={key:0,class:`space-y-6 animate-pulse`},Oh={class:`space-y-3`},kh={class:`flex items-start gap-8 mb-8`},Ah={class:`w-56 h-56 rounded-2xl overflow-hidden border-4 border-black flex-shrink-0 bg-black`},jh=[`src`],Mh={key:1,class:`w-full h-full flex items-center justify-center`},Nh={class:`flex-1`},Ph={class:`text-4xl font-black text-black mb-4 leading-tight`},Fh={key:0,class:`text-gray-600 mb-4`},Ih={class:`flex items-center gap-3 text-gray-600 mb-6`},Lh={class:`font-medium`},Rh={class:`flex gap-4`},zh=[`disabled`],Bh={class:`bg-white rounded-2xl border-4 border-black overflow-hidden`},Vh={class:`divide-y divide-gray-200`},Hh=[`onClick`],Uh={class:`w-12 text-center`},Wh={key:0,class:`w-4 h-4 text-noctune-teal mx-auto`,fill:`currentColor`,viewBox:`0 0 24 24`},Gh={key:1,class:`text-gray-500`},Kh={class:`flex-1 flex items-center gap-4`},qh={class:`w-12 h-12 rounded-lg flex-shrink-0 overflow-hidden bg-gray-300 border border-black`},Jh=[`src`],Yh={class:`w-48 text-center text-gray-600 text-sm truncate`},Xh=[`onClick`],Zh=[`onClick`],Qh=[`onClick`],$h={key:0,class:`p-8 text-center text-gray-500`},eg={key:2,class:`text-center py-20 text-gray-500`},tg={__name:`PlaylistDetail`,setup(e){let t=Ol(),n=Dl(),r=rp(),i=ip(),a=Ff(),o=Lf(),{requireAuth:s}=T_(),c=F(null),l=F(!0),u=F(null),d=F(!1);function f(e){u.value=e,s({redirectTo:`/login`,onAuthenticated:()=>{d.value=!0}})}function p(e){e.target.style.display=`none`}function m(e){return r.currentTrack?._id===e._id}function h(e){return a.likedTrackIds?.has(e._id)}function g(e){if(!c.value?.tracks?.length)return;let t=c.value.tracks[e];if(m(t)){r.togglePlay();return}let n=c.value.tracks;i.setQueue(n,e),r.setTrack(t),r.play()}function _(){c.value?.tracks?.length&&g(0)}function v(e){s({redirectTo:`/login`,onAuthenticated:()=>a.toggleLike(e._id)})}async function y(e){if(c.value)try{let{data:n}=await $.delete(`/playlists/${t.params.id}/tracks`,{data:{trackId:e._id}});n.success&&(c.value.tracks=c.value.tracks.filter(t=>t._id!==e._id),o.showToast(`Removed from playlist`,`info`))}catch{o.showToast(`Failed to remove track`,`error`)}}async function b(){if(confirm(`Delete this playlist forever?`))try{let{data:e}=await $.delete(`/playlists/${t.params.id}`);e.success&&(o.showToast(`Playlist deleted`,`success`),n.push(`/playlist`))}catch{o.showToast(`Failed to delete playlist`,`error`)}}return hr(async()=>{let e=t.params.id;try{if(e){let{data:t}=await $.get(`/playlists/${e}`);t.success&&(c.value=t.data)}}catch{c.value=null}finally{l.value=!1}}),(e,t)=>(z(),B(R,null,[V(`div`,Eh,[l.value?(z(),B(`div`,Dh,[t[2]||=aa(`
`,1),V(`div`,Oh,[(z(),B(R,null,L(5,e=>V(`div`,{key:e,class:`flex items-center gap-4`},[...t[1]||=[V(`div`,{class:`w-8 h-4 bg-gray-200 rounded`},null,-1),V(`div`,{class:`w-10 h-10 bg-gray-200 rounded-lg`},null,-1),V(`div`,{class:`h-3 bg-gray-200 rounded flex-1`},null,-1),V(`div`,{class:`h-3 bg-gray-200 rounded w-24`},null,-1)]])),64))])])):c.value?(z(),B(R,{key:1},[V(`div`,kh,[V(`div`,Ah,[c.value.coverUrl?(z(),B(`img`,{key:0,src:I(np)(c.value.coverUrl),class:`w-full h-full object-cover`,loading:`lazy`},null,8,jh)):(z(),B(`div`,Mh,[...t[3]||=[aa(``,1)]]))]),V(`div`,Nh,[t[6]||=V(`span`,{class:`inline-block bg-noctune-teal text-black text-xs font-bold px-3 py-1 rounded mb-3 border border-black`},`PLAYLIST`,-1),V(`h1`,Ph,A(c.value.name),1),c.value.description?(z(),B(`p`,Fh,A(c.value.description),1)):W(``,!0),V(`div`,Ih,[V(`span`,Lh,A(c.value.tracks?.length||0)+` songs`,1)]),V(`div`,Rh,[V(`button`,{onClick:_,disabled:!c.value.tracks?.length,class:`bg-noctune-teal border-2 border-black px-6 py-2 font-bold flex items-center gap-2 rounded-lg hover:bg-teal-600 transition-colors disabled:opacity-50 cursor-pointer`},[...t[4]||=[V(`svg`,{class:`w-4 h-4`,fill:`currentColor`,viewBox:`0 0 24 24`},[V(`path`,{d:`M8 5v14l11-7z`})],-1),U(` PLAY `,-1)]],8,zh),V(`button`,{onClick:b,class:`bg-red-400 border-2 border-black px-4 py-2 font-bold flex items-center gap-2 rounded-lg hover:bg-red-500 transition-colors cursor-pointer text-sm`},[...t[5]||=[V(`svg`,{class:`w-4 h-4`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`,viewBox:`0 0 24 24`},[V(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,d:`M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16`})],-1),U(` DELETE `,-1)]])])])]),V(`div`,Bh,[t[11]||=aa(`
#TITLEARTIST
`,1),V(`div`,Vh,[(z(!0),B(R,null,L(c.value.tracks,(e,n)=>(z(),B(`div`,{key:e._id,onClick:e=>g(n),class:k([`px-6 py-3 flex items-center hover:bg-gray-50 transition-colors cursor-pointer`,m(e)?`bg-noctune-teal/10`:``])},[V(`span`,Uh,[m(e)&&I(r).isPlaying?(z(),B(`svg`,Wh,[...t[7]||=[V(`path`,{d:`M6 19h4V5H6v14zm8-14v14h4V5h-4z`},null,-1)]])):(z(),B(`span`,Gh,A(n+1),1))]),V(`div`,Kh,[V(`div`,qh,[e.coverUrl?(z(),B(`img`,{key:0,src:I(np)(e.coverUrl),class:`w-full h-full object-cover`,loading:`lazy`,onError:p},null,40,Jh)):W(``,!0)]),V(`span`,{class:k([`font-medium text-sm truncate`,m(e)?`text-noctune-teal`:`text-black`])},A(e.title),3)]),V(`span`,Yh,A(e.artist),1),V(`button`,{onClick:Ro(t=>v(e),[`stop`]),class:`w-10 flex justify-center transition-colors cursor-pointer`},[(z(),B(`svg`,{class:k([`w-5 h-5`,h(e)?`fill-red-400 text-red-400`:`text-gray-400 hover:text-red-400`]),fill:`none`,stroke:`currentColor`,viewBox:`0 0 24 24`},[...t[8]||=[V(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M4.318 6.318a4.5 4.5 0 000 6.364L12 20.364l7.682-7.682a4.5 4.5 0 00-6.364-6.364L12 7.636l-1.318-1.318a4.5 4.5 0 00-6.364 0z`},null,-1)]],2))],8,Xh),V(`button`,{onClick:Ro(t=>f(e),[`stop`]),class:`w-8 flex justify-center transition-colors text-gray-400 hover:text-noctune-teal cursor-pointer`},[...t[9]||=[V(`svg`,{class:`w-5 h-5`,fill:`currentColor`,viewBox:`0 0 24 24`},[V(`path`,{d:`M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z`})],-1)]],8,Zh),V(`button`,{onClick:Ro(t=>y(e),[`stop`]),class:`w-8 flex justify-center transition-colors text-red-400 hover:text-red-600 cursor-pointer`},[...t[10]||=[V(`svg`,{class:`w-4 h-4`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`,viewBox:`0 0 24 24`},[V(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,d:`M6 18L18 6M6 6l12 12`})],-1)]],8,Qh)],10,Hh))),128)),c.value.tracks?.length?W(``,!0):(z(),B(`div`,$h,`No tracks in this playlist yet`))])])],64)):(z(),B(`div`,eg,`Playlist not found`))]),H(sm,{show:d.value,"track-id":u.value?._id,onClose:t[0]||=e=>d.value=!1},null,8,[`show`,`track-id`])],64))}},ng={class:`p-8`},rg={class:`bg-white rounded-2xl border-4 border-black p-6 mb-6 flex items-center gap-8`},ig={class:`w-40 h-40 rounded-full border-4 border-black overflow-hidden flex-shrink-0 bg-gray-300`},ag=[`src`],og={key:1,class:`w-full h-full flex items-center justify-center`},sg={class:`flex-1`},cg={class:`text-3xl font-black text-black mb-1`},lg={class:`text-gray-600 mb-3`},ug={class:`inline-flex items-center gap-2 border-2 border-noctune-orange text-noctune-orange px-3 py-1 rounded-full mb-4`},dg={class:`text-sm font-medium`},fg={class:`flex gap-4`},pg={key:0,class:`bg-white rounded-2xl border-4 border-black p-6 mb-6`},mg={key:0,class:`text-red-500 text-sm mb-4`},hg={key:1,class:`text-green-600 text-sm mb-4`},gg={class:`space-y-4 max-w-md`},_g=[`disabled`],vg={key:0,class:`inline-block w-4 h-4 border-2 border-black border-t-transparent rounded-full animate-spin mr-1`},yg={class:`bg-white rounded-2xl border-4 border-black p-6 mb-6 flex justify-center gap-12`},bg={class:`flex items-center gap-4`},xg={class:`text-2xl font-black text-black`},Sg={__name:`ProfilePage`,setup(e){let t=Dl(),n=Ff(),r=F(!1),i=F(``),a=F(``),o=F(``),s=F(null),c=F(!1),l=F(``),u=F(``),d=F(0),f=G(()=>n.user?.name||n.user?.username||`User`);function p(){r.value=!r.value,r.value&&(i.value=n.user?.name||``,a.value=n.user?.username||``,o.value=n.user?.email||``,s.value=null,l.value=``,u.value=``)}function m(e){s.value=e.target.files[0]||null}async function h(){l.value=``,u.value=``,c.value=!0;try{let e=new FormData;e.append(`name`,i.value),e.append(`username`,a.value),e.append(`email`,o.value),s.value&&e.append(`avatar`,s.value);let t=await n.updateProfile(e);t.success?(u.value=`Profile updated!`,setTimeout(()=>{r.value=!1},1500)):l.value=t.message}catch{l.value=`Update failed`}finally{c.value=!1}}async function g(){await n.logout(),t.push(`/login`)}return hr(async()=>{if(!n.isLoggedIn){t.push(`/login`);return}try{let{data:e}=await $.get(`/tracks/liked`);e.success&&(d.value=e.data.likedTracks?.length||0)}catch{}}),(e,t)=>(z(),B(`div`,ng,[V(`div`,rg,[V(`div`,ig,[I(n).user?.avatarUrl?(z(),B(`img`,{key:0,src:I(np)(I(n).user.avatarUrl),alt:`Profile`,class:`w-full h-full object-cover`,loading:`lazy`},null,8,ag)):(z(),B(`div`,og,[...t[3]||=[V(`svg`,{class:`w-16 h-16 text-gray-400`,fill:`currentColor`,viewBox:`0 0 24 24`},[V(`path`,{d:`M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z`})],-1)]]))]),V(`div`,sg,[V(`h1`,cg,A(f.value),1),V(`p`,lg,`@`+A(I(n).user?.username||`username`),1),V(`div`,ug,[t[4]||=V(`svg`,{class:`w-4 h-4`,fill:`none`,stroke:`currentColor`,viewBox:`0 0 24 24`},[V(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M11.049 2.927c.3-.921 1.603-.921 1.902 0l1.519 4.674a1 1 0 00.95.69h4.915c.969 0 1.371 1.24.588 1.81l-3.976 2.888a1 1 0 00-.363 1.118l1.518 4.674c.3.922-.755 1.688-1.538 1.118l-3.976-2.888a1 1 0 00-1.176 0l-3.976 2.888c-.783.57-1.838-.197-1.538-1.118l1.518-4.674a1 1 0 00-.363-1.118l-3.976-2.888c-.784-.57-.38-1.81.588-1.81h4.914a1 1 0 00.951-.69l1.519-4.674z`})],-1),V(`span`,dg,A(I(n).user?.role===`admin`?`Admin`:`Premium Member`),1)]),V(`div`,fg,[V(`button`,{onClick:p,class:`border-2 border-black px-4 py-2 rounded-lg font-medium flex items-center gap-2 hover:bg-gray-100 transition-colors`},[t[5]||=V(`svg`,{class:`w-4 h-4`,fill:`none`,stroke:`currentColor`,viewBox:`0 0 24 24`},[V(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z`})],-1),U(` `+A(r.value?`Cancel`:`Edit Profile`),1)])])])]),r.value?(z(),B(`div`,pg,[t[11]||=V(`h3`,{class:`text-xl font-black text-black mb-4`},`Edit Profile`,-1),l.value?(z(),B(`p`,mg,A(l.value),1)):W(``,!0),u.value?(z(),B(`p`,hg,A(u.value),1)):W(``,!0),V(`div`,gg,[V(`div`,null,[t[6]||=V(`label`,{class:`block text-xs font-bold text-gray-600 mb-1`},`NAME`,-1),zn(V(`input`,{type:`text`,"onUpdate:modelValue":t[0]||=e=>i.value=e,class:`w-full border-2 border-black rounded-lg px-4 py-2 focus:outline-none text-black`},null,512),[[K,i.value]])]),V(`div`,null,[t[7]||=V(`label`,{class:`block text-xs font-bold text-gray-600 mb-1`},`USERNAME`,-1),zn(V(`input`,{type:`text`,"onUpdate:modelValue":t[1]||=e=>a.value=e,class:`w-full border-2 border-black rounded-lg px-4 py-2 focus:outline-none text-black`},null,512),[[K,a.value]])]),V(`div`,null,[t[8]||=V(`label`,{class:`block text-xs font-bold text-gray-600 mb-1`},`EMAIL`,-1),zn(V(`input`,{type:`email`,"onUpdate:modelValue":t[2]||=e=>o.value=e,class:`w-full border-2 border-black rounded-lg px-4 py-2 focus:outline-none text-black`},null,512),[[K,o.value]])]),V(`div`,null,[t[9]||=V(`label`,{class:`block text-xs font-bold text-gray-600 mb-1`},`AVATAR`,-1),V(`input`,{type:`file`,accept:`image/*`,onChange:m,class:`w-full text-sm`},null,32)]),V(`button`,{onClick:h,disabled:c.value,class:`bg-noctune-teal border-2 border-black px-6 py-2 font-bold rounded-lg hover:bg-teal-600 transition-colors disabled:opacity-50`},[c.value?(z(),B(`span`,vg)):W(``,!0),t[10]||=U(` Save Changes `,-1)],8,_g)])])):W(``,!0),V(`div`,yg,[V(`div`,bg,[t[13]||=V(`div`,{class:`w-14 h-14 bg-noctune-orange rounded-xl flex items-center justify-center border-2 border-black`},[V(`svg`,{class:`w-7 h-7 text-white`,fill:`currentColor`,viewBox:`0 0 24 24`},[V(`path`,{d:`M12 3v10.55c-.59-.34-1.27-.55-2-.55-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4V7h4V3h-6z`})])],-1),V(`div`,null,[V(`p`,xg,A(d.value),1),t[12]||=V(`p`,{class:`text-sm text-gray-500`},`Liked Songs`,-1)])])]),V(`button`,{onClick:g,class:`w-full bg-noctune-orange border-4 border-black rounded-2xl py-4 font-bold text-black flex items-center justify-center gap-3 hover:bg-orange-600 transition-colors`},[...t[14]||=[V(`svg`,{class:`w-6 h-6`,fill:`none`,stroke:`currentColor`,viewBox:`0 0 24 24`},[V(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M17 16l4-4m0 0l-4-4m4 4H7m6 4v1a3 3 0 01-3 3H6a3 3 0 01-3-3V7a3 3 0 013-3h4a3 3 0 013 3v1`})],-1),U(` Logout `,-1)]])]))}},Cg={class:`bg-noctune-cream flex flex-col h-full`},wg={class:`p-4 space-y-2`},Tg={class:`relative group`},Eg={class:`absolute left-0 top-full mt-1 w-56 bg-white border-2 border-black rounded-lg shadow-[4px_4px_0px_0px_#000] opacity-0 invisible group-hover:opacity-100 group-hover:visible transition-all duration-200 z-50 max-h-72 overflow-y-auto`},Dg={key:0,class:`p-2`},Og=[`onClick`],kg={class:`truncate`},Ag={key:1,class:`p-4 text-center text-sm text-gray-500`},jg={class:`border-t-2 border-gray-200 p-2`},Mg={__name:`Sidebar`,setup(e){let t=Ol(),n=Dl(),r=Ff(),i=F([]),a=F(!1),{requireAuth:o}=T_(),s=e=>t.path===e,c=e=>t.path.startsWith(e);async function l(){if(r.isLoggedIn)try{let{data:e}=await $.get(`/playlists`);e.success&&(i.value=e.data)}catch{}}function u(){o({redirectTo:`/login`,onAuthenticated:()=>{a.value=!0}})}function d(e){a.value=!1,i.value.unshift(e)}return hr(l),(e,t)=>{let o=Tr(`router-link`);return z(),B(`aside`,Cg,[V(`nav`,wg,[H(o,{to:`/home`,class:k([`flex items-center gap-3 px-4 py-3 rounded-lg font-bold text-black hover:bg-noctune-teal/20 transition-colors`,{"bg-noctune-teal text-black":s(`/home`)}])},{default:Rn(()=>[...t[1]||=[V(`svg`,{class:`w-6 h-6`,fill:`currentColor`,viewBox:`0 0 24 24`},[V(`path`,{d:`M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z`})],-1),V(`span`,{class:`tracking-wide`},`HOME`,-1)]]),_:1},8,[`class`]),H(o,{to:`/library`,class:k([`flex items-center gap-3 px-4 py-3 rounded-lg font-bold text-black hover:bg-noctune-teal/20 transition-colors`,{"bg-noctune-teal text-black":s(`/library`)}])},{default:Rn(()=>[...t[2]||=[V(`svg`,{class:`w-6 h-6`,fill:`currentColor`,viewBox:`0 0 24 24`},[V(`path`,{d:`M3 13h2v-2H3v2zm0 4h2v-2H3v2zm0-8h2V7H3v2zm4 4h14v-2H7v2zm0 4h14v-2H7v2zM7 7v2h14V7H7z`})],-1),V(`span`,{class:`tracking-wide`},`LIBRARY`,-1)]]),_:1},8,[`class`]),V(`div`,Tg,[H(o,{to:`/playlist`,class:k([`flex items-center gap-3 px-4 py-3 rounded-lg font-bold text-black hover:bg-noctune-teal/20 transition-colors`,{"bg-noctune-teal text-black":s(`/playlist`)||c(`/playlist/`)}])},{default:Rn(()=>[...t[3]||=[V(`svg`,{class:`w-6 h-6`,fill:`currentColor`,viewBox:`0 0 24 24`},[V(`path`,{d:`M3 10h11v2H3v-2zm0-4h11v2H3V6zm0 8h7v2H3v-2zm13-1v8l6-4-6-4z`})],-1),V(`span`,{class:`tracking-wide`},`PLAYLIST`,-1),V(`svg`,{class:`w-4 h-4 ml-auto text-gray-500 group-hover:rotate-180 transition-transform`,fill:`currentColor`,viewBox:`0 0 24 24`},[V(`path`,{d:`M7 10l5 5 5-5z`})],-1)]]),_:1},8,[`class`]),V(`div`,Eg,[i.value.length?(z(),B(`div`,Dg,[(z(!0),B(R,null,L(i.value,e=>(z(),B(`div`,{key:e._id,onClick:t=>I(n).push(`/playlist/${e._id}`),class:`flex items-center gap-2 px-3 py-2 rounded-lg cursor-pointer hover:bg-noctune-teal/20 transition-colors text-sm font-medium text-black`},[t[4]||=V(`svg`,{class:`w-4 h-4 flex-shrink-0 text-gray-500`,fill:`currentColor`,viewBox:`0 0 24 24`},[V(`path`,{d:`M3 10h11v2H3v-2zm0-4h11v2H3V6zm0 8h7v2H3v-2zm13-1v8l6-4-6-4z`})],-1),V(`span`,kg,A(e.name),1)],8,Og))),128))])):(z(),B(`div`,Ag,`No playlists yet`)),V(`div`,jg,[H(o,{to:`/playlist`,class:`block px-3 py-2 rounded-lg text-sm font-bold text-noctune-teal hover:bg-noctune-teal/20 transition-colors text-center`},{default:Rn(()=>[...t[5]||=[U(` Browse All Playlists `,-1)]]),_:1})])])]),I(r).isAdmin?(z(),Zi(o,{key:0,to:`/admin/tracks`,class:k([`flex items-center gap-3 px-4 py-3 rounded-lg font-bold text-black hover:bg-noctune-orange/20 transition-colors`,{"bg-noctune-orange text-black":s(`/admin/tracks`)}])},{default:Rn(()=>[...t[6]||=[V(`svg`,{class:`w-6 h-6`,fill:`currentColor`,viewBox:`0 0 24 24`},[V(`path`,{d:`M14 2H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zm-3 17l-4-4 1.41-1.41L11 16.17l6.59-6.59L19 11l-8 8z`})],-1),V(`span`,{class:`tracking-wide`},`UPLOAD TRACK`,-1)]]),_:1},8,[`class`])):W(``,!0)]),t[8]||=V(`div`,{class:`mx-4 border-t-2 border-gray-300 my-2`},null,-1),V(`div`,{class:`px-4`},[V(`button`,{onClick:u,class:`w-full bg-noctune-yellow border-2 border-black rounded-lg py-3 px-4 font-bold flex items-center gap-2 hover:bg-yellow-400 transition-colors`},[...t[7]||=[V(`svg`,{class:`w-5 h-5`,fill:`none`,stroke:`currentColor`,viewBox:`0 0 24 24`},[V(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`3`,d:`M12 4v16m8-8H4`})],-1),V(`span`,{class:`tracking-wide`},`CREATE PLAYLIST`,-1)]])]),t[9]||=V(`div`,{class:`flex-1`},null,-1),H(Gp,{show:a.value,onClose:t[0]||=e=>a.value=!1,onCreated:d},null,8,[`show`])])}}},Ng={class:`min-h-screen bg-noctune-cream flex flex-col`},Pg={class:`flex flex-1`},Fg={class:`flex-1 p-8 overflow-auto`},Ig={class:`max-w-2xl mx-auto`},Lg={key:0,class:`text-red-500 text-sm mb-4 font-medium`},Rg={key:1,class:`text-green-600 text-sm mb-4 font-medium`},zg={class:`bg-white rounded-2xl border-4 border-black p-8 space-y-6`},Bg=[`src`],Vg={key:1,class:`text-gray-500`},Hg={key:0,class:`text-black font-medium`},Ug={key:1,class:`text-gray-500`},Wg=[`disabled`],Gg={key:0,class:`inline-block w-5 h-5 border-2 border-white border-t-transparent rounded-full animate-spin mr-2`},Kg={__name:`AdminPage`,setup(e){let t=Dl(),n=F(``),r=F(``),i=F(``),a=F(``),o=F(null),s=F(``),c=F(null),l=F(!1),u=F(``),d=F(``),f=F(null),p=F(null);function m(e){let t=e.target.files[0];t&&(o.value=t,s.value=URL.createObjectURL(t))}function h(e){let t=e.target.files[0];t&&(c.value=t)}async function g(){if(u.value=``,d.value=``,!n.value||!r.value||!i.value||!a.value||!o.value||!c.value){u.value=`All fields are required`;return}l.value=!0;try{let e=new FormData;e.append(`title`,n.value),e.append(`artist`,r.value),e.append(`album`,i.value),e.append(`genre`,a.value),e.append(`cover`,o.value),e.append(`audio`,c.value);let{data:l}=await $.post(`/admin/tracks`,e,{headers:{"Content-Type":`multipart/form-data`}});l.success&&(d.value=`Track uploaded successfully!`,n.value=``,r.value=``,i.value=``,a.value=``,o.value=null,s.value=``,c.value=null,setTimeout(()=>t.push(`/home`),1500))}catch(e){u.value=e.response?.data?.message||`Upload failed`}finally{l.value=!1}}return(e,t)=>(z(),B(`div`,Ng,[V(`div`,Pg,[V(`main`,Fg,[V(`div`,Ig,[t[12]||=V(`h1`,{class:`text-4xl font-black text-black mb-2`},`Upload Track`,-1),t[13]||=V(`p`,{class:`text-gray-600 mb-8`},`Add a new track to the library`,-1),u.value?(z(),B(`p`,Lg,A(u.value),1)):W(``,!0),d.value?(z(),B(`p`,Rg,A(d.value),1)):W(``,!0),V(`div`,zg,[V(`div`,null,[t[6]||=V(`label`,{class:`block text-xs font-bold text-gray-600 mb-2 tracking-wider`},`TITLE`,-1),zn(V(`input`,{type:`text`,"onUpdate:modelValue":t[0]||=e=>n.value=e,class:`w-full border-2 border-black rounded-lg px-4 py-3 focus:outline-none text-black`,placeholder:`Track title`},null,512),[[K,n.value]])]),V(`div`,null,[t[7]||=V(`label`,{class:`block text-xs font-bold text-gray-600 mb-2 tracking-wider`},`ARTIST`,-1),zn(V(`input`,{type:`text`,"onUpdate:modelValue":t[1]||=e=>r.value=e,class:`w-full border-2 border-black rounded-lg px-4 py-3 focus:outline-none text-black`,placeholder:`Artist name`},null,512),[[K,r.value]])]),V(`div`,null,[t[8]||=V(`label`,{class:`block text-xs font-bold text-gray-600 mb-2 tracking-wider`},`ALBUM`,-1),zn(V(`input`,{type:`text`,"onUpdate:modelValue":t[2]||=e=>i.value=e,class:`w-full border-2 border-black rounded-lg px-4 py-3 focus:outline-none text-black`,placeholder:`Album name`},null,512),[[K,i.value]])]),V(`div`,null,[t[9]||=V(`label`,{class:`block text-xs font-bold text-gray-600 mb-2 tracking-wider`},`GENRE`,-1),zn(V(`input`,{type:`text`,"onUpdate:modelValue":t[3]||=e=>a.value=e,class:`w-full border-2 border-black rounded-lg px-4 py-3 focus:outline-none text-black`,placeholder:`e.g. Pop, Rock, Jazz`},null,512),[[K,a.value]])]),V(`div`,null,[t[10]||=V(`label`,{class:`block text-xs font-bold text-gray-600 mb-2 tracking-wider`},`COVER IMAGE`,-1),V(`div`,{class:`border-2 border-dashed border-black rounded-lg p-6 text-center cursor-pointer hover:bg-gray-50`,onClick:t[4]||=e=>f.value.click()},[s.value?(z(),B(`img`,{key:0,src:s.value,class:`w-32 h-32 object-cover mx-auto mb-2 rounded-lg border-2 border-black`},null,8,Bg)):(z(),B(`p`,Vg,`Click to upload cover image`)),V(`input`,{ref_key:`coverInput`,ref:f,type:`file`,accept:`image/*`,onChange:m,class:`hidden`},null,544)])]),V(`div`,null,[t[11]||=V(`label`,{class:`block text-xs font-bold text-gray-600 mb-2 tracking-wider`},`AUDIO FILE`,-1),V(`div`,{class:`border-2 border-dashed border-black rounded-lg p-6 text-center cursor-pointer hover:bg-gray-50`,onClick:t[5]||=e=>p.value.click()},[c.value?(z(),B(`p`,Hg,A(c.value.name),1)):(z(),B(`p`,Ug,` Click to upload audio file (MP3, WAV, FLAC) `)),V(`input`,{ref_key:`audioInput`,ref:p,type:`file`,accept:`.mp3,.wav,.flac`,onChange:h,class:`hidden`},null,544)])]),V(`button`,{onClick:g,disabled:l.value,class:`w-full bg-noctune-orange border-2 border-black rounded-lg py-4 font-bold text-white text-xl hover:bg-orange-600 transition-colors disabled:opacity-50`},[l.value?(z(),B(`span`,Gg)):W(``,!0),U(` `+A(l.value?`Uploading...`:`UPLOAD TRACK`),1)],8,Wg)])])])])]))}},qg={class:`p-8`},Jg={key:0,class:`animate-pulse space-y-6`},Yg={class:`space-y-3`},Xg={class:`flex items-center gap-6 mb-8`},Zg={class:`text-4xl font-black text-black`},Qg={class:`text-gray-500 mt-1`},$g={class:`bg-white rounded-2xl border-4 border-black overflow-hidden`},e_={class:`divide-y divide-gray-200`},t_=[`onClick`],n_={class:`w-12 text-center text-sm text-gray-500`},r_={key:0,class:`w-4 h-4 text-noctune-teal mx-auto`,fill:`currentColor`,viewBox:`0 0 24 24`},i_={key:1},a_={class:`flex-1 flex items-center gap-3`},o_={class:`w-10 h-10 rounded-lg overflow-hidden bg-gray-300 border border-black flex-shrink-0`},s_=[`src`],c_={class:`font-medium text-sm truncate text-black`},l_={class:`w-48 text-center text-gray-600 text-sm truncate`},u_=[`onClick`],d_={key:0,class:`p-8 text-center text-gray-500`},f_={__name:`ArtistView`,setup(e){let t=Ol(),n=rp(),r=ip(),i=Ff(),{requireAuth:a}=T_(),o=F([]),s=F(!0),c=G(()=>decodeURIComponent(t.params.name));function l(e){return n.currentTrack?._id===e._id}function u(e){return i.likedTrackIds?.has(e._id)}function d(e){if(!o.value.length)return;let t=o.value[e];if(l(t)){n.togglePlay();return}r.setQueue(o.value,e),n.setTrack(t),n.play()}function f(e){a({redirectTo:`/login`,onAuthenticated:()=>i.toggleLike(e._id)})}function p(e){e.target.style.display=`none`}return hr(async()=>{try{let{data:e}=await $.get(`/tracks?artist=${encodeURIComponent(c.value)}`);e.success&&(o.value=e.data)}catch{}finally{s.value=!1}}),(e,t)=>(z(),B(`div`,qg,[s.value?(z(),B(`div`,Jg,[t[0]||=aa(`
`,1),V(`div`,Yg,[(z(),B(R,null,L(4,e=>V(`div`,{key:e,class:`h-14 bg-gray-200 rounded-lg`})),64))])])):(z(),B(R,{key:1},[V(`div`,Xg,[t[2]||=V(`div`,{class:`w-32 h-32 rounded-full overflow-hidden border-4 border-black bg-noctune-yellow flex-shrink-0`},[V(`div`,{class:`w-full h-full flex items-center justify-center`},[V(`svg`,{class:`w-16 h-16 text-black/30`,fill:`currentColor`,viewBox:`0 0 24 24`},[V(`path`,{d:`M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z`})])])],-1),V(`div`,null,[t[1]||=V(`span`,{class:`text-xs font-bold text-gray-500 tracking-wider`},`ARTIST`,-1),V(`h1`,Zg,A(c.value),1),V(`p`,Qg,A(o.value.length)+` tracks`,1)])]),V(`div`,$g,[t[5]||=aa(`
#TITLEALBUM
`,1),V(`div`,e_,[(z(!0),B(R,null,L(o.value,(e,r)=>(z(),B(`div`,{key:e._id,onClick:e=>d(r),class:k([`px-6 py-3 flex items-center hover:bg-gray-50 transition-colors cursor-pointer`,l(e)?`bg-noctune-teal/10`:``])},[V(`span`,n_,[l(e)&&I(n).isPlaying?(z(),B(`svg`,r_,[...t[3]||=[V(`path`,{d:`M6 19h4V5H6v14zm8-14v14h4V5h-4z`},null,-1)]])):(z(),B(`span`,i_,A(r+1),1))]),V(`div`,a_,[V(`div`,o_,[e.coverUrl?(z(),B(`img`,{key:0,src:I(np)(e.coverUrl),class:`w-full h-full object-cover`,loading:`lazy`,onError:p},null,40,s_)):W(``,!0)]),V(`span`,c_,A(e.title),1)]),V(`span`,l_,A(e.album||`-`),1),V(`button`,{onClick:Ro(t=>f(e),[`stop`]),class:`w-12 flex justify-center transition-colors`},[(z(),B(`svg`,{class:k([`w-5 h-5`,u(e)?`fill-red-400 text-red-400`:`text-gray-400 hover:text-red-400`]),fill:`none`,stroke:`currentColor`,viewBox:`0 0 24 24`},[...t[4]||=[V(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M4.318 6.318a4.5 4.5 0 000 6.364L12 20.364l7.682-7.682a4.5 4.5 0 00-6.364-6.364L12 7.636l-1.318-1.318a4.5 4.5 0 00-6.364 0z`},null,-1)]],2))],8,u_)],10,t_))),128)),o.value.length?W(``,!0):(z(),B(`div`,d_,`No tracks found for this artist`))])])],64))]))}},p_=(e,t)=>{let n=e.__vccOpts||e;for(let[e,r]of t)n[e]=r;return n},m_={},h_={class:`min-h-screen bg-noctune-cream flex items-center justify-center p-8`},g_={class:`text-center max-w-lg`};function __(e,t){let n=Tr(`router-link`);return z(),B(`div`,h_,[V(`div`,g_,[t[1]||=V(`div`,{class:`text-9xl font-black text-noctune-teal mb-4 font-mono`},`404`,-1),t[2]||=V(`h1`,{class:`text-4xl font-black text-black mb-4`},`PAGE NOT FOUND`,-1),t[3]||=V(`p`,{class:`text-gray-600 mb-8 text-lg`},`The page you're looking for doesn't exist or has been moved.`,-1),H(n,{to:`/home`,class:`inline-block bg-noctune-yellow border-2 border-black px-8 py-3 font-bold rounded-lg hover:bg-yellow-400 transition-colors shadow-[4px_4px_0px_0px_#000] hover:shadow-none hover:translate-x-1 hover:translate-y-1`},{default:Rn(()=>[...t[0]||=[U(` GO HOME `,-1)]]),_:1})])])}var v_=[{path:`/`,redirect:`/home`},{path:`/login`,name:`Login`,component:Cp,meta:{guest:!0}},{path:`/register`,name:`Register`,component:Rp,meta:{guest:!0}},{path:`/home`,name:`Home`,component:Pm},{path:`/library`,name:`Library`,component:fh},{path:`/playlist`,name:`Playlist`,component:Th},{path:`/playlist/:id`,name:`PlaylistDetail`,component:tg},{path:`/profile`,name:`Profile`,component:Sg},{path:`/artist/:name`,name:`Artist`,component:f_},{path:`/admin/tracks`,name:`AdminTracks`,component:Kg,meta:{admin:!0}},{path:`/:pathMatch(.*)*`,name:`NotFound`,component:p_(m_,[[`render`,__]])}],y_=El({history:Kc(),routes:v_});y_.beforeEach((e,t,n)=>{let r=Ff();if(e.meta.admin&&!r.isAdmin||e.meta.guest&&r.isLoggedIn)return n(`/home`);n()}),y_.afterEach(()=>{window.scrollTo(0,0)});var b_=`modulepreload`,x_=function(e){return`/`+e},S_={},C_=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}r=o(t.map(t=>{if(t=x_(t,n),t in S_)return;S_[t]=!0;let r=t.endsWith(`.css`),i=r?`[rel="stylesheet"]`:``;if(n)for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}else if(document.querySelector(`link[href="${t}"]${i}`))return;let o=document.createElement(`link`);if(o.rel=r?`stylesheet`:b_,r||(o.as=`script`),o.crossOrigin=``,o.href=t,a&&o.setAttribute(`nonce`,a),document.head.appendChild(o),r)return new Promise((e,n)=>{o.addEventListener(`load`,e),o.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},w_=null;function T_(){let e=Ff();async function t({message:t,onAuthenticated:n,redirectTo:r}){if(e.isLoggedIn)n?.();else if(w_=n||null,r)y_.push(r);else if(t){let{useUiStore:e}=await C_(async()=>{let{useUiStore:e}=await Promise.resolve().then(()=>If);return{useUiStore:e}},void 0);e().showToast(t,`info`)}}function n(){if(w_){let e=w_;w_=null,e()}}return{requireAuth:t,executePending:n}}var E_={class:`bg-noctune-teal px-4 py-3 flex items-center justify-between border-b-4 border-black`},D_={class:`flex items-center gap-4`},O_={class:`flex-1 max-w-md mx-8 relative`},k_={class:`relative`},A_={key:0,class:`absolute top-full mt-2 left-0 right-0 bg-white border-2 border-black rounded-lg shadow-[4px_4px_0px_0px_#000] max-h-96 overflow-y-auto z-50`},j_={key:0,class:`p-2`},M_=[`onClick`],N_={class:`w-8 h-8 bg-gray-300 rounded border border-black flex-shrink-0 overflow-hidden`},P_=[`src`],F_={class:`min-w-0 flex-1`},I_={class:`text-sm font-medium text-black truncate`},L_={class:`text-xs text-gray-500`},R_={key:1,class:`p-2 border-t border-gray-200`},z_=[`onClick`],B_={key:2,class:`p-4 text-center text-gray-500 text-sm`},V_={class:`flex items-center gap-4`},H_={class:`w-8 h-8 rounded-full bg-noctune-dark overflow-hidden border-2 border-black`},U_=[`src`],W_={key:1,class:`w-full h-full flex items-center justify-center`},G_={__name:`AppHeader`,setup(e){let t=Dl(),n=Ff(),r=rp(),i=ip(),{requireAuth:a}=T_();function o(e){e.target.style.display=`none`}let s=F(``),c=F(null),l=null;function u(){if(clearTimeout(l),!s.value.trim()){c.value=null;return}l=setTimeout(async()=>{try{let{data:e}=await $.get(`/search?q=${encodeURIComponent(s.value)}`);e.success&&(c.value=e.data)}catch{c.value=null}},300)}function d(){s.value=``,c.value=null}function f(e){d(),i.setQueue([e],0),r.setTrack(e),r.play()}function p(){a({redirectTo:`/login`,onAuthenticated:()=>t.push(`/library`)})}function m(){a({redirectTo:`/login`,onAuthenticated:()=>t.push(`/profile`)})}return(e,r)=>{let i=Tr(`router-link`);return z(),B(`header`,E_,[V(`div`,D_,[H(i,{to:`/home`,class:`text-black font-bold text-2xl tracking-wider font-mono`},{default:Rn(()=>[...r[1]||=[U(`NOCTUNE`,-1)]]),_:1})]),V(`div`,O_,[V(`div`,k_,[r[2]||=V(`div`,{class:`absolute inset-y-0 left-3 flex items-center pointer-events-none`},[V(`svg`,{class:`w-5 h-5 text-gray-500`,fill:`none`,stroke:`currentColor`,viewBox:`0 0 24 24`},[V(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z`})])],-1),zn(V(`input`,{type:`text`,"onUpdate:modelValue":r[0]||=e=>s.value=e,onInput:u,onKeydown:Bo(d,[`escape`]),placeholder:`Search music, artist, album...`,class:`w-full bg-noctune-cream py-2 pl-10 pr-4 rounded-full text-sm focus:outline-none focus:ring-2 focus:ring-black`},null,544),[[K,s.value]])]),c.value&&s.value?(z(),B(`div`,A_,[c.value.tracks?.length?(z(),B(`div`,j_,[r[3]||=V(`p`,{class:`text-xs font-bold text-gray-500 px-2 py-1`},`TRACKS`,-1),(z(!0),B(R,null,L(c.value.tracks.slice(0,5),e=>(z(),B(`div`,{key:e._id,onClick:t=>f(e),class:`flex items-center gap-3 px-2 py-2 hover:bg-gray-100 rounded cursor-pointer`},[V(`div`,N_,[e.coverUrl?(z(),B(`img`,{key:0,src:I(np)(e.coverUrl),class:`w-full h-full object-cover`,loading:`lazy`},null,8,P_)):W(``,!0)]),V(`div`,F_,[V(`p`,I_,A(e.title),1),V(`p`,L_,A(e.artist),1)])],8,M_))),128))])):W(``,!0),c.value.artists?.length?(z(),B(`div`,R_,[r[4]||=V(`p`,{class:`text-xs font-bold text-gray-500 px-2 py-1`},`ARTISTS`,-1),(z(!0),B(R,null,L(c.value.artists.slice(0,3),e=>(z(),B(`div`,{key:e.name,onClick:n=>I(t).push(`/home?artist=${e.name}`),class:`px-2 py-2 hover:bg-gray-100 rounded cursor-pointer text-sm font-medium text-black`},A(e.name),9,z_))),128))])):W(``,!0),!c.value.tracks?.length&&!c.value.artists?.length?(z(),B(`div`,B_,`No results found`)):W(``,!0)])):W(``,!0)]),V(`div`,V_,[V(`button`,{onClick:p,class:`text-black hover:opacity-80`},[...r[5]||=[V(`svg`,{class:`w-7 h-7`,fill:`currentColor`,viewBox:`0 0 24 24`},[V(`path`,{d:`M12 21.35l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54L12 21.35z`})],-1)]]),V(`button`,{onClick:m,class:`text-black hover:opacity-80`},[V(`div`,H_,[I(n).user?.avatarUrl?(z(),B(`img`,{key:0,src:I(np)(I(n).user.avatarUrl),class:`w-full h-full object-cover`,loading:`lazy`,onError:o},null,40,U_)):(z(),B(`div`,W_,[...r[6]||=[V(`svg`,{class:`w-5 h-5 text-white`,fill:`currentColor`,viewBox:`0 0 24 24`},[V(`path`,{d:`M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z`})],-1)]]))])])])])}}},K_={key:0,class:`fixed inset-0 z-40`},q_={class:`absolute right-0 top-0 bottom-0 w-80 bg-noctune-cream border-l-4 border-black shadow-[-4px_0_0_0_#000] p-4 overflow-y-auto flex flex-col`},J_={class:`flex items-center justify-between mb-4`},Y_={key:0,class:`flex-1 flex items-center justify-center text-gray-500 text-center py-8`},X_={key:1,class:`space-y-1`},Z_=[`onClick`],Q_={class:`text-sm text-gray-500 w-6 text-center font-mono`},$_={class:`w-10 h-10 rounded-lg overflow-hidden bg-gray-300 border border-black flex-shrink-0`},ev=[`src`],tv={class:`min-w-0 flex-1`},nv={class:`text-xs text-gray-500 truncate`},rv={__name:`QueuePanel`,props:{show:Boolean},emits:[`close`],setup(e,{emit:t}){let n=t,r=rp(),i=ip(),a=G(()=>i.queue),o=G(()=>i.currentIndex);function s(e){let t=a.value[e];t&&(i.currentIndex=e,r.setTrack(t),r.play(),n(`close`))}function c(e){e.target.style.display=`none`}return(t,n)=>e.show?(z(),B(`div`,K_,[V(`div`,{class:`absolute inset-0 bg-black/30`,onClick:n[0]||=e=>t.$emit(`close`)}),V(`div`,q_,[V(`div`,J_,[n[2]||=V(`h3`,{class:`font-black text-lg text-black`},`UP NEXT`,-1),V(`button`,{onClick:n[1]||=e=>t.$emit(`close`),class:`text-gray-500 hover:text-black text-2xl leading-none`},`×`)]),a.value.length?(z(),B(`div`,X_,[(z(!0),B(R,null,L(a.value,(e,t)=>(z(),B(`div`,{key:e._id+`-`+t,onClick:e=>s(t),class:k([`flex items-center gap-3 px-3 py-2 rounded-lg cursor-pointer hover:bg-gray-200 transition-colors`,t===o.value?`bg-noctune-teal/20 border border-noctune-teal`:`border border-transparent`])},[V(`span`,Q_,A(t+1),1),V(`div`,$_,[e.coverUrl?(z(),B(`img`,{key:0,src:I(np)(e.coverUrl),class:`w-full h-full object-cover`,loading:`lazy`,onError:c},null,40,ev)):W(``,!0)]),V(`div`,tv,[V(`p`,{class:k([`text-sm font-medium text-black truncate`,t===o.value?`text-noctune-teal`:``])},A(e.title),3),V(`p`,nv,A(e.artist),1)])],10,Z_))),128))])):(z(),B(`div`,Y_,[...n[3]||=[V(`div`,null,[V(`svg`,{class:`w-16 h-16 mx-auto mb-3 text-gray-300`,fill:`currentColor`,viewBox:`0 0 24 24`},[V(`path`,{d:`M15 6H3v2h12V6zm0 4H3v2h12v-2zM3 16h8v-2H3v2zM17 6v8.18c-.31-.11-.65-.18-1-.18-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3V8h3V6h-5z`})]),V(`p`,null,`Queue is empty`)],-1)]]))])])):W(``,!0)}},iv={key:0,class:`fixed bottom-0 left-0 right-0 bg-noctune-dark border-t-4 border-black z-50`},av={class:`flex items-center px-4 py-2 max-w-screen-2xl mx-auto`},ov={class:`flex items-center gap-3 w-56 lg:w-80`},sv={class:`w-12 h-12 bg-black rounded-lg overflow-hidden flex-shrink-0 border border-white/20 relative`},cv=[`src`],lv={key:1,class:`w-full h-full flex items-center justify-center`},uv={key:2,class:`absolute inset-0 flex items-end justify-center gap-[2px] pb-1`},dv={class:`min-w-0 hidden lg:block`},fv={class:`text-sm font-bold text-white truncate`},pv={class:`text-xs text-gray-400 truncate`},mv={class:`flex-1 flex flex-col items-center`},hv={class:`flex items-center gap-3 mb-1`},gv={key:0,class:`w-5 h-5 text-black`,fill:`currentColor`,viewBox:`0 0 24 24`},_v={key:1,class:`w-5 h-5 text-black ml-0.5`,fill:`currentColor`,viewBox:`0 0 24 24`},vv={key:0,class:`absolute -top-2 -right-2 text-[9px] font-bold`},yv={class:`flex items-center gap-2 w-full max-w-lg`},bv={class:`text-xs text-gray-400 w-8 text-right font-mono`},xv={class:`w-full h-full bg-gray-700 border border-gray-500 rounded cursor-pointer overflow-hidden`},Sv={class:`absolute inset-0 flex items-center pointer-events-none`},Cv={class:`text-xs text-gray-400 w-8 font-mono`},wv={class:`w-56 lg:w-80 flex items-center justify-end gap-2`},Tv={class:`text-xs text-gray-500 font-mono hidden lg:inline`},Ev={class:`flex items-center gap-1`},Dv={class:`w-full h-full bg-gray-700 border border-gray-500 rounded cursor-pointer`},Ov={class:`absolute inset-0 flex items-center pointer-events-none`},kv=p_({__name:`PlayerBar`,setup(e){let t=rp(),n=ip(),r=Ff(),{requireAuth:i}=T_(),a=F(!1),o=F(null),s=F(!1);function c(e){return`${Math.floor(e/60)}:${Math.floor(e%60).toString().padStart(2,`0`)}`}function l(e){let n=e.currentTarget.getBoundingClientRect(),r=(e.clientX-n.left)/n.width;o.value=Math.max(0,Math.min(r*t.duration,t.duration))}function u(e){let n=e.currentTarget.getBoundingClientRect(),r=(e.clientX-n.left)/n.width,i=Math.max(0,Math.min(r*t.duration,t.duration));t.seek(i)}function d(e){let n=e.currentTarget.getBoundingClientRect(),r=(e.clientX-n.left)/n.width;t.setVolume(Math.round(Math.max(0,Math.min(r*100,100))))}function f(){let e=n.nextTrack();e&&(t.setTrack(e),t.play())}hr(()=>{t.onEnd(f)});let p=G(()=>np(t.currentTrack?.coverUrl)),m=G(()=>{let e=n.currentIndex,t=n.queue.length;return t===0?``:`${e+1}/${t}`});function h(){let e=n.nextTrack();e&&(t.setTrack(e),t.play())}function g(){let e=n.prevTrack();e&&(t.setTrack(e),t.play())}function _(){if(!t.currentTrack)return;let e=t.currentTrack._id||t.currentTrack.id;i({redirectTo:`/login`,onAuthenticated:()=>r.toggleLike(e)})}function v(e){e.target.style.display=`none`}return Kn(()=>t.currentTrack?._id,e=>{a.value=e?r.likedTrackIds.has(e):!1},{immediate:!0}),Kn(()=>r.user?.likedTracks?.length,()=>{let e=t.currentTrack?._id;e&&(a.value=r.likedTrackIds.has(e))}),(e,r)=>I(t).currentTrack?(z(),B(`div`,iv,[V(`div`,av,[V(`div`,ov,[V(`div`,sv,[I(t).currentTrack.coverUrl?(z(),B(`img`,{key:0,src:p.value,alt:``,class:`w-full h-full object-cover`,loading:`lazy`,onError:v},null,40,cv)):(z(),B(`div`,lv,[...r[8]||=[aa(``,1)]])),I(t).isPlaying?(z(),B(`div`,uv,[...r[9]||=[V(`span`,{class:`w-[3px] bg-noctune-teal rounded-full equalizer-bar`,style:{"animation-delay":`0s`}},null,-1),V(`span`,{class:`w-[3px] bg-noctune-teal rounded-full equalizer-bar`,style:{"animation-delay":`0.15s`}},null,-1),V(`span`,{class:`w-[3px] bg-noctune-teal rounded-full equalizer-bar`,style:{"animation-delay":`0.3s`}},null,-1),V(`span`,{class:`w-[3px] bg-noctune-teal rounded-full equalizer-bar`,style:{"animation-delay":`0.45s`}},null,-1)]])):W(``,!0)]),V(`div`,dv,[V(`p`,fv,A(I(t).currentTrack.title),1),V(`p`,pv,A(I(t).currentTrack.artist),1)])]),V(`div`,mv,[V(`div`,hv,[V(`button`,{onClick:r[0]||=e=>I(n).toggleShuffle(),class:k([`text-sm transition-colors`,I(n).shuffle?`text-noctune-teal`:`text-gray-400 hover:text-white`])},[...r[10]||=[V(`svg`,{class:`w-4 h-4`,fill:`currentColor`,viewBox:`0 0 24 24`},[V(`path`,{d:`M10.59 9.17L5.41 4 4 5.41l5.17 5.17 1.42-1.41zM14.5 4l2.04 2.04L4 18.59 5.41 20 17.96 7.46 20 9.5V4h-5.5zm.33 9.41l-1.41 1.41 3.13 3.13L14.5 20H20v-5.5l-2.04 2.04-3.13-3.13z`})],-1)]],2),V(`button`,{onClick:r[1]||=e=>g(),class:`text-gray-400 hover:text-white transition-colors`},[...r[11]||=[V(`svg`,{class:`w-5 h-5`,fill:`currentColor`,viewBox:`0 0 24 24`},[V(`path`,{d:`M6 6h2v12H6zm3.5 6l8.5 6V6z`})],-1)]]),V(`button`,{onClick:r[2]||=e=>I(t).togglePlay(),class:`w-10 h-10 bg-white rounded-full flex items-center justify-center hover:scale-105 transition-transform`},[I(t).isPlaying?(z(),B(`svg`,gv,[...r[12]||=[V(`path`,{d:`M6 19h4V5H6v14zm8-14v14h4V5h-4z`},null,-1)]])):(z(),B(`svg`,_v,[...r[13]||=[V(`path`,{d:`M8 5v14l11-7z`},null,-1)]]))]),V(`button`,{onClick:r[3]||=e=>h(),class:`text-gray-400 hover:text-white transition-colors`},[...r[14]||=[V(`svg`,{class:`w-5 h-5`,fill:`currentColor`,viewBox:`0 0 24 24`},[V(`path`,{d:`M6 18l8.5-6L6 6v12zM16 6v12h2V6h-2z`})],-1)]]),V(`button`,{onClick:r[4]||=e=>I(n).cycleRepeat(),class:k([`text-sm transition-colors relative`,I(n).repeat===`off`?`text-gray-400 hover:text-white`:`text-noctune-teal`])},[r[15]||=V(`svg`,{class:`w-4 h-4`,fill:`currentColor`,viewBox:`0 0 24 24`},[V(`path`,{d:`M7 7h10v3l4-4-4-4v3H5v6h2V7zm10 10H7v-3l-4 4 4 4v-3h12v-6h-2v4z`})],-1),I(n).repeat===`one`?(z(),B(`span`,vv,`1`)):W(``,!0)],2),V(`button`,{onClick:r[5]||=e=>s.value=!0,class:`text-gray-400 hover:text-white transition-colors`},[...r[16]||=[V(`svg`,{class:`w-4 h-4`,fill:`currentColor`,viewBox:`0 0 24 24`},[V(`path`,{d:`M15 6H3v2h12V6zm0 4H3v2h12v-2zM3 16h8v-2H3v2zM17 6v8.18c-.31-.11-.65-.18-1-.18-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3V8h3V6h-5z`})],-1)]])]),V(`div`,yv,[V(`span`,bv,A(I(t).formattedProgress),1),V(`div`,{class:`relative flex-1 h-3`,onMousemove:l,onMouseleave:r[6]||=e=>o.value=null,onClick:u},[o.value===null?W(``,!0):(z(),B(`div`,{key:0,class:`absolute -top-6 pointer-events-none bg-black text-white text-xs px-2 py-1 rounded whitespace-nowrap z-10`,style:pe({left:`${o.value/(I(t).duration||1)*100}%`,transform:`translateX(-50%)`})},A(c(o.value)),5)),V(`div`,xv,[V(`div`,{class:`h-full bg-noctune-teal rounded transition-[width] duration-200`,style:pe({width:`${I(t).progress/(I(t).duration||1)*100}%`})},null,4)]),V(`div`,Sv,[V(`div`,{class:`w-3 h-3 bg-white border-2 border-black rounded-full shadow-[1px_1px_0px_0px_#000] -ml-1.5`,style:pe({marginLeft:`${I(t).progress/(I(t).duration||1)*100}%`})},null,4)])],32),V(`span`,Cv,A(I(t).formattedDuration),1)])]),V(`div`,wv,[V(`span`,Tv,A(m.value),1),V(`button`,{onClick:_,class:`transition-colors`},[(z(),B(`svg`,{class:k([`w-5 h-5`,a.value?`fill-red-400 text-red-400`:`text-gray-400 hover:text-red-400`]),fill:`none`,stroke:`currentColor`,viewBox:`0 0 24 24`},[...r[17]||=[V(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M4.318 6.318a4.5 4.5 0 000 6.364L12 20.364l7.682-7.682a4.5 4.5 0 00-6.364-6.364L12 7.636l-1.318-1.318a4.5 4.5 0 00-6.364 0z`},null,-1)]],2))]),V(`div`,Ev,[r[18]||=V(`svg`,{class:`w-4 h-4 text-gray-400`,fill:`currentColor`,viewBox:`0 0 24 24`},[V(`path`,{d:`M3 9v6h4l5 5V4L7 9H3zm13.5 3c0-1.77-1.02-3.29-2.5-4.03v8.05c1.48-.73 2.5-2.25 2.5-4.02z`})],-1),V(`div`,{class:`relative w-16 h-2`,onClick:d},[V(`div`,Dv,[V(`div`,{class:`h-full bg-white rounded`,style:pe({width:`${I(t).volume}%`})},null,4)]),V(`div`,Ov,[V(`div`,{class:`w-2.5 h-2.5 bg-white border border-black rounded-full -ml-1.25`,style:pe({marginLeft:`${I(t).volume}%`})},null,4)])])])])]),H(rv,{show:s.value,onClose:r[7]||=e=>s.value=!1},null,8,[`show`])])):W(``,!0)}},[[`__scopeId`,`data-v-620eeb4f`]]),Av={class:`flex items-center justify-around py-2`},jv={__name:`MobileNav`,setup(e){let t=Ol(),n=Dl();Ff();let{requireAuth:r}=T_(),i=e=>t.path===e,a=e=>t.path.startsWith(e);function o(){r({redirectTo:`/login`,onAuthenticated:()=>n.push(`/profile`)})}return(e,t)=>{let n=Tr(`router-link`);return z(),B(`nav`,{class:k([`fixed bottom-0 left-0 right-0 bg-noctune-cream border-t-4 border-black z-30 md:hidden`,{"pb-0":!e.hasPlayer}])},[V(`div`,Av,[H(n,{to:`/home`,class:k([`flex flex-col items-center gap-0.5 px-3 py-1`,i(`/home`)?`text-noctune-teal`:`text-gray-600`])},{default:Rn(()=>[...t[0]||=[V(`svg`,{class:`w-5 h-5`,fill:`currentColor`,viewBox:`0 0 24 24`},[V(`path`,{d:`M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z`})],-1),V(`span`,{class:`text-[10px] font-bold`},`HOME`,-1)]]),_:1},8,[`class`]),H(n,{to:`/library`,class:k([`flex flex-col items-center gap-0.5 px-3 py-1`,i(`/library`)?`text-noctune-teal`:`text-gray-600`])},{default:Rn(()=>[...t[1]||=[V(`svg`,{class:`w-5 h-5`,fill:`currentColor`,viewBox:`0 0 24 24`},[V(`path`,{d:`M4 6H2v14c0 1.1.9 2 2 2h14v-2H4V6zm16-4H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-3 2H5c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2z`})],-1),V(`span`,{class:`text-[10px] font-bold`},`LIBRARY`,-1)]]),_:1},8,[`class`]),H(n,{to:`/playlist`,class:k([`flex flex-col items-center gap-0.5 px-3 py-1`,i(`/playlist`)||a(`/playlist/`)?`text-noctune-teal`:`text-gray-600`])},{default:Rn(()=>[...t[2]||=[V(`svg`,{class:`w-5 h-5`,fill:`currentColor`,viewBox:`0 0 24 24`},[V(`path`,{d:`M3 10h11v2H3v-2zm0-4h11v2H3V6zm0 8h7v2H3v-2zm13-1v8l6-4-6-4z`})],-1),V(`span`,{class:`text-[10px] font-bold`},`PLAYLIST`,-1)]]),_:1},8,[`class`]),V(`button`,{onClick:o,class:k([`flex flex-col items-center gap-0.5 px-3 py-1`,i(`/profile`)?`text-noctune-teal`:`text-gray-600`])},[...t[3]||=[V(`svg`,{class:`w-5 h-5`,fill:`currentColor`,viewBox:`0 0 24 24`},[V(`path`,{d:`M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z`})],-1),V(`span`,{class:`text-[10px] font-bold`},`PROFILE`,-1)]],2)])],2)}}};function Mv(){let e=rp();ip();function t(t){if(![`INPUT`,`TEXTAREA`].includes(t.target.tagName))switch(t.code){case`Space`:t.preventDefault(),e.togglePlay();break;case`ArrowLeft`:e.seek(Math.max(0,e.progress-5));break;case`ArrowRight`:e.seek(Math.min(e.duration,e.progress+5));break;case`ArrowUp`:e.setVolume(Math.min(100,e.volume+5));break;case`ArrowDown`:e.setVolume(Math.max(0,e.volume-5));break}}hr(()=>window.addEventListener(`keydown`,t)),yr(()=>window.removeEventListener(`keydown`,t))}var Nv={class:`min-h-screen bg-noctune-cream`},Pv={key:0},Fv={class:`flex`},Iv={class:`fixed top-4 right-4 z-[100] space-y-2`},Lv={class:`flex items-center gap-2`},Rv=[`onClick`],zv=Wo({__name:`App`,setup(e){let t=Ol(),n=Ff(),r=Lf(),i=rp(),a=G(()=>t.meta?.guest===!0),o=G(()=>!!i.currentTrack);Mv();function s(e){return{info:`bg-noctune-teal text-black`,success:`bg-green-400 text-black`,error:`bg-red-400 text-white`}[e]||`bg-noctune-yellow text-black`}return hr(async()=>{await n.checkSession()}),(e,t)=>{let n=Tr(`router-view`);return z(),B(`div`,Nv,[a.value?(z(),Zi(n,{key:1})):(z(),B(`div`,Pv,[H(G_,{class:`sticky top-0 z-30`}),V(`div`,Fv,[H(Mg,{class:`fixed left-0 top-[57px] bottom-0 w-64 border-r-4 border-black overflow-y-auto z-20 hidden lg:block`}),V(`main`,{class:k([`flex-1 min-h-[calc(100vh-57px)] ml-0 lg:ml-64`,{"pb-20":o.value,"pb-16 md:pb-0":!o.value}])},[H(n)],2)]),H(kv),H(jv)])),V(`div`,Iv,[(z(!0),B(R,null,L(I(r).toasts,e=>(z(),B(`div`,{key:e.id,class:k([`px-4 py-3 rounded-lg border-2 border-black font-bold text-sm shadow-[4px_4px_0px_0px_#000] transition-all animate-slide-in`,s(e.type)])},[V(`div`,Lv,[V(`span`,null,A(e.message),1),V(`button`,{onClick:t=>I(r).dismissToast(e.id),class:`ml-2 opacity-60 hover:opacity-100`},` × `,8,Rv)])],2))),128))])])}}}),Bv=ds();zv.use(Bv),zv.use(y_),Ff(Bv).checkSession().finally(()=>{zv.mount(`#app`)});