@veevarts/design-system 1.12.0-alpha.2 → 1.12.0-alpha.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { jsx as c, jsxs as g, Fragment as Ne } from "react/jsx-runtime";
2
- import { HeroUIProvider as Uo, Button as qo, Select as jo, cn as k, SelectItem as nn, Alert as Xe, Card as Le, CardBody as _e, Divider as At, Tooltip as dt, Dropdown as di, DropdownTrigger as ui, DropdownMenu as fi, DropdownItem as $n, Input as Oe, Popover as Ma, PopoverTrigger as Ea, PopoverContent as Ta, ButtonGroup as Wo, useInput as Ko, NumberInput as Da, CardHeader as Ia, Image as Jo, CardFooter as Yo, Chip as rn, Skeleton as ee, Autocomplete as Go, AutocompleteItem as Qo, Checkbox as Zo, Modal as hi, ModalContent as mi, ModalHeader as pi, ModalBody as gi, ModalFooter as $a, Accordion as yi, AccordionItem as bi, Tabs as Oa, Tab as On, DatePicker as La, DropdownSection as is, Switch as Xo } from "@heroui/react";
2
+ import { HeroUIProvider as Uo, Button as qo, Select as jo, cn as k, SelectItem as nn, Alert as Xe, Card as Le, CardBody as Be, Divider as At, Tooltip as dt, Dropdown as di, DropdownTrigger as ui, DropdownMenu as fi, DropdownItem as $n, Input as Oe, Popover as Ma, PopoverTrigger as Ea, PopoverContent as Ta, ButtonGroup as Wo, useInput as Ko, NumberInput as Da, CardHeader as Ia, Image as Jo, CardFooter as Yo, Chip as rn, Skeleton as ee, Autocomplete as Go, AutocompleteItem as Qo, Checkbox as Zo, Modal as hi, ModalContent as mi, ModalHeader as pi, ModalBody as gi, ModalFooter as $a, Accordion as yi, AccordionItem as bi, Tabs as Oa, Tab as On, DatePicker as La, DropdownSection as is, Switch as Xo } from "@heroui/react";
3
3
  export * from "@heroui/react";
4
- import V, { forwardRef as Ut, useRef as ft, useState as j, useEffect as Ue, useReducer as ec, useCallback as te, useMemo as Se, createElement as zr, useId as tc } from "react";
4
+ import B, { forwardRef as Ut, useRef as ft, useState as j, useEffect as _e, useReducer as ec, useCallback as te, useMemo as Se, createElement as zr, useId as tc } from "react";
5
5
  import { Globe as ss, User as as, Heading as Fa, Check as Pa, ListTodo as za, ListOrdered as Ra, List as xi, AlignJustify as nc, AlignRight as rc, AlignCenter as ic, AlignLeft as _a, CornerDownLeft as sc, Redo2 as ac, Undo2 as lc, Eraser as ls, Minus as oc, Quote as cc, CodeSquare as dc, FileText as uc, Link2 as fc, Highlighter as Ba, Palette as Va, Code as hc, Underline as mc, Strikethrough as pc, Italic as gc, Bold as yc, X as bc, ZoomOut as xc, ZoomIn as vc, Link as wc, Clock as os, CheckCircle as Nc, AlertCircle as kc, Plus as vi } from "lucide-react";
6
6
  import { LazyMotion as Sc, domAnimation as Cc, m as Rr, motion as Ln, AnimatePresence as _r } from "framer-motion";
7
7
  import { EditorProvider as Ac, useCurrentEditor as Ha } from "@tiptap/react";
@@ -13,13 +13,13 @@ import { Link as Fc } from "@tiptap/extension-link";
13
13
  import { TaskList as Pc } from "@tiptap/extension-task-list";
14
14
  import { TaskItem as zc } from "@tiptap/extension-task-item";
15
15
  import { TextAlign as Rc } from "@tiptap/extension-text-align";
