ynotsoft-dynamic-form 1.0.85 → 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.
@@ -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 Vr } from "react-day-picker";
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 jc = [
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
- ], Vc = ae("italic", jc);
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, N] = ue({}), D = Yt(null), _ = Yt(null), P = Yt(null), z = t[e.name], H = sr(() => z ? (Array.isArray(z) ? z : [z]).map((S) => {
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 (T = "") => {
274
+ async (A = "") => {
275
275
  if (e.onSearch) {
276
- const S = await e.onSearch(T, t);
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
- T ? S.filter(
287
- (W) => String(W.label).toLowerCase().includes(T.toLowerCase())
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(T)}`, j = await s(Y), ve = j.data || j, q = Array.isArray(ve) ? ve : [];
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
- (T) => {
310
- if (!T) return;
311
- N((W) => ({ ...W, [T.value]: T }));
309
+ (A) => {
310
+ if (!A) return;
311
+ T((W) => ({ ...W, [A.value]: A }));
312
312
  let S;
313
313
  if (l)
314
- S = T.value, h(!1);
314
+ S = A.value, h(!1);
315
315
  else {
316
316
  const W = Array.isArray(z) ? z : [];
317
- S = W.includes(T.value) ? W.filter((Y) => Y !== T.value) : [...W, T.value];
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
- ), A = (T) => {
329
+ ), N = (A) => {
330
330
  if (!c)
331
- switch (T.key) {
331
+ switch (A.key) {
332
332
  case "ArrowDown":
333
- T.preventDefault(), w ? k(
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
- T.preventDefault(), w && k((S) => S > 0 ? S - 1 : 0);
338
+ A.preventDefault(), w && k((S) => S > 0 ? S - 1 : 0);
339
339
  break;
340
340
  case "Enter":
341
- T.preventDefault(), w && C >= 0 && d[C] ? x(d[C]) : w || h(!0);
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
- }, O = (T) => {
351
- const S = T.target.value;
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 T = setTimeout(() => _.current?.focus(), 50);
358
- return () => clearTimeout(T);
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 T = (S) => {
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", T), () => document.removeEventListener("mousedown", T);
365
+ return document.addEventListener("mousedown", A), () => document.removeEventListener("mousedown", A);
366
366
  }, [e.name, r]);
367
- const R = (T, S) => {
368
- T.stopPropagation();
369
- const W = Array.isArray(z) ? z : [], Y = l ? null : W.filter((j) => j !== S);
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: A,
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((T) => /* @__PURE__ */ I(
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
- T.label,
401
+ A.label,
402
402
  !c && /* @__PURE__ */ u(
403
403
  "button",
404
404
  {
405
405
  type: "button",
406
- "aria-label": `Remove ${T.label}`,
407
- onClick: (S) => R(S, T.value),
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
- T.value
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: O,
441
- onKeyDown: A,
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((T, S) => {
454
+ children: d.length > 0 ? d.map((A, S) => {
455
455
  const W = H.some(
456
- (j) => j.value === T.value
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(T),
466
- onKeyDown: (j) => j.key === "Enter" && x(T),
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: T.label }),
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
- T.value
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), N = 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: N, children: C });
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, N = Nl((_) => {
716
- const P = _.target, z = [...l.branches].some((V) => V.contains(P));
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((V) => V.contains(P)) || (a?.(_), s?.(_), _.defaultPrevented || i?.());
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
- N.onPointerDownCapture
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 N of k)
883
- N.removedNodes.length > 0 && Ze(i);
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 jl(e, t, n) {
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 Vl(e) {
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: N
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
- }, N && w <= 50 && (w++, typeof N == "object" && (N.placement && (g = N.placement), N.rects && (l = N.rects === !0 ? await s.getElementRects({
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
- }) : N.rects), {
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
- }, N = An(a.convertOffsetParentRelativeRectToViewportRelativeRect ? await a.convertOffsetParentRelativeRectToViewportRelativeRect({
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 - N.top + w.top) / v.y,
1246
- bottom: (N.bottom - E.bottom + w.bottom) / v.y,
1247
- left: (E.left - N.left + w.left) / v.x,
1248
- right: (N.right - E.right + w.right) / v.x
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], N = g[p] - a.reference[p], D = await (s.getOffsetParent == null ? void 0 : s.getOffsetParent(l));
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 - N / 2, z = _ / 2 - h[w] / 2 - 1, V = tt(m[E], z), H = tt(m[C], z), G = V, x = _ - h[w] - H, A = _ / 2 - h[w] / 2 + P, O = Rr(G, A, x), R = !c.arrow && Ot(o) != null && A !== O && a.reference[w] / 2 - (A < G ? V : H) - h[w] / 2 < 0, T = R ? A < G ? A - G : A - x : 0;
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] + T,
1277
+ [p]: g[p] + A,
1278
1278
  data: {
1279
- [p]: O,
1280
- centerOffset: A - O - T,
1281
- ...R && {
1282
- alignmentOffset: T
1279
+ [p]: R,
1280
+ centerOffset: N - R - A,
1281
+ ...O && {
1282
+ alignmentOffset: A
1283
1283
  }
1284
1284
  },
1285
- reset: R
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)), N = g || (k || !h ? [kn(i)] : Vl(i)), D = w !== "none";
1313
- !g && D && N.push(...Kl(i, h, w, v));
1314
- const _ = [i, ...N], P = await qt(t, y), z = [];
1315
- let V = ((r = a.flip) == null ? void 0 : r.overflows) || [];
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 A = jl(o, s, v);
1318
- z.push(P[A[0]], P[A[1]]);
1317
+ const N = Vl(o, s, v);
1318
+ z.push(P[N[0]], P[N[1]]);
1319
1319
  }
1320
- if (V = [...V, {
1320
+ if (j = [...j, {
1321
1321
  placement: o,
1322
1322
  overflows: z
1323
- }], !z.every((A) => A <= 0)) {
1323
+ }], !z.every((N) => N <= 0)) {
1324
1324
  var H, G;
1325
- const A = (((H = a.flip) == null ? void 0 : H.index) || 0) + 1, O = _[A];
1326
- if (O && (!(m === "alignment" ? C !== ze(O) : !1) || // We leave the current main axis only if every placement on that axis
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
- V.every((S) => ze(S.placement) === C ? S.overflows[0] > 0 : !0)))
1328
+ j.every((S) => ze(S.placement) === C ? S.overflows[0] > 0 : !0)))
1329
1329
  return {
1330
1330
  data: {
1331
- index: A,
1332
- overflows: V
1331
+ index: N,
1332
+ overflows: j
1333
1333
  },
1334
1334
  reset: {
1335
- placement: O
1335
+ placement: R
1336
1336
  }
1337
1337
  };
1338
- let R = (G = V.filter((T) => T.overflows[0] <= 0).sort((T, S) => T.overflows[1] - S.overflows[1])[0]) == null ? void 0 : G.placement;
1339
- if (!R)
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 T = (x = V.filter((S) => {
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
- T && (R = T);
1352
+ A && (O = A);
1353
1353
  break;
1354
1354
  }
1355
1355
  case "initialPlacement":
1356
- R = i;
1356
+ O = i;
1357
1357
  break;
1358
1358
  }
1359
- if (o !== R)
1359
+ if (o !== O)
1360
1360
  return {
1361
1361
  reset: {
1362
- placement: R
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 jo(e) {
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: jo(s)
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: jo(s)
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, N = a.reference[g] + a.reference[k] - y.mainAxis;
1557
- p < v ? p = v : p > N && (p = N);
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)), N = 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 < N ? w = N : w > D && (w = D);
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), N = tt(w - d[E], k), D = !t.middlewareData.shift;
1592
- let _ = v, P = N;
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 V = Ee(d.left, 0), H = Ee(d.right, 0), G = Ee(d.top, 0), x = Ee(d.bottom, 0);
1595
- p ? P = w - 2 * (V !== 0 || H !== 0 ? V + H : Ee(d.left, d.right)) : _ = h - 2 * (G !== 0 || x !== 0 ? G + x : Ee(d.top, d.bottom));
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 Vo(e) {
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
- Vo(e) && e.host || // Fallback.
1703
+ jo(e) && e.host || // Fallback.
1704
1704
  Ue(e)
1705
1705
  );
1706
- return Vo(t) ? t.host : t;
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 ja(e, t) {
1888
+ function Va(e, t) {
1889
1889
  const n = nt(e);
1890
- return n === t || !Me(n) || Tt(n) ? !1 : Ie(n).position === "fixed" || ja(n, t);
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 && ja(e, s)) ? r = r.filter((d) => d !== s) : o = i, s = nt(s);
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 Va(e, t) {
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 || Va, n = this.getDimensions, r = await n(e.floating);
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: Va,
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 N(D) {
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(N, {
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(N, k);
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, N = s || y, D = f.useRef(null), _ = f.useRef(null), P = f.useRef(d), z = c != null, V = fr(c), H = fr(o), G = fr(l), x = f.useCallback(() => {
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
- A.current && !Nn(P.current, Y) && (P.current = Y, _n.flushSync(() => {
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 A = f.useRef(!1);
2212
- yn(() => (A.current = !0, () => {
2213
- A.current = !1;
2211
+ const N = f.useRef(!1);
2212
+ yn(() => (N.current = !0, () => {
2213
+ N.current = !1;
2214
2214
  }), []), yn(() => {
2215
- if (v && (D.current = v), N && (_.current = N), v && N) {
2216
- if (V.current)
2217
- return V.current(v, N, x);
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, N, x, V, z]);
2221
- const O = f.useMemo(() => ({
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]), R = f.useMemo(() => ({
2226
+ }), [C, k]), O = f.useMemo(() => ({
2227
2227
  reference: v,
2228
- floating: N
2229
- }), [v, N]), T = f.useMemo(() => {
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 (!R.floating)
2235
+ if (!O.floating)
2236
2236
  return S;
2237
- const W = Xo(R.floating, d.x), Y = Xo(R.floating, d.y);
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(R.floating) >= 1.5 && {
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, R.floating, d.x, d.y]);
2249
+ }, [n, i, O.floating, d.x, d.y]);
2250
2250
  return f.useMemo(() => ({
2251
2251
  ...d,
2252
2252
  update: x,
2253
- refs: O,
2254
- elements: R,
2255
- floatingStyles: T
2256
- }), [d, x, O, R, T]);
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
- }), ju = (e, t) => ({
2282
+ }), Vu = (e, t) => ({
2283
2283
  ...Mu(e),
2284
2284
  options: [e, t]
2285
- }), Vu = (e, t) => ({
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, N] = f.useState(null), D = Xa(v), _ = D?.width ?? 0, P = D?.height ?? 0, z = r + (a !== "center" ? "-" + a : ""), V = typeof d == "number" ? d : { top: 0, right: 0, bottom: 0, left: 0, ...d }, H = Array.isArray(l) ? l : [l], G = H.length > 0, x = {
2421
- padding: V,
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: A, floatingStyles: O, placement: R, isPositioned: T, middlewareData: S } = Bu({
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 && ju({
2437
+ c && Vu({
2438
2438
  mainAxis: !0,
2439
2439
  crossAxis: !1,
2440
- limiter: m === "partial" ? Vu() : void 0,
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(R), j = et(w);
2455
+ }), [W, Y] = as(O), V = et(w);
2456
2456
  be(() => {
2457
- T && j?.();
2458
- }, [T, j]);
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: A.setFloating,
2465
+ ref: N.setFloating,
2466
2466
  "data-radix-popper-content-wrapper": "",
2467
2467
  style: {
2468
- ...O,
2469
- transform: T ? O.transform : "translate(0, -200%)",
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: N,
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: T ? void 0 : "none"
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"]), N = g, D = Ad([n, t]), _ = We(We({}, v), o);
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(N, { sideCar: hs, removeScrollBar: l, shards: m, noRelative: p, noIsolation: w, inert: h, setCallbacks: a, allowPinchZoom: !!y, lockRef: n, gapMode: k }),
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, jd = function(e) {
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 && !jd(e) && n[t] === "visible")
3097
+ !(n.overflowY === n.overflowX && !Vd(e) && n[t] === "visible")
3098
3098
  );
3099
- }, Vd = function(e) {
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" ? Vd(t) : Gd(t);
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], N, D = h.target, _ = Math.abs(k) > Math.abs(v) ? "h" : "v";
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 ? N = _ : (N = _ === "v" ? "h" : "v", P = Jo(_, D)), !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 = N), !N)
3193
+ if (!r.current && "changedTouches" in h && (k || v) && (r.current = T), !T)
3194
3194
  return !0;
3195
- var z = r.current || N;
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(N) {
3201
- return N.name === y.type && (N.target === y.target || y.target === N.shadowParent) && Qd(N.delta, E);
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(N) {
3209
- return N.contains(y.target);
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, N] = f.useState(!1), D = qr(l), [_, P] = Xt({
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, V] = Xt({
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, A] = f.useState(/* @__PURE__ */ new Set()), O = Array.from(x).map((R) => R.props.value).join(";");
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: N,
3297
+ onValueNodeHasChildrenChange: T,
3298
3298
  contentId: Zt(),
3299
3299
  value: z,
3300
- onValueChange: V,
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((R) => {
3312
- A((T) => new Set(T).add(R));
3311
+ onNativeOptionAdd: f.useCallback((O) => {
3312
+ N((A) => new Set(A).add(O));
3313
3313
  }, []),
3314
- onNativeOptionRemove: f.useCallback((R) => {
3315
- A((T) => {
3316
- const S = new Set(T);
3317
- return S.delete(R), S;
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
- js,
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: (R) => V(R.target.value),
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
- O
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": Vs(s.value) ? "" : void 0,
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: Vs(c.value) ? /* @__PURE__ */ u(Rt, { children: s }) : a
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), [N, D] = f.useState(null), _ = ie(t, (L) => v(L)), [P, z] = f.useState(null), [V, H] = f.useState(
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, A] = f.useState(!1), O = f.useRef(!1);
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 R = f.useCallback(
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 && N && (N.scrollTop = 0), oe === Q && N && (N.scrollTop = N.scrollHeight), oe?.focus(), document.activeElement !== ne)) return;
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, N]
3468
- ), T = f.useCallback(
3469
- () => R([P, k]),
3470
- [R, P, k]
3467
+ [G, T]
3468
+ ), A = f.useCallback(
3469
+ () => O([P, k]),
3470
+ [O, P, k]
3471
3471
  );
3472
3472
  f.useEffect(() => {
3473
- x && T();
3474
- }, [x, T]);
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, j] = Gs((L) => {
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 = !O.current && !ce;
3503
- (C.value !== void 0 && C.value === te || Q) && (z(L), Q && (O.current = !0));
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 = !O.current && !ce;
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: N,
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: T,
3536
- selectedItemText: V,
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: () => A(!0),
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 && j(L.key), ["ArrowUp", "ArrowDown", "Home", "End"].includes(L.key)) {
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(() => R(Q)), L.preventDefault();
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(), V = E.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 = V.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, [
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 - V.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, [
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, A = window.getComputedStyle(l), O = parseInt(A.borderTopWidth, 10), R = parseInt(A.paddingTop, 10), T = parseInt(A.borderBottomWidth, 10), S = parseInt(A.paddingBottom, 10), W = O + R + x + S + T, Y = Math.min(y.offsetHeight * 5, W), j = window.getComputedStyle(h), ve = parseInt(j.paddingTop, 10), q = parseInt(j.paddingBottom, 10), ee = _.top + _.height / 2 - Oe, J = G - ee, he = y.offsetHeight / 2, L = y.offsetTop + he, te = O + R + L, ce = W - te;
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 + T
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
- O + h.offsetTop + // viewport might have padding top, include it to avoid a scrollable viewport
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, N] = f.useState();
3659
+ const [v, T] = f.useState();
3660
3660
  be(() => {
3661
- l && N(window.getComputedStyle(l).zIndex);
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", js = f.forwardRef(
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
- js.displayName = Cf;
4018
- function Vs(e) {
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), jf = xe(Array.prototype.lastIndexOf), aa = xe(Array.prototype.pop), $t = xe(Array.prototype.push), Vf = 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);
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, N = "";
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: V
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: A,
4419
- DATA_ATTR: O,
4420
- ARIA_ATTR: R,
4421
- IS_SCRIPT_OR_DATA: T,
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, j = null;
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", je = "http://www.w3.org/1999/xhtml";
4473
- let vt = je, tr = !1, nr = null;
4474
- const Ki = X({}, [on, an, je], br);
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, j = _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 || je, 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 && (j = X({}, ia), q = [], bt.html === !0 && (X(j, sa), X(q, ca)), bt.svg === !0 && (X(j, yr), X(q, Sr), X(q, hn)), bt.svgFilters === !0 && (X(j, wr), X(q, Sr), X(q, hn)), bt.mathMl === !0 && (X(j, xr), X(q, la), X(q, hn))), b.ADD_TAGS && (typeof b.ADD_TAGS == "function" ? te.tagCheck = b.ADD_TAGS : (j === ve && (j = $e(j)), X(j, 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 && (j["#text"] = !0), Re && X(j, ["html", "head", "body"]), j.table && (X(j, ["tbody"]), delete he.tbody), b.TRUSTED_TYPES_POLICY) {
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, N = v.createHTML("");
4491
+ v = b.TRUSTED_TYPES_POLICY, T = v.createHTML("");
4492
4492
  } else
4493
- v === void 0 && (v = im(p, o)), v !== null && typeof N == "string" && (N = v.createHTML(""));
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 === je ? B === "svg" : M.namespaceURI === on ? B === "svg" && (se === "annotation-xml" || sn[se]) : !!yo[B] : b.namespaceURI === on ? M.namespaceURI === je ? B === "math" : M.namespaceURI === an ? B === "math" && cn[se] : !!wo[B] : b.namespaceURI === je ? 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;
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 === je && (b = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + b + "</body></html>");
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 === je)
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 ? N : se;
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 === je ? z.call(M, Re ? "html" : "body")[0] : Re ? M.documentElement : ge;
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 Ve(U, b, M) {
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 (Ve(H.beforeSanitizeElements, b, null), or(b))
4580
+ if (je(H.beforeSanitizeElements, b, null), or(b))
4581
4581
  return Fe(b), !0;
4582
4582
  const B = fe(b.nodeName);
4583
- if (Ve(H.uponSanitizeElement, b, {
4583
+ if (je(H.uponSanitizeElement, b, {
4584
4584
  tagName: B,
4585
- allowedTags: j
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)) && (!j[B] || he[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, A], (se) => {
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)), Ve(H.afterSanitizeElements, b, null), !1);
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(O, M))) {
4612
- if (!(ce && ye(R, M))) {
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(T, Wt(B, S, "")))) {
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
- Ve(H.beforeSanitizeAttributes, b, null);
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, Ve(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)) {
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, A], (Po) => {
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
- Ve(H.afterSanitizeAttributes, b, null);
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 (Ve(H.beforeSanitizeShadowDOM, b, null); M = B.nextNode(); )
4710
- Ve(H.uponSanitizeShadowNode, M, null), Eo(M), No(M), M.content instanceof a && U(M.content);
4711
- Ve(H.afterSanitizeShadowDOM, b, null);
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 (!j[Ge] || he[Ge])
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 ? N : "";
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 = V.call(r, ge, !0)), 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 && j["!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, A], (Ge) => {
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 = jf(H[U], b);
4771
- return M === -1 ? void 0 : Vf(H[U], M, 1)[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(Vc, { size: 14 })
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, N) => {
5032
- let D = N ? [...C, v] : C.filter((_) => _ !== v);
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(
@@ -5045,7 +5045,7 @@ function dm({
5045
5045
  {
5046
5046
  className: h ? "flex flex-wrap gap-x-6 gap-y-3" : "space-y-4",
5047
5047
  children: w.map((v) => {
5048
- const N = typeof v == "object" ? v.value : v, D = typeof v == "object" ? v.label : v, _ = typeof v == "object" ? v.description : null, P = `${e.name}-${N}`, z = C.includes(N);
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);
5049
5049
  return /* @__PURE__ */ I(
5050
5050
  "div",
5051
5051
  {
@@ -5059,7 +5059,7 @@ function dm({
5059
5059
  type: "checkbox",
5060
5060
  id: P,
5061
5061
  checked: z,
5062
- onChange: (V) => k(N, V.target.checked),
5062
+ onChange: (j) => k(T, j.target.checked),
5063
5063
  onBlur: () => r(e.name),
5064
5064
  disabled: p,
5065
5065
  className: `${E} ${!p && "cursor-pointer hover:border-primary/50"} ${o ? "border-destructive ring-destructive/20" : "border-input"}`
@@ -5084,7 +5084,7 @@ function dm({
5084
5084
  ] })
5085
5085
  ]
5086
5086
  },
5087
- N
5087
+ T
5088
5088
  );
5089
5089
  })
5090
5090
  }
@@ -5471,7 +5471,7 @@ const Nm = {
5471
5471
  defaultFormattingWidth: "wide"
5472
5472
  })
5473
5473
  };
5474
- function jt(e) {
5474
+ function Vt(e) {
5475
5475
  return (t, n = {}) => {
5476
5476
  const r = n.width, o = r && e.matchPatterns[r] || e.matchPatterns[e.defaultMatchWidth], a = t.match(o);
5477
5477
  if (!a)
@@ -5523,11 +5523,11 @@ const $m = /^(\d+)(th|st|nd|rd)?/i, Wm = /\d+/i, zm = {
5523
5523
  wide: /^[1234](th|st|nd|rd)? quarter/i
5524
5524
  }, Um = {
5525
5525
  any: [/1/i, /2/i, /3/i, /4/i]
5526
- }, jm = {
5526
+ }, Vm = {
5527
5527
  narrow: /^[jfmasond]/i,
5528
5528
  abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,
5529
5529
  wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i
5530
- }, Vm = {
5530
+ }, jm = {
5531
5531
  narrow: [
5532
5532
  /^j/i,
5533
5533
  /^f/i,
@@ -5584,32 +5584,32 @@ const $m = /^(\d+)(th|st|nd|rd)?/i, Wm = /\d+/i, zm = {
5584
5584
  parsePattern: Wm,
5585
5585
  valueCallback: (e) => parseInt(e, 10)
5586
5586
  }),
5587
- era: jt({
5587
+ era: Vt({
5588
5588
  matchPatterns: zm,
5589
5589
  defaultMatchWidth: "wide",
5590
5590
  parsePatterns: Bm,
5591
5591
  defaultParseWidth: "any"
5592
5592
  }),
5593
- quarter: jt({
5593
+ quarter: Vt({
5594
5594
  matchPatterns: Hm,
5595
5595
  defaultMatchWidth: "wide",
5596
5596
  parsePatterns: Um,
5597
5597
  defaultParseWidth: "any",
5598
5598
  valueCallback: (e) => e + 1
5599
5599
  }),
5600
- month: jt({
5601
- matchPatterns: jm,
5600
+ month: Vt({
5601
+ matchPatterns: Vm,
5602
5602
  defaultMatchWidth: "wide",
5603
- parsePatterns: Vm,
5603
+ parsePatterns: jm,
5604
5604
  defaultParseWidth: "any"
5605
5605
  }),
5606
- day: jt({
5606
+ day: Vt({
5607
5607
  matchPatterns: Gm,
5608
5608
  defaultMatchWidth: "wide",
5609
5609
  parsePatterns: Ym,
5610
5610
  defaultParseWidth: "any"
5611
5611
  }),
5612
- dayPeriod: jt({
5612
+ dayPeriod: Vt({
5613
5613
  matchPatterns: qm,
5614
5614
  defaultMatchWidth: "any",
5615
5615
  parsePatterns: Km,
@@ -6392,11 +6392,11 @@ function gp(e) {
6392
6392
  function bp(e, t) {
6393
6393
  return f.useReducer((n, r) => t[n][r] ?? n, e);
6394
6394
  }
6395
- var jn = (e) => {
6395
+ var Vn = (e) => {
6396
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));
6397
6397
  return typeof n == "function" || r.isPresent ? f.cloneElement(o, { ref: a }) : null;
6398
6398
  };
6399
- jn.displayName = "Presence";
6399
+ Vn.displayName = "Presence";
6400
6400
  function vp(e) {
6401
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, {
6402
6402
  mounted: {
@@ -6477,9 +6477,9 @@ var wp = [
6477
6477
  return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ u(c, { ...i, ref: a });
6478
6478
  });
6479
6479
  return r.displayName = `Primitive.${t}`, { ...e, [t]: r };
6480
- }, {}), Vn = "Popover", [oi] = ht(Vn, [
6480
+ }, {}), jn = "Popover", [oi] = ht(jn, [
6481
6481
  $n
6482
- ]), en = $n(), [xp, st] = oi(Vn), ai = (e) => {
6482
+ ]), en = $n(), [xp, st] = oi(jn), ai = (e) => {
6483
6483
  const {
6484
6484
  __scopePopover: t,
6485
6485
  children: n,
@@ -6491,7 +6491,7 @@ var wp = [
6491
6491
  prop: r,
6492
6492
  defaultProp: o ?? !1,
6493
6493
  onChange: a,
6494
- caller: Vn
6494
+ caller: jn
6495
6495
  });
6496
6496
  return /* @__PURE__ */ u(ss, { ...i, children: /* @__PURE__ */ u(
6497
6497
  xp,
@@ -6510,7 +6510,7 @@ var wp = [
6510
6510
  }
6511
6511
  ) });
6512
6512
  };
6513
- ai.displayName = Vn;
6513
+ ai.displayName = jn;
6514
6514
  var si = "PopoverAnchor", Sp = f.forwardRef(
6515
6515
  (e, t) => {
6516
6516
  const { __scopePopover: n, ...r } = e, o = st(si, n), a = en(n), { onCustomAnchorAdd: s, onCustomAnchorRemove: i } = o;
@@ -6541,13 +6541,13 @@ var lo = "PopoverPortal", [Cp, Ep] = oi(lo, {
6541
6541
  forceMount: void 0
6542
6542
  }), li = (e) => {
6543
6543
  const { __scopePopover: t, forceMount: n, children: r, container: o } = e, a = st(lo, t);
6544
- return /* @__PURE__ */ u(Cp, { scope: t, forceMount: n, children: /* @__PURE__ */ u(jn, { present: n || a.open, children: /* @__PURE__ */ u(so, { asChild: !0, container: o, children: r }) }) });
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 }) }) });
6545
6545
  };
6546
6546
  li.displayName = lo;
6547
6547
  var Pt = "PopoverContent", ui = f.forwardRef(
6548
6548
  (e, t) => {
6549
6549
  const n = Ep(Pt, e.__scopePopover), { forceMount: r = n.forceMount, ...o } = e, a = st(Pt, e.__scopePopover);
6550
- return /* @__PURE__ */ u(jn, { present: r || a.open, children: a.modal ? /* @__PURE__ */ u(Ap, { ...o, ref: t }) : /* @__PURE__ */ u(Np, { ...o, ref: t }) });
6550
+ return /* @__PURE__ */ u(Vn, { present: r || a.open, children: a.modal ? /* @__PURE__ */ u(Ap, { ...o, ref: t }) : /* @__PURE__ */ u(Np, { ...o, ref: t }) });
6551
6551
  }
6552
6552
  );
6553
6553
  ui.displayName = Pt;
@@ -6774,18 +6774,18 @@ const Lp = (e, t) => {
6774
6774
  }
6775
6775
  }, Up = (e, t, n, r) => {
6776
6776
  if (typeof e == "string") {
6777
- jp(e, t, n);
6777
+ Vp(e, t, n);
6778
6778
  return;
6779
6779
  }
6780
6780
  if (typeof e == "function") {
6781
- Vp(e, t, n, r);
6781
+ jp(e, t, n, r);
6782
6782
  return;
6783
6783
  }
6784
6784
  Gp(e, t, n, r);
6785
- }, jp = (e, t, n) => {
6785
+ }, Vp = (e, t, n) => {
6786
6786
  const r = e === "" ? t : bi(t, e);
6787
6787
  r.classGroupId = n;
6788
- }, Vp = (e, t, n, r) => {
6788
+ }, jp = (e, t, n, r) => {
6789
6789
  if (Yp(e)) {
6790
6790
  uo(e(r), t, n, r);
6791
6791
  return;
@@ -6937,9 +6937,9 @@ const Lp = (e, t) => {
6937
6937
  if (s.indexOf(v) > -1)
6938
6938
  continue;
6939
6939
  s.push(v);
6940
- const N = o(E, y);
6941
- for (let D = 0; D < N.length; ++D) {
6942
- const _ = N[D];
6940
+ const T = o(E, y);
6941
+ for (let D = 0; D < T.length; ++D) {
6942
+ const _ = T[D];
6943
6943
  s.push(k + _);
6944
6944
  }
6945
6945
  c = d + (c.length > 0 ? " " + c : c);
@@ -6978,7 +6978,7 @@ const Lp = (e, t) => {
6978
6978
  // For example, `hsl(0 0% 0%)` would be classified as a length without this check.
6979
6979
  // I could also use lookbehind assertion in `lengthUnitRegex` but that isn't supported widely enough.
6980
6980
  sh.test(e) && !ih.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), Vt = (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) => {
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) => {
6982
6982
  const r = yi.exec(e);
6983
6983
  return r ? r[1] ? t(r[1]) : n(r[2]) : !1;
6984
6984
  }, Dt = (e, t, n = !1) => {
@@ -7003,15 +7003,15 @@ const Lp = (e, t) => {
7003
7003
  "bottom-left",
7004
7004
  // Deprecated since Tailwind CSS v4.1.0, see https://github.com/tailwindlabs/tailwindcss/pull/17378
7005
7005
  "left-bottom"
7006
- ], N = () => [...v(), $, F], D = () => ["auto", "hidden", "clip", "visible", "scroll"], _ = () => ["auto", "contain", "none"], P = () => [$, F, c], z = () => [kt, "full", "auto", ...P()], V = () => [Qe, "none", "subgrid", $, F], H = () => ["auto", {
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", {
7007
7007
  span: ["full", Qe, $, F]
7008
- }, Qe, $, F], G = () => [Qe, "auto", $, F], x = () => ["auto", "min", "max", "fr", $, F], A = () => ["start", "end", "center", "between", "around", "evenly", "stretch", "baseline", "center-safe", "end-safe"], O = () => ["start", "end", "center", "stretch", "center-safe", "end-safe"], R = () => ["auto", ...P()], T = () => [kt, "auto", "full", "dvw", "dvh", "lvw", "lvh", "svw", "svh", "min", "max", "fit", ...P()], S = () => [e, $, F], W = () => [...v(), Ca, Sa, {
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, {
7009
7009
  position: [$, F]
7010
7010
  }], Y = () => ["no-repeat", {
7011
7011
  repeat: ["", "x", "y", "space", "round"]
7012
- }], j = () => ["auto", "cover", "contain", vh, hh, {
7012
+ }], V = () => ["auto", "cover", "contain", vh, hh, {
7013
7013
  size: [$, F]
7014
- }], ve = () => [Er, Vt, ut], q = () => [
7014
+ }], ve = () => [Er, jt, ut], q = () => [
7015
7015
  // Deprecated since Tailwind CSS v4.0.0
7016
7016
  "",
7017
7017
  "none",
@@ -7019,7 +7019,7 @@ const Lp = (e, t) => {
7019
7019
  l,
7020
7020
  $,
7021
7021
  F
7022
- ], ee = () => ["", K, Vt, ut], J = () => ["solid", "dashed", "dotted", "double"], he = () => ["normal", "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity"], L = () => [K, Er, Ca, Sa], te = () => [
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 = () => [
7023
7023
  // Deprecated since Tailwind CSS v4.0.0
7024
7024
  "",
7025
7025
  "none",
@@ -7150,7 +7150,7 @@ const Lp = (e, t) => {
7150
7150
  * @see https://tailwindcss.com/docs/object-position
7151
7151
  */
7152
7152
  "object-position": [{
7153
- object: N()
7153
+ object: T()
7154
7154
  }],
7155
7155
  /**
7156
7156
  * Overflow
@@ -7331,7 +7331,7 @@ const Lp = (e, t) => {
7331
7331
  * @see https://tailwindcss.com/docs/grid-template-columns
7332
7332
  */
7333
7333
  "grid-cols": [{
7334
- "grid-cols": V()
7334
+ "grid-cols": j()
7335
7335
  }],
7336
7336
  /**
7337
7337
  * Grid Column Start / End
@@ -7359,7 +7359,7 @@ const Lp = (e, t) => {
7359
7359
  * @see https://tailwindcss.com/docs/grid-template-rows
7360
7360
  */
7361
7361
  "grid-rows": [{
7362
- "grid-rows": V()
7362
+ "grid-rows": j()
7363
7363
  }],
7364
7364
  /**
7365
7365
  * Grid Row Start / End
@@ -7429,35 +7429,35 @@ const Lp = (e, t) => {
7429
7429
  * @see https://tailwindcss.com/docs/justify-content
7430
7430
  */
7431
7431
  "justify-content": [{
7432
- justify: [...A(), "normal"]
7432
+ justify: [...N(), "normal"]
7433
7433
  }],
7434
7434
  /**
7435
7435
  * Justify Items
7436
7436
  * @see https://tailwindcss.com/docs/justify-items
7437
7437
  */
7438
7438
  "justify-items": [{
7439
- "justify-items": [...O(), "normal"]
7439
+ "justify-items": [...R(), "normal"]
7440
7440
  }],
7441
7441
  /**
7442
7442
  * Justify Self
7443
7443
  * @see https://tailwindcss.com/docs/justify-self
7444
7444
  */
7445
7445
  "justify-self": [{
7446
- "justify-self": ["auto", ...O()]
7446
+ "justify-self": ["auto", ...R()]
7447
7447
  }],
7448
7448
  /**
7449
7449
  * Align Content
7450
7450
  * @see https://tailwindcss.com/docs/align-content
7451
7451
  */
7452
7452
  "align-content": [{
7453
- content: ["normal", ...A()]
7453
+ content: ["normal", ...N()]
7454
7454
  }],
7455
7455
  /**
7456
7456
  * Align Items
7457
7457
  * @see https://tailwindcss.com/docs/align-items
7458
7458
  */
7459
7459
  "align-items": [{
7460
- items: [...O(), {
7460
+ items: [...R(), {
7461
7461
  baseline: ["", "last"]
7462
7462
  }]
7463
7463
  }],
@@ -7466,7 +7466,7 @@ const Lp = (e, t) => {
7466
7466
  * @see https://tailwindcss.com/docs/align-self
7467
7467
  */
7468
7468
  "align-self": [{
7469
- self: ["auto", ...O(), {
7469
+ self: ["auto", ...R(), {
7470
7470
  baseline: ["", "last"]
7471
7471
  }]
7472
7472
  }],
@@ -7475,21 +7475,21 @@ const Lp = (e, t) => {
7475
7475
  * @see https://tailwindcss.com/docs/place-content
7476
7476
  */
7477
7477
  "place-content": [{
7478
- "place-content": A()
7478
+ "place-content": N()
7479
7479
  }],
7480
7480
  /**
7481
7481
  * Place Items
7482
7482
  * @see https://tailwindcss.com/docs/place-items
7483
7483
  */
7484
7484
  "place-items": [{
7485
- "place-items": [...O(), "baseline"]
7485
+ "place-items": [...R(), "baseline"]
7486
7486
  }],
7487
7487
  /**
7488
7488
  * Place Self
7489
7489
  * @see https://tailwindcss.com/docs/place-self
7490
7490
  */
7491
7491
  "place-self": [{
7492
- "place-self": ["auto", ...O()]
7492
+ "place-self": ["auto", ...R()]
7493
7493
  }],
7494
7494
  // Spacing
7495
7495
  /**
@@ -7560,63 +7560,63 @@ const Lp = (e, t) => {
7560
7560
  * @see https://tailwindcss.com/docs/margin
7561
7561
  */
7562
7562
  m: [{
7563
- m: R()
7563
+ m: O()
7564
7564
  }],
7565
7565
  /**
7566
7566
  * Margin X
7567
7567
  * @see https://tailwindcss.com/docs/margin
7568
7568
  */
7569
7569
  mx: [{
7570
- mx: R()
7570
+ mx: O()
7571
7571
  }],
7572
7572
  /**
7573
7573
  * Margin Y
7574
7574
  * @see https://tailwindcss.com/docs/margin
7575
7575
  */
7576
7576
  my: [{
7577
- my: R()
7577
+ my: O()
7578
7578
  }],
7579
7579
  /**
7580
7580
  * Margin Start
7581
7581
  * @see https://tailwindcss.com/docs/margin
7582
7582
  */
7583
7583
  ms: [{
7584
- ms: R()
7584
+ ms: O()
7585
7585
  }],
7586
7586
  /**
7587
7587
  * Margin End
7588
7588
  * @see https://tailwindcss.com/docs/margin
7589
7589
  */
7590
7590
  me: [{
7591
- me: R()
7591
+ me: O()
7592
7592
  }],
7593
7593
  /**
7594
7594
  * Margin Top
7595
7595
  * @see https://tailwindcss.com/docs/margin
7596
7596
  */
7597
7597
  mt: [{
7598
- mt: R()
7598
+ mt: O()
7599
7599
  }],
7600
7600
  /**
7601
7601
  * Margin Right
7602
7602
  * @see https://tailwindcss.com/docs/margin
7603
7603
  */
7604
7604
  mr: [{
7605
- mr: R()
7605
+ mr: O()
7606
7606
  }],
7607
7607
  /**
7608
7608
  * Margin Bottom
7609
7609
  * @see https://tailwindcss.com/docs/margin
7610
7610
  */
7611
7611
  mb: [{
7612
- mb: R()
7612
+ mb: O()
7613
7613
  }],
7614
7614
  /**
7615
7615
  * Margin Left
7616
7616
  * @see https://tailwindcss.com/docs/margin
7617
7617
  */
7618
7618
  ml: [{
7619
- ml: R()
7619
+ ml: O()
7620
7620
  }],
7621
7621
  /**
7622
7622
  * Space Between X
@@ -7650,14 +7650,14 @@ const Lp = (e, t) => {
7650
7650
  * @see https://tailwindcss.com/docs/width#setting-both-width-and-height
7651
7651
  */
7652
7652
  size: [{
7653
- size: T()
7653
+ size: A()
7654
7654
  }],
7655
7655
  /**
7656
7656
  * Width
7657
7657
  * @see https://tailwindcss.com/docs/width
7658
7658
  */
7659
7659
  w: [{
7660
- w: [i, "screen", ...T()]
7660
+ w: [i, "screen", ...A()]
7661
7661
  }],
7662
7662
  /**
7663
7663
  * Min-Width
@@ -7669,7 +7669,7 @@ const Lp = (e, t) => {
7669
7669
  "screen",
7670
7670
  /** Deprecated. @see https://github.com/tailwindlabs/tailwindcss.com/issues/2027#issuecomment-2620152757 */
7671
7671
  "none",
7672
- ...T()
7672
+ ...A()
7673
7673
  ]
7674
7674
  }],
7675
7675
  /**
@@ -7687,7 +7687,7 @@ const Lp = (e, t) => {
7687
7687
  {
7688
7688
  screen: [s]
7689
7689
  },
7690
- ...T()
7690
+ ...A()
7691
7691
  ]
7692
7692
  }],
7693
7693
  /**
@@ -7695,21 +7695,21 @@ const Lp = (e, t) => {
7695
7695
  * @see https://tailwindcss.com/docs/height
7696
7696
  */
7697
7697
  h: [{
7698
- h: ["screen", "lh", ...T()]
7698
+ h: ["screen", "lh", ...A()]
7699
7699
  }],
7700
7700
  /**
7701
7701
  * Min-Height
7702
7702
  * @see https://tailwindcss.com/docs/min-height
7703
7703
  */
7704
7704
  "min-h": [{
7705
- "min-h": ["screen", "lh", "none", ...T()]
7705
+ "min-h": ["screen", "lh", "none", ...A()]
7706
7706
  }],
7707
7707
  /**
7708
7708
  * Max-Height
7709
7709
  * @see https://tailwindcss.com/docs/max-height
7710
7710
  */
7711
7711
  "max-h": [{
7712
- "max-h": ["screen", "lh", ...T()]
7712
+ "max-h": ["screen", "lh", ...A()]
7713
7713
  }],
7714
7714
  // ------------------
7715
7715
  // --- Typography ---
@@ -7719,7 +7719,7 @@ const Lp = (e, t) => {
7719
7719
  * @see https://tailwindcss.com/docs/font-size
7720
7720
  */
7721
7721
  "font-size": [{
7722
- text: ["base", n, Vt, ut]
7722
+ text: ["base", n, jt, ut]
7723
7723
  }],
7724
7724
  /**
7725
7725
  * Font Smoothing
@@ -7992,7 +7992,7 @@ const Lp = (e, t) => {
7992
7992
  * @see https://tailwindcss.com/docs/background-size
7993
7993
  */
7994
7994
  "bg-size": [{
7995
- bg: j()
7995
+ bg: V()
7996
7996
  }],
7997
7997
  /**
7998
7998
  * Background Image
@@ -8354,7 +8354,7 @@ const Lp = (e, t) => {
8354
8354
  * @see https://tailwindcss.com/docs/outline-width
8355
8355
  */
8356
8356
  "outline-w": [{
8357
- outline: ["", K, Vt, ut]
8357
+ outline: ["", K, jt, ut]
8358
8358
  }],
8359
8359
  /**
8360
8360
  * Outline Color
@@ -8669,7 +8669,7 @@ const Lp = (e, t) => {
8669
8669
  * @see https://tailwindcss.com/docs/mask-size
8670
8670
  */
8671
8671
  "mask-size": [{
8672
- mask: j()
8672
+ mask: V()
8673
8673
  }],
8674
8674
  /**
8675
8675
  * Mask Type
@@ -8966,7 +8966,7 @@ const Lp = (e, t) => {
8966
8966
  * @see https://tailwindcss.com/docs/perspective-origin
8967
8967
  */
8968
8968
  "perspective-origin": [{
8969
- "perspective-origin": N()
8969
+ "perspective-origin": T()
8970
8970
  }],
8971
8971
  /**
8972
8972
  * Rotate
@@ -9062,7 +9062,7 @@ const Lp = (e, t) => {
9062
9062
  * @see https://tailwindcss.com/docs/transform-origin
9063
9063
  */
9064
9064
  "transform-origin": [{
9065
- origin: N()
9065
+ origin: T()
9066
9066
  }],
9067
9067
  /**
9068
9068
  * Transform Style
@@ -9379,7 +9379,7 @@ const Lp = (e, t) => {
9379
9379
  * @see https://tailwindcss.com/docs/stroke-width
9380
9380
  */
9381
9381
  "stroke-w": [{
9382
- stroke: [K, Vt, ut, kr]
9382
+ stroke: [K, jt, ut, kr]
9383
9383
  }],
9384
9384
  /**
9385
9385
  * Stroke
@@ -9573,7 +9573,7 @@ function Eh({
9573
9573
  ) }),
9574
9574
  /* @__PURE__ */ I(Kn, { align: "start", className: "w-auto p-0", children: [
9575
9575
  /* @__PURE__ */ u("div", { className: "p-3", children: /* @__PURE__ */ u(
9576
- Vr,
9576
+ jr,
9577
9577
  {
9578
9578
  mode: "range",
9579
9579
  selected: l,
@@ -9623,60 +9623,60 @@ function Ea({
9623
9623
  );
9624
9624
  const E = (x) => {
9625
9625
  if (x === 0) return "0 Bytes";
9626
- const A = 1024, O = ["Bytes", "KB", "MB", "GB"], R = Math.floor(Math.log(x) / Math.log(A));
9627
- return `${parseFloat((x / A ** R).toFixed(2))} ${O[R]}`;
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]}`;
9628
9628
  }, C = async (x) => {
9629
- const A = new FormData();
9630
- A.append("file", x);
9631
- const O = await fetch(`${y}`, {
9629
+ const N = new FormData();
9630
+ N.append("file", x);
9631
+ const R = await fetch(`${y}`, {
9632
9632
  method: "POST",
9633
- body: A
9633
+ body: N
9634
9634
  });
9635
- if (!O.ok)
9635
+ if (!R.ok)
9636
9636
  throw Cn.error("Upload failed"), new Error("Upload failed");
9637
- return await O.json();
9638
- }, k = async (x, A) => {
9639
- if (!A) return;
9640
- if (x.maxSize && A.size > x.maxSize)
9637
+ return await R.json();
9638
+ }, k = async (x, N) => {
9639
+ if (!N) return;
9640
+ if (x.maxSize && N.size > x.maxSize)
9641
9641
  throw new Error(
9642
9642
  `File size must not exceed ${E(x.maxSize)}`
9643
9643
  );
9644
- const O = await C(A), R = { ...t, [x.name]: O };
9645
- a(x.name, O), s(R);
9646
- }, v = async (x, A) => {
9647
- const O = t[x.name] || [];
9648
- if (x.maxFiles && O.length + A.length > 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)
9649
9649
  throw new Error(`Maximum ${x.maxFiles} files allowed`);
9650
- A.forEach((S) => {
9650
+ N.forEach((S) => {
9651
9651
  if (x.maxSize && S.size > x.maxSize)
9652
9652
  throw new Error(
9653
9653
  `Each file must not exceed ${E(x.maxSize)}`
9654
9654
  );
9655
9655
  });
9656
- const R = await Promise.all(
9657
- A.map((S) => C(S))
9656
+ const O = await Promise.all(
9657
+ N.map((S) => C(S))
9658
9658
  // Updated call
9659
- ), T = [...O, ...R];
9660
- a(x.name, T), s({ ...t, [x.name]: T });
9661
- }, N = async (x, A) => {
9659
+ ), A = [...R, ...O];
9660
+ a(x.name, A), s({ ...t, [x.name]: A });
9661
+ }, T = async (x, N) => {
9662
9662
  if (l) return;
9663
- const O = Array.from(A);
9663
+ const R = Array.from(N);
9664
9664
  try {
9665
- e.type === "multifile" ? await v(e, O) : await k(e, O[0]), o.current?.[x] && (o.current[x].value = "");
9666
- } catch (R) {
9667
- Cn.error(`Upload failed: ${R.message}`);
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}`);
9668
9668
  }
9669
- }, D = async (x, A) => {
9669
+ }, D = async (x, N) => {
9670
9670
  if (l) return;
9671
- let O;
9672
- e.type === "file" ? O = "" : O = (t[x] || []).filter((T) => T !== A), a(x, O), s({ ...t, [x]: O }), o.current?.[x] && (o.current[x].value = "");
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 = "");
9673
9673
  }, _ = (x) => {
9674
9674
  x.preventDefault(), l || h(!0);
9675
9675
  }, P = (x) => {
9676
9676
  x.preventDefault(), l || h(!1);
9677
9677
  }, z = (x) => {
9678
- x.preventDefault(), h(!1), !l && x.dataTransfer.files && x.dataTransfer.files.length > 0 && N(e.name, x.dataTransfer.files);
9679
- }, V = 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 = `
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 = `
9680
9680
  w-full flex flex-col items-center justify-center p-6 border-2 border-dashed rounded-lg transition-all duration-200
9681
9681
  // Ensure focus styling is handled correctly for the button element
9682
9682
  focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-opacity-50
@@ -9716,7 +9716,7 @@ function Ea({
9716
9716
  /* @__PURE__ */ u("span", { className: "font-light", children: " or drag and drop" })
9717
9717
  ] }),
9718
9718
  /* @__PURE__ */ I("p", { className: "text-xs mt-1 text-gray-500", children: [
9719
- V,
9719
+ j,
9720
9720
  H,
9721
9721
  d && e.maxFiles && `, Max ${e.maxFiles} files`
9722
9722
  ] })
@@ -9734,22 +9734,22 @@ function Ea({
9734
9734
  accept: e.accept,
9735
9735
  multiple: d,
9736
9736
  className: "sr-only",
9737
- onChange: (x) => N(e.name, x.target.files),
9737
+ onChange: (x) => T(e.name, x.target.files),
9738
9738
  disabled: l
9739
9739
  }
9740
9740
  ),
9741
- p.length > 0 && /* @__PURE__ */ u("div", { className: "space-y-2 pt-2 border-t border-gray-200", children: p.map((x, A) => {
9742
- const O = x.original_name || x.name || "File", R = x.size || null;
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;
9743
9743
  return /* @__PURE__ */ I(
9744
9744
  "div",
9745
9745
  {
9746
9746
  className: "flex items-center justify-between p-2 bg-gray-50 rounded",
9747
9747
  children: [
9748
9748
  /* @__PURE__ */ I("div", { className: "flex items-center space-x-2 min-w-0", children: [
9749
- /* @__PURE__ */ u("span", { className: "text-sm truncate", children: O }),
9750
- R && /* @__PURE__ */ I("span", { className: "text-xs text-gray-500 flex-shrink-0", children: [
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: [
9751
9751
  "(",
9752
- E(R),
9752
+ E(O),
9753
9753
  ")"
9754
9754
  ] })
9755
9755
  ] }),
@@ -9765,17 +9765,17 @@ function Ea({
9765
9765
  )
9766
9766
  ]
9767
9767
  },
9768
- x.url || x.original_name || A
9768
+ x.url || x.original_name || N
9769
9769
  );
9770
9770
  }) }),
9771
- Object.entries(m).map(([x, A]) => A.status === "uploading" ? /* @__PURE__ */ I("div", { className: "relative pt-1", children: [
9771
+ Object.entries(m).map(([x, N]) => N.status === "uploading" ? /* @__PURE__ */ I("div", { className: "relative pt-1", children: [
9772
9772
  /* @__PURE__ */ I("div", { className: "flex items-center justify-between", children: [
9773
9773
  /* @__PURE__ */ I("span", { className: "text-xs font-semibold inline-block text-blue-600", children: [
9774
9774
  "Uploading ",
9775
9775
  x
9776
9776
  ] }),
9777
9777
  /* @__PURE__ */ I("span", { className: "text-xs font-semibold inline-block text-blue-600", children: [
9778
- A.progress,
9778
+ N.progress,
9779
9779
  "%"
9780
9780
  ] })
9781
9781
  ] }),
@@ -9783,7 +9783,7 @@ function Ea({
9783
9783
  "div",
9784
9784
  {
9785
9785
  className: "shadow-none flex flex-col text-center whitespace-nowrap text-white justify-center bg-blue-500",
9786
- style: { width: `${A.progress}%` }
9786
+ style: { width: `${N.progress}%` }
9787
9787
  }
9788
9788
  ) })
9789
9789
  ] }, x) : null)
@@ -9850,12 +9850,12 @@ function Ah({ field: e, formValues: t, handleChange: n, handleBlur: r, error: o
9850
9850
  n(e.name, null);
9851
9851
  return;
9852
9852
  }
9853
- const N = new Date(v);
9854
- c ? (N.setHours(c.getHours()), N.setMinutes(c.getMinutes())) : (N.setHours(12), N.setMinutes(0)), n(e.name, N);
9855
- }, p = (v, N, D) => {
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) => {
9856
9856
  const _ = c ? new Date(c) : /* @__PURE__ */ new Date();
9857
9857
  let P = parseInt(v);
9858
- D === "PM" && P !== 12 && (P += 12), D === "AM" && P === 12 && (P = 0), _.setHours(P), _.setMinutes(parseInt(N)), n(e.name, _);
9858
+ D === "PM" && P !== 12 && (P += 12), D === "AM" && P === 12 && (P = 0), _.setHours(P), _.setMinutes(parseInt(T)), n(e.name, _);
9859
9859
  }, w = () => {
9860
9860
  let v = parseInt(l);
9861
9861
  v = v % 12 + 1, p(v.toString(), d, m);
@@ -9925,7 +9925,7 @@ function Ah({ field: e, formValues: t, handleChange: n, handleBlur: r, error: o
9925
9925
  className: "z-50 w-auto p-0 bg-white rounded-xl shadow-xl border border-slate-200",
9926
9926
  children: [
9927
9927
  /* @__PURE__ */ u("div", { className: "p-3", children: /* @__PURE__ */ u(
9928
- Vr,
9928
+ jr,
9929
9929
  {
9930
9930
  mode: "single",
9931
9931
  selected: c,
@@ -10170,11 +10170,11 @@ var Hh = [
10170
10170
  return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ u(c, { ...i, ref: a });
10171
10171
  });
10172
10172
  return r.displayName = `Primitive.${t}`, { ...e, [t]: r };
10173
- }, {}), Nr = "rovingFocusGroup.onEntryFocus", jh = { bubbles: !1, cancelable: !0 }, tn = "RovingFocusGroup", [jr, Ri, Vh] = Oa(tn), [Gh, Oi] = ht(
10173
+ }, {}), Nr = "rovingFocusGroup.onEntryFocus", Vh = { bubbles: !1, cancelable: !0 }, tn = "RovingFocusGroup", [Vr, Ri, jh] = Oa(tn), [Gh, Oi] = ht(
10174
10174
  tn,
10175
- [Vh]
10175
+ [jh]
10176
10176
  ), [Yh, qh] = Gh(tn), _i = f.forwardRef(
10177
- (e, t) => /* @__PURE__ */ u(jr.Provider, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ u(jr.Slot, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ u(Kh, { ...e, ref: t }) }) })
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 }) }) })
10178
10178
  );
10179
10179
  _i.displayName = tn;
10180
10180
  var Kh = f.forwardRef((e, t) => {
@@ -10194,7 +10194,7 @@ var Kh = f.forwardRef((e, t) => {
10194
10194
  defaultProp: i ?? null,
10195
10195
  onChange: c,
10196
10196
  caller: tn
10197
- }), [E, C] = f.useState(!1), k = et(l), v = Ri(n), N = f.useRef(!1), [D, _] = f.useState(0);
10197
+ }), [E, C] = f.useState(!1), k = et(l), v = Ri(n), T = f.useRef(!1), [D, _] = f.useState(0);
10198
10198
  return f.useEffect(() => {
10199
10199
  const P = g.current;
10200
10200
  if (P)
@@ -10229,20 +10229,20 @@ var Kh = f.forwardRef((e, t) => {
10229
10229
  ref: p,
10230
10230
  style: { outline: "none", ...e.style },
10231
10231
  onMouseDown: Z(e.onMouseDown, () => {
10232
- N.current = !0;
10232
+ T.current = !0;
10233
10233
  }),
10234
10234
  onFocus: Z(e.onFocus, (P) => {
10235
- const z = !N.current;
10235
+ const z = !T.current;
10236
10236
  if (P.target === P.currentTarget && z && !E) {
10237
- const V = new CustomEvent(Nr, jh);
10238
- if (P.currentTarget.dispatchEvent(V), !V.defaultPrevented) {
10239
- const H = v().filter((R) => R.focusable), G = H.find((R) => R.active), x = H.find((R) => R.id === h), O = [G, x, ...H].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(
10240
10240
  Boolean
10241
- ).map((R) => R.ref.current);
10242
- Di(O, d);
10241
+ ).map((O) => O.ref.current);
10242
+ Di(R, d);
10243
10243
  }
10244
10244
  }
10245
- N.current = !1;
10245
+ T.current = !1;
10246
10246
  }),
10247
10247
  onBlur: Z(e.onBlur, () => C(!1))
10248
10248
  }
@@ -10263,7 +10263,7 @@ var Kh = f.forwardRef((e, t) => {
10263
10263
  if (r)
10264
10264
  return p(), () => w();
10265
10265
  }, [r, p, w]), /* @__PURE__ */ u(
10266
- jr.ItemSlot,
10266
+ Vr.ItemSlot,
10267
10267
  {
10268
10268
  scope: n,
10269
10269
  id: l,
@@ -10386,7 +10386,7 @@ Fi.displayName = fo;
10386
10386
  var $i = "RadioIndicator", Wi = f.forwardRef(
10387
10387
  (e, t) => {
10388
10388
  const { __scopeRadio: n, forceMount: r, ...o } = e, a = og($i, n);
10389
- return /* @__PURE__ */ u(jn, { present: r || a.checked, children: /* @__PURE__ */ u(
10389
+ return /* @__PURE__ */ u(Vn, { present: r || a.checked, children: /* @__PURE__ */ u(
10390
10390
  Xn.span,
10391
10391
  {
10392
10392
  "data-state": Bi(a.checked),
@@ -10446,7 +10446,7 @@ function Bi(e) {
10446
10446
  var sg = ["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"], Qn = "RadioGroup", [ig] = ht(Qn, [
10447
10447
  Oi,
10448
10448
  Li
10449
- ]), Hi = Oi(), Ui = Li(), [cg, lg] = ig(Qn), ji = f.forwardRef(
10449
+ ]), Hi = Oi(), Ui = Li(), [cg, lg] = ig(Qn), Vi = f.forwardRef(
10450
10450
  (e, t) => {
10451
10451
  const {
10452
10452
  __scopeRadioGroup: n,
@@ -10501,10 +10501,10 @@ var sg = ["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"], Qn = "RadioGroup",
10501
10501
  );
10502
10502
  }
10503
10503
  );
10504
- ji.displayName = Qn;
10505
- var Vi = "RadioGroupItem", Gi = f.forwardRef(
10504
+ Vi.displayName = Qn;
10505
+ var ji = "RadioGroupItem", Gi = f.forwardRef(
10506
10506
  (e, t) => {
10507
- const { __scopeRadioGroup: n, disabled: r, ...o } = e, a = lg(Vi, 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);
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);
10508
10508
  return f.useEffect(() => {
10509
10509
  const p = (h) => {
10510
10510
  sg.includes(h.key) && (g.current = !0);
@@ -10542,7 +10542,7 @@ var Vi = "RadioGroupItem", Gi = f.forwardRef(
10542
10542
  );
10543
10543
  }
10544
10544
  );
10545
- Gi.displayName = Vi;
10545
+ Gi.displayName = ji;
10546
10546
  var ug = "RadioGroupIndicator", Yi = f.forwardRef(
10547
10547
  (e, t) => {
10548
10548
  const { __scopeRadioGroup: n, ...r } = e, o = Ui(n);
@@ -10550,7 +10550,7 @@ var ug = "RadioGroupIndicator", Yi = f.forwardRef(
10550
10550
  }
10551
10551
  );
10552
10552
  Yi.displayName = ug;
10553
- var dg = ji, fg = Gi, mg = Yi;
10553
+ var dg = Vi, fg = Gi, mg = Yi;
10554
10554
  function pg({
10555
10555
  className: e,
10556
10556
  ...t
@@ -10629,7 +10629,7 @@ function hg({
10629
10629
  disabled: w,
10630
10630
  className: k,
10631
10631
  children: h.map((v) => {
10632
- const N = typeof v == "object" ? v.value : v, D = typeof v == "object" ? v.label : v, _ = typeof v == "object" ? v.description : null, P = `${e.name}-${N}`, z = p === N;
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;
10633
10633
  return E ? /* @__PURE__ */ I(
10634
10634
  "label",
10635
10635
  {
@@ -10645,7 +10645,7 @@ function hg({
10645
10645
  /* @__PURE__ */ u(
10646
10646
  Aa,
10647
10647
  {
10648
- value: N,
10648
+ value: T,
10649
10649
  id: P,
10650
10650
  disabled: w,
10651
10651
  className: "sr-only"
@@ -10654,12 +10654,12 @@ function hg({
10654
10654
  D
10655
10655
  ]
10656
10656
  },
10657
- N
10657
+ T
10658
10658
  ) : /* @__PURE__ */ I("div", { className: "relative flex items-start group", children: [
10659
10659
  /* @__PURE__ */ u("div", { className: "flex h-6 items-center", children: /* @__PURE__ */ u(
10660
10660
  Aa,
10661
10661
  {
10662
- value: N,
10662
+ value: T,
10663
10663
  id: P,
10664
10664
  disabled: w,
10665
10665
  className: `
@@ -10687,7 +10687,7 @@ function hg({
10687
10687
  }
10688
10688
  )
10689
10689
  ] })
10690
- ] }, N);
10690
+ ] }, T);
10691
10691
  })
