UNPKG

@koishijs/plugin-console

Version:

Web User Interface for Koishi

1 lines 119 kB
import{shallowRef as U,watchEffect as ve,readonly as H,ref as w,watch as R,customRef as pe,getCurrentScope as _t,onScopeDispose as Zt,effectScope as kt,getCurrentInstance as se,inject as De,provide as en,isRef as Q,unref as ae,computed as _,reactive as q,toRefs as Re,toRef as tn,onBeforeMount as nn,nextTick as re,onBeforeUnmount as rn,onMounted as rt,onUnmounted as on,isReactive as an,onUpdated as Ot,shallowReactive as Ie,isReadonly as Qe,onBeforeUpdate as un,defineComponent as Ze,h as ft,TransitionGroup as ln,toRaw as sn,markRaw as cn,Fragment as fn}from"./vue.js";function so(e,t){var n;const r=U();return ve(()=>{r.value=e()},{...t,flush:(n=t==null?void 0:t.flush)!=null?n:"sync"}),H(r)}function dn(e,t){let n,r,o;const a=w(!0),l=()=>{a.value=!0,o()};R(e,l,{flush:"sync"});const u=typeof t=="function"?t:t.get,i=typeof t=="function"?void 0:t.set,c=pe((s,f)=>(r=s,o=f,{get(){return a.value&&(n=u(n),a.value=!1),r(),n},set(v){i==null||i(v)}}));return Object.isExtensible(c)&&(c.trigger=l),c}function V(e){return _t()?(Zt(e),!0):!1}function Z(){const e=new Set,t=o=>{e.delete(o)};return{on:o=>{e.add(o);const a=()=>t(o);return V(a),{off:a}},off:t,trigger:(...o)=>Promise.all(Array.from(e).map(a=>a(...o)))}}function co(e){let t=!1,n;const r=kt(!0);return(...o)=>(t||(n=r.run(()=>e(...o)),t=!0),n)}const de=new WeakMap,vn=(...e)=>{var t;const n=e[0],r=(t=se())==null?void 0:t.proxy;if(r==null)throw new Error("injectLocal must be called in setup");return de.has(r)&&n in de.get(r)?de.get(r)[n]:De(...e)},mn=(e,t)=>{var n;const r=(n=se())==null?void 0:n.proxy;if(r==null)throw new Error("provideLocal must be called in setup");de.has(r)||de.set(r,Object.create(null));const o=de.get(r);o[e]=t,en(e,t)};function fo(e,t){const n=(t==null?void 0:t.injectionKey)||Symbol(e.name||"InjectionState"),r=t==null?void 0:t.defaultValue;return[(...l)=>{const u=e(...l);return mn(n,u),u},()=>vn(n,r)]}function vo(e){let t=0,n,r;const o=()=>{t-=1,r&&t<=0&&(r.stop(),n=void 0,r=void 0)};return(...a)=>(t+=1,r||(r=kt(!0),n=r.run(()=>e(...a))),V(o),n)}function pn(e,t,{enumerable:n=!1,unwrap:r=!0}={}){for(const[o,a]of Object.entries(t))o!=="value"&&(Q(a)&&r?Object.defineProperty(e,o,{get(){return a.value},set(l){a.value=l},enumerable:n}):Object.defineProperty(e,o,{value:a,enumerable:n}));return e}function mo(e,t){return t==null?ae(e):ae(e)[t]}function po(e){return ae(e)!=null}function hn(e,t){if(typeof Symbol<"u"){const n={...e};return Object.defineProperty(n,Symbol.iterator,{enumerable:!1,value(){let r=0;return{next:()=>({value:t[r++],done:r>t.length})}}}),n}else return Object.assign([...t],e)}function b(e){return typeof e=="function"?e():ae(e)}const ho=b;function yn(e,t){const n=(t==null?void 0:t.computedGetter)===!1?ae:b;return function(...r){return _(()=>e.apply(this,r.map(o=>n(o))))}}function yo(e,t={}){let n=[],r;if(Array.isArray(t))n=t;else{r=t;const{includeOwnProperties:o=!0}=t;n.push(...Object.keys(e)),o&&n.push(...Object.getOwnPropertyNames(e))}return Object.fromEntries(n.map(o=>{const a=e[o];return[o,typeof a=="function"?yn(a.bind(e),r):a]}))}function gn(e){if(!Q(e))return q(e);const t=new Proxy({},{get(n,r,o){return ae(Reflect.get(e.value,r,o))},set(n,r,o){return Q(e.value[r])&&!Q(o)?e.value[r].value=o:e.value[r]=o,!0},deleteProperty(n,r){return Reflect.deleteProperty(e.value,r)},has(n,r){return Reflect.has(e.value,r)},ownKeys(){return Object.keys(e.value)},getOwnPropertyDescriptor(){return{enumerable:!0,configurable:!0}}});return q(t)}function At(e){return gn(_(e))}function go(e,...t){const n=t.flat(),r=n[0];return At(()=>Object.fromEntries(typeof r=="function"?Object.entries(Re(e)).filter(([o,a])=>!r(b(a),o)):Object.entries(Re(e)).filter(o=>!n.includes(o[0]))))}const wo={mounted:"mounted",updated:"updated",unmounted:"unmounted"},G=typeof window<"u"&&typeof document<"u",wn=typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope,bn=e=>typeof e<"u",Pt=e=>e!=null,bo=(e,...t)=>{e||console.warn(...t)},Sn=Object.prototype.toString,Ue=e=>Sn.call(e)==="[object Object]",So=()=>Date.now(),me=()=>+Date.now(),ze=(e,t,n)=>Math.min(n,Math.max(t,e)),W=()=>{},Eo=(e,t)=>(e=Math.ceil(e),t=Math.floor(t),Math.floor(Math.random()*(t-e+1))+e),En=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),et=Tn();function Tn(){var e,t;return G&&((e=window==null?void 0:window.navigator)==null?void 0:e.userAgent)&&(/iP(?:ad|hone|od)/.test(window.navigator.userAgent)||((t=window==null?void 0:window.navigator)==null?void 0:t.maxTouchPoints)>2&&/iPad|Macintosh/.test(window==null?void 0:window.navigator.userAgent))}function he(e,t){function n(...r){return new Promise((o,a)=>{Promise.resolve(e(()=>t.apply(this,r),{fn:t,thisArg:this,args:r})).then(o).catch(a)})}return n}const We=e=>e();function ot(e,t={}){let n,r,o=W;const a=u=>{clearTimeout(u),o(),o=W};return u=>{const i=b(e),c=b(t.maxWait);return n&&a(n),i<=0||c!==void 0&&c<=0?(r&&(a(r),r=null),Promise.resolve(u())):new Promise((s,f)=>{o=t.rejectOnCancel?f:s,c&&!r&&(r=setTimeout(()=>{n&&a(n),r=null,s(u())},c)),n=setTimeout(()=>{r&&a(r),r=null,s(u())},i)})}}function Be(...e){let t=0,n,r=!0,o=W,a,l,u,i,c;!Q(e[0])&&typeof e[0]=="object"?{delay:l,trailing:u=!0,leading:i=!0,rejectOnCancel:c=!1}=e[0]:[l,u=!0,i=!0,c=!1]=e;const s=()=>{n&&(clearTimeout(n),n=void 0,o(),o=W)};return v=>{const d=b(l),m=Date.now()-t,h=()=>a=v();return s(),d<=0?(t=Date.now(),h()):(m>d&&(i||!r)?(t=Date.now(),h()):u&&(a=new Promise((y,p)=>{o=c?p:y,n=setTimeout(()=>{t=Date.now(),r=!0,y(h()),s()},Math.max(0,d-m))})),!i&&!n&&(n=setTimeout(()=>r=!0,d)),r=!1,a)}}function Ft(e=We){const t=w(!0);function n(){t.value=!1}function r(){t.value=!0}const o=(...a)=>{t.value&&e(...a)};return{isActive:H(t),pause:n,resume:r,eventFilter:o}}function Dt(e){const t=Object.create(null);return n=>t[n]||(t[n]=e(n))}const xn=/\B([A-Z])/g,To=Dt(e=>e.replace(xn,"-$1").toLowerCase()),_n=/-(\w)/g,kn=Dt(e=>e.replace(_n,(t,n)=>n?n.toUpperCase():""));function Le(e,t=!1,n="Timeout"){return new Promise((r,o)=>{setTimeout(t?()=>o(n):r,e)})}function Ct(e){return e}function On(e){let t;function n(){return t||(t=e()),t}return n.reset=async()=>{const r=t;t=void 0,r&&await r},n}function xo(e){return e()}function Rt(e,...t){return t.some(n=>n in e)}function An(e,t){var n;if(typeof e=="number")return e+t;const r=((n=e.match(/^-?\d+\.?\d*/))==null?void 0:n[0])||"",o=e.slice(r.length),a=Number.parseFloat(r)+t;return Number.isNaN(a)?e:a+o}function Pn(e,t,n=!1){return t.reduce((r,o)=>(o in e&&(!n||e[o]!==void 0)&&(r[o]=e[o]),r),{})}function Fn(e,t,n=!1){return Object.fromEntries(Object.entries(e).filter(([r,o])=>(!n||o!==void 0)&&!t.includes(r)))}function Dn(e){return Object.entries(e)}function je(e){return e||se()}function Y(...e){if(e.length!==1)return tn(...e);const t=e[0];return typeof t=="function"?H(pe(()=>({get:t,set:W}))):w(t)}const _o=Y;function ko(e,...t){const n=t.flat(),r=n[0];return At(()=>Object.fromEntries(typeof r=="function"?Object.entries(Re(e)).filter(([o,a])=>r(b(a),o)):n.map(o=>[o,Y(e,o)])))}function Oo(e,t=1e4){return pe((n,r)=>{let o=b(e),a;const l=()=>setTimeout(()=>{o=b(e),r()},b(t));return V(()=>{clearTimeout(a)}),{get(){return n(),o},set(u){o=u,r(),clearTimeout(a),a=l()}}})}function at(e,t=200,n={}){return he(ot(t,n),e)}function Ao(e,t=200,n={}){const r=w(e.value),o=at(()=>{r.value=e.value},t,n);return R(e,()=>o()),r}function Po(e,t){return _({get(){var n;return(n=e.value)!=null?n:t},set(n){e.value=n}})}function It(e,t=200,n=!1,r=!0,o=!1){return he(Be(t,n,r,o),e)}function Fo(e,t=200,n=!0,r=!0){if(t<=0)return e;const o=w(e.value),a=It(()=>{o.value=e.value},t,n,r);return R(e,()=>a()),o}function Cn(e,t={}){let n=e,r,o;const a=pe((v,d)=>(r=v,o=d,{get(){return l()},set(m){u(m)}}));function l(v=!0){return v&&r(),n}function u(v,d=!0){var m,h;if(v===n)return;const y=n;((m=t.onBeforeChange)==null?void 0:m.call(t,v,y))!==!1&&(n=v,(h=t.onChanged)==null||h.call(t,v,y),d&&o())}return pn(a,{get:l,set:u,untrackedGet:()=>l(!1),silentSet:v=>u(v,!1),peek:()=>l(!1),lay:v=>u(v,!1)},{enumerable:!0})}const Do=Cn;function Co(...e){if(e.length===2){const[t,n]=e;t.value=n}if(e.length===3){const[t,n,r]=e;t[n]=r}}function Te(e,t,n={}){const{eventFilter:r=We,...o}=n;return R(e,he(r,t),o)}function Me(e,t,n={}){const{eventFilter:r,...o}=n,{eventFilter:a,pause:l,resume:u,isActive:i}=Ft(r);return{stop:Te(e,t,{...o,eventFilter:a}),pause:l,resume:u,isActive:i}}function dt(e,t,...[n]){const{flush:r="sync",deep:o=!1,immediate:a=!0,direction:l="both",transform:u={}}=n||{},i=[],c="ltr"in u&&u.ltr||(v=>v),s="rtl"in u&&u.rtl||(v=>v);return(l==="both"||l==="ltr")&&i.push(Me(e,v=>{i.forEach(d=>d.pause()),t.value=c(v),i.forEach(d=>d.resume())},{flush:r,deep:o,immediate:a})),(l==="both"||l==="rtl")&&i.push(Me(t,v=>{i.forEach(d=>d.pause()),e.value=s(v),i.forEach(d=>d.resume())},{flush:r,deep:o,immediate:a})),()=>{i.forEach(v=>v.stop())}}function Ro(e,t,n={}){const{flush:r="sync",deep:o=!1,immediate:a=!0}=n;return Array.isArray(t)||(t=[t]),R(e,l=>t.forEach(u=>u.value=l),{flush:r,deep:o,immediate:a})}function Lt(e,t={}){if(!Q(e))return Re(e);const n=Array.isArray(e.value)?Array.from({length:e.value.length}):{};for(const r in e.value)n[r]=pe(()=>({get(){return e.value[r]},set(o){var a;if((a=b(t.replaceRef))!=null?a:!0)if(Array.isArray(e.value)){const u=[...e.value];u[r]=o,e.value=u}else{const u={...e.value,[r]:o};Object.setPrototypeOf(u,Object.getPrototypeOf(e.value)),e.value=u}else e.value[r]=o}}));return n}function Io(e,t=!0,n){je(n)?nn(e,n):t?e():re(e)}function Rn(e,t){je(t)&&rn(e,t)}function X(e,t=!0,n){je()?rt(e,n):t?e():re(e)}function Mt(e,t){je(t)&&on(e,t)}function tt(e,t=!1){function n(f,{flush:v="sync",deep:d=!1,timeout:m,throwOnTimeout:h}={}){let y=null;const g=[new Promise(S=>{y=R(e,T=>{f(T)!==t&&(y?y():re(()=>y==null?void 0:y()),S(T))},{flush:v,deep:d,immediate:!0})})];return m!=null&&g.push(Le(m,h).then(()=>b(e)).finally(()=>y==null?void 0:y())),Promise.race(g)}function r(f,v){if(!Q(f))return n(T=>T===f,v);const{flush:d="sync",deep:m=!1,timeout:h,throwOnTimeout:y}=v??{};let p=null;const S=[new Promise(T=>{p=R([e,f],([x,D])=>{t!==(x===D)&&(p?p():re(()=>p==null?void 0:p()),T(x))},{flush:d,deep:m,immediate:!0})})];return h!=null&&S.push(Le(h,y).then(()=>b(e)).finally(()=>(p==null||p(),b(e)))),Promise.race(S)}function o(f){return n(v=>!!v,f)}function a(f){return r(null,f)}function l(f){return r(void 0,f)}function u(f){return n(Number.isNaN,f)}function i(f,v){return n(d=>{const m=Array.from(d);return m.includes(f)||m.includes(b(f))},v)}function c(f){return s(1,f)}function s(f=1,v){let d=-1;return n(()=>(d+=1,d>=f),v)}return Array.isArray(b(e))?{toMatch:n,toContains:i,changed:c,changedTimes:s,get not(){return tt(e,!t)}}:{toMatch:n,toBe:r,toBeTruthy:o,toBeNull:a,toBeNaN:u,toBeUndefined:l,changed:c,changedTimes:s,get not(){return tt(e,!t)}}}function Ne(e){return tt(e)}function In(e,t){return e===t}function Lo(...e){var t;const n=e[0],r=e[1];let o=(t=e[2])!=null?t:In;if(typeof o=="string"){const a=o;o=(l,u)=>l[a]===u[a]}return _(()=>b(n).filter(a=>b(r).findIndex(l=>o(a,l))===-1))}function Mo(e,t){return _(()=>b(e).every((n,r,o)=>t(b(n),r,o)))}function No(e,t){return _(()=>b(e).map(n=>b(n)).filter(t))}function Vo(e,t){return _(()=>b(b(e).find((n,r,o)=>t(b(n),r,o))))}function $o(e,t){return _(()=>b(e).findIndex((n,r,o)=>t(b(n),r,o)))}function Ln(e,t){let n=e.length;for(;n-- >0;)if(t(e[n],n,e))return e[n]}function Uo(e,t){return _(()=>b(Array.prototype.findLast?b(e).findLast((n,r,o)=>t(b(n),r,o)):Ln(b(e),(n,r,o)=>t(b(n),r,o))))}function Mn(e){return Ue(e)&&Rt(e,"formIndex","comparator")}function Wo(...e){var t;const n=e[0],r=e[1];let o=e[2],a=0;if(Mn(o)&&(a=(t=o.fromIndex)!=null?t:0,o=o.comparator),typeof o=="string"){const l=o;o=(u,i)=>u[l]===b(i)}return o=o??((l,u)=>l===b(u)),_(()=>b(n).slice(a).some((l,u,i)=>o(b(l),b(r),u,b(i))))}function Bo(e,t){return _(()=>b(e).map(n=>b(n)).join(b(t)))}function jo(e,t){return _(()=>b(e).map(n=>b(n)).map(t))}function Ho(e,t,...n){const r=(o,a,l)=>t(b(o),b(a),l);return _(()=>{const o=b(e);return n.length?o.reduce(r,b(n[0])):o.reduce(r)})}function zo(e,t){return _(()=>b(e).some((n,r,o)=>t(b(n),r,o)))}function Nn(e){return Array.from(new Set(e))}function Vn(e,t){return e.reduce((n,r)=>(n.some(o=>t(r,o,e))||n.push(r),n),[])}function qo(e,t){return _(()=>{const n=b(e).map(r=>b(r));return t?Vn(n,t):Nn(n)})}function Yo(e=0,t={}){let n=ae(e);const r=w(e),{max:o=Number.POSITIVE_INFINITY,min:a=Number.NEGATIVE_INFINITY}=t,l=(f=1)=>r.value=Math.max(Math.min(o,r.value+f),a),u=(f=1)=>r.value=Math.min(Math.max(a,r.value-f),o),i=()=>r.value,c=f=>r.value=Math.max(a,Math.min(o,f));return{count:r,inc:l,dec:u,get:i,set:c,reset:(f=n)=>(n=f,c(f))}}const $n=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[T\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/i,Un=/[YMDHhms]o|\[([^\]]+)\]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a{1,2}|A{1,2}|m{1,2}|s{1,2}|Z{1,2}|SSS/g;function Wn(e,t,n,r){let o=e<12?"AM":"PM";return r&&(o=o.split("").reduce((a,l)=>a+=`${l}.`,"")),n?o.toLowerCase():o}function ie(e){const t=["th","st","nd","rd"],n=e%100;return e+(t[(n-20)%10]||t[n]||t[0])}function Bn(e,t,n={}){var r;const o=e.getFullYear(),a=e.getMonth(),l=e.getDate(),u=e.getHours(),i=e.getMinutes(),c=e.getSeconds(),s=e.getMilliseconds(),f=e.getDay(),v=(r=n.customMeridiem)!=null?r:Wn,d={Yo:()=>ie(o),YY:()=>String(o).slice(-2),YYYY:()=>o,M:()=>a+1,Mo:()=>ie(a+1),MM:()=>`${a+1}`.padStart(2,"0"),MMM:()=>e.toLocaleDateString(b(n.locales),{month:"short"}),MMMM:()=>e.toLocaleDateString(b(n.locales),{month:"long"}),D:()=>String(l),Do:()=>ie(l),DD:()=>`${l}`.padStart(2,"0"),H:()=>String(u),Ho:()=>ie(u),HH:()=>`${u}`.padStart(2,"0"),h:()=>`${u%12||12}`.padStart(1,"0"),ho:()=>ie(u%12||12),hh:()=>`${u%12||12}`.padStart(2,"0"),m:()=>String(i),mo:()=>ie(i),mm:()=>`${i}`.padStart(2,"0"),s:()=>String(c),so:()=>ie(c),ss:()=>`${c}`.padStart(2,"0"),SSS:()=>`${s}`.padStart(3,"0"),d:()=>f,dd:()=>e.toLocaleDateString(b(n.locales),{weekday:"narrow"}),ddd:()=>e.toLocaleDateString(b(n.locales),{weekday:"short"}),dddd:()=>e.toLocaleDateString(b(n.locales),{weekday:"long"}),A:()=>v(u,i),AA:()=>v(u,i,!1,!0),a:()=>v(u,i,!0),aa:()=>v(u,i,!0,!0)};return t.replace(Un,(m,h)=>{var y,p;return(p=h??((y=d[m])==null?void 0:y.call(d)))!=null?p:m})}function jn(e){if(e===null)return new Date(Number.NaN);if(e===void 0)return new Date;if(e instanceof Date)return new Date(e);if(typeof e=="string"&&!/Z$/i.test(e)){const t=e.match($n);if(t){const n=t[2]-1||0,r=(t[7]||"0").substring(0,3);return new Date(t[1],n,t[3]||1,t[4]||0,t[5]||0,t[6]||0,r)}}return new Date(e)}function Go(e,t="HH:mm:ss",n={}){return _(()=>Bn(jn(b(e)),b(t),n))}function ce(e,t=1e3,n={}){const{immediate:r=!0,immediateCallback:o=!1}=n;let a=null;const l=w(!1);function u(){a&&(clearInterval(a),a=null)}function i(){l.value=!1,u()}function c(){const s=b(t);s<=0||(l.value=!0,o&&e(),u(),a=setInterval(e,s))}if(r&&G&&c(),Q(t)||typeof t=="function"){const s=R(t,()=>{l.value&&G&&c()});V(s)}return V(i),{isActive:l,pause:i,resume:c}}function Xo(e=1e3,t={}){const{controls:n=!1,immediate:r=!0,callback:o}=t,a=w(0),l=()=>a.value+=1,u=()=>{a.value=0},i=ce(o?()=>{l(),o(a.value)}:l,e,{immediate:r});return n?{counter:a,reset:u,...i}:a}function Ko(e,t={}){var n;const r=w((n=t.initialValue)!=null?n:null);return R(e,()=>r.value=me(),t),r}function xe(e,t,n={}){const{immediate:r=!0}=n,o=w(!1);let a=null;function l(){a&&(clearTimeout(a),a=null)}function u(){o.value=!1,l()}function i(...c){l(),o.value=!0,a=setTimeout(()=>{o.value=!1,a=null,e(...c)},b(t))}return r&&(o.value=!0,G&&i()),V(u),{isPending:H(o),start:i,stop:u}}function Jo(e=1e3,t={}){const{controls:n=!1,callback:r}=t,o=xe(r??W,e,t),a=_(()=>!o.isPending.value);return n?{ready:a,...o}:a}function Qo(e,t={}){const{method:n="parseFloat",radix:r,nanToZero:o}=t;return _(()=>{let a=b(e);return typeof a=="string"&&(a=Number[n](a,r)),o&&Number.isNaN(a)&&(a=0),a})}function Zo(e){return _(()=>`${b(e)}`)}function ea(e=!1,t={}){const{truthyValue:n=!0,falsyValue:r=!1}=t,o=Q(e),a=w(e);function l(u){if(arguments.length)return a.value=u,a.value;{const i=b(n);return a.value=a.value===i?b(r):i,a.value}}return o?l:[a,l]}function ta(e,t,n){let r=n!=null&&n.immediate?[]:[...e instanceof Function?e():Array.isArray(e)?e:b(e)];return R(e,(o,a,l)=>{const u=Array.from({length:r.length}),i=[];for(const s of o){let f=!1;for(let v=0;v<r.length;v++)if(!u[v]&&s===r[v]){u[v]=!0,f=!0;break}f||i.push(s)}const c=r.filter((s,f)=>!u[f]);t(o,r,i,c,l),r=[...o]},n)}function na(e,t,n){const{count:r,...o}=n,a=w(0),l=Te(e,(...u)=>{a.value+=1,a.value>=b(r)&&re(()=>l()),t(...u)},o);return{count:a,stop:l}}function ra(e,t,n={}){const{debounce:r=0,maxWait:o=void 0,...a}=n;return Te(e,t,{...a,eventFilter:ot(r,{maxWait:o})})}function oa(e,t,n){return R(e,t,{...n,deep:!0})}function Ve(e,t,n={}){const{eventFilter:r=We,...o}=n,a=he(r,t);let l,u,i;if(o.flush==="sync"){const c=w(!1);u=()=>{},l=s=>{c.value=!0,s(),c.value=!1},i=R(e,(...s)=>{c.value||a(...s)},o)}else{const c=[],s=w(0),f=w(0);u=()=>{s.value=f.value},c.push(R(e,()=>{f.value++},{...o,flush:"sync"})),l=v=>{const d=f.value;v(),s.value+=f.value-d},c.push(R(e,(...v)=>{const d=s.value>0&&s.value===f.value;s.value=0,f.value=0,!d&&a(...v)},o)),i=()=>{c.forEach(v=>v())}}return{stop:i,ignoreUpdates:l,ignorePrevAsyncUpdates:u}}function aa(e,t,n){return R(e,t,{...n,immediate:!0})}function ua(e,t,n){const r=R(e,(...o)=>(re(()=>r()),t(...o)),n);return r}function la(e,t,n={}){const{throttle:r=0,trailing:o=!0,leading:a=!0,...l}=n;return Te(e,t,{...l,eventFilter:Be(r,o,a)})}function ia(e,t,n={}){let r;function o(){if(!r)return;const s=r;r=void 0,s()}function a(s){r=s}const l=(s,f)=>(o(),t(s,f,a)),u=Ve(e,l,n),{ignoreUpdates:i}=u;return{...u,trigger:()=>{let s;return i(()=>{s=l(Hn(e),zn(e))}),s}}}function Hn(e){return an(e)?e:Array.isArray(e)?e.map(t=>b(t)):b(e)}function zn(e){return Array.isArray(e)?e.map(()=>{}):void 0}function qn(e,t,n){const r=R(e,(o,a,l)=>{o&&(n!=null&&n.once&&re(()=>r()),t(o,a,l))},{...n,once:!1});return r}function sa(e,t,n){let r;Q(n)?r={evaluating:n}:r=n||{};const{lazy:o=!1,evaluating:a=void 0,shallow:l=!0,onError:u=W}=r,i=w(!o),c=l?U(t):w(t);let s=0;return ve(async f=>{if(!i.value)return;s++;const v=s;let d=!1;a&&Promise.resolve().then(()=>{a.value=!0});try{const m=await e(h=>{f(()=>{a&&(a.value=!1),d||h()})});v===s&&(c.value=m)}catch(m){u(m)}finally{a&&v===s&&(a.value=!1),d=!0}}),o?_(()=>(i.value=!0,c.value)):c}function ca(e,t,n,r){let o=De(e);return n&&(o=De(e,n)),r&&(o=De(e,n,r)),typeof t=="function"?_(a=>t(o,a)):_({get:a=>t.get(o,a),set:t.set})}function fa(e={}){const{inheritAttrs:t=!0}=e,n=U(),r=Ze({setup(a,{slots:l}){return()=>{n.value=l.default}}}),o=Ze({inheritAttrs:t,setup(a,{attrs:l,slots:u}){return()=>{var i;n.value;const c=(i=n.value)==null?void 0:i.call(n,{...Yn(l),$slots:u});return t&&(c==null?void 0:c.length)===1?c[0]:c}}});return hn({define:r,reuse:o},[r,o])}function Yn(e){const t={};for(const n in e)t[kn(n)]=e[n];return t}function da(e={}){let t=0;const n=w([]);function r(...l){const u=Ie({key:t++,args:l,promise:void 0,resolve:()=>{},reject:()=>{},isResolving:!1,options:e});return n.value.push(u),u.promise=new Promise((i,c)=>{u.resolve=s=>(u.isResolving=!0,i(s)),u.reject=c}).finally(()=>{u.promise=void 0;const i=n.value.indexOf(u);i!==-1&&n.value.splice(i,1)}),u.promise}function o(...l){return e.singleton&&n.value.length>0?n.value[0].promise:r(...l)}const a=Ze((l,{slots:u})=>{const i=()=>n.value.map(c=>{var s;return ft(fn,{key:c.key},(s=u.default)==null?void 0:s.call(u,c))});return e.transition?()=>ft(ln,e.transition,i):i});return a.start=o,a}function va(e){return function(...t){return e.apply(this,t.map(n=>b(n)))}}const I=G?window:void 0,ee=G?window.document:void 0,ne=G?window.navigator:void 0,ma=G?window.location:void 0;function N(e){var t;const n=b(e);return(t=n==null?void 0:n.$el)!=null?t:n}function k(...e){let t,n,r,o;if(typeof e[0]=="string"||Array.isArray(e[0])?([n,r,o]=e,t=I):[t,n,r,o]=e,!t)return W;Array.isArray(n)||(n=[n]),Array.isArray(r)||(r=[r]);const a=[],l=()=>{a.forEach(s=>s()),a.length=0},u=(s,f,v,d)=>(s.addEventListener(f,v,d),()=>s.removeEventListener(f,v,d)),i=R(()=>[N(t),b(o)],([s,f])=>{if(l(),!s)return;const v=Ue(f)?{...f}:f;a.push(...n.flatMap(d=>r.map(m=>u(s,d,m,v))))},{immediate:!0,flush:"post"}),c=()=>{i(),l()};return V(c),c}let vt=!1;function pa(e,t,n={}){const{window:r=I,ignore:o=[],capture:a=!0,detectIframe:l=!1}=n;if(!r)return W;et&&!vt&&(vt=!0,Array.from(r.document.body.children).forEach(d=>d.addEventListener("click",W)),r.document.documentElement.addEventListener("click",W));let u=!0;const i=d=>b(o).some(m=>{if(typeof m=="string")return Array.from(r.document.querySelectorAll(m)).some(h=>h===d.target||d.composedPath().includes(h));{const h=N(m);return h&&(d.target===h||d.composedPath().includes(h))}}),c=d=>{const m=N(e);if(!(!m||m===d.target||d.composedPath().includes(m))){if(d.detail===0&&(u=!i(d)),!u){u=!0;return}t(d)}};let s=!1;const f=[k(r,"click",d=>{s||(s=!0,setTimeout(()=>{s=!1},0),c(d))},{passive:!0,capture:a}),k(r,"pointerdown",d=>{const m=N(e);u=!i(d)&&!!(m&&!d.composedPath().includes(m))},{passive:!0}),l&&k(r,"blur",d=>{setTimeout(()=>{var m;const h=N(e);((m=r.document.activeElement)==null?void 0:m.tagName)==="IFRAME"&&!(h!=null&&h.contains(r.document.activeElement))&&t(d)},0)})].filter(Boolean);return()=>f.forEach(d=>d())}function Gn(e){return typeof e=="function"?e:typeof e=="string"?t=>t.key===e:Array.isArray(e)?t=>e.includes(t.key):()=>!0}function ut(...e){let t,n,r={};e.length===3?(t=e[0],n=e[1],r=e[2]):e.length===2?typeof e[1]=="object"?(t=!0,n=e[0],r=e[1]):(t=e[0],n=e[1]):(t=!0,n=e[0]);const{target:o=I,eventName:a="keydown",passive:l=!1,dedupe:u=!1}=r,i=Gn(t);return k(o,a,s=>{s.repeat&&b(u)||i(s)&&n(s)},l)}function ha(e,t,n={}){return ut(e,t,{...n,eventName:"keydown"})}function ya(e,t,n={}){return ut(e,t,{...n,eventName:"keypress"})}function ga(e,t,n={}){return ut(e,t,{...n,eventName:"keyup"})}const Xn=500,Kn=10;function wa(e,t,n){var r,o;const a=_(()=>N(e));let l,u,i,c=!1;function s(){l&&(clearTimeout(l),l=void 0),u=void 0,i=void 0,c=!1}function f(p){var g,S,T;const[x,D,O]=[i,u,c];if(s(),!(n!=null&&n.onMouseUp)||!D||!x||(g=n==null?void 0:n.modifiers)!=null&&g.self&&p.target!==a.value)return;(S=n==null?void 0:n.modifiers)!=null&&S.prevent&&p.preventDefault(),(T=n==null?void 0:n.modifiers)!=null&&T.stop&&p.stopPropagation();const P=p.x-D.x,F=p.y-D.y,E=Math.sqrt(P*P+F*F);n.onMouseUp(p.timeStamp-x,E,O)}function v(p){var g,S,T,x;(g=n==null?void 0:n.modifiers)!=null&&g.self&&p.target!==a.value||(s(),(S=n==null?void 0:n.modifiers)!=null&&S.prevent&&p.preventDefault(),(T=n==null?void 0:n.modifiers)!=null&&T.stop&&p.stopPropagation(),u={x:p.x,y:p.y},i=p.timeStamp,l=setTimeout(()=>{c=!0,t(p)},(x=n==null?void 0:n.delay)!=null?x:Xn))}function d(p){var g,S,T,x;if((g=n==null?void 0:n.modifiers)!=null&&g.self&&p.target!==a.value||!u||(n==null?void 0:n.distanceThreshold)===!1)return;(S=n==null?void 0:n.modifiers)!=null&&S.prevent&&p.preventDefault(),(T=n==null?void 0:n.modifiers)!=null&&T.stop&&p.stopPropagation();const D=p.x-u.x,O=p.y-u.y;Math.sqrt(D*D+O*O)>=((x=n==null?void 0:n.distanceThreshold)!=null?x:Kn)&&s()}const m={capture:(r=n==null?void 0:n.modifiers)==null?void 0:r.capture,once:(o=n==null?void 0:n.modifiers)==null?void 0:o.once},h=[k(a,"pointerdown",v,m),k(a,"pointermove",d,m),k(a,["pointerup","pointerleave"],f,m)];return()=>h.forEach(p=>p())}function Jn(){const{activeElement:e,body:t}=document;if(!e||e===t)return!1;switch(e.tagName){case"INPUT":case"TEXTAREA":return!0}return e.hasAttribute("contenteditable")}function Qn({keyCode:e,metaKey:t,ctrlKey:n,altKey:r}){return t||n||r?!1:e>=48&&e<=57||e>=65&&e<=90||e>=97&&e<=122}function ba(e,t={}){const{document:n=ee}=t;n&&k(n,"keydown",o=>{!Jn()&&Qn(o)&&e(o)},{passive:!0})}function Sa(e,t=null){const n=se();let r=()=>{};const o=pe((a,l)=>(r=l,{get(){var u,i;return a(),(i=(u=n==null?void 0:n.proxy)==null?void 0:u.$refs[e])!=null?i:t},set(){}}));return X(r),Ot(r),o}function Zn(){const e=w(!1),t=se();return t&&rt(()=>{e.value=!0},t),e}function $(e){const t=Zn();return _(()=>(t.value,!!e()))}function _e(e,t,n={}){const{window:r=I,...o}=n;let a;const l=$(()=>r&&"MutationObserver"in r),u=()=>{a&&(a.disconnect(),a=void 0)},i=_(()=>{const v=b(e),d=(Array.isArray(v)?v:[v]).map(N).filter(Pt);return new Set(d)}),c=R(()=>i.value,v=>{u(),l.value&&v.size&&(a=new MutationObserver(t),v.forEach(d=>a.observe(d,o)))},{immediate:!0,flush:"post"}),s=()=>a==null?void 0:a.takeRecords(),f=()=>{c(),u()};return V(f),{isSupported:l,stop:f,takeRecords:s}}function er(e={}){var t;const{window:n=I,deep:r=!0,triggerOnRemoval:o=!1}=e,a=(t=e.document)!=null?t:n==null?void 0:n.document,l=()=>{var c;let s=a==null?void 0:a.activeElement;if(r)for(;s!=null&&s.shadowRoot;)s=(c=s==null?void 0:s.shadowRoot)==null?void 0:c.activeElement;return s},u=w(),i=()=>{u.value=l()};return n&&(k(n,"blur",c=>{c.relatedTarget===null&&i()},!0),k(n,"focus",i,!0)),o&&_e(a,c=>{c.filter(s=>s.removedNodes.length).map(s=>Array.from(s.removedNodes)).flat().forEach(s=>{s===u.value&&i()})},{childList:!0,subtree:!0}),i(),u}function ye(e,t={}){const{immediate:n=!0,fpsLimit:r=void 0,window:o=I}=t,a=w(!1),l=r?1e3/r:null;let u=0,i=null;function c(v){if(!a.value||!o)return;u||(u=v);const d=v-u;if(l&&d<l){i=o.requestAnimationFrame(c);return}u=v,e({delta:d,timestamp:v}),i=o.requestAnimationFrame(c)}function s(){!a.value&&o&&(a.value=!0,u=0,i=o.requestAnimationFrame(c))}function f(){a.value=!1,i!=null&&o&&(o.cancelAnimationFrame(i),i=null)}return n&&s(),V(f),{isActive:H(a),pause:f,resume:s}}function Ea(e,t,n){let r,o;Ue(n)?(r=n,o=Fn(n,["window","immediate","commitStyles","persist","onReady","onError"])):(r={duration:n},o=n);const{window:a=I,immediate:l=!0,commitStyles:u,persist:i,playbackRate:c=1,onReady:s,onError:f=L=>{console.error(L)}}=r,v=$(()=>a&&HTMLElement&&"animate"in HTMLElement.prototype),d=U(void 0),m=Ie({startTime:null,currentTime:null,timeline:null,playbackRate:c,pending:!1,playState:l?"idle":"paused",replaceState:"active"}),h=_(()=>m.pending),y=_(()=>m.playState),p=_(()=>m.replaceState),g=_({get(){return m.startTime},set(L){m.startTime=L,d.value&&(d.value.startTime=L)}}),S=_({get(){return m.currentTime},set(L){m.currentTime=L,d.value&&(d.value.currentTime=L,z())}}),T=_({get(){return m.timeline},set(L){m.timeline=L,d.value&&(d.value.timeline=L)}}),x=_({get(){return m.playbackRate},set(L){m.playbackRate=L,d.value&&(d.value.playbackRate=L)}}),D=()=>{if(d.value)try{d.value.play(),z()}catch(L){B(),f(L)}else A()},O=()=>{var L;try{(L=d.value)==null||L.pause(),B()}catch(j){f(j)}},P=()=>{var L;d.value||A();try{(L=d.value)==null||L.reverse(),z()}catch(j){B(),f(j)}},F=()=>{var L;try{(L=d.value)==null||L.finish(),B()}catch(j){f(j)}},E=()=>{var L;try{(L=d.value)==null||L.cancel(),B()}catch(j){f(j)}};R(()=>N(e),L=>{L&&A()}),R(()=>t,L=>{d.value&&A(),!N(e)&&d.value&&(d.value.effect=new KeyframeEffect(N(e),b(L),o))},{deep:!0}),X(()=>A(!0),!1),V(E);function A(L){const j=N(e);!v.value||!j||(d.value||(d.value=j.animate(b(t),o)),i&&d.value.persist(),c!==1&&(d.value.playbackRate=c),L&&!l?d.value.pause():z(),s==null||s(d.value))}k(d,["cancel","finish","remove"],B),k(d,"finish",()=>{var L;u&&((L=d.value)==null||L.commitStyles())});const{resume:C,pause:M}=ye(()=>{d.value&&(m.pending=d.value.pending,m.playState=d.value.playState,m.replaceState=d.value.replaceState,m.startTime=d.value.startTime,m.currentTime=d.value.currentTime,m.timeline=d.value.timeline,m.playbackRate=d.value.playbackRate)},{immediate:!1});function z(){v.value&&C()}function B(){v.value&&a&&a.requestAnimationFrame(M)}return{isSupported:v,animate:d,play:D,pause:O,reverse:P,finish:F,cancel:E,pending:h,playState:y,replaceState:p,startTime:g,currentTime:S,timeline:T,playbackRate:x}}function Ta(e,t){const{interrupt:n=!0,onError:r=W,onFinished:o=W,signal:a}=t||{},l={aborted:"aborted",fulfilled:"fulfilled",pending:"pending",rejected:"rejected"},u=Array.from(Array.from({length:e.length}),()=>({state:l.pending,data:null})),i=q(u),c=w(-1);if(!e||e.length===0)return o(),{activeIndex:c,result:i};function s(f,v){c.value++,i[c.value].data=v,i[c.value].state=f}return e.reduce((f,v)=>f.then(d=>{var m;if(a!=null&&a.aborted){s(l.aborted,new Error("aborted"));return}if(((m=i[c.value])==null?void 0:m.state)===l.rejected&&n){o();return}const h=v(d).then(y=>(s(l.fulfilled,y),c.value===e.length-1&&o(),y));return a?Promise.race([h,tr(a)]):h}).catch(d=>a!=null&&a.aborted?(s(l.aborted,d),d):(s(l.rejected,d),r(),d)),Promise.resolve()),{activeIndex:c,result:i}}function tr(e){return new Promise((t,n)=>{const r=new Error("aborted");e.aborted?n(r):e.addEventListener("abort",()=>n(r),{once:!0})})}function nr(e,t,n){const{immediate:r=!0,delay:o=0,onError:a=W,onSuccess:l=W,resetOnExecute:u=!0,shallow:i=!0,throwError:c}=n??{},s=i?U(t):w(t),f=w(!1),v=w(!1),d=U(void 0);async function m(p=0,...g){u&&(s.value=t),d.value=void 0,f.value=!1,v.value=!0,p>0&&await Le(p);const S=typeof e=="function"?e(...g):e;try{const T=await S;s.value=T,f.value=!0,l(T)}catch(T){if(d.value=T,a(T),c)throw T}finally{v.value=!1}return s.value}r&&m(o);const h={state:s,isReady:f,isLoading:v,error:d,execute:m};function y(){return new Promise((p,g)=>{Ne(v).toBe(!1).then(()=>p(h)).catch(g)})}return{...h,then(p,g){return y().then(p,g)}}}const be={array:e=>JSON.stringify(e),object:e=>JSON.stringify(e),set:e=>JSON.stringify(Array.from(e)),map:e=>JSON.stringify(Object.fromEntries(e)),null:()=>""};function rr(e){return e?e instanceof Map?be.map:e instanceof Set?be.set:Array.isArray(e)?be.array:be.object:be.null}function xa(e,t){const n=w(""),r=w();function o(){if(G)return r.value=new Promise((a,l)=>{try{const u=b(e);if(u==null)a("");else if(typeof u=="string")a(qe(new Blob([u],{type:"text/plain"})));else if(u instanceof Blob)a(qe(u));else if(u instanceof ArrayBuffer)a(window.btoa(String.fromCharCode(...new Uint8Array(u))));else if(u instanceof HTMLCanvasElement)a(u.toDataURL(t==null?void 0:t.type,t==null?void 0:t.quality));else if(u instanceof HTMLImageElement){const i=u.cloneNode(!1);i.crossOrigin="Anonymous",or(i).then(()=>{const c=document.createElement("canvas"),s=c.getContext("2d");c.width=i.width,c.height=i.height,s.drawImage(i,0,0,c.width,c.height),a(c.toDataURL(t==null?void 0:t.type,t==null?void 0:t.quality))}).catch(l)}else if(typeof u=="object"){const c=((t==null?void 0:t.serializer)||rr(u))(u);return a(qe(new Blob([c],{type:"application/json"})))}else l(new Error("target is unsupported types"))}catch(u){l(u)}}),r.value.then(a=>n.value=a),r.value}return Q(e)||typeof e=="function"?R(e,o,{immediate:!0}):o(),{base64:n,promise:r,execute:o}}function or(e){return new Promise((t,n)=>{e.complete?t():(e.onload=()=>{t()},e.onerror=n)})}function qe(e){return new Promise((t,n)=>{const r=new FileReader;r.onload=o=>{t(o.target.result)},r.onerror=n,r.readAsDataURL(e)})}function _a(e={}){const{navigator:t=ne}=e,n=["chargingchange","chargingtimechange","dischargingtimechange","levelchange"],r=$(()=>t&&"getBattery"in t&&typeof t.getBattery=="function"),o=w(!1),a=w(0),l=w(0),u=w(1);let i;function c(){o.value=this.charging,a.value=this.chargingTime||0,l.value=this.dischargingTime||0,u.value=this.level}return r.value&&t.getBattery().then(s=>{i=s,c.call(i),k(i,n,c,{passive:!0})}),{isSupported:r,charging:o,chargingTime:a,dischargingTime:l,level:u}}function ka(e){let{acceptAllDevices:t=!1}=e||{};const{filters:n=void 0,optionalServices:r=void 0,navigator:o=ne}=e||{},a=$(()=>o&&"bluetooth"in o),l=U(void 0),u=U(null);R(l,()=>{f()});async function i(){if(a.value){u.value=null,n&&n.length>0&&(t=!1);try{l.value=await(o==null?void 0:o.bluetooth.requestDevice({acceptAllDevices:t,filters:n,optionalServices:r}))}catch(v){u.value=v}}}const c=w(),s=_(()=>{var v;return((v=c.value)==null?void 0:v.connected)||!1});async function f(){if(u.value=null,l.value&&l.value.gatt){l.value.addEventListener("gattserverdisconnected",()=>{});try{c.value=await l.value.gatt.connect()}catch(v){u.value=v}}}return X(()=>{var v;l.value&&((v=l.value.gatt)==null||v.connect())}),V(()=>{var v;l.value&&((v=l.value.gatt)==null||v.disconnect())}),{isSupported:a,isConnected:s,device:l,requestDevice:i,server:c,error:u}}function te(e,t={}){const{window:n=I}=t,r=$(()=>n&&"matchMedia"in n&&typeof n.matchMedia=="function");let o;const a=w(!1),l=c=>{a.value=c.matches},u=()=>{o&&("removeEventListener"in o?o.removeEventListener("change",l):o.removeListener(l))},i=ve(()=>{r.value&&(u(),o=n.matchMedia(b(e)),"addEventListener"in o?o.addEventListener("change",l):o.addListener(l),a.value=o.matches)});return V(()=>{i(),u(),o=void 0}),a}const Oa={sm:640,md:768,lg:1024,xl:1280,"2xl":1536},Aa={xs:0,sm:576,md:768,lg:992,xl:1200,xxl:1400},ar={xs:0,sm:600,md:960,lg:1264,xl:1904},Pa={xs:0,sm:600,md:960,lg:1280,xl:1920,xxl:2560},Fa=ar,Da={xs:480,sm:576,md:768,lg:992,xl:1200,xxl:1600},Ca={xs:0,sm:600,md:1024,lg:1440,xl:1920},Ra={mobileS:320,mobileM:375,mobileL:425,tablet:768,laptop:1024,laptopL:1440,desktop4K:2560},Ia={"3xs":360,"2xs":480,xs:600,sm:768,md:1024,lg:1280,xl:1440,"2xl":1600,"3xl":1920,"4xl":2560},La={sm:576,md:768,lg:992,xl:1200};function Ma(e,t={}){function n(s,f){let v=b(e[b(s)]);return f!=null&&(v=An(v,f)),typeof v=="number"&&(v=`${v}px`),v}const{window:r=I,strategy:o="min-width"}=t;function a(s){return r?r.matchMedia(s).matches:!1}const l=s=>te(()=>`(min-width: ${n(s)})`,t),u=s=>te(()=>`(max-width: ${n(s)})`,t),i=Object.keys(e).reduce((s,f)=>(Object.defineProperty(s,f,{get:()=>o==="min-width"?l(f):u(f),enumerable:!0,configurable:!0}),s),{});function c(){const s=Object.keys(e).map(f=>[f,l(f)]);return _(()=>s.filter(([,f])=>f.value).map(([f])=>f))}return Object.assign(i,{greaterOrEqual:l,smallerOrEqual:u,greater(s){return te(()=>`(min-width: ${n(s,.1)})`,t)},smaller(s){return te(()=>`(max-width: ${n(s,-.1)})`,t)},between(s,f){return te(()=>`(min-width: ${n(s)}) and (max-width: ${n(f,-.1)})`,t)},isGreater(s){return a(`(min-width: ${n(s,.1)})`)},isGreaterOrEqual(s){return a(`(min-width: ${n(s)})`)},isSmaller(s){return a(`(max-width: ${n(s,-.1)})`)},isSmallerOrEqual(s){return a(`(max-width: ${n(s)})`)},isInBetween(s,f){return a(`(min-width: ${n(s)}) and (max-width: ${n(f,-.1)})`)},current:c,active(){const s=c();return _(()=>s.value.length===0?"":s.value.at(-1))}})}function Na(e){const{name:t,window:n=I}=e,r=$(()=>n&&"BroadcastChannel"in n),o=w(!1),a=w(),l=w(),u=U(null),i=s=>{a.value&&a.value.postMessage(s)},c=()=>{a.value&&a.value.close(),o.value=!0};return r.value&&X(()=>{u.value=null,a.value=new BroadcastChannel(t),a.value.addEventListener("message",s=>{l.value=s.data},{passive:!0}),a.value.addEventListener("messageerror",s=>{u.value=s},{passive:!0}),a.value.addEventListener("close",()=>{o.value=!0})}),V(()=>{c()}),{isSupported:r,channel:a,data:l,post:i,close:c,error:u,isClosed:o}}const mt=["hash","host","hostname","href","pathname","port","protocol","search"];function Va(e={}){const{window:t=I}=e,n=Object.fromEntries(mt.map(a=>[a,w()]));for(const[a,l]of Dn(n))R(l,u=>{!(t!=null&&t.location)||t.location[a]===u||(t.location[a]=u)});const r=a=>{var l;const{state:u,length:i}=(t==null?void 0:t.history)||{},{origin:c}=(t==null?void 0:t.location)||{};for(const s of mt)n[s].value=(l=t==null?void 0:t.location)==null?void 0:l[s];return q({trigger:a,state:u,length:i,origin:c,...n})},o=w(r("load"));return t&&(k(t,"popstate",()=>o.value=r("popstate"),{passive:!0}),k(t,"hashchange",()=>o.value=r("hashchange"),{passive:!0})),o}function $a(e,t=(r,o)=>r===o,n){const r=w(e.value);return R(()=>e.value,o=>{t(o,r.value)||(r.value=o)},n),r}function nt(e,t={}){const{controls:n=!1,navigator:r=ne}=t,o=$(()=>r&&"permissions"in r),a=U(),l=typeof e=="string"?{name:e}:e,u=U(),i=()=>{var s,f;u.value=(f=(s=a.value)==null?void 0:s.state)!=null?f:"prompt"};k(a,"change",i);const c=On(async()=>{if(o.value){if(!a.value)try{a.value=await r.permissions.query(l)}catch{a.value=void 0}finally{i()}if(n)return sn(a.value)}});return c(),n?{state:u,isSupported:o,query:c}:u}function Ua(e={}){const{navigator:t=ne,read:n=!1,source:r,copiedDuring:o=1500,legacy:a=!1}=e,l=$(()=>t&&"clipboard"in t),u=nt("clipboard-read"),i=nt("clipboard-write"),c=_(()=>l.value||a),s=w(""),f=w(!1),v=xe(()=>f.value=!1,o);function d(){l.value&&p(u.value)?t.clipboard.readText().then(g=>{s.value=g}):s.value=y()}c.value&&n&&k(["copy","cut"],d);async function m(g=b(r)){c.value&&g!=null&&(l.value&&p(i.value)?await t.clipboard.writeText(g):h(g),s.value=g,f.value=!0,v.start())}function h(g){const S=document.createElement("textarea");S.value=g??"",S.style.position="absolute",S.style.opacity="0",document.body.appendChild(S),S.select(),document.execCommand("copy"),S.remove()}function y(){var g,S,T;return(T=(S=(g=document==null?void 0:document.getSelection)==null?void 0:g.call(document))==null?void 0:S.toString())!=null?T:""}function p(g){return g==="granted"||g==="prompt"}return{isSupported:c,text:s,copied:f,copy:m}}function Wa(e={}){const{navigator:t=ne,read:n=!1,source:r,copiedDuring:o=1500}=e,a=$(()=>t&&"clipboard"in t),l=w([]),u=w(!1),i=xe(()=>u.value=!1,o);function c(){a.value&&t.clipboard.read().then(f=>{l.value=f})}a.value&&n&&k(["copy","cut"],c);async function s(f=b(r)){a.value&&f!=null&&(await t.clipboard.write(f),l.value=f,u.value=!0,i.start())}return{isSupported:a,content:l,copied:u,copy:s}}function He(e){return JSON.parse(JSON.stringify(e))}function Ba(e,t={}){const n=w({}),{manual:r,clone:o=He,deep:a=!0,immediate:l=!0}=t;function u(){n.value=o(b(e))}return!r&&(Q(e)||typeof e=="function")?R(e,u,{...t,deep:a,immediate:l}):u(),{cloned:n,sync:u}}const ke=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Oe="__vueuse_ssr_handlers__",Nt=ur();function ur(){return Oe in ke||(ke[Oe]=ke[Oe]||{}),ke[Oe]}function lt(e,t){return Nt[e]||t}function ja(e,t){Nt[e]=t}function Vt(e){return te("(prefers-color-scheme: dark)",e)}function $t(e){return e==null?"any":e instanceof Set?"set":e instanceof Map?"map":e instanceof Date?"date":typeof e=="boolean"?"boolean":typeof e=="string"?"string":typeof e=="object"?"object":Number.isNaN(e)?"any":"number"}const Ut={boolean:{read:e=>e==="true",write:e=>String(e)},object:{read:e=>JSON.parse(e),write:e=>JSON.stringify(e)},number:{read:e=>Number.parseFloat(e),write:e=>String(e)},any:{read:e=>e,write:e=>String(e)},string:{read:e=>e,write:e=>String(e)},map:{read:e=>new Map(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e.entries()))},set:{read:e=>new Set(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e))},date:{read:e=>new Date(e),write:e=>e.toISOString()}},pt="vueuse-storage";function it(e,t,n,r={}){var o;const{flush:a="pre",deep:l=!0,listenToStorageChanges:u=!0,writeDefaults:i=!0,mergeDefaults:c=!1,shallow:s,window:f=I,eventFilter:v,onError:d=E=>{console.error(E)},initOnMounted:m}=r,h=(s?U:w)(typeof t=="function"?t():t);if(!n)try{n=lt("getDefaultStorage",()=>{var E;return(E=I)==null?void 0:E.localStorage})()}catch(E){d(E)}if(!n)return h;const y=b(t),p=$t(y),g=(o=r.serializer)!=null?o:Ut[p],{pause:S,resume:T}=Me(h,()=>D(h.value),{flush:a,deep:l,eventFilter:v});f&&u&&X(()=>{n instanceof Storage?k(f,"storage",P):k(f,pt,F),m&&P()}),m||P();function x(E,A){if(f){const C={key:e,oldValue:E,newValue:A,storageArea:n};f.dispatchEvent(n instanceof Storage?new StorageEvent("storage",C):new CustomEvent(pt,{detail:C}))}}function D(E){try{const A=n.getItem(e);if(E==null)x(A,null),n.removeItem(e);else{const C=g.write(E);A!==C&&(n.setItem(e,C),x(A,C))}}catch(A){d(A)}}function O(E){const A=E?E.newValue:n.getItem(e);if(A==null)return i&&y!=null&&n.setItem(e,g.write(y)),y;if(!E&&c){const C=g.read(A);return typeof c=="function"?c(C,y):p==="object"&&!Array.isArray(C)?{...y,...C}:C}else return typeof A!="string"?A:g.read(A)}function P(E){if(!(E&&E.storageArea!==n)){if(E&&E.key==null){h.value=y;return}if(!(E&&E.key!==e)){S();try{(E==null?void 0:E.newValue)!==g.write(h.value)&&(h.value=O(E))}catch(A){d(A)}finally{E?re(T):T()}}}}function F(E){P(E.detail)}return h}const lr="*,*::before,*::after{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}";function ir(e={}){const{selector:t="html",attribute:n="class",initialValue:r="auto",window:o=I,storage:a,storageKey:l="vueuse-color-scheme",listenToStorageChanges:u=!0,storageRef:i,emitAuto:c,disableTransition:s=!0}=e,f={auto:"",light:"light",dark:"dark",...e.modes||{}},v=Vt({window:o}),d=_(()=>v.value?"dark":"light"),m=i||(l==null?Y(r):it(l,r,a,{window:o,listenToStorageChanges:u})),h=_(()=>m.value==="auto"?d.value:m.value),y=lt("updateHTMLAttrs",(T,x,D)=>{const O=typeof T=="string"?o==null?void 0:o.document.querySelector(T):N(T);if(!O)return;const P=new Set,F=new Set;let E=null;if(x==="class"){const C=D.split(/\s/g);Object.values(f).flatMap(M=>(M||"").split(/\s/g)).filter(Boolean).forEach(M=>{C.includes(M)?P.add(M):F.add(M)})}else E={key:x,value:D};if(P.size===0&&F.size===0&&E===null)return;let A;s&&(A=o.document.createElement("style"),A.appendChild(document.createTextNode(lr)),o.document.head.appendChild(A));for(const C of P)O.classList.add(C);for(const C of F)O.classList.remove(C);E&&O.setAttribute(E.key,E.value),s&&(o.getComputedStyle(A).opacity,document.head.removeChild(A))});function p(T){var x;y(t,n,(x=f[T])!=null?x:T)}function g(T){e.onChanged?e.onChanged(T,p):p(T)}R(h,g,{flush:"post",immediate:!0}),X(()=>g(h.value));const S=_({get(){return c?m.value:h.value},set(T){m.value=T}});try{return Object.assign(S,{store:m,system:d,state:h})}catch{return S}}function Ha(e=w(!1)){const t=Z(),n=Z(),r=Z();let o=W;const a=i=>(r.trigger(i),e.value=!0,new Promise(c=>{o=c})),l=i=>{e.value=!1,t.trigger(i),o({data:i,isCanceled:!1})},u=i=>{e.value=!1,n.trigger(i),o({data:i,isCanceled:!0})};return{isRevealed:_(()=>e.value),reveal:a,confirm:l,cancel:u,onReveal:r.on,onConfirm:t.on,onCancel:n.on}}function Ae(e,t,n={}){const{window:r=I,initialValue:o,observe:a=!1}=n,l=w(o),u=_(()=>{var c;return N(t)||((c=r==null?void 0:r.document)==null?void 0:c.documentElement)});function i(){var c;const s=b(e),f=b(u);if(f&&r&&s){const v=(c=r.getComputedStyle(f).getPropertyValue(s))==null?void 0:c.trim();l.value=v||o}}return a&&_e(u,i,{attributeFilter:["style","class"],window:r}),R([u,()=>b(e)],(c,s)=>{s[0]&&s[1]&&s[0].style.removeProperty(s[1]),i()},{immediate:!0}),R(l,c=>{var s;const f=b(e);(s=u.value)!=null&&s.style&&f&&(c==null?u.value.style.removeProperty(f):u.value.style.setProperty(f,c))}),l}function sr(e){const t=se(),n=dn(()=>null,()=>e?N(e):t.proxy.$el);return Ot(n.trigger),rt(n.trigger),n}function za(e,t){const n=U(c()),r=Y(e),o=_({get(){var s;const f=r.value;let v=t!=null&&t.getIndexOf?t.getIndexOf(n.value,f):f.indexOf(n.value);return v<0&&(v=(s=t==null?void 0:t.fallbackIndex)!=null?s:0),v},set(s){a(s)}});function a(s){const f=r.value,v=f.length,d=(s%v+v)%v,m=f[d];return n.value=m,m}function l(s=1){return a(o.value+s)}function u(s=1){return l(s)}function i(s=1){return l(-s)}function c(){var s,f;return(f=b((s=t==null?void 0:t.initialValue)!=null?s:b(e)[0]))!=null?f:void 0}return R(r,()=>a(o.value)),{state:n,index:o,next:u,prev:i,go:a}}function qa(e={}){const{valueDark:t="dark",valueLight:n="",window:r=I}=e,o=ir({...e,onChanged:(u,i)=>{var c;e.onChanged?(c=e.onChanged)==null||c.call(e,u==="dark",i,u):i(u)},modes:{dark:t,light:n}}),a=_(()=>o.system?o.system.value:Vt({window:r}).value?"dark":"light");return _({get(){return o.value==="dark"},set(u){const i=u?"dark":"light";a.value===i?o.value="auto":o.value=i}})}function Wt(e){return e}function cr(e,t){return e.value=t}function fr(e){return e?typeof e=="function"?e:He:Wt}function dr(e){return e?typeof e=="function"?e:He:Wt}function vr(e,t={}){const{clone:n=!1,dump:r=fr(n),parse:o=dr(n),setSource:a=cr}=t;function l(){return cn({snapshot:r(e.value),timestamp:me()})}const u=w(l()),i=w([]),c=w([]),s=S=>{a(e,o(S.snapshot)),u.value=S},f=()=>{i.value.unshift(u.value),u.value=l(),t.capacity&&i.value.length>t.capacity&&i.value.splice(t.capacity,Number.POSITIVE_INFINITY),c.value.length&&c.value.splice(0,c.value.length)},v=()=>{i.value.splice(0,i.value.length),c.value.splice(0,c.value.length)},d=()=>{const S=i.value.shift();S&&(c.value.unshift(u.value),s(S))},m=()=>{const S=c.value.shift();S&&(i.value.unshift(u.value),s(S))},h=()=>{s(u.value)},y=_(()=>[u.value,...i.value]),p=_(()=>i.value.length>0),g=_(()=>c.value.length>0);return{source:e,undoStack:i,redoStack:c,last:u,history:y,canUndo:p,canRedo:g,clear:v,commit:f,reset:h,undo:d,redo:m}}function Bt(e,t={}){const{deep:n=!1,flush:r="pre",eventFilter:o}=t,{eventFilter:a,pause:l,resume:u,isActive:i}=Ft(o),{ignoreUpdates:c,ignorePrevAsyncUpdates:s,stop:f}=Ve(e,y,{deep:n,flush:r,eventFilter:a});function v(T,x){s(),c(()=>{T.value=x})}const d=vr(e,{...t,clone:t.clone||n,setSource:v}),{clear:m,commit:h}=d;function y(){s(),h()}function p(T){u(),T&&y()}function g(T){let x=!1;const D=()=>x=!0;c(()=>{T(D)}),x||y()}function S(){f(),m()}return{...d,isTracking:i,pause:l,resume:p,commit:y,batch:g,dispose:S}}function Ya(e,t={}){const n=t.debounce?ot(t.debounce):void 0;return{...Bt(e,{...t,eventFilter:n})}}function Ga(e={}){const{window:t=I,eventFilter:n=We}=e,r=w({x:null,y:null,z:null}),o=w({alpha:null,beta:null,gamma:null}),a=w(0),l=w({x:null,y:null,z:null});if(t){const u=he(n,i=>{r.value=i.acceleration,l.value=i.accelerationIncludingGravity,o.value=i.rotationRate,a.value=i.interval});k(t,"devicemotion",u)}return{acceleration:r,accelerationIncludingGravity:l,rotationRate:o,interval:a}}function mr(e={}){const{window:t=I}=e,n=$(()=>t&&"DeviceOrientationEvent"in t),r=w(!1),o=w(null),a=w(null),l=w(null);return t&&n.value&&k(t,"deviceorientation",u=>{r.value=u.absolute,o.value=u.alpha,a.value=u.beta,l.value=u.gamma}),{isSupported:n,isAbsolute:r,alpha:o,beta:a,gamma:l}}function Xa(e={}){const{window:t=I}=e,n=w(1);if(t){let r=function(){n.value=t.devicePixelRatio,o(),a=t.matchMedia(`(resolution: ${n.value}dppx)`),a.addEventListener("change",r,{once:!0})},o=function(){a==null||a.removeEventListener("change",r)},a;r(),V(o)}return{pixelRatio:n}}function Ka(e={}){const{navigator:t=ne,requestPermissions:n=!1,constraints:r={audio:!0,video:!0},onUpdated:o}=e,a=w([]),l=_(()=>a.value.filter(m=>m.kind==="videoinput")),u=_(()=>a.value.filter(m=>m.kind==="audioinput")),i=_(()=>a.value.filter(m=>m.kind==="audiooutput")),c=$(()=>t&&t.mediaDevices&&t.mediaDevices.enumerateDevices),s=w(!1);let f;async function v(){c.value&&(a.value=await t.mediaDevices.enumerateDevices(),o==null||o(a.value),f&&(f.getTracks().forEach(m=>m.stop()),f=null))}async function d(){if(!c.value)return!1;if(s.value)return!0;const{state:m,query:h}=nt("camera",{controls:!0});return await h(),m.value!=="granted"&&(f=await t.mediaDevices.getUserMedia(r),v()),s.value=!0,s.value}return c.value&&(n&&d(),k(t.mediaDevices,"devicechange",v),v()),{devices:a,ensurePermissions:d,permissionGranted:s,videoInputs:l,audioInputs:u,audioOutputs:i,isSupported:c}}function Ja(e={}){var t;const n=w((t=e.enabled)!=null?t:!1),r=e.video,o=e.audio,{navigator:a=ne}=e,l=$(()=>{var d;return(d=a==null?void 0:a.mediaDevices)==null?void 0:d.getDisplayMedia}),u={audio:o,video:r},i=U();async function c(){var d;if(!(!l.value||i.value))return i.value=await a.mediaDevices.getDisplayMedia(u),(d=i.value)==null||d.getTracks().forEach(m=>m.addEventListener("ended",f)),i.value}async function s(){var d;(d=i.value)==null||d.getTracks().forEach(m=>m.stop()),i.value=void 0}function f(){s(),n.value=!1}async function v(){return await c(),i.value&&(n.value=!0),i.value}return R(n,d=>{d?c():s()},{immediate:!0}),{isSupported:l,stream:i,start:v,stop:f,enabled:n}}function pr(e={}){const{document:t=ee}=e;if(!t)return w("visible");const n=w(t.visibilityState);return k(t,"visibilitychange",()=>{n.value=t.visibilityState}),n}function Qa(e,t={}){var n,r;const{pointerTypes:o,preventDefault:a,stopPropagation:l,exact:u,onMove:i,onEnd:c,onStart:s,initialValue:f,axis:v="both",draggingElement:d=I,containerElement:m,handle:h=e,buttons:y=[0]}=t,p=w((n=b(f))!=null?n:{x:0,y:0}),g=w(),S=P=>o?o.includes(P.pointerType):!0,T=P=>{b(a)&&P.preventDefault(),b(l)&&P.stopPropagation()},x=P=>{var F;if(!b(y).includes(P.button)||b(t.disabled)||!S(P)||b(u)&&P.target!==b(e))return;const E=b(m),A=(F=E==null?void 0:E.getBoundingClientRect)==null?void 0:F.call(E),C=b(e).getBoundingClientRect(),M={x:P.clientX-(E?C.left-A.left+E.scrollLeft:C.left),y:P.clientY-(E?C.top-A.top+E.scrollTop:C.top)};(s==null?void 0:s(M,P))!==!1&&(g.value=M,T(P))},D=P=>{if(b(t.disabled)||!S(P)||!g.value)return;const F=b(m),E=b(e).getBoundingClientRect();let{x:A,y:C}=p.value;(v==="x"||v==="both")&&(A=P.clientX-g.value.x,F&&(A=Math.min(Math.max(0,A),F.scrollWidth-E.width))),(v==="y"||v==="both")&&(C=P.clientY-g.value.y,F&&(C=Math.min(Math.max(0,C),F.scrollHeight-E.height))),p.value={x:A,y:C},i==null||i(p.value,P),T(P)},O=P=>{b(t.disabled)||!S(P)||g.value&&(g.value=void 0,c==null||c(p.value,P),T(P))};if(G){const P={capture:(r=t.capture)!=null?r:!0};k(h,"pointerdown",x,P),k(d,"pointermove",D,P),k(d,"pointerup",O,P)}return{...Lt(p),position:p,isDragging:_(()=>!!g.value),style:_(()=>`left:${p.value.x}px;top:${p.value.y}px;`)}}function Za(e,t={}){var n,r;const o=w(!1),a=U(null);let l=0,u=!0;if(G){const i=typeof t=="function"?{onDrop:t}:t,c=(n=i.multiple)!=null?n:!0,s=(r=i.preventDefaultForUnhandled)!=null?r:!1,f=h=>{var y,p;const g=Array.from((p=(y=h.dataTransfer)==null?void 0:y.files)!=null?p:[]);return g.length===0?null:c?g:[g[0]]},v=h=>{if(i.dataTypes){const y=ae(i.dataTypes);return typeof y=="function"?y(h):y?y.some(p=>h.includes(p)):!0}return!0},d=h=>{var y,p;const g=Array.from((p=(y=h.dataTransfer)==null?void 0:y.items)!=null?p:[]),S=g.filter(D=>D.kind==="file").map(D=>D.type),T=v(S),x=c||g.filter(D=>D.kind==="file").length<=1;return T&&x},m=(h,y)=>{var p,g,S,T;if(u=d(h),!u){s&&h.preventDefault(),h.dataTransfer&&(h.dataTransfer.dropEffect="none");return}h.preventDefault(),h.dataTransfer&&(h.dataTransfer.dropEffect="copy");const x=f(h);switch(y){case"enter":l+=1,o.value=!0,(p=i.onEnter)==null||p.call(i,null,h);break;case"over":(g=i.onOver)==null||g.call(i,null,h);break;case"leave":l-=1,l===0&&(o.value=!1),(S=i.onLeave)