ynotsoft-dynamic-form 1.0.84 → 1.0.86
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 +519 -521
- package/dist/dynamic-form.umd.cjs +32 -32
- package/dist/index.css +1 -1
- package/package.json +1 -1
package/dist/dynamic-form.js
CHANGED
|
@@ -11,7 +11,7 @@ import { useEditor as sc, EditorContent as ic } from "@tiptap/react";
|
|
|
11
11
|
import cc from "@tiptap/starter-kit";
|
|
12
12
|
import lc from "@tiptap/extension-underline";
|
|
13
13
|
import uc from "@tiptap/extension-character-count";
|
|
14
|
-
import { DayPicker as
|
|
14
|
+
import { DayPicker as jr } from "react-day-picker";
|
|
15
15
|
import "react-day-picker/dist/style.css";
|
|
16
16
|
function dc(e) {
|
|
17
17
|
return /* @__PURE__ */ u("input", { type: "hidden", name: e.name, value: e.value }, e.name);
|
|
@@ -199,11 +199,11 @@ const Hc = [
|
|
|
199
199
|
["path", { d: "M12 16v-4", key: "1dtifu" }],
|
|
200
200
|
["path", { d: "M12 8h.01", key: "e9boi3" }]
|
|
201
201
|
], Uc = ae("info", Hc);
|
|
202
|
-
const
|
|
202
|
+
const Vc = [
|
|
203
203
|
["line", { x1: "19", x2: "10", y1: "4", y2: "4", key: "15jd3p" }],
|
|
204
204
|
["line", { x1: "14", x2: "5", y1: "20", y2: "20", key: "bu0au3" }],
|
|
205
205
|
["line", { x1: "15", x2: "9", y1: "4", y2: "20", key: "uljnxc" }]
|
|
206
|
-
],
|
|
206
|
+
], jc = ae("italic", Vc);
|
|
207
207
|
const Gc = [
|
|
208
208
|
["path", { d: "M11 5h10", key: "1cz7ny" }],
|
|
209
209
|
["path", { d: "M11 12h10", key: "1438ji" }],
|
|
@@ -267,13 +267,13 @@ function dl({
|
|
|
267
267
|
apiClient: s,
|
|
268
268
|
...i
|
|
269
269
|
}) {
|
|
270
|
-
const c = a, l = e.selectMode !== "multiple", [d, m] = ue([]), [g, p] = ue(!1), [w, h] = ue(!1), [y, E] = ue(""), [C, k] = ue(-1), [v,
|
|
270
|
+
const c = a, l = e.selectMode !== "multiple", [d, m] = ue([]), [g, p] = ue(!1), [w, h] = ue(!1), [y, E] = ue(""), [C, k] = ue(-1), [v, T] = ue({}), D = Yt(null), _ = Yt(null), P = Yt(null), z = t[e.name], H = sr(() => z ? (Array.isArray(z) ? z : [z]).map((S) => {
|
|
271
271
|
const W = d.find((Y) => Y.value === S);
|
|
272
272
|
return W || (v[S] ? v[S] : { value: S, label: S });
|
|
273
273
|
}) : [], [z, d, v])(), G = sr(
|
|
274
|
-
async (
|
|
274
|
+
async (A = "") => {
|
|
275
275
|
if (e.onSearch) {
|
|
276
|
-
const S = await e.onSearch(
|
|
276
|
+
const S = await e.onSearch(A, t);
|
|
277
277
|
m(S);
|
|
278
278
|
return;
|
|
279
279
|
}
|
|
@@ -283,15 +283,15 @@ function dl({
|
|
|
283
283
|
label: W[e.labelId || "label"] || W.label || W.name
|
|
284
284
|
}));
|
|
285
285
|
m(
|
|
286
|
-
|
|
287
|
-
(W) => String(W.label).toLowerCase().includes(
|
|
286
|
+
A ? S.filter(
|
|
287
|
+
(W) => String(W.label).toLowerCase().includes(A.toLowerCase())
|
|
288
288
|
) : S
|
|
289
289
|
);
|
|
290
290
|
return;
|
|
291
291
|
}
|
|
292
292
|
p(!0);
|
|
293
293
|
try {
|
|
294
|
-
const S = e.searchParam || "search", W = e.optionsUrl.includes("?") ? "&" : "?", Y = `${e.optionsUrl}${W}${S}=${encodeURIComponent(
|
|
294
|
+
const S = e.searchParam || "search", W = e.optionsUrl.includes("?") ? "&" : "?", Y = `${e.optionsUrl}${W}${S}=${encodeURIComponent(A)}`, V = await s(Y), ve = V.data || V, q = Array.isArray(ve) ? ve : [];
|
|
295
295
|
m(
|
|
296
296
|
q.map((ee) => ({
|
|
297
297
|
value: ee[e.valueId || "value"] || ee.value || ee.id,
|
|
@@ -306,15 +306,15 @@ function dl({
|
|
|
306
306
|
},
|
|
307
307
|
[e, s, t]
|
|
308
308
|
), x = sr(
|
|
309
|
-
(
|
|
310
|
-
if (!
|
|
311
|
-
|
|
309
|
+
(A) => {
|
|
310
|
+
if (!A) return;
|
|
311
|
+
T((W) => ({ ...W, [A.value]: A }));
|
|
312
312
|
let S;
|
|
313
313
|
if (l)
|
|
314
|
-
S =
|
|
314
|
+
S = A.value, h(!1);
|
|
315
315
|
else {
|
|
316
316
|
const W = Array.isArray(z) ? z : [];
|
|
317
|
-
S = W.includes(
|
|
317
|
+
S = W.includes(A.value) ? W.filter((Y) => Y !== A.value) : [...W, A.value];
|
|
318
318
|
}
|
|
319
319
|
n(e.name, S), r(e.name), e.clearSearchOnSelect && E("");
|
|
320
320
|
},
|
|
@@ -326,19 +326,19 @@ function dl({
|
|
|
326
326
|
r,
|
|
327
327
|
l
|
|
328
328
|
]
|
|
329
|
-
),
|
|
329
|
+
), N = (A) => {
|
|
330
330
|
if (!c)
|
|
331
|
-
switch (
|
|
331
|
+
switch (A.key) {
|
|
332
332
|
case "ArrowDown":
|
|
333
|
-
|
|
333
|
+
A.preventDefault(), w ? k(
|
|
334
334
|
(S) => S < d.length - 1 ? S + 1 : S
|
|
335
335
|
) : h(!0);
|
|
336
336
|
break;
|
|
337
337
|
case "ArrowUp":
|
|
338
|
-
|
|
338
|
+
A.preventDefault(), w && k((S) => S > 0 ? S - 1 : 0);
|
|
339
339
|
break;
|
|
340
340
|
case "Enter":
|
|
341
|
-
|
|
341
|
+
A.preventDefault(), w && C >= 0 && d[C] ? x(d[C]) : w || h(!0);
|
|
342
342
|
break;
|
|
343
343
|
case "Escape":
|
|
344
344
|
h(!1);
|
|
@@ -347,26 +347,26 @@ function dl({
|
|
|
347
347
|
h(!1), r(e.name);
|
|
348
348
|
break;
|
|
349
349
|
}
|
|
350
|
-
},
|
|
351
|
-
const S =
|
|
350
|
+
}, R = (A) => {
|
|
351
|
+
const S = A.target.value;
|
|
352
352
|
E(S), k(-1), P.current && clearTimeout(P.current), P.current = setTimeout(() => G(S), 300);
|
|
353
353
|
};
|
|
354
354
|
Je(() => {
|
|
355
355
|
if (w) {
|
|
356
356
|
G(y);
|
|
357
|
-
const
|
|
358
|
-
return () => clearTimeout(
|
|
357
|
+
const A = setTimeout(() => _.current?.focus(), 50);
|
|
358
|
+
return () => clearTimeout(A);
|
|
359
359
|
} else
|
|
360
360
|
k(-1);
|
|
361
361
|
}, [w, G, y]), Je(() => {
|
|
362
|
-
const
|
|
362
|
+
const A = (S) => {
|
|
363
363
|
D.current && !D.current.contains(S.target) && (h(!1), r(e.name));
|
|
364
364
|
};
|
|
365
|
-
return document.addEventListener("mousedown",
|
|
365
|
+
return document.addEventListener("mousedown", A), () => document.removeEventListener("mousedown", A);
|
|
366
366
|
}, [e.name, r]);
|
|
367
|
-
const
|
|
368
|
-
|
|
369
|
-
const W = Array.isArray(z) ? z : [], Y = l ? null : W.filter((
|
|
367
|
+
const O = (A, S) => {
|
|
368
|
+
A.stopPropagation();
|
|
369
|
+
const W = Array.isArray(z) ? z : [], Y = l ? null : W.filter((V) => V !== S);
|
|
370
370
|
n(e.name, Y), r(e.name);
|
|
371
371
|
};
|
|
372
372
|
return /* @__PURE__ */ I(
|
|
@@ -384,7 +384,7 @@ function dl({
|
|
|
384
384
|
"aria-controls": `${e.name}-listbox`,
|
|
385
385
|
tabIndex: c ? -1 : 0,
|
|
386
386
|
onClick: () => !c && h(!w),
|
|
387
|
-
onKeyDown:
|
|
387
|
+
onKeyDown: N,
|
|
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
|
|
@@ -393,25 +393,25 @@ function dl({
|
|
|
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((A) => /* @__PURE__ */ I(
|
|
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
|
+
A.label,
|
|
402
402
|
!c && /* @__PURE__ */ u(
|
|
403
403
|
"button",
|
|
404
404
|
{
|
|
405
405
|
type: "button",
|
|
406
|
-
"aria-label": `Remove ${
|
|
407
|
-
onClick: (S) =>
|
|
406
|
+
"aria-label": `Remove ${A.label}`,
|
|
407
|
+
onClick: (S) => O(S, A.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
|
+
A.value
|
|
415
415
|
)) : /* @__PURE__ */ u("span", { className: "text-muted-foreground text-sm leading-tight", children: e.placeholder || "Select..." }),
|
|
416
416
|
/* @__PURE__ */ I("div", { className: "ml-auto flex items-center gap-2", children: [
|
|
417
417
|
g && /* @__PURE__ */ u(Qc, { className: "w-4 h-4 animate-spin text-muted-foreground" }),
|
|
@@ -437,8 +437,8 @@ function dl({
|
|
|
437
437
|
"aria-controls": `${e.name}-listbox`,
|
|
438
438
|
"aria-activedescendant": C >= 0 ? `${e.name}-opt-${C}` : void 0,
|
|
439
439
|
value: y,
|
|
440
|
-
onChange:
|
|
441
|
-
onKeyDown:
|
|
440
|
+
onChange: R,
|
|
441
|
+
onKeyDown: N,
|
|
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,9 +451,9 @@ 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((
|
|
454
|
+
children: d.length > 0 ? d.map((A, S) => {
|
|
455
455
|
const W = H.some(
|
|
456
|
-
(
|
|
456
|
+
(V) => V.value === A.value
|
|
457
457
|
), Y = S === C;
|
|
458
458
|
return /* @__PURE__ */ I(
|
|
459
459
|
"div",
|
|
@@ -462,8 +462,8 @@ function dl({
|
|
|
462
462
|
role: "option",
|
|
463
463
|
tabIndex: -1,
|
|
464
464
|
"aria-selected": W,
|
|
465
|
-
onClick: () => x(
|
|
466
|
-
onKeyDown: (
|
|
465
|
+
onClick: () => x(A),
|
|
466
|
+
onKeyDown: (V) => V.key === "Enter" && x(A),
|
|
467
467
|
onMouseEnter: () => k(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
|
|
@@ -472,11 +472,11 @@ function dl({
|
|
|
472
472
|
${!Y && !W ? "hover:bg-muted" : ""}
|
|
473
473
|
`,
|
|
474
474
|
children: [
|
|
475
|
-
/* @__PURE__ */ u("span", { children:
|
|
475
|
+
/* @__PURE__ */ u("span", { children: A.label }),
|
|
476
476
|
W && /* @__PURE__ */ u(Sc, { className: "w-4 h-4 text-primary" })
|
|
477
477
|
]
|
|
478
478
|
},
|
|
479
|
-
|
|
479
|
+
A.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
|
}
|
|
@@ -628,8 +628,8 @@ function Oa(e) {
|
|
|
628
628
|
l.displayName = i;
|
|
629
629
|
const d = e + "CollectionItemSlot", m = "data-radix-collection-item", g = /* @__PURE__ */ Ce(d), p = Te.forwardRef(
|
|
630
630
|
(h, y) => {
|
|
631
|
-
const { scope: E, children: C, ...k } = h, v = Te.useRef(null),
|
|
632
|
-
return Te.useEffect(() => (D.itemMap.set(v, { ref: v, ...k }), () => void D.itemMap.delete(v))), /* @__PURE__ */ u(g, { [m]: "", ref:
|
|
631
|
+
const { scope: E, children: C, ...k } = h, v = Te.useRef(null), T = ie(y, v), D = a(d, E);
|
|
632
|
+
return Te.useEffect(() => (D.itemMap.set(v, { ref: v, ...k }), () => void D.itemMap.delete(v))), /* @__PURE__ */ u(g, { [m]: "", ref: T, children: C });
|
|
633
633
|
}
|
|
634
634
|
);
|
|
635
635
|
p.displayName = d;
|
|
@@ -712,12 +712,12 @@ var Sl = "DismissableLayer", Pr = "dismissableLayer.update", Cl = "dismissableLa
|
|
|
712
712
|
onInteractOutside: s,
|
|
713
713
|
onDismiss: i,
|
|
714
714
|
...c
|
|
715
|
-
} = e, l = f.useContext(Ma), [d, m] = f.useState(null), g = d?.ownerDocument ?? globalThis?.document, [, p] = f.useState({}), w = ie(t, (_) => m(_)), h = Array.from(l.layers), [y] = [...l.layersWithOutsidePointerEventsDisabled].slice(-1), E = h.indexOf(y), C = d ? h.indexOf(d) : -1, k = l.layersWithOutsidePointerEventsDisabled.size > 0, v = C >= E,
|
|
716
|
-
const P = _.target, z = [...l.branches].some((
|
|
715
|
+
} = e, l = f.useContext(Ma), [d, m] = f.useState(null), g = d?.ownerDocument ?? globalThis?.document, [, p] = f.useState({}), w = ie(t, (_) => m(_)), h = Array.from(l.layers), [y] = [...l.layersWithOutsidePointerEventsDisabled].slice(-1), E = h.indexOf(y), C = d ? h.indexOf(d) : -1, k = l.layersWithOutsidePointerEventsDisabled.size > 0, v = C >= E, T = Nl((_) => {
|
|
716
|
+
const P = _.target, z = [...l.branches].some((j) => j.contains(P));
|
|
717
717
|
!v || z || (o?.(_), s?.(_), _.defaultPrevented || i?.());
|
|
718
718
|
}, g), D = Tl((_) => {
|
|
719
719
|
const P = _.target;
|
|
720
|
-
[...l.branches].some((
|
|
720
|
+
[...l.branches].some((j) => j.contains(P)) || (a?.(_), s?.(_), _.defaultPrevented || i?.());
|
|
721
721
|
}, g);
|
|
722
722
|
return xl((_) => {
|
|
723
723
|
C === l.layers.size - 1 && (r?.(_), !_.defaultPrevented && i && (_.preventDefault(), i()));
|
|
@@ -744,7 +744,7 @@ var Sl = "DismissableLayer", Pr = "dismissableLayer.update", Cl = "dismissableLa
|
|
|
744
744
|
onBlurCapture: Z(e.onBlurCapture, D.onBlurCapture),
|
|
745
745
|
onPointerDownCapture: Z(
|
|
746
746
|
e.onPointerDownCapture,
|
|
747
|
-
|
|
747
|
+
T.onPointerDownCapture
|
|
748
748
|
)
|
|
749
749
|
}
|
|
750
750
|
);
|
|
@@ -879,8 +879,8 @@ var Pl = [
|
|
|
879
879
|
v !== null && (i.contains(v) || Ze(m.current, { select: !0 }));
|
|
880
880
|
}, E = function(k) {
|
|
881
881
|
if (document.activeElement === document.body)
|
|
882
|
-
for (const
|
|
883
|
-
|
|
882
|
+
for (const T of k)
|
|
883
|
+
T.removedNodes.length > 0 && Ze(i);
|
|
884
884
|
};
|
|
885
885
|
document.addEventListener("focusin", h), document.addEventListener("focusout", y);
|
|
886
886
|
const C = new MutationObserver(E);
|
|
@@ -1025,13 +1025,13 @@ function ze(e) {
|
|
|
1025
1025
|
function Jr(e) {
|
|
1026
1026
|
return Qr(ze(e));
|
|
1027
1027
|
}
|
|
1028
|
-
function
|
|
1028
|
+
function Vl(e, t, n) {
|
|
1029
1029
|
n === void 0 && (n = !1);
|
|
1030
1030
|
const r = Ot(e), o = Jr(e), a = Zr(o);
|
|
1031
1031
|
let s = o === "x" ? r === (n ? "end" : "start") ? "right" : "left" : r === "start" ? "bottom" : "top";
|
|
1032
1032
|
return t.reference[a] > t.floating[a] && (s = kn(s)), [s, kn(s)];
|
|
1033
1033
|
}
|
|
1034
|
-
function
|
|
1034
|
+
function jl(e) {
|
|
1035
1035
|
const t = kn(e);
|
|
1036
1036
|
return [Or(e), t, Or(t)];
|
|
1037
1037
|
}
|
|
@@ -1165,7 +1165,7 @@ const Ql = async (e, t, n) => {
|
|
|
1165
1165
|
x: C,
|
|
1166
1166
|
y: k,
|
|
1167
1167
|
data: v,
|
|
1168
|
-
reset:
|
|
1168
|
+
reset: T
|
|
1169
1169
|
} = await E({
|
|
1170
1170
|
x: d,
|
|
1171
1171
|
y: m,
|
|
@@ -1186,11 +1186,11 @@ const Ql = async (e, t, n) => {
|
|
|
1186
1186
|
...p[y],
|
|
1187
1187
|
...v
|
|
1188
1188
|
}
|
|
1189
|
-
},
|
|
1189
|
+
}, T && w <= 50 && (w++, typeof T == "object" && (T.placement && (g = T.placement), T.rects && (l = T.rects === !0 ? await s.getElementRects({
|
|
1190
1190
|
reference: e,
|
|
1191
1191
|
floating: t,
|
|
1192
1192
|
strategy: o
|
|
1193
|
-
}) :
|
|
1193
|
+
}) : T.rects), {
|
|
1194
1194
|
x: d,
|
|
1195
1195
|
y: m
|
|
1196
1196
|
} = Ho(l, g, c)), h = -1);
|
|
@@ -1235,17 +1235,17 @@ async function qt(e, t) {
|
|
|
1235
1235
|
} : {
|
|
1236
1236
|
x: 1,
|
|
1237
1237
|
y: 1
|
|
1238
|
-
},
|
|
1238
|
+
}, T = An(a.convertOffsetParentRelativeRectToViewportRelativeRect ? await a.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
1239
1239
|
elements: i,
|
|
1240
1240
|
rect: C,
|
|
1241
1241
|
offsetParent: k,
|
|
1242
1242
|
strategy: c
|
|
1243
1243
|
}) : C);
|
|
1244
1244
|
return {
|
|
1245
|
-
top: (E.top -
|
|
1246
|
-
bottom: (
|
|
1247
|
-
left: (E.left -
|
|
1248
|
-
right: (
|
|
1245
|
+
top: (E.top - T.top + w.top) / v.y,
|
|
1246
|
+
bottom: (T.bottom - E.bottom + w.bottom) / v.y,
|
|
1247
|
+
left: (E.left - T.left + w.left) / v.x,
|
|
1248
|
+
right: (T.right - E.right + w.right) / v.x
|
|
1249
1249
|
};
|
|
1250
1250
|
}
|
|
1251
1251
|
const Zl = (e) => ({
|
|
@@ -1269,20 +1269,20 @@ const Zl = (e) => ({
|
|
|
1269
1269
|
const m = Fa(d), g = {
|
|
1270
1270
|
x: n,
|
|
1271
1271
|
y: r
|
|
1272
|
-
}, p = Jr(o), w = Zr(p), h = await s.getDimensions(l), y = p === "y", E = y ? "top" : "left", C = y ? "bottom" : "right", k = y ? "clientHeight" : "clientWidth", v = a.reference[w] + a.reference[p] - g[p] - a.floating[w],
|
|
1272
|
+
}, p = Jr(o), w = Zr(p), h = await s.getDimensions(l), y = p === "y", E = y ? "top" : "left", C = y ? "bottom" : "right", k = y ? "clientHeight" : "clientWidth", v = a.reference[w] + a.reference[p] - g[p] - a.floating[w], T = g[p] - a.reference[p], D = await (s.getOffsetParent == null ? void 0 : s.getOffsetParent(l));
|
|
1273
1273
|
let _ = D ? D[k] : 0;
|
|
1274
1274
|
(!_ || !await (s.isElement == null ? void 0 : s.isElement(D))) && (_ = i.floating[k] || a.floating[w]);
|
|
1275
|
-
const P = v / 2 -
|
|
1275
|
+
const P = v / 2 - T / 2, z = _ / 2 - h[w] / 2 - 1, j = tt(m[E], z), H = tt(m[C], z), G = j, x = _ - h[w] - H, N = _ / 2 - h[w] / 2 + P, R = Rr(G, N, x), O = !c.arrow && Ot(o) != null && N !== R && a.reference[w] / 2 - (N < G ? j : H) - h[w] / 2 < 0, A = O ? N < G ? N - G : N - x : 0;
|
|
1276
1276
|
return {
|
|
1277
|
-
[p]: g[p] +
|
|
1277
|
+
[p]: g[p] + A,
|
|
1278
1278
|
data: {
|
|
1279
|
-
[p]:
|
|
1280
|
-
centerOffset:
|
|
1281
|
-
...
|
|
1282
|
-
alignmentOffset:
|
|
1279
|
+
[p]: R,
|
|
1280
|
+
centerOffset: N - R - A,
|
|
1281
|
+
...O && {
|
|
1282
|
+
alignmentOffset: A
|
|
1283
1283
|
}
|
|
1284
1284
|
},
|
|
1285
|
-
reset:
|
|
1285
|
+
reset: O
|
|
1286
1286
|
};
|
|
1287
1287
|
}
|
|
1288
1288
|
}), Jl = function(e) {
|
|
@@ -1309,38 +1309,38 @@ const Zl = (e) => ({
|
|
|
1309
1309
|
} = qe(e, t);
|
|
1310
1310
|
if ((n = a.arrow) != null && n.alignmentOffset)
|
|
1311
1311
|
return {};
|
|
1312
|
-
const E = Ke(o), C = ze(i), k = Ke(i) === i, v = await (c.isRTL == null ? void 0 : c.isRTL(l.floating)),
|
|
1313
|
-
!g && D &&
|
|
1314
|
-
const _ = [i, ...
|
|
1315
|
-
let
|
|
1312
|
+
const E = Ke(o), C = ze(i), k = Ke(i) === i, v = await (c.isRTL == null ? void 0 : c.isRTL(l.floating)), T = g || (k || !h ? [kn(i)] : jl(i)), D = w !== "none";
|
|
1313
|
+
!g && D && T.push(...Kl(i, h, w, v));
|
|
1314
|
+
const _ = [i, ...T], P = await qt(t, y), z = [];
|
|
1315
|
+
let j = ((r = a.flip) == null ? void 0 : r.overflows) || [];
|
|
1316
1316
|
if (d && z.push(P[E]), m) {
|
|
1317
|
-
const
|
|
1318
|
-
z.push(P[
|
|
1317
|
+
const N = Vl(o, s, v);
|
|
1318
|
+
z.push(P[N[0]], P[N[1]]);
|
|
1319
1319
|
}
|
|
1320
|
-
if (
|
|
1320
|
+
if (j = [...j, {
|
|
1321
1321
|
placement: o,
|
|
1322
1322
|
overflows: z
|
|
1323
|
-
}], !z.every((
|
|
1323
|
+
}], !z.every((N) => N <= 0)) {
|
|
1324
1324
|
var H, G;
|
|
1325
|
-
const
|
|
1326
|
-
if (
|
|
1325
|
+
const N = (((H = a.flip) == null ? void 0 : H.index) || 0) + 1, R = _[N];
|
|
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
|
+
j.every((S) => ze(S.placement) === C ? S.overflows[0] > 0 : !0)))
|
|
1329
1329
|
return {
|
|
1330
1330
|
data: {
|
|
1331
|
-
index:
|
|
1332
|
-
overflows:
|
|
1331
|
+
index: N,
|
|
1332
|
+
overflows: j
|
|
1333
1333
|
},
|
|
1334
1334
|
reset: {
|
|
1335
|
-
placement:
|
|
1335
|
+
placement: R
|
|
1336
1336
|
}
|
|
1337
1337
|
};
|
|
1338
|
-
let
|
|
1339
|
-
if (!
|
|
1338
|
+
let O = (G = j.filter((A) => A.overflows[0] <= 0).sort((A, S) => A.overflows[1] - S.overflows[1])[0]) == null ? void 0 : G.placement;
|
|
1339
|
+
if (!O)
|
|
1340
1340
|
switch (p) {
|
|
1341
1341
|
case "bestFit": {
|
|
1342
1342
|
var x;
|
|
1343
|
-
const
|
|
1343
|
+
const A = (x = j.filter((S) => {
|
|
1344
1344
|
if (D) {
|
|
1345
1345
|
const W = ze(S.placement);
|
|
1346
1346
|
return W === C || // Create a bias to the `y` side axis due to horizontal
|
|
@@ -1349,17 +1349,17 @@ const Zl = (e) => ({
|
|
|
1349
1349
|
}
|
|
1350
1350
|
return !0;
|
|
1351
1351
|
}).map((S) => [S.placement, S.overflows.filter((W) => W > 0).reduce((W, Y) => W + Y, 0)]).sort((S, W) => S[1] - W[1])[0]) == null ? void 0 : x[0];
|
|
1352
|
-
|
|
1352
|
+
A && (O = A);
|
|
1353
1353
|
break;
|
|
1354
1354
|
}
|
|
1355
1355
|
case "initialPlacement":
|
|
1356
|
-
|
|
1356
|
+
O = i;
|
|
1357
1357
|
break;
|
|
1358
1358
|
}
|
|
1359
|
-
if (o !==
|
|
1359
|
+
if (o !== O)
|
|
1360
1360
|
return {
|
|
1361
1361
|
reset: {
|
|
1362
|
-
placement:
|
|
1362
|
+
placement: O
|
|
1363
1363
|
}
|
|
1364
1364
|
};
|
|
1365
1365
|
}
|
|
@@ -1375,7 +1375,7 @@ function Uo(e, t) {
|
|
|
1375
1375
|
left: e.left - t.width
|
|
1376
1376
|
};
|
|
1377
1377
|
}
|
|
1378
|
-
function
|
|
1378
|
+
function Vo(e) {
|
|
1379
1379
|
return zl.some((t) => e[t] >= 0);
|
|
1380
1380
|
}
|
|
1381
1381
|
const eu = function(e) {
|
|
@@ -1398,7 +1398,7 @@ const eu = function(e) {
|
|
|
1398
1398
|
return {
|
|
1399
1399
|
data: {
|
|
1400
1400
|
referenceHiddenOffsets: s,
|
|
1401
|
-
referenceHidden:
|
|
1401
|
+
referenceHidden: Vo(s)
|
|
1402
1402
|
}
|
|
1403
1403
|
};
|
|
1404
1404
|
}
|
|
@@ -1410,7 +1410,7 @@ const eu = function(e) {
|
|
|
1410
1410
|
return {
|
|
1411
1411
|
data: {
|
|
1412
1412
|
escapedOffsets: s,
|
|
1413
|
-
escaped:
|
|
1413
|
+
escaped: Vo(s)
|
|
1414
1414
|
}
|
|
1415
1415
|
};
|
|
1416
1416
|
}
|
|
@@ -1553,13 +1553,13 @@ const nu = function(e) {
|
|
|
1553
1553
|
...h
|
|
1554
1554
|
};
|
|
1555
1555
|
if (c) {
|
|
1556
|
-
const k = g === "y" ? "height" : "width", v = a.reference[g] - a.floating[k] + y.mainAxis,
|
|
1557
|
-
p < v ? p = v : p >
|
|
1556
|
+
const k = g === "y" ? "height" : "width", v = a.reference[g] - a.floating[k] + y.mainAxis, T = a.reference[g] + a.reference[k] - y.mainAxis;
|
|
1557
|
+
p < v ? p = v : p > T && (p = T);
|
|
1558
1558
|
}
|
|
1559
1559
|
if (l) {
|
|
1560
1560
|
var E, C;
|
|
1561
|
-
const k = g === "y" ? "width" : "height", v = $a.has(Ke(o)),
|
|
1562
|
-
w <
|
|
1561
|
+
const k = g === "y" ? "width" : "height", v = $a.has(Ke(o)), T = a.reference[m] - a.floating[k] + (v && ((E = s.offset) == null ? void 0 : E[m]) || 0) + (v ? 0 : y.crossAxis), D = a.reference[m] + a.reference[k] + (v ? 0 : ((C = s.offset) == null ? void 0 : C[m]) || 0) - (v ? y.crossAxis : 0);
|
|
1562
|
+
w < T ? w = T : w > D && (w = D);
|
|
1563
1563
|
}
|
|
1564
1564
|
return {
|
|
1565
1565
|
[g]: p,
|
|
@@ -1588,11 +1588,11 @@ const nu = function(e) {
|
|
|
1588
1588
|
} = a.floating;
|
|
1589
1589
|
let y, E;
|
|
1590
1590
|
m === "top" || m === "bottom" ? (y = m, E = g === (await (s.isRTL == null ? void 0 : s.isRTL(i.floating)) ? "start" : "end") ? "left" : "right") : (E = m, y = g === "end" ? "top" : "bottom");
|
|
1591
|
-
const C = h - d.top - d.bottom, k = w - d.left - d.right, v = tt(h - d[y], C),
|
|
1592
|
-
let _ = v, P =
|
|
1591
|
+
const C = h - d.top - d.bottom, k = w - d.left - d.right, v = tt(h - d[y], C), T = tt(w - d[E], k), D = !t.middlewareData.shift;
|
|
1592
|
+
let _ = v, P = T;
|
|
1593
1593
|
if ((n = t.middlewareData.shift) != null && n.enabled.x && (P = k), (r = t.middlewareData.shift) != null && r.enabled.y && (_ = C), D && !g) {
|
|
1594
|
-
const
|
|
1595
|
-
p ? P = w - 2 * (
|
|
1594
|
+
const j = Ee(d.left, 0), H = Ee(d.right, 0), G = Ee(d.top, 0), x = Ee(d.bottom, 0);
|
|
1595
|
+
p ? P = w - 2 * (j !== 0 || H !== 0 ? j + H : Ee(d.left, d.right)) : _ = h - 2 * (G !== 0 || x !== 0 ? G + x : Ee(d.top, d.bottom));
|
|
1596
1596
|
}
|
|
1597
1597
|
await c({
|
|
1598
1598
|
...t,
|
|
@@ -1631,7 +1631,7 @@ function Me(e) {
|
|
|
1631
1631
|
function He(e) {
|
|
1632
1632
|
return In() ? e instanceof HTMLElement || e instanceof ke(e).HTMLElement : !1;
|
|
1633
1633
|
}
|
|
1634
|
-
function
|
|
1634
|
+
function jo(e) {
|
|
1635
1635
|
return !In() || typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof ke(e).ShadowRoot;
|
|
1636
1636
|
}
|
|
1637
1637
|
const su = /* @__PURE__ */ new Set(["inline", "contents"]);
|
|
@@ -1700,10 +1700,10 @@ function nt(e) {
|
|
|
1700
1700
|
// Step into the shadow DOM of the parent of a slotted node.
|
|
1701
1701
|
e.assignedSlot || // DOM Element detected.
|
|
1702
1702
|
e.parentNode || // ShadowRoot detected.
|
|
1703
|
-
|
|
1703
|
+
jo(e) && e.host || // Fallback.
|
|
1704
1704
|
Ue(e)
|
|
1705
1705
|
);
|
|
1706
|
-
return
|
|
1706
|
+
return jo(t) ? t.host : t;
|
|
1707
1707
|
}
|
|
1708
1708
|
function za(e) {
|
|
1709
1709
|
const t = nt(e);
|
|
@@ -1885,9 +1885,9 @@ function Yo(e, t, n) {
|
|
|
1885
1885
|
}
|
|
1886
1886
|
return An(r);
|
|
1887
1887
|
}
|
|
1888
|
-
function
|
|
1888
|
+
function Va(e, t) {
|
|
1889
1889
|
const n = nt(e);
|
|
1890
|
-
return n === t || !Me(n) || Tt(n) ? !1 : Ie(n).position === "fixed" ||
|
|
1890
|
+
return n === t || !Me(n) || Tt(n) ? !1 : Ie(n).position === "fixed" || Va(n, t);
|
|
1891
1891
|
}
|
|
1892
1892
|
function Cu(e, t) {
|
|
1893
1893
|
const n = t.get(e);
|
|
@@ -1898,7 +1898,7 @@ function Cu(e, t) {
|
|
|
1898
1898
|
let s = a ? nt(e) : e;
|
|
1899
1899
|
for (; Me(s) && !Tt(s); ) {
|
|
1900
1900
|
const i = Ie(s), c = eo(s);
|
|
1901
|
-
!c && i.position === "fixed" && (o = null), (a ? !c && !o : !c && i.position === "static" && !!o && xu.has(o.position) || Jt(s) && !c &&
|
|
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;
|
|
1904
1904
|
}
|
|
@@ -1965,7 +1965,7 @@ function qo(e, t) {
|
|
|
1965
1965
|
let n = e.offsetParent;
|
|
1966
1966
|
return Ue(e) === n && (n = n.ownerDocument.body), n;
|
|
1967
1967
|
}
|
|
1968
|
-
function
|
|
1968
|
+
function ja(e, t) {
|
|
1969
1969
|
const n = ke(e);
|
|
1970
1970
|
if (Dn(e))
|
|
1971
1971
|
return n;
|
|
@@ -1984,7 +1984,7 @@ function Va(e, t) {
|
|
|
1984
1984
|
return r && Tt(r) && dr(r) && !eo(r) ? n : r || mu(e) || n;
|
|
1985
1985
|
}
|
|
1986
1986
|
const Nu = async function(e) {
|
|
1987
|
-
const t = this.getOffsetParent ||
|
|
1987
|
+
const t = this.getOffsetParent || ja, n = this.getDimensions, r = await n(e.floating);
|
|
1988
1988
|
return {
|
|
1989
1989
|
reference: Au(e.reference, await t(e.floating), e.strategy),
|
|
1990
1990
|
floating: {
|
|
@@ -2002,7 +2002,7 @@ const Pu = {
|
|
|
2002
2002
|
convertOffsetParentRelativeRectToViewportRelativeRect: bu,
|
|
2003
2003
|
getDocumentElement: Ue,
|
|
2004
2004
|
getClippingRect: Eu,
|
|
2005
|
-
getOffsetParent:
|
|
2005
|
+
getOffsetParent: ja,
|
|
2006
2006
|
getElementRects: Nu,
|
|
2007
2007
|
getClientRects: vu,
|
|
2008
2008
|
getDimensions: ku,
|
|
@@ -2035,7 +2035,7 @@ function Ru(e, t) {
|
|
|
2035
2035
|
threshold: Ee(0, tt(1, c)) || 1
|
|
2036
2036
|
};
|
|
2037
2037
|
let v = !0;
|
|
2038
|
-
function
|
|
2038
|
+
function T(D) {
|
|
2039
2039
|
const _ = D[0].intersectionRatio;
|
|
2040
2040
|
if (_ !== c) {
|
|
2041
2041
|
if (!v)
|
|
@@ -2047,13 +2047,13 @@ function Ru(e, t) {
|
|
|
2047
2047
|
_ === 1 && !Ga(l, e.getBoundingClientRect()) && s(), v = !1;
|
|
2048
2048
|
}
|
|
2049
2049
|
try {
|
|
2050
|
-
n = new IntersectionObserver(
|
|
2050
|
+
n = new IntersectionObserver(T, {
|
|
2051
2051
|
...k,
|
|
2052
2052
|
// Handle <iframe>s
|
|
2053
2053
|
root: o.ownerDocument
|
|
2054
2054
|
});
|
|
2055
2055
|
} catch {
|
|
2056
|
-
n = new IntersectionObserver(
|
|
2056
|
+
n = new IntersectionObserver(T, k);
|
|
2057
2057
|
}
|
|
2058
2058
|
n.observe(e);
|
|
2059
2059
|
}
|
|
@@ -2180,7 +2180,7 @@ function Bu(e) {
|
|
|
2180
2180
|
S !== D.current && (D.current = S, h(S));
|
|
2181
2181
|
}, []), k = f.useCallback((S) => {
|
|
2182
2182
|
S !== _.current && (_.current = S, E(S));
|
|
2183
|
-
}, []), v = a || w,
|
|
2183
|
+
}, []), v = a || w, T = s || y, D = f.useRef(null), _ = f.useRef(null), P = f.useRef(d), z = c != null, j = fr(c), H = fr(o), G = fr(l), x = f.useCallback(() => {
|
|
2184
2184
|
if (!D.current || !_.current)
|
|
2185
2185
|
return;
|
|
2186
2186
|
const S = {
|
|
@@ -2197,7 +2197,7 @@ function Bu(e) {
|
|
|
2197
2197
|
// setting it to `true` when `open === false` (must be specified).
|
|
2198
2198
|
isPositioned: G.current !== !1
|
|
2199
2199
|
};
|
|
2200
|
-
|
|
2200
|
+
N.current && !Nn(P.current, Y) && (P.current = Y, _n.flushSync(() => {
|
|
2201
2201
|
m(Y);
|
|
2202
2202
|
}));
|
|
2203
2203
|
});
|
|
@@ -2208,37 +2208,37 @@ function Bu(e) {
|
|
|
2208
2208
|
isPositioned: !1
|
|
2209
2209
|
})));
|
|
2210
2210
|
}, [l]);
|
|
2211
|
-
const
|
|
2212
|
-
yn(() => (
|
|
2213
|
-
|
|
2211
|
+
const N = f.useRef(!1);
|
|
2212
|
+
yn(() => (N.current = !0, () => {
|
|
2213
|
+
N.current = !1;
|
|
2214
2214
|
}), []), yn(() => {
|
|
2215
|
-
if (v && (D.current = v),
|
|
2216
|
-
if (
|
|
2217
|
-
return
|
|
2215
|
+
if (v && (D.current = v), T && (_.current = T), v && T) {
|
|
2216
|
+
if (j.current)
|
|
2217
|
+
return j.current(v, T, x);
|
|
2218
2218
|
x();
|
|
2219
2219
|
}
|
|
2220
|
-
}, [v,
|
|
2221
|
-
const
|
|
2220
|
+
}, [v, T, x, j, z]);
|
|
2221
|
+
const R = f.useMemo(() => ({
|
|
2222
2222
|
reference: D,
|
|
2223
2223
|
floating: _,
|
|
2224
2224
|
setReference: C,
|
|
2225
2225
|
setFloating: k
|
|
2226
|
-
}), [C, k]),
|
|
2226
|
+
}), [C, k]), O = f.useMemo(() => ({
|
|
2227
2227
|
reference: v,
|
|
2228
|
-
floating:
|
|
2229
|
-
}), [v,
|
|
2228
|
+
floating: T
|
|
2229
|
+
}), [v, T]), A = f.useMemo(() => {
|
|
2230
2230
|
const S = {
|
|
2231
2231
|
position: n,
|
|
2232
2232
|
left: 0,
|
|
2233
2233
|
top: 0
|
|
2234
2234
|
};
|
|
2235
|
-
if (!
|
|
2235
|
+
if (!O.floating)
|
|
2236
2236
|
return S;
|
|
2237
|
-
const W = Xo(
|
|
2237
|
+
const W = Xo(O.floating, d.x), Y = Xo(O.floating, d.y);
|
|
2238
2238
|
return i ? {
|
|
2239
2239
|
...S,
|
|
2240
2240
|
transform: "translate(" + W + "px, " + Y + "px)",
|
|
2241
|
-
...Ya(
|
|
2241
|
+
...Ya(O.floating) >= 1.5 && {
|
|
2242
2242
|
willChange: "transform"
|
|
2243
2243
|
}
|
|
2244
2244
|
} : {
|
|
@@ -2246,14 +2246,14 @@ function Bu(e) {
|
|
|
2246
2246
|
left: W,
|
|
2247
2247
|
top: Y
|
|
2248
2248
|
};
|
|
2249
|
-
}, [n, i,
|
|
2249
|
+
}, [n, i, O.floating, d.x, d.y]);
|
|
2250
2250
|
return f.useMemo(() => ({
|
|
2251
2251
|
...d,
|
|
2252
2252
|
update: x,
|
|
2253
|
-
refs:
|
|
2254
|
-
elements:
|
|
2255
|
-
floatingStyles:
|
|
2256
|
-
}), [d, x,
|
|
2253
|
+
refs: R,
|
|
2254
|
+
elements: O,
|
|
2255
|
+
floatingStyles: A
|
|
2256
|
+
}), [d, x, R, O, A]);
|
|
2257
2257
|
}
|
|
2258
2258
|
const Hu = (e) => {
|
|
2259
2259
|
function t(n) {
|
|
@@ -2279,10 +2279,10 @@ const Hu = (e) => {
|
|
|
2279
2279
|
}, Uu = (e, t) => ({
|
|
2280
2280
|
..._u(e),
|
|
2281
2281
|
options: [e, t]
|
|
2282
|
-
}),
|
|
2282
|
+
}), Vu = (e, t) => ({
|
|
2283
2283
|
...Mu(e),
|
|
2284
2284
|
options: [e, t]
|
|
2285
|
-
}),
|
|
2285
|
+
}), ju = (e, t) => ({
|
|
2286
2286
|
...Fu(e),
|
|
2287
2287
|
options: [e, t]
|
|
2288
2288
|
}), Gu = (e, t) => ({
|
|
@@ -2417,12 +2417,12 @@ var oo = "PopperContent", [nd, rd] = Qa(oo), ns = f.forwardRef(
|
|
|
2417
2417
|
updatePositionStrategy: p = "optimized",
|
|
2418
2418
|
onPlaced: w,
|
|
2419
2419
|
...h
|
|
2420
|
-
} = e, y = Za(oo, n), [E, C] = f.useState(null), k = ie(t, (L) => C(L)), [v,
|
|
2421
|
-
padding:
|
|
2420
|
+
} = e, y = Za(oo, n), [E, C] = f.useState(null), k = ie(t, (L) => C(L)), [v, T] = f.useState(null), D = Xa(v), _ = D?.width ?? 0, P = D?.height ?? 0, z = r + (a !== "center" ? "-" + a : ""), j = typeof d == "number" ? d : { top: 0, right: 0, bottom: 0, left: 0, ...d }, H = Array.isArray(l) ? l : [l], G = H.length > 0, x = {
|
|
2421
|
+
padding: j,
|
|
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: N, floatingStyles: R, placement: O, isPositioned: A, 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
2428
|
placement: z,
|
|
@@ -2434,10 +2434,10 @@ var oo = "PopperContent", [nd, rd] = Qa(oo), ns = f.forwardRef(
|
|
|
2434
2434
|
},
|
|
2435
2435
|
middleware: [
|
|
2436
2436
|
Uu({ mainAxis: o + P, alignmentAxis: s }),
|
|
2437
|
-
c &&
|
|
2437
|
+
c && Vu({
|
|
2438
2438
|
mainAxis: !0,
|
|
2439
2439
|
crossAxis: !1,
|
|
2440
|
-
limiter: m === "partial" ?
|
|
2440
|
+
limiter: m === "partial" ? ju() : void 0,
|
|
2441
2441
|
...x
|
|
2442
2442
|
}),
|
|
2443
2443
|
c && Gu({ ...x }),
|
|
@@ -2452,21 +2452,21 @@ var oo = "PopperContent", [nd, rd] = Qa(oo), ns = f.forwardRef(
|
|
|
2452
2452
|
sd({ arrowWidth: _, arrowHeight: P }),
|
|
2453
2453
|
g && qu({ strategy: "referenceHidden", ...x })
|
|
2454
2454
|
]
|
|
2455
|
-
}), [W, Y] = as(
|
|
2455
|
+
}), [W, Y] = as(O), V = et(w);
|
|
2456
2456
|
be(() => {
|
|
2457
|
-
|
|
2458
|
-
}, [
|
|
2457
|
+
A && V?.();
|
|
2458
|
+
}, [A, V]);
|
|
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
|
E && he(window.getComputedStyle(E).zIndex);
|
|
2462
2462
|
}, [E]), /* @__PURE__ */ u(
|
|
2463
2463
|
"div",
|
|
2464
2464
|
{
|
|
2465
|
-
ref:
|
|
2465
|
+
ref: N.setFloating,
|
|
2466
2466
|
"data-radix-popper-content-wrapper": "",
|
|
2467
2467
|
style: {
|
|
2468
|
-
...
|
|
2469
|
-
transform:
|
|
2468
|
+
...R,
|
|
2469
|
+
transform: A ? R.transform : "translate(0, -200%)",
|
|
2470
2470
|
// keep off the page when measuring
|
|
2471
2471
|
minWidth: "max-content",
|
|
2472
2472
|
zIndex: J,
|
|
@@ -2488,7 +2488,7 @@ var oo = "PopperContent", [nd, rd] = Qa(oo), ns = f.forwardRef(
|
|
|
2488
2488
|
{
|
|
2489
2489
|
scope: n,
|
|
2490
2490
|
placedSide: W,
|
|
2491
|
-
onArrowChange:
|
|
2491
|
+
onArrowChange: T,
|
|
2492
2492
|
arrowX: ve,
|
|
2493
2493
|
arrowY: q,
|
|
2494
2494
|
shouldHideArrow: ee,
|
|
@@ -2503,7 +2503,7 @@ var oo = "PopperContent", [nd, rd] = Qa(oo), ns = 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: A ? void 0 : "none"
|
|
2507
2507
|
}
|
|
2508
2508
|
}
|
|
2509
2509
|
)
|
|
@@ -2931,11 +2931,11 @@ var hs = 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, w = e.noIsolation, h = e.inert, y = e.allowPinchZoom, E = e.as, C = E === void 0 ? "div" : E, k = e.gapMode, v = ms(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noRelative", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]),
|
|
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, w = e.noIsolation, h = e.inert, y = e.allowPinchZoom, E = e.as, C = E === void 0 ? "div" : E, k = e.gapMode, v = ms(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noRelative", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]), T = g, D = Ad([n, t]), _ = We(We({}, v), o);
|
|
2935
2935
|
return f.createElement(
|
|
2936
2936
|
f.Fragment,
|
|
2937
2937
|
null,
|
|
2938
|
-
d && f.createElement(
|
|
2938
|
+
d && f.createElement(T, { sideCar: hs, removeScrollBar: l, shards: m, noRelative: p, noIsolation: w, inert: h, setCallbacks: a, allowPinchZoom: !!y, lockRef: n, gapMode: k }),
|
|
2939
2939
|
s ? f.cloneElement(f.Children.only(i), We(We({}, _), { ref: D })) : f.createElement(C, We({}, _, { className: c, ref: D }), i)
|
|
2940
2940
|
);
|
|
2941
2941
|
});
|
|
@@ -3085,7 +3085,7 @@ if (typeof window < "u")
|
|
|
3085
3085
|
} catch {
|
|
3086
3086
|
Mr = !1;
|
|
3087
3087
|
}
|
|
3088
|
-
var St = Mr ? { passive: !1 } : !1,
|
|
3088
|
+
var St = Mr ? { passive: !1 } : !1, Vd = function(e) {
|
|
3089
3089
|
return e.tagName === "TEXTAREA";
|
|
3090
3090
|
}, bs = function(e, t) {
|
|
3091
3091
|
if (!(e instanceof Element))
|
|
@@ -3094,9 +3094,9 @@ var St = Mr ? { passive: !1 } : !1, jd = function(e) {
|
|
|
3094
3094
|
return (
|
|
3095
3095
|
// not-not-scrollable
|
|
3096
3096
|
n[t] !== "hidden" && // contains scroll inside self
|
|
3097
|
-
!(n.overflowY === n.overflowX && !
|
|
3097
|
+
!(n.overflowY === n.overflowX && !Vd(e) && n[t] === "visible")
|
|
3098
3098
|
);
|
|
3099
|
-
},
|
|
3099
|
+
}, jd = function(e) {
|
|
3100
3100
|
return bs(e, "overflowY");
|
|
3101
3101
|
}, Gd = function(e) {
|
|
3102
3102
|
return bs(e, "overflowX");
|
|
@@ -3128,7 +3128,7 @@ var St = Mr ? { passive: !1 } : !1, jd = function(e) {
|
|
|
3128
3128
|
r
|
|
3129
3129
|
];
|
|
3130
3130
|
}, vs = function(e, t) {
|
|
3131
|
-
return e === "v" ?
|
|
3131
|
+
return e === "v" ? jd(t) : Gd(t);
|
|
3132
3132
|
}, ys = function(e, t) {
|
|
3133
3133
|
return e === "v" ? Yd(t) : qd(t);
|
|
3134
3134
|
}, Kd = function(e, t) {
|
|
@@ -3182,31 +3182,31 @@ function ef(e) {
|
|
|
3182
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 E = mn(h), C = n.current, k = "deltaX" in h ? h.deltaX : C[0] - E[0], v = "deltaY" in h ? h.deltaY : C[1] - E[1],
|
|
3185
|
+
var E = mn(h), C = n.current, k = "deltaX" in h ? h.deltaX : C[0] - E[0], v = "deltaY" in h ? h.deltaY : C[1] - E[1], T, D = h.target, _ = Math.abs(k) > Math.abs(v) ? "h" : "v";
|
|
3186
3186
|
if ("touches" in h && _ === "h" && D.type === "range")
|
|
3187
3187
|
return !1;
|
|
3188
3188
|
var P = Jo(_, D);
|
|
3189
3189
|
if (!P)
|
|
3190
3190
|
return !0;
|
|
3191
|
-
if (P ?
|
|
3191
|
+
if (P ? T = _ : (T = _ === "v" ? "h" : "v", P = Jo(_, D)), !P)
|
|
3192
3192
|
return !1;
|
|
3193
|
-
if (!r.current && "changedTouches" in h && (k || v) && (r.current =
|
|
3193
|
+
if (!r.current && "changedTouches" in h && (k || v) && (r.current = T), !T)
|
|
3194
3194
|
return !0;
|
|
3195
|
-
var z = r.current ||
|
|
3195
|
+
var z = r.current || T;
|
|
3196
3196
|
return Xd(z, y, h, z === "h" ? k : v);
|
|
3197
3197
|
}, []), c = f.useCallback(function(h) {
|
|
3198
3198
|
var y = h;
|
|
3199
3199
|
if (!(!Ct.length || Ct[Ct.length - 1] !== a)) {
|
|
3200
|
-
var E = "deltaY" in y ? ea(y) : mn(y), C = t.current.filter(function(
|
|
3201
|
-
return
|
|
3200
|
+
var E = "deltaY" in y ? ea(y) : mn(y), C = t.current.filter(function(T) {
|
|
3201
|
+
return T.name === y.type && (T.target === y.target || y.target === T.shadowParent) && Qd(T.delta, E);
|
|
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 k = (s.current.shards || []).map(ta).filter(Boolean).filter(function(
|
|
3209
|
-
return
|
|
3208
|
+
var k = (s.current.shards || []).map(ta).filter(Boolean).filter(function(T) {
|
|
3209
|
+
return T.contains(y.target);
|
|
3210
3210
|
}), v = k.length > 0 ? i(y, k[0]) : !s.current.noIsolation;
|
|
3211
3211
|
v && y.cancelable && y.preventDefault();
|
|
3212
3212
|
}
|
|
@@ -3273,17 +3273,17 @@ var rf = [" ", "Enter", "ArrowUp", "ArrowDown"], of = [" ", "Enter"], mt = "Sele
|
|
|
3273
3273
|
disabled: g,
|
|
3274
3274
|
required: p,
|
|
3275
3275
|
form: w
|
|
3276
|
-
} = e, h = Hn(t), [y, E] = f.useState(null), [C, k] = f.useState(null), [v,
|
|
3276
|
+
} = e, h = Hn(t), [y, E] = f.useState(null), [C, k] = f.useState(null), [v, T] = f.useState(!1), D = qr(l), [_, P] = Xt({
|
|
3277
3277
|
prop: r,
|
|
3278
3278
|
defaultProp: o ?? !1,
|
|
3279
3279
|
onChange: a,
|
|
3280
3280
|
caller: mt
|
|
3281
|
-
}), [z,
|
|
3281
|
+
}), [z, j] = Xt({
|
|
3282
3282
|
prop: s,
|
|
3283
3283
|
defaultProp: i,
|
|
3284
3284
|
onChange: c,
|
|
3285
3285
|
caller: mt
|
|
3286
|
-
}), H = f.useRef(null), G = y ? w || !!y.closest("form") : !0, [x,
|
|
3286
|
+
}), H = f.useRef(null), G = y ? w || !!y.closest("form") : !0, [x, N] = f.useState(/* @__PURE__ */ new Set()), R = Array.from(x).map((O) => O.props.value).join(";");
|
|
3287
3287
|
return /* @__PURE__ */ u(ss, { ...h, children: /* @__PURE__ */ I(
|
|
3288
3288
|
sf,
|
|
3289
3289
|
{
|
|
@@ -3294,10 +3294,10 @@ var rf = [" ", "Enter", "ArrowUp", "ArrowDown"], of = [" ", "Enter"], mt = "Sele
|
|
|
3294
3294
|
valueNode: C,
|
|
3295
3295
|
onValueNodeChange: k,
|
|
3296
3296
|
valueNodeHasChildren: v,
|
|
3297
|
-
onValueNodeHasChildrenChange:
|
|
3297
|
+
onValueNodeHasChildrenChange: T,
|
|
3298
3298
|
contentId: Zt(),
|
|
3299
3299
|
value: z,
|
|
3300
|
-
onValueChange:
|
|
3300
|
+
onValueChange: j,
|
|
3301
3301
|
open: _,
|
|
3302
3302
|
onOpenChange: P,
|
|
3303
3303
|
dir: D,
|
|
@@ -3308,20 +3308,20 @@ var rf = [" ", "Enter", "ArrowUp", "ArrowDown"], of = [" ", "Enter"], mt = "Sele
|
|
|
3308
3308
|
cf,
|
|
3309
3309
|
{
|
|
3310
3310
|
scope: e.__scopeSelect,
|
|
3311
|
-
onNativeOptionAdd: f.useCallback((
|
|
3312
|
-
|
|
3311
|
+
onNativeOptionAdd: f.useCallback((O) => {
|
|
3312
|
+
N((A) => new Set(A).add(O));
|
|
3313
3313
|
}, []),
|
|
3314
|
-
onNativeOptionRemove: f.useCallback((
|
|
3315
|
-
|
|
3316
|
-
const S = new Set(
|
|
3317
|
-
return S.delete(
|
|
3314
|
+
onNativeOptionRemove: f.useCallback((O) => {
|
|
3315
|
+
N((A) => {
|
|
3316
|
+
const S = new Set(A);
|
|
3317
|
+
return S.delete(O), S;
|
|
3318
3318
|
});
|
|
3319
3319
|
}, []),
|
|
3320
3320
|
children: n
|
|
3321
3321
|
}
|
|
3322
3322
|
) }),
|
|
3323
3323
|
G ? /* @__PURE__ */ I(
|
|
3324
|
-
|
|
3324
|
+
Vs,
|
|
3325
3325
|
{
|
|
3326
3326
|
"aria-hidden": !0,
|
|
3327
3327
|
required: p,
|
|
@@ -3329,7 +3329,7 @@ var rf = [" ", "Enter", "ArrowUp", "ArrowDown"], of = [" ", "Enter"], mt = "Sele
|
|
|
3329
3329
|
name: d,
|
|
3330
3330
|
autoComplete: m,
|
|
3331
3331
|
value: z,
|
|
3332
|
-
onChange: (
|
|
3332
|
+
onChange: (O) => j(O.target.value),
|
|
3333
3333
|
disabled: g,
|
|
3334
3334
|
form: w,
|
|
3335
3335
|
children: [
|
|
@@ -3337,7 +3337,7 @@ var rf = [" ", "Enter", "ArrowUp", "ArrowDown"], of = [" ", "Enter"], mt = "Sele
|
|
|
3337
3337
|
Array.from(x)
|
|
3338
3338
|
]
|
|
3339
3339
|
},
|
|
3340
|
-
|
|
3340
|
+
R
|
|
3341
3341
|
) : null
|
|
3342
3342
|
]
|
|
3343
3343
|
}
|
|
@@ -3368,7 +3368,7 @@ var xs = "SelectTrigger", Ss = f.forwardRef(
|
|
|
3368
3368
|
"data-state": s.open ? "open" : "closed",
|
|
3369
3369
|
disabled: i,
|
|
3370
3370
|
"data-disabled": i ? "" : void 0,
|
|
3371
|
-
"data-placeholder":
|
|
3371
|
+
"data-placeholder": js(s.value) ? "" : void 0,
|
|
3372
3372
|
...o,
|
|
3373
3373
|
ref: c,
|
|
3374
3374
|
onClick: Z(o.onClick, (h) => {
|
|
@@ -3399,7 +3399,7 @@ var Cs = "SelectValue", Es = f.forwardRef(
|
|
|
3399
3399
|
...i,
|
|
3400
3400
|
ref: m,
|
|
3401
3401
|
style: { pointerEvents: "none" },
|
|
3402
|
-
children:
|
|
3402
|
+
children: js(c.value) ? /* @__PURE__ */ u(Rt, { children: s }) : a
|
|
3403
3403
|
}
|
|
3404
3404
|
);
|
|
3405
3405
|
}
|
|
@@ -3452,26 +3452,26 @@ var Oe = 10, [Ts, at] = Mt(pt), ff = "SelectContentImpl", mf = /* @__PURE__ */ C
|
|
|
3452
3452
|
avoidCollisions: y,
|
|
3453
3453
|
//
|
|
3454
3454
|
...E
|
|
3455
|
-
} = e, C = ot(pt, n), [k, v] = f.useState(null), [
|
|
3455
|
+
} = e, C = ot(pt, n), [k, v] = f.useState(null), [T, D] = f.useState(null), _ = ie(t, (L) => v(L)), [P, z] = f.useState(null), [j, H] = f.useState(
|
|
3456
3456
|
null
|
|
3457
|
-
), G = Bn(n), [x,
|
|
3457
|
+
), G = Bn(n), [x, N] = f.useState(!1), R = f.useRef(!1);
|
|
3458
3458
|
f.useEffect(() => {
|
|
3459
3459
|
if (k) return fs(k);
|
|
3460
3460
|
}, [k]), Da();
|
|
3461
|
-
const
|
|
3461
|
+
const O = f.useCallback(
|
|
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 && T && (T.scrollTop = 0), oe === Q && T && (T.scrollTop = T.scrollHeight), oe?.focus(), document.activeElement !== ne)) return;
|
|
3466
3466
|
},
|
|
3467
|
-
[G,
|
|
3468
|
-
),
|
|
3469
|
-
() =>
|
|
3470
|
-
[
|
|
3467
|
+
[G, T]
|
|
3468
|
+
), A = f.useCallback(
|
|
3469
|
+
() => O([P, k]),
|
|
3470
|
+
[O, P, k]
|
|
3471
3471
|
);
|
|
3472
3472
|
f.useEffect(() => {
|
|
3473
|
-
x &&
|
|
3474
|
-
}, [x,
|
|
3473
|
+
x && A();
|
|
3474
|
+
}, [x, A]);
|
|
3475
3475
|
const { onOpenChange: S, triggerPointerDownPosRef: W } = C;
|
|
3476
3476
|
f.useEffect(() => {
|
|
3477
3477
|
if (k) {
|
|
@@ -3494,18 +3494,18 @@ var Oe = 10, [Ts, at] = Mt(pt), ff = "SelectContentImpl", mf = /* @__PURE__ */ C
|
|
|
3494
3494
|
window.removeEventListener("blur", L), window.removeEventListener("resize", L);
|
|
3495
3495
|
};
|
|
3496
3496
|
}, [S]);
|
|
3497
|
-
const [Y,
|
|
3497
|
+
const [Y, V] = Gs((L) => {
|
|
3498
3498
|
const te = G().filter((ne) => !ne.disabled), ce = te.find((ne) => ne.ref.current === document.activeElement), Q = Ys(te, L, ce);
|
|
3499
3499
|
Q && setTimeout(() => Q.ref.current.focus());
|
|
3500
3500
|
}), ve = f.useCallback(
|
|
3501
3501
|
(L, te, ce) => {
|
|
3502
|
-
const Q = !
|
|
3503
|
-
(C.value !== void 0 && C.value === te || Q) && (z(L), Q && (
|
|
3502
|
+
const Q = !R.current && !ce;
|
|
3503
|
+
(C.value !== void 0 && C.value === te || Q) && (z(L), Q && (R.current = !0));
|
|
3504
3504
|
},
|
|
3505
3505
|
[C.value]
|
|
3506
3506
|
), q = f.useCallback(() => k?.focus(), [k]), ee = f.useCallback(
|
|
3507
3507
|
(L, te, ce) => {
|
|
3508
|
-
const Q = !
|
|
3508
|
+
const Q = !R.current && !ce;
|
|
3509
3509
|
(C.value !== void 0 && C.value === te || Q) && H(L);
|
|
3510
3510
|
},
|
|
3511
3511
|
[C.value]
|
|
@@ -3526,14 +3526,14 @@ var Oe = 10, [Ts, at] = Mt(pt), ff = "SelectContentImpl", mf = /* @__PURE__ */ C
|
|
|
3526
3526
|
{
|
|
3527
3527
|
scope: n,
|
|
3528
3528
|
content: k,
|
|
3529
|
-
viewport:
|
|
3529
|
+
viewport: T,
|
|
3530
3530
|
onViewportChange: D,
|
|
3531
3531
|
itemRefCallback: ve,
|
|
3532
3532
|
selectedItem: P,
|
|
3533
3533
|
onItemLeave: q,
|
|
3534
3534
|
itemTextRefCallback: ee,
|
|
3535
|
-
focusSelectedItem:
|
|
3536
|
-
selectedItemText:
|
|
3535
|
+
focusSelectedItem: A,
|
|
3536
|
+
selectedItemText: j,
|
|
3537
3537
|
position: r,
|
|
3538
3538
|
isPositioned: x,
|
|
3539
3539
|
searchRef: Y,
|
|
@@ -3567,7 +3567,7 @@ var Oe = 10, [Ts, at] = Mt(pt), ff = "SelectContentImpl", mf = /* @__PURE__ */ C
|
|
|
3567
3567
|
onContextMenu: (L) => L.preventDefault(),
|
|
3568
3568
|
...E,
|
|
3569
3569
|
...he,
|
|
3570
|
-
onPlaced: () =>
|
|
3570
|
+
onPlaced: () => N(!0),
|
|
3571
3571
|
ref: _,
|
|
3572
3572
|
style: {
|
|
3573
3573
|
// flex layout so we can place the scroll buttons properly
|
|
@@ -3579,13 +3579,13 @@ var Oe = 10, [Ts, at] = Mt(pt), ff = "SelectContentImpl", mf = /* @__PURE__ */ C
|
|
|
3579
3579
|
},
|
|
3580
3580
|
onKeyDown: Z(E.onKeyDown, (L) => {
|
|
3581
3581
|
const te = L.ctrlKey || L.altKey || L.metaKey;
|
|
3582
|
-
if (L.key === "Tab" && L.preventDefault(), !te && L.key.length === 1 &&
|
|
3582
|
+
if (L.key === "Tab" && L.preventDefault(), !te && L.key.length === 1 && V(L.key), ["ArrowUp", "ArrowDown", "Home", "End"].includes(L.key)) {
|
|
3583
3583
|
let Q = G().filter((ne) => !ne.disabled).map((ne) => ne.ref.current);
|
|
3584
3584
|
if (["ArrowUp", "End"].includes(L.key) && (Q = Q.slice().reverse()), ["ArrowUp", "ArrowDown"].includes(L.key)) {
|
|
3585
3585
|
const ne = L.target, oe = Q.indexOf(ne);
|
|
3586
3586
|
Q = Q.slice(oe + 1);
|
|
3587
3587
|
}
|
|
3588
|
-
setTimeout(() =>
|
|
3588
|
+
setTimeout(() => O(Q)), L.preventDefault();
|
|
3589
3589
|
}
|
|
3590
3590
|
})
|
|
3591
3591
|
}
|
|
@@ -3602,9 +3602,9 @@ Ps.displayName = ff;
|
|
|
3602
3602
|
var pf = "SelectItemAlignedPosition", Rs = f.forwardRef((e, t) => {
|
|
3603
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), w = f.useRef(!0), { viewport: h, selectedItem: y, selectedItemText: E, focusSelectedItem: C } = s, k = f.useCallback(() => {
|
|
3604
3604
|
if (a.trigger && a.valueNode && i && l && h && y && E) {
|
|
3605
|
-
const _ = a.trigger.getBoundingClientRect(), P = l.getBoundingClientRect(), z = a.valueNode.getBoundingClientRect(),
|
|
3605
|
+
const _ = a.trigger.getBoundingClientRect(), P = l.getBoundingClientRect(), z = a.valueNode.getBoundingClientRect(), j = E.getBoundingClientRect();
|
|
3606
3606
|
if (a.dir !== "rtl") {
|
|
3607
|
-
const ne =
|
|
3607
|
+
const ne = j.left - P.left, oe = z.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,20 +3615,20 @@ var pf = "SelectItemAlignedPosition", Rs = 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 -
|
|
3618
|
+
const ne = P.right - j.right, oe = window.innerWidth - z.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, x = h.scrollHeight,
|
|
3624
|
+
const H = g(), G = window.innerHeight - Oe * 2, x = h.scrollHeight, N = window.getComputedStyle(l), R = parseInt(N.borderTopWidth, 10), O = parseInt(N.paddingTop, 10), A = parseInt(N.borderBottomWidth, 10), S = parseInt(N.paddingBottom, 10), W = R + O + x + S + A, Y = Math.min(y.offsetHeight * 5, W), V = window.getComputedStyle(h), ve = parseInt(V.paddingTop, 10), q = parseInt(V.paddingBottom, 10), ee = _.top + _.height / 2 - Oe, J = G - ee, he = y.offsetHeight / 2, L = y.offsetTop + he, te = R + O + L, ce = W - te;
|
|
3625
3625
|
if (te <= ee) {
|
|
3626
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 + A
|
|
3632
3632
|
), Ne = te + de;
|
|
3633
3633
|
i.style.height = Ne + "px";
|
|
3634
3634
|
} else {
|
|
@@ -3636,7 +3636,7 @@ var pf = "SelectItemAlignedPosition", Rs = f.forwardRef((e, t) => {
|
|
|
3636
3636
|
i.style.top = "0px";
|
|
3637
3637
|
const de = Math.max(
|
|
3638
3638
|
ee,
|
|
3639
|
-
|
|
3639
|
+
R + h.offsetTop + // viewport might have padding top, include it to avoid a scrollable viewport
|
|
3640
3640
|
(ne ? ve : 0) + he
|
|
3641
3641
|
) + ce;
|
|
3642
3642
|
i.style.height = de + "px", h.scrollTop = te - ee + h.offsetTop;
|
|
@@ -3656,9 +3656,9 @@ var pf = "SelectItemAlignedPosition", Rs = f.forwardRef((e, t) => {
|
|
|
3656
3656
|
r
|
|
3657
3657
|
]);
|
|
3658
3658
|
be(() => k(), [k]);
|
|
3659
|
-
const [v,
|
|
3659
|
+
const [v, T] = f.useState();
|
|
3660
3660
|
be(() => {
|
|
3661
|
-
l &&
|
|
3661
|
+
l && T(window.getComputedStyle(l).zIndex);
|
|
3662
3662
|
}, [l]);
|
|
3663
3663
|
const D = f.useCallback(
|
|
3664
3664
|
(_) => {
|
|
@@ -3989,7 +3989,7 @@ var $r = "SelectArrow", Us = f.forwardRef(
|
|
|
3989
3989
|
}
|
|
3990
3990
|
);
|
|
3991
3991
|
Us.displayName = $r;
|
|
3992
|
-
var Cf = "SelectBubbleInput",
|
|
3992
|
+
var Cf = "SelectBubbleInput", Vs = f.forwardRef(
|
|
3993
3993
|
({ __scopeSelect: e, value: t, ...n }, r) => {
|
|
3994
3994
|
const o = f.useRef(null), a = ie(r, o), s = ls(t);
|
|
3995
3995
|
return f.useEffect(() => {
|
|
@@ -4014,8 +4014,8 @@ var Cf = "SelectBubbleInput", js = f.forwardRef(
|
|
|
4014
4014
|
);
|
|
4015
4015
|
}
|
|
4016
4016
|
);
|
|
4017
|
-
|
|
4018
|
-
function
|
|
4017
|
+
Vs.displayName = Cf;
|
|
4018
|
+
function js(e) {
|
|
4019
4019
|
return e === "" || e === void 0;
|
|
4020
4020
|
}
|
|
4021
4021
|
function Gs(e) {
|
|
@@ -4260,7 +4260,7 @@ Br || (Br = function(t) {
|
|
|
4260
4260
|
r[o - 1] = arguments[o];
|
|
4261
4261
|
return new t(...r);
|
|
4262
4262
|
});
|
|
4263
|
-
const pn = xe(Array.prototype.forEach),
|
|
4263
|
+
const pn = xe(Array.prototype.forEach), Vf = xe(Array.prototype.lastIndexOf), aa = xe(Array.prototype.pop), $t = xe(Array.prototype.push), jf = xe(Array.prototype.splice), Sn = xe(String.prototype.toLowerCase), br = xe(String.prototype.toString), vr = xe(String.prototype.match), Wt = xe(String.prototype.replace), Gf = xe(String.prototype.indexOf), Yf = xe(String.prototype.trim), _e = xe(Object.prototype.hasOwnProperty), ye = xe(RegExp.prototype.test), zt = qf(TypeError);
|
|
4264
4264
|
function xe(e) {
|
|
4265
4265
|
return function(t) {
|
|
4266
4266
|
t instanceof RegExp && (t.lastIndex = 0);
|
|
@@ -4401,30 +4401,30 @@ function Qs() {
|
|
|
4401
4401
|
const U = n.createElement("template");
|
|
4402
4402
|
U.content && U.content.ownerDocument && (n = U.content.ownerDocument);
|
|
4403
4403
|
}
|
|
4404
|
-
let v,
|
|
4404
|
+
let v, T = "";
|
|
4405
4405
|
const {
|
|
4406
4406
|
implementation: D,
|
|
4407
4407
|
createNodeIterator: _,
|
|
4408
4408
|
createDocumentFragment: P,
|
|
4409
4409
|
getElementsByTagName: z
|
|
4410
4410
|
} = n, {
|
|
4411
|
-
importNode:
|
|
4411
|
+
importNode: j
|
|
4412
4412
|
} = r;
|
|
4413
4413
|
let H = da();
|
|
4414
4414
|
t.isSupported = typeof qs == "function" && typeof k == "function" && D && D.createHTMLDocument !== void 0;
|
|
4415
4415
|
const {
|
|
4416
4416
|
MUSTACHE_EXPR: G,
|
|
4417
4417
|
ERB_EXPR: x,
|
|
4418
|
-
TMPLIT_EXPR:
|
|
4419
|
-
DATA_ATTR:
|
|
4420
|
-
ARIA_ATTR:
|
|
4421
|
-
IS_SCRIPT_OR_DATA:
|
|
4418
|
+
TMPLIT_EXPR: N,
|
|
4419
|
+
DATA_ATTR: R,
|
|
4420
|
+
ARIA_ATTR: O,
|
|
4421
|
+
IS_SCRIPT_OR_DATA: A,
|
|
4422
4422
|
ATTR_WHITESPACE: S,
|
|
4423
4423
|
CUSTOM_ELEMENT: W
|
|
4424
4424
|
} = ua;
|
|
4425
4425
|
let {
|
|
4426
4426
|
IS_ALLOWED_URI: Y
|
|
4427
|
-
} = ua,
|
|
4427
|
+
} = ua, V = null;
|
|
4428
4428
|
const ve = X({}, [...sa, ...yr, ...wr, ...xr, ...ia]);
|
|
4429
4429
|
let q = null;
|
|
4430
4430
|
const ee = X({}, [...ca, ...Sr, ...la, ...hn]);
|
|
@@ -4469,9 +4469,9 @@ function Qs() {
|
|
|
4469
4469
|
let ho = null;
|
|
4470
4470
|
const go = X({}, ["audio", "video", "img", "source", "image", "track"]);
|
|
4471
4471
|
let er = null;
|
|
4472
|
-
const bo = X({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]), on = "http://www.w3.org/1998/Math/MathML", an = "http://www.w3.org/2000/svg",
|
|
4473
|
-
let vt =
|
|
4474
|
-
const Ki = X({}, [on, an,
|
|
4472
|
+
const bo = X({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]), on = "http://www.w3.org/1998/Math/MathML", an = "http://www.w3.org/2000/svg", Ve = "http://www.w3.org/1999/xhtml";
|
|
4473
|
+
let vt = Ve, tr = !1, nr = null;
|
|
4474
|
+
const Ki = X({}, [on, an, Ve], br);
|
|
4475
4475
|
let sn = X({}, ["mi", "mo", "mn", "ms", "mtext"]), cn = X({}, ["annotation-xml"]);
|
|
4476
4476
|
const Xi = X({}, ["title", "style", "font", "a", "script"]);
|
|
4477
4477
|
let Ft = null;
|
|
@@ -4483,14 +4483,14 @@ function Qs() {
|
|
|
4483
4483
|
let b = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
4484
4484
|
if (!(yt && yt === b)) {
|
|
4485
4485
|
if ((!b || typeof b != "object") && (b = {}), b = $e(b), Ft = // eslint-disable-next-line unicorn/prefer-includes
|
|
4486
|
-
Qi.indexOf(b.PARSER_MEDIA_TYPE) === -1 ? Zi : b.PARSER_MEDIA_TYPE, fe = Ft === "application/xhtml+xml" ? br : Sn,
|
|
4486
|
+
Qi.indexOf(b.PARSER_MEDIA_TYPE) === -1 ? Zi : b.PARSER_MEDIA_TYPE, fe = Ft === "application/xhtml+xml" ? br : Sn, V = _e(b, "ALLOWED_TAGS") ? X({}, b.ALLOWED_TAGS, fe) : ve, q = _e(b, "ALLOWED_ATTR") ? X({}, b.ALLOWED_ATTR, fe) : ee, nr = _e(b, "ALLOWED_NAMESPACES") ? X({}, b.ALLOWED_NAMESPACES, br) : Ki, er = _e(b, "ADD_URI_SAFE_ATTR") ? X($e(bo), b.ADD_URI_SAFE_ATTR, fe) : bo, ho = _e(b, "ADD_DATA_URI_TAGS") ? X($e(go), b.ADD_DATA_URI_TAGS, fe) : go, Le = _e(b, "FORBID_CONTENTS") ? X({}, b.FORBID_CONTENTS, fe) : Jn, he = _e(b, "FORBID_TAGS") ? X({}, b.FORBID_TAGS, fe) : $e({}), L = _e(b, "FORBID_ATTR") ? X({}, b.FORBID_ATTR, fe) : $e({}), bt = _e(b, "USE_PROFILES") ? b.USE_PROFILES : !1, ce = b.ALLOW_ARIA_ATTR !== !1, Q = b.ALLOW_DATA_ATTR !== !1, ne = b.ALLOW_UNKNOWN_PROTOCOLS || !1, oe = b.ALLOW_SELF_CLOSE_IN_ATTR !== !1, de = b.SAFE_FOR_TEMPLATES || !1, Ne = b.SAFE_FOR_XML !== !1, Re = b.WHOLE_DOCUMENT || !1, gt = b.RETURN_DOM || !1, nn = b.RETURN_DOM_FRAGMENT || !1, rn = b.RETURN_TRUSTED_TYPE || !1, ct = b.FORCE_BODY || !1, mo = b.SANITIZE_DOM !== !1, po = b.SANITIZE_NAMED_PROPS || !1, Zn = b.KEEP_CONTENT !== !1, Lt = b.IN_PLACE || !1, Y = b.ALLOWED_URI_REGEXP || Ks, vt = b.NAMESPACE || Ve, sn = b.MATHML_TEXT_INTEGRATION_POINTS || sn, cn = b.HTML_INTEGRATION_POINTS || cn, J = b.CUSTOM_ELEMENT_HANDLING || {}, b.CUSTOM_ELEMENT_HANDLING && vo(b.CUSTOM_ELEMENT_HANDLING.tagNameCheck) && (J.tagNameCheck = b.CUSTOM_ELEMENT_HANDLING.tagNameCheck), b.CUSTOM_ELEMENT_HANDLING && vo(b.CUSTOM_ELEMENT_HANDLING.attributeNameCheck) && (J.attributeNameCheck = b.CUSTOM_ELEMENT_HANDLING.attributeNameCheck), b.CUSTOM_ELEMENT_HANDLING && typeof b.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements == "boolean" && (J.allowCustomizedBuiltInElements = b.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements), de && (Q = !1), nn && (gt = !0), bt && (V = X({}, ia), q = [], bt.html === !0 && (X(V, sa), X(q, ca)), bt.svg === !0 && (X(V, yr), X(q, Sr), X(q, hn)), bt.svgFilters === !0 && (X(V, wr), X(q, Sr), X(q, hn)), bt.mathMl === !0 && (X(V, xr), X(q, la), X(q, hn))), b.ADD_TAGS && (typeof b.ADD_TAGS == "function" ? te.tagCheck = b.ADD_TAGS : (V === ve && (V = $e(V)), X(V, b.ADD_TAGS, fe))), b.ADD_ATTR && (typeof b.ADD_ATTR == "function" ? te.attributeCheck = b.ADD_ATTR : (q === ee && (q = $e(q)), X(q, b.ADD_ATTR, fe))), b.ADD_URI_SAFE_ATTR && X(er, b.ADD_URI_SAFE_ATTR, fe), b.FORBID_CONTENTS && (Le === Jn && (Le = $e(Le)), X(Le, b.FORBID_CONTENTS, fe)), b.ADD_FORBID_CONTENTS && (Le === Jn && (Le = $e(Le)), X(Le, b.ADD_FORBID_CONTENTS, fe)), Zn && (V["#text"] = !0), Re && X(V, ["html", "head", "body"]), V.table && (X(V, ["tbody"]), delete he.tbody), b.TRUSTED_TYPES_POLICY) {
|
|
4487
4487
|
if (typeof b.TRUSTED_TYPES_POLICY.createHTML != "function")
|
|
4488
4488
|
throw zt('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
|
|
4489
4489
|
if (typeof b.TRUSTED_TYPES_POLICY.createScriptURL != "function")
|
|
4490
4490
|
throw zt('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');
|
|
4491
|
-
v = b.TRUSTED_TYPES_POLICY,
|
|
4491
|
+
v = b.TRUSTED_TYPES_POLICY, T = v.createHTML("");
|
|
4492
4492
|
} else
|
|
4493
|
-
v === void 0 && (v = im(p, o)), v !== null && typeof
|
|
4493
|
+
v === void 0 && (v = im(p, o)), v !== null && typeof T == "string" && (T = v.createHTML(""));
|
|
4494
4494
|
we && we(b), yt = b;
|
|
4495
4495
|
}
|
|
4496
4496
|
}, yo = X({}, [...yr, ...wr, ...Xf]), wo = X({}, [...xr, ...Qf]), ec = function(b) {
|
|
@@ -4500,7 +4500,7 @@ function Qs() {
|
|
|
4500
4500
|
tagName: "template"
|
|
4501
4501
|
});
|
|
4502
4502
|
const B = Sn(b.tagName), se = Sn(M.tagName);
|
|
4503
|
-
return nr[b.namespaceURI] ? b.namespaceURI === an ? M.namespaceURI ===
|
|
4503
|
+
return nr[b.namespaceURI] ? b.namespaceURI === an ? M.namespaceURI === Ve ? B === "svg" : M.namespaceURI === on ? B === "svg" && (se === "annotation-xml" || sn[se]) : !!yo[B] : b.namespaceURI === on ? M.namespaceURI === Ve ? B === "math" : M.namespaceURI === an ? B === "math" && cn[se] : !!wo[B] : b.namespaceURI === Ve ? M.namespaceURI === an && !cn[se] || M.namespaceURI === on && !sn[se] ? !1 : !wo[B] && (Xi[B] || !yo[B]) : !!(Ft === "application/xhtml+xml" && nr[b.namespaceURI]) : !1;
|
|
4504
4504
|
}, Fe = function(b) {
|
|
4505
4505
|
$t(t.removed, {
|
|
4506
4506
|
element: b
|
|
@@ -4541,9 +4541,9 @@ function Qs() {
|
|
|
4541
4541
|
const le = vr(b, /^[\r\n\t ]+/);
|
|
4542
4542
|
B = le && le[0];
|
|
4543
4543
|
}
|
|
4544
|
-
Ft === "application/xhtml+xml" && vt ===
|
|
4544
|
+
Ft === "application/xhtml+xml" && vt === Ve && (b = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + b + "</body></html>");
|
|
4545
4545
|
const se = v ? v.createHTML(b) : b;
|
|
4546
|
-
if (vt ===
|
|
4546
|
+
if (vt === Ve)
|
|
4547
4547
|
try {
|
|
4548
4548
|
M = new g().parseFromString(se, Ft);
|
|
4549
4549
|
} catch {
|
|
@@ -4551,12 +4551,12 @@ function Qs() {
|
|
|
4551
4551
|
if (!M || !M.documentElement) {
|
|
4552
4552
|
M = D.createDocument(vt, "template", null);
|
|
4553
4553
|
try {
|
|
4554
|
-
M.documentElement.innerHTML = tr ?
|
|
4554
|
+
M.documentElement.innerHTML = tr ? T : se;
|
|
4555
4555
|
} catch {
|
|
4556
4556
|
}
|
|
4557
4557
|
}
|
|
4558
4558
|
const ge = M.body || M.documentElement;
|
|
4559
|
-
return b && B && ge.insertBefore(n.createTextNode(B), ge.childNodes[0] || null), vt ===
|
|
4559
|
+
return b && B && ge.insertBefore(n.createTextNode(B), ge.childNodes[0] || null), vt === Ve ? z.call(M, Re ? "html" : "body")[0] : Re ? M.documentElement : ge;
|
|
4560
4560
|
}, So = function(b) {
|
|
4561
4561
|
return _.call(
|
|
4562
4562
|
b.ownerDocument || b,
|
|
@@ -4570,22 +4570,22 @@ function Qs() {
|
|
|
4570
4570
|
}, Co = function(b) {
|
|
4571
4571
|
return typeof i == "function" && b instanceof i;
|
|
4572
4572
|
};
|
|
4573
|
-
function
|
|
4573
|
+
function je(U, b, M) {
|
|
4574
4574
|
pn(U, (B) => {
|
|
4575
4575
|
B.call(t, b, M, yt);
|
|
4576
4576
|
});
|
|
4577
4577
|
}
|
|
4578
4578
|
const Eo = function(b) {
|
|
4579
4579
|
let M = null;
|
|
4580
|
-
if (
|
|
4580
|
+
if (je(H.beforeSanitizeElements, b, null), or(b))
|
|
4581
4581
|
return Fe(b), !0;
|
|
4582
4582
|
const B = fe(b.nodeName);
|
|
4583
|
-
if (
|
|
4583
|
+
if (je(H.uponSanitizeElement, b, {
|
|
4584
4584
|
tagName: B,
|
|
4585
|
-
allowedTags:
|
|
4585
|
+
allowedTags: V
|
|
4586
4586
|
}), Ne && b.hasChildNodes() && !Co(b.firstElementChild) && ye(/<[/\w!]/g, b.innerHTML) && ye(/<[/\w!]/g, b.textContent) || b.nodeType === Ht.progressingInstruction || Ne && b.nodeType === Ht.comment && ye(/<[/\w]/g, b.data))
|
|
4587
4587
|
return Fe(b), !0;
|
|
4588
|
-
if (!(te.tagCheck instanceof Function && te.tagCheck(B)) && (!
|
|
4588
|
+
if (!(te.tagCheck instanceof Function && te.tagCheck(B)) && (!V[B] || he[B])) {
|
|
4589
4589
|
if (!he[B] && Ao(B) && (J.tagNameCheck instanceof RegExp && ye(J.tagNameCheck, B) || J.tagNameCheck instanceof Function && J.tagNameCheck(B)))
|
|
4590
4590
|
return !1;
|
|
4591
4591
|
if (Zn && !Le[B]) {
|
|
@@ -4600,16 +4600,16 @@ function Qs() {
|
|
|
4600
4600
|
}
|
|
4601
4601
|
return Fe(b), !0;
|
|
4602
4602
|
}
|
|
4603
|
-
return b instanceof c && !ec(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, x,
|
|
4603
|
+
return b instanceof c && !ec(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, x, N], (se) => {
|
|
4604
4604
|
M = Wt(M, se, " ");
|
|
4605
4605
|
}), b.textContent !== M && ($t(t.removed, {
|
|
4606
4606
|
element: b.cloneNode()
|
|
4607
|
-
}), b.textContent = M)),
|
|
4607
|
+
}), b.textContent = M)), je(H.afterSanitizeElements, b, null), !1);
|
|
4608
4608
|
}, ko = function(b, M, B) {
|
|
4609
4609
|
if (mo && (M === "id" || M === "name") && (B in n || B in Ji))
|
|
4610
4610
|
return !1;
|
|
4611
|
-
if (!(Q && !L[M] && ye(
|
|
4612
|
-
if (!(ce && ye(
|
|
4611
|
+
if (!(Q && !L[M] && ye(R, M))) {
|
|
4612
|
+
if (!(ce && ye(O, M))) {
|
|
4613
4613
|
if (!(te.attributeCheck instanceof Function && te.attributeCheck(M, b))) {
|
|
4614
4614
|
if (!q[M] || L[M]) {
|
|
4615
4615
|
if (
|
|
@@ -4623,7 +4623,7 @@ function Qs() {
|
|
|
4623
4623
|
} else if (!er[M]) {
|
|
4624
4624
|
if (!ye(Y, Wt(B, S, ""))) {
|
|
4625
4625
|
if (!((M === "src" || M === "xlink:href" || M === "href") && b !== "script" && Gf(B, "data:") === 0 && ho[b])) {
|
|
4626
|
-
if (!(ne && !ye(
|
|
4626
|
+
if (!(ne && !ye(A, Wt(B, S, "")))) {
|
|
4627
4627
|
if (B)
|
|
4628
4628
|
return !1;
|
|
4629
4629
|
}
|
|
@@ -4637,7 +4637,7 @@ function Qs() {
|
|
|
4637
4637
|
}, Ao = function(b) {
|
|
4638
4638
|
return b !== "annotation-xml" && vr(b, W);
|
|
4639
4639
|
}, No = function(b) {
|
|
4640
|
-
|
|
4640
|
+
je(H.beforeSanitizeAttributes, b, null);
|
|
4641
4641
|
const {
|
|
4642
4642
|
attributes: M
|
|
4643
4643
|
} = b;
|
|
@@ -4658,7 +4658,7 @@ function Qs() {
|
|
|
4658
4658
|
value: Ge
|
|
4659
4659
|
} = ge, wt = fe(le), ar = Ge;
|
|
4660
4660
|
let pe = le === "value" ? ar : Yf(ar);
|
|
4661
|
-
if (B.attrName = wt, B.attrValue = pe, B.keepAttr = !0, B.forceKeepAttr = void 0,
|
|
4661
|
+
if (B.attrName = wt, B.attrValue = pe, B.keepAttr = !0, B.forceKeepAttr = void 0, je(H.uponSanitizeAttribute, b, B), pe = B.attrValue, po && (wt === "id" || wt === "name") && (lt(le, b), pe = qi + pe), Ne && ye(/((--!?|])>)|<\/(style|title|textarea)/i, pe)) {
|
|
4662
4662
|
lt(le, b);
|
|
4663
4663
|
continue;
|
|
4664
4664
|
}
|
|
@@ -4676,7 +4676,7 @@ function Qs() {
|
|
|
4676
4676
|
lt(le, b);
|
|
4677
4677
|
continue;
|
|
4678
4678
|
}
|
|
4679
|
-
de && pn([G, x,
|
|
4679
|
+
de && pn([G, x, N], (Po) => {
|
|
4680
4680
|
pe = Wt(pe, Po, " ");
|
|
4681
4681
|
});
|
|
4682
4682
|
const To = fe(b.nodeName);
|
|
@@ -4702,13 +4702,13 @@ function Qs() {
|
|
|
4702
4702
|
lt(le, b);
|
|
4703
4703
|
}
|
|
4704
4704
|
}
|
|
4705
|
-
|
|
4705
|
+
je(H.afterSanitizeAttributes, b, null);
|
|
4706
4706
|
}, tc = function U(b) {
|
|
4707
4707
|
let M = null;
|
|
4708
4708
|
const B = So(b);
|
|
4709
|
-
for (
|
|
4710
|
-
|
|
4711
|
-
|
|
4709
|
+
for (je(H.beforeSanitizeShadowDOM, b, null); M = B.nextNode(); )
|
|
4710
|
+
je(H.uponSanitizeShadowNode, M, null), Eo(M), No(M), M.content instanceof a && U(M.content);
|
|
4711
|
+
je(H.afterSanitizeShadowDOM, b, null);
|
|
4712
4712
|
};
|
|
4713
4713
|
return t.sanitize = function(U) {
|
|
4714
4714
|
let b = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, M = null, B = null, se = null, ge = null;
|
|
@@ -4723,7 +4723,7 @@ function Qs() {
|
|
|
4723
4723
|
if (it || rr(b), t.removed = [], typeof U == "string" && (Lt = !1), Lt) {
|
|
4724
4724
|
if (U.nodeName) {
|
|
4725
4725
|
const Ge = fe(U.nodeName);
|
|
4726
|
-
if (!
|
|
4726
|
+
if (!V[Ge] || he[Ge])
|
|
4727
4727
|
throw zt("root node is forbidden and cannot be sanitized in-place");
|
|
4728
4728
|
}
|
|
4729
4729
|
} else if (U instanceof i)
|
|
@@ -4733,7 +4733,7 @@ function Qs() {
|
|
|
4733
4733
|
U.indexOf("<") === -1)
|
|
4734
4734
|
return v && rn ? v.createHTML(U) : U;
|
|
4735
4735
|
if (M = xo(U), !M)
|
|
4736
|
-
return gt ? null : rn ?
|
|
4736
|
+
return gt ? null : rn ? T : "";
|
|
4737
4737
|
}
|
|
4738
4738
|
M && ct && Fe(M.firstChild);
|
|
4739
4739
|
const le = So(Lt ? U : M);
|
|
@@ -4747,11 +4747,11 @@ function Qs() {
|
|
|
4747
4747
|
ge.appendChild(M.firstChild);
|
|
4748
4748
|
else
|
|
4749
4749
|
ge = M;
|
|
4750
|
-
return (q.shadowroot || q.shadowrootmode) && (ge =
|
|
4750
|
+
return (q.shadowroot || q.shadowrootmode) && (ge = j.call(r, ge, !0)), ge;
|
|
4751
4751
|
}
|
|
4752
4752
|
let Se = Re ? M.outerHTML : M.innerHTML;
|
|
4753
|
-
return Re &&
|
|
4754
|
-
` + Se), de && pn([G, x,
|
|
4753
|
+
return Re && V["!doctype"] && M.ownerDocument && M.ownerDocument.doctype && M.ownerDocument.doctype.name && ye(Xs, M.ownerDocument.doctype.name) && (Se = "<!DOCTYPE " + M.ownerDocument.doctype.name + `>
|
|
4754
|
+
` + Se), de && pn([G, x, N], (Ge) => {
|
|
4755
4755
|
Se = Wt(Se, Ge, " ");
|
|
4756
4756
|
}), v && rn ? v.createHTML(Se) : Se;
|
|
4757
4757
|
}, t.setConfig = function() {
|
|
@@ -4767,8 +4767,8 @@ function Qs() {
|
|
|
4767
4767
|
typeof b == "function" && $t(H[U], b);
|
|
4768
4768
|
}, t.removeHook = function(U, b) {
|
|
4769
4769
|
if (b !== void 0) {
|
|
4770
|
-
const M =
|
|
4771
|
-
return M === -1 ? void 0 :
|
|
4770
|
+
const M = Vf(H[U], b);
|
|
4771
|
+
return M === -1 ? void 0 : jf(H[U], M, 1)[0];
|
|
4772
4772
|
}
|
|
4773
4773
|
return aa(H[U]);
|
|
4774
4774
|
}, t.removeHooks = function(U) {
|
|
@@ -4813,7 +4813,7 @@ const lm = ({ editor: e, error: t }) => {
|
|
|
4813
4813
|
className: r(e.isActive("italic")),
|
|
4814
4814
|
"aria-label": "Italic",
|
|
4815
4815
|
"aria-pressed": e.isActive("italic"),
|
|
4816
|
-
children: /* @__PURE__ */ u(
|
|
4816
|
+
children: /* @__PURE__ */ u(jc, { size: 14 })
|
|
4817
4817
|
}
|
|
4818
4818
|
),
|
|
4819
4819
|
/* @__PURE__ */ u(
|
|
@@ -5028,8 +5028,8 @@ function dm({
|
|
|
5028
5028
|
disabled:cursor-not-allowed disabled:opacity-50
|
|
5029
5029
|
`;
|
|
5030
5030
|
if (w.length > 0) {
|
|
5031
|
-
const C = Array.isArray(t[e.name]) ? t[e.name] : [], k = (v,
|
|
5032
|
-
let D =
|
|
5031
|
+
const C = Array.isArray(t[e.name]) ? t[e.name] : [], k = (v, T) => {
|
|
5032
|
+
let D = T ? [...C, v] : C.filter((_) => _ !== v);
|
|
5033
5033
|
n(e.name, D), r(e.name);
|
|
5034
5034
|
};
|
|
5035
5035
|
return /* @__PURE__ */ I(
|
|
@@ -5039,16 +5039,13 @@ function dm({
|
|
|
5039
5039
|
"aria-invalid": !!o,
|
|
5040
5040
|
"aria-describedby": o ? y : void 0,
|
|
5041
5041
|
children: [
|
|
5042
|
-
/* @__PURE__ */
|
|
5043
|
-
e.label,
|
|
5044
|
-
e.required && /* @__PURE__ */ u("span", { className: "text-destructive ml-1", children: "*" })
|
|
5045
|
-
] }),
|
|
5042
|
+
/* @__PURE__ */ u("legend", { className: "sr-only", children: e.label }),
|
|
5046
5043
|
/* @__PURE__ */ u(
|
|
5047
5044
|
"div",
|
|
5048
5045
|
{
|
|
5049
5046
|
className: h ? "flex flex-wrap gap-x-6 gap-y-3" : "space-y-4",
|
|
5050
5047
|
children: w.map((v) => {
|
|
5051
|
-
const
|
|
5048
|
+
const T = typeof v == "object" ? v.value : v, D = typeof v == "object" ? v.label : v, _ = typeof v == "object" ? v.description : null, P = `${e.name}-${T}`, z = C.includes(T);
|
|
5052
5049
|
return /* @__PURE__ */ I(
|
|
5053
5050
|
"div",
|
|
5054
5051
|
{
|
|
@@ -5062,7 +5059,7 @@ function dm({
|
|
|
5062
5059
|
type: "checkbox",
|
|
5063
5060
|
id: P,
|
|
5064
5061
|
checked: z,
|
|
5065
|
-
onChange: (
|
|
5062
|
+
onChange: (j) => k(T, j.target.checked),
|
|
5066
5063
|
onBlur: () => r(e.name),
|
|
5067
5064
|
disabled: p,
|
|
5068
5065
|
className: `${E} ${!p && "cursor-pointer hover:border-primary/50"} ${o ? "border-destructive ring-destructive/20" : "border-input"}`
|
|
@@ -5087,7 +5084,7 @@ function dm({
|
|
|
5087
5084
|
] })
|
|
5088
5085
|
]
|
|
5089
5086
|
},
|
|
5090
|
-
|
|
5087
|
+
T
|
|
5091
5088
|
);
|
|
5092
5089
|
})
|
|
5093
5090
|
}
|
|
@@ -5474,7 +5471,7 @@ const Nm = {
|
|
|
5474
5471
|
defaultFormattingWidth: "wide"
|
|
5475
5472
|
})
|
|
5476
5473
|
};
|
|
5477
|
-
function
|
|
5474
|
+
function Vt(e) {
|
|
5478
5475
|
return (t, n = {}) => {
|
|
5479
5476
|
const r = n.width, o = r && e.matchPatterns[r] || e.matchPatterns[e.defaultMatchWidth], a = t.match(o);
|
|
5480
5477
|
if (!a)
|
|
@@ -5526,11 +5523,11 @@ const $m = /^(\d+)(th|st|nd|rd)?/i, Wm = /\d+/i, zm = {
|
|
|
5526
5523
|
wide: /^[1234](th|st|nd|rd)? quarter/i
|
|
5527
5524
|
}, Um = {
|
|
5528
5525
|
any: [/1/i, /2/i, /3/i, /4/i]
|
|
5529
|
-
},
|
|
5526
|
+
}, Vm = {
|
|
5530
5527
|
narrow: /^[jfmasond]/i,
|
|
5531
5528
|
abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,
|
|
5532
5529
|
wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i
|
|
5533
|
-
},
|
|
5530
|
+
}, jm = {
|
|
5534
5531
|
narrow: [
|
|
5535
5532
|
/^j/i,
|
|
5536
5533
|
/^f/i,
|
|
@@ -5587,32 +5584,32 @@ const $m = /^(\d+)(th|st|nd|rd)?/i, Wm = /\d+/i, zm = {
|
|
|
5587
5584
|
parsePattern: Wm,
|
|
5588
5585
|
valueCallback: (e) => parseInt(e, 10)
|
|
5589
5586
|
}),
|
|
5590
|
-
era:
|
|
5587
|
+
era: Vt({
|
|
5591
5588
|
matchPatterns: zm,
|
|
5592
5589
|
defaultMatchWidth: "wide",
|
|
5593
5590
|
parsePatterns: Bm,
|
|
5594
5591
|
defaultParseWidth: "any"
|
|
5595
5592
|
}),
|
|
5596
|
-
quarter:
|
|
5593
|
+
quarter: Vt({
|
|
5597
5594
|
matchPatterns: Hm,
|
|
5598
5595
|
defaultMatchWidth: "wide",
|
|
5599
5596
|
parsePatterns: Um,
|
|
5600
5597
|
defaultParseWidth: "any",
|
|
5601
5598
|
valueCallback: (e) => e + 1
|
|
5602
5599
|
}),
|
|
5603
|
-
month:
|
|
5604
|
-
matchPatterns:
|
|
5600
|
+
month: Vt({
|
|
5601
|
+
matchPatterns: Vm,
|
|
5605
5602
|
defaultMatchWidth: "wide",
|
|
5606
|
-
parsePatterns:
|
|
5603
|
+
parsePatterns: jm,
|
|
5607
5604
|
defaultParseWidth: "any"
|
|
5608
5605
|
}),
|
|
5609
|
-
day:
|
|
5606
|
+
day: Vt({
|
|
5610
5607
|
matchPatterns: Gm,
|
|
5611
5608
|
defaultMatchWidth: "wide",
|
|
5612
5609
|
parsePatterns: Ym,
|
|
5613
5610
|
defaultParseWidth: "any"
|
|
5614
5611
|
}),
|
|
5615
|
-
dayPeriod:
|
|
5612
|
+
dayPeriod: Vt({
|
|
5616
5613
|
matchPatterns: qm,
|
|
5617
5614
|
defaultMatchWidth: "any",
|
|
5618
5615
|
parsePatterns: Km,
|
|
@@ -6395,11 +6392,11 @@ function gp(e) {
|
|
|
6395
6392
|
function bp(e, t) {
|
|
6396
6393
|
return f.useReducer((n, r) => t[n][r] ?? n, e);
|
|
6397
6394
|
}
|
|
6398
|
-
var
|
|
6395
|
+
var Vn = (e) => {
|
|
6399
6396
|
const { present: t, children: n } = e, r = vp(t), o = typeof n == "function" ? n({ present: r.isPresent }) : f.Children.only(n), a = ie(r.ref, yp(o));
|
|
6400
6397
|
return typeof n == "function" || r.isPresent ? f.cloneElement(o, { ref: a }) : null;
|
|
6401
6398
|
};
|
|
6402
|
-
|
|
6399
|
+
Vn.displayName = "Presence";
|
|
6403
6400
|
function vp(e) {
|
|
6404
6401
|
const [t, n] = f.useState(), r = f.useRef(null), o = f.useRef(e), a = f.useRef("none"), s = e ? "mounted" : "unmounted", [i, c] = bp(s, {
|
|
6405
6402
|
mounted: {
|
|
@@ -6480,9 +6477,9 @@ var wp = [
|
|
|
6480
6477
|
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ u(c, { ...i, ref: a });
|
|
6481
6478
|
});
|
|
6482
6479
|
return r.displayName = `Primitive.${t}`, { ...e, [t]: r };
|
|
6483
|
-
}, {}),
|
|
6480
|
+
}, {}), jn = "Popover", [oi] = ht(jn, [
|
|
6484
6481
|
$n
|
|
6485
|
-
]), en = $n(), [xp, st] = oi(
|
|
6482
|
+
]), en = $n(), [xp, st] = oi(jn), ai = (e) => {
|
|
6486
6483
|
const {
|
|
6487
6484
|
__scopePopover: t,
|
|
6488
6485
|
children: n,
|
|
@@ -6494,7 +6491,7 @@ var wp = [
|
|
|
6494
6491
|
prop: r,
|
|
6495
6492
|
defaultProp: o ?? !1,
|
|
6496
6493
|
onChange: a,
|
|
6497
|
-
caller:
|
|
6494
|
+
caller: jn
|
|
6498
6495
|
});
|
|
6499
6496
|
return /* @__PURE__ */ u(ss, { ...i, children: /* @__PURE__ */ u(
|
|
6500
6497
|
xp,
|
|
@@ -6513,7 +6510,7 @@ var wp = [
|
|
|
6513
6510
|
}
|
|
6514
6511
|
) });
|
|
6515
6512
|
};
|
|
6516
|
-
ai.displayName =
|
|
6513
|
+
ai.displayName = jn;
|
|
6517
6514
|
var si = "PopoverAnchor", Sp = f.forwardRef(
|
|
6518
6515
|
(e, t) => {
|
|
6519
6516
|
const { __scopePopover: n, ...r } = e, o = st(si, n), a = en(n), { onCustomAnchorAdd: s, onCustomAnchorRemove: i } = o;
|
|
@@ -6544,13 +6541,13 @@ var lo = "PopoverPortal", [Cp, Ep] = oi(lo, {
|
|
|
6544
6541
|
forceMount: void 0
|
|
6545
6542
|
}), li = (e) => {
|
|
6546
6543
|
const { __scopePopover: t, forceMount: n, children: r, container: o } = e, a = st(lo, t);
|
|
6547
|
-
return /* @__PURE__ */ u(Cp, { scope: t, forceMount: n, children: /* @__PURE__ */ u(
|
|
6544
|
+
return /* @__PURE__ */ u(Cp, { scope: t, forceMount: n, children: /* @__PURE__ */ u(Vn, { present: n || a.open, children: /* @__PURE__ */ u(so, { asChild: !0, container: o, children: r }) }) });
|
|
6548
6545
|
};
|
|
6549
6546
|
li.displayName = lo;
|
|
6550
6547
|
var Pt = "PopoverContent", ui = f.forwardRef(
|
|
6551
6548
|
(e, t) => {
|
|
6552
6549
|
const n = Ep(Pt, e.__scopePopover), { forceMount: r = n.forceMount, ...o } = e, a = st(Pt, e.__scopePopover);
|
|
6553
|
-
return /* @__PURE__ */ u(
|
|
6550
|
+
return /* @__PURE__ */ u(Vn, { present: r || a.open, children: a.modal ? /* @__PURE__ */ u(Ap, { ...o, ref: t }) : /* @__PURE__ */ u(Np, { ...o, ref: t }) });
|
|
6554
6551
|
}
|
|
6555
6552
|
);
|
|
6556
6553
|
ui.displayName = Pt;
|
|
@@ -6777,18 +6774,18 @@ const Lp = (e, t) => {
|
|
|
6777
6774
|
}
|
|
6778
6775
|
}, Up = (e, t, n, r) => {
|
|
6779
6776
|
if (typeof e == "string") {
|
|
6780
|
-
|
|
6777
|
+
Vp(e, t, n);
|
|
6781
6778
|
return;
|
|
6782
6779
|
}
|
|
6783
6780
|
if (typeof e == "function") {
|
|
6784
|
-
|
|
6781
|
+
jp(e, t, n, r);
|
|
6785
6782
|
return;
|
|
6786
6783
|
}
|
|
6787
6784
|
Gp(e, t, n, r);
|
|
6788
|
-
},
|
|
6785
|
+
}, Vp = (e, t, n) => {
|
|
6789
6786
|
const r = e === "" ? t : bi(t, e);
|
|
6790
6787
|
r.classGroupId = n;
|
|
6791
|
-
},
|
|
6788
|
+
}, jp = (e, t, n, r) => {
|
|
6792
6789
|
if (Yp(e)) {
|
|
6793
6790
|
uo(e(r), t, n, r);
|
|
6794
6791
|
return;
|
|
@@ -6940,9 +6937,9 @@ const Lp = (e, t) => {
|
|
|
6940
6937
|
if (s.indexOf(v) > -1)
|
|
6941
6938
|
continue;
|
|
6942
6939
|
s.push(v);
|
|
6943
|
-
const
|
|
6944
|
-
for (let D = 0; D <
|
|
6945
|
-
const _ =
|
|
6940
|
+
const T = o(E, y);
|
|
6941
|
+
for (let D = 0; D < T.length; ++D) {
|
|
6942
|
+
const _ = T[D];
|
|
6946
6943
|
s.push(k + _);
|
|
6947
6944
|
}
|
|
6948
6945
|
c = d + (c.length > 0 ? " " + c : c);
|
|
@@ -6981,7 +6978,7 @@ const Lp = (e, t) => {
|
|
|
6981
6978
|
// For example, `hsl(0 0% 0%)` would be classified as a length without this check.
|
|
6982
6979
|
// I could also use lookbehind assertion in `lengthUnitRegex` but that isn't supported widely enough.
|
|
6983
6980
|
sh.test(e) && !ih.test(e)
|
|
6984
|
-
), xi = () => !1, fh = (e) => ch.test(e), mh = (e) => lh.test(e), ph = (e) => !F(e) && !$(e), hh = (e) => It(e, Ei, xi), F = (e) => yi.test(e), ut = (e) => It(e, ki, dh), kr = (e) => It(e, wh, K), Sa = (e) => It(e, Si, xi), gh = (e) => It(e, Ci, mh), bn = (e) => It(e, Ai, fh), $ = (e) => wi.test(e),
|
|
6981
|
+
), xi = () => !1, fh = (e) => ch.test(e), mh = (e) => lh.test(e), ph = (e) => !F(e) && !$(e), hh = (e) => It(e, Ei, xi), F = (e) => yi.test(e), ut = (e) => It(e, ki, dh), kr = (e) => It(e, wh, K), Sa = (e) => It(e, Si, xi), gh = (e) => It(e, Ci, mh), bn = (e) => It(e, Ai, fh), $ = (e) => wi.test(e), jt = (e) => Dt(e, ki), bh = (e) => Dt(e, xh), Ca = (e) => Dt(e, Si), vh = (e) => Dt(e, Ei), yh = (e) => Dt(e, Ci), vn = (e) => Dt(e, Ai, !0), It = (e, t, n) => {
|
|
6985
6982
|
const r = yi.exec(e);
|
|
6986
6983
|
return r ? r[1] ? t(r[1]) : n(r[2]) : !1;
|
|
6987
6984
|
}, Dt = (e, t, n = !1) => {
|
|
@@ -7006,15 +7003,15 @@ const Lp = (e, t) => {
|
|
|
7006
7003
|
"bottom-left",
|
|
7007
7004
|
// Deprecated since Tailwind CSS v4.1.0, see https://github.com/tailwindlabs/tailwindcss/pull/17378
|
|
7008
7005
|
"left-bottom"
|
|
7009
|
-
],
|
|
7006
|
+
], T = () => [...v(), $, F], D = () => ["auto", "hidden", "clip", "visible", "scroll"], _ = () => ["auto", "contain", "none"], P = () => [$, F, c], z = () => [kt, "full", "auto", ...P()], j = () => [Qe, "none", "subgrid", $, F], H = () => ["auto", {
|
|
7010
7007
|
span: ["full", Qe, $, F]
|
|
7011
|
-
}, Qe, $, F], G = () => [Qe, "auto", $, F], x = () => ["auto", "min", "max", "fr", $, F],
|
|
7008
|
+
}, Qe, $, F], G = () => [Qe, "auto", $, F], x = () => ["auto", "min", "max", "fr", $, F], N = () => ["start", "end", "center", "between", "around", "evenly", "stretch", "baseline", "center-safe", "end-safe"], R = () => ["start", "end", "center", "stretch", "center-safe", "end-safe"], O = () => ["auto", ...P()], A = () => [kt, "auto", "full", "dvw", "dvh", "lvw", "lvh", "svw", "svh", "min", "max", "fit", ...P()], S = () => [e, $, F], W = () => [...v(), Ca, Sa, {
|
|
7012
7009
|
position: [$, F]
|
|
7013
7010
|
}], Y = () => ["no-repeat", {
|
|
7014
7011
|
repeat: ["", "x", "y", "space", "round"]
|
|
7015
|
-
}],
|
|
7012
|
+
}], V = () => ["auto", "cover", "contain", vh, hh, {
|
|
7016
7013
|
size: [$, F]
|
|
7017
|
-
}], ve = () => [Er,
|
|
7014
|
+
}], ve = () => [Er, jt, ut], q = () => [
|
|
7018
7015
|
// Deprecated since Tailwind CSS v4.0.0
|
|
7019
7016
|
"",
|
|
7020
7017
|
"none",
|
|
@@ -7022,7 +7019,7 @@ const Lp = (e, t) => {
|
|
|
7022
7019
|
l,
|
|
7023
7020
|
$,
|
|
7024
7021
|
F
|
|
7025
|
-
], ee = () => ["", K,
|
|
7022
|
+
], ee = () => ["", K, jt, 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 = () => [
|
|
7026
7023
|
// Deprecated since Tailwind CSS v4.0.0
|
|
7027
7024
|
"",
|
|
7028
7025
|
"none",
|
|
@@ -7153,7 +7150,7 @@ const Lp = (e, t) => {
|
|
|
7153
7150
|
* @see https://tailwindcss.com/docs/object-position
|
|
7154
7151
|
*/
|
|
7155
7152
|
"object-position": [{
|
|
7156
|
-
object:
|
|
7153
|
+
object: T()
|
|
7157
7154
|
}],
|
|
7158
7155
|
/**
|
|
7159
7156
|
* Overflow
|
|
@@ -7334,7 +7331,7 @@ const Lp = (e, t) => {
|
|
|
7334
7331
|
* @see https://tailwindcss.com/docs/grid-template-columns
|
|
7335
7332
|
*/
|
|
7336
7333
|
"grid-cols": [{
|
|
7337
|
-
"grid-cols":
|
|
7334
|
+
"grid-cols": j()
|
|
7338
7335
|
}],
|
|
7339
7336
|
/**
|
|
7340
7337
|
* Grid Column Start / End
|
|
@@ -7362,7 +7359,7 @@ const Lp = (e, t) => {
|
|
|
7362
7359
|
* @see https://tailwindcss.com/docs/grid-template-rows
|
|
7363
7360
|
*/
|
|
7364
7361
|
"grid-rows": [{
|
|
7365
|
-
"grid-rows":
|
|
7362
|
+
"grid-rows": j()
|
|
7366
7363
|
}],
|
|
7367
7364
|
/**
|
|
7368
7365
|
* Grid Row Start / End
|
|
@@ -7432,35 +7429,35 @@ const Lp = (e, t) => {
|
|
|
7432
7429
|
* @see https://tailwindcss.com/docs/justify-content
|
|
7433
7430
|
*/
|
|
7434
7431
|
"justify-content": [{
|
|
7435
|
-
justify: [...
|
|
7432
|
+
justify: [...N(), "normal"]
|
|
7436
7433
|
}],
|
|
7437
7434
|
/**
|
|
7438
7435
|
* Justify Items
|
|
7439
7436
|
* @see https://tailwindcss.com/docs/justify-items
|
|
7440
7437
|
*/
|
|
7441
7438
|
"justify-items": [{
|
|
7442
|
-
"justify-items": [...
|
|
7439
|
+
"justify-items": [...R(), "normal"]
|
|
7443
7440
|
}],
|
|
7444
7441
|
/**
|
|
7445
7442
|
* Justify Self
|
|
7446
7443
|
* @see https://tailwindcss.com/docs/justify-self
|
|
7447
7444
|
*/
|
|
7448
7445
|
"justify-self": [{
|
|
7449
|
-
"justify-self": ["auto", ...
|
|
7446
|
+
"justify-self": ["auto", ...R()]
|
|
7450
7447
|
}],
|
|
7451
7448
|
/**
|
|
7452
7449
|
* Align Content
|
|
7453
7450
|
* @see https://tailwindcss.com/docs/align-content
|
|
7454
7451
|
*/
|
|
7455
7452
|
"align-content": [{
|
|
7456
|
-
content: ["normal", ...
|
|
7453
|
+
content: ["normal", ...N()]
|
|
7457
7454
|
}],
|
|
7458
7455
|
/**
|
|
7459
7456
|
* Align Items
|
|
7460
7457
|
* @see https://tailwindcss.com/docs/align-items
|
|
7461
7458
|
*/
|
|
7462
7459
|
"align-items": [{
|
|
7463
|
-
items: [...
|
|
7460
|
+
items: [...R(), {
|
|
7464
7461
|
baseline: ["", "last"]
|
|
7465
7462
|
}]
|
|
7466
7463
|
}],
|
|
@@ -7469,7 +7466,7 @@ const Lp = (e, t) => {
|
|
|
7469
7466
|
* @see https://tailwindcss.com/docs/align-self
|
|
7470
7467
|
*/
|
|
7471
7468
|
"align-self": [{
|
|
7472
|
-
self: ["auto", ...
|
|
7469
|
+
self: ["auto", ...R(), {
|
|
7473
7470
|
baseline: ["", "last"]
|
|
7474
7471
|
}]
|
|
7475
7472
|
}],
|
|
@@ -7478,21 +7475,21 @@ const Lp = (e, t) => {
|
|
|
7478
7475
|
* @see https://tailwindcss.com/docs/place-content
|
|
7479
7476
|
*/
|
|
7480
7477
|
"place-content": [{
|
|
7481
|
-
"place-content":
|
|
7478
|
+
"place-content": N()
|
|
7482
7479
|
}],
|
|
7483
7480
|
/**
|
|
7484
7481
|
* Place Items
|
|
7485
7482
|
* @see https://tailwindcss.com/docs/place-items
|
|
7486
7483
|
*/
|
|
7487
7484
|
"place-items": [{
|
|
7488
|
-
"place-items": [...
|
|
7485
|
+
"place-items": [...R(), "baseline"]
|
|
7489
7486
|
}],
|
|
7490
7487
|
/**
|
|
7491
7488
|
* Place Self
|
|
7492
7489
|
* @see https://tailwindcss.com/docs/place-self
|
|
7493
7490
|
*/
|
|
7494
7491
|
"place-self": [{
|
|
7495
|
-
"place-self": ["auto", ...
|
|
7492
|
+
"place-self": ["auto", ...R()]
|
|
7496
7493
|
}],
|
|
7497
7494
|
// Spacing
|
|
7498
7495
|
/**
|
|
@@ -7563,63 +7560,63 @@ const Lp = (e, t) => {
|
|
|
7563
7560
|
* @see https://tailwindcss.com/docs/margin
|
|
7564
7561
|
*/
|
|
7565
7562
|
m: [{
|
|
7566
|
-
m:
|
|
7563
|
+
m: O()
|
|
7567
7564
|
}],
|
|
7568
7565
|
/**
|
|
7569
7566
|
* Margin X
|
|
7570
7567
|
* @see https://tailwindcss.com/docs/margin
|
|
7571
7568
|
*/
|
|
7572
7569
|
mx: [{
|
|
7573
|
-
mx:
|
|
7570
|
+
mx: O()
|
|
7574
7571
|
}],
|
|
7575
7572
|
/**
|
|
7576
7573
|
* Margin Y
|
|
7577
7574
|
* @see https://tailwindcss.com/docs/margin
|
|
7578
7575
|
*/
|
|
7579
7576
|
my: [{
|
|
7580
|
-
my:
|
|
7577
|
+
my: O()
|
|
7581
7578
|
}],
|
|
7582
7579
|
/**
|
|
7583
7580
|
* Margin Start
|
|
7584
7581
|
* @see https://tailwindcss.com/docs/margin
|
|
7585
7582
|
*/
|
|
7586
7583
|
ms: [{
|
|
7587
|
-
ms:
|
|
7584
|
+
ms: O()
|
|
7588
7585
|
}],
|
|
7589
7586
|
/**
|
|
7590
7587
|
* Margin End
|
|
7591
7588
|
* @see https://tailwindcss.com/docs/margin
|
|
7592
7589
|
*/
|
|
7593
7590
|
me: [{
|
|
7594
|
-
me:
|
|
7591
|
+
me: O()
|
|
7595
7592
|
}],
|
|
7596
7593
|
/**
|
|
7597
7594
|
* Margin Top
|
|
7598
7595
|
* @see https://tailwindcss.com/docs/margin
|
|
7599
7596
|
*/
|
|
7600
7597
|
mt: [{
|
|
7601
|
-
mt:
|
|
7598
|
+
mt: O()
|
|
7602
7599
|
}],
|
|
7603
7600
|
/**
|
|
7604
7601
|
* Margin Right
|
|
7605
7602
|
* @see https://tailwindcss.com/docs/margin
|
|
7606
7603
|
*/
|
|
7607
7604
|
mr: [{
|
|
7608
|
-
mr:
|
|
7605
|
+
mr: O()
|
|
7609
7606
|
}],
|
|
7610
7607
|
/**
|
|
7611
7608
|
* Margin Bottom
|
|
7612
7609
|
* @see https://tailwindcss.com/docs/margin
|
|
7613
7610
|
*/
|
|
7614
7611
|
mb: [{
|
|
7615
|
-
mb:
|
|
7612
|
+
mb: O()
|
|
7616
7613
|
}],
|
|
7617
7614
|
/**
|
|
7618
7615
|
* Margin Left
|
|
7619
7616
|
* @see https://tailwindcss.com/docs/margin
|
|
7620
7617
|
*/
|
|
7621
7618
|
ml: [{
|
|
7622
|
-
ml:
|
|
7619
|
+
ml: O()
|
|
7623
7620
|
}],
|
|
7624
7621
|
/**
|
|
7625
7622
|
* Space Between X
|
|
@@ -7653,14 +7650,14 @@ const Lp = (e, t) => {
|
|
|
7653
7650
|
* @see https://tailwindcss.com/docs/width#setting-both-width-and-height
|
|
7654
7651
|
*/
|
|
7655
7652
|
size: [{
|
|
7656
|
-
size:
|
|
7653
|
+
size: A()
|
|
7657
7654
|
}],
|
|
7658
7655
|
/**
|
|
7659
7656
|
* Width
|
|
7660
7657
|
* @see https://tailwindcss.com/docs/width
|
|
7661
7658
|
*/
|
|
7662
7659
|
w: [{
|
|
7663
|
-
w: [i, "screen", ...
|
|
7660
|
+
w: [i, "screen", ...A()]
|
|
7664
7661
|
}],
|
|
7665
7662
|
/**
|
|
7666
7663
|
* Min-Width
|
|
@@ -7672,7 +7669,7 @@ const Lp = (e, t) => {
|
|
|
7672
7669
|
"screen",
|
|
7673
7670
|
/** Deprecated. @see https://github.com/tailwindlabs/tailwindcss.com/issues/2027#issuecomment-2620152757 */
|
|
7674
7671
|
"none",
|
|
7675
|
-
...
|
|
7672
|
+
...A()
|
|
7676
7673
|
]
|
|
7677
7674
|
}],
|
|
7678
7675
|
/**
|
|
@@ -7690,7 +7687,7 @@ const Lp = (e, t) => {
|
|
|
7690
7687
|
{
|
|
7691
7688
|
screen: [s]
|
|
7692
7689
|
},
|
|
7693
|
-
...
|
|
7690
|
+
...A()
|
|
7694
7691
|
]
|
|
7695
7692
|
}],
|
|
7696
7693
|
/**
|
|
@@ -7698,21 +7695,21 @@ const Lp = (e, t) => {
|
|
|
7698
7695
|
* @see https://tailwindcss.com/docs/height
|
|
7699
7696
|
*/
|
|
7700
7697
|
h: [{
|
|
7701
|
-
h: ["screen", "lh", ...
|
|
7698
|
+
h: ["screen", "lh", ...A()]
|
|
7702
7699
|
}],
|
|
7703
7700
|
/**
|
|
7704
7701
|
* Min-Height
|
|
7705
7702
|
* @see https://tailwindcss.com/docs/min-height
|
|
7706
7703
|
*/
|
|
7707
7704
|
"min-h": [{
|
|
7708
|
-
"min-h": ["screen", "lh", "none", ...
|
|
7705
|
+
"min-h": ["screen", "lh", "none", ...A()]
|
|
7709
7706
|
}],
|
|
7710
7707
|
/**
|
|
7711
7708
|
* Max-Height
|
|
7712
7709
|
* @see https://tailwindcss.com/docs/max-height
|
|
7713
7710
|
*/
|
|
7714
7711
|
"max-h": [{
|
|
7715
|
-
"max-h": ["screen", "lh", ...
|
|
7712
|
+
"max-h": ["screen", "lh", ...A()]
|
|
7716
7713
|
}],
|
|
7717
7714
|
// ------------------
|
|
7718
7715
|
// --- Typography ---
|
|
@@ -7722,7 +7719,7 @@ const Lp = (e, t) => {
|
|
|
7722
7719
|
* @see https://tailwindcss.com/docs/font-size
|
|
7723
7720
|
*/
|
|
7724
7721
|
"font-size": [{
|
|
7725
|
-
text: ["base", n,
|
|
7722
|
+
text: ["base", n, jt, ut]
|
|
7726
7723
|
}],
|
|
7727
7724
|
/**
|
|
7728
7725
|
* Font Smoothing
|
|
@@ -7995,7 +7992,7 @@ const Lp = (e, t) => {
|
|
|
7995
7992
|
* @see https://tailwindcss.com/docs/background-size
|
|
7996
7993
|
*/
|
|
7997
7994
|
"bg-size": [{
|
|
7998
|
-
bg:
|
|
7995
|
+
bg: V()
|
|
7999
7996
|
}],
|
|
8000
7997
|
/**
|
|
8001
7998
|
* Background Image
|
|
@@ -8357,7 +8354,7 @@ const Lp = (e, t) => {
|
|
|
8357
8354
|
* @see https://tailwindcss.com/docs/outline-width
|
|
8358
8355
|
*/
|
|
8359
8356
|
"outline-w": [{
|
|
8360
|
-
outline: ["", K,
|
|
8357
|
+
outline: ["", K, jt, ut]
|
|
8361
8358
|
}],
|
|
8362
8359
|
/**
|
|
8363
8360
|
* Outline Color
|
|
@@ -8672,7 +8669,7 @@ const Lp = (e, t) => {
|
|
|
8672
8669
|
* @see https://tailwindcss.com/docs/mask-size
|
|
8673
8670
|
*/
|
|
8674
8671
|
"mask-size": [{
|
|
8675
|
-
mask:
|
|
8672
|
+
mask: V()
|
|
8676
8673
|
}],
|
|
8677
8674
|
/**
|
|
8678
8675
|
* Mask Type
|
|
@@ -8969,7 +8966,7 @@ const Lp = (e, t) => {
|
|
|
8969
8966
|
* @see https://tailwindcss.com/docs/perspective-origin
|
|
8970
8967
|
*/
|
|
8971
8968
|
"perspective-origin": [{
|
|
8972
|
-
"perspective-origin":
|
|
8969
|
+
"perspective-origin": T()
|
|
8973
8970
|
}],
|
|
8974
8971
|
/**
|
|
8975
8972
|
* Rotate
|
|
@@ -9065,7 +9062,7 @@ const Lp = (e, t) => {
|
|
|
9065
9062
|
* @see https://tailwindcss.com/docs/transform-origin
|
|
9066
9063
|
*/
|
|
9067
9064
|
"transform-origin": [{
|
|
9068
|
-
origin:
|
|
9065
|
+
origin: T()
|
|
9069
9066
|
}],
|
|
9070
9067
|
/**
|
|
9071
9068
|
* Transform Style
|
|
@@ -9382,7 +9379,7 @@ const Lp = (e, t) => {
|
|
|
9382
9379
|
* @see https://tailwindcss.com/docs/stroke-width
|
|
9383
9380
|
*/
|
|
9384
9381
|
"stroke-w": [{
|
|
9385
|
-
stroke: [K,
|
|
9382
|
+
stroke: [K, jt, ut, kr]
|
|
9386
9383
|
}],
|
|
9387
9384
|
/**
|
|
9388
9385
|
* Stroke
|
|
@@ -9576,7 +9573,7 @@ function Eh({
|
|
|
9576
9573
|
) }),
|
|
9577
9574
|
/* @__PURE__ */ I(Kn, { align: "start", className: "w-auto p-0", children: [
|
|
9578
9575
|
/* @__PURE__ */ u("div", { className: "p-3", children: /* @__PURE__ */ u(
|
|
9579
|
-
|
|
9576
|
+
jr,
|
|
9580
9577
|
{
|
|
9581
9578
|
mode: "range",
|
|
9582
9579
|
selected: l,
|
|
@@ -9626,60 +9623,60 @@ function Ea({
|
|
|
9626
9623
|
);
|
|
9627
9624
|
const E = (x) => {
|
|
9628
9625
|
if (x === 0) return "0 Bytes";
|
|
9629
|
-
const
|
|
9630
|
-
return `${parseFloat((x /
|
|
9626
|
+
const N = 1024, R = ["Bytes", "KB", "MB", "GB"], O = Math.floor(Math.log(x) / Math.log(N));
|
|
9627
|
+
return `${parseFloat((x / N ** O).toFixed(2))} ${R[O]}`;
|
|
9631
9628
|
}, C = async (x) => {
|
|
9632
|
-
const
|
|
9633
|
-
|
|
9634
|
-
const
|
|
9629
|
+
const N = new FormData();
|
|
9630
|
+
N.append("file", x);
|
|
9631
|
+
const R = await fetch(`${y}`, {
|
|
9635
9632
|
method: "POST",
|
|
9636
|
-
body:
|
|
9633
|
+
body: N
|
|
9637
9634
|
});
|
|
9638
|
-
if (!
|
|
9635
|
+
if (!R.ok)
|
|
9639
9636
|
throw Cn.error("Upload failed"), new Error("Upload failed");
|
|
9640
|
-
return await
|
|
9641
|
-
}, k = async (x,
|
|
9642
|
-
if (!
|
|
9643
|
-
if (x.maxSize &&
|
|
9637
|
+
return await R.json();
|
|
9638
|
+
}, k = async (x, N) => {
|
|
9639
|
+
if (!N) return;
|
|
9640
|
+
if (x.maxSize && N.size > x.maxSize)
|
|
9644
9641
|
throw new Error(
|
|
9645
9642
|
`File size must not exceed ${E(x.maxSize)}`
|
|
9646
9643
|
);
|
|
9647
|
-
const
|
|
9648
|
-
a(x.name,
|
|
9649
|
-
}, v = async (x,
|
|
9650
|
-
const
|
|
9651
|
-
if (x.maxFiles &&
|
|
9644
|
+
const R = await C(N), O = { ...t, [x.name]: R };
|
|
9645
|
+
a(x.name, R), s(O);
|
|
9646
|
+
}, v = async (x, N) => {
|
|
9647
|
+
const R = t[x.name] || [];
|
|
9648
|
+
if (x.maxFiles && R.length + N.length > x.maxFiles)
|
|
9652
9649
|
throw new Error(`Maximum ${x.maxFiles} files allowed`);
|
|
9653
|
-
|
|
9650
|
+
N.forEach((S) => {
|
|
9654
9651
|
if (x.maxSize && S.size > x.maxSize)
|
|
9655
9652
|
throw new Error(
|
|
9656
9653
|
`Each file must not exceed ${E(x.maxSize)}`
|
|
9657
9654
|
);
|
|
9658
9655
|
});
|
|
9659
|
-
const
|
|
9660
|
-
|
|
9656
|
+
const O = await Promise.all(
|
|
9657
|
+
N.map((S) => C(S))
|
|
9661
9658
|
// Updated call
|
|
9662
|
-
),
|
|
9663
|
-
a(x.name,
|
|
9664
|
-
},
|
|
9659
|
+
), A = [...R, ...O];
|
|
9660
|
+
a(x.name, A), s({ ...t, [x.name]: A });
|
|
9661
|
+
}, T = async (x, N) => {
|
|
9665
9662
|
if (l) return;
|
|
9666
|
-
const
|
|
9663
|
+
const R = Array.from(N);
|
|
9667
9664
|
try {
|
|
9668
|
-
e.type === "multifile" ? await v(e,
|
|
9669
|
-
} catch (
|
|
9670
|
-
Cn.error(`Upload failed: ${
|
|
9665
|
+
e.type === "multifile" ? await v(e, R) : await k(e, R[0]), o.current?.[x] && (o.current[x].value = "");
|
|
9666
|
+
} catch (O) {
|
|
9667
|
+
Cn.error(`Upload failed: ${O.message}`);
|
|
9671
9668
|
}
|
|
9672
|
-
}, D = async (x,
|
|
9669
|
+
}, D = async (x, N) => {
|
|
9673
9670
|
if (l) return;
|
|
9674
|
-
let
|
|
9675
|
-
e.type === "file" ?
|
|
9671
|
+
let R;
|
|
9672
|
+
e.type === "file" ? R = "" : R = (t[x] || []).filter((A) => A !== N), a(x, R), s({ ...t, [x]: R }), o.current?.[x] && (o.current[x].value = "");
|
|
9676
9673
|
}, _ = (x) => {
|
|
9677
9674
|
x.preventDefault(), l || h(!0);
|
|
9678
9675
|
}, P = (x) => {
|
|
9679
9676
|
x.preventDefault(), l || h(!1);
|
|
9680
9677
|
}, z = (x) => {
|
|
9681
|
-
x.preventDefault(), h(!1), !l && x.dataTransfer.files && x.dataTransfer.files.length > 0 &&
|
|
9682
|
-
},
|
|
9678
|
+
x.preventDefault(), h(!1), !l && x.dataTransfer.files && x.dataTransfer.files.length > 0 && T(e.name, x.dataTransfer.files);
|
|
9679
|
+
}, j = e.accept ? e.accept.split(",").map((x) => x.split("/")[1] || x.split(".")[1] || x).join(", ").toUpperCase() : "PNG, JPG, PDF", H = e.maxSize ? `, up to ${E(e.maxSize)}` : "", G = `
|
|
9683
9680
|
w-full flex flex-col items-center justify-center p-6 border-2 border-dashed rounded-lg transition-all duration-200
|
|
9684
9681
|
// Ensure focus styling is handled correctly for the button element
|
|
9685
9682
|
focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-opacity-50
|
|
@@ -9719,7 +9716,7 @@ function Ea({
|
|
|
9719
9716
|
/* @__PURE__ */ u("span", { className: "font-light", children: " or drag and drop" })
|
|
9720
9717
|
] }),
|
|
9721
9718
|
/* @__PURE__ */ I("p", { className: "text-xs mt-1 text-gray-500", children: [
|
|
9722
|
-
|
|
9719
|
+
j,
|
|
9723
9720
|
H,
|
|
9724
9721
|
d && e.maxFiles && `, Max ${e.maxFiles} files`
|
|
9725
9722
|
] })
|
|
@@ -9737,22 +9734,22 @@ function Ea({
|
|
|
9737
9734
|
accept: e.accept,
|
|
9738
9735
|
multiple: d,
|
|
9739
9736
|
className: "sr-only",
|
|
9740
|
-
onChange: (x) =>
|
|
9737
|
+
onChange: (x) => T(e.name, x.target.files),
|
|
9741
9738
|
disabled: l
|
|
9742
9739
|
}
|
|
9743
9740
|
),
|
|
9744
|
-
p.length > 0 && /* @__PURE__ */ u("div", { className: "space-y-2 pt-2 border-t border-gray-200", children: p.map((x,
|
|
9745
|
-
const
|
|
9741
|
+
p.length > 0 && /* @__PURE__ */ u("div", { className: "space-y-2 pt-2 border-t border-gray-200", children: p.map((x, N) => {
|
|
9742
|
+
const R = x.original_name || x.name || "File", O = x.size || null;
|
|
9746
9743
|
return /* @__PURE__ */ I(
|
|
9747
9744
|
"div",
|
|
9748
9745
|
{
|
|
9749
9746
|
className: "flex items-center justify-between p-2 bg-gray-50 rounded",
|
|
9750
9747
|
children: [
|
|
9751
9748
|
/* @__PURE__ */ I("div", { className: "flex items-center space-x-2 min-w-0", children: [
|
|
9752
|
-
/* @__PURE__ */ u("span", { className: "text-sm truncate", children:
|
|
9753
|
-
|
|
9749
|
+
/* @__PURE__ */ u("span", { className: "text-sm truncate", children: R }),
|
|
9750
|
+
O && /* @__PURE__ */ I("span", { className: "text-xs text-gray-500 flex-shrink-0", children: [
|
|
9754
9751
|
"(",
|
|
9755
|
-
E(
|
|
9752
|
+
E(O),
|
|
9756
9753
|
")"
|
|
9757
9754
|
] })
|
|
9758
9755
|
] }),
|
|
@@ -9768,17 +9765,17 @@ function Ea({
|
|
|
9768
9765
|
)
|
|
9769
9766
|
]
|
|
9770
9767
|
},
|
|
9771
|
-
x.url || x.original_name ||
|
|
9768
|
+
x.url || x.original_name || N
|
|
9772
9769
|
);
|
|
9773
9770
|
}) }),
|
|
9774
|
-
Object.entries(m).map(([x,
|
|
9771
|
+
Object.entries(m).map(([x, N]) => N.status === "uploading" ? /* @__PURE__ */ I("div", { className: "relative pt-1", children: [
|
|
9775
9772
|
/* @__PURE__ */ I("div", { className: "flex items-center justify-between", children: [
|
|
9776
9773
|
/* @__PURE__ */ I("span", { className: "text-xs font-semibold inline-block text-blue-600", children: [
|
|
9777
9774
|
"Uploading ",
|
|
9778
9775
|
x
|
|
9779
9776
|
] }),
|
|
9780
9777
|
/* @__PURE__ */ I("span", { className: "text-xs font-semibold inline-block text-blue-600", children: [
|
|
9781
|
-
|
|
9778
|
+
N.progress,
|
|
9782
9779
|
"%"
|
|
9783
9780
|
] })
|
|
9784
9781
|
] }),
|
|
@@ -9786,7 +9783,7 @@ function Ea({
|
|
|
9786
9783
|
"div",
|
|
9787
9784
|
{
|
|
9788
9785
|
className: "shadow-none flex flex-col text-center whitespace-nowrap text-white justify-center bg-blue-500",
|
|
9789
|
-
style: { width: `${
|
|
9786
|
+
style: { width: `${N.progress}%` }
|
|
9790
9787
|
}
|
|
9791
9788
|
) })
|
|
9792
9789
|
] }, x) : null)
|
|
@@ -9853,12 +9850,12 @@ function Ah({ field: e, formValues: t, handleChange: n, handleBlur: r, error: o
|
|
|
9853
9850
|
n(e.name, null);
|
|
9854
9851
|
return;
|
|
9855
9852
|
}
|
|
9856
|
-
const
|
|
9857
|
-
c ? (
|
|
9858
|
-
}, p = (v,
|
|
9853
|
+
const T = new Date(v);
|
|
9854
|
+
c ? (T.setHours(c.getHours()), T.setMinutes(c.getMinutes())) : (T.setHours(12), T.setMinutes(0)), n(e.name, T);
|
|
9855
|
+
}, p = (v, T, D) => {
|
|
9859
9856
|
const _ = c ? new Date(c) : /* @__PURE__ */ new Date();
|
|
9860
9857
|
let P = parseInt(v);
|
|
9861
|
-
D === "PM" && P !== 12 && (P += 12), D === "AM" && P === 12 && (P = 0), _.setHours(P), _.setMinutes(parseInt(
|
|
9858
|
+
D === "PM" && P !== 12 && (P += 12), D === "AM" && P === 12 && (P = 0), _.setHours(P), _.setMinutes(parseInt(T)), n(e.name, _);
|
|
9862
9859
|
}, w = () => {
|
|
9863
9860
|
let v = parseInt(l);
|
|
9864
9861
|
v = v % 12 + 1, p(v.toString(), d, m);
|
|
@@ -9928,7 +9925,7 @@ function Ah({ field: e, formValues: t, handleChange: n, handleBlur: r, error: o
|
|
|
9928
9925
|
className: "z-50 w-auto p-0 bg-white rounded-xl shadow-xl border border-slate-200",
|
|
9929
9926
|
children: [
|
|
9930
9927
|
/* @__PURE__ */ u("div", { className: "p-3", children: /* @__PURE__ */ u(
|
|
9931
|
-
|
|
9928
|
+
jr,
|
|
9932
9929
|
{
|
|
9933
9930
|
mode: "single",
|
|
9934
9931
|
selected: c,
|
|
@@ -10173,11 +10170,11 @@ var Hh = [
|
|
|
10173
10170
|
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ u(c, { ...i, ref: a });
|
|
10174
10171
|
});
|
|
10175
10172
|
return r.displayName = `Primitive.${t}`, { ...e, [t]: r };
|
|
10176
|
-
}, {}), Nr = "rovingFocusGroup.onEntryFocus",
|
|
10173
|
+
}, {}), Nr = "rovingFocusGroup.onEntryFocus", Vh = { bubbles: !1, cancelable: !0 }, tn = "RovingFocusGroup", [Vr, Ri, jh] = Oa(tn), [Gh, Oi] = ht(
|
|
10177
10174
|
tn,
|
|
10178
|
-
[
|
|
10175
|
+
[jh]
|
|
10179
10176
|
), [Yh, qh] = Gh(tn), _i = f.forwardRef(
|
|
10180
|
-
(e, t) => /* @__PURE__ */ u(
|
|
10177
|
+
(e, t) => /* @__PURE__ */ u(Vr.Provider, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ u(Vr.Slot, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ u(Kh, { ...e, ref: t }) }) })
|
|
10181
10178
|
);
|
|
10182
10179
|
_i.displayName = tn;
|
|
10183
10180
|
var Kh = f.forwardRef((e, t) => {
|
|
@@ -10197,7 +10194,7 @@ var Kh = f.forwardRef((e, t) => {
|
|
|
10197
10194
|
defaultProp: i ?? null,
|
|
10198
10195
|
onChange: c,
|
|
10199
10196
|
caller: tn
|
|
10200
|
-
}), [E, C] = f.useState(!1), k = et(l), v = Ri(n),
|
|
10197
|
+
}), [E, C] = f.useState(!1), k = et(l), v = Ri(n), T = f.useRef(!1), [D, _] = f.useState(0);
|
|
10201
10198
|
return f.useEffect(() => {
|
|
10202
10199
|
const P = g.current;
|
|
10203
10200
|
if (P)
|
|
@@ -10232,20 +10229,20 @@ var Kh = f.forwardRef((e, t) => {
|
|
|
10232
10229
|
ref: p,
|
|
10233
10230
|
style: { outline: "none", ...e.style },
|
|
10234
10231
|
onMouseDown: Z(e.onMouseDown, () => {
|
|
10235
|
-
|
|
10232
|
+
T.current = !0;
|
|
10236
10233
|
}),
|
|
10237
10234
|
onFocus: Z(e.onFocus, (P) => {
|
|
10238
|
-
const z = !
|
|
10235
|
+
const z = !T.current;
|
|
10239
10236
|
if (P.target === P.currentTarget && z && !E) {
|
|
10240
|
-
const
|
|
10241
|
-
if (P.currentTarget.dispatchEvent(
|
|
10242
|
-
const H = v().filter((
|
|
10237
|
+
const j = new CustomEvent(Nr, Vh);
|
|
10238
|
+
if (P.currentTarget.dispatchEvent(j), !j.defaultPrevented) {
|
|
10239
|
+
const H = v().filter((O) => O.focusable), G = H.find((O) => O.active), x = H.find((O) => O.id === h), R = [G, x, ...H].filter(
|
|
10243
10240
|
Boolean
|
|
10244
|
-
).map((
|
|
10245
|
-
Di(
|
|
10241
|
+
).map((O) => O.ref.current);
|
|
10242
|
+
Di(R, d);
|
|
10246
10243
|
}
|
|
10247
10244
|
}
|
|
10248
|
-
|
|
10245
|
+
T.current = !1;
|
|
10249
10246
|
}),
|
|
10250
10247
|
onBlur: Z(e.onBlur, () => C(!1))
|
|
10251
10248
|
}
|
|
@@ -10266,7 +10263,7 @@ var Kh = f.forwardRef((e, t) => {
|
|
|
10266
10263
|
if (r)
|
|
10267
10264
|
return p(), () => w();
|
|
10268
10265
|
}, [r, p, w]), /* @__PURE__ */ u(
|
|
10269
|
-
|
|
10266
|
+
Vr.ItemSlot,
|
|
10270
10267
|
{
|
|
10271
10268
|
scope: n,
|
|
10272
10269
|
id: l,
|
|
@@ -10389,7 +10386,7 @@ Fi.displayName = fo;
|
|
|
10389
10386
|
var $i = "RadioIndicator", Wi = f.forwardRef(
|
|
10390
10387
|
(e, t) => {
|
|
10391
10388
|
const { __scopeRadio: n, forceMount: r, ...o } = e, a = og($i, n);
|
|
10392
|
-
return /* @__PURE__ */ u(
|
|
10389
|
+
return /* @__PURE__ */ u(Vn, { present: r || a.checked, children: /* @__PURE__ */ u(
|
|
10393
10390
|
Xn.span,
|
|
10394
10391
|
{
|
|
10395
10392
|
"data-state": Bi(a.checked),
|
|
@@ -10449,7 +10446,7 @@ function Bi(e) {
|
|
|
10449
10446
|
var sg = ["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"], Qn = "RadioGroup", [ig] = ht(Qn, [
|
|
10450
10447
|
Oi,
|
|
10451
10448
|
Li
|
|
10452
|
-
]), Hi = Oi(), Ui = Li(), [cg, lg] = ig(Qn),
|
|
10449
|
+
]), Hi = Oi(), Ui = Li(), [cg, lg] = ig(Qn), Vi = f.forwardRef(
|
|
10453
10450
|
(e, t) => {
|
|
10454
10451
|
const {
|
|
10455
10452
|
__scopeRadioGroup: n,
|
|
@@ -10504,10 +10501,10 @@ var sg = ["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"], Qn = "RadioGroup",
|
|
|
10504
10501
|
);
|
|
10505
10502
|
}
|
|
10506
10503
|
);
|
|
10507
|
-
|
|
10508
|
-
var
|
|
10504
|
+
Vi.displayName = Qn;
|
|
10505
|
+
var ji = "RadioGroupItem", Gi = f.forwardRef(
|
|
10509
10506
|
(e, t) => {
|
|
10510
|
-
const { __scopeRadioGroup: n, disabled: r, ...o } = e, a = lg(
|
|
10507
|
+
const { __scopeRadioGroup: n, disabled: r, ...o } = e, a = lg(ji, n), s = a.disabled || r, i = Hi(n), c = Ui(n), l = f.useRef(null), d = ie(t, l), m = a.value === o.value, g = f.useRef(!1);
|
|
10511
10508
|
return f.useEffect(() => {
|
|
10512
10509
|
const p = (h) => {
|
|
10513
10510
|
sg.includes(h.key) && (g.current = !0);
|
|
@@ -10545,7 +10542,7 @@ var Vi = "RadioGroupItem", Gi = f.forwardRef(
|
|
|
10545
10542
|
);
|
|
10546
10543
|
}
|
|
10547
10544
|
);
|
|
10548
|
-
Gi.displayName =
|
|
10545
|
+
Gi.displayName = ji;
|
|
10549
10546
|
var ug = "RadioGroupIndicator", Yi = f.forwardRef(
|
|
10550
10547
|
(e, t) => {
|
|
10551
10548
|
const { __scopeRadioGroup: n, ...r } = e, o = Ui(n);
|
|
@@ -10553,7 +10550,7 @@ var ug = "RadioGroupIndicator", Yi = f.forwardRef(
|
|
|
10553
10550
|
}
|
|
10554
10551
|
);
|
|
10555
10552
|
Yi.displayName = ug;
|
|
10556
|
-
var dg =
|
|
10553
|
+
var dg = Vi, fg = Gi, mg = Yi;
|
|
10557
10554
|
function pg({
|
|
10558
10555
|
className: e,
|
|
10559
10556
|
...t
|
|
@@ -10620,17 +10617,7 @@ function hg({
|
|
|
10620
10617
|
"aria-labelledby": `${e.name}-legend`,
|
|
10621
10618
|
"aria-describedby": o ? C : void 0,
|
|
10622
10619
|
children: [
|
|
10623
|
-
/* @__PURE__ */
|
|
10624
|
-
"legend",
|
|
10625
|
-
{
|
|
10626
|
-
id: `${e.name}-legend`,
|
|
10627
|
-
className: "text-sm font-medium leading-none mb-4",
|
|
10628
|
-
children: [
|
|
10629
|
-
e.label,
|
|
10630
|
-
e.required && /* @__PURE__ */ u("span", { className: "text-destructive ml-1", children: "*" })
|
|
10631
|
-
]
|
|
10632
|
-
}
|
|
10633
|
-
),
|
|
10620
|
+
/* @__PURE__ */ u("legend", { className: "sr-only", children: e.label }),
|
|
10634
10621
|
/* @__PURE__ */ u(
|
|
10635
10622
|
pg,
|
|
10636
10623
|
{
|
|
@@ -10642,7 +10629,7 @@ function hg({
|
|
|
10642
10629
|
disabled: w,
|
|
10643
10630
|
className: k,
|
|
10644
10631
|
children: h.map((v) => {
|
|
10645
|
-
const
|
|
10632
|
+
const T = typeof v == "object" ? v.value : v, D = typeof v == "object" ? v.label : v, _ = typeof v == "object" ? v.description : null, P = `${e.name}-${T}`, z = p === T;
|
|
10646
10633
|
return E ? /* @__PURE__ */ I(
|
|
10647
10634
|
"label",
|
|
10648
10635
|
{
|
|
@@ -10658,7 +10645,7 @@ function hg({
|
|
|
10658
10645
|
/* @__PURE__ */ u(
|
|
10659
10646
|
Aa,
|
|
10660
10647
|
{
|
|
10661
|
-
value:
|
|
10648
|
+
value: T,
|
|
10662
10649
|
id: P,
|
|
10663
10650
|
disabled: w,
|
|
10664
10651
|
className: "sr-only"
|
|
@@ -10667,12 +10654,12 @@ function hg({
|
|
|
10667
10654
|
D
|
|
10668
10655
|
]
|
|
10669
10656
|
},
|
|
10670
|
-
|
|
10657
|
+
T
|
|
10671
10658
|
) : /* @__PURE__ */ I("div", { className: "relative flex items-start group", children: [
|
|
10672
10659
|
/* @__PURE__ */ u("div", { className: "flex h-6 items-center", children: /* @__PURE__ */ u(
|
|
10673
10660
|
Aa,
|
|
10674
10661
|
{
|
|
10675
|
-
value:
|
|
10662
|
+
value: T,
|
|
10676
10663
|
id: P,
|
|
10677
10664
|
disabled: w,
|
|
10678
10665
|
className: `
|
|
@@ -10700,7 +10687,7 @@ function hg({
|
|
|
10700
10687
|
}
|
|
10701
10688
|
)
|
|
10702
10689
|
] })
|
|
10703
|
-
] },
|
|
10690
|
+
] }, T);
|
|
10704
10691
|
})
|
|
10705
10692
|
}
|
|
10706
10693
|
)
|
|
@@ -10835,7 +10822,7 @@ function bg({
|
|
|
10835
10822
|
className: "z-50 w-auto p-0 bg-popover border border-border rounded-lg shadow-xl",
|
|
10836
10823
|
children: [
|
|
10837
10824
|
/* @__PURE__ */ u("div", { className: "p-3", children: /* @__PURE__ */ u(
|
|
10838
|
-
|
|
10825
|
+
jr,
|
|
10839
10826
|
{
|
|
10840
10827
|
mode: "single",
|
|
10841
10828
|
selected: d,
|
|
@@ -10970,8 +10957,8 @@ function vg({ field: e, formValues: t, handleChange: n, handleBlur: r, error: o
|
|
|
10970
10957
|
type: "text",
|
|
10971
10958
|
value: i,
|
|
10972
10959
|
onChange: (v) => {
|
|
10973
|
-
const
|
|
10974
|
-
(
|
|
10960
|
+
const T = v.target.value.replace(/\D/g, "");
|
|
10961
|
+
(T === "" || parseInt(T) >= 1 && parseInt(T) <= 12) && c(T.padStart(2, "0"));
|
|
10975
10962
|
},
|
|
10976
10963
|
className: "w-14 text-center text-2xl font-semibold border-0 focus:outline-none focus:ring-2 focus:ring-blue-500 rounded py-2",
|
|
10977
10964
|
maxLength: "2"
|
|
@@ -11028,8 +11015,8 @@ function vg({ field: e, formValues: t, handleChange: n, handleBlur: r, error: o
|
|
|
11028
11015
|
type: "text",
|
|
11029
11016
|
value: l,
|
|
11030
11017
|
onChange: (v) => {
|
|
11031
|
-
const
|
|
11032
|
-
(
|
|
11018
|
+
const T = v.target.value.replace(/\D/g, "");
|
|
11019
|
+
(T === "" || parseInt(T) >= 0 && parseInt(T) <= 59) && d(T.padStart(2, "0"));
|
|
11033
11020
|
},
|
|
11034
11021
|
className: "w-14 text-center text-2xl font-semibold border-0 focus:outline-none focus:ring-2 focus:ring-blue-500 rounded py-2",
|
|
11035
11022
|
maxLength: "2"
|
|
@@ -11162,7 +11149,17 @@ function Cg({ field: e }) {
|
|
|
11162
11149
|
return /* @__PURE__ */ u(Sg, { message: o });
|
|
11163
11150
|
}
|
|
11164
11151
|
}
|
|
11165
|
-
|
|
11152
|
+
function Eg(e) {
|
|
11153
|
+
if (e instanceof Date)
|
|
11154
|
+
return e;
|
|
11155
|
+
if (typeof e == "string" && e) {
|
|
11156
|
+
const t = new Date(e);
|
|
11157
|
+
if (!isNaN(t.getTime()))
|
|
11158
|
+
return t;
|
|
11159
|
+
}
|
|
11160
|
+
return null;
|
|
11161
|
+
}
|
|
11162
|
+
const $g = ({
|
|
11166
11163
|
apiClient: e,
|
|
11167
11164
|
api_URL: t,
|
|
11168
11165
|
footerMode: n = "normal",
|
|
@@ -11200,107 +11197,108 @@ const Fg = ({
|
|
|
11200
11197
|
linebreak: Bh
|
|
11201
11198
|
}),
|
|
11202
11199
|
[]
|
|
11203
|
-
),
|
|
11200
|
+
), T = async (x, N = null) => {
|
|
11204
11201
|
if (!e) {
|
|
11205
|
-
const
|
|
11206
|
-
l && console.error(
|
|
11202
|
+
const R = `apiClient prop is required when using fields with optionsUrl. Field "${x.name}" requires optionsUrl but no apiClient was provided.`;
|
|
11203
|
+
l && console.error(R), Cn.error(R);
|
|
11207
11204
|
return;
|
|
11208
11205
|
}
|
|
11209
11206
|
try {
|
|
11210
|
-
const
|
|
11211
|
-
let
|
|
11212
|
-
x.type === "select" ?
|
|
11207
|
+
const R = await e(`/${x.optionsUrl}`);
|
|
11208
|
+
let O = [];
|
|
11209
|
+
x.type === "select" ? O = [
|
|
11213
11210
|
{ value: "", label: `Select ${x.label.toLowerCase()}` },
|
|
11214
|
-
...
|
|
11215
|
-
] :
|
|
11216
|
-
...
|
|
11217
|
-
value:
|
|
11218
|
-
label:
|
|
11211
|
+
...R.data
|
|
11212
|
+
] : O = [
|
|
11213
|
+
...R.data.map((A) => ({
|
|
11214
|
+
value: A.value,
|
|
11215
|
+
label: A.label
|
|
11219
11216
|
}))
|
|
11220
|
-
], r.fields.forEach((
|
|
11221
|
-
|
|
11217
|
+
], r.fields.forEach((A) => {
|
|
11218
|
+
A.name === x.name && (A.options = O);
|
|
11222
11219
|
});
|
|
11223
|
-
} catch (
|
|
11224
|
-
l && console.error(`Failed to load options for ${x.name}:`,
|
|
11220
|
+
} catch (R) {
|
|
11221
|
+
l && console.error(`Failed to load options for ${x.name}:`, R);
|
|
11225
11222
|
} finally {
|
|
11226
11223
|
}
|
|
11227
11224
|
};
|
|
11228
11225
|
Je(() => {
|
|
11229
11226
|
if (r?.fields && r.fields.length > 0) {
|
|
11230
|
-
if (!r.fields.some((
|
|
11231
|
-
r.fields.forEach((
|
|
11232
|
-
|
|
11227
|
+
if (!r.fields.some((R) => R.value)) return;
|
|
11228
|
+
r.fields.forEach((R) => {
|
|
11229
|
+
R.optionsUrl && T(R);
|
|
11233
11230
|
});
|
|
11234
|
-
const
|
|
11235
|
-
r.fields.forEach((
|
|
11236
|
-
if (!
|
|
11237
|
-
const
|
|
11238
|
-
A
|
|
11239
|
-
|
|
11231
|
+
const N = {};
|
|
11232
|
+
r.fields.forEach((R) => {
|
|
11233
|
+
if (!R.name) return;
|
|
11234
|
+
const O = R.type === "multiselect" || R.type === "searchselect" || R.type === "checkbox" && R.options && R.options.length > 0;
|
|
11235
|
+
let A = i[R.name] ?? R.value ?? (O ? [] : "");
|
|
11236
|
+
["date", "datetime", "datepicker"].includes(R.type?.toLowerCase()) && A && (console.log(`[BEFORE dateTimeParser] Field: ${R.name}, Type: ${R.type}, Value:`, A, `Type: ${typeof A}`), A = Eg(A) || A, console.log(`[AFTER dateTimeParser] Field: ${R.name}, Parsed Value:`, A, `Type: ${typeof A}`, `Is Date: ${A instanceof Date}`)), N[R.name] = A;
|
|
11237
|
+
}), m(N);
|
|
11240
11238
|
}
|
|
11241
11239
|
}, [r]);
|
|
11242
|
-
const D = (x,
|
|
11243
|
-
const
|
|
11244
|
-
if (x.required &&
|
|
11240
|
+
const D = (x, N, R) => {
|
|
11241
|
+
const O = typeof N == "object" && N !== null && !Array.isArray(N) && !(N instanceof Date), A = N == null || typeof N == "string" && N.trim() === "" || Array.isArray(N) && N.length === 0 || x.type === "checkbox" && N === !1 || O && Object.keys(N).length === 0;
|
|
11242
|
+
if (x.required && A)
|
|
11245
11243
|
return l && console.warn(`VALIDATION FAILED (REQUIRED): ${x.name} is empty.`), `${x.label} is required`;
|
|
11246
|
-
if (
|
|
11244
|
+
if (A && !x.required)
|
|
11247
11245
|
return null;
|
|
11248
11246
|
if (x.validate) {
|
|
11249
|
-
const S = x.validate(
|
|
11247
|
+
const S = x.validate(N, R);
|
|
11250
11248
|
if (S) return S;
|
|
11251
11249
|
}
|
|
11252
|
-
if (x.type === "email" &&
|
|
11250
|
+
if (x.type === "email" && N && !/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(N))
|
|
11253
11251
|
return "Please enter a valid email address";
|
|
11254
11252
|
if (x.type === "number") {
|
|
11255
|
-
if (x.min !== void 0 &&
|
|
11253
|
+
if (x.min !== void 0 && N < x.min)
|
|
11256
11254
|
return `${x.label} must be at least ${x.min}`;
|
|
11257
|
-
if (x.max !== void 0 &&
|
|
11255
|
+
if (x.max !== void 0 && N > x.max)
|
|
11258
11256
|
return `${x.label} must be no more than ${x.max}`;
|
|
11259
11257
|
}
|
|
11260
|
-
return x.type === "date" &&
|
|
11261
|
-
}, _ = (x,
|
|
11262
|
-
const
|
|
11263
|
-
if (!
|
|
11264
|
-
const
|
|
11265
|
-
|
|
11266
|
-
(
|
|
11267
|
-
) :
|
|
11258
|
+
return x.type === "date" && N && !ir(N).isValid() ? `${x.label} must be a valid date` : x.maxLength && N && N.length > x.maxLength ? `${x.label} must not exceed ${x.maxLength} characters` : null;
|
|
11259
|
+
}, _ = (x, N) => {
|
|
11260
|
+
const R = r.fields.find((A) => A.name === x);
|
|
11261
|
+
if (!R) return;
|
|
11262
|
+
const O = { ...d };
|
|
11263
|
+
R.type === "multiselect" || R.type === "searchselect" ? Array.isArray(N) ? O[x] = N : N && N.target && N.target.selectedOptions ? O[x] = Array.from(N.target.selectedOptions).map(
|
|
11264
|
+
(A) => A.value
|
|
11265
|
+
) : O[x] = N : R.type === "dateRange" ? O[x] = [
|
|
11268
11266
|
{
|
|
11269
|
-
startDate:
|
|
11270
|
-
endDate:
|
|
11267
|
+
startDate: N.from,
|
|
11268
|
+
endDate: N.to || N.from,
|
|
11271
11269
|
key: "selection"
|
|
11272
11270
|
}
|
|
11273
|
-
] :
|
|
11274
|
-
if (
|
|
11275
|
-
const S =
|
|
11276
|
-
|
|
11271
|
+
] : R.type === "dayTimePicker" ? O[x] = N ? ir(N).format("YYYY-MM-DD HH:mm:ss") : "" : R.type === "number" ? O[x] = N === "" ? "" : Number(N) : O[x] = N, R.type === "select" && r.fields.forEach((A) => {
|
|
11272
|
+
if (A.showIf && !A.showIf(O)) {
|
|
11273
|
+
const S = A.type === "multiselect" || A.type === "searchselect" || A.type === "checkbox" && A.options && A.options.length > 0;
|
|
11274
|
+
O[A.name] = S ? [] : "";
|
|
11277
11275
|
}
|
|
11278
|
-
}), r.fields.forEach((
|
|
11279
|
-
if (typeof
|
|
11280
|
-
const S =
|
|
11281
|
-
|
|
11276
|
+
}), r.fields.forEach((A) => {
|
|
11277
|
+
if (typeof A.disabled == "function" && A.disabled(O)) {
|
|
11278
|
+
const S = A.type === "multiselect" || A.type === "searchselect" || A.type === "checkbox" && A.options && A.options.length > 0;
|
|
11279
|
+
O[A.name] = S ? [] : "";
|
|
11282
11280
|
}
|
|
11283
|
-
}), m(
|
|
11281
|
+
}), m(O);
|
|
11284
11282
|
}, P = (x) => {
|
|
11285
11283
|
h({ ...w, [x]: !0 });
|
|
11286
11284
|
}, z = (x) => {
|
|
11287
11285
|
x.preventDefault();
|
|
11288
|
-
const
|
|
11289
|
-
r.fields.forEach((
|
|
11290
|
-
|
|
11291
|
-
}), h(
|
|
11292
|
-
const
|
|
11293
|
-
if (r.fields.forEach((
|
|
11294
|
-
if (
|
|
11295
|
-
const
|
|
11296
|
-
|
|
11286
|
+
const N = {};
|
|
11287
|
+
r.fields.forEach((O) => {
|
|
11288
|
+
O.name && (N[O.name] = !0);
|
|
11289
|
+
}), h(N);
|
|
11290
|
+
const R = {};
|
|
11291
|
+
if (r.fields.forEach((O) => {
|
|
11292
|
+
if (O.name && (!O.showIf || O.showIf(d))) {
|
|
11293
|
+
const A = D(O, d[O.name], d);
|
|
11294
|
+
A && (R[O.name] = A);
|
|
11297
11295
|
}
|
|
11298
|
-
}), p(
|
|
11299
|
-
const
|
|
11296
|
+
}), p(R), Object.keys(R).length === 0) {
|
|
11297
|
+
const O = (S, W) => {
|
|
11300
11298
|
if (S === "" || S === null || S === void 0) return null;
|
|
11301
11299
|
const Y = W?.toLowerCase();
|
|
11302
11300
|
if (Array.isArray(S))
|
|
11303
|
-
return Y === "number" || Y === "integer" ? S.map((
|
|
11301
|
+
return Y === "number" || Y === "integer" ? S.map((V) => V === "" ? null : Number(V)) : S;
|
|
11304
11302
|
switch (Y) {
|
|
11305
11303
|
case "number":
|
|
11306
11304
|
case "integer":
|
|
@@ -11311,29 +11309,29 @@ const Fg = ({
|
|
|
11311
11309
|
return String(S).toLowerCase() === "true" || S === !0;
|
|
11312
11310
|
case "date":
|
|
11313
11311
|
case "datetime": {
|
|
11314
|
-
const
|
|
11315
|
-
return
|
|
11312
|
+
const V = ir(S);
|
|
11313
|
+
return V.isValid() ? V.toISOString() : S;
|
|
11316
11314
|
}
|
|
11317
11315
|
default:
|
|
11318
11316
|
return S;
|
|
11319
11317
|
}
|
|
11320
|
-
},
|
|
11318
|
+
}, A = {};
|
|
11321
11319
|
r.fields.forEach((S) => {
|
|
11322
11320
|
if (S.name) {
|
|
11323
|
-
const W = d[S.name], Y = S.fieldType || "string",
|
|
11324
|
-
o ?
|
|
11325
|
-
value:
|
|
11321
|
+
const W = d[S.name], Y = S.fieldType || "string", V = O(W, Y);
|
|
11322
|
+
o ? A[S.name] = {
|
|
11323
|
+
value: V,
|
|
11326
11324
|
fieldType: Y
|
|
11327
|
-
} :
|
|
11325
|
+
} : A[S.name] = V;
|
|
11328
11326
|
}
|
|
11329
|
-
}), l ? console.log("Form submitted with values:",
|
|
11327
|
+
}), l ? console.log("Form submitted with values:", A) : a(A);
|
|
11330
11328
|
} else
|
|
11331
11329
|
Cn.error("Please correct the errors in the form");
|
|
11332
11330
|
};
|
|
11333
11331
|
Je(() => {
|
|
11334
11332
|
c(d);
|
|
11335
11333
|
}, [d, c]);
|
|
11336
|
-
const
|
|
11334
|
+
const j = {
|
|
11337
11335
|
green: "border-green-500 bg-green-50",
|
|
11338
11336
|
blue: "border-blue-500 bg-blue-50",
|
|
11339
11337
|
red: "border-red-500 bg-red-50",
|
|
@@ -11344,47 +11342,47 @@ const Fg = ({
|
|
|
11344
11342
|
pink: "border-pink-500 bg-pink-50",
|
|
11345
11343
|
orange: "border-orange-500 bg-orange-50"
|
|
11346
11344
|
};
|
|
11347
|
-
function H(x,
|
|
11348
|
-
const
|
|
11349
|
-
if (l && (
|
|
11350
|
-
`[fieldFormat RENDER] Rendering error for ${
|
|
11351
|
-
) : g[
|
|
11352
|
-
`[fieldFormat RENDER] Error exists in state for ${
|
|
11353
|
-
)), k.includes(
|
|
11354
|
-
return /* @__PURE__ */ u("div", { className:
|
|
11355
|
-
const
|
|
11356
|
-
|
|
11345
|
+
function H(x, N, R) {
|
|
11346
|
+
const O = `${N.name}-error`;
|
|
11347
|
+
if (l && (R ? console.log(
|
|
11348
|
+
`[fieldFormat RENDER] Rendering error for ${N.name}: ${R}`
|
|
11349
|
+
) : g[N.name] && console.log(
|
|
11350
|
+
`[fieldFormat RENDER] Error exists in state for ${N.name} but not passed in props!`
|
|
11351
|
+
)), k.includes(N.type))
|
|
11352
|
+
return /* @__PURE__ */ u("div", { className: N.class || "col-span-full", children: x });
|
|
11353
|
+
const A = N.containerStyle, S = N.color || "blue", W = A === "card" ? `rounded-lg border text-card-foreground shadow-sm p-4 ${N.containerClassName || j[S] || j.blue}` : "", Y = /* @__PURE__ */ I(Rt, { children: [
|
|
11354
|
+
N.label && /* @__PURE__ */ I(
|
|
11357
11355
|
"label",
|
|
11358
11356
|
{
|
|
11359
|
-
htmlFor:
|
|
11357
|
+
htmlFor: N.name,
|
|
11360
11358
|
className: "block text-sm font-medium mb-1",
|
|
11361
11359
|
children: [
|
|
11362
|
-
|
|
11363
|
-
|
|
11360
|
+
N.label,
|
|
11361
|
+
N.required && /* @__PURE__ */ u("span", { className: "text-red-500 ml-1", "aria-hidden": "true", children: "*" })
|
|
11364
11362
|
]
|
|
11365
11363
|
}
|
|
11366
11364
|
),
|
|
11367
11365
|
/* @__PURE__ */ u("div", { children: Te.cloneElement(x, {
|
|
11368
|
-
"aria-describedby":
|
|
11369
|
-
"aria-invalid": !!
|
|
11370
|
-
"aria-required":
|
|
11366
|
+
"aria-describedby": R ? O : void 0,
|
|
11367
|
+
"aria-invalid": !!R,
|
|
11368
|
+
"aria-required": N.required
|
|
11371
11369
|
}) }),
|
|
11372
|
-
|
|
11373
|
-
|
|
11370
|
+
N.description && /* @__PURE__ */ u("p", { className: "text-xs mt-1.5 text-gray-400", children: N.description }),
|
|
11371
|
+
R && /* @__PURE__ */ u("p", { id: O, className: "text-sm text-red-500 mt-1", role: "alert", children: R })
|
|
11374
11372
|
] });
|
|
11375
|
-
return /* @__PURE__ */ u("div", { className: "mb-4", children:
|
|
11373
|
+
return /* @__PURE__ */ u("div", { className: "mb-4", children: A === "card" ? /* @__PURE__ */ u("div", { className: W, children: Y }) : Y });
|
|
11376
11374
|
}
|
|
11377
11375
|
const G = (x) => {
|
|
11378
11376
|
if (x.showIf && !x.showIf(d)) return null;
|
|
11379
|
-
const
|
|
11377
|
+
const N = v[x.type] || ra;
|
|
11380
11378
|
if (d[x.name] === void 0) {
|
|
11381
|
-
const
|
|
11382
|
-
d[x.name] = x.value !== void 0 ? x.value :
|
|
11379
|
+
const A = x.type === "multiselect" || x.type === "searchselect" || x.type === "checkbox" && x.options && x.options.length > 0;
|
|
11380
|
+
d[x.name] = x.value !== void 0 ? x.value : A ? [] : "";
|
|
11383
11381
|
}
|
|
11384
|
-
const
|
|
11382
|
+
const R = g[x.name] ? g[x.name] : null, O = typeof x.disabled == "function" ? x.disabled(d) : !!x.disabled;
|
|
11385
11383
|
return H(
|
|
11386
11384
|
/* @__PURE__ */ u(
|
|
11387
|
-
|
|
11385
|
+
N,
|
|
11388
11386
|
{
|
|
11389
11387
|
field: x,
|
|
11390
11388
|
formValues: d,
|
|
@@ -11393,14 +11391,14 @@ const Fg = ({
|
|
|
11393
11391
|
setCharCounts: E,
|
|
11394
11392
|
charCount: y[x.name] || 0,
|
|
11395
11393
|
api_URL: t,
|
|
11396
|
-
error:
|
|
11394
|
+
error: R,
|
|
11397
11395
|
fileInputRefs: C,
|
|
11398
|
-
disabled:
|
|
11396
|
+
disabled: O,
|
|
11399
11397
|
apiClient: e
|
|
11400
11398
|
}
|
|
11401
11399
|
),
|
|
11402
11400
|
x,
|
|
11403
|
-
|
|
11401
|
+
R
|
|
11404
11402
|
);
|
|
11405
11403
|
};
|
|
11406
11404
|
return /* @__PURE__ */ I(
|
|
@@ -11422,8 +11420,8 @@ const Fg = ({
|
|
|
11422
11420
|
{
|
|
11423
11421
|
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",
|
|
11424
11422
|
children: Te.Children.map(s, (x) => Te.isValidElement(x) && x.props.onClick ? Te.cloneElement(x, {
|
|
11425
|
-
onClick: (
|
|
11426
|
-
x.props.onClick(d,
|
|
11423
|
+
onClick: (N) => {
|
|
11424
|
+
x.props.onClick(d, N);
|
|
11427
11425
|
}
|
|
11428
11426
|
}) : x)
|
|
11429
11427
|
}
|
|
@@ -11433,6 +11431,6 @@ const Fg = ({
|
|
|
11433
11431
|
);
|
|
11434
11432
|
};
|
|
11435
11433
|
export {
|
|
11436
|
-
|
|
11437
|
-
|
|
11434
|
+
$g as DynamicForm,
|
|
11435
|
+
$g as default
|
|
11438
11436
|
};
|