@zeturn/watercolor-core 1.2.1 → 1.2.2
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/dist/core.es.js +1172 -1159
- package/dist/src/theme/config.d.ts +5 -2
- package/dist/src/theme/config.d.ts.map +1 -1
- package/dist/src/theme/controller.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/styles/modes.css +2 -44
- package/src/styles/semantic.css +2 -1
- package/theme-v2.schema.json +1 -0
package/dist/core.es.js
CHANGED
|
@@ -44,7 +44,7 @@ var e = Object.defineProperty, t = (e, t) => () => (t || e((t = { exports: {} })
|
|
|
44
44
|
"2xl",
|
|
45
45
|
"3xl",
|
|
46
46
|
"full"
|
|
47
|
-
], s = /* @__PURE__ */ "canvas.surfaceSubtle.surfaceRaised.surfaceOverlay.actionHover.actionActive.actionSelected.actionSelectedHover.actionDisabled.textPrimary.textSecondary.textTertiary.textDisabled.textInverse.borderDefault.borderStrong.borderSubtle.accent.accentHover.accentActive.accentSubtle.danger.dangerHover.dangerSubtle.backdrop.shadowSm.shadowMd.shadowLg.shadowXl.focusRing".split("."), c = /* @__PURE__ */ new WeakMap(), l = (e) => typeof e == "object" && !!e && !Array.isArray(e), u = (e) => typeof e == "string" && e.trim().length > 0 && !/[;{}<>]/.test(e), d = (e) => {
|
|
47
|
+
], s = /* @__PURE__ */ "canvas.surfaceSubtle.surfaceRaised.surfaceOverlay.actionHover.actionActive.actionSelected.actionSelectedHover.actionDisabled.textPrimary.textSecondary.textTertiary.textDisabled.textInverse.borderDefault.borderStrong.borderSubtle.onAccent.accent.accentHover.accentActive.accentSubtle.danger.dangerHover.dangerSubtle.backdrop.shadowSm.shadowMd.shadowLg.shadowXl.focusRing".split("."), c = /* @__PURE__ */ new WeakMap(), l = (e) => typeof e == "object" && !!e && !Array.isArray(e), u = (e) => typeof e == "string" && e.trim().length > 0 && !/[;{}<>]/.test(e), d = (e) => {
|
|
48
48
|
if (!u(e)) return !1;
|
|
49
49
|
let t = e.trim();
|
|
50
50
|
return /^#[\da-f]{3,8}$/i.test(t) || /^(?:rgb|rgba|hsl|hsla|oklch|oklab|color|color-mix|var)\(.+\)$/i.test(t) || /^(?:transparent|currentColor|black|white)$/i.test(t);
|
|
@@ -63,7 +63,13 @@ var e = Object.defineProperty, t = (e, t) => () => (t || e((t = { exports: {} })
|
|
|
63
63
|
2,
|
|
64
64
|
4
|
|
65
65
|
].map((e) => Number.parseInt(n.slice(e, e + 2), 16));
|
|
66
|
-
}, g = (e, t) => {
|
|
66
|
+
}, g = (e, t, n, r, i, a, o = 4.5) => {
|
|
67
|
+
let s = ee(r), c = ee(a);
|
|
68
|
+
!s || !c || _(s, c) >= o || e.push({
|
|
69
|
+
path: `$.modes.${t}.${n}`,
|
|
70
|
+
message: `${n} and ${i} have less than ${o}:1 contrast.`
|
|
71
|
+
});
|
|
72
|
+
}, _ = (e, t) => {
|
|
67
73
|
let n = ([e, t, n]) => {
|
|
68
74
|
let [r, i, a] = [
|
|
69
75
|
e,
|
|
@@ -77,7 +83,7 @@ var e = Object.defineProperty, t = (e, t) => () => (t || e((t = { exports: {} })
|
|
|
77
83
|
}, r = n(e), i = n(t);
|
|
78
84
|
return (Math.max(r, i) + .05) / (Math.min(r, i) + .05);
|
|
79
85
|
};
|
|
80
|
-
function
|
|
86
|
+
function te(e) {
|
|
81
87
|
let t = [], n = [];
|
|
82
88
|
if (!l(e)) return {
|
|
83
89
|
ok: !1,
|
|
@@ -184,28 +190,25 @@ function _(e) {
|
|
|
184
190
|
h(e.modes, ["light", "dark"], "$.modes", t);
|
|
185
191
|
for (let r of ["light", "dark"]) {
|
|
186
192
|
let i = e.modes[r];
|
|
187
|
-
if (i
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
193
|
+
if (i !== void 0) {
|
|
194
|
+
if (!l(i)) {
|
|
195
|
+
t.push({
|
|
196
|
+
path: `$.modes.${r}`,
|
|
197
|
+
message: "Mode tokens must be an object."
|
|
198
|
+
});
|
|
199
|
+
continue;
|
|
200
|
+
}
|
|
201
|
+
h(i, s, `$.modes.${r}`, t);
|
|
202
|
+
for (let [e, n] of Object.entries(i)) {
|
|
203
|
+
if (!s.includes(e)) continue;
|
|
204
|
+
let i = e.startsWith("shadow");
|
|
205
|
+
(i ? u(n) : d(n)) || t.push({
|
|
206
|
+
path: `$.modes.${r}.${e}`,
|
|
207
|
+
message: i ? "Invalid shadow value." : "Invalid CSS color."
|
|
208
|
+
});
|
|
209
|
+
}
|
|
210
|
+
g(n, r, "textPrimary", i.textPrimary, "canvas", i.canvas), g(n, r, "onAccent", i.onAccent, "accent", i.accent), g(n, r, "danger", i.danger, "canvas", i.canvas, 3), g(n, r, "focusRing", i.focusRing, "canvas", i.canvas, 3);
|
|
203
211
|
}
|
|
204
|
-
let a = ee(i.canvas), o = ee(i.textPrimary);
|
|
205
|
-
a && o && g(o, a) < 4.5 && n.push({
|
|
206
|
-
path: `$.modes.${r}.textPrimary`,
|
|
207
|
-
message: "textPrimary and canvas have less than 4.5:1 contrast."
|
|
208
|
-
});
|
|
209
212
|
}
|
|
210
213
|
}
|
|
211
214
|
return t.length ? {
|
|
@@ -218,8 +221,8 @@ function _(e) {
|
|
|
218
221
|
warnings: n
|
|
219
222
|
};
|
|
220
223
|
}
|
|
221
|
-
var
|
|
222
|
-
function
|
|
224
|
+
var v = (e) => e.replace(/[A-Z]/g, (e) => `-${e.toLowerCase()}`);
|
|
225
|
+
function y(e) {
|
|
223
226
|
let t = /* @__PURE__ */ new Map();
|
|
224
227
|
for (let [n, r] of Object.entries(e.tokens?.colors ?? {})) for (let [e, i] of Object.entries(r ?? {})) t.set(`--wc-${n}-${e}`, i);
|
|
225
228
|
let n = e.tokens?.fonts;
|
|
@@ -234,25 +237,27 @@ function v(e) {
|
|
|
234
237
|
}
|
|
235
238
|
for (let [n, r] of Object.entries(e.tokens?.radius ?? {})) t.set(`--wc-radius-${n}`, r);
|
|
236
239
|
e.tokens?.motion?.fast && t.set("--wc-motion-fast", e.tokens.motion.fast), e.tokens?.motion?.normal && t.set("--wc-motion-normal", e.tokens.motion.normal), e.tokens?.motion?.easing && t.set("--wc-ease-standard", e.tokens.motion.easing);
|
|
237
|
-
for (let n of ["light", "dark"]) for (let [r, i] of Object.entries(e.modes?.[n] ?? {})) t.set(`--wc-theme-${n}-${
|
|
240
|
+
for (let n of ["light", "dark"]) for (let [r, i] of Object.entries(e.modes?.[n] ?? {})) t.set(`--wc-theme-${n}-${v(r)}`, i);
|
|
238
241
|
return t;
|
|
239
242
|
}
|
|
240
|
-
var
|
|
241
|
-
function
|
|
242
|
-
let t =
|
|
243
|
+
var ne = (e) => e === void 0 ? typeof document > "u" ? null : document.documentElement : e;
|
|
244
|
+
function b(e) {
|
|
245
|
+
let t = ne(e);
|
|
243
246
|
if (t) {
|
|
244
|
-
for (let e of c.get(t) ?? []) t.style.removeProperty(e);
|
|
247
|
+
for (let [e, n] of c.get(t) ?? []) n === null ? t.style.removeProperty(e) : t.style.setProperty(e, n);
|
|
245
248
|
c.delete(t);
|
|
246
249
|
}
|
|
247
250
|
}
|
|
248
|
-
function
|
|
249
|
-
let n =
|
|
251
|
+
function x(e, t = {}) {
|
|
252
|
+
let n = te(e);
|
|
250
253
|
if (!n.ok) return n;
|
|
251
|
-
let r =
|
|
254
|
+
let r = ne(t.target), i = y(n.config);
|
|
252
255
|
if (r) {
|
|
253
|
-
|
|
256
|
+
b(r);
|
|
257
|
+
let e = /* @__PURE__ */ new Map();
|
|
258
|
+
for (let t of i.keys()) e.set(t, r.style.getPropertyValue(t) || null);
|
|
254
259
|
for (let [e, t] of i) r.style.setProperty(e, t);
|
|
255
|
-
c.set(r,
|
|
260
|
+
c.set(r, e);
|
|
256
261
|
}
|
|
257
262
|
return {
|
|
258
263
|
ok: !0,
|
|
@@ -260,7 +265,7 @@ function b(e, t = {}) {
|
|
|
260
265
|
warnings: n.warnings
|
|
261
266
|
};
|
|
262
267
|
}
|
|
263
|
-
async function
|
|
268
|
+
async function S(e, t = {}) {
|
|
264
269
|
if (typeof e != "string" || !e.trim() || typeof fetch > "u") return {
|
|
265
270
|
ok: !1,
|
|
266
271
|
url: e,
|
|
@@ -271,9 +276,12 @@ async function x(e, t = {}) {
|
|
|
271
276
|
warnings: []
|
|
272
277
|
};
|
|
273
278
|
try {
|
|
274
|
-
let n = await fetch(e, {
|
|
279
|
+
let n = await fetch(e, {
|
|
280
|
+
cache: "no-store",
|
|
281
|
+
signal: t.signal
|
|
282
|
+
});
|
|
275
283
|
return n.ok ? {
|
|
276
|
-
...
|
|
284
|
+
...x(await n.json(), t),
|
|
277
285
|
url: e
|
|
278
286
|
} : {
|
|
279
287
|
ok: !1,
|
|
@@ -296,10 +304,10 @@ async function x(e, t = {}) {
|
|
|
296
304
|
};
|
|
297
305
|
}
|
|
298
306
|
}
|
|
299
|
-
function
|
|
300
|
-
let t =
|
|
307
|
+
function C(e) {
|
|
308
|
+
let t = te(e);
|
|
301
309
|
if (!t.ok) return t;
|
|
302
|
-
let n =
|
|
310
|
+
let n = y(t.config), r = `:root{${[...n].map(([e, t]) => `${e}:${t}`).join(";")}}`;
|
|
303
311
|
return {
|
|
304
312
|
ok: !0,
|
|
305
313
|
appliedVariables: n.size,
|
|
@@ -309,81 +317,86 @@ function S(e) {
|
|
|
309
317
|
}
|
|
310
318
|
//#endregion
|
|
311
319
|
//#region src/theme/controller.ts
|
|
312
|
-
var
|
|
320
|
+
var re = [
|
|
313
321
|
"light",
|
|
314
322
|
"dark",
|
|
315
323
|
"system"
|
|
316
|
-
],
|
|
317
|
-
function
|
|
324
|
+
], w = "wc-mode", T = "wc-scheme", E = (e) => typeof e == "string" && re.includes(e), D = (e, t = !1) => e === "system" ? t ? "dark" : "light" : e;
|
|
325
|
+
function O(e, t, n) {
|
|
318
326
|
e.dataset.theme = t, e.dataset.resolvedTheme = n, e.classList.toggle("dark", n === "dark"), e.classList.toggle("light", n === "light"), e.style.colorScheme = n;
|
|
319
327
|
}
|
|
320
|
-
function
|
|
321
|
-
let t =
|
|
328
|
+
function k(e = {}) {
|
|
329
|
+
let t = E(e.initialMode) ? e.initialMode : "system", n = e.initialResolvedMode === "dark", r = !1, i = null, a = null, o = null, s = null, c = typeof e.storageKey == "string" && e.storageKey.trim() ? e.storageKey : w, l = /* @__PURE__ */ new Set(), u = () => D(t, n), d = () => ({
|
|
322
330
|
mode: t,
|
|
323
|
-
resolvedMode:
|
|
324
|
-
dark:
|
|
325
|
-
}),
|
|
326
|
-
let n =
|
|
327
|
-
if (i &&
|
|
328
|
-
|
|
331
|
+
resolvedMode: u(),
|
|
332
|
+
dark: u() === "dark"
|
|
333
|
+
}), f = () => l.forEach((e) => e(d())), p = (e = !0) => {
|
|
334
|
+
let n = d();
|
|
335
|
+
if (i && O(i, n.mode, n.resolvedMode), e) try {
|
|
336
|
+
o?.setItem(c, t);
|
|
329
337
|
} catch {}
|
|
330
|
-
|
|
331
|
-
}, p = (e) => {
|
|
332
|
-
n = e.matches, t === "system" && f(!1);
|
|
338
|
+
f();
|
|
333
339
|
}, m = (e) => {
|
|
334
|
-
|
|
340
|
+
n = e.matches, t === "system" && p(!1);
|
|
341
|
+
}, h = (e) => {
|
|
342
|
+
e.key !== c || !E(e.newValue) || e.newValue === t || (t = e.newValue, p(!1));
|
|
335
343
|
};
|
|
336
344
|
return {
|
|
337
345
|
get mode() {
|
|
338
346
|
return t;
|
|
339
347
|
},
|
|
340
348
|
get resolvedMode() {
|
|
341
|
-
return
|
|
349
|
+
return u();
|
|
342
350
|
},
|
|
343
351
|
get dark() {
|
|
344
|
-
return
|
|
352
|
+
return u() === "dark";
|
|
345
353
|
},
|
|
346
354
|
get started() {
|
|
347
355
|
return r;
|
|
348
356
|
},
|
|
349
357
|
start() {
|
|
350
358
|
if (!(r || typeof window > "u")) {
|
|
351
|
-
if (r = !0, i = e.target === void 0 ? document.documentElement : e.target,
|
|
352
|
-
|
|
359
|
+
if (r = !0, i = e.target === void 0 ? document.documentElement : e.target, a = i ? {
|
|
360
|
+
theme: i.dataset.theme,
|
|
361
|
+
resolvedTheme: i.dataset.resolvedTheme,
|
|
362
|
+
className: i.className,
|
|
363
|
+
colorScheme: i.style.colorScheme
|
|
364
|
+
} : null, e.storage === void 0) try {
|
|
365
|
+
o = window.localStorage;
|
|
353
366
|
} catch {
|
|
354
|
-
|
|
367
|
+
o = null;
|
|
355
368
|
}
|
|
356
|
-
else
|
|
357
|
-
if (
|
|
358
|
-
let n =
|
|
359
|
-
|
|
369
|
+
else o = e.storage;
|
|
370
|
+
if (s = typeof globalThis.matchMedia == "function" ? globalThis.matchMedia("(prefers-color-scheme: dark)") : null, n = s?.matches ?? n, e.readStorage !== !1) try {
|
|
371
|
+
let n = o?.getItem(c), r = e.storageKey === void 0 ? o?.getItem(T) : null;
|
|
372
|
+
E(n) ? t = n : (r === "light" || r === "dark") && (t = r, o?.setItem(c, r));
|
|
360
373
|
} catch {}
|
|
361
|
-
|
|
374
|
+
s?.addEventListener?.("change", m), s?.addEventListener || s?.addListener?.(m), window.addEventListener("storage", h), p(!1);
|
|
362
375
|
}
|
|
363
376
|
},
|
|
364
377
|
setMode(e) {
|
|
365
|
-
!
|
|
378
|
+
!E(e) || e === t || (t = e, p(r));
|
|
366
379
|
},
|
|
367
380
|
toggleMode() {
|
|
368
|
-
t =
|
|
381
|
+
t = u() === "dark" ? "light" : "dark", p(r);
|
|
369
382
|
},
|
|
370
383
|
subscribe(e) {
|
|
371
|
-
return
|
|
384
|
+
return l.add(e), e(d()), () => l.delete(e);
|
|
372
385
|
},
|
|
373
386
|
destroy() {
|
|
374
|
-
|
|
387
|
+
s?.removeEventListener?.("change", m), s?.removeEventListener || s?.removeListener?.(m), typeof window < "u" && window.removeEventListener("storage", h), i && a && (a.theme === void 0 ? delete i.dataset.theme : i.dataset.theme = a.theme, a.resolvedTheme === void 0 ? delete i.dataset.resolvedTheme : i.dataset.resolvedTheme = a.resolvedTheme, i.className = a.className, i.style.colorScheme = a.colorScheme), l.clear(), s = null, o = null, i = null, a = null, r = !1;
|
|
375
388
|
}
|
|
376
389
|
};
|
|
377
390
|
}
|
|
378
391
|
//#endregion
|
|
379
392
|
//#region src/theme/ssr.ts
|
|
380
|
-
function
|
|
381
|
-
let t =
|
|
393
|
+
function A(e = {}) {
|
|
394
|
+
let t = E(e.defaultMode) ? e.defaultMode : "system", n = typeof e.storageKey == "string" && e.storageKey.trim() ? e.storageKey : w;
|
|
382
395
|
return `(()=>{const d=document.documentElement;let m=${JSON.stringify(t)};try{const s=localStorage.getItem(${JSON.stringify(n).replace(/</g, "\\u003c")});if(s==='light'||s==='dark'||s==='system')m=s}catch{}const r=m==='system'&&matchMedia('(prefers-color-scheme: dark)').matches?'dark':m==='system'?'light':m;d.dataset.theme=m;d.dataset.resolvedTheme=r;d.classList.toggle('dark',r==='dark');d.classList.toggle('light',r==='light');d.style.colorScheme=r})()`;
|
|
383
396
|
}
|
|
384
397
|
//#endregion
|
|
385
398
|
//#region src/composition/index.ts
|
|
386
|
-
var
|
|
399
|
+
var j = [
|
|
387
400
|
"none",
|
|
388
401
|
"2xs",
|
|
389
402
|
"xs",
|
|
@@ -393,81 +406,81 @@ var A = [
|
|
|
393
406
|
"xl",
|
|
394
407
|
"2xl",
|
|
395
408
|
"3xl"
|
|
396
|
-
],
|
|
409
|
+
], M = [
|
|
397
410
|
"stretch",
|
|
398
411
|
"start",
|
|
399
412
|
"center",
|
|
400
413
|
"end"
|
|
401
|
-
],
|
|
414
|
+
], N = [
|
|
402
415
|
"sm",
|
|
403
416
|
"md",
|
|
404
417
|
"lg",
|
|
405
418
|
"xl",
|
|
406
419
|
"full"
|
|
407
|
-
],
|
|
420
|
+
], ie = [
|
|
408
421
|
"none",
|
|
409
422
|
"sm",
|
|
410
423
|
"md",
|
|
411
424
|
"lg"
|
|
412
|
-
],
|
|
425
|
+
], ae = [
|
|
413
426
|
"start",
|
|
414
427
|
"center",
|
|
415
428
|
"end",
|
|
416
429
|
"between",
|
|
417
430
|
"around"
|
|
418
|
-
],
|
|
431
|
+
], oe = [
|
|
419
432
|
"equal",
|
|
420
433
|
"sidebar",
|
|
421
434
|
"sidebar-end",
|
|
422
435
|
"wide-start",
|
|
423
436
|
"wide-end"
|
|
424
|
-
],
|
|
437
|
+
], se = [
|
|
425
438
|
"none",
|
|
426
439
|
"sm",
|
|
427
440
|
"md",
|
|
428
441
|
"lg"
|
|
429
|
-
],
|
|
430
|
-
VALID_VARIANTS: () =>
|
|
431
|
-
buildAccordionClasses: () =>
|
|
432
|
-
normalizeVariant: () =>
|
|
433
|
-
toggleActiveItems: () =>
|
|
434
|
-
}),
|
|
442
|
+
], ce = /* @__PURE__ */ n({
|
|
443
|
+
VALID_VARIANTS: () => le,
|
|
444
|
+
buildAccordionClasses: () => fe,
|
|
445
|
+
normalizeVariant: () => ue,
|
|
446
|
+
toggleActiveItems: () => pe
|
|
447
|
+
}), le = [
|
|
435
448
|
"default",
|
|
436
449
|
"bordered",
|
|
437
450
|
"filled"
|
|
438
451
|
];
|
|
439
|
-
function
|
|
440
|
-
return
|
|
452
|
+
function ue(e = "default") {
|
|
453
|
+
return le.includes(e) ? e : "default";
|
|
441
454
|
}
|
|
442
|
-
function
|
|
455
|
+
function de(e) {
|
|
443
456
|
return e ? typeof e == "string" ? e : Array.isArray(e) ? e.filter(Boolean).join(" ") : typeof e == "object" ? Object.entries(e).filter(([, e]) => e).map(([e]) => e).join(" ") : "" : "";
|
|
444
457
|
}
|
|
445
|
-
function
|
|
446
|
-
let n =
|
|
458
|
+
function fe(e = "default", t = "") {
|
|
459
|
+
let n = ue(e), r = de(t);
|
|
447
460
|
return [
|
|
448
461
|
"wc-accordion",
|
|
449
462
|
n === "default" ? "" : `wc-accordion--${n}`,
|
|
450
463
|
r
|
|
451
464
|
].filter(Boolean).join(" ");
|
|
452
465
|
}
|
|
453
|
-
function
|
|
466
|
+
function pe(e = [], t, n = !1) {
|
|
454
467
|
return n ? e.includes(t) ? e.filter((e) => e !== t) : [...e, t] : e.includes(t) ? [] : [t];
|
|
455
468
|
}
|
|
456
469
|
//#endregion
|
|
457
470
|
//#region src/components/Alert/utils.jsx
|
|
458
|
-
var
|
|
459
|
-
getAlertClasses: () =>
|
|
460
|
-
isValidAlertType: () =>
|
|
461
|
-
isValidAlertVariant: () =>
|
|
471
|
+
var me = /* @__PURE__ */ n({
|
|
472
|
+
getAlertClasses: () => he,
|
|
473
|
+
isValidAlertType: () => ge,
|
|
474
|
+
isValidAlertVariant: () => _e
|
|
462
475
|
});
|
|
463
|
-
function
|
|
476
|
+
function he(e, t) {
|
|
464
477
|
return [
|
|
465
478
|
"wc-alert",
|
|
466
479
|
`wc-alert--${e}`,
|
|
467
480
|
`wc-alert--${t}`
|
|
468
481
|
];
|
|
469
482
|
}
|
|
470
|
-
function
|
|
483
|
+
function ge(e) {
|
|
471
484
|
return [
|
|
472
485
|
"success",
|
|
473
486
|
"info",
|
|
@@ -475,7 +488,7 @@ function _e(e) {
|
|
|
475
488
|
"error"
|
|
476
489
|
].includes(e);
|
|
477
490
|
}
|
|
478
|
-
function
|
|
491
|
+
function _e(e) {
|
|
479
492
|
return [
|
|
480
493
|
"filled",
|
|
481
494
|
"outlined",
|
|
@@ -485,23 +498,23 @@ function ve(e) {
|
|
|
485
498
|
}
|
|
486
499
|
//#endregion
|
|
487
500
|
//#region src/components/AppBar/utils.js
|
|
488
|
-
var
|
|
489
|
-
colorMap: () =>
|
|
490
|
-
getAppBarClasses: () =>
|
|
491
|
-
positionMap: () =>
|
|
492
|
-
shadowMap: () =>
|
|
493
|
-
}),
|
|
501
|
+
var ve = /* @__PURE__ */ n({
|
|
502
|
+
colorMap: () => ye,
|
|
503
|
+
getAppBarClasses: () => F,
|
|
504
|
+
positionMap: () => P,
|
|
505
|
+
shadowMap: () => be
|
|
506
|
+
}), P = {
|
|
494
507
|
fixed: "fixed top-0 left-0 right-0",
|
|
495
508
|
absolute: "absolute top-0 left-0 right-0",
|
|
496
509
|
sticky: "sticky top-0",
|
|
497
510
|
static: "static",
|
|
498
511
|
relative: "relative"
|
|
499
|
-
},
|
|
512
|
+
}, ye = {
|
|
500
513
|
primary: "bg-primary-500 text-white",
|
|
501
514
|
secondary: "bg-neutral-100 dark:bg-neutral-800 text-neutral-900 dark:text-neutral-100",
|
|
502
515
|
transparent: "bg-transparent",
|
|
503
516
|
inherit: "bg-inherit text-inherit"
|
|
504
|
-
},
|
|
517
|
+
}, be = {
|
|
505
518
|
0: "shadow-none",
|
|
506
519
|
1: "shadow-sm",
|
|
507
520
|
2: "shadow",
|
|
@@ -512,35 +525,35 @@ var ye = /* @__PURE__ */ n({
|
|
|
512
525
|
12: "shadow-2xl",
|
|
513
526
|
16: "shadow-2xl",
|
|
514
527
|
24: "shadow-2xl"
|
|
515
|
-
},
|
|
528
|
+
}, F = (e, t, n, r, i = "") => [
|
|
516
529
|
"w-full transition-all duration-250 z-50",
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
r === "outlined" ? "border-b border-neutral-200 dark:border-neutral-700" :
|
|
530
|
+
P[e] || P.fixed,
|
|
531
|
+
ye[t] || ye.primary,
|
|
532
|
+
r === "outlined" ? "border-b border-neutral-200 dark:border-neutral-700" : be[n] || be[4],
|
|
520
533
|
i
|
|
521
|
-
].filter(Boolean).join(" "),
|
|
522
|
-
generateAvatarText: () =>
|
|
523
|
-
getAvatarClasses: () =>
|
|
524
|
-
getAvatarStyles: () =>
|
|
525
|
-
handleImageError: () =>
|
|
526
|
-
handleImageLoad: () =>
|
|
527
|
-
isValidColor: () =>
|
|
528
|
-
isValidSize: () =>
|
|
529
|
-
isValidVariant: () =>
|
|
530
|
-
validColors: () =>
|
|
531
|
-
validSizes: () =>
|
|
532
|
-
validVariants: () =>
|
|
533
|
-
}),
|
|
534
|
+
].filter(Boolean).join(" "), xe = /* @__PURE__ */ n({
|
|
535
|
+
generateAvatarText: () => Ae,
|
|
536
|
+
getAvatarClasses: () => Oe,
|
|
537
|
+
getAvatarStyles: () => ke,
|
|
538
|
+
handleImageError: () => je,
|
|
539
|
+
handleImageLoad: () => Me,
|
|
540
|
+
isValidColor: () => De,
|
|
541
|
+
isValidSize: () => Te,
|
|
542
|
+
isValidVariant: () => Ee,
|
|
543
|
+
validColors: () => we,
|
|
544
|
+
validSizes: () => Se,
|
|
545
|
+
validVariants: () => Ce
|
|
546
|
+
}), Se = [
|
|
534
547
|
"xs",
|
|
535
548
|
"sm",
|
|
536
549
|
"md",
|
|
537
550
|
"lg",
|
|
538
551
|
"xl"
|
|
539
|
-
],
|
|
552
|
+
], Ce = [
|
|
540
553
|
"circular",
|
|
541
554
|
"rounded",
|
|
542
555
|
"square"
|
|
543
|
-
],
|
|
556
|
+
], we = [
|
|
544
557
|
"default",
|
|
545
558
|
"primary",
|
|
546
559
|
"secondary",
|
|
@@ -548,46 +561,46 @@ var ye = /* @__PURE__ */ n({
|
|
|
548
561
|
"warning",
|
|
549
562
|
"error"
|
|
550
563
|
];
|
|
564
|
+
function Te(e) {
|
|
565
|
+
return typeof e == "number" ? e > 0 : Se.includes(e);
|
|
566
|
+
}
|
|
551
567
|
function Ee(e) {
|
|
552
|
-
return
|
|
568
|
+
return Ce.includes(e);
|
|
553
569
|
}
|
|
554
570
|
function De(e) {
|
|
555
571
|
return we.includes(e);
|
|
556
572
|
}
|
|
557
|
-
function Oe(e) {
|
|
558
|
-
return Te.includes(e);
|
|
559
|
-
}
|
|
560
|
-
function ke({ size: e, variant: t, color: n, src: r, imgError: i }) {
|
|
573
|
+
function Oe({ size: e, variant: t, color: n, src: r, imgError: i }) {
|
|
561
574
|
let a = ["wc-avatar"];
|
|
562
575
|
return typeof e == "string" && a.push(`wc-avatar--${e}`), a.push(`wc-avatar--${t}`), (!r || i) && a.push(`wc-avatar--${n}`), a;
|
|
563
576
|
}
|
|
564
|
-
function
|
|
577
|
+
function ke(e) {
|
|
565
578
|
let t = {};
|
|
566
579
|
return typeof e == "number" && (t.width = `${e}px`, t.height = `${e}px`, t.fontSize = `${e * .4}px`), t;
|
|
567
580
|
}
|
|
568
|
-
function
|
|
581
|
+
function Ae(e) {
|
|
569
582
|
if (!e) return "";
|
|
570
583
|
let t = e.trim(), n = t.charAt(0);
|
|
571
584
|
if (/[\u4e00-\u9fa5]/.test(n)) return n;
|
|
572
585
|
let r = t.split(/\s+/).filter(Boolean);
|
|
573
586
|
return r.length === 1 ? r[0].charAt(0).toUpperCase() : (r[0].charAt(0) + r[1].charAt(0)).toUpperCase();
|
|
574
587
|
}
|
|
575
|
-
function
|
|
588
|
+
function je(e) {
|
|
576
589
|
e(!0);
|
|
577
590
|
}
|
|
578
|
-
function
|
|
591
|
+
function Me(e) {
|
|
579
592
|
e(!1);
|
|
580
593
|
}
|
|
581
594
|
//#endregion
|
|
582
595
|
//#region src/components/Badge/utils.js
|
|
583
|
-
var
|
|
596
|
+
var Ne = /* @__PURE__ */ n({
|
|
584
597
|
getBadgeClasses: () => ze,
|
|
585
|
-
getSafeVariant: () =>
|
|
586
|
-
isValidSize: () =>
|
|
587
|
-
isValidVariant: () =>
|
|
588
|
-
validSizes: () =>
|
|
589
|
-
validVariants: () =>
|
|
590
|
-
}),
|
|
598
|
+
getSafeVariant: () => Re,
|
|
599
|
+
isValidSize: () => Le,
|
|
600
|
+
isValidVariant: () => Ie,
|
|
601
|
+
validSizes: () => Fe,
|
|
602
|
+
validVariants: () => Pe
|
|
603
|
+
}), Pe = [
|
|
591
604
|
"primary",
|
|
592
605
|
"secondary",
|
|
593
606
|
"success",
|
|
@@ -597,22 +610,22 @@ var Pe = /* @__PURE__ */ n({
|
|
|
597
610
|
"orange",
|
|
598
611
|
"cyan",
|
|
599
612
|
"pink"
|
|
600
|
-
],
|
|
613
|
+
], Fe = [
|
|
601
614
|
"sm",
|
|
602
615
|
"md",
|
|
603
616
|
"lg"
|
|
604
617
|
];
|
|
618
|
+
function Ie(e) {
|
|
619
|
+
return Pe.includes(e);
|
|
620
|
+
}
|
|
605
621
|
function Le(e) {
|
|
606
622
|
return Fe.includes(e);
|
|
607
623
|
}
|
|
608
624
|
function Re(e) {
|
|
609
|
-
return Ie
|
|
610
|
-
}
|
|
611
|
-
function P(e) {
|
|
612
|
-
return Le(e) ? e : "primary";
|
|
625
|
+
return Ie(e) ? e : "primary";
|
|
613
626
|
}
|
|
614
627
|
function ze({ variant: e, size: t, dot: n, className: r }) {
|
|
615
|
-
let i = ["wc-badge", `wc-badge--${
|
|
628
|
+
let i = ["wc-badge", `wc-badge--${Re(e)}`];
|
|
616
629
|
return n ? i.push(`wc-badge--dot-${t}`) : i.push(`wc-badge--${t}`), r && i.push(r), i.filter(Boolean).join(" ");
|
|
617
630
|
}
|
|
618
631
|
//#endregion
|
|
@@ -671,10 +684,10 @@ var Ze = /* @__PURE__ */ n({
|
|
|
671
684
|
getBoxClasses: () => rt,
|
|
672
685
|
getBoxStyles: () => it,
|
|
673
686
|
justifyMap: () => et,
|
|
674
|
-
sizeVal: () =>
|
|
675
|
-
spacingMap: () =>
|
|
687
|
+
sizeVal: () => L,
|
|
688
|
+
spacingMap: () => I,
|
|
676
689
|
wrapMap: () => nt
|
|
677
|
-
}),
|
|
690
|
+
}), I = {
|
|
678
691
|
0: "0",
|
|
679
692
|
1: "0.25rem",
|
|
680
693
|
2: "0.5rem",
|
|
@@ -718,7 +731,7 @@ var Ze = /* @__PURE__ */ n({
|
|
|
718
731
|
nowrap: "flex-nowrap",
|
|
719
732
|
"wrap-reverse": "flex-wrap-reverse"
|
|
720
733
|
};
|
|
721
|
-
function
|
|
734
|
+
function L(e) {
|
|
722
735
|
return typeof e == "number" ? `${e}px` : e;
|
|
723
736
|
}
|
|
724
737
|
function rt(e) {
|
|
@@ -745,23 +758,23 @@ function rt(e) {
|
|
|
745
758
|
}
|
|
746
759
|
function it(e) {
|
|
747
760
|
let t = {};
|
|
748
|
-
if (e.p !== void 0 && (t.padding =
|
|
749
|
-
let n =
|
|
761
|
+
if (e.p !== void 0 && (t.padding = I[e.p] || L(e.p)), e.pt !== void 0 && (t.paddingTop = I[e.pt] || L(e.pt)), e.pr !== void 0 && (t.paddingRight = I[e.pr] || L(e.pr)), e.pb !== void 0 && (t.paddingBottom = I[e.pb] || L(e.pb)), e.pl !== void 0 && (t.paddingLeft = I[e.pl] || L(e.pl)), e.px !== void 0) {
|
|
762
|
+
let n = I[e.px] || L(e.px);
|
|
750
763
|
t.paddingLeft = n, t.paddingRight = n;
|
|
751
764
|
}
|
|
752
765
|
if (e.py !== void 0) {
|
|
753
|
-
let n =
|
|
766
|
+
let n = I[e.py] || L(e.py);
|
|
754
767
|
t.paddingTop = n, t.paddingBottom = n;
|
|
755
768
|
}
|
|
756
|
-
if (e.m !== void 0 && (t.margin =
|
|
757
|
-
let n =
|
|
769
|
+
if (e.m !== void 0 && (t.margin = I[e.m] || L(e.m)), e.mt !== void 0 && (t.marginTop = I[e.mt] || L(e.mt)), e.mr !== void 0 && (t.marginRight = I[e.mr] || L(e.mr)), e.mb !== void 0 && (t.marginBottom = I[e.mb] || L(e.mb)), e.ml !== void 0 && (t.marginLeft = I[e.ml] || L(e.ml)), e.mx !== void 0) {
|
|
770
|
+
let n = I[e.mx] || L(e.mx);
|
|
758
771
|
t.marginLeft = n, t.marginRight = n;
|
|
759
772
|
}
|
|
760
773
|
if (e.my !== void 0) {
|
|
761
|
-
let n =
|
|
774
|
+
let n = I[e.my] || L(e.my);
|
|
762
775
|
t.marginTop = n, t.marginBottom = n;
|
|
763
776
|
}
|
|
764
|
-
return e.display && (t.display = e.display), e.flexDirection && (t.flexDirection = e.flexDirection), e.justifyContent && (t.justifyContent = e.justifyContent), e.alignItems && (t.alignItems = e.alignItems), e.flexWrap && (t.flexWrap = e.flexWrap), e.gap !== void 0 && (t.gap =
|
|
777
|
+
return e.display && (t.display = e.display), e.flexDirection && (t.flexDirection = e.flexDirection), e.justifyContent && (t.justifyContent = e.justifyContent), e.alignItems && (t.alignItems = e.alignItems), e.flexWrap && (t.flexWrap = e.flexWrap), e.gap !== void 0 && (t.gap = L(e.gap)), e.bgcolor && (t.backgroundColor = e.bgcolor), e.color && (t.color = e.color), e.border && (t.border = e.border), e.borderRadius !== void 0 && (t.borderRadius = typeof e.borderRadius == "number" ? `${e.borderRadius}px` : e.borderRadius), e.width !== void 0 && (t.width = L(e.width)), e.height !== void 0 && (t.height = L(e.height)), e.minWidth !== void 0 && (t.minWidth = L(e.minWidth)), e.minHeight !== void 0 && (t.minHeight = L(e.minHeight)), e.maxWidth !== void 0 && (t.maxWidth = L(e.maxWidth)), e.maxHeight !== void 0 && (t.maxHeight = L(e.maxHeight)), t;
|
|
765
778
|
}
|
|
766
779
|
//#endregion
|
|
767
780
|
//#region src/components/Breadcrumb/utils.js
|
|
@@ -1126,7 +1139,7 @@ var qt = /* @__PURE__ */ t(((e) => {
|
|
|
1126
1139
|
return t.call(n, e, i++);
|
|
1127
1140
|
}), r;
|
|
1128
1141
|
}
|
|
1129
|
-
function
|
|
1142
|
+
function j(e) {
|
|
1130
1143
|
if (e._status === -1) {
|
|
1131
1144
|
var t = e._result;
|
|
1132
1145
|
t = t(), t.then(function(t) {
|
|
@@ -1138,7 +1151,7 @@ var qt = /* @__PURE__ */ t(((e) => {
|
|
|
1138
1151
|
if (e._status === 1) return e._result.default;
|
|
1139
1152
|
throw e._result;
|
|
1140
1153
|
}
|
|
1141
|
-
var
|
|
1154
|
+
var M = typeof reportError == "function" ? reportError : function(e) {
|
|
1142
1155
|
if (typeof window == "object" && typeof window.ErrorEvent == "function") {
|
|
1143
1156
|
var t = new window.ErrorEvent("error", {
|
|
1144
1157
|
bubbles: !0,
|
|
@@ -1152,7 +1165,7 @@ var qt = /* @__PURE__ */ t(((e) => {
|
|
|
1152
1165
|
return;
|
|
1153
1166
|
}
|
|
1154
1167
|
console.error(e);
|
|
1155
|
-
},
|
|
1168
|
+
}, N = {
|
|
1156
1169
|
map: A,
|
|
1157
1170
|
forEach: function(e, t, n) {
|
|
1158
1171
|
A(e, function() {
|
|
@@ -1175,7 +1188,7 @@ var qt = /* @__PURE__ */ t(((e) => {
|
|
|
1175
1188
|
return e;
|
|
1176
1189
|
}
|
|
1177
1190
|
};
|
|
1178
|
-
e.Activity = f, e.Children =
|
|
1191
|
+
e.Activity = f, e.Children = N, e.Component = _, e.Fragment = r, e.Profiler = a, e.PureComponent = v, e.StrictMode = i, e.Suspense = l, e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE = x, e.__COMPILER_RUNTIME = {
|
|
1179
1192
|
__proto__: null,
|
|
1180
1193
|
c: function(e) {
|
|
1181
1194
|
return x.H.useMemoCache(e);
|
|
@@ -1234,7 +1247,7 @@ var qt = /* @__PURE__ */ t(((e) => {
|
|
|
1234
1247
|
_status: -1,
|
|
1235
1248
|
_result: e
|
|
1236
1249
|
},
|
|
1237
|
-
_init:
|
|
1250
|
+
_init: j
|
|
1238
1251
|
};
|
|
1239
1252
|
}, e.memo = function(e, t) {
|
|
1240
1253
|
return {
|
|
@@ -1247,9 +1260,9 @@ var qt = /* @__PURE__ */ t(((e) => {
|
|
|
1247
1260
|
x.T = n;
|
|
1248
1261
|
try {
|
|
1249
1262
|
var r = e(), i = x.S;
|
|
1250
|
-
i !== null && i(n, r), typeof r == "object" && r && typeof r.then == "function" && r.then(b,
|
|
1263
|
+
i !== null && i(n, r), typeof r == "object" && r && typeof r.then == "function" && r.then(b, M);
|
|
1251
1264
|
} catch (e) {
|
|
1252
|
-
|
|
1265
|
+
M(e);
|
|
1253
1266
|
} finally {
|
|
1254
1267
|
t !== null && n.types !== null && (t.types = n.types), x.T = t;
|
|
1255
1268
|
}
|
|
@@ -1300,19 +1313,19 @@ var qt = /* @__PURE__ */ t(((e) => {
|
|
|
1300
1313
|
} });
|
|
1301
1314
|
}
|
|
1302
1315
|
function r(e) {
|
|
1303
|
-
return typeof e != "object" || !e ? null : (e =
|
|
1316
|
+
return typeof e != "object" || !e ? null : (e = me && e[me] || e["@@iterator"], typeof e == "function" ? e : null);
|
|
1304
1317
|
}
|
|
1305
1318
|
function i(e, t) {
|
|
1306
1319
|
e = (e = e.constructor) && (e.displayName || e.name) || "ReactClass";
|
|
1307
1320
|
var n = e + "." + t;
|
|
1308
|
-
|
|
1321
|
+
he[n] || (console.error("Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.", t, e), he[n] = !0);
|
|
1309
1322
|
}
|
|
1310
1323
|
function a(e, t, n) {
|
|
1311
|
-
this.props = e, this.context = t, this.refs =
|
|
1324
|
+
this.props = e, this.context = t, this.refs = ve, this.updater = n || ge;
|
|
1312
1325
|
}
|
|
1313
1326
|
function o() {}
|
|
1314
1327
|
function s(e, t, n) {
|
|
1315
|
-
this.props = e, this.context = t, this.refs =
|
|
1328
|
+
this.props = e, this.context = t, this.refs = ve, this.updater = n || ge;
|
|
1316
1329
|
}
|
|
1317
1330
|
function c() {}
|
|
1318
1331
|
function l(e) {
|
|
@@ -1333,25 +1346,25 @@ var qt = /* @__PURE__ */ t(((e) => {
|
|
|
1333
1346
|
}
|
|
1334
1347
|
function d(e) {
|
|
1335
1348
|
if (e == null) return null;
|
|
1336
|
-
if (typeof e == "function") return e.$$typeof ===
|
|
1349
|
+
if (typeof e == "function") return e.$$typeof === be ? null : e.displayName || e.name || null;
|
|
1337
1350
|
if (typeof e == "string") return e;
|
|
1338
1351
|
switch (e) {
|
|
1339
|
-
case
|
|
1340
|
-
case
|
|
1341
|
-
case
|
|
1342
|
-
case
|
|
1343
|
-
case
|
|
1344
|
-
case
|
|
1352
|
+
case N: return "Fragment";
|
|
1353
|
+
case ae: return "Profiler";
|
|
1354
|
+
case ie: return "StrictMode";
|
|
1355
|
+
case le: return "Suspense";
|
|
1356
|
+
case ue: return "SuspenseList";
|
|
1357
|
+
case pe: return "Activity";
|
|
1345
1358
|
}
|
|
1346
1359
|
if (typeof e == "object") switch (typeof e.tag == "number" && console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), e.$$typeof) {
|
|
1347
|
-
case
|
|
1348
|
-
case
|
|
1349
|
-
case
|
|
1350
|
-
case
|
|
1360
|
+
case M: return "Portal";
|
|
1361
|
+
case se: return e.displayName || "Context";
|
|
1362
|
+
case oe: return (e._context.displayName || "Context") + ".Consumer";
|
|
1363
|
+
case ce:
|
|
1351
1364
|
var t = e.render;
|
|
1352
1365
|
return e = e.displayName, e ||= (e = t.displayName || t.name || "", e === "" ? "ForwardRef" : "ForwardRef(" + e + ")"), e;
|
|
1353
|
-
case
|
|
1354
|
-
case
|
|
1366
|
+
case de: return t = e.displayName || null, t === null ? d(e.type) || "Memo" : t;
|
|
1367
|
+
case fe:
|
|
1355
1368
|
t = e._payload, e = e._init;
|
|
1356
1369
|
try {
|
|
1357
1370
|
return d(e(t));
|
|
@@ -1360,8 +1373,8 @@ var qt = /* @__PURE__ */ t(((e) => {
|
|
|
1360
1373
|
return null;
|
|
1361
1374
|
}
|
|
1362
1375
|
function f(e) {
|
|
1363
|
-
if (e ===
|
|
1364
|
-
if (typeof e == "object" && e && e.$$typeof ===
|
|
1376
|
+
if (e === N) return "<>";
|
|
1377
|
+
if (typeof e == "object" && e && e.$$typeof === fe) return "<...>";
|
|
1365
1378
|
try {
|
|
1366
1379
|
var t = d(e);
|
|
1367
1380
|
return t ? "<" + t + ">" : "<...>";
|
|
@@ -1370,14 +1383,14 @@ var qt = /* @__PURE__ */ t(((e) => {
|
|
|
1370
1383
|
}
|
|
1371
1384
|
}
|
|
1372
1385
|
function p() {
|
|
1373
|
-
var e =
|
|
1386
|
+
var e = F.A;
|
|
1374
1387
|
return e === null ? null : e.getOwner();
|
|
1375
1388
|
}
|
|
1376
1389
|
function m() {
|
|
1377
1390
|
return Error("react-stack-top-frame");
|
|
1378
1391
|
}
|
|
1379
1392
|
function h(e) {
|
|
1380
|
-
if (
|
|
1393
|
+
if (xe.call(e, "key")) {
|
|
1381
1394
|
var t = Object.getOwnPropertyDescriptor(e, "key").get;
|
|
1382
1395
|
if (t && t.isReactWarning) return !1;
|
|
1383
1396
|
}
|
|
@@ -1385,7 +1398,7 @@ var qt = /* @__PURE__ */ t(((e) => {
|
|
|
1385
1398
|
}
|
|
1386
1399
|
function ee(e, t) {
|
|
1387
1400
|
function n() {
|
|
1388
|
-
|
|
1401
|
+
Ce || (Ce = !0, console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)", t));
|
|
1389
1402
|
}
|
|
1390
1403
|
n.isReactWarning = !0, Object.defineProperty(e, "key", {
|
|
1391
1404
|
get: n,
|
|
@@ -1394,12 +1407,12 @@ var qt = /* @__PURE__ */ t(((e) => {
|
|
|
1394
1407
|
}
|
|
1395
1408
|
function g() {
|
|
1396
1409
|
var e = d(this.type);
|
|
1397
|
-
return
|
|
1410
|
+
return Te[e] || (Te[e] = !0, console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")), e = this.props.ref, e === void 0 ? null : e;
|
|
1398
1411
|
}
|
|
1399
1412
|
function _(e, t, n, r, i, a) {
|
|
1400
1413
|
var o = n.ref;
|
|
1401
1414
|
return e = {
|
|
1402
|
-
$$typeof:
|
|
1415
|
+
$$typeof: j,
|
|
1403
1416
|
type: e,
|
|
1404
1417
|
key: t,
|
|
1405
1418
|
props: n,
|
|
@@ -1436,10 +1449,10 @@ var qt = /* @__PURE__ */ t(((e) => {
|
|
|
1436
1449
|
return t = _(e.type, t, e.props, e._owner, e._debugStack, e._debugTask), e._store && (t._store.validated = e._store.validated), t;
|
|
1437
1450
|
}
|
|
1438
1451
|
function v(e) {
|
|
1439
|
-
y(e) ? e._store && (e._store.validated = 1) : typeof e == "object" && e && e.$$typeof ===
|
|
1452
|
+
y(e) ? e._store && (e._store.validated = 1) : typeof e == "object" && e && e.$$typeof === fe && (e._payload.status === "fulfilled" ? y(e._payload.value) && e._payload.value._store && (e._payload.value._store.validated = 1) : e._store && (e._store.validated = 1));
|
|
1440
1453
|
}
|
|
1441
1454
|
function y(e) {
|
|
1442
|
-
return typeof e == "object" && !!e && e.$$typeof ===
|
|
1455
|
+
return typeof e == "object" && !!e && e.$$typeof === j;
|
|
1443
1456
|
}
|
|
1444
1457
|
function ne(e) {
|
|
1445
1458
|
var t = {
|
|
@@ -1480,22 +1493,22 @@ var qt = /* @__PURE__ */ t(((e) => {
|
|
|
1480
1493
|
s = !0;
|
|
1481
1494
|
break;
|
|
1482
1495
|
case "object": switch (e.$$typeof) {
|
|
1483
|
-
case
|
|
1484
|
-
case
|
|
1496
|
+
case j:
|
|
1497
|
+
case M:
|
|
1485
1498
|
s = !0;
|
|
1486
1499
|
break;
|
|
1487
|
-
case
|
|
1500
|
+
case fe: return s = e._init, S(s(e._payload), t, n, i, a);
|
|
1488
1501
|
}
|
|
1489
1502
|
}
|
|
1490
1503
|
if (s) {
|
|
1491
1504
|
s = e, a = a(s);
|
|
1492
1505
|
var c = i === "" ? "." + b(s, 0) : i;
|
|
1493
|
-
return
|
|
1506
|
+
return ye(a) ? (n = "", c != null && (n = c.replace(ke, "$&/") + "/"), S(a, t, n, "", function(e) {
|
|
1494
1507
|
return e;
|
|
1495
|
-
})) : a != null && (y(a) && (a.key != null && (s && s.key === a.key || u(a.key)), n = te(a, n + (a.key == null || s && s.key === a.key ? "" : ("" + a.key).replace(
|
|
1508
|
+
})) : a != null && (y(a) && (a.key != null && (s && s.key === a.key || u(a.key)), n = te(a, n + (a.key == null || s && s.key === a.key ? "" : ("" + a.key).replace(ke, "$&/") + "/") + c), i !== "" && s != null && y(s) && s.key == null && s._store && !s._store.validated && (n._store.validated = 2), a = n), t.push(a)), 1;
|
|
1496
1509
|
}
|
|
1497
|
-
if (s = 0, c = i === "" ? "." : i + ":",
|
|
1498
|
-
else if (l = r(e), typeof l == "function") for (l === e.entries && (
|
|
1510
|
+
if (s = 0, c = i === "" ? "." : i + ":", ye(e)) for (var l = 0; l < e.length; l++) i = e[l], o = c + b(i, l), s += S(i, t, n, o, a);
|
|
1511
|
+
else if (l = r(e), typeof l == "function") for (l === e.entries && (Oe || console.warn("Using Maps as children is not supported. Use an array of keyed ReactElements instead."), Oe = !0), e = l.call(e), l = 0; !(i = e.next()).done;) i = i.value, o = c + b(i, l++), s += S(i, t, n, o, a);
|
|
1499
1512
|
else if (o === "object") {
|
|
1500
1513
|
if (typeof e.then == "function") return S(x(e), t, n, i, a);
|
|
1501
1514
|
throw t = String(e), Error("Objects are not valid as a React child (found: " + (t === "[object Object]" ? "object with keys {" + Object.keys(e).join(", ") + "}" : t) + "). If you meant to render a collection of children, use an array instead.");
|
|
@@ -1537,56 +1550,56 @@ var qt = /* @__PURE__ */ t(((e) => {
|
|
|
1537
1550
|
throw e._result;
|
|
1538
1551
|
}
|
|
1539
1552
|
function w() {
|
|
1540
|
-
var e =
|
|
1553
|
+
var e = F.H;
|
|
1541
1554
|
return e === null && console.error("Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem."), e;
|
|
1542
1555
|
}
|
|
1543
1556
|
function T() {
|
|
1544
|
-
|
|
1557
|
+
F.asyncTransitions--;
|
|
1545
1558
|
}
|
|
1546
1559
|
function E(e) {
|
|
1547
|
-
if (
|
|
1560
|
+
if (Me === null) try {
|
|
1548
1561
|
var n = ("require" + Math.random()).slice(0, 7);
|
|
1549
|
-
|
|
1562
|
+
Me = (t && t[n]).call(t, "timers").setImmediate;
|
|
1550
1563
|
} catch {
|
|
1551
|
-
|
|
1552
|
-
!1 ===
|
|
1564
|
+
Me = function(e) {
|
|
1565
|
+
!1 === je && (je = !0, typeof MessageChannel > "u" && console.error("This browser does not have a MessageChannel implementation, so enqueuing tasks via await act(async () => ...) will fail. Please file an issue at https://github.com/facebook/react/issues if you encounter this warning."));
|
|
1553
1566
|
var t = new MessageChannel();
|
|
1554
1567
|
t.port1.onmessage = e, t.port2.postMessage(void 0);
|
|
1555
1568
|
};
|
|
1556
1569
|
}
|
|
1557
|
-
return
|
|
1570
|
+
return Me(e);
|
|
1558
1571
|
}
|
|
1559
1572
|
function D(e) {
|
|
1560
1573
|
return 1 < e.length && typeof AggregateError == "function" ? AggregateError(e) : e[0];
|
|
1561
1574
|
}
|
|
1562
1575
|
function O(e, t) {
|
|
1563
|
-
t !==
|
|
1576
|
+
t !== Ne - 1 && console.error("You seem to have overlapping act() calls, this is not supported. Be sure to await previous act() calls before making a new one. "), Ne = t;
|
|
1564
1577
|
}
|
|
1565
1578
|
function k(e, t, n) {
|
|
1566
|
-
var r =
|
|
1579
|
+
var r = F.actQueue;
|
|
1567
1580
|
if (r !== null) if (r.length !== 0) try {
|
|
1568
1581
|
A(r), E(function() {
|
|
1569
1582
|
return k(e, t, n);
|
|
1570
1583
|
});
|
|
1571
1584
|
return;
|
|
1572
1585
|
} catch (e) {
|
|
1573
|
-
|
|
1586
|
+
F.thrownErrors.push(e);
|
|
1574
1587
|
}
|
|
1575
|
-
else
|
|
1576
|
-
0 <
|
|
1588
|
+
else F.actQueue = null;
|
|
1589
|
+
0 < F.thrownErrors.length ? (r = D(F.thrownErrors), F.thrownErrors.length = 0, n(r)) : t(e);
|
|
1577
1590
|
}
|
|
1578
1591
|
function A(e) {
|
|
1579
|
-
if (!
|
|
1580
|
-
|
|
1592
|
+
if (!Fe) {
|
|
1593
|
+
Fe = !0;
|
|
1581
1594
|
var t = 0;
|
|
1582
1595
|
try {
|
|
1583
1596
|
for (; t < e.length; t++) {
|
|
1584
1597
|
var n = e[t];
|
|
1585
1598
|
do {
|
|
1586
|
-
|
|
1599
|
+
F.didUsePromise = !1;
|
|
1587
1600
|
var r = n(!1);
|
|
1588
1601
|
if (r !== null) {
|
|
1589
|
-
if (
|
|
1602
|
+
if (F.didUsePromise) {
|
|
1590
1603
|
e[t] = n, e.splice(0, t);
|
|
1591
1604
|
return;
|
|
1592
1605
|
}
|
|
@@ -1596,14 +1609,14 @@ var qt = /* @__PURE__ */ t(((e) => {
|
|
|
1596
1609
|
}
|
|
1597
1610
|
e.length = 0;
|
|
1598
1611
|
} catch (n) {
|
|
1599
|
-
e.splice(0, t + 1),
|
|
1612
|
+
e.splice(0, t + 1), F.thrownErrors.push(n);
|
|
1600
1613
|
} finally {
|
|
1601
|
-
|
|
1614
|
+
Fe = !1;
|
|
1602
1615
|
}
|
|
1603
1616
|
}
|
|
1604
1617
|
}
|
|
1605
1618
|
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
|
|
1606
|
-
var
|
|
1619
|
+
var j = Symbol.for("react.transitional.element"), M = Symbol.for("react.portal"), N = Symbol.for("react.fragment"), ie = Symbol.for("react.strict_mode"), ae = Symbol.for("react.profiler"), oe = Symbol.for("react.consumer"), se = Symbol.for("react.context"), ce = Symbol.for("react.forward_ref"), le = Symbol.for("react.suspense"), ue = Symbol.for("react.suspense_list"), de = Symbol.for("react.memo"), fe = Symbol.for("react.lazy"), pe = Symbol.for("react.activity"), me = Symbol.iterator, he = {}, ge = {
|
|
1607
1620
|
isMounted: function() {
|
|
1608
1621
|
return !1;
|
|
1609
1622
|
},
|
|
@@ -1616,20 +1629,20 @@ var qt = /* @__PURE__ */ t(((e) => {
|
|
|
1616
1629
|
enqueueSetState: function(e) {
|
|
1617
1630
|
i(e, "setState");
|
|
1618
1631
|
}
|
|
1619
|
-
},
|
|
1620
|
-
Object.freeze(
|
|
1632
|
+
}, _e = Object.assign, ve = {};
|
|
1633
|
+
Object.freeze(ve), a.prototype.isReactComponent = {}, a.prototype.setState = function(e, t) {
|
|
1621
1634
|
if (typeof e != "object" && typeof e != "function" && e != null) throw Error("takes an object of state variables to update or a function which returns an object of state variables.");
|
|
1622
1635
|
this.updater.enqueueSetState(this, e, t, "setState");
|
|
1623
1636
|
}, a.prototype.forceUpdate = function(e) {
|
|
1624
1637
|
this.updater.enqueueForceUpdate(this, e, "forceUpdate");
|
|
1625
1638
|
};
|
|
1626
|
-
var
|
|
1639
|
+
var P = {
|
|
1627
1640
|
isMounted: ["isMounted", "Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks."],
|
|
1628
1641
|
replaceState: ["replaceState", "Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236)."]
|
|
1629
1642
|
};
|
|
1630
|
-
for (
|
|
1631
|
-
o.prototype = a.prototype,
|
|
1632
|
-
var
|
|
1643
|
+
for (Le in P) P.hasOwnProperty(Le) && n(Le, P[Le]);
|
|
1644
|
+
o.prototype = a.prototype, P = s.prototype = new o(), P.constructor = s, _e(P, a.prototype), P.isPureReactComponent = !0;
|
|
1645
|
+
var ye = Array.isArray, be = Symbol.for("react.client.reference"), F = {
|
|
1633
1646
|
H: null,
|
|
1634
1647
|
A: null,
|
|
1635
1648
|
T: null,
|
|
@@ -1642,13 +1655,13 @@ var qt = /* @__PURE__ */ t(((e) => {
|
|
|
1642
1655
|
thrownErrors: [],
|
|
1643
1656
|
getCurrentStack: null,
|
|
1644
1657
|
recentlyCreatedOwnerStacks: 0
|
|
1645
|
-
},
|
|
1658
|
+
}, xe = Object.prototype.hasOwnProperty, Se = console.createTask ? console.createTask : function() {
|
|
1646
1659
|
return null;
|
|
1647
1660
|
};
|
|
1648
|
-
|
|
1661
|
+
P = { react_stack_bottom_frame: function(e) {
|
|
1649
1662
|
return e();
|
|
1650
1663
|
} };
|
|
1651
|
-
var
|
|
1664
|
+
var Ce, we, Te = {}, Ee = P.react_stack_bottom_frame.bind(P, m)(), De = Se(f(m)), Oe = !1, ke = /\/+/g, Ae = typeof reportError == "function" ? reportError : function(e) {
|
|
1652
1665
|
if (typeof window == "object" && typeof window.ErrorEvent == "function") {
|
|
1653
1666
|
var t = new window.ErrorEvent("error", {
|
|
1654
1667
|
bubbles: !0,
|
|
@@ -1662,18 +1675,18 @@ var qt = /* @__PURE__ */ t(((e) => {
|
|
|
1662
1675
|
return;
|
|
1663
1676
|
}
|
|
1664
1677
|
console.error(e);
|
|
1665
|
-
},
|
|
1678
|
+
}, je = !1, Me = null, Ne = 0, Pe = !1, Fe = !1, Ie = typeof queueMicrotask == "function" ? function(e) {
|
|
1666
1679
|
queueMicrotask(function() {
|
|
1667
1680
|
return queueMicrotask(e);
|
|
1668
1681
|
});
|
|
1669
1682
|
} : E;
|
|
1670
|
-
|
|
1683
|
+
P = Object.freeze({
|
|
1671
1684
|
__proto__: null,
|
|
1672
1685
|
c: function(e) {
|
|
1673
1686
|
return w().useMemoCache(e);
|
|
1674
1687
|
}
|
|
1675
1688
|
});
|
|
1676
|
-
var
|
|
1689
|
+
var Le = {
|
|
1677
1690
|
map: C,
|
|
1678
1691
|
forEach: function(e, t, n) {
|
|
1679
1692
|
C(e, function() {
|
|
@@ -1696,20 +1709,20 @@ var qt = /* @__PURE__ */ t(((e) => {
|
|
|
1696
1709
|
return e;
|
|
1697
1710
|
}
|
|
1698
1711
|
};
|
|
1699
|
-
e.Activity =
|
|
1700
|
-
var t =
|
|
1701
|
-
|
|
1702
|
-
var r =
|
|
1712
|
+
e.Activity = pe, e.Children = Le, e.Component = a, e.Fragment = N, e.Profiler = ae, e.PureComponent = s, e.StrictMode = ie, e.Suspense = le, e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE = F, e.__COMPILER_RUNTIME = P, e.act = function(e) {
|
|
1713
|
+
var t = F.actQueue, n = Ne;
|
|
1714
|
+
Ne++;
|
|
1715
|
+
var r = F.actQueue = t === null ? [] : t, i = !1;
|
|
1703
1716
|
try {
|
|
1704
1717
|
var a = e();
|
|
1705
1718
|
} catch (e) {
|
|
1706
|
-
|
|
1719
|
+
F.thrownErrors.push(e);
|
|
1707
1720
|
}
|
|
1708
|
-
if (0 <
|
|
1721
|
+
if (0 < F.thrownErrors.length) throw O(t, n), e = D(F.thrownErrors), F.thrownErrors.length = 0, e;
|
|
1709
1722
|
if (typeof a == "object" && a && typeof a.then == "function") {
|
|
1710
1723
|
var o = a;
|
|
1711
|
-
return
|
|
1712
|
-
i ||
|
|
1724
|
+
return Ie(function() {
|
|
1725
|
+
i || Pe || (Pe = !0, console.error("You called act(async () => ...) without await. This could lead to unexpected testing behaviour, interleaving multiple act calls and mixing their scopes. You should - await act(async () => ...);"));
|
|
1713
1726
|
}), { then: function(e, a) {
|
|
1714
1727
|
i = !0, o.then(function(i) {
|
|
1715
1728
|
if (O(t, n), n === 0) {
|
|
@@ -1718,24 +1731,24 @@ var qt = /* @__PURE__ */ t(((e) => {
|
|
|
1718
1731
|
return k(i, e, a);
|
|
1719
1732
|
});
|
|
1720
1733
|
} catch (e) {
|
|
1721
|
-
|
|
1734
|
+
F.thrownErrors.push(e);
|
|
1722
1735
|
}
|
|
1723
|
-
if (0 <
|
|
1724
|
-
var o = D(
|
|
1725
|
-
|
|
1736
|
+
if (0 < F.thrownErrors.length) {
|
|
1737
|
+
var o = D(F.thrownErrors);
|
|
1738
|
+
F.thrownErrors.length = 0, a(o);
|
|
1726
1739
|
}
|
|
1727
1740
|
} else e(i);
|
|
1728
1741
|
}, function(e) {
|
|
1729
|
-
O(t, n), 0 <
|
|
1742
|
+
O(t, n), 0 < F.thrownErrors.length ? (e = D(F.thrownErrors), F.thrownErrors.length = 0, a(e)) : a(e);
|
|
1730
1743
|
});
|
|
1731
1744
|
} };
|
|
1732
1745
|
}
|
|
1733
1746
|
var s = a;
|
|
1734
|
-
if (O(t, n), n === 0 && (A(r), r.length !== 0 &&
|
|
1735
|
-
i ||
|
|
1736
|
-
}),
|
|
1747
|
+
if (O(t, n), n === 0 && (A(r), r.length !== 0 && Ie(function() {
|
|
1748
|
+
i || Pe || (Pe = !0, console.error("A component suspended inside an `act` scope, but the `act` call was not awaited. When testing React components that depend on asynchronous data, you must await the result:\n\nawait act(() => ...)"));
|
|
1749
|
+
}), F.actQueue = null), 0 < F.thrownErrors.length) throw e = D(F.thrownErrors), F.thrownErrors.length = 0, e;
|
|
1737
1750
|
return { then: function(e, t) {
|
|
1738
|
-
i = !0, n === 0 ? (
|
|
1751
|
+
i = !0, n === 0 ? (F.actQueue = r, E(function() {
|
|
1739
1752
|
return k(s, e, t);
|
|
1740
1753
|
})) : e(s);
|
|
1741
1754
|
} };
|
|
@@ -1746,21 +1759,21 @@ var qt = /* @__PURE__ */ t(((e) => {
|
|
|
1746
1759
|
}, e.cacheSignal = function() {
|
|
1747
1760
|
return null;
|
|
1748
1761
|
}, e.captureOwnerStack = function() {
|
|
1749
|
-
var e =
|
|
1762
|
+
var e = F.getCurrentStack;
|
|
1750
1763
|
return e === null ? null : e();
|
|
1751
1764
|
}, e.cloneElement = function(e, t, n) {
|
|
1752
1765
|
if (e == null) throw Error("The argument must be a React element, but you passed " + e + ".");
|
|
1753
|
-
var r =
|
|
1766
|
+
var r = _e({}, e.props), i = e.key, a = e._owner;
|
|
1754
1767
|
if (t != null) {
|
|
1755
1768
|
var o;
|
|
1756
1769
|
a: {
|
|
1757
|
-
if (
|
|
1770
|
+
if (xe.call(t, "ref") && (o = Object.getOwnPropertyDescriptor(t, "ref").get) && o.isReactWarning) {
|
|
1758
1771
|
o = !1;
|
|
1759
1772
|
break a;
|
|
1760
1773
|
}
|
|
1761
1774
|
o = t.ref !== void 0;
|
|
1762
1775
|
}
|
|
1763
|
-
for (s in o && (a = p()), h(t) && (u(t.key), i = "" + t.key), t) !
|
|
1776
|
+
for (s in o && (a = p()), h(t) && (u(t.key), i = "" + t.key), t) !xe.call(t, s) || s === "key" || s === "__self" || s === "__source" || s === "ref" && t.ref === void 0 || (r[s] = t[s]);
|
|
1764
1777
|
}
|
|
1765
1778
|
var s = arguments.length - 2;
|
|
1766
1779
|
if (s === 1) r.children = n;
|
|
@@ -1773,21 +1786,21 @@ var qt = /* @__PURE__ */ t(((e) => {
|
|
|
1773
1786
|
return r;
|
|
1774
1787
|
}, e.createContext = function(e) {
|
|
1775
1788
|
return e = {
|
|
1776
|
-
$$typeof:
|
|
1789
|
+
$$typeof: se,
|
|
1777
1790
|
_currentValue: e,
|
|
1778
1791
|
_currentValue2: e,
|
|
1779
1792
|
_threadCount: 0,
|
|
1780
1793
|
Provider: null,
|
|
1781
1794
|
Consumer: null
|
|
1782
1795
|
}, e.Provider = e, e.Consumer = {
|
|
1783
|
-
$$typeof:
|
|
1796
|
+
$$typeof: oe,
|
|
1784
1797
|
_context: e
|
|
1785
1798
|
}, e._currentRenderer = null, e._currentRenderer2 = null, e;
|
|
1786
1799
|
}, e.createElement = function(e, t, n) {
|
|
1787
1800
|
for (var r = 2; r < arguments.length; r++) v(arguments[r]);
|
|
1788
1801
|
r = {};
|
|
1789
1802
|
var i = null;
|
|
1790
|
-
if (t != null) for (c in
|
|
1803
|
+
if (t != null) for (c in we || !("__self" in t) || "key" in t || (we = !0, console.warn("Your app (or one of its dependencies) is using an outdated JSX transform. Update to the modern JSX transform for faster performance: https://react.dev/link/new-jsx-transform")), h(t) && (u(t.key), i = "" + t.key), t) xe.call(t, c) && c !== "key" && c !== "__self" && c !== "__source" && (r[c] = t[c]);
|
|
1791
1804
|
var a = arguments.length - 2;
|
|
1792
1805
|
if (a === 1) r.children = n;
|
|
1793
1806
|
else if (1 < a) {
|
|
@@ -1796,15 +1809,15 @@ var qt = /* @__PURE__ */ t(((e) => {
|
|
|
1796
1809
|
}
|
|
1797
1810
|
if (e && e.defaultProps) for (c in a = e.defaultProps, a) r[c] === void 0 && (r[c] = a[c]);
|
|
1798
1811
|
i && ee(r, typeof e == "function" ? e.displayName || e.name || "Unknown" : e);
|
|
1799
|
-
var c = 1e4 >
|
|
1800
|
-
return _(e, i, r, p(), c ? Error("react-stack-top-frame") :
|
|
1812
|
+
var c = 1e4 > F.recentlyCreatedOwnerStacks++;
|
|
1813
|
+
return _(e, i, r, p(), c ? Error("react-stack-top-frame") : Ee, c ? Se(f(e)) : De);
|
|
1801
1814
|
}, e.createRef = function() {
|
|
1802
1815
|
var e = { current: null };
|
|
1803
1816
|
return Object.seal(e), e;
|
|
1804
1817
|
}, e.forwardRef = function(e) {
|
|
1805
|
-
e != null && e.$$typeof ===
|
|
1818
|
+
e != null && e.$$typeof === de ? console.error("forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...)).") : typeof e == "function" ? e.length !== 0 && e.length !== 2 && console.error("forwardRef render functions accept exactly two parameters: props and ref. %s", e.length === 1 ? "Did you forget to use the ref parameter?" : "Any additional parameter will be undefined.") : console.error("forwardRef requires a render function but was given %s.", e === null ? "null" : typeof e), e != null && e.defaultProps != null && console.error("forwardRef render functions do not support defaultProps. Did you accidentally pass a React component?");
|
|
1806
1819
|
var t = {
|
|
1807
|
-
$$typeof:
|
|
1820
|
+
$$typeof: ce,
|
|
1808
1821
|
render: e
|
|
1809
1822
|
}, n;
|
|
1810
1823
|
return Object.defineProperty(t, "displayName", {
|
|
@@ -1823,7 +1836,7 @@ var qt = /* @__PURE__ */ t(((e) => {
|
|
|
1823
1836
|
_result: e
|
|
1824
1837
|
};
|
|
1825
1838
|
var t = {
|
|
1826
|
-
$$typeof:
|
|
1839
|
+
$$typeof: fe,
|
|
1827
1840
|
_payload: e,
|
|
1828
1841
|
_init: re
|
|
1829
1842
|
}, n = {
|
|
@@ -1838,7 +1851,7 @@ var qt = /* @__PURE__ */ t(((e) => {
|
|
|
1838
1851
|
return e._ioInfo = n, t._debugInfo = [{ awaited: n }], t;
|
|
1839
1852
|
}, e.memo = function(e, t) {
|
|
1840
1853
|
e ?? console.error("memo: The first argument must be a component. Instead received: %s", e === null ? "null" : typeof e), t = {
|
|
1841
|
-
$$typeof:
|
|
1854
|
+
$$typeof: de,
|
|
1842
1855
|
type: e,
|
|
1843
1856
|
compare: t === void 0 ? null : t
|
|
1844
1857
|
};
|
|
@@ -1854,15 +1867,15 @@ var qt = /* @__PURE__ */ t(((e) => {
|
|
|
1854
1867
|
}
|
|
1855
1868
|
}), t;
|
|
1856
1869
|
}, e.startTransition = function(e) {
|
|
1857
|
-
var t =
|
|
1858
|
-
n._updatedFibers = /* @__PURE__ */ new Set(),
|
|
1870
|
+
var t = F.T, n = {};
|
|
1871
|
+
n._updatedFibers = /* @__PURE__ */ new Set(), F.T = n;
|
|
1859
1872
|
try {
|
|
1860
|
-
var r = e(), i =
|
|
1861
|
-
i !== null && i(n, r), typeof r == "object" && r && typeof r.then == "function" && (
|
|
1873
|
+
var r = e(), i = F.S;
|
|
1874
|
+
i !== null && i(n, r), typeof r == "object" && r && typeof r.then == "function" && (F.asyncTransitions++, r.then(T, T), r.then(c, Ae));
|
|
1862
1875
|
} catch (e) {
|
|
1863
|
-
|
|
1876
|
+
Ae(e);
|
|
1864
1877
|
} finally {
|
|
1865
|
-
t === null && n._updatedFibers && (e = n._updatedFibers.size, n._updatedFibers.clear(), 10 < e && console.warn("Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table.")), t !== null && n.types !== null && (t.types !== null && t.types !== n.types && console.error("We expected inner Transitions to have transferred the outer types set and that you cannot add to the outer Transition while inside the inner.This is a bug in React."), t.types = n.types),
|
|
1878
|
+
t === null && n._updatedFibers && (e = n._updatedFibers.size, n._updatedFibers.clear(), 10 < e && console.warn("Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table.")), t !== null && n.types !== null && (t.types !== null && t.types !== n.types && console.error("We expected inner Transitions to have transferred the outer types set and that you cannot add to the outer Transition while inside the inner.This is a bug in React."), t.types = n.types), F.T = t;
|
|
1866
1879
|
}
|
|
1867
1880
|
}, e.unstable_useCacheRefresh = function() {
|
|
1868
1881
|
return w().useCacheRefresh();
|
|
@@ -1874,7 +1887,7 @@ var qt = /* @__PURE__ */ t(((e) => {
|
|
|
1874
1887
|
return w().useCallback(e, t);
|
|
1875
1888
|
}, e.useContext = function(e) {
|
|
1876
1889
|
var t = w();
|
|
1877
|
-
return e.$$typeof ===
|
|
1890
|
+
return e.$$typeof === oe && console.error("Calling useContext(Context.Consumer) is not supported and will cause bugs. Did you mean to call useContext(Context) instead?"), t.useContext(e);
|
|
1878
1891
|
}, e.useDebugValue = function(e, t) {
|
|
1879
1892
|
return w().useDebugValue(e, t);
|
|
1880
1893
|
}, e.useDeferredValue = function(e, t) {
|
|
@@ -2040,7 +2053,7 @@ var qt = /* @__PURE__ */ t(((e) => {
|
|
|
2040
2053
|
var m = Object.keys(n).filter(function(e) {
|
|
2041
2054
|
return e !== "key";
|
|
2042
2055
|
});
|
|
2043
|
-
o = 0 < m.length ? "{key: someKey, " + m.join(": ..., ") + ": ...}" : "{key: someKey}",
|
|
2056
|
+
o = 0 < m.length ? "{key: someKey, " + m.join(": ..., ") + ": ...}" : "{key: someKey}", N[p + o] || (m = 0 < m.length ? "{" + m.join(": ..., ") + ": ...}" : "{}", console.error("A props object containing a \"key\" prop is being spread into JSX:\n let props = %s;\n <%s {...props} />\nReact keys must be passed directly to JSX without using spread:\n let props = %s;\n <%s key={someKey} {...props} />", o, p, m, p), N[p + o] = !0);
|
|
2044
2057
|
}
|
|
2045
2058
|
if (p = null, i !== void 0 && (r(i), p = "" + i), s(n) && (r(n.key), p = "" + n.key), "key" in n) for (var h in i = {}, n) h !== "key" && (i[h] = n[h]);
|
|
2046
2059
|
else i = n;
|
|
@@ -2058,13 +2071,13 @@ var qt = /* @__PURE__ */ t(((e) => {
|
|
|
2058
2071
|
m = { react_stack_bottom_frame: function(e) {
|
|
2059
2072
|
return e();
|
|
2060
2073
|
} };
|
|
2061
|
-
var k, A = {},
|
|
2074
|
+
var k, A = {}, j = m.react_stack_bottom_frame.bind(m, o)(), M = O(i(o)), N = {};
|
|
2062
2075
|
e.Fragment = g, e.jsx = function(e, t, n) {
|
|
2063
2076
|
var r = 1e4 > T.recentlyCreatedOwnerStacks++;
|
|
2064
|
-
return d(e, t, n, !1, r ? Error("react-stack-top-frame") :
|
|
2077
|
+
return d(e, t, n, !1, r ? Error("react-stack-top-frame") : j, r ? O(i(e)) : M);
|
|
2065
2078
|
}, e.jsxs = function(e, t, n) {
|
|
2066
2079
|
var r = 1e4 > T.recentlyCreatedOwnerStacks++;
|
|
2067
|
-
return d(e, t, n, !0, r ? Error("react-stack-top-frame") :
|
|
2080
|
+
return d(e, t, n, !0, r ? Error("react-stack-top-frame") : j, r ? O(i(e)) : M);
|
|
2068
2081
|
};
|
|
2069
2082
|
})();
|
|
2070
2083
|
})), Qt = /* @__PURE__ */ t(((e, t) => {
|
|
@@ -4693,16 +4706,16 @@ var Zs = {
|
|
|
4693
4706
|
colors: Ks,
|
|
4694
4707
|
elevationMap: Hs
|
|
4695
4708
|
}, tc = /* @__PURE__ */ n({
|
|
4696
|
-
PopoverController: () =>
|
|
4697
|
-
calculatePopoverPosition: () =>
|
|
4698
|
-
default: () =>
|
|
4699
|
-
detectCollisionAndAdjust: () =>
|
|
4700
|
-
getPopoverClasses: () =>
|
|
4701
|
-
placements: () =>
|
|
4702
|
-
sizes: () =>
|
|
4703
|
-
triggers: () =>
|
|
4704
|
-
utils: () =>
|
|
4705
|
-
}),
|
|
4709
|
+
PopoverController: () => oc,
|
|
4710
|
+
calculatePopoverPosition: () => rc,
|
|
4711
|
+
default: () => cc,
|
|
4712
|
+
detectCollisionAndAdjust: () => ic,
|
|
4713
|
+
getPopoverClasses: () => ac,
|
|
4714
|
+
placements: () => R,
|
|
4715
|
+
sizes: () => nc,
|
|
4716
|
+
triggers: () => z,
|
|
4717
|
+
utils: () => sc
|
|
4718
|
+
}), R = {
|
|
4706
4719
|
TOP: "top",
|
|
4707
4720
|
BOTTOM: "bottom",
|
|
4708
4721
|
LEFT: "left",
|
|
@@ -4715,17 +4728,17 @@ var Zs = {
|
|
|
4715
4728
|
LEFT_END: "left-end",
|
|
4716
4729
|
RIGHT_START: "right-start",
|
|
4717
4730
|
RIGHT_END: "right-end"
|
|
4718
|
-
},
|
|
4731
|
+
}, z = {
|
|
4719
4732
|
CLICK: "click",
|
|
4720
4733
|
HOVER: "hover",
|
|
4721
4734
|
FOCUS: "focus",
|
|
4722
4735
|
MANUAL: "manual"
|
|
4723
|
-
},
|
|
4736
|
+
}, nc = {
|
|
4724
4737
|
SM: "sm",
|
|
4725
4738
|
MD: "md",
|
|
4726
4739
|
LG: "lg"
|
|
4727
4740
|
};
|
|
4728
|
-
function
|
|
4741
|
+
function rc(e, t, n = R.BOTTOM, r = 8) {
|
|
4729
4742
|
if (!e || !t) return {
|
|
4730
4743
|
top: 0,
|
|
4731
4744
|
left: 0
|
|
@@ -4734,40 +4747,40 @@ function ic(e, t, n = L.BOTTOM, r = 8) {
|
|
|
4734
4747
|
window.innerWidth, window.innerHeight;
|
|
4735
4748
|
let o = 0, s = 0;
|
|
4736
4749
|
switch (n) {
|
|
4737
|
-
case
|
|
4750
|
+
case R.TOP:
|
|
4738
4751
|
o = i.top - a.height - r, s = i.left + (i.width - a.width) / 2;
|
|
4739
4752
|
break;
|
|
4740
|
-
case
|
|
4753
|
+
case R.TOP_START:
|
|
4741
4754
|
o = i.top - a.height - r, s = i.left;
|
|
4742
4755
|
break;
|
|
4743
|
-
case
|
|
4756
|
+
case R.TOP_END:
|
|
4744
4757
|
o = i.top - a.height - r, s = i.right - a.width;
|
|
4745
4758
|
break;
|
|
4746
|
-
case
|
|
4759
|
+
case R.BOTTOM:
|
|
4747
4760
|
o = i.bottom + r, s = i.left + (i.width - a.width) / 2;
|
|
4748
4761
|
break;
|
|
4749
|
-
case
|
|
4762
|
+
case R.BOTTOM_START:
|
|
4750
4763
|
o = i.bottom + r, s = i.left;
|
|
4751
4764
|
break;
|
|
4752
|
-
case
|
|
4765
|
+
case R.BOTTOM_END:
|
|
4753
4766
|
o = i.bottom + r, s = i.right - a.width;
|
|
4754
4767
|
break;
|
|
4755
|
-
case
|
|
4768
|
+
case R.LEFT:
|
|
4756
4769
|
o = i.top + (i.height - a.height) / 2, s = i.left - a.width - r;
|
|
4757
4770
|
break;
|
|
4758
|
-
case
|
|
4771
|
+
case R.LEFT_START:
|
|
4759
4772
|
o = i.top, s = i.left - a.width - r;
|
|
4760
4773
|
break;
|
|
4761
|
-
case
|
|
4774
|
+
case R.LEFT_END:
|
|
4762
4775
|
o = i.bottom - a.height, s = i.left - a.width - r;
|
|
4763
4776
|
break;
|
|
4764
|
-
case
|
|
4777
|
+
case R.RIGHT:
|
|
4765
4778
|
o = i.top + (i.height - a.height) / 2, s = i.right + r;
|
|
4766
4779
|
break;
|
|
4767
|
-
case
|
|
4780
|
+
case R.RIGHT_START:
|
|
4768
4781
|
o = i.top, s = i.right + r;
|
|
4769
4782
|
break;
|
|
4770
|
-
case
|
|
4783
|
+
case R.RIGHT_END:
|
|
4771
4784
|
o = i.bottom - a.height, s = i.right + r;
|
|
4772
4785
|
break;
|
|
4773
4786
|
}
|
|
@@ -4776,7 +4789,7 @@ function ic(e, t, n = L.BOTTOM, r = 8) {
|
|
|
4776
4789
|
left: s
|
|
4777
4790
|
};
|
|
4778
4791
|
}
|
|
4779
|
-
function
|
|
4792
|
+
function ic(e, t, n) {
|
|
4780
4793
|
if (!t) return {
|
|
4781
4794
|
position: e,
|
|
4782
4795
|
finalPlacement: n
|
|
@@ -4793,9 +4806,9 @@ function ac(e, t, n) {
|
|
|
4793
4806
|
finalPlacement: s
|
|
4794
4807
|
};
|
|
4795
4808
|
}
|
|
4796
|
-
function
|
|
4797
|
-
let { size: t =
|
|
4798
|
-
t &&
|
|
4809
|
+
function ac(e = {}) {
|
|
4810
|
+
let { size: t = nc.MD, placement: n = R.BOTTOM, noArrow: r = !1, className: i = "" } = e, a = ["wc-popover-container"], o = ["wc-popover-trigger"], s = ["wc-popover-content"];
|
|
4811
|
+
t && nc[t.toUpperCase()] && s.push(`wc-popover-content--${t}`);
|
|
4799
4812
|
let c = n.split("-")[0];
|
|
4800
4813
|
return s.push(`wc-popover-content--${c}`), r && s.push("wc-popover-content--no-arrow"), i && a.push(i), {
|
|
4801
4814
|
container: a.join(" "),
|
|
@@ -4803,11 +4816,11 @@ function oc(e = {}) {
|
|
|
4803
4816
|
content: s.join(" ")
|
|
4804
4817
|
};
|
|
4805
4818
|
}
|
|
4806
|
-
var
|
|
4819
|
+
var oc = class {
|
|
4807
4820
|
constructor(e = {}) {
|
|
4808
4821
|
this.options = {
|
|
4809
|
-
trigger:
|
|
4810
|
-
placement:
|
|
4822
|
+
trigger: z.CLICK,
|
|
4823
|
+
placement: R.BOTTOM,
|
|
4811
4824
|
offset: 8,
|
|
4812
4825
|
delay: 0,
|
|
4813
4826
|
hideDelay: 0,
|
|
@@ -4823,7 +4836,7 @@ var sc = class {
|
|
|
4823
4836
|
bindEvents() {
|
|
4824
4837
|
if (!this.triggerElement) return;
|
|
4825
4838
|
let { trigger: e } = this.options;
|
|
4826
|
-
(e ===
|
|
4839
|
+
(e === z.CLICK || e === z.MANUAL) && this.addEventListener(this.triggerElement, "click", this.handleTriggerClick), e === z.HOVER && (this.addEventListener(this.triggerElement, "mouseenter", this.handleTriggerMouseEnter), this.addEventListener(this.triggerElement, "mouseleave", this.handleTriggerMouseLeave)), e === z.FOCUS && (this.addEventListener(this.triggerElement, "focus", this.handleTriggerFocus), this.addEventListener(this.triggerElement, "blur", this.handleTriggerBlur)), this.options.closeOnOutsideClick && this.addEventListener(document, "mousedown", this.handleOutsideClick), this.options.closeOnEscape && this.addEventListener(document, "keydown", this.handleEscapeKey), this.addEventListener(window, "resize", this.handleResize), this.addEventListener(window, "scroll", this.handleScroll, !0);
|
|
4827
4840
|
}
|
|
4828
4841
|
addEventListener(e, t, n, r = !1) {
|
|
4829
4842
|
e.addEventListener(t, n, r), this.eventCleanups.push(() => {
|
|
@@ -4857,7 +4870,7 @@ var sc = class {
|
|
|
4857
4870
|
}
|
|
4858
4871
|
updatePosition() {
|
|
4859
4872
|
if (!this.triggerElement || !this.popoverElement || !this.isOpen) return;
|
|
4860
|
-
let { placement: e, offset: t } = this.options, { position: n, finalPlacement: r } =
|
|
4873
|
+
let { placement: e, offset: t } = this.options, { position: n, finalPlacement: r } = ic(rc(this.triggerElement, this.popoverElement, e, t), this.popoverElement, e);
|
|
4861
4874
|
this.popoverElement.style.top = `${n.top}px`, this.popoverElement.style.left = `${n.left}px`, this.updateArrowDirection(r);
|
|
4862
4875
|
}
|
|
4863
4876
|
updateArrowDirection(e) {
|
|
@@ -4898,22 +4911,22 @@ var sc = class {
|
|
|
4898
4911
|
destroy() {
|
|
4899
4912
|
this.close(), this.clearTimeouts(), this.eventCleanups.forEach((e) => e()), this.eventCleanups = [], this.triggerElement = null, this.popoverElement = null, this.options.onOpen = null, this.options.onClose = null;
|
|
4900
4913
|
}
|
|
4901
|
-
},
|
|
4914
|
+
}, sc = {
|
|
4902
4915
|
createController(e = {}) {
|
|
4903
|
-
return new
|
|
4916
|
+
return new oc(e);
|
|
4904
4917
|
},
|
|
4905
4918
|
isPopoverSupported() {
|
|
4906
4919
|
return typeof HTMLElement.prototype.showPopover == "function";
|
|
4907
4920
|
},
|
|
4908
4921
|
getBestPlacement(e, t, n = [
|
|
4909
|
-
|
|
4910
|
-
|
|
4911
|
-
|
|
4912
|
-
|
|
4922
|
+
R.BOTTOM,
|
|
4923
|
+
R.TOP,
|
|
4924
|
+
R.RIGHT,
|
|
4925
|
+
R.LEFT
|
|
4913
4926
|
]) {
|
|
4914
4927
|
if (!e || !t) return n[0];
|
|
4915
4928
|
for (let r of n) {
|
|
4916
|
-
let { finalPlacement: n } =
|
|
4929
|
+
let { finalPlacement: n } = ic(rc(e, t, r), t, r);
|
|
4917
4930
|
if (n === r) return r;
|
|
4918
4931
|
}
|
|
4919
4932
|
return n[0];
|
|
@@ -4921,41 +4934,41 @@ var sc = class {
|
|
|
4921
4934
|
debug(e, t) {
|
|
4922
4935
|
process.env.NODE_ENV === "development" && console.log(`[Popover] ${e}`, t);
|
|
4923
4936
|
}
|
|
4924
|
-
},
|
|
4925
|
-
PopoverController:
|
|
4926
|
-
calculatePopoverPosition:
|
|
4927
|
-
detectCollisionAndAdjust:
|
|
4928
|
-
getPopoverClasses:
|
|
4929
|
-
utils:
|
|
4930
|
-
placements:
|
|
4931
|
-
triggers:
|
|
4932
|
-
sizes:
|
|
4933
|
-
},
|
|
4934
|
-
BILLING_PERIODS: () =>
|
|
4935
|
-
BUTTON_VARIANTS: () =>
|
|
4936
|
-
CURRENCY_SYMBOLS: () =>
|
|
4937
|
-
PRICING_SIZES: () =>
|
|
4938
|
-
PRICING_VARIANTS: () =>
|
|
4939
|
-
calculateDiscountPrice: () =>
|
|
4940
|
-
comparePlans: () =>
|
|
4941
|
-
debounce: () =>
|
|
4942
|
-
debugPlans: () =>
|
|
4943
|
-
default: () =>
|
|
4944
|
-
filterPlans: () =>
|
|
4945
|
-
findCheapestPlan: () =>
|
|
4946
|
-
findMostExpensivePlan: () =>
|
|
4947
|
-
findPopularPlan: () =>
|
|
4948
|
-
formatPeriod: () =>
|
|
4949
|
-
formatPrice: () =>
|
|
4950
|
-
getAccessibilityProps: () =>
|
|
4951
|
-
getPlanButtonClasses: () =>
|
|
4952
|
-
getPlanCardClasses: () =>
|
|
4953
|
-
getPricingGridClasses: () =>
|
|
4954
|
-
sortPlans: () =>
|
|
4955
|
-
throttle: () =>
|
|
4956
|
-
validatePlan: () =>
|
|
4957
|
-
validatePlans: () =>
|
|
4958
|
-
}),
|
|
4937
|
+
}, cc = {
|
|
4938
|
+
PopoverController: oc,
|
|
4939
|
+
calculatePopoverPosition: rc,
|
|
4940
|
+
detectCollisionAndAdjust: ic,
|
|
4941
|
+
getPopoverClasses: ac,
|
|
4942
|
+
utils: sc,
|
|
4943
|
+
placements: R,
|
|
4944
|
+
triggers: z,
|
|
4945
|
+
sizes: nc
|
|
4946
|
+
}, lc = /* @__PURE__ */ n({
|
|
4947
|
+
BILLING_PERIODS: () => V,
|
|
4948
|
+
BUTTON_VARIANTS: () => dc,
|
|
4949
|
+
CURRENCY_SYMBOLS: () => fc,
|
|
4950
|
+
PRICING_SIZES: () => B,
|
|
4951
|
+
PRICING_VARIANTS: () => uc,
|
|
4952
|
+
calculateDiscountPrice: () => hc,
|
|
4953
|
+
comparePlans: () => xc,
|
|
4954
|
+
debounce: () => Oc,
|
|
4955
|
+
debugPlans: () => Ac,
|
|
4956
|
+
default: () => jc,
|
|
4957
|
+
filterPlans: () => Ec,
|
|
4958
|
+
findCheapestPlan: () => Cc,
|
|
4959
|
+
findMostExpensivePlan: () => wc,
|
|
4960
|
+
findPopularPlan: () => Sc,
|
|
4961
|
+
formatPeriod: () => mc,
|
|
4962
|
+
formatPrice: () => pc,
|
|
4963
|
+
getAccessibilityProps: () => Dc,
|
|
4964
|
+
getPlanButtonClasses: () => bc,
|
|
4965
|
+
getPlanCardClasses: () => yc,
|
|
4966
|
+
getPricingGridClasses: () => vc,
|
|
4967
|
+
sortPlans: () => Tc,
|
|
4968
|
+
throttle: () => kc,
|
|
4969
|
+
validatePlan: () => gc,
|
|
4970
|
+
validatePlans: () => _c
|
|
4971
|
+
}), uc = {
|
|
4959
4972
|
STANDARD: "standard",
|
|
4960
4973
|
OUTLINED: "outlined",
|
|
4961
4974
|
FILLED: "filled",
|
|
@@ -4963,31 +4976,31 @@ var sc = class {
|
|
|
4963
4976
|
ELEVATED: "elevated",
|
|
4964
4977
|
GRADIENT: "gradient",
|
|
4965
4978
|
ANIMATED: "animated"
|
|
4966
|
-
},
|
|
4979
|
+
}, B = {
|
|
4967
4980
|
SM: "sm",
|
|
4968
4981
|
MD: "md",
|
|
4969
4982
|
LG: "lg",
|
|
4970
4983
|
XL: "xl"
|
|
4971
|
-
},
|
|
4984
|
+
}, dc = {
|
|
4972
4985
|
PRIMARY: "primary",
|
|
4973
4986
|
OUTLINED: "outlined",
|
|
4974
4987
|
GHOST: "ghost",
|
|
4975
4988
|
SECONDARY: "secondary"
|
|
4976
|
-
},
|
|
4989
|
+
}, fc = {
|
|
4977
4990
|
USD: "$",
|
|
4978
4991
|
EUR: "€",
|
|
4979
4992
|
GBP: "£",
|
|
4980
4993
|
JPY: "¥",
|
|
4981
4994
|
CNY: "¥",
|
|
4982
4995
|
KRW: "₩"
|
|
4983
|
-
},
|
|
4996
|
+
}, V = {
|
|
4984
4997
|
MONTHLY: "monthly",
|
|
4985
4998
|
YEARLY: "yearly",
|
|
4986
4999
|
WEEKLY: "weekly",
|
|
4987
5000
|
DAILY: "daily",
|
|
4988
5001
|
LIFETIME: "lifetime"
|
|
4989
5002
|
};
|
|
4990
|
-
function
|
|
5003
|
+
function pc(e, t = {}) {
|
|
4991
5004
|
let { currency: n = "USD", locale: r = "en-US", showCurrency: i = !0, showDecimals: a = !0, customSymbol: o = null } = t;
|
|
4992
5005
|
if (e == null || e === "" || e === 0) return "免费";
|
|
4993
5006
|
let s = typeof e == "string" ? parseFloat(e) : e;
|
|
@@ -5002,31 +5015,31 @@ function mc(e, t = {}) {
|
|
|
5002
5015
|
maximumFractionDigits: a ? 2 : 0
|
|
5003
5016
|
}).format(s);
|
|
5004
5017
|
} catch {
|
|
5005
|
-
return `${
|
|
5018
|
+
return `${fc[n] || "$"}${a ? s.toFixed(2) : Math.round(s)}`;
|
|
5006
5019
|
}
|
|
5007
5020
|
}
|
|
5008
|
-
function
|
|
5021
|
+
function mc(e, t = "zh-CN") {
|
|
5009
5022
|
return {
|
|
5010
5023
|
"zh-CN": {
|
|
5011
|
-
[
|
|
5012
|
-
[
|
|
5013
|
-
[
|
|
5014
|
-
[
|
|
5015
|
-
[
|
|
5024
|
+
[V.MONTHLY]: "/月",
|
|
5025
|
+
[V.YEARLY]: "/年",
|
|
5026
|
+
[V.WEEKLY]: "/周",
|
|
5027
|
+
[V.DAILY]: "/天",
|
|
5028
|
+
[V.LIFETIME]: "终身"
|
|
5016
5029
|
},
|
|
5017
5030
|
"en-US": {
|
|
5018
|
-
[
|
|
5019
|
-
[
|
|
5020
|
-
[
|
|
5021
|
-
[
|
|
5022
|
-
[
|
|
5031
|
+
[V.MONTHLY]: "/month",
|
|
5032
|
+
[V.YEARLY]: "/year",
|
|
5033
|
+
[V.WEEKLY]: "/week",
|
|
5034
|
+
[V.DAILY]: "/day",
|
|
5035
|
+
[V.LIFETIME]: "lifetime"
|
|
5023
5036
|
}
|
|
5024
5037
|
}[t]?.[e] || e;
|
|
5025
5038
|
}
|
|
5026
|
-
function
|
|
5039
|
+
function hc(e, t) {
|
|
5027
5040
|
return typeof e != "number" || typeof t != "number" ? e : e * (1 - (t > 1 ? t / 100 : t));
|
|
5028
5041
|
}
|
|
5029
|
-
function
|
|
5042
|
+
function gc(e) {
|
|
5030
5043
|
let t = [], n = [];
|
|
5031
5044
|
return e ? ((!e.name || typeof e.name != "string") && t.push("计划名称是必需的且必须是字符串"), (e.price === void 0 || e.price === null) && t.push("价格是必需的"), e.price !== 0 && !e.price && e.price !== "免费" && n.push("价格值可能无效"), e.features && !Array.isArray(e.features) && t.push("功能列表必须是数组"), e.features && e.features.length === 0 && n.push("功能列表为空"), e.button && typeof e.button != "string" && t.push("按钮文本必须是字符串"), {
|
|
5032
5045
|
isValid: t.length === 0,
|
|
@@ -5038,7 +5051,7 @@ function _c(e) {
|
|
|
5038
5051
|
warnings: n
|
|
5039
5052
|
});
|
|
5040
5053
|
}
|
|
5041
|
-
function
|
|
5054
|
+
function _c(e) {
|
|
5042
5055
|
if (!Array.isArray(e)) return {
|
|
5043
5056
|
isValid: !1,
|
|
5044
5057
|
errors: ["计划列表必须是数组"],
|
|
@@ -5051,7 +5064,7 @@ function vc(e) {
|
|
|
5051
5064
|
};
|
|
5052
5065
|
let t = [], n = [];
|
|
5053
5066
|
return e.forEach((e, r) => {
|
|
5054
|
-
let i =
|
|
5067
|
+
let i = gc(e);
|
|
5055
5068
|
i.errors.forEach((e) => {
|
|
5056
5069
|
t.push(`计划 ${r + 1}: ${e}`);
|
|
5057
5070
|
}), i.warnings.forEach((e) => {
|
|
@@ -5063,19 +5076,19 @@ function vc(e) {
|
|
|
5063
5076
|
warnings: n
|
|
5064
5077
|
};
|
|
5065
5078
|
}
|
|
5079
|
+
function vc(e = {}) {
|
|
5080
|
+
let { columns: t = 3, size: n = B.MD, className: r = "" } = e, i = ["pricing-grid"];
|
|
5081
|
+
return t >= 1 && t <= 4 && i.push(`pricing-grid--${t}-col`), n !== B.MD && i.push(`pricing-grid--${n}`), r && i.push(r), i.join(" ");
|
|
5082
|
+
}
|
|
5066
5083
|
function yc(e = {}) {
|
|
5067
|
-
let {
|
|
5068
|
-
return t
|
|
5084
|
+
let { popular: t = !1, variant: n = uc.STANDARD, size: r = B.MD, className: i = "" } = e, a = ["plan-card"];
|
|
5085
|
+
return t && a.push("plan-card--popular"), n !== uc.STANDARD && a.push(`plan-card--${n}`), r !== B.MD && a.push(`plan-card--${r}`), i && a.push(i), a.join(" ");
|
|
5069
5086
|
}
|
|
5070
5087
|
function bc(e = {}) {
|
|
5071
|
-
let {
|
|
5072
|
-
return t
|
|
5073
|
-
}
|
|
5074
|
-
function xc(e = {}) {
|
|
5075
|
-
let { variant: t = fc.PRIMARY, size: n = R.MD, className: r = "" } = e, i = ["plan-btn"];
|
|
5076
|
-
return t !== fc.PRIMARY && i.push(`plan-btn--${t}`), n !== R.MD && i.push(`plan-btn--${n}`), r && i.push(r), i.join(" ");
|
|
5088
|
+
let { variant: t = dc.PRIMARY, size: n = B.MD, className: r = "" } = e, i = ["plan-btn"];
|
|
5089
|
+
return t !== dc.PRIMARY && i.push(`plan-btn--${t}`), n !== B.MD && i.push(`plan-btn--${n}`), r && i.push(r), i.join(" ");
|
|
5077
5090
|
}
|
|
5078
|
-
function
|
|
5091
|
+
function xc(e, t) {
|
|
5079
5092
|
if (!e || !t) return { error: "需要两个有效的计划进行比较" };
|
|
5080
5093
|
let n = typeof e.price == "number" ? e.price : parseFloat(e.price) || 0, r = typeof t.price == "number" ? t.price : parseFloat(t.price) || 0, i = e.features || [], a = t.features || [], o = i.filter((e) => a.includes(e)), s = i.filter((e) => !a.includes(e)), c = a.filter((e) => !i.includes(e));
|
|
5081
5094
|
return {
|
|
@@ -5093,16 +5106,16 @@ function Sc(e, t) {
|
|
|
5093
5106
|
}
|
|
5094
5107
|
};
|
|
5095
5108
|
}
|
|
5096
|
-
function
|
|
5109
|
+
function Sc(e) {
|
|
5097
5110
|
return !Array.isArray(e) || e.length === 0 ? null : e.find((e) => e.popular) || null;
|
|
5098
5111
|
}
|
|
5099
|
-
function
|
|
5112
|
+
function Cc(e) {
|
|
5100
5113
|
return !Array.isArray(e) || e.length === 0 ? null : e.reduce((e, t) => (typeof t.price == "number" ? t.price : parseFloat(t.price) || 0) < (typeof e.price == "number" ? e.price : parseFloat(e.price) || 0) ? t : e);
|
|
5101
5114
|
}
|
|
5102
|
-
function
|
|
5115
|
+
function wc(e) {
|
|
5103
5116
|
return !Array.isArray(e) || e.length === 0 ? null : e.reduce((e, t) => (typeof t.price == "number" ? t.price : parseFloat(t.price) || 0) > (typeof e.price == "number" ? e.price : parseFloat(e.price) || 0) ? t : e);
|
|
5104
5117
|
}
|
|
5105
|
-
function
|
|
5118
|
+
function Tc(e, t = "price", n = "asc") {
|
|
5106
5119
|
return Array.isArray(e) ? [...e].sort((e, r) => {
|
|
5107
5120
|
let i, a;
|
|
5108
5121
|
switch (t) {
|
|
@@ -5120,7 +5133,7 @@ function Ec(e, t = "price", n = "asc") {
|
|
|
5120
5133
|
return i < a ? n === "asc" ? -1 : 1 : i > a ? n === "asc" ? 1 : -1 : 0;
|
|
5121
5134
|
}) : [];
|
|
5122
5135
|
}
|
|
5123
|
-
function
|
|
5136
|
+
function Ec(e, t = {}) {
|
|
5124
5137
|
return Array.isArray(e) ? e.filter((e) => {
|
|
5125
5138
|
if (t.minPrice !== void 0 && (typeof e.price == "number" ? e.price : parseFloat(e.price) || 0) < t.minPrice || t.maxPrice !== void 0 && (typeof e.price == "number" ? e.price : parseFloat(e.price) || 0) > t.maxPrice) return !1;
|
|
5126
5139
|
if (t.requiredFeatures && Array.isArray(t.requiredFeatures)) {
|
|
@@ -5135,7 +5148,7 @@ function Dc(e, t = {}) {
|
|
|
5135
5148
|
return !0;
|
|
5136
5149
|
}) : [];
|
|
5137
5150
|
}
|
|
5138
|
-
function
|
|
5151
|
+
function Dc(e, t) {
|
|
5139
5152
|
let n = {
|
|
5140
5153
|
role: "article",
|
|
5141
5154
|
"aria-labelledby": `plan-${t}-name`,
|
|
@@ -5143,7 +5156,7 @@ function Oc(e, t) {
|
|
|
5143
5156
|
};
|
|
5144
5157
|
return e.popular && (n["aria-label"] = `推荐计划: ${e.name}`), n;
|
|
5145
5158
|
}
|
|
5146
|
-
function
|
|
5159
|
+
function Oc(e, t) {
|
|
5147
5160
|
let n;
|
|
5148
5161
|
return function(...r) {
|
|
5149
5162
|
clearTimeout(n), n = setTimeout(() => {
|
|
@@ -5151,13 +5164,13 @@ function kc(e, t) {
|
|
|
5151
5164
|
}, t);
|
|
5152
5165
|
};
|
|
5153
5166
|
}
|
|
5154
|
-
function
|
|
5167
|
+
function kc(e, t) {
|
|
5155
5168
|
let n;
|
|
5156
5169
|
return function(...r) {
|
|
5157
5170
|
n || (e.apply(this, r), n = !0, setTimeout(() => n = !1, t));
|
|
5158
5171
|
};
|
|
5159
5172
|
}
|
|
5160
|
-
function
|
|
5173
|
+
function Ac(e) {
|
|
5161
5174
|
if (!Array.isArray(e)) return { error: "计划数据不是数组" };
|
|
5162
5175
|
let t = {
|
|
5163
5176
|
totalPlans: e.length,
|
|
@@ -5172,7 +5185,7 @@ function jc(e) {
|
|
|
5172
5185
|
issues: []
|
|
5173
5186
|
}, n = 0;
|
|
5174
5187
|
return e.forEach((e, r) => {
|
|
5175
|
-
let i =
|
|
5188
|
+
let i = gc(e);
|
|
5176
5189
|
i.isValid ? t.validPlans++ : (t.invalidPlans++, t.issues.push({
|
|
5177
5190
|
planIndex: r,
|
|
5178
5191
|
planName: e.name || "未命名",
|
|
@@ -5185,45 +5198,45 @@ function jc(e) {
|
|
|
5185
5198
|
max: 0
|
|
5186
5199
|
}), t;
|
|
5187
5200
|
}
|
|
5188
|
-
var
|
|
5189
|
-
PRICING_VARIANTS:
|
|
5190
|
-
PRICING_SIZES:
|
|
5191
|
-
BUTTON_VARIANTS:
|
|
5192
|
-
CURRENCY_SYMBOLS:
|
|
5193
|
-
BILLING_PERIODS:
|
|
5194
|
-
formatPrice:
|
|
5195
|
-
formatPeriod:
|
|
5196
|
-
calculateDiscountPrice:
|
|
5197
|
-
validatePlan:
|
|
5198
|
-
validatePlans:
|
|
5199
|
-
getPricingGridClasses:
|
|
5200
|
-
getPlanCardClasses:
|
|
5201
|
-
getPlanButtonClasses:
|
|
5202
|
-
comparePlans:
|
|
5203
|
-
findPopularPlan:
|
|
5204
|
-
findCheapestPlan:
|
|
5205
|
-
findMostExpensivePlan:
|
|
5206
|
-
sortPlans:
|
|
5207
|
-
filterPlans:
|
|
5208
|
-
getAccessibilityProps:
|
|
5209
|
-
debounce:
|
|
5210
|
-
throttle:
|
|
5211
|
-
debugPlans:
|
|
5212
|
-
},
|
|
5213
|
-
ProgressController: () =>
|
|
5214
|
-
animations: () =>
|
|
5215
|
-
calculatePercentage: () =>
|
|
5216
|
-
colors: () =>
|
|
5217
|
-
createCircularProgressCSS: () =>
|
|
5218
|
-
default: () =>
|
|
5219
|
-
formatProgressText: () =>
|
|
5220
|
-
getColorByProgress: () =>
|
|
5221
|
-
getProgressClasses: () =>
|
|
5222
|
-
sizes: () =>
|
|
5223
|
-
types: () =>
|
|
5224
|
-
utils: () =>
|
|
5225
|
-
validateProgress: () =>
|
|
5226
|
-
}),
|
|
5201
|
+
var jc = {
|
|
5202
|
+
PRICING_VARIANTS: uc,
|
|
5203
|
+
PRICING_SIZES: B,
|
|
5204
|
+
BUTTON_VARIANTS: dc,
|
|
5205
|
+
CURRENCY_SYMBOLS: fc,
|
|
5206
|
+
BILLING_PERIODS: V,
|
|
5207
|
+
formatPrice: pc,
|
|
5208
|
+
formatPeriod: mc,
|
|
5209
|
+
calculateDiscountPrice: hc,
|
|
5210
|
+
validatePlan: gc,
|
|
5211
|
+
validatePlans: _c,
|
|
5212
|
+
getPricingGridClasses: vc,
|
|
5213
|
+
getPlanCardClasses: yc,
|
|
5214
|
+
getPlanButtonClasses: bc,
|
|
5215
|
+
comparePlans: xc,
|
|
5216
|
+
findPopularPlan: Sc,
|
|
5217
|
+
findCheapestPlan: Cc,
|
|
5218
|
+
findMostExpensivePlan: wc,
|
|
5219
|
+
sortPlans: Tc,
|
|
5220
|
+
filterPlans: Ec,
|
|
5221
|
+
getAccessibilityProps: Dc,
|
|
5222
|
+
debounce: Oc,
|
|
5223
|
+
throttle: kc,
|
|
5224
|
+
debugPlans: Ac
|
|
5225
|
+
}, Mc = /* @__PURE__ */ n({
|
|
5226
|
+
ProgressController: () => Bc,
|
|
5227
|
+
animations: () => U,
|
|
5228
|
+
calculatePercentage: () => Ic,
|
|
5229
|
+
colors: () => H,
|
|
5230
|
+
createCircularProgressCSS: () => Vc,
|
|
5231
|
+
default: () => Uc,
|
|
5232
|
+
formatProgressText: () => Lc,
|
|
5233
|
+
getColorByProgress: () => zc,
|
|
5234
|
+
getProgressClasses: () => Rc,
|
|
5235
|
+
sizes: () => Nc,
|
|
5236
|
+
types: () => Pc,
|
|
5237
|
+
utils: () => Hc,
|
|
5238
|
+
validateProgress: () => Fc
|
|
5239
|
+
}), H = {
|
|
5227
5240
|
PRIMARY: "primary",
|
|
5228
5241
|
SUCCESS: "success",
|
|
5229
5242
|
WARNING: "warning",
|
|
@@ -5232,15 +5245,15 @@ var Mc = {
|
|
|
5232
5245
|
ORANGE: "orange",
|
|
5233
5246
|
CYAN: "cyan",
|
|
5234
5247
|
PINK: "pink"
|
|
5235
|
-
},
|
|
5248
|
+
}, Nc = {
|
|
5236
5249
|
SM: "sm",
|
|
5237
5250
|
MD: "md",
|
|
5238
5251
|
LG: "lg",
|
|
5239
5252
|
XL: "xl"
|
|
5240
|
-
},
|
|
5253
|
+
}, Pc = {
|
|
5241
5254
|
LINEAR: "linear",
|
|
5242
5255
|
CIRCULAR: "circular"
|
|
5243
|
-
},
|
|
5256
|
+
}, U = {
|
|
5244
5257
|
NONE: "none",
|
|
5245
5258
|
PULSE: "pulse",
|
|
5246
5259
|
STRIPED: "striped",
|
|
@@ -5248,48 +5261,48 @@ var Mc = {
|
|
|
5248
5261
|
INDETERMINATE: "indeterminate",
|
|
5249
5262
|
LOADING: "loading"
|
|
5250
5263
|
};
|
|
5251
|
-
function
|
|
5264
|
+
function Fc(e, t = 0, n = 100) {
|
|
5252
5265
|
let r = Number(e);
|
|
5253
5266
|
return isNaN(r) ? t : Math.max(t, Math.min(n, r));
|
|
5254
5267
|
}
|
|
5255
|
-
function
|
|
5268
|
+
function Ic(e, t) {
|
|
5256
5269
|
return t <= 0 ? 0 : Math.round(e / t * 100);
|
|
5257
5270
|
}
|
|
5258
|
-
function
|
|
5259
|
-
let { showPercent: n = !0, showFraction: r = !1, total: i = 100, precision: a = 0, suffix: o = "", prefix: s = "" } = t, c =
|
|
5260
|
-
return r ? `${s}${c}/${i}${o}` : n ? `${s}${
|
|
5271
|
+
function Lc(e, t = {}) {
|
|
5272
|
+
let { showPercent: n = !0, showFraction: r = !1, total: i = 100, precision: a = 0, suffix: o = "", prefix: s = "" } = t, c = Fc(e, 0, i);
|
|
5273
|
+
return r ? `${s}${c}/${i}${o}` : n ? `${s}${Ic(c, i).toFixed(a)}%${o}` : `${s}${c.toFixed(a)}${o}`;
|
|
5261
5274
|
}
|
|
5262
|
-
function
|
|
5263
|
-
let { size: t =
|
|
5264
|
-
return t &&
|
|
5275
|
+
function Rc(e = {}) {
|
|
5276
|
+
let { size: t = Nc.MD, color: n = H.PRIMARY, type: r = Pc.LINEAR, animation: i = U.NONE, striped: a = !1, animated: o = !1, gradient: s = !1, glow: c = !1, indeterminate: l = !1, className: u = "" } = e, d = ["wc-progress-wrapper"], f = ["wc-progress"], p = ["wc-progress__bar"];
|
|
5277
|
+
return t && Nc[t.toUpperCase()] && f.push(`wc-progress--${t}`), r === Pc.CIRCULAR && f.push("wc-progress--circular"), n && H[n.toUpperCase()] && p.push(`wc-progress__bar--${n}`), l ? f.push("wc-progress--indeterminate") : ((o || i === U.PULSE) && p.push("wc-progress__bar--animated"), (a || i === U.STRIPED) && p.push("wc-progress__bar--striped"), i === U.STRIPED_ANIMATED && p.push("wc-progress__bar--striped-animated"), i === U.LOADING && f.push("wc-progress--loading")), s && p.push("wc-progress__bar--gradient"), c && p.push("wc-progress__bar--glow"), u && d.push(u), {
|
|
5265
5278
|
wrapper: d.join(" "),
|
|
5266
5279
|
container: f.join(" "),
|
|
5267
5280
|
bar: p.join(" ")
|
|
5268
5281
|
};
|
|
5269
5282
|
}
|
|
5270
|
-
function
|
|
5283
|
+
function zc(e, t = []) {
|
|
5271
5284
|
let n = [
|
|
5272
5285
|
{
|
|
5273
5286
|
value: 25,
|
|
5274
|
-
color:
|
|
5287
|
+
color: H.ERROR
|
|
5275
5288
|
},
|
|
5276
5289
|
{
|
|
5277
5290
|
value: 50,
|
|
5278
|
-
color:
|
|
5291
|
+
color: H.WARNING
|
|
5279
5292
|
},
|
|
5280
5293
|
{
|
|
5281
5294
|
value: 75,
|
|
5282
|
-
color:
|
|
5295
|
+
color: H.PRIMARY
|
|
5283
5296
|
},
|
|
5284
5297
|
{
|
|
5285
5298
|
value: 100,
|
|
5286
|
-
color:
|
|
5299
|
+
color: H.SUCCESS
|
|
5287
5300
|
}
|
|
5288
5301
|
], r = t.length > 0 ? t : n;
|
|
5289
5302
|
for (let t of r) if (e <= t.value) return t.color;
|
|
5290
|
-
return
|
|
5303
|
+
return H.SUCCESS;
|
|
5291
5304
|
}
|
|
5292
|
-
var
|
|
5305
|
+
var Bc = class {
|
|
5293
5306
|
constructor(e = {}) {
|
|
5294
5307
|
this.options = {
|
|
5295
5308
|
duration: 2e3,
|
|
@@ -5301,7 +5314,7 @@ var Vc = class {
|
|
|
5301
5314
|
}, this.currentValue = 0, this.targetValue = 0, this.isRunning = !1, this.startTime = null, this.rafId = null;
|
|
5302
5315
|
}
|
|
5303
5316
|
setProgress(e, t = !0) {
|
|
5304
|
-
let n =
|
|
5317
|
+
let n = Fc(e);
|
|
5305
5318
|
if (this.targetValue = n, !t) {
|
|
5306
5319
|
this.currentValue = n, this.options.onUpdate?.(n), n === 100 && this.options.onComplete?.(n);
|
|
5307
5320
|
return;
|
|
@@ -5345,16 +5358,16 @@ var Vc = class {
|
|
|
5345
5358
|
this.stop(), this.options.onUpdate = null, this.options.onComplete = null;
|
|
5346
5359
|
}
|
|
5347
5360
|
};
|
|
5348
|
-
function
|
|
5361
|
+
function Vc(e, t = H.PRIMARY) {
|
|
5349
5362
|
let n = e / 100 * 360;
|
|
5350
5363
|
return { background: `conic-gradient(
|
|
5351
5364
|
var(--wc-progress-${t}) ${n}deg,
|
|
5352
5365
|
var(--wc-progress-bg) ${n}deg
|
|
5353
5366
|
)` };
|
|
5354
5367
|
}
|
|
5355
|
-
var
|
|
5368
|
+
var Hc = {
|
|
5356
5369
|
createController(e = {}) {
|
|
5357
|
-
return new
|
|
5370
|
+
return new Bc(e);
|
|
5358
5371
|
},
|
|
5359
5372
|
shouldReduceMotion() {
|
|
5360
5373
|
return window.matchMedia("(prefers-reduced-motion: reduce)").matches;
|
|
@@ -5372,40 +5385,40 @@ var Uc = {
|
|
|
5372
5385
|
debug(e, t) {
|
|
5373
5386
|
process.env.NODE_ENV === "development" && console.log(`[Progress] ${e}`, t);
|
|
5374
5387
|
}
|
|
5375
|
-
},
|
|
5376
|
-
ProgressController:
|
|
5377
|
-
validateProgress:
|
|
5378
|
-
calculatePercentage:
|
|
5379
|
-
formatProgressText:
|
|
5380
|
-
getProgressClasses:
|
|
5381
|
-
getColorByProgress:
|
|
5382
|
-
createCircularProgressCSS:
|
|
5383
|
-
utils:
|
|
5384
|
-
colors:
|
|
5385
|
-
sizes:
|
|
5386
|
-
types:
|
|
5387
|
-
animations:
|
|
5388
|
-
},
|
|
5388
|
+
}, Uc = {
|
|
5389
|
+
ProgressController: Bc,
|
|
5390
|
+
validateProgress: Fc,
|
|
5391
|
+
calculatePercentage: Ic,
|
|
5392
|
+
formatProgressText: Lc,
|
|
5393
|
+
getProgressClasses: Rc,
|
|
5394
|
+
getColorByProgress: zc,
|
|
5395
|
+
createCircularProgressCSS: Vc,
|
|
5396
|
+
utils: Hc,
|
|
5397
|
+
colors: H,
|
|
5398
|
+
sizes: Nc,
|
|
5399
|
+
types: Pc,
|
|
5400
|
+
animations: U
|
|
5401
|
+
}, Wc = /* @__PURE__ */ n({
|
|
5389
5402
|
RADIO_COLORS: () => Kc,
|
|
5390
5403
|
RADIO_ORIENTATIONS: () => Jc,
|
|
5391
|
-
RADIO_SIZES: () =>
|
|
5404
|
+
RADIO_SIZES: () => Gc,
|
|
5392
5405
|
RADIO_VARIANTS: () => qc,
|
|
5393
|
-
RadioGroupManager: () =>
|
|
5394
|
-
createRadioChangeHandler: () =>
|
|
5395
|
-
createRadioKeyboardHandler: () =>
|
|
5396
|
-
default: () =>
|
|
5397
|
-
findSelectedOption: () =>
|
|
5398
|
-
getNextRadioOption: () =>
|
|
5399
|
-
getPreviousRadioOption: () =>
|
|
5400
|
-
getRadioAccessibilityProps: () =>
|
|
5401
|
-
getRadioButtonClasses: () =>
|
|
5402
|
-
getRadioClasses: () =>
|
|
5403
|
-
getRadioGroupAccessibilityProps: () =>
|
|
5404
|
-
getRadioGroupClasses: () =>
|
|
5405
|
-
normalizeRadioOptions: () =>
|
|
5406
|
+
RadioGroupManager: () => ol,
|
|
5407
|
+
createRadioChangeHandler: () => il,
|
|
5408
|
+
createRadioKeyboardHandler: () => al,
|
|
5409
|
+
default: () => ll,
|
|
5410
|
+
findSelectedOption: () => Qc,
|
|
5411
|
+
getNextRadioOption: () => $c,
|
|
5412
|
+
getPreviousRadioOption: () => el,
|
|
5413
|
+
getRadioAccessibilityProps: () => sl,
|
|
5414
|
+
getRadioButtonClasses: () => nl,
|
|
5415
|
+
getRadioClasses: () => tl,
|
|
5416
|
+
getRadioGroupAccessibilityProps: () => cl,
|
|
5417
|
+
getRadioGroupClasses: () => rl,
|
|
5418
|
+
normalizeRadioOptions: () => Zc,
|
|
5406
5419
|
validateRadioGroupConfig: () => Xc,
|
|
5407
5420
|
validateRadioValue: () => Yc
|
|
5408
|
-
}),
|
|
5421
|
+
}), Gc = {
|
|
5409
5422
|
SM: "sm",
|
|
5410
5423
|
MD: "md",
|
|
5411
5424
|
LG: "lg"
|
|
@@ -5439,7 +5452,7 @@ function Xc(e = {}) {
|
|
|
5439
5452
|
warnings: n
|
|
5440
5453
|
};
|
|
5441
5454
|
}
|
|
5442
|
-
function
|
|
5455
|
+
function Zc(e = []) {
|
|
5443
5456
|
return e.map((e, t) => typeof e == "string" || typeof e == "number" ? {
|
|
5444
5457
|
value: e,
|
|
5445
5458
|
label: String(e),
|
|
@@ -5459,38 +5472,38 @@ function U(e = []) {
|
|
|
5459
5472
|
disabled: !0
|
|
5460
5473
|
});
|
|
5461
5474
|
}
|
|
5462
|
-
function
|
|
5463
|
-
return
|
|
5475
|
+
function Qc(e, t = []) {
|
|
5476
|
+
return Zc(t).find((t) => t.value === e) || null;
|
|
5464
5477
|
}
|
|
5465
|
-
function
|
|
5466
|
-
let r =
|
|
5478
|
+
function $c(e, t = [], n = !0) {
|
|
5479
|
+
let r = Zc(t).filter((e) => !e.disabled);
|
|
5467
5480
|
if (r.length === 0) return null;
|
|
5468
5481
|
let i = r.findIndex((t) => t.value === e);
|
|
5469
5482
|
if (i === -1) return r[0];
|
|
5470
5483
|
let a = i + 1;
|
|
5471
5484
|
return a >= r.length ? n ? r[0] : null : r[a];
|
|
5472
5485
|
}
|
|
5473
|
-
function
|
|
5474
|
-
let r =
|
|
5486
|
+
function el(e, t = [], n = !0) {
|
|
5487
|
+
let r = Zc(t).filter((e) => !e.disabled);
|
|
5475
5488
|
if (r.length === 0) return null;
|
|
5476
5489
|
let i = r.findIndex((t) => t.value === e);
|
|
5477
5490
|
if (i === -1) return r[r.length - 1];
|
|
5478
5491
|
let a = i - 1;
|
|
5479
5492
|
return a < 0 ? n ? r[r.length - 1] : null : r[a];
|
|
5480
5493
|
}
|
|
5481
|
-
function el(e = {}) {
|
|
5482
|
-
let { size: t = H.MD, variant: n = qc.STANDARD, disabled: r = !1, checked: i = !1, focused: a = !1, className: o = "" } = e, s = ["wc-radio"];
|
|
5483
|
-
return t !== H.MD && s.push(`wc-radio--${t}`), n !== qc.STANDARD && s.push(`wc-radio--${n}`), r && s.push("wc-radio--disabled"), i && s.push("wc-radio--checked"), a && s.push("wc-radio--focused"), o && s.push(o), s.join(" ");
|
|
5484
|
-
}
|
|
5485
5494
|
function tl(e = {}) {
|
|
5486
|
-
let { size: t =
|
|
5487
|
-
return
|
|
5495
|
+
let { size: t = Gc.MD, variant: n = qc.STANDARD, disabled: r = !1, checked: i = !1, focused: a = !1, className: o = "" } = e, s = ["wc-radio"];
|
|
5496
|
+
return t !== Gc.MD && s.push(`wc-radio--${t}`), n !== qc.STANDARD && s.push(`wc-radio--${n}`), r && s.push("wc-radio--disabled"), i && s.push("wc-radio--checked"), a && s.push("wc-radio--focused"), o && s.push(o), s.join(" ");
|
|
5488
5497
|
}
|
|
5489
5498
|
function nl(e = {}) {
|
|
5490
|
-
let {
|
|
5491
|
-
return
|
|
5499
|
+
let { size: t = Gc.MD, color: n = Kc.PRIMARY, checked: r = !1, className: i = "" } = e, a = ["wc-radio__button"];
|
|
5500
|
+
return a.push(`wc-radio__button--${t}`), a.push(`wc-radio__button--${n}`), r && a.push("wc-radio__button--checked"), i && a.push(i), a.join(" ");
|
|
5501
|
+
}
|
|
5502
|
+
function rl(e = {}) {
|
|
5503
|
+
let { orientation: t = Jc.VERTICAL, size: n = Gc.MD, disabled: r = !1, className: i = "" } = e, a = ["wc-radio-group"];
|
|
5504
|
+
return t !== Jc.VERTICAL && a.push(`wc-radio-group--${t}`), n !== Gc.MD && a.push(`wc-radio-group--${n}`), r && a.push("wc-radio-group--disabled"), i && a.push(i), a.join(" ");
|
|
5492
5505
|
}
|
|
5493
|
-
function
|
|
5506
|
+
function il(e, t = {}) {
|
|
5494
5507
|
let { disabled: n = !1, value: r } = t;
|
|
5495
5508
|
return function(t) {
|
|
5496
5509
|
if (n) return;
|
|
@@ -5498,23 +5511,23 @@ function rl(e, t = {}) {
|
|
|
5498
5511
|
e?.(i, t);
|
|
5499
5512
|
};
|
|
5500
5513
|
}
|
|
5501
|
-
function
|
|
5514
|
+
function al(e, t = [], n) {
|
|
5502
5515
|
return function(r) {
|
|
5503
5516
|
let i = null;
|
|
5504
5517
|
switch (r.key) {
|
|
5505
5518
|
case "ArrowDown":
|
|
5506
5519
|
case "ArrowRight":
|
|
5507
|
-
i =
|
|
5520
|
+
i = $c(n, t);
|
|
5508
5521
|
break;
|
|
5509
5522
|
case "ArrowUp":
|
|
5510
5523
|
case "ArrowLeft":
|
|
5511
|
-
i =
|
|
5524
|
+
i = el(n, t);
|
|
5512
5525
|
break;
|
|
5513
5526
|
case "Home":
|
|
5514
|
-
i =
|
|
5527
|
+
i = Zc(t).filter((e) => !e.disabled)[0] || null;
|
|
5515
5528
|
break;
|
|
5516
5529
|
case "End":
|
|
5517
|
-
let e =
|
|
5530
|
+
let e = Zc(t).filter((e) => !e.disabled);
|
|
5518
5531
|
i = e[e.length - 1] || null;
|
|
5519
5532
|
break;
|
|
5520
5533
|
default: return;
|
|
@@ -5522,7 +5535,7 @@ function il(e, t = [], n) {
|
|
|
5522
5535
|
i && (r.preventDefault(), e?.(i.value, r));
|
|
5523
5536
|
};
|
|
5524
5537
|
}
|
|
5525
|
-
var
|
|
5538
|
+
var ol = class {
|
|
5526
5539
|
constructor(e = {}) {
|
|
5527
5540
|
this.options = {
|
|
5528
5541
|
name: "",
|
|
@@ -5551,7 +5564,7 @@ var al = class {
|
|
|
5551
5564
|
this.state.value = e, this.state.touched = !0, t !== e && this.options.onChange?.(e, this.getState());
|
|
5552
5565
|
}
|
|
5553
5566
|
getSelectedOption() {
|
|
5554
|
-
return
|
|
5567
|
+
return Qc(this.state.value, this.options.options);
|
|
5555
5568
|
}
|
|
5556
5569
|
isValid() {
|
|
5557
5570
|
return this.options.required && (this.state.value === null || this.state.value === void 0) ? !1 : Yc(this.state.value, this.options.options);
|
|
@@ -5573,15 +5586,15 @@ var al = class {
|
|
|
5573
5586
|
this.state.focused = !1;
|
|
5574
5587
|
}
|
|
5575
5588
|
moveToNext() {
|
|
5576
|
-
let e =
|
|
5589
|
+
let e = $c(this.state.value, this.options.options);
|
|
5577
5590
|
e && this.setValue(e.value);
|
|
5578
5591
|
}
|
|
5579
5592
|
moveToPrevious() {
|
|
5580
|
-
let e =
|
|
5593
|
+
let e = el(this.state.value, this.options.options);
|
|
5581
5594
|
e && this.setValue(e.value);
|
|
5582
5595
|
}
|
|
5583
5596
|
};
|
|
5584
|
-
function
|
|
5597
|
+
function sl(e = {}) {
|
|
5585
5598
|
let { checked: t = !1, disabled: n = !1, required: r = !1, invalid: i = !1, describedBy: a = "", labelledBy: o = "" } = e, s = {
|
|
5586
5599
|
role: "radio",
|
|
5587
5600
|
"aria-checked": t,
|
|
@@ -5590,62 +5603,62 @@ function ol(e = {}) {
|
|
|
5590
5603
|
};
|
|
5591
5604
|
return r && (s["aria-required"] = "true"), i && (s["aria-invalid"] = "true"), a && (s["aria-describedby"] = a), o && (s["aria-labelledby"] = o), s;
|
|
5592
5605
|
}
|
|
5593
|
-
function
|
|
5606
|
+
function cl(e = {}) {
|
|
5594
5607
|
let { label: t = "", required: n = !1, invalid: r = !1, errorId: i = "", helpId: a = "" } = e, o = { role: "radiogroup" };
|
|
5595
5608
|
t && (o["aria-label"] = t), n && (o["aria-required"] = "true"), r && (o["aria-invalid"] = "true");
|
|
5596
5609
|
let s = [];
|
|
5597
5610
|
return i && s.push(i), a && s.push(a), s.length > 0 && (o["aria-describedby"] = s.join(" ")), o;
|
|
5598
5611
|
}
|
|
5599
|
-
var
|
|
5600
|
-
RADIO_SIZES:
|
|
5612
|
+
var ll = {
|
|
5613
|
+
RADIO_SIZES: Gc,
|
|
5601
5614
|
RADIO_COLORS: Kc,
|
|
5602
5615
|
RADIO_VARIANTS: qc,
|
|
5603
5616
|
RADIO_ORIENTATIONS: Jc,
|
|
5604
5617
|
validateRadioValue: Yc,
|
|
5605
5618
|
validateRadioGroupConfig: Xc,
|
|
5606
|
-
normalizeRadioOptions:
|
|
5607
|
-
findSelectedOption:
|
|
5608
|
-
getNextRadioOption:
|
|
5609
|
-
getPreviousRadioOption:
|
|
5610
|
-
getRadioClasses:
|
|
5611
|
-
getRadioButtonClasses:
|
|
5612
|
-
getRadioGroupClasses:
|
|
5613
|
-
createRadioChangeHandler:
|
|
5614
|
-
createRadioKeyboardHandler:
|
|
5615
|
-
RadioGroupManager:
|
|
5616
|
-
getRadioAccessibilityProps:
|
|
5617
|
-
getRadioGroupAccessibilityProps:
|
|
5618
|
-
},
|
|
5619
|
-
RATING_COLORS: () =>
|
|
5619
|
+
normalizeRadioOptions: Zc,
|
|
5620
|
+
findSelectedOption: Qc,
|
|
5621
|
+
getNextRadioOption: $c,
|
|
5622
|
+
getPreviousRadioOption: el,
|
|
5623
|
+
getRadioClasses: tl,
|
|
5624
|
+
getRadioButtonClasses: nl,
|
|
5625
|
+
getRadioGroupClasses: rl,
|
|
5626
|
+
createRadioChangeHandler: il,
|
|
5627
|
+
createRadioKeyboardHandler: al,
|
|
5628
|
+
RadioGroupManager: ol,
|
|
5629
|
+
getRadioAccessibilityProps: sl,
|
|
5630
|
+
getRadioGroupAccessibilityProps: cl
|
|
5631
|
+
}, ul = /* @__PURE__ */ n({
|
|
5632
|
+
RATING_COLORS: () => fl,
|
|
5620
5633
|
RATING_ICONS: () => W,
|
|
5621
|
-
RATING_SIZES: () =>
|
|
5622
|
-
RATING_VARIANTS: () =>
|
|
5623
|
-
calculateFillPercentage: () =>
|
|
5624
|
-
calculateRatingFromPosition: () =>
|
|
5625
|
-
createCustomIcon: () =>
|
|
5626
|
-
createRatingClickHandler: () =>
|
|
5627
|
-
createRatingHoverHandlers: () =>
|
|
5628
|
-
createRatingKeyboardHandler: () =>
|
|
5629
|
-
debounce: () =>
|
|
5630
|
-
default: () =>
|
|
5631
|
-
formatRating: () =>
|
|
5632
|
-
formatRatingDescription: () =>
|
|
5633
|
-
generateRatingItems: () =>
|
|
5634
|
-
getRatingAccessibilityProps: () =>
|
|
5635
|
-
getRatingClasses: () =>
|
|
5636
|
-
getRatingIcon: () =>
|
|
5637
|
-
getRatingItemAccessibilityProps: () =>
|
|
5638
|
-
getRatingItemClasses: () =>
|
|
5639
|
-
normalizeRating: () =>
|
|
5640
|
-
throttle: () =>
|
|
5641
|
-
validateRating: () =>
|
|
5642
|
-
validateRatingConfig: () =>
|
|
5643
|
-
}),
|
|
5634
|
+
RATING_SIZES: () => dl,
|
|
5635
|
+
RATING_VARIANTS: () => pl,
|
|
5636
|
+
calculateFillPercentage: () => vl,
|
|
5637
|
+
calculateRatingFromPosition: () => yl,
|
|
5638
|
+
createCustomIcon: () => Cl,
|
|
5639
|
+
createRatingClickHandler: () => wl,
|
|
5640
|
+
createRatingHoverHandlers: () => Tl,
|
|
5641
|
+
createRatingKeyboardHandler: () => El,
|
|
5642
|
+
debounce: () => jl,
|
|
5643
|
+
default: () => Nl,
|
|
5644
|
+
formatRating: () => Dl,
|
|
5645
|
+
formatRatingDescription: () => Ol,
|
|
5646
|
+
generateRatingItems: () => _l,
|
|
5647
|
+
getRatingAccessibilityProps: () => kl,
|
|
5648
|
+
getRatingClasses: () => bl,
|
|
5649
|
+
getRatingIcon: () => Sl,
|
|
5650
|
+
getRatingItemAccessibilityProps: () => Al,
|
|
5651
|
+
getRatingItemClasses: () => xl,
|
|
5652
|
+
normalizeRating: () => hl,
|
|
5653
|
+
throttle: () => Ml,
|
|
5654
|
+
validateRating: () => ml,
|
|
5655
|
+
validateRatingConfig: () => gl
|
|
5656
|
+
}), dl = {
|
|
5644
5657
|
SM: "sm",
|
|
5645
5658
|
MD: "md",
|
|
5646
5659
|
LG: "lg",
|
|
5647
5660
|
XL: "xl"
|
|
5648
|
-
},
|
|
5661
|
+
}, fl = {
|
|
5649
5662
|
PRIMARY: "primary",
|
|
5650
5663
|
SECONDARY: "secondary",
|
|
5651
5664
|
SUCCESS: "success",
|
|
@@ -5657,7 +5670,7 @@ var cl = {
|
|
|
5657
5670
|
HEART: "heart",
|
|
5658
5671
|
THUMBS: "thumbs",
|
|
5659
5672
|
CUSTOM: "custom"
|
|
5660
|
-
},
|
|
5673
|
+
}, pl = {
|
|
5661
5674
|
STANDARD: "standard",
|
|
5662
5675
|
OUTLINED: "outlined",
|
|
5663
5676
|
FILLED: "filled",
|
|
@@ -5665,23 +5678,23 @@ var cl = {
|
|
|
5665
5678
|
GLOW: "glow",
|
|
5666
5679
|
BOUNCE: "bounce"
|
|
5667
5680
|
};
|
|
5668
|
-
function
|
|
5681
|
+
function ml(e, t = 5, n = 0) {
|
|
5669
5682
|
return typeof e != "number" || isNaN(e) ? !1 : e >= n && e <= t;
|
|
5670
5683
|
}
|
|
5671
|
-
function
|
|
5684
|
+
function hl(e, t = 5, n = 0, r = 1) {
|
|
5672
5685
|
if (typeof e != "number" || isNaN(e)) return n;
|
|
5673
5686
|
let i = Math.max(n, Math.min(t, e));
|
|
5674
5687
|
return r > 0 ? Math.round(i / r) * r : i;
|
|
5675
5688
|
}
|
|
5676
|
-
function
|
|
5689
|
+
function gl(e = {}) {
|
|
5677
5690
|
let t = [], n = [], { max: r = 5, min: i = 0, step: a = 1, value: o = 0 } = e;
|
|
5678
|
-
return (typeof r != "number" || r <= 0) && t.push("最大评分必须是大于0的数字"), (typeof i != "number" || i < 0) && t.push("最小评分必须是大于等于0的数字"), i >= r && t.push("最小评分必须小于最大评分"), (typeof a != "number" || a <= 0) && t.push("步长必须是大于0的数字"),
|
|
5691
|
+
return (typeof r != "number" || r <= 0) && t.push("最大评分必须是大于0的数字"), (typeof i != "number" || i < 0) && t.push("最小评分必须是大于等于0的数字"), i >= r && t.push("最小评分必须小于最大评分"), (typeof a != "number" || a <= 0) && t.push("步长必须是大于0的数字"), ml(o, r, i) || n.push("当前评分值超出有效范围"), {
|
|
5679
5692
|
isValid: t.length === 0,
|
|
5680
5693
|
errors: t,
|
|
5681
5694
|
warnings: n
|
|
5682
5695
|
};
|
|
5683
5696
|
}
|
|
5684
|
-
function
|
|
5697
|
+
function _l(e = 5, t = 0, n = 0) {
|
|
5685
5698
|
let r = [];
|
|
5686
5699
|
for (let i = 1; i <= e; i++) {
|
|
5687
5700
|
let e = i <= (n || t), a = i <= t, o = n > 0 && i <= n;
|
|
@@ -5696,22 +5709,22 @@ function gl(e = 5, t = 0, n = 0) {
|
|
|
5696
5709
|
}
|
|
5697
5710
|
return r;
|
|
5698
5711
|
}
|
|
5699
|
-
function
|
|
5712
|
+
function vl(e, t) {
|
|
5700
5713
|
return e >= t ? 100 : e > t - 1 ? (e - (t - 1)) * 100 : 0;
|
|
5701
5714
|
}
|
|
5702
|
-
function
|
|
5715
|
+
function yl(e, t, n = 5, r = !1) {
|
|
5703
5716
|
let i = t.getBoundingClientRect(), a = e.clientX - i.left, o = i.width, s = Math.max(0, Math.min(1, a / o)) * n;
|
|
5704
5717
|
return s = r ? Math.round(s * 2) / 2 : Math.ceil(s), Math.max(0, Math.min(n, s));
|
|
5705
5718
|
}
|
|
5706
|
-
function yl(e = {}) {
|
|
5707
|
-
let { size: t = ul.MD, color: n = dl.WARNING, variant: r = fl.STANDARD, readonly: i = !1, disabled: a = !1, vertical: o = !1, compact: s = !1, className: c = "" } = e, l = ["wc-rating"];
|
|
5708
|
-
return t !== ul.MD && l.push(`wc-rating--${t}`), n !== dl.WARNING && l.push(`wc-rating--${n}`), r !== fl.STANDARD && l.push(`wc-rating--${r}`), i && l.push("wc-rating--readonly"), a && l.push("wc-rating--disabled"), o && l.push("wc-rating--vertical"), s && l.push("wc-rating--compact"), c && l.push(c), l.join(" ");
|
|
5709
|
-
}
|
|
5710
5719
|
function bl(e = {}) {
|
|
5711
|
-
let {
|
|
5712
|
-
return t &&
|
|
5720
|
+
let { size: t = dl.MD, color: n = fl.WARNING, variant: r = pl.STANDARD, readonly: i = !1, disabled: a = !1, vertical: o = !1, compact: s = !1, className: c = "" } = e, l = ["wc-rating"];
|
|
5721
|
+
return t !== dl.MD && l.push(`wc-rating--${t}`), n !== fl.WARNING && l.push(`wc-rating--${n}`), r !== pl.STANDARD && l.push(`wc-rating--${r}`), i && l.push("wc-rating--readonly"), a && l.push("wc-rating--disabled"), o && l.push("wc-rating--vertical"), s && l.push("wc-rating--compact"), c && l.push(c), l.join(" ");
|
|
5722
|
+
}
|
|
5723
|
+
function xl(e = {}) {
|
|
5724
|
+
let { active: t = !1, filled: n = !1, hovered: r = !1, disabled: i = !1, size: a = dl.MD, className: o = "" } = e, s = ["wc-rating-item"];
|
|
5725
|
+
return t && s.push("active"), n && s.push("filled"), r && s.push("hovered"), i && s.push("disabled"), a !== dl.MD && s.push(`wc-rating-item--${a}`), o && s.push(o), s.join(" ");
|
|
5713
5726
|
}
|
|
5714
|
-
function
|
|
5727
|
+
function Sl(e = W.STAR, t = !1) {
|
|
5715
5728
|
let n = {
|
|
5716
5729
|
[W.STAR]: {
|
|
5717
5730
|
filled: "★",
|
|
@@ -5728,14 +5741,14 @@ function xl(e = W.STAR, t = !1) {
|
|
|
5728
5741
|
}, r = n[e] || n[W.STAR];
|
|
5729
5742
|
return t ? r.filled : r.empty;
|
|
5730
5743
|
}
|
|
5731
|
-
function
|
|
5744
|
+
function Cl(e, t = !1) {
|
|
5732
5745
|
let n = {
|
|
5733
5746
|
star: t ? "<svg viewBox=\"0 0 24 24\" fill=\"currentColor\"><path d=\"M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z\"/></svg>" : "<svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\"><path d=\"M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z\"/></svg>",
|
|
5734
5747
|
heart: t ? "<svg viewBox=\"0 0 24 24\" fill=\"currentColor\"><path d=\"M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z\"/></svg>" : "<svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\"><path d=\"M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z\"/></svg>"
|
|
5735
5748
|
};
|
|
5736
5749
|
return n[e] || n.star;
|
|
5737
5750
|
}
|
|
5738
|
-
function
|
|
5751
|
+
function wl(e, t = {}) {
|
|
5739
5752
|
let { readonly: n = !1, allowClear: r = !0 } = t;
|
|
5740
5753
|
return function(t, i) {
|
|
5741
5754
|
if (n) return;
|
|
@@ -5743,7 +5756,7 @@ function Cl(e, t = {}) {
|
|
|
5743
5756
|
r && t === i && (a = 0), e?.(a);
|
|
5744
5757
|
};
|
|
5745
5758
|
}
|
|
5746
|
-
function
|
|
5759
|
+
function Tl(e, t = {}) {
|
|
5747
5760
|
let { readonly: n = !1 } = t;
|
|
5748
5761
|
return {
|
|
5749
5762
|
onMouseEnter(t) {
|
|
@@ -5754,7 +5767,7 @@ function wl(e, t = {}) {
|
|
|
5754
5767
|
}
|
|
5755
5768
|
};
|
|
5756
5769
|
}
|
|
5757
|
-
function
|
|
5770
|
+
function El(e, t = {}) {
|
|
5758
5771
|
let { max: n = 5, min: r = 0, readonly: i = !1 } = t;
|
|
5759
5772
|
return function(t, a) {
|
|
5760
5773
|
if (i) return;
|
|
@@ -5783,11 +5796,11 @@ function Tl(e, t = {}) {
|
|
|
5783
5796
|
t.preventDefault(), e?.(o);
|
|
5784
5797
|
};
|
|
5785
5798
|
}
|
|
5786
|
-
function
|
|
5799
|
+
function Dl(e, t = 5, n = {}) {
|
|
5787
5800
|
let { showMax: r = !0, precision: i = 1, locale: a = "zh-CN" } = n, o = Number(e).toFixed(i);
|
|
5788
5801
|
return r ? `${o}/${t}` : o;
|
|
5789
5802
|
}
|
|
5790
|
-
function
|
|
5803
|
+
function Ol(e, t = 5, n = []) {
|
|
5791
5804
|
n.length === 0 && (n = [
|
|
5792
5805
|
"很差",
|
|
5793
5806
|
"较差",
|
|
@@ -5798,7 +5811,7 @@ function Dl(e, t = 5, n = []) {
|
|
|
5798
5811
|
let r = Math.floor(e) - 1;
|
|
5799
5812
|
return n[r] || "";
|
|
5800
5813
|
}
|
|
5801
|
-
function
|
|
5814
|
+
function kl(e, t = 5, n = !1) {
|
|
5802
5815
|
let r = {
|
|
5803
5816
|
role: n ? "img" : "radiogroup",
|
|
5804
5817
|
"aria-label": `评分 ${e} 分,满分 ${t} 分`,
|
|
@@ -5808,7 +5821,7 @@ function Ol(e, t = 5, n = !1) {
|
|
|
5808
5821
|
};
|
|
5809
5822
|
return n && (r["aria-readonly"] = "true"), r;
|
|
5810
5823
|
}
|
|
5811
|
-
function
|
|
5824
|
+
function Al(e, t, n = !1) {
|
|
5812
5825
|
let r = {
|
|
5813
5826
|
role: "radio",
|
|
5814
5827
|
"aria-checked": e === t ? "true" : "false",
|
|
@@ -5818,7 +5831,7 @@ function kl(e, t, n = !1) {
|
|
|
5818
5831
|
};
|
|
5819
5832
|
return n ? (r.tabIndex = -1, r["aria-hidden"] = "true") : r.tabIndex = e === t ? 0 : -1, r;
|
|
5820
5833
|
}
|
|
5821
|
-
function
|
|
5834
|
+
function jl(e, t) {
|
|
5822
5835
|
let n;
|
|
5823
5836
|
return function(...r) {
|
|
5824
5837
|
clearTimeout(n), n = setTimeout(() => {
|
|
@@ -5826,61 +5839,61 @@ function Al(e, t) {
|
|
|
5826
5839
|
}, t);
|
|
5827
5840
|
};
|
|
5828
5841
|
}
|
|
5829
|
-
function
|
|
5842
|
+
function Ml(e, t) {
|
|
5830
5843
|
let n;
|
|
5831
5844
|
return function(...r) {
|
|
5832
5845
|
n || (e.apply(this, r), n = !0, setTimeout(() => n = !1, t));
|
|
5833
5846
|
};
|
|
5834
5847
|
}
|
|
5835
|
-
var
|
|
5836
|
-
RATING_SIZES:
|
|
5837
|
-
RATING_COLORS:
|
|
5848
|
+
var Nl = {
|
|
5849
|
+
RATING_SIZES: dl,
|
|
5850
|
+
RATING_COLORS: fl,
|
|
5838
5851
|
RATING_ICONS: W,
|
|
5839
|
-
RATING_VARIANTS:
|
|
5840
|
-
validateRating:
|
|
5841
|
-
normalizeRating:
|
|
5842
|
-
validateRatingConfig:
|
|
5843
|
-
generateRatingItems:
|
|
5844
|
-
calculateFillPercentage:
|
|
5845
|
-
calculateRatingFromPosition:
|
|
5846
|
-
getRatingClasses:
|
|
5847
|
-
getRatingItemClasses:
|
|
5848
|
-
getRatingIcon:
|
|
5849
|
-
createCustomIcon:
|
|
5850
|
-
createRatingClickHandler:
|
|
5851
|
-
createRatingHoverHandlers:
|
|
5852
|
-
createRatingKeyboardHandler:
|
|
5853
|
-
formatRating:
|
|
5854
|
-
formatRatingDescription:
|
|
5855
|
-
getRatingAccessibilityProps:
|
|
5856
|
-
getRatingItemAccessibilityProps:
|
|
5857
|
-
debounce:
|
|
5858
|
-
throttle:
|
|
5859
|
-
},
|
|
5852
|
+
RATING_VARIANTS: pl,
|
|
5853
|
+
validateRating: ml,
|
|
5854
|
+
normalizeRating: hl,
|
|
5855
|
+
validateRatingConfig: gl,
|
|
5856
|
+
generateRatingItems: _l,
|
|
5857
|
+
calculateFillPercentage: vl,
|
|
5858
|
+
calculateRatingFromPosition: yl,
|
|
5859
|
+
getRatingClasses: bl,
|
|
5860
|
+
getRatingItemClasses: xl,
|
|
5861
|
+
getRatingIcon: Sl,
|
|
5862
|
+
createCustomIcon: Cl,
|
|
5863
|
+
createRatingClickHandler: wl,
|
|
5864
|
+
createRatingHoverHandlers: Tl,
|
|
5865
|
+
createRatingKeyboardHandler: El,
|
|
5866
|
+
formatRating: Dl,
|
|
5867
|
+
formatRatingDescription: Ol,
|
|
5868
|
+
getRatingAccessibilityProps: kl,
|
|
5869
|
+
getRatingItemAccessibilityProps: Al,
|
|
5870
|
+
debounce: jl,
|
|
5871
|
+
throttle: Ml
|
|
5872
|
+
}, Pl = /* @__PURE__ */ n({
|
|
5860
5873
|
KEY_CODES: () => G,
|
|
5861
|
-
SELECT_SIZES: () =>
|
|
5862
|
-
SELECT_VARIANTS: () =>
|
|
5863
|
-
debounce: () =>
|
|
5864
|
-
default: () =>
|
|
5865
|
-
filterOptions: () =>
|
|
5866
|
-
getAriaAttributes: () =>
|
|
5867
|
-
getContainerClasses: () =>
|
|
5868
|
-
getOptionClasses: () =>
|
|
5869
|
-
getSelectClasses: () =>
|
|
5870
|
-
getVirtualScrollData: () =>
|
|
5871
|
-
groupOptions: () =>
|
|
5872
|
-
handleKeyboardNavigation: () =>
|
|
5873
|
-
handleMultipleSelection: () =>
|
|
5874
|
-
handleSingleSelection: () =>
|
|
5875
|
-
highlightText: () =>
|
|
5876
|
-
normalizeOptions: () =>
|
|
5877
|
-
removeFromSelection: () =>
|
|
5878
|
-
validateValue: () =>
|
|
5879
|
-
}),
|
|
5874
|
+
SELECT_SIZES: () => Fl,
|
|
5875
|
+
SELECT_VARIANTS: () => Il,
|
|
5876
|
+
debounce: () => tu,
|
|
5877
|
+
default: () => ru,
|
|
5878
|
+
filterOptions: () => zl,
|
|
5879
|
+
getAriaAttributes: () => eu,
|
|
5880
|
+
getContainerClasses: () => Zl,
|
|
5881
|
+
getOptionClasses: () => Ql,
|
|
5882
|
+
getSelectClasses: () => Xl,
|
|
5883
|
+
getVirtualScrollData: () => nu,
|
|
5884
|
+
groupOptions: () => Rl,
|
|
5885
|
+
handleKeyboardNavigation: () => Gl,
|
|
5886
|
+
handleMultipleSelection: () => Ul,
|
|
5887
|
+
handleSingleSelection: () => Hl,
|
|
5888
|
+
highlightText: () => Bl,
|
|
5889
|
+
normalizeOptions: () => Ll,
|
|
5890
|
+
removeFromSelection: () => Wl,
|
|
5891
|
+
validateValue: () => $l
|
|
5892
|
+
}), Fl = {
|
|
5880
5893
|
sm: "sm",
|
|
5881
5894
|
md: "md",
|
|
5882
5895
|
lg: "lg"
|
|
5883
|
-
},
|
|
5896
|
+
}, Il = {
|
|
5884
5897
|
outlined: "outlined",
|
|
5885
5898
|
filled: "filled",
|
|
5886
5899
|
standard: "standard"
|
|
@@ -5894,7 +5907,7 @@ var Ml = {
|
|
|
5894
5907
|
END: 35,
|
|
5895
5908
|
TAB: 9
|
|
5896
5909
|
};
|
|
5897
|
-
function
|
|
5910
|
+
function Ll(e = []) {
|
|
5898
5911
|
return e.map((e, t) => typeof e == "string" || typeof e == "number" ? {
|
|
5899
5912
|
value: e,
|
|
5900
5913
|
label: String(e),
|
|
@@ -5910,7 +5923,7 @@ function Il(e = []) {
|
|
|
5910
5923
|
...e
|
|
5911
5924
|
});
|
|
5912
5925
|
}
|
|
5913
|
-
function
|
|
5926
|
+
function Rl(e = []) {
|
|
5914
5927
|
let t = {}, n = [];
|
|
5915
5928
|
e.forEach((e) => {
|
|
5916
5929
|
e.group ? (t[e.group] || (t[e.group] = []), t[e.group].push(e)) : n.push(e);
|
|
@@ -5924,7 +5937,7 @@ function Ll(e = []) {
|
|
|
5924
5937
|
});
|
|
5925
5938
|
}), r;
|
|
5926
5939
|
}
|
|
5927
|
-
function
|
|
5940
|
+
function zl(e = [], t = "", n = {}) {
|
|
5928
5941
|
let { searchFields: r = ["label", "value"], caseSensitive: i = !1, matchStart: a = !1, highlightMatch: o = !1 } = n;
|
|
5929
5942
|
if (!t.trim()) return e;
|
|
5930
5943
|
let s = i ? t : t.toLowerCase();
|
|
@@ -5935,47 +5948,47 @@ function Rl(e = [], t = "", n = {}) {
|
|
|
5935
5948
|
return a ? r.startsWith(s) : r.includes(s);
|
|
5936
5949
|
})).map((e) => o ? {
|
|
5937
5950
|
...e,
|
|
5938
|
-
highlightedLabel:
|
|
5951
|
+
highlightedLabel: Bl(e.label, t, i)
|
|
5939
5952
|
} : e);
|
|
5940
5953
|
}
|
|
5941
|
-
function
|
|
5954
|
+
function Bl(e, t, n = !1) {
|
|
5942
5955
|
if (!t.trim()) return e;
|
|
5943
|
-
let r = n ? "g" : "gi", i = RegExp(`(${
|
|
5956
|
+
let r = n ? "g" : "gi", i = RegExp(`(${Vl(t)})`, r);
|
|
5944
5957
|
return e.replace(i, "<mark>$1</mark>");
|
|
5945
5958
|
}
|
|
5946
|
-
function
|
|
5959
|
+
function Vl(e) {
|
|
5947
5960
|
return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
5948
5961
|
}
|
|
5949
|
-
function
|
|
5962
|
+
function Hl(e, t) {
|
|
5950
5963
|
return e === t ? null : e;
|
|
5951
5964
|
}
|
|
5952
|
-
function
|
|
5965
|
+
function Ul(e, t = [], n = {}) {
|
|
5953
5966
|
let { maxSelections: r = Infinity, allowDeselect: i = !0 } = n;
|
|
5954
5967
|
return t.includes(e) ? i ? t.filter((t) => t !== e) : t : t.length >= r ? t : [...t, e];
|
|
5955
5968
|
}
|
|
5956
|
-
function
|
|
5969
|
+
function Wl(e, t = []) {
|
|
5957
5970
|
return t.filter((t) => t !== e);
|
|
5958
5971
|
}
|
|
5959
|
-
function
|
|
5972
|
+
function Gl(e, t = [], n = -1, r = {}) {
|
|
5960
5973
|
let { loop: i = !0, skipDisabled: a = !0 } = r, o = e.keyCode || e.which, s = n, c = null;
|
|
5961
5974
|
switch (o) {
|
|
5962
5975
|
case G.ARROW_DOWN:
|
|
5963
|
-
e.preventDefault(), s =
|
|
5976
|
+
e.preventDefault(), s = Kl(t, n, 1, {
|
|
5964
5977
|
loop: i,
|
|
5965
5978
|
skipDisabled: a
|
|
5966
5979
|
}), c = "navigate";
|
|
5967
5980
|
break;
|
|
5968
5981
|
case G.ARROW_UP:
|
|
5969
|
-
e.preventDefault(), s =
|
|
5982
|
+
e.preventDefault(), s = Kl(t, n, -1, {
|
|
5970
5983
|
loop: i,
|
|
5971
5984
|
skipDisabled: a
|
|
5972
5985
|
}), c = "navigate";
|
|
5973
5986
|
break;
|
|
5974
5987
|
case G.HOME:
|
|
5975
|
-
e.preventDefault(), s =
|
|
5988
|
+
e.preventDefault(), s = ql(t), c = "navigate";
|
|
5976
5989
|
break;
|
|
5977
5990
|
case G.END:
|
|
5978
|
-
e.preventDefault(), s =
|
|
5991
|
+
e.preventDefault(), s = Jl(t), c = "navigate";
|
|
5979
5992
|
break;
|
|
5980
5993
|
case G.ENTER:
|
|
5981
5994
|
case G.SPACE:
|
|
@@ -5988,7 +6001,7 @@ function Wl(e, t = [], n = -1, r = {}) {
|
|
|
5988
6001
|
c = "close";
|
|
5989
6002
|
break;
|
|
5990
6003
|
default:
|
|
5991
|
-
e.key && e.key.length === 1 && (s =
|
|
6004
|
+
e.key && e.key.length === 1 && (s = Yl(t, e.key, n), c = "navigate");
|
|
5992
6005
|
break;
|
|
5993
6006
|
}
|
|
5994
6007
|
return {
|
|
@@ -5997,24 +6010,24 @@ function Wl(e, t = [], n = -1, r = {}) {
|
|
|
5997
6010
|
option: t[s] || null
|
|
5998
6011
|
};
|
|
5999
6012
|
}
|
|
6000
|
-
function
|
|
6013
|
+
function Kl(e, t, n, r = {}) {
|
|
6001
6014
|
let { loop: i = !0, skipDisabled: a = !0 } = r, o = t + n;
|
|
6002
6015
|
for (; o >= 0 && o < e.length;) {
|
|
6003
6016
|
let t = e[o];
|
|
6004
6017
|
if (!a || !t.disabled) return o;
|
|
6005
6018
|
o += n;
|
|
6006
6019
|
}
|
|
6007
|
-
return i ? n > 0 ?
|
|
6020
|
+
return i ? n > 0 ? ql(e) : Jl(e) : t;
|
|
6008
6021
|
}
|
|
6009
|
-
function
|
|
6022
|
+
function ql(e) {
|
|
6010
6023
|
for (let t = 0; t < e.length; t++) if (!e[t].disabled) return t;
|
|
6011
6024
|
return 0;
|
|
6012
6025
|
}
|
|
6013
|
-
function
|
|
6026
|
+
function Jl(e) {
|
|
6014
6027
|
for (let t = e.length - 1; t >= 0; t--) if (!e[t].disabled) return t;
|
|
6015
6028
|
return e.length - 1;
|
|
6016
6029
|
}
|
|
6017
|
-
function
|
|
6030
|
+
function Yl(e, t, n = -1) {
|
|
6018
6031
|
let r = t.toLowerCase();
|
|
6019
6032
|
for (let t = n + 1; t < e.length; t++) {
|
|
6020
6033
|
let n = e[t];
|
|
@@ -6026,19 +6039,19 @@ function Jl(e, t, n = -1) {
|
|
|
6026
6039
|
}
|
|
6027
6040
|
return n;
|
|
6028
6041
|
}
|
|
6029
|
-
function
|
|
6042
|
+
function Xl(e = {}) {
|
|
6030
6043
|
let { size: t = "md", variant: n = "outlined", disabled: r = !1, error: i = !1, focused: a = !1, open: o = !1, fullWidth: s = !1 } = e, c = ["wc-select"];
|
|
6031
6044
|
return s && c.push("wc-select--full-width"), r && c.push("wc-select--disabled"), c.join(" ");
|
|
6032
6045
|
}
|
|
6033
|
-
function
|
|
6046
|
+
function Zl(e = {}) {
|
|
6034
6047
|
let { size: t = "md", variant: n = "outlined", error: r = !1, focused: i = !1, open: a = !1 } = e, o = ["wc-select__container"];
|
|
6035
6048
|
return o.push(`wc-select__container--${t}`), o.push(`wc-select__container--${n}`), r && o.push("wc-select__container--error"), i && o.push("wc-select__container--focused"), a && o.push("wc-select__container--open"), o.join(" ");
|
|
6036
6049
|
}
|
|
6037
|
-
function
|
|
6050
|
+
function Ql(e = {}, t = !1, n = !1) {
|
|
6038
6051
|
let r = ["wc-select__option"];
|
|
6039
6052
|
return t && r.push("wc-select__option--selected"), n && r.push("wc-select__option--focused"), e.disabled && r.push("wc-select__option--disabled"), r.join(" ");
|
|
6040
6053
|
}
|
|
6041
|
-
function
|
|
6054
|
+
function $l(e, t = [], n = {}) {
|
|
6042
6055
|
let { required: r = !1, multiple: i = !1 } = n, a = [];
|
|
6043
6056
|
if (r && (i ? (!Array.isArray(e) || e.length === 0) && a.push("This field is required") : (e == null || e === "") && a.push("This field is required")), e != null && e !== "") {
|
|
6044
6057
|
let n = t.map((e) => e.value);
|
|
@@ -6054,7 +6067,7 @@ function Ql(e, t = [], n = {}) {
|
|
|
6054
6067
|
errors: a
|
|
6055
6068
|
};
|
|
6056
6069
|
}
|
|
6057
|
-
function
|
|
6070
|
+
function eu(e = {}) {
|
|
6058
6071
|
let { id: t, open: n = !1, multiple: r = !1, disabled: i = !1, error: a = !1, describedBy: o, labelledBy: s } = e;
|
|
6059
6072
|
return {
|
|
6060
6073
|
role: "combobox",
|
|
@@ -6068,13 +6081,13 @@ function $l(e = {}) {
|
|
|
6068
6081
|
"aria-controls": n ? `${t}-listbox` : void 0
|
|
6069
6082
|
};
|
|
6070
6083
|
}
|
|
6071
|
-
function
|
|
6084
|
+
function tu(e, t = 300) {
|
|
6072
6085
|
let n;
|
|
6073
6086
|
return function(...r) {
|
|
6074
6087
|
clearTimeout(n), n = setTimeout(() => e.apply(this, r), t);
|
|
6075
6088
|
};
|
|
6076
6089
|
}
|
|
6077
|
-
function
|
|
6090
|
+
function nu(e = [], t = {}) {
|
|
6078
6091
|
let { containerHeight: n = 250, itemHeight: r = 32, overscan: i = 5 } = t, a = e.length, o = Math.ceil(n / r);
|
|
6079
6092
|
return {
|
|
6080
6093
|
totalItems: a,
|
|
@@ -6091,58 +6104,58 @@ function tu(e = [], t = {}) {
|
|
|
6091
6104
|
}
|
|
6092
6105
|
};
|
|
6093
6106
|
}
|
|
6094
|
-
var
|
|
6095
|
-
SELECT_SIZES:
|
|
6096
|
-
SELECT_VARIANTS:
|
|
6107
|
+
var ru = {
|
|
6108
|
+
SELECT_SIZES: Fl,
|
|
6109
|
+
SELECT_VARIANTS: Il,
|
|
6097
6110
|
KEY_CODES: G,
|
|
6098
|
-
normalizeOptions:
|
|
6099
|
-
groupOptions:
|
|
6100
|
-
filterOptions:
|
|
6101
|
-
highlightText:
|
|
6102
|
-
handleSingleSelection:
|
|
6103
|
-
handleMultipleSelection:
|
|
6104
|
-
removeFromSelection:
|
|
6105
|
-
handleKeyboardNavigation:
|
|
6106
|
-
getSelectClasses:
|
|
6107
|
-
getContainerClasses:
|
|
6108
|
-
getOptionClasses:
|
|
6109
|
-
validateValue:
|
|
6110
|
-
getAriaAttributes:
|
|
6111
|
-
debounce:
|
|
6112
|
-
getVirtualScrollData:
|
|
6113
|
-
},
|
|
6111
|
+
normalizeOptions: Ll,
|
|
6112
|
+
groupOptions: Rl,
|
|
6113
|
+
filterOptions: zl,
|
|
6114
|
+
highlightText: Bl,
|
|
6115
|
+
handleSingleSelection: Hl,
|
|
6116
|
+
handleMultipleSelection: Ul,
|
|
6117
|
+
removeFromSelection: Wl,
|
|
6118
|
+
handleKeyboardNavigation: Gl,
|
|
6119
|
+
getSelectClasses: Xl,
|
|
6120
|
+
getContainerClasses: Zl,
|
|
6121
|
+
getOptionClasses: Ql,
|
|
6122
|
+
validateValue: $l,
|
|
6123
|
+
getAriaAttributes: eu,
|
|
6124
|
+
debounce: tu,
|
|
6125
|
+
getVirtualScrollData: nu
|
|
6126
|
+
}, iu = /* @__PURE__ */ n({
|
|
6114
6127
|
KEY_CODES: () => K,
|
|
6115
|
-
SLIDER_COLORS: () =>
|
|
6116
|
-
SLIDER_ORIENTATIONS: () =>
|
|
6117
|
-
SLIDER_SIZES: () =>
|
|
6118
|
-
clamp: () =>
|
|
6119
|
-
createDragHandler: () =>
|
|
6120
|
-
default: () =>
|
|
6121
|
-
formatValue: () =>
|
|
6122
|
-
generateMarks: () =>
|
|
6123
|
-
getAriaAttributes: () =>
|
|
6124
|
-
getMarkPosition: () =>
|
|
6125
|
-
getPositionFromEvent: () =>
|
|
6126
|
-
getRangeTrackPosition: () =>
|
|
6127
|
-
getSliderClasses: () =>
|
|
6128
|
-
getThumbClasses: () =>
|
|
6129
|
-
getThumbPosition: () =>
|
|
6130
|
-
getValidValue: () =>
|
|
6131
|
-
handleKeyboardNavigation: () =>
|
|
6132
|
-
parseValue: () =>
|
|
6133
|
-
percentageToValue: () =>
|
|
6134
|
-
roundToStep: () =>
|
|
6135
|
-
throttle: () =>
|
|
6136
|
-
validateConfig: () =>
|
|
6137
|
-
valueToPercentage: () =>
|
|
6138
|
-
}),
|
|
6128
|
+
SLIDER_COLORS: () => su,
|
|
6129
|
+
SLIDER_ORIENTATIONS: () => au,
|
|
6130
|
+
SLIDER_SIZES: () => ou,
|
|
6131
|
+
clamp: () => cu,
|
|
6132
|
+
createDragHandler: () => xu,
|
|
6133
|
+
default: () => Du,
|
|
6134
|
+
formatValue: () => yu,
|
|
6135
|
+
generateMarks: () => _u,
|
|
6136
|
+
getAriaAttributes: () => Tu,
|
|
6137
|
+
getMarkPosition: () => vu,
|
|
6138
|
+
getPositionFromEvent: () => pu,
|
|
6139
|
+
getRangeTrackPosition: () => hu,
|
|
6140
|
+
getSliderClasses: () => Su,
|
|
6141
|
+
getThumbClasses: () => Cu,
|
|
6142
|
+
getThumbPosition: () => mu,
|
|
6143
|
+
getValidValue: () => fu,
|
|
6144
|
+
handleKeyboardNavigation: () => gu,
|
|
6145
|
+
parseValue: () => bu,
|
|
6146
|
+
percentageToValue: () => uu,
|
|
6147
|
+
roundToStep: () => du,
|
|
6148
|
+
throttle: () => Eu,
|
|
6149
|
+
validateConfig: () => wu,
|
|
6150
|
+
valueToPercentage: () => lu
|
|
6151
|
+
}), au = {
|
|
6139
6152
|
horizontal: "horizontal",
|
|
6140
6153
|
vertical: "vertical"
|
|
6141
|
-
},
|
|
6154
|
+
}, ou = {
|
|
6142
6155
|
sm: "sm",
|
|
6143
6156
|
md: "md",
|
|
6144
6157
|
lg: "lg"
|
|
6145
|
-
},
|
|
6158
|
+
}, su = {
|
|
6146
6159
|
primary: "primary",
|
|
6147
6160
|
secondary: "secondary",
|
|
6148
6161
|
success: "success",
|
|
@@ -6158,27 +6171,27 @@ var nu = {
|
|
|
6158
6171
|
PAGE_UP: 33,
|
|
6159
6172
|
PAGE_DOWN: 34
|
|
6160
6173
|
};
|
|
6161
|
-
function
|
|
6174
|
+
function cu(e, t, n) {
|
|
6162
6175
|
return Math.min(Math.max(e, t), n);
|
|
6163
6176
|
}
|
|
6164
|
-
function
|
|
6177
|
+
function lu(e, t, n) {
|
|
6165
6178
|
return n === t ? 0 : (e - t) / (n - t) * 100;
|
|
6166
6179
|
}
|
|
6167
|
-
function
|
|
6180
|
+
function uu(e, t, n) {
|
|
6168
6181
|
return t + e / 100 * (n - t);
|
|
6169
6182
|
}
|
|
6170
|
-
function
|
|
6183
|
+
function du(e, t, n = 0) {
|
|
6171
6184
|
return t <= 0 ? e : n + Math.round((e - n) / t) * t;
|
|
6172
6185
|
}
|
|
6173
|
-
function
|
|
6174
|
-
return
|
|
6186
|
+
function fu(e, t, n, r = 1) {
|
|
6187
|
+
return du(cu(e, t, n), r, t);
|
|
6175
6188
|
}
|
|
6176
|
-
function
|
|
6189
|
+
function pu(e, t, n = "horizontal") {
|
|
6177
6190
|
let r = t.getBoundingClientRect(), i = e.clientX || e.touches && e.touches[0].clientX, a = e.clientY || e.touches && e.touches[0].clientY, o;
|
|
6178
|
-
return o = n === "vertical" ? (r.bottom - a) / r.height * 100 : (i - r.left) / r.width * 100,
|
|
6191
|
+
return o = n === "vertical" ? (r.bottom - a) / r.height * 100 : (i - r.left) / r.width * 100, cu(o, 0, 100);
|
|
6179
6192
|
}
|
|
6180
|
-
function
|
|
6181
|
-
let i =
|
|
6193
|
+
function mu(e, t, n, r = "horizontal") {
|
|
6194
|
+
let i = lu(e, t, n);
|
|
6182
6195
|
return r === "vertical" ? {
|
|
6183
6196
|
bottom: `${i}%`,
|
|
6184
6197
|
left: "50%"
|
|
@@ -6187,8 +6200,8 @@ function pu(e, t, n, r = "horizontal") {
|
|
|
6187
6200
|
top: "50%"
|
|
6188
6201
|
};
|
|
6189
6202
|
}
|
|
6190
|
-
function
|
|
6191
|
-
let a =
|
|
6203
|
+
function hu(e, t, n, r, i = "horizontal") {
|
|
6204
|
+
let a = lu(e, n, r), o = lu(t, n, r) - a;
|
|
6192
6205
|
return i === "vertical" ? {
|
|
6193
6206
|
bottom: `${a}%`,
|
|
6194
6207
|
height: `${o}%`,
|
|
@@ -6199,7 +6212,7 @@ function mu(e, t, n, r, i = "horizontal") {
|
|
|
6199
6212
|
height: "100%"
|
|
6200
6213
|
};
|
|
6201
6214
|
}
|
|
6202
|
-
function
|
|
6215
|
+
function gu(e, t, n = {}) {
|
|
6203
6216
|
let { min: r = 0, max: i = 100, step: a = 1, orientation: o = "horizontal", largeStep: s = a * 10 } = n, c = e.keyCode || e.which, l = t;
|
|
6204
6217
|
switch (c) {
|
|
6205
6218
|
case K.ARROW_LEFT:
|
|
@@ -6224,9 +6237,9 @@ function hu(e, t, n = {}) {
|
|
|
6224
6237
|
break;
|
|
6225
6238
|
default: return null;
|
|
6226
6239
|
}
|
|
6227
|
-
return e.preventDefault(),
|
|
6240
|
+
return e.preventDefault(), fu(l, r, i, a);
|
|
6228
6241
|
}
|
|
6229
|
-
function
|
|
6242
|
+
function _u(e, t, n) {
|
|
6230
6243
|
if (typeof n == "number") {
|
|
6231
6244
|
let r = n, i = (t - e) / (r - 1);
|
|
6232
6245
|
return Array.from({ length: r }, (t, n) => ({
|
|
@@ -6239,8 +6252,8 @@ function gu(e, t, n) {
|
|
|
6239
6252
|
label: e
|
|
6240
6253
|
} : e) : [];
|
|
6241
6254
|
}
|
|
6242
|
-
function
|
|
6243
|
-
let i =
|
|
6255
|
+
function vu(e, t, n, r = "horizontal") {
|
|
6256
|
+
let i = lu(e, t, n);
|
|
6244
6257
|
return r === "vertical" ? {
|
|
6245
6258
|
bottom: `${i}%`,
|
|
6246
6259
|
left: "50%"
|
|
@@ -6249,22 +6262,22 @@ function _u(e, t, n, r = "horizontal") {
|
|
|
6249
6262
|
top: "50%"
|
|
6250
6263
|
};
|
|
6251
6264
|
}
|
|
6252
|
-
function
|
|
6265
|
+
function yu(e, t = {}) {
|
|
6253
6266
|
let { precision: n = 0, prefix: r = "", suffix: i = "", formatter: a = null } = t;
|
|
6254
6267
|
return a && typeof a == "function" ? a(e) : `${r}${Number(e).toFixed(n)}${i}`;
|
|
6255
6268
|
}
|
|
6256
|
-
function
|
|
6269
|
+
function bu(e, t = 0) {
|
|
6257
6270
|
let n = parseFloat(e);
|
|
6258
6271
|
return isNaN(n) ? t : n;
|
|
6259
6272
|
}
|
|
6260
|
-
function
|
|
6273
|
+
function xu(e = {}) {
|
|
6261
6274
|
let { onDragStart: t = () => {}, onDrag: n = () => {}, onDragEnd: r = () => {}, trackElement: i = null, orientation: a = "horizontal", min: o = 0, max: s = 100, step: c = 1 } = e, l = !1, u = 0, d = (e) => {
|
|
6262
6275
|
l = !0, u = m(e), t(u, e), document.addEventListener("mousemove", f), document.addEventListener("mouseup", p), document.addEventListener("touchmove", f, { passive: !1 }), document.addEventListener("touchend", p);
|
|
6263
6276
|
}, f = (e) => {
|
|
6264
6277
|
l && (e.preventDefault(), n(m(e), e));
|
|
6265
6278
|
}, p = (e) => {
|
|
6266
6279
|
l && (l = !1, r(m(e), e), document.removeEventListener("mousemove", f), document.removeEventListener("mouseup", p), document.removeEventListener("touchmove", f), document.removeEventListener("touchend", p));
|
|
6267
|
-
}, m = (e) => i ?
|
|
6280
|
+
}, m = (e) => i ? fu(uu(pu(e, i, a), o, s), o, s, c) : u;
|
|
6268
6281
|
return {
|
|
6269
6282
|
handleStart: d,
|
|
6270
6283
|
handleMove: f,
|
|
@@ -6272,15 +6285,15 @@ function bu(e = {}) {
|
|
|
6272
6285
|
isDragging: () => l
|
|
6273
6286
|
};
|
|
6274
6287
|
}
|
|
6275
|
-
function
|
|
6288
|
+
function Su(e = {}) {
|
|
6276
6289
|
let { size: t = "md", color: n = "primary", orientation: r = "horizontal", disabled: i = !1, variant: a = "default" } = e, o = ["wc-slider"];
|
|
6277
6290
|
return o.push(`wc-slider--${t}`), o.push(`wc-slider--${n}`), o.push(`wc-slider--${r}`), i && o.push("wc-slider--disabled"), a !== "default" && o.push(`wc-slider--${a}`), o.join(" ");
|
|
6278
6291
|
}
|
|
6279
|
-
function
|
|
6292
|
+
function Cu(e = {}) {
|
|
6280
6293
|
let { dragging: t = !1, focused: n = !1, position: r = "single" } = e, i = ["wc-slider__thumb"];
|
|
6281
6294
|
return t && i.push("wc-slider__thumb--dragging"), n && i.push("wc-slider__thumb--focused"), r !== "single" && i.push(`wc-slider__thumb--${r}`), i.join(" ");
|
|
6282
6295
|
}
|
|
6283
|
-
function
|
|
6296
|
+
function wu(e = {}) {
|
|
6284
6297
|
let { min: t = 0, max: n = 100, step: r = 1, value: i } = e, a = [];
|
|
6285
6298
|
if (t >= n && a.push("Minimum value must be less than maximum value"), r <= 0 && a.push("Step must be greater than 0"), i !== void 0) if (Array.isArray(i)) if (i.length !== 2) a.push("Range value must be an array of exactly 2 values");
|
|
6286
6299
|
else {
|
|
@@ -6293,14 +6306,14 @@ function Cu(e = {}) {
|
|
|
6293
6306
|
errors: a
|
|
6294
6307
|
};
|
|
6295
6308
|
}
|
|
6296
|
-
function
|
|
6309
|
+
function Tu(e = {}) {
|
|
6297
6310
|
let { value: t, min: n = 0, max: r = 100, step: i = 1, orientation: a = "horizontal", disabled: o = !1, labelledBy: s, describedBy: c } = e;
|
|
6298
6311
|
return {
|
|
6299
6312
|
role: "slider",
|
|
6300
6313
|
"aria-valuemin": n,
|
|
6301
6314
|
"aria-valuemax": r,
|
|
6302
6315
|
"aria-valuenow": t,
|
|
6303
|
-
"aria-valuetext":
|
|
6316
|
+
"aria-valuetext": yu(t),
|
|
6304
6317
|
"aria-orientation": a,
|
|
6305
6318
|
"aria-disabled": o || void 0,
|
|
6306
6319
|
"aria-labelledby": s,
|
|
@@ -6308,7 +6321,7 @@ function wu(e = {}) {
|
|
|
6308
6321
|
tabIndex: o ? -1 : 0
|
|
6309
6322
|
};
|
|
6310
6323
|
}
|
|
6311
|
-
function
|
|
6324
|
+
function Eu(e, t = 16) {
|
|
6312
6325
|
let n, r = 0;
|
|
6313
6326
|
return function(...i) {
|
|
6314
6327
|
let a = Date.now();
|
|
@@ -6317,62 +6330,62 @@ function Tu(e, t = 16) {
|
|
|
6317
6330
|
}, t - (a - r)));
|
|
6318
6331
|
};
|
|
6319
6332
|
}
|
|
6320
|
-
var
|
|
6321
|
-
SLIDER_ORIENTATIONS:
|
|
6322
|
-
SLIDER_SIZES:
|
|
6323
|
-
SLIDER_COLORS:
|
|
6333
|
+
var Du = {
|
|
6334
|
+
SLIDER_ORIENTATIONS: au,
|
|
6335
|
+
SLIDER_SIZES: ou,
|
|
6336
|
+
SLIDER_COLORS: su,
|
|
6324
6337
|
KEY_CODES: K,
|
|
6325
|
-
clamp:
|
|
6326
|
-
valueToPercentage:
|
|
6327
|
-
percentageToValue:
|
|
6328
|
-
roundToStep:
|
|
6329
|
-
getValidValue:
|
|
6330
|
-
getPositionFromEvent:
|
|
6331
|
-
getThumbPosition:
|
|
6332
|
-
getRangeTrackPosition:
|
|
6333
|
-
handleKeyboardNavigation:
|
|
6334
|
-
generateMarks:
|
|
6335
|
-
getMarkPosition:
|
|
6336
|
-
formatValue:
|
|
6337
|
-
parseValue:
|
|
6338
|
-
createDragHandler:
|
|
6339
|
-
getSliderClasses:
|
|
6340
|
-
getThumbClasses:
|
|
6341
|
-
validateConfig:
|
|
6342
|
-
getAriaAttributes:
|
|
6343
|
-
throttle:
|
|
6344
|
-
},
|
|
6345
|
-
ANIMATION_TYPES: () =>
|
|
6346
|
-
COLOR_MAP: () =>
|
|
6347
|
-
DEFAULT_DURATION: () =>
|
|
6348
|
-
ICON_MAP: () =>
|
|
6338
|
+
clamp: cu,
|
|
6339
|
+
valueToPercentage: lu,
|
|
6340
|
+
percentageToValue: uu,
|
|
6341
|
+
roundToStep: du,
|
|
6342
|
+
getValidValue: fu,
|
|
6343
|
+
getPositionFromEvent: pu,
|
|
6344
|
+
getThumbPosition: mu,
|
|
6345
|
+
getRangeTrackPosition: hu,
|
|
6346
|
+
handleKeyboardNavigation: gu,
|
|
6347
|
+
generateMarks: _u,
|
|
6348
|
+
getMarkPosition: vu,
|
|
6349
|
+
formatValue: yu,
|
|
6350
|
+
parseValue: bu,
|
|
6351
|
+
createDragHandler: xu,
|
|
6352
|
+
getSliderClasses: Su,
|
|
6353
|
+
getThumbClasses: Cu,
|
|
6354
|
+
validateConfig: wu,
|
|
6355
|
+
getAriaAttributes: Tu,
|
|
6356
|
+
throttle: Eu
|
|
6357
|
+
}, Ou = /* @__PURE__ */ n({
|
|
6358
|
+
ANIMATION_TYPES: () => ku,
|
|
6359
|
+
COLOR_MAP: () => ju,
|
|
6360
|
+
DEFAULT_DURATION: () => Mu,
|
|
6361
|
+
ICON_MAP: () => Au,
|
|
6349
6362
|
PERSIST_DURATION: () => -1,
|
|
6350
6363
|
SNACKBAR_POSITIONS: () => q,
|
|
6351
6364
|
SNACKBAR_SEVERITIES: () => J,
|
|
6352
6365
|
SNACKBAR_VARIANTS: () => Y,
|
|
6353
|
-
SnackbarManager: () =>
|
|
6354
|
-
calculateProgress: () =>
|
|
6355
|
-
createErrorSnackbar: () =>
|
|
6356
|
-
debounceSnackbar: () =>
|
|
6357
|
-
formatDuration: () =>
|
|
6358
|
-
getAnimationByPosition: () =>
|
|
6359
|
-
getAriaAttributes: () =>
|
|
6360
|
-
getContainerClasses: () =>
|
|
6366
|
+
SnackbarManager: () => Nu,
|
|
6367
|
+
calculateProgress: () => Yu,
|
|
6368
|
+
createErrorSnackbar: () => Qu,
|
|
6369
|
+
debounceSnackbar: () => td,
|
|
6370
|
+
formatDuration: () => $u,
|
|
6371
|
+
getAnimationByPosition: () => Ju,
|
|
6372
|
+
getAriaAttributes: () => Zu,
|
|
6373
|
+
getContainerClasses: () => Ku,
|
|
6361
6374
|
getDefaultManager: () => X,
|
|
6362
|
-
getSnackbarClasses: () =>
|
|
6363
|
-
getSnackbarColors: () =>
|
|
6364
|
-
getSnackbarIcon: () =>
|
|
6365
|
-
hide: () =>
|
|
6366
|
-
hideAll: () =>
|
|
6367
|
-
isValidPosition: () =>
|
|
6368
|
-
isValidSeverity: () =>
|
|
6369
|
-
show: () =>
|
|
6370
|
-
showError: () =>
|
|
6371
|
-
showInfo: () =>
|
|
6372
|
-
showSuccess: () =>
|
|
6373
|
-
showWarning: () =>
|
|
6374
|
-
truncateMessage: () =>
|
|
6375
|
-
validateOptions: () =>
|
|
6375
|
+
getSnackbarClasses: () => qu,
|
|
6376
|
+
getSnackbarColors: () => Uu,
|
|
6377
|
+
getSnackbarIcon: () => Hu,
|
|
6378
|
+
hide: () => Bu,
|
|
6379
|
+
hideAll: () => Vu,
|
|
6380
|
+
isValidPosition: () => Wu,
|
|
6381
|
+
isValidSeverity: () => Gu,
|
|
6382
|
+
show: () => zu,
|
|
6383
|
+
showError: () => Lu,
|
|
6384
|
+
showInfo: () => Ru,
|
|
6385
|
+
showSuccess: () => Fu,
|
|
6386
|
+
showWarning: () => Iu,
|
|
6387
|
+
truncateMessage: () => ed,
|
|
6388
|
+
validateOptions: () => Xu
|
|
6376
6389
|
}), q = {
|
|
6377
6390
|
topLeft: "top-left",
|
|
6378
6391
|
topCenter: "top-center",
|
|
@@ -6392,18 +6405,18 @@ var Eu = {
|
|
|
6392
6405
|
minimal: "minimal",
|
|
6393
6406
|
elevated: "elevated",
|
|
6394
6407
|
standard: "standard"
|
|
6395
|
-
},
|
|
6408
|
+
}, ku = {
|
|
6396
6409
|
slideUp: "slide-up",
|
|
6397
6410
|
slideDown: "slide-down",
|
|
6398
6411
|
slideLeft: "slide-left",
|
|
6399
6412
|
slideRight: "slide-right",
|
|
6400
6413
|
fade: "fade"
|
|
6401
|
-
},
|
|
6414
|
+
}, Au = {
|
|
6402
6415
|
success: "✓",
|
|
6403
6416
|
info: "ℹ",
|
|
6404
6417
|
warning: "⚠",
|
|
6405
6418
|
error: "✕"
|
|
6406
|
-
},
|
|
6419
|
+
}, ju = {
|
|
6407
6420
|
info: {
|
|
6408
6421
|
bg: "#e8f4ff",
|
|
6409
6422
|
text: "#0070f3",
|
|
@@ -6424,7 +6437,7 @@ var Eu = {
|
|
|
6424
6437
|
text: "#b91c1c",
|
|
6425
6438
|
border: "#ef4444"
|
|
6426
6439
|
}
|
|
6427
|
-
},
|
|
6440
|
+
}, Mu = 6e3, Nu = class {
|
|
6428
6441
|
constructor(e = {}) {
|
|
6429
6442
|
this.snackbars = /* @__PURE__ */ new Map(), this.queue = [], this.maxVisible = e.maxVisible || 5, this.defaultPosition = e.defaultPosition || q.bottomLeft, this.defaultDuration = e.defaultDuration || 6e3, this.nextId = 1, this.containers = /* @__PURE__ */ new Map();
|
|
6430
6443
|
}
|
|
@@ -6505,63 +6518,63 @@ var Eu = {
|
|
|
6505
6518
|
getSnackbar(e) {
|
|
6506
6519
|
return this.snackbars.get(e);
|
|
6507
6520
|
}
|
|
6508
|
-
},
|
|
6521
|
+
}, Pu = null;
|
|
6509
6522
|
function X() {
|
|
6510
|
-
return
|
|
6523
|
+
return Pu ||= new Nu(), Pu;
|
|
6511
6524
|
}
|
|
6512
|
-
function
|
|
6525
|
+
function Fu(e, t = {}) {
|
|
6513
6526
|
return X().show({
|
|
6514
6527
|
message: e,
|
|
6515
6528
|
severity: J.success,
|
|
6516
6529
|
...t
|
|
6517
6530
|
});
|
|
6518
6531
|
}
|
|
6519
|
-
function
|
|
6532
|
+
function Iu(e, t = {}) {
|
|
6520
6533
|
return X().show({
|
|
6521
6534
|
message: e,
|
|
6522
6535
|
severity: J.warning,
|
|
6523
6536
|
...t
|
|
6524
6537
|
});
|
|
6525
6538
|
}
|
|
6526
|
-
function
|
|
6539
|
+
function Lu(e, t = {}) {
|
|
6527
6540
|
return X().show({
|
|
6528
6541
|
message: e,
|
|
6529
6542
|
severity: J.error,
|
|
6530
6543
|
...t
|
|
6531
6544
|
});
|
|
6532
6545
|
}
|
|
6533
|
-
function
|
|
6546
|
+
function Ru(e, t = {}) {
|
|
6534
6547
|
return X().show({
|
|
6535
6548
|
message: e,
|
|
6536
6549
|
severity: J.info,
|
|
6537
6550
|
...t
|
|
6538
6551
|
});
|
|
6539
6552
|
}
|
|
6540
|
-
function
|
|
6553
|
+
function zu(e, t = {}) {
|
|
6541
6554
|
return X().show({
|
|
6542
6555
|
message: e,
|
|
6543
6556
|
...t
|
|
6544
6557
|
});
|
|
6545
6558
|
}
|
|
6546
|
-
function
|
|
6559
|
+
function Bu(e) {
|
|
6547
6560
|
X().hide(e);
|
|
6548
6561
|
}
|
|
6549
|
-
function
|
|
6562
|
+
function Vu() {
|
|
6550
6563
|
X().hideAll();
|
|
6551
6564
|
}
|
|
6552
|
-
function Vu(e) {
|
|
6553
|
-
return ku[e] || ku.info;
|
|
6554
|
-
}
|
|
6555
6565
|
function Hu(e) {
|
|
6556
6566
|
return Au[e] || Au.info;
|
|
6557
6567
|
}
|
|
6558
6568
|
function Uu(e) {
|
|
6559
|
-
return
|
|
6569
|
+
return ju[e] || ju.info;
|
|
6560
6570
|
}
|
|
6561
6571
|
function Wu(e) {
|
|
6572
|
+
return Object.values(q).includes(e);
|
|
6573
|
+
}
|
|
6574
|
+
function Gu(e) {
|
|
6562
6575
|
return Object.values(J).includes(e);
|
|
6563
6576
|
}
|
|
6564
|
-
function
|
|
6577
|
+
function Ku(e = {}) {
|
|
6565
6578
|
let { position: t = q.bottomLeft } = e, n = {
|
|
6566
6579
|
[q.topLeft]: "top-4 left-4 items-start",
|
|
6567
6580
|
[q.topCenter]: "top-4 left-1/2 transform -translate-x-1/2 items-center",
|
|
@@ -6572,7 +6585,7 @@ function Gu(e = {}) {
|
|
|
6572
6585
|
};
|
|
6573
6586
|
return `fixed z-50 pointer-events-none flex flex-col gap-2 ${n[t] || n[q.bottomLeft]}`;
|
|
6574
6587
|
}
|
|
6575
|
-
function
|
|
6588
|
+
function qu(e = {}) {
|
|
6576
6589
|
let { severity: t = J.info, variant: n = Y.filled, className: r = "" } = e, i = "";
|
|
6577
6590
|
return i = n === Y.filled ? {
|
|
6578
6591
|
[J.success]: "bg-success-500 text-white border border-success-500",
|
|
@@ -6586,7 +6599,7 @@ function Ku(e = {}) {
|
|
|
6586
6599
|
[J.error]: "bg-white dark:bg-neutral-800 border-error-500 text-error-600 dark:text-error-400 border-l-4"
|
|
6587
6600
|
}[t] || "bg-white dark:bg-neutral-800 border border-neutral-200 dark:border-neutral-700 text-neutral-900 dark:text-neutral-100", `pointer-events-auto max-w-sm w-full rounded-lg shadow-lg p-4 transition-all duration-300 ease-in-out ${i} ${r}`.trim();
|
|
6588
6601
|
}
|
|
6589
|
-
function
|
|
6602
|
+
function Ju(e, t = "enter") {
|
|
6590
6603
|
return {
|
|
6591
6604
|
[q.topLeft]: t === "enter" ? "animate-slide-down" : "animate-slide-up",
|
|
6592
6605
|
[q.topCenter]: t === "enter" ? "animate-slide-down" : "animate-slide-up",
|
|
@@ -6596,14 +6609,14 @@ function qu(e, t = "enter") {
|
|
|
6596
6609
|
[q.bottomRight]: t === "enter" ? "animate-slide-up" : "animate-slide-down"
|
|
6597
6610
|
}[e] || "animate-fade";
|
|
6598
6611
|
}
|
|
6599
|
-
function
|
|
6612
|
+
function Yu(e, t) {
|
|
6600
6613
|
return t <= 0 ? 0 : Math.max(0, Math.min(100, 100 - e / t * 100));
|
|
6601
6614
|
}
|
|
6602
|
-
function
|
|
6615
|
+
function Xu(e = {}) {
|
|
6603
6616
|
let t = { ...e };
|
|
6604
|
-
return
|
|
6617
|
+
return Wu(t.position) || (t.position = q.bottomLeft), Gu(t.severity) || (t.severity = J.info), Object.values(Y).includes(t.variant) || (t.variant = Y.filled), (typeof t.duration != "number" || t.duration < 0) && (t.duration = Mu), t.closable = t.closable !== !1, t.showIcon = t.showIcon !== !1, t.showProgress = !!t.showProgress, t.onClose && typeof t.onClose != "function" && delete t.onClose, t.onAction && typeof t.onAction != "function" && delete t.onAction, t;
|
|
6605
6618
|
}
|
|
6606
|
-
function
|
|
6619
|
+
function Zu(e = {}) {
|
|
6607
6620
|
let { severity: t = J.info, message: n = "", title: r = "" } = e;
|
|
6608
6621
|
return {
|
|
6609
6622
|
role: {
|
|
@@ -6617,21 +6630,21 @@ function Xu(e = {}) {
|
|
|
6617
6630
|
"aria-label": r || n || `${t} notification`
|
|
6618
6631
|
};
|
|
6619
6632
|
}
|
|
6620
|
-
function
|
|
6621
|
-
return
|
|
6633
|
+
function Qu(e, t = {}) {
|
|
6634
|
+
return Lu(e.message || "An unexpected error occurred", {
|
|
6622
6635
|
title: t.title || "Error",
|
|
6623
6636
|
duration: t.duration || 8e3,
|
|
6624
6637
|
showIcon: !0,
|
|
6625
6638
|
...t
|
|
6626
6639
|
});
|
|
6627
6640
|
}
|
|
6628
|
-
function
|
|
6641
|
+
function $u(e) {
|
|
6629
6642
|
return e < 0 ? "Persistent" : e < 1e3 ? `${e}ms` : `${(e / 1e3).toFixed(1)}s`;
|
|
6630
6643
|
}
|
|
6631
|
-
function
|
|
6644
|
+
function ed(e, t = 200) {
|
|
6632
6645
|
return typeof e == "string" ? e.length <= t ? e : e.substring(0, t - 3) + "..." : "";
|
|
6633
6646
|
}
|
|
6634
|
-
function
|
|
6647
|
+
function td(e, t = 500) {
|
|
6635
6648
|
let n, r = /* @__PURE__ */ new Map();
|
|
6636
6649
|
return function(...i) {
|
|
6637
6650
|
let [a] = i, o = Date.now();
|
|
@@ -6642,19 +6655,19 @@ function ed(e, t = 500) {
|
|
|
6642
6655
|
}
|
|
6643
6656
|
//#endregion
|
|
6644
6657
|
//#region src/components/Status/utils.js
|
|
6645
|
-
var
|
|
6646
|
-
getAnimationType: () =>
|
|
6647
|
-
getSafeStatus: () =>
|
|
6648
|
-
getStatusClasses: () =>
|
|
6649
|
-
getStatusColor: () =>
|
|
6650
|
-
getStatusText: () =>
|
|
6651
|
-
isValidSize: () =>
|
|
6652
|
-
isValidStatus: () =>
|
|
6653
|
-
statusConfig: () =>
|
|
6654
|
-
validAnimationTypes: () =>
|
|
6655
|
-
validSizes: () =>
|
|
6656
|
-
validStatuses: () =>
|
|
6657
|
-
}),
|
|
6658
|
+
var nd = /* @__PURE__ */ n({
|
|
6659
|
+
getAnimationType: () => pd,
|
|
6660
|
+
getSafeStatus: () => ld,
|
|
6661
|
+
getStatusClasses: () => ud,
|
|
6662
|
+
getStatusColor: () => fd,
|
|
6663
|
+
getStatusText: () => dd,
|
|
6664
|
+
isValidSize: () => cd,
|
|
6665
|
+
isValidStatus: () => sd,
|
|
6666
|
+
statusConfig: () => od,
|
|
6667
|
+
validAnimationTypes: () => ad,
|
|
6668
|
+
validSizes: () => id,
|
|
6669
|
+
validStatuses: () => rd
|
|
6670
|
+
}), rd = [
|
|
6658
6671
|
"default",
|
|
6659
6672
|
"success",
|
|
6660
6673
|
"error",
|
|
@@ -6663,11 +6676,11 @@ var td = /* @__PURE__ */ n({
|
|
|
6663
6676
|
"pending",
|
|
6664
6677
|
"processing",
|
|
6665
6678
|
"cancelled"
|
|
6666
|
-
],
|
|
6679
|
+
], id = [
|
|
6667
6680
|
"sm",
|
|
6668
6681
|
"md",
|
|
6669
6682
|
"lg"
|
|
6670
|
-
],
|
|
6683
|
+
], ad = [
|
|
6671
6684
|
"auto",
|
|
6672
6685
|
"pulse",
|
|
6673
6686
|
"spin",
|
|
@@ -6677,7 +6690,7 @@ var td = /* @__PURE__ */ n({
|
|
|
6677
6690
|
"breathe",
|
|
6678
6691
|
"ripple",
|
|
6679
6692
|
"glow"
|
|
6680
|
-
],
|
|
6693
|
+
], od = {
|
|
6681
6694
|
default: {
|
|
6682
6695
|
text: "默认",
|
|
6683
6696
|
color: "var(--wc-text-tertiary)"
|
|
@@ -6711,35 +6724,35 @@ var td = /* @__PURE__ */ n({
|
|
|
6711
6724
|
color: "var(--wc-text-disabled)"
|
|
6712
6725
|
}
|
|
6713
6726
|
};
|
|
6714
|
-
function od(e) {
|
|
6715
|
-
return nd.includes(e);
|
|
6716
|
-
}
|
|
6717
6727
|
function sd(e) {
|
|
6718
6728
|
return rd.includes(e);
|
|
6719
6729
|
}
|
|
6720
6730
|
function cd(e) {
|
|
6721
|
-
return
|
|
6731
|
+
return id.includes(e);
|
|
6732
|
+
}
|
|
6733
|
+
function ld(e) {
|
|
6734
|
+
return sd(e) ? e : "default";
|
|
6722
6735
|
}
|
|
6723
|
-
function
|
|
6724
|
-
let o =
|
|
6736
|
+
function ud({ status: e, size: t, showText: n, animated: r, animationType: i = "auto", className: a }) {
|
|
6737
|
+
let o = ld(e), s = [
|
|
6725
6738
|
"wc-status",
|
|
6726
6739
|
`wc-status--${o}`,
|
|
6727
6740
|
`wc-status--${t}`
|
|
6728
6741
|
];
|
|
6729
6742
|
if (n && s.push("wc-status--with-text"), r) {
|
|
6730
|
-
let e =
|
|
6743
|
+
let e = pd(o, i);
|
|
6731
6744
|
s.push("wc-status--animated", `wc-status--${e}`);
|
|
6732
6745
|
}
|
|
6733
6746
|
return a && s.push(a), s.filter(Boolean).join(" ");
|
|
6734
6747
|
}
|
|
6735
|
-
function ud(e) {
|
|
6736
|
-
return ad[e]?.text || ad.default.text;
|
|
6737
|
-
}
|
|
6738
6748
|
function dd(e) {
|
|
6739
|
-
return
|
|
6749
|
+
return od[e]?.text || od.default.text;
|
|
6750
|
+
}
|
|
6751
|
+
function fd(e) {
|
|
6752
|
+
return (od[e] || od.default).color;
|
|
6740
6753
|
}
|
|
6741
|
-
function
|
|
6742
|
-
return t !== "auto" &&
|
|
6754
|
+
function pd(e, t = "auto") {
|
|
6755
|
+
return t !== "auto" && ad.includes(t) ? t : {
|
|
6743
6756
|
processing: "spin",
|
|
6744
6757
|
pending: "pulse",
|
|
6745
6758
|
success: "bounce",
|
|
@@ -6752,47 +6765,47 @@ function fd(e, t = "auto") {
|
|
|
6752
6765
|
}
|
|
6753
6766
|
//#endregion
|
|
6754
6767
|
//#region src/components/Switch/utils.js
|
|
6755
|
-
var
|
|
6756
|
-
KEY_CODES: () =>
|
|
6757
|
-
SWITCH_COLORS: () =>
|
|
6758
|
-
SWITCH_SIZES: () =>
|
|
6759
|
-
SWITCH_VARIANTS: () =>
|
|
6760
|
-
createFormField: () =>
|
|
6761
|
-
debounceChange: () =>
|
|
6762
|
-
default: () =>
|
|
6763
|
-
extractFormData: () =>
|
|
6764
|
-
formatValue: () =>
|
|
6765
|
-
getAccessibilityDescription: () =>
|
|
6766
|
-
getAriaAttributes: () =>
|
|
6767
|
-
getSwitchClasses: () =>
|
|
6768
|
-
getSwitchState: () =>
|
|
6769
|
-
getThumbClasses: () =>
|
|
6770
|
-
getThumbPosition: () =>
|
|
6771
|
-
getTrackBackground: () =>
|
|
6772
|
-
getTrackClasses: () =>
|
|
6773
|
-
handleBlur: () =>
|
|
6774
|
-
handleClick: () =>
|
|
6775
|
-
handleFocus: () =>
|
|
6776
|
-
handleKeyDown: () =>
|
|
6777
|
-
handleStateChange: () =>
|
|
6778
|
-
isInteractive: () =>
|
|
6779
|
-
parseValue: () =>
|
|
6780
|
-
shouldShowLoading: () =>
|
|
6781
|
-
throttleChange: () =>
|
|
6782
|
-
toggleState: () =>
|
|
6783
|
-
validateProps: () =>
|
|
6784
|
-
validateValue: () =>
|
|
6785
|
-
}),
|
|
6768
|
+
var md = /* @__PURE__ */ n({
|
|
6769
|
+
KEY_CODES: () => vd,
|
|
6770
|
+
SWITCH_COLORS: () => gd,
|
|
6771
|
+
SWITCH_SIZES: () => hd,
|
|
6772
|
+
SWITCH_VARIANTS: () => _d,
|
|
6773
|
+
createFormField: () => Fd,
|
|
6774
|
+
debounceChange: () => Ld,
|
|
6775
|
+
default: () => Ud,
|
|
6776
|
+
extractFormData: () => Id,
|
|
6777
|
+
formatValue: () => zd,
|
|
6778
|
+
getAccessibilityDescription: () => Md,
|
|
6779
|
+
getAriaAttributes: () => jd,
|
|
6780
|
+
getSwitchClasses: () => Ed,
|
|
6781
|
+
getSwitchState: () => xd,
|
|
6782
|
+
getThumbClasses: () => Od,
|
|
6783
|
+
getThumbPosition: () => Nd,
|
|
6784
|
+
getTrackBackground: () => Pd,
|
|
6785
|
+
getTrackClasses: () => Dd,
|
|
6786
|
+
handleBlur: () => Td,
|
|
6787
|
+
handleClick: () => Sd,
|
|
6788
|
+
handleFocus: () => wd,
|
|
6789
|
+
handleKeyDown: () => Cd,
|
|
6790
|
+
handleStateChange: () => bd,
|
|
6791
|
+
isInteractive: () => Hd,
|
|
6792
|
+
parseValue: () => Bd,
|
|
6793
|
+
shouldShowLoading: () => Vd,
|
|
6794
|
+
throttleChange: () => Rd,
|
|
6795
|
+
toggleState: () => yd,
|
|
6796
|
+
validateProps: () => kd,
|
|
6797
|
+
validateValue: () => Ad
|
|
6798
|
+
}), hd = {
|
|
6786
6799
|
sm: "sm",
|
|
6787
6800
|
md: "md",
|
|
6788
6801
|
lg: "lg"
|
|
6789
|
-
},
|
|
6802
|
+
}, gd = {
|
|
6790
6803
|
primary: "primary",
|
|
6791
6804
|
secondary: "secondary",
|
|
6792
6805
|
success: "success",
|
|
6793
6806
|
warning: "warning",
|
|
6794
6807
|
error: "error"
|
|
6795
|
-
},
|
|
6808
|
+
}, _d = {
|
|
6796
6809
|
default: "default",
|
|
6797
6810
|
rounded: "rounded",
|
|
6798
6811
|
square: "square",
|
|
@@ -6800,18 +6813,18 @@ var pd = /* @__PURE__ */ n({
|
|
|
6800
6813
|
outline: "outline",
|
|
6801
6814
|
ios: "ios",
|
|
6802
6815
|
material: "material"
|
|
6803
|
-
},
|
|
6816
|
+
}, vd = {
|
|
6804
6817
|
SPACE: 32,
|
|
6805
6818
|
ENTER: 13
|
|
6806
6819
|
};
|
|
6807
|
-
function
|
|
6820
|
+
function yd(e, t = !1) {
|
|
6808
6821
|
return t ? e : !e;
|
|
6809
6822
|
}
|
|
6810
|
-
function
|
|
6823
|
+
function bd(e, t, n = {}) {
|
|
6811
6824
|
let { disabled: r = !1, loading: i = !1 } = n;
|
|
6812
6825
|
return r || i ? !1 : typeof t == "function" ? (t(e), !0) : !1;
|
|
6813
6826
|
}
|
|
6814
|
-
function
|
|
6827
|
+
function xd(e = {}) {
|
|
6815
6828
|
let { checked: t = !1, defaultChecked: n = !1, controlled: r = !1 } = e;
|
|
6816
6829
|
return {
|
|
6817
6830
|
isControlled: r || t !== void 0,
|
|
@@ -6819,58 +6832,58 @@ function bd(e = {}) {
|
|
|
6819
6832
|
defaultValue: n
|
|
6820
6833
|
};
|
|
6821
6834
|
}
|
|
6822
|
-
function
|
|
6835
|
+
function Sd(e, t, n, r = {}) {
|
|
6823
6836
|
let { disabled: i = !1, loading: a = !1, preventDefault: o = !0 } = r;
|
|
6824
6837
|
if (o && e.preventDefault(), i || a) return t;
|
|
6825
6838
|
let s = !t;
|
|
6826
|
-
return
|
|
6839
|
+
return bd(s, n, r) ? s : t;
|
|
6827
6840
|
}
|
|
6828
|
-
function
|
|
6841
|
+
function Cd(e, t, n, r = {}) {
|
|
6829
6842
|
let { disabled: i = !1, loading: a = !1 } = r, o = e.keyCode || e.which;
|
|
6830
6843
|
if (i || a) return t;
|
|
6831
|
-
if (o ===
|
|
6844
|
+
if (o === vd.SPACE || o === vd.ENTER) {
|
|
6832
6845
|
e.preventDefault();
|
|
6833
6846
|
let i = !t;
|
|
6834
|
-
if (
|
|
6847
|
+
if (bd(i, n, r)) return i;
|
|
6835
6848
|
}
|
|
6836
6849
|
return t;
|
|
6837
6850
|
}
|
|
6838
|
-
function
|
|
6851
|
+
function wd(e, t, n = {}) {
|
|
6839
6852
|
let { disabled: r = !1 } = n;
|
|
6840
6853
|
r || typeof t == "function" && t(e);
|
|
6841
6854
|
}
|
|
6842
|
-
function
|
|
6855
|
+
function Td(e, t, n = {}) {
|
|
6843
6856
|
let { disabled: r = !1 } = n;
|
|
6844
6857
|
r || typeof t == "function" && t(e);
|
|
6845
6858
|
}
|
|
6846
|
-
function
|
|
6859
|
+
function Ed(e = {}) {
|
|
6847
6860
|
let { size: t = "md", color: n = "primary", variant: r = "default", disabled: i = !1, loading: a = !1, error: o = !1, fullWidth: s = !1 } = e, c = ["wc-switch"];
|
|
6848
6861
|
return c.push(`wc-switch--${t}`), c.push(`wc-switch--${n}`), r !== "default" && c.push(`wc-switch--${r}`), i && c.push("wc-switch--disabled"), a && c.push("wc-switch--loading"), o && c.push("wc-switch--error"), s && c.push("wc-switch--full-width"), c.join(" ");
|
|
6849
6862
|
}
|
|
6850
|
-
function
|
|
6863
|
+
function Dd(e = {}) {
|
|
6851
6864
|
let { variant: t = "default" } = e, n = ["wc-switch__track"];
|
|
6852
6865
|
return t !== "default" && n.push(`wc-switch__track--${t}`), n.join(" ");
|
|
6853
6866
|
}
|
|
6854
|
-
function
|
|
6867
|
+
function Od(e = {}) {
|
|
6855
6868
|
let { variant: t = "default", loading: n = !1 } = e, r = ["wc-switch__thumb"];
|
|
6856
6869
|
return t !== "default" && r.push(`wc-switch__thumb--${t}`), n && r.push("wc-switch__thumb--loading"), r.join(" ");
|
|
6857
6870
|
}
|
|
6858
|
-
function
|
|
6871
|
+
function kd(e = {}) {
|
|
6859
6872
|
let { size: t = "md", color: n = "primary", variant: r = "default", checked: i, defaultChecked: a } = e, o = [], s = [];
|
|
6860
|
-
return Object.values(
|
|
6873
|
+
return Object.values(hd).includes(t) || o.push(`Invalid size: ${t}. Must be one of: ${Object.values(hd).join(", ")}`), Object.values(gd).includes(n) || o.push(`Invalid color: ${n}. Must be one of: ${Object.values(gd).join(", ")}`), Object.values(_d).includes(r) || o.push(`Invalid variant: ${r}. Must be one of: ${Object.values(_d).join(", ")}`), i !== void 0 && a !== void 0 && s.push("Both checked and defaultChecked props provided. Component will be controlled."), {
|
|
6861
6874
|
isValid: o.length === 0,
|
|
6862
6875
|
errors: o,
|
|
6863
6876
|
warnings: s
|
|
6864
6877
|
};
|
|
6865
6878
|
}
|
|
6866
|
-
function
|
|
6879
|
+
function Ad(e, t = {}) {
|
|
6867
6880
|
let { required: n = !1 } = t, r = [];
|
|
6868
6881
|
return n && !e && r.push("This field is required"), e !== void 0 && typeof e != "boolean" && r.push("Value must be a boolean"), {
|
|
6869
6882
|
isValid: r.length === 0,
|
|
6870
6883
|
errors: r
|
|
6871
6884
|
};
|
|
6872
6885
|
}
|
|
6873
|
-
function
|
|
6886
|
+
function jd(e = {}) {
|
|
6874
6887
|
let { checked: t = !1, disabled: n = !1, loading: r = !1, labelledBy: i, describedBy: a, label: o } = e;
|
|
6875
6888
|
return {
|
|
6876
6889
|
role: "switch",
|
|
@@ -6882,22 +6895,22 @@ function Ad(e = {}) {
|
|
|
6882
6895
|
tabIndex: n ? -1 : 0
|
|
6883
6896
|
};
|
|
6884
6897
|
}
|
|
6885
|
-
function
|
|
6898
|
+
function Md(e = {}) {
|
|
6886
6899
|
let { checked: t = !1, disabled: n = !1, loading: r = !1, label: i = "Switch" } = e, a = `${i} switch`;
|
|
6887
6900
|
return n ? a += ", disabled" : r && (a += ", loading"), a += t ? ", on" : ", off", a;
|
|
6888
6901
|
}
|
|
6889
|
-
function
|
|
6902
|
+
function Nd(e, t = {}) {
|
|
6890
6903
|
let { trackWidth: n = 44, thumbSize: r = 20, thumbOffset: i = 2 } = t, a = n - r - i * 2;
|
|
6891
6904
|
return {
|
|
6892
6905
|
transform: e ? `translateX(${a}px)` : "translateX(0)",
|
|
6893
6906
|
transition: "transform 0.2s ease"
|
|
6894
6907
|
};
|
|
6895
6908
|
}
|
|
6896
|
-
function
|
|
6909
|
+
function Pd(e, t = {}) {
|
|
6897
6910
|
let { checkedColor: n = "var(--wc-primary-500)", uncheckedColor: r = "var(--wc-neutral-300)" } = t;
|
|
6898
6911
|
return e ? n : r;
|
|
6899
6912
|
}
|
|
6900
|
-
function
|
|
6913
|
+
function Fd(e = {}) {
|
|
6901
6914
|
let { name: t, value: n = !1, required: r = !1, disabled: i = !1 } = e;
|
|
6902
6915
|
return {
|
|
6903
6916
|
name: t,
|
|
@@ -6912,11 +6925,11 @@ function Pd(e = {}) {
|
|
|
6912
6925
|
}
|
|
6913
6926
|
};
|
|
6914
6927
|
}
|
|
6915
|
-
function
|
|
6928
|
+
function Id(e = {}) {
|
|
6916
6929
|
let { name: t, value: n } = e;
|
|
6917
6930
|
return t ? { [t]: n } : {};
|
|
6918
6931
|
}
|
|
6919
|
-
function
|
|
6932
|
+
function Ld(e, t = 100) {
|
|
6920
6933
|
let n;
|
|
6921
6934
|
return function(r, ...i) {
|
|
6922
6935
|
clearTimeout(n), n = setTimeout(() => {
|
|
@@ -6924,18 +6937,18 @@ function Id(e, t = 100) {
|
|
|
6924
6937
|
}, t);
|
|
6925
6938
|
};
|
|
6926
6939
|
}
|
|
6927
|
-
function
|
|
6940
|
+
function Rd(e, t = 100) {
|
|
6928
6941
|
let n = 0;
|
|
6929
6942
|
return function(r, ...i) {
|
|
6930
6943
|
let a = Date.now();
|
|
6931
6944
|
a - n >= t && (e(r, ...i), n = a);
|
|
6932
6945
|
};
|
|
6933
6946
|
}
|
|
6934
|
-
function
|
|
6947
|
+
function zd(e, t = {}) {
|
|
6935
6948
|
let { trueLabel: n = "On", falseLabel: r = "Off", formatter: i = null } = t;
|
|
6936
6949
|
return i && typeof i == "function" ? i(e) : e ? n : r;
|
|
6937
6950
|
}
|
|
6938
|
-
function
|
|
6951
|
+
function Bd(e) {
|
|
6939
6952
|
if (typeof e == "boolean") return e;
|
|
6940
6953
|
if (typeof e == "string") {
|
|
6941
6954
|
let t = e.toLowerCase();
|
|
@@ -6943,81 +6956,81 @@ function zd(e) {
|
|
|
6943
6956
|
}
|
|
6944
6957
|
return typeof e == "number" ? e !== 0 : !!e;
|
|
6945
6958
|
}
|
|
6946
|
-
function
|
|
6959
|
+
function Vd(e = {}) {
|
|
6947
6960
|
let { loading: t = !1, disabled: n = !1 } = e;
|
|
6948
6961
|
return t && !n;
|
|
6949
6962
|
}
|
|
6950
|
-
function
|
|
6963
|
+
function Hd(e = {}) {
|
|
6951
6964
|
let { disabled: t = !1, loading: n = !1 } = e;
|
|
6952
6965
|
return !t && !n;
|
|
6953
6966
|
}
|
|
6954
|
-
var
|
|
6955
|
-
SWITCH_SIZES:
|
|
6956
|
-
SWITCH_COLORS:
|
|
6957
|
-
SWITCH_VARIANTS:
|
|
6958
|
-
KEY_CODES:
|
|
6959
|
-
toggleState:
|
|
6960
|
-
handleStateChange:
|
|
6961
|
-
getSwitchState:
|
|
6962
|
-
handleClick:
|
|
6963
|
-
handleKeyDown:
|
|
6964
|
-
handleFocus:
|
|
6965
|
-
handleBlur:
|
|
6966
|
-
getSwitchClasses:
|
|
6967
|
-
getTrackClasses:
|
|
6968
|
-
getThumbClasses:
|
|
6969
|
-
validateProps:
|
|
6970
|
-
validateValue:
|
|
6971
|
-
getAriaAttributes:
|
|
6972
|
-
getAccessibilityDescription:
|
|
6973
|
-
getThumbPosition:
|
|
6974
|
-
getTrackBackground:
|
|
6975
|
-
createFormField:
|
|
6976
|
-
extractFormData:
|
|
6977
|
-
debounceChange:
|
|
6978
|
-
throttleChange:
|
|
6979
|
-
formatValue:
|
|
6980
|
-
parseValue:
|
|
6981
|
-
shouldShowLoading:
|
|
6982
|
-
isInteractive:
|
|
6983
|
-
},
|
|
6984
|
-
CELL_ALIGNMENTS: () =>
|
|
6985
|
-
CELL_VARIANTS: () =>
|
|
6986
|
-
PADDING_VARIANTS: () =>
|
|
6967
|
+
var Ud = {
|
|
6968
|
+
SWITCH_SIZES: hd,
|
|
6969
|
+
SWITCH_COLORS: gd,
|
|
6970
|
+
SWITCH_VARIANTS: _d,
|
|
6971
|
+
KEY_CODES: vd,
|
|
6972
|
+
toggleState: yd,
|
|
6973
|
+
handleStateChange: bd,
|
|
6974
|
+
getSwitchState: xd,
|
|
6975
|
+
handleClick: Sd,
|
|
6976
|
+
handleKeyDown: Cd,
|
|
6977
|
+
handleFocus: wd,
|
|
6978
|
+
handleBlur: Td,
|
|
6979
|
+
getSwitchClasses: Ed,
|
|
6980
|
+
getTrackClasses: Dd,
|
|
6981
|
+
getThumbClasses: Od,
|
|
6982
|
+
validateProps: kd,
|
|
6983
|
+
validateValue: Ad,
|
|
6984
|
+
getAriaAttributes: jd,
|
|
6985
|
+
getAccessibilityDescription: Md,
|
|
6986
|
+
getThumbPosition: Nd,
|
|
6987
|
+
getTrackBackground: Pd,
|
|
6988
|
+
createFormField: Fd,
|
|
6989
|
+
extractFormData: Id,
|
|
6990
|
+
debounceChange: Ld,
|
|
6991
|
+
throttleChange: Rd,
|
|
6992
|
+
formatValue: zd,
|
|
6993
|
+
parseValue: Bd,
|
|
6994
|
+
shouldShowLoading: Vd,
|
|
6995
|
+
isInteractive: Hd
|
|
6996
|
+
}, Wd = /* @__PURE__ */ n({
|
|
6997
|
+
CELL_ALIGNMENTS: () => qd,
|
|
6998
|
+
CELL_VARIANTS: () => Kd,
|
|
6999
|
+
PADDING_VARIANTS: () => Jd,
|
|
6987
7000
|
SORT_DIRECTIONS: () => Z,
|
|
6988
|
-
TABLE_SIZES: () =>
|
|
6989
|
-
applyDateFilter: () =>
|
|
6990
|
-
applyFilterType: () =>
|
|
6991
|
-
applyNumberFilter: () =>
|
|
6992
|
-
default: () =>
|
|
6993
|
-
filterData: () =>
|
|
6994
|
-
formatCellValue: () =>
|
|
6995
|
-
getNestedValue: () =>
|
|
6996
|
-
getNextSortDirection: () =>
|
|
6997
|
-
getPageInfo: () =>
|
|
6998
|
-
getTableCellClasses: () =>
|
|
6999
|
-
getTableClasses: () =>
|
|
7000
|
-
getTableContainerClasses: () =>
|
|
7001
|
-
getTableHeadClasses: () =>
|
|
7002
|
-
getTableRowClasses: () =>
|
|
7003
|
-
handleRowSelection: () =>
|
|
7004
|
-
handleSelectAll: () =>
|
|
7005
|
-
isAllSelected: () =>
|
|
7006
|
-
isSomeSelected: () =>
|
|
7007
|
-
paginateData: () =>
|
|
7008
|
-
setNestedValue: () =>
|
|
7009
|
-
sortData: () =>
|
|
7010
|
-
toggleSortDirection: () =>
|
|
7011
|
-
validateTableProps: () =>
|
|
7012
|
-
}),
|
|
7001
|
+
TABLE_SIZES: () => Gd,
|
|
7002
|
+
applyDateFilter: () => tf,
|
|
7003
|
+
applyFilterType: () => $d,
|
|
7004
|
+
applyNumberFilter: () => ef,
|
|
7005
|
+
default: () => vf,
|
|
7006
|
+
filterData: () => Qd,
|
|
7007
|
+
formatCellValue: () => gf,
|
|
7008
|
+
getNestedValue: () => mf,
|
|
7009
|
+
getNextSortDirection: () => Zd,
|
|
7010
|
+
getPageInfo: () => cf,
|
|
7011
|
+
getTableCellClasses: () => pf,
|
|
7012
|
+
getTableClasses: () => uf,
|
|
7013
|
+
getTableContainerClasses: () => lf,
|
|
7014
|
+
getTableHeadClasses: () => df,
|
|
7015
|
+
getTableRowClasses: () => ff,
|
|
7016
|
+
handleRowSelection: () => nf,
|
|
7017
|
+
handleSelectAll: () => rf,
|
|
7018
|
+
isAllSelected: () => af,
|
|
7019
|
+
isSomeSelected: () => of,
|
|
7020
|
+
paginateData: () => sf,
|
|
7021
|
+
setNestedValue: () => hf,
|
|
7022
|
+
sortData: () => Yd,
|
|
7023
|
+
toggleSortDirection: () => Xd,
|
|
7024
|
+
validateTableProps: () => _f
|
|
7025
|
+
}), Gd = {
|
|
7013
7026
|
sm: "sm",
|
|
7014
7027
|
md: "md",
|
|
7015
7028
|
lg: "lg"
|
|
7016
|
-
},
|
|
7029
|
+
}, Kd = {
|
|
7017
7030
|
head: "head",
|
|
7018
7031
|
body: "body",
|
|
7019
7032
|
footer: "footer"
|
|
7020
|
-
},
|
|
7033
|
+
}, qd = {
|
|
7021
7034
|
inherit: "inherit",
|
|
7022
7035
|
left: "left",
|
|
7023
7036
|
center: "center",
|
|
@@ -7027,17 +7040,17 @@ var Hd = {
|
|
|
7027
7040
|
asc: "asc",
|
|
7028
7041
|
desc: "desc",
|
|
7029
7042
|
none: !1
|
|
7030
|
-
},
|
|
7043
|
+
}, Jd = {
|
|
7031
7044
|
normal: "normal",
|
|
7032
7045
|
checkbox: "checkbox",
|
|
7033
7046
|
none: "none",
|
|
7034
7047
|
dense: "dense"
|
|
7035
7048
|
};
|
|
7036
|
-
function
|
|
7049
|
+
function Yd(e, t, n, r = null) {
|
|
7037
7050
|
if (!e || !Array.isArray(e) || !t) return e;
|
|
7038
7051
|
let i = [...e];
|
|
7039
7052
|
return i.sort((e, i) => {
|
|
7040
|
-
let a =
|
|
7053
|
+
let a = mf(e, t), o = mf(i, t);
|
|
7041
7054
|
if (r && typeof r == "function") {
|
|
7042
7055
|
let t = r(a, o, e, i);
|
|
7043
7056
|
return n === Z.desc ? -t : t;
|
|
@@ -7050,34 +7063,34 @@ function Jd(e, t, n, r = null) {
|
|
|
7050
7063
|
return a < o ? s = -1 : a > o && (s = 1), n === Z.desc ? -s : s;
|
|
7051
7064
|
}), i;
|
|
7052
7065
|
}
|
|
7053
|
-
function
|
|
7066
|
+
function Xd(e) {
|
|
7054
7067
|
switch (e) {
|
|
7055
7068
|
case Z.asc: return Z.desc;
|
|
7056
7069
|
case Z.desc: return Z.none;
|
|
7057
7070
|
default: return Z.asc;
|
|
7058
7071
|
}
|
|
7059
7072
|
}
|
|
7060
|
-
function
|
|
7061
|
-
return t ?
|
|
7073
|
+
function Zd(e, t = !0) {
|
|
7074
|
+
return t ? Xd(e) : e === Z.asc ? Z.desc : Z.asc;
|
|
7062
7075
|
}
|
|
7063
|
-
function
|
|
7076
|
+
function Qd(e, t = {}) {
|
|
7064
7077
|
return !e || !Array.isArray(e) || !t ? e : e.filter((e) => Object.entries(t).every(([t, n]) => {
|
|
7065
7078
|
if (!n || typeof n == "string" && n.trim() === "") return !0;
|
|
7066
|
-
let r =
|
|
7067
|
-
return typeof n == "function" ? n(r, e) : typeof n == "object" && n.type ?
|
|
7079
|
+
let r = mf(e, t);
|
|
7080
|
+
return typeof n == "function" ? n(r, e) : typeof n == "object" && n.type ? $d(r, n) : String(r || "").toLowerCase().includes(String(n).toLowerCase());
|
|
7068
7081
|
}));
|
|
7069
7082
|
}
|
|
7070
|
-
function
|
|
7083
|
+
function $d(e, t) {
|
|
7071
7084
|
let { type: n, value: r, operator: i = "equals" } = t;
|
|
7072
7085
|
switch (n) {
|
|
7073
|
-
case "number": return
|
|
7074
|
-
case "date": return
|
|
7086
|
+
case "number": return ef(Number(e), Number(r), i);
|
|
7087
|
+
case "date": return tf(new Date(e), new Date(r), i);
|
|
7075
7088
|
case "boolean": return !!e == !!r;
|
|
7076
7089
|
case "array": return Array.isArray(r) ? r.includes(e) : e === r;
|
|
7077
7090
|
default: return String(e || "").toLowerCase().includes(String(r || "").toLowerCase());
|
|
7078
7091
|
}
|
|
7079
7092
|
}
|
|
7080
|
-
function
|
|
7093
|
+
function ef(e, t, n) {
|
|
7081
7094
|
if (isNaN(e) || isNaN(t)) return !1;
|
|
7082
7095
|
switch (n) {
|
|
7083
7096
|
case "equals": return e === t;
|
|
@@ -7089,7 +7102,7 @@ function $d(e, t, n) {
|
|
|
7089
7102
|
default: return e === t;
|
|
7090
7103
|
}
|
|
7091
7104
|
}
|
|
7092
|
-
function
|
|
7105
|
+
function tf(e, t, n) {
|
|
7093
7106
|
if (!(e instanceof Date) || !(t instanceof Date) || isNaN(e.getTime()) || isNaN(t.getTime())) return !1;
|
|
7094
7107
|
let r = e.getTime(), i = t.getTime();
|
|
7095
7108
|
switch (n) {
|
|
@@ -7102,21 +7115,21 @@ function ef(e, t, n) {
|
|
|
7102
7115
|
default: return r === i;
|
|
7103
7116
|
}
|
|
7104
7117
|
}
|
|
7105
|
-
function
|
|
7118
|
+
function nf(e = [], t, n = !0) {
|
|
7106
7119
|
return n ? e.includes(t) ? e.filter((e) => e !== t) : [...e, t] : e.includes(t) ? [] : [t];
|
|
7107
7120
|
}
|
|
7108
|
-
function
|
|
7121
|
+
function rf(e, t = [], n = (e, t) => t) {
|
|
7109
7122
|
if (!e || !Array.isArray(e)) return t;
|
|
7110
7123
|
let r = e.map(n);
|
|
7111
7124
|
return r.every((e) => t.includes(e)) ? [] : r;
|
|
7112
7125
|
}
|
|
7113
|
-
function
|
|
7126
|
+
function af(e, t = [], n = (e, t) => t) {
|
|
7114
7127
|
return !e || !Array.isArray(e) || e.length === 0 ? !1 : e.map(n).every((e) => t.includes(e));
|
|
7115
7128
|
}
|
|
7116
|
-
function
|
|
7129
|
+
function of(e = []) {
|
|
7117
7130
|
return e.length > 0;
|
|
7118
7131
|
}
|
|
7119
|
-
function
|
|
7132
|
+
function sf(e, t = 0, n = 10) {
|
|
7120
7133
|
if (!e || !Array.isArray(e)) return {
|
|
7121
7134
|
data: [],
|
|
7122
7135
|
totalItems: 0,
|
|
@@ -7139,7 +7152,7 @@ function of(e, t = 0, n = 10) {
|
|
|
7139
7152
|
endIndex: Math.min(o, r)
|
|
7140
7153
|
};
|
|
7141
7154
|
}
|
|
7142
|
-
function
|
|
7155
|
+
function cf(e, t, n) {
|
|
7143
7156
|
let r = Math.ceil(e / n);
|
|
7144
7157
|
return {
|
|
7145
7158
|
totalPages: r,
|
|
@@ -7150,35 +7163,35 @@ function sf(e, t, n) {
|
|
|
7150
7163
|
hasPreviousPage: t > 0
|
|
7151
7164
|
};
|
|
7152
7165
|
}
|
|
7153
|
-
function
|
|
7166
|
+
function lf(e = {}) {
|
|
7154
7167
|
let { stickyHeader: t = !1, noBorder: n = !1, rounded: r = !1, flat: i = !1 } = e, a = ["wc-table-container"];
|
|
7155
7168
|
return t && a.push("wc-table-container--sticky"), n && a.push("wc-table-container--no-border"), r && a.push("wc-table-container--rounded"), i && a.push("wc-table-container--flat"), a.join(" ");
|
|
7156
7169
|
}
|
|
7157
|
-
function
|
|
7170
|
+
function uf(e = {}) {
|
|
7158
7171
|
let { size: t = "md", hover: n = !1, striped: r = !1, dense: i = !1, loading: a = !1, fixed: o = !1, compact: s = !1, spacious: c = !1, noWrap: l = !1, breakAll: u = !1, breakWord: d = !1 } = e, f = ["wc-table"];
|
|
7159
7172
|
return f.push(`wc-table--${t}`), n && f.push("wc-table--hover"), r && f.push("wc-table--striped"), i && f.push("wc-table--dense"), a && f.push("wc-table--loading"), o && f.push("wc-table--fixed"), s && f.push("wc-table--compact"), c && f.push("wc-table--spacious"), l && f.push("wc-table--no-wrap"), u && f.push("wc-table--break-all"), d && f.push("wc-table--break-word"), f.join(" ");
|
|
7160
7173
|
}
|
|
7161
|
-
function
|
|
7174
|
+
function df(e = {}) {
|
|
7162
7175
|
let { sticky: t = !1 } = e, n = ["wc-table-head"];
|
|
7163
7176
|
return t && n.push("wc-table-head--sticky"), n.join(" ");
|
|
7164
7177
|
}
|
|
7165
|
-
function
|
|
7178
|
+
function ff(e = {}) {
|
|
7166
7179
|
let { hover: t = !1, selected: n = !1, clickable: r = !1 } = e, i = ["wc-table-row"];
|
|
7167
7180
|
return (t || r) && i.push("wc-table-row--hover"), n && i.push("wc-table-row--selected"), r && i.push("wc-table-row--clickable"), i.join(" ");
|
|
7168
7181
|
}
|
|
7169
|
-
function
|
|
7182
|
+
function pf(e = {}) {
|
|
7170
7183
|
let { variant: t = "body", size: n = "medium", align: r = "inherit", valign: i = "inherit", padding: a = "normal", sortDirection: o = !1, numeric: s = !1, stickyLeft: c = !1, stickyRight: l = !1, selectable: u = !1 } = e, d = ["wc-table-cell"];
|
|
7171
7184
|
return d.push(`wc-table-cell--${t}`), d.push(`wc-table-cell--${n}`), r !== "inherit" && d.push(`wc-table-cell--align-${r}`), i !== "inherit" && d.push(`wc-table-cell--valign-${i}`), d.push(`wc-table-cell--padding-${a}`), o && (d.push("wc-table-cell--sortable"), o !== !0 && d.push(`wc-table-cell--sort-${o}`)), s && d.push("wc-table-cell--numeric"), c && d.push("wc-table-cell--sticky-left"), l && d.push("wc-table-cell--sticky-right"), u && d.push("wc-table-cell--selectable"), d.join(" ");
|
|
7172
7185
|
}
|
|
7173
|
-
function
|
|
7186
|
+
function mf(e, t) {
|
|
7174
7187
|
if (!(!e || !t)) return t.split(".").reduce((e, t) => e && e[t] !== void 0 ? e[t] : void 0, e);
|
|
7175
7188
|
}
|
|
7176
|
-
function
|
|
7189
|
+
function hf(e, t, n) {
|
|
7177
7190
|
if (!e || !t) return e;
|
|
7178
7191
|
let r = t.split("."), i = r.pop(), a = r.reduce((e, t) => ((!e[t] || typeof e[t] != "object") && (e[t] = {}), e[t]), e);
|
|
7179
7192
|
return a[i] = n, e;
|
|
7180
7193
|
}
|
|
7181
|
-
function
|
|
7194
|
+
function gf(e, t = {}) {
|
|
7182
7195
|
let { type: n = "string", format: r, locale: i = "en-US", currency: a = "USD", decimals: o, dateFormat: s = "short" } = t;
|
|
7183
7196
|
if (e == null) return "";
|
|
7184
7197
|
switch (n) {
|
|
@@ -7202,70 +7215,70 @@ function hf(e, t = {}) {
|
|
|
7202
7215
|
default: return String(e);
|
|
7203
7216
|
}
|
|
7204
7217
|
}
|
|
7205
|
-
function
|
|
7218
|
+
function _f(e = {}) {
|
|
7206
7219
|
let t = [];
|
|
7207
|
-
return e.size && !Object.values(
|
|
7220
|
+
return e.size && !Object.values(Gd).includes(e.size) && t.push(`Invalid size: ${e.size}`), e.data && !Array.isArray(e.data) && t.push("Data must be an array"), {
|
|
7208
7221
|
isValid: t.length === 0,
|
|
7209
7222
|
errors: t,
|
|
7210
7223
|
warnings: []
|
|
7211
7224
|
};
|
|
7212
7225
|
}
|
|
7213
|
-
var
|
|
7214
|
-
TABLE_SIZES:
|
|
7215
|
-
CELL_VARIANTS:
|
|
7216
|
-
CELL_ALIGNMENTS:
|
|
7226
|
+
var vf = {
|
|
7227
|
+
TABLE_SIZES: Gd,
|
|
7228
|
+
CELL_VARIANTS: Kd,
|
|
7229
|
+
CELL_ALIGNMENTS: qd,
|
|
7217
7230
|
SORT_DIRECTIONS: Z,
|
|
7218
|
-
PADDING_VARIANTS:
|
|
7219
|
-
sortData:
|
|
7220
|
-
toggleSortDirection:
|
|
7221
|
-
getNextSortDirection:
|
|
7222
|
-
filterData:
|
|
7223
|
-
applyFilterType:
|
|
7224
|
-
applyNumberFilter:
|
|
7225
|
-
applyDateFilter:
|
|
7226
|
-
handleRowSelection:
|
|
7227
|
-
handleSelectAll:
|
|
7228
|
-
isAllSelected:
|
|
7229
|
-
isSomeSelected:
|
|
7230
|
-
paginateData:
|
|
7231
|
-
getPageInfo:
|
|
7232
|
-
getTableContainerClasses:
|
|
7233
|
-
getTableClasses:
|
|
7234
|
-
getTableHeadClasses:
|
|
7235
|
-
getTableRowClasses:
|
|
7236
|
-
getTableCellClasses:
|
|
7237
|
-
getNestedValue:
|
|
7238
|
-
setNestedValue:
|
|
7239
|
-
formatCellValue:
|
|
7240
|
-
validateTableProps:
|
|
7241
|
-
},
|
|
7231
|
+
PADDING_VARIANTS: Jd,
|
|
7232
|
+
sortData: Yd,
|
|
7233
|
+
toggleSortDirection: Xd,
|
|
7234
|
+
getNextSortDirection: Zd,
|
|
7235
|
+
filterData: Qd,
|
|
7236
|
+
applyFilterType: $d,
|
|
7237
|
+
applyNumberFilter: ef,
|
|
7238
|
+
applyDateFilter: tf,
|
|
7239
|
+
handleRowSelection: nf,
|
|
7240
|
+
handleSelectAll: rf,
|
|
7241
|
+
isAllSelected: af,
|
|
7242
|
+
isSomeSelected: of,
|
|
7243
|
+
paginateData: sf,
|
|
7244
|
+
getPageInfo: cf,
|
|
7245
|
+
getTableContainerClasses: lf,
|
|
7246
|
+
getTableClasses: uf,
|
|
7247
|
+
getTableHeadClasses: df,
|
|
7248
|
+
getTableRowClasses: ff,
|
|
7249
|
+
getTableCellClasses: pf,
|
|
7250
|
+
getNestedValue: mf,
|
|
7251
|
+
setNestedValue: hf,
|
|
7252
|
+
formatCellValue: gf,
|
|
7253
|
+
validateTableProps: _f
|
|
7254
|
+
}, yf = /* @__PURE__ */ n({
|
|
7242
7255
|
KEY_CODES: () => $,
|
|
7243
7256
|
TAB_ORIENTATIONS: () => Q,
|
|
7244
|
-
TAB_SIZES: () =>
|
|
7245
|
-
TAB_VARIANTS: () =>
|
|
7246
|
-
TabManager: () =>
|
|
7247
|
-
animateTabContent: () =>
|
|
7248
|
-
createTabIdGenerator: () =>
|
|
7249
|
-
createTabState: () =>
|
|
7250
|
-
debounceTabChange: () =>
|
|
7251
|
-
default: () =>
|
|
7252
|
-
findFirstEnabledTab: () =>
|
|
7253
|
-
findLastEnabledTab: () =>
|
|
7254
|
-
findNextEnabledTab: () =>
|
|
7255
|
-
findPreviousEnabledTab: () =>
|
|
7256
|
-
getTabAriaAttributes: () =>
|
|
7257
|
-
getTabClasses: () =>
|
|
7258
|
-
getTabContentClasses: () =>
|
|
7259
|
-
getTabPanelAriaAttributes: () =>
|
|
7260
|
-
getTabsAriaAttributes: () =>
|
|
7261
|
-
getTabsClasses: () =>
|
|
7262
|
-
getTabsWrapperClasses: () =>
|
|
7263
|
-
handleKeyboardNavigation: () =>
|
|
7264
|
-
scrollTabIntoView: () =>
|
|
7265
|
-
throttleTabChange: () =>
|
|
7266
|
-
validateTabProps: () =>
|
|
7267
|
-
validateTabs: () =>
|
|
7268
|
-
}),
|
|
7257
|
+
TAB_SIZES: () => xf,
|
|
7258
|
+
TAB_VARIANTS: () => bf,
|
|
7259
|
+
TabManager: () => Sf,
|
|
7260
|
+
animateTabContent: () => Nf,
|
|
7261
|
+
createTabIdGenerator: () => Vf,
|
|
7262
|
+
createTabState: () => Mf,
|
|
7263
|
+
debounceTabChange: () => zf,
|
|
7264
|
+
default: () => Uf,
|
|
7265
|
+
findFirstEnabledTab: () => Ef,
|
|
7266
|
+
findLastEnabledTab: () => Df,
|
|
7267
|
+
findNextEnabledTab: () => wf,
|
|
7268
|
+
findPreviousEnabledTab: () => Tf,
|
|
7269
|
+
getTabAriaAttributes: () => Ff,
|
|
7270
|
+
getTabClasses: () => Af,
|
|
7271
|
+
getTabContentClasses: () => jf,
|
|
7272
|
+
getTabPanelAriaAttributes: () => If,
|
|
7273
|
+
getTabsAriaAttributes: () => Pf,
|
|
7274
|
+
getTabsClasses: () => kf,
|
|
7275
|
+
getTabsWrapperClasses: () => Of,
|
|
7276
|
+
handleKeyboardNavigation: () => Cf,
|
|
7277
|
+
scrollTabIntoView: () => Hf,
|
|
7278
|
+
throttleTabChange: () => Bf,
|
|
7279
|
+
validateTabProps: () => Rf,
|
|
7280
|
+
validateTabs: () => Lf
|
|
7281
|
+
}), bf = {
|
|
7269
7282
|
default: "default",
|
|
7270
7283
|
pills: "pills",
|
|
7271
7284
|
underline: "underline",
|
|
@@ -7273,7 +7286,7 @@ var _f = {
|
|
|
7273
7286
|
segmented: "segmented",
|
|
7274
7287
|
minimal: "minimal",
|
|
7275
7288
|
filled: "filled"
|
|
7276
|
-
},
|
|
7289
|
+
}, xf = {
|
|
7277
7290
|
sm: "sm",
|
|
7278
7291
|
md: "md",
|
|
7279
7292
|
lg: "lg"
|
|
@@ -7289,9 +7302,9 @@ var _f = {
|
|
|
7289
7302
|
END: 35,
|
|
7290
7303
|
ENTER: 13,
|
|
7291
7304
|
SPACE: 32
|
|
7292
|
-
},
|
|
7305
|
+
}, Sf = class {
|
|
7293
7306
|
constructor(e = {}) {
|
|
7294
|
-
this.tabs = [], this.activeIndex = e.activeIndex || 0, this.orientation = e.orientation || Q.horizontal, this.variant = e.variant ||
|
|
7307
|
+
this.tabs = [], this.activeIndex = e.activeIndex || 0, this.orientation = e.orientation || Q.horizontal, this.variant = e.variant || bf.default, this.size = e.size || xf.md, this.allowKeyboardNavigation = e.allowKeyboardNavigation !== !1, this.lazy = e.lazy || !1, this.keepAlive = e.keepAlive || !1, this.onChange = e.onChange, this.onTabLoad = e.onTabLoad, this.loadedTabs = /* @__PURE__ */ new Set();
|
|
7295
7308
|
}
|
|
7296
7309
|
addTab(e) {
|
|
7297
7310
|
let t = this.tabs.length;
|
|
@@ -7334,70 +7347,70 @@ var _f = {
|
|
|
7334
7347
|
return e < 0 || e >= this.tabs.length ? !1 : (Object.assign(this.tabs[e], t), !0);
|
|
7335
7348
|
}
|
|
7336
7349
|
};
|
|
7337
|
-
function
|
|
7350
|
+
function Cf(e, t, n, r = Q.horizontal) {
|
|
7338
7351
|
if (!n || n.length === 0) return t;
|
|
7339
7352
|
let i = e.keyCode || e.which, a = r === Q.horizontal, o = t;
|
|
7340
7353
|
switch (i) {
|
|
7341
7354
|
case $.ARROW_LEFT:
|
|
7342
|
-
a && (o =
|
|
7355
|
+
a && (o = Tf(t, n), e.preventDefault());
|
|
7343
7356
|
break;
|
|
7344
7357
|
case $.ARROW_RIGHT:
|
|
7345
|
-
a && (o =
|
|
7358
|
+
a && (o = wf(t, n), e.preventDefault());
|
|
7346
7359
|
break;
|
|
7347
7360
|
case $.ARROW_UP:
|
|
7348
|
-
a || (o =
|
|
7361
|
+
a || (o = Tf(t, n), e.preventDefault());
|
|
7349
7362
|
break;
|
|
7350
7363
|
case $.ARROW_DOWN:
|
|
7351
|
-
a || (o =
|
|
7364
|
+
a || (o = wf(t, n), e.preventDefault());
|
|
7352
7365
|
break;
|
|
7353
7366
|
case $.HOME:
|
|
7354
|
-
o =
|
|
7367
|
+
o = Ef(n), e.preventDefault();
|
|
7355
7368
|
break;
|
|
7356
7369
|
case $.END:
|
|
7357
|
-
o =
|
|
7370
|
+
o = Df(n), e.preventDefault();
|
|
7358
7371
|
break;
|
|
7359
7372
|
}
|
|
7360
7373
|
return o;
|
|
7361
7374
|
}
|
|
7362
|
-
function
|
|
7375
|
+
function wf(e, t) {
|
|
7363
7376
|
for (let n = 1; n < t.length; n++) {
|
|
7364
7377
|
let r = (e + n) % t.length;
|
|
7365
7378
|
if (!t[r].disabled) return r;
|
|
7366
7379
|
}
|
|
7367
7380
|
return e;
|
|
7368
7381
|
}
|
|
7369
|
-
function
|
|
7382
|
+
function Tf(e, t) {
|
|
7370
7383
|
for (let n = 1; n < t.length; n++) {
|
|
7371
7384
|
let r = (e - n + t.length) % t.length;
|
|
7372
7385
|
if (!t[r].disabled) return r;
|
|
7373
7386
|
}
|
|
7374
7387
|
return e;
|
|
7375
7388
|
}
|
|
7376
|
-
function
|
|
7389
|
+
function Ef(e) {
|
|
7377
7390
|
for (let t = 0; t < e.length; t++) if (!e[t].disabled) return t;
|
|
7378
7391
|
return 0;
|
|
7379
7392
|
}
|
|
7380
|
-
function
|
|
7393
|
+
function Df(e) {
|
|
7381
7394
|
for (let t = e.length - 1; t >= 0; t--) if (!e[t].disabled) return t;
|
|
7382
7395
|
return e.length - 1;
|
|
7383
7396
|
}
|
|
7384
|
-
function
|
|
7397
|
+
function Of(e = {}) {
|
|
7385
7398
|
let { orientation: t = Q.horizontal, animated: n = !1 } = e, r = ["wc-tabs-wrapper"];
|
|
7386
7399
|
return t === Q.vertical && r.push("wc-tabs-wrapper--vertical"), n && r.push("wc-tabs-wrapper--animated"), r.join(" ");
|
|
7387
7400
|
}
|
|
7388
|
-
function
|
|
7389
|
-
let { variant: t =
|
|
7401
|
+
function kf(e = {}) {
|
|
7402
|
+
let { variant: t = bf.default, size: n = xf.md, scrollable: r = !1, rounded: i = !1, square: a = !1, animated: o = !1 } = e, s = ["wc-tabs"];
|
|
7390
7403
|
return s.push(`wc-tabs--${t}`), s.push(`wc-tabs--${n}`), r && s.push("wc-tabs--scrollable"), i && s.push("wc-tabs--rounded"), a && s.push("wc-tabs--square"), o && s.push("wc-tabs--animated"), s.join(" ");
|
|
7391
7404
|
}
|
|
7392
|
-
function
|
|
7405
|
+
function Af(e = {}) {
|
|
7393
7406
|
let { active: t = !1, disabled: n = !1, loading: r = !1, closable: i = !1 } = e, a = ["wc-tab"];
|
|
7394
7407
|
return t && a.push("wc-tab--active"), n && a.push("wc-tab--disabled"), r && a.push("wc-tab--loading"), i && a.push("wc-tab--closable"), a.join(" ");
|
|
7395
7408
|
}
|
|
7396
|
-
function
|
|
7409
|
+
function jf(e = {}) {
|
|
7397
7410
|
let { noPadding: t = !1, animated: n = !1 } = e, r = ["wc-tab-content"];
|
|
7398
7411
|
return t && r.push("wc-tab-content--no-padding"), n && r.push("wc-tab-content--animated"), r.join(" ");
|
|
7399
7412
|
}
|
|
7400
|
-
function
|
|
7413
|
+
function Mf(e = {}) {
|
|
7401
7414
|
let { defaultActiveIndex: t = 0, controlled: n = !1, onChange: r } = e, i = t, a = [];
|
|
7402
7415
|
return {
|
|
7403
7416
|
get activeIndex() {
|
|
@@ -7419,7 +7432,7 @@ function jf(e = {}) {
|
|
|
7419
7432
|
}
|
|
7420
7433
|
};
|
|
7421
7434
|
}
|
|
7422
|
-
function
|
|
7435
|
+
function Nf(e, t = {}) {
|
|
7423
7436
|
let { duration: n = 300, easing: r = "ease-out", direction: i = "fade" } = t;
|
|
7424
7437
|
if (!e || typeof e.animate != "function") return Promise.resolve();
|
|
7425
7438
|
let a = [];
|
|
@@ -7459,7 +7472,7 @@ function Mf(e, t = {}) {
|
|
|
7459
7472
|
fill: "both"
|
|
7460
7473
|
}).finished;
|
|
7461
7474
|
}
|
|
7462
|
-
function
|
|
7475
|
+
function Pf(e = {}) {
|
|
7463
7476
|
let { orientation: t = Q.horizontal, label: n = "Tabs" } = e;
|
|
7464
7477
|
return {
|
|
7465
7478
|
role: "tablist",
|
|
@@ -7467,7 +7480,7 @@ function Nf(e = {}) {
|
|
|
7467
7480
|
"aria-orientation": t
|
|
7468
7481
|
};
|
|
7469
7482
|
}
|
|
7470
|
-
function
|
|
7483
|
+
function Ff(e = {}) {
|
|
7471
7484
|
let { id: t, panelId: n, active: r = !1, disabled: i = !1, index: a } = e;
|
|
7472
7485
|
return {
|
|
7473
7486
|
role: "tab",
|
|
@@ -7478,7 +7491,7 @@ function Pf(e = {}) {
|
|
|
7478
7491
|
tabIndex: r ? 0 : -1
|
|
7479
7492
|
};
|
|
7480
7493
|
}
|
|
7481
|
-
function
|
|
7494
|
+
function If(e = {}) {
|
|
7482
7495
|
let { id: t, tabId: n, active: r = !1, index: i } = e;
|
|
7483
7496
|
return {
|
|
7484
7497
|
role: "tabpanel",
|
|
@@ -7488,7 +7501,7 @@ function Ff(e = {}) {
|
|
|
7488
7501
|
tabIndex: r ? 0 : -1
|
|
7489
7502
|
};
|
|
7490
7503
|
}
|
|
7491
|
-
function
|
|
7504
|
+
function Lf(e) {
|
|
7492
7505
|
let t = [], n = [];
|
|
7493
7506
|
return Array.isArray(e) ? (e.length === 0 && n.push("No tabs provided"), e.forEach((n, r) => {
|
|
7494
7507
|
n.title || t.push(`Tab at index ${r} is missing a title`), n.id && e.filter((e) => e.id === n.id).length > 1 && t.push(`Duplicate tab ID: ${n.id}`);
|
|
@@ -7502,15 +7515,15 @@ function If(e) {
|
|
|
7502
7515
|
warnings: n
|
|
7503
7516
|
});
|
|
7504
7517
|
}
|
|
7505
|
-
function
|
|
7518
|
+
function Rf(e = {}) {
|
|
7506
7519
|
let t = [];
|
|
7507
|
-
return e.variant && !Object.values(
|
|
7520
|
+
return e.variant && !Object.values(bf).includes(e.variant) && t.push(`Invalid variant: ${e.variant}`), e.size && !Object.values(xf).includes(e.size) && t.push(`Invalid size: ${e.size}`), e.orientation && !Object.values(Q).includes(e.orientation) && t.push(`Invalid orientation: ${e.orientation}`), e.activeIndex !== void 0 && e.tabs && (e.activeIndex < 0 || e.activeIndex >= e.tabs.length) && t.push("Active index is out of bounds"), {
|
|
7508
7521
|
isValid: t.length === 0,
|
|
7509
7522
|
errors: t,
|
|
7510
7523
|
warnings: []
|
|
7511
7524
|
};
|
|
7512
7525
|
}
|
|
7513
|
-
function
|
|
7526
|
+
function zf(e, t = 100) {
|
|
7514
7527
|
let n;
|
|
7515
7528
|
return function(r, i, ...a) {
|
|
7516
7529
|
clearTimeout(n), n = setTimeout(() => {
|
|
@@ -7518,20 +7531,20 @@ function Rf(e, t = 100) {
|
|
|
7518
7531
|
}, t);
|
|
7519
7532
|
};
|
|
7520
7533
|
}
|
|
7521
|
-
function
|
|
7534
|
+
function Bf(e, t = 100) {
|
|
7522
7535
|
let n = 0;
|
|
7523
7536
|
return function(r, i, ...a) {
|
|
7524
7537
|
let o = Date.now();
|
|
7525
7538
|
o - n >= t && (e(r, i, ...a), n = o);
|
|
7526
7539
|
};
|
|
7527
7540
|
}
|
|
7528
|
-
function
|
|
7541
|
+
function Vf(e = "tab") {
|
|
7529
7542
|
let t = 0;
|
|
7530
7543
|
return function() {
|
|
7531
7544
|
return `${e}-${++t}`;
|
|
7532
7545
|
};
|
|
7533
7546
|
}
|
|
7534
|
-
function
|
|
7547
|
+
function Hf(e, t, n = {}) {
|
|
7535
7548
|
if (!e || !t) return;
|
|
7536
7549
|
let { behavior: r = "smooth", block: i = "nearest", inline: a = "center" } = n;
|
|
7537
7550
|
e.scrollIntoView({
|
|
@@ -7540,51 +7553,51 @@ function Vf(e, t, n = {}) {
|
|
|
7540
7553
|
inline: a
|
|
7541
7554
|
});
|
|
7542
7555
|
}
|
|
7543
|
-
var
|
|
7544
|
-
TAB_VARIANTS:
|
|
7545
|
-
TAB_SIZES:
|
|
7556
|
+
var Uf = {
|
|
7557
|
+
TAB_VARIANTS: bf,
|
|
7558
|
+
TAB_SIZES: xf,
|
|
7546
7559
|
TAB_ORIENTATIONS: Q,
|
|
7547
7560
|
KEY_CODES: $,
|
|
7548
|
-
TabManager:
|
|
7549
|
-
handleKeyboardNavigation:
|
|
7550
|
-
findNextEnabledTab:
|
|
7551
|
-
findPreviousEnabledTab:
|
|
7552
|
-
findFirstEnabledTab:
|
|
7553
|
-
findLastEnabledTab:
|
|
7554
|
-
getTabsWrapperClasses:
|
|
7555
|
-
getTabsClasses:
|
|
7556
|
-
getTabClasses:
|
|
7557
|
-
getTabContentClasses:
|
|
7558
|
-
createTabState:
|
|
7559
|
-
animateTabContent:
|
|
7560
|
-
getTabsAriaAttributes:
|
|
7561
|
-
getTabAriaAttributes:
|
|
7562
|
-
getTabPanelAriaAttributes:
|
|
7563
|
-
validateTabs:
|
|
7564
|
-
validateTabProps:
|
|
7565
|
-
debounceTabChange:
|
|
7566
|
-
throttleTabChange:
|
|
7567
|
-
createTabIdGenerator:
|
|
7568
|
-
scrollTabIntoView:
|
|
7569
|
-
},
|
|
7570
|
-
focusInput: () =>
|
|
7571
|
-
formatInputValue: () =>
|
|
7572
|
-
generateInputId: () =>
|
|
7573
|
-
getTextFieldClasses: () =>
|
|
7574
|
-
getTextFieldContainerClasses: () =>
|
|
7575
|
-
getTextFieldInputClasses: () =>
|
|
7576
|
-
getTextFieldLabelClasses: () =>
|
|
7577
|
-
handleInputBlur: () =>
|
|
7578
|
-
handleInputChange: () =>
|
|
7579
|
-
handleInputFocus: () =>
|
|
7580
|
-
handleKeyDown: () =>
|
|
7581
|
-
validateInput: () =>
|
|
7561
|
+
TabManager: Sf,
|
|
7562
|
+
handleKeyboardNavigation: Cf,
|
|
7563
|
+
findNextEnabledTab: wf,
|
|
7564
|
+
findPreviousEnabledTab: Tf,
|
|
7565
|
+
findFirstEnabledTab: Ef,
|
|
7566
|
+
findLastEnabledTab: Df,
|
|
7567
|
+
getTabsWrapperClasses: Of,
|
|
7568
|
+
getTabsClasses: kf,
|
|
7569
|
+
getTabClasses: Af,
|
|
7570
|
+
getTabContentClasses: jf,
|
|
7571
|
+
createTabState: Mf,
|
|
7572
|
+
animateTabContent: Nf,
|
|
7573
|
+
getTabsAriaAttributes: Pf,
|
|
7574
|
+
getTabAriaAttributes: Ff,
|
|
7575
|
+
getTabPanelAriaAttributes: If,
|
|
7576
|
+
validateTabs: Lf,
|
|
7577
|
+
validateTabProps: Rf,
|
|
7578
|
+
debounceTabChange: zf,
|
|
7579
|
+
throttleTabChange: Bf,
|
|
7580
|
+
createTabIdGenerator: Vf,
|
|
7581
|
+
scrollTabIntoView: Hf
|
|
7582
|
+
}, Wf = /* @__PURE__ */ n({
|
|
7583
|
+
focusInput: () => np,
|
|
7584
|
+
formatInputValue: () => Zf,
|
|
7585
|
+
generateInputId: () => Yf,
|
|
7586
|
+
getTextFieldClasses: () => Gf,
|
|
7587
|
+
getTextFieldContainerClasses: () => Kf,
|
|
7588
|
+
getTextFieldInputClasses: () => Jf,
|
|
7589
|
+
getTextFieldLabelClasses: () => qf,
|
|
7590
|
+
handleInputBlur: () => ep,
|
|
7591
|
+
handleInputChange: () => Qf,
|
|
7592
|
+
handleInputFocus: () => $f,
|
|
7593
|
+
handleKeyDown: () => tp,
|
|
7594
|
+
validateInput: () => Xf
|
|
7582
7595
|
});
|
|
7583
|
-
function
|
|
7596
|
+
function Gf({ variant: e = "outlined", size: t = "md", error: n = !1, disabled: r = !1, focused: i = !1, hasValue: a = !1, fullWidth: o = !1, multiline: s = !1, floatingLabel: c = !1, className: l = "" } = {}) {
|
|
7584
7597
|
let u = ["wc-textfield"];
|
|
7585
7598
|
return o && u.push("wc-textfield--full-width"), s && u.push("wc-textfield--multiline"), c && u.push("wc-textfield--floating-label"), l && u.push(l), u.filter(Boolean).join(" ");
|
|
7586
7599
|
}
|
|
7587
|
-
function
|
|
7600
|
+
function Kf({ variant: e = "outlined", size: t = "md", error: n = !1, disabled: r = !1, focused: i = !1, hasValue: a = !1 } = {}) {
|
|
7588
7601
|
let o = [
|
|
7589
7602
|
"wc-textfield__container",
|
|
7590
7603
|
`wc-textfield__container--${e}`,
|
|
@@ -7592,18 +7605,18 @@ function Gf({ variant: e = "outlined", size: t = "md", error: n = !1, disabled:
|
|
|
7592
7605
|
];
|
|
7593
7606
|
return n && o.push("wc-textfield__container--error"), r && o.push("wc-textfield__container--disabled"), i && o.push("wc-textfield__container--focused"), a && o.push("wc-textfield__container--has-value"), o.join(" ");
|
|
7594
7607
|
}
|
|
7595
|
-
function
|
|
7608
|
+
function qf({ size: e = "md", error: t = !1, focused: n = !1, active: r = !1 } = {}) {
|
|
7596
7609
|
let i = ["wc-textfield__label", `wc-textfield__label--${e}`];
|
|
7597
7610
|
return t && i.push("wc-textfield__label--error"), n && i.push("wc-textfield__label--focused"), r && i.push("wc-textfield__label--active"), i.join(" ");
|
|
7598
7611
|
}
|
|
7599
|
-
function
|
|
7612
|
+
function Jf({ size: e = "md", multiline: t = !1 } = {}) {
|
|
7600
7613
|
let n = ["wc-textfield__input", `wc-textfield__input--${e}`];
|
|
7601
7614
|
return t && n.push("wc-textfield__textarea"), n.join(" ");
|
|
7602
7615
|
}
|
|
7603
|
-
function
|
|
7616
|
+
function Yf(e = "", t = "textfield") {
|
|
7604
7617
|
return `${t}-${e || Math.random().toString(36).substr(2, 9)}`;
|
|
7605
7618
|
}
|
|
7606
|
-
function
|
|
7619
|
+
function Xf(e, t = {}) {
|
|
7607
7620
|
let { required: n = !1, minLength: r, maxLength: i, pattern: a, email: o = !1, url: s = !1, number: c = !1, custom: l } = t;
|
|
7608
7621
|
if (n && (!e || e.trim() === "")) return {
|
|
7609
7622
|
isValid: !1,
|
|
@@ -7653,7 +7666,7 @@ function Yf(e, t = {}) {
|
|
|
7653
7666
|
error: ""
|
|
7654
7667
|
};
|
|
7655
7668
|
}
|
|
7656
|
-
function
|
|
7669
|
+
function Zf(e, t = {}) {
|
|
7657
7670
|
let { type: n = "text", uppercase: r = !1, lowercase: i = !1, trim: a = !0, removeSpaces: o = !1, phone: s = !1, currency: c = !1 } = t;
|
|
7658
7671
|
if (!e) return e;
|
|
7659
7672
|
let l = String(e);
|
|
@@ -7666,14 +7679,14 @@ function Xf(e, t = {}) {
|
|
|
7666
7679
|
}
|
|
7667
7680
|
return l;
|
|
7668
7681
|
}
|
|
7669
|
-
function
|
|
7682
|
+
function Qf(e, t, n = {}) {
|
|
7670
7683
|
let { target: r } = e, { value: i } = r, { formatOptions: a, validationRules: o, debounce: s = 0 } = n, c = i;
|
|
7671
|
-
a && (c =
|
|
7684
|
+
a && (c = Zf(i, a), c !== i && (r.value = c));
|
|
7672
7685
|
let l = {
|
|
7673
7686
|
isValid: !0,
|
|
7674
7687
|
error: ""
|
|
7675
7688
|
};
|
|
7676
|
-
o && (l =
|
|
7689
|
+
o && (l = Xf(c, o));
|
|
7677
7690
|
let u = () => {
|
|
7678
7691
|
t && t({
|
|
7679
7692
|
value: c,
|
|
@@ -7682,15 +7695,15 @@ function Zf(e, t, n = {}) {
|
|
|
7682
7695
|
validation: l
|
|
7683
7696
|
});
|
|
7684
7697
|
};
|
|
7685
|
-
s > 0 ? (clearTimeout(
|
|
7698
|
+
s > 0 ? (clearTimeout(Qf.debounceTimer), Qf.debounceTimer = setTimeout(u, s)) : u();
|
|
7686
7699
|
}
|
|
7687
|
-
function
|
|
7700
|
+
function $f(e, t, n = {}) {
|
|
7688
7701
|
t && t(e, n);
|
|
7689
7702
|
}
|
|
7690
|
-
function
|
|
7703
|
+
function ep(e, t, n = {}) {
|
|
7691
7704
|
t && t(e, n);
|
|
7692
7705
|
}
|
|
7693
|
-
function
|
|
7706
|
+
function tp(e, t = {}) {
|
|
7694
7707
|
let { key: n } = e, { onEnter: r, onEscape: i, onTab: a, onArrowUp: o, onArrowDown: s, custom: c = {} } = t;
|
|
7695
7708
|
switch (n) {
|
|
7696
7709
|
case "Enter":
|
|
@@ -7711,40 +7724,40 @@ function ep(e, t = {}) {
|
|
|
7711
7724
|
default: c[n] && c[n](e);
|
|
7712
7725
|
}
|
|
7713
7726
|
}
|
|
7714
|
-
function
|
|
7727
|
+
function np(e, t = {}) {
|
|
7715
7728
|
let { selectAll: n = !1, cursorPosition: r } = t;
|
|
7716
7729
|
e && (e.focus(), n ? e.select() : typeof r == "number" && e.setSelectionRange(r, r));
|
|
7717
7730
|
}
|
|
7718
7731
|
//#endregion
|
|
7719
7732
|
//#region src/components/Toolbar/utils.js
|
|
7720
|
-
var
|
|
7733
|
+
var rp = /* @__PURE__ */ n({ getToolbarClasses: () => ip }), ip = (e, t, n = "") => {
|
|
7721
7734
|
let r = ["flex items-center w-full"];
|
|
7722
7735
|
return e === "dense" ? r.push("min-h-12 py-2") : r.push("min-h-16 py-3"), t || r.push("px-4 sm:px-6 lg:px-8"), n && r.push(n), r.join(" ");
|
|
7723
|
-
},
|
|
7724
|
-
getPlacementClass: () =>
|
|
7725
|
-
placementClasses: () =>
|
|
7726
|
-
validPlacements: () =>
|
|
7727
|
-
validatePlacement: () =>
|
|
7728
|
-
}),
|
|
7736
|
+
}, ap = /* @__PURE__ */ n({
|
|
7737
|
+
getPlacementClass: () => lp,
|
|
7738
|
+
placementClasses: () => op,
|
|
7739
|
+
validPlacements: () => sp,
|
|
7740
|
+
validatePlacement: () => cp
|
|
7741
|
+
}), op = {
|
|
7729
7742
|
top: "wc-tooltip--top",
|
|
7730
7743
|
bottom: "wc-tooltip--bottom",
|
|
7731
7744
|
left: "wc-tooltip--left",
|
|
7732
7745
|
right: "wc-tooltip--right"
|
|
7733
|
-
},
|
|
7746
|
+
}, sp = [
|
|
7734
7747
|
"top",
|
|
7735
7748
|
"bottom",
|
|
7736
7749
|
"left",
|
|
7737
7750
|
"right"
|
|
7738
7751
|
];
|
|
7739
|
-
function sp(e) {
|
|
7740
|
-
return op.includes(e);
|
|
7741
|
-
}
|
|
7742
7752
|
function cp(e) {
|
|
7743
|
-
return
|
|
7753
|
+
return sp.includes(e);
|
|
7754
|
+
}
|
|
7755
|
+
function lp(e) {
|
|
7756
|
+
return op[e] || op.top;
|
|
7744
7757
|
}
|
|
7745
7758
|
//#endregion
|
|
7746
7759
|
//#region src/components/TypingText/utils.jsx
|
|
7747
|
-
var
|
|
7760
|
+
var up = /* @__PURE__ */ n({ TypingAnimator: () => dp }), dp = class {
|
|
7748
7761
|
constructor(e, t = {}) {
|
|
7749
7762
|
this.text = e, this.speed = t.speed || 100, this.pause = t.pause || 1500, this.loop = t.loop || !1, this.erase = t.erase || !1, this.index = 0, this.direction = 1, this.timer = null, this.onUpdate = t.onUpdate || (() => {});
|
|
7750
7763
|
}
|
|
@@ -7765,15 +7778,15 @@ var lp = /* @__PURE__ */ n({ TypingAnimator: () => up }), up = class {
|
|
|
7765
7778
|
updateText(e) {
|
|
7766
7779
|
this.text = e, this.reset(), this.start();
|
|
7767
7780
|
}
|
|
7768
|
-
},
|
|
7769
|
-
alignClassMap: () =>
|
|
7770
|
-
buildTypographyClasses: () =>
|
|
7771
|
-
colorClassMap: () =>
|
|
7772
|
-
getComponent: () =>
|
|
7773
|
-
lineHeightMap: () =>
|
|
7774
|
-
variantClassMap: () =>
|
|
7775
|
-
variantMap: () =>
|
|
7776
|
-
}),
|
|
7781
|
+
}, fp = /* @__PURE__ */ n({
|
|
7782
|
+
alignClassMap: () => gp,
|
|
7783
|
+
buildTypographyClasses: () => yp,
|
|
7784
|
+
colorClassMap: () => hp,
|
|
7785
|
+
getComponent: () => vp,
|
|
7786
|
+
lineHeightMap: () => _p,
|
|
7787
|
+
variantClassMap: () => mp,
|
|
7788
|
+
variantMap: () => pp
|
|
7789
|
+
}), pp = {
|
|
7777
7790
|
h1: "h1",
|
|
7778
7791
|
h2: "h2",
|
|
7779
7792
|
h3: "h3",
|
|
@@ -7787,7 +7800,7 @@ var lp = /* @__PURE__ */ n({ TypingAnimator: () => up }), up = class {
|
|
|
7787
7800
|
caption: "span",
|
|
7788
7801
|
overline: "span",
|
|
7789
7802
|
button: "span"
|
|
7790
|
-
},
|
|
7803
|
+
}, mp = {
|
|
7791
7804
|
h1: "wc-typography--h1",
|
|
7792
7805
|
h2: "wc-typography--h2",
|
|
7793
7806
|
h3: "wc-typography--h3",
|
|
@@ -7801,7 +7814,7 @@ var lp = /* @__PURE__ */ n({ TypingAnimator: () => up }), up = class {
|
|
|
7801
7814
|
caption: "wc-typography--caption",
|
|
7802
7815
|
overline: "wc-typography--overline",
|
|
7803
7816
|
button: "wc-typography--button"
|
|
7804
|
-
},
|
|
7817
|
+
}, hp = {
|
|
7805
7818
|
inherit: "wc-typography--color-inherit",
|
|
7806
7819
|
primary: "wc-typography--color-primary",
|
|
7807
7820
|
secondary: "wc-typography--color-secondary",
|
|
@@ -7811,12 +7824,12 @@ var lp = /* @__PURE__ */ n({ TypingAnimator: () => up }), up = class {
|
|
|
7811
7824
|
textPrimary: "wc-typography--color-text-primary",
|
|
7812
7825
|
textSecondary: "wc-typography--color-text-secondary",
|
|
7813
7826
|
textDisabled: "wc-typography--color-text-disabled"
|
|
7814
|
-
},
|
|
7827
|
+
}, gp = {
|
|
7815
7828
|
left: "wc-typography--align-left",
|
|
7816
7829
|
center: "wc-typography--align-center",
|
|
7817
7830
|
right: "wc-typography--align-right",
|
|
7818
7831
|
justify: "wc-typography--align-justify"
|
|
7819
|
-
},
|
|
7832
|
+
}, _p = {
|
|
7820
7833
|
h1: "1.2",
|
|
7821
7834
|
h2: "1.2",
|
|
7822
7835
|
h3: "1.3",
|
|
@@ -7831,15 +7844,15 @@ var lp = /* @__PURE__ */ n({ TypingAnimator: () => up }), up = class {
|
|
|
7831
7844
|
overline: "1.4",
|
|
7832
7845
|
button: "1.4"
|
|
7833
7846
|
};
|
|
7834
|
-
function
|
|
7835
|
-
return t ||
|
|
7847
|
+
function vp(e, t) {
|
|
7848
|
+
return t || pp[e] || "p";
|
|
7836
7849
|
}
|
|
7837
|
-
function
|
|
7850
|
+
function yp(e, t, n, r, i, a = "") {
|
|
7838
7851
|
return [
|
|
7839
7852
|
"wc-typography",
|
|
7840
|
-
|
|
7841
|
-
|
|
7842
|
-
n === "inherit" ? null :
|
|
7853
|
+
mp[e],
|
|
7854
|
+
hp[t],
|
|
7855
|
+
n === "inherit" ? null : gp[n],
|
|
7843
7856
|
r ? "wc-typography--gutter-bottom" : null,
|
|
7844
7857
|
i ? "wc-typography--no-wrap" : null,
|
|
7845
7858
|
a
|
|
@@ -7847,29 +7860,29 @@ function vp(e, t, n, r, i, a = "") {
|
|
|
7847
7860
|
}
|
|
7848
7861
|
//#endregion
|
|
7849
7862
|
//#region src/components/VideoPlayer/utils.js
|
|
7850
|
-
var
|
|
7851
|
-
calculateSeekPosition: () =>
|
|
7852
|
-
formatTime: () =>
|
|
7853
|
-
toggleFullscreen: () =>
|
|
7863
|
+
var bp = /* @__PURE__ */ n({
|
|
7864
|
+
calculateSeekPosition: () => Sp,
|
|
7865
|
+
formatTime: () => xp,
|
|
7866
|
+
toggleFullscreen: () => Cp
|
|
7854
7867
|
});
|
|
7855
|
-
function
|
|
7868
|
+
function xp(e) {
|
|
7856
7869
|
return `${Math.floor(e / 60)}:${Math.floor(e % 60).toString().padStart(2, "0")}`;
|
|
7857
7870
|
}
|
|
7858
|
-
function
|
|
7871
|
+
function Sp(e, t) {
|
|
7859
7872
|
let n = e.currentTarget.getBoundingClientRect();
|
|
7860
7873
|
return (e.clientX - n.left) / n.width * t;
|
|
7861
7874
|
}
|
|
7862
|
-
function
|
|
7875
|
+
function Cp(e) {
|
|
7863
7876
|
e && (document.fullscreenElement ? document.exitFullscreen?.() : e.requestFullscreen?.());
|
|
7864
7877
|
}
|
|
7865
7878
|
//#endregion
|
|
7866
7879
|
//#region src/components/Watermark/utils.js
|
|
7867
|
-
var
|
|
7868
|
-
createCanvasUrl: () =>
|
|
7869
|
-
createWatermarkStyle: () =>
|
|
7870
|
-
defaultProps: () =>
|
|
7871
|
-
resolveColor: () =>
|
|
7872
|
-
}),
|
|
7880
|
+
var wp = /* @__PURE__ */ n({
|
|
7881
|
+
createCanvasUrl: () => Dp,
|
|
7882
|
+
createWatermarkStyle: () => Op,
|
|
7883
|
+
defaultProps: () => Tp,
|
|
7884
|
+
resolveColor: () => Ep
|
|
7885
|
+
}), Tp = {
|
|
7873
7886
|
content: "",
|
|
7874
7887
|
cross: !1,
|
|
7875
7888
|
debug: !1,
|
|
@@ -7897,14 +7910,14 @@ var Cp = /* @__PURE__ */ n({
|
|
|
7897
7910
|
yOffset: 0,
|
|
7898
7911
|
zIndex: 10
|
|
7899
7912
|
};
|
|
7900
|
-
function
|
|
7913
|
+
function Ep(e) {
|
|
7901
7914
|
if (typeof e == "string" && e.startsWith("var(")) {
|
|
7902
7915
|
let t = e.match(/--[^, )]+/);
|
|
7903
7916
|
if (t) return getComputedStyle(document.documentElement).getPropertyValue(t[0]).trim() || e;
|
|
7904
7917
|
}
|
|
7905
7918
|
return e;
|
|
7906
7919
|
}
|
|
7907
|
-
function
|
|
7920
|
+
function Dp(e) {
|
|
7908
7921
|
let t = document.createElement("canvas"), n = t.getContext("2d"), r = e.width, i = e.height;
|
|
7909
7922
|
if (!e.image && e.content) {
|
|
7910
7923
|
n.font = `${e.fontStyle} ${e.fontVariant} ${e.fontWeight} ${e.fontSize}px ${e.fontFamily}`;
|
|
@@ -7920,14 +7933,14 @@ function Ep(e) {
|
|
|
7920
7933
|
}, i.src = e.image;
|
|
7921
7934
|
});
|
|
7922
7935
|
let a = (e.content || "").split(/\n/);
|
|
7923
|
-
n.textAlign = e.textAlign || "center", n.textBaseline = "middle", n.fillStyle = e.fontColor.startsWith("var(") ?
|
|
7936
|
+
n.textAlign = e.textAlign || "center", n.textBaseline = "middle", n.fillStyle = e.fontColor.startsWith("var(") ? Ep(e.fontColor) : e.fontColor, n.font = `${e.fontStyle} ${e.fontVariant} ${e.fontWeight} ${e.fontSize}px ${e.fontFamily}`, n.translate(r / 2, i / 2), n.rotate(e.rotate * Math.PI / 180);
|
|
7924
7937
|
let o = -(a.length - 1) * e.lineHeight / 2;
|
|
7925
7938
|
return a.forEach((t, r) => {
|
|
7926
7939
|
let i = o + r * e.lineHeight;
|
|
7927
7940
|
n.fillText(t, 0, i);
|
|
7928
7941
|
}), Promise.resolve(t.toDataURL());
|
|
7929
7942
|
}
|
|
7930
|
-
function
|
|
7943
|
+
function Op(e, t) {
|
|
7931
7944
|
let n = {
|
|
7932
7945
|
position: e.fullscreen ? "fixed" : "absolute",
|
|
7933
7946
|
top: 0,
|
|
@@ -7945,4 +7958,4 @@ function Dp(e, t) {
|
|
|
7945
7958
|
return e.debug && (n.outline = "1px dashed red"), e.cross || (n.overflow = "hidden"), n;
|
|
7946
7959
|
}
|
|
7947
7960
|
//#endregion
|
|
7948
|
-
export {
|
|
7961
|
+
export { ce as AccordionUtils, me as AlertUtils, ve as AppBarUtils, xe as AvatarUtils, Ne as BadgeUtils, Be as BannerUtils, Ye as BlockquoteUtils, Ze as BoxUtils, at as BreadcrumbUtils, mt as ButtonUtils, M as COMPOSITION_ALIGNS, j as COMPOSITION_GAPS, At as CardUtils, $t as CheckboxUtils, mn as CircularProgressUtils, En as ColorPickerUtils, zn as ContainerUtils, Gn as CopyUtils, nr as DatePickerUtils, pr as DividerUtils, _r as FeatureUtils, Mr as FeedUtils, Hr as FileInputUtils, ti as FormUtils, gi as GridUtils, Vi as HoverCardUtils, ae as INLINE_JUSTIFY, ma as ImageGalleryUtils, Ua as InputUtils, T as LEGACY_THEME_STORAGE_KEY, vo as ListUtils, zo as MenuUtils, os as ModalUtils, xs as NumberAnimationUtils, ie as PAGE_GUTTERS, N as PAGE_SIZES, Ds as PaginationUtils, Vs as PaperUtils, tc as PopoverUtils, lc as PricingTableUtils, Mc as ProgressUtils, Wc as RadioUtils, ul as RatingUtils, se as SPLIT_COLLAPSE, oe as SPLIT_RATIOS, Pl as SelectUtils, iu as SliderUtils, Ou as SnackbarUtils, nd as StatusUtils, md as SwitchUtils, r as THEME_CONFIG_VERSION, re as THEME_MODES, w as THEME_STORAGE_KEY, Wd as TableUtils, yf as TabsUtils, Wf as TextFieldUtils, rp as ToolbarUtils, ap as TooltipUtils, up as TypingTextUtils, fp as TypographyUtils, bp as VideoPlayerUtils, wp as WatermarkUtils, x as applyThemeConfig, O as applyThemeMode, k as createThemeController, A as createThemeInitScript, E as isThemeMode, S as loadThemeConfig, b as resetThemeConfig, D as resolveThemeMode, C as serializeThemeConfig, te as validateThemeConfig };
|