ynotsoft-dynamic-form 1.0.90 → 1.0.93
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 +970 -965
- package/dist/dynamic-form.umd.cjs +27 -27
- package/package.json +1 -1
package/dist/dynamic-form.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsx as u, jsxs as
|
|
1
|
+
import { jsx as u, jsxs as D, Fragment as Rt } from "react/jsx-runtime";
|
|
2
2
|
import * as f from "react";
|
|
3
3
|
import Te, { forwardRef as Na, createElement as Tr, useState as le, useRef as Yt, useCallback as sr, useEffect as qe, useLayoutEffect as rc, useMemo as Ta } from "react";
|
|
4
4
|
import { toast as Cn } from "react-hot-toast";
|
|
@@ -26,7 +26,7 @@ function mc({
|
|
|
26
26
|
}) {
|
|
27
27
|
const s = e.disabled && typeof e.disabled == "function" ? e.disabled(t) : e.disabled, i = a || s, c = e.options || [], l = ac(), d = t[e.name] || e.value || [], m = (p) => Array.isArray(p) && p.length > 0 && typeof p[0] == "object" && p[0] !== null && "value" in p[0];
|
|
28
28
|
let g;
|
|
29
|
-
return m(d) ? g = d : g = d.filter((p) => p != null).map((p) => c.find((
|
|
29
|
+
return m(d) ? g = d : g = d.filter((p) => p != null).map((p) => c.find((v) => v.value === p)).filter((p) => p !== void 0), /* @__PURE__ */ u(
|
|
30
30
|
"div",
|
|
31
31
|
{
|
|
32
32
|
className: `mb-4 ${e.fieldClass ? e.fieldClass : "col-span-full"}`,
|
|
@@ -39,8 +39,8 @@ function mc({
|
|
|
39
39
|
name: e.label,
|
|
40
40
|
value: g,
|
|
41
41
|
onChange: (p) => {
|
|
42
|
-
const
|
|
43
|
-
n(e.name,
|
|
42
|
+
const v = p.map((h) => h.value);
|
|
43
|
+
n(e.name, v);
|
|
44
44
|
},
|
|
45
45
|
options: c,
|
|
46
46
|
placeholder: e.placeholder,
|
|
@@ -170,11 +170,11 @@ const Mc = [
|
|
|
170
170
|
["path", { d: "M12 13v8", key: "1l5pq0" }],
|
|
171
171
|
["path", { d: "M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242", key: "1pljnt" }],
|
|
172
172
|
["path", { d: "m8 17 4-4 4 4", key: "1quai1" }]
|
|
173
|
-
],
|
|
174
|
-
const
|
|
173
|
+
], Dc = ae("cloud-upload", Mc);
|
|
174
|
+
const Ic = [
|
|
175
175
|
["path", { d: "m16 18 6-6-6-6", key: "eg8j8" }],
|
|
176
176
|
["path", { d: "m8 6-6 6 6 6", key: "ppft3o" }]
|
|
177
|
-
], Lc = ae("code",
|
|
177
|
+
], Lc = ae("code", Ic);
|
|
178
178
|
const Fc = [
|
|
179
179
|
["path", { d: "M4 12h8", key: "17cfdx" }],
|
|
180
180
|
["path", { d: "M4 18V6", key: "1rz3zl" }],
|
|
@@ -267,31 +267,31 @@ function dl({
|
|
|
267
267
|
apiClient: s,
|
|
268
268
|
...i
|
|
269
269
|
}) {
|
|
270
|
-
const c = a, l = e.selectMode !== "multiple", [d, m] = le([]), [g, p] = le(!1), [
|
|
271
|
-
const
|
|
272
|
-
return
|
|
273
|
-
}) : [], [
|
|
274
|
-
async (
|
|
270
|
+
const c = a, l = e.selectMode !== "multiple", [d, m] = le([]), [g, p] = le(!1), [v, h] = le(!1), [y, k] = le(""), [C, E] = le(-1), [x, A] = le({}), I = Yt(null), _ = Yt(null), P = Yt(null), F = t[e.name], H = sr(() => F ? (Array.isArray(F) ? F : [F]).map((S) => {
|
|
271
|
+
const z = d.find((Y) => Y.value === S);
|
|
272
|
+
return z || (x[S] ? x[S] : { value: S, label: S });
|
|
273
|
+
}) : [], [F, d, x])(), G = sr(
|
|
274
|
+
async (N = "") => {
|
|
275
275
|
if (e.onSearch) {
|
|
276
|
-
const S = await e.onSearch(
|
|
276
|
+
const S = await e.onSearch(N, t);
|
|
277
277
|
m(S);
|
|
278
278
|
return;
|
|
279
279
|
}
|
|
280
280
|
if (!e.optionsUrl || !s) {
|
|
281
|
-
const S = (e.options || []).map((
|
|
282
|
-
value:
|
|
283
|
-
label:
|
|
281
|
+
const S = (e.options || []).map((z) => ({
|
|
282
|
+
value: z[e.valueId || "value"] || z.value || z.id,
|
|
283
|
+
label: z[e.labelId || "label"] || z.label || z.name
|
|
284
284
|
}));
|
|
285
285
|
m(
|
|
286
|
-
|
|
287
|
-
(
|
|
286
|
+
N ? S.filter(
|
|
287
|
+
(z) => String(z.label).toLowerCase().includes(N.toLowerCase())
|
|
288
288
|
) : S
|
|
289
289
|
);
|
|
290
290
|
return;
|
|
291
291
|
}
|
|
292
292
|
p(!0);
|
|
293
293
|
try {
|
|
294
|
-
const S = e.searchParam || "search",
|
|
294
|
+
const S = e.searchParam || "search", z = e.optionsUrl.includes("?") ? "&" : "?", Y = `${e.optionsUrl}${z}${S}=${encodeURIComponent(N)}`, j = await s(Y), ve = j.data || j, q = Array.isArray(ve) ? ve : [];
|
|
295
295
|
m(
|
|
296
296
|
q.map((ee) => ({
|
|
297
297
|
value: ee[e.valueId || "value"] || ee.value || ee.id,
|
|
@@ -305,40 +305,40 @@ function dl({
|
|
|
305
305
|
}
|
|
306
306
|
},
|
|
307
307
|
[e, s, t]
|
|
308
|
-
),
|
|
309
|
-
(
|
|
310
|
-
if (!
|
|
311
|
-
|
|
308
|
+
), w = sr(
|
|
309
|
+
(N) => {
|
|
310
|
+
if (!N) return;
|
|
311
|
+
A((z) => ({ ...z, [N.value]: N }));
|
|
312
312
|
let S;
|
|
313
313
|
if (l)
|
|
314
|
-
S =
|
|
314
|
+
S = N.value, h(!1);
|
|
315
315
|
else {
|
|
316
|
-
const
|
|
317
|
-
S =
|
|
316
|
+
const z = Array.isArray(F) ? F : [];
|
|
317
|
+
S = z.includes(N.value) ? z.filter((Y) => Y !== N.value) : [...z, N.value];
|
|
318
318
|
}
|
|
319
319
|
n(e.name, S), r(e.name), e.clearSearchOnSelect && k("");
|
|
320
320
|
},
|
|
321
321
|
[
|
|
322
|
-
|
|
322
|
+
F,
|
|
323
323
|
e.clearSearchOnSelect,
|
|
324
324
|
e.name,
|
|
325
325
|
n,
|
|
326
326
|
r,
|
|
327
327
|
l
|
|
328
328
|
]
|
|
329
|
-
),
|
|
329
|
+
), T = (N) => {
|
|
330
330
|
if (!c)
|
|
331
|
-
switch (
|
|
331
|
+
switch (N.key) {
|
|
332
332
|
case "ArrowDown":
|
|
333
|
-
|
|
333
|
+
N.preventDefault(), v ? E(
|
|
334
334
|
(S) => S < d.length - 1 ? S + 1 : S
|
|
335
335
|
) : h(!0);
|
|
336
336
|
break;
|
|
337
337
|
case "ArrowUp":
|
|
338
|
-
|
|
338
|
+
N.preventDefault(), v && E((S) => S > 0 ? S - 1 : 0);
|
|
339
339
|
break;
|
|
340
340
|
case "Enter":
|
|
341
|
-
|
|
341
|
+
N.preventDefault(), v && C >= 0 && d[C] ? w(d[C]) : v || h(!0);
|
|
342
342
|
break;
|
|
343
343
|
case "Escape":
|
|
344
344
|
h(!1);
|
|
@@ -347,86 +347,86 @@ function dl({
|
|
|
347
347
|
h(!1), r(e.name);
|
|
348
348
|
break;
|
|
349
349
|
}
|
|
350
|
-
}, R = (
|
|
351
|
-
const S =
|
|
350
|
+
}, R = (N) => {
|
|
351
|
+
const S = N.target.value;
|
|
352
352
|
k(S), E(-1), P.current && clearTimeout(P.current), P.current = setTimeout(() => G(S), 300);
|
|
353
353
|
};
|
|
354
354
|
qe(() => {
|
|
355
|
-
if (
|
|
356
|
-
G(
|
|
357
|
-
const
|
|
358
|
-
return () => clearTimeout(
|
|
355
|
+
if (v) {
|
|
356
|
+
G(y);
|
|
357
|
+
const N = setTimeout(() => _.current?.focus(), 50);
|
|
358
|
+
return () => clearTimeout(N);
|
|
359
359
|
} else
|
|
360
360
|
E(-1);
|
|
361
|
-
}, [
|
|
362
|
-
const
|
|
363
|
-
|
|
361
|
+
}, [v, G, y]), qe(() => {
|
|
362
|
+
const N = (S) => {
|
|
363
|
+
I.current && !I.current.contains(S.target) && (h(!1), r(e.name));
|
|
364
364
|
};
|
|
365
|
-
return document.addEventListener("mousedown",
|
|
365
|
+
return document.addEventListener("mousedown", N), () => document.removeEventListener("mousedown", N);
|
|
366
366
|
}, [e.name, r]);
|
|
367
|
-
const O = (
|
|
368
|
-
|
|
369
|
-
const
|
|
367
|
+
const O = (N, S) => {
|
|
368
|
+
N.stopPropagation();
|
|
369
|
+
const z = Array.isArray(F) ? F : [], Y = l ? null : z.filter((j) => j !== S);
|
|
370
370
|
n(e.name, Y), r(e.name);
|
|
371
371
|
};
|
|
372
|
-
return /* @__PURE__ */
|
|
372
|
+
return /* @__PURE__ */ D(
|
|
373
373
|
"div",
|
|
374
374
|
{
|
|
375
375
|
className: `mb-4 relative ${e.fieldClass || "col-span-full"}`,
|
|
376
|
-
ref:
|
|
376
|
+
ref: I,
|
|
377
377
|
children: [
|
|
378
|
-
/* @__PURE__ */
|
|
378
|
+
/* @__PURE__ */ D(
|
|
379
379
|
"div",
|
|
380
380
|
{
|
|
381
381
|
role: "combobox",
|
|
382
|
-
"aria-expanded":
|
|
382
|
+
"aria-expanded": v,
|
|
383
383
|
"aria-haspopup": "listbox",
|
|
384
384
|
"aria-controls": `${e.name}-listbox`,
|
|
385
385
|
tabIndex: c ? -1 : 0,
|
|
386
|
-
onClick: () => !c && h(!
|
|
387
|
-
onKeyDown:
|
|
386
|
+
onClick: () => !c && h(!v),
|
|
387
|
+
onKeyDown: T,
|
|
388
388
|
className: `
|
|
389
389
|
w-full min-h-10 px-2 py-1 border rounded-lg bg-background cursor-pointer
|
|
390
390
|
flex items-center flex-wrap gap-2 transition-all outline-none
|
|
391
391
|
${o ? "border-destructive ring-1 ring-destructive" : "border-input hover:border-accent-foreground/20"}
|
|
392
|
-
${
|
|
392
|
+
${v ? "ring-2 ring-ring border-primary" : "focus-visible:ring-2 focus-visible:ring-ring"}
|
|
393
393
|
${c ? "bg-muted opacity-60 cursor-not-allowed" : ""}
|
|
394
394
|
`,
|
|
395
395
|
children: [
|
|
396
|
-
H.length > 0 ? H.map((
|
|
396
|
+
H.length > 0 ? H.map((N) => /* @__PURE__ */ D(
|
|
397
397
|
"span",
|
|
398
398
|
{
|
|
399
399
|
className: "inline-flex items-center px-2 py-0.5 bg-primary/10 text-primary text-xs rounded-sm border border-primary/20",
|
|
400
400
|
children: [
|
|
401
|
-
|
|
401
|
+
N.label,
|
|
402
402
|
!c && /* @__PURE__ */ u(
|
|
403
403
|
"button",
|
|
404
404
|
{
|
|
405
405
|
type: "button",
|
|
406
|
-
"aria-label": `Remove ${
|
|
407
|
-
onClick: (S) => O(S,
|
|
406
|
+
"aria-label": `Remove ${N.label}`,
|
|
407
|
+
onClick: (S) => O(S, N.value),
|
|
408
408
|
className: "ml-1 p-0.5 hover:bg-primary/20 rounded-full transition-colors",
|
|
409
409
|
children: /* @__PURE__ */ u(Gr, { className: "w-3 h-3" })
|
|
410
410
|
}
|
|
411
411
|
)
|
|
412
412
|
]
|
|
413
413
|
},
|
|
414
|
-
|
|
414
|
+
N.value
|
|
415
415
|
)) : /* @__PURE__ */ u("span", { className: "text-muted-foreground text-sm leading-tight", children: e.placeholder || "Select..." }),
|
|
416
|
-
/* @__PURE__ */
|
|
416
|
+
/* @__PURE__ */ D("div", { className: "ml-auto flex items-center gap-2", children: [
|
|
417
417
|
g && /* @__PURE__ */ u(Oa, { className: "w-4 h-4 animate-spin text-muted-foreground" }),
|
|
418
418
|
/* @__PURE__ */ u(
|
|
419
419
|
Mn,
|
|
420
420
|
{
|
|
421
|
-
className: `w-4 h-4 text-muted-foreground transition-transform ${
|
|
421
|
+
className: `w-4 h-4 text-muted-foreground transition-transform ${v ? "rotate-180" : ""}`
|
|
422
422
|
}
|
|
423
423
|
)
|
|
424
424
|
] })
|
|
425
425
|
]
|
|
426
426
|
}
|
|
427
427
|
),
|
|
428
|
-
|
|
429
|
-
/* @__PURE__ */ u("div", { className: "p-2 border-b border-border bg-muted/30", children: /* @__PURE__ */
|
|
428
|
+
v && !c && /* @__PURE__ */ D("div", { className: "absolute z-50 w-full mt-1 bg-popover border border-border rounded-lg shadow-xl overflow-hidden", children: [
|
|
429
|
+
/* @__PURE__ */ u("div", { className: "p-2 border-b border-border bg-muted/30", children: /* @__PURE__ */ D("div", { className: "relative flex items-center", children: [
|
|
430
430
|
/* @__PURE__ */ u(rl, { className: "absolute left-3 w-4 h-4 text-muted-foreground" }),
|
|
431
431
|
/* @__PURE__ */ u(
|
|
432
432
|
"input",
|
|
@@ -436,9 +436,9 @@ function dl({
|
|
|
436
436
|
"aria-autocomplete": "list",
|
|
437
437
|
"aria-controls": `${e.name}-listbox`,
|
|
438
438
|
"aria-activedescendant": C >= 0 ? `${e.name}-opt-${C}` : void 0,
|
|
439
|
-
value:
|
|
439
|
+
value: y,
|
|
440
440
|
onChange: R,
|
|
441
|
-
onKeyDown:
|
|
441
|
+
onKeyDown: T,
|
|
442
442
|
className: "w-full h-9 pl-9 pr-3 text-sm bg-transparent border border-input rounded-md focus:outline-none focus:ring-1 focus:ring-ring",
|
|
443
443
|
placeholder: "Type to search..."
|
|
444
444
|
}
|
|
@@ -451,32 +451,32 @@ function dl({
|
|
|
451
451
|
role: "listbox",
|
|
452
452
|
"aria-label": e.label,
|
|
453
453
|
className: "max-h-60 overflow-y-auto p-1",
|
|
454
|
-
children: d.length > 0 ? d.map((
|
|
455
|
-
const
|
|
456
|
-
(j) => j.value ===
|
|
454
|
+
children: d.length > 0 ? d.map((N, S) => {
|
|
455
|
+
const z = H.some(
|
|
456
|
+
(j) => j.value === N.value
|
|
457
457
|
), Y = S === C;
|
|
458
|
-
return /* @__PURE__ */
|
|
458
|
+
return /* @__PURE__ */ D(
|
|
459
459
|
"div",
|
|
460
460
|
{
|
|
461
461
|
id: `${e.name}-opt-${S}`,
|
|
462
462
|
role: "option",
|
|
463
463
|
tabIndex: -1,
|
|
464
|
-
"aria-selected":
|
|
465
|
-
onClick: () =>
|
|
466
|
-
onKeyDown: (j) => j.key === "Enter" &&
|
|
464
|
+
"aria-selected": z,
|
|
465
|
+
onClick: () => w(N),
|
|
466
|
+
onKeyDown: (j) => j.key === "Enter" && w(N),
|
|
467
467
|
onMouseEnter: () => E(S),
|
|
468
468
|
className: `
|
|
469
469
|
px-3 py-2 text-sm rounded-md cursor-pointer flex items-center justify-between transition-colors outline-none
|
|
470
470
|
${Y ? "bg-accent text-accent-foreground" : ""}
|
|
471
|
-
${
|
|
472
|
-
${!Y && !
|
|
471
|
+
${z ? "text-primary font-medium" : "text-foreground"}
|
|
472
|
+
${!Y && !z ? "hover:bg-muted" : ""}
|
|
473
473
|
`,
|
|
474
474
|
children: [
|
|
475
|
-
/* @__PURE__ */ u("span", { children:
|
|
476
|
-
|
|
475
|
+
/* @__PURE__ */ u("span", { children: N.label }),
|
|
476
|
+
z && /* @__PURE__ */ u(Cc, { className: "w-4 h-4 text-primary" })
|
|
477
477
|
]
|
|
478
478
|
},
|
|
479
|
-
|
|
479
|
+
N.value
|
|
480
480
|
);
|
|
481
481
|
}) : /* @__PURE__ */ u("output", { className: "block py-8 text-center text-sm text-muted-foreground", children: g ? "Searching..." : "No results found" })
|
|
482
482
|
}
|
|
@@ -501,13 +501,13 @@ function ht(e, t = []) {
|
|
|
501
501
|
const i = f.createContext(s), c = n.length;
|
|
502
502
|
n = [...n, s];
|
|
503
503
|
const l = (m) => {
|
|
504
|
-
const { scope: g, children: p, ...
|
|
505
|
-
return /* @__PURE__ */ u(h.Provider, { value:
|
|
504
|
+
const { scope: g, children: p, ...v } = m, h = g?.[e]?.[c] || i, y = f.useMemo(() => v, Object.values(v));
|
|
505
|
+
return /* @__PURE__ */ u(h.Provider, { value: y, children: p });
|
|
506
506
|
};
|
|
507
507
|
l.displayName = a + "Provider";
|
|
508
508
|
function d(m, g) {
|
|
509
|
-
const p = g?.[e]?.[c] || i,
|
|
510
|
-
if (
|
|
509
|
+
const p = g?.[e]?.[c] || i, v = f.useContext(p);
|
|
510
|
+
if (v) return v;
|
|
511
511
|
if (s !== void 0) return s;
|
|
512
512
|
throw new Error(`\`${m}\` must be used within \`${a}\``);
|
|
513
513
|
}
|
|
@@ -615,38 +615,38 @@ function _a(e) {
|
|
|
615
615
|
t,
|
|
616
616
|
{ collectionRef: { current: null }, itemMap: /* @__PURE__ */ new Map() }
|
|
617
617
|
), s = (h) => {
|
|
618
|
-
const { scope:
|
|
619
|
-
return /* @__PURE__ */ u(o, { scope:
|
|
618
|
+
const { scope: y, children: k } = h, C = Te.useRef(null), E = Te.useRef(/* @__PURE__ */ new Map()).current;
|
|
619
|
+
return /* @__PURE__ */ u(o, { scope: y, itemMap: E, collectionRef: C, children: k });
|
|
620
620
|
};
|
|
621
621
|
s.displayName = t;
|
|
622
622
|
const i = e + "CollectionSlot", c = /* @__PURE__ */ Ce(i), l = Te.forwardRef(
|
|
623
|
-
(h,
|
|
624
|
-
const { scope: k, children: C } = h, E = a(i, k),
|
|
625
|
-
return /* @__PURE__ */ u(c, { ref:
|
|
623
|
+
(h, y) => {
|
|
624
|
+
const { scope: k, children: C } = h, E = a(i, k), x = ie(y, E.collectionRef);
|
|
625
|
+
return /* @__PURE__ */ u(c, { ref: x, children: C });
|
|
626
626
|
}
|
|
627
627
|
);
|
|
628
628
|
l.displayName = i;
|
|
629
629
|
const d = e + "CollectionItemSlot", m = "data-radix-collection-item", g = /* @__PURE__ */ Ce(d), p = Te.forwardRef(
|
|
630
|
-
(h,
|
|
631
|
-
const { scope: k, children: C, ...E } = h,
|
|
632
|
-
return Te.useEffect(() => (
|
|
630
|
+
(h, y) => {
|
|
631
|
+
const { scope: k, children: C, ...E } = h, x = Te.useRef(null), A = ie(y, x), I = a(d, k);
|
|
632
|
+
return Te.useEffect(() => (I.itemMap.set(x, { ref: x, ...E }), () => void I.itemMap.delete(x))), /* @__PURE__ */ u(g, { [m]: "", ref: A, children: C });
|
|
633
633
|
}
|
|
634
634
|
);
|
|
635
635
|
p.displayName = d;
|
|
636
|
-
function
|
|
637
|
-
const
|
|
636
|
+
function v(h) {
|
|
637
|
+
const y = a(e + "CollectionConsumer", h);
|
|
638
638
|
return Te.useCallback(() => {
|
|
639
|
-
const C =
|
|
639
|
+
const C = y.collectionRef.current;
|
|
640
640
|
if (!C) return [];
|
|
641
641
|
const E = Array.from(C.querySelectorAll(`[${m}]`));
|
|
642
|
-
return Array.from(
|
|
643
|
-
(
|
|
642
|
+
return Array.from(y.itemMap.values()).sort(
|
|
643
|
+
(I, _) => E.indexOf(I.ref.current) - E.indexOf(_.ref.current)
|
|
644
644
|
);
|
|
645
|
-
}, [
|
|
645
|
+
}, [y.collectionRef, y.itemMap]);
|
|
646
646
|
}
|
|
647
647
|
return [
|
|
648
648
|
{ Provider: s, Slot: l, ItemSlot: p },
|
|
649
|
-
|
|
649
|
+
v,
|
|
650
650
|
r
|
|
651
651
|
];
|
|
652
652
|
}
|
|
@@ -698,7 +698,7 @@ function xl(e, t = globalThis?.document) {
|
|
|
698
698
|
return t.addEventListener("keydown", r, { capture: !0 }), () => t.removeEventListener("keydown", r, { capture: !0 });
|
|
699
699
|
}, [n, t]);
|
|
700
700
|
}
|
|
701
|
-
var Sl = "DismissableLayer", Pr = "dismissableLayer.update", Cl = "dismissableLayer.pointerDownOutside", El = "dismissableLayer.focusOutside", Mo,
|
|
701
|
+
var Sl = "DismissableLayer", Pr = "dismissableLayer.update", Cl = "dismissableLayer.pointerDownOutside", El = "dismissableLayer.focusOutside", Mo, Da = f.createContext({
|
|
702
702
|
layers: /* @__PURE__ */ new Set(),
|
|
703
703
|
layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
|
|
704
704
|
branches: /* @__PURE__ */ new Set()
|
|
@@ -712,10 +712,10 @@ var Sl = "DismissableLayer", Pr = "dismissableLayer.update", Cl = "dismissableLa
|
|
|
712
712
|
onInteractOutside: s,
|
|
713
713
|
onDismiss: i,
|
|
714
714
|
...c
|
|
715
|
-
} = e, l = f.useContext(
|
|
716
|
-
const P = _.target,
|
|
717
|
-
!
|
|
718
|
-
}, g),
|
|
715
|
+
} = e, l = f.useContext(Da), [d, m] = f.useState(null), g = d?.ownerDocument ?? globalThis?.document, [, p] = f.useState({}), v = ie(t, (_) => m(_)), h = Array.from(l.layers), [y] = [...l.layersWithOutsidePointerEventsDisabled].slice(-1), k = h.indexOf(y), C = d ? h.indexOf(d) : -1, E = l.layersWithOutsidePointerEventsDisabled.size > 0, x = C >= k, A = Nl((_) => {
|
|
716
|
+
const P = _.target, F = [...l.branches].some((V) => V.contains(P));
|
|
717
|
+
!x || F || (o?.(_), s?.(_), _.defaultPrevented || i?.());
|
|
718
|
+
}, g), I = Tl((_) => {
|
|
719
719
|
const P = _.target;
|
|
720
720
|
[...l.branches].some((V) => V.contains(P)) || (a?.(_), s?.(_), _.defaultPrevented || i?.());
|
|
721
721
|
}, g);
|
|
@@ -723,11 +723,11 @@ var Sl = "DismissableLayer", Pr = "dismissableLayer.update", Cl = "dismissableLa
|
|
|
723
723
|
C === l.layers.size - 1 && (r?.(_), !_.defaultPrevented && i && (_.preventDefault(), i()));
|
|
724
724
|
}, g), f.useEffect(() => {
|
|
725
725
|
if (d)
|
|
726
|
-
return n && (l.layersWithOutsidePointerEventsDisabled.size === 0 && (Mo = g.body.style.pointerEvents, g.body.style.pointerEvents = "none"), l.layersWithOutsidePointerEventsDisabled.add(d)), l.layers.add(d),
|
|
726
|
+
return n && (l.layersWithOutsidePointerEventsDisabled.size === 0 && (Mo = g.body.style.pointerEvents, g.body.style.pointerEvents = "none"), l.layersWithOutsidePointerEventsDisabled.add(d)), l.layers.add(d), Do(), () => {
|
|
727
727
|
n && l.layersWithOutsidePointerEventsDisabled.size === 1 && (g.body.style.pointerEvents = Mo);
|
|
728
728
|
};
|
|
729
729
|
}, [d, g, n, l]), f.useEffect(() => () => {
|
|
730
|
-
d && (l.layers.delete(d), l.layersWithOutsidePointerEventsDisabled.delete(d),
|
|
730
|
+
d && (l.layers.delete(d), l.layersWithOutsidePointerEventsDisabled.delete(d), Do());
|
|
731
731
|
}, [d, l]), f.useEffect(() => {
|
|
732
732
|
const _ = () => p({});
|
|
733
733
|
return document.addEventListener(Pr, _), () => document.removeEventListener(Pr, _);
|
|
@@ -735,16 +735,16 @@ var Sl = "DismissableLayer", Pr = "dismissableLayer.update", Cl = "dismissableLa
|
|
|
735
735
|
Ma.div,
|
|
736
736
|
{
|
|
737
737
|
...c,
|
|
738
|
-
ref:
|
|
738
|
+
ref: v,
|
|
739
739
|
style: {
|
|
740
|
-
pointerEvents: E ?
|
|
740
|
+
pointerEvents: E ? x ? "auto" : "none" : void 0,
|
|
741
741
|
...e.style
|
|
742
742
|
},
|
|
743
|
-
onFocusCapture: Z(e.onFocusCapture,
|
|
744
|
-
onBlurCapture: Z(e.onBlurCapture,
|
|
743
|
+
onFocusCapture: Z(e.onFocusCapture, I.onFocusCapture),
|
|
744
|
+
onBlurCapture: Z(e.onBlurCapture, I.onBlurCapture),
|
|
745
745
|
onPointerDownCapture: Z(
|
|
746
746
|
e.onPointerDownCapture,
|
|
747
|
-
|
|
747
|
+
A.onPointerDownCapture
|
|
748
748
|
)
|
|
749
749
|
}
|
|
750
750
|
);
|
|
@@ -752,7 +752,7 @@ var Sl = "DismissableLayer", Pr = "dismissableLayer.update", Cl = "dismissableLa
|
|
|
752
752
|
);
|
|
753
753
|
Kr.displayName = Sl;
|
|
754
754
|
var kl = "DismissableLayerBranch", Al = f.forwardRef((e, t) => {
|
|
755
|
-
const n = f.useContext(
|
|
755
|
+
const n = f.useContext(Da), r = f.useRef(null), o = ie(t, r);
|
|
756
756
|
return f.useEffect(() => {
|
|
757
757
|
const a = r.current;
|
|
758
758
|
if (a)
|
|
@@ -769,7 +769,7 @@ function Nl(e, t = globalThis?.document) {
|
|
|
769
769
|
const a = (i) => {
|
|
770
770
|
if (i.target && !r.current) {
|
|
771
771
|
let c = function() {
|
|
772
|
-
|
|
772
|
+
Ia(
|
|
773
773
|
Cl,
|
|
774
774
|
n,
|
|
775
775
|
l,
|
|
@@ -796,7 +796,7 @@ function Tl(e, t = globalThis?.document) {
|
|
|
796
796
|
const n = et(e), r = f.useRef(!1);
|
|
797
797
|
return f.useEffect(() => {
|
|
798
798
|
const o = (a) => {
|
|
799
|
-
a.target && !r.current &&
|
|
799
|
+
a.target && !r.current && Ia(El, n, { originalEvent: a }, {
|
|
800
800
|
discrete: !1
|
|
801
801
|
});
|
|
802
802
|
};
|
|
@@ -806,11 +806,11 @@ function Tl(e, t = globalThis?.document) {
|
|
|
806
806
|
onBlurCapture: () => r.current = !1
|
|
807
807
|
};
|
|
808
808
|
}
|
|
809
|
-
function
|
|
809
|
+
function Do() {
|
|
810
810
|
const e = new CustomEvent(Pr);
|
|
811
811
|
document.dispatchEvent(e);
|
|
812
812
|
}
|
|
813
|
-
function
|
|
813
|
+
function Ia(e, t, n, { discrete: r }) {
|
|
814
814
|
const o = n.originalEvent.target, a = new CustomEvent(e, { bubbles: !1, cancelable: !0, detail: n });
|
|
815
815
|
t && o.addEventListener(e, t, { once: !0 }), r ? wl(o, a) : o.dispatchEvent(a);
|
|
816
816
|
}
|
|
@@ -818,12 +818,12 @@ var cr = 0;
|
|
|
818
818
|
function La() {
|
|
819
819
|
f.useEffect(() => {
|
|
820
820
|
const e = document.querySelectorAll("[data-radix-focus-guard]");
|
|
821
|
-
return document.body.insertAdjacentElement("afterbegin", e[0] ??
|
|
821
|
+
return document.body.insertAdjacentElement("afterbegin", e[0] ?? Io()), document.body.insertAdjacentElement("beforeend", e[1] ?? Io()), cr++, () => {
|
|
822
822
|
cr === 1 && document.querySelectorAll("[data-radix-focus-guard]").forEach((t) => t.remove()), cr--;
|
|
823
823
|
};
|
|
824
824
|
}, []);
|
|
825
825
|
}
|
|
826
|
-
function
|
|
826
|
+
function Io() {
|
|
827
827
|
const e = document.createElement("span");
|
|
828
828
|
return e.setAttribute("data-radix-focus-guard", ""), e.tabIndex = 0, e.style.outline = "none", e.style.opacity = "0", e.style.position = "fixed", e.style.pointerEvents = "none", e;
|
|
829
829
|
}
|
|
@@ -871,21 +871,21 @@ var Pl = [
|
|
|
871
871
|
if (r) {
|
|
872
872
|
let h = function(E) {
|
|
873
873
|
if (p.paused || !i) return;
|
|
874
|
-
const
|
|
875
|
-
i.contains(
|
|
876
|
-
},
|
|
874
|
+
const x = E.target;
|
|
875
|
+
i.contains(x) ? m.current = x : Je(m.current, { select: !0 });
|
|
876
|
+
}, y = function(E) {
|
|
877
877
|
if (p.paused || !i) return;
|
|
878
|
-
const
|
|
879
|
-
|
|
878
|
+
const x = E.relatedTarget;
|
|
879
|
+
x !== null && (i.contains(x) || Je(m.current, { select: !0 }));
|
|
880
880
|
}, k = function(E) {
|
|
881
881
|
if (document.activeElement === document.body)
|
|
882
|
-
for (const
|
|
883
|
-
|
|
882
|
+
for (const A of E)
|
|
883
|
+
A.removedNodes.length > 0 && Je(i);
|
|
884
884
|
};
|
|
885
|
-
document.addEventListener("focusin", h), document.addEventListener("focusout",
|
|
885
|
+
document.addEventListener("focusin", h), document.addEventListener("focusout", y);
|
|
886
886
|
const C = new MutationObserver(k);
|
|
887
887
|
return i && C.observe(i, { childList: !0, subtree: !0 }), () => {
|
|
888
|
-
document.removeEventListener("focusin", h), document.removeEventListener("focusout",
|
|
888
|
+
document.removeEventListener("focusin", h), document.removeEventListener("focusout", y), C.disconnect();
|
|
889
889
|
};
|
|
890
890
|
}
|
|
891
891
|
}, [r, i, p.paused]), f.useEffect(() => {
|
|
@@ -904,18 +904,18 @@ var Pl = [
|
|
|
904
904
|
};
|
|
905
905
|
}
|
|
906
906
|
}, [i, l, d, p]);
|
|
907
|
-
const
|
|
907
|
+
const v = f.useCallback(
|
|
908
908
|
(h) => {
|
|
909
909
|
if (!n && !r || p.paused) return;
|
|
910
|
-
const
|
|
911
|
-
if (
|
|
912
|
-
const C = h.currentTarget, [E,
|
|
913
|
-
E &&
|
|
910
|
+
const y = h.key === "Tab" && !h.altKey && !h.ctrlKey && !h.metaKey, k = document.activeElement;
|
|
911
|
+
if (y && k) {
|
|
912
|
+
const C = h.currentTarget, [E, x] = Ml(C);
|
|
913
|
+
E && x ? !h.shiftKey && k === x ? (h.preventDefault(), n && Je(E, { select: !0 })) : h.shiftKey && k === E && (h.preventDefault(), n && Je(x, { select: !0 })) : k === C && h.preventDefault();
|
|
914
914
|
}
|
|
915
915
|
},
|
|
916
916
|
[n, r, p.paused]
|
|
917
917
|
);
|
|
918
|
-
return /* @__PURE__ */ u(Rl.div, { tabIndex: -1, ...s, ref: g, onKeyDown:
|
|
918
|
+
return /* @__PURE__ */ u(Rl.div, { tabIndex: -1, ...s, ref: g, onKeyDown: v });
|
|
919
919
|
});
|
|
920
920
|
Xr.displayName = Ol;
|
|
921
921
|
function _l(e, { select: t = !1 } = {}) {
|
|
@@ -939,9 +939,9 @@ function Fa(e) {
|
|
|
939
939
|
}
|
|
940
940
|
function Fo(e, t) {
|
|
941
941
|
for (const n of e)
|
|
942
|
-
if (!
|
|
942
|
+
if (!Dl(n, { upTo: t })) return n;
|
|
943
943
|
}
|
|
944
|
-
function
|
|
944
|
+
function Dl(e, { upTo: t }) {
|
|
945
945
|
if (getComputedStyle(e).visibility === "hidden") return !0;
|
|
946
946
|
for (; e; ) {
|
|
947
947
|
if (t !== void 0 && e === t) return !1;
|
|
@@ -950,13 +950,13 @@ function Il(e, { upTo: t }) {
|
|
|
950
950
|
}
|
|
951
951
|
return !1;
|
|
952
952
|
}
|
|
953
|
-
function
|
|
953
|
+
function Il(e) {
|
|
954
954
|
return e instanceof HTMLInputElement && "select" in e;
|
|
955
955
|
}
|
|
956
956
|
function Je(e, { select: t = !1 } = {}) {
|
|
957
957
|
if (e && e.focus) {
|
|
958
958
|
const n = document.activeElement;
|
|
959
|
-
e.focus({ preventScroll: !0 }), e !== n &&
|
|
959
|
+
e.focus({ preventScroll: !0 }), e !== n && Il(e) && t && e.select();
|
|
960
960
|
}
|
|
961
961
|
}
|
|
962
962
|
var $o = Ll();
|
|
@@ -1156,16 +1156,16 @@ const Ql = async (e, t, n) => {
|
|
|
1156
1156
|
}), {
|
|
1157
1157
|
x: d,
|
|
1158
1158
|
y: m
|
|
1159
|
-
} = Ho(l, r, c), g = r, p = {},
|
|
1159
|
+
} = Ho(l, r, c), g = r, p = {}, v = 0;
|
|
1160
1160
|
for (let h = 0; h < i.length; h++) {
|
|
1161
1161
|
const {
|
|
1162
|
-
name:
|
|
1162
|
+
name: y,
|
|
1163
1163
|
fn: k
|
|
1164
1164
|
} = i[h], {
|
|
1165
1165
|
x: C,
|
|
1166
1166
|
y: E,
|
|
1167
|
-
data:
|
|
1168
|
-
reset:
|
|
1167
|
+
data: x,
|
|
1168
|
+
reset: A
|
|
1169
1169
|
} = await k({
|
|
1170
1170
|
x: d,
|
|
1171
1171
|
y: m,
|
|
@@ -1182,15 +1182,15 @@ const Ql = async (e, t, n) => {
|
|
|
1182
1182
|
});
|
|
1183
1183
|
d = C ?? d, m = E ?? m, p = {
|
|
1184
1184
|
...p,
|
|
1185
|
-
[
|
|
1186
|
-
...p[
|
|
1187
|
-
...
|
|
1185
|
+
[y]: {
|
|
1186
|
+
...p[y],
|
|
1187
|
+
...x
|
|
1188
1188
|
}
|
|
1189
|
-
},
|
|
1189
|
+
}, A && v <= 50 && (v++, typeof A == "object" && (A.placement && (g = A.placement), A.rects && (l = A.rects === !0 ? await s.getElementRects({
|
|
1190
1190
|
reference: e,
|
|
1191
1191
|
floating: t,
|
|
1192
1192
|
strategy: o
|
|
1193
|
-
}) :
|
|
1193
|
+
}) : A.rects), {
|
|
1194
1194
|
x: d,
|
|
1195
1195
|
y: m
|
|
1196
1196
|
} = Ho(l, g, c)), h = -1);
|
|
@@ -1219,8 +1219,8 @@ async function qt(e, t) {
|
|
|
1219
1219
|
elementContext: m = "floating",
|
|
1220
1220
|
altBoundary: g = !1,
|
|
1221
1221
|
padding: p = 0
|
|
1222
|
-
} = Ke(t, e),
|
|
1223
|
-
element: (n = await (a.isElement == null ? void 0 : a.isElement(
|
|
1222
|
+
} = Ke(t, e), v = $a(p), y = i[g ? m === "floating" ? "reference" : "floating" : m], k = An(await a.getClippingRect({
|
|
1223
|
+
element: (n = await (a.isElement == null ? void 0 : a.isElement(y))) == null || n ? y : y.contextElement || await (a.getDocumentElement == null ? void 0 : a.getDocumentElement(i.floating)),
|
|
1224
1224
|
boundary: l,
|
|
1225
1225
|
rootBoundary: d,
|
|
1226
1226
|
strategy: c
|
|
@@ -1229,23 +1229,23 @@ async function qt(e, t) {
|
|
|
1229
1229
|
y: o,
|
|
1230
1230
|
width: s.floating.width,
|
|
1231
1231
|
height: s.floating.height
|
|
1232
|
-
} : s.reference, E = await (a.getOffsetParent == null ? void 0 : a.getOffsetParent(i.floating)),
|
|
1232
|
+
} : s.reference, E = await (a.getOffsetParent == null ? void 0 : a.getOffsetParent(i.floating)), x = await (a.isElement == null ? void 0 : a.isElement(E)) ? await (a.getScale == null ? void 0 : a.getScale(E)) || {
|
|
1233
1233
|
x: 1,
|
|
1234
1234
|
y: 1
|
|
1235
1235
|
} : {
|
|
1236
1236
|
x: 1,
|
|
1237
1237
|
y: 1
|
|
1238
|
-
},
|
|
1238
|
+
}, A = An(a.convertOffsetParentRelativeRectToViewportRelativeRect ? await a.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
1239
1239
|
elements: i,
|
|
1240
1240
|
rect: C,
|
|
1241
1241
|
offsetParent: E,
|
|
1242
1242
|
strategy: c
|
|
1243
1243
|
}) : C);
|
|
1244
1244
|
return {
|
|
1245
|
-
top: (k.top -
|
|
1246
|
-
bottom: (
|
|
1247
|
-
left: (k.left -
|
|
1248
|
-
right: (
|
|
1245
|
+
top: (k.top - A.top + v.top) / x.y,
|
|
1246
|
+
bottom: (A.bottom - k.bottom + v.bottom) / x.y,
|
|
1247
|
+
left: (k.left - A.left + v.left) / x.x,
|
|
1248
|
+
right: (A.right - k.right + v.right) / x.x
|
|
1249
1249
|
};
|
|
1250
1250
|
}
|
|
1251
1251
|
const Zl = (e) => ({
|
|
@@ -1269,17 +1269,17 @@ const Zl = (e) => ({
|
|
|
1269
1269
|
const m = $a(d), g = {
|
|
1270
1270
|
x: n,
|
|
1271
1271
|
y: r
|
|
1272
|
-
}, p = Jr(o),
|
|
1273
|
-
let _ =
|
|
1274
|
-
(!_ || !await (s.isElement == null ? void 0 : s.isElement(
|
|
1275
|
-
const P =
|
|
1272
|
+
}, p = Jr(o), v = Zr(p), h = await s.getDimensions(l), y = p === "y", k = y ? "top" : "left", C = y ? "bottom" : "right", E = y ? "clientHeight" : "clientWidth", x = a.reference[v] + a.reference[p] - g[p] - a.floating[v], A = g[p] - a.reference[p], I = await (s.getOffsetParent == null ? void 0 : s.getOffsetParent(l));
|
|
1273
|
+
let _ = I ? I[E] : 0;
|
|
1274
|
+
(!_ || !await (s.isElement == null ? void 0 : s.isElement(I))) && (_ = i.floating[E] || a.floating[v]);
|
|
1275
|
+
const P = x / 2 - A / 2, F = _ / 2 - h[v] / 2 - 1, V = tt(m[k], F), H = tt(m[C], F), G = V, w = _ - h[v] - H, T = _ / 2 - h[v] / 2 + P, R = Rr(G, T, w), O = !c.arrow && Ot(o) != null && T !== R && a.reference[v] / 2 - (T < G ? V : H) - h[v] / 2 < 0, N = O ? T < G ? T - G : T - w : 0;
|
|
1276
1276
|
return {
|
|
1277
|
-
[p]: g[p] +
|
|
1277
|
+
[p]: g[p] + N,
|
|
1278
1278
|
data: {
|
|
1279
1279
|
[p]: R,
|
|
1280
|
-
centerOffset:
|
|
1280
|
+
centerOffset: T - R - N,
|
|
1281
1281
|
...O && {
|
|
1282
|
-
alignmentOffset:
|
|
1282
|
+
alignmentOffset: N
|
|
1283
1283
|
}
|
|
1284
1284
|
},
|
|
1285
1285
|
reset: O
|
|
@@ -1303,53 +1303,53 @@ const Zl = (e) => ({
|
|
|
1303
1303
|
crossAxis: m = !0,
|
|
1304
1304
|
fallbackPlacements: g,
|
|
1305
1305
|
fallbackStrategy: p = "bestFit",
|
|
1306
|
-
fallbackAxisSideDirection:
|
|
1306
|
+
fallbackAxisSideDirection: v = "none",
|
|
1307
1307
|
flipAlignment: h = !0,
|
|
1308
|
-
...
|
|
1308
|
+
...y
|
|
1309
1309
|
} = Ke(e, t);
|
|
1310
1310
|
if ((n = a.arrow) != null && n.alignmentOffset)
|
|
1311
1311
|
return {};
|
|
1312
|
-
const k = Xe(o), C = ze(i), E = Xe(i) === i,
|
|
1313
|
-
!g &&
|
|
1314
|
-
const _ = [i, ...
|
|
1312
|
+
const k = Xe(o), C = ze(i), E = Xe(i) === i, x = await (c.isRTL == null ? void 0 : c.isRTL(l.floating)), A = g || (E || !h ? [kn(i)] : Vl(i)), I = v !== "none";
|
|
1313
|
+
!g && I && A.push(...Kl(i, h, v, x));
|
|
1314
|
+
const _ = [i, ...A], P = await qt(t, y), F = [];
|
|
1315
1315
|
let V = ((r = a.flip) == null ? void 0 : r.overflows) || [];
|
|
1316
|
-
if (d &&
|
|
1317
|
-
const
|
|
1318
|
-
|
|
1316
|
+
if (d && F.push(P[k]), m) {
|
|
1317
|
+
const T = jl(o, s, x);
|
|
1318
|
+
F.push(P[T[0]], P[T[1]]);
|
|
1319
1319
|
}
|
|
1320
1320
|
if (V = [...V, {
|
|
1321
1321
|
placement: o,
|
|
1322
|
-
overflows:
|
|
1323
|
-
}], !
|
|
1322
|
+
overflows: F
|
|
1323
|
+
}], !F.every((T) => T <= 0)) {
|
|
1324
1324
|
var H, G;
|
|
1325
|
-
const
|
|
1325
|
+
const T = (((H = a.flip) == null ? void 0 : H.index) || 0) + 1, R = _[T];
|
|
1326
1326
|
if (R && (!(m === "alignment" ? C !== ze(R) : !1) || // We leave the current main axis only if every placement on that axis
|
|
1327
1327
|
// overflows the main axis.
|
|
1328
1328
|
V.every((S) => ze(S.placement) === C ? S.overflows[0] > 0 : !0)))
|
|
1329
1329
|
return {
|
|
1330
1330
|
data: {
|
|
1331
|
-
index:
|
|
1331
|
+
index: T,
|
|
1332
1332
|
overflows: V
|
|
1333
1333
|
},
|
|
1334
1334
|
reset: {
|
|
1335
1335
|
placement: R
|
|
1336
1336
|
}
|
|
1337
1337
|
};
|
|
1338
|
-
let O = (G = V.filter((
|
|
1338
|
+
let O = (G = V.filter((N) => N.overflows[0] <= 0).sort((N, S) => N.overflows[1] - S.overflows[1])[0]) == null ? void 0 : G.placement;
|
|
1339
1339
|
if (!O)
|
|
1340
1340
|
switch (p) {
|
|
1341
1341
|
case "bestFit": {
|
|
1342
|
-
var
|
|
1343
|
-
const
|
|
1344
|
-
if (
|
|
1345
|
-
const
|
|
1346
|
-
return
|
|
1342
|
+
var w;
|
|
1343
|
+
const N = (w = V.filter((S) => {
|
|
1344
|
+
if (I) {
|
|
1345
|
+
const z = ze(S.placement);
|
|
1346
|
+
return z === C || // Create a bias to the `y` side axis due to horizontal
|
|
1347
1347
|
// reading directions favoring greater width.
|
|
1348
|
-
|
|
1348
|
+
z === "y";
|
|
1349
1349
|
}
|
|
1350
1350
|
return !0;
|
|
1351
|
-
}).map((S) => [S.placement, S.overflows.filter((
|
|
1352
|
-
|
|
1351
|
+
}).map((S) => [S.placement, S.overflows.filter((z) => z > 0).reduce((z, Y) => z + Y, 0)]).sort((S, z) => S[1] - z[1])[0]) == null ? void 0 : w[0];
|
|
1352
|
+
N && (O = N);
|
|
1353
1353
|
break;
|
|
1354
1354
|
}
|
|
1355
1355
|
case "initialPlacement":
|
|
@@ -1429,7 +1429,7 @@ async function tu(e, t) {
|
|
|
1429
1429
|
let {
|
|
1430
1430
|
mainAxis: g,
|
|
1431
1431
|
crossAxis: p,
|
|
1432
|
-
alignmentAxis:
|
|
1432
|
+
alignmentAxis: v
|
|
1433
1433
|
} = typeof m == "number" ? {
|
|
1434
1434
|
mainAxis: m,
|
|
1435
1435
|
crossAxis: 0,
|
|
@@ -1439,7 +1439,7 @@ async function tu(e, t) {
|
|
|
1439
1439
|
crossAxis: m.crossAxis || 0,
|
|
1440
1440
|
alignmentAxis: m.alignmentAxis
|
|
1441
1441
|
};
|
|
1442
|
-
return i && typeof
|
|
1442
|
+
return i && typeof v == "number" && (p = i === "end" ? v * -1 : v), c ? {
|
|
1443
1443
|
x: p * d,
|
|
1444
1444
|
y: g * l
|
|
1445
1445
|
} : {
|
|
@@ -1482,11 +1482,11 @@ const nu = function(e) {
|
|
|
1482
1482
|
mainAxis: a = !0,
|
|
1483
1483
|
crossAxis: s = !1,
|
|
1484
1484
|
limiter: i = {
|
|
1485
|
-
fn: (
|
|
1485
|
+
fn: (y) => {
|
|
1486
1486
|
let {
|
|
1487
1487
|
x: k,
|
|
1488
1488
|
y: C
|
|
1489
|
-
} =
|
|
1489
|
+
} = y;
|
|
1490
1490
|
return {
|
|
1491
1491
|
x: k,
|
|
1492
1492
|
y: C
|
|
@@ -1498,19 +1498,19 @@ const nu = function(e) {
|
|
|
1498
1498
|
x: n,
|
|
1499
1499
|
y: r
|
|
1500
1500
|
}, d = await qt(t, c), m = ze(Xe(o)), g = Qr(m);
|
|
1501
|
-
let p = l[g],
|
|
1501
|
+
let p = l[g], v = l[m];
|
|
1502
1502
|
if (a) {
|
|
1503
|
-
const
|
|
1503
|
+
const y = g === "y" ? "top" : "left", k = g === "y" ? "bottom" : "right", C = p + d[y], E = p - d[k];
|
|
1504
1504
|
p = Rr(C, p, E);
|
|
1505
1505
|
}
|
|
1506
1506
|
if (s) {
|
|
1507
|
-
const
|
|
1508
|
-
|
|
1507
|
+
const y = m === "y" ? "top" : "left", k = m === "y" ? "bottom" : "right", C = v + d[y], E = v - d[k];
|
|
1508
|
+
v = Rr(C, v, E);
|
|
1509
1509
|
}
|
|
1510
1510
|
const h = i.fn({
|
|
1511
1511
|
...t,
|
|
1512
1512
|
[g]: p,
|
|
1513
|
-
[m]:
|
|
1513
|
+
[m]: v
|
|
1514
1514
|
});
|
|
1515
1515
|
return {
|
|
1516
1516
|
...h,
|
|
@@ -1543,8 +1543,8 @@ const nu = function(e) {
|
|
|
1543
1543
|
x: n,
|
|
1544
1544
|
y: r
|
|
1545
1545
|
}, m = ze(o), g = Qr(m);
|
|
1546
|
-
let p = d[g],
|
|
1547
|
-
const h = Ke(i, t),
|
|
1546
|
+
let p = d[g], v = d[m];
|
|
1547
|
+
const h = Ke(i, t), y = typeof h == "number" ? {
|
|
1548
1548
|
mainAxis: h,
|
|
1549
1549
|
crossAxis: 0
|
|
1550
1550
|
} : {
|
|
@@ -1553,17 +1553,17 @@ const nu = function(e) {
|
|
|
1553
1553
|
...h
|
|
1554
1554
|
};
|
|
1555
1555
|
if (c) {
|
|
1556
|
-
const E = g === "y" ? "height" : "width",
|
|
1557
|
-
p <
|
|
1556
|
+
const E = g === "y" ? "height" : "width", x = a.reference[g] - a.floating[E] + y.mainAxis, A = a.reference[g] + a.reference[E] - y.mainAxis;
|
|
1557
|
+
p < x ? p = x : p > A && (p = A);
|
|
1558
1558
|
}
|
|
1559
1559
|
if (l) {
|
|
1560
1560
|
var k, C;
|
|
1561
|
-
const E = g === "y" ? "width" : "height",
|
|
1562
|
-
|
|
1561
|
+
const E = g === "y" ? "width" : "height", x = Wa.has(Xe(o)), A = a.reference[m] - a.floating[E] + (x && ((k = s.offset) == null ? void 0 : k[m]) || 0) + (x ? 0 : y.crossAxis), I = a.reference[m] + a.reference[E] + (x ? 0 : ((C = s.offset) == null ? void 0 : C[m]) || 0) - (x ? y.crossAxis : 0);
|
|
1562
|
+
v < A ? v = A : v > I && (v = I);
|
|
1563
1563
|
}
|
|
1564
1564
|
return {
|
|
1565
1565
|
[g]: p,
|
|
1566
|
-
[m]:
|
|
1566
|
+
[m]: v
|
|
1567
1567
|
};
|
|
1568
1568
|
}
|
|
1569
1569
|
};
|
|
@@ -1583,24 +1583,24 @@ const nu = function(e) {
|
|
|
1583
1583
|
},
|
|
1584
1584
|
...l
|
|
1585
1585
|
} = Ke(e, t), d = await qt(t, l), m = Xe(o), g = Ot(o), p = ze(o) === "y", {
|
|
1586
|
-
width:
|
|
1586
|
+
width: v,
|
|
1587
1587
|
height: h
|
|
1588
1588
|
} = a.floating;
|
|
1589
|
-
let
|
|
1590
|
-
m === "top" || m === "bottom" ? (
|
|
1591
|
-
const C = h - d.top - d.bottom, E =
|
|
1592
|
-
let _ =
|
|
1593
|
-
if ((n = t.middlewareData.shift) != null && n.enabled.x && (P = E), (r = t.middlewareData.shift) != null && r.enabled.y && (_ = C),
|
|
1594
|
-
const V = Ee(d.left, 0), H = Ee(d.right, 0), G = Ee(d.top, 0),
|
|
1595
|
-
p ? P =
|
|
1589
|
+
let y, k;
|
|
1590
|
+
m === "top" || m === "bottom" ? (y = m, k = g === (await (s.isRTL == null ? void 0 : s.isRTL(i.floating)) ? "start" : "end") ? "left" : "right") : (k = m, y = g === "end" ? "top" : "bottom");
|
|
1591
|
+
const C = h - d.top - d.bottom, E = v - d.left - d.right, x = tt(h - d[y], C), A = tt(v - d[k], E), I = !t.middlewareData.shift;
|
|
1592
|
+
let _ = x, P = A;
|
|
1593
|
+
if ((n = t.middlewareData.shift) != null && n.enabled.x && (P = E), (r = t.middlewareData.shift) != null && r.enabled.y && (_ = C), I && !g) {
|
|
1594
|
+
const V = Ee(d.left, 0), H = Ee(d.right, 0), G = Ee(d.top, 0), w = Ee(d.bottom, 0);
|
|
1595
|
+
p ? P = v - 2 * (V !== 0 || H !== 0 ? V + H : Ee(d.left, d.right)) : _ = h - 2 * (G !== 0 || w !== 0 ? G + w : Ee(d.top, d.bottom));
|
|
1596
1596
|
}
|
|
1597
1597
|
await c({
|
|
1598
1598
|
...t,
|
|
1599
1599
|
availableWidth: P,
|
|
1600
1600
|
availableHeight: _
|
|
1601
1601
|
});
|
|
1602
|
-
const
|
|
1603
|
-
return
|
|
1602
|
+
const F = await s.getDimensions(i.floating);
|
|
1603
|
+
return v !== F.width || h !== F.height ? {
|
|
1604
1604
|
reset: {
|
|
1605
1605
|
rects: !0
|
|
1606
1606
|
}
|
|
@@ -1608,7 +1608,7 @@ const nu = function(e) {
|
|
|
1608
1608
|
}
|
|
1609
1609
|
};
|
|
1610
1610
|
};
|
|
1611
|
-
function
|
|
1611
|
+
function Dn() {
|
|
1612
1612
|
return typeof window < "u";
|
|
1613
1613
|
}
|
|
1614
1614
|
function _t(e) {
|
|
@@ -1623,16 +1623,16 @@ function Ue(e) {
|
|
|
1623
1623
|
return (t = (za(e) ? e.ownerDocument : e.document) || window.document) == null ? void 0 : t.documentElement;
|
|
1624
1624
|
}
|
|
1625
1625
|
function za(e) {
|
|
1626
|
-
return
|
|
1626
|
+
return Dn() ? e instanceof Node || e instanceof ke(e).Node : !1;
|
|
1627
1627
|
}
|
|
1628
1628
|
function Me(e) {
|
|
1629
|
-
return
|
|
1629
|
+
return Dn() ? e instanceof Element || e instanceof ke(e).Element : !1;
|
|
1630
1630
|
}
|
|
1631
1631
|
function He(e) {
|
|
1632
|
-
return
|
|
1632
|
+
return Dn() ? e instanceof HTMLElement || e instanceof ke(e).HTMLElement : !1;
|
|
1633
1633
|
}
|
|
1634
1634
|
function Vo(e) {
|
|
1635
|
-
return !
|
|
1635
|
+
return !Dn() || typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof ke(e).ShadowRoot;
|
|
1636
1636
|
}
|
|
1637
1637
|
const su = /* @__PURE__ */ new Set(["inline", "contents"]);
|
|
1638
1638
|
function Jt(e) {
|
|
@@ -1641,7 +1641,7 @@ function Jt(e) {
|
|
|
1641
1641
|
overflowX: n,
|
|
1642
1642
|
overflowY: r,
|
|
1643
1643
|
display: o
|
|
1644
|
-
} =
|
|
1644
|
+
} = De(e);
|
|
1645
1645
|
return /auto|scroll|overlay|hidden|clip/.test(t + r + n) && !su.has(o);
|
|
1646
1646
|
}
|
|
1647
1647
|
const iu = /* @__PURE__ */ new Set(["table", "td", "th"]);
|
|
@@ -1649,7 +1649,7 @@ function cu(e) {
|
|
|
1649
1649
|
return iu.has(_t(e));
|
|
1650
1650
|
}
|
|
1651
1651
|
const lu = [":popover-open", ":modal"];
|
|
1652
|
-
function
|
|
1652
|
+
function In(e) {
|
|
1653
1653
|
return lu.some((t) => {
|
|
1654
1654
|
try {
|
|
1655
1655
|
return e.matches(t);
|
|
@@ -1660,7 +1660,7 @@ function Dn(e) {
|
|
|
1660
1660
|
}
|
|
1661
1661
|
const uu = ["transform", "translate", "scale", "rotate", "perspective"], du = ["transform", "translate", "scale", "rotate", "perspective", "filter"], fu = ["paint", "layout", "strict", "content"];
|
|
1662
1662
|
function eo(e) {
|
|
1663
|
-
const t = to(), n = Me(e) ?
|
|
1663
|
+
const t = to(), n = Me(e) ? De(e) : e;
|
|
1664
1664
|
return uu.some((r) => n[r] ? n[r] !== "none" : !1) || (n.containerType ? n.containerType !== "normal" : !1) || !t && (n.backdropFilter ? n.backdropFilter !== "none" : !1) || !t && (n.filter ? n.filter !== "none" : !1) || du.some((r) => (n.willChange || "").includes(r)) || fu.some((r) => (n.contain || "").includes(r));
|
|
1665
1665
|
}
|
|
1666
1666
|
function mu(e) {
|
|
@@ -1668,7 +1668,7 @@ function mu(e) {
|
|
|
1668
1668
|
for (; He(t) && !Tt(t); ) {
|
|
1669
1669
|
if (eo(t))
|
|
1670
1670
|
return t;
|
|
1671
|
-
if (
|
|
1671
|
+
if (In(t))
|
|
1672
1672
|
return null;
|
|
1673
1673
|
t = nt(t);
|
|
1674
1674
|
}
|
|
@@ -1681,7 +1681,7 @@ const pu = /* @__PURE__ */ new Set(["html", "body", "#document"]);
|
|
|
1681
1681
|
function Tt(e) {
|
|
1682
1682
|
return pu.has(_t(e));
|
|
1683
1683
|
}
|
|
1684
|
-
function
|
|
1684
|
+
function De(e) {
|
|
1685
1685
|
return ke(e).getComputedStyle(e);
|
|
1686
1686
|
}
|
|
1687
1687
|
function Ln(e) {
|
|
@@ -1723,7 +1723,7 @@ function _r(e) {
|
|
|
1723
1723
|
return e.parent && Object.getPrototypeOf(e.parent) ? e.frameElement : null;
|
|
1724
1724
|
}
|
|
1725
1725
|
function Ha(e) {
|
|
1726
|
-
const t =
|
|
1726
|
+
const t = De(e);
|
|
1727
1727
|
let n = parseFloat(t.width) || 0, r = parseFloat(t.height) || 0;
|
|
1728
1728
|
const o = He(e), a = o ? e.offsetWidth : n, s = o ? e.offsetHeight : r, i = En(n) !== a || En(r) !== s;
|
|
1729
1729
|
return i && (n = a, r = s), {
|
|
@@ -1770,10 +1770,10 @@ function ft(e, t, n, r) {
|
|
|
1770
1770
|
let c = (o.left + i.x) / s.x, l = (o.top + i.y) / s.y, d = o.width / s.x, m = o.height / s.y;
|
|
1771
1771
|
if (a) {
|
|
1772
1772
|
const g = ke(a), p = r && Me(r) ? ke(r) : r;
|
|
1773
|
-
let
|
|
1774
|
-
for (; h && r && p !==
|
|
1775
|
-
const
|
|
1776
|
-
c *=
|
|
1773
|
+
let v = g, h = _r(v);
|
|
1774
|
+
for (; h && r && p !== v; ) {
|
|
1775
|
+
const y = At(h), k = h.getBoundingClientRect(), C = De(h), E = k.left + (h.clientLeft + parseFloat(C.paddingLeft)) * y.x, x = k.top + (h.clientTop + parseFloat(C.paddingTop)) * y.y;
|
|
1776
|
+
c *= y.x, l *= y.y, d *= y.x, m *= y.y, c += E, l += x, v = ke(h), h = _r(v);
|
|
1777
1777
|
}
|
|
1778
1778
|
}
|
|
1779
1779
|
return An({
|
|
@@ -1801,7 +1801,7 @@ function bu(e) {
|
|
|
1801
1801
|
offsetParent: r,
|
|
1802
1802
|
strategy: o
|
|
1803
1803
|
} = e;
|
|
1804
|
-
const a = o === "fixed", s = Ue(r), i = t ?
|
|
1804
|
+
const a = o === "fixed", s = Ue(r), i = t ? In(t.floating) : !1;
|
|
1805
1805
|
if (r === s || i && a)
|
|
1806
1806
|
return n;
|
|
1807
1807
|
let c = {
|
|
@@ -1828,7 +1828,7 @@ function yu(e) {
|
|
|
1828
1828
|
const t = Ue(e), n = Ln(e), r = e.ownerDocument.body, o = Ee(t.scrollWidth, t.clientWidth, r.scrollWidth, r.clientWidth), a = Ee(t.scrollHeight, t.clientHeight, r.scrollHeight, r.clientHeight);
|
|
1829
1829
|
let s = -n.scrollLeft + Fn(e);
|
|
1830
1830
|
const i = -n.scrollTop;
|
|
1831
|
-
return
|
|
1831
|
+
return De(r).direction === "rtl" && (s += Ee(t.clientWidth, r.clientWidth) - o), {
|
|
1832
1832
|
width: o,
|
|
1833
1833
|
height: a,
|
|
1834
1834
|
x: s,
|
|
@@ -1846,8 +1846,8 @@ function wu(e, t) {
|
|
|
1846
1846
|
}
|
|
1847
1847
|
const l = Fn(r);
|
|
1848
1848
|
if (l <= 0) {
|
|
1849
|
-
const d = r.ownerDocument, m = d.body, g = getComputedStyle(m), p = d.compatMode === "CSS1Compat" && parseFloat(g.marginLeft) + parseFloat(g.marginRight) || 0,
|
|
1850
|
-
|
|
1849
|
+
const d = r.ownerDocument, m = d.body, g = getComputedStyle(m), p = d.compatMode === "CSS1Compat" && parseFloat(g.marginLeft) + parseFloat(g.marginRight) || 0, v = Math.abs(r.clientWidth - m.clientWidth - p);
|
|
1850
|
+
v <= Go && (a -= v);
|
|
1851
1851
|
} else l <= Go && (a += l);
|
|
1852
1852
|
return {
|
|
1853
1853
|
width: a,
|
|
@@ -1887,17 +1887,17 @@ function Yo(e, t, n) {
|
|
|
1887
1887
|
}
|
|
1888
1888
|
function Va(e, t) {
|
|
1889
1889
|
const n = nt(e);
|
|
1890
|
-
return n === t || !Me(n) || Tt(n) ? !1 :
|
|
1890
|
+
return n === t || !Me(n) || Tt(n) ? !1 : De(n).position === "fixed" || Va(n, t);
|
|
1891
1891
|
}
|
|
1892
1892
|
function Cu(e, t) {
|
|
1893
1893
|
const n = t.get(e);
|
|
1894
1894
|
if (n)
|
|
1895
1895
|
return n;
|
|
1896
1896
|
let r = Kt(e, [], !1).filter((i) => Me(i) && _t(i) !== "body"), o = null;
|
|
1897
|
-
const a =
|
|
1897
|
+
const a = De(e).position === "fixed";
|
|
1898
1898
|
let s = a ? nt(e) : e;
|
|
1899
1899
|
for (; Me(s) && !Tt(s); ) {
|
|
1900
|
-
const i =
|
|
1900
|
+
const i = De(s), c = eo(s);
|
|
1901
1901
|
!c && i.position === "fixed" && (o = null), (a ? !c && !o : !c && i.position === "static" && !!o && xu.has(o.position) || Jt(s) && !c && Va(e, s)) ? r = r.filter((d) => d !== s) : o = i, s = nt(s);
|
|
1902
1902
|
}
|
|
1903
1903
|
return t.set(e, r), r;
|
|
@@ -1909,7 +1909,7 @@ function Eu(e) {
|
|
|
1909
1909
|
rootBoundary: r,
|
|
1910
1910
|
strategy: o
|
|
1911
1911
|
} = e;
|
|
1912
|
-
const s = [...n === "clippingAncestors" ?
|
|
1912
|
+
const s = [...n === "clippingAncestors" ? In(t) ? [] : Cu(t, this._c) : [].concat(n), r], i = s[0], c = s.reduce((l, d) => {
|
|
1913
1913
|
const m = Yo(t, d, o);
|
|
1914
1914
|
return l.top = Ee(m.top, l.top), l.right = tt(m.right, l.right), l.bottom = tt(m.bottom, l.bottom), l.left = Ee(m.left, l.left), l;
|
|
1915
1915
|
}, Yo(t, i, o));
|
|
@@ -1955,10 +1955,10 @@ function Au(e, t, n) {
|
|
|
1955
1955
|
};
|
|
1956
1956
|
}
|
|
1957
1957
|
function dr(e) {
|
|
1958
|
-
return
|
|
1958
|
+
return De(e).position === "static";
|
|
1959
1959
|
}
|
|
1960
1960
|
function qo(e, t) {
|
|
1961
|
-
if (!He(e) ||
|
|
1961
|
+
if (!He(e) || De(e).position === "fixed")
|
|
1962
1962
|
return null;
|
|
1963
1963
|
if (t)
|
|
1964
1964
|
return t(e);
|
|
@@ -1967,7 +1967,7 @@ function qo(e, t) {
|
|
|
1967
1967
|
}
|
|
1968
1968
|
function Ga(e, t) {
|
|
1969
1969
|
const n = ke(e);
|
|
1970
|
-
if (
|
|
1970
|
+
if (In(e))
|
|
1971
1971
|
return n;
|
|
1972
1972
|
if (!He(e)) {
|
|
1973
1973
|
let o = nt(e);
|
|
@@ -1996,7 +1996,7 @@ const Nu = async function(e) {
|
|
|
1996
1996
|
};
|
|
1997
1997
|
};
|
|
1998
1998
|
function Tu(e) {
|
|
1999
|
-
return
|
|
1999
|
+
return De(e).direction === "rtl";
|
|
2000
2000
|
}
|
|
2001
2001
|
const Pu = {
|
|
2002
2002
|
convertOffsetParentRelativeRectToViewportRelativeRect: bu,
|
|
@@ -2030,30 +2030,30 @@ function Ru(e, t) {
|
|
|
2030
2030
|
} = l;
|
|
2031
2031
|
if (i || t(), !g || !p)
|
|
2032
2032
|
return;
|
|
2033
|
-
const
|
|
2034
|
-
rootMargin: -
|
|
2033
|
+
const v = ln(m), h = ln(o.clientWidth - (d + g)), y = ln(o.clientHeight - (m + p)), k = ln(d), E = {
|
|
2034
|
+
rootMargin: -v + "px " + -h + "px " + -y + "px " + -k + "px",
|
|
2035
2035
|
threshold: Ee(0, tt(1, c)) || 1
|
|
2036
2036
|
};
|
|
2037
|
-
let
|
|
2038
|
-
function
|
|
2039
|
-
const _ =
|
|
2037
|
+
let x = !0;
|
|
2038
|
+
function A(I) {
|
|
2039
|
+
const _ = I[0].intersectionRatio;
|
|
2040
2040
|
if (_ !== c) {
|
|
2041
|
-
if (!
|
|
2041
|
+
if (!x)
|
|
2042
2042
|
return s();
|
|
2043
2043
|
_ ? s(!1, _) : r = setTimeout(() => {
|
|
2044
2044
|
s(!1, 1e-7);
|
|
2045
2045
|
}, 1e3);
|
|
2046
2046
|
}
|
|
2047
|
-
_ === 1 && !Ya(l, e.getBoundingClientRect()) && s(),
|
|
2047
|
+
_ === 1 && !Ya(l, e.getBoundingClientRect()) && s(), x = !1;
|
|
2048
2048
|
}
|
|
2049
2049
|
try {
|
|
2050
|
-
n = new IntersectionObserver(
|
|
2050
|
+
n = new IntersectionObserver(A, {
|
|
2051
2051
|
...E,
|
|
2052
2052
|
// Handle <iframe>s
|
|
2053
2053
|
root: o.ownerDocument
|
|
2054
2054
|
});
|
|
2055
2055
|
} catch {
|
|
2056
|
-
n = new IntersectionObserver(
|
|
2056
|
+
n = new IntersectionObserver(A, E);
|
|
2057
2057
|
}
|
|
2058
2058
|
n.observe(e);
|
|
2059
2059
|
}
|
|
@@ -2082,20 +2082,20 @@ function Ou(e, t, n, r) {
|
|
|
2082
2082
|
(E = p) == null || E.observe(t);
|
|
2083
2083
|
})), n();
|
|
2084
2084
|
}), l && !c && p.observe(l), p.observe(t));
|
|
2085
|
-
let
|
|
2086
|
-
c &&
|
|
2087
|
-
function
|
|
2085
|
+
let v, h = c ? ft(e) : null;
|
|
2086
|
+
c && y();
|
|
2087
|
+
function y() {
|
|
2088
2088
|
const k = ft(e);
|
|
2089
|
-
h && !Ya(h, k) && n(), h = k,
|
|
2089
|
+
h && !Ya(h, k) && n(), h = k, v = requestAnimationFrame(y);
|
|
2090
2090
|
}
|
|
2091
2091
|
return n(), () => {
|
|
2092
2092
|
var k;
|
|
2093
2093
|
d.forEach((C) => {
|
|
2094
2094
|
o && C.removeEventListener("scroll", n), a && C.removeEventListener("resize", n);
|
|
2095
|
-
}), m?.(), (k = p) == null || k.disconnect(), p = null, c && cancelAnimationFrame(
|
|
2095
|
+
}), m?.(), (k = p) == null || k.disconnect(), p = null, c && cancelAnimationFrame(v);
|
|
2096
2096
|
};
|
|
2097
2097
|
}
|
|
2098
|
-
const _u = nu, Mu = ru,
|
|
2098
|
+
const _u = nu, Mu = ru, Du = Jl, Iu = au, Lu = eu, Ko = Zl, Fu = ou, $u = (e, t, n) => {
|
|
2099
2099
|
const r = /* @__PURE__ */ new Map(), o = {
|
|
2100
2100
|
platform: Pu,
|
|
2101
2101
|
...n
|
|
@@ -2176,28 +2176,28 @@ function Bu(e) {
|
|
|
2176
2176
|
isPositioned: !1
|
|
2177
2177
|
}), [g, p] = f.useState(r);
|
|
2178
2178
|
Nn(g, r) || p(r);
|
|
2179
|
-
const [
|
|
2180
|
-
S !==
|
|
2179
|
+
const [v, h] = f.useState(null), [y, k] = f.useState(null), C = f.useCallback((S) => {
|
|
2180
|
+
S !== I.current && (I.current = S, h(S));
|
|
2181
2181
|
}, []), E = f.useCallback((S) => {
|
|
2182
2182
|
S !== _.current && (_.current = S, k(S));
|
|
2183
|
-
}, []),
|
|
2184
|
-
if (!
|
|
2183
|
+
}, []), x = a || v, A = s || y, I = f.useRef(null), _ = f.useRef(null), P = f.useRef(d), F = c != null, V = fr(c), H = fr(o), G = fr(l), w = f.useCallback(() => {
|
|
2184
|
+
if (!I.current || !_.current)
|
|
2185
2185
|
return;
|
|
2186
2186
|
const S = {
|
|
2187
2187
|
placement: t,
|
|
2188
2188
|
strategy: n,
|
|
2189
2189
|
middleware: g
|
|
2190
2190
|
};
|
|
2191
|
-
H.current && (S.platform = H.current), $u(
|
|
2191
|
+
H.current && (S.platform = H.current), $u(I.current, _.current, S).then((z) => {
|
|
2192
2192
|
const Y = {
|
|
2193
|
-
...
|
|
2193
|
+
...z,
|
|
2194
2194
|
// The floating element's position may be recomputed while it's closed
|
|
2195
2195
|
// but still mounted (such as when transitioning out). To ensure
|
|
2196
2196
|
// `isPositioned` will be `false` initially on the next open, avoid
|
|
2197
2197
|
// setting it to `true` when `open === false` (must be specified).
|
|
2198
2198
|
isPositioned: G.current !== !1
|
|
2199
2199
|
};
|
|
2200
|
-
|
|
2200
|
+
T.current && !Nn(P.current, Y) && (P.current = Y, _n.flushSync(() => {
|
|
2201
2201
|
m(Y);
|
|
2202
2202
|
}));
|
|
2203
2203
|
});
|
|
@@ -2208,25 +2208,25 @@ function Bu(e) {
|
|
|
2208
2208
|
isPositioned: !1
|
|
2209
2209
|
})));
|
|
2210
2210
|
}, [l]);
|
|
2211
|
-
const
|
|
2212
|
-
yn(() => (
|
|
2213
|
-
|
|
2211
|
+
const T = f.useRef(!1);
|
|
2212
|
+
yn(() => (T.current = !0, () => {
|
|
2213
|
+
T.current = !1;
|
|
2214
2214
|
}), []), yn(() => {
|
|
2215
|
-
if (
|
|
2215
|
+
if (x && (I.current = x), A && (_.current = A), x && A) {
|
|
2216
2216
|
if (V.current)
|
|
2217
|
-
return V.current(
|
|
2218
|
-
|
|
2217
|
+
return V.current(x, A, w);
|
|
2218
|
+
w();
|
|
2219
2219
|
}
|
|
2220
|
-
}, [
|
|
2220
|
+
}, [x, A, w, V, F]);
|
|
2221
2221
|
const R = f.useMemo(() => ({
|
|
2222
|
-
reference:
|
|
2222
|
+
reference: I,
|
|
2223
2223
|
floating: _,
|
|
2224
2224
|
setReference: C,
|
|
2225
2225
|
setFloating: E
|
|
2226
2226
|
}), [C, E]), O = f.useMemo(() => ({
|
|
2227
|
-
reference:
|
|
2228
|
-
floating:
|
|
2229
|
-
}), [
|
|
2227
|
+
reference: x,
|
|
2228
|
+
floating: A
|
|
2229
|
+
}), [x, A]), N = f.useMemo(() => {
|
|
2230
2230
|
const S = {
|
|
2231
2231
|
position: n,
|
|
2232
2232
|
left: 0,
|
|
@@ -2234,26 +2234,26 @@ function Bu(e) {
|
|
|
2234
2234
|
};
|
|
2235
2235
|
if (!O.floating)
|
|
2236
2236
|
return S;
|
|
2237
|
-
const
|
|
2237
|
+
const z = Xo(O.floating, d.x), Y = Xo(O.floating, d.y);
|
|
2238
2238
|
return i ? {
|
|
2239
2239
|
...S,
|
|
2240
|
-
transform: "translate(" +
|
|
2240
|
+
transform: "translate(" + z + "px, " + Y + "px)",
|
|
2241
2241
|
...qa(O.floating) >= 1.5 && {
|
|
2242
2242
|
willChange: "transform"
|
|
2243
2243
|
}
|
|
2244
2244
|
} : {
|
|
2245
2245
|
position: n,
|
|
2246
|
-
left:
|
|
2246
|
+
left: z,
|
|
2247
2247
|
top: Y
|
|
2248
2248
|
};
|
|
2249
2249
|
}, [n, i, O.floating, d.x, d.y]);
|
|
2250
2250
|
return f.useMemo(() => ({
|
|
2251
2251
|
...d,
|
|
2252
|
-
update:
|
|
2252
|
+
update: w,
|
|
2253
2253
|
refs: R,
|
|
2254
2254
|
elements: O,
|
|
2255
|
-
floatingStyles:
|
|
2256
|
-
}), [d,
|
|
2255
|
+
floatingStyles: N
|
|
2256
|
+
}), [d, w, R, O, N]);
|
|
2257
2257
|
}
|
|
2258
2258
|
const Hu = (e) => {
|
|
2259
2259
|
function t(n) {
|
|
@@ -2286,10 +2286,10 @@ const Hu = (e) => {
|
|
|
2286
2286
|
...Fu(e),
|
|
2287
2287
|
options: [e, t]
|
|
2288
2288
|
}), Gu = (e, t) => ({
|
|
2289
|
-
...
|
|
2289
|
+
...Du(e),
|
|
2290
2290
|
options: [e, t]
|
|
2291
2291
|
}), Yu = (e, t) => ({
|
|
2292
|
-
...
|
|
2292
|
+
...Iu(e),
|
|
2293
2293
|
options: [e, t]
|
|
2294
2294
|
}), qu = (e, t) => ({
|
|
2295
2295
|
...Lu(e),
|
|
@@ -2415,22 +2415,22 @@ var oo = "PopperContent", [nd, rd] = Za(oo), rs = f.forwardRef(
|
|
|
2415
2415
|
sticky: m = "partial",
|
|
2416
2416
|
hideWhenDetached: g = !1,
|
|
2417
2417
|
updatePositionStrategy: p = "optimized",
|
|
2418
|
-
onPlaced:
|
|
2418
|
+
onPlaced: v,
|
|
2419
2419
|
...h
|
|
2420
|
-
} = e,
|
|
2420
|
+
} = e, y = Ja(oo, n), [k, C] = f.useState(null), E = ie(t, (L) => C(L)), [x, A] = f.useState(null), I = Qa(x), _ = I?.width ?? 0, P = I?.height ?? 0, F = r + (a !== "center" ? "-" + a : ""), V = typeof d == "number" ? d : { top: 0, right: 0, bottom: 0, left: 0, ...d }, H = Array.isArray(l) ? l : [l], G = H.length > 0, w = {
|
|
2421
2421
|
padding: V,
|
|
2422
2422
|
boundary: H.filter(ad),
|
|
2423
2423
|
// with `strategy: 'fixed'`, this is the only way to get it to respect boundaries
|
|
2424
2424
|
altBoundary: G
|
|
2425
|
-
}, { refs:
|
|
2425
|
+
}, { refs: T, floatingStyles: R, placement: O, isPositioned: N, middlewareData: S } = Bu({
|
|
2426
2426
|
// default to `fixed` strategy so users don't have to pick and we also avoid focus scroll issues
|
|
2427
2427
|
strategy: "fixed",
|
|
2428
|
-
placement:
|
|
2428
|
+
placement: F,
|
|
2429
2429
|
whileElementsMounted: (...L) => Ou(...L, {
|
|
2430
2430
|
animationFrame: p === "always"
|
|
2431
2431
|
}),
|
|
2432
2432
|
elements: {
|
|
2433
|
-
reference:
|
|
2433
|
+
reference: y.anchor
|
|
2434
2434
|
},
|
|
2435
2435
|
middleware: [
|
|
2436
2436
|
Uu({ mainAxis: o + P, alignmentAxis: s }),
|
|
@@ -2438,35 +2438,35 @@ var oo = "PopperContent", [nd, rd] = Za(oo), rs = f.forwardRef(
|
|
|
2438
2438
|
mainAxis: !0,
|
|
2439
2439
|
crossAxis: !1,
|
|
2440
2440
|
limiter: m === "partial" ? Vu() : void 0,
|
|
2441
|
-
...
|
|
2441
|
+
...w
|
|
2442
2442
|
}),
|
|
2443
|
-
c && Gu({ ...
|
|
2443
|
+
c && Gu({ ...w }),
|
|
2444
2444
|
Yu({
|
|
2445
|
-
...
|
|
2445
|
+
...w,
|
|
2446
2446
|
apply: ({ elements: L, rects: te, availableWidth: ce, availableHeight: Q }) => {
|
|
2447
2447
|
const { width: ne, height: oe } = te.reference, de = L.floating.style;
|
|
2448
2448
|
de.setProperty("--radix-popper-available-width", `${ce}px`), de.setProperty("--radix-popper-available-height", `${Q}px`), de.setProperty("--radix-popper-anchor-width", `${ne}px`), de.setProperty("--radix-popper-anchor-height", `${oe}px`);
|
|
2449
2449
|
}
|
|
2450
2450
|
}),
|
|
2451
|
-
|
|
2451
|
+
x && Ku({ element: x, padding: i }),
|
|
2452
2452
|
sd({ arrowWidth: _, arrowHeight: P }),
|
|
2453
|
-
g && qu({ strategy: "referenceHidden", ...
|
|
2453
|
+
g && qu({ strategy: "referenceHidden", ...w })
|
|
2454
2454
|
]
|
|
2455
|
-
}), [
|
|
2455
|
+
}), [z, Y] = ss(O), j = et(v);
|
|
2456
2456
|
be(() => {
|
|
2457
|
-
|
|
2458
|
-
}, [
|
|
2457
|
+
N && j?.();
|
|
2458
|
+
}, [N, j]);
|
|
2459
2459
|
const ve = S.arrow?.x, q = S.arrow?.y, ee = S.arrow?.centerOffset !== 0, [J, he] = f.useState();
|
|
2460
2460
|
return be(() => {
|
|
2461
2461
|
k && he(window.getComputedStyle(k).zIndex);
|
|
2462
2462
|
}, [k]), /* @__PURE__ */ u(
|
|
2463
2463
|
"div",
|
|
2464
2464
|
{
|
|
2465
|
-
ref:
|
|
2465
|
+
ref: T.setFloating,
|
|
2466
2466
|
"data-radix-popper-content-wrapper": "",
|
|
2467
2467
|
style: {
|
|
2468
2468
|
...R,
|
|
2469
|
-
transform:
|
|
2469
|
+
transform: N ? R.transform : "translate(0, -200%)",
|
|
2470
2470
|
// keep off the page when measuring
|
|
2471
2471
|
minWidth: "max-content",
|
|
2472
2472
|
zIndex: J,
|
|
@@ -2487,15 +2487,15 @@ var oo = "PopperContent", [nd, rd] = Za(oo), rs = f.forwardRef(
|
|
|
2487
2487
|
nd,
|
|
2488
2488
|
{
|
|
2489
2489
|
scope: n,
|
|
2490
|
-
placedSide:
|
|
2491
|
-
onArrowChange:
|
|
2490
|
+
placedSide: z,
|
|
2491
|
+
onArrowChange: A,
|
|
2492
2492
|
arrowX: ve,
|
|
2493
2493
|
arrowY: q,
|
|
2494
2494
|
shouldHideArrow: ee,
|
|
2495
2495
|
children: /* @__PURE__ */ u(
|
|
2496
2496
|
Xa.div,
|
|
2497
2497
|
{
|
|
2498
|
-
"data-side":
|
|
2498
|
+
"data-side": z,
|
|
2499
2499
|
"data-align": Y,
|
|
2500
2500
|
...h,
|
|
2501
2501
|
ref: E,
|
|
@@ -2503,7 +2503,7 @@ var oo = "PopperContent", [nd, rd] = Za(oo), rs = f.forwardRef(
|
|
|
2503
2503
|
...h.style,
|
|
2504
2504
|
// if the PopperContent hasn't been placed yet (not all measurements done)
|
|
2505
2505
|
// we prevent animations so that users's animation don't kick in too early referring wrong sides
|
|
2506
|
-
animation:
|
|
2506
|
+
animation: N ? void 0 : "none"
|
|
2507
2507
|
}
|
|
2508
2508
|
}
|
|
2509
2509
|
)
|
|
@@ -2573,8 +2573,8 @@ var sd = (e) => ({
|
|
|
2573
2573
|
options: e,
|
|
2574
2574
|
fn(t) {
|
|
2575
2575
|
const { placement: n, rects: r, middlewareData: o } = t, s = o.arrow?.centerOffset !== 0, i = s ? 0 : e.arrowWidth, c = s ? 0 : e.arrowHeight, [l, d] = ss(n), m = { start: "0%", center: "50%", end: "100%" }[d], g = (o.arrow?.x ?? 0) + i / 2, p = (o.arrow?.y ?? 0) + c / 2;
|
|
2576
|
-
let
|
|
2577
|
-
return l === "bottom" ? (
|
|
2576
|
+
let v = "", h = "";
|
|
2577
|
+
return l === "bottom" ? (v = s ? m : `${g}px`, h = `${-c}px`) : l === "top" ? (v = s ? m : `${g}px`, h = `${r.floating.height + c}px`) : l === "right" ? (v = `${-c}px`, h = s ? m : `${p}px`) : l === "left" && (v = `${r.floating.width + c}px`, h = s ? m : `${p}px`), { data: { x: v, y: h } };
|
|
2578
2578
|
}
|
|
2579
2579
|
});
|
|
2580
2580
|
function ss(e) {
|
|
@@ -2763,8 +2763,8 @@ var vd = function(e) {
|
|
|
2763
2763
|
d(g);
|
|
2764
2764
|
else
|
|
2765
2765
|
try {
|
|
2766
|
-
var p = g.getAttribute(r),
|
|
2767
|
-
xt.set(g, h), a.set(g,
|
|
2766
|
+
var p = g.getAttribute(r), v = p !== null && p !== "false", h = (xt.get(g) || 0) + 1, y = (a.get(g) || 0) + 1;
|
|
2767
|
+
xt.set(g, h), a.set(g, y), s.push(g), h === 1 && v && un.set(g, !0), y === 1 && g.setAttribute(n, "true"), v || g.setAttribute(r, "true");
|
|
2768
2768
|
} catch (k) {
|
|
2769
2769
|
console.error("aria-hidden: cannot operate on ", g, k);
|
|
2770
2770
|
}
|
|
@@ -2931,12 +2931,12 @@ var gs = Pd(), hr = function() {
|
|
|
2931
2931
|
onScrollCapture: hr,
|
|
2932
2932
|
onWheelCapture: hr,
|
|
2933
2933
|
onTouchMoveCapture: hr
|
|
2934
|
-
}), o = r[0], a = r[1], s = e.forwardProps, i = e.children, c = e.className, l = e.removeScrollBar, d = e.enabled, m = e.shards, g = e.sideCar, p = e.noRelative,
|
|
2934
|
+
}), o = r[0], a = r[1], s = e.forwardProps, i = e.children, c = e.className, l = e.removeScrollBar, d = e.enabled, m = e.shards, g = e.sideCar, p = e.noRelative, v = e.noIsolation, h = e.inert, y = e.allowPinchZoom, k = e.as, C = k === void 0 ? "div" : k, E = e.gapMode, x = ps(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noRelative", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]), A = g, I = Ad([n, t]), _ = We(We({}, x), o);
|
|
2935
2935
|
return f.createElement(
|
|
2936
2936
|
f.Fragment,
|
|
2937
2937
|
null,
|
|
2938
|
-
d && f.createElement(
|
|
2939
|
-
s ? f.cloneElement(f.Children.only(i), We(We({}, _), { ref:
|
|
2938
|
+
d && f.createElement(A, { sideCar: gs, removeScrollBar: l, shards: m, noRelative: p, noIsolation: v, inert: h, setCallbacks: a, allowPinchZoom: !!y, lockRef: n, gapMode: E }),
|
|
2939
|
+
s ? f.cloneElement(f.Children.only(i), We(We({}, _), { ref: I })) : f.createElement(C, We({}, _, { className: c, ref: I }), i)
|
|
2940
2940
|
);
|
|
2941
2941
|
});
|
|
2942
2942
|
Wn.defaultProps = {
|
|
@@ -2963,22 +2963,22 @@ function _d() {
|
|
|
2963
2963
|
function Md(e, t) {
|
|
2964
2964
|
e.styleSheet ? e.styleSheet.cssText = t : e.appendChild(document.createTextNode(t));
|
|
2965
2965
|
}
|
|
2966
|
-
function
|
|
2966
|
+
function Dd(e) {
|
|
2967
2967
|
var t = document.head || document.getElementsByTagName("head")[0];
|
|
2968
2968
|
t.appendChild(e);
|
|
2969
2969
|
}
|
|
2970
|
-
var
|
|
2970
|
+
var Id = function() {
|
|
2971
2971
|
var e = 0, t = null;
|
|
2972
2972
|
return {
|
|
2973
2973
|
add: function(n) {
|
|
2974
|
-
e == 0 && (t = _d()) && (Md(t, n),
|
|
2974
|
+
e == 0 && (t = _d()) && (Md(t, n), Dd(t)), e++;
|
|
2975
2975
|
},
|
|
2976
2976
|
remove: function() {
|
|
2977
2977
|
e--, !e && t && (t.parentNode && t.parentNode.removeChild(t), t = null);
|
|
2978
2978
|
}
|
|
2979
2979
|
};
|
|
2980
2980
|
}, Ld = function() {
|
|
2981
|
-
var e =
|
|
2981
|
+
var e = Id();
|
|
2982
2982
|
return function(t, n) {
|
|
2983
2983
|
f.useEffect(function() {
|
|
2984
2984
|
return e.add(t), function() {
|
|
@@ -3138,8 +3138,8 @@ var St = Mr ? { passive: !1 } : !1, jd = function(e) {
|
|
|
3138
3138
|
do {
|
|
3139
3139
|
if (!i)
|
|
3140
3140
|
break;
|
|
3141
|
-
var p = ws(e, i),
|
|
3142
|
-
(
|
|
3141
|
+
var p = ws(e, i), v = p[0], h = p[1], y = p[2], k = h - y - a * v;
|
|
3142
|
+
(v || k) && ys(e, i) && (m += k, g += v);
|
|
3143
3143
|
var C = i.parentNode;
|
|
3144
3144
|
i = C && C.nodeType === Node.DOCUMENT_FRAGMENT_NODE ? C.host : C;
|
|
3145
3145
|
} while (
|
|
@@ -3170,52 +3170,52 @@ function ef(e) {
|
|
|
3170
3170
|
if (e.inert) {
|
|
3171
3171
|
document.body.classList.add("block-interactivity-".concat(o));
|
|
3172
3172
|
var h = xd([e.lockRef.current], (e.shards || []).map(ta), !0).filter(Boolean);
|
|
3173
|
-
return h.forEach(function(
|
|
3174
|
-
return
|
|
3173
|
+
return h.forEach(function(y) {
|
|
3174
|
+
return y.classList.add("allow-interactivity-".concat(o));
|
|
3175
3175
|
}), function() {
|
|
3176
|
-
document.body.classList.remove("block-interactivity-".concat(o)), h.forEach(function(
|
|
3177
|
-
return
|
|
3176
|
+
document.body.classList.remove("block-interactivity-".concat(o)), h.forEach(function(y) {
|
|
3177
|
+
return y.classList.remove("allow-interactivity-".concat(o));
|
|
3178
3178
|
});
|
|
3179
3179
|
};
|
|
3180
3180
|
}
|
|
3181
3181
|
}, [e.inert, e.lockRef.current, e.shards]);
|
|
3182
|
-
var i = f.useCallback(function(h,
|
|
3182
|
+
var i = f.useCallback(function(h, y) {
|
|
3183
3183
|
if ("touches" in h && h.touches.length === 2 || h.type === "wheel" && h.ctrlKey)
|
|
3184
3184
|
return !s.current.allowPinchZoom;
|
|
3185
|
-
var k = mn(h), C = n.current, E = "deltaX" in h ? h.deltaX : C[0] - k[0],
|
|
3186
|
-
if ("touches" in h && _ === "h" &&
|
|
3185
|
+
var k = mn(h), C = n.current, E = "deltaX" in h ? h.deltaX : C[0] - k[0], x = "deltaY" in h ? h.deltaY : C[1] - k[1], A, I = h.target, _ = Math.abs(E) > Math.abs(x) ? "h" : "v";
|
|
3186
|
+
if ("touches" in h && _ === "h" && I.type === "range")
|
|
3187
3187
|
return !1;
|
|
3188
|
-
var P = Jo(_,
|
|
3188
|
+
var P = Jo(_, I);
|
|
3189
3189
|
if (!P)
|
|
3190
3190
|
return !0;
|
|
3191
|
-
if (P ?
|
|
3191
|
+
if (P ? A = _ : (A = _ === "v" ? "h" : "v", P = Jo(_, I)), !P)
|
|
3192
3192
|
return !1;
|
|
3193
|
-
if (!r.current && "changedTouches" in h && (E ||
|
|
3193
|
+
if (!r.current && "changedTouches" in h && (E || x) && (r.current = A), !A)
|
|
3194
3194
|
return !0;
|
|
3195
|
-
var
|
|
3196
|
-
return Xd(
|
|
3195
|
+
var F = r.current || A;
|
|
3196
|
+
return Xd(F, y, h, F === "h" ? E : x);
|
|
3197
3197
|
}, []), c = f.useCallback(function(h) {
|
|
3198
|
-
var
|
|
3198
|
+
var y = h;
|
|
3199
3199
|
if (!(!Ct.length || Ct[Ct.length - 1] !== a)) {
|
|
3200
|
-
var k = "deltaY" in
|
|
3201
|
-
return
|
|
3200
|
+
var k = "deltaY" in y ? ea(y) : mn(y), C = t.current.filter(function(A) {
|
|
3201
|
+
return A.name === y.type && (A.target === y.target || y.target === A.shadowParent) && Qd(A.delta, k);
|
|
3202
3202
|
})[0];
|
|
3203
3203
|
if (C && C.should) {
|
|
3204
|
-
|
|
3204
|
+
y.cancelable && y.preventDefault();
|
|
3205
3205
|
return;
|
|
3206
3206
|
}
|
|
3207
3207
|
if (!C) {
|
|
3208
|
-
var E = (s.current.shards || []).map(ta).filter(Boolean).filter(function(
|
|
3209
|
-
return
|
|
3210
|
-
}),
|
|
3211
|
-
|
|
3208
|
+
var E = (s.current.shards || []).map(ta).filter(Boolean).filter(function(A) {
|
|
3209
|
+
return A.contains(y.target);
|
|
3210
|
+
}), x = E.length > 0 ? i(y, E[0]) : !s.current.noIsolation;
|
|
3211
|
+
x && y.cancelable && y.preventDefault();
|
|
3212
3212
|
}
|
|
3213
3213
|
}
|
|
3214
|
-
}, []), l = f.useCallback(function(h,
|
|
3215
|
-
var E = { name: h, delta:
|
|
3214
|
+
}, []), l = f.useCallback(function(h, y, k, C) {
|
|
3215
|
+
var E = { name: h, delta: y, target: k, should: C, shadowParent: tf(k) };
|
|
3216
3216
|
t.current.push(E), setTimeout(function() {
|
|
3217
|
-
t.current = t.current.filter(function(
|
|
3218
|
-
return
|
|
3217
|
+
t.current = t.current.filter(function(x) {
|
|
3218
|
+
return x !== E;
|
|
3219
3219
|
});
|
|
3220
3220
|
}, 1);
|
|
3221
3221
|
}, []), d = f.useCallback(function(h) {
|
|
@@ -3236,11 +3236,11 @@ function ef(e) {
|
|
|
3236
3236
|
}), document.removeEventListener("wheel", c, St), document.removeEventListener("touchmove", c, St), document.removeEventListener("touchstart", d, St);
|
|
3237
3237
|
};
|
|
3238
3238
|
}, []);
|
|
3239
|
-
var p = e.removeScrollBar,
|
|
3239
|
+
var p = e.removeScrollBar, v = e.inert;
|
|
3240
3240
|
return f.createElement(
|
|
3241
3241
|
f.Fragment,
|
|
3242
3242
|
null,
|
|
3243
|
-
|
|
3243
|
+
v ? f.createElement(a, { styles: Zd(o) }) : null,
|
|
3244
3244
|
p ? f.createElement(Ud, { noRelative: e.noRelative, gapMode: e.gapMode }) : null
|
|
3245
3245
|
);
|
|
3246
3246
|
}
|
|
@@ -3272,35 +3272,35 @@ var rf = [" ", "Enter", "ArrowUp", "ArrowDown"], of = [" ", "Enter"], mt = "Sele
|
|
|
3272
3272
|
autoComplete: m,
|
|
3273
3273
|
disabled: g,
|
|
3274
3274
|
required: p,
|
|
3275
|
-
form:
|
|
3276
|
-
} = e, h = Hn(t), [
|
|
3275
|
+
form: v
|
|
3276
|
+
} = e, h = Hn(t), [y, k] = f.useState(null), [C, E] = f.useState(null), [x, A] = f.useState(!1), I = qr(l), [_, P] = Xt({
|
|
3277
3277
|
prop: r,
|
|
3278
3278
|
defaultProp: o ?? !1,
|
|
3279
3279
|
onChange: a,
|
|
3280
3280
|
caller: mt
|
|
3281
|
-
}), [
|
|
3281
|
+
}), [F, V] = Xt({
|
|
3282
3282
|
prop: s,
|
|
3283
3283
|
defaultProp: i,
|
|
3284
3284
|
onChange: c,
|
|
3285
3285
|
caller: mt
|
|
3286
|
-
}), H = f.useRef(null), G =
|
|
3287
|
-
return /* @__PURE__ */ u(is, { ...h, children: /* @__PURE__ */
|
|
3286
|
+
}), H = f.useRef(null), G = y ? v || !!y.closest("form") : !0, [w, T] = f.useState(/* @__PURE__ */ new Set()), R = Array.from(w).map((O) => O.props.value).join(";");
|
|
3287
|
+
return /* @__PURE__ */ u(is, { ...h, children: /* @__PURE__ */ D(
|
|
3288
3288
|
sf,
|
|
3289
3289
|
{
|
|
3290
3290
|
required: p,
|
|
3291
3291
|
scope: t,
|
|
3292
|
-
trigger:
|
|
3292
|
+
trigger: y,
|
|
3293
3293
|
onTriggerChange: k,
|
|
3294
3294
|
valueNode: C,
|
|
3295
3295
|
onValueNodeChange: E,
|
|
3296
|
-
valueNodeHasChildren:
|
|
3297
|
-
onValueNodeHasChildrenChange:
|
|
3296
|
+
valueNodeHasChildren: x,
|
|
3297
|
+
onValueNodeHasChildrenChange: A,
|
|
3298
3298
|
contentId: Zt(),
|
|
3299
|
-
value:
|
|
3299
|
+
value: F,
|
|
3300
3300
|
onValueChange: V,
|
|
3301
3301
|
open: _,
|
|
3302
3302
|
onOpenChange: P,
|
|
3303
|
-
dir:
|
|
3303
|
+
dir: I,
|
|
3304
3304
|
triggerPointerDownPosRef: H,
|
|
3305
3305
|
disabled: g,
|
|
3306
3306
|
children: [
|
|
@@ -3309,18 +3309,18 @@ var rf = [" ", "Enter", "ArrowUp", "ArrowDown"], of = [" ", "Enter"], mt = "Sele
|
|
|
3309
3309
|
{
|
|
3310
3310
|
scope: e.__scopeSelect,
|
|
3311
3311
|
onNativeOptionAdd: f.useCallback((O) => {
|
|
3312
|
-
|
|
3312
|
+
T((N) => new Set(N).add(O));
|
|
3313
3313
|
}, []),
|
|
3314
3314
|
onNativeOptionRemove: f.useCallback((O) => {
|
|
3315
|
-
|
|
3316
|
-
const S = new Set(
|
|
3315
|
+
T((N) => {
|
|
3316
|
+
const S = new Set(N);
|
|
3317
3317
|
return S.delete(O), S;
|
|
3318
3318
|
});
|
|
3319
3319
|
}, []),
|
|
3320
3320
|
children: n
|
|
3321
3321
|
}
|
|
3322
3322
|
) }),
|
|
3323
|
-
G ? /* @__PURE__ */
|
|
3323
|
+
G ? /* @__PURE__ */ D(
|
|
3324
3324
|
Vs,
|
|
3325
3325
|
{
|
|
3326
3326
|
"aria-hidden": !0,
|
|
@@ -3328,13 +3328,13 @@ var rf = [" ", "Enter", "ArrowUp", "ArrowDown"], of = [" ", "Enter"], mt = "Sele
|
|
|
3328
3328
|
tabIndex: -1,
|
|
3329
3329
|
name: d,
|
|
3330
3330
|
autoComplete: m,
|
|
3331
|
-
value:
|
|
3331
|
+
value: F,
|
|
3332
3332
|
onChange: (O) => V(O.target.value),
|
|
3333
3333
|
disabled: g,
|
|
3334
|
-
form:
|
|
3334
|
+
form: v,
|
|
3335
3335
|
children: [
|
|
3336
|
-
|
|
3337
|
-
Array.from(
|
|
3336
|
+
F === void 0 ? /* @__PURE__ */ u("option", { value: "" }) : null,
|
|
3337
|
+
Array.from(w)
|
|
3338
3338
|
]
|
|
3339
3339
|
},
|
|
3340
3340
|
R
|
|
@@ -3347,9 +3347,9 @@ xs.displayName = mt;
|
|
|
3347
3347
|
var Ss = "SelectTrigger", Cs = f.forwardRef(
|
|
3348
3348
|
(e, t) => {
|
|
3349
3349
|
const { __scopeSelect: n, disabled: r = !1, ...o } = e, a = Hn(n), s = ot(Ss, n), i = s.disabled || r, c = ie(t, s.onTriggerChange), l = Bn(n), d = f.useRef("touch"), [m, g, p] = Ys((h) => {
|
|
3350
|
-
const
|
|
3350
|
+
const y = l().filter((E) => !E.disabled), k = y.find((E) => E.value === s.value), C = qs(y, h, k);
|
|
3351
3351
|
C !== void 0 && s.onValueChange(C.value);
|
|
3352
|
-
}),
|
|
3352
|
+
}), v = (h) => {
|
|
3353
3353
|
i || (s.onOpenChange(!0), p()), h && (s.triggerPointerDownPosRef.current = {
|
|
3354
3354
|
x: Math.round(h.pageX),
|
|
3355
3355
|
y: Math.round(h.pageY)
|
|
@@ -3372,16 +3372,16 @@ var Ss = "SelectTrigger", Cs = f.forwardRef(
|
|
|
3372
3372
|
...o,
|
|
3373
3373
|
ref: c,
|
|
3374
3374
|
onClick: Z(o.onClick, (h) => {
|
|
3375
|
-
h.currentTarget.focus(), d.current !== "mouse" &&
|
|
3375
|
+
h.currentTarget.focus(), d.current !== "mouse" && v(h);
|
|
3376
3376
|
}),
|
|
3377
3377
|
onPointerDown: Z(o.onPointerDown, (h) => {
|
|
3378
3378
|
d.current = h.pointerType;
|
|
3379
|
-
const
|
|
3380
|
-
|
|
3379
|
+
const y = h.target;
|
|
3380
|
+
y.hasPointerCapture(h.pointerId) && y.releasePointerCapture(h.pointerId), h.button === 0 && h.ctrlKey === !1 && h.pointerType === "mouse" && (v(h), h.preventDefault());
|
|
3381
3381
|
}),
|
|
3382
3382
|
onKeyDown: Z(o.onKeyDown, (h) => {
|
|
3383
|
-
const
|
|
3384
|
-
!(h.ctrlKey || h.altKey || h.metaKey) && h.key.length === 1 && g(h.key), !(
|
|
3383
|
+
const y = m.current !== "";
|
|
3384
|
+
!(h.ctrlKey || h.altKey || h.metaKey) && h.key.length === 1 && g(h.key), !(y && h.key === " ") && rf.includes(h.key) && (v(), h.preventDefault());
|
|
3385
3385
|
})
|
|
3386
3386
|
}
|
|
3387
3387
|
) });
|
|
@@ -3447,14 +3447,14 @@ var Oe = 10, [Ps, at] = Mt(pt), ff = "SelectContentImpl", mf = /* @__PURE__ */ C
|
|
|
3447
3447
|
arrowPadding: m,
|
|
3448
3448
|
collisionBoundary: g,
|
|
3449
3449
|
collisionPadding: p,
|
|
3450
|
-
sticky:
|
|
3450
|
+
sticky: v,
|
|
3451
3451
|
hideWhenDetached: h,
|
|
3452
|
-
avoidCollisions:
|
|
3452
|
+
avoidCollisions: y,
|
|
3453
3453
|
//
|
|
3454
3454
|
...k
|
|
3455
|
-
} = e, C = ot(pt, n), [E,
|
|
3455
|
+
} = e, C = ot(pt, n), [E, x] = f.useState(null), [A, I] = f.useState(null), _ = ie(t, (L) => x(L)), [P, F] = f.useState(null), [V, H] = f.useState(
|
|
3456
3456
|
null
|
|
3457
|
-
), G = Bn(n), [
|
|
3457
|
+
), G = Bn(n), [w, T] = f.useState(!1), R = f.useRef(!1);
|
|
3458
3458
|
f.useEffect(() => {
|
|
3459
3459
|
if (E) return ms(E);
|
|
3460
3460
|
}, [E]), La();
|
|
@@ -3462,33 +3462,33 @@ var Oe = 10, [Ps, at] = Mt(pt), ff = "SelectContentImpl", mf = /* @__PURE__ */ C
|
|
|
3462
3462
|
(L) => {
|
|
3463
3463
|
const [te, ...ce] = G().map((oe) => oe.ref.current), [Q] = ce.slice(-1), ne = document.activeElement;
|
|
3464
3464
|
for (const oe of L)
|
|
3465
|
-
if (oe === ne || (oe?.scrollIntoView({ block: "nearest" }), oe === te &&
|
|
3465
|
+
if (oe === ne || (oe?.scrollIntoView({ block: "nearest" }), oe === te && A && (A.scrollTop = 0), oe === Q && A && (A.scrollTop = A.scrollHeight), oe?.focus(), document.activeElement !== ne)) return;
|
|
3466
3466
|
},
|
|
3467
|
-
[G,
|
|
3468
|
-
),
|
|
3467
|
+
[G, A]
|
|
3468
|
+
), N = f.useCallback(
|
|
3469
3469
|
() => O([P, E]),
|
|
3470
3470
|
[O, P, E]
|
|
3471
3471
|
);
|
|
3472
3472
|
f.useEffect(() => {
|
|
3473
|
-
|
|
3474
|
-
}, [
|
|
3475
|
-
const { onOpenChange: S, triggerPointerDownPosRef:
|
|
3473
|
+
w && N();
|
|
3474
|
+
}, [w, N]);
|
|
3475
|
+
const { onOpenChange: S, triggerPointerDownPosRef: z } = C;
|
|
3476
3476
|
f.useEffect(() => {
|
|
3477
3477
|
if (E) {
|
|
3478
3478
|
let L = { x: 0, y: 0 };
|
|
3479
3479
|
const te = (Q) => {
|
|
3480
3480
|
L = {
|
|
3481
|
-
x: Math.abs(Math.round(Q.pageX) - (
|
|
3482
|
-
y: Math.abs(Math.round(Q.pageY) - (
|
|
3481
|
+
x: Math.abs(Math.round(Q.pageX) - (z.current?.x ?? 0)),
|
|
3482
|
+
y: Math.abs(Math.round(Q.pageY) - (z.current?.y ?? 0))
|
|
3483
3483
|
};
|
|
3484
3484
|
}, ce = (Q) => {
|
|
3485
|
-
L.x <= 10 && L.y <= 10 ? Q.preventDefault() : E.contains(Q.target) || S(!1), document.removeEventListener("pointermove", te),
|
|
3485
|
+
L.x <= 10 && L.y <= 10 ? Q.preventDefault() : E.contains(Q.target) || S(!1), document.removeEventListener("pointermove", te), z.current = null;
|
|
3486
3486
|
};
|
|
3487
|
-
return
|
|
3487
|
+
return z.current !== null && (document.addEventListener("pointermove", te), document.addEventListener("pointerup", ce, { capture: !0, once: !0 })), () => {
|
|
3488
3488
|
document.removeEventListener("pointermove", te), document.removeEventListener("pointerup", ce, { capture: !0 });
|
|
3489
3489
|
};
|
|
3490
3490
|
}
|
|
3491
|
-
}, [E, S,
|
|
3491
|
+
}, [E, S, z]), f.useEffect(() => {
|
|
3492
3492
|
const L = () => S(!1);
|
|
3493
3493
|
return window.addEventListener("blur", L), window.addEventListener("resize", L), () => {
|
|
3494
3494
|
window.removeEventListener("blur", L), window.removeEventListener("resize", L);
|
|
@@ -3500,7 +3500,7 @@ var Oe = 10, [Ps, at] = Mt(pt), ff = "SelectContentImpl", mf = /* @__PURE__ */ C
|
|
|
3500
3500
|
}), ve = f.useCallback(
|
|
3501
3501
|
(L, te, ce) => {
|
|
3502
3502
|
const Q = !R.current && !ce;
|
|
3503
|
-
(C.value !== void 0 && C.value === te || Q) && (
|
|
3503
|
+
(C.value !== void 0 && C.value === te || Q) && (F(L), Q && (R.current = !0));
|
|
3504
3504
|
},
|
|
3505
3505
|
[C.value]
|
|
3506
3506
|
), q = f.useCallback(() => E?.focus(), [E]), ee = f.useCallback(
|
|
@@ -3509,7 +3509,7 @@ var Oe = 10, [Ps, at] = Mt(pt), ff = "SelectContentImpl", mf = /* @__PURE__ */ C
|
|
|
3509
3509
|
(C.value !== void 0 && C.value === te || Q) && H(L);
|
|
3510
3510
|
},
|
|
3511
3511
|
[C.value]
|
|
3512
|
-
), J = r === "popper" ?
|
|
3512
|
+
), J = r === "popper" ? Dr : Os, he = J === Dr ? {
|
|
3513
3513
|
side: i,
|
|
3514
3514
|
sideOffset: c,
|
|
3515
3515
|
align: l,
|
|
@@ -3517,25 +3517,25 @@ var Oe = 10, [Ps, at] = Mt(pt), ff = "SelectContentImpl", mf = /* @__PURE__ */ C
|
|
|
3517
3517
|
arrowPadding: m,
|
|
3518
3518
|
collisionBoundary: g,
|
|
3519
3519
|
collisionPadding: p,
|
|
3520
|
-
sticky:
|
|
3520
|
+
sticky: v,
|
|
3521
3521
|
hideWhenDetached: h,
|
|
3522
|
-
avoidCollisions:
|
|
3522
|
+
avoidCollisions: y
|
|
3523
3523
|
} : {};
|
|
3524
3524
|
return /* @__PURE__ */ u(
|
|
3525
3525
|
Ps,
|
|
3526
3526
|
{
|
|
3527
3527
|
scope: n,
|
|
3528
3528
|
content: E,
|
|
3529
|
-
viewport:
|
|
3530
|
-
onViewportChange:
|
|
3529
|
+
viewport: A,
|
|
3530
|
+
onViewportChange: I,
|
|
3531
3531
|
itemRefCallback: ve,
|
|
3532
3532
|
selectedItem: P,
|
|
3533
3533
|
onItemLeave: q,
|
|
3534
3534
|
itemTextRefCallback: ee,
|
|
3535
|
-
focusSelectedItem:
|
|
3535
|
+
focusSelectedItem: N,
|
|
3536
3536
|
selectedItemText: V,
|
|
3537
3537
|
position: r,
|
|
3538
|
-
isPositioned:
|
|
3538
|
+
isPositioned: w,
|
|
3539
3539
|
searchRef: Y,
|
|
3540
3540
|
children: /* @__PURE__ */ u(io, { as: mf, allowPinchZoom: !0, children: /* @__PURE__ */ u(
|
|
3541
3541
|
Xr,
|
|
@@ -3567,7 +3567,7 @@ var Oe = 10, [Ps, at] = Mt(pt), ff = "SelectContentImpl", mf = /* @__PURE__ */ C
|
|
|
3567
3567
|
onContextMenu: (L) => L.preventDefault(),
|
|
3568
3568
|
...k,
|
|
3569
3569
|
...he,
|
|
3570
|
-
onPlaced: () =>
|
|
3570
|
+
onPlaced: () => T(!0),
|
|
3571
3571
|
ref: _,
|
|
3572
3572
|
style: {
|
|
3573
3573
|
// flex layout so we can place the scroll buttons properly
|
|
@@ -3600,11 +3600,11 @@ var Oe = 10, [Ps, at] = Mt(pt), ff = "SelectContentImpl", mf = /* @__PURE__ */ C
|
|
|
3600
3600
|
);
|
|
3601
3601
|
Rs.displayName = ff;
|
|
3602
3602
|
var pf = "SelectItemAlignedPosition", Os = f.forwardRef((e, t) => {
|
|
3603
|
-
const { __scopeSelect: n, onPlaced: r, ...o } = e, a = ot(pt, n), s = at(pt, n), [i, c] = f.useState(null), [l, d] = f.useState(null), m = ie(t, (_) => d(_)), g = Bn(n), p = f.useRef(!1),
|
|
3604
|
-
if (a.trigger && a.valueNode && i && l && h &&
|
|
3605
|
-
const _ = a.trigger.getBoundingClientRect(), P = l.getBoundingClientRect(),
|
|
3603
|
+
const { __scopeSelect: n, onPlaced: r, ...o } = e, a = ot(pt, n), s = at(pt, n), [i, c] = f.useState(null), [l, d] = f.useState(null), m = ie(t, (_) => d(_)), g = Bn(n), p = f.useRef(!1), v = f.useRef(!0), { viewport: h, selectedItem: y, selectedItemText: k, focusSelectedItem: C } = s, E = f.useCallback(() => {
|
|
3604
|
+
if (a.trigger && a.valueNode && i && l && h && y && k) {
|
|
3605
|
+
const _ = a.trigger.getBoundingClientRect(), P = l.getBoundingClientRect(), F = a.valueNode.getBoundingClientRect(), V = k.getBoundingClientRect();
|
|
3606
3606
|
if (a.dir !== "rtl") {
|
|
3607
|
-
const ne = V.left - P.left, oe =
|
|
3607
|
+
const ne = V.left - P.left, oe = F.left - ne, de = _.left - oe, Ne = _.width + de, Re = Math.max(Ne, P.width), it = window.innerWidth - Oe, ct = Oo(oe, [
|
|
3608
3608
|
Oe,
|
|
3609
3609
|
// Prevents the content from going off the starting edge of the
|
|
3610
3610
|
// viewport. It may still go off the ending edge, but this can be
|
|
@@ -3615,24 +3615,24 @@ var pf = "SelectItemAlignedPosition", Os = f.forwardRef((e, t) => {
|
|
|
3615
3615
|
]);
|
|
3616
3616
|
i.style.minWidth = Ne + "px", i.style.left = ct + "px";
|
|
3617
3617
|
} else {
|
|
3618
|
-
const ne = P.right - V.right, oe = window.innerWidth -
|
|
3618
|
+
const ne = P.right - V.right, oe = window.innerWidth - F.right - ne, de = window.innerWidth - _.right - oe, Ne = _.width + de, Re = Math.max(Ne, P.width), it = window.innerWidth - Oe, ct = Oo(oe, [
|
|
3619
3619
|
Oe,
|
|
3620
3620
|
Math.max(Oe, it - Re)
|
|
3621
3621
|
]);
|
|
3622
3622
|
i.style.minWidth = Ne + "px", i.style.right = ct + "px";
|
|
3623
3623
|
}
|
|
3624
|
-
const H = g(), G = window.innerHeight - Oe * 2,
|
|
3624
|
+
const H = g(), G = window.innerHeight - Oe * 2, w = h.scrollHeight, T = window.getComputedStyle(l), R = parseInt(T.borderTopWidth, 10), O = parseInt(T.paddingTop, 10), N = parseInt(T.borderBottomWidth, 10), S = parseInt(T.paddingBottom, 10), z = R + O + w + S + N, Y = Math.min(y.offsetHeight * 5, z), j = window.getComputedStyle(h), ve = parseInt(j.paddingTop, 10), q = parseInt(j.paddingBottom, 10), ee = _.top + _.height / 2 - Oe, J = G - ee, he = y.offsetHeight / 2, L = y.offsetTop + he, te = R + O + L, ce = z - te;
|
|
3625
3625
|
if (te <= ee) {
|
|
3626
|
-
const ne = H.length > 0 &&
|
|
3626
|
+
const ne = H.length > 0 && y === H[H.length - 1].ref.current;
|
|
3627
3627
|
i.style.bottom = "0px";
|
|
3628
3628
|
const oe = l.clientHeight - h.offsetTop - h.offsetHeight, de = Math.max(
|
|
3629
3629
|
J,
|
|
3630
3630
|
he + // viewport might have padding bottom, include it to avoid a scrollable viewport
|
|
3631
|
-
(ne ? q : 0) + oe +
|
|
3631
|
+
(ne ? q : 0) + oe + N
|
|
3632
3632
|
), Ne = te + de;
|
|
3633
3633
|
i.style.height = Ne + "px";
|
|
3634
3634
|
} else {
|
|
3635
|
-
const ne = H.length > 0 &&
|
|
3635
|
+
const ne = H.length > 0 && y === H[0].ref.current;
|
|
3636
3636
|
i.style.top = "0px";
|
|
3637
3637
|
const de = Math.max(
|
|
3638
3638
|
ee,
|
|
@@ -3650,19 +3650,19 @@ var pf = "SelectItemAlignedPosition", Os = f.forwardRef((e, t) => {
|
|
|
3650
3650
|
i,
|
|
3651
3651
|
l,
|
|
3652
3652
|
h,
|
|
3653
|
-
|
|
3653
|
+
y,
|
|
3654
3654
|
k,
|
|
3655
3655
|
a.dir,
|
|
3656
3656
|
r
|
|
3657
3657
|
]);
|
|
3658
3658
|
be(() => E(), [E]);
|
|
3659
|
-
const [
|
|
3659
|
+
const [x, A] = f.useState();
|
|
3660
3660
|
be(() => {
|
|
3661
|
-
l &&
|
|
3661
|
+
l && A(window.getComputedStyle(l).zIndex);
|
|
3662
3662
|
}, [l]);
|
|
3663
|
-
const
|
|
3663
|
+
const I = f.useCallback(
|
|
3664
3664
|
(_) => {
|
|
3665
|
-
_ &&
|
|
3665
|
+
_ && v.current === !0 && (E(), C?.(), v.current = !1);
|
|
3666
3666
|
},
|
|
3667
3667
|
[E, C]
|
|
3668
3668
|
);
|
|
@@ -3672,7 +3672,7 @@ var pf = "SelectItemAlignedPosition", Os = f.forwardRef((e, t) => {
|
|
|
3672
3672
|
scope: n,
|
|
3673
3673
|
contentWrapper: i,
|
|
3674
3674
|
shouldExpandOnScrollRef: p,
|
|
3675
|
-
onScrollButtonChange:
|
|
3675
|
+
onScrollButtonChange: I,
|
|
3676
3676
|
children: /* @__PURE__ */ u(
|
|
3677
3677
|
"div",
|
|
3678
3678
|
{
|
|
@@ -3681,7 +3681,7 @@ var pf = "SelectItemAlignedPosition", Os = f.forwardRef((e, t) => {
|
|
|
3681
3681
|
display: "flex",
|
|
3682
3682
|
flexDirection: "column",
|
|
3683
3683
|
position: "fixed",
|
|
3684
|
-
zIndex:
|
|
3684
|
+
zIndex: x
|
|
3685
3685
|
},
|
|
3686
3686
|
children: /* @__PURE__ */ u(
|
|
3687
3687
|
Ae.div,
|
|
@@ -3704,7 +3704,7 @@ var pf = "SelectItemAlignedPosition", Os = f.forwardRef((e, t) => {
|
|
|
3704
3704
|
);
|
|
3705
3705
|
});
|
|
3706
3706
|
Os.displayName = pf;
|
|
3707
|
-
var hf = "SelectPopperPosition",
|
|
3707
|
+
var hf = "SelectPopperPosition", Dr = f.forwardRef((e, t) => {
|
|
3708
3708
|
const {
|
|
3709
3709
|
__scopeSelect: n,
|
|
3710
3710
|
align: r = "start",
|
|
@@ -3732,11 +3732,11 @@ var hf = "SelectPopperPosition", Ir = f.forwardRef((e, t) => {
|
|
|
3732
3732
|
}
|
|
3733
3733
|
);
|
|
3734
3734
|
});
|
|
3735
|
-
|
|
3736
|
-
var [gf, co] = Mt(pt, {}),
|
|
3735
|
+
Dr.displayName = hf;
|
|
3736
|
+
var [gf, co] = Mt(pt, {}), Ir = "SelectViewport", _s = f.forwardRef(
|
|
3737
3737
|
(e, t) => {
|
|
3738
|
-
const { __scopeSelect: n, nonce: r, ...o } = e, a = at(
|
|
3739
|
-
return /* @__PURE__ */
|
|
3738
|
+
const { __scopeSelect: n, nonce: r, ...o } = e, a = at(Ir, n), s = co(Ir, n), i = ie(t, a.onViewportChange), c = f.useRef(0);
|
|
3739
|
+
return /* @__PURE__ */ D(Rt, { children: [
|
|
3740
3740
|
/* @__PURE__ */ u(
|
|
3741
3741
|
"style",
|
|
3742
3742
|
{
|
|
@@ -3771,10 +3771,10 @@ var [gf, co] = Mt(pt, {}), Dr = "SelectViewport", _s = f.forwardRef(
|
|
|
3771
3771
|
if (g?.current && m) {
|
|
3772
3772
|
const p = Math.abs(c.current - d.scrollTop);
|
|
3773
3773
|
if (p > 0) {
|
|
3774
|
-
const
|
|
3775
|
-
if (k <
|
|
3776
|
-
const C = k + p, E = Math.min(
|
|
3777
|
-
m.style.height = E + "px", m.style.bottom === "0px" && (d.scrollTop =
|
|
3774
|
+
const v = window.innerHeight - Oe * 2, h = parseFloat(m.style.minHeight), y = parseFloat(m.style.height), k = Math.max(h, y);
|
|
3775
|
+
if (k < v) {
|
|
3776
|
+
const C = k + p, E = Math.min(v, C), x = C - E;
|
|
3777
|
+
m.style.height = E + "px", m.style.bottom === "0px" && (d.scrollTop = x > 0 ? x : 0, m.style.justifyContent = "flex-end");
|
|
3778
3778
|
}
|
|
3779
3779
|
}
|
|
3780
3780
|
}
|
|
@@ -3785,21 +3785,21 @@ var [gf, co] = Mt(pt, {}), Dr = "SelectViewport", _s = f.forwardRef(
|
|
|
3785
3785
|
] });
|
|
3786
3786
|
}
|
|
3787
3787
|
);
|
|
3788
|
-
_s.displayName =
|
|
3789
|
-
var Ms = "SelectGroup", [bf, vf] = Mt(Ms),
|
|
3788
|
+
_s.displayName = Ir;
|
|
3789
|
+
var Ms = "SelectGroup", [bf, vf] = Mt(Ms), Ds = f.forwardRef(
|
|
3790
3790
|
(e, t) => {
|
|
3791
3791
|
const { __scopeSelect: n, ...r } = e, o = Zt();
|
|
3792
3792
|
return /* @__PURE__ */ u(bf, { scope: n, id: o, children: /* @__PURE__ */ u(Ae.div, { role: "group", "aria-labelledby": o, ...r, ref: t }) });
|
|
3793
3793
|
}
|
|
3794
3794
|
);
|
|
3795
|
-
|
|
3796
|
-
var
|
|
3795
|
+
Ds.displayName = Ms;
|
|
3796
|
+
var Is = "SelectLabel", Ls = f.forwardRef(
|
|
3797
3797
|
(e, t) => {
|
|
3798
|
-
const { __scopeSelect: n, ...r } = e, o = vf(
|
|
3798
|
+
const { __scopeSelect: n, ...r } = e, o = vf(Is, n);
|
|
3799
3799
|
return /* @__PURE__ */ u(Ae.div, { id: o.id, ...r, ref: t });
|
|
3800
3800
|
}
|
|
3801
3801
|
);
|
|
3802
|
-
Ls.displayName =
|
|
3802
|
+
Ls.displayName = Is;
|
|
3803
3803
|
var Tn = "SelectItem", [yf, Fs] = Mt(Tn), $s = f.forwardRef(
|
|
3804
3804
|
(e, t) => {
|
|
3805
3805
|
const {
|
|
@@ -3808,10 +3808,10 @@ var Tn = "SelectItem", [yf, Fs] = Mt(Tn), $s = f.forwardRef(
|
|
|
3808
3808
|
disabled: o = !1,
|
|
3809
3809
|
textValue: a,
|
|
3810
3810
|
...s
|
|
3811
|
-
} = e, i = ot(Tn, n), c = at(Tn, n), l = i.value === r, [d, m] = f.useState(a ?? ""), [g, p] = f.useState(!1),
|
|
3811
|
+
} = e, i = ot(Tn, n), c = at(Tn, n), l = i.value === r, [d, m] = f.useState(a ?? ""), [g, p] = f.useState(!1), v = ie(
|
|
3812
3812
|
t,
|
|
3813
3813
|
(C) => c.itemRefCallback?.(C, r, o)
|
|
3814
|
-
), h = Zt(),
|
|
3814
|
+
), h = Zt(), y = f.useRef("touch"), k = () => {
|
|
3815
3815
|
o || (i.onValueChange(r), i.onOpenChange(!1));
|
|
3816
3816
|
};
|
|
3817
3817
|
if (r === "")
|
|
@@ -3848,20 +3848,20 @@ var Tn = "SelectItem", [yf, Fs] = Mt(Tn), $s = f.forwardRef(
|
|
|
3848
3848
|
"data-disabled": o ? "" : void 0,
|
|
3849
3849
|
tabIndex: o ? void 0 : -1,
|
|
3850
3850
|
...s,
|
|
3851
|
-
ref:
|
|
3851
|
+
ref: v,
|
|
3852
3852
|
onFocus: Z(s.onFocus, () => p(!0)),
|
|
3853
3853
|
onBlur: Z(s.onBlur, () => p(!1)),
|
|
3854
3854
|
onClick: Z(s.onClick, () => {
|
|
3855
|
-
|
|
3855
|
+
y.current !== "mouse" && k();
|
|
3856
3856
|
}),
|
|
3857
3857
|
onPointerUp: Z(s.onPointerUp, () => {
|
|
3858
|
-
|
|
3858
|
+
y.current === "mouse" && k();
|
|
3859
3859
|
}),
|
|
3860
3860
|
onPointerDown: Z(s.onPointerDown, (C) => {
|
|
3861
|
-
|
|
3861
|
+
y.current = C.pointerType;
|
|
3862
3862
|
}),
|
|
3863
3863
|
onPointerMove: Z(s.onPointerMove, (C) => {
|
|
3864
|
-
|
|
3864
|
+
y.current = C.pointerType, o ? c.onItemLeave?.() : y.current === "mouse" && C.currentTarget.focus({ preventScroll: !0 });
|
|
3865
3865
|
}),
|
|
3866
3866
|
onPointerLeave: Z(s.onPointerLeave, (C) => {
|
|
3867
3867
|
C.currentTarget === document.activeElement && c.onItemLeave?.();
|
|
@@ -3885,11 +3885,11 @@ var Gt = "SelectItemText", Ws = f.forwardRef(
|
|
|
3885
3885
|
(k) => m(k),
|
|
3886
3886
|
c.onItemTextChange,
|
|
3887
3887
|
(k) => i.itemTextRefCallback?.(k, c.value, c.disabled)
|
|
3888
|
-
), p = d?.textContent,
|
|
3888
|
+
), p = d?.textContent, v = f.useMemo(
|
|
3889
3889
|
() => /* @__PURE__ */ u("option", { value: c.value, disabled: c.disabled, children: p }, c.value),
|
|
3890
3890
|
[c.disabled, c.value, p]
|
|
3891
|
-
), { onNativeOptionAdd: h, onNativeOptionRemove:
|
|
3892
|
-
return be(() => (h(
|
|
3891
|
+
), { onNativeOptionAdd: h, onNativeOptionRemove: y } = l;
|
|
3892
|
+
return be(() => (h(v), () => y(v)), [h, y, v]), /* @__PURE__ */ D(Rt, { children: [
|
|
3893
3893
|
/* @__PURE__ */ u(Ae.span, { id: c.textId, ...a, ref: g }),
|
|
3894
3894
|
c.isSelected && s.valueNode && !s.valueNodeHasChildren ? _n.createPortal(a.children, s.valueNode) : null
|
|
3895
3895
|
] });
|
|
@@ -4044,7 +4044,7 @@ function qs(e, t, n) {
|
|
|
4044
4044
|
function Ef(e, t) {
|
|
4045
4045
|
return e.map((n, r) => e[(t + r) % e.length]);
|
|
4046
4046
|
}
|
|
4047
|
-
var kf = xs, Af = Cs, Nf = ks, Tf = As, Pf = Ns, Rf = Ts, Of = _s, _f =
|
|
4047
|
+
var kf = xs, Af = Cs, Nf = ks, Tf = As, Pf = Ns, Rf = Ts, Of = _s, _f = Ds, Mf = Ls, Df = $s, If = Ws, Lf = Bs, Ff = Us, na = js;
|
|
4048
4048
|
function $f({ field: e, formValues: t, handleChange: n, handleBlur: r, error: o, apiClient: a }) {
|
|
4049
4049
|
const s = t[e.name] || "", i = typeof e.disabled == "function" ? e.disabled(t) : e.disabled, [c, l] = le(e.options || []), [d, m] = le(!1);
|
|
4050
4050
|
return qe(() => {
|
|
@@ -4055,16 +4055,16 @@ function $f({ field: e, formValues: t, handleChange: n, handleBlur: r, error: o,
|
|
|
4055
4055
|
}
|
|
4056
4056
|
m(!0);
|
|
4057
4057
|
try {
|
|
4058
|
-
let p = e.optionsUrl,
|
|
4058
|
+
let p = e.optionsUrl, v = {};
|
|
4059
4059
|
if (e.queryParams) {
|
|
4060
4060
|
const E = typeof e.queryParams == "function" ? e.queryParams(t) : e.queryParams;
|
|
4061
|
-
typeof E == "string" ? p += E.startsWith("?") ? E : `?${E}` :
|
|
4061
|
+
typeof E == "string" ? p += E.startsWith("?") ? E : `?${E}` : v = { params: E };
|
|
4062
4062
|
}
|
|
4063
|
-
const h = await a(p,
|
|
4063
|
+
const h = await a(p, v), y = h.data || h, C = (Array.isArray(y) ? y : []).map((E) => ({
|
|
4064
4064
|
value: E[e.valueId || "key"] || E.key,
|
|
4065
4065
|
label: E[e.labelId || "value"] || E.value
|
|
4066
4066
|
}));
|
|
4067
|
-
l(C);
|
|
4067
|
+
l(C), e.name + "_count" in t && (console.log("Updating count for", e.name, "to", C.length), n(e.name + "_count", C.length));
|
|
4068
4068
|
} catch (p) {
|
|
4069
4069
|
console.error("Failed to load options for SelectField:", p), l(e.options || []);
|
|
4070
4070
|
} finally {
|
|
@@ -4080,15 +4080,15 @@ function $f({ field: e, formValues: t, handleChange: n, handleBlur: r, error: o,
|
|
|
4080
4080
|
// Instead of depending directly on field.queryParams (which triggers nothing when formValues change),
|
|
4081
4081
|
// stringify the evaluated params so it refetches ONLY when the inputs of the API call change.
|
|
4082
4082
|
JSON.stringify(typeof e.queryParams == "function" ? e.queryParams(t) : e.queryParams)
|
|
4083
|
-
]), /* @__PURE__ */
|
|
4084
|
-
/* @__PURE__ */
|
|
4083
|
+
]), /* @__PURE__ */ D(Rt, { children: [
|
|
4084
|
+
/* @__PURE__ */ D(
|
|
4085
4085
|
kf,
|
|
4086
4086
|
{
|
|
4087
4087
|
value: s,
|
|
4088
4088
|
onValueChange: (g) => n(e.name, g),
|
|
4089
4089
|
disabled: i,
|
|
4090
4090
|
children: [
|
|
4091
|
-
/* @__PURE__ */
|
|
4091
|
+
/* @__PURE__ */ D(
|
|
4092
4092
|
Af,
|
|
4093
4093
|
{
|
|
4094
4094
|
id: e.name,
|
|
@@ -4108,7 +4108,7 @@ function $f({ field: e, formValues: t, handleChange: n, handleBlur: r, error: o,
|
|
|
4108
4108
|
]
|
|
4109
4109
|
}
|
|
4110
4110
|
),
|
|
4111
|
-
/* @__PURE__ */ u(Pf, { children: /* @__PURE__ */
|
|
4111
|
+
/* @__PURE__ */ u(Pf, { children: /* @__PURE__ */ D(
|
|
4112
4112
|
Rf,
|
|
4113
4113
|
{
|
|
4114
4114
|
className: "bg-white border border-gray-200 rounded-md shadow-lg z-50 min-w-[var(--radix-select-trigger-width)]",
|
|
@@ -4116,17 +4116,17 @@ function $f({ field: e, formValues: t, handleChange: n, handleBlur: r, error: o,
|
|
|
4116
4116
|
sideOffset: 5,
|
|
4117
4117
|
children: [
|
|
4118
4118
|
/* @__PURE__ */ u(Lf, { className: "flex items-center justify-center h-6 text-gray-500 bg-gray-50", children: /* @__PURE__ */ u(na, { className: "fill-white stroke-gray-200" }) }),
|
|
4119
|
-
/* @__PURE__ */
|
|
4119
|
+
/* @__PURE__ */ D(Of, { className: "p-1", children: [
|
|
4120
4120
|
e.groupLabel && /* @__PURE__ */ u(_f, { children: /* @__PURE__ */ u(Mf, { className: "px-2 py-1 text-xs text-gray-500 uppercase tracking-wide", children: e.groupLabel }) }),
|
|
4121
4121
|
c.map((g) => /* @__PURE__ */ u(
|
|
4122
|
-
|
|
4122
|
+
Df,
|
|
4123
4123
|
{
|
|
4124
4124
|
value: g.value,
|
|
4125
4125
|
className: `relative flex items-center px-3 py-2 text-sm rounded cursor-pointer select-none
|
|
4126
4126
|
data-[state=checked]:bg-blue-50
|
|
4127
4127
|
data-[state=checked]:text-blue-600
|
|
4128
4128
|
`,
|
|
4129
|
-
children: /* @__PURE__ */ u(
|
|
4129
|
+
children: /* @__PURE__ */ u(If, { children: g.label })
|
|
4130
4130
|
},
|
|
4131
4131
|
g.value
|
|
4132
4132
|
)),
|
|
@@ -4183,7 +4183,7 @@ function ra({
|
|
|
4183
4183
|
fileInputRefs: m,
|
|
4184
4184
|
...g
|
|
4185
4185
|
// These are standard HTML/ARIA props (like aria-describedby)
|
|
4186
|
-
} = s, p = a,
|
|
4186
|
+
} = s, p = a, v = g["aria-describedby"];
|
|
4187
4187
|
return /* @__PURE__ */ u(
|
|
4188
4188
|
"input",
|
|
4189
4189
|
{
|
|
@@ -4200,7 +4200,7 @@ function ra({
|
|
|
4200
4200
|
minLength: e.minLength,
|
|
4201
4201
|
maxLength: e.maxLength,
|
|
4202
4202
|
"aria-invalid": !!o,
|
|
4203
|
-
"aria-describedby": o ?
|
|
4203
|
+
"aria-describedby": o ? v : void 0,
|
|
4204
4204
|
className: `
|
|
4205
4205
|
flex h-10 w-full rounded-md border px-3 py-2 text-sm
|
|
4206
4206
|
transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium
|
|
@@ -4230,7 +4230,7 @@ function zf({
|
|
|
4230
4230
|
setCharCounts: d,
|
|
4231
4231
|
fileInputRefs: m,
|
|
4232
4232
|
...g
|
|
4233
|
-
} = s, p = a,
|
|
4233
|
+
} = s, p = a, v = g["aria-describedby"];
|
|
4234
4234
|
return /* @__PURE__ */ u(
|
|
4235
4235
|
"input",
|
|
4236
4236
|
{
|
|
@@ -4248,7 +4248,7 @@ function zf({
|
|
|
4248
4248
|
max: e.max,
|
|
4249
4249
|
step: e.step || "any",
|
|
4250
4250
|
"aria-invalid": !!o,
|
|
4251
|
-
"aria-describedby": o ?
|
|
4251
|
+
"aria-describedby": o ? v : void 0,
|
|
4252
4252
|
className: `
|
|
4253
4253
|
flex h-10 w-full rounded-md border px-3 py-2 text-sm
|
|
4254
4254
|
transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium
|
|
@@ -4429,31 +4429,31 @@ function Zs() {
|
|
|
4429
4429
|
HTMLFormElement: m,
|
|
4430
4430
|
DOMParser: g,
|
|
4431
4431
|
trustedTypes: p
|
|
4432
|
-
} = e,
|
|
4432
|
+
} = e, v = c.prototype, h = Bt(v, "cloneNode"), y = Bt(v, "remove"), k = Bt(v, "nextSibling"), C = Bt(v, "childNodes"), E = Bt(v, "parentNode");
|
|
4433
4433
|
if (typeof s == "function") {
|
|
4434
4434
|
const U = n.createElement("template");
|
|
4435
4435
|
U.content && U.content.ownerDocument && (n = U.content.ownerDocument);
|
|
4436
4436
|
}
|
|
4437
|
-
let
|
|
4437
|
+
let x, A = "";
|
|
4438
4438
|
const {
|
|
4439
|
-
implementation:
|
|
4439
|
+
implementation: I,
|
|
4440
4440
|
createNodeIterator: _,
|
|
4441
4441
|
createDocumentFragment: P,
|
|
4442
|
-
getElementsByTagName:
|
|
4442
|
+
getElementsByTagName: F
|
|
4443
4443
|
} = n, {
|
|
4444
4444
|
importNode: V
|
|
4445
4445
|
} = r;
|
|
4446
4446
|
let H = da();
|
|
4447
|
-
t.isSupported = typeof Ks == "function" && typeof E == "function" &&
|
|
4447
|
+
t.isSupported = typeof Ks == "function" && typeof E == "function" && I && I.createHTMLDocument !== void 0;
|
|
4448
4448
|
const {
|
|
4449
4449
|
MUSTACHE_EXPR: G,
|
|
4450
|
-
ERB_EXPR:
|
|
4451
|
-
TMPLIT_EXPR:
|
|
4450
|
+
ERB_EXPR: w,
|
|
4451
|
+
TMPLIT_EXPR: T,
|
|
4452
4452
|
DATA_ATTR: R,
|
|
4453
4453
|
ARIA_ATTR: O,
|
|
4454
|
-
IS_SCRIPT_OR_DATA:
|
|
4454
|
+
IS_SCRIPT_OR_DATA: N,
|
|
4455
4455
|
ATTR_WHITESPACE: S,
|
|
4456
|
-
CUSTOM_ELEMENT:
|
|
4456
|
+
CUSTOM_ELEMENT: z
|
|
4457
4457
|
} = ua;
|
|
4458
4458
|
let {
|
|
4459
4459
|
IS_ALLOWED_URI: Y
|
|
@@ -4521,9 +4521,9 @@ function Zs() {
|
|
|
4521
4521
|
throw zt('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
|
|
4522
4522
|
if (typeof b.TRUSTED_TYPES_POLICY.createScriptURL != "function")
|
|
4523
4523
|
throw zt('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');
|
|
4524
|
-
|
|
4524
|
+
x = b.TRUSTED_TYPES_POLICY, A = x.createHTML("");
|
|
4525
4525
|
} else
|
|
4526
|
-
|
|
4526
|
+
x === void 0 && (x = im(p, o)), x !== null && typeof A == "string" && (A = x.createHTML(""));
|
|
4527
4527
|
we && we(b), yt = b;
|
|
4528
4528
|
}
|
|
4529
4529
|
}, yo = X({}, [...yr, ...wr, ...Xf]), wo = X({}, [...xr, ...Qf]), tc = function(b) {
|
|
@@ -4541,7 +4541,7 @@ function Zs() {
|
|
|
4541
4541
|
try {
|
|
4542
4542
|
E(b).removeChild(b);
|
|
4543
4543
|
} catch {
|
|
4544
|
-
|
|
4544
|
+
y(b);
|
|
4545
4545
|
}
|
|
4546
4546
|
}, lt = function(b, M) {
|
|
4547
4547
|
try {
|
|
@@ -4575,21 +4575,21 @@ function Zs() {
|
|
|
4575
4575
|
B = ue && ue[0];
|
|
4576
4576
|
}
|
|
4577
4577
|
Ft === "application/xhtml+xml" && vt === je && (b = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + b + "</body></html>");
|
|
4578
|
-
const se =
|
|
4578
|
+
const se = x ? x.createHTML(b) : b;
|
|
4579
4579
|
if (vt === je)
|
|
4580
4580
|
try {
|
|
4581
4581
|
M = new g().parseFromString(se, Ft);
|
|
4582
4582
|
} catch {
|
|
4583
4583
|
}
|
|
4584
4584
|
if (!M || !M.documentElement) {
|
|
4585
|
-
M =
|
|
4585
|
+
M = I.createDocument(vt, "template", null);
|
|
4586
4586
|
try {
|
|
4587
|
-
M.documentElement.innerHTML = tr ?
|
|
4587
|
+
M.documentElement.innerHTML = tr ? A : se;
|
|
4588
4588
|
} catch {
|
|
4589
4589
|
}
|
|
4590
4590
|
}
|
|
4591
4591
|
const ge = M.body || M.documentElement;
|
|
4592
|
-
return b && B && ge.insertBefore(n.createTextNode(B), ge.childNodes[0] || null), vt === je ?
|
|
4592
|
+
return b && B && ge.insertBefore(n.createTextNode(B), ge.childNodes[0] || null), vt === je ? F.call(M, Re ? "html" : "body")[0] : Re ? M.documentElement : ge;
|
|
4593
4593
|
}, So = function(b) {
|
|
4594
4594
|
return _.call(
|
|
4595
4595
|
b.ownerDocument || b,
|
|
@@ -4633,7 +4633,7 @@ function Zs() {
|
|
|
4633
4633
|
}
|
|
4634
4634
|
return Fe(b), !0;
|
|
4635
4635
|
}
|
|
4636
|
-
return b instanceof c && !tc(b) || (B === "noscript" || B === "noembed" || B === "noframes") && ye(/<\/no(script|embed|frames)/i, b.innerHTML) ? (Fe(b), !0) : (de && b.nodeType === Ht.text && (M = b.textContent, pn([G,
|
|
4636
|
+
return b instanceof c && !tc(b) || (B === "noscript" || B === "noembed" || B === "noframes") && ye(/<\/no(script|embed|frames)/i, b.innerHTML) ? (Fe(b), !0) : (de && b.nodeType === Ht.text && (M = b.textContent, pn([G, w, T], (se) => {
|
|
4637
4637
|
M = Wt(M, se, " ");
|
|
4638
4638
|
}), b.textContent !== M && ($t(t.removed, {
|
|
4639
4639
|
element: b.cloneNode()
|
|
@@ -4656,7 +4656,7 @@ function Zs() {
|
|
|
4656
4656
|
} else if (!er[M]) {
|
|
4657
4657
|
if (!ye(Y, Wt(B, S, ""))) {
|
|
4658
4658
|
if (!((M === "src" || M === "xlink:href" || M === "href") && b !== "script" && Gf(B, "data:") === 0 && ho[b])) {
|
|
4659
|
-
if (!(ne && !ye(
|
|
4659
|
+
if (!(ne && !ye(N, Wt(B, S, "")))) {
|
|
4660
4660
|
if (B)
|
|
4661
4661
|
return !1;
|
|
4662
4662
|
}
|
|
@@ -4668,7 +4668,7 @@ function Zs() {
|
|
|
4668
4668
|
}
|
|
4669
4669
|
return !0;
|
|
4670
4670
|
}, Ao = function(b) {
|
|
4671
|
-
return b !== "annotation-xml" && vr(b,
|
|
4671
|
+
return b !== "annotation-xml" && vr(b, z);
|
|
4672
4672
|
}, No = function(b) {
|
|
4673
4673
|
Ve(H.beforeSanitizeAttributes, b, null);
|
|
4674
4674
|
const {
|
|
@@ -4709,7 +4709,7 @@ function Zs() {
|
|
|
4709
4709
|
lt(ue, b);
|
|
4710
4710
|
continue;
|
|
4711
4711
|
}
|
|
4712
|
-
de && pn([G,
|
|
4712
|
+
de && pn([G, w, T], (Po) => {
|
|
4713
4713
|
pe = Wt(pe, Po, " ");
|
|
4714
4714
|
});
|
|
4715
4715
|
const To = fe(b.nodeName);
|
|
@@ -4717,14 +4717,14 @@ function Zs() {
|
|
|
4717
4717
|
lt(ue, b);
|
|
4718
4718
|
continue;
|
|
4719
4719
|
}
|
|
4720
|
-
if (
|
|
4720
|
+
if (x && typeof p == "object" && typeof p.getAttributeType == "function" && !Se)
|
|
4721
4721
|
switch (p.getAttributeType(To, wt)) {
|
|
4722
4722
|
case "TrustedHTML": {
|
|
4723
|
-
pe =
|
|
4723
|
+
pe = x.createHTML(pe);
|
|
4724
4724
|
break;
|
|
4725
4725
|
}
|
|
4726
4726
|
case "TrustedScriptURL": {
|
|
4727
|
-
pe =
|
|
4727
|
+
pe = x.createScriptURL(pe);
|
|
4728
4728
|
break;
|
|
4729
4729
|
}
|
|
4730
4730
|
}
|
|
@@ -4764,9 +4764,9 @@ function Zs() {
|
|
|
4764
4764
|
else {
|
|
4765
4765
|
if (!gt && !de && !Re && // eslint-disable-next-line unicorn/prefer-includes
|
|
4766
4766
|
U.indexOf("<") === -1)
|
|
4767
|
-
return
|
|
4767
|
+
return x && rn ? x.createHTML(U) : U;
|
|
4768
4768
|
if (M = xo(U), !M)
|
|
4769
|
-
return gt ? null : rn ?
|
|
4769
|
+
return gt ? null : rn ? A : "";
|
|
4770
4770
|
}
|
|
4771
4771
|
M && ct && Fe(M.firstChild);
|
|
4772
4772
|
const ue = So(Lt ? U : M);
|
|
@@ -4784,9 +4784,9 @@ function Zs() {
|
|
|
4784
4784
|
}
|
|
4785
4785
|
let Se = Re ? M.outerHTML : M.innerHTML;
|
|
4786
4786
|
return Re && j["!doctype"] && M.ownerDocument && M.ownerDocument.doctype && M.ownerDocument.doctype.name && ye(Qs, M.ownerDocument.doctype.name) && (Se = "<!DOCTYPE " + M.ownerDocument.doctype.name + `>
|
|
4787
|
-
` + Se), de && pn([G,
|
|
4787
|
+
` + Se), de && pn([G, w, T], (Ge) => {
|
|
4788
4788
|
Se = Wt(Se, Ge, " ");
|
|
4789
|
-
}),
|
|
4789
|
+
}), x && rn ? x.createHTML(Se) : Se;
|
|
4790
4790
|
}, t.setConfig = function() {
|
|
4791
4791
|
let U = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
4792
4792
|
rr(U), it = !0;
|
|
@@ -4819,14 +4819,14 @@ const lm = ({ editor: e, error: t }) => {
|
|
|
4819
4819
|
return e.on("transaction", a), () => e.off("transaction", a);
|
|
4820
4820
|
}, [e]), !e) return null;
|
|
4821
4821
|
const r = (a) => `p-2 rounded-sm transition-colors duration-200 focus-visible:ring-1 focus-visible:ring-ring/40 focus-visible:outline-none ${a ? "bg-primary text-primary-foreground" : "hover:bg-accent hover:text-accent-foreground text-muted-foreground"}`.trim(), o = () => /* @__PURE__ */ u("div", { className: "w-px h-4 bg-border mx-1 self-center", "aria-hidden": "true" });
|
|
4822
|
-
return /* @__PURE__ */
|
|
4822
|
+
return /* @__PURE__ */ D(
|
|
4823
4823
|
"div",
|
|
4824
4824
|
{
|
|
4825
4825
|
className: `flex flex-wrap gap-1 p-1.5 border-b bg-muted/30 rounded-t-lg transition-colors ${t ? "border-red-500/50" : "border-input"}`,
|
|
4826
4826
|
role: "toolbar",
|
|
4827
4827
|
"aria-label": "Text formatting options",
|
|
4828
4828
|
children: [
|
|
4829
|
-
/* @__PURE__ */
|
|
4829
|
+
/* @__PURE__ */ D("div", { className: "flex gap-1", children: [
|
|
4830
4830
|
/* @__PURE__ */ u(
|
|
4831
4831
|
"button",
|
|
4832
4832
|
{
|
|
@@ -4873,7 +4873,7 @@ const lm = ({ editor: e, error: t }) => {
|
|
|
4873
4873
|
)
|
|
4874
4874
|
] }),
|
|
4875
4875
|
/* @__PURE__ */ u(o, {}),
|
|
4876
|
-
/* @__PURE__ */ u("div", { className: "flex gap-1", children: [1, 2, 3].map((a) => /* @__PURE__ */
|
|
4876
|
+
/* @__PURE__ */ u("div", { className: "flex gap-1", children: [1, 2, 3].map((a) => /* @__PURE__ */ D(
|
|
4877
4877
|
"button",
|
|
4878
4878
|
{
|
|
4879
4879
|
type: "button",
|
|
@@ -4890,7 +4890,7 @@ const lm = ({ editor: e, error: t }) => {
|
|
|
4890
4890
|
a
|
|
4891
4891
|
)) }),
|
|
4892
4892
|
/* @__PURE__ */ u(o, {}),
|
|
4893
|
-
/* @__PURE__ */
|
|
4893
|
+
/* @__PURE__ */ D("div", { className: "flex gap-1", children: [
|
|
4894
4894
|
/* @__PURE__ */ u(
|
|
4895
4895
|
"button",
|
|
4896
4896
|
{
|
|
@@ -4937,7 +4937,7 @@ const lm = ({ editor: e, error: t }) => {
|
|
|
4937
4937
|
children: /* @__PURE__ */ u(Lc, { size: 14 })
|
|
4938
4938
|
}
|
|
4939
4939
|
) }),
|
|
4940
|
-
/* @__PURE__ */
|
|
4940
|
+
/* @__PURE__ */ D("div", { className: "flex gap-1 ml-auto", children: [
|
|
4941
4941
|
/* @__PURE__ */ u(o, {}),
|
|
4942
4942
|
/* @__PURE__ */ u(
|
|
4943
4943
|
"button",
|
|
@@ -5015,7 +5015,7 @@ function um({
|
|
|
5015
5015
|
{
|
|
5016
5016
|
className: `mb-4 ${e.fieldClass || "col-span-full"}`,
|
|
5017
5017
|
id: `${e.name}_id`,
|
|
5018
|
-
children: /* @__PURE__ */
|
|
5018
|
+
children: /* @__PURE__ */ D(
|
|
5019
5019
|
"div",
|
|
5020
5020
|
{
|
|
5021
5021
|
className: `w-full border rounded-lg overflow-hidden transition-all duration-200 ${o ? "border-red-500 focus-within:ring-1 focus-within:ring-red-500" : "border-input focus-within:border-ring/40 focus-within:shadow-[0_0_0_1px_rgba(var(--ring),0.1)]"} ${s ? "opacity-70 bg-muted cursor-not-allowed" : "bg-background"}`,
|
|
@@ -5026,7 +5026,7 @@ function um({
|
|
|
5026
5026
|
"div",
|
|
5027
5027
|
{
|
|
5028
5028
|
className: `flex justify-end px-4 py-2 text-[10px] uppercase tracking-wider ${o ? "bg-red-50/50 border-red-500/50 text-red-500" : "bg-muted/20 border-input/50 text-muted-foreground"}`,
|
|
5029
|
-
children: l && /* @__PURE__ */
|
|
5029
|
+
children: l && /* @__PURE__ */ D("div", { "aria-live": "polite", children: [
|
|
5030
5030
|
l.storage.characterCount.characters(),
|
|
5031
5031
|
e.maxLength ? ` / ${e.maxLength}` : "",
|
|
5032
5032
|
" characters"
|
|
@@ -5055,31 +5055,31 @@ function dm({
|
|
|
5055
5055
|
setCharCounts: d,
|
|
5056
5056
|
fileInputRefs: m,
|
|
5057
5057
|
...g
|
|
5058
|
-
} = s, p = a,
|
|
5058
|
+
} = s, p = a, v = e.options || [], h = e.inline || e.layout === "inline", y = g["aria-describedby"], k = `
|
|
5059
5059
|
size-4 rounded border-input bg-background transition-all accent-primary
|
|
5060
5060
|
focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2
|
|
5061
5061
|
disabled:cursor-not-allowed disabled:opacity-50
|
|
5062
5062
|
`;
|
|
5063
|
-
if (
|
|
5064
|
-
const C = Array.isArray(t[e.name]) ? t[e.name] : [], E = (
|
|
5065
|
-
let
|
|
5066
|
-
n(e.name,
|
|
5063
|
+
if (v.length > 0) {
|
|
5064
|
+
const C = Array.isArray(t[e.name]) ? t[e.name] : [], E = (x, A) => {
|
|
5065
|
+
let I = A ? [...C, x] : C.filter((_) => _ !== x);
|
|
5066
|
+
n(e.name, I), r(e.name);
|
|
5067
5067
|
};
|
|
5068
|
-
return /* @__PURE__ */
|
|
5068
|
+
return /* @__PURE__ */ D(
|
|
5069
5069
|
"fieldset",
|
|
5070
5070
|
{
|
|
5071
5071
|
className: "mt-2",
|
|
5072
5072
|
"aria-invalid": !!o,
|
|
5073
|
-
"aria-describedby": o ?
|
|
5073
|
+
"aria-describedby": o ? y : void 0,
|
|
5074
5074
|
children: [
|
|
5075
5075
|
/* @__PURE__ */ u("legend", { className: "sr-only", children: e.label }),
|
|
5076
5076
|
/* @__PURE__ */ u(
|
|
5077
5077
|
"div",
|
|
5078
5078
|
{
|
|
5079
5079
|
className: h ? "flex flex-wrap gap-x-6 gap-y-3" : "space-y-4",
|
|
5080
|
-
children:
|
|
5081
|
-
const
|
|
5082
|
-
return /* @__PURE__ */
|
|
5080
|
+
children: v.map((x) => {
|
|
5081
|
+
const A = typeof x == "object" ? x.value : x, I = typeof x == "object" ? x.label : x, _ = typeof x == "object" ? x.description : null, P = `${e.name}-${A}`, F = C.includes(A);
|
|
5082
|
+
return /* @__PURE__ */ D(
|
|
5083
5083
|
"div",
|
|
5084
5084
|
{
|
|
5085
5085
|
className: "relative flex items-start group",
|
|
@@ -5091,20 +5091,20 @@ function dm({
|
|
|
5091
5091
|
...g,
|
|
5092
5092
|
type: "checkbox",
|
|
5093
5093
|
id: P,
|
|
5094
|
-
checked:
|
|
5095
|
-
onChange: (V) => E(
|
|
5094
|
+
checked: F,
|
|
5095
|
+
onChange: (V) => E(A, V.target.checked),
|
|
5096
5096
|
onBlur: () => r(e.name),
|
|
5097
5097
|
disabled: p,
|
|
5098
5098
|
className: `${k} ${!p && "cursor-pointer hover:border-primary/50"} ${o ? "border-destructive ring-destructive/20" : "border-input"}`
|
|
5099
5099
|
}
|
|
5100
5100
|
) }),
|
|
5101
|
-
/* @__PURE__ */
|
|
5101
|
+
/* @__PURE__ */ D("div", { className: "ml-3 text-sm leading-6", children: [
|
|
5102
5102
|
/* @__PURE__ */ u(
|
|
5103
5103
|
"label",
|
|
5104
5104
|
{
|
|
5105
5105
|
htmlFor: P,
|
|
5106
5106
|
className: `font-medium select-none transition-colors ${p ? "text-muted-foreground" : "text-foreground cursor-pointer group-hover:text-primary"}`,
|
|
5107
|
-
children:
|
|
5107
|
+
children: I
|
|
5108
5108
|
}
|
|
5109
5109
|
),
|
|
5110
5110
|
_ && !h && /* @__PURE__ */ u(
|
|
@@ -5117,7 +5117,7 @@ function dm({
|
|
|
5117
5117
|
] })
|
|
5118
5118
|
]
|
|
5119
5119
|
},
|
|
5120
|
-
|
|
5120
|
+
A
|
|
5121
5121
|
);
|
|
5122
5122
|
})
|
|
5123
5123
|
}
|
|
@@ -5126,7 +5126,7 @@ function dm({
|
|
|
5126
5126
|
}
|
|
5127
5127
|
);
|
|
5128
5128
|
}
|
|
5129
|
-
return /* @__PURE__ */
|
|
5129
|
+
return /* @__PURE__ */ D("div", { className: "mt-1 flex items-start group", children: [
|
|
5130
5130
|
/* @__PURE__ */ u("div", { className: "flex h-6 items-center", children: /* @__PURE__ */ u(
|
|
5131
5131
|
"input",
|
|
5132
5132
|
{
|
|
@@ -5143,7 +5143,7 @@ function dm({
|
|
|
5143
5143
|
className: `${k} ${!p && "cursor-pointer hover:border-primary/50"} ${o ? "border-destructive" : "border-input"}`
|
|
5144
5144
|
}
|
|
5145
5145
|
) }),
|
|
5146
|
-
/* @__PURE__ */ u("div", { className: "ml-3 text-sm leading-6", children: /* @__PURE__ */
|
|
5146
|
+
/* @__PURE__ */ u("div", { className: "ml-3 text-sm leading-6", children: /* @__PURE__ */ D(
|
|
5147
5147
|
"label",
|
|
5148
5148
|
{
|
|
5149
5149
|
htmlFor: e.name,
|
|
@@ -5160,7 +5160,7 @@ const Js = 6048e5, fm = 864e5, fa = Symbol.for("constructDateFrom");
|
|
|
5160
5160
|
function rt(e, t) {
|
|
5161
5161
|
return typeof e == "function" ? e(t) : e && typeof e == "object" && fa in e ? e[fa](t) : e instanceof Date ? new e.constructor(t) : new Date(t);
|
|
5162
5162
|
}
|
|
5163
|
-
function
|
|
5163
|
+
function Ie(e, t) {
|
|
5164
5164
|
return rt(t || e, e);
|
|
5165
5165
|
}
|
|
5166
5166
|
let mm = {};
|
|
@@ -5168,14 +5168,14 @@ function Un() {
|
|
|
5168
5168
|
return mm;
|
|
5169
5169
|
}
|
|
5170
5170
|
function Qt(e, t) {
|
|
5171
|
-
const n = Un(), r = t?.weekStartsOn ?? t?.locale?.options?.weekStartsOn ?? n.weekStartsOn ?? n.locale?.options?.weekStartsOn ?? 0, o =
|
|
5171
|
+
const n = Un(), r = t?.weekStartsOn ?? t?.locale?.options?.weekStartsOn ?? n.weekStartsOn ?? n.locale?.options?.weekStartsOn ?? 0, o = Ie(e, t?.in), a = o.getDay(), s = (a < r ? 7 : 0) + a - r;
|
|
5172
5172
|
return o.setDate(o.getDate() - s), o.setHours(0, 0, 0, 0), o;
|
|
5173
5173
|
}
|
|
5174
5174
|
function Pn(e, t) {
|
|
5175
5175
|
return Qt(e, { ...t, weekStartsOn: 1 });
|
|
5176
5176
|
}
|
|
5177
5177
|
function ei(e, t) {
|
|
5178
|
-
const n =
|
|
5178
|
+
const n = Ie(e, t?.in), r = n.getFullYear(), o = rt(n, 0);
|
|
5179
5179
|
o.setFullYear(r + 1, 0, 4), o.setHours(0, 0, 0, 0);
|
|
5180
5180
|
const a = Pn(o), s = rt(n, 0);
|
|
5181
5181
|
s.setFullYear(r, 0, 4), s.setHours(0, 0, 0, 0);
|
|
@@ -5183,7 +5183,7 @@ function ei(e, t) {
|
|
|
5183
5183
|
return n.getTime() >= a.getTime() ? r + 1 : n.getTime() >= i.getTime() ? r : r - 1;
|
|
5184
5184
|
}
|
|
5185
5185
|
function ma(e) {
|
|
5186
|
-
const t =
|
|
5186
|
+
const t = Ie(e), n = new Date(
|
|
5187
5187
|
Date.UTC(
|
|
5188
5188
|
t.getFullYear(),
|
|
5189
5189
|
t.getMonth(),
|
|
@@ -5204,7 +5204,7 @@ function pm(e, ...t) {
|
|
|
5204
5204
|
return t.map(n);
|
|
5205
5205
|
}
|
|
5206
5206
|
function pa(e, t) {
|
|
5207
|
-
const n =
|
|
5207
|
+
const n = Ie(e, t?.in);
|
|
5208
5208
|
return n.setHours(0, 0, 0, 0), n;
|
|
5209
5209
|
}
|
|
5210
5210
|
function hm(e, t, n) {
|
|
@@ -5223,10 +5223,10 @@ function bm(e) {
|
|
|
5223
5223
|
return e instanceof Date || typeof e == "object" && Object.prototype.toString.call(e) === "[object Date]";
|
|
5224
5224
|
}
|
|
5225
5225
|
function ti(e) {
|
|
5226
|
-
return !(!bm(e) && typeof e != "number" || isNaN(+
|
|
5226
|
+
return !(!bm(e) && typeof e != "number" || isNaN(+Ie(e)));
|
|
5227
5227
|
}
|
|
5228
5228
|
function vm(e, t) {
|
|
5229
|
-
const n =
|
|
5229
|
+
const n = Ie(e, t?.in);
|
|
5230
5230
|
return n.setFullYear(n.getFullYear(), 0, 1), n.setHours(0, 0, 0, 0), n;
|
|
5231
5231
|
}
|
|
5232
5232
|
const ym = {
|
|
@@ -5478,7 +5478,7 @@ const Nm = {
|
|
|
5478
5478
|
return n + "rd";
|
|
5479
5479
|
}
|
|
5480
5480
|
return n + "th";
|
|
5481
|
-
},
|
|
5481
|
+
}, Dm = {
|
|
5482
5482
|
ordinalNumber: Mm,
|
|
5483
5483
|
era: Ut({
|
|
5484
5484
|
values: Nm,
|
|
@@ -5511,7 +5511,7 @@ function jt(e) {
|
|
|
5511
5511
|
return null;
|
|
5512
5512
|
const s = a[0], i = r && e.parsePatterns[r] || e.parsePatterns[e.defaultParseWidth], c = Array.isArray(i) ? Lm(i, (m) => m.test(s)) : (
|
|
5513
5513
|
// [TODO] -- I challenge you to fix the type
|
|
5514
|
-
|
|
5514
|
+
Im(i, (m) => m.test(s))
|
|
5515
5515
|
);
|
|
5516
5516
|
let l;
|
|
5517
5517
|
l = e.valueCallback ? e.valueCallback(c) : c, l = n.valueCallback ? (
|
|
@@ -5522,7 +5522,7 @@ function jt(e) {
|
|
|
5522
5522
|
return { value: l, rest: d };
|
|
5523
5523
|
};
|
|
5524
5524
|
}
|
|
5525
|
-
function
|
|
5525
|
+
function Im(e, t) {
|
|
5526
5526
|
for (const n in e)
|
|
5527
5527
|
if (Object.prototype.hasOwnProperty.call(e, n) && t(e[n]))
|
|
5528
5528
|
return n;
|
|
@@ -5653,7 +5653,7 @@ const $m = /^(\d+)(th|st|nd|rd)?/i, Wm = /\d+/i, zm = {
|
|
|
5653
5653
|
formatDistance: wm,
|
|
5654
5654
|
formatLong: Em,
|
|
5655
5655
|
formatRelative: Am,
|
|
5656
|
-
localize:
|
|
5656
|
+
localize: Dm,
|
|
5657
5657
|
match: Xm,
|
|
5658
5658
|
options: {
|
|
5659
5659
|
weekStartsOn: 0,
|
|
@@ -5661,15 +5661,15 @@ const $m = /^(\d+)(th|st|nd|rd)?/i, Wm = /\d+/i, zm = {
|
|
|
5661
5661
|
}
|
|
5662
5662
|
};
|
|
5663
5663
|
function Zm(e, t) {
|
|
5664
|
-
const n =
|
|
5664
|
+
const n = Ie(e, t?.in);
|
|
5665
5665
|
return hm(n, vm(n)) + 1;
|
|
5666
5666
|
}
|
|
5667
5667
|
function Jm(e, t) {
|
|
5668
|
-
const n =
|
|
5668
|
+
const n = Ie(e, t?.in), r = +Pn(n) - +gm(n);
|
|
5669
5669
|
return Math.round(r / Js) + 1;
|
|
5670
5670
|
}
|
|
5671
5671
|
function ni(e, t) {
|
|
5672
|
-
const n =
|
|
5672
|
+
const n = Ie(e, t?.in), r = n.getFullYear(), o = Un(), a = t?.firstWeekContainsDate ?? t?.locale?.options?.firstWeekContainsDate ?? o.firstWeekContainsDate ?? o.locale?.options?.firstWeekContainsDate ?? 1, s = rt(t?.in || e, 0);
|
|
5673
5673
|
s.setFullYear(r + 1, 0, a), s.setHours(0, 0, 0, 0);
|
|
5674
5674
|
const i = Qt(s, t), c = rt(t?.in || e, 0);
|
|
5675
5675
|
c.setFullYear(r, 0, a), c.setHours(0, 0, 0, 0);
|
|
@@ -5681,7 +5681,7 @@ function ep(e, t) {
|
|
|
5681
5681
|
return a.setFullYear(o, 0, r), a.setHours(0, 0, 0, 0), Qt(a, t);
|
|
5682
5682
|
}
|
|
5683
5683
|
function tp(e, t) {
|
|
5684
|
-
const n =
|
|
5684
|
+
const n = Ie(e, t?.in), r = +Qt(n, t) - +ep(n, t);
|
|
5685
5685
|
return Math.round(r / Js) + 1;
|
|
5686
5686
|
}
|
|
5687
5687
|
function re(e, t) {
|
|
@@ -6380,7 +6380,7 @@ function up(e, t, n) {
|
|
|
6380
6380
|
}
|
|
6381
6381
|
const dp = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g, fp = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g, mp = /^'([^]*?)'?$/, pp = /''/g, hp = /[a-zA-Z]/;
|
|
6382
6382
|
function Hr(e, t, n) {
|
|
6383
|
-
const r = Un(), o = r.locale ?? Qm, a = r.firstWeekContainsDate ?? r.locale?.options?.firstWeekContainsDate ?? 1, s = r.weekStartsOn ?? r.locale?.options?.weekStartsOn ?? 0, i =
|
|
6383
|
+
const r = Un(), o = r.locale ?? Qm, a = r.firstWeekContainsDate ?? r.locale?.options?.firstWeekContainsDate ?? 1, s = r.weekStartsOn ?? r.locale?.options?.weekStartsOn ?? 0, i = Ie(e, n?.in);
|
|
6384
6384
|
if (!ti(i))
|
|
6385
6385
|
throw new RangeError("Invalid time value");
|
|
6386
6386
|
let c = t.match(fp).map((d) => {
|
|
@@ -6459,9 +6459,9 @@ function vp(e) {
|
|
|
6459
6459
|
const d = t.ownerDocument.defaultView ?? window, m = (p) => {
|
|
6460
6460
|
const h = gn(r.current).includes(CSS.escape(p.animationName));
|
|
6461
6461
|
if (p.target === t && h && (c("ANIMATION_END"), !o.current)) {
|
|
6462
|
-
const
|
|
6462
|
+
const y = t.style.animationFillMode;
|
|
6463
6463
|
t.style.animationFillMode = "forwards", l = d.setTimeout(() => {
|
|
6464
|
-
t.style.animationFillMode === "forwards" && (t.style.animationFillMode =
|
|
6464
|
+
t.style.animationFillMode === "forwards" && (t.style.animationFillMode = y);
|
|
6465
6465
|
});
|
|
6466
6466
|
}
|
|
6467
6467
|
}, g = (p) => {
|
|
@@ -6718,7 +6718,7 @@ Rp.displayName = Pp;
|
|
|
6718
6718
|
function pi(e) {
|
|
6719
6719
|
return e ? "open" : "closed";
|
|
6720
6720
|
}
|
|
6721
|
-
var Op = si, _p = li, Mp = ui,
|
|
6721
|
+
var Op = si, _p = li, Mp = ui, Dp = di;
|
|
6722
6722
|
function hi(e) {
|
|
6723
6723
|
var t, n, r = "";
|
|
6724
6724
|
if (typeof e == "string" || typeof e == "number") r += e;
|
|
@@ -6728,7 +6728,7 @@ function hi(e) {
|
|
|
6728
6728
|
} else for (n in e) e[n] && (r && (r += " "), r += n);
|
|
6729
6729
|
return r;
|
|
6730
6730
|
}
|
|
6731
|
-
function
|
|
6731
|
+
function Ip() {
|
|
6732
6732
|
for (var e, t, n = 0, r = "", o = arguments.length; n < o; n++) (e = arguments[n]) && (t = hi(e)) && (r && (r += " "), r += t);
|
|
6733
6733
|
return r;
|
|
6734
6734
|
}
|
|
@@ -6879,18 +6879,18 @@ const Lp = (e, t) => {
|
|
|
6879
6879
|
let s = 0, i = 0, c = 0, l;
|
|
6880
6880
|
const d = o.length;
|
|
6881
6881
|
for (let h = 0; h < d; h++) {
|
|
6882
|
-
const
|
|
6882
|
+
const y = o[h];
|
|
6883
6883
|
if (s === 0 && i === 0) {
|
|
6884
|
-
if (
|
|
6884
|
+
if (y === wa) {
|
|
6885
6885
|
a.push(o.slice(c, h)), c = h + 1;
|
|
6886
6886
|
continue;
|
|
6887
6887
|
}
|
|
6888
|
-
if (
|
|
6888
|
+
if (y === "/") {
|
|
6889
6889
|
l = h;
|
|
6890
6890
|
continue;
|
|
6891
6891
|
}
|
|
6892
6892
|
}
|
|
6893
|
-
|
|
6893
|
+
y === "[" ? s++ : y === "]" ? s-- : y === "(" ? i++ : y === ")" && i--;
|
|
6894
6894
|
}
|
|
6895
6895
|
const m = a.length === 0 ? o : o.slice(c);
|
|
6896
6896
|
let g = m, p = !1;
|
|
@@ -6901,8 +6901,8 @@ const Lp = (e, t) => {
|
|
|
6901
6901
|
*/
|
|
6902
6902
|
m.startsWith(Ur) && (g = m.slice(1), p = !0)
|
|
6903
6903
|
);
|
|
6904
|
-
const
|
|
6905
|
-
return xa(a, p, g,
|
|
6904
|
+
const v = l && l > c ? l - c : void 0;
|
|
6905
|
+
return xa(a, p, g, v);
|
|
6906
6906
|
};
|
|
6907
6907
|
if (t) {
|
|
6908
6908
|
const o = t + wa, a = r;
|
|
@@ -6947,32 +6947,32 @@ const Lp = (e, t) => {
|
|
|
6947
6947
|
isExternal: m,
|
|
6948
6948
|
modifiers: g,
|
|
6949
6949
|
hasImportantModifier: p,
|
|
6950
|
-
baseClassName:
|
|
6950
|
+
baseClassName: v,
|
|
6951
6951
|
maybePostfixModifierPosition: h
|
|
6952
6952
|
} = n(d);
|
|
6953
6953
|
if (m) {
|
|
6954
6954
|
c = d + (c.length > 0 ? " " + c : c);
|
|
6955
6955
|
continue;
|
|
6956
6956
|
}
|
|
6957
|
-
let
|
|
6957
|
+
let y = !!h, k = r(y ? v.substring(0, h) : v);
|
|
6958
6958
|
if (!k) {
|
|
6959
|
-
if (!
|
|
6959
|
+
if (!y) {
|
|
6960
6960
|
c = d + (c.length > 0 ? " " + c : c);
|
|
6961
6961
|
continue;
|
|
6962
6962
|
}
|
|
6963
|
-
if (k = r(
|
|
6963
|
+
if (k = r(v), !k) {
|
|
6964
6964
|
c = d + (c.length > 0 ? " " + c : c);
|
|
6965
6965
|
continue;
|
|
6966
6966
|
}
|
|
6967
|
-
|
|
6967
|
+
y = !1;
|
|
6968
6968
|
}
|
|
6969
|
-
const C = g.length === 0 ? "" : g.length === 1 ? g[0] : a(g).join(":"), E = p ? C + Ur : C,
|
|
6970
|
-
if (s.indexOf(
|
|
6969
|
+
const C = g.length === 0 ? "" : g.length === 1 ? g[0] : a(g).join(":"), E = p ? C + Ur : C, x = E + k;
|
|
6970
|
+
if (s.indexOf(x) > -1)
|
|
6971
6971
|
continue;
|
|
6972
|
-
s.push(
|
|
6973
|
-
const
|
|
6974
|
-
for (let
|
|
6975
|
-
const _ =
|
|
6972
|
+
s.push(x);
|
|
6973
|
+
const A = o(k, y);
|
|
6974
|
+
for (let I = 0; I < A.length; ++I) {
|
|
6975
|
+
const _ = A[I];
|
|
6976
6976
|
s.push(E + _);
|
|
6977
6977
|
}
|
|
6978
6978
|
c = d + (c.length > 0 ? " " + c : c);
|
|
@@ -7011,14 +7011,14 @@ const Lp = (e, t) => {
|
|
|
7011
7011
|
// For example, `hsl(0 0% 0%)` would be classified as a length without this check.
|
|
7012
7012
|
// I could also use lookbehind assertion in `lengthUnitRegex` but that isn't supported widely enough.
|
|
7013
7013
|
sh.test(e) && !ih.test(e)
|
|
7014
|
-
), Si = () => !1, fh = (e) => ch.test(e), mh = (e) => lh.test(e), ph = (e) =>
|
|
7014
|
+
), Si = () => !1, fh = (e) => ch.test(e), mh = (e) => lh.test(e), ph = (e) => !$(e) && !W(e), hh = (e) => Dt(e, ki, Si), $ = (e) => wi.test(e), ut = (e) => Dt(e, Ai, dh), kr = (e) => Dt(e, wh, K), Sa = (e) => Dt(e, Ci, Si), gh = (e) => Dt(e, Ei, mh), bn = (e) => Dt(e, Ni, fh), W = (e) => xi.test(e), Vt = (e) => It(e, Ai), bh = (e) => It(e, xh), Ca = (e) => It(e, Ci), vh = (e) => It(e, ki), yh = (e) => It(e, Ei), vn = (e) => It(e, Ni, !0), Dt = (e, t, n) => {
|
|
7015
7015
|
const r = wi.exec(e);
|
|
7016
7016
|
return r ? r[1] ? t(r[1]) : n(r[2]) : !1;
|
|
7017
|
-
},
|
|
7017
|
+
}, It = (e, t, n = !1) => {
|
|
7018
7018
|
const r = xi.exec(e);
|
|
7019
7019
|
return r ? r[1] ? t(r[1]) : n : !1;
|
|
7020
7020
|
}, Ci = (e) => e === "position" || e === "percentage", Ei = (e) => e === "image" || e === "url", ki = (e) => e === "length" || e === "size" || e === "bg-size", Ai = (e) => e === "length", wh = (e) => e === "number", xh = (e) => e === "family-name", Ni = (e) => e === "shadow", Sh = () => {
|
|
7021
|
-
const e = me("color"), t = me("font"), n = me("text"), r = me("font-weight"), o = me("tracking"), a = me("leading"), s = me("breakpoint"), i = me("container"), c = me("spacing"), l = me("radius"), d = me("shadow"), m = me("inset-shadow"), g = me("text-shadow"), p = me("drop-shadow"),
|
|
7021
|
+
const e = me("color"), t = me("font"), n = me("text"), r = me("font-weight"), o = me("tracking"), a = me("leading"), s = me("breakpoint"), i = me("container"), c = me("spacing"), l = me("radius"), d = me("shadow"), m = me("inset-shadow"), g = me("text-shadow"), p = me("drop-shadow"), v = me("blur"), h = me("perspective"), y = me("aspect"), k = me("ease"), C = me("animate"), E = () => ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"], x = () => [
|
|
7022
7022
|
"center",
|
|
7023
7023
|
"top",
|
|
7024
7024
|
"bottom",
|
|
@@ -7036,30 +7036,30 @@ const Lp = (e, t) => {
|
|
|
7036
7036
|
"bottom-left",
|
|
7037
7037
|
// Deprecated since Tailwind CSS v4.1.0, see https://github.com/tailwindlabs/tailwindcss/pull/17378
|
|
7038
7038
|
"left-bottom"
|
|
7039
|
-
],
|
|
7040
|
-
span: ["full", Ze,
|
|
7041
|
-
}, Ze,
|
|
7042
|
-
position: [
|
|
7039
|
+
], A = () => [...x(), W, $], I = () => ["auto", "hidden", "clip", "visible", "scroll"], _ = () => ["auto", "contain", "none"], P = () => [W, $, c], F = () => [kt, "full", "auto", ...P()], V = () => [Ze, "none", "subgrid", W, $], H = () => ["auto", {
|
|
7040
|
+
span: ["full", Ze, W, $]
|
|
7041
|
+
}, Ze, W, $], G = () => [Ze, "auto", W, $], w = () => ["auto", "min", "max", "fr", W, $], T = () => ["start", "end", "center", "between", "around", "evenly", "stretch", "baseline", "center-safe", "end-safe"], R = () => ["start", "end", "center", "stretch", "center-safe", "end-safe"], O = () => ["auto", ...P()], N = () => [kt, "auto", "full", "dvw", "dvh", "lvw", "lvh", "svw", "svh", "min", "max", "fit", ...P()], S = () => [e, W, $], z = () => [...x(), Ca, Sa, {
|
|
7042
|
+
position: [W, $]
|
|
7043
7043
|
}], Y = () => ["no-repeat", {
|
|
7044
7044
|
repeat: ["", "x", "y", "space", "round"]
|
|
7045
7045
|
}], j = () => ["auto", "cover", "contain", vh, hh, {
|
|
7046
|
-
size: [
|
|
7046
|
+
size: [W, $]
|
|
7047
7047
|
}], ve = () => [Er, Vt, ut], q = () => [
|
|
7048
7048
|
// Deprecated since Tailwind CSS v4.0.0
|
|
7049
7049
|
"",
|
|
7050
7050
|
"none",
|
|
7051
7051
|
"full",
|
|
7052
7052
|
l,
|
|
7053
|
-
|
|
7054
|
-
|
|
7053
|
+
W,
|
|
7054
|
+
$
|
|
7055
7055
|
], ee = () => ["", K, Vt, ut], J = () => ["solid", "dashed", "dotted", "double"], he = () => ["normal", "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity"], L = () => [K, Er, Ca, Sa], te = () => [
|
|
7056
7056
|
// Deprecated since Tailwind CSS v4.0.0
|
|
7057
7057
|
"",
|
|
7058
7058
|
"none",
|
|
7059
|
-
|
|
7060
|
-
|
|
7061
|
-
|
|
7062
|
-
], ce = () => ["none", K,
|
|
7059
|
+
v,
|
|
7060
|
+
W,
|
|
7061
|
+
$
|
|
7062
|
+
], ce = () => ["none", K, W, $], Q = () => ["none", K, W, $], ne = () => [K, W, $], oe = () => [kt, "full", ...P()];
|
|
7063
7063
|
return {
|
|
7064
7064
|
cacheSize: 500,
|
|
7065
7065
|
theme: {
|
|
@@ -7092,7 +7092,7 @@ const Lp = (e, t) => {
|
|
|
7092
7092
|
* @see https://tailwindcss.com/docs/aspect-ratio
|
|
7093
7093
|
*/
|
|
7094
7094
|
aspect: [{
|
|
7095
|
-
aspect: ["auto", "square", kt,
|
|
7095
|
+
aspect: ["auto", "square", kt, $, W, y]
|
|
7096
7096
|
}],
|
|
7097
7097
|
/**
|
|
7098
7098
|
* Container
|
|
@@ -7105,7 +7105,7 @@ const Lp = (e, t) => {
|
|
|
7105
7105
|
* @see https://tailwindcss.com/docs/columns
|
|
7106
7106
|
*/
|
|
7107
7107
|
columns: [{
|
|
7108
|
-
columns: [K,
|
|
7108
|
+
columns: [K, $, W, i]
|
|
7109
7109
|
}],
|
|
7110
7110
|
/**
|
|
7111
7111
|
* Break After
|
|
@@ -7183,28 +7183,28 @@ const Lp = (e, t) => {
|
|
|
7183
7183
|
* @see https://tailwindcss.com/docs/object-position
|
|
7184
7184
|
*/
|
|
7185
7185
|
"object-position": [{
|
|
7186
|
-
object:
|
|
7186
|
+
object: A()
|
|
7187
7187
|
}],
|
|
7188
7188
|
/**
|
|
7189
7189
|
* Overflow
|
|
7190
7190
|
* @see https://tailwindcss.com/docs/overflow
|
|
7191
7191
|
*/
|
|
7192
7192
|
overflow: [{
|
|
7193
|
-
overflow:
|
|
7193
|
+
overflow: I()
|
|
7194
7194
|
}],
|
|
7195
7195
|
/**
|
|
7196
7196
|
* Overflow X
|
|
7197
7197
|
* @see https://tailwindcss.com/docs/overflow
|
|
7198
7198
|
*/
|
|
7199
7199
|
"overflow-x": [{
|
|
7200
|
-
"overflow-x":
|
|
7200
|
+
"overflow-x": I()
|
|
7201
7201
|
}],
|
|
7202
7202
|
/**
|
|
7203
7203
|
* Overflow Y
|
|
7204
7204
|
* @see https://tailwindcss.com/docs/overflow
|
|
7205
7205
|
*/
|
|
7206
7206
|
"overflow-y": [{
|
|
7207
|
-
"overflow-y":
|
|
7207
|
+
"overflow-y": I()
|
|
7208
7208
|
}],
|
|
7209
7209
|
/**
|
|
7210
7210
|
* Overscroll Behavior
|
|
@@ -7237,63 +7237,63 @@ const Lp = (e, t) => {
|
|
|
7237
7237
|
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
7238
7238
|
*/
|
|
7239
7239
|
inset: [{
|
|
7240
|
-
inset:
|
|
7240
|
+
inset: F()
|
|
7241
7241
|
}],
|
|
7242
7242
|
/**
|
|
7243
7243
|
* Right / Left
|
|
7244
7244
|
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
7245
7245
|
*/
|
|
7246
7246
|
"inset-x": [{
|
|
7247
|
-
"inset-x":
|
|
7247
|
+
"inset-x": F()
|
|
7248
7248
|
}],
|
|
7249
7249
|
/**
|
|
7250
7250
|
* Top / Bottom
|
|
7251
7251
|
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
7252
7252
|
*/
|
|
7253
7253
|
"inset-y": [{
|
|
7254
|
-
"inset-y":
|
|
7254
|
+
"inset-y": F()
|
|
7255
7255
|
}],
|
|
7256
7256
|
/**
|
|
7257
7257
|
* Start
|
|
7258
7258
|
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
7259
7259
|
*/
|
|
7260
7260
|
start: [{
|
|
7261
|
-
start:
|
|
7261
|
+
start: F()
|
|
7262
7262
|
}],
|
|
7263
7263
|
/**
|
|
7264
7264
|
* End
|
|
7265
7265
|
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
7266
7266
|
*/
|
|
7267
7267
|
end: [{
|
|
7268
|
-
end:
|
|
7268
|
+
end: F()
|
|
7269
7269
|
}],
|
|
7270
7270
|
/**
|
|
7271
7271
|
* Top
|
|
7272
7272
|
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
7273
7273
|
*/
|
|
7274
7274
|
top: [{
|
|
7275
|
-
top:
|
|
7275
|
+
top: F()
|
|
7276
7276
|
}],
|
|
7277
7277
|
/**
|
|
7278
7278
|
* Right
|
|
7279
7279
|
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
7280
7280
|
*/
|
|
7281
7281
|
right: [{
|
|
7282
|
-
right:
|
|
7282
|
+
right: F()
|
|
7283
7283
|
}],
|
|
7284
7284
|
/**
|
|
7285
7285
|
* Bottom
|
|
7286
7286
|
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
7287
7287
|
*/
|
|
7288
7288
|
bottom: [{
|
|
7289
|
-
bottom:
|
|
7289
|
+
bottom: F()
|
|
7290
7290
|
}],
|
|
7291
7291
|
/**
|
|
7292
7292
|
* Left
|
|
7293
7293
|
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
7294
7294
|
*/
|
|
7295
7295
|
left: [{
|
|
7296
|
-
left:
|
|
7296
|
+
left: F()
|
|
7297
7297
|
}],
|
|
7298
7298
|
/**
|
|
7299
7299
|
* Visibility
|
|
@@ -7305,7 +7305,7 @@ const Lp = (e, t) => {
|
|
|
7305
7305
|
* @see https://tailwindcss.com/docs/z-index
|
|
7306
7306
|
*/
|
|
7307
7307
|
z: [{
|
|
7308
|
-
z: [Ze, "auto",
|
|
7308
|
+
z: [Ze, "auto", W, $]
|
|
7309
7309
|
}],
|
|
7310
7310
|
// ------------------------
|
|
7311
7311
|
// --- Flexbox and Grid ---
|
|
@@ -7336,28 +7336,28 @@ const Lp = (e, t) => {
|
|
|
7336
7336
|
* @see https://tailwindcss.com/docs/flex
|
|
7337
7337
|
*/
|
|
7338
7338
|
flex: [{
|
|
7339
|
-
flex: [K, kt, "auto", "initial", "none",
|
|
7339
|
+
flex: [K, kt, "auto", "initial", "none", $]
|
|
7340
7340
|
}],
|
|
7341
7341
|
/**
|
|
7342
7342
|
* Flex Grow
|
|
7343
7343
|
* @see https://tailwindcss.com/docs/flex-grow
|
|
7344
7344
|
*/
|
|
7345
7345
|
grow: [{
|
|
7346
|
-
grow: ["", K,
|
|
7346
|
+
grow: ["", K, W, $]
|
|
7347
7347
|
}],
|
|
7348
7348
|
/**
|
|
7349
7349
|
* Flex Shrink
|
|
7350
7350
|
* @see https://tailwindcss.com/docs/flex-shrink
|
|
7351
7351
|
*/
|
|
7352
7352
|
shrink: [{
|
|
7353
|
-
shrink: ["", K,
|
|
7353
|
+
shrink: ["", K, W, $]
|
|
7354
7354
|
}],
|
|
7355
7355
|
/**
|
|
7356
7356
|
* Order
|
|
7357
7357
|
* @see https://tailwindcss.com/docs/order
|
|
7358
7358
|
*/
|
|
7359
7359
|
order: [{
|
|
7360
|
-
order: [Ze, "first", "last", "none",
|
|
7360
|
+
order: [Ze, "first", "last", "none", W, $]
|
|
7361
7361
|
}],
|
|
7362
7362
|
/**
|
|
7363
7363
|
* Grid Template Columns
|
|
@@ -7427,14 +7427,14 @@ const Lp = (e, t) => {
|
|
|
7427
7427
|
* @see https://tailwindcss.com/docs/grid-auto-columns
|
|
7428
7428
|
*/
|
|
7429
7429
|
"auto-cols": [{
|
|
7430
|
-
"auto-cols":
|
|
7430
|
+
"auto-cols": w()
|
|
7431
7431
|
}],
|
|
7432
7432
|
/**
|
|
7433
7433
|
* Grid Auto Rows
|
|
7434
7434
|
* @see https://tailwindcss.com/docs/grid-auto-rows
|
|
7435
7435
|
*/
|
|
7436
7436
|
"auto-rows": [{
|
|
7437
|
-
"auto-rows":
|
|
7437
|
+
"auto-rows": w()
|
|
7438
7438
|
}],
|
|
7439
7439
|
/**
|
|
7440
7440
|
* Gap
|
|
@@ -7462,7 +7462,7 @@ const Lp = (e, t) => {
|
|
|
7462
7462
|
* @see https://tailwindcss.com/docs/justify-content
|
|
7463
7463
|
*/
|
|
7464
7464
|
"justify-content": [{
|
|
7465
|
-
justify: [...
|
|
7465
|
+
justify: [...T(), "normal"]
|
|
7466
7466
|
}],
|
|
7467
7467
|
/**
|
|
7468
7468
|
* Justify Items
|
|
@@ -7483,7 +7483,7 @@ const Lp = (e, t) => {
|
|
|
7483
7483
|
* @see https://tailwindcss.com/docs/align-content
|
|
7484
7484
|
*/
|
|
7485
7485
|
"align-content": [{
|
|
7486
|
-
content: ["normal", ...
|
|
7486
|
+
content: ["normal", ...T()]
|
|
7487
7487
|
}],
|
|
7488
7488
|
/**
|
|
7489
7489
|
* Align Items
|
|
@@ -7508,7 +7508,7 @@ const Lp = (e, t) => {
|
|
|
7508
7508
|
* @see https://tailwindcss.com/docs/place-content
|
|
7509
7509
|
*/
|
|
7510
7510
|
"place-content": [{
|
|
7511
|
-
"place-content":
|
|
7511
|
+
"place-content": T()
|
|
7512
7512
|
}],
|
|
7513
7513
|
/**
|
|
7514
7514
|
* Place Items
|
|
@@ -7683,14 +7683,14 @@ const Lp = (e, t) => {
|
|
|
7683
7683
|
* @see https://tailwindcss.com/docs/width#setting-both-width-and-height
|
|
7684
7684
|
*/
|
|
7685
7685
|
size: [{
|
|
7686
|
-
size:
|
|
7686
|
+
size: N()
|
|
7687
7687
|
}],
|
|
7688
7688
|
/**
|
|
7689
7689
|
* Width
|
|
7690
7690
|
* @see https://tailwindcss.com/docs/width
|
|
7691
7691
|
*/
|
|
7692
7692
|
w: [{
|
|
7693
|
-
w: [i, "screen", ...
|
|
7693
|
+
w: [i, "screen", ...N()]
|
|
7694
7694
|
}],
|
|
7695
7695
|
/**
|
|
7696
7696
|
* Min-Width
|
|
@@ -7702,7 +7702,7 @@ const Lp = (e, t) => {
|
|
|
7702
7702
|
"screen",
|
|
7703
7703
|
/** Deprecated. @see https://github.com/tailwindlabs/tailwindcss.com/issues/2027#issuecomment-2620152757 */
|
|
7704
7704
|
"none",
|
|
7705
|
-
...
|
|
7705
|
+
...N()
|
|
7706
7706
|
]
|
|
7707
7707
|
}],
|
|
7708
7708
|
/**
|
|
@@ -7720,7 +7720,7 @@ const Lp = (e, t) => {
|
|
|
7720
7720
|
{
|
|
7721
7721
|
screen: [s]
|
|
7722
7722
|
},
|
|
7723
|
-
...
|
|
7723
|
+
...N()
|
|
7724
7724
|
]
|
|
7725
7725
|
}],
|
|
7726
7726
|
/**
|
|
@@ -7728,21 +7728,21 @@ const Lp = (e, t) => {
|
|
|
7728
7728
|
* @see https://tailwindcss.com/docs/height
|
|
7729
7729
|
*/
|
|
7730
7730
|
h: [{
|
|
7731
|
-
h: ["screen", "lh", ...
|
|
7731
|
+
h: ["screen", "lh", ...N()]
|
|
7732
7732
|
}],
|
|
7733
7733
|
/**
|
|
7734
7734
|
* Min-Height
|
|
7735
7735
|
* @see https://tailwindcss.com/docs/min-height
|
|
7736
7736
|
*/
|
|
7737
7737
|
"min-h": [{
|
|
7738
|
-
"min-h": ["screen", "lh", "none", ...
|
|
7738
|
+
"min-h": ["screen", "lh", "none", ...N()]
|
|
7739
7739
|
}],
|
|
7740
7740
|
/**
|
|
7741
7741
|
* Max-Height
|
|
7742
7742
|
* @see https://tailwindcss.com/docs/max-height
|
|
7743
7743
|
*/
|
|
7744
7744
|
"max-h": [{
|
|
7745
|
-
"max-h": ["screen", "lh", ...
|
|
7745
|
+
"max-h": ["screen", "lh", ...N()]
|
|
7746
7746
|
}],
|
|
7747
7747
|
// ------------------
|
|
7748
7748
|
// --- Typography ---
|
|
@@ -7769,21 +7769,21 @@ const Lp = (e, t) => {
|
|
|
7769
7769
|
* @see https://tailwindcss.com/docs/font-weight
|
|
7770
7770
|
*/
|
|
7771
7771
|
"font-weight": [{
|
|
7772
|
-
font: [r,
|
|
7772
|
+
font: [r, W, kr]
|
|
7773
7773
|
}],
|
|
7774
7774
|
/**
|
|
7775
7775
|
* Font Stretch
|
|
7776
7776
|
* @see https://tailwindcss.com/docs/font-stretch
|
|
7777
7777
|
*/
|
|
7778
7778
|
"font-stretch": [{
|
|
7779
|
-
"font-stretch": ["ultra-condensed", "extra-condensed", "condensed", "semi-condensed", "normal", "semi-expanded", "expanded", "extra-expanded", "ultra-expanded", Er,
|
|
7779
|
+
"font-stretch": ["ultra-condensed", "extra-condensed", "condensed", "semi-condensed", "normal", "semi-expanded", "expanded", "extra-expanded", "ultra-expanded", Er, $]
|
|
7780
7780
|
}],
|
|
7781
7781
|
/**
|
|
7782
7782
|
* Font Family
|
|
7783
7783
|
* @see https://tailwindcss.com/docs/font-family
|
|
7784
7784
|
*/
|
|
7785
7785
|
"font-family": [{
|
|
7786
|
-
font: [bh,
|
|
7786
|
+
font: [bh, $, t]
|
|
7787
7787
|
}],
|
|
7788
7788
|
/**
|
|
7789
7789
|
* Font Variant Numeric
|
|
@@ -7820,14 +7820,14 @@ const Lp = (e, t) => {
|
|
|
7820
7820
|
* @see https://tailwindcss.com/docs/letter-spacing
|
|
7821
7821
|
*/
|
|
7822
7822
|
tracking: [{
|
|
7823
|
-
tracking: [o,
|
|
7823
|
+
tracking: [o, W, $]
|
|
7824
7824
|
}],
|
|
7825
7825
|
/**
|
|
7826
7826
|
* Line Clamp
|
|
7827
7827
|
* @see https://tailwindcss.com/docs/line-clamp
|
|
7828
7828
|
*/
|
|
7829
7829
|
"line-clamp": [{
|
|
7830
|
-
"line-clamp": [K, "none",
|
|
7830
|
+
"line-clamp": [K, "none", W, kr]
|
|
7831
7831
|
}],
|
|
7832
7832
|
/**
|
|
7833
7833
|
* Line Height
|
|
@@ -7845,7 +7845,7 @@ const Lp = (e, t) => {
|
|
|
7845
7845
|
* @see https://tailwindcss.com/docs/list-style-image
|
|
7846
7846
|
*/
|
|
7847
7847
|
"list-image": [{
|
|
7848
|
-
"list-image": ["none",
|
|
7848
|
+
"list-image": ["none", W, $]
|
|
7849
7849
|
}],
|
|
7850
7850
|
/**
|
|
7851
7851
|
* List Style Position
|
|
@@ -7859,7 +7859,7 @@ const Lp = (e, t) => {
|
|
|
7859
7859
|
* @see https://tailwindcss.com/docs/list-style-type
|
|
7860
7860
|
*/
|
|
7861
7861
|
"list-style-type": [{
|
|
7862
|
-
list: ["disc", "decimal", "none",
|
|
7862
|
+
list: ["disc", "decimal", "none", W, $]
|
|
7863
7863
|
}],
|
|
7864
7864
|
/**
|
|
7865
7865
|
* Text Alignment
|
|
@@ -7900,7 +7900,7 @@ const Lp = (e, t) => {
|
|
|
7900
7900
|
* @see https://tailwindcss.com/docs/text-decoration-thickness
|
|
7901
7901
|
*/
|
|
7902
7902
|
"text-decoration-thickness": [{
|
|
7903
|
-
decoration: [K, "from-font", "auto",
|
|
7903
|
+
decoration: [K, "from-font", "auto", W, ut]
|
|
7904
7904
|
}],
|
|
7905
7905
|
/**
|
|
7906
7906
|
* Text Decoration Color
|
|
@@ -7914,7 +7914,7 @@ const Lp = (e, t) => {
|
|
|
7914
7914
|
* @see https://tailwindcss.com/docs/text-underline-offset
|
|
7915
7915
|
*/
|
|
7916
7916
|
"underline-offset": [{
|
|
7917
|
-
"underline-offset": [K, "auto",
|
|
7917
|
+
"underline-offset": [K, "auto", W, $]
|
|
7918
7918
|
}],
|
|
7919
7919
|
/**
|
|
7920
7920
|
* Text Transform
|
|
@@ -7945,7 +7945,7 @@ const Lp = (e, t) => {
|
|
|
7945
7945
|
* @see https://tailwindcss.com/docs/vertical-align
|
|
7946
7946
|
*/
|
|
7947
7947
|
"vertical-align": [{
|
|
7948
|
-
align: ["baseline", "top", "middle", "bottom", "text-top", "text-bottom", "sub", "super",
|
|
7948
|
+
align: ["baseline", "top", "middle", "bottom", "text-top", "text-bottom", "sub", "super", W, $]
|
|
7949
7949
|
}],
|
|
7950
7950
|
/**
|
|
7951
7951
|
* Whitespace
|
|
@@ -7980,7 +7980,7 @@ const Lp = (e, t) => {
|
|
|
7980
7980
|
* @see https://tailwindcss.com/docs/content
|
|
7981
7981
|
*/
|
|
7982
7982
|
content: [{
|
|
7983
|
-
content: ["none",
|
|
7983
|
+
content: ["none", W, $]
|
|
7984
7984
|
}],
|
|
7985
7985
|
// -------------------
|
|
7986
7986
|
// --- Backgrounds ---
|
|
@@ -8011,7 +8011,7 @@ const Lp = (e, t) => {
|
|
|
8011
8011
|
* @see https://tailwindcss.com/docs/background-position
|
|
8012
8012
|
*/
|
|
8013
8013
|
"bg-position": [{
|
|
8014
|
-
bg:
|
|
8014
|
+
bg: z()
|
|
8015
8015
|
}],
|
|
8016
8016
|
/**
|
|
8017
8017
|
* Background Repeat
|
|
@@ -8035,9 +8035,9 @@ const Lp = (e, t) => {
|
|
|
8035
8035
|
bg: ["none", {
|
|
8036
8036
|
linear: [{
|
|
8037
8037
|
to: ["t", "tr", "r", "br", "b", "bl", "l", "tl"]
|
|
8038
|
-
}, Ze,
|
|
8039
|
-
radial: ["",
|
|
8040
|
-
conic: [Ze,
|
|
8038
|
+
}, Ze, W, $],
|
|
8039
|
+
radial: ["", W, $],
|
|
8040
|
+
conic: [Ze, W, $]
|
|
8041
8041
|
}, yh, gh]
|
|
8042
8042
|
}],
|
|
8043
8043
|
/**
|
|
@@ -8380,7 +8380,7 @@ const Lp = (e, t) => {
|
|
|
8380
8380
|
* @see https://tailwindcss.com/docs/outline-offset
|
|
8381
8381
|
*/
|
|
8382
8382
|
"outline-offset": [{
|
|
8383
|
-
"outline-offset": [K,
|
|
8383
|
+
"outline-offset": [K, W, $]
|
|
8384
8384
|
}],
|
|
8385
8385
|
/**
|
|
8386
8386
|
* Outline Width
|
|
@@ -8506,7 +8506,7 @@ const Lp = (e, t) => {
|
|
|
8506
8506
|
* @see https://tailwindcss.com/docs/opacity
|
|
8507
8507
|
*/
|
|
8508
8508
|
opacity: [{
|
|
8509
|
-
opacity: [K,
|
|
8509
|
+
opacity: [K, W, $]
|
|
8510
8510
|
}],
|
|
8511
8511
|
/**
|
|
8512
8512
|
* Mix Blend Mode
|
|
@@ -8628,7 +8628,7 @@ const Lp = (e, t) => {
|
|
|
8628
8628
|
"mask-y-to": S()
|
|
8629
8629
|
}],
|
|
8630
8630
|
"mask-image-radial": [{
|
|
8631
|
-
"mask-radial": [
|
|
8631
|
+
"mask-radial": [W, $]
|
|
8632
8632
|
}],
|
|
8633
8633
|
"mask-image-radial-from-pos": [{
|
|
8634
8634
|
"mask-radial-from": L()
|
|
@@ -8652,7 +8652,7 @@ const Lp = (e, t) => {
|
|
|
8652
8652
|
}]
|
|
8653
8653
|
}],
|
|
8654
8654
|
"mask-image-radial-pos": [{
|
|
8655
|
-
"mask-radial-at":
|
|
8655
|
+
"mask-radial-at": x()
|
|
8656
8656
|
}],
|
|
8657
8657
|
"mask-image-conic-pos": [{
|
|
8658
8658
|
"mask-conic": [K]
|
|
@@ -8688,7 +8688,7 @@ const Lp = (e, t) => {
|
|
|
8688
8688
|
* @see https://tailwindcss.com/docs/mask-position
|
|
8689
8689
|
*/
|
|
8690
8690
|
"mask-position": [{
|
|
8691
|
-
mask:
|
|
8691
|
+
mask: z()
|
|
8692
8692
|
}],
|
|
8693
8693
|
/**
|
|
8694
8694
|
* Mask Repeat
|
|
@@ -8716,7 +8716,7 @@ const Lp = (e, t) => {
|
|
|
8716
8716
|
* @see https://tailwindcss.com/docs/mask-image
|
|
8717
8717
|
*/
|
|
8718
8718
|
"mask-image": [{
|
|
8719
|
-
mask: ["none",
|
|
8719
|
+
mask: ["none", W, $]
|
|
8720
8720
|
}],
|
|
8721
8721
|
// ---------------
|
|
8722
8722
|
// --- Filters ---
|
|
@@ -8730,8 +8730,8 @@ const Lp = (e, t) => {
|
|
|
8730
8730
|
// Deprecated since Tailwind CSS v3.0.0
|
|
8731
8731
|
"",
|
|
8732
8732
|
"none",
|
|
8733
|
-
|
|
8734
|
-
|
|
8733
|
+
W,
|
|
8734
|
+
$
|
|
8735
8735
|
]
|
|
8736
8736
|
}],
|
|
8737
8737
|
/**
|
|
@@ -8746,14 +8746,14 @@ const Lp = (e, t) => {
|
|
|
8746
8746
|
* @see https://tailwindcss.com/docs/brightness
|
|
8747
8747
|
*/
|
|
8748
8748
|
brightness: [{
|
|
8749
|
-
brightness: [K,
|
|
8749
|
+
brightness: [K, W, $]
|
|
8750
8750
|
}],
|
|
8751
8751
|
/**
|
|
8752
8752
|
* Contrast
|
|
8753
8753
|
* @see https://tailwindcss.com/docs/contrast
|
|
8754
8754
|
*/
|
|
8755
8755
|
contrast: [{
|
|
8756
|
-
contrast: [K,
|
|
8756
|
+
contrast: [K, W, $]
|
|
8757
8757
|
}],
|
|
8758
8758
|
/**
|
|
8759
8759
|
* Drop Shadow
|
|
@@ -8781,35 +8781,35 @@ const Lp = (e, t) => {
|
|
|
8781
8781
|
* @see https://tailwindcss.com/docs/grayscale
|
|
8782
8782
|
*/
|
|
8783
8783
|
grayscale: [{
|
|
8784
|
-
grayscale: ["", K,
|
|
8784
|
+
grayscale: ["", K, W, $]
|
|
8785
8785
|
}],
|
|
8786
8786
|
/**
|
|
8787
8787
|
* Hue Rotate
|
|
8788
8788
|
* @see https://tailwindcss.com/docs/hue-rotate
|
|
8789
8789
|
*/
|
|
8790
8790
|
"hue-rotate": [{
|
|
8791
|
-
"hue-rotate": [K,
|
|
8791
|
+
"hue-rotate": [K, W, $]
|
|
8792
8792
|
}],
|
|
8793
8793
|
/**
|
|
8794
8794
|
* Invert
|
|
8795
8795
|
* @see https://tailwindcss.com/docs/invert
|
|
8796
8796
|
*/
|
|
8797
8797
|
invert: [{
|
|
8798
|
-
invert: ["", K,
|
|
8798
|
+
invert: ["", K, W, $]
|
|
8799
8799
|
}],
|
|
8800
8800
|
/**
|
|
8801
8801
|
* Saturate
|
|
8802
8802
|
* @see https://tailwindcss.com/docs/saturate
|
|
8803
8803
|
*/
|
|
8804
8804
|
saturate: [{
|
|
8805
|
-
saturate: [K,
|
|
8805
|
+
saturate: [K, W, $]
|
|
8806
8806
|
}],
|
|
8807
8807
|
/**
|
|
8808
8808
|
* Sepia
|
|
8809
8809
|
* @see https://tailwindcss.com/docs/sepia
|
|
8810
8810
|
*/
|
|
8811
8811
|
sepia: [{
|
|
8812
|
-
sepia: ["", K,
|
|
8812
|
+
sepia: ["", K, W, $]
|
|
8813
8813
|
}],
|
|
8814
8814
|
/**
|
|
8815
8815
|
* Backdrop Filter
|
|
@@ -8820,8 +8820,8 @@ const Lp = (e, t) => {
|
|
|
8820
8820
|
// Deprecated since Tailwind CSS v3.0.0
|
|
8821
8821
|
"",
|
|
8822
8822
|
"none",
|
|
8823
|
-
|
|
8824
|
-
|
|
8823
|
+
W,
|
|
8824
|
+
$
|
|
8825
8825
|
]
|
|
8826
8826
|
}],
|
|
8827
8827
|
/**
|
|
@@ -8836,56 +8836,56 @@ const Lp = (e, t) => {
|
|
|
8836
8836
|
* @see https://tailwindcss.com/docs/backdrop-brightness
|
|
8837
8837
|
*/
|
|
8838
8838
|
"backdrop-brightness": [{
|
|
8839
|
-
"backdrop-brightness": [K,
|
|
8839
|
+
"backdrop-brightness": [K, W, $]
|
|
8840
8840
|
}],
|
|
8841
8841
|
/**
|
|
8842
8842
|
* Backdrop Contrast
|
|
8843
8843
|
* @see https://tailwindcss.com/docs/backdrop-contrast
|
|
8844
8844
|
*/
|
|
8845
8845
|
"backdrop-contrast": [{
|
|
8846
|
-
"backdrop-contrast": [K,
|
|
8846
|
+
"backdrop-contrast": [K, W, $]
|
|
8847
8847
|
}],
|
|
8848
8848
|
/**
|
|
8849
8849
|
* Backdrop Grayscale
|
|
8850
8850
|
* @see https://tailwindcss.com/docs/backdrop-grayscale
|
|
8851
8851
|
*/
|
|
8852
8852
|
"backdrop-grayscale": [{
|
|
8853
|
-
"backdrop-grayscale": ["", K,
|
|
8853
|
+
"backdrop-grayscale": ["", K, W, $]
|
|
8854
8854
|
}],
|
|
8855
8855
|
/**
|
|
8856
8856
|
* Backdrop Hue Rotate
|
|
8857
8857
|
* @see https://tailwindcss.com/docs/backdrop-hue-rotate
|
|
8858
8858
|
*/
|
|
8859
8859
|
"backdrop-hue-rotate": [{
|
|
8860
|
-
"backdrop-hue-rotate": [K,
|
|
8860
|
+
"backdrop-hue-rotate": [K, W, $]
|
|
8861
8861
|
}],
|
|
8862
8862
|
/**
|
|
8863
8863
|
* Backdrop Invert
|
|
8864
8864
|
* @see https://tailwindcss.com/docs/backdrop-invert
|
|
8865
8865
|
*/
|
|
8866
8866
|
"backdrop-invert": [{
|
|
8867
|
-
"backdrop-invert": ["", K,
|
|
8867
|
+
"backdrop-invert": ["", K, W, $]
|
|
8868
8868
|
}],
|
|
8869
8869
|
/**
|
|
8870
8870
|
* Backdrop Opacity
|
|
8871
8871
|
* @see https://tailwindcss.com/docs/backdrop-opacity
|
|
8872
8872
|
*/
|
|
8873
8873
|
"backdrop-opacity": [{
|
|
8874
|
-
"backdrop-opacity": [K,
|
|
8874
|
+
"backdrop-opacity": [K, W, $]
|
|
8875
8875
|
}],
|
|
8876
8876
|
/**
|
|
8877
8877
|
* Backdrop Saturate
|
|
8878
8878
|
* @see https://tailwindcss.com/docs/backdrop-saturate
|
|
8879
8879
|
*/
|
|
8880
8880
|
"backdrop-saturate": [{
|
|
8881
|
-
"backdrop-saturate": [K,
|
|
8881
|
+
"backdrop-saturate": [K, W, $]
|
|
8882
8882
|
}],
|
|
8883
8883
|
/**
|
|
8884
8884
|
* Backdrop Sepia
|
|
8885
8885
|
* @see https://tailwindcss.com/docs/backdrop-sepia
|
|
8886
8886
|
*/
|
|
8887
8887
|
"backdrop-sepia": [{
|
|
8888
|
-
"backdrop-sepia": ["", K,
|
|
8888
|
+
"backdrop-sepia": ["", K, W, $]
|
|
8889
8889
|
}],
|
|
8890
8890
|
// --------------
|
|
8891
8891
|
// --- Tables ---
|
|
@@ -8940,7 +8940,7 @@ const Lp = (e, t) => {
|
|
|
8940
8940
|
* @see https://tailwindcss.com/docs/transition-property
|
|
8941
8941
|
*/
|
|
8942
8942
|
transition: [{
|
|
8943
|
-
transition: ["", "all", "colors", "opacity", "shadow", "transform", "none",
|
|
8943
|
+
transition: ["", "all", "colors", "opacity", "shadow", "transform", "none", W, $]
|
|
8944
8944
|
}],
|
|
8945
8945
|
/**
|
|
8946
8946
|
* Transition Behavior
|
|
@@ -8954,28 +8954,28 @@ const Lp = (e, t) => {
|
|
|
8954
8954
|
* @see https://tailwindcss.com/docs/transition-duration
|
|
8955
8955
|
*/
|
|
8956
8956
|
duration: [{
|
|
8957
|
-
duration: [K, "initial",
|
|
8957
|
+
duration: [K, "initial", W, $]
|
|
8958
8958
|
}],
|
|
8959
8959
|
/**
|
|
8960
8960
|
* Transition Timing Function
|
|
8961
8961
|
* @see https://tailwindcss.com/docs/transition-timing-function
|
|
8962
8962
|
*/
|
|
8963
8963
|
ease: [{
|
|
8964
|
-
ease: ["linear", "initial", k,
|
|
8964
|
+
ease: ["linear", "initial", k, W, $]
|
|
8965
8965
|
}],
|
|
8966
8966
|
/**
|
|
8967
8967
|
* Transition Delay
|
|
8968
8968
|
* @see https://tailwindcss.com/docs/transition-delay
|
|
8969
8969
|
*/
|
|
8970
8970
|
delay: [{
|
|
8971
|
-
delay: [K,
|
|
8971
|
+
delay: [K, W, $]
|
|
8972
8972
|
}],
|
|
8973
8973
|
/**
|
|
8974
8974
|
* Animation
|
|
8975
8975
|
* @see https://tailwindcss.com/docs/animation
|
|
8976
8976
|
*/
|
|
8977
8977
|
animate: [{
|
|
8978
|
-
animate: ["none", C,
|
|
8978
|
+
animate: ["none", C, W, $]
|
|
8979
8979
|
}],
|
|
8980
8980
|
// ------------------
|
|
8981
8981
|
// --- Transforms ---
|
|
@@ -8992,14 +8992,14 @@ const Lp = (e, t) => {
|
|
|
8992
8992
|
* @see https://tailwindcss.com/docs/perspective
|
|
8993
8993
|
*/
|
|
8994
8994
|
perspective: [{
|
|
8995
|
-
perspective: [h,
|
|
8995
|
+
perspective: [h, W, $]
|
|
8996
8996
|
}],
|
|
8997
8997
|
/**
|
|
8998
8998
|
* Perspective Origin
|
|
8999
8999
|
* @see https://tailwindcss.com/docs/perspective-origin
|
|
9000
9000
|
*/
|
|
9001
9001
|
"perspective-origin": [{
|
|
9002
|
-
"perspective-origin":
|
|
9002
|
+
"perspective-origin": A()
|
|
9003
9003
|
}],
|
|
9004
9004
|
/**
|
|
9005
9005
|
* Rotate
|
|
@@ -9088,14 +9088,14 @@ const Lp = (e, t) => {
|
|
|
9088
9088
|
* @see https://tailwindcss.com/docs/transform
|
|
9089
9089
|
*/
|
|
9090
9090
|
transform: [{
|
|
9091
|
-
transform: [$,
|
|
9091
|
+
transform: [W, $, "", "none", "gpu", "cpu"]
|
|
9092
9092
|
}],
|
|
9093
9093
|
/**
|
|
9094
9094
|
* Transform Origin
|
|
9095
9095
|
* @see https://tailwindcss.com/docs/transform-origin
|
|
9096
9096
|
*/
|
|
9097
9097
|
"transform-origin": [{
|
|
9098
|
-
origin:
|
|
9098
|
+
origin: A()
|
|
9099
9099
|
}],
|
|
9100
9100
|
/**
|
|
9101
9101
|
* Transform Style
|
|
@@ -9173,7 +9173,7 @@ const Lp = (e, t) => {
|
|
|
9173
9173
|
* @see https://tailwindcss.com/docs/cursor
|
|
9174
9174
|
*/
|
|
9175
9175
|
cursor: [{
|
|
9176
|
-
cursor: ["auto", "default", "pointer", "wait", "text", "move", "help", "not-allowed", "none", "context-menu", "progress", "cell", "crosshair", "vertical-text", "alias", "copy", "no-drop", "grab", "grabbing", "all-scroll", "col-resize", "row-resize", "n-resize", "e-resize", "s-resize", "w-resize", "ne-resize", "nw-resize", "se-resize", "sw-resize", "ew-resize", "ns-resize", "nesw-resize", "nwse-resize", "zoom-in", "zoom-out",
|
|
9176
|
+
cursor: ["auto", "default", "pointer", "wait", "text", "move", "help", "not-allowed", "none", "context-menu", "progress", "cell", "crosshair", "vertical-text", "alias", "copy", "no-drop", "grab", "grabbing", "all-scroll", "col-resize", "row-resize", "n-resize", "e-resize", "s-resize", "w-resize", "ne-resize", "nw-resize", "se-resize", "sw-resize", "ew-resize", "ns-resize", "nesw-resize", "nwse-resize", "zoom-in", "zoom-out", W, $]
|
|
9177
9177
|
}],
|
|
9178
9178
|
/**
|
|
9179
9179
|
* Field Sizing
|
|
@@ -9395,7 +9395,7 @@ const Lp = (e, t) => {
|
|
|
9395
9395
|
* @see https://tailwindcss.com/docs/will-change
|
|
9396
9396
|
*/
|
|
9397
9397
|
"will-change": [{
|
|
9398
|
-
"will-change": ["auto", "scroll", "contents", "transform",
|
|
9398
|
+
"will-change": ["auto", "scroll", "contents", "transform", W, $]
|
|
9399
9399
|
}],
|
|
9400
9400
|
// -----------
|
|
9401
9401
|
// --- SVG ---
|
|
@@ -9489,7 +9489,7 @@ const Lp = (e, t) => {
|
|
|
9489
9489
|
};
|
|
9490
9490
|
}, Ch = /* @__PURE__ */ nh(Sh);
|
|
9491
9491
|
function Gn(...e) {
|
|
9492
|
-
return Ch(
|
|
9492
|
+
return Ch(Ip(e));
|
|
9493
9493
|
}
|
|
9494
9494
|
function Yn({
|
|
9495
9495
|
...e
|
|
@@ -9508,7 +9508,7 @@ function Kn({
|
|
|
9508
9508
|
...r
|
|
9509
9509
|
}) {
|
|
9510
9510
|
return /* @__PURE__ */ u(Mp, { children: /* @__PURE__ */ u(
|
|
9511
|
-
|
|
9511
|
+
Dp,
|
|
9512
9512
|
{
|
|
9513
9513
|
"data-slot": "popover-content",
|
|
9514
9514
|
align: t,
|
|
@@ -9530,22 +9530,22 @@ function Eh({
|
|
|
9530
9530
|
disabled: a
|
|
9531
9531
|
}) {
|
|
9532
9532
|
const [s, i] = le(!1), c = t[e.name], l = Ta(() => {
|
|
9533
|
-
const
|
|
9534
|
-
if (!c) return
|
|
9535
|
-
const
|
|
9536
|
-
const
|
|
9537
|
-
return ti(
|
|
9533
|
+
const g = { from: void 0, to: void 0 };
|
|
9534
|
+
if (!c) return g;
|
|
9535
|
+
const p = (v) => {
|
|
9536
|
+
const h = new Date(v);
|
|
9537
|
+
return ti(h) ? h : void 0;
|
|
9538
9538
|
};
|
|
9539
9539
|
if (Array.isArray(c)) {
|
|
9540
|
-
const
|
|
9541
|
-
return { from:
|
|
9540
|
+
const v = c[0]?.startDate || c[0], h = c[0]?.endDate || c[1];
|
|
9541
|
+
return { from: p(v), to: p(h) };
|
|
9542
9542
|
}
|
|
9543
|
-
return { from:
|
|
9544
|
-
}, [c]), d = (
|
|
9545
|
-
|
|
9546
|
-
};
|
|
9547
|
-
return /* @__PURE__ */ u("div", { className: "relative w-full", children: /* @__PURE__ */
|
|
9548
|
-
/* @__PURE__ */ u(qn, { asChild: !0, children: /* @__PURE__ */
|
|
9543
|
+
return { from: p(c.from), to: p(c.to) };
|
|
9544
|
+
}, [c]), d = (g) => {
|
|
9545
|
+
g.preventDefault(), g.stopPropagation(), n(e.name, { from: void 0, to: void 0 }), r(e.name);
|
|
9546
|
+
}, m = [];
|
|
9547
|
+
return e.maxDate && m.push({ after: new Date(e.maxDate) }), e.minDate && m.push({ before: new Date(e.minDate) }), /* @__PURE__ */ u("div", { className: "relative w-full", children: /* @__PURE__ */ D(Yn, { open: s, onOpenChange: i, children: [
|
|
9548
|
+
/* @__PURE__ */ u(qn, { asChild: !0, children: /* @__PURE__ */ D(
|
|
9549
9549
|
"div",
|
|
9550
9550
|
{
|
|
9551
9551
|
role: "combobox",
|
|
@@ -9554,8 +9554,8 @@ function Eh({
|
|
|
9554
9554
|
"aria-controls": `${e.name}-popover`,
|
|
9555
9555
|
tabIndex: a ? -1 : 0,
|
|
9556
9556
|
onClick: () => !a && i(!0),
|
|
9557
|
-
onKeyDown: (
|
|
9558
|
-
(
|
|
9557
|
+
onKeyDown: (g) => {
|
|
9558
|
+
(g.key === "Enter" || g.key === " ") && (g.preventDefault(), i(!0));
|
|
9559
9559
|
},
|
|
9560
9560
|
className: `
|
|
9561
9561
|
flex h-10 w-full items-center justify-between rounded-md border px-3 py-2 text-sm
|
|
@@ -9564,7 +9564,7 @@ function Eh({
|
|
|
9564
9564
|
${o ? "border-destructive focus-visible:ring-destructive" : "border-input"}
|
|
9565
9565
|
`,
|
|
9566
9566
|
children: [
|
|
9567
|
-
/* @__PURE__ */
|
|
9567
|
+
/* @__PURE__ */ D("div", { className: "flex items-center gap-2 overflow-hidden pointer-events-none", children: [
|
|
9568
9568
|
/* @__PURE__ */ u(
|
|
9569
9569
|
Ra,
|
|
9570
9570
|
{
|
|
@@ -9572,12 +9572,12 @@ function Eh({
|
|
|
9572
9572
|
"aria-hidden": "true"
|
|
9573
9573
|
}
|
|
9574
9574
|
),
|
|
9575
|
-
/* @__PURE__ */ u("div", { className: "truncate", children: l?.from ? /* @__PURE__ */
|
|
9575
|
+
/* @__PURE__ */ u("div", { className: "truncate", children: l?.from ? /* @__PURE__ */ D("span", { children: [
|
|
9576
9576
|
Hr(l.from, "PP"),
|
|
9577
9577
|
l.to ? ` - ${Hr(l.to, "PP")}` : ""
|
|
9578
9578
|
] }) : /* @__PURE__ */ u("span", { className: "text-muted-foreground", children: e.placeholder || "Select range" }) })
|
|
9579
9579
|
] }),
|
|
9580
|
-
/* @__PURE__ */
|
|
9580
|
+
/* @__PURE__ */ D("div", { className: "flex items-center gap-1", children: [
|
|
9581
9581
|
l?.from && !a && /* @__PURE__ */ u(
|
|
9582
9582
|
"button",
|
|
9583
9583
|
{
|
|
@@ -9604,17 +9604,18 @@ function Eh({
|
|
|
9604
9604
|
]
|
|
9605
9605
|
}
|
|
9606
9606
|
) }),
|
|
9607
|
-
/* @__PURE__ */
|
|
9607
|
+
/* @__PURE__ */ D(Kn, { align: "start", className: "w-auto p-0", children: [
|
|
9608
9608
|
/* @__PURE__ */ u("div", { className: "p-3", children: /* @__PURE__ */ u(
|
|
9609
9609
|
Vr,
|
|
9610
9610
|
{
|
|
9611
9611
|
mode: "range",
|
|
9612
9612
|
selected: l,
|
|
9613
|
-
onSelect: (
|
|
9613
|
+
onSelect: (g) => n(
|
|
9614
9614
|
e.name,
|
|
9615
|
-
|
|
9615
|
+
g || { from: void 0, to: void 0 }
|
|
9616
9616
|
),
|
|
9617
9617
|
showOutsideDays: !0,
|
|
9618
|
+
disabled: m,
|
|
9618
9619
|
classNames: {
|
|
9619
9620
|
day_range_start: "bg-primary text-primary-foreground rounded-l-md",
|
|
9620
9621
|
day_range_end: "bg-primary text-primary-foreground rounded-r-md",
|
|
@@ -9650,77 +9651,77 @@ function Ea({
|
|
|
9650
9651
|
api_URL: i,
|
|
9651
9652
|
disabled: c
|
|
9652
9653
|
}) {
|
|
9653
|
-
const l = c, d = e.type === "multifile", m = r?.[e.name] || {}, g = t[e.name], p = d ? g || [] : [g].filter(Boolean), [
|
|
9654
|
-
!
|
|
9654
|
+
const l = c, d = e.type === "multifile", m = r?.[e.name] || {}, g = t[e.name], p = d ? g || [] : [g].filter(Boolean), [v, h] = le(!1), y = i ? `${i}uploads` : null;
|
|
9655
|
+
!y && e.uploadEndpoint && console.error(
|
|
9655
9656
|
`api_URL prop is required when using FileField with upload functionality for field "${e.name}"`
|
|
9656
9657
|
);
|
|
9657
|
-
const k = (
|
|
9658
|
-
if (
|
|
9659
|
-
const
|
|
9660
|
-
return `${parseFloat((
|
|
9661
|
-
}, C = async (
|
|
9662
|
-
const
|
|
9663
|
-
|
|
9664
|
-
const R = await fetch(`${
|
|
9658
|
+
const k = (w) => {
|
|
9659
|
+
if (w === 0) return "0 Bytes";
|
|
9660
|
+
const T = 1024, R = ["Bytes", "KB", "MB", "GB"], O = Math.floor(Math.log(w) / Math.log(T));
|
|
9661
|
+
return `${parseFloat((w / T ** O).toFixed(2))} ${R[O]}`;
|
|
9662
|
+
}, C = async (w) => {
|
|
9663
|
+
const T = new FormData();
|
|
9664
|
+
T.append("file", w);
|
|
9665
|
+
const R = await fetch(`${y}`, {
|
|
9665
9666
|
method: "POST",
|
|
9666
|
-
body:
|
|
9667
|
+
body: T
|
|
9667
9668
|
});
|
|
9668
9669
|
if (!R.ok)
|
|
9669
9670
|
throw Cn.error("Upload failed"), new Error("Upload failed");
|
|
9670
9671
|
return await R.json();
|
|
9671
|
-
}, E = async (
|
|
9672
|
-
if (!
|
|
9673
|
-
if (
|
|
9672
|
+
}, E = async (w, T) => {
|
|
9673
|
+
if (!T) return;
|
|
9674
|
+
if (w.maxSize && T.size > w.maxSize)
|
|
9674
9675
|
throw new Error(
|
|
9675
|
-
`File size must not exceed ${k(
|
|
9676
|
+
`File size must not exceed ${k(w.maxSize)}`
|
|
9676
9677
|
);
|
|
9677
|
-
const R = await C(
|
|
9678
|
-
a(
|
|
9679
|
-
},
|
|
9680
|
-
const R = t[
|
|
9681
|
-
if (
|
|
9682
|
-
throw new Error(`Maximum ${
|
|
9683
|
-
|
|
9684
|
-
if (
|
|
9678
|
+
const R = await C(T), O = { ...t, [w.name]: R };
|
|
9679
|
+
a(w.name, R), s(O);
|
|
9680
|
+
}, x = async (w, T) => {
|
|
9681
|
+
const R = t[w.name] || [];
|
|
9682
|
+
if (w.maxFiles && R.length + T.length > w.maxFiles)
|
|
9683
|
+
throw new Error(`Maximum ${w.maxFiles} files allowed`);
|
|
9684
|
+
T.forEach((S) => {
|
|
9685
|
+
if (w.maxSize && S.size > w.maxSize)
|
|
9685
9686
|
throw new Error(
|
|
9686
|
-
`Each file must not exceed ${k(
|
|
9687
|
+
`Each file must not exceed ${k(w.maxSize)}`
|
|
9687
9688
|
);
|
|
9688
9689
|
});
|
|
9689
9690
|
const O = await Promise.all(
|
|
9690
|
-
|
|
9691
|
+
T.map((S) => C(S))
|
|
9691
9692
|
// Updated call
|
|
9692
|
-
),
|
|
9693
|
-
a(
|
|
9694
|
-
},
|
|
9693
|
+
), N = [...R, ...O];
|
|
9694
|
+
a(w.name, N), s({ ...t, [w.name]: N });
|
|
9695
|
+
}, A = async (w, T) => {
|
|
9695
9696
|
if (l) return;
|
|
9696
|
-
const R = Array.from(
|
|
9697
|
+
const R = Array.from(T);
|
|
9697
9698
|
try {
|
|
9698
|
-
e.type === "multifile" ? await
|
|
9699
|
+
e.type === "multifile" ? await x(e, R) : await E(e, R[0]), o.current?.[w] && (o.current[w].value = "");
|
|
9699
9700
|
} catch (O) {
|
|
9700
9701
|
Cn.error(`Upload failed: ${O.message}`);
|
|
9701
9702
|
}
|
|
9702
|
-
},
|
|
9703
|
+
}, I = async (w, T) => {
|
|
9703
9704
|
if (l) return;
|
|
9704
9705
|
let R;
|
|
9705
|
-
e.type === "file" ? R = "" : R = (t[
|
|
9706
|
-
}, _ = (
|
|
9707
|
-
|
|
9708
|
-
}, P = (
|
|
9709
|
-
|
|
9710
|
-
},
|
|
9711
|
-
|
|
9712
|
-
}, V = e.accept ? e.accept.split(",").map((
|
|
9706
|
+
e.type === "file" ? R = "" : R = (t[w] || []).filter((N) => N !== T), a(w, R), s({ ...t, [w]: R }), o.current?.[w] && (o.current[w].value = "");
|
|
9707
|
+
}, _ = (w) => {
|
|
9708
|
+
w.preventDefault(), l || h(!0);
|
|
9709
|
+
}, P = (w) => {
|
|
9710
|
+
w.preventDefault(), l || h(!1);
|
|
9711
|
+
}, F = (w) => {
|
|
9712
|
+
w.preventDefault(), h(!1), !l && w.dataTransfer.files && w.dataTransfer.files.length > 0 && A(e.name, w.dataTransfer.files);
|
|
9713
|
+
}, V = e.accept ? e.accept.split(",").map((w) => w.split("/")[1] || w.split(".")[1] || w).join(", ").toUpperCase() : "PNG, JPG, PDF", H = e.maxSize ? `, up to ${k(e.maxSize)}` : "", G = `
|
|
9713
9714
|
w-full flex flex-col items-center justify-center p-6 border-2 border-dashed rounded-lg transition-all duration-200
|
|
9714
9715
|
// Ensure focus styling is handled correctly for the button element
|
|
9715
9716
|
focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-opacity-50
|
|
9716
|
-
${l ? "bg-gray-50 border-gray-300 text-gray-400 cursor-not-allowed opacity-70" :
|
|
9717
|
+
${l ? "bg-gray-50 border-gray-300 text-gray-400 cursor-not-allowed opacity-70" : v ? "bg-blue-50 border-blue-500 text-blue-600" : "bg-white border-gray-300 hover:border-blue-400 hover:bg-gray-50 cursor-pointer"}
|
|
9717
9718
|
`;
|
|
9718
9719
|
return /* @__PURE__ */ u(
|
|
9719
9720
|
"div",
|
|
9720
9721
|
{
|
|
9721
9722
|
className: `mb-4 ${e.fieldClass || "col-span-full"}`,
|
|
9722
|
-
children: /* @__PURE__ */
|
|
9723
|
-
/* @__PURE__ */
|
|
9723
|
+
children: /* @__PURE__ */ D("div", { className: "space-y-3", children: [
|
|
9724
|
+
/* @__PURE__ */ D(
|
|
9724
9725
|
"button",
|
|
9725
9726
|
{
|
|
9726
9727
|
type: "button",
|
|
@@ -9731,12 +9732,12 @@ function Ea({
|
|
|
9731
9732
|
onDragOver: _,
|
|
9732
9733
|
onDragEnter: _,
|
|
9733
9734
|
onDragLeave: P,
|
|
9734
|
-
onDrop:
|
|
9735
|
+
onDrop: F,
|
|
9735
9736
|
disabled: l,
|
|
9736
9737
|
children: [
|
|
9737
|
-
/* @__PURE__ */ u("div", { className: "border-gray-400 border p-1 mb-3 rounded-md bg-gray-100 shadow-md ", children: /* @__PURE__ */ u(
|
|
9738
|
-
/* @__PURE__ */
|
|
9739
|
-
/* @__PURE__ */
|
|
9738
|
+
/* @__PURE__ */ u("div", { className: "border-gray-400 border p-1 mb-3 rounded-md bg-gray-100 shadow-md ", children: /* @__PURE__ */ u(Dc, { size: 24, className: "m-1" }) }),
|
|
9739
|
+
/* @__PURE__ */ D("p", { className: "text-sm font-normal", children: [
|
|
9740
|
+
/* @__PURE__ */ D(
|
|
9740
9741
|
"span",
|
|
9741
9742
|
{
|
|
9742
9743
|
className: l ? "text-gray-400" : "text-blue-600 hover:text-blue-700 underline",
|
|
@@ -9748,7 +9749,7 @@ function Ea({
|
|
|
9748
9749
|
),
|
|
9749
9750
|
/* @__PURE__ */ u("span", { className: "font-light", children: " or drag and drop" })
|
|
9750
9751
|
] }),
|
|
9751
|
-
/* @__PURE__ */
|
|
9752
|
+
/* @__PURE__ */ D("p", { className: "text-xs mt-1 text-gray-500", children: [
|
|
9752
9753
|
V,
|
|
9753
9754
|
H,
|
|
9754
9755
|
d && e.maxFiles && `, Max ${e.maxFiles} files`
|
|
@@ -9759,28 +9760,28 @@ function Ea({
|
|
|
9759
9760
|
/* @__PURE__ */ u(
|
|
9760
9761
|
"input",
|
|
9761
9762
|
{
|
|
9762
|
-
ref: (
|
|
9763
|
-
|
|
9763
|
+
ref: (w) => {
|
|
9764
|
+
w && o && o.current && (o.current[e.name] = w);
|
|
9764
9765
|
},
|
|
9765
9766
|
id: e.name,
|
|
9766
9767
|
type: "file",
|
|
9767
9768
|
accept: e.accept,
|
|
9768
9769
|
multiple: d,
|
|
9769
9770
|
className: "sr-only",
|
|
9770
|
-
onChange: (
|
|
9771
|
+
onChange: (w) => A(e.name, w.target.files),
|
|
9771
9772
|
disabled: l
|
|
9772
9773
|
}
|
|
9773
9774
|
),
|
|
9774
|
-
p.length > 0 && /* @__PURE__ */ u("div", { className: "space-y-2 pt-2 border-t border-gray-200", children: p.map((
|
|
9775
|
-
const R =
|
|
9776
|
-
return /* @__PURE__ */
|
|
9775
|
+
p.length > 0 && /* @__PURE__ */ u("div", { className: "space-y-2 pt-2 border-t border-gray-200", children: p.map((w, T) => {
|
|
9776
|
+
const R = w.original_name || w.name || "File", O = w.size || null;
|
|
9777
|
+
return /* @__PURE__ */ D(
|
|
9777
9778
|
"div",
|
|
9778
9779
|
{
|
|
9779
9780
|
className: "flex items-center justify-between p-2 bg-gray-50 rounded",
|
|
9780
9781
|
children: [
|
|
9781
|
-
/* @__PURE__ */
|
|
9782
|
+
/* @__PURE__ */ D("div", { className: "flex items-center space-x-2 min-w-0", children: [
|
|
9782
9783
|
/* @__PURE__ */ u("span", { className: "text-sm truncate", children: R }),
|
|
9783
|
-
O && /* @__PURE__ */
|
|
9784
|
+
O && /* @__PURE__ */ D("span", { className: "text-xs text-gray-500 flex-shrink-0", children: [
|
|
9784
9785
|
"(",
|
|
9785
9786
|
k(O),
|
|
9786
9787
|
")"
|
|
@@ -9790,7 +9791,7 @@ function Ea({
|
|
|
9790
9791
|
"button",
|
|
9791
9792
|
{
|
|
9792
9793
|
type: "button",
|
|
9793
|
-
onClick: () =>
|
|
9794
|
+
onClick: () => I(e.name, w),
|
|
9794
9795
|
className: `text-red-500 hover:text-red-700 ml-3 flex-shrink-0 ${l ? "cursor-not-allowed opacity-50" : ""}`,
|
|
9795
9796
|
disabled: l,
|
|
9796
9797
|
children: "Remove"
|
|
@@ -9798,17 +9799,17 @@ function Ea({
|
|
|
9798
9799
|
)
|
|
9799
9800
|
]
|
|
9800
9801
|
},
|
|
9801
|
-
|
|
9802
|
+
w.url || w.original_name || T
|
|
9802
9803
|
);
|
|
9803
9804
|
}) }),
|
|
9804
|
-
Object.entries(m).map(([
|
|
9805
|
-
/* @__PURE__ */
|
|
9806
|
-
/* @__PURE__ */
|
|
9805
|
+
Object.entries(m).map(([w, T]) => T.status === "uploading" ? /* @__PURE__ */ D("div", { className: "relative pt-1", children: [
|
|
9806
|
+
/* @__PURE__ */ D("div", { className: "flex items-center justify-between", children: [
|
|
9807
|
+
/* @__PURE__ */ D("span", { className: "text-xs font-semibold inline-block text-blue-600", children: [
|
|
9807
9808
|
"Uploading ",
|
|
9808
|
-
|
|
9809
|
+
w
|
|
9809
9810
|
] }),
|
|
9810
|
-
/* @__PURE__ */
|
|
9811
|
-
|
|
9811
|
+
/* @__PURE__ */ D("span", { className: "text-xs font-semibold inline-block text-blue-600", children: [
|
|
9812
|
+
T.progress,
|
|
9812
9813
|
"%"
|
|
9813
9814
|
] })
|
|
9814
9815
|
] }),
|
|
@@ -9816,10 +9817,10 @@ function Ea({
|
|
|
9816
9817
|
"div",
|
|
9817
9818
|
{
|
|
9818
9819
|
className: "shadow-none flex flex-col text-center whitespace-nowrap text-white justify-center bg-blue-500",
|
|
9819
|
-
style: { width: `${
|
|
9820
|
+
style: { width: `${T.progress}%` }
|
|
9820
9821
|
}
|
|
9821
9822
|
) })
|
|
9822
|
-
] },
|
|
9823
|
+
] }, w) : null)
|
|
9823
9824
|
] })
|
|
9824
9825
|
},
|
|
9825
9826
|
e.name
|
|
@@ -9847,7 +9848,7 @@ function kh({
|
|
|
9847
9848
|
[e.name]: g.target.value.length
|
|
9848
9849
|
}));
|
|
9849
9850
|
};
|
|
9850
|
-
return /* @__PURE__ */
|
|
9851
|
+
return /* @__PURE__ */ D("div", { className: "space-y-2", children: [
|
|
9851
9852
|
/* @__PURE__ */ u(
|
|
9852
9853
|
"textarea",
|
|
9853
9854
|
{
|
|
@@ -9869,7 +9870,7 @@ function kh({
|
|
|
9869
9870
|
}
|
|
9870
9871
|
}
|
|
9871
9872
|
),
|
|
9872
|
-
/* @__PURE__ */ u("div", { className: "flex justify-between items-center", children: e.maxLength && !e.readOnly && /* @__PURE__ */
|
|
9873
|
+
/* @__PURE__ */ u("div", { className: "flex justify-between items-center", children: e.maxLength && !e.readOnly && /* @__PURE__ */ D("span", { className: "text-xs text-gray-500", children: [
|
|
9873
9874
|
a || 0,
|
|
9874
9875
|
"/",
|
|
9875
9876
|
e.maxLength,
|
|
@@ -9878,35 +9879,35 @@ function kh({
|
|
|
9878
9879
|
] });
|
|
9879
9880
|
}
|
|
9880
9881
|
function Ah({ field: e, formValues: t, handleChange: n, handleBlur: r, error: o }) {
|
|
9881
|
-
const [a, s] = le(!1), i = t[e.name], c = i ? new Date(i) : null, l = c ? (c.getHours() % 12 || 12).toString().padStart(2, "0") : "12", d = c ? c.getMinutes().toString().padStart(2, "0") : "00", m = c ? c.getHours() >= 12 ? "PM" : "AM" : "PM", g = (
|
|
9882
|
-
if (!
|
|
9882
|
+
const [a, s] = le(!1), i = t[e.name], c = i ? new Date(i) : null, l = c ? (c.getHours() % 12 || 12).toString().padStart(2, "0") : "12", d = c ? c.getMinutes().toString().padStart(2, "0") : "00", m = c ? c.getHours() >= 12 ? "PM" : "AM" : "PM", g = (A) => {
|
|
9883
|
+
if (!A) {
|
|
9883
9884
|
n(e.name, null);
|
|
9884
9885
|
return;
|
|
9885
9886
|
}
|
|
9886
|
-
const
|
|
9887
|
-
c ? (
|
|
9888
|
-
}, p = (
|
|
9889
|
-
const
|
|
9890
|
-
let
|
|
9891
|
-
|
|
9892
|
-
}, w = () => {
|
|
9893
|
-
let y = parseInt(l);
|
|
9894
|
-
y = y % 12 + 1, p(y.toString(), d, m);
|
|
9895
|
-
}, h = () => {
|
|
9896
|
-
let y = parseInt(l);
|
|
9897
|
-
y = y === 1 ? 12 : y - 1, p(y.toString(), d, m);
|
|
9887
|
+
const I = new Date(A);
|
|
9888
|
+
c ? (I.setHours(c.getHours()), I.setMinutes(c.getMinutes())) : (I.setHours(12), I.setMinutes(0)), n(e.name, I);
|
|
9889
|
+
}, p = (A, I, _) => {
|
|
9890
|
+
const P = c ? new Date(c) : /* @__PURE__ */ new Date();
|
|
9891
|
+
let F = parseInt(A);
|
|
9892
|
+
_ === "PM" && F !== 12 && (F += 12), _ === "AM" && F === 12 && (F = 0), P.setHours(F), P.setMinutes(parseInt(I)), n(e.name, P);
|
|
9898
9893
|
}, v = () => {
|
|
9899
|
-
let
|
|
9900
|
-
|
|
9894
|
+
let A = parseInt(l);
|
|
9895
|
+
A = A % 12 + 1, p(A.toString(), d, m);
|
|
9896
|
+
}, h = () => {
|
|
9897
|
+
let A = parseInt(l);
|
|
9898
|
+
A = A === 1 ? 12 : A - 1, p(A.toString(), d, m);
|
|
9899
|
+
}, y = () => {
|
|
9900
|
+
let A = parseInt(d);
|
|
9901
|
+
A = (A + 5) % 60, p(l, A.toString(), m);
|
|
9901
9902
|
}, k = () => {
|
|
9902
|
-
let
|
|
9903
|
-
|
|
9903
|
+
let A = parseInt(d);
|
|
9904
|
+
A = A === 0 ? 55 : A - 5, p(l, A.toString(), m);
|
|
9904
9905
|
}, C = () => {
|
|
9905
9906
|
p(l, d, m === "AM" ? "PM" : "AM");
|
|
9906
|
-
}, E = () => n(e.name, null);
|
|
9907
|
-
return /* @__PURE__ */
|
|
9908
|
-
/* @__PURE__ */
|
|
9909
|
-
/* @__PURE__ */ u(qn, { asChild: !0, children: /* @__PURE__ */
|
|
9907
|
+
}, E = () => n(e.name, null), x = [];
|
|
9908
|
+
return e.maxDate && x.push({ after: new Date(e.maxDate) }), e.minDate && x.push({ before: new Date(e.minDate) }), /* @__PURE__ */ D("div", { className: "relative", children: [
|
|
9909
|
+
/* @__PURE__ */ D(Yn, { open: a, onOpenChange: s, children: [
|
|
9910
|
+
/* @__PURE__ */ u(qn, { asChild: !0, children: /* @__PURE__ */ D(
|
|
9910
9911
|
"button",
|
|
9911
9912
|
{
|
|
9912
9913
|
type: "button",
|
|
@@ -9914,7 +9915,7 @@ function Ah({ field: e, formValues: t, handleChange: n, handleBlur: r, error: o
|
|
|
9914
9915
|
"aria-haspopup": "dialog",
|
|
9915
9916
|
"aria-expanded": a,
|
|
9916
9917
|
onClick: () => s(!0),
|
|
9917
|
-
onKeyDown: (
|
|
9918
|
+
onKeyDown: (A) => A.key === "Enter" && s(!0),
|
|
9918
9919
|
className: `
|
|
9919
9920
|
group inline-flex items-center justify-between gap-2
|
|
9920
9921
|
w-full h-10 rounded-lg border bg-white
|
|
@@ -9926,7 +9927,7 @@ function Ah({ field: e, formValues: t, handleChange: n, handleBlur: r, error: o
|
|
|
9926
9927
|
`,
|
|
9927
9928
|
children: [
|
|
9928
9929
|
c ? /* @__PURE__ */ u("span", { className: "text-slate-900 ", children: c.toLocaleString() }) : /* @__PURE__ */ u("span", { className: "text-slate-400", children: e.placeholder || "Select date and time" }),
|
|
9929
|
-
/* @__PURE__ */
|
|
9930
|
+
/* @__PURE__ */ D(
|
|
9930
9931
|
"svg",
|
|
9931
9932
|
{
|
|
9932
9933
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -9950,7 +9951,7 @@ function Ah({ field: e, formValues: t, handleChange: n, handleBlur: r, error: o
|
|
|
9950
9951
|
]
|
|
9951
9952
|
}
|
|
9952
9953
|
) }),
|
|
9953
|
-
/* @__PURE__ */
|
|
9954
|
+
/* @__PURE__ */ D(
|
|
9954
9955
|
Kn,
|
|
9955
9956
|
{
|
|
9956
9957
|
align: "start",
|
|
@@ -9964,6 +9965,7 @@ function Ah({ field: e, formValues: t, handleChange: n, handleBlur: r, error: o
|
|
|
9964
9965
|
selected: c,
|
|
9965
9966
|
onSelect: g,
|
|
9966
9967
|
showOutsideDays: !0,
|
|
9968
|
+
disabled: x,
|
|
9967
9969
|
className: "p-0",
|
|
9968
9970
|
classNames: {
|
|
9969
9971
|
day_selected: "bg-blue-600 text-white hover:bg-blue-600 hover:text-white focus:bg-blue-600 focus:text-white rounded-md",
|
|
@@ -9973,21 +9975,21 @@ function Ah({ field: e, formValues: t, handleChange: n, handleBlur: r, error: o
|
|
|
9973
9975
|
}
|
|
9974
9976
|
}
|
|
9975
9977
|
) }),
|
|
9976
|
-
/* @__PURE__ */ u("div", { className: "border-t border-slate-100 p-4 bg-slate-50/50", children: /* @__PURE__ */
|
|
9977
|
-
/* @__PURE__ */
|
|
9978
|
-
/* @__PURE__ */
|
|
9979
|
-
/* @__PURE__ */ u("button", { type: "button", onClick:
|
|
9978
|
+
/* @__PURE__ */ u("div", { className: "border-t border-slate-100 p-4 bg-slate-50/50", children: /* @__PURE__ */ D("div", { className: "flex items-center justify-center gap-4", children: [
|
|
9979
|
+
/* @__PURE__ */ D("div", { className: "flex items-center gap-2", children: [
|
|
9980
|
+
/* @__PURE__ */ D("div", { className: "flex flex-col items-center gap-1", children: [
|
|
9981
|
+
/* @__PURE__ */ u("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__ */ u("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__ */ u("path", { d: "m18 15-6-6-6 6" }) }) }),
|
|
9980
9982
|
/* @__PURE__ */ u("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: l }),
|
|
9981
9983
|
/* @__PURE__ */ u("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__ */ u("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__ */ u("path", { d: "m6 9 6 6 6-6" }) }) })
|
|
9982
9984
|
] }),
|
|
9983
9985
|
/* @__PURE__ */ u("span", { className: "text-xl font-medium text-slate-300 pb-1", children: ":" }),
|
|
9984
|
-
/* @__PURE__ */
|
|
9985
|
-
/* @__PURE__ */ u("button", { type: "button", onClick:
|
|
9986
|
+
/* @__PURE__ */ D("div", { className: "flex flex-col items-center gap-1", children: [
|
|
9987
|
+
/* @__PURE__ */ u("button", { type: "button", onClick: y, 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__ */ u("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__ */ u("path", { d: "m18 15-6-6-6 6" }) }) }),
|
|
9986
9988
|
/* @__PURE__ */ u("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 }),
|
|
9987
9989
|
/* @__PURE__ */ u("button", { type: "button", onClick: k, 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__ */ u("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__ */ u("path", { d: "m6 9 6 6 6-6" }) }) })
|
|
9988
9990
|
] })
|
|
9989
9991
|
] }),
|
|
9990
|
-
/* @__PURE__ */
|
|
9992
|
+
/* @__PURE__ */ D("div", { className: "flex flex-col gap-1 bg-white p-1 rounded-lg border border-slate-200 shadow-sm", children: [
|
|
9991
9993
|
/* @__PURE__ */ u(
|
|
9992
9994
|
"button",
|
|
9993
9995
|
{
|
|
@@ -10008,7 +10010,7 @@ function Ah({ field: e, formValues: t, handleChange: n, handleBlur: r, error: o
|
|
|
10008
10010
|
)
|
|
10009
10011
|
] })
|
|
10010
10012
|
] }) }),
|
|
10011
|
-
/* @__PURE__ */
|
|
10013
|
+
/* @__PURE__ */ D("div", { className: "flex items-center justify-between gap-2 border-t border-slate-100 p-3 bg-white rounded-b-xl", children: [
|
|
10012
10014
|
/* @__PURE__ */ u(
|
|
10013
10015
|
"button",
|
|
10014
10016
|
{
|
|
@@ -10061,7 +10063,7 @@ function Rh(e) {
|
|
|
10061
10063
|
const t = f.forwardRef((n, r) => {
|
|
10062
10064
|
let { children: o, ...a } = n;
|
|
10063
10065
|
if (Ti(o) && typeof On == "function" && (o = On(o._payload)), f.isValidElement(o)) {
|
|
10064
|
-
const s =
|
|
10066
|
+
const s = Dh(o), i = Mh(a, o.props);
|
|
10065
10067
|
return o.type !== f.Fragment && (i.ref = r ? Yr(r, s) : s), f.cloneElement(o, i);
|
|
10066
10068
|
}
|
|
10067
10069
|
return f.Children.count(o) > 1 ? f.Children.only(null) : null;
|
|
@@ -10083,11 +10085,11 @@ function Mh(e, t) {
|
|
|
10083
10085
|
}
|
|
10084
10086
|
return { ...e, ...n };
|
|
10085
10087
|
}
|
|
10086
|
-
function
|
|
10088
|
+
function Dh(e) {
|
|
10087
10089
|
let t = Object.getOwnPropertyDescriptor(e.props, "ref")?.get, n = t && "isReactWarning" in t && t.isReactWarning;
|
|
10088
10090
|
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);
|
|
10089
10091
|
}
|
|
10090
|
-
var
|
|
10092
|
+
var Ih = [
|
|
10091
10093
|
"a",
|
|
10092
10094
|
"button",
|
|
10093
10095
|
"div",
|
|
@@ -10105,7 +10107,7 @@ var Dh = [
|
|
|
10105
10107
|
"span",
|
|
10106
10108
|
"svg",
|
|
10107
10109
|
"ul"
|
|
10108
|
-
], Lh =
|
|
10110
|
+
], Lh = Ih.reduce((e, t) => {
|
|
10109
10111
|
const n = /* @__PURE__ */ Ph(`Primitive.${t}`), r = f.forwardRef((o, a) => {
|
|
10110
10112
|
const { asChild: s, ...i } = o, c = s ? n : t;
|
|
10111
10113
|
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ u(c, { ...i, ref: a });
|
|
@@ -10149,7 +10151,7 @@ function Ar({
|
|
|
10149
10151
|
);
|
|
10150
10152
|
}
|
|
10151
10153
|
function Bh({ field: e }) {
|
|
10152
|
-
return e?.label ? /* @__PURE__ */
|
|
10154
|
+
return e?.label ? /* @__PURE__ */ D("div", { className: "relative flex items-center py-4", children: [
|
|
10153
10155
|
/* @__PURE__ */ u(Ar, { className: "flex-1 h-px bg-gray-300" }),
|
|
10154
10156
|
/* @__PURE__ */ u("span", { className: "px-3 font-medium text-gray-600 bg-white", children: e.label }),
|
|
10155
10157
|
/* @__PURE__ */ u(Ar, { className: "flex-1 h-px bg-gray-300" })
|
|
@@ -10222,12 +10224,12 @@ var Kh = f.forwardRef((e, t) => {
|
|
|
10222
10224
|
onEntryFocus: l,
|
|
10223
10225
|
preventScrollOnEntryFocus: d = !1,
|
|
10224
10226
|
...m
|
|
10225
|
-
} = e, g = f.useRef(null), p = ie(t, g),
|
|
10227
|
+
} = e, g = f.useRef(null), p = ie(t, g), v = qr(a), [h, y] = Xt({
|
|
10226
10228
|
prop: s,
|
|
10227
10229
|
defaultProp: i ?? null,
|
|
10228
10230
|
onChange: c,
|
|
10229
10231
|
caller: tn
|
|
10230
|
-
}), [k, C] = f.useState(!1), E = et(l),
|
|
10232
|
+
}), [k, C] = f.useState(!1), E = et(l), x = Oi(n), A = f.useRef(!1), [I, _] = f.useState(0);
|
|
10231
10233
|
return f.useEffect(() => {
|
|
10232
10234
|
const P = g.current;
|
|
10233
10235
|
if (P)
|
|
@@ -10237,12 +10239,12 @@ var Kh = f.forwardRef((e, t) => {
|
|
|
10237
10239
|
{
|
|
10238
10240
|
scope: n,
|
|
10239
10241
|
orientation: r,
|
|
10240
|
-
dir:
|
|
10242
|
+
dir: v,
|
|
10241
10243
|
loop: o,
|
|
10242
10244
|
currentTabStopId: h,
|
|
10243
10245
|
onItemFocus: f.useCallback(
|
|
10244
|
-
(P) =>
|
|
10245
|
-
[
|
|
10246
|
+
(P) => y(P),
|
|
10247
|
+
[y]
|
|
10246
10248
|
),
|
|
10247
10249
|
onItemShiftTab: f.useCallback(() => C(!0), []),
|
|
10248
10250
|
onFocusableItemAdd: f.useCallback(
|
|
@@ -10256,33 +10258,33 @@ var Kh = f.forwardRef((e, t) => {
|
|
|
10256
10258
|
children: /* @__PURE__ */ u(
|
|
10257
10259
|
Ri.div,
|
|
10258
10260
|
{
|
|
10259
|
-
tabIndex: k ||
|
|
10261
|
+
tabIndex: k || I === 0 ? -1 : 0,
|
|
10260
10262
|
"data-orientation": r,
|
|
10261
10263
|
...m,
|
|
10262
10264
|
ref: p,
|
|
10263
10265
|
style: { outline: "none", ...e.style },
|
|
10264
10266
|
onMouseDown: Z(e.onMouseDown, () => {
|
|
10265
|
-
|
|
10267
|
+
A.current = !0;
|
|
10266
10268
|
}),
|
|
10267
10269
|
onFocus: Z(e.onFocus, (P) => {
|
|
10268
|
-
const
|
|
10269
|
-
if (P.target === P.currentTarget &&
|
|
10270
|
+
const F = !A.current;
|
|
10271
|
+
if (P.target === P.currentTarget && F && !k) {
|
|
10270
10272
|
const V = new CustomEvent(Nr, jh);
|
|
10271
10273
|
if (P.currentTarget.dispatchEvent(V), !V.defaultPrevented) {
|
|
10272
|
-
const H =
|
|
10274
|
+
const H = x().filter((O) => O.focusable), G = H.find((O) => O.active), w = H.find((O) => O.id === h), R = [G, w, ...H].filter(
|
|
10273
10275
|
Boolean
|
|
10274
10276
|
).map((O) => O.ref.current);
|
|
10275
10277
|
Li(R, d);
|
|
10276
10278
|
}
|
|
10277
10279
|
}
|
|
10278
|
-
|
|
10280
|
+
A.current = !1;
|
|
10279
10281
|
}),
|
|
10280
10282
|
onBlur: Z(e.onBlur, () => C(!1))
|
|
10281
10283
|
}
|
|
10282
10284
|
)
|
|
10283
10285
|
}
|
|
10284
10286
|
);
|
|
10285
|
-
}),
|
|
10287
|
+
}), Di = "RovingFocusGroupItem", Ii = f.forwardRef(
|
|
10286
10288
|
(e, t) => {
|
|
10287
10289
|
const {
|
|
10288
10290
|
__scopeRovingFocusGroup: n,
|
|
@@ -10291,11 +10293,11 @@ var Kh = f.forwardRef((e, t) => {
|
|
|
10291
10293
|
tabStopId: a,
|
|
10292
10294
|
children: s,
|
|
10293
10295
|
...i
|
|
10294
|
-
} = e, c = Zt(), l = a || c, d = qh(
|
|
10296
|
+
} = e, c = Zt(), l = a || c, d = qh(Di, n), m = d.currentTabStopId === l, g = Oi(n), { onFocusableItemAdd: p, onFocusableItemRemove: v, currentTabStopId: h } = d;
|
|
10295
10297
|
return f.useEffect(() => {
|
|
10296
10298
|
if (r)
|
|
10297
|
-
return p(), () =>
|
|
10298
|
-
}, [r, p,
|
|
10299
|
+
return p(), () => v();
|
|
10300
|
+
}, [r, p, v]), /* @__PURE__ */ u(
|
|
10299
10301
|
jr.ItemSlot,
|
|
10300
10302
|
{
|
|
10301
10303
|
scope: n,
|
|
@@ -10309,26 +10311,26 @@ var Kh = f.forwardRef((e, t) => {
|
|
|
10309
10311
|
"data-orientation": d.orientation,
|
|
10310
10312
|
...i,
|
|
10311
10313
|
ref: t,
|
|
10312
|
-
onMouseDown: Z(e.onMouseDown, (
|
|
10313
|
-
r ? d.onItemFocus(l) :
|
|
10314
|
+
onMouseDown: Z(e.onMouseDown, (y) => {
|
|
10315
|
+
r ? d.onItemFocus(l) : y.preventDefault();
|
|
10314
10316
|
}),
|
|
10315
10317
|
onFocus: Z(e.onFocus, () => d.onItemFocus(l)),
|
|
10316
|
-
onKeyDown: Z(e.onKeyDown, (
|
|
10317
|
-
if (
|
|
10318
|
+
onKeyDown: Z(e.onKeyDown, (y) => {
|
|
10319
|
+
if (y.key === "Tab" && y.shiftKey) {
|
|
10318
10320
|
d.onItemShiftTab();
|
|
10319
10321
|
return;
|
|
10320
10322
|
}
|
|
10321
|
-
if (
|
|
10322
|
-
const k = Zh(
|
|
10323
|
+
if (y.target !== y.currentTarget) return;
|
|
10324
|
+
const k = Zh(y, d.orientation, d.dir);
|
|
10323
10325
|
if (k !== void 0) {
|
|
10324
|
-
if (
|
|
10325
|
-
|
|
10326
|
-
let E = g().filter((
|
|
10326
|
+
if (y.metaKey || y.ctrlKey || y.altKey || y.shiftKey) return;
|
|
10327
|
+
y.preventDefault();
|
|
10328
|
+
let E = g().filter((x) => x.focusable).map((x) => x.ref.current);
|
|
10327
10329
|
if (k === "last") E.reverse();
|
|
10328
10330
|
else if (k === "prev" || k === "next") {
|
|
10329
10331
|
k === "prev" && E.reverse();
|
|
10330
|
-
const
|
|
10331
|
-
E = d.loop ? Jh(E,
|
|
10332
|
+
const x = E.indexOf(y.currentTarget);
|
|
10333
|
+
E = d.loop ? Jh(E, x + 1) : E.slice(x + 1);
|
|
10332
10334
|
}
|
|
10333
10335
|
setTimeout(() => Li(E));
|
|
10334
10336
|
}
|
|
@@ -10340,7 +10342,7 @@ var Kh = f.forwardRef((e, t) => {
|
|
|
10340
10342
|
);
|
|
10341
10343
|
}
|
|
10342
10344
|
);
|
|
10343
|
-
|
|
10345
|
+
Ii.displayName = Di;
|
|
10344
10346
|
var Xh = {
|
|
10345
10347
|
ArrowLeft: "prev",
|
|
10346
10348
|
ArrowUp: "prev",
|
|
@@ -10367,7 +10369,7 @@ function Li(e, t = !1) {
|
|
|
10367
10369
|
function Jh(e, t) {
|
|
10368
10370
|
return e.map((n, r) => e[(t + r) % e.length]);
|
|
10369
10371
|
}
|
|
10370
|
-
var eg = Mi, tg =
|
|
10372
|
+
var eg = Mi, tg = Ii, fo = "Radio", [ng, Fi] = ht(fo), [rg, og] = ng(fo), $i = f.forwardRef(
|
|
10371
10373
|
(e, t) => {
|
|
10372
10374
|
const {
|
|
10373
10375
|
__scopeRadio: n,
|
|
@@ -10379,8 +10381,8 @@ var eg = Mi, tg = Di, fo = "Radio", [ng, Fi] = ht(fo), [rg, og] = ng(fo), $i = f
|
|
|
10379
10381
|
onCheck: c,
|
|
10380
10382
|
form: l,
|
|
10381
10383
|
...d
|
|
10382
|
-
} = e, [m, g] = f.useState(null), p = ie(t, (
|
|
10383
|
-
return /* @__PURE__ */
|
|
10384
|
+
} = e, [m, g] = f.useState(null), p = ie(t, (y) => g(y)), v = f.useRef(!1), h = m ? l || !!m.closest("form") : !0;
|
|
10385
|
+
return /* @__PURE__ */ D(rg, { scope: n, checked: o, disabled: s, children: [
|
|
10384
10386
|
/* @__PURE__ */ u(
|
|
10385
10387
|
Xn.button,
|
|
10386
10388
|
{
|
|
@@ -10393,8 +10395,8 @@ var eg = Mi, tg = Di, fo = "Radio", [ng, Fi] = ht(fo), [rg, og] = ng(fo), $i = f
|
|
|
10393
10395
|
value: i,
|
|
10394
10396
|
...d,
|
|
10395
10397
|
ref: p,
|
|
10396
|
-
onClick: Z(e.onClick, (
|
|
10397
|
-
o || c?.(), h && (
|
|
10398
|
+
onClick: Z(e.onClick, (y) => {
|
|
10399
|
+
o || c?.(), h && (v.current = y.isPropagationStopped(), v.current || y.stopPropagation());
|
|
10398
10400
|
})
|
|
10399
10401
|
}
|
|
10400
10402
|
),
|
|
@@ -10402,7 +10404,7 @@ var eg = Mi, tg = Di, fo = "Radio", [ng, Fi] = ht(fo), [rg, og] = ng(fo), $i = f
|
|
|
10402
10404
|
Bi,
|
|
10403
10405
|
{
|
|
10404
10406
|
control: m,
|
|
10405
|
-
bubbles: !
|
|
10407
|
+
bubbles: !v.current,
|
|
10406
10408
|
name: r,
|
|
10407
10409
|
value: i,
|
|
10408
10410
|
checked: o,
|
|
@@ -10448,8 +10450,8 @@ var ag = "RadioBubbleInput", Bi = f.forwardRef(
|
|
|
10448
10450
|
"checked"
|
|
10449
10451
|
).set;
|
|
10450
10452
|
if (c !== n && p) {
|
|
10451
|
-
const
|
|
10452
|
-
p.call(d, n), d.dispatchEvent(
|
|
10453
|
+
const v = new Event("click", { bubbles: r });
|
|
10454
|
+
p.call(d, n), d.dispatchEvent(v);
|
|
10453
10455
|
}
|
|
10454
10456
|
}, [c, n, r]), /* @__PURE__ */ u(
|
|
10455
10457
|
Xn.input,
|
|
@@ -10493,7 +10495,7 @@ var sg = ["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"], Qn = "RadioGroup",
|
|
|
10493
10495
|
loop: d = !0,
|
|
10494
10496
|
onValueChange: m,
|
|
10495
10497
|
...g
|
|
10496
|
-
} = e, p = Ui(n),
|
|
10498
|
+
} = e, p = Ui(n), v = qr(l), [h, y] = Xt({
|
|
10497
10499
|
prop: a,
|
|
10498
10500
|
defaultProp: o ?? null,
|
|
10499
10501
|
onChange: m,
|
|
@@ -10507,14 +10509,14 @@ var sg = ["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"], Qn = "RadioGroup",
|
|
|
10507
10509
|
required: s,
|
|
10508
10510
|
disabled: i,
|
|
10509
10511
|
value: h,
|
|
10510
|
-
onValueChange:
|
|
10512
|
+
onValueChange: y,
|
|
10511
10513
|
children: /* @__PURE__ */ u(
|
|
10512
10514
|
eg,
|
|
10513
10515
|
{
|
|
10514
10516
|
asChild: !0,
|
|
10515
10517
|
...p,
|
|
10516
10518
|
orientation: c,
|
|
10517
|
-
dir:
|
|
10519
|
+
dir: v,
|
|
10518
10520
|
loop: d,
|
|
10519
10521
|
children: /* @__PURE__ */ u(
|
|
10520
10522
|
Xn.div,
|
|
@@ -10523,7 +10525,7 @@ var sg = ["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"], Qn = "RadioGroup",
|
|
|
10523
10525
|
"aria-required": s,
|
|
10524
10526
|
"aria-orientation": c,
|
|
10525
10527
|
"data-disabled": i ? "" : void 0,
|
|
10526
|
-
dir:
|
|
10528
|
+
dir: v,
|
|
10527
10529
|
...g,
|
|
10528
10530
|
ref: t
|
|
10529
10531
|
}
|
|
@@ -10541,9 +10543,9 @@ var Gi = "RadioGroupItem", Yi = f.forwardRef(
|
|
|
10541
10543
|
return f.useEffect(() => {
|
|
10542
10544
|
const p = (h) => {
|
|
10543
10545
|
sg.includes(h.key) && (g.current = !0);
|
|
10544
|
-
},
|
|
10545
|
-
return document.addEventListener("keydown", p), document.addEventListener("keyup",
|
|
10546
|
-
document.removeEventListener("keydown", p), document.removeEventListener("keyup",
|
|
10546
|
+
}, v = () => g.current = !1;
|
|
10547
|
+
return document.addEventListener("keydown", p), document.addEventListener("keyup", v), () => {
|
|
10548
|
+
document.removeEventListener("keydown", p), document.removeEventListener("keyup", v);
|
|
10547
10549
|
};
|
|
10548
10550
|
}, []), /* @__PURE__ */ u(
|
|
10549
10551
|
tg,
|
|
@@ -10642,8 +10644,8 @@ function hg({
|
|
|
10642
10644
|
setCharCounts: d,
|
|
10643
10645
|
fileInputRefs: m,
|
|
10644
10646
|
...g
|
|
10645
|
-
} = s, p = t[e.name] || "",
|
|
10646
|
-
return /* @__PURE__ */
|
|
10647
|
+
} = s, p = t[e.name] || "", v = a, h = e.options || [], y = e.inline || !1, k = e.renderType === "segment", C = g["aria-describedby"], E = k ? "mt-2 inline-flex w-full p-1 rounded-lg bg-muted/50 border border-border shadow-inner" : y ? "flex flex-wrap gap-6 mt-2" : "space-y-4 mt-2";
|
|
10648
|
+
return /* @__PURE__ */ D(
|
|
10647
10649
|
"fieldset",
|
|
10648
10650
|
{
|
|
10649
10651
|
className: `mb-4 ${e.fieldClass ? e.fieldClass : "col-span-full"}`,
|
|
@@ -10656,14 +10658,14 @@ function hg({
|
|
|
10656
10658
|
{
|
|
10657
10659
|
...g,
|
|
10658
10660
|
value: p,
|
|
10659
|
-
onValueChange: (
|
|
10660
|
-
n(e.name,
|
|
10661
|
+
onValueChange: (x) => {
|
|
10662
|
+
n(e.name, x), r(e.name);
|
|
10661
10663
|
},
|
|
10662
|
-
disabled:
|
|
10664
|
+
disabled: v,
|
|
10663
10665
|
className: E,
|
|
10664
|
-
children: h.map((
|
|
10665
|
-
const
|
|
10666
|
-
return k ? /* @__PURE__ */
|
|
10666
|
+
children: h.map((x) => {
|
|
10667
|
+
const A = typeof x == "object" ? x.value : x, I = typeof x == "object" ? x.label : x, _ = typeof x == "object" ? x.description : null, P = `${e.name}-${A}`, F = p === A;
|
|
10668
|
+
return k ? /* @__PURE__ */ D(
|
|
10667
10669
|
"label",
|
|
10668
10670
|
{
|
|
10669
10671
|
htmlFor: P,
|
|
@@ -10671,56 +10673,56 @@ function hg({
|
|
|
10671
10673
|
relative flex-1 min-w-max text-center px-4 py-2 rounded-md text-sm font-medium
|
|
10672
10674
|
transition-all duration-200 cursor-pointer select-none
|
|
10673
10675
|
focus-within:ring-2 focus-within:ring-ring focus-within:ring-offset-2
|
|
10674
|
-
${
|
|
10675
|
-
${
|
|
10676
|
+
${F ? "bg-background text-primary shadow-sm" : "text-muted-foreground hover:text-foreground"}
|
|
10677
|
+
${v ? "opacity-40 cursor-not-allowed" : ""}
|
|
10676
10678
|
`,
|
|
10677
10679
|
children: [
|
|
10678
10680
|
/* @__PURE__ */ u(
|
|
10679
10681
|
Aa,
|
|
10680
10682
|
{
|
|
10681
|
-
value:
|
|
10683
|
+
value: A,
|
|
10682
10684
|
id: P,
|
|
10683
|
-
disabled:
|
|
10685
|
+
disabled: v,
|
|
10684
10686
|
className: "sr-only"
|
|
10685
10687
|
}
|
|
10686
10688
|
),
|
|
10687
|
-
|
|
10689
|
+
I
|
|
10688
10690
|
]
|
|
10689
10691
|
},
|
|
10690
|
-
|
|
10691
|
-
) : /* @__PURE__ */
|
|
10692
|
+
A
|
|
10693
|
+
) : /* @__PURE__ */ D("div", { className: "relative flex items-start group", children: [
|
|
10692
10694
|
/* @__PURE__ */ u("div", { className: "flex h-6 items-center", children: /* @__PURE__ */ u(
|
|
10693
10695
|
Aa,
|
|
10694
10696
|
{
|
|
10695
|
-
value:
|
|
10697
|
+
value: A,
|
|
10696
10698
|
id: P,
|
|
10697
|
-
disabled:
|
|
10699
|
+
disabled: v,
|
|
10698
10700
|
className: `
|
|
10699
10701
|
size-4 flex items-center justify-center rounded-full border border-input transition-all
|
|
10700
10702
|
focus:ring-2 focus:ring-ring focus:ring-offset-2
|
|
10701
|
-
${
|
|
10703
|
+
${v ? "bg-muted opacity-50" : "bg-background cursor-pointer hover:border-primary/50"}
|
|
10702
10704
|
${o ? "border-destructive" : ""}
|
|
10703
10705
|
`
|
|
10704
10706
|
}
|
|
10705
10707
|
) }),
|
|
10706
|
-
/* @__PURE__ */
|
|
10708
|
+
/* @__PURE__ */ D("div", { className: "ml-3 text-sm leading-6", children: [
|
|
10707
10709
|
/* @__PURE__ */ u(
|
|
10708
10710
|
"label",
|
|
10709
10711
|
{
|
|
10710
10712
|
htmlFor: P,
|
|
10711
|
-
className: `font-medium transition-colors ${
|
|
10712
|
-
children:
|
|
10713
|
+
className: `font-medium transition-colors ${v ? "text-muted-foreground" : "text-foreground cursor-pointer group-hover:text-primary"}`,
|
|
10714
|
+
children: I
|
|
10713
10715
|
}
|
|
10714
10716
|
),
|
|
10715
|
-
_ && !
|
|
10717
|
+
_ && !y && /* @__PURE__ */ u(
|
|
10716
10718
|
"p",
|
|
10717
10719
|
{
|
|
10718
|
-
className: `text-xs ${
|
|
10720
|
+
className: `text-xs ${v ? "text-muted-foreground/60" : "text-muted-foreground"}`,
|
|
10719
10721
|
children: _
|
|
10720
10722
|
}
|
|
10721
10723
|
)
|
|
10722
10724
|
] })
|
|
10723
|
-
] },
|
|
10725
|
+
] }, A);
|
|
10724
10726
|
})
|
|
10725
10727
|
}
|
|
10726
10728
|
)
|
|
@@ -10754,7 +10756,7 @@ function gg({ field: e }) {
|
|
|
10754
10756
|
`.trim();
|
|
10755
10757
|
return (
|
|
10756
10758
|
// Wrapper div ensures the component spans the full width of the container
|
|
10757
|
-
/* @__PURE__ */
|
|
10759
|
+
/* @__PURE__ */ D(
|
|
10758
10760
|
"div",
|
|
10759
10761
|
{
|
|
10760
10762
|
className: `my-6 col-span-full w-full border-b border-gray-300 pb-2 ${l[o] || l.false}`,
|
|
@@ -10777,20 +10779,22 @@ function bg({
|
|
|
10777
10779
|
}) {
|
|
10778
10780
|
const [i, c] = le(!1), l = a, d = t[e.name] ? new Date(t[e.name]) : null;
|
|
10779
10781
|
s["aria-describedby"];
|
|
10780
|
-
const m =
|
|
10781
|
-
|
|
10782
|
-
|
|
10783
|
-
|
|
10782
|
+
const m = [];
|
|
10783
|
+
e.maxDate && m.push({ after: new Date(e.maxDate) }), e.minDate && m.push({ before: new Date(e.minDate) });
|
|
10784
|
+
const g = (v) => {
|
|
10785
|
+
n(e.name, v), e.closeOnSelect !== !1 && c(!1), r(e.name);
|
|
10786
|
+
}, p = (v) => {
|
|
10787
|
+
v.preventDefault(), v.stopPropagation(), n(e.name, null), r(e.name);
|
|
10784
10788
|
};
|
|
10785
|
-
return /* @__PURE__ */ u("div", { className: "relative w-full", children: /* @__PURE__ */
|
|
10789
|
+
return /* @__PURE__ */ u("div", { className: "relative w-full", children: /* @__PURE__ */ D(
|
|
10786
10790
|
Yn,
|
|
10787
10791
|
{
|
|
10788
10792
|
open: i,
|
|
10789
|
-
onOpenChange: (
|
|
10790
|
-
c(
|
|
10793
|
+
onOpenChange: (v) => {
|
|
10794
|
+
c(v), v || r(e.name);
|
|
10791
10795
|
},
|
|
10792
10796
|
children: [
|
|
10793
|
-
/* @__PURE__ */ u(qn, { asChild: !0, children: /* @__PURE__ */
|
|
10797
|
+
/* @__PURE__ */ u(qn, { asChild: !0, children: /* @__PURE__ */ D(
|
|
10794
10798
|
"div",
|
|
10795
10799
|
{
|
|
10796
10800
|
role: "combobox",
|
|
@@ -10799,8 +10803,8 @@ function bg({
|
|
|
10799
10803
|
"aria-controls": e.name + "-calendar",
|
|
10800
10804
|
tabIndex: l ? -1 : 0,
|
|
10801
10805
|
onClick: () => !l && c(!0),
|
|
10802
|
-
onKeyDown: (
|
|
10803
|
-
l || (
|
|
10806
|
+
onKeyDown: (v) => {
|
|
10807
|
+
l || (v.key === "Enter" || v.key === " ") && (v.preventDefault(), c(!0));
|
|
10804
10808
|
},
|
|
10805
10809
|
className: `
|
|
10806
10810
|
flex h-10 w-full items-center justify-between rounded-md border px-3 py-2 text-sm
|
|
@@ -10809,7 +10813,7 @@ function bg({
|
|
|
10809
10813
|
${o ? "border-destructive focus-within:ring-destructive" : "border-input"}
|
|
10810
10814
|
`,
|
|
10811
10815
|
children: [
|
|
10812
|
-
/* @__PURE__ */
|
|
10816
|
+
/* @__PURE__ */ D("div", { className: "flex items-center gap-2 overflow-hidden pointer-events-none", children: [
|
|
10813
10817
|
/* @__PURE__ */ u(
|
|
10814
10818
|
Ra,
|
|
10815
10819
|
{
|
|
@@ -10819,13 +10823,13 @@ function bg({
|
|
|
10819
10823
|
),
|
|
10820
10824
|
d ? /* @__PURE__ */ u("span", { className: "truncate", children: Hr(d, "PPP") }) : /* @__PURE__ */ u("span", { className: "text-muted-foreground truncate", children: e.placeholder || "Pick a date" })
|
|
10821
10825
|
] }),
|
|
10822
|
-
/* @__PURE__ */
|
|
10826
|
+
/* @__PURE__ */ D("div", { className: "flex items-center gap-1", children: [
|
|
10823
10827
|
d && !l && /* @__PURE__ */ u(
|
|
10824
10828
|
"button",
|
|
10825
10829
|
{
|
|
10826
10830
|
type: "button",
|
|
10827
10831
|
"aria-label": "Clear selected date",
|
|
10828
|
-
onClick:
|
|
10832
|
+
onClick: p,
|
|
10829
10833
|
className: "p-1 hover:bg-muted rounded-full transition-colors focus-visible:ring-1 focus-visible:ring-ring outline-none relative z-10",
|
|
10830
10834
|
children: /* @__PURE__ */ u(
|
|
10831
10835
|
Gr,
|
|
@@ -10847,7 +10851,7 @@ function bg({
|
|
|
10847
10851
|
]
|
|
10848
10852
|
}
|
|
10849
10853
|
) }),
|
|
10850
|
-
/* @__PURE__ */
|
|
10854
|
+
/* @__PURE__ */ D(
|
|
10851
10855
|
Kn,
|
|
10852
10856
|
{
|
|
10853
10857
|
align: "start",
|
|
@@ -10859,8 +10863,9 @@ function bg({
|
|
|
10859
10863
|
{
|
|
10860
10864
|
mode: "single",
|
|
10861
10865
|
selected: d,
|
|
10862
|
-
onSelect:
|
|
10866
|
+
onSelect: g,
|
|
10863
10867
|
showOutsideDays: !0,
|
|
10868
|
+
disabled: m,
|
|
10864
10869
|
classNames: {
|
|
10865
10870
|
day_selected: "bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground",
|
|
10866
10871
|
day_today: "bg-accent text-accent-foreground font-bold",
|
|
@@ -10890,30 +10895,30 @@ function vg({ field: e, formValues: t, handleChange: n, handleBlur: r, error: o
|
|
|
10890
10895
|
const [a, s] = le(!1), [i, c] = le("12"), [l, d] = le("00"), [m, g] = le("PM"), p = t[e.name] || "";
|
|
10891
10896
|
Te.useEffect(() => {
|
|
10892
10897
|
if (p) {
|
|
10893
|
-
const
|
|
10894
|
-
|
|
10898
|
+
const x = p.match(/(\d{1,2}):(\d{2})\s*(AM|PM)/i);
|
|
10899
|
+
x && (c(x[1].padStart(2, "0")), d(x[2]), g(x[3].toUpperCase()));
|
|
10895
10900
|
}
|
|
10896
10901
|
}, [p]);
|
|
10897
|
-
const
|
|
10898
|
-
const
|
|
10899
|
-
n(e.name,
|
|
10902
|
+
const v = () => {
|
|
10903
|
+
const x = `${i}:${l} ${m}`;
|
|
10904
|
+
n(e.name, x), s(!1);
|
|
10900
10905
|
}, h = () => {
|
|
10901
10906
|
n(e.name, ""), c("12"), d("00"), g("PM");
|
|
10902
|
-
},
|
|
10903
|
-
const
|
|
10904
|
-
c((
|
|
10907
|
+
}, y = () => {
|
|
10908
|
+
const x = parseInt(i);
|
|
10909
|
+
c((x % 12 + 1).toString().padStart(2, "0"));
|
|
10905
10910
|
}, k = () => {
|
|
10906
|
-
const
|
|
10907
|
-
c((
|
|
10911
|
+
const x = parseInt(i);
|
|
10912
|
+
c((x === 1 ? 12 : x - 1).toString().padStart(2, "0"));
|
|
10908
10913
|
}, C = () => {
|
|
10909
|
-
const
|
|
10910
|
-
d(((
|
|
10914
|
+
const x = parseInt(l);
|
|
10915
|
+
d(((x + 5) % 60).toString().padStart(2, "0"));
|
|
10911
10916
|
}, E = () => {
|
|
10912
|
-
const
|
|
10913
|
-
d((
|
|
10917
|
+
const x = parseInt(l);
|
|
10918
|
+
d((x === 0 ? 55 : x - 5).toString().padStart(2, "0"));
|
|
10914
10919
|
};
|
|
10915
|
-
return /* @__PURE__ */ u("div", { children: /* @__PURE__ */
|
|
10916
|
-
/* @__PURE__ */ u(qn, { asChild: !0, children: /* @__PURE__ */
|
|
10920
|
+
return /* @__PURE__ */ u("div", { children: /* @__PURE__ */ D(Yn, { open: a, onOpenChange: s, children: [
|
|
10921
|
+
/* @__PURE__ */ u(qn, { asChild: !0, children: /* @__PURE__ */ D(
|
|
10917
10922
|
"button",
|
|
10918
10923
|
{
|
|
10919
10924
|
type: "button",
|
|
@@ -10932,7 +10937,7 @@ function vg({ field: e, formValues: t, handleChange: n, handleBlur: r, error: o
|
|
|
10932
10937
|
`,
|
|
10933
10938
|
children: [
|
|
10934
10939
|
p ? /* @__PURE__ */ u("span", { children: p }) : /* @__PURE__ */ u("span", { className: "text-gray-400", children: e.placeholder || "Select time" }),
|
|
10935
|
-
/* @__PURE__ */
|
|
10940
|
+
/* @__PURE__ */ D(
|
|
10936
10941
|
"svg",
|
|
10937
10942
|
{
|
|
10938
10943
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -10960,14 +10965,14 @@ function vg({ field: e, formValues: t, handleChange: n, handleBlur: r, error: o
|
|
|
10960
10965
|
align: "start",
|
|
10961
10966
|
sideOffset: 2,
|
|
10962
10967
|
className: "z-50 rounded-md border border-gray-200 bg-white p-4 shadow-md w-64",
|
|
10963
|
-
children: /* @__PURE__ */
|
|
10964
|
-
/* @__PURE__ */
|
|
10965
|
-
/* @__PURE__ */
|
|
10968
|
+
children: /* @__PURE__ */ D("div", { className: "flex flex-col gap-4", children: [
|
|
10969
|
+
/* @__PURE__ */ D("div", { className: "flex items-center justify-center gap-2", children: [
|
|
10970
|
+
/* @__PURE__ */ D("div", { className: "flex flex-col items-center", children: [
|
|
10966
10971
|
/* @__PURE__ */ u(
|
|
10967
10972
|
"button",
|
|
10968
10973
|
{
|
|
10969
10974
|
type: "button",
|
|
10970
|
-
onClick:
|
|
10975
|
+
onClick: y,
|
|
10971
10976
|
className: "p-1 hover:bg-gray-100 rounded",
|
|
10972
10977
|
children: /* @__PURE__ */ u(
|
|
10973
10978
|
"svg",
|
|
@@ -10989,9 +10994,9 @@ function vg({ field: e, formValues: t, handleChange: n, handleBlur: r, error: o
|
|
|
10989
10994
|
{
|
|
10990
10995
|
type: "text",
|
|
10991
10996
|
value: i,
|
|
10992
|
-
onChange: (
|
|
10993
|
-
const
|
|
10994
|
-
(
|
|
10997
|
+
onChange: (x) => {
|
|
10998
|
+
const A = x.target.value.replace(/\D/g, "");
|
|
10999
|
+
(A === "" || parseInt(A) >= 1 && parseInt(A) <= 12) && c(A.padStart(2, "0"));
|
|
10995
11000
|
},
|
|
10996
11001
|
className: "w-14 text-center text-2xl font-semibold border-0 focus:outline-none focus:ring-2 focus:ring-blue-500 rounded py-2",
|
|
10997
11002
|
maxLength: "2"
|
|
@@ -11020,7 +11025,7 @@ function vg({ field: e, formValues: t, handleChange: n, handleBlur: r, error: o
|
|
|
11020
11025
|
)
|
|
11021
11026
|
] }),
|
|
11022
11027
|
/* @__PURE__ */ u("span", { className: "text-2xl font-semibold", children: ":" }),
|
|
11023
|
-
/* @__PURE__ */
|
|
11028
|
+
/* @__PURE__ */ D("div", { className: "flex flex-col items-center", children: [
|
|
11024
11029
|
/* @__PURE__ */ u(
|
|
11025
11030
|
"button",
|
|
11026
11031
|
{
|
|
@@ -11047,9 +11052,9 @@ function vg({ field: e, formValues: t, handleChange: n, handleBlur: r, error: o
|
|
|
11047
11052
|
{
|
|
11048
11053
|
type: "text",
|
|
11049
11054
|
value: l,
|
|
11050
|
-
onChange: (
|
|
11051
|
-
const
|
|
11052
|
-
(
|
|
11055
|
+
onChange: (x) => {
|
|
11056
|
+
const A = x.target.value.replace(/\D/g, "");
|
|
11057
|
+
(A === "" || parseInt(A) >= 0 && parseInt(A) <= 59) && d(A.padStart(2, "0"));
|
|
11053
11058
|
},
|
|
11054
11059
|
className: "w-14 text-center text-2xl font-semibold border-0 focus:outline-none focus:ring-2 focus:ring-blue-500 rounded py-2",
|
|
11055
11060
|
maxLength: "2"
|
|
@@ -11077,7 +11082,7 @@ function vg({ field: e, formValues: t, handleChange: n, handleBlur: r, error: o
|
|
|
11077
11082
|
}
|
|
11078
11083
|
)
|
|
11079
11084
|
] }),
|
|
11080
|
-
/* @__PURE__ */
|
|
11085
|
+
/* @__PURE__ */ D("div", { className: "flex flex-col gap-1 ml-2", children: [
|
|
11081
11086
|
/* @__PURE__ */ u(
|
|
11082
11087
|
"button",
|
|
11083
11088
|
{
|
|
@@ -11104,7 +11109,7 @@ function vg({ field: e, formValues: t, handleChange: n, handleBlur: r, error: o
|
|
|
11104
11109
|
)
|
|
11105
11110
|
] })
|
|
11106
11111
|
] }),
|
|
11107
|
-
/* @__PURE__ */
|
|
11112
|
+
/* @__PURE__ */ D("div", { className: "flex items-center justify-between gap-2 border-t border-gray-200 pt-3", children: [
|
|
11108
11113
|
/* @__PURE__ */ u(
|
|
11109
11114
|
"button",
|
|
11110
11115
|
{
|
|
@@ -11118,7 +11123,7 @@ function vg({ field: e, formValues: t, handleChange: n, handleBlur: r, error: o
|
|
|
11118
11123
|
"button",
|
|
11119
11124
|
{
|
|
11120
11125
|
type: "button",
|
|
11121
|
-
onClick:
|
|
11126
|
+
onClick: v,
|
|
11122
11127
|
className: "inline-flex items-center justify-center rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 bg-blue-600 text-white hover:bg-blue-700 h-9 px-4 py-2",
|
|
11123
11128
|
children: "Done"
|
|
11124
11129
|
}
|
|
@@ -11130,13 +11135,13 @@ function vg({ field: e, formValues: t, handleChange: n, handleBlur: r, error: o
|
|
|
11130
11135
|
] }) });
|
|
11131
11136
|
}
|
|
11132
11137
|
function yg({ message: e }) {
|
|
11133
|
-
return /* @__PURE__ */ u("div", { className: "rounded-lg bg-red-50 border border-red-100 p-4 shadow-sm", children: /* @__PURE__ */
|
|
11138
|
+
return /* @__PURE__ */ u("div", { className: "rounded-lg bg-red-50 border border-red-100 p-4 shadow-sm", children: /* @__PURE__ */ D("div", { className: "flex items-center gap-3", children: [
|
|
11134
11139
|
/* @__PURE__ */ u(Rc, { "aria-hidden": "true", className: "size-5 text-red-500 shrink-0" }),
|
|
11135
11140
|
/* @__PURE__ */ u("span", { className: "text-sm font-medium text-red-900", children: e })
|
|
11136
11141
|
] }) });
|
|
11137
11142
|
}
|
|
11138
11143
|
function wg({ message: e }) {
|
|
11139
|
-
return /* @__PURE__ */ u("div", { className: "rounded-lg bg-amber-50 border border-amber-100 p-4 shadow-sm", children: /* @__PURE__ */
|
|
11144
|
+
return /* @__PURE__ */ u("div", { className: "rounded-lg bg-amber-50 border border-amber-100 p-4 shadow-sm", children: /* @__PURE__ */ D("div", { className: "flex items-center gap-3", children: [
|
|
11140
11145
|
/* @__PURE__ */ u(
|
|
11141
11146
|
Ac,
|
|
11142
11147
|
{
|
|
@@ -11148,7 +11153,7 @@ function wg({ message: e }) {
|
|
|
11148
11153
|
] }) });
|
|
11149
11154
|
}
|
|
11150
11155
|
function xg({ message: e }) {
|
|
11151
|
-
return /* @__PURE__ */ u("div", { className: "rounded-lg bg-green-50 border border-green-100 p-4 shadow-sm", children: /* @__PURE__ */
|
|
11156
|
+
return /* @__PURE__ */ u("div", { className: "rounded-lg bg-green-50 border border-green-100 p-4 shadow-sm", children: /* @__PURE__ */ D("div", { className: "flex items-center gap-3", children: [
|
|
11152
11157
|
/* @__PURE__ */ u(
|
|
11153
11158
|
Tc,
|
|
11154
11159
|
{
|
|
@@ -11160,7 +11165,7 @@ function xg({ message: e }) {
|
|
|
11160
11165
|
] }) });
|
|
11161
11166
|
}
|
|
11162
11167
|
function Sg({ message: e }) {
|
|
11163
|
-
return /* @__PURE__ */ u("div", { className: "rounded-lg bg-blue-50 border border-blue-100 p-4 shadow-sm", children: /* @__PURE__ */
|
|
11168
|
+
return /* @__PURE__ */ u("div", { className: "rounded-lg bg-blue-50 border border-blue-100 p-4 shadow-sm", children: /* @__PURE__ */ D("div", { className: "flex items-center gap-3", children: [
|
|
11164
11169
|
/* @__PURE__ */ u(jc, { "aria-hidden": "true", className: "size-5 text-blue-600 shrink-0" }),
|
|
11165
11170
|
/* @__PURE__ */ u("span", { className: "text-sm font-medium text-blue-900", children: e })
|
|
11166
11171
|
] }) });
|
|
@@ -11206,7 +11211,7 @@ const $g = ({
|
|
|
11206
11211
|
},
|
|
11207
11212
|
debugMode: l = !1
|
|
11208
11213
|
}) => {
|
|
11209
|
-
const [d, m] = le({ ...i }), [g, p] = le({}), [
|
|
11214
|
+
const [d, m] = le({ ...i }), [g, p] = le({}), [v, h] = le({}), [y, k] = le({}), C = Yt({}), E = ["hidden", "linebreak", "header", "alert"], x = Ta(
|
|
11210
11215
|
() => ({
|
|
11211
11216
|
file: Ea,
|
|
11212
11217
|
multifile: Ea,
|
|
@@ -11230,28 +11235,28 @@ const $g = ({
|
|
|
11230
11235
|
linebreak: Bh
|
|
11231
11236
|
}),
|
|
11232
11237
|
[]
|
|
11233
|
-
),
|
|
11238
|
+
), A = async (w, T = null) => {
|
|
11234
11239
|
if (!e) {
|
|
11235
|
-
const R = `apiClient prop is required when using fields with optionsUrl. Field "${
|
|
11240
|
+
const R = `apiClient prop is required when using fields with optionsUrl. Field "${w.name}" requires optionsUrl but no apiClient was provided.`;
|
|
11236
11241
|
l && console.error(R), Cn.error(R);
|
|
11237
11242
|
return;
|
|
11238
11243
|
}
|
|
11239
11244
|
try {
|
|
11240
|
-
const R = await e(`/${
|
|
11245
|
+
const R = await e(`/${w.optionsUrl}`);
|
|
11241
11246
|
let O = [];
|
|
11242
|
-
|
|
11243
|
-
{ value: "", label: `Select ${
|
|
11247
|
+
w.type === "select" ? O = [
|
|
11248
|
+
{ value: "", label: `Select ${w.label.toLowerCase()}` },
|
|
11244
11249
|
...R.data
|
|
11245
11250
|
] : O = [
|
|
11246
|
-
...R.data.map((
|
|
11247
|
-
value:
|
|
11248
|
-
label:
|
|
11251
|
+
...R.data.map((N) => ({
|
|
11252
|
+
value: N.value,
|
|
11253
|
+
label: N.label
|
|
11249
11254
|
}))
|
|
11250
|
-
], r.fields.forEach((
|
|
11251
|
-
|
|
11255
|
+
], r.fields.forEach((N) => {
|
|
11256
|
+
N.name === w.name && (N.options = O);
|
|
11252
11257
|
});
|
|
11253
11258
|
} catch (R) {
|
|
11254
|
-
l && console.error(`Failed to load options for ${
|
|
11259
|
+
l && console.error(`Failed to load options for ${w.name}:`, R);
|
|
11255
11260
|
} finally {
|
|
11256
11261
|
}
|
|
11257
11262
|
};
|
|
@@ -11259,77 +11264,77 @@ const $g = ({
|
|
|
11259
11264
|
if (r?.fields && r.fields.length > 0) {
|
|
11260
11265
|
if (!r.fields.some((R) => R.value)) return;
|
|
11261
11266
|
r.fields.forEach((R) => {
|
|
11262
|
-
R.optionsUrl &&
|
|
11267
|
+
R.optionsUrl && A(R);
|
|
11263
11268
|
});
|
|
11264
|
-
const
|
|
11269
|
+
const T = {};
|
|
11265
11270
|
r.fields.forEach((R) => {
|
|
11266
11271
|
if (!R.name) return;
|
|
11267
11272
|
const O = R.type === "multiselect" || R.type === "searchselect" || R.type === "checkbox" && R.options && R.options.length > 0;
|
|
11268
|
-
let
|
|
11269
|
-
["date", "datetime", "datepicker"].includes(R.type?.toLowerCase()) &&
|
|
11270
|
-
}), m(
|
|
11273
|
+
let N = i[R.name] ?? R.value ?? (O ? [] : "");
|
|
11274
|
+
["date", "datetime", "datepicker"].includes(R.type?.toLowerCase()) && N && (console.log(`[BEFORE dateTimeParser] Field: ${R.name}, Type: ${R.type}, Value:`, N, `Type: ${typeof N}`), N = Eg(N) || N, console.log(`[AFTER dateTimeParser] Field: ${R.name}, Parsed Value:`, N, `Type: ${typeof N}`, `Is Date: ${N instanceof Date}`)), T[R.name] = N;
|
|
11275
|
+
}), m(T);
|
|
11271
11276
|
}
|
|
11272
11277
|
}, [r]);
|
|
11273
|
-
const
|
|
11274
|
-
const O = typeof
|
|
11275
|
-
if (
|
|
11276
|
-
return l && console.warn(`VALIDATION FAILED (REQUIRED): ${
|
|
11277
|
-
if (
|
|
11278
|
+
const I = (w, T, R) => {
|
|
11279
|
+
const O = typeof T == "object" && T !== null && !Array.isArray(T) && !(T instanceof Date), N = T == null || typeof T == "string" && T.trim() === "" || Array.isArray(T) && T.length === 0 || w.type === "checkbox" && T === !1 || O && Object.keys(T).length === 0;
|
|
11280
|
+
if (w.required && N)
|
|
11281
|
+
return l && console.warn(`VALIDATION FAILED (REQUIRED): ${w.name} is empty.`), `${w.label} is required`;
|
|
11282
|
+
if (N && !w.required)
|
|
11278
11283
|
return null;
|
|
11279
|
-
if (
|
|
11280
|
-
const S =
|
|
11284
|
+
if (w.validate) {
|
|
11285
|
+
const S = w.validate(T, R);
|
|
11281
11286
|
if (S) return S;
|
|
11282
11287
|
}
|
|
11283
|
-
if (
|
|
11288
|
+
if (w.type === "email" && T && !/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(T))
|
|
11284
11289
|
return "Please enter a valid email address";
|
|
11285
|
-
if (
|
|
11286
|
-
if (
|
|
11287
|
-
return `${
|
|
11288
|
-
if (
|
|
11289
|
-
return `${
|
|
11290
|
+
if (w.type === "number") {
|
|
11291
|
+
if (w.min !== void 0 && T < w.min)
|
|
11292
|
+
return `${w.label} must be at least ${w.min}`;
|
|
11293
|
+
if (w.max !== void 0 && T > w.max)
|
|
11294
|
+
return `${w.label} must be no more than ${w.max}`;
|
|
11290
11295
|
}
|
|
11291
|
-
return
|
|
11292
|
-
}, _ = (
|
|
11293
|
-
const R = r.fields.find((
|
|
11296
|
+
return w.type === "date" && T && !ir(T).isValid() ? `${w.label} must be a valid date` : w.maxLength && T && T.length > w.maxLength ? `${w.label} must not exceed ${w.maxLength} characters` : null;
|
|
11297
|
+
}, _ = (w, T) => {
|
|
11298
|
+
const R = r.fields.find((N) => N.name === w);
|
|
11294
11299
|
if (!R) return;
|
|
11295
11300
|
const O = { ...d };
|
|
11296
|
-
R.type === "multiselect" || R.type === "searchselect" ? Array.isArray(
|
|
11297
|
-
(
|
|
11298
|
-
) : O[
|
|
11301
|
+
R.type === "multiselect" || R.type === "searchselect" ? Array.isArray(T) ? O[w] = T : T && T.target && T.target.selectedOptions ? O[w] = Array.from(T.target.selectedOptions).map(
|
|
11302
|
+
(N) => N.value
|
|
11303
|
+
) : O[w] = T : R.type === "dateRange" ? O[w] = [
|
|
11299
11304
|
{
|
|
11300
|
-
startDate:
|
|
11301
|
-
endDate:
|
|
11305
|
+
startDate: T.from,
|
|
11306
|
+
endDate: T.to || T.from,
|
|
11302
11307
|
key: "selection"
|
|
11303
11308
|
}
|
|
11304
|
-
] : R.type === "dayTimePicker" ? O[
|
|
11305
|
-
if (
|
|
11306
|
-
const S =
|
|
11307
|
-
O[
|
|
11309
|
+
] : R.type === "dayTimePicker" ? O[w] = T ? ir(T).format("YYYY-MM-DD HH:mm:ss") : "" : R.type === "number" ? O[w] = T === "" ? "" : Number(T) : O[w] = T, R.type === "select" && r.fields.forEach((N) => {
|
|
11310
|
+
if (N.showIf && !N.showIf(O)) {
|
|
11311
|
+
const S = N.type === "multiselect" || N.type === "searchselect" || N.type === "checkbox" && N.options && N.options.length > 0;
|
|
11312
|
+
O[N.name] = S ? [] : "";
|
|
11308
11313
|
}
|
|
11309
|
-
}), r.fields.forEach((
|
|
11310
|
-
if (typeof
|
|
11311
|
-
const S =
|
|
11312
|
-
O[
|
|
11314
|
+
}), r.fields.forEach((N) => {
|
|
11315
|
+
if (typeof N.disabled == "function" && N.disabled(O)) {
|
|
11316
|
+
const S = N.type === "multiselect" || N.type === "searchselect" || N.type === "checkbox" && N.options && N.options.length > 0;
|
|
11317
|
+
O[N.name] = S ? [] : "";
|
|
11313
11318
|
}
|
|
11314
11319
|
}), m(O);
|
|
11315
|
-
}, P = (
|
|
11316
|
-
h({ ...
|
|
11317
|
-
},
|
|
11318
|
-
|
|
11319
|
-
const
|
|
11320
|
+
}, P = (w) => {
|
|
11321
|
+
h({ ...v, [w]: !0 });
|
|
11322
|
+
}, F = (w) => {
|
|
11323
|
+
w.preventDefault();
|
|
11324
|
+
const T = {};
|
|
11320
11325
|
r.fields.forEach((O) => {
|
|
11321
|
-
O.name && (
|
|
11322
|
-
}), h(
|
|
11326
|
+
O.name && (T[O.name] = !0);
|
|
11327
|
+
}), h(T);
|
|
11323
11328
|
const R = {};
|
|
11324
11329
|
if (r.fields.forEach((O) => {
|
|
11325
11330
|
if (O.name && (!O.showIf || O.showIf(d))) {
|
|
11326
|
-
const
|
|
11327
|
-
|
|
11331
|
+
const N = I(O, d[O.name], d);
|
|
11332
|
+
N && (R[O.name] = N);
|
|
11328
11333
|
}
|
|
11329
11334
|
}), p(R), Object.keys(R).length === 0) {
|
|
11330
|
-
const O = (S,
|
|
11335
|
+
const O = (S, z) => {
|
|
11331
11336
|
if (S === "" || S === null || S === void 0) return null;
|
|
11332
|
-
const Y =
|
|
11337
|
+
const Y = z?.toLowerCase();
|
|
11333
11338
|
if (Array.isArray(S))
|
|
11334
11339
|
return Y === "number" || Y === "integer" ? S.map((j) => j === "" ? null : Number(j)) : S;
|
|
11335
11340
|
switch (Y) {
|
|
@@ -11348,16 +11353,16 @@ const $g = ({
|
|
|
11348
11353
|
default:
|
|
11349
11354
|
return S;
|
|
11350
11355
|
}
|
|
11351
|
-
},
|
|
11356
|
+
}, N = {};
|
|
11352
11357
|
r.fields.forEach((S) => {
|
|
11353
11358
|
if (S.name) {
|
|
11354
|
-
const
|
|
11355
|
-
o ?
|
|
11359
|
+
const z = d[S.name], Y = S.fieldType || "string", j = O(z, Y);
|
|
11360
|
+
o ? N[S.name] = {
|
|
11356
11361
|
value: j,
|
|
11357
11362
|
fieldType: Y
|
|
11358
|
-
} :
|
|
11363
|
+
} : N[S.name] = j;
|
|
11359
11364
|
}
|
|
11360
|
-
}), l ? console.log("Form submitted with values:",
|
|
11365
|
+
}), l ? console.log("Form submitted with values:", N) : a(N);
|
|
11361
11366
|
} else
|
|
11362
11367
|
Cn.error("Please correct the errors in the form");
|
|
11363
11368
|
};
|
|
@@ -11375,54 +11380,54 @@ const $g = ({
|
|
|
11375
11380
|
pink: "border-pink-500 bg-pink-50",
|
|
11376
11381
|
orange: "border-orange-500 bg-orange-50"
|
|
11377
11382
|
};
|
|
11378
|
-
function H(
|
|
11379
|
-
const O = `${
|
|
11383
|
+
function H(w, T, R) {
|
|
11384
|
+
const O = `${T.name}-error`;
|
|
11380
11385
|
if (l && (R ? console.log(
|
|
11381
|
-
`[fieldFormat RENDER] Rendering error for ${
|
|
11382
|
-
) : g[
|
|
11383
|
-
`[fieldFormat RENDER] Error exists in state for ${
|
|
11384
|
-
)), E.includes(
|
|
11385
|
-
return /* @__PURE__ */ u("div", { className:
|
|
11386
|
-
const
|
|
11387
|
-
|
|
11386
|
+
`[fieldFormat RENDER] Rendering error for ${T.name}: ${R}`
|
|
11387
|
+
) : g[T.name] && console.log(
|
|
11388
|
+
`[fieldFormat RENDER] Error exists in state for ${T.name} but not passed in props!`
|
|
11389
|
+
)), E.includes(T.type))
|
|
11390
|
+
return /* @__PURE__ */ u("div", { className: T.class || "col-span-full", children: w });
|
|
11391
|
+
const N = T.containerStyle, S = T.color || "blue", z = N === "card" ? `rounded-lg border text-card-foreground shadow-sm p-4 ${T.containerClassName || V[S] || V.blue}` : "", Y = /* @__PURE__ */ D(Rt, { children: [
|
|
11392
|
+
T.label && /* @__PURE__ */ D(
|
|
11388
11393
|
"label",
|
|
11389
11394
|
{
|
|
11390
|
-
htmlFor:
|
|
11395
|
+
htmlFor: T.name,
|
|
11391
11396
|
className: "block text-sm font-medium mb-1",
|
|
11392
11397
|
children: [
|
|
11393
|
-
|
|
11394
|
-
|
|
11398
|
+
T.label,
|
|
11399
|
+
T.required && /* @__PURE__ */ u("span", { className: "text-red-500 ml-1", "aria-hidden": "true", children: "*" })
|
|
11395
11400
|
]
|
|
11396
11401
|
}
|
|
11397
11402
|
),
|
|
11398
|
-
/* @__PURE__ */ u("div", { children: Te.cloneElement(
|
|
11403
|
+
/* @__PURE__ */ u("div", { children: Te.cloneElement(w, {
|
|
11399
11404
|
"aria-describedby": R ? O : void 0,
|
|
11400
11405
|
"aria-invalid": !!R,
|
|
11401
|
-
"aria-required":
|
|
11406
|
+
"aria-required": T.required
|
|
11402
11407
|
}) }),
|
|
11403
|
-
|
|
11408
|
+
T.description && /* @__PURE__ */ u("p", { className: "text-xs mt-1.5 text-gray-400", children: T.description }),
|
|
11404
11409
|
R && /* @__PURE__ */ u("p", { id: O, className: "text-sm text-red-500 mt-1", role: "alert", children: R })
|
|
11405
11410
|
] });
|
|
11406
|
-
return /* @__PURE__ */ u("div", { className: "mb-4", children:
|
|
11411
|
+
return /* @__PURE__ */ u("div", { className: "mb-4", children: N === "card" ? /* @__PURE__ */ u("div", { className: z, children: Y }) : Y });
|
|
11407
11412
|
}
|
|
11408
|
-
const G = (
|
|
11409
|
-
if (
|
|
11410
|
-
const
|
|
11411
|
-
if (d[
|
|
11412
|
-
const
|
|
11413
|
-
d[
|
|
11413
|
+
const G = (w) => {
|
|
11414
|
+
if (w.showIf && !w.showIf(d)) return null;
|
|
11415
|
+
const T = x[w.type] || ra;
|
|
11416
|
+
if (d[w.name] === void 0) {
|
|
11417
|
+
const N = w.type === "multiselect" || w.type === "searchselect" || w.type === "checkbox" && w.options && w.options.length > 0;
|
|
11418
|
+
d[w.name] = w.value !== void 0 ? w.value : N ? [] : "";
|
|
11414
11419
|
}
|
|
11415
|
-
const R = g[
|
|
11420
|
+
const R = g[w.name] ? g[w.name] : null, O = typeof w.disabled == "function" ? w.disabled(d) : !!w.disabled;
|
|
11416
11421
|
return H(
|
|
11417
11422
|
/* @__PURE__ */ u(
|
|
11418
|
-
|
|
11423
|
+
T,
|
|
11419
11424
|
{
|
|
11420
|
-
field:
|
|
11425
|
+
field: w,
|
|
11421
11426
|
formValues: d,
|
|
11422
11427
|
handleChange: _,
|
|
11423
|
-
handleBlur: () => P(
|
|
11428
|
+
handleBlur: () => P(w.name),
|
|
11424
11429
|
setCharCounts: k,
|
|
11425
|
-
charCount:
|
|
11430
|
+
charCount: y[w.name] || 0,
|
|
11426
11431
|
api_URL: t,
|
|
11427
11432
|
error: R,
|
|
11428
11433
|
fileInputRefs: C,
|
|
@@ -11430,33 +11435,33 @@ const $g = ({
|
|
|
11430
11435
|
apiClient: e
|
|
11431
11436
|
}
|
|
11432
11437
|
),
|
|
11433
|
-
|
|
11438
|
+
w,
|
|
11434
11439
|
R
|
|
11435
11440
|
);
|
|
11436
11441
|
};
|
|
11437
|
-
return /* @__PURE__ */
|
|
11442
|
+
return /* @__PURE__ */ D(
|
|
11438
11443
|
"form",
|
|
11439
11444
|
{
|
|
11440
|
-
onSubmit:
|
|
11445
|
+
onSubmit: F,
|
|
11441
11446
|
className: "grid grid-cols-12 gap-x-4 mx-auto w-full ",
|
|
11442
11447
|
children: [
|
|
11443
|
-
r ? r.fields.map((
|
|
11448
|
+
r ? r.fields.map((w) => /* @__PURE__ */ u(
|
|
11444
11449
|
"div",
|
|
11445
11450
|
{
|
|
11446
|
-
className: `${
|
|
11447
|
-
children: G(
|
|
11451
|
+
className: `${w.class || "col-span-full"} `,
|
|
11452
|
+
children: G(w)
|
|
11448
11453
|
},
|
|
11449
|
-
|
|
11454
|
+
w.name + w.type
|
|
11450
11455
|
)) : /* @__PURE__ */ u("div", { children: "Loading..." }),
|
|
11451
11456
|
/* @__PURE__ */ u(
|
|
11452
11457
|
"div",
|
|
11453
11458
|
{
|
|
11454
11459
|
className: n === "sticky" ? "absolute col-span-full w-full bottom-0 bg-white py-4 flex justify-end gap-2 z-50" : "col-span-full mt-4 flex justify-end gap-2",
|
|
11455
|
-
children: Te.Children.map(s, (
|
|
11456
|
-
onClick: (
|
|
11457
|
-
|
|
11460
|
+
children: Te.Children.map(s, (w) => Te.isValidElement(w) && w.props.onClick ? Te.cloneElement(w, {
|
|
11461
|
+
onClick: (T) => {
|
|
11462
|
+
w.props.onClick(d, T);
|
|
11458
11463
|
}
|
|
11459
|
-
}) :
|
|
11464
|
+
}) : w)
|
|
11460
11465
|
}
|
|
11461
11466
|
)
|
|
11462
11467
|
]
|