2 lines
10 KiB
JavaScript
2 lines
10 KiB
JavaScript
|
|
import{g as ne,e as re,u as le,i as G,f as K,n as J,r as O,t as ie,j as Q,k as ue,l as q,w as _,b as C,m as ae,s as oe}from"./@vue.54440ad7.js";function H(e){return ne()?(re(e),!0):!1}function D(e){return typeof e=="function"?e():le(e)}const I=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const se=e=>typeof e<"u",ce=Object.prototype.toString,fe=e=>ce.call(e)==="[object Object]",W=()=>{};function Y(e,n){function t(...i){return new Promise((r,l)=>{Promise.resolve(e(()=>n.apply(this,i),{fn:n,thisArg:this,args:i})).then(r).catch(l)})}return t}const U=e=>e();function de(...e){let n=0,t,i=!0,r=W,l,c,a,o,d;!G(e[0])&&typeof e[0]=="object"?{delay:c,trailing:a=!0,leading:o=!0,rejectOnCancel:d=!1}=e[0]:[c,a=!0,o=!0,d=!1]=e;const v=()=>{t&&(clearTimeout(t),t=void 0,r(),r=W)};return S=>{const f=D(c),g=Date.now()-n,m=()=>l=S();return v(),f<=0?(n=Date.now(),m()):(g>f&&(o||!i)?(n=Date.now(),m()):a&&(l=new Promise((y,u)=>{r=d?u:y,t=setTimeout(()=>{n=Date.now(),i=!0,y(m()),v()},Math.max(0,f-g))})),!o&&!t&&(t=setTimeout(()=>i=!0,f)),i=!1,l)}}function ve(e=U){const n=O(!0);function t(){n.value=!1}function i(){n.value=!0}const r=(...l)=>{n.value&&e(...l)};return{isActive:Q(n),pause:t,resume:i,eventFilter:r}}function me(e){return e||q()}function pe(...e){if(e.length!==1)return ie(...e);const n=e[0];return typeof n=="function"?Q(ue(()=>({get:n,set:W}))):O(n)}function De(e,n=200,t=!1,i=!0,r=!1){return Y(de(n,t,i,r),e)}function he(e,n,t={}){const{eventFilter:i=U,...r}=t;return _(e,Y(i,n),r)}function ge(e,n,t={}){const{eventFilter:i,...r}=t,{eventFilter:l,pause:c,resume:a,isActive:o}=ve(i);return{stop:he(e,n,{...r,eventFilter:l}),pause:c,resume:a,isActive:o}}function P(e,n=!0,t){me()?K(e,t):n?e():J(e)}function Me(e=!1,n={}){const{truthyValue:t=!0,falsyValue:i=!1}=n,r=G(e),l=O(e);function c(a){if(arguments.length)return l.value=a,l.value;{const o=D(t);return l.value=l.value===o?D(i):o,l.value}}return r?c:[l,c]}function j(e){var n;const t=D(e);return(n=t==null?void 0:t.$el)!=null?n:t}const M=I?window:void 0,we=I?window.document:void 0;I&&window.navigator;I&&window.location;function R(...e){let n,t,i,r;if(typeof e[0]=="string"||Array.isArray(e[0])?([t,i,r]=e,n=M):[n,t,i,r]=e,!n)return W;Array.isArray(t)||(t=[t]),Array.isArray(i)||(i=[i]);const l=[],c=()=>{l.forEach(v=>v()),l.length=0},a=(v,h,S,f)=>(v.addEventListener(h,S,f),()=>v.removeEventListener(h,S,f)),o=_(()=>[j(n),D(r)],([v,h])=>{if(c(),!v)return;const S=fe(h)?{...h}:h;l.push(...t.flatMap(f=>i.map(g=>a(v,f,g,S))))},{immediate:!0,flush:"post"}),d=()=>{o(),c()};return H(d),d}function ye(){const e=O(!1),n=q();return n&&K(()=>{e.value=!0},n),e}function X(e){const n=ye();return C(()=>(n.value,Boolean(e())))}function Z(e,n={}){const{window:t=M}=n,i=X(()=>t&&"matchMedia"in t&&typeof t.matchMedia=="function");let r;const l=O(!1),c=d=>{l.value=d.matches},a=()=>{!r||("removeEventListener"in r?r.removeEventListener("change",c):r.removeListener(c))},o=ae(()=>{!i.value||(a(),r=t.matchMedia(D(e)),"addEventListener"in r?r.addEventListener("change",c):r.addListener(c),l.value=r.matches)});return H(()=>{o(),a(),r=void 0}),l}function Se(e){return JSON.parse(JSON.stringify(e))}const x=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},z="__vueuse_ssr_handlers__",be=Fe();function Fe(){return z in x||(x[z]=x[z]||{}),x[z]}function ee(e,n){return be[e]||n}function Ee(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 ke={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
|