16
- function bg({ children: e }) {
16
+ function wg({ children: e }) {
17
17
  return /* @__PURE__ */ c(Uo, { children: e });
18
18
  }
19
- const q = Ut(
19
+ const W = Ut(
20
20
  ({ color: e = "primary", radius: t = "full", testId: n = "veevart-button", ...r }, i) => /* @__PURE__ */ c(qo, { ref: i, color: e, radius: t, "data-testid": n, ...r })
21
21
  );
22
- q.displayName = "Button";
22
+ W.displayName = "Button";
23
23
  function _c(e) {
24
24
  const t = e?.closest('[role="dialog"]');
25
25
  return t?.parentElement ?? t ?? void 0;
@@ -31,7 +31,7 @@ const Bt = Ut(
31
31
  disableDialogFocus: e?.disableDialogFocus ?? (i ? !0 : void 0),
32
32
  portalContainer: e?.portalContainer ?? i
33
33
  };
34
- return Ue(() => {
34
+ return _e(() => {
35
35
  s(_c(r.current));
36
36
  }, []), /* @__PURE__ */ c("span", { ref: r, className: "contents", children: /* @__PURE__ */ c(
37
37
  jo,
@@ -124,7 +124,7 @@ function Hc({
124
124
  labels: r
125
125
  }) {
126
126
  return e ? /* @__PURE__ */ g(
127
- q,
127
+ W,
128
128
  {
129
129
  "data-testid": "navbar-auth-button",
130
130
  className: "px-2 py-1 w-1 min-w-12 md:min-w-24 rounded-full bg-black text-white text-sm flex items-center",
@@ -136,7 +136,7 @@ function Hc({
136
136
  ]
137
137
  }
138
138
  ) : /* @__PURE__ */ g(
139
- q,
139
+ W,
140
140
  {
141
141
  "data-testid": "navbar-auth-button",
142
142
  className: "px-2 py-1 min-w-12 md:min-w-24 rounded-full bg-black text-white text-sm flex items-center",
@@ -149,7 +149,7 @@ function Hc({
149
149
  }
150
150
  );
151
151
  }
152
- function xg({
152
+ function Ng({
153
153
  logo: e,
154
154
  languages: t = [],
155
155
  selectedLanguage: n,
@@ -197,7 +197,7 @@ function xg({
197
197
  }
198
198
  );
199
199
  }
200
- function vg(e) {
200
+ function kg(e) {
201
201
  return /* @__PURE__ */ c("div", { className: "min-h-screen flex flex-col", children: /* @__PURE__ */ c("div", { className: "flex-1 flex items-center justify-center p-12", children: /* @__PURE__ */ c(
202
202
  Xe,
203
203
  {
@@ -209,11 +209,11 @@ function vg(e) {
209
209
  ) }) });
210
210
  }
211
211
  var fr;
212
- const Uc = typeof document < "u" ? (fr = V.useInsertionEffect) !== null && fr !== void 0 ? fr : V.useLayoutEffect : () => {
212
+ const Uc = typeof document < "u" ? (fr = B.useInsertionEffect) !== null && fr !== void 0 ? fr : B.useLayoutEffect : () => {
213
213
  };
214
214
  function Ni(e, t, n) {
215
215
  let [r, i] = j(e || t), s = ft(r), a = ft(e !== void 0), l = e !== void 0;
216
- Ue(() => {
216
+ _e(() => {
217
217
  let f = a.current;
218
218
  f !== l && process.env.NODE_ENV !== "production" && console.warn(`WARN: A component changed from ${f ? "controlled" : "uncontrolled"} to ${l ? "controlled" : "uncontrolled"}.`), a.current = l;
219
219
  }, [
@@ -252,7 +252,7 @@ function qc(e) {
252
252
  }
253
253
  ) });
254
254
  }
255
- const jc = V.forwardRef(
255
+ const jc = B.forwardRef(
256
256
  ({
257
257
  color: e = "primary",
258
258
  stepsCount: t = 3,
@@ -266,7 +266,7 @@ const jc = V.forwardRef(
266
266
  isDisabled: d = !1,
267
267
  ...u
268
268
  }, f) => {
269
- const [m, h] = Ni(s, n, i), x = V.useMemo(() => {
269
+ const [m, h] = Ni(s, n, i), x = B.useMemo(() => {
270
270
  let b, y;
271
271
  const v = [
272
272
  "[--active-fg-color:hsl(var(--step-fg-color))]",
@@ -415,7 +415,7 @@ const jc = V.forwardRef(
415
415
  }
416
416
  );
417
417
  jc.displayName = "Stepper";
418
- function wg(e) {
418
+ function Sg(e) {
419
419
  return /* @__PURE__ */ c("div", { className: "min-h-screen flex flex-col", children: /* @__PURE__ */ c("div", { className: "flex-1 flex items-center justify-center p-12", children: /* @__PURE__ */ c(
420
420
  Xe,
421
421
  {
@@ -454,7 +454,7 @@ function Wc(e, t, n = "en-US") {
454
454
  function ds(e, t, n, r) {
455
455
  return Wc(e - t, n, r);
456
456
  }
457
- function Ng() {
457
+ function Cg() {
458
458
  return /* @__PURE__ */ g(
459
459
  "footer",
460
460
  {
@@ -467,7 +467,7 @@ function Ng() {
467
467
  }
468
468
  );
469
469
  }
470
- const kg = (e) => {
470
+ const Ag = (e) => {
471
471
  const t = Se(
472
472
  () => JSON.stringify({ allItems: e.allItems, selected: e.selected }),
473
473
  [e.allItems, e.selected]
@@ -485,16 +485,16 @@ const kg = (e) => {
485
485
  ), [f, m] = j(
486
486
  null
487
487
  ), h = Se(() => new Set(t), [t]), x = Se(() => new Set(e), [e]), b = Se(
488
- () => e.filter(($) => !h.has($)),
488
+ () => e.filter((T) => !h.has(T)),
489
489
  [e, h]
490
- ), y = ($) => {
491
- if ($.length === 0) return;
492
- const T = Array.from(/* @__PURE__ */ new Set([...t, ...$]));
493
- n(T);
494
- }, v = ($) => {
495
- if ($.length === 0) return;
496
- const T = new Set($);
497
- n(t.filter((L) => !T.has(L)));
490
+ ), y = (T) => {
491
+ if (T.length === 0) return;
492
+ const D = Array.from(/* @__PURE__ */ new Set([...t, ...T]));
493
+ n(D);
494
+ }, v = (T) => {
495
+ if (T.length === 0) return;
496
+ const D = new Set(T);
497
+ n(t.filter((L) => !D.has(L)));
498
498
  }, N = () => {
499
499
  s.length !== 0 && (y(s), a([]));
500
500
  }, M = () => {
@@ -503,43 +503,43 @@ const kg = (e) => {
503
503
  b.length !== 0 && (y(b), a([]));
504
504
  }, A = () => {
505
505
  t.length !== 0 && (n([]), o([]));
506
- }, E = ($, T, L) => {
507
- const z = Math.min(T, L), K = Math.max(T, L);
508
- return $.slice(z, K + 1);
509
- }, I = ($, T, L) => {
506
+ }, E = (T, D, L) => {
507
+ const P = Math.min(D, L), K = Math.max(D, L);
508
+ return T.slice(P, K + 1);
509
+ }, $ = (T, D, L) => {
510
510
  if (L && d !== null) {
511
- a(E(b, d, T)), o([]), u(T);
511
+ a(E(b, d, D)), o([]), u(D);
512
512
  return;
513
513
  }
514
- const z = s.includes($);
514
+ const P = s.includes(T);
515
515
  a(
516
- z ? s.filter((K) => K !== $) : [...s, $]
517
- ), o([]), u(T);
518
- }, _ = ($, T, L) => {
516
+ P ? s.filter((K) => K !== T) : [...s, T]
517
+ ), o([]), u(D);
518
+ }, _ = (T, D, L) => {
519
519
  if (L && f !== null) {
520
- o(E(t, f, T)), a([]), m(T);
520
+ o(E(t, f, D)), a([]), m(D);
521
521
  return;
522
522
  }
523
- const z = l.includes($);
523
+ const P = l.includes(T);
524
524
  o(
525
- z ? l.filter((K) => K !== $) : [...l, $]
526
- ), a([]), m(T);
527
- }, P = ($, T, L) => {
528
- const z = L === "available" ? s.includes(T) ? s : [T] : l.includes(T) ? l : [T];
529
- $.dataTransfer.setData(
525
+ P ? l.filter((K) => K !== T) : [...l, T]
526
+ ), a([]), m(D);
527
+ }, R = (T, D, L) => {
528
+ const P = L === "available" ? s.includes(D) ? s : [D] : l.includes(D) ? l : [D];
529
+ T.dataTransfer.setData(
530
530
  "text/plain",
531
- JSON.stringify({ source: L, items: z })
532
- ), $.dataTransfer.effectAllowed = "move";
533
- }, B = ($, T) => {
534
- $.preventDefault();
535
- const L = $.dataTransfer.getData("text/plain");
531
+ JSON.stringify({ source: L, items: P })
532
+ ), T.dataTransfer.effectAllowed = "move";
533
+ }, V = (T, D) => {
534
+ T.preventDefault();
535
+ const L = T.dataTransfer.getData("text/plain");
536
536
  if (L)
537
537
  try {
538
- const z = JSON.parse(L), K = (z.items || []).filter(
539
- (Z) => x.has(Z)
538
+ const P = JSON.parse(L), K = (P.items || []).filter(
539
+ (X) => x.has(X)
540
540
  );
541
- if (K.length === 0 || z.source === T) return;
542
- T === "selected" ? (y(K), a([])) : (v(K), o([]));
541
+ if (K.length === 0 || P.source === D) return;
542
+ D === "selected" ? (y(K), a([])) : (v(K), o([]));
543
543
  } catch {
544
544
  return;
545
545
  }
@@ -548,29 +548,29 @@ const kg = (e) => {
548
548
  /* @__PURE__ */ g("div", { className: "flex w-full flex-col gap-3 md:w-2/5", children: [
549
549
  /* @__PURE__ */ c("h2", { className: "text-sm font-medium text-gray-700", children: r }),
550
550
  /* @__PURE__ */ c(Le, { className: "w-full border border-gray-200 shadow-none", children: /* @__PURE__ */ c(
551
- _e,
551
+ Be,
552
552
  {
553
553
  className: "h-60 gap-2 overflow-y-auto",
554
- onDragOver: ($) => $.preventDefault(),
555
- onDrop: ($) => B($, "available"),
556
- children: b.map(($, T) => {
557
- const L = s.includes($);
554
+ onDragOver: (T) => T.preventDefault(),
555
+ onDrop: (T) => V(T, "available"),
556
+ children: b.map((T, D) => {
557
+ const L = s.includes(T);
558
558
  return /* @__PURE__ */ c(
559
559
  "button",
560
560
  {
561
561
  type: "button",
562
- onClick: (z) => {
563
- I($, T, z.shiftKey);
562
+ onClick: (P) => {
563
+ $(T, D, P.shiftKey);
564
564
  },
565
- onMouseDown: (z) => {
566
- z.shiftKey && z.preventDefault();
565
+ onMouseDown: (P) => {
566
+ P.shiftKey && P.preventDefault();
567
567
  },
568
568
  draggable: !0,
569
- onDragStart: (z) => P(z, $, "available"),
569
+ onDragStart: (P) => R(P, T, "available"),
570
570
  className: `rounded-md px-3 py-2 text-left text-sm transition ${L ? "bg-[#E4571E]/10 text-[#E4571E]" : "text-gray-700 hover:bg-gray-100"}`,
571
- children: $
571
+ children: T
572
572
  },
573
- $
573
+ T
574
574
  );
575
575
  })
576
576
  }
@@ -578,7 +578,7 @@ const kg = (e) => {
578
578
  ] }),
579
579
  /* @__PURE__ */ g("div", { className: "flex flex-row items-center justify-center gap-3 md:flex-col md:pt-6", children: [
580
580
  /* @__PURE__ */ c(
581
- q,
581
+ W,
582
582
  {
583
583
  variant: "light",
584
584
  className: "h-10 w-10 min-w-0 text-2xl font-semibold text-[#E4571E] hover:bg-[#E4571E]/10",
@@ -591,7 +591,7 @@ const kg = (e) => {
591
591
  }
592
592
  ),
593
593
  /* @__PURE__ */ c(
594
- q,
594
+ W,
595
595
  {
596
596
  variant: "light",
597
597
  className: "h-10 w-10 min-w-0 text-2xl font-semibold text-[#E4571E] hover:bg-[#E4571E]/10",
@@ -604,7 +604,7 @@ const kg = (e) => {
604
604
  }
605
605
  ),
606
606
  /* @__PURE__ */ c(
607
- q,
607
+ W,
608
608
  {
609
609
  variant: "light",
610
610
  className: "h-10 w-10 min-w-0 text-2xl font-semibold text-[#E4571E] hover:bg-[#E4571E]/10",
@@ -617,7 +617,7 @@ const kg = (e) => {
617
617
  }
618
618
  ),
619
619
  /* @__PURE__ */ c(
620
- q,
620
+ W,
621
621
  {
622
622
  variant: "light",
623
623
  className: "h-10 w-10 min-w-0 text-2xl font-semibold text-[#E4571E] hover:bg-[#E4571E]/10",
@@ -633,29 +633,29 @@ const kg = (e) => {
633
633
  /* @__PURE__ */ g("div", { className: "flex w-full flex-col gap-3 md:w-2/5", children: [
634
634
  /* @__PURE__ */ c("h2", { className: "text-sm font-medium text-gray-700", children: i }),
635
635
  /* @__PURE__ */ c(Le, { className: "w-full border border-gray-200 shadow-none", children: /* @__PURE__ */ c(
636
- _e,
636
+ Be,
637
637
  {
638
638
  className: "h-60 gap-2 overflow-y-auto",
639
- onDragOver: ($) => $.preventDefault(),
640
- onDrop: ($) => B($, "selected"),
641
- children: t.map(($, T) => {
642
- const L = l.includes($);
639
+ onDragOver: (T) => T.preventDefault(),
640
+ onDrop: (T) => V(T, "selected"),
641
+ children: t.map((T, D) => {
642
+ const L = l.includes(T);
643
643
  return /* @__PURE__ */ c(
644
644
  "button",
645
645
  {
646
646
  type: "button",
647
- onClick: (z) => {
648
- _($, T, z.shiftKey);
647
+ onClick: (P) => {
648
+ _(T, D, P.shiftKey);
649
649
  },
650
- onMouseDown: (z) => {
651
- z.shiftKey && z.preventDefault();
650
+ onMouseDown: (P) => {
651
+ P.shiftKey && P.preventDefault();
652
652
  },
653
653
  draggable: !0,
654
- onDragStart: (z) => P(z, $, "selected"),
654
+ onDragStart: (P) => R(P, T, "selected"),
655
655
  className: `rounded-md px-3 py-2 text-left text-sm transition ${L ? "bg-[#E4571E]/10 text-[#E4571E]" : "text-gray-700 hover:bg-gray-100"}`,
656
- children: $
656
+ children: T
657
657
  },
658
- $
658
+ T
659
659
  );
660
660
  })
661
661
  }
@@ -681,7 +681,7 @@ function yt({
681
681
  }) {
682
682
  const o = s ? `${t} (${s})` : t;
683
683
  return /* @__PURE__ */ c(dt, { content: o, placement: "top", offset: 10, children: /* @__PURE__ */ c(
684
- q,
684
+ W,
685
685
  {
686
686
  size: "sm",
687
687
  radius: "sm",
@@ -883,8 +883,8 @@ const nt = {
883
883
  6: "Heading 6"
884
884
  };
885
885
  function Yc({ editor: e, levels: t = [1, 2, 3, 4, 5, 6], isDisabled: n = !1 }) {
886
- const [, r] = V.useState(0);
887
- V.useEffect(() => {
886
+ const [, r] = B.useState(0);
887
+ B.useEffect(() => {
888
888
  const a = () => r((l) => l + 1);
889
889
  return e.on("selectionUpdate", a), e.on("transaction", a), () => {
890
890
  e.off("selectionUpdate", a), e.off("transaction", a);
@@ -899,7 +899,7 @@ function Yc({ editor: e, levels: t = [1, 2, 3, 4, 5, 6], isDisabled: n = !1 }) {
899
899
  };
900
900
  return /* @__PURE__ */ g(di, { placement: "top-start", offset: 10, children: [
901
901
  /* @__PURE__ */ c(ui, { children: /* @__PURE__ */ c(
902
- q,
902
+ W,
903
903
  {
904
904
  size: "sm",
905
905
  radius: "sm",
@@ -949,8 +949,8 @@ function Gc({
949
949
  types: t = ["bulletList", "orderedList", "taskList"],
950
950
  isDisabled: n = !1
951
951
  }) {
952
- const [, r] = V.useState(0);
953
- V.useEffect(() => {
952
+ const [, r] = B.useState(0);
953
+ B.useEffect(() => {
954
954
  const l = () => r((o) => o + 1);
955
955
  return e.on("selectionUpdate", l), e.on("transaction", l), () => {
956
956
  e.off("selectionUpdate", l), e.off("transaction", l);
@@ -959,7 +959,7 @@ function Gc({
959
959
  const i = t.find((l) => e.isActive(l)), s = i ? hr[i].icon : xi;
960
960
  return /* @__PURE__ */ g(di, { placement: "top-start", offset: 10, children: [
961
961
  /* @__PURE__ */ c(ui, { children: /* @__PURE__ */ c(
962
- q,
962
+ W,
963
963
  {
964
964
  size: "sm",
965
965
  radius: "sm",
@@ -1167,7 +1167,7 @@ function nd({ value: e, onChange: t, onApply: n, placeholder: r = "#000000" }) {
1167
1167
  }
1168
1168
  ),
1169
1169
  /* @__PURE__ */ c(
1170
- q,
1170
+ W,
1171
1171
  {
1172
1172
  size: "sm",
1173
1173
  color: "primary",
@@ -1201,7 +1201,7 @@ function fs({ editor: e, type: t, allowCustomColor: n = !0, label: r, isDisabled
1201
1201
  }, h = t === "textColor" ? e.isActive("textStyle") : e.isActive("highlight");
1202
1202
  return /* @__PURE__ */ g(Ma, { isOpen: s, onOpenChange: a, placement: "top", offset: 10, showArrow: !0, children: [
1203
1203
  /* @__PURE__ */ c(Ea, { children: /* @__PURE__ */ c(
1204
- q,
1204
+ W,
1205
1205
  {
1206
1206
  size: "sm",
1207
1207
  radius: "sm",
@@ -1217,7 +1217,7 @@ function fs({ editor: e, type: t, allowCustomColor: n = !0, label: r, isDisabled
1217
1217
  /* @__PURE__ */ g("div", { className: "flex items-center justify-between", children: [
1218
1218
  /* @__PURE__ */ c("span", { className: "text-sm font-semibold", children: r }),
1219
1219
  /* @__PURE__ */ c(
1220
- q,
1220
+ W,
1221
1221
  {
1222
1222
  size: "sm",
1223
1223
  variant: "light",
@@ -1264,7 +1264,7 @@ function rd({
1264
1264
  }, o = e <= n, d = e >= r, u = e === Ce.default;
1265
1265
  return /* @__PURE__ */ g("div", { className: "flex items-center gap-1", children: [
1266
1266
  /* @__PURE__ */ c(dt, { content: "Zoom out", placement: "top", offset: 10, children: /* @__PURE__ */ c(
1267
- q,
1267
+ W,
1268
1268
  {
1269
1269
  size: "sm",
1270
1270
  radius: "sm",
@@ -1295,7 +1295,7 @@ function rd({
1295
1295
  }
1296
1296
  ) }),
1297
1297
  /* @__PURE__ */ c(dt, { content: "Zoom in", placement: "top", offset: 10, children: /* @__PURE__ */ c(
1298
- q,
1298
+ W,
1299
1299
  {
1300
1300
  size: "sm",
1301
1301
  radius: "sm",
@@ -1333,7 +1333,7 @@ function id({ editor: e, isDisabled: t = !1 }) {
1333
1333
  };
1334
1334
  return /* @__PURE__ */ g(Ma, { isOpen: n, onOpenChange: f, placement: "bottom", children: [
1335
1335
  /* @__PURE__ */ c(Ea, { children: /* @__PURE__ */ c(
1336
- q,
1336
+ W,
1337
1337
  {
1338
1338
  size: "sm",
1339
1339
  radius: "sm",
@@ -1378,7 +1378,7 @@ function id({ editor: e, isDisabled: t = !1 }) {
1378
1378
  }
1379
1379
  ),
1380
1380
  /* @__PURE__ */ c(
1381
- q,
1381
+ W,
1382
1382
  {
1383
1383
  size: "sm",
1384
1384
  color: "primary",
@@ -1417,7 +1417,7 @@ function qa(e, t) {
1417
1417
  }
1418
1418
  }), s;
1419
1419
  }, [e, t]), [r, i] = j(n);
1420
- return Ue(() => {
1420
+ return _e(() => {
1421
1421
  if (!e)
1422
1422
  return;
1423
1423
  const s = () => {
@@ -1552,7 +1552,7 @@ function cd({
1552
1552
  }) {
1553
1553
  const l = qa(e, t), { toggleModifier: o, executeCommand: d } = ja(e, a);
1554
1554
  if (!e) return null;
1555
- const u = t.map((I) => an(I)), f = u.some((I) => ["bold", "italic", "strike", "underline", "code"].includes(I)), m = u.some((I) => ["textColor", "highlight"].includes(I)), h = u.includes("heading"), x = u.includes("textAlign"), b = u.some((I) => ["bulletList", "orderedList", "taskList"].includes(I)), y = u.includes("blockquote"), v = u.includes("codeBlock"), N = u.includes("link"), M = u.includes("horizontalRule"), S = u.some((I) => ["undo", "redo"].includes(I)), A = n !== void 0 && r !== void 0;
1555
+ const u = t.map(($) => an($)), f = u.some(($) => ["bold", "italic", "strike", "underline", "code"].includes($)), m = u.some(($) => ["textColor", "highlight"].includes($)), h = u.includes("heading"), x = u.includes("textAlign"), b = u.some(($) => ["bulletList", "orderedList", "taskList"].includes($)), y = u.includes("blockquote"), v = u.includes("codeBlock"), N = u.includes("link"), M = u.includes("horizontalRule"), S = u.some(($) => ["undo", "redo"].includes($)), A = n !== void 0 && r !== void 0;
1556
1556
  return /* @__PURE__ */ c("div", { className: `w-full p-2 bg-background border-b border-divider ${i ? "sticky top-0 z-10" : ""} ${s || ""}`, children: /* @__PURE__ */ g("div", { className: "flex flex-row flex-wrap gap-2 w-full items-center", children: [
1557
1557
  f && /* @__PURE__ */ g(Ne, { children: [
1558
1558
  /* @__PURE__ */ c(
@@ -1593,21 +1593,21 @@ function cd({
1593
1593
  (x || b || y || v || N || M || S || A) && /* @__PURE__ */ c(gt, {})
1594
1594
  ] }),
1595
1595
  x && /* @__PURE__ */ g(Ne, { children: [
1596
- /* @__PURE__ */ c("div", { className: "flex items-center gap-1", children: ["left", "center", "right", "justify"].map((I) => {
1597
- const _ = td[I], P = e.isActive({ textAlign: I });
1596
+ /* @__PURE__ */ c("div", { className: "flex items-center gap-1", children: ["left", "center", "right", "justify"].map(($) => {
1597
+ const _ = td[$], R = e.isActive({ textAlign: $ });
1598
1598
  return /* @__PURE__ */ c(
1599
1599
  yt,
1600
1600
  {
1601
1601
  icon: _,
1602
- label: `Align ${I}`,
1603
- isActive: P,
1602
+ label: `Align ${$}`,
1603
+ isActive: R,
1604
1604
  onClick: () => d("textAlign", {
1605
1605
  type: "textAlign",
1606
1606
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
1607
- alignment: I
1607
+ alignment: $
1608
1608
  })
1609
1609
  },
1610
- I
1610
+ $
1611
1611
  );
1612
1612
  }) }),
1613
1613
  (b || y || v || N || M || S || A) && /* @__PURE__ */ c(gt, {})
@@ -1618,7 +1618,7 @@ function cd({
1618
1618
  {
1619
1619
  editor: e,
1620
1620
  types: u.filter(
1621
- (I) => ["bulletList", "orderedList", "taskList"].includes(I)
1621
+ ($) => ["bulletList", "orderedList", "taskList"].includes($)
1622
1622
  )
1623
1623
  }
1624
1624
  ),
@@ -1691,8 +1691,8 @@ function cd({
1691
1691
  rd,
1692
1692
  {
1693
1693
  zoom: n,
1694
- onZoomChange: (I) => {
1695
- r?.(I), a?.({ type: "zoom", modifier: `${I}%` });
1694
+ onZoomChange: ($) => {
1695
+ r?.($), a?.({ type: "zoom", modifier: `${$}%` });
1696
1696
  }
1697
1697
  }
1698
1698
  )
@@ -2522,7 +2522,7 @@ function Vr(e, t) {
2522
2522
  }
2523
2523
  return !0;
2524
2524
  }
2525
- class He {
2525
+ class Ue {
2526
2526
  /**
2527
2527
  @internal
2528
2528
  */
@@ -2620,14 +2620,14 @@ class He {
2620
2620
  */
2621
2621
  static setFrom(t) {
2622
2622
  if (!t || Array.isArray(t) && t.length == 0)
2623
- return He.none;
2624
- if (t instanceof He)
2623
+ return Ue.none;
2624
+ if (t instanceof Ue)
2625
2625
  return [t];
2626
2626
  let n = t.slice();
2627
2627
  return n.sort((r, i) => r.type.rank - i.type.rank), n;
2628
2628
  }
2629
2629
  }
2630
- He.none = [];
2630
+ Ue.none = [];
2631
2631
  class Fd extends Error {
2632
2632
  }
2633
2633
  class Q {
@@ -2762,7 +2762,7 @@ class Fn {
2762
2762
  */
2763
2763
  parse(t, n = {}) {
2764
2764
  let r = new bs(this, n, !1);
2765
- return r.addAll(t, He.none, n.from, n.to), r.finish();
2765
+ return r.addAll(t, Ue.none, n.from, n.to), r.finish();
2766
2766
  }
2767
2767
  /**
2768
2768
  Parses the content of the given DOM node, like
@@ -2774,7 +2774,7 @@ class Fn {
2774
2774
  */
2775
2775
  parseSlice(t, n = {}) {
2776
2776
  let r = new bs(this, n, !0);
2777
- return r.addAll(t, He.none, n.from, n.to), Q.maxOpen(r.finish());
2777
+ return r.addAll(t, Ue.none, n.from, n.to), Q.maxOpen(r.finish());
2778
2778
  }
2779
2779
  /**
2780
2780
  @internal
@@ -2896,7 +2896,7 @@ function ys(e, t, n) {
2896
2896
  }
2897
2897
  class vn {
2898
2898
  constructor(t, n, r, i, s, a) {
2899
- this.type = t, this.attrs = n, this.marks = r, this.solid = i, this.options = a, this.content = [], this.activeMarks = He.none, this.match = s || (a & Gt ? null : t.contentMatch);
2899
+ this.type = t, this.attrs = n, this.marks = r, this.solid = i, this.options = a, this.content = [], this.activeMarks = Ue.none, this.match = s || (a & Gt ? null : t.contentMatch);
2900
2900
  }
2901
2901
  findWrapping(t) {
2902
2902
  if (!this.match) {
@@ -2931,7 +2931,7 @@ class bs {
2931
2931
  constructor(t, n, r) {
2932
2932
  this.parser = t, this.options = n, this.isOpen = r, this.open = 0, this.localPreserveWS = !1;
2933
2933
  let i = n.topNode, s, a = ys(null, n.preserveWhitespace, 0) | (r ? Gt : 0);
2934
- i ? s = new vn(i.type, i.attrs, He.none, !0, n.topMatch || i.type.contentMatch, a) : r ? s = new vn(null, null, He.none, !0, null, a) : s = new vn(t.schema.topNodeType, null, He.none, !0, null, a), this.nodes = [s], this.find = n.findPositions, this.needsBlock = !1;
2934
+ i ? s = new vn(i.type, i.attrs, Ue.none, !0, n.topMatch || i.type.contentMatch, a) : r ? s = new vn(null, null, Ue.none, !0, null, a) : s = new vn(t.schema.topNodeType, null, Ue.none, !0, null, a), this.nodes = [s], this.find = n.findPositions, this.needsBlock = !1;
2935
2935
  }
2936
2936
  get top() {
2937
2937
  return this.nodes[this.open];
@@ -3094,7 +3094,7 @@ class bs {
3094
3094
  this.closeExtra();
3095
3095
  let s = this.top;
3096
3096
  s.match && (s.match = s.match.matchType(t.type));
3097
- let a = He.none;
3097
+ let a = Ue.none;
3098
3098
  for (let l of i.concat(t.marks))
3099
3099
  (s.type ? s.type.allowsMarkType(l.type) : vs(l.type, t.type)) && (a = l.addToSet(a));
3100
3100
  return s.content.push(t.mark(a)), !0;
@@ -3114,7 +3114,7 @@ class bs {
3114
3114
  a.match = a.match && a.match.matchType(t);
3115
3115
  let l = ys(t, s, a.options);
3116
3116
  a.options & Gt && a.content.length == 0 && (l |= Gt);
3117
- let o = He.none;
3117
+ let o = Ue.none;
3118
3118
  return r = r.filter((d) => (a.type ? a.type.allowsMarkType(d.type) : vs(d.type, t)) ? (o = d.addToSet(o), !1) : !0), this.nodes.push(new vn(t, n, o, i, null, l)), this.open++, r;
3119
3119
  }
3120
3120
  // Make sure all nodes above this.open are finished and added to
@@ -4397,7 +4397,7 @@ class Xn {
4397
4397
  return ie.between(t.resolve(this.anchor), t.resolve(this.head));
4398
4398
  }
4399
4399
  }
4400
- class X extends se {
4400
+ class Z extends se {
4401
4401
  /**
4402
4402
  Create a node selection. Does not verify the validity of its
4403
4403
  argument.
@@ -4408,13 +4408,13 @@ class X extends se {
4408
4408
  }
4409
4409
  map(t, n) {
4410
4410
  let { deleted: r, pos: i } = n.mapResult(this.anchor), s = t.resolve(i);
4411
- return r ? se.near(s) : new X(s);
4411
+ return r ? se.near(s) : new Z(s);
4412
4412
  }
4413
4413
  content() {
4414
4414
  return new Q(G.from(this.node), 0, 0);
4415
4415
  }
4416
4416
  eq(t) {
4417
- return t instanceof X && t.anchor == this.anchor;
4417
+ return t instanceof Z && t.anchor == this.anchor;
4418
4418
  }
4419
4419
  toJSON() {
4420
4420
  return { type: "node", anchor: this.anchor };
@@ -4428,13 +4428,13 @@ class X extends se {
4428
4428
  static fromJSON(t, n) {
4429
4429
  if (typeof n.anchor != "number")
4430
4430
  throw new RangeError("Invalid input for NodeSelection.fromJSON");
4431
- return new X(t.resolve(n.anchor));
4431
+ return new Z(t.resolve(n.anchor));
4432
4432
  }
4433
4433
  /**
4434
4434
  Create a node selection from non-resolved positions.
4435
4435
  */
4436
4436
  static create(t, n) {
4437
- return new X(t.resolve(n));
4437
+ return new Z(t.resolve(n));
4438
4438
  }
4439
4439
  /**
4440
4440
  Determines whether the given node may be selected as a node
@@ -4444,8 +4444,8 @@ class X extends se {
4444
4444
  return !t.isText && t.type.spec.selectable !== !1;
4445
4445
  }
4446
4446
  }
4447
- X.prototype.visible = !1;
4448
- se.jsonID("node", X);
4447
+ Z.prototype.visible = !1;
4448
+ se.jsonID("node", Z);
4449
4449
  class Si {
4450
4450
  constructor(t) {
4451
4451
  this.anchor = t;
@@ -4456,7 +4456,7 @@ class Si {
4456
4456
  }
4457
4457
  resolve(t) {
4458
4458
  let n = t.resolve(this.anchor), r = n.nodeAfter;
4459
- return r && X.isSelectable(r) ? new X(n) : se.near(n);
4459
+ return r && Z.isSelectable(r) ? new Z(n) : se.near(n);
4460
4460
  }
4461
4461
  }
4462
4462
  class Qe extends se {
@@ -4508,8 +4508,8 @@ function Ot(e, t, n, r, i, s = !1) {
4508
4508
  for (let a = r - (i > 0 ? 0 : 1); i > 0 ? a < t.childCount : a >= 0; a += i) {
4509
4509
  let l = t.child(a);
4510
4510
  if (l.isAtom) {
4511
- if (!s && X.isSelectable(l))
4512
- return X.create(e, n - (i < 0 ? l.nodeSize : 0));
4511
+ if (!s && Z.isSelectable(l))
4512
+ return Z.create(e, n - (i < 0 ? l.nodeSize : 0));
4513
4513
  } else {
4514
4514
  let o = Ot(e, l, n + i, i < 0 ? l.childCount : 0, i, s);
4515
4515
  if (o)
@@ -4811,7 +4811,7 @@ const Kd = /^```([a-z]+)?[\s\n]$/, Jd = /^~~~([a-z]+)?[\s\n]$/, Yd = Ke.create({
4811
4811
  if (l) {
4812
4812
  const { $to: d } = a.selection, u = d.end();
4813
4813
  if (d.nodeAfter)
4814
- d.nodeAfter.isTextblock ? a.setSelection(ie.create(a.doc, d.pos + 1)) : d.nodeAfter.isBlock ? a.setSelection(X.create(a.doc, d.pos)) : a.setSelection(ie.create(a.doc, d.pos));
4814
+ d.nodeAfter.isTextblock ? a.setSelection(ie.create(a.doc, d.pos + 1)) : d.nodeAfter.isBlock ? a.setSelection(Z.create(a.doc, d.pos)) : a.setSelection(ie.create(a.doc, d.pos));
4815
4815
  else {
4816
4816
  const f = (o = d.parent.type.contentMatch.defaultType) === null || o === void 0 ? void 0 : o.create();
4817
4817
  f && (a.insert(u, f), a.setSelection(ie.create(a.doc, u + 1)));
@@ -5549,7 +5549,7 @@ function fl(e, t) {
5549
5549
  }
5550
5550
  const Ze = typeof navigator < "u" ? navigator : null, $s = typeof document < "u" ? document : null, mt = Ze && Ze.userAgent || "", jr = /Edge\/(\d+)/.exec(mt), hl = /MSIE \d/.exec(mt), Wr = /Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(mt), pn = !!(hl || Wr || jr), ml = hl ? document.documentMode : Wr ? +Wr[1] : jr ? +jr[1] : 0, tr = !pn && /gecko\/(\d+)/i.test(mt);
5551
5551
  tr && +(/Firefox\/(\d+)/.exec(mt) || [0, 0])[1];
5552
- const Kr = !pn && /Chrome\/(\d+)/.exec(mt), rt = !!Kr, pl = Kr ? +Kr[1] : 0, Tt = !pn && !!Ze && /Apple Computer/.test(Ze.vendor), Mi = Tt && (/Mobile\/\w+/.test(mt) || !!Ze && Ze.maxTouchPoints > 2), Ve = Mi || (Ze ? /Mac/.test(Ze.platform) : !1), gl = Ze ? /Win/.test(Ze.platform) : !1, gn = /Android \d/.test(mt), Ei = !!$s && "webkitFontSmoothing" in $s.documentElement.style, Su = Ei ? +(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent) || [0, 0])[1] : 0;
5552
+ const Kr = !pn && /Chrome\/(\d+)/.exec(mt), rt = !!Kr, pl = Kr ? +Kr[1] : 0, Tt = !pn && !!Ze && /Apple Computer/.test(Ze.vendor), Mi = Tt && (/Mobile\/\w+/.test(mt) || !!Ze && Ze.maxTouchPoints > 2), He = Mi || (Ze ? /Mac/.test(Ze.platform) : !1), gl = Ze ? /Win/.test(Ze.platform) : !1, gn = /Android \d/.test(mt), Ei = !!$s && "webkitFontSmoothing" in $s.documentElement.style, Su = Ei ? +(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent) || [0, 0])[1] : 0;
5553
5553
  function Cu(e, t = null) {
5554
5554
  let n = e.domSelectionRange(), r = e.state.doc;
5555
5555
  if (!n.focusNode)
@@ -5562,9 +5562,9 @@ function Cu(e, t = null) {
5562
5562
  for (o = a; i && !i.node; )
5563
5563
  i = i.parent;
5564
5564
  let f = i.node;
5565
- if (i && f.isAtom && X.isSelectable(f) && i.parent && !(f.isInline && ku(n.focusNode, n.focusOffset, i.dom))) {
5565
+ if (i && f.isAtom && Z.isSelectable(f) && i.parent && !(f.isInline && ku(n.focusNode, n.focusOffset, i.dom))) {
5566
5566
  let m = i.posBefore;
5567
- d = new X(a == m ? l : r.resolve(m));
5567
+ d = new Z(a == m ? l : r.resolve(m));
5568
5568
  }
5569
5569
  } else {
5570
5570
  if (n instanceof e.dom.ownerDocument.defaultView.Selection && n.rangeCount > 1) {
@@ -5646,7 +5646,7 @@ function Mu(e) {
5646
5646
  r ? t.collapse(n.parentNode, Et(n) + 1) : t.collapse(n, 0), !r && !e.state.selection.visible && pn && ml <= 11 && (n.disabled = !0, n.disabled = !1);
5647
5647
  }
5648
5648
  function Eu(e, t) {
5649
- if (t instanceof X) {
5649
+ if (t instanceof Z) {
5650
5650
  let n = e.docView.descAt(t.from);
5651
5651
  n != e.lastSelectedViewDesc && (Ps(e), n && n.selectNode(), e.lastSelectedViewDesc = n);
5652
5652
  } else
@@ -5687,17 +5687,17 @@ function zs(e, t, n) {
5687
5687
  } else if (r.empty) {
5688
5688
  if (e.endOfTextblock(t > 0 ? "forward" : "backward")) {
5689
5689
  let i = Jr(e.state, t);
5690
- return i && i instanceof X ? lt(e, i) : !1;
5691
- } else if (!(Ve && n.indexOf("m") > -1)) {
5690
+ return i && i instanceof Z ? lt(e, i) : !1;
5691
+ } else if (!(He && n.indexOf("m") > -1)) {
5692
5692
  let i = r.$head, s = i.textOffset ? null : t < 0 ? i.nodeBefore : i.nodeAfter, a;
5693
5693
  if (!s || s.isText)
5694
5694
  return !1;
5695
5695
  let l = t < 0 ? i.pos - s.nodeSize : i.pos;
5696
- return s.isAtom || (a = e.docView.descAt(l)) && !a.contentDOM ? X.isSelectable(s) ? lt(e, new X(t < 0 ? e.state.doc.resolve(i.pos - s.nodeSize) : i)) : Ei ? lt(e, new ie(e.state.doc.resolve(t < 0 ? l : l + s.nodeSize))) : !1 : !1;
5696
+ return s.isAtom || (a = e.docView.descAt(l)) && !a.contentDOM ? Z.isSelectable(s) ? lt(e, new Z(t < 0 ? e.state.doc.resolve(i.pos - s.nodeSize) : i)) : Ei ? lt(e, new ie(e.state.doc.resolve(t < 0 ? l : l + s.nodeSize))) : !1 : !1;
5697
5697
  }
5698
5698
  } else return !1;
5699
5699
  else {
5700
- if (r instanceof X && r.node.isInline)
5700
+ if (r instanceof Z && r.node.isInline)
5701
5701
  return lt(e, new ie(t > 0 ? r.$to : r.$from));
5702
5702
  {
5703
5703
  let i = Jr(e.state, t);
@@ -5848,12 +5848,12 @@ function Rs(e, t) {
5848
5848
  }
5849
5849
  function _s(e, t, n) {
5850
5850
  let r = e.state.selection;
5851
- if (r instanceof ie && !r.empty || n.indexOf("s") > -1 || Ve && n.indexOf("m") > -1)
5851
+ if (r instanceof ie && !r.empty || n.indexOf("s") > -1 || He && n.indexOf("m") > -1)
5852
5852
  return !1;
5853
5853
  let { $from: i, $to: s } = r;
5854
5854
  if (!i.parent.inlineContent || e.endOfTextblock(t < 0 ? "up" : "down")) {
5855
5855
  let a = Jr(e.state, t);
5856
- if (a && a instanceof X)
5856
+ if (a && a instanceof Z)
5857
5857
  return lt(e, a);
5858
5858
  }
5859
5859
  if (!i.parent.inlineContent) {
@@ -5898,24 +5898,24 @@ function Fu(e) {
5898
5898
  }
5899
5899
  function Pu(e, t) {
5900
5900
  let n = t.keyCode, r = Fu(t);
5901
- if (n == 8 || Ve && n == 72 && r == "c")
5901
+ if (n == 8 || He && n == 72 && r == "c")
5902
5902
  return Bs(e, -1) || Dt(e, -1);
5903
- if (n == 46 && !t.shiftKey || Ve && n == 68 && r == "c")
5903
+ if (n == 46 && !t.shiftKey || He && n == 68 && r == "c")
5904
5904
  return Bs(e, 1) || Dt(e, 1);
5905
5905
  if (n == 13 || n == 27)
5906
5906
  return !0;
5907
- if (n == 37 || Ve && n == 66 && r == "c") {
5907
+ if (n == 37 || He && n == 66 && r == "c") {
5908
5908
  let i = n == 37 ? Rs(e, e.state.selection.from) == "ltr" ? -1 : 1 : -1;
5909
5909
  return zs(e, i, r) || Dt(e, i);
5910
- } else if (n == 39 || Ve && n == 70 && r == "c") {
5910
+ } else if (n == 39 || He && n == 70 && r == "c") {
5911
5911
  let i = n == 39 ? Rs(e, e.state.selection.from) == "ltr" ? 1 : -1 : 1;
5912
5912
  return zs(e, i, r) || Dt(e, i);
5913
5913
  } else {
5914
- if (n == 38 || Ve && n == 80 && r == "c")
5914
+ if (n == 38 || He && n == 80 && r == "c")
5915
5915
  return _s(e, -1, r) || Dt(e, -1);
5916
- if (n == 40 || Ve && n == 78 && r == "c")
5916
+ if (n == 40 || He && n == 78 && r == "c")
5917
5917
  return Lu(e) || _s(e, 1, r) || Dt(e, 1);
5918
- if (r == (Ve ? "m" : "c") && (n == 66 || n == 73 || n == 89 || n == 90))
5918
+ if (r == (He ? "m" : "c") && (n == 66 || n == 73 || n == 89 || n == 90))
5919
5919
  return !0;
5920
5920
  }
5921
5921
  return !1;
@@ -6110,11 +6110,11 @@ function Hu(e, t) {
6110
6110
  }
6111
6111
  return new Q(i, s, a);
6112
6112
  }
6113
- const Je = {}, Be = {};
6113
+ const Je = {}, Ve = {};
6114
6114
  function ot(e, t) {
6115
6115
  e.input.lastSelectionOrigin = t, e.input.lastSelectionTime = Date.now();
6116
6116
  }
6117
- Be.keydown = (e, t) => {
6117
+ Ve.keydown = (e, t) => {
6118
6118
  let n = t;
6119
6119
  if (e.input.shiftKey = n.keyCode == 16 || n.shiftKey, !El(e, n) && (e.input.lastKeyCode = n.keyCode, e.input.lastKeyCodeTime = Date.now(), !(gn && rt && n.keyCode == 13)))
6120
6120
  if (n.keyCode != 229 && e.domObserver.forceFlush(), Mi && n.keyCode == 13 && !n.ctrlKey && !n.altKey && !n.metaKey) {
@@ -6124,12 +6124,12 @@ Be.keydown = (e, t) => {
6124
6124
  }, 200);
6125
6125
  } else e.someProp("handleKeyDown", (r) => r(e, n)) || Pu(e, n) ? n.preventDefault() : ot(e, "key");
6126
6126
  };
6127
- Be.keyup = (e, t) => {
6127
+ Ve.keyup = (e, t) => {
6128
6128
  t.keyCode == 16 && (e.input.shiftKey = !1);
6129
6129
  };
6130
- Be.keypress = (e, t) => {
6130
+ Ve.keypress = (e, t) => {
6131
6131
  let n = t;
6132
- if (El(e, n) || !n.charCode || n.ctrlKey && !n.altKey || Ve && n.metaKey)
6132
+ if (El(e, n) || !n.charCode || n.ctrlKey && !n.altKey || He && n.metaKey)
6133
6133
  return;
6134
6134
  if (e.someProp("handleKeyPress", (i) => i(e, n))) {
6135
6135
  n.preventDefault();
@@ -6167,22 +6167,22 @@ function qu(e, t) {
6167
6167
  if (t == -1)
6168
6168
  return !1;
6169
6169
  let n = e.state.doc.resolve(t), r = n.nodeAfter;
6170
- return r && r.isAtom && X.isSelectable(r) ? (zt(e, new X(n)), !0) : !1;
6170
+ return r && r.isAtom && Z.isSelectable(r) ? (zt(e, new Z(n)), !0) : !1;
6171
6171
  }
6172
6172
  function ju(e, t) {
6173
6173
  if (t == -1)
6174
6174
  return !1;
6175
6175
  let n = e.state.selection, r, i;
6176
- n instanceof X && (r = n.node);
6176
+ n instanceof Z && (r = n.node);
6177
6177
  let s = e.state.doc.resolve(t);
6178
6178
  for (let a = s.depth + 1; a > 0; a--) {
6179
6179
  let l = a > s.depth ? s.nodeAfter : s.node(a);
6180
- if (X.isSelectable(l)) {
6180
+ if (Z.isSelectable(l)) {
6181
6181
  r && n.$from.depth > 0 && a >= n.$from.depth && s.before(n.$from.depth + 1) == n.$from.pos ? i = s.before(n.$from.depth) : i = s.before(a);
6182
6182
  break;
6183
6183
  }
6184
6184
  }
6185
- return i != null ? (zt(e, X.create(e.state.doc, i)), !0) : !1;
6185
+ return i != null ? (zt(e, Z.create(e.state.doc, i)), !0) : !1;
6186
6186
  }
6187
6187
  function Wu(e, t, n, r, i) {
6188
6188
  return Di(e, "handleClickOn", t, n, r) || e.someProp("handleClick", (s) => s(e, t, r)) || (i ? ju(e, n) : qu(e, n));
@@ -6204,8 +6204,8 @@ function Yu(e, t, n) {
6204
6204
  let a = s > i.depth ? i.nodeAfter : i.node(s), l = i.before(s);
6205
6205
  if (a.inlineContent)
6206
6206
  zt(e, ie.create(r, l + 1, l + 1 + a.content.size));
6207
- else if (X.isSelectable(a))
6208
- zt(e, X.create(r, l));
6207
+ else if (Z.isSelectable(a))
6208
+ zt(e, Z.create(r, l));
6209
6209
  else
6210
6210
  continue;
6211
6211
  return !0;
@@ -6214,7 +6214,7 @@ function Yu(e, t, n) {
6214
6214
  function Ii(e) {
6215
6215
  return Hn(e);
6216
6216
  }
6217
- const Ml = Ve ? "metaKey" : "ctrlKey";
6217
+ const Ml = He ? "metaKey" : "ctrlKey";
6218
6218
  Je.mousedown = (e, t) => {
6219
6219
  let n = t;
6220
6220
  e.input.shiftKey = n.shiftKey;
@@ -6236,7 +6236,7 @@ class Gu {
6236
6236
  const l = i ? null : r.target, o = l ? t.docView.nearestDesc(l, !0) : null;
6237
6237
  this.target = o && o.nodeDOM.nodeType == 1 ? o.nodeDOM : null;
6238
6238
  let { selection: d } = t.state;
6239
- (r.button == 0 && s.type.spec.draggable && s.type.spec.selectable !== !1 || d instanceof X && d.from <= a && d.to > a) && (this.mightDrag = {
6239
+ (r.button == 0 && s.type.spec.draggable && s.type.spec.selectable !== !1 || d instanceof Z && d.from <= a && d.to > a) && (this.mightDrag = {
6240
6240
  node: s,
6241
6241
  pos: a,
6242
6242
  addAttr: !!(this.target && !this.target.draggable),
@@ -6280,7 +6280,7 @@ function El(e, t) {
6280
6280
  return e.composing ? !0 : Tt && Math.abs(t.timeStamp - e.input.compositionEndedAt) < 500 ? (e.input.compositionEndedAt = -2e8, !0) : !1;
6281
6281
  }
6282
6282
  const Qu = gn ? 5e3 : -1;
6283
- Be.compositionstart = Be.compositionupdate = (e) => {
6283
+ Ve.compositionstart = Ve.compositionupdate = (e) => {
6284
6284
  if (!e.composing) {
6285
6285
  e.domObserver.flush();
6286
6286
  let { state: t } = e, n = t.selection.$to;
@@ -6311,7 +6311,7 @@ function Zu(e) {
6311
6311
  let r = t.childNodes[n];
6312
6312
  return r.nodeType == 1 && r.contentEditable == "false";
6313
6313
  }
6314
- Be.compositionend = (e, t) => {
6314
+ Ve.compositionend = (e, t) => {
6315
6315
  e.composing && (e.input.composing = !1, e.input.compositionEndedAt = t.timeStamp, e.input.compositionPendingChanges = e.domObserver.pendingRecords().length ? e.input.compositionID : 0, e.input.compositionNode = null, e.input.badSafariComposition ? e.domObserver.forceFlush() : e.input.compositionPendingChanges && Promise.resolve().then(() => e.domObserver.flush()), e.input.compositionID++, Tl(e, 20));
6316
6316
  };
6317
6317
  function Tl(e, t) {
@@ -6345,7 +6345,7 @@ function tf(e, t) {
6345
6345
  }, 50);
6346
6346
  }
6347
6347
  const dn = pn && ml < 15 || Mi && Su < 604;
6348
- Je.copy = Be.cut = (e, t) => {
6348
+ Je.copy = Ve.cut = (e, t) => {
6349
6349
  let n = t, r = e.state.selection, i = n.type == "cut";
6350
6350
  if (r.empty)
6351
6351
  return;
@@ -6381,7 +6381,7 @@ function Dl(e) {
6381
6381
  let n = e.getData("text/uri-list");
6382
6382
  return n ? n.replace(/\r?\n/g, " ") : "";
6383
6383
  }
6384
- Be.paste = (e, t) => {
6384
+ Ve.paste = (e, t) => {
6385
6385
  let n = t;
6386
6386
  if (e.composing && !gn)
6387
6387
  return;
@@ -6393,7 +6393,7 @@ class sf {
6393
6393
  this.slice = t, this.move = n, this.node = r;
6394
6394
  }
6395
6395
  }
6396
- const af = Ve ? "altKey" : "ctrlKey";
6396
+ const af = He ? "altKey" : "ctrlKey";
6397
6397
  function Il(e, t) {
6398
6398
  let n = e.someProp("dragCopies", (r) => !r(t));
6399
6399
  return n ?? !t[af];
@@ -6403,12 +6403,12 @@ Je.dragstart = (e, t) => {
6403
6403
  if (r && r.done(), !n.dataTransfer)
6404
6404
  return;
6405
6405
  let i = e.state.selection, s = i.empty ? null : e.posAtCoords(nr(n)), a;
6406
- if (!(s && s.pos >= i.from && s.pos <= (i instanceof X ? i.to - 1 : i.to))) {
6406
+ if (!(s && s.pos >= i.from && s.pos <= (i instanceof Z ? i.to - 1 : i.to))) {
6407
6407
  if (r && r.mightDrag)
6408
- a = X.create(e.state.doc, r.mightDrag.pos);
6408
+ a = Z.create(e.state.doc, r.mightDrag.pos);
6409
6409
  else if (n.target && n.target.nodeType == 1) {
6410
6410
  let f = e.docView.nearestDesc(n.target, !0);
6411
- f && f.node.type.spec.draggable && f != e.docView && (a = X.create(e.state.doc, f.posBefore));
6411
+ f && f.node.type.spec.draggable && f != e.docView && (a = Z.create(e.state.doc, f.posBefore));
6412
6412
  }
6413
6413
  }
6414
6414
  let l = (a || e.state.selection).content(), { dom: o, text: d, slice: u } = vl(e, l);
@@ -6420,8 +6420,8 @@ Je.dragend = (e) => {
6420
6420
  e.dragging == t && (e.dragging = null);
6421
6421
  }, 50);
6422
6422
  };
6423
- Be.dragover = Be.dragenter = (e, t) => t.preventDefault();
6424
- Be.drop = (e, t) => {
6423
+ Ve.dragover = Ve.dragenter = (e, t) => t.preventDefault();
6424
+ Ve.drop = (e, t) => {
6425
6425
  try {
6426
6426
  lf(e, t, e.dragging);
6427
6427
  } finally {
@@ -6457,8 +6457,8 @@ function lf(e, t, n) {
6457
6457
  if (u ? o.replaceRangeWith(d, d, s.content.firstChild) : o.replaceRange(d, d, s), o.doc.eq(f))
6458
6458
  return;
6459
6459
  let m = o.doc.resolve(d);
6460
- if (u && X.isSelectable(s.content.firstChild) && m.nodeAfter && m.nodeAfter.sameMarkup(s.content.firstChild))
6461
- o.setSelection(new X(m));
6460
+ if (u && Z.isSelectable(s.content.firstChild) && m.nodeAfter && m.nodeAfter.sameMarkup(s.content.firstChild))
6461
+ o.setSelection(new Z(m));
6462
6462
  else {
6463
6463
  let h = o.mapping.map(l);
6464
6464
  o.mapping.maps[o.mapping.maps.length - 1].forEach((x, b, y, v) => h = v), o.setSelection(bl(e, m, o.doc.resolve(h)));
@@ -6486,8 +6486,8 @@ Je.beforeinput = (e, t) => {
6486
6486
  }, 50);
6487
6487
  }
6488
6488
  };
6489
- for (let e in Be)
6490
- Je[e] = Be[e];
6489
+ for (let e in Ve)
6490
+ Je[e] = Ve[e];
6491
6491
  function un(e, t) {
6492
6492
  if (e == t)
6493
6493
  return !0;
@@ -7059,7 +7059,7 @@ class pe extends se {
7059
7059
  for (; ; ) {
7060
7060
  let a = n > 0 ? s.firstChild : s.lastChild;
7061
7061
  if (!a) {
7062
- if (s.isAtom && !s.isText && !X.isSelectable(s)) {
7062
+ if (s.isAtom && !s.isText && !Z.isSelectable(s)) {
7063
7063
  t = t.doc.resolve(i + s.nodeSize * n), r = !1;
7064
7064
  continue e;
7065
7065
  }
@@ -7165,7 +7165,7 @@ function mf(e, t, n) {
7165
7165
  if (!pe.valid(r))
7166
7166
  return !1;
7167
7167
  let i = e.posAtCoords({ left: n.clientX, top: n.clientY });
7168
- return i && i.inside > -1 && X.isSelectable(e.state.doc.nodeAt(i.inside)) ? !1 : (e.dispatch(e.state.tr.setSelection(new pe(r))), !0);
7168
+ return i && i.inside > -1 && Z.isSelectable(e.state.doc.nodeAt(i.inside)) ? !1 : (e.dispatch(e.state.tr.setSelection(new pe(r))), !0);
7169
7169
  }
7170
7170
  function pf(e, t) {
7171
7171
  if (t.inputType != "insertCompositionText" || !(e.state.selection instanceof pe))
@@ -7567,7 +7567,7 @@ const vf = {
7567
7567
  200: "#fde68a"
7568
7568
  }
7569
7569
  }
7570
- }, de = {
7570
+ }, ue = {
7571
7571
  xs: "0.25rem",
7572
7572
  // 4px - Fine control (½ of base unit)
7573
7573
  sm: "0.5rem",
@@ -7579,18 +7579,18 @@ const vf = {
7579
7579
  xl: "2rem"
7580
7580
  }, wf = {
7581
7581
  // Headings - using design token sizes and weights
7582
- h1: `font-size: ${he.fontSize["4xl"]}; font-weight: ${he.fontWeight.semibold}; line-height: ${he.lineHeight.tight}; margin: ${de.md} 0 ${de.sm} 0;`,
7583
- h2: `font-size: ${he.fontSize["2xl"]}; font-weight: ${he.fontWeight.semibold}; line-height: ${he.lineHeight.tight}; margin: ${de.md} 0 ${de.sm} 0;`,
7584
- h3: `font-size: ${he.fontSize.xl}; font-weight: ${he.fontWeight.semibold}; line-height: ${he.lineHeight.tight}; margin: ${de.md} 0 ${de.sm} 0;`,
7585
- h4: `font-size: ${he.fontSize.lg}; font-weight: ${he.fontWeight.semibold}; line-height: ${he.lineHeight.tight}; margin: ${de.md} 0 ${de.sm} 0;`,
7586
- h5: `font-size: ${he.fontSize.base}; font-weight: ${he.fontWeight.semibold}; line-height: ${he.lineHeight.tight}; margin: ${de.md} 0 ${de.sm} 0;`,
7587
- h6: `font-size: ${he.fontSize.sm}; font-weight: ${he.fontWeight.semibold}; line-height: ${he.lineHeight.tight}; margin: ${de.md} 0 ${de.sm} 0;`,
7582
+ h1: `font-size: ${he.fontSize["4xl"]}; font-weight: ${he.fontWeight.semibold}; line-height: ${he.lineHeight.tight}; margin: ${ue.md} 0 ${ue.sm} 0;`,
7583
+ h2: `font-size: ${he.fontSize["2xl"]}; font-weight: ${he.fontWeight.semibold}; line-height: ${he.lineHeight.tight}; margin: ${ue.md} 0 ${ue.sm} 0;`,
7584
+ h3: `font-size: ${he.fontSize.xl}; font-weight: ${he.fontWeight.semibold}; line-height: ${he.lineHeight.tight}; margin: ${ue.md} 0 ${ue.sm} 0;`,
7585
+ h4: `font-size: ${he.fontSize.lg}; font-weight: ${he.fontWeight.semibold}; line-height: ${he.lineHeight.tight}; margin: ${ue.md} 0 ${ue.sm} 0;`,
7586
+ h5: `font-size: ${he.fontSize.base}; font-weight: ${he.fontWeight.semibold}; line-height: ${he.lineHeight.tight}; margin: ${ue.md} 0 ${ue.sm} 0;`,
7587
+ h6: `font-size: ${he.fontSize.sm}; font-weight: ${he.fontWeight.semibold}; line-height: ${he.lineHeight.tight}; margin: ${ue.md} 0 ${ue.sm} 0;`,
7588
7588
  // Paragraph
7589
7589
  p: `min-height: ${he.lineHeight.normal}em; margin: 0;`,
7590
7590
  // Lists
7591
- ul: `list-style-type: disc; list-style-position: outside; padding-left: ${de.xl}; margin: ${de.md} 0;`,
7592
- ol: `list-style-type: decimal; list-style-position: outside; padding-left: ${de.xl}; margin: ${de.md} 0;`,
7593
- li: `display: list-item; margin: ${de.xs} 0;`,
7591
+ ul: `list-style-type: disc; list-style-position: outside; padding-left: ${ue.xl}; margin: ${ue.md} 0;`,
7592
+ ol: `list-style-type: decimal; list-style-position: outside; padding-left: ${ue.xl}; margin: ${ue.md} 0;`,
7593
+ li: `display: list-item; margin: ${ue.xs} 0;`,
7594
7594
  // Text formatting
7595
7595
  strong: `font-weight: ${he.fontWeight.bold};`,
7596
7596
  em: "font-style: italic;",
@@ -7598,17 +7598,17 @@ const vf = {
7598
7598
  u: "text-decoration: underline;",
7599
7599
  // Code - using mono font family and token colors
7600
7600
  code: `background-color: ${st.neutral.gray[100]}; border-radius: 0.4rem; font-size: ${he.fontSize.sm}; padding: 0.25em 0.3em; font-family: ${he.fontFamily.mono};`,
7601
- pre: `background: ${st.neutral.gray[800]}; border-radius: ${de.sm}; color: ${st.neutral.gray[100]}; font-family: ${he.fontFamily.mono}; margin: ${de.lg} 0; padding: 0.75rem ${de.md}; overflow-x: auto;`,
7601
+ pre: `background: ${st.neutral.gray[800]}; border-radius: ${ue.sm}; color: ${st.neutral.gray[100]}; font-family: ${he.fontFamily.mono}; margin: ${ue.lg} 0; padding: 0.75rem ${ue.md}; overflow-x: auto;`,
7602
7602
  // Blockquote
7603
- blockquote: `border-left: 3px solid ${st.neutral.gray[300]}; margin: ${de.lg} 0; padding-left: ${de.md}; color: ${st.neutral.gray[500]};`,
7603
+ blockquote: `border-left: 3px solid ${st.neutral.gray[300]}; margin: ${ue.lg} 0; padding-left: ${ue.md}; color: ${st.neutral.gray[500]};`,
7604
7604
  // Horizontal rule
7605
- hr: `border: none; border-top: 1px solid ${st.neutral.gray[200]}; margin: ${de.xl} 0;`,
7605
+ hr: `border: none; border-top: 1px solid ${st.neutral.gray[200]}; margin: ${ue.xl} 0;`,
7606
7606
  // Links - using brand primary color
7607
7607
  a: `color: ${st.brand.primary.DEFAULT}; text-decoration: underline; cursor: pointer;`,
7608
7608
  // Mark/Highlight - using warning palette
7609
- mark: `background-color: ${st.palettes.warning[200]}; border-radius: ${de.xs}; padding: 0 0.125rem;`,
7609
+ mark: `background-color: ${st.palettes.warning[200]}; border-radius: ${ue.xs}; padding: 0 0.125rem;`,
7610
7610
  // Task list checkbox label
7611
- label: `display: flex; align-items: center; gap: ${de.sm}; cursor: pointer;`,
7611
+ label: `display: flex; align-items: center; gap: ${ue.sm}; cursor: pointer;`,
7612
7612
  // Input checkbox (task items)
7613
7613
  input: "cursor: pointer; margin: 0;"
7614
7614
  }, Nf = {
@@ -7693,41 +7693,41 @@ const Sf = ({
7693
7693
  isDisabled: y = !1,
7694
7694
  includeInlineStyles: v = !0,
7695
7695
  ...N
7696
- } = e, { zoom: M, setZoom: S } = ad(), A = us.lineHeight, E = n * A, I = i ? void 0 : r * A, _ = V.useMemo(() => xf(o), [o]), { Component: P, label: B, shouldLabelBeOutside: $, getBaseProps: T, getLabelProps: L, getInputWrapperProps: z } = Ko({
7696
+ } = e, { zoom: M, setZoom: S } = ad(), A = us.lineHeight, E = n * A, $ = i ? void 0 : r * A, _ = B.useMemo(() => xf(o), [o]), { Component: R, label: V, shouldLabelBeOutside: T, getBaseProps: D, getLabelProps: L, getInputWrapperProps: P } = Ko({
7697
7697
  ...N,
7698
7698
  variant: d,
7699
7699
  // Explicitly pass variant to ensure bordered styling
7700
7700
  ref: t,
7701
7701
  isMultiline: !0
7702
- }), K = B ? /* @__PURE__ */ c("label", { ...L(), children: B }) : null, Z = V.useCallback(
7702
+ }), K = V ? /* @__PURE__ */ c("label", { ...L(), children: V }) : null, X = B.useCallback(
7703
7703
  ({ editor: J }) => {
7704
- const ce = J.getHTML(), ae = v ? kf(ce) : ce, me = J.getJSON(), Y = J.getText(), W = Y.length, fe = Y.split(/\s+/).filter((Fe) => Fe.length > 0).length, le = {
7705
- html: ae,
7704
+ const ae = J.getHTML(), le = v ? kf(ae) : ae, me = J.getJSON(), Y = J.getText(), q = Y.length, oe = Y.split(/\s+/).filter((Fe) => Fe.length > 0).length, ce = {
7705
+ html: le,
7706
7706
  json: me,
7707
7707
  text: Y,
7708
- characters: W,
7709
- words: fe
7708
+ characters: q,
7709
+ words: oe
7710
7710
  };
7711
- if (m?.(le), h?.(le), "onChange" in N && typeof N.onChange == "function") {
7711
+ if (m?.(ce), h?.(ce), "onChange" in N && typeof N.onChange == "function") {
7712
7712
  const Fe = {
7713
- target: { value: ae },
7714
- currentTarget: { value: ae }
7713
+ target: { value: le },
7714
+ currentTarget: { value: le }
7715
7715
  };
7716
7716
  N.onChange(Fe);
7717
7717
  }
7718
7718
  },
7719
7719
  [m, h, N, v]
7720
7720
  );
7721
- return /* @__PURE__ */ g(P, { ...T(), children: [
7722
- $ ? K : null,
7721
+ return /* @__PURE__ */ g(R, { ...D(), children: [
7722
+ T ? K : null,
7723
7723
  /* @__PURE__ */ c(
7724
7724
  "div",
7725
7725
  {
7726
- ...z(),
7727
- className: k(z().className, "flex flex-col w-full p-0 gap-0 rich-text-editor"),
7726
+ ...P(),
7727
+ className: k(P().className, "flex flex-col w-full p-0 gap-0 rich-text-editor"),
7728
7728
  style: {
7729
- maxHeight: I ? `${I + us.toolbarHeight}px` : void 0,
7730
- overflow: I ? "auto" : void 0
7729
+ maxHeight: $ ? `${$ + us.toolbarHeight}px` : void 0,
7730
+ overflow: $ ? "auto" : void 0
7731
7731
  },
7732
7732
  children: /* @__PURE__ */ c(
7733
7733
  Ac,
@@ -7759,7 +7759,7 @@ const Sf = ({
7759
7759
  },
7760
7760
  extensions: _,
7761
7761
  content: f || u || e.defaultValue || "",
7762
- onUpdate: Z
7762
+ onUpdate: X
7763
7763
  }
7764
7764
  )
7765
7765
  }
@@ -7820,48 +7820,48 @@ const js = [
7820
7820
  const S = { ...Ef, ...u }, A = Array.isArray(e) ? e : js, E = {
7821
7821
  2: "grid-cols-2",
7822
7822
  3: "grid-cols-3"
7823
- }, I = {
7823
+ }, $ = {
7824
7824
  3: "sm:grid-cols-3",
7825
7825
  4: "sm:grid-cols-4",
7826
7826
  5: "sm:grid-cols-5",
7827
7827
  6: "sm:grid-cols-6"
7828
- }, _ = `${E[f]} ${I[m]}`, [P, B] = Ni(
7828
+ }, _ = `${E[f]} ${$[m]}`, [R, V] = Ni(
7829
7829
  t,
7830
7830
  n,
7831
7831
  r
7832
- ), [$, T] = j(""), [L, z] = j(!1), [K, Z] = j(0), J = te(
7833
- (W) => {
7832
+ ), [T, D] = j(""), [L, P] = j(!1), [K, X] = j(0), J = te(
7833
+ (q) => {
7834
7834
  if (h) return;
7835
- const fe = {
7836
- amount: W.amount,
7835
+ const oe = {
7836
+ amount: q.amount,
7837
7837
  isCustom: !1,
7838
- presetId: W.id
7838
+ presetId: q.id
7839
7839
  };
7840
- B(fe), T(""), z(!1), Z((le) => le + 1), i?.(fe);
7840
+ V(oe), D(""), P(!1), X((ce) => ce + 1), i?.(oe);
7841
7841
  },
7842
- [h, B, i]
7843
- ), ce = te(
7844
- (W) => {
7842
+ [h, V, i]
7843
+ ), ae = te(
7844
+ (q) => {
7845
7845
  if (h) return;
7846
- if (T(W !== void 0 ? String(W) : ""), i) {
7847
- B(null);
7846
+ if (D(q !== void 0 ? String(q) : ""), i) {
7847
+ V(null);
7848
7848
  return;
7849
7849
  }
7850
- if (W === void 0 || isNaN(W)) {
7851
- B(null);
7850
+ if (q === void 0 || isNaN(q)) {
7851
+ V(null);
7852
7852
  return;
7853
7853
  }
7854
- B({
7855
- amount: W,
7854
+ V({
7855
+ amount: q,
7856
7856
  isCustom: !0
7857
7857
  });
7858
7858
  },
7859
- [h, B, i]
7860
- ), ae = te(() => {
7859
+ [h, V, i]
7860
+ ), le = te(() => {
7861
7861
  if (h) return;
7862
- const W = $ !== "" ? parseFloat($) : void 0;
7863
- W === void 0 || isNaN(W) || i?.({ amount: W, isCustom: !0 });
7864
- }, [h, $, i]), me = V.useMemo(
7862
+ const q = T !== "" ? parseFloat(T) : void 0;
7863
+ q === void 0 || isNaN(q) || i?.({ amount: q, isCustom: !0 });
7864
+ }, [h, T, i]), me = B.useMemo(
7865
7865
  () => ({
7866
7866
  style: "currency",
7867
7867
  currency: s,
@@ -7872,20 +7872,20 @@ const js = [
7872
7872
  [s]
7873
7873
  ), Y = /* @__PURE__ */ g("div", { className: "space-y-4", "data-testid": "donation-amounts-root", children: [
7874
7874
  S.title && /* @__PURE__ */ c("h2", { className: "text-base font-semibold", "data-testid": "donation-amounts-title", children: S.title }),
7875
- A.length > 0 && /* @__PURE__ */ c("div", { className: k("grid gap-3", _), "data-testid": "donation-amounts-presets", children: A.map((W) => {
7876
- const fe = P !== null && !P.isCustom && P.presetId === W.id;
7875
+ A.length > 0 && /* @__PURE__ */ c("div", { className: k("grid gap-3", _), "data-testid": "donation-amounts-presets", children: A.map((q) => {
7876
+ const oe = R !== null && !R.isCustom && R.presetId === q.id;
7877
7877
  return /* @__PURE__ */ c(
7878
- q,
7878
+ W,
7879
7879
  {
7880
- color: fe ? "primary" : b,
7881
- variant: fe ? "solid" : x,
7880
+ color: oe ? "primary" : b,
7881
+ variant: oe ? "solid" : x,
7882
7882
  className: "w-full",
7883
- onPress: () => J(W),
7883
+ onPress: () => J(q),
7884
7884
  isDisabled: h,
7885
- "data-testid": `donation-amounts-preset-${W.id}`,
7886
- children: W.label || Mf(W.amount, a, s)
7885
+ "data-testid": `donation-amounts-preset-${q.id}`,
7886
+ children: q.label || Mf(q.amount, a, s)
7887
7887
  },
7888
- W.id
7888
+ q.id
7889
7889
  );
7890
7890
  }) }),
7891
7891
  l && /* @__PURE__ */ g("div", { className: "flex gap-3 items-start", children: [
@@ -7895,7 +7895,7 @@ const js = [
7895
7895
  placeholder: S.customAmountPlaceholder,
7896
7896
  "aria-label": S.customAmountAriaLabel,
7897
7897
  onInput: i ? () => {
7898
- B(null), z(!0);
7898
+ V(null), P(!0);
7899
7899
  } : void 0,
7900
7900
  variant: y,
7901
7901
  radius: "full",
@@ -7904,24 +7904,24 @@ const js = [
7904
7904
  maxValue: d,
7905
7905
  step: 0.01,
7906
7906
  formatOptions: me,
7907
- value: $ !== "" ? parseFloat($) : void 0,
7908
- onValueChange: ce,
7907
+ value: T !== "" ? parseFloat(T) : void 0,
7908
+ onValueChange: ae,
7909
7909
  isDisabled: h,
7910
7910
  className: "flex-1 [&_[data-slot=input-wrapper]]:!h-10 [&_[data-slot=input-wrapper]]:!min-h-10",
7911
7911
  "data-testid": "donation-amounts-custom-input",
7912
7912
  hideStepper: !0
7913
7913
  },
7914
- i ? `custom-${K}` : P?.isCustom === !1 ? P.presetId : "custom"
7914
+ i ? `custom-${K}` : R?.isCustom === !1 ? R.presetId : "custom"
7915
7915
  ),
7916
7916
  i && /* @__PURE__ */ c(
7917
- q,
7917
+ W,
7918
7918
  {
7919
7919
  color: "primary",
7920
7920
  variant: "solid",
7921
7921
  radius: "full",
7922
7922
  size: v,
7923
7923
  className: "shrink-0",
7924
- onPress: ae,
7924
+ onPress: le,
7925
7925
  isDisabled: h || !L,
7926
7926
  "data-testid": "donation-amounts-add-button",
7927
7927
  children: S.addDonationButton
@@ -7929,7 +7929,7 @@ const js = [
7929
7929
  )
7930
7930
  ] })
7931
7931
  ] });
7932
- return M ? /* @__PURE__ */ c(Le, { className: k("w-full", N), "data-testid": "donation-amounts-card", children: /* @__PURE__ */ c(_e, { children: Y }) }) : /* @__PURE__ */ c("div", { className: k("w-full", N), "data-testid": "donation-amounts-plain", children: Y });
7932
+ return M ? /* @__PURE__ */ c(Le, { className: k("w-full", N), "data-testid": "donation-amounts-card", children: /* @__PURE__ */ c(Be, { children: Y }) }) : /* @__PURE__ */ c("div", { className: k("w-full", N), "data-testid": "donation-amounts-plain", children: Y });
7933
7933
  };
7934
7934
  Tf.displayName = "DonationAmounts";
7935
7935
  const Df = (e) => {
@@ -7963,7 +7963,7 @@ const Df = (e) => {
7963
7963
  default:
7964
7964
  return "bg-primary-500";
7965
7965
  }
7966
- }, Of = V.forwardRef(
7966
+ }, Of = B.forwardRef(
7967
7967
  ({
7968
7968
  timeLeft: e,
7969
7969
  defaultTimeLeft: t = 1200,
@@ -7986,9 +7986,9 @@ const Df = (e) => {
7986
7986
  Math.max(0, t),
7987
7987
  n
7988
7988
  ), v = ft(null), N = ft(!1);
7989
- Ue(() => () => {
7989
+ _e(() => () => {
7990
7990
  v.current && clearInterval(v.current);
7991
- }, []), Ue(() => {
7991
+ }, []), _e(() => {
7992
7992
  if (!u || b <= 0) {
7993
7993
  v.current && (clearInterval(v.current), v.current = null);
7994
7994
  return;
@@ -7998,7 +7998,7 @@ const Df = (e) => {
7998
7998
  }, 1e3), () => {
7999
7999
  v.current && (clearInterval(v.current), v.current = null);
8000
8000
  };
8001
- }, [u, b, y, r]), Ue(() => {
8001
+ }, [u, b, y, r]), _e(() => {
8002
8002
  b > 0 && (N.current = !1);
8003
8003
  }, [b]);
8004
8004
  const M = o || If(i), S = $f(s), A = {
@@ -8583,8 +8583,8 @@ function mh(e, t, n, r) {
8583
8583
  if (e.random) {
8584
8584
  let E = e.resources.slice(0);
8585
8585
  for (a = []; E.length > 1; ) {
8586
- const I = Math.floor(Math.random() * E.length);
8587
- a.push(E[I]), E = E.slice(0, I).concat(E.slice(I + 1));
8586
+ const $ = Math.floor(Math.random() * E.length);
8587
+ a.push(E[$]), E = E.slice(0, $).concat(E.slice($ + 1));
8588
8588
  }
8589
8589
  a = a.concat(E);
8590
8590
  } else a = e.resources.slice(s).concat(e.resources.slice(0, s));
@@ -8599,8 +8599,8 @@ function mh(e, t, n, r) {
8599
8599
  E.status === "pending" && (E.status = "aborted");
8600
8600
  }), m = [];
8601
8601
  }
8602
- function y(E, I) {
8603
- I && (h = []), typeof E == "function" && h.push(E);
8602
+ function y(E, $) {
8603
+ $ && (h = []), typeof E == "function" && h.push(E);
8604
8604
  }
8605
8605
  function v() {
8606
8606
  return {
@@ -8623,31 +8623,31 @@ function mh(e, t, n, r) {
8623
8623
  E.status === "pending" && (E.status = "aborted");
8624
8624
  }), m = [];
8625
8625
  }
8626
- function S(E, I, _) {
8627
- const P = I !== "success";
8628
- switch (m = m.filter((B) => B !== E), o) {
8626
+ function S(E, $, _) {
8627
+ const R = $ !== "success";
8628
+ switch (m = m.filter((V) => V !== E), o) {
8629
8629
  case "pending":
8630
8630
  break;
8631
8631
  case "failed":
8632
- if (P || !e.dataAfterTimeout) return;
8632
+ if (R || !e.dataAfterTimeout) return;
8633
8633
  break;
8634
8634
  default:
8635
8635
  return;
8636
8636
  }
8637
- if (I === "abort") {
8637
+ if ($ === "abort") {
8638
8638
  u = _, N();
8639
8639
  return;
8640
8640
  }
8641
- if (P) {
8641
+ if (R) {
8642
8642
  u = _, m.length || (a.length ? A() : N());
8643
8643
  return;
8644
8644
  }
8645
8645
  if (x(), M(), !e.random) {
8646
- const B = e.resources.indexOf(E.resource);
8647
- B !== -1 && B !== e.index && (e.index = B);
8646
+ const V = e.resources.indexOf(E.resource);
8647
+ V !== -1 && V !== e.index && (e.index = V);
8648
8648
  }
8649
- o = "completed", h.forEach((B) => {
8650
- B(_);
8649
+ o = "completed", h.forEach((V) => {
8650
+ V(_);
8651
8651
  });
8652
8652
  }
8653
8653
  function A() {
@@ -8664,14 +8664,14 @@ function mh(e, t, n, r) {
8664
8664
  N();
8665
8665
  return;
8666
8666
  }
8667
- const I = {
8667
+ const $ = {
8668
8668
  status: "pending",
8669
8669
  resource: E,
8670
- callback: (_, P) => {
8671
- S(I, _, P);
8670
+ callback: (_, R) => {
8671
+ S($, _, R);
8672
8672
  }
8673
8673
  };
8674
- m.push(I), d++, f = setTimeout(A, e.rotate), n(E, t, I.callback);
8674
+ m.push($), d++, f = setTimeout(A, e.rotate), n(E, t, $.callback);
8675
8675
  }
8676
8676
  return setTimeout(A), v;
8677
8677
  }
@@ -9124,7 +9124,7 @@ function Jl(e) {
9124
9124
  });
9125
9125
  } else b && ((h = e.onLoad) === null || h === void 0 || h.call(e, x));
9126
9126
  }
9127
- Ue(() => (n(!0), o), []), Ue(() => {
9127
+ _e(() => (n(!0), o), []), _e(() => {
9128
9128
  t && u();
9129
9129
  }, [e.icon, t]);
9130
9130
  const { name: f, data: m } = a;
@@ -9149,7 +9149,7 @@ const Er = ({
9149
9149
  }) => /* @__PURE__ */ g("div", { className: "flex items-center gap-2 text-sm text-gray-600", "data-testid": n, children: [
9150
9150
  /* @__PURE__ */ c(U, { icon: e, width: 20, className: "text-default-500" }),
9151
9151
  /* @__PURE__ */ c("span", { children: t })
9152
- ] }), Sg = ({
9152
+ ] }), Mg = ({
9153
9153
  classes: e = "",
9154
9154
  name: t,
9155
9155
  imageUrl: n,
@@ -9163,7 +9163,7 @@ const Er = ({
9163
9163
  labels: u
9164
9164
  }) => {
9165
9165
  const [f, m] = j(!1), [h, x] = j(!1), b = ft(null);
9166
- return Ue(() => {
9166
+ return _e(() => {
9167
9167
  const y = () => {
9168
9168
  if (b.current) {
9169
9169
  const v = b.current.scrollHeight > b.current.clientHeight;
@@ -9193,7 +9193,7 @@ const Er = ({
9193
9193
  ),
9194
9194
  /* @__PURE__ */ c("h2", { className: "font-semibold text-xl text-gray-800", "data-testid": "event-details-title", children: t })
9195
9195
  ] }),
9196
- /* @__PURE__ */ g(_e, { className: "py-3 space-y-3", "data-testid": "event-details-body", children: [
9196
+ /* @__PURE__ */ g(Be, { className: "py-3 space-y-3", "data-testid": "event-details-body", children: [
9197
9197
  /* @__PURE__ */ c("h3", { className: "font-semibold text-base text-gray-700", "data-testid": "event-details-info-label", children: u.eventInformation }),
9198
9198
  /* @__PURE__ */ g("div", { className: "flex flex-wrap gap-4", "data-testid": "event-details-info", children: [
9199
9199
  r && /* @__PURE__ */ c(Er, { icon: "solar:calendar-minimalistic-linear", testId: "event-details-date", children: r }),
@@ -9223,7 +9223,7 @@ const Er = ({
9223
9223
  )
9224
9224
  ] }),
9225
9225
  (h || f) && /* @__PURE__ */ c("div", { className: "flex justify-end mt-1", children: /* @__PURE__ */ c(
9226
- q,
9226
+ W,
9227
9227
  {
9228
9228
  onPress: () => m(!f),
9229
9229
  variant: "light",
@@ -9255,7 +9255,7 @@ function Fh(e, t = "en-US", n = "USD") {
9255
9255
  return console.warn(`Invalid currency formatting: ${r}`), `${n} ${e.toFixed(2)}`;
9256
9256
  }
9257
9257
  }
9258
- function Cg(e) {
9258
+ function Eg(e) {
9259
9259
  const t = e.replace(/[^\d.,-]/g, ""), n = t.match(/,\d{1,2}$/);
9260
9260
  let r;
9261
9261
  n ? r = t.replace(/\./g, "").replace(",", ".") : r = t.replace(/,/g, "");
@@ -9288,11 +9288,11 @@ const Ph = {
9288
9288
  "data-testid": y,
9289
9289
  selectedColor: v = "default"
9290
9290
  }) => {
9291
- const N = { ...Ph, ...a }, [M, S] = j(n), A = t !== void 0 ? t : M, E = (ae) => {
9291
+ const N = { ...Ph, ...a }, [M, S] = j(n), A = t !== void 0 ? t : M, E = (le) => {
9292
9292
  if (o) return;
9293
- const me = Math.max(0, A + ae);
9293
+ const me = Math.max(0, A + le);
9294
9294
  t === void 0 && S(me), r?.(e.id, me);
9295
- }, I = Se(() => !kn(e.totalTicketsSold) || !kn(e.ticketsAllowed) ? !1 : e.totalTicketsSold >= e.ticketsAllowed, [e.totalTicketsSold, e.ticketsAllowed]), _ = Se(() => I || !kn(e.ticketsAllowed) ? !1 : A >= e.ticketsAllowed - (e.totalTicketsSold ?? 0), [I, e.ticketsAllowed, e.totalTicketsSold, A]), P = Fh(e.price, s, i), B = () => l?.renderName ? l.renderName(e.name, e) : /* @__PURE__ */ c("h2", { "data-testid": "offer-card-name", className: k("text-base font-medium", b.name), children: e.name }), $ = () => x ? l?.renderPrice ? l.renderPrice(e.price, P, e) : /* @__PURE__ */ c("p", { "data-testid": "offer-card-price", className: k("text-primary text-base mt-1", b.price), children: P }) : null, T = () => !m || !e.description ? null : l?.renderDescription ? l.renderDescription(e.description, e) : /* @__PURE__ */ c(
9295
+ }, $ = Se(() => !kn(e.totalTicketsSold) || !kn(e.ticketsAllowed) ? !1 : e.totalTicketsSold >= e.ticketsAllowed, [e.totalTicketsSold, e.ticketsAllowed]), _ = Se(() => $ || !kn(e.ticketsAllowed) ? !1 : A >= e.ticketsAllowed - (e.totalTicketsSold ?? 0), [$, e.ticketsAllowed, e.totalTicketsSold, A]), R = Fh(e.price, s, i), V = () => l?.renderName ? l.renderName(e.name, e) : /* @__PURE__ */ c("h2", { "data-testid": "offer-card-name", className: k("text-base font-medium", b.name), children: e.name }), T = () => x ? l?.renderPrice ? l.renderPrice(e.price, R, e) : /* @__PURE__ */ c("p", { "data-testid": "offer-card-price", className: k("text-primary text-base mt-1", b.price), children: R }) : null, D = () => !m || !e.description ? null : l?.renderDescription ? l.renderDescription(e.description, e) : /* @__PURE__ */ c(
9296
9296
  "p",
9297
9297
  {
9298
9298
  "data-testid": "offer-card-description",
@@ -9302,8 +9302,8 @@ const Ph = {
9302
9302
  ), L = () => {
9303
9303
  if (!h || !kn(e.numberOfPeople) || e.numberOfPeople <= 0)
9304
9304
  return null;
9305
- const ae = e.numberOfPeople === 1 ? N.person : N.people;
9306
- return l?.renderPeopleCount ? l.renderPeopleCount(e.numberOfPeople, ae, e) : /* @__PURE__ */ g(
9305
+ const le = e.numberOfPeople === 1 ? N.person : N.people;
9306
+ return l?.renderPeopleCount ? l.renderPeopleCount(e.numberOfPeople, le, e) : /* @__PURE__ */ g(
9307
9307
  "p",
9308
9308
  {
9309
9309
  "data-testid": "offer-card-people-count",
@@ -9319,26 +9319,26 @@ const Ph = {
9319
9319
  ),
9320
9320
  e.numberOfPeople,
9321
9321
  " ",
9322
- ae
9322
+ le
9323
9323
  ]
9324
9324
  }
9325
9325
  );
9326
- }, z = () => {
9327
- const ae = A === 0 || o, me = _ || o;
9326
+ }, P = () => {
9327
+ const le = A === 0 || o, me = _ || o;
9328
9328
  return l?.renderQuantitySelector ? l.renderQuantitySelector({
9329
9329
  quantity: A,
9330
9330
  onIncrement: () => E(1),
9331
9331
  onDecrement: () => E(-1),
9332
- isDecrementDisabled: ae,
9332
+ isDecrementDisabled: le,
9333
9333
  isIncrementDisabled: me,
9334
9334
  isDisabled: o
9335
9335
  }) : /* @__PURE__ */ g("div", { className: k("flex items-center gap-2", b.quantitySelector), children: [
9336
9336
  /* @__PURE__ */ c(
9337
- q,
9337
+ W,
9338
9338
  {
9339
9339
  "data-testid": "offer-card-decrement-button",
9340
9340
  onPress: () => E(-1),
9341
- isDisabled: ae,
9341
+ isDisabled: le,
9342
9342
  variant: d,
9343
9343
  color: A > 0 ? v : u,
9344
9344
  radius: "full",
@@ -9350,7 +9350,7 @@ const Ph = {
9350
9350
  ),
9351
9351
  /* @__PURE__ */ c("span", { "data-testid": "offer-card-quantity", className: k("min-w-[2rem] text-center font-medium"), children: A }),
9352
9352
  /* @__PURE__ */ c(
9353
- q,
9353
+ W,
9354
9354
  {
9355
9355
  "data-testid": "offer-card-increment-button",
9356
9356
  onPress: () => E(1),
@@ -9374,7 +9374,7 @@ const Ph = {
9374
9374
  startContent: /* @__PURE__ */ c(U, { icon: "gravity-ui:circle-info-fill", width: 14 }),
9375
9375
  children: /* @__PURE__ */ c("span", { className: "font-medium text-sm", children: N.soldOut })
9376
9376
  }
9377
- ), Z = () => l?.renderMaxReachedAlert ? l.renderMaxReachedAlert(N.maxReached) : /* @__PURE__ */ c(
9377
+ ), X = () => l?.renderMaxReachedAlert ? l.renderMaxReachedAlert(N.maxReached) : /* @__PURE__ */ c(
9378
9378
  rn,
9379
9379
  {
9380
9380
  "data-testid": "offer-card-max-reached-chip",
@@ -9389,25 +9389,25 @@ const Ph = {
9389
9389
  children: /* @__PURE__ */ c("span", { className: "font-medium text-sm", children: N.maxReached })
9390
9390
  }
9391
9391
  ), J = /* @__PURE__ */ g("div", { className: "grid grid-cols-1 md:grid-cols-1 xl:grid-cols-3 lg:grid-cols-3 gap-2 items-start", children: [
9392
- /* @__PURE__ */ g("div", { className: k("h-full col-span-2", I ? "opacity-50 pointer-events-none select-none" : ""), children: [
9393
- B(),
9394
- $(),
9392
+ /* @__PURE__ */ g("div", { className: k("h-full col-span-2", $ ? "opacity-50 pointer-events-none select-none" : ""), children: [
9393
+ V(),
9394
+ T(),
9395
9395
  /* @__PURE__ */ g(
9396
9396
  "div",
9397
9397
  {
9398
9398
  className: k(
9399
9399
  "md:col-span-1 xl:col-span-2 lg:col-span-1 mb-2",
9400
- I ? "opacity-50 pointer-events-none select-none" : ""
9400
+ $ ? "opacity-50 pointer-events-none select-none" : ""
9401
9401
  ),
9402
9402
  children: [
9403
9403
  L(),
9404
- T()
9404
+ D()
9405
9405
  ]
9406
9406
  }
9407
9407
  )
9408
9408
  ] }),
9409
- /* @__PURE__ */ c("div", { className: "space-x-2 pt-0 pb-2 md:p-2 h-full flex items-center justify-start md:justify-start lg:justify-end", children: I ? K() : z() })
9410
- ] }), ce = _ && !I && /* @__PURE__ */ c(
9409
+ /* @__PURE__ */ c("div", { className: "space-x-2 pt-0 pb-2 md:p-2 h-full flex items-center justify-start md:justify-start lg:justify-end", children: $ ? K() : P() })
9410
+ ] }), ae = _ && !$ && /* @__PURE__ */ c(
9411
9411
  Ln.div,
9412
9412
  {
9413
9413
  className: "w-full sm:max-w-[60%] md:max-w-[60%] lg:max-w-[60%]",
@@ -9415,15 +9415,15 @@ const Ph = {
9415
9415
  animate: { opacity: 1, y: 0 },
9416
9416
  exit: { opacity: 0, y: 10 },
9417
9417
  transition: { duration: 0.3 },
9418
- children: Z()
9418
+ children: X()
9419
9419
  }
9420
9420
  );
9421
9421
  return f ? /* @__PURE__ */ g(Le, { className: k("w-full", b.base), "data-testid": y || `offer-card-${e.id}`, children: [
9422
- /* @__PURE__ */ c(_e, { className: k("pt-1 pb-0", b.body), children: J }),
9423
- /* @__PURE__ */ c(_r, { children: ce && /* @__PURE__ */ c(Yo, { className: k("w-full mt-0 pt-0", b.footer), children: ce }) })
9422
+ /* @__PURE__ */ c(Be, { className: k("pt-1 pb-0", b.body), children: J }),
9423
+ /* @__PURE__ */ c(_r, { children: ae && /* @__PURE__ */ c(Yo, { className: k("w-full mt-0 pt-0", b.footer), children: ae }) })
9424
9424
  ] }) : /* @__PURE__ */ g("div", { className: k("w-full", b.base), "data-testid": y || `offer-card-${e.id}`, children: [
9425
9425
  /* @__PURE__ */ c("div", { className: k("pt-1 pb-0", b.body), children: J }),
9426
- /* @__PURE__ */ c(_r, { children: ce && /* @__PURE__ */ c("div", { className: k("w-full mt-0 pt-0", b.footer), children: ce }) })
9426
+ /* @__PURE__ */ c(_r, { children: ae && /* @__PURE__ */ c("div", { className: k("w-full mt-0 pt-0", b.footer), children: ae }) })
9427
9427
  ] });
9428
9428
  };
9429
9429
  Yl.displayName = "OfferCard";
@@ -9437,7 +9437,7 @@ const zh = ({
9437
9437
  }) => {
9438
9438
  if (s) {
9439
9439
  const l = s();
9440
- return r ? /* @__PURE__ */ c(Le, { "data-testid": "offer-card-empty", className: k("w-full", i.base), children: /* @__PURE__ */ c(_e, { "data-testid": "offer-card-empty-body", children: l }) }) : /* @__PURE__ */ c("div", { "data-testid": "offer-card-empty", className: k("w-full", i.base), children: l });
9440
+ return r ? /* @__PURE__ */ c(Le, { "data-testid": "offer-card-empty", className: k("w-full", i.base), children: /* @__PURE__ */ c(Be, { "data-testid": "offer-card-empty-body", children: l }) }) : /* @__PURE__ */ c("div", { "data-testid": "offer-card-empty", className: k("w-full", i.base), children: l });
9441
9441
  }
9442
9442
  const a = /* @__PURE__ */ g(
9443
9443
  "div",
@@ -9461,7 +9461,7 @@ const zh = ({
9461
9461
  ]
9462
9462
  }
9463
9463
  );
9464
- return r ? /* @__PURE__ */ c(Le, { "data-testid": "offer-card-empty", className: k("w-full", i.base), children: /* @__PURE__ */ c(_e, { "data-testid": "offer-card-empty-body", children: a }) }) : /* @__PURE__ */ c("div", { "data-testid": "offer-card-empty", className: k("w-full", i.base), children: a });
9464
+ return r ? /* @__PURE__ */ c(Le, { "data-testid": "offer-card-empty", className: k("w-full", i.base), children: /* @__PURE__ */ c(Be, { "data-testid": "offer-card-empty-body", children: a }) }) : /* @__PURE__ */ c("div", { "data-testid": "offer-card-empty", className: k("w-full", i.base), children: a });
9465
9465
  };
9466
9466
  zh.displayName = "OfferCardEmpty";
9467
9467
  const Rh = {
@@ -9484,7 +9484,7 @@ const Rh = {
9484
9484
  className: i.alert
9485
9485
  }
9486
9486
  );
9487
- return n ? /* @__PURE__ */ c(Le, { "data-testid": "offer-card-error", className: k("w-full", i.base), children: /* @__PURE__ */ c(_e, { "data-testid": "offer-card-error-body", children: a }) }) : /* @__PURE__ */ c("div", { "data-testid": "offer-card-error", className: k("w-full", i.base), children: a });
9487
+ return n ? /* @__PURE__ */ c(Le, { "data-testid": "offer-card-error", className: k("w-full", i.base), children: /* @__PURE__ */ c(Be, { "data-testid": "offer-card-error-body", children: a }) }) : /* @__PURE__ */ c("div", { "data-testid": "offer-card-error", className: k("w-full", i.base), children: a });
9488
9488
  };
9489
9489
  _h.displayName = "OfferCardError";
9490
9490
  const Bh = {
@@ -9520,7 +9520,7 @@ const Bh = {
9520
9520
  ] })
9521
9521
  }
9522
9522
  ),
9523
- /* @__PURE__ */ c(_e, { "data-testid": `offer-card-skeleton-body-${s}`, className: "pt-2 pb-0", children: /* @__PURE__ */ g("div", { className: "grid grid-cols-1 xl:grid-cols-3 gap-2 items-start", children: [
9523
+ /* @__PURE__ */ c(Be, { "data-testid": `offer-card-skeleton-body-${s}`, className: "pt-2 pb-0", children: /* @__PURE__ */ g("div", { className: "grid grid-cols-1 xl:grid-cols-3 gap-2 items-start", children: [
9524
9524
  /* @__PURE__ */ g("div", { className: "xl:col-span-2 space-y-2", children: [
9525
9525
  /* @__PURE__ */ c(
9526
9526
  ee,
@@ -9638,15 +9638,15 @@ const Hh = {
9638
9638
  classNames: b = {}
9639
9639
  }) => {
9640
9640
  const [y, v] = j(n), N = t !== void 0 ? t : y, M = te(
9641
- (_, P) => {
9642
- const B = {
9641
+ (_, R) => {
9642
+ const V = {
9643
9643
  ...N,
9644
- [_]: Math.max(0, P)
9644
+ [_]: Math.max(0, R)
9645
9645
  };
9646
- t === void 0 && v(B), r?.(B), i?.(_, B[_]);
9646
+ t === void 0 && v(V), r?.(V), i?.(_, V[_]);
9647
9647
  },
9648
9648
  [N, t, r, i]
9649
- ), S = [...e].sort((_, P) => (_.position ?? 0) - (P.position ?? 0)), A = qh[x], E = k("grid mx-auto pt-2", A, b.base), I = (_) => /* @__PURE__ */ c(
9649
+ ), S = [...e].sort((_, R) => (_.position ?? 0) - (R.position ?? 0)), A = qh[x], E = k("grid mx-auto pt-2", A, b.base), $ = (_) => /* @__PURE__ */ c(
9650
9650
  Yl,
9651
9651
  {
9652
9652
  offer: _,
@@ -9680,12 +9680,12 @@ const Hh = {
9680
9680
  variants: Uh,
9681
9681
  exit: { opacity: 0, y: -20 },
9682
9682
  transition: { duration: 0.3 },
9683
- children: I(_)
9683
+ children: $(_)
9684
9684
  },
9685
9685
  _.id
9686
9686
  )) })
9687
9687
  }
9688
- ) : /* @__PURE__ */ c("div", { "data-testid": "offer-card-list", className: E, children: S.map(I) });
9688
+ ) : /* @__PURE__ */ c("div", { "data-testid": "offer-card-list", className: E, children: S.map($) });
9689
9689
  };
9690
9690
  jh.displayName = "OfferCardList";
9691
9691
  var yn = (e) => e.type === "checkbox", Nt = (e) => e instanceof Date, $e = (e) => e == null;
@@ -9708,12 +9708,12 @@ function ge(e) {
9708
9708
  Object.prototype.hasOwnProperty.call(e, i) && (r[i] = ge(e[i]));
9709
9709
  return r;
9710
9710
  }
9711
- var ir = (e) => /^\w*$/.test(e), ue = (e) => e === void 0, Bi = (e) => Array.isArray(e) ? e.filter(Boolean) : [], Vi = (e) => Bi(e.replace(/["|']|\]/g, "").split(/\.|\[/)), F = (e, t, n) => {
9711
+ var ir = (e) => /^\w*$/.test(e), fe = (e) => e === void 0, Bi = (e) => Array.isArray(e) ? e.filter(Boolean) : [], Vi = (e) => Bi(e.replace(/["|']|\]/g, "").split(/\.|\[/)), F = (e, t, n) => {
9712
9712
  if (!t || !xe(e))
9713
9713
  return n;
9714
9714
  const r = (ir(t) ? [t] : Vi(t)).reduce((i, s) => $e(i) ? i : i[s], e);
9715
- return ue(r) || r === e ? ue(e[t]) ? n : e[t] : r;
9716
- }, Pe = (e) => typeof e == "boolean", De = (e) => typeof e == "function", oe = (e, t, n) => {
9715
+ return fe(r) || r === e ? fe(e[t]) ? n : e[t] : r;
9716
+ }, Pe = (e) => typeof e == "boolean", De = (e) => typeof e == "function", de = (e, t, n) => {
9717
9717
  let r = -1;
9718
9718
  const i = ir(t) ? [t] : Vi(t), s = i.length, a = s - 1;
9719
9719
  for (; ++r < s; ) {
@@ -9746,9 +9746,9 @@ const Wn = {
9746
9746
  pattern: "pattern",
9747
9747
  required: "required",
9748
9748
  validate: "validate"
9749
- }, Xl = V.createContext(null);
9749
+ }, Xl = B.createContext(null);
9750
9750
  Xl.displayName = "HookFormControlContext";
9751
- const Hi = () => V.useContext(Xl);
9751
+ const Hi = () => B.useContext(Xl);
9752
9752
  var eo = (e, t, n, r = !0) => {
9753
9753
  const i = {
9754
9754
  defaultValues: t._defaultValues
@@ -9762,9 +9762,9 @@ var eo = (e, t, n, r = !0) => {
9762
9762
  });
9763
9763
  return i;
9764
9764
  };
9765
- const Ui = typeof window < "u" ? V.useLayoutEffect : V.useEffect;
9765
+ const Ui = typeof window < "u" ? B.useLayoutEffect : B.useEffect;
9766
9766
  function Jh(e) {
9767
- const t = Hi(), { control: n = t, disabled: r, name: i, exact: s } = e || {}, [a, l] = V.useState(n._formState), o = V.useRef({
9767
+ const t = Hi(), { control: n = t, disabled: r, name: i, exact: s } = e || {}, [a, l] = B.useState(n._formState), o = B.useRef({
9768
9768
  isDirty: !1,
9769
9769
  isLoading: !1,
9770
9770
  dirtyFields: !1,
@@ -9784,9 +9784,9 @@ function Jh(e) {
9784
9784
  ...d
9785
9785
  });
9786
9786
  }
9787
- }), [i, r, s]), V.useEffect(() => {
9787
+ }), [i, r, s]), B.useEffect(() => {
9788
9788
  o.current.isValid && n._setValid(!0);
9789
- }, [n]), V.useMemo(() => eo(a, n, o.current, !1), [a, n]);
9789
+ }, [n]), B.useMemo(() => eo(a, n, o.current, !1), [a, n]);
9790
9790
  }
9791
9791
  var Re = (e) => typeof e == "string", ri = (e, t, n, r, i) => Re(e) ? (r && t.watch.add(e), F(n, e, i)) : Array.isArray(e) ? e.map((s) => (r && t.watch.add(s), F(n, s))) : (r && (t.watchAll = !0), n), ii = (e) => $e(e) || !Gl(e);
9792
9792
  function We(e, t, n = /* @__PURE__ */ new WeakSet()) {
@@ -9813,15 +9813,15 @@ function We(e, t, n = /* @__PURE__ */ new WeakSet()) {
9813
9813
  return !0;
9814
9814
  }
9815
9815
  function Yh(e) {
9816
- const t = Hi(), { control: n = t, name: r, defaultValue: i, disabled: s, exact: a, compute: l } = e || {}, o = V.useRef(i), d = V.useRef(l), u = V.useRef(void 0), f = V.useRef(n), m = V.useRef(r);
9816
+ const t = Hi(), { control: n = t, name: r, defaultValue: i, disabled: s, exact: a, compute: l } = e || {}, o = B.useRef(i), d = B.useRef(l), u = B.useRef(void 0), f = B.useRef(n), m = B.useRef(r);
9817
9817
  d.current = l;
9818
- const [h, x] = V.useState(() => {
9818
+ const [h, x] = B.useState(() => {
9819
9819
  const S = n._getWatch(r, o.current);
9820
9820
  return d.current ? d.current(S) : S;
9821
- }), b = V.useCallback((S) => {
9821
+ }), b = B.useCallback((S) => {
9822
9822
  const A = ri(r, n._names, S || n._formValues, !1, o.current);
9823
9823
  return d.current ? d.current(A) : A;
9824
- }, [n._formValues, n._names, r]), y = V.useCallback((S) => {
9824
+ }, [n._formValues, n._names, r]), y = B.useCallback((S) => {
9825
9825
  if (!s) {
9826
9826
  const A = ri(r, n._names, S || n._formValues, !1, o.current);
9827
9827
  if (d.current) {
@@ -9840,8 +9840,8 @@ function Yh(e) {
9840
9840
  callback: (S) => {
9841
9841
  y(S.values);
9842
9842
  }
9843
- })), [n, a, r, y]), V.useEffect(() => n._removeUnmounted());
9844
- const v = f.current !== n, N = m.current, M = V.useMemo(() => {
9843
+ })), [n, a, r, y]), B.useEffect(() => n._removeUnmounted());
9844
+ const v = f.current !== n, N = m.current, M = B.useMemo(() => {
9845
9845
  if (s)
9846
9846
  return null;
9847
9847
  const S = !v && !We(N, r);
@@ -9850,7 +9850,7 @@ function Yh(e) {
9850
9850
  return M !== null ? M : h;
9851
9851
  }
9852
9852
  function Gh(e) {
9853
- const t = Hi(), { name: n, disabled: r, control: i = t, shouldUnregister: s, defaultValue: a, exact: l = !0 } = e, o = Zl(i._names.array, n), d = V.useMemo(() => F(i._formValues, n, F(i._defaultValues, n, a)), [i, n, a]), u = Yh({
9853
+ const t = Hi(), { name: n, disabled: r, control: i = t, shouldUnregister: s, defaultValue: a, exact: l = !0 } = e, o = Zl(i._names.array, n), d = B.useMemo(() => F(i._formValues, n, F(i._defaultValues, n, a)), [i, n, a]), u = Yh({
9854
9854
  control: i,
9855
9855
  name: n,
9856
9856
  defaultValue: d,
@@ -9859,13 +9859,13 @@ function Gh(e) {
9859
9859
  control: i,
9860
9860
  name: n,
9861
9861
  exact: l
9862
- }), m = V.useRef(e), h = V.useRef(void 0), x = V.useRef(i.register(n, {
9862
+ }), m = B.useRef(e), h = B.useRef(void 0), x = B.useRef(i.register(n, {
9863
9863
  ...e.rules,
9864
9864
  value: u,
9865
9865
  ...Pe(e.disabled) ? { disabled: e.disabled } : {}
9866
9866
  }));
9867
9867
  m.current = e;
9868
- const b = V.useMemo(() => Object.defineProperties({}, {
9868
+ const b = B.useMemo(() => Object.defineProperties({}, {
9869
9869
  invalid: {
9870
9870
  enumerable: !0,
9871
9871
  get: () => !!F(f.errors, n)
@@ -9886,19 +9886,19 @@ function Gh(e) {
9886
9886
  enumerable: !0,
9887
9887
  get: () => F(f.errors, n)
9888
9888
  }
9889
- }), [f, n]), y = V.useCallback((S) => x.current.onChange({
9889
+ }), [f, n]), y = B.useCallback((S) => x.current.onChange({
9890
9890
  target: {
9891
9891
  value: Ql(S),
9892
9892
  name: n
9893
9893
  },
9894
9894
  type: Wn.CHANGE
9895
- }), [n]), v = V.useCallback(() => x.current.onBlur({
9895
+ }), [n]), v = B.useCallback(() => x.current.onBlur({
9896
9896
  target: {
9897
9897
  value: F(i._formValues, n),
9898
9898
  name: n
9899
9899
  },
9900
9900
  type: Wn.BLUR
9901
- }), [n, i._formValues]), N = V.useCallback((S) => {
9901
+ }), [n, i._formValues]), N = B.useCallback((S) => {
9902
9902
  const A = F(i._fields, n);
9903
9903
  A && A._f && S && (A._f.ref = {
9904
9904
  focus: () => De(S.focus) && S.focus(),
@@ -9906,7 +9906,7 @@ function Gh(e) {
9906
9906
  setCustomValidity: (E) => De(S.setCustomValidity) && S.setCustomValidity(E),
9907
9907
  reportValidity: () => De(S.reportValidity) && S.reportValidity()
9908
9908
  });
9909
- }, [i._fields, n]), M = V.useMemo(() => ({
9909
+ }, [i._fields, n]), M = B.useMemo(() => ({
9910
9910
  name: n,
9911
9911
  value: u,
9912
9912
  ...Pe(r) || f.disabled ? { disabled: f.disabled || r } : {},
@@ -9914,35 +9914,35 @@ function Gh(e) {
9914
9914
  onBlur: v,
9915
9915
  ref: N
9916
9916
  }), [n, r, f.disabled, y, v, N, u]);
9917
- return V.useEffect(() => {
9917
+ return B.useEffect(() => {
9918
9918
  const S = i._options.shouldUnregister || s, A = h.current;
9919
9919
  A && A !== n && !o && i.unregister(A), i.register(n, {
9920
9920
  ...m.current.rules,
9921
9921
  ...Pe(m.current.disabled) ? { disabled: m.current.disabled } : {}
9922
9922
  });
9923
- const E = (I, _) => {
9924
- const P = F(i._fields, I);
9925
- P && P._f && (P._f.mount = _);
9923
+ const E = ($, _) => {
9924
+ const R = F(i._fields, $);
9925
+ R && R._f && (R._f.mount = _);
9926
9926
  };
9927
9927
  if (E(n, !0), S) {
9928
- const I = ge(F(i._options.defaultValues, n, m.current.defaultValue));
9929
- oe(i._defaultValues, n, I), ue(F(i._formValues, n)) && oe(i._formValues, n, I);
9928
+ const $ = ge(F(i._options.defaultValues, n, m.current.defaultValue));
9929
+ de(i._defaultValues, n, $), fe(F(i._formValues, n)) && de(i._formValues, n, $);
9930
9930
  }
9931
9931
  return !o && i.register(n), h.current = n, () => {
9932
9932
  (o ? S && !i._state.action : S) ? i.unregister(n) : E(n, !1);
9933
9933
  };
9934
- }, [n, i, o, s]), V.useEffect(() => {
9934
+ }, [n, i, o, s]), B.useEffect(() => {
9935
9935
  i._setDisabledField({
9936
9936
  disabled: r,
9937
9937
  name: n
9938
9938
  });
9939
- }, [r, n, i]), V.useMemo(() => ({
9939
+ }, [r, n, i]), B.useMemo(() => ({
9940
9940
  field: M,
9941
9941
  formState: f,
9942
9942
  fieldState: b
9943
9943
  }), [M, f, b]);
9944
9944
  }
9945
- const Qh = V.createContext(null);
9945
+ const Qh = B.createContext(null);
9946
9946
  Qh.displayName = "HookFormContext";
9947
9947
  var Zh = (e, t, n, r, i) => t ? {
9948
9948
  ...n[e],
@@ -9992,12 +9992,12 @@ function em(e, t) {
9992
9992
  const n = t.slice(0, -1).length;
9993
9993
  let r = 0;
9994
9994
  for (; r < n; )
9995
- e = ue(e) ? r++ : e[t[r++]];
9995
+ e = fe(e) ? r++ : e[t[r++]];
9996
9996
  return e;
9997
9997
  }
9998
9998
  function tm(e) {
9999
9999
  for (const t in e)
10000
- if (e.hasOwnProperty(t) && !ue(e[t]))
10000
+ if (e.hasOwnProperty(t) && !fe(e[t]))
10001
10001
  return !1;
10002
10002
  return !0;
10003
10003
  }
@@ -10017,7 +10017,7 @@ function ro(e) {
10017
10017
  function si(e, t = {}) {
10018
10018
  for (const n in e) {
10019
10019
  const r = e[n];
10020
- ro(r) ? (t[n] = Array.isArray(r) ? [] : {}, si(r, t[n])) : ue(r) || (t[n] = !0);
10020
+ ro(r) ? (t[n] = Array.isArray(r) ? [] : {}, si(r, t[n])) : fe(r) || (t[n] = !0);
10021
10021
  }
10022
10022
  return t;
10023
10023
  }
@@ -10026,7 +10026,7 @@ function Ft(e, t, n) {
10026
10026
  for (const r in e) {
10027
10027
  const i = e[r];
10028
10028
  if (ro(i))
10029
- ue(t) || ii(n[r]) ? n[r] = si(i, Array.isArray(i) ? [] : {}) : Ft(i, $e(t) ? {} : t[r], n[r]);
10029
+ fe(t) || ii(n[r]) ? n[r] = si(i, Array.isArray(i) ? [] : {}) : Ft(i, $e(t) ? {} : t[r], n[r]);
10030
10030
  else {
10031
10031
  const s = t[r];
10032
10032
  n[r] = !We(i, s);
@@ -10046,11 +10046,11 @@ var io = (e) => {
10046
10046
  }
10047
10047
  return e[0].checked && !e[0].disabled ? (
10048
10048
  // @ts-expect-error expected to work in the browser
10049
- e[0].attributes && !ue(e[0].attributes.value) ? ue(e[0].value) || e[0].value === "" ? sa : { value: e[0].value, isValid: !0 } : sa
10049
+ e[0].attributes && !fe(e[0].attributes.value) ? fe(e[0].value) || e[0].value === "" ? sa : { value: e[0].value, isValid: !0 } : sa
10050
10050
  ) : ia;
10051
10051
  }
10052
10052
  return ia;
10053
- }, so = (e, { valueAsNumber: t, valueAsDate: n, setValueAs: r }) => ue(e) ? e : t ? e === "" ? NaN : e && +e : n && Re(e) ? new Date(e) : r ? r(e) : e;
10053
+ }, so = (e, { valueAsNumber: t, valueAsDate: n, setValueAs: r }) => fe(e) ? e : t ? e === "" ? NaN : e && +e : n && Re(e) ? new Date(e) : r ? r(e) : e;
10054
10054
  const aa = {
10055
10055
  isValid: !1,
10056
10056
  value: null
@@ -10061,13 +10061,13 @@ var ao = (e) => Array.isArray(e) ? e.reduce((t, n) => n && n.checked && !n.disab
10061
10061
  } : t, aa) : aa;
10062
10062
  function la(e) {
10063
10063
  const t = e.ref;
10064
- return qi(t) ? t.files : ji(t) ? ao(e.refs).value : no(t) ? [...t.selectedOptions].map(({ value: n }) => n) : yn(t) ? io(e.refs).value : so(ue(t.value) ? e.ref.value : t.value, e);
10064
+ return qi(t) ? t.files : ji(t) ? ao(e.refs).value : no(t) ? [...t.selectedOptions].map(({ value: n }) => n) : yn(t) ? io(e.refs).value : so(fe(t.value) ? e.ref.value : t.value, e);
10065
10065
  }
10066
10066
  var rm = (e, t, n, r) => {
10067
10067
  const i = {};
10068
10068
  for (const s of e) {
10069
10069
  const a = F(t, s);
10070
- a && oe(i, s, a._f);
10070
+ a && de(i, s, a._f);
10071
10071
  }
10072
10072
  return {
10073
10073
  criteriaMode: n,
@@ -10075,7 +10075,7 @@ var rm = (e, t, n, r) => {
10075
10075
  fields: i,
10076
10076
  shouldUseNativeValidation: r
10077
10077
  };
10078
- }, Jn = (e) => e instanceof RegExp, Jt = (e) => ue(e) ? e : Jn(e) ? e.source : xe(e) ? Jn(e.value) ? e.value.source : e.value : e, oa = (e) => ({
10078
+ }, Jn = (e) => e instanceof RegExp, Jt = (e) => fe(e) ? e : Jn(e) ? e.source : xe(e) ? Jn(e.value) ? e.value.source : e.value : e, oa = (e) => ({
10079
10079
  isOnSubmit: !e || e === je.onSubmit,
10080
10080
  isOnBlur: e === je.onBlur,
10081
10081
  isOnChange: e === je.onChange,
@@ -10135,7 +10135,7 @@ var am = (e, t, n, r) => {
10135
10135
  return Ee(s) || Object.keys(s).length >= Object.keys(t).length || Object.keys(s).find((a) => t[a] === (!r || je.all));
10136
10136
  }, lm = (e, t, n) => !e || !t || e === t || en(e).some((r) => r && (n ? r === t : r.startsWith(t) || t.startsWith(r))), om = (e, t, n, r, i) => i.isOnAll ? !1 : !n && i.isOnTouch ? !(t || e) : (n ? r.isOnBlur : i.isOnBlur) ? !e : (n ? r.isOnChange : i.isOnChange) ? e : !0, cm = (e, t) => !Bi(F(e, t)).length && ye(e, t), dm = (e, t, n) => {
10137
10137
  const r = en(F(e, n));
10138
- return oe(r, "root", t[n]), oe(e, n, r), e;
10138
+ return de(r, "root", t[n]), de(e, n, r), e;
10139
10139
  };
10140
10140
  function fa(e, t, n = "validate") {
10141
10141
  if (Re(e) || Array.isArray(e) && e.every(Re) || Pe(e) && !e)
@@ -10152,77 +10152,77 @@ var It = (e) => xe(e) && !Jn(e) ? e : {
10152
10152
  const { ref: a, refs: l, required: o, maxLength: d, minLength: u, min: f, max: m, pattern: h, validate: x, name: b, valueAsNumber: y, mount: v } = e._f, N = F(n, b);
10153
10153
  if (!v || t.has(b))
10154
10154
  return {};
10155
- const M = l ? l[0] : a, S = (T) => {
10156
- i && M.reportValidity && (M.setCustomValidity(Pe(T) ? "" : T || ""), M.reportValidity());
10157
- }, A = {}, E = ji(a), I = yn(a), _ = E || I, P = (y || qi(a)) && ue(a.value) && ue(N) || Kn(a) && a.value === "" || N === "" || Array.isArray(N) && !N.length, B = Zh.bind(null, b, r, A), $ = (T, L, z, K = et.maxLength, Z = et.minLength) => {
10158
- const J = T ? L : z;
10155
+ const M = l ? l[0] : a, S = (D) => {
10156
+ i && M.reportValidity && (M.setCustomValidity(Pe(D) ? "" : D || ""), M.reportValidity());
10157
+ }, A = {}, E = ji(a), $ = yn(a), _ = E || $, R = (y || qi(a)) && fe(a.value) && fe(N) || Kn(a) && a.value === "" || N === "" || Array.isArray(N) && !N.length, V = Zh.bind(null, b, r, A), T = (D, L, P, K = et.maxLength, X = et.minLength) => {
10158
+ const J = D ? L : P;
10159
10159
  A[b] = {
10160
- type: T ? K : Z,
10160
+ type: D ? K : X,
10161
10161
  message: J,
10162
10162
  ref: a,
10163
- ...B(T ? K : Z, J)
10163
+ ...V(D ? K : X, J)
10164
10164
  };
10165
10165
  };
10166
- if (s ? !Array.isArray(N) || !N.length : o && (!_ && (P || $e(N)) || Pe(N) && !N || I && !io(l).isValid || E && !ao(l).isValid)) {
10167
- const { value: T, message: L } = Re(o) ? { value: !!o, message: o } : It(o);
10168
- if (T && (A[b] = {
10166
+ if (s ? !Array.isArray(N) || !N.length : o && (!_ && (R || $e(N)) || Pe(N) && !N || $ && !io(l).isValid || E && !ao(l).isValid)) {
10167
+ const { value: D, message: L } = Re(o) ? { value: !!o, message: o } : It(o);
10168
+ if (D && (A[b] = {
10169
10169
  type: et.required,
10170
10170
  message: L,
10171
10171
  ref: M,
10172
- ...B(et.required, L)
10172
+ ...V(et.required, L)
10173
10173
  }, !r))
10174
10174
  return S(L), A;
10175
10175
  }
10176
- if (!P && (!$e(f) || !$e(m))) {
10177
- let T, L;
10178
- const z = It(m), K = It(f);
10176
+ if (!R && (!$e(f) || !$e(m))) {
10177
+ let D, L;
10178
+ const P = It(m), K = It(f);
10179
10179
  if (!$e(N) && !isNaN(N)) {
10180
- const Z = a.valueAsNumber || N && +N;
10181
- $e(z.value) || (T = Z > z.value), $e(K.value) || (L = Z < K.value);
10180
+ const X = a.valueAsNumber || N && +N;
10181
+ $e(P.value) || (D = X > P.value), $e(K.value) || (L = X < K.value);
10182
10182
  } else {
10183
- const Z = a.valueAsDate || new Date(N), J = (me) => /* @__PURE__ */ new Date((/* @__PURE__ */ new Date()).toDateString() + " " + me), ce = a.type == "time", ae = a.type == "week";
10184
- Re(z.value) && N && (T = ce ? J(N) > J(z.value) : ae ? N > z.value : Z > new Date(z.value)), Re(K.value) && N && (L = ce ? J(N) < J(K.value) : ae ? N < K.value : Z < new Date(K.value));
10183
+ const X = a.valueAsDate || new Date(N), J = (me) => /* @__PURE__ */ new Date((/* @__PURE__ */ new Date()).toDateString() + " " + me), ae = a.type == "time", le = a.type == "week";
10184
+ Re(P.value) && N && (D = ae ? J(N) > J(P.value) : le ? N > P.value : X > new Date(P.value)), Re(K.value) && N && (L = ae ? J(N) < J(K.value) : le ? N < K.value : X < new Date(K.value));
10185
10185
  }
10186
- if ((T || L) && ($(!!T, z.message, K.message, et.max, et.min), !r))
10186
+ if ((D || L) && (T(!!D, P.message, K.message, et.max, et.min), !r))
10187
10187
  return S(A[b].message), A;
10188
10188
  }
10189
- if ((d || u) && !P && (Re(N) || s && Array.isArray(N))) {
10190
- const T = It(d), L = It(u), z = !$e(T.value) && N.length > +T.value, K = !$e(L.value) && N.length < +L.value;
10191
- if ((z || K) && ($(z, T.message, L.message), !r))
10189
+ if ((d || u) && !R && (Re(N) || s && Array.isArray(N))) {
10190
+ const D = It(d), L = It(u), P = !$e(D.value) && N.length > +D.value, K = !$e(L.value) && N.length < +L.value;
10191
+ if ((P || K) && (T(P, D.message, L.message), !r))
10192
10192
  return S(A[b].message), A;
10193
10193
  }
10194
- if (h && !P && Re(N)) {
10195
- const { value: T, message: L } = It(h);
10196
- if (Jn(T) && !N.match(T) && (A[b] = {
10194
+ if (h && !R && Re(N)) {
10195
+ const { value: D, message: L } = It(h);
10196
+ if (Jn(D) && !N.match(D) && (A[b] = {
10197
10197
  type: et.pattern,
10198
10198
  message: L,
10199
10199
  ref: a,
10200
- ...B(et.pattern, L)
10200
+ ...V(et.pattern, L)
10201
10201
  }, !r))
10202
10202
  return S(L), A;
10203
10203
  }
10204
10204
  if (x) {
10205
10205
  if (De(x)) {
10206
- const T = await x(N, n), L = fa(T, M);
10206
+ const D = await x(N, n), L = fa(D, M);
10207
10207
  if (L && (A[b] = {
10208
10208
  ...L,
10209
- ...B(et.validate, L.message)
10209
+ ...V(et.validate, L.message)
10210
10210
  }, !r))
10211
10211
  return S(L.message), A;
10212
10212
  } else if (xe(x)) {
10213
- let T = {};
10213
+ let D = {};
10214
10214
  for (const L in x) {
10215
- if (!Ee(T) && !r)
10215
+ if (!Ee(D) && !r)
10216
10216
  break;
10217
- const z = fa(await x[L](N, n), M, L);
10218
- z && (T = {
10219
- ...z,
10220
- ...B(L, z.message)
10221
- }, S(z.message), r && (A[b] = T));
10217
+ const P = fa(await x[L](N, n), M, L);
10218
+ P && (D = {
10219
+ ...P,
10220
+ ...V(L, P.message)
10221
+ }, S(P.message), r && (A[b] = D));
10222
10222
  }
10223
- if (!Ee(T) && (A[b] = {
10223
+ if (!Ee(D) && (A[b] = {
10224
10224
  ref: M,
10225
- ...T
10225
+ ...D
10226
10226
  }, !r))
10227
10227
  return A;
10228
10228
  }
@@ -10287,42 +10287,42 @@ function fm(e = {}) {
10287
10287
  }, y = async (p) => {
10288
10288
  if (!a.keepIsValid && !t.disabled && (f.isValid || m.isValid || p)) {
10289
10289
  let w;
10290
- t.resolver ? (w = Ee((await _()).errors), v()) : w = await B(r, !0), w !== n.isValid && h.state.next({
10290
+ t.resolver ? (w = Ee((await _()).errors), v()) : w = await V(r, !0), w !== n.isValid && h.state.next({
10291
10291
  isValid: w
10292
10292
  });
10293
10293
  }
10294
10294
  }, v = (p, w) => {
10295
10295
  !t.disabled && (f.isValidating || f.validatingFields || m.isValidating || m.validatingFields) && ((p || Array.from(l.mount)).forEach((C) => {
10296
- C && (w ? oe(n.validatingFields, C, w) : ye(n.validatingFields, C));
10296
+ C && (w ? de(n.validatingFields, C, w) : ye(n.validatingFields, C));
10297
10297
  }), h.state.next({
10298
10298
  validatingFields: n.validatingFields,
10299
10299
  isValidating: !Ee(n.validatingFields)
10300
10300
  }));
10301
- }, N = (p, w = [], C, R, O = !0, D = !0) => {
10302
- if (R && C && !t.disabled) {
10303
- if (a.action = !0, D && Array.isArray(F(r, p))) {
10304
- const H = C(F(r, p), R.argA, R.argB);
10305
- O && oe(r, p, H);
10301
+ }, N = (p, w = [], C, z, O = !0, I = !0) => {
10302
+ if (z && C && !t.disabled) {
10303
+ if (a.action = !0, I && Array.isArray(F(r, p))) {
10304
+ const H = C(F(r, p), z.argA, z.argB);
10305
+ O && de(r, p, H);
10306
10306
  }
10307
- if (D && Array.isArray(F(n.errors, p))) {
10308
- const H = C(F(n.errors, p), R.argA, R.argB);
10309
- O && oe(n.errors, p, H), cm(n.errors, p);
10307
+ if (I && Array.isArray(F(n.errors, p))) {
10308
+ const H = C(F(n.errors, p), z.argA, z.argB);
10309
+ O && de(n.errors, p, H), cm(n.errors, p);
10310
10310
  }
10311
- if ((f.touchedFields || m.touchedFields) && D && Array.isArray(F(n.touchedFields, p))) {
10312
- const H = C(F(n.touchedFields, p), R.argA, R.argB);
10313
- O && oe(n.touchedFields, p, H);
10311
+ if ((f.touchedFields || m.touchedFields) && I && Array.isArray(F(n.touchedFields, p))) {
10312
+ const H = C(F(n.touchedFields, p), z.argA, z.argB);
10313
+ O && de(n.touchedFields, p, H);
10314
10314
  }
10315
10315
  (f.dirtyFields || m.dirtyFields) && (n.dirtyFields = Ft(i, s)), h.state.next({
10316
10316
  name: p,
10317
- isDirty: T(p, w),
10317
+ isDirty: D(p, w),
10318
10318
  dirtyFields: n.dirtyFields,
10319
10319
  errors: n.errors,
10320
10320
  isValid: n.isValid
10321
10321
  });
10322
10322
  } else
10323
- oe(s, p, w);
10323
+ de(s, p, w);
10324
10324
  }, M = (p, w) => {
10325
- oe(n.errors, p, w), h.state.next({
10325
+ de(n.errors, p, w), h.state.next({
10326
10326
  errors: n.errors
10327
10327
  });
10328
10328
  }, S = (p) => {
@@ -10330,36 +10330,36 @@ function fm(e = {}) {
10330
10330
  errors: n.errors,
10331
10331
  isValid: !1
10332
10332
  });
10333
- }, A = (p, w, C, R) => {
10333
+ }, A = (p, w, C, z) => {
10334
10334
  const O = F(r, p);
10335
10335
  if (O) {
10336
- const D = F(s, p, ue(C) ? F(i, p) : C);
10337
- ue(D) || R && R.defaultChecked || w ? oe(s, p, w ? D : la(O._f)) : K(p, D), a.mount && !a.action && y();
10336
+ const I = F(s, p, fe(C) ? F(i, p) : C);
10337
+ fe(I) || z && z.defaultChecked || w ? de(s, p, w ? I : la(O._f)) : K(p, I), a.mount && !a.action && y();
10338
10338
  }
10339
- }, E = (p, w, C, R, O) => {
10340
- let D = !1, H = !1;
10339
+ }, E = (p, w, C, z, O) => {
10340
+ let I = !1, H = !1;
10341
10341
  const ne = {
10342
10342
  name: p
10343
10343
  };
10344
10344
  if (!t.disabled) {
10345
- if (!C || R) {
10346
- (f.isDirty || m.isDirty) && (H = n.isDirty, n.isDirty = ne.isDirty = T(), D = H !== ne.isDirty);
10345
+ if (!C || z) {
10346
+ (f.isDirty || m.isDirty) && (H = n.isDirty, n.isDirty = ne.isDirty = D(), I = H !== ne.isDirty);
10347
10347
  const re = We(F(i, p), w);
10348
- H = !!F(n.dirtyFields, p), re ? ye(n.dirtyFields, p) : oe(n.dirtyFields, p, !0), ne.dirtyFields = n.dirtyFields, D = D || (f.dirtyFields || m.dirtyFields) && H !== !re;
10348
+ H = !!F(n.dirtyFields, p), re ? ye(n.dirtyFields, p) : de(n.dirtyFields, p, !0), ne.dirtyFields = n.dirtyFields, I = I || (f.dirtyFields || m.dirtyFields) && H !== !re;
10349
10349
  }
10350
10350
  if (C) {
10351
10351
  const re = F(n.touchedFields, p);
10352
- re || (oe(n.touchedFields, p, C), ne.touchedFields = n.touchedFields, D = D || (f.touchedFields || m.touchedFields) && re !== C);
10352
+ re || (de(n.touchedFields, p, C), ne.touchedFields = n.touchedFields, I = I || (f.touchedFields || m.touchedFields) && re !== C);
10353
10353
  }
10354
- D && O && h.state.next(ne);
10354
+ I && O && h.state.next(ne);
10355
10355
  }
10356
- return D ? ne : {};
10357
- }, I = (p, w, C, R) => {
10358
- const O = F(n.errors, p), D = (f.isValid || m.isValid) && Pe(w) && n.isValid !== w;
10359
- if (t.delayError && C ? (o = b(() => M(p, C)), o(t.delayError)) : (clearTimeout(d), o = null, C ? oe(n.errors, p, C) : ye(n.errors, p)), (C ? !We(O, C) : O) || !Ee(R) || D) {
10356
+ return I ? ne : {};
10357
+ }, $ = (p, w, C, z) => {
10358
+ const O = F(n.errors, p), I = (f.isValid || m.isValid) && Pe(w) && n.isValid !== w;
10359
+ if (t.delayError && C ? (o = b(() => M(p, C)), o(t.delayError)) : (clearTimeout(d), o = null, C ? de(n.errors, p, C) : ye(n.errors, p)), (C ? !We(O, C) : O) || !Ee(z) || I) {
10360
10360
  const H = {
10361
- ...R,
10362
- ...D && Pe(w) ? { isValid: w } : {},
10361
+ ...z,
10362
+ ...I && Pe(w) ? { isValid: w } : {},
10363
10363
  errors: n.errors,
10364
10364
  name: p
10365
10365
  };
@@ -10368,73 +10368,73 @@ function fm(e = {}) {
10368
10368
  ...H
10369
10369
  }, h.state.next(H);
10370
10370
  }
10371
- }, _ = async (p) => (v(p, !0), await t.resolver(s, t.context, rm(p || l.mount, r, t.criteriaMode, t.shouldUseNativeValidation))), P = async (p) => {
10371
+ }, _ = async (p) => (v(p, !0), await t.resolver(s, t.context, rm(p || l.mount, r, t.criteriaMode, t.shouldUseNativeValidation))), R = async (p) => {
10372
10372
  const { errors: w } = await _(p);
10373
10373
  if (v(p), p)
10374
10374
  for (const C of p) {
10375
- const R = F(w, C);
10376
- R ? oe(n.errors, C, R) : ye(n.errors, C);
10375
+ const z = F(w, C);
10376
+ z ? de(n.errors, C, z) : ye(n.errors, C);
10377
10377
  }
10378
10378
  else
10379
10379
  n.errors = w;
10380
10380
  return w;
10381
- }, B = async (p, w, C = {
10381
+ }, V = async (p, w, C = {
10382
10382
  valid: !0
10383
10383
  }) => {
10384
- for (const R in p) {
10385
- const O = p[R];
10384
+ for (const z in p) {
10385
+ const O = p[z];
10386
10386
  if (O) {
10387
- const { _f: D, ...H } = O;
10388
- if (D) {
10389
- const ne = l.array.has(D.name), re = O._f && im(O._f);
10390
- re && f.validatingFields && v([D.name], !0);
10387
+ const { _f: I, ...H } = O;
10388
+ if (I) {
10389
+ const ne = l.array.has(I.name), re = O._f && im(O._f);
10390
+ re && f.validatingFields && v([I.name], !0);
10391
10391
  const Me = await ha(O, l.disabled, s, x, t.shouldUseNativeValidation && !w, ne);
10392
- if (re && f.validatingFields && v([D.name]), Me[D.name] && (C.valid = !1, w || e.shouldUseNativeValidation))
10392
+ if (re && f.validatingFields && v([I.name]), Me[I.name] && (C.valid = !1, w || e.shouldUseNativeValidation))
10393
10393
  break;
10394
- !w && (F(Me, D.name) ? ne ? dm(n.errors, Me, D.name) : oe(n.errors, D.name, Me[D.name]) : ye(n.errors, D.name));
10394
+ !w && (F(Me, I.name) ? ne ? dm(n.errors, Me, I.name) : de(n.errors, I.name, Me[I.name]) : ye(n.errors, I.name));
10395
10395
  }
10396
- !Ee(H) && await B(H, w, C);
10396
+ !Ee(H) && await V(H, w, C);
10397
10397
  }
10398
10398
  }
10399
10399
  return C.valid;
10400
- }, $ = () => {
10400
+ }, T = () => {
10401
10401
  for (const p of l.unMount) {
10402
10402
  const w = F(r, p);
10403
10403
  w && (w._f.refs ? w._f.refs.every((C) => !Tr(C)) : !Tr(w._f.ref)) && lr(p);
10404
10404
  }
10405
10405
  l.unMount = /* @__PURE__ */ new Set();
10406
- }, T = (p, w) => !t.disabled && (p && w && oe(s, p, w), !We(Y(), i)), L = (p, w, C) => ri(p, l, {
10407
- ...a.mount ? s : ue(w) ? i : Re(p) ? { [p]: w } : w
10408
- }, C, w), z = (p) => Bi(F(a.mount ? s : i, p, t.shouldUnregister ? F(i, p, []) : [])), K = (p, w, C = {}) => {
10409
- const R = F(r, p);
10406
+ }, D = (p, w) => !t.disabled && (p && w && de(s, p, w), !We(Y(), i)), L = (p, w, C) => ri(p, l, {
10407
+ ...a.mount ? s : fe(w) ? i : Re(p) ? { [p]: w } : w
10408
+ }, C, w), P = (p) => Bi(F(a.mount ? s : i, p, t.shouldUnregister ? F(i, p, []) : [])), K = (p, w, C = {}) => {
10409
+ const z = F(r, p);
10410
10410
  let O = w;
10411
- if (R) {
10412
- const D = R._f;
10413
- D && (!D.disabled && oe(s, p, so(w, D)), O = Kn(D.ref) && $e(w) ? "" : w, no(D.ref) ? [...D.ref.options].forEach((H) => H.selected = O.includes(H.value)) : D.refs ? yn(D.ref) ? D.refs.forEach((H) => {
10411
+ if (z) {
10412
+ const I = z._f;
10413
+ I && (!I.disabled && de(s, p, so(w, I)), O = Kn(I.ref) && $e(w) ? "" : w, no(I.ref) ? [...I.ref.options].forEach((H) => H.selected = O.includes(H.value)) : I.refs ? yn(I.ref) ? I.refs.forEach((H) => {
10414
10414
  (!H.defaultChecked || !H.disabled) && (Array.isArray(O) ? H.checked = !!O.find((ne) => ne === H.value) : H.checked = O === H.value || !!O);
10415
- }) : D.refs.forEach((H) => H.checked = H.value === O) : qi(D.ref) ? D.ref.value = "" : (D.ref.value = O, D.ref.type || h.state.next({
10415
+ }) : I.refs.forEach((H) => H.checked = H.value === O) : qi(I.ref) ? I.ref.value = "" : (I.ref.value = O, I.ref.type || h.state.next({
10416
10416
  name: p,
10417
10417
  values: ge(s)
10418
10418
  })));
10419
10419
  }
10420
10420
  (C.shouldDirty || C.shouldTouch) && E(p, O, C.shouldTouch, C.shouldDirty, !0), C.shouldValidate && me(p);
10421
- }, Z = (p, w, C) => {
10422
- for (const R in w) {
10423
- if (!w.hasOwnProperty(R))
10421
+ }, X = (p, w, C) => {
10422
+ for (const z in w) {
10423
+ if (!w.hasOwnProperty(z))
10424
10424
  return;
10425
- const O = w[R], D = p + "." + R, H = F(r, D);
10426
- (l.array.has(p) || xe(O) || H && !H._f) && !Nt(O) ? Z(D, O, C) : K(D, O, C);
10425
+ const O = w[z], I = p + "." + z, H = F(r, I);
10426
+ (l.array.has(p) || xe(O) || H && !H._f) && !Nt(O) ? X(I, O, C) : K(I, O, C);
10427
10427
  }
10428
10428
  }, J = (p, w, C = {}) => {
10429
- const R = F(r, p), O = l.array.has(p), D = ge(w);
10430
- oe(s, p, D), O ? (h.array.next({
10429
+ const z = F(r, p), O = l.array.has(p), I = ge(w);
10430
+ de(s, p, I), O ? (h.array.next({
10431
10431
  name: p,
10432
10432
  values: ge(s)
10433
10433
  }), (f.isDirty || f.dirtyFields || m.isDirty || m.dirtyFields) && C.shouldDirty && h.state.next({
10434
10434
  name: p,
10435
10435
  dirtyFields: Ft(i, s),
10436
- isDirty: T(p, D)
10437
- })) : R && !R._f && !$e(D) ? Z(p, D, C) : K(p, D, C), da(p, l) ? h.state.next({
10436
+ isDirty: D(p, I)
10437
+ })) : z && !z._f && !$e(I) ? X(p, I, C) : K(p, I, C), da(p, l) ? h.state.next({
10438
10438
  ...n,
10439
10439
  name: p,
10440
10440
  values: ge(s)
@@ -10442,17 +10442,17 @@ function fm(e = {}) {
10442
10442
  name: a.mount ? p : void 0,
10443
10443
  values: ge(s)
10444
10444
  });
10445
- }, ce = async (p) => {
10445
+ }, ae = async (p) => {
10446
10446
  a.mount = !0;
10447
10447
  const w = p.target;
10448
- let C = w.name, R = !0;
10449
- const O = F(r, C), D = (re) => {
10450
- R = Number.isNaN(re) || Nt(re) && isNaN(re.getTime()) || We(re, F(s, C, re));
10448
+ let C = w.name, z = !0;
10449
+ const O = F(r, C), I = (re) => {
10450
+ z = Number.isNaN(re) || Nt(re) && isNaN(re.getTime()) || We(re, F(s, C, re));
10451
10451
  }, H = oa(t.mode), ne = oa(t.reValidateMode);
10452
10452
  if (O) {
10453
10453
  let re, Me;
10454
10454
  const pt = w.type ? la(O._f) : Ql(p), it = p.type === Wn.BLUR || p.type === Wn.FOCUS_OUT, Bo = !sm(O._f) && !t.resolver && !F(n.errors, C) && !O._f.deps || om(it, F(n.touchedFields, C), n.isSubmitted, ne, H), dr = da(C, l, it);
10455
- oe(s, C, pt), it ? (!w || !w.readOnly) && (O._f.onBlur && O._f.onBlur(p), o && o(0)) : O._f.onChange && O._f.onChange(p);
10455
+ de(s, C, pt), it ? (!w || !w.readOnly) && (O._f.onBlur && O._f.onBlur(p), o && o(0)) : O._f.onChange && O._f.onChange(p);
10456
10456
  const ur = E(C, pt, it), Vo = !Ee(ur) || dr;
10457
10457
  if (!it && h.state.next({
10458
10458
  name: C,
@@ -10462,58 +10462,58 @@ function fm(e = {}) {
10462
10462
  return (f.isValid || m.isValid) && (t.mode === "onBlur" ? it && y() : it || y()), Vo && h.state.next({ name: C, ...dr ? {} : ur });
10463
10463
  if (!it && dr && h.state.next({ ...n }), t.resolver) {
10464
10464
  const { errors: ns } = await _([C]);
10465
- if (v([C]), D(pt), R) {
10465
+ if (v([C]), I(pt), z) {
10466
10466
  const Ho = ua(n.errors, r, C), rs = ua(ns, r, Ho.name || C);
10467
10467
  re = rs.error, C = rs.name, Me = Ee(ns);
10468
10468
  }
10469
10469
  } else
10470
- v([C], !0), re = (await ha(O, l.disabled, s, x, t.shouldUseNativeValidation))[C], v([C]), D(pt), R && (re ? Me = !1 : (f.isValid || m.isValid) && (Me = await B(r, !0)));
10471
- R && (O._f.deps && (!Array.isArray(O._f.deps) || O._f.deps.length > 0) && me(O._f.deps), I(C, Me, re, ur));
10470
+ v([C], !0), re = (await ha(O, l.disabled, s, x, t.shouldUseNativeValidation))[C], v([C]), I(pt), z && (re ? Me = !1 : (f.isValid || m.isValid) && (Me = await V(r, !0)));
10471
+ z && (O._f.deps && (!Array.isArray(O._f.deps) || O._f.deps.length > 0) && me(O._f.deps), $(C, Me, re, ur));
10472
10472
  }
10473
- }, ae = (p, w) => {
10473
+ }, le = (p, w) => {
10474
10474
  if (F(n.errors, w) && p.focus)
10475
10475
  return p.focus(), 1;
10476
10476
  }, me = async (p, w = {}) => {
10477
- let C, R;
10477
+ let C, z;
10478
10478
  const O = en(p);
10479
10479
  if (t.resolver) {
10480
- const D = await P(ue(p) ? p : O);
10481
- C = Ee(D), R = p ? !O.some((H) => F(D, H)) : C;
10482
- } else p ? (R = (await Promise.all(O.map(async (D) => {
10483
- const H = F(r, D);
10484
- return await B(H && H._f ? { [D]: H } : H);
10485
- }))).every(Boolean), !(!R && !n.isValid) && y()) : R = C = await B(r);
10480
+ const I = await R(fe(p) ? p : O);
10481
+ C = Ee(I), z = p ? !O.some((H) => F(I, H)) : C;
10482
+ } else p ? (z = (await Promise.all(O.map(async (I) => {
10483
+ const H = F(r, I);
10484
+ return await V(H && H._f ? { [I]: H } : H);
10485
+ }))).every(Boolean), !(!z && !n.isValid) && y()) : z = C = await V(r);
10486
10486
  return h.state.next({
10487
10487
  ...!Re(p) || (f.isValid || m.isValid) && C !== n.isValid ? {} : { name: p },
10488
10488
  ...t.resolver || !p ? { isValid: C } : {},
10489
10489
  errors: n.errors
10490
- }), w.shouldFocus && !R && tn(r, ae, p ? O : l.mount), R;
10490
+ }), w.shouldFocus && !z && tn(r, le, p ? O : l.mount), z;
10491
10491
  }, Y = (p, w) => {
10492
10492
  let C = {
10493
10493
  ...a.mount ? s : i
10494
10494
  };
10495
- return w && (C = to(w.dirtyFields ? n.dirtyFields : n.touchedFields, C)), ue(p) ? C : Re(p) ? F(C, p) : p.map((R) => F(C, R));
10496
- }, W = (p, w) => ({
10495
+ return w && (C = to(w.dirtyFields ? n.dirtyFields : n.touchedFields, C)), fe(p) ? C : Re(p) ? F(C, p) : p.map((z) => F(C, z));
10496
+ }, q = (p, w) => ({
10497
10497
  invalid: !!F((w || n).errors, p),
10498
10498
  isDirty: !!F((w || n).dirtyFields, p),
10499
10499
  error: F((w || n).errors, p),
10500
10500
  isValidating: !!F(n.validatingFields, p),
10501
10501
  isTouched: !!F((w || n).touchedFields, p)
10502
- }), fe = (p) => {
10502
+ }), oe = (p) => {
10503
10503
  p && en(p).forEach((w) => ye(n.errors, w)), h.state.next({
10504
10504
  errors: p ? n.errors : {}
10505
10505
  });
10506
- }, le = (p, w, C) => {
10507
- const R = (F(r, p, { _f: {} })._f || {}).ref, O = F(n.errors, p) || {}, { ref: D, message: H, type: ne, ...re } = O;
10508
- oe(n.errors, p, {
10506
+ }, ce = (p, w, C) => {
10507
+ const z = (F(r, p, { _f: {} })._f || {}).ref, O = F(n.errors, p) || {}, { ref: I, message: H, type: ne, ...re } = O;
10508
+ de(n.errors, p, {
10509
10509
  ...re,
10510
10510
  ...w,
10511
- ref: R
10511
+ ref: z
10512
10512
  }), h.state.next({
10513
10513
  name: p,
10514
10514
  errors: n.errors,
10515
10515
  isValid: !1
10516
- }), C && C.shouldFocus && R && R.focus && R.focus();
10516
+ }), C && C.shouldFocus && z && z.focus && z.focus();
10517
10517
  }, Fe = (p, w) => De(p) ? h.state.subscribe({
10518
10518
  next: (C) => "values" in C && p(L(void 0, w), C)
10519
10519
  }) : L(p, w, !0), qt = (p) => h.state.subscribe({
@@ -10541,7 +10541,7 @@ function fm(e = {}) {
10541
10541
  values: ge(s)
10542
10542
  }), h.state.next({
10543
10543
  ...n,
10544
- ...w.keepDirty ? { isDirty: T() } : {}
10544
+ ...w.keepDirty ? { isDirty: D() } : {}
10545
10545
  }), !w.keepIsValid && y();
10546
10546
  }, Qi = ({ disabled: p, name: w }) => {
10547
10547
  if (Pe(p) && a.mount || p || l.disabled.has(w)) {
@@ -10550,8 +10550,8 @@ function fm(e = {}) {
10550
10550
  }
10551
10551
  }, or = (p, w = {}) => {
10552
10552
  let C = F(r, p);
10553
- const R = Pe(w.disabled) || Pe(t.disabled);
10554
- return oe(r, p, {
10553
+ const z = Pe(w.disabled) || Pe(t.disabled);
10554
+ return de(r, p, {
10555
10555
  ...C || {},
10556
10556
  _f: {
10557
10557
  ...C && C._f ? C._f : { ref: { name: p } },
@@ -10563,7 +10563,7 @@ function fm(e = {}) {
10563
10563
  disabled: Pe(w.disabled) ? w.disabled : t.disabled,
10564
10564
  name: p
10565
10565
  }) : A(p, !0, w.value), {
10566
- ...R ? { disabled: w.disabled || t.disabled } : {},
10566
+ ...z ? { disabled: w.disabled || t.disabled } : {},
10567
10567
  ...t.progressive ? {
10568
10568
  required: !!w.required,
10569
10569
  min: Jt(w.min),
@@ -10573,75 +10573,75 @@ function fm(e = {}) {
10573
10573
  pattern: Jt(w.pattern)
10574
10574
  } : {},
10575
10575
  name: p,
10576
- onChange: ce,
10577
- onBlur: ce,
10576
+ onChange: ae,
10577
+ onBlur: ae,
10578
10578
  ref: (O) => {
10579
10579
  if (O) {
10580
10580
  or(p, w), C = F(r, p);
10581
- const D = ue(O.value) && O.querySelectorAll && O.querySelectorAll("input,select,textarea")[0] || O, H = Xh(D), ne = C._f.refs || [];
10582
- if (H ? ne.find((re) => re === D) : D === C._f.ref)
10581
+ const I = fe(O.value) && O.querySelectorAll && O.querySelectorAll("input,select,textarea")[0] || O, H = Xh(I), ne = C._f.refs || [];
10582
+ if (H ? ne.find((re) => re === I) : I === C._f.ref)
10583
10583
  return;
10584
- oe(r, p, {
10584
+ de(r, p, {
10585
10585
  _f: {
10586
10586
  ...C._f,
10587
10587
  ...H ? {
10588
10588
  refs: [
10589
10589
  ...ne.filter(Tr),
10590
- D,
10590
+ I,
10591
10591
  ...Array.isArray(F(i, p)) ? [{}] : []
10592
10592
  ],
10593
- ref: { type: D.type, name: p }
10594
- } : { ref: D }
10593
+ ref: { type: I.type, name: p }
10594
+ } : { ref: I }
10595
10595
  }
10596
- }), A(p, !1, void 0, D);
10596
+ }), A(p, !1, void 0, I);
10597
10597
  } else
10598
10598
  C = F(r, p, {}), C._f && (C._f.mount = !1), (t.shouldUnregister || w.shouldUnregister) && !(Zl(l.array, p) && a.action) && l.unMount.add(p);
10599
10599
  }
10600
10600
  };
10601
- }, cr = () => t.shouldFocusError && tn(r, ae, l.mount), Po = (p) => {
10601
+ }, cr = () => t.shouldFocusError && tn(r, le, l.mount), Po = (p) => {
10602
10602
  Pe(p) && (h.state.next({ disabled: p }), tn(r, (w, C) => {
10603
- const R = F(r, C);
10604
- R && (w.disabled = R._f.disabled || p, Array.isArray(R._f.refs) && R._f.refs.forEach((O) => {
10605
- O.disabled = R._f.disabled || p;
10603
+ const z = F(r, C);
10604
+ z && (w.disabled = z._f.disabled || p, Array.isArray(z._f.refs) && z._f.refs.forEach((O) => {
10605
+ O.disabled = z._f.disabled || p;
10606
10606
  }));
10607
10607
  }, 0, !1));
10608
10608
  }, Zi = (p, w) => async (C) => {
10609
- let R;
10609
+ let z;
10610
10610
  C && (C.preventDefault && C.preventDefault(), C.persist && C.persist());
10611
10611
  let O = ge(s);
10612
10612
  if (h.state.next({
10613
10613
  isSubmitting: !0
10614
10614
  }), t.resolver) {
10615
- const { errors: D, values: H } = await _();
10616
- v(), n.errors = D, O = ge(H);
10615
+ const { errors: I, values: H } = await _();
10616
+ v(), n.errors = I, O = ge(H);
10617
10617
  } else
10618
- await B(r);
10618
+ await V(r);
10619
10619
  if (l.disabled.size)
10620
- for (const D of l.disabled)
10621
- ye(O, D);
10620
+ for (const I of l.disabled)
10621
+ ye(O, I);
10622
10622
  if (ye(n.errors, "root"), Ee(n.errors)) {
10623
10623
  h.state.next({
10624
10624
  errors: {}
10625
10625
  });
10626
10626
  try {
10627
10627
  await p(O, C);
10628
- } catch (D) {
10629
- R = D;
10628
+ } catch (I) {
10629
+ z = I;
10630
10630
  }
10631
10631
  } else
10632
10632
  w && await w({ ...n.errors }, C), cr(), setTimeout(cr);
10633
10633
  if (h.state.next({
10634
10634
  isSubmitted: !0,
10635
10635
  isSubmitting: !1,
10636
- isSubmitSuccessful: Ee(n.errors) && !R,
10636
+ isSubmitSuccessful: Ee(n.errors) && !z,
10637
10637
  submitCount: n.submitCount + 1,
10638
10638
  errors: n.errors
10639
- }), R)
10640
- throw R;
10639
+ }), z)
10640
+ throw z;
10641
10641
  }, zo = (p, w = {}) => {
10642
- F(r, p) && (ue(w.defaultValue) ? J(p, ge(F(i, p))) : (J(p, w.defaultValue), oe(i, p, ge(w.defaultValue))), w.keepTouched || ye(n.touchedFields, p), w.keepDirty || (ye(n.dirtyFields, p), n.isDirty = w.defaultValue ? T(p, ge(F(i, p))) : T()), w.keepError || (ye(n.errors, p), f.isValid && y()), h.state.next({ ...n }));
10642
+ F(r, p) && (fe(w.defaultValue) ? J(p, ge(F(i, p))) : (J(p, w.defaultValue), de(i, p, ge(w.defaultValue))), w.keepTouched || ye(n.touchedFields, p), w.keepDirty || (ye(n.dirtyFields, p), n.isDirty = w.defaultValue ? D(p, ge(F(i, p))) : D()), w.keepError || (ye(n.errors, p), f.isValid && y()), h.state.next({ ...n }));
10643
10643
  }, Xi = (p, w = {}) => {
10644
- const C = p ? ge(p) : i, R = ge(C), O = Ee(p), D = O ? i : R;
10644
+ const C = p ? ge(p) : i, z = ge(C), O = Ee(p), I = O ? i : z;
10645
10645
  if (w.keepDefaultValues || (i = C), !w.keepValues) {
10646
10646
  if (w.keepDirtyValues) {
10647
10647
  const H = /* @__PURE__ */ new Set([
@@ -10649,11 +10649,11 @@ function fm(e = {}) {
10649
10649
  ...Object.keys(Ft(i, s))
10650
10650
  ]);
10651
10651
  for (const ne of Array.from(H)) {
10652
- const re = F(n.dirtyFields, ne), Me = F(s, ne), pt = F(D, ne);
10653
- re && !ue(Me) ? oe(D, ne, Me) : !re && !ue(pt) && J(ne, pt);
10652
+ const re = F(n.dirtyFields, ne), Me = F(s, ne), pt = F(I, ne);
10653
+ re && !fe(Me) ? de(I, ne, Me) : !re && !fe(pt) && J(ne, pt);
10654
10654
  }
10655
10655
  } else {
10656
- if (_i && ue(p))
10656
+ if (_i && fe(p))
10657
10657
  for (const H of l.mount) {
10658
10658
  const ne = F(r, H);
10659
10659
  if (ne && ne._f) {
@@ -10669,14 +10669,14 @@ function fm(e = {}) {
10669
10669
  }
10670
10670
  if (w.keepFieldsRef)
10671
10671
  for (const H of l.mount)
10672
- J(H, F(D, H));
10672
+ J(H, F(I, H));
10673
10673
  else
10674
10674
  r = {};
10675
10675
  }
10676
- s = t.shouldUnregister ? w.keepDefaultValues ? ge(i) : {} : ge(D), h.array.next({
10677
- values: { ...D }
10676
+ s = t.shouldUnregister ? w.keepDefaultValues ? ge(i) : {} : ge(I), h.array.next({
10677
+ values: { ...I }
10678
10678
  }), h.state.next({
10679
- values: { ...D }
10679
+ values: { ...I }
10680
10680
  });
10681
10681
  }
10682
10682
  l = {
@@ -10687,7 +10687,7 @@ function fm(e = {}) {
10687
10687
  watch: /* @__PURE__ */ new Set(),
10688
10688
  watchAll: !1,
10689
10689
  focus: ""
10690
- }, a.mount = !f.isValid || !!w.keepIsValid || !!w.keepDirtyValues || !t.shouldUnregister && !Ee(D), a.watch = !!t.shouldUnregister, a.keepIsValid = !!w.keepIsValid, a.action = !1, w.keepErrors || (n.errors = {}), h.state.next({
10690
+ }, a.mount = !f.isValid || !!w.keepIsValid || !!w.keepDirtyValues || !t.shouldUnregister && !Ee(I), a.watch = !!t.shouldUnregister, a.keepIsValid = !!w.keepIsValid, a.action = !1, w.keepErrors || (n.errors = {}), h.state.next({
10691
10691
  submitCount: w.keepSubmitCount ? n.submitCount : 0,
10692
10692
  isDirty: O ? !1 : w.keepDirty ? n.isDirty : !!(w.keepDefaultValues && !We(p, i)),
10693
10693
  isSubmitted: w.keepIsSubmitted ? n.isSubmitted : !1,
@@ -10699,9 +10699,9 @@ function fm(e = {}) {
10699
10699
  defaultValues: i
10700
10700
  });
10701
10701
  }, es = (p, w) => Xi(De(p) ? p(s) : p, { ...t.resetOptions, ...w }), Ro = (p, w = {}) => {
10702
- const C = F(r, p), R = C && C._f;
10703
- if (R) {
10704
- const O = R.refs ? R.refs[0] : R.ref;
10702
+ const C = F(r, p), z = C && C._f;
10703
+ if (z) {
10704
+ const O = z.refs ? z.refs[0] : z.ref;
10705
10705
  O.focus && setTimeout(() => {
10706
10706
  O.focus(), w.shouldSelect && De(O.select) && O.select();
10707
10707
  });
@@ -10715,27 +10715,27 @@ function fm(e = {}) {
10715
10715
  control: {
10716
10716
  register: or,
10717
10717
  unregister: lr,
10718
- getFieldState: W,
10718
+ getFieldState: q,
10719
10719
  handleSubmit: Zi,
10720
- setError: le,
10720
+ setError: ce,
10721
10721
  _subscribe: qt,
10722
10722
  _runSchema: _,
10723
10723
  _updateIsValidating: v,
10724
10724
  _focusError: cr,
10725
10725
  _getWatch: L,
10726
- _getDirty: T,
10726
+ _getDirty: D,
10727
10727
  _setValid: y,
10728
10728
  _setFieldArray: N,
10729
10729
  _setDisabledField: Qi,
10730
10730
  _setErrors: S,
10731
- _getFieldArray: z,
10731
+ _getFieldArray: P,
10732
10732
  _reset: Xi,
10733
10733
  _resetDefaultValues: () => De(t.defaultValues) && t.defaultValues().then((p) => {
10734
10734
  es(p, t.resetOptions), h.state.next({
10735
10735
  isLoading: !1
10736
10736
  });
10737
10737
  }),
10738
- _removeUnmounted: $,
10738
+ _removeUnmounted: T,
10739
10739
  _disableForm: Po,
10740
10740
  _subjects: h,
10741
10741
  _proxyFormState: f,
@@ -10782,11 +10782,11 @@ function fm(e = {}) {
10782
10782
  getValues: Y,
10783
10783
  reset: es,
10784
10784
  resetField: zo,
10785
- clearErrors: fe,
10785
+ clearErrors: oe,
10786
10786
  unregister: lr,
10787
- setError: le,
10787
+ setError: ce,
10788
10788
  setFocus: Ro,
10789
- getFieldState: W
10789
+ getFieldState: q
10790
10790
  };
10791
10791
  return {
10792
10792
  ...ts,
@@ -10794,7 +10794,7 @@ function fm(e = {}) {
10794
10794
  };
10795
10795
  }
10796
10796
  function hm(e = {}) {
10797
- const t = V.useRef(void 0), n = V.useRef(void 0), [r, i] = V.useState({
10797
+ const t = B.useRef(void 0), n = B.useRef(void 0), [r, i] = B.useState({
10798
10798
  isDirty: !1,
10799
10799
  isValidating: !1,
10800
10800
  isLoading: De(e.defaultValues),
@@ -10835,35 +10835,35 @@ function hm(e = {}) {
10835
10835
  ...l,
10836
10836
  isReady: !0
10837
10837
  })), s._formState.isReady = !0, a;
10838
- }, [s]), V.useEffect(() => s._disableForm(e.disabled), [s, e.disabled]), V.useEffect(() => {
10838
+ }, [s]), B.useEffect(() => s._disableForm(e.disabled), [s, e.disabled]), B.useEffect(() => {
10839
10839
  e.mode && (s._options.mode = e.mode), e.reValidateMode && (s._options.reValidateMode = e.reValidateMode);
10840
- }, [s, e.mode, e.reValidateMode]), V.useEffect(() => {
10840
+ }, [s, e.mode, e.reValidateMode]), B.useEffect(() => {
10841
10841
  e.errors && (s._setErrors(e.errors), s._focusError());
10842
- }, [s, e.errors]), V.useEffect(() => {
10842
+ }, [s, e.errors]), B.useEffect(() => {
10843
10843
  e.shouldUnregister && s._subjects.state.next({
10844
10844
  values: s._getWatch()
10845
10845
  });
10846
- }, [s, e.shouldUnregister]), V.useEffect(() => {
10846
+ }, [s, e.shouldUnregister]), B.useEffect(() => {
10847
10847
  if (s._proxyFormState.isDirty) {
10848
10848
  const a = s._getDirty();
10849
10849
  a !== r.isDirty && s._subjects.state.next({
10850
10850
  isDirty: a
10851
10851
  });
10852
10852
  }
10853
- }, [s, r.isDirty]), V.useEffect(() => {
10853
+ }, [s, r.isDirty]), B.useEffect(() => {
10854
10854
  var a;
10855
10855
  e.values && !We(e.values, n.current) ? (s._reset(e.values, {
10856
10856
  keepFieldsRef: !0,
10857
10857
  ...s._options.resetOptions
10858
10858
  }), !((a = s._options.resetOptions) === null || a === void 0) && a.keepIsValid || s._setValid(), n.current = e.values, i((l) => ({ ...l }))) : s._resetDefaultValues();
10859
- }, [s, e.values]), V.useEffect(() => {
10859
+ }, [s, e.values]), B.useEffect(() => {
10860
10860
  s._state.mount || (s._setValid(), s._state.mount = !0), s._state.watch && (s._state.watch = !1, s._subjects.state.next({ ...s._formState })), s._removeUnmounted();
10861
- }), t.current.formState = V.useMemo(() => eo(r, s), [s, r]), t.current;
10861
+ }), t.current.formState = B.useMemo(() => eo(r, s), [s, r]), t.current;
10862
10862
  }
10863
- function Ag(e, t = 3) {
10863
+ function Tg(e, t = 3) {
10864
10864
  return e % 1 === 0 ? e.toString() : e.toFixed(t).replace(/\.?0+$/, "");
10865
10865
  }
10866
- function Mg(e, t = "en-US", n = "USD") {
10866
+ function Dg(e, t = "en-US", n = "USD") {
10867
10867
  try {
10868
10868
  return new Intl.NumberFormat(t, {
10869
10869
  style: "currency",
@@ -10875,7 +10875,7 @@ function Mg(e, t = "en-US", n = "USD") {
10875
10875
  return console.warn(`Invalid currency formatting: ${r}`), `${n} ${e.toFixed(2)}`;
10876
10876
  }
10877
10877
  }
10878
- function Eg(e = "USD", t = "en-US") {
10878
+ function Ig(e = "USD", t = "en-US") {
10879
10879
  try {
10880
10880
  return new Intl.NumberFormat(t, {
10881
10881
  style: "currency",
@@ -10885,14 +10885,14 @@ function Eg(e = "USD", t = "en-US") {
10885
10885
  return "$";
10886
10886
  }
10887
10887
  }
10888
- function Tg(e) {
10888
+ function $g(e) {
10889
10889
  const t = e.replace(/[^\d.,-]/g, ""), n = t.match(/,\d{1,2}$/);
10890
10890
  let r;
10891
10891
  n ? r = t.replace(/\./g, "").replace(",", ".") : r = t.replace(/,/g, "");
10892
10892
  const i = parseFloat(r);
10893
10893
  return isNaN(i) ? null : i;
10894
10894
  }
10895
- function Dg(e, t, n = 1e-3) {
10895
+ function Og(e, t, n = 1e-3) {
10896
10896
  const r = e - t, i = Math.abs(r) <= n;
10897
10897
  return {
10898
10898
  difference: r,
@@ -10951,43 +10951,43 @@ const mm = {
10951
10951
  control: S ? y : A.control,
10952
10952
  name: S ? v : "_internal",
10953
10953
  rules: S ? N : void 0
10954
- }), [I, _] = j(
10954
+ }), [$, _] = j(
10955
10955
  t || Dr()
10956
- ), P = S ? E.field.value ?? Dr() : e ?? I, B = S && !!E.fieldState?.error, $ = S && (E.fieldState?.isTouched ?? !1), T = B || $, L = T && (!P.amount || P.amount <= 0), z = T && !P.glAccount, [K, Z] = j(P.glAccount?.name || ""), J = te(
10957
- (le) => {
10958
- const Fe = { ...P, ...le };
10956
+ ), R = S ? E.field.value ?? Dr() : e ?? $, V = S && !!E.fieldState?.error, T = S && (E.fieldState?.isTouched ?? !1), D = V || T, L = D && (!R.amount || R.amount <= 0), P = D && !R.glAccount, [K, X] = j(R.glAccount?.name || ""), J = te(
10957
+ (ce) => {
10958
+ const Fe = { ...R, ...ce };
10959
10959
  S && E.field.onChange(Fe), !S && e === void 0 && _(Fe), s?.(Fe);
10960
10960
  },
10961
- [P, e, s, S, E]
10962
- ), ce = te(
10963
- (le) => {
10964
- const Fe = le || 0;
10961
+ [R, e, s, S, E]
10962
+ ), ae = te(
10963
+ (ce) => {
10964
+ const Fe = ce || 0;
10965
10965
  J({ amount: Fe }), a?.(Fe);
10966
10966
  },
10967
10967
  [J, a]
10968
- ), ae = te(
10969
- (le) => {
10970
- Z(le), i?.(le);
10968
+ ), le = te(
10969
+ (ce) => {
10970
+ X(ce), i?.(ce);
10971
10971
  },
10972
10972
  [i]
10973
10973
  ), me = te(
10974
- (le) => {
10975
- if (le === null) {
10974
+ (ce) => {
10975
+ if (ce === null) {
10976
10976
  J({ glAccount: null }), l?.(null);
10977
10977
  return;
10978
10978
  }
10979
- const qt = n.find((ar) => String(ar.id) === String(le)) || null;
10979
+ const qt = n.find((ar) => String(ar.id) === String(ce)) || null;
10980
10980
  J({ glAccount: qt }), l?.(qt);
10981
10981
  },
10982
10982
  [n, J, l]
10983
10983
  ), Y = te(() => {
10984
- Z(""), J({ glAccount: null }), l?.(null);
10985
- }, [J, l]), W = te(
10986
- (le) => {
10987
- J({ isTaxDeductible: le }), o?.(le);
10984
+ X(""), J({ glAccount: null }), l?.(null);
10985
+ }, [J, l]), q = te(
10986
+ (ce) => {
10987
+ J({ isTaxDeductible: ce }), o?.(ce);
10988
10988
  },
10989
10989
  [J, o]
10990
- ), fe = te(() => {
10990
+ ), oe = te(() => {
10991
10991
  d?.();
10992
10992
  }, [d]);
10993
10993
  return /* @__PURE__ */ c(
@@ -10997,7 +10997,7 @@ const mm = {
10997
10997
  shadow: "sm",
10998
10998
  "data-testid": b || "revenue-distribution-card",
10999
10999
  className: k(x.base),
11000
- children: /* @__PURE__ */ g(_e, { className: k("flex flex-row flex-nowrap items-start gap-4", x.body), children: [
11000
+ children: /* @__PURE__ */ g(Be, { className: k("flex flex-row flex-nowrap items-start gap-4", x.body), children: [
11001
11001
  /* @__PURE__ */ c("div", { className: k("shrink-0", x.amountContainer), children: /* @__PURE__ */ c(
11002
11002
  Da,
11003
11003
  {
@@ -11013,8 +11013,8 @@ const mm = {
11013
11013
  }
11014
11014
  ) })
11015
11015
  ] }),
11016
- value: P.amount || void 0,
11017
- onValueChange: ce,
11016
+ value: R.amount || void 0,
11017
+ onValueChange: ae,
11018
11018
  labelPlacement: "outside",
11019
11019
  placeholder: M.amountPlaceholder,
11020
11020
  isWheelDisabled: !0,
@@ -11050,23 +11050,23 @@ const mm = {
11050
11050
  variant: "bordered",
11051
11051
  items: n,
11052
11052
  menuTrigger: "input",
11053
- inputValue: P.glAccount?.name ?? K,
11054
- selectedKey: P.glAccount?.id ?? null,
11053
+ inputValue: R.glAccount?.name ?? K,
11054
+ selectedKey: R.glAccount?.id ?? null,
11055
11055
  isDisabled: m,
11056
- isInvalid: z,
11057
- errorMessage: z ? "GL Account is required" : void 0,
11056
+ isInvalid: P,
11057
+ errorMessage: P ? "GL Account is required" : void 0,
11058
11058
  listboxProps: {
11059
11059
  emptyContent: r ? M.searching : M.noGlAccountsFound
11060
11060
  },
11061
11061
  placeholder: M.glAccountPlaceholder,
11062
- onInputChange: ae,
11062
+ onInputChange: le,
11063
11063
  onSelectionChange: me,
11064
11064
  onClear: Y,
11065
11065
  className: x.glAccountInput,
11066
- children: (le) => /* @__PURE__ */ c(Qo, { textValue: le.name, children: /* @__PURE__ */ g("div", { className: "flex flex-col", children: [
11067
- /* @__PURE__ */ c("span", { children: le.name }),
11068
- le.code && /* @__PURE__ */ c("span", { className: "text-xs text-default-400", children: le.code })
11069
- ] }) }, le.id)
11066
+ children: (ce) => /* @__PURE__ */ c(Qo, { textValue: ce.name, children: /* @__PURE__ */ g("div", { className: "flex flex-col", children: [
11067
+ /* @__PURE__ */ c("span", { children: ce.name }),
11068
+ ce.code && /* @__PURE__ */ c("span", { className: "text-xs text-default-400", children: ce.code })
11069
+ ] }) }, ce.id)
11070
11070
  }
11071
11071
  ) }),
11072
11072
  /* @__PURE__ */ c("div", { className: k("shrink-0 pt-6 flex items-center", x.taxDeductibleContainer), children: /* @__PURE__ */ c(
@@ -11074,22 +11074,22 @@ const mm = {
11074
11074
  {
11075
11075
  radius: "full",
11076
11076
  "data-testid": `${b || "revenue-distribution-card"}-tax-deductible`,
11077
- isSelected: P.isTaxDeductible,
11078
- onValueChange: W,
11077
+ isSelected: R.isTaxDeductible,
11078
+ onValueChange: q,
11079
11079
  isDisabled: m || !f,
11080
11080
  className: x.taxDeductibleCheckbox,
11081
11081
  children: M.taxDeductible
11082
11082
  }
11083
11083
  ) }),
11084
11084
  /* @__PURE__ */ c("div", { className: k("shrink-0 pt-6", x.deleteContainer), children: /* @__PURE__ */ c(
11085
- q,
11085
+ W,
11086
11086
  {
11087
11087
  "data-testid": `${b || "revenue-distribution-card"}-delete-button`,
11088
11088
  size: "sm",
11089
11089
  color: "danger",
11090
11090
  variant: "flat",
11091
11091
  isDisabled: m || !u,
11092
- onPress: fe,
11092
+ onPress: oe,
11093
11093
  startContent: /* @__PURE__ */ c(U, { icon: "solar:trash-bin-trash-linear", width: 16 }),
11094
11094
  className: k("text-danger", x.deleteButton),
11095
11095
  children: M.deleteButton
@@ -11121,7 +11121,7 @@ const gm = ({
11121
11121
  shadow: "sm",
11122
11122
  "data-testid": "revenue-distribution-empty",
11123
11123
  className: k("w-full", i.base),
11124
- children: /* @__PURE__ */ c(_e, { children: a })
11124
+ children: /* @__PURE__ */ c(Be, { children: a })
11125
11125
  }
11126
11126
  ) : /* @__PURE__ */ c("div", { "data-testid": "revenue-distribution-empty", className: k("w-full", i.base), children: a });
11127
11127
  };
@@ -11153,7 +11153,7 @@ const ym = {
11153
11153
  shadow: "sm",
11154
11154
  "data-testid": "revenue-distribution-error",
11155
11155
  className: k("w-full", i.base),
11156
- children: /* @__PURE__ */ c(_e, { children: a })
11156
+ children: /* @__PURE__ */ c(Be, { children: a })
11157
11157
  }
11158
11158
  ) : /* @__PURE__ */ c("div", { "data-testid": "revenue-distribution-error", className: k("w-full", i.base), children: a });
11159
11159
  };
@@ -11184,7 +11184,7 @@ const xm = ({
11184
11184
  ] }),
11185
11185
  /* @__PURE__ */ c("div", { className: "shrink-0 pb-2", children: /* @__PURE__ */ c(ee, { className: "h-8 w-20 rounded-lg" }) })
11186
11186
  ] }, s);
11187
- return t ? /* @__PURE__ */ c("div", { className: k("flex flex-col gap-3", n.base), children: r.map((s) => /* @__PURE__ */ c(Le, { radius: "md", shadow: "sm", "data-testid": `revenue-distribution-skeleton-${s}`, children: /* @__PURE__ */ c(_e, { children: i(s) }) }, s)) }) : /* @__PURE__ */ c("div", { "data-testid": "revenue-distribution-skeleton", className: k("flex flex-col gap-3", n.base), children: r.map((s) => i(s)) });
11187
+ return t ? /* @__PURE__ */ c("div", { className: k("flex flex-col gap-3", n.base), children: r.map((s) => /* @__PURE__ */ c(Le, { radius: "md", shadow: "sm", "data-testid": `revenue-distribution-skeleton-${s}`, children: /* @__PURE__ */ c(Be, { children: i(s) }) }, s)) }) : /* @__PURE__ */ c("div", { "data-testid": "revenue-distribution-skeleton", className: k("flex flex-col gap-3", n.base), children: r.map((s) => i(s)) });
11188
11188
  };
11189
11189
  xm.displayName = "RevenueDistributionSkeleton";
11190
11190
  function ai({
@@ -11225,7 +11225,7 @@ function ai({
11225
11225
  /* @__PURE__ */ c(gi, { className: "px-7 pb-3 pt-4", children: /* @__PURE__ */ c("div", { className: "text-sm leading-6 text-zinc-500", children: t.description }) }),
11226
11226
  /* @__PURE__ */ g($a, { className: "grid grid-cols-2 gap-3 px-7 pb-7 pt-3", children: [
11227
11227
  /* @__PURE__ */ c(
11228
- q,
11228
+ W,
11229
11229
  {
11230
11230
  type: "button",
11231
11231
  variant: "bordered",
@@ -11236,7 +11236,7 @@ function ai({
11236
11236
  }
11237
11237
  ),
11238
11238
  /* @__PURE__ */ c(
11239
- q,
11239
+ W,
11240
11240
  {
11241
11241
  type: "button",
11242
11242
  color: i,
@@ -11299,7 +11299,7 @@ const vm = {
11299
11299
  fund: null,
11300
11300
  percentage: 0
11301
11301
  }), Nm = (e) => Number.isFinite(e) ? Math.max(0, Math.min(100, Math.round(e * 100) / 100)) : 0, km = (e) => e.fund !== null;
11302
- function Ig({
11302
+ function Lg({
11303
11303
  mode: e,
11304
11304
  assignments: t,
11305
11305
  funds: n,
@@ -11318,69 +11318,69 @@ function Ig({
11318
11318
  onSave: b
11319
11319
  }) {
11320
11320
  const y = { ...vm, ...r }, v = t.filter(km), N = v.length > 0, M = Se(
11321
- () => t.reduce((Y, W) => Y + Number(W.percentage || 0), 0),
11321
+ () => t.reduce((Y, q) => Y + Number(q.percentage || 0), 0),
11322
11322
  [t]
11323
- ), S = Math.round(M * 100) / 100, A = e === "split" && t.some((Y) => !Y.fund || Number(Y.percentage || 0) <= 0), E = e === "split" && N && (S !== 100 || A), I = e === "split" && N && S >= 100, _ = e === "split" || !N, [P, B] = j(null), [$, T] = j(!1), L = (Y) => {
11323
+ ), S = Math.round(M * 100) / 100, A = e === "split" && t.some((Y) => !Y.fund || Number(Y.percentage || 0) <= 0), E = e === "split" && N && (S !== 100 || A), $ = e === "split" && N && S >= 100, _ = e === "split" || !N, [R, V] = j(null), [T, D] = j(!1), L = (Y) => {
11324
11324
  if (Y !== e) {
11325
11325
  if (Y === "single") {
11326
- const W = v[0]?.fund ?? null;
11326
+ const q = v[0]?.fund ?? null;
11327
11327
  f([
11328
11328
  {
11329
11329
  id: t[0]?.id ?? crypto.randomUUID(),
11330
- fund: W,
11331
- percentage: W ? 100 : 0
11330
+ fund: q,
11331
+ percentage: q ? 100 : 0
11332
11332
  }
11333
11333
  ]);
11334
11334
  } else {
11335
- const W = v[0];
11335
+ const q = v[0];
11336
11336
  f([
11337
11337
  {
11338
- id: W?.id ?? crypto.randomUUID(),
11339
- fund: W?.fund ?? null,
11340
- percentage: W?.fund ? 50 : 0
11338
+ id: q?.id ?? crypto.randomUUID(),
11339
+ fund: q?.fund ?? null,
11340
+ percentage: q?.fund ? 50 : 0
11341
11341
  },
11342
11342
  ma()
11343
11343
  ]);
11344
11344
  }
11345
11345
  u(Y);
11346
11346
  }
11347
- }, z = (Y, W) => {
11347
+ }, P = (Y, q) => {
11348
11348
  f(
11349
11349
  t.map(
11350
- (fe) => fe.id === Y ? { ...fe, ...W } : fe
11350
+ (oe) => oe.id === Y ? { ...oe, ...q } : oe
11351
11351
  )
11352
11352
  );
11353
11353
  }, K = () => {
11354
- I || f([...t, ma()]);
11355
- }, Z = (Y) => {
11354
+ $ || f([...t, ma()]);
11355
+ }, X = (Y) => {
11356
11356
  if (!(t.length <= 2)) {
11357
11357
  if (!a) {
11358
- f(t.filter((W) => W.id !== Y));
11358
+ f(t.filter((q) => q.id !== Y));
11359
11359
  return;
11360
11360
  }
11361
- B(Y);
11361
+ V(Y);
11362
11362
  }
11363
11363
  }, J = () => {
11364
- if (!P || t.length <= 2) {
11365
- B(null);
11364
+ if (!R || t.length <= 2) {
11365
+ V(null);
11366
11366
  return;
11367
11367
  }
11368
- f(t.filter((Y) => Y.id !== P)), B(null);
11369
- }, ce = () => {
11368
+ f(t.filter((Y) => Y.id !== R)), V(null);
11369
+ }, ae = () => {
11370
11370
  if (!s) {
11371
11371
  if (!a) {
11372
11372
  b();
11373
11373
  return;
11374
11374
  }
11375
- T(!0);
11375
+ D(!0);
11376
11376
  }
11377
- }, ae = () => {
11378
- T(!1), b();
11377
+ }, le = () => {
11378
+ D(!1), b();
11379
11379
  }, me = (Y) => {
11380
- const W = o ?? t.find((fe) => !fe.fund)?.id ?? t[0]?.id;
11381
- W && (f(
11380
+ const q = o ?? t.find((oe) => !oe.fund)?.id ?? t[0]?.id;
11381
+ q && (f(
11382
11382
  t.map(
11383
- (fe) => fe.id === W ? { ...fe, fund: Y, percentage: e === "single" ? 100 : fe.percentage } : fe
11383
+ (oe) => oe.id === q ? { ...oe, fund: Y, percentage: e === "single" ? 100 : oe.percentage } : oe
11384
11384
  )
11385
11385
  ), h());
11386
11386
  };
@@ -11411,7 +11411,7 @@ function Ig({
11411
11411
  }
11412
11412
  ),
11413
11413
  /* @__PURE__ */ c(
11414
- q,
11414
+ W,
11415
11415
  {
11416
11416
  type: "button",
11417
11417
  size: "sm",
@@ -11420,7 +11420,7 @@ function Ig({
11420
11420
  className: "ml-auto h-9 min-w-40 bg-brand px-4 text-sm font-medium text-white",
11421
11421
  startContent: /* @__PURE__ */ c(U, { icon: "solar:cloud-upload-outline", className: "size-4" }),
11422
11422
  isLoading: s,
11423
- onPress: ce,
11423
+ onPress: ae,
11424
11424
  children: y.saveAssignment
11425
11425
  }
11426
11426
  )
@@ -11447,19 +11447,19 @@ function Ig({
11447
11447
  total: M,
11448
11448
  hasTotalError: E,
11449
11449
  onSelectFund: (Y) => m(Y),
11450
- onRemoveFund: Z,
11451
- onPercentageChange: (Y, W) => z(Y, { percentage: Nm(W) })
11450
+ onRemoveFund: X,
11451
+ onPercentageChange: (Y, q) => P(Y, { percentage: Nm(q) })
11452
11452
  }
11453
11453
  ),
11454
11454
  _ && /* @__PURE__ */ c("div", { className: "flex flex-wrap gap-3", children: /* @__PURE__ */ c(
11455
- q,
11455
+ W,
11456
11456
  {
11457
11457
  type: "button",
11458
11458
  color: "default",
11459
11459
  radius: "full",
11460
11460
  className: "h-11 bg-zinc-950 px-4 text-base font-normal text-white disabled:opacity-50",
11461
11461
  startContent: /* @__PURE__ */ c(vi, { className: "size-5", strokeWidth: 2 }),
11462
- isDisabled: I,
11462
+ isDisabled: $,
11463
11463
  onPress: () => e === "split" && N ? K() : m(),
11464
11464
  children: e === "split" && N ? y.addFund : y.assignSpecificFund
11465
11465
  }
@@ -11482,7 +11482,7 @@ function Ig({
11482
11482
  /* @__PURE__ */ c(
11483
11483
  ai,
11484
11484
  {
11485
- isOpen: $,
11485
+ isOpen: T,
11486
11486
  labels: {
11487
11487
  title: y.modifyAssignedFundsTitle,
11488
11488
  description: /* @__PURE__ */ g(Ne, { children: [
@@ -11495,14 +11495,14 @@ function Ig({
11495
11495
  icon: /* @__PURE__ */ c(U, { icon: "solar:info-circle-outline", className: "size-7" }),
11496
11496
  iconTone: "warning",
11497
11497
  confirmColor: "primary",
11498
- onClose: () => T(!1),
11499
- onConfirm: ae
11498
+ onClose: () => D(!1),
11499
+ onConfirm: le
11500
11500
  }
11501
11501
  ),
11502
11502
  /* @__PURE__ */ c(
11503
11503
  ai,
11504
11504
  {
11505
- isOpen: P !== null,
11505
+ isOpen: R !== null,
11506
11506
  labels: {
11507
11507
  title: y.modifyAssignedFundsTitle,
11508
11508
  description: /* @__PURE__ */ g(Ne, { children: [
@@ -11515,7 +11515,7 @@ function Ig({
11515
11515
  icon: /* @__PURE__ */ c(U, { icon: "solar:info-circle-outline", className: "size-7" }),
11516
11516
  iconTone: "warning",
11517
11517
  confirmColor: "primary",
11518
- onClose: () => B(null),
11518
+ onClose: () => V(null),
11519
11519
  onConfirm: J
11520
11520
  }
11521
11521
  )
@@ -11577,7 +11577,7 @@ function Cm({
11577
11577
  o.fund.accountName
11578
11578
  ] }),
11579
11579
  /* @__PURE__ */ c(
11580
- q,
11580
+ W,
11581
11581
  {
11582
11582
  type: "button",
11583
11583
  variant: "light",
@@ -11588,7 +11588,7 @@ function Cm({
11588
11588
  }
11589
11589
  )
11590
11590
  ] }) : /* @__PURE__ */ c(
11591
- q,
11591
+ W,
11592
11592
  {
11593
11593
  type: "button",
11594
11594
  variant: "light",
@@ -11616,7 +11616,7 @@ function Cm({
11616
11616
  }
11617
11617
  ) }),
11618
11618
  e === "split" && t.length > 2 && /* @__PURE__ */ c(
11619
- q,
11619
+ W,
11620
11620
  {
11621
11621
  type: "button",
11622
11622
  isIconOnly: !0,
@@ -11729,7 +11729,7 @@ function Am({ funds: e, labels: t, selectedFundIds: n, onSelect: r, onClose: i }
11729
11729
  /* @__PURE__ */ c("span", { children: o.accountName }),
11730
11730
  o.type ? /* @__PURE__ */ c("span", { className: "w-fit rounded-full bg-warning-50 px-3 py-1 text-sm font-medium text-warning-500", children: o.type }) : /* @__PURE__ */ c("span", { className: "text-sm text-zinc-400", children: "-" }),
11731
11731
  /* @__PURE__ */ c(
11732
- q,
11732
+ W,
11733
11733
  {
11734
11734
  type: "button",
11735
11735
  variant: "bordered",
@@ -11751,7 +11751,7 @@ function Am({ funds: e, labels: t, selectedFundIds: n, onSelect: r, onClose: i }
11751
11751
  }
11752
11752
  );
11753
11753
  }
11754
- function $g() {
11754
+ function Fg() {
11755
11755
  return /* @__PURE__ */ g(
11756
11756
  "section",
11757
11757
  {
@@ -11780,7 +11780,7 @@ const Mm = {
11780
11780
  remainingBalance: "Remaining Balance",
11781
11781
  amountReceived: "Amount Received:"
11782
11782
  };
11783
- function Og({
11783
+ function Pg({
11784
11784
  totalAmount: e,
11785
11785
  remainingBalance: t,
11786
11786
  amountReceived: n,
@@ -12374,7 +12374,7 @@ const Zm = {
12374
12374
  return null;
12375
12375
  }
12376
12376
  };
12377
- function Lg({
12377
+ function zg({
12378
12378
  mode: e,
12379
12379
  donationAmount: t,
12380
12380
  currency: n = "USD",
@@ -12394,13 +12394,13 @@ function Lg({
12394
12394
  () => new Intl.NumberFormat(r, { style: "currency", currency: n }),
12395
12395
  [n, r]
12396
12396
  ), y = e === "automatic" ? Qm(t, s) : i, v = Se(
12397
- () => ci(y.reduce((E, I) => E + Number(I.amount || 0), 0)),
12397
+ () => ci(y.reduce((E, $) => E + Number($.amount || 0), 0)),
12398
12398
  [y]
12399
12399
  ), N = (E) => {
12400
12400
  E !== e && (u(E), E === "manual" && i.length === 0 && m([va()]));
12401
- }, M = (E, I) => {
12402
- i.find((P) => P.id === E)?.status !== "paid" && m(
12403
- i.map((P) => P.id === E ? { ...P, ...I } : P)
12401
+ }, M = (E, $) => {
12402
+ i.find((R) => R.id === E)?.status !== "paid" && m(
12403
+ i.map((R) => R.id === E ? { ...R, ...$ } : R)
12404
12404
  );
12405
12405
  }, S = () => {
12406
12406
  m([...i, va()]);
@@ -12433,7 +12433,7 @@ function Lg({
12433
12433
  }
12434
12434
  ),
12435
12435
  /* @__PURE__ */ c(
12436
- q,
12436
+ W,
12437
12437
  {
12438
12438
  type: "button",
12439
12439
  size: "sm",
@@ -12481,7 +12481,7 @@ function Lg({
12481
12481
  }
12482
12482
  ),
12483
12483
  e === "manual" && /* @__PURE__ */ c("div", { className: "flex flex-wrap gap-3", children: /* @__PURE__ */ c(
12484
- q,
12484
+ W,
12485
12485
  {
12486
12486
  type: "button",
12487
12487
  variant: "bordered",
@@ -12682,7 +12682,7 @@ function sp({
12682
12682
  onRemove: r
12683
12683
  }) {
12684
12684
  const i = /* @__PURE__ */ c(
12685
- q,
12685
+ W,
12686
12686
  {
12687
12687
  type: "button",
12688
12688
  isIconOnly: !0,
@@ -12736,7 +12736,7 @@ function ap({
12736
12736
  }
12737
12737
  );
12738
12738
  }
12739
- function Fg() {
12739
+ function Rg() {
12740
12740
  return /* @__PURE__ */ g(
12741
12741
  "section",
12742
12742
  {
@@ -12812,7 +12812,7 @@ const wa = {
12812
12812
  deleteInstallmentConfirmationConfirm: "Confirm",
12813
12813
  noInstallmentsFound: "No payments found."
12814
12814
  };
12815
- function Pg({
12815
+ function _g({
12816
12816
  installments: e,
12817
12817
  currency: t,
12818
12818
  locale: n = "en-US",
@@ -12875,7 +12875,7 @@ function Pg({
12875
12875
  )
12876
12876
  ] }),
12877
12877
  /* @__PURE__ */ c(
12878
- q,
12878
+ W,
12879
12879
  {
12880
12880
  type: "button",
12881
12881
  variant: "bordered",
@@ -12929,7 +12929,7 @@ function Pg({
12929
12929
  ) }),
12930
12930
  /* @__PURE__ */ c("td", { className: "px-2 py-3", children: /* @__PURE__ */ g("div", { className: "flex min-w-[154px] items-center justify-start gap-2", children: [
12931
12931
  /* @__PURE__ */ c(
12932
- q,
12932
+ W,
12933
12933
  {
12934
12934
  type: "button",
12935
12935
  size: "sm",
@@ -12981,7 +12981,7 @@ function op({
12981
12981
  return /* @__PURE__ */ g(Ne, { children: [
12982
12982
  /* @__PURE__ */ g(di, { placement: "bottom-end", radius: "lg", children: [
12983
12983
  /* @__PURE__ */ c(ui, { children: /* @__PURE__ */ c(
12984
- q,
12984
+ W,
12985
12985
  {
12986
12986
  type: "button",
12987
12987
  isIconOnly: !0,
@@ -13063,7 +13063,7 @@ const dp = {
13063
13063
  title: "Select Membership",
13064
13064
  renewalTitle: "Automatic Renewal",
13065
13065
  renewalDescription: "Membership will automatically renew at the end of each period"
13066
- }, zg = ({
13066
+ }, Bg = ({
13067
13067
  cards: e,
13068
13068
  locale: t,
13069
13069
  currency: n,
@@ -13078,7 +13078,7 @@ const dp = {
13078
13078
  className: f = ""
13079
13079
  }) => {
13080
13080
  const m = Array.isArray(e) ? e : [], [h, x] = j(l), [b, y] = j(a), v = { ...dp, ...i };
13081
- Ue(() => {
13081
+ _e(() => {
13082
13082
  x(l);
13083
13083
  }, [l]);
13084
13084
  const N = (S) => {
@@ -13572,7 +13572,7 @@ const dp = {
13572
13572
  }
13573
13573
  )
13574
13574
  ] });
13575
- }, Rg = ({
13575
+ }, Vg = ({
13576
13576
  initialExpanded: e = !1,
13577
13577
  userMaxLimit: t,
13578
13578
  labels: n,
@@ -13589,11 +13589,11 @@ const dp = {
13589
13589
  );
13590
13590
  return new Map(N);
13591
13591
  }, [l]), h = gp(l, d, t), x = (N, M, S) => d[N]?.[M]?.[S]?.selectedQuantity ?? 0, b = () => Ao(d), y = (N, M, S, A) => {
13592
- const E = x(N, M, S), I = b() - E;
13593
- if (t !== void 0 && I + A > t) return;
13592
+ const E = x(N, M, S), $ = b() - E;
13593
+ if (t !== void 0 && $ + A > t) return;
13594
13594
  const _ = m.get(Ca(N, M, S));
13595
13595
  if (!_) return;
13596
- const P = {
13596
+ const R = {
13597
13597
  ...d,
13598
13598
  [N]: {
13599
13599
  ...d[N],
@@ -13608,12 +13608,12 @@ const dp = {
13608
13608
  }
13609
13609
  }
13610
13610
  };
13611
- u(P), a?.(P);
13611
+ u(R), a?.(R);
13612
13612
  }, v = (N) => {
13613
13613
  const M = Sa(l, t, N);
13614
13614
  u(M), a?.(M);
13615
13615
  };
13616
- return Ue(() => {
13616
+ return _e(() => {
13617
13617
  !f.current && h && (a?.(d), f.current = !0);
13618
13618
  }, [h, d, a]), /* @__PURE__ */ g("div", { className: k("flex flex-col w-full font-sans", s), "data-testid": "ticket-selection", children: [
13619
13619
  /* @__PURE__ */ g("div", { className: "flex items-center justify-between py-2 gap-4", "data-testid": "ticket-selection-header", children: [
@@ -13649,7 +13649,7 @@ const dp = {
13649
13649
  changeLabel: "Change",
13650
13650
  changeMessageTemplate: "You have to give back the client {change} in change",
13651
13651
  insufficientMessageTemplate: "Amount received must be at least {due}"
13652
- }, Fr = (e, t) => Object.entries(t).reduce((n, [r, i]) => n.replace(`{${r}}`, i), e), _g = ({
13652
+ }, Fr = (e, t) => Object.entries(t).reduce((n, [r, i]) => n.replace(`{${r}}`, i), e), Hg = ({
13653
13653
  dueAmount: e,
13654
13654
  received: t,
13655
13655
  defaultReceived: n = null,
@@ -13663,46 +13663,46 @@ const dp = {
13663
13663
  "data-testid": u = "cash-tender-form"
13664
13664
  }) => {
13665
13665
  const f = { ...kp, ...s }, m = Ua(e.currency, i), h = t !== void 0, [x, b] = j(n ?? null), y = h ? t : x, v = Se(() => {
13666
- const L = typeof y == "number" && Number.isFinite(y) ? y : 0, z = ds(L, e.value, e.currency, i);
13666
+ const L = typeof y == "number" && Number.isFinite(y) ? y : 0, P = ds(L, e.value, e.currency, i);
13667
13667
  return {
13668
13668
  received: L,
13669
- change: z > 0 ? z : 0,
13669
+ change: P > 0 ? P : 0,
13670
13670
  isValid: L >= e.value && L > 0
13671
13671
  };
13672
13672
  }, [y, e.value, e.currency, i]), N = te((L) => {
13673
- const z = L.currentTarget;
13673
+ const P = L.currentTarget;
13674
13674
  requestAnimationFrame(() => {
13675
- z.isConnected && z.select();
13675
+ P.isConnected && P.select();
13676
13676
  });
13677
13677
  }, []), M = te(
13678
13678
  (L) => {
13679
13679
  if (a) return;
13680
- const z = L.replace(/[^\d.,]/g, "").replace(",", "."), K = z === "" ? null : Number.parseFloat(z), Z = K === null || Number.isNaN(K) ? null : K;
13681
- if (Z !== null && l !== void 0 && Z > l)
13680
+ const P = L.replace(/[^\d.,]/g, "").replace(",", "."), K = P === "" ? null : Number.parseFloat(P), X = K === null || Number.isNaN(K) ? null : K;
13681
+ if (X !== null && l !== void 0 && X > l)
13682
13682
  return;
13683
- h || b(Z);
13684
- const J = typeof Z == "number" && Number.isFinite(Z) ? Z : 0, ce = ds(J, e.value, e.currency, i);
13683
+ h || b(X);
13684
+ const J = typeof X == "number" && Number.isFinite(X) ? X : 0, ae = ds(J, e.value, e.currency, i);
13685
13685
  r?.({
13686
13686
  received: J,
13687
- change: ce > 0 ? ce : 0,
13687
+ change: ae > 0 ? ae : 0,
13688
13688
  isValid: J >= e.value && J > 0
13689
13689
  });
13690
13690
  },
13691
13691
  [h, a, e.value, e.currency, i, r, l]
13692
- ), S = y == null ? "" : String(y), A = v.isValid && v.change > 0, E = !v.isValid && v.received > 0, I = Mt(v.change, i, e.currency), _ = Mt(e.value, i, e.currency), [P, B] = j(""), $ = ft(null);
13693
- Ue(() => {
13694
- $.current && clearTimeout($.current);
13695
- const L = A ? Fr(f.changeMessageTemplate, { change: I }) : "", z = A ? Np : 0;
13696
- return $.current = setTimeout(() => B(L), z), () => {
13697
- $.current && clearTimeout($.current);
13692
+ ), S = y == null ? "" : String(y), A = v.isValid && v.change > 0, E = !v.isValid && v.received > 0, $ = Mt(v.change, i, e.currency), _ = Mt(e.value, i, e.currency), [R, V] = j(""), T = ft(null);
13693
+ _e(() => {
13694
+ T.current && clearTimeout(T.current);
13695
+ const L = A ? Fr(f.changeMessageTemplate, { change: $ }) : "", P = A ? Np : 0;
13696
+ return T.current = setTimeout(() => V(L), P), () => {
13697
+ T.current && clearTimeout(T.current);
13698
13698
  };
13699
- }, [A, I, f.changeMessageTemplate]);
13700
- const T = `${u}-received`;
13699
+ }, [A, $, f.changeMessageTemplate]);
13700
+ const D = `${u}-received`;
13701
13701
  return /* @__PURE__ */ g("div", { className: k("flex flex-col gap-3", d), "data-testid": u, children: [
13702
13702
  /* @__PURE__ */ c(
13703
13703
  Oe,
13704
13704
  {
13705
- id: T,
13705
+ id: D,
13706
13706
  label: f.receivedLabel,
13707
13707
  labelPlacement: "outside",
13708
13708
  type: "text",
@@ -13739,7 +13739,7 @@ const dp = {
13739
13739
  radius: "lg",
13740
13740
  title: f.changeLabel,
13741
13741
  description: Fr(f.changeMessageTemplate, {
13742
- change: I
13742
+ change: $
13743
13743
  }),
13744
13744
  icon: /* @__PURE__ */ c(U, { icon: "lucide:info", width: 20, height: 20, "aria-hidden": "true" }),
13745
13745
  "aria-live": "off",
@@ -13758,7 +13758,7 @@ const dp = {
13758
13758
  }
13759
13759
  }
13760
13760
  ),
13761
- /* @__PURE__ */ c("span", { role: "status", "aria-live": "polite", className: "sr-only", children: P })
13761
+ /* @__PURE__ */ c("span", { role: "status", "aria-live": "polite", className: "sr-only", children: R })
13762
13762
  ] });
13763
13763
  }, Sp = {
13764
13764
  checkNumberLabel: "Check Number",
@@ -13802,26 +13802,26 @@ const dp = {
13802
13802
  } : b,
13803
13803
  [x, t, b]
13804
13804
  ), S = te(
13805
- ($) => {
13806
- x || y($);
13807
- const T = $.checkNumber.trim(), L = {
13805
+ (T) => {
13806
+ x || y(T);
13807
+ const D = T.checkNumber.trim(), L = {
13808
13808
  amount: e.value,
13809
- checkNumber: T,
13810
- bankName: $.bankName.trim() || void 0,
13811
- date: s ? void 0 : $.date,
13812
- isValid: T.length > 0 && e.value > 0
13809
+ checkNumber: D,
13810
+ bankName: T.bankName.trim() || void 0,
13811
+ date: s ? void 0 : T.date,
13812
+ isValid: D.length > 0 && e.value > 0
13813
13813
  };
13814
13814
  r?.(L);
13815
13815
  },
13816
13816
  [x, e.value, s, r]
13817
13817
  ), A = te(
13818
- ($) => (T) => {
13819
- l || ($ === "checkNumber" && T.length > 0 && N(!0), S({ ...M, [$]: T }));
13818
+ (T) => (D) => {
13819
+ l || (T === "checkNumber" && D.length > 0 && N(!0), S({ ...M, [T]: D }));
13820
13820
  },
13821
13821
  [M, S, l]
13822
13822
  ), E = te(() => {
13823
13823
  l || N(!0);
13824
- }, [l]), I = v && M.checkNumber.trim() === "", _ = `${m}-check-number`, P = `${m}-bank-name`, B = `${m}-date`;
13824
+ }, [l]), $ = v && M.checkNumber.trim() === "", _ = `${m}-check-number`, R = `${m}-bank-name`, V = `${m}-date`;
13825
13825
  return /* @__PURE__ */ g("div", { className: k("grid grid-cols-1 sm:grid-cols-2 gap-4", f), "data-testid": m, children: [
13826
13826
  /* @__PURE__ */ c(
13827
13827
  Oe,
@@ -13831,13 +13831,13 @@ const dp = {
13831
13831
  labelPlacement: "outside",
13832
13832
  type: "text",
13833
13833
  value: M.checkNumber,
13834
- onChange: ($) => A("checkNumber")($.target.value),
13834
+ onChange: (T) => A("checkNumber")(T.target.value),
13835
13835
  onBlur: E,
13836
13836
  placeholder: h.checkNumberPlaceholder,
13837
13837
  maxLength: o,
13838
13838
  isRequired: !0,
13839
- isInvalid: I,
13840
- errorMessage: I ? h.checkNumberRequiredMessage : void 0,
13839
+ isInvalid: $,
13840
+ errorMessage: $ ? h.checkNumberRequiredMessage : void 0,
13841
13841
  isDisabled: l,
13842
13842
  variant: "bordered",
13843
13843
  radius: "lg",
@@ -13848,12 +13848,12 @@ const dp = {
13848
13848
  !a && /* @__PURE__ */ c(
13849
13849
  Oe,
13850
13850
  {
13851
- id: P,
13851
+ id: R,
13852
13852
  label: h.bankNameLabel,
13853
13853
  labelPlacement: "outside",
13854
13854
  type: "text",
13855
13855
  value: M.bankName,
13856
- onChange: ($) => A("bankName")($.target.value),
13856
+ onChange: (T) => A("bankName")(T.target.value),
13857
13857
  placeholder: h.bankNamePlaceholder,
13858
13858
  maxLength: d,
13859
13859
  isDisabled: l,
@@ -13865,12 +13865,12 @@ const dp = {
13865
13865
  !s && /* @__PURE__ */ c(
13866
13866
  Oe,
13867
13867
  {
13868
- id: B,
13868
+ id: V,
13869
13869
  label: h.dateLabel,
13870
13870
  labelPlacement: "outside",
13871
13871
  type: "date",
13872
13872
  value: M.date,
13873
- onChange: ($) => A("date")($.target.value),
13873
+ onChange: (T) => A("date")(T.target.value),
13874
13874
  isDisabled: l,
13875
13875
  variant: "bordered",
13876
13876
  radius: "lg",
@@ -13926,7 +13926,7 @@ const Ap = {
13926
13926
  ), y = te(
13927
13927
  (A) => {
13928
13928
  f || h(A);
13929
- const E = b(A.method), I = {
13929
+ const E = b(A.method), $ = {
13930
13930
  amount: e.value,
13931
13931
  method: A.method,
13932
13932
  description: E,
@@ -13938,7 +13938,7 @@ const Ap = {
13938
13938
  // pre-rendered with no amount.
13939
13939
  isValid: A.method !== ""
13940
13940
  };
13941
- i?.(I);
13941
+ i?.($);
13942
13942
  },
13943
13943
  [f, e.value, i, b]
13944
13944
  ), v = te(
@@ -14104,7 +14104,7 @@ const Fp = ({
14104
14104
  dataTestId: d
14105
14105
  }) => {
14106
14106
  const u = s ? /* @__PURE__ */ c(
14107
- q,
14107
+ W,
14108
14108
  {
14109
14109
  isIconOnly: !0,
14110
14110
  variant: "light",
@@ -14180,7 +14180,7 @@ const Fp = ({
14180
14180
  from { opacity: 0; transform: translateY(-6px); }
14181
14181
  to { opacity: 1; transform: translateY(0); }
14182
14182
  }
14183
- `, zp = V.forwardRef(
14183
+ `, zp = B.forwardRef(
14184
14184
  ({ children: e, relativeOverlayRoot: t = !0, className: n, style: r, "data-testid": i = "modal-shell" }, s) => /* @__PURE__ */ g(Ne, { children: [
14185
14185
  /* @__PURE__ */ c("style", { children: Pp }),
14186
14186
  /* @__PURE__ */ c(
@@ -14234,7 +14234,7 @@ const Rp = ({
14234
14234
  /* @__PURE__ */ g("div", { className: "flex items-center gap-2", children: [
14235
14235
  r,
14236
14236
  t && /* @__PURE__ */ c(
14237
- q,
14237
+ W,
14238
14238
  {
14239
14239
  isIconOnly: !0,
14240
14240
  variant: "light",
@@ -14369,7 +14369,7 @@ const Bp = {
14369
14369
  children: e.map((u) => {
14370
14370
  const f = t === u.key;
14371
14371
  return /* @__PURE__ */ g(
14372
- q,
14372
+ W,
14373
14373
  {
14374
14374
  variant: "bordered",
14375
14375
  radius: "lg",
@@ -14561,7 +14561,7 @@ const Mo = ({
14561
14561
  }
14562
14562
  ),
14563
14563
  i && /* @__PURE__ */ c(
14564
- q,
14564
+ W,
14565
14565
  {
14566
14566
  isIconOnly: !0,
14567
14567
  variant: "light",
@@ -14644,7 +14644,7 @@ const Kp = ({
14644
14644
  }
14645
14645
  ),
14646
14646
  o && /* @__PURE__ */ c(
14647
- q,
14647
+ W,
14648
14648
  {
14649
14649
  color: "default",
14650
14650
  variant: "bordered",
@@ -14755,7 +14755,7 @@ const Yp = ({
14755
14755
  /* @__PURE__ */ c(gi, { id: `${o}-body`, className: "text-sm text-default-700", children: n }),
14756
14756
  /* @__PURE__ */ g($a, { className: "grid grid-cols-2 gap-3", children: [
14757
14757
  /* @__PURE__ */ c(
14758
- q,
14758
+ W,
14759
14759
  {
14760
14760
  variant: "bordered",
14761
14761
  radius: "full",
@@ -14766,7 +14766,7 @@ const Yp = ({
14766
14766
  }
14767
14767
  ),
14768
14768
  /* @__PURE__ */ c(
14769
- q,
14769
+ W,
14770
14770
  {
14771
14771
  color: i,
14772
14772
  variant: "solid",
@@ -14812,7 +14812,7 @@ const Gp = 60, Qp = (e, t, n = Gp) => t ? e > n : e < -n, Eo = (e, t) => Math.ma
14812
14812
  /* @__PURE__ */ g("div", { className: "flex shrink-0 items-center", children: [
14813
14813
  e.amount && /* @__PURE__ */ c("span", { "data-testid": `summary-item-amount-${e.id}`, className: "whitespace-nowrap text-base text-foreground", children: bn(e.amount, t) }),
14814
14814
  n && /* @__PURE__ */ c(
14815
- q,
14815
+ W,
14816
14816
  {
14817
14817
  isIconOnly: !0,
14818
14818
  size: "sm",
@@ -14974,7 +14974,7 @@ const Qn = ({
14974
14974
  className: n,
14975
14975
  testId: r = "summary-cta"
14976
14976
  }) => /* @__PURE__ */ c(
14977
- q,
14977
+ W,
14978
14978
  {
14979
14979
  color: "primary",
14980
14980
  radius: "full",
@@ -15152,7 +15152,14 @@ const Fo = ({
15152
15152
  ] })
15153
15153
  ] });
15154
15154
  Fo.displayName = "SummaryActionBar";
15155
- const ng = ({
15155
+ const ng = "(max-width: 767px)", rg = (e) => typeof window < "u" && typeof window.matchMedia == "function" ? window.matchMedia(e).matches : !1, ig = (e = ng) => {
15156
+ const [t, n] = j(() => rg(e));
15157
+ return _e(() => {
15158
+ if (typeof window > "u" || typeof window.matchMedia != "function") return;
15159
+ const r = window.matchMedia(e), i = () => n(r.matches);
15160
+ return i(), r.addEventListener("change", i), () => r.removeEventListener("change", i);
15161
+ }, [e]), t;
15162
+ }, sg = ({
15156
15163
  title: e = "Summary",
15157
15164
  pricesInLabel: t = "Prices are in",
15158
15165
  currency: n,
@@ -15162,12 +15169,12 @@ const ng = ({
15162
15169
  rows: a,
15163
15170
  total: l,
15164
15171
  collapsible: o,
15165
- isOpen: d = !0,
15172
+ isOpen: d,
15166
15173
  onToggleOpen: u,
15167
15174
  primaryAction: f,
15168
15175
  isLoading: m = !1,
15169
15176
  onRemoveItem: h,
15170
- variant: x = "main",
15177
+ variant: x,
15171
15178
  cart: b,
15172
15179
  emptyState: y,
15173
15180
  labels: v,
@@ -15175,9 +15182,9 @@ const ng = ({
15175
15182
  "data-testid": M = "summary",
15176
15183
  className: S
15177
15184
  }) => {
15178
- const A = v?.removeAriaLabel ?? "Remove item", E = v?.toggleAriaLabel ?? "Toggle summary", I = v?.cartAriaLabel ?? "View cart", _ = o ?? x === "mobile", P = !_ || d, [B, $] = j(0), [T, L] = j(null), z = te((Y) => {
15179
- Y && $(Y.scrollHeight);
15180
- }, []), K = tg({ open: P, fullHeight: B, setDragHeight: L, onToggleOpen: u }), Z = T !== null, J = Xp(T, P, B), ce = B > 0 ? Math.min(1, Math.max(0, J / B)) : P ? 1 : 0, ae = /* @__PURE__ */ c($o, { total: l, locale: r, className: N.total }), me = /* @__PURE__ */ c(
15185
+ const A = v?.removeAriaLabel ?? "Remove item", E = v?.toggleAriaLabel ?? "Toggle summary", $ = v?.cartAriaLabel ?? "View cart", _ = ig(), V = o ?? (x ?? (_ ? "mobile" : "main")) === "mobile", T = !V || (d ?? !1), [D, L] = j(0), [P, K] = j(null), X = te((oe) => {
15186
+ oe && L(oe.scrollHeight);
15187
+ }, []), J = tg({ open: T, fullHeight: D, setDragHeight: K, onToggleOpen: u }), ae = P !== null, le = Xp(P, T, D), me = D > 0 ? Math.min(1, Math.max(0, le / D)) : T ? 1 : 0, Y = /* @__PURE__ */ c($o, { total: l, locale: r, className: N.total }), q = /* @__PURE__ */ c(
15181
15188
  Io,
15182
15189
  {
15183
15190
  pricesInLabel: t,
@@ -15192,7 +15199,7 @@ const ng = ({
15192
15199
  classNames: N
15193
15200
  }
15194
15201
  );
15195
- return _ ? /* @__PURE__ */ g(
15202
+ return V ? /* @__PURE__ */ g(
15196
15203
  Ln.section,
15197
15204
  {
15198
15205
  "data-testid": M,
@@ -15200,10 +15207,10 @@ const ng = ({
15200
15207
  dragConstraints: { top: 0, bottom: 0 },
15201
15208
  dragElastic: 0.12,
15202
15209
  dragSnapToOrigin: !0,
15203
- onDrag: K.onDrag,
15204
- onDragEnd: K.onDragEnd,
15210
+ onDrag: J.onDrag,
15211
+ onDragEnd: J.onDragEnd,
15205
15212
  className: k(
15206
- "flex w-full flex-col rounded-t-2xl bg-content1 p-4 drop-shadow-[0_-2px_2px_rgba(0,0,0,0.1)]",
15213
+ "fixed inset-x-0 bottom-0 z-50 flex w-full flex-col rounded-t-2xl bg-content1 p-4 drop-shadow-[0_-2px_2px_rgba(0,0,0,0.1)]",
15207
15214
  S,
15208
15215
  N.base
15209
15216
  ),
@@ -15214,9 +15221,9 @@ const ng = ({
15214
15221
  title: e,
15215
15222
  total: l,
15216
15223
  locale: r,
15217
- open: P,
15218
- progress: ce,
15219
- dragging: Z,
15224
+ open: T,
15225
+ progress: me,
15226
+ dragging: ae,
15220
15227
  toggleAriaLabel: E,
15221
15228
  onToggleOpen: u,
15222
15229
  classNames: N
@@ -15226,26 +15233,26 @@ const ng = ({
15226
15233
  "div",
15227
15234
  {
15228
15235
  "data-testid": "summary-reveal",
15229
- "aria-hidden": !P,
15230
- style: { height: J },
15231
- className: k("overflow-hidden", !P && "pointer-events-none", eg(Z)),
15232
- children: /* @__PURE__ */ g("div", { ref: z, className: "flex flex-col gap-4 pb-4", children: [
15233
- me,
15236
+ "aria-hidden": !T,
15237
+ style: { height: le },
15238
+ className: k("overflow-hidden", !T && "pointer-events-none", eg(ae)),
15239
+ children: /* @__PURE__ */ g("div", { ref: X, className: "flex flex-col gap-4 pb-4", children: [
15240
+ q,
15234
15241
  /* @__PURE__ */ c(At, { className: "bg-default-200" }),
15235
- ae
15242
+ Y
15236
15243
  ] })
15237
15244
  }
15238
15245
  ),
15239
15246
  /* @__PURE__ */ c(
15240
15247
  Fo,
15241
15248
  {
15242
- open: P,
15243
- progress: ce,
15244
- dragging: Z,
15249
+ open: T,
15250
+ progress: me,
15251
+ dragging: ae,
15245
15252
  primaryAction: f,
15246
15253
  isLoading: m,
15247
15254
  cart: b,
15248
- cartAriaLabel: I,
15255
+ cartAriaLabel: $,
15249
15256
  onToggleOpen: u,
15250
15257
  classNames: N
15251
15258
  }
@@ -15270,42 +15277,42 @@ const ng = ({
15270
15277
  children: e
15271
15278
  }
15272
15279
  ) }),
15273
- me,
15280
+ q,
15274
15281
  /* @__PURE__ */ c(At, { className: "bg-default-200" }),
15275
- ae,
15282
+ Y,
15276
15283
  f && /* @__PURE__ */ c(Qn, { action: f, disabledByLoading: m, className: k("w-full", N.cta) })
15277
15284
  ]
15278
15285
  }
15279
15286
  );
15280
15287
  };
15281
- ng.displayName = "Summary";
15288
+ sg.displayName = "Summary";
15282
15289
  export {
15283
- q as Button,
15284
- _g as CashTenderForm,
15290
+ W as Button,
15291
+ Hg as CashTenderForm,
15285
15292
  Cp as CheckTenderForm,
15286
- Og as CommitmentDetails,
15293
+ Pg as CommitmentDetails,
15287
15294
  Yp as ConfirmDialog,
15288
15295
  ai as ConfirmationModal,
15289
- vg as ConfirmationPageTemplate,
15296
+ kg as ConfirmationPageTemplate,
15290
15297
  Tf as DonationAmounts,
15291
- Sg as EventDetails,
15292
- wg as EventDetailsTemplate,
15298
+ Mg as EventDetails,
15299
+ Sg as EventDetailsTemplate,
15293
15300
  Of as ExpireCartTimer,
15294
- Ng as Footer,
15295
- bg as HeroUIProvider,
15296
- Ig as InstallmentFundAssignment,
15297
- $g as InstallmentFundAssignmentSkeleton,
15298
- Lg as InstallmentSchedule,
15299
- Fg as InstallmentScheduleSkeleton,
15300
- Pg as InstallmentTable,
15301
+ Cg as Footer,
15302
+ wg as HeroUIProvider,
15303
+ Lg as InstallmentFundAssignment,
15304
+ Fg as InstallmentFundAssignmentSkeleton,
15305
+ zg as InstallmentSchedule,
15306
+ Rg as InstallmentScheduleSkeleton,
15307
+ _g as InstallmentTable,
15301
15308
  up as ItemCard,
15302
15309
  Wp as LoadingOverlay,
15303
- zg as MembershipSelectCards,
15310
+ Bg as MembershipSelectCards,
15304
15311
  zp as ModalShell,
15305
15312
  _p as ModalShellFooter,
15306
15313
  Rp as ModalShellHeader,
15307
- kg as Multiselect,
15308
- xg as Navbar,
15314
+ Ag as Multiselect,
15315
+ Ng as Navbar,
15309
15316
  Yl as OfferCard,
15310
15317
  zh as OfferCardEmpty,
15311
15318
  _h as OfferCardError,
@@ -15325,24 +15332,24 @@ export {
15325
15332
  Bt as Select,
15326
15333
  Lp as SplitPaymentSummary,
15327
15334
  jc as Stepper,
15328
- ng as Summary,
15329
- Rg as TicketSelection,
15335
+ sg as Summary,
15336
+ Vg as TicketSelection,
15330
15337
  Hp as TileSelect,
15331
15338
  fp as Toggle,
15332
- Dg as calculateAllocationDifference,
15339
+ Og as calculateAllocationDifference,
15333
15340
  ds as computeChange,
15334
15341
  Ua as currencyFractionDigits,
15335
15342
  Mt as formatMoney,
15336
15343
  Fh as formatOfferCurrency,
15337
- Ag as formatRevenueAmount,
15338
- Mg as formatRevenueCurrency,
15344
+ Tg as formatRevenueAmount,
15345
+ Dg as formatRevenueCurrency,
15339
15346
  Qm as generateAutomaticInstallments,
15340
15347
  lo as generateDistributionId,
15341
- Eg as getCurrencySymbol,
15348
+ Ig as getCurrencySymbol,
15342
15349
  Uh as offerCardVariants,
15343
15350
  Hh as offerListVariants,
15344
- Cg as parseOfferCurrency,
15345
- Tg as parseRevenueCurrency,
15351
+ Eg as parseOfferCurrency,
15352
+ $g as parseRevenueCurrency,
15346
15353
  Wc as roundToCurrency
15347
15354
  };
15348
15355
  (function(){"use strict";try{if(typeof document<"u"){var r=document.createElement("style");r.appendChild(document.createTextNode('.ProseMirror{flex:1;width:100%;min-height:100%;height:100%;cursor:text;background-color:#fff;padding:1rem;overflow-y:auto;box-sizing:border-box}.ProseMirror p{min-height:1.5em}.dark .ProseMirror{background-color:rgb(var(--nextui-background))}.ProseMirror ul{list-style-type:disc!important;list-style-position:outside!important;padding-left:2rem!important;margin:1rem 0!important;display:block!important}.ProseMirror ol{list-style-type:decimal!important;list-style-position:outside!important;padding-left:2rem!important;margin:1rem 0!important;display:block!important}.ProseMirror ul li,.ProseMirror ol li{display:list-item!important;list-style:inherit!important;margin:.25rem 0!important}.ProseMirror ul li p,.ProseMirror ol li p{margin:0!important;display:inline!important}.ProseMirror ul[data-type=taskList]{list-style:none!important;padding-left:0!important;margin:1rem 0!important}.ProseMirror ul[data-type=taskList] li{display:flex!important;align-items:flex-start!important;margin:.5rem 0!important}.ProseMirror ul[data-type=taskList] li label{margin-right:.5rem;-webkit-user-select:none;-moz-user-select:none;user-select:none}.ProseMirror ul[data-type=taskList] li input[type=checkbox]{cursor:pointer;margin-top:.25rem}.ProseMirror h1,.ProseMirror h2,.ProseMirror h3,.ProseMirror h4,.ProseMirror h5,.ProseMirror h6{line-height:1.2!important;margin:1rem 0 .5rem!important;font-weight:600!important}.ProseMirror h1{font-size:2rem!important}.ProseMirror h2{font-size:1.5rem!important}.ProseMirror h3{font-size:1.25rem!important}.ProseMirror h4{font-size:1.1rem!important}.ProseMirror h5{font-size:1rem!important;font-weight:600!important}.ProseMirror h6{font-size:.9rem!important;font-weight:600!important}.ProseMirror code{background-color:rgb(var(--nextui-default-100));border-radius:.4rem;color:rgb(var(--nextui-default-800));font-size:.85rem;padding:.25em .3em}.ProseMirror pre{background:rgb(var(--nextui-default-900));border-radius:.5rem;color:rgb(var(--nextui-default-50));font-family:JetBrainsMono,monospace;margin:1.5rem 0;padding:.75rem 1rem;overflow-x:auto}.ProseMirror pre code{background:none;color:inherit;font-size:.8rem;padding:0}.ProseMirror mark{background-color:#faf594;border-radius:.4rem;-webkit-box-decoration-break:clone;box-decoration-break:clone;padding:.1rem .3rem}.ProseMirror blockquote{border-left:3px solid rgb(var(--nextui-default-300));margin:1.5rem 0;padding-left:1rem;color:rgb(var(--nextui-default-600))}.ProseMirror hr{border:none;border-top:1px solid rgb(var(--nextui-divider));margin:2rem 0}.ProseMirror a{color:rgb(var(--nextui-primary));text-decoration:underline;cursor:pointer}.ProseMirror a:hover{text-decoration:underline}.ProseMirror strong{font-weight:700!important}.ProseMirror em{font-style:italic!important}.ProseMirror s{text-decoration:line-through!important}.ProseMirror u{text-decoration:underline!important}.ProseMirror .has-text-align-left,.ProseMirror [style*="text-align: left"]{text-align:left!important}.ProseMirror .has-text-align-center,.ProseMirror [style*="text-align: center"]{text-align:center!important}.ProseMirror .has-text-align-right,.ProseMirror [style*="text-align: right"]{text-align:right!important}.ProseMirror .has-text-align-justify,.ProseMirror [style*="text-align: justify"]{text-align:justify!important}.ProseMirror ul li[style*="text-align: left"],.ProseMirror ol li[style*="text-align: left"]{text-align:left!important;list-style-position:inside!important}.ProseMirror ul li[style*="text-align: center"],.ProseMirror ol li[style*="text-align: center"]{text-align:center!important;list-style-position:inside!important}.ProseMirror ul li[style*="text-align: right"],.ProseMirror ol li[style*="text-align: right"]{text-align:right!important;list-style-position:inside!important}.ProseMirror ul li[style*="text-align: justify"],.ProseMirror ol li[style*="text-align: justify"]{text-align:justify!important;list-style-position:inside!important}.ProseMirror ul[data-type=taskList] li[style*="text-align: left"]{justify-content:flex-start!important}.ProseMirror ul[data-type=taskList] li[style*="text-align: center"]{justify-content:center!important}.ProseMirror ul[data-type=taskList] li[style*="text-align: right"]{justify-content:flex-end!important}.ProseMirror p.is-editor-empty:first-child:before{color:rgb(var(--nextui-default-400));content:attr(data-placeholder);float:left;height:0;pointer-events:none}')),document.head.appendChild(r)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();