ynotsoft-dynamic-form 1.0.76 → 1.0.78

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.
@@ -21,8 +21,8 @@ function Ma({
21
21
  disabled: s
22
22
  }) {
23
23
  const i = e.disabled && typeof e.disabled == "function" ? e.disabled(t) : e.disabled, a = s || i, l = e.options || [], c = _a(), f = t[e.name] || e.value || [], p = (m) => Array.isArray(m) && m.length > 0 && typeof m[0] == "object" && m[0] !== null && "value" in m[0];
24
- let g;
25
- return p(f) ? g = f : g = f.filter((m) => m != null).map((m) => l.find((w) => w.value === m)).filter((m) => m !== void 0), /* @__PURE__ */ u(
24
+ let b;
25
+ return p(f) ? b = f : b = f.filter((m) => m != null).map((m) => l.find((w) => w.value === m)).filter((m) => m !== void 0), /* @__PURE__ */ u(
26
26
  "div",
27
27
  {
28
28
  className: `mb-4 ${e.fieldClass ? e.fieldClass : "col-span-full"}`,
@@ -33,7 +33,7 @@ function Ma({
33
33
  isMulti: !0,
34
34
  isDisabled: a,
35
35
  name: e.label,
36
- value: g,
36
+ value: b,
37
37
  onChange: (m) => {
38
38
  const w = m.map((h) => h.value);
39
39
  n(e.name, w);
@@ -139,11 +139,11 @@ const Ha = [
139
139
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
140
140
  ["line", { x1: "12", x2: "12", y1: "8", y2: "12", key: "1pkeuh" }],
141
141
  ["line", { x1: "12", x2: "12.01", y1: "16", y2: "16", key: "4dfq90" }]
142
- ], Va = Ie("circle-alert", Ha);
143
- const ja = [
142
+ ], ja = Ie("circle-alert", Ha);
143
+ const Va = [
144
144
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
145
145
  ["path", { d: "m9 12 2 2 4-4", key: "dzmm74" }]
146
- ], Ga = Ie("circle-check", ja);
146
+ ], Ga = Ie("circle-check", Va);
147
147
  const Ya = [
148
148
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
149
149
  ["path", { d: "m15 9-6 6", key: "1uzhvr" }],
@@ -178,60 +178,76 @@ function al({
178
178
  disabled: s,
179
179
  apiClient: i
180
180
  }) {
181
- const a = s || e.disabled && (typeof e.disabled == "function" ? e.disabled(t) : e.disabled), l = e.selectMode !== "multiple", [c, f] = de([]), [p, g] = de(!1), [m, w] = de(!1), [h, y] = de(""), [C, E] = de({}), A = $t(null), x = $t(null), N = $t(null), D = t[e.name], k = D == null || D === "" ? [] : (Array.isArray(D) ? D : [D]).map((S) => {
182
- const T = c.find((P) => P.value === S);
183
- return T || (C[S] ? C[S] : { value: S, label: S });
181
+ const a = s || e.disabled && (typeof e.disabled == "function" ? e.disabled(t) : e.disabled), l = e.selectMode !== "multiple", [c, f] = de([]), [p, b] = de(!1), [m, w] = de(!1), [h, y] = de(""), [C, E] = de({}), A = $t(null), x = $t(null), T = $t(null), D = t[e.name], P = D == null || D === "" ? [] : (Array.isArray(D) ? D : [D]).map((S) => {
182
+ const N = c.find((k) => k.value === S);
183
+ return N || (C[S] ? C[S] : { value: S, label: S });
184
184
  }), W = Na(
185
- async (b = "") => {
185
+ async (g = "") => {
186
186
  if (e.onSearch && typeof e.onSearch == "function") {
187
- const S = await e.onSearch(b, t);
187
+ const S = await e.onSearch(g, t);
188
188
  f(S);
189
189
  return;
190
190
  }
191
- if (!(!e.optionsUrl || !i)) {
192
- g(!0);
193
- try {
194
- const S = e.searchParam || "search", T = e.optionsUrl.includes("?") ? "&" : "?", P = `${e.optionsUrl}${T}${S}=${encodeURIComponent(b)}`, _ = await i(P), R = _.data || _, te = (Array.isArray(R) ? R : []).map((V) => ({
195
- value: V[e.valueId || "value"] || V.value || V.id,
196
- label: V[e.labelId || "label"] || V.label || V.name
191
+ if (!e.optionsUrl || !i) {
192
+ if (e.options && Array.isArray(e.options)) {
193
+ const S = e.options.map((N) => ({
194
+ value: N[e.valueId || "value"] || N.value || N.id,
195
+ label: N[e.labelId || "label"] || N.label || N.name
197
196
  }));
198
- f(te);
199
- } catch (S) {
200
- console.error("Search failed:", S), f([]);
201
- } finally {
202
- g(!1);
203
- }
197
+ if (!g)
198
+ f(S);
199
+ else {
200
+ const N = g.toLowerCase(), k = S.filter(
201
+ (_) => String(_.label).toLowerCase().includes(N)
202
+ );
203
+ f(k);
204
+ }
205
+ } else
206
+ f([]);
207
+ return;
208
+ }
209
+ b(!0);
210
+ try {
211
+ const S = e.searchParam || "search", N = e.optionsUrl.includes("?") ? "&" : "?", k = `${e.optionsUrl}${N}${S}=${encodeURIComponent(g)}`, _ = await i(k), R = _.data || _, te = (Array.isArray(R) ? R : []).map((j) => ({
212
+ value: j[e.valueId || "value"] || j.value || j.id,
213
+ label: j[e.labelId || "label"] || j.label || j.name
214
+ }));
215
+ f(te);
216
+ } catch (S) {
217
+ console.error("Search failed:", S), f([]);
218
+ } finally {
219
+ b(!1);
204
220
  }
205
221
  },
206
222
  [e, i, t]
207
- ), H = (b) => {
208
- const S = b.target.value;
209
- y(S), N.current && clearTimeout(N.current), N.current = setTimeout(() => W(S), 300);
223
+ ), H = (g) => {
224
+ const S = g.target.value;
225
+ y(S), T.current && clearTimeout(T.current), T.current = setTimeout(() => W(S), 300);
210
226
  };
211
227
  zt(() => {
212
- m && (c.length === 0 && W(""), setTimeout(() => x.current?.focus(), 50));
228
+ m && (h === "" ? W("") : (c.length === 0 || !e.optionsUrl && !i && !e.onSearch) && W(h), setTimeout(() => x.current?.focus(), 50));
213
229
  }, [m]), zt(() => {
214
- const b = (S) => {
215
- A.current && !A.current.contains(S.target) && (w(!1), r(e.name));
230
+ const g = (S) => {
231
+ A.current && !A.current.contains(S.target) && (w(!1), y(""), r(e.name));
216
232
  };
217
- return document.addEventListener("mousedown", b), () => document.removeEventListener("mousedown", b);
233
+ return document.addEventListener("mousedown", g), () => document.removeEventListener("mousedown", g);
218
234
  }, [e.name, r]);
219
- const U = (b) => {
220
- E((T) => ({ ...T, [b.value]: b }));
235
+ const U = (g) => {
236
+ E((N) => ({ ...N, [g.value]: g }));
221
237
  let S;
222
238
  if (l)
223
- S = b.value, w(!1);
239
+ S = g.value, w(!1);
224
240
  else {
225
- const T = Array.isArray(D) ? D : [];
226
- S = T.includes(b.value) ? T.filter((_) => _ !== b.value) : [...T, b.value];
241
+ const N = Array.isArray(D) ? D : [];
242
+ S = N.includes(g.value) ? N.filter((_) => _ !== g.value) : [...N, g.value];
227
243
  }
228
- n(e.name, S), e.clearSearchOnSelect && y("");
229
- }, j = (b, S) => {
230
- if (b.stopPropagation(), l)
244
+ console.log("Selected value(s) for field", e.name, ":", S), n(e.name, S), e.clearSearchOnSelect && y("");
245
+ }, V = (g, S) => {
246
+ if (g.stopPropagation(), l)
231
247
  n(e.name, null);
232
248
  else {
233
- const T = Array.isArray(D) ? D : [];
234
- n(e.name, T.filter((P) => P !== S));
249
+ const N = Array.isArray(D) ? D : [];
250
+ n(e.name, N.filter((k) => k !== S));
235
251
  }
236
252
  };
237
253
  return /* @__PURE__ */ M("div", { className: `mb-4 relative ${e.fieldClass || "col-span-full"}`, ref: A, children: [
@@ -247,10 +263,10 @@ function al({
247
263
  ${a ? "bg-gray-100 opacity-60 cursor-not-allowed" : ""}
248
264
  `,
249
265
  children: [
250
- k.length > 0 ? k.map((b) => /* @__PURE__ */ M("span", { className: "inline-flex items-center px-2 py-1 bg-blue-50 text-blue-700 text-sm rounded-md border border-blue-100", children: [
251
- b.label,
252
- !a && /* @__PURE__ */ u("button", { type: "button", onClick: (S) => j(S, b.value), className: "ml-1 p-0.5 hover:bg-blue-200 rounded-full", children: /* @__PURE__ */ u(il, { className: "w-3 h-3" }) })
253
- ] }, b.value)) : /* @__PURE__ */ u("span", { className: "text-gray-400 text-sm", children: e.placeholder || "Select..." }),
266
+ P.length > 0 ? P.map((g) => /* @__PURE__ */ M("span", { className: "inline-flex items-center px-2 py-1 bg-blue-50 text-blue-700 text-sm rounded-md border border-blue-100", children: [
267
+ g.label,
268
+ !a && /* @__PURE__ */ u("button", { type: "button", onClick: (S) => V(S, g.value), className: "ml-1 p-0.5 hover:bg-blue-200 rounded-full", children: /* @__PURE__ */ u(il, { className: "w-3 h-3" }) })
269
+ ] }, g.value)) : /* @__PURE__ */ u("span", { className: "text-gray-400 text-sm", children: e.placeholder || "Select..." }),
254
270
  /* @__PURE__ */ M("div", { className: "ml-auto flex items-center", children: [
255
271
  p && /* @__PURE__ */ u(nl, { className: "w-4 h-4 mr-2 animate-spin text-gray-400" }),
256
272
  /* @__PURE__ */ u(is, { className: `w-4 h-4 text-gray-400 transition-transform ${m ? "rotate-180" : ""}` })
@@ -259,8 +275,8 @@ function al({
259
275
  }
260
276
  ),
261
277
  m && !a && /* @__PURE__ */ M("div", { className: "absolute z-50 w-full mt-1 bg-white border border-gray-200 rounded-lg shadow-xl overflow-hidden", children: [
262
- /* @__PURE__ */ u("div", { className: "p-2 border-b border-gray-100 bg-gray-50", children: /* @__PURE__ */ M("div", { className: "relative", children: [
263
- /* @__PURE__ */ u(ol, { className: "absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-gray-400" }),
278
+ /* @__PURE__ */ u("div", { className: "p-2 border-b border-gray-100 bg-gray-50", children: /* @__PURE__ */ M("div", { className: "relative flex items-center", children: [
279
+ /* @__PURE__ */ u(ol, { className: "absolute left-3 w-4 h-4 text-gray-400" }),
264
280
  /* @__PURE__ */ u(
265
281
  "input",
266
282
  {
@@ -273,19 +289,19 @@ function al({
273
289
  }
274
290
  )
275
291
  ] }) }),
276
- /* @__PURE__ */ u("div", { className: "max-h-60 overflow-y-auto p-1", children: c.length > 0 ? c.map((b) => {
277
- const S = k.some((T) => T.value === b.value);
292
+ /* @__PURE__ */ u("div", { className: "max-h-60 overflow-y-auto p-1", children: c.length > 0 ? c.map((g) => {
293
+ const S = P.some((N) => N.value === g.value);
278
294
  return /* @__PURE__ */ M(
279
295
  "div",
280
296
  {
281
- onClick: () => U(b),
297
+ onClick: () => U(g),
282
298
  className: `px-3 py-2 text-sm rounded cursor-pointer flex items-center justify-between ${S ? "bg-blue-50 text-blue-700" : "hover:bg-gray-100 text-gray-700"}`,
283
299
  children: [
284
- /* @__PURE__ */ u("span", { children: b.label }),
300
+ /* @__PURE__ */ u("span", { children: g.label }),
285
301
  S && /* @__PURE__ */ u(Ua, { className: "w-4 h-4" })
286
302
  ]
287
303
  },
288
- b.value
304
+ g.value
289
305
  );
290
306
  }) : /* @__PURE__ */ u("div", { className: "py-4 text-center text-sm text-gray-500", children: p ? "Loading..." : "No results found" }) })
291
307
  ] })
@@ -306,12 +322,12 @@ function ut(e, t = []) {
306
322
  const a = d.createContext(i), l = n.length;
307
323
  n = [...n, i];
308
324
  const c = (p) => {
309
- const { scope: g, children: m, ...w } = p, h = g?.[e]?.[l] || a, y = d.useMemo(() => w, Object.values(w));
325
+ const { scope: b, children: m, ...w } = p, h = b?.[e]?.[l] || a, y = d.useMemo(() => w, Object.values(w));
310
326
  return /* @__PURE__ */ u(h.Provider, { value: y, children: m });
311
327
  };
312
328
  c.displayName = s + "Provider";
313
- function f(p, g) {
314
- const m = g?.[e]?.[l] || a, w = d.useContext(m);
329
+ function f(p, b) {
330
+ const m = b?.[e]?.[l] || a, w = d.useContext(m);
315
331
  if (w) return w;
316
332
  if (i !== void 0) return i;
317
333
  throw new Error(`\`${p}\` must be used within \`${s}\``);
@@ -431,10 +447,10 @@ function as(e) {
431
447
  }
432
448
  );
433
449
  c.displayName = a;
434
- const f = e + "CollectionItemSlot", p = "data-radix-collection-item", g = /* @__PURE__ */ we(f), m = Pe.forwardRef(
450
+ const f = e + "CollectionItemSlot", p = "data-radix-collection-item", b = /* @__PURE__ */ we(f), m = Pe.forwardRef(
435
451
  (h, y) => {
436
- const { scope: C, children: E, ...A } = h, x = Pe.useRef(null), N = se(y, x), D = s(f, C);
437
- return Pe.useEffect(() => (D.itemMap.set(x, { ref: x, ...A }), () => void D.itemMap.delete(x))), /* @__PURE__ */ u(g, { [p]: "", ref: N, children: E });
452
+ const { scope: C, children: E, ...A } = h, x = Pe.useRef(null), T = se(y, x), D = s(f, C);
453
+ return Pe.useEffect(() => (D.itemMap.set(x, { ref: x, ...A }), () => void D.itemMap.delete(x))), /* @__PURE__ */ u(b, { [p]: "", ref: T, children: E });
438
454
  }
439
455
  );
440
456
  m.displayName = f;
@@ -517,21 +533,21 @@ var vl = "DismissableLayer", hr = "dismissableLayer.update", yl = "dismissableLa
517
533
  onInteractOutside: i,
518
534
  onDismiss: a,
519
535
  ...l
520
- } = e, c = d.useContext(cs), [f, p] = d.useState(null), g = f?.ownerDocument ?? globalThis?.document, [, m] = d.useState({}), w = se(t, (O) => p(O)), h = Array.from(c.layers), [y] = [...c.layersWithOutsidePointerEventsDisabled].slice(-1), C = h.indexOf(y), E = f ? h.indexOf(f) : -1, A = c.layersWithOutsidePointerEventsDisabled.size > 0, x = E >= C, N = Cl((O) => {
521
- const k = O.target, W = [...c.branches].some((H) => H.contains(k));
536
+ } = e, c = d.useContext(cs), [f, p] = d.useState(null), b = f?.ownerDocument ?? globalThis?.document, [, m] = d.useState({}), w = se(t, (O) => p(O)), h = Array.from(c.layers), [y] = [...c.layersWithOutsidePointerEventsDisabled].slice(-1), C = h.indexOf(y), E = f ? h.indexOf(f) : -1, A = c.layersWithOutsidePointerEventsDisabled.size > 0, x = E >= C, T = Cl((O) => {
537
+ const P = O.target, W = [...c.branches].some((H) => H.contains(P));
522
538
  !x || W || (o?.(O), i?.(O), O.defaultPrevented || a?.());
523
- }, g), D = El((O) => {
524
- const k = O.target;
525
- [...c.branches].some((H) => H.contains(k)) || (s?.(O), i?.(O), O.defaultPrevented || a?.());
526
- }, g);
539
+ }, b), D = El((O) => {
540
+ const P = O.target;
541
+ [...c.branches].some((H) => H.contains(P)) || (s?.(O), i?.(O), O.defaultPrevented || a?.());
542
+ }, b);
527
543
  return bl((O) => {
528
544
  E === c.layers.size - 1 && (r?.(O), !O.defaultPrevented && a && (O.preventDefault(), a()));
529
- }, g), d.useEffect(() => {
545
+ }, b), d.useEffect(() => {
530
546
  if (f)
531
- return n && (c.layersWithOutsidePointerEventsDisabled.size === 0 && (bo = g.body.style.pointerEvents, g.body.style.pointerEvents = "none"), c.layersWithOutsidePointerEventsDisabled.add(f)), c.layers.add(f), vo(), () => {
532
- n && c.layersWithOutsidePointerEventsDisabled.size === 1 && (g.body.style.pointerEvents = bo);
547
+ return n && (c.layersWithOutsidePointerEventsDisabled.size === 0 && (bo = b.body.style.pointerEvents, b.body.style.pointerEvents = "none"), c.layersWithOutsidePointerEventsDisabled.add(f)), c.layers.add(f), vo(), () => {
548
+ n && c.layersWithOutsidePointerEventsDisabled.size === 1 && (b.body.style.pointerEvents = bo);
533
549
  };
534
- }, [f, g, n, c]), d.useEffect(() => () => {
550
+ }, [f, b, n, c]), d.useEffect(() => () => {
535
551
  f && (c.layers.delete(f), c.layersWithOutsidePointerEventsDisabled.delete(f), vo());
536
552
  }, [f, c]), d.useEffect(() => {
537
553
  const O = () => m({});
@@ -549,7 +565,7 @@ var vl = "DismissableLayer", hr = "dismissableLayer.update", yl = "dismissableLa
549
565
  onBlurCapture: Z(e.onBlurCapture, D.onBlurCapture),
550
566
  onPointerDownCapture: Z(
551
567
  e.onPointerDownCapture,
552
- N.onPointerDownCapture
568
+ T.onPointerDownCapture
553
569
  )
554
570
  }
555
571
  );
@@ -663,7 +679,7 @@ var Al = [
663
679
  onMountAutoFocus: o,
664
680
  onUnmountAutoFocus: s,
665
681
  ...i
666
- } = e, [a, l] = d.useState(null), c = Ze(o), f = Ze(s), p = d.useRef(null), g = se(t, (h) => l(h)), m = d.useRef({
682
+ } = e, [a, l] = d.useState(null), c = Ze(o), f = Ze(s), p = d.useRef(null), b = se(t, (h) => l(h)), m = d.useRef({
667
683
  paused: !1,
668
684
  pause() {
669
685
  this.paused = !0;
@@ -684,8 +700,8 @@ var Al = [
684
700
  x !== null && (a.contains(x) || qe(p.current, { select: !0 }));
685
701
  }, C = function(A) {
686
702
  if (document.activeElement === document.body)
687
- for (const N of A)
688
- N.removedNodes.length > 0 && qe(a);
703
+ for (const T of A)
704
+ T.removedNodes.length > 0 && qe(a);
689
705
  };
690
706
  document.addEventListener("focusin", h), document.addEventListener("focusout", y);
691
707
  const E = new MutationObserver(C);
@@ -720,7 +736,7 @@ var Al = [
720
736
  },
721
737
  [n, r, m.paused]
722
738
  );
723
- return /* @__PURE__ */ u(Rl.div, { tabIndex: -1, ...i, ref: g, onKeyDown: w });
739
+ return /* @__PURE__ */ u(Rl.div, { tabIndex: -1, ...i, ref: b, onKeyDown: w });
724
740
  });
725
741
  Mr.displayName = Nl;
726
742
  function Tl(e, { select: t = !1 } = {}) {
@@ -844,7 +860,7 @@ function br(e) {
844
860
  return e.replace(/start|end/g, (t) => $l[t]);
845
861
  }
846
862
  const Eo = ["left", "right"], Ao = ["right", "left"], Wl = ["top", "bottom"], Hl = ["bottom", "top"];
847
- function Vl(e, t, n) {
863
+ function jl(e, t, n) {
848
864
  switch (e) {
849
865
  case "top":
850
866
  case "bottom":
@@ -856,9 +872,9 @@ function Vl(e, t, n) {
856
872
  return [];
857
873
  }
858
874
  }
859
- function jl(e, t, n, r) {
875
+ function Vl(e, t, n, r) {
860
876
  const o = Et(e);
861
- let s = Vl(Ye(e), n === "start", r);
877
+ let s = jl(Ye(e), n === "start", r);
862
878
  return o && (s = s.map((i) => i + "-" + o), t && (s = s.concat(s.map(br)))), s;
863
879
  }
864
880
  function gn(e) {
@@ -904,7 +920,7 @@ function Ro(e, t, n) {
904
920
  reference: r,
905
921
  floating: o
906
922
  } = e;
907
- const s = $e(t), i = Fr(t), a = Lr(i), l = Ye(t), c = s === "y", f = r.x + r.width / 2 - o.width / 2, p = r.y + r.height / 2 - o.height / 2, g = r[a] / 2 - o[a] / 2;
923
+ const s = $e(t), i = Fr(t), a = Lr(i), l = Ye(t), c = s === "y", f = r.x + r.width / 2 - o.width / 2, p = r.y + r.height / 2 - o.height / 2, b = r[a] / 2 - o[a] / 2;
908
924
  let m;
909
925
  switch (l) {
910
926
  case "top":
@@ -939,10 +955,10 @@ function Ro(e, t, n) {
939
955
  }
940
956
  switch (Et(t)) {
941
957
  case "start":
942
- m[i] -= g * (n && c ? -1 : 1);
958
+ m[i] -= b * (n && c ? -1 : 1);
943
959
  break;
944
960
  case "end":
945
- m[i] += g * (n && c ? -1 : 1);
961
+ m[i] += b * (n && c ? -1 : 1);
946
962
  break;
947
963
  }
948
964
  return m;
@@ -961,7 +977,7 @@ const Yl = async (e, t, n) => {
961
977
  }), {
962
978
  x: f,
963
979
  y: p
964
- } = Ro(c, r, l), g = r, m = {}, w = 0;
980
+ } = Ro(c, r, l), b = r, m = {}, w = 0;
965
981
  for (let h = 0; h < a.length; h++) {
966
982
  const {
967
983
  name: y,
@@ -970,12 +986,12 @@ const Yl = async (e, t, n) => {
970
986
  x: E,
971
987
  y: A,
972
988
  data: x,
973
- reset: N
989
+ reset: T
974
990
  } = await C({
975
991
  x: f,
976
992
  y: p,
977
993
  initialPlacement: r,
978
- placement: g,
994
+ placement: b,
979
995
  strategy: o,
980
996
  middlewareData: m,
981
997
  rects: c,
@@ -991,19 +1007,19 @@ const Yl = async (e, t, n) => {
991
1007
  ...m[y],
992
1008
  ...x
993
1009
  }
994
- }, N && w <= 50 && (w++, typeof N == "object" && (N.placement && (g = N.placement), N.rects && (c = N.rects === !0 ? await i.getElementRects({
1010
+ }, T && w <= 50 && (w++, typeof T == "object" && (T.placement && (b = T.placement), T.rects && (c = T.rects === !0 ? await i.getElementRects({
995
1011
  reference: e,
996
1012
  floating: t,
997
1013
  strategy: o
998
- }) : N.rects), {
1014
+ }) : T.rects), {
999
1015
  x: f,
1000
1016
  y: p
1001
- } = Ro(c, g, l)), h = -1);
1017
+ } = Ro(c, b, l)), h = -1);
1002
1018
  }
1003
1019
  return {
1004
1020
  x: f,
1005
1021
  y: p,
1006
- placement: g,
1022
+ placement: b,
1007
1023
  strategy: o,
1008
1024
  middlewareData: m
1009
1025
  };
@@ -1022,9 +1038,9 @@ async function Bt(e, t) {
1022
1038
  boundary: c = "clippingAncestors",
1023
1039
  rootBoundary: f = "viewport",
1024
1040
  elementContext: p = "floating",
1025
- altBoundary: g = !1,
1041
+ altBoundary: b = !1,
1026
1042
  padding: m = 0
1027
- } = Ge(t, e), w = ps(m), y = a[g ? p === "floating" ? "reference" : "floating" : p], C = bn(await s.getClippingRect({
1043
+ } = Ge(t, e), w = ps(m), y = a[b ? p === "floating" ? "reference" : "floating" : p], C = bn(await s.getClippingRect({
1028
1044
  element: (n = await (s.isElement == null ? void 0 : s.isElement(y))) == null || n ? y : y.contextElement || await (s.getDocumentElement == null ? void 0 : s.getDocumentElement(a.floating)),
1029
1045
  boundary: c,
1030
1046
  rootBoundary: f,
@@ -1040,17 +1056,17 @@ async function Bt(e, t) {
1040
1056
  } : {
1041
1057
  x: 1,
1042
1058
  y: 1
1043
- }, N = bn(s.convertOffsetParentRelativeRectToViewportRelativeRect ? await s.convertOffsetParentRelativeRectToViewportRelativeRect({
1059
+ }, T = bn(s.convertOffsetParentRelativeRectToViewportRelativeRect ? await s.convertOffsetParentRelativeRectToViewportRelativeRect({
1044
1060
  elements: a,
1045
1061
  rect: E,
1046
1062
  offsetParent: A,
1047
1063
  strategy: l
1048
1064
  }) : E);
1049
1065
  return {
1050
- top: (C.top - N.top + w.top) / x.y,
1051
- bottom: (N.bottom - C.bottom + w.bottom) / x.y,
1052
- left: (C.left - N.left + w.left) / x.x,
1053
- right: (N.right - C.right + w.right) / x.x
1066
+ top: (C.top - T.top + w.top) / x.y,
1067
+ bottom: (T.bottom - C.bottom + w.bottom) / x.y,
1068
+ left: (C.left - T.left + w.left) / x.x,
1069
+ right: (T.right - C.right + w.right) / x.x
1054
1070
  };
1055
1071
  }
1056
1072
  const Kl = (e) => ({
@@ -1071,23 +1087,23 @@ const Kl = (e) => ({
1071
1087
  } = Ge(e, t) || {};
1072
1088
  if (c == null)
1073
1089
  return {};
1074
- const p = ps(f), g = {
1090
+ const p = ps(f), b = {
1075
1091
  x: n,
1076
1092
  y: r
1077
- }, m = Fr(o), w = Lr(m), h = await i.getDimensions(c), y = m === "y", C = y ? "top" : "left", E = y ? "bottom" : "right", A = y ? "clientHeight" : "clientWidth", x = s.reference[w] + s.reference[m] - g[m] - s.floating[w], N = g[m] - s.reference[m], D = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(c));
1093
+ }, m = Fr(o), w = Lr(m), h = await i.getDimensions(c), y = m === "y", C = y ? "top" : "left", E = y ? "bottom" : "right", A = y ? "clientHeight" : "clientWidth", x = s.reference[w] + s.reference[m] - b[m] - s.floating[w], T = b[m] - s.reference[m], D = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(c));
1078
1094
  let O = D ? D[A] : 0;
1079
1095
  (!O || !await (i.isElement == null ? void 0 : i.isElement(D))) && (O = a.floating[A] || s.floating[w]);
1080
- const k = x / 2 - N / 2, W = O / 2 - h[w] / 2 - 1, H = Qe(p[C], W), U = Qe(p[E], W), j = H, b = O - h[w] - U, S = O / 2 - h[w] / 2 + k, T = gr(j, S, b), P = !l.arrow && Et(o) != null && S !== T && s.reference[w] / 2 - (S < j ? H : U) - h[w] / 2 < 0, _ = P ? S < j ? S - j : S - b : 0;
1096
+ const P = x / 2 - T / 2, W = O / 2 - h[w] / 2 - 1, H = Qe(p[C], W), U = Qe(p[E], W), V = H, g = O - h[w] - U, S = O / 2 - h[w] / 2 + P, N = gr(V, S, g), k = !l.arrow && Et(o) != null && S !== N && s.reference[w] / 2 - (S < V ? H : U) - h[w] / 2 < 0, _ = k ? S < V ? S - V : S - g : 0;
1081
1097
  return {
1082
- [m]: g[m] + _,
1098
+ [m]: b[m] + _,
1083
1099
  data: {
1084
- [m]: T,
1085
- centerOffset: S - T - _,
1086
- ...P && {
1100
+ [m]: N,
1101
+ centerOffset: S - N - _,
1102
+ ...k && {
1087
1103
  alignmentOffset: _
1088
1104
  }
1089
1105
  },
1090
- reset: P
1106
+ reset: k
1091
1107
  };
1092
1108
  }
1093
1109
  }), Xl = function(e) {
@@ -1106,7 +1122,7 @@ const Kl = (e) => ({
1106
1122
  } = t, {
1107
1123
  mainAxis: f = !0,
1108
1124
  crossAxis: p = !0,
1109
- fallbackPlacements: g,
1125
+ fallbackPlacements: b,
1110
1126
  fallbackStrategy: m = "bestFit",
1111
1127
  fallbackAxisSideDirection: w = "none",
1112
1128
  flipAlignment: h = !0,
@@ -1114,21 +1130,21 @@ const Kl = (e) => ({
1114
1130
  } = Ge(e, t);
1115
1131
  if ((n = s.arrow) != null && n.alignmentOffset)
1116
1132
  return {};
1117
- const C = Ye(o), E = $e(a), A = Ye(a) === a, x = await (l.isRTL == null ? void 0 : l.isRTL(c.floating)), N = g || (A || !h ? [gn(a)] : Ul(a)), D = w !== "none";
1118
- !g && D && N.push(...jl(a, h, w, x));
1119
- const O = [a, ...N], k = await Bt(t, y), W = [];
1133
+ const C = Ye(o), E = $e(a), A = Ye(a) === a, x = await (l.isRTL == null ? void 0 : l.isRTL(c.floating)), T = b || (A || !h ? [gn(a)] : Ul(a)), D = w !== "none";
1134
+ !b && D && T.push(...Vl(a, h, w, x));
1135
+ const O = [a, ...T], P = await Bt(t, y), W = [];
1120
1136
  let H = ((r = s.flip) == null ? void 0 : r.overflows) || [];
1121
- if (f && W.push(k[C]), p) {
1137
+ if (f && W.push(P[C]), p) {
1122
1138
  const S = Bl(o, i, x);
1123
- W.push(k[S[0]], k[S[1]]);
1139
+ W.push(P[S[0]], P[S[1]]);
1124
1140
  }
1125
1141
  if (H = [...H, {
1126
1142
  placement: o,
1127
1143
  overflows: W
1128
1144
  }], !W.every((S) => S <= 0)) {
1129
- var U, j;
1130
- const S = (((U = s.flip) == null ? void 0 : U.index) || 0) + 1, T = O[S];
1131
- if (T && (!(p === "alignment" ? E !== $e(T) : !1) || // We leave the current main axis only if every placement on that axis
1145
+ var U, V;
1146
+ const S = (((U = s.flip) == null ? void 0 : U.index) || 0) + 1, N = O[S];
1147
+ if (N && (!(p === "alignment" ? E !== $e(N) : !1) || // We leave the current main axis only if every placement on that axis
1132
1148
  // overflows the main axis.
1133
1149
  H.every((R) => $e(R.placement) === E ? R.overflows[0] > 0 : !0)))
1134
1150
  return {
@@ -1137,15 +1153,15 @@ const Kl = (e) => ({
1137
1153
  overflows: H
1138
1154
  },
1139
1155
  reset: {
1140
- placement: T
1156
+ placement: N
1141
1157
  }
1142
1158
  };
1143
- let P = (j = H.filter((_) => _.overflows[0] <= 0).sort((_, R) => _.overflows[1] - R.overflows[1])[0]) == null ? void 0 : j.placement;
1144
- if (!P)
1159
+ let k = (V = H.filter((_) => _.overflows[0] <= 0).sort((_, R) => _.overflows[1] - R.overflows[1])[0]) == null ? void 0 : V.placement;
1160
+ if (!k)
1145
1161
  switch (m) {
1146
1162
  case "bestFit": {
1147
- var b;
1148
- const _ = (b = H.filter((R) => {
1163
+ var g;
1164
+ const _ = (g = H.filter((R) => {
1149
1165
  if (D) {
1150
1166
  const K = $e(R.placement);
1151
1167
  return K === E || // Create a bias to the `y` side axis due to horizontal
@@ -1153,18 +1169,18 @@ const Kl = (e) => ({
1153
1169
  K === "y";
1154
1170
  }
1155
1171
  return !0;
1156
- }).map((R) => [R.placement, R.overflows.filter((K) => K > 0).reduce((K, te) => K + te, 0)]).sort((R, K) => R[1] - K[1])[0]) == null ? void 0 : b[0];
1157
- _ && (P = _);
1172
+ }).map((R) => [R.placement, R.overflows.filter((K) => K > 0).reduce((K, te) => K + te, 0)]).sort((R, K) => R[1] - K[1])[0]) == null ? void 0 : g[0];
1173
+ _ && (k = _);
1158
1174
  break;
1159
1175
  }
1160
1176
  case "initialPlacement":
1161
- P = a;
1177
+ k = a;
1162
1178
  break;
1163
1179
  }
1164
- if (o !== P)
1180
+ if (o !== k)
1165
1181
  return {
1166
1182
  reset: {
1167
- placement: P
1183
+ placement: k
1168
1184
  }
1169
1185
  };
1170
1186
  }
@@ -1232,7 +1248,7 @@ async function Zl(e, t) {
1232
1248
  elements: o
1233
1249
  } = e, s = await (r.isRTL == null ? void 0 : r.isRTL(o.floating)), i = Ye(n), a = Et(n), l = $e(n) === "y", c = ms.has(i) ? -1 : 1, f = s && l ? -1 : 1, p = Ge(t, e);
1234
1250
  let {
1235
- mainAxis: g,
1251
+ mainAxis: b,
1236
1252
  crossAxis: m,
1237
1253
  alignmentAxis: w
1238
1254
  } = typeof p == "number" ? {
@@ -1246,9 +1262,9 @@ async function Zl(e, t) {
1246
1262
  };
1247
1263
  return a && typeof w == "number" && (m = a === "end" ? w * -1 : w), l ? {
1248
1264
  x: m * f,
1249
- y: g * c
1265
+ y: b * c
1250
1266
  } : {
1251
- x: g * c,
1267
+ x: b * c,
1252
1268
  y: m * f
1253
1269
  };
1254
1270
  }
@@ -1302,10 +1318,10 @@ const Ql = function(e) {
1302
1318
  } = Ge(e, t), c = {
1303
1319
  x: n,
1304
1320
  y: r
1305
- }, f = await Bt(t, l), p = $e(Ye(o)), g = Dr(p);
1306
- let m = c[g], w = c[p];
1321
+ }, f = await Bt(t, l), p = $e(Ye(o)), b = Dr(p);
1322
+ let m = c[b], w = c[p];
1307
1323
  if (s) {
1308
- const y = g === "y" ? "top" : "left", C = g === "y" ? "bottom" : "right", E = m + f[y], A = m - f[C];
1324
+ const y = b === "y" ? "top" : "left", C = b === "y" ? "bottom" : "right", E = m + f[y], A = m - f[C];
1309
1325
  m = gr(E, m, A);
1310
1326
  }
1311
1327
  if (i) {
@@ -1314,7 +1330,7 @@ const Ql = function(e) {
1314
1330
  }
1315
1331
  const h = a.fn({
1316
1332
  ...t,
1317
- [g]: m,
1333
+ [b]: m,
1318
1334
  [p]: w
1319
1335
  });
1320
1336
  return {
@@ -1323,7 +1339,7 @@ const Ql = function(e) {
1323
1339
  x: h.x - n,
1324
1340
  y: h.y - r,
1325
1341
  enabled: {
1326
- [g]: s,
1342
+ [b]: s,
1327
1343
  [p]: i
1328
1344
  }
1329
1345
  }
@@ -1347,8 +1363,8 @@ const Ql = function(e) {
1347
1363
  } = Ge(e, t), f = {
1348
1364
  x: n,
1349
1365
  y: r
1350
- }, p = $e(o), g = Dr(p);
1351
- let m = f[g], w = f[p];
1366
+ }, p = $e(o), b = Dr(p);
1367
+ let m = f[b], w = f[p];
1352
1368
  const h = Ge(a, t), y = typeof h == "number" ? {
1353
1369
  mainAxis: h,
1354
1370
  crossAxis: 0
@@ -1358,16 +1374,16 @@ const Ql = function(e) {
1358
1374
  ...h
1359
1375
  };
1360
1376
  if (l) {
1361
- const A = g === "y" ? "height" : "width", x = s.reference[g] - s.floating[A] + y.mainAxis, N = s.reference[g] + s.reference[A] - y.mainAxis;
1362
- m < x ? m = x : m > N && (m = N);
1377
+ const A = b === "y" ? "height" : "width", x = s.reference[b] - s.floating[A] + y.mainAxis, T = s.reference[b] + s.reference[A] - y.mainAxis;
1378
+ m < x ? m = x : m > T && (m = T);
1363
1379
  }
1364
1380
  if (c) {
1365
1381
  var C, E;
1366
- const A = g === "y" ? "width" : "height", x = ms.has(Ye(o)), N = s.reference[p] - s.floating[A] + (x && ((C = i.offset) == null ? void 0 : C[p]) || 0) + (x ? 0 : y.crossAxis), D = s.reference[p] + s.reference[A] + (x ? 0 : ((E = i.offset) == null ? void 0 : E[p]) || 0) - (x ? y.crossAxis : 0);
1367
- w < N ? w = N : w > D && (w = D);
1382
+ const A = b === "y" ? "width" : "height", x = ms.has(Ye(o)), T = s.reference[p] - s.floating[A] + (x && ((C = i.offset) == null ? void 0 : C[p]) || 0) + (x ? 0 : y.crossAxis), D = s.reference[p] + s.reference[A] + (x ? 0 : ((E = i.offset) == null ? void 0 : E[p]) || 0) - (x ? y.crossAxis : 0);
1383
+ w < T ? w = T : w > D && (w = D);
1368
1384
  }
1369
1385
  return {
1370
- [g]: m,
1386
+ [b]: m,
1371
1387
  [p]: w
1372
1388
  };
1373
1389
  }
@@ -1387,21 +1403,21 @@ const Ql = function(e) {
1387
1403
  apply: l = () => {
1388
1404
  },
1389
1405
  ...c
1390
- } = Ge(e, t), f = await Bt(t, c), p = Ye(o), g = Et(o), m = $e(o) === "y", {
1406
+ } = Ge(e, t), f = await Bt(t, c), p = Ye(o), b = Et(o), m = $e(o) === "y", {
1391
1407
  width: w,
1392
1408
  height: h
1393
1409
  } = s.floating;
1394
1410
  let y, C;
1395
- p === "top" || p === "bottom" ? (y = p, C = g === (await (i.isRTL == null ? void 0 : i.isRTL(a.floating)) ? "start" : "end") ? "left" : "right") : (C = p, y = g === "end" ? "top" : "bottom");
1396
- const E = h - f.top - f.bottom, A = w - f.left - f.right, x = Qe(h - f[y], E), N = Qe(w - f[C], A), D = !t.middlewareData.shift;
1397
- let O = x, k = N;
1398
- if ((n = t.middlewareData.shift) != null && n.enabled.x && (k = A), (r = t.middlewareData.shift) != null && r.enabled.y && (O = E), D && !g) {
1399
- const H = xe(f.left, 0), U = xe(f.right, 0), j = xe(f.top, 0), b = xe(f.bottom, 0);
1400
- m ? k = w - 2 * (H !== 0 || U !== 0 ? H + U : xe(f.left, f.right)) : O = h - 2 * (j !== 0 || b !== 0 ? j + b : xe(f.top, f.bottom));
1411
+ p === "top" || p === "bottom" ? (y = p, C = b === (await (i.isRTL == null ? void 0 : i.isRTL(a.floating)) ? "start" : "end") ? "left" : "right") : (C = p, y = b === "end" ? "top" : "bottom");
1412
+ const E = h - f.top - f.bottom, A = w - f.left - f.right, x = Qe(h - f[y], E), T = Qe(w - f[C], A), D = !t.middlewareData.shift;
1413
+ let O = x, P = T;
1414
+ if ((n = t.middlewareData.shift) != null && n.enabled.x && (P = A), (r = t.middlewareData.shift) != null && r.enabled.y && (O = E), D && !b) {
1415
+ const H = xe(f.left, 0), U = xe(f.right, 0), V = xe(f.top, 0), g = xe(f.bottom, 0);
1416
+ m ? P = w - 2 * (H !== 0 || U !== 0 ? H + U : xe(f.left, f.right)) : O = h - 2 * (V !== 0 || g !== 0 ? V + g : xe(f.top, f.bottom));
1401
1417
  }
1402
1418
  await l({
1403
1419
  ...t,
1404
- availableWidth: k,
1420
+ availableWidth: P,
1405
1421
  availableHeight: O
1406
1422
  });
1407
1423
  const W = await i.getDimensions(a.floating);
@@ -1440,7 +1456,7 @@ function ko(e) {
1440
1456
  return !Cn() || typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof Se(e).ShadowRoot;
1441
1457
  }
1442
1458
  const nc = /* @__PURE__ */ new Set(["inline", "contents"]);
1443
- function Vt(e) {
1459
+ function jt(e) {
1444
1460
  const {
1445
1461
  overflow: t,
1446
1462
  overflowX: n,
@@ -1512,7 +1528,7 @@ function Je(e) {
1512
1528
  }
1513
1529
  function gs(e) {
1514
1530
  const t = Je(e);
1515
- return St(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : Be(t) && Vt(t) ? t : gs(t);
1531
+ return St(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : Be(t) && jt(t) ? t : gs(t);
1516
1532
  }
1517
1533
  function Ut(e, t, n) {
1518
1534
  var r;
@@ -1520,7 +1536,7 @@ function Ut(e, t, n) {
1520
1536
  const o = gs(e), s = o === ((r = e.ownerDocument) == null ? void 0 : r.body), i = Se(o);
1521
1537
  if (s) {
1522
1538
  const a = vr(i);
1523
- return t.concat(i, i.visualViewport || [], Vt(o) ? o : [], a && n ? Ut(a) : []);
1539
+ return t.concat(i, i.visualViewport || [], jt(o) ? o : [], a && n ? Ut(a) : []);
1524
1540
  }
1525
1541
  return t.concat(o, Ut(o, [], n));
1526
1542
  }
@@ -1574,8 +1590,8 @@ function at(e, t, n, r) {
1574
1590
  const a = fc(s, n, r) ? vs(s) : ze(0);
1575
1591
  let l = (o.left + a.x) / i.x, c = (o.top + a.y) / i.y, f = o.width / i.x, p = o.height / i.y;
1576
1592
  if (s) {
1577
- const g = Se(s), m = r && _e(r) ? Se(r) : r;
1578
- let w = g, h = vr(w);
1593
+ const b = Se(s), m = r && _e(r) ? Se(r) : r;
1594
+ let w = b, h = vr(w);
1579
1595
  for (; h && r && m !== w; ) {
1580
1596
  const y = wt(h), C = h.getBoundingClientRect(), E = Oe(h), A = C.left + (h.clientLeft + parseFloat(E.paddingLeft)) * y.x, x = C.top + (h.clientTop + parseFloat(E.paddingTop)) * y.y;
1581
1597
  l *= y.x, c *= y.y, f *= y.x, p *= y.y, l += A, c += x, w = Se(h), h = vr(w);
@@ -1614,16 +1630,16 @@ function pc(e) {
1614
1630
  scrollTop: 0
1615
1631
  }, c = ze(1);
1616
1632
  const f = ze(0), p = Be(r);
1617
- if ((p || !p && !s) && ((At(r) !== "body" || Vt(i)) && (l = An(r)), Be(r))) {
1633
+ if ((p || !p && !s) && ((At(r) !== "body" || jt(i)) && (l = An(r)), Be(r))) {
1618
1634
  const m = at(r);
1619
1635
  c = wt(r), f.x = m.x + r.clientLeft, f.y = m.y + r.clientTop;
1620
1636
  }
1621
- const g = i && !p && !s ? ys(i, l) : ze(0);
1637
+ const b = i && !p && !s ? ys(i, l) : ze(0);
1622
1638
  return {
1623
1639
  width: n.width * c.x,
1624
1640
  height: n.height * c.y,
1625
- x: n.x * c.x - l.scrollLeft * c.x + f.x + g.x,
1626
- y: n.y * c.y - l.scrollTop * c.y + f.y + g.y
1641
+ x: n.x * c.x - l.scrollLeft * c.x + f.x + b.x,
1642
+ y: n.y * c.y - l.scrollTop * c.y + f.y + b.y
1627
1643
  };
1628
1644
  }
1629
1645
  function mc(e) {
@@ -1651,7 +1667,7 @@ function gc(e, t) {
1651
1667
  }
1652
1668
  const c = Rn(r);
1653
1669
  if (c <= 0) {
1654
- const f = r.ownerDocument, p = f.body, g = getComputedStyle(p), m = f.compatMode === "CSS1Compat" && parseFloat(g.marginLeft) + parseFloat(g.marginRight) || 0, w = Math.abs(r.clientWidth - p.clientWidth - m);
1670
+ const f = r.ownerDocument, p = f.body, b = getComputedStyle(p), m = f.compatMode === "CSS1Compat" && parseFloat(b.marginLeft) + parseFloat(b.marginRight) || 0, w = Math.abs(r.clientWidth - p.clientWidth - m);
1655
1671
  w <= Po && (s -= w);
1656
1672
  } else c <= Po && (s += c);
1657
1673
  return {
@@ -1703,7 +1719,7 @@ function yc(e, t) {
1703
1719
  let i = s ? Je(e) : e;
1704
1720
  for (; _e(i) && !St(i); ) {
1705
1721
  const a = Oe(i), l = $r(i);
1706
- !l && a.position === "fixed" && (o = null), (s ? !l && !o : !l && a.position === "static" && !!o && bc.has(o.position) || Vt(i) && !l && ws(e, i)) ? r = r.filter((f) => f !== i) : o = a, i = Je(i);
1722
+ !l && a.position === "fixed" && (o = null), (s ? !l && !o : !l && a.position === "static" && !!o && bc.has(o.position) || jt(i) && !l && ws(e, i)) ? r = r.filter((f) => f !== i) : o = a, i = Je(i);
1707
1723
  }
1708
1724
  return t.set(e, r), r;
1709
1725
  }
@@ -1746,15 +1762,15 @@ function Sc(e, t, n) {
1746
1762
  l.x = Rn(o);
1747
1763
  }
1748
1764
  if (r || !r && !s)
1749
- if ((At(t) !== "body" || Vt(o)) && (a = An(t)), r) {
1765
+ if ((At(t) !== "body" || jt(o)) && (a = An(t)), r) {
1750
1766
  const m = at(t, !0, s, t);
1751
1767
  l.x = m.x + t.clientLeft, l.y = m.y + t.clientTop;
1752
1768
  } else o && c();
1753
1769
  s && !r && o && c();
1754
- const f = o && !r && !s ? ys(o, a) : ze(0), p = i.left + a.scrollLeft - l.x - f.x, g = i.top + a.scrollTop - l.y - f.y;
1770
+ const f = o && !r && !s ? ys(o, a) : ze(0), p = i.left + a.scrollLeft - l.x - f.x, b = i.top + a.scrollTop - l.y - f.y;
1755
1771
  return {
1756
1772
  x: p,
1757
- y: g,
1773
+ y: b,
1758
1774
  width: i.width,
1759
1775
  height: i.height
1760
1776
  };
@@ -1830,17 +1846,17 @@ function Rc(e, t) {
1830
1846
  const c = e.getBoundingClientRect(), {
1831
1847
  left: f,
1832
1848
  top: p,
1833
- width: g,
1849
+ width: b,
1834
1850
  height: m
1835
1851
  } = c;
1836
- if (a || t(), !g || !m)
1852
+ if (a || t(), !b || !m)
1837
1853
  return;
1838
- const w = Jt(p), h = Jt(o.clientWidth - (f + g)), y = Jt(o.clientHeight - (p + m)), C = Jt(f), A = {
1854
+ const w = Jt(p), h = Jt(o.clientWidth - (f + b)), y = Jt(o.clientHeight - (p + m)), C = Jt(f), A = {
1839
1855
  rootMargin: -w + "px " + -h + "px " + -y + "px " + -C + "px",
1840
1856
  threshold: xe(0, Qe(1, l)) || 1
1841
1857
  };
1842
1858
  let x = !0;
1843
- function N(D) {
1859
+ function T(D) {
1844
1860
  const O = D[0].intersectionRatio;
1845
1861
  if (O !== l) {
1846
1862
  if (!x)
@@ -1852,13 +1868,13 @@ function Rc(e, t) {
1852
1868
  O === 1 && !Ss(c, e.getBoundingClientRect()) && i(), x = !1;
1853
1869
  }
1854
1870
  try {
1855
- n = new IntersectionObserver(N, {
1871
+ n = new IntersectionObserver(T, {
1856
1872
  ...A,
1857
1873
  // Handle <iframe>s
1858
1874
  root: o.ownerDocument
1859
1875
  });
1860
1876
  } catch {
1861
- n = new IntersectionObserver(N, A);
1877
+ n = new IntersectionObserver(T, A);
1862
1878
  }
1863
1879
  n.observe(e);
1864
1880
  }
@@ -1879,10 +1895,10 @@ function Nc(e, t, n, r) {
1879
1895
  }), s && C.addEventListener("resize", n);
1880
1896
  });
1881
1897
  const p = c && a ? Rc(c, n) : null;
1882
- let g = -1, m = null;
1898
+ let b = -1, m = null;
1883
1899
  i && (m = new ResizeObserver((C) => {
1884
1900
  let [E] = C;
1885
- E && E.target === c && m && (m.unobserve(t), cancelAnimationFrame(g), g = requestAnimationFrame(() => {
1901
+ E && E.target === c && m && (m.unobserve(t), cancelAnimationFrame(b), b = requestAnimationFrame(() => {
1886
1902
  var A;
1887
1903
  (A = m) == null || A.observe(t);
1888
1904
  })), n();
@@ -1979,19 +1995,19 @@ function Fc(e) {
1979
1995
  placement: t,
1980
1996
  middlewareData: {},
1981
1997
  isPositioned: !1
1982
- }), [g, m] = d.useState(r);
1983
- vn(g, r) || m(r);
1998
+ }), [b, m] = d.useState(r);
1999
+ vn(b, r) || m(r);
1984
2000
  const [w, h] = d.useState(null), [y, C] = d.useState(null), E = d.useCallback((R) => {
1985
2001
  R !== D.current && (D.current = R, h(R));
1986
2002
  }, []), A = d.useCallback((R) => {
1987
2003
  R !== O.current && (O.current = R, C(R));
1988
- }, []), x = s || w, N = i || y, D = d.useRef(null), O = d.useRef(null), k = d.useRef(f), W = l != null, H = Jn(l), U = Jn(o), j = Jn(c), b = d.useCallback(() => {
2004
+ }, []), x = s || w, T = i || y, D = d.useRef(null), O = d.useRef(null), P = d.useRef(f), W = l != null, H = Jn(l), U = Jn(o), V = Jn(c), g = d.useCallback(() => {
1989
2005
  if (!D.current || !O.current)
1990
2006
  return;
1991
2007
  const R = {
1992
2008
  placement: t,
1993
2009
  strategy: n,
1994
- middleware: g
2010
+ middleware: b
1995
2011
  };
1996
2012
  U.current && (R.platform = U.current), Mc(D.current, O.current, R).then((K) => {
1997
2013
  const te = {
@@ -2000,15 +2016,15 @@ function Fc(e) {
2000
2016
  // but still mounted (such as when transitioning out). To ensure
2001
2017
  // `isPositioned` will be `false` initially on the next open, avoid
2002
2018
  // setting it to `true` when `open === false` (must be specified).
2003
- isPositioned: j.current !== !1
2019
+ isPositioned: V.current !== !1
2004
2020
  };
2005
- S.current && !vn(k.current, te) && (k.current = te, Sn.flushSync(() => {
2021
+ S.current && !vn(P.current, te) && (P.current = te, Sn.flushSync(() => {
2006
2022
  p(te);
2007
2023
  }));
2008
2024
  });
2009
- }, [g, t, n, U, j]);
2025
+ }, [b, t, n, U, V]);
2010
2026
  un(() => {
2011
- c === !1 && k.current.isPositioned && (k.current.isPositioned = !1, p((R) => ({
2027
+ c === !1 && P.current.isPositioned && (P.current.isPositioned = !1, p((R) => ({
2012
2028
  ...R,
2013
2029
  isPositioned: !1
2014
2030
  })));
@@ -2017,33 +2033,33 @@ function Fc(e) {
2017
2033
  un(() => (S.current = !0, () => {
2018
2034
  S.current = !1;
2019
2035
  }), []), un(() => {
2020
- if (x && (D.current = x), N && (O.current = N), x && N) {
2036
+ if (x && (D.current = x), T && (O.current = T), x && T) {
2021
2037
  if (H.current)
2022
- return H.current(x, N, b);
2023
- b();
2038
+ return H.current(x, T, g);
2039
+ g();
2024
2040
  }
2025
- }, [x, N, b, H, W]);
2026
- const T = d.useMemo(() => ({
2041
+ }, [x, T, g, H, W]);
2042
+ const N = d.useMemo(() => ({
2027
2043
  reference: D,
2028
2044
  floating: O,
2029
2045
  setReference: E,
2030
2046
  setFloating: A
2031
- }), [E, A]), P = d.useMemo(() => ({
2047
+ }), [E, A]), k = d.useMemo(() => ({
2032
2048
  reference: x,
2033
- floating: N
2034
- }), [x, N]), _ = d.useMemo(() => {
2049
+ floating: T
2050
+ }), [x, T]), _ = d.useMemo(() => {
2035
2051
  const R = {
2036
2052
  position: n,
2037
2053
  left: 0,
2038
2054
  top: 0
2039
2055
  };
2040
- if (!P.floating)
2056
+ if (!k.floating)
2041
2057
  return R;
2042
- const K = Mo(P.floating, f.x), te = Mo(P.floating, f.y);
2058
+ const K = Mo(k.floating, f.x), te = Mo(k.floating, f.y);
2043
2059
  return a ? {
2044
2060
  ...R,
2045
2061
  transform: "translate(" + K + "px, " + te + "px)",
2046
- ...Cs(P.floating) >= 1.5 && {
2062
+ ...Cs(k.floating) >= 1.5 && {
2047
2063
  willChange: "transform"
2048
2064
  }
2049
2065
  } : {
@@ -2051,14 +2067,14 @@ function Fc(e) {
2051
2067
  left: K,
2052
2068
  top: te
2053
2069
  };
2054
- }, [n, a, P.floating, f.x, f.y]);
2070
+ }, [n, a, k.floating, f.x, f.y]);
2055
2071
  return d.useMemo(() => ({
2056
2072
  ...f,
2057
- update: b,
2058
- refs: T,
2059
- elements: P,
2073
+ update: g,
2074
+ refs: N,
2075
+ elements: k,
2060
2076
  floatingStyles: _
2061
- }), [f, b, T, P, _]);
2077
+ }), [f, g, N, k, _]);
2062
2078
  }
2063
2079
  const $c = (e) => {
2064
2080
  function t(n) {
@@ -2096,10 +2112,10 @@ const $c = (e) => {
2096
2112
  }), Hc = (e, t) => ({
2097
2113
  ..._c(e),
2098
2114
  options: [e, t]
2099
- }), Vc = (e, t) => ({
2115
+ }), jc = (e, t) => ({
2100
2116
  ...Oc(e),
2101
2117
  options: [e, t]
2102
- }), jc = (e, t) => ({
2118
+ }), Vc = (e, t) => ({
2103
2119
  ...$c(e),
2104
2120
  options: [e, t]
2105
2121
  });
@@ -2218,16 +2234,16 @@ var Wr = "PopperContent", [Qc, Jc] = Ns(Wr), Os = d.forwardRef(
2218
2234
  collisionBoundary: c = [],
2219
2235
  collisionPadding: f = 0,
2220
2236
  sticky: p = "partial",
2221
- hideWhenDetached: g = !1,
2237
+ hideWhenDetached: b = !1,
2222
2238
  updatePositionStrategy: m = "optimized",
2223
2239
  onPlaced: w,
2224
2240
  ...h
2225
- } = e, y = Ts(Wr, n), [C, E] = d.useState(null), A = se(t, (L) => E(L)), [x, N] = d.useState(null), D = Rs(x), O = D?.width ?? 0, k = D?.height ?? 0, W = r + (s !== "center" ? "-" + s : ""), H = typeof f == "number" ? f : { top: 0, right: 0, bottom: 0, left: 0, ...f }, U = Array.isArray(c) ? c : [c], j = U.length > 0, b = {
2241
+ } = e, y = Ts(Wr, n), [C, E] = d.useState(null), A = se(t, (L) => E(L)), [x, T] = d.useState(null), D = Rs(x), O = D?.width ?? 0, P = D?.height ?? 0, W = r + (s !== "center" ? "-" + s : ""), H = typeof f == "number" ? f : { top: 0, right: 0, bottom: 0, left: 0, ...f }, U = Array.isArray(c) ? c : [c], V = U.length > 0, g = {
2226
2242
  padding: H,
2227
2243
  boundary: U.filter(tu),
2228
2244
  // with `strategy: 'fixed'`, this is the only way to get it to respect boundaries
2229
- altBoundary: j
2230
- }, { refs: S, floatingStyles: T, placement: P, isPositioned: _, middlewareData: R } = Fc({
2245
+ altBoundary: V
2246
+ }, { refs: S, floatingStyles: N, placement: k, isPositioned: _, middlewareData: R } = Fc({
2231
2247
  // default to `fixed` strategy so users don't have to pick and we also avoid focus scroll issues
2232
2248
  strategy: "fixed",
2233
2249
  placement: W,
@@ -2238,29 +2254,29 @@ var Wr = "PopperContent", [Qc, Jc] = Ns(Wr), Os = d.forwardRef(
2238
2254
  reference: y.anchor
2239
2255
  },
2240
2256
  middleware: [
2241
- zc({ mainAxis: o + k, alignmentAxis: i }),
2257
+ zc({ mainAxis: o + P, alignmentAxis: i }),
2242
2258
  l && Bc({
2243
2259
  mainAxis: !0,
2244
2260
  crossAxis: !1,
2245
2261
  limiter: p === "partial" ? Uc() : void 0,
2246
- ...b
2262
+ ...g
2247
2263
  }),
2248
- l && Wc({ ...b }),
2264
+ l && Wc({ ...g }),
2249
2265
  Hc({
2250
- ...b,
2266
+ ...g,
2251
2267
  apply: ({ elements: L, rects: J, availableWidth: ie, availableHeight: q }) => {
2252
2268
  const { width: ee, height: ne } = J.reference, le = L.floating.style;
2253
2269
  le.setProperty("--radix-popper-available-width", `${ie}px`), le.setProperty("--radix-popper-available-height", `${q}px`), le.setProperty("--radix-popper-anchor-width", `${ee}px`), le.setProperty("--radix-popper-anchor-height", `${ne}px`);
2254
2270
  }
2255
2271
  }),
2256
- x && jc({ element: x, padding: a }),
2257
- nu({ arrowWidth: O, arrowHeight: k }),
2258
- g && Vc({ strategy: "referenceHidden", ...b })
2272
+ x && Vc({ element: x, padding: a }),
2273
+ nu({ arrowWidth: O, arrowHeight: P }),
2274
+ b && jc({ strategy: "referenceHidden", ...g })
2259
2275
  ]
2260
- }), [K, te] = Ds(P), V = Ze(w);
2276
+ }), [K, te] = Ds(k), j = Ze(w);
2261
2277
  he(() => {
2262
- _ && V?.();
2263
- }, [_, V]);
2278
+ _ && j?.();
2279
+ }, [_, j]);
2264
2280
  const Ee = R.arrow?.x, G = R.arrow?.y, re = R.arrow?.centerOffset !== 0, [Q, pe] = d.useState();
2265
2281
  return he(() => {
2266
2282
  C && pe(window.getComputedStyle(C).zIndex);
@@ -2270,8 +2286,8 @@ var Wr = "PopperContent", [Qc, Jc] = Ns(Wr), Os = d.forwardRef(
2270
2286
  ref: S.setFloating,
2271
2287
  "data-radix-popper-content-wrapper": "",
2272
2288
  style: {
2273
- ...T,
2274
- transform: _ ? T.transform : "translate(0, -200%)",
2289
+ ...N,
2290
+ transform: _ ? N.transform : "translate(0, -200%)",
2275
2291
  // keep off the page when measuring
2276
2292
  minWidth: "max-content",
2277
2293
  zIndex: Q,
@@ -2293,7 +2309,7 @@ var Wr = "PopperContent", [Qc, Jc] = Ns(Wr), Os = d.forwardRef(
2293
2309
  {
2294
2310
  scope: n,
2295
2311
  placedSide: K,
2296
- onArrowChange: N,
2312
+ onArrowChange: T,
2297
2313
  arrowX: Ee,
2298
2314
  arrowY: G,
2299
2315
  shouldHideArrow: re,
@@ -2377,9 +2393,9 @@ var nu = (e) => ({
2377
2393
  name: "transformOrigin",
2378
2394
  options: e,
2379
2395
  fn(t) {
2380
- const { placement: n, rects: r, middlewareData: o } = t, i = o.arrow?.centerOffset !== 0, a = i ? 0 : e.arrowWidth, l = i ? 0 : e.arrowHeight, [c, f] = Ds(n), p = { start: "0%", center: "50%", end: "100%" }[f], g = (o.arrow?.x ?? 0) + a / 2, m = (o.arrow?.y ?? 0) + l / 2;
2396
+ const { placement: n, rects: r, middlewareData: o } = t, i = o.arrow?.centerOffset !== 0, a = i ? 0 : e.arrowWidth, l = i ? 0 : e.arrowHeight, [c, f] = Ds(n), p = { start: "0%", center: "50%", end: "100%" }[f], b = (o.arrow?.x ?? 0) + a / 2, m = (o.arrow?.y ?? 0) + l / 2;
2381
2397
  let w = "", h = "";
2382
- return c === "bottom" ? (w = i ? p : `${g}px`, h = `${-l}px`) : c === "top" ? (w = i ? p : `${g}px`, h = `${r.floating.height + l}px`) : c === "right" ? (w = `${-l}px`, h = i ? p : `${m}px`) : c === "left" && (w = `${r.floating.width + l}px`, h = i ? p : `${m}px`), { data: { x: w, y: h } };
2398
+ return c === "bottom" ? (w = i ? p : `${b}px`, h = `${-l}px`) : c === "top" ? (w = i ? p : `${b}px`, h = `${r.floating.height + l}px`) : c === "right" ? (w = `${-l}px`, h = i ? p : `${m}px`) : c === "left" && (w = `${r.floating.width + l}px`, h = i ? p : `${m}px`), { data: { x: w, y: h } };
2383
2399
  }
2384
2400
  });
2385
2401
  function Ds(e) {
@@ -2410,13 +2426,13 @@ var Ls = ks, Hr = _s, Fs = Os, $s = Ms, ru = [
2410
2426
  return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ u(l, { ...a, ref: s });
2411
2427
  });
2412
2428
  return r.displayName = `Primitive.${t}`, { ...e, [t]: r };
2413
- }, {}), su = "Portal", Vr = d.forwardRef((e, t) => {
2429
+ }, {}), su = "Portal", jr = d.forwardRef((e, t) => {
2414
2430
  const { container: n, ...r } = e, [o, s] = d.useState(!1);
2415
2431
  he(() => s(!0), []);
2416
2432
  const i = n || o && globalThis?.document?.body;
2417
2433
  return i ? Oa.createPortal(/* @__PURE__ */ u(ou.div, { ...r, ref: t }), i) : null;
2418
2434
  });
2419
- Vr.displayName = su;
2435
+ jr.displayName = su;
2420
2436
  var iu = [
2421
2437
  "a",
2422
2438
  "button",
@@ -2563,22 +2579,22 @@ var mu = function(e) {
2563
2579
  };
2564
2580
  o.forEach(c);
2565
2581
  var f = function(p) {
2566
- !p || l.has(p) || Array.prototype.forEach.call(p.children, function(g) {
2567
- if (a.has(g))
2568
- f(g);
2582
+ !p || l.has(p) || Array.prototype.forEach.call(p.children, function(b) {
2583
+ if (a.has(b))
2584
+ f(b);
2569
2585
  else
2570
2586
  try {
2571
- var m = g.getAttribute(r), w = m !== null && m !== "false", h = (gt.get(g) || 0) + 1, y = (s.get(g) || 0) + 1;
2572
- gt.set(g, h), s.set(g, y), i.push(g), h === 1 && w && en.set(g, !0), y === 1 && g.setAttribute(n, "true"), w || g.setAttribute(r, "true");
2587
+ var m = b.getAttribute(r), w = m !== null && m !== "false", h = (gt.get(b) || 0) + 1, y = (s.get(b) || 0) + 1;
2588
+ gt.set(b, h), s.set(b, y), i.push(b), h === 1 && w && en.set(b, !0), y === 1 && b.setAttribute(n, "true"), w || b.setAttribute(r, "true");
2573
2589
  } catch (C) {
2574
- console.error("aria-hidden: cannot operate on ", g, C);
2590
+ console.error("aria-hidden: cannot operate on ", b, C);
2575
2591
  }
2576
2592
  });
2577
2593
  };
2578
2594
  return f(t), a.clear(), er++, function() {
2579
2595
  i.forEach(function(p) {
2580
- var g = gt.get(p) - 1, m = s.get(p) - 1;
2581
- gt.set(p, g), s.set(p, m), g || (en.has(p) || p.removeAttribute(r), en.delete(p)), m || p.removeAttribute(n);
2596
+ var b = gt.get(p) - 1, m = s.get(p) - 1;
2597
+ gt.set(p, b), s.set(p, m), b || (en.has(p) || p.removeAttribute(r), en.delete(p)), m || p.removeAttribute(n);
2582
2598
  }), er--, er || (gt = /* @__PURE__ */ new WeakMap(), gt = /* @__PURE__ */ new WeakMap(), en = /* @__PURE__ */ new WeakMap(), tn = {});
2583
2599
  };
2584
2600
  }, Ws = function(e, t, n) {
@@ -2717,7 +2733,7 @@ function Au(e) {
2717
2733
  var t = Eu(null);
2718
2734
  return t.options = Fe({ async: !0, ssr: !1 }, e), t;
2719
2735
  }
2720
- var Vs = function(e) {
2736
+ var js = function(e) {
2721
2737
  var t = e.sideCar, n = Hs(e, ["sideCar"]);
2722
2738
  if (!t)
2723
2739
  throw new Error("Sidecar: please provide `sideCar` property to import the right car");
@@ -2726,21 +2742,21 @@ var Vs = function(e) {
2726
2742
  throw new Error("Sidecar medium not found");
2727
2743
  return d.createElement(r, Fe({}, n));
2728
2744
  };
2729
- Vs.isSideCarExport = !0;
2745
+ js.isSideCarExport = !0;
2730
2746
  function Ru(e, t) {
2731
- return e.useMedium(t), Vs;
2747
+ return e.useMedium(t), js;
2732
2748
  }
2733
- var js = Au(), nr = function() {
2749
+ var Vs = Au(), nr = function() {
2734
2750
  }, Tn = d.forwardRef(function(e, t) {
2735
2751
  var n = d.useRef(null), r = d.useState({
2736
2752
  onScrollCapture: nr,
2737
2753
  onWheelCapture: nr,
2738
2754
  onTouchMoveCapture: nr
2739
- }), o = r[0], s = r[1], i = e.forwardProps, a = e.children, l = e.className, c = e.removeScrollBar, f = e.enabled, p = e.shards, g = e.sideCar, m = e.noRelative, w = e.noIsolation, h = e.inert, y = e.allowPinchZoom, C = e.as, E = C === void 0 ? "div" : C, A = e.gapMode, x = Hs(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noRelative", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]), N = g, D = Su([n, t]), O = Fe(Fe({}, x), o);
2755
+ }), o = r[0], s = r[1], i = e.forwardProps, a = e.children, l = e.className, c = e.removeScrollBar, f = e.enabled, p = e.shards, b = e.sideCar, m = e.noRelative, w = e.noIsolation, h = e.inert, y = e.allowPinchZoom, C = e.as, E = C === void 0 ? "div" : C, A = e.gapMode, x = Hs(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noRelative", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]), T = b, D = Su([n, t]), O = Fe(Fe({}, x), o);
2740
2756
  return d.createElement(
2741
2757
  d.Fragment,
2742
2758
  null,
2743
- f && d.createElement(N, { sideCar: js, removeScrollBar: c, shards: p, noRelative: m, noIsolation: w, inert: h, setCallbacks: s, allowPinchZoom: !!y, lockRef: n, gapMode: A }),
2759
+ f && d.createElement(T, { sideCar: Vs, removeScrollBar: c, shards: p, noRelative: m, noIsolation: w, inert: h, setCallbacks: s, allowPinchZoom: !!y, lockRef: n, gapMode: A }),
2744
2760
  i ? d.cloneElement(d.Children.only(a), Fe(Fe({}, O), { ref: D })) : d.createElement(E, Fe({}, O, { className: l, ref: D }), a)
2745
2761
  );
2746
2762
  });
@@ -2925,7 +2941,7 @@ var bt = yr ? { passive: !1 } : !1, Bu = function(e) {
2925
2941
  n,
2926
2942
  r
2927
2943
  ];
2928
- }, Vu = function(e) {
2944
+ }, ju = function(e) {
2929
2945
  var t = e.scrollLeft, n = e.scrollWidth, r = e.clientWidth;
2930
2946
  return [
2931
2947
  t,
@@ -2935,16 +2951,16 @@ var bt = yr ? { passive: !1 } : !1, Bu = function(e) {
2935
2951
  }, Ks = function(e, t) {
2936
2952
  return e === "v" ? Uu(t) : Wu(t);
2937
2953
  }, Xs = function(e, t) {
2938
- return e === "v" ? Hu(t) : Vu(t);
2939
- }, ju = function(e, t) {
2954
+ return e === "v" ? Hu(t) : ju(t);
2955
+ }, Vu = function(e, t) {
2940
2956
  return e === "h" && t === "rtl" ? -1 : 1;
2941
2957
  }, Gu = function(e, t, n, r, o) {
2942
- var s = ju(e, window.getComputedStyle(t).direction), i = s * r, a = n.target, l = t.contains(a), c = !1, f = i > 0, p = 0, g = 0;
2958
+ var s = Vu(e, window.getComputedStyle(t).direction), i = s * r, a = n.target, l = t.contains(a), c = !1, f = i > 0, p = 0, b = 0;
2943
2959
  do {
2944
2960
  if (!a)
2945
2961
  break;
2946
2962
  var m = Xs(e, a), w = m[0], h = m[1], y = m[2], C = h - y - s * w;
2947
- (w || C) && Ks(e, a) && (p += C, g += w);
2963
+ (w || C) && Ks(e, a) && (p += C, b += w);
2948
2964
  var E = a.parentNode;
2949
2965
  a = E && E.nodeType === Node.DOCUMENT_FRAGMENT_NODE ? E.host : E;
2950
2966
  } while (
@@ -2952,7 +2968,7 @@ var bt = yr ? { passive: !1 } : !1, Bu = function(e) {
2952
2968
  !l && a !== document.body || // self content
2953
2969
  l && (t.contains(a) || t === a)
2954
2970
  );
2955
- return (f && Math.abs(p) < 1 || !f && Math.abs(g) < 1) && (c = !0), c;
2971
+ return (f && Math.abs(p) < 1 || !f && Math.abs(b) < 1) && (c = !0), c;
2956
2972
  }, rn = function(e) {
2957
2973
  return "changedTouches" in e ? [e.changedTouches[0].clientX, e.changedTouches[0].clientY] : [0, 0];
2958
2974
  }, $o = function(e) {
@@ -2987,31 +3003,31 @@ function qu(e) {
2987
3003
  var a = d.useCallback(function(h, y) {
2988
3004
  if ("touches" in h && h.touches.length === 2 || h.type === "wheel" && h.ctrlKey)
2989
3005
  return !i.current.allowPinchZoom;
2990
- var C = rn(h), E = n.current, A = "deltaX" in h ? h.deltaX : E[0] - C[0], x = "deltaY" in h ? h.deltaY : E[1] - C[1], N, D = h.target, O = Math.abs(A) > Math.abs(x) ? "h" : "v";
3006
+ var C = rn(h), E = n.current, A = "deltaX" in h ? h.deltaX : E[0] - C[0], x = "deltaY" in h ? h.deltaY : E[1] - C[1], T, D = h.target, O = Math.abs(A) > Math.abs(x) ? "h" : "v";
2991
3007
  if ("touches" in h && O === "h" && D.type === "range")
2992
3008
  return !1;
2993
- var k = Fo(O, D);
2994
- if (!k)
3009
+ var P = Fo(O, D);
3010
+ if (!P)
2995
3011
  return !0;
2996
- if (k ? N = O : (N = O === "v" ? "h" : "v", k = Fo(O, D)), !k)
3012
+ if (P ? T = O : (T = O === "v" ? "h" : "v", P = Fo(O, D)), !P)
2997
3013
  return !1;
2998
- if (!r.current && "changedTouches" in h && (A || x) && (r.current = N), !N)
3014
+ if (!r.current && "changedTouches" in h && (A || x) && (r.current = T), !T)
2999
3015
  return !0;
3000
- var W = r.current || N;
3016
+ var W = r.current || T;
3001
3017
  return Gu(W, y, h, W === "h" ? A : x);
3002
3018
  }, []), l = d.useCallback(function(h) {
3003
3019
  var y = h;
3004
3020
  if (!(!vt.length || vt[vt.length - 1] !== s)) {
3005
- var C = "deltaY" in y ? $o(y) : rn(y), E = t.current.filter(function(N) {
3006
- return N.name === y.type && (N.target === y.target || y.target === N.shadowParent) && Yu(N.delta, C);
3021
+ var C = "deltaY" in y ? $o(y) : rn(y), E = t.current.filter(function(T) {
3022
+ return T.name === y.type && (T.target === y.target || y.target === T.shadowParent) && Yu(T.delta, C);
3007
3023
  })[0];
3008
3024
  if (E && E.should) {
3009
3025
  y.cancelable && y.preventDefault();
3010
3026
  return;
3011
3027
  }
3012
3028
  if (!E) {
3013
- var A = (i.current.shards || []).map(zo).filter(Boolean).filter(function(N) {
3014
- return N.contains(y.target);
3029
+ var A = (i.current.shards || []).map(zo).filter(Boolean).filter(function(T) {
3030
+ return T.contains(y.target);
3015
3031
  }), x = A.length > 0 ? a(y, A[0]) : !i.current.noIsolation;
3016
3032
  x && y.cancelable && y.preventDefault();
3017
3033
  }
@@ -3027,14 +3043,14 @@ function qu(e) {
3027
3043
  n.current = rn(h), r.current = void 0;
3028
3044
  }, []), p = d.useCallback(function(h) {
3029
3045
  c(h.type, $o(h), h.target, a(h, e.lockRef.current));
3030
- }, []), g = d.useCallback(function(h) {
3046
+ }, []), b = d.useCallback(function(h) {
3031
3047
  c(h.type, rn(h), h.target, a(h, e.lockRef.current));
3032
3048
  }, []);
3033
3049
  d.useEffect(function() {
3034
3050
  return vt.push(s), e.setCallbacks({
3035
3051
  onScrollCapture: p,
3036
3052
  onWheelCapture: p,
3037
- onTouchMoveCapture: g
3053
+ onTouchMoveCapture: b
3038
3054
  }), document.addEventListener("wheel", l, bt), document.addEventListener("touchmove", l, bt), document.addEventListener("touchstart", f, bt), function() {
3039
3055
  vt = vt.filter(function(h) {
3040
3056
  return h !== s;
@@ -3054,11 +3070,11 @@ function Zu(e) {
3054
3070
  e instanceof ShadowRoot && (t = e.host, e = e.host), e = e.parentNode;
3055
3071
  return t;
3056
3072
  }
3057
- const Qu = Ru(js, qu);
3058
- var jr = d.forwardRef(function(e, t) {
3073
+ const Qu = Ru(Vs, qu);
3074
+ var Vr = d.forwardRef(function(e, t) {
3059
3075
  return d.createElement(Tn, Fe({}, e, { ref: t, sideCar: Qu }));
3060
3076
  });
3061
- jr.classNames = Tn.classNames;
3077
+ Vr.classNames = Tn.classNames;
3062
3078
  var Ju = [" ", "Enter", "ArrowUp", "ArrowDown"], ed = [" ", "Enter"], lt = "Select", [kn, Pn, td] = as(lt), [Rt] = ut(lt, [
3063
3079
  td,
3064
3080
  Nn
@@ -3075,10 +3091,10 @@ var Ju = [" ", "Enter", "ArrowUp", "ArrowDown"], ed = [" ", "Enter"], lt = "Sele
3075
3091
  dir: c,
3076
3092
  name: f,
3077
3093
  autoComplete: p,
3078
- disabled: g,
3094
+ disabled: b,
3079
3095
  required: m,
3080
3096
  form: w
3081
- } = e, h = _n(t), [y, C] = d.useState(null), [E, A] = d.useState(null), [x, N] = d.useState(!1), D = Or(c), [O, k] = Wt({
3097
+ } = e, h = _n(t), [y, C] = d.useState(null), [E, A] = d.useState(null), [x, T] = d.useState(!1), D = Or(c), [O, P] = Wt({
3082
3098
  prop: r,
3083
3099
  defaultProp: o ?? !1,
3084
3100
  onChange: s,
@@ -3088,7 +3104,7 @@ var Ju = [" ", "Enter", "ArrowUp", "ArrowDown"], ed = [" ", "Enter"], lt = "Sele
3088
3104
  defaultProp: a,
3089
3105
  onChange: l,
3090
3106
  caller: lt
3091
- }), U = d.useRef(null), j = y ? w || !!y.closest("form") : !0, [b, S] = d.useState(/* @__PURE__ */ new Set()), T = Array.from(b).map((P) => P.props.value).join(";");
3107
+ }), U = d.useRef(null), V = y ? w || !!y.closest("form") : !0, [g, S] = d.useState(/* @__PURE__ */ new Set()), N = Array.from(g).map((k) => k.props.value).join(";");
3092
3108
  return /* @__PURE__ */ u(Ls, { ...h, children: /* @__PURE__ */ M(
3093
3109
  nd,
3094
3110
  {
@@ -3099,33 +3115,33 @@ var Ju = [" ", "Enter", "ArrowUp", "ArrowDown"], ed = [" ", "Enter"], lt = "Sele
3099
3115
  valueNode: E,
3100
3116
  onValueNodeChange: A,
3101
3117
  valueNodeHasChildren: x,
3102
- onValueNodeHasChildrenChange: N,
3118
+ onValueNodeHasChildrenChange: T,
3103
3119
  contentId: Ht(),
3104
3120
  value: W,
3105
3121
  onValueChange: H,
3106
3122
  open: O,
3107
- onOpenChange: k,
3123
+ onOpenChange: P,
3108
3124
  dir: D,
3109
3125
  triggerPointerDownPosRef: U,
3110
- disabled: g,
3126
+ disabled: b,
3111
3127
  children: [
3112
3128
  /* @__PURE__ */ u(kn.Provider, { scope: t, children: /* @__PURE__ */ u(
3113
3129
  rd,
3114
3130
  {
3115
3131
  scope: e.__scopeSelect,
3116
- onNativeOptionAdd: d.useCallback((P) => {
3117
- S((_) => new Set(_).add(P));
3132
+ onNativeOptionAdd: d.useCallback((k) => {
3133
+ S((_) => new Set(_).add(k));
3118
3134
  }, []),
3119
- onNativeOptionRemove: d.useCallback((P) => {
3135
+ onNativeOptionRemove: d.useCallback((k) => {
3120
3136
  S((_) => {
3121
3137
  const R = new Set(_);
3122
- return R.delete(P), R;
3138
+ return R.delete(k), R;
3123
3139
  });
3124
3140
  }, []),
3125
3141
  children: n
3126
3142
  }
3127
3143
  ) }),
3128
- j ? /* @__PURE__ */ M(
3144
+ V ? /* @__PURE__ */ M(
3129
3145
  wi,
3130
3146
  {
3131
3147
  "aria-hidden": !0,
@@ -3134,15 +3150,15 @@ var Ju = [" ", "Enter", "ArrowUp", "ArrowDown"], ed = [" ", "Enter"], lt = "Sele
3134
3150
  name: f,
3135
3151
  autoComplete: p,
3136
3152
  value: W,
3137
- onChange: (P) => H(P.target.value),
3138
- disabled: g,
3153
+ onChange: (k) => H(k.target.value),
3154
+ disabled: b,
3139
3155
  form: w,
3140
3156
  children: [
3141
3157
  W === void 0 ? /* @__PURE__ */ u("option", { value: "" }) : null,
3142
- Array.from(b)
3158
+ Array.from(g)
3143
3159
  ]
3144
3160
  },
3145
- T
3161
+ N
3146
3162
  ) : null
3147
3163
  ]
3148
3164
  }
@@ -3151,7 +3167,7 @@ var Ju = [" ", "Enter", "ArrowUp", "ArrowDown"], ed = [" ", "Enter"], lt = "Sele
3151
3167
  qs.displayName = lt;
3152
3168
  var Zs = "SelectTrigger", Qs = d.forwardRef(
3153
3169
  (e, t) => {
3154
- const { __scopeSelect: n, disabled: r = !1, ...o } = e, s = _n(n), i = et(Zs, n), a = i.disabled || r, l = se(t, i.onTriggerChange), c = Pn(n), f = d.useRef("touch"), [p, g, m] = Si((h) => {
3170
+ const { __scopeSelect: n, disabled: r = !1, ...o } = e, s = _n(n), i = et(Zs, n), a = i.disabled || r, l = se(t, i.onTriggerChange), c = Pn(n), f = d.useRef("touch"), [p, b, m] = Si((h) => {
3155
3171
  const y = c().filter((A) => !A.disabled), C = y.find((A) => A.value === i.value), E = Ci(y, h, C);
3156
3172
  E !== void 0 && i.onValueChange(E.value);
3157
3173
  }), w = (h) => {
@@ -3186,7 +3202,7 @@ var Zs = "SelectTrigger", Qs = d.forwardRef(
3186
3202
  }),
3187
3203
  onKeyDown: Z(o.onKeyDown, (h) => {
3188
3204
  const y = p.current !== "";
3189
- !(h.ctrlKey || h.altKey || h.metaKey) && h.key.length === 1 && g(h.key), !(y && h.key === " ") && Ju.includes(h.key) && (w(), h.preventDefault());
3205
+ !(h.ctrlKey || h.altKey || h.metaKey) && h.key.length === 1 && b(h.key), !(y && h.key === " ") && Ju.includes(h.key) && (w(), h.preventDefault());
3190
3206
  })
3191
3207
  }
3192
3208
  ) });
@@ -3217,7 +3233,7 @@ var sd = "SelectIcon", ti = d.forwardRef(
3217
3233
  }
3218
3234
  );
3219
3235
  ti.displayName = sd;
3220
- var id = "SelectPortal", ni = (e) => /* @__PURE__ */ u(Vr, { asChild: !0, ...e });
3236
+ var id = "SelectPortal", ni = (e) => /* @__PURE__ */ u(jr, { asChild: !0, ...e });
3221
3237
  ni.displayName = id;
3222
3238
  var ct = "SelectContent", ri = d.forwardRef(
3223
3239
  (e, t) => {
@@ -3250,33 +3266,33 @@ var Te = 10, [oi, tt] = Rt(ct), ad = "SelectContentImpl", ld = /* @__PURE__ */ w
3250
3266
  align: c,
3251
3267
  alignOffset: f,
3252
3268
  arrowPadding: p,
3253
- collisionBoundary: g,
3269
+ collisionBoundary: b,
3254
3270
  collisionPadding: m,
3255
3271
  sticky: w,
3256
3272
  hideWhenDetached: h,
3257
3273
  avoidCollisions: y,
3258
3274
  //
3259
3275
  ...C
3260
- } = e, E = et(ct, n), [A, x] = d.useState(null), [N, D] = d.useState(null), O = se(t, (L) => x(L)), [k, W] = d.useState(null), [H, U] = d.useState(
3276
+ } = e, E = et(ct, n), [A, x] = d.useState(null), [T, D] = d.useState(null), O = se(t, (L) => x(L)), [P, W] = d.useState(null), [H, U] = d.useState(
3261
3277
  null
3262
- ), j = Pn(n), [b, S] = d.useState(!1), T = d.useRef(!1);
3278
+ ), V = Pn(n), [g, S] = d.useState(!1), N = d.useRef(!1);
3263
3279
  d.useEffect(() => {
3264
3280
  if (A) return Ws(A);
3265
3281
  }, [A]), ds();
3266
- const P = d.useCallback(
3282
+ const k = d.useCallback(
3267
3283
  (L) => {
3268
- const [J, ...ie] = j().map((ne) => ne.ref.current), [q] = ie.slice(-1), ee = document.activeElement;
3284
+ const [J, ...ie] = V().map((ne) => ne.ref.current), [q] = ie.slice(-1), ee = document.activeElement;
3269
3285
  for (const ne of L)
3270
- if (ne === ee || (ne?.scrollIntoView({ block: "nearest" }), ne === J && N && (N.scrollTop = 0), ne === q && N && (N.scrollTop = N.scrollHeight), ne?.focus(), document.activeElement !== ee)) return;
3286
+ if (ne === ee || (ne?.scrollIntoView({ block: "nearest" }), ne === J && T && (T.scrollTop = 0), ne === q && T && (T.scrollTop = T.scrollHeight), ne?.focus(), document.activeElement !== ee)) return;
3271
3287
  },
3272
- [j, N]
3288
+ [V, T]
3273
3289
  ), _ = d.useCallback(
3274
- () => P([k, A]),
3275
- [P, k, A]
3290
+ () => k([P, A]),
3291
+ [k, P, A]
3276
3292
  );
3277
3293
  d.useEffect(() => {
3278
- b && _();
3279
- }, [b, _]);
3294
+ g && _();
3295
+ }, [g, _]);
3280
3296
  const { onOpenChange: R, triggerPointerDownPosRef: K } = E;
3281
3297
  d.useEffect(() => {
3282
3298
  if (A) {
@@ -3299,18 +3315,18 @@ var Te = 10, [oi, tt] = Rt(ct), ad = "SelectContentImpl", ld = /* @__PURE__ */ w
3299
3315
  window.removeEventListener("blur", L), window.removeEventListener("resize", L);
3300
3316
  };
3301
3317
  }, [R]);
3302
- const [te, V] = Si((L) => {
3303
- const J = j().filter((ee) => !ee.disabled), ie = J.find((ee) => ee.ref.current === document.activeElement), q = Ci(J, L, ie);
3318
+ const [te, j] = Si((L) => {
3319
+ const J = V().filter((ee) => !ee.disabled), ie = J.find((ee) => ee.ref.current === document.activeElement), q = Ci(J, L, ie);
3304
3320
  q && setTimeout(() => q.ref.current.focus());
3305
3321
  }), Ee = d.useCallback(
3306
3322
  (L, J, ie) => {
3307
- const q = !T.current && !ie;
3308
- (E.value !== void 0 && E.value === J || q) && (W(L), q && (T.current = !0));
3323
+ const q = !N.current && !ie;
3324
+ (E.value !== void 0 && E.value === J || q) && (W(L), q && (N.current = !0));
3309
3325
  },
3310
3326
  [E.value]
3311
3327
  ), G = d.useCallback(() => A?.focus(), [A]), re = d.useCallback(
3312
3328
  (L, J, ie) => {
3313
- const q = !T.current && !ie;
3329
+ const q = !N.current && !ie;
3314
3330
  (E.value !== void 0 && E.value === J || q) && U(L);
3315
3331
  },
3316
3332
  [E.value]
@@ -3320,7 +3336,7 @@ var Te = 10, [oi, tt] = Rt(ct), ad = "SelectContentImpl", ld = /* @__PURE__ */ w
3320
3336
  align: c,
3321
3337
  alignOffset: f,
3322
3338
  arrowPadding: p,
3323
- collisionBoundary: g,
3339
+ collisionBoundary: b,
3324
3340
  collisionPadding: m,
3325
3341
  sticky: w,
3326
3342
  hideWhenDetached: h,
@@ -3331,18 +3347,18 @@ var Te = 10, [oi, tt] = Rt(ct), ad = "SelectContentImpl", ld = /* @__PURE__ */ w
3331
3347
  {
3332
3348
  scope: n,
3333
3349
  content: A,
3334
- viewport: N,
3350
+ viewport: T,
3335
3351
  onViewportChange: D,
3336
3352
  itemRefCallback: Ee,
3337
- selectedItem: k,
3353
+ selectedItem: P,
3338
3354
  onItemLeave: G,
3339
3355
  itemTextRefCallback: re,
3340
3356
  focusSelectedItem: _,
3341
3357
  selectedItemText: H,
3342
3358
  position: r,
3343
- isPositioned: b,
3359
+ isPositioned: g,
3344
3360
  searchRef: te,
3345
- children: /* @__PURE__ */ u(jr, { as: ld, allowPinchZoom: !0, children: /* @__PURE__ */ u(
3361
+ children: /* @__PURE__ */ u(Vr, { as: ld, allowPinchZoom: !0, children: /* @__PURE__ */ u(
3346
3362
  Mr,
3347
3363
  {
3348
3364
  asChild: !0,
@@ -3384,13 +3400,13 @@ var Te = 10, [oi, tt] = Rt(ct), ad = "SelectContentImpl", ld = /* @__PURE__ */ w
3384
3400
  },
3385
3401
  onKeyDown: Z(C.onKeyDown, (L) => {
3386
3402
  const J = L.ctrlKey || L.altKey || L.metaKey;
3387
- if (L.key === "Tab" && L.preventDefault(), !J && L.key.length === 1 && V(L.key), ["ArrowUp", "ArrowDown", "Home", "End"].includes(L.key)) {
3388
- let q = j().filter((ee) => !ee.disabled).map((ee) => ee.ref.current);
3403
+ if (L.key === "Tab" && L.preventDefault(), !J && L.key.length === 1 && j(L.key), ["ArrowUp", "ArrowDown", "Home", "End"].includes(L.key)) {
3404
+ let q = V().filter((ee) => !ee.disabled).map((ee) => ee.ref.current);
3389
3405
  if (["ArrowUp", "End"].includes(L.key) && (q = q.slice().reverse()), ["ArrowUp", "ArrowDown"].includes(L.key)) {
3390
3406
  const ee = L.target, ne = q.indexOf(ee);
3391
3407
  q = q.slice(ne + 1);
3392
3408
  }
3393
- setTimeout(() => P(q)), L.preventDefault();
3409
+ setTimeout(() => k(q)), L.preventDefault();
3394
3410
  }
3395
3411
  })
3396
3412
  }
@@ -3405,11 +3421,11 @@ var Te = 10, [oi, tt] = Rt(ct), ad = "SelectContentImpl", ld = /* @__PURE__ */ w
3405
3421
  );
3406
3422
  si.displayName = ad;
3407
3423
  var cd = "SelectItemAlignedPosition", ii = d.forwardRef((e, t) => {
3408
- const { __scopeSelect: n, onPlaced: r, ...o } = e, s = et(ct, n), i = tt(ct, n), [a, l] = d.useState(null), [c, f] = d.useState(null), p = se(t, (O) => f(O)), g = Pn(n), m = d.useRef(!1), w = d.useRef(!0), { viewport: h, selectedItem: y, selectedItemText: C, focusSelectedItem: E } = i, A = d.useCallback(() => {
3424
+ const { __scopeSelect: n, onPlaced: r, ...o } = e, s = et(ct, n), i = tt(ct, n), [a, l] = d.useState(null), [c, f] = d.useState(null), p = se(t, (O) => f(O)), b = Pn(n), m = d.useRef(!1), w = d.useRef(!0), { viewport: h, selectedItem: y, selectedItemText: C, focusSelectedItem: E } = i, A = d.useCallback(() => {
3409
3425
  if (s.trigger && s.valueNode && a && c && h && y && C) {
3410
- const O = s.trigger.getBoundingClientRect(), k = c.getBoundingClientRect(), W = s.valueNode.getBoundingClientRect(), H = C.getBoundingClientRect();
3426
+ const O = s.trigger.getBoundingClientRect(), P = c.getBoundingClientRect(), W = s.valueNode.getBoundingClientRect(), H = C.getBoundingClientRect();
3411
3427
  if (s.dir !== "rtl") {
3412
- const ee = H.left - k.left, ne = W.left - ee, le = O.left - ne, Ae = O.width + le, Ne = Math.max(Ae, k.width), rt = window.innerWidth - Te, ot = ho(ne, [
3428
+ const ee = H.left - P.left, ne = W.left - ee, le = O.left - ne, Ae = O.width + le, Ne = Math.max(Ae, P.width), rt = window.innerWidth - Te, ot = ho(ne, [
3413
3429
  Te,
3414
3430
  // Prevents the content from going off the starting edge of the
3415
3431
  // viewport. It may still go off the ending edge, but this can be
@@ -3420,13 +3436,13 @@ var cd = "SelectItemAlignedPosition", ii = d.forwardRef((e, t) => {
3420
3436
  ]);
3421
3437
  a.style.minWidth = Ae + "px", a.style.left = ot + "px";
3422
3438
  } else {
3423
- const ee = k.right - H.right, ne = window.innerWidth - W.right - ee, le = window.innerWidth - O.right - ne, Ae = O.width + le, Ne = Math.max(Ae, k.width), rt = window.innerWidth - Te, ot = ho(ne, [
3439
+ const ee = P.right - H.right, ne = window.innerWidth - W.right - ee, le = window.innerWidth - O.right - ne, Ae = O.width + le, Ne = Math.max(Ae, P.width), rt = window.innerWidth - Te, ot = ho(ne, [
3424
3440
  Te,
3425
3441
  Math.max(Te, rt - Ne)
3426
3442
  ]);
3427
3443
  a.style.minWidth = Ae + "px", a.style.right = ot + "px";
3428
3444
  }
3429
- const U = g(), j = window.innerHeight - Te * 2, b = h.scrollHeight, S = window.getComputedStyle(c), T = parseInt(S.borderTopWidth, 10), P = parseInt(S.paddingTop, 10), _ = parseInt(S.borderBottomWidth, 10), R = parseInt(S.paddingBottom, 10), K = T + P + b + R + _, te = Math.min(y.offsetHeight * 5, K), V = window.getComputedStyle(h), Ee = parseInt(V.paddingTop, 10), G = parseInt(V.paddingBottom, 10), re = O.top + O.height / 2 - Te, Q = j - re, pe = y.offsetHeight / 2, L = y.offsetTop + pe, J = T + P + L, ie = K - J;
3445
+ const U = b(), V = window.innerHeight - Te * 2, g = h.scrollHeight, S = window.getComputedStyle(c), N = parseInt(S.borderTopWidth, 10), k = parseInt(S.paddingTop, 10), _ = parseInt(S.borderBottomWidth, 10), R = parseInt(S.paddingBottom, 10), K = N + k + g + R + _, te = Math.min(y.offsetHeight * 5, K), j = window.getComputedStyle(h), Ee = parseInt(j.paddingTop, 10), G = parseInt(j.paddingBottom, 10), re = O.top + O.height / 2 - Te, Q = V - re, pe = y.offsetHeight / 2, L = y.offsetTop + pe, J = N + k + L, ie = K - J;
3430
3446
  if (J <= re) {
3431
3447
  const ee = U.length > 0 && y === U[U.length - 1].ref.current;
3432
3448
  a.style.bottom = "0px";
@@ -3441,15 +3457,15 @@ var cd = "SelectItemAlignedPosition", ii = d.forwardRef((e, t) => {
3441
3457
  a.style.top = "0px";
3442
3458
  const le = Math.max(
3443
3459
  re,
3444
- T + h.offsetTop + // viewport might have padding top, include it to avoid a scrollable viewport
3460
+ N + h.offsetTop + // viewport might have padding top, include it to avoid a scrollable viewport
3445
3461
  (ee ? Ee : 0) + pe
3446
3462
  ) + ie;
3447
3463
  a.style.height = le + "px", h.scrollTop = J - re + h.offsetTop;
3448
3464
  }
3449
- a.style.margin = `${Te}px 0`, a.style.minHeight = te + "px", a.style.maxHeight = j + "px", r?.(), requestAnimationFrame(() => m.current = !0);
3465
+ a.style.margin = `${Te}px 0`, a.style.minHeight = te + "px", a.style.maxHeight = V + "px", r?.(), requestAnimationFrame(() => m.current = !0);
3450
3466
  }
3451
3467
  }, [
3452
- g,
3468
+ b,
3453
3469
  s.trigger,
3454
3470
  s.valueNode,
3455
3471
  a,
@@ -3461,9 +3477,9 @@ var cd = "SelectItemAlignedPosition", ii = d.forwardRef((e, t) => {
3461
3477
  r
3462
3478
  ]);
3463
3479
  he(() => A(), [A]);
3464
- const [x, N] = d.useState();
3480
+ const [x, T] = d.useState();
3465
3481
  he(() => {
3466
- c && N(window.getComputedStyle(c).zIndex);
3482
+ c && T(window.getComputedStyle(c).zIndex);
3467
3483
  }, [c]);
3468
3484
  const D = d.useCallback(
3469
3485
  (O) => {
@@ -3572,8 +3588,8 @@ var [dd, Gr] = Rt(ct, {}), xr = "SelectViewport", ai = d.forwardRef(
3572
3588
  ...o.style
3573
3589
  },
3574
3590
  onScroll: Z(o.onScroll, (c) => {
3575
- const f = c.currentTarget, { contentWrapper: p, shouldExpandOnScrollRef: g } = i;
3576
- if (g?.current && p) {
3591
+ const f = c.currentTarget, { contentWrapper: p, shouldExpandOnScrollRef: b } = i;
3592
+ if (b?.current && p) {
3577
3593
  const m = Math.abs(l.current - f.scrollTop);
3578
3594
  if (m > 0) {
3579
3595
  const w = window.innerHeight - Te * 2, h = parseFloat(p.style.minHeight), y = parseFloat(p.style.height), C = Math.max(h, y);
@@ -3613,7 +3629,7 @@ var yn = "SelectItem", [md, fi] = Rt(yn), pi = d.forwardRef(
3613
3629
  disabled: o = !1,
3614
3630
  textValue: s,
3615
3631
  ...i
3616
- } = e, a = et(yn, n), l = tt(yn, n), c = a.value === r, [f, p] = d.useState(s ?? ""), [g, m] = d.useState(!1), w = se(
3632
+ } = e, a = et(yn, n), l = tt(yn, n), c = a.value === r, [f, p] = d.useState(s ?? ""), [b, m] = d.useState(!1), w = se(
3617
3633
  t,
3618
3634
  (E) => l.itemRefCallback?.(E, r, o)
3619
3635
  ), h = Ht(), y = d.useRef("touch"), C = () => {
@@ -3646,8 +3662,8 @@ var yn = "SelectItem", [md, fi] = Rt(yn), pi = d.forwardRef(
3646
3662
  {
3647
3663
  role: "option",
3648
3664
  "aria-labelledby": h,
3649
- "data-highlighted": g ? "" : void 0,
3650
- "aria-selected": c && g,
3665
+ "data-highlighted": b ? "" : void 0,
3666
+ "aria-selected": c && b,
3651
3667
  "data-state": c ? "checked" : "unchecked",
3652
3668
  "aria-disabled": o || void 0,
3653
3669
  "data-disabled": o ? "" : void 0,
@@ -3685,7 +3701,7 @@ var yn = "SelectItem", [md, fi] = Rt(yn), pi = d.forwardRef(
3685
3701
  pi.displayName = yn;
3686
3702
  var Ft = "SelectItemText", mi = d.forwardRef(
3687
3703
  (e, t) => {
3688
- const { __scopeSelect: n, className: r, style: o, ...s } = e, i = et(Ft, n), a = tt(Ft, n), l = fi(Ft, n), c = od(Ft, n), [f, p] = d.useState(null), g = se(
3704
+ const { __scopeSelect: n, className: r, style: o, ...s } = e, i = et(Ft, n), a = tt(Ft, n), l = fi(Ft, n), c = od(Ft, n), [f, p] = d.useState(null), b = se(
3689
3705
  t,
3690
3706
  (C) => p(C),
3691
3707
  l.onItemTextChange,
@@ -3695,7 +3711,7 @@ var Ft = "SelectItemText", mi = d.forwardRef(
3695
3711
  [l.disabled, l.value, m]
3696
3712
  ), { onNativeOptionAdd: h, onNativeOptionRemove: y } = c;
3697
3713
  return he(() => (h(w), () => y(w)), [h, y, w]), /* @__PURE__ */ M(Ke, { children: [
3698
- /* @__PURE__ */ u(Ce.span, { id: l.textId, ...s, ref: g }),
3714
+ /* @__PURE__ */ u(Ce.span, { id: l.textId, ...s, ref: b }),
3699
3715
  l.isSelected && i.valueNode && !i.valueNodeHasChildren ? Sn.createPortal(s.children, i.valueNode) : null
3700
3716
  ] });
3701
3717
  }
@@ -4055,7 +4071,7 @@ function X(e, t) {
4055
4071
  }
4056
4072
  return e;
4057
4073
  }
4058
- function Vd(e) {
4074
+ function jd(e) {
4059
4075
  for (let t = 0; t < e.length; t++)
4060
4076
  ke(e, t) || (e[t] = null);
4061
4077
  return e;
@@ -4063,7 +4079,7 @@ function Vd(e) {
4063
4079
  function Le(e) {
4064
4080
  const t = Ar(null);
4065
4081
  for (const [n, r] of Ei(e))
4066
- ke(e, n) && (Array.isArray(r) ? t[n] = Vd(r) : r && typeof r == "object" && r.constructor === Object ? t[n] = Le(r) : t[n] = r);
4082
+ ke(e, n) && (Array.isArray(r) ? t[n] = jd(r) : r && typeof r == "object" && r.constructor === Object ? t[n] = Le(r) : t[n] = r);
4067
4083
  return t;
4068
4084
  }
4069
4085
  function Mt(e, t) {
@@ -4082,7 +4098,7 @@ function Mt(e, t) {
4082
4098
  }
4083
4099
  return n;
4084
4100
  }
4085
- const Vo = be(["a", "abbr", "acronym", "address", "area", "article", "aside", "audio", "b", "bdi", "bdo", "big", "blink", "blockquote", "body", "br", "button", "canvas", "caption", "center", "cite", "code", "col", "colgroup", "content", "data", "datalist", "dd", "decorator", "del", "details", "dfn", "dialog", "dir", "div", "dl", "dt", "element", "em", "fieldset", "figcaption", "figure", "font", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "head", "header", "hgroup", "hr", "html", "i", "img", "input", "ins", "kbd", "label", "legend", "li", "main", "map", "mark", "marquee", "menu", "menuitem", "meter", "nav", "nobr", "ol", "optgroup", "option", "output", "p", "picture", "pre", "progress", "q", "rp", "rt", "ruby", "s", "samp", "search", "section", "select", "shadow", "slot", "small", "source", "spacer", "span", "strike", "strong", "style", "sub", "summary", "sup", "table", "tbody", "td", "template", "textarea", "tfoot", "th", "thead", "time", "tr", "track", "tt", "u", "ul", "var", "video", "wbr"]), ir = be(["svg", "a", "altglyph", "altglyphdef", "altglyphitem", "animatecolor", "animatemotion", "animatetransform", "circle", "clippath", "defs", "desc", "ellipse", "enterkeyhint", "exportparts", "filter", "font", "g", "glyph", "glyphref", "hkern", "image", "inputmode", "line", "lineargradient", "marker", "mask", "metadata", "mpath", "part", "path", "pattern", "polygon", "polyline", "radialgradient", "rect", "stop", "style", "switch", "symbol", "text", "textpath", "title", "tref", "tspan", "view", "vkern"]), ar = be(["feBlend", "feColorMatrix", "feComponentTransfer", "feComposite", "feConvolveMatrix", "feDiffuseLighting", "feDisplacementMap", "feDistantLight", "feDropShadow", "feFlood", "feFuncA", "feFuncB", "feFuncG", "feFuncR", "feGaussianBlur", "feImage", "feMerge", "feMergeNode", "feMorphology", "feOffset", "fePointLight", "feSpecularLighting", "feSpotLight", "feTile", "feTurbulence"]), jd = be(["animate", "color-profile", "cursor", "discard", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "foreignobject", "hatch", "hatchpath", "mesh", "meshgradient", "meshpatch", "meshrow", "missing-glyph", "script", "set", "solidcolor", "unknown", "use"]), lr = be(["math", "menclose", "merror", "mfenced", "mfrac", "mglyph", "mi", "mlabeledtr", "mmultiscripts", "mn", "mo", "mover", "mpadded", "mphantom", "mroot", "mrow", "ms", "mspace", "msqrt", "mstyle", "msub", "msup", "msubsup", "mtable", "mtd", "mtext", "mtr", "munder", "munderover", "mprescripts"]), Gd = be(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]), jo = be(["#text"]), Go = be(["accept", "action", "align", "alt", "autocapitalize", "autocomplete", "autopictureinpicture", "autoplay", "background", "bgcolor", "border", "capture", "cellpadding", "cellspacing", "checked", "cite", "class", "clear", "color", "cols", "colspan", "controls", "controlslist", "coords", "crossorigin", "datetime", "decoding", "default", "dir", "disabled", "disablepictureinpicture", "disableremoteplayback", "download", "draggable", "enctype", "enterkeyhint", "exportparts", "face", "for", "headers", "height", "hidden", "high", "href", "hreflang", "id", "inert", "inputmode", "integrity", "ismap", "kind", "label", "lang", "list", "loading", "loop", "low", "max", "maxlength", "media", "method", "min", "minlength", "multiple", "muted", "name", "nonce", "noshade", "novalidate", "nowrap", "open", "optimum", "part", "pattern", "placeholder", "playsinline", "popover", "popovertarget", "popovertargetaction", "poster", "preload", "pubdate", "radiogroup", "readonly", "rel", "required", "rev", "reversed", "role", "rows", "rowspan", "spellcheck", "scope", "selected", "shape", "size", "sizes", "slot", "span", "srclang", "start", "src", "srcset", "step", "style", "summary", "tabindex", "title", "translate", "type", "usemap", "valign", "value", "width", "wrap", "xmlns", "slot"]), cr = be(["accent-height", "accumulate", "additive", "alignment-baseline", "amplitude", "ascent", "attributename", "attributetype", "azimuth", "basefrequency", "baseline-shift", "begin", "bias", "by", "class", "clip", "clippathunits", "clip-path", "clip-rule", "color", "color-interpolation", "color-interpolation-filters", "color-profile", "color-rendering", "cx", "cy", "d", "dx", "dy", "diffuseconstant", "direction", "display", "divisor", "dur", "edgemode", "elevation", "end", "exponent", "fill", "fill-opacity", "fill-rule", "filter", "filterunits", "flood-color", "flood-opacity", "font-family", "font-size", "font-size-adjust", "font-stretch", "font-style", "font-variant", "font-weight", "fx", "fy", "g1", "g2", "glyph-name", "glyphref", "gradientunits", "gradienttransform", "height", "href", "id", "image-rendering", "in", "in2", "intercept", "k", "k1", "k2", "k3", "k4", "kerning", "keypoints", "keysplines", "keytimes", "lang", "lengthadjust", "letter-spacing", "kernelmatrix", "kernelunitlength", "lighting-color", "local", "marker-end", "marker-mid", "marker-start", "markerheight", "markerunits", "markerwidth", "maskcontentunits", "maskunits", "max", "mask", "mask-type", "media", "method", "mode", "min", "name", "numoctaves", "offset", "operator", "opacity", "order", "orient", "orientation", "origin", "overflow", "paint-order", "path", "pathlength", "patterncontentunits", "patterntransform", "patternunits", "points", "preservealpha", "preserveaspectratio", "primitiveunits", "r", "rx", "ry", "radius", "refx", "refy", "repeatcount", "repeatdur", "restart", "result", "rotate", "scale", "seed", "shape-rendering", "slope", "specularconstant", "specularexponent", "spreadmethod", "startoffset", "stddeviation", "stitchtiles", "stop-color", "stop-opacity", "stroke-dasharray", "stroke-dashoffset", "stroke-linecap", "stroke-linejoin", "stroke-miterlimit", "stroke-opacity", "stroke", "stroke-width", "style", "surfacescale", "systemlanguage", "tabindex", "tablevalues", "targetx", "targety", "transform", "transform-origin", "text-anchor", "text-decoration", "text-rendering", "textlength", "type", "u1", "u2", "unicode", "values", "viewbox", "visibility", "version", "vert-adv-y", "vert-origin-x", "vert-origin-y", "width", "word-spacing", "wrap", "writing-mode", "xchannelselector", "ychannelselector", "x", "x1", "x2", "xmlns", "y", "y1", "y2", "z", "zoomandpan"]), Yo = be(["accent", "accentunder", "align", "bevelled", "close", "columnsalign", "columnlines", "columnspan", "denomalign", "depth", "dir", "display", "displaystyle", "encoding", "fence", "frame", "height", "href", "id", "largeop", "length", "linethickness", "lspace", "lquote", "mathbackground", "mathcolor", "mathsize", "mathvariant", "maxsize", "minsize", "movablelimits", "notation", "numalign", "open", "rowalign", "rowlines", "rowspacing", "rowspan", "rspace", "rquote", "scriptlevel", "scriptminsize", "scriptsizemultiplier", "selection", "separator", "separators", "stretchy", "subscriptshift", "supscriptshift", "symmetric", "voffset", "width", "xmlns"]), sn = be(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]), Yd = Re(/\{\{[\w\W]*|[\w\W]*\}\}/gm), Kd = Re(/<%[\w\W]*|[\w\W]*%>/gm), Xd = Re(/\$\{[\w\W]*/gm), qd = Re(/^data-[\-\w.\u00B7-\uFFFF]+$/), Zd = Re(/^aria-[\-\w]+$/), Ai = Re(
4101
+ const jo = be(["a", "abbr", "acronym", "address", "area", "article", "aside", "audio", "b", "bdi", "bdo", "big", "blink", "blockquote", "body", "br", "button", "canvas", "caption", "center", "cite", "code", "col", "colgroup", "content", "data", "datalist", "dd", "decorator", "del", "details", "dfn", "dialog", "dir", "div", "dl", "dt", "element", "em", "fieldset", "figcaption", "figure", "font", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "head", "header", "hgroup", "hr", "html", "i", "img", "input", "ins", "kbd", "label", "legend", "li", "main", "map", "mark", "marquee", "menu", "menuitem", "meter", "nav", "nobr", "ol", "optgroup", "option", "output", "p", "picture", "pre", "progress", "q", "rp", "rt", "ruby", "s", "samp", "search", "section", "select", "shadow", "slot", "small", "source", "spacer", "span", "strike", "strong", "style", "sub", "summary", "sup", "table", "tbody", "td", "template", "textarea", "tfoot", "th", "thead", "time", "tr", "track", "tt", "u", "ul", "var", "video", "wbr"]), ir = be(["svg", "a", "altglyph", "altglyphdef", "altglyphitem", "animatecolor", "animatemotion", "animatetransform", "circle", "clippath", "defs", "desc", "ellipse", "enterkeyhint", "exportparts", "filter", "font", "g", "glyph", "glyphref", "hkern", "image", "inputmode", "line", "lineargradient", "marker", "mask", "metadata", "mpath", "part", "path", "pattern", "polygon", "polyline", "radialgradient", "rect", "stop", "style", "switch", "symbol", "text", "textpath", "title", "tref", "tspan", "view", "vkern"]), ar = be(["feBlend", "feColorMatrix", "feComponentTransfer", "feComposite", "feConvolveMatrix", "feDiffuseLighting", "feDisplacementMap", "feDistantLight", "feDropShadow", "feFlood", "feFuncA", "feFuncB", "feFuncG", "feFuncR", "feGaussianBlur", "feImage", "feMerge", "feMergeNode", "feMorphology", "feOffset", "fePointLight", "feSpecularLighting", "feSpotLight", "feTile", "feTurbulence"]), Vd = be(["animate", "color-profile", "cursor", "discard", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "foreignobject", "hatch", "hatchpath", "mesh", "meshgradient", "meshpatch", "meshrow", "missing-glyph", "script", "set", "solidcolor", "unknown", "use"]), lr = be(["math", "menclose", "merror", "mfenced", "mfrac", "mglyph", "mi", "mlabeledtr", "mmultiscripts", "mn", "mo", "mover", "mpadded", "mphantom", "mroot", "mrow", "ms", "mspace", "msqrt", "mstyle", "msub", "msup", "msubsup", "mtable", "mtd", "mtext", "mtr", "munder", "munderover", "mprescripts"]), Gd = be(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]), Vo = be(["#text"]), Go = be(["accept", "action", "align", "alt", "autocapitalize", "autocomplete", "autopictureinpicture", "autoplay", "background", "bgcolor", "border", "capture", "cellpadding", "cellspacing", "checked", "cite", "class", "clear", "color", "cols", "colspan", "controls", "controlslist", "coords", "crossorigin", "datetime", "decoding", "default", "dir", "disabled", "disablepictureinpicture", "disableremoteplayback", "download", "draggable", "enctype", "enterkeyhint", "exportparts", "face", "for", "headers", "height", "hidden", "high", "href", "hreflang", "id", "inert", "inputmode", "integrity", "ismap", "kind", "label", "lang", "list", "loading", "loop", "low", "max", "maxlength", "media", "method", "min", "minlength", "multiple", "muted", "name", "nonce", "noshade", "novalidate", "nowrap", "open", "optimum", "part", "pattern", "placeholder", "playsinline", "popover", "popovertarget", "popovertargetaction", "poster", "preload", "pubdate", "radiogroup", "readonly", "rel", "required", "rev", "reversed", "role", "rows", "rowspan", "spellcheck", "scope", "selected", "shape", "size", "sizes", "slot", "span", "srclang", "start", "src", "srcset", "step", "style", "summary", "tabindex", "title", "translate", "type", "usemap", "valign", "value", "width", "wrap", "xmlns", "slot"]), cr = be(["accent-height", "accumulate", "additive", "alignment-baseline", "amplitude", "ascent", "attributename", "attributetype", "azimuth", "basefrequency", "baseline-shift", "begin", "bias", "by", "class", "clip", "clippathunits", "clip-path", "clip-rule", "color", "color-interpolation", "color-interpolation-filters", "color-profile", "color-rendering", "cx", "cy", "d", "dx", "dy", "diffuseconstant", "direction", "display", "divisor", "dur", "edgemode", "elevation", "end", "exponent", "fill", "fill-opacity", "fill-rule", "filter", "filterunits", "flood-color", "flood-opacity", "font-family", "font-size", "font-size-adjust", "font-stretch", "font-style", "font-variant", "font-weight", "fx", "fy", "g1", "g2", "glyph-name", "glyphref", "gradientunits", "gradienttransform", "height", "href", "id", "image-rendering", "in", "in2", "intercept", "k", "k1", "k2", "k3", "k4", "kerning", "keypoints", "keysplines", "keytimes", "lang", "lengthadjust", "letter-spacing", "kernelmatrix", "kernelunitlength", "lighting-color", "local", "marker-end", "marker-mid", "marker-start", "markerheight", "markerunits", "markerwidth", "maskcontentunits", "maskunits", "max", "mask", "mask-type", "media", "method", "mode", "min", "name", "numoctaves", "offset", "operator", "opacity", "order", "orient", "orientation", "origin", "overflow", "paint-order", "path", "pathlength", "patterncontentunits", "patterntransform", "patternunits", "points", "preservealpha", "preserveaspectratio", "primitiveunits", "r", "rx", "ry", "radius", "refx", "refy", "repeatcount", "repeatdur", "restart", "result", "rotate", "scale", "seed", "shape-rendering", "slope", "specularconstant", "specularexponent", "spreadmethod", "startoffset", "stddeviation", "stitchtiles", "stop-color", "stop-opacity", "stroke-dasharray", "stroke-dashoffset", "stroke-linecap", "stroke-linejoin", "stroke-miterlimit", "stroke-opacity", "stroke", "stroke-width", "style", "surfacescale", "systemlanguage", "tabindex", "tablevalues", "targetx", "targety", "transform", "transform-origin", "text-anchor", "text-decoration", "text-rendering", "textlength", "type", "u1", "u2", "unicode", "values", "viewbox", "visibility", "version", "vert-adv-y", "vert-origin-x", "vert-origin-y", "width", "word-spacing", "wrap", "writing-mode", "xchannelselector", "ychannelselector", "x", "x1", "x2", "xmlns", "y", "y1", "y2", "z", "zoomandpan"]), Yo = be(["accent", "accentunder", "align", "bevelled", "close", "columnsalign", "columnlines", "columnspan", "denomalign", "depth", "dir", "display", "displaystyle", "encoding", "fence", "frame", "height", "href", "id", "largeop", "length", "linethickness", "lspace", "lquote", "mathbackground", "mathcolor", "mathsize", "mathvariant", "maxsize", "minsize", "movablelimits", "notation", "numalign", "open", "rowalign", "rowlines", "rowspacing", "rowspan", "rspace", "rquote", "scriptlevel", "scriptminsize", "scriptsizemultiplier", "selection", "separator", "separators", "stretchy", "subscriptshift", "supscriptshift", "symmetric", "voffset", "width", "xmlns"]), sn = be(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]), Yd = Re(/\{\{[\w\W]*|[\w\W]*\}\}/gm), Kd = Re(/<%[\w\W]*|[\w\W]*%>/gm), Xd = Re(/\$\{[\w\W]*/gm), qd = Re(/^data-[\-\w.\u00B7-\uFFFF]+$/), Zd = Re(/^aria-[\-\w]+$/), Ai = Re(
4086
4102
  /^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i
4087
4103
  // eslint-disable-line no-useless-escape
4088
4104
  ), Qd = Re(/^(?:\w+script|data):/i), Jd = Re(
@@ -4159,18 +4175,18 @@ function Ni() {
4159
4175
  NodeFilter: c,
4160
4176
  NamedNodeMap: f = e.NamedNodeMap || e.MozNamedAttrMap,
4161
4177
  HTMLFormElement: p,
4162
- DOMParser: g,
4178
+ DOMParser: b,
4163
4179
  trustedTypes: m
4164
4180
  } = e, w = l.prototype, h = Mt(w, "cloneNode"), y = Mt(w, "remove"), C = Mt(w, "nextSibling"), E = Mt(w, "childNodes"), A = Mt(w, "parentNode");
4165
4181
  if (typeof i == "function") {
4166
4182
  const B = n.createElement("template");
4167
4183
  B.content && B.content.ownerDocument && (n = B.content.ownerDocument);
4168
4184
  }
4169
- let x, N = "";
4185
+ let x, T = "";
4170
4186
  const {
4171
4187
  implementation: D,
4172
4188
  createNodeIterator: O,
4173
- createDocumentFragment: k,
4189
+ createDocumentFragment: P,
4174
4190
  getElementsByTagName: W
4175
4191
  } = n, {
4176
4192
  importNode: H
@@ -4178,19 +4194,19 @@ function Ni() {
4178
4194
  let U = Xo();
4179
4195
  t.isSupported = typeof Ei == "function" && typeof A == "function" && D && D.createHTMLDocument !== void 0;
4180
4196
  const {
4181
- MUSTACHE_EXPR: j,
4182
- ERB_EXPR: b,
4197
+ MUSTACHE_EXPR: V,
4198
+ ERB_EXPR: g,
4183
4199
  TMPLIT_EXPR: S,
4184
- DATA_ATTR: T,
4185
- ARIA_ATTR: P,
4200
+ DATA_ATTR: N,
4201
+ ARIA_ATTR: k,
4186
4202
  IS_SCRIPT_OR_DATA: _,
4187
4203
  ATTR_WHITESPACE: R,
4188
4204
  CUSTOM_ELEMENT: K
4189
4205
  } = Ko;
4190
4206
  let {
4191
4207
  IS_ALLOWED_URI: te
4192
- } = Ko, V = null;
4193
- const Ee = X({}, [...Vo, ...ir, ...ar, ...lr, ...jo]);
4208
+ } = Ko, j = null;
4209
+ const Ee = X({}, [...jo, ...ir, ...ar, ...lr, ...Vo]);
4194
4210
  let G = null;
4195
4211
  const re = X({}, [...Go, ...cr, ...Yo, ...sn]);
4196
4212
  let Q = Object.seal(Ar(null, {
@@ -4235,7 +4251,7 @@ function Ni() {
4235
4251
  const Jr = X({}, ["audio", "video", "img", "source", "image", "track"]);
4236
4252
  let Wn = null;
4237
4253
  const eo = X({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]), Xt = "http://www.w3.org/1998/Math/MathML", qt = "http://www.w3.org/2000/svg", We = "http://www.w3.org/1999/xhtml";
4238
- let pt = We, Hn = !1, Vn = null;
4254
+ let pt = We, Hn = !1, jn = null;
4239
4255
  const wa = X({}, [Xt, qt, We], or);
4240
4256
  let Zt = X({}, ["mi", "mo", "mn", "ms", "mtext"]), Qt = X({}, ["annotation-xml"]);
4241
4257
  const xa = X({}, ["title", "style", "font", "a", "script"]);
@@ -4244,28 +4260,28 @@ function Ni() {
4244
4260
  let ce = null, mt = null;
4245
4261
  const Ea = n.createElement("form"), to = function(v) {
4246
4262
  return v instanceof RegExp || v instanceof Function;
4247
- }, jn = function() {
4263
+ }, Vn = function() {
4248
4264
  let v = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
4249
4265
  if (!(mt && mt === v)) {
4250
4266
  if ((!v || typeof v != "object") && (v = {}), v = Le(v), Pt = // eslint-disable-next-line unicorn/prefer-includes
4251
- Sa.indexOf(v.PARSER_MEDIA_TYPE) === -1 ? Ca : v.PARSER_MEDIA_TYPE, ce = Pt === "application/xhtml+xml" ? or : pn, V = ke(v, "ALLOWED_TAGS") ? X({}, v.ALLOWED_TAGS, ce) : Ee, G = ke(v, "ALLOWED_ATTR") ? X({}, v.ALLOWED_ATTR, ce) : re, Vn = ke(v, "ALLOWED_NAMESPACES") ? X({}, v.ALLOWED_NAMESPACES, or) : wa, Wn = ke(v, "ADD_URI_SAFE_ATTR") ? X(Le(eo), v.ADD_URI_SAFE_ATTR, ce) : eo, Qr = ke(v, "ADD_DATA_URI_TAGS") ? X(Le(Jr), v.ADD_DATA_URI_TAGS, ce) : Jr, Me = ke(v, "FORBID_CONTENTS") ? X({}, v.FORBID_CONTENTS, ce) : Un, pe = ke(v, "FORBID_TAGS") ? X({}, v.FORBID_TAGS, ce) : Le({}), L = ke(v, "FORBID_ATTR") ? X({}, v.FORBID_ATTR, ce) : Le({}), ft = ke(v, "USE_PROFILES") ? v.USE_PROFILES : !1, ie = v.ALLOW_ARIA_ATTR !== !1, q = v.ALLOW_DATA_ATTR !== !1, ee = v.ALLOW_UNKNOWN_PROTOCOLS || !1, ne = v.ALLOW_SELF_CLOSE_IN_ATTR !== !1, le = v.SAFE_FOR_TEMPLATES || !1, Ae = v.SAFE_FOR_XML !== !1, Ne = v.WHOLE_DOCUMENT || !1, dt = v.RETURN_DOM || !1, Yt = v.RETURN_DOM_FRAGMENT || !1, Kt = v.RETURN_TRUSTED_TYPE || !1, ot = v.FORCE_BODY || !1, qr = v.SANITIZE_DOM !== !1, Zr = v.SANITIZE_NAMED_PROPS || !1, Bn = v.KEEP_CONTENT !== !1, kt = v.IN_PLACE || !1, te = v.ALLOWED_URI_REGEXP || Ai, pt = v.NAMESPACE || We, Zt = v.MATHML_TEXT_INTEGRATION_POINTS || Zt, Qt = v.HTML_INTEGRATION_POINTS || Qt, Q = v.CUSTOM_ELEMENT_HANDLING || {}, v.CUSTOM_ELEMENT_HANDLING && to(v.CUSTOM_ELEMENT_HANDLING.tagNameCheck) && (Q.tagNameCheck = v.CUSTOM_ELEMENT_HANDLING.tagNameCheck), v.CUSTOM_ELEMENT_HANDLING && to(v.CUSTOM_ELEMENT_HANDLING.attributeNameCheck) && (Q.attributeNameCheck = v.CUSTOM_ELEMENT_HANDLING.attributeNameCheck), v.CUSTOM_ELEMENT_HANDLING && typeof v.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements == "boolean" && (Q.allowCustomizedBuiltInElements = v.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements), le && (q = !1), Yt && (dt = !0), ft && (V = X({}, jo), G = [], ft.html === !0 && (X(V, Vo), X(G, Go)), ft.svg === !0 && (X(V, ir), X(G, cr), X(G, sn)), ft.svgFilters === !0 && (X(V, ar), X(G, cr), X(G, sn)), ft.mathMl === !0 && (X(V, lr), X(G, Yo), X(G, sn))), v.ADD_TAGS && (typeof v.ADD_TAGS == "function" ? J.tagCheck = v.ADD_TAGS : (V === Ee && (V = Le(V)), X(V, v.ADD_TAGS, ce))), v.ADD_ATTR && (typeof v.ADD_ATTR == "function" ? J.attributeCheck = v.ADD_ATTR : (G === re && (G = Le(G)), X(G, v.ADD_ATTR, ce))), v.ADD_URI_SAFE_ATTR && X(Wn, v.ADD_URI_SAFE_ATTR, ce), v.FORBID_CONTENTS && (Me === Un && (Me = Le(Me)), X(Me, v.FORBID_CONTENTS, ce)), v.ADD_FORBID_CONTENTS && (Me === Un && (Me = Le(Me)), X(Me, v.ADD_FORBID_CONTENTS, ce)), Bn && (V["#text"] = !0), Ne && X(V, ["html", "head", "body"]), V.table && (X(V, ["tbody"]), delete pe.tbody), v.TRUSTED_TYPES_POLICY) {
4267
+ Sa.indexOf(v.PARSER_MEDIA_TYPE) === -1 ? Ca : v.PARSER_MEDIA_TYPE, ce = Pt === "application/xhtml+xml" ? or : pn, j = ke(v, "ALLOWED_TAGS") ? X({}, v.ALLOWED_TAGS, ce) : Ee, G = ke(v, "ALLOWED_ATTR") ? X({}, v.ALLOWED_ATTR, ce) : re, jn = ke(v, "ALLOWED_NAMESPACES") ? X({}, v.ALLOWED_NAMESPACES, or) : wa, Wn = ke(v, "ADD_URI_SAFE_ATTR") ? X(Le(eo), v.ADD_URI_SAFE_ATTR, ce) : eo, Qr = ke(v, "ADD_DATA_URI_TAGS") ? X(Le(Jr), v.ADD_DATA_URI_TAGS, ce) : Jr, Me = ke(v, "FORBID_CONTENTS") ? X({}, v.FORBID_CONTENTS, ce) : Un, pe = ke(v, "FORBID_TAGS") ? X({}, v.FORBID_TAGS, ce) : Le({}), L = ke(v, "FORBID_ATTR") ? X({}, v.FORBID_ATTR, ce) : Le({}), ft = ke(v, "USE_PROFILES") ? v.USE_PROFILES : !1, ie = v.ALLOW_ARIA_ATTR !== !1, q = v.ALLOW_DATA_ATTR !== !1, ee = v.ALLOW_UNKNOWN_PROTOCOLS || !1, ne = v.ALLOW_SELF_CLOSE_IN_ATTR !== !1, le = v.SAFE_FOR_TEMPLATES || !1, Ae = v.SAFE_FOR_XML !== !1, Ne = v.WHOLE_DOCUMENT || !1, dt = v.RETURN_DOM || !1, Yt = v.RETURN_DOM_FRAGMENT || !1, Kt = v.RETURN_TRUSTED_TYPE || !1, ot = v.FORCE_BODY || !1, qr = v.SANITIZE_DOM !== !1, Zr = v.SANITIZE_NAMED_PROPS || !1, Bn = v.KEEP_CONTENT !== !1, kt = v.IN_PLACE || !1, te = v.ALLOWED_URI_REGEXP || Ai, pt = v.NAMESPACE || We, Zt = v.MATHML_TEXT_INTEGRATION_POINTS || Zt, Qt = v.HTML_INTEGRATION_POINTS || Qt, Q = v.CUSTOM_ELEMENT_HANDLING || {}, v.CUSTOM_ELEMENT_HANDLING && to(v.CUSTOM_ELEMENT_HANDLING.tagNameCheck) && (Q.tagNameCheck = v.CUSTOM_ELEMENT_HANDLING.tagNameCheck), v.CUSTOM_ELEMENT_HANDLING && to(v.CUSTOM_ELEMENT_HANDLING.attributeNameCheck) && (Q.attributeNameCheck = v.CUSTOM_ELEMENT_HANDLING.attributeNameCheck), v.CUSTOM_ELEMENT_HANDLING && typeof v.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements == "boolean" && (Q.allowCustomizedBuiltInElements = v.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements), le && (q = !1), Yt && (dt = !0), ft && (j = X({}, Vo), G = [], ft.html === !0 && (X(j, jo), X(G, Go)), ft.svg === !0 && (X(j, ir), X(G, cr), X(G, sn)), ft.svgFilters === !0 && (X(j, ar), X(G, cr), X(G, sn)), ft.mathMl === !0 && (X(j, lr), X(G, Yo), X(G, sn))), v.ADD_TAGS && (typeof v.ADD_TAGS == "function" ? J.tagCheck = v.ADD_TAGS : (j === Ee && (j = Le(j)), X(j, v.ADD_TAGS, ce))), v.ADD_ATTR && (typeof v.ADD_ATTR == "function" ? J.attributeCheck = v.ADD_ATTR : (G === re && (G = Le(G)), X(G, v.ADD_ATTR, ce))), v.ADD_URI_SAFE_ATTR && X(Wn, v.ADD_URI_SAFE_ATTR, ce), v.FORBID_CONTENTS && (Me === Un && (Me = Le(Me)), X(Me, v.FORBID_CONTENTS, ce)), v.ADD_FORBID_CONTENTS && (Me === Un && (Me = Le(Me)), X(Me, v.ADD_FORBID_CONTENTS, ce)), Bn && (j["#text"] = !0), Ne && X(j, ["html", "head", "body"]), j.table && (X(j, ["tbody"]), delete pe.tbody), v.TRUSTED_TYPES_POLICY) {
4252
4268
  if (typeof v.TRUSTED_TYPES_POLICY.createHTML != "function")
4253
4269
  throw It('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
4254
4270
  if (typeof v.TRUSTED_TYPES_POLICY.createScriptURL != "function")
4255
4271
  throw It('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');
4256
- x = v.TRUSTED_TYPES_POLICY, N = x.createHTML("");
4272
+ x = v.TRUSTED_TYPES_POLICY, T = x.createHTML("");
4257
4273
  } else
4258
- x === void 0 && (x = nf(m, o)), x !== null && typeof N == "string" && (N = x.createHTML(""));
4274
+ x === void 0 && (x = nf(m, o)), x !== null && typeof T == "string" && (T = x.createHTML(""));
4259
4275
  be && be(v), mt = v;
4260
4276
  }
4261
- }, no = X({}, [...ir, ...ar, ...jd]), ro = X({}, [...lr, ...Gd]), Aa = function(v) {
4277
+ }, no = X({}, [...ir, ...ar, ...Vd]), ro = X({}, [...lr, ...Gd]), Aa = function(v) {
4262
4278
  let I = A(v);
4263
4279
  (!I || !I.tagName) && (I = {
4264
4280
  namespaceURI: pt,
4265
4281
  tagName: "template"
4266
4282
  });
4267
4283
  const z = pn(v.tagName), oe = pn(I.tagName);
4268
- return Vn[v.namespaceURI] ? v.namespaceURI === qt ? I.namespaceURI === We ? z === "svg" : I.namespaceURI === Xt ? z === "svg" && (oe === "annotation-xml" || Zt[oe]) : !!no[z] : v.namespaceURI === Xt ? I.namespaceURI === We ? z === "math" : I.namespaceURI === qt ? z === "math" && Qt[oe] : !!ro[z] : v.namespaceURI === We ? I.namespaceURI === qt && !Qt[oe] || I.namespaceURI === Xt && !Zt[oe] ? !1 : !ro[z] && (xa[z] || !no[z]) : !!(Pt === "application/xhtml+xml" && Vn[v.namespaceURI]) : !1;
4284
+ return jn[v.namespaceURI] ? v.namespaceURI === qt ? I.namespaceURI === We ? z === "svg" : I.namespaceURI === Xt ? z === "svg" && (oe === "annotation-xml" || Zt[oe]) : !!no[z] : v.namespaceURI === Xt ? I.namespaceURI === We ? z === "math" : I.namespaceURI === qt ? z === "math" && Qt[oe] : !!ro[z] : v.namespaceURI === We ? I.namespaceURI === qt && !Qt[oe] || I.namespaceURI === Xt && !Zt[oe] ? !1 : !ro[z] && (xa[z] || !no[z]) : !!(Pt === "application/xhtml+xml" && jn[v.namespaceURI]) : !1;
4269
4285
  }, De = function(v) {
4270
4286
  _t(t.removed, {
4271
4287
  element: v
@@ -4310,13 +4326,13 @@ function Ni() {
4310
4326
  const oe = x ? x.createHTML(v) : v;
4311
4327
  if (pt === We)
4312
4328
  try {
4313
- I = new g().parseFromString(oe, Pt);
4329
+ I = new b().parseFromString(oe, Pt);
4314
4330
  } catch {
4315
4331
  }
4316
4332
  if (!I || !I.documentElement) {
4317
4333
  I = D.createDocument(pt, "template", null);
4318
4334
  try {
4319
- I.documentElement.innerHTML = Hn ? N : oe;
4335
+ I.documentElement.innerHTML = Hn ? T : oe;
4320
4336
  } catch {
4321
4337
  }
4322
4338
  }
@@ -4347,10 +4363,10 @@ function Ni() {
4347
4363
  const z = ce(v.nodeName);
4348
4364
  if (He(U.uponSanitizeElement, v, {
4349
4365
  tagName: z,
4350
- allowedTags: V
4366
+ allowedTags: j
4351
4367
  }), Ae && v.hasChildNodes() && !io(v.firstElementChild) && ge(/<[/\w!]/g, v.innerHTML) && ge(/<[/\w!]/g, v.textContent) || v.nodeType === Dt.progressingInstruction || Ae && v.nodeType === Dt.comment && ge(/<[/\w]/g, v.data))
4352
4368
  return De(v), !0;
4353
- if (!(J.tagCheck instanceof Function && J.tagCheck(z)) && (!V[z] || pe[z])) {
4369
+ if (!(J.tagCheck instanceof Function && J.tagCheck(z)) && (!j[z] || pe[z])) {
4354
4370
  if (!pe[z] && co(z) && (Q.tagNameCheck instanceof RegExp && ge(Q.tagNameCheck, z) || Q.tagNameCheck instanceof Function && Q.tagNameCheck(z)))
4355
4371
  return !1;
4356
4372
  if (Bn && !Me[z]) {
@@ -4358,14 +4374,14 @@ function Ni() {
4358
4374
  if (me && oe) {
4359
4375
  const ae = me.length;
4360
4376
  for (let ye = ae - 1; ye >= 0; --ye) {
4361
- const Ve = h(me[ye], !0);
4362
- Ve.__removalCount = (v.__removalCount || 0) + 1, oe.insertBefore(Ve, C(v));
4377
+ const je = h(me[ye], !0);
4378
+ je.__removalCount = (v.__removalCount || 0) + 1, oe.insertBefore(je, C(v));
4363
4379
  }
4364
4380
  }
4365
4381
  }
4366
4382
  return De(v), !0;
4367
4383
  }
4368
- return v instanceof l && !Aa(v) || (z === "noscript" || z === "noembed" || z === "noframes") && ge(/<\/no(script|embed|frames)/i, v.innerHTML) ? (De(v), !0) : (le && v.nodeType === Dt.text && (I = v.textContent, on([j, b, S], (oe) => {
4384
+ return v instanceof l && !Aa(v) || (z === "noscript" || z === "noembed" || z === "noframes") && ge(/<\/no(script|embed|frames)/i, v.innerHTML) ? (De(v), !0) : (le && v.nodeType === Dt.text && (I = v.textContent, on([V, g, S], (oe) => {
4369
4385
  I = Ot(I, oe, " ");
4370
4386
  }), v.textContent !== I && (_t(t.removed, {
4371
4387
  element: v.cloneNode()
@@ -4373,8 +4389,8 @@ function Ni() {
4373
4389
  }, lo = function(v, I, z) {
4374
4390
  if (qr && (I === "id" || I === "name") && (z in n || z in Ea))
4375
4391
  return !1;
4376
- if (!(q && !L[I] && ge(T, I))) {
4377
- if (!(ie && ge(P, I))) {
4392
+ if (!(q && !L[I] && ge(N, I))) {
4393
+ if (!(ie && ge(k, I))) {
4378
4394
  if (!(J.attributeCheck instanceof Function && J.attributeCheck(I, v))) {
4379
4395
  if (!G[I] || L[I]) {
4380
4396
  if (
@@ -4420,8 +4436,8 @@ function Ni() {
4420
4436
  const me = I[oe], {
4421
4437
  name: ae,
4422
4438
  namespaceURI: ye,
4423
- value: Ve
4424
- } = me, ht = ce(ae), Yn = Ve;
4439
+ value: je
4440
+ } = me, ht = ce(ae), Yn = je;
4425
4441
  let fe = ae === "value" ? Yn : Wd(Yn);
4426
4442
  if (z.attrName = ht, z.attrValue = fe, z.keepAttr = !0, z.forceKeepAttr = void 0, He(U.uponSanitizeAttribute, v, z), fe = z.attrValue, Zr && (ht === "id" || ht === "name") && (st(ae, v), fe = ya + fe), Ae && ge(/((--!?|])>)|<\/(style|title|textarea)/i, fe)) {
4427
4443
  st(ae, v);
@@ -4441,7 +4457,7 @@ function Ni() {
4441
4457
  st(ae, v);
4442
4458
  continue;
4443
4459
  }
4444
- le && on([j, b, S], (po) => {
4460
+ le && on([V, g, S], (po) => {
4445
4461
  fe = Ot(fe, po, " ");
4446
4462
  });
4447
4463
  const fo = ce(v.nodeName);
@@ -4485,10 +4501,10 @@ function Ni() {
4485
4501
  throw It("toString is not a function");
4486
4502
  if (!t.isSupported)
4487
4503
  return B;
4488
- if (rt || jn(v), t.removed = [], typeof B == "string" && (kt = !1), kt) {
4504
+ if (rt || Vn(v), t.removed = [], typeof B == "string" && (kt = !1), kt) {
4489
4505
  if (B.nodeName) {
4490
- const Ve = ce(B.nodeName);
4491
- if (!V[Ve] || pe[Ve])
4506
+ const je = ce(B.nodeName);
4507
+ if (!j[je] || pe[je])
4492
4508
  throw It("root node is forbidden and cannot be sanitized in-place");
4493
4509
  }
4494
4510
  } else if (B instanceof a)
@@ -4498,7 +4514,7 @@ function Ni() {
4498
4514
  B.indexOf("<") === -1)
4499
4515
  return x && Kt ? x.createHTML(B) : B;
4500
4516
  if (I = oo(B), !I)
4501
- return dt ? null : Kt ? N : "";
4517
+ return dt ? null : Kt ? T : "";
4502
4518
  }
4503
4519
  I && ot && De(I.firstChild);
4504
4520
  const ae = so(kt ? B : I);
@@ -4508,24 +4524,24 @@ function Ni() {
4508
4524
  return B;
4509
4525
  if (dt) {
4510
4526
  if (Yt)
4511
- for (me = k.call(I.ownerDocument); I.firstChild; )
4527
+ for (me = P.call(I.ownerDocument); I.firstChild; )
4512
4528
  me.appendChild(I.firstChild);
4513
4529
  else
4514
4530
  me = I;
4515
4531
  return (G.shadowroot || G.shadowrootmode) && (me = H.call(r, me, !0)), me;
4516
4532
  }
4517
4533
  let ye = Ne ? I.outerHTML : I.innerHTML;
4518
- return Ne && V["!doctype"] && I.ownerDocument && I.ownerDocument.doctype && I.ownerDocument.doctype.name && ge(Ri, I.ownerDocument.doctype.name) && (ye = "<!DOCTYPE " + I.ownerDocument.doctype.name + `>
4519
- ` + ye), le && on([j, b, S], (Ve) => {
4520
- ye = Ot(ye, Ve, " ");
4534
+ return Ne && j["!doctype"] && I.ownerDocument && I.ownerDocument.doctype && I.ownerDocument.doctype.name && ge(Ri, I.ownerDocument.doctype.name) && (ye = "<!DOCTYPE " + I.ownerDocument.doctype.name + `>
4535
+ ` + ye), le && on([V, g, S], (je) => {
4536
+ ye = Ot(ye, je, " ");
4521
4537
  }), x && Kt ? x.createHTML(ye) : ye;
4522
4538
  }, t.setConfig = function() {
4523
4539
  let B = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
4524
- jn(B), rt = !0;
4540
+ Vn(B), rt = !0;
4525
4541
  }, t.clearConfig = function() {
4526
4542
  mt = null, rt = !1;
4527
4543
  }, t.isValidAttribute = function(B, v, I) {
4528
- mt || jn({});
4544
+ mt || Vn({});
4529
4545
  const z = ce(B), oe = ce(v);
4530
4546
  return lo(z, oe, I);
4531
4547
  }, t.addHook = function(B, v) {
@@ -4563,16 +4579,16 @@ function sf({ field: e, formValues: t, disabled: n }) {
4563
4579
  function af({ field: e, formValues: t, handleChange: n, handleBlur: r, error: o }) {
4564
4580
  const s = typeof e.disabled == "function" ? e.disabled(t) : e.disabled, i = e.options || [], a = e.inline || e.layout === "inline";
4565
4581
  if (i.length > 0) {
4566
- const l = Array.isArray(t[e.name]) ? t[e.name] : [], c = (p, g) => {
4582
+ const l = Array.isArray(t[e.name]) ? t[e.name] : [], c = (p, b) => {
4567
4583
  let m;
4568
- g ? m = [...l, p] : m = l.filter((w) => w !== p), n(e.name, m);
4584
+ b ? m = [...l, p] : m = l.filter((w) => w !== p), n(e.name, m);
4569
4585
  }, f = o && e.required && l.length === 0;
4570
4586
  return /* @__PURE__ */ u(Ke, { children: /* @__PURE__ */ u(
4571
4587
  "div",
4572
4588
  {
4573
4589
  className: a ? "grid grid-cols-4 gap-3 mt-3" : "space-y-3 mt-3",
4574
4590
  children: i.map((p) => {
4575
- const g = typeof p == "object" ? p.value : p, m = typeof p == "object" ? p.label : p, w = typeof p == "object" ? p.description : null, h = `${e.name}-${g}`, y = l.includes(g);
4591
+ const b = typeof p == "object" ? p.value : p, m = typeof p == "object" ? p.label : p, w = typeof p == "object" ? p.description : null, h = `${e.name}-${b}`, y = l.includes(b);
4576
4592
  return /* @__PURE__ */ M("div", { className: "relative flex items-start", children: [
4577
4593
  /* @__PURE__ */ u("div", { className: "flex h-6 items-center", children: /* @__PURE__ */ u(
4578
4594
  "input",
@@ -4581,7 +4597,7 @@ function af({ field: e, formValues: t, handleChange: n, handleBlur: r, error: o
4581
4597
  type: "checkbox",
4582
4598
  id: h,
4583
4599
  checked: y,
4584
- onChange: (C) => c(g, C.target.checked),
4600
+ onChange: (C) => c(b, C.target.checked),
4585
4601
  onBlur: () => r(e.name),
4586
4602
  disabled: s,
4587
4603
  className: `
@@ -4612,7 +4628,7 @@ function af({ field: e, formValues: t, handleChange: n, handleBlur: r, error: o
4612
4628
  }
4613
4629
  )
4614
4630
  ] })
4615
- ] }, g);
4631
+ ] }, b);
4616
4632
  })
4617
4633
  }
4618
4634
  ) });
@@ -4665,8 +4681,8 @@ function cf(e) {
4665
4681
  }, [a]), he(() => {
4666
4682
  const c = r.current, f = o.current;
4667
4683
  if (f !== e) {
4668
- const g = s.current, m = an(c);
4669
- e ? l("MOUNT") : m === "none" || c?.display === "none" ? l("UNMOUNT") : l(f && g !== m ? "ANIMATION_OUT" : "UNMOUNT"), o.current = e;
4684
+ const b = s.current, m = an(c);
4685
+ e ? l("MOUNT") : m === "none" || c?.display === "none" ? l("UNMOUNT") : l(f && b !== m ? "ANIMATION_OUT" : "UNMOUNT"), o.current = e;
4670
4686
  }
4671
4687
  }, [e, l]), he(() => {
4672
4688
  if (t) {
@@ -4679,11 +4695,11 @@ function cf(e) {
4679
4695
  t.style.animationFillMode === "forwards" && (t.style.animationFillMode = y);
4680
4696
  });
4681
4697
  }
4682
- }, g = (m) => {
4698
+ }, b = (m) => {
4683
4699
  m.target === t && (s.current = an(r.current));
4684
4700
  };
4685
- return t.addEventListener("animationstart", g), t.addEventListener("animationcancel", p), t.addEventListener("animationend", p), () => {
4686
- f.clearTimeout(c), t.removeEventListener("animationstart", g), t.removeEventListener("animationcancel", p), t.removeEventListener("animationend", p);
4701
+ return t.addEventListener("animationstart", b), t.addEventListener("animationcancel", p), t.addEventListener("animationend", p), () => {
4702
+ f.clearTimeout(c), t.removeEventListener("animationstart", b), t.removeEventListener("animationcancel", p), t.removeEventListener("animationend", p);
4687
4703
  };
4688
4704
  } else
4689
4705
  l("ANIMATION_END");
@@ -4727,7 +4743,7 @@ var df = [
4727
4743
  return r.displayName = `Primitive.${t}`, { ...e, [t]: r };
4728
4744
  }, {}), In = "Popover", [ki] = ut(In, [
4729
4745
  Nn
4730
- ]), jt = Nn(), [ff, nt] = ki(In), Pi = (e) => {
4746
+ ]), Vt = Nn(), [ff, nt] = ki(In), Pi = (e) => {
4731
4747
  const {
4732
4748
  __scopePopover: t,
4733
4749
  children: n,
@@ -4735,7 +4751,7 @@ var df = [
4735
4751
  defaultOpen: o,
4736
4752
  onOpenChange: s,
4737
4753
  modal: i = !1
4738
- } = e, a = jt(t), l = d.useRef(null), [c, f] = d.useState(!1), [p, g] = Wt({
4754
+ } = e, a = Vt(t), l = d.useRef(null), [c, f] = d.useState(!1), [p, b] = Wt({
4739
4755
  prop: r,
4740
4756
  defaultProp: o ?? !1,
4741
4757
  onChange: s,
@@ -4748,8 +4764,8 @@ var df = [
4748
4764
  contentId: Ht(),
4749
4765
  triggerRef: l,
4750
4766
  open: p,
4751
- onOpenChange: g,
4752
- onOpenToggle: d.useCallback(() => g((m) => !m), [g]),
4767
+ onOpenChange: b,
4768
+ onOpenToggle: d.useCallback(() => b((m) => !m), [b]),
4753
4769
  hasCustomAnchor: c,
4754
4770
  onCustomAnchorAdd: d.useCallback(() => f(!0), []),
4755
4771
  onCustomAnchorRemove: d.useCallback(() => f(!1), []),
@@ -4761,14 +4777,14 @@ var df = [
4761
4777
  Pi.displayName = In;
4762
4778
  var _i = "PopoverAnchor", pf = d.forwardRef(
4763
4779
  (e, t) => {
4764
- const { __scopePopover: n, ...r } = e, o = nt(_i, n), s = jt(n), { onCustomAnchorAdd: i, onCustomAnchorRemove: a } = o;
4780
+ const { __scopePopover: n, ...r } = e, o = nt(_i, n), s = Vt(n), { onCustomAnchorAdd: i, onCustomAnchorRemove: a } = o;
4765
4781
  return d.useEffect(() => (i(), () => a()), [i, a]), /* @__PURE__ */ u(Hr, { ...s, ...r, ref: t });
4766
4782
  }
4767
4783
  );
4768
4784
  pf.displayName = _i;
4769
4785
  var Oi = "PopoverTrigger", Ii = d.forwardRef(
4770
4786
  (e, t) => {
4771
- const { __scopePopover: n, ...r } = e, o = nt(Oi, n), s = jt(n), i = se(t, o.triggerRef), a = /* @__PURE__ */ u(
4787
+ const { __scopePopover: n, ...r } = e, o = nt(Oi, n), s = Vt(n), i = se(t, o.triggerRef), a = /* @__PURE__ */ u(
4772
4788
  Ti.button,
4773
4789
  {
4774
4790
  type: "button",
@@ -4789,7 +4805,7 @@ var Yr = "PopoverPortal", [mf, hf] = ki(Yr, {
4789
4805
  forceMount: void 0
4790
4806
  }), Mi = (e) => {
4791
4807
  const { __scopePopover: t, forceMount: n, children: r, container: o } = e, s = nt(Yr, t);
4792
- return /* @__PURE__ */ u(mf, { scope: t, forceMount: n, children: /* @__PURE__ */ u(On, { present: n || s.open, children: /* @__PURE__ */ u(Vr, { asChild: !0, container: o, children: r }) }) });
4808
+ return /* @__PURE__ */ u(mf, { scope: t, forceMount: n, children: /* @__PURE__ */ u(On, { present: n || s.open, children: /* @__PURE__ */ u(jr, { asChild: !0, container: o, children: r }) }) });
4793
4809
  };
4794
4810
  Mi.displayName = Yr;
4795
4811
  var Ct = "PopoverContent", Di = d.forwardRef(
@@ -4805,7 +4821,7 @@ var gf = /* @__PURE__ */ we("PopoverContent.RemoveScroll"), bf = d.forwardRef(
4805
4821
  return d.useEffect(() => {
4806
4822
  const i = r.current;
4807
4823
  if (i) return Ws(i);
4808
- }, []), /* @__PURE__ */ u(jr, { as: gf, allowPinchZoom: !0, children: /* @__PURE__ */ u(
4824
+ }, []), /* @__PURE__ */ u(Vr, { as: gf, allowPinchZoom: !0, children: /* @__PURE__ */ u(
4809
4825
  Li,
4810
4826
  {
4811
4827
  ...e,
@@ -4865,7 +4881,7 @@ var gf = /* @__PURE__ */ we("PopoverContent.RemoveScroll"), bf = d.forwardRef(
4865
4881
  onFocusOutside: c,
4866
4882
  onInteractOutside: f,
4867
4883
  ...p
4868
- } = e, g = nt(Ct, n), m = jt(n);
4884
+ } = e, b = nt(Ct, n), m = Vt(n);
4869
4885
  return ds(), /* @__PURE__ */ u(
4870
4886
  Mr,
4871
4887
  {
@@ -4883,13 +4899,13 @@ var gf = /* @__PURE__ */ we("PopoverContent.RemoveScroll"), bf = d.forwardRef(
4883
4899
  onEscapeKeyDown: a,
4884
4900
  onPointerDownOutside: l,
4885
4901
  onFocusOutside: c,
4886
- onDismiss: () => g.onOpenChange(!1),
4902
+ onDismiss: () => b.onOpenChange(!1),
4887
4903
  children: /* @__PURE__ */ u(
4888
4904
  Fs,
4889
4905
  {
4890
- "data-state": $i(g.open),
4906
+ "data-state": $i(b.open),
4891
4907
  role: "dialog",
4892
- id: g.contentId,
4908
+ id: b.contentId,
4893
4909
  ...m,
4894
4910
  ...p,
4895
4911
  ref: t,
@@ -4925,7 +4941,7 @@ var gf = /* @__PURE__ */ we("PopoverContent.RemoveScroll"), bf = d.forwardRef(
4925
4941
  yf.displayName = Fi;
4926
4942
  var wf = "PopoverArrow", xf = d.forwardRef(
4927
4943
  (e, t) => {
4928
- const { __scopePopover: n, ...r } = e, o = jt(n);
4944
+ const { __scopePopover: n, ...r } = e, o = Vt(n);
4929
4945
  return /* @__PURE__ */ u($s, { ...o, ...r, ref: t });
4930
4946
  }
4931
4947
  );
@@ -5108,16 +5124,16 @@ const Nf = (e, t) => {
5108
5124
  y === "[" ? i++ : y === "]" ? i-- : y === "(" ? a++ : y === ")" && a--;
5109
5125
  }
5110
5126
  const p = s.length === 0 ? o : o.slice(l);
5111
- let g = p, m = !1;
5112
- p.endsWith(Tr) ? (g = p.slice(0, -1), m = !0) : (
5127
+ let b = p, m = !1;
5128
+ p.endsWith(Tr) ? (b = p.slice(0, -1), m = !0) : (
5113
5129
  /**
5114
5130
  * In Tailwind CSS v3 the important modifier was at the start of the base class name. This is still supported for legacy reasons.
5115
5131
  * @see https://github.com/dcastil/tailwind-merge/issues/513#issuecomment-2614029864
5116
5132
  */
5117
- p.startsWith(Tr) && (g = p.slice(1), m = !0)
5133
+ p.startsWith(Tr) && (b = p.slice(1), m = !0)
5118
5134
  );
5119
5135
  const w = c && c > l ? c - l : void 0;
5120
- return Qo(s, m, g, w);
5136
+ return Qo(s, m, b, w);
5121
5137
  };
5122
5138
  if (t) {
5123
5139
  const o = t + Zo, s = r;
@@ -5149,18 +5165,18 @@ const Nf = (e, t) => {
5149
5165
  parseClassName: Uf(e),
5150
5166
  sortModifiers: Wf(e),
5151
5167
  ...Pf(e)
5152
- }), Vf = /\s+/, jf = (e, t) => {
5168
+ }), jf = /\s+/, Vf = (e, t) => {
5153
5169
  const {
5154
5170
  parseClassName: n,
5155
5171
  getClassGroupId: r,
5156
5172
  getConflictingClassGroupIds: o,
5157
5173
  sortModifiers: s
5158
- } = t, i = [], a = e.trim().split(Vf);
5174
+ } = t, i = [], a = e.trim().split(jf);
5159
5175
  let l = "";
5160
5176
  for (let c = a.length - 1; c >= 0; c -= 1) {
5161
5177
  const f = a[c], {
5162
5178
  isExternal: p,
5163
- modifiers: g,
5179
+ modifiers: b,
5164
5180
  hasImportantModifier: m,
5165
5181
  baseClassName: w,
5166
5182
  maybePostfixModifierPosition: h
@@ -5181,13 +5197,13 @@ const Nf = (e, t) => {
5181
5197
  }
5182
5198
  y = !1;
5183
5199
  }
5184
- const E = g.length === 0 ? "" : g.length === 1 ? g[0] : s(g).join(":"), A = m ? E + Tr : E, x = A + C;
5200
+ const E = b.length === 0 ? "" : b.length === 1 ? b[0] : s(b).join(":"), A = m ? E + Tr : E, x = A + C;
5185
5201
  if (i.indexOf(x) > -1)
5186
5202
  continue;
5187
5203
  i.push(x);
5188
- const N = o(C, y);
5189
- for (let D = 0; D < N.length; ++D) {
5190
- const O = N[D];
5204
+ const T = o(C, y);
5205
+ for (let D = 0; D < T.length; ++D) {
5206
+ const O = T[D];
5191
5207
  i.push(A + O);
5192
5208
  }
5193
5209
  l = f + (l.length > 0 ? " " + l : l);
@@ -5214,26 +5230,26 @@ const Nf = (e, t) => {
5214
5230
  const c = r(l);
5215
5231
  if (c)
5216
5232
  return c;
5217
- const f = jf(l, n);
5233
+ const f = Vf(l, n);
5218
5234
  return o(l, f), f;
5219
5235
  };
5220
5236
  return s = i, (...l) => s(Gf(...l));
5221
5237
  }, Kf = [], ue = (e) => {
5222
5238
  const t = (n) => n[e] || Kf;
5223
5239
  return t.isThemeGetter = !0, t;
5224
- }, Vi = /^\[(?:(\w[\w-]*):)?(.+)\]$/i, ji = /^\((?:(\w[\w-]*):)?(.+)\)$/i, Xf = /^\d+\/\d+$/, qf = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/, Zf = /\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/, Qf = /^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/, Jf = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/, ep = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/, yt = (e) => Xf.test(e), Y = (e) => !!e && !Number.isNaN(Number(e)), Xe = (e) => !!e && Number.isInteger(Number(e)), ur = (e) => e.endsWith("%") && Y(e.slice(0, -1)), je = (e) => qf.test(e), tp = () => !0, np = (e) => (
5240
+ }, ji = /^\[(?:(\w[\w-]*):)?(.+)\]$/i, Vi = /^\((?:(\w[\w-]*):)?(.+)\)$/i, Xf = /^\d+\/\d+$/, qf = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/, Zf = /\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/, Qf = /^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/, Jf = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/, ep = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/, yt = (e) => Xf.test(e), Y = (e) => !!e && !Number.isNaN(Number(e)), Xe = (e) => !!e && Number.isInteger(Number(e)), ur = (e) => e.endsWith("%") && Y(e.slice(0, -1)), Ve = (e) => qf.test(e), tp = () => !0, np = (e) => (
5225
5241
  // `colorFunctionRegex` check is necessary because color functions can have percentages in them which which would be incorrectly classified as lengths.
5226
5242
  // For example, `hsl(0 0% 0%)` would be classified as a length without this check.
5227
5243
  // I could also use lookbehind assertion in `lengthUnitRegex` but that isn't supported widely enough.
5228
5244
  Zf.test(e) && !Qf.test(e)
5229
- ), Gi = () => !1, rp = (e) => Jf.test(e), op = (e) => ep.test(e), sp = (e) => !F(e) && !$(e), ip = (e) => Nt(e, Xi, Gi), F = (e) => Vi.test(e), it = (e) => Nt(e, qi, np), dr = (e) => Nt(e, dp, Y), Jo = (e) => Nt(e, Yi, Gi), ap = (e) => Nt(e, Ki, op), ln = (e) => Nt(e, Zi, rp), $ = (e) => ji.test(e), Lt = (e) => Tt(e, qi), lp = (e) => Tt(e, fp), es = (e) => Tt(e, Yi), cp = (e) => Tt(e, Xi), up = (e) => Tt(e, Ki), cn = (e) => Tt(e, Zi, !0), Nt = (e, t, n) => {
5230
- const r = Vi.exec(e);
5245
+ ), Gi = () => !1, rp = (e) => Jf.test(e), op = (e) => ep.test(e), sp = (e) => !F(e) && !$(e), ip = (e) => Nt(e, Xi, Gi), F = (e) => ji.test(e), it = (e) => Nt(e, qi, np), dr = (e) => Nt(e, dp, Y), Jo = (e) => Nt(e, Yi, Gi), ap = (e) => Nt(e, Ki, op), ln = (e) => Nt(e, Zi, rp), $ = (e) => Vi.test(e), Lt = (e) => Tt(e, qi), lp = (e) => Tt(e, fp), es = (e) => Tt(e, Yi), cp = (e) => Tt(e, Xi), up = (e) => Tt(e, Ki), cn = (e) => Tt(e, Zi, !0), Nt = (e, t, n) => {
5246
+ const r = ji.exec(e);
5231
5247
  return r ? r[1] ? t(r[1]) : n(r[2]) : !1;
5232
5248
  }, Tt = (e, t, n = !1) => {
5233
- const r = ji.exec(e);
5249
+ const r = Vi.exec(e);
5234
5250
  return r ? r[1] ? t(r[1]) : n : !1;
5235
5251
  }, Yi = (e) => e === "position" || e === "percentage", Ki = (e) => e === "image" || e === "url", Xi = (e) => e === "length" || e === "size" || e === "bg-size", qi = (e) => e === "length", dp = (e) => e === "number", fp = (e) => e === "family-name", Zi = (e) => e === "shadow", pp = () => {
5236
- const e = ue("color"), t = ue("font"), n = ue("text"), r = ue("font-weight"), o = ue("tracking"), s = ue("leading"), i = ue("breakpoint"), a = ue("container"), l = ue("spacing"), c = ue("radius"), f = ue("shadow"), p = ue("inset-shadow"), g = ue("text-shadow"), m = ue("drop-shadow"), w = ue("blur"), h = ue("perspective"), y = ue("aspect"), C = ue("ease"), E = ue("animate"), A = () => ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"], x = () => [
5252
+ const e = ue("color"), t = ue("font"), n = ue("text"), r = ue("font-weight"), o = ue("tracking"), s = ue("leading"), i = ue("breakpoint"), a = ue("container"), l = ue("spacing"), c = ue("radius"), f = ue("shadow"), p = ue("inset-shadow"), b = ue("text-shadow"), m = ue("drop-shadow"), w = ue("blur"), h = ue("perspective"), y = ue("aspect"), C = ue("ease"), E = ue("animate"), A = () => ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"], x = () => [
5237
5253
  "center",
5238
5254
  "top",
5239
5255
  "bottom",
@@ -5251,13 +5267,13 @@ const Nf = (e, t) => {
5251
5267
  "bottom-left",
5252
5268
  // Deprecated since Tailwind CSS v4.1.0, see https://github.com/tailwindlabs/tailwindcss/pull/17378
5253
5269
  "left-bottom"
5254
- ], N = () => [...x(), $, F], D = () => ["auto", "hidden", "clip", "visible", "scroll"], O = () => ["auto", "contain", "none"], k = () => [$, F, l], W = () => [yt, "full", "auto", ...k()], H = () => [Xe, "none", "subgrid", $, F], U = () => ["auto", {
5270
+ ], T = () => [...x(), $, F], D = () => ["auto", "hidden", "clip", "visible", "scroll"], O = () => ["auto", "contain", "none"], P = () => [$, F, l], W = () => [yt, "full", "auto", ...P()], H = () => [Xe, "none", "subgrid", $, F], U = () => ["auto", {
5255
5271
  span: ["full", Xe, $, F]
5256
- }, Xe, $, F], j = () => [Xe, "auto", $, F], b = () => ["auto", "min", "max", "fr", $, F], S = () => ["start", "end", "center", "between", "around", "evenly", "stretch", "baseline", "center-safe", "end-safe"], T = () => ["start", "end", "center", "stretch", "center-safe", "end-safe"], P = () => ["auto", ...k()], _ = () => [yt, "auto", "full", "dvw", "dvh", "lvw", "lvh", "svw", "svh", "min", "max", "fit", ...k()], R = () => [e, $, F], K = () => [...x(), es, Jo, {
5272
+ }, Xe, $, F], V = () => [Xe, "auto", $, F], g = () => ["auto", "min", "max", "fr", $, F], S = () => ["start", "end", "center", "between", "around", "evenly", "stretch", "baseline", "center-safe", "end-safe"], N = () => ["start", "end", "center", "stretch", "center-safe", "end-safe"], k = () => ["auto", ...P()], _ = () => [yt, "auto", "full", "dvw", "dvh", "lvw", "lvh", "svw", "svh", "min", "max", "fit", ...P()], R = () => [e, $, F], K = () => [...x(), es, Jo, {
5257
5273
  position: [$, F]
5258
5274
  }], te = () => ["no-repeat", {
5259
5275
  repeat: ["", "x", "y", "space", "round"]
5260
- }], V = () => ["auto", "cover", "contain", cp, ip, {
5276
+ }], j = () => ["auto", "cover", "contain", cp, ip, {
5261
5277
  size: [$, F]
5262
5278
  }], Ee = () => [ur, Lt, it], G = () => [
5263
5279
  // Deprecated since Tailwind CSS v4.0.0
@@ -5274,28 +5290,28 @@ const Nf = (e, t) => {
5274
5290
  w,
5275
5291
  $,
5276
5292
  F
5277
- ], ie = () => ["none", Y, $, F], q = () => ["none", Y, $, F], ee = () => [Y, $, F], ne = () => [yt, "full", ...k()];
5293
+ ], ie = () => ["none", Y, $, F], q = () => ["none", Y, $, F], ee = () => [Y, $, F], ne = () => [yt, "full", ...P()];
5278
5294
  return {
5279
5295
  cacheSize: 500,
5280
5296
  theme: {
5281
5297
  animate: ["spin", "ping", "pulse", "bounce"],
5282
5298
  aspect: ["video"],
5283
- blur: [je],
5284
- breakpoint: [je],
5299
+ blur: [Ve],
5300
+ breakpoint: [Ve],
5285
5301
  color: [tp],
5286
- container: [je],
5287
- "drop-shadow": [je],
5302
+ container: [Ve],
5303
+ "drop-shadow": [Ve],
5288
5304
  ease: ["in", "out", "in-out"],
5289
5305
  font: [sp],
5290
5306
  "font-weight": ["thin", "extralight", "light", "normal", "medium", "semibold", "bold", "extrabold", "black"],
5291
- "inset-shadow": [je],
5307
+ "inset-shadow": [Ve],
5292
5308
  leading: ["none", "tight", "snug", "normal", "relaxed", "loose"],
5293
5309
  perspective: ["dramatic", "near", "normal", "midrange", "distant", "none"],
5294
- radius: [je],
5295
- shadow: [je],
5310
+ radius: [Ve],
5311
+ shadow: [Ve],
5296
5312
  spacing: ["px", Y],
5297
- text: [je],
5298
- "text-shadow": [je],
5313
+ text: [Ve],
5314
+ "text-shadow": [Ve],
5299
5315
  tracking: ["tighter", "tight", "normal", "wide", "wider", "widest"]
5300
5316
  },
5301
5317
  classGroups: {
@@ -5398,7 +5414,7 @@ const Nf = (e, t) => {
5398
5414
  * @see https://tailwindcss.com/docs/object-position
5399
5415
  */
5400
5416
  "object-position": [{
5401
- object: N()
5417
+ object: T()
5402
5418
  }],
5403
5419
  /**
5404
5420
  * Overflow
@@ -5530,7 +5546,7 @@ const Nf = (e, t) => {
5530
5546
  * @see https://tailwindcss.com/docs/flex-basis
5531
5547
  */
5532
5548
  basis: [{
5533
- basis: [yt, "full", "auto", a, ...k()]
5549
+ basis: [yt, "full", "auto", a, ...P()]
5534
5550
  }],
5535
5551
  /**
5536
5552
  * Flex Direction
@@ -5593,14 +5609,14 @@ const Nf = (e, t) => {
5593
5609
  * @see https://tailwindcss.com/docs/grid-column
5594
5610
  */
5595
5611
  "col-start": [{
5596
- "col-start": j()
5612
+ "col-start": V()
5597
5613
  }],
5598
5614
  /**
5599
5615
  * Grid Column End
5600
5616
  * @see https://tailwindcss.com/docs/grid-column
5601
5617
  */
5602
5618
  "col-end": [{
5603
- "col-end": j()
5619
+ "col-end": V()
5604
5620
  }],
5605
5621
  /**
5606
5622
  * Grid Template Rows
@@ -5621,14 +5637,14 @@ const Nf = (e, t) => {
5621
5637
  * @see https://tailwindcss.com/docs/grid-row
5622
5638
  */
5623
5639
  "row-start": [{
5624
- "row-start": j()
5640
+ "row-start": V()
5625
5641
  }],
5626
5642
  /**
5627
5643
  * Grid Row End
5628
5644
  * @see https://tailwindcss.com/docs/grid-row
5629
5645
  */
5630
5646
  "row-end": [{
5631
- "row-end": j()
5647
+ "row-end": V()
5632
5648
  }],
5633
5649
  /**
5634
5650
  * Grid Auto Flow
@@ -5642,35 +5658,35 @@ const Nf = (e, t) => {
5642
5658
  * @see https://tailwindcss.com/docs/grid-auto-columns
5643
5659
  */
5644
5660
  "auto-cols": [{
5645
- "auto-cols": b()
5661
+ "auto-cols": g()
5646
5662
  }],
5647
5663
  /**
5648
5664
  * Grid Auto Rows
5649
5665
  * @see https://tailwindcss.com/docs/grid-auto-rows
5650
5666
  */
5651
5667
  "auto-rows": [{
5652
- "auto-rows": b()
5668
+ "auto-rows": g()
5653
5669
  }],
5654
5670
  /**
5655
5671
  * Gap
5656
5672
  * @see https://tailwindcss.com/docs/gap
5657
5673
  */
5658
5674
  gap: [{
5659
- gap: k()
5675
+ gap: P()
5660
5676
  }],
5661
5677
  /**
5662
5678
  * Gap X
5663
5679
  * @see https://tailwindcss.com/docs/gap
5664
5680
  */
5665
5681
  "gap-x": [{
5666
- "gap-x": k()
5682
+ "gap-x": P()
5667
5683
  }],
5668
5684
  /**
5669
5685
  * Gap Y
5670
5686
  * @see https://tailwindcss.com/docs/gap
5671
5687
  */
5672
5688
  "gap-y": [{
5673
- "gap-y": k()
5689
+ "gap-y": P()
5674
5690
  }],
5675
5691
  /**
5676
5692
  * Justify Content
@@ -5684,14 +5700,14 @@ const Nf = (e, t) => {
5684
5700
  * @see https://tailwindcss.com/docs/justify-items
5685
5701
  */
5686
5702
  "justify-items": [{
5687
- "justify-items": [...T(), "normal"]
5703
+ "justify-items": [...N(), "normal"]
5688
5704
  }],
5689
5705
  /**
5690
5706
  * Justify Self
5691
5707
  * @see https://tailwindcss.com/docs/justify-self
5692
5708
  */
5693
5709
  "justify-self": [{
5694
- "justify-self": ["auto", ...T()]
5710
+ "justify-self": ["auto", ...N()]
5695
5711
  }],
5696
5712
  /**
5697
5713
  * Align Content
@@ -5705,7 +5721,7 @@ const Nf = (e, t) => {
5705
5721
  * @see https://tailwindcss.com/docs/align-items
5706
5722
  */
5707
5723
  "align-items": [{
5708
- items: [...T(), {
5724
+ items: [...N(), {
5709
5725
  baseline: ["", "last"]
5710
5726
  }]
5711
5727
  }],
@@ -5714,7 +5730,7 @@ const Nf = (e, t) => {
5714
5730
  * @see https://tailwindcss.com/docs/align-self
5715
5731
  */
5716
5732
  "align-self": [{
5717
- self: ["auto", ...T(), {
5733
+ self: ["auto", ...N(), {
5718
5734
  baseline: ["", "last"]
5719
5735
  }]
5720
5736
  }],
@@ -5730,14 +5746,14 @@ const Nf = (e, t) => {
5730
5746
  * @see https://tailwindcss.com/docs/place-items
5731
5747
  */
5732
5748
  "place-items": [{
5733
- "place-items": [...T(), "baseline"]
5749
+ "place-items": [...N(), "baseline"]
5734
5750
  }],
5735
5751
  /**
5736
5752
  * Place Self
5737
5753
  * @see https://tailwindcss.com/docs/place-self
5738
5754
  */
5739
5755
  "place-self": [{
5740
- "place-self": ["auto", ...T()]
5756
+ "place-self": ["auto", ...N()]
5741
5757
  }],
5742
5758
  // Spacing
5743
5759
  /**
@@ -5745,133 +5761,133 @@ const Nf = (e, t) => {
5745
5761
  * @see https://tailwindcss.com/docs/padding
5746
5762
  */
5747
5763
  p: [{
5748
- p: k()
5764
+ p: P()
5749
5765
  }],
5750
5766
  /**
5751
5767
  * Padding X
5752
5768
  * @see https://tailwindcss.com/docs/padding
5753
5769
  */
5754
5770
  px: [{
5755
- px: k()
5771
+ px: P()
5756
5772
  }],
5757
5773
  /**
5758
5774
  * Padding Y
5759
5775
  * @see https://tailwindcss.com/docs/padding
5760
5776
  */
5761
5777
  py: [{
5762
- py: k()
5778
+ py: P()
5763
5779
  }],
5764
5780
  /**
5765
5781
  * Padding Start
5766
5782
  * @see https://tailwindcss.com/docs/padding
5767
5783
  */
5768
5784
  ps: [{
5769
- ps: k()
5785
+ ps: P()
5770
5786
  }],
5771
5787
  /**
5772
5788
  * Padding End
5773
5789
  * @see https://tailwindcss.com/docs/padding
5774
5790
  */
5775
5791
  pe: [{
5776
- pe: k()
5792
+ pe: P()
5777
5793
  }],
5778
5794
  /**
5779
5795
  * Padding Top
5780
5796
  * @see https://tailwindcss.com/docs/padding
5781
5797
  */
5782
5798
  pt: [{
5783
- pt: k()
5799
+ pt: P()
5784
5800
  }],
5785
5801
  /**
5786
5802
  * Padding Right
5787
5803
  * @see https://tailwindcss.com/docs/padding
5788
5804
  */
5789
5805
  pr: [{
5790
- pr: k()
5806
+ pr: P()
5791
5807
  }],
5792
5808
  /**
5793
5809
  * Padding Bottom
5794
5810
  * @see https://tailwindcss.com/docs/padding
5795
5811
  */
5796
5812
  pb: [{
5797
- pb: k()
5813
+ pb: P()
5798
5814
  }],
5799
5815
  /**
5800
5816
  * Padding Left
5801
5817
  * @see https://tailwindcss.com/docs/padding
5802
5818
  */
5803
5819
  pl: [{
5804
- pl: k()
5820
+ pl: P()
5805
5821
  }],
5806
5822
  /**
5807
5823
  * Margin
5808
5824
  * @see https://tailwindcss.com/docs/margin
5809
5825
  */
5810
5826
  m: [{
5811
- m: P()
5827
+ m: k()
5812
5828
  }],
5813
5829
  /**
5814
5830
  * Margin X
5815
5831
  * @see https://tailwindcss.com/docs/margin
5816
5832
  */
5817
5833
  mx: [{
5818
- mx: P()
5834
+ mx: k()
5819
5835
  }],
5820
5836
  /**
5821
5837
  * Margin Y
5822
5838
  * @see https://tailwindcss.com/docs/margin
5823
5839
  */
5824
5840
  my: [{
5825
- my: P()
5841
+ my: k()
5826
5842
  }],
5827
5843
  /**
5828
5844
  * Margin Start
5829
5845
  * @see https://tailwindcss.com/docs/margin
5830
5846
  */
5831
5847
  ms: [{
5832
- ms: P()
5848
+ ms: k()
5833
5849
  }],
5834
5850
  /**
5835
5851
  * Margin End
5836
5852
  * @see https://tailwindcss.com/docs/margin
5837
5853
  */
5838
5854
  me: [{
5839
- me: P()
5855
+ me: k()
5840
5856
  }],
5841
5857
  /**
5842
5858
  * Margin Top
5843
5859
  * @see https://tailwindcss.com/docs/margin
5844
5860
  */
5845
5861
  mt: [{
5846
- mt: P()
5862
+ mt: k()
5847
5863
  }],
5848
5864
  /**
5849
5865
  * Margin Right
5850
5866
  * @see https://tailwindcss.com/docs/margin
5851
5867
  */
5852
5868
  mr: [{
5853
- mr: P()
5869
+ mr: k()
5854
5870
  }],
5855
5871
  /**
5856
5872
  * Margin Bottom
5857
5873
  * @see https://tailwindcss.com/docs/margin
5858
5874
  */
5859
5875
  mb: [{
5860
- mb: P()
5876
+ mb: k()
5861
5877
  }],
5862
5878
  /**
5863
5879
  * Margin Left
5864
5880
  * @see https://tailwindcss.com/docs/margin
5865
5881
  */
5866
5882
  ml: [{
5867
- ml: P()
5883
+ ml: k()
5868
5884
  }],
5869
5885
  /**
5870
5886
  * Space Between X
5871
5887
  * @see https://tailwindcss.com/docs/margin#adding-space-between-children
5872
5888
  */
5873
5889
  "space-x": [{
5874
- "space-x": k()
5890
+ "space-x": P()
5875
5891
  }],
5876
5892
  /**
5877
5893
  * Space Between X Reverse
@@ -5883,7 +5899,7 @@ const Nf = (e, t) => {
5883
5899
  * @see https://tailwindcss.com/docs/margin#adding-space-between-children
5884
5900
  */
5885
5901
  "space-y": [{
5886
- "space-y": k()
5902
+ "space-y": P()
5887
5903
  }],
5888
5904
  /**
5889
5905
  * Space Between Y Reverse
@@ -6052,7 +6068,7 @@ const Nf = (e, t) => {
6052
6068
  leading: [
6053
6069
  /** Deprecated since Tailwind CSS v4.0.0. @see https://github.com/tailwindlabs/tailwindcss.com/issues/2027#issuecomment-2620152757 */
6054
6070
  s,
6055
- ...k()
6071
+ ...P()
6056
6072
  ]
6057
6073
  }],
6058
6074
  /**
@@ -6153,7 +6169,7 @@ const Nf = (e, t) => {
6153
6169
  * @see https://tailwindcss.com/docs/text-indent
6154
6170
  */
6155
6171
  indent: [{
6156
- indent: k()
6172
+ indent: P()
6157
6173
  }],
6158
6174
  /**
6159
6175
  * Vertical Alignment
@@ -6240,7 +6256,7 @@ const Nf = (e, t) => {
6240
6256
  * @see https://tailwindcss.com/docs/background-size
6241
6257
  */
6242
6258
  "bg-size": [{
6243
- bg: V()
6259
+ bg: j()
6244
6260
  }],
6245
6261
  /**
6246
6262
  * Background Image
@@ -6707,7 +6723,7 @@ const Nf = (e, t) => {
6707
6723
  * @see https://tailwindcss.com/docs/text-shadow
6708
6724
  */
6709
6725
  "text-shadow": [{
6710
- "text-shadow": ["none", g, cn, ln]
6726
+ "text-shadow": ["none", b, cn, ln]
6711
6727
  }],
6712
6728
  /**
6713
6729
  * Text Shadow Color
@@ -6917,7 +6933,7 @@ const Nf = (e, t) => {
6917
6933
  * @see https://tailwindcss.com/docs/mask-size
6918
6934
  */
6919
6935
  "mask-size": [{
6920
- mask: V()
6936
+ mask: j()
6921
6937
  }],
6922
6938
  /**
6923
6939
  * Mask Type
@@ -7117,21 +7133,21 @@ const Nf = (e, t) => {
7117
7133
  * @see https://tailwindcss.com/docs/border-spacing
7118
7134
  */
7119
7135
  "border-spacing": [{
7120
- "border-spacing": k()
7136
+ "border-spacing": P()
7121
7137
  }],
7122
7138
  /**
7123
7139
  * Border Spacing X
7124
7140
  * @see https://tailwindcss.com/docs/border-spacing
7125
7141
  */
7126
7142
  "border-spacing-x": [{
7127
- "border-spacing-x": k()
7143
+ "border-spacing-x": P()
7128
7144
  }],
7129
7145
  /**
7130
7146
  * Border Spacing Y
7131
7147
  * @see https://tailwindcss.com/docs/border-spacing
7132
7148
  */
7133
7149
  "border-spacing-y": [{
7134
- "border-spacing-y": k()
7150
+ "border-spacing-y": P()
7135
7151
  }],
7136
7152
  /**
7137
7153
  * Table Layout
@@ -7214,7 +7230,7 @@ const Nf = (e, t) => {
7214
7230
  * @see https://tailwindcss.com/docs/perspective-origin
7215
7231
  */
7216
7232
  "perspective-origin": [{
7217
- "perspective-origin": N()
7233
+ "perspective-origin": T()
7218
7234
  }],
7219
7235
  /**
7220
7236
  * Rotate
@@ -7310,7 +7326,7 @@ const Nf = (e, t) => {
7310
7326
  * @see https://tailwindcss.com/docs/transform-origin
7311
7327
  */
7312
7328
  "transform-origin": [{
7313
- origin: N()
7329
+ origin: T()
7314
7330
  }],
7315
7331
  /**
7316
7332
  * Transform Style
@@ -7423,126 +7439,126 @@ const Nf = (e, t) => {
7423
7439
  * @see https://tailwindcss.com/docs/scroll-margin
7424
7440
  */
7425
7441
  "scroll-m": [{
7426
- "scroll-m": k()
7442
+ "scroll-m": P()
7427
7443
  }],
7428
7444
  /**
7429
7445
  * Scroll Margin X
7430
7446
  * @see https://tailwindcss.com/docs/scroll-margin
7431
7447
  */
7432
7448
  "scroll-mx": [{
7433
- "scroll-mx": k()
7449
+ "scroll-mx": P()
7434
7450
  }],
7435
7451
  /**
7436
7452
  * Scroll Margin Y
7437
7453
  * @see https://tailwindcss.com/docs/scroll-margin
7438
7454
  */
7439
7455
  "scroll-my": [{
7440
- "scroll-my": k()
7456
+ "scroll-my": P()
7441
7457
  }],
7442
7458
  /**
7443
7459
  * Scroll Margin Start
7444
7460
  * @see https://tailwindcss.com/docs/scroll-margin
7445
7461
  */
7446
7462
  "scroll-ms": [{
7447
- "scroll-ms": k()
7463
+ "scroll-ms": P()
7448
7464
  }],
7449
7465
  /**
7450
7466
  * Scroll Margin End
7451
7467
  * @see https://tailwindcss.com/docs/scroll-margin
7452
7468
  */
7453
7469
  "scroll-me": [{
7454
- "scroll-me": k()
7470
+ "scroll-me": P()
7455
7471
  }],
7456
7472
  /**
7457
7473
  * Scroll Margin Top
7458
7474
  * @see https://tailwindcss.com/docs/scroll-margin
7459
7475
  */
7460
7476
  "scroll-mt": [{
7461
- "scroll-mt": k()
7477
+ "scroll-mt": P()
7462
7478
  }],
7463
7479
  /**
7464
7480
  * Scroll Margin Right
7465
7481
  * @see https://tailwindcss.com/docs/scroll-margin
7466
7482
  */
7467
7483
  "scroll-mr": [{
7468
- "scroll-mr": k()
7484
+ "scroll-mr": P()
7469
7485
  }],
7470
7486
  /**
7471
7487
  * Scroll Margin Bottom
7472
7488
  * @see https://tailwindcss.com/docs/scroll-margin
7473
7489
  */
7474
7490
  "scroll-mb": [{
7475
- "scroll-mb": k()
7491
+ "scroll-mb": P()
7476
7492
  }],
7477
7493
  /**
7478
7494
  * Scroll Margin Left
7479
7495
  * @see https://tailwindcss.com/docs/scroll-margin
7480
7496
  */
7481
7497
  "scroll-ml": [{
7482
- "scroll-ml": k()
7498
+ "scroll-ml": P()
7483
7499
  }],
7484
7500
  /**
7485
7501
  * Scroll Padding
7486
7502
  * @see https://tailwindcss.com/docs/scroll-padding
7487
7503
  */
7488
7504
  "scroll-p": [{
7489
- "scroll-p": k()
7505
+ "scroll-p": P()
7490
7506
  }],
7491
7507
  /**
7492
7508
  * Scroll Padding X
7493
7509
  * @see https://tailwindcss.com/docs/scroll-padding
7494
7510
  */
7495
7511
  "scroll-px": [{
7496
- "scroll-px": k()
7512
+ "scroll-px": P()
7497
7513
  }],
7498
7514
  /**
7499
7515
  * Scroll Padding Y
7500
7516
  * @see https://tailwindcss.com/docs/scroll-padding
7501
7517
  */
7502
7518
  "scroll-py": [{
7503
- "scroll-py": k()
7519
+ "scroll-py": P()
7504
7520
  }],
7505
7521
  /**
7506
7522
  * Scroll Padding Start
7507
7523
  * @see https://tailwindcss.com/docs/scroll-padding
7508
7524
  */
7509
7525
  "scroll-ps": [{
7510
- "scroll-ps": k()
7526
+ "scroll-ps": P()
7511
7527
  }],
7512
7528
  /**
7513
7529
  * Scroll Padding End
7514
7530
  * @see https://tailwindcss.com/docs/scroll-padding
7515
7531
  */
7516
7532
  "scroll-pe": [{
7517
- "scroll-pe": k()
7533
+ "scroll-pe": P()
7518
7534
  }],
7519
7535
  /**
7520
7536
  * Scroll Padding Top
7521
7537
  * @see https://tailwindcss.com/docs/scroll-padding
7522
7538
  */
7523
7539
  "scroll-pt": [{
7524
- "scroll-pt": k()
7540
+ "scroll-pt": P()
7525
7541
  }],
7526
7542
  /**
7527
7543
  * Scroll Padding Right
7528
7544
  * @see https://tailwindcss.com/docs/scroll-padding
7529
7545
  */
7530
7546
  "scroll-pr": [{
7531
- "scroll-pr": k()
7547
+ "scroll-pr": P()
7532
7548
  }],
7533
7549
  /**
7534
7550
  * Scroll Padding Bottom
7535
7551
  * @see https://tailwindcss.com/docs/scroll-padding
7536
7552
  */
7537
7553
  "scroll-pb": [{
7538
- "scroll-pb": k()
7554
+ "scroll-pb": P()
7539
7555
  }],
7540
7556
  /**
7541
7557
  * Scroll Padding Left
7542
7558
  * @see https://tailwindcss.com/docs/scroll-padding
7543
7559
  */
7544
7560
  "scroll-pl": [{
7545
- "scroll-pl": k()
7561
+ "scroll-pl": P()
7546
7562
  }],
7547
7563
  /**
7548
7564
  * Scroll Snap Align
@@ -7844,66 +7860,66 @@ function ts({
7844
7860
  api_URL: a,
7845
7861
  disabled: l
7846
7862
  }) {
7847
- const c = l, f = e.type === "multifile", p = r?.[e.name] || {}, g = t[e.name], m = f ? g || [] : [g].filter(Boolean), [w, h] = de(!1), y = a ? `${a}uploads` : null;
7863
+ const c = l, f = e.type === "multifile", p = r?.[e.name] || {}, b = t[e.name], m = f ? b || [] : [b].filter(Boolean), [w, h] = de(!1), y = a ? `${a}uploads` : null;
7848
7864
  !y && e.uploadEndpoint && console.error(
7849
7865
  `api_URL prop is required when using FileField with upload functionality for field "${e.name}"`
7850
7866
  );
7851
- const C = (b) => {
7852
- if (b === 0) return "0 Bytes";
7853
- const S = 1024, T = ["Bytes", "KB", "MB", "GB"], P = Math.floor(Math.log(b) / Math.log(S));
7854
- return `${parseFloat((b / S ** P).toFixed(2))} ${T[P]}`;
7855
- }, E = async (b) => {
7867
+ const C = (g) => {
7868
+ if (g === 0) return "0 Bytes";
7869
+ const S = 1024, N = ["Bytes", "KB", "MB", "GB"], k = Math.floor(Math.log(g) / Math.log(S));
7870
+ return `${parseFloat((g / S ** k).toFixed(2))} ${N[k]}`;
7871
+ }, E = async (g) => {
7856
7872
  const S = new FormData();
7857
- S.append("file", b);
7858
- const T = await fetch(`${y}`, {
7873
+ S.append("file", g);
7874
+ const N = await fetch(`${y}`, {
7859
7875
  method: "POST",
7860
7876
  body: S
7861
7877
  });
7862
- if (!T.ok)
7878
+ if (!N.ok)
7863
7879
  throw mn.error("Upload failed"), new Error("Upload failed");
7864
- return await T.json();
7865
- }, A = async (b, S) => {
7880
+ return await N.json();
7881
+ }, A = async (g, S) => {
7866
7882
  if (!S) return;
7867
- if (b.maxSize && S.size > b.maxSize)
7883
+ if (g.maxSize && S.size > g.maxSize)
7868
7884
  throw new Error(
7869
- `File size must not exceed ${C(b.maxSize)}`
7885
+ `File size must not exceed ${C(g.maxSize)}`
7870
7886
  );
7871
- const T = await E(S), P = { ...t, [b.name]: T };
7872
- s(b.name, T), i(P);
7873
- }, x = async (b, S) => {
7874
- const T = t[b.name] || [];
7875
- if (b.maxFiles && T.length + S.length > b.maxFiles)
7876
- throw new Error(`Maximum ${b.maxFiles} files allowed`);
7887
+ const N = await E(S), k = { ...t, [g.name]: N };
7888
+ s(g.name, N), i(k);
7889
+ }, x = async (g, S) => {
7890
+ const N = t[g.name] || [];
7891
+ if (g.maxFiles && N.length + S.length > g.maxFiles)
7892
+ throw new Error(`Maximum ${g.maxFiles} files allowed`);
7877
7893
  S.forEach((R) => {
7878
- if (b.maxSize && R.size > b.maxSize)
7894
+ if (g.maxSize && R.size > g.maxSize)
7879
7895
  throw new Error(
7880
- `Each file must not exceed ${C(b.maxSize)}`
7896
+ `Each file must not exceed ${C(g.maxSize)}`
7881
7897
  );
7882
7898
  });
7883
- const P = await Promise.all(
7899
+ const k = await Promise.all(
7884
7900
  S.map((R) => E(R))
7885
7901
  // Updated call
7886
- ), _ = [...T, ...P];
7887
- s(b.name, _), i({ ...t, [b.name]: _ });
7888
- }, N = async (b, S) => {
7902
+ ), _ = [...N, ...k];
7903
+ s(g.name, _), i({ ...t, [g.name]: _ });
7904
+ }, T = async (g, S) => {
7889
7905
  if (c) return;
7890
- const T = Array.from(S);
7906
+ const N = Array.from(S);
7891
7907
  try {
7892
- e.type === "multifile" ? await x(e, T) : await A(e, T[0]), o.current?.[b] && (o.current[b].value = "");
7893
- } catch (P) {
7894
- mn.error(`Upload failed: ${P.message}`);
7908
+ e.type === "multifile" ? await x(e, N) : await A(e, N[0]), o.current?.[g] && (o.current[g].value = "");
7909
+ } catch (k) {
7910
+ mn.error(`Upload failed: ${k.message}`);
7895
7911
  }
7896
- }, D = async (b, S) => {
7912
+ }, D = async (g, S) => {
7897
7913
  if (c) return;
7898
- let T;
7899
- e.type === "file" ? T = "" : T = (t[b] || []).filter((_) => _ !== S), s(b, T), i({ ...t, [b]: T }), o.current?.[b] && (o.current[b].value = "");
7900
- }, O = (b) => {
7901
- b.preventDefault(), c || h(!0);
7902
- }, k = (b) => {
7903
- b.preventDefault(), c || h(!1);
7904
- }, W = (b) => {
7905
- b.preventDefault(), h(!1), !c && b.dataTransfer.files && b.dataTransfer.files.length > 0 && N(e.name, b.dataTransfer.files);
7906
- }, H = e.accept ? e.accept.split(",").map((b) => b.split("/")[1] || b.split(".")[1] || b).join(", ").toUpperCase() : "PNG, JPG, PDF", U = e.maxSize ? `, up to ${C(e.maxSize)}` : "", j = `
7914
+ let N;
7915
+ e.type === "file" ? N = "" : N = (t[g] || []).filter((_) => _ !== S), s(g, N), i({ ...t, [g]: N }), o.current?.[g] && (o.current[g].value = "");
7916
+ }, O = (g) => {
7917
+ g.preventDefault(), c || h(!0);
7918
+ }, P = (g) => {
7919
+ g.preventDefault(), c || h(!1);
7920
+ }, W = (g) => {
7921
+ g.preventDefault(), h(!1), !c && g.dataTransfer.files && g.dataTransfer.files.length > 0 && T(e.name, g.dataTransfer.files);
7922
+ }, H = e.accept ? e.accept.split(",").map((g) => g.split("/")[1] || g.split(".")[1] || g).join(", ").toUpperCase() : "PNG, JPG, PDF", U = e.maxSize ? `, up to ${C(e.maxSize)}` : "", V = `
7907
7923
  w-full flex flex-col items-center justify-center p-6 border-2 border-dashed rounded-lg transition-all duration-200
7908
7924
  // Ensure focus styling is handled correctly for the button element
7909
7925
  focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-opacity-50
@@ -7918,13 +7934,13 @@ function ts({
7918
7934
  "button",
7919
7935
  {
7920
7936
  type: "button",
7921
- className: j,
7937
+ className: V,
7922
7938
  onClick: () => {
7923
7939
  c || o?.current?.[e.name]?.click();
7924
7940
  },
7925
7941
  onDragOver: O,
7926
7942
  onDragEnter: O,
7927
- onDragLeave: k,
7943
+ onDragLeave: P,
7928
7944
  onDrop: W,
7929
7945
  disabled: c,
7930
7946
  children: [
@@ -7953,30 +7969,30 @@ function ts({
7953
7969
  /* @__PURE__ */ u(
7954
7970
  "input",
7955
7971
  {
7956
- ref: (b) => {
7957
- b && o && o.current && (o.current[e.name] = b);
7972
+ ref: (g) => {
7973
+ g && o && o.current && (o.current[e.name] = g);
7958
7974
  },
7959
7975
  id: e.name,
7960
7976
  type: "file",
7961
7977
  accept: e.accept,
7962
7978
  multiple: f,
7963
7979
  className: "sr-only",
7964
- onChange: (b) => N(e.name, b.target.files),
7980
+ onChange: (g) => T(e.name, g.target.files),
7965
7981
  disabled: c
7966
7982
  }
7967
7983
  ),
7968
- m.length > 0 && /* @__PURE__ */ u("div", { className: "space-y-2 pt-2 border-t border-gray-200", children: m.map((b, S) => {
7969
- const T = b.original_name || b.name || "File", P = b.size || null;
7984
+ m.length > 0 && /* @__PURE__ */ u("div", { className: "space-y-2 pt-2 border-t border-gray-200", children: m.map((g, S) => {
7985
+ const N = g.original_name || g.name || "File", k = g.size || null;
7970
7986
  return /* @__PURE__ */ M(
7971
7987
  "div",
7972
7988
  {
7973
7989
  className: "flex items-center justify-between p-2 bg-gray-50 rounded",
7974
7990
  children: [
7975
7991
  /* @__PURE__ */ M("div", { className: "flex items-center space-x-2 min-w-0", children: [
7976
- /* @__PURE__ */ u("span", { className: "text-sm truncate", children: T }),
7977
- P && /* @__PURE__ */ M("span", { className: "text-xs text-gray-500 flex-shrink-0", children: [
7992
+ /* @__PURE__ */ u("span", { className: "text-sm truncate", children: N }),
7993
+ k && /* @__PURE__ */ M("span", { className: "text-xs text-gray-500 flex-shrink-0", children: [
7978
7994
  "(",
7979
- C(P),
7995
+ C(k),
7980
7996
  ")"
7981
7997
  ] })
7982
7998
  ] }),
@@ -7984,7 +8000,7 @@ function ts({
7984
8000
  "button",
7985
8001
  {
7986
8002
  type: "button",
7987
- onClick: () => D(e.name, b),
8003
+ onClick: () => D(e.name, g),
7988
8004
  className: `text-red-500 hover:text-red-700 ml-3 flex-shrink-0 ${c ? "cursor-not-allowed opacity-50" : ""}`,
7989
8005
  disabled: c,
7990
8006
  children: "Remove"
@@ -7992,14 +8008,14 @@ function ts({
7992
8008
  )
7993
8009
  ]
7994
8010
  },
7995
- b.url || b.original_name || S
8011
+ g.url || g.original_name || S
7996
8012
  );
7997
8013
  }) }),
7998
- Object.entries(p).map(([b, S]) => S.status === "uploading" ? /* @__PURE__ */ M("div", { className: "relative pt-1", children: [
8014
+ Object.entries(p).map(([g, S]) => S.status === "uploading" ? /* @__PURE__ */ M("div", { className: "relative pt-1", children: [
7999
8015
  /* @__PURE__ */ M("div", { className: "flex items-center justify-between", children: [
8000
8016
  /* @__PURE__ */ M("span", { className: "text-xs font-semibold inline-block text-blue-600", children: [
8001
8017
  "Uploading ",
8002
- b
8018
+ g
8003
8019
  ] }),
8004
8020
  /* @__PURE__ */ M("span", { className: "text-xs font-semibold inline-block text-blue-600", children: [
8005
8021
  S.progress,
@@ -8013,7 +8029,7 @@ function ts({
8013
8029
  style: { width: `${S.progress}%` }
8014
8030
  }
8015
8031
  ) })
8016
- ] }, b) : null)
8032
+ ] }, g) : null)
8017
8033
  ] })
8018
8034
  },
8019
8035
  e.name
@@ -8029,16 +8045,16 @@ function gp({
8029
8045
  setCharCounts: i
8030
8046
  }) {
8031
8047
  const a = $t(null), l = t[e.name] || "", c = typeof e.disabled == "function" ? e.disabled(t) : e.disabled || e.readOnly, f = () => {
8032
- const g = a.current;
8033
- g && (g.style.height = "auto", g.style.height = `${g.scrollHeight + 2}px`);
8048
+ const b = a.current;
8049
+ b && (b.style.height = "auto", b.style.height = `${b.scrollHeight + 2}px`);
8034
8050
  };
8035
8051
  zt(() => {
8036
8052
  f();
8037
8053
  }, [l]);
8038
- const p = (g) => {
8039
- n(e.name, g.target.value), f(), i && i((m) => ({
8054
+ const p = (b) => {
8055
+ n(e.name, b.target.value), f(), i && i((m) => ({
8040
8056
  ...m,
8041
- [e.name]: g.target.value.length
8057
+ [e.name]: b.target.value.length
8042
8058
  }));
8043
8059
  };
8044
8060
  return /* @__PURE__ */ M("div", { className: "space-y-2", children: [
@@ -8072,17 +8088,17 @@ function gp({
8072
8088
  ] });
8073
8089
  }
8074
8090
  function bp({ field: e, formValues: t, handleChange: n, handleBlur: r, error: o }) {
8075
- const [s, i] = de(!1), a = t[e.name], l = a ? new Date(a) : null, c = l ? (l.getHours() % 12 || 12).toString().padStart(2, "0") : "12", f = l ? l.getMinutes().toString().padStart(2, "0") : "00", p = l ? l.getHours() >= 12 ? "PM" : "AM" : "PM", g = (x) => {
8091
+ const [s, i] = de(!1), a = t[e.name], l = a ? new Date(a) : null, c = l ? (l.getHours() % 12 || 12).toString().padStart(2, "0") : "12", f = l ? l.getMinutes().toString().padStart(2, "0") : "00", p = l ? l.getHours() >= 12 ? "PM" : "AM" : "PM", b = (x) => {
8076
8092
  if (!x) {
8077
8093
  n(e.name, null);
8078
8094
  return;
8079
8095
  }
8080
- const N = new Date(x);
8081
- l ? (N.setHours(l.getHours()), N.setMinutes(l.getMinutes())) : (N.setHours(12), N.setMinutes(0)), n(e.name, N);
8082
- }, m = (x, N, D) => {
8096
+ const T = new Date(x);
8097
+ l ? (T.setHours(l.getHours()), T.setMinutes(l.getMinutes())) : (T.setHours(12), T.setMinutes(0)), n(e.name, T);
8098
+ }, m = (x, T, D) => {
8083
8099
  const O = l ? new Date(l) : /* @__PURE__ */ new Date();
8084
- let k = parseInt(x);
8085
- D === "PM" && k !== 12 && (k += 12), D === "AM" && k === 12 && (k = 0), O.setHours(k), O.setMinutes(parseInt(N)), n(e.name, O);
8100
+ let P = parseInt(x);
8101
+ D === "PM" && P !== 12 && (P += 12), D === "AM" && P === 12 && (P = 0), O.setHours(P), O.setMinutes(parseInt(T)), n(e.name, O);
8086
8102
  }, w = () => {
8087
8103
  let x = parseInt(c);
8088
8104
  x = x % 12 + 1, m(x.toString(), f, p);
@@ -8156,7 +8172,7 @@ function bp({ field: e, formValues: t, handleChange: n, handleBlur: r, error: o
8156
8172
  {
8157
8173
  mode: "single",
8158
8174
  selected: l,
8159
- onSelect: g,
8175
+ onSelect: b,
8160
8176
  showOutsideDays: !0,
8161
8177
  className: "p-0",
8162
8178
  classNames: {
@@ -8416,16 +8432,16 @@ var Bp = d.forwardRef((e, t) => {
8416
8432
  onEntryFocus: c,
8417
8433
  preventScrollOnEntryFocus: f = !1,
8418
8434
  ...p
8419
- } = e, g = d.useRef(null), m = se(t, g), w = Or(s), [h, y] = Wt({
8435
+ } = e, b = d.useRef(null), m = se(t, b), w = Or(s), [h, y] = Wt({
8420
8436
  prop: i,
8421
8437
  defaultProp: a ?? null,
8422
8438
  onChange: l,
8423
8439
  caller: Gt
8424
- }), [C, E] = d.useState(!1), A = Ze(c), x = ta(n), N = d.useRef(!1), [D, O] = d.useState(0);
8440
+ }), [C, E] = d.useState(!1), A = Ze(c), x = ta(n), T = d.useRef(!1), [D, O] = d.useState(0);
8425
8441
  return d.useEffect(() => {
8426
- const k = g.current;
8427
- if (k)
8428
- return k.addEventListener(pr, A), () => k.removeEventListener(pr, A);
8442
+ const P = b.current;
8443
+ if (P)
8444
+ return P.addEventListener(pr, A), () => P.removeEventListener(pr, A);
8429
8445
  }, [A]), /* @__PURE__ */ u(
8430
8446
  $p,
8431
8447
  {
@@ -8435,16 +8451,16 @@ var Bp = d.forwardRef((e, t) => {
8435
8451
  loop: o,
8436
8452
  currentTabStopId: h,
8437
8453
  onItemFocus: d.useCallback(
8438
- (k) => y(k),
8454
+ (P) => y(P),
8439
8455
  [y]
8440
8456
  ),
8441
8457
  onItemShiftTab: d.useCallback(() => E(!0), []),
8442
8458
  onFocusableItemAdd: d.useCallback(
8443
- () => O((k) => k + 1),
8459
+ () => O((P) => P + 1),
8444
8460
  []
8445
8461
  ),
8446
8462
  onFocusableItemRemove: d.useCallback(
8447
- () => O((k) => k - 1),
8463
+ () => O((P) => P - 1),
8448
8464
  []
8449
8465
  ),
8450
8466
  children: /* @__PURE__ */ u(
@@ -8456,20 +8472,20 @@ var Bp = d.forwardRef((e, t) => {
8456
8472
  ref: m,
8457
8473
  style: { outline: "none", ...e.style },
8458
8474
  onMouseDown: Z(e.onMouseDown, () => {
8459
- N.current = !0;
8475
+ T.current = !0;
8460
8476
  }),
8461
- onFocus: Z(e.onFocus, (k) => {
8462
- const W = !N.current;
8463
- if (k.target === k.currentTarget && W && !C) {
8477
+ onFocus: Z(e.onFocus, (P) => {
8478
+ const W = !T.current;
8479
+ if (P.target === P.currentTarget && W && !C) {
8464
8480
  const H = new CustomEvent(pr, Dp);
8465
- if (k.currentTarget.dispatchEvent(H), !H.defaultPrevented) {
8466
- const U = x().filter((P) => P.focusable), j = U.find((P) => P.active), b = U.find((P) => P.id === h), T = [j, b, ...U].filter(
8481
+ if (P.currentTarget.dispatchEvent(H), !H.defaultPrevented) {
8482
+ const U = x().filter((k) => k.focusable), V = U.find((k) => k.active), g = U.find((k) => k.id === h), N = [V, g, ...U].filter(
8467
8483
  Boolean
8468
- ).map((P) => P.ref.current);
8469
- ia(T, f);
8484
+ ).map((k) => k.ref.current);
8485
+ ia(N, f);
8470
8486
  }
8471
8487
  }
8472
- N.current = !1;
8488
+ T.current = !1;
8473
8489
  }),
8474
8490
  onBlur: Z(e.onBlur, () => E(!1))
8475
8491
  }
@@ -8485,7 +8501,7 @@ var Bp = d.forwardRef((e, t) => {
8485
8501
  tabStopId: s,
8486
8502
  children: i,
8487
8503
  ...a
8488
- } = e, l = Ht(), c = s || l, f = zp(oa, n), p = f.currentTabStopId === c, g = ta(n), { onFocusableItemAdd: m, onFocusableItemRemove: w, currentTabStopId: h } = f;
8504
+ } = e, l = Ht(), c = s || l, f = zp(oa, n), p = f.currentTabStopId === c, b = ta(n), { onFocusableItemAdd: m, onFocusableItemRemove: w, currentTabStopId: h } = f;
8489
8505
  return d.useEffect(() => {
8490
8506
  if (r)
8491
8507
  return m(), () => w();
@@ -8517,12 +8533,12 @@ var Bp = d.forwardRef((e, t) => {
8517
8533
  if (C !== void 0) {
8518
8534
  if (y.metaKey || y.ctrlKey || y.altKey || y.shiftKey) return;
8519
8535
  y.preventDefault();
8520
- let A = g().filter((x) => x.focusable).map((x) => x.ref.current);
8536
+ let A = b().filter((x) => x.focusable).map((x) => x.ref.current);
8521
8537
  if (C === "last") A.reverse();
8522
8538
  else if (C === "prev" || C === "next") {
8523
8539
  C === "prev" && A.reverse();
8524
8540
  const x = A.indexOf(y.currentTarget);
8525
- A = f.loop ? Vp(A, x + 1) : A.slice(x + 1);
8541
+ A = f.loop ? jp(A, x + 1) : A.slice(x + 1);
8526
8542
  }
8527
8543
  setTimeout(() => ia(A));
8528
8544
  }
@@ -8558,10 +8574,10 @@ function ia(e, t = !1) {
8558
8574
  for (const r of e)
8559
8575
  if (r === n || (r.focus({ preventScroll: t }), document.activeElement !== n)) return;
8560
8576
  }
8561
- function Vp(e, t) {
8577
+ function jp(e, t) {
8562
8578
  return e.map((n, r) => e[(t + r) % e.length]);
8563
8579
  }
8564
- var jp = ra, Gp = sa, Xr = "Radio", [Yp, aa] = ut(Xr), [Kp, Xp] = Yp(Xr), la = d.forwardRef(
8580
+ var Vp = ra, Gp = sa, Xr = "Radio", [Yp, aa] = ut(Xr), [Kp, Xp] = Yp(Xr), la = d.forwardRef(
8565
8581
  (e, t) => {
8566
8582
  const {
8567
8583
  __scopeRadio: n,
@@ -8573,7 +8589,7 @@ var jp = ra, Gp = sa, Xr = "Radio", [Yp, aa] = ut(Xr), [Kp, Xp] = Yp(Xr), la = d
8573
8589
  onCheck: l,
8574
8590
  form: c,
8575
8591
  ...f
8576
- } = e, [p, g] = d.useState(null), m = se(t, (y) => g(y)), w = d.useRef(!1), h = p ? c || !!p.closest("form") : !0;
8592
+ } = e, [p, b] = d.useState(null), m = se(t, (y) => b(y)), w = d.useRef(!1), h = p ? c || !!p.closest("form") : !0;
8577
8593
  return /* @__PURE__ */ M(Kp, { scope: n, checked: o, disabled: i, children: [
8578
8594
  /* @__PURE__ */ u(
8579
8595
  $n.button,
@@ -8686,7 +8702,7 @@ var Zp = ["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"], zn = "RadioGroup",
8686
8702
  dir: c,
8687
8703
  loop: f = !0,
8688
8704
  onValueChange: p,
8689
- ...g
8705
+ ...b
8690
8706
  } = e, m = pa(n), w = Or(c), [h, y] = Wt({
8691
8707
  prop: s,
8692
8708
  defaultProp: o ?? null,
@@ -8703,7 +8719,7 @@ var Zp = ["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"], zn = "RadioGroup",
8703
8719
  value: h,
8704
8720
  onValueChange: y,
8705
8721
  children: /* @__PURE__ */ u(
8706
- jp,
8722
+ Vp,
8707
8723
  {
8708
8724
  asChild: !0,
8709
8725
  ...m,
@@ -8718,7 +8734,7 @@ var Zp = ["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"], zn = "RadioGroup",
8718
8734
  "aria-orientation": l,
8719
8735
  "data-disabled": a ? "" : void 0,
8720
8736
  dir: w,
8721
- ...g,
8737
+ ...b,
8722
8738
  ref: t
8723
8739
  }
8724
8740
  )
@@ -8731,11 +8747,11 @@ var Zp = ["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"], zn = "RadioGroup",
8731
8747
  ha.displayName = zn;
8732
8748
  var ga = "RadioGroupItem", ba = d.forwardRef(
8733
8749
  (e, t) => {
8734
- const { __scopeRadioGroup: n, disabled: r, ...o } = e, s = em(ga, n), i = s.disabled || r, a = pa(n), l = ma(n), c = d.useRef(null), f = se(t, c), p = s.value === o.value, g = d.useRef(!1);
8750
+ const { __scopeRadioGroup: n, disabled: r, ...o } = e, s = em(ga, n), i = s.disabled || r, a = pa(n), l = ma(n), c = d.useRef(null), f = se(t, c), p = s.value === o.value, b = d.useRef(!1);
8735
8751
  return d.useEffect(() => {
8736
8752
  const m = (h) => {
8737
- Zp.includes(h.key) && (g.current = !0);
8738
- }, w = () => g.current = !1;
8753
+ Zp.includes(h.key) && (b.current = !0);
8754
+ }, w = () => b.current = !1;
8739
8755
  return document.addEventListener("keydown", m), document.addEventListener("keyup", w), () => {
8740
8756
  document.removeEventListener("keydown", m), document.removeEventListener("keyup", w);
8741
8757
  };
@@ -8761,7 +8777,7 @@ var ga = "RadioGroupItem", ba = d.forwardRef(
8761
8777
  m.key === "Enter" && m.preventDefault();
8762
8778
  }),
8763
8779
  onFocus: Z(o.onFocus, () => {
8764
- g.current && c.current?.click();
8780
+ b.current && c.current?.click();
8765
8781
  })
8766
8782
  }
8767
8783
  )
@@ -8839,13 +8855,13 @@ function im({
8839
8855
  sm,
8840
8856
  {
8841
8857
  value: i,
8842
- onValueChange: (g) => n(e.name, g),
8858
+ onValueChange: (b) => n(e.name, b),
8843
8859
  onBlur: () => r(e.name),
8844
8860
  disabled: a,
8845
8861
  className: p,
8846
8862
  "aria-label": e.label || e.name,
8847
- children: l.map((g) => {
8848
- const m = typeof g == "object" ? g.value : g, w = typeof g == "object" ? g.label : g, h = typeof g == "object" ? g.description : null, y = `${e.name}-${m}`, C = i === m;
8863
+ children: l.map((b) => {
8864
+ const m = typeof b == "object" ? b.value : b, w = typeof b == "object" ? b.label : b, h = typeof b == "object" ? b.description : null, y = `${e.name}-${m}`, C = i === m;
8849
8865
  return f ? /* @__PURE__ */ M(
8850
8866
  "label",
8851
8867
  {
@@ -9037,18 +9053,18 @@ function lm({
9037
9053
  ] }) });
9038
9054
  }
9039
9055
  function cm({ field: e, formValues: t, handleChange: n, handleBlur: r, error: o }) {
9040
- const [s, i] = de(!1), [a, l] = de("12"), [c, f] = de("00"), [p, g] = de("PM"), m = t[e.name] || "";
9056
+ const [s, i] = de(!1), [a, l] = de("12"), [c, f] = de("00"), [p, b] = de("PM"), m = t[e.name] || "";
9041
9057
  Pe.useEffect(() => {
9042
9058
  if (m) {
9043
9059
  const x = m.match(/(\d{1,2}):(\d{2})\s*(AM|PM)/i);
9044
- x && (l(x[1].padStart(2, "0")), f(x[2]), g(x[3].toUpperCase()));
9060
+ x && (l(x[1].padStart(2, "0")), f(x[2]), b(x[3].toUpperCase()));
9045
9061
  }
9046
9062
  }, [m]);
9047
9063
  const w = () => {
9048
9064
  const x = `${a}:${c} ${p}`;
9049
9065
  n(e.name, x), i(!1);
9050
9066
  }, h = () => {
9051
- n(e.name, ""), l("12"), f("00"), g("PM");
9067
+ n(e.name, ""), l("12"), f("00"), b("PM");
9052
9068
  }, y = () => {
9053
9069
  const x = parseInt(a);
9054
9070
  l((x % 12 + 1).toString().padStart(2, "0"));
@@ -9140,8 +9156,8 @@ function cm({ field: e, formValues: t, handleChange: n, handleBlur: r, error: o
9140
9156
  type: "text",
9141
9157
  value: a,
9142
9158
  onChange: (x) => {
9143
- const N = x.target.value.replace(/\D/g, "");
9144
- (N === "" || parseInt(N) >= 1 && parseInt(N) <= 12) && l(N.padStart(2, "0"));
9159
+ const T = x.target.value.replace(/\D/g, "");
9160
+ (T === "" || parseInt(T) >= 1 && parseInt(T) <= 12) && l(T.padStart(2, "0"));
9145
9161
  },
9146
9162
  className: "w-14 text-center text-2xl font-semibold border-0 focus:outline-none focus:ring-2 focus:ring-blue-500 rounded py-2",
9147
9163
  maxLength: "2"
@@ -9198,8 +9214,8 @@ function cm({ field: e, formValues: t, handleChange: n, handleBlur: r, error: o
9198
9214
  type: "text",
9199
9215
  value: c,
9200
9216
  onChange: (x) => {
9201
- const N = x.target.value.replace(/\D/g, "");
9202
- (N === "" || parseInt(N) >= 0 && parseInt(N) <= 59) && f(N.padStart(2, "0"));
9217
+ const T = x.target.value.replace(/\D/g, "");
9218
+ (T === "" || parseInt(T) >= 0 && parseInt(T) <= 59) && f(T.padStart(2, "0"));
9203
9219
  },
9204
9220
  className: "w-14 text-center text-2xl font-semibold border-0 focus:outline-none focus:ring-2 focus:ring-blue-500 rounded py-2",
9205
9221
  maxLength: "2"
@@ -9232,7 +9248,7 @@ function cm({ field: e, formValues: t, handleChange: n, handleBlur: r, error: o
9232
9248
  "button",
9233
9249
  {
9234
9250
  type: "button",
9235
- onClick: () => g("AM"),
9251
+ onClick: () => b("AM"),
9236
9252
  className: `
9237
9253
  px-3 py-1 text-sm font-medium rounded
9238
9254
  ${p === "AM" ? "bg-blue-600 text-white" : "bg-gray-100 text-gray-700 hover:bg-gray-200"}
@@ -9244,7 +9260,7 @@ function cm({ field: e, formValues: t, handleChange: n, handleBlur: r, error: o
9244
9260
  "button",
9245
9261
  {
9246
9262
  type: "button",
9247
- onClick: () => g("PM"),
9263
+ onClick: () => b("PM"),
9248
9264
  className: `
9249
9265
  px-3 py-1 text-sm font-medium rounded
9250
9266
  ${p === "PM" ? "bg-blue-600 text-white" : "bg-gray-100 text-gray-700 hover:bg-gray-200"}
@@ -9288,7 +9304,7 @@ function um({ message: e }) {
9288
9304
  function dm({ message: e }) {
9289
9305
  return /* @__PURE__ */ u("div", { className: "rounded-lg bg-amber-50 border border-amber-100 p-4 shadow-sm", children: /* @__PURE__ */ M("div", { className: "flex items-center gap-3", children: [
9290
9306
  /* @__PURE__ */ u(
9291
- Va,
9307
+ ja,
9292
9308
  {
9293
9309
  "aria-hidden": "true",
9294
9310
  className: "size-5 text-amber-600 shrink-0"
@@ -9346,7 +9362,7 @@ const Em = ({
9346
9362
  },
9347
9363
  debugMode: c = !1
9348
9364
  }) => {
9349
- const [f, p] = de({ ...a }), [g, m] = de({}), [w, h] = de({}), [y, C] = de({}), E = $t({}), A = [
9365
+ const [f, p] = de({ ...a }), [b, m] = de({}), [w, h] = de({}), [y, C] = de({}), E = $t({}), A = [
9350
9366
  "hidden",
9351
9367
  "html",
9352
9368
  "linebreak",
@@ -9376,107 +9392,107 @@ const Em = ({
9376
9392
  linebreak: Op
9377
9393
  }),
9378
9394
  []
9379
- ), N = async (b, S = null) => {
9395
+ ), T = async (g, S = null) => {
9380
9396
  if (!e) {
9381
- const T = `apiClient prop is required when using fields with optionsUrl. Field "${b.name}" requires optionsUrl but no apiClient was provided.`;
9382
- c && console.error(T), mn.error(T);
9397
+ const N = `apiClient prop is required when using fields with optionsUrl. Field "${g.name}" requires optionsUrl but no apiClient was provided.`;
9398
+ c && console.error(N), mn.error(N);
9383
9399
  return;
9384
9400
  }
9385
9401
  try {
9386
- const T = await e(`/${b.optionsUrl}`);
9387
- let P = [];
9388
- b.type === "select" ? P = [
9389
- { value: "", label: `Select ${b.label.toLowerCase()}` },
9390
- ...T.data
9391
- ] : P = [
9392
- ...T.data.map((_) => ({
9402
+ const N = await e(`/${g.optionsUrl}`);
9403
+ let k = [];
9404
+ g.type === "select" ? k = [
9405
+ { value: "", label: `Select ${g.label.toLowerCase()}` },
9406
+ ...N.data
9407
+ ] : k = [
9408
+ ...N.data.map((_) => ({
9393
9409
  value: _.value,
9394
9410
  label: _.label
9395
9411
  }))
9396
9412
  ], r.fields.forEach((_) => {
9397
- _.name === b.name && (_.options = P);
9413
+ _.name === g.name && (_.options = k);
9398
9414
  });
9399
- } catch (T) {
9400
- c && console.error(`Failed to load options for ${b.name}:`, T);
9415
+ } catch (N) {
9416
+ c && console.error(`Failed to load options for ${g.name}:`, N);
9401
9417
  } finally {
9402
9418
  }
9403
9419
  };
9404
9420
  zt(() => {
9405
9421
  if (r?.fields && r.fields.length > 0) {
9406
- if (!r.fields.some((T) => T.value)) return;
9407
- r.fields.forEach((T) => {
9408
- T.optionsUrl && N(T);
9422
+ if (!r.fields.some((N) => N.value)) return;
9423
+ r.fields.forEach((N) => {
9424
+ N.optionsUrl && T(N);
9409
9425
  });
9410
9426
  const S = {};
9411
- r.fields.forEach((T) => {
9412
- if (!T.name) return;
9413
- const P = T.type === "multiselect" || T.type === "searchselect" || T.type === "checkbox" && T.options && T.options.length > 0;
9414
- S[T.name] = a[T.name] ?? T.value ?? (P ? [] : "");
9427
+ r.fields.forEach((N) => {
9428
+ if (!N.name) return;
9429
+ const k = N.type === "multiselect" || N.type === "searchselect" || N.type === "checkbox" && N.options && N.options.length > 0;
9430
+ S[N.name] = a[N.name] ?? N.value ?? (k ? [] : "");
9415
9431
  }), p(S);
9416
9432
  }
9417
9433
  }, [r]);
9418
- const D = (b, S, T) => {
9419
- const P = typeof S == "object" && S !== null && !Array.isArray(S) && !(S instanceof Date), _ = S == null || typeof S == "string" && S.trim() === "" || Array.isArray(S) && S.length === 0 || b.type === "checkbox" && S === !1 || P && Object.keys(S).length === 0;
9420
- if (b.required && _)
9421
- return c && console.warn(`VALIDATION FAILED (REQUIRED): ${b.name} is empty.`), `${b.label} is required`;
9422
- if (_ && !b.required)
9434
+ const D = (g, S, N) => {
9435
+ const k = typeof S == "object" && S !== null && !Array.isArray(S) && !(S instanceof Date), _ = S == null || typeof S == "string" && S.trim() === "" || Array.isArray(S) && S.length === 0 || g.type === "checkbox" && S === !1 || k && Object.keys(S).length === 0;
9436
+ if (g.required && _)
9437
+ return c && console.warn(`VALIDATION FAILED (REQUIRED): ${g.name} is empty.`), `${g.label} is required`;
9438
+ if (_ && !g.required)
9423
9439
  return null;
9424
- if (b.validate) {
9425
- const R = b.validate(S, T);
9440
+ if (g.validate) {
9441
+ const R = g.validate(S, N);
9426
9442
  if (R) return R;
9427
9443
  }
9428
- if (b.type === "email" && S && !/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(S))
9444
+ if (g.type === "email" && S && !/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(S))
9429
9445
  return "Please enter a valid email address";
9430
- if (b.type === "number") {
9431
- if (b.min !== void 0 && S < b.min)
9432
- return `${b.label} must be at least ${b.min}`;
9433
- if (b.max !== void 0 && S > b.max)
9434
- return `${b.label} must be no more than ${b.max}`;
9446
+ if (g.type === "number") {
9447
+ if (g.min !== void 0 && S < g.min)
9448
+ return `${g.label} must be at least ${g.min}`;
9449
+ if (g.max !== void 0 && S > g.max)
9450
+ return `${g.label} must be no more than ${g.max}`;
9435
9451
  }
9436
- return b.type === "date" && S && !Kn(S).isValid() ? `${b.label} must be a valid date` : b.maxLength && S && S.length > b.maxLength ? `${b.label} must not exceed ${b.maxLength} characters` : null;
9437
- }, O = (b, S) => {
9438
- const T = r.fields.find((_) => _.name === b);
9439
- if (!T) return;
9440
- const P = { ...f };
9441
- T.type === "multiselect" || T.type === "searchselect" ? P[b] = Array.isArray(S) ? S : Array.from(S.target.selectedOptions).map(
9452
+ return g.type === "date" && S && !Kn(S).isValid() ? `${g.label} must be a valid date` : g.maxLength && S && S.length > g.maxLength ? `${g.label} must not exceed ${g.maxLength} characters` : null;
9453
+ }, O = (g, S) => {
9454
+ const N = r.fields.find((_) => _.name === g);
9455
+ if (!N) return;
9456
+ const k = { ...f };
9457
+ N.type === "multiselect" || N.type === "searchselect" ? Array.isArray(S) ? k[g] = S : S && S.target && S.target.selectedOptions ? k[g] = Array.from(S.target.selectedOptions).map(
9442
9458
  (_) => _.value
9443
- ) : T.type === "dateRange" ? P[b] = [
9459
+ ) : k[g] = S : N.type === "dateRange" ? k[g] = [
9444
9460
  {
9445
9461
  startDate: S[0].from,
9446
9462
  endDate: S[0].to,
9447
9463
  key: "selection"
9448
9464
  }
9449
- ] : T.type === "dayTimePicker" ? P[b] = S ? Kn(S).format("YYYY-MM-DD HH:mm:ss") : "" : T.type === "number" ? P[b] = S === "" ? "" : Number(S) : P[b] = S, T.type === "select" && r.fields.forEach((_) => {
9450
- if (_.showIf && !_.showIf(P)) {
9465
+ ] : N.type === "dayTimePicker" ? k[g] = S ? Kn(S).format("YYYY-MM-DD HH:mm:ss") : "" : N.type === "number" ? k[g] = S === "" ? "" : Number(S) : k[g] = S, N.type === "select" && r.fields.forEach((_) => {
9466
+ if (_.showIf && !_.showIf(k)) {
9451
9467
  const R = _.type === "multiselect" || _.type === "searchselect" || _.type === "checkbox" && _.options && _.options.length > 0;
9452
- P[_.name] = R ? [] : "";
9468
+ k[_.name] = R ? [] : "";
9453
9469
  }
9454
9470
  }), r.fields.forEach((_) => {
9455
- if (typeof _.disabled == "function" && _.disabled(P)) {
9471
+ if (typeof _.disabled == "function" && _.disabled(k)) {
9456
9472
  const R = _.type === "multiselect" || _.type === "searchselect" || _.type === "checkbox" && _.options && _.options.length > 0;
9457
- P[_.name] = R ? [] : "";
9473
+ k[_.name] = R ? [] : "";
9458
9474
  }
9459
- }), p(P);
9460
- }, k = (b) => {
9461
- h({ ...w, [b]: !0 });
9462
- }, W = (b) => {
9463
- b.preventDefault();
9475
+ }), p(k);
9476
+ }, P = (g) => {
9477
+ h({ ...w, [g]: !0 });
9478
+ }, W = (g) => {
9479
+ g.preventDefault();
9464
9480
  const S = {};
9465
- r.fields.forEach((P) => {
9466
- P.name && (S[P.name] = !0);
9481
+ r.fields.forEach((k) => {
9482
+ k.name && (S[k.name] = !0);
9467
9483
  }), h(S);
9468
- const T = {};
9469
- if (r.fields.forEach((P) => {
9470
- if (P.name && (!P.showIf || P.showIf(f))) {
9471
- const _ = D(P, f[P.name], f);
9472
- _ && (T[P.name] = _);
9484
+ const N = {};
9485
+ if (r.fields.forEach((k) => {
9486
+ if (k.name && (!k.showIf || k.showIf(f))) {
9487
+ const _ = D(k, f[k.name], f);
9488
+ _ && (N[k.name] = _);
9473
9489
  }
9474
- }), m(T), Object.keys(T).length === 0) {
9475
- const P = (R, K) => {
9490
+ }), m(N), Object.keys(N).length === 0) {
9491
+ const k = (R, K) => {
9476
9492
  if (R === "" || R === null || R === void 0) return null;
9477
9493
  const te = K?.toLowerCase();
9478
9494
  if (Array.isArray(R))
9479
- return te === "number" || te === "integer" ? R.map((V) => V === "" ? null : Number(V)) : R;
9495
+ return te === "number" || te === "integer" ? R.map((j) => j === "" ? null : Number(j)) : R;
9480
9496
  switch (te) {
9481
9497
  case "number":
9482
9498
  case "integer":
@@ -9487,8 +9503,8 @@ const Em = ({
9487
9503
  return String(R).toLowerCase() === "true" || R === !0;
9488
9504
  case "date":
9489
9505
  case "datetime": {
9490
- const V = Kn(R);
9491
- return V.isValid() ? V.toISOString() : R;
9506
+ const j = Kn(R);
9507
+ return j.isValid() ? j.toISOString() : R;
9492
9508
  }
9493
9509
  default:
9494
9510
  return R;
@@ -9496,11 +9512,11 @@ const Em = ({
9496
9512
  }, _ = {};
9497
9513
  r.fields.forEach((R) => {
9498
9514
  if (R.name) {
9499
- const K = f[R.name], te = R.fieldType || "string", V = P(K, te);
9515
+ const K = f[R.name], te = R.fieldType || "string", j = k(K, te);
9500
9516
  o ? _[R.name] = {
9501
- value: V,
9517
+ value: j,
9502
9518
  fieldType: te
9503
- } : _[R.name] = V;
9519
+ } : _[R.name] = j;
9504
9520
  }
9505
9521
  }), c ? console.log("Form submitted with values:", _) : s(_);
9506
9522
  } else
@@ -9520,14 +9536,14 @@ const Em = ({
9520
9536
  pink: "border-pink-500 bg-pink-50",
9521
9537
  orange: "border-orange-500 bg-orange-50"
9522
9538
  };
9523
- function U(b, S, T) {
9524
- if (c && (T ? console.log(
9525
- `[fieldFormat RENDER] Rendering error for ${S.name}: ${T}`
9526
- ) : g[S.name] && console.log(
9539
+ function U(g, S, N) {
9540
+ if (c && (N ? console.log(
9541
+ `[fieldFormat RENDER] Rendering error for ${S.name}: ${N}`
9542
+ ) : b[S.name] && console.log(
9527
9543
  `[fieldFormat RENDER] Error exists in state for ${S.name} but not passed in props!`
9528
9544
  )), A.includes(S.type))
9529
- return /* @__PURE__ */ u("div", { className: S.fieldClass || "col-span-full", children: b });
9530
- const P = S.containerStyle, _ = S.color || "blue", R = P === "card" ? `rounded-lg border text-card-foreground shadow-sm p-4 ${S.containerClassName || H[_] || H.blue}` : "", K = /* @__PURE__ */ M(Ke, { children: [
9545
+ return /* @__PURE__ */ u("div", { className: S.fieldClass || "col-span-full", children: g });
9546
+ const k = S.containerStyle, _ = S.color || "blue", R = k === "card" ? `rounded-lg border text-card-foreground shadow-sm p-4 ${S.containerClassName || H[_] || H.blue}` : "", K = /* @__PURE__ */ M(Ke, { children: [
9531
9547
  S.label && /* @__PURE__ */ M(
9532
9548
  "label",
9533
9549
  {
@@ -9539,38 +9555,38 @@ const Em = ({
9539
9555
  ]
9540
9556
  }
9541
9557
  ),
9542
- /* @__PURE__ */ u("div", { children: b }),
9543
- T && /* @__PURE__ */ u("p", { className: "text-sm text-red-500 mt-1", children: T })
9558
+ /* @__PURE__ */ u("div", { children: g }),
9559
+ N && /* @__PURE__ */ u("p", { className: "text-sm text-red-500 mt-1", children: N })
9544
9560
  ] });
9545
- return /* @__PURE__ */ u("div", { className: `mb-4 ${S.fieldClass || "col-span-8"}`, children: P === "card" ? /* @__PURE__ */ u("div", { className: R, children: K }) : K });
9561
+ return /* @__PURE__ */ u("div", { className: `mb-4 ${S.fieldClass || "col-span-8"}`, children: k === "card" ? /* @__PURE__ */ u("div", { className: R, children: K }) : K });
9546
9562
  }
9547
- const j = (b) => {
9548
- if (b.showIf && !b.showIf(f)) return null;
9549
- const S = x[b.type] || Uo;
9550
- if (f[b.name] === void 0) {
9551
- const _ = b.type === "multiselect" || b.type === "searchselect" || b.type === "checkbox" && b.options && b.options.length > 0;
9552
- f[b.name] = b.value !== void 0 ? b.value : _ ? [] : "";
9563
+ const V = (g) => {
9564
+ if (g.showIf && !g.showIf(f)) return null;
9565
+ const S = x[g.type] || Uo;
9566
+ if (f[g.name] === void 0) {
9567
+ const _ = g.type === "multiselect" || g.type === "searchselect" || g.type === "checkbox" && g.options && g.options.length > 0;
9568
+ f[g.name] = g.value !== void 0 ? g.value : _ ? [] : "";
9553
9569
  }
9554
- const T = g[b.name] ? g[b.name] : null, P = typeof b.disabled == "function" ? b.disabled(f) : !!b.disabled;
9570
+ const N = b[g.name] ? b[g.name] : null, k = typeof g.disabled == "function" ? g.disabled(f) : !!g.disabled;
9555
9571
  return U(
9556
9572
  /* @__PURE__ */ u(
9557
9573
  S,
9558
9574
  {
9559
- field: b,
9575
+ field: g,
9560
9576
  formValues: f,
9561
9577
  handleChange: O,
9562
- handleBlur: () => k(b.name),
9578
+ handleBlur: () => P(g.name),
9563
9579
  setCharCounts: C,
9564
- charCount: y[b.name] || 0,
9580
+ charCount: y[g.name] || 0,
9565
9581
  api_URL: t,
9566
- error: T,
9582
+ error: N,
9567
9583
  fileInputRefs: E,
9568
- disabled: P,
9584
+ disabled: k,
9569
9585
  apiClient: e
9570
9586
  }
9571
9587
  ),
9572
- b,
9573
- T
9588
+ g,
9589
+ N
9574
9590
  );
9575
9591
  };
9576
9592
  return /* @__PURE__ */ M(
@@ -9579,16 +9595,16 @@ const Em = ({
9579
9595
  onSubmit: W,
9580
9596
  className: "grid grid-cols-12 gap-x-4 mx-auto w-full  ",
9581
9597
  children: [
9582
- r ? r.fields.map((b) => /* @__PURE__ */ u("div", { className: "col-span-full", children: j(b) }, b.name + b.type)) : /* @__PURE__ */ u("div", { children: "Loading..." }),
9598
+ r ? r.fields.map((g) => /* @__PURE__ */ u("div", { className: "col-span-full", children: V(g) }, g.name + g.type)) : /* @__PURE__ */ u("div", { children: "Loading..." }),
9583
9599
  /* @__PURE__ */ u(
9584
9600
  "div",
9585
9601
  {
9586
9602
  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",
9587
- children: Pe.Children.map(i, (b) => Pe.isValidElement(b) && b.props.onClick ? Pe.cloneElement(b, {
9603
+ children: Pe.Children.map(i, (g) => Pe.isValidElement(g) && g.props.onClick ? Pe.cloneElement(g, {
9588
9604
  onClick: (S) => {
9589
- b.props.onClick(f, S);
9605
+ g.props.onClick(f, S);
9590
9606
  }
9591
- }) : b)
9607
+ }) : g)
9592
9608
  }
9593
9609
  )
9594
9610
  ]