ynotsoft-dynamic-form 1.0.118 → 1.0.120
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/dynamic-form.js +670 -659
- package/dist/dynamic-form.umd.cjs +27 -27
- package/package.json +1 -1
package/dist/dynamic-form.js
CHANGED
|
@@ -71,13 +71,13 @@ function gc({
|
|
|
71
71
|
}
|
|
72
72
|
);
|
|
73
73
|
}
|
|
74
|
-
const bc = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(),
|
|
74
|
+
const bc = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), vc = (e) => e.replace(
|
|
75
75
|
/^([A-Z])|[\s-_]+(\w)/g,
|
|
76
76
|
(t, n, r) => r ? r.toUpperCase() : n.toLowerCase()
|
|
77
77
|
), Do = (e) => {
|
|
78
|
-
const t =
|
|
78
|
+
const t = vc(e);
|
|
79
79
|
return t.charAt(0).toUpperCase() + t.slice(1);
|
|
80
|
-
}, Ma = (...e) => e.filter((t, n, r) => !!t && t.trim() !== "" && r.indexOf(t) === n).join(" ").trim(),
|
|
80
|
+
}, Ma = (...e) => e.filter((t, n, r) => !!t && t.trim() !== "" && r.indexOf(t) === n).join(" ").trim(), yc = (e) => {
|
|
81
81
|
for (const t in e)
|
|
82
82
|
if (t.startsWith("aria-") || t === "role" || t === "title")
|
|
83
83
|
return !0;
|
|
@@ -113,7 +113,7 @@ const xc = _a(
|
|
|
113
113
|
stroke: e,
|
|
114
114
|
strokeWidth: r ? Number(n) * 24 / Number(t) : n,
|
|
115
115
|
className: Ma("lucide", o),
|
|
116
|
-
...!a && !
|
|
116
|
+
...!a && !yc(i) && { "aria-hidden": "true" },
|
|
117
117
|
...i
|
|
118
118
|
},
|
|
119
119
|
[
|
|
@@ -275,37 +275,45 @@ function gl({
|
|
|
275
275
|
apiClient: s,
|
|
276
276
|
...i
|
|
277
277
|
}) {
|
|
278
|
-
const c = a, u = e.selectMode !== "multiple", d = e.returnValueOnly === !0, [p, g] = ce([]), [m, b] = ce(!1), [h,
|
|
279
|
-
if (
|
|
280
|
-
return { value:
|
|
281
|
-
const
|
|
282
|
-
return
|
|
278
|
+
const c = a, u = e.selectMode !== "multiple", d = e.returnValueOnly === !0, [p, g] = ce([]), [m, b] = ce(!1), [h, v] = ce(!1), [S, E] = ce(""), [C, w] = ce(-1), [x, R] = ce({}), _ = Zt(null), O = Zt(null), $ = Zt(null), z = t[e.name], G = dr(() => z ? (Array.isArray(z) ? z : [z]).map((P) => {
|
|
279
|
+
if (P && typeof P == "object" && P.value !== void 0)
|
|
280
|
+
return { value: P.value, label: P.label || P.value };
|
|
281
|
+
const T = p.find((q) => q.value === P);
|
|
282
|
+
return T || (x[P] ? x[P] : { value: P, label: P });
|
|
283
283
|
}) : [], [z, p, x])(), M = dr(
|
|
284
|
-
async (
|
|
284
|
+
async (A = "") => {
|
|
285
285
|
if (e.onSearch) {
|
|
286
|
-
const
|
|
287
|
-
g(
|
|
286
|
+
const P = await e.onSearch(A, t);
|
|
287
|
+
g(
|
|
288
|
+
(P || []).map((T) => ({
|
|
289
|
+
value: T[e.valueId || "value"] ?? T.value ?? T.id,
|
|
290
|
+
label: T[e.labelId || "label"] ?? T.label ?? T.name,
|
|
291
|
+
description: T.description
|
|
292
|
+
}))
|
|
293
|
+
);
|
|
288
294
|
return;
|
|
289
295
|
}
|
|
290
296
|
if (!e.optionsUrl || !s) {
|
|
291
|
-
const
|
|
292
|
-
value:
|
|
293
|
-
label:
|
|
297
|
+
const P = (e.options || []).map((T) => ({
|
|
298
|
+
value: T[e.valueId || "value"] || T.value || T.id,
|
|
299
|
+
label: T[e.labelId || "label"] || T.label || T.name,
|
|
300
|
+
description: T.description
|
|
294
301
|
}));
|
|
295
302
|
g(
|
|
296
|
-
|
|
297
|
-
(
|
|
298
|
-
) :
|
|
303
|
+
A ? P.filter(
|
|
304
|
+
(T) => String(T.label).toLowerCase().includes(A.toLowerCase())
|
|
305
|
+
) : P
|
|
299
306
|
);
|
|
300
307
|
return;
|
|
301
308
|
}
|
|
302
309
|
b(!0);
|
|
303
310
|
try {
|
|
304
|
-
const
|
|
311
|
+
const P = e.searchParam || "search", T = e.optionsUrl.includes("?") ? "&" : "?", q = `${e.optionsUrl}${T}${P}=${encodeURIComponent(A)}`, te = await s(q), K = te.data || te, ge = Array.isArray(K) ? K : [];
|
|
305
312
|
g(
|
|
306
313
|
ge.map((Y) => ({
|
|
307
314
|
value: Y[e.valueId || "value"] || Y.value || Y.id,
|
|
308
|
-
label: Y[e.labelId || "label"] || Y.label || Y.name
|
|
315
|
+
label: Y[e.labelId || "label"] || Y.label || Y.name,
|
|
316
|
+
description: Y.description
|
|
309
317
|
}))
|
|
310
318
|
);
|
|
311
319
|
} catch {
|
|
@@ -316,18 +324,18 @@ function gl({
|
|
|
316
324
|
},
|
|
317
325
|
[e, s, t]
|
|
318
326
|
), F = dr(
|
|
319
|
-
(
|
|
320
|
-
if (!
|
|
321
|
-
|
|
322
|
-
const
|
|
323
|
-
let
|
|
327
|
+
(A) => {
|
|
328
|
+
if (!A) return;
|
|
329
|
+
R((q) => ({ ...q, [A.value]: A }));
|
|
330
|
+
const P = d ? A.value : { value: A.value, label: A.label };
|
|
331
|
+
let T;
|
|
324
332
|
if (u)
|
|
325
|
-
|
|
333
|
+
T = [P], v(!1);
|
|
326
334
|
else {
|
|
327
335
|
const q = Array.isArray(z) ? z : [];
|
|
328
|
-
|
|
336
|
+
T = q.some((K) => (K?.value ?? K) === A.value) ? q.filter((K) => (K?.value ?? K) !== A.value) : [...q, P];
|
|
329
337
|
}
|
|
330
|
-
n(e.name,
|
|
338
|
+
n(e.name, T), r(e.name), e.clearSearchOnSelect && E("");
|
|
331
339
|
},
|
|
332
340
|
[
|
|
333
341
|
z,
|
|
@@ -338,48 +346,48 @@ function gl({
|
|
|
338
346
|
u,
|
|
339
347
|
d
|
|
340
348
|
]
|
|
341
|
-
), N = (
|
|
349
|
+
), N = (A) => {
|
|
342
350
|
if (!c)
|
|
343
|
-
switch (
|
|
351
|
+
switch (A.key) {
|
|
344
352
|
case "ArrowDown":
|
|
345
|
-
|
|
346
|
-
(
|
|
347
|
-
) :
|
|
353
|
+
A.preventDefault(), h ? w(
|
|
354
|
+
(P) => P < p.length - 1 ? P + 1 : P
|
|
355
|
+
) : v(!0);
|
|
348
356
|
break;
|
|
349
357
|
case "ArrowUp":
|
|
350
|
-
|
|
358
|
+
A.preventDefault(), h && w((P) => P > 0 ? P - 1 : 0);
|
|
351
359
|
break;
|
|
352
360
|
case "Enter":
|
|
353
|
-
|
|
361
|
+
A.preventDefault(), h && C >= 0 && p[C] ? F(p[C]) : h || v(!0);
|
|
354
362
|
break;
|
|
355
363
|
case "Escape":
|
|
356
|
-
|
|
364
|
+
v(!1);
|
|
357
365
|
break;
|
|
358
366
|
case "Tab":
|
|
359
|
-
|
|
367
|
+
v(!1), r(e.name);
|
|
360
368
|
break;
|
|
361
369
|
}
|
|
362
|
-
}, k = (
|
|
363
|
-
const
|
|
364
|
-
E(
|
|
370
|
+
}, k = (A) => {
|
|
371
|
+
const P = A.target.value;
|
|
372
|
+
E(P), w(-1), $.current && clearTimeout($.current), $.current = setTimeout(() => M(P), 300);
|
|
365
373
|
};
|
|
366
374
|
Ie(() => {
|
|
367
375
|
if (h) {
|
|
368
376
|
M(S);
|
|
369
|
-
const
|
|
370
|
-
return () => clearTimeout(
|
|
377
|
+
const A = setTimeout(() => O.current?.focus(), 50);
|
|
378
|
+
return () => clearTimeout(A);
|
|
371
379
|
} else
|
|
372
380
|
w(-1);
|
|
373
381
|
}, [h, M, S]), Ie(() => {
|
|
374
382
|
if (!h) return;
|
|
375
|
-
const
|
|
376
|
-
_.current && !_.current.contains(
|
|
383
|
+
const A = (P) => {
|
|
384
|
+
_.current && !_.current.contains(P.target) && (v(!1), r(e.name));
|
|
377
385
|
};
|
|
378
|
-
return document.addEventListener("mousedown",
|
|
386
|
+
return document.addEventListener("mousedown", A), () => document.removeEventListener("mousedown", A);
|
|
379
387
|
}, [h, e.name, r]);
|
|
380
|
-
const D = (
|
|
381
|
-
|
|
382
|
-
const
|
|
388
|
+
const D = (A, P) => {
|
|
389
|
+
A.stopPropagation();
|
|
390
|
+
const T = Array.isArray(z) ? z : [], q = u ? [] : T.filter((te) => (te?.value ?? te) !== P);
|
|
383
391
|
n(e.name, q), r(e.name);
|
|
384
392
|
};
|
|
385
393
|
return /* @__PURE__ */ L(
|
|
@@ -396,7 +404,7 @@ function gl({
|
|
|
396
404
|
"aria-haspopup": "listbox",
|
|
397
405
|
"aria-controls": `${e.name}-listbox`,
|
|
398
406
|
tabIndex: c ? -1 : 0,
|
|
399
|
-
onClick: () => !c &&
|
|
407
|
+
onClick: () => !c && v(!h),
|
|
400
408
|
onKeyDown: N,
|
|
401
409
|
className: `
|
|
402
410
|
w-full min-h-10 px-2 py-1 border rounded-lg bg-background cursor-pointer
|
|
@@ -406,25 +414,25 @@ function gl({
|
|
|
406
414
|
${c ? "bg-muted opacity-60 cursor-not-allowed" : ""}
|
|
407
415
|
`,
|
|
408
416
|
children: [
|
|
409
|
-
G.length > 0 ? G.map((
|
|
417
|
+
G.length > 0 ? G.map((A) => /* @__PURE__ */ L(
|
|
410
418
|
"span",
|
|
411
419
|
{
|
|
412
420
|
className: "inline-flex items-center px-2 py-0.5 bg-primary/10 text-primary text-xs rounded-sm border border-primary/20",
|
|
413
421
|
children: [
|
|
414
|
-
|
|
422
|
+
A.label,
|
|
415
423
|
!c && /* @__PURE__ */ l(
|
|
416
424
|
"button",
|
|
417
425
|
{
|
|
418
426
|
type: "button",
|
|
419
|
-
"aria-label": `Remove ${
|
|
420
|
-
onClick: (
|
|
427
|
+
"aria-label": `Remove ${A.label}`,
|
|
428
|
+
onClick: (P) => D(P, A.value),
|
|
421
429
|
className: "ml-1 p-0.5 hover:bg-primary/20 rounded-full transition-colors",
|
|
422
430
|
children: /* @__PURE__ */ l(Kr, { className: "w-3 h-3" })
|
|
423
431
|
}
|
|
424
432
|
)
|
|
425
433
|
]
|
|
426
434
|
},
|
|
427
|
-
|
|
435
|
+
A.value
|
|
428
436
|
)) : /* @__PURE__ */ l("span", { className: "text-muted-foreground text-sm leading-tight", children: e.placeholder || "Select..." }),
|
|
429
437
|
/* @__PURE__ */ L("div", { className: "ml-auto flex items-center gap-2", children: [
|
|
430
438
|
m && /* @__PURE__ */ l(Ia, { className: "w-4 h-4 animate-spin text-muted-foreground" }),
|
|
@@ -464,32 +472,35 @@ function gl({
|
|
|
464
472
|
role: "listbox",
|
|
465
473
|
"aria-label": e.label,
|
|
466
474
|
className: "max-h-60 overflow-y-auto p-1",
|
|
467
|
-
children: p.length > 0 ? p.map((
|
|
468
|
-
const
|
|
469
|
-
(te) => te.value ===
|
|
470
|
-
), q =
|
|
475
|
+
children: p.length > 0 ? p.map((A, P) => {
|
|
476
|
+
const T = G.some(
|
|
477
|
+
(te) => te.value === A.value
|
|
478
|
+
), q = P === C;
|
|
471
479
|
return /* @__PURE__ */ L(
|
|
472
480
|
"div",
|
|
473
481
|
{
|
|
474
|
-
id: `${e.name}-opt-${
|
|
482
|
+
id: `${e.name}-opt-${P}`,
|
|
475
483
|
role: "option",
|
|
476
484
|
tabIndex: -1,
|
|
477
|
-
"aria-selected":
|
|
478
|
-
onClick: () => F(
|
|
479
|
-
onKeyDown: (te) => te.key === "Enter" && F(
|
|
480
|
-
onMouseEnter: () => w(
|
|
485
|
+
"aria-selected": T,
|
|
486
|
+
onClick: () => F(A),
|
|
487
|
+
onKeyDown: (te) => te.key === "Enter" && F(A),
|
|
488
|
+
onMouseEnter: () => w(P),
|
|
481
489
|
className: `
|
|
482
490
|
px-3 py-2 text-sm rounded-md cursor-pointer flex items-center justify-between transition-colors outline-none
|
|
483
491
|
${q ? "bg-accent text-accent-foreground" : ""}
|
|
484
|
-
${
|
|
485
|
-
${!q && !
|
|
492
|
+
${T ? "text-primary font-medium" : "text-foreground"}
|
|
493
|
+
${!q && !T ? "hover:bg-muted" : ""}
|
|
486
494
|
`,
|
|
487
495
|
children: [
|
|
488
|
-
/* @__PURE__ */
|
|
489
|
-
|
|
496
|
+
/* @__PURE__ */ L("div", { className: "flex flex-col min-w-0", children: [
|
|
497
|
+
/* @__PURE__ */ l("span", { className: "truncate", children: A.label }),
|
|
498
|
+
A.description && /* @__PURE__ */ l("span", { className: "text-xs text-muted-foreground truncate", children: A.description })
|
|
499
|
+
] }),
|
|
500
|
+
T && /* @__PURE__ */ l(kc, { className: "w-4 h-4 text-primary shrink-0 ml-2" })
|
|
490
501
|
]
|
|
491
502
|
},
|
|
492
|
-
|
|
503
|
+
A.value
|
|
493
504
|
);
|
|
494
505
|
}) : /* @__PURE__ */ l("output", { className: "block py-8 text-center text-sm text-muted-foreground", children: m ? "Searching..." : "No results found" })
|
|
495
506
|
}
|
|
@@ -508,14 +519,14 @@ function ee(e, t, { checkForDefaultPrevented: n = !0 } = {}) {
|
|
|
508
519
|
return t?.(o);
|
|
509
520
|
};
|
|
510
521
|
}
|
|
511
|
-
function
|
|
522
|
+
function yt(e, t = []) {
|
|
512
523
|
let n = [];
|
|
513
524
|
function r(a, s) {
|
|
514
525
|
const i = f.createContext(s), c = n.length;
|
|
515
526
|
n = [...n, s];
|
|
516
527
|
const u = (p) => {
|
|
517
|
-
const { scope: g, children: m, ...b } = p, h = g?.[e]?.[c] || i,
|
|
518
|
-
return /* @__PURE__ */ l(h.Provider, { value:
|
|
528
|
+
const { scope: g, children: m, ...b } = p, h = g?.[e]?.[c] || i, v = f.useMemo(() => b, Object.values(b));
|
|
529
|
+
return /* @__PURE__ */ l(h.Provider, { value: v, children: m });
|
|
519
530
|
};
|
|
520
531
|
u.displayName = a + "Provider";
|
|
521
532
|
function d(p, g) {
|
|
@@ -582,7 +593,7 @@ function de(...e) {
|
|
|
582
593
|
}
|
|
583
594
|
// @__NO_SIDE_EFFECTS__
|
|
584
595
|
function Ee(e) {
|
|
585
|
-
const t = /* @__PURE__ */
|
|
596
|
+
const t = /* @__PURE__ */ vl(e), n = f.forwardRef((r, o) => {
|
|
586
597
|
const { children: a, ...s } = r, i = f.Children.toArray(a), c = i.find(wl);
|
|
587
598
|
if (c) {
|
|
588
599
|
const u = c.props.children, d = i.map((p) => p === c ? f.Children.count(u) > 1 ? f.Children.only(null) : f.isValidElement(u) ? u.props.children : null : p);
|
|
@@ -593,7 +604,7 @@ function Ee(e) {
|
|
|
593
604
|
return n.displayName = `${e}.Slot`, n;
|
|
594
605
|
}
|
|
595
606
|
// @__NO_SIDE_EFFECTS__
|
|
596
|
-
function
|
|
607
|
+
function vl(e) {
|
|
597
608
|
const t = f.forwardRef((n, r) => {
|
|
598
609
|
const { children: o, ...a } = n;
|
|
599
610
|
if (f.isValidElement(o)) {
|
|
@@ -604,9 +615,9 @@ function yl(e) {
|
|
|
604
615
|
});
|
|
605
616
|
return t.displayName = `${e}.SlotClone`, t;
|
|
606
617
|
}
|
|
607
|
-
var
|
|
618
|
+
var yl = /* @__PURE__ */ Symbol("radix.slottable");
|
|
608
619
|
function wl(e) {
|
|
609
|
-
return f.isValidElement(e) && typeof e.type == "function" && "__radixId" in e.type && e.type.__radixId ===
|
|
620
|
+
return f.isValidElement(e) && typeof e.type == "function" && "__radixId" in e.type && e.type.__radixId === yl;
|
|
610
621
|
}
|
|
611
622
|
function xl(e, t) {
|
|
612
623
|
const n = { ...t };
|
|
@@ -624,40 +635,40 @@ function Sl(e) {
|
|
|
624
635
|
return n ? e.ref : (t = Object.getOwnPropertyDescriptor(e, "ref")?.get, n = t && "isReactWarning" in t && t.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
|
|
625
636
|
}
|
|
626
637
|
function La(e) {
|
|
627
|
-
const t = e + "CollectionProvider", [n, r] =
|
|
638
|
+
const t = e + "CollectionProvider", [n, r] = yt(t), [o, a] = n(
|
|
628
639
|
t,
|
|
629
640
|
{ collectionRef: { current: null }, itemMap: /* @__PURE__ */ new Map() }
|
|
630
641
|
), s = (h) => {
|
|
631
|
-
const { scope:
|
|
632
|
-
return /* @__PURE__ */ l(o, { scope:
|
|
642
|
+
const { scope: v, children: S } = h, E = Re.useRef(null), C = Re.useRef(/* @__PURE__ */ new Map()).current;
|
|
643
|
+
return /* @__PURE__ */ l(o, { scope: v, itemMap: C, collectionRef: E, children: S });
|
|
633
644
|
};
|
|
634
645
|
s.displayName = t;
|
|
635
646
|
const i = e + "CollectionSlot", c = /* @__PURE__ */ Ee(i), u = Re.forwardRef(
|
|
636
|
-
(h,
|
|
637
|
-
const { scope: S, children: E } = h, C = a(i, S), w = de(
|
|
647
|
+
(h, v) => {
|
|
648
|
+
const { scope: S, children: E } = h, C = a(i, S), w = de(v, C.collectionRef);
|
|
638
649
|
return /* @__PURE__ */ l(c, { ref: w, children: E });
|
|
639
650
|
}
|
|
640
651
|
);
|
|
641
652
|
u.displayName = i;
|
|
642
653
|
const d = e + "CollectionItemSlot", p = "data-radix-collection-item", g = /* @__PURE__ */ Ee(d), m = Re.forwardRef(
|
|
643
|
-
(h,
|
|
644
|
-
const { scope: S, children: E, ...C } = h, w = Re.useRef(null), x = de(
|
|
645
|
-
return Re.useEffect(() => (
|
|
646
|
-
|
|
654
|
+
(h, v) => {
|
|
655
|
+
const { scope: S, children: E, ...C } = h, w = Re.useRef(null), x = de(v, w), R = a(d, S);
|
|
656
|
+
return Re.useEffect(() => (R.itemMap.set(w, { ref: w, ...C }), () => {
|
|
657
|
+
R.itemMap.delete(w);
|
|
647
658
|
})), /* @__PURE__ */ l(g, { [p]: "", ref: x, children: E });
|
|
648
659
|
}
|
|
649
660
|
);
|
|
650
661
|
m.displayName = d;
|
|
651
662
|
function b(h) {
|
|
652
|
-
const
|
|
663
|
+
const v = a(e + "CollectionConsumer", h);
|
|
653
664
|
return Re.useCallback(() => {
|
|
654
|
-
const E =
|
|
665
|
+
const E = v.collectionRef.current;
|
|
655
666
|
if (!E) return [];
|
|
656
667
|
const C = Array.from(E.querySelectorAll(`[${p}]`));
|
|
657
|
-
return Array.from(
|
|
658
|
-
(
|
|
668
|
+
return Array.from(v.itemMap.values()).sort(
|
|
669
|
+
(R, _) => C.indexOf(R.ref.current) - C.indexOf(_.ref.current)
|
|
659
670
|
);
|
|
660
|
-
}, [
|
|
671
|
+
}, [v.collectionRef, v.itemMap]);
|
|
661
672
|
}
|
|
662
673
|
return [
|
|
663
674
|
{ Provider: s, Slot: u, ItemSlot: m },
|
|
@@ -727,10 +738,10 @@ var Al = "DismissableLayer", Mr = "dismissableLayer.update", Tl = "dismissableLa
|
|
|
727
738
|
onInteractOutside: s,
|
|
728
739
|
onDismiss: i,
|
|
729
740
|
...c
|
|
730
|
-
} = e, u = f.useContext($a), [d, p] = f.useState(null), g = d?.ownerDocument ?? globalThis?.document, [, m] = f.useState({}), b = de(t, (_) => p(_)), h = Array.from(u.layers), [
|
|
741
|
+
} = e, u = f.useContext($a), [d, p] = f.useState(null), g = d?.ownerDocument ?? globalThis?.document, [, m] = f.useState({}), b = de(t, (_) => p(_)), h = Array.from(u.layers), [v] = [...u.layersWithOutsidePointerEventsDisabled].slice(-1), S = h.indexOf(v), E = d ? h.indexOf(d) : -1, C = u.layersWithOutsidePointerEventsDisabled.size > 0, w = E >= S, x = _l((_) => {
|
|
731
742
|
const O = _.target, $ = [...u.branches].some((z) => z.contains(O));
|
|
732
743
|
!w || $ || (o?.(_), s?.(_), _.defaultPrevented || i?.());
|
|
733
|
-
}, g),
|
|
744
|
+
}, g), R = Ml((_) => {
|
|
734
745
|
const O = _.target;
|
|
735
746
|
[...u.branches].some((z) => z.contains(O)) || (a?.(_), s?.(_), _.defaultPrevented || i?.());
|
|
736
747
|
}, g);
|
|
@@ -755,8 +766,8 @@ var Al = "DismissableLayer", Mr = "dismissableLayer.update", Tl = "dismissableLa
|
|
|
755
766
|
pointerEvents: C ? w ? "auto" : "none" : void 0,
|
|
756
767
|
...e.style
|
|
757
768
|
},
|
|
758
|
-
onFocusCapture: ee(e.onFocusCapture,
|
|
759
|
-
onBlurCapture: ee(e.onBlurCapture,
|
|
769
|
+
onFocusCapture: ee(e.onFocusCapture, R.onFocusCapture),
|
|
770
|
+
onBlurCapture: ee(e.onBlurCapture, R.onBlurCapture),
|
|
760
771
|
onPointerDownCapture: ee(
|
|
761
772
|
e.onPointerDownCapture,
|
|
762
773
|
x.onPointerDownCapture
|
|
@@ -888,7 +899,7 @@ var Dl = [
|
|
|
888
899
|
if (m.paused || !i) return;
|
|
889
900
|
const w = C.target;
|
|
890
901
|
i.contains(w) ? p.current = w : tt(p.current, { select: !0 });
|
|
891
|
-
},
|
|
902
|
+
}, v = function(C) {
|
|
892
903
|
if (m.paused || !i) return;
|
|
893
904
|
const w = C.relatedTarget;
|
|
894
905
|
w !== null && (i.contains(w) || tt(p.current, { select: !0 }));
|
|
@@ -897,10 +908,10 @@ var Dl = [
|
|
|
897
908
|
for (const x of C)
|
|
898
909
|
x.removedNodes.length > 0 && tt(i);
|
|
899
910
|
};
|
|
900
|
-
document.addEventListener("focusin", h), document.addEventListener("focusout",
|
|
911
|
+
document.addEventListener("focusin", h), document.addEventListener("focusout", v);
|
|
901
912
|
const E = new MutationObserver(S);
|
|
902
913
|
return i && E.observe(i, { childList: !0, subtree: !0 }), () => {
|
|
903
|
-
document.removeEventListener("focusin", h), document.removeEventListener("focusout",
|
|
914
|
+
document.removeEventListener("focusin", h), document.removeEventListener("focusout", v), E.disconnect();
|
|
904
915
|
};
|
|
905
916
|
}
|
|
906
917
|
}, [r, i, m.paused]), f.useEffect(() => {
|
|
@@ -922,8 +933,8 @@ var Dl = [
|
|
|
922
933
|
const b = f.useCallback(
|
|
923
934
|
(h) => {
|
|
924
935
|
if (!n && !r || m.paused) return;
|
|
925
|
-
const
|
|
926
|
-
if (
|
|
936
|
+
const v = h.key === "Tab" && !h.altKey && !h.ctrlKey && !h.metaKey, S = document.activeElement;
|
|
937
|
+
if (v && S) {
|
|
927
938
|
const E = h.currentTarget, [C, w] = $l(E);
|
|
928
939
|
C && w ? !h.shiftKey && S === w ? (h.preventDefault(), n && tt(C, { select: !0 })) : h.shiftKey && S === C && (h.preventDefault(), n && tt(w, { select: !0 })) : S === E && h.preventDefault();
|
|
929
940
|
}
|
|
@@ -994,12 +1005,12 @@ function Uo(e, t) {
|
|
|
994
1005
|
function Bl(e) {
|
|
995
1006
|
return e.filter((t) => t.tagName !== "A");
|
|
996
1007
|
}
|
|
997
|
-
var
|
|
1008
|
+
var ye = globalThis?.document ? f.useLayoutEffect : () => {
|
|
998
1009
|
}, Ul = f[" useId ".trim().toString()] || (() => {
|
|
999
1010
|
}), Vl = 0;
|
|
1000
1011
|
function nn(e) {
|
|
1001
1012
|
const [t, n] = f.useState(Ul());
|
|
1002
|
-
return
|
|
1013
|
+
return ye(() => {
|
|
1003
1014
|
n((r) => r ?? String(Vl++));
|
|
1004
1015
|
}, [e]), e || (t ? `radix-${t}` : "");
|
|
1005
1016
|
}
|
|
@@ -1171,8 +1182,8 @@ async function eu(e, t) {
|
|
|
1171
1182
|
elementContext: p = "floating",
|
|
1172
1183
|
altBoundary: g = !1,
|
|
1173
1184
|
padding: m = 0
|
|
1174
|
-
} = qe(t, e), b = Ba(m),
|
|
1175
|
-
element: (n = await (a.isElement == null ? void 0 : a.isElement(
|
|
1185
|
+
} = qe(t, e), b = Ba(m), v = i[g ? p === "floating" ? "reference" : "floating" : p], S = Rn(await a.getClippingRect({
|
|
1186
|
+
element: (n = await (a.isElement == null ? void 0 : a.isElement(v))) == null || n ? v : v.contextElement || await (a.getDocumentElement == null ? void 0 : a.getDocumentElement(i.floating)),
|
|
1176
1187
|
boundary: u,
|
|
1177
1188
|
rootBoundary: d,
|
|
1178
1189
|
strategy: c
|
|
@@ -1220,17 +1231,17 @@ const tu = 50, nu = async (e, t, n) => {
|
|
|
1220
1231
|
} = Go(u, r, c), g = r, m = 0;
|
|
1221
1232
|
const b = {};
|
|
1222
1233
|
for (let h = 0; h < a.length; h++) {
|
|
1223
|
-
const
|
|
1224
|
-
if (!
|
|
1234
|
+
const v = a[h];
|
|
1235
|
+
if (!v)
|
|
1225
1236
|
continue;
|
|
1226
1237
|
const {
|
|
1227
1238
|
name: S,
|
|
1228
1239
|
fn: E
|
|
1229
|
-
} =
|
|
1240
|
+
} = v, {
|
|
1230
1241
|
x: C,
|
|
1231
1242
|
y: w,
|
|
1232
1243
|
data: x,
|
|
1233
|
-
reset:
|
|
1244
|
+
reset: R
|
|
1234
1245
|
} = await E({
|
|
1235
1246
|
x: d,
|
|
1236
1247
|
y: p,
|
|
@@ -1248,11 +1259,11 @@ const tu = 50, nu = async (e, t, n) => {
|
|
|
1248
1259
|
d = C ?? d, p = w ?? p, b[S] = {
|
|
1249
1260
|
...b[S],
|
|
1250
1261
|
...x
|
|
1251
|
-
},
|
|
1262
|
+
}, R && m < tu && (m++, typeof R == "object" && (R.placement && (g = R.placement), R.rects && (u = R.rects === !0 ? await s.getElementRects({
|
|
1252
1263
|
reference: e,
|
|
1253
1264
|
floating: t,
|
|
1254
1265
|
strategy: o
|
|
1255
|
-
}) :
|
|
1266
|
+
}) : R.rects), {
|
|
1256
1267
|
x: d,
|
|
1257
1268
|
y: p
|
|
1258
1269
|
} = Go(u, g, c)), h = -1);
|
|
@@ -1285,9 +1296,9 @@ const tu = 50, nu = async (e, t, n) => {
|
|
|
1285
1296
|
const p = Ba(d), g = {
|
|
1286
1297
|
x: n,
|
|
1287
1298
|
y: r
|
|
1288
|
-
}, m = no(o), b = to(m), h = await s.getDimensions(u),
|
|
1289
|
-
let _ =
|
|
1290
|
-
(!_ || !await (s.isElement == null ? void 0 : s.isElement(
|
|
1299
|
+
}, m = no(o), b = to(m), h = await s.getDimensions(u), v = m === "y", S = v ? "top" : "left", E = v ? "bottom" : "right", C = v ? "clientHeight" : "clientWidth", w = a.reference[b] + a.reference[m] - g[m] - a.floating[b], x = g[m] - a.reference[m], R = await (s.getOffsetParent == null ? void 0 : s.getOffsetParent(u));
|
|
1300
|
+
let _ = R ? R[C] : 0;
|
|
1301
|
+
(!_ || !await (s.isElement == null ? void 0 : s.isElement(R))) && (_ = i.floating[C] || a.floating[b]);
|
|
1291
1302
|
const O = w / 2 - x / 2, $ = _ / 2 - h[b] / 2 - 1, z = rt(p[S], $), B = rt(p[E], $), G = z, M = _ - h[b] - B, F = _ / 2 - h[b] / 2 + O, N = Dr(G, F, M), k = !c.arrow && Lt(o) != null && F !== N && a.reference[b] / 2 - (F < G ? z : B) - h[b] / 2 < 0, D = k ? F < G ? F - G : F - M : 0;
|
|
1292
1303
|
return {
|
|
1293
1304
|
[m]: g[m] + D,
|
|
@@ -1321,13 +1332,13 @@ const tu = 50, nu = async (e, t, n) => {
|
|
|
1321
1332
|
fallbackStrategy: m = "bestFit",
|
|
1322
1333
|
fallbackAxisSideDirection: b = "none",
|
|
1323
1334
|
flipAlignment: h = !0,
|
|
1324
|
-
...
|
|
1335
|
+
...v
|
|
1325
1336
|
} = qe(e, t);
|
|
1326
1337
|
if ((n = a.arrow) != null && n.alignmentOffset)
|
|
1327
1338
|
return {};
|
|
1328
|
-
const S = Ke(o), E = Ue(i), C = Ke(i) === i, w = await (c.isRTL == null ? void 0 : c.isRTL(u.floating)), x = g || (C || !h ? [Tn(i)] : ql(i)),
|
|
1329
|
-
!g &&
|
|
1330
|
-
const _ = [i, ...x], O = await c.detectOverflow(t,
|
|
1339
|
+
const S = Ke(o), E = Ue(i), C = Ke(i) === i, w = await (c.isRTL == null ? void 0 : c.isRTL(u.floating)), x = g || (C || !h ? [Tn(i)] : ql(i)), R = b !== "none";
|
|
1340
|
+
!g && R && x.push(...Zl(i, h, b, w));
|
|
1341
|
+
const _ = [i, ...x], O = await c.detectOverflow(t, v), $ = [];
|
|
1331
1342
|
let z = ((r = a.flip) == null ? void 0 : r.overflows) || [];
|
|
1332
1343
|
if (d && $.push(O[S]), p) {
|
|
1333
1344
|
const F = Yl(o, s, w);
|
|
@@ -1341,7 +1352,7 @@ const tu = 50, nu = async (e, t, n) => {
|
|
|
1341
1352
|
const F = (((B = a.flip) == null ? void 0 : B.index) || 0) + 1, N = _[F];
|
|
1342
1353
|
if (N && (!(p === "alignment" ? E !== Ue(N) : !1) || // We leave the current main axis only if every placement on that axis
|
|
1343
1354
|
// overflows the main axis.
|
|
1344
|
-
z.every((
|
|
1355
|
+
z.every((A) => Ue(A.placement) === E ? A.overflows[0] > 0 : !0)))
|
|
1345
1356
|
return {
|
|
1346
1357
|
data: {
|
|
1347
1358
|
index: F,
|
|
@@ -1351,20 +1362,20 @@ const tu = 50, nu = async (e, t, n) => {
|
|
|
1351
1362
|
placement: N
|
|
1352
1363
|
}
|
|
1353
1364
|
};
|
|
1354
|
-
let k = (G = z.filter((D) => D.overflows[0] <= 0).sort((D,
|
|
1365
|
+
let k = (G = z.filter((D) => D.overflows[0] <= 0).sort((D, A) => D.overflows[1] - A.overflows[1])[0]) == null ? void 0 : G.placement;
|
|
1355
1366
|
if (!k)
|
|
1356
1367
|
switch (m) {
|
|
1357
1368
|
case "bestFit": {
|
|
1358
1369
|
var M;
|
|
1359
|
-
const D = (M = z.filter((
|
|
1360
|
-
if (
|
|
1361
|
-
const
|
|
1362
|
-
return
|
|
1370
|
+
const D = (M = z.filter((A) => {
|
|
1371
|
+
if (R) {
|
|
1372
|
+
const P = Ue(A.placement);
|
|
1373
|
+
return P === E || // Create a bias to the `y` side axis due to horizontal
|
|
1363
1374
|
// reading directions favoring greater width.
|
|
1364
|
-
|
|
1375
|
+
P === "y";
|
|
1365
1376
|
}
|
|
1366
1377
|
return !0;
|
|
1367
|
-
}).map((
|
|
1378
|
+
}).map((A) => [A.placement, A.overflows.filter((P) => P > 0).reduce((P, T) => P + T, 0)]).sort((A, P) => A[1] - P[1])[0]) == null ? void 0 : M[0];
|
|
1368
1379
|
D && (k = D);
|
|
1369
1380
|
break;
|
|
1370
1381
|
}
|
|
@@ -1525,16 +1536,16 @@ const iu = function(e) {
|
|
|
1525
1536
|
const S = g === "y" ? "top" : "left", E = g === "y" ? "bottom" : "right", C = h + p[S], w = h - p[E];
|
|
1526
1537
|
h = Dr(C, h, w);
|
|
1527
1538
|
}
|
|
1528
|
-
const
|
|
1539
|
+
const v = c.fn({
|
|
1529
1540
|
...t,
|
|
1530
1541
|
[m]: b,
|
|
1531
1542
|
[g]: h
|
|
1532
1543
|
});
|
|
1533
1544
|
return {
|
|
1534
|
-
...
|
|
1545
|
+
...v,
|
|
1535
1546
|
data: {
|
|
1536
|
-
x:
|
|
1537
|
-
y:
|
|
1547
|
+
x: v.x - n,
|
|
1548
|
+
y: v.y - r,
|
|
1538
1549
|
enabled: {
|
|
1539
1550
|
[m]: s,
|
|
1540
1551
|
[g]: i
|
|
@@ -1562,7 +1573,7 @@ const iu = function(e) {
|
|
|
1562
1573
|
y: r
|
|
1563
1574
|
}, p = Ue(o), g = eo(p);
|
|
1564
1575
|
let m = d[g], b = d[p];
|
|
1565
|
-
const h = qe(i, t),
|
|
1576
|
+
const h = qe(i, t), v = typeof h == "number" ? {
|
|
1566
1577
|
mainAxis: h,
|
|
1567
1578
|
crossAxis: 0
|
|
1568
1579
|
} : {
|
|
@@ -1571,13 +1582,13 @@ const iu = function(e) {
|
|
|
1571
1582
|
...h
|
|
1572
1583
|
};
|
|
1573
1584
|
if (c) {
|
|
1574
|
-
const C = g === "y" ? "height" : "width", w = a.reference[g] - a.floating[C] +
|
|
1585
|
+
const C = g === "y" ? "height" : "width", w = a.reference[g] - a.floating[C] + v.mainAxis, x = a.reference[g] + a.reference[C] - v.mainAxis;
|
|
1575
1586
|
m < w ? m = w : m > x && (m = x);
|
|
1576
1587
|
}
|
|
1577
1588
|
if (u) {
|
|
1578
1589
|
var S, E;
|
|
1579
|
-
const C = g === "y" ? "width" : "height", w = Ua.has(Ke(o)), x = a.reference[p] - a.floating[C] + (w && ((S = s.offset) == null ? void 0 : S[p]) || 0) + (w ? 0 :
|
|
1580
|
-
b < x ? b = x : b >
|
|
1590
|
+
const C = g === "y" ? "width" : "height", w = Ua.has(Ke(o)), x = a.reference[p] - a.floating[C] + (w && ((S = s.offset) == null ? void 0 : S[p]) || 0) + (w ? 0 : v.crossAxis), R = a.reference[p] + a.reference[C] + (w ? 0 : ((E = s.offset) == null ? void 0 : E[p]) || 0) - (w ? v.crossAxis : 0);
|
|
1591
|
+
b < x ? b = x : b > R && (b = R);
|
|
1581
1592
|
}
|
|
1582
1593
|
return {
|
|
1583
1594
|
[g]: m,
|
|
@@ -1604,11 +1615,11 @@ const iu = function(e) {
|
|
|
1604
1615
|
width: b,
|
|
1605
1616
|
height: h
|
|
1606
1617
|
} = a.floating;
|
|
1607
|
-
let
|
|
1608
|
-
p === "top" || p === "bottom" ? (
|
|
1609
|
-
const E = h - d.top - d.bottom, C = b - d.left - d.right, w = rt(h - d[
|
|
1618
|
+
let v, S;
|
|
1619
|
+
p === "top" || p === "bottom" ? (v = p, S = g === (await (s.isRTL == null ? void 0 : s.isRTL(i.floating)) ? "start" : "end") ? "left" : "right") : (S = p, v = g === "end" ? "top" : "bottom");
|
|
1620
|
+
const E = h - d.top - d.bottom, C = b - d.left - d.right, w = rt(h - d[v], E), x = rt(b - d[S], C), R = !t.middlewareData.shift;
|
|
1610
1621
|
let _ = w, O = x;
|
|
1611
|
-
if ((n = t.middlewareData.shift) != null && n.enabled.x && (O = C), (r = t.middlewareData.shift) != null && r.enabled.y && (_ = E),
|
|
1622
|
+
if ((n = t.middlewareData.shift) != null && n.enabled.x && (O = C), (r = t.middlewareData.shift) != null && r.enabled.y && (_ = E), R && !g) {
|
|
1612
1623
|
const z = ke(d.left, 0), B = ke(d.right, 0), G = ke(d.top, 0), M = ke(d.bottom, 0);
|
|
1613
1624
|
m ? O = b - 2 * (z !== 0 || B !== 0 ? z + B : ke(d.left, d.right)) : _ = h - 2 * (G !== 0 || M !== 0 ? G + M : ke(d.top, d.bottom));
|
|
1614
1625
|
}
|
|
@@ -1790,8 +1801,8 @@ function gt(e, t, n, r) {
|
|
|
1790
1801
|
const g = Ae(a), m = r && Le(r) ? Ae(r) : r;
|
|
1791
1802
|
let b = g, h = Lr(b);
|
|
1792
1803
|
for (; h && r && m !== b; ) {
|
|
1793
|
-
const
|
|
1794
|
-
c *=
|
|
1804
|
+
const v = Ot(h), S = h.getBoundingClientRect(), E = Fe(h), C = S.left + (h.clientLeft + parseFloat(E.paddingLeft)) * v.x, w = S.top + (h.clientTop + parseFloat(E.paddingTop)) * v.y;
|
|
1805
|
+
c *= v.x, u *= v.y, d *= v.x, p *= v.y, c += C, u += w, b = Ae(h), h = Lr(b);
|
|
1795
1806
|
}
|
|
1796
1807
|
}
|
|
1797
1808
|
return Rn({
|
|
@@ -1839,10 +1850,10 @@ function bu(e) {
|
|
|
1839
1850
|
y: n.y * u.y - c.scrollTop * u.y + d.y + g.y
|
|
1840
1851
|
};
|
|
1841
1852
|
}
|
|
1842
|
-
function
|
|
1853
|
+
function vu(e) {
|
|
1843
1854
|
return Array.from(e.getClientRects());
|
|
1844
1855
|
}
|
|
1845
|
-
function
|
|
1856
|
+
function yu(e) {
|
|
1846
1857
|
const t = je(e), n = Wn(e), r = e.ownerDocument.body, o = ke(t.scrollWidth, t.clientWidth, r.scrollWidth, r.clientWidth), a = ke(t.scrollHeight, t.clientHeight, r.scrollHeight, r.clientHeight);
|
|
1847
1858
|
let s = -n.scrollLeft + Hn(e);
|
|
1848
1859
|
const i = -n.scrollTop;
|
|
@@ -1888,7 +1899,7 @@ function Qo(e, t, n) {
|
|
|
1888
1899
|
if (t === "viewport")
|
|
1889
1900
|
r = wu(e, n);
|
|
1890
1901
|
else if (t === "document")
|
|
1891
|
-
r =
|
|
1902
|
+
r = yu(je(e));
|
|
1892
1903
|
else if (Le(t))
|
|
1893
1904
|
r = xu(t, n);
|
|
1894
1905
|
else {
|
|
@@ -2023,7 +2034,7 @@ const Tu = {
|
|
|
2023
2034
|
getClippingRect: Cu,
|
|
2024
2035
|
getOffsetParent: Xa,
|
|
2025
2036
|
getElementRects: ku,
|
|
2026
|
-
getClientRects:
|
|
2037
|
+
getClientRects: vu,
|
|
2027
2038
|
getDimensions: Eu,
|
|
2028
2039
|
getScale: Ot,
|
|
2029
2040
|
isElement: Le,
|
|
@@ -2049,13 +2060,13 @@ function Ru(e, t) {
|
|
|
2049
2060
|
} = u;
|
|
2050
2061
|
if (i || t(), !g || !m)
|
|
2051
2062
|
return;
|
|
2052
|
-
const b = mn(p), h = mn(o.clientWidth - (d + g)),
|
|
2053
|
-
rootMargin: -b + "px " + -h + "px " + -
|
|
2063
|
+
const b = mn(p), h = mn(o.clientWidth - (d + g)), v = mn(o.clientHeight - (p + m)), S = mn(d), C = {
|
|
2064
|
+
rootMargin: -b + "px " + -h + "px " + -v + "px " + -S + "px",
|
|
2054
2065
|
threshold: ke(0, rt(1, c)) || 1
|
|
2055
2066
|
};
|
|
2056
2067
|
let w = !0;
|
|
2057
|
-
function x(
|
|
2058
|
-
const _ =
|
|
2068
|
+
function x(R) {
|
|
2069
|
+
const _ = R[0].intersectionRatio;
|
|
2059
2070
|
if (_ !== c) {
|
|
2060
2071
|
if (!w)
|
|
2061
2072
|
return s();
|
|
@@ -2102,10 +2113,10 @@ function Pu(e, t, n, r) {
|
|
|
2102
2113
|
})), n();
|
|
2103
2114
|
}), u && !c && m.observe(u), t && m.observe(t));
|
|
2104
2115
|
let b, h = c ? gt(e) : null;
|
|
2105
|
-
c &&
|
|
2106
|
-
function
|
|
2116
|
+
c && v();
|
|
2117
|
+
function v() {
|
|
2107
2118
|
const S = gt(e);
|
|
2108
|
-
h && !Qa(h, S) && n(), h = S, b = requestAnimationFrame(
|
|
2119
|
+
h && !Qa(h, S) && n(), h = S, b = requestAnimationFrame(v);
|
|
2109
2120
|
}
|
|
2110
2121
|
return n(), () => {
|
|
2111
2122
|
var S;
|
|
@@ -2195,35 +2206,35 @@ function Wu(e) {
|
|
|
2195
2206
|
isPositioned: !1
|
|
2196
2207
|
}), [g, m] = f.useState(r);
|
|
2197
2208
|
Pn(g, r) || m(r);
|
|
2198
|
-
const [b, h] = f.useState(null), [
|
|
2199
|
-
|
|
2200
|
-
}, []), C = f.useCallback((
|
|
2201
|
-
|
|
2202
|
-
}, []), w = a || b, x = s ||
|
|
2203
|
-
if (!
|
|
2209
|
+
const [b, h] = f.useState(null), [v, S] = f.useState(null), E = f.useCallback((A) => {
|
|
2210
|
+
A !== R.current && (R.current = A, h(A));
|
|
2211
|
+
}, []), C = f.useCallback((A) => {
|
|
2212
|
+
A !== _.current && (_.current = A, S(A));
|
|
2213
|
+
}, []), w = a || b, x = s || v, R = f.useRef(null), _ = f.useRef(null), O = f.useRef(d), $ = c != null, z = br(c), B = br(o), G = br(u), M = f.useCallback(() => {
|
|
2214
|
+
if (!R.current || !_.current)
|
|
2204
2215
|
return;
|
|
2205
|
-
const
|
|
2216
|
+
const A = {
|
|
2206
2217
|
placement: t,
|
|
2207
2218
|
strategy: n,
|
|
2208
2219
|
middleware: g
|
|
2209
2220
|
};
|
|
2210
|
-
B.current && (
|
|
2211
|
-
const
|
|
2212
|
-
...
|
|
2221
|
+
B.current && (A.platform = B.current), Fu(R.current, _.current, A).then((P) => {
|
|
2222
|
+
const T = {
|
|
2223
|
+
...P,
|
|
2213
2224
|
// The floating element's position may be recomputed while it's closed
|
|
2214
2225
|
// but still mounted (such as when transitioning out). To ensure
|
|
2215
2226
|
// `isPositioned` will be `false` initially on the next open, avoid
|
|
2216
2227
|
// setting it to `true` when `open === false` (must be specified).
|
|
2217
2228
|
isPositioned: G.current !== !1
|
|
2218
2229
|
};
|
|
2219
|
-
F.current && !Pn(O.current,
|
|
2220
|
-
p(
|
|
2230
|
+
F.current && !Pn(O.current, T) && (O.current = T, Ln.flushSync(() => {
|
|
2231
|
+
p(T);
|
|
2221
2232
|
}));
|
|
2222
2233
|
});
|
|
2223
2234
|
}, [g, t, n, B, G]);
|
|
2224
2235
|
Sn(() => {
|
|
2225
|
-
u === !1 && O.current.isPositioned && (O.current.isPositioned = !1, p((
|
|
2226
|
-
...
|
|
2236
|
+
u === !1 && O.current.isPositioned && (O.current.isPositioned = !1, p((A) => ({
|
|
2237
|
+
...A,
|
|
2227
2238
|
isPositioned: !1
|
|
2228
2239
|
})));
|
|
2229
2240
|
}, [u]);
|
|
@@ -2231,14 +2242,14 @@ function Wu(e) {
|
|
|
2231
2242
|
Sn(() => (F.current = !0, () => {
|
|
2232
2243
|
F.current = !1;
|
|
2233
2244
|
}), []), Sn(() => {
|
|
2234
|
-
if (w && (
|
|
2245
|
+
if (w && (R.current = w), x && (_.current = x), w && x) {
|
|
2235
2246
|
if (z.current)
|
|
2236
2247
|
return z.current(w, x, M);
|
|
2237
2248
|
M();
|
|
2238
2249
|
}
|
|
2239
2250
|
}, [w, x, M, z, $]);
|
|
2240
2251
|
const N = f.useMemo(() => ({
|
|
2241
|
-
reference:
|
|
2252
|
+
reference: R,
|
|
2242
2253
|
floating: _,
|
|
2243
2254
|
setReference: E,
|
|
2244
2255
|
setFloating: C
|
|
@@ -2246,24 +2257,24 @@ function Wu(e) {
|
|
|
2246
2257
|
reference: w,
|
|
2247
2258
|
floating: x
|
|
2248
2259
|
}), [w, x]), D = f.useMemo(() => {
|
|
2249
|
-
const
|
|
2260
|
+
const A = {
|
|
2250
2261
|
position: n,
|
|
2251
2262
|
left: 0,
|
|
2252
2263
|
top: 0
|
|
2253
2264
|
};
|
|
2254
2265
|
if (!k.floating)
|
|
2255
|
-
return
|
|
2256
|
-
const
|
|
2266
|
+
return A;
|
|
2267
|
+
const P = ea(k.floating, d.x), T = ea(k.floating, d.y);
|
|
2257
2268
|
return i ? {
|
|
2258
|
-
...
|
|
2259
|
-
transform: "translate(" +
|
|
2269
|
+
...A,
|
|
2270
|
+
transform: "translate(" + P + "px, " + T + "px)",
|
|
2260
2271
|
...Za(k.floating) >= 1.5 && {
|
|
2261
2272
|
willChange: "transform"
|
|
2262
2273
|
}
|
|
2263
2274
|
} : {
|
|
2264
2275
|
position: n,
|
|
2265
|
-
left:
|
|
2266
|
-
top:
|
|
2276
|
+
left: P,
|
|
2277
|
+
top: T
|
|
2267
2278
|
};
|
|
2268
2279
|
}, [n, i, k.floating, d.x, d.y]);
|
|
2269
2280
|
return f.useMemo(() => ({
|
|
@@ -2408,7 +2419,7 @@ var Zu = Ja, Ju = [
|
|
|
2408
2419
|
}, {});
|
|
2409
2420
|
function ts(e) {
|
|
2410
2421
|
const [t, n] = f.useState(void 0);
|
|
2411
|
-
return
|
|
2422
|
+
return ye(() => {
|
|
2412
2423
|
if (e) {
|
|
2413
2424
|
n({ width: e.offsetWidth, height: e.offsetHeight });
|
|
2414
2425
|
const r = new ResizeObserver((o) => {
|
|
@@ -2428,7 +2439,7 @@ function ts(e) {
|
|
|
2428
2439
|
n(void 0);
|
|
2429
2440
|
}, [e]), t;
|
|
2430
2441
|
}
|
|
2431
|
-
var so = "Popper", [ns, Bn] =
|
|
2442
|
+
var so = "Popper", [ns, Bn] = yt(so), [ed, rs] = ns(so), os = (e) => {
|
|
2432
2443
|
const { __scopePopper: t, children: n } = e, [r, o] = f.useState(null);
|
|
2433
2444
|
return /* @__PURE__ */ l(ed, { scope: t, anchor: r, onAnchorChange: o, children: n });
|
|
2434
2445
|
};
|
|
@@ -2460,12 +2471,12 @@ var io = "PopperContent", [td, nd] = ns(io), is = f.forwardRef(
|
|
|
2460
2471
|
updatePositionStrategy: m = "optimized",
|
|
2461
2472
|
onPlaced: b,
|
|
2462
2473
|
...h
|
|
2463
|
-
} = e,
|
|
2474
|
+
} = e, v = rs(io, n), [S, E] = f.useState(null), C = de(t, (V) => E(V)), [w, x] = f.useState(null), R = ts(w), _ = R?.width ?? 0, O = R?.height ?? 0, $ = r + (a !== "center" ? "-" + a : ""), z = typeof d == "number" ? d : { top: 0, right: 0, bottom: 0, left: 0, ...d }, B = Array.isArray(u) ? u : [u], G = B.length > 0, M = {
|
|
2464
2475
|
padding: z,
|
|
2465
2476
|
boundary: B.filter(od),
|
|
2466
2477
|
// with `strategy: 'fixed'`, this is the only way to get it to respect boundaries
|
|
2467
2478
|
altBoundary: G
|
|
2468
|
-
}, { refs: F, floatingStyles: N, placement: k, isPositioned: D, middlewareData:
|
|
2479
|
+
}, { refs: F, floatingStyles: N, placement: k, isPositioned: D, middlewareData: A } = Wu({
|
|
2469
2480
|
// default to `fixed` strategy so users don't have to pick and we also avoid focus scroll issues
|
|
2470
2481
|
strategy: "fixed",
|
|
2471
2482
|
placement: $,
|
|
@@ -2473,7 +2484,7 @@ var io = "PopperContent", [td, nd] = ns(io), is = f.forwardRef(
|
|
|
2473
2484
|
animationFrame: m === "always"
|
|
2474
2485
|
}),
|
|
2475
2486
|
elements: {
|
|
2476
|
-
reference:
|
|
2487
|
+
reference: v.anchor
|
|
2477
2488
|
},
|
|
2478
2489
|
middleware: [
|
|
2479
2490
|
Bu({ mainAxis: o + O, alignmentAxis: s }),
|
|
@@ -2495,12 +2506,12 @@ var io = "PopperContent", [td, nd] = ns(io), is = f.forwardRef(
|
|
|
2495
2506
|
ad({ arrowWidth: _, arrowHeight: O }),
|
|
2496
2507
|
g && Yu({ strategy: "referenceHidden", ...M })
|
|
2497
2508
|
]
|
|
2498
|
-
}), [
|
|
2499
|
-
|
|
2509
|
+
}), [P, T] = us(k), q = nt(b);
|
|
2510
|
+
ye(() => {
|
|
2500
2511
|
D && q?.();
|
|
2501
2512
|
}, [D, q]);
|
|
2502
|
-
const te =
|
|
2503
|
-
return
|
|
2513
|
+
const te = A.arrow?.x, K = A.arrow?.y, ge = A.arrow?.centerOffset !== 0, [Y, oe] = f.useState();
|
|
2514
|
+
return ye(() => {
|
|
2504
2515
|
S && oe(window.getComputedStyle(S).zIndex);
|
|
2505
2516
|
}, [S]), /* @__PURE__ */ l(
|
|
2506
2517
|
"div",
|
|
@@ -2514,13 +2525,13 @@ var io = "PopperContent", [td, nd] = ns(io), is = f.forwardRef(
|
|
|
2514
2525
|
minWidth: "max-content",
|
|
2515
2526
|
zIndex: Y,
|
|
2516
2527
|
"--radix-popper-transform-origin": [
|
|
2517
|
-
|
|
2518
|
-
|
|
2528
|
+
A.transformOrigin?.x,
|
|
2529
|
+
A.transformOrigin?.y
|
|
2519
2530
|
].join(" "),
|
|
2520
2531
|
// hide the content if using the hide middleware and should be hidden
|
|
2521
2532
|
// set visibility to hidden and disable pointer events so the UI behaves
|
|
2522
2533
|
// as if the PopperContent isn't there at all
|
|
2523
|
-
...
|
|
2534
|
+
...A.hide?.referenceHidden && {
|
|
2524
2535
|
visibility: "hidden",
|
|
2525
2536
|
pointerEvents: "none"
|
|
2526
2537
|
}
|
|
@@ -2530,7 +2541,7 @@ var io = "PopperContent", [td, nd] = ns(io), is = f.forwardRef(
|
|
|
2530
2541
|
td,
|
|
2531
2542
|
{
|
|
2532
2543
|
scope: n,
|
|
2533
|
-
placedSide:
|
|
2544
|
+
placedSide: P,
|
|
2534
2545
|
onArrowChange: x,
|
|
2535
2546
|
arrowX: te,
|
|
2536
2547
|
arrowY: K,
|
|
@@ -2538,8 +2549,8 @@ var io = "PopperContent", [td, nd] = ns(io), is = f.forwardRef(
|
|
|
2538
2549
|
children: /* @__PURE__ */ l(
|
|
2539
2550
|
es.div,
|
|
2540
2551
|
{
|
|
2541
|
-
"data-side":
|
|
2542
|
-
"data-align":
|
|
2552
|
+
"data-side": P,
|
|
2553
|
+
"data-align": T,
|
|
2543
2554
|
...h,
|
|
2544
2555
|
ref: C,
|
|
2545
2556
|
style: {
|
|
@@ -2650,7 +2661,7 @@ var ds = os, co = ss, fs = is, ms = ls, sd = [
|
|
|
2650
2661
|
return r.displayName = `Primitive.${t}`, { ...e, [t]: r };
|
|
2651
2662
|
}, {}), cd = "Portal", lo = f.forwardRef((e, t) => {
|
|
2652
2663
|
const { container: n, ...r } = e, [o, a] = f.useState(!1);
|
|
2653
|
-
|
|
2664
|
+
ye(() => a(!0), []);
|
|
2654
2665
|
const s = n || o && globalThis?.document?.body;
|
|
2655
2666
|
return s ? uc.createPortal(/* @__PURE__ */ l(id.div, { ...r, ref: t }), s) : null;
|
|
2656
2667
|
});
|
|
@@ -2679,7 +2690,7 @@ var ld = [
|
|
|
2679
2690
|
return typeof window < "u" && (window[/* @__PURE__ */ Symbol.for("radix-ui")] = !0), /* @__PURE__ */ l(c, { ...i, ref: a });
|
|
2680
2691
|
});
|
|
2681
2692
|
return r.displayName = `Primitive.${t}`, { ...e, [t]: r };
|
|
2682
|
-
}, {}), ud = f[" useInsertionEffect ".trim().toString()] ||
|
|
2693
|
+
}, {}), ud = f[" useInsertionEffect ".trim().toString()] || ye;
|
|
2683
2694
|
function en({
|
|
2684
2695
|
prop: e,
|
|
2685
2696
|
defaultProp: t,
|
|
@@ -2782,9 +2793,9 @@ var bd = function(e) {
|
|
|
2782
2793
|
return null;
|
|
2783
2794
|
var t = Array.isArray(e) ? e[0] : e;
|
|
2784
2795
|
return t.ownerDocument.body;
|
|
2785
|
-
}, kt = /* @__PURE__ */ new WeakMap(), pn = /* @__PURE__ */ new WeakMap(), hn = {},
|
|
2796
|
+
}, kt = /* @__PURE__ */ new WeakMap(), pn = /* @__PURE__ */ new WeakMap(), hn = {}, vr = 0, gs = function(e) {
|
|
2786
2797
|
return e && (e.host || gs(e.parentNode));
|
|
2787
|
-
},
|
|
2798
|
+
}, vd = function(e, t) {
|
|
2788
2799
|
return t.map(function(n) {
|
|
2789
2800
|
if (e.contains(n))
|
|
2790
2801
|
return n;
|
|
@@ -2793,8 +2804,8 @@ var bd = function(e) {
|
|
|
2793
2804
|
}).filter(function(n) {
|
|
2794
2805
|
return !!n;
|
|
2795
2806
|
});
|
|
2796
|
-
},
|
|
2797
|
-
var o =
|
|
2807
|
+
}, yd = function(e, t, n, r) {
|
|
2808
|
+
var o = vd(t, Array.isArray(e) ? e : [e]);
|
|
2798
2809
|
hn[n] || (hn[n] = /* @__PURE__ */ new WeakMap());
|
|
2799
2810
|
var a = hn[n], s = [], i = /* @__PURE__ */ new Set(), c = new Set(o), u = function(p) {
|
|
2800
2811
|
!p || i.has(p) || (i.add(p), u(p.parentNode));
|
|
@@ -2806,23 +2817,23 @@ var bd = function(e) {
|
|
|
2806
2817
|
d(g);
|
|
2807
2818
|
else
|
|
2808
2819
|
try {
|
|
2809
|
-
var m = g.getAttribute(r), b = m !== null && m !== "false", h = (kt.get(g) || 0) + 1,
|
|
2810
|
-
kt.set(g, h), a.set(g,
|
|
2820
|
+
var m = g.getAttribute(r), b = m !== null && m !== "false", h = (kt.get(g) || 0) + 1, v = (a.get(g) || 0) + 1;
|
|
2821
|
+
kt.set(g, h), a.set(g, v), s.push(g), h === 1 && b && pn.set(g, !0), v === 1 && g.setAttribute(n, "true"), b || g.setAttribute(r, "true");
|
|
2811
2822
|
} catch (S) {
|
|
2812
2823
|
console.error("aria-hidden: cannot operate on ", g, S);
|
|
2813
2824
|
}
|
|
2814
2825
|
});
|
|
2815
2826
|
};
|
|
2816
|
-
return d(t), i.clear(),
|
|
2827
|
+
return d(t), i.clear(), vr++, function() {
|
|
2817
2828
|
s.forEach(function(p) {
|
|
2818
2829
|
var g = kt.get(p) - 1, m = a.get(p) - 1;
|
|
2819
2830
|
kt.set(p, g), a.set(p, m), g || (pn.has(p) || p.removeAttribute(r), pn.delete(p)), m || p.removeAttribute(n);
|
|
2820
|
-
}),
|
|
2831
|
+
}), vr--, vr || (kt = /* @__PURE__ */ new WeakMap(), kt = /* @__PURE__ */ new WeakMap(), pn = /* @__PURE__ */ new WeakMap(), hn = {});
|
|
2821
2832
|
};
|
|
2822
2833
|
}, bs = function(e, t, n) {
|
|
2823
2834
|
n === void 0 && (n = "data-aria-hidden");
|
|
2824
2835
|
var r = Array.from(Array.isArray(e) ? e : [e]), o = bd(e);
|
|
2825
|
-
return o ? (r.push.apply(r, Array.from(o.querySelectorAll("[aria-live], script"))),
|
|
2836
|
+
return o ? (r.push.apply(r, Array.from(o.querySelectorAll("[aria-live], script"))), yd(r, o, n, "aria-hidden")) : function() {
|
|
2826
2837
|
return null;
|
|
2827
2838
|
};
|
|
2828
2839
|
}, Be = function() {
|
|
@@ -2834,7 +2845,7 @@ var bd = function(e) {
|
|
|
2834
2845
|
return t;
|
|
2835
2846
|
}, Be.apply(this, arguments);
|
|
2836
2847
|
};
|
|
2837
|
-
function
|
|
2848
|
+
function vs(e, t) {
|
|
2838
2849
|
var n = {};
|
|
2839
2850
|
for (var r in e) Object.prototype.hasOwnProperty.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
|
|
2840
2851
|
if (e != null && typeof Object.getOwnPropertySymbols == "function")
|
|
@@ -2848,7 +2859,7 @@ function wd(e, t, n) {
|
|
|
2848
2859
|
return e.concat(a || Array.prototype.slice.call(t));
|
|
2849
2860
|
}
|
|
2850
2861
|
var Cn = "right-scroll-bar-position", En = "width-before-scroll-bar", xd = "with-scroll-bars-hidden", Sd = "--removed-body-scroll-bar-size";
|
|
2851
|
-
function
|
|
2862
|
+
function yr(e, t) {
|
|
2852
2863
|
return typeof e == "function" ? e(t) : e && (e.current = t), e;
|
|
2853
2864
|
}
|
|
2854
2865
|
function Cd(e, t) {
|
|
@@ -2876,7 +2887,7 @@ var Ed = typeof window < "u" ? f.useLayoutEffect : f.useEffect, ta = /* @__PURE_
|
|
|
2876
2887
|
function Nd(e, t) {
|
|
2877
2888
|
var n = Cd(null, function(r) {
|
|
2878
2889
|
return e.forEach(function(o) {
|
|
2879
|
-
return
|
|
2890
|
+
return yr(o, r);
|
|
2880
2891
|
});
|
|
2881
2892
|
});
|
|
2882
2893
|
return Ed(function() {
|
|
@@ -2884,9 +2895,9 @@ function Nd(e, t) {
|
|
|
2884
2895
|
if (r) {
|
|
2885
2896
|
var o = new Set(r), a = new Set(e), s = n.current;
|
|
2886
2897
|
o.forEach(function(i) {
|
|
2887
|
-
a.has(i) ||
|
|
2898
|
+
a.has(i) || yr(i, null);
|
|
2888
2899
|
}), a.forEach(function(i) {
|
|
2889
|
-
o.has(i) ||
|
|
2900
|
+
o.has(i) || yr(i, s);
|
|
2890
2901
|
});
|
|
2891
2902
|
}
|
|
2892
2903
|
ta.set(n, e);
|
|
@@ -2955,8 +2966,8 @@ function Td(e) {
|
|
|
2955
2966
|
var t = Ad(null);
|
|
2956
2967
|
return t.options = Be({ async: !0, ssr: !1 }, e), t;
|
|
2957
2968
|
}
|
|
2958
|
-
var
|
|
2959
|
-
var t = e.sideCar, n =
|
|
2969
|
+
var ys = function(e) {
|
|
2970
|
+
var t = e.sideCar, n = vs(e, ["sideCar"]);
|
|
2960
2971
|
if (!t)
|
|
2961
2972
|
throw new Error("Sidecar: please provide `sideCar` property to import the right car");
|
|
2962
2973
|
var r = t.read();
|
|
@@ -2964,9 +2975,9 @@ var vs = function(e) {
|
|
|
2964
2975
|
throw new Error("Sidecar medium not found");
|
|
2965
2976
|
return f.createElement(r, Be({}, n));
|
|
2966
2977
|
};
|
|
2967
|
-
|
|
2978
|
+
ys.isSideCarExport = !0;
|
|
2968
2979
|
function Rd(e, t) {
|
|
2969
|
-
return e.useMedium(t),
|
|
2980
|
+
return e.useMedium(t), ys;
|
|
2970
2981
|
}
|
|
2971
2982
|
var ws = Td(), wr = function() {
|
|
2972
2983
|
}, Un = f.forwardRef(function(e, t) {
|
|
@@ -2974,12 +2985,12 @@ var ws = Td(), wr = function() {
|
|
|
2974
2985
|
onScrollCapture: wr,
|
|
2975
2986
|
onWheelCapture: wr,
|
|
2976
2987
|
onTouchMoveCapture: wr
|
|
2977
|
-
}), o = r[0], a = r[1], s = e.forwardProps, i = e.children, c = e.className, u = e.removeScrollBar, d = e.enabled, p = e.shards, g = e.sideCar, m = e.noRelative, b = e.noIsolation, h = e.inert,
|
|
2988
|
+
}), o = r[0], a = r[1], s = e.forwardProps, i = e.children, c = e.className, u = e.removeScrollBar, d = e.enabled, p = e.shards, g = e.sideCar, m = e.noRelative, b = e.noIsolation, h = e.inert, v = e.allowPinchZoom, S = e.as, E = S === void 0 ? "div" : S, C = e.gapMode, w = vs(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noRelative", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]), x = g, R = Nd([n, t]), _ = Be(Be({}, w), o);
|
|
2978
2989
|
return f.createElement(
|
|
2979
2990
|
f.Fragment,
|
|
2980
2991
|
null,
|
|
2981
|
-
d && f.createElement(x, { sideCar: ws, removeScrollBar: u, shards: p, noRelative: m, noIsolation: b, inert: h, setCallbacks: a, allowPinchZoom: !!
|
|
2982
|
-
s ? f.cloneElement(f.Children.only(i), Be(Be({}, _), { ref:
|
|
2992
|
+
d && f.createElement(x, { sideCar: ws, removeScrollBar: u, shards: p, noRelative: m, noIsolation: b, inert: h, setCallbacks: a, allowPinchZoom: !!v, lockRef: n, gapMode: C }),
|
|
2993
|
+
s ? f.cloneElement(f.Children.only(i), Be(Be({}, _), { ref: R })) : f.createElement(E, Be({}, _, { className: c, ref: R }), i)
|
|
2983
2994
|
);
|
|
2984
2995
|
});
|
|
2985
2996
|
Un.defaultProps = {
|
|
@@ -3181,7 +3192,7 @@ var At = Fr ? { passive: !1 } : !1, Ud = function(e) {
|
|
|
3181
3192
|
do {
|
|
3182
3193
|
if (!i)
|
|
3183
3194
|
break;
|
|
3184
|
-
var m = Es(e, i), b = m[0], h = m[1],
|
|
3195
|
+
var m = Es(e, i), b = m[0], h = m[1], v = m[2], S = h - v - a * b;
|
|
3185
3196
|
(b || S) && Cs(e, i) && (p += S, g += b);
|
|
3186
3197
|
var E = i.parentNode;
|
|
3187
3198
|
i = E && E.nodeType === Node.DOCUMENT_FRAGMENT_NODE ? E.host : E;
|
|
@@ -3213,52 +3224,52 @@ function Jd(e) {
|
|
|
3213
3224
|
if (e.inert) {
|
|
3214
3225
|
document.body.classList.add("block-interactivity-".concat(o));
|
|
3215
3226
|
var h = wd([e.lockRef.current], (e.shards || []).map(aa), !0).filter(Boolean);
|
|
3216
|
-
return h.forEach(function(
|
|
3217
|
-
return
|
|
3227
|
+
return h.forEach(function(v) {
|
|
3228
|
+
return v.classList.add("allow-interactivity-".concat(o));
|
|
3218
3229
|
}), function() {
|
|
3219
|
-
document.body.classList.remove("block-interactivity-".concat(o)), h.forEach(function(
|
|
3220
|
-
return
|
|
3230
|
+
document.body.classList.remove("block-interactivity-".concat(o)), h.forEach(function(v) {
|
|
3231
|
+
return v.classList.remove("allow-interactivity-".concat(o));
|
|
3221
3232
|
});
|
|
3222
3233
|
};
|
|
3223
3234
|
}
|
|
3224
3235
|
}, [e.inert, e.lockRef.current, e.shards]);
|
|
3225
|
-
var i = f.useCallback(function(h,
|
|
3236
|
+
var i = f.useCallback(function(h, v) {
|
|
3226
3237
|
if ("touches" in h && h.touches.length === 2 || h.type === "wheel" && h.ctrlKey)
|
|
3227
3238
|
return !s.current.allowPinchZoom;
|
|
3228
|
-
var S = bn(h), E = n.current, C = "deltaX" in h ? h.deltaX : E[0] - S[0], w = "deltaY" in h ? h.deltaY : E[1] - S[1], x,
|
|
3229
|
-
if ("touches" in h && _ === "h" &&
|
|
3239
|
+
var S = bn(h), E = n.current, C = "deltaX" in h ? h.deltaX : E[0] - S[0], w = "deltaY" in h ? h.deltaY : E[1] - S[1], x, R = h.target, _ = Math.abs(C) > Math.abs(w) ? "h" : "v";
|
|
3240
|
+
if ("touches" in h && _ === "h" && R.type === "range")
|
|
3230
3241
|
return !1;
|
|
3231
|
-
var O = window.getSelection(), $ = O && O.anchorNode, z = $ ? $ ===
|
|
3242
|
+
var O = window.getSelection(), $ = O && O.anchorNode, z = $ ? $ === R || $.contains(R) : !1;
|
|
3232
3243
|
if (z)
|
|
3233
3244
|
return !1;
|
|
3234
|
-
var B = ra(_,
|
|
3245
|
+
var B = ra(_, R);
|
|
3235
3246
|
if (!B)
|
|
3236
3247
|
return !0;
|
|
3237
|
-
if (B ? x = _ : (x = _ === "v" ? "h" : "v", B = ra(_,
|
|
3248
|
+
if (B ? x = _ : (x = _ === "v" ? "h" : "v", B = ra(_, R)), !B)
|
|
3238
3249
|
return !1;
|
|
3239
3250
|
if (!r.current && "changedTouches" in h && (C || w) && (r.current = x), !x)
|
|
3240
3251
|
return !0;
|
|
3241
3252
|
var G = r.current || x;
|
|
3242
|
-
return Kd(G,
|
|
3253
|
+
return Kd(G, v, h, G === "h" ? C : w);
|
|
3243
3254
|
}, []), c = f.useCallback(function(h) {
|
|
3244
|
-
var
|
|
3255
|
+
var v = h;
|
|
3245
3256
|
if (!(!Tt.length || Tt[Tt.length - 1] !== a)) {
|
|
3246
|
-
var S = "deltaY" in
|
|
3247
|
-
return x.name ===
|
|
3257
|
+
var S = "deltaY" in v ? oa(v) : bn(v), E = t.current.filter(function(x) {
|
|
3258
|
+
return x.name === v.type && (x.target === v.target || v.target === x.shadowParent) && Xd(x.delta, S);
|
|
3248
3259
|
})[0];
|
|
3249
3260
|
if (E && E.should) {
|
|
3250
|
-
|
|
3261
|
+
v.cancelable && v.preventDefault();
|
|
3251
3262
|
return;
|
|
3252
3263
|
}
|
|
3253
3264
|
if (!E) {
|
|
3254
3265
|
var C = (s.current.shards || []).map(aa).filter(Boolean).filter(function(x) {
|
|
3255
|
-
return x.contains(
|
|
3256
|
-
}), w = C.length > 0 ? i(
|
|
3257
|
-
w &&
|
|
3266
|
+
return x.contains(v.target);
|
|
3267
|
+
}), w = C.length > 0 ? i(v, C[0]) : !s.current.noIsolation;
|
|
3268
|
+
w && v.cancelable && v.preventDefault();
|
|
3258
3269
|
}
|
|
3259
3270
|
}
|
|
3260
|
-
}, []), u = f.useCallback(function(h,
|
|
3261
|
-
var C = { name: h, delta:
|
|
3271
|
+
}, []), u = f.useCallback(function(h, v, S, E) {
|
|
3272
|
+
var C = { name: h, delta: v, target: S, should: E, shadowParent: ef(S) };
|
|
3262
3273
|
t.current.push(C), setTimeout(function() {
|
|
3263
3274
|
t.current = t.current.filter(function(w) {
|
|
3264
3275
|
return w !== C;
|
|
@@ -3300,7 +3311,7 @@ var uo = f.forwardRef(function(e, t) {
|
|
|
3300
3311
|
return f.createElement(Un, Be({}, e, { ref: t, sideCar: tf }));
|
|
3301
3312
|
});
|
|
3302
3313
|
uo.classNames = Un.classNames;
|
|
3303
|
-
var nf = [" ", "Enter", "ArrowUp", "ArrowDown"], rf = [" ", "Enter"], bt = "Select", [Vn, jn, of] = La(bt), [$t] =
|
|
3314
|
+
var nf = [" ", "Enter", "ArrowUp", "ArrowDown"], rf = [" ", "Enter"], bt = "Select", [Vn, jn, of] = La(bt), [$t] = yt(bt, [
|
|
3304
3315
|
of,
|
|
3305
3316
|
Bn
|
|
3306
3317
|
]), Gn = Bn(), [af, st] = $t(bt), [sf, cf] = $t(bt), Ns = (e) => {
|
|
@@ -3319,7 +3330,7 @@ var nf = [" ", "Enter", "ArrowUp", "ArrowDown"], rf = [" ", "Enter"], bt = "Sele
|
|
|
3319
3330
|
disabled: g,
|
|
3320
3331
|
required: m,
|
|
3321
3332
|
form: b
|
|
3322
|
-
} = e, h = Gn(t), [
|
|
3333
|
+
} = e, h = Gn(t), [v, S] = f.useState(null), [E, C] = f.useState(null), [w, x] = f.useState(!1), R = Qr(u), [_, O] = en({
|
|
3323
3334
|
prop: r,
|
|
3324
3335
|
defaultProp: o ?? !1,
|
|
3325
3336
|
onChange: a,
|
|
@@ -3329,13 +3340,13 @@ var nf = [" ", "Enter", "ArrowUp", "ArrowDown"], rf = [" ", "Enter"], bt = "Sele
|
|
|
3329
3340
|
defaultProp: i,
|
|
3330
3341
|
onChange: c,
|
|
3331
3342
|
caller: bt
|
|
3332
|
-
}), B = f.useRef(null), G =
|
|
3343
|
+
}), B = f.useRef(null), G = v ? b || !!v.closest("form") : !0, [M, F] = f.useState(/* @__PURE__ */ new Set()), N = Array.from(M).map((k) => k.props.value).join(";");
|
|
3333
3344
|
return /* @__PURE__ */ l(ds, { ...h, children: /* @__PURE__ */ L(
|
|
3334
3345
|
af,
|
|
3335
3346
|
{
|
|
3336
3347
|
required: m,
|
|
3337
3348
|
scope: t,
|
|
3338
|
-
trigger:
|
|
3349
|
+
trigger: v,
|
|
3339
3350
|
onTriggerChange: S,
|
|
3340
3351
|
valueNode: E,
|
|
3341
3352
|
onValueNodeChange: C,
|
|
@@ -3346,7 +3357,7 @@ var nf = [" ", "Enter", "ArrowUp", "ArrowDown"], rf = [" ", "Enter"], bt = "Sele
|
|
|
3346
3357
|
onValueChange: z,
|
|
3347
3358
|
open: _,
|
|
3348
3359
|
onOpenChange: O,
|
|
3349
|
-
dir:
|
|
3360
|
+
dir: R,
|
|
3350
3361
|
triggerPointerDownPosRef: B,
|
|
3351
3362
|
disabled: g,
|
|
3352
3363
|
children: [
|
|
@@ -3359,8 +3370,8 @@ var nf = [" ", "Enter", "ArrowUp", "ArrowDown"], rf = [" ", "Enter"], bt = "Sele
|
|
|
3359
3370
|
}, []),
|
|
3360
3371
|
onNativeOptionRemove: f.useCallback((k) => {
|
|
3361
3372
|
F((D) => {
|
|
3362
|
-
const
|
|
3363
|
-
return
|
|
3373
|
+
const A = new Set(D);
|
|
3374
|
+
return A.delete(k), A;
|
|
3364
3375
|
});
|
|
3365
3376
|
}, []),
|
|
3366
3377
|
children: n
|
|
@@ -3393,7 +3404,7 @@ Ns.displayName = bt;
|
|
|
3393
3404
|
var ks = "SelectTrigger", As = f.forwardRef(
|
|
3394
3405
|
(e, t) => {
|
|
3395
3406
|
const { __scopeSelect: n, disabled: r = !1, ...o } = e, a = Gn(n), s = st(ks, n), i = s.disabled || r, c = de(t, s.onTriggerChange), u = jn(n), d = f.useRef("touch"), [p, g, m] = Qs((h) => {
|
|
3396
|
-
const
|
|
3407
|
+
const v = u().filter((C) => !C.disabled), S = v.find((C) => C.value === s.value), E = Zs(v, h, S);
|
|
3397
3408
|
E !== void 0 && s.onValueChange(E.value);
|
|
3398
3409
|
}), b = (h) => {
|
|
3399
3410
|
i || (s.onOpenChange(!0), m()), h && (s.triggerPointerDownPosRef.current = {
|
|
@@ -3422,12 +3433,12 @@ var ks = "SelectTrigger", As = f.forwardRef(
|
|
|
3422
3433
|
}),
|
|
3423
3434
|
onPointerDown: ee(o.onPointerDown, (h) => {
|
|
3424
3435
|
d.current = h.pointerType;
|
|
3425
|
-
const
|
|
3426
|
-
|
|
3436
|
+
const v = h.target;
|
|
3437
|
+
v.hasPointerCapture(h.pointerId) && v.releasePointerCapture(h.pointerId), h.button === 0 && h.ctrlKey === !1 && h.pointerType === "mouse" && (b(h), h.preventDefault());
|
|
3427
3438
|
}),
|
|
3428
3439
|
onKeyDown: ee(o.onKeyDown, (h) => {
|
|
3429
|
-
const
|
|
3430
|
-
!(h.ctrlKey || h.altKey || h.metaKey) && h.key.length === 1 && g(h.key), !(
|
|
3440
|
+
const v = p.current !== "";
|
|
3441
|
+
!(h.ctrlKey || h.altKey || h.metaKey) && h.key.length === 1 && g(h.key), !(v && h.key === " ") && nf.includes(h.key) && (b(), h.preventDefault());
|
|
3431
3442
|
})
|
|
3432
3443
|
}
|
|
3433
3444
|
) });
|
|
@@ -3437,7 +3448,7 @@ As.displayName = ks;
|
|
|
3437
3448
|
var Ts = "SelectValue", Rs = f.forwardRef(
|
|
3438
3449
|
(e, t) => {
|
|
3439
3450
|
const { __scopeSelect: n, className: r, style: o, children: a, placeholder: s = "", ...i } = e, c = st(Ts, n), { onValueNodeHasChildrenChange: u } = c, d = a !== void 0, p = de(t, c.onValueNodeChange);
|
|
3440
|
-
return
|
|
3451
|
+
return ye(() => {
|
|
3441
3452
|
u(d);
|
|
3442
3453
|
}, [u, d]), /* @__PURE__ */ l(
|
|
3443
3454
|
Te.span,
|
|
@@ -3460,10 +3471,10 @@ var lf = "SelectIcon", Ps = f.forwardRef(
|
|
|
3460
3471
|
Ps.displayName = lf;
|
|
3461
3472
|
var uf = "SelectPortal", Os = (e) => /* @__PURE__ */ l(lo, { asChild: !0, ...e });
|
|
3462
3473
|
Os.displayName = uf;
|
|
3463
|
-
var
|
|
3474
|
+
var vt = "SelectContent", _s = f.forwardRef(
|
|
3464
3475
|
(e, t) => {
|
|
3465
|
-
const n = st(
|
|
3466
|
-
if (
|
|
3476
|
+
const n = st(vt, e.__scopeSelect), [r, o] = f.useState();
|
|
3477
|
+
if (ye(() => {
|
|
3467
3478
|
o(new DocumentFragment());
|
|
3468
3479
|
}, []), !n.open) {
|
|
3469
3480
|
const a = r;
|
|
@@ -3475,8 +3486,8 @@ var yt = "SelectContent", _s = f.forwardRef(
|
|
|
3475
3486
|
return /* @__PURE__ */ l(Ds, { ...e, ref: t });
|
|
3476
3487
|
}
|
|
3477
3488
|
);
|
|
3478
|
-
_s.displayName =
|
|
3479
|
-
var Me = 10, [Ms, it] = $t(
|
|
3489
|
+
_s.displayName = vt;
|
|
3490
|
+
var Me = 10, [Ms, it] = $t(vt), df = "SelectContentImpl", ff = /* @__PURE__ */ Ee("SelectContent.RemoveScroll"), Ds = f.forwardRef(
|
|
3480
3491
|
(e, t) => {
|
|
3481
3492
|
const {
|
|
3482
3493
|
__scopeSelect: n,
|
|
@@ -3495,10 +3506,10 @@ var Me = 10, [Ms, it] = $t(yt), df = "SelectContentImpl", ff = /* @__PURE__ */ E
|
|
|
3495
3506
|
collisionPadding: m,
|
|
3496
3507
|
sticky: b,
|
|
3497
3508
|
hideWhenDetached: h,
|
|
3498
|
-
avoidCollisions:
|
|
3509
|
+
avoidCollisions: v,
|
|
3499
3510
|
//
|
|
3500
3511
|
...S
|
|
3501
|
-
} = e, E = st(
|
|
3512
|
+
} = e, E = st(vt, n), [C, w] = f.useState(null), [x, R] = f.useState(null), _ = de(t, (V) => w(V)), [O, $] = f.useState(null), [z, B] = f.useState(
|
|
3502
3513
|
null
|
|
3503
3514
|
), G = jn(n), [M, F] = f.useState(!1), N = f.useRef(!1);
|
|
3504
3515
|
f.useEffect(() => {
|
|
@@ -3518,29 +3529,29 @@ var Me = 10, [Ms, it] = $t(yt), df = "SelectContentImpl", ff = /* @__PURE__ */ E
|
|
|
3518
3529
|
f.useEffect(() => {
|
|
3519
3530
|
M && D();
|
|
3520
3531
|
}, [M, D]);
|
|
3521
|
-
const { onOpenChange:
|
|
3532
|
+
const { onOpenChange: A, triggerPointerDownPosRef: P } = E;
|
|
3522
3533
|
f.useEffect(() => {
|
|
3523
3534
|
if (C) {
|
|
3524
3535
|
let V = { x: 0, y: 0 };
|
|
3525
3536
|
const J = (ne) => {
|
|
3526
3537
|
V = {
|
|
3527
|
-
x: Math.abs(Math.round(ne.pageX) - (
|
|
3528
|
-
y: Math.abs(Math.round(ne.pageY) - (
|
|
3538
|
+
x: Math.abs(Math.round(ne.pageX) - (P.current?.x ?? 0)),
|
|
3539
|
+
y: Math.abs(Math.round(ne.pageY) - (P.current?.y ?? 0))
|
|
3529
3540
|
};
|
|
3530
3541
|
}, Z = (ne) => {
|
|
3531
|
-
V.x <= 10 && V.y <= 10 ? ne.preventDefault() : C.contains(ne.target) ||
|
|
3542
|
+
V.x <= 10 && V.y <= 10 ? ne.preventDefault() : C.contains(ne.target) || A(!1), document.removeEventListener("pointermove", J), P.current = null;
|
|
3532
3543
|
};
|
|
3533
|
-
return
|
|
3544
|
+
return P.current !== null && (document.addEventListener("pointermove", J), document.addEventListener("pointerup", Z, { capture: !0, once: !0 })), () => {
|
|
3534
3545
|
document.removeEventListener("pointermove", J), document.removeEventListener("pointerup", Z, { capture: !0 });
|
|
3535
3546
|
};
|
|
3536
3547
|
}
|
|
3537
|
-
}, [C,
|
|
3538
|
-
const V = () =>
|
|
3548
|
+
}, [C, A, P]), f.useEffect(() => {
|
|
3549
|
+
const V = () => A(!1);
|
|
3539
3550
|
return window.addEventListener("blur", V), window.addEventListener("resize", V), () => {
|
|
3540
3551
|
window.removeEventListener("blur", V), window.removeEventListener("resize", V);
|
|
3541
3552
|
};
|
|
3542
|
-
}, [
|
|
3543
|
-
const [
|
|
3553
|
+
}, [A]);
|
|
3554
|
+
const [T, q] = Qs((V) => {
|
|
3544
3555
|
const J = G().filter((re) => !re.disabled), Z = J.find((re) => re.ref.current === document.activeElement), ne = Zs(J, V, Z);
|
|
3545
3556
|
ne && setTimeout(() => ne.ref.current.focus());
|
|
3546
3557
|
}), te = f.useCallback(
|
|
@@ -3565,7 +3576,7 @@ var Me = 10, [Ms, it] = $t(yt), df = "SelectContentImpl", ff = /* @__PURE__ */ E
|
|
|
3565
3576
|
collisionPadding: m,
|
|
3566
3577
|
sticky: b,
|
|
3567
3578
|
hideWhenDetached: h,
|
|
3568
|
-
avoidCollisions:
|
|
3579
|
+
avoidCollisions: v
|
|
3569
3580
|
} : {};
|
|
3570
3581
|
return /* @__PURE__ */ l(
|
|
3571
3582
|
Ms,
|
|
@@ -3573,7 +3584,7 @@ var Me = 10, [Ms, it] = $t(yt), df = "SelectContentImpl", ff = /* @__PURE__ */ E
|
|
|
3573
3584
|
scope: n,
|
|
3574
3585
|
content: C,
|
|
3575
3586
|
viewport: x,
|
|
3576
|
-
onViewportChange:
|
|
3587
|
+
onViewportChange: R,
|
|
3577
3588
|
itemRefCallback: te,
|
|
3578
3589
|
selectedItem: O,
|
|
3579
3590
|
onItemLeave: K,
|
|
@@ -3582,7 +3593,7 @@ var Me = 10, [Ms, it] = $t(yt), df = "SelectContentImpl", ff = /* @__PURE__ */ E
|
|
|
3582
3593
|
selectedItemText: z,
|
|
3583
3594
|
position: r,
|
|
3584
3595
|
isPositioned: M,
|
|
3585
|
-
searchRef:
|
|
3596
|
+
searchRef: T,
|
|
3586
3597
|
children: /* @__PURE__ */ l(uo, { as: ff, allowPinchZoom: !0, children: /* @__PURE__ */ l(
|
|
3587
3598
|
Jr,
|
|
3588
3599
|
{
|
|
@@ -3646,8 +3657,8 @@ var Me = 10, [Ms, it] = $t(yt), df = "SelectContentImpl", ff = /* @__PURE__ */ E
|
|
|
3646
3657
|
);
|
|
3647
3658
|
Ds.displayName = df;
|
|
3648
3659
|
var mf = "SelectItemAlignedPosition", Is = f.forwardRef((e, t) => {
|
|
3649
|
-
const { __scopeSelect: n, onPlaced: r, ...o } = e, a = st(
|
|
3650
|
-
if (a.trigger && a.valueNode && i && u && h &&
|
|
3660
|
+
const { __scopeSelect: n, onPlaced: r, ...o } = e, a = st(vt, n), s = it(vt, n), [i, c] = f.useState(null), [u, d] = f.useState(null), p = de(t, (_) => d(_)), g = jn(n), m = f.useRef(!1), b = f.useRef(!0), { viewport: h, selectedItem: v, selectedItemText: S, focusSelectedItem: E } = s, C = f.useCallback(() => {
|
|
3661
|
+
if (a.trigger && a.valueNode && i && u && h && v && S) {
|
|
3651
3662
|
const _ = a.trigger.getBoundingClientRect(), O = u.getBoundingClientRect(), $ = a.valueNode.getBoundingClientRect(), z = S.getBoundingClientRect();
|
|
3652
3663
|
if (a.dir !== "rtl") {
|
|
3653
3664
|
const re = z.left - O.left, se = $.left - re, le = _.left - se, he = _.width + le, Oe = Math.max(he, O.width), ut = window.innerWidth - Me, dt = Io(se, [
|
|
@@ -3667,9 +3678,9 @@ var mf = "SelectItemAlignedPosition", Is = f.forwardRef((e, t) => {
|
|
|
3667
3678
|
]);
|
|
3668
3679
|
i.style.minWidth = he + "px", i.style.right = dt + "px";
|
|
3669
3680
|
}
|
|
3670
|
-
const B = g(), G = window.innerHeight - Me * 2, M = h.scrollHeight, F = window.getComputedStyle(u), N = parseInt(F.borderTopWidth, 10), k = parseInt(F.paddingTop, 10), D = parseInt(F.borderBottomWidth, 10),
|
|
3681
|
+
const B = g(), G = window.innerHeight - Me * 2, M = h.scrollHeight, F = window.getComputedStyle(u), N = parseInt(F.borderTopWidth, 10), k = parseInt(F.paddingTop, 10), D = parseInt(F.borderBottomWidth, 10), A = parseInt(F.paddingBottom, 10), P = N + k + M + A + D, T = Math.min(v.offsetHeight * 5, P), q = window.getComputedStyle(h), te = parseInt(q.paddingTop, 10), K = parseInt(q.paddingBottom, 10), ge = _.top + _.height / 2 - Me, Y = G - ge, oe = v.offsetHeight / 2, V = v.offsetTop + oe, J = N + k + V, Z = P - J;
|
|
3671
3682
|
if (J <= ge) {
|
|
3672
|
-
const re = B.length > 0 &&
|
|
3683
|
+
const re = B.length > 0 && v === B[B.length - 1].ref.current;
|
|
3673
3684
|
i.style.bottom = "0px";
|
|
3674
3685
|
const se = u.clientHeight - h.offsetTop - h.offsetHeight, le = Math.max(
|
|
3675
3686
|
Y,
|
|
@@ -3678,7 +3689,7 @@ var mf = "SelectItemAlignedPosition", Is = f.forwardRef((e, t) => {
|
|
|
3678
3689
|
), he = J + le;
|
|
3679
3690
|
i.style.height = he + "px";
|
|
3680
3691
|
} else {
|
|
3681
|
-
const re = B.length > 0 &&
|
|
3692
|
+
const re = B.length > 0 && v === B[0].ref.current;
|
|
3682
3693
|
i.style.top = "0px";
|
|
3683
3694
|
const le = Math.max(
|
|
3684
3695
|
ge,
|
|
@@ -3687,7 +3698,7 @@ var mf = "SelectItemAlignedPosition", Is = f.forwardRef((e, t) => {
|
|
|
3687
3698
|
) + Z;
|
|
3688
3699
|
i.style.height = le + "px", h.scrollTop = J - ge + h.offsetTop;
|
|
3689
3700
|
}
|
|
3690
|
-
i.style.margin = `${Me}px 0`, i.style.minHeight =
|
|
3701
|
+
i.style.margin = `${Me}px 0`, i.style.minHeight = T + "px", i.style.maxHeight = G + "px", r?.(), requestAnimationFrame(() => m.current = !0);
|
|
3691
3702
|
}
|
|
3692
3703
|
}, [
|
|
3693
3704
|
g,
|
|
@@ -3696,17 +3707,17 @@ var mf = "SelectItemAlignedPosition", Is = f.forwardRef((e, t) => {
|
|
|
3696
3707
|
i,
|
|
3697
3708
|
u,
|
|
3698
3709
|
h,
|
|
3699
|
-
|
|
3710
|
+
v,
|
|
3700
3711
|
S,
|
|
3701
3712
|
a.dir,
|
|
3702
3713
|
r
|
|
3703
3714
|
]);
|
|
3704
|
-
|
|
3715
|
+
ye(() => C(), [C]);
|
|
3705
3716
|
const [w, x] = f.useState();
|
|
3706
|
-
|
|
3717
|
+
ye(() => {
|
|
3707
3718
|
u && x(window.getComputedStyle(u).zIndex);
|
|
3708
3719
|
}, [u]);
|
|
3709
|
-
const
|
|
3720
|
+
const R = f.useCallback(
|
|
3710
3721
|
(_) => {
|
|
3711
3722
|
_ && b.current === !0 && (C(), E?.(), b.current = !1);
|
|
3712
3723
|
},
|
|
@@ -3718,7 +3729,7 @@ var mf = "SelectItemAlignedPosition", Is = f.forwardRef((e, t) => {
|
|
|
3718
3729
|
scope: n,
|
|
3719
3730
|
contentWrapper: i,
|
|
3720
3731
|
shouldExpandOnScrollRef: m,
|
|
3721
|
-
onScrollButtonChange:
|
|
3732
|
+
onScrollButtonChange: R,
|
|
3722
3733
|
children: /* @__PURE__ */ l(
|
|
3723
3734
|
"div",
|
|
3724
3735
|
{
|
|
@@ -3779,7 +3790,7 @@ var pf = "SelectPopperPosition", $r = f.forwardRef((e, t) => {
|
|
|
3779
3790
|
);
|
|
3780
3791
|
});
|
|
3781
3792
|
$r.displayName = pf;
|
|
3782
|
-
var [hf, fo] = $t(
|
|
3793
|
+
var [hf, fo] = $t(vt, {}), zr = "SelectViewport", Ls = f.forwardRef(
|
|
3783
3794
|
(e, t) => {
|
|
3784
3795
|
const { __scopeSelect: n, nonce: r, ...o } = e, a = it(zr, n), s = fo(zr, n), i = de(t, a.onViewportChange), c = f.useRef(0);
|
|
3785
3796
|
return /* @__PURE__ */ L(It, { children: [
|
|
@@ -3817,7 +3828,7 @@ var [hf, fo] = $t(yt, {}), zr = "SelectViewport", Ls = f.forwardRef(
|
|
|
3817
3828
|
if (g?.current && p) {
|
|
3818
3829
|
const m = Math.abs(c.current - d.scrollTop);
|
|
3819
3830
|
if (m > 0) {
|
|
3820
|
-
const b = window.innerHeight - Me * 2, h = parseFloat(p.style.minHeight),
|
|
3831
|
+
const b = window.innerHeight - Me * 2, h = parseFloat(p.style.minHeight), v = parseFloat(p.style.height), S = Math.max(h, v);
|
|
3821
3832
|
if (S < b) {
|
|
3822
3833
|
const E = S + m, C = Math.min(b, E), w = E - C;
|
|
3823
3834
|
p.style.height = C + "px", p.style.bottom === "0px" && (d.scrollTop = w > 0 ? w : 0, p.style.justifyContent = "flex-end");
|
|
@@ -3846,7 +3857,7 @@ var zs = "SelectLabel", Ws = f.forwardRef(
|
|
|
3846
3857
|
}
|
|
3847
3858
|
);
|
|
3848
3859
|
Ws.displayName = zs;
|
|
3849
|
-
var On = "SelectItem", [
|
|
3860
|
+
var On = "SelectItem", [vf, Hs] = $t(On), Bs = f.forwardRef(
|
|
3850
3861
|
(e, t) => {
|
|
3851
3862
|
const {
|
|
3852
3863
|
__scopeSelect: n,
|
|
@@ -3857,7 +3868,7 @@ var On = "SelectItem", [yf, Hs] = $t(On), Bs = f.forwardRef(
|
|
|
3857
3868
|
} = e, i = st(On, n), c = it(On, n), u = i.value === r, [d, p] = f.useState(a ?? ""), [g, m] = f.useState(!1), b = de(
|
|
3858
3869
|
t,
|
|
3859
3870
|
(E) => c.itemRefCallback?.(E, r, o)
|
|
3860
|
-
), h = nn(),
|
|
3871
|
+
), h = nn(), v = f.useRef("touch"), S = () => {
|
|
3861
3872
|
o || (i.onValueChange(r), i.onOpenChange(!1));
|
|
3862
3873
|
};
|
|
3863
3874
|
if (r === "")
|
|
@@ -3865,7 +3876,7 @@ var On = "SelectItem", [yf, Hs] = $t(On), Bs = f.forwardRef(
|
|
|
3865
3876
|
"A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder."
|
|
3866
3877
|
);
|
|
3867
3878
|
return /* @__PURE__ */ l(
|
|
3868
|
-
|
|
3879
|
+
vf,
|
|
3869
3880
|
{
|
|
3870
3881
|
scope: n,
|
|
3871
3882
|
value: r,
|
|
@@ -3898,16 +3909,16 @@ var On = "SelectItem", [yf, Hs] = $t(On), Bs = f.forwardRef(
|
|
|
3898
3909
|
onFocus: ee(s.onFocus, () => m(!0)),
|
|
3899
3910
|
onBlur: ee(s.onBlur, () => m(!1)),
|
|
3900
3911
|
onClick: ee(s.onClick, () => {
|
|
3901
|
-
|
|
3912
|
+
v.current !== "mouse" && S();
|
|
3902
3913
|
}),
|
|
3903
3914
|
onPointerUp: ee(s.onPointerUp, () => {
|
|
3904
|
-
|
|
3915
|
+
v.current === "mouse" && S();
|
|
3905
3916
|
}),
|
|
3906
3917
|
onPointerDown: ee(s.onPointerDown, (E) => {
|
|
3907
|
-
|
|
3918
|
+
v.current = E.pointerType;
|
|
3908
3919
|
}),
|
|
3909
3920
|
onPointerMove: ee(s.onPointerMove, (E) => {
|
|
3910
|
-
|
|
3921
|
+
v.current = E.pointerType, o ? c.onItemLeave?.() : v.current === "mouse" && E.currentTarget.focus({ preventScroll: !0 });
|
|
3911
3922
|
}),
|
|
3912
3923
|
onPointerLeave: ee(s.onPointerLeave, (E) => {
|
|
3913
3924
|
E.currentTarget === document.activeElement && c.onItemLeave?.();
|
|
@@ -3934,24 +3945,24 @@ var Kt = "SelectItemText", Us = f.forwardRef(
|
|
|
3934
3945
|
), m = d?.textContent, b = f.useMemo(
|
|
3935
3946
|
() => /* @__PURE__ */ l("option", { value: c.value, disabled: c.disabled, children: m }, c.value),
|
|
3936
3947
|
[c.disabled, c.value, m]
|
|
3937
|
-
), { onNativeOptionAdd: h, onNativeOptionRemove:
|
|
3938
|
-
return
|
|
3948
|
+
), { onNativeOptionAdd: h, onNativeOptionRemove: v } = u;
|
|
3949
|
+
return ye(() => (h(b), () => v(b)), [h, v, b]), /* @__PURE__ */ L(It, { children: [
|
|
3939
3950
|
/* @__PURE__ */ l(Te.span, { id: c.textId, ...a, ref: g }),
|
|
3940
3951
|
c.isSelected && s.valueNode && !s.valueNodeHasChildren ? Ln.createPortal(a.children, s.valueNode) : null
|
|
3941
3952
|
] });
|
|
3942
3953
|
}
|
|
3943
3954
|
);
|
|
3944
3955
|
Us.displayName = Kt;
|
|
3945
|
-
var Vs = "SelectItemIndicator",
|
|
3956
|
+
var Vs = "SelectItemIndicator", yf = f.forwardRef(
|
|
3946
3957
|
(e, t) => {
|
|
3947
3958
|
const { __scopeSelect: n, ...r } = e;
|
|
3948
3959
|
return Hs(Vs, n).isSelected ? /* @__PURE__ */ l(Te.span, { "aria-hidden": !0, ...r, ref: t }) : null;
|
|
3949
3960
|
}
|
|
3950
3961
|
);
|
|
3951
|
-
|
|
3962
|
+
yf.displayName = Vs;
|
|
3952
3963
|
var Wr = "SelectScrollUpButton", js = f.forwardRef((e, t) => {
|
|
3953
3964
|
const n = it(Wr, e.__scopeSelect), r = fo(Wr, e.__scopeSelect), [o, a] = f.useState(!1), s = de(t, r.onScrollButtonChange);
|
|
3954
|
-
return
|
|
3965
|
+
return ye(() => {
|
|
3955
3966
|
if (n.viewport && n.isPositioned) {
|
|
3956
3967
|
let i = function() {
|
|
3957
3968
|
const u = c.scrollTop > 0;
|
|
@@ -3975,7 +3986,7 @@ var Wr = "SelectScrollUpButton", js = f.forwardRef((e, t) => {
|
|
|
3975
3986
|
js.displayName = Wr;
|
|
3976
3987
|
var Hr = "SelectScrollDownButton", wf = f.forwardRef((e, t) => {
|
|
3977
3988
|
const n = it(Hr, e.__scopeSelect), r = fo(Hr, e.__scopeSelect), [o, a] = f.useState(!1), s = de(t, r.onScrollButtonChange);
|
|
3978
|
-
return
|
|
3989
|
+
return ye(() => {
|
|
3979
3990
|
if (n.viewport && n.isPositioned) {
|
|
3980
3991
|
let i = function() {
|
|
3981
3992
|
const u = c.scrollHeight - c.clientHeight, d = Math.ceil(c.scrollTop) < u;
|
|
@@ -4001,7 +4012,7 @@ var Gs = f.forwardRef((e, t) => {
|
|
|
4001
4012
|
const { __scopeSelect: n, onAutoScroll: r, ...o } = e, a = it("SelectScrollButton", n), s = f.useRef(null), i = jn(n), c = f.useCallback(() => {
|
|
4002
4013
|
s.current !== null && (window.clearInterval(s.current), s.current = null);
|
|
4003
4014
|
}, []);
|
|
4004
|
-
return f.useEffect(() => () => c(), [c]),
|
|
4015
|
+
return f.useEffect(() => () => c(), [c]), ye(() => {
|
|
4005
4016
|
i().find((d) => d.ref.current === document.activeElement)?.ref.current?.scrollIntoView({ block: "nearest" });
|
|
4006
4017
|
}, [i]), /* @__PURE__ */ l(
|
|
4007
4018
|
Te.div,
|
|
@@ -4106,7 +4117,7 @@ function Ff({ field: e, formValues: t, handleChange: n, handleBlur: r, error: o,
|
|
|
4106
4117
|
const w = typeof e.queryParams == "function" ? e.queryParams(t) : e.queryParams;
|
|
4107
4118
|
typeof w == "string" ? b += w.startsWith("?") ? w : `?${w}` : h = { params: w };
|
|
4108
4119
|
}
|
|
4109
|
-
const
|
|
4120
|
+
const v = await a(b, h), S = v.data || v, C = (Array.isArray(S) ? S : []).map((w) => ({
|
|
4110
4121
|
value: w[e.valueId || "key"] || w.key,
|
|
4111
4122
|
label: w[e.labelId || "value"] || w.value
|
|
4112
4123
|
}));
|
|
@@ -4397,7 +4408,7 @@ function Vt(e, t) {
|
|
|
4397
4408
|
}
|
|
4398
4409
|
return n;
|
|
4399
4410
|
}
|
|
4400
|
-
const ua = xe(["a", "abbr", "acronym", "address", "area", "article", "aside", "audio", "b", "bdi", "bdo", "big", "blink", "blockquote", "body", "br", "button", "canvas", "caption", "center", "cite", "code", "col", "colgroup", "content", "data", "datalist", "dd", "decorator", "del", "details", "dfn", "dialog", "dir", "div", "dl", "dt", "element", "em", "fieldset", "figcaption", "figure", "font", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "head", "header", "hgroup", "hr", "html", "i", "img", "input", "ins", "kbd", "label", "legend", "li", "main", "map", "mark", "marquee", "menu", "menuitem", "meter", "nav", "nobr", "ol", "optgroup", "option", "output", "p", "picture", "pre", "progress", "q", "rp", "rt", "ruby", "s", "samp", "search", "section", "select", "shadow", "slot", "small", "source", "spacer", "span", "strike", "strong", "style", "sub", "summary", "sup", "table", "tbody", "td", "template", "textarea", "tfoot", "th", "thead", "time", "tr", "track", "tt", "u", "ul", "var", "video", "wbr"]), Er = xe(["svg", "a", "altglyph", "altglyphdef", "altglyphitem", "animatecolor", "animatemotion", "animatetransform", "circle", "clippath", "defs", "desc", "ellipse", "enterkeyhint", "exportparts", "filter", "font", "g", "glyph", "glyphref", "hkern", "image", "inputmode", "line", "lineargradient", "marker", "mask", "metadata", "mpath", "part", "path", "pattern", "polygon", "polyline", "radialgradient", "rect", "stop", "style", "switch", "symbol", "text", "textpath", "title", "tref", "tspan", "view", "vkern"]), Nr = xe(["feBlend", "feColorMatrix", "feComponentTransfer", "feComposite", "feConvolveMatrix", "feDiffuseLighting", "feDisplacementMap", "feDistantLight", "feDropShadow", "feFlood", "feFuncA", "feFuncB", "feFuncG", "feFuncR", "feGaussianBlur", "feImage", "feMerge", "feMergeNode", "feMorphology", "feOffset", "fePointLight", "feSpecularLighting", "feSpotLight", "feTile", "feTurbulence"]), Kf = xe(["animate", "color-profile", "cursor", "discard", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "foreignobject", "hatch", "hatchpath", "mesh", "meshgradient", "meshpatch", "meshrow", "missing-glyph", "script", "set", "solidcolor", "unknown", "use"]), kr = xe(["math", "menclose", "merror", "mfenced", "mfrac", "mglyph", "mi", "mlabeledtr", "mmultiscripts", "mn", "mo", "mover", "mpadded", "mphantom", "mroot", "mrow", "ms", "mspace", "msqrt", "mstyle", "msub", "msup", "msubsup", "mtable", "mtd", "mtext", "mtr", "munder", "munderover", "mprescripts"]), Xf = xe(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]), da = xe(["#text"]), fa = xe(["accept", "action", "align", "alt", "autocapitalize", "autocomplete", "autopictureinpicture", "autoplay", "background", "bgcolor", "border", "capture", "cellpadding", "cellspacing", "checked", "cite", "class", "clear", "color", "cols", "colspan", "controls", "controlslist", "coords", "crossorigin", "datetime", "decoding", "default", "dir", "disabled", "disablepictureinpicture", "disableremoteplayback", "download", "draggable", "enctype", "enterkeyhint", "exportparts", "face", "for", "headers", "height", "hidden", "high", "href", "hreflang", "id", "inert", "inputmode", "integrity", "ismap", "kind", "label", "lang", "list", "loading", "loop", "low", "max", "maxlength", "media", "method", "min", "minlength", "multiple", "muted", "name", "nonce", "noshade", "novalidate", "nowrap", "open", "optimum", "part", "pattern", "placeholder", "playsinline", "popover", "popovertarget", "popovertargetaction", "poster", "preload", "pubdate", "radiogroup", "readonly", "rel", "required", "rev", "reversed", "role", "rows", "rowspan", "spellcheck", "scope", "selected", "shape", "size", "sizes", "slot", "span", "srclang", "start", "src", "srcset", "step", "style", "summary", "tabindex", "title", "translate", "type", "usemap", "valign", "value", "width", "wrap", "xmlns", "slot"]), Ar = xe(["accent-height", "accumulate", "additive", "alignment-baseline", "amplitude", "ascent", "attributename", "attributetype", "azimuth", "basefrequency", "baseline-shift", "begin", "bias", "by", "class", "clip", "clippathunits", "clip-path", "clip-rule", "color", "color-interpolation", "color-interpolation-filters", "color-profile", "color-rendering", "cx", "cy", "d", "dx", "dy", "diffuseconstant", "direction", "display", "divisor", "dur", "edgemode", "elevation", "end", "exponent", "fill", "fill-opacity", "fill-rule", "filter", "filterunits", "flood-color", "flood-opacity", "font-family", "font-size", "font-size-adjust", "font-stretch", "font-style", "font-variant", "font-weight", "fx", "fy", "g1", "g2", "glyph-name", "glyphref", "gradientunits", "gradienttransform", "height", "href", "id", "image-rendering", "in", "in2", "intercept", "k", "k1", "k2", "k3", "k4", "kerning", "keypoints", "keysplines", "keytimes", "lang", "lengthadjust", "letter-spacing", "kernelmatrix", "kernelunitlength", "lighting-color", "local", "marker-end", "marker-mid", "marker-start", "markerheight", "markerunits", "markerwidth", "maskcontentunits", "maskunits", "max", "mask", "mask-type", "media", "method", "mode", "min", "name", "numoctaves", "offset", "operator", "opacity", "order", "orient", "orientation", "origin", "overflow", "paint-order", "path", "pathlength", "patterncontentunits", "patterntransform", "patternunits", "points", "preservealpha", "preserveaspectratio", "primitiveunits", "r", "rx", "ry", "radius", "refx", "refy", "repeatcount", "repeatdur", "restart", "result", "rotate", "scale", "seed", "shape-rendering", "slope", "specularconstant", "specularexponent", "spreadmethod", "startoffset", "stddeviation", "stitchtiles", "stop-color", "stop-opacity", "stroke-dasharray", "stroke-dashoffset", "stroke-linecap", "stroke-linejoin", "stroke-miterlimit", "stroke-opacity", "stroke", "stroke-width", "style", "surfacescale", "systemlanguage", "tabindex", "tablevalues", "targetx", "targety", "transform", "transform-origin", "text-anchor", "text-decoration", "text-rendering", "textlength", "type", "u1", "u2", "unicode", "values", "viewbox", "visibility", "version", "vert-adv-y", "vert-origin-x", "vert-origin-y", "width", "word-spacing", "wrap", "writing-mode", "xchannelselector", "ychannelselector", "x", "x1", "x2", "xmlns", "y", "y1", "y2", "z", "zoomandpan"]), ma = xe(["accent", "accentunder", "align", "bevelled", "close", "columnalign", "columnlines", "columnspacing", "columnspan", "denomalign", "depth", "dir", "display", "displaystyle", "encoding", "fence", "frame", "height", "href", "id", "largeop", "length", "linethickness", "lquote", "lspace", "mathbackground", "mathcolor", "mathsize", "mathvariant", "maxsize", "minsize", "movablelimits", "notation", "numalign", "open", "rowalign", "rowlines", "rowspacing", "rowspan", "rspace", "rquote", "scriptlevel", "scriptminsize", "scriptsizemultiplier", "selection", "separator", "separators", "stretchy", "subscriptshift", "supscriptshift", "symmetric", "voffset", "width", "xmlns"]),
|
|
4411
|
+
const ua = xe(["a", "abbr", "acronym", "address", "area", "article", "aside", "audio", "b", "bdi", "bdo", "big", "blink", "blockquote", "body", "br", "button", "canvas", "caption", "center", "cite", "code", "col", "colgroup", "content", "data", "datalist", "dd", "decorator", "del", "details", "dfn", "dialog", "dir", "div", "dl", "dt", "element", "em", "fieldset", "figcaption", "figure", "font", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "head", "header", "hgroup", "hr", "html", "i", "img", "input", "ins", "kbd", "label", "legend", "li", "main", "map", "mark", "marquee", "menu", "menuitem", "meter", "nav", "nobr", "ol", "optgroup", "option", "output", "p", "picture", "pre", "progress", "q", "rp", "rt", "ruby", "s", "samp", "search", "section", "select", "shadow", "slot", "small", "source", "spacer", "span", "strike", "strong", "style", "sub", "summary", "sup", "table", "tbody", "td", "template", "textarea", "tfoot", "th", "thead", "time", "tr", "track", "tt", "u", "ul", "var", "video", "wbr"]), Er = xe(["svg", "a", "altglyph", "altglyphdef", "altglyphitem", "animatecolor", "animatemotion", "animatetransform", "circle", "clippath", "defs", "desc", "ellipse", "enterkeyhint", "exportparts", "filter", "font", "g", "glyph", "glyphref", "hkern", "image", "inputmode", "line", "lineargradient", "marker", "mask", "metadata", "mpath", "part", "path", "pattern", "polygon", "polyline", "radialgradient", "rect", "stop", "style", "switch", "symbol", "text", "textpath", "title", "tref", "tspan", "view", "vkern"]), Nr = xe(["feBlend", "feColorMatrix", "feComponentTransfer", "feComposite", "feConvolveMatrix", "feDiffuseLighting", "feDisplacementMap", "feDistantLight", "feDropShadow", "feFlood", "feFuncA", "feFuncB", "feFuncG", "feFuncR", "feGaussianBlur", "feImage", "feMerge", "feMergeNode", "feMorphology", "feOffset", "fePointLight", "feSpecularLighting", "feSpotLight", "feTile", "feTurbulence"]), Kf = xe(["animate", "color-profile", "cursor", "discard", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "foreignobject", "hatch", "hatchpath", "mesh", "meshgradient", "meshpatch", "meshrow", "missing-glyph", "script", "set", "solidcolor", "unknown", "use"]), kr = xe(["math", "menclose", "merror", "mfenced", "mfrac", "mglyph", "mi", "mlabeledtr", "mmultiscripts", "mn", "mo", "mover", "mpadded", "mphantom", "mroot", "mrow", "ms", "mspace", "msqrt", "mstyle", "msub", "msup", "msubsup", "mtable", "mtd", "mtext", "mtr", "munder", "munderover", "mprescripts"]), Xf = xe(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]), da = xe(["#text"]), fa = xe(["accept", "action", "align", "alt", "autocapitalize", "autocomplete", "autopictureinpicture", "autoplay", "background", "bgcolor", "border", "capture", "cellpadding", "cellspacing", "checked", "cite", "class", "clear", "color", "cols", "colspan", "controls", "controlslist", "coords", "crossorigin", "datetime", "decoding", "default", "dir", "disabled", "disablepictureinpicture", "disableremoteplayback", "download", "draggable", "enctype", "enterkeyhint", "exportparts", "face", "for", "headers", "height", "hidden", "high", "href", "hreflang", "id", "inert", "inputmode", "integrity", "ismap", "kind", "label", "lang", "list", "loading", "loop", "low", "max", "maxlength", "media", "method", "min", "minlength", "multiple", "muted", "name", "nonce", "noshade", "novalidate", "nowrap", "open", "optimum", "part", "pattern", "placeholder", "playsinline", "popover", "popovertarget", "popovertargetaction", "poster", "preload", "pubdate", "radiogroup", "readonly", "rel", "required", "rev", "reversed", "role", "rows", "rowspan", "spellcheck", "scope", "selected", "shape", "size", "sizes", "slot", "span", "srclang", "start", "src", "srcset", "step", "style", "summary", "tabindex", "title", "translate", "type", "usemap", "valign", "value", "width", "wrap", "xmlns", "slot"]), Ar = xe(["accent-height", "accumulate", "additive", "alignment-baseline", "amplitude", "ascent", "attributename", "attributetype", "azimuth", "basefrequency", "baseline-shift", "begin", "bias", "by", "class", "clip", "clippathunits", "clip-path", "clip-rule", "color", "color-interpolation", "color-interpolation-filters", "color-profile", "color-rendering", "cx", "cy", "d", "dx", "dy", "diffuseconstant", "direction", "display", "divisor", "dur", "edgemode", "elevation", "end", "exponent", "fill", "fill-opacity", "fill-rule", "filter", "filterunits", "flood-color", "flood-opacity", "font-family", "font-size", "font-size-adjust", "font-stretch", "font-style", "font-variant", "font-weight", "fx", "fy", "g1", "g2", "glyph-name", "glyphref", "gradientunits", "gradienttransform", "height", "href", "id", "image-rendering", "in", "in2", "intercept", "k", "k1", "k2", "k3", "k4", "kerning", "keypoints", "keysplines", "keytimes", "lang", "lengthadjust", "letter-spacing", "kernelmatrix", "kernelunitlength", "lighting-color", "local", "marker-end", "marker-mid", "marker-start", "markerheight", "markerunits", "markerwidth", "maskcontentunits", "maskunits", "max", "mask", "mask-type", "media", "method", "mode", "min", "name", "numoctaves", "offset", "operator", "opacity", "order", "orient", "orientation", "origin", "overflow", "paint-order", "path", "pathlength", "patterncontentunits", "patterntransform", "patternunits", "points", "preservealpha", "preserveaspectratio", "primitiveunits", "r", "rx", "ry", "radius", "refx", "refy", "repeatcount", "repeatdur", "restart", "result", "rotate", "scale", "seed", "shape-rendering", "slope", "specularconstant", "specularexponent", "spreadmethod", "startoffset", "stddeviation", "stitchtiles", "stop-color", "stop-opacity", "stroke-dasharray", "stroke-dashoffset", "stroke-linecap", "stroke-linejoin", "stroke-miterlimit", "stroke-opacity", "stroke", "stroke-width", "style", "surfacescale", "systemlanguage", "tabindex", "tablevalues", "targetx", "targety", "transform", "transform-origin", "text-anchor", "text-decoration", "text-rendering", "textlength", "type", "u1", "u2", "unicode", "values", "viewbox", "visibility", "version", "vert-adv-y", "vert-origin-x", "vert-origin-y", "width", "word-spacing", "wrap", "writing-mode", "xchannelselector", "ychannelselector", "x", "x1", "x2", "xmlns", "y", "y1", "y2", "z", "zoomandpan"]), ma = xe(["accent", "accentunder", "align", "bevelled", "close", "columnalign", "columnlines", "columnspacing", "columnspan", "denomalign", "depth", "dir", "display", "displaystyle", "encoding", "fence", "frame", "height", "href", "id", "largeop", "length", "linethickness", "lquote", "lspace", "mathbackground", "mathcolor", "mathsize", "mathvariant", "maxsize", "minsize", "movablelimits", "notation", "numalign", "open", "rowalign", "rowlines", "rowspacing", "rowspan", "rspace", "rquote", "scriptlevel", "scriptminsize", "scriptsizemultiplier", "selection", "separator", "separators", "stretchy", "subscriptshift", "supscriptshift", "symmetric", "voffset", "width", "xmlns"]), vn = xe(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]), Qf = Pe(/\{\{[\w\W]*|[\w\W]*\}\}/gm), Zf = Pe(/<%[\w\W]*|[\w\W]*%>/gm), Jf = Pe(/\$\{[\w\W]*/gm), em = Pe(/^data-[\-\w.\u00B7-\uFFFF]+$/), tm = Pe(/^aria-[\-\w]+$/), ei = Pe(
|
|
4401
4412
|
/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i
|
|
4402
4413
|
// eslint-disable-line no-useless-escape
|
|
4403
4414
|
), nm = Pe(/^(?:\w+script|data):/i), rm = Pe(
|
|
@@ -4476,14 +4487,14 @@ function ni() {
|
|
|
4476
4487
|
HTMLFormElement: p,
|
|
4477
4488
|
DOMParser: g,
|
|
4478
4489
|
trustedTypes: m
|
|
4479
|
-
} = e, b = c.prototype, h = Vt(b, "cloneNode"),
|
|
4490
|
+
} = e, b = c.prototype, h = Vt(b, "cloneNode"), v = Vt(b, "remove"), S = Vt(b, "nextSibling"), E = Vt(b, "childNodes"), C = Vt(b, "parentNode");
|
|
4480
4491
|
if (typeof s == "function") {
|
|
4481
4492
|
const j = n.createElement("template");
|
|
4482
4493
|
j.content && j.content.ownerDocument && (n = j.content.ownerDocument);
|
|
4483
4494
|
}
|
|
4484
4495
|
let w, x = "";
|
|
4485
4496
|
const {
|
|
4486
|
-
implementation:
|
|
4497
|
+
implementation: R,
|
|
4487
4498
|
createNodeIterator: _,
|
|
4488
4499
|
createDocumentFragment: O,
|
|
4489
4500
|
getElementsByTagName: $
|
|
@@ -4491,7 +4502,7 @@ function ni() {
|
|
|
4491
4502
|
importNode: z
|
|
4492
4503
|
} = r;
|
|
4493
4504
|
let B = ha();
|
|
4494
|
-
t.isSupported = typeof Js == "function" && typeof C == "function" &&
|
|
4505
|
+
t.isSupported = typeof Js == "function" && typeof C == "function" && R && R.createHTMLDocument !== void 0;
|
|
4495
4506
|
const {
|
|
4496
4507
|
MUSTACHE_EXPR: G,
|
|
4497
4508
|
ERB_EXPR: M,
|
|
@@ -4499,15 +4510,15 @@ function ni() {
|
|
|
4499
4510
|
DATA_ATTR: N,
|
|
4500
4511
|
ARIA_ATTR: k,
|
|
4501
4512
|
IS_SCRIPT_OR_DATA: D,
|
|
4502
|
-
ATTR_WHITESPACE:
|
|
4503
|
-
CUSTOM_ELEMENT:
|
|
4513
|
+
ATTR_WHITESPACE: A,
|
|
4514
|
+
CUSTOM_ELEMENT: P
|
|
4504
4515
|
} = pa;
|
|
4505
4516
|
let {
|
|
4506
|
-
IS_ALLOWED_URI:
|
|
4517
|
+
IS_ALLOWED_URI: T
|
|
4507
4518
|
} = pa, q = null;
|
|
4508
4519
|
const te = Q({}, [...ua, ...Er, ...Nr, ...kr, ...da]);
|
|
4509
4520
|
let K = null;
|
|
4510
|
-
const ge = Q({}, [...fa, ...Ar, ...ma, ...
|
|
4521
|
+
const ge = Q({}, [...fa, ...Ar, ...ma, ...vn]);
|
|
4511
4522
|
let Y = Object.seal(Xt(null, {
|
|
4512
4523
|
tagNameCheck: {
|
|
4513
4524
|
writable: !0,
|
|
@@ -4542,11 +4553,11 @@ function ni() {
|
|
|
4542
4553
|
value: null
|
|
4543
4554
|
}
|
|
4544
4555
|
}));
|
|
4545
|
-
let Z = !0, ne = !0, re = !1, se = !0, le = !1, he = !0, Oe = !1, ut = !1, dt = !1, xt = !1, sn = !1, cn = !1, bo = !0,
|
|
4556
|
+
let Z = !0, ne = !0, re = !1, se = !0, le = !1, he = !0, Oe = !1, ut = !1, dt = !1, xt = !1, sn = !1, cn = !1, bo = !0, vo = !1;
|
|
4546
4557
|
const ec = "user-content-";
|
|
4547
4558
|
let nr = !0, zt = !1, St = {}, ze = null;
|
|
4548
4559
|
const rr = Q({}, ["annotation-xml", "audio", "colgroup", "desc", "foreignobject", "head", "iframe", "math", "mi", "mn", "mo", "ms", "mtext", "noembed", "noframes", "noscript", "plaintext", "script", "style", "svg", "template", "thead", "title", "video", "xmp"]);
|
|
4549
|
-
let
|
|
4560
|
+
let yo = null;
|
|
4550
4561
|
const wo = Q({}, ["audio", "video", "img", "source", "image", "track"]);
|
|
4551
4562
|
let or = null;
|
|
4552
4563
|
const xo = Q({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]), ln = "http://www.w3.org/1998/Math/MathML", un = "http://www.w3.org/2000/svg", We = "http://www.w3.org/1999/xhtml";
|
|
@@ -4557,43 +4568,43 @@ function ni() {
|
|
|
4557
4568
|
let Wt = null;
|
|
4558
4569
|
const rc = ["application/xhtml+xml", "text/html"], oc = "text/html";
|
|
4559
4570
|
let me = null, Et = null;
|
|
4560
|
-
const ac = n.createElement("form"), So = function(
|
|
4561
|
-
return
|
|
4571
|
+
const ac = n.createElement("form"), So = function(y) {
|
|
4572
|
+
return y instanceof RegExp || y instanceof Function;
|
|
4562
4573
|
}, ir = function() {
|
|
4563
|
-
let
|
|
4564
|
-
if (!(Et && Et ===
|
|
4565
|
-
if ((!
|
|
4566
|
-
rc.indexOf(
|
|
4567
|
-
if (typeof
|
|
4574
|
+
let y = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
4575
|
+
if (!(Et && Et === y)) {
|
|
4576
|
+
if ((!y || typeof y != "object") && (y = {}), y = He(y), Wt = // eslint-disable-next-line unicorn/prefer-includes
|
|
4577
|
+
rc.indexOf(y.PARSER_MEDIA_TYPE) === -1 ? oc : y.PARSER_MEDIA_TYPE, me = Wt === "application/xhtml+xml" ? Sr : Nn, q = De(y, "ALLOWED_TAGS") ? Q({}, y.ALLOWED_TAGS, me) : te, K = De(y, "ALLOWED_ATTR") ? Q({}, y.ALLOWED_ATTR, me) : ge, sr = De(y, "ALLOWED_NAMESPACES") ? Q({}, y.ALLOWED_NAMESPACES, Sr) : tc, or = De(y, "ADD_URI_SAFE_ATTR") ? Q(He(xo), y.ADD_URI_SAFE_ATTR, me) : xo, yo = De(y, "ADD_DATA_URI_TAGS") ? Q(He(wo), y.ADD_DATA_URI_TAGS, me) : wo, ze = De(y, "FORBID_CONTENTS") ? Q({}, y.FORBID_CONTENTS, me) : rr, oe = De(y, "FORBID_TAGS") ? Q({}, y.FORBID_TAGS, me) : He({}), V = De(y, "FORBID_ATTR") ? Q({}, y.FORBID_ATTR, me) : He({}), St = De(y, "USE_PROFILES") ? y.USE_PROFILES : !1, Z = y.ALLOW_ARIA_ATTR !== !1, ne = y.ALLOW_DATA_ATTR !== !1, re = y.ALLOW_UNKNOWN_PROTOCOLS || !1, se = y.ALLOW_SELF_CLOSE_IN_ATTR !== !1, le = y.SAFE_FOR_TEMPLATES || !1, he = y.SAFE_FOR_XML !== !1, Oe = y.WHOLE_DOCUMENT || !1, xt = y.RETURN_DOM || !1, sn = y.RETURN_DOM_FRAGMENT || !1, cn = y.RETURN_TRUSTED_TYPE || !1, dt = y.FORCE_BODY || !1, bo = y.SANITIZE_DOM !== !1, vo = y.SANITIZE_NAMED_PROPS || !1, nr = y.KEEP_CONTENT !== !1, zt = y.IN_PLACE || !1, T = y.ALLOWED_URI_REGEXP || ei, Ct = y.NAMESPACE || We, dn = y.MATHML_TEXT_INTEGRATION_POINTS || dn, fn = y.HTML_INTEGRATION_POINTS || fn, Y = y.CUSTOM_ELEMENT_HANDLING || Xt(null), y.CUSTOM_ELEMENT_HANDLING && So(y.CUSTOM_ELEMENT_HANDLING.tagNameCheck) && (Y.tagNameCheck = y.CUSTOM_ELEMENT_HANDLING.tagNameCheck), y.CUSTOM_ELEMENT_HANDLING && So(y.CUSTOM_ELEMENT_HANDLING.attributeNameCheck) && (Y.attributeNameCheck = y.CUSTOM_ELEMENT_HANDLING.attributeNameCheck), y.CUSTOM_ELEMENT_HANDLING && typeof y.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements == "boolean" && (Y.allowCustomizedBuiltInElements = y.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements), le && (ne = !1), sn && (xt = !0), St && (q = Q({}, da), K = Xt(null), St.html === !0 && (Q(q, ua), Q(K, fa)), St.svg === !0 && (Q(q, Er), Q(K, Ar), Q(K, vn)), St.svgFilters === !0 && (Q(q, Nr), Q(K, Ar), Q(K, vn)), St.mathMl === !0 && (Q(q, kr), Q(K, ma), Q(K, vn))), J.tagCheck = null, J.attributeCheck = null, y.ADD_TAGS && (typeof y.ADD_TAGS == "function" ? J.tagCheck = y.ADD_TAGS : (q === te && (q = He(q)), Q(q, y.ADD_TAGS, me))), y.ADD_ATTR && (typeof y.ADD_ATTR == "function" ? J.attributeCheck = y.ADD_ATTR : (K === ge && (K = He(K)), Q(K, y.ADD_ATTR, me))), y.ADD_URI_SAFE_ATTR && Q(or, y.ADD_URI_SAFE_ATTR, me), y.FORBID_CONTENTS && (ze === rr && (ze = He(ze)), Q(ze, y.FORBID_CONTENTS, me)), y.ADD_FORBID_CONTENTS && (ze === rr && (ze = He(ze)), Q(ze, y.ADD_FORBID_CONTENTS, me)), nr && (q["#text"] = !0), Oe && Q(q, ["html", "head", "body"]), q.table && (Q(q, ["tbody"]), delete oe.tbody), y.TRUSTED_TYPES_POLICY) {
|
|
4578
|
+
if (typeof y.TRUSTED_TYPES_POLICY.createHTML != "function")
|
|
4568
4579
|
throw Ut('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
|
|
4569
|
-
if (typeof
|
|
4580
|
+
if (typeof y.TRUSTED_TYPES_POLICY.createScriptURL != "function")
|
|
4570
4581
|
throw Ut('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');
|
|
4571
|
-
w =
|
|
4582
|
+
w = y.TRUSTED_TYPES_POLICY, x = w.createHTML("");
|
|
4572
4583
|
} else
|
|
4573
4584
|
w === void 0 && (w = sm(m, o)), w !== null && typeof x == "string" && (x = w.createHTML(""));
|
|
4574
|
-
xe && xe(
|
|
4585
|
+
xe && xe(y), Et = y;
|
|
4575
4586
|
}
|
|
4576
|
-
}, Co = Q({}, [...Er, ...Nr, ...Kf]), Eo = Q({}, [...kr, ...Xf]), sc = function(
|
|
4577
|
-
let I = C(
|
|
4587
|
+
}, Co = Q({}, [...Er, ...Nr, ...Kf]), Eo = Q({}, [...kr, ...Xf]), sc = function(y) {
|
|
4588
|
+
let I = C(y);
|
|
4578
4589
|
(!I || !I.tagName) && (I = {
|
|
4579
4590
|
namespaceURI: Ct,
|
|
4580
4591
|
tagName: "template"
|
|
4581
4592
|
});
|
|
4582
|
-
const U = Nn(
|
|
4583
|
-
return sr[
|
|
4584
|
-
}, _e = function(
|
|
4593
|
+
const U = Nn(y.tagName), ue = Nn(I.tagName);
|
|
4594
|
+
return sr[y.namespaceURI] ? y.namespaceURI === un ? I.namespaceURI === We ? U === "svg" : I.namespaceURI === ln ? U === "svg" && (ue === "annotation-xml" || dn[ue]) : !!Co[U] : y.namespaceURI === ln ? I.namespaceURI === We ? U === "math" : I.namespaceURI === un ? U === "math" && fn[ue] : !!Eo[U] : y.namespaceURI === We ? I.namespaceURI === un && !fn[ue] || I.namespaceURI === ln && !dn[ue] ? !1 : !Eo[U] && (nc[U] || !Co[U]) : !!(Wt === "application/xhtml+xml" && sr[y.namespaceURI]) : !1;
|
|
4595
|
+
}, _e = function(y) {
|
|
4585
4596
|
Bt(t.removed, {
|
|
4586
|
-
element:
|
|
4597
|
+
element: y
|
|
4587
4598
|
});
|
|
4588
4599
|
try {
|
|
4589
|
-
C(
|
|
4600
|
+
C(y).removeChild(y);
|
|
4590
4601
|
} catch {
|
|
4591
|
-
y
|
|
4602
|
+
v(y);
|
|
4592
4603
|
}
|
|
4593
|
-
}, ft = function(
|
|
4604
|
+
}, ft = function(y, I) {
|
|
4594
4605
|
try {
|
|
4595
4606
|
Bt(t.removed, {
|
|
4596
|
-
attribute: I.getAttributeNode(
|
|
4607
|
+
attribute: I.getAttributeNode(y),
|
|
4597
4608
|
from: I
|
|
4598
4609
|
});
|
|
4599
4610
|
} catch {
|
|
@@ -4602,7 +4613,7 @@ function ni() {
|
|
|
4602
4613
|
from: I
|
|
4603
4614
|
});
|
|
4604
4615
|
}
|
|
4605
|
-
if (I.removeAttribute(
|
|
4616
|
+
if (I.removeAttribute(y), y === "is")
|
|
4606
4617
|
if (xt || sn)
|
|
4607
4618
|
try {
|
|
4608
4619
|
_e(I);
|
|
@@ -4610,100 +4621,100 @@ function ni() {
|
|
|
4610
4621
|
}
|
|
4611
4622
|
else
|
|
4612
4623
|
try {
|
|
4613
|
-
I.setAttribute(
|
|
4624
|
+
I.setAttribute(y, "");
|
|
4614
4625
|
} catch {
|
|
4615
4626
|
}
|
|
4616
|
-
}, No = function(
|
|
4627
|
+
}, No = function(y) {
|
|
4617
4628
|
let I = null, U = null;
|
|
4618
4629
|
if (dt)
|
|
4619
|
-
|
|
4630
|
+
y = "<remove></remove>" + y;
|
|
4620
4631
|
else {
|
|
4621
|
-
const fe = Cr(
|
|
4632
|
+
const fe = Cr(y, /^[\r\n\t ]+/);
|
|
4622
4633
|
U = fe && fe[0];
|
|
4623
4634
|
}
|
|
4624
|
-
Wt === "application/xhtml+xml" && Ct === We && (
|
|
4625
|
-
const ue = w ? w.createHTML(
|
|
4635
|
+
Wt === "application/xhtml+xml" && Ct === We && (y = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + y + "</body></html>");
|
|
4636
|
+
const ue = w ? w.createHTML(y) : y;
|
|
4626
4637
|
if (Ct === We)
|
|
4627
4638
|
try {
|
|
4628
4639
|
I = new g().parseFromString(ue, Wt);
|
|
4629
4640
|
} catch {
|
|
4630
4641
|
}
|
|
4631
4642
|
if (!I || !I.documentElement) {
|
|
4632
|
-
I =
|
|
4643
|
+
I = R.createDocument(Ct, "template", null);
|
|
4633
4644
|
try {
|
|
4634
4645
|
I.documentElement.innerHTML = ar ? x : ue;
|
|
4635
4646
|
} catch {
|
|
4636
4647
|
}
|
|
4637
4648
|
}
|
|
4638
|
-
const
|
|
4639
|
-
return
|
|
4640
|
-
}, ko = function(
|
|
4649
|
+
const ve = I.body || I.documentElement;
|
|
4650
|
+
return y && U && ve.insertBefore(n.createTextNode(U), ve.childNodes[0] || null), Ct === We ? $.call(I, Oe ? "html" : "body")[0] : Oe ? I.documentElement : ve;
|
|
4651
|
+
}, ko = function(y) {
|
|
4641
4652
|
return _.call(
|
|
4642
|
-
|
|
4643
|
-
|
|
4653
|
+
y.ownerDocument || y,
|
|
4654
|
+
y,
|
|
4644
4655
|
// eslint-disable-next-line no-bitwise
|
|
4645
4656
|
u.SHOW_ELEMENT | u.SHOW_COMMENT | u.SHOW_TEXT | u.SHOW_PROCESSING_INSTRUCTION | u.SHOW_CDATA_SECTION,
|
|
4646
4657
|
null
|
|
4647
4658
|
);
|
|
4648
|
-
}, cr = function(
|
|
4649
|
-
return
|
|
4650
|
-
}, lr = function(
|
|
4651
|
-
return typeof i == "function" &&
|
|
4659
|
+
}, cr = function(y) {
|
|
4660
|
+
return y instanceof p && (typeof y.nodeName != "string" || typeof y.textContent != "string" || typeof y.removeChild != "function" || !(y.attributes instanceof d) || typeof y.removeAttribute != "function" || typeof y.setAttribute != "function" || typeof y.namespaceURI != "string" || typeof y.insertBefore != "function" || typeof y.hasChildNodes != "function");
|
|
4661
|
+
}, lr = function(y) {
|
|
4662
|
+
return typeof i == "function" && y instanceof i;
|
|
4652
4663
|
};
|
|
4653
|
-
function Ge(j,
|
|
4664
|
+
function Ge(j, y, I) {
|
|
4654
4665
|
Ht(j, (U) => {
|
|
4655
|
-
U.call(t,
|
|
4666
|
+
U.call(t, y, I, Et);
|
|
4656
4667
|
});
|
|
4657
4668
|
}
|
|
4658
|
-
const Ao = function(
|
|
4669
|
+
const Ao = function(y) {
|
|
4659
4670
|
let I = null;
|
|
4660
|
-
if (Ge(B.beforeSanitizeElements,
|
|
4661
|
-
return _e(
|
|
4662
|
-
const U = me(
|
|
4663
|
-
if (Ge(B.uponSanitizeElement,
|
|
4671
|
+
if (Ge(B.beforeSanitizeElements, y, null), cr(y))
|
|
4672
|
+
return _e(y), !0;
|
|
4673
|
+
const U = me(y.nodeName);
|
|
4674
|
+
if (Ge(B.uponSanitizeElement, y, {
|
|
4664
4675
|
tagName: U,
|
|
4665
4676
|
allowedTags: q
|
|
4666
|
-
}), he &&
|
|
4667
|
-
return _e(
|
|
4677
|
+
}), he && y.hasChildNodes() && !lr(y.firstElementChild) && we(/<[/\w!]/g, y.innerHTML) && we(/<[/\w!]/g, y.textContent) || he && y.namespaceURI === We && U === "style" && lr(y.firstElementChild) || y.nodeType === jt.progressingInstruction || he && y.nodeType === jt.comment && we(/<[/\w]/g, y.data))
|
|
4678
|
+
return _e(y), !0;
|
|
4668
4679
|
if (oe[U] || !(J.tagCheck instanceof Function && J.tagCheck(U)) && !q[U]) {
|
|
4669
4680
|
if (!oe[U] && Ro(U) && (Y.tagNameCheck instanceof RegExp && we(Y.tagNameCheck, U) || Y.tagNameCheck instanceof Function && Y.tagNameCheck(U)))
|
|
4670
4681
|
return !1;
|
|
4671
4682
|
if (nr && !ze[U]) {
|
|
4672
|
-
const ue = C(
|
|
4673
|
-
if (
|
|
4674
|
-
const fe =
|
|
4683
|
+
const ue = C(y) || y.parentNode, ve = E(y) || y.childNodes;
|
|
4684
|
+
if (ve && ue) {
|
|
4685
|
+
const fe = ve.length;
|
|
4675
4686
|
for (let Ce = fe - 1; Ce >= 0; --Ce) {
|
|
4676
|
-
const Ne = h(
|
|
4677
|
-
Ne.__removalCount = (
|
|
4687
|
+
const Ne = h(ve[Ce], !0);
|
|
4688
|
+
Ne.__removalCount = (y.__removalCount || 0) + 1, ue.insertBefore(Ne, S(y));
|
|
4678
4689
|
}
|
|
4679
4690
|
}
|
|
4680
4691
|
}
|
|
4681
|
-
return _e(
|
|
4692
|
+
return _e(y), !0;
|
|
4682
4693
|
}
|
|
4683
|
-
return
|
|
4694
|
+
return y instanceof c && !sc(y) || (U === "noscript" || U === "noembed" || U === "noframes") && we(/<\/no(script|embed|frames)/i, y.innerHTML) ? (_e(y), !0) : (le && y.nodeType === jt.text && (I = y.textContent, Ht([G, M, F], (ue) => {
|
|
4684
4695
|
I = Rt(I, ue, " ");
|
|
4685
|
-
}),
|
|
4686
|
-
element:
|
|
4687
|
-
}),
|
|
4688
|
-
}, To = function(
|
|
4696
|
+
}), y.textContent !== I && (Bt(t.removed, {
|
|
4697
|
+
element: y.cloneNode()
|
|
4698
|
+
}), y.textContent = I)), Ge(B.afterSanitizeElements, y, null), !1);
|
|
4699
|
+
}, To = function(y, I, U) {
|
|
4689
4700
|
if (V[I] || bo && (I === "id" || I === "name") && (U in n || U in ac))
|
|
4690
4701
|
return !1;
|
|
4691
4702
|
if (!(ne && !V[I] && we(N, I))) {
|
|
4692
4703
|
if (!(Z && we(k, I))) {
|
|
4693
|
-
if (!(J.attributeCheck instanceof Function && J.attributeCheck(I,
|
|
4704
|
+
if (!(J.attributeCheck instanceof Function && J.attributeCheck(I, y))) {
|
|
4694
4705
|
if (!K[I] || V[I]) {
|
|
4695
4706
|
if (
|
|
4696
4707
|
// First condition does a very basic check if a) it's basically a valid custom element tagname AND
|
|
4697
4708
|
// b) if the tagName passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
|
|
4698
4709
|
// and c) if the attribute name passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.attributeNameCheck
|
|
4699
|
-
!(Ro(
|
|
4710
|
+
!(Ro(y) && (Y.tagNameCheck instanceof RegExp && we(Y.tagNameCheck, y) || Y.tagNameCheck instanceof Function && Y.tagNameCheck(y)) && (Y.attributeNameCheck instanceof RegExp && we(Y.attributeNameCheck, I) || Y.attributeNameCheck instanceof Function && Y.attributeNameCheck(I, y)) || // Alternative, second condition checks if it's an `is`-attribute, AND
|
|
4700
4711
|
// the value passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
|
|
4701
4712
|
I === "is" && Y.allowCustomizedBuiltInElements && (Y.tagNameCheck instanceof RegExp && we(Y.tagNameCheck, U) || Y.tagNameCheck instanceof Function && Y.tagNameCheck(U)))
|
|
4702
4713
|
) return !1;
|
|
4703
4714
|
} else if (!or[I]) {
|
|
4704
|
-
if (!we(
|
|
4705
|
-
if (!((I === "src" || I === "xlink:href" || I === "href") &&
|
|
4706
|
-
if (!(re && !we(D, Rt(U,
|
|
4715
|
+
if (!we(T, Rt(U, A, ""))) {
|
|
4716
|
+
if (!((I === "src" || I === "xlink:href" || I === "href") && y !== "script" && jf(U, "data:") === 0 && yo[y])) {
|
|
4717
|
+
if (!(re && !we(D, Rt(U, A, "")))) {
|
|
4707
4718
|
if (U)
|
|
4708
4719
|
return !1;
|
|
4709
4720
|
}
|
|
@@ -4714,14 +4725,14 @@ function ni() {
|
|
|
4714
4725
|
}
|
|
4715
4726
|
}
|
|
4716
4727
|
return !0;
|
|
4717
|
-
}, Ro = function(
|
|
4718
|
-
return
|
|
4719
|
-
}, Po = function(
|
|
4720
|
-
Ge(B.beforeSanitizeAttributes,
|
|
4728
|
+
}, Ro = function(y) {
|
|
4729
|
+
return y !== "annotation-xml" && Cr(y, P);
|
|
4730
|
+
}, Po = function(y) {
|
|
4731
|
+
Ge(B.beforeSanitizeAttributes, y, null);
|
|
4721
4732
|
const {
|
|
4722
4733
|
attributes: I
|
|
4723
|
-
} =
|
|
4724
|
-
if (!I || cr(
|
|
4734
|
+
} = y;
|
|
4735
|
+
if (!I || cr(y))
|
|
4725
4736
|
return;
|
|
4726
4737
|
const U = {
|
|
4727
4738
|
attrName: "",
|
|
@@ -4732,36 +4743,36 @@ function ni() {
|
|
|
4732
4743
|
};
|
|
4733
4744
|
let ue = I.length;
|
|
4734
4745
|
for (; ue--; ) {
|
|
4735
|
-
const
|
|
4746
|
+
const ve = I[ue], {
|
|
4736
4747
|
name: fe,
|
|
4737
4748
|
namespaceURI: Ce,
|
|
4738
4749
|
value: Ne
|
|
4739
|
-
} =
|
|
4750
|
+
} = ve, Qe = me(fe), ur = Ne;
|
|
4740
4751
|
let be = fe === "value" ? ur : Gf(ur);
|
|
4741
|
-
if (U.attrName = Qe, U.attrValue = be, U.keepAttr = !0, U.forceKeepAttr = void 0, Ge(B.uponSanitizeAttribute,
|
|
4742
|
-
ft(fe,
|
|
4752
|
+
if (U.attrName = Qe, U.attrValue = be, U.keepAttr = !0, U.forceKeepAttr = void 0, Ge(B.uponSanitizeAttribute, y, U), be = U.attrValue, vo && (Qe === "id" || Qe === "name") && (ft(fe, y), be = ec + be), he && we(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, be)) {
|
|
4753
|
+
ft(fe, y);
|
|
4743
4754
|
continue;
|
|
4744
4755
|
}
|
|
4745
4756
|
if (Qe === "attributename" && Cr(be, "href")) {
|
|
4746
|
-
ft(fe,
|
|
4757
|
+
ft(fe, y);
|
|
4747
4758
|
continue;
|
|
4748
4759
|
}
|
|
4749
4760
|
if (U.forceKeepAttr)
|
|
4750
4761
|
continue;
|
|
4751
4762
|
if (!U.keepAttr) {
|
|
4752
|
-
ft(fe,
|
|
4763
|
+
ft(fe, y);
|
|
4753
4764
|
continue;
|
|
4754
4765
|
}
|
|
4755
4766
|
if (!se && we(/\/>/i, be)) {
|
|
4756
|
-
ft(fe,
|
|
4767
|
+
ft(fe, y);
|
|
4757
4768
|
continue;
|
|
4758
4769
|
}
|
|
4759
4770
|
le && Ht([G, M, F], (Mo) => {
|
|
4760
4771
|
be = Rt(be, Mo, " ");
|
|
4761
4772
|
});
|
|
4762
|
-
const _o = me(
|
|
4773
|
+
const _o = me(y.nodeName);
|
|
4763
4774
|
if (!To(_o, Qe, be)) {
|
|
4764
|
-
ft(fe,
|
|
4775
|
+
ft(fe, y);
|
|
4765
4776
|
continue;
|
|
4766
4777
|
}
|
|
4767
4778
|
if (w && typeof m == "object" && typeof m.getAttributeType == "function" && !Ce)
|
|
@@ -4777,21 +4788,21 @@ function ni() {
|
|
|
4777
4788
|
}
|
|
4778
4789
|
if (be !== ur)
|
|
4779
4790
|
try {
|
|
4780
|
-
Ce ?
|
|
4791
|
+
Ce ? y.setAttributeNS(Ce, fe, be) : y.setAttribute(fe, be), cr(y) ? _e(y) : la(t.removed);
|
|
4781
4792
|
} catch {
|
|
4782
|
-
ft(fe,
|
|
4793
|
+
ft(fe, y);
|
|
4783
4794
|
}
|
|
4784
4795
|
}
|
|
4785
|
-
Ge(B.afterSanitizeAttributes,
|
|
4786
|
-
}, Oo = function(
|
|
4796
|
+
Ge(B.afterSanitizeAttributes, y, null);
|
|
4797
|
+
}, Oo = function(y) {
|
|
4787
4798
|
let I = null;
|
|
4788
|
-
const U = ko(
|
|
4789
|
-
for (Ge(B.beforeSanitizeShadowDOM,
|
|
4799
|
+
const U = ko(y);
|
|
4800
|
+
for (Ge(B.beforeSanitizeShadowDOM, y, null); I = U.nextNode(); )
|
|
4790
4801
|
Ge(B.uponSanitizeShadowNode, I, null), Ao(I), Po(I), I.content instanceof a && Oo(I.content);
|
|
4791
|
-
Ge(B.afterSanitizeShadowDOM,
|
|
4802
|
+
Ge(B.afterSanitizeShadowDOM, y, null);
|
|
4792
4803
|
};
|
|
4793
4804
|
return t.sanitize = function(j) {
|
|
4794
|
-
let
|
|
4805
|
+
let y = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, I = null, U = null, ue = null, ve = null;
|
|
4795
4806
|
if (ar = !j, ar && (j = "<!-->"), typeof j != "string" && !lr(j))
|
|
4796
4807
|
if (typeof j.toString == "function") {
|
|
4797
4808
|
if (j = j.toString(), typeof j != "string")
|
|
@@ -4800,7 +4811,7 @@ function ni() {
|
|
|
4800
4811
|
throw Ut("toString is not a function");
|
|
4801
4812
|
if (!t.isSupported)
|
|
4802
4813
|
return j;
|
|
4803
|
-
if (ut || ir(
|
|
4814
|
+
if (ut || ir(y), t.removed = [], typeof j == "string" && (zt = !1), zt) {
|
|
4804
4815
|
if (j.nodeName) {
|
|
4805
4816
|
const Ne = me(j.nodeName);
|
|
4806
4817
|
if (!q[Ne] || oe[Ne])
|
|
@@ -4830,11 +4841,11 @@ function ni() {
|
|
|
4830
4841
|
}), I.innerHTML = Ne;
|
|
4831
4842
|
}
|
|
4832
4843
|
if (sn)
|
|
4833
|
-
for (
|
|
4834
|
-
|
|
4844
|
+
for (ve = O.call(I.ownerDocument); I.firstChild; )
|
|
4845
|
+
ve.appendChild(I.firstChild);
|
|
4835
4846
|
else
|
|
4836
|
-
|
|
4837
|
-
return (K.shadowroot || K.shadowrootmode) && (
|
|
4847
|
+
ve = I;
|
|
4848
|
+
return (K.shadowroot || K.shadowrootmode) && (ve = z.call(r, ve, !0)), ve;
|
|
4838
4849
|
}
|
|
4839
4850
|
let Ce = Oe ? I.outerHTML : I.innerHTML;
|
|
4840
4851
|
return Oe && q["!doctype"] && I.ownerDocument && I.ownerDocument.doctype && I.ownerDocument.doctype.name && we(ti, I.ownerDocument.doctype.name) && (Ce = "<!DOCTYPE " + I.ownerDocument.doctype.name + `>
|
|
@@ -4846,15 +4857,15 @@ function ni() {
|
|
|
4846
4857
|
ir(j), ut = !0;
|
|
4847
4858
|
}, t.clearConfig = function() {
|
|
4848
4859
|
Et = null, ut = !1;
|
|
4849
|
-
}, t.isValidAttribute = function(j,
|
|
4860
|
+
}, t.isValidAttribute = function(j, y, I) {
|
|
4850
4861
|
Et || ir({});
|
|
4851
|
-
const U = me(j), ue = me(
|
|
4862
|
+
const U = me(j), ue = me(y);
|
|
4852
4863
|
return To(U, ue, I);
|
|
4853
|
-
}, t.addHook = function(j,
|
|
4854
|
-
typeof
|
|
4855
|
-
}, t.removeHook = function(j,
|
|
4856
|
-
if (
|
|
4857
|
-
const I = Uf(B[j],
|
|
4864
|
+
}, t.addHook = function(j, y) {
|
|
4865
|
+
typeof y == "function" && Bt(B[j], y);
|
|
4866
|
+
}, t.removeHook = function(j, y) {
|
|
4867
|
+
if (y !== void 0) {
|
|
4868
|
+
const I = Uf(B[j], y);
|
|
4858
4869
|
return I === -1 ? void 0 : Vf(B[j], I, 1)[0];
|
|
4859
4870
|
}
|
|
4860
4871
|
return la(B[j]);
|
|
@@ -5034,11 +5045,11 @@ function lm({
|
|
|
5034
5045
|
const h = (S) => {
|
|
5035
5046
|
const E = Math.max(150, Math.min(600, u + S.movementY));
|
|
5036
5047
|
d(E);
|
|
5037
|
-
},
|
|
5048
|
+
}, v = () => {
|
|
5038
5049
|
g(!1);
|
|
5039
5050
|
};
|
|
5040
|
-
return document.body.style.userSelect = "none", document.body.style.cursor = "ns-resize", document.addEventListener("mousemove", h), document.addEventListener("mouseup",
|
|
5041
|
-
document.body.style.userSelect = "", document.body.style.cursor = "", document.removeEventListener("mousemove", h), document.removeEventListener("mouseup",
|
|
5051
|
+
return document.body.style.userSelect = "none", document.body.style.cursor = "ns-resize", document.addEventListener("mousemove", h), document.addEventListener("mouseup", v), () => {
|
|
5052
|
+
document.body.style.userSelect = "", document.body.style.cursor = "", document.removeEventListener("mousemove", h), document.removeEventListener("mouseup", v);
|
|
5042
5053
|
};
|
|
5043
5054
|
}, [p, u]);
|
|
5044
5055
|
const b = dc({
|
|
@@ -5056,8 +5067,8 @@ function lm({
|
|
|
5056
5067
|
content: im.sanitize(c),
|
|
5057
5068
|
editable: !s,
|
|
5058
5069
|
onUpdate: ({ editor: h }) => {
|
|
5059
|
-
const
|
|
5060
|
-
n(e.name, S ? "" :
|
|
5070
|
+
const v = h.getHTML(), S = h.getText().trim().length === 0;
|
|
5071
|
+
n(e.name, S ? "" : v);
|
|
5061
5072
|
},
|
|
5062
5073
|
onBlur: () => {
|
|
5063
5074
|
r(e.name);
|
|
@@ -5135,22 +5146,22 @@ function um({
|
|
|
5135
5146
|
setCharCounts: d,
|
|
5136
5147
|
fileInputRefs: p,
|
|
5137
5148
|
...g
|
|
5138
|
-
} = s, m = a, b = e.options || [], h = e.inline || e.layout === "inline",
|
|
5149
|
+
} = s, m = a, b = e.options || [], h = e.inline || e.layout === "inline", v = g["aria-describedby"], S = `
|
|
5139
5150
|
size-4 rounded border-input bg-background transition-all accent-primary
|
|
5140
5151
|
focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2
|
|
5141
5152
|
disabled:cursor-not-allowed disabled:opacity-50
|
|
5142
5153
|
`;
|
|
5143
5154
|
if (b.length > 0) {
|
|
5144
5155
|
const E = Array.isArray(t[e.name]) ? t[e.name] : [], C = (w, x) => {
|
|
5145
|
-
let
|
|
5146
|
-
n(e.name,
|
|
5156
|
+
let R = x ? [...E, w] : E.filter((_) => _ !== w);
|
|
5157
|
+
n(e.name, R), r(e.name);
|
|
5147
5158
|
};
|
|
5148
5159
|
return /* @__PURE__ */ L(
|
|
5149
5160
|
"fieldset",
|
|
5150
5161
|
{
|
|
5151
5162
|
className: "mt-2",
|
|
5152
5163
|
"aria-invalid": !!o,
|
|
5153
|
-
"aria-describedby": o ?
|
|
5164
|
+
"aria-describedby": o ? v : void 0,
|
|
5154
5165
|
children: [
|
|
5155
5166
|
/* @__PURE__ */ l("legend", { className: "sr-only", children: e.label }),
|
|
5156
5167
|
/* @__PURE__ */ l(
|
|
@@ -5158,7 +5169,7 @@ function um({
|
|
|
5158
5169
|
{
|
|
5159
5170
|
className: h ? "flex flex-wrap gap-x-6 gap-y-3" : "space-y-4",
|
|
5160
5171
|
children: b.map((w) => {
|
|
5161
|
-
const x = typeof w == "object" ? w.value : w,
|
|
5172
|
+
const x = typeof w == "object" ? w.value : w, R = typeof w == "object" ? w.label : w, _ = typeof w == "object" ? w.description : null, O = `${e.name}-${x}`, $ = E.includes(x);
|
|
5162
5173
|
return /* @__PURE__ */ L(
|
|
5163
5174
|
"div",
|
|
5164
5175
|
{
|
|
@@ -5184,7 +5195,7 @@ function um({
|
|
|
5184
5195
|
{
|
|
5185
5196
|
htmlFor: O,
|
|
5186
5197
|
className: `font-medium select-none transition-colors ${m ? "text-muted-foreground" : "text-foreground cursor-pointer group-hover:text-primary"}`,
|
|
5187
|
-
children:
|
|
5198
|
+
children: R
|
|
5188
5199
|
}
|
|
5189
5200
|
),
|
|
5190
5201
|
_ && !h && /* @__PURE__ */ l(
|
|
@@ -5283,7 +5294,7 @@ function mm(e, ...t) {
|
|
|
5283
5294
|
);
|
|
5284
5295
|
return t.map(n);
|
|
5285
5296
|
}
|
|
5286
|
-
function
|
|
5297
|
+
function va(e, t) {
|
|
5287
5298
|
const n = $e(e, t?.in);
|
|
5288
5299
|
return n.setHours(0, 0, 0, 0), n;
|
|
5289
5300
|
}
|
|
@@ -5292,7 +5303,7 @@ function pm(e, t, n) {
|
|
|
5292
5303
|
n?.in,
|
|
5293
5304
|
e,
|
|
5294
5305
|
t
|
|
5295
|
-
), a =
|
|
5306
|
+
), a = va(r), s = va(o), i = +a - ba(a), c = +s - ba(s);
|
|
5296
5307
|
return Math.round((i - c) / dm);
|
|
5297
5308
|
}
|
|
5298
5309
|
function hm(e, t) {
|
|
@@ -5309,7 +5320,7 @@ function bm(e, t) {
|
|
|
5309
5320
|
const n = $e(e, t?.in);
|
|
5310
5321
|
return n.setFullYear(n.getFullYear(), 0, 1), n.setHours(0, 0, 0, 0), n;
|
|
5311
5322
|
}
|
|
5312
|
-
const
|
|
5323
|
+
const vm = {
|
|
5313
5324
|
lessThanXSeconds: {
|
|
5314
5325
|
one: "less than a second",
|
|
5315
5326
|
other: "less than {{count}} seconds"
|
|
@@ -5371,9 +5382,9 @@ const ym = {
|
|
|
5371
5382
|
one: "almost 1 year",
|
|
5372
5383
|
other: "almost {{count}} years"
|
|
5373
5384
|
}
|
|
5374
|
-
},
|
|
5385
|
+
}, ym = (e, t, n) => {
|
|
5375
5386
|
let r;
|
|
5376
|
-
const o =
|
|
5387
|
+
const o = vm[e];
|
|
5377
5388
|
return typeof o == "string" ? r = o : t === 1 ? r = o.one : r = o.other.replace("{{count}}", t.toString()), n?.addSuffix ? n.comparison && n.comparison > 0 ? "in " + r : r + " ago" : r;
|
|
5378
5389
|
};
|
|
5379
5390
|
function Tr(e) {
|
|
@@ -5730,7 +5741,7 @@ const Fm = /^(\d+)(th|st|nd|rd)?/i, $m = /\d+/i, zm = {
|
|
|
5730
5741
|
})
|
|
5731
5742
|
}, Xm = {
|
|
5732
5743
|
code: "en-US",
|
|
5733
|
-
formatDistance:
|
|
5744
|
+
formatDistance: ym,
|
|
5734
5745
|
formatLong: Cm,
|
|
5735
5746
|
formatRelative: Nm,
|
|
5736
5747
|
localize: Mm,
|
|
@@ -5828,7 +5839,7 @@ const Ze = {
|
|
|
5828
5839
|
afternoon: "afternoon",
|
|
5829
5840
|
evening: "evening",
|
|
5830
5841
|
night: "night"
|
|
5831
|
-
},
|
|
5842
|
+
}, ya = {
|
|
5832
5843
|
// Era
|
|
5833
5844
|
G: function(e, t, n) {
|
|
5834
5845
|
const r = e.getFullYear() > 0 ? 1 : 0;
|
|
@@ -6437,7 +6448,7 @@ function Mn(e, t, n) {
|
|
|
6437
6448
|
const p = d[0];
|
|
6438
6449
|
if (p === "'")
|
|
6439
6450
|
return { isToken: !1, value: hp(d) };
|
|
6440
|
-
if (
|
|
6451
|
+
if (ya[p])
|
|
6441
6452
|
return { isToken: !0, value: d };
|
|
6442
6453
|
if (p.match(pp))
|
|
6443
6454
|
throw new RangeError(
|
|
@@ -6455,7 +6466,7 @@ function Mn(e, t, n) {
|
|
|
6455
6466
|
if (!d.isToken) return d.value;
|
|
6456
6467
|
const p = d.value;
|
|
6457
6468
|
(ip(p) || sp(p)) && cp(p, t, String(e));
|
|
6458
|
-
const g =
|
|
6469
|
+
const g = ya[p[0]];
|
|
6459
6470
|
return g(i, p, o.localize, u);
|
|
6460
6471
|
}).join("");
|
|
6461
6472
|
}
|
|
@@ -6467,7 +6478,7 @@ function gp(e, t) {
|
|
|
6467
6478
|
return f.useReducer((n, r) => t[n][r] ?? n, e);
|
|
6468
6479
|
}
|
|
6469
6480
|
var qn = (e) => {
|
|
6470
|
-
const { present: t, children: n } = e, r = bp(t), o = typeof n == "function" ? n({ present: r.isPresent }) : f.Children.only(n), a = de(r.ref,
|
|
6481
|
+
const { present: t, children: n } = e, r = bp(t), o = typeof n == "function" ? n({ present: r.isPresent }) : f.Children.only(n), a = de(r.ref, vp(o));
|
|
6471
6482
|
return typeof n == "function" || r.isPresent ? f.cloneElement(o, { ref: a }) : null;
|
|
6472
6483
|
};
|
|
6473
6484
|
qn.displayName = "Presence";
|
|
@@ -6486,27 +6497,27 @@ function bp(e) {
|
|
|
6486
6497
|
}
|
|
6487
6498
|
});
|
|
6488
6499
|
return f.useEffect(() => {
|
|
6489
|
-
const u =
|
|
6500
|
+
const u = yn(r.current);
|
|
6490
6501
|
a.current = i === "mounted" ? u : "none";
|
|
6491
|
-
}, [i]),
|
|
6502
|
+
}, [i]), ye(() => {
|
|
6492
6503
|
const u = r.current, d = o.current;
|
|
6493
6504
|
if (d !== e) {
|
|
6494
|
-
const g = a.current, m =
|
|
6505
|
+
const g = a.current, m = yn(u);
|
|
6495
6506
|
e ? c("MOUNT") : m === "none" || u?.display === "none" ? c("UNMOUNT") : c(d && g !== m ? "ANIMATION_OUT" : "UNMOUNT"), o.current = e;
|
|
6496
6507
|
}
|
|
6497
|
-
}, [e, c]),
|
|
6508
|
+
}, [e, c]), ye(() => {
|
|
6498
6509
|
if (t) {
|
|
6499
6510
|
let u;
|
|
6500
6511
|
const d = t.ownerDocument.defaultView ?? window, p = (m) => {
|
|
6501
|
-
const h =
|
|
6512
|
+
const h = yn(r.current).includes(CSS.escape(m.animationName));
|
|
6502
6513
|
if (m.target === t && h && (c("ANIMATION_END"), !o.current)) {
|
|
6503
|
-
const
|
|
6514
|
+
const v = t.style.animationFillMode;
|
|
6504
6515
|
t.style.animationFillMode = "forwards", u = d.setTimeout(() => {
|
|
6505
|
-
t.style.animationFillMode === "forwards" && (t.style.animationFillMode =
|
|
6516
|
+
t.style.animationFillMode === "forwards" && (t.style.animationFillMode = v);
|
|
6506
6517
|
});
|
|
6507
6518
|
}
|
|
6508
6519
|
}, g = (m) => {
|
|
6509
|
-
m.target === t && (a.current =
|
|
6520
|
+
m.target === t && (a.current = yn(r.current));
|
|
6510
6521
|
};
|
|
6511
6522
|
return t.addEventListener("animationstart", g), t.addEventListener("animationcancel", p), t.addEventListener("animationend", p), () => {
|
|
6512
6523
|
d.clearTimeout(u), t.removeEventListener("animationstart", g), t.removeEventListener("animationcancel", p), t.removeEventListener("animationend", p);
|
|
@@ -6520,14 +6531,14 @@ function bp(e) {
|
|
|
6520
6531
|
}, [])
|
|
6521
6532
|
};
|
|
6522
6533
|
}
|
|
6523
|
-
function
|
|
6534
|
+
function yn(e) {
|
|
6524
6535
|
return e?.animationName || "none";
|
|
6525
6536
|
}
|
|
6526
|
-
function
|
|
6537
|
+
function vp(e) {
|
|
6527
6538
|
let t = Object.getOwnPropertyDescriptor(e.props, "ref")?.get, n = t && "isReactWarning" in t && t.isReactWarning;
|
|
6528
6539
|
return n ? e.ref : (t = Object.getOwnPropertyDescriptor(e, "ref")?.get, n = t && "isReactWarning" in t && t.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
|
|
6529
6540
|
}
|
|
6530
|
-
var
|
|
6541
|
+
var yp = [
|
|
6531
6542
|
"a",
|
|
6532
6543
|
"button",
|
|
6533
6544
|
"div",
|
|
@@ -6545,13 +6556,13 @@ var vp = [
|
|
|
6545
6556
|
"span",
|
|
6546
6557
|
"svg",
|
|
6547
6558
|
"ul"
|
|
6548
|
-
], ii =
|
|
6559
|
+
], ii = yp.reduce((e, t) => {
|
|
6549
6560
|
const n = /* @__PURE__ */ Ee(`Primitive.${t}`), r = f.forwardRef((o, a) => {
|
|
6550
6561
|
const { asChild: s, ...i } = o, c = s ? n : t;
|
|
6551
6562
|
return typeof window < "u" && (window[/* @__PURE__ */ Symbol.for("radix-ui")] = !0), /* @__PURE__ */ l(c, { ...i, ref: a });
|
|
6552
6563
|
});
|
|
6553
6564
|
return r.displayName = `Primitive.${t}`, { ...e, [t]: r };
|
|
6554
|
-
}, {}), Kn = "Popover", [ci] =
|
|
6565
|
+
}, {}), Kn = "Popover", [ci] = yt(Kn, [
|
|
6555
6566
|
Bn
|
|
6556
6567
|
]), on = Bn(), [wp, ct] = ci(Kn), li = (e) => {
|
|
6557
6568
|
const {
|
|
@@ -6760,17 +6771,17 @@ function bi(e) {
|
|
|
6760
6771
|
return e ? "open" : "closed";
|
|
6761
6772
|
}
|
|
6762
6773
|
var Pp = li, Op = fi, _p = mi, Mp = pi;
|
|
6763
|
-
function
|
|
6774
|
+
function vi(e) {
|
|
6764
6775
|
var t, n, r = "";
|
|
6765
6776
|
if (typeof e == "string" || typeof e == "number") r += e;
|
|
6766
6777
|
else if (typeof e == "object") if (Array.isArray(e)) {
|
|
6767
6778
|
var o = e.length;
|
|
6768
|
-
for (t = 0; t < o; t++) e[t] && (n =
|
|
6779
|
+
for (t = 0; t < o; t++) e[t] && (n = vi(e[t])) && (r && (r += " "), r += n);
|
|
6769
6780
|
} else for (n in e) e[n] && (r && (r += " "), r += n);
|
|
6770
6781
|
return r;
|
|
6771
6782
|
}
|
|
6772
6783
|
function Dp() {
|
|
6773
|
-
for (var e, t, n = 0, r = "", o = arguments.length; n < o; n++) (e = arguments[n]) && (t =
|
|
6784
|
+
for (var e, t, n = 0, r = "", o = arguments.length; n < o; n++) (e = arguments[n]) && (t = vi(e)) && (r && (r += " "), r += t);
|
|
6774
6785
|
return r;
|
|
6775
6786
|
}
|
|
6776
6787
|
const Ip = (e, t) => {
|
|
@@ -6783,7 +6794,7 @@ const Ip = (e, t) => {
|
|
|
6783
6794
|
}, Lp = (e, t) => ({
|
|
6784
6795
|
classGroupId: e,
|
|
6785
6796
|
validator: t
|
|
6786
|
-
}),
|
|
6797
|
+
}), yi = (e = /* @__PURE__ */ new Map(), t = null, n) => ({
|
|
6787
6798
|
nextPart: e,
|
|
6788
6799
|
validators: t,
|
|
6789
6800
|
classGroupId: n
|
|
@@ -6834,7 +6845,7 @@ const Ip = (e, t) => {
|
|
|
6834
6845
|
} = e;
|
|
6835
6846
|
return Hp(n, t);
|
|
6836
6847
|
}, Hp = (e, t) => {
|
|
6837
|
-
const n =
|
|
6848
|
+
const n = yi();
|
|
6838
6849
|
for (const r in e) {
|
|
6839
6850
|
const o = e[r];
|
|
6840
6851
|
po(o, n, r, t);
|
|
@@ -6877,7 +6888,7 @@ const Ip = (e, t) => {
|
|
|
6877
6888
|
for (let a = 0; a < o; a++) {
|
|
6878
6889
|
const s = r[a];
|
|
6879
6890
|
let i = n.nextPart.get(s);
|
|
6880
|
-
i || (i =
|
|
6891
|
+
i || (i = yi(), n.nextPart.set(s, i)), n = i;
|
|
6881
6892
|
}
|
|
6882
6893
|
return n;
|
|
6883
6894
|
}, Gp = (e) => "isThemeGetter" in e && e.isThemeGetter === !0, Yp = (e) => {
|
|
@@ -6920,18 +6931,18 @@ const Ip = (e, t) => {
|
|
|
6920
6931
|
let s = 0, i = 0, c = 0, u;
|
|
6921
6932
|
const d = o.length;
|
|
6922
6933
|
for (let h = 0; h < d; h++) {
|
|
6923
|
-
const
|
|
6934
|
+
const v = o[h];
|
|
6924
6935
|
if (s === 0 && i === 0) {
|
|
6925
|
-
if (
|
|
6936
|
+
if (v === Ea) {
|
|
6926
6937
|
a.push(o.slice(c, h)), c = h + 1;
|
|
6927
6938
|
continue;
|
|
6928
6939
|
}
|
|
6929
|
-
if (
|
|
6940
|
+
if (v === "/") {
|
|
6930
6941
|
u = h;
|
|
6931
6942
|
continue;
|
|
6932
6943
|
}
|
|
6933
6944
|
}
|
|
6934
|
-
|
|
6945
|
+
v === "[" ? s++ : v === "]" ? s-- : v === "(" ? i++ : v === ")" && i--;
|
|
6935
6946
|
}
|
|
6936
6947
|
const p = a.length === 0 ? o : o.slice(c);
|
|
6937
6948
|
let g = p, m = !1;
|
|
@@ -6995,9 +7006,9 @@ const Ip = (e, t) => {
|
|
|
6995
7006
|
c = d + (c.length > 0 ? " " + c : c);
|
|
6996
7007
|
continue;
|
|
6997
7008
|
}
|
|
6998
|
-
let
|
|
7009
|
+
let v = !!h, S = r(v ? b.substring(0, h) : b);
|
|
6999
7010
|
if (!S) {
|
|
7000
|
-
if (!
|
|
7011
|
+
if (!v) {
|
|
7001
7012
|
c = d + (c.length > 0 ? " " + c : c);
|
|
7002
7013
|
continue;
|
|
7003
7014
|
}
|
|
@@ -7005,15 +7016,15 @@ const Ip = (e, t) => {
|
|
|
7005
7016
|
c = d + (c.length > 0 ? " " + c : c);
|
|
7006
7017
|
continue;
|
|
7007
7018
|
}
|
|
7008
|
-
|
|
7019
|
+
v = !1;
|
|
7009
7020
|
}
|
|
7010
7021
|
const E = g.length === 0 ? "" : g.length === 1 ? g[0] : a(g).join(":"), C = m ? E + jr : E, w = C + S;
|
|
7011
7022
|
if (s.indexOf(w) > -1)
|
|
7012
7023
|
continue;
|
|
7013
7024
|
s.push(w);
|
|
7014
|
-
const x = o(S,
|
|
7015
|
-
for (let
|
|
7016
|
-
const _ = x[
|
|
7025
|
+
const x = o(S, v);
|
|
7026
|
+
for (let R = 0; R < x.length; ++R) {
|
|
7027
|
+
const _ = x[R];
|
|
7017
7028
|
s.push(C + _);
|
|
7018
7029
|
}
|
|
7019
7030
|
c = d + (c.length > 0 ? " " + c : c);
|
|
@@ -7052,14 +7063,14 @@ const Ip = (e, t) => {
|
|
|
7052
7063
|
// For example, `hsl(0 0% 0%)` would be classified as a length without this check.
|
|
7053
7064
|
// I could also use lookbehind assertion in `lengthUnitRegex` but that isn't supported widely enough.
|
|
7054
7065
|
ah.test(e) && !sh.test(e)
|
|
7055
|
-
), ho = () => !1, uh = (e) => ih.test(e), dh = (e) => ch.test(e), fh = (e) => !W(e) && !H(e), mh = (e) => lt(e, Ti, ho), W = (e) => Ci.test(e), pt = (e) => lt(e, Ri, lh), ka = (e) => lt(e, xh, X), ph = (e) => lt(e, Oi, Ni), hh = (e) => lt(e, Pi, ho), Aa = (e) => lt(e, ki, ho), gh = (e) => lt(e, Ai, dh), wn = (e) => lt(e, _i, uh), H = (e) => Ei.test(e), qt = (e) => wt(e, Ri), bh = (e) => wt(e, Pi), Ta = (e) => wt(e, ki),
|
|
7066
|
+
), ho = () => !1, uh = (e) => ih.test(e), dh = (e) => ch.test(e), fh = (e) => !W(e) && !H(e), mh = (e) => lt(e, Ti, ho), W = (e) => Ci.test(e), pt = (e) => lt(e, Ri, lh), ka = (e) => lt(e, xh, X), ph = (e) => lt(e, Oi, Ni), hh = (e) => lt(e, Pi, ho), Aa = (e) => lt(e, ki, ho), gh = (e) => lt(e, Ai, dh), wn = (e) => lt(e, _i, uh), H = (e) => Ei.test(e), qt = (e) => wt(e, Ri), bh = (e) => wt(e, Pi), Ta = (e) => wt(e, ki), vh = (e) => wt(e, Ti), yh = (e) => wt(e, Ai), xn = (e) => wt(e, _i, !0), wh = (e) => wt(e, Oi, !0), lt = (e, t, n) => {
|
|
7056
7067
|
const r = Ci.exec(e);
|
|
7057
7068
|
return r ? r[1] ? t(r[1]) : n(r[2]) : !1;
|
|
7058
7069
|
}, wt = (e, t, n = !1) => {
|
|
7059
7070
|
const r = Ei.exec(e);
|
|
7060
7071
|
return r ? r[1] ? t(r[1]) : n : !1;
|
|
7061
7072
|
}, ki = (e) => e === "position" || e === "percentage", Ai = (e) => e === "image" || e === "url", Ti = (e) => e === "length" || e === "size" || e === "bg-size", Ri = (e) => e === "length", xh = (e) => e === "number", Pi = (e) => e === "family-name", Oi = (e) => e === "number" || e === "weight", _i = (e) => e === "shadow", Sh = () => {
|
|
7062
|
-
const e = pe("color"), t = pe("font"), n = pe("text"), r = pe("font-weight"), o = pe("tracking"), a = pe("leading"), s = pe("breakpoint"), i = pe("container"), c = pe("spacing"), u = pe("radius"), d = pe("shadow"), p = pe("inset-shadow"), g = pe("text-shadow"), m = pe("drop-shadow"), b = pe("blur"), h = pe("perspective"),
|
|
7073
|
+
const e = pe("color"), t = pe("font"), n = pe("text"), r = pe("font-weight"), o = pe("tracking"), a = pe("leading"), s = pe("breakpoint"), i = pe("container"), c = pe("spacing"), u = pe("radius"), d = pe("shadow"), p = pe("inset-shadow"), g = pe("text-shadow"), m = pe("drop-shadow"), b = pe("blur"), h = pe("perspective"), v = pe("aspect"), S = pe("ease"), E = pe("animate"), C = () => ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"], w = () => [
|
|
7063
7074
|
"center",
|
|
7064
7075
|
"top",
|
|
7065
7076
|
"bottom",
|
|
@@ -7077,13 +7088,13 @@ const Ip = (e, t) => {
|
|
|
7077
7088
|
"bottom-left",
|
|
7078
7089
|
// Deprecated since Tailwind CSS v4.1.0, see https://github.com/tailwindlabs/tailwindcss/pull/17378
|
|
7079
7090
|
"left-bottom"
|
|
7080
|
-
], x = () => [...w(), H, W],
|
|
7091
|
+
], x = () => [...w(), H, W], R = () => ["auto", "hidden", "clip", "visible", "scroll"], _ = () => ["auto", "contain", "none"], O = () => [H, W, c], $ = () => [Je, "full", "auto", ...O()], z = () => [et, "none", "subgrid", H, W], B = () => ["auto", {
|
|
7081
7092
|
span: ["full", et, H, W]
|
|
7082
|
-
}, et, H, W], G = () => [et, "auto", H, W], M = () => ["auto", "min", "max", "fr", H, W], F = () => ["start", "end", "center", "between", "around", "evenly", "stretch", "baseline", "center-safe", "end-safe"], N = () => ["start", "end", "center", "stretch", "center-safe", "end-safe"], k = () => ["auto", ...O()], D = () => [Je, "auto", "full", "dvw", "dvh", "lvw", "lvh", "svw", "svh", "min", "max", "fit", ...O()],
|
|
7093
|
+
}, et, H, W], G = () => [et, "auto", H, W], M = () => ["auto", "min", "max", "fr", H, W], F = () => ["start", "end", "center", "between", "around", "evenly", "stretch", "baseline", "center-safe", "end-safe"], N = () => ["start", "end", "center", "stretch", "center-safe", "end-safe"], k = () => ["auto", ...O()], D = () => [Je, "auto", "full", "dvw", "dvh", "lvw", "lvh", "svw", "svh", "min", "max", "fit", ...O()], A = () => [Je, "screen", "full", "dvw", "lvw", "svw", "min", "max", "fit", ...O()], P = () => [Je, "screen", "full", "lh", "dvh", "lvh", "svh", "min", "max", "fit", ...O()], T = () => [e, H, W], q = () => [...w(), Ta, Aa, {
|
|
7083
7094
|
position: [H, W]
|
|
7084
7095
|
}], te = () => ["no-repeat", {
|
|
7085
7096
|
repeat: ["", "x", "y", "space", "round"]
|
|
7086
|
-
}], K = () => ["auto", "cover", "contain",
|
|
7097
|
+
}], K = () => ["auto", "cover", "contain", vh, mh, {
|
|
7087
7098
|
size: [H, W]
|
|
7088
7099
|
}], ge = () => [Rr, qt, pt], Y = () => [
|
|
7089
7100
|
// Deprecated since Tailwind CSS v4.0.0
|
|
@@ -7133,7 +7144,7 @@ const Ip = (e, t) => {
|
|
|
7133
7144
|
* @see https://tailwindcss.com/docs/aspect-ratio
|
|
7134
7145
|
*/
|
|
7135
7146
|
aspect: [{
|
|
7136
|
-
aspect: ["auto", "square", Je, W, H,
|
|
7147
|
+
aspect: ["auto", "square", Je, W, H, v]
|
|
7137
7148
|
}],
|
|
7138
7149
|
/**
|
|
7139
7150
|
* Container
|
|
@@ -7231,21 +7242,21 @@ const Ip = (e, t) => {
|
|
|
7231
7242
|
* @see https://tailwindcss.com/docs/overflow
|
|
7232
7243
|
*/
|
|
7233
7244
|
overflow: [{
|
|
7234
|
-
overflow:
|
|
7245
|
+
overflow: R()
|
|
7235
7246
|
}],
|
|
7236
7247
|
/**
|
|
7237
7248
|
* Overflow X
|
|
7238
7249
|
* @see https://tailwindcss.com/docs/overflow
|
|
7239
7250
|
*/
|
|
7240
7251
|
"overflow-x": [{
|
|
7241
|
-
"overflow-x":
|
|
7252
|
+
"overflow-x": R()
|
|
7242
7253
|
}],
|
|
7243
7254
|
/**
|
|
7244
7255
|
* Overflow Y
|
|
7245
7256
|
* @see https://tailwindcss.com/docs/overflow
|
|
7246
7257
|
*/
|
|
7247
7258
|
"overflow-y": [{
|
|
7248
|
-
"overflow-y":
|
|
7259
|
+
"overflow-y": R()
|
|
7249
7260
|
}],
|
|
7250
7261
|
/**
|
|
7251
7262
|
* Overscroll Behavior
|
|
@@ -7785,42 +7796,42 @@ const Ip = (e, t) => {
|
|
|
7785
7796
|
* @see https://tailwindcss.com/docs/width
|
|
7786
7797
|
*/
|
|
7787
7798
|
"inline-size": [{
|
|
7788
|
-
inline: ["auto", ...
|
|
7799
|
+
inline: ["auto", ...A()]
|
|
7789
7800
|
}],
|
|
7790
7801
|
/**
|
|
7791
7802
|
* Min-Inline Size
|
|
7792
7803
|
* @see https://tailwindcss.com/docs/min-width
|
|
7793
7804
|
*/
|
|
7794
7805
|
"min-inline-size": [{
|
|
7795
|
-
"min-inline": ["auto", ...
|
|
7806
|
+
"min-inline": ["auto", ...A()]
|
|
7796
7807
|
}],
|
|
7797
7808
|
/**
|
|
7798
7809
|
* Max-Inline Size
|
|
7799
7810
|
* @see https://tailwindcss.com/docs/max-width
|
|
7800
7811
|
*/
|
|
7801
7812
|
"max-inline-size": [{
|
|
7802
|
-
"max-inline": ["none", ...
|
|
7813
|
+
"max-inline": ["none", ...A()]
|
|
7803
7814
|
}],
|
|
7804
7815
|
/**
|
|
7805
7816
|
* Block Size
|
|
7806
7817
|
* @see https://tailwindcss.com/docs/height
|
|
7807
7818
|
*/
|
|
7808
7819
|
"block-size": [{
|
|
7809
|
-
block: ["auto", ...
|
|
7820
|
+
block: ["auto", ...P()]
|
|
7810
7821
|
}],
|
|
7811
7822
|
/**
|
|
7812
7823
|
* Min-Block Size
|
|
7813
7824
|
* @see https://tailwindcss.com/docs/min-height
|
|
7814
7825
|
*/
|
|
7815
7826
|
"min-block-size": [{
|
|
7816
|
-
"min-block": ["auto", ...
|
|
7827
|
+
"min-block": ["auto", ...P()]
|
|
7817
7828
|
}],
|
|
7818
7829
|
/**
|
|
7819
7830
|
* Max-Block Size
|
|
7820
7831
|
* @see https://tailwindcss.com/docs/max-height
|
|
7821
7832
|
*/
|
|
7822
7833
|
"max-block-size": [{
|
|
7823
|
-
"max-block": ["none", ...
|
|
7834
|
+
"max-block": ["none", ...P()]
|
|
7824
7835
|
}],
|
|
7825
7836
|
/**
|
|
7826
7837
|
* Width
|
|
@@ -8018,14 +8029,14 @@ const Ip = (e, t) => {
|
|
|
8018
8029
|
* @see https://v3.tailwindcss.com/docs/placeholder-color
|
|
8019
8030
|
*/
|
|
8020
8031
|
"placeholder-color": [{
|
|
8021
|
-
placeholder:
|
|
8032
|
+
placeholder: T()
|
|
8022
8033
|
}],
|
|
8023
8034
|
/**
|
|
8024
8035
|
* Text Color
|
|
8025
8036
|
* @see https://tailwindcss.com/docs/text-color
|
|
8026
8037
|
*/
|
|
8027
8038
|
"text-color": [{
|
|
8028
|
-
text:
|
|
8039
|
+
text: T()
|
|
8029
8040
|
}],
|
|
8030
8041
|
/**
|
|
8031
8042
|
* Text Decoration
|
|
@@ -8051,7 +8062,7 @@ const Ip = (e, t) => {
|
|
|
8051
8062
|
* @see https://tailwindcss.com/docs/text-decoration-color
|
|
8052
8063
|
*/
|
|
8053
8064
|
"text-decoration-color": [{
|
|
8054
|
-
decoration:
|
|
8065
|
+
decoration: T()
|
|
8055
8066
|
}],
|
|
8056
8067
|
/**
|
|
8057
8068
|
* Text Underline Offset
|
|
@@ -8182,14 +8193,14 @@ const Ip = (e, t) => {
|
|
|
8182
8193
|
}, et, H, W],
|
|
8183
8194
|
radial: ["", H, W],
|
|
8184
8195
|
conic: [et, H, W]
|
|
8185
|
-
},
|
|
8196
|
+
}, yh, gh]
|
|
8186
8197
|
}],
|
|
8187
8198
|
/**
|
|
8188
8199
|
* Background Color
|
|
8189
8200
|
* @see https://tailwindcss.com/docs/background-color
|
|
8190
8201
|
*/
|
|
8191
8202
|
"bg-color": [{
|
|
8192
|
-
bg:
|
|
8203
|
+
bg: T()
|
|
8193
8204
|
}],
|
|
8194
8205
|
/**
|
|
8195
8206
|
* Gradient Color Stops From Position
|
|
@@ -8217,21 +8228,21 @@ const Ip = (e, t) => {
|
|
|
8217
8228
|
* @see https://tailwindcss.com/docs/gradient-color-stops
|
|
8218
8229
|
*/
|
|
8219
8230
|
"gradient-from": [{
|
|
8220
|
-
from:
|
|
8231
|
+
from: T()
|
|
8221
8232
|
}],
|
|
8222
8233
|
/**
|
|
8223
8234
|
* Gradient Color Stops Via
|
|
8224
8235
|
* @see https://tailwindcss.com/docs/gradient-color-stops
|
|
8225
8236
|
*/
|
|
8226
8237
|
"gradient-via": [{
|
|
8227
|
-
via:
|
|
8238
|
+
via: T()
|
|
8228
8239
|
}],
|
|
8229
8240
|
/**
|
|
8230
8241
|
* Gradient Color Stops To
|
|
8231
8242
|
* @see https://tailwindcss.com/docs/gradient-color-stops
|
|
8232
8243
|
*/
|
|
8233
8244
|
"gradient-to": [{
|
|
8234
|
-
to:
|
|
8245
|
+
to: T()
|
|
8235
8246
|
}],
|
|
8236
8247
|
// ---------------
|
|
8237
8248
|
// --- Borders ---
|
|
@@ -8461,84 +8472,84 @@ const Ip = (e, t) => {
|
|
|
8461
8472
|
* @see https://tailwindcss.com/docs/border-color
|
|
8462
8473
|
*/
|
|
8463
8474
|
"border-color": [{
|
|
8464
|
-
border:
|
|
8475
|
+
border: T()
|
|
8465
8476
|
}],
|
|
8466
8477
|
/**
|
|
8467
8478
|
* Border Color Inline
|
|
8468
8479
|
* @see https://tailwindcss.com/docs/border-color
|
|
8469
8480
|
*/
|
|
8470
8481
|
"border-color-x": [{
|
|
8471
|
-
"border-x":
|
|
8482
|
+
"border-x": T()
|
|
8472
8483
|
}],
|
|
8473
8484
|
/**
|
|
8474
8485
|
* Border Color Block
|
|
8475
8486
|
* @see https://tailwindcss.com/docs/border-color
|
|
8476
8487
|
*/
|
|
8477
8488
|
"border-color-y": [{
|
|
8478
|
-
"border-y":
|
|
8489
|
+
"border-y": T()
|
|
8479
8490
|
}],
|
|
8480
8491
|
/**
|
|
8481
8492
|
* Border Color Inline Start
|
|
8482
8493
|
* @see https://tailwindcss.com/docs/border-color
|
|
8483
8494
|
*/
|
|
8484
8495
|
"border-color-s": [{
|
|
8485
|
-
"border-s":
|
|
8496
|
+
"border-s": T()
|
|
8486
8497
|
}],
|
|
8487
8498
|
/**
|
|
8488
8499
|
* Border Color Inline End
|
|
8489
8500
|
* @see https://tailwindcss.com/docs/border-color
|
|
8490
8501
|
*/
|
|
8491
8502
|
"border-color-e": [{
|
|
8492
|
-
"border-e":
|
|
8503
|
+
"border-e": T()
|
|
8493
8504
|
}],
|
|
8494
8505
|
/**
|
|
8495
8506
|
* Border Color Block Start
|
|
8496
8507
|
* @see https://tailwindcss.com/docs/border-color
|
|
8497
8508
|
*/
|
|
8498
8509
|
"border-color-bs": [{
|
|
8499
|
-
"border-bs":
|
|
8510
|
+
"border-bs": T()
|
|
8500
8511
|
}],
|
|
8501
8512
|
/**
|
|
8502
8513
|
* Border Color Block End
|
|
8503
8514
|
* @see https://tailwindcss.com/docs/border-color
|
|
8504
8515
|
*/
|
|
8505
8516
|
"border-color-be": [{
|
|
8506
|
-
"border-be":
|
|
8517
|
+
"border-be": T()
|
|
8507
8518
|
}],
|
|
8508
8519
|
/**
|
|
8509
8520
|
* Border Color Top
|
|
8510
8521
|
* @see https://tailwindcss.com/docs/border-color
|
|
8511
8522
|
*/
|
|
8512
8523
|
"border-color-t": [{
|
|
8513
|
-
"border-t":
|
|
8524
|
+
"border-t": T()
|
|
8514
8525
|
}],
|
|
8515
8526
|
/**
|
|
8516
8527
|
* Border Color Right
|
|
8517
8528
|
* @see https://tailwindcss.com/docs/border-color
|
|
8518
8529
|
*/
|
|
8519
8530
|
"border-color-r": [{
|
|
8520
|
-
"border-r":
|
|
8531
|
+
"border-r": T()
|
|
8521
8532
|
}],
|
|
8522
8533
|
/**
|
|
8523
8534
|
* Border Color Bottom
|
|
8524
8535
|
* @see https://tailwindcss.com/docs/border-color
|
|
8525
8536
|
*/
|
|
8526
8537
|
"border-color-b": [{
|
|
8527
|
-
"border-b":
|
|
8538
|
+
"border-b": T()
|
|
8528
8539
|
}],
|
|
8529
8540
|
/**
|
|
8530
8541
|
* Border Color Left
|
|
8531
8542
|
* @see https://tailwindcss.com/docs/border-color
|
|
8532
8543
|
*/
|
|
8533
8544
|
"border-color-l": [{
|
|
8534
|
-
"border-l":
|
|
8545
|
+
"border-l": T()
|
|
8535
8546
|
}],
|
|
8536
8547
|
/**
|
|
8537
8548
|
* Divide Color
|
|
8538
8549
|
* @see https://tailwindcss.com/docs/divide-color
|
|
8539
8550
|
*/
|
|
8540
8551
|
"divide-color": [{
|
|
8541
|
-
divide:
|
|
8552
|
+
divide: T()
|
|
8542
8553
|
}],
|
|
8543
8554
|
/**
|
|
8544
8555
|
* Outline Style
|
|
@@ -8566,7 +8577,7 @@ const Ip = (e, t) => {
|
|
|
8566
8577
|
* @see https://tailwindcss.com/docs/outline-color
|
|
8567
8578
|
*/
|
|
8568
8579
|
"outline-color": [{
|
|
8569
|
-
outline:
|
|
8580
|
+
outline: T()
|
|
8570
8581
|
}],
|
|
8571
8582
|
// ---------------
|
|
8572
8583
|
// --- Effects ---
|
|
@@ -8590,7 +8601,7 @@ const Ip = (e, t) => {
|
|
|
8590
8601
|
* @see https://tailwindcss.com/docs/box-shadow#setting-the-shadow-color
|
|
8591
8602
|
*/
|
|
8592
8603
|
"shadow-color": [{
|
|
8593
|
-
shadow:
|
|
8604
|
+
shadow: T()
|
|
8594
8605
|
}],
|
|
8595
8606
|
/**
|
|
8596
8607
|
* Inset Box Shadow
|
|
@@ -8604,7 +8615,7 @@ const Ip = (e, t) => {
|
|
|
8604
8615
|
* @see https://tailwindcss.com/docs/box-shadow#setting-the-inset-shadow-color
|
|
8605
8616
|
*/
|
|
8606
8617
|
"inset-shadow-color": [{
|
|
8607
|
-
"inset-shadow":
|
|
8618
|
+
"inset-shadow": T()
|
|
8608
8619
|
}],
|
|
8609
8620
|
/**
|
|
8610
8621
|
* Ring Width
|
|
@@ -8625,7 +8636,7 @@ const Ip = (e, t) => {
|
|
|
8625
8636
|
* @see https://tailwindcss.com/docs/box-shadow#setting-the-ring-color
|
|
8626
8637
|
*/
|
|
8627
8638
|
"ring-color": [{
|
|
8628
|
-
ring:
|
|
8639
|
+
ring: T()
|
|
8629
8640
|
}],
|
|
8630
8641
|
/**
|
|
8631
8642
|
* Ring Offset Width
|
|
@@ -8643,7 +8654,7 @@ const Ip = (e, t) => {
|
|
|
8643
8654
|
* @see https://github.com/tailwindlabs/tailwindcss/blob/v4.0.0/packages/tailwindcss/src/utilities.ts#L4158
|
|
8644
8655
|
*/
|
|
8645
8656
|
"ring-offset-color": [{
|
|
8646
|
-
"ring-offset":
|
|
8657
|
+
"ring-offset": T()
|
|
8647
8658
|
}],
|
|
8648
8659
|
/**
|
|
8649
8660
|
* Inset Ring Width
|
|
@@ -8657,7 +8668,7 @@ const Ip = (e, t) => {
|
|
|
8657
8668
|
* @see https://tailwindcss.com/docs/box-shadow#setting-the-inset-ring-color
|
|
8658
8669
|
*/
|
|
8659
8670
|
"inset-ring-color": [{
|
|
8660
|
-
"inset-ring":
|
|
8671
|
+
"inset-ring": T()
|
|
8661
8672
|
}],
|
|
8662
8673
|
/**
|
|
8663
8674
|
* Text Shadow
|
|
@@ -8671,7 +8682,7 @@ const Ip = (e, t) => {
|
|
|
8671
8682
|
* @see https://tailwindcss.com/docs/text-shadow#setting-the-shadow-color
|
|
8672
8683
|
*/
|
|
8673
8684
|
"text-shadow-color": [{
|
|
8674
|
-
"text-shadow":
|
|
8685
|
+
"text-shadow": T()
|
|
8675
8686
|
}],
|
|
8676
8687
|
/**
|
|
8677
8688
|
* Opacity
|
|
@@ -8722,10 +8733,10 @@ const Ip = (e, t) => {
|
|
|
8722
8733
|
"mask-linear-to": Z()
|
|
8723
8734
|
}],
|
|
8724
8735
|
"mask-image-linear-from-color": [{
|
|
8725
|
-
"mask-linear-from":
|
|
8736
|
+
"mask-linear-from": T()
|
|
8726
8737
|
}],
|
|
8727
8738
|
"mask-image-linear-to-color": [{
|
|
8728
|
-
"mask-linear-to":
|
|
8739
|
+
"mask-linear-to": T()
|
|
8729
8740
|
}],
|
|
8730
8741
|
"mask-image-t-from-pos": [{
|
|
8731
8742
|
"mask-t-from": Z()
|
|
@@ -8734,10 +8745,10 @@ const Ip = (e, t) => {
|
|
|
8734
8745
|
"mask-t-to": Z()
|
|
8735
8746
|
}],
|
|
8736
8747
|
"mask-image-t-from-color": [{
|
|
8737
|
-
"mask-t-from":
|
|
8748
|
+
"mask-t-from": T()
|
|
8738
8749
|
}],
|
|
8739
8750
|
"mask-image-t-to-color": [{
|
|
8740
|
-
"mask-t-to":
|
|
8751
|
+
"mask-t-to": T()
|
|
8741
8752
|
}],
|
|
8742
8753
|
"mask-image-r-from-pos": [{
|
|
8743
8754
|
"mask-r-from": Z()
|
|
@@ -8746,10 +8757,10 @@ const Ip = (e, t) => {
|
|
|
8746
8757
|
"mask-r-to": Z()
|
|
8747
8758
|
}],
|
|
8748
8759
|
"mask-image-r-from-color": [{
|
|
8749
|
-
"mask-r-from":
|
|
8760
|
+
"mask-r-from": T()
|
|
8750
8761
|
}],
|
|
8751
8762
|
"mask-image-r-to-color": [{
|
|
8752
|
-
"mask-r-to":
|
|
8763
|
+
"mask-r-to": T()
|
|
8753
8764
|
}],
|
|
8754
8765
|
"mask-image-b-from-pos": [{
|
|
8755
8766
|
"mask-b-from": Z()
|
|
@@ -8758,10 +8769,10 @@ const Ip = (e, t) => {
|
|
|
8758
8769
|
"mask-b-to": Z()
|
|
8759
8770
|
}],
|
|
8760
8771
|
"mask-image-b-from-color": [{
|
|
8761
|
-
"mask-b-from":
|
|
8772
|
+
"mask-b-from": T()
|
|
8762
8773
|
}],
|
|
8763
8774
|
"mask-image-b-to-color": [{
|
|
8764
|
-
"mask-b-to":
|
|
8775
|
+
"mask-b-to": T()
|
|
8765
8776
|
}],
|
|
8766
8777
|
"mask-image-l-from-pos": [{
|
|
8767
8778
|
"mask-l-from": Z()
|
|
@@ -8770,10 +8781,10 @@ const Ip = (e, t) => {
|
|
|
8770
8781
|
"mask-l-to": Z()
|
|
8771
8782
|
}],
|
|
8772
8783
|
"mask-image-l-from-color": [{
|
|
8773
|
-
"mask-l-from":
|
|
8784
|
+
"mask-l-from": T()
|
|
8774
8785
|
}],
|
|
8775
8786
|
"mask-image-l-to-color": [{
|
|
8776
|
-
"mask-l-to":
|
|
8787
|
+
"mask-l-to": T()
|
|
8777
8788
|
}],
|
|
8778
8789
|
"mask-image-x-from-pos": [{
|
|
8779
8790
|
"mask-x-from": Z()
|
|
@@ -8782,10 +8793,10 @@ const Ip = (e, t) => {
|
|
|
8782
8793
|
"mask-x-to": Z()
|
|
8783
8794
|
}],
|
|
8784
8795
|
"mask-image-x-from-color": [{
|
|
8785
|
-
"mask-x-from":
|
|
8796
|
+
"mask-x-from": T()
|
|
8786
8797
|
}],
|
|
8787
8798
|
"mask-image-x-to-color": [{
|
|
8788
|
-
"mask-x-to":
|
|
8799
|
+
"mask-x-to": T()
|
|
8789
8800
|
}],
|
|
8790
8801
|
"mask-image-y-from-pos": [{
|
|
8791
8802
|
"mask-y-from": Z()
|
|
@@ -8794,10 +8805,10 @@ const Ip = (e, t) => {
|
|
|
8794
8805
|
"mask-y-to": Z()
|
|
8795
8806
|
}],
|
|
8796
8807
|
"mask-image-y-from-color": [{
|
|
8797
|
-
"mask-y-from":
|
|
8808
|
+
"mask-y-from": T()
|
|
8798
8809
|
}],
|
|
8799
8810
|
"mask-image-y-to-color": [{
|
|
8800
|
-
"mask-y-to":
|
|
8811
|
+
"mask-y-to": T()
|
|
8801
8812
|
}],
|
|
8802
8813
|
"mask-image-radial": [{
|
|
8803
8814
|
"mask-radial": [H, W]
|
|
@@ -8809,10 +8820,10 @@ const Ip = (e, t) => {
|
|
|
8809
8820
|
"mask-radial-to": Z()
|
|
8810
8821
|
}],
|
|
8811
8822
|
"mask-image-radial-from-color": [{
|
|
8812
|
-
"mask-radial-from":
|
|
8823
|
+
"mask-radial-from": T()
|
|
8813
8824
|
}],
|
|
8814
8825
|
"mask-image-radial-to-color": [{
|
|
8815
|
-
"mask-radial-to":
|
|
8826
|
+
"mask-radial-to": T()
|
|
8816
8827
|
}],
|
|
8817
8828
|
"mask-image-radial-shape": [{
|
|
8818
8829
|
"mask-radial": ["circle", "ellipse"]
|
|
@@ -8836,10 +8847,10 @@ const Ip = (e, t) => {
|
|
|
8836
8847
|
"mask-conic-to": Z()
|
|
8837
8848
|
}],
|
|
8838
8849
|
"mask-image-conic-from-color": [{
|
|
8839
|
-
"mask-conic-from":
|
|
8850
|
+
"mask-conic-from": T()
|
|
8840
8851
|
}],
|
|
8841
8852
|
"mask-image-conic-to-color": [{
|
|
8842
|
-
"mask-conic-to":
|
|
8853
|
+
"mask-conic-to": T()
|
|
8843
8854
|
}],
|
|
8844
8855
|
/**
|
|
8845
8856
|
* Mask Mode
|
|
@@ -8946,7 +8957,7 @@ const Ip = (e, t) => {
|
|
|
8946
8957
|
* @see https://tailwindcss.com/docs/filter-drop-shadow#setting-the-shadow-color
|
|
8947
8958
|
*/
|
|
8948
8959
|
"drop-shadow-color": [{
|
|
8949
|
-
"drop-shadow":
|
|
8960
|
+
"drop-shadow": T()
|
|
8950
8961
|
}],
|
|
8951
8962
|
/**
|
|
8952
8963
|
* Grayscale
|
|
@@ -9317,7 +9328,7 @@ const Ip = (e, t) => {
|
|
|
9317
9328
|
* @see https://tailwindcss.com/docs/accent-color
|
|
9318
9329
|
*/
|
|
9319
9330
|
accent: [{
|
|
9320
|
-
accent:
|
|
9331
|
+
accent: T()
|
|
9321
9332
|
}],
|
|
9322
9333
|
/**
|
|
9323
9334
|
* Appearance
|
|
@@ -9331,7 +9342,7 @@ const Ip = (e, t) => {
|
|
|
9331
9342
|
* @see https://tailwindcss.com/docs/just-in-time-mode#caret-color-utilities
|
|
9332
9343
|
*/
|
|
9333
9344
|
"caret-color": [{
|
|
9334
|
-
caret:
|
|
9345
|
+
caret: T()
|
|
9335
9346
|
}],
|
|
9336
9347
|
/**
|
|
9337
9348
|
* Color Scheme
|
|
@@ -9605,7 +9616,7 @@ const Ip = (e, t) => {
|
|
|
9605
9616
|
* @see https://tailwindcss.com/docs/fill
|
|
9606
9617
|
*/
|
|
9607
9618
|
fill: [{
|
|
9608
|
-
fill: ["none", ...
|
|
9619
|
+
fill: ["none", ...T()]
|
|
9609
9620
|
}],
|
|
9610
9621
|
/**
|
|
9611
9622
|
* Stroke Width
|
|
@@ -9619,7 +9630,7 @@ const Ip = (e, t) => {
|
|
|
9619
9630
|
* @see https://tailwindcss.com/docs/stroke
|
|
9620
9631
|
*/
|
|
9621
9632
|
stroke: [{
|
|
9622
|
-
stroke: ["none", ...
|
|
9633
|
+
stroke: ["none", ...T()]
|
|
9623
9634
|
}],
|
|
9624
9635
|
// ---------------------
|
|
9625
9636
|
// --- Accessibility ---
|
|
@@ -9738,7 +9749,7 @@ function Eh({
|
|
|
9738
9749
|
const [, E, C, w] = h, x = new Date(Number(E), Number(C) - 1, Number(w));
|
|
9739
9750
|
return Qt(x) ? x : void 0;
|
|
9740
9751
|
}
|
|
9741
|
-
const
|
|
9752
|
+
const v = m.includes("T") ? m : m.replace(" ", "T"), S = new Date(v);
|
|
9742
9753
|
return Qt(S) ? S : void 0;
|
|
9743
9754
|
}
|
|
9744
9755
|
const b = new Date(m);
|
|
@@ -9871,8 +9882,8 @@ function Ra({
|
|
|
9871
9882
|
api_URL: i,
|
|
9872
9883
|
disabled: c
|
|
9873
9884
|
}) {
|
|
9874
|
-
const u = c, d = e.type === "multifile", p = r?.[e.name] || {}, g = t[e.name], m = d ? g || [] : [g].filter(Boolean), [b, h] = ce(!1),
|
|
9875
|
-
!
|
|
9885
|
+
const u = c, d = e.type === "multifile", p = r?.[e.name] || {}, g = t[e.name], m = d ? g || [] : [g].filter(Boolean), [b, h] = ce(!1), v = i ? `${i}uploads` : null;
|
|
9886
|
+
!v && e.uploadEndpoint && console.error(
|
|
9876
9887
|
`api_URL prop is required when using FileField with upload functionality for field "${e.name}"`
|
|
9877
9888
|
);
|
|
9878
9889
|
const S = (M) => {
|
|
@@ -9882,7 +9893,7 @@ function Ra({
|
|
|
9882
9893
|
}, E = async (M) => {
|
|
9883
9894
|
const F = new FormData();
|
|
9884
9895
|
F.append("file", M);
|
|
9885
|
-
const N = await fetch(`${
|
|
9896
|
+
const N = await fetch(`${v}`, {
|
|
9886
9897
|
method: "POST",
|
|
9887
9898
|
body: F
|
|
9888
9899
|
});
|
|
@@ -9901,14 +9912,14 @@ function Ra({
|
|
|
9901
9912
|
const N = t[M.name] || [];
|
|
9902
9913
|
if (M.maxFiles && N.length + F.length > M.maxFiles)
|
|
9903
9914
|
throw new Error(`Maximum ${M.maxFiles} files allowed`);
|
|
9904
|
-
F.forEach((
|
|
9905
|
-
if (M.maxSize &&
|
|
9915
|
+
F.forEach((A) => {
|
|
9916
|
+
if (M.maxSize && A.size > M.maxSize)
|
|
9906
9917
|
throw new Error(
|
|
9907
9918
|
`Each file must not exceed ${S(M.maxSize)}`
|
|
9908
9919
|
);
|
|
9909
9920
|
});
|
|
9910
9921
|
const k = await Promise.all(
|
|
9911
|
-
F.map((
|
|
9922
|
+
F.map((A) => E(A))
|
|
9912
9923
|
// Updated call
|
|
9913
9924
|
), D = [...N, ...k];
|
|
9914
9925
|
a(M.name, D), s({ ...t, [M.name]: D });
|
|
@@ -9920,7 +9931,7 @@ function Ra({
|
|
|
9920
9931
|
} catch (k) {
|
|
9921
9932
|
kn.error(`Upload failed: ${k.message}`);
|
|
9922
9933
|
}
|
|
9923
|
-
},
|
|
9934
|
+
}, R = async (M, F) => {
|
|
9924
9935
|
if (u) return;
|
|
9925
9936
|
let N;
|
|
9926
9937
|
e.type === "file" ? N = "" : N = (t[M] || []).filter((D) => D !== F), a(M, N), s({ ...t, [M]: N }), o.current?.[M] && (o.current[M].value = "");
|
|
@@ -10011,7 +10022,7 @@ function Ra({
|
|
|
10011
10022
|
"button",
|
|
10012
10023
|
{
|
|
10013
10024
|
type: "button",
|
|
10014
|
-
onClick: () =>
|
|
10025
|
+
onClick: () => R(e.name, M),
|
|
10015
10026
|
className: `text-red-500 hover:text-red-700 ml-3 flex-shrink-0 ${u ? "cursor-not-allowed opacity-50" : ""}`,
|
|
10016
10027
|
disabled: u,
|
|
10017
10028
|
children: "Remove"
|
|
@@ -10099,58 +10110,58 @@ function Nh({
|
|
|
10099
10110
|
] });
|
|
10100
10111
|
}
|
|
10101
10112
|
function kh({ field: e, formValues: t, handleChange: n, handleBlur: r, error: o }) {
|
|
10102
|
-
const [a, s] = ce(!1), i = (
|
|
10103
|
-
if (!
|
|
10104
|
-
if (
|
|
10105
|
-
return Number.isNaN(
|
|
10106
|
-
if (typeof
|
|
10107
|
-
const O =
|
|
10113
|
+
const [a, s] = ce(!1), i = (R) => {
|
|
10114
|
+
if (!R) return null;
|
|
10115
|
+
if (R instanceof Date)
|
|
10116
|
+
return Number.isNaN(R.getTime()) ? null : R;
|
|
10117
|
+
if (typeof R == "string") {
|
|
10118
|
+
const O = R.match(/^(\d{4})-(\d{2})-(\d{2})$/);
|
|
10108
10119
|
if (O) {
|
|
10109
10120
|
const [, B, G, M] = O, F = new Date(Number(B), Number(G) - 1, Number(M));
|
|
10110
10121
|
return Number.isNaN(F.getTime()) ? null : F;
|
|
10111
10122
|
}
|
|
10112
|
-
const $ =
|
|
10123
|
+
const $ = R.includes("T") ? R : R.replace(" ", "T"), z = new Date($);
|
|
10113
10124
|
return Number.isNaN(z.getTime()) ? null : z;
|
|
10114
10125
|
}
|
|
10115
|
-
const _ = new Date(
|
|
10126
|
+
const _ = new Date(R);
|
|
10116
10127
|
return Number.isNaN(_.getTime()) ? null : _;
|
|
10117
|
-
}, c = t[e.name], u = i(c), d = u ? (u.getHours() % 12 || 12).toString().padStart(2, "0") : "12", p = u ? u.getMinutes().toString().padStart(2, "0") : "00", g = u ? u.getHours() >= 12 ? "PM" : "AM" : "PM", m = (
|
|
10118
|
-
if (!
|
|
10128
|
+
}, c = t[e.name], u = i(c), d = u ? (u.getHours() % 12 || 12).toString().padStart(2, "0") : "12", p = u ? u.getMinutes().toString().padStart(2, "0") : "00", g = u ? u.getHours() >= 12 ? "PM" : "AM" : "PM", m = (R) => {
|
|
10129
|
+
if (!R) {
|
|
10119
10130
|
n(e.name, null);
|
|
10120
10131
|
return;
|
|
10121
10132
|
}
|
|
10122
|
-
const _ = new Date(
|
|
10133
|
+
const _ = new Date(R);
|
|
10123
10134
|
u ? (_.setHours(u.getHours()), _.setMinutes(u.getMinutes())) : (_.setHours(12), _.setMinutes(0)), n(e.name, _);
|
|
10124
|
-
}, b = (
|
|
10135
|
+
}, b = (R, _, O) => {
|
|
10125
10136
|
const $ = u ? new Date(u) : /* @__PURE__ */ new Date();
|
|
10126
|
-
let z = parseInt(
|
|
10137
|
+
let z = parseInt(R);
|
|
10127
10138
|
O === "PM" && z !== 12 && (z += 12), O === "AM" && z === 12 && (z = 0), $.setHours(z), $.setMinutes(parseInt(_)), n(e.name, $);
|
|
10128
10139
|
}, h = () => {
|
|
10129
|
-
let
|
|
10130
|
-
|
|
10131
|
-
},
|
|
10132
|
-
let
|
|
10133
|
-
|
|
10140
|
+
let R = parseInt(d);
|
|
10141
|
+
R = R % 12 + 1, b(R.toString(), p, g);
|
|
10142
|
+
}, v = () => {
|
|
10143
|
+
let R = parseInt(d);
|
|
10144
|
+
R = R === 1 ? 12 : R - 1, b(R.toString(), p, g);
|
|
10134
10145
|
}, S = () => {
|
|
10135
|
-
let
|
|
10136
|
-
|
|
10146
|
+
let R = parseInt(p);
|
|
10147
|
+
R = (R + 5) % 60, b(d, R.toString(), g);
|
|
10137
10148
|
}, E = () => {
|
|
10138
|
-
let
|
|
10139
|
-
|
|
10149
|
+
let R = parseInt(p);
|
|
10150
|
+
R = R === 0 ? 55 : R - 5, b(d, R.toString(), g);
|
|
10140
10151
|
}, C = () => {
|
|
10141
10152
|
b(d, p, g === "AM" ? "PM" : "AM");
|
|
10142
10153
|
}, w = () => n(e.name, null), x = [];
|
|
10143
10154
|
if (e.maxDate) {
|
|
10144
|
-
const
|
|
10145
|
-
|
|
10155
|
+
const R = i(e.maxDate);
|
|
10156
|
+
R && x.push({ after: R });
|
|
10146
10157
|
}
|
|
10147
10158
|
if (e.minDate) {
|
|
10148
|
-
const
|
|
10149
|
-
|
|
10159
|
+
const R = i(e.minDate);
|
|
10160
|
+
R && x.push({ before: R });
|
|
10150
10161
|
}
|
|
10151
10162
|
return /* @__PURE__ */ L("div", { className: "relative", children: [
|
|
10152
|
-
/* @__PURE__ */ L(Qn, { open: e.disabled ? !1 : a, onOpenChange: (
|
|
10153
|
-
e.disabled || s(
|
|
10163
|
+
/* @__PURE__ */ L(Qn, { open: e.disabled ? !1 : a, onOpenChange: (R) => {
|
|
10164
|
+
e.disabled || s(R);
|
|
10154
10165
|
}, children: [
|
|
10155
10166
|
/* @__PURE__ */ l(Zn, { asChild: !0, children: /* @__PURE__ */ L(
|
|
10156
10167
|
"button",
|
|
@@ -10161,7 +10172,7 @@ function kh({ field: e, formValues: t, handleChange: n, handleBlur: r, error: o
|
|
|
10161
10172
|
"aria-haspopup": "dialog",
|
|
10162
10173
|
"aria-expanded": a,
|
|
10163
10174
|
onClick: () => !e.disabled && s(!0),
|
|
10164
|
-
onKeyDown: (
|
|
10175
|
+
onKeyDown: (R) => !e.disabled && R.key === "Enter" && s(!0),
|
|
10165
10176
|
className: `
|
|
10166
10177
|
group inline-flex items-center justify-between gap-2
|
|
10167
10178
|
w-full h-10 rounded-lg border bg-white
|
|
@@ -10226,7 +10237,7 @@ function kh({ field: e, formValues: t, handleChange: n, handleBlur: r, error: o
|
|
|
10226
10237
|
/* @__PURE__ */ L("div", { className: "flex flex-col items-center gap-1", children: [
|
|
10227
10238
|
/* @__PURE__ */ l("button", { type: "button", onClick: h, className: "p-1 h-6 w-6 flex items-center justify-center text-slate-400 hover:text-slate-700 hover:bg-slate-200 rounded-full transition-all", children: /* @__PURE__ */ l("svg", { xmlns: "http://www.w3.org/2000/svg", width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ l("path", { d: "m18 15-6-6-6 6" }) }) }),
|
|
10228
10239
|
/* @__PURE__ */ l("div", { className: "w-12 h-10 flex items-center justify-center bg-white border border-slate-200 rounded-lg text-lg font-semibold shadow-sm text-slate-700", children: d }),
|
|
10229
|
-
/* @__PURE__ */ l("button", { type: "button", onClick:
|
|
10240
|
+
/* @__PURE__ */ l("button", { type: "button", onClick: v, className: "p-1 h-6 w-6 flex items-center justify-center text-slate-400 hover:text-slate-700 hover:bg-slate-200 rounded-full transition-all", children: /* @__PURE__ */ l("svg", { xmlns: "http://www.w3.org/2000/svg", width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ l("path", { d: "m6 9 6 6 6-6" }) }) })
|
|
10230
10241
|
] }),
|
|
10231
10242
|
/* @__PURE__ */ l("span", { className: "text-xl font-medium text-slate-300 pb-1", children: ":" }),
|
|
10232
10243
|
/* @__PURE__ */ L("div", { className: "flex flex-col items-center gap-1", children: [
|
|
@@ -10451,7 +10462,7 @@ var Bh = [
|
|
|
10451
10462
|
return typeof window < "u" && (window[/* @__PURE__ */ Symbol.for("radix-ui")] = !0), /* @__PURE__ */ l(c, { ...i, ref: a });
|
|
10452
10463
|
});
|
|
10453
10464
|
return r.displayName = `Primitive.${t}`, { ...e, [t]: r };
|
|
10454
|
-
}, {}), Or = "rovingFocusGroup.onEntryFocus", Vh = { bubbles: !1, cancelable: !0 }, an = "RovingFocusGroup", [Gr, Li, jh] = La(an), [Gh, Fi] =
|
|
10465
|
+
}, {}), Or = "rovingFocusGroup.onEntryFocus", Vh = { bubbles: !1, cancelable: !0 }, an = "RovingFocusGroup", [Gr, Li, jh] = La(an), [Gh, Fi] = yt(
|
|
10455
10466
|
an,
|
|
10456
10467
|
[jh]
|
|
10457
10468
|
), [Yh, qh] = Gh(an), $i = f.forwardRef(
|
|
@@ -10470,12 +10481,12 @@ var Kh = f.forwardRef((e, t) => {
|
|
|
10470
10481
|
onEntryFocus: u,
|
|
10471
10482
|
preventScrollOnEntryFocus: d = !1,
|
|
10472
10483
|
...p
|
|
10473
|
-
} = e, g = f.useRef(null), m = de(t, g), b = Qr(a), [h,
|
|
10484
|
+
} = e, g = f.useRef(null), m = de(t, g), b = Qr(a), [h, v] = en({
|
|
10474
10485
|
prop: s,
|
|
10475
10486
|
defaultProp: i ?? null,
|
|
10476
10487
|
onChange: c,
|
|
10477
10488
|
caller: an
|
|
10478
|
-
}), [S, E] = f.useState(!1), C = nt(u), w = Li(n), x = f.useRef(!1), [
|
|
10489
|
+
}), [S, E] = f.useState(!1), C = nt(u), w = Li(n), x = f.useRef(!1), [R, _] = f.useState(0);
|
|
10479
10490
|
return f.useEffect(() => {
|
|
10480
10491
|
const O = g.current;
|
|
10481
10492
|
if (O)
|
|
@@ -10489,8 +10500,8 @@ var Kh = f.forwardRef((e, t) => {
|
|
|
10489
10500
|
loop: o,
|
|
10490
10501
|
currentTabStopId: h,
|
|
10491
10502
|
onItemFocus: f.useCallback(
|
|
10492
|
-
(O) =>
|
|
10493
|
-
[
|
|
10503
|
+
(O) => v(O),
|
|
10504
|
+
[v]
|
|
10494
10505
|
),
|
|
10495
10506
|
onItemShiftTab: f.useCallback(() => E(!0), []),
|
|
10496
10507
|
onFocusableItemAdd: f.useCallback(
|
|
@@ -10504,7 +10515,7 @@ var Kh = f.forwardRef((e, t) => {
|
|
|
10504
10515
|
children: /* @__PURE__ */ l(
|
|
10505
10516
|
Ii.div,
|
|
10506
10517
|
{
|
|
10507
|
-
tabIndex: S ||
|
|
10518
|
+
tabIndex: S || R === 0 ? -1 : 0,
|
|
10508
10519
|
"data-orientation": r,
|
|
10509
10520
|
...p,
|
|
10510
10521
|
ref: m,
|
|
@@ -10557,25 +10568,25 @@ var Kh = f.forwardRef((e, t) => {
|
|
|
10557
10568
|
"data-orientation": d.orientation,
|
|
10558
10569
|
...i,
|
|
10559
10570
|
ref: t,
|
|
10560
|
-
onMouseDown: ee(e.onMouseDown, (
|
|
10561
|
-
r ? d.onItemFocus(u) :
|
|
10571
|
+
onMouseDown: ee(e.onMouseDown, (v) => {
|
|
10572
|
+
r ? d.onItemFocus(u) : v.preventDefault();
|
|
10562
10573
|
}),
|
|
10563
10574
|
onFocus: ee(e.onFocus, () => d.onItemFocus(u)),
|
|
10564
|
-
onKeyDown: ee(e.onKeyDown, (
|
|
10565
|
-
if (
|
|
10575
|
+
onKeyDown: ee(e.onKeyDown, (v) => {
|
|
10576
|
+
if (v.key === "Tab" && v.shiftKey) {
|
|
10566
10577
|
d.onItemShiftTab();
|
|
10567
10578
|
return;
|
|
10568
10579
|
}
|
|
10569
|
-
if (
|
|
10570
|
-
const S = Zh(
|
|
10580
|
+
if (v.target !== v.currentTarget) return;
|
|
10581
|
+
const S = Zh(v, d.orientation, d.dir);
|
|
10571
10582
|
if (S !== void 0) {
|
|
10572
|
-
if (
|
|
10573
|
-
|
|
10583
|
+
if (v.metaKey || v.ctrlKey || v.altKey || v.shiftKey) return;
|
|
10584
|
+
v.preventDefault();
|
|
10574
10585
|
let C = g().filter((w) => w.focusable).map((w) => w.ref.current);
|
|
10575
10586
|
if (S === "last") C.reverse();
|
|
10576
10587
|
else if (S === "prev" || S === "next") {
|
|
10577
10588
|
S === "prev" && C.reverse();
|
|
10578
|
-
const w = C.indexOf(
|
|
10589
|
+
const w = C.indexOf(v.currentTarget);
|
|
10579
10590
|
C = d.loop ? Jh(C, w + 1) : C.slice(w + 1);
|
|
10580
10591
|
}
|
|
10581
10592
|
setTimeout(() => Hi(C));
|
|
@@ -10615,7 +10626,7 @@ function Hi(e, t = !1) {
|
|
|
10615
10626
|
function Jh(e, t) {
|
|
10616
10627
|
return e.map((n, r) => e[(t + r) % e.length]);
|
|
10617
10628
|
}
|
|
10618
|
-
var eg = $i, tg = Wi, go = "Radio", [ng, Bi] =
|
|
10629
|
+
var eg = $i, tg = Wi, go = "Radio", [ng, Bi] = yt(go), [rg, og] = ng(go), Ui = f.forwardRef(
|
|
10619
10630
|
(e, t) => {
|
|
10620
10631
|
const {
|
|
10621
10632
|
__scopeRadio: n,
|
|
@@ -10627,7 +10638,7 @@ var eg = $i, tg = Wi, go = "Radio", [ng, Bi] = vt(go), [rg, og] = ng(go), Ui = f
|
|
|
10627
10638
|
onCheck: c,
|
|
10628
10639
|
form: u,
|
|
10629
10640
|
...d
|
|
10630
|
-
} = e, [p, g] = f.useState(null), m = de(t, (
|
|
10641
|
+
} = e, [p, g] = f.useState(null), m = de(t, (v) => g(v)), b = f.useRef(!1), h = p ? u || !!p.closest("form") : !0;
|
|
10631
10642
|
return /* @__PURE__ */ L(rg, { scope: n, checked: o, disabled: s, children: [
|
|
10632
10643
|
/* @__PURE__ */ l(
|
|
10633
10644
|
er.button,
|
|
@@ -10641,8 +10652,8 @@ var eg = $i, tg = Wi, go = "Radio", [ng, Bi] = vt(go), [rg, og] = ng(go), Ui = f
|
|
|
10641
10652
|
value: i,
|
|
10642
10653
|
...d,
|
|
10643
10654
|
ref: m,
|
|
10644
|
-
onClick: ee(e.onClick, (
|
|
10645
|
-
o || c?.(), h && (b.current =
|
|
10655
|
+
onClick: ee(e.onClick, (v) => {
|
|
10656
|
+
o || c?.(), h && (b.current = v.isPropagationStopped(), b.current || v.stopPropagation());
|
|
10646
10657
|
})
|
|
10647
10658
|
}
|
|
10648
10659
|
),
|
|
@@ -10724,7 +10735,7 @@ Gi.displayName = ag;
|
|
|
10724
10735
|
function Yi(e) {
|
|
10725
10736
|
return e ? "checked" : "unchecked";
|
|
10726
10737
|
}
|
|
10727
|
-
var sg = ["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"], tr = "RadioGroup", [ig] =
|
|
10738
|
+
var sg = ["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"], tr = "RadioGroup", [ig] = yt(tr, [
|
|
10728
10739
|
Fi,
|
|
10729
10740
|
Bi
|
|
10730
10741
|
]), qi = Fi(), Ki = Bi(), [cg, lg] = ig(tr), Xi = f.forwardRef(
|
|
@@ -10741,7 +10752,7 @@ var sg = ["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"], tr = "RadioGroup",
|
|
|
10741
10752
|
loop: d = !0,
|
|
10742
10753
|
onValueChange: p,
|
|
10743
10754
|
...g
|
|
10744
|
-
} = e, m = qi(n), b = Qr(u), [h,
|
|
10755
|
+
} = e, m = qi(n), b = Qr(u), [h, v] = en({
|
|
10745
10756
|
prop: a,
|
|
10746
10757
|
defaultProp: o ?? null,
|
|
10747
10758
|
onChange: p,
|
|
@@ -10755,7 +10766,7 @@ var sg = ["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"], tr = "RadioGroup",
|
|
|
10755
10766
|
required: s,
|
|
10756
10767
|
disabled: i,
|
|
10757
10768
|
value: h,
|
|
10758
|
-
onValueChange:
|
|
10769
|
+
onValueChange: v,
|
|
10759
10770
|
children: /* @__PURE__ */ l(
|
|
10760
10771
|
eg,
|
|
10761
10772
|
{
|
|
@@ -10890,7 +10901,7 @@ function hg({
|
|
|
10890
10901
|
setCharCounts: d,
|
|
10891
10902
|
fileInputRefs: p,
|
|
10892
10903
|
...g
|
|
10893
|
-
} = s, m = t[e.name] ?? "", b = a, h = e.options || [],
|
|
10904
|
+
} = s, m = t[e.name] ?? "", b = a, h = e.options || [], v = e.inline || !1, S = e.renderType === "segment", E = g["aria-describedby"], C = S ? "mt-2 inline-flex w-full p-1 rounded-lg bg-muted/50 border border-border shadow-inner" : v ? "flex flex-wrap gap-6 mt-2" : "space-y-4 mt-2";
|
|
10894
10905
|
return /* @__PURE__ */ L(
|
|
10895
10906
|
"fieldset",
|
|
10896
10907
|
{
|
|
@@ -10907,13 +10918,13 @@ function hg({
|
|
|
10907
10918
|
onValueChange: (w) => {
|
|
10908
10919
|
const x = h.find(
|
|
10909
10920
|
(_) => String(typeof _ == "object" ? _.value : _) === w
|
|
10910
|
-
),
|
|
10911
|
-
n(e.name,
|
|
10921
|
+
), R = x ? typeof x == "object" ? x.value : x : w;
|
|
10922
|
+
n(e.name, R), r(e.name);
|
|
10912
10923
|
},
|
|
10913
10924
|
disabled: b,
|
|
10914
10925
|
className: C,
|
|
10915
10926
|
children: h.map((w) => {
|
|
10916
|
-
const x = typeof w == "object" ? w.value : w,
|
|
10927
|
+
const x = typeof w == "object" ? w.value : w, R = typeof w == "object" ? w.label : w, _ = typeof w == "object" ? w.description : null, O = `${e.name}-${String(x)}`, $ = String(m) === String(x);
|
|
10917
10928
|
return S ? /* @__PURE__ */ L(
|
|
10918
10929
|
"label",
|
|
10919
10930
|
{
|
|
@@ -10935,7 +10946,7 @@ function hg({
|
|
|
10935
10946
|
className: "sr-only"
|
|
10936
10947
|
}
|
|
10937
10948
|
),
|
|
10938
|
-
|
|
10949
|
+
R
|
|
10939
10950
|
]
|
|
10940
10951
|
},
|
|
10941
10952
|
String(x)
|
|
@@ -10960,10 +10971,10 @@ function hg({
|
|
|
10960
10971
|
{
|
|
10961
10972
|
htmlFor: O,
|
|
10962
10973
|
className: `font-medium transition-colors ${b ? "text-muted-foreground" : "text-foreground cursor-pointer group-hover:text-primary"}`,
|
|
10963
|
-
children:
|
|
10974
|
+
children: R
|
|
10964
10975
|
}
|
|
10965
10976
|
),
|
|
10966
|
-
_ && !
|
|
10977
|
+
_ && !v && /* @__PURE__ */ l(
|
|
10967
10978
|
"p",
|
|
10968
10979
|
{
|
|
10969
10980
|
className: `text-xs ${b ? "text-muted-foreground/60" : "text-muted-foreground"}`,
|
|
@@ -11032,13 +11043,13 @@ function bg({
|
|
|
11032
11043
|
const O = x.includes("T") ? x : x.replace(" ", "T"), $ = new Date(O);
|
|
11033
11044
|
return Number.isNaN($.getTime()) ? null : $;
|
|
11034
11045
|
}
|
|
11035
|
-
const
|
|
11036
|
-
return Number.isNaN(
|
|
11037
|
-
}, c = (x) => !(x instanceof Date) || Number.isNaN(x.getTime()) ? null : Mn(x, "yyyy-MM-dd"), u = (x) => i(x), [d, p] = ce(!1), g = a, m = t[e.name], b = Yr(() => u(m), [m]), [h,
|
|
11046
|
+
const R = new Date(x);
|
|
11047
|
+
return Number.isNaN(R.getTime()) ? null : R;
|
|
11048
|
+
}, c = (x) => !(x instanceof Date) || Number.isNaN(x.getTime()) ? null : Mn(x, "yyyy-MM-dd"), u = (x) => i(x), [d, p] = ce(!1), g = a, m = t[e.name], b = Yr(() => u(m), [m]), [h, v] = ce(b || /* @__PURE__ */ new Date());
|
|
11038
11049
|
s["aria-describedby"], Ie(() => {
|
|
11039
11050
|
if (d) {
|
|
11040
11051
|
const x = b || /* @__PURE__ */ new Date();
|
|
11041
|
-
|
|
11052
|
+
v((R) => R.getFullYear() === x.getFullYear() && R.getMonth() === x.getMonth() ? R : x);
|
|
11042
11053
|
}
|
|
11043
11054
|
}, [d, b]);
|
|
11044
11055
|
const S = [];
|
|
@@ -11051,12 +11062,12 @@ function bg({
|
|
|
11051
11062
|
x && S.push({ before: x });
|
|
11052
11063
|
}
|
|
11053
11064
|
const E = (x) => {
|
|
11054
|
-
n(e.name, x ? c(x) : null), x &&
|
|
11065
|
+
n(e.name, x ? c(x) : null), x && v(x), e.closeOnSelect !== !1 && p(!1), r(e.name);
|
|
11055
11066
|
}, C = () => {
|
|
11056
11067
|
const x = /* @__PURE__ */ new Date();
|
|
11057
|
-
n(e.name, c(x)),
|
|
11068
|
+
n(e.name, c(x)), v(x), e.closeOnSelect !== !1 && p(!1), r(e.name);
|
|
11058
11069
|
}, w = (x) => {
|
|
11059
|
-
x.preventDefault(), x.stopPropagation(), n(e.name, null),
|
|
11070
|
+
x.preventDefault(), x.stopPropagation(), n(e.name, null), v(/* @__PURE__ */ new Date()), r(e.name);
|
|
11060
11071
|
};
|
|
11061
11072
|
return /* @__PURE__ */ l("div", { className: "relative w-full", children: /* @__PURE__ */ L(
|
|
11062
11073
|
Qn,
|
|
@@ -11136,7 +11147,7 @@ function bg({
|
|
|
11136
11147
|
mode: "single",
|
|
11137
11148
|
selected: b,
|
|
11138
11149
|
month: h,
|
|
11139
|
-
onMonthChange:
|
|
11150
|
+
onMonthChange: v,
|
|
11140
11151
|
onSelect: E,
|
|
11141
11152
|
showOutsideDays: !0,
|
|
11142
11153
|
disabled: S,
|
|
@@ -11176,7 +11187,7 @@ function bg({
|
|
|
11176
11187
|
}
|
|
11177
11188
|
) });
|
|
11178
11189
|
}
|
|
11179
|
-
function
|
|
11190
|
+
function vg({ field: e, formValues: t, handleChange: n, handleBlur: r, error: o }) {
|
|
11180
11191
|
const [a, s] = ce(!1), [i, c] = ce("12"), [u, d] = ce("00"), [p, g] = ce("PM"), m = t[e.name] || "";
|
|
11181
11192
|
Re.useEffect(() => {
|
|
11182
11193
|
if (m) {
|
|
@@ -11189,7 +11200,7 @@ function yg({ field: e, formValues: t, handleChange: n, handleBlur: r, error: o
|
|
|
11189
11200
|
n(e.name, w), s(!1);
|
|
11190
11201
|
}, h = () => {
|
|
11191
11202
|
n(e.name, ""), c("12"), d("00"), g("PM");
|
|
11192
|
-
},
|
|
11203
|
+
}, v = () => {
|
|
11193
11204
|
const w = parseInt(i);
|
|
11194
11205
|
c((w % 12 + 1).toString().padStart(2, "0"));
|
|
11195
11206
|
}, S = () => {
|
|
@@ -11257,7 +11268,7 @@ function yg({ field: e, formValues: t, handleChange: n, handleBlur: r, error: o
|
|
|
11257
11268
|
"button",
|
|
11258
11269
|
{
|
|
11259
11270
|
type: "button",
|
|
11260
|
-
onClick:
|
|
11271
|
+
onClick: v,
|
|
11261
11272
|
className: "p-1 hover:bg-gray-100 rounded",
|
|
11262
11273
|
children: /* @__PURE__ */ l(
|
|
11263
11274
|
"svg",
|
|
@@ -11419,7 +11430,7 @@ function yg({ field: e, formValues: t, handleChange: n, handleBlur: r, error: o
|
|
|
11419
11430
|
)
|
|
11420
11431
|
] }) });
|
|
11421
11432
|
}
|
|
11422
|
-
function
|
|
11433
|
+
function yg({ message: e }) {
|
|
11423
11434
|
return /* @__PURE__ */ l("div", { className: "rounded-lg bg-red-50 border border-red-100 p-4 shadow-sm", children: /* @__PURE__ */ L("div", { className: "flex items-center gap-3", children: [
|
|
11424
11435
|
/* @__PURE__ */ l(Mc, { "aria-hidden": "true", className: "size-5 text-red-500 shrink-0" }),
|
|
11425
11436
|
/* @__PURE__ */ l("span", { className: "text-sm font-medium text-red-900", children: e })
|
|
@@ -11460,7 +11471,7 @@ function Cg({ field: e }) {
|
|
|
11460
11471
|
switch (t.toLowerCase()) {
|
|
11461
11472
|
case "error":
|
|
11462
11473
|
case "danger":
|
|
11463
|
-
return /* @__PURE__ */ l(
|
|
11474
|
+
return /* @__PURE__ */ l(yg, { message: o });
|
|
11464
11475
|
case "success":
|
|
11465
11476
|
return /* @__PURE__ */ l(xg, { message: o });
|
|
11466
11477
|
case "warning":
|
|
@@ -11501,14 +11512,14 @@ const $g = ({
|
|
|
11501
11512
|
},
|
|
11502
11513
|
debugMode: d = !1
|
|
11503
11514
|
}) => {
|
|
11504
|
-
const [p, g] = ce({ ...c }), [m, b] = ce({}), [h,
|
|
11515
|
+
const [p, g] = ce({ ...c }), [m, b] = ce({}), [h, v] = ce({}), [S, E] = ce({}), C = t, w = Zt({}), x = ["hidden", "linebreak", "header", "alert"], R = Yr(
|
|
11505
11516
|
() => ({
|
|
11506
11517
|
file: Ra,
|
|
11507
11518
|
multifile: Ra,
|
|
11508
11519
|
dateRange: Eh,
|
|
11509
11520
|
date: bg,
|
|
11510
11521
|
dayTimePicker: kh,
|
|
11511
|
-
time:
|
|
11522
|
+
time: vg,
|
|
11512
11523
|
hidden: hc,
|
|
11513
11524
|
multiselect: gc,
|
|
11514
11525
|
searchselect: gl,
|
|
@@ -11534,17 +11545,17 @@ const $g = ({
|
|
|
11534
11545
|
}
|
|
11535
11546
|
try {
|
|
11536
11547
|
const D = await e(`/${N.optionsUrl}`);
|
|
11537
|
-
let
|
|
11538
|
-
N.type === "select" ?
|
|
11548
|
+
let A = [];
|
|
11549
|
+
N.type === "select" ? A = [
|
|
11539
11550
|
{ value: "", label: `Select ${N.label.toLowerCase()}` },
|
|
11540
11551
|
...D.data
|
|
11541
|
-
] :
|
|
11542
|
-
...D.data.map((
|
|
11543
|
-
value:
|
|
11544
|
-
label:
|
|
11552
|
+
] : A = [
|
|
11553
|
+
...D.data.map((P) => ({
|
|
11554
|
+
value: P.value,
|
|
11555
|
+
label: P.label
|
|
11545
11556
|
}))
|
|
11546
|
-
], o.fields.forEach((
|
|
11547
|
-
|
|
11557
|
+
], o.fields.forEach((P) => {
|
|
11558
|
+
P && P.name === N.name && (P.options = A);
|
|
11548
11559
|
});
|
|
11549
11560
|
} catch (D) {
|
|
11550
11561
|
d && console.error(`Failed to load options for ${N.name}:`, D);
|
|
@@ -11560,21 +11571,21 @@ const $g = ({
|
|
|
11560
11571
|
const k = {};
|
|
11561
11572
|
o.fields.forEach((D) => {
|
|
11562
11573
|
if (!D || !D.name) return;
|
|
11563
|
-
const
|
|
11564
|
-
let
|
|
11565
|
-
["date", "datetime", "datepicker"].includes(D.type?.toLowerCase()) &&
|
|
11574
|
+
const A = D.type === "multiselect" || D.type === "searchselect" || D.type === "checkbox" && D.options && D.options.length > 0;
|
|
11575
|
+
let P = c[D.name] ?? D.value ?? (A ? [] : "");
|
|
11576
|
+
["date", "datetime", "datepicker"].includes(D.type?.toLowerCase()) && P && (P = Eg(P) || P), k[D.name] = P;
|
|
11566
11577
|
}), g(k);
|
|
11567
11578
|
}
|
|
11568
11579
|
}, [o]);
|
|
11569
11580
|
const O = (N, k, D) => {
|
|
11570
|
-
const
|
|
11571
|
-
if (N.required &&
|
|
11581
|
+
const A = typeof k == "object" && k !== null && !Array.isArray(k) && !(k instanceof Date), P = k == null || typeof k == "string" && k.trim() === "" || Array.isArray(k) && k.length === 0 || N.type === "checkbox" && k === !1 || A && Object.keys(k).length === 0;
|
|
11582
|
+
if (N.required && P)
|
|
11572
11583
|
return d && console.warn(`VALIDATION FAILED (REQUIRED): ${N.name} is empty.`), `${N.label} is required`;
|
|
11573
|
-
if (
|
|
11584
|
+
if (P && !N.required)
|
|
11574
11585
|
return null;
|
|
11575
11586
|
if (N.validate) {
|
|
11576
|
-
const
|
|
11577
|
-
if (
|
|
11587
|
+
const T = N.validate(k, D);
|
|
11588
|
+
if (T) return T;
|
|
11578
11589
|
}
|
|
11579
11590
|
if (N.type === "email" && k && !/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(k))
|
|
11580
11591
|
return "Please enter a valid email address";
|
|
@@ -11586,74 +11597,74 @@ const $g = ({
|
|
|
11586
11597
|
}
|
|
11587
11598
|
return N.type === "date" && k && !Nt(k).isValid() ? `${N.label} must be a valid date` : N.maxLength && k && k.length > N.maxLength ? `${N.label} must not exceed ${N.maxLength} characters` : null;
|
|
11588
11599
|
}, $ = (N, k) => {
|
|
11589
|
-
const D = o.fields.find((
|
|
11600
|
+
const D = o.fields.find((P) => P && P.name === N);
|
|
11590
11601
|
if (!D) return;
|
|
11591
|
-
const
|
|
11592
|
-
D.type === "multiselect" || D.type === "searchselect" ? Array.isArray(k) ?
|
|
11593
|
-
(
|
|
11594
|
-
) :
|
|
11602
|
+
const A = { ...p };
|
|
11603
|
+
D.type === "multiselect" || D.type === "searchselect" ? Array.isArray(k) ? A[N] = k : k && k.target && k.target.selectedOptions ? A[N] = Array.from(k.target.selectedOptions).map(
|
|
11604
|
+
(P) => P.value
|
|
11605
|
+
) : A[N] = k : D.type === "dateRange" ? A[N] = [
|
|
11595
11606
|
{
|
|
11596
11607
|
startDate: k.from,
|
|
11597
11608
|
endDate: k.to || k.from,
|
|
11598
11609
|
key: "selection"
|
|
11599
11610
|
}
|
|
11600
|
-
] : D.type === "dayTimePicker" ?
|
|
11601
|
-
if (
|
|
11602
|
-
const
|
|
11603
|
-
|
|
11611
|
+
] : D.type === "dayTimePicker" ? A[N] = k ? Nt(k).format("YYYY-MM-DD HH:mm:ss") : "" : D.type === "number" ? A[N] = k === "" ? "" : Number(k) : A[N] = k, D.type === "select" && o.fields.forEach((P) => {
|
|
11612
|
+
if (P && P.showIf && !P.showIf(A)) {
|
|
11613
|
+
const T = P.type === "multiselect" || P.type === "searchselect" || P.type === "checkbox" && P.options && P.options.length > 0;
|
|
11614
|
+
A[P.name] = T ? [] : "";
|
|
11604
11615
|
}
|
|
11605
|
-
}), o.fields.forEach((
|
|
11606
|
-
if (
|
|
11607
|
-
const
|
|
11608
|
-
|
|
11616
|
+
}), o.fields.forEach((P) => {
|
|
11617
|
+
if (P && typeof P.disabled == "function" && P.disabled(A)) {
|
|
11618
|
+
const T = P.type === "multiselect" || P.type === "searchselect" || P.type === "checkbox" && P.options && P.options.length > 0;
|
|
11619
|
+
A[P.name] = T ? [] : "";
|
|
11609
11620
|
}
|
|
11610
|
-
}), g(
|
|
11621
|
+
}), g(A);
|
|
11611
11622
|
}, z = (N) => {
|
|
11612
|
-
|
|
11623
|
+
v({ ...h, [N]: !0 });
|
|
11613
11624
|
}, B = (N) => {
|
|
11614
11625
|
N.preventDefault();
|
|
11615
11626
|
const k = {};
|
|
11616
|
-
o.fields.forEach((
|
|
11617
|
-
|
|
11618
|
-
}),
|
|
11627
|
+
o.fields.forEach((A) => {
|
|
11628
|
+
A && A.name && (k[A.name] = !0);
|
|
11629
|
+
}), v(k);
|
|
11619
11630
|
const D = {};
|
|
11620
|
-
if (o.fields.forEach((
|
|
11621
|
-
if (!(!
|
|
11622
|
-
const
|
|
11623
|
-
|
|
11631
|
+
if (o.fields.forEach((A) => {
|
|
11632
|
+
if (!(!A || !A.name) && (!A.showIf || A.showIf(p))) {
|
|
11633
|
+
const P = O(A, p[A.name], p);
|
|
11634
|
+
P && (D[A.name] = P);
|
|
11624
11635
|
}
|
|
11625
11636
|
}), b(D), Object.keys(D).length === 0) {
|
|
11626
|
-
const
|
|
11627
|
-
if (
|
|
11637
|
+
const A = (T, q) => {
|
|
11638
|
+
if (T === "" || T === null || T === void 0) return null;
|
|
11628
11639
|
const te = q?.toLowerCase();
|
|
11629
|
-
if (Array.isArray(
|
|
11630
|
-
return te === "number" || te === "integer" ?
|
|
11640
|
+
if (Array.isArray(T))
|
|
11641
|
+
return te === "number" || te === "integer" ? T.map((K) => K === "" ? null : Number(K)) : T;
|
|
11631
11642
|
switch (te) {
|
|
11632
11643
|
case "number":
|
|
11633
11644
|
case "integer":
|
|
11634
11645
|
case "float":
|
|
11635
|
-
return Number(
|
|
11646
|
+
return Number(T);
|
|
11636
11647
|
case "boolean":
|
|
11637
11648
|
case "bool":
|
|
11638
|
-
return String(
|
|
11649
|
+
return String(T).toLowerCase() === "true" || T === !0;
|
|
11639
11650
|
case "date":
|
|
11640
11651
|
case "datepicker":
|
|
11641
|
-
return Nt(
|
|
11652
|
+
return Nt(T).isValid() ? Nt(T).format("YYYY-MM-DD") : T;
|
|
11642
11653
|
case "datetime":
|
|
11643
|
-
return Nt(
|
|
11654
|
+
return Nt(T).isValid() ? Nt(T).format("YYYY-MM-DDTHH:mm:ss") : T;
|
|
11644
11655
|
default:
|
|
11645
|
-
return
|
|
11656
|
+
return T;
|
|
11646
11657
|
}
|
|
11647
|
-
},
|
|
11648
|
-
o.fields.forEach((
|
|
11649
|
-
if (
|
|
11650
|
-
const q = p[
|
|
11651
|
-
a ?
|
|
11658
|
+
}, P = {};
|
|
11659
|
+
o.fields.forEach((T) => {
|
|
11660
|
+
if (T && T.name) {
|
|
11661
|
+
const q = p[T.name], te = T.type || "string", K = A(q, te);
|
|
11662
|
+
a ? P[T.name] = {
|
|
11652
11663
|
value: K,
|
|
11653
11664
|
fieldType: te
|
|
11654
|
-
} :
|
|
11665
|
+
} : P[T.name] = K;
|
|
11655
11666
|
}
|
|
11656
|
-
}), d ? console.log("Form submitted with values:",
|
|
11667
|
+
}), d ? console.log("Form submitted with values:", P) : s(P);
|
|
11657
11668
|
} else
|
|
11658
11669
|
kn.error("Please correct the errors in the form");
|
|
11659
11670
|
};
|
|
@@ -11672,14 +11683,14 @@ const $g = ({
|
|
|
11672
11683
|
orange: "border-orange-500 bg-orange-50"
|
|
11673
11684
|
};
|
|
11674
11685
|
function M(N, k, D) {
|
|
11675
|
-
const
|
|
11686
|
+
const A = `${k.name}-error`;
|
|
11676
11687
|
if (d && (D ? console.log(
|
|
11677
11688
|
`[fieldFormat RENDER] Rendering error for ${k.name}: ${D}`
|
|
11678
11689
|
) : m[k.name] && console.log(
|
|
11679
11690
|
`[fieldFormat RENDER] Error exists in state for ${k.name} but not passed in props!`
|
|
11680
11691
|
)), x.includes(k.type))
|
|
11681
11692
|
return /* @__PURE__ */ l("div", { className: k.class || "col-span-full", children: N });
|
|
11682
|
-
const
|
|
11693
|
+
const P = k.containerStyle, T = k.color || "blue", q = P === "card" ? `rounded-lg border text-card-foreground shadow-sm p-4 ${k.containerClassName || G[T] || G.blue}` : "", te = /* @__PURE__ */ L(It, { children: [
|
|
11683
11694
|
k.label && /* @__PURE__ */ L(
|
|
11684
11695
|
"label",
|
|
11685
11696
|
{
|
|
@@ -11693,23 +11704,23 @@ const $g = ({
|
|
|
11693
11704
|
}
|
|
11694
11705
|
),
|
|
11695
11706
|
/* @__PURE__ */ l("div", { children: Re.cloneElement(N, {
|
|
11696
|
-
"aria-describedby": D ?
|
|
11707
|
+
"aria-describedby": D ? A : void 0,
|
|
11697
11708
|
"aria-invalid": !!D,
|
|
11698
11709
|
"aria-required": k.required
|
|
11699
11710
|
}) }),
|
|
11700
11711
|
k.description && /* @__PURE__ */ l("p", { className: "text-xs mt-1.5 text-gray-400", children: k.description }),
|
|
11701
|
-
D && /* @__PURE__ */ l("p", { id:
|
|
11712
|
+
D && /* @__PURE__ */ l("p", { id: A, className: "text-sm text-red-500 mt-1", role: "alert", children: D })
|
|
11702
11713
|
] });
|
|
11703
|
-
return /* @__PURE__ */ l("div", { className: "mb-4", children:
|
|
11714
|
+
return /* @__PURE__ */ l("div", { className: "mb-4", children: P === "card" ? /* @__PURE__ */ l("div", { className: q, children: te }) : te });
|
|
11704
11715
|
}
|
|
11705
11716
|
const F = (N) => {
|
|
11706
11717
|
if (N.showIf && !N.showIf(p)) return null;
|
|
11707
|
-
const k =
|
|
11718
|
+
const k = R[N.type] || ia;
|
|
11708
11719
|
if (p[N.name] === void 0) {
|
|
11709
|
-
const
|
|
11710
|
-
p[N.name] = N.value !== void 0 ? N.value :
|
|
11720
|
+
const P = N.type === "multiselect" || N.type === "searchselect" || N.type === "checkbox" && N.options && N.options.length > 0;
|
|
11721
|
+
p[N.name] = N.value !== void 0 ? N.value : P ? [] : "";
|
|
11711
11722
|
}
|
|
11712
|
-
const D = m[N.name] ? m[N.name] : null,
|
|
11723
|
+
const D = m[N.name] ? m[N.name] : null, A = C || (typeof N.disabled == "function" ? N.disabled(p) : !!N.disabled);
|
|
11713
11724
|
return M(
|
|
11714
11725
|
/* @__PURE__ */ l(
|
|
11715
11726
|
k,
|
|
@@ -11723,7 +11734,7 @@ const $g = ({
|
|
|
11723
11734
|
api_URL: n,
|
|
11724
11735
|
error: D,
|
|
11725
11736
|
fileInputRefs: w,
|
|
11726
|
-
disabled:
|
|
11737
|
+
disabled: A,
|
|
11727
11738
|
apiClient: e
|
|
11728
11739
|
}
|
|
11729
11740
|
),
|