@vueuse/shared 10.4.0 → 10.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.cjs +83 -51
- package/index.d.cts +79 -44
- package/index.d.mts +79 -44
- package/index.d.ts +79 -44
- package/index.iife.js +83 -51
- package/index.iife.min.js +1 -1
- package/index.mjs +83 -53
- package/package.json +2 -2
package/index.iife.js
CHANGED
|
@@ -118,12 +118,13 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
|
|
|
118
118
|
'use strict';
|
|
119
119
|
|
|
120
120
|
function computedEager(fn, options) {
|
|
121
|
+
var _a;
|
|
121
122
|
const result = vueDemi.shallowRef();
|
|
122
123
|
vueDemi.watchEffect(() => {
|
|
123
124
|
result.value = fn();
|
|
124
125
|
}, {
|
|
125
126
|
...options,
|
|
126
|
-
flush: options
|
|
127
|
+
flush: (_a = options == null ? void 0 : options.flush) != null ? _a : "sync"
|
|
127
128
|
});
|
|
128
129
|
return vueDemi.readonly(result);
|
|
129
130
|
}
|
|
@@ -153,7 +154,7 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
|
|
|
153
154
|
return v;
|
|
154
155
|
},
|
|
155
156
|
set(v2) {
|
|
156
|
-
set
|
|
157
|
+
set == null ? void 0 : set(v2);
|
|
157
158
|
}
|
|
158
159
|
};
|
|
159
160
|
});
|
|
@@ -206,14 +207,39 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
|
|
|
206
207
|
};
|
|
207
208
|
}
|
|
208
209
|
|
|
209
|
-
|
|
210
|
-
|
|
210
|
+
const localProvidedStateMap = /* @__PURE__ */ new WeakMap();
|
|
211
|
+
|
|
212
|
+
const provideLocal = (key, value) => {
|
|
213
|
+
var _a;
|
|
214
|
+
const instance = (_a = vueDemi.getCurrentInstance()) == null ? void 0 : _a.proxy;
|
|
215
|
+
if (instance == null)
|
|
216
|
+
throw new Error("provideLocal must be called in setup");
|
|
217
|
+
if (!localProvidedStateMap.has(instance))
|
|
218
|
+
localProvidedStateMap.set(instance, /* @__PURE__ */ Object.create(null));
|
|
219
|
+
const localProvidedState = localProvidedStateMap.get(instance);
|
|
220
|
+
localProvidedState[key] = value;
|
|
221
|
+
vueDemi.provide(key, value);
|
|
222
|
+
};
|
|
223
|
+
|
|
224
|
+
const injectLocal = (...args) => {
|
|
225
|
+
var _a;
|
|
226
|
+
const key = args[0];
|
|
227
|
+
const instance = (_a = vueDemi.getCurrentInstance()) == null ? void 0 : _a.proxy;
|
|
228
|
+
if (instance == null)
|
|
229
|
+
throw new Error("injectLocal must be called in setup");
|
|
230
|
+
if (localProvidedStateMap.has(instance) && key in localProvidedStateMap.get(instance))
|
|
231
|
+
return localProvidedStateMap.get(instance)[key];
|
|
232
|
+
return vueDemi.inject(...args);
|
|
233
|
+
};
|
|
234
|
+
|
|
235
|
+
function createInjectionState(composable, options) {
|
|
236
|
+
const key = (options == null ? void 0 : options.injectionKey) || Symbol("InjectionState");
|
|
211
237
|
const useProvidingState = (...args) => {
|
|
212
238
|
const state = composable(...args);
|
|
213
|
-
|
|
239
|
+
provideLocal(key, state);
|
|
214
240
|
return state;
|
|
215
241
|
};
|
|
216
|
-
const useInjectedState = () =>
|
|
242
|
+
const useInjectedState = () => injectLocal(key);
|
|
217
243
|
return [useProvidingState, useInjectedState];
|
|
218
244
|
}
|
|
219
245
|
|
|
@@ -303,7 +329,7 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
|
|
|
303
329
|
const resolveUnref = toValue;
|
|
304
330
|
|
|
305
331
|
function reactify(fn, options) {
|
|
306
|
-
const unrefFn = options
|
|
332
|
+
const unrefFn = (options == null ? void 0 : options.computedGetter) === false ? vueDemi.unref : toValue;
|
|
307
333
|
return function(...args) {
|
|
308
334
|
return vueDemi.computed(() => fn.apply(this, args.map((i) => unrefFn(i))));
|
|
309
335
|
};
|
|
@@ -372,9 +398,7 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
|
|
|
372
398
|
function reactiveOmit(obj, ...keys) {
|
|
373
399
|
const flatKeys = keys.flat();
|
|
374
400
|
const predicate = flatKeys[0];
|
|
375
|
-
return reactiveComputed(
|
|
376
|
-
() => typeof predicate === "function" ? Object.fromEntries(Object.entries(vueDemi.toRefs(obj)).filter(([k, v]) => !predicate(toValue(v), k))) : Object.fromEntries(Object.entries(vueDemi.toRefs(obj)).filter((e) => !flatKeys.includes(e[0])))
|
|
377
|
-
);
|
|
401
|
+
return reactiveComputed(() => typeof predicate === "function" ? Object.fromEntries(Object.entries(vueDemi.toRefs(obj)).filter(([k, v]) => !predicate(toValue(v), k))) : Object.fromEntries(Object.entries(vueDemi.toRefs(obj)).filter((e) => !flatKeys.includes(e[0]))));
|
|
378
402
|
}
|
|
379
403
|
|
|
380
404
|
const isClient = typeof window !== "undefined" && typeof document !== "undefined";
|
|
@@ -399,7 +423,8 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
|
|
|
399
423
|
const hasOwn = (val, key) => Object.prototype.hasOwnProperty.call(val, key);
|
|
400
424
|
const isIOS = /* @__PURE__ */ getIsIOS();
|
|
401
425
|
function getIsIOS() {
|
|
402
|
-
|
|
426
|
+
var _a;
|
|
427
|
+
return isClient && ((_a = window == null ? void 0 : window.navigator) == null ? void 0 : _a.userAgent) && /* @__PURE__ */ /iP(ad|hone|od)/.test(window.navigator.userAgent);
|
|
403
428
|
}
|
|
404
429
|
|
|
405
430
|
function createFilterWrapper(filter, fn) {
|
|
@@ -529,9 +554,7 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
|
|
|
529
554
|
};
|
|
530
555
|
}
|
|
531
556
|
const hyphenateRE = /\B([A-Z])/g;
|
|
532
|
-
const hyphenate = cacheStringFunction(
|
|
533
|
-
(str) => str.replace(hyphenateRE, "-$1").toLowerCase()
|
|
534
|
-
);
|
|
557
|
+
const hyphenate = cacheStringFunction((str) => str.replace(hyphenateRE, "-$1").toLowerCase());
|
|
535
558
|
const camelizeRE = /-(\w)/g;
|
|
536
559
|
const camelize = cacheStringFunction((str) => {
|
|
537
560
|
return str.replace(camelizeRE, (_, c) => c ? c.toUpperCase() : "");
|
|
@@ -570,9 +593,10 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
|
|
|
570
593
|
return props.some((k) => k in obj);
|
|
571
594
|
}
|
|
572
595
|
function increaseWithUnit(target, delta) {
|
|
596
|
+
var _a;
|
|
573
597
|
if (typeof target === "number")
|
|
574
598
|
return target + delta;
|
|
575
|
-
const value = target.match(/^-?[0-9]+\.?[0-9]*/)
|
|
599
|
+
const value = ((_a = target.match(/^-?[0-9]+\.?[0-9]*/)) == null ? void 0 : _a[0]) || "";
|
|
576
600
|
const unit = target.slice(value.length);
|
|
577
601
|
const result = Number.parseFloat(value) + delta;
|
|
578
602
|
if (Number.isNaN(result))
|
|
@@ -656,7 +680,8 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
|
|
|
656
680
|
function refDefault(source, defaultValue) {
|
|
657
681
|
return vueDemi.computed({
|
|
658
682
|
get() {
|
|
659
|
-
|
|
683
|
+
var _a;
|
|
684
|
+
return (_a = source.value) != null ? _a : defaultValue;
|
|
660
685
|
},
|
|
661
686
|
set(value) {
|
|
662
687
|
source.value = value;
|
|
@@ -704,13 +729,14 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
|
|
|
704
729
|
return source;
|
|
705
730
|
}
|
|
706
731
|
function set(value, triggering = true) {
|
|
732
|
+
var _a, _b;
|
|
707
733
|
if (value === source)
|
|
708
734
|
return;
|
|
709
735
|
const old = source;
|
|
710
|
-
if (options.onBeforeChange
|
|
736
|
+
if (((_a = options.onBeforeChange) == null ? void 0 : _a.call(options, value, old)) === false)
|
|
711
737
|
return;
|
|
712
738
|
source = value;
|
|
713
|
-
options.onChanged
|
|
739
|
+
(_b = options.onChanged) == null ? void 0 : _b.call(options, value, old);
|
|
714
740
|
if (triggering)
|
|
715
741
|
trigger();
|
|
716
742
|
}
|
|
@@ -781,6 +807,7 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
|
|
|
781
807
|
}
|
|
782
808
|
|
|
783
809
|
function syncRef(left, right, options = {}) {
|
|
810
|
+
var _a, _b;
|
|
784
811
|
const {
|
|
785
812
|
flush = "sync",
|
|
786
813
|
deep = false,
|
|
@@ -789,8 +816,8 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
|
|
|
789
816
|
transform = {}
|
|
790
817
|
} = options;
|
|
791
818
|
const watchers = [];
|
|
792
|
-
const transformLTR = transform.ltr
|
|
793
|
-
const transformRTL = transform.rtl
|
|
819
|
+
const transformLTR = (_a = transform.ltr) != null ? _a : (v) => v;
|
|
820
|
+
const transformRTL = (_b = transform.rtl) != null ? _b : (v) => v;
|
|
794
821
|
if (direction === "both" || direction === "ltr") {
|
|
795
822
|
watchers.push(watchPausable(
|
|
796
823
|
left,
|
|
@@ -844,7 +871,8 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
|
|
|
844
871
|
return objectRef.value[key];
|
|
845
872
|
},
|
|
846
873
|
set(v) {
|
|
847
|
-
|
|
874
|
+
var _a;
|
|
875
|
+
const replaceRef = (_a = toValue(options.replaceRef)) != null ? _a : true;
|
|
848
876
|
if (replaceRef) {
|
|
849
877
|
if (Array.isArray(objectRef.value)) {
|
|
850
878
|
const copy = [...objectRef.value];
|
|
@@ -900,7 +928,7 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
|
|
|
900
928
|
r,
|
|
901
929
|
(v) => {
|
|
902
930
|
if (condition(v) !== isNot) {
|
|
903
|
-
stop
|
|
931
|
+
stop == null ? void 0 : stop();
|
|
904
932
|
resolve(v);
|
|
905
933
|
}
|
|
906
934
|
},
|
|
@@ -914,7 +942,7 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
|
|
|
914
942
|
const promises = [watcher];
|
|
915
943
|
if (timeout != null) {
|
|
916
944
|
promises.push(
|
|
917
|
-
promiseTimeout(timeout, throwOnTimeout).then(() => toValue(r)).finally(() => stop
|
|
945
|
+
promiseTimeout(timeout, throwOnTimeout).then(() => toValue(r)).finally(() => stop == null ? void 0 : stop())
|
|
918
946
|
);
|
|
919
947
|
}
|
|
920
948
|
return Promise.race(promises);
|
|
@@ -922,14 +950,14 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
|
|
|
922
950
|
function toBe(value, options) {
|
|
923
951
|
if (!vueDemi.isRef(value))
|
|
924
952
|
return toMatch((v) => v === value, options);
|
|
925
|
-
const { flush = "sync", deep = false, timeout, throwOnTimeout } = options
|
|
953
|
+
const { flush = "sync", deep = false, timeout, throwOnTimeout } = options != null ? options : {};
|
|
926
954
|
let stop = null;
|
|
927
955
|
const watcher = new Promise((resolve) => {
|
|
928
956
|
stop = vueDemi.watch(
|
|
929
957
|
[r, value],
|
|
930
958
|
([v1, v2]) => {
|
|
931
959
|
if (isNot !== (v1 === v2)) {
|
|
932
|
-
stop
|
|
960
|
+
stop == null ? void 0 : stop();
|
|
933
961
|
resolve(v1);
|
|
934
962
|
}
|
|
935
963
|
},
|
|
@@ -944,7 +972,7 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
|
|
|
944
972
|
if (timeout != null) {
|
|
945
973
|
promises.push(
|
|
946
974
|
promiseTimeout(timeout, throwOnTimeout).then(() => toValue(r)).finally(() => {
|
|
947
|
-
stop
|
|
975
|
+
stop == null ? void 0 : stop();
|
|
948
976
|
return toValue(r);
|
|
949
977
|
})
|
|
950
978
|
);
|
|
@@ -1015,9 +1043,10 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
|
|
|
1015
1043
|
return value === othVal;
|
|
1016
1044
|
}
|
|
1017
1045
|
function useArrayDifference(...args) {
|
|
1046
|
+
var _a;
|
|
1018
1047
|
const list = args[0];
|
|
1019
1048
|
const values = args[1];
|
|
1020
|
-
let compareFn = args[2]
|
|
1049
|
+
let compareFn = (_a = args[2]) != null ? _a : defaultComparator;
|
|
1021
1050
|
if (typeof compareFn === "string") {
|
|
1022
1051
|
const key = compareFn;
|
|
1023
1052
|
compareFn = (value, othVal) => value[key] === othVal[key];
|
|
@@ -1034,11 +1063,9 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
|
|
|
1034
1063
|
}
|
|
1035
1064
|
|
|
1036
1065
|
function useArrayFind(list, fn) {
|
|
1037
|
-
return vueDemi.computed(
|
|
1038
|
-
() => toValue(
|
|
1039
|
-
|
|
1040
|
-
)
|
|
1041
|
-
);
|
|
1066
|
+
return vueDemi.computed(() => toValue(
|
|
1067
|
+
toValue(list).find((element, index, array) => fn(toValue(element), index, array))
|
|
1068
|
+
));
|
|
1042
1069
|
}
|
|
1043
1070
|
|
|
1044
1071
|
function useArrayFindIndex(list, fn) {
|
|
@@ -1054,35 +1081,35 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
|
|
|
1054
1081
|
return void 0;
|
|
1055
1082
|
}
|
|
1056
1083
|
function useArrayFindLast(list, fn) {
|
|
1057
|
-
return vueDemi.computed(
|
|
1058
|
-
() => toValue(
|
|
1059
|
-
|
|
1060
|
-
)
|
|
1061
|
-
);
|
|
1084
|
+
return vueDemi.computed(() => toValue(
|
|
1085
|
+
!Array.prototype.findLast ? findLast(toValue(list), (element, index, array) => fn(toValue(element), index, array)) : toValue(list).findLast((element, index, array) => fn(toValue(element), index, array))
|
|
1086
|
+
));
|
|
1062
1087
|
}
|
|
1063
1088
|
|
|
1064
1089
|
function isArrayIncludesOptions(obj) {
|
|
1065
1090
|
return isObject(obj) && containsProp(obj, "formIndex", "comparator");
|
|
1066
1091
|
}
|
|
1067
1092
|
function useArrayIncludes(...args) {
|
|
1093
|
+
var _a;
|
|
1068
1094
|
const list = args[0];
|
|
1069
1095
|
const value = args[1];
|
|
1070
1096
|
let comparator = args[2];
|
|
1071
1097
|
let formIndex = 0;
|
|
1072
1098
|
if (isArrayIncludesOptions(comparator)) {
|
|
1073
|
-
formIndex = comparator.fromIndex
|
|
1099
|
+
formIndex = (_a = comparator.fromIndex) != null ? _a : 0;
|
|
1074
1100
|
comparator = comparator.comparator;
|
|
1075
1101
|
}
|
|
1076
1102
|
if (typeof comparator === "string") {
|
|
1077
1103
|
const key = comparator;
|
|
1078
1104
|
comparator = (element, value2) => element[key] === toValue(value2);
|
|
1079
1105
|
}
|
|
1080
|
-
comparator = comparator
|
|
1081
|
-
return vueDemi.computed(
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1106
|
+
comparator = comparator != null ? comparator : (element, value2) => element === toValue(value2);
|
|
1107
|
+
return vueDemi.computed(() => toValue(list).slice(formIndex).some((element, index, array) => comparator(
|
|
1108
|
+
toValue(element),
|
|
1109
|
+
toValue(value),
|
|
1110
|
+
index,
|
|
1111
|
+
toValue(array)
|
|
1112
|
+
)));
|
|
1086
1113
|
}
|
|
1087
1114
|
|
|
1088
1115
|
function useArrayJoin(list, separator) {
|
|
@@ -1149,6 +1176,7 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
|
|
|
1149
1176
|
return isLowercase ? m.toLowerCase() : m;
|
|
1150
1177
|
}
|
|
1151
1178
|
function formatDate(date, formatStr, options = {}) {
|
|
1179
|
+
var _a;
|
|
1152
1180
|
const years = date.getFullYear();
|
|
1153
1181
|
const month = date.getMonth();
|
|
1154
1182
|
const days = date.getDate();
|
|
@@ -1157,7 +1185,7 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
|
|
|
1157
1185
|
const seconds = date.getSeconds();
|
|
1158
1186
|
const milliseconds = date.getMilliseconds();
|
|
1159
1187
|
const day = date.getDay();
|
|
1160
|
-
const meridiem = options.customMeridiem
|
|
1188
|
+
const meridiem = (_a = options.customMeridiem) != null ? _a : defaultMeridiem;
|
|
1161
1189
|
const matches = {
|
|
1162
1190
|
YY: () => String(years).slice(-2),
|
|
1163
1191
|
YYYY: () => years,
|
|
@@ -1185,7 +1213,10 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
|
|
|
1185
1213
|
a: () => meridiem(hours, minutes, true),
|
|
1186
1214
|
aa: () => meridiem(hours, minutes, true, true)
|
|
1187
1215
|
};
|
|
1188
|
-
return formatStr.replace(REGEX_FORMAT, (match, $1) =>
|
|
1216
|
+
return formatStr.replace(REGEX_FORMAT, (match, $1) => {
|
|
1217
|
+
var _a2, _b;
|
|
1218
|
+
return (_b = $1 != null ? $1 : (_a2 = matches[match]) == null ? void 0 : _a2.call(matches)) != null ? _b : match;
|
|
1219
|
+
});
|
|
1189
1220
|
}
|
|
1190
1221
|
function normalizeDate(date) {
|
|
1191
1222
|
if (date === null)
|
|
@@ -1283,7 +1314,8 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
|
|
|
1283
1314
|
}
|
|
1284
1315
|
|
|
1285
1316
|
function useLastChanged(source, options = {}) {
|
|
1286
|
-
|
|
1317
|
+
var _a;
|
|
1318
|
+
const ms = vueDemi.ref((_a = options.initialValue) != null ? _a : null);
|
|
1287
1319
|
vueDemi.watch(
|
|
1288
1320
|
source,
|
|
1289
1321
|
() => ms.value = timestamp(),
|
|
@@ -1336,7 +1368,7 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
|
|
|
1336
1368
|
callback
|
|
1337
1369
|
} = options;
|
|
1338
1370
|
const controls = useTimeoutFn(
|
|
1339
|
-
callback
|
|
1371
|
+
callback != null ? callback : noop,
|
|
1340
1372
|
interval,
|
|
1341
1373
|
options
|
|
1342
1374
|
);
|
|
@@ -1395,9 +1427,7 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
|
|
|
1395
1427
|
}
|
|
1396
1428
|
|
|
1397
1429
|
function watchArray(source, cb, options) {
|
|
1398
|
-
let oldList = options
|
|
1399
|
-
...source instanceof Function ? source() : Array.isArray(source) ? source : toValue(source)
|
|
1400
|
-
];
|
|
1430
|
+
let oldList = (options == null ? void 0 : options.immediate) ? [] : [...source instanceof Function ? source() : Array.isArray(source) ? source : toValue(source)];
|
|
1401
1431
|
return vueDemi.watch(source, (newList, _, onCleanup) => {
|
|
1402
1432
|
const oldListRemains = Array.from({ length: oldList.length });
|
|
1403
1433
|
const added = [];
|
|
@@ -1653,6 +1683,7 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
|
|
|
1653
1683
|
exports.identity = identity;
|
|
1654
1684
|
exports.ignorableWatch = watchIgnorable;
|
|
1655
1685
|
exports.increaseWithUnit = increaseWithUnit;
|
|
1686
|
+
exports.injectLocal = injectLocal;
|
|
1656
1687
|
exports.invoke = invoke;
|
|
1657
1688
|
exports.isClient = isClient;
|
|
1658
1689
|
exports.isDef = isDef;
|
|
@@ -1670,6 +1701,7 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
|
|
|
1670
1701
|
exports.pausableFilter = pausableFilter;
|
|
1671
1702
|
exports.pausableWatch = watchPausable;
|
|
1672
1703
|
exports.promiseTimeout = promiseTimeout;
|
|
1704
|
+
exports.provideLocal = provideLocal;
|
|
1673
1705
|
exports.rand = rand;
|
|
1674
1706
|
exports.reactify = reactify;
|
|
1675
1707
|
exports.reactifyObject = reactifyObject;
|
package/index.iife.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var VueDemi=function(c,u,C){if(c.install)return c;if(!u)return console.error("[vue-demi] no Vue instance found, please be sure to import `vue` before `vue-demi`."),c;if(u.version.slice(0,4)==="2.7."){let w=function(A,S){var O,E={},U={config:u.config,use:u.use.bind(u),mixin:u.mixin.bind(u),component:u.component.bind(u),provide:function(T,F){return E[T]=F,this},directive:function(T,F){return F?(u.directive(T,F),U):u.directive(T)},mount:function(T,F){return O||(O=new u(Object.assign({propsData:S},A,{provide:Object.assign(E,A.provide)})),O.$mount(T,F),O)},unmount:function(){O&&(O.$destroy(),O=void 0)}};return U};var v=w;for(var b in u)c[b]=u[b];c.isVue2=!0,c.isVue3=!1,c.install=function(){},c.Vue=u,c.Vue2=u,c.version=u.version,c.warn=u.util.warn,c.hasInjectionContext=()=>!!c.getCurrentInstance(),c.createApp=w}else if(u.version.slice(0,2)==="2.")if(C){for(var b in C)c[b]=C[b];c.isVue2=!0,c.isVue3=!1,c.install=function(){},c.Vue=u,c.Vue2=u,c.version=u.version,c.hasInjectionContext=()=>!!c.getCurrentInstance()}else console.error("[vue-demi] no VueCompositionAPI instance found, please be sure to import `@vue/composition-api` before `vue-demi`.");else if(u.version.slice(0,2)==="3."){for(var b in u)c[b]=u[b];c.isVue2=!1,c.isVue3=!0,c.install=function(){},c.Vue=u,c.Vue2=void 0,c.version=u.version,c.set=function(w,A,S){return Array.isArray(w)?(w.length=Math.max(w.length,A),w.splice(A,1,S),S):(w[A]=S,S)},c.del=function(w,A){if(Array.isArray(w)){w.splice(A,1);return}delete w[A]}}else console.error("[vue-demi] Vue version "+u.version+" is unsupported.");return c}(this.VueDemi=this.VueDemi||(typeof VueDemi<"u"?VueDemi:{}),this.Vue||(typeof Vue<"u"?Vue:void 0),this.VueCompositionAPI||(typeof VueCompositionAPI<"u"?VueCompositionAPI:void 0));(function(c,u){"use strict";function C(t,e){const n=u.shallowRef();return u.watchEffect(()=>{n.value=t()},{...e,flush:e?.flush??"sync"}),u.readonly(n)}function b(t,e){let n,r,o;const i=u.ref(!0),a=()=>{i.value=!0,o()};u.watch(t,a,{flush:"sync"});const l=typeof e=="function"?e:e.get,h=typeof e=="function"?void 0:e.set,g=u.customRef((y,f)=>(r=y,o=f,{get(){return i.value&&(n=l(),i.value=!1),r(),n},set(d){h?.(d)}}));return Object.isExtensible(g)&&(g.trigger=a),g}function v(t){return u.getCurrentScope()?(u.onScopeDispose(t),!0):!1}function w(){const t=new Set,e=o=>{t.delete(o)};return{on:o=>{t.add(o);const i=()=>e(o);return v(i),{off:i}},off:e,trigger:o=>Promise.all(Array.from(t).map(i=>i(o)))}}function A(t){let e=!1,n;const r=u.effectScope(!0);return(...o)=>(e||(n=r.run(()=>t(...o)),e=!0),n)}function S(t){const e=Symbol("InjectionState");return[(...o)=>{const i=t(...o);return u.provide(e,i),i},()=>u.inject(e)]}function O(t){let e=0,n,r;const o=()=>{e-=1,r&&e<=0&&(r.stop(),n=void 0,r=void 0)};return(...i)=>(e+=1,n||(r=u.effectScope(!0),n=r.run(()=>t(...i))),v(o),n)}function E(t,e,{enumerable:n=!1,unwrap:r=!0}={}){if(!u.isVue3&&!u.version.startsWith("2.7.")){if(process.env.NODE_ENV!=="production")throw new Error("[VueUse] extendRef only works in Vue 2.7 or above.");return}for(const[o,i]of Object.entries(e))o!=="value"&&(u.isRef(i)&&r?Object.defineProperty(t,o,{get(){return i.value},set(a){i.value=a},enumerable:n}):Object.defineProperty(t,o,{value:i,enumerable:n}));return t}function U(t,e){return e==null?u.unref(t):u.unref(t)[e]}function T(t){return u.unref(t)!=null}function F(t,e){if(typeof Symbol<"u"){const n={...t};return Object.defineProperty(n,Symbol.iterator,{enumerable:!1,value(){let r=0;return{next:()=>({value:e[r++],done:r>e.length})}}}),n}else return Object.assign([...e],t)}function s(t){return typeof t=="function"?t():u.unref(t)}const yt=s;function $(t,e){const n=e?.computedGetter===!1?u.unref:s;return function(...r){return u.computed(()=>t.apply(this,r.map(o=>n(o))))}}function gt(t,e={}){let n=[],r;if(Array.isArray(e))n=e;else{r=e;const{includeOwnProperties:o=!0}=e;n.push(...Object.keys(t)),o&&n.push(...Object.getOwnPropertyNames(t))}return Object.fromEntries(n.map(o=>{const i=t[o];return[o,typeof i=="function"?$(i.bind(t),r):i]}))}function V(t){if(!u.isRef(t))return u.reactive(t);const e=new Proxy({},{get(n,r,o){return u.unref(Reflect.get(t.value,r,o))},set(n,r,o){return u.isRef(t.value[r])&&!u.isRef(o)?t.value[r].value=o:t.value[r]=o,!0},deleteProperty(n,r){return Reflect.deleteProperty(t.value,r)},has(n,r){return Reflect.has(t.value,r)},ownKeys(){return Object.keys(t.value)},getOwnPropertyDescriptor(){return{enumerable:!0,configurable:!0}}});return u.reactive(e)}function H(t){return V(u.computed(t))}function mt(t,...e){const n=e.flat(),r=n[0];return H(()=>Object.fromEntries(typeof r=="function"?Object.entries(u.toRefs(t)).filter(([o,i])=>!r(s(i),o)):Object.entries(u.toRefs(t)).filter(o=>!n.includes(o[0]))))}const k=typeof window<"u"&&typeof document<"u",pt=t=>typeof t<"u",wt=t=>t!=null,bt=(t,...e)=>{t||console.warn(...e)},At=Object.prototype.toString,x=t=>At.call(t)==="[object Object]",Ot=()=>Date.now(),D=()=>+Date.now(),vt=(t,e,n)=>Math.min(n,Math.max(e,t)),I=()=>{},St=(t,e)=>(t=Math.ceil(t),e=Math.floor(e),Math.floor(Math.random()*(e-t+1))+t),Tt=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),Ft=It();function It(){return k&&window?.navigator?.userAgent&&/iP(ad|hone|od)/.test(window.navigator.userAgent)}function N(t,e){function n(...r){return new Promise((o,i)=>{Promise.resolve(t(()=>e.apply(this,r),{fn:e,thisArg:this,args:r})).then(o).catch(i)})}return n}const W=t=>t();function Y(t,e={}){let n,r,o=I;const i=l=>{clearTimeout(l),o(),o=I};return l=>{const h=s(t),g=s(e.maxWait);return n&&i(n),h<=0||g!==void 0&&g<=0?(r&&(i(r),r=null),Promise.resolve(l())):new Promise((y,f)=>{o=e.rejectOnCancel?f:y,g&&!r&&(r=setTimeout(()=>{n&&i(n),r=null,y(l())},g)),n=setTimeout(()=>{r&&i(r),r=null,y(l())},h)})}}function G(t,e=!0,n=!0,r=!1){let o=0,i,a=!0,l=I,h;const g=()=>{i&&(clearTimeout(i),i=void 0,l(),l=I)};return f=>{const d=s(t),m=Date.now()-o,p=()=>h=f();return g(),d<=0?(o=Date.now(),p()):(m>d&&(n||!a)?(o=Date.now(),p()):e&&(h=new Promise((P,R)=>{l=r?R:P,i=setTimeout(()=>{o=Date.now(),a=!0,P(p()),g()},Math.max(0,d-m))})),!n&&!i&&(i=setTimeout(()=>a=!0,d)),a=!1,h)}}function tt(t=W){const e=u.ref(!0);function n(){e.value=!1}function r(){e.value=!0}const o=(...i)=>{e.value&&t(...i)};return{isActive:u.readonly(e),pause:n,resume:r,eventFilter:o}}const Pt={mounted:u.isVue3?"mounted":"inserted",updated:u.isVue3?"updated":"componentUpdated",unmounted:u.isVue3?"unmounted":"unbind"};function et(t){const e=Object.create(null);return n=>e[n]||(e[n]=t(n))}const Rt=/\B([A-Z])/g,Ct=et(t=>t.replace(Rt,"-$1").toLowerCase()),Mt=/-(\w)/g,Et=et(t=>t.replace(Mt,(e,n)=>n?n.toUpperCase():""));function z(t,e=!1,n="Timeout"){return new Promise((r,o)=>{setTimeout(e?()=>o(n):r,t)})}function kt(t){return t}function Nt(t){let e;function n(){return e||(e=t()),e}return n.reset=async()=>{const r=e;e=void 0,r&&await r},n}function jt(t){return t()}function nt(t,...e){return e.some(n=>n in t)}function Ut(t,e){if(typeof t=="number")return t+e;const n=t.match(/^-?[0-9]+\.?[0-9]*/)?.[0]||"",r=t.slice(n.length),o=Number.parseFloat(n)+e;return Number.isNaN(o)?t:o+r}function Wt(t,e,n=!1){return e.reduce((r,o)=>(o in t&&(!n||t[o]!==void 0)&&(r[o]=t[o]),r),{})}function Lt(t,e,n=!1){return Object.fromEntries(Object.entries(t).filter(([r,o])=>(!n||o!==void 0)&&!e.includes(r)))}function _t(t){return Object.entries(t)}function q(...t){if(t.length!==1)return u.toRef(...t);const e=t[0];return typeof e=="function"?u.readonly(u.customRef(()=>({get:e,set:I}))):u.ref(e)}const Bt=q;function $t(t,...e){const n=e.flat(),r=n[0];return H(()=>Object.fromEntries(typeof r=="function"?Object.entries(u.toRefs(t)).filter(([o,i])=>r(s(i),o)):n.map(o=>[o,q(t,o)])))}function rt(t,e=1e4){return u.customRef((n,r)=>{let o=s(t),i;const a=()=>setTimeout(()=>{o=s(t),r()},s(e));return v(()=>{clearTimeout(i)}),{get(){return n(),o},set(l){o=l,r(),clearTimeout(i),i=a()}}})}function ot(t,e=200,n={}){return N(Y(e,n),t)}function Z(t,e=200,n={}){const r=u.ref(t.value),o=ot(()=>{r.value=t.value},e,n);return u.watch(t,()=>o()),r}function Ht(t,e){return u.computed({get(){return t.value??e},set(n){t.value=n}})}function ct(t,e=200,n=!1,r=!0,o=!1){return N(G(e,n,r,o),t)}function J(t,e=200,n=!0,r=!0){if(e<=0)return t;const o=u.ref(t.value),i=ct(()=>{o.value=t.value},e,n,r);return u.watch(t,()=>i()),o}function ut(t,e={}){let n=t,r,o;const i=u.customRef((d,m)=>(r=d,o=m,{get(){return a()},set(p){l(p)}}));function a(d=!0){return d&&r(),n}function l(d,m=!0){if(d===n)return;const p=n;e.onBeforeChange?.(d,p)!==!1&&(n=d,e.onChanged?.(d,p),m&&o())}return E(i,{get:a,set:l,untrackedGet:()=>a(!1),silentSet:d=>l(d,!1),peek:()=>a(!1),lay:d=>l(d,!1)},{enumerable:!0})}const Yt=ut;function Gt(...t){if(t.length===2){const[e,n]=t;e.value=n}if(t.length===3)if(u.isVue2)u.set(...t);else{const[e,n,r]=t;e[n]=r}}function j(t,e,n={}){const{eventFilter:r=W,...o}=n;return u.watch(t,N(r,e),o)}function L(t,e,n={}){const{eventFilter:r,...o}=n,{eventFilter:i,pause:a,resume:l,isActive:h}=tt(r);return{stop:j(t,e,{...o,eventFilter:i}),pause:a,resume:l,isActive:h}}function zt(t,e,n={}){const{flush:r="sync",deep:o=!1,immediate:i=!0,direction:a="both",transform:l={}}=n,h=[],g=l.ltr??(d=>d),y=l.rtl??(d=>d);return(a==="both"||a==="ltr")&&h.push(L(t,d=>{h.forEach(m=>m.pause()),e.value=g(d),h.forEach(m=>m.resume())},{flush:r,deep:o,immediate:i})),(a==="both"||a==="rtl")&&h.push(L(e,d=>{h.forEach(m=>m.pause()),t.value=y(d),h.forEach(m=>m.resume())},{flush:r,deep:o,immediate:i})),()=>{h.forEach(d=>d.stop())}}function qt(t,e,n={}){const{flush:r="sync",deep:o=!1,immediate:i=!0}=n;return Array.isArray(e)||(e=[e]),u.watch(t,a=>e.forEach(l=>l.value=a),{flush:r,deep:o,immediate:i})}function Zt(t,e={}){if(!u.isRef(t))return u.toRefs(t);const n=Array.isArray(t.value)?Array.from({length:t.value.length}):{};for(const r in t.value)n[r]=u.customRef(()=>({get(){return t.value[r]},set(o){if(s(e.replaceRef)??!0)if(Array.isArray(t.value)){const a=[...t.value];a[r]=o,t.value=a}else{const a={...t.value,[r]:o};Object.setPrototypeOf(a,Object.getPrototypeOf(t.value)),t.value=a}else t.value[r]=o}}));return n}function Jt(t,e=!0){u.getCurrentInstance()?u.onBeforeMount(t):e?t():u.nextTick(t)}function Xt(t){u.getCurrentInstance()&&u.onBeforeUnmount(t)}function Kt(t,e=!0){u.getCurrentInstance()?u.onMounted(t):e?t():u.nextTick(t)}function Qt(t){u.getCurrentInstance()&&u.onUnmounted(t)}function X(t,e=!1){function n(f,{flush:d="sync",deep:m=!1,timeout:p,throwOnTimeout:P}={}){let R=null;const Q=[new Promise(B=>{R=u.watch(t,M=>{f(M)!==e&&(R?.(),B(M))},{flush:d,deep:m,immediate:!0})})];return p!=null&&Q.push(z(p,P).then(()=>s(t)).finally(()=>R?.())),Promise.race(Q)}function r(f,d){if(!u.isRef(f))return n(M=>M===f,d);const{flush:m="sync",deep:p=!1,timeout:P,throwOnTimeout:R}=d??{};let _=null;const B=[new Promise(M=>{_=u.watch([t,f],([ht,Ue])=>{e!==(ht===Ue)&&(_?.(),M(ht))},{flush:m,deep:p,immediate:!0})})];return P!=null&&B.push(z(P,R).then(()=>s(t)).finally(()=>(_?.(),s(t)))),Promise.race(B)}function o(f){return n(d=>!!d,f)}function i(f){return r(null,f)}function a(f){return r(void 0,f)}function l(f){return n(Number.isNaN,f)}function h(f,d){return n(m=>{const p=Array.from(m);return p.includes(f)||p.includes(s(f))},d)}function g(f){return y(1,f)}function y(f=1,d){let m=-1;return n(()=>(m+=1,m>=f),d)}return Array.isArray(s(t))?{toMatch:n,toContains:h,changed:g,changedTimes:y,get not(){return X(t,!e)}}:{toMatch:n,toBe:r,toBeTruthy:o,toBeNull:i,toBeNaN:l,toBeUndefined:a,changed:g,changedTimes:y,get not(){return X(t,!e)}}}function Vt(t){return X(t)}function xt(t,e){return t===e}function Dt(...t){const e=t[0],n=t[1];let r=t[2]??xt;if(typeof r=="string"){const o=r;r=(i,a)=>i[o]===a[o]}return u.computed(()=>s(e).filter(o=>s(n).findIndex(i=>r(o,i))===-1))}function te(t,e){return u.computed(()=>s(t).every((n,r,o)=>e(s(n),r,o)))}function ee(t,e){return u.computed(()=>s(t).map(n=>s(n)).filter(e))}function ne(t,e){return u.computed(()=>s(s(t).find((n,r,o)=>e(s(n),r,o))))}function re(t,e){return u.computed(()=>s(t).findIndex((n,r,o)=>e(s(n),r,o)))}function oe(t,e){let n=t.length;for(;n-- >0;)if(e(t[n],n,t))return t[n]}function ce(t,e){return u.computed(()=>s(Array.prototype.findLast?s(t).findLast((n,r,o)=>e(s(n),r,o)):oe(s(t),(n,r,o)=>e(s(n),r,o))))}function ue(t){return x(t)&&nt(t,"formIndex","comparator")}function ie(...t){const e=t[0],n=t[1];let r=t[2],o=0;if(ue(r)&&(o=r.fromIndex??0,r=r.comparator),typeof r=="string"){const i=r;r=(a,l)=>a[i]===s(l)}return r=r??((i,a)=>i===s(a)),u.computed(()=>s(e).slice(o).some((i,a,l)=>r(s(i),s(n),a,s(l))))}function ae(t,e){return u.computed(()=>s(t).map(n=>s(n)).join(s(e)))}function se(t,e){return u.computed(()=>s(t).map(n=>s(n)).map(e))}function le(t,e,...n){const r=(o,i,a)=>e(s(o),s(i),a);return u.computed(()=>{const o=s(t);return n.length?o.reduce(r,s(n[0])):o.reduce(r)})}function fe(t,e){return u.computed(()=>s(t).some((n,r,o)=>e(s(n),r,o)))}function de(t){return Array.from(new Set(t))}function he(t,e){return t.reduce((n,r)=>(n.some(o=>e(r,o,t))||n.push(r),n),[])}function ye(t,e){return u.computed(()=>{const n=s(t).map(r=>s(r));return e?he(n,e):de(n)})}function ge(t=0,e={}){let n=u.unref(t);const r=u.ref(t),{max:o=Number.POSITIVE_INFINITY,min:i=Number.NEGATIVE_INFINITY}=e,a=(f=1)=>r.value=Math.min(o,r.value+f),l=(f=1)=>r.value=Math.max(i,r.value-f),h=()=>r.value,g=f=>r.value=Math.max(i,Math.min(o,f));return{count:r,inc:a,dec:l,get:h,set:g,reset:(f=n)=>(n=f,g(f))}}const me=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,pe=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a{1,2}|A{1,2}|m{1,2}|s{1,2}|Z{1,2}|SSS/g;function we(t,e,n,r){let o=t<12?"AM":"PM";return r&&(o=o.split("").reduce((i,a)=>i+=`${a}.`,"")),n?o.toLowerCase():o}function it(t,e,n={}){const r=t.getFullYear(),o=t.getMonth(),i=t.getDate(),a=t.getHours(),l=t.getMinutes(),h=t.getSeconds(),g=t.getMilliseconds(),y=t.getDay(),f=n.customMeridiem??we,d={YY:()=>String(r).slice(-2),YYYY:()=>r,M:()=>o+1,MM:()=>`${o+1}`.padStart(2,"0"),MMM:()=>t.toLocaleDateString(n.locales,{month:"short"}),MMMM:()=>t.toLocaleDateString(n.locales,{month:"long"}),D:()=>String(i),DD:()=>`${i}`.padStart(2,"0"),H:()=>String(a),HH:()=>`${a}`.padStart(2,"0"),h:()=>`${a%12||12}`.padStart(1,"0"),hh:()=>`${a%12||12}`.padStart(2,"0"),m:()=>String(l),mm:()=>`${l}`.padStart(2,"0"),s:()=>String(h),ss:()=>`${h}`.padStart(2,"0"),SSS:()=>`${g}`.padStart(3,"0"),d:()=>y,dd:()=>t.toLocaleDateString(n.locales,{weekday:"narrow"}),ddd:()=>t.toLocaleDateString(n.locales,{weekday:"short"}),dddd:()=>t.toLocaleDateString(n.locales,{weekday:"long"}),A:()=>f(a,l),AA:()=>f(a,l,!1,!0),a:()=>f(a,l,!0),aa:()=>f(a,l,!0,!0)};return e.replace(pe,(m,p)=>p??d[m]?.()??m)}function at(t){if(t===null)return new Date(Number.NaN);if(t===void 0)return new Date;if(t instanceof Date)return new Date(t);if(typeof t=="string"&&!/Z$/i.test(t)){const e=t.match(me);if(e){const n=e[2]-1||0,r=(e[7]||"0").substring(0,3);return new Date(e[1],n,e[3]||1,e[4]||0,e[5]||0,e[6]||0,r)}}return new Date(t)}function be(t,e="HH:mm:ss",n={}){return u.computed(()=>it(at(s(t)),s(e),n))}function st(t,e=1e3,n={}){const{immediate:r=!0,immediateCallback:o=!1}=n;let i=null;const a=u.ref(!1);function l(){i&&(clearInterval(i),i=null)}function h(){a.value=!1,l()}function g(){const y=s(e);y<=0||(a.value=!0,o&&t(),l(),i=setInterval(t,y))}if(r&&k&&g(),u.isRef(e)||typeof e=="function"){const y=u.watch(e,()=>{a.value&&k&&g()});v(y)}return v(h),{isActive:a,pause:h,resume:g}}function Ae(t=1e3,e={}){const{controls:n=!1,immediate:r=!0,callback:o}=e,i=u.ref(0),a=()=>i.value+=1,l=()=>{i.value=0},h=st(o?()=>{a(),o(i.value)}:a,t,{immediate:r});return n?{counter:i,reset:l,...h}:i}function Oe(t,e={}){const n=u.ref(e.initialValue??null);return u.watch(t,()=>n.value=D(),e),n}function lt(t,e,n={}){const{immediate:r=!0}=n,o=u.ref(!1);let i=null;function a(){i&&(clearTimeout(i),i=null)}function l(){o.value=!1,a()}function h(...g){a(),o.value=!0,i=setTimeout(()=>{o.value=!1,i=null,t(...g)},s(e))}return r&&(o.value=!0,k&&h()),v(l),{isPending:u.readonly(o),start:h,stop:l}}function ve(t=1e3,e={}){const{controls:n=!1,callback:r}=e,o=lt(r??I,t,e),i=u.computed(()=>!o.isPending.value);return n?{ready:i,...o}:i}function Se(t,e={}){const{method:n="parseFloat",radix:r,nanToZero:o}=e;return u.computed(()=>{let i=s(t);return typeof i=="string"&&(i=Number[n](i,r)),o&&Number.isNaN(i)&&(i=0),i})}function Te(t){return u.computed(()=>`${s(t)}`)}function Fe(t=!1,e={}){const{truthyValue:n=!0,falsyValue:r=!1}=e,o=u.isRef(t),i=u.ref(t);function a(l){if(arguments.length)return i.value=l,i.value;{const h=s(n);return i.value=i.value===h?s(r):h,i.value}}return o?a:[i,a]}function Ie(t,e,n){let r=n?.immediate?[]:[...t instanceof Function?t():Array.isArray(t)?t:s(t)];return u.watch(t,(o,i,a)=>{const l=Array.from({length:r.length}),h=[];for(const y of o){let f=!1;for(let d=0;d<r.length;d++)if(!l[d]&&y===r[d]){l[d]=!0,f=!0;break}f||h.push(y)}const g=r.filter((y,f)=>!l[f]);e(o,r,h,g,a),r=[...o]},n)}function Pe(t,e,n){const{count:r,...o}=n,i=u.ref(0),a=j(t,(...l)=>{i.value+=1,i.value>=s(r)&&u.nextTick(()=>a()),e(...l)},o);return{count:i,stop:a}}function ft(t,e,n={}){const{debounce:r=0,maxWait:o=void 0,...i}=n;return j(t,e,{...i,eventFilter:Y(r,{maxWait:o})})}function Re(t,e,n){return u.watch(t,e,{...n,deep:!0})}function K(t,e,n={}){const{eventFilter:r=W,...o}=n,i=N(r,e);let a,l,h;if(o.flush==="sync"){const g=u.ref(!1);l=()=>{},a=y=>{g.value=!0,y(),g.value=!1},h=u.watch(t,(...y)=>{g.value||i(...y)},o)}else{const g=[],y=u.ref(0),f=u.ref(0);l=()=>{y.value=f.value},g.push(u.watch(t,()=>{f.value++},{...o,flush:"sync"})),a=d=>{const m=f.value;d(),y.value+=f.value-m},g.push(u.watch(t,(...d)=>{const m=y.value>0&&y.value===f.value;y.value=0,f.value=0,!m&&i(...d)},o)),h=()=>{g.forEach(d=>d())}}return{stop:h,ignoreUpdates:a,ignorePrevAsyncUpdates:l}}function Ce(t,e,n){return u.watch(t,e,{...n,immediate:!0})}function Me(t,e,n){const r=u.watch(t,(...o)=>(u.nextTick(()=>r()),e(...o)),n)}function dt(t,e,n={}){const{throttle:r=0,trailing:o=!0,leading:i=!0,...a}=n;return j(t,e,{...a,eventFilter:G(r,o,i)})}function Ee(t,e,n={}){let r;function o(){if(!r)return;const y=r;r=void 0,y()}function i(y){r=y}const a=(y,f)=>(o(),e(y,f,i)),l=K(t,a,n),{ignoreUpdates:h}=l;return{...l,trigger:()=>{let y;return h(()=>{y=a(ke(t),Ne(t))}),y}}}function ke(t){return u.isReactive(t)?t:Array.isArray(t)?t.map(e=>s(e)):s(t)}function Ne(t){return Array.isArray(t)?t.map(()=>{}):void 0}function je(t,e,n){return u.watch(t,(r,o,i)=>{r&&e(r,o,i)},n)}c.assert=bt,c.autoResetRef=rt,c.bypassFilter=W,c.camelize=Et,c.clamp=vt,c.computedEager=C,c.computedWithControl=b,c.containsProp=nt,c.controlledComputed=b,c.controlledRef=Yt,c.createEventHook=w,c.createFilterWrapper=N,c.createGlobalState=A,c.createInjectionState=S,c.createReactiveFn=$,c.createSharedComposable=O,c.createSingletonPromise=Nt,c.debounceFilter=Y,c.debouncedRef=Z,c.debouncedWatch=ft,c.directiveHooks=Pt,c.eagerComputed=C,c.extendRef=E,c.formatDate=it,c.get=U,c.hasOwn=Tt,c.hyphenate=Ct,c.identity=kt,c.ignorableWatch=K,c.increaseWithUnit=Ut,c.invoke=jt,c.isClient=k,c.isDef=pt,c.isDefined=T,c.isIOS=Ft,c.isObject=x,c.makeDestructurable=F,c.noop=I,c.normalizeDate=at,c.notNullish=wt,c.now=Ot,c.objectEntries=_t,c.objectOmit=Lt,c.objectPick=Wt,c.pausableFilter=tt,c.pausableWatch=L,c.promiseTimeout=z,c.rand=St,c.reactify=$,c.reactifyObject=gt,c.reactiveComputed=H,c.reactiveOmit=mt,c.reactivePick=$t,c.refAutoReset=rt,c.refDebounced=Z,c.refDefault=Ht,c.refThrottled=J,c.refWithControl=ut,c.resolveRef=Bt,c.resolveUnref=yt,c.set=Gt,c.syncRef=zt,c.syncRefs=qt,c.throttleFilter=G,c.throttledRef=J,c.throttledWatch=dt,c.timestamp=D,c.toReactive=V,c.toRef=q,c.toRefs=Zt,c.toValue=s,c.tryOnBeforeMount=Jt,c.tryOnBeforeUnmount=Xt,c.tryOnMounted=Kt,c.tryOnScopeDispose=v,c.tryOnUnmounted=Qt,c.until=Vt,c.useArrayDifference=Dt,c.useArrayEvery=te,c.useArrayFilter=ee,c.useArrayFind=ne,c.useArrayFindIndex=re,c.useArrayFindLast=ce,c.useArrayIncludes=ie,c.useArrayJoin=ae,c.useArrayMap=se,c.useArrayReduce=le,c.useArraySome=fe,c.useArrayUnique=ye,c.useCounter=ge,c.useDateFormat=be,c.useDebounce=Z,c.useDebounceFn=ot,c.useInterval=Ae,c.useIntervalFn=st,c.useLastChanged=Oe,c.useThrottle=J,c.useThrottleFn=ct,c.useTimeout=ve,c.useTimeoutFn=lt,c.useToNumber=Se,c.useToString=Te,c.useToggle=Fe,c.watchArray=Ie,c.watchAtMost=Pe,c.watchDebounced=ft,c.watchDeep=Re,c.watchIgnorable=K,c.watchImmediate=Ce,c.watchOnce=Me,c.watchPausable=L,c.watchThrottled=dt,c.watchTriggerable=Ee,c.watchWithFilter=j,c.whenever=je})(this.VueUse=this.VueUse||{},VueDemi);
|
|
1
|
+
var VueDemi=function(c,u,R){if(c.install)return c;if(!u)return console.error("[vue-demi] no Vue instance found, please be sure to import `vue` before `vue-demi`."),c;if(u.version.slice(0,4)==="2.7."){let b=function(S,A){var T,_={},L={config:u.config,use:u.use.bind(u),mixin:u.mixin.bind(u),component:u.component.bind(u),provide:function(C,I){return _[C]=I,this},directive:function(C,I){return I?(u.directive(C,I),L):u.directive(C)},mount:function(C,I){return T||(T=new u(Object.assign({propsData:A},S,{provide:Object.assign(_,S.provide)})),T.$mount(C,I),T)},unmount:function(){T&&(T.$destroy(),T=void 0)}};return L};var P=b;for(var O in u)c[O]=u[O];c.isVue2=!0,c.isVue3=!1,c.install=function(){},c.Vue=u,c.Vue2=u,c.version=u.version,c.warn=u.util.warn,c.hasInjectionContext=()=>!!c.getCurrentInstance(),c.createApp=b}else if(u.version.slice(0,2)==="2.")if(R){for(var O in R)c[O]=R[O];c.isVue2=!0,c.isVue3=!1,c.install=function(){},c.Vue=u,c.Vue2=u,c.version=u.version,c.hasInjectionContext=()=>!!c.getCurrentInstance()}else console.error("[vue-demi] no VueCompositionAPI instance found, please be sure to import `@vue/composition-api` before `vue-demi`.");else if(u.version.slice(0,2)==="3."){for(var O in u)c[O]=u[O];c.isVue2=!1,c.isVue3=!0,c.install=function(){},c.Vue=u,c.Vue2=void 0,c.version=u.version,c.set=function(b,S,A){return Array.isArray(b)?(b.length=Math.max(b.length,S),b.splice(S,1,A),A):(b[S]=A,A)},c.del=function(b,S){if(Array.isArray(b)){b.splice(S,1);return}delete b[S]}}else console.error("[vue-demi] Vue version "+u.version+" is unsupported.");return c}(this.VueDemi=this.VueDemi||(typeof VueDemi<"u"?VueDemi:{}),this.Vue||(typeof Vue<"u"?Vue:void 0),this.VueCompositionAPI||(typeof VueCompositionAPI<"u"?VueCompositionAPI:void 0));(function(c,u){"use strict";function R(t,e){var n;const r=u.shallowRef();return u.watchEffect(()=>{r.value=t()},{...e,flush:(n=e?.flush)!=null?n:"sync"}),u.readonly(r)}function O(t,e){let n,r,o;const a=u.ref(!0),i=()=>{a.value=!0,o()};u.watch(t,i,{flush:"sync"});const l=typeof e=="function"?e:e.get,d=typeof e=="function"?void 0:e.set,g=u.customRef((h,f)=>(r=h,o=f,{get(){return a.value&&(n=l(),a.value=!1),r(),n},set(y){d?.(y)}}));return Object.isExtensible(g)&&(g.trigger=i),g}function P(t){return u.getCurrentScope()?(u.onScopeDispose(t),!0):!1}function b(){const t=new Set,e=o=>{t.delete(o)};return{on:o=>{t.add(o);const a=()=>e(o);return P(a),{off:a}},off:e,trigger:o=>Promise.all(Array.from(t).map(a=>a(o)))}}function S(t){let e=!1,n;const r=u.effectScope(!0);return(...o)=>(e||(n=r.run(()=>t(...o)),e=!0),n)}const A=new WeakMap,T=(t,e)=>{var n;const r=(n=u.getCurrentInstance())==null?void 0:n.proxy;if(r==null)throw new Error("provideLocal must be called in setup");A.has(r)||A.set(r,Object.create(null));const o=A.get(r);o[t]=e,u.provide(t,e)},_=(...t)=>{var e;const n=t[0],r=(e=u.getCurrentInstance())==null?void 0:e.proxy;if(r==null)throw new Error("injectLocal must be called in setup");return A.has(r)&&n in A.get(r)?A.get(r)[n]:u.inject(...t)};function L(t,e){const n=e?.injectionKey||Symbol("InjectionState");return[(...a)=>{const i=t(...a);return T(n,i),i},()=>_(n)]}function C(t){let e=0,n,r;const o=()=>{e-=1,r&&e<=0&&(r.stop(),n=void 0,r=void 0)};return(...a)=>(e+=1,n||(r=u.effectScope(!0),n=r.run(()=>t(...a))),P(o),n)}function I(t,e,{enumerable:n=!1,unwrap:r=!0}={}){if(!u.isVue3&&!u.version.startsWith("2.7.")){if(process.env.NODE_ENV!=="production")throw new Error("[VueUse] extendRef only works in Vue 2.7 or above.");return}for(const[o,a]of Object.entries(e))o!=="value"&&(u.isRef(a)&&r?Object.defineProperty(t,o,{get(){return a.value},set(i){a.value=i},enumerable:n}):Object.defineProperty(t,o,{value:a,enumerable:n}));return t}function yt(t,e){return e==null?u.unref(t):u.unref(t)[e]}function gt(t){return u.unref(t)!=null}function mt(t,e){if(typeof Symbol<"u"){const n={...t};return Object.defineProperty(n,Symbol.iterator,{enumerable:!1,value(){let r=0;return{next:()=>({value:e[r++],done:r>e.length})}}}),n}else return Object.assign([...e],t)}function s(t){return typeof t=="function"?t():u.unref(t)}const wt=s;function $(t,e){const n=e?.computedGetter===!1?u.unref:s;return function(...r){return u.computed(()=>t.apply(this,r.map(o=>n(o))))}}function pt(t,e={}){let n=[],r;if(Array.isArray(e))n=e;else{r=e;const{includeOwnProperties:o=!0}=e;n.push(...Object.keys(t)),o&&n.push(...Object.getOwnPropertyNames(t))}return Object.fromEntries(n.map(o=>{const a=t[o];return[o,typeof a=="function"?$(a.bind(t),r):a]}))}function V(t){if(!u.isRef(t))return u.reactive(t);const e=new Proxy({},{get(n,r,o){return u.unref(Reflect.get(t.value,r,o))},set(n,r,o){return u.isRef(t.value[r])&&!u.isRef(o)?t.value[r].value=o:t.value[r]=o,!0},deleteProperty(n,r){return Reflect.deleteProperty(t.value,r)},has(n,r){return Reflect.has(t.value,r)},ownKeys(){return Object.keys(t.value)},getOwnPropertyDescriptor(){return{enumerable:!0,configurable:!0}}});return u.reactive(e)}function H(t){return V(u.computed(t))}function vt(t,...e){const n=e.flat(),r=n[0];return H(()=>Object.fromEntries(typeof r=="function"?Object.entries(u.toRefs(t)).filter(([o,a])=>!r(s(a),o)):Object.entries(u.toRefs(t)).filter(o=>!n.includes(o[0]))))}const k=typeof window<"u"&&typeof document<"u",bt=t=>typeof t<"u",At=t=>t!=null,Ot=(t,...e)=>{t||console.warn(...e)},St=Object.prototype.toString,x=t=>St.call(t)==="[object Object]",Tt=()=>Date.now(),D=()=>+Date.now(),It=(t,e,n)=>Math.min(n,Math.max(e,t)),M=()=>{},Ft=(t,e)=>(t=Math.ceil(t),e=Math.floor(e),Math.floor(Math.random()*(e-t+1))+t),Pt=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),Ct=Mt();function Mt(){var t;return k&&((t=window?.navigator)==null?void 0:t.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent)}function j(t,e){function n(...r){return new Promise((o,a)=>{Promise.resolve(t(()=>e.apply(this,r),{fn:e,thisArg:this,args:r})).then(o).catch(a)})}return n}const U=t=>t();function Y(t,e={}){let n,r,o=M;const a=l=>{clearTimeout(l),o(),o=M};return l=>{const d=s(t),g=s(e.maxWait);return n&&a(n),d<=0||g!==void 0&&g<=0?(r&&(a(r),r=null),Promise.resolve(l())):new Promise((h,f)=>{o=e.rejectOnCancel?f:h,g&&!r&&(r=setTimeout(()=>{n&&a(n),r=null,h(l())},g)),n=setTimeout(()=>{r&&a(r),r=null,h(l())},d)})}}function G(t,e=!0,n=!0,r=!1){let o=0,a,i=!0,l=M,d;const g=()=>{a&&(clearTimeout(a),a=void 0,l(),l=M)};return f=>{const y=s(t),w=Date.now()-o,m=()=>d=f();return g(),y<=0?(o=Date.now(),m()):(w>y&&(n||!i)?(o=Date.now(),m()):e&&(d=new Promise((p,v)=>{l=r?v:p,a=setTimeout(()=>{o=Date.now(),i=!0,p(m()),g()},Math.max(0,y-w))})),!n&&!a&&(a=setTimeout(()=>i=!0,y)),i=!1,d)}}function tt(t=U){const e=u.ref(!0);function n(){e.value=!1}function r(){e.value=!0}const o=(...a)=>{e.value&&t(...a)};return{isActive:u.readonly(e),pause:n,resume:r,eventFilter:o}}const Rt={mounted:u.isVue3?"mounted":"inserted",updated:u.isVue3?"updated":"componentUpdated",unmounted:u.isVue3?"unmounted":"unbind"};function et(t){const e=Object.create(null);return n=>e[n]||(e[n]=t(n))}const Et=/\B([A-Z])/g,_t=et(t=>t.replace(Et,"-$1").toLowerCase()),kt=/-(\w)/g,jt=et(t=>t.replace(kt,(e,n)=>n?n.toUpperCase():""));function z(t,e=!1,n="Timeout"){return new Promise((r,o)=>{setTimeout(e?()=>o(n):r,t)})}function Nt(t){return t}function Lt(t){let e;function n(){return e||(e=t()),e}return n.reset=async()=>{const r=e;e=void 0,r&&await r},n}function Ut(t){return t()}function nt(t,...e){return e.some(n=>n in t)}function Wt(t,e){var n;if(typeof t=="number")return t+e;const r=((n=t.match(/^-?[0-9]+\.?[0-9]*/))==null?void 0:n[0])||"",o=t.slice(r.length),a=Number.parseFloat(r)+e;return Number.isNaN(a)?t:a+o}function Bt(t,e,n=!1){return e.reduce((r,o)=>(o in t&&(!n||t[o]!==void 0)&&(r[o]=t[o]),r),{})}function $t(t,e,n=!1){return Object.fromEntries(Object.entries(t).filter(([r,o])=>(!n||o!==void 0)&&!e.includes(r)))}function Ht(t){return Object.entries(t)}function q(...t){if(t.length!==1)return u.toRef(...t);const e=t[0];return typeof e=="function"?u.readonly(u.customRef(()=>({get:e,set:M}))):u.ref(e)}const Yt=q;function Gt(t,...e){const n=e.flat(),r=n[0];return H(()=>Object.fromEntries(typeof r=="function"?Object.entries(u.toRefs(t)).filter(([o,a])=>r(s(a),o)):n.map(o=>[o,q(t,o)])))}function rt(t,e=1e4){return u.customRef((n,r)=>{let o=s(t),a;const i=()=>setTimeout(()=>{o=s(t),r()},s(e));return P(()=>{clearTimeout(a)}),{get(){return n(),o},set(l){o=l,r(),clearTimeout(a),a=i()}}})}function ot(t,e=200,n={}){return j(Y(e,n),t)}function Z(t,e=200,n={}){const r=u.ref(t.value),o=ot(()=>{r.value=t.value},e,n);return u.watch(t,()=>o()),r}function zt(t,e){return u.computed({get(){var n;return(n=t.value)!=null?n:e},set(n){t.value=n}})}function ct(t,e=200,n=!1,r=!0,o=!1){return j(G(e,n,r,o),t)}function J(t,e=200,n=!0,r=!0){if(e<=0)return t;const o=u.ref(t.value),a=ct(()=>{o.value=t.value},e,n,r);return u.watch(t,()=>a()),o}function ut(t,e={}){let n=t,r,o;const a=u.customRef((y,w)=>(r=y,o=w,{get(){return i()},set(m){l(m)}}));function i(y=!0){return y&&r(),n}function l(y,w=!0){var m,p;if(y===n)return;const v=n;((m=e.onBeforeChange)==null?void 0:m.call(e,y,v))!==!1&&(n=y,(p=e.onChanged)==null||p.call(e,y,v),w&&o())}return I(a,{get:i,set:l,untrackedGet:()=>i(!1),silentSet:y=>l(y,!1),peek:()=>i(!1),lay:y=>l(y,!1)},{enumerable:!0})}const qt=ut;function Zt(...t){if(t.length===2){const[e,n]=t;e.value=n}if(t.length===3)if(u.isVue2)u.set(...t);else{const[e,n,r]=t;e[n]=r}}function N(t,e,n={}){const{eventFilter:r=U,...o}=n;return u.watch(t,j(r,e),o)}function W(t,e,n={}){const{eventFilter:r,...o}=n,{eventFilter:a,pause:i,resume:l,isActive:d}=tt(r);return{stop:N(t,e,{...o,eventFilter:a}),pause:i,resume:l,isActive:d}}function Jt(t,e,n={}){var r,o;const{flush:a="sync",deep:i=!1,immediate:l=!0,direction:d="both",transform:g={}}=n,h=[],f=(r=g.ltr)!=null?r:m=>m,y=(o=g.rtl)!=null?o:m=>m;return(d==="both"||d==="ltr")&&h.push(W(t,m=>{h.forEach(p=>p.pause()),e.value=f(m),h.forEach(p=>p.resume())},{flush:a,deep:i,immediate:l})),(d==="both"||d==="rtl")&&h.push(W(e,m=>{h.forEach(p=>p.pause()),t.value=y(m),h.forEach(p=>p.resume())},{flush:a,deep:i,immediate:l})),()=>{h.forEach(m=>m.stop())}}function Xt(t,e,n={}){const{flush:r="sync",deep:o=!1,immediate:a=!0}=n;return Array.isArray(e)||(e=[e]),u.watch(t,i=>e.forEach(l=>l.value=i),{flush:r,deep:o,immediate:a})}function Kt(t,e={}){if(!u.isRef(t))return u.toRefs(t);const n=Array.isArray(t.value)?Array.from({length:t.value.length}):{};for(const r in t.value)n[r]=u.customRef(()=>({get(){return t.value[r]},set(o){var a;if((a=s(e.replaceRef))!=null?a:!0)if(Array.isArray(t.value)){const l=[...t.value];l[r]=o,t.value=l}else{const l={...t.value,[r]:o};Object.setPrototypeOf(l,Object.getPrototypeOf(t.value)),t.value=l}else t.value[r]=o}}));return n}function Qt(t,e=!0){u.getCurrentInstance()?u.onBeforeMount(t):e?t():u.nextTick(t)}function Vt(t){u.getCurrentInstance()&&u.onBeforeUnmount(t)}function xt(t,e=!0){u.getCurrentInstance()?u.onMounted(t):e?t():u.nextTick(t)}function Dt(t){u.getCurrentInstance()&&u.onUnmounted(t)}function X(t,e=!1){function n(f,{flush:y="sync",deep:w=!1,timeout:m,throwOnTimeout:p}={}){let v=null;const Q=[new Promise(B=>{v=u.watch(t,E=>{f(E)!==e&&(v?.(),B(E))},{flush:y,deep:w,immediate:!0})})];return m!=null&&Q.push(z(m,p).then(()=>s(t)).finally(()=>v?.())),Promise.race(Q)}function r(f,y){if(!u.isRef(f))return n(E=>E===f,y);const{flush:w="sync",deep:m=!1,timeout:p,throwOnTimeout:v}=y??{};let F=null;const B=[new Promise(E=>{F=u.watch([t,f],([ht,We])=>{e!==(ht===We)&&(F?.(),E(ht))},{flush:w,deep:m,immediate:!0})})];return p!=null&&B.push(z(p,v).then(()=>s(t)).finally(()=>(F?.(),s(t)))),Promise.race(B)}function o(f){return n(y=>!!y,f)}function a(f){return r(null,f)}function i(f){return r(void 0,f)}function l(f){return n(Number.isNaN,f)}function d(f,y){return n(w=>{const m=Array.from(w);return m.includes(f)||m.includes(s(f))},y)}function g(f){return h(1,f)}function h(f=1,y){let w=-1;return n(()=>(w+=1,w>=f),y)}return Array.isArray(s(t))?{toMatch:n,toContains:d,changed:g,changedTimes:h,get not(){return X(t,!e)}}:{toMatch:n,toBe:r,toBeTruthy:o,toBeNull:a,toBeNaN:l,toBeUndefined:i,changed:g,changedTimes:h,get not(){return X(t,!e)}}}function te(t){return X(t)}function ee(t,e){return t===e}function ne(...t){var e;const n=t[0],r=t[1];let o=(e=t[2])!=null?e:ee;if(typeof o=="string"){const a=o;o=(i,l)=>i[a]===l[a]}return u.computed(()=>s(n).filter(a=>s(r).findIndex(i=>o(a,i))===-1))}function re(t,e){return u.computed(()=>s(t).every((n,r,o)=>e(s(n),r,o)))}function oe(t,e){return u.computed(()=>s(t).map(n=>s(n)).filter(e))}function ce(t,e){return u.computed(()=>s(s(t).find((n,r,o)=>e(s(n),r,o))))}function ue(t,e){return u.computed(()=>s(t).findIndex((n,r,o)=>e(s(n),r,o)))}function ae(t,e){let n=t.length;for(;n-- >0;)if(e(t[n],n,t))return t[n]}function ie(t,e){return u.computed(()=>s(Array.prototype.findLast?s(t).findLast((n,r,o)=>e(s(n),r,o)):ae(s(t),(n,r,o)=>e(s(n),r,o))))}function le(t){return x(t)&&nt(t,"formIndex","comparator")}function se(...t){var e;const n=t[0],r=t[1];let o=t[2],a=0;if(le(o)&&(a=(e=o.fromIndex)!=null?e:0,o=o.comparator),typeof o=="string"){const i=o;o=(l,d)=>l[i]===s(d)}return o=o??((i,l)=>i===s(l)),u.computed(()=>s(n).slice(a).some((i,l,d)=>o(s(i),s(r),l,s(d))))}function fe(t,e){return u.computed(()=>s(t).map(n=>s(n)).join(s(e)))}function de(t,e){return u.computed(()=>s(t).map(n=>s(n)).map(e))}function he(t,e,...n){const r=(o,a,i)=>e(s(o),s(a),i);return u.computed(()=>{const o=s(t);return n.length?o.reduce(r,s(n[0])):o.reduce(r)})}function ye(t,e){return u.computed(()=>s(t).some((n,r,o)=>e(s(n),r,o)))}function ge(t){return Array.from(new Set(t))}function me(t,e){return t.reduce((n,r)=>(n.some(o=>e(r,o,t))||n.push(r),n),[])}function we(t,e){return u.computed(()=>{const n=s(t).map(r=>s(r));return e?me(n,e):ge(n)})}function pe(t=0,e={}){let n=u.unref(t);const r=u.ref(t),{max:o=Number.POSITIVE_INFINITY,min:a=Number.NEGATIVE_INFINITY}=e,i=(f=1)=>r.value=Math.min(o,r.value+f),l=(f=1)=>r.value=Math.max(a,r.value-f),d=()=>r.value,g=f=>r.value=Math.max(a,Math.min(o,f));return{count:r,inc:i,dec:l,get:d,set:g,reset:(f=n)=>(n=f,g(f))}}const ve=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,be=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a{1,2}|A{1,2}|m{1,2}|s{1,2}|Z{1,2}|SSS/g;function Ae(t,e,n,r){let o=t<12?"AM":"PM";return r&&(o=o.split("").reduce((a,i)=>a+=`${i}.`,"")),n?o.toLowerCase():o}function at(t,e,n={}){var r;const o=t.getFullYear(),a=t.getMonth(),i=t.getDate(),l=t.getHours(),d=t.getMinutes(),g=t.getSeconds(),h=t.getMilliseconds(),f=t.getDay(),y=(r=n.customMeridiem)!=null?r:Ae,w={YY:()=>String(o).slice(-2),YYYY:()=>o,M:()=>a+1,MM:()=>`${a+1}`.padStart(2,"0"),MMM:()=>t.toLocaleDateString(n.locales,{month:"short"}),MMMM:()=>t.toLocaleDateString(n.locales,{month:"long"}),D:()=>String(i),DD:()=>`${i}`.padStart(2,"0"),H:()=>String(l),HH:()=>`${l}`.padStart(2,"0"),h:()=>`${l%12||12}`.padStart(1,"0"),hh:()=>`${l%12||12}`.padStart(2,"0"),m:()=>String(d),mm:()=>`${d}`.padStart(2,"0"),s:()=>String(g),ss:()=>`${g}`.padStart(2,"0"),SSS:()=>`${h}`.padStart(3,"0"),d:()=>f,dd:()=>t.toLocaleDateString(n.locales,{weekday:"narrow"}),ddd:()=>t.toLocaleDateString(n.locales,{weekday:"short"}),dddd:()=>t.toLocaleDateString(n.locales,{weekday:"long"}),A:()=>y(l,d),AA:()=>y(l,d,!1,!0),a:()=>y(l,d,!0),aa:()=>y(l,d,!0,!0)};return e.replace(be,(m,p)=>{var v,F;return(F=p??((v=w[m])==null?void 0:v.call(w)))!=null?F:m})}function it(t){if(t===null)return new Date(Number.NaN);if(t===void 0)return new Date;if(t instanceof Date)return new Date(t);if(typeof t=="string"&&!/Z$/i.test(t)){const e=t.match(ve);if(e){const n=e[2]-1||0,r=(e[7]||"0").substring(0,3);return new Date(e[1],n,e[3]||1,e[4]||0,e[5]||0,e[6]||0,r)}}return new Date(t)}function Oe(t,e="HH:mm:ss",n={}){return u.computed(()=>at(it(s(t)),s(e),n))}function lt(t,e=1e3,n={}){const{immediate:r=!0,immediateCallback:o=!1}=n;let a=null;const i=u.ref(!1);function l(){a&&(clearInterval(a),a=null)}function d(){i.value=!1,l()}function g(){const h=s(e);h<=0||(i.value=!0,o&&t(),l(),a=setInterval(t,h))}if(r&&k&&g(),u.isRef(e)||typeof e=="function"){const h=u.watch(e,()=>{i.value&&k&&g()});P(h)}return P(d),{isActive:i,pause:d,resume:g}}function Se(t=1e3,e={}){const{controls:n=!1,immediate:r=!0,callback:o}=e,a=u.ref(0),i=()=>a.value+=1,l=()=>{a.value=0},d=lt(o?()=>{i(),o(a.value)}:i,t,{immediate:r});return n?{counter:a,reset:l,...d}:a}function Te(t,e={}){var n;const r=u.ref((n=e.initialValue)!=null?n:null);return u.watch(t,()=>r.value=D(),e),r}function st(t,e,n={}){const{immediate:r=!0}=n,o=u.ref(!1);let a=null;function i(){a&&(clearTimeout(a),a=null)}function l(){o.value=!1,i()}function d(...g){i(),o.value=!0,a=setTimeout(()=>{o.value=!1,a=null,t(...g)},s(e))}return r&&(o.value=!0,k&&d()),P(l),{isPending:u.readonly(o),start:d,stop:l}}function Ie(t=1e3,e={}){const{controls:n=!1,callback:r}=e,o=st(r??M,t,e),a=u.computed(()=>!o.isPending.value);return n?{ready:a,...o}:a}function Fe(t,e={}){const{method:n="parseFloat",radix:r,nanToZero:o}=e;return u.computed(()=>{let a=s(t);return typeof a=="string"&&(a=Number[n](a,r)),o&&Number.isNaN(a)&&(a=0),a})}function Pe(t){return u.computed(()=>`${s(t)}`)}function Ce(t=!1,e={}){const{truthyValue:n=!0,falsyValue:r=!1}=e,o=u.isRef(t),a=u.ref(t);function i(l){if(arguments.length)return a.value=l,a.value;{const d=s(n);return a.value=a.value===d?s(r):d,a.value}}return o?i:[a,i]}function Me(t,e,n){let r=n?.immediate?[]:[...t instanceof Function?t():Array.isArray(t)?t:s(t)];return u.watch(t,(o,a,i)=>{const l=Array.from({length:r.length}),d=[];for(const h of o){let f=!1;for(let y=0;y<r.length;y++)if(!l[y]&&h===r[y]){l[y]=!0,f=!0;break}f||d.push(h)}const g=r.filter((h,f)=>!l[f]);e(o,r,d,g,i),r=[...o]},n)}function Re(t,e,n){const{count:r,...o}=n,a=u.ref(0),i=N(t,(...l)=>{a.value+=1,a.value>=s(r)&&u.nextTick(()=>i()),e(...l)},o);return{count:a,stop:i}}function ft(t,e,n={}){const{debounce:r=0,maxWait:o=void 0,...a}=n;return N(t,e,{...a,eventFilter:Y(r,{maxWait:o})})}function Ee(t,e,n){return u.watch(t,e,{...n,deep:!0})}function K(t,e,n={}){const{eventFilter:r=U,...o}=n,a=j(r,e);let i,l,d;if(o.flush==="sync"){const g=u.ref(!1);l=()=>{},i=h=>{g.value=!0,h(),g.value=!1},d=u.watch(t,(...h)=>{g.value||a(...h)},o)}else{const g=[],h=u.ref(0),f=u.ref(0);l=()=>{h.value=f.value},g.push(u.watch(t,()=>{f.value++},{...o,flush:"sync"})),i=y=>{const w=f.value;y(),h.value+=f.value-w},g.push(u.watch(t,(...y)=>{const w=h.value>0&&h.value===f.value;h.value=0,f.value=0,!w&&a(...y)},o)),d=()=>{g.forEach(y=>y())}}return{stop:d,ignoreUpdates:i,ignorePrevAsyncUpdates:l}}function _e(t,e,n){return u.watch(t,e,{...n,immediate:!0})}function ke(t,e,n){const r=u.watch(t,(...o)=>(u.nextTick(()=>r()),e(...o)),n)}function dt(t,e,n={}){const{throttle:r=0,trailing:o=!0,leading:a=!0,...i}=n;return N(t,e,{...i,eventFilter:G(r,o,a)})}function je(t,e,n={}){let r;function o(){if(!r)return;const h=r;r=void 0,h()}function a(h){r=h}const i=(h,f)=>(o(),e(h,f,a)),l=K(t,i,n),{ignoreUpdates:d}=l;return{...l,trigger:()=>{let h;return d(()=>{h=i(Ne(t),Le(t))}),h}}}function Ne(t){return u.isReactive(t)?t:Array.isArray(t)?t.map(e=>s(e)):s(t)}function Le(t){return Array.isArray(t)?t.map(()=>{}):void 0}function Ue(t,e,n){return u.watch(t,(r,o,a)=>{r&&e(r,o,a)},n)}c.assert=Ot,c.autoResetRef=rt,c.bypassFilter=U,c.camelize=jt,c.clamp=It,c.computedEager=R,c.computedWithControl=O,c.containsProp=nt,c.controlledComputed=O,c.controlledRef=qt,c.createEventHook=b,c.createFilterWrapper=j,c.createGlobalState=S,c.createInjectionState=L,c.createReactiveFn=$,c.createSharedComposable=C,c.createSingletonPromise=Lt,c.debounceFilter=Y,c.debouncedRef=Z,c.debouncedWatch=ft,c.directiveHooks=Rt,c.eagerComputed=R,c.extendRef=I,c.formatDate=at,c.get=yt,c.hasOwn=Pt,c.hyphenate=_t,c.identity=Nt,c.ignorableWatch=K,c.increaseWithUnit=Wt,c.injectLocal=_,c.invoke=Ut,c.isClient=k,c.isDef=bt,c.isDefined=gt,c.isIOS=Ct,c.isObject=x,c.makeDestructurable=mt,c.noop=M,c.normalizeDate=it,c.notNullish=At,c.now=Tt,c.objectEntries=Ht,c.objectOmit=$t,c.objectPick=Bt,c.pausableFilter=tt,c.pausableWatch=W,c.promiseTimeout=z,c.provideLocal=T,c.rand=Ft,c.reactify=$,c.reactifyObject=pt,c.reactiveComputed=H,c.reactiveOmit=vt,c.reactivePick=Gt,c.refAutoReset=rt,c.refDebounced=Z,c.refDefault=zt,c.refThrottled=J,c.refWithControl=ut,c.resolveRef=Yt,c.resolveUnref=wt,c.set=Zt,c.syncRef=Jt,c.syncRefs=Xt,c.throttleFilter=G,c.throttledRef=J,c.throttledWatch=dt,c.timestamp=D,c.toReactive=V,c.toRef=q,c.toRefs=Kt,c.toValue=s,c.tryOnBeforeMount=Qt,c.tryOnBeforeUnmount=Vt,c.tryOnMounted=xt,c.tryOnScopeDispose=P,c.tryOnUnmounted=Dt,c.until=te,c.useArrayDifference=ne,c.useArrayEvery=re,c.useArrayFilter=oe,c.useArrayFind=ce,c.useArrayFindIndex=ue,c.useArrayFindLast=ie,c.useArrayIncludes=se,c.useArrayJoin=fe,c.useArrayMap=de,c.useArrayReduce=he,c.useArraySome=ye,c.useArrayUnique=we,c.useCounter=pe,c.useDateFormat=Oe,c.useDebounce=Z,c.useDebounceFn=ot,c.useInterval=Se,c.useIntervalFn=lt,c.useLastChanged=Te,c.useThrottle=J,c.useThrottleFn=ct,c.useTimeout=Ie,c.useTimeoutFn=st,c.useToNumber=Fe,c.useToString=Pe,c.useToggle=Ce,c.watchArray=Me,c.watchAtMost=Re,c.watchDebounced=ft,c.watchDeep=Ee,c.watchIgnorable=K,c.watchImmediate=_e,c.watchOnce=ke,c.watchPausable=W,c.watchThrottled=dt,c.watchTriggerable=je,c.watchWithFilter=N,c.whenever=Ue})(this.VueUse=this.VueUse||{},VueDemi);
|