aiflowy-ui-admin/node_modules/.vite/deps/chunk-FYPMSKES.js

919 lines
27 KiB
JavaScript

import {
componentSizes
} from "./chunk-UFIWN4M6.js";
import {
buildProp
} from "./chunk-R2OGZABH.js";
import {
isVue2
} from "./chunk-4CSS7JW7.js";
import {
computed,
customRef,
getCurrentInstance,
getCurrentScope,
inject,
isRef,
nextTick,
onMounted,
onScopeDispose,
reactive,
readonly,
ref,
shallowRef,
unref,
watch,
watchEffect
} from "./chunk-AAHVYXXY.js";
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/hooks/use-size/index.mjs
var useSizeProp = buildProp({
type: String,
values: componentSizes,
required: false
});
var useSizeProps = {
size: useSizeProp
};
var SIZE_INJECTION_KEY = Symbol("size");
var useGlobalSize = () => {
const injectedSize = inject(SIZE_INJECTION_KEY, {});
return computed(() => {
return unref(injectedSize.size) || "";
});
};
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/form/src/constants.mjs
var formContextKey = Symbol("formContextKey");
var formItemContextKey = Symbol("formItemContextKey");
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/hooks/use-prop/index.mjs
var useProp = (name) => {
const vm = getCurrentInstance();
return computed(() => {
var _a2, _b;
return (_b = (_a2 = vm == null ? void 0 : vm.proxy) == null ? void 0 : _a2.$props) == null ? void 0 : _b[name];
});
};
// ../node_modules/.pnpm/element-plus@2.11.7_vue@3.5.24_typescript@5.9.3_/node_modules/element-plus/es/components/form/src/hooks/use-form-common-props.mjs
var useFormSize = (fallback, ignore = {}) => {
const emptyRef = ref(void 0);
const size = ignore.prop ? emptyRef : useProp("size");
const globalConfig = ignore.global ? emptyRef : useGlobalSize();
const form = ignore.form ? { size: void 0 } : inject(formContextKey, void 0);
const formItem = ignore.formItem ? { size: void 0 } : inject(formItemContextKey, void 0);
return computed(() => size.value || unref(fallback) || (formItem == null ? void 0 : formItem.size) || (form == null ? void 0 : form.size) || globalConfig.value || "");
};
var useFormDisabled = (fallback) => {
const disabled = useProp("disabled");
const form = inject(formContextKey, void 0);
return computed(() => disabled.value || unref(fallback) || (form == null ? void 0 : form.disabled) || false);
};
var useSize = useFormSize;
var useDisabled = useFormDisabled;
// ../node_modules/.pnpm/@vueuse+shared@9.13.0_vue@3.5.24_typescript@5.9.3_/node_modules/@vueuse/shared/index.mjs
var __defProp$9 = Object.defineProperty;
var __defProps$6 = Object.defineProperties;
var __getOwnPropDescs$6 = Object.getOwnPropertyDescriptors;
var __getOwnPropSymbols$b = Object.getOwnPropertySymbols;
var __hasOwnProp$b = Object.prototype.hasOwnProperty;
var __propIsEnum$b = Object.prototype.propertyIsEnumerable;
var __defNormalProp$9 = (obj, key, value) => key in obj ? __defProp$9(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
var __spreadValues$9 = (a, b) => {
for (var prop in b || (b = {}))
if (__hasOwnProp$b.call(b, prop))
__defNormalProp$9(a, prop, b[prop]);
if (__getOwnPropSymbols$b)
for (var prop of __getOwnPropSymbols$b(b)) {
if (__propIsEnum$b.call(b, prop))
__defNormalProp$9(a, prop, b[prop]);
}
return a;
};
var __spreadProps$6 = (a, b) => __defProps$6(a, __getOwnPropDescs$6(b));
function computedEager(fn, options) {
var _a2;
const result = shallowRef();
watchEffect(() => {
result.value = fn();
}, __spreadProps$6(__spreadValues$9({}, options), {
flush: (_a2 = options == null ? void 0 : options.flush) != null ? _a2 : "sync"
}));
return readonly(result);
}
var _a;
var isClient = typeof window !== "undefined";
var isDef = (val) => typeof val !== "undefined";
var isFunction = (val) => typeof val === "function";
var isString = (val) => typeof val === "string";
var clamp = (n, min, max) => Math.min(max, Math.max(min, n));
var noop = () => {
};
var isIOS = isClient && ((_a = window == null ? void 0 : window.navigator) == null ? void 0 : _a.userAgent) && /iP(ad|hone|od)/.test(window.navigator.userAgent);
function resolveUnref(r) {
return typeof r === "function" ? r() : unref(r);
}
function createFilterWrapper(filter, fn) {
function wrapper(...args) {
return new Promise((resolve, reject) => {
Promise.resolve(filter(() => fn.apply(this, args), { fn, thisArg: this, args })).then(resolve).catch(reject);
});
}
return wrapper;
}
function debounceFilter(ms, options = {}) {
let timer;
let maxTimer;
let lastRejector = noop;
const _clearTimeout = (timer2) => {
clearTimeout(timer2);
lastRejector();
lastRejector = noop;
};
const filter = (invoke) => {
const duration = resolveUnref(ms);
const maxDuration = resolveUnref(options.maxWait);
if (timer)
_clearTimeout(timer);
if (duration <= 0 || maxDuration !== void 0 && maxDuration <= 0) {
if (maxTimer) {
_clearTimeout(maxTimer);
maxTimer = null;
}
return Promise.resolve(invoke());
}
return new Promise((resolve, reject) => {
lastRejector = options.rejectOnCancel ? reject : resolve;
if (maxDuration && !maxTimer) {
maxTimer = setTimeout(() => {
if (timer)
_clearTimeout(timer);
maxTimer = null;
resolve(invoke());
}, maxDuration);
}
timer = setTimeout(() => {
if (maxTimer)
_clearTimeout(maxTimer);
maxTimer = null;
resolve(invoke());
}, duration);
});
};
return filter;
}
function throttleFilter(ms, trailing = true, leading = true, rejectOnCancel = false) {
let lastExec = 0;
let timer;
let isLeading = true;
let lastRejector = noop;
let lastValue;
const clear = () => {
if (timer) {
clearTimeout(timer);
timer = void 0;
lastRejector();
lastRejector = noop;
}
};
const filter = (_invoke) => {
const duration = resolveUnref(ms);
const elapsed = Date.now() - lastExec;
const invoke = () => {
return lastValue = _invoke();
};
clear();
if (duration <= 0) {
lastExec = Date.now();
return invoke();
}
if (elapsed > duration && (leading || !isLeading)) {
lastExec = Date.now();
invoke();
} else if (trailing) {
lastValue = new Promise((resolve, reject) => {
lastRejector = rejectOnCancel ? reject : resolve;
timer = setTimeout(() => {
lastExec = Date.now();
isLeading = true;
resolve(invoke());
clear();
}, Math.max(0, duration - elapsed));
});
}
if (!leading && !timer)
timer = setTimeout(() => isLeading = true, duration);
isLeading = false;
return lastValue;
};
return filter;
}
function identity(arg) {
return arg;
}
function computedWithControl(source, fn) {
let v = void 0;
let track;
let trigger;
const dirty = ref(true);
const update = () => {
dirty.value = true;
trigger();
};
watch(source, update, { flush: "sync" });
const get = isFunction(fn) ? fn : fn.get;
const set2 = isFunction(fn) ? void 0 : fn.set;
const result = customRef((_track, _trigger) => {
track = _track;
trigger = _trigger;
return {
get() {
if (dirty.value) {
v = get();
dirty.value = false;
}
track();
return v;
},
set(v2) {
set2 == null ? void 0 : set2(v2);
}
};
});
if (Object.isExtensible(result))
result.trigger = update;
return result;
}
function tryOnScopeDispose(fn) {
if (getCurrentScope()) {
onScopeDispose(fn);
return true;
}
return false;
}
function toReactive(objectRef) {
if (!isRef(objectRef))
return reactive(objectRef);
const proxy = new Proxy({}, {
get(_, p, receiver) {
return unref(Reflect.get(objectRef.value, p, receiver));
},
set(_, p, value) {
if (isRef(objectRef.value[p]) && !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 reactive(proxy);
}
function reactiveComputed(fn) {
return toReactive(computed(fn));
}
function useDebounceFn(fn, ms = 200, options = {}) {
return createFilterWrapper(debounceFilter(ms, options), fn);
}
function refDebounced(value, ms = 200, options = {}) {
const debounced = ref(value.value);
const updater = useDebounceFn(() => {
debounced.value = value.value;
}, ms, options);
watch(value, () => updater());
return debounced;
}
function useThrottleFn(fn, ms = 200, trailing = false, leading = true, rejectOnCancel = false) {
return createFilterWrapper(throttleFilter(ms, trailing, leading, rejectOnCancel), fn);
}
function tryOnMounted(fn, sync = true) {
if (getCurrentInstance())
onMounted(fn);
else if (sync)
fn();
else
nextTick(fn);
}
function useTimeoutFn(cb, interval, options = {}) {
const {
immediate = true
} = options;
const isPending = ref(false);
let timer = null;
function clear() {
if (timer) {
clearTimeout(timer);
timer = null;
}
}
function stop() {
isPending.value = false;
clear();
}
function start(...args) {
clear();
isPending.value = true;
timer = setTimeout(() => {
isPending.value = false;
timer = null;
cb(...args);
}, resolveUnref(interval));
}
if (immediate) {
isPending.value = true;
if (isClient)
start();
}
tryOnScopeDispose(stop);
return {
isPending: readonly(isPending),
start,
stop
};
}
// ../node_modules/.pnpm/@vueuse+core@9.13.0_vue@3.5.24_typescript@5.9.3_/node_modules/@vueuse/core/index.mjs
function unrefElement(elRef) {
var _a2;
const plain = resolveUnref(elRef);
return (_a2 = plain == null ? void 0 : plain.$el) != null ? _a2 : plain;
}
var defaultWindow = isClient ? window : void 0;
var defaultDocument = isClient ? window.document : void 0;
var defaultNavigator = isClient ? window.navigator : void 0;
var defaultLocation = isClient ? window.location : void 0;
function useEventListener(...args) {
let target;
let events;
let listeners;
let options;
if (isString(args[0]) || Array.isArray(args[0])) {
[events, listeners, options] = args;
target = defaultWindow;
} else {
[target, events, listeners, options] = args;
}
if (!target)
return noop;
if (!Array.isArray(events))
events = [events];
if (!Array.isArray(listeners))
listeners = [listeners];
const cleanups = [];
const cleanup = () => {
cleanups.forEach((fn) => fn());
cleanups.length = 0;
};
const register = (el, event, listener, options2) => {
el.addEventListener(event, listener, options2);
return () => el.removeEventListener(event, listener, options2);
};
const stopWatch = watch(() => [unrefElement(target), resolveUnref(options)], ([el, options2]) => {
cleanup();
if (!el)
return;
cleanups.push(...events.flatMap((event) => {
return listeners.map((listener) => register(el, event, listener, options2));
}));
}, { immediate: true, flush: "post" });
const stop = () => {
stopWatch();
cleanup();
};
tryOnScopeDispose(stop);
return stop;
}
var _iOSWorkaround = false;
function onClickOutside(target, handler, options = {}) {
const { window: window2 = defaultWindow, ignore = [], capture = true, detectIframe = false } = options;
if (!window2)
return;
if (isIOS && !_iOSWorkaround) {
_iOSWorkaround = true;
Array.from(window2.document.body.children).forEach((el) => el.addEventListener("click", noop));
}
let shouldListen = true;
const shouldIgnore = (event) => {
return ignore.some((target2) => {
if (typeof target2 === "string") {
return Array.from(window2.document.querySelectorAll(target2)).some((el) => el === event.target || event.composedPath().includes(el));
} else {
const el = unrefElement(target2);
return el && (event.target === el || event.composedPath().includes(el));
}
});
};
const listener = (event) => {
const el = unrefElement(target);
if (!el || el === event.target || event.composedPath().includes(el))
return;
if (event.detail === 0)
shouldListen = !shouldIgnore(event);
if (!shouldListen) {
shouldListen = true;
return;
}
handler(event);
};
const cleanup = [
useEventListener(window2, "click", listener, { passive: true, capture }),
useEventListener(window2, "pointerdown", (e) => {
const el = unrefElement(target);
if (el)
shouldListen = !e.composedPath().includes(el) && !shouldIgnore(e);
}, { passive: true }),
detectIframe && useEventListener(window2, "blur", (event) => {
var _a2;
const el = unrefElement(target);
if (((_a2 = window2.document.activeElement) == null ? void 0 : _a2.tagName) === "IFRAME" && !(el == null ? void 0 : el.contains(window2.document.activeElement)))
handler(event);
})
].filter(Boolean);
const stop = () => cleanup.forEach((fn) => fn());
return stop;
}
function useActiveElement(options = {}) {
var _a2;
const { window: window2 = defaultWindow } = options;
const document2 = (_a2 = options.document) != null ? _a2 : window2 == null ? void 0 : window2.document;
const activeElement = computedWithControl(() => null, () => document2 == null ? void 0 : document2.activeElement);
if (window2) {
useEventListener(window2, "blur", (event) => {
if (event.relatedTarget !== null)
return;
activeElement.trigger();
}, true);
useEventListener(window2, "focus", activeElement.trigger, true);
}
return activeElement;
}
function useSupported(callback, sync = false) {
const isSupported = ref();
const update = () => isSupported.value = Boolean(callback());
update();
tryOnMounted(update, sync);
return isSupported;
}
function cloneFnJSON(source) {
return JSON.parse(JSON.stringify(source));
}
var _global = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
var globalKey = "__vueuse_ssr_handlers__";
_global[globalKey] = _global[globalKey] || {};
var handlers = _global[globalKey];
function useCssVar(prop, target, { window: window2 = defaultWindow, initialValue = "" } = {}) {
const variable = ref(initialValue);
const elRef = computed(() => {
var _a2;
return unrefElement(target) || ((_a2 = window2 == null ? void 0 : window2.document) == null ? void 0 : _a2.documentElement);
});
watch([elRef, () => resolveUnref(prop)], ([el, prop2]) => {
var _a2;
if (el && window2) {
const value = (_a2 = window2.getComputedStyle(el).getPropertyValue(prop2)) == null ? void 0 : _a2.trim();
variable.value = value || initialValue;
}
}, { immediate: true });
watch(variable, (val) => {
var _a2;
if ((_a2 = elRef.value) == null ? void 0 : _a2.style)
elRef.value.style.setProperty(resolveUnref(prop), val);
});
return variable;
}
function useDocumentVisibility({ document: document2 = defaultDocument } = {}) {
if (!document2)
return ref("visible");
const visibility = ref(document2.visibilityState);
useEventListener(document2, "visibilitychange", () => {
visibility.value = document2.visibilityState;
});
return visibility;
}
var __getOwnPropSymbols$g = Object.getOwnPropertySymbols;
var __hasOwnProp$g = Object.prototype.hasOwnProperty;
var __propIsEnum$g = Object.prototype.propertyIsEnumerable;
var __objRest$2 = (source, exclude) => {
var target = {};
for (var prop in source)
if (__hasOwnProp$g.call(source, prop) && exclude.indexOf(prop) < 0)
target[prop] = source[prop];
if (source != null && __getOwnPropSymbols$g)
for (var prop of __getOwnPropSymbols$g(source)) {
if (exclude.indexOf(prop) < 0 && __propIsEnum$g.call(source, prop))
target[prop] = source[prop];
}
return target;
};
function useResizeObserver(target, callback, options = {}) {
const _a2 = options, { window: window2 = defaultWindow } = _a2, observerOptions = __objRest$2(_a2, ["window"]);
let observer;
const isSupported = useSupported(() => window2 && "ResizeObserver" in window2);
const cleanup = () => {
if (observer) {
observer.disconnect();
observer = void 0;
}
};
const stopWatch = watch(() => unrefElement(target), (el) => {
cleanup();
if (isSupported.value && window2 && el) {
observer = new ResizeObserver(callback);
observer.observe(el, observerOptions);
}
}, { immediate: true, flush: "post" });
const stop = () => {
cleanup();
stopWatch();
};
tryOnScopeDispose(stop);
return {
isSupported,
stop
};
}
function useElementBounding(target, options = {}) {
const {
reset = true,
windowResize = true,
windowScroll = true,
immediate = true
} = options;
const height = ref(0);
const bottom = ref(0);
const left = ref(0);
const right = ref(0);
const top = ref(0);
const width = ref(0);
const x = ref(0);
const y = ref(0);
function update() {
const el = unrefElement(target);
if (!el) {
if (reset) {
height.value = 0;
bottom.value = 0;
left.value = 0;
right.value = 0;
top.value = 0;
width.value = 0;
x.value = 0;
y.value = 0;
}
return;
}
const rect = el.getBoundingClientRect();
height.value = rect.height;
bottom.value = rect.bottom;
left.value = rect.left;
right.value = rect.right;
top.value = rect.top;
width.value = rect.width;
x.value = rect.x;
y.value = rect.y;
}
useResizeObserver(target, update);
watch(() => unrefElement(target), (ele) => !ele && update());
if (windowScroll)
useEventListener("scroll", update, { capture: true, passive: true });
if (windowResize)
useEventListener("resize", update, { passive: true });
tryOnMounted(() => {
if (immediate)
update();
});
return {
height,
bottom,
left,
right,
top,
width,
x,
y,
update
};
}
function useElementSize(target, initialSize = { width: 0, height: 0 }, options = {}) {
const { window: window2 = defaultWindow, box = "content-box" } = options;
const isSVG = computed(() => {
var _a2, _b;
return (_b = (_a2 = unrefElement(target)) == null ? void 0 : _a2.namespaceURI) == null ? void 0 : _b.includes("svg");
});
const width = ref(initialSize.width);
const height = ref(initialSize.height);
useResizeObserver(target, ([entry]) => {
const boxSize = box === "border-box" ? entry.borderBoxSize : box === "content-box" ? entry.contentBoxSize : entry.devicePixelContentBoxSize;
if (window2 && isSVG.value) {
const $elem = unrefElement(target);
if ($elem) {
const styles = window2.getComputedStyle($elem);
width.value = parseFloat(styles.width);
height.value = parseFloat(styles.height);
}
} else {
if (boxSize) {
const formatBoxSize = Array.isArray(boxSize) ? boxSize : [boxSize];
width.value = formatBoxSize.reduce((acc, { inlineSize }) => acc + inlineSize, 0);
height.value = formatBoxSize.reduce((acc, { blockSize }) => acc + blockSize, 0);
} else {
width.value = entry.contentRect.width;
height.value = entry.contentRect.height;
}
}
}, options);
watch(() => unrefElement(target), (ele) => {
width.value = ele ? initialSize.width : 0;
height.value = ele ? initialSize.height : 0;
});
return {
width,
height
};
}
function useIntersectionObserver(target, callback, options = {}) {
const {
root,
rootMargin = "0px",
threshold = 0.1,
window: window2 = defaultWindow
} = options;
const isSupported = useSupported(() => window2 && "IntersectionObserver" in window2);
let cleanup = noop;
const stopWatch = isSupported.value ? watch(() => ({
el: unrefElement(target),
root: unrefElement(root)
}), ({ el, root: root2 }) => {
cleanup();
if (!el)
return;
const observer = new IntersectionObserver(callback, {
root: root2,
rootMargin,
threshold
});
observer.observe(el);
cleanup = () => {
observer.disconnect();
cleanup = noop;
};
}, { immediate: true, flush: "post" }) : noop;
const stop = () => {
cleanup();
stopWatch();
};
tryOnScopeDispose(stop);
return {
isSupported,
stop
};
}
var __getOwnPropSymbols$8 = Object.getOwnPropertySymbols;
var __hasOwnProp$8 = Object.prototype.hasOwnProperty;
var __propIsEnum$8 = Object.prototype.propertyIsEnumerable;
var __objRest$1 = (source, exclude) => {
var target = {};
for (var prop in source)
if (__hasOwnProp$8.call(source, prop) && exclude.indexOf(prop) < 0)
target[prop] = source[prop];
if (source != null && __getOwnPropSymbols$8)
for (var prop of __getOwnPropSymbols$8(source)) {
if (exclude.indexOf(prop) < 0 && __propIsEnum$8.call(source, prop))
target[prop] = source[prop];
}
return target;
};
function useMutationObserver(target, callback, options = {}) {
const _a2 = options, { window: window2 = defaultWindow } = _a2, mutationOptions = __objRest$1(_a2, ["window"]);
let observer;
const isSupported = useSupported(() => window2 && "MutationObserver" in window2);
const cleanup = () => {
if (observer) {
observer.disconnect();
observer = void 0;
}
};
const stopWatch = watch(() => unrefElement(target), (el) => {
cleanup();
if (isSupported.value && window2 && el) {
observer = new MutationObserver(callback);
observer.observe(el, mutationOptions);
}
}, { immediate: true });
const stop = () => {
cleanup();
stopWatch();
};
tryOnScopeDispose(stop);
return {
isSupported,
stop
};
}
var defaultState = {
x: 0,
y: 0,
pointerId: 0,
pressure: 0,
tiltX: 0,
tiltY: 0,
width: 0,
height: 0,
twist: 0,
pointerType: null
};
var keys = Object.keys(defaultState);
var SwipeDirection;
(function(SwipeDirection2) {
SwipeDirection2["UP"] = "UP";
SwipeDirection2["RIGHT"] = "RIGHT";
SwipeDirection2["DOWN"] = "DOWN";
SwipeDirection2["LEFT"] = "LEFT";
SwipeDirection2["NONE"] = "NONE";
})(SwipeDirection || (SwipeDirection = {}));
var __defProp = Object.defineProperty;
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 _TransitionPresets = {
easeInSine: [0.12, 0, 0.39, 0],
easeOutSine: [0.61, 1, 0.88, 1],
easeInOutSine: [0.37, 0, 0.63, 1],
easeInQuad: [0.11, 0, 0.5, 0],
easeOutQuad: [0.5, 1, 0.89, 1],
easeInOutQuad: [0.45, 0, 0.55, 1],
easeInCubic: [0.32, 0, 0.67, 0],
easeOutCubic: [0.33, 1, 0.68, 1],
easeInOutCubic: [0.65, 0, 0.35, 1],
easeInQuart: [0.5, 0, 0.75, 0],
easeOutQuart: [0.25, 1, 0.5, 1],
easeInOutQuart: [0.76, 0, 0.24, 1],
easeInQuint: [0.64, 0, 0.78, 0],
easeOutQuint: [0.22, 1, 0.36, 1],
easeInOutQuint: [0.83, 0, 0.17, 1],
easeInExpo: [0.7, 0, 0.84, 0],
easeOutExpo: [0.16, 1, 0.3, 1],
easeInOutExpo: [0.87, 0, 0.13, 1],
easeInCirc: [0.55, 0, 1, 0.45],
easeOutCirc: [0, 0.55, 0.45, 1],
easeInOutCirc: [0.85, 0, 0.15, 1],
easeInBack: [0.36, 0, 0.66, -0.56],
easeOutBack: [0.34, 1.56, 0.64, 1],
easeInOutBack: [0.68, -0.6, 0.32, 1.6]
};
var TransitionPresets = __spreadValues({
linear: identity
}, _TransitionPresets);
function useVModel(props, key, emit, options = {}) {
var _a2, _b, _c, _d, _e;
const {
clone = false,
passive = false,
eventName,
deep = false,
defaultValue
} = options;
const vm = getCurrentInstance();
const _emit = emit || (vm == null ? void 0 : vm.emit) || ((_a2 = vm == null ? void 0 : vm.$emit) == null ? void 0 : _a2.bind(vm)) || ((_c = (_b = vm == null ? void 0 : vm.proxy) == null ? void 0 : _b.$emit) == null ? void 0 : _c.bind(vm == null ? void 0 : vm.proxy));
let event = eventName;
if (!key) {
if (isVue2) {
const modelOptions = (_e = (_d = vm == null ? void 0 : vm.proxy) == null ? void 0 : _d.$options) == null ? void 0 : _e.model;
key = (modelOptions == null ? void 0 : modelOptions.value) || "value";
if (!eventName)
event = (modelOptions == null ? void 0 : modelOptions.event) || "input";
} else {
key = "modelValue";
}
}
event = eventName || event || `update:${key.toString()}`;
const cloneFn = (val) => !clone ? val : isFunction(clone) ? clone(val) : cloneFnJSON(val);
const getValue = () => isDef(props[key]) ? cloneFn(props[key]) : defaultValue;
if (passive) {
const initialValue = getValue();
const proxy = ref(initialValue);
watch(() => props[key], (v) => proxy.value = cloneFn(v));
watch(proxy, (v) => {
if (v !== props[key] || deep)
_emit(event, v);
}, { deep });
return proxy;
} else {
return computed({
get() {
return getValue();
},
set(value) {
_emit(event, value);
}
});
}
}
function useWindowFocus({ window: window2 = defaultWindow } = {}) {
if (!window2)
return ref(false);
const focused = ref(window2.document.hasFocus());
useEventListener(window2, "blur", () => {
focused.value = false;
});
useEventListener(window2, "focus", () => {
focused.value = true;
});
return focused;
}
function useWindowSize(options = {}) {
const {
window: window2 = defaultWindow,
initialWidth = Infinity,
initialHeight = Infinity,
listenOrientation = true,
includeScrollbar = true
} = options;
const width = ref(initialWidth);
const height = ref(initialHeight);
const update = () => {
if (window2) {
if (includeScrollbar) {
width.value = window2.innerWidth;
height.value = window2.innerHeight;
} else {
width.value = window2.document.documentElement.clientWidth;
height.value = window2.document.documentElement.clientHeight;
}
}
};
update();
tryOnMounted(update);
useEventListener("resize", update, { passive: true });
if (listenOrientation)
useEventListener("orientationchange", update, { passive: true });
return { width, height };
}
export {
computedEager,
isClient,
clamp,
isIOS,
tryOnScopeDispose,
reactiveComputed,
useDebounceFn,
refDebounced,
useThrottleFn,
useTimeoutFn,
unrefElement,
useEventListener,
onClickOutside,
useActiveElement,
useCssVar,
useDocumentVisibility,
useResizeObserver,
useElementBounding,
useElementSize,
useIntersectionObserver,
useMutationObserver,
useVModel,
useWindowFocus,
useWindowSize,
useSizeProp,
useSizeProps,
SIZE_INJECTION_KEY,
useGlobalSize,
formContextKey,
formItemContextKey,
useProp,
useFormSize,
useFormDisabled,
useSize,
useDisabled
};
//# sourceMappingURL=chunk-FYPMSKES.js.map