@veevarts/design-system 1.0.0-dev.5 → 1.0.0-dev.7

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,30 +1,30 @@
1
1
  import { jsx as f, jsxs as T, Fragment as Ke } from "react/jsx-runtime";
2
- import { HeroUIProvider as ll, Button as al, cn as L, Select as di, SelectItem as fi, Alert as En, Divider as ks, Tooltip as At, Dropdown as vs, DropdownTrigger as Cs, DropdownMenu as Ss, DropdownItem as ws, Input as cl, Popover as ul, PopoverTrigger as dl, PopoverContent as fl, ButtonGroup as hl, useInput as pl, NumberInput as As, Card as Re, CardBody as Pe, CardHeader as Ns, Image as ml, CardFooter as gl, Chip as hi, Skeleton as ue, Autocomplete as yl, AutocompleteItem as bl, Checkbox as xl } from "@heroui/react";
2
+ import { HeroUIProvider as ol, Button as ll, cn as L, Select as di, SelectItem as fi, Alert as En, Divider as xs, Tooltip as At, Dropdown as ks, DropdownTrigger as vs, DropdownMenu as Cs, DropdownItem as Ss, Input as al, Popover as cl, PopoverTrigger as ul, PopoverContent as dl, ButtonGroup as fl, useInput as hl, NumberInput as ws, Card as Re, CardBody as Pe, CardHeader as As, Image as pl, CardFooter as ml, Chip as hi, Skeleton as ue, Autocomplete as gl, AutocompleteItem as yl, Checkbox as bl } from "@heroui/react";
3
3
  export * from "@heroui/react";
4
- import R, { useState as he, useRef as Ut, useEffect as et, useReducer as kl, useCallback as le, useMemo as lr, forwardRef as Tn, createElement as ar } from "react";
5
- import { Globe as pi, User as mi, Heading as Es, Check as Ts, ListTodo as Ms, ListOrdered as Os, List as Dr, AlignJustify as vl, AlignRight as Cl, AlignCenter as Sl, AlignLeft as Is, CornerDownLeft as wl, Redo2 as Al, Undo2 as Nl, Eraser as gi, Minus as El, Quote as Tl, CodeSquare as Ml, FileText as Ol, Link2 as Il, Highlighter as Ds, Palette as Ls, Code as Dl, Underline as Ll, Strikethrough as Fl, Italic as Rl, Bold as Pl, X as Vl, ZoomOut as $l, ZoomIn as _l, Clock as yi, CheckCircle as Bl, AlertCircle as zl } from "lucide-react";
6
- import { LazyMotion as Hl, domAnimation as Ul, m as cr, motion as ur, AnimatePresence as dr } from "framer-motion";
7
- import { EditorProvider as ql, useCurrentEditor as Fs } from "@tiptap/react";
8
- import { Mark as Xt, markPasteRule as Tt, markInputRule as Mt, mergeAttributes as ke, Node as Ve, textblockTypeInputRule as fr, wrappingInputRule as qt, nodeInputRule as Kl, canInsertNode as Jl, isNodeSelection as Wl, Extension as Lr, callOrReturn as jl, getExtensionField as Gl } from "@tiptap/core";
9
- import { Underline as Zl } from "@tiptap/extension-underline";
10
- import { Color as Ql } from "@tiptap/extension-color";
11
- import { Highlight as Xl } from "@tiptap/extension-highlight";
12
- import { Link as Yl } from "@tiptap/extension-link";
13
- import { TaskList as ea } from "@tiptap/extension-task-list";
14
- import { TaskItem as ta } from "@tiptap/extension-task-item";
15
- import { TextAlign as na } from "@tiptap/extension-text-align";
4
+ import R, { useState as he, useRef as Ut, useEffect as et, useReducer as xl, useCallback as le, useMemo as lr, forwardRef as Tn, createElement as ar } from "react";
5
+ import { Globe as pi, User as mi, Heading as Ns, Check as Es, ListTodo as Ts, ListOrdered as Ms, List as Dr, AlignJustify as kl, AlignRight as vl, AlignCenter as Cl, AlignLeft as Os, CornerDownLeft as Sl, Redo2 as wl, Undo2 as Al, Eraser as gi, Minus as Nl, Quote as El, CodeSquare as Tl, FileText as Ml, Link2 as Ol, Highlighter as Is, Palette as Ds, Code as Il, Underline as Dl, Strikethrough as Ll, Italic as Fl, Bold as Rl, X as Pl, ZoomOut as Vl, ZoomIn as $l, Clock as yi, CheckCircle as _l, AlertCircle as Bl } from "lucide-react";
6
+ import { LazyMotion as zl, domAnimation as Hl, m as cr, motion as ur, AnimatePresence as dr } from "framer-motion";
7
+ import { EditorProvider as Ul, useCurrentEditor as Ls } from "@tiptap/react";
8
+ import { Mark as Xt, markPasteRule as Tt, markInputRule as Mt, mergeAttributes as ke, Node as Ve, textblockTypeInputRule as fr, wrappingInputRule as qt, nodeInputRule as ql, canInsertNode as Kl, isNodeSelection as Jl, Extension as Lr, callOrReturn as Wl, getExtensionField as jl } from "@tiptap/core";
9
+ import { Underline as Gl } from "@tiptap/extension-underline";
10
+ import { Color as Zl } from "@tiptap/extension-color";
11
+ import { Highlight as Ql } from "@tiptap/extension-highlight";
12
+ import { Link as Xl } from "@tiptap/extension-link";
13
+ import { TaskList as Yl } from "@tiptap/extension-task-list";
14
+ import { TaskItem as ea } from "@tiptap/extension-task-item";
15
+ import { TextAlign as ta } from "@tiptap/extension-text-align";
16
16
  function Jf({ children: t }) {
17
- return /* @__PURE__ */ f(ll, { children: t });
17
+ return /* @__PURE__ */ f(ol, { children: t });
18
18
  }
19
19
  function ve({ color: t = "primary", radius: e = "full", testId: n = "veevart-button", ...r }) {
20
- return /* @__PURE__ */ f(al, { color: t, radius: e, "data-testid": n, ...r });
20
+ return /* @__PURE__ */ f(ll, { color: t, radius: e, "data-testid": n, ...r });
21
21
  }
22
- const ra = {
22
+ const na = {
23
23
  login: "Login",
24
24
  logout: "Logout",
25
25
  selectLanguage: "Select your language"
26
26
  };
27
- function ia({
27
+ function ra({
28
28
  languages: t,
29
29
  selectedLanguage: e,
30
30
  onLanguageChange: n,
@@ -84,7 +84,7 @@ function ia({
84
84
  )
85
85
  ] }) });
86
86
  }
87
- function sa({
87
+ function ia({
88
88
  isLoggedIn: t,
89
89
  onLogin: e,
90
90
  onLogout: n,
@@ -127,7 +127,7 @@ function Wf({
127
127
  labels: c = {},
128
128
  className: u
129
129
  }) {
130
- const d = { ...ra, ...c };
130
+ const d = { ...na, ...c };
131
131
  return /* @__PURE__ */ T(
132
132
  "nav",
133
133
  {
@@ -140,7 +140,7 @@ function Wf({
140
140
  /* @__PURE__ */ f("div", { className: "flex items-center min-w-10", children: t && /* @__PURE__ */ f("a", { href: "/", className: "block", children: /* @__PURE__ */ f("img", { "data-testid": "navbar-logo", src: t, alt: "Logo", className: "h-8 max-w-28 md:max-w-40" }) }) }),
141
141
  /* @__PURE__ */ T("div", { className: "flex items-center gap-2 md:gap-4", children: [
142
142
  (l || e.length > 0) && /* @__PURE__ */ f(
143
- ia,
143
+ ra,
144
144
  {
145
145
  languages: e,
146
146
  selectedLanguage: n,
@@ -148,7 +148,7 @@ function Wf({
148
148
  label: d.selectLanguage
149
149
  }
150
150
  ),
151
- a && /* @__PURE__ */ f(sa, { isLoggedIn: i, onLogin: s, onLogout: o, labels: d })
151
+ a && /* @__PURE__ */ f(ia, { isLoggedIn: i, onLogin: s, onLogout: o, labels: d })
152
152
  ] })
153
153
  ]
154
154
  }
@@ -166,7 +166,7 @@ function jf(t) {
166
166
  ) }) });
167
167
  }
168
168
  var Hn;
169
- const oa = typeof document < "u" ? (Hn = R.useInsertionEffect) !== null && Hn !== void 0 ? Hn : R.useLayoutEffect : () => {
169
+ const sa = typeof document < "u" ? (Hn = R.useInsertionEffect) !== null && Hn !== void 0 ? Hn : R.useLayoutEffect : () => {
170
170
  };
171
171
  function Fr(t, e, n) {
172
172
  let [r, i] = he(t || e), s = Ut(r), o = Ut(t !== void 0), l = t !== void 0;
@@ -177,10 +177,10 @@ function Fr(t, e, n) {
177
177
  l
178
178
  ]);
179
179
  let a = l ? t : r;
180
- oa(() => {
180
+ sa(() => {
181
181
  s.current = a;
182
182
  });
183
- let [, c] = kl(() => ({}), {}), u = le((d, ...p) => {
183
+ let [, c] = xl(() => ({}), {}), u = le((d, ...p) => {
184
184
  let m = typeof d == "function" ? d(s.current) : d;
185
185
  Object.is(s.current, m) || (s.current = m, i(m), c(), n?.(m, ...p));
186
186
  }, [
@@ -191,7 +191,7 @@ function Fr(t, e, n) {
191
191
  u
192
192
  ];
193
193
  }
194
- function la(t) {
194
+ function oa(t) {
195
195
  return /* @__PURE__ */ f("svg", { ...t, fill: "none", stroke: "currentColor", strokeWidth: 2, viewBox: "0 0 24 24", children: /* @__PURE__ */ f(
196
196
  cr.path,
197
197
  {
@@ -209,7 +209,7 @@ function la(t) {
209
209
  }
210
210
  ) });
211
211
  }
212
- const aa = R.forwardRef(
212
+ const la = R.forwardRef(
213
213
  ({
214
214
  color: t = "primary",
215
215
  stepsCount: e = 3,
@@ -293,7 +293,7 @@ const aa = R.forwardRef(
293
293
  onClick: () => p(y),
294
294
  "data-testid": `stepper-step-btn-${y}`,
295
295
  children: [
296
- /* @__PURE__ */ f("div", { className: "h-full relative flex items-center", children: /* @__PURE__ */ f(Hl, { features: Ul, children: /* @__PURE__ */ f(cr.div, { animate: k, className: "relative", children: /* @__PURE__ */ f(
296
+ /* @__PURE__ */ f("div", { className: "h-full relative flex items-center", children: /* @__PURE__ */ f(zl, { features: Hl, children: /* @__PURE__ */ f(cr.div, { animate: k, className: "relative", children: /* @__PURE__ */ f(
297
297
  cr.div,
298
298
  {
299
299
  animate: k,
@@ -323,7 +323,7 @@ const aa = R.forwardRef(
323
323
  }
324
324
  },
325
325
  children: /* @__PURE__ */ f("div", { className: "flex items-center justify-center", children: k === "complete" ? /* @__PURE__ */ f(
326
- la,
326
+ oa,
327
327
  {
328
328
  className: "h-5 w-5 text-(--active-fg-color)",
329
329
  "data-testid": `stepper-step-check-${y}`
@@ -368,7 +368,7 @@ const aa = R.forwardRef(
368
368
  );
369
369
  }
370
370
  );
371
- aa.displayName = "Stepper";
371
+ la.displayName = "Stepper";
372
372
  function Gf(t) {
373
373
  return /* @__PURE__ */ f("div", { className: "min-h-screen flex flex-col", children: /* @__PURE__ */ f("div", { className: "flex-1 flex items-center justify-center p-12", children: /* @__PURE__ */ f(
374
374
  En,
@@ -397,7 +397,7 @@ function Kt(t) {
397
397
  return typeof t == "string" ? t : t.type;
398
398
  }
399
399
  function lt({ className: t }) {
400
- return /* @__PURE__ */ f("div", { className: `flex items-center h-6 ${t || ""}`, children: /* @__PURE__ */ f(ks, { orientation: "vertical" }) });
400
+ return /* @__PURE__ */ f("div", { className: `flex items-center h-6 ${t || ""}`, children: /* @__PURE__ */ f(xs, { orientation: "vertical" }) });
401
401
  }
402
402
  function Ze({
403
403
  icon: t,
@@ -614,7 +614,7 @@ const We = {
614
614
  shortcut: "Mod-Shift-z",
615
615
  label: "Redo"
616
616
  }
617
- }, ca = {
617
+ }, aa = {
618
618
  1: "Heading 1",
619
619
  2: "Heading 2",
620
620
  3: "Heading 3",
@@ -622,7 +622,7 @@ const We = {
622
622
  5: "Heading 5",
623
623
  6: "Heading 6"
624
624
  };
625
- function ua({ editor: t, levels: e = [1, 2, 3, 4, 5, 6], isDisabled: n = !1 }) {
625
+ function ca({ editor: t, levels: e = [1, 2, 3, 4, 5, 6], isDisabled: n = !1 }) {
626
626
  const [, r] = R.useState(0);
627
627
  R.useEffect(() => {
628
628
  const o = () => r((l) => l + 1);
@@ -637,8 +637,8 @@ function ua({ editor: t, levels: e = [1, 2, 3, 4, 5, 6], isDisabled: n = !1 }) {
637
637
  config: { type: "heading", level: l }
638
638
  });
639
639
  };
640
- return /* @__PURE__ */ T(vs, { children: [
641
- /* @__PURE__ */ f(Cs, { children: /* @__PURE__ */ f(
640
+ return /* @__PURE__ */ T(ks, { children: [
641
+ /* @__PURE__ */ f(vs, { children: /* @__PURE__ */ f(
642
642
  ve,
643
643
  {
644
644
  size: "sm",
@@ -646,23 +646,23 @@ function ua({ editor: t, levels: e = [1, 2, 3, 4, 5, 6], isDisabled: n = !1 }) {
646
646
  variant: i ? "solid" : "bordered",
647
647
  color: i ? "primary" : "default",
648
648
  isDisabled: n,
649
- startContent: /* @__PURE__ */ f(Es, { size: 16 }),
649
+ startContent: /* @__PURE__ */ f(Ns, { size: 16 }),
650
650
  "aria-label": "Select heading level",
651
651
  children: i ? `H${i}` : "H"
652
652
  }
653
653
  ) }),
654
654
  /* @__PURE__ */ f(
655
- Ss,
655
+ Cs,
656
656
  {
657
657
  "aria-label": "Heading levels",
658
658
  selectionMode: "single",
659
659
  selectedKeys: i ? /* @__PURE__ */ new Set([String(i)]) : /* @__PURE__ */ new Set(),
660
660
  onAction: s,
661
661
  children: e.map((o) => /* @__PURE__ */ f(
662
- ws,
662
+ Ss,
663
663
  {
664
- startContent: t.isActive("heading", { level: o }) ? /* @__PURE__ */ f(Ts, { size: 16 }) : /* @__PURE__ */ f("div", { className: "w-4" }),
665
- children: ca[o]
664
+ startContent: t.isActive("heading", { level: o }) ? /* @__PURE__ */ f(Es, { size: 16 }) : /* @__PURE__ */ f("div", { className: "w-4" }),
665
+ children: aa[o]
666
666
  },
667
667
  o
668
668
  ))
@@ -677,14 +677,14 @@ const Un = {
677
677
  },
678
678
  orderedList: {
679
679
  label: "Numbered List",
680
- icon: Os
680
+ icon: Ms
681
681
  },
682
682
  taskList: {
683
683
  label: "Task List",
684
- icon: Ms
684
+ icon: Ts
685
685
  }
686
686
  };
687
- function da({
687
+ function ua({
688
688
  editor: t,
689
689
  types: e = ["bulletList", "orderedList", "taskList"],
690
690
  isDisabled: n = !1
@@ -697,8 +697,8 @@ function da({
697
697
  };
698
698
  }, [t]);
699
699
  const i = e.find((l) => t.isActive(l)), s = i ? Un[i].icon : Dr;
700
- return /* @__PURE__ */ T(vs, { children: [
701
- /* @__PURE__ */ f(Cs, { children: /* @__PURE__ */ f(
700
+ return /* @__PURE__ */ T(ks, { children: [
701
+ /* @__PURE__ */ f(vs, { children: /* @__PURE__ */ f(
702
702
  ve,
703
703
  {
704
704
  size: "sm",
@@ -712,7 +712,7 @@ function da({
712
712
  }
713
713
  ) }),
714
714
  /* @__PURE__ */ f(
715
- Ss,
715
+ Cs,
716
716
  {
717
717
  "aria-label": "List types",
718
718
  selectionMode: "single",
@@ -724,7 +724,7 @@ function da({
724
724
  children: e.map((l) => {
725
725
  const a = Un[l].icon;
726
726
  return /* @__PURE__ */ f(
727
- ws,
727
+ Ss,
728
728
  {
729
729
  startContent: /* @__PURE__ */ f(a, { size: 16 }),
730
730
  children: Un[l].label
@@ -736,7 +736,7 @@ function da({
736
736
  )
737
737
  ] });
738
738
  }
739
- function fa({ colors: t, selectedColor: e, onColorSelect: n, columns: r = 4 }) {
739
+ function da({ colors: t, selectedColor: e, onColorSelect: n, columns: r = 4 }) {
740
740
  return /* @__PURE__ */ f(
741
741
  "div",
742
742
  {
@@ -765,7 +765,7 @@ function fa({ colors: t, selectedColor: e, onColorSelect: n, columns: r = 4 }) {
765
765
  }
766
766
  );
767
767
  }
768
- const ha = [
768
+ const fa = [
769
769
  "#000000",
770
770
  // Black
771
771
  "#374151",
@@ -790,7 +790,7 @@ const ha = [
790
790
  // Orange 500
791
791
  "#A855F7"
792
792
  // Violet 500
793
- ], pa = [
793
+ ], ha = [
794
794
  "#FEF3C7",
795
795
  // Yellow light
796
796
  "#DBEAFE",
@@ -824,43 +824,40 @@ const fe = {
824
824
  max: 200,
825
825
  step: 10,
826
826
  default: 100
827
- }, bi = {
828
- lineHeight: 24,
829
- // px per row
830
- toolbarHeight: 60
831
- // approximate toolbar height
827
+ }, pa = {
828
+ lineHeight: 24
832
829
  }, ma = {
833
830
  // Inline marks
834
- bold: Pl,
835
- italic: Rl,
836
- strike: Fl,
837
- underline: Ll,
838
- code: Dl,
839
- textColor: Ls,
840
- highlight: Ds,
841
- link: Il,
831
+ bold: Rl,
832
+ italic: Fl,
833
+ strike: Ll,
834
+ underline: Dl,
835
+ code: Il,
836
+ textColor: Ds,
837
+ highlight: Is,
838
+ link: Ol,
842
839
  // Block nodes
843
- paragraph: Ol,
844
- heading: Es,
840
+ paragraph: Ml,
841
+ heading: Ns,
845
842
  bulletList: Dr,
846
- orderedList: Os,
847
- taskList: Ms,
848
- codeBlock: Ml,
849
- blockquote: Tl,
850
- horizontalRule: El,
843
+ orderedList: Ms,
844
+ taskList: Ts,
845
+ codeBlock: Tl,
846
+ blockquote: El,
847
+ horizontalRule: Nl,
851
848
  // Utilities
852
849
  clearMarks: gi,
853
850
  clearNodes: gi,
854
- undo: Nl,
855
- redo: Al,
856
- hardBreak: wl,
857
- textAlign: Is
851
+ undo: Al,
852
+ redo: wl,
853
+ hardBreak: Sl,
854
+ textAlign: Os
858
855
  // Default, will be overridden in component
859
856
  }, ga = {
860
- left: Is,
861
- center: Sl,
862
- right: Cl,
863
- justify: vl
857
+ left: Os,
858
+ center: Cl,
859
+ right: vl,
860
+ justify: kl
864
861
  };
865
862
  function at(t) {
866
863
  return ma[t];
@@ -883,7 +880,7 @@ function ya({ value: t, onChange: e, onApply: n, placeholder: r = "#000000" }) {
883
880
  return /* @__PURE__ */ T("div", { className: "space-y-2", children: [
884
881
  /* @__PURE__ */ T("div", { className: "flex gap-2", children: [
885
882
  /* @__PURE__ */ f(
886
- cl,
883
+ al,
887
884
  {
888
885
  type: "text",
889
886
  value: t,
@@ -916,15 +913,15 @@ function ya({ value: t, onChange: e, onApply: n, placeholder: r = "#000000" }) {
916
913
  onPress: l,
917
914
  "aria-label": "Apply custom color",
918
915
  isDisabled: !t || !qn(t),
919
- children: /* @__PURE__ */ f(Ts, { size: 16 })
916
+ children: /* @__PURE__ */ f(Es, { size: 16 })
920
917
  }
921
918
  )
922
919
  ] }),
923
920
  /* @__PURE__ */ f("p", { className: "text-xs text-default-500", children: "Enter a hex color code (e.g., #FF0000)" })
924
921
  ] });
925
922
  }
926
- function xi({ editor: t, type: e, allowCustomColor: n = !0, label: r, isDisabled: i = !1 }) {
927
- const [s, o] = he(!1), [l, a] = he(""), c = e === "textColor" ? ha : pa, u = (y) => {
923
+ function bi({ editor: t, type: e, allowCustomColor: n = !0, label: r, isDisabled: i = !1 }) {
924
+ const [s, o] = he(!1), [l, a] = he(""), c = e === "textColor" ? fa : ha, u = (y) => {
928
925
  const k = We[e];
929
926
  k && k.execute({
930
927
  editor: t,
@@ -939,8 +936,8 @@ function xi({ editor: t, type: e, allowCustomColor: n = !0, label: r, isDisabled
939
936
  config: { type: e, color: "" }
940
937
  }), o(!1);
941
938
  }, m = e === "textColor" ? t.isActive("textStyle") : t.isActive("highlight");
942
- return /* @__PURE__ */ T(ul, { isOpen: s, onOpenChange: o, placement: "bottom", showArrow: !0, children: [
943
- /* @__PURE__ */ f(dl, { children: /* @__PURE__ */ f(
939
+ return /* @__PURE__ */ T(cl, { isOpen: s, onOpenChange: o, placement: "bottom", showArrow: !0, children: [
940
+ /* @__PURE__ */ f(ul, { children: /* @__PURE__ */ f(
944
941
  ve,
945
942
  {
946
943
  size: "sm",
@@ -950,10 +947,10 @@ function xi({ editor: t, type: e, allowCustomColor: n = !0, label: r, isDisabled
950
947
  isIconOnly: !0,
951
948
  isDisabled: i,
952
949
  "aria-label": r,
953
- children: /* @__PURE__ */ f(e === "textColor" ? Ls : Ds, { size: 16 })
950
+ children: /* @__PURE__ */ f(e === "textColor" ? Ds : Is, { size: 16 })
954
951
  }
955
952
  ) }),
956
- /* @__PURE__ */ f(fl, { className: "w-64", children: /* @__PURE__ */ T("div", { className: "px-2 py-3 space-y-3", children: [
953
+ /* @__PURE__ */ f(dl, { className: "w-64", children: /* @__PURE__ */ T("div", { className: "px-2 py-3 space-y-3", children: [
957
954
  /* @__PURE__ */ T("div", { className: "flex items-center justify-between", children: [
958
955
  /* @__PURE__ */ f("span", { className: "text-sm font-semibold", children: r }),
959
956
  /* @__PURE__ */ f(
@@ -964,13 +961,13 @@ function xi({ editor: t, type: e, allowCustomColor: n = !0, label: r, isDisabled
964
961
  isIconOnly: !0,
965
962
  onPress: p,
966
963
  "aria-label": "Clear color",
967
- children: /* @__PURE__ */ f(Vl, { size: 16 })
964
+ children: /* @__PURE__ */ f(Pl, { size: 16 })
968
965
  }
969
966
  )
970
967
  ] }),
971
- /* @__PURE__ */ f(fa, { colors: c, onColorSelect: u }),
968
+ /* @__PURE__ */ f(da, { colors: c, onColorSelect: u }),
972
969
  n && /* @__PURE__ */ T(Ke, { children: [
973
- /* @__PURE__ */ f(ks, {}),
970
+ /* @__PURE__ */ f(xs, {}),
974
971
  /* @__PURE__ */ T("div", { children: [
975
972
  /* @__PURE__ */ f("p", { className: "text-xs font-semibold mb-2 text-default-700", children: "Custom Color" }),
976
973
  /* @__PURE__ */ f(
@@ -1014,7 +1011,7 @@ function ba({
1014
1011
  isDisabled: a,
1015
1012
  onPress: s,
1016
1013
  "aria-label": "Zoom out",
1017
- children: /* @__PURE__ */ f($l, { size: 16 })
1014
+ children: /* @__PURE__ */ f(Vl, { size: 16 })
1018
1015
  }
1019
1016
  ) }),
1020
1017
  /* @__PURE__ */ f(At, { content: u ? "Zoom percentage" : "Click to reset zoom", children: /* @__PURE__ */ T(
@@ -1045,15 +1042,15 @@ function ba({
1045
1042
  isDisabled: c,
1046
1043
  onPress: o,
1047
1044
  "aria-label": "Zoom in",
1048
- children: /* @__PURE__ */ f(_l, { size: 16 })
1045
+ children: /* @__PURE__ */ f($l, { size: 16 })
1049
1046
  }
1050
1047
  ) })
1051
1048
  ] });
1052
1049
  }
1053
1050
  function xa({ children: t, id: e, label: n, className: r, useButtonGroup: i = !0 }) {
1054
- return i ? /* @__PURE__ */ f(hl, { size: "sm", id: e, "aria-label": n, className: r, children: t }) : /* @__PURE__ */ f("div", { id: e, role: "group", "aria-label": n, className: `flex items-center gap-2 ${r || ""}`, children: t });
1051
+ return i ? /* @__PURE__ */ f(fl, { size: "sm", id: e, "aria-label": n, className: r, children: t }) : /* @__PURE__ */ f("div", { id: e, role: "group", "aria-label": n, className: `flex items-center gap-2 ${r || ""}`, children: t });
1055
1052
  }
1056
- function Rs(t, e) {
1053
+ function Fs(t, e) {
1057
1054
  const n = lr(() => {
1058
1055
  if (!t)
1059
1056
  return {};
@@ -1106,7 +1103,7 @@ function Rs(t, e) {
1106
1103
  };
1107
1104
  }, [t, e, n]), r;
1108
1105
  }
1109
- function Ps(t, e) {
1106
+ function Rs(t, e) {
1110
1107
  const n = le(
1111
1108
  (o, l) => {
1112
1109
  if (!t) return;
@@ -1178,7 +1175,7 @@ function ka(t = fe.default) {
1178
1175
  }
1179
1176
  const va = ["bold", "italic", "strike", "underline", "code"];
1180
1177
  function Ca({ editor: t, modifiers: e, onToolbarAction: n }) {
1181
- const r = Rs(t, e), { toggleModifier: i } = Ps(t, n);
1178
+ const r = Fs(t, e), { toggleModifier: i } = Rs(t, n);
1182
1179
  if (!t) return null;
1183
1180
  const s = e.map((o) => Kt(o)).filter(
1184
1181
  (o) => (
@@ -1210,7 +1207,7 @@ function Sa({
1210
1207
  className: s,
1211
1208
  onToolbarAction: o
1212
1209
  }) {
1213
- const l = Rs(t, e), { toggleModifier: a, executeCommand: c } = Ps(t, o);
1210
+ const l = Fs(t, e), { toggleModifier: a, executeCommand: c } = Rs(t, o);
1214
1211
  if (!t) return null;
1215
1212
  const u = e.map((O) => Kt(O)), d = u.some((O) => ["bold", "italic", "strike", "underline", "code"].includes(O)), p = u.some((O) => ["textColor", "highlight"].includes(O)), m = u.includes("heading"), x = u.includes("textAlign"), y = u.some((O) => ["bulletList", "orderedList", "taskList"].includes(O)), k = u.includes("blockquote"), v = u.includes("codeBlock"), S = u.includes("link"), I = u.includes("horizontalRule"), A = u.some((O) => ["undo", "redo"].includes(O)), M = n !== void 0 && r !== void 0;
1216
1213
  return /* @__PURE__ */ f("div", { className: `w-full p-2 bg-background border-b border-divider ${i ? "sticky top-0 z-10" : ""} ${s || ""}`, children: /* @__PURE__ */ T("div", { className: "flex flex-row flex-wrap gap-2 w-full items-center", children: [
@@ -1228,7 +1225,7 @@ function Sa({
1228
1225
  p && /* @__PURE__ */ T(Ke, { children: [
1229
1226
  /* @__PURE__ */ T("div", { className: "flex items-center gap-1", children: [
1230
1227
  u.includes("textColor") && /* @__PURE__ */ f(
1231
- xi,
1228
+ bi,
1232
1229
  {
1233
1230
  editor: t,
1234
1231
  type: "textColor",
@@ -1237,7 +1234,7 @@ function Sa({
1237
1234
  }
1238
1235
  ),
1239
1236
  u.includes("highlight") && /* @__PURE__ */ f(
1240
- xi,
1237
+ bi,
1241
1238
  {
1242
1239
  editor: t,
1243
1240
  type: "highlight",
@@ -1249,7 +1246,7 @@ function Sa({
1249
1246
  (m || x || y || k || v || S || I || A || M) && /* @__PURE__ */ f(lt, {})
1250
1247
  ] }),
1251
1248
  m && /* @__PURE__ */ T(Ke, { children: [
1252
- /* @__PURE__ */ f(ua, { editor: t }),
1249
+ /* @__PURE__ */ f(ca, { editor: t }),
1253
1250
  (x || y || k || v || S || I || A || M) && /* @__PURE__ */ f(lt, {})
1254
1251
  ] }),
1255
1252
  x && /* @__PURE__ */ T(Ke, { children: [
@@ -1274,7 +1271,7 @@ function Sa({
1274
1271
  ] }),
1275
1272
  y && /* @__PURE__ */ T(Ke, { children: [
1276
1273
  /* @__PURE__ */ f(
1277
- da,
1274
+ ua,
1278
1275
  {
1279
1276
  editor: t,
1280
1277
  types: u.filter(
@@ -1715,7 +1712,7 @@ const wa = /(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/, Aa = /(?:^|\s
1715
1712
  "Mod-Alt-0": () => this.editor.commands.setParagraph()
1716
1713
  };
1717
1714
  }
1718
- }), qa = "listItem", ki = "textStyle", vi = /^\s*([-+*])\s$/, Ka = Ve.create({
1715
+ }), qa = "listItem", xi = "textStyle", ki = /^\s*([-+*])\s$/, Ka = Ve.create({
1719
1716
  name: "bulletList",
1720
1717
  addOptions() {
1721
1718
  return {
@@ -1739,7 +1736,7 @@ const wa = /(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/, Aa = /(?:^|\s
1739
1736
  },
1740
1737
  addCommands() {
1741
1738
  return {
1742
- toggleBulletList: () => ({ commands: t, chain: e }) => this.options.keepAttributes ? e().toggleList(this.name, this.options.itemTypeName, this.options.keepMarks).updateAttributes(qa, this.editor.getAttributes(ki)).run() : t.toggleList(this.name, this.options.itemTypeName, this.options.keepMarks)
1739
+ toggleBulletList: () => ({ commands: t, chain: e }) => this.options.keepAttributes ? e().toggleList(this.name, this.options.itemTypeName, this.options.keepMarks).updateAttributes(qa, this.editor.getAttributes(xi)).run() : t.toggleList(this.name, this.options.itemTypeName, this.options.keepMarks)
1743
1740
  };
1744
1741
  },
1745
1742
  addKeyboardShortcuts() {
@@ -1749,21 +1746,21 @@ const wa = /(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/, Aa = /(?:^|\s
1749
1746
  },
1750
1747
  addInputRules() {
1751
1748
  let t = qt({
1752
- find: vi,
1749
+ find: ki,
1753
1750
  type: this.type
1754
1751
  });
1755
1752
  return (this.options.keepMarks || this.options.keepAttributes) && (t = qt({
1756
- find: vi,
1753
+ find: ki,
1757
1754
  type: this.type,
1758
1755
  keepMarks: this.options.keepMarks,
1759
1756
  keepAttributes: this.options.keepAttributes,
1760
- getAttributes: () => this.editor.getAttributes(ki),
1757
+ getAttributes: () => this.editor.getAttributes(xi),
1761
1758
  editor: this.editor
1762
1759
  })), [
1763
1760
  t
1764
1761
  ];
1765
1762
  }
1766
- }), Ja = "listItem", Ci = "textStyle", Si = /^(\d+)\.\s$/, Wa = Ve.create({
1763
+ }), Ja = "listItem", vi = "textStyle", Ci = /^(\d+)\.\s$/, Wa = Ve.create({
1767
1764
  name: "orderedList",
1768
1765
  addOptions() {
1769
1766
  return {
@@ -1802,7 +1799,7 @@ const wa = /(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/, Aa = /(?:^|\s
1802
1799
  },
1803
1800
  addCommands() {
1804
1801
  return {
1805
- toggleOrderedList: () => ({ commands: t, chain: e }) => this.options.keepAttributes ? e().toggleList(this.name, this.options.itemTypeName, this.options.keepMarks).updateAttributes(Ja, this.editor.getAttributes(Ci)).run() : t.toggleList(this.name, this.options.itemTypeName, this.options.keepMarks)
1802
+ toggleOrderedList: () => ({ commands: t, chain: e }) => this.options.keepAttributes ? e().toggleList(this.name, this.options.itemTypeName, this.options.keepMarks).updateAttributes(Ja, this.editor.getAttributes(vi)).run() : t.toggleList(this.name, this.options.itemTypeName, this.options.keepMarks)
1806
1803
  };
1807
1804
  },
1808
1805
  addKeyboardShortcuts() {
@@ -1812,17 +1809,17 @@ const wa = /(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/, Aa = /(?:^|\s
1812
1809
  },
1813
1810
  addInputRules() {
1814
1811
  let t = qt({
1815
- find: Si,
1812
+ find: Ci,
1816
1813
  type: this.type,
1817
1814
  getAttributes: (e) => ({ start: +e[1] }),
1818
1815
  joinPredicate: (e, n) => n.childCount + n.attrs.start === +e[1]
1819
1816
  });
1820
1817
  return (this.options.keepMarks || this.options.keepAttributes) && (t = qt({
1821
- find: Si,
1818
+ find: Ci,
1822
1819
  type: this.type,
1823
1820
  keepMarks: this.options.keepMarks,
1824
1821
  keepAttributes: this.options.keepAttributes,
1825
- getAttributes: (e) => ({ start: +e[1], ...this.editor.getAttributes(Ci) }),
1822
+ getAttributes: (e) => ({ start: +e[1], ...this.editor.getAttributes(vi) }),
1826
1823
  joinPredicate: (e, n) => n.childCount + n.attrs.start === +e[1],
1827
1824
  editor: this.editor
1828
1825
  })), [
@@ -1858,7 +1855,7 @@ const wa = /(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/, Aa = /(?:^|\s
1858
1855
  };
1859
1856
  }
1860
1857
  });
1861
- function Vs(t, e, n) {
1858
+ function Ps(t, e, n) {
1862
1859
  for (let r = 0; ; r++) {
1863
1860
  if (r == t.childCount || r == e.childCount)
1864
1861
  return t.childCount == e.childCount ? null : n;
@@ -1875,14 +1872,14 @@ function Vs(t, e, n) {
1875
1872
  return n;
1876
1873
  }
1877
1874
  if (i.content.size || s.content.size) {
1878
- let o = Vs(i.content, s.content, n + 1);
1875
+ let o = Ps(i.content, s.content, n + 1);
1879
1876
  if (o != null)
1880
1877
  return o;
1881
1878
  }
1882
1879
  n += i.nodeSize;
1883
1880
  }
1884
1881
  }
1885
- function $s(t, e, n, r) {
1882
+ function Vs(t, e, n, r) {
1886
1883
  for (let i = t.childCount, s = e.childCount; ; ) {
1887
1884
  if (i == 0 || s == 0)
1888
1885
  return i == s ? null : { a: n, b: r };
@@ -1900,7 +1897,7 @@ function $s(t, e, n, r) {
1900
1897
  return { a: n, b: r };
1901
1898
  }
1902
1899
  if (o.content.size || l.content.size) {
1903
- let c = $s(o.content, l.content, n - 1, r - 1);
1900
+ let c = Vs(o.content, l.content, n - 1, r - 1);
1904
1901
  if (c)
1905
1902
  return c;
1906
1903
  }
@@ -2069,7 +2066,7 @@ class z {
2069
2066
  fragment differ, or `null` if they are the same.
2070
2067
  */
2071
2068
  findDiffStart(e, n = 0) {
2072
- return Vs(this, e, n);
2069
+ return Ps(this, e, n);
2073
2070
  }
2074
2071
  /**
2075
2072
  Find the first position, searching from the end, at which this
@@ -2078,7 +2075,7 @@ class z {
2078
2075
  nodes, an object with two separate positions is returned.
2079
2076
  */
2080
2077
  findDiffEnd(e, n = this.size, r = e.size) {
2081
- return $s(this, e, n, r);
2078
+ return Vs(this, e, n, r);
2082
2079
  }
2083
2080
  /**
2084
2081
  Find the index and inner offset corresponding to a given relative
@@ -2322,14 +2319,14 @@ class H {
2322
2319
  @internal
2323
2320
  */
2324
2321
  insertAt(e, n) {
2325
- let r = Bs(this.content, e + this.openStart, n);
2322
+ let r = _s(this.content, e + this.openStart, n);
2326
2323
  return r && new H(r, this.openStart, this.openEnd);
2327
2324
  }
2328
2325
  /**
2329
2326
  @internal
2330
2327
  */
2331
2328
  removeBetween(e, n) {
2332
- return new H(_s(this.content, e + this.openStart, n + this.openStart), this.openStart, this.openEnd);
2329
+ return new H($s(this.content, e + this.openStart, n + this.openStart), this.openStart, this.openEnd);
2333
2330
  }
2334
2331
  /**
2335
2332
  Tests whether this slice is equal to another slice.
@@ -2377,7 +2374,7 @@ class H {
2377
2374
  }
2378
2375
  }
2379
2376
  H.empty = new H(z.empty, 0, 0);
2380
- function _s(t, e, n) {
2377
+ function $s(t, e, n) {
2381
2378
  let { index: r, offset: i } = t.findIndex(e), s = t.maybeChild(r), { index: o, offset: l } = t.findIndex(n);
2382
2379
  if (i == e || s.isText) {
2383
2380
  if (l != n && !t.child(o).isText)
@@ -2386,13 +2383,13 @@ function _s(t, e, n) {
2386
2383
  }
2387
2384
  if (r != o)
2388
2385
  throw new RangeError("Removing non-flat range");
2389
- return t.replaceChild(r, s.copy(_s(s.content, e - i - 1, n - i - 1)));
2386
+ return t.replaceChild(r, s.copy($s(s.content, e - i - 1, n - i - 1)));
2390
2387
  }
2391
- function Bs(t, e, n, r) {
2388
+ function _s(t, e, n, r) {
2392
2389
  let { index: i, offset: s } = t.findIndex(e), o = t.maybeChild(i);
2393
2390
  if (s == e || o.isText)
2394
2391
  return r && !r.canReplace(i, i, n) ? null : t.cut(0, e).append(n).append(t.cut(e));
2395
- let l = Bs(o.content, e - s - 1, n, o);
2392
+ let l = _s(o.content, e - s - 1, n, o);
2396
2393
  return l && t.replaceChild(i, o.copy(l));
2397
2394
  }
2398
2395
  function Za(t) {
@@ -2427,7 +2424,7 @@ class hn {
2427
2424
  Parse a document from the content of a DOM node.
2428
2425
  */
2429
2426
  parse(e, n = {}) {
2430
- let r = new Ai(this, n, !1);
2427
+ let r = new wi(this, n, !1);
2431
2428
  return r.addAll(e, Oe.none, n.from, n.to), r.finish();
2432
2429
  }
2433
2430
  /**
@@ -2439,7 +2436,7 @@ class hn {
2439
2436
  the left of the input and the end of nodes at the end.
2440
2437
  */
2441
2438
  parseSlice(e, n = {}) {
2442
- let r = new Ai(this, n, !0);
2439
+ let r = new wi(this, n, !0);
2443
2440
  return r.addAll(e, Oe.none, n.from, n.to), H.maxOpen(r.finish());
2444
2441
  }
2445
2442
  /**
@@ -2496,13 +2493,13 @@ class hn {
2496
2493
  for (let i in e.marks) {
2497
2494
  let s = e.marks[i].spec.parseDOM;
2498
2495
  s && s.forEach((o) => {
2499
- r(o = Ni(o)), o.mark || o.ignore || o.clearMark || (o.mark = i);
2496
+ r(o = Ai(o)), o.mark || o.ignore || o.clearMark || (o.mark = i);
2500
2497
  });
2501
2498
  }
2502
2499
  for (let i in e.nodes) {
2503
2500
  let s = e.nodes[i].spec.parseDOM;
2504
2501
  s && s.forEach((o) => {
2505
- r(o = Ni(o)), o.node || o.ignore || o.mark || (o.node = i);
2502
+ r(o = Ai(o)), o.node || o.ignore || o.mark || (o.node = i);
2506
2503
  });
2507
2504
  }
2508
2505
  return n;
@@ -2516,7 +2513,7 @@ class hn {
2516
2513
  return e.cached.domParser || (e.cached.domParser = new hn(e, hn.schemaRules(e)));
2517
2514
  }
2518
2515
  }
2519
- const zs = {
2516
+ const Bs = {
2520
2517
  address: !0,
2521
2518
  article: !0,
2522
2519
  aside: !0,
@@ -2556,8 +2553,8 @@ const zs = {
2556
2553
  script: !0,
2557
2554
  style: !0,
2558
2555
  title: !0
2559
- }, Hs = { ol: !0, ul: !0 }, Jt = 1, pr = 2, Vt = 4;
2560
- function wi(t, e, n) {
2556
+ }, zs = { ol: !0, ul: !0 }, Jt = 1, pr = 2, Vt = 4;
2557
+ function Si(t, e, n) {
2561
2558
  return e != null ? (e ? Jt : 0) | (e === "full" ? pr : 0) : t && t.whitespace == "pre" ? Jt | pr : n & ~Vt;
2562
2559
  }
2563
2560
  class rn {
@@ -2590,13 +2587,13 @@ class rn {
2590
2587
  return !e && this.match && (n = n.append(this.match.fillBefore(z.empty, !0))), this.type ? this.type.create(this.attrs, n, this.marks) : n;
2591
2588
  }
2592
2589
  inlineContext(e) {
2593
- return this.type ? this.type.inlineContent : this.content.length ? this.content[0].isInline : e.parentNode && !zs.hasOwnProperty(e.parentNode.nodeName.toLowerCase());
2590
+ return this.type ? this.type.inlineContent : this.content.length ? this.content[0].isInline : e.parentNode && !Bs.hasOwnProperty(e.parentNode.nodeName.toLowerCase());
2594
2591
  }
2595
2592
  }
2596
- class Ai {
2593
+ class wi {
2597
2594
  constructor(e, n, r) {
2598
2595
  this.parser = e, this.options = n, this.isOpen = r, this.open = 0, this.localPreserveWS = !1;
2599
- let i = n.topNode, s, o = wi(null, n.preserveWhitespace, 0) | (r ? Vt : 0);
2596
+ let i = n.topNode, s, o = Si(null, n.preserveWhitespace, 0) | (r ? Vt : 0);
2600
2597
  i ? s = new rn(i.type, i.attrs, Oe.none, !0, n.topMatch || i.type.contentMatch, o) : r ? s = new rn(null, null, Oe.none, !0, null, o) : s = new rn(e.schema.topNodeType, null, Oe.none, !0, null, o), this.nodes = [s], this.find = n.findPositions, this.needsBlock = !1;
2601
2598
  }
2602
2599
  get top() {
@@ -2636,14 +2633,14 @@ class Ai {
2636
2633
  let i = this.localPreserveWS, s = this.top;
2637
2634
  (e.tagName == "PRE" || /pre/.test(e.style && e.style.whiteSpace)) && (this.localPreserveWS = !0);
2638
2635
  let o = e.nodeName.toLowerCase(), l;
2639
- Hs.hasOwnProperty(o) && this.parser.normalizeLists && Ya(e);
2636
+ zs.hasOwnProperty(o) && this.parser.normalizeLists && Ya(e);
2640
2637
  let a = this.options.ruleFromNode && this.options.ruleFromNode(e) || (l = this.parser.matchTag(e, this, r));
2641
2638
  e: if (a ? a.ignore : Xa.hasOwnProperty(o))
2642
2639
  this.findInside(e), this.ignoreFallback(e, n);
2643
2640
  else if (!a || a.skip || a.closeParent) {
2644
2641
  a && a.closeParent ? this.open = Math.max(0, this.open - 1) : a && a.skip.nodeType && (e = a.skip);
2645
2642
  let c, u = this.needsBlock;
2646
- if (zs.hasOwnProperty(o))
2643
+ if (Bs.hasOwnProperty(o))
2647
2644
  s.content.length && s.content[0].isInline && this.open && (this.open--, s = this.top), c = !0, s.type || (this.needsBlock = !0);
2648
2645
  else if (!e.firstChild) {
2649
2646
  this.leafFallback(e, n);
@@ -2762,7 +2759,7 @@ class Ai {
2762
2759
  s.match && (s.match = s.match.matchType(e.type));
2763
2760
  let o = Oe.none;
2764
2761
  for (let l of i.concat(e.marks))
2765
- (s.type ? s.type.allowsMarkType(l.type) : Ei(l.type, e.type)) && (o = l.addToSet(o));
2762
+ (s.type ? s.type.allowsMarkType(l.type) : Ni(l.type, e.type)) && (o = l.addToSet(o));
2766
2763
  return s.content.push(e.mark(o)), !0;
2767
2764
  }
2768
2765
  return !1;
@@ -2778,10 +2775,10 @@ class Ai {
2778
2775
  this.closeExtra();
2779
2776
  let o = this.top;
2780
2777
  o.match = o.match && o.match.matchType(e);
2781
- let l = wi(e, s, o.options);
2778
+ let l = Si(e, s, o.options);
2782
2779
  o.options & Vt && o.content.length == 0 && (l |= Vt);
2783
2780
  let a = Oe.none;
2784
- return r = r.filter((c) => (o.type ? o.type.allowsMarkType(c.type) : Ei(c.type, e)) ? (a = c.addToSet(a), !1) : !0), this.nodes.push(new rn(e, n, a, i, null, l)), this.open++, r;
2781
+ return r = r.filter((c) => (o.type ? o.type.allowsMarkType(c.type) : Ni(c.type, e)) ? (a = c.addToSet(a), !1) : !0), this.nodes.push(new rn(e, n, a, i, null, l)), this.open++, r;
2785
2782
  }
2786
2783
  // Make sure all nodes above this.open are finished and added to
2787
2784
  // their parents
@@ -2878,19 +2875,19 @@ class Ai {
2878
2875
  function Ya(t) {
2879
2876
  for (let e = t.firstChild, n = null; e; e = e.nextSibling) {
2880
2877
  let r = e.nodeType == 1 ? e.nodeName.toLowerCase() : null;
2881
- r && Hs.hasOwnProperty(r) && n ? (n.appendChild(e), e = n) : r == "li" ? n = e : r && (n = null);
2878
+ r && zs.hasOwnProperty(r) && n ? (n.appendChild(e), e = n) : r == "li" ? n = e : r && (n = null);
2882
2879
  }
2883
2880
  }
2884
2881
  function ec(t, e) {
2885
2882
  return (t.matches || t.msMatchesSelector || t.webkitMatchesSelector || t.mozMatchesSelector).call(t, e);
2886
2883
  }
2887
- function Ni(t) {
2884
+ function Ai(t) {
2888
2885
  let e = {};
2889
2886
  for (let n in t)
2890
2887
  e[n] = t[n];
2891
2888
  return e;
2892
2889
  }
2893
- function Ei(t, e) {
2890
+ function Ni(t, e) {
2894
2891
  let n = e.schema.nodes;
2895
2892
  for (let r in n) {
2896
2893
  let i = n[r];
@@ -3002,17 +2999,17 @@ class Mn {
3002
2999
  This can be useful as a base to build a custom serializer from.
3003
3000
  */
3004
3001
  static nodesFromSchema(e) {
3005
- let n = Ti(e.nodes);
3002
+ let n = Ei(e.nodes);
3006
3003
  return n.text || (n.text = (r) => r.text), n;
3007
3004
  }
3008
3005
  /**
3009
3006
  Gather the serializers in a schema's mark specs into an object.
3010
3007
  */
3011
3008
  static marksFromSchema(e) {
3012
- return Ti(e.marks);
3009
+ return Ei(e.marks);
3013
3010
  }
3014
3011
  }
3015
- function Ti(t) {
3012
+ function Ei(t) {
3016
3013
  let e = {};
3017
3014
  for (let n in t) {
3018
3015
  let r = t[n].spec.toDOM;
@@ -3023,10 +3020,10 @@ function Ti(t) {
3023
3020
  function Jn(t) {
3024
3021
  return t.document || window.document;
3025
3022
  }
3026
- const Mi = /* @__PURE__ */ new WeakMap();
3023
+ const Ti = /* @__PURE__ */ new WeakMap();
3027
3024
  function tc(t) {
3028
- let e = Mi.get(t);
3029
- return e === void 0 && Mi.set(t, e = nc(t)), e;
3025
+ let e = Ti.get(t);
3026
+ return e === void 0 && Ti.set(t, e = nc(t)), e;
3030
3027
  }
3031
3028
  function nc(t) {
3032
3029
  let e = null;
@@ -3084,17 +3081,17 @@ function an(t, e, n, r) {
3084
3081
  }
3085
3082
  return { dom: a, contentDOM: l };
3086
3083
  }
3087
- const Us = 65535, qs = Math.pow(2, 16);
3084
+ const Hs = 65535, Us = Math.pow(2, 16);
3088
3085
  function rc(t, e) {
3089
- return t + e * qs;
3086
+ return t + e * Us;
3090
3087
  }
3091
- function Oi(t) {
3092
- return t & Us;
3088
+ function Mi(t) {
3089
+ return t & Hs;
3093
3090
  }
3094
3091
  function ic(t) {
3095
- return (t - (t & Us)) / qs;
3092
+ return (t - (t & Hs)) / Us;
3096
3093
  }
3097
- const Ks = 1, Js = 2, cn = 4, Ws = 8;
3094
+ const qs = 1, Ks = 2, cn = 4, Js = 8;
3098
3095
  class mr {
3099
3096
  /**
3100
3097
  @internal
@@ -3108,19 +3105,19 @@ class mr {
3108
3105
  argument from the document.
3109
3106
  */
3110
3107
  get deleted() {
3111
- return (this.delInfo & Ws) > 0;
3108
+ return (this.delInfo & Js) > 0;
3112
3109
  }
3113
3110
  /**
3114
3111
  Tells you whether the token before the mapped position was deleted.
3115
3112
  */
3116
3113
  get deletedBefore() {
3117
- return (this.delInfo & (Ks | cn)) > 0;
3114
+ return (this.delInfo & (qs | cn)) > 0;
3118
3115
  }
3119
3116
  /**
3120
3117
  True when the token after the mapped position was deleted.
3121
3118
  */
3122
3119
  get deletedAfter() {
3123
- return (this.delInfo & (Js | cn)) > 0;
3120
+ return (this.delInfo & (Ks | cn)) > 0;
3124
3121
  }
3125
3122
  /**
3126
3123
  Tells whether any of the steps mapped through deletes across the
@@ -3145,7 +3142,7 @@ class Ae {
3145
3142
  @internal
3146
3143
  */
3147
3144
  recover(e) {
3148
- let n = 0, r = Oi(e);
3145
+ let n = 0, r = Mi(e);
3149
3146
  if (!this.inverted)
3150
3147
  for (let i = 0; i < r; i++)
3151
3148
  n += this.ranges[i * 3 + 2] - this.ranges[i * 3 + 1];
@@ -3171,8 +3168,8 @@ class Ae {
3171
3168
  let p = c ? e == a ? -1 : e == d ? 1 : n : n, m = a + i + (p < 0 ? 0 : u);
3172
3169
  if (r)
3173
3170
  return m;
3174
- let x = e == (n < 0 ? a : d) ? null : rc(l / 3, e - a), y = e == a ? Js : e == d ? Ks : cn;
3175
- return (n < 0 ? e != a : e != d) && (y |= Ws), new mr(m, y, x);
3171
+ let x = e == (n < 0 ? a : d) ? null : rc(l / 3, e - a), y = e == a ? Ks : e == d ? qs : cn;
3172
+ return (n < 0 ? e != a : e != d) && (y |= Js), new mr(m, y, x);
3176
3173
  }
3177
3174
  i += u - c;
3178
3175
  }
@@ -3182,7 +3179,7 @@ class Ae {
3182
3179
  @internal
3183
3180
  */
3184
3181
  touches(e, n) {
3185
- let r = 0, i = Oi(n), s = this.inverted ? 2 : 1, o = this.inverted ? 1 : 2;
3182
+ let r = 0, i = Mi(n), s = this.inverted ? 2 : 1, o = this.inverted ? 1 : 2;
3186
3183
  for (let l = 0; l < this.ranges.length; l += 3) {
3187
3184
  let a = this.ranges[l] - (this.inverted ? r : 0);
3188
3185
  if (a > e)
@@ -3700,7 +3697,7 @@ function gr(t, e, n) {
3700
3697
  }
3701
3698
  return !1;
3702
3699
  }
3703
- function js(t, e, n) {
3700
+ function Ws(t, e, n) {
3704
3701
  let r = t.resolve(e);
3705
3702
  if (!n.content.size)
3706
3703
  return e;
@@ -3875,7 +3872,7 @@ class Z {
3875
3872
  let s = e.steps.length, o = this.ranges;
3876
3873
  for (let l = 0; l < o.length; l++) {
3877
3874
  let { $from: a, $to: c } = o[l], u = e.mapping.slice(s);
3878
- e.replaceRange(u.map(a.pos), u.map(c.pos), l ? H.empty : n), l == 0 && Li(e, s, (r ? r.isInline : i && i.isTextblock) ? -1 : 1);
3875
+ e.replaceRange(u.map(a.pos), u.map(c.pos), l ? H.empty : n), l == 0 && Di(e, s, (r ? r.isInline : i && i.isTextblock) ? -1 : 1);
3879
3876
  }
3880
3877
  }
3881
3878
  /**
@@ -3886,7 +3883,7 @@ class Z {
3886
3883
  let r = e.steps.length, i = this.ranges;
3887
3884
  for (let s = 0; s < i.length; s++) {
3888
3885
  let { $from: o, $to: l } = i[s], a = e.mapping.slice(r), c = a.map(o.pos), u = a.map(l.pos);
3889
- s ? e.deleteRange(c, u) : (e.replaceRangeWith(c, u, n), Li(e, r, n.isInline ? -1 : 1));
3886
+ s ? e.deleteRange(c, u) : (e.replaceRangeWith(c, u, n), Di(e, r, n.isInline ? -1 : 1));
3890
3887
  }
3891
3888
  }
3892
3889
  /**
@@ -3976,16 +3973,16 @@ class sc {
3976
3973
  this.$from = e, this.$to = n;
3977
3974
  }
3978
3975
  }
3979
- let Ii = !1;
3980
- function Di(t) {
3981
- !Ii && !t.parent.inlineContent && (Ii = !0, console.warn("TextSelection endpoint not pointing into a node with inline content (" + t.parent.type.name + ")"));
3976
+ let Oi = !1;
3977
+ function Ii(t) {
3978
+ !Oi && !t.parent.inlineContent && (Oi = !0, console.warn("TextSelection endpoint not pointing into a node with inline content (" + t.parent.type.name + ")"));
3982
3979
  }
3983
3980
  class G extends Z {
3984
3981
  /**
3985
3982
  Construct a text selection between the given points.
3986
3983
  */
3987
3984
  constructor(e, n = e) {
3988
- Di(e), Di(n), super(e, n);
3985
+ Ii(e), Ii(n), super(e, n);
3989
3986
  }
3990
3987
  /**
3991
3988
  Returns a resolved position if this is a cursor selection (an
@@ -4185,7 +4182,7 @@ function Ct(t, e, n, r, i, s = !1) {
4185
4182
  }
4186
4183
  return null;
4187
4184
  }
4188
- function Li(t, e, n) {
4185
+ function Di(t, e, n) {
4189
4186
  let r = t.steps.length - 1;
4190
4187
  if (r < e)
4191
4188
  return;
@@ -4197,12 +4194,12 @@ function Li(t, e, n) {
4197
4194
  o == null && (o = u);
4198
4195
  }), t.setSelection(Z.near(t.doc.resolve(o), n));
4199
4196
  }
4200
- function Fi(t, e) {
4197
+ function Li(t, e) {
4201
4198
  return !e || !t ? t : t.bind(e);
4202
4199
  }
4203
4200
  class sn {
4204
4201
  constructor(e, n, r) {
4205
- this.name = e, this.init = Fi(n.init, r), this.apply = Fi(n.apply, r);
4202
+ this.name = e, this.init = Li(n.init, r), this.apply = Li(n.apply, r);
4206
4203
  }
4207
4204
  }
4208
4205
  new sn("doc", {
@@ -4234,10 +4231,10 @@ new sn("doc", {
4234
4231
  return t.scrolledIntoView ? e + 1 : e;
4235
4232
  }
4236
4233
  });
4237
- function Gs(t, e, n) {
4234
+ function js(t, e, n) {
4238
4235
  for (let r in t) {
4239
4236
  let i = t[r];
4240
- i instanceof Function ? i = i.bind(e) : r == "handleDOMEvents" && (i = Gs(i, e, {})), n[r] = i;
4237
+ i instanceof Function ? i = i.bind(e) : r == "handleDOMEvents" && (i = js(i, e, {})), n[r] = i;
4241
4238
  }
4242
4239
  return n;
4243
4240
  }
@@ -4246,7 +4243,7 @@ class In {
4246
4243
  Create a plugin.
4247
4244
  */
4248
4245
  constructor(e) {
4249
- this.spec = e, this.props = {}, e.props && Gs(e.props, this, this.props), this.key = e.key ? e.key.key : Zs("plugin");
4246
+ this.spec = e, this.props = {}, e.props && js(e.props, this, this.props), this.key = e.key ? e.key.key : Gs("plugin");
4250
4247
  }
4251
4248
  /**
4252
4249
  Extract the plugin's state field from an editor state.
@@ -4256,7 +4253,7 @@ class In {
4256
4253
  }
4257
4254
  }
4258
4255
  const Gn = /* @__PURE__ */ Object.create(null);
4259
- function Zs(t) {
4256
+ function Gs(t) {
4260
4257
  return t in Gn ? t + "$" + ++Gn[t] : (Gn[t] = 0, t + "$");
4261
4258
  }
4262
4259
  class Vr {
@@ -4264,7 +4261,7 @@ class Vr {
4264
4261
  Create a plugin key.
4265
4262
  */
4266
4263
  constructor(e = "key") {
4267
- this.key = Zs(e);
4264
+ this.key = Gs(e);
4268
4265
  }
4269
4266
  /**
4270
4267
  Get the active plugin with this key, if any, from an editor
@@ -4462,7 +4459,7 @@ const lc = /^```([a-z]+)?[\s\n]$/, ac = /^~~~([a-z]+)?[\s\n]$/, cc = Ve.create({
4462
4459
  addCommands() {
4463
4460
  return {
4464
4461
  setHorizontalRule: () => ({ chain: t, state: e }) => {
4465
- if (!Jl(e, e.schema.nodes[this.name]))
4462
+ if (!Kl(e, e.schema.nodes[this.name]))
4466
4463
  return !1;
4467
4464
  const { selection: n } = e, { $from: r, $to: i } = n, s = t();
4468
4465
  return r.parentOffset === 0 ? s.insertContentAt({
@@ -4470,7 +4467,7 @@ const lc = /^```([a-z]+)?[\s\n]$/, ac = /^~~~([a-z]+)?[\s\n]$/, cc = Ve.create({
4470
4467
  to: i.pos
4471
4468
  }, {
4472
4469
  type: this.name
4473
- }) : Wl(n) ? s.insertContentAt(i.pos, {
4470
+ }) : Jl(n) ? s.insertContentAt(i.pos, {
4474
4471
  type: this.name
4475
4472
  }) : s.insertContent({ type: this.name }), s.command(({ tr: o, dispatch: l }) => {
4476
4473
  var a;
@@ -4491,7 +4488,7 @@ const lc = /^```([a-z]+)?[\s\n]$/, ac = /^~~~([a-z]+)?[\s\n]$/, cc = Ve.create({
4491
4488
  },
4492
4489
  addInputRules() {
4493
4490
  return [
4494
- Kl({
4491
+ ql({
4495
4492
  find: /^(?:---|—-|___\s|\*\*\*\s)$/,
4496
4493
  type: this.type
4497
4494
  })
@@ -4577,9 +4574,9 @@ ce.prototype.map = function(e, n, r) {
4577
4574
  }, n, r), i;
4578
4575
  };
4579
4576
  ce.from = function(e) {
4580
- return e instanceof ce ? e : e && e.length ? new Qs(e) : ce.empty;
4577
+ return e instanceof ce ? e : e && e.length ? new Zs(e) : ce.empty;
4581
4578
  };
4582
- var Qs = /* @__PURE__ */ (function(t) {
4579
+ var Zs = /* @__PURE__ */ (function(t) {
4583
4580
  function e(r) {
4584
4581
  t.call(this), this.values = r;
4585
4582
  }
@@ -4611,7 +4608,7 @@ var Qs = /* @__PURE__ */ (function(t) {
4611
4608
  return 0;
4612
4609
  }, Object.defineProperties(e.prototype, n), e;
4613
4610
  })(ce);
4614
- ce.empty = new Qs([]);
4611
+ ce.empty = new Zs([]);
4615
4612
  var pc = /* @__PURE__ */ (function(t) {
4616
4613
  function e(n, r) {
4617
4614
  t.call(this), this.left = n, this.right = r, this.length = n.length + r.length, this.depth = Math.max(n.depth, r.depth) + 1;
@@ -4793,9 +4790,9 @@ function bc(t, e, n, r) {
4793
4790
  if (n.steps.length == 0)
4794
4791
  return t;
4795
4792
  if (o && o.getMeta(pt))
4796
- return o.getMeta(pt).redo ? new Qe(t.done.addTransform(n, void 0, r, un(e)), t.undone, Ri(n.mapping.maps), t.prevTime, t.prevComposition) : new Qe(t.done, t.undone.addTransform(n, void 0, r, un(e)), null, t.prevTime, t.prevComposition);
4793
+ return o.getMeta(pt).redo ? new Qe(t.done.addTransform(n, void 0, r, un(e)), t.undone, Fi(n.mapping.maps), t.prevTime, t.prevComposition) : new Qe(t.done, t.undone.addTransform(n, void 0, r, un(e)), null, t.prevTime, t.prevComposition);
4797
4794
  if (n.getMeta("addToHistory") !== !1 && !(o && o.getMeta("addToHistory") === !1)) {
4798
- let l = n.getMeta("composition"), a = t.prevTime == 0 || !o && t.prevComposition != l && (t.prevTime < (n.time || 0) - r.newGroupDelay || !xc(n, t.prevRanges)), c = o ? Zn(t.prevRanges, n.mapping) : Ri(n.mapping.maps);
4795
+ let l = n.getMeta("composition"), a = t.prevTime == 0 || !o && t.prevComposition != l && (t.prevTime < (n.time || 0) - r.newGroupDelay || !xc(n, t.prevRanges)), c = o ? Zn(t.prevRanges, n.mapping) : Fi(n.mapping.maps);
4799
4796
  return new Qe(t.done.addTransform(n, a ? e.selection.getBookmark() : void 0, r, un(e)), De.empty, c, n.time, l ?? t.prevComposition);
4800
4797
  } else return (s = n.getMeta("rebased")) ? new Qe(t.done.rebased(n, s), t.undone.rebased(n, s), Zn(t.prevRanges, n.mapping), t.prevTime, t.prevComposition) : new Qe(t.done.addMaps(n.mapping.maps), t.undone.addMaps(n.mapping.maps), Zn(t.prevRanges, n.mapping), t.prevTime, t.prevComposition);
4801
4798
  }
@@ -4810,7 +4807,7 @@ function xc(t, e) {
4810
4807
  r <= e[s + 1] && i >= e[s] && (n = !0);
4811
4808
  }), n;
4812
4809
  }
4813
- function Ri(t) {
4810
+ function Fi(t) {
4814
4811
  let e = [];
4815
4812
  for (let n = t.length - 1; n >= 0 && e.length == 0; n--)
4816
4813
  t[n].forEach((r, i, s, o) => e.push(s, o));
@@ -4833,11 +4830,11 @@ function kc(t, e, n) {
4833
4830
  let o = s.selection.resolve(s.transform.doc), l = (n ? t.done : t.undone).addTransform(s.transform, e.selection.getBookmark(), i, r), a = new Qe(n ? l : s.remaining, n ? s.remaining : l, null, 0, -1);
4834
4831
  return s.transform.setSelection(o).setMeta(pt, { redo: n, historyState: a });
4835
4832
  }
4836
- let Qn = !1, Pi = null;
4833
+ let Qn = !1, Ri = null;
4837
4834
  function un(t) {
4838
4835
  let e = t.plugins;
4839
- if (Pi != e) {
4840
- Qn = !1, Pi = e;
4836
+ if (Ri != e) {
4837
+ Qn = !1, Ri = e;
4841
4838
  for (let n = 0; n < e.length; n++)
4842
4839
  if (e[n].spec.historyPreserveItems) {
4843
4840
  Qn = !0;
@@ -4865,14 +4862,14 @@ function Cc(t = {}) {
4865
4862
  props: {
4866
4863
  handleDOMEvents: {
4867
4864
  beforeinput(e, n) {
4868
- let r = n.inputType, i = r == "historyUndo" ? Ys : r == "historyRedo" ? eo : null;
4865
+ let r = n.inputType, i = r == "historyUndo" ? Xs : r == "historyRedo" ? Ys : null;
4869
4866
  return !i || !e.editable ? !1 : (n.preventDefault(), i(e.state, e.dispatch));
4870
4867
  }
4871
4868
  }
4872
4869
  }
4873
4870
  });
4874
4871
  }
4875
- function Xs(t, e) {
4872
+ function Qs(t, e) {
4876
4873
  return (n, r) => {
4877
4874
  let i = pt.getState(n);
4878
4875
  if (!i || (t ? i.undone : i.done).eventCount == 0)
@@ -4884,7 +4881,7 @@ function Xs(t, e) {
4884
4881
  return !0;
4885
4882
  };
4886
4883
  }
4887
- const Ys = Xs(!1, !0), eo = Xs(!0, !0), Pt = Lr.create({
4884
+ const Xs = Qs(!1, !0), Ys = Qs(!0, !0), Pt = Lr.create({
4888
4885
  name: "history",
4889
4886
  addOptions() {
4890
4887
  return {
@@ -4894,8 +4891,8 @@ const Ys = Xs(!1, !0), eo = Xs(!0, !0), Pt = Lr.create({
4894
4891
  },
4895
4892
  addCommands() {
4896
4893
  return {
4897
- undo: () => ({ state: t, dispatch: e }) => Ys(t, e),
4898
- redo: () => ({ state: t, dispatch: e }) => eo(t, e)
4894
+ undo: () => ({ state: t, dispatch: e }) => Xs(t, e),
4895
+ redo: () => ({ state: t, dispatch: e }) => Ys(t, e)
4899
4896
  };
4900
4897
  },
4901
4898
  addProseMirrorPlugins() {
@@ -4986,7 +4983,7 @@ class Nc {
4986
4983
  if (n && !s) {
4987
4984
  let o = n.pos;
4988
4985
  if (this.editorView.dragging && this.editorView.dragging.slice) {
4989
- let l = js(this.editorView.state.doc, o, this.editorView.dragging.slice);
4986
+ let l = Ws(this.editorView.state.doc, o, this.editorView.dragging.slice);
4990
4987
  l != null && (o = l);
4991
4988
  }
4992
4989
  this.setCursor(o), this.scheduleRemoval(5e3);
@@ -5162,10 +5159,10 @@ const yt = function(t) {
5162
5159
  for (var e = 0; ; e++)
5163
5160
  if (t = t.previousSibling, !t)
5164
5161
  return e;
5165
- }, to = function(t, e, n, r) {
5166
- return n && (Vi(t, e, n, r, -1) || Vi(t, e, n, r, 1));
5162
+ }, eo = function(t, e, n, r) {
5163
+ return n && (Pi(t, e, n, r, -1) || Pi(t, e, n, r, 1));
5167
5164
  }, Pc = /^(img|br|input|textarea|hr)$/i;
5168
- function Vi(t, e, n, r, i) {
5165
+ function Pi(t, e, n, r, i) {
5169
5166
  for (var s; ; ) {
5170
5167
  if (t == n && e == r)
5171
5168
  return !0;
@@ -5206,16 +5203,16 @@ function $r(t) {
5206
5203
  ;
5207
5204
  return e && e.node && e.node.isBlock && (e.dom == t || e.contentDOM == t);
5208
5205
  }
5209
- const no = function(t) {
5210
- return t.focusNode && to(t.focusNode, t.focusOffset, t.anchorNode, t.anchorOffset);
5206
+ const to = function(t) {
5207
+ return t.focusNode && eo(t.focusNode, t.focusOffset, t.anchorNode, t.anchorOffset);
5211
5208
  };
5212
- function ro(t, e) {
5209
+ function no(t, e) {
5213
5210
  let n = document.createEvent("Event");
5214
5211
  return n.initEvent("keydown", !0, !0), n.keyCode = t, n.key = n.code = e, n;
5215
5212
  }
5216
- const He = typeof navigator < "u" ? navigator : null, $i = typeof document < "u" ? document : null, rt = He && He.userAgent || "", yr = /Edge\/(\d+)/.exec(rt), io = /MSIE \d/.exec(rt), br = /Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(rt), Yt = !!(io || br || yr), so = io ? document.documentMode : br ? +br[1] : yr ? +yr[1] : 0, Dn = !Yt && /gecko\/(\d+)/i.test(rt);
5213
+ const He = typeof navigator < "u" ? navigator : null, Vi = typeof document < "u" ? document : null, rt = He && He.userAgent || "", yr = /Edge\/(\d+)/.exec(rt), ro = /MSIE \d/.exec(rt), br = /Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(rt), Yt = !!(ro || br || yr), io = ro ? document.documentMode : br ? +br[1] : yr ? +yr[1] : 0, Dn = !Yt && /gecko\/(\d+)/i.test(rt);
5217
5214
  Dn && +(/Firefox\/(\d+)/.exec(rt) || [0, 0])[1];
5218
- const xr = !Yt && /Chrome\/(\d+)/.exec(rt), je = !!xr, oo = xr ? +xr[1] : 0, bt = !Yt && !!He && /Apple Computer/.test(He.vendor), _r = bt && (/Mobile\/\w+/.test(rt) || !!He && He.maxTouchPoints > 2), Me = _r || (He ? /Mac/.test(He.platform) : !1), lo = He ? /Win/.test(He.platform) : !1, en = /Android \d/.test(rt), Br = !!$i && "webkitFontSmoothing" in $i.documentElement.style, $c = Br ? +(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent) || [0, 0])[1] : 0;
5215
+ const xr = !Yt && /Chrome\/(\d+)/.exec(rt), je = !!xr, so = xr ? +xr[1] : 0, bt = !Yt && !!He && /Apple Computer/.test(He.vendor), _r = bt && (/Mobile\/\w+/.test(rt) || !!He && He.maxTouchPoints > 2), Me = _r || (He ? /Mac/.test(He.platform) : !1), oo = He ? /Win/.test(He.platform) : !1, en = /Android \d/.test(rt), Br = !!Vi && "webkitFontSmoothing" in Vi.documentElement.style, $c = Br ? +(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent) || [0, 0])[1] : 0;
5219
5216
  function _c(t, e = null) {
5220
5217
  let n = t.domSelectionRange(), r = t.state.doc;
5221
5218
  if (!n.focusNode)
@@ -5224,7 +5221,7 @@ function _c(t, e = null) {
5224
5221
  if (o < 0)
5225
5222
  return null;
5226
5223
  let l = r.resolve(o), a, c;
5227
- if (no(n)) {
5224
+ if (to(n)) {
5228
5225
  for (a = o; i && !i.node; )
5229
5226
  i = i.parent;
5230
5227
  let d = i.node;
@@ -5250,19 +5247,19 @@ function _c(t, e = null) {
5250
5247
  let u = r.resolve(a);
5251
5248
  if (!c) {
5252
5249
  let d = e == "pointer" || t.state.selection.head < l.pos && !s ? 1 : -1;
5253
- c = co(t, u, l, d);
5250
+ c = ao(t, u, l, d);
5254
5251
  }
5255
5252
  return c;
5256
5253
  }
5257
- function ao(t) {
5254
+ function lo(t) {
5258
5255
  return t.editable ? t.hasFocus() : Uc(t) && document.activeElement && document.activeElement.contains(t.dom);
5259
5256
  }
5260
5257
  function zr(t, e = !1) {
5261
5258
  let n = t.state.selection;
5262
- if (Hc(t, n), !!ao(t)) {
5259
+ if (Hc(t, n), !!lo(t)) {
5263
5260
  if (!e && t.input.mouseDown && t.input.mouseDown.allowDefault && je) {
5264
5261
  let r = t.domSelectionRange(), i = t.domObserver.currentSelection;
5265
- if (r.anchorNode && i.anchorNode && to(r.anchorNode, r.anchorOffset, i.anchorNode, i.anchorOffset)) {
5262
+ if (r.anchorNode && i.anchorNode && eo(r.anchorNode, r.anchorOffset, i.anchorNode, i.anchorOffset)) {
5266
5263
  t.input.mouseDown.delayedSelectionSync = !0, t.domObserver.setCurSelection();
5267
5264
  return;
5268
5265
  }
@@ -5271,13 +5268,13 @@ function zr(t, e = !1) {
5271
5268
  zc(t);
5272
5269
  else {
5273
5270
  let { anchor: r, head: i } = n, s, o;
5274
- _i && !(n instanceof G) && (n.$from.parent.inlineContent || (s = Bi(t, n.from)), !n.empty && !n.$from.parent.inlineContent && (o = Bi(t, n.to))), t.docView.setSelection(r, i, t, e), _i && (s && zi(s), o && zi(o)), n.visible ? t.dom.classList.remove("ProseMirror-hideselection") : (t.dom.classList.add("ProseMirror-hideselection"), "onselectionchange" in document && Bc(t));
5271
+ $i && !(n instanceof G) && (n.$from.parent.inlineContent || (s = _i(t, n.from)), !n.empty && !n.$from.parent.inlineContent && (o = _i(t, n.to))), t.docView.setSelection(r, i, t, e), $i && (s && Bi(s), o && Bi(o)), n.visible ? t.dom.classList.remove("ProseMirror-hideselection") : (t.dom.classList.add("ProseMirror-hideselection"), "onselectionchange" in document && Bc(t));
5275
5272
  }
5276
5273
  t.domObserver.setCurSelection(), t.domObserver.connectSelection();
5277
5274
  }
5278
5275
  }
5279
- const _i = bt || je && oo < 63;
5280
- function Bi(t, e) {
5276
+ const $i = bt || je && so < 63;
5277
+ function _i(t, e) {
5281
5278
  let { node: n, offset: r } = t.docView.domFromPos(e, 0), i = r < n.childNodes.length ? n.childNodes[r] : null, s = r ? n.childNodes[r - 1] : null;
5282
5279
  if (bt && i && i.contentEditable == "false")
5283
5280
  return er(i);
@@ -5291,7 +5288,7 @@ function Bi(t, e) {
5291
5288
  function er(t) {
5292
5289
  return t.contentEditable = "true", bt && t.draggable && (t.draggable = !1, t.wasDraggable = !0), t;
5293
5290
  }
5294
- function zi(t) {
5291
+ function Bi(t) {
5295
5292
  t.contentEditable = "false", t.wasDraggable && (t.draggable = !0, t.wasDraggable = null);
5296
5293
  }
5297
5294
  function Bc(t) {
@@ -5300,7 +5297,7 @@ function Bc(t) {
5300
5297
  let n = t.domSelectionRange(), r = n.anchorNode, i = n.anchorOffset;
5301
5298
  e.addEventListener("selectionchange", t.input.hideSelectionGuard = () => {
5302
5299
  (n.anchorNode != r || n.anchorOffset != i) && (e.removeEventListener("selectionchange", t.input.hideSelectionGuard), setTimeout(() => {
5303
- (!ao(t) || t.state.selection.visible) && t.dom.classList.remove("ProseMirror-hideselection");
5300
+ (!lo(t) || t.state.selection.visible) && t.dom.classList.remove("ProseMirror-hideselection");
5304
5301
  }, 20));
5305
5302
  });
5306
5303
  }
@@ -5309,19 +5306,19 @@ function zc(t) {
5309
5306
  if (!e)
5310
5307
  return;
5311
5308
  let n = t.cursorWrapper.dom, r = n.nodeName == "IMG";
5312
- r ? e.collapse(n.parentNode, yt(n) + 1) : e.collapse(n, 0), !r && !t.state.selection.visible && Yt && so <= 11 && (n.disabled = !0, n.disabled = !1);
5309
+ r ? e.collapse(n.parentNode, yt(n) + 1) : e.collapse(n, 0), !r && !t.state.selection.visible && Yt && io <= 11 && (n.disabled = !0, n.disabled = !1);
5313
5310
  }
5314
5311
  function Hc(t, e) {
5315
5312
  if (e instanceof U) {
5316
5313
  let n = t.docView.descAt(e.from);
5317
- n != t.lastSelectedViewDesc && (Hi(t), n && n.selectNode(), t.lastSelectedViewDesc = n);
5314
+ n != t.lastSelectedViewDesc && (zi(t), n && n.selectNode(), t.lastSelectedViewDesc = n);
5318
5315
  } else
5319
- Hi(t);
5316
+ zi(t);
5320
5317
  }
5321
- function Hi(t) {
5318
+ function zi(t) {
5322
5319
  t.lastSelectedViewDesc && (t.lastSelectedViewDesc.parent && t.lastSelectedViewDesc.deselectNode(), t.lastSelectedViewDesc = void 0);
5323
5320
  }
5324
- function co(t, e, n, r) {
5321
+ function ao(t, e, n, r) {
5325
5322
  return t.someProp("createSelectionBetween", (i) => i(t, e, n)) || G.between(e, n, r);
5326
5323
  }
5327
5324
  function Uc(t) {
@@ -5341,7 +5338,7 @@ function kr(t, e) {
5341
5338
  function Xe(t, e) {
5342
5339
  return t.dispatch(t.state.tr.setSelection(e).scrollIntoView()), !0;
5343
5340
  }
5344
- function Ui(t, e, n) {
5341
+ function Hi(t, e, n) {
5345
5342
  let r = t.state.selection;
5346
5343
  if (r instanceof G)
5347
5344
  if (n.indexOf("s") > -1) {
@@ -5400,7 +5397,7 @@ function qc(t) {
5400
5397
  break;
5401
5398
  }
5402
5399
  } else {
5403
- if (uo(n))
5400
+ if (co(n))
5404
5401
  break;
5405
5402
  {
5406
5403
  let l = n.previousSibling;
@@ -5432,7 +5429,7 @@ function Kc(t) {
5432
5429
  else
5433
5430
  break;
5434
5431
  } else {
5435
- if (uo(n))
5432
+ if (co(n))
5436
5433
  break;
5437
5434
  {
5438
5435
  let l = n.nextSibling;
@@ -5449,7 +5446,7 @@ function Kc(t) {
5449
5446
  }
5450
5447
  s && vr(t, s, o);
5451
5448
  }
5452
- function uo(t) {
5449
+ function co(t) {
5453
5450
  let e = t.pmViewDesc;
5454
5451
  return e && e.node && e.node.isBlock;
5455
5452
  }
@@ -5485,7 +5482,7 @@ function vr(t, e, n) {
5485
5482
  let r = t.domSelection();
5486
5483
  if (!r)
5487
5484
  return;
5488
- if (no(r)) {
5485
+ if (to(r)) {
5489
5486
  let s = document.createRange();
5490
5487
  s.setEnd(e, n), s.setStart(e, n), r.removeAllRanges(), r.addRange(s);
5491
5488
  } else r.extend && r.extend(e, n);
@@ -5495,9 +5492,9 @@ function vr(t, e, n) {
5495
5492
  t.state == i && zr(t);
5496
5493
  }, 50);
5497
5494
  }
5498
- function qi(t, e) {
5495
+ function Ui(t, e) {
5499
5496
  let n = t.state.doc.resolve(e);
5500
- if (!(je || lo) && n.parent.inlineContent) {
5497
+ if (!(je || oo) && n.parent.inlineContent) {
5501
5498
  let i = t.coordsAtPos(e);
5502
5499
  if (e > n.start()) {
5503
5500
  let s = t.coordsAtPos(e - 1), o = (s.top + s.bottom) / 2;
@@ -5512,7 +5509,7 @@ function qi(t, e) {
5512
5509
  }
5513
5510
  return getComputedStyle(t.dom).direction == "rtl" ? "rtl" : "ltr";
5514
5511
  }
5515
- function Ki(t, e, n) {
5512
+ function qi(t, e, n) {
5516
5513
  let r = t.state.selection;
5517
5514
  if (r instanceof G && !r.empty || n.indexOf("s") > -1 || Me && n.indexOf("m") > -1)
5518
5515
  return !1;
@@ -5528,7 +5525,7 @@ function Ki(t, e, n) {
5528
5525
  }
5529
5526
  return !1;
5530
5527
  }
5531
- function Ji(t, e) {
5528
+ function Ki(t, e) {
5532
5529
  if (!(t.state.selection instanceof G))
5533
5530
  return !0;
5534
5531
  let { $head: n, $anchor: r, empty: i } = t.state.selection;
@@ -5545,7 +5542,7 @@ function Ji(t, e) {
5545
5542
  }
5546
5543
  return !1;
5547
5544
  }
5548
- function Wi(t, e, n) {
5545
+ function Ji(t, e, n) {
5549
5546
  t.domObserver.stop(), e.contentEditable = n, t.domObserver.start();
5550
5547
  }
5551
5548
  function jc(t) {
@@ -5554,7 +5551,7 @@ function jc(t) {
5554
5551
  let { focusNode: e, focusOffset: n } = t.domSelectionRange();
5555
5552
  if (e && e.nodeType == 1 && n == 0 && e.firstChild && e.firstChild.contentEditable == "false") {
5556
5553
  let r = e.firstChild;
5557
- Wi(t, r, "true"), setTimeout(() => Wi(t, r, "false"), 20);
5554
+ Ji(t, r, "true"), setTimeout(() => Ji(t, r, "false"), 20);
5558
5555
  }
5559
5556
  return !1;
5560
5557
  }
@@ -5565,28 +5562,28 @@ function Gc(t) {
5565
5562
  function Zc(t, e) {
5566
5563
  let n = e.keyCode, r = Gc(e);
5567
5564
  if (n == 8 || Me && n == 72 && r == "c")
5568
- return Ji(t, -1) || kt(t, -1);
5565
+ return Ki(t, -1) || kt(t, -1);
5569
5566
  if (n == 46 && !e.shiftKey || Me && n == 68 && r == "c")
5570
- return Ji(t, 1) || kt(t, 1);
5567
+ return Ki(t, 1) || kt(t, 1);
5571
5568
  if (n == 13 || n == 27)
5572
5569
  return !0;
5573
5570
  if (n == 37 || Me && n == 66 && r == "c") {
5574
- let i = n == 37 ? qi(t, t.state.selection.from) == "ltr" ? -1 : 1 : -1;
5575
- return Ui(t, i, r) || kt(t, i);
5571
+ let i = n == 37 ? Ui(t, t.state.selection.from) == "ltr" ? -1 : 1 : -1;
5572
+ return Hi(t, i, r) || kt(t, i);
5576
5573
  } else if (n == 39 || Me && n == 70 && r == "c") {
5577
- let i = n == 39 ? qi(t, t.state.selection.from) == "ltr" ? 1 : -1 : 1;
5578
- return Ui(t, i, r) || kt(t, i);
5574
+ let i = n == 39 ? Ui(t, t.state.selection.from) == "ltr" ? 1 : -1 : 1;
5575
+ return Hi(t, i, r) || kt(t, i);
5579
5576
  } else {
5580
5577
  if (n == 38 || Me && n == 80 && r == "c")
5581
- return Ki(t, -1, r) || kt(t, -1);
5578
+ return qi(t, -1, r) || kt(t, -1);
5582
5579
  if (n == 40 || Me && n == 78 && r == "c")
5583
- return jc(t) || Ki(t, 1, r) || kt(t, 1);
5580
+ return jc(t) || qi(t, 1, r) || kt(t, 1);
5584
5581
  if (r == (Me ? "m" : "c") && (n == 66 || n == 73 || n == 89 || n == 90))
5585
5582
  return !0;
5586
5583
  }
5587
5584
  return !1;
5588
5585
  }
5589
- function fo(t, e) {
5586
+ function uo(t, e) {
5590
5587
  t.someProp("transformCopied", (m) => {
5591
5588
  e = m(e, t);
5592
5589
  });
@@ -5596,10 +5593,10 @@ function fo(t, e) {
5596
5593
  let m = r.firstChild;
5597
5594
  n.push(m.type.name, m.attrs != m.type.defaultAttrs ? m.attrs : null), r = m.content;
5598
5595
  }
5599
- let o = t.someProp("clipboardSerializer") || Mn.fromSchema(t.state.schema), l = bo(), a = l.createElement("div");
5596
+ let o = t.someProp("clipboardSerializer") || Mn.fromSchema(t.state.schema), l = yo(), a = l.createElement("div");
5600
5597
  a.appendChild(o.serializeFragment(r, { document: l }));
5601
5598
  let c = a.firstChild, u, d = 0;
5602
- for (; c && c.nodeType == 1 && (u = yo[c.nodeName.toLowerCase()]); ) {
5599
+ for (; c && c.nodeType == 1 && (u = go[c.nodeName.toLowerCase()]); ) {
5603
5600
  for (let m = u.length - 1; m >= 0; m--) {
5604
5601
  let x = l.createElement(u[m]);
5605
5602
  for (; a.firstChild; )
@@ -5614,7 +5611,7 @@ function fo(t, e) {
5614
5611
  `);
5615
5612
  return { dom: a, text: p, slice: e };
5616
5613
  }
5617
- function ho(t, e, n, r, i) {
5614
+ function fo(t, e, n, r, i) {
5618
5615
  let s = i.parent.type.spec.code, o, l;
5619
5616
  if (!n && !e)
5620
5617
  return null;
@@ -5658,14 +5655,14 @@ function ho(t, e, n, r, i) {
5658
5655
  return p.nodeName == "BR" && !p.nextSibling && p.parentNode && !Qc.test(p.parentNode.nodeName) ? { ignore: !0 } : null;
5659
5656
  }
5660
5657
  })), u)
5661
- l = nu(ji(l, +u[1], +u[2]), u[4]);
5658
+ l = nu(Wi(l, +u[1], +u[2]), u[4]);
5662
5659
  else if (l = H.maxOpen(Xc(l.content, i), !0), l.openStart || l.openEnd) {
5663
5660
  let d = 0, p = 0;
5664
5661
  for (let m = l.content.firstChild; d < l.openStart && !m.type.spec.isolating; d++, m = m.firstChild)
5665
5662
  ;
5666
5663
  for (let m = l.content.lastChild; p < l.openEnd && !m.type.spec.isolating; p++, m = m.lastChild)
5667
5664
  ;
5668
- l = ji(l, d, p);
5665
+ l = Wi(l, d, p);
5669
5666
  }
5670
5667
  return t.someProp("transformPasted", (d) => {
5671
5668
  l = d(l, t, a);
@@ -5683,11 +5680,11 @@ function Xc(t, e) {
5683
5680
  let a = i.findWrapping(l.type), c;
5684
5681
  if (!a)
5685
5682
  return o = null;
5686
- if (c = o.length && s.length && mo(a, s, l, o[o.length - 1], 0))
5683
+ if (c = o.length && s.length && po(a, s, l, o[o.length - 1], 0))
5687
5684
  o[o.length - 1] = c;
5688
5685
  else {
5689
- o.length && (o[o.length - 1] = go(o[o.length - 1], s.length));
5690
- let u = po(l, a);
5686
+ o.length && (o[o.length - 1] = mo(o[o.length - 1], s.length));
5687
+ let u = ho(l, a);
5691
5688
  o.push(u), i = i.matchType(u.type), s = a;
5692
5689
  }
5693
5690
  }), o)
@@ -5695,34 +5692,34 @@ function Xc(t, e) {
5695
5692
  }
5696
5693
  return t;
5697
5694
  }
5698
- function po(t, e, n = 0) {
5695
+ function ho(t, e, n = 0) {
5699
5696
  for (let r = e.length - 1; r >= n; r--)
5700
5697
  t = e[r].create(null, z.from(t));
5701
5698
  return t;
5702
5699
  }
5703
- function mo(t, e, n, r, i) {
5700
+ function po(t, e, n, r, i) {
5704
5701
  if (i < t.length && i < e.length && t[i] == e[i]) {
5705
- let s = mo(t, e, n, r.lastChild, i + 1);
5702
+ let s = po(t, e, n, r.lastChild, i + 1);
5706
5703
  if (s)
5707
5704
  return r.copy(r.content.replaceChild(r.childCount - 1, s));
5708
5705
  if (r.contentMatchAt(r.childCount).matchType(i == t.length - 1 ? n.type : t[i + 1]))
5709
- return r.copy(r.content.append(z.from(po(n, t, i + 1))));
5706
+ return r.copy(r.content.append(z.from(ho(n, t, i + 1))));
5710
5707
  }
5711
5708
  }
5712
- function go(t, e) {
5709
+ function mo(t, e) {
5713
5710
  if (e == 0)
5714
5711
  return t;
5715
- let n = t.content.replaceChild(t.childCount - 1, go(t.lastChild, e - 1)), r = t.contentMatchAt(t.childCount).fillBefore(z.empty, !0);
5712
+ let n = t.content.replaceChild(t.childCount - 1, mo(t.lastChild, e - 1)), r = t.contentMatchAt(t.childCount).fillBefore(z.empty, !0);
5716
5713
  return t.copy(n.append(r));
5717
5714
  }
5718
5715
  function Cr(t, e, n, r, i, s) {
5719
5716
  let o = e < 0 ? t.firstChild : t.lastChild, l = o.content;
5720
5717
  return t.childCount > 1 && (s = 0), i < r - 1 && (l = Cr(l, e, n, r, i + 1, s)), i >= n && (l = e < 0 ? o.contentMatchAt(0).fillBefore(l, s <= i).append(l) : l.append(o.contentMatchAt(o.childCount).fillBefore(z.empty, !0))), t.replaceChild(e < 0 ? 0 : t.childCount - 1, o.copy(l));
5721
5718
  }
5722
- function ji(t, e, n) {
5719
+ function Wi(t, e, n) {
5723
5720
  return e < t.openStart && (t = new H(Cr(t.content, -1, e, t.openStart, 0, t.openEnd), e, t.openEnd)), n < t.openEnd && (t = new H(Cr(t.content, 1, n, t.openEnd, 0, 0), t.openStart, n)), t;
5724
5721
  }
5725
- const yo = {
5722
+ const go = {
5726
5723
  thead: ["table"],
5727
5724
  tbody: ["table"],
5728
5725
  tfoot: ["table"],
@@ -5733,9 +5730,9 @@ const yo = {
5733
5730
  td: ["table", "tbody", "tr"],
5734
5731
  th: ["table", "tbody", "tr"]
5735
5732
  };
5736
- let Gi = null;
5737
- function bo() {
5738
- return Gi || (Gi = document.implementation.createHTMLDocument("title"));
5733
+ let ji = null;
5734
+ function yo() {
5735
+ return ji || (ji = document.implementation.createHTMLDocument("title"));
5739
5736
  }
5740
5737
  let tr = null;
5741
5738
  function Yc(t) {
@@ -5745,8 +5742,8 @@ function Yc(t) {
5745
5742
  function eu(t) {
5746
5743
  let e = /^(\s*<meta [^>]*>)*/.exec(t);
5747
5744
  e && (t = t.slice(e[0].length));
5748
- let n = bo().createElement("div"), r = /<([a-z][^>\s]+)/i.exec(t), i;
5749
- if ((i = r && yo[r[1].toLowerCase()]) && (t = i.map((s) => "<" + s + ">").join("") + t + i.map((s) => "</" + s + ">").reverse().join("")), n.innerHTML = Yc(t), i)
5745
+ let n = yo().createElement("div"), r = /<([a-z][^>\s]+)/i.exec(t), i;
5746
+ if ((i = r && go[r[1].toLowerCase()]) && (t = i.map((s) => "<" + s + ">").join("") + t + i.map((s) => "</" + s + ">").reverse().join("")), n.innerHTML = Yc(t), i)
5750
5747
  for (let s = 0; s < i.length; s++)
5751
5748
  n = n.querySelector(i[s]) || n;
5752
5749
  return n;
@@ -5782,11 +5779,11 @@ function Ye(t, e) {
5782
5779
  }
5783
5780
  Ee.keydown = (t, e) => {
5784
5781
  let n = e;
5785
- if (t.input.shiftKey = n.keyCode == 16 || n.shiftKey, !ko(t, n) && (t.input.lastKeyCode = n.keyCode, t.input.lastKeyCodeTime = Date.now(), !(en && je && n.keyCode == 13)))
5782
+ if (t.input.shiftKey = n.keyCode == 16 || n.shiftKey, !xo(t, n) && (t.input.lastKeyCode = n.keyCode, t.input.lastKeyCodeTime = Date.now(), !(en && je && n.keyCode == 13)))
5786
5783
  if (n.keyCode != 229 && t.domObserver.forceFlush(), _r && n.keyCode == 13 && !n.ctrlKey && !n.altKey && !n.metaKey) {
5787
5784
  let r = Date.now();
5788
5785
  t.input.lastIOSEnter = r, t.input.lastIOSEnterFallbackTimeout = setTimeout(() => {
5789
- t.input.lastIOSEnter == r && (t.someProp("handleKeyDown", (i) => i(t, ro(13, "Enter"))), t.input.lastIOSEnter = 0);
5786
+ t.input.lastIOSEnter == r && (t.someProp("handleKeyDown", (i) => i(t, no(13, "Enter"))), t.input.lastIOSEnter = 0);
5790
5787
  }, 200);
5791
5788
  } else t.someProp("handleKeyDown", (r) => r(t, n)) || Zc(t, n) ? n.preventDefault() : Ye(t, "key");
5792
5789
  };
@@ -5795,7 +5792,7 @@ Ee.keyup = (t, e) => {
5795
5792
  };
5796
5793
  Ee.keypress = (t, e) => {
5797
5794
  let n = e;
5798
- if (ko(t, n) || !n.charCode || n.ctrlKey && !n.altKey || Me && n.metaKey)
5795
+ if (xo(t, n) || !n.charCode || n.ctrlKey && !n.altKey || Me && n.metaKey)
5799
5796
  return;
5800
5797
  if (t.someProp("handleKeyPress", (i) => i(t, n))) {
5801
5798
  n.preventDefault();
@@ -5880,18 +5877,18 @@ function cu(t, e, n) {
5880
5877
  function Ur(t) {
5881
5878
  return kn(t);
5882
5879
  }
5883
- const xo = Me ? "metaKey" : "ctrlKey";
5880
+ const bo = Me ? "metaKey" : "ctrlKey";
5884
5881
  $e.mousedown = (t, e) => {
5885
5882
  let n = e;
5886
5883
  t.input.shiftKey = n.shiftKey;
5887
5884
  let r = Ur(t), i = Date.now(), s = "singleClick";
5888
- i - t.input.lastClick.time < 500 && ru(n, t.input.lastClick) && !n[xo] && t.input.lastClick.button == n.button && (t.input.lastClick.type == "singleClick" ? s = "doubleClick" : t.input.lastClick.type == "doubleClick" && (s = "tripleClick")), t.input.lastClick = { time: i, x: n.clientX, y: n.clientY, type: s, button: n.button };
5885
+ i - t.input.lastClick.time < 500 && ru(n, t.input.lastClick) && !n[bo] && t.input.lastClick.button == n.button && (t.input.lastClick.type == "singleClick" ? s = "doubleClick" : t.input.lastClick.type == "doubleClick" && (s = "tripleClick")), t.input.lastClick = { time: i, x: n.clientX, y: n.clientY, type: s, button: n.button };
5889
5886
  let o = t.posAtCoords(Ln(n));
5890
5887
  o && (s == "singleClick" ? (t.input.mouseDown && t.input.mouseDown.done(), t.input.mouseDown = new uu(t, o, n, !!r)) : (s == "doubleClick" ? lu : au)(t, o.pos, o.inside, n) ? n.preventDefault() : Ye(t, "pointer"));
5891
5888
  };
5892
5889
  class uu {
5893
5890
  constructor(e, n, r, i) {
5894
- this.view = e, this.pos = n, this.event = r, this.flushed = i, this.delayedSelectionSync = !1, this.mightDrag = null, this.startDoc = e.state.doc, this.selectNode = !!r[xo], this.allowDefault = r.shiftKey;
5891
+ this.view = e, this.pos = n, this.event = r, this.flushed = i, this.delayedSelectionSync = !1, this.mightDrag = null, this.startDoc = e.state.doc, this.selectNode = !!r[bo], this.allowDefault = r.shiftKey;
5895
5892
  let s, o;
5896
5893
  if (n.inside > -1)
5897
5894
  s = e.state.doc.nodeAt(n.inside), o = n.inside;
@@ -5942,7 +5939,7 @@ $e.touchmove = (t) => {
5942
5939
  t.input.lastTouch = Date.now(), Ye(t, "pointer");
5943
5940
  };
5944
5941
  $e.contextmenu = (t) => Ur(t);
5945
- function ko(t, e) {
5942
+ function xo(t, e) {
5946
5943
  return t.composing ? !0 : bt && Math.abs(e.timeStamp - t.input.compositionEndedAt) < 500 ? (t.input.compositionEndedAt = -2e8, !0) : !1;
5947
5944
  }
5948
5945
  const du = en ? 5e3 : -1;
@@ -5950,7 +5947,7 @@ Ee.compositionstart = Ee.compositionupdate = (t) => {
5950
5947
  if (!t.composing) {
5951
5948
  t.domObserver.flush();
5952
5949
  let { state: e } = t, n = e.selection.$to;
5953
- if (e.selection instanceof G && (e.storedMarks || !n.textOffset && n.parentOffset && n.nodeBefore.marks.some((r) => r.type.spec.inclusive === !1) || je && lo && fu(t)))
5950
+ if (e.selection instanceof G && (e.storedMarks || !n.textOffset && n.parentOffset && n.nodeBefore.marks.some((r) => r.type.spec.inclusive === !1) || je && oo && fu(t)))
5954
5951
  t.markCursor = t.state.storedMarks || n.marks(), kn(t, !0), t.markCursor = null;
5955
5952
  else if (kn(t, !e.selection.empty), Dn && e.selection.empty && n.parentOffset && !n.textOffset && n.nodeBefore.marks.length) {
5956
5953
  let r = t.domSelectionRange();
@@ -5968,7 +5965,7 @@ Ee.compositionstart = Ee.compositionupdate = (t) => {
5968
5965
  }
5969
5966
  t.input.composing = !0;
5970
5967
  }
5971
- vo(t, du);
5968
+ ko(t, du);
5972
5969
  };
5973
5970
  function fu(t) {
5974
5971
  let { focusNode: e, focusOffset: n } = t.domSelectionRange();
@@ -5978,9 +5975,9 @@ function fu(t) {
5978
5975
  return r.nodeType == 1 && r.contentEditable == "false";
5979
5976
  }
5980
5977
  Ee.compositionend = (t, e) => {
5981
- t.composing && (t.input.composing = !1, t.input.compositionEndedAt = e.timeStamp, t.input.compositionPendingChanges = t.domObserver.pendingRecords().length ? t.input.compositionID : 0, t.input.compositionNode = null, t.input.badSafariComposition ? t.domObserver.forceFlush() : t.input.compositionPendingChanges && Promise.resolve().then(() => t.domObserver.flush()), t.input.compositionID++, vo(t, 20));
5978
+ t.composing && (t.input.composing = !1, t.input.compositionEndedAt = e.timeStamp, t.input.compositionPendingChanges = t.domObserver.pendingRecords().length ? t.input.compositionID : 0, t.input.compositionNode = null, t.input.badSafariComposition ? t.domObserver.forceFlush() : t.input.compositionPendingChanges && Promise.resolve().then(() => t.domObserver.flush()), t.input.compositionID++, ko(t, 20));
5982
5979
  };
5983
- function vo(t, e) {
5980
+ function ko(t, e) {
5984
5981
  clearTimeout(t.input.composingTimeout), e > -1 && (t.input.composingTimeout = setTimeout(() => kn(t), e));
5985
5982
  }
5986
5983
  function hu(t) {
@@ -6010,12 +6007,12 @@ function mu(t, e) {
6010
6007
  n.parentNode && n.parentNode.removeChild(n), t.focus();
6011
6008
  }, 50);
6012
6009
  }
6013
- const Gt = Yt && so < 15 || _r && $c < 604;
6010
+ const Gt = Yt && io < 15 || _r && $c < 604;
6014
6011
  $e.copy = Ee.cut = (t, e) => {
6015
6012
  let n = e, r = t.state.selection, i = n.type == "cut";
6016
6013
  if (r.empty)
6017
6014
  return;
6018
- let s = Gt ? null : n.clipboardData, o = r.content(), { dom: l, text: a } = fo(t, o);
6015
+ let s = Gt ? null : n.clipboardData, o = r.content(), { dom: l, text: a } = uo(t, o);
6019
6016
  s ? (n.preventDefault(), s.clearData(), s.setData("text/html", l.innerHTML), s.setData("text/plain", a)) : mu(t, l), i && t.dispatch(t.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent", "cut"));
6020
6017
  };
6021
6018
  function gu(t) {
@@ -6032,7 +6029,7 @@ function yu(t, e) {
6032
6029
  }, 50);
6033
6030
  }
6034
6031
  function Sr(t, e, n, r, i) {
6035
- let s = ho(t, e, n, r, t.state.selection.$from);
6032
+ let s = fo(t, e, n, r, t.state.selection.$from);
6036
6033
  if (t.someProp("handlePaste", (a) => a(t, i, s || H.empty)))
6037
6034
  return !0;
6038
6035
  if (!s)
@@ -6040,7 +6037,7 @@ function Sr(t, e, n, r, i) {
6040
6037
  let o = gu(s), l = o ? t.state.tr.replaceSelectionWith(o, r) : t.state.tr.replaceSelection(s);
6041
6038
  return t.dispatch(l.scrollIntoView().setMeta("paste", !0).setMeta("uiEvent", "paste")), !0;
6042
6039
  }
6043
- function Co(t) {
6040
+ function vo(t) {
6044
6041
  let e = t.getData("text/plain") || t.getData("Text");
6045
6042
  if (e)
6046
6043
  return e;
@@ -6052,7 +6049,7 @@ Ee.paste = (t, e) => {
6052
6049
  if (t.composing && !en)
6053
6050
  return;
6054
6051
  let r = Gt ? null : n.clipboardData, i = t.input.shiftKey && t.input.lastKeyCode != 45;
6055
- r && Sr(t, Co(r), r.getData("text/html"), i, n) ? n.preventDefault() : yu(t, n);
6052
+ r && Sr(t, vo(r), r.getData("text/html"), i, n) ? n.preventDefault() : yu(t, n);
6056
6053
  };
6057
6054
  class bu {
6058
6055
  constructor(e, n, r) {
@@ -6060,7 +6057,7 @@ class bu {
6060
6057
  }
6061
6058
  }
6062
6059
  const xu = Me ? "altKey" : "ctrlKey";
6063
- function So(t, e) {
6060
+ function Co(t, e) {
6064
6061
  let n = t.someProp("dragCopies", (r) => !r(e));
6065
6062
  return n ?? !e[xu];
6066
6063
  }
@@ -6077,8 +6074,8 @@ $e.dragstart = (t, e) => {
6077
6074
  d && d.node.type.spec.draggable && d != t.docView && (o = U.create(t.state.doc, d.posBefore));
6078
6075
  }
6079
6076
  }
6080
- let l = (o || t.state.selection).content(), { dom: a, text: c, slice: u } = fo(t, l);
6081
- (!n.dataTransfer.files.length || !je || oo > 120) && n.dataTransfer.clearData(), n.dataTransfer.setData(Gt ? "Text" : "text/html", a.innerHTML), n.dataTransfer.effectAllowed = "copyMove", Gt || n.dataTransfer.setData("text/plain", c), t.dragging = new bu(u, So(t, n), o);
6077
+ let l = (o || t.state.selection).content(), { dom: a, text: c, slice: u } = uo(t, l);
6078
+ (!n.dataTransfer.files.length || !je || so > 120) && n.dataTransfer.clearData(), n.dataTransfer.setData(Gt ? "Text" : "text/html", a.innerHTML), n.dataTransfer.effectAllowed = "copyMove", Gt || n.dataTransfer.setData("text/plain", c), t.dragging = new bu(u, Co(t, n), o);
6082
6079
  };
6083
6080
  $e.dragend = (t) => {
6084
6081
  let e = t.dragging;
@@ -6103,8 +6100,8 @@ function ku(t, e, n) {
6103
6100
  let i = t.state.doc.resolve(r.pos), s = n && n.slice;
6104
6101
  s ? t.someProp("transformPasted", (m) => {
6105
6102
  s = m(s, t, !1);
6106
- }) : s = ho(t, Co(e.dataTransfer), Gt ? null : e.dataTransfer.getData("text/html"), !1, i);
6107
- let o = !!(n && So(t, e));
6103
+ }) : s = fo(t, vo(e.dataTransfer), Gt ? null : e.dataTransfer.getData("text/html"), !1, i);
6104
+ let o = !!(n && Co(t, e));
6108
6105
  if (t.someProp("handleDrop", (m) => m(t, e, s || H.empty, o))) {
6109
6106
  e.preventDefault();
6110
6107
  return;
@@ -6112,7 +6109,7 @@ function ku(t, e, n) {
6112
6109
  if (!s)
6113
6110
  return;
6114
6111
  e.preventDefault();
6115
- let l = s ? js(t.state.doc, i.pos, s) : i.pos;
6112
+ let l = s ? Ws(t.state.doc, i.pos, s) : i.pos;
6116
6113
  l == null && (l = i.pos);
6117
6114
  let a = t.state.tr;
6118
6115
  if (o) {
@@ -6127,7 +6124,7 @@ function ku(t, e, n) {
6127
6124
  a.setSelection(new U(p));
6128
6125
  else {
6129
6126
  let m = a.mapping.map(l);
6130
- a.mapping.maps[a.mapping.maps.length - 1].forEach((x, y, k, v) => m = v), a.setSelection(co(t, p, a.doc.resolve(m)));
6127
+ a.mapping.maps[a.mapping.maps.length - 1].forEach((x, y, k, v) => m = v), a.setSelection(ao(t, p, a.doc.resolve(m)));
6131
6128
  }
6132
6129
  t.focus(), t.dispatch(a.setMeta("uiEvent", "drop"));
6133
6130
  }
@@ -6145,7 +6142,7 @@ $e.beforeinput = (t, e) => {
6145
6142
  t.domObserver.flushSoon();
6146
6143
  let { domChangeCount: r } = t.input;
6147
6144
  setTimeout(() => {
6148
- if (t.input.domChangeCount != r || (t.dom.blur(), t.focus(), t.someProp("handleKeyDown", (s) => s(t, ro(8, "Backspace")))))
6145
+ if (t.input.domChangeCount != r || (t.dom.blur(), t.focus(), t.someProp("handleKeyDown", (s) => s(t, no(8, "Backspace")))))
6149
6146
  return;
6150
6147
  let { $cursor: i } = t.state.selection;
6151
6148
  i && i.pos > 0 && t.dispatch(t.state.tr.delete(i.pos - 1, i.pos).scrollIntoView());
@@ -6365,13 +6362,13 @@ class ae {
6365
6362
  let i, s = 0;
6366
6363
  e.forEach((l, a) => {
6367
6364
  let c = a + r, u;
6368
- if (u = Ao(n, l, c)) {
6365
+ if (u = wo(n, l, c)) {
6369
6366
  for (i || (i = this.children.slice()); s < i.length && i[s] < a; )
6370
6367
  s += 3;
6371
6368
  i[s] == a ? i[s + 2] = i[s + 2].addInner(l, u, c + 1) : i.splice(s, 0, a, a + l.nodeSize, Cn(u, l, c + 1, mt)), s += 3;
6372
6369
  }
6373
6370
  });
6374
- let o = wo(s ? No(n) : n, -r);
6371
+ let o = So(s ? Ao(n) : n, -r);
6375
6372
  for (let l = 0; l < o.length; l++)
6376
6373
  o[l].type.valid(e, o[l]) || o.splice(l--, 1);
6377
6374
  return new ae(o.length ? this.local.concat(o).sort(gt) : this.local, i || this.children);
@@ -6577,7 +6574,7 @@ function vu(t, e, n, r, i, s, o) {
6577
6574
  }
6578
6575
  return new ae(e.sort(gt), l);
6579
6576
  }
6580
- function wo(t, e) {
6577
+ function So(t, e) {
6581
6578
  if (!e || !t.length)
6582
6579
  return t;
6583
6580
  let n = [];
@@ -6600,7 +6597,7 @@ function Cu(t, e, n, r, i, s, o) {
6600
6597
  t[a + 1] == -1 && l(t[a + 2], e[a] + s + 1);
6601
6598
  return n;
6602
6599
  }
6603
- function Ao(t, e, n) {
6600
+ function wo(t, e, n) {
6604
6601
  if (e.isLeaf)
6605
6602
  return null;
6606
6603
  let r = n + e.nodeSize, i = null;
@@ -6608,7 +6605,7 @@ function Ao(t, e, n) {
6608
6605
  (o = t[s]) && o.from > n && o.to < r && ((i || (i = [])).push(o), t[s] = null);
6609
6606
  return i;
6610
6607
  }
6611
- function No(t) {
6608
+ function Ao(t) {
6612
6609
  let e = [];
6613
6610
  for (let n = 0; n < t.length; n++)
6614
6611
  t[n] != null && e.push(t[n]);
@@ -6617,14 +6614,14 @@ function No(t) {
6617
6614
  function Cn(t, e, n, r) {
6618
6615
  let i = [], s = !1;
6619
6616
  e.forEach((l, a) => {
6620
- let c = Ao(t, l, a + n);
6617
+ let c = wo(t, l, a + n);
6621
6618
  if (c) {
6622
6619
  s = !0;
6623
6620
  let u = Cn(c, l, n + a + 1, r);
6624
6621
  u != be && i.push(a, a + l.nodeSize, u);
6625
6622
  }
6626
6623
  });
6627
- let o = wo(s ? No(t) : t, -n).sort(gt);
6624
+ let o = So(s ? Ao(t) : t, -n).sort(gt);
6628
6625
  for (let l = 0; l < o.length; l++)
6629
6626
  o[l].type.valid(e, o[l]) || (r.onRemove && r.onRemove(o[l].spec), o.splice(l--, 1));
6630
6627
  return o.length || i.length ? new ae(o, i) : be;
@@ -6640,17 +6637,17 @@ function Kr(t) {
6640
6637
  for (let i = n + 1; i < e.length; i++) {
6641
6638
  let s = e[i];
6642
6639
  if (s.from == r.from) {
6643
- s.to != r.to && (e == t && (e = t.slice()), e[i] = s.copy(s.from, r.to), Zi(e, i + 1, s.copy(r.to, s.to)));
6640
+ s.to != r.to && (e == t && (e = t.slice()), e[i] = s.copy(s.from, r.to), Gi(e, i + 1, s.copy(r.to, s.to)));
6644
6641
  continue;
6645
6642
  } else {
6646
- s.from < r.to && (e == t && (e = t.slice()), e[n] = r.copy(r.from, s.from), Zi(e, i, r.copy(s.from, r.to)));
6643
+ s.from < r.to && (e == t && (e = t.slice()), e[n] = r.copy(r.from, s.from), Gi(e, i, r.copy(s.from, r.to)));
6647
6644
  break;
6648
6645
  }
6649
6646
  }
6650
6647
  }
6651
6648
  return e;
6652
6649
  }
6653
- function Zi(t, e, n) {
6650
+ function Gi(t, e, n) {
6654
6651
  for (; e < t.length && gt(n, t[e]) > 0; )
6655
6652
  e++;
6656
6653
  t.splice(e, 0, n);
@@ -6755,7 +6752,7 @@ class Jr {
6755
6752
  return ee.valid(n) ? new ee(n) : Z.near(n);
6756
6753
  }
6757
6754
  }
6758
- function Eo(t) {
6755
+ function No(t) {
6759
6756
  return t.isAtom || t.spec.isolating || t.spec.createGapCursor;
6760
6757
  }
6761
6758
  function Su(t) {
@@ -6767,7 +6764,7 @@ function Su(t) {
6767
6764
  continue;
6768
6765
  }
6769
6766
  for (let i = r.child(n - 1); ; i = i.lastChild) {
6770
- if (i.childCount == 0 && !i.inlineContent || Eo(i.type))
6767
+ if (i.childCount == 0 && !i.inlineContent || No(i.type))
6771
6768
  return !0;
6772
6769
  if (i.inlineContent)
6773
6770
  return !1;
@@ -6784,7 +6781,7 @@ function wu(t) {
6784
6781
  continue;
6785
6782
  }
6786
6783
  for (let i = r.child(n); ; i = i.firstChild) {
6787
- if (i.childCount == 0 && !i.inlineContent || Eo(i.type))
6784
+ if (i.childCount == 0 && !i.inlineContent || No(i.type))
6788
6785
  return !0;
6789
6786
  if (i.inlineContent)
6790
6787
  return !1;
@@ -6866,7 +6863,7 @@ const Ou = Lr.create({
6866
6863
  storage: t.storage
6867
6864
  };
6868
6865
  return {
6869
- allowGapCursor: (e = jl(Gl(t, "allowGapCursor", n))) !== null && e !== void 0 ? e : null
6866
+ allowGapCursor: (e = Wl(jl(t, "allowGapCursor", n))) !== null && e !== void 0 ? e : null
6870
6867
  };
6871
6868
  }
6872
6869
  }), Dt = {
@@ -6890,7 +6887,7 @@ const Ou = Lr.create({
6890
6887
  },
6891
6888
  underline: {
6892
6889
  category: "mark",
6893
- extension: Zl,
6890
+ extension: Gl,
6894
6891
  priority: 100
6895
6892
  },
6896
6893
  code: {
@@ -6900,7 +6897,7 @@ const Ou = Lr.create({
6900
6897
  },
6901
6898
  textColor: {
6902
6899
  category: "mark",
6903
- extension: Ql,
6900
+ extension: Zl,
6904
6901
  // Note: TextStyle is already in helperExtensions
6905
6902
  defaultOptions: {
6906
6903
  types: ["textStyle"]
@@ -6909,7 +6906,7 @@ const Ou = Lr.create({
6909
6906
  },
6910
6907
  highlight: {
6911
6908
  category: "mark",
6912
- extension: Xl,
6909
+ extension: Ql,
6913
6910
  defaultOptions: {
6914
6911
  multicolor: !0
6915
6912
  },
@@ -6917,7 +6914,7 @@ const Ou = Lr.create({
6917
6914
  },
6918
6915
  link: {
6919
6916
  category: "mark",
6920
- extension: Yl,
6917
+ extension: Xl,
6921
6918
  defaultOptions: {
6922
6919
  openOnClick: !1,
6923
6920
  HTMLAttributes: {
@@ -6961,7 +6958,7 @@ const Ou = Lr.create({
6961
6958
  },
6962
6959
  taskList: {
6963
6960
  category: "node",
6964
- extension: ea,
6961
+ extension: Yl,
6965
6962
  // Note: TaskItem is already in helperExtensions
6966
6963
  defaultOptions: {
6967
6964
  HTMLAttributes: {
@@ -7006,7 +7003,7 @@ const Ou = Lr.create({
7006
7003
  },
7007
7004
  textAlign: {
7008
7005
  category: "extension",
7009
- extension: na,
7006
+ extension: ta,
7010
7007
  defaultOptions: {
7011
7008
  types: ["heading", "paragraph", "listItem"],
7012
7009
  alignments: ["left", "center", "right", "justify"],
@@ -7033,7 +7030,7 @@ const Ou = Lr.create({
7033
7030
  // Required: default block node
7034
7031
  za,
7035
7032
  ja,
7036
- ta,
7033
+ ea,
7037
7034
  // Required for task lists
7038
7035
  Pt,
7039
7036
  // Required: undo/redo functionality
@@ -7176,7 +7173,7 @@ const Lu = {
7176
7173
  onZoomChange: n,
7177
7174
  onToolbarAction: r
7178
7175
  }) => {
7179
- const { editor: i } = Fs();
7176
+ const { editor: i } = Ls();
7180
7177
  return /* @__PURE__ */ f(
7181
7178
  Sa,
7182
7179
  {
@@ -7191,7 +7188,7 @@ const Lu = {
7191
7188
  showCharacterCount: t,
7192
7189
  showWordCount: e
7193
7190
  }) => {
7194
- const { editor: n } = Fs();
7191
+ const { editor: n } = Ls();
7195
7192
  if (!n || !t && !e)
7196
7193
  return null;
7197
7194
  const r = n.getText(), i = r.length, s = r.split(/\s+/).filter((o) => o.length > 0).length;
@@ -7223,7 +7220,7 @@ const Lu = {
7223
7220
  isReadOnly: y = !1,
7224
7221
  isDisabled: k = !1,
7225
7222
  ...v
7226
- } = t, { zoom: S, setZoom: I } = ka(), A = bi.lineHeight, M = n * A, D = i ? void 0 : r * A, O = R.useMemo(() => Du(a), [a]), { Component: V, label: $, shouldLabelBeOutside: q, getBaseProps: Te, getLabelProps: P, getInputWrapperProps: _ } = pl({
7223
+ } = t, { zoom: S, setZoom: I } = ka(), A = pa.lineHeight, M = n * A, D = i ? void 0 : r * A, O = R.useMemo(() => Du(a), [a]), { Component: V, label: $, shouldLabelBeOutside: q, getBaseProps: Te, getLabelProps: P, getInputWrapperProps: _ } = hl({
7227
7224
  ...v,
7228
7225
  variant: c,
7229
7226
  // Explicitly pass variant to ensure bordered styling
@@ -7255,12 +7252,8 @@ const Lu = {
7255
7252
  {
7256
7253
  ..._(),
7257
7254
  className: L(_().className, "flex flex-col w-full p-0 gap-0 rich-text-editor"),
7258
- style: {
7259
- maxHeight: D ? `${D + bi.toolbarHeight}px` : void 0,
7260
- overflow: D ? "auto" : void 0
7261
- },
7262
7255
  children: /* @__PURE__ */ f(
7263
- ql,
7256
+ Ul,
7264
7257
  {
7265
7258
  editable: !y && !k,
7266
7259
  slotBefore: l ? /* @__PURE__ */ f(
@@ -7277,6 +7270,8 @@ const Lu = {
7277
7270
  className: "w-full flex-1 outline-none",
7278
7271
  style: {
7279
7272
  minHeight: `${M}px`,
7273
+ maxHeight: D ? `${D}px` : void 0,
7274
+ overflow: D ? "auto" : void 0,
7280
7275
  fontSize: `${S}%`,
7281
7276
  display: "flex",
7282
7277
  flexDirection: "column"
@@ -7314,7 +7309,7 @@ function Vu(t, e = "en-US", n = "USD") {
7314
7309
  return console.warn(`Invalid currency formatting: ${r}`), `${n} ${t.toFixed(2)}`;
7315
7310
  }
7316
7311
  }
7317
- const Qi = [
7312
+ const Zi = [
7318
7313
  { id: "100", amount: 100 },
7319
7314
  { id: "250", amount: 250 },
7320
7315
  { id: "500", amount: 500 },
@@ -7325,7 +7320,7 @@ const Qi = [
7325
7320
  customAmountPlaceholder: "Custom donation amount",
7326
7321
  customAmountAriaLabel: "Custom donation amount"
7327
7322
  }, _u = ({
7328
- presetAmounts: t = Qi,
7323
+ presetAmounts: t = Zi,
7329
7324
  selectedDonation: e,
7330
7325
  defaultSelectedDonation: n = null,
7331
7326
  onChange: r,
@@ -7344,7 +7339,7 @@ const Qi = [
7344
7339
  className: k = "",
7345
7340
  showCard: v = !0
7346
7341
  }) => {
7347
- const S = { ...$u, ...c }, I = Array.isArray(t) ? t : Qi, A = {
7342
+ const S = { ...$u, ...c }, I = Array.isArray(t) ? t : Zi, A = {
7348
7343
  2: "grid-cols-2",
7349
7344
  3: "grid-cols-3"
7350
7345
  }, M = {
@@ -7408,7 +7403,7 @@ const Qi = [
7408
7403
  );
7409
7404
  }) }),
7410
7405
  o && /* @__PURE__ */ f(
7411
- As,
7406
+ ws,
7412
7407
  {
7413
7408
  placeholder: S.customAmountPlaceholder,
7414
7409
  "aria-label": S.customAmountAriaLabel,
@@ -7437,9 +7432,9 @@ const Bu = (t) => {
7437
7432
  case "warning":
7438
7433
  return yi;
7439
7434
  case "error":
7440
- return zl;
7441
- case "success":
7442
7435
  return Bl;
7436
+ case "success":
7437
+ return _l;
7443
7438
  default:
7444
7439
  return yi;
7445
7440
  }
@@ -7575,7 +7570,7 @@ function qu(t, e) {
7575
7570
  }
7576
7571
  return Object.keys(n).concat(Object.keys(r)).forEach(s), i;
7577
7572
  }
7578
- const To = Object.freeze({
7573
+ const Eo = Object.freeze({
7579
7574
  left: 0,
7580
7575
  top: 0,
7581
7576
  width: 16,
@@ -7585,7 +7580,7 @@ const To = Object.freeze({
7585
7580
  vFlip: !1,
7586
7581
  hFlip: !1
7587
7582
  }), Wr = Object.freeze({
7588
- ...To,
7583
+ ...Eo,
7589
7584
  ...Sn
7590
7585
  }), Ar = Object.freeze({
7591
7586
  ...Wr,
@@ -7598,7 +7593,7 @@ function Ku(t, e) {
7598
7593
  const r = ((t.rotate || 0) + (e.rotate || 0)) % 4;
7599
7594
  return r && (n.rotate = r), n;
7600
7595
  }
7601
- function Xi(t, e) {
7596
+ function Qi(t, e) {
7602
7597
  const n = Ku(t, e);
7603
7598
  for (const r in Ar) r in Sn ? r in t && !(r in n) && (n[r] = Sn[r]) : r in e ? n[r] = e[r] : r in t && (n[r] = t[r]);
7604
7599
  return n;
@@ -7607,11 +7602,11 @@ function Ju(t, e, n) {
7607
7602
  const r = t.icons, i = t.aliases || /* @__PURE__ */ Object.create(null);
7608
7603
  let s = {};
7609
7604
  function o(l) {
7610
- s = Xi(r[l] || i[l], s);
7605
+ s = Qi(r[l] || i[l], s);
7611
7606
  }
7612
- return o(e), n.forEach(o), Xi(t, s);
7607
+ return o(e), n.forEach(o), Qi(t, s);
7613
7608
  }
7614
- function Mo(t, e) {
7609
+ function To(t, e) {
7615
7610
  const n = [];
7616
7611
  if (typeof t != "object" || typeof t.icons != "object") return n;
7617
7612
  t.not_found instanceof Array && t.not_found.forEach((i) => {
@@ -7628,13 +7623,13 @@ const Wu = {
7628
7623
  provider: "",
7629
7624
  aliases: {},
7630
7625
  not_found: {},
7631
- ...To
7626
+ ...Eo
7632
7627
  };
7633
7628
  function nr(t, e) {
7634
7629
  for (const n in e) if (n in t && typeof t[n] != typeof e[n]) return !1;
7635
7630
  return !0;
7636
7631
  }
7637
- function Oo(t) {
7632
+ function Mo(t) {
7638
7633
  if (typeof t != "object" || t === null) return null;
7639
7634
  const e = t;
7640
7635
  if (typeof e.prefix != "string" || !t.icons || typeof t.icons != "object" || !nr(t, Wu)) return null;
@@ -7650,7 +7645,7 @@ function Oo(t) {
7650
7645
  }
7651
7646
  return e;
7652
7647
  }
7653
- const Yi = /* @__PURE__ */ Object.create(null);
7648
+ const Xi = /* @__PURE__ */ Object.create(null);
7654
7649
  function ju(t, e) {
7655
7650
  return {
7656
7651
  provider: t,
@@ -7660,11 +7655,11 @@ function ju(t, e) {
7660
7655
  };
7661
7656
  }
7662
7657
  function Ot(t, e) {
7663
- const n = Yi[t] || (Yi[t] = /* @__PURE__ */ Object.create(null));
7658
+ const n = Xi[t] || (Xi[t] = /* @__PURE__ */ Object.create(null));
7664
7659
  return n[e] || (n[e] = ju(t, e));
7665
7660
  }
7666
- function Io(t, e) {
7667
- return Oo(e) ? Mo(e, (n, r) => {
7661
+ function Oo(t, e) {
7662
+ return Mo(e) ? To(e, (n, r) => {
7668
7663
  r ? t.icons[n] = r : t.missing.add(n);
7669
7664
  }) : [];
7670
7665
  }
@@ -7676,7 +7671,7 @@ function Gu(t, e, n) {
7676
7671
  }
7677
7672
  return !1;
7678
7673
  }
7679
- const Do = /^[a-z0-9]+(-[a-z0-9]+)*$/, Fn = (t, e, n, r = "") => {
7674
+ const Io = /^[a-z0-9]+(-[a-z0-9]+)*$/, Fn = (t, e, n, r = "") => {
7680
7675
  const i = t.split(":");
7681
7676
  if (t.slice(0, 1) === "@") {
7682
7677
  if (i.length < 2 || i.length > 3) return null;
@@ -7711,10 +7706,10 @@ const Do = /^[a-z0-9]+(-[a-z0-9]+)*$/, Fn = (t, e, n, r = "") => {
7711
7706
  return null;
7712
7707
  }, dn = (t, e) => t ? !!((e && t.prefix === "" || t.prefix) && t.name) : !1;
7713
7708
  let Qt = !1;
7714
- function Lo(t) {
7709
+ function Do(t) {
7715
7710
  return typeof t == "boolean" && (Qt = t), Qt;
7716
7711
  }
7717
- function es(t) {
7712
+ function Yi(t) {
7718
7713
  const e = typeof t == "string" ? Fn(t, !0, Qt) : t;
7719
7714
  if (e) {
7720
7715
  const n = Ot(e.provider, e.prefix), r = e.name;
@@ -7731,7 +7726,7 @@ function Qu(t, e) {
7731
7726
  if (typeof t != "object") return !1;
7732
7727
  if (typeof e != "string" && (e = t.provider || ""), Qt && !e && !t.prefix) {
7733
7728
  let i = !1;
7734
- return Oo(t) && (t.prefix = "", Mo(t, (s, o) => {
7729
+ return Mo(t) && (t.prefix = "", To(t, (s, o) => {
7735
7730
  Zu(s, o) && (i = !0);
7736
7731
  })), i;
7737
7732
  }
@@ -7741,16 +7736,16 @@ function Qu(t, e) {
7741
7736
  name: "a"
7742
7737
  })) return !1;
7743
7738
  const r = Ot(e, n);
7744
- return !!Io(r, t);
7739
+ return !!Oo(r, t);
7745
7740
  }
7746
- const Fo = Object.freeze({
7741
+ const Lo = Object.freeze({
7747
7742
  width: null,
7748
7743
  height: null
7749
- }), Ro = Object.freeze({
7750
- ...Fo,
7744
+ }), Fo = Object.freeze({
7745
+ ...Lo,
7751
7746
  ...Sn
7752
7747
  }), Xu = /(-?[0-9.]*[0-9]+[0-9.]*)/g, Yu = /^-?[0-9.]*[0-9]+[0-9.]*$/g;
7753
- function ts(t, e, n) {
7748
+ function es(t, e, n) {
7754
7749
  if (e === 1) return t;
7755
7750
  if (n = n || 100, typeof t == "number") return Math.ceil(t * e * n) / n;
7756
7751
  if (typeof t != "string") return t;
@@ -7795,7 +7790,7 @@ function id(t, e) {
7795
7790
  ...Wr,
7796
7791
  ...t
7797
7792
  }, r = {
7798
- ...Ro,
7793
+ ...Fo,
7799
7794
  ...e
7800
7795
  }, i = {
7801
7796
  left: n.left,
@@ -7824,7 +7819,7 @@ function id(t, e) {
7824
7819
  });
7825
7820
  const o = r.width, l = r.height, a = i.width, c = i.height;
7826
7821
  let u, d;
7827
- o === null ? (d = l === null ? "1em" : l === "auto" ? c : l, u = ts(d, a / c)) : (u = o === "auto" ? a : o, d = l === null ? ts(u, c / a) : l === "auto" ? c : l);
7822
+ o === null ? (d = l === null ? "1em" : l === "auto" ? c : l, u = es(d, a / c)) : (u = o === "auto" ? a : o, d = l === null ? es(u, c / a) : l === "auto" ? c : l);
7828
7823
  const p = {}, m = (y, k) => {
7829
7824
  rd(k) || (p[y] = k.toString());
7830
7825
  };
@@ -7893,7 +7888,7 @@ const dd = () => {
7893
7888
  } catch {
7894
7889
  }
7895
7890
  };
7896
- let ns = dd();
7891
+ let ts = dd();
7897
7892
  function fd(t, e) {
7898
7893
  const n = Zr(t);
7899
7894
  if (!n) return 0;
@@ -7937,7 +7932,7 @@ function md(t) {
7937
7932
  return "/";
7938
7933
  }
7939
7934
  const gd = (t, e, n) => {
7940
- if (!ns) {
7935
+ if (!ts) {
7941
7936
  n("abort", 424);
7942
7937
  return;
7943
7938
  }
@@ -7958,7 +7953,7 @@ const gd = (t, e, n) => {
7958
7953
  return;
7959
7954
  }
7960
7955
  let i = 503;
7961
- ns(t + r).then((s) => {
7956
+ ts(t + r).then((s) => {
7962
7957
  const o = s.status;
7963
7958
  if (o !== 200) {
7964
7959
  setTimeout(() => {
@@ -7984,7 +7979,7 @@ const gd = (t, e, n) => {
7984
7979
  prepare: pd,
7985
7980
  send: gd
7986
7981
  };
7987
- function Po(t, e) {
7982
+ function Ro(t, e) {
7988
7983
  t.forEach((n) => {
7989
7984
  const r = n.loaderCallbacks;
7990
7985
  r && (n.loaderCallbacks = r.filter((i) => i.id !== e));
@@ -8015,13 +8010,13 @@ function bd(t) {
8015
8010
  else
8016
8011
  return n = !0, !0;
8017
8012
  return !1;
8018
- }), o.pending.length !== l && (n || Po([t], s.id), s.callback(o.loaded.slice(0), o.missing.slice(0), o.pending.slice(0), s.abort));
8013
+ }), o.pending.length !== l && (n || Ro([t], s.id), s.callback(o.loaded.slice(0), o.missing.slice(0), o.pending.slice(0), s.abort));
8019
8014
  });
8020
8015
  }));
8021
8016
  }
8022
8017
  let xd = 0;
8023
8018
  function kd(t, e, n) {
8024
- const r = xd++, i = Po.bind(null, n, r);
8019
+ const r = xd++, i = Ro.bind(null, n, r);
8025
8020
  if (!e.pending.length) return i;
8026
8021
  const s = {
8027
8022
  id: r,
@@ -8172,7 +8167,7 @@ function wd(t, e, n, r) {
8172
8167
  }
8173
8168
  return setTimeout(M), v;
8174
8169
  }
8175
- function Vo(t) {
8170
+ function Po(t) {
8176
8171
  const e = {
8177
8172
  ...Sd,
8178
8173
  ...t
@@ -8200,14 +8195,14 @@ function Vo(t) {
8200
8195
  cleanup: r
8201
8196
  };
8202
8197
  }
8203
- function rs() {
8198
+ function ns() {
8204
8199
  }
8205
8200
  const rr = /* @__PURE__ */ Object.create(null);
8206
8201
  function Ad(t) {
8207
8202
  if (!rr[t]) {
8208
8203
  const e = Zr(t);
8209
8204
  if (!e) return;
8210
- const n = Vo(e), r = {
8205
+ const n = Po(e), r = {
8211
8206
  config: e,
8212
8207
  redundancy: n
8213
8208
  };
@@ -8220,21 +8215,21 @@ function Nd(t, e, n) {
8220
8215
  if (typeof t == "string") {
8221
8216
  const s = Er(t);
8222
8217
  if (!s)
8223
- return n(void 0, 424), rs;
8218
+ return n(void 0, 424), ns;
8224
8219
  i = s.send;
8225
8220
  const o = Ad(t);
8226
8221
  o && (r = o.redundancy);
8227
8222
  } else {
8228
8223
  const s = jr(t);
8229
8224
  if (s) {
8230
- r = Vo(s);
8225
+ r = Po(s);
8231
8226
  const o = t.resources ? t.resources[0] : "", l = Er(o);
8232
8227
  l && (i = l.send);
8233
8228
  }
8234
8229
  }
8235
- return !r || !i ? (n(void 0, 424), rs) : r.query(e, i, n)().abort;
8230
+ return !r || !i ? (n(void 0, 424), ns) : r.query(e, i, n)().abort;
8236
8231
  }
8237
- function is() {
8232
+ function rs() {
8238
8233
  }
8239
8234
  function Ed(t) {
8240
8235
  t.iconsLoaderFlag || (t.iconsLoaderFlag = !0, setTimeout(() => {
@@ -8244,7 +8239,7 @@ function Ed(t) {
8244
8239
  function Td(t) {
8245
8240
  const e = [], n = [];
8246
8241
  return t.forEach((r) => {
8247
- (r.match(Do) ? e : n).push(r);
8242
+ (r.match(Io) ? e : n).push(r);
8248
8243
  }), {
8249
8244
  valid: e,
8250
8245
  invalid: n
@@ -8258,7 +8253,7 @@ function Ft(t, e, n) {
8258
8253
  });
8259
8254
  }
8260
8255
  if (n && typeof n == "object") try {
8261
- if (!Io(t, n).length) {
8256
+ if (!Oo(t, n).length) {
8262
8257
  r();
8263
8258
  return;
8264
8259
  }
@@ -8267,7 +8262,7 @@ function Ft(t, e, n) {
8267
8262
  }
8268
8263
  r(), Ed(t);
8269
8264
  }
8270
- function ss(t, e) {
8265
+ function is(t, e) {
8271
8266
  t instanceof Promise ? t.then((n) => {
8272
8267
  e(n);
8273
8268
  }).catch(() => {
@@ -8281,7 +8276,7 @@ function Md(t, e) {
8281
8276
  if (delete t.iconsToLoad, !i || !i.length) return;
8282
8277
  const s = t.loadIcon;
8283
8278
  if (t.loadIcons && (i.length > 1 || !s)) {
8284
- ss(t.loadIcons(i, r, n), (u) => {
8279
+ is(t.loadIcons(i, r, n), (u) => {
8285
8280
  Ft(t, i, u);
8286
8281
  });
8287
8282
  return;
@@ -8289,7 +8284,7 @@ function Md(t, e) {
8289
8284
  if (s) {
8290
8285
  i.forEach((u) => {
8291
8286
  const d = s(u, r, n);
8292
- ss(d, (p) => {
8287
+ is(d, (p) => {
8293
8288
  const m = p ? {
8294
8289
  prefix: r,
8295
8290
  icons: { [u]: p }
@@ -8301,7 +8296,7 @@ function Md(t, e) {
8301
8296
  }
8302
8297
  const { valid: o, invalid: l } = Td(i);
8303
8298
  if (l.length && Ft(t, l, null), !o.length) return;
8304
- const a = r.match(Do) ? Er(n) : null;
8299
+ const a = r.match(Io) ? Er(n) : null;
8305
8300
  if (!a) {
8306
8301
  Ft(t, o, null);
8307
8302
  return;
@@ -8314,11 +8309,11 @@ function Md(t, e) {
8314
8309
  }));
8315
8310
  }
8316
8311
  const Od = (t, e) => {
8317
- const n = Cd(t, !0, Lo()), r = vd(n);
8312
+ const n = Cd(t, !0, Do()), r = vd(n);
8318
8313
  if (!r.pending.length) {
8319
8314
  let a = !0;
8320
8315
  return e && setTimeout(() => {
8321
- a && e(r.loaded, r.missing, r.pending, is);
8316
+ a && e(r.loaded, r.missing, r.pending, rs);
8322
8317
  }), () => {
8323
8318
  a = !1;
8324
8319
  };
@@ -8337,13 +8332,13 @@ const Od = (t, e) => {
8337
8332
  }), s.forEach((a) => {
8338
8333
  const c = i[a.provider][a.prefix];
8339
8334
  c.length && Md(a, c);
8340
- }), e ? kd(e, r, s) : is;
8335
+ }), e ? kd(e, r, s) : rs;
8341
8336
  };
8342
8337
  function Id(t, e) {
8343
8338
  const n = { ...t };
8344
8339
  for (const r in e) {
8345
8340
  const i = e[r], s = typeof i;
8346
- r in Fo ? (i === null || i && (s === "string" || s === "number")) && (n[r] = i) : s === typeof n[r] && (n[r] = r === "rotate" ? i % 4 : i);
8341
+ r in Lo ? (i === null || i && (s === "string" || s === "number")) && (n[r] = i) : s === typeof n[r] && (n[r] = r === "rotate" ? i % 4 : i);
8347
8342
  }
8348
8343
  return n;
8349
8344
  }
@@ -8410,8 +8405,8 @@ function _d() {
8410
8405
  function Bd(t) {
8411
8406
  return Bt === void 0 && _d(), Bt ? Bt.createHTML(t) : t;
8412
8407
  }
8413
- const $o = {
8414
- ...Ro,
8408
+ const Vo = {
8409
+ ...Fo,
8415
8410
  inline: !1
8416
8411
  }, zd = {
8417
8412
  xmlns: "http://www.w3.org/2000/svg",
@@ -8422,31 +8417,31 @@ const $o = {
8422
8417
  display: "inline-block"
8423
8418
  }, Tr = {
8424
8419
  backgroundColor: "currentColor"
8425
- }, _o = {
8420
+ }, $o = {
8426
8421
  backgroundColor: "transparent"
8427
- }, os = {
8422
+ }, ss = {
8428
8423
  Image: "var(--svg)",
8429
8424
  Repeat: "no-repeat",
8430
8425
  Size: "100% 100%"
8431
- }, ls = {
8426
+ }, os = {
8432
8427
  WebkitMask: Tr,
8433
8428
  mask: Tr,
8434
- background: _o
8429
+ background: $o
8435
8430
  };
8436
- for (const t in ls) {
8437
- const e = ls[t];
8438
- for (const n in os)
8439
- e[t + n] = os[n];
8431
+ for (const t in os) {
8432
+ const e = os[t];
8433
+ for (const n in ss)
8434
+ e[t + n] = ss[n];
8440
8435
  }
8441
8436
  const Ud = {
8442
- ...$o,
8437
+ ...Vo,
8443
8438
  inline: !0
8444
8439
  };
8445
- function as(t) {
8440
+ function ls(t) {
8446
8441
  return t + (t.match(/^[-0-9.]+$/) ? "px" : "");
8447
8442
  }
8448
8443
  const qd = (t, e, n) => {
8449
- const r = e.inline ? Ud : $o, i = Id(r, e), s = e.mode || "svg", o = {}, l = e.style || {}, a = {
8444
+ const r = e.inline ? Ud : Vo, i = Id(r, e), s = e.mode || "svg", o = {}, l = e.style || {}, a = {
8450
8445
  ...s === "svg" ? zd : {}
8451
8446
  };
8452
8447
  if (n) {
@@ -8529,14 +8524,14 @@ const qd = (t, e, n) => {
8529
8524
  return a.style = {
8530
8525
  ...o,
8531
8526
  "--svg": $d(y),
8532
- width: as(u.width),
8533
- height: as(u.height),
8527
+ width: ls(u.width),
8528
+ height: ls(u.height),
8534
8529
  ...Hd,
8535
- ...x ? Tr : _o,
8530
+ ...x ? Tr : $o,
8536
8531
  ...l
8537
8532
  }, ar("span", a);
8538
8533
  };
8539
- Lo(!0);
8534
+ Do(!0);
8540
8535
  cd("", yd);
8541
8536
  if (typeof document < "u" && typeof window < "u") {
8542
8537
  const t = window;
@@ -8569,7 +8564,7 @@ if (typeof document < "u" && typeof window < "u") {
8569
8564
  }
8570
8565
  }
8571
8566
  }
8572
- function Bo(t) {
8567
+ function _o(t) {
8573
8568
  const [e, n] = he(!!t.ssr), [r, i] = he({});
8574
8569
  function s(m) {
8575
8570
  if (m) {
@@ -8579,7 +8574,7 @@ function Bo(t) {
8579
8574
  name: "",
8580
8575
  data: x
8581
8576
  };
8582
- const y = es(x);
8577
+ const y = Yi(x);
8583
8578
  if (y)
8584
8579
  return {
8585
8580
  name: x,
@@ -8609,7 +8604,7 @@ function Bo(t) {
8609
8604
  });
8610
8605
  return;
8611
8606
  }
8612
- const y = es(x);
8607
+ const y = Yi(x);
8613
8608
  if (c({
8614
8609
  name: x,
8615
8610
  data: y
@@ -8630,11 +8625,11 @@ function Bo(t) {
8630
8625
  ...p
8631
8626
  }, t, d) : t.children ? t.children : t.fallback ? t.fallback : ar("span", {});
8632
8627
  }
8633
- const Ie = Tn((t, e) => Bo({
8628
+ const Ie = Tn((t, e) => _o({
8634
8629
  ...t,
8635
8630
  _ref: e
8636
8631
  }));
8637
- Tn((t, e) => Bo({
8632
+ Tn((t, e) => _o({
8638
8633
  inline: !0,
8639
8634
  ...t,
8640
8635
  _ref: e
@@ -8668,14 +8663,14 @@ const ir = ({
8668
8663
  };
8669
8664
  return y(), window.addEventListener("resize", y), () => window.removeEventListener("resize", y);
8670
8665
  }, [o]), /* @__PURE__ */ T(Re, { className: L("border-0 shadow-none", t), "data-testid": "event-details-root", children: [
8671
- /* @__PURE__ */ T(Ns, { className: "pt-2 pb-0 flex-col items-start space-y-2", "data-testid": "event-details-header", children: [
8666
+ /* @__PURE__ */ T(As, { className: "pt-2 pb-0 flex-col items-start space-y-2", "data-testid": "event-details-header", children: [
8672
8667
  l && n && /* @__PURE__ */ f(
8673
8668
  "div",
8674
8669
  {
8675
8670
  className: "w-full aspect-[3/1] overflow-hidden rounded-xl",
8676
8671
  "data-testid": "event-details-image-wrapper",
8677
8672
  children: /* @__PURE__ */ f(
8678
- ml,
8673
+ pl,
8679
8674
  {
8680
8675
  alt: `Event image for ${e}`,
8681
8676
  className: "w-full h-full object-cover",
@@ -8753,7 +8748,7 @@ const Jd = {
8753
8748
  tickets: "Tickets:",
8754
8749
  soldOut: "Sold Out",
8755
8750
  maxReached: "Maximum number of tickets allowed reached"
8756
- }, ln = (t) => typeof t == "number" && !isNaN(t), zo = ({
8751
+ }, ln = (t) => typeof t == "number" && !isNaN(t), Bo = ({
8757
8752
  offer: t,
8758
8753
  quantity: e,
8759
8754
  defaultQuantity: n = 0,
@@ -8907,13 +8902,13 @@ const Jd = {
8907
8902
  );
8908
8903
  return d ? /* @__PURE__ */ T(Re, { className: L("w-full", y.base), "data-testid": k || `offer-card-${t.id}`, children: [
8909
8904
  /* @__PURE__ */ f(Pe, { className: L("pt-1 pb-0", y.body), children: K }),
8910
- /* @__PURE__ */ f(dr, { children: Ce && /* @__PURE__ */ f(gl, { className: L("w-full mt-0 pt-0", y.footer), children: Ce }) })
8905
+ /* @__PURE__ */ f(dr, { children: Ce && /* @__PURE__ */ f(ml, { className: L("w-full mt-0 pt-0", y.footer), children: Ce }) })
8911
8906
  ] }) : /* @__PURE__ */ T("div", { className: L("w-full", y.base), "data-testid": k || `offer-card-${t.id}`, children: [
8912
8907
  /* @__PURE__ */ f("div", { className: L("pt-1 pb-0", y.body), children: K }),
8913
8908
  /* @__PURE__ */ f(dr, { children: Ce && /* @__PURE__ */ f("div", { className: L("w-full mt-0 pt-0", y.footer), children: Ce }) })
8914
8909
  ] });
8915
8910
  };
8916
- zo.displayName = "OfferCard";
8911
+ Bo.displayName = "OfferCard";
8917
8912
  const Wd = ({
8918
8913
  message: t = "No offers available.",
8919
8914
  icon: e = "solar:ticket-sale-outline",
@@ -8990,7 +8985,7 @@ const Zd = {
8990
8985
  className: L("w-full", n.card),
8991
8986
  children: [
8992
8987
  /* @__PURE__ */ f(
8993
- Ns,
8988
+ As,
8994
8989
  {
8995
8990
  "data-testid": `offer-card-skeleton-header-${s}`,
8996
8991
  className: "flex justify-between items-start pb-0",
@@ -9134,7 +9129,7 @@ const Xd = {
9134
9129
  },
9135
9130
  [S, e, r, i]
9136
9131
  ), A = [...t].sort((V, $) => (V.position ?? 0) - ($.position ?? 0)), M = ef[x], D = L("grid mx-auto pt-2", M, y.base), O = (V) => /* @__PURE__ */ f(
9137
- zo,
9132
+ Bo,
9138
9133
  {
9139
9134
  offer: V,
9140
9135
  quantity: S[V.id] || 0,
@@ -9176,8 +9171,8 @@ const Xd = {
9176
9171
  };
9177
9172
  tf.displayName = "OfferCardList";
9178
9173
  var tn = (t) => t.type === "checkbox", ht = (t) => t instanceof Date, Se = (t) => t == null;
9179
- const Ho = (t) => typeof t == "object";
9180
- var se = (t) => !Se(t) && !Array.isArray(t) && Ho(t) && !ht(t), Uo = (t) => se(t) && t.target ? tn(t.target) ? t.target.checked : t.target.value : t, nf = (t) => t.substring(0, t.search(/\.\d+(\.|$)/)) || t, qo = (t, e) => t.has(nf(e)), rf = (t) => {
9174
+ const zo = (t) => typeof t == "object";
9175
+ var se = (t) => !Se(t) && !Array.isArray(t) && zo(t) && !ht(t), Ho = (t) => se(t) && t.target ? tn(t.target) ? t.target.checked : t.target.value : t, nf = (t) => t.substring(0, t.search(/\.\d+(\.|$)/)) || t, Uo = (t, e) => t.has(nf(e)), rf = (t) => {
9181
9176
  const e = t.constructor && t.constructor.prototype;
9182
9177
  return se(e) && e.hasOwnProperty("isPrototypeOf");
9183
9178
  }, Qr = typeof window < "u" && typeof window.HTMLElement < "u" && typeof document < "u";
@@ -9233,10 +9228,10 @@ const wn = {
9233
9228
  pattern: "pattern",
9234
9229
  required: "required",
9235
9230
  validate: "validate"
9236
- }, Ko = R.createContext(null);
9237
- Ko.displayName = "HookFormControlContext";
9238
- const ei = () => R.useContext(Ko);
9239
- var Jo = (t, e, n, r = !0) => {
9231
+ }, qo = R.createContext(null);
9232
+ qo.displayName = "HookFormControlContext";
9233
+ const ei = () => R.useContext(qo);
9234
+ var Ko = (t, e, n, r = !0) => {
9240
9235
  const i = {
9241
9236
  defaultValues: e._defaultValues
9242
9237
  };
@@ -9273,9 +9268,9 @@ function sf(t) {
9273
9268
  }
9274
9269
  }), [i, r, s]), R.useEffect(() => {
9275
9270
  a.current.isValid && n._setValid(!0);
9276
- }, [n]), R.useMemo(() => Jo(o, n, a.current, !1), [o, n]);
9271
+ }, [n]), R.useMemo(() => Ko(o, n, a.current, !1), [o, n]);
9277
9272
  }
9278
- var Ne = (t) => typeof t == "string", Mr = (t, e, n, r, i) => Ne(t) ? (r && e.watch.add(t), N(n, t, i)) : Array.isArray(t) ? t.map((s) => (r && e.watch.add(s), N(n, s))) : (r && (e.watchAll = !0), n), Or = (t) => Se(t) || !Ho(t);
9273
+ var Ne = (t) => typeof t == "string", Mr = (t, e, n, r, i) => Ne(t) ? (r && e.watch.add(t), N(n, t, i)) : Array.isArray(t) ? t.map((s) => (r && e.watch.add(s), N(n, s))) : (r && (e.watchAll = !0), n), Or = (t) => Se(t) || !zo(t);
9279
9274
  function Fe(t, e, n = /* @__PURE__ */ new WeakSet()) {
9280
9275
  if (Or(t) || Or(e))
9281
9276
  return Object.is(t, e);
@@ -9337,7 +9332,7 @@ function of(t) {
9337
9332
  return I !== null ? I : m;
9338
9333
  }
9339
9334
  function lf(t) {
9340
- const e = ei(), { name: n, disabled: r, control: i = e, shouldUnregister: s, defaultValue: o, exact: l = !0 } = t, a = qo(i._names.array, n), c = R.useMemo(() => N(i._formValues, n, N(i._defaultValues, n, o)), [i, n, o]), u = of({
9335
+ const e = ei(), { name: n, disabled: r, control: i = e, shouldUnregister: s, defaultValue: o, exact: l = !0 } = t, a = Uo(i._names.array, n), c = R.useMemo(() => N(i._formValues, n, N(i._defaultValues, n, o)), [i, n, o]), u = of({
9341
9336
  control: i,
9342
9337
  name: n,
9343
9338
  defaultValue: c,
@@ -9375,7 +9370,7 @@ function lf(t) {
9375
9370
  }
9376
9371
  }), [d, n]), k = R.useCallback((A) => x.current.onChange({
9377
9372
  target: {
9378
- value: Uo(A),
9373
+ value: Ho(A),
9379
9374
  name: n
9380
9375
  },
9381
9376
  type: wn.CHANGE
@@ -9437,7 +9432,7 @@ var cf = (t, e, n, r, i) => e ? {
9437
9432
  ...n[t] && n[t].types ? n[t].types : {},
9438
9433
  [r]: i || !0
9439
9434
  }
9440
- } : {}, zt = (t) => Array.isArray(t) ? t : [t], cs = () => {
9435
+ } : {}, zt = (t) => Array.isArray(t) ? t : [t], as = () => {
9441
9436
  let t = [];
9442
9437
  return {
9443
9438
  get observers() {
@@ -9457,13 +9452,13 @@ var cf = (t, e, n, r, i) => e ? {
9457
9452
  }
9458
9453
  };
9459
9454
  };
9460
- function Wo(t, e) {
9455
+ function Jo(t, e) {
9461
9456
  const n = {};
9462
9457
  for (const r in t)
9463
9458
  if (t.hasOwnProperty(r)) {
9464
9459
  const i = t[r], s = e[r];
9465
9460
  if (i && se(i) && s) {
9466
- const o = Wo(i, s);
9461
+ const o = Jo(i, s);
9467
9462
  se(o) && (n[r] = o);
9468
9463
  } else t[r] && (n[r] = s);
9469
9464
  }
@@ -9474,7 +9469,7 @@ var ye = (t) => se(t) && !Object.keys(t).length, ni = (t) => t.type === "file",
9474
9469
  return !1;
9475
9470
  const e = t ? t.ownerDocument : 0;
9476
9471
  return t instanceof (e && e.defaultView ? e.defaultView.HTMLElement : HTMLElement);
9477
- }, jo = (t) => t.type === "select-multiple", ri = (t) => t.type === "radio", uf = (t) => ri(t) || tn(t), sr = (t) => An(t) && t.isConnected;
9472
+ }, Wo = (t) => t.type === "select-multiple", ri = (t) => t.type === "radio", uf = (t) => ri(t) || tn(t), sr = (t) => An(t) && t.isConnected;
9478
9473
  function df(t, e) {
9479
9474
  const n = e.slice(0, -1).length;
9480
9475
  let r = 0;
@@ -9498,13 +9493,13 @@ var hf = (t) => {
9498
9493
  return !0;
9499
9494
  return !1;
9500
9495
  };
9501
- function Go(t) {
9496
+ function jo(t) {
9502
9497
  return Array.isArray(t) || se(t) && !hf(t);
9503
9498
  }
9504
9499
  function Ir(t, e = {}) {
9505
9500
  for (const n in t) {
9506
9501
  const r = t[n];
9507
- Go(r) ? (e[n] = Array.isArray(r) ? [] : {}, Ir(r, e[n])) : Y(r) || (e[n] = !0);
9502
+ jo(r) ? (e[n] = Array.isArray(r) ? [] : {}, Ir(r, e[n])) : Y(r) || (e[n] = !0);
9508
9503
  }
9509
9504
  return e;
9510
9505
  }
@@ -9512,7 +9507,7 @@ function wt(t, e, n) {
9512
9507
  n || (n = Ir(e));
9513
9508
  for (const r in t) {
9514
9509
  const i = t[r];
9515
- if (Go(i))
9510
+ if (jo(i))
9516
9511
  Y(e) || Or(n[r]) ? n[r] = Ir(i, Array.isArray(i) ? [] : {}) : wt(i, Se(e) ? {} : e[r], n[r]);
9517
9512
  else {
9518
9513
  const s = e[r];
@@ -9521,11 +9516,11 @@ function wt(t, e, n) {
9521
9516
  }
9522
9517
  return n;
9523
9518
  }
9524
- const us = {
9519
+ const cs = {
9525
9520
  value: !1,
9526
9521
  isValid: !1
9527
- }, ds = { value: !0, isValid: !0 };
9528
- var Zo = (t) => {
9522
+ }, us = { value: !0, isValid: !0 };
9523
+ var Go = (t) => {
9529
9524
  if (Array.isArray(t)) {
9530
9525
  if (t.length > 1) {
9531
9526
  const e = t.filter((n) => n && n.checked && !n.disabled).map((n) => n.value);
@@ -9533,22 +9528,22 @@ var Zo = (t) => {
9533
9528
  }
9534
9529
  return t[0].checked && !t[0].disabled ? (
9535
9530
  // @ts-expect-error expected to work in the browser
9536
- t[0].attributes && !Y(t[0].attributes.value) ? Y(t[0].value) || t[0].value === "" ? ds : { value: t[0].value, isValid: !0 } : ds
9537
- ) : us;
9531
+ t[0].attributes && !Y(t[0].attributes.value) ? Y(t[0].value) || t[0].value === "" ? us : { value: t[0].value, isValid: !0 } : us
9532
+ ) : cs;
9538
9533
  }
9539
- return us;
9540
- }, Qo = (t, { valueAsNumber: e, valueAsDate: n, setValueAs: r }) => Y(t) ? t : e ? t === "" ? NaN : t && +t : n && Ne(t) ? new Date(t) : r ? r(t) : t;
9541
- const fs = {
9534
+ return cs;
9535
+ }, Zo = (t, { valueAsNumber: e, valueAsDate: n, setValueAs: r }) => Y(t) ? t : e ? t === "" ? NaN : t && +t : n && Ne(t) ? new Date(t) : r ? r(t) : t;
9536
+ const ds = {
9542
9537
  isValid: !1,
9543
9538
  value: null
9544
9539
  };
9545
- var Xo = (t) => Array.isArray(t) ? t.reduce((e, n) => n && n.checked && !n.disabled ? {
9540
+ var Qo = (t) => Array.isArray(t) ? t.reduce((e, n) => n && n.checked && !n.disabled ? {
9546
9541
  isValid: !0,
9547
9542
  value: n.value
9548
- } : e, fs) : fs;
9549
- function hs(t) {
9543
+ } : e, ds) : ds;
9544
+ function fs(t) {
9550
9545
  const e = t.ref;
9551
- return ni(e) ? e.files : ri(e) ? Xo(t.refs).value : jo(e) ? [...e.selectedOptions].map(({ value: n }) => n) : tn(e) ? Zo(t.refs).value : Qo(Y(e.value) ? t.ref.value : e.value, t);
9546
+ return ni(e) ? e.files : ri(e) ? Qo(t.refs).value : Wo(e) ? [...e.selectedOptions].map(({ value: n }) => n) : tn(e) ? Go(t.refs).value : Zo(Y(e.value) ? t.ref.value : e.value, t);
9552
9547
  }
9553
9548
  var pf = (t, e, n, r) => {
9554
9549
  const i = {};
@@ -9562,15 +9557,15 @@ var pf = (t, e, n, r) => {
9562
9557
  fields: i,
9563
9558
  shouldUseNativeValidation: r
9564
9559
  };
9565
- }, Nn = (t) => t instanceof RegExp, Rt = (t) => Y(t) ? t : Nn(t) ? t.source : se(t) ? Nn(t.value) ? t.value.source : t.value : t, ps = (t) => ({
9560
+ }, Nn = (t) => t instanceof RegExp, Rt = (t) => Y(t) ? t : Nn(t) ? t.source : se(t) ? Nn(t.value) ? t.value.source : t.value : t, hs = (t) => ({
9566
9561
  isOnSubmit: !t || t === Le.onSubmit,
9567
9562
  isOnBlur: t === Le.onBlur,
9568
9563
  isOnChange: t === Le.onChange,
9569
9564
  isOnAll: t === Le.all,
9570
9565
  isOnTouch: t === Le.onTouched
9571
9566
  });
9572
- const ms = "AsyncFunction";
9573
- var mf = (t) => !!t && !!t.validate && !!(xe(t.validate) && t.validate.constructor.name === ms || se(t.validate) && Object.values(t.validate).find((e) => e.constructor.name === ms)), gf = (t) => t.mount && (t.required || t.min || t.max || t.maxLength || t.minLength || t.pattern || t.validate), gs = (t, e, n) => !n && (e.watchAll || e.watch.has(t) || [...e.watch].some((r) => t.startsWith(r) && /^\.\w+/.test(t.slice(r.length))));
9567
+ const ps = "AsyncFunction";
9568
+ var mf = (t) => !!t && !!t.validate && !!(xe(t.validate) && t.validate.constructor.name === ps || se(t.validate) && Object.values(t.validate).find((e) => e.constructor.name === ps)), gf = (t) => t.mount && (t.required || t.min || t.max || t.maxLength || t.minLength || t.pattern || t.validate), ms = (t, e, n) => !n && (e.watchAll || e.watch.has(t) || [...e.watch].some((r) => t.startsWith(r) && /^\.\w+/.test(t.slice(r.length))));
9574
9569
  const Ht = (t, e, n, r) => {
9575
9570
  for (const i of n || Object.keys(t)) {
9576
9571
  const s = N(t, i);
@@ -9588,7 +9583,7 @@ const Ht = (t, e, n, r) => {
9588
9583
  }
9589
9584
  }
9590
9585
  };
9591
- function ys(t, e, n) {
9586
+ function gs(t, e, n) {
9592
9587
  const r = N(t, n);
9593
9588
  if (r || Rn(n))
9594
9589
  return {
@@ -9624,7 +9619,7 @@ var yf = (t, e, n, r) => {
9624
9619
  const r = zt(N(t, n));
9625
9620
  return X(r, "root", e[n]), X(t, n, r), t;
9626
9621
  };
9627
- function bs(t, e, n = "validate") {
9622
+ function ys(t, e, n = "validate") {
9628
9623
  if (Ne(t) || Array.isArray(t) && t.every(Ne) || we(t) && !t)
9629
9624
  return {
9630
9625
  type: n,
@@ -9635,7 +9630,7 @@ function bs(t, e, n = "validate") {
9635
9630
  var vt = (t) => se(t) && !Nn(t) ? t : {
9636
9631
  value: t,
9637
9632
  message: ""
9638
- }, xs = async (t, e, n, r, i, s) => {
9633
+ }, bs = async (t, e, n, r, i, s) => {
9639
9634
  const { ref: o, refs: l, required: a, maxLength: c, minLength: u, min: d, max: p, pattern: m, validate: x, name: y, valueAsNumber: k, mount: v } = t._f, S = N(n, y);
9640
9635
  if (!v || e.has(y))
9641
9636
  return {};
@@ -9650,7 +9645,7 @@ var vt = (t) => se(t) && !Nn(t) ? t : {
9650
9645
  ...q(P ? B : Q, K)
9651
9646
  };
9652
9647
  };
9653
- if (s ? !Array.isArray(S) || !S.length : a && (!V && ($ || Se(S)) || we(S) && !S || O && !Zo(l).isValid || D && !Xo(l).isValid)) {
9648
+ if (s ? !Array.isArray(S) || !S.length : a && (!V && ($ || Se(S)) || we(S) && !S || O && !Go(l).isValid || D && !Qo(l).isValid)) {
9654
9649
  const { value: P, message: _ } = Ne(a) ? { value: !!a, message: a } : vt(a);
9655
9650
  if (P && (M[y] = {
9656
9651
  type: qe.required,
@@ -9690,7 +9685,7 @@ var vt = (t) => se(t) && !Nn(t) ? t : {
9690
9685
  }
9691
9686
  if (x) {
9692
9687
  if (xe(x)) {
9693
- const P = await x(S, n), _ = bs(P, I);
9688
+ const P = await x(S, n), _ = ys(P, I);
9694
9689
  if (_ && (M[y] = {
9695
9690
  ..._,
9696
9691
  ...q(qe.validate, _.message)
@@ -9701,7 +9696,7 @@ var vt = (t) => se(t) && !Nn(t) ? t : {
9701
9696
  for (const _ in x) {
9702
9697
  if (!ye(P) && !r)
9703
9698
  break;
9704
- const J = bs(await x[_](S, n), I, _);
9699
+ const J = ys(await x[_](S, n), I, _);
9705
9700
  J && (P = {
9706
9701
  ...J,
9707
9702
  ...q(_, J.message)
@@ -9767,8 +9762,8 @@ function Sf(t = {}) {
9767
9762
  ...d
9768
9763
  };
9769
9764
  const m = {
9770
- array: cs(),
9771
- state: cs()
9765
+ array: as(),
9766
+ state: as()
9772
9767
  }, x = e.criteriaMode === Le.all, y = (h) => (g) => {
9773
9768
  clearTimeout(c), c = setTimeout(h, g);
9774
9769
  }, k = async (h) => {
@@ -9821,7 +9816,7 @@ function Sf(t = {}) {
9821
9816
  const w = N(r, h);
9822
9817
  if (w) {
9823
9818
  const C = N(s, h, Y(b) ? N(i, h) : b);
9824
- Y(C) || E && E.defaultChecked || g ? X(s, h, g ? C : hs(w._f)) : B(h, C), o.mount && !o.action && k();
9819
+ Y(C) || E && E.defaultChecked || g ? X(s, h, g ? C : fs(w._f)) : B(h, C), o.mount && !o.action && k();
9825
9820
  }
9826
9821
  }, D = (h, g, b, E, w) => {
9827
9822
  let C = !1, F = !1;
@@ -9875,7 +9870,7 @@ function Sf(t = {}) {
9875
9870
  if (C) {
9876
9871
  const W = l.array.has(C.name), j = w._f && mf(w._f);
9877
9872
  j && d.validatingFields && v([C.name], !0);
9878
- const ge = await xs(w, l.disabled, s, x, e.shouldUseNativeValidation && !g, W);
9873
+ const ge = await bs(w, l.disabled, s, x, e.shouldUseNativeValidation && !g, W);
9879
9874
  if (j && d.validatingFields && v([C.name]), ge[C.name] && (b.valid = !1, g || t.shouldUseNativeValidation))
9880
9875
  break;
9881
9876
  !g && (N(ge, C.name) ? W ? vf(n.errors, ge, C.name) : X(n.errors, C.name, ge[C.name]) : re(n.errors, C.name));
@@ -9897,7 +9892,7 @@ function Sf(t = {}) {
9897
9892
  let w = g;
9898
9893
  if (E) {
9899
9894
  const C = E._f;
9900
- C && (!C.disabled && X(s, h, Qo(g, C)), w = An(C.ref) && Se(g) ? "" : g, jo(C.ref) ? [...C.ref.options].forEach((F) => F.selected = w.includes(F.value)) : C.refs ? tn(C.ref) ? C.refs.forEach((F) => {
9895
+ C && (!C.disabled && X(s, h, Zo(g, C)), w = An(C.ref) && Se(g) ? "" : g, Wo(C.ref) ? [...C.ref.options].forEach((F) => F.selected = w.includes(F.value)) : C.refs ? tn(C.ref) ? C.refs.forEach((F) => {
9901
9896
  (!F.defaultChecked || !F.disabled) && (Array.isArray(w) ? F.checked = !!w.find((W) => W === F.value) : F.checked = w === F.value || !!w);
9902
9897
  }) : C.refs.forEach((F) => F.checked = F.value === w) : ni(C.ref) ? C.ref.value = "" : (C.ref.value = w, C.ref.type || m.state.next({
9903
9898
  name: h,
@@ -9921,7 +9916,7 @@ function Sf(t = {}) {
9921
9916
  name: h,
9922
9917
  dirtyFields: wt(i, s),
9923
9918
  isDirty: P(h, C)
9924
- })) : E && !E._f && !Se(C) ? Q(h, C, b) : B(h, C, b), gs(h, l) ? m.state.next({
9919
+ })) : E && !E._f && !Se(C) ? Q(h, C, b) : B(h, C, b), ms(h, l) ? m.state.next({
9925
9920
  ...n,
9926
9921
  name: h,
9927
9922
  values: ne(s)
@@ -9935,26 +9930,26 @@ function Sf(t = {}) {
9935
9930
  let b = g.name, E = !0;
9936
9931
  const w = N(r, b), C = (j) => {
9937
9932
  E = Number.isNaN(j) || ht(j) && isNaN(j.getTime()) || Fe(j, N(s, b, j));
9938
- }, F = ps(e.mode), W = ps(e.reValidateMode);
9933
+ }, F = hs(e.mode), W = hs(e.reValidateMode);
9939
9934
  if (w) {
9940
9935
  let j, ge;
9941
- const ot = g.type ? hs(w._f) : Uo(h), Ge = h.type === wn.BLUR || h.type === wn.FOCUS_OUT, il = !gf(w._f) && !e.resolver && !N(n.errors, b) && !w._f.deps || xf(Ge, N(n.touchedFields, b), n.isSubmitted, W, F), Bn = gs(b, l, Ge);
9936
+ const ot = g.type ? fs(w._f) : Ho(h), Ge = h.type === wn.BLUR || h.type === wn.FOCUS_OUT, rl = !gf(w._f) && !e.resolver && !N(n.errors, b) && !w._f.deps || xf(Ge, N(n.touchedFields, b), n.isSubmitted, W, F), Bn = ms(b, l, Ge);
9942
9937
  X(s, b, ot), Ge ? (!g || !g.readOnly) && (w._f.onBlur && w._f.onBlur(h), a && a(0)) : w._f.onChange && w._f.onChange(h);
9943
- const zn = D(b, ot, Ge), sl = !ye(zn) || Bn;
9938
+ const zn = D(b, ot, Ge), il = !ye(zn) || Bn;
9944
9939
  if (!Ge && m.state.next({
9945
9940
  name: b,
9946
9941
  type: h.type,
9947
9942
  values: ne(s)
9948
- }), il)
9949
- return (d.isValid || p.isValid) && (e.mode === "onBlur" ? Ge && k() : Ge || k()), sl && m.state.next({ name: b, ...Bn ? {} : zn });
9943
+ }), rl)
9944
+ return (d.isValid || p.isValid) && (e.mode === "onBlur" ? Ge && k() : Ge || k()), il && m.state.next({ name: b, ...Bn ? {} : zn });
9950
9945
  if (!Ge && Bn && m.state.next({ ...n }), e.resolver) {
9951
9946
  const { errors: ci } = await V([b]);
9952
9947
  if (v([b]), C(ot), E) {
9953
- const ol = ys(n.errors, r, b), ui = ys(ci, r, ol.name || b);
9948
+ const sl = gs(n.errors, r, b), ui = gs(ci, r, sl.name || b);
9954
9949
  j = ui.error, b = ui.name, ge = ye(ci);
9955
9950
  }
9956
9951
  } else
9957
- v([b], !0), j = (await xs(w, l.disabled, s, x, e.shouldUseNativeValidation))[b], v([b]), C(ot), E && (j ? ge = !1 : (d.isValid || p.isValid) && (ge = await q(r, !0)));
9952
+ v([b], !0), j = (await bs(w, l.disabled, s, x, e.shouldUseNativeValidation))[b], v([b]), C(ot), E && (j ? ge = !1 : (d.isValid || p.isValid) && (ge = await q(r, !0)));
9958
9953
  E && (w._f.deps && (!Array.isArray(w._f.deps) || w._f.deps.length > 0) && me(w._f.deps), O(b, ge, j, zn));
9959
9954
  }
9960
9955
  }, oe = (h, g) => {
@@ -9979,7 +9974,7 @@ function Sf(t = {}) {
9979
9974
  let b = {
9980
9975
  ...o.mount ? s : i
9981
9976
  };
9982
- return g && (b = Wo(g.dirtyFields ? n.dirtyFields : n.touchedFields, b)), Y(h) ? b : Ne(h) ? N(b, h) : h.map((E) => N(b, E));
9977
+ return g && (b = Jo(g.dirtyFields ? n.dirtyFields : n.touchedFields, b)), Y(h) ? b : Ne(h) ? N(b, h) : h.map((E) => N(b, E));
9983
9978
  }, it = (h, g) => ({
9984
9979
  invalid: !!N((g || n).errors, h),
9985
9980
  isDirty: !!N((g || n).dirtyFields, h),
@@ -10005,7 +10000,7 @@ function Sf(t = {}) {
10005
10000
  next: (b) => "values" in b && h(_(void 0, g), b)
10006
10001
  }) : _(h, g, !0), It = (h) => m.state.subscribe({
10007
10002
  next: (g) => {
10008
- bf(h.name, g.name, h.exact) && yf(g, h.formState || d, rl, h.reRenderRoot) && h.callback({
10003
+ bf(h.name, g.name, h.exact) && yf(g, h.formState || d, nl, h.reRenderRoot) && h.callback({
10009
10004
  values: { ...s },
10010
10005
  ...n,
10011
10006
  ...g,
@@ -10082,10 +10077,10 @@ function Sf(t = {}) {
10082
10077
  }
10083
10078
  }), M(h, !1, void 0, C);
10084
10079
  } else
10085
- b = N(r, h, {}), b._f && (b._f.mount = !1), (e.shouldUnregister || g.shouldUnregister) && !(qo(l.array, h) && o.action) && l.unMount.add(h);
10080
+ b = N(r, h, {}), b._f && (b._f.mount = !1), (e.shouldUnregister || g.shouldUnregister) && !(Uo(l.array, h) && o.action) && l.unMount.add(h);
10086
10081
  }
10087
10082
  };
10088
- }, _n = () => e.shouldFocusError && Ht(r, oe, l.mount), el = (h) => {
10083
+ }, _n = () => e.shouldFocusError && Ht(r, oe, l.mount), Yo = (h) => {
10089
10084
  we(h) && (m.state.next({ disabled: h }), Ht(r, (g, b) => {
10090
10085
  const E = N(r, b);
10091
10086
  E && (g.disabled = E._f.disabled || h, Array.isArray(E._f.refs) && E._f.refs.forEach((w) => {
@@ -10125,7 +10120,7 @@ function Sf(t = {}) {
10125
10120
  errors: n.errors
10126
10121
  }), E)
10127
10122
  throw E;
10128
- }, tl = (h, g = {}) => {
10123
+ }, el = (h, g = {}) => {
10129
10124
  N(r, h) && (Y(g.defaultValue) ? K(h, ne(N(i, h))) : (K(h, g.defaultValue), X(i, h, ne(g.defaultValue))), g.keepTouched || re(n.touchedFields, h), g.keepDirty || (re(n.dirtyFields, h), n.isDirty = g.defaultValue ? P(h, ne(N(i, h))) : P()), g.keepError || (re(n.errors, h), d.isValid && k()), m.state.next({ ...n }));
10130
10125
  }, oi = (h, g = {}) => {
10131
10126
  const b = h ? ne(h) : i, E = ne(b), w = ye(h), C = w ? i : E;
@@ -10185,7 +10180,7 @@ function Sf(t = {}) {
10185
10180
  isSubmitting: !1,
10186
10181
  defaultValues: i
10187
10182
  });
10188
- }, li = (h, g) => oi(xe(h) ? h(s) : h, { ...e.resetOptions, ...g }), nl = (h, g = {}) => {
10183
+ }, li = (h, g) => oi(xe(h) ? h(s) : h, { ...e.resetOptions, ...g }), tl = (h, g = {}) => {
10189
10184
  const b = N(r, h), E = b && b._f;
10190
10185
  if (E) {
10191
10186
  const w = E.refs ? E.refs[0] : E.ref;
@@ -10193,7 +10188,7 @@ function Sf(t = {}) {
10193
10188
  w.focus(), g.shouldSelect && xe(w.select) && w.select();
10194
10189
  });
10195
10190
  }
10196
- }, rl = (h) => {
10191
+ }, nl = (h) => {
10197
10192
  n = {
10198
10193
  ...n,
10199
10194
  ...h
@@ -10223,7 +10218,7 @@ function Sf(t = {}) {
10223
10218
  });
10224
10219
  }),
10225
10220
  _removeUnmounted: Te,
10226
- _disableForm: el,
10221
+ _disableForm: Yo,
10227
10222
  _subjects: m,
10228
10223
  _proxyFormState: d,
10229
10224
  get _fields() {
@@ -10268,11 +10263,11 @@ function Sf(t = {}) {
10268
10263
  setValue: K,
10269
10264
  getValues: xt,
10270
10265
  reset: li,
10271
- resetField: tl,
10266
+ resetField: el,
10272
10267
  clearErrors: st,
10273
10268
  unregister: Vn,
10274
10269
  setError: te,
10275
- setFocus: nl,
10270
+ setFocus: tl,
10276
10271
  getFieldState: it
10277
10272
  };
10278
10273
  return {
@@ -10345,7 +10340,7 @@ function wf(t = {}) {
10345
10340
  }), !((o = s._options.resetOptions) === null || o === void 0) && o.keepIsValid || s._setValid(), n.current = t.values, i((l) => ({ ...l }))) : s._resetDefaultValues();
10346
10341
  }, [s, t.values]), R.useEffect(() => {
10347
10342
  s._state.mount || (s._setValid(), s._state.mount = !0), s._state.watch && (s._state.watch = !1, s._subjects.state.next({ ...s._formState })), s._removeUnmounted();
10348
- }), e.current.formState = R.useMemo(() => Jo(r, s), [s, r]), e.current;
10343
+ }), e.current.formState = R.useMemo(() => Ko(r, s), [s, r]), e.current;
10349
10344
  }
10350
10345
  function Yf(t, e = 3) {
10351
10346
  return t % 1 === 0 ? t.toString() : t.toFixed(e).replace(/\.?0+$/, "");
@@ -10388,10 +10383,10 @@ function rh(t, e, n = 1e-3) {
10388
10383
  isOverAllocated: !i && r < 0
10389
10384
  };
10390
10385
  }
10391
- function Yo() {
10386
+ function Xo() {
10392
10387
  return `dist-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`;
10393
10388
  }
10394
- Yo();
10389
+ Xo();
10395
10390
  const Af = {
10396
10391
  amount: "Amount",
10397
10392
  glAccount: "GL Account",
@@ -10406,7 +10401,7 @@ const Af = {
10406
10401
  deleteButton: "Delete",
10407
10402
  currencySymbol: "$"
10408
10403
  }, or = () => ({
10409
- id: Yo(),
10404
+ id: Xo(),
10410
10405
  amount: 0,
10411
10406
  glAccount: null,
10412
10407
  isTaxDeductible: !1
@@ -10486,7 +10481,7 @@ const Af = {
10486
10481
  className: L(x.base),
10487
10482
  children: /* @__PURE__ */ T(Pe, { className: L("flex flex-row flex-nowrap items-start gap-4", x.body), children: [
10488
10483
  /* @__PURE__ */ f("div", { className: L("shrink-0", x.amountContainer), children: /* @__PURE__ */ f(
10489
- As,
10484
+ ws,
10490
10485
  {
10491
10486
  "data-testid": `${y || "revenue-distribution-card"}-amount-input`,
10492
10487
  label: /* @__PURE__ */ T("span", { className: "flex items-center gap-1", children: [
@@ -10517,7 +10512,7 @@ const Af = {
10517
10512
  }
10518
10513
  ) }),
10519
10514
  /* @__PURE__ */ f("div", { className: L("grow", x.glAccountContainer), children: /* @__PURE__ */ f(
10520
- yl,
10515
+ gl,
10521
10516
  {
10522
10517
  "data-testid": `${y || "revenue-distribution-card"}-gl-account-input`,
10523
10518
  label: /* @__PURE__ */ T("span", { className: "flex items-center gap-1", children: [
@@ -10550,14 +10545,14 @@ const Af = {
10550
10545
  onSelectionChange: me,
10551
10546
  onClear: xt,
10552
10547
  className: x.glAccountInput,
10553
- children: (te) => /* @__PURE__ */ f(bl, { textValue: te.name, children: /* @__PURE__ */ T("div", { className: "flex flex-col", children: [
10548
+ children: (te) => /* @__PURE__ */ f(yl, { textValue: te.name, children: /* @__PURE__ */ T("div", { className: "flex flex-col", children: [
10554
10549
  /* @__PURE__ */ f("span", { children: te.name }),
10555
10550
  te.code && /* @__PURE__ */ f("span", { className: "text-xs text-default-400", children: te.code })
10556
10551
  ] }) }, te.id)
10557
10552
  }
10558
10553
  ) }),
10559
10554
  /* @__PURE__ */ f("div", { className: L("shrink-0 pt-6 flex items-center", x.taxDeductibleContainer), children: /* @__PURE__ */ f(
10560
- xl,
10555
+ bl,
10561
10556
  {
10562
10557
  radius: "full",
10563
10558
  "data-testid": `${y || "revenue-distribution-card"}-tax-deductible`,
@@ -10684,7 +10679,7 @@ export {
10684
10679
  Zf as Footer,
10685
10680
  Jf as HeroUIProvider,
10686
10681
  Wf as Navbar,
10687
- zo as OfferCard,
10682
+ Bo as OfferCard,
10688
10683
  Wd as OfferCardEmpty,
10689
10684
  Gd as OfferCardError,
10690
10685
  tf as OfferCardList,
@@ -10695,12 +10690,12 @@ export {
10695
10690
  Mf as RevenueDistributionError,
10696
10691
  Of as RevenueDistributionSkeleton,
10697
10692
  Pu as RichTextArea,
10698
- aa as Stepper,
10693
+ la as Stepper,
10699
10694
  rh as calculateAllocationDifference,
10700
10695
  Kd as formatOfferCurrency,
10701
10696
  Yf as formatRevenueAmount,
10702
10697
  eh as formatRevenueCurrency,
10703
- Yo as generateDistributionId,
10698
+ Xo as generateDistributionId,
10704
10699
  th as getCurrencySymbol,
10705
10700
  Yd as offerCardVariants,
10706
10701
  Xd as offerListVariants,