Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@vueuse/components

Package Overview
Dependencies
Maintainers
3
Versions
162
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@vueuse/components - npm Package Compare versions

Comparing version 9.2.0 to 9.3.0

51

index.d.ts
import * as vue_demi from 'vue-demi';
import { FunctionDirective, ObjectDirective, ComponentPublicInstance, Ref, UnwrapNestedRefs, ComputedRef } from 'vue-demi';
import { MaybeComputedRef, MaybeRef, ConfigurableEventFilter, ConfigurableFlush } from '@vueuse/shared';
import { ComponentPublicInstance, ObjectDirective, Ref, UnwrapNestedRefs, ComputedRef, FunctionDirective } from 'vue-demi';
import { MaybeRef, MaybeComputedRef, ConfigurableEventFilter, ConfigurableFlush } from '@vueuse/shared';
import { UseDarkOptions, UseDevicesListOptions, UseDraggableOptions, ElementSize as ElementSize$1, UseGeolocationOptions, UseIdleOptions, UseMouseOptions, MouseInElementOptions, MousePressedOptions, UseNowOptions, UsePointerOptions, UseTimeAgoOptions, UseTimestampOptions, UseVirtualListOptions, UseWindowSizeOptions } from '@vueuse/core';

@@ -21,4 +21,31 @@

declare const vOnClickOutside: FunctionDirective<any, <E = PointerEvent>(evt: E) => void>;
declare type VueInstance = ComponentPublicInstance;
declare type MaybeElementRef<T extends MaybeElement = MaybeElement> = MaybeRef<T>;
declare type MaybeComputedElementRef<T extends MaybeElement = MaybeElement> = MaybeComputedRef<T>;
declare type MaybeElement = HTMLElement | SVGElement | VueInstance | undefined | null;
interface OnClickOutsideOptions extends ConfigurableWindow {
/**
* List of elements that should not trigger the event.
*/
ignore?: MaybeElementRef[];
/**
* Use capturing phase for internal event listener.
* @default true
*/
capture?: boolean;
/**
* Run handler function if focus moves to an iframe.
* @default false
*/
detectIframe?: boolean;
}
declare type OnClickOutsideHandler<T extends {
detectIframe: OnClickOutsideOptions['detectIframe'];
} = {
detectIframe: false;
}> = (evt: T['detectIframe'] extends true ? PointerEvent | FocusEvent : PointerEvent) => void;
declare const vOnClickOutside: ObjectDirective<HTMLElement, OnClickOutsideHandler | [(evt: any) => void, OnClickOutsideOptions]>;
declare type KeyStrokeEventName = 'keydown' | 'keypress' | 'keyup';

