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