10692
10692
  }
10693
10693
  )
@@ -10822,7 +10822,7 @@ function bg({
10822
10822
  className: "z-50 w-auto p-0 bg-popover border border-border rounded-lg shadow-xl",
10823
10823
  children: [
10824
10824
  /* @__PURE__ */ u("div", { className: "p-3", children: /* @__PURE__ */ u(
10825
- Vr,
10825
+ jr,
10826
10826
  {
10827
10827
  mode: "single",
10828
10828
  selected: d,
@@ -10957,8 +10957,8 @@ function vg({ field: e, formValues: t, handleChange: n, handleBlur: r, error: o
10957
10957
  type: "text",
10958
10958
  value: i,
10959
10959
  onChange: (v) => {
10960
- const N = v.target.value.replace(/\D/g, "");
10961
- (N === "" || parseInt(N) >= 1 && parseInt(N) <= 12) && c(N.padStart(2, "0"));
10960
+ const T = v.target.value.replace(/\D/g, "");
10961
+ (T === "" || parseInt(T) >= 1 && parseInt(T) <= 12) && c(T.padStart(2, "0"));
10962
10962
  },
10963
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",
10964
10964
  maxLength: "2"
@@ -11015,8 +11015,8 @@ function vg({ field: e, formValues: t, handleChange: n, handleBlur: r, error: o
11015
11015
  type: "text",
11016
11016
  value: l,
11017
11017
  onChange: (v) => {
11018
- const N = v.target.value.replace(/\D/g, "");
11019
- (N === "" || parseInt(N) >= 0 && parseInt(N) <= 59) && d(N.padStart(2, "0"));
11018
+ const T = v.target.value.replace(/\D/g, "");
11019
+ (T === "" || parseInt(T) >= 0 && parseInt(T) <= 59) && d(T.padStart(2, "0"));
11020
11020
  },
11021
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",
11022
11022
  maxLength: "2"
@@ -11149,7 +11149,17 @@ function Cg({ field: e }) {
11149
11149
  return /* @__PURE__ */ u(Sg, { message: o });
11150
11150
  }
11151
11151
  }
11152
- const Fg = ({
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 = ({
11153
11163
  apiClient: e,
11154
11164
  api_URL: t,
11155
11165
  footerMode: n = "normal",
@@ -11187,107 +11197,108 @@ const Fg = ({
11187
11197
  linebreak: Bh
11188
11198
  }),
11189
11199
  []
11190
- ), N = async (x, A = null) => {
11200
+ ), T = async (x, N = null) => {
11191
11201
  if (!e) {
11192
- const O = `apiClient prop is required when using fields with optionsUrl. Field "${x.name}" requires optionsUrl but no apiClient was provided.`;
11193
- l && console.error(O), Cn.error(O);
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);
11194
11204
  return;
11195
11205
  }
11196
11206
  try {
11197
- const O = await e(`/${x.optionsUrl}`);
11198
- let R = [];
11199
- x.type === "select" ? R = [
11207
+ const R = await e(`/${x.optionsUrl}`);
11208
+ let O = [];
11209
+ x.type === "select" ? O = [
11200
11210
  { value: "", label: `Select ${x.label.toLowerCase()}` },
11201
- ...O.data
11202
- ] : R = [
11203
- ...O.data.map((T) => ({
11204
- value: T.value,
11205
- label: T.label
11211
+ ...R.data
11212
+ ] : O = [
11213
+ ...R.data.map((A) => ({
11214
+ value: A.value,
11215
+ label: A.label
11206
11216
  }))
11207
- ], r.fields.forEach((T) => {
11208
- T.name === x.name && (T.options = R);
11217
+ ], r.fields.forEach((A) => {
11218
+ A.name === x.name && (A.options = O);
11209
11219
  });
11210
- } catch (O) {
11211
- l && console.error(`Failed to load options for ${x.name}:`, O);
11220
+ } catch (R) {
11221
+ l && console.error(`Failed to load options for ${x.name}:`, R);
11212
11222
  } finally {
11213
11223
  }
11214
11224
  };
11215
11225
  Je(() => {
11216
11226
  if (r?.fields && r.fields.length > 0) {
11217
- if (!r.fields.some((O) => O.value)) return;
11218
- r.fields.forEach((O) => {
11219
- O.optionsUrl && N(O);
11227
+ if (!r.fields.some((R) => R.value)) return;
11228
+ r.fields.forEach((R) => {
11229
+ R.optionsUrl && T(R);
11220
11230
  });
11221
- const A = {};
11222
- r.fields.forEach((O) => {
11223
- if (!O.name) return;
11224
- const R = O.type === "multiselect" || O.type === "searchselect" || O.type === "checkbox" && O.options && O.options.length > 0;
11225
- A[O.name] = i[O.name] ?? O.value ?? (R ? [] : "");
11226
- }), m(A);
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);
11227
11238
  }
11228
11239
  }, [r]);
11229
- const D = (x, A, O) => {
11230
- const R = typeof A == "object" && A !== null && !Array.isArray(A) && !(A instanceof Date), T = A == null || typeof A == "string" && A.trim() === "" || Array.isArray(A) && A.length === 0 || x.type === "checkbox" && A === !1 || R && Object.keys(A).length === 0;
11231
- if (x.required && T)
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)
11232
11243
  return l && console.warn(`VALIDATION FAILED (REQUIRED): ${x.name} is empty.`), `${x.label} is required`;
11233
- if (T && !x.required)
11244
+ if (A && !x.required)
11234
11245
  return null;
11235
11246
  if (x.validate) {
11236
- const S = x.validate(A, O);
11247
+ const S = x.validate(N, R);
11237
11248
  if (S) return S;
11238
11249
  }
11239
- if (x.type === "email" && A && !/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(A))
11250
+ if (x.type === "email" && N && !/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(N))
11240
11251
  return "Please enter a valid email address";
11241
11252
  if (x.type === "number") {
11242
- if (x.min !== void 0 && A < x.min)
11253
+ if (x.min !== void 0 && N < x.min)
11243
11254
  return `${x.label} must be at least ${x.min}`;
11244
- if (x.max !== void 0 && A > x.max)
11255
+ if (x.max !== void 0 && N > x.max)
11245
11256
  return `${x.label} must be no more than ${x.max}`;
11246
11257
  }
11247
- return x.type === "date" && A && !ir(A).isValid() ? `${x.label} must be a valid date` : x.maxLength && A && A.length > x.maxLength ? `${x.label} must not exceed ${x.maxLength} characters` : null;
11248
- }, _ = (x, A) => {
11249
- const O = r.fields.find((T) => T.name === x);
11250
- if (!O) return;
11251
- const R = { ...d };
11252
- O.type === "multiselect" || O.type === "searchselect" ? Array.isArray(A) ? R[x] = A : A && A.target && A.target.selectedOptions ? R[x] = Array.from(A.target.selectedOptions).map(
11253
- (T) => T.value
11254
- ) : R[x] = A : O.type === "dateRange" ? R[x] = [
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] = [
11255
11266
  {
11256
- startDate: A.from,
11257
- endDate: A.to || A.from,
11267
+ startDate: N.from,
11268
+ endDate: N.to || N.from,
11258
11269
  key: "selection"
11259
11270
  }
11260
- ] : O.type === "dayTimePicker" ? R[x] = A ? ir(A).format("YYYY-MM-DD HH:mm:ss") : "" : O.type === "number" ? R[x] = A === "" ? "" : Number(A) : R[x] = A, O.type === "select" && r.fields.forEach((T) => {
11261
- if (T.showIf && !T.showIf(R)) {
11262
- const S = T.type === "multiselect" || T.type === "searchselect" || T.type === "checkbox" && T.options && T.options.length > 0;
11263
- R[T.name] = S ? [] : "";
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 ? [] : "";
11264
11275
  }
11265
- }), r.fields.forEach((T) => {
11266
- if (typeof T.disabled == "function" && T.disabled(R)) {
11267
- const S = T.type === "multiselect" || T.type === "searchselect" || T.type === "checkbox" && T.options && T.options.length > 0;
11268
- R[T.name] = S ? [] : "";
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 ? [] : "";
11269
11280
  }
11270
- }), m(R);
11281
+ }), m(O);
11271
11282
  }, P = (x) => {
11272
11283
  h({ ...w, [x]: !0 });
11273
11284
  }, z = (x) => {
11274
11285
  x.preventDefault();
11275
- const A = {};
11276
- r.fields.forEach((R) => {
11277
- R.name && (A[R.name] = !0);
11278
- }), h(A);
11279
- const O = {};
11280
- if (r.fields.forEach((R) => {
11281
- if (R.name && (!R.showIf || R.showIf(d))) {
11282
- const T = D(R, d[R.name], d);
11283
- T && (O[R.name] = T);
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);
11284
11295
  }
11285
- }), p(O), Object.keys(O).length === 0) {
11286
- const R = (S, W) => {
11296
+ }), p(R), Object.keys(R).length === 0) {
11297
+ const O = (S, W) => {
11287
11298
  if (S === "" || S === null || S === void 0) return null;
11288
11299
  const Y = W?.toLowerCase();
11289
11300
  if (Array.isArray(S))
11290
- return Y === "number" || Y === "integer" ? S.map((j) => j === "" ? null : Number(j)) : S;
11301
+ return Y === "number" || Y === "integer" ? S.map((V) => V === "" ? null : Number(V)) : S;
11291
11302
  switch (Y) {
11292
11303
  case "number":
11293
11304
  case "integer":
@@ -11298,29 +11309,29 @@ const Fg = ({
11298
11309
  return String(S).toLowerCase() === "true" || S === !0;
11299
11310
  case "date":
11300
11311
  case "datetime": {
11301
- const j = ir(S);
11302
- return j.isValid() ? j.toISOString() : S;
11312
+ const V = ir(S);
11313
+ return V.isValid() ? V.toISOString() : S;
11303
11314
  }
11304
11315
  default:
11305
11316
  return S;
11306
11317
  }
11307
- }, T = {};
11318
+ }, A = {};
11308
11319
  r.fields.forEach((S) => {
11309
11320
  if (S.name) {
11310
- const W = d[S.name], Y = S.fieldType || "string", j = R(W, Y);
11311
- o ? T[S.name] = {
11312
- value: j,
11321
+ const W = d[S.name], Y = S.fieldType || "string", V = O(W, Y);
11322
+ o ? A[S.name] = {
11323
+ value: V,
11313
11324
  fieldType: Y
11314
- } : T[S.name] = j;
11325
+ } : A[S.name] = V;
11315
11326
  }
11316
- }), l ? console.log("Form submitted with values:", T) : a(T);
11327
+ }), l ? console.log("Form submitted with values:", A) : a(A);
11317
11328
  } else
11318
11329
  Cn.error("Please correct the errors in the form");
11319
11330
  };
11320
11331
  Je(() => {
11321
11332
  c(d);
11322
11333
  }, [d, c]);
11323
- const V = {
11334
+ const j = {
11324
11335
  green: "border-green-500 bg-green-50",
11325
11336
  blue: "border-blue-500 bg-blue-50",
11326
11337
  red: "border-red-500 bg-red-50",
@@ -11331,47 +11342,47 @@ const Fg = ({
11331
11342
  pink: "border-pink-500 bg-pink-50",
11332
11343
  orange: "border-orange-500 bg-orange-50"
11333
11344
  };
11334
- function H(x, A, O) {
11335
- const R = `${A.name}-error`;
11336
- if (l && (O ? console.log(
11337
- `[fieldFormat RENDER] Rendering error for ${A.name}: ${O}`
11338
- ) : g[A.name] && console.log(
11339
- `[fieldFormat RENDER] Error exists in state for ${A.name} but not passed in props!`
11340
- )), k.includes(A.type))
11341
- return /* @__PURE__ */ u("div", { className: A.class || "col-span-full", children: x });
11342
- const T = A.containerStyle, S = A.color || "blue", W = T === "card" ? `rounded-lg border text-card-foreground shadow-sm p-4 ${A.containerClassName || V[S] || V.blue}` : "", Y = /* @__PURE__ */ I(Rt, { children: [
11343
- A.label && /* @__PURE__ */ I(
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(
11344
11355
  "label",
11345
11356
  {
11346
- htmlFor: A.name,
11357
+ htmlFor: N.name,
11347
11358
  className: "block text-sm font-medium mb-1",
11348
11359
  children: [
11349
- A.label,
11350
- A.required && /* @__PURE__ */ u("span", { className: "text-red-500 ml-1", "aria-hidden": "true", children: "*" })
11360
+ N.label,
11361
+ N.required && /* @__PURE__ */ u("span", { className: "text-red-500 ml-1", "aria-hidden": "true", children: "*" })
11351
11362
  ]
11352
11363
  }
11353
11364
  ),
11354
11365
  /* @__PURE__ */ u("div", { children: Te.cloneElement(x, {
11355
- "aria-describedby": O ? R : void 0,
11356
- "aria-invalid": !!O,
11357
- "aria-required": A.required
11366
+ "aria-describedby": R ? O : void 0,
11367
+ "aria-invalid": !!R,
11368
+ "aria-required": N.required
11358
11369
  }) }),
11359
- A.description && /* @__PURE__ */ u("p", { className: "text-xs mt-1.5 text-gray-400", children: A.description }),
11360
- O && /* @__PURE__ */ u("p", { id: R, className: "text-sm text-red-500 mt-1", role: "alert", children: O })
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 })
11361
11372
  ] });
11362
- return /* @__PURE__ */ u("div", { className: "mb-4", children: T === "card" ? /* @__PURE__ */ u("div", { className: W, children: Y }) : Y });
11373
+ return /* @__PURE__ */ u("div", { className: "mb-4", children: A === "card" ? /* @__PURE__ */ u("div", { className: W, children: Y }) : Y });
11363
11374
  }
11364
11375
  const G = (x) => {
11365
11376
  if (x.showIf && !x.showIf(d)) return null;
11366
- const A = v[x.type] || ra;
11377
+ const N = v[x.type] || ra;
11367
11378
  if (d[x.name] === void 0) {
11368
- const T = x.type === "multiselect" || x.type === "searchselect" || x.type === "checkbox" && x.options && x.options.length > 0;
11369
- d[x.name] = x.value !== void 0 ? x.value : T ? [] : "";
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 ? [] : "";
11370
11381
  }
11371
- const O = g[x.name] ? g[x.name] : null, R = typeof x.disabled == "function" ? x.disabled(d) : !!x.disabled;
11382
+ const R = g[x.name] ? g[x.name] : null, O = typeof x.disabled == "function" ? x.disabled(d) : !!x.disabled;
11372
11383
  return H(
11373
11384
  /* @__PURE__ */ u(
11374
- A,
11385
+ N,
11375
11386
  {
11376
11387
  field: x,
11377
11388
  formValues: d,
@@ -11380,14 +11391,14 @@ const Fg = ({
11380
11391
  setCharCounts: E,
11381
11392
  charCount: y[x.name] || 0,
11382
11393
  api_URL: t,
11383
- error: O,
11394
+ error: R,
11384
11395
  fileInputRefs: C,
11385
- disabled: R,
11396
+ disabled: O,
11386
11397
  apiClient: e
11387
11398
  }
11388
11399
  ),
11389
11400
  x,
11390
- O
11401
+ R
11391
11402
  );
11392
11403
  };
11393
11404
  return /* @__PURE__ */ I(
@@ -11409,8 +11420,8 @@ const Fg = ({
11409
11420
  {
11410
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",
11411
11422
  children: Te.Children.map(s, (x) => Te.isValidElement(x) && x.props.onClick ? Te.cloneElement(x, {
11412
- onClick: (A) => {
11413
- x.props.onClick(d, A);
11423
+ onClick: (N) => {
11424
+ x.props.onClick(d, N);
11414
11425
  }
11415
11426
  }) : x)
11416
11427
  }
@@ -11420,6 +11431,6 @@ const Fg = ({
11420
11431
  );
11421
11432
  };
11422
11433
  export {
11423
- Fg as DynamicForm,
11424
- Fg as default
11434
+ $g as DynamicForm,
11435
+ $g as default
11425
11436
  };