@varlet/ui 3.7.2 → 3.7.3
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/es/action-sheet/style/index.mjs +1 -1
- package/es/bottom-navigation-item/provide.mjs +2 -4
- package/es/breadcrumb/provide.mjs +2 -4
- package/es/collapse-item/provide.mjs +2 -4
- package/es/date-picker/DatePicker.mjs +7 -5
- package/es/index-anchor/provide.mjs +2 -4
- package/es/index.bundle.mjs +1 -1
- package/es/index.mjs +1 -1
- package/es/menu-option/provide.mjs +2 -4
- package/es/option/provide.mjs +2 -4
- package/es/select/Select.mjs +6 -6
- package/es/slider/Slider.mjs +5 -6
- package/es/step/provide.mjs +2 -4
- package/es/swipe-item/provide.mjs +2 -4
- package/es/tab/provide.mjs +2 -4
- package/es/tab-item/provide.mjs +2 -4
- package/es/utils/elements.mjs +4 -6
- package/es/varlet.esm.js +6623 -5931
- package/highlight/web-types.en-US.json +1 -1
- package/highlight/web-types.zh-CN.json +1 -1
- package/lib/varlet.cjs.js +1067 -208
- package/package.json +7 -7
- package/umd/varlet.js +7 -7
- package/es/utils/logger.mjs +0 -10
package/lib/varlet.cjs.js
CHANGED
|
@@ -8,9 +8,31 @@ const context = {
|
|
|
8
8
|
};
|
|
9
9
|
const _ContextComponent = vue.reactive(context);
|
|
10
10
|
var stdin_default$6b = vue.reactive(context);
|
|
11
|
+
function default2(n2) {
|
|
12
|
+
return { all: n2 = n2 || /* @__PURE__ */ new Map(), on: function(t2, e) {
|
|
13
|
+
var i = n2.get(t2);
|
|
14
|
+
i ? i.push(e) : n2.set(t2, [e]);
|
|
15
|
+
}, off: function(t2, e) {
|
|
16
|
+
var i = n2.get(t2);
|
|
17
|
+
i && (e ? i.splice(i.indexOf(e) >>> 0, 1) : n2.set(t2, []));
|
|
18
|
+
}, emit: function(t2, e) {
|
|
19
|
+
var i = n2.get(t2);
|
|
20
|
+
i && i.slice().map(function(n3) {
|
|
21
|
+
n3(e);
|
|
22
|
+
}), (i = n2.get("*")) && i.slice().map(function(n3) {
|
|
23
|
+
n3(t2, e);
|
|
24
|
+
});
|
|
25
|
+
} };
|
|
26
|
+
}
|
|
27
|
+
const mitt_star = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
28
|
+
__proto__: null,
|
|
29
|
+
default: default2
|
|
30
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
11
31
|
var __defProp$z = Object.defineProperty;
|
|
12
32
|
var __defProps$d = Object.defineProperties;
|
|
33
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
13
34
|
var __getOwnPropDescs$d = Object.getOwnPropertyDescriptors;
|
|
35
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
14
36
|
var __getOwnPropSymbols$z = Object.getOwnPropertySymbols;
|
|
15
37
|
var __hasOwnProp$z = Object.prototype.hasOwnProperty;
|
|
16
38
|
var __propIsEnum$z = Object.prototype.propertyIsEnumerable;
|
|
@@ -27,12 +49,178 @@ var __spreadValues$z = (a, b) => {
|
|
|
27
49
|
return a;
|
|
28
50
|
};
|
|
29
51
|
var __spreadProps$d = (a, b) => __defProps$d(a, __getOwnPropDescs$d(b));
|
|
52
|
+
var __export = (target, all) => {
|
|
53
|
+
for (var name2 in all)
|
|
54
|
+
__defProp$z(target, name2, { get: all[name2], enumerable: true });
|
|
55
|
+
};
|
|
56
|
+
var __copyProps = (to, from, except, desc) => {
|
|
57
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
58
|
+
for (let key3 of __getOwnPropNames(from))
|
|
59
|
+
if (!__hasOwnProp$z.call(to, key3) && key3 !== except)
|
|
60
|
+
__defProp$z(to, key3, { get: () => from[key3], enumerable: !(desc = __getOwnPropDesc(from, key3)) || desc.enumerable });
|
|
61
|
+
}
|
|
62
|
+
return to;
|
|
63
|
+
};
|
|
64
|
+
var __reExport = (target, mod2, secondTarget) => (__copyProps(target, mod2, "default"), secondTarget);
|
|
65
|
+
var src_exports = {};
|
|
66
|
+
__export(src_exports, {
|
|
67
|
+
NOOP: () => NOOP,
|
|
68
|
+
assert: () => assert$1,
|
|
69
|
+
at: () => at,
|
|
70
|
+
baseRound: () => baseRound,
|
|
71
|
+
call: () => call,
|
|
72
|
+
camelize: () => camelize,
|
|
73
|
+
cancelAnimationFrame: () => cancelAnimationFrame,
|
|
74
|
+
ceil: () => ceil$1,
|
|
75
|
+
chunk: () => chunk,
|
|
76
|
+
clamp: () => clamp$1,
|
|
77
|
+
clampArrayRange: () => clampArrayRange,
|
|
78
|
+
classes: () => classes$1d,
|
|
79
|
+
cloneDeep: () => cloneDeep,
|
|
80
|
+
cloneDeepWith: () => cloneDeepWith,
|
|
81
|
+
copyText: () => copyText,
|
|
82
|
+
createNamespaceFn: () => createNamespaceFn,
|
|
83
|
+
createStorage: () => createStorage,
|
|
84
|
+
debounce: () => debounce$1,
|
|
85
|
+
delay: () => delay,
|
|
86
|
+
difference: () => difference,
|
|
87
|
+
differenceWith: () => differenceWith,
|
|
88
|
+
doubleRaf: () => doubleRaf,
|
|
89
|
+
download: () => download,
|
|
90
|
+
ensurePrefix: () => ensurePrefix,
|
|
91
|
+
ensureSuffix: () => ensureSuffix,
|
|
92
|
+
find: () => find,
|
|
93
|
+
floor: () => floor$1,
|
|
94
|
+
genNumberKey: () => genNumberKey,
|
|
95
|
+
genStringKey: () => genStringKey,
|
|
96
|
+
getAllParentScroller: () => getAllParentScroller$1,
|
|
97
|
+
getGlobalThis: () => getGlobalThis,
|
|
98
|
+
getParentScroller: () => getParentScroller$1,
|
|
99
|
+
getRect: () => getRect,
|
|
100
|
+
getScrollLeft: () => getScrollLeft,
|
|
101
|
+
getScrollTop: () => getScrollTop,
|
|
102
|
+
getStyle: () => getStyle$1,
|
|
103
|
+
groupBy: () => groupBy,
|
|
104
|
+
hasOwn: () => hasOwn,
|
|
105
|
+
inBrowser: () => inBrowser,
|
|
106
|
+
inMobile: () => inMobile,
|
|
107
|
+
inViewport: () => inViewport,
|
|
108
|
+
intersection: () => intersection,
|
|
109
|
+
intersectionWith: () => intersectionWith,
|
|
110
|
+
isArray: () => isArray,
|
|
111
|
+
isArrayBuffer: () => isArrayBuffer,
|
|
112
|
+
isBlob: () => isBlob,
|
|
113
|
+
isBoolean: () => isBoolean,
|
|
114
|
+
isDOMException: () => isDOMException,
|
|
115
|
+
isDataView: () => isDataView,
|
|
116
|
+
isDate: () => isDate,
|
|
117
|
+
isEmpty: () => isEmpty,
|
|
118
|
+
isEmptyPlainObject: () => isEmptyPlainObject,
|
|
119
|
+
isEqual: () => isEqual,
|
|
120
|
+
isEqualWith: () => isEqualWith,
|
|
121
|
+
isError: () => isError,
|
|
122
|
+
isFile: () => isFile,
|
|
123
|
+
isFunction: () => isFunction,
|
|
124
|
+
isMap: () => isMap,
|
|
125
|
+
isNonEmptyArray: () => isNonEmptyArray,
|
|
126
|
+
isNullish: () => isNullish,
|
|
127
|
+
isNumber: () => isNumber,
|
|
128
|
+
isNumeric: () => isNumeric,
|
|
129
|
+
isObject: () => isObject,
|
|
130
|
+
isPlainObject: () => isPlainObject,
|
|
131
|
+
isPrimitive: () => isPrimitive,
|
|
132
|
+
isPromise: () => isPromise,
|
|
133
|
+
isRegExp: () => isRegExp,
|
|
134
|
+
isSet: () => isSet,
|
|
135
|
+
isString: () => isString,
|
|
136
|
+
isSymbol: () => isSymbol,
|
|
137
|
+
isTruthy: () => isTruthy,
|
|
138
|
+
isTypedArray: () => isTypedArray,
|
|
139
|
+
isWeakMap: () => isWeakMap,
|
|
140
|
+
isWeakSet: () => isWeakSet,
|
|
141
|
+
isWindow: () => isWindow,
|
|
142
|
+
kebabCase: () => kebabCase,
|
|
143
|
+
localStorage: () => localStorage,
|
|
144
|
+
lowerFirst: () => lowerFirst,
|
|
145
|
+
mapObject: () => mapObject,
|
|
146
|
+
maxBy: () => maxBy,
|
|
147
|
+
mean: () => mean,
|
|
148
|
+
meanBy: () => meanBy,
|
|
149
|
+
merge: () => merge$1,
|
|
150
|
+
mergeWith: () => mergeWith,
|
|
151
|
+
minBy: () => minBy,
|
|
152
|
+
mitt: () => default2,
|
|
153
|
+
motion: () => motion,
|
|
154
|
+
normalizeToArray: () => normalizeToArray,
|
|
155
|
+
objectToString: () => objectToString,
|
|
156
|
+
omit: () => omit,
|
|
157
|
+
omitBy: () => omitBy,
|
|
158
|
+
once: () => once,
|
|
159
|
+
pascalCase: () => pascalCase,
|
|
160
|
+
pick: () => pick,
|
|
161
|
+
pickBy: () => pickBy,
|
|
162
|
+
prettyJSONObject: () => prettyJSONObject,
|
|
163
|
+
preventDefault: () => preventDefault,
|
|
164
|
+
promiseWithResolvers: () => promiseWithResolvers,
|
|
165
|
+
raf: () => raf,
|
|
166
|
+
randomColor: () => randomColor,
|
|
167
|
+
randomNumber: () => randomNumber,
|
|
168
|
+
randomString: () => randomString,
|
|
169
|
+
removeArrayBlank: () => removeArrayBlank,
|
|
170
|
+
removeArrayEmpty: () => removeArrayEmpty,
|
|
171
|
+
removeItem: () => removeItem,
|
|
172
|
+
requestAnimationFrame: () => requestAnimationFrame$1,
|
|
173
|
+
round: () => round$2,
|
|
174
|
+
sample: () => sample,
|
|
175
|
+
sessionStorage: () => sessionStorage,
|
|
176
|
+
shuffle: () => shuffle,
|
|
177
|
+
slash: () => slash,
|
|
178
|
+
sum: () => sum$1,
|
|
179
|
+
sumBy: () => sumBy,
|
|
180
|
+
sumHash: () => sumHash,
|
|
181
|
+
supportTouch: () => supportTouch,
|
|
182
|
+
throttle: () => throttle,
|
|
183
|
+
times: () => times,
|
|
184
|
+
toArrayBuffer: () => toArrayBuffer,
|
|
185
|
+
toDataURL: () => toDataURL,
|
|
186
|
+
toNumber: () => toNumber,
|
|
187
|
+
toRawType: () => toRawType,
|
|
188
|
+
toText: () => toText,
|
|
189
|
+
toTypeString: () => toTypeString,
|
|
190
|
+
toggleItem: () => toggleItem,
|
|
191
|
+
tryParseJSON: () => tryParseJSON,
|
|
192
|
+
uniq: () => uniq,
|
|
193
|
+
uniqBy: () => uniqBy,
|
|
194
|
+
upperFirst: () => upperFirst,
|
|
195
|
+
xor: () => xor,
|
|
196
|
+
xorWith: () => xorWith
|
|
197
|
+
});
|
|
198
|
+
function at(arr, index) {
|
|
199
|
+
if (!arr.length) {
|
|
200
|
+
return;
|
|
201
|
+
}
|
|
202
|
+
if (index < 0) {
|
|
203
|
+
index += arr.length;
|
|
204
|
+
}
|
|
205
|
+
return arr[index];
|
|
206
|
+
}
|
|
30
207
|
function clamp$1(num, min2, max2) {
|
|
31
208
|
return Math.min(max2, Math.max(min2, num));
|
|
32
209
|
}
|
|
33
210
|
function clampArrayRange(index, arr) {
|
|
34
211
|
return clamp$1(index, 0, arr.length - 1);
|
|
35
212
|
}
|
|
213
|
+
function delay(time) {
|
|
214
|
+
return new Promise((resolve) => {
|
|
215
|
+
setTimeout(resolve, time);
|
|
216
|
+
});
|
|
217
|
+
}
|
|
218
|
+
function randomNumber(min2 = 0, max2 = 100) {
|
|
219
|
+
return Math.floor(Math.random() * (max2 - min2 + 1)) + min2;
|
|
220
|
+
}
|
|
221
|
+
function times(num, fn2) {
|
|
222
|
+
return Array.from({ length: num }, (_, index) => fn2(index));
|
|
223
|
+
}
|
|
36
224
|
function inBrowser() {
|
|
37
225
|
return typeof window !== "undefined";
|
|
38
226
|
}
|
|
@@ -62,21 +250,162 @@ function toTypeString(value) {
|
|
|
62
250
|
function toRawType(value) {
|
|
63
251
|
return toTypeString(value).slice(8, -1);
|
|
64
252
|
}
|
|
253
|
+
function isArrayBuffer(val) {
|
|
254
|
+
return toRawType(val) === "ArrayBuffer";
|
|
255
|
+
}
|
|
65
256
|
function isBoolean(val) {
|
|
66
257
|
return typeof val === "boolean";
|
|
67
258
|
}
|
|
259
|
+
function isDataView(val) {
|
|
260
|
+
return toRawType(val) === "DataView";
|
|
261
|
+
}
|
|
262
|
+
function isDate(val) {
|
|
263
|
+
return toRawType(val) === "Date";
|
|
264
|
+
}
|
|
265
|
+
function isDOMException(val) {
|
|
266
|
+
return toRawType(val) === "DOMException";
|
|
267
|
+
}
|
|
68
268
|
function isEmpty(val) {
|
|
69
269
|
return val === void 0 || val === null || val === "" || isArray(val) && !val.length;
|
|
70
270
|
}
|
|
271
|
+
function isMap(val) {
|
|
272
|
+
return toRawType(val) === "Map";
|
|
273
|
+
}
|
|
71
274
|
function isPlainObject(val) {
|
|
72
275
|
return toRawType(val) === "Object";
|
|
73
276
|
}
|
|
277
|
+
function isSet(val) {
|
|
278
|
+
return toRawType(val) === "Set";
|
|
279
|
+
}
|
|
74
280
|
function isObject(val) {
|
|
75
281
|
return typeof val === "object" && val !== null;
|
|
76
282
|
}
|
|
283
|
+
function isRegExp(val) {
|
|
284
|
+
return toRawType(val) === "RegExp";
|
|
285
|
+
}
|
|
286
|
+
function isError(val) {
|
|
287
|
+
return toRawType(val) === "Error";
|
|
288
|
+
}
|
|
289
|
+
function isTypedArray(val) {
|
|
290
|
+
return [
|
|
291
|
+
"Int8Array",
|
|
292
|
+
"Uint8Array",
|
|
293
|
+
"Uint8ClampedArray",
|
|
294
|
+
"Int16Array",
|
|
295
|
+
"Uint16Array",
|
|
296
|
+
"Int32Array",
|
|
297
|
+
"Uint32Array",
|
|
298
|
+
"Float32Array",
|
|
299
|
+
"Float64Array",
|
|
300
|
+
"BigInt64Array",
|
|
301
|
+
"BigUint64Array"
|
|
302
|
+
].includes(toRawType(val));
|
|
303
|
+
}
|
|
304
|
+
function isEqualWith(value, other, fn2) {
|
|
305
|
+
const valueStack = /* @__PURE__ */ new WeakMap();
|
|
306
|
+
const otherStack = /* @__PURE__ */ new WeakMap();
|
|
307
|
+
function baseIsEqual(value2, other2, valueStack2, otherStack2) {
|
|
308
|
+
const customEqual = fn2(value2, other2);
|
|
309
|
+
if (customEqual === true) {
|
|
310
|
+
return true;
|
|
311
|
+
}
|
|
312
|
+
if (value2 === other2) {
|
|
313
|
+
return true;
|
|
314
|
+
}
|
|
315
|
+
if (value2 !== value2 && other2 !== other2) {
|
|
316
|
+
return true;
|
|
317
|
+
}
|
|
318
|
+
if (!isObject(value2) || !isObject(other2)) {
|
|
319
|
+
return value2 === other2;
|
|
320
|
+
}
|
|
321
|
+
if (value2.constructor !== other2.constructor) {
|
|
322
|
+
return false;
|
|
323
|
+
}
|
|
324
|
+
if (toRawType(value2) === "String" && toRawType(other2) === "String" || toRawType(value2) === "Number" && toRawType(other2) === "Number" || toRawType(value2) === "Boolean" && toRawType(other2) === "Boolean" || toRawType(value2) === "BigInt" && toRawType(other2) === "BigInt" || toRawType(value2) === "Symbol" && toRawType(other2) === "Symbol") {
|
|
325
|
+
return value2.valueOf() === other2.valueOf();
|
|
326
|
+
}
|
|
327
|
+
if (isDate(value2) && isDate(other2)) {
|
|
328
|
+
return value2.getTime() === other2.getTime();
|
|
329
|
+
}
|
|
330
|
+
if (isRegExp(value2) && isRegExp(other2)) {
|
|
331
|
+
return value2.source === other2.source && value2.flags === other2.flags;
|
|
332
|
+
}
|
|
333
|
+
if (isError(value2) && isError(other2)) {
|
|
334
|
+
return value2.name === other2.name && value2.message === other2.message && value2.cause === other2.cause;
|
|
335
|
+
}
|
|
336
|
+
if (isDOMException(value2) && isDOMException(other2)) {
|
|
337
|
+
return value2.name === other2.name && value2.message === other2.message;
|
|
338
|
+
}
|
|
339
|
+
if (isTypedArray(value2) && isTypedArray(other2) || isDataView(value2) && isDataView(other2)) {
|
|
340
|
+
if (value2.byteLength !== other2.byteLength) {
|
|
341
|
+
return false;
|
|
342
|
+
}
|
|
343
|
+
const valueTypedArray = new Uint8Array(value2.buffer);
|
|
344
|
+
const otherTypedArray = new Uint8Array(other2.buffer);
|
|
345
|
+
return valueTypedArray.every((v, i) => v === otherTypedArray[i]);
|
|
346
|
+
}
|
|
347
|
+
if (isArrayBuffer(value2) && isArrayBuffer(other2)) {
|
|
348
|
+
if (value2.byteLength !== other2.byteLength) {
|
|
349
|
+
return false;
|
|
350
|
+
}
|
|
351
|
+
const valueTypedArray = new Uint8Array(value2);
|
|
352
|
+
const otherTypedArray = new Uint8Array(other2);
|
|
353
|
+
return valueTypedArray.every((v, i) => v === otherTypedArray[i]);
|
|
354
|
+
}
|
|
355
|
+
if (valueStack2.get(value2) === other2 && otherStack2.get(other2) === value2) {
|
|
356
|
+
return true;
|
|
357
|
+
}
|
|
358
|
+
valueStack2.set(value2, other2);
|
|
359
|
+
otherStack2.set(other2, value2);
|
|
360
|
+
if (isMap(value2) && isMap(other2) || isSet(value2) && isSet(other2)) {
|
|
361
|
+
if (value2.size !== other2.size) {
|
|
362
|
+
return false;
|
|
363
|
+
}
|
|
364
|
+
const valueArray = [...value2];
|
|
365
|
+
const otherArray = [...other2];
|
|
366
|
+
const result = valueArray.every((v, i) => baseIsEqual(v, otherArray[i], valueStack2, otherStack2));
|
|
367
|
+
valueStack2.delete(value2);
|
|
368
|
+
otherStack2.delete(other2);
|
|
369
|
+
return result;
|
|
370
|
+
}
|
|
371
|
+
if (isArray(value2) && isArray(other2)) {
|
|
372
|
+
if (value2.length !== other2.length) {
|
|
373
|
+
return false;
|
|
374
|
+
}
|
|
375
|
+
const result = value2.every((v, i) => baseIsEqual(v, other2[i], valueStack2, otherStack2));
|
|
376
|
+
valueStack2.delete(value2);
|
|
377
|
+
otherStack2.delete(other2);
|
|
378
|
+
return result;
|
|
379
|
+
}
|
|
380
|
+
if (isPlainObject(value2) && isPlainObject(other2)) {
|
|
381
|
+
const valueOwnKeys = [...Object.keys(value2), ...Object.getOwnPropertySymbols(value2)];
|
|
382
|
+
const otherOwnKeys = [...Object.keys(other2), ...Object.getOwnPropertySymbols(other2)];
|
|
383
|
+
if (valueOwnKeys.length !== otherOwnKeys.length) {
|
|
384
|
+
return false;
|
|
385
|
+
}
|
|
386
|
+
const result = valueOwnKeys.every(
|
|
387
|
+
(k) => baseIsEqual(value2[k], other2[k], valueStack2, otherStack2)
|
|
388
|
+
);
|
|
389
|
+
valueStack2.delete(value2);
|
|
390
|
+
otherStack2.delete(other2);
|
|
391
|
+
return result;
|
|
392
|
+
}
|
|
393
|
+
return false;
|
|
394
|
+
}
|
|
395
|
+
return baseIsEqual(value, other, valueStack, otherStack);
|
|
396
|
+
}
|
|
397
|
+
function isEqual(value, other) {
|
|
398
|
+
return isEqualWith(value, other, () => void 0);
|
|
399
|
+
}
|
|
77
400
|
function isFunction(val) {
|
|
78
401
|
return typeof val === "function";
|
|
79
402
|
}
|
|
403
|
+
function isNonEmptyArray(val) {
|
|
404
|
+
return isArray(val) && !!val.length;
|
|
405
|
+
}
|
|
406
|
+
function isNullish(val) {
|
|
407
|
+
return val == null;
|
|
408
|
+
}
|
|
80
409
|
function isNumber(val) {
|
|
81
410
|
return typeof val === "number";
|
|
82
411
|
}
|
|
@@ -86,12 +415,44 @@ function isString(val) {
|
|
|
86
415
|
function isNumeric(val) {
|
|
87
416
|
return isNumber(val) || isString(val) && /^[-+]?\d+$/.test(val);
|
|
88
417
|
}
|
|
418
|
+
function isPromise(val) {
|
|
419
|
+
return isObject(val) && isFunction(val.then) && isFunction(val.catch);
|
|
420
|
+
}
|
|
421
|
+
function isSymbol(val) {
|
|
422
|
+
return typeof val === "symbol";
|
|
423
|
+
}
|
|
424
|
+
function isTruthy(v) {
|
|
425
|
+
return Boolean(v);
|
|
426
|
+
}
|
|
427
|
+
function isWeakMap(val) {
|
|
428
|
+
return toRawType(val) === "WeakMap";
|
|
429
|
+
}
|
|
430
|
+
function isWeakSet(val) {
|
|
431
|
+
return toRawType(val) === "WeakSet";
|
|
432
|
+
}
|
|
89
433
|
function isWindow(val) {
|
|
90
434
|
return val === window;
|
|
91
435
|
}
|
|
92
436
|
function supportTouch() {
|
|
93
437
|
return inBrowser() && "ontouchstart" in window;
|
|
94
438
|
}
|
|
439
|
+
function isFile(val) {
|
|
440
|
+
return toRawType(val) === "File";
|
|
441
|
+
}
|
|
442
|
+
function isBlob(val) {
|
|
443
|
+
return toRawType(val) === "Blob";
|
|
444
|
+
}
|
|
445
|
+
function isPrimitive(val) {
|
|
446
|
+
return val == null || typeof val !== "object" && typeof val !== "function";
|
|
447
|
+
}
|
|
448
|
+
function isEmptyPlainObject(val) {
|
|
449
|
+
return isPlainObject(val) && Object.keys(val).length === 0 && Object.getOwnPropertySymbols(val).length === 0;
|
|
450
|
+
}
|
|
451
|
+
function assert$1(condition, message) {
|
|
452
|
+
if (!condition) {
|
|
453
|
+
throw new Error(message);
|
|
454
|
+
}
|
|
455
|
+
}
|
|
95
456
|
function toNumber(val) {
|
|
96
457
|
if (val == null) {
|
|
97
458
|
return 0;
|
|
@@ -106,6 +467,20 @@ function toNumber(val) {
|
|
|
106
467
|
}
|
|
107
468
|
return val;
|
|
108
469
|
}
|
|
470
|
+
var key = 0;
|
|
471
|
+
function genNumberKey() {
|
|
472
|
+
return key++;
|
|
473
|
+
}
|
|
474
|
+
function chunk(arr, size = 1) {
|
|
475
|
+
size = clamp$1(size, 1, arr.length);
|
|
476
|
+
const result = [];
|
|
477
|
+
let index = 0;
|
|
478
|
+
while (index < arr.length) {
|
|
479
|
+
result.push(arr.slice(index, index + size));
|
|
480
|
+
index += size;
|
|
481
|
+
}
|
|
482
|
+
return result;
|
|
483
|
+
}
|
|
109
484
|
function removeItem(arr, item) {
|
|
110
485
|
if (arr.length) {
|
|
111
486
|
const index = arr.indexOf(item);
|
|
@@ -114,9 +489,22 @@ function removeItem(arr, item) {
|
|
|
114
489
|
}
|
|
115
490
|
}
|
|
116
491
|
}
|
|
492
|
+
function toggleItem(arr, item) {
|
|
493
|
+
arr.includes(item) ? removeItem(arr, item) : arr.push(item);
|
|
494
|
+
return arr;
|
|
495
|
+
}
|
|
117
496
|
function uniq(arr) {
|
|
118
497
|
return [...new Set(arr)];
|
|
119
498
|
}
|
|
499
|
+
function uniqBy(arr, fn2) {
|
|
500
|
+
return arr.reduce((ret, i) => {
|
|
501
|
+
const index = ret.findIndex((j) => fn2(i, j));
|
|
502
|
+
if (index === -1) {
|
|
503
|
+
ret.push(i);
|
|
504
|
+
}
|
|
505
|
+
return ret;
|
|
506
|
+
}, []);
|
|
507
|
+
}
|
|
120
508
|
function find(arr, fn2, from = "start") {
|
|
121
509
|
let i = from === "start" ? 0 : arr.length - 1;
|
|
122
510
|
while (arr.length > 0 && i >= 0 && i <= arr.length - 1) {
|
|
@@ -128,12 +516,163 @@ function find(arr, fn2, from = "start") {
|
|
|
128
516
|
}
|
|
129
517
|
return [null, -1];
|
|
130
518
|
}
|
|
519
|
+
function shuffle(arr) {
|
|
520
|
+
for (let i = arr.length - 1; i > 0; i--) {
|
|
521
|
+
const j = Math.floor(Math.random() * (i + 1));
|
|
522
|
+
[arr[i], arr[j]] = [arr[j], arr[i]];
|
|
523
|
+
}
|
|
524
|
+
return arr;
|
|
525
|
+
}
|
|
131
526
|
function removeArrayBlank(arr) {
|
|
132
527
|
return arr.filter((item) => item != null);
|
|
133
528
|
}
|
|
529
|
+
function removeArrayEmpty(arr) {
|
|
530
|
+
return arr.filter((item) => item != null && item !== "");
|
|
531
|
+
}
|
|
134
532
|
function normalizeToArray(value) {
|
|
135
533
|
return isArray(value) ? value : [value];
|
|
136
534
|
}
|
|
535
|
+
function differenceWith(arr, ...values) {
|
|
536
|
+
const fn2 = at(values, -1);
|
|
537
|
+
const targets = values.slice(0, -1).reduce((targets2, value) => [...targets2, ...value], []);
|
|
538
|
+
return arr.filter((item) => !targets.some((value) => fn2(item, value)));
|
|
539
|
+
}
|
|
540
|
+
function difference(arr, ...values) {
|
|
541
|
+
return differenceWith(arr, ...values, (a, b) => a === b);
|
|
542
|
+
}
|
|
543
|
+
function intersectionWith(...values) {
|
|
544
|
+
const fn2 = at(values, -1);
|
|
545
|
+
const targets = values.slice(0, -1);
|
|
546
|
+
if (targets.length === 0) {
|
|
547
|
+
return [];
|
|
548
|
+
}
|
|
549
|
+
if (targets.length === 1) {
|
|
550
|
+
return uniqBy(targets[0], fn2);
|
|
551
|
+
}
|
|
552
|
+
function baseIntersectionWith(arr1, arr2) {
|
|
553
|
+
return arr1.filter((item) => arr2.some((value) => fn2(item, value)));
|
|
554
|
+
}
|
|
555
|
+
return uniqBy(
|
|
556
|
+
targets.reduce((result, target) => baseIntersectionWith(result, target)),
|
|
557
|
+
fn2
|
|
558
|
+
);
|
|
559
|
+
}
|
|
560
|
+
function intersection(...values) {
|
|
561
|
+
return intersectionWith(...values, (a, b) => a === b);
|
|
562
|
+
}
|
|
563
|
+
function groupBy(arr, fn2) {
|
|
564
|
+
return arr.reduce(
|
|
565
|
+
(result, item) => {
|
|
566
|
+
var _a;
|
|
567
|
+
const key3 = fn2(item);
|
|
568
|
+
((_a = result[key3]) != null ? _a : result[key3] = []).push(item);
|
|
569
|
+
return result;
|
|
570
|
+
},
|
|
571
|
+
{}
|
|
572
|
+
);
|
|
573
|
+
}
|
|
574
|
+
function xorWith(...values) {
|
|
575
|
+
const fn2 = at(values, -1);
|
|
576
|
+
const targets = values.slice(0, -1);
|
|
577
|
+
return uniqBy(
|
|
578
|
+
targets.reduce((result, target) => {
|
|
579
|
+
return [...differenceWith(result, target, fn2), ...differenceWith(target, result, fn2)];
|
|
580
|
+
}),
|
|
581
|
+
fn2
|
|
582
|
+
);
|
|
583
|
+
}
|
|
584
|
+
function xor(...values) {
|
|
585
|
+
return xorWith(...values, (a, b) => a === b);
|
|
586
|
+
}
|
|
587
|
+
function pick(object, keys) {
|
|
588
|
+
return keys.reduce(
|
|
589
|
+
(result, key3) => {
|
|
590
|
+
result[key3] = object[key3];
|
|
591
|
+
return result;
|
|
592
|
+
},
|
|
593
|
+
{}
|
|
594
|
+
);
|
|
595
|
+
}
|
|
596
|
+
function pickBy(object, fn2) {
|
|
597
|
+
const ownKeys = [...Object.keys(object), ...Object.getOwnPropertySymbols(object)];
|
|
598
|
+
return ownKeys.reduce((result, key3) => {
|
|
599
|
+
const value = object[key3];
|
|
600
|
+
if (fn2(value, key3)) {
|
|
601
|
+
result[key3] = value;
|
|
602
|
+
}
|
|
603
|
+
return result;
|
|
604
|
+
}, {});
|
|
605
|
+
}
|
|
606
|
+
function omit(object, keys) {
|
|
607
|
+
const ownKeys = [...Object.keys(object), ...Object.getOwnPropertySymbols(object)];
|
|
608
|
+
return ownKeys.reduce(
|
|
609
|
+
(result, key3) => {
|
|
610
|
+
if (!keys.includes(key3)) {
|
|
611
|
+
result[key3] = object[key3];
|
|
612
|
+
}
|
|
613
|
+
return result;
|
|
614
|
+
},
|
|
615
|
+
{}
|
|
616
|
+
);
|
|
617
|
+
}
|
|
618
|
+
function omitBy(object, fn2) {
|
|
619
|
+
const ownKeys = [...Object.keys(object), ...Object.getOwnPropertySymbols(object)];
|
|
620
|
+
return ownKeys.reduce((result, key3) => {
|
|
621
|
+
const value = object[key3];
|
|
622
|
+
if (!fn2(value, key3)) {
|
|
623
|
+
result[key3] = value;
|
|
624
|
+
}
|
|
625
|
+
return result;
|
|
626
|
+
}, {});
|
|
627
|
+
}
|
|
628
|
+
function mapObject(object, fn2) {
|
|
629
|
+
return Object.entries(object).reduce(
|
|
630
|
+
(result, [key3, value]) => {
|
|
631
|
+
const entry = fn2(key3, value);
|
|
632
|
+
if (isArray(entry)) {
|
|
633
|
+
const [newKey, newValue] = entry;
|
|
634
|
+
result[newKey] = newValue;
|
|
635
|
+
}
|
|
636
|
+
return result;
|
|
637
|
+
},
|
|
638
|
+
{}
|
|
639
|
+
);
|
|
640
|
+
}
|
|
641
|
+
function promiseWithResolvers() {
|
|
642
|
+
let resolve;
|
|
643
|
+
let reject;
|
|
644
|
+
const promise = new Promise((_resolver, _reject) => {
|
|
645
|
+
resolve = _resolver;
|
|
646
|
+
reject = _reject;
|
|
647
|
+
});
|
|
648
|
+
return { promise, resolve, reject };
|
|
649
|
+
}
|
|
650
|
+
var util_exports = {};
|
|
651
|
+
__export(util_exports, {
|
|
652
|
+
cancelAnimationFrame: () => cancelAnimationFrame,
|
|
653
|
+
classes: () => classes$1d,
|
|
654
|
+
copyText: () => copyText,
|
|
655
|
+
createNamespaceFn: () => createNamespaceFn,
|
|
656
|
+
createStorage: () => createStorage,
|
|
657
|
+
doubleRaf: () => doubleRaf,
|
|
658
|
+
download: () => download,
|
|
659
|
+
getAllParentScroller: () => getAllParentScroller$1,
|
|
660
|
+
getParentScroller: () => getParentScroller$1,
|
|
661
|
+
getRect: () => getRect,
|
|
662
|
+
getScrollLeft: () => getScrollLeft,
|
|
663
|
+
getScrollTop: () => getScrollTop,
|
|
664
|
+
getStyle: () => getStyle$1,
|
|
665
|
+
inViewport: () => inViewport,
|
|
666
|
+
localStorage: () => localStorage,
|
|
667
|
+
mitt: () => default2,
|
|
668
|
+
motion: () => motion,
|
|
669
|
+
prettyJSONObject: () => prettyJSONObject,
|
|
670
|
+
preventDefault: () => preventDefault,
|
|
671
|
+
raf: () => raf,
|
|
672
|
+
requestAnimationFrame: () => requestAnimationFrame$1,
|
|
673
|
+
sessionStorage: () => sessionStorage,
|
|
674
|
+
tryParseJSON: () => tryParseJSON
|
|
675
|
+
});
|
|
137
676
|
function cancelAnimationFrame(handle) {
|
|
138
677
|
const globalThis2 = getGlobalThis();
|
|
139
678
|
globalThis2.cancelAnimationFrame ? globalThis2.cancelAnimationFrame(handle) : globalThis2.clearTimeout(handle);
|
|
@@ -147,10 +686,33 @@ function classes$1d(...classes2) {
|
|
|
147
686
|
return className;
|
|
148
687
|
});
|
|
149
688
|
}
|
|
689
|
+
function copyText(value) {
|
|
690
|
+
if (!value) {
|
|
691
|
+
return;
|
|
692
|
+
}
|
|
693
|
+
const textArea = document.createElement("textarea");
|
|
694
|
+
textArea.value = value;
|
|
695
|
+
textArea.style.position = "fixed";
|
|
696
|
+
textArea.style.opacity = "0";
|
|
697
|
+
document.body.appendChild(textArea);
|
|
698
|
+
textArea.select();
|
|
699
|
+
document.execCommand("copy");
|
|
700
|
+
document.body.removeChild(textArea);
|
|
701
|
+
}
|
|
150
702
|
function camelize(s) {
|
|
151
703
|
s = s.replace(/-(\w)/g, (_, p) => p.toUpperCase());
|
|
152
704
|
return s.replace(s.charAt(0), s.charAt(0).toLowerCase());
|
|
153
705
|
}
|
|
706
|
+
function ensurePrefix(s, prefix) {
|
|
707
|
+
return s.startsWith(prefix) ? s : prefix + s;
|
|
708
|
+
}
|
|
709
|
+
function ensureSuffix(s, suffix) {
|
|
710
|
+
return s.endsWith(suffix) ? s : s + suffix;
|
|
711
|
+
}
|
|
712
|
+
var key2 = 0;
|
|
713
|
+
function genStringKey() {
|
|
714
|
+
return `generated-key-${key2++}`;
|
|
715
|
+
}
|
|
154
716
|
function kebabCase(s) {
|
|
155
717
|
const ret = s.replace(/([A-Z])/g, " $1").trim();
|
|
156
718
|
return ret.split(" ").join("-").toLowerCase();
|
|
@@ -158,6 +720,37 @@ function kebabCase(s) {
|
|
|
158
720
|
function pascalCase(s) {
|
|
159
721
|
return camelize(s).replace(s.charAt(0), s.charAt(0).toUpperCase());
|
|
160
722
|
}
|
|
723
|
+
function lowerFirst(s) {
|
|
724
|
+
return s.charAt(0).toLowerCase() + s.slice(1);
|
|
725
|
+
}
|
|
726
|
+
function upperFirst(s) {
|
|
727
|
+
return s.charAt(0).toUpperCase() + s.slice(1);
|
|
728
|
+
}
|
|
729
|
+
function randomColor() {
|
|
730
|
+
const letters = "0123456789abcdef";
|
|
731
|
+
let color = "#";
|
|
732
|
+
for (let i = 0; i < 6; i++) {
|
|
733
|
+
color += letters[Math.floor(Math.random() * 16)];
|
|
734
|
+
}
|
|
735
|
+
return color;
|
|
736
|
+
}
|
|
737
|
+
function randomString(length = 10) {
|
|
738
|
+
let str = baseRandomString();
|
|
739
|
+
while (str.length < length) {
|
|
740
|
+
str += baseRandomString();
|
|
741
|
+
}
|
|
742
|
+
function baseRandomString() {
|
|
743
|
+
return Math.random().toString(36).slice(2);
|
|
744
|
+
}
|
|
745
|
+
return str.slice(0, length);
|
|
746
|
+
}
|
|
747
|
+
function slash(path) {
|
|
748
|
+
const isExtendedLengthPath = path.startsWith("\\\\?\\");
|
|
749
|
+
if (isExtendedLengthPath) {
|
|
750
|
+
return path;
|
|
751
|
+
}
|
|
752
|
+
return path.replace(/\\/g, "/");
|
|
753
|
+
}
|
|
161
754
|
function createNamespaceFn(namespace) {
|
|
162
755
|
return (name2) => {
|
|
163
756
|
const componentName = `${namespace}-${name2}`;
|
|
@@ -191,6 +784,33 @@ function doubleRaf() {
|
|
|
191
784
|
function getStyle$1(element) {
|
|
192
785
|
return window.getComputedStyle(element);
|
|
193
786
|
}
|
|
787
|
+
function getParentScroller$1(el) {
|
|
788
|
+
let element = el;
|
|
789
|
+
while (element) {
|
|
790
|
+
if (!element.parentNode) {
|
|
791
|
+
break;
|
|
792
|
+
}
|
|
793
|
+
element = element.parentNode;
|
|
794
|
+
if (element === document.body || element === document.documentElement) {
|
|
795
|
+
break;
|
|
796
|
+
}
|
|
797
|
+
const scrollRE = /(scroll|auto)/;
|
|
798
|
+
const { overflowY, overflow } = getStyle$1(element);
|
|
799
|
+
if (scrollRE.test(overflowY) || scrollRE.test(overflow)) {
|
|
800
|
+
return element;
|
|
801
|
+
}
|
|
802
|
+
}
|
|
803
|
+
return window;
|
|
804
|
+
}
|
|
805
|
+
function getAllParentScroller$1(el) {
|
|
806
|
+
const allParentScroller = [];
|
|
807
|
+
let element = el;
|
|
808
|
+
while (!isWindow(element)) {
|
|
809
|
+
element = getParentScroller$1(element);
|
|
810
|
+
allParentScroller.push(element);
|
|
811
|
+
}
|
|
812
|
+
return allParentScroller;
|
|
813
|
+
}
|
|
194
814
|
function getRect(element) {
|
|
195
815
|
if (isWindow(element)) {
|
|
196
816
|
const width = element.innerWidth;
|
|
@@ -226,6 +846,9 @@ function inViewport(element) {
|
|
|
226
846
|
const yInViewport = top2 <= height && bottom2 >= 0;
|
|
227
847
|
return xInViewport && yInViewport;
|
|
228
848
|
}
|
|
849
|
+
function prettyJSONObject(jsonObject) {
|
|
850
|
+
return JSON.stringify(jsonObject, null, 2);
|
|
851
|
+
}
|
|
229
852
|
function preventDefault(event) {
|
|
230
853
|
if (event.cancelable === false) {
|
|
231
854
|
return;
|
|
@@ -261,8 +884,25 @@ function createStorage(storage) {
|
|
|
261
884
|
}
|
|
262
885
|
});
|
|
263
886
|
}
|
|
264
|
-
createStorage(getGlobalThis().sessionStorage);
|
|
265
|
-
createStorage(getGlobalThis().localStorage);
|
|
887
|
+
var sessionStorage = createStorage(getGlobalThis().sessionStorage);
|
|
888
|
+
var localStorage = createStorage(getGlobalThis().localStorage);
|
|
889
|
+
function tryParseJSON(json) {
|
|
890
|
+
try {
|
|
891
|
+
return JSON.parse(json);
|
|
892
|
+
} catch (e) {
|
|
893
|
+
return void 0;
|
|
894
|
+
}
|
|
895
|
+
}
|
|
896
|
+
function download(val, filename = "file") {
|
|
897
|
+
const a = document.createElement("a");
|
|
898
|
+
a.style.display = "none";
|
|
899
|
+
a.href = isString(val) ? val : URL.createObjectURL(val);
|
|
900
|
+
a.download = filename;
|
|
901
|
+
document.body.appendChild(a);
|
|
902
|
+
a.click();
|
|
903
|
+
URL.revokeObjectURL(a.href);
|
|
904
|
+
document.body.removeChild(a);
|
|
905
|
+
}
|
|
266
906
|
function motion(options) {
|
|
267
907
|
const {
|
|
268
908
|
from,
|
|
@@ -338,6 +978,8 @@ function motion(options) {
|
|
|
338
978
|
getState
|
|
339
979
|
};
|
|
340
980
|
}
|
|
981
|
+
__reExport(util_exports, mitt_star);
|
|
982
|
+
__reExport(src_exports, util_exports);
|
|
341
983
|
function call(fn2, ...args) {
|
|
342
984
|
if (isArray(fn2)) {
|
|
343
985
|
return fn2.map((f) => f(...args));
|
|
@@ -346,6 +988,29 @@ function call(fn2, ...args) {
|
|
|
346
988
|
return fn2(...args);
|
|
347
989
|
}
|
|
348
990
|
}
|
|
991
|
+
function once(fn2) {
|
|
992
|
+
let called = false;
|
|
993
|
+
let result;
|
|
994
|
+
return function(...args) {
|
|
995
|
+
if (called) {
|
|
996
|
+
return result;
|
|
997
|
+
}
|
|
998
|
+
called = true;
|
|
999
|
+
result = fn2.apply(this, args);
|
|
1000
|
+
return result;
|
|
1001
|
+
};
|
|
1002
|
+
}
|
|
1003
|
+
function debounce$1(fn2, delay2 = 0) {
|
|
1004
|
+
let timer;
|
|
1005
|
+
return function(...args) {
|
|
1006
|
+
if (timer) {
|
|
1007
|
+
clearTimeout(timer);
|
|
1008
|
+
}
|
|
1009
|
+
timer = setTimeout(() => {
|
|
1010
|
+
fn2.apply(this, args);
|
|
1011
|
+
}, delay2);
|
|
1012
|
+
};
|
|
1013
|
+
}
|
|
349
1014
|
function throttle(fn2, delay2 = 200) {
|
|
350
1015
|
let timer;
|
|
351
1016
|
let start2 = 0;
|
|
@@ -368,6 +1033,137 @@ function throttle(fn2, delay2 = 200) {
|
|
|
368
1033
|
}
|
|
369
1034
|
};
|
|
370
1035
|
}
|
|
1036
|
+
function NOOP() {
|
|
1037
|
+
}
|
|
1038
|
+
function cloneDeepWith(value, fn2) {
|
|
1039
|
+
const cache = /* @__PURE__ */ new WeakMap();
|
|
1040
|
+
function baseCloneDeep(value2, cache2) {
|
|
1041
|
+
const customResult = fn2(value2);
|
|
1042
|
+
if (customResult !== void 0) {
|
|
1043
|
+
return customResult;
|
|
1044
|
+
}
|
|
1045
|
+
if (!isObject(value2)) {
|
|
1046
|
+
return value2;
|
|
1047
|
+
}
|
|
1048
|
+
if (cache2.has(value2)) {
|
|
1049
|
+
return cache2.get(value2);
|
|
1050
|
+
}
|
|
1051
|
+
if (isDate(value2)) {
|
|
1052
|
+
return new Date(value2);
|
|
1053
|
+
}
|
|
1054
|
+
if (isRegExp(value2)) {
|
|
1055
|
+
return new RegExp(value2);
|
|
1056
|
+
}
|
|
1057
|
+
if (isMap(value2)) {
|
|
1058
|
+
const result = /* @__PURE__ */ new Map();
|
|
1059
|
+
cache2.set(value2, result);
|
|
1060
|
+
value2.forEach((val, key3) => {
|
|
1061
|
+
result.set(baseCloneDeep(key3, cache2), baseCloneDeep(val, cache2));
|
|
1062
|
+
});
|
|
1063
|
+
return result;
|
|
1064
|
+
}
|
|
1065
|
+
if (isSet(value2)) {
|
|
1066
|
+
const result = /* @__PURE__ */ new Set();
|
|
1067
|
+
cache2.set(value2, result);
|
|
1068
|
+
value2.forEach((val) => {
|
|
1069
|
+
result.add(baseCloneDeep(val, cache2));
|
|
1070
|
+
});
|
|
1071
|
+
return result;
|
|
1072
|
+
}
|
|
1073
|
+
if (toRawType(value2) === "String" || toRawType(value2) === "Number" || toRawType(value2) === "Boolean") {
|
|
1074
|
+
return newConstructor(value2, value2.valueOf());
|
|
1075
|
+
}
|
|
1076
|
+
if (isWeakMap(value2) || isWeakSet(value2) || isError(value2) || isDOMException(value2)) {
|
|
1077
|
+
return {};
|
|
1078
|
+
}
|
|
1079
|
+
if (isTypedArray(value2)) {
|
|
1080
|
+
return newConstructor(value2, baseCloneArrayBuffer(value2.buffer), value2.byteOffset, value2.length);
|
|
1081
|
+
}
|
|
1082
|
+
if (isDataView(value2)) {
|
|
1083
|
+
return newConstructor(value2, baseCloneArrayBuffer(value2.buffer), value2.byteOffset, value2.byteLength);
|
|
1084
|
+
}
|
|
1085
|
+
if (isArrayBuffer(value2)) {
|
|
1086
|
+
return baseCloneArrayBuffer(value2);
|
|
1087
|
+
}
|
|
1088
|
+
if (isArray(value2)) {
|
|
1089
|
+
const result = [];
|
|
1090
|
+
cache2.set(value2, result);
|
|
1091
|
+
value2.forEach((value3, index) => {
|
|
1092
|
+
result[index] = baseCloneDeep(value3, cache2);
|
|
1093
|
+
});
|
|
1094
|
+
return result;
|
|
1095
|
+
}
|
|
1096
|
+
if (isPlainObject(value2)) {
|
|
1097
|
+
const result = Object.create(Reflect.getPrototypeOf(value2));
|
|
1098
|
+
cache2.set(value2, result);
|
|
1099
|
+
const ownKeys = [...Object.keys(value2), ...Object.getOwnPropertySymbols(value2)];
|
|
1100
|
+
ownKeys.forEach((key3) => {
|
|
1101
|
+
result[key3] = baseCloneDeep(value2[key3], cache2);
|
|
1102
|
+
});
|
|
1103
|
+
return result;
|
|
1104
|
+
}
|
|
1105
|
+
return value2;
|
|
1106
|
+
}
|
|
1107
|
+
function baseCloneArrayBuffer(value2) {
|
|
1108
|
+
const result = new ArrayBuffer(value2.byteLength);
|
|
1109
|
+
new Uint8Array(result).set(new Uint8Array(value2));
|
|
1110
|
+
return result;
|
|
1111
|
+
}
|
|
1112
|
+
function newConstructor(value2, ...args) {
|
|
1113
|
+
return new value2.constructor(...args);
|
|
1114
|
+
}
|
|
1115
|
+
return baseCloneDeep(value, cache);
|
|
1116
|
+
}
|
|
1117
|
+
function cloneDeep(value) {
|
|
1118
|
+
return cloneDeepWith(value, () => void 0);
|
|
1119
|
+
}
|
|
1120
|
+
function mergeWith(object, ...sources) {
|
|
1121
|
+
const fn2 = at(sources, -1);
|
|
1122
|
+
const targets = [object, ...sources.slice(0, -1)];
|
|
1123
|
+
let len = targets.length - 1;
|
|
1124
|
+
let result = targets[len];
|
|
1125
|
+
while (len) {
|
|
1126
|
+
result = baseMergeWith(targets[len - 1], result, fn2);
|
|
1127
|
+
len--;
|
|
1128
|
+
}
|
|
1129
|
+
function baseMergeWith(object2, source, fn22) {
|
|
1130
|
+
function baseMerge(target, src) {
|
|
1131
|
+
for (const key3 in src) {
|
|
1132
|
+
if (hasOwn(src, key3)) {
|
|
1133
|
+
const srcValue = src[key3];
|
|
1134
|
+
const targetValue = target[key3];
|
|
1135
|
+
const customResult = fn22(targetValue, srcValue, key3, object2, source);
|
|
1136
|
+
if (customResult !== void 0) {
|
|
1137
|
+
target[key3] = customResult;
|
|
1138
|
+
} else if (isObject(srcValue)) {
|
|
1139
|
+
if (isObject(targetValue)) {
|
|
1140
|
+
target[key3] = baseMerge(targetValue, srcValue);
|
|
1141
|
+
} else {
|
|
1142
|
+
target[key3] = baseMerge(isArray(srcValue) ? [] : {}, srcValue);
|
|
1143
|
+
}
|
|
1144
|
+
} else {
|
|
1145
|
+
target[key3] = srcValue;
|
|
1146
|
+
}
|
|
1147
|
+
}
|
|
1148
|
+
}
|
|
1149
|
+
return target;
|
|
1150
|
+
}
|
|
1151
|
+
return baseMerge(object2, source);
|
|
1152
|
+
}
|
|
1153
|
+
return result;
|
|
1154
|
+
}
|
|
1155
|
+
function merge$1(object, ...sources) {
|
|
1156
|
+
return mergeWith(object, ...sources, () => void 0);
|
|
1157
|
+
}
|
|
1158
|
+
function toArrayBuffer(file) {
|
|
1159
|
+
return new Promise((resolve) => {
|
|
1160
|
+
const fileReader = new FileReader();
|
|
1161
|
+
fileReader.onload = () => {
|
|
1162
|
+
resolve(fileReader.result);
|
|
1163
|
+
};
|
|
1164
|
+
fileReader.readAsArrayBuffer(file);
|
|
1165
|
+
});
|
|
1166
|
+
}
|
|
371
1167
|
function toDataURL(file) {
|
|
372
1168
|
return new Promise((resolve) => {
|
|
373
1169
|
const fileReader = new FileReader();
|
|
@@ -377,6 +1173,82 @@ function toDataURL(file) {
|
|
|
377
1173
|
fileReader.readAsDataURL(file);
|
|
378
1174
|
});
|
|
379
1175
|
}
|
|
1176
|
+
function toText(file) {
|
|
1177
|
+
return new Promise((resolve) => {
|
|
1178
|
+
const fileReader = new FileReader();
|
|
1179
|
+
fileReader.onload = () => {
|
|
1180
|
+
resolve(fileReader.result);
|
|
1181
|
+
};
|
|
1182
|
+
fileReader.readAsText(file);
|
|
1183
|
+
});
|
|
1184
|
+
}
|
|
1185
|
+
function maxBy(arr, fn2) {
|
|
1186
|
+
if (!arr.length) {
|
|
1187
|
+
return;
|
|
1188
|
+
}
|
|
1189
|
+
return arr.reduce((result, item) => fn2(result) > fn2(item) ? result : item, arr[0]);
|
|
1190
|
+
}
|
|
1191
|
+
function minBy(arr, fn2) {
|
|
1192
|
+
if (!arr.length) {
|
|
1193
|
+
return;
|
|
1194
|
+
}
|
|
1195
|
+
return arr.reduce((result, item) => fn2(result) < fn2(item) ? result : item, arr[0]);
|
|
1196
|
+
}
|
|
1197
|
+
function sum$1(arr) {
|
|
1198
|
+
return arr.reduce((ret, val) => ret + val, 0);
|
|
1199
|
+
}
|
|
1200
|
+
function sumBy(arr, fn2) {
|
|
1201
|
+
return arr.reduce((ret, val) => ret + fn2(val), 0);
|
|
1202
|
+
}
|
|
1203
|
+
function sumHash(value) {
|
|
1204
|
+
function sum2(hash2, value2) {
|
|
1205
|
+
for (let i = 0; i < value2.length; i++) {
|
|
1206
|
+
const chr = value2.charCodeAt(i);
|
|
1207
|
+
hash2 = (hash2 << 5) - hash2 + chr;
|
|
1208
|
+
hash2 |= 0;
|
|
1209
|
+
}
|
|
1210
|
+
return hash2 < 0 ? hash2 * -2 : hash2;
|
|
1211
|
+
}
|
|
1212
|
+
function baseSumHash(hash2, value2, key3, seen) {
|
|
1213
|
+
hash2 = sum2(hash2, key3);
|
|
1214
|
+
hash2 = sum2(hash2, toTypeString(value2));
|
|
1215
|
+
hash2 = sum2(hash2, typeof value2);
|
|
1216
|
+
if (value2 === null) {
|
|
1217
|
+
return sum2(hash2, "null");
|
|
1218
|
+
}
|
|
1219
|
+
if (value2 === void 0) {
|
|
1220
|
+
return sum2(hash2, "undefined");
|
|
1221
|
+
}
|
|
1222
|
+
if (isObject(value2) || isFunction(value2)) {
|
|
1223
|
+
if (seen.includes(value2)) {
|
|
1224
|
+
return sum2(hash2, `[Circular]${key3}`);
|
|
1225
|
+
}
|
|
1226
|
+
seen.push(value2);
|
|
1227
|
+
hash2 = Object.keys(value2).sort().reduce((hash22, key4) => baseSumHash(hash22, value2[key4], key4, seen), hash2);
|
|
1228
|
+
if (isFunction(value2.valueOf)) {
|
|
1229
|
+
return sum2(hash2, String(value2.valueOf()));
|
|
1230
|
+
}
|
|
1231
|
+
return hash2;
|
|
1232
|
+
}
|
|
1233
|
+
return sum2(hash2, value2.toString());
|
|
1234
|
+
}
|
|
1235
|
+
return baseSumHash(0, value, "", []).toString(16).padStart(8, "0");
|
|
1236
|
+
}
|
|
1237
|
+
function mean(arr) {
|
|
1238
|
+
return sum$1(arr) / arr.length;
|
|
1239
|
+
}
|
|
1240
|
+
function meanBy(arr, fn2) {
|
|
1241
|
+
return sumBy(arr, fn2) / arr.length;
|
|
1242
|
+
}
|
|
1243
|
+
function sample(arr) {
|
|
1244
|
+
if (!arr.length) {
|
|
1245
|
+
return;
|
|
1246
|
+
}
|
|
1247
|
+
return arr[randomNumber(0, arr.length - 1)];
|
|
1248
|
+
}
|
|
1249
|
+
function round$2(val, precision = 0) {
|
|
1250
|
+
return baseRound(val, precision, Math.round);
|
|
1251
|
+
}
|
|
380
1252
|
function baseRound(val, precision = 0, fn2) {
|
|
381
1253
|
precision = clamp$1(precision, -292, 292);
|
|
382
1254
|
if (!precision) {
|
|
@@ -388,6 +1260,18 @@ function baseRound(val, precision = 0, fn2) {
|
|
|
388
1260
|
function floor$1(val, precision = 0) {
|
|
389
1261
|
return baseRound(val, precision, Math.floor);
|
|
390
1262
|
}
|
|
1263
|
+
function ceil$1(val, precision = 0) {
|
|
1264
|
+
return baseRound(val, precision, Math.ceil);
|
|
1265
|
+
}
|
|
1266
|
+
function assert(condition, source, message) {
|
|
1267
|
+
return assert$1(condition, `Varlet [${source}]: ${message}`);
|
|
1268
|
+
}
|
|
1269
|
+
function warn(source, message) {
|
|
1270
|
+
console.warn(`Varlet [${source}]: ${message}`);
|
|
1271
|
+
}
|
|
1272
|
+
function error$1(source, message) {
|
|
1273
|
+
console.error(`Varlet [${source}]: ${message}`);
|
|
1274
|
+
}
|
|
391
1275
|
var isURL = (val) => {
|
|
392
1276
|
if (!val) {
|
|
393
1277
|
return false;
|
|
@@ -398,7 +1282,7 @@ var __defProp$y = Object.defineProperty;
|
|
|
398
1282
|
var __getOwnPropSymbols$y = Object.getOwnPropertySymbols;
|
|
399
1283
|
var __hasOwnProp$y = Object.prototype.hasOwnProperty;
|
|
400
1284
|
var __propIsEnum$y = Object.prototype.propertyIsEnumerable;
|
|
401
|
-
var __defNormalProp$y = (obj,
|
|
1285
|
+
var __defNormalProp$y = (obj, key3, value) => key3 in obj ? __defProp$y(obj, key3, { enumerable: true, configurable: true, writable: true, value }) : obj[key3] = value;
|
|
402
1286
|
var __spreadValues$y = (a, b) => {
|
|
403
1287
|
for (var prop in b || (b = {}))
|
|
404
1288
|
if (__hasOwnProp$y.call(b, prop))
|
|
@@ -521,19 +1405,19 @@ function onSmartUnmounted(hook) {
|
|
|
521
1405
|
hook();
|
|
522
1406
|
});
|
|
523
1407
|
}
|
|
524
|
-
function keyInProvides(
|
|
1408
|
+
function keyInProvides(key3) {
|
|
525
1409
|
const instance = vue.getCurrentInstance();
|
|
526
|
-
return
|
|
1410
|
+
return key3 in instance.provides;
|
|
527
1411
|
}
|
|
528
|
-
function useParent(
|
|
529
|
-
if (!keyInProvides(
|
|
1412
|
+
function useParent(key3) {
|
|
1413
|
+
if (!keyInProvides(key3)) {
|
|
530
1414
|
return {
|
|
531
1415
|
index: null,
|
|
532
1416
|
parentProvider: null,
|
|
533
1417
|
bindParent: null
|
|
534
1418
|
};
|
|
535
1419
|
}
|
|
536
|
-
const provider = vue.inject(
|
|
1420
|
+
const provider = vue.inject(key3);
|
|
537
1421
|
const _a = provider, { childInstances, collect, clear: clear2 } = _a, parentProvider = __objRest(_a, ["childInstances", "collect", "clear"]);
|
|
538
1422
|
const childInstance = vue.getCurrentInstance();
|
|
539
1423
|
const index = vue.computed(() => childInstances.indexOf(childInstance));
|
|
@@ -574,7 +1458,7 @@ function flatVNodes(subTree) {
|
|
|
574
1458
|
flat(subTree);
|
|
575
1459
|
return vNodes;
|
|
576
1460
|
}
|
|
577
|
-
function useChildren(
|
|
1461
|
+
function useChildren(key3) {
|
|
578
1462
|
const parentInstance = vue.getCurrentInstance();
|
|
579
1463
|
const childInstances = vue.reactive([]);
|
|
580
1464
|
const childProviders = [];
|
|
@@ -593,7 +1477,7 @@ function useChildren(key) {
|
|
|
593
1477
|
removeItem(childProviders, childProvider);
|
|
594
1478
|
};
|
|
595
1479
|
const bindChildren = (parentProvider) => {
|
|
596
|
-
vue.provide(
|
|
1480
|
+
vue.provide(key3, __spreadValues$y({
|
|
597
1481
|
childInstances,
|
|
598
1482
|
collect,
|
|
599
1483
|
clear: clear2
|
|
@@ -762,12 +1646,12 @@ function useWindowSize(options = {}) {
|
|
|
762
1646
|
height
|
|
763
1647
|
};
|
|
764
1648
|
}
|
|
765
|
-
function useVModel(props2,
|
|
1649
|
+
function useVModel(props2, key3, options = {}) {
|
|
766
1650
|
const { passive: passive2 = true, eventName, defaultValue, emit } = options;
|
|
767
|
-
const event = eventName != null ? eventName : `onUpdate:${
|
|
1651
|
+
const event = eventName != null ? eventName : `onUpdate:${key3.toString()}`;
|
|
768
1652
|
const getValue = () => {
|
|
769
1653
|
var _a;
|
|
770
|
-
return (_a = props2[
|
|
1654
|
+
return (_a = props2[key3]) != null ? _a : defaultValue;
|
|
771
1655
|
};
|
|
772
1656
|
if (!passive2) {
|
|
773
1657
|
return vue.computed({
|
|
@@ -782,7 +1666,7 @@ function useVModel(props2, key, options = {}) {
|
|
|
782
1666
|
const proxy = vue.ref(getValue());
|
|
783
1667
|
let shouldEmit = true;
|
|
784
1668
|
vue.watch(
|
|
785
|
-
() => props2[
|
|
1669
|
+
() => props2[key3],
|
|
786
1670
|
() => {
|
|
787
1671
|
shouldEmit = false;
|
|
788
1672
|
proxy.value = getValue();
|
|
@@ -853,7 +1737,7 @@ var __getOwnPropDescs$c = Object.getOwnPropertyDescriptors;
|
|
|
853
1737
|
var __getOwnPropSymbols$x = Object.getOwnPropertySymbols;
|
|
854
1738
|
var __hasOwnProp$x = Object.prototype.hasOwnProperty;
|
|
855
1739
|
var __propIsEnum$x = Object.prototype.propertyIsEnumerable;
|
|
856
|
-
var __defNormalProp$x = (obj,
|
|
1740
|
+
var __defNormalProp$x = (obj, key3, value) => key3 in obj ? __defProp$x(obj, key3, { enumerable: true, configurable: true, writable: true, value }) : obj[key3] = value;
|
|
857
1741
|
var __spreadValues$x = (a, b) => {
|
|
858
1742
|
for (var prop in b || (b = {}))
|
|
859
1743
|
if (__hasOwnProp$x.call(b, prop))
|
|
@@ -887,8 +1771,8 @@ var __async$k = (__this, __arguments, generator) => {
|
|
|
887
1771
|
});
|
|
888
1772
|
};
|
|
889
1773
|
function pickProps(props2, propsKey) {
|
|
890
|
-
return isArray(propsKey) ? propsKey.reduce((pickedProps,
|
|
891
|
-
pickedProps[
|
|
1774
|
+
return isArray(propsKey) ? propsKey.reduce((pickedProps, key3) => {
|
|
1775
|
+
pickedProps[key3] = props2[key3];
|
|
892
1776
|
return pickedProps;
|
|
893
1777
|
}, {}) : props2[propsKey];
|
|
894
1778
|
}
|
|
@@ -904,18 +1788,18 @@ function withInstall(component, target) {
|
|
|
904
1788
|
}
|
|
905
1789
|
function withPropsDefaultsSetter(target, props2) {
|
|
906
1790
|
target.setPropsDefaults = function(defaults) {
|
|
907
|
-
Object.entries(defaults).forEach(([
|
|
908
|
-
const prop = props2[
|
|
1791
|
+
Object.entries(defaults).forEach(([key3, value]) => {
|
|
1792
|
+
const prop = props2[key3];
|
|
909
1793
|
if (prop == null) {
|
|
910
1794
|
return;
|
|
911
1795
|
}
|
|
912
1796
|
if (isPlainObject(prop)) {
|
|
913
|
-
props2[
|
|
1797
|
+
props2[key3] = __spreadProps$c(__spreadValues$x({}, prop), {
|
|
914
1798
|
default: value
|
|
915
1799
|
});
|
|
916
1800
|
return;
|
|
917
1801
|
}
|
|
918
|
-
props2[
|
|
1802
|
+
props2[key3] = {
|
|
919
1803
|
type: prop,
|
|
920
1804
|
default: value
|
|
921
1805
|
};
|
|
@@ -1055,7 +1939,7 @@ var __getOwnPropDescs$b = Object.getOwnPropertyDescriptors;
|
|
|
1055
1939
|
var __getOwnPropSymbols$w = Object.getOwnPropertySymbols;
|
|
1056
1940
|
var __hasOwnProp$w = Object.prototype.hasOwnProperty;
|
|
1057
1941
|
var __propIsEnum$w = Object.prototype.propertyIsEnumerable;
|
|
1058
|
-
var __defNormalProp$w = (obj,
|
|
1942
|
+
var __defNormalProp$w = (obj, key3, value) => key3 in obj ? __defProp$w(obj, key3, { enumerable: true, configurable: true, writable: true, value }) : obj[key3] = value;
|
|
1059
1943
|
var __spreadValues$w = (a, b) => {
|
|
1060
1944
|
for (var prop in b || (b = {}))
|
|
1061
1945
|
if (__hasOwnProp$w.call(b, prop))
|
|
@@ -1128,14 +2012,14 @@ function removeRipple() {
|
|
|
1128
2012
|
return;
|
|
1129
2013
|
}
|
|
1130
2014
|
const lastRipple = ripples[ripples.length - 1];
|
|
1131
|
-
const
|
|
2015
|
+
const delay2 = ANIMATION_DURATION$1 - performance.now() + Number(lastRipple.dataset.createdAt);
|
|
1132
2016
|
window.setTimeout(() => {
|
|
1133
2017
|
lastRipple.style.opacity = `0`;
|
|
1134
2018
|
window.setTimeout(() => {
|
|
1135
2019
|
var _a;
|
|
1136
2020
|
return (_a = lastRipple.parentNode) == null ? void 0 : _a.removeChild(lastRipple);
|
|
1137
2021
|
}, ANIMATION_DURATION$1);
|
|
1138
|
-
},
|
|
2022
|
+
}, delay2);
|
|
1139
2023
|
};
|
|
1140
2024
|
_ripple.tasker ? window.setTimeout(task, 30) : task();
|
|
1141
2025
|
}
|
|
@@ -1402,7 +2286,7 @@ var __defProp$v = Object.defineProperty;
|
|
|
1402
2286
|
var __getOwnPropSymbols$v = Object.getOwnPropertySymbols;
|
|
1403
2287
|
var __hasOwnProp$v = Object.prototype.hasOwnProperty;
|
|
1404
2288
|
var __propIsEnum$v = Object.prototype.propertyIsEnumerable;
|
|
1405
|
-
var __defNormalProp$v = (obj,
|
|
2289
|
+
var __defNormalProp$v = (obj, key3, value) => key3 in obj ? __defProp$v(obj, key3, { enumerable: true, configurable: true, writable: true, value }) : obj[key3] = value;
|
|
1406
2290
|
var __spreadValues$v = (a, b) => {
|
|
1407
2291
|
for (var prop in b || (b = {}))
|
|
1408
2292
|
if (__hasOwnProp$v.call(b, prop))
|
|
@@ -1551,12 +2435,6 @@ const props$1k = {
|
|
|
1551
2435
|
animationClass: String,
|
|
1552
2436
|
onClick: defineListenerProp()
|
|
1553
2437
|
};
|
|
1554
|
-
function error$1(source, message) {
|
|
1555
|
-
throw Error(`Varlet [${source}]: ${message}`);
|
|
1556
|
-
}
|
|
1557
|
-
function warn(source, message) {
|
|
1558
|
-
console.warn(`Varlet [${source}]: ${message}`);
|
|
1559
|
-
}
|
|
1560
2438
|
function getLeft(element) {
|
|
1561
2439
|
const { left: left2 } = getRect(element);
|
|
1562
2440
|
return left2 + (document.body.scrollLeft || document.documentElement.scrollLeft);
|
|
@@ -1599,13 +2477,11 @@ function getAllParentScroller(el) {
|
|
|
1599
2477
|
function getTarget(target, componentName) {
|
|
1600
2478
|
if (isString(target)) {
|
|
1601
2479
|
const el = document.querySelector(target);
|
|
1602
|
-
|
|
1603
|
-
error$1(componentName, "target element cannot found");
|
|
1604
|
-
}
|
|
2480
|
+
assert(!!el, componentName, "target element cannot found");
|
|
1605
2481
|
return el;
|
|
1606
2482
|
}
|
|
1607
|
-
|
|
1608
|
-
|
|
2483
|
+
assert(isObject(target), componentName, 'type of prop "target" should be an element object');
|
|
2484
|
+
return target;
|
|
1609
2485
|
}
|
|
1610
2486
|
function getViewportSize() {
|
|
1611
2487
|
const { width, height } = getRect(window);
|
|
@@ -1693,8 +2569,8 @@ function scrollTo(element, { top: top2 = 0, left: left2 = 0, duration = 300, ani
|
|
|
1693
2569
|
});
|
|
1694
2570
|
}
|
|
1695
2571
|
function formatStyleVars(styleVars) {
|
|
1696
|
-
return Object.entries(styleVars != null ? styleVars : {}).reduce((styles, [
|
|
1697
|
-
const cssVar =
|
|
2572
|
+
return Object.entries(styleVars != null ? styleVars : {}).reduce((styles, [key3, value]) => {
|
|
2573
|
+
const cssVar = key3.startsWith("--") ? key3 : `--${kebabCase(key3)}`;
|
|
1698
2574
|
styles[cssVar] = value;
|
|
1699
2575
|
return styles;
|
|
1700
2576
|
}, {});
|
|
@@ -1703,7 +2579,7 @@ function padStartFlex(style) {
|
|
|
1703
2579
|
return style === "start" || style === "end" ? `flex-${style}` : style;
|
|
1704
2580
|
}
|
|
1705
2581
|
const focusableSelector = ["button", "input", "select", "textarea", "[tabindex]", "[href]"].map((s) => `${s}:not([disabled])`).join(", ");
|
|
1706
|
-
function focusChildElementByKey(hostElement, parentElement,
|
|
2582
|
+
function focusChildElementByKey(hostElement, parentElement, key3) {
|
|
1707
2583
|
var _a;
|
|
1708
2584
|
const focusableElements = parentElement.querySelectorAll(focusableSelector);
|
|
1709
2585
|
if (!focusableElements.length) {
|
|
@@ -1713,7 +2589,7 @@ function focusChildElementByKey(hostElement, parentElement, key) {
|
|
|
1713
2589
|
(el) => el === document.activeElement
|
|
1714
2590
|
) !== -1;
|
|
1715
2591
|
const activeElementIndex = Array.from(focusableElements).findIndex((el) => el === document.activeElement);
|
|
1716
|
-
if (
|
|
2592
|
+
if (key3 === "ArrowDown") {
|
|
1717
2593
|
if (isActiveHostElement && activeElementIndex === -1 || activeElementIndex === focusableElements.length - 1) {
|
|
1718
2594
|
focusableElements[0].focus();
|
|
1719
2595
|
return;
|
|
@@ -1723,7 +2599,7 @@ function focusChildElementByKey(hostElement, parentElement, key) {
|
|
|
1723
2599
|
return;
|
|
1724
2600
|
}
|
|
1725
2601
|
}
|
|
1726
|
-
if (
|
|
2602
|
+
if (key3 === "ArrowUp") {
|
|
1727
2603
|
if (isActiveHostElement && activeElementIndex === -1 || activeElementIndex === 0) {
|
|
1728
2604
|
(_a = focusableElements[focusableElements.length - 1]) == null ? void 0 : _a.focus();
|
|
1729
2605
|
return;
|
|
@@ -1874,16 +2750,16 @@ function getStyle(element) {
|
|
|
1874
2750
|
const style = element.getAttribute("style");
|
|
1875
2751
|
if (!style) return {};
|
|
1876
2752
|
return style.split(";").filter(Boolean).reduce((style2, item) => {
|
|
1877
|
-
const [
|
|
1878
|
-
style2[camelize(
|
|
2753
|
+
const [key3, value] = item.split(":").map((item2) => item2.trim());
|
|
2754
|
+
style2[camelize(key3)] = value;
|
|
1879
2755
|
return style2;
|
|
1880
2756
|
}, {});
|
|
1881
2757
|
}
|
|
1882
2758
|
function updateRawStyle(element) {
|
|
1883
2759
|
const { value } = element._hover;
|
|
1884
2760
|
const style = getStyle(element);
|
|
1885
|
-
Object.keys(value).forEach((
|
|
1886
|
-
const camelizedKey = camelize(
|
|
2761
|
+
Object.keys(value).forEach((key3) => {
|
|
2762
|
+
const camelizedKey = camelize(key3);
|
|
1887
2763
|
const styleValue = value[camelizedKey];
|
|
1888
2764
|
if (styleValue != null && style[camelizedKey]) {
|
|
1889
2765
|
element._hover.rawStyle[camelizedKey] = style[camelizedKey];
|
|
@@ -1891,18 +2767,18 @@ function updateRawStyle(element) {
|
|
|
1891
2767
|
});
|
|
1892
2768
|
}
|
|
1893
2769
|
function updateStyle(element, styleValue) {
|
|
1894
|
-
Object.keys(styleValue).forEach((
|
|
1895
|
-
const value = styleValue[
|
|
2770
|
+
Object.keys(styleValue).forEach((key3) => {
|
|
2771
|
+
const value = styleValue[key3];
|
|
1896
2772
|
if (value != null) {
|
|
1897
|
-
element.style[
|
|
2773
|
+
element.style[key3] = value;
|
|
1898
2774
|
}
|
|
1899
2775
|
});
|
|
1900
2776
|
}
|
|
1901
2777
|
function clearStyle(element) {
|
|
1902
|
-
Object.keys(element._hover.value).forEach((
|
|
1903
|
-
const value = element._hover.value[
|
|
2778
|
+
Object.keys(element._hover.value).forEach((key3) => {
|
|
2779
|
+
const value = element._hover.value[key3];
|
|
1904
2780
|
if (value != null) {
|
|
1905
|
-
element.style[
|
|
2781
|
+
element.style[key3] = "";
|
|
1906
2782
|
}
|
|
1907
2783
|
});
|
|
1908
2784
|
}
|
|
@@ -2052,7 +2928,7 @@ var __defProp$u = Object.defineProperty;
|
|
|
2052
2928
|
var __getOwnPropSymbols$u = Object.getOwnPropertySymbols;
|
|
2053
2929
|
var __hasOwnProp$u = Object.prototype.hasOwnProperty;
|
|
2054
2930
|
var __propIsEnum$u = Object.prototype.propertyIsEnumerable;
|
|
2055
|
-
var __defNormalProp$u = (obj,
|
|
2931
|
+
var __defNormalProp$u = (obj, key3, value) => key3 in obj ? __defProp$u(obj, key3, { enumerable: true, configurable: true, writable: true, value }) : obj[key3] = value;
|
|
2056
2932
|
var __spreadValues$u = (a, b) => {
|
|
2057
2933
|
for (var prop in b || (b = {}))
|
|
2058
2934
|
if (__hasOwnProp$u.call(b, prop))
|
|
@@ -2517,7 +3393,7 @@ var __defProp$t = Object.defineProperty;
|
|
|
2517
3393
|
var __getOwnPropSymbols$t = Object.getOwnPropertySymbols;
|
|
2518
3394
|
var __hasOwnProp$t = Object.prototype.hasOwnProperty;
|
|
2519
3395
|
var __propIsEnum$t = Object.prototype.propertyIsEnumerable;
|
|
2520
|
-
var __defNormalProp$t = (obj,
|
|
3396
|
+
var __defNormalProp$t = (obj, key3, value) => key3 in obj ? __defProp$t(obj, key3, { enumerable: true, configurable: true, writable: true, value }) : obj[key3] = value;
|
|
2521
3397
|
var __spreadValues$t = (a, b) => {
|
|
2522
3398
|
for (var prop in b || (b = {}))
|
|
2523
3399
|
if (__hasOwnProp$t.call(b, prop))
|
|
@@ -2718,7 +3594,7 @@ var __defProp$s = Object.defineProperty;
|
|
|
2718
3594
|
var __getOwnPropSymbols$s = Object.getOwnPropertySymbols;
|
|
2719
3595
|
var __hasOwnProp$s = Object.prototype.hasOwnProperty;
|
|
2720
3596
|
var __propIsEnum$s = Object.prototype.propertyIsEnumerable;
|
|
2721
|
-
var __defNormalProp$s = (obj,
|
|
3597
|
+
var __defNormalProp$s = (obj, key3, value) => key3 in obj ? __defProp$s(obj, key3, { enumerable: true, configurable: true, writable: true, value }) : obj[key3] = value;
|
|
2722
3598
|
var __spreadValues$s = (a, b) => {
|
|
2723
3599
|
for (var prop in b || (b = {}))
|
|
2724
3600
|
if (__hasOwnProp$s.call(b, prop))
|
|
@@ -3643,7 +4519,7 @@ var __getOwnPropDescs$a = Object.getOwnPropertyDescriptors;
|
|
|
3643
4519
|
var __getOwnPropSymbols$r = Object.getOwnPropertySymbols;
|
|
3644
4520
|
var __hasOwnProp$r = Object.prototype.hasOwnProperty;
|
|
3645
4521
|
var __propIsEnum$r = Object.prototype.propertyIsEnumerable;
|
|
3646
|
-
var __defNormalProp$r = (obj,
|
|
4522
|
+
var __defNormalProp$r = (obj, key3, value) => key3 in obj ? __defProp$r(obj, key3, { enumerable: true, configurable: true, writable: true, value }) : obj[key3] = value;
|
|
3647
4523
|
var __spreadValues$r = (a, b) => {
|
|
3648
4524
|
for (var prop in b || (b = {}))
|
|
3649
4525
|
if (__hasOwnProp$r.call(b, prop))
|
|
@@ -3722,7 +4598,7 @@ var __getOwnPropDescs$9 = Object.getOwnPropertyDescriptors;
|
|
|
3722
4598
|
var __getOwnPropSymbols$q = Object.getOwnPropertySymbols;
|
|
3723
4599
|
var __hasOwnProp$q = Object.prototype.hasOwnProperty;
|
|
3724
4600
|
var __propIsEnum$q = Object.prototype.propertyIsEnumerable;
|
|
3725
|
-
var __defNormalProp$q = (obj,
|
|
4601
|
+
var __defNormalProp$q = (obj, key3, value) => key3 in obj ? __defProp$q(obj, key3, { enumerable: true, configurable: true, writable: true, value }) : obj[key3] = value;
|
|
3726
4602
|
var __spreadValues$q = (a, b) => {
|
|
3727
4603
|
for (var prop in b || (b = {}))
|
|
3728
4604
|
if (__hasOwnProp$q.call(b, prop))
|
|
@@ -4589,8 +5465,8 @@ function mergePaddingObject(paddingObject) {
|
|
|
4589
5465
|
return Object.assign({}, getFreshSideObject(), paddingObject);
|
|
4590
5466
|
}
|
|
4591
5467
|
function expandToHashMap(value, keys) {
|
|
4592
|
-
return keys.reduce(function(hashMap,
|
|
4593
|
-
hashMap[
|
|
5468
|
+
return keys.reduce(function(hashMap, key3) {
|
|
5469
|
+
hashMap[key3] = value;
|
|
4594
5470
|
return hashMap;
|
|
4595
5471
|
}, {});
|
|
4596
5472
|
}
|
|
@@ -4622,10 +5498,10 @@ function detectOverflow(state, options) {
|
|
|
4622
5498
|
var offsetData = state.modifiersData.offset;
|
|
4623
5499
|
if (elementContext === popper && offsetData) {
|
|
4624
5500
|
var offset2 = offsetData[placement];
|
|
4625
|
-
Object.keys(overflowOffsets).forEach(function(
|
|
4626
|
-
var multiply = [right, bottom].indexOf(
|
|
4627
|
-
var axis = [top, bottom].indexOf(
|
|
4628
|
-
overflowOffsets[
|
|
5501
|
+
Object.keys(overflowOffsets).forEach(function(key3) {
|
|
5502
|
+
var multiply = [right, bottom].indexOf(key3) >= 0 ? 1 : -1;
|
|
5503
|
+
var axis = [top, bottom].indexOf(key3) >= 0 ? "y" : "x";
|
|
5504
|
+
overflowOffsets[key3] += offset2[axis] * multiply;
|
|
4629
5505
|
});
|
|
4630
5506
|
}
|
|
4631
5507
|
return overflowOffsets;
|
|
@@ -5065,8 +5941,8 @@ function validateModifiers(modifiers) {
|
|
|
5065
5941
|
modifiers.forEach(function(modifier) {
|
|
5066
5942
|
[].concat(Object.keys(modifier), VALID_PROPERTIES).filter(function(value, index, self2) {
|
|
5067
5943
|
return self2.indexOf(value) === index;
|
|
5068
|
-
}).forEach(function(
|
|
5069
|
-
switch (
|
|
5944
|
+
}).forEach(function(key3) {
|
|
5945
|
+
switch (key3) {
|
|
5070
5946
|
case "name":
|
|
5071
5947
|
if (typeof modifier.name !== "string") {
|
|
5072
5948
|
console.error(format(INVALID_MODIFIER_ERROR, String(modifier.name), '"name"', '"string"', '"' + String(modifier.name) + '"'));
|
|
@@ -5108,7 +5984,7 @@ function validateModifiers(modifiers) {
|
|
|
5108
5984
|
default:
|
|
5109
5985
|
console.error('PopperJS: an invalid property has been provided to the "' + modifier.name + '" modifier, valid properties are ' + VALID_PROPERTIES.map(function(s) {
|
|
5110
5986
|
return '"' + s + '"';
|
|
5111
|
-
}).join(", ") + '; but "' +
|
|
5987
|
+
}).join(", ") + '; but "' + key3 + '" was provided.');
|
|
5112
5988
|
}
|
|
5113
5989
|
modifier.requires && modifier.requires.forEach(function(requirement) {
|
|
5114
5990
|
if (modifiers.find(function(mod2) {
|
|
@@ -5139,8 +6015,8 @@ function mergeByName(modifiers) {
|
|
|
5139
6015
|
}) : current;
|
|
5140
6016
|
return merged2;
|
|
5141
6017
|
}, {});
|
|
5142
|
-
return Object.keys(merged).map(function(
|
|
5143
|
-
return merged[
|
|
6018
|
+
return Object.keys(merged).map(function(key3) {
|
|
6019
|
+
return merged[key3];
|
|
5144
6020
|
});
|
|
5145
6021
|
}
|
|
5146
6022
|
var INVALID_ELEMENT_ERROR = "Popper: Invalid reference or popper argument provided. They must be either a DOM element or virtual element.";
|
|
@@ -5447,7 +6323,7 @@ var __getOwnPropDescs$8 = Object.getOwnPropertyDescriptors;
|
|
|
5447
6323
|
var __getOwnPropSymbols$p = Object.getOwnPropertySymbols;
|
|
5448
6324
|
var __hasOwnProp$p = Object.prototype.hasOwnProperty;
|
|
5449
6325
|
var __propIsEnum$p = Object.prototype.propertyIsEnumerable;
|
|
5450
|
-
var __defNormalProp$p = (obj,
|
|
6326
|
+
var __defNormalProp$p = (obj, key3, value) => key3 in obj ? __defProp$p(obj, key3, { enumerable: true, configurable: true, writable: true, value }) : obj[key3] = value;
|
|
5451
6327
|
var __spreadValues$p = (a, b) => {
|
|
5452
6328
|
for (var prop in b || (b = {}))
|
|
5453
6329
|
if (__hasOwnProp$p.call(b, prop))
|
|
@@ -6175,11 +7051,11 @@ const __sfc__$1k = vue.defineComponent({
|
|
|
6175
7051
|
if (!isFocusing.value) {
|
|
6176
7052
|
return;
|
|
6177
7053
|
}
|
|
6178
|
-
const { key } = event;
|
|
6179
|
-
if (
|
|
7054
|
+
const { key: key3 } = event;
|
|
7055
|
+
if (key3 === "Enter" || key3 === " ") {
|
|
6180
7056
|
preventDefault(event);
|
|
6181
7057
|
}
|
|
6182
|
-
if (
|
|
7058
|
+
if (key3 === "Enter") {
|
|
6183
7059
|
action.value.click();
|
|
6184
7060
|
}
|
|
6185
7061
|
}
|
|
@@ -6239,9 +7115,7 @@ function useMenuSelect() {
|
|
|
6239
7115
|
const { index, parentProvider, bindParent } = useParent(
|
|
6240
7116
|
MENU_SELECT_BIND_MENU_OPTION_KEY
|
|
6241
7117
|
);
|
|
6242
|
-
|
|
6243
|
-
error$1("MenuOption", "<var-menu-option/> must in <var-menu-select/>");
|
|
6244
|
-
}
|
|
7118
|
+
assert(!!bindParent, "MenuOption", "<var-menu-option/> must in <var-menu-select/>");
|
|
6245
7119
|
return {
|
|
6246
7120
|
index,
|
|
6247
7121
|
menuSelect: parentProvider,
|
|
@@ -6426,7 +7300,7 @@ var __getOwnPropDescs$7 = Object.getOwnPropertyDescriptors;
|
|
|
6426
7300
|
var __getOwnPropSymbols$o = Object.getOwnPropertySymbols;
|
|
6427
7301
|
var __hasOwnProp$o = Object.prototype.hasOwnProperty;
|
|
6428
7302
|
var __propIsEnum$o = Object.prototype.propertyIsEnumerable;
|
|
6429
|
-
var __defNormalProp$o = (obj,
|
|
7303
|
+
var __defNormalProp$o = (obj, key3, value) => key3 in obj ? __defProp$o(obj, key3, { enumerable: true, configurable: true, writable: true, value }) : obj[key3] = value;
|
|
6430
7304
|
var __spreadValues$o = (a, b) => {
|
|
6431
7305
|
for (var prop in b || (b = {}))
|
|
6432
7306
|
if (__hasOwnProp$o.call(b, prop))
|
|
@@ -6654,18 +7528,18 @@ const __sfc__$1i = vue.defineComponent({
|
|
|
6654
7528
|
if (props2.disabled || !show.value) {
|
|
6655
7529
|
return;
|
|
6656
7530
|
}
|
|
6657
|
-
const { key } = event;
|
|
6658
|
-
if (["Escape", "ArrowDown", "ArrowUp"].includes(
|
|
7531
|
+
const { key: key3 } = event;
|
|
7532
|
+
if (["Escape", "ArrowDown", "ArrowUp"].includes(key3)) {
|
|
6659
7533
|
preventDefault(event);
|
|
6660
7534
|
}
|
|
6661
|
-
if (
|
|
7535
|
+
if (key3 === "Escape") {
|
|
6662
7536
|
menu.value.$el.focus();
|
|
6663
7537
|
close();
|
|
6664
7538
|
call(props2.onKeyEscape);
|
|
6665
7539
|
return;
|
|
6666
7540
|
}
|
|
6667
|
-
if (
|
|
6668
|
-
focusChildElementByKey(menu.value.$el, menuOptionsRef.value,
|
|
7541
|
+
if (key3 === "ArrowDown" || key3 === "ArrowUp") {
|
|
7542
|
+
focusChildElementByKey(menu.value.$el, menuOptionsRef.value, key3);
|
|
6669
7543
|
}
|
|
6670
7544
|
}
|
|
6671
7545
|
function open() {
|
|
@@ -6708,7 +7582,7 @@ var __defProp$n = Object.defineProperty;
|
|
|
6708
7582
|
var __getOwnPropSymbols$n = Object.getOwnPropertySymbols;
|
|
6709
7583
|
var __hasOwnProp$n = Object.prototype.hasOwnProperty;
|
|
6710
7584
|
var __propIsEnum$n = Object.prototype.propertyIsEnumerable;
|
|
6711
|
-
var __defNormalProp$n = (obj,
|
|
7585
|
+
var __defNormalProp$n = (obj, key3, value) => key3 in obj ? __defProp$n(obj, key3, { enumerable: true, configurable: true, writable: true, value }) : obj[key3] = value;
|
|
6712
7586
|
var __spreadValues$n = (a, b) => {
|
|
6713
7587
|
for (var prop in b || (b = {}))
|
|
6714
7588
|
if (__hasOwnProp$n.call(b, prop))
|
|
@@ -7004,18 +7878,18 @@ const __sfc__$1h = vue.defineComponent({
|
|
|
7004
7878
|
if ((form == null ? void 0 : form.disabled.value) || (form == null ? void 0 : form.readonly.value) || props2.disabled || props2.readonly || !isFocusing.value || !isShowMenuSelect.value) {
|
|
7005
7879
|
return;
|
|
7006
7880
|
}
|
|
7007
|
-
const { key } = event;
|
|
7008
|
-
if (
|
|
7881
|
+
const { key: key3 } = event;
|
|
7882
|
+
if (key3 === "Tab") {
|
|
7009
7883
|
preventDefault(event);
|
|
7010
7884
|
root.value.focus();
|
|
7011
7885
|
isShowMenuSelect.value = false;
|
|
7012
7886
|
return;
|
|
7013
7887
|
}
|
|
7014
|
-
if (!["ArrowUp", "ArrowDown", "Enter"].includes(
|
|
7888
|
+
if (!["ArrowUp", "ArrowDown", "Enter"].includes(key3)) {
|
|
7015
7889
|
input.value.focus();
|
|
7016
7890
|
return;
|
|
7017
7891
|
}
|
|
7018
|
-
if (
|
|
7892
|
+
if (key3 === "Enter") {
|
|
7019
7893
|
yield raf();
|
|
7020
7894
|
(_a = input.value) == null ? void 0 : _a.focus();
|
|
7021
7895
|
}
|
|
@@ -7128,18 +8002,18 @@ const createCache = (max2) => {
|
|
|
7128
8002
|
const cache = [];
|
|
7129
8003
|
return {
|
|
7130
8004
|
cache,
|
|
7131
|
-
has(
|
|
7132
|
-
return this.cache.includes(
|
|
8005
|
+
has(key3) {
|
|
8006
|
+
return this.cache.includes(key3);
|
|
7133
8007
|
},
|
|
7134
|
-
add(
|
|
7135
|
-
if (this.has(
|
|
8008
|
+
add(key3) {
|
|
8009
|
+
if (this.has(key3)) {
|
|
7136
8010
|
return;
|
|
7137
8011
|
}
|
|
7138
8012
|
this.cache.length === max2 && cache.shift();
|
|
7139
|
-
this.cache.push(
|
|
8013
|
+
this.cache.push(key3);
|
|
7140
8014
|
},
|
|
7141
|
-
remove(
|
|
7142
|
-
this.has(
|
|
8015
|
+
remove(key3) {
|
|
8016
|
+
this.has(key3) && removeItem(this.cache, key3);
|
|
7143
8017
|
},
|
|
7144
8018
|
clear() {
|
|
7145
8019
|
this.cache.length = 0;
|
|
@@ -7164,7 +8038,7 @@ var __defProp$m = Object.defineProperty;
|
|
|
7164
8038
|
var __getOwnPropSymbols$m = Object.getOwnPropertySymbols;
|
|
7165
8039
|
var __hasOwnProp$m = Object.prototype.hasOwnProperty;
|
|
7166
8040
|
var __propIsEnum$m = Object.prototype.propertyIsEnumerable;
|
|
7167
|
-
var __defNormalProp$m = (obj,
|
|
8041
|
+
var __defNormalProp$m = (obj, key3, value) => key3 in obj ? __defProp$m(obj, key3, { enumerable: true, configurable: true, writable: true, value }) : obj[key3] = value;
|
|
7168
8042
|
var __spreadValues$m = (a, b) => {
|
|
7169
8043
|
for (var prop in b || (b = {}))
|
|
7170
8044
|
if (__hasOwnProp$m.call(b, prop))
|
|
@@ -7663,16 +8537,16 @@ function __render__$1b(_ctx, _cache) {
|
|
|
7663
8537
|
(vue.openBlock(true), vue.createElementBlock(
|
|
7664
8538
|
vue.Fragment,
|
|
7665
8539
|
null,
|
|
7666
|
-
vue.renderList(_ctx.loadingTypeDict, (nums,
|
|
8540
|
+
vue.renderList(_ctx.loadingTypeDict, (nums, key3) => {
|
|
7667
8541
|
return vue.openBlock(), vue.createElementBlock(
|
|
7668
8542
|
vue.Fragment,
|
|
7669
|
-
{ key },
|
|
8543
|
+
{ key: key3 },
|
|
7670
8544
|
[
|
|
7671
|
-
_ctx.type ===
|
|
8545
|
+
_ctx.type === key3 ? (vue.openBlock(), vue.createElementBlock(
|
|
7672
8546
|
"div",
|
|
7673
8547
|
{
|
|
7674
8548
|
key: 0,
|
|
7675
|
-
class: vue.normalizeClass(_ctx.classes(_ctx.n(
|
|
8549
|
+
class: vue.normalizeClass(_ctx.classes(_ctx.n(key3), _ctx.n(`${key3}--${_ctx.size}`)))
|
|
7676
8550
|
},
|
|
7677
8551
|
[
|
|
7678
8552
|
(vue.openBlock(true), vue.createElementBlock(
|
|
@@ -7682,9 +8556,9 @@ function __render__$1b(_ctx, _cache) {
|
|
|
7682
8556
|
return vue.openBlock(), vue.createElementBlock(
|
|
7683
8557
|
"div",
|
|
7684
8558
|
{
|
|
7685
|
-
key: num +
|
|
8559
|
+
key: num + key3,
|
|
7686
8560
|
style: vue.normalizeStyle({ backgroundColor: _ctx.color }),
|
|
7687
|
-
class: vue.normalizeClass(_ctx.classes(_ctx.n(`${
|
|
8561
|
+
class: vue.normalizeClass(_ctx.classes(_ctx.n(`${key3}-item`), _ctx.n(`${key3}-item--${_ctx.size}`)))
|
|
7688
8562
|
},
|
|
7689
8563
|
null,
|
|
7690
8564
|
6
|
|
@@ -7771,7 +8645,7 @@ var __getOwnPropDescs$6 = Object.getOwnPropertyDescriptors;
|
|
|
7771
8645
|
var __getOwnPropSymbols$l = Object.getOwnPropertySymbols;
|
|
7772
8646
|
var __hasOwnProp$l = Object.prototype.hasOwnProperty;
|
|
7773
8647
|
var __propIsEnum$l = Object.prototype.propertyIsEnumerable;
|
|
7774
|
-
var __defNormalProp$l = (obj,
|
|
8648
|
+
var __defNormalProp$l = (obj, key3, value) => key3 in obj ? __defProp$l(obj, key3, { enumerable: true, configurable: true, writable: true, value }) : obj[key3] = value;
|
|
7775
8649
|
var __spreadValues$l = (a, b) => {
|
|
7776
8650
|
for (var prop in b || (b = {}))
|
|
7777
8651
|
if (__hasOwnProp$l.call(b, prop))
|
|
@@ -8151,7 +9025,7 @@ var __defProp$k = Object.defineProperty;
|
|
|
8151
9025
|
var __getOwnPropSymbols$k = Object.getOwnPropertySymbols;
|
|
8152
9026
|
var __hasOwnProp$k = Object.prototype.hasOwnProperty;
|
|
8153
9027
|
var __propIsEnum$k = Object.prototype.propertyIsEnumerable;
|
|
8154
|
-
var __defNormalProp$k = (obj,
|
|
9028
|
+
var __defNormalProp$k = (obj, key3, value) => key3 in obj ? __defProp$k(obj, key3, { enumerable: true, configurable: true, writable: true, value }) : obj[key3] = value;
|
|
8155
9029
|
var __spreadValues$k = (a, b) => {
|
|
8156
9030
|
for (var prop in b || (b = {}))
|
|
8157
9031
|
if (__hasOwnProp$k.call(b, prop))
|
|
@@ -8290,7 +9164,7 @@ var __defProp$j = Object.defineProperty;
|
|
|
8290
9164
|
var __getOwnPropSymbols$j = Object.getOwnPropertySymbols;
|
|
8291
9165
|
var __hasOwnProp$j = Object.prototype.hasOwnProperty;
|
|
8292
9166
|
var __propIsEnum$j = Object.prototype.propertyIsEnumerable;
|
|
8293
|
-
var __defNormalProp$j = (obj,
|
|
9167
|
+
var __defNormalProp$j = (obj, key3, value) => key3 in obj ? __defProp$j(obj, key3, { enumerable: true, configurable: true, writable: true, value }) : obj[key3] = value;
|
|
8294
9168
|
var __spreadValues$j = (a, b) => {
|
|
8295
9169
|
for (var prop in b || (b = {}))
|
|
8296
9170
|
if (__hasOwnProp$j.call(b, prop))
|
|
@@ -8521,9 +9395,7 @@ function useBottomNavigation() {
|
|
|
8521
9395
|
const { parentProvider, index, bindParent } = useParent(
|
|
8522
9396
|
BOTTOM_NAVIGATION_BIND_BOTTOM_NAVIGATION_ITEM_KEY
|
|
8523
9397
|
);
|
|
8524
|
-
|
|
8525
|
-
error$1("BottomNavigationItem", "<var-bottom-navigation-item/> must in <var-bottom-navigation/>");
|
|
8526
|
-
}
|
|
9398
|
+
assert(!!bindParent, "BottomNavigationItem", "<var-bottom-navigation-item/> must in <var-bottom-navigation/>");
|
|
8527
9399
|
return {
|
|
8528
9400
|
index,
|
|
8529
9401
|
bottomNavigation: parentProvider,
|
|
@@ -8680,9 +9552,7 @@ function useBreadcrumb() {
|
|
|
8680
9552
|
const { parentProvider, bindParent, index } = useParent(
|
|
8681
9553
|
BREADCRUMBS_BIND_BREADCRUMB_ITEM_KEY
|
|
8682
9554
|
);
|
|
8683
|
-
|
|
8684
|
-
error$1("Breadcrumb", "<var-breadcrumb/> must in <var-breadcrumbs/>");
|
|
8685
|
-
}
|
|
9555
|
+
assert(!!bindParent, "Breadcrumb", "<var-breadcrumb/> must in <var-breadcrumbs/>");
|
|
8686
9556
|
return {
|
|
8687
9557
|
index,
|
|
8688
9558
|
breadcrumb: parentProvider,
|
|
@@ -10069,9 +10939,7 @@ function useCollapse() {
|
|
|
10069
10939
|
const { parentProvider, index, bindParent } = useParent(
|
|
10070
10940
|
COLLAPSE_BIND_COLLAPSE_ITEM_KEY
|
|
10071
10941
|
);
|
|
10072
|
-
|
|
10073
|
-
error$1("Collapse", "<var-collapse-item/> must in <var-collapse>");
|
|
10074
|
-
}
|
|
10942
|
+
assert(!!bindParent, "Collapse", "<var-collapse-item/> must in <var-collapse>");
|
|
10075
10943
|
return {
|
|
10076
10944
|
index,
|
|
10077
10945
|
collapse: parentProvider,
|
|
@@ -13747,7 +14615,7 @@ var __defProp$i = Object.defineProperty;
|
|
|
13747
14615
|
var __getOwnPropSymbols$i = Object.getOwnPropertySymbols;
|
|
13748
14616
|
var __hasOwnProp$i = Object.prototype.hasOwnProperty;
|
|
13749
14617
|
var __propIsEnum$i = Object.prototype.propertyIsEnumerable;
|
|
13750
|
-
var __defNormalProp$i = (obj,
|
|
14618
|
+
var __defNormalProp$i = (obj, key3, value) => key3 in obj ? __defProp$i(obj, key3, { enumerable: true, configurable: true, writable: true, value }) : obj[key3] = value;
|
|
13751
14619
|
var __spreadValues$i = (a, b) => {
|
|
13752
14620
|
for (var prop in b || (b = {}))
|
|
13753
14621
|
if (__hasOwnProp$i.call(b, prop))
|
|
@@ -13875,18 +14743,18 @@ const __sfc__$U = vue.defineComponent({
|
|
|
13875
14743
|
const { t: pt } = injectLocaleProvider();
|
|
13876
14744
|
const isSameYear = vue.computed(() => props2.choose.chooseYear === props2.preview.previewYear);
|
|
13877
14745
|
const isCurrentYear = vue.computed(() => props2.preview.previewYear === currentYear);
|
|
13878
|
-
const getMonthAbbr = (
|
|
14746
|
+
const getMonthAbbr = (key3) => {
|
|
13879
14747
|
var _a, _b;
|
|
13880
|
-
return (_b = (_a = (pt || t)("datePickerMonthDict")) == null ? void 0 : _a[
|
|
14748
|
+
return (_b = (_a = (pt || t)("datePickerMonthDict")) == null ? void 0 : _a[key3].abbr) != null ? _b : "";
|
|
13881
14749
|
};
|
|
13882
|
-
const inRange = (
|
|
14750
|
+
const inRange = (key3) => {
|
|
13883
14751
|
const {
|
|
13884
14752
|
preview: { previewYear },
|
|
13885
14753
|
componentProps: { min: min2, max: max2 }
|
|
13886
14754
|
} = props2;
|
|
13887
14755
|
let isBeforeMax = true;
|
|
13888
14756
|
let isAfterMin = true;
|
|
13889
|
-
const previewDate = `${previewYear}-${
|
|
14757
|
+
const previewDate = `${previewYear}-${key3}`;
|
|
13890
14758
|
if (max2) isBeforeMax = dayjs(previewDate).isSameOrBefore(dayjs(max2), "month");
|
|
13891
14759
|
if (min2) isAfterMin = dayjs(previewDate).isSameOrAfter(dayjs(min2), "month");
|
|
13892
14760
|
return isBeforeMax && isAfterMin;
|
|
@@ -13905,19 +14773,19 @@ const __sfc__$U = vue.defineComponent({
|
|
|
13905
14773
|
if (type === "month") return chooseMonths.includes(val);
|
|
13906
14774
|
return chooseDays.some((value) => value.includes(val));
|
|
13907
14775
|
};
|
|
13908
|
-
const buttonProps = (
|
|
14776
|
+
const buttonProps = (key3) => {
|
|
13909
14777
|
const {
|
|
13910
14778
|
choose: { chooseMonth: chooseMonth2 },
|
|
13911
14779
|
preview: { previewYear },
|
|
13912
14780
|
componentProps: { allowedDates, color, multiple, range }
|
|
13913
14781
|
} = props2;
|
|
13914
|
-
const val = `${previewYear}-${
|
|
14782
|
+
const val = `${previewYear}-${key3}`;
|
|
13915
14783
|
const monthExist = () => {
|
|
13916
14784
|
if (range || multiple) return shouldChoose(val);
|
|
13917
|
-
return chooseMonth2 ===
|
|
14785
|
+
return chooseMonth2 === key3 && isSameYear.value;
|
|
13918
14786
|
};
|
|
13919
14787
|
const computeDisabled = () => {
|
|
13920
|
-
if (!inRange(
|
|
14788
|
+
if (!inRange(key3)) return true;
|
|
13921
14789
|
if (!allowedDates) return false;
|
|
13922
14790
|
return !allowedDates(val);
|
|
13923
14791
|
};
|
|
@@ -13925,10 +14793,10 @@ const __sfc__$U = vue.defineComponent({
|
|
|
13925
14793
|
const computeText = () => {
|
|
13926
14794
|
if (disabled) return true;
|
|
13927
14795
|
if (range || multiple) return !shouldChoose(val);
|
|
13928
|
-
return !isSameYear.value || chooseMonth2 !==
|
|
14796
|
+
return !isSameYear.value || chooseMonth2 !== key3;
|
|
13929
14797
|
};
|
|
13930
14798
|
const computeOutline = () => {
|
|
13931
|
-
if (!(isCurrentYear.value && currentMonth ===
|
|
14799
|
+
if (!(isCurrentYear.value && currentMonth === key3 && props2.componentProps.showCurrent)) return false;
|
|
13932
14800
|
if ((range || multiple || isSameYear.value) && disabled) return true;
|
|
13933
14801
|
if (range || multiple) return !shouldChoose(val);
|
|
13934
14802
|
if (isSameYear.value) return chooseMonth2 !== currentMonth;
|
|
@@ -14184,7 +15052,7 @@ var __defProp$h = Object.defineProperty;
|
|
|
14184
15052
|
var __getOwnPropSymbols$h = Object.getOwnPropertySymbols;
|
|
14185
15053
|
var __hasOwnProp$h = Object.prototype.hasOwnProperty;
|
|
14186
15054
|
var __propIsEnum$h = Object.prototype.propertyIsEnumerable;
|
|
14187
|
-
var __defNormalProp$h = (obj,
|
|
15055
|
+
var __defNormalProp$h = (obj, key3, value) => key3 in obj ? __defProp$h(obj, key3, { enumerable: true, configurable: true, writable: true, value }) : obj[key3] = value;
|
|
14188
15056
|
var __spreadValues$h = (a, b) => {
|
|
14189
15057
|
for (var prop in b || (b = {}))
|
|
14190
15058
|
if (__hasOwnProp$h.call(b, prop))
|
|
@@ -14448,7 +15316,7 @@ var __defProp$g = Object.defineProperty;
|
|
|
14448
15316
|
var __getOwnPropSymbols$g = Object.getOwnPropertySymbols;
|
|
14449
15317
|
var __hasOwnProp$g = Object.prototype.hasOwnProperty;
|
|
14450
15318
|
var __propIsEnum$g = Object.prototype.propertyIsEnumerable;
|
|
14451
|
-
var __defNormalProp$g = (obj,
|
|
15319
|
+
var __defNormalProp$g = (obj, key3, value) => key3 in obj ? __defProp$g(obj, key3, { enumerable: true, configurable: true, writable: true, value }) : obj[key3] = value;
|
|
14452
15320
|
var __spreadValues$g = (a, b) => {
|
|
14453
15321
|
for (var prop in b || (b = {}))
|
|
14454
15322
|
if (__hasOwnProp$g.call(b, prop))
|
|
@@ -14624,9 +15492,9 @@ const __sfc__$R = vue.defineComponent({
|
|
|
14624
15492
|
}
|
|
14625
15493
|
return [...WEEK_HEADER.slice(index), ...WEEK_HEADER.slice(0, index)];
|
|
14626
15494
|
});
|
|
14627
|
-
const getDayAbbr = (
|
|
15495
|
+
const getDayAbbr = (key3) => {
|
|
14628
15496
|
var _a, _b;
|
|
14629
|
-
return (_b = (_a = (pt || t)("datePickerWeekDict")) == null ? void 0 : _a[
|
|
15497
|
+
return (_b = (_a = (pt || t)("datePickerWeekDict")) == null ? void 0 : _a[key3].abbr) != null ? _b : "";
|
|
14630
15498
|
};
|
|
14631
15499
|
const filterDay = (day) => day > 0 ? day : "";
|
|
14632
15500
|
const initDate = () => {
|
|
@@ -15324,19 +16192,21 @@ const __sfc__$Q = vue.defineComponent({
|
|
|
15324
16192
|
}
|
|
15325
16193
|
function checkValue() {
|
|
15326
16194
|
if ((props2.multiple || props2.range) && !isArray(props2.modelValue)) {
|
|
15327
|
-
|
|
16195
|
+
error$1("DatePicker", 'type of prop "modelValue" should be an Array');
|
|
15328
16196
|
return false;
|
|
15329
16197
|
}
|
|
15330
16198
|
if (!props2.multiple && !props2.range && isArray(props2.modelValue)) {
|
|
15331
|
-
|
|
16199
|
+
error$1("DatePicker", 'type of prop "modelValue" should be a String');
|
|
15332
16200
|
return false;
|
|
15333
16201
|
}
|
|
15334
16202
|
return true;
|
|
15335
16203
|
}
|
|
15336
16204
|
function invalidFormatDate(date) {
|
|
15337
|
-
if (isArray(date))
|
|
16205
|
+
if (isArray(date)) {
|
|
16206
|
+
return false;
|
|
16207
|
+
}
|
|
15338
16208
|
if (date === "Invalid Date") {
|
|
15339
|
-
|
|
16209
|
+
error$1("DatePicker", '"modelValue" is an Invalid Date');
|
|
15340
16210
|
return true;
|
|
15341
16211
|
}
|
|
15342
16212
|
return false;
|
|
@@ -15424,7 +16294,7 @@ var __defProp$f = Object.defineProperty;
|
|
|
15424
16294
|
var __getOwnPropSymbols$f = Object.getOwnPropertySymbols;
|
|
15425
16295
|
var __hasOwnProp$f = Object.prototype.hasOwnProperty;
|
|
15426
16296
|
var __propIsEnum$f = Object.prototype.propertyIsEnumerable;
|
|
15427
|
-
var __defNormalProp$f = (obj,
|
|
16297
|
+
var __defNormalProp$f = (obj, key3, value) => key3 in obj ? __defProp$f(obj, key3, { enumerable: true, configurable: true, writable: true, value }) : obj[key3] = value;
|
|
15428
16298
|
var __spreadValues$f = (a, b) => {
|
|
15429
16299
|
for (var prop in b || (b = {}))
|
|
15430
16300
|
if (__hasOwnProp$f.call(b, prop))
|
|
@@ -15486,7 +16356,7 @@ var __defProp$e = Object.defineProperty;
|
|
|
15486
16356
|
var __getOwnPropSymbols$e = Object.getOwnPropertySymbols;
|
|
15487
16357
|
var __hasOwnProp$e = Object.prototype.hasOwnProperty;
|
|
15488
16358
|
var __propIsEnum$e = Object.prototype.propertyIsEnumerable;
|
|
15489
|
-
var __defNormalProp$e = (obj,
|
|
16359
|
+
var __defNormalProp$e = (obj, key3, value) => key3 in obj ? __defProp$e(obj, key3, { enumerable: true, configurable: true, writable: true, value }) : obj[key3] = value;
|
|
15490
16360
|
var __spreadValues$e = (a, b) => {
|
|
15491
16361
|
for (var prop in b || (b = {}))
|
|
15492
16362
|
if (__hasOwnProp$e.call(b, prop))
|
|
@@ -15729,7 +16599,7 @@ var __getOwnPropDescs$5 = Object.getOwnPropertyDescriptors;
|
|
|
15729
16599
|
var __getOwnPropSymbols$d = Object.getOwnPropertySymbols;
|
|
15730
16600
|
var __hasOwnProp$d = Object.prototype.hasOwnProperty;
|
|
15731
16601
|
var __propIsEnum$d = Object.prototype.propertyIsEnumerable;
|
|
15732
|
-
var __defNormalProp$d = (obj,
|
|
16602
|
+
var __defNormalProp$d = (obj, key3, value) => key3 in obj ? __defProp$d(obj, key3, { enumerable: true, configurable: true, writable: true, value }) : obj[key3] = value;
|
|
15733
16603
|
var __spreadValues$d = (a, b) => {
|
|
15734
16604
|
for (var prop in b || (b = {}))
|
|
15735
16605
|
if (__hasOwnProp$d.call(b, prop))
|
|
@@ -15933,7 +16803,7 @@ var __getOwnPropDescs$4 = Object.getOwnPropertyDescriptors;
|
|
|
15933
16803
|
var __getOwnPropSymbols$c = Object.getOwnPropertySymbols;
|
|
15934
16804
|
var __hasOwnProp$c = Object.prototype.hasOwnProperty;
|
|
15935
16805
|
var __propIsEnum$c = Object.prototype.propertyIsEnumerable;
|
|
15936
|
-
var __defNormalProp$c = (obj,
|
|
16806
|
+
var __defNormalProp$c = (obj, key3, value) => key3 in obj ? __defProp$c(obj, key3, { enumerable: true, configurable: true, writable: true, value }) : obj[key3] = value;
|
|
15937
16807
|
var __spreadValues$c = (a, b) => {
|
|
15938
16808
|
for (var prop in b || (b = {}))
|
|
15939
16809
|
if (__hasOwnProp$c.call(b, prop))
|
|
@@ -16367,7 +17237,7 @@ var __defProp$b = Object.defineProperty;
|
|
|
16367
17237
|
var __getOwnPropSymbols$b = Object.getOwnPropertySymbols;
|
|
16368
17238
|
var __hasOwnProp$b = Object.prototype.hasOwnProperty;
|
|
16369
17239
|
var __propIsEnum$b = Object.prototype.propertyIsEnumerable;
|
|
16370
|
-
var __defNormalProp$b = (obj,
|
|
17240
|
+
var __defNormalProp$b = (obj, key3, value) => key3 in obj ? __defProp$b(obj, key3, { enumerable: true, configurable: true, writable: true, value }) : obj[key3] = value;
|
|
16371
17241
|
var __spreadValues$b = (a, b) => {
|
|
16372
17242
|
for (var prop in b || (b = {}))
|
|
16373
17243
|
if (__hasOwnProp$b.call(b, prop))
|
|
@@ -16841,9 +17711,9 @@ const __sfc__$K = vue.defineComponent({
|
|
|
16841
17711
|
let minDifference = Infinity;
|
|
16842
17712
|
let nearestAnchor = 0;
|
|
16843
17713
|
anchors.value.forEach((anchor2) => {
|
|
16844
|
-
const
|
|
16845
|
-
if (
|
|
16846
|
-
minDifference =
|
|
17714
|
+
const difference2 = Math.abs(anchor2 - targetAnchor);
|
|
17715
|
+
if (difference2 < minDifference) {
|
|
17716
|
+
minDifference = difference2;
|
|
16847
17717
|
nearestAnchor = anchor2;
|
|
16848
17718
|
}
|
|
16849
17719
|
});
|
|
@@ -17600,12 +18470,12 @@ const __sfc__$G = vue.defineComponent({
|
|
|
17600
18470
|
if (focusingSwipeItemIndex === -1) {
|
|
17601
18471
|
return;
|
|
17602
18472
|
}
|
|
17603
|
-
const { key } = event;
|
|
18473
|
+
const { key: key3 } = event;
|
|
17604
18474
|
preventDefault(event);
|
|
17605
|
-
if (
|
|
18475
|
+
if (key3 === "ArrowLeft") {
|
|
17606
18476
|
prev();
|
|
17607
18477
|
}
|
|
17608
|
-
if (
|
|
18478
|
+
if (key3 === "ArrowRight") {
|
|
17609
18479
|
next();
|
|
17610
18480
|
}
|
|
17611
18481
|
}
|
|
@@ -17718,9 +18588,7 @@ const _SwipeComponent = stdin_default$4q;
|
|
|
17718
18588
|
var stdin_default$4p = stdin_default$4q;
|
|
17719
18589
|
function useSwipe() {
|
|
17720
18590
|
const { bindParent, index, parentProvider } = useParent(SWIPE_BIND_SWIPE_ITEM_KEY);
|
|
17721
|
-
|
|
17722
|
-
error$1("SwipeItem", "<var-swipe-item/> must in <var-swipe/>");
|
|
17723
|
-
}
|
|
18591
|
+
assert(!!bindParent, "SwipeItem", "<var-swipe-item/> must in <var-swipe/>");
|
|
17724
18592
|
return {
|
|
17725
18593
|
index,
|
|
17726
18594
|
swipe: parentProvider,
|
|
@@ -17782,7 +18650,7 @@ var __defProp$a = Object.defineProperty;
|
|
|
17782
18650
|
var __getOwnPropSymbols$a = Object.getOwnPropertySymbols;
|
|
17783
18651
|
var __hasOwnProp$a = Object.prototype.hasOwnProperty;
|
|
17784
18652
|
var __propIsEnum$a = Object.prototype.propertyIsEnumerable;
|
|
17785
|
-
var __defNormalProp$a = (obj,
|
|
18653
|
+
var __defNormalProp$a = (obj, key3, value) => key3 in obj ? __defProp$a(obj, key3, { enumerable: true, configurable: true, writable: true, value }) : obj[key3] = value;
|
|
17786
18654
|
var __spreadValues$a = (a, b) => {
|
|
17787
18655
|
for (var prop in b || (b = {}))
|
|
17788
18656
|
if (__hasOwnProp$a.call(b, prop))
|
|
@@ -18154,7 +19022,7 @@ var __getOwnPropDescs$3 = Object.getOwnPropertyDescriptors;
|
|
|
18154
19022
|
var __getOwnPropSymbols$9 = Object.getOwnPropertySymbols;
|
|
18155
19023
|
var __hasOwnProp$9 = Object.prototype.hasOwnProperty;
|
|
18156
19024
|
var __propIsEnum$9 = Object.prototype.propertyIsEnumerable;
|
|
18157
|
-
var __defNormalProp$9 = (obj,
|
|
19025
|
+
var __defNormalProp$9 = (obj, key3, value) => key3 in obj ? __defProp$9(obj, key3, { enumerable: true, configurable: true, writable: true, value }) : obj[key3] = value;
|
|
18158
19026
|
var __spreadValues$9 = (a, b) => {
|
|
18159
19027
|
for (var prop in b || (b = {}))
|
|
18160
19028
|
if (__hasOwnProp$9.call(b, prop))
|
|
@@ -18240,9 +19108,7 @@ function useIndexBar() {
|
|
|
18240
19108
|
const { parentProvider, index, bindParent } = useParent(
|
|
18241
19109
|
INDEX_BAR_BIND_INDEX_ANCHOR_KEY
|
|
18242
19110
|
);
|
|
18243
|
-
|
|
18244
|
-
error$1("IndexAnchor", 'You should use this component in "IndexBar"');
|
|
18245
|
-
}
|
|
19111
|
+
assert(!!bindParent, "IndexAnchor", 'You should use this component in "IndexBar"');
|
|
18246
19112
|
return {
|
|
18247
19113
|
index,
|
|
18248
19114
|
indexBar: parentProvider,
|
|
@@ -18693,9 +19559,7 @@ function useTabsItems() {
|
|
|
18693
19559
|
const { parentProvider, bindParent, index } = useParent(
|
|
18694
19560
|
TABS_ITEMS_BIND_TAB_ITEM_KEY
|
|
18695
19561
|
);
|
|
18696
|
-
|
|
18697
|
-
error$1("TabItem", "<var-tab-item/> must in <var-tabs-items/>");
|
|
18698
|
-
}
|
|
19562
|
+
assert(!!bindParent, "TabItem", "<var-tab-item/> must in <var-tabs-items/>");
|
|
18699
19563
|
return {
|
|
18700
19564
|
index,
|
|
18701
19565
|
tabsItems: parentProvider,
|
|
@@ -18956,9 +19820,9 @@ function setDefaultOptions(options) {
|
|
|
18956
19820
|
internalOptions = options;
|
|
18957
19821
|
}
|
|
18958
19822
|
const resetDefaultOptions = () => {
|
|
18959
|
-
Object.keys(internalOptions).forEach((
|
|
18960
|
-
if (ctx[
|
|
18961
|
-
ctx[
|
|
19823
|
+
Object.keys(internalOptions).forEach((key3) => {
|
|
19824
|
+
if (ctx[key3] !== void 0) {
|
|
19825
|
+
ctx[key3] = void 0;
|
|
18962
19826
|
}
|
|
18963
19827
|
});
|
|
18964
19828
|
};
|
|
@@ -19052,7 +19916,7 @@ var __getOwnPropDescs$2 = Object.getOwnPropertyDescriptors;
|
|
|
19052
19916
|
var __getOwnPropSymbols$8 = Object.getOwnPropertySymbols;
|
|
19053
19917
|
var __hasOwnProp$8 = Object.prototype.hasOwnProperty;
|
|
19054
19918
|
var __propIsEnum$8 = Object.prototype.propertyIsEnumerable;
|
|
19055
|
-
var __defNormalProp$8 = (obj,
|
|
19919
|
+
var __defNormalProp$8 = (obj, key3, value) => key3 in obj ? __defProp$8(obj, key3, { enumerable: true, configurable: true, writable: true, value }) : obj[key3] = value;
|
|
19056
19920
|
var __spreadValues$8 = (a, b) => {
|
|
19057
19921
|
for (var prop in b || (b = {}))
|
|
19058
19922
|
if (__hasOwnProp$8.call(b, prop))
|
|
@@ -19073,9 +19937,9 @@ const __sfc__$z = vue.defineComponent({
|
|
|
19073
19937
|
const messages2 = vue.computed(
|
|
19074
19938
|
() => {
|
|
19075
19939
|
var _a;
|
|
19076
|
-
return Object.entries((_a = props2.messages) != null ? _a : {}).reduce((messages22, [
|
|
19077
|
-
messages22[
|
|
19078
|
-
lang:
|
|
19940
|
+
return Object.entries((_a = props2.messages) != null ? _a : {}).reduce((messages22, [key3, value]) => {
|
|
19941
|
+
messages22[key3] = __spreadProps$2(__spreadValues$8({}, value), {
|
|
19942
|
+
lang: key3
|
|
19079
19943
|
});
|
|
19080
19944
|
return messages22;
|
|
19081
19945
|
}, {});
|
|
@@ -19114,9 +19978,7 @@ function useOptions() {
|
|
|
19114
19978
|
}
|
|
19115
19979
|
function useSelect() {
|
|
19116
19980
|
const { index, parentProvider, bindParent } = useParent(SELECT_BIND_OPTION_KEY);
|
|
19117
|
-
|
|
19118
|
-
error$1("Option", "<var-option/> must in <var-select/>");
|
|
19119
|
-
}
|
|
19981
|
+
assert(!!bindParent, "Option", "<var-option/> must in <var-select/>");
|
|
19120
19982
|
return {
|
|
19121
19983
|
index,
|
|
19122
19984
|
select: parentProvider,
|
|
@@ -19892,7 +20754,7 @@ var __defProp$7 = Object.defineProperty;
|
|
|
19892
20754
|
var __getOwnPropSymbols$7 = Object.getOwnPropertySymbols;
|
|
19893
20755
|
var __hasOwnProp$7 = Object.prototype.hasOwnProperty;
|
|
19894
20756
|
var __propIsEnum$7 = Object.prototype.propertyIsEnumerable;
|
|
19895
|
-
var __defNormalProp$7 = (obj,
|
|
20757
|
+
var __defNormalProp$7 = (obj, key3, value) => key3 in obj ? __defProp$7(obj, key3, { enumerable: true, configurable: true, writable: true, value }) : obj[key3] = value;
|
|
19896
20758
|
var __spreadValues$7 = (a, b) => {
|
|
19897
20759
|
for (var prop in b || (b = {}))
|
|
19898
20760
|
if (__hasOwnProp$7.call(b, prop))
|
|
@@ -20195,13 +21057,13 @@ const __sfc__$v = vue.defineComponent({
|
|
|
20195
21057
|
initScrollColumns();
|
|
20196
21058
|
vue.watch(() => props2.columns, initScrollColumns, { deep: true });
|
|
20197
21059
|
vue.watch(() => modelValue.value, initScrollColumns);
|
|
20198
|
-
function getOptionKey(
|
|
21060
|
+
function getOptionKey(key3) {
|
|
20199
21061
|
const keyMap = {
|
|
20200
21062
|
text: props2.textKey,
|
|
20201
21063
|
value: props2.valueKey,
|
|
20202
21064
|
children: props2.childrenKey
|
|
20203
21065
|
};
|
|
20204
|
-
return keyMap[
|
|
21066
|
+
return keyMap[key3];
|
|
20205
21067
|
}
|
|
20206
21068
|
function getValue(option) {
|
|
20207
21069
|
var _a;
|
|
@@ -21230,11 +22092,11 @@ const __sfc__$s = vue.defineComponent({
|
|
|
21230
22092
|
if (!isFocusing.value) {
|
|
21231
22093
|
return;
|
|
21232
22094
|
}
|
|
21233
|
-
const { key } = event;
|
|
21234
|
-
if (
|
|
22095
|
+
const { key: key3 } = event;
|
|
22096
|
+
if (key3 === "Enter" || key3 === " ") {
|
|
21235
22097
|
preventDefault(event);
|
|
21236
22098
|
}
|
|
21237
|
-
if (
|
|
22099
|
+
if (key3 === "Enter") {
|
|
21238
22100
|
action.value.click();
|
|
21239
22101
|
}
|
|
21240
22102
|
}
|
|
@@ -22119,7 +22981,7 @@ var __defProp$6 = Object.defineProperty;
|
|
|
22119
22981
|
var __getOwnPropSymbols$6 = Object.getOwnPropertySymbols;
|
|
22120
22982
|
var __hasOwnProp$6 = Object.prototype.hasOwnProperty;
|
|
22121
22983
|
var __propIsEnum$6 = Object.prototype.propertyIsEnumerable;
|
|
22122
|
-
var __defNormalProp$6 = (obj,
|
|
22984
|
+
var __defNormalProp$6 = (obj, key3, value) => key3 in obj ? __defProp$6(obj, key3, { enumerable: true, configurable: true, writable: true, value }) : obj[key3] = value;
|
|
22123
22985
|
var __spreadValues$6 = (a, b) => {
|
|
22124
22986
|
for (var prop in b || (b = {}))
|
|
22125
22987
|
if (__hasOwnProp$6.call(b, prop))
|
|
@@ -22497,10 +23359,11 @@ const __sfc__$h = vue.defineComponent({
|
|
|
22497
23359
|
vue.watch(
|
|
22498
23360
|
() => props2.multiple,
|
|
22499
23361
|
() => {
|
|
22500
|
-
|
|
22501
|
-
|
|
22502
|
-
|
|
22503
|
-
|
|
23362
|
+
assert(
|
|
23363
|
+
props2.multiple && isArray(props2.modelValue),
|
|
23364
|
+
"Select",
|
|
23365
|
+
"The modelValue must be an array when multiple is true"
|
|
23366
|
+
);
|
|
22504
23367
|
}
|
|
22505
23368
|
);
|
|
22506
23369
|
bindOptions(selectProvider);
|
|
@@ -22512,31 +23375,31 @@ const __sfc__$h = vue.defineComponent({
|
|
|
22512
23375
|
if ((form == null ? void 0 : form.disabled.value) || (form == null ? void 0 : form.readonly.value) || disabled || readonly || !isFocusing.value) {
|
|
22513
23376
|
return;
|
|
22514
23377
|
}
|
|
22515
|
-
const { key } = event;
|
|
22516
|
-
if (
|
|
23378
|
+
const { key: key3 } = event;
|
|
23379
|
+
if (key3 === " " && !showMenu.value) {
|
|
22517
23380
|
preventDefault(event);
|
|
22518
23381
|
return;
|
|
22519
23382
|
}
|
|
22520
|
-
if (
|
|
23383
|
+
if (key3 === "Escape" && showMenu.value) {
|
|
22521
23384
|
root.value.focus();
|
|
22522
23385
|
preventDefault(event);
|
|
22523
23386
|
showMenu.value = false;
|
|
22524
23387
|
return;
|
|
22525
23388
|
}
|
|
22526
|
-
if (
|
|
23389
|
+
if (key3 === "Tab" && showMenu.value) {
|
|
22527
23390
|
root.value.focus();
|
|
22528
23391
|
preventDefault(event);
|
|
22529
23392
|
handleBlur();
|
|
22530
23393
|
return;
|
|
22531
23394
|
}
|
|
22532
|
-
if (
|
|
23395
|
+
if (key3 === "Enter" && !showMenu.value) {
|
|
22533
23396
|
preventDefault(event);
|
|
22534
23397
|
showMenu.value = true;
|
|
22535
23398
|
return;
|
|
22536
23399
|
}
|
|
22537
|
-
if ((
|
|
23400
|
+
if ((key3 === "ArrowDown" || key3 === "ArrowUp") && showMenu.value) {
|
|
22538
23401
|
preventDefault(event);
|
|
22539
|
-
focusChildElementByKey(root.value, menuEl.value,
|
|
23402
|
+
focusChildElementByKey(root.value, menuEl.value, key3);
|
|
22540
23403
|
}
|
|
22541
23404
|
}
|
|
22542
23405
|
function handleKeyup(event) {
|
|
@@ -22544,8 +23407,8 @@ const __sfc__$h = vue.defineComponent({
|
|
|
22544
23407
|
if ((form == null ? void 0 : form.disabled.value) || (form == null ? void 0 : form.readonly.value) || disabled || readonly || showMenu.value || !isFocusing.value) {
|
|
22545
23408
|
return;
|
|
22546
23409
|
}
|
|
22547
|
-
const { key } = event;
|
|
22548
|
-
if (
|
|
23410
|
+
const { key: key3 } = event;
|
|
23411
|
+
if (key3 === " " && !showMenu.value) {
|
|
22549
23412
|
preventDefault(event);
|
|
22550
23413
|
showMenu.value = true;
|
|
22551
23414
|
}
|
|
@@ -23249,9 +24112,9 @@ const __sfc__$f = vue.defineComponent({
|
|
|
23249
24112
|
return maxDistance.value - (e.clientY - getRect(currentTarget).top);
|
|
23250
24113
|
}
|
|
23251
24114
|
function thumbStyle(thumb) {
|
|
23252
|
-
const
|
|
24115
|
+
const key3 = isVertical.value ? "bottom" : "left";
|
|
23253
24116
|
return {
|
|
23254
|
-
[
|
|
24117
|
+
[key3]: `${thumb.value}%`,
|
|
23255
24118
|
zIndex: thumbsProps[thumb.enumValue].active ? 1 : void 0
|
|
23256
24119
|
};
|
|
23257
24120
|
}
|
|
@@ -23392,7 +24255,7 @@ const __sfc__$f = vue.defineComponent({
|
|
|
23392
24255
|
}
|
|
23393
24256
|
function stepValidator() {
|
|
23394
24257
|
if (toNumber(props2.step) <= 0) {
|
|
23395
|
-
warn("
|
|
24258
|
+
warn("Slider", '"step" should be > 0');
|
|
23396
24259
|
return false;
|
|
23397
24260
|
}
|
|
23398
24261
|
return true;
|
|
@@ -23400,15 +24263,15 @@ const __sfc__$f = vue.defineComponent({
|
|
|
23400
24263
|
function valueValidator() {
|
|
23401
24264
|
const { range, modelValue } = props2;
|
|
23402
24265
|
if (range && !isArray(modelValue)) {
|
|
23403
|
-
|
|
24266
|
+
error$1("Slider", '"modelValue" should be an Array');
|
|
23404
24267
|
return false;
|
|
23405
24268
|
}
|
|
23406
24269
|
if (!range && isArray(modelValue)) {
|
|
23407
|
-
|
|
24270
|
+
error$1("Slider", '"modelValue" should be a Number');
|
|
23408
24271
|
return false;
|
|
23409
24272
|
}
|
|
23410
24273
|
if (range && isArray(modelValue) && modelValue.length < 2) {
|
|
23411
|
-
|
|
24274
|
+
error$1("Slider", '"modelValue" should have two value');
|
|
23412
24275
|
return false;
|
|
23413
24276
|
}
|
|
23414
24277
|
return true;
|
|
@@ -23454,8 +24317,8 @@ const __sfc__$f = vue.defineComponent({
|
|
|
23454
24317
|
ArrowLeft: -1,
|
|
23455
24318
|
ArrowDown: -1
|
|
23456
24319
|
};
|
|
23457
|
-
const { key } = event;
|
|
23458
|
-
if (!hasOwn(keyToOffset,
|
|
24320
|
+
const { key: key3 } = event;
|
|
24321
|
+
if (!hasOwn(keyToOffset, key3) || isReadonly.value || isDisabled.value) {
|
|
23459
24322
|
return;
|
|
23460
24323
|
}
|
|
23461
24324
|
if (props2.range && !focusingFirst.value && !focusingSecond.value) {
|
|
@@ -23465,7 +24328,7 @@ const __sfc__$f = vue.defineComponent({
|
|
|
23465
24328
|
return;
|
|
23466
24329
|
}
|
|
23467
24330
|
preventDefault(event);
|
|
23468
|
-
const offset2 = keyToOffset[
|
|
24331
|
+
const offset2 = keyToOffset[key3];
|
|
23469
24332
|
const value = moveFocusingThumb(offset2, props2.modelValue);
|
|
23470
24333
|
emitChange(value);
|
|
23471
24334
|
}
|
|
@@ -23514,7 +24377,7 @@ var __getOwnPropDescs$1 = Object.getOwnPropertyDescriptors;
|
|
|
23514
24377
|
var __getOwnPropSymbols$5 = Object.getOwnPropertySymbols;
|
|
23515
24378
|
var __hasOwnProp$5 = Object.prototype.hasOwnProperty;
|
|
23516
24379
|
var __propIsEnum$5 = Object.prototype.propertyIsEnumerable;
|
|
23517
|
-
var __defNormalProp$5 = (obj,
|
|
24380
|
+
var __defNormalProp$5 = (obj, key3, value) => key3 in obj ? __defProp$5(obj, key3, { enumerable: true, configurable: true, writable: true, value }) : obj[key3] = value;
|
|
23518
24381
|
var __spreadValues$5 = (a, b) => {
|
|
23519
24382
|
for (var prop in b || (b = {}))
|
|
23520
24383
|
if (__hasOwnProp$5.call(b, prop))
|
|
@@ -23785,7 +24648,7 @@ var __defProp$4 = Object.defineProperty;
|
|
|
23785
24648
|
var __getOwnPropSymbols$4 = Object.getOwnPropertySymbols;
|
|
23786
24649
|
var __hasOwnProp$4 = Object.prototype.hasOwnProperty;
|
|
23787
24650
|
var __propIsEnum$4 = Object.prototype.propertyIsEnumerable;
|
|
23788
|
-
var __defNormalProp$4 = (obj,
|
|
24651
|
+
var __defNormalProp$4 = (obj, key3, value) => key3 in obj ? __defProp$4(obj, key3, { enumerable: true, configurable: true, writable: true, value }) : obj[key3] = value;
|
|
23789
24652
|
var __spreadValues$4 = (a, b) => {
|
|
23790
24653
|
for (var prop in b || (b = {}))
|
|
23791
24654
|
if (__hasOwnProp$4.call(b, prop))
|
|
@@ -24127,9 +24990,7 @@ function useStep() {
|
|
|
24127
24990
|
}
|
|
24128
24991
|
function useSteps() {
|
|
24129
24992
|
const { parentProvider, index, bindParent } = useParent(STEPS_BIND_STEP_KEY);
|
|
24130
|
-
|
|
24131
|
-
error$1("Steps", "<step/> must in <steps>");
|
|
24132
|
-
}
|
|
24993
|
+
assert(!!bindParent, "Steps", "<step/> must in <steps>");
|
|
24133
24994
|
return {
|
|
24134
24995
|
index,
|
|
24135
24996
|
steps: parentProvider,
|
|
@@ -24355,8 +25216,8 @@ function StyleProvider(styleVars) {
|
|
|
24355
25216
|
return;
|
|
24356
25217
|
}
|
|
24357
25218
|
const styles = formatStyleVars(styleVars != null ? styleVars : {});
|
|
24358
|
-
const content = Object.entries(styles).reduce((content2, [
|
|
24359
|
-
content2 += `${
|
|
25219
|
+
const content = Object.entries(styles).reduce((content2, [key3, value]) => {
|
|
25220
|
+
content2 += `${key3}:${value};`;
|
|
24360
25221
|
return content2;
|
|
24361
25222
|
}, `:root:root {
|
|
24362
25223
|
`);
|
|
@@ -24679,9 +25540,7 @@ function useTabList() {
|
|
|
24679
25540
|
}
|
|
24680
25541
|
function useTabs() {
|
|
24681
25542
|
const { parentProvider, bindParent, index } = useParent(TABS_BIND_TAB_KEY);
|
|
24682
|
-
|
|
24683
|
-
error$1("Tab", "<var-tab/> must in <var-tabs/>");
|
|
24684
|
-
}
|
|
25543
|
+
assert(!!bindParent, "Tab", "<var-tab/> must in <var-tabs/>");
|
|
24685
25544
|
return {
|
|
24686
25545
|
index,
|
|
24687
25546
|
tabs: parentProvider,
|
|
@@ -26224,7 +27083,7 @@ var __defProp$3 = Object.defineProperty;
|
|
|
26224
27083
|
var __getOwnPropSymbols$3 = Object.getOwnPropertySymbols;
|
|
26225
27084
|
var __hasOwnProp$3 = Object.prototype.hasOwnProperty;
|
|
26226
27085
|
var __propIsEnum$3 = Object.prototype.propertyIsEnumerable;
|
|
26227
|
-
var __defNormalProp$3 = (obj,
|
|
27086
|
+
var __defNormalProp$3 = (obj, key3, value) => key3 in obj ? __defProp$3(obj, key3, { enumerable: true, configurable: true, writable: true, value }) : obj[key3] = value;
|
|
26228
27087
|
var __spreadValues$3 = (a, b) => {
|
|
26229
27088
|
for (var prop in b || (b = {}))
|
|
26230
27089
|
if (__hasOwnProp$3.call(b, prop))
|
|
@@ -27241,7 +28100,7 @@ var __defProp$2 = Object.defineProperty;
|
|
|
27241
28100
|
var __getOwnPropSymbols$2 = Object.getOwnPropertySymbols;
|
|
27242
28101
|
var __hasOwnProp$2 = Object.prototype.hasOwnProperty;
|
|
27243
28102
|
var __propIsEnum$2 = Object.prototype.propertyIsEnumerable;
|
|
27244
|
-
var __defNormalProp$2 = (obj,
|
|
28103
|
+
var __defNormalProp$2 = (obj, key3, value) => key3 in obj ? __defProp$2(obj, key3, { enumerable: true, configurable: true, writable: true, value }) : obj[key3] = value;
|
|
27245
28104
|
var __spreadValues$2 = (a, b) => {
|
|
27246
28105
|
for (var prop in b || (b = {}))
|
|
27247
28106
|
if (__hasOwnProp$2.call(b, prop))
|
|
@@ -28275,7 +29134,7 @@ var __defProp$1 = Object.defineProperty;
|
|
|
28275
29134
|
var __getOwnPropSymbols$1 = Object.getOwnPropertySymbols;
|
|
28276
29135
|
var __hasOwnProp$1 = Object.prototype.hasOwnProperty;
|
|
28277
29136
|
var __propIsEnum$1 = Object.prototype.propertyIsEnumerable;
|
|
28278
|
-
var __defNormalProp$1 = (obj,
|
|
29137
|
+
var __defNormalProp$1 = (obj, key3, value) => key3 in obj ? __defProp$1(obj, key3, { enumerable: true, configurable: true, writable: true, value }) : obj[key3] = value;
|
|
28279
29138
|
var __spreadValues$1 = (a, b) => {
|
|
28280
29139
|
for (var prop in b || (b = {}))
|
|
28281
29140
|
if (__hasOwnProp$1.call(b, prop))
|
|
@@ -28369,8 +29228,8 @@ var stdin_default$8 = __spreadValues$1(__spreadValues$1(__spreadValues$1(__sprea
|
|
|
28369
29228
|
}, stdin_default$19), stdin_default$18), stdin_default$17), stdin_default$16), stdin_default$15), stdin_default$14), stdin_default$13), stdin_default$12), stdin_default$11), stdin_default$10), stdin_default$$), stdin_default$_), stdin_default$Z), stdin_default$Y), stdin_default$X), stdin_default$W), stdin_default$V), stdin_default$U), stdin_default$T), stdin_default$S), stdin_default$R), stdin_default$Q), stdin_default$P), stdin_default$O), stdin_default$N), stdin_default$M), stdin_default$L), stdin_default$K), stdin_default$J), stdin_default$I), stdin_default$H), stdin_default$G), stdin_default$F), stdin_default$E), stdin_default$D), stdin_default$C), stdin_default$B), stdin_default$A), stdin_default$z), stdin_default$y), stdin_default$x), stdin_default$w), stdin_default$v), stdin_default$u), stdin_default$t), stdin_default$s), stdin_default$r), stdin_default$q), stdin_default$p), stdin_default$o), stdin_default$n), stdin_default$m), stdin_default$l), stdin_default$k), stdin_default$j), stdin_default$i), stdin_default$h), stdin_default$g), stdin_default$f), stdin_default$e), stdin_default$d), stdin_default$c), stdin_default$b), stdin_default$a), stdin_default$9);
|
|
28370
29229
|
function toViewport(theme, options = {}) {
|
|
28371
29230
|
const { viewportWidth = 375, viewportUnit = "vmin", unitPrecision = 6 } = options;
|
|
28372
|
-
return Object.entries(theme).reduce((target, [
|
|
28373
|
-
target[
|
|
29231
|
+
return Object.entries(theme).reduce((target, [key3, value]) => {
|
|
29232
|
+
target[key3] = value.includes("px") ? value.replace(
|
|
28374
29233
|
/(\d+(\.\d+)?)px/g,
|
|
28375
29234
|
(_, p1) => `${Number((p1 / viewportWidth * 100).toFixed(unitPrecision))}${viewportUnit}`
|
|
28376
29235
|
) : value;
|
|
@@ -29836,7 +30695,7 @@ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
|
29836
30695
|
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
29837
30696
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
29838
30697
|
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
29839
|
-
var __defNormalProp = (obj,
|
|
30698
|
+
var __defNormalProp = (obj, key3, value) => key3 in obj ? __defProp(obj, key3, { enumerable: true, configurable: true, writable: true, value }) : obj[key3] = value;
|
|
29840
30699
|
var __spreadValues = (a, b) => {
|
|
29841
30700
|
for (var prop in b || (b = {}))
|
|
29842
30701
|
if (__hasOwnProp.call(b, prop))
|
|
@@ -30073,7 +30932,7 @@ withInstall(stdin_default$1);
|
|
|
30073
30932
|
withPropsDefaultsSetter(stdin_default$1, props);
|
|
30074
30933
|
const _WatermarkComponent = stdin_default$1;
|
|
30075
30934
|
var stdin_default = stdin_default$1;
|
|
30076
|
-
const version = "3.7.
|
|
30935
|
+
const version = "3.7.3";
|
|
30077
30936
|
function install(app) {
|
|
30078
30937
|
stdin_default$5W.install && app.use(stdin_default$5W);
|
|
30079
30938
|
stdin_default$5U.install && app.use(stdin_default$5U);
|