ynotsoft-dynamic-form 1.0.98 → 1.0.100

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.
@@ -267,15 +267,15 @@ function dl({
267
267
  apiClient: s,
268
268
  ...i
269
269
  }) {
270
- const c = a, l = e.selectMode !== "multiple", d = e.returnValueOnly === !0, [m, g] = ue([]), [h, w] = ue(!1), [p, v] = ue(!1), [E, k] = ue(""), [x, S] = ue(-1), [A, I] = ue({}), O = Yt(null), T = Yt(null), z = Yt(null), H = t[e.name], q = sr(() => H ? (Array.isArray(H) ? H : [H]).map((L) => {
270
+ const c = a, l = e.selectMode !== "multiple", d = e.returnValueOnly === !0, [m, g] = ue([]), [h, w] = ue(!1), [p, v] = ue(!1), [E, k] = ue(""), [C, y] = ue(-1), [A, I] = ue({}), O = Yt(null), T = Yt(null), z = Yt(null), H = t[e.name], q = sr(() => H ? (Array.isArray(H) ? H : [H]).map((L) => {
271
271
  if (L && typeof L == "object" && L.value !== void 0)
272
272
  return { value: L.value, label: L.label || L.value };
273
273
  const U = m.find((G) => G.value === L);
274
274
  return U || (A[L] ? A[L] : { value: L, label: L });
275
- }) : [], [H, m, A])(), y = sr(
276
- async (C = "") => {
275
+ }) : [], [H, m, A])(), x = sr(
276
+ async (S = "") => {
277
277
  if (e.onSearch) {
278
- const L = await e.onSearch(C, t);
278
+ const L = await e.onSearch(S, t);
279
279
  g(L);
280
280
  return;
281
281
  }
@@ -285,15 +285,15 @@ function dl({
285
285
  label: U[e.labelId || "label"] || U.label || U.name
286
286
  }));
287
287
  g(
288
- C ? L.filter(
289
- (U) => String(U.label).toLowerCase().includes(C.toLowerCase())
288
+ S ? L.filter(
289
+ (U) => String(U.label).toLowerCase().includes(S.toLowerCase())
290
290
  ) : L
291
291
  );
292
292
  return;
293
293
  }
294
294
  w(!0);
295
295
  try {
296
- const L = e.searchParam || "search", U = e.optionsUrl.includes("?") ? "&" : "?", G = `${e.optionsUrl}${U}${L}=${encodeURIComponent(C)}`, ce = await s(G), Y = ce.data || ce, oe = Array.isArray(Y) ? Y : [];
296
+ const L = e.searchParam || "search", U = e.optionsUrl.includes("?") ? "&" : "?", G = `${e.optionsUrl}${U}${L}=${encodeURIComponent(S)}`, ce = await s(G), Y = ce.data || ce, oe = Array.isArray(Y) ? Y : [];
297
297
  g(
298
298
  oe.map((K) => ({
299
299
  value: K[e.valueId || "value"] || K.value || K.id,
@@ -308,16 +308,16 @@ function dl({
308
308
  },
309
309
  [e, s, t]
310
310
  ), N = sr(
311
- (C) => {
312
- if (!C) return;
313
- I((G) => ({ ...G, [C.value]: C }));
314
- const L = d ? C.value : { value: C.value, label: C.label };
311
+ (S) => {
312
+ if (!S) return;
313
+ I((G) => ({ ...G, [S.value]: S }));
314
+ const L = d ? S.value : { value: S.value, label: S.label };
315
315
  let U;
316
316
  if (l)
317
317
  U = [L], v(!1);
318
318
  else {
319
319
  const G = Array.isArray(H) ? H : [];
320
- U = G.some((Y) => (Y?.value ?? Y) === C.value) ? G.filter((Y) => (Y?.value ?? Y) !== C.value) : [...G, L];
320
+ U = G.some((Y) => (Y?.value ?? Y) === S.value) ? G.filter((Y) => (Y?.value ?? Y) !== S.value) : [...G, L];
321
321
  }
322
322
  n(e.name, U), r(e.name), e.clearSearchOnSelect && k("");
323
323
  },
@@ -330,19 +330,19 @@ function dl({
330
330
  l,
331
331
  d
332
332
  ]
333
- ), R = (C) => {
333
+ ), R = (S) => {
334
334
  if (!c)
335
- switch (C.key) {
335
+ switch (S.key) {
336
336
  case "ArrowDown":
337
- C.preventDefault(), p ? S(
337
+ S.preventDefault(), p ? y(
338
338
  (L) => L < m.length - 1 ? L + 1 : L
339
339
  ) : v(!0);
340
340
  break;
341
341
  case "ArrowUp":
342
- C.preventDefault(), p && S((L) => L > 0 ? L - 1 : 0);
342
+ S.preventDefault(), p && y((L) => L > 0 ? L - 1 : 0);
343
343
  break;
344
344
  case "Enter":
345
- C.preventDefault(), p && x >= 0 && m[x] ? N(m[x]) : p || v(!0);
345
+ S.preventDefault(), p && C >= 0 && m[C] ? N(m[C]) : p || v(!0);
346
346
  break;
347
347
  case "Escape":
348
348
  v(!1);
@@ -351,25 +351,26 @@ function dl({
351
351
  v(!1), r(e.name);
352
352
  break;
353
353
  }
354
- }, P = (C) => {
355
- const L = C.target.value;
356
- k(L), S(-1), z.current && clearTimeout(z.current), z.current = setTimeout(() => y(L), 300);
354
+ }, P = (S) => {
355
+ const L = S.target.value;
356
+ k(L), y(-1), z.current && clearTimeout(z.current), z.current = setTimeout(() => x(L), 300);
357
357
  };
358
358
  He(() => {
359
359
  if (p) {
360
- y(E);
361
- const C = setTimeout(() => T.current?.focus(), 50);
362
- return () => clearTimeout(C);
360
+ x(E);
361
+ const S = setTimeout(() => T.current?.focus(), 50);
362
+ return () => clearTimeout(S);
363
363
  } else
364
- S(-1);
365
- }, [p, y, E]), He(() => {
366
- const C = (L) => {
364
+ y(-1);
365
+ }, [p, x, E]), He(() => {
366
+ if (!p) return;
367
+ const S = (L) => {
367
368
  O.current && !O.current.contains(L.target) && (v(!1), r(e.name));
368
369
  };
369
- return document.addEventListener("mousedown", C), () => document.removeEventListener("mousedown", C);
370
- }, [e.name, r]);
371
- const _ = (C, L) => {
372
- C.stopPropagation();
370
+ return document.addEventListener("mousedown", S), () => document.removeEventListener("mousedown", S);
371
+ }, [p, e.name, r]);
372
+ const _ = (S, L) => {
373
+ S.stopPropagation();
373
374
  const U = Array.isArray(H) ? H : [], G = l ? [] : U.filter((ce) => (ce?.value ?? ce) !== L);
374
375
  n(e.name, G), r(e.name);
375
376
  };
@@ -397,25 +398,25 @@ function dl({
397
398
  ${c ? "bg-muted opacity-60 cursor-not-allowed" : ""}
398
399
  `,
399
400
  children: [
400
- q.length > 0 ? q.map((C) => /* @__PURE__ */ D(
401
+ q.length > 0 ? q.map((S) => /* @__PURE__ */ D(
401
402
  "span",
402
403
  {
403
404
  className: "inline-flex items-center px-2 py-0.5 bg-primary/10 text-primary text-xs rounded-sm border border-primary/20",
404
405
  children: [
405
- C.label,
406
+ S.label,
406
407
  !c && /* @__PURE__ */ u(
407
408
  "button",
408
409
  {
409
410
  type: "button",
410
- "aria-label": `Remove ${C.label}`,
411
- onClick: (L) => _(L, C.value),
411
+ "aria-label": `Remove ${S.label}`,
412
+ onClick: (L) => _(L, S.value),
412
413
  className: "ml-1 p-0.5 hover:bg-primary/20 rounded-full transition-colors",
413
414
  children: /* @__PURE__ */ u(Yr, { className: "w-3 h-3" })
414
415
  }
415
416
  )
416
417
  ]
417
418
  },
418
- C.value
419
+ S.value
419
420
  )) : /* @__PURE__ */ u("span", { className: "text-muted-foreground text-sm leading-tight", children: e.placeholder || "Select..." }),
420
421
  /* @__PURE__ */ D("div", { className: "ml-auto flex items-center gap-2", children: [
421
422
  h && /* @__PURE__ */ u(Oa, { className: "w-4 h-4 animate-spin text-muted-foreground" }),
@@ -439,7 +440,7 @@ function dl({
439
440
  type: "search",
440
441
  "aria-autocomplete": "list",
441
442
  "aria-controls": `${e.name}-listbox`,
442
- "aria-activedescendant": x >= 0 ? `${e.name}-opt-${x}` : void 0,
443
+ "aria-activedescendant": C >= 0 ? `${e.name}-opt-${C}` : void 0,
443
444
  value: E,
444
445
  onChange: P,
445
446
  onKeyDown: R,
@@ -455,10 +456,10 @@ function dl({
455
456
  role: "listbox",
456
457
  "aria-label": e.label,
457
458
  className: "max-h-60 overflow-y-auto p-1",
458
- children: m.length > 0 ? m.map((C, L) => {
459
+ children: m.length > 0 ? m.map((S, L) => {
459
460
  const U = q.some(
460
- (ce) => ce.value === C.value
461
- ), G = L === x;
461
+ (ce) => ce.value === S.value
462
+ ), G = L === C;
462
463
  return /* @__PURE__ */ D(
463
464
  "div",
464
465
  {
@@ -466,9 +467,9 @@ function dl({
466
467
  role: "option",
467
468
  tabIndex: -1,
468
469
  "aria-selected": U,
469
- onClick: () => N(C),
470
- onKeyDown: (ce) => ce.key === "Enter" && N(C),
471
- onMouseEnter: () => S(L),
470
+ onClick: () => N(S),
471
+ onKeyDown: (ce) => ce.key === "Enter" && N(S),
472
+ onMouseEnter: () => y(L),
472
473
  className: `
473
474
  px-3 py-2 text-sm rounded-md cursor-pointer flex items-center justify-between transition-colors outline-none
474
475
  ${G ? "bg-accent text-accent-foreground" : ""}
@@ -476,11 +477,11 @@ function dl({
476
477
  ${!G && !U ? "hover:bg-muted" : ""}
477
478
  `,
478
479
  children: [
479
- /* @__PURE__ */ u("span", { children: C.label }),
480
+ /* @__PURE__ */ u("span", { children: S.label }),
480
481
  U && /* @__PURE__ */ u(Cc, { className: "w-4 h-4 text-primary" })
481
482
  ]
482
483
  },
483
- C.value
484
+ S.value
484
485
  );
485
486
  }) : /* @__PURE__ */ u("output", { className: "block py-8 text-center text-sm text-muted-foreground", children: h ? "Searching..." : "No results found" })
486
487
  }
@@ -619,21 +620,21 @@ function _a(e) {
619
620
  t,
620
621
  { collectionRef: { current: null }, itemMap: /* @__PURE__ */ new Map() }
621
622
  ), s = (p) => {
622
- const { scope: v, children: E } = p, k = Te.useRef(null), x = Te.useRef(/* @__PURE__ */ new Map()).current;
623
- return /* @__PURE__ */ u(o, { scope: v, itemMap: x, collectionRef: k, children: E });
623
+ const { scope: v, children: E } = p, k = Te.useRef(null), C = Te.useRef(/* @__PURE__ */ new Map()).current;
624
+ return /* @__PURE__ */ u(o, { scope: v, itemMap: C, collectionRef: k, children: E });
624
625
  };
625
626
  s.displayName = t;
626
627
  const i = e + "CollectionSlot", c = /* @__PURE__ */ Ce(i), l = Te.forwardRef(
627
628
  (p, v) => {
628
- const { scope: E, children: k } = p, x = a(i, E), S = ie(v, x.collectionRef);
629
- return /* @__PURE__ */ u(c, { ref: S, children: k });
629
+ const { scope: E, children: k } = p, C = a(i, E), y = ie(v, C.collectionRef);
630
+ return /* @__PURE__ */ u(c, { ref: y, children: k });
630
631
  }
631
632
  );
632
633
  l.displayName = i;
633
634
  const d = e + "CollectionItemSlot", m = "data-radix-collection-item", g = /* @__PURE__ */ Ce(d), h = Te.forwardRef(
634
635
  (p, v) => {
635
- const { scope: E, children: k, ...x } = p, S = Te.useRef(null), A = ie(v, S), I = a(d, E);
636
- return Te.useEffect(() => (I.itemMap.set(S, { ref: S, ...x }), () => void I.itemMap.delete(S))), /* @__PURE__ */ u(g, { [m]: "", ref: A, children: k });
636
+ const { scope: E, children: k, ...C } = p, y = Te.useRef(null), A = ie(v, y), I = a(d, E);
637
+ return Te.useEffect(() => (I.itemMap.set(y, { ref: y, ...C }), () => void I.itemMap.delete(y))), /* @__PURE__ */ u(g, { [m]: "", ref: A, children: k });
637
638
  }
638
639
  );
639
640
  h.displayName = d;
@@ -642,9 +643,9 @@ function _a(e) {
642
643
  return Te.useCallback(() => {
643
644
  const k = v.collectionRef.current;
644
645
  if (!k) return [];
645
- const x = Array.from(k.querySelectorAll(`[${m}]`));
646
+ const C = Array.from(k.querySelectorAll(`[${m}]`));
646
647
  return Array.from(v.itemMap.values()).sort(
647
- (I, O) => x.indexOf(I.ref.current) - x.indexOf(O.ref.current)
648
+ (I, O) => C.indexOf(I.ref.current) - C.indexOf(O.ref.current)
648
649
  );
649
650
  }, [v.collectionRef, v.itemMap]);
650
651
  }
@@ -716,9 +717,9 @@ var Sl = "DismissableLayer", Pr = "dismissableLayer.update", Cl = "dismissableLa
716
717
  onInteractOutside: s,
717
718
  onDismiss: i,
718
719
  ...c
719
- } = e, l = f.useContext(Da), [d, m] = f.useState(null), g = d?.ownerDocument ?? globalThis?.document, [, h] = f.useState({}), w = ie(t, (O) => m(O)), p = Array.from(l.layers), [v] = [...l.layersWithOutsidePointerEventsDisabled].slice(-1), E = p.indexOf(v), k = d ? p.indexOf(d) : -1, x = l.layersWithOutsidePointerEventsDisabled.size > 0, S = k >= E, A = Nl((O) => {
720
+ } = e, l = f.useContext(Da), [d, m] = f.useState(null), g = d?.ownerDocument ?? globalThis?.document, [, h] = f.useState({}), w = ie(t, (O) => m(O)), p = Array.from(l.layers), [v] = [...l.layersWithOutsidePointerEventsDisabled].slice(-1), E = p.indexOf(v), k = d ? p.indexOf(d) : -1, C = l.layersWithOutsidePointerEventsDisabled.size > 0, y = k >= E, A = Nl((O) => {
720
721
  const T = O.target, z = [...l.branches].some((H) => H.contains(T));
721
- !S || z || (o?.(O), s?.(O), O.defaultPrevented || i?.());
722
+ !y || z || (o?.(O), s?.(O), O.defaultPrevented || i?.());
722
723
  }, g), I = Tl((O) => {
723
724
  const T = O.target;
724
725
  [...l.branches].some((H) => H.contains(T)) || (a?.(O), s?.(O), O.defaultPrevented || i?.());
@@ -741,7 +742,7 @@ var Sl = "DismissableLayer", Pr = "dismissableLayer.update", Cl = "dismissableLa
741
742
  ...c,
742
743
  ref: w,
743
744
  style: {
744
- pointerEvents: x ? S ? "auto" : "none" : void 0,
745
+ pointerEvents: C ? y ? "auto" : "none" : void 0,
745
746
  ...e.style
746
747
  },
747
748
  onFocusCapture: J(e.onFocusCapture, I.onFocusCapture),
@@ -873,17 +874,17 @@ var Pl = [
873
874
  }).current;
874
875
  f.useEffect(() => {
875
876
  if (r) {
876
- let p = function(x) {
877
+ let p = function(C) {
877
878
  if (h.paused || !i) return;
878
- const S = x.target;
879
- i.contains(S) ? m.current = S : Je(m.current, { select: !0 });
880
- }, v = function(x) {
879
+ const y = C.target;
880
+ i.contains(y) ? m.current = y : Je(m.current, { select: !0 });
881
+ }, v = function(C) {
881
882
  if (h.paused || !i) return;
882
- const S = x.relatedTarget;
883
- S !== null && (i.contains(S) || Je(m.current, { select: !0 }));
884
- }, E = function(x) {
883
+ const y = C.relatedTarget;
884
+ y !== null && (i.contains(y) || Je(m.current, { select: !0 }));
885
+ }, E = function(C) {
885
886
  if (document.activeElement === document.body)
886
- for (const A of x)
887
+ for (const A of C)
887
888
  A.removedNodes.length > 0 && Je(i);
888
889
  };
889
890
  document.addEventListener("focusin", p), document.addEventListener("focusout", v);
@@ -913,8 +914,8 @@ var Pl = [
913
914
  if (!n && !r || h.paused) return;
914
915
  const v = p.key === "Tab" && !p.altKey && !p.ctrlKey && !p.metaKey, E = document.activeElement;
915
916
  if (v && E) {
916
- const k = p.currentTarget, [x, S] = Ml(k);
917
- x && S ? !p.shiftKey && E === S ? (p.preventDefault(), n && Je(x, { select: !0 })) : p.shiftKey && E === x && (p.preventDefault(), n && Je(S, { select: !0 })) : E === k && p.preventDefault();
917
+ const k = p.currentTarget, [C, y] = Ml(k);
918
+ C && y ? !p.shiftKey && E === y ? (p.preventDefault(), n && Je(C, { select: !0 })) : p.shiftKey && E === C && (p.preventDefault(), n && Je(y, { select: !0 })) : E === k && p.preventDefault();
918
919
  }
919
920
  },
920
921
  [n, r, h.paused]
@@ -1167,8 +1168,8 @@ const Ql = async (e, t, n) => {
1167
1168
  fn: E
1168
1169
  } = i[p], {
1169
1170
  x: k,
1170
- y: x,
1171
- data: S,
1171
+ y: C,
1172
+ data: y,
1172
1173
  reset: A
1173
1174
  } = await E({
1174
1175
  x: d,
@@ -1184,11 +1185,11 @@ const Ql = async (e, t, n) => {
1184
1185
  floating: t
1185
1186
  }
1186
1187
  });
1187
- d = k ?? d, m = x ?? m, h = {
1188
+ d = k ?? d, m = C ?? m, h = {
1188
1189
  ...h,
1189
1190
  [v]: {
1190
1191
  ...h[v],
1191
- ...S
1192
+ ...y
1192
1193
  }
1193
1194
  }, A && w <= 50 && (w++, typeof A == "object" && (A.placement && (g = A.placement), A.rects && (l = A.rects === !0 ? await s.getElementRects({
1194
1195
  reference: e,
@@ -1233,7 +1234,7 @@ async function qt(e, t) {
1233
1234
  y: o,
1234
1235
  width: s.floating.width,
1235
1236
  height: s.floating.height
1236
- } : s.reference, x = await (a.getOffsetParent == null ? void 0 : a.getOffsetParent(i.floating)), S = await (a.isElement == null ? void 0 : a.isElement(x)) ? await (a.getScale == null ? void 0 : a.getScale(x)) || {
1237
+ } : s.reference, C = await (a.getOffsetParent == null ? void 0 : a.getOffsetParent(i.floating)), y = await (a.isElement == null ? void 0 : a.isElement(C)) ? await (a.getScale == null ? void 0 : a.getScale(C)) || {
1237
1238
  x: 1,
1238
1239
  y: 1
1239
1240
  } : {
@@ -1242,14 +1243,14 @@ async function qt(e, t) {
1242
1243
  }, A = An(a.convertOffsetParentRelativeRectToViewportRelativeRect ? await a.convertOffsetParentRelativeRectToViewportRelativeRect({
1243
1244
  elements: i,
1244
1245
  rect: k,
1245
- offsetParent: x,
1246
+ offsetParent: C,
1246
1247
  strategy: c
1247
1248
  }) : k);
1248
1249
  return {
1249
- top: (E.top - A.top + w.top) / S.y,
1250
- bottom: (A.bottom - E.bottom + w.bottom) / S.y,
1251
- left: (E.left - A.left + w.left) / S.x,
1252
- right: (A.right - E.right + w.right) / S.x
1250
+ top: (E.top - A.top + w.top) / y.y,
1251
+ bottom: (A.bottom - E.bottom + w.bottom) / y.y,
1252
+ left: (E.left - A.left + w.left) / y.x,
1253
+ right: (A.right - E.right + w.right) / y.x
1253
1254
  };
1254
1255
  }
1255
1256
  const Zl = (e) => ({
@@ -1273,10 +1274,10 @@ const Zl = (e) => ({
1273
1274
  const m = $a(d), g = {
1274
1275
  x: n,
1275
1276
  y: r
1276
- }, h = eo(o), w = Jr(h), p = await s.getDimensions(l), v = h === "y", E = v ? "top" : "left", k = v ? "bottom" : "right", x = v ? "clientHeight" : "clientWidth", S = a.reference[w] + a.reference[h] - g[h] - a.floating[w], A = g[h] - a.reference[h], I = await (s.getOffsetParent == null ? void 0 : s.getOffsetParent(l));
1277
- let O = I ? I[x] : 0;
1278
- (!O || !await (s.isElement == null ? void 0 : s.isElement(I))) && (O = i.floating[x] || a.floating[w]);
1279
- const T = S / 2 - A / 2, z = O / 2 - p[w] / 2 - 1, H = tt(m[E], z), V = tt(m[k], z), q = H, y = O - p[w] - V, N = O / 2 - p[w] / 2 + T, R = Rr(q, N, y), P = !c.arrow && Ot(o) != null && N !== R && a.reference[w] / 2 - (N < q ? H : V) - p[w] / 2 < 0, _ = P ? N < q ? N - q : N - y : 0;
1277
+ }, h = eo(o), w = Jr(h), p = await s.getDimensions(l), v = h === "y", E = v ? "top" : "left", k = v ? "bottom" : "right", C = v ? "clientHeight" : "clientWidth", y = a.reference[w] + a.reference[h] - g[h] - a.floating[w], A = g[h] - a.reference[h], I = await (s.getOffsetParent == null ? void 0 : s.getOffsetParent(l));
1278
+ let O = I ? I[C] : 0;
1279
+ (!O || !await (s.isElement == null ? void 0 : s.isElement(I))) && (O = i.floating[C] || a.floating[w]);
1280
+ const T = y / 2 - A / 2, z = O / 2 - p[w] / 2 - 1, H = tt(m[E], z), V = tt(m[k], z), q = H, x = O - p[w] - V, N = O / 2 - p[w] / 2 + T, R = Rr(q, N, x), P = !c.arrow && Ot(o) != null && N !== R && a.reference[w] / 2 - (N < q ? H : V) - p[w] / 2 < 0, _ = P ? N < q ? N - q : N - x : 0;
1280
1281
  return {
1281
1282
  [h]: g[h] + _,
1282
1283
  data: {
@@ -1313,12 +1314,12 @@ const Zl = (e) => ({
1313
1314
  } = Ke(e, t);
1314
1315
  if ((n = a.arrow) != null && n.alignmentOffset)
1315
1316
  return {};
1316
- const E = Xe(o), k = ze(i), x = Xe(i) === i, S = await (c.isRTL == null ? void 0 : c.isRTL(l.floating)), A = g || (x || !p ? [kn(i)] : Vl(i)), I = w !== "none";
1317
- !g && I && A.push(...Kl(i, p, w, S));
1317
+ const E = Xe(o), k = ze(i), C = Xe(i) === i, y = await (c.isRTL == null ? void 0 : c.isRTL(l.floating)), A = g || (C || !p ? [kn(i)] : Vl(i)), I = w !== "none";
1318
+ !g && I && A.push(...Kl(i, p, w, y));
1318
1319
  const O = [i, ...A], T = await qt(t, v), z = [];
1319
1320
  let H = ((r = a.flip) == null ? void 0 : r.overflows) || [];
1320
1321
  if (d && z.push(T[E]), m) {
1321
- const N = jl(o, s, S);
1322
+ const N = jl(o, s, y);
1322
1323
  z.push(T[N[0]], T[N[1]]);
1323
1324
  }
1324
1325
  if (H = [...H, {
@@ -1329,7 +1330,7 @@ const Zl = (e) => ({
1329
1330
  const N = (((V = a.flip) == null ? void 0 : V.index) || 0) + 1, R = O[N];
1330
1331
  if (R && (!(m === "alignment" ? k !== ze(R) : !1) || // We leave the current main axis only if every placement on that axis
1331
1332
  // overflows the main axis.
1332
- H.every((C) => ze(C.placement) === k ? C.overflows[0] > 0 : !0)))
1333
+ H.every((S) => ze(S.placement) === k ? S.overflows[0] > 0 : !0)))
1333
1334
  return {
1334
1335
  data: {
1335
1336
  index: N,
@@ -1339,20 +1340,20 @@ const Zl = (e) => ({
1339
1340
  placement: R
1340
1341
  }
1341
1342
  };
1342
- let P = (q = H.filter((_) => _.overflows[0] <= 0).sort((_, C) => _.overflows[1] - C.overflows[1])[0]) == null ? void 0 : q.placement;
1343
+ let P = (q = H.filter((_) => _.overflows[0] <= 0).sort((_, S) => _.overflows[1] - S.overflows[1])[0]) == null ? void 0 : q.placement;
1343
1344
  if (!P)
1344
1345
  switch (h) {
1345
1346
  case "bestFit": {
1346
- var y;
1347
- const _ = (y = H.filter((C) => {
1347
+ var x;
1348
+ const _ = (x = H.filter((S) => {
1348
1349
  if (I) {
1349
- const L = ze(C.placement);
1350
+ const L = ze(S.placement);
1350
1351
  return L === k || // Create a bias to the `y` side axis due to horizontal
1351
1352
  // reading directions favoring greater width.
1352
1353
  L === "y";
1353
1354
  }
1354
1355
  return !0;
1355
- }).map((C) => [C.placement, C.overflows.filter((L) => L > 0).reduce((L, U) => L + U, 0)]).sort((C, L) => C[1] - L[1])[0]) == null ? void 0 : y[0];
1356
+ }).map((S) => [S.placement, S.overflows.filter((L) => L > 0).reduce((L, U) => L + U, 0)]).sort((S, L) => S[1] - L[1])[0]) == null ? void 0 : x[0];
1356
1357
  _ && (P = _);
1357
1358
  break;
1358
1359
  }
@@ -1504,12 +1505,12 @@ const nu = function(e) {
1504
1505
  }, d = await qt(t, c), m = ze(Xe(o)), g = Zr(m);
1505
1506
  let h = l[g], w = l[m];
1506
1507
  if (a) {
1507
- const v = g === "y" ? "top" : "left", E = g === "y" ? "bottom" : "right", k = h + d[v], x = h - d[E];
1508
- h = Rr(k, h, x);
1508
+ const v = g === "y" ? "top" : "left", E = g === "y" ? "bottom" : "right", k = h + d[v], C = h - d[E];
1509
+ h = Rr(k, h, C);
1509
1510
  }
1510
1511
  if (s) {
1511
- const v = m === "y" ? "top" : "left", E = m === "y" ? "bottom" : "right", k = w + d[v], x = w - d[E];
1512
- w = Rr(k, w, x);
1512
+ const v = m === "y" ? "top" : "left", E = m === "y" ? "bottom" : "right", k = w + d[v], C = w - d[E];
1513
+ w = Rr(k, w, C);
1513
1514
  }
1514
1515
  const p = i.fn({
1515
1516
  ...t,
@@ -1557,12 +1558,12 @@ const nu = function(e) {
1557
1558
  ...p
1558
1559
  };
1559
1560
  if (c) {
1560
- const x = g === "y" ? "height" : "width", S = a.reference[g] - a.floating[x] + v.mainAxis, A = a.reference[g] + a.reference[x] - v.mainAxis;
1561
- h < S ? h = S : h > A && (h = A);
1561
+ const C = g === "y" ? "height" : "width", y = a.reference[g] - a.floating[C] + v.mainAxis, A = a.reference[g] + a.reference[C] - v.mainAxis;
1562
+ h < y ? h = y : h > A && (h = A);
1562
1563
  }
1563
1564
  if (l) {
1564
1565
  var E, k;
1565
- const x = g === "y" ? "width" : "height", S = Wa.has(Xe(o)), A = a.reference[m] - a.floating[x] + (S && ((E = s.offset) == null ? void 0 : E[m]) || 0) + (S ? 0 : v.crossAxis), I = a.reference[m] + a.reference[x] + (S ? 0 : ((k = s.offset) == null ? void 0 : k[m]) || 0) - (S ? v.crossAxis : 0);
1566
+ const C = g === "y" ? "width" : "height", y = Wa.has(Xe(o)), A = a.reference[m] - a.floating[C] + (y && ((E = s.offset) == null ? void 0 : E[m]) || 0) + (y ? 0 : v.crossAxis), I = a.reference[m] + a.reference[C] + (y ? 0 : ((k = s.offset) == null ? void 0 : k[m]) || 0) - (y ? v.crossAxis : 0);
1566
1567
  w < A ? w = A : w > I && (w = I);
1567
1568
  }
1568
1569
  return {
@@ -1592,11 +1593,11 @@ const nu = function(e) {
1592
1593
  } = a.floating;
1593
1594
  let v, E;
1594
1595
  m === "top" || m === "bottom" ? (v = m, E = g === (await (s.isRTL == null ? void 0 : s.isRTL(i.floating)) ? "start" : "end") ? "left" : "right") : (E = m, v = g === "end" ? "top" : "bottom");
1595
- const k = p - d.top - d.bottom, x = w - d.left - d.right, S = tt(p - d[v], k), A = tt(w - d[E], x), I = !t.middlewareData.shift;
1596
- let O = S, T = A;
1597
- if ((n = t.middlewareData.shift) != null && n.enabled.x && (T = x), (r = t.middlewareData.shift) != null && r.enabled.y && (O = k), I && !g) {
1598
- const H = Ee(d.left, 0), V = Ee(d.right, 0), q = Ee(d.top, 0), y = Ee(d.bottom, 0);
1599
- h ? T = w - 2 * (H !== 0 || V !== 0 ? H + V : Ee(d.left, d.right)) : O = p - 2 * (q !== 0 || y !== 0 ? q + y : Ee(d.top, d.bottom));
1596
+ const k = p - d.top - d.bottom, C = w - d.left - d.right, y = tt(p - d[v], k), A = tt(w - d[E], C), I = !t.middlewareData.shift;
1597
+ let O = y, T = A;
1598
+ if ((n = t.middlewareData.shift) != null && n.enabled.x && (T = C), (r = t.middlewareData.shift) != null && r.enabled.y && (O = k), I && !g) {
1599
+ const H = Ee(d.left, 0), V = Ee(d.right, 0), q = Ee(d.top, 0), x = Ee(d.bottom, 0);
1600
+ h ? T = w - 2 * (H !== 0 || V !== 0 ? H + V : Ee(d.left, d.right)) : O = p - 2 * (q !== 0 || x !== 0 ? q + x : Ee(d.top, d.bottom));
1600
1601
  }
1601
1602
  await c({
1602
1603
  ...t,
@@ -1776,8 +1777,8 @@ function ft(e, t, n, r) {
1776
1777
  const g = ke(a), h = r && Me(r) ? ke(r) : r;
1777
1778
  let w = g, p = _r(w);
1778
1779
  for (; p && r && h !== w; ) {
1779
- const v = At(p), E = p.getBoundingClientRect(), k = De(p), x = E.left + (p.clientLeft + parseFloat(k.paddingLeft)) * v.x, S = E.top + (p.clientTop + parseFloat(k.paddingTop)) * v.y;
1780
- c *= v.x, l *= v.y, d *= v.x, m *= v.y, c += x, l += S, w = ke(p), p = _r(w);
1780
+ const v = At(p), E = p.getBoundingClientRect(), k = De(p), C = E.left + (p.clientLeft + parseFloat(k.paddingLeft)) * v.x, y = E.top + (p.clientTop + parseFloat(k.paddingTop)) * v.y;
1781
+ c *= v.x, l *= v.y, d *= v.x, m *= v.y, c += C, l += y, w = ke(p), p = _r(w);
1781
1782
  }
1782
1783
  }
1783
1784
  return An({
@@ -2034,30 +2035,30 @@ function Ru(e, t) {
2034
2035
  } = l;
2035
2036
  if (i || t(), !g || !h)
2036
2037
  return;
2037
- const w = ln(m), p = ln(o.clientWidth - (d + g)), v = ln(o.clientHeight - (m + h)), E = ln(d), x = {
2038
+ const w = ln(m), p = ln(o.clientWidth - (d + g)), v = ln(o.clientHeight - (m + h)), E = ln(d), C = {
2038
2039
  rootMargin: -w + "px " + -p + "px " + -v + "px " + -E + "px",
2039
2040
  threshold: Ee(0, tt(1, c)) || 1
2040
2041
  };
2041
- let S = !0;
2042
+ let y = !0;
2042
2043
  function A(I) {
2043
2044
  const O = I[0].intersectionRatio;
2044
2045
  if (O !== c) {
2045
- if (!S)
2046
+ if (!y)
2046
2047
  return s();
2047
2048
  O ? s(!1, O) : r = setTimeout(() => {
2048
2049
  s(!1, 1e-7);
2049
2050
  }, 1e3);
2050
2051
  }
2051
- O === 1 && !Ya(l, e.getBoundingClientRect()) && s(), S = !1;
2052
+ O === 1 && !Ya(l, e.getBoundingClientRect()) && s(), y = !1;
2052
2053
  }
2053
2054
  try {
2054
2055
  n = new IntersectionObserver(A, {
2055
- ...x,
2056
+ ...C,
2056
2057
  // Handle <iframe>s
2057
2058
  root: o.ownerDocument
2058
2059
  });
2059
2060
  } catch {
2060
- n = new IntersectionObserver(A, x);
2061
+ n = new IntersectionObserver(A, C);
2061
2062
  }
2062
2063
  n.observe(e);
2063
2064
  }
@@ -2082,8 +2083,8 @@ function Ou(e, t, n, r) {
2082
2083
  s && (h = new ResizeObserver((E) => {
2083
2084
  let [k] = E;
2084
2085
  k && k.target === l && h && (h.unobserve(t), cancelAnimationFrame(g), g = requestAnimationFrame(() => {
2085
- var x;
2086
- (x = h) == null || x.observe(t);
2086
+ var C;
2087
+ (C = h) == null || C.observe(t);
2087
2088
  })), n();
2088
2089
  }), l && !c && h.observe(l), h.observe(t));
2089
2090
  let w, p = c ? ft(e) : null;
@@ -2180,19 +2181,19 @@ function Bu(e) {
2180
2181
  isPositioned: !1
2181
2182
  }), [g, h] = f.useState(r);
2182
2183
  Nn(g, r) || h(r);
2183
- const [w, p] = f.useState(null), [v, E] = f.useState(null), k = f.useCallback((C) => {
2184
- C !== I.current && (I.current = C, p(C));
2185
- }, []), x = f.useCallback((C) => {
2186
- C !== O.current && (O.current = C, E(C));
2187
- }, []), S = a || w, A = s || v, I = f.useRef(null), O = f.useRef(null), T = f.useRef(d), z = c != null, H = fr(c), V = fr(o), q = fr(l), y = f.useCallback(() => {
2184
+ const [w, p] = f.useState(null), [v, E] = f.useState(null), k = f.useCallback((S) => {
2185
+ S !== I.current && (I.current = S, p(S));
2186
+ }, []), C = f.useCallback((S) => {
2187
+ S !== O.current && (O.current = S, E(S));
2188
+ }, []), y = a || w, A = s || v, I = f.useRef(null), O = f.useRef(null), T = f.useRef(d), z = c != null, H = fr(c), V = fr(o), q = fr(l), x = f.useCallback(() => {
2188
2189
  if (!I.current || !O.current)
2189
2190
  return;
2190
- const C = {
2191
+ const S = {
2191
2192
  placement: t,
2192
2193
  strategy: n,
2193
2194
  middleware: g
2194
2195
  };
2195
- V.current && (C.platform = V.current), $u(I.current, O.current, C).then((L) => {
2196
+ V.current && (S.platform = V.current), $u(I.current, O.current, S).then((L) => {
2196
2197
  const U = {
2197
2198
  ...L,
2198
2199
  // The floating element's position may be recomputed while it's closed
@@ -2207,8 +2208,8 @@ function Bu(e) {
2207
2208
  });
2208
2209
  }, [g, t, n, V, q]);
2209
2210
  yn(() => {
2210
- l === !1 && T.current.isPositioned && (T.current.isPositioned = !1, m((C) => ({
2211
- ...C,
2211
+ l === !1 && T.current.isPositioned && (T.current.isPositioned = !1, m((S) => ({
2212
+ ...S,
2212
2213
  isPositioned: !1
2213
2214
  })));
2214
2215
  }, [l]);
@@ -2216,31 +2217,31 @@ function Bu(e) {
2216
2217
  yn(() => (N.current = !0, () => {
2217
2218
  N.current = !1;
2218
2219
  }), []), yn(() => {
2219
- if (S && (I.current = S), A && (O.current = A), S && A) {
2220
+ if (y && (I.current = y), A && (O.current = A), y && A) {
2220
2221
  if (H.current)
2221
- return H.current(S, A, y);
2222
- y();
2222
+ return H.current(y, A, x);
2223
+ x();
2223
2224
  }
2224
- }, [S, A, y, H, z]);
2225
+ }, [y, A, x, H, z]);
2225
2226
  const R = f.useMemo(() => ({
2226
2227
  reference: I,
2227
2228
  floating: O,
2228
2229
  setReference: k,
2229
- setFloating: x
2230
- }), [k, x]), P = f.useMemo(() => ({
2231
- reference: S,
2230
+ setFloating: C
2231
+ }), [k, C]), P = f.useMemo(() => ({
2232
+ reference: y,
2232
2233
  floating: A
2233
- }), [S, A]), _ = f.useMemo(() => {
2234
- const C = {
2234
+ }), [y, A]), _ = f.useMemo(() => {
2235
+ const S = {
2235
2236
  position: n,
2236
2237
  left: 0,
2237
2238
  top: 0
2238
2239
  };
2239
2240
  if (!P.floating)
2240
- return C;
2241
+ return S;
2241
2242
  const L = Qo(P.floating, d.x), U = Qo(P.floating, d.y);
2242
2243
  return i ? {
2243
- ...C,
2244
+ ...S,
2244
2245
  transform: "translate(" + L + "px, " + U + "px)",
2245
2246
  ...qa(P.floating) >= 1.5 && {
2246
2247
  willChange: "transform"
@@ -2253,11 +2254,11 @@ function Bu(e) {
2253
2254
  }, [n, i, P.floating, d.x, d.y]);
2254
2255
  return f.useMemo(() => ({
2255
2256
  ...d,
2256
- update: y,
2257
+ update: x,
2257
2258
  refs: R,
2258
2259
  elements: P,
2259
2260
  floatingStyles: _
2260
- }), [d, y, R, P, _]);
2261
+ }), [d, x, R, P, _]);
2261
2262
  }
2262
2263
  const Hu = (e) => {
2263
2264
  function t(n) {
@@ -2421,12 +2422,12 @@ var ao = "PopperContent", [nd, rd] = Za(ao), rs = f.forwardRef(
2421
2422
  updatePositionStrategy: h = "optimized",
2422
2423
  onPlaced: w,
2423
2424
  ...p
2424
- } = e, v = Ja(ao, n), [E, k] = f.useState(null), x = ie(t, (F) => k(F)), [S, A] = f.useState(null), I = Qa(S), O = I?.width ?? 0, T = I?.height ?? 0, z = r + (a !== "center" ? "-" + a : ""), H = typeof d == "number" ? d : { top: 0, right: 0, bottom: 0, left: 0, ...d }, V = Array.isArray(l) ? l : [l], q = V.length > 0, y = {
2425
+ } = e, v = Ja(ao, n), [E, k] = f.useState(null), C = ie(t, (F) => k(F)), [y, A] = f.useState(null), I = Qa(y), O = I?.width ?? 0, T = I?.height ?? 0, z = r + (a !== "center" ? "-" + a : ""), H = typeof d == "number" ? d : { top: 0, right: 0, bottom: 0, left: 0, ...d }, V = Array.isArray(l) ? l : [l], q = V.length > 0, x = {
2425
2426
  padding: H,
2426
2427
  boundary: V.filter(ad),
2427
2428
  // with `strategy: 'fixed'`, this is the only way to get it to respect boundaries
2428
2429
  altBoundary: q
2429
- }, { refs: N, floatingStyles: R, placement: P, isPositioned: _, middlewareData: C } = Bu({
2430
+ }, { refs: N, floatingStyles: R, placement: P, isPositioned: _, middlewareData: S } = Bu({
2430
2431
  // default to `fixed` strategy so users don't have to pick and we also avoid focus scroll issues
2431
2432
  strategy: "fixed",
2432
2433
  placement: z,
@@ -2442,25 +2443,25 @@ var ao = "PopperContent", [nd, rd] = Za(ao), rs = f.forwardRef(
2442
2443
  mainAxis: !0,
2443
2444
  crossAxis: !1,
2444
2445
  limiter: m === "partial" ? Vu() : void 0,
2445
- ...y
2446
+ ...x
2446
2447
  }),
2447
- c && Gu({ ...y }),
2448
+ c && Gu({ ...x }),
2448
2449
  Yu({
2449
- ...y,
2450
+ ...x,
2450
2451
  apply: ({ elements: F, rects: ee, availableWidth: le, availableHeight: Z }) => {
2451
2452
  const { width: te, height: re } = ee.reference, fe = F.floating.style;
2452
2453
  fe.setProperty("--radix-popper-available-width", `${le}px`), fe.setProperty("--radix-popper-available-height", `${Z}px`), fe.setProperty("--radix-popper-anchor-width", `${te}px`), fe.setProperty("--radix-popper-anchor-height", `${re}px`);
2453
2454
  }
2454
2455
  }),
2455
- S && Ku({ element: S, padding: i }),
2456
+ y && Ku({ element: y, padding: i }),
2456
2457
  sd({ arrowWidth: O, arrowHeight: T }),
2457
- g && qu({ strategy: "referenceHidden", ...y })
2458
+ g && qu({ strategy: "referenceHidden", ...x })
2458
2459
  ]
2459
2460
  }), [L, U] = ss(P), G = et(w);
2460
2461
  ve(() => {
2461
2462
  _ && G?.();
2462
2463
  }, [_, G]);
2463
- const ce = C.arrow?.x, Y = C.arrow?.y, oe = C.arrow?.centerOffset !== 0, [K, ge] = f.useState();
2464
+ const ce = S.arrow?.x, Y = S.arrow?.y, oe = S.arrow?.centerOffset !== 0, [K, ge] = f.useState();
2464
2465
  return ve(() => {
2465
2466
  E && ge(window.getComputedStyle(E).zIndex);
2466
2467
  }, [E]), /* @__PURE__ */ u(
@@ -2475,13 +2476,13 @@ var ao = "PopperContent", [nd, rd] = Za(ao), rs = f.forwardRef(
2475
2476
  minWidth: "max-content",
2476
2477
  zIndex: K,
2477
2478
  "--radix-popper-transform-origin": [
2478
- C.transformOrigin?.x,
2479
- C.transformOrigin?.y
2479
+ S.transformOrigin?.x,
2480
+ S.transformOrigin?.y
2480
2481
  ].join(" "),
2481
2482
  // hide the content if using the hide middleware and should be hidden
2482
2483
  // set visibility to hidden and disable pointer events so the UI behaves
2483
2484
  // as if the PopperContent isn't there at all
2484
- ...C.hide?.referenceHidden && {
2485
+ ...S.hide?.referenceHidden && {
2485
2486
  visibility: "hidden",
2486
2487
  pointerEvents: "none"
2487
2488
  }
@@ -2502,7 +2503,7 @@ var ao = "PopperContent", [nd, rd] = Za(ao), rs = f.forwardRef(
2502
2503
  "data-side": L,
2503
2504
  "data-align": U,
2504
2505
  ...p,
2505
- ref: x,
2506
+ ref: C,
2506
2507
  style: {
2507
2508
  ...p.style,
2508
2509
  // if the PopperContent hasn't been placed yet (not all measurements done)
@@ -2935,11 +2936,11 @@ var gs = Pd(), hr = function() {
2935
2936
  onScrollCapture: hr,
2936
2937
  onWheelCapture: hr,
2937
2938
  onTouchMoveCapture: hr
2938
- }), 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, h = e.noRelative, w = e.noIsolation, p = e.inert, v = e.allowPinchZoom, E = e.as, k = E === void 0 ? "div" : E, x = e.gapMode, S = ps(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noRelative", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]), A = g, I = Ad([n, t]), O = We(We({}, S), o);
2939
+ }), 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, h = e.noRelative, w = e.noIsolation, p = e.inert, v = e.allowPinchZoom, E = e.as, k = E === void 0 ? "div" : E, C = e.gapMode, y = ps(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noRelative", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]), A = g, I = Ad([n, t]), O = We(We({}, y), o);
2939
2940
  return f.createElement(
2940
2941
  f.Fragment,
2941
2942
  null,
2942
- d && f.createElement(A, { sideCar: gs, removeScrollBar: l, shards: m, noRelative: h, noIsolation: w, inert: p, setCallbacks: a, allowPinchZoom: !!v, lockRef: n, gapMode: x }),
2943
+ d && f.createElement(A, { sideCar: gs, removeScrollBar: l, shards: m, noRelative: h, noIsolation: w, inert: p, setCallbacks: a, allowPinchZoom: !!v, lockRef: n, gapMode: C }),
2943
2944
  s ? f.cloneElement(f.Children.only(i), We(We({}, O), { ref: I })) : f.createElement(k, We({}, O, { className: c, ref: I }), i)
2944
2945
  );
2945
2946
  });
@@ -3186,7 +3187,7 @@ function ef(e) {
3186
3187
  var i = f.useCallback(function(p, v) {
3187
3188
  if ("touches" in p && p.touches.length === 2 || p.type === "wheel" && p.ctrlKey)
3188
3189
  return !s.current.allowPinchZoom;
3189
- var E = mn(p), k = n.current, x = "deltaX" in p ? p.deltaX : k[0] - E[0], S = "deltaY" in p ? p.deltaY : k[1] - E[1], A, I = p.target, O = Math.abs(x) > Math.abs(S) ? "h" : "v";
3190
+ var E = mn(p), k = n.current, C = "deltaX" in p ? p.deltaX : k[0] - E[0], y = "deltaY" in p ? p.deltaY : k[1] - E[1], A, I = p.target, O = Math.abs(C) > Math.abs(y) ? "h" : "v";
3190
3191
  if ("touches" in p && O === "h" && I.type === "range")
3191
3192
  return !1;
3192
3193
  var T = ea(O, I);
@@ -3194,10 +3195,10 @@ function ef(e) {
3194
3195
  return !0;
3195
3196
  if (T ? A = O : (A = O === "v" ? "h" : "v", T = ea(O, I)), !T)
3196
3197
  return !1;
3197
- if (!r.current && "changedTouches" in p && (x || S) && (r.current = A), !A)
3198
+ if (!r.current && "changedTouches" in p && (C || y) && (r.current = A), !A)
3198
3199
  return !0;
3199
3200
  var z = r.current || A;
3200
- return Xd(z, v, p, z === "h" ? x : S);
3201
+ return Xd(z, v, p, z === "h" ? C : y);
3201
3202
  }, []), c = f.useCallback(function(p) {
3202
3203
  var v = p;
3203
3204
  if (!(!Ct.length || Ct[Ct.length - 1] !== a)) {
@@ -3209,17 +3210,17 @@ function ef(e) {
3209
3210
  return;
3210
3211
  }
3211
3212
  if (!k) {
3212
- var x = (s.current.shards || []).map(na).filter(Boolean).filter(function(A) {
3213
+ var C = (s.current.shards || []).map(na).filter(Boolean).filter(function(A) {
3213
3214
  return A.contains(v.target);
3214
- }), S = x.length > 0 ? i(v, x[0]) : !s.current.noIsolation;
3215
- S && v.cancelable && v.preventDefault();
3215
+ }), y = C.length > 0 ? i(v, C[0]) : !s.current.noIsolation;
3216
+ y && v.cancelable && v.preventDefault();
3216
3217
  }
3217
3218
  }
3218
3219
  }, []), l = f.useCallback(function(p, v, E, k) {
3219
- var x = { name: p, delta: v, target: E, should: k, shadowParent: tf(E) };
3220
- t.current.push(x), setTimeout(function() {
3221
- t.current = t.current.filter(function(S) {
3222
- return S !== x;
3220
+ var C = { name: p, delta: v, target: E, should: k, shadowParent: tf(E) };
3221
+ t.current.push(C), setTimeout(function() {
3222
+ t.current = t.current.filter(function(y) {
3223
+ return y !== C;
3223
3224
  });
3224
3225
  }, 1);
3225
3226
  }, []), d = f.useCallback(function(p) {
@@ -3277,7 +3278,7 @@ var rf = [" ", "Enter", "ArrowUp", "ArrowDown"], of = [" ", "Enter"], mt = "Sele
3277
3278
  disabled: g,
3278
3279
  required: h,
3279
3280
  form: w
3280
- } = e, p = Hn(t), [v, E] = f.useState(null), [k, x] = f.useState(null), [S, A] = f.useState(!1), I = Kr(l), [O, T] = Xt({
3281
+ } = e, p = Hn(t), [v, E] = f.useState(null), [k, C] = f.useState(null), [y, A] = f.useState(!1), I = Kr(l), [O, T] = Xt({
3281
3282
  prop: r,
3282
3283
  defaultProp: o ?? !1,
3283
3284
  onChange: a,
@@ -3287,7 +3288,7 @@ var rf = [" ", "Enter", "ArrowUp", "ArrowDown"], of = [" ", "Enter"], mt = "Sele
3287
3288
  defaultProp: i,
3288
3289
  onChange: c,
3289
3290
  caller: mt
3290
- }), V = f.useRef(null), q = v ? w || !!v.closest("form") : !0, [y, N] = f.useState(/* @__PURE__ */ new Set()), R = Array.from(y).map((P) => P.props.value).join(";");
3291
+ }), V = f.useRef(null), q = v ? w || !!v.closest("form") : !0, [x, N] = f.useState(/* @__PURE__ */ new Set()), R = Array.from(x).map((P) => P.props.value).join(";");
3291
3292
  return /* @__PURE__ */ u(is, { ...p, children: /* @__PURE__ */ D(
3292
3293
  sf,
3293
3294
  {
@@ -3296,8 +3297,8 @@ var rf = [" ", "Enter", "ArrowUp", "ArrowDown"], of = [" ", "Enter"], mt = "Sele
3296
3297
  trigger: v,
3297
3298
  onTriggerChange: E,
3298
3299
  valueNode: k,
3299
- onValueNodeChange: x,
3300
- valueNodeHasChildren: S,
3300
+ onValueNodeChange: C,
3301
+ valueNodeHasChildren: y,
3301
3302
  onValueNodeHasChildrenChange: A,
3302
3303
  contentId: Zt(),
3303
3304
  value: z,
@@ -3317,8 +3318,8 @@ var rf = [" ", "Enter", "ArrowUp", "ArrowDown"], of = [" ", "Enter"], mt = "Sele
3317
3318
  }, []),
3318
3319
  onNativeOptionRemove: f.useCallback((P) => {
3319
3320
  N((_) => {
3320
- const C = new Set(_);
3321
- return C.delete(P), C;
3321
+ const S = new Set(_);
3322
+ return S.delete(P), S;
3322
3323
  });
3323
3324
  }, []),
3324
3325
  children: n
@@ -3338,7 +3339,7 @@ var rf = [" ", "Enter", "ArrowUp", "ArrowDown"], of = [" ", "Enter"], mt = "Sele
3338
3339
  form: w,
3339
3340
  children: [
3340
3341
  z === void 0 ? /* @__PURE__ */ u("option", { value: "" }) : null,
3341
- Array.from(y)
3342
+ Array.from(x)
3342
3343
  ]
3343
3344
  },
3344
3345
  R
@@ -3351,7 +3352,7 @@ xs.displayName = mt;
3351
3352
  var Ss = "SelectTrigger", Cs = f.forwardRef(
3352
3353
  (e, t) => {
3353
3354
  const { __scopeSelect: n, disabled: r = !1, ...o } = e, a = Hn(n), s = ot(Ss, n), i = s.disabled || r, c = ie(t, s.onTriggerChange), l = Bn(n), d = f.useRef("touch"), [m, g, h] = Ys((p) => {
3354
- const v = l().filter((x) => !x.disabled), E = v.find((x) => x.value === s.value), k = qs(v, p, E);
3355
+ const v = l().filter((C) => !C.disabled), E = v.find((C) => C.value === s.value), k = qs(v, p, E);
3355
3356
  k !== void 0 && s.onValueChange(k.value);
3356
3357
  }), w = (p) => {
3357
3358
  i || (s.onOpenChange(!0), h()), p && (s.triggerPointerDownPosRef.current = {
@@ -3456,12 +3457,12 @@ var Oe = 10, [Ps, at] = Mt(pt), ff = "SelectContentImpl", mf = /* @__PURE__ */ C
3456
3457
  avoidCollisions: v,
3457
3458
  //
3458
3459
  ...E
3459
- } = e, k = ot(pt, n), [x, S] = f.useState(null), [A, I] = f.useState(null), O = ie(t, (F) => S(F)), [T, z] = f.useState(null), [H, V] = f.useState(
3460
+ } = e, k = ot(pt, n), [C, y] = f.useState(null), [A, I] = f.useState(null), O = ie(t, (F) => y(F)), [T, z] = f.useState(null), [H, V] = f.useState(
3460
3461
  null
3461
- ), q = Bn(n), [y, N] = f.useState(!1), R = f.useRef(!1);
3462
+ ), q = Bn(n), [x, N] = f.useState(!1), R = f.useRef(!1);
3462
3463
  f.useEffect(() => {
3463
- if (x) return ms(x);
3464
- }, [x]), La();
3464
+ if (C) return ms(C);
3465
+ }, [C]), La();
3465
3466
  const P = f.useCallback(
3466
3467
  (F) => {
3467
3468
  const [ee, ...le] = q().map((re) => re.ref.current), [Z] = le.slice(-1), te = document.activeElement;
@@ -3470,15 +3471,15 @@ var Oe = 10, [Ps, at] = Mt(pt), ff = "SelectContentImpl", mf = /* @__PURE__ */ C
3470
3471
  },
3471
3472
  [q, A]
3472
3473
  ), _ = f.useCallback(
3473
- () => P([T, x]),
3474
- [P, T, x]
3474
+ () => P([T, C]),
3475
+ [P, T, C]
3475
3476
  );
3476
3477
  f.useEffect(() => {
3477
- y && _();
3478
- }, [y, _]);
3479
- const { onOpenChange: C, triggerPointerDownPosRef: L } = k;
3478
+ x && _();
3479
+ }, [x, _]);
3480
+ const { onOpenChange: S, triggerPointerDownPosRef: L } = k;
3480
3481
  f.useEffect(() => {
3481
- if (x) {
3482
+ if (C) {
3482
3483
  let F = { x: 0, y: 0 };
3483
3484
  const ee = (Z) => {
3484
3485
  F = {
@@ -3486,18 +3487,18 @@ var Oe = 10, [Ps, at] = Mt(pt), ff = "SelectContentImpl", mf = /* @__PURE__ */ C
3486
3487
  y: Math.abs(Math.round(Z.pageY) - (L.current?.y ?? 0))
3487
3488
  };
3488
3489
  }, le = (Z) => {
3489
- F.x <= 10 && F.y <= 10 ? Z.preventDefault() : x.contains(Z.target) || C(!1), document.removeEventListener("pointermove", ee), L.current = null;
3490
+ F.x <= 10 && F.y <= 10 ? Z.preventDefault() : C.contains(Z.target) || S(!1), document.removeEventListener("pointermove", ee), L.current = null;
3490
3491
  };
3491
3492
  return L.current !== null && (document.addEventListener("pointermove", ee), document.addEventListener("pointerup", le, { capture: !0, once: !0 })), () => {
3492
3493
  document.removeEventListener("pointermove", ee), document.removeEventListener("pointerup", le, { capture: !0 });
3493
3494
  };
3494
3495
  }
3495
- }, [x, C, L]), f.useEffect(() => {
3496
- const F = () => C(!1);
3496
+ }, [C, S, L]), f.useEffect(() => {
3497
+ const F = () => S(!1);
3497
3498
  return window.addEventListener("blur", F), window.addEventListener("resize", F), () => {
3498
3499
  window.removeEventListener("blur", F), window.removeEventListener("resize", F);
3499
3500
  };
3500
- }, [C]);
3501
+ }, [S]);
3501
3502
  const [U, G] = Ys((F) => {
3502
3503
  const ee = q().filter((te) => !te.disabled), le = ee.find((te) => te.ref.current === document.activeElement), Z = qs(ee, F, le);
3503
3504
  Z && setTimeout(() => Z.ref.current.focus());
@@ -3507,7 +3508,7 @@ var Oe = 10, [Ps, at] = Mt(pt), ff = "SelectContentImpl", mf = /* @__PURE__ */ C
3507
3508
  (k.value !== void 0 && k.value === ee || Z) && (z(F), Z && (R.current = !0));
3508
3509
  },
3509
3510
  [k.value]
3510
- ), Y = f.useCallback(() => x?.focus(), [x]), oe = f.useCallback(
3511
+ ), Y = f.useCallback(() => C?.focus(), [C]), oe = f.useCallback(
3511
3512
  (F, ee, le) => {
3512
3513
  const Z = !R.current && !le;
3513
3514
  (k.value !== void 0 && k.value === ee || Z) && V(F);
@@ -3529,7 +3530,7 @@ var Oe = 10, [Ps, at] = Mt(pt), ff = "SelectContentImpl", mf = /* @__PURE__ */ C
3529
3530
  Ps,
3530
3531
  {
3531
3532
  scope: n,
3532
- content: x,
3533
+ content: C,
3533
3534
  viewport: A,
3534
3535
  onViewportChange: I,
3535
3536
  itemRefCallback: ce,
@@ -3539,7 +3540,7 @@ var Oe = 10, [Ps, at] = Mt(pt), ff = "SelectContentImpl", mf = /* @__PURE__ */ C
3539
3540
  focusSelectedItem: _,
3540
3541
  selectedItemText: H,
3541
3542
  position: r,
3542
- isPositioned: y,
3543
+ isPositioned: x,
3543
3544
  searchRef: U,
3544
3545
  children: /* @__PURE__ */ u(co, { as: mf, allowPinchZoom: !0, children: /* @__PURE__ */ u(
3545
3546
  Qr,
@@ -3604,7 +3605,7 @@ var Oe = 10, [Ps, at] = Mt(pt), ff = "SelectContentImpl", mf = /* @__PURE__ */ C
3604
3605
  );
3605
3606
  Rs.displayName = ff;
3606
3607
  var pf = "SelectItemAlignedPosition", Os = f.forwardRef((e, t) => {
3607
- 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, (O) => d(O)), g = Bn(n), h = f.useRef(!1), w = f.useRef(!0), { viewport: p, selectedItem: v, selectedItemText: E, focusSelectedItem: k } = s, x = f.useCallback(() => {
3608
+ 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, (O) => d(O)), g = Bn(n), h = f.useRef(!1), w = f.useRef(!0), { viewport: p, selectedItem: v, selectedItemText: E, focusSelectedItem: k } = s, C = f.useCallback(() => {
3608
3609
  if (a.trigger && a.valueNode && i && l && p && v && E) {
3609
3610
  const O = a.trigger.getBoundingClientRect(), T = l.getBoundingClientRect(), z = a.valueNode.getBoundingClientRect(), H = E.getBoundingClientRect();
3610
3611
  if (a.dir !== "rtl") {
@@ -3625,7 +3626,7 @@ var pf = "SelectItemAlignedPosition", Os = f.forwardRef((e, t) => {
3625
3626
  ]);
3626
3627
  i.style.minWidth = Ne + "px", i.style.right = ct + "px";
3627
3628
  }
3628
- const V = g(), q = window.innerHeight - Oe * 2, y = p.scrollHeight, N = window.getComputedStyle(l), R = parseInt(N.borderTopWidth, 10), P = parseInt(N.paddingTop, 10), _ = parseInt(N.borderBottomWidth, 10), C = parseInt(N.paddingBottom, 10), L = R + P + y + C + _, U = Math.min(v.offsetHeight * 5, L), G = window.getComputedStyle(p), ce = parseInt(G.paddingTop, 10), Y = parseInt(G.paddingBottom, 10), oe = O.top + O.height / 2 - Oe, K = q - oe, ge = v.offsetHeight / 2, F = v.offsetTop + ge, ee = R + P + F, le = L - ee;
3629
+ const V = g(), q = window.innerHeight - Oe * 2, x = p.scrollHeight, N = window.getComputedStyle(l), R = parseInt(N.borderTopWidth, 10), P = parseInt(N.paddingTop, 10), _ = parseInt(N.borderBottomWidth, 10), S = parseInt(N.paddingBottom, 10), L = R + P + x + S + _, U = Math.min(v.offsetHeight * 5, L), G = window.getComputedStyle(p), ce = parseInt(G.paddingTop, 10), Y = parseInt(G.paddingBottom, 10), oe = O.top + O.height / 2 - Oe, K = q - oe, ge = v.offsetHeight / 2, F = v.offsetTop + ge, ee = R + P + F, le = L - ee;
3629
3630
  if (ee <= oe) {
3630
3631
  const te = V.length > 0 && v === V[V.length - 1].ref.current;
3631
3632
  i.style.bottom = "0px";
@@ -3659,16 +3660,16 @@ var pf = "SelectItemAlignedPosition", Os = f.forwardRef((e, t) => {
3659
3660
  a.dir,
3660
3661
  r
3661
3662
  ]);
3662
- ve(() => x(), [x]);
3663
- const [S, A] = f.useState();
3663
+ ve(() => C(), [C]);
3664
+ const [y, A] = f.useState();
3664
3665
  ve(() => {
3665
3666
  l && A(window.getComputedStyle(l).zIndex);
3666
3667
  }, [l]);
3667
3668
  const I = f.useCallback(
3668
3669
  (O) => {
3669
- O && w.current === !0 && (x(), k?.(), w.current = !1);
3670
+ O && w.current === !0 && (C(), k?.(), w.current = !1);
3670
3671
  },
3671
- [x, k]
3672
+ [C, k]
3672
3673
  );
3673
3674
  return /* @__PURE__ */ u(
3674
3675
  gf,
@@ -3685,7 +3686,7 @@ var pf = "SelectItemAlignedPosition", Os = f.forwardRef((e, t) => {
3685
3686
  display: "flex",
3686
3687
  flexDirection: "column",
3687
3688
  position: "fixed",
3688
- zIndex: S
3689
+ zIndex: y
3689
3690
  },
3690
3691
  children: /* @__PURE__ */ u(
3691
3692
  Ae.div,
@@ -3777,8 +3778,8 @@ var [gf, lo] = Mt(pt, {}), Ir = "SelectViewport", _s = f.forwardRef(
3777
3778
  if (h > 0) {
3778
3779
  const w = window.innerHeight - Oe * 2, p = parseFloat(m.style.minHeight), v = parseFloat(m.style.height), E = Math.max(p, v);
3779
3780
  if (E < w) {
3780
- const k = E + h, x = Math.min(w, k), S = k - x;
3781
- m.style.height = x + "px", m.style.bottom === "0px" && (d.scrollTop = S > 0 ? S : 0, m.style.justifyContent = "flex-end");
3781
+ const k = E + h, C = Math.min(w, k), y = k - C;
3782
+ m.style.height = C + "px", m.style.bottom === "0px" && (d.scrollTop = y > 0 ? y : 0, m.style.justifyContent = "flex-end");
3782
3783
  }
3783
3784
  }
3784
3785
  }
@@ -3831,7 +3832,7 @@ var Tn = "SelectItem", [yf, Fs] = Mt(Tn), $s = f.forwardRef(
3831
3832
  textId: p,
3832
3833
  isSelected: l,
3833
3834
  onItemTextChange: f.useCallback((k) => {
3834
- m((x) => x || (k?.textContent ?? "").trim());
3835
+ m((C) => C || (k?.textContent ?? "").trim());
3835
3836
  }, []),
3836
3837
  children: /* @__PURE__ */ u(
3837
3838
  zn.ItemSlot,
@@ -4050,7 +4051,7 @@ function Ef(e, t) {
4050
4051
  }
4051
4052
  var kf = xs, Af = Cs, Nf = ks, Tf = As, Pf = Ns, Rf = Ts, Of = _s, _f = Ds, Mf = Ls, Df = $s, If = Ws, Lf = Bs, Ff = Us, ra = js;
4052
4053
  function $f({ field: e, formValues: t, handleChange: n, handleBlur: r, error: o, apiClient: a }) {
4053
- const s = t[e.name] || "", i = typeof e.disabled == "function" ? e.disabled(t) : e.disabled, [c, l] = ue(e.options || []), [d, m] = ue(!1);
4054
+ const s = t[e.name] || "", i = typeof e.disabled == "function" ? e.disabled(t) : e.disabled, [c, l] = ue(e.options || []), [d, m] = ue(!1), g = typeof e.refresh == "function" ? e.refresh(t) : e.refresh;
4054
4055
  return He(() => {
4055
4056
  (async () => {
4056
4057
  if (!e.optionsUrl || !a) {
@@ -4059,18 +4060,18 @@ function $f({ field: e, formValues: t, handleChange: n, handleBlur: r, error: o,
4059
4060
  }
4060
4061
  m(!0);
4061
4062
  try {
4062
- let h = e.optionsUrl, w = {};
4063
+ let w = e.optionsUrl, p = {};
4063
4064
  if (e.queryParams) {
4064
- const x = typeof e.queryParams == "function" ? e.queryParams(t) : e.queryParams;
4065
- typeof x == "string" ? h += x.startsWith("?") ? x : `?${x}` : w = { params: x };
4065
+ const y = typeof e.queryParams == "function" ? e.queryParams(t) : e.queryParams;
4066
+ typeof y == "string" ? w += y.startsWith("?") ? y : `?${y}` : p = { params: y };
4066
4067
  }
4067
- const p = await a(h, w), v = p.data || p, k = (Array.isArray(v) ? v : []).map((x) => ({
4068
- value: x[e.valueId || "key"] || x.key,
4069
- label: x[e.labelId || "value"] || x.value
4068
+ const v = await a(w, p), E = v.data || v, C = (Array.isArray(E) ? E : []).map((y) => ({
4069
+ value: y[e.valueId || "key"] || y.key,
4070
+ label: y[e.labelId || "value"] || y.value
4070
4071
  }));
4071
- l(k), e.name + "_count" in t && n(e.name + "_count", k.length);
4072
- } catch (h) {
4073
- console.error("Failed to load options for SelectField:", h), l(e.options || []);
4072
+ l(C), e.name + "_count" in t && n(e.name + "_count", C.length);
4073
+ } catch (w) {
4074
+ console.error("Failed to load options for SelectField:", w), l(e.options || []);
4074
4075
  } finally {
4075
4076
  m(!1);
4076
4077
  }
@@ -4081,6 +4082,7 @@ function $f({ field: e, formValues: t, handleChange: n, handleBlur: r, error: o,
4081
4082
  a,
4082
4083
  e.valueId,
4083
4084
  e.labelId,
4085
+ JSON.stringify(g),
4084
4086
  // Instead of depending directly on field.queryParams (which triggers nothing when formValues change),
4085
4087
  // stringify the evaluated params so it refetches ONLY when the inputs of the API call change.
4086
4088
  JSON.stringify(typeof e.queryParams == "function" ? e.queryParams(t) : e.queryParams)
@@ -4088,7 +4090,7 @@ function $f({ field: e, formValues: t, handleChange: n, handleBlur: r, error: o,
4088
4090
  kf,
4089
4091
  {
4090
4092
  value: s,
4091
- onValueChange: (g) => n(e.name, g),
4093
+ onValueChange: (h) => n(e.name, h),
4092
4094
  disabled: i,
4093
4095
  children: [
4094
4096
  /* @__PURE__ */ D(
@@ -4121,17 +4123,17 @@ function $f({ field: e, formValues: t, handleChange: n, handleBlur: r, error: o,
4121
4123
  /* @__PURE__ */ u(Lf, { className: "flex items-center justify-center h-6 text-gray-500 bg-gray-50", children: /* @__PURE__ */ u(ra, { className: "fill-white stroke-gray-200" }) }),
4122
4124
  /* @__PURE__ */ D(Of, { className: "p-1", children: [
4123
4125
  e.groupLabel && /* @__PURE__ */ u(_f, { children: /* @__PURE__ */ u(Mf, { className: "px-2 py-1 text-xs text-gray-500 uppercase tracking-wide", children: e.groupLabel }) }),
4124
- c.map((g) => /* @__PURE__ */ u(
4126
+ c.map((h) => /* @__PURE__ */ u(
4125
4127
  Df,
4126
4128
  {
4127
- value: g.value,
4129
+ value: h.value,
4128
4130
  className: `relative flex items-center px-3 py-2 text-sm rounded cursor-pointer select-none
4129
4131
  data-[state=checked]:bg-blue-50
4130
4132
  data-[state=checked]:text-blue-600
4131
4133
  `,
4132
- children: /* @__PURE__ */ u(If, { children: g.label })
4134
+ children: /* @__PURE__ */ u(If, { children: h.label })
4133
4135
  },
4134
- g.value
4136
+ h.value
4135
4137
  )),
4136
4138
  e.separator && /* @__PURE__ */ u(Ff, { className: "my-1 h-px bg-gray-200" })
4137
4139
  ] }),
@@ -4430,12 +4432,12 @@ function Zs() {
4430
4432
  HTMLFormElement: m,
4431
4433
  DOMParser: g,
4432
4434
  trustedTypes: h
4433
- } = e, w = c.prototype, p = Bt(w, "cloneNode"), v = Bt(w, "remove"), E = Bt(w, "nextSibling"), k = Bt(w, "childNodes"), x = Bt(w, "parentNode");
4435
+ } = e, w = c.prototype, p = Bt(w, "cloneNode"), v = Bt(w, "remove"), E = Bt(w, "nextSibling"), k = Bt(w, "childNodes"), C = Bt(w, "parentNode");
4434
4436
  if (typeof s == "function") {
4435
4437
  const j = n.createElement("template");
4436
4438
  j.content && j.content.ownerDocument && (n = j.content.ownerDocument);
4437
4439
  }
4438
- let S, A = "";
4440
+ let y, A = "";
4439
4441
  const {
4440
4442
  implementation: I,
4441
4443
  createNodeIterator: O,
@@ -4445,15 +4447,15 @@ function Zs() {
4445
4447
  importNode: H
4446
4448
  } = r;
4447
4449
  let V = fa();
4448
- t.isSupported = typeof Ks == "function" && typeof x == "function" && I && I.createHTMLDocument !== void 0;
4450
+ t.isSupported = typeof Ks == "function" && typeof C == "function" && I && I.createHTMLDocument !== void 0;
4449
4451
  const {
4450
4452
  MUSTACHE_EXPR: q,
4451
- ERB_EXPR: y,
4453
+ ERB_EXPR: x,
4452
4454
  TMPLIT_EXPR: N,
4453
4455
  DATA_ATTR: R,
4454
4456
  ARIA_ATTR: P,
4455
4457
  IS_SCRIPT_OR_DATA: _,
4456
- ATTR_WHITESPACE: C,
4458
+ ATTR_WHITESPACE: S,
4457
4459
  CUSTOM_ELEMENT: L
4458
4460
  } = da;
4459
4461
  let {
@@ -4522,13 +4524,13 @@ function Zs() {
4522
4524
  throw zt('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
4523
4525
  if (typeof b.TRUSTED_TYPES_POLICY.createScriptURL != "function")
4524
4526
  throw zt('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');
4525
- S = b.TRUSTED_TYPES_POLICY, A = S.createHTML("");
4527
+ y = b.TRUSTED_TYPES_POLICY, A = y.createHTML("");
4526
4528
  } else
4527
- S === void 0 && (S = im(h, o)), S !== null && typeof A == "string" && (A = S.createHTML(""));
4529
+ y === void 0 && (y = im(h, o)), y !== null && typeof A == "string" && (A = y.createHTML(""));
4528
4530
  we && we(b), yt = b;
4529
4531
  }
4530
4532
  }, wo = Q({}, [...yr, ...wr, ...Xf]), xo = Q({}, [...xr, ...Qf]), tc = function(b) {
4531
- let M = x(b);
4533
+ let M = C(b);
4532
4534
  (!M || !M.tagName) && (M = {
4533
4535
  namespaceURI: vt,
4534
4536
  tagName: "template"
@@ -4540,7 +4542,7 @@ function Zs() {
4540
4542
  element: b
4541
4543
  });
4542
4544
  try {
4543
- x(b).removeChild(b);
4545
+ C(b).removeChild(b);
4544
4546
  } catch {
4545
4547
  v(b);
4546
4548
  }
@@ -4576,7 +4578,7 @@ function Zs() {
4576
4578
  B = de && de[0];
4577
4579
  }
4578
4580
  Ft === "application/xhtml+xml" && vt === Ve && (b = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + b + "</body></html>");
4579
- const se = S ? S.createHTML(b) : b;
4581
+ const se = y ? y.createHTML(b) : b;
4580
4582
  if (vt === Ve)
4581
4583
  try {
4582
4584
  M = new g().parseFromString(se, Ft);
@@ -4623,7 +4625,7 @@ function Zs() {
4623
4625
  if (!ge[B] && No(B) && (K.tagNameCheck instanceof RegExp && ye(K.tagNameCheck, B) || K.tagNameCheck instanceof Function && K.tagNameCheck(B)))
4624
4626
  return !1;
4625
4627
  if (Zn && !Le[B]) {
4626
- const se = x(b) || b.parentNode, be = k(b) || b.childNodes;
4628
+ const se = C(b) || b.parentNode, be = k(b) || b.childNodes;
4627
4629
  if (be && se) {
4628
4630
  const de = be.length;
4629
4631
  for (let Se = de - 1; Se >= 0; --Se) {
@@ -4634,7 +4636,7 @@ function Zs() {
4634
4636
  }
4635
4637
  return Fe(b), !0;
4636
4638
  }
4637
- return b instanceof c && !tc(b) || (B === "noscript" || B === "noembed" || B === "noframes") && ye(/<\/no(script|embed|frames)/i, b.innerHTML) ? (Fe(b), !0) : (fe && b.nodeType === Ht.text && (M = b.textContent, pn([q, y, N], (se) => {
4639
+ return b instanceof c && !tc(b) || (B === "noscript" || B === "noembed" || B === "noframes") && ye(/<\/no(script|embed|frames)/i, b.innerHTML) ? (Fe(b), !0) : (fe && b.nodeType === Ht.text && (M = b.textContent, pn([q, x, N], (se) => {
4638
4640
  M = Wt(M, se, " ");
4639
4641
  }), b.textContent !== M && ($t(t.removed, {
4640
4642
  element: b.cloneNode()
@@ -4655,9 +4657,9 @@ function Zs() {
4655
4657
  M === "is" && K.allowCustomizedBuiltInElements && (K.tagNameCheck instanceof RegExp && ye(K.tagNameCheck, B) || K.tagNameCheck instanceof Function && K.tagNameCheck(B)))
4656
4658
  ) return !1;
4657
4659
  } else if (!er[M]) {
4658
- if (!ye(U, Wt(B, C, ""))) {
4660
+ if (!ye(U, Wt(B, S, ""))) {
4659
4661
  if (!((M === "src" || M === "xlink:href" || M === "href") && b !== "script" && Gf(B, "data:") === 0 && go[b])) {
4660
- if (!(te && !ye(_, Wt(B, C, "")))) {
4662
+ if (!(te && !ye(_, Wt(B, S, "")))) {
4661
4663
  if (B)
4662
4664
  return !1;
4663
4665
  }
@@ -4710,7 +4712,7 @@ function Zs() {
4710
4712
  lt(de, b);
4711
4713
  continue;
4712
4714
  }
4713
- fe && pn([q, y, N], (Ro) => {
4715
+ fe && pn([q, x, N], (Ro) => {
4714
4716
  he = Wt(he, Ro, " ");
4715
4717
  });
4716
4718
  const Po = me(b.nodeName);
@@ -4718,14 +4720,14 @@ function Zs() {
4718
4720
  lt(de, b);
4719
4721
  continue;
4720
4722
  }
4721
- if (S && typeof h == "object" && typeof h.getAttributeType == "function" && !Se)
4723
+ if (y && typeof h == "object" && typeof h.getAttributeType == "function" && !Se)
4722
4724
  switch (h.getAttributeType(Po, wt)) {
4723
4725
  case "TrustedHTML": {
4724
- he = S.createHTML(he);
4726
+ he = y.createHTML(he);
4725
4727
  break;
4726
4728
  }
4727
4729
  case "TrustedScriptURL": {
4728
- he = S.createScriptURL(he);
4730
+ he = y.createScriptURL(he);
4729
4731
  break;
4730
4732
  }
4731
4733
  }
@@ -4765,7 +4767,7 @@ function Zs() {
4765
4767
  else {
4766
4768
  if (!gt && !fe && !Re && // eslint-disable-next-line unicorn/prefer-includes
4767
4769
  j.indexOf("<") === -1)
4768
- return S && rn ? S.createHTML(j) : j;
4770
+ return y && rn ? y.createHTML(j) : j;
4769
4771
  if (M = So(j), !M)
4770
4772
  return gt ? null : rn ? A : "";
4771
4773
  }
@@ -4785,9 +4787,9 @@ function Zs() {
4785
4787
  }
4786
4788
  let Se = Re ? M.outerHTML : M.innerHTML;
4787
4789
  return Re && G["!doctype"] && M.ownerDocument && M.ownerDocument.doctype && M.ownerDocument.doctype.name && ye(Qs, M.ownerDocument.doctype.name) && (Se = "<!DOCTYPE " + M.ownerDocument.doctype.name + `>
4788
- ` + Se), fe && pn([q, y, N], (Ye) => {
4790
+ ` + Se), fe && pn([q, x, N], (Ye) => {
4789
4791
  Se = Wt(Se, Ye, " ");
4790
- }), S && rn ? S.createHTML(Se) : Se;
4792
+ }), y && rn ? y.createHTML(Se) : Se;
4791
4793
  }, t.setConfig = function() {
4792
4794
  let j = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
4793
4795
  rr(j), it = !0;
@@ -5062,8 +5064,8 @@ function dm({
5062
5064
  disabled:cursor-not-allowed disabled:opacity-50
5063
5065
  `;
5064
5066
  if (w.length > 0) {
5065
- const k = Array.isArray(t[e.name]) ? t[e.name] : [], x = (S, A) => {
5066
- let I = A ? [...k, S] : k.filter((O) => O !== S);
5067
+ const k = Array.isArray(t[e.name]) ? t[e.name] : [], C = (y, A) => {
5068
+ let I = A ? [...k, y] : k.filter((O) => O !== y);
5067
5069
  n(e.name, I), r(e.name);
5068
5070
  };
5069
5071
  return /* @__PURE__ */ D(
@@ -5078,8 +5080,8 @@ function dm({
5078
5080
  "div",
5079
5081
  {
5080
5082
  className: p ? "flex flex-wrap gap-x-6 gap-y-3" : "space-y-4",
5081
- children: w.map((S) => {
5082
- const A = typeof S == "object" ? S.value : S, I = typeof S == "object" ? S.label : S, O = typeof S == "object" ? S.description : null, T = `${e.name}-${A}`, z = k.includes(A);
5083
+ children: w.map((y) => {
5084
+ const A = typeof y == "object" ? y.value : y, I = typeof y == "object" ? y.label : y, O = typeof y == "object" ? y.description : null, T = `${e.name}-${A}`, z = k.includes(A);
5083
5085
  return /* @__PURE__ */ D(
5084
5086
  "div",
5085
5087
  {
@@ -5093,7 +5095,7 @@ function dm({
5093
5095
  type: "checkbox",
5094
5096
  id: T,
5095
5097
  checked: z,
5096
- onChange: (H) => x(A, H.target.checked),
5098
+ onChange: (H) => C(A, H.target.checked),
5097
5099
  onBlur: () => r(e.name),
5098
5100
  disabled: h,
5099
5101
  className: `${E} ${!h && "cursor-pointer hover:border-primary/50"} ${o ? "border-destructive ring-destructive/20" : "border-input"}`
@@ -6967,14 +6969,14 @@ const Lp = (e, t) => {
6967
6969
  }
6968
6970
  v = !1;
6969
6971
  }
6970
- const k = g.length === 0 ? "" : g.length === 1 ? g[0] : a(g).join(":"), x = h ? k + Ur : k, S = x + E;
6971
- if (s.indexOf(S) > -1)
6972
+ const k = g.length === 0 ? "" : g.length === 1 ? g[0] : a(g).join(":"), C = h ? k + Ur : k, y = C + E;
6973
+ if (s.indexOf(y) > -1)
6972
6974
  continue;
6973
- s.push(S);
6975
+ s.push(y);
6974
6976
  const A = o(E, v);
6975
6977
  for (let I = 0; I < A.length; ++I) {
6976
6978
  const O = A[I];
6977
- s.push(x + O);
6979
+ s.push(C + O);
6978
6980
  }
6979
6981
  c = d + (c.length > 0 ? " " + c : c);
6980
6982
  }
@@ -7019,7 +7021,7 @@ const Lp = (e, t) => {
7019
7021
  const r = xi.exec(e);
7020
7022
  return r ? r[1] ? t(r[1]) : n : !1;
7021
7023
  }, Ci = (e) => e === "position" || e === "percentage", Ei = (e) => e === "image" || e === "url", ki = (e) => e === "length" || e === "size" || e === "bg-size", Ai = (e) => e === "length", wh = (e) => e === "number", xh = (e) => e === "family-name", Ni = (e) => e === "shadow", Sh = () => {
7022
- const e = pe("color"), t = pe("font"), n = pe("text"), r = pe("font-weight"), o = pe("tracking"), a = pe("leading"), s = pe("breakpoint"), i = pe("container"), c = pe("spacing"), l = pe("radius"), d = pe("shadow"), m = pe("inset-shadow"), g = pe("text-shadow"), h = pe("drop-shadow"), w = pe("blur"), p = pe("perspective"), v = pe("aspect"), E = pe("ease"), k = pe("animate"), x = () => ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"], S = () => [
7024
+ const e = pe("color"), t = pe("font"), n = pe("text"), r = pe("font-weight"), o = pe("tracking"), a = pe("leading"), s = pe("breakpoint"), i = pe("container"), c = pe("spacing"), l = pe("radius"), d = pe("shadow"), m = pe("inset-shadow"), g = pe("text-shadow"), h = pe("drop-shadow"), w = pe("blur"), p = pe("perspective"), v = pe("aspect"), E = pe("ease"), k = pe("animate"), C = () => ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"], y = () => [
7023
7025
  "center",
7024
7026
  "top",
7025
7027
  "bottom",
@@ -7037,9 +7039,9 @@ const Lp = (e, t) => {
7037
7039
  "bottom-left",
7038
7040
  // Deprecated since Tailwind CSS v4.1.0, see https://github.com/tailwindlabs/tailwindcss/pull/17378
7039
7041
  "left-bottom"
7040
- ], A = () => [...S(), W, $], I = () => ["auto", "hidden", "clip", "visible", "scroll"], O = () => ["auto", "contain", "none"], T = () => [W, $, c], z = () => [kt, "full", "auto", ...T()], H = () => [Ze, "none", "subgrid", W, $], V = () => ["auto", {
7042
+ ], A = () => [...y(), W, $], I = () => ["auto", "hidden", "clip", "visible", "scroll"], O = () => ["auto", "contain", "none"], T = () => [W, $, c], z = () => [kt, "full", "auto", ...T()], H = () => [Ze, "none", "subgrid", W, $], V = () => ["auto", {
7041
7043
  span: ["full", Ze, W, $]
7042
- }, Ze, W, $], q = () => [Ze, "auto", W, $], y = () => ["auto", "min", "max", "fr", W, $], N = () => ["start", "end", "center", "between", "around", "evenly", "stretch", "baseline", "center-safe", "end-safe"], R = () => ["start", "end", "center", "stretch", "center-safe", "end-safe"], P = () => ["auto", ...T()], _ = () => [kt, "auto", "full", "dvw", "dvh", "lvw", "lvh", "svw", "svh", "min", "max", "fit", ...T()], C = () => [e, W, $], L = () => [...S(), Ea, Ca, {
7044
+ }, Ze, W, $], q = () => [Ze, "auto", W, $], x = () => ["auto", "min", "max", "fr", W, $], N = () => ["start", "end", "center", "between", "around", "evenly", "stretch", "baseline", "center-safe", "end-safe"], R = () => ["start", "end", "center", "stretch", "center-safe", "end-safe"], P = () => ["auto", ...T()], _ = () => [kt, "auto", "full", "dvw", "dvh", "lvw", "lvh", "svw", "svh", "min", "max", "fit", ...T()], S = () => [e, W, $], L = () => [...y(), Ea, Ca, {
7043
7045
  position: [W, $]
7044
7046
  }], U = () => ["no-repeat", {
7045
7047
  repeat: ["", "x", "y", "space", "round"]
@@ -7113,14 +7115,14 @@ const Lp = (e, t) => {
7113
7115
  * @see https://tailwindcss.com/docs/break-after
7114
7116
  */
7115
7117
  "break-after": [{
7116
- "break-after": x()
7118
+ "break-after": C()
7117
7119
  }],
7118
7120
  /**
7119
7121
  * Break Before
7120
7122
  * @see https://tailwindcss.com/docs/break-before
7121
7123
  */
7122
7124
  "break-before": [{
7123
- "break-before": x()
7125
+ "break-before": C()
7124
7126
  }],
7125
7127
  /**
7126
7128
  * Break Inside
@@ -7428,14 +7430,14 @@ const Lp = (e, t) => {
7428
7430
  * @see https://tailwindcss.com/docs/grid-auto-columns
7429
7431
  */
7430
7432
  "auto-cols": [{
7431
- "auto-cols": y()
7433
+ "auto-cols": x()
7432
7434
  }],
7433
7435
  /**
7434
7436
  * Grid Auto Rows
7435
7437
  * @see https://tailwindcss.com/docs/grid-auto-rows
7436
7438
  */
7437
7439
  "auto-rows": [{
7438
- "auto-rows": y()
7440
+ "auto-rows": x()
7439
7441
  }],
7440
7442
  /**
7441
7443
  * Gap
@@ -7875,14 +7877,14 @@ const Lp = (e, t) => {
7875
7877
  * @see https://v3.tailwindcss.com/docs/placeholder-color
7876
7878
  */
7877
7879
  "placeholder-color": [{
7878
- placeholder: C()
7880
+ placeholder: S()
7879
7881
  }],
7880
7882
  /**
7881
7883
  * Text Color
7882
7884
  * @see https://tailwindcss.com/docs/text-color
7883
7885
  */
7884
7886
  "text-color": [{
7885
- text: C()
7887
+ text: S()
7886
7888
  }],
7887
7889
  /**
7888
7890
  * Text Decoration
@@ -7908,7 +7910,7 @@ const Lp = (e, t) => {
7908
7910
  * @see https://tailwindcss.com/docs/text-decoration-color
7909
7911
  */
7910
7912
  "text-decoration-color": [{
7911
- decoration: C()
7913
+ decoration: S()
7912
7914
  }],
7913
7915
  /**
7914
7916
  * Text Underline Offset
@@ -8046,7 +8048,7 @@ const Lp = (e, t) => {
8046
8048
  * @see https://tailwindcss.com/docs/background-color
8047
8049
  */
8048
8050
  "bg-color": [{
8049
- bg: C()
8051
+ bg: S()
8050
8052
  }],
8051
8053
  /**
8052
8054
  * Gradient Color Stops From Position
@@ -8074,21 +8076,21 @@ const Lp = (e, t) => {
8074
8076
  * @see https://tailwindcss.com/docs/gradient-color-stops
8075
8077
  */
8076
8078
  "gradient-from": [{
8077
- from: C()
8079
+ from: S()
8078
8080
  }],
8079
8081
  /**
8080
8082
  * Gradient Color Stops Via
8081
8083
  * @see https://tailwindcss.com/docs/gradient-color-stops
8082
8084
  */
8083
8085
  "gradient-via": [{
8084
- via: C()
8086
+ via: S()
8085
8087
  }],
8086
8088
  /**
8087
8089
  * Gradient Color Stops To
8088
8090
  * @see https://tailwindcss.com/docs/gradient-color-stops
8089
8091
  */
8090
8092
  "gradient-to": [{
8091
- to: C()
8093
+ to: S()
8092
8094
  }],
8093
8095
  // ---------------
8094
8096
  // --- Borders ---
@@ -8304,70 +8306,70 @@ const Lp = (e, t) => {
8304
8306
  * @see https://tailwindcss.com/docs/border-color
8305
8307
  */
8306
8308
  "border-color": [{
8307
- border: C()
8309
+ border: S()
8308
8310
  }],
8309
8311
  /**
8310
8312
  * Border Color X
8311
8313
  * @see https://tailwindcss.com/docs/border-color
8312
8314
  */
8313
8315
  "border-color-x": [{
8314
- "border-x": C()
8316
+ "border-x": S()
8315
8317
  }],
8316
8318
  /**
8317
8319
  * Border Color Y
8318
8320
  * @see https://tailwindcss.com/docs/border-color
8319
8321
  */
8320
8322
  "border-color-y": [{
8321
- "border-y": C()
8323
+ "border-y": S()
8322
8324
  }],
8323
8325
  /**
8324
8326
  * Border Color S
8325
8327
  * @see https://tailwindcss.com/docs/border-color
8326
8328
  */
8327
8329
  "border-color-s": [{
8328
- "border-s": C()
8330
+ "border-s": S()
8329
8331
  }],
8330
8332
  /**
8331
8333
  * Border Color E
8332
8334
  * @see https://tailwindcss.com/docs/border-color
8333
8335
  */
8334
8336
  "border-color-e": [{
8335
- "border-e": C()
8337
+ "border-e": S()
8336
8338
  }],
8337
8339
  /**
8338
8340
  * Border Color Top
8339
8341
  * @see https://tailwindcss.com/docs/border-color
8340
8342
  */
8341
8343
  "border-color-t": [{
8342
- "border-t": C()
8344
+ "border-t": S()
8343
8345
  }],
8344
8346
  /**
8345
8347
  * Border Color Right
8346
8348
  * @see https://tailwindcss.com/docs/border-color
8347
8349
  */
8348
8350
  "border-color-r": [{
8349
- "border-r": C()
8351
+ "border-r": S()
8350
8352
  }],
8351
8353
  /**
8352
8354
  * Border Color Bottom
8353
8355
  * @see https://tailwindcss.com/docs/border-color
8354
8356
  */
8355
8357
  "border-color-b": [{
8356
- "border-b": C()
8358
+ "border-b": S()
8357
8359
  }],
8358
8360
  /**
8359
8361
  * Border Color Left
8360
8362
  * @see https://tailwindcss.com/docs/border-color
8361
8363
  */
8362
8364
  "border-color-l": [{
8363
- "border-l": C()
8365
+ "border-l": S()
8364
8366
  }],
8365
8367
  /**
8366
8368
  * Divide Color
8367
8369
  * @see https://tailwindcss.com/docs/divide-color
8368
8370
  */
8369
8371
  "divide-color": [{
8370
- divide: C()
8372
+ divide: S()
8371
8373
  }],
8372
8374
  /**
8373
8375
  * Outline Style
@@ -8395,7 +8397,7 @@ const Lp = (e, t) => {
8395
8397
  * @see https://tailwindcss.com/docs/outline-color
8396
8398
  */
8397
8399
  "outline-color": [{
8398
- outline: C()
8400
+ outline: S()
8399
8401
  }],
8400
8402
  // ---------------
8401
8403
  // --- Effects ---
@@ -8419,7 +8421,7 @@ const Lp = (e, t) => {
8419
8421
  * @see https://tailwindcss.com/docs/box-shadow#setting-the-shadow-color
8420
8422
  */
8421
8423
  "shadow-color": [{
8422
- shadow: C()
8424
+ shadow: S()
8423
8425
  }],
8424
8426
  /**
8425
8427
  * Inset Box Shadow
@@ -8433,7 +8435,7 @@ const Lp = (e, t) => {
8433
8435
  * @see https://tailwindcss.com/docs/box-shadow#setting-the-inset-shadow-color
8434
8436
  */
8435
8437
  "inset-shadow-color": [{
8436
- "inset-shadow": C()
8438
+ "inset-shadow": S()
8437
8439
  }],
8438
8440
  /**
8439
8441
  * Ring Width
@@ -8454,7 +8456,7 @@ const Lp = (e, t) => {
8454
8456
  * @see https://tailwindcss.com/docs/box-shadow#setting-the-ring-color
8455
8457
  */
8456
8458
  "ring-color": [{
8457
- ring: C()
8459
+ ring: S()
8458
8460
  }],
8459
8461
  /**
8460
8462
  * Ring Offset Width
@@ -8472,7 +8474,7 @@ const Lp = (e, t) => {
8472
8474
  * @see https://github.com/tailwindlabs/tailwindcss/blob/v4.0.0/packages/tailwindcss/src/utilities.ts#L4158
8473
8475
  */
8474
8476
  "ring-offset-color": [{
8475
- "ring-offset": C()
8477
+ "ring-offset": S()
8476
8478
  }],
8477
8479
  /**
8478
8480
  * Inset Ring Width
@@ -8486,7 +8488,7 @@ const Lp = (e, t) => {
8486
8488
  * @see https://tailwindcss.com/docs/box-shadow#setting-the-inset-ring-color
8487
8489
  */
8488
8490
  "inset-ring-color": [{
8489
- "inset-ring": C()
8491
+ "inset-ring": S()
8490
8492
  }],
8491
8493
  /**
8492
8494
  * Text Shadow
@@ -8500,7 +8502,7 @@ const Lp = (e, t) => {
8500
8502
  * @see https://tailwindcss.com/docs/text-shadow#setting-the-shadow-color
8501
8503
  */
8502
8504
  "text-shadow-color": [{
8503
- "text-shadow": C()
8505
+ "text-shadow": S()
8504
8506
  }],
8505
8507
  /**
8506
8508
  * Opacity
@@ -8551,10 +8553,10 @@ const Lp = (e, t) => {
8551
8553
  "mask-linear-to": F()
8552
8554
  }],
8553
8555
  "mask-image-linear-from-color": [{
8554
- "mask-linear-from": C()
8556
+ "mask-linear-from": S()
8555
8557
  }],
8556
8558
  "mask-image-linear-to-color": [{
8557
- "mask-linear-to": C()
8559
+ "mask-linear-to": S()
8558
8560
  }],
8559
8561
  "mask-image-t-from-pos": [{
8560
8562
  "mask-t-from": F()
@@ -8563,10 +8565,10 @@ const Lp = (e, t) => {
8563
8565
  "mask-t-to": F()
8564
8566
  }],
8565
8567
  "mask-image-t-from-color": [{
8566
- "mask-t-from": C()
8568
+ "mask-t-from": S()
8567
8569
  }],
8568
8570
  "mask-image-t-to-color": [{
8569
- "mask-t-to": C()
8571
+ "mask-t-to": S()
8570
8572
  }],
8571
8573
  "mask-image-r-from-pos": [{
8572
8574
  "mask-r-from": F()
@@ -8575,10 +8577,10 @@ const Lp = (e, t) => {
8575
8577
  "mask-r-to": F()
8576
8578
  }],
8577
8579
  "mask-image-r-from-color": [{
8578
- "mask-r-from": C()
8580
+ "mask-r-from": S()
8579
8581
  }],
8580
8582
  "mask-image-r-to-color": [{
8581
- "mask-r-to": C()
8583
+ "mask-r-to": S()
8582
8584
  }],
8583
8585
  "mask-image-b-from-pos": [{
8584
8586
  "mask-b-from": F()
@@ -8587,10 +8589,10 @@ const Lp = (e, t) => {
8587
8589
  "mask-b-to": F()
8588
8590
  }],
8589
8591
  "mask-image-b-from-color": [{
8590
- "mask-b-from": C()
8592
+ "mask-b-from": S()
8591
8593
  }],
8592
8594
  "mask-image-b-to-color": [{
8593
- "mask-b-to": C()
8595
+ "mask-b-to": S()
8594
8596
  }],
8595
8597
  "mask-image-l-from-pos": [{
8596
8598
  "mask-l-from": F()
@@ -8599,10 +8601,10 @@ const Lp = (e, t) => {
8599
8601
  "mask-l-to": F()
8600
8602
  }],
8601
8603
  "mask-image-l-from-color": [{
8602
- "mask-l-from": C()
8604
+ "mask-l-from": S()
8603
8605
  }],
8604
8606
  "mask-image-l-to-color": [{
8605
- "mask-l-to": C()
8607
+ "mask-l-to": S()
8606
8608
  }],
8607
8609
  "mask-image-x-from-pos": [{
8608
8610
  "mask-x-from": F()
@@ -8611,10 +8613,10 @@ const Lp = (e, t) => {
8611
8613
  "mask-x-to": F()
8612
8614
  }],
8613
8615
  "mask-image-x-from-color": [{
8614
- "mask-x-from": C()
8616
+ "mask-x-from": S()
8615
8617
  }],
8616
8618
  "mask-image-x-to-color": [{
8617
- "mask-x-to": C()
8619
+ "mask-x-to": S()
8618
8620
  }],
8619
8621
  "mask-image-y-from-pos": [{
8620
8622
  "mask-y-from": F()
@@ -8623,10 +8625,10 @@ const Lp = (e, t) => {
8623
8625
  "mask-y-to": F()
8624
8626
  }],
8625
8627
  "mask-image-y-from-color": [{
8626
- "mask-y-from": C()
8628
+ "mask-y-from": S()
8627
8629
  }],
8628
8630
  "mask-image-y-to-color": [{
8629
- "mask-y-to": C()
8631
+ "mask-y-to": S()
8630
8632
  }],
8631
8633
  "mask-image-radial": [{
8632
8634
  "mask-radial": [W, $]
@@ -8638,10 +8640,10 @@ const Lp = (e, t) => {
8638
8640
  "mask-radial-to": F()
8639
8641
  }],
8640
8642
  "mask-image-radial-from-color": [{
8641
- "mask-radial-from": C()
8643
+ "mask-radial-from": S()
8642
8644
  }],
8643
8645
  "mask-image-radial-to-color": [{
8644
- "mask-radial-to": C()
8646
+ "mask-radial-to": S()
8645
8647
  }],
8646
8648
  "mask-image-radial-shape": [{
8647
8649
  "mask-radial": ["circle", "ellipse"]
@@ -8653,7 +8655,7 @@ const Lp = (e, t) => {
8653
8655
  }]
8654
8656
  }],
8655
8657
  "mask-image-radial-pos": [{
8656
- "mask-radial-at": S()
8658
+ "mask-radial-at": y()
8657
8659
  }],
8658
8660
  "mask-image-conic-pos": [{
8659
8661
  "mask-conic": [X]
@@ -8665,10 +8667,10 @@ const Lp = (e, t) => {
8665
8667
  "mask-conic-to": F()
8666
8668
  }],
8667
8669
  "mask-image-conic-from-color": [{
8668
- "mask-conic-from": C()
8670
+ "mask-conic-from": S()
8669
8671
  }],
8670
8672
  "mask-image-conic-to-color": [{
8671
- "mask-conic-to": C()
8673
+ "mask-conic-to": S()
8672
8674
  }],
8673
8675
  /**
8674
8676
  * Mask Mode
@@ -8775,7 +8777,7 @@ const Lp = (e, t) => {
8775
8777
  * @see https://tailwindcss.com/docs/filter-drop-shadow#setting-the-shadow-color
8776
8778
  */
8777
8779
  "drop-shadow-color": [{
8778
- "drop-shadow": C()
8780
+ "drop-shadow": S()
8779
8781
  }],
8780
8782
  /**
8781
8783
  * Grayscale
@@ -9146,7 +9148,7 @@ const Lp = (e, t) => {
9146
9148
  * @see https://tailwindcss.com/docs/accent-color
9147
9149
  */
9148
9150
  accent: [{
9149
- accent: C()
9151
+ accent: S()
9150
9152
  }],
9151
9153
  /**
9152
9154
  * Appearance
@@ -9160,7 +9162,7 @@ const Lp = (e, t) => {
9160
9162
  * @see https://tailwindcss.com/docs/just-in-time-mode#caret-color-utilities
9161
9163
  */
9162
9164
  "caret-color": [{
9163
- caret: C()
9165
+ caret: S()
9164
9166
  }],
9165
9167
  /**
9166
9168
  * Color Scheme
@@ -9406,7 +9408,7 @@ const Lp = (e, t) => {
9406
9408
  * @see https://tailwindcss.com/docs/fill
9407
9409
  */
9408
9410
  fill: [{
9409
- fill: ["none", ...C()]
9411
+ fill: ["none", ...S()]
9410
9412
  }],
9411
9413
  /**
9412
9414
  * Stroke Width
@@ -9420,7 +9422,7 @@ const Lp = (e, t) => {
9420
9422
  * @see https://tailwindcss.com/docs/stroke
9421
9423
  */
9422
9424
  stroke: [{
9423
- stroke: ["none", ...C()]
9425
+ stroke: ["none", ...S()]
9424
9426
  }],
9425
9427
  // ---------------------
9426
9428
  // --- Accessibility ---
@@ -9656,13 +9658,13 @@ function ka({
9656
9658
  !v && e.uploadEndpoint && console.error(
9657
9659
  `api_URL prop is required when using FileField with upload functionality for field "${e.name}"`
9658
9660
  );
9659
- const E = (y) => {
9660
- if (y === 0) return "0 Bytes";
9661
- const N = 1024, R = ["Bytes", "KB", "MB", "GB"], P = Math.floor(Math.log(y) / Math.log(N));
9662
- return `${parseFloat((y / N ** P).toFixed(2))} ${R[P]}`;
9663
- }, k = async (y) => {
9661
+ const E = (x) => {
9662
+ if (x === 0) return "0 Bytes";
9663
+ const N = 1024, R = ["Bytes", "KB", "MB", "GB"], P = Math.floor(Math.log(x) / Math.log(N));
9664
+ return `${parseFloat((x / N ** P).toFixed(2))} ${R[P]}`;
9665
+ }, k = async (x) => {
9664
9666
  const N = new FormData();
9665
- N.append("file", y);
9667
+ N.append("file", x);
9666
9668
  const R = await fetch(`${v}`, {
9667
9669
  method: "POST",
9668
9670
  body: N
@@ -9670,48 +9672,48 @@ function ka({
9670
9672
  if (!R.ok)
9671
9673
  throw Cn.error("Upload failed"), new Error("Upload failed");
9672
9674
  return await R.json();
9673
- }, x = async (y, N) => {
9675
+ }, C = async (x, N) => {
9674
9676
  if (!N) return;
9675
- if (y.maxSize && N.size > y.maxSize)
9677
+ if (x.maxSize && N.size > x.maxSize)
9676
9678
  throw new Error(
9677
- `File size must not exceed ${E(y.maxSize)}`
9679
+ `File size must not exceed ${E(x.maxSize)}`
9678
9680
  );
9679
- const R = await k(N), P = { ...t, [y.name]: R };
9680
- a(y.name, R), s(P);
9681
- }, S = async (y, N) => {
9682
- const R = t[y.name] || [];
9683
- if (y.maxFiles && R.length + N.length > y.maxFiles)
9684
- throw new Error(`Maximum ${y.maxFiles} files allowed`);
9685
- N.forEach((C) => {
9686
- if (y.maxSize && C.size > y.maxSize)
9681
+ const R = await k(N), P = { ...t, [x.name]: R };
9682
+ a(x.name, R), s(P);
9683
+ }, y = async (x, N) => {
9684
+ const R = t[x.name] || [];
9685
+ if (x.maxFiles && R.length + N.length > x.maxFiles)
9686
+ throw new Error(`Maximum ${x.maxFiles} files allowed`);
9687
+ N.forEach((S) => {
9688
+ if (x.maxSize && S.size > x.maxSize)
9687
9689
  throw new Error(
9688
- `Each file must not exceed ${E(y.maxSize)}`
9690
+ `Each file must not exceed ${E(x.maxSize)}`
9689
9691
  );
9690
9692
  });
9691
9693
  const P = await Promise.all(
9692
- N.map((C) => k(C))
9694
+ N.map((S) => k(S))
9693
9695
  // Updated call
9694
9696
  ), _ = [...R, ...P];
9695
- a(y.name, _), s({ ...t, [y.name]: _ });
9696
- }, A = async (y, N) => {
9697
+ a(x.name, _), s({ ...t, [x.name]: _ });
9698
+ }, A = async (x, N) => {
9697
9699
  if (l) return;
9698
9700
  const R = Array.from(N);
9699
9701
  try {
9700
- e.type === "multifile" ? await S(e, R) : await x(e, R[0]), o.current?.[y] && (o.current[y].value = "");
9702
+ e.type === "multifile" ? await y(e, R) : await C(e, R[0]), o.current?.[x] && (o.current[x].value = "");
9701
9703
  } catch (P) {
9702
9704
  Cn.error(`Upload failed: ${P.message}`);
9703
9705
  }
9704
- }, I = async (y, N) => {
9706
+ }, I = async (x, N) => {
9705
9707
  if (l) return;
9706
9708
  let R;
9707
- e.type === "file" ? R = "" : R = (t[y] || []).filter((_) => _ !== N), a(y, R), s({ ...t, [y]: R }), o.current?.[y] && (o.current[y].value = "");
9708
- }, O = (y) => {
9709
- y.preventDefault(), l || p(!0);
9710
- }, T = (y) => {
9711
- y.preventDefault(), l || p(!1);
9712
- }, z = (y) => {
9713
- y.preventDefault(), p(!1), !l && y.dataTransfer.files && y.dataTransfer.files.length > 0 && A(e.name, y.dataTransfer.files);
9714
- }, H = e.accept ? e.accept.split(",").map((y) => y.split("/")[1] || y.split(".")[1] || y).join(", ").toUpperCase() : "PNG, JPG, PDF", V = e.maxSize ? `, up to ${E(e.maxSize)}` : "", q = `
9709
+ e.type === "file" ? R = "" : R = (t[x] || []).filter((_) => _ !== N), a(x, R), s({ ...t, [x]: R }), o.current?.[x] && (o.current[x].value = "");
9710
+ }, O = (x) => {
9711
+ x.preventDefault(), l || p(!0);
9712
+ }, T = (x) => {
9713
+ x.preventDefault(), l || p(!1);
9714
+ }, z = (x) => {
9715
+ x.preventDefault(), p(!1), !l && x.dataTransfer.files && x.dataTransfer.files.length > 0 && A(e.name, x.dataTransfer.files);
9716
+ }, H = e.accept ? e.accept.split(",").map((x) => x.split("/")[1] || x.split(".")[1] || x).join(", ").toUpperCase() : "PNG, JPG, PDF", V = e.maxSize ? `, up to ${E(e.maxSize)}` : "", q = `
9715
9717
  w-full flex flex-col items-center justify-center p-6 border-2 border-dashed rounded-lg transition-all duration-200
9716
9718
  // Ensure focus styling is handled correctly for the button element
9717
9719
  focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-opacity-50
@@ -9761,20 +9763,20 @@ function ka({
9761
9763
  /* @__PURE__ */ u(
9762
9764
  "input",
9763
9765
  {
9764
- ref: (y) => {
9765
- y && o && o.current && (o.current[e.name] = y);
9766
+ ref: (x) => {
9767
+ x && o && o.current && (o.current[e.name] = x);
9766
9768
  },
9767
9769
  id: e.name,
9768
9770
  type: "file",
9769
9771
  accept: e.accept,
9770
9772
  multiple: d,
9771
9773
  className: "sr-only",
9772
- onChange: (y) => A(e.name, y.target.files),
9774
+ onChange: (x) => A(e.name, x.target.files),
9773
9775
  disabled: l
9774
9776
  }
9775
9777
  ),
9776
- h.length > 0 && /* @__PURE__ */ u("div", { className: "space-y-2 pt-2 border-t border-gray-200", children: h.map((y, N) => {
9777
- const R = y.original_name || y.name || "File", P = y.size || null;
9778
+ h.length > 0 && /* @__PURE__ */ u("div", { className: "space-y-2 pt-2 border-t border-gray-200", children: h.map((x, N) => {
9779
+ const R = x.original_name || x.name || "File", P = x.size || null;
9778
9780
  return /* @__PURE__ */ D(
9779
9781
  "div",
9780
9782
  {
@@ -9792,7 +9794,7 @@ function ka({
9792
9794
  "button",
9793
9795
  {
9794
9796
  type: "button",
9795
- onClick: () => I(e.name, y),
9797
+ onClick: () => I(e.name, x),
9796
9798
  className: `text-red-500 hover:text-red-700 ml-3 flex-shrink-0 ${l ? "cursor-not-allowed opacity-50" : ""}`,
9797
9799
  disabled: l,
9798
9800
  children: "Remove"
@@ -9800,14 +9802,14 @@ function ka({
9800
9802
  )
9801
9803
  ]
9802
9804
  },
9803
- y.url || y.original_name || N
9805
+ x.url || x.original_name || N
9804
9806
  );
9805
9807
  }) }),
9806
- Object.entries(m).map(([y, N]) => N.status === "uploading" ? /* @__PURE__ */ D("div", { className: "relative pt-1", children: [
9808
+ Object.entries(m).map(([x, N]) => N.status === "uploading" ? /* @__PURE__ */ D("div", { className: "relative pt-1", children: [
9807
9809
  /* @__PURE__ */ D("div", { className: "flex items-center justify-between", children: [
9808
9810
  /* @__PURE__ */ D("span", { className: "text-xs font-semibold inline-block text-blue-600", children: [
9809
9811
  "Uploading ",
9810
- y
9812
+ x
9811
9813
  ] }),
9812
9814
  /* @__PURE__ */ D("span", { className: "text-xs font-semibold inline-block text-blue-600", children: [
9813
9815
  N.progress,
@@ -9821,7 +9823,7 @@ function ka({
9821
9823
  style: { width: `${N.progress}%` }
9822
9824
  }
9823
9825
  ) })
9824
- ] }, y) : null)
9826
+ ] }, x) : null)
9825
9827
  ] })
9826
9828
  },
9827
9829
  e.name
@@ -9905,8 +9907,8 @@ function Ah({ field: e, formValues: t, handleChange: n, handleBlur: r, error: o
9905
9907
  A = A === 0 ? 55 : A - 5, h(l, A.toString(), m);
9906
9908
  }, k = () => {
9907
9909
  h(l, d, m === "AM" ? "PM" : "AM");
9908
- }, x = () => n(e.name, null), S = [];
9909
- return e.maxDate && S.push({ after: new Date(e.maxDate) }), e.minDate && S.push({ before: new Date(e.minDate) }), /* @__PURE__ */ D("div", { className: "relative", children: [
9910
+ }, C = () => n(e.name, null), y = [];
9911
+ return e.maxDate && y.push({ after: new Date(e.maxDate) }), e.minDate && y.push({ before: new Date(e.minDate) }), /* @__PURE__ */ D("div", { className: "relative", children: [
9910
9912
  /* @__PURE__ */ D(Yn, { open: a, onOpenChange: s, children: [
9911
9913
  /* @__PURE__ */ u(qn, { asChild: !0, children: /* @__PURE__ */ D(
9912
9914
  "button",
@@ -9966,7 +9968,7 @@ function Ah({ field: e, formValues: t, handleChange: n, handleBlur: r, error: o
9966
9968
  selected: c,
9967
9969
  onSelect: g,
9968
9970
  showOutsideDays: !0,
9969
- disabled: S,
9971
+ disabled: y,
9970
9972
  className: "p-0",
9971
9973
  classNames: {
9972
9974
  day_selected: "bg-blue-600 text-white hover:bg-blue-600 hover:text-white focus:bg-blue-600 focus:text-white rounded-md",
@@ -10016,7 +10018,7 @@ function Ah({ field: e, formValues: t, handleChange: n, handleBlur: r, error: o
10016
10018
  "button",
10017
10019
  {
10018
10020
  type: "button",
10019
- onClick: x,
10021
+ onClick: C,
10020
10022
  className: "inline-flex items-center justify-center rounded-lg text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 text-slate-500 hover:text-slate-900 hover:bg-slate-100 h-9 px-4 py-2",
10021
10023
  children: "Clear"
10022
10024
  }
@@ -10230,12 +10232,12 @@ var Kh = f.forwardRef((e, t) => {
10230
10232
  defaultProp: i ?? null,
10231
10233
  onChange: c,
10232
10234
  caller: tn
10233
- }), [E, k] = f.useState(!1), x = et(l), S = Oi(n), A = f.useRef(!1), [I, O] = f.useState(0);
10235
+ }), [E, k] = f.useState(!1), C = et(l), y = Oi(n), A = f.useRef(!1), [I, O] = f.useState(0);
10234
10236
  return f.useEffect(() => {
10235
10237
  const T = g.current;
10236
10238
  if (T)
10237
- return T.addEventListener(Nr, x), () => T.removeEventListener(Nr, x);
10238
- }, [x]), /* @__PURE__ */ u(
10239
+ return T.addEventListener(Nr, C), () => T.removeEventListener(Nr, C);
10240
+ }, [C]), /* @__PURE__ */ u(
10239
10241
  Yh,
10240
10242
  {
10241
10243
  scope: n,
@@ -10272,7 +10274,7 @@ var Kh = f.forwardRef((e, t) => {
10272
10274
  if (T.target === T.currentTarget && z && !E) {
10273
10275
  const H = new CustomEvent(Nr, jh);
10274
10276
  if (T.currentTarget.dispatchEvent(H), !H.defaultPrevented) {
10275
- const V = S().filter((P) => P.focusable), q = V.find((P) => P.active), y = V.find((P) => P.id === p), R = [q, y, ...V].filter(
10277
+ const V = y().filter((P) => P.focusable), q = V.find((P) => P.active), x = V.find((P) => P.id === p), R = [q, x, ...V].filter(
10276
10278
  Boolean
10277
10279
  ).map((P) => P.ref.current);
10278
10280
  Li(R, d);
@@ -10326,14 +10328,14 @@ var Kh = f.forwardRef((e, t) => {
10326
10328
  if (E !== void 0) {
10327
10329
  if (v.metaKey || v.ctrlKey || v.altKey || v.shiftKey) return;
10328
10330
  v.preventDefault();
10329
- let x = g().filter((S) => S.focusable).map((S) => S.ref.current);
10330
- if (E === "last") x.reverse();
10331
+ let C = g().filter((y) => y.focusable).map((y) => y.ref.current);
10332
+ if (E === "last") C.reverse();
10331
10333
  else if (E === "prev" || E === "next") {
10332
- E === "prev" && x.reverse();
10333
- const S = x.indexOf(v.currentTarget);
10334
- x = d.loop ? Jh(x, S + 1) : x.slice(S + 1);
10334
+ E === "prev" && C.reverse();
10335
+ const y = C.indexOf(v.currentTarget);
10336
+ C = d.loop ? Jh(C, y + 1) : C.slice(y + 1);
10335
10337
  }
10336
- setTimeout(() => Li(x));
10338
+ setTimeout(() => Li(C));
10337
10339
  }
10338
10340
  }),
10339
10341
  children: typeof s == "function" ? s({ isCurrentTabStop: m, hasTabStop: p != null }) : s
@@ -10645,7 +10647,7 @@ function hg({
10645
10647
  setCharCounts: d,
10646
10648
  fileInputRefs: m,
10647
10649
  ...g
10648
- } = s, h = t[e.name] || "", w = a, p = e.options || [], v = e.inline || !1, E = e.renderType === "segment", k = g["aria-describedby"], x = E ? "mt-2 inline-flex w-full p-1 rounded-lg bg-muted/50 border border-border shadow-inner" : v ? "flex flex-wrap gap-6 mt-2" : "space-y-4 mt-2";
10650
+ } = s, h = t[e.name] || "", w = a, p = e.options || [], v = e.inline || !1, E = e.renderType === "segment", k = g["aria-describedby"], C = E ? "mt-2 inline-flex w-full p-1 rounded-lg bg-muted/50 border border-border shadow-inner" : v ? "flex flex-wrap gap-6 mt-2" : "space-y-4 mt-2";
10649
10651
  return /* @__PURE__ */ D(
10650
10652
  "fieldset",
10651
10653
  {
@@ -10659,13 +10661,13 @@ function hg({
10659
10661
  {
10660
10662
  ...g,
10661
10663
  value: h,
10662
- onValueChange: (S) => {
10663
- n(e.name, S), r(e.name);
10664
+ onValueChange: (y) => {
10665
+ n(e.name, y), r(e.name);
10664
10666
  },
10665
10667
  disabled: w,
10666
- className: x,
10667
- children: p.map((S) => {
10668
- const A = typeof S == "object" ? S.value : S, I = typeof S == "object" ? S.label : S, O = typeof S == "object" ? S.description : null, T = `${e.name}-${A}`, z = h === A;
10668
+ className: C,
10669
+ children: p.map((y) => {
10670
+ const A = typeof y == "object" ? y.value : y, I = typeof y == "object" ? y.label : y, O = typeof y == "object" ? y.description : null, T = `${e.name}-${A}`, z = h === A;
10669
10671
  return E ? /* @__PURE__ */ D(
10670
10672
  "label",
10671
10673
  {
@@ -10778,33 +10780,33 @@ function bg({
10778
10780
  disabled: a,
10779
10781
  ...s
10780
10782
  }) {
10781
- const i = (x) => {
10782
- if (!x) return null;
10783
- const S = new Date(x);
10784
- return Number.isNaN(S.getTime()) ? null : S;
10783
+ const i = (C) => {
10784
+ if (!C) return null;
10785
+ const y = new Date(C);
10786
+ return Number.isNaN(y.getTime()) ? null : y;
10785
10787
  }, [c, l] = ue(!1), d = a, m = t[e.name], g = Vr(() => i(m), [m]), [h, w] = ue(g || /* @__PURE__ */ new Date());
10786
10788
  s["aria-describedby"], He(() => {
10787
10789
  if (c) {
10788
- const x = g || /* @__PURE__ */ new Date();
10789
- w((S) => S.getFullYear() === x.getFullYear() && S.getMonth() === x.getMonth() ? S : x);
10790
+ const C = g || /* @__PURE__ */ new Date();
10791
+ w((y) => y.getFullYear() === C.getFullYear() && y.getMonth() === C.getMonth() ? y : C);
10790
10792
  }
10791
10793
  }, [c, g]);
10792
10794
  const p = [];
10793
10795
  e.maxDate && p.push({ after: new Date(e.maxDate) }), e.minDate && p.push({ before: new Date(e.minDate) });
10794
- const v = (x) => {
10795
- n(e.name, x || null), x && w(x), e.closeOnSelect !== !1 && l(!1), r(e.name);
10796
+ const v = (C) => {
10797
+ n(e.name, C || null), C && w(C), e.closeOnSelect !== !1 && l(!1), r(e.name);
10796
10798
  }, E = () => {
10797
- const x = /* @__PURE__ */ new Date();
10798
- n(e.name, x), w(x), e.closeOnSelect !== !1 && l(!1), r(e.name);
10799
- }, k = (x) => {
10800
- x.preventDefault(), x.stopPropagation(), n(e.name, null), w(/* @__PURE__ */ new Date()), r(e.name);
10799
+ const C = /* @__PURE__ */ new Date();
10800
+ n(e.name, C), w(C), e.closeOnSelect !== !1 && l(!1), r(e.name);
10801
+ }, k = (C) => {
10802
+ C.preventDefault(), C.stopPropagation(), n(e.name, null), w(/* @__PURE__ */ new Date()), r(e.name);
10801
10803
  };
10802
10804
  return /* @__PURE__ */ u("div", { className: "relative w-full", children: /* @__PURE__ */ D(
10803
10805
  Yn,
10804
10806
  {
10805
10807
  open: c,
10806
- onOpenChange: (x) => {
10807
- l(x), x || r(e.name);
10808
+ onOpenChange: (C) => {
10809
+ l(C), C || r(e.name);
10808
10810
  },
10809
10811
  children: [
10810
10812
  /* @__PURE__ */ u(qn, { asChild: !0, children: /* @__PURE__ */ D(
@@ -10816,8 +10818,8 @@ function bg({
10816
10818
  "aria-controls": e.name + "-calendar",
10817
10819
  tabIndex: d ? -1 : 0,
10818
10820
  onClick: () => !d && l(!0),
10819
- onKeyDown: (x) => {
10820
- d || (x.key === "Enter" || x.key === " ") && (x.preventDefault(), l(!0));
10821
+ onKeyDown: (C) => {
10822
+ d || (C.key === "Enter" || C.key === " ") && (C.preventDefault(), l(!0));
10821
10823
  },
10822
10824
  className: `
10823
10825
  flex h-10 w-full items-center justify-between rounded-md border px-3 py-2 text-sm
@@ -10921,27 +10923,27 @@ function vg({ field: e, formValues: t, handleChange: n, handleBlur: r, error: o
10921
10923
  const [a, s] = ue(!1), [i, c] = ue("12"), [l, d] = ue("00"), [m, g] = ue("PM"), h = t[e.name] || "";
10922
10924
  Te.useEffect(() => {
10923
10925
  if (h) {
10924
- const S = h.match(/(\d{1,2}):(\d{2})\s*(AM|PM)/i);
10925
- S && (c(S[1].padStart(2, "0")), d(S[2]), g(S[3].toUpperCase()));
10926
+ const y = h.match(/(\d{1,2}):(\d{2})\s*(AM|PM)/i);
10927
+ y && (c(y[1].padStart(2, "0")), d(y[2]), g(y[3].toUpperCase()));
10926
10928
  }
10927
10929
  }, [h]);
10928
10930
  const w = () => {
10929
- const S = `${i}:${l} ${m}`;
10930
- n(e.name, S), s(!1);
10931
+ const y = `${i}:${l} ${m}`;
10932
+ n(e.name, y), s(!1);
10931
10933
  }, p = () => {
10932
10934
  n(e.name, ""), c("12"), d("00"), g("PM");
10933
10935
  }, v = () => {
10934
- const S = parseInt(i);
10935
- c((S % 12 + 1).toString().padStart(2, "0"));
10936
+ const y = parseInt(i);
10937
+ c((y % 12 + 1).toString().padStart(2, "0"));
10936
10938
  }, E = () => {
10937
- const S = parseInt(i);
10938
- c((S === 1 ? 12 : S - 1).toString().padStart(2, "0"));
10939
+ const y = parseInt(i);
10940
+ c((y === 1 ? 12 : y - 1).toString().padStart(2, "0"));
10939
10941
  }, k = () => {
10940
- const S = parseInt(l);
10941
- d(((S + 5) % 60).toString().padStart(2, "0"));
10942
- }, x = () => {
10943
- const S = parseInt(l);
10944
- d((S === 0 ? 55 : S - 5).toString().padStart(2, "0"));
10942
+ const y = parseInt(l);
10943
+ d(((y + 5) % 60).toString().padStart(2, "0"));
10944
+ }, C = () => {
10945
+ const y = parseInt(l);
10946
+ d((y === 0 ? 55 : y - 5).toString().padStart(2, "0"));
10945
10947
  };
10946
10948
  return /* @__PURE__ */ u("div", { children: /* @__PURE__ */ D(Yn, { open: a, onOpenChange: s, children: [
10947
10949
  /* @__PURE__ */ u(qn, { asChild: !0, children: /* @__PURE__ */ D(
@@ -11020,8 +11022,8 @@ function vg({ field: e, formValues: t, handleChange: n, handleBlur: r, error: o
11020
11022
  {
11021
11023
  type: "text",
11022
11024
  value: i,
11023
- onChange: (S) => {
11024
- const A = S.target.value.replace(/\D/g, "");
11025
+ onChange: (y) => {
11026
+ const A = y.target.value.replace(/\D/g, "");
11025
11027
  (A === "" || parseInt(A) >= 1 && parseInt(A) <= 12) && c(A.padStart(2, "0"));
11026
11028
  },
11027
11029
  className: "w-14 text-center text-2xl font-semibold border-0 focus:outline-none focus:ring-2 focus:ring-blue-500 rounded py-2",
@@ -11078,8 +11080,8 @@ function vg({ field: e, formValues: t, handleChange: n, handleBlur: r, error: o
11078
11080
  {
11079
11081
  type: "text",
11080
11082
  value: l,
11081
- onChange: (S) => {
11082
- const A = S.target.value.replace(/\D/g, "");
11083
+ onChange: (y) => {
11084
+ const A = y.target.value.replace(/\D/g, "");
11083
11085
  (A === "" || parseInt(A) >= 0 && parseInt(A) <= 59) && d(A.padStart(2, "0"));
11084
11086
  },
11085
11087
  className: "w-14 text-center text-2xl font-semibold border-0 focus:outline-none focus:ring-2 focus:ring-blue-500 rounded py-2",
@@ -11090,7 +11092,7 @@ function vg({ field: e, formValues: t, handleChange: n, handleBlur: r, error: o
11090
11092
  "button",
11091
11093
  {
11092
11094
  type: "button",
11093
- onClick: x,
11095
+ onClick: C,
11094
11096
  className: "p-1 hover:bg-gray-100 rounded",
11095
11097
  children: /* @__PURE__ */ u(
11096
11098
  "svg",
@@ -11237,7 +11239,7 @@ const $g = ({
11237
11239
  },
11238
11240
  debugMode: l = !1
11239
11241
  }) => {
11240
- const [d, m] = ue({ ...i }), [g, h] = ue({}), [w, p] = ue({}), [v, E] = ue({}), k = Yt({}), x = ["hidden", "linebreak", "header", "alert"], S = Vr(
11242
+ const [d, m] = ue({ ...i }), [g, h] = ue({}), [w, p] = ue({}), [v, E] = ue({}), k = Yt({}), C = ["hidden", "linebreak", "header", "alert"], y = Vr(
11241
11243
  () => ({
11242
11244
  file: ka,
11243
11245
  multifile: ka,
@@ -11261,18 +11263,18 @@ const $g = ({
11261
11263
  linebreak: Bh
11262
11264
  }),
11263
11265
  []
11264
- ), A = async (y, N = null) => {
11265
- if (!(y.optionsUrl && !y.preloadOptions)) {
11266
+ ), A = async (x, N = null) => {
11267
+ if (!(x.optionsUrl && !x.preloadOptions)) {
11266
11268
  if (!e) {
11267
- const R = `apiClient prop is required when using fields with optionsUrl. Field "${y.name}" requires optionsUrl but no apiClient was provided.`;
11269
+ const R = `apiClient prop is required when using fields with optionsUrl. Field "${x.name}" requires optionsUrl but no apiClient was provided.`;
11268
11270
  l && console.error(R), Cn.error(R);
11269
11271
  return;
11270
11272
  }
11271
11273
  try {
11272
- const R = await e(`/${y.optionsUrl}`);
11274
+ const R = await e(`/${x.optionsUrl}`);
11273
11275
  let P = [];
11274
- y.type === "select" ? P = [
11275
- { value: "", label: `Select ${y.label.toLowerCase()}` },
11276
+ x.type === "select" ? P = [
11277
+ { value: "", label: `Select ${x.label.toLowerCase()}` },
11276
11278
  ...R.data
11277
11279
  ] : P = [
11278
11280
  ...R.data.map((_) => ({
@@ -11280,10 +11282,10 @@ const $g = ({
11280
11282
  label: _.label
11281
11283
  }))
11282
11284
  ], r.fields.forEach((_) => {
11283
- _.name === y.name && (_.options = P);
11285
+ _.name === x.name && (_.options = P);
11284
11286
  });
11285
11287
  } catch (R) {
11286
- l && console.error(`Failed to load options for ${y.name}:`, R);
11288
+ l && console.error(`Failed to load options for ${x.name}:`, R);
11287
11289
  } finally {
11288
11290
  }
11289
11291
  }
@@ -11303,52 +11305,52 @@ const $g = ({
11303
11305
  }), m(N);
11304
11306
  }
11305
11307
  }, [r]);
11306
- const I = (y, N, R) => {
11307
- const P = typeof N == "object" && N !== null && !Array.isArray(N) && !(N instanceof Date), _ = N == null || typeof N == "string" && N.trim() === "" || Array.isArray(N) && N.length === 0 || y.type === "checkbox" && N === !1 || P && Object.keys(N).length === 0;
11308
- if (y.required && _)
11309
- return l && console.warn(`VALIDATION FAILED (REQUIRED): ${y.name} is empty.`), `${y.label} is required`;
11310
- if (_ && !y.required)
11308
+ const I = (x, N, R) => {
11309
+ const P = typeof N == "object" && N !== null && !Array.isArray(N) && !(N instanceof Date), _ = N == null || typeof N == "string" && N.trim() === "" || Array.isArray(N) && N.length === 0 || x.type === "checkbox" && N === !1 || P && Object.keys(N).length === 0;
11310
+ if (x.required && _)
11311
+ return l && console.warn(`VALIDATION FAILED (REQUIRED): ${x.name} is empty.`), `${x.label} is required`;
11312
+ if (_ && !x.required)
11311
11313
  return null;
11312
- if (y.validate) {
11313
- const C = y.validate(N, R);
11314
- if (C) return C;
11314
+ if (x.validate) {
11315
+ const S = x.validate(N, R);
11316
+ if (S) return S;
11315
11317
  }
11316
- if (y.type === "email" && N && !/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(N))
11318
+ if (x.type === "email" && N && !/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(N))
11317
11319
  return "Please enter a valid email address";
11318
- if (y.type === "number") {
11319
- if (y.min !== void 0 && N < y.min)
11320
- return `${y.label} must be at least ${y.min}`;
11321
- if (y.max !== void 0 && N > y.max)
11322
- return `${y.label} must be no more than ${y.max}`;
11320
+ if (x.type === "number") {
11321
+ if (x.min !== void 0 && N < x.min)
11322
+ return `${x.label} must be at least ${x.min}`;
11323
+ if (x.max !== void 0 && N > x.max)
11324
+ return `${x.label} must be no more than ${x.max}`;
11323
11325
  }
11324
- return y.type === "date" && N && !ir(N).isValid() ? `${y.label} must be a valid date` : y.maxLength && N && N.length > y.maxLength ? `${y.label} must not exceed ${y.maxLength} characters` : null;
11325
- }, O = (y, N) => {
11326
- const R = r.fields.find((_) => _.name === y);
11326
+ 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;
11327
+ }, O = (x, N) => {
11328
+ const R = r.fields.find((_) => _.name === x);
11327
11329
  if (!R) return;
11328
11330
  const P = { ...d };
11329
- R.type === "multiselect" || R.type === "searchselect" ? Array.isArray(N) ? P[y] = N : N && N.target && N.target.selectedOptions ? P[y] = Array.from(N.target.selectedOptions).map(
11331
+ R.type === "multiselect" || R.type === "searchselect" ? Array.isArray(N) ? P[x] = N : N && N.target && N.target.selectedOptions ? P[x] = Array.from(N.target.selectedOptions).map(
11330
11332
  (_) => _.value
11331
- ) : P[y] = N : R.type === "dateRange" ? P[y] = [
11333
+ ) : P[x] = N : R.type === "dateRange" ? P[x] = [
11332
11334
  {
11333
11335
  startDate: N.from,
11334
11336
  endDate: N.to || N.from,
11335
11337
  key: "selection"
11336
11338
  }
11337
- ] : R.type === "dayTimePicker" ? P[y] = N ? ir(N).format("YYYY-MM-DD HH:mm:ss") : "" : R.type === "number" ? P[y] = N === "" ? "" : Number(N) : P[y] = N, R.type === "select" && r.fields.forEach((_) => {
11339
+ ] : R.type === "dayTimePicker" ? P[x] = N ? ir(N).format("YYYY-MM-DD HH:mm:ss") : "" : R.type === "number" ? P[x] = N === "" ? "" : Number(N) : P[x] = N, R.type === "select" && r.fields.forEach((_) => {
11338
11340
  if (_.showIf && !_.showIf(P)) {
11339
- const C = _.type === "multiselect" || _.type === "searchselect" || _.type === "checkbox" && _.options && _.options.length > 0;
11340
- P[_.name] = C ? [] : "";
11341
+ const S = _.type === "multiselect" || _.type === "searchselect" || _.type === "checkbox" && _.options && _.options.length > 0;
11342
+ P[_.name] = S ? [] : "";
11341
11343
  }
11342
11344
  }), r.fields.forEach((_) => {
11343
11345
  if (typeof _.disabled == "function" && _.disabled(P)) {
11344
- const C = _.type === "multiselect" || _.type === "searchselect" || _.type === "checkbox" && _.options && _.options.length > 0;
11345
- P[_.name] = C ? [] : "";
11346
+ const S = _.type === "multiselect" || _.type === "searchselect" || _.type === "checkbox" && _.options && _.options.length > 0;
11347
+ P[_.name] = S ? [] : "";
11346
11348
  }
11347
11349
  }), m(P);
11348
- }, T = (y) => {
11349
- p({ ...w, [y]: !0 });
11350
- }, z = (y) => {
11351
- y.preventDefault();
11350
+ }, T = (x) => {
11351
+ p({ ...w, [x]: !0 });
11352
+ }, z = (x) => {
11353
+ x.preventDefault();
11352
11354
  const N = {};
11353
11355
  r.fields.forEach((P) => {
11354
11356
  P.name && (N[P.name] = !0);
@@ -11360,35 +11362,35 @@ const $g = ({
11360
11362
  _ && (R[P.name] = _);
11361
11363
  }
11362
11364
  }), h(R), Object.keys(R).length === 0) {
11363
- const P = (C, L) => {
11364
- if (C === "" || C === null || C === void 0) return null;
11365
+ const P = (S, L) => {
11366
+ if (S === "" || S === null || S === void 0) return null;
11365
11367
  const U = L?.toLowerCase();
11366
- if (Array.isArray(C))
11367
- return U === "number" || U === "integer" ? C.map((G) => G === "" ? null : Number(G)) : C;
11368
+ if (Array.isArray(S))
11369
+ return U === "number" || U === "integer" ? S.map((G) => G === "" ? null : Number(G)) : S;
11368
11370
  switch (U) {
11369
11371
  case "number":
11370
11372
  case "integer":
11371
11373
  case "float":
11372
- return Number(C);
11374
+ return Number(S);
11373
11375
  case "boolean":
11374
11376
  case "bool":
11375
- return String(C).toLowerCase() === "true" || C === !0;
11377
+ return String(S).toLowerCase() === "true" || S === !0;
11376
11378
  case "date":
11377
11379
  case "datetime": {
11378
- const G = ir(C);
11379
- return G.isValid() ? G.toISOString() : C;
11380
+ const G = ir(S);
11381
+ return G.isValid() ? G.toISOString() : S;
11380
11382
  }
11381
11383
  default:
11382
- return C;
11384
+ return S;
11383
11385
  }
11384
11386
  }, _ = {};
11385
- r.fields.forEach((C) => {
11386
- if (C.name) {
11387
- const L = d[C.name], U = C.fieldType || "string", G = P(L, U);
11388
- o ? _[C.name] = {
11387
+ r.fields.forEach((S) => {
11388
+ if (S.name) {
11389
+ const L = d[S.name], U = S.fieldType || "string", G = P(L, U);
11390
+ o ? _[S.name] = {
11389
11391
  value: G,
11390
11392
  fieldType: U
11391
- } : _[C.name] = G;
11393
+ } : _[S.name] = G;
11392
11394
  }
11393
11395
  }), l ? console.log("Form submitted with values:", _) : a(_);
11394
11396
  } else
@@ -11408,15 +11410,15 @@ const $g = ({
11408
11410
  pink: "border-pink-500 bg-pink-50",
11409
11411
  orange: "border-orange-500 bg-orange-50"
11410
11412
  };
11411
- function V(y, N, R) {
11413
+ function V(x, N, R) {
11412
11414
  const P = `${N.name}-error`;
11413
11415
  if (l && (R ? console.log(
11414
11416
  `[fieldFormat RENDER] Rendering error for ${N.name}: ${R}`
11415
11417
  ) : g[N.name] && console.log(
11416
11418
  `[fieldFormat RENDER] Error exists in state for ${N.name} but not passed in props!`
11417
- )), x.includes(N.type))
11418
- return /* @__PURE__ */ u("div", { className: N.class || "col-span-full", children: y });
11419
- const _ = N.containerStyle, C = N.color || "blue", L = _ === "card" ? `rounded-lg border text-card-foreground shadow-sm p-4 ${N.containerClassName || H[C] || H.blue}` : "", U = /* @__PURE__ */ D(Rt, { children: [
11419
+ )), C.includes(N.type))
11420
+ return /* @__PURE__ */ u("div", { className: N.class || "col-span-full", children: x });
11421
+ const _ = N.containerStyle, S = N.color || "blue", L = _ === "card" ? `rounded-lg border text-card-foreground shadow-sm p-4 ${N.containerClassName || H[S] || H.blue}` : "", U = /* @__PURE__ */ D(Rt, { children: [
11420
11422
  N.label && /* @__PURE__ */ D(
11421
11423
  "label",
11422
11424
  {
@@ -11428,7 +11430,7 @@ const $g = ({
11428
11430
  ]
11429
11431
  }
11430
11432
  ),
11431
- /* @__PURE__ */ u("div", { children: Te.cloneElement(y, {
11433
+ /* @__PURE__ */ u("div", { children: Te.cloneElement(x, {
11432
11434
  "aria-describedby": R ? P : void 0,
11433
11435
  "aria-invalid": !!R,
11434
11436
  "aria-required": N.required
@@ -11438,24 +11440,24 @@ const $g = ({
11438
11440
  ] });
11439
11441
  return /* @__PURE__ */ u("div", { className: "mb-4", children: _ === "card" ? /* @__PURE__ */ u("div", { className: L, children: U }) : U });
11440
11442
  }
11441
- const q = (y) => {
11442
- if (y.showIf && !y.showIf(d)) return null;
11443
- const N = S[y.type] || oa;
11444
- if (d[y.name] === void 0) {
11445
- const _ = y.type === "multiselect" || y.type === "searchselect" || y.type === "checkbox" && y.options && y.options.length > 0;
11446
- d[y.name] = y.value !== void 0 ? y.value : _ ? [] : "";
11443
+ const q = (x) => {
11444
+ if (x.showIf && !x.showIf(d)) return null;
11445
+ const N = y[x.type] || oa;
11446
+ if (d[x.name] === void 0) {
11447
+ const _ = x.type === "multiselect" || x.type === "searchselect" || x.type === "checkbox" && x.options && x.options.length > 0;
11448
+ d[x.name] = x.value !== void 0 ? x.value : _ ? [] : "";
11447
11449
  }
11448
- const R = g[y.name] ? g[y.name] : null, P = typeof y.disabled == "function" ? y.disabled(d) : !!y.disabled;
11450
+ const R = g[x.name] ? g[x.name] : null, P = typeof x.disabled == "function" ? x.disabled(d) : !!x.disabled;
11449
11451
  return V(
11450
11452
  /* @__PURE__ */ u(
11451
11453
  N,
11452
11454
  {
11453
- field: y,
11455
+ field: x,
11454
11456
  formValues: d,
11455
11457
  handleChange: O,
11456
- handleBlur: () => T(y.name),
11458
+ handleBlur: () => T(x.name),
11457
11459
  setCharCounts: E,
11458
- charCount: v[y.name] || 0,
11460
+ charCount: v[x.name] || 0,
11459
11461
  api_URL: t,
11460
11462
  error: R,
11461
11463
  fileInputRefs: k,
@@ -11463,7 +11465,7 @@ const $g = ({
11463
11465
  apiClient: e
11464
11466
  }
11465
11467
  ),
11466
- y,
11468
+ x,
11467
11469
  R
11468
11470
  );
11469
11471
  };
@@ -11473,23 +11475,23 @@ const $g = ({
11473
11475
  onSubmit: z,
11474
11476
  className: "grid grid-cols-12 gap-x-4 mx-auto w-full  ",
11475
11477
  children: [
11476
- r ? r.fields.map((y) => /* @__PURE__ */ u(
11478
+ r ? r.fields.map((x) => /* @__PURE__ */ u(
11477
11479
  "div",
11478
11480
  {
11479
- className: `${y.class || "col-span-full"} `,
11480
- children: q(y)
11481
+ className: `${x.class || "col-span-full"} `,
11482
+ children: q(x)
11481
11483
  },
11482
- y.name + y.type
11484
+ x.name + x.type
11483
11485
  )) : /* @__PURE__ */ u("div", { children: "Loading..." }),
11484
11486
  /* @__PURE__ */ u(
11485
11487
  "div",
11486
11488
  {
11487
11489
  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",
11488
- children: Te.Children.map(s, (y) => Te.isValidElement(y) && y.props.onClick ? Te.cloneElement(y, {
11490
+ children: Te.Children.map(s, (x) => Te.isValidElement(x) && x.props.onClick ? Te.cloneElement(x, {
11489
11491
  onClick: (N) => {
11490
- y.props.onClick(d, N);
11492
+ x.props.onClick(d, N);
11491
11493
  }
11492
- }) : y)
11494
+ }) : x)
11493
11495
  }
11494
11496
  )
11495
11497
  ]