@@ -35,7 +62,2 @@ interface OnKeyStrokeOptions {

declare type VueInstance = ComponentPublicInstance;
declare type MaybeElementRef<T extends MaybeElement = MaybeElement> = MaybeRef<T>;
declare type MaybeComputedElementRef<T extends MaybeElement = MaybeElement> = MaybeComputedRef<T>;
declare type MaybeElement = HTMLElement | SVGElement | VueInstance | undefined | null;
interface OnLongPressOptions {

@@ -164,3 +186,3 @@ /**

* A custom handler for handle the updates.
* When specified, the default behavior will be overridded.
* When specified, the default behavior will be overridden.
*

@@ -356,2 +378,9 @@ * @default undefined

eventListenerOptions?: boolean | AddEventListenerOptions;
/**
* Optionally specify a scroll behavior of `auto` (default, not smooth scrolling) or
* `smooth` (for smooth scrolling) which takes effect when changing the `x` or `y` refs.
*
* @default 'auto'
*/
behavior?: MaybeComputedRef<ScrollBehavior>;
}

@@ -366,4 +395,4 @@ /**

declare function useScroll(element: MaybeComputedRef<HTMLElement | SVGElement | Window | Document | null | undefined>, options?: UseScrollOptions): {
x: vue_demi.Ref<number>;
y: vue_demi.Ref<number>;
x: vue_demi.WritableComputedRef<number>;
y: vue_demi.WritableComputedRef<number>;
isScrolling: vue_demi.Ref<boolean>;

@@ -370,0 +399,0 @@ arrivedState: {

@@ -1,1 +0,1 @@

var VueDemi=function(l,n,d){if(l.install)return l;if(n)if(n.version.slice(0,4)==="2.7."){for(var u in n)l[u]=n[u];l.isVue2=!0,l.isVue3=!1,l.install=function(){},l.Vue=n,l.Vue2=n,l.version=n.version}else if(n.version.slice(0,2)==="2.")if(d){for(var u in d)l[u]=d[u];l.isVue2=!0,l.isVue3=!1,l.install=function(){},l.Vue=n,l.Vue2=n,l.version=n.version}else console.error("[vue-demi] no VueCompositionAPI instance found, please be sure to import `@vue/composition-api` before `vue-demi`.");else if(n.version.slice(0,2)==="3."){for(var u in n)l[u]=n[u];l.isVue2=!1,l.isVue3=!0,l.install=function(){},l.Vue=n,l.Vue2=void 0,l.version=n.version,l.set=function(C,h,S){return Array.isArray(C)?(C.length=Math.max(C.length,h),C.splice(h,1,S),S):(C[h]=S,S)},l.del=function(C,h){if(Array.isArray(C)){C.splice(h,1);return}delete C[h]}}else console.error("[vue-demi] Vue version "+n.version+" is unsupported.");else console.error("[vue-demi] no Vue instance found, please be sure to import `vue` before `vue-demi`.");return l}(this.VueDemi=this.VueDemi||(typeof VueDemi!="undefined"?VueDemi:{}),this.Vue||(typeof Vue!="undefined"?Vue:void 0),this.VueCompositionAPI||(typeof VueCompositionAPI!="undefined"?VueCompositionAPI:void 0));(function(l,n,d,u){"use strict";const C=n.defineComponent({name:"OnClickOutside",props:["as"],emits:["trigger"],setup(t,{slots:e,emit:r}){const o=n.ref();return d.onClickOutside(o,a=>{r("trigger",a)}),()=>{if(e.default)return n.h(t.as||"div",{ref:o},e.default())}}});function h(t){var e;const r=u.resolveUnref(t);return(e=r==null?void 0:r.$el)!=null?e:r}const S=u.isClient?window:void 0;function $(...t){let e,r,o,a;if(u.isString(t[0])?([r,o,a]=t,e=S):[e,r,o,a]=t,!e)return u.noop;let i=u.noop;const s=n.watch(()=>h(e),f=>{i(),!!f&&(f.addEventListener(r,o,a),i=()=>{f.removeEventListener(r,o,a),i=u.noop})},{immediate:!0,flush:"post"}),c=()=>{s(),i()};return u.tryOnScopeDispose(c),c}function W(t,e,r={}){const{window:o=S,ignore:a,capture:i=!0,detectIframe:s=!1}=r;if(!o)return;const c=n.ref(!0);let f;const v=p=>{o.clearTimeout(f);const _=h(t),P=p.composedPath();!_||_===p.target||P.includes(_)||!c.value||a&&a.length>0&&a.some(y=>{const U=h(y);return U&&(p.target===U||P.includes(U))})||e(p)},g=[$(o,"click",v,{passive:!0,capture:i}),$(o,"pointerdown",p=>{const _=h(t);c.value=!!_&&!p.composedPath().includes(_)},{passive:!0}),$(o,"pointerup",p=>{if(p.button===0){const _=p.composedPath();p.composedPath=()=>_,f=o.setTimeout(()=>v(p),50)}},{passive:!0}),s&&$(o,"blur",p=>{var _;const P=h(t);((_=document.activeElement)==null?void 0:_.tagName)==="IFRAME"&&!(P==null?void 0:P.contains(document.activeElement))&&e(p)})].filter(Boolean);return()=>g.forEach(p=>p())}const k=(()=>{let t=null;return(e,r)=>{if(t){t(),t=W(e,r.value);return}t=W(e,r.value)}})(),Me=t=>typeof t=="function"?t:typeof t=="string"?e=>e.key===t:Array.isArray(t)?e=>t.includes(e.key):t?()=>!0:()=>!1;function F(t,e,r={}){const{target:o=S,eventName:a="keydown",passive:i=!1}=r,s=Me(t);return $(o,a,f=>{s(f)&&e(f)},i)}var Ve=Object.defineProperty,K=Object.getOwnPropertySymbols,Ae=Object.prototype.hasOwnProperty,Te=Object.prototype.propertyIsEnumerable,J=(t,e,r)=>e in t?Ve(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Ne=(t,e)=>{for(var r in e||(e={}))Ae.call(e,r)&&J(t,r,e[r]);if(K)for(var r of K(e))Te.call(e,r)&&J(t,r,e[r]);return t};const Re={[u.directiveHooks.mounted](t,e){var r,o;const a=(o=(r=e.arg)==null?void 0:r.split(","))!=null?o:[];if(typeof e.value=="function")F(a,e.value,{target:t});else{const[i,s]=e.value;F(a,i,Ne({target:t},s))}}},ze=500;function N(t,e,r){var o,a;const i=n.computed(()=>h(t));let s;function c(){s&&(clearTimeout(s),s=void 0)}function f(g){var O,p,_,P;((O=r==null?void 0:r.modifiers)==null?void 0:O.self)&&g.target!==i.value||(c(),((p=r==null?void 0:r.modifiers)==null?void 0:p.prevent)&&g.preventDefault(),((_=r==null?void 0:r.modifiers)==null?void 0:_.stop)&&g.stopPropagation(),s=setTimeout(()=>e(g),(P=r==null?void 0:r.delay)!=null?P:ze))}const v={capture:(o=r==null?void 0:r.modifiers)==null?void 0:o.capture,once:(a=r==null?void 0:r.modifiers)==null?void 0:a.once};$(i,"pointerdown",f,v),$(i,"pointerup",c,v),$(i,"pointerleave",c,v)}const He=n.defineComponent({name:"OnLongPress",props:["as","options"],emits:["trigger"],setup(t,{slots:e,emit:r}){const o=n.ref();return N(o,a=>{r("trigger",a)},t.options),()=>{if(e.default)return n.h(t.as||"div",{ref:o},e.default())}}}),G={[u.directiveHooks.mounted](t,e){typeof e.value=="function"?N(t,e.value,{modifiers:e.modifiers}):N(t,...e.value)}},Be=n.defineComponent({name:"UseActiveElement",setup(t,{slots:e}){const r=n.reactive({element:d.useActiveElement()});return()=>{if(e.default)return e.default(r)}}}),We=n.defineComponent({name:"UseBattery",setup(t,{slots:e}){const r=n.reactive(d.useBattery(t));return()=>{if(e.default)return e.default(r)}}}),ke=n.defineComponent({name:"UseBrowserLocation",setup(t,{slots:e}){const r=n.reactive(d.useBrowserLocation());return()=>{if(e.default)return e.default(r)}}}),R=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{},z="__vueuse_ssr_handlers__";R[z]=R[z]||{};const Fe=R[z];function q(t,e){return Fe[t]||e}function Ke(t){return t==null?"any":t instanceof Set?"set":t instanceof Map?"map":t instanceof Date?"date":typeof t=="boolean"?"boolean":typeof t=="string"?"string":typeof t=="object"||Array.isArray(t)?"object":Number.isNaN(t)?"any":"number"}var Je=Object.defineProperty,Q=Object.getOwnPropertySymbols,Ge=Object.prototype.hasOwnProperty,qe=Object.prototype.propertyIsEnumerable,X=(t,e,r)=>e in t?Je(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Y=(t,e)=>{for(var r in e||(e={}))Ge.call(e,r)&&X(t,r,e[r]);if(Q)for(var r of Q(e))qe.call(e,r)&&X(t,r,e[r]);return t};const Qe={boolean:{read:t=>t==="true",write:t=>String(t)},object:{read:t=>JSON.parse(t),write:t=>JSON.stringify(t)},number:{read:t=>Number.parseFloat(t),write:t=>String(t)},any:{read:t=>t,write:t=>String(t)},string:{read:t=>t,write:t=>String(t)},map:{read:t=>new Map(JSON.parse(t)),write:t=>JSON.stringify(Array.from(t.entries()))},set:{read:t=>new Set(JSON.parse(t)),write:t=>JSON.stringify(Array.from(t))},date:{read:t=>new Date(t),write:t=>t.toISOString()}};function Xe(t,e,r,o={}){var a;const{flush:i="pre",deep:s=!0,listenToStorageChanges:c=!0,writeDefaults:f=!0,mergeDefaults:v=!1,shallow:g,window:O=S,eventFilter:p,onError:_=m=>{console.error(m)}}=o,P=(g?n.shallowRef:n.ref)(e);if(!r)try{r=q("getDefaultStorage",()=>{var m;return(m=S)==null?void 0:m.localStorage})()}catch(m){_(m)}if(!r)return P;const y=u.resolveUnref(e),U=Ke(y),w=(a=o.serializer)!=null?a:Qe[U],{pause:b,resume:j}=u.pausableWatch(P,()=>L(P.value),{flush:i,deep:s,eventFilter:p});return O&&c&&$(O,"storage",A),A(),P;function L(m){try{m==null?r.removeItem(t):r.setItem(t,w.write(m))}catch(E){_(E)}}function I(m){if(!(m&&m.key!==t)){b();try{const E=m?m.newValue:r.getItem(t);if(E==null)return f&&y!==null&&r.setItem(t,w.write(y)),y;if(!m&&v){const T=w.read(E);return u.isFunction(v)?v(T,y):U==="object"&&!Array.isArray(T)?Y(Y({},y),T):T}else return typeof E!="string"?E:w.read(E)}catch(E){_(E)}finally{j()}}}function A(m){m&&m.key!==t||(P.value=I(m))}}function H(t,e=!1){const r=n.ref(),o=()=>r.value=Boolean(t());return o(),u.tryOnMounted(o,e),r}function Ye(t,e={}){const{window:r=S}=e,o=H(()=>r&&"matchMedia"in r&&typeof r.matchMedia=="function");let a;const i=n.ref(!1),s=()=>{!o.value||(a||(a=r.matchMedia(t)),i.value=a.matches)};return u.tryOnBeforeMount(()=>{s(),!!a&&("addEventListener"in a?a.addEventListener("change",s):a.addListener(s),u.tryOnScopeDispose(()=>{"removeEventListener"in a?a.removeEventListener("change",s):a.removeListener(s)}))}),i}function Ze(t){return Ye("(prefers-color-scheme: dark)",t)}var xe=Object.defineProperty,Z=Object.getOwnPropertySymbols,De=Object.prototype.hasOwnProperty,et=Object.prototype.propertyIsEnumerable,x=(t,e,r)=>e in t?xe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,tt=(t,e)=>{for(var r in e||(e={}))De.call(e,r)&&x(t,r,e[r]);if(Z)for(var r of Z(e))et.call(e,r)&&x(t,r,e[r]);return t};function rt(t={}){const{selector:e="html",attribute:r="class",initialValue:o="auto",window:a=S,storage:i,storageKey:s="vueuse-color-scheme",listenToStorageChanges:c=!0,storageRef:f,emitAuto:v}=t,g=tt({auto:"",light:"light",dark:"dark"},t.modes||{}),O=Ze({window:a}),p=n.computed(()=>O.value?"dark":"light"),_=f||(s==null?n.ref(o):Xe(s,o,i,{window:a,listenToStorageChanges:c})),P=n.computed({get(){return _.value==="auto"&&!v?p.value:_.value},set(b){_.value=b}}),y=q("updateHTMLAttrs",(b,j,L)=>{const I=a==null?void 0:a.document.querySelector(b);if(!!I)if(j==="class"){const A=L.split(/\s/g);Object.values(g).flatMap(m=>(m||"").split(/\s/g)).filter(Boolean).forEach(m=>{A.includes(m)?I.classList.add(m):I.classList.remove(m)})}else I.setAttribute(j,L)});function U(b){var j;const L=b==="auto"?p.value:b;y(e,r,(j=g[L])!=null?j:L)}function w(b){t.onChanged?t.onChanged(b,U):U(b)}return n.watch(P,w,{flush:"post",immediate:!0}),v&&n.watch(p,()=>w(P.value),{flush:"post"}),u.tryOnMounted(()=>w(P.value)),P}const nt=n.defineComponent({name:"UseColorMode",props:["selector","attribute","modes","onChanged","storageKey","storage","emitAuto"],setup(t,{slots:e}){const r=rt(t),o=n.reactive({mode:r});return()=>{if(e.default)return e.default(o)}}}),ot=n.defineComponent({name:"UseDark",props:["selector","attribute","valueDark","valueLight","onChanged","storageKey","storage"],setup(t,{slots:e}){const r=d.useDark(t),o=n.reactive({isDark:r,toggleDark:u.useToggle(r)});return()=>{if(e.default)return e.default(o)}}}),at=n.defineComponent({name:"UseDeviceMotion",setup(t,{slots:e}){const r=n.reactive(d.useDeviceMotion());return()=>{if(e.default)return e.default(r)}}}),st=n.defineComponent({name:"UseDeviceOrientation",setup(t,{slots:e}){const r=n.reactive(d.useDeviceOrientation());return()=>{if(e.default)return e.default(r)}}}),lt=n.defineComponent({name:"UseDevicePixelRatio",setup(t,{slots:e}){const r=n.reactive({pixelRatio:d.useDevicePixelRatio()});return()=>{if(e.default)return e.default(r)}}}),it=n.defineComponent({name:"UseDevicesList",props:["onUpdated","requestPermissions","constraints"],setup(t,{slots:e}){const r=n.reactive(d.useDevicesList(t));return()=>{if(e.default)return e.default(r)}}}),ut=n.defineComponent({name:"UseDocumentVisibility",setup(t,{slots:e}){const r=n.reactive({visibility:d.useDocumentVisibility()});return()=>{if(e.default)return e.default(r)}}});var ct=Object.defineProperty,ft=Object.defineProperties,dt=Object.getOwnPropertyDescriptors,D=Object.getOwnPropertySymbols,pt=Object.prototype.hasOwnProperty,vt=Object.prototype.propertyIsEnumerable,ee=(t,e,r)=>e in t?ct(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,gt=(t,e)=>{for(var r in e||(e={}))pt.call(e,r)&&ee(t,r,e[r]);if(D)for(var r of D(e))vt.call(e,r)&&ee(t,r,e[r]);return t},_t=(t,e)=>ft(t,dt(e));const Ot=n.defineComponent({name:"UseDraggable",props:["storageKey","storageType","initialValue","exact","preventDefault","stopPropagation","pointerTypes","as","handle"],setup(t,{slots:e}){const r=n.ref(),o=n.computed(()=>{var s;return(s=t.handle)!=null?s:r.value}),a=t.storageKey?d.useStorage(t.storageKey,u.resolveUnref(t.initialValue)||{x:0,y:0},d.isClient?t.storageType==="session"?sessionStorage:localStorage:void 0):t.initialValue||{x:0,y:0},i=n.reactive(d.useDraggable(r,_t(gt({},t),{handle:o,initialValue:a})));return()=>{if(e.default)return n.h(t.as||"div",{ref:r,style:`touch-action:none;${i.style}`},e.default(i))}}}),Pt=n.defineComponent({name:"UseElementBounding",props:["box","as"],setup(t,{slots:e}){const r=n.ref(),o=n.reactive(d.useElementBounding(r));return()=>{if(e.default)return n.h(t.as||"div",{ref:r},e.default(o))}}});function mt(t){const e=n.ref(!1);return $(t,"mouseenter",()=>e.value=!0),$(t,"mouseleave",()=>e.value=!1),e}const yt={[u.directiveHooks.mounted](t,e){if(typeof e.value=="function"){const r=mt(t);n.watch(r,o=>e.value(o))}}},ht=n.defineComponent({name:"UseElementSize",props:["width","height","box"],setup(t,{slots:e}){const r=n.ref(),o=n.reactive(d.useElementSize(r,{width:t.width,height:t.height},{box:t.box}));return()=>{if(e.default)return n.h(t.as||"div",{ref:r},e.default(o))}}});var te=Object.getOwnPropertySymbols,wt=Object.prototype.hasOwnProperty,bt=Object.prototype.propertyIsEnumerable,Ut=(t,e)=>{var r={};for(var o in t)wt.call(t,o)&&e.indexOf(o)<0&&(r[o]=t[o]);if(t!=null&&te)for(var o of te(t))e.indexOf(o)<0&&bt.call(t,o)&&(r[o]=t[o]);return r};function St(t,e,r={}){const o=r,{window:a=S}=o,i=Ut(o,["window"]);let s;const c=H(()=>a&&"ResizeObserver"in a),f=()=>{s&&(s.disconnect(),s=void 0)},v=n.watch(()=>h(t),O=>{f(),c.value&&a&&O&&(s=new ResizeObserver(e),s.observe(O,i))},{immediate:!0,flush:"post"}),g=()=>{f(),v()};return u.tryOnScopeDispose(g),{isSupported:c,stop:g}}function $t(t,e={width:0,height:0},r={}){const{box:o="content-box"}=r,a=n.ref(e.width),i=n.ref(e.height);return St(t,([s])=>{const c=o==="border-box"?s.borderBoxSize:o==="content-box"?s.contentBoxSize:s.devicePixelContentBoxSize;c?(a.value=c.reduce((f,{inlineSize:v})=>f+v,0),i.value=c.reduce((f,{blockSize:v})=>f+v,0)):(a.value=s.contentRect.width,i.value=s.contentRect.height)},r),n.watch(()=>h(t),s=>{a.value=s?e.width:0,i.value=s?e.height:0}),{width:a,height:i}}const Ct={[u.directiveHooks.mounted](t,e){var r;const o=typeof e.value=="function"?e.value:(r=e.value)==null?void 0:r[0],a=typeof e.value=="function"?[]:e.value.slice(1),{width:i,height:s}=$t(t,...a);n.watch([i,s],([c,f])=>o({width:c,height:f}))}},Et=n.defineComponent({name:"UseElementVisibility",props:["as"],setup(t,{slots:e}){const r=n.ref(),o=n.reactive({isVisible:d.useElementVisibility(r)});return()=>{if(e.default)return n.h(t.as||"div",{ref:r},e.default(o))}}});function re(t,{window:e=S,scrollTarget:r}={}){const o=n.ref(!1),a=()=>{if(!e)return;const i=e.document,s=h(t);if(!s)o.value=!1;else{const c=s.getBoundingClientRect();o.value=c.top<=(e.innerHeight||i.documentElement.clientHeight)&&c.left<=(e.innerWidth||i.documentElement.clientWidth)&&c.bottom>=0&&c.right>=0}};return n.watch(()=>h(t),()=>a(),{immediate:!0,flush:"post"}),e&&$(r||e,"scroll",a,{capture:!1,passive:!0}),o}const jt={[u.directiveHooks.mounted](t,e){if(typeof e.value=="function"){const r=e.value,o=re(t);n.watch(o,a=>r(a),{immediate:!0})}else{const[r,o]=e.value,a=re(t,o);n.watch(a,i=>r(i),{immediate:!0})}}},Lt=n.defineComponent({name:"UseEyeDropper",props:{sRGBHex:String},setup(t,{slots:e}){const r=n.reactive(d.useEyeDropper());return()=>{if(e.default)return e.default(r)}}}),It=n.defineComponent({name:"UseFullscreen",props:["as"],setup(t,{slots:e}){const r=n.ref(),o=n.reactive(d.useFullscreen(r));return()=>{if(e.default)return n.h(t.as||"div",{ref:r},e.default(o))}}}),Mt=n.defineComponent({name:"UseGeolocation",props:["enableHighAccuracy","maximumAge","timeout","navigator"],setup(t,{slots:e}){const r=n.reactive(d.useGeolocation(t));return()=>{if(e.default)return e.default(r)}}}),Vt=n.defineComponent({name:"UseIdle",props:["timeout","events","listenForVisibilityChange","initialState"],setup(t,{slots:e}){const r=n.reactive(d.useIdle(t.timeout,t));return()=>{if(e.default)return e.default(r)}}});function At(t,e,r){const{immediate:o=!0,delay:a=0,onError:i=u.noop,resetOnExecute:s=!0,shallow:c=!0,throwError:f}=r??{},v=c?n.shallowRef(e):n.ref(e),g=n.ref(!1),O=n.ref(!1),p=n.ref(void 0);async function _(P=0,...y){s&&(v.value=e),p.value=void 0,g.value=!1,O.value=!0,P>0&&await u.promiseTimeout(P);const U=typeof t=="function"?t(...y):t;try{const w=await U;v.value=w,g.value=!0}catch(w){if(p.value=w,i(w),f)throw p}finally{O.value=!1}return v.value}return o&&_(a),{state:v,isReady:g,isLoading:O,error:p,execute:_}}var Tt=Object.defineProperty,ne=Object.getOwnPropertySymbols,Nt=Object.prototype.hasOwnProperty,Rt=Object.prototype.propertyIsEnumerable,oe=(t,e,r)=>e in t?Tt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,zt=(t,e)=>{for(var r in e||(e={}))Nt.call(e,r)&&oe(t,r,e[r]);if(ne)for(var r of ne(e))Rt.call(e,r)&&oe(t,r,e[r]);return t};async function Ht(t){return new Promise((e,r)=>{const o=new Image,{src:a,srcset:i,sizes:s}=t;o.src=a,i&&(o.srcset=i),s&&(o.sizes=s),o.onload=()=>e(o),o.onerror=r})}const Bt=(t,e={})=>{const r=At(()=>Ht(u.resolveUnref(t)),void 0,zt({resetOnExecute:!0},e));return n.watch(()=>u.resolveUnref(t),()=>r.execute(e.delay),{deep:!0}),r},Wt=n.defineComponent({name:"UseImage",props:["src","srcset","sizes","as"],setup(t,{slots:e}){const r=n.reactive(Bt(t));return()=>r.isLoading&&e.loading?e.loading(r):r.error&&e.error?e.error(r.error):e.default?e.default(r):n.h(t.as||"img",t)}}),ae=1;function B(t,e={}){const{throttle:r=0,idle:o=200,onStop:a=u.noop,onScroll:i=u.noop,offset:s={left:0,right:0,top:0,bottom:0},eventListenerOptions:c={capture:!1,passive:!0}}=e,f=n.ref(0),v=n.ref(0),g=n.ref(!1),O=n.reactive({left:!0,right:!1,top:!0,bottom:!1}),p=n.reactive({left:!1,right:!1,top:!1,bottom:!1}),_=u.useDebounceFn(y=>{g.value=!1,p.left=!1,p.right=!1,p.top=!1,p.bottom=!1,a(y)},r+o),P=y=>{const U=y.target===document?y.target.documentElement:y.target,w=U.scrollLeft;p.left=w<f.value,p.right=w>f.value,O.left=w<=0+(s.left||0),O.right=w+U.clientWidth>=U.scrollWidth-(s.right||0)-ae,f.value=w;let b=U.scrollTop;y.target===document&&!b&&(b=document.body.scrollTop),p.top=b<v.value,p.bottom=b>v.value,O.top=b<=0+(s.top||0),O.bottom=b+U.clientHeight>=U.scrollHeight-(s.bottom||0)-ae,v.value=b,g.value=!0,_(y),i(y)};return $(t,"scroll",r?u.useThrottleFn(P,r):P,c),{x:f,y:v,isScrolling:g,arrivedState:O,directions:p}}var kt=Object.defineProperty,Ft=Object.defineProperties,Kt=Object.getOwnPropertyDescriptors,se=Object.getOwnPropertySymbols,Jt=Object.prototype.hasOwnProperty,Gt=Object.prototype.propertyIsEnumerable,le=(t,e,r)=>e in t?kt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,ie=(t,e)=>{for(var r in e||(e={}))Jt.call(e,r)&&le(t,r,e[r]);if(se)for(var r of se(e))Gt.call(e,r)&&le(t,r,e[r]);return t},qt=(t,e)=>Ft(t,Kt(e));function ue(t,e,r={}){var o,a;const i=(o=r.direction)!=null?o:"bottom",s=n.reactive(B(t,qt(ie({},r),{offset:ie({[i]:(a=r.distance)!=null?a:0},r.offset)})));n.watch(()=>s.arrivedState[i],async c=>{var f,v;if(c){const g=u.resolveUnref(t),O={height:(f=g==null?void 0:g.scrollHeight)!=null?f:0,width:(v=g==null?void 0:g.scrollWidth)!=null?v:0};await e(s),r.preserveScrollPosition&&g&&n.nextTick(()=>{g.scrollTo({top:g.scrollHeight-O.height,left:g.scrollWidth-O.width})})}})}const Qt={[u.directiveHooks.mounted](t,e){typeof e.value=="function"?ue(t,e.value):ue(t,...e.value)}};function ce(t,e,r={}){const{root:o,rootMargin:a="0px",threshold:i=.1,window:s=S}=r,c=H(()=>s&&"IntersectionObserver"in s);let f=u.noop;const v=c.value?n.watch(()=>({el:h(t),root:h(o)}),({el:O,root:p})=>{if(f(),!O)return;const _=new IntersectionObserver(e,{root:p,rootMargin:a,threshold:i});_.observe(O),f=()=>{_.disconnect(),f=u.noop}},{immediate:!0,flush:"post"}):u.noop,g=()=>{f(),v()};return u.tryOnScopeDispose(g),{isSupported:c,stop:g}}const Xt={[u.directiveHooks.mounted](t,e){typeof e.value=="function"?ce(t,e.value):ce(t,...e.value)}},Yt=n.defineComponent({name:"UseMouse",props:["touch","resetOnTouchEnds","initialValue"],setup(t,{slots:e}){const r=n.reactive(d.useMouse(t));return()=>{if(e.default)return e.default(r)}}}),Zt=n.defineComponent({name:"UseMouseElement",props:["handleOutside","as"],setup(t,{slots:e}){const r=n.ref(),o=n.reactive(d.useMouseInElement(r,t));return()=>{if(e.default)return n.h(t.as||"div",{ref:r},e.default(o))}}});var xt=Object.defineProperty,Dt=Object.defineProperties,er=Object.getOwnPropertyDescriptors,fe=Object.getOwnPropertySymbols,tr=Object.prototype.hasOwnProperty,rr=Object.prototype.propertyIsEnumerable,de=(t,e,r)=>e in t?xt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,nr=(t,e)=>{for(var r in e||(e={}))tr.call(e,r)&&de(t,r,e[r]);if(fe)for(var r of fe(e))rr.call(e,r)&&de(t,r,e[r]);return t},or=(t,e)=>Dt(t,er(e));const ar=n.defineComponent({name:"UseMousePressed",props:["touch","initialValue","as"],setup(t,{slots:e}){const r=n.ref(),o=n.reactive(d.useMousePressed(or(nr({},t),{target:r})));return()=>{if(e.default)return n.h(t.as||"div",{ref:r},e.default(o))}}}),sr=n.defineComponent({name:"UseNetwork",setup(t,{slots:e}){const r=n.reactive(d.useNetwork());return()=>{if(e.default)return e.default(r)}}});var lr=Object.defineProperty,ir=Object.defineProperties,ur=Object.getOwnPropertyDescriptors,pe=Object.getOwnPropertySymbols,cr=Object.prototype.hasOwnProperty,fr=Object.prototype.propertyIsEnumerable,ve=(t,e,r)=>e in t?lr(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,dr=(t,e)=>{for(var r in e||(e={}))cr.call(e,r)&&ve(t,r,e[r]);if(pe)for(var r of pe(e))fr.call(e,r)&&ve(t,r,e[r]);return t},pr=(t,e)=>ir(t,ur(e));const vr=n.defineComponent({name:"UseNow",props:["interval"],setup(t,{slots:e}){const r=n.reactive(d.useNow(pr(dr({},t),{controls:!0})));return()=>{if(e.default)return e.default(r)}}}),gr=n.defineComponent({name:"UseObjectUrl",props:["object"],setup(t,{slots:e}){const r=n.toRef(t,"object"),o=d.useObjectUrl(r);return()=>{if(e.default&&o.value)return e.default(o)}}});var _r=Object.defineProperty,Or=Object.defineProperties,Pr=Object.getOwnPropertyDescriptors,ge=Object.getOwnPropertySymbols,mr=Object.prototype.hasOwnProperty,yr=Object.prototype.propertyIsEnumerable,_e=(t,e,r)=>e in t?_r(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,hr=(t,e)=>{for(var r in e||(e={}))mr.call(e,r)&&_e(t,r,e[r]);if(ge)for(var r of ge(e))yr.call(e,r)&&_e(t,r,e[r]);return t},wr=(t,e)=>Or(t,Pr(e));const br=n.defineComponent({name:"UseOffsetPagination",props:["total","page","pageSize","onPageChange","onPageSizeChange","onPageCountChange"],emits:["page-change","page-size-change","page-count-change"],setup(t,{slots:e,emit:r}){const o=n.reactive(d.useOffsetPagination(wr(hr({},t),{onPageChange(...a){var i;(i=t.onPageChange)==null||i.call(t,...a),r("page-change",...a)},onPageSizeChange(...a){var i;(i=t.onPageSizeChange)==null||i.call(t,...a),r("page-size-change",...a)},onPageCountChange(...a){var i;(i=t.onPageCountChange)==null||i.call(t,...a),r("page-count-change",...a)}})));return()=>{if(e.default)return e.default(o)}}}),Ur=n.defineComponent({name:"UseOnline",setup(t,{slots:e}){const r=n.reactive({isOnline:d.useOnline()});return()=>{if(e.default)return e.default(r)}}}),Sr=n.defineComponent({name:"UsePageLeave",setup(t,{slots:e}){const r=n.reactive({isLeft:d.usePageLeave()});return()=>{if(e.default)return e.default(r)}}});var $r=Object.defineProperty,Cr=Object.defineProperties,Er=Object.getOwnPropertyDescriptors,Oe=Object.getOwnPropertySymbols,jr=Object.prototype.hasOwnProperty,Lr=Object.prototype.propertyIsEnumerable,Pe=(t,e,r)=>e in t?$r(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Ir=(t,e)=>{for(var r in e||(e={}))jr.call(e,r)&&Pe(t,r,e[r]);if(Oe)for(var r of Oe(e))Lr.call(e,r)&&Pe(t,r,e[r]);return t},Mr=(t,e)=>Cr(t,Er(e));const Vr=n.defineComponent({name:"UsePointer",props:["pointerTypes","initialValue","target"],setup(t,{slots:e}){const r=n.ref(null),o=n.reactive(d.usePointer(Mr(Ir({},t),{target:t.target==="self"?r:S})));return()=>{if(e.default)return e.default(o,{ref:r})}}}),Ar=n.defineComponent({name:"UsePreferredColorScheme",setup(t,{slots:e}){const r=n.reactive({colorScheme:d.usePreferredColorScheme()});return()=>{if(e.default)return e.default(r)}}}),Tr=n.defineComponent({name:"UsePreferredContrast",setup(t,{slots:e}){const r=n.reactive({contrast:d.usePreferredContrast()});return()=>{if(e.default)return e.default(r)}}}),Nr=n.defineComponent({name:"UsePreferredDark",setup(t,{slots:e}){const r=n.reactive({prefersDark:d.usePreferredDark()});return()=>{if(e.default)return e.default(r)}}}),Rr=n.defineComponent({name:"UsePreferredLanguages",setup(t,{slots:e}){const r=n.reactive({languages:d.usePreferredLanguages()});return()=>{if(e.default)return e.default(r)}}}),zr=n.defineComponent({name:"UsePreferredReducedMotion",setup(t,{slots:e}){const r=n.reactive({motion:d.usePreferredReducedMotion()});return()=>{if(e.default)return e.default(r)}}});function M(t,e,{window:r=S,initialValue:o=""}={}){const a=n.ref(o),i=n.computed(()=>{var s;return h(e)||((s=r==null?void 0:r.document)==null?void 0:s.documentElement)});return n.watch([i,()=>u.resolveUnref(t)],([s,c])=>{var f;if(s&&r){const v=(f=r.getComputedStyle(s).getPropertyValue(c))==null?void 0:f.trim();a.value=v||o}},{immediate:!0}),n.watch(a,s=>{var c;((c=i.value)==null?void 0:c.style)&&i.value.style.setProperty(u.resolveUnref(t),s)}),a}const me="--vueuse-safe-area-top",ye="--vueuse-safe-area-right",he="--vueuse-safe-area-bottom",we="--vueuse-safe-area-left";function Hr(){const t=n.ref(""),e=n.ref(""),r=n.ref(""),o=n.ref("");if(u.isClient){const i=M(me),s=M(ye),c=M(he),f=M(we);i.value="env(safe-area-inset-top, 0px)",s.value="env(safe-area-inset-right, 0px)",c.value="env(safe-area-inset-bottom, 0px)",f.value="env(safe-area-inset-left, 0px)",a(),$("resize",u.useDebounceFn(a))}function a(){t.value=V(me),e.value=V(ye),r.value=V(he),o.value=V(we)}return{top:t,right:e,bottom:r,left:o,update:a}}function V(t){return getComputedStyle(document.documentElement).getPropertyValue(t)}const Br=n.defineComponent({name:"UseScreenSafeArea",props:{top:Boolean,right:Boolean,bottom:Boolean,left:Boolean},setup(t,{slots:e}){const{top:r,right:o,bottom:a,left:i}=Hr();return()=>{if(e.default)return n.h("div",{style:{paddingTop:t.top?r.value:"",paddingRight:t.right?o.value:"",paddingBottom:t.bottom?a.value:"",paddingLeft:t.left?i.value:"",boxSizing:"border-box",maxHeight:"100vh",maxWidth:"100vw",overflow:"auto"}},e.default())}}});var Wr=Object.defineProperty,kr=Object.defineProperties,Fr=Object.getOwnPropertyDescriptors,be=Object.getOwnPropertySymbols,Kr=Object.prototype.hasOwnProperty,Jr=Object.prototype.propertyIsEnumerable,Ue=(t,e,r)=>e in t?Wr(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Gr=(t,e)=>{for(var r in e||(e={}))Kr.call(e,r)&&Ue(t,r,e[r]);if(be)for(var r of be(e))Jr.call(e,r)&&Ue(t,r,e[r]);return t},qr=(t,e)=>kr(t,Fr(e));const Qr={[u.directiveHooks.mounted](t,e){if(typeof e.value=="function"){const r=e.value,o=B(t,{onScroll(){r(o)},onStop(){r(o)}})}else{const[r,o]=e.value,a=B(t,qr(Gr({},o),{onScroll(i){var s;(s=o.onScroll)==null||s.call(o,i),r(a)},onStop(i){var s;(s=o.onStop)==null||s.call(o,i),r(a)}}))}}};function Xr(t){const e=t||window.event;return e.touches.length>1?!0:(e.preventDefault&&e.preventDefault(),!1)}function Yr(t,e=!1){const r=n.ref(e);let o=null,a;n.watch(u.resolveRef(t),c=>{if(c){const f=c;a=f.style.overflow,r.value&&(f.style.overflow="hidden")}},{immediate:!0});const i=()=>{const c=u.resolveUnref(t);!c||r.value||(u.isIOS&&(o=$(c,"touchmove",Xr,{passive:!1})),c.style.overflow="hidden",r.value=!0)},s=()=>{const c=u.resolveUnref(t);!c||!r.value||(u.isIOS&&(o==null||o()),c.style.overflow=a,r.value=!1)};return u.tryOnScopeDispose(s),n.computed({get(){return r.value},set(c){c?i():s()}})}const Zr=(()=>{let t=!1;const e=n.ref(!1);return(r,o)=>{if(e.value=o.value,t)return;t=!0;const a=Yr(r,o.value);n.watch(e,i=>a.value=i)}})();var xr=Object.defineProperty,Dr=Object.defineProperties,en=Object.getOwnPropertyDescriptors,Se=Object.getOwnPropertySymbols,tn=Object.prototype.hasOwnProperty,rn=Object.prototype.propertyIsEnumerable,$e=(t,e,r)=>e in t?xr(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,nn=(t,e)=>{for(var r in e||(e={}))tn.call(e,r)&&$e(t,r,e[r]);if(Se)for(var r of Se(e))rn.call(e,r)&&$e(t,r,e[r]);return t},on=(t,e)=>Dr(t,en(e));const an=n.defineComponent({name:"UseTimeAgo",props:["time","updateInterval","max","fullDateFormatter","messages"],setup(t,{slots:e}){const r=n.reactive(d.useTimeAgo(()=>t.time,on(nn({},t),{controls:!0})));return()=>{if(e.default)return e.default(r)}}});var sn=Object.defineProperty,ln=Object.defineProperties,un=Object.getOwnPropertyDescriptors,Ce=Object.getOwnPropertySymbols,cn=Object.prototype.hasOwnProperty,fn=Object.prototype.propertyIsEnumerable,Ee=(t,e,r)=>e in t?sn(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,dn=(t,e)=>{for(var r in e||(e={}))cn.call(e,r)&&Ee(t,r,e[r]);if(Ce)for(var r of Ce(e))fn.call(e,r)&&Ee(t,r,e[r]);return t},pn=(t,e)=>ln(t,un(e));const vn=n.defineComponent({name:"UseTimestamp",props:["immediate","interval","offset"],setup(t,{slots:e}){const r=n.reactive(d.useTimestamp(pn(dn({},t),{controls:!0})));return()=>{if(e.default)return e.default(r)}}});var gn=Object.defineProperty,je=Object.getOwnPropertySymbols,_n=Object.prototype.hasOwnProperty,On=Object.prototype.propertyIsEnumerable,Le=(t,e,r)=>e in t?gn(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Ie=(t,e)=>{for(var r in e||(e={}))_n.call(e,r)&&Le(t,r,e[r]);if(je)for(var r of je(e))On.call(e,r)&&Le(t,r,e[r]);return t};const Pn=n.defineComponent({name:"UseVirtualList",props:["list","options","height"],setup(t,{slots:e}){const{list:r}=n.toRefs(t),{list:o,containerProps:a,wrapperProps:i}=d.useVirtualList(r,t.options);return a.style.height=t.height||"300px",()=>n.h("div",Ie({},a),[n.h("div",Ie({},i.value),o.value.map(s=>n.h("div",{style:{overFlow:"hidden",height:s.height}},e.default?e.default(s):"Please set content!")))])}}),mn=n.defineComponent({name:"UseWindowFocus",setup(t,{slots:e}){const r=n.reactive({focused:d.useWindowFocus()});return()=>{if(e.default)return e.default(r)}}}),yn=n.defineComponent({name:"UseWindowSize",props:["initialWidth","initialHeight"],setup(t,{slots:e}){const r=n.reactive(d.useWindowSize(t));return()=>{if(e.default)return e.default(r)}}});l.OnClickOutside=C,l.OnLongPress=He,l.UseActiveElement=Be,l.UseBattery=We,l.UseBrowserLocation=ke,l.UseColorMode=nt,l.UseDark=ot,l.UseDeviceMotion=at,l.UseDeviceOrientation=st,l.UseDevicePixelRatio=lt,l.UseDevicesList=it,l.UseDocumentVisibility=ut,l.UseDraggable=Ot,l.UseElementBounding=Pt,l.UseElementSize=ht,l.UseElementVisibility=Et,l.UseEyeDropper=Lt,l.UseFullscreen=It,l.UseGeolocation=Mt,l.UseIdle=Vt,l.UseImage=Wt,l.UseMouse=Yt,l.UseMouseInElement=Zt,l.UseMousePressed=ar,l.UseNetwork=sr,l.UseNow=vr,l.UseObjectUrl=gr,l.UseOffsetPagination=br,l.UseOnline=Ur,l.UsePageLeave=Sr,l.UsePointer=Vr,l.UsePreferredColorScheme=Ar,l.UsePreferredContrast=Tr,l.UsePreferredDark=Nr,l.UsePreferredLanguages=Rr,l.UsePreferredReducedMotion=zr,l.UseScreenSafeArea=Br,l.UseTimeAgo=an,l.UseTimestamp=vn,l.UseVirtualList=Pn,l.UseWindowFocus=mn,l.UseWindowSize=yn,l.VOnClickOutside=k,l.VOnLongPress=G,l.vElementHover=yt,l.vElementSize=Ct,l.vElementVisibility=jt,l.vInfiniteScroll=Qt,l.vIntersectionObserver=Xt,l.vOnClickOutside=k,l.vOnKeyStroke=Re,l.vOnLongPress=G,l.vScroll=Qr,l.vScrollLock=Zr,Object.defineProperty(l,"__esModule",{value:!0})})(this.VueUse=this.VueUse||{},VueDemi,VueUse,VueUse);
var VueDemi=function(s,n,f){if(s.install)return s;if(n)if(n.version.slice(0,4)==="2.7."){for(var u in n)s[u]=n[u];s.isVue2=!0,s.isVue3=!1,s.install=function(){},s.Vue=n,s.Vue2=n,s.version=n.version}else if(n.version.slice(0,2)==="2.")if(f){for(var u in f)s[u]=f[u];s.isVue2=!0,s.isVue3=!1,s.install=function(){},s.Vue=n,s.Vue2=n,s.version=n.version}else console.error("[vue-demi] no VueCompositionAPI instance found, please be sure to import `@vue/composition-api` before `vue-demi`.");else if(n.version.slice(0,2)==="3."){for(var u in n)s[u]=n[u];s.isVue2=!1,s.isVue3=!0,s.install=function(){},s.Vue=n,s.Vue2=void 0,s.version=n.version,s.set=function(M,h,b){return Array.isArray(M)?(M.length=Math.max(M.length,h),M.splice(h,1,b),b):(M[h]=b,b)},s.del=function(M,h){if(Array.isArray(M)){M.splice(h,1);return}delete M[h]}}else console.error("[vue-demi] Vue version "+n.version+" is unsupported.");else console.error("[vue-demi] no Vue instance found, please be sure to import `vue` before `vue-demi`.");return s}(this.VueDemi=this.VueDemi||(typeof VueDemi!="undefined"?VueDemi:{}),this.Vue||(typeof Vue!="undefined"?Vue:void 0),this.VueCompositionAPI||(typeof VueCompositionAPI!="undefined"?VueCompositionAPI:void 0));(function(s,n,f,u){"use strict";const M=n.defineComponent({name:"OnClickOutside",props:["as"],emits:["trigger"],setup(t,{slots:e,emit:r}){const o=n.ref();return f.onClickOutside(o,a=>{r("trigger",a)}),()=>{if(e.default)return n.h(t.as||"div",{ref:o},e.default())}}});function h(t){var e;const r=u.resolveUnref(t);return(e=r==null?void 0:r.$el)!=null?e:r}const b=u.isClient?window:void 0;function $(...t){let e,r,o,a;if(u.isString(t[0])?([r,o,a]=t,e=b):[e,r,o,a]=t,!e)return u.noop;let i=u.noop;const l=n.watch(()=>h(e),d=>{i(),!!d&&(d.addEventListener(r,o,a),i=()=>{d.removeEventListener(r,o,a),i=u.noop})},{immediate:!0,flush:"post"}),c=()=>{l(),i()};return u.tryOnScopeDispose(c),c}function k(t,e,r={}){const{window:o=b,ignore:a,capture:i=!0,detectIframe:l=!1}=r;if(!o)return;const c=n.ref(!0);let d;const p=v=>{o.clearTimeout(d);const g=h(t);!g||g===v.target||v.composedPath().includes(g)||!c.value||e(v)},_=v=>a&&a.some(g=>{const P=h(g);return P&&(v.target===P||v.composedPath().includes(P))}),m=[$(o,"click",p,{passive:!0,capture:i}),$(o,"pointerdown",v=>{const g=h(t);c.value=!!g&&!v.composedPath().includes(g)&&!_(v)},{passive:!0}),$(o,"pointerup",v=>{if(v.button===0){const g=v.composedPath();v.composedPath=()=>g,d=o.setTimeout(()=>p(v),50)}},{passive:!0}),l&&$(o,"blur",v=>{var g;const P=h(t);((g=document.activeElement)==null?void 0:g.tagName)==="IFRAME"&&!(P==null?void 0:P.contains(document.activeElement))&&e(v)})].filter(Boolean);return()=>m.forEach(v=>v())}const W={[u.directiveHooks.mounted](t,e){const r=!e.modifiers.bubble;if(typeof e.value=="function")t.__onClickOutside_stop=k(t,e.value,{capture:r});else{const[o,a]=e.value;t.__onClickOutside_stop=k(t,o,Object.assign({capture:r},a))}},[u.directiveHooks.unmounted](t){t.__onClickOutside_stop()}},Me=t=>typeof t=="function"?t:typeof t=="string"?e=>e.key===t:Array.isArray(t)?e=>t.includes(e.key):()=>!0;function F(...t){let e,r,o={};t.length===3?(e=t[0],r=t[1],o=t[2]):t.length===2?typeof t[1]=="object"?(e=!0,r=t[0],o=t[1]):(e=t[0],r=t[1]):(e=!0,r=t[0]);const{target:a=b,eventName:i="keydown",passive:l=!1}=o,c=Me(e);return $(a,i,p=>{c(p)&&r(p)},l)}var Ve=Object.defineProperty,K=Object.getOwnPropertySymbols,Te=Object.prototype.hasOwnProperty,Ae=Object.prototype.propertyIsEnumerable,J=(t,e,r)=>e in t?Ve(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Ne=(t,e)=>{for(var r in e||(e={}))Te.call(e,r)&&J(t,r,e[r]);if(K)for(var r of K(e))Ae.call(e,r)&&J(t,r,e[r]);return t};const Re={[u.directiveHooks.mounted](t,e){var r,o;const a=(o=(r=e.arg)==null?void 0:r.split(","))!=null?o:!0;if(typeof e.value=="function")F(a,e.value,{target:t});else{const[i,l]=e.value;F(a,i,Ne({target:t},l))}}},He=500;function N(t,e,r){var o,a;const i=n.computed(()=>h(t));let l;function c(){l&&(clearTimeout(l),l=void 0)}function d(_){var m,w,v,g;((m=r==null?void 0:r.modifiers)==null?void 0:m.self)&&_.target!==i.value||(c(),((w=r==null?void 0:r.modifiers)==null?void 0:w.prevent)&&_.preventDefault(),((v=r==null?void 0:r.modifiers)==null?void 0:v.stop)&&_.stopPropagation(),l=setTimeout(()=>e(_),(g=r==null?void 0:r.delay)!=null?g:He))}const p={capture:(o=r==null?void 0:r.modifiers)==null?void 0:o.capture,once:(a=r==null?void 0:r.modifiers)==null?void 0:a.once};$(i,"pointerdown",d,p),$(i,"pointerup",c,p),$(i,"pointerleave",c,p)}const ze=n.defineComponent({name:"OnLongPress",props:["as","options"],emits:["trigger"],setup(t,{slots:e,emit:r}){const o=n.ref();return N(o,a=>{r("trigger",a)},t.options),()=>{if(e.default)return n.h(t.as||"div",{ref:o},e.default())}}}),G={[u.directiveHooks.mounted](t,e){typeof e.value=="function"?N(t,e.value,{modifiers:e.modifiers}):N(t,...e.value)}},Be=n.defineComponent({name:"UseActiveElement",setup(t,{slots:e}){const r=n.reactive({element:f.useActiveElement()});return()=>{if(e.default)return e.default(r)}}}),ke=n.defineComponent({name:"UseBattery",setup(t,{slots:e}){const r=n.reactive(f.useBattery(t));return()=>{if(e.default)return e.default(r)}}}),We=n.defineComponent({name:"UseBrowserLocation",setup(t,{slots:e}){const r=n.reactive(f.useBrowserLocation());return()=>{if(e.default)return e.default(r)}}}),R=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{},H="__vueuse_ssr_handlers__";R[H]=R[H]||{};const Fe=R[H];function q(t,e){return Fe[t]||e}function Ke(t){return t==null?"any":t instanceof Set?"set":t instanceof Map?"map":t instanceof Date?"date":typeof t=="boolean"?"boolean":typeof t=="string"?"string":typeof t=="object"||Array.isArray(t)?"object":Number.isNaN(t)?"any":"number"}var Je=Object.defineProperty,Q=Object.getOwnPropertySymbols,Ge=Object.prototype.hasOwnProperty,qe=Object.prototype.propertyIsEnumerable,X=(t,e,r)=>e in t?Je(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Y=(t,e)=>{for(var r in e||(e={}))Ge.call(e,r)&&X(t,r,e[r]);if(Q)for(var r of Q(e))qe.call(e,r)&&X(t,r,e[r]);return t};const Qe={boolean:{read:t=>t==="true",write:t=>String(t)},object:{read:t=>JSON.parse(t),write:t=>JSON.stringify(t)},number:{read:t=>Number.parseFloat(t),write:t=>String(t)},any:{read:t=>t,write:t=>String(t)},string:{read:t=>t,write:t=>String(t)},map:{read:t=>new Map(JSON.parse(t)),write:t=>JSON.stringify(Array.from(t.entries()))},set:{read:t=>new Set(JSON.parse(t)),write:t=>JSON.stringify(Array.from(t))},date:{read:t=>new Date(t),write:t=>t.toISOString()}};function Xe(t,e,r,o={}){var a;const{flush:i="pre",deep:l=!0,listenToStorageChanges:c=!0,writeDefaults:d=!0,mergeDefaults:p=!1,shallow:_,window:m=b,eventFilter:w,onError:v=O=>{console.error(O)}}=o,g=(_?n.shallowRef:n.ref)(e);if(!r)try{r=q("getDefaultStorage",()=>{var O;return(O=b)==null?void 0:O.localStorage})()}catch(O){v(O)}if(!r)return g;const P=u.resolveUnref(e),U=Ke(P),C=(a=o.serializer)!=null?a:Qe[U],{pause:L,resume:y}=u.pausableWatch(g,()=>S(g.value),{flush:i,deep:l,eventFilter:w});return m&&c&&$(m,"storage",j),j(),g;function S(O){try{O==null?r.removeItem(t):r.setItem(t,C.write(O))}catch(I){v(I)}}function E(O){if(!(O&&O.key!==t)){L();try{const I=O?O.newValue:r.getItem(t);if(I==null)return d&&P!==null&&r.setItem(t,C.write(P)),P;if(!O&&p){const A=C.read(I);return u.isFunction(p)?p(A,P):U==="object"&&!Array.isArray(A)?Y(Y({},P),A):A}else return typeof I!="string"?I:C.read(I)}catch(I){v(I)}finally{y()}}}function j(O){O&&O.key!==t||(g.value=E(O))}}function z(t,e=!1){const r=n.ref(),o=()=>r.value=Boolean(t());return o(),u.tryOnMounted(o,e),r}function Ye(t,e={}){const{window:r=b}=e,o=z(()=>r&&"matchMedia"in r&&typeof r.matchMedia=="function");let a;const i=n.ref(!1),l=()=>{!a||("removeEventListener"in a?a.removeEventListener("change",c):a.removeListener(c))},c=()=>{!o.value||(l(),a=r.matchMedia(u.resolveRef(t).value),i.value=a.matches,"addEventListener"in a?a.addEventListener("change",c):a.addListener(c))};return n.watchEffect(c),u.tryOnScopeDispose(()=>l()),i}function Ze(t){return Ye("(prefers-color-scheme: dark)",t)}var xe=Object.defineProperty,Z=Object.getOwnPropertySymbols,De=Object.prototype.hasOwnProperty,et=Object.prototype.propertyIsEnumerable,x=(t,e,r)=>e in t?xe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,tt=(t,e)=>{for(var r in e||(e={}))De.call(e,r)&&x(t,r,e[r]);if(Z)for(var r of Z(e))et.call(e,r)&&x(t,r,e[r]);return t};function rt(t={}){const{selector:e="html",attribute:r="class",initialValue:o="auto",window:a=b,storage:i,storageKey:l="vueuse-color-scheme",listenToStorageChanges:c=!0,storageRef:d,emitAuto:p}=t,_=tt({auto:"",light:"light",dark:"dark"},t.modes||{}),m=Ze({window:a}),w=n.computed(()=>m.value?"dark":"light"),v=d||(l==null?n.ref(o):Xe(l,o,i,{window:a,listenToStorageChanges:c})),g=n.computed({get(){return v.value==="auto"&&!p?w.value:v.value},set(L){v.value=L}}),P=q("updateHTMLAttrs",(L,y,S)=>{const E=a==null?void 0:a.document.querySelector(L);if(!!E)if(y==="class"){const j=S.split(/\s/g);Object.values(_).flatMap(O=>(O||"").split(/\s/g)).filter(Boolean).forEach(O=>{j.includes(O)?E.classList.add(O):E.classList.remove(O)})}else E.setAttribute(y,S)});function U(L){var y;const S=L==="auto"?w.value:L;P(e,r,(y=_[S])!=null?y:S)}function C(L){t.onChanged?t.onChanged(L,U):U(L)}return n.watch(g,C,{flush:"post",immediate:!0}),p&&n.watch(w,()=>C(g.value),{flush:"post"}),u.tryOnMounted(()=>C(g.value)),g}const nt=n.defineComponent({name:"UseColorMode",props:["selector","attribute","modes","onChanged","storageKey","storage","emitAuto"],setup(t,{slots:e}){const r=rt(t),o=n.reactive({mode:r});return()=>{if(e.default)return e.default(o)}}}),ot=n.defineComponent({name:"UseDark",props:["selector","attribute","valueDark","valueLight","onChanged","storageKey","storage"],setup(t,{slots:e}){const r=f.useDark(t),o=n.reactive({isDark:r,toggleDark:u.useToggle(r)});return()=>{if(e.default)return e.default(o)}}}),at=n.defineComponent({name:"UseDeviceMotion",setup(t,{slots:e}){const r=n.reactive(f.useDeviceMotion());return()=>{if(e.default)return e.default(r)}}}),st=n.defineComponent({name:"UseDeviceOrientation",setup(t,{slots:e}){const r=n.reactive(f.useDeviceOrientation());return()=>{if(e.default)return e.default(r)}}}),lt=n.defineComponent({name:"UseDevicePixelRatio",setup(t,{slots:e}){const r=n.reactive({pixelRatio:f.useDevicePixelRatio()});return()=>{if(e.default)return e.default(r)}}}),it=n.defineComponent({name:"UseDevicesList",props:["onUpdated","requestPermissions","constraints"],setup(t,{slots:e}){const r=n.reactive(f.useDevicesList(t));return()=>{if(e.default)return e.default(r)}}}),ut=n.defineComponent({name:"UseDocumentVisibility",setup(t,{slots:e}){const r=n.reactive({visibility:f.useDocumentVisibility()});return()=>{if(e.default)return e.default(r)}}});var ct=Object.defineProperty,ft=Object.defineProperties,dt=Object.getOwnPropertyDescriptors,D=Object.getOwnPropertySymbols,pt=Object.prototype.hasOwnProperty,vt=Object.prototype.propertyIsEnumerable,ee=(t,e,r)=>e in t?ct(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,_t=(t,e)=>{for(var r in e||(e={}))pt.call(e,r)&&ee(t,r,e[r]);if(D)for(var r of D(e))vt.call(e,r)&&ee(t,r,e[r]);return t},gt=(t,e)=>ft(t,dt(e));const Ot=n.defineComponent({name:"UseDraggable",props:["storageKey","storageType","initialValue","exact","preventDefault","stopPropagation","pointerTypes","as","handle"],setup(t,{slots:e}){const r=n.ref(),o=n.computed(()=>{var l;return(l=t.handle)!=null?l:r.value}),a=t.storageKey?f.useStorage(t.storageKey,u.resolveUnref(t.initialValue)||{x:0,y:0},f.isClient?t.storageType==="session"?sessionStorage:localStorage:void 0):t.initialValue||{x:0,y:0},i=n.reactive(f.useDraggable(r,gt(_t({},t),{handle:o,initialValue:a})));return()=>{if(e.default)return n.h(t.as||"div",{ref:r,style:`touch-action:none;${i.style}`},e.default(i))}}}),mt=n.defineComponent({name:"UseElementBounding",props:["box","as"],setup(t,{slots:e}){const r=n.ref(),o=n.reactive(f.useElementBounding(r));return()=>{if(e.default)return n.h(t.as||"div",{ref:r},e.default(o))}}});function Pt(t){const e=n.ref(!1);return $(t,"mouseenter",()=>e.value=!0),$(t,"mouseleave",()=>e.value=!1),e}const yt={[u.directiveHooks.mounted](t,e){if(typeof e.value=="function"){const r=Pt(t);n.watch(r,o=>e.value(o))}}},ht=n.defineComponent({name:"UseElementSize",props:["width","height","box"],setup(t,{slots:e}){const r=n.ref(),o=n.reactive(f.useElementSize(r,{width:t.width,height:t.height},{box:t.box}));return()=>{if(e.default)return n.h(t.as||"div",{ref:r},e.default(o))}}});var te=Object.getOwnPropertySymbols,wt=Object.prototype.hasOwnProperty,bt=Object.prototype.propertyIsEnumerable,Ut=(t,e)=>{var r={};for(var o in t)wt.call(t,o)&&e.indexOf(o)<0&&(r[o]=t[o]);if(t!=null&&te)for(var o of te(t))e.indexOf(o)<0&&bt.call(t,o)&&(r[o]=t[o]);return r};function St(t,e,r={}){const o=r,{window:a=b}=o,i=Ut(o,["window"]);let l;const c=z(()=>a&&"ResizeObserver"in a),d=()=>{l&&(l.disconnect(),l=void 0)},p=n.watch(()=>h(t),m=>{d(),c.value&&a&&m&&(l=new ResizeObserver(e),l.observe(m,i))},{immediate:!0,flush:"post"}),_=()=>{d(),p()};return u.tryOnScopeDispose(_),{isSupported:c,stop:_}}function $t(t,e={width:0,height:0},r={}){const{box:o="content-box"}=r,a=n.ref(e.width),i=n.ref(e.height);return St(t,([l])=>{const c=o==="border-box"?l.borderBoxSize:o==="content-box"?l.contentBoxSize:l.devicePixelContentBoxSize;c?(a.value=c.reduce((d,{inlineSize:p})=>d+p,0),i.value=c.reduce((d,{blockSize:p})=>d+p,0)):(a.value=l.contentRect.width,i.value=l.contentRect.height)},r),n.watch(()=>h(t),l=>{a.value=l?e.width:0,i.value=l?e.height:0}),{width:a,height:i}}const Ct={[u.directiveHooks.mounted](t,e){var r;const o=typeof e.value=="function"?e.value:(r=e.value)==null?void 0:r[0],a=typeof e.value=="function"?[]:e.value.slice(1),{width:i,height:l}=$t(t,...a);n.watch([i,l],([c,d])=>o({width:c,height:d}))}},Et=n.defineComponent({name:"UseElementVisibility",props:["as"],setup(t,{slots:e}){const r=n.ref(),o=n.reactive({isVisible:f.useElementVisibility(r)});return()=>{if(e.default)return n.h(t.as||"div",{ref:r},e.default(o))}}});function re(t,{window:e=b,scrollTarget:r}={}){const o=n.ref(!1),a=()=>{if(!e)return;const i=e.document,l=h(t);if(!l)o.value=!1;else{const c=l.getBoundingClientRect();o.value=c.top<=(e.innerHeight||i.documentElement.clientHeight)&&c.left<=(e.innerWidth||i.documentElement.clientWidth)&&c.bottom>=0&&c.right>=0}};return n.watch(()=>h(t),()=>a(),{immediate:!0,flush:"post"}),e&&$(r||e,"scroll",a,{capture:!1,passive:!0}),o}const jt={[u.directiveHooks.mounted](t,e){if(typeof e.value=="function"){const r=e.value,o=re(t);n.watch(o,a=>r(a),{immediate:!0})}else{const[r,o]=e.value,a=re(t,o);n.watch(a,i=>r(i),{immediate:!0})}}},Lt=n.defineComponent({name:"UseEyeDropper",props:{sRGBHex:String},setup(t,{slots:e}){const r=n.reactive(f.useEyeDropper());return()=>{if(e.default)return e.default(r)}}}),It=n.defineComponent({name:"UseFullscreen",props:["as"],setup(t,{slots:e}){const r=n.ref(),o=n.reactive(f.useFullscreen(r));return()=>{if(e.default)return n.h(t.as||"div",{ref:r},e.default(o))}}}),Mt=n.defineComponent({name:"UseGeolocation",props:["enableHighAccuracy","maximumAge","timeout","navigator"],setup(t,{slots:e}){const r=n.reactive(f.useGeolocation(t));return()=>{if(e.default)return e.default(r)}}}),Vt=n.defineComponent({name:"UseIdle",props:["timeout","events","listenForVisibilityChange","initialState"],setup(t,{slots:e}){const r=n.reactive(f.useIdle(t.timeout,t));return()=>{if(e.default)return e.default(r)}}});function Tt(t,e,r){const{immediate:o=!0,delay:a=0,onError:i=u.noop,resetOnExecute:l=!0,shallow:c=!0,throwError:d}=r??{},p=c?n.shallowRef(e):n.ref(e),_=n.ref(!1),m=n.ref(!1),w=n.ref(void 0);async function v(g=0,...P){l&&(p.value=e),w.value=void 0,_.value=!1,m.value=!0,g>0&&await u.promiseTimeout(g);const U=typeof t=="function"?t(...P):t;try{const C=await U;p.value=C,_.value=!0}catch(C){if(w.value=C,i(C),d)throw w}finally{m.value=!1}return p.value}return o&&v(a),{state:p,isReady:_,isLoading:m,error:w,execute:v}}var At=Object.defineProperty,ne=Object.getOwnPropertySymbols,Nt=Object.prototype.hasOwnProperty,Rt=Object.prototype.propertyIsEnumerable,oe=(t,e,r)=>e in t?At(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Ht=(t,e)=>{for(var r in e||(e={}))Nt.call(e,r)&&oe(t,r,e[r]);if(ne)for(var r of ne(e))Rt.call(e,r)&&oe(t,r,e[r]);return t};async function zt(t){return new Promise((e,r)=>{const o=new Image,{src:a,srcset:i,sizes:l}=t;o.src=a,i&&(o.srcset=i),l&&(o.sizes=l),o.onload=()=>e(o),o.onerror=r})}const Bt=(t,e={})=>{const r=Tt(()=>zt(u.resolveUnref(t)),void 0,Ht({resetOnExecute:!0},e));return n.watch(()=>u.resolveUnref(t),()=>r.execute(e.delay),{deep:!0}),r},kt=n.defineComponent({name:"UseImage",props:["src","srcset","sizes","as"],setup(t,{slots:e}){const r=n.reactive(Bt(t));return()=>r.isLoading&&e.loading?e.loading(r):r.error&&e.error?e.error(r.error):e.default?e.default(r):n.h(t.as||"img",t)}}),ae=1;function B(t,e={}){const{throttle:r=0,idle:o=200,onStop:a=u.noop,onScroll:i=u.noop,offset:l={left:0,right:0,top:0,bottom:0},eventListenerOptions:c={capture:!1,passive:!0},behavior:d="auto"}=e,p=n.ref(0),_=n.ref(0),m=n.computed({get(){return p.value},set(y){v(y,void 0)}}),w=n.computed({get(){return _.value},set(y){v(void 0,y)}});function v(y,S){var E,j,O;const I=u.resolveUnref(t);!I||(O=I instanceof Document?document.body:I)==null||O.scrollTo({top:(E=u.resolveUnref(S))!=null?E:w.value,left:(j=u.resolveUnref(y))!=null?j:m.value,behavior:u.resolveUnref(d)})}const g=n.ref(!1),P=n.reactive({left:!0,right:!1,top:!0,bottom:!1}),U=n.reactive({left:!1,right:!1,top:!1,bottom:!1}),C=u.useDebounceFn(y=>{g.value=!1,U.left=!1,U.right=!1,U.top=!1,U.bottom=!1,a(y)},r+o),L=y=>{const S=y.target===document?y.target.documentElement:y.target,E=S.scrollLeft;U.left=E<p.value,U.right=E>_.value,P.left=E<=0+(l.left||0),P.right=E+S.clientWidth>=S.scrollWidth-(l.right||0)-ae,p.value=E;let j=S.scrollTop;y.target===document&&!j&&(j=document.body.scrollTop),U.top=j<_.value,U.bottom=j>_.value,P.top=j<=0+(l.top||0),P.bottom=j+S.clientHeight>=S.scrollHeight-(l.bottom||0)-ae,_.value=j,g.value=!0,C(y),i(y)};return $(t,"scroll",r?u.useThrottleFn(L,r):L,c),{x:m,y:w,isScrolling:g,arrivedState:P,directions:U}}var Wt=Object.defineProperty,Ft=Object.defineProperties,Kt=Object.getOwnPropertyDescriptors,se=Object.getOwnPropertySymbols,Jt=Object.prototype.hasOwnProperty,Gt=Object.prototype.propertyIsEnumerable,le=(t,e,r)=>e in t?Wt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,ie=(t,e)=>{for(var r in e||(e={}))Jt.call(e,r)&&le(t,r,e[r]);if(se)for(var r of se(e))Gt.call(e,r)&&le(t,r,e[r]);return t},qt=(t,e)=>Ft(t,Kt(e));function ue(t,e,r={}){var o,a;const i=(o=r.direction)!=null?o:"bottom",l=n.reactive(B(t,qt(ie({},r),{offset:ie({[i]:(a=r.distance)!=null?a:0},r.offset)})));n.watch(()=>l.arrivedState[i],async c=>{var d,p;if(c){const _=u.resolveUnref(t),m={height:(d=_==null?void 0:_.scrollHeight)!=null?d:0,width:(p=_==null?void 0:_.scrollWidth)!=null?p:0};await e(l),r.preserveScrollPosition&&_&&n.nextTick(()=>{_.scrollTo({top:_.scrollHeight-m.height,left:_.scrollWidth-m.width})})}})}const Qt={[u.directiveHooks.mounted](t,e){typeof e.value=="function"?ue(t,e.value):ue(t,...e.value)}};function ce(t,e,r={}){const{root:o,rootMargin:a="0px",threshold:i=.1,window:l=b}=r,c=z(()=>l&&"IntersectionObserver"in l);let d=u.noop;const p=c.value?n.watch(()=>({el:h(t),root:h(o)}),({el:m,root:w})=>{if(d(),!m)return;const v=new IntersectionObserver(e,{root:w,rootMargin:a,threshold:i});v.observe(m),d=()=>{v.disconnect(),d=u.noop}},{immediate:!0,flush:"post"}):u.noop,_=()=>{d(),p()};return u.tryOnScopeDispose(_),{isSupported:c,stop:_}}const Xt={[u.directiveHooks.mounted](t,e){typeof e.value=="function"?ce(t,e.value):ce(t,...e.value)}},Yt=n.defineComponent({name:"UseMouse",props:["touch","resetOnTouchEnds","initialValue"],setup(t,{slots:e}){const r=n.reactive(f.useMouse(t));return()=>{if(e.default)return e.default(r)}}}),Zt=n.defineComponent({name:"UseMouseElement",props:["handleOutside","as"],setup(t,{slots:e}){const r=n.ref(),o=n.reactive(f.useMouseInElement(r,t));return()=>{if(e.default)return n.h(t.as||"div",{ref:r},e.default(o))}}});var xt=Object.defineProperty,Dt=Object.defineProperties,er=Object.getOwnPropertyDescriptors,fe=Object.getOwnPropertySymbols,tr=Object.prototype.hasOwnProperty,rr=Object.prototype.propertyIsEnumerable,de=(t,e,r)=>e in t?xt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,nr=(t,e)=>{for(var r in e||(e={}))tr.call(e,r)&&de(t,r,e[r]);if(fe)for(var r of fe(e))rr.call(e,r)&&de(t,r,e[r]);return t},or=(t,e)=>Dt(t,er(e));const ar=n.defineComponent({name:"UseMousePressed",props:["touch","initialValue","as"],setup(t,{slots:e}){const r=n.ref(),o=n.reactive(f.useMousePressed(or(nr({},t),{target:r})));return()=>{if(e.default)return n.h(t.as||"div",{ref:r},e.default(o))}}}),sr=n.defineComponent({name:"UseNetwork",setup(t,{slots:e}){const r=n.reactive(f.useNetwork());return()=>{if(e.default)return e.default(r)}}});var lr=Object.defineProperty,ir=Object.defineProperties,ur=Object.getOwnPropertyDescriptors,pe=Object.getOwnPropertySymbols,cr=Object.prototype.hasOwnProperty,fr=Object.prototype.propertyIsEnumerable,ve=(t,e,r)=>e in t?lr(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,dr=(t,e)=>{for(var r in e||(e={}))cr.call(e,r)&&ve(t,r,e[r]);if(pe)for(var r of pe(e))fr.call(e,r)&&ve(t,r,e[r]);return t},pr=(t,e)=>ir(t,ur(e));const vr=n.defineComponent({name:"UseNow",props:["interval"],setup(t,{slots:e}){const r=n.reactive(f.useNow(pr(dr({},t),{controls:!0})));return()=>{if(e.default)return e.default(r)}}}),_r=n.defineComponent({name:"UseObjectUrl",props:["object"],setup(t,{slots:e}){const r=n.toRef(t,"object"),o=f.useObjectUrl(r);return()=>{if(e.default&&o.value)return e.default(o)}}});var gr=Object.defineProperty,Or=Object.defineProperties,mr=Object.getOwnPropertyDescriptors,_e=Object.getOwnPropertySymbols,Pr=Object.prototype.hasOwnProperty,yr=Object.prototype.propertyIsEnumerable,ge=(t,e,r)=>e in t?gr(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,hr=(t,e)=>{for(var r in e||(e={}))Pr.call(e,r)&&ge(t,r,e[r]);if(_e)for(var r of _e(e))yr.call(e,r)&&ge(t,r,e[r]);return t},wr=(t,e)=>Or(t,mr(e));const br=n.defineComponent({name:"UseOffsetPagination",props:["total","page","pageSize","onPageChange","onPageSizeChange","onPageCountChange"],emits:["page-change","page-size-change","page-count-change"],setup(t,{slots:e,emit:r}){const o=n.reactive(f.useOffsetPagination(wr(hr({},t),{onPageChange(...a){var i;(i=t.onPageChange)==null||i.call(t,...a),r("page-change",...a)},onPageSizeChange(...a){var i;(i=t.onPageSizeChange)==null||i.call(t,...a),r("page-size-change",...a)},onPageCountChange(...a){var i;(i=t.onPageCountChange)==null||i.call(t,...a),r("page-count-change",...a)}})));return()=>{if(e.default)return e.default(o)}}}),Ur=n.defineComponent({name:"UseOnline",setup(t,{slots:e}){const r=n.reactive({isOnline:f.useOnline()});return()=>{if(e.default)return e.default(r)}}}),Sr=n.defineComponent({name:"UsePageLeave",setup(t,{slots:e}){const r=n.reactive({isLeft:f.usePageLeave()});return()=>{if(e.default)return e.default(r)}}});var $r=Object.defineProperty,Cr=Object.defineProperties,Er=Object.getOwnPropertyDescriptors,Oe=Object.getOwnPropertySymbols,jr=Object.prototype.hasOwnProperty,Lr=Object.prototype.propertyIsEnumerable,me=(t,e,r)=>e in t?$r(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Ir=(t,e)=>{for(var r in e||(e={}))jr.call(e,r)&&me(t,r,e[r]);if(Oe)for(var r of Oe(e))Lr.call(e,r)&&me(t,r,e[r]);return t},Mr=(t,e)=>Cr(t,Er(e));const Vr=n.defineComponent({name:"UsePointer",props:["pointerTypes","initialValue","target"],setup(t,{slots:e}){const r=n.ref(null),o=n.reactive(f.usePointer(Mr(Ir({},t),{target:t.target==="self"?r:b})));return()=>{if(e.default)return e.default(o,{ref:r})}}}),Tr=n.defineComponent({name:"UsePreferredColorScheme",setup(t,{slots:e}){const r=n.reactive({colorScheme:f.usePreferredColorScheme()});return()=>{if(e.default)return e.default(r)}}}),Ar=n.defineComponent({name:"UsePreferredContrast",setup(t,{slots:e}){const r=n.reactive({contrast:f.usePreferredContrast()});return()=>{if(e.default)return e.default(r)}}}),Nr=n.defineComponent({name:"UsePreferredDark",setup(t,{slots:e}){const r=n.reactive({prefersDark:f.usePreferredDark()});return()=>{if(e.default)return e.default(r)}}}),Rr=n.defineComponent({name:"UsePreferredLanguages",setup(t,{slots:e}){const r=n.reactive({languages:f.usePreferredLanguages()});return()=>{if(e.default)return e.default(r)}}}),Hr=n.defineComponent({name:"UsePreferredReducedMotion",setup(t,{slots:e}){const r=n.reactive({motion:f.usePreferredReducedMotion()});return()=>{if(e.default)return e.default(r)}}});function V(t,e,{window:r=b,initialValue:o=""}={}){const a=n.ref(o),i=n.computed(()=>{var l;return h(e)||((l=r==null?void 0:r.document)==null?void 0:l.documentElement)});return n.watch([i,()=>u.resolveUnref(t)],([l,c])=>{var d;if(l&&r){const p=(d=r.getComputedStyle(l).getPropertyValue(c))==null?void 0:d.trim();a.value=p||o}},{immediate:!0}),n.watch(a,l=>{var c;((c=i.value)==null?void 0:c.style)&&i.value.style.setProperty(u.resolveUnref(t),l)}),a}const Pe="--vueuse-safe-area-top",ye="--vueuse-safe-area-right",he="--vueuse-safe-area-bottom",we="--vueuse-safe-area-left";function zr(){const t=n.ref(""),e=n.ref(""),r=n.ref(""),o=n.ref("");if(u.isClient){const i=V(Pe),l=V(ye),c=V(he),d=V(we);i.value="env(safe-area-inset-top, 0px)",l.value="env(safe-area-inset-right, 0px)",c.value="env(safe-area-inset-bottom, 0px)",d.value="env(safe-area-inset-left, 0px)",a(),$("resize",u.useDebounceFn(a))}function a(){t.value=T(Pe),e.value=T(ye),r.value=T(he),o.value=T(we)}return{top:t,right:e,bottom:r,left:o,update:a}}function T(t){return getComputedStyle(document.documentElement).getPropertyValue(t)}const Br=n.defineComponent({name:"UseScreenSafeArea",props:{top:Boolean,right:Boolean,bottom:Boolean,left:Boolean},setup(t,{slots:e}){const{top:r,right:o,bottom:a,left:i}=zr();return()=>{if(e.default)return n.h("div",{style:{paddingTop:t.top?r.value:"",paddingRight:t.right?o.value:"",paddingBottom:t.bottom?a.value:"",paddingLeft:t.left?i.value:"",boxSizing:"border-box",maxHeight:"100vh",maxWidth:"100vw",overflow:"auto"}},e.default())}}});var kr=Object.defineProperty,Wr=Object.defineProperties,Fr=Object.getOwnPropertyDescriptors,be=Object.getOwnPropertySymbols,Kr=Object.prototype.hasOwnProperty,Jr=Object.prototype.propertyIsEnumerable,Ue=(t,e,r)=>e in t?kr(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Gr=(t,e)=>{for(var r in e||(e={}))Kr.call(e,r)&&Ue(t,r,e[r]);if(be)for(var r of be(e))Jr.call(e,r)&&Ue(t,r,e[r]);return t},qr=(t,e)=>Wr(t,Fr(e));const Qr={[u.directiveHooks.mounted](t,e){if(typeof e.value=="function"){const r=e.value,o=B(t,{onScroll(){r(o)},onStop(){r(o)}})}else{const[r,o]=e.value,a=B(t,qr(Gr({},o),{onScroll(i){var l;(l=o.onScroll)==null||l.call(o,i),r(a)},onStop(i){var l;(l=o.onStop)==null||l.call(o,i),r(a)}}))}}};function Xr(t){const e=t||window.event;return e.touches.length>1?!0:(e.preventDefault&&e.preventDefault(),!1)}function Yr(t,e=!1){const r=n.ref(e);let o=null,a;n.watch(u.resolveRef(t),c=>{if(c){const d=c;a=d.style.overflow,r.value&&(d.style.overflow="hidden")}},{immediate:!0});const i=()=>{const c=u.resolveUnref(t);!c||r.value||(u.isIOS&&(o=$(c,"touchmove",Xr,{passive:!1})),c.style.overflow="hidden",r.value=!0)},l=()=>{const c=u.resolveUnref(t);!c||!r.value||(u.isIOS&&(o==null||o()),c.style.overflow=a,r.value=!1)};return u.tryOnScopeDispose(l),n.computed({get(){return r.value},set(c){c?i():l()}})}const Zr=(()=>{let t=!1;const e=n.ref(!1);return(r,o)=>{if(e.value=o.value,t)return;t=!0;const a=Yr(r,o.value);n.watch(e,i=>a.value=i)}})();var xr=Object.defineProperty,Dr=Object.defineProperties,en=Object.getOwnPropertyDescriptors,Se=Object.getOwnPropertySymbols,tn=Object.prototype.hasOwnProperty,rn=Object.prototype.propertyIsEnumerable,$e=(t,e,r)=>e in t?xr(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,nn=(t,e)=>{for(var r in e||(e={}))tn.call(e,r)&&$e(t,r,e[r]);if(Se)for(var r of Se(e))rn.call(e,r)&&$e(t,r,e[r]);return t},on=(t,e)=>Dr(t,en(e));const an=n.defineComponent({name:"UseTimeAgo",props:["time","updateInterval","max","fullDateFormatter","messages"],setup(t,{slots:e}){const r=n.reactive(f.useTimeAgo(()=>t.time,on(nn({},t),{controls:!0})));return()=>{if(e.default)return e.default(r)}}});var sn=Object.defineProperty,ln=Object.defineProperties,un=Object.getOwnPropertyDescriptors,Ce=Object.getOwnPropertySymbols,cn=Object.prototype.hasOwnProperty,fn=Object.prototype.propertyIsEnumerable,Ee=(t,e,r)=>e in t?sn(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,dn=(t,e)=>{for(var r in e||(e={}))cn.call(e,r)&&Ee(t,r,e[r]);if(Ce)for(var r of Ce(e))fn.call(e,r)&&Ee(t,r,e[r]);return t},pn=(t,e)=>ln(t,un(e));const vn=n.defineComponent({name:"UseTimestamp",props:["immediate","interval","offset"],setup(t,{slots:e}){const r=n.reactive(f.useTimestamp(pn(dn({},t),{controls:!0})));return()=>{if(e.default)return e.default(r)}}});var _n=Object.defineProperty,je=Object.getOwnPropertySymbols,gn=Object.prototype.hasOwnProperty,On=Object.prototype.propertyIsEnumerable,Le=(t,e,r)=>e in t?_n(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Ie=(t,e)=>{for(var r in e||(e={}))gn.call(e,r)&&Le(t,r,e[r]);if(je)for(var r of je(e))On.call(e,r)&&Le(t,r,e[r]);return t};const mn=n.defineComponent({name:"UseVirtualList",props:["list","options","height"],setup(t,{slots:e}){const{list:r}=n.toRefs(t),{list:o,containerProps:a,wrapperProps:i}=f.useVirtualList(r,t.options);return a.style.height=t.height||"300px",()=>n.h("div",Ie({},a),[n.h("div",Ie({},i.value),o.value.map(l=>n.h("div",{style:{overFlow:"hidden",height:l.height}},e.default?e.default(l):"Please set content!")))])}}),Pn=n.defineComponent({name:"UseWindowFocus",setup(t,{slots:e}){const r=n.reactive({focused:f.useWindowFocus()});return()=>{if(e.default)return e.default(r)}}}),yn=n.defineComponent({name:"UseWindowSize",props:["initialWidth","initialHeight"],setup(t,{slots:e}){const r=n.reactive(f.useWindowSize(t));return()=>{if(e.default)return e.default(r)}}});s.OnClickOutside=M,s.OnLongPress=ze,s.UseActiveElement=Be,s.UseBattery=ke,s.UseBrowserLocation=We,s.UseColorMode=nt,s.UseDark=ot,s.UseDeviceMotion=at,s.UseDeviceOrientation=st,s.UseDevicePixelRatio=lt,s.UseDevicesList=it,s.UseDocumentVisibility=ut,s.UseDraggable=Ot,s.UseElementBounding=mt,s.UseElementSize=ht,s.UseElementVisibility=Et,s.UseEyeDropper=Lt,s.UseFullscreen=It,s.UseGeolocation=Mt,s.UseIdle=Vt,s.UseImage=kt,s.UseMouse=Yt,s.UseMouseInElement=Zt,s.UseMousePressed=ar,s.UseNetwork=sr,s.UseNow=vr,s.UseObjectUrl=_r,s.UseOffsetPagination=br,s.UseOnline=Ur,s.UsePageLeave=Sr,s.UsePointer=Vr,s.UsePreferredColorScheme=Tr,s.UsePreferredContrast=Ar,s.UsePreferredDark=Nr,s.UsePreferredLanguages=Rr,s.UsePreferredReducedMotion=Hr,s.UseScreenSafeArea=Br,s.UseTimeAgo=an,s.UseTimestamp=vn,s.UseVirtualList=mn,s.UseWindowFocus=Pn,s.UseWindowSize=yn,s.VOnClickOutside=W,s.VOnLongPress=G,s.vElementHover=yt,s.vElementSize=Ct,s.vElementVisibility=jt,s.vInfiniteScroll=Qt,s.vIntersectionObserver=Xt,s.vOnClickOutside=W,s.vOnKeyStroke=Re,s.vOnLongPress=G,s.vScroll=Qr,s.vScrollLock=Zr,Object.defineProperty(s,"__esModule",{value:!0})})(this.VueUse=this.VueUse||{},VueDemi,VueUse,VueUse);
{
"name": "@vueuse/components",
"version": "9.2.0",
"version": "9.3.0",
"description": "Renderless components for VueUse",

@@ -36,6 +36,6 @@ "author": "Jacob Clevenger<https://github.com/wheatjs>",

"dependencies": {
"@vueuse/core": "9.2.0",
"@vueuse/shared": "9.2.0",
"@vueuse/core": "9.3.0",
"@vueuse/shared": "9.3.0",
"vue-demi": "*"
}
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc