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

@vueuse/shared

Package Overview
Dependencies
Maintainers
3
Versions
237
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@vueuse/shared - npm Package Compare versions

Comparing version 7.7.1 to 8.0.0-beta.2

411

index.d.ts
import * as vue_demi from 'vue-demi';
import { Ref, WatchOptions, WatchSource, ComputedRef, WatchCallback, WatchStopHandle, WatchOptionsBase, ShallowUnwrapRef as ShallowUnwrapRef$1, UnwrapRef, ToRefs } from 'vue-demi';
import { WatchOptionsBase, Ref, WatchSource, ComputedRef, ShallowUnwrapRef as ShallowUnwrapRef$1, WatchOptions, UnwrapRef, ToRefs, WatchCallback, WatchStopHandle } from 'vue-demi';
import { MaybeRef as MaybeRef$1 } from '@vueuse/shared';
declare function computedEager<T>(fn: () => T, options?: WatchOptionsBase): Readonly<Ref<T>>;
/**
* Explicitly define the deps of computed.
*
* @param source
* @param fn
*/
declare function computedWithControl<T, S>(source: WatchSource<S>, fn: () => T): ComputedRef<T>;
/**
* The source code for this function was inspired by vue-apollo's `useEventHook` util
* https://github.com/vuejs/vue-apollo/blob/v4/packages/vue-apollo-composable/src/util/useEventHook.ts
*/
declare type EventHookOn<T = any> = (fn: (param: T) => void) => {
off: () => void;
};
declare type EventHookOff<T = any> = (fn: (param: T) => void) => void;
declare type EventHookTrigger<T = any> = (param: T) => void;
interface EventHook<T = any> {
on: EventHookOn<T>;
off: EventHookOff<T>;
trigger: EventHookTrigger<T>;
}
/**
* Utility for creating event hooks
*
* @see https://vueuse.org/createEventHook
*/
declare function createEventHook<T = any>(): EventHook<T>;
declare type CreateGlobalStateReturn<T> = () => T;
/**
* Keep states in the global scope to be reusable across Vue instances.
*
* @see https://vueuse.org/createGlobalState
* @param stateFactory A factory function to create the state
*/
declare function createGlobalState<T>(stateFactory: () => T): CreateGlobalStateReturn<T>;
/**
* Make a composable function usable with multiple Vue instances.
*
* @see https://vueuse.org/createSharedComposable
*/
declare function createSharedComposable<Fn extends ((...args: any[]) => any)>(composable: Fn): Fn;
interface ExtendRefOptions<Unwrap extends boolean = boolean> {
/**
* Is the extends properties enumerable
*
* @default false
*/
enumerable?: boolean;
/**
* Unwrap for Ref properties
*
* @default true
*/
unwrap?: Unwrap;
}
/**
* Overlad 1: Unwrap set to false
*/
declare function extendRef<R extends Ref<any>, Extend extends object, Options extends ExtendRefOptions<false>>(ref: R, extend: Extend, options?: Options): ShallowUnwrapRef$1<Extend> & R;
/**
* Overlad 2: Unwrap unset or set to true
*/
declare function extendRef<R extends Ref<any>, Extend extends object, Options extends ExtendRefOptions>(ref: R, extend: Extend, options?: Options): Extend & R;
declare const isClient: boolean;

@@ -210,82 +281,33 @@ declare const isDef: <T = any>(val?: T | undefined) => val is T;

/**
* `AND` conditions for refs.
*
* @see https://vueuse.org/and
* Shorthand for accessing `ref.value`
*/
declare function and(...args: MaybeRef<any>[]): ComputedRef<boolean>;
declare function get<T>(ref: MaybeRef<T>): T;
declare function get<T, K extends keyof T>(ref: MaybeRef<T>, key: K): T[K];
/**
* Two-way refs synchronization.
*
* @param a
* @param b
*/
declare function biSyncRef<R extends Ref<any>>(a: R, b: R): () => void;
declare function isDefined<T>(v: Ref<T>): v is Ref<Exclude<T, null | undefined>>;
declare function isDefined<T>(v: ComputedRef<T>): v is ComputedRef<Exclude<T, null | undefined>>;
declare function isDefined<T>(v: T): v is Exclude<T, null | undefined>;
/**
* Explicitly define the deps of computed.
* `AND` conditions for refs.
*
* @param source
* @param fn
* @see https://vueuse.org/logicAnd
*/
declare function controlledComputed<T, S>(source: WatchSource<S>, fn: () => T): ComputedRef<T>;
declare function logicAnd(...args: MaybeRef<any>[]): ComputedRef<boolean>;
interface ControlledRefOptions<T> {
/**
* Callback function before the ref changing.
*
* Returning `false` to dismiss the change.
*/
onBeforeChange?: (value: T, oldValue: T) => void | boolean;
/**
* Callback function after the ref changed
*
* This happends synchronously, with less overhead compare to `watch`
*/
onChanged?: (value: T, oldValue: T) => void;
}
/**
* Explicitly define the deps of computed.
* `NOT` conditions for refs.
*
* @param source
* @param fn
* @see https://vueuse.org/logicNot
*/
declare function controlledRef<T>(initial: T, options?: ControlledRefOptions<T>): vue_demi.ShallowUnwrapRef<{
get: (tracking?: boolean) => T;
set: (value: T, triggering?: boolean) => void;
untrackedGet: () => T;
silentSet: (v: T) => void;
peek: () => T;
lay: (v: T) => void;
}> & vue_demi.Ref<T>;
declare function logicNot(v: MaybeRef<any>): ComputedRef<boolean>;
/**
* The source code for this function was inspired by vue-apollo's `useEventHook` util
* https://github.com/vuejs/vue-apollo/blob/v4/packages/vue-apollo-composable/src/util/useEventHook.ts
*/
declare type EventHookOn<T = any> = (fn: (param: T) => void) => {
off: () => void;
};
declare type EventHookOff<T = any> = (fn: (param: T) => void) => void;
declare type EventHookTrigger<T = any> = (param: T) => void;
interface EventHook<T = any> {
on: EventHookOn<T>;
off: EventHookOff<T>;
trigger: EventHookTrigger<T>;
}
/**
* Utility for creating event hooks
* `OR` conditions for refs.
*
* @see https://vueuse.org/createEventHook
* @see https://vueuse.org/logicOr
*/
declare function createEventHook<T = any>(): EventHook<T>;
declare function logicOr(...args: MaybeRef<any>[]): ComputedRef<boolean>;
declare type CreateGlobalStateReturn<T> = () => T;
/**
* Keep states in the global scope to be reusable across Vue instances.
*
* @see https://vueuse.org/createGlobalState
* @param stateFactory A factory function to create the state
*/
declare function createGlobalState<T>(stateFactory: () => T): CreateGlobalStateReturn<T>;
declare function makeDestructurable<T extends Record<string, unknown>, A extends readonly any[]>(obj: T, arr: A): T & A;

@@ -304,97 +326,2 @@ declare type Reactify<T> = T extends (...args: infer A) => infer R ? (...args: {

/**
* Make a composable function usable with multiple Vue instances.
*
* @see https://vueuse.org/createSharedComposable
*/
declare function createSharedComposable<Fn extends ((...args: any[]) => any)>(composable: Fn): Fn;
/**
* Debounce updates of a ref.
*
* @return A new debounced ref.
*/
declare function useDebounce<T>(value: Ref<T>, ms?: number, options?: DebounceFilterOptions): Readonly<Ref<T>>;
interface DebouncedWatchOptions<Immediate> extends WatchOptions<Immediate> {
debounce?: MaybeRef<number>;
}
declare function debouncedWatch<T extends Readonly<WatchSource<unknown>[]>, Immediate extends Readonly<boolean> = false>(sources: T, cb: WatchCallback<MapSources<T>, MapOldSources<T, Immediate>>, options?: DebouncedWatchOptions<Immediate>): WatchStopHandle;
declare function debouncedWatch<T, Immediate extends Readonly<boolean> = false>(source: WatchSource<T>, cb: WatchCallback<T, Immediate extends true ? T | undefined : T>, options?: DebouncedWatchOptions<Immediate>): WatchStopHandle;
declare function debouncedWatch<T extends object, Immediate extends Readonly<boolean> = false>(source: T, cb: WatchCallback<T, Immediate extends true ? T | undefined : T>, options?: DebouncedWatchOptions<Immediate>): WatchStopHandle;
declare function eagerComputed<T>(fn: () => T, options?: WatchOptionsBase): Readonly<Ref<T>>;
interface ExtendRefOptions<Unwrap extends boolean = boolean> {
/**
* Is the extends properties enumerable
*
* @default false
*/
enumerable?: boolean;
/**
* Unwrap for Ref properties
*
* @default true
*/
unwrap?: Unwrap;
}
/**
* Overlad 1: Unwrap set to false
*/
declare function extendRef<R extends Ref<any>, Extend extends object, Options extends ExtendRefOptions<false>>(ref: R, extend: Extend, options?: Options): ShallowUnwrapRef$1<Extend> & R;
/**
* Overlad 2: Unwrap unset or set to true
*/
declare function extendRef<R extends Ref<any>, Extend extends object, Options extends ExtendRefOptions>(ref: R, extend: Extend, options?: Options): Extend & R;
/**
* Shorthand for accessing `ref.value`
*/
declare function get<T>(ref: MaybeRef<T>): T;
declare function get<T, K extends keyof T>(ref: MaybeRef<T>, key: K): T[K];
interface WatchWithFilterOptions<Immediate> extends WatchOptions<Immediate>, ConfigurableEventFilter {
}
declare function watchWithFilter<T extends Readonly<WatchSource<unknown>[]>, Immediate extends Readonly<boolean> = false>(sources: T, cb: WatchCallback<MapSources<T>, MapOldSources<T, Immediate>>, options?: WatchWithFilterOptions<Immediate>): WatchStopHandle;
declare function watchWithFilter<T, Immediate extends Readonly<boolean> = false>(source: WatchSource<T>, cb: WatchCallback<T, Immediate extends true ? T | undefined : T>, options?: WatchWithFilterOptions<Immediate>): WatchStopHandle;
declare function watchWithFilter<T extends object, Immediate extends Readonly<boolean> = false>(source: T, cb: WatchCallback<T, Immediate extends true ? T | undefined : T>, options?: WatchWithFilterOptions<Immediate>): WatchStopHandle;
declare type IgnoredUpdater = (updater: () => void) => void;
interface IgnorableWatchReturn {
ignoreUpdates: IgnoredUpdater;
ignorePrevAsyncUpdates: () => void;
stop: WatchStopHandle;
}
declare function ignorableWatch<T extends Readonly<WatchSource<unknown>[]>, Immediate extends Readonly<boolean> = false>(sources: T, cb: WatchCallback<MapSources<T>, MapOldSources<T, Immediate>>, options?: WatchWithFilterOptions<Immediate>): IgnorableWatchReturn;
declare function ignorableWatch<T, Immediate extends Readonly<boolean> = false>(source: WatchSource<T>, cb: WatchCallback<T, Immediate extends true ? T | undefined : T>, options?: WatchWithFilterOptions<Immediate>): IgnorableWatchReturn;
declare function ignorableWatch<T extends object, Immediate extends Readonly<boolean> = false>(source: T, cb: WatchCallback<T, Immediate extends true ? T | undefined : T>, options?: WatchWithFilterOptions<Immediate>): IgnorableWatchReturn;
declare function isDefined<T>(v: Ref<T>): v is Ref<Exclude<T, null | undefined>>;
declare function isDefined<T>(v: ComputedRef<T>): v is ComputedRef<Exclude<T, null | undefined>>;
declare function isDefined<T>(v: T): v is Exclude<T, null | undefined>;
declare function makeDestructurable<T extends Record<string, unknown>, A extends readonly any[]>(obj: T, arr: A): T & A;
/**
* `NOT` conditions for refs.
*
* @see https://vueuse.org/not
*/
declare function not(v: MaybeRef<any>): ComputedRef<boolean>;
/**
* `OR` conditions for refs.
*
* @see https://vueuse.org/or
*/
declare function or(...args: MaybeRef<any>[]): ComputedRef<boolean>;
interface PausableWatchReturn extends Pausable {
stop: WatchStopHandle;
}
declare function pausableWatch<T extends Readonly<WatchSource<unknown>[]>, Immediate extends Readonly<boolean> = false>(sources: T, cb: WatchCallback<MapSources<T>, MapOldSources<T, Immediate>>, options?: WatchWithFilterOptions<Immediate>): PausableWatchReturn;
declare function pausableWatch<T, Immediate extends Readonly<boolean> = false>(source: WatchSource<T>, cb: WatchCallback<T, Immediate extends true ? T | undefined : T>, options?: WatchWithFilterOptions<Immediate>): PausableWatchReturn;
declare function pausableWatch<T extends object, Immediate extends Readonly<boolean> = false>(source: T, cb: WatchCallback<T, Immediate extends true ? T | undefined : T>, options?: WatchWithFilterOptions<Immediate>): PausableWatchReturn;
declare type ReactifyNested<T, Keys extends keyof T = keyof T> = {

@@ -439,2 +366,18 @@ [K in Keys]: T[K] extends (...args: any[]) => any ? Reactify<T[K]> : T[K];

/**
* Create a ref which will be reset to the default value after some time.
*
* @see https://vueuse.org/refAutoReset
* @param defaultValue The value which will be set.
* @param afterMs A zero-or-greater delay in milliseconds.
*/
declare function refAutoReset<T>(defaultValue: T, afterMs?: MaybeRef$1<number>): Ref<T>;
/**
* Debounce updates of a ref.
*
* @return A new debounced ref.
*/
declare function refDebounced<T>(value: Ref<T>, ms?: number, options?: DebounceFilterOptions): Readonly<Ref<T>>;
/**
* Apply default value to a ref.

@@ -447,2 +390,46 @@ *

/**
* Throttle execution of a function. Especially useful for rate limiting
* execution of handlers on events like resize and scroll.
*
* @param value Ref value to be watched with throttle effect
* @param delay A zero-or-greater delay in milliseconds. For event callbacks, values around 100 or 250 (or even higher) are most useful.
* @param [trailing=true] if true, update the value again after the delay time is up
* @param [leading=true] if true, update the value on the leading edge of the ms timeout
*/
declare function refThrottled<T>(value: Ref<T>, delay?: number, trailing?: boolean, leading?: boolean): Ref<T>;
interface ControlledRefOptions<T> {
/**
* Callback function before the ref changing.
*
* Returning `false` to dismiss the change.
*/
onBeforeChange?: (value: T, oldValue: T) => void | boolean;
/**
* Callback function after the ref changed
*
* This happends synchronously, with less overhead compare to `watch`
*/
onChanged?: (value: T, oldValue: T) => void;
}
/**
* Explicitly define the deps of computed.
*
* @param source
* @param fn
*/
declare function refWithControl<T>(initial: T, options?: ControlledRefOptions<T>): vue_demi.ShallowUnwrapRef<{
get: (tracking?: boolean) => T;
set: (value: T, triggering?: boolean) => void;
untrackedGet: () => T;
silentSet: (v: T) => void;
peek: () => T;
lay: (v: T) => void;
}> & vue_demi.Ref<T>;
/**
* Alias for `refWithControl`
*/
declare const controlledRef: typeof refWithControl;
declare function set<T>(ref: Ref<T>, value: T): void;

@@ -464,31 +451,39 @@ declare function set<O extends object, K extends keyof O>(target: O, key: K, value: O[K]): void;

immediate?: boolean;
/**
* Direction of syncing
*
* @default 'both'
*/
direction?: 'ltr' | 'rtl' | 'both';
}
/**
* Keep target ref(s) in sync with the source ref
* Two-way refs synchronization.
*
* @param source source ref
* @param targets
* @param left
* @param right
*/
declare function syncRef<T>(source: WatchSource<T>, targets: Ref<T> | Ref<T>[], { flush, deep, immediate, }?: SyncRefOptions): vue_demi.WatchStopHandle;
declare function syncRef<R extends Ref<any>>(left: R, right: R, options?: SyncRefOptions): () => void;
interface SyncRefsOptions extends ConfigurableFlushSync {
/**
* Watch deeply
*
* @default false
*/
deep?: boolean;
/**
* Sync values immediately
*
* @default true
*/
immediate?: boolean;
}
/**
* Throttle execution of a function. Especially useful for rate limiting
* execution of handlers on events like resize and scroll.
* Keep target ref(s) in sync with the source ref
*
* @param value Ref value to be watched with throttle effect
* @param delay A zero-or-greater delay in milliseconds. For event callbacks, values around 100 or 250 (or even higher) are most useful.
* @param [trailing=true] if true, update the value again after the delay time is up
* @param [leading=true] if true, update the value on the leading edge of the ms timeout
* @param source source ref
* @param targets
*/
declare function useThrottle<T>(value: Ref<T>, delay?: number, trailing?: boolean, leading?: boolean): Ref<T>;
declare function syncRefs<T>(source: WatchSource<T>, targets: Ref<T> | Ref<T>[], options?: SyncRefsOptions): vue_demi.WatchStopHandle;
interface ThrottledWatchOptions<Immediate> extends WatchOptions<Immediate> {
throttle?: MaybeRef<number>;
trailing?: boolean;
leading?: boolean;
}
declare function throttledWatch<T extends Readonly<WatchSource<unknown>[]>, Immediate extends Readonly<boolean> = false>(sources: T, cb: WatchCallback<MapSources<T>, MapOldSources<T, Immediate>>, options?: ThrottledWatchOptions<Immediate>): WatchStopHandle;
declare function throttledWatch<T, Immediate extends Readonly<boolean> = false>(source: WatchSource<T>, cb: WatchCallback<T, Immediate extends true ? T | undefined : T>, options?: ThrottledWatchOptions<Immediate>): WatchStopHandle;
declare function throttledWatch<T extends object, Immediate extends Readonly<boolean> = false>(source: T, cb: WatchCallback<T, Immediate extends true ? T | undefined : T>, options?: ThrottledWatchOptions<Immediate>): WatchStopHandle;
/**

@@ -619,3 +614,16 @@ * Converts ref to reactive.

declare type DateLike = Date | number | string | undefined;
declare const formatDate: (date: Date, formatStr: string) => string;
declare const normalizeDate: (date: DateLike) => Date;
/**
* Get the formatted date according to the string of tokens passed in.
*
* @see https://vueuse.org/useDateFormat
* @param date
* @param formatStr
*/
declare function useDateFormat(date: MaybeRef$1<DateLike>, formatStr?: MaybeRef$1<string>): vue_demi.ComputedRef<string>;
declare type UseDateFormatReturn = ReturnType<typeof useDateFormat>;
/**
* Debounce execution of a function.

@@ -747,2 +755,8 @@ *

interface WatchWithFilterOptions<Immediate> extends WatchOptions<Immediate>, ConfigurableEventFilter {
}
declare function watchWithFilter<T extends Readonly<WatchSource<unknown>[]>, Immediate extends Readonly<boolean> = false>(sources: T, cb: WatchCallback<MapSources<T>, MapOldSources<T, Immediate>>, options?: WatchWithFilterOptions<Immediate>): WatchStopHandle;
declare function watchWithFilter<T, Immediate extends Readonly<boolean> = false>(source: WatchSource<T>, cb: WatchCallback<T, Immediate extends true ? T | undefined : T>, options?: WatchWithFilterOptions<Immediate>): WatchStopHandle;
declare function watchWithFilter<T extends object, Immediate extends Readonly<boolean> = false>(source: T, cb: WatchCallback<T, Immediate extends true ? T | undefined : T>, options?: WatchWithFilterOptions<Immediate>): WatchStopHandle;
interface WatchAtMostOptions<Immediate> extends WatchWithFilterOptions<Immediate> {

@@ -759,2 +773,19 @@ count: MaybeRef<number>;

interface WatchDebouncedOptions<Immediate> extends WatchOptions<Immediate> {
debounce?: MaybeRef<number>;
}
declare function watchDebounced<T extends Readonly<WatchSource<unknown>[]>, Immediate extends Readonly<boolean> = false>(sources: T, cb: WatchCallback<MapSources<T>, MapOldSources<T, Immediate>>, options?: WatchDebouncedOptions<Immediate>): WatchStopHandle;
declare function watchDebounced<T, Immediate extends Readonly<boolean> = false>(source: WatchSource<T>, cb: WatchCallback<T, Immediate extends true ? T | undefined : T>, options?: WatchDebouncedOptions<Immediate>): WatchStopHandle;
declare function watchDebounced<T extends object, Immediate extends Readonly<boolean> = false>(source: T, cb: WatchCallback<T, Immediate extends true ? T | undefined : T>, options?: WatchDebouncedOptions<Immediate>): WatchStopHandle;
declare type IgnoredUpdater = (updater: () => void) => void;
interface WatchIgnorableReturn {
ignoreUpdates: IgnoredUpdater;
ignorePrevAsyncUpdates: () => void;
stop: WatchStopHandle;
}
declare function watchIgnorable<T extends Readonly<WatchSource<unknown>[]>, Immediate extends Readonly<boolean> = false>(sources: T, cb: WatchCallback<MapSources<T>, MapOldSources<T, Immediate>>, options?: WatchWithFilterOptions<Immediate>): WatchIgnorableReturn;
declare function watchIgnorable<T, Immediate extends Readonly<boolean> = false>(source: WatchSource<T>, cb: WatchCallback<T, Immediate extends true ? T | undefined : T>, options?: WatchWithFilterOptions<Immediate>): WatchIgnorableReturn;
declare function watchIgnorable<T extends object, Immediate extends Readonly<boolean> = false>(source: T, cb: WatchCallback<T, Immediate extends true ? T | undefined : T>, options?: WatchWithFilterOptions<Immediate>): WatchIgnorableReturn;
declare function watchOnce<T extends Readonly<WatchSource<unknown>[]>, Immediate extends Readonly<boolean> = false>(source: T, cb: WatchCallback<MapSources<T>, MapOldSources<T, Immediate>>, options?: WatchOptions<Immediate>): void;

@@ -764,2 +795,18 @@ declare function watchOnce<T extends Readonly<WatchSource<unknown>[]>, Immediate extends Readonly<boolean> = false>(source: T, cb: WatchCallback<MapSources<T>, MapOldSources<T, Immediate>>, options?: WatchOptions<Immediate>): void;

interface WatchPausableReturn extends Pausable {
stop: WatchStopHandle;
}
declare function watchPausable<T extends Readonly<WatchSource<unknown>[]>, Immediate extends Readonly<boolean> = false>(sources: T, cb: WatchCallback<MapSources<T>, MapOldSources<T, Immediate>>, options?: WatchWithFilterOptions<Immediate>): WatchPausableReturn;
declare function watchPausable<T, Immediate extends Readonly<boolean> = false>(source: WatchSource<T>, cb: WatchCallback<T, Immediate extends true ? T | undefined : T>, options?: WatchWithFilterOptions<Immediate>): WatchPausableReturn;
declare function watchPausable<T extends object, Immediate extends Readonly<boolean> = false>(source: T, cb: WatchCallback<T, Immediate extends true ? T | undefined : T>, options?: WatchWithFilterOptions<Immediate>): WatchPausableReturn;
interface WatchThrottledOptions<Immediate> extends WatchOptions<Immediate> {
throttle?: MaybeRef<number>;
trailing?: boolean;
leading?: boolean;
}
declare function watchThrottled<T extends Readonly<WatchSource<unknown>[]>, Immediate extends Readonly<boolean> = false>(sources: T, cb: WatchCallback<MapSources<T>, MapOldSources<T, Immediate>>, options?: WatchThrottledOptions<Immediate>): WatchStopHandle;
declare function watchThrottled<T, Immediate extends Readonly<boolean> = false>(source: WatchSource<T>, cb: WatchCallback<T, Immediate extends true ? T | undefined : T>, options?: WatchThrottledOptions<Immediate>): WatchStopHandle;
declare function watchThrottled<T extends object, Immediate extends Readonly<boolean> = false>(source: T, cb: WatchCallback<T, Immediate extends true ? T | undefined : T>, options?: WatchThrottledOptions<Immediate>): WatchStopHandle;
/**

@@ -772,2 +819,2 @@ * Shorthand for watching value to be truthy

export { Awaitable, ConfigurableEventFilter, ConfigurableFlush, ConfigurableFlushSync, ControlledRefOptions, CreateGlobalStateReturn, DebounceFilterOptions, DebouncedWatchOptions, DeepMaybeRef, ElementOf, EventFilter, EventHook, EventHookOff, EventHookOn, EventHookTrigger, ExtendRefOptions, Fn, FunctionArgs, FunctionWrapperOptions, IgnorableWatchReturn, IgnoredUpdater, IntervalFnOptions, IntervalOptions, MapOldSources, MapSources, MaybeRef, Pausable, PausableWatchReturn, Reactify, ReactifyNested, ReactifyObjectOptions, RemovableRef, RemoveableRef, ShallowUnwrapRef, SingletonPromiseReturn, Stopable, Stoppable, SyncRefOptions, ThrottledWatchOptions, TimeoutFnOptions, TimeoutOptions, UntilArrayInstance, UntilBaseInstance, UntilToMatchOptions, UntilValueInstance, UseCounterOptions, UseLastChangedOptions, WatchAtMostOptions, WatchAtMostReturn, WatchWithFilterOptions, and, assert, biSyncRef, bypassFilter, clamp, containsProp, controlledComputed, controlledRef, createEventHook, createFilterWrapper, createGlobalState, reactify as createReactiveFn, createSharedComposable, createSingletonPromise, debounceFilter, useDebounce as debouncedRef, debouncedWatch, eagerComputed, extendRef, get, identity, ignorableWatch, increaseWithUnit, invoke, isBoolean, isClient, isDef, isDefined, isFunction, isNumber, isObject, isString, isWindow, makeDestructurable, noop, not, now, objectPick, or, pausableFilter, pausableWatch, promiseTimeout, rand, reactify, reactifyObject, reactiveComputed, reactiveOmit, reactivePick, refDefault, set, syncRef, throttleFilter, useThrottle as throttledRef, throttledWatch, timestamp, toReactive, toRefs, tryOnBeforeUnmount, tryOnMounted, tryOnScopeDispose, tryOnUnmounted, until, useCounter, useDebounce, useDebounceFn, useInterval, useIntervalFn, useLastChanged, useThrottle, useThrottleFn, useTimeout, useTimeoutFn, useToggle, watchAtMost, watchOnce, watchWithFilter, whenever };
export { Awaitable, ConfigurableEventFilter, ConfigurableFlush, ConfigurableFlushSync, ControlledRefOptions, CreateGlobalStateReturn, DateLike, DebounceFilterOptions, DeepMaybeRef, ElementOf, EventFilter, EventHook, EventHookOff, EventHookOn, EventHookTrigger, ExtendRefOptions, Fn, FunctionArgs, FunctionWrapperOptions, IgnoredUpdater, IntervalFnOptions, IntervalOptions, MapOldSources, MapSources, MaybeRef, Pausable, Reactify, ReactifyNested, ReactifyObjectOptions, RemovableRef, RemoveableRef, ShallowUnwrapRef, SingletonPromiseReturn, Stopable, Stoppable, SyncRefOptions, SyncRefsOptions, TimeoutFnOptions, TimeoutOptions, UntilArrayInstance, UntilBaseInstance, UntilToMatchOptions, UntilValueInstance, UseCounterOptions, UseDateFormatReturn, UseLastChangedOptions, WatchAtMostOptions, WatchAtMostReturn, WatchDebouncedOptions, WatchIgnorableReturn, WatchPausableReturn, WatchThrottledOptions, WatchWithFilterOptions, logicAnd as and, assert, refAutoReset as autoResetRef, bypassFilter, clamp, computedEager, computedWithControl, containsProp, computedWithControl as controlledComputed, controlledRef, createEventHook, createFilterWrapper, createGlobalState, reactify as createReactiveFn, createSharedComposable, createSingletonPromise, debounceFilter, refDebounced as debouncedRef, watchDebounced as debouncedWatch, computedEager as eagerComputed, extendRef, formatDate, get, identity, watchIgnorable as ignorableWatch, increaseWithUnit, invoke, isBoolean, isClient, isDef, isDefined, isFunction, isNumber, isObject, isString, isWindow, logicAnd, logicNot, logicOr, makeDestructurable, noop, normalizeDate, logicNot as not, now, objectPick, logicOr as or, pausableFilter, watchPausable as pausableWatch, promiseTimeout, rand, reactify, reactifyObject, reactiveComputed, reactiveOmit, reactivePick, refAutoReset, refDebounced, refDefault, refThrottled, refWithControl, set, syncRef, syncRefs, throttleFilter, refThrottled as throttledRef, watchThrottled as throttledWatch, timestamp, toReactive, toRefs, tryOnBeforeUnmount, tryOnMounted, tryOnScopeDispose, tryOnUnmounted, until, useCounter, useDateFormat, refDebounced as useDebounce, useDebounceFn, useInterval, useIntervalFn, useLastChanged, refThrottled as useThrottle, useThrottleFn, useTimeout, useTimeoutFn, useToggle, watchAtMost, watchDebounced, watchIgnorable, watchOnce, watchPausable, watchThrottled, watchWithFilter, whenever };

@@ -65,27 +65,33 @@ ;(function (window) {

function and(...args) {
return vueDemi.computed(() => args.every((i) => vueDemi.unref(i)));
var __defProp$8 = Object.defineProperty;
var __defProps$5 = Object.defineProperties;
var __getOwnPropDescs$5 = Object.getOwnPropertyDescriptors;
var __getOwnPropSymbols$a = Object.getOwnPropertySymbols;
var __hasOwnProp$a = Object.prototype.hasOwnProperty;
var __propIsEnum$a = Object.prototype.propertyIsEnumerable;
var __defNormalProp$8 = (obj, key, value) => key in obj ? __defProp$8(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
var __spreadValues$8 = (a, b) => {
for (var prop in b || (b = {}))
if (__hasOwnProp$a.call(b, prop))
__defNormalProp$8(a, prop, b[prop]);
if (__getOwnPropSymbols$a)
for (var prop of __getOwnPropSymbols$a(b)) {
if (__propIsEnum$a.call(b, prop))
__defNormalProp$8(a, prop, b[prop]);
}
return a;
};
var __spreadProps$5 = (a, b) => __defProps$5(a, __getOwnPropDescs$5(b));
function computedEager(fn, options) {
var _a;
const result = vueDemi.shallowRef();
vueDemi.watchEffect(() => {
result.value = fn();
}, __spreadProps$5(__spreadValues$8({}, options), {
flush: (_a = options == null ? void 0 : options.flush) != null ? _a : "sync"
}));
return vueDemi.readonly(result);
}
function biSyncRef(a, b) {
const flush = "sync";
const stop1 = vueDemi.watch(a, (newValue) => {
b.value = newValue;
}, {
flush,
immediate: true
});
const stop2 = vueDemi.watch(b, (newValue) => {
a.value = newValue;
}, {
flush,
immediate: true
});
return () => {
stop1();
stop2();
};
}
function controlledComputed(source, fn) {
function computedWithControl(source, fn) {
let v = void 0;

@@ -117,77 +123,2 @@ let track;

function __onlyVue3(name = "this function") {
if (vueDemi.isVue3)
return;
throw new Error(`[VueUse] ${name} is only works on Vue 3.`);
}
function extendRef(ref, extend, { enumerable = false, unwrap = true } = {}) {
__onlyVue3();
for (const [key, value] of Object.entries(extend)) {
if (key === "value")
continue;
if (vueDemi.isRef(value) && unwrap) {
Object.defineProperty(ref, key, {
get() {
return value.value;
},
set(v) {
value.value = v;
},
enumerable
});
} else {
Object.defineProperty(ref, key, { value, enumerable });
}
}
return ref;
}
function controlledRef(initial, options = {}) {
let source = initial;
let track;
let trigger;
const ref = vueDemi.customRef((_track, _trigger) => {
track = _track;
trigger = _trigger;
return {
get() {
return get();
},
set(v) {
set(v);
}
};
});
function get(tracking = true) {
if (tracking)
track();
return source;
}
function set(value, triggering = true) {
var _a, _b;
if (value === source)
return;
const old = source;
if (((_a = options.onBeforeChange) == null ? void 0 : _a.call(options, value, old)) === false)
return;
source = value;
(_b = options.onChanged) == null ? void 0 : _b.call(options, value, old);
if (triggering)
trigger();
}
const untrackedGet = () => get(false);
const silentSet = (v) => set(v, false);
const peek = () => get(false);
const lay = (v) => set(v, false);
return extendRef(ref, {
get,
set,
untrackedGet,
silentSet,
peek,
lay
}, { enumerable: true });
}
function createEventHook() {

@@ -229,8 +160,2 @@ const fns = [];

function reactify(fn) {
return function(...args) {
return vueDemi.computed(() => fn.apply(this, args.map((i) => vueDemi.unref(i))));
};
}
function tryOnScopeDispose(fn) {

@@ -267,2 +192,182 @@ if (vueDemi.getCurrentScope()) {

function __onlyVue3(name = "this function") {
if (vueDemi.isVue3)
return;
throw new Error(`[VueUse] ${name} is only works on Vue 3.`);
}
function extendRef(ref, extend, { enumerable = false, unwrap = true } = {}) {
__onlyVue3();
for (const [key, value] of Object.entries(extend)) {
if (key === "value")
continue;
if (vueDemi.isRef(value) && unwrap) {
Object.defineProperty(ref, key, {
get() {
return value.value;
},
set(v) {
value.value = v;
},
enumerable
});
} else {
Object.defineProperty(ref, key, { value, enumerable });
}
}
return ref;
}
function get(obj, key) {
if (key == null)
return vueDemi.unref(obj);
return vueDemi.unref(obj)[key];
}
function isDefined(v) {
return vueDemi.unref(v) != null;
}
function logicAnd(...args) {
return vueDemi.computed(() => args.every((i) => vueDemi.unref(i)));
}
function logicNot(v) {
return vueDemi.computed(() => !vueDemi.unref(v));
}
function logicOr(...args) {
return vueDemi.computed(() => args.some((i) => vueDemi.unref(i)));
}
var __defProp$7 = Object.defineProperty;
var __getOwnPropSymbols$9 = Object.getOwnPropertySymbols;
var __hasOwnProp$9 = Object.prototype.hasOwnProperty;
var __propIsEnum$9 = Object.prototype.propertyIsEnumerable;
var __defNormalProp$7 = (obj, key, value) => key in obj ? __defProp$7(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
var __spreadValues$7 = (a, b) => {
for (var prop in b || (b = {}))
if (__hasOwnProp$9.call(b, prop))
__defNormalProp$7(a, prop, b[prop]);
if (__getOwnPropSymbols$9)
for (var prop of __getOwnPropSymbols$9(b)) {
if (__propIsEnum$9.call(b, prop))
__defNormalProp$7(a, prop, b[prop]);
}
return a;
};
function makeDestructurable(obj, arr) {
if (typeof Symbol !== "undefined") {
const clone = __spreadValues$7({}, obj);
Object.defineProperty(clone, Symbol.iterator, {
enumerable: false,
value() {
let index = 0;
return {
next: () => ({
value: arr[index++],
done: index > arr.length
})
};
}
});
return clone;
} else {
return Object.assign([...arr], obj);
}
}
function reactify(fn) {
return function(...args) {
return vueDemi.computed(() => fn.apply(this, args.map((i) => vueDemi.unref(i))));
};
}
function reactifyObject(obj, optionsOrKeys = {}) {
let keys = [];
if (Array.isArray(optionsOrKeys)) {
keys = optionsOrKeys;
} else {
const { includeOwnProperties = true } = optionsOrKeys;
keys.push(...Object.keys(obj));
if (includeOwnProperties)
keys.push(...Object.getOwnPropertyNames(obj));
}
return Object.fromEntries(keys.map((key) => {
const value = obj[key];
return [
key,
typeof value === "function" ? reactify(value.bind(obj)) : value
];
}));
}
function toReactive(objectRef) {
if (!vueDemi.isRef(objectRef))
return vueDemi.reactive(objectRef);
const proxy = new Proxy({}, {
get(_, p, receiver) {
return vueDemi.unref(Reflect.get(objectRef.value, p, receiver));
},
set(_, p, value) {
if (vueDemi.isRef(objectRef.value[p]) && !vueDemi.isRef(value))
objectRef.value[p].value = value;
else
objectRef.value[p] = value;
return true;
},
deleteProperty(_, p) {
return Reflect.deleteProperty(objectRef.value, p);
},
has(_, p) {
return Reflect.has(objectRef.value, p);
},
ownKeys() {
return Object.keys(objectRef.value);
},
getOwnPropertyDescriptor() {
return {
enumerable: true,
configurable: true
};
}
});
return vueDemi.reactive(proxy);
}
function reactiveComputed(fn) {
return toReactive(vueDemi.computed(fn));
}
function reactiveOmit(obj, ...keys) {
return reactiveComputed(() => Object.fromEntries(Object.entries(vueDemi.toRefs(obj)).filter((e) => !keys.includes(e[0]))));
}
function reactivePick(obj, ...keys) {
return vueDemi.reactive(Object.fromEntries(keys.map((k) => [k, vueDemi.toRef(obj, k)])));
}
function refAutoReset(defaultValue, afterMs = 1e4) {
return vueDemi.customRef((track, trigger) => {
let value = defaultValue;
let timer;
const resetAfter = () => setTimeout(() => {
value = defaultValue;
trigger();
}, vueDemi.unref(afterMs));
return {
get() {
track();
return value;
},
set(newValue) {
value = newValue;
trigger();
clearTimeout(timer);
timer = resetAfter();
}
};
});
}
const isClient = typeof window !== "undefined";

@@ -444,3 +549,3 @@ const isDef = (val) => typeof val !== "undefined";

function useDebounce(value, ms = 200, options = {}) {
function refDebounced(value, ms = 200, options = {}) {
if (ms <= 0)

@@ -456,357 +561,77 @@ return value;

var __getOwnPropSymbols$a = Object.getOwnPropertySymbols;
var __hasOwnProp$a = Object.prototype.hasOwnProperty;
var __propIsEnum$a = Object.prototype.propertyIsEnumerable;
var __objRest$5 = (source, exclude) => {
var target = {};
for (var prop in source)
if (__hasOwnProp$a.call(source, prop) && exclude.indexOf(prop) < 0)
target[prop] = source[prop];
if (source != null && __getOwnPropSymbols$a)
for (var prop of __getOwnPropSymbols$a(source)) {
if (exclude.indexOf(prop) < 0 && __propIsEnum$a.call(source, prop))
target[prop] = source[prop];
function refDefault(source, defaultValue) {
return vueDemi.computed({
get() {
var _a;
return (_a = source.value) != null ? _a : defaultValue;
},
set(value) {
source.value = value;
}
return target;
};
function watchWithFilter(source, cb, options = {}) {
const _a = options, {
eventFilter = bypassFilter
} = _a, watchOptions = __objRest$5(_a, [
"eventFilter"
]);
return vueDemi.watch(source, createFilterWrapper(eventFilter, cb), watchOptions);
});
}
var __defProp$8 = Object.defineProperty;
var __defProps$5 = Object.defineProperties;
var __getOwnPropDescs$5 = Object.getOwnPropertyDescriptors;
var __getOwnPropSymbols$9 = Object.getOwnPropertySymbols;
var __hasOwnProp$9 = Object.prototype.hasOwnProperty;
var __propIsEnum$9 = Object.prototype.propertyIsEnumerable;
var __defNormalProp$8 = (obj, key, value) => key in obj ? __defProp$8(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
var __spreadValues$8 = (a, b) => {
for (var prop in b || (b = {}))
if (__hasOwnProp$9.call(b, prop))
__defNormalProp$8(a, prop, b[prop]);
if (__getOwnPropSymbols$9)
for (var prop of __getOwnPropSymbols$9(b)) {
if (__propIsEnum$9.call(b, prop))
__defNormalProp$8(a, prop, b[prop]);
}
return a;
};
var __spreadProps$5 = (a, b) => __defProps$5(a, __getOwnPropDescs$5(b));
var __objRest$4 = (source, exclude) => {
var target = {};
for (var prop in source)
if (__hasOwnProp$9.call(source, prop) && exclude.indexOf(prop) < 0)
target[prop] = source[prop];
if (source != null && __getOwnPropSymbols$9)
for (var prop of __getOwnPropSymbols$9(source)) {
if (exclude.indexOf(prop) < 0 && __propIsEnum$9.call(source, prop))
target[prop] = source[prop];
}
return target;
};
function debouncedWatch(source, cb, options = {}) {
const _a = options, {
debounce = 0
} = _a, watchOptions = __objRest$4(_a, [
"debounce"
]);
return watchWithFilter(source, cb, __spreadProps$5(__spreadValues$8({}, watchOptions), {
eventFilter: debounceFilter(debounce)
}));
function useThrottleFn(fn, ms = 200, trailing = true, leading = true) {
return createFilterWrapper(throttleFilter(ms, trailing, leading), fn);
}
var __defProp$7 = Object.defineProperty;
var __defProps$4 = Object.defineProperties;
var __getOwnPropDescs$4 = Object.getOwnPropertyDescriptors;
var __getOwnPropSymbols$8 = Object.getOwnPropertySymbols;
var __hasOwnProp$8 = Object.prototype.hasOwnProperty;
var __propIsEnum$8 = Object.prototype.propertyIsEnumerable;
var __defNormalProp$7 = (obj, key, value) => key in obj ? __defProp$7(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
var __spreadValues$7 = (a, b) => {
for (var prop in b || (b = {}))
if (__hasOwnProp$8.call(b, prop))
__defNormalProp$7(a, prop, b[prop]);
if (__getOwnPropSymbols$8)
for (var prop of __getOwnPropSymbols$8(b)) {
if (__propIsEnum$8.call(b, prop))
__defNormalProp$7(a, prop, b[prop]);
}
return a;
};
var __spreadProps$4 = (a, b) => __defProps$4(a, __getOwnPropDescs$4(b));
function eagerComputed(fn, options) {
var _a;
const result = vueDemi.shallowRef();
vueDemi.watchEffect(() => {
result.value = fn();
}, __spreadProps$4(__spreadValues$7({}, options), {
flush: (_a = options == null ? void 0 : options.flush) != null ? _a : "sync"
}));
return vueDemi.readonly(result);
function refThrottled(value, delay = 200, trailing = true, leading = true) {
if (delay <= 0)
return value;
const throttled = vueDemi.ref(value.value);
const updater = useThrottleFn(() => {
throttled.value = value.value;
}, delay, trailing, leading);
vueDemi.watch(value, () => updater());
return throttled;
}
function get(obj, key) {
if (key == null)
return vueDemi.unref(obj);
return vueDemi.unref(obj)[key];
}
var __defProp$6 = Object.defineProperty;
var __defProps$3 = Object.defineProperties;
var __getOwnPropDescs$3 = Object.getOwnPropertyDescriptors;
var __getOwnPropSymbols$7 = Object.getOwnPropertySymbols;
var __hasOwnProp$7 = Object.prototype.hasOwnProperty;
var __propIsEnum$7 = Object.prototype.propertyIsEnumerable;
var __defNormalProp$6 = (obj, key, value) => key in obj ? __defProp$6(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
var __spreadValues$6 = (a, b) => {
for (var prop in b || (b = {}))
if (__hasOwnProp$7.call(b, prop))
__defNormalProp$6(a, prop, b[prop]);
if (__getOwnPropSymbols$7)
for (var prop of __getOwnPropSymbols$7(b)) {
if (__propIsEnum$7.call(b, prop))
__defNormalProp$6(a, prop, b[prop]);
}
return a;
};
var __spreadProps$3 = (a, b) => __defProps$3(a, __getOwnPropDescs$3(b));
var __objRest$3 = (source, exclude) => {
var target = {};
for (var prop in source)
if (__hasOwnProp$7.call(source, prop) && exclude.indexOf(prop) < 0)
target[prop] = source[prop];
if (source != null && __getOwnPropSymbols$7)
for (var prop of __getOwnPropSymbols$7(source)) {
if (exclude.indexOf(prop) < 0 && __propIsEnum$7.call(source, prop))
target[prop] = source[prop];
}
return target;
};
function ignorableWatch(source, cb, options = {}) {
const _a = options, {
eventFilter = bypassFilter
} = _a, watchOptions = __objRest$3(_a, [
"eventFilter"
]);
const filteredCb = createFilterWrapper(eventFilter, cb);
let ignoreUpdates;
let ignorePrevAsyncUpdates;
let stop;
if (watchOptions.flush === "sync") {
const ignore = vueDemi.ref(false);
ignorePrevAsyncUpdates = () => {
function refWithControl(initial, options = {}) {
let source = initial;
let track;
let trigger;
const ref = vueDemi.customRef((_track, _trigger) => {
track = _track;
trigger = _trigger;
return {
get() {
return get();
},
set(v) {
set(v);
}
};
ignoreUpdates = (updater) => {
ignore.value = true;
updater();
ignore.value = false;
};
stop = vueDemi.watch(source, (...args) => {
if (!ignore.value)
filteredCb(...args);
}, watchOptions);
} else {
const disposables = [];
const ignoreCounter = vueDemi.ref(0);
const syncCounter = vueDemi.ref(0);
ignorePrevAsyncUpdates = () => {
ignoreCounter.value = syncCounter.value;
};
disposables.push(vueDemi.watch(source, () => {
syncCounter.value++;
}, __spreadProps$3(__spreadValues$6({}, watchOptions), { flush: "sync" })));
ignoreUpdates = (updater) => {
const syncCounterPrev = syncCounter.value;
updater();
ignoreCounter.value += syncCounter.value - syncCounterPrev;
};
disposables.push(vueDemi.watch(source, (...args) => {
const ignore = ignoreCounter.value > 0 && ignoreCounter.value === syncCounter.value;
ignoreCounter.value = 0;
syncCounter.value = 0;
if (ignore)
return;
filteredCb(...args);
}, watchOptions));
stop = () => {
disposables.forEach((fn) => fn());
};
});
function get(tracking = true) {
if (tracking)
track();
return source;
}
return { stop, ignoreUpdates, ignorePrevAsyncUpdates };
}
function isDefined(v) {
return vueDemi.unref(v) != null;
}
var __defProp$5 = Object.defineProperty;
var __getOwnPropSymbols$6 = Object.getOwnPropertySymbols;
var __hasOwnProp$6 = Object.prototype.hasOwnProperty;
var __propIsEnum$6 = Object.prototype.propertyIsEnumerable;
var __defNormalProp$5 = (obj, key, value) => key in obj ? __defProp$5(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
var __spreadValues$5 = (a, b) => {
for (var prop in b || (b = {}))
if (__hasOwnProp$6.call(b, prop))
__defNormalProp$5(a, prop, b[prop]);
if (__getOwnPropSymbols$6)
for (var prop of __getOwnPropSymbols$6(b)) {
if (__propIsEnum$6.call(b, prop))
__defNormalProp$5(a, prop, b[prop]);
}
return a;
};
function makeDestructurable(obj, arr) {
if (typeof Symbol !== "undefined") {
const clone = __spreadValues$5({}, obj);
Object.defineProperty(clone, Symbol.iterator, {
enumerable: false,
value() {
let index = 0;
return {
next: () => ({
value: arr[index++],
done: index > arr.length
})
};
}
});
return clone;
} else {
return Object.assign([...arr], obj);
function set(value, triggering = true) {
var _a, _b;
if (value === source)
return;
const old = source;
if (((_a = options.onBeforeChange) == null ? void 0 : _a.call(options, value, old)) === false)
return;
source = value;
(_b = options.onChanged) == null ? void 0 : _b.call(options, value, old);
if (triggering)
trigger();
}
const untrackedGet = () => get(false);
const silentSet = (v) => set(v, false);
const peek = () => get(false);
const lay = (v) => set(v, false);
return extendRef(ref, {
get,
set,
untrackedGet,
silentSet,
peek,
lay
}, { enumerable: true });
}
const controlledRef = refWithControl;
function not(v) {
return vueDemi.computed(() => !vueDemi.unref(v));
}
function or(...args) {
return vueDemi.computed(() => args.some((i) => vueDemi.unref(i)));
}
var __defProp$4 = Object.defineProperty;
var __defProps$2 = Object.defineProperties;
var __getOwnPropDescs$2 = Object.getOwnPropertyDescriptors;
var __getOwnPropSymbols$5 = Object.getOwnPropertySymbols;
var __hasOwnProp$5 = Object.prototype.hasOwnProperty;
var __propIsEnum$5 = Object.prototype.propertyIsEnumerable;
var __defNormalProp$4 = (obj, key, value) => key in obj ? __defProp$4(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
var __spreadValues$4 = (a, b) => {
for (var prop in b || (b = {}))
if (__hasOwnProp$5.call(b, prop))
__defNormalProp$4(a, prop, b[prop]);
if (__getOwnPropSymbols$5)
for (var prop of __getOwnPropSymbols$5(b)) {
if (__propIsEnum$5.call(b, prop))
__defNormalProp$4(a, prop, b[prop]);
}
return a;
};
var __spreadProps$2 = (a, b) => __defProps$2(a, __getOwnPropDescs$2(b));
var __objRest$2 = (source, exclude) => {
var target = {};
for (var prop in source)
if (__hasOwnProp$5.call(source, prop) && exclude.indexOf(prop) < 0)
target[prop] = source[prop];
if (source != null && __getOwnPropSymbols$5)
for (var prop of __getOwnPropSymbols$5(source)) {
if (exclude.indexOf(prop) < 0 && __propIsEnum$5.call(source, prop))
target[prop] = source[prop];
}
return target;
};
function pausableWatch(source, cb, options = {}) {
const _a = options, {
eventFilter: filter
} = _a, watchOptions = __objRest$2(_a, [
"eventFilter"
]);
const { eventFilter, pause, resume, isActive } = pausableFilter(filter);
const stop = watchWithFilter(source, cb, __spreadProps$2(__spreadValues$4({}, watchOptions), {
eventFilter
}));
return { stop, pause, resume, isActive };
}
function reactifyObject(obj, optionsOrKeys = {}) {
let keys = [];
if (Array.isArray(optionsOrKeys)) {
keys = optionsOrKeys;
} else {
const { includeOwnProperties = true } = optionsOrKeys;
keys.push(...Object.keys(obj));
if (includeOwnProperties)
keys.push(...Object.getOwnPropertyNames(obj));
}
return Object.fromEntries(keys.map((key) => {
const value = obj[key];
return [
key,
typeof value === "function" ? reactify(value.bind(obj)) : value
];
}));
}
function toReactive(objectRef) {
if (!vueDemi.isRef(objectRef))
return vueDemi.reactive(objectRef);
const proxy = new Proxy({}, {
get(_, p, receiver) {
return vueDemi.unref(Reflect.get(objectRef.value, p, receiver));
},
set(_, p, value) {
if (vueDemi.isRef(objectRef.value[p]) && !vueDemi.isRef(value))
objectRef.value[p].value = value;
else
objectRef.value[p] = value;
return true;
},
deleteProperty(_, p) {
return Reflect.deleteProperty(objectRef.value, p);
},
has(_, p) {
return Reflect.has(objectRef.value, p);
},
ownKeys() {
return Object.keys(objectRef.value);
},
getOwnPropertyDescriptor() {
return {
enumerable: true,
configurable: true
};
}
});
return vueDemi.reactive(proxy);
}
function reactiveComputed(fn) {
return toReactive(vueDemi.computed(fn));
}
function reactiveOmit(obj, ...keys) {
return reactiveComputed(() => Object.fromEntries(Object.entries(vueDemi.toRefs(obj)).filter((e) => !keys.includes(e[0]))));
}
function reactivePick(obj, ...keys) {
return vueDemi.reactive(Object.fromEntries(keys.map((k) => [k, vueDemi.toRef(obj, k)])));
}
function refDefault(source, defaultValue) {
return vueDemi.computed({
get() {
var _a;
return (_a = source.value) != null ? _a : defaultValue;
},
set(value) {
source.value = value;
}
});
}
function set(...args) {

@@ -827,7 +652,28 @@ if (args.length === 2) {

function syncRef(source, targets, {
flush = "sync",
deep = false,
immediate = true
} = {}) {
function syncRef(left, right, options = {}) {
const {
flush = "sync",
deep = false,
immediate = true,
direction = "both"
} = options;
let stop1, stop2;
if (direction === "both" || direction === "ltr") {
stop1 = vueDemi.watch(left, (newValue) => right.value = newValue, { flush, deep, immediate });
}
if (direction === "both" || direction === "rtl") {
stop2 = vueDemi.watch(right, (newValue) => left.value = newValue, { flush, deep, immediate });
}
return () => {
stop1 == null ? void 0 : stop1();
stop2 == null ? void 0 : stop2();
};
}
function syncRefs(source, targets, options = {}) {
const {
flush = "sync",
deep = false,
immediate = true
} = options;
if (!Array.isArray(targets))

@@ -838,82 +684,21 @@ targets = [targets];

function useThrottleFn(fn, ms = 200, trailing = true, leading = true) {
return createFilterWrapper(throttleFilter(ms, trailing, leading), fn);
}
function useThrottle(value, delay = 200, trailing = true, leading = true) {
if (delay <= 0)
return value;
const throttled = vueDemi.ref(value.value);
const updater = useThrottleFn(() => {
throttled.value = value.value;
}, delay, trailing, leading);
vueDemi.watch(value, () => updater());
return throttled;
}
var __defProp$3 = Object.defineProperty;
var __defProps$1 = Object.defineProperties;
var __getOwnPropDescs$1 = Object.getOwnPropertyDescriptors;
var __getOwnPropSymbols$4 = Object.getOwnPropertySymbols;
var __hasOwnProp$4 = Object.prototype.hasOwnProperty;
var __propIsEnum$4 = Object.prototype.propertyIsEnumerable;
var __defNormalProp$3 = (obj, key, value) => key in obj ? __defProp$3(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
var __spreadValues$3 = (a, b) => {
var __defProp$6 = Object.defineProperty;
var __defProps$4 = Object.defineProperties;
var __getOwnPropDescs$4 = Object.getOwnPropertyDescriptors;
var __getOwnPropSymbols$8 = Object.getOwnPropertySymbols;
var __hasOwnProp$8 = Object.prototype.hasOwnProperty;
var __propIsEnum$8 = Object.prototype.propertyIsEnumerable;
var __defNormalProp$6 = (obj, key, value) => key in obj ? __defProp$6(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
var __spreadValues$6 = (a, b) => {
for (var prop in b || (b = {}))
if (__hasOwnProp$4.call(b, prop))
__defNormalProp$3(a, prop, b[prop]);
if (__getOwnPropSymbols$4)
for (var prop of __getOwnPropSymbols$4(b)) {
if (__propIsEnum$4.call(b, prop))
__defNormalProp$3(a, prop, b[prop]);
if (__hasOwnProp$8.call(b, prop))
__defNormalProp$6(a, prop, b[prop]);
if (__getOwnPropSymbols$8)
for (var prop of __getOwnPropSymbols$8(b)) {
if (__propIsEnum$8.call(b, prop))
__defNormalProp$6(a, prop, b[prop]);
}
return a;
};
var __spreadProps$1 = (a, b) => __defProps$1(a, __getOwnPropDescs$1(b));
var __objRest$1 = (source, exclude) => {
var target = {};
for (var prop in source)
if (__hasOwnProp$4.call(source, prop) && exclude.indexOf(prop) < 0)
target[prop] = source[prop];
if (source != null && __getOwnPropSymbols$4)
for (var prop of __getOwnPropSymbols$4(source)) {
if (exclude.indexOf(prop) < 0 && __propIsEnum$4.call(source, prop))
target[prop] = source[prop];
}
return target;
};
function throttledWatch(source, cb, options = {}) {
const _a = options, {
throttle = 0,
trailing = true,
leading = true
} = _a, watchOptions = __objRest$1(_a, [
"throttle",
"trailing",
"leading"
]);
return watchWithFilter(source, cb, __spreadProps$1(__spreadValues$3({}, watchOptions), {
eventFilter: throttleFilter(throttle, trailing, leading)
}));
}
var __defProp$2 = Object.defineProperty;
var __defProps = Object.defineProperties;
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
var __getOwnPropSymbols$3 = Object.getOwnPropertySymbols;
var __hasOwnProp$3 = Object.prototype.hasOwnProperty;
var __propIsEnum$3 = Object.prototype.propertyIsEnumerable;
var __defNormalProp$2 = (obj, key, value) => key in obj ? __defProp$2(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
var __spreadValues$2 = (a, b) => {
for (var prop in b || (b = {}))
if (__hasOwnProp$3.call(b, prop))
__defNormalProp$2(a, prop, b[prop]);
if (__getOwnPropSymbols$3)
for (var prop of __getOwnPropSymbols$3(b)) {
if (__propIsEnum$3.call(b, prop))
__defNormalProp$2(a, prop, b[prop]);
}
return a;
};
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
var __spreadProps$4 = (a, b) => __defProps$4(a, __getOwnPropDescs$4(b));
function toRefs(objectRef) {

@@ -934,3 +719,3 @@ if (!vueDemi.isRef(objectRef))

} else {
objectRef.value = __spreadProps(__spreadValues$2({}, objectRef.value), { [key]: v });
objectRef.value = __spreadProps$4(__spreadValues$6({}, objectRef.value), { [key]: v });
}

@@ -1065,2 +850,52 @@ }

const REGEX_PARSE = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/;
const REGEX_FORMAT = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g;
const formatDate = (date, formatStr) => {
const years = date.getFullYear();
const month = date.getMonth();
const days = date.getDate();
const hours = date.getHours();
const minutes = date.getMinutes();
const seconds = date.getSeconds();
const milliseconds = date.getMilliseconds();
const matches = {
YY: String(years).slice(-2),
YYYY: years,
M: month + 1,
MM: `${month + 1}`.padStart(2, "0"),
D: String(days),
DD: `${days}`.padStart(2, "0"),
H: String(hours),
HH: `${hours}`.padStart(2, "0"),
h: `${hours % 12 || 12}`.padStart(1, "0"),
hh: `${hours % 12 || 12}`.padStart(2, "0"),
m: String(minutes),
mm: `${minutes}`.padStart(2, "0"),
s: String(seconds),
ss: `${seconds}`.padStart(2, "0"),
SSS: `${milliseconds}`.padStart(3, "0")
};
return formatStr.replace(REGEX_FORMAT, (match, $1) => $1 || matches[match]);
};
const normalizeDate = (date) => {
if (date === null)
return new Date(NaN);
if (date === void 0)
return new Date();
if (date instanceof Date)
return new Date(date);
if (typeof date === "string" && !/Z$/i.test(date)) {
const d = date.match(REGEX_PARSE);
if (d) {
const m = d[2] - 1 || 0;
const ms = (d[7] || "0").substring(0, 3);
return new Date(d[1], m, d[3] || 1, d[4] || 0, d[5] || 0, d[6] || 0, ms);
}
}
return new Date(date);
};
function useDateFormat(date, formatStr = "HH:mm:ss") {
return vueDemi.computed(() => formatDate(normalizeDate(vueDemi.unref(date)), vueDemi.unref(formatStr)));
}
function useIntervalFn(cb, interval = 1e3, options = {}) {

@@ -1109,15 +944,15 @@ const {

var __defProp$1 = Object.defineProperty;
var __getOwnPropSymbols$2 = Object.getOwnPropertySymbols;
var __hasOwnProp$2 = Object.prototype.hasOwnProperty;
var __propIsEnum$2 = Object.prototype.propertyIsEnumerable;
var __defNormalProp$1 = (obj, key, value) => key in obj ? __defProp$1(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
var __spreadValues$1 = (a, b) => {
var __defProp$5 = Object.defineProperty;
var __getOwnPropSymbols$7 = Object.getOwnPropertySymbols;
var __hasOwnProp$7 = Object.prototype.hasOwnProperty;
var __propIsEnum$7 = Object.prototype.propertyIsEnumerable;
var __defNormalProp$5 = (obj, key, value) => key in obj ? __defProp$5(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
var __spreadValues$5 = (a, b) => {
for (var prop in b || (b = {}))
if (__hasOwnProp$2.call(b, prop))
__defNormalProp$1(a, prop, b[prop]);
if (__getOwnPropSymbols$2)
for (var prop of __getOwnPropSymbols$2(b)) {
if (__propIsEnum$2.call(b, prop))
__defNormalProp$1(a, prop, b[prop]);
if (__hasOwnProp$7.call(b, prop))
__defNormalProp$5(a, prop, b[prop]);
if (__getOwnPropSymbols$7)
for (var prop of __getOwnPropSymbols$7(b)) {
if (__propIsEnum$7.call(b, prop))
__defNormalProp$5(a, prop, b[prop]);
}

@@ -1134,3 +969,3 @@ return a;

if (exposeControls) {
return __spreadValues$1({
return __spreadValues$5({
counter

@@ -1188,15 +1023,15 @@ }, controls);

var __defProp = Object.defineProperty;
var __getOwnPropSymbols$1 = Object.getOwnPropertySymbols;
var __hasOwnProp$1 = Object.prototype.hasOwnProperty;
var __propIsEnum$1 = Object.prototype.propertyIsEnumerable;
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
var __spreadValues = (a, b) => {
var __defProp$4 = Object.defineProperty;
var __getOwnPropSymbols$6 = Object.getOwnPropertySymbols;
var __hasOwnProp$6 = Object.prototype.hasOwnProperty;
var __propIsEnum$6 = Object.prototype.propertyIsEnumerable;
var __defNormalProp$4 = (obj, key, value) => key in obj ? __defProp$4(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
var __spreadValues$4 = (a, b) => {
for (var prop in b || (b = {}))
if (__hasOwnProp$1.call(b, prop))
__defNormalProp(a, prop, b[prop]);
if (__getOwnPropSymbols$1)
for (var prop of __getOwnPropSymbols$1(b)) {
if (__propIsEnum$1.call(b, prop))
__defNormalProp(a, prop, b[prop]);
if (__hasOwnProp$6.call(b, prop))
__defNormalProp$4(a, prop, b[prop]);
if (__getOwnPropSymbols$6)
for (var prop of __getOwnPropSymbols$6(b)) {
if (__propIsEnum$6.call(b, prop))
__defNormalProp$4(a, prop, b[prop]);
}

@@ -1212,3 +1047,3 @@ return a;

if (exposeControls) {
return __spreadValues({
return __spreadValues$4({
ready

@@ -1237,13 +1072,13 @@ }, controls);

var __getOwnPropSymbols = Object.getOwnPropertySymbols;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __propIsEnum = Object.prototype.propertyIsEnumerable;
var __objRest = (source, exclude) => {
var __getOwnPropSymbols$5 = Object.getOwnPropertySymbols;
var __hasOwnProp$5 = Object.prototype.hasOwnProperty;
var __propIsEnum$5 = Object.prototype.propertyIsEnumerable;
var __objRest$5 = (source, exclude) => {
var target = {};
for (var prop in source)
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
if (__hasOwnProp$5.call(source, prop) && exclude.indexOf(prop) < 0)
target[prop] = source[prop];
if (source != null && __getOwnPropSymbols)
for (var prop of __getOwnPropSymbols(source)) {
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
if (source != null && __getOwnPropSymbols$5)
for (var prop of __getOwnPropSymbols$5(source)) {
if (exclude.indexOf(prop) < 0 && __propIsEnum$5.call(source, prop))
target[prop] = source[prop];

@@ -1253,6 +1088,30 @@ }

};
function watchWithFilter(source, cb, options = {}) {
const _a = options, {
eventFilter = bypassFilter
} = _a, watchOptions = __objRest$5(_a, [
"eventFilter"
]);
return vueDemi.watch(source, createFilterWrapper(eventFilter, cb), watchOptions);
}
var __getOwnPropSymbols$4 = Object.getOwnPropertySymbols;
var __hasOwnProp$4 = Object.prototype.hasOwnProperty;
var __propIsEnum$4 = Object.prototype.propertyIsEnumerable;
var __objRest$4 = (source, exclude) => {
var target = {};
for (var prop in source)
if (__hasOwnProp$4.call(source, prop) && exclude.indexOf(prop) < 0)
target[prop] = source[prop];
if (source != null && __getOwnPropSymbols$4)
for (var prop of __getOwnPropSymbols$4(source)) {
if (exclude.indexOf(prop) < 0 && __propIsEnum$4.call(source, prop))
target[prop] = source[prop];
}
return target;
};
function watchAtMost(source, cb, options) {
const _a = options, {
count
} = _a, watchOptions = __objRest(_a, [
} = _a, watchOptions = __objRest$4(_a, [
"count"

@@ -1270,2 +1129,128 @@ ]);

var __defProp$3 = Object.defineProperty;
var __defProps$3 = Object.defineProperties;
var __getOwnPropDescs$3 = Object.getOwnPropertyDescriptors;
var __getOwnPropSymbols$3 = Object.getOwnPropertySymbols;
var __hasOwnProp$3 = Object.prototype.hasOwnProperty;
var __propIsEnum$3 = Object.prototype.propertyIsEnumerable;
var __defNormalProp$3 = (obj, key, value) => key in obj ? __defProp$3(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
var __spreadValues$3 = (a, b) => {
for (var prop in b || (b = {}))
if (__hasOwnProp$3.call(b, prop))
__defNormalProp$3(a, prop, b[prop]);
if (__getOwnPropSymbols$3)
for (var prop of __getOwnPropSymbols$3(b)) {
if (__propIsEnum$3.call(b, prop))
__defNormalProp$3(a, prop, b[prop]);
}
return a;
};
var __spreadProps$3 = (a, b) => __defProps$3(a, __getOwnPropDescs$3(b));
var __objRest$3 = (source, exclude) => {
var target = {};
for (var prop in source)
if (__hasOwnProp$3.call(source, prop) && exclude.indexOf(prop) < 0)
target[prop] = source[prop];
if (source != null && __getOwnPropSymbols$3)
for (var prop of __getOwnPropSymbols$3(source)) {
if (exclude.indexOf(prop) < 0 && __propIsEnum$3.call(source, prop))
target[prop] = source[prop];
}
return target;
};
function watchDebounced(source, cb, options = {}) {
const _a = options, {
debounce = 0
} = _a, watchOptions = __objRest$3(_a, [
"debounce"
]);
return watchWithFilter(source, cb, __spreadProps$3(__spreadValues$3({}, watchOptions), {
eventFilter: debounceFilter(debounce)
}));
}
var __defProp$2 = Object.defineProperty;
var __defProps$2 = Object.defineProperties;
var __getOwnPropDescs$2 = Object.getOwnPropertyDescriptors;
var __getOwnPropSymbols$2 = Object.getOwnPropertySymbols;
var __hasOwnProp$2 = Object.prototype.hasOwnProperty;
var __propIsEnum$2 = Object.prototype.propertyIsEnumerable;
var __defNormalProp$2 = (obj, key, value) => key in obj ? __defProp$2(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
var __spreadValues$2 = (a, b) => {
for (var prop in b || (b = {}))
if (__hasOwnProp$2.call(b, prop))
__defNormalProp$2(a, prop, b[prop]);
if (__getOwnPropSymbols$2)
for (var prop of __getOwnPropSymbols$2(b)) {
if (__propIsEnum$2.call(b, prop))
__defNormalProp$2(a, prop, b[prop]);
}
return a;
};
var __spreadProps$2 = (a, b) => __defProps$2(a, __getOwnPropDescs$2(b));
var __objRest$2 = (source, exclude) => {
var target = {};
for (var prop in source)
if (__hasOwnProp$2.call(source, prop) && exclude.indexOf(prop) < 0)
target[prop] = source[prop];
if (source != null && __getOwnPropSymbols$2)
for (var prop of __getOwnPropSymbols$2(source)) {
if (exclude.indexOf(prop) < 0 && __propIsEnum$2.call(source, prop))
target[prop] = source[prop];
}
return target;
};
function watchIgnorable(source, cb, options = {}) {
const _a = options, {
eventFilter = bypassFilter
} = _a, watchOptions = __objRest$2(_a, [
"eventFilter"
]);
const filteredCb = createFilterWrapper(eventFilter, cb);
let ignoreUpdates;
let ignorePrevAsyncUpdates;
let stop;
if (watchOptions.flush === "sync") {
const ignore = vueDemi.ref(false);
ignorePrevAsyncUpdates = () => {
};
ignoreUpdates = (updater) => {
ignore.value = true;
updater();
ignore.value = false;
};
stop = vueDemi.watch(source, (...args) => {
if (!ignore.value)
filteredCb(...args);
}, watchOptions);
} else {
const disposables = [];
const ignoreCounter = vueDemi.ref(0);
const syncCounter = vueDemi.ref(0);
ignorePrevAsyncUpdates = () => {
ignoreCounter.value = syncCounter.value;
};
disposables.push(vueDemi.watch(source, () => {
syncCounter.value++;
}, __spreadProps$2(__spreadValues$2({}, watchOptions), { flush: "sync" })));
ignoreUpdates = (updater) => {
const syncCounterPrev = syncCounter.value;
updater();
ignoreCounter.value += syncCounter.value - syncCounterPrev;
};
disposables.push(vueDemi.watch(source, (...args) => {
const ignore = ignoreCounter.value > 0 && ignoreCounter.value === syncCounter.value;
ignoreCounter.value = 0;
syncCounter.value = 0;
if (ignore)
return;
filteredCb(...args);
}, watchOptions));
stop = () => {
disposables.forEach((fn) => fn());
};
}
return { stop, ignoreUpdates, ignorePrevAsyncUpdates };
}
function watchOnce(source, cb, options) {

@@ -1278,2 +1263,92 @@ const stop = vueDemi.watch(source, (...args) => {

var __defProp$1 = Object.defineProperty;
var __defProps$1 = Object.defineProperties;
var __getOwnPropDescs$1 = Object.getOwnPropertyDescriptors;
var __getOwnPropSymbols$1 = Object.getOwnPropertySymbols;
var __hasOwnProp$1 = Object.prototype.hasOwnProperty;
var __propIsEnum$1 = Object.prototype.propertyIsEnumerable;
var __defNormalProp$1 = (obj, key, value) => key in obj ? __defProp$1(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
var __spreadValues$1 = (a, b) => {
for (var prop in b || (b = {}))
if (__hasOwnProp$1.call(b, prop))
__defNormalProp$1(a, prop, b[prop]);
if (__getOwnPropSymbols$1)
for (var prop of __getOwnPropSymbols$1(b)) {
if (__propIsEnum$1.call(b, prop))
__defNormalProp$1(a, prop, b[prop]);
}
return a;
};
var __spreadProps$1 = (a, b) => __defProps$1(a, __getOwnPropDescs$1(b));
var __objRest$1 = (source, exclude) => {
var target = {};
for (var prop in source)
if (__hasOwnProp$1.call(source, prop) && exclude.indexOf(prop) < 0)
target[prop] = source[prop];
if (source != null && __getOwnPropSymbols$1)
for (var prop of __getOwnPropSymbols$1(source)) {
if (exclude.indexOf(prop) < 0 && __propIsEnum$1.call(source, prop))
target[prop] = source[prop];
}
return target;
};
function watchPausable(source, cb, options = {}) {
const _a = options, {
eventFilter: filter
} = _a, watchOptions = __objRest$1(_a, [
"eventFilter"
]);
const { eventFilter, pause, resume, isActive } = pausableFilter(filter);
const stop = watchWithFilter(source, cb, __spreadProps$1(__spreadValues$1({}, watchOptions), {
eventFilter
}));
return { stop, pause, resume, isActive };
}
var __defProp = Object.defineProperty;
var __defProps = Object.defineProperties;
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __propIsEnum = Object.prototype.propertyIsEnumerable;
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
var __spreadValues = (a, b) => {
for (var prop in b || (b = {}))
if (__hasOwnProp.call(b, prop))
__defNormalProp(a, prop, b[prop]);
if (__getOwnPropSymbols)
for (var prop of __getOwnPropSymbols(b)) {
if (__propIsEnum.call(b, prop))
__defNormalProp(a, prop, b[prop]);
}
return a;
};
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
var __objRest = (source, exclude) => {
var target = {};
for (var prop in source)
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
target[prop] = source[prop];
if (source != null && __getOwnPropSymbols)
for (var prop of __getOwnPropSymbols(source)) {
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
target[prop] = source[prop];
}
return target;
};
function watchThrottled(source, cb, options = {}) {
const _a = options, {
throttle = 0,
trailing = true,
leading = true
} = _a, watchOptions = __objRest(_a, [
"throttle",
"trailing",
"leading"
]);
return watchWithFilter(source, cb, __spreadProps(__spreadValues({}, watchOptions), {
eventFilter: throttleFilter(throttle, trailing, leading)
}));
}
function whenever(source, cb, options) {

@@ -1286,9 +1361,11 @@ return vueDemi.watch(source, (v, ov, onInvalidate) => {

exports.and = and;
exports.and = logicAnd;
exports.assert = assert;
exports.biSyncRef = biSyncRef;
exports.autoResetRef = refAutoReset;
exports.bypassFilter = bypassFilter;
exports.clamp = clamp;
exports.computedEager = computedEager;
exports.computedWithControl = computedWithControl;
exports.containsProp = containsProp;
exports.controlledComputed = controlledComputed;
exports.controlledComputed = computedWithControl;
exports.controlledRef = controlledRef;

@@ -1302,9 +1379,10 @@ exports.createEventHook = createEventHook;

exports.debounceFilter = debounceFilter;
exports.debouncedRef = useDebounce;
exports.debouncedWatch = debouncedWatch;
exports.eagerComputed = eagerComputed;
exports.debouncedRef = refDebounced;
exports.debouncedWatch = watchDebounced;
exports.eagerComputed = computedEager;
exports.extendRef = extendRef;
exports.formatDate = formatDate;
exports.get = get;
exports.identity = identity;
exports.ignorableWatch = ignorableWatch;
exports.ignorableWatch = watchIgnorable;
exports.increaseWithUnit = increaseWithUnit;

@@ -1321,10 +1399,14 @@ exports.invoke = invoke;

exports.isWindow = isWindow;
exports.logicAnd = logicAnd;
exports.logicNot = logicNot;
exports.logicOr = logicOr;
exports.makeDestructurable = makeDestructurable;
exports.noop = noop;
exports.not = not;
exports.normalizeDate = normalizeDate;
exports.not = logicNot;
exports.now = now;
exports.objectPick = objectPick;
exports.or = or;
exports.or = logicOr;
exports.pausableFilter = pausableFilter;
exports.pausableWatch = pausableWatch;
exports.pausableWatch = watchPausable;
exports.promiseTimeout = promiseTimeout;

@@ -1337,8 +1419,13 @@ exports.rand = rand;

exports.reactivePick = reactivePick;
exports.refAutoReset = refAutoReset;
exports.refDebounced = refDebounced;
exports.refDefault = refDefault;
exports.refThrottled = refThrottled;
exports.refWithControl = refWithControl;
exports.set = set;
exports.syncRef = syncRef;
exports.syncRefs = syncRefs;
exports.throttleFilter = throttleFilter;
exports.throttledRef = useThrottle;
exports.throttledWatch = throttledWatch;
exports.throttledRef = refThrottled;
exports.throttledWatch = watchThrottled;
exports.timestamp = timestamp;

@@ -1353,3 +1440,4 @@ exports.toReactive = toReactive;

exports.useCounter = useCounter;
exports.useDebounce = useDebounce;
exports.useDateFormat = useDateFormat;
exports.useDebounce = refDebounced;
exports.useDebounceFn = useDebounceFn;

@@ -1359,3 +1447,3 @@ exports.useInterval = useInterval;

exports.useLastChanged = useLastChanged;
exports.useThrottle = useThrottle;
exports.useThrottle = refThrottled;
exports.useThrottleFn = useThrottleFn;

@@ -1366,3 +1454,7 @@ exports.useTimeout = useTimeout;

exports.watchAtMost = watchAtMost;
exports.watchDebounced = watchDebounced;
exports.watchIgnorable = watchIgnorable;
exports.watchOnce = watchOnce;
exports.watchPausable = watchPausable;
exports.watchThrottled = watchThrottled;
exports.watchWithFilter = watchWithFilter;

@@ -1369,0 +1461,0 @@ exports.whenever = whenever;

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

(function(i){if(!i.VueDemi){var o={},O=i.Vue;if(O)if(O.version.slice(0,2)==="2."){var m=i.VueCompositionAPI;if(m){for(var g in m)o[g]=m[g];o.isVue2=!0,o.isVue3=!1,o.install=function(){},o.Vue=O,o.Vue2=O,o.version=O.version}else console.error("[vue-demi] no VueCompositionAPI instance found, please be sure to import `@vue/composition-api` before `vue-demi`.")}else if(O.version.slice(0,2)==="3."){for(var g in O)o[g]=O[g];o.isVue2=!1,o.isVue3=!0,o.install=function(){},o.Vue=O,o.Vue2=void 0,o.version=O.version,o.set=function(h,P,b){return Array.isArray(h)?(h.length=Math.max(h.length,P),h.splice(P,1,b),b):(h[P]=b,b)},o.del=function(h,P){if(Array.isArray(h)){h.splice(P,1);return}delete h[P]}}else console.error("[vue-demi] Vue version "+O.version+" is unsupported.");else console.error("[vue-demi] no Vue instance found, please be sure to import `vue` before `vue-demi`.");i.VueDemi=o}})(window),function(i,o){"use strict";function O(...e){return o.computed(()=>e.every(t=>o.unref(t)))}function m(e,t){const r="sync",n=o.watch(e,u=>{t.value=u},{flush:r,immediate:!0}),a=o.watch(t,u=>{e.value=u},{flush:r,immediate:!0});return()=>{n(),a()}}function g(e,t){let r,n,a;const u=o.ref(!0);return o.watch(e,()=>{u.value=!0,a()},{flush:"sync"}),o.customRef((l,c)=>(n=l,a=c,{get(){return u.value&&(r=t(),u.value=!1),n(),r},set(){}}))}function h(e="this function"){if(!o.isVue3)throw new Error(`[VueUse] ${e} is only works on Vue 3.`)}function P(e,t,{enumerable:r=!1,unwrap:n=!0}={}){h();for(const[a,u]of Object.entries(t))a!=="value"&&(o.isRef(u)&&n?Object.defineProperty(e,a,{get(){return u.value},set(l){u.value=l},enumerable:r}):Object.defineProperty(e,a,{value:u,enumerable:r}));return e}function b(e,t={}){let r=e,n,a;const u=o.customRef((s,v)=>(n=s,a=v,{get(){return l()},set(y){c(y)}}));function l(s=!0){return s&&n(),r}function c(s,v=!0){var y,A;if(s===r)return;const w=r;((y=t.onBeforeChange)==null?void 0:y.call(t,s,w))!==!1&&(r=s,(A=t.onChanged)==null||A.call(t,s,w),v&&a())}return P(u,{get:l,set:c,untrackedGet:()=>l(!1),silentSet:s=>c(s,!1),peek:()=>l(!1),lay:s=>c(s,!1)},{enumerable:!0})}function ge(){const e=[],t=a=>{const u=e.indexOf(a);u!==-1&&e.splice(u,1)};return{on:a=>(e.push(a),{off:()=>t(a)}),off:t,trigger:a=>{e.forEach(u=>u(a))}}}function be(e){let t=!1,r;const n=o.effectScope(!0);return()=>(t||(r=n.run(e),t=!0),r)}function N(e){return function(...t){return o.computed(()=>e.apply(this,t.map(r=>o.unref(r))))}}function $(e){return o.getCurrentScope()?(o.onScopeDispose(e),!0):!1}function me(e){let t=0,r,n;const a=()=>{t-=1,n&&t<=0&&(n.stop(),r=void 0,n=void 0)};return(...u)=>(t+=1,r||(n=o.effectScope(!0),r=n.run(()=>e(...u))),$(a),r)}const F=typeof window!="undefined",$e=e=>typeof e!="undefined",Se=(e,...t)=>{e||console.warn(...t)},M=Object.prototype.toString,je=e=>typeof e=="boolean",Fe=e=>typeof e=="function",Ee=e=>typeof e=="number",Ie=e=>typeof e=="string",Te=e=>M.call(e)==="[object Object]",Ce=e=>typeof window!="undefined"&&M.call(e)==="[object Window]",Ve=()=>Date.now(),U=()=>+Date.now(),Ae=(e,t,r)=>Math.min(r,Math.max(t,e)),B=()=>{},Ne=(e,t)=>(e=Math.ceil(e),t=Math.floor(t),Math.floor(Math.random()*(t-e+1))+e);function S(e,t){function r(...n){e(()=>t.apply(this,n),{fn:t,thisArg:this,args:n})}return r}const E=e=>e();function R(e,t={}){let r,n;return u=>{const l=o.unref(e),c=o.unref(t.maxWait);if(r&&clearTimeout(r),l<=0||c!==void 0&&c<=0)return n&&(clearTimeout(n),n=null),u();c&&!n&&(n=setTimeout(()=>{r&&clearTimeout(r),n=null,u()},c)),r=setTimeout(()=>{n&&clearTimeout(n),n=null,u()},l)}}function W(e,t=!0,r=!0){let n=0,a,u=!r;const l=()=>{a&&(clearTimeout(a),a=void 0)};return d=>{const _=o.unref(e),p=Date.now()-n;if(l(),_<=0)return n=Date.now(),d();p>_&&(n=Date.now(),u?u=!1:d()),t&&(a=setTimeout(()=>{n=Date.now(),r||(u=!0),l(),d()},_)),!r&&!a&&(a=setTimeout(()=>u=!0,_))}}function G(e=E){const t=o.ref(!0);function r(){t.value=!1}function n(){t.value=!0}return{isActive:t,pause:r,resume:n,eventFilter:(...u)=>{t.value&&e(...u)}}}function L(e,t=!1,r="Timeout"){return new Promise((n,a)=>{setTimeout(t?()=>a(r):n,e)})}function Re(e){return e}function We(e){let t;function r(){return t||(t=e()),t}return r.reset=async()=>{const n=t;t=void 0,n&&await n},r}function Me(e){return e()}function Ue(e,...t){return t.some(r=>r in e)}function Be(e,t){var r;if(typeof e=="number")return e+t;const n=((r=e.match(/^-?[0-9]+\.?[0-9]*/))==null?void 0:r[0])||"",a=e.slice(n.length),u=parseFloat(n)+t;return Number.isNaN(u)?e:u+a}function Ge(e,t,r=!1){return t.reduce((n,a)=>(a in e&&(!r||!e[a]===void 0)&&(n[a]=e[a]),n),{})}function H(e,t=200,r={}){return S(R(t,r),e)}function z(e,t=200,r={}){if(t<=0)return e;const n=o.ref(e.value),a=H(()=>{n.value=e.value},t,r);return o.watch(e,()=>a()),n}var q=Object.getOwnPropertySymbols,Le=Object.prototype.hasOwnProperty,He=Object.prototype.propertyIsEnumerable,ze=(e,t)=>{var r={};for(var n in e)Le.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&q)for(var n of q(e))t.indexOf(n)<0&&He.call(e,n)&&(r[n]=e[n]);return r};function j(e,t,r={}){const n=r,{eventFilter:a=E}=n,u=ze(n,["eventFilter"]);return o.watch(e,S(a,t),u)}var qe=Object.defineProperty,Je=Object.defineProperties,Qe=Object.getOwnPropertyDescriptors,I=Object.getOwnPropertySymbols,J=Object.prototype.hasOwnProperty,Q=Object.prototype.propertyIsEnumerable,X=(e,t,r)=>t in e?qe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Xe=(e,t)=>{for(var r in t||(t={}))J.call(t,r)&&X(e,r,t[r]);if(I)for(var r of I(t))Q.call(t,r)&&X(e,r,t[r]);return e},Ye=(e,t)=>Je(e,Qe(t)),Ze=(e,t)=>{var r={};for(var n in e)J.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&I)for(var n of I(e))t.indexOf(n)<0&&Q.call(e,n)&&(r[n]=e[n]);return r};function Ke(e,t,r={}){const n=r,{debounce:a=0}=n,u=Ze(n,["debounce"]);return j(e,t,Ye(Xe({},u),{eventFilter:R(a)}))}var ke=Object.defineProperty,De=Object.defineProperties,xe=Object.getOwnPropertyDescriptors,Y=Object.getOwnPropertySymbols,et=Object.prototype.hasOwnProperty,tt=Object.prototype.propertyIsEnumerable,Z=(e,t,r)=>t in e?ke(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,rt=(e,t)=>{for(var r in t||(t={}))et.call(t,r)&&Z(e,r,t[r]);if(Y)for(var r of Y(t))tt.call(t,r)&&Z(e,r,t[r]);return e},nt=(e,t)=>De(e,xe(t));function ot(e,t){var r;const n=o.shallowRef();return o.watchEffect(()=>{n.value=e()},nt(rt({},t),{flush:(r=t==null?void 0:t.flush)!=null?r:"sync"})),o.readonly(n)}function at(e,t){return t==null?o.unref(e):o.unref(e)[t]}var it=Object.defineProperty,ut=Object.defineProperties,lt=Object.getOwnPropertyDescriptors,T=Object.getOwnPropertySymbols,K=Object.prototype.hasOwnProperty,k=Object.prototype.propertyIsEnumerable,D=(e,t,r)=>t in e?it(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,ct=(e,t)=>{for(var r in t||(t={}))K.call(t,r)&&D(e,r,t[r]);if(T)for(var r of T(t))k.call(t,r)&&D(e,r,t[r]);return e},ft=(e,t)=>ut(e,lt(t)),st=(e,t)=>{var r={};for(var n in e)K.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&T)for(var n of T(e))t.indexOf(n)<0&&k.call(e,n)&&(r[n]=e[n]);return r};function pt(e,t,r={}){const n=r,{eventFilter:a=E}=n,u=st(n,["eventFilter"]),l=S(a,t);let c,d,_;if(u.flush==="sync"){const p=o.ref(!1);d=()=>{},c=f=>{p.value=!0,f(),p.value=!1},_=o.watch(e,(...f)=>{p.value||l(...f)},u)}else{const p=[],f=o.ref(0),s=o.ref(0);d=()=>{f.value=s.value},p.push(o.watch(e,()=>{s.value++},ft(ct({},u),{flush:"sync"}))),c=v=>{const y=s.value;v(),f.value+=s.value-y},p.push(o.watch(e,(...v)=>{const y=f.value>0&&f.value===s.value;f.value=0,s.value=0,!y&&l(...v)},u)),_=()=>{p.forEach(v=>v())}}return{stop:_,ignoreUpdates:c,ignorePrevAsyncUpdates:d}}function dt(e){return o.unref(e)!=null}var _t=Object.defineProperty,x=Object.getOwnPropertySymbols,vt=Object.prototype.hasOwnProperty,yt=Object.prototype.propertyIsEnumerable,ee=(e,t,r)=>t in e?_t(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Ot=(e,t)=>{for(var r in t||(t={}))vt.call(t,r)&&ee(e,r,t[r]);if(x)for(var r of x(t))yt.call(t,r)&&ee(e,r,t[r]);return e};function ht(e,t){if(typeof Symbol!="undefined"){const r=Ot({},e);return Object.defineProperty(r,Symbol.iterator,{enumerable:!1,value(){let n=0;return{next:()=>({value:t[n++],done:n>t.length})}}}),r}else return Object.assign([...t],e)}function Pt(e){return o.computed(()=>!o.unref(e))}function wt(...e){return o.computed(()=>e.some(t=>o.unref(t)))}var gt=Object.defineProperty,bt=Object.defineProperties,mt=Object.getOwnPropertyDescriptors,C=Object.getOwnPropertySymbols,te=Object.prototype.hasOwnProperty,re=Object.prototype.propertyIsEnumerable,ne=(e,t,r)=>t in e?gt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,$t=(e,t)=>{for(var r in t||(t={}))te.call(t,r)&&ne(e,r,t[r]);if(C)for(var r of C(t))re.call(t,r)&&ne(e,r,t[r]);return e},St=(e,t)=>bt(e,mt(t)),jt=(e,t)=>{var r={};for(var n in e)te.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&C)for(var n of C(e))t.indexOf(n)<0&&re.call(e,n)&&(r[n]=e[n]);return r};function Ft(e,t,r={}){const n=r,{eventFilter:a}=n,u=jt(n,["eventFilter"]),{eventFilter:l,pause:c,resume:d,isActive:_}=G(a);return{stop:j(e,t,St($t({},u),{eventFilter:l})),pause:c,resume:d,isActive:_}}function Et(e,t={}){let r=[];if(Array.isArray(t))r=t;else{const{includeOwnProperties:n=!0}=t;r.push(...Object.keys(e)),n&&r.push(...Object.getOwnPropertyNames(e))}return Object.fromEntries(r.map(n=>{const a=e[n];return[n,typeof a=="function"?N(a.bind(e)):a]}))}function oe(e){if(!o.isRef(e))return o.reactive(e);const t=new Proxy({},{get(r,n,a){return o.unref(Reflect.get(e.value,n,a))},set(r,n,a){return o.isRef(e.value[n])&&!o.isRef(a)?e.value[n].value=a:e.value[n]=a,!0},deleteProperty(r,n){return Reflect.deleteProperty(e.value,n)},has(r,n){return Reflect.has(e.value,n)},ownKeys(){return Object.keys(e.value)},getOwnPropertyDescriptor(){return{enumerable:!0,configurable:!0}}});return o.reactive(t)}function ae(e){return oe(o.computed(e))}function It(e,...t){return ae(()=>Object.fromEntries(Object.entries(o.toRefs(e)).filter(r=>!t.includes(r[0]))))}function Tt(e,...t){return o.reactive(Object.fromEntries(t.map(r=>[r,o.toRef(e,r)])))}function Ct(e,t){return o.computed({get(){var r;return(r=e.value)!=null?r:t},set(r){e.value=r}})}function Vt(...e){if(e.length===2){const[t,r]=e;t.value=r}if(e.length===3)if(o.isVue2)o.set(...e);else{const[t,r,n]=e;t[r]=n}}function At(e,t,{flush:r="sync",deep:n=!1,immediate:a=!0}={}){return Array.isArray(t)||(t=[t]),o.watch(e,u=>t.forEach(l=>l.value=u),{flush:r,deep:n,immediate:a})}function ie(e,t=200,r=!0,n=!0){return S(W(t,r,n),e)}function ue(e,t=200,r=!0,n=!0){if(t<=0)return e;const a=o.ref(e.value),u=ie(()=>{a.value=e.value},t,r,n);return o.watch(e,()=>u()),a}var Nt=Object.defineProperty,Rt=Object.defineProperties,Wt=Object.getOwnPropertyDescriptors,V=Object.getOwnPropertySymbols,le=Object.prototype.hasOwnProperty,ce=Object.prototype.propertyIsEnumerable,fe=(e,t,r)=>t in e?Nt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Mt=(e,t)=>{for(var r in t||(t={}))le.call(t,r)&&fe(e,r,t[r]);if(V)for(var r of V(t))ce.call(t,r)&&fe(e,r,t[r]);return e},Ut=(e,t)=>Rt(e,Wt(t)),Bt=(e,t)=>{var r={};for(var n in e)le.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&V)for(var n of V(e))t.indexOf(n)<0&&ce.call(e,n)&&(r[n]=e[n]);return r};function Gt(e,t,r={}){const n=r,{throttle:a=0,trailing:u=!0,leading:l=!0}=n,c=Bt(n,["throttle","trailing","leading"]);return j(e,t,Ut(Mt({},c),{eventFilter:W(a,u,l)}))}var Lt=Object.defineProperty,Ht=Object.defineProperties,zt=Object.getOwnPropertyDescriptors,se=Object.getOwnPropertySymbols,qt=Object.prototype.hasOwnProperty,Jt=Object.prototype.propertyIsEnumerable,pe=(e,t,r)=>t in e?Lt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Qt=(e,t)=>{for(var r in t||(t={}))qt.call(t,r)&&pe(e,r,t[r]);if(se)for(var r of se(t))Jt.call(t,r)&&pe(e,r,t[r]);return e},Xt=(e,t)=>Ht(e,zt(t));function Yt(e){if(!o.isRef(e))return o.toRefs(e);const t=Array.isArray(e.value)?new Array(e.value.length):{};for(const r in e.value)t[r]=o.customRef(()=>({get(){return e.value[r]},set(n){if(Array.isArray(e.value)){const a=[...e.value];a[r]=n,e.value=a}else e.value=Xt(Qt({},e.value),{[r]:n})}}));return t}function Zt(e){o.getCurrentInstance()&&o.onBeforeUnmount(e)}function Kt(e,t=!0){o.getCurrentInstance()?o.onMounted(e):t?e():o.nextTick(e)}function kt(e){o.getCurrentInstance()&&o.onUnmounted(e)}function Dt(e){let t=!1;function r(f,{flush:s="sync",deep:v=!1,timeout:y,throwOnTimeout:A}={}){let w=null;const we=[new Promise(hr=>{w=o.watch(e,Pr=>{f(Pr)===!t&&(w==null||w(),hr())},{flush:s,deep:v,immediate:!0})})];return y&&we.push(L(y,A).finally(()=>{w==null||w()})),Promise.race(we)}function n(f,s){return r(v=>v===o.unref(f),s)}function a(f){return r(s=>Boolean(s),f)}function u(f){return n(null,f)}function l(f){return n(void 0,f)}function c(f){return r(Number.isNaN,f)}function d(f,s){return r(v=>{const y=Array.from(v);return y.includes(f)||y.includes(o.unref(f))},s)}function _(f){return p(1,f)}function p(f=1,s){let v=-1;return r(()=>(v+=1,v>=f),s)}return Array.isArray(o.unref(e))?{toMatch:r,toContains:d,changed:_,changedTimes:p,get not(){return t=!t,this}}:{toMatch:r,toBe:n,toBeTruthy:a,toBeNull:u,toBeNaN:c,toBeUndefined:l,changed:_,changedTimes:p,get not(){return t=!t,this}}}function xt(e=0,t={}){const r=o.ref(e),{max:n=1/0,min:a=-1/0}=t,u=(p=1)=>r.value=Math.min(n,r.value+p),l=(p=1)=>r.value=Math.max(a,r.value-p),c=()=>r.value,d=p=>r.value=p;return{count:r,inc:u,dec:l,get:c,set:d,reset:(p=e)=>(e=p,d(p))}}function de(e,t=1e3,r={}){const{immediate:n=!0,immediateCallback:a=!1}=r;let u=null;const l=o.ref(!1);function c(){u&&(clearInterval(u),u=null)}function d(){l.value=!1,c()}function _(){t<=0||(l.value=!0,a&&e(),c(),u=setInterval(e,o.unref(t)))}if(n&&F&&_(),o.isRef(t)){const p=o.watch(t,()=>{n&&F&&_()});$(p)}return $(d),{isActive:l,pause:d,resume:_}}var er=Object.defineProperty,_e=Object.getOwnPropertySymbols,tr=Object.prototype.hasOwnProperty,rr=Object.prototype.propertyIsEnumerable,ve=(e,t,r)=>t in e?er(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,nr=(e,t)=>{for(var r in t||(t={}))tr.call(t,r)&&ve(e,r,t[r]);if(_e)for(var r of _e(t))rr.call(t,r)&&ve(e,r,t[r]);return e};function or(e=1e3,t={}){const{controls:r=!1,immediate:n=!0}=t,a=o.ref(0),u=de(()=>a.value+=1,e,{immediate:n});return r?nr({counter:a},u):a}function ar(e,t={}){var r;const n=o.ref((r=t.initialValue)!=null?r:null);return o.watch(e,()=>n.value=U(),t),n}function ye(e,t,r={}){const{immediate:n=!0}=r,a=o.ref(!1);let u=null;function l(){u&&(clearTimeout(u),u=null)}function c(){a.value=!1,l()}function d(..._){l(),a.value=!0,u=setTimeout(()=>{a.value=!1,u=null,e(..._)},o.unref(t))}return n&&(a.value=!0,F&&d()),$(c),{isPending:a,start:d,stop:c}}var ir=Object.defineProperty,Oe=Object.getOwnPropertySymbols,ur=Object.prototype.hasOwnProperty,lr=Object.prototype.propertyIsEnumerable,he=(e,t,r)=>t in e?ir(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,cr=(e,t)=>{for(var r in t||(t={}))ur.call(t,r)&&he(e,r,t[r]);if(Oe)for(var r of Oe(t))lr.call(t,r)&&he(e,r,t[r]);return e};function fr(e=1e3,t={}){const{controls:r=!1}=t,n=ye(B,e,t),a=o.computed(()=>!n.isPending.value);return r?cr({ready:a},n):a}function sr(e=!1){if(o.isRef(e))return t=>(e.value=typeof t=="boolean"?t:!e.value,e.value);{const t=o.ref(e);return[t,n=>(t.value=typeof n=="boolean"?n:!t.value,t.value)]}}var Pe=Object.getOwnPropertySymbols,pr=Object.prototype.hasOwnProperty,dr=Object.prototype.propertyIsEnumerable,_r=(e,t)=>{var r={};for(var n in e)pr.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Pe)for(var n of Pe(e))t.indexOf(n)<0&&dr.call(e,n)&&(r[n]=e[n]);return r};function vr(e,t,r){const n=r,{count:a}=n,u=_r(n,["count"]),l=o.ref(0),c=j(e,(...d)=>{l.value+=1,l.value>=o.unref(a)&&o.nextTick(()=>c()),t(...d)},u);return{count:l,stop:c}}function yr(e,t,r){const n=o.watch(e,(...a)=>(o.nextTick(()=>n()),t(...a)),r)}function Or(e,t,r){return o.watch(e,(n,a,u)=>{n&&t(n,a,u)},r)}i.and=O,i.assert=Se,i.biSyncRef=m,i.bypassFilter=E,i.clamp=Ae,i.containsProp=Ue,i.controlledComputed=g,i.controlledRef=b,i.createEventHook=ge,i.createFilterWrapper=S,i.createGlobalState=be,i.createReactiveFn=N,i.createSharedComposable=me,i.createSingletonPromise=We,i.debounceFilter=R,i.debouncedRef=z,i.debouncedWatch=Ke,i.eagerComputed=ot,i.extendRef=P,i.get=at,i.identity=Re,i.ignorableWatch=pt,i.increaseWithUnit=Be,i.invoke=Me,i.isBoolean=je,i.isClient=F,i.isDef=$e,i.isDefined=dt,i.isFunction=Fe,i.isNumber=Ee,i.isObject=Te,i.isString=Ie,i.isWindow=Ce,i.makeDestructurable=ht,i.noop=B,i.not=Pt,i.now=Ve,i.objectPick=Ge,i.or=wt,i.pausableFilter=G,i.pausableWatch=Ft,i.promiseTimeout=L,i.rand=Ne,i.reactify=N,i.reactifyObject=Et,i.reactiveComputed=ae,i.reactiveOmit=It,i.reactivePick=Tt,i.refDefault=Ct,i.set=Vt,i.syncRef=At,i.throttleFilter=W,i.throttledRef=ue,i.throttledWatch=Gt,i.timestamp=U,i.toReactive=oe,i.toRefs=Yt,i.tryOnBeforeUnmount=Zt,i.tryOnMounted=Kt,i.tryOnScopeDispose=$,i.tryOnUnmounted=kt,i.until=Dt,i.useCounter=xt,i.useDebounce=z,i.useDebounceFn=H,i.useInterval=or,i.useIntervalFn=de,i.useLastChanged=ar,i.useThrottle=ue,i.useThrottleFn=ie,i.useTimeout=fr,i.useTimeoutFn=ye,i.useToggle=sr,i.watchAtMost=vr,i.watchOnce=yr,i.watchWithFilter=j,i.whenever=Or,Object.defineProperty(i,"__esModule",{value:!0})}(this.VueUse=this.VueUse||{},VueDemi);
(function(i){if(!i.VueDemi){var o={},v=i.Vue;if(v)if(v.version.slice(0,2)==="2."){var b=i.VueCompositionAPI;if(b){for(var g in b)o[g]=b[g];o.isVue2=!0,o.isVue3=!1,o.install=function(){},o.Vue=v,o.Vue2=v,o.version=v.version}else console.error("[vue-demi] no VueCompositionAPI instance found, please be sure to import `@vue/composition-api` before `vue-demi`.")}else if(v.version.slice(0,2)==="3."){for(var g in v)o[g]=v[g];o.isVue2=!1,o.isVue3=!0,o.install=function(){},o.Vue=v,o.Vue2=void 0,o.version=v.version,o.set=function(h,w,m){return Array.isArray(h)?(h.length=Math.max(h.length,w),h.splice(w,1,m),m):(h[w]=m,m)},o.del=function(h,w){if(Array.isArray(h)){h.splice(w,1);return}delete h[w]}}else console.error("[vue-demi] Vue version "+v.version+" is unsupported.");else console.error("[vue-demi] no Vue instance found, please be sure to import `vue` before `vue-demi`.");i.VueDemi=o}})(window),function(i,o){"use strict";var v=Object.defineProperty,b=Object.defineProperties,g=Object.getOwnPropertyDescriptors,h=Object.getOwnPropertySymbols,w=Object.prototype.hasOwnProperty,m=Object.prototype.propertyIsEnumerable,B=(e,t,r)=>t in e?v(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Ne=(e,t)=>{for(var r in t||(t={}))w.call(t,r)&&B(e,r,t[r]);if(h)for(var r of h(t))m.call(t,r)&&B(e,r,t[r]);return e},Ve=(e,t)=>b(e,g(t));function H(e,t){var r;const n=o.shallowRef();return o.watchEffect(()=>{n.value=e()},Ve(Ne({},t),{flush:(r=t==null?void 0:t.flush)!=null?r:"sync"})),o.readonly(n)}function Y(e,t){let r,n,a;const u=o.ref(!0);return o.watch(e,()=>{u.value=!0,a()},{flush:"sync"}),o.customRef((l,c)=>(n=l,a=c,{get(){return u.value&&(r=t(),u.value=!1),n(),r},set(){}}))}function Me(){const e=[],t=a=>{const u=e.indexOf(a);u!==-1&&e.splice(u,1)};return{on:a=>(e.push(a),{off:()=>t(a)}),off:t,trigger:a=>{e.forEach(u=>u(a))}}}function We(e){let t=!1,r;const n=o.effectScope(!0);return()=>(t||(r=n.run(e),t=!0),r)}function $(e){return o.getCurrentScope()?(o.onScopeDispose(e),!0):!1}function Ue(e){let t=0,r,n;const a=()=>{t-=1,n&&t<=0&&(n.stop(),r=void 0,n=void 0)};return(...u)=>(t+=1,r||(n=o.effectScope(!0),r=n.run(()=>e(...u))),$(a),r)}function Be(e="this function"){if(!o.isVue3)throw new Error(`[VueUse] ${e} is only works on Vue 3.`)}function G(e,t,{enumerable:r=!1,unwrap:n=!0}={}){Be();for(const[a,u]of Object.entries(t))a!=="value"&&(o.isRef(u)&&n?Object.defineProperty(e,a,{get(){return u.value},set(l){u.value=l},enumerable:r}):Object.defineProperty(e,a,{value:u,enumerable:r}));return e}function He(e,t){return t==null?o.unref(e):o.unref(e)[t]}function Ye(e){return o.unref(e)!=null}function z(...e){return o.computed(()=>e.every(t=>o.unref(t)))}function L(e){return o.computed(()=>!o.unref(e))}function X(...e){return o.computed(()=>e.some(t=>o.unref(t)))}var Ge=Object.defineProperty,Z=Object.getOwnPropertySymbols,ze=Object.prototype.hasOwnProperty,Le=Object.prototype.propertyIsEnumerable,q=(e,t,r)=>t in e?Ge(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Xe=(e,t)=>{for(var r in t||(t={}))ze.call(t,r)&&q(e,r,t[r]);if(Z)for(var r of Z(t))Le.call(t,r)&&q(e,r,t[r]);return e};function Ze(e,t){if(typeof Symbol!="undefined"){const r=Xe({},e);return Object.defineProperty(r,Symbol.iterator,{enumerable:!1,value(){let n=0;return{next:()=>({value:t[n++],done:n>t.length})}}}),r}else return Object.assign([...t],e)}function N(e){return function(...t){return o.computed(()=>e.apply(this,t.map(r=>o.unref(r))))}}function qe(e,t={}){let r=[];if(Array.isArray(t))r=t;else{const{includeOwnProperties:n=!0}=t;r.push(...Object.keys(e)),n&&r.push(...Object.getOwnPropertyNames(e))}return Object.fromEntries(r.map(n=>{const a=e[n];return[n,typeof a=="function"?N(a.bind(e)):a]}))}function J(e){if(!o.isRef(e))return o.reactive(e);const t=new Proxy({},{get(r,n,a){return o.unref(Reflect.get(e.value,n,a))},set(r,n,a){return o.isRef(e.value[n])&&!o.isRef(a)?e.value[n].value=a:e.value[n]=a,!0},deleteProperty(r,n){return Reflect.deleteProperty(e.value,n)},has(r,n){return Reflect.has(e.value,n)},ownKeys(){return Object.keys(e.value)},getOwnPropertyDescriptor(){return{enumerable:!0,configurable:!0}}});return o.reactive(t)}function Q(e){return J(o.computed(e))}function Je(e,...t){return Q(()=>Object.fromEntries(Object.entries(o.toRefs(e)).filter(r=>!t.includes(r[0]))))}function Qe(e,...t){return o.reactive(Object.fromEntries(t.map(r=>[r,o.toRef(e,r)])))}function K(e,t=1e4){return o.customRef((r,n)=>{let a=e,u;const l=()=>setTimeout(()=>{a=e,n()},o.unref(t));return{get(){return r(),a},set(c){a=c,n(),clearTimeout(u),u=l()}}})}const E=typeof window!="undefined",Ke=e=>typeof e!="undefined",ke=(e,...t)=>{e||console.warn(...t)},k=Object.prototype.toString,De=e=>typeof e=="boolean",xe=e=>typeof e=="function",et=e=>typeof e=="number",tt=e=>typeof e=="string",rt=e=>k.call(e)==="[object Object]",nt=e=>typeof window!="undefined"&&k.call(e)==="[object Window]",ot=()=>Date.now(),D=()=>+Date.now(),at=(e,t,r)=>Math.min(r,Math.max(t,e)),x=()=>{},it=(e,t)=>(e=Math.ceil(e),t=Math.floor(t),Math.floor(Math.random()*(t-e+1))+e);function S(e,t){function r(...n){e(()=>t.apply(this,n),{fn:t,thisArg:this,args:n})}return r}const F=e=>e();function V(e,t={}){let r,n;return u=>{const l=o.unref(e),c=o.unref(t.maxWait);if(r&&clearTimeout(r),l<=0||c!==void 0&&c<=0)return n&&(clearTimeout(n),n=null),u();c&&!n&&(n=setTimeout(()=>{r&&clearTimeout(r),n=null,u()},c)),r=setTimeout(()=>{n&&clearTimeout(n),n=null,u()},l)}}function M(e,t=!0,r=!0){let n=0,a,u=!r;const l=()=>{a&&(clearTimeout(a),a=void 0)};return s=>{const _=o.unref(e),p=Date.now()-n;if(l(),_<=0)return n=Date.now(),s();p>_&&(n=Date.now(),u?u=!1:s()),t&&(a=setTimeout(()=>{n=Date.now(),r||(u=!0),l(),s()},_)),!r&&!a&&(a=setTimeout(()=>u=!0,_))}}function ee(e=F){const t=o.ref(!0);function r(){t.value=!1}function n(){t.value=!0}return{isActive:t,pause:r,resume:n,eventFilter:(...u)=>{t.value&&e(...u)}}}function te(e,t=!1,r="Timeout"){return new Promise((n,a)=>{setTimeout(t?()=>a(r):n,e)})}function ut(e){return e}function lt(e){let t;function r(){return t||(t=e()),t}return r.reset=async()=>{const n=t;t=void 0,n&&await n},r}function ct(e){return e()}function ft(e,...t){return t.some(r=>r in e)}function st(e,t){var r;if(typeof e=="number")return e+t;const n=((r=e.match(/^-?[0-9]+\.?[0-9]*/))==null?void 0:r[0])||"",a=e.slice(n.length),u=parseFloat(n)+t;return Number.isNaN(u)?e:u+a}function dt(e,t,r=!1){return t.reduce((n,a)=>(a in e&&(!r||!e[a]===void 0)&&(n[a]=e[a]),n),{})}function re(e,t=200,r={}){return S(V(t,r),e)}function W(e,t=200,r={}){if(t<=0)return e;const n=o.ref(e.value),a=re(()=>{n.value=e.value},t,r);return o.watch(e,()=>a()),n}function pt(e,t){return o.computed({get(){var r;return(r=e.value)!=null?r:t},set(r){e.value=r}})}function ne(e,t=200,r=!0,n=!0){return S(M(t,r,n),e)}function U(e,t=200,r=!0,n=!0){if(t<=0)return e;const a=o.ref(e.value),u=ne(()=>{a.value=e.value},t,r,n);return o.watch(e,()=>u()),a}function oe(e,t={}){let r=e,n,a;const u=o.customRef((d,y)=>(n=d,a=y,{get(){return l()},set(O){c(O)}}));function l(d=!0){return d&&n(),r}function c(d,y=!0){var O,R;if(d===r)return;const P=r;((O=t.onBeforeChange)==null?void 0:O.call(t,d,P))!==!1&&(r=d,(R=t.onChanged)==null||R.call(t,d,P),y&&a())}return G(u,{get:l,set:c,untrackedGet:()=>l(!1),silentSet:d=>c(d,!1),peek:()=>l(!1),lay:d=>c(d,!1)},{enumerable:!0})}const _t=oe;function yt(...e){if(e.length===2){const[t,r]=e;t.value=r}if(e.length===3)if(o.isVue2)o.set(...e);else{const[t,r,n]=e;t[r]=n}}function Ot(e,t,r={}){const{flush:n="sync",deep:a=!1,immediate:u=!0,direction:l="both"}=r;let c,s;return(l==="both"||l==="ltr")&&(c=o.watch(e,_=>t.value=_,{flush:n,deep:a,immediate:u})),(l==="both"||l==="rtl")&&(s=o.watch(t,_=>e.value=_,{flush:n,deep:a,immediate:u})),()=>{c==null||c(),s==null||s()}}function vt(e,t,r={}){const{flush:n="sync",deep:a=!1,immediate:u=!0}=r;return Array.isArray(t)||(t=[t]),o.watch(e,l=>t.forEach(c=>c.value=l),{flush:n,deep:a,immediate:u})}var ht=Object.defineProperty,wt=Object.defineProperties,Pt=Object.getOwnPropertyDescriptors,ae=Object.getOwnPropertySymbols,gt=Object.prototype.hasOwnProperty,mt=Object.prototype.propertyIsEnumerable,ie=(e,t,r)=>t in e?ht(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,bt=(e,t)=>{for(var r in t||(t={}))gt.call(t,r)&&ie(e,r,t[r]);if(ae)for(var r of ae(t))mt.call(t,r)&&ie(e,r,t[r]);return e},$t=(e,t)=>wt(e,Pt(t));function St(e){if(!o.isRef(e))return o.toRefs(e);const t=Array.isArray(e.value)?new Array(e.value.length):{};for(const r in e.value)t[r]=o.customRef(()=>({get(){return e.value[r]},set(n){if(Array.isArray(e.value)){const a=[...e.value];a[r]=n,e.value=a}else e.value=$t(bt({},e.value),{[r]:n})}}));return t}function jt(e){o.getCurrentInstance()&&o.onBeforeUnmount(e)}function Et(e,t=!0){o.getCurrentInstance()?o.onMounted(e):t?e():o.nextTick(e)}function Ft(e){o.getCurrentInstance()&&o.onUnmounted(e)}function Tt(e){let t=!1;function r(f,{flush:d="sync",deep:y=!1,timeout:O,throwOnTimeout:R}={}){let P=null;const Re=[new Promise(Sr=>{P=o.watch(e,jr=>{f(jr)===!t&&(P==null||P(),Sr())},{flush:d,deep:y,immediate:!0})})];return O&&Re.push(te(O,R).finally(()=>{P==null||P()})),Promise.race(Re)}function n(f,d){return r(y=>y===o.unref(f),d)}function a(f){return r(d=>Boolean(d),f)}function u(f){return n(null,f)}function l(f){return n(void 0,f)}function c(f){return r(Number.isNaN,f)}function s(f,d){return r(y=>{const O=Array.from(y);return O.includes(f)||O.includes(o.unref(f))},d)}function _(f){return p(1,f)}function p(f=1,d){let y=-1;return r(()=>(y+=1,y>=f),d)}return Array.isArray(o.unref(e))?{toMatch:r,toContains:s,changed:_,changedTimes:p,get not(){return t=!t,this}}:{toMatch:r,toBe:n,toBeTruthy:a,toBeNull:u,toBeNaN:c,toBeUndefined:l,changed:_,changedTimes:p,get not(){return t=!t,this}}}function It(e=0,t={}){const r=o.ref(e),{max:n=1/0,min:a=-1/0}=t,u=(p=1)=>r.value=Math.min(n,r.value+p),l=(p=1)=>r.value=Math.max(a,r.value-p),c=()=>r.value,s=p=>r.value=p;return{count:r,inc:u,dec:l,get:c,set:s,reset:(p=e)=>(e=p,s(p))}}const At=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,Ct=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,ue=(e,t)=>{const r=e.getFullYear(),n=e.getMonth(),a=e.getDate(),u=e.getHours(),l=e.getMinutes(),c=e.getSeconds(),s=e.getMilliseconds(),_={YY:String(r).slice(-2),YYYY:r,M:n+1,MM:`${n+1}`.padStart(2,"0"),D:String(a),DD:`${a}`.padStart(2,"0"),H:String(u),HH:`${u}`.padStart(2,"0"),h:`${u%12||12}`.padStart(1,"0"),hh:`${u%12||12}`.padStart(2,"0"),m:String(l),mm:`${l}`.padStart(2,"0"),s:String(c),ss:`${c}`.padStart(2,"0"),SSS:`${s}`.padStart(3,"0")};return t.replace(Ct,(p,f)=>f||_[p])},le=e=>{if(e===null)return new Date(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(At);if(t){const r=t[2]-1||0,n=(t[7]||"0").substring(0,3);return new Date(t[1],r,t[3]||1,t[4]||0,t[5]||0,t[6]||0,n)}}return new Date(e)};function Rt(e,t="HH:mm:ss"){return o.computed(()=>ue(le(o.unref(e)),o.unref(t)))}function ce(e,t=1e3,r={}){const{immediate:n=!0,immediateCallback:a=!1}=r;let u=null;const l=o.ref(!1);function c(){u&&(clearInterval(u),u=null)}function s(){l.value=!1,c()}function _(){t<=0||(l.value=!0,a&&e(),c(),u=setInterval(e,o.unref(t)))}if(n&&E&&_(),o.isRef(t)){const p=o.watch(t,()=>{n&&E&&_()});$(p)}return $(s),{isActive:l,pause:s,resume:_}}var Nt=Object.defineProperty,fe=Object.getOwnPropertySymbols,Vt=Object.prototype.hasOwnProperty,Mt=Object.prototype.propertyIsEnumerable,se=(e,t,r)=>t in e?Nt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Wt=(e,t)=>{for(var r in t||(t={}))Vt.call(t,r)&&se(e,r,t[r]);if(fe)for(var r of fe(t))Mt.call(t,r)&&se(e,r,t[r]);return e};function Ut(e=1e3,t={}){const{controls:r=!1,immediate:n=!0}=t,a=o.ref(0),u=ce(()=>a.value+=1,e,{immediate:n});return r?Wt({counter:a},u):a}function Bt(e,t={}){var r;const n=o.ref((r=t.initialValue)!=null?r:null);return o.watch(e,()=>n.value=D(),t),n}function de(e,t,r={}){const{immediate:n=!0}=r,a=o.ref(!1);let u=null;function l(){u&&(clearTimeout(u),u=null)}function c(){a.value=!1,l()}function s(..._){l(),a.value=!0,u=setTimeout(()=>{a.value=!1,u=null,e(..._)},o.unref(t))}return n&&(a.value=!0,E&&s()),$(c),{isPending:a,start:s,stop:c}}var Ht=Object.defineProperty,pe=Object.getOwnPropertySymbols,Yt=Object.prototype.hasOwnProperty,Gt=Object.prototype.propertyIsEnumerable,_e=(e,t,r)=>t in e?Ht(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,zt=(e,t)=>{for(var r in t||(t={}))Yt.call(t,r)&&_e(e,r,t[r]);if(pe)for(var r of pe(t))Gt.call(t,r)&&_e(e,r,t[r]);return e};function Lt(e=1e3,t={}){const{controls:r=!1}=t,n=de(x,e,t),a=o.computed(()=>!n.isPending.value);return r?zt({ready:a},n):a}function Xt(e=!1){if(o.isRef(e))return t=>(e.value=typeof t=="boolean"?t:!e.value,e.value);{const t=o.ref(e);return[t,n=>(t.value=typeof n=="boolean"?n:!t.value,t.value)]}}var ye=Object.getOwnPropertySymbols,Zt=Object.prototype.hasOwnProperty,qt=Object.prototype.propertyIsEnumerable,Jt=(e,t)=>{var r={};for(var n in e)Zt.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&ye)for(var n of ye(e))t.indexOf(n)<0&&qt.call(e,n)&&(r[n]=e[n]);return r};function j(e,t,r={}){const n=r,{eventFilter:a=F}=n,u=Jt(n,["eventFilter"]);return o.watch(e,S(a,t),u)}var Oe=Object.getOwnPropertySymbols,Qt=Object.prototype.hasOwnProperty,Kt=Object.prototype.propertyIsEnumerable,kt=(e,t)=>{var r={};for(var n in e)Qt.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Oe)for(var n of Oe(e))t.indexOf(n)<0&&Kt.call(e,n)&&(r[n]=e[n]);return r};function Dt(e,t,r){const n=r,{count:a}=n,u=kt(n,["count"]),l=o.ref(0),c=j(e,(...s)=>{l.value+=1,l.value>=o.unref(a)&&o.nextTick(()=>c()),t(...s)},u);return{count:l,stop:c}}var xt=Object.defineProperty,er=Object.defineProperties,tr=Object.getOwnPropertyDescriptors,T=Object.getOwnPropertySymbols,ve=Object.prototype.hasOwnProperty,he=Object.prototype.propertyIsEnumerable,we=(e,t,r)=>t in e?xt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,rr=(e,t)=>{for(var r in t||(t={}))ve.call(t,r)&&we(e,r,t[r]);if(T)for(var r of T(t))he.call(t,r)&&we(e,r,t[r]);return e},nr=(e,t)=>er(e,tr(t)),or=(e,t)=>{var r={};for(var n in e)ve.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&T)for(var n of T(e))t.indexOf(n)<0&&he.call(e,n)&&(r[n]=e[n]);return r};function Pe(e,t,r={}){const n=r,{debounce:a=0}=n,u=or(n,["debounce"]);return j(e,t,nr(rr({},u),{eventFilter:V(a)}))}var ar=Object.defineProperty,ir=Object.defineProperties,ur=Object.getOwnPropertyDescriptors,I=Object.getOwnPropertySymbols,ge=Object.prototype.hasOwnProperty,me=Object.prototype.propertyIsEnumerable,be=(e,t,r)=>t in e?ar(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,lr=(e,t)=>{for(var r in t||(t={}))ge.call(t,r)&&be(e,r,t[r]);if(I)for(var r of I(t))me.call(t,r)&&be(e,r,t[r]);return e},cr=(e,t)=>ir(e,ur(t)),fr=(e,t)=>{var r={};for(var n in e)ge.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&I)for(var n of I(e))t.indexOf(n)<0&&me.call(e,n)&&(r[n]=e[n]);return r};function $e(e,t,r={}){const n=r,{eventFilter:a=F}=n,u=fr(n,["eventFilter"]),l=S(a,t);let c,s,_;if(u.flush==="sync"){const p=o.ref(!1);s=()=>{},c=f=>{p.value=!0,f(),p.value=!1},_=o.watch(e,(...f)=>{p.value||l(...f)},u)}else{const p=[],f=o.ref(0),d=o.ref(0);s=()=>{f.value=d.value},p.push(o.watch(e,()=>{d.value++},cr(lr({},u),{flush:"sync"}))),c=y=>{const O=d.value;y(),f.value+=d.value-O},p.push(o.watch(e,(...y)=>{const O=f.value>0&&f.value===d.value;f.value=0,d.value=0,!O&&l(...y)},u)),_=()=>{p.forEach(y=>y())}}return{stop:_,ignoreUpdates:c,ignorePrevAsyncUpdates:s}}function sr(e,t,r){const n=o.watch(e,(...a)=>(o.nextTick(()=>n()),t(...a)),r)}var dr=Object.defineProperty,pr=Object.defineProperties,_r=Object.getOwnPropertyDescriptors,A=Object.getOwnPropertySymbols,Se=Object.prototype.hasOwnProperty,je=Object.prototype.propertyIsEnumerable,Ee=(e,t,r)=>t in e?dr(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,yr=(e,t)=>{for(var r in t||(t={}))Se.call(t,r)&&Ee(e,r,t[r]);if(A)for(var r of A(t))je.call(t,r)&&Ee(e,r,t[r]);return e},Or=(e,t)=>pr(e,_r(t)),vr=(e,t)=>{var r={};for(var n in e)Se.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&A)for(var n of A(e))t.indexOf(n)<0&&je.call(e,n)&&(r[n]=e[n]);return r};function Fe(e,t,r={}){const n=r,{eventFilter:a}=n,u=vr(n,["eventFilter"]),{eventFilter:l,pause:c,resume:s,isActive:_}=ee(a);return{stop:j(e,t,Or(yr({},u),{eventFilter:l})),pause:c,resume:s,isActive:_}}var hr=Object.defineProperty,wr=Object.defineProperties,Pr=Object.getOwnPropertyDescriptors,C=Object.getOwnPropertySymbols,Te=Object.prototype.hasOwnProperty,Ie=Object.prototype.propertyIsEnumerable,Ae=(e,t,r)=>t in e?hr(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,gr=(e,t)=>{for(var r in t||(t={}))Te.call(t,r)&&Ae(e,r,t[r]);if(C)for(var r of C(t))Ie.call(t,r)&&Ae(e,r,t[r]);return e},mr=(e,t)=>wr(e,Pr(t)),br=(e,t)=>{var r={};for(var n in e)Te.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&C)for(var n of C(e))t.indexOf(n)<0&&Ie.call(e,n)&&(r[n]=e[n]);return r};function Ce(e,t,r={}){const n=r,{throttle:a=0,trailing:u=!0,leading:l=!0}=n,c=br(n,["throttle","trailing","leading"]);return j(e,t,mr(gr({},c),{eventFilter:M(a,u,l)}))}function $r(e,t,r){return o.watch(e,(n,a,u)=>{n&&t(n,a,u)},r)}i.and=z,i.assert=ke,i.autoResetRef=K,i.bypassFilter=F,i.clamp=at,i.computedEager=H,i.computedWithControl=Y,i.containsProp=ft,i.controlledComputed=Y,i.controlledRef=_t,i.createEventHook=Me,i.createFilterWrapper=S,i.createGlobalState=We,i.createReactiveFn=N,i.createSharedComposable=Ue,i.createSingletonPromise=lt,i.debounceFilter=V,i.debouncedRef=W,i.debouncedWatch=Pe,i.eagerComputed=H,i.extendRef=G,i.formatDate=ue,i.get=He,i.identity=ut,i.ignorableWatch=$e,i.increaseWithUnit=st,i.invoke=ct,i.isBoolean=De,i.isClient=E,i.isDef=Ke,i.isDefined=Ye,i.isFunction=xe,i.isNumber=et,i.isObject=rt,i.isString=tt,i.isWindow=nt,i.logicAnd=z,i.logicNot=L,i.logicOr=X,i.makeDestructurable=Ze,i.noop=x,i.normalizeDate=le,i.not=L,i.now=ot,i.objectPick=dt,i.or=X,i.pausableFilter=ee,i.pausableWatch=Fe,i.promiseTimeout=te,i.rand=it,i.reactify=N,i.reactifyObject=qe,i.reactiveComputed=Q,i.reactiveOmit=Je,i.reactivePick=Qe,i.refAutoReset=K,i.refDebounced=W,i.refDefault=pt,i.refThrottled=U,i.refWithControl=oe,i.set=yt,i.syncRef=Ot,i.syncRefs=vt,i.throttleFilter=M,i.throttledRef=U,i.throttledWatch=Ce,i.timestamp=D,i.toReactive=J,i.toRefs=St,i.tryOnBeforeUnmount=jt,i.tryOnMounted=Et,i.tryOnScopeDispose=$,i.tryOnUnmounted=Ft,i.until=Tt,i.useCounter=It,i.useDateFormat=Rt,i.useDebounce=W,i.useDebounceFn=re,i.useInterval=Ut,i.useIntervalFn=ce,i.useLastChanged=Bt,i.useThrottle=U,i.useThrottleFn=ne,i.useTimeout=Lt,i.useTimeoutFn=de,i.useToggle=Xt,i.watchAtMost=Dt,i.watchDebounced=Pe,i.watchIgnorable=$e,i.watchOnce=sr,i.watchPausable=Fe,i.watchThrottled=Ce,i.watchWithFilter=j,i.whenever=$r,Object.defineProperty(i,"__esModule",{value:!0})}(this.VueUse=this.VueUse||{},VueDemi);
{
"name": "@vueuse/shared",
"version": "7.7.1",
"version": "8.0.0-beta.2",
"keywords": [

@@ -5,0 +5,0 @@ "vue",

Sorry, the diff of this file is not supported yet

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