@uva-glass/component-library 3.51.0 → 3.52.0

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.
Files changed (60) hide show
  1. package/dist/RteEditor.module-CUi7Vqe8.js +37 -0
  2. package/dist/RteEditor.module-CUi7Vqe8.js.map +1 -0
  3. package/dist/{SelectListbox.module-CgZyIxwT.js → SelectListbox.module-CXqMuXRB.js} +24 -23
  4. package/dist/SelectListbox.module-CXqMuXRB.js.map +1 -0
  5. package/dist/{TablePlugin-CeZO4BR1.js → TablePlugin-BLbsvcuu.js} +2 -2
  6. package/dist/{TablePlugin-CeZO4BR1.js.map → TablePlugin-BLbsvcuu.js.map} +1 -1
  7. package/dist/assets/CheckboxButtonBar.css +1 -1
  8. package/dist/assets/FormInput.css +1 -1
  9. package/dist/assets/InputField.css +1 -1
  10. package/dist/assets/RteEditor.css +1 -1
  11. package/dist/assets/SelectListbox.css +1 -1
  12. package/dist/components/CheckboxButtonBar/CheckboxButtonBar.d.ts +3 -3
  13. package/dist/components/CheckboxButtonBar/CheckboxButtonBar.js +45 -45
  14. package/dist/components/CheckboxButtonBar/CheckboxButtonBar.js.map +1 -1
  15. package/dist/components/CheckboxTree/CheckboxTree.js +1 -1
  16. package/dist/components/FormInput/FormInput.d.ts +3 -1
  17. package/dist/components/FormInput/FormInput.js +35 -31
  18. package/dist/components/FormInput/FormInput.js.map +1 -1
  19. package/dist/components/InputField/InputField.d.ts +2 -0
  20. package/dist/components/InputField/InputField.js +29 -26
  21. package/dist/components/InputField/InputField.js.map +1 -1
  22. package/dist/components/InputField/InputField.stories.js +1 -1
  23. package/dist/components/MultiSelect/MultiSelect.js +1 -1
  24. package/dist/components/MultiSelect/MultiSelect.stories.js +1 -1
  25. package/dist/components/MultiSelect/components/MultiSelectHeader.js +1 -1
  26. package/dist/components/MultiSelect/index.js +1 -1
  27. package/dist/components/PeriodSelector/PeriodSelector.js +13 -13
  28. package/dist/components/PeriodSelector/PeriodSelector.js.map +1 -1
  29. package/dist/components/ProgrammeCard/ProgrammeCard.stories.js +1 -1
  30. package/dist/components/RadioTabSelector/RadioTabSelector.js +1 -1
  31. package/dist/components/RteEditor/EditorHeader/EditorHeader.js +1 -1
  32. package/dist/components/RteEditor/Plugins/BlockFormatPlugin/BlockFormatPlugin.js +1 -1
  33. package/dist/components/RteEditor/Plugins/HistoryPlugin/HistoryPlugin.js +2 -2
  34. package/dist/components/RteEditor/Plugins/LinkPlugin/AddLinkForm/AddLinkFrom.js +1 -1
  35. package/dist/components/RteEditor/Plugins/LinkPlugin/LinkPlugin.js +2 -2
  36. package/dist/components/RteEditor/Plugins/ListPlugin/ListPlugin.js +1 -1
  37. package/dist/components/RteEditor/Plugins/TablePlugin/AddTableFrom.js +1 -1
  38. package/dist/components/RteEditor/Plugins/TablePlugin/TablePlugin.js +2 -2
  39. package/dist/components/RteEditor/Plugins/TablePlugin/index.js +1 -1
  40. package/dist/components/RteEditor/Plugins/ToolbarPlugin/ToolbarPlugin.js +2 -2
  41. package/dist/components/RteEditor/Plugins/index.js +1 -1
  42. package/dist/components/RteEditor/RteEditor.d.ts +8 -6
  43. package/dist/components/RteEditor/RteEditor.js +367 -356
  44. package/dist/components/RteEditor/RteEditor.js.map +1 -1
  45. package/dist/components/RteEditor/UvaTheme/UvaTheme.js +1 -1
  46. package/dist/components/SelectListbox/SelectListbox.d.ts +4 -2
  47. package/dist/components/SelectListbox/SelectListbox.js +20 -18
  48. package/dist/components/SelectListbox/SelectListbox.js.map +1 -1
  49. package/dist/components/SelectListbox/components/SelectButton.d.ts +1 -0
  50. package/dist/components/SelectListbox/components/SelectButton.js +34 -25
  51. package/dist/components/SelectListbox/components/SelectButton.js.map +1 -1
  52. package/dist/components/SelectListbox/components/SelectContainer.js +1 -1
  53. package/dist/components/SelectListbox/components/SelectOption.js +1 -1
  54. package/dist/components/SelectListbox/components/SelectOptionBox.js +1 -1
  55. package/dist/components/index.js +1 -1
  56. package/dist/index.js +1 -1
  57. package/package.json +5 -5
  58. package/dist/RteEditor.module-CmYZ4MmA.js +0 -36
  59. package/dist/RteEditor.module-CmYZ4MmA.js.map +0 -1
  60. package/dist/SelectListbox.module-CgZyIxwT.js.map +0 -1
@@ -1,23 +1,23 @@
1
- import { jsx as f, jsxs as A, Fragment as ke } from "react/jsx-runtime";
2
- import { t as qe, r as Xe, o as D } from "../../LexicalComposerContext.prod-DOyoZx0P.js";
3
- import { aK as Le, ah as M, A as Ze, a as p, aS as re, aM as ne, an as z, y as oe, P as Ye, r as B, h as g, X as Ge, D as c, aW as Ve, ae as Qe, Z as et, _ as tt, aX as rt, aY as nt, S as ot, aV as T, aG as at, aZ as st, a_ as it, a$ as lt, j as ee, b0 as ut, b1 as dt, a4 as ct, m as ft, a1 as Pe, T as mt, b2 as pt, b3 as ue, b as de, R as gt, M as Y, O as ht, a5 as De, b4 as ce, H as vt, E as yt, x as Ct, b5 as fe, z as bt, b6 as Et, b7 as wt, b8 as Te, aF as St, V as xt, d as $e, U as _t, b9 as Nt, W as kt, K as Lt, J as Pt, q as Dt, au as J, at as j, ba as Tt, bb as $t, aw as Bt, bc as te, av as Rt, bd as It, be as At, aQ as Mt } from "../../Lexical.prod-BAE-wnll.js";
4
- import * as Ft from "react";
5
- import { useMemo as Z, useLayoutEffect as O, useEffect as b, useState as I, Suspense as Kt, forwardRef as Be, useCallback as zt, Component as Ot, createElement as me, createContext as Ut, useId as Ht } from "react";
6
- import { a as Wt, T as Jt } from "../../TableCellResizerPlugin-HPo4ZkHo.js";
7
- import { T as jt, R as Re, z as qt, a as ae, A as Ie, l as Xt, K as Zt, F as Yt, d as Ae, b as Gt } from "../../LexicalLink.prod-C6Or2Yo6.js";
8
- import { flushSync as Vt, createPortal as Qt } from "react-dom";
9
- import { U, L as K, x as er } from "../../LexicalUtils.prod-D8DAKg7O.js";
10
- import { R as pe, F as ge, m as tr, g as rr } from "../../LexicalClipboard.prod-BS4qAkmJ.js";
1
+ import { jsx as f, jsxs as M, Fragment as Le } from "react/jsx-runtime";
2
+ import { t as Xe, r as Ze, o as L } from "../../LexicalComposerContext.prod-DOyoZx0P.js";
3
+ import { aK as Pe, ah as F, A as Ye, a as g, aS as ne, aM as oe, an as O, y as ae, P as Ge, r as I, h, X as Ve, D as c, aW as Qe, ae as et, Z as tt, _ as rt, aX as nt, aY as ot, S as at, aV as D, aG as st, aZ as it, a_ as lt, a$ as ut, j as te, b0 as dt, b1 as ct, a4 as ft, m as mt, a1 as De, T as pt, b2 as gt, b3 as ue, b as de, R as ht, M as G, O as vt, a5 as Te, b4 as ce, H as yt, E as Ct, x as bt, b5 as fe, z as Et, b6 as wt, b7 as St, b8 as $e, aF as xt, V as _t, d as Be, U as Nt, b9 as kt, W as Lt, K as Pt, J as Dt, q as Tt, au as J, at as j, ba as $t, bb as Bt, aw as Rt, bc as re, av as It, bd as At, be as Mt, aQ as Ft } from "../../Lexical.prod-BAE-wnll.js";
4
+ import * as Kt from "react";
5
+ import { useMemo as Z, useLayoutEffect as U, useEffect as b, useState as A, Suspense as zt, forwardRef as Re, useCallback as Ot, Component as Ut, createElement as me, createContext as Ht, useId as Wt } from "react";
6
+ import { a as Jt, T as jt } from "../../TableCellResizerPlugin-HPo4ZkHo.js";
7
+ import { T as qt, R as Ie, z as Xt, a as se, A as Ae, l as Zt, K as Yt, F as Gt, d as Me, b as Vt } from "../../LexicalLink.prod-C6Or2Yo6.js";
8
+ import { flushSync as Qt, createPortal as er } from "react-dom";
9
+ import { U as H, L as z, x as tr } from "../../LexicalUtils.prod-D8DAKg7O.js";
10
+ import { R as pe, F as ge, m as rr, g as nr } from "../../LexicalClipboard.prod-BS4qAkmJ.js";
11
11
  import { A as he, Z as ve, n as ye } from "../../LexicalSelection.prod-fLzEGOT_.js";
12
- import { l as Me, n as Fe, L as nr, b as or } from "../../LexicalList.prod-rTq41CO0.js";
13
- import { u as ar, h as sr, d as Ke, v as ir, N as lr, y as ur, T as ze, k as dr } from "../../LexicalTable.prod-BBI7yaOy.js";
14
- import { c as cr } from "../../clsx-OuTLNxxd.js";
12
+ import { l as Fe, n as Ke, L as or, b as ar } from "../../LexicalList.prod-rTq41CO0.js";
13
+ import { u as sr, h as ir, d as ze, v as lr, N as ur, y as dr, T as Oe, k as cr } from "../../LexicalTable.prod-BBI7yaOy.js";
14
+ import { c as Ce } from "../../clsx-OuTLNxxd.js";
15
15
  import { exportMap as fr, mergeBoldStrongTags as mr, cleanUpTable as pr } from "./helpers.js";
16
16
  import { validateUrl as gr, MATCHERS as hr } from "./Plugins/LinkPlugin/helpers.js";
17
- import { s as $ } from "../../RteEditor.module-CmYZ4MmA.js";
17
+ import { s as T } from "../../RteEditor.module-CUi7Vqe8.js";
18
18
  import { ToolBarPlugin as vr } from "./Plugins/ToolbarPlugin/ToolbarPlugin.js";
19
19
  import { useTranslation as yr } from "./hooks/useTranslation.js";
20
- import "../../TablePlugin-CeZO4BR1.js";
20
+ import "../../TablePlugin-BLbsvcuu.js";
21
21
  import "./Plugins/LinkPlugin/LinkContextMenu/LinkContextMenu.js";
22
22
  import "./hooks/components/Flyout.js";
23
23
  import "../Accordion/Accordion.js";
@@ -46,46 +46,46 @@ import { UvaTheme as Er } from "./UvaTheme/UvaTheme.js";
46
46
  import { EditorHeader as wr } from "./EditorHeader/EditorHeader.js";
47
47
  import { LanguageProvider as Sr, useLanguage as xr } from "./Providers/LanguageProvider.js";
48
48
  import { TableWrapperNode as _r } from "./nodes/TableWrapperNode/TableWrapperNode.js";
49
- const Oe = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0, Nr = Oe ? O : b, q = { tag: re };
49
+ const Ue = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0, Nr = Ue ? U : b, q = { tag: ne };
50
50
  function kr({ initialConfig: r, children: e }) {
51
51
  const t = Z(() => {
52
- const { theme: n, namespace: o, nodes: a, onError: s, editorState: i, html: l } = r, u = qe(null, n), d = Le({ editable: r.editable, html: l, namespace: o, nodes: a, onError: (m) => s(m, d), theme: n });
53
- return (function(m, h) {
54
- if (h !== null) {
55
- if (h === void 0) m.update(() => {
56
- const x = M();
57
- if (x.isEmpty()) {
58
- const v = Ze();
59
- x.append(v);
60
- const _ = Oe ? document.activeElement : null;
61
- (p() !== null || _ !== null && _ === m.getRootElement()) && v.select();
52
+ const { theme: n, namespace: o, nodes: a, onError: s, editorState: i, html: l } = r, d = Xe(null, n), u = Pe({ editable: r.editable, html: l, namespace: o, nodes: a, onError: (m) => s(m, u), theme: n });
53
+ return (function(m, v) {
54
+ if (v !== null) {
55
+ if (v === void 0) m.update(() => {
56
+ const S = F();
57
+ if (S.isEmpty()) {
58
+ const C = Ye();
59
+ S.append(C);
60
+ const x = Ue ? document.activeElement : null;
61
+ (g() !== null || x !== null && x === m.getRootElement()) && C.select();
62
62
  }
63
63
  }, q);
64
- else if (h !== null) switch (typeof h) {
64
+ else if (v !== null) switch (typeof v) {
65
65
  case "string": {
66
- const x = m.parseEditorState(h);
67
- m.setEditorState(x, q);
66
+ const S = m.parseEditorState(v);
67
+ m.setEditorState(S, q);
68
68
  break;
69
69
  }
70
70
  case "object":
71
- m.setEditorState(h, q);
71
+ m.setEditorState(v, q);
72
72
  break;
73
73
  case "function":
74
74
  m.update(() => {
75
- M().isEmpty() && h(m);
75
+ F().isEmpty() && v(m);
76
76
  }, q);
77
77
  }
78
78
  }
79
- })(d, i), [d, u];
79
+ })(u, i), [u, d];
80
80
  }, []);
81
81
  return Nr(() => {
82
82
  const n = r.editable, [o] = t;
83
83
  o.setEditable(n === void 0 || n);
84
- }, []), f(Xe.Provider, { value: t, children: e });
84
+ }, []), f(Ze.Provider, { value: t, children: e });
85
85
  }
86
- const Lr = ne({ name: "@lexical/react/ReactProvider" });
86
+ const Lr = oe({ name: "@lexical/react/ReactProvider" });
87
87
  function Pr() {
88
- return M().getTextContent();
88
+ return F().getTextContent();
89
89
  }
90
90
  function Dr(r, e = !0) {
91
91
  if (r) return !1;
@@ -94,23 +94,23 @@ function Dr(r, e = !0) {
94
94
  }
95
95
  function Tr(r) {
96
96
  if (!Dr(r, !1)) return !1;
97
- const e = M().getChildren(), t = e.length;
97
+ const e = F().getChildren(), t = e.length;
98
98
  if (t > 1) return !1;
99
99
  for (let n = 0; n < t; n++) {
100
100
  const o = e[n];
101
- if (z(o)) return !1;
102
- if (oe(o)) {
103
- if (!Ye(o) || o.__indent !== 0) return !1;
101
+ if (O(o)) return !1;
102
+ if (ae(o)) {
103
+ if (!Ge(o) || o.__indent !== 0) return !1;
104
104
  const a = o.getChildren(), s = a.length;
105
105
  for (let i = 0; i < s; i++) {
106
106
  const l = a[n];
107
- if (!B(l)) return !1;
107
+ if (!I(l)) return !1;
108
108
  }
109
109
  }
110
110
  }
111
111
  return !0;
112
112
  }
113
- function Ue(r) {
113
+ function He(r) {
114
114
  return () => Tr(r);
115
115
  }
116
116
  function $r(r) {
@@ -131,16 +131,16 @@ function $r(r) {
131
131
  if (i && i.functionId === "makeChanges") {
132
132
  const l = i.args;
133
133
  if (l) {
134
- const [u, d, m, h, x] = l;
134
+ const [d, u, m, v, S] = l;
135
135
  r.update(() => {
136
- const v = p();
137
- if (g(v)) {
138
- const _ = v.anchor;
139
- let w = _.getNode(), E = 0, y = 0;
140
- if (B(w) && u >= 0 && d >= 0 && (E = u, y = u + d, v.setTextNodeRange(w, E, w, y)), E === y && m === "" || (v.insertRawText(m), w = _.getNode()), B(w)) {
141
- E = h, y = h + x;
142
- const N = w.getTextContentSize();
143
- E = E > N ? N : E, y = y > N ? N : y, v.setTextNodeRange(w, E, w, y);
136
+ const C = g();
137
+ if (h(C)) {
138
+ const x = C.anchor;
139
+ let E = x.getNode(), w = 0, y = 0;
140
+ if (I(E) && d >= 0 && u >= 0 && (w = d, y = d + u, C.setTextNodeRange(E, w, E, y)), w === y && m === "" || (C.insertRawText(m), E = x.getNode()), I(E)) {
141
+ w = v, y = v + S;
142
+ const _ = E.getTextContentSize();
143
+ w = w > _ ? _ : w, y = y > _ ? _ : y, C.setTextNodeRange(E, w, E, y);
144
144
  }
145
145
  n.stopImmediatePropagation();
146
146
  }
@@ -154,7 +154,7 @@ function $r(r) {
154
154
  window.removeEventListener("message", t, !0);
155
155
  };
156
156
  }
157
- function Ce(r, e) {
157
+ function be(r, e) {
158
158
  if (document.caretRangeFromPoint !== void 0) {
159
159
  const t = document.caretRangeFromPoint(r, e);
160
160
  return t === null ? null : { node: t.startContainer, offset: t.startOffset };
@@ -165,216 +165,216 @@ function Ce(r, e) {
165
165
  }
166
166
  return null;
167
167
  }
168
- const F = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0, Br = F && "documentMode" in document ? document.documentMode : null, Rr = F && /Mac|iPod|iPhone|iPad/.test(navigator.platform), Ir = !(!F || !("InputEvent" in window) || Br) && "getTargetRanges" in new window.InputEvent("input"), Ar = F && /Version\/[\d.]+.*Safari/.test(navigator.userAgent), be = F && /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream, Mr = F && /^(?=.*Chrome).*/i.test(navigator.userAgent), Fr = F && /AppleWebKit\/[\d.]+/.test(navigator.userAgent) && Rr && !Mr, Ee = et("DRAG_DROP_PASTE_FILE");
168
+ const K = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0, Br = K && "documentMode" in document ? document.documentMode : null, Rr = K && /Mac|iPod|iPhone|iPad/.test(navigator.platform), Ir = !(!K || !("InputEvent" in window) || Br) && "getTargetRanges" in new window.InputEvent("input"), Ar = K && /Version\/[\d.]+.*Safari/.test(navigator.userAgent), Ee = K && /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream, Mr = K && /^(?=.*Chrome).*/i.test(navigator.userAgent), Fr = K && /AppleWebKit\/[\d.]+/.test(navigator.userAgent) && Rr && !Mr, we = tt("DRAG_DROP_PASTE_FILE");
169
169
  function X(r) {
170
170
  let e = null;
171
- if (K(r, DragEvent) ? e = r.dataTransfer : K(r, ClipboardEvent) && (e = r.clipboardData), e === null) return [!1, [], !1];
171
+ if (z(r, DragEvent) ? e = r.dataTransfer : z(r, ClipboardEvent) && (e = r.clipboardData), e === null) return [!1, [], !1];
172
172
  const t = e.types, n = t.includes("Files"), o = t.includes("text/html") || t.includes("text/plain");
173
173
  return [n, Array.from(e.files), o];
174
174
  }
175
- function we(r) {
176
- const e = p();
177
- if (!g(e)) return !1;
175
+ function Se(r) {
176
+ const e = g();
177
+ if (!h(e)) return !1;
178
178
  const t = /* @__PURE__ */ new Set(), n = e.getNodes();
179
179
  for (let o = 0; o < n.length; o++) {
180
180
  const a = n[o], s = a.getKey();
181
181
  if (t.has(s)) continue;
182
- const i = $e(a, (u) => oe(u) && !u.isInline());
182
+ const i = Be(a, (d) => ae(d) && !d.isInline());
183
183
  if (i === null) continue;
184
184
  const l = i.getKey();
185
185
  i.canIndent() && !t.has(l) && (t.add(l), r(i));
186
186
  }
187
187
  return t.size > 0;
188
188
  }
189
- function Se(r) {
190
- const e = ee(r);
191
- return z(e);
189
+ function xe(r) {
190
+ const e = te(r);
191
+ return O(e);
192
192
  }
193
- function G(r) {
193
+ function V(r) {
194
194
  for (const e of ["lowercase", "uppercase", "capitalize"]) r.hasFormat(e) && r.toggleFormat(e);
195
195
  }
196
196
  function Kr(r) {
197
- return U(r.registerCommand(Dt, (e) => {
198
- const t = p();
199
- return !!T(t) && (t.clear(), !0);
200
- }, c), r.registerCommand(Y, (e) => {
201
- const t = p();
202
- return g(t) ? (t.deleteCharacter(e), !0) : !!T(t) && (t.deleteNodes(), !0);
197
+ return H(r.registerCommand(Tt, (e) => {
198
+ const t = g();
199
+ return !!D(t) && (t.clear(), !0);
200
+ }, c), r.registerCommand(G, (e) => {
201
+ const t = g();
202
+ return h(t) ? (t.deleteCharacter(e), !0) : !!D(t) && (t.deleteNodes(), !0);
203
+ }, c), r.registerCommand(Dt, (e) => {
204
+ const t = g();
205
+ return !!h(t) && (t.deleteWord(e), !0);
203
206
  }, c), r.registerCommand(Pt, (e) => {
204
- const t = p();
205
- return !!g(t) && (t.deleteWord(e), !0);
207
+ const t = g();
208
+ return !!h(t) && (t.deleteLine(e), !0);
206
209
  }, c), r.registerCommand(Lt, (e) => {
207
- const t = p();
208
- return !!g(t) && (t.deleteLine(e), !0);
209
- }, c), r.registerCommand(kt, (e) => {
210
- const t = p();
210
+ const t = g();
211
211
  if (typeof e == "string") t !== null && t.insertText(e);
212
212
  else {
213
213
  if (t === null) return !1;
214
214
  const n = e.dataTransfer;
215
215
  if (n != null) pe(n, t, r);
216
- else if (g(t)) {
216
+ else if (h(t)) {
217
217
  const o = e.data;
218
218
  return o && t.insertText(o), !0;
219
219
  }
220
220
  }
221
221
  return !0;
222
- }, c), r.registerCommand(Nt, () => {
223
- const e = p();
224
- return !!g(e) && (e.removeText(), !0);
222
+ }, c), r.registerCommand(kt, () => {
223
+ const e = g();
224
+ return !!h(e) && (e.removeText(), !0);
225
+ }, c), r.registerCommand(Nt, (e) => {
226
+ const t = g();
227
+ return !!h(t) && (t.formatText(e), !0);
225
228
  }, c), r.registerCommand(_t, (e) => {
226
- const t = p();
227
- return !!g(t) && (t.formatText(e), !0);
228
- }, c), r.registerCommand(xt, (e) => {
229
- const t = p();
230
- if (!g(t) && !T(t)) return !1;
229
+ const t = g();
230
+ if (!h(t) && !D(t)) return !1;
231
231
  const n = t.getNodes();
232
232
  for (const o of n) {
233
- const a = $e(o, (s) => oe(s) && !s.isInline());
233
+ const a = Be(o, (s) => ae(s) && !s.isInline());
234
234
  a !== null && a.setFormat(e);
235
235
  }
236
236
  return !0;
237
237
  }, c), r.registerCommand(ue, (e) => {
238
- const t = p();
239
- return !!g(t) && (t.insertLineBreak(e), !0);
238
+ const t = g();
239
+ return !!h(t) && (t.insertLineBreak(e), !0);
240
240
  }, c), r.registerCommand(de, () => {
241
- const e = p();
242
- return !!g(e) && (e.insertParagraph(), !0);
243
- }, c), r.registerCommand(wt, () => (Te([St()]), !0), c), r.registerCommand(Et, () => we((e) => {
241
+ const e = g();
242
+ return !!h(e) && (e.insertParagraph(), !0);
243
+ }, c), r.registerCommand(St, () => ($e([xt()]), !0), c), r.registerCommand(wt, () => Se((e) => {
244
244
  const t = e.getIndent();
245
245
  e.setIndent(t + 1);
246
- }), c), r.registerCommand(ce, () => we((e) => {
246
+ }), c), r.registerCommand(ce, () => Se((e) => {
247
247
  const t = e.getIndent();
248
248
  t > 0 && e.setIndent(Math.max(0, t - 1));
249
- }), c), r.registerCommand(bt, (e) => {
250
- const t = p();
251
- if (T(t)) {
249
+ }), c), r.registerCommand(Et, (e) => {
250
+ const t = g();
251
+ if (D(t)) {
252
252
  const n = t.getNodes();
253
253
  if (n.length > 0) return e.preventDefault(), n[0].selectPrevious(), !0;
254
- } else if (g(t)) {
254
+ } else if (h(t)) {
255
255
  const n = fe(t.focus, !0);
256
- if (!e.shiftKey && z(n) && !n.isIsolated() && !n.isInline()) return n.selectPrevious(), e.preventDefault(), !0;
256
+ if (!e.shiftKey && O(n) && !n.isIsolated() && !n.isInline()) return n.selectPrevious(), e.preventDefault(), !0;
257
257
  }
258
258
  return !1;
259
- }, c), r.registerCommand(Ct, (e) => {
260
- const t = p();
261
- if (T(t)) {
259
+ }, c), r.registerCommand(bt, (e) => {
260
+ const t = g();
261
+ if (D(t)) {
262
262
  const n = t.getNodes();
263
263
  if (n.length > 0) return e.preventDefault(), n[0].selectNext(0, 0), !0;
264
- } else if (g(t)) {
264
+ } else if (h(t)) {
265
265
  if ((function(o) {
266
266
  const a = o.focus;
267
- return a.key === "root" && a.offset === M().getChildrenSize();
267
+ return a.key === "root" && a.offset === F().getChildrenSize();
268
268
  })(t)) return e.preventDefault(), !0;
269
269
  const n = fe(t.focus, !1);
270
- if (!e.shiftKey && z(n) && !n.isIsolated() && !n.isInline()) return n.selectNext(), e.preventDefault(), !0;
270
+ if (!e.shiftKey && O(n) && !n.isIsolated() && !n.isInline()) return n.selectNext(), e.preventDefault(), !0;
271
271
  }
272
272
  return !1;
273
- }, c), r.registerCommand(yt, (e) => {
274
- const t = p();
275
- if (T(t)) {
273
+ }, c), r.registerCommand(Ct, (e) => {
274
+ const t = g();
275
+ if (D(t)) {
276
276
  const n = t.getNodes();
277
277
  if (n.length > 0) return e.preventDefault(), he(n[0]) ? n[0].selectNext(0, 0) : n[0].selectPrevious(), !0;
278
278
  }
279
- if (!g(t)) return !1;
279
+ if (!h(t)) return !1;
280
280
  if (ve(t, !0)) {
281
281
  const n = e.shiftKey;
282
282
  return e.preventDefault(), ye(t, n, !0), !0;
283
283
  }
284
284
  return !1;
285
- }, c), r.registerCommand(vt, (e) => {
286
- const t = p();
287
- if (T(t)) {
285
+ }, c), r.registerCommand(yt, (e) => {
286
+ const t = g();
287
+ if (D(t)) {
288
288
  const o = t.getNodes();
289
289
  if (o.length > 0) return e.preventDefault(), he(o[0]) ? o[0].selectPrevious() : o[0].selectNext(0, 0), !0;
290
290
  }
291
- if (!g(t)) return !1;
291
+ if (!h(t)) return !1;
292
292
  const n = e.shiftKey;
293
293
  return !!ve(t, !1) && (e.preventDefault(), ye(t, n, !1), !0);
294
- }, c), r.registerCommand(ht, (e) => {
295
- if (Se(e.target)) return !1;
296
- const t = p();
297
- if (g(t)) {
294
+ }, c), r.registerCommand(vt, (e) => {
295
+ if (xe(e.target)) return !1;
296
+ const t = g();
297
+ if (h(t)) {
298
298
  if ((function(n) {
299
299
  if (!n.isCollapsed()) return !1;
300
300
  const { anchor: o } = n;
301
301
  if (o.offset !== 0) return !1;
302
302
  const a = o.getNode();
303
- if (De(a)) return !1;
304
- const s = er(a);
303
+ if (Te(a)) return !1;
304
+ const s = tr(a);
305
305
  return s.getIndent() > 0 && (s.is(a) || a.is(s.getFirstDescendant()));
306
306
  })(t)) return e.preventDefault(), r.dispatchCommand(ce, void 0);
307
- if (be && navigator.language === "ko-KR") return !1;
308
- } else if (!T(t)) return !1;
309
- return e.preventDefault(), r.dispatchCommand(Y, !0);
307
+ if (Ee && navigator.language === "ko-KR") return !1;
308
+ } else if (!D(t)) return !1;
309
+ return e.preventDefault(), r.dispatchCommand(G, !0);
310
+ }, c), r.registerCommand(ht, (e) => {
311
+ if (xe(e.target)) return !1;
312
+ const t = g();
313
+ return !(!h(t) && !D(t)) && (e.preventDefault(), r.dispatchCommand(G, !1));
310
314
  }, c), r.registerCommand(gt, (e) => {
311
- if (Se(e.target)) return !1;
312
- const t = p();
313
- return !(!g(t) && !T(t)) && (e.preventDefault(), r.dispatchCommand(Y, !1));
314
- }, c), r.registerCommand(pt, (e) => {
315
- const t = p();
316
- if (!g(t)) return !1;
317
- if (G(t), e !== null) {
318
- if ((be || Ar || Fr) && Ir) return !1;
315
+ const t = g();
316
+ if (!h(t)) return !1;
317
+ if (V(t), e !== null) {
318
+ if ((Ee || Ar || Fr) && Ir) return !1;
319
319
  if (e.preventDefault(), e.shiftKey) return r.dispatchCommand(ue, !1);
320
320
  }
321
321
  return r.dispatchCommand(de, void 0);
322
- }, c), r.registerCommand(mt, () => {
323
- const e = p();
324
- return !!g(e) && (r.blur(), !0);
325
- }, c), r.registerCommand(dt, (e) => {
322
+ }, c), r.registerCommand(pt, () => {
323
+ const e = g();
324
+ return !!h(e) && (r.blur(), !0);
325
+ }, c), r.registerCommand(ct, (e) => {
326
326
  const [, t] = X(e);
327
327
  if (t.length > 0) {
328
- const o = Ce(e.clientX, e.clientY);
328
+ const o = be(e.clientX, e.clientY);
329
329
  if (o !== null) {
330
- const { offset: a, node: s } = o, i = ee(s);
330
+ const { offset: a, node: s } = o, i = te(s);
331
331
  if (i !== null) {
332
- const l = ct();
333
- if (B(i)) l.anchor.set(i.getKey(), a, "text"), l.focus.set(i.getKey(), a, "text");
332
+ const l = ft();
333
+ if (I(i)) l.anchor.set(i.getKey(), a, "text"), l.focus.set(i.getKey(), a, "text");
334
334
  else {
335
- const d = i.getParentOrThrow().getKey(), m = i.getIndexWithinParent() + 1;
336
- l.anchor.set(d, m, "element"), l.focus.set(d, m, "element");
335
+ const u = i.getParentOrThrow().getKey(), m = i.getIndexWithinParent() + 1;
336
+ l.anchor.set(u, m, "element"), l.focus.set(u, m, "element");
337
337
  }
338
- const u = ft(l);
339
- Pe(u);
338
+ const d = mt(l);
339
+ De(d);
340
340
  }
341
- r.dispatchCommand(Ee, t);
341
+ r.dispatchCommand(we, t);
342
342
  }
343
343
  return e.preventDefault(), !0;
344
344
  }
345
- const n = p();
346
- return !!g(n);
345
+ const n = g();
346
+ return !!h(n);
347
+ }, c), r.registerCommand(dt, (e) => {
348
+ const [t] = X(e), n = g();
349
+ return !(t && !h(n));
347
350
  }, c), r.registerCommand(ut, (e) => {
348
- const [t] = X(e), n = p();
349
- return !(t && !g(n));
350
- }, c), r.registerCommand(lt, (e) => {
351
- const [t] = X(e), n = p();
352
- if (t && !g(n)) return !1;
353
- const o = Ce(e.clientX, e.clientY);
351
+ const [t] = X(e), n = g();
352
+ if (t && !h(n)) return !1;
353
+ const o = be(e.clientX, e.clientY);
354
354
  if (o !== null) {
355
- const a = ee(o.node);
356
- z(a) && e.preventDefault();
355
+ const a = te(o.node);
356
+ O(a) && e.preventDefault();
357
357
  }
358
358
  return !0;
359
- }, c), r.registerCommand(st, () => (it(), !0), c), r.registerCommand(at, (e) => (ge(r, K(e, ClipboardEvent) ? e : null), !0), c), r.registerCommand(ot, (e) => ((async function(t, n) {
360
- await ge(n, K(t, ClipboardEvent) ? t : null), n.update(() => {
361
- const o = p();
362
- g(o) ? o.removeText() : T(o) && o.getNodes().forEach((a) => a.remove());
359
+ }, c), r.registerCommand(it, () => (lt(), !0), c), r.registerCommand(st, (e) => (ge(r, z(e, ClipboardEvent) ? e : null), !0), c), r.registerCommand(at, (e) => ((async function(t, n) {
360
+ await ge(n, z(t, ClipboardEvent) ? t : null), n.update(() => {
361
+ const o = g();
362
+ h(o) ? o.removeText() : D(o) && o.getNodes().forEach((a) => a.remove());
363
363
  });
364
- })(e, r), !0), c), r.registerCommand(Qe, (e) => {
364
+ })(e, r), !0), c), r.registerCommand(et, (e) => {
365
365
  const [, t, n] = X(e);
366
- return t.length > 0 && !n ? (r.dispatchCommand(Ee, t), !0) : tt(e.target) && rt(e.target) ? !1 : p() !== null && ((function(o, a) {
366
+ return t.length > 0 && !n ? (r.dispatchCommand(we, t), !0) : rt(e.target) && nt(e.target) ? !1 : g() !== null && ((function(o, a) {
367
367
  o.preventDefault(), a.update(() => {
368
- const s = p(), i = K(o, InputEvent) || K(o, KeyboardEvent) ? null : o.clipboardData;
368
+ const s = g(), i = z(o, InputEvent) || z(o, KeyboardEvent) ? null : o.clipboardData;
369
369
  i != null && s !== null && pe(i, s, a);
370
- }, { tag: nt });
370
+ }, { tag: ot });
371
371
  })(e, r), !0);
372
+ }, c), r.registerCommand(Qe, (e) => {
373
+ const t = g();
374
+ return h(t) && V(t), !1;
372
375
  }, c), r.registerCommand(Ve, (e) => {
373
- const t = p();
374
- return g(t) && G(t), !1;
375
- }, c), r.registerCommand(Ge, (e) => {
376
- const t = p();
377
- return g(t) && G(t), !1;
376
+ const t = g();
377
+ return h(t) && V(t), !1;
378
378
  }, c));
379
379
  }
380
380
  function zr(r, ...e) {
@@ -383,12 +383,12 @@ function zr(r, ...e) {
383
383
  for (const o of e) n.append("v", o);
384
384
  throw t.search = n.toString(), Error(`Minified Lexical error #${r}; visit ${t.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`);
385
385
  }
386
- const se = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0 ? O : b;
386
+ const ie = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0 ? U : b;
387
387
  function Or({ editor: r, ErrorBoundary: e }) {
388
388
  return (function(t, n) {
389
- const [o, a] = I(() => t.getDecorators());
390
- return se(() => t.registerDecoratorListener((s) => {
391
- Vt(() => {
389
+ const [o, a] = A(() => t.getDecorators());
390
+ return ie(() => t.registerDecoratorListener((s) => {
391
+ Qt(() => {
392
392
  a(s);
393
393
  });
394
394
  }), [t]), b(() => {
@@ -396,8 +396,8 @@ function Or({ editor: r, ErrorBoundary: e }) {
396
396
  }, [t]), Z(() => {
397
397
  const s = [], i = Object.keys(o);
398
398
  for (let l = 0; l < i.length; l++) {
399
- const u = i[l], d = f(n, { onError: (h) => t._onError(h), children: f(Kt, { fallback: null, children: o[u] }) }), m = t.getElementByKey(u);
400
- m !== null && s.push(Qt(d, m, u));
399
+ const d = i[l], u = f(n, { onError: (v) => t._onError(v), children: f(zt, { fallback: null, children: o[d] }) }), m = t.getElementByKey(d);
400
+ m !== null && s.push(er(u, m, d));
401
401
  }
402
402
  return s;
403
403
  }, [n, o, t]);
@@ -405,7 +405,7 @@ function Or({ editor: r, ErrorBoundary: e }) {
405
405
  }
406
406
  function Ur({ editor: r, ErrorBoundary: e }) {
407
407
  return (function(t) {
408
- const n = jt.maybeFromEditor(t);
408
+ const n = qt.maybeFromEditor(t);
409
409
  if (n && n.hasExtensionByName(Lr.name)) {
410
410
  for (const o of ["@lexical/plain-text", "@lexical/rich-text"]) n.hasExtensionByName(o) && zr(320, o);
411
411
  return !0;
@@ -413,82 +413,82 @@ function Ur({ editor: r, ErrorBoundary: e }) {
413
413
  return !1;
414
414
  })(r) ? null : f(Or, { editor: r, ErrorBoundary: e });
415
415
  }
416
- function xe(r) {
417
- return r.getEditorState().read(Ue(r.isComposing()));
416
+ function _e(r) {
417
+ return r.getEditorState().read(He(r.isComposing()));
418
418
  }
419
419
  function Hr({ contentEditable: r, placeholder: e = null, ErrorBoundary: t }) {
420
- const [n] = D();
420
+ const [n] = L();
421
421
  return (function(o) {
422
- se(() => U(Kr(o), $r(o)), [o]);
423
- })(n), A(ke, { children: [r, f(Wr, { content: e }), f(Ur, { editor: n, ErrorBoundary: t })] });
422
+ ie(() => H(Kr(o), $r(o)), [o]);
423
+ })(n), M(Le, { children: [r, f(Wr, { content: e }), f(Ur, { editor: n, ErrorBoundary: t })] });
424
424
  }
425
425
  function Wr({ content: r }) {
426
- const [e] = D(), t = (function(o) {
427
- const [a, s] = I(() => xe(o));
428
- return se(() => {
426
+ const [e] = L(), t = (function(o) {
427
+ const [a, s] = A(() => _e(o));
428
+ return ie(() => {
429
429
  function i() {
430
- const l = xe(o);
430
+ const l = _e(o);
431
431
  s(l);
432
432
  }
433
- return i(), U(o.registerUpdateListener(() => {
433
+ return i(), H(o.registerUpdateListener(() => {
434
434
  i();
435
435
  }), o.registerEditableListener(() => {
436
436
  i();
437
437
  }));
438
438
  }, [o]), a;
439
- })(e), n = Wt();
439
+ })(e), n = Jt();
440
440
  return t ? typeof r == "function" ? r(n) : r : null;
441
441
  }
442
- const He = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0 ? O : b;
443
- function Jr({ editor: r, ariaActiveDescendant: e, ariaAutoComplete: t, ariaControls: n, ariaDescribedBy: o, ariaErrorMessage: a, ariaExpanded: s, ariaInvalid: i, ariaLabel: l, ariaLabelledBy: u, ariaMultiline: d, ariaOwns: m, ariaRequired: h, autoCapitalize: x, className: v, id: _, role: w = "textbox", spellCheck: E = !0, style: y, tabIndex: N, "data-testid": L, ...P }, C) {
444
- const [S, k] = I(r.isEditable()), H = zt((R) => {
442
+ const We = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0 ? U : b;
443
+ function Jr({ editor: r, ariaActiveDescendant: e, ariaAutoComplete: t, ariaControls: n, ariaDescribedBy: o, ariaErrorMessage: a, ariaExpanded: s, ariaInvalid: i, ariaLabel: l, ariaLabelledBy: d, ariaMultiline: u, ariaOwns: m, ariaRequired: v, autoCapitalize: S, className: C, id: x, role: E = "textbox", spellCheck: w = !0, style: y, tabIndex: _, "data-testid": P, ...N }, k) {
444
+ const [p, $] = A(r.isEditable()), B = Ot((R) => {
445
445
  R && R.ownerDocument && R.ownerDocument.defaultView ? r.setRootElement(R) : r.setRootElement(null);
446
- }, [r]), ie = Z(() => /* @__PURE__ */ (function(...R) {
446
+ }, [r]), Y = Z(() => /* @__PURE__ */ (function(...R) {
447
447
  return (le) => {
448
448
  for (const W of R) typeof W == "function" ? W(le) : W != null && (W.current = le);
449
449
  };
450
- })(C, H), [H, C]);
451
- return He(() => (k(r.isEditable()), r.registerEditableListener((R) => {
452
- k(R);
453
- })), [r]), f("div", { "aria-activedescendant": S ? e : void 0, "aria-autocomplete": S ? t : "none", "aria-controls": S ? n : void 0, "aria-describedby": o, ...a != null ? { "aria-errormessage": a } : {}, "aria-expanded": S && w === "combobox" ? !!s : void 0, ...i != null ? { "aria-invalid": i } : {}, "aria-label": l, "aria-labelledby": u, "aria-multiline": d, "aria-owns": S ? m : void 0, "aria-readonly": !S || void 0, "aria-required": h, autoCapitalize: x, className: v, contentEditable: S, "data-testid": L, id: _, ref: ie, role: w, spellCheck: E, style: y, tabIndex: N, ...P });
450
+ })(k, B), [B, k]);
451
+ return We(() => ($(r.isEditable()), r.registerEditableListener((R) => {
452
+ $(R);
453
+ })), [r]), f("div", { "aria-activedescendant": p ? e : void 0, "aria-autocomplete": p ? t : "none", "aria-controls": p ? n : void 0, "aria-describedby": o, ...a != null ? { "aria-errormessage": a } : {}, "aria-expanded": p && E === "combobox" ? !!s : void 0, ...i != null ? { "aria-invalid": i } : {}, "aria-label": l, "aria-labelledby": d, "aria-multiline": u, "aria-owns": p ? m : void 0, "aria-readonly": !p || void 0, "aria-required": v, autoCapitalize: S, className: C, contentEditable: p, "data-testid": P, id: x, ref: Y, role: E, spellCheck: w, style: y, tabIndex: _, ...N });
454
454
  }
455
- const jr = Be(Jr);
456
- function _e(r) {
457
- return r.getEditorState().read(Ue(r.isComposing()));
455
+ const jr = Re(Jr);
456
+ function Ne(r) {
457
+ return r.getEditorState().read(He(r.isComposing()));
458
458
  }
459
- const qr = Be(Xr);
459
+ const qr = Re(Xr);
460
460
  function Xr(r, e) {
461
- const { placeholder: t, ...n } = r, [o] = D();
462
- return A(ke, { children: [f(jr, { editor: o, ...n, ref: e }), t != null && f(Zr, { editor: o, content: t })] });
461
+ const { placeholder: t, ...n } = r, [o] = L();
462
+ return M(Le, { children: [f(jr, { editor: o, ...n, ref: e }), t != null && f(Zr, { editor: o, content: t })] });
463
463
  }
464
464
  function Zr({ content: r, editor: e }) {
465
465
  const t = (function(s) {
466
- const [i, l] = I(() => _e(s));
467
- return He(() => {
468
- function u() {
469
- const d = _e(s);
470
- l(d);
466
+ const [i, l] = A(() => Ne(s));
467
+ return We(() => {
468
+ function d() {
469
+ const u = Ne(s);
470
+ l(u);
471
471
  }
472
- return u(), U(s.registerUpdateListener(() => {
473
- u();
472
+ return d(), H(s.registerUpdateListener(() => {
473
+ d();
474
474
  }), s.registerEditableListener(() => {
475
- u();
475
+ d();
476
476
  }));
477
477
  }, [s]), i;
478
- })(e), [n, o] = I(e.isEditable());
479
- if (O(() => (o(e.isEditable()), e.registerEditableListener((s) => {
478
+ })(e), [n, o] = A(e.isEditable());
479
+ if (U(() => (o(e.isEditable()), e.registerEditableListener((s) => {
480
480
  o(s);
481
481
  })), [e]), !t) return null;
482
482
  let a = null;
483
483
  return typeof r == "function" ? a = r(n) : r !== null && (a = r), a === null ? null : f("div", { "aria-hidden": !0, children: a });
484
484
  }
485
- const Yr = Ut(null), V = {
485
+ const Yr = Ht(null), Q = {
486
486
  didCatch: !1,
487
487
  error: null
488
488
  };
489
- class Gr extends Ot {
489
+ class Gr extends Ut {
490
490
  constructor(e) {
491
- super(e), this.resetErrorBoundary = this.resetErrorBoundary.bind(this), this.state = V;
491
+ super(e), this.resetErrorBoundary = this.resetErrorBoundary.bind(this), this.state = Q;
492
492
  }
493
493
  static getDerivedStateFromError(e) {
494
494
  return {
@@ -506,7 +506,7 @@ class Gr extends Ot {
506
506
  (t = (n = this.props).onReset) === null || t === void 0 || t.call(n, {
507
507
  args: a,
508
508
  reason: "imperative-api"
509
- }), this.setState(V);
509
+ }), this.setState(Q);
510
510
  }
511
511
  }
512
512
  componentDidCatch(e, t) {
@@ -525,7 +525,7 @@ class Gr extends Ot {
525
525
  next: o,
526
526
  prev: e.resetKeys,
527
527
  reason: "keys"
528
- }), this.setState(V);
528
+ }), this.setState(Q);
529
529
  }
530
530
  }
531
531
  render() {
@@ -569,260 +569,269 @@ function Vr() {
569
569
  function Qr({ children: r, onError: e }) {
570
570
  return f(Gr, { fallback: f("div", { style: { border: "1px solid #f00", color: "#f00", padding: "8px" }, children: "An error was thrown." }), onError: e, children: r });
571
571
  }
572
- const en = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0 ? O : b;
572
+ const en = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0 ? U : b;
573
573
  function tn({ ignoreHistoryMergeTagChange: r = !0, ignoreSelectionChange: e = !1, onChange: t }) {
574
- const [n] = D();
574
+ const [n] = L();
575
575
  return en(() => {
576
576
  if (t) return n.registerUpdateListener(({ editorState: o, dirtyElements: a, dirtyLeaves: s, prevEditorState: i, tags: l }) => {
577
- e && a.size === 0 && s.size === 0 || r && l.has(re) || i.isEmpty() || t(o, n, l);
577
+ e && a.size === 0 && s.size === 0 || r && l.has(ne) || i.isEmpty() || t(o, n, l);
578
578
  });
579
579
  }, [n, r, e, t]), null;
580
580
  }
581
581
  function rn({ hasStrictIndent: r = !1 }) {
582
- const [e] = D();
582
+ const [e] = L();
583
583
  return b(() => {
584
- if (!e.hasNodes([Me, Fe])) throw new Error("ListPlugin: ListNode and/or ListItemNode not registered on editor");
584
+ if (!e.hasNodes([Fe, Ke])) throw new Error("ListPlugin: ListNode and/or ListItemNode not registered on editor");
585
585
  }, [e]), b(() => {
586
- if (r) return nr(e);
586
+ if (r) return or(e);
587
587
  }, [e, r]), (function(t) {
588
- b(() => or(t), [t]);
588
+ b(() => ar(t), [t]);
589
589
  })(e), null;
590
590
  }
591
591
  function nn({ validateUrl: r, attributes: e }) {
592
- const [t] = D();
592
+ const [t] = L();
593
593
  return b(() => {
594
- if (!t.hasNodes([Re])) throw new Error("LinkPlugin: LinkNode not registered on editor");
595
- }), b(() => qt(t, ae({ attributes: e, validateUrl: r })), [t, r, e]), null;
594
+ if (!t.hasNodes([Ie])) throw new Error("LinkPlugin: LinkNode not registered on editor");
595
+ }), b(() => Xt(t, se({ attributes: e, validateUrl: r })), [t, r, e]), null;
596
596
  }
597
597
  function on(r, e, t) {
598
598
  b(() => {
599
- r.hasNodes([Ie]) || (function(n, ...o) {
599
+ r.hasNodes([Ae]) || (function(n, ...o) {
600
600
  const a = new URL("https://lexical.dev/docs/error"), s = new URLSearchParams();
601
601
  s.append("code", n);
602
602
  for (const i of o) s.append("v", i);
603
603
  throw a.search = s.toString(), Error(`Minified Lexical error #${n}; visit ${a.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`);
604
604
  })(77);
605
- }), b(() => Xt(r, { changeHandlers: t ? [t] : [], matchers: e }), [r, e, t]);
605
+ }), b(() => Zt(r, { changeHandlers: t ? [t] : [], matchers: e }), [r, e, t]);
606
606
  }
607
607
  function an({ matchers: r, onChange: e }) {
608
- const [t] = D();
608
+ const [t] = L();
609
609
  return on(t, r, e), null;
610
610
  }
611
611
  function sn({ newTab: r = !0, disabled: e = !1 }) {
612
- const [t] = D();
613
- return b(() => Zt(t, ae({ disabled: e, newTab: r })), [t, r, e]), null;
612
+ const [t] = L();
613
+ return b(() => Yt(t, se({ disabled: e, newTab: r })), [t, r, e]), null;
614
614
  }
615
615
  function ln(r, e, t, n, o) {
616
616
  if (r === null || t.size === 0 && n.size === 0 && !o) return 0;
617
617
  const a = e._selection, s = r._selection;
618
618
  if (o) return 1;
619
- if (!(g(a) && g(s) && s.isCollapsed() && a.isCollapsed())) return 0;
620
- const i = (function(E, y, N) {
621
- const L = E._nodeMap, P = [];
622
- for (const C of y) {
623
- const S = L.get(C);
624
- S !== void 0 && P.push(S);
619
+ if (!(h(a) && h(s) && s.isCollapsed() && a.isCollapsed())) return 0;
620
+ const i = (function(w, y, _) {
621
+ const P = w._nodeMap, N = [];
622
+ for (const k of y) {
623
+ const p = P.get(k);
624
+ p !== void 0 && N.push(p);
625
625
  }
626
- for (const [C, S] of N) {
627
- if (!S) continue;
628
- const k = L.get(C);
629
- k === void 0 || De(k) || P.push(k);
626
+ for (const [k, p] of _) {
627
+ if (!p) continue;
628
+ const $ = P.get(k);
629
+ $ === void 0 || Te($) || N.push($);
630
630
  }
631
- return P;
631
+ return N;
632
632
  })(e, t, n);
633
633
  if (i.length === 0) return 0;
634
634
  if (i.length > 1) {
635
- const E = e._nodeMap, y = E.get(a.anchor.key), N = E.get(s.anchor.key);
636
- return y && N && !r._nodeMap.has(y.__key) && B(y) && y.__text.length === 1 && a.anchor.offset === 1 ? 2 : 0;
635
+ const w = e._nodeMap, y = w.get(a.anchor.key), _ = w.get(s.anchor.key);
636
+ return y && _ && !r._nodeMap.has(y.__key) && I(y) && y.__text.length === 1 && a.anchor.offset === 1 ? 2 : 0;
637
637
  }
638
- const l = i[0], u = r._nodeMap.get(l.__key);
639
- if (!B(u) || !B(l) || u.__mode !== l.__mode) return 0;
640
- const d = u.__text, m = l.__text;
641
- if (d === m) return 0;
642
- const h = a.anchor, x = s.anchor;
643
- if (h.key !== x.key || h.type !== "text") return 0;
644
- const v = h.offset, _ = x.offset, w = m.length - d.length;
645
- return w === 1 && _ === v - 1 ? 2 : w === -1 && _ === v + 1 ? 3 : w === -1 && _ === v ? 4 : 0;
638
+ const l = i[0], d = r._nodeMap.get(l.__key);
639
+ if (!I(d) || !I(l) || d.__mode !== l.__mode) return 0;
640
+ const u = d.__text, m = l.__text;
641
+ if (u === m) return 0;
642
+ const v = a.anchor, S = s.anchor;
643
+ if (v.key !== S.key || v.type !== "text") return 0;
644
+ const C = v.offset, x = S.offset, E = m.length - u.length;
645
+ return E === 1 && x === C - 1 ? 2 : E === -1 && x === C + 1 ? 3 : E === -1 && x === C ? 4 : 0;
646
646
  }
647
647
  function un(r, e) {
648
648
  let t = Date.now(), n = 0;
649
- return (o, a, s, i, l, u) => {
650
- const d = Date.now();
651
- if (u.has(te)) return n = 0, t = d, 2;
652
- const m = ln(o, a, i, l, r.isComposing()), h = (() => {
653
- const x = s === null || s.editor === r, v = u.has(It);
654
- if (!v && x && u.has(re)) return 0;
649
+ return (o, a, s, i, l, d) => {
650
+ const u = Date.now();
651
+ if (d.has(re)) return n = 0, t = u, 2;
652
+ const m = ln(o, a, i, l, r.isComposing()), v = (() => {
653
+ const S = s === null || s.editor === r, C = d.has(At);
654
+ if (!C && S && d.has(ne)) return 0;
655
655
  if (o === null) return 1;
656
- const _ = a._selection;
657
- if (!(i.size > 0 || l.size > 0)) return _ !== null ? 0 : 2;
658
- const w = typeof e == "number" ? e : e.peek();
659
- return v === !1 && m !== 0 && m === n && d < t + w && x || i.size === 1 && (function(E, y, N) {
660
- const L = y._nodeMap.get(E), P = N._nodeMap.get(E), C = y._selection, S = N._selection;
661
- return !(g(C) && g(S) && C.anchor.type === "element" && C.focus.type === "element" && S.anchor.type === "text" && S.focus.type === "text" || !B(L) || !B(P) || L.__parent !== P.__parent) && JSON.stringify(y.read(() => L.exportJSON())) === JSON.stringify(N.read(() => P.exportJSON()));
656
+ const x = a._selection;
657
+ if (!(i.size > 0 || l.size > 0)) return x !== null ? 0 : 2;
658
+ const E = typeof e == "number" ? e : e.peek();
659
+ return C === !1 && m !== 0 && m === n && u < t + E && S || i.size === 1 && (function(w, y, _) {
660
+ const P = y._nodeMap.get(w), N = _._nodeMap.get(w), k = y._selection, p = _._selection;
661
+ return !(h(k) && h(p) && k.anchor.type === "element" && k.focus.type === "element" && p.anchor.type === "text" && p.focus.type === "text" || !I(P) || !I(N) || P.__parent !== N.__parent) && JSON.stringify(y.read(() => P.exportJSON())) === JSON.stringify(_.read(() => N.exportJSON()));
662
662
  })(Array.from(i)[0], o, a) ? 0 : 1;
663
663
  })();
664
- return t = d, n = m, h;
664
+ return t = u, n = m, v;
665
665
  };
666
666
  }
667
- function Ne(r) {
667
+ function ke(r) {
668
668
  r.undoStack = [], r.redoStack = [], r.current = null;
669
669
  }
670
- function We(r, e, t) {
670
+ function Je(r, e, t) {
671
671
  const n = un(r, t);
672
- return U(r.registerCommand(Rt, () => ((function(a, s) {
672
+ return H(r.registerCommand(It, () => ((function(a, s) {
673
673
  const i = s.redoStack, l = s.undoStack;
674
674
  if (l.length !== 0) {
675
- const u = s.current, d = l.pop();
676
- u !== null && (i.push(u), a.dispatchCommand(J, !0)), l.length === 0 && a.dispatchCommand(j, !1), s.current = d || null, d && d.editor.setEditorState(d.editorState, { tag: te });
675
+ const d = s.current, u = l.pop();
676
+ d !== null && (i.push(d), a.dispatchCommand(J, !0)), l.length === 0 && a.dispatchCommand(j, !1), s.current = u || null, u && u.editor.setEditorState(u.editorState, { tag: re });
677
677
  }
678
- })(r, e), !0), c), r.registerCommand(Bt, () => ((function(a, s) {
678
+ })(r, e), !0), c), r.registerCommand(Rt, () => ((function(a, s) {
679
679
  const i = s.redoStack, l = s.undoStack;
680
680
  if (i.length !== 0) {
681
- const u = s.current;
682
- u !== null && (l.push(u), a.dispatchCommand(j, !0));
683
- const d = i.pop();
684
- i.length === 0 && a.dispatchCommand(J, !1), s.current = d || null, d && d.editor.setEditorState(d.editorState, { tag: te });
681
+ const d = s.current;
682
+ d !== null && (l.push(d), a.dispatchCommand(j, !0));
683
+ const u = i.pop();
684
+ i.length === 0 && a.dispatchCommand(J, !1), s.current = u || null, u && u.editor.setEditorState(u.editorState, { tag: re });
685
685
  }
686
- })(r, e), !0), c), r.registerCommand($t, () => (Ne(e), !1), c), r.registerCommand(Tt, () => (Ne(e), r.dispatchCommand(J, !1), r.dispatchCommand(j, !1), !0), c), r.registerUpdateListener(({ editorState: a, prevEditorState: s, dirtyLeaves: i, dirtyElements: l, tags: u }) => {
687
- const d = e.current, m = e.redoStack, h = e.undoStack, x = d === null ? null : d.editorState;
688
- if (d !== null && a === x) return;
689
- const v = n(s, a, d, i, l, u);
690
- if (v === 1) m.length !== 0 && (e.redoStack = [], r.dispatchCommand(J, !1)), d !== null && (h.push({ ...d }), r.dispatchCommand(j, !0));
691
- else if (v === 2) return;
686
+ })(r, e), !0), c), r.registerCommand(Bt, () => (ke(e), !1), c), r.registerCommand($t, () => (ke(e), r.dispatchCommand(J, !1), r.dispatchCommand(j, !1), !0), c), r.registerUpdateListener(({ editorState: a, prevEditorState: s, dirtyLeaves: i, dirtyElements: l, tags: d }) => {
687
+ const u = e.current, m = e.redoStack, v = e.undoStack, S = u === null ? null : u.editorState;
688
+ if (u !== null && a === S) return;
689
+ const C = n(s, a, u, i, l, d);
690
+ if (C === 1) m.length !== 0 && (e.redoStack = [], r.dispatchCommand(J, !1)), u !== null && (v.push({ ...u }), r.dispatchCommand(j, !0));
691
+ else if (C === 2) return;
692
692
  e.current = { editor: r, editorState: a };
693
693
  }));
694
694
  }
695
- function Je() {
695
+ function je() {
696
696
  return { current: null, redoStack: [], undoStack: [] };
697
697
  }
698
- const Q = ne({ build: (r, { delay: e, createInitialHistoryState: t, disabled: n }) => ae({ delay: e, disabled: n, historyState: t(r) }), config: Mt({ createInitialHistoryState: Je, delay: 300, disabled: typeof window > "u" }), name: "@lexical/history/History", register: (r, e, t) => {
698
+ const ee = oe({ build: (r, { delay: e, createInitialHistoryState: t, disabled: n }) => se({ delay: e, disabled: n, historyState: t(r) }), config: Ft({ createInitialHistoryState: je, delay: 300, disabled: typeof window > "u" }), name: "@lexical/history/History", register: (r, e, t) => {
699
699
  const n = t.getOutput();
700
- return Ae(() => n.disabled.value ? void 0 : We(r, n.historyState.value, n.delay));
700
+ return Me(() => n.disabled.value ? void 0 : Je(r, n.historyState.value, n.delay));
701
701
  } });
702
- ne({ dependencies: [At(Q, { createInitialHistoryState: () => {
702
+ oe({ dependencies: [Mt(ee, { createInitialHistoryState: () => {
703
703
  throw new Error("SharedHistory did not inherit parent history");
704
704
  }, disabled: !0 })], name: "@lexical/history/SharedHistory", register(r, e, t) {
705
- const { output: n } = t.getDependency(Q), o = (function(s) {
706
- return s ? Yt(s, Q.name) : null;
705
+ const { output: n } = t.getDependency(ee), o = (function(s) {
706
+ return s ? Gt(s, ee.name) : null;
707
707
  })(r._parentEditor);
708
708
  if (!o) return () => {
709
709
  };
710
710
  const a = o.output;
711
- return Ae(() => Gt(() => {
711
+ return Me(() => Vt(() => {
712
712
  n.delay.value = a.delay.value, n.historyState.value = a.historyState.value, n.disabled.value = a.disabled.value;
713
713
  }));
714
714
  } });
715
715
  function dn({ delay: r, externalHistoryState: e }) {
716
- const [t] = D();
716
+ const [t] = L();
717
717
  return (function(n, o, a = 1e3) {
718
- const s = Z(() => o || Je(), [o]);
719
- b(() => We(n, s, a), [a, n, s]);
718
+ const s = Z(() => o || je(), [o]);
719
+ b(() => Je(n, s, a), [a, n, s]);
720
720
  })(t, e, r), null;
721
721
  }
722
722
  function cn({ hasCellMerge: r = !0, hasCellBackgroundColor: e = !0, hasTabHandler: t = !0, hasHorizontalScroll: n = !1 }) {
723
- const [o] = D();
723
+ const [o] = L();
724
724
  return b(() => {
725
- ar(o) !== n && (sr(o, n), o.registerNodeTransform(Ke, () => {
725
+ sr(o) !== n && (ir(o, n), o.registerNodeTransform(ze, () => {
726
726
  })());
727
- }, [o, n]), b(() => ir(o), [o]), b(() => lr(o, t), [o, t]), b(() => {
728
- if (!r) return ur(o);
727
+ }, [o, n]), b(() => lr(o), [o]), b(() => ur(o, t), [o, t]), b(() => {
728
+ if (!r) return dr(o);
729
729
  }, [o, r]), b(() => {
730
- if (!e) return o.registerNodeTransform(ze, (a) => {
730
+ if (!e) return o.registerNodeTransform(Oe, (a) => {
731
731
  a.getBackgroundColor() !== null && a.setBackgroundColor(null);
732
732
  });
733
733
  }, [o, e, r]), null;
734
734
  }
735
735
  function fn({ editorRef: r }) {
736
- const [e] = D();
737
- return Ft.useEffect(() => {
736
+ const [e] = L();
737
+ return Kt.useEffect(() => {
738
738
  typeof r == "function" ? r(e) : typeof r == "object" && (r.current = e);
739
739
  }, [e]), null;
740
740
  }
741
- const je = 200, mn = ({
741
+ const qe = 200, mn = ({
742
742
  currentLanguage: r = "NL",
743
743
  initialValue: e = "",
744
744
  placeholder: t = "",
745
745
  label: n = "",
746
746
  info: o = "",
747
747
  required: a = !1,
748
- notValidatedText: s = "",
749
- maxHeightInRem: i = "20rem",
750
- maxWords: l = je,
748
+ notValid: s = !1,
749
+ notValidatedText: i = "",
750
+ maxHeightInRem: l = "20rem",
751
+ maxWords: d = qe,
751
752
  rteRef: u = null,
752
- onChange: d
753
+ onChange: m
753
754
  }) => {
754
- const { switchLanguage: m } = xr(), h = yr(), [x] = I(() => Le()), [v, _] = I(0), [w, E] = I(0), y = Ht(), N = {
755
+ const { switchLanguage: v } = xr(), S = yr(), [C] = A(() => Pe()), [x, E] = A(0), [w, y] = A(0), _ = Wt(), P = {
755
756
  html: {
756
757
  export: fr
757
758
  },
758
759
  namespace: "UvaRte",
759
- editor: x,
760
+ editor: C,
760
761
  theme: Er,
761
- onError(C) {
762
- throw C;
762
+ onError(p) {
763
+ throw p;
763
764
  },
764
- nodes: [Me, Fe, Re, Ie, ze, dr, Ke, _r],
765
- editorState: (C) => {
766
- const k = new DOMParser().parseFromString(e, "text/html"), H = tr(C, k);
767
- M().clear(), Te(H), Pe(null);
765
+ nodes: [Fe, Ke, Ie, Ae, Oe, cr, ze, _r],
766
+ editorState: (p) => {
767
+ const B = new DOMParser().parseFromString(e, "text/html"), Y = rr(p, B);
768
+ F().clear(), $e(Y), De(null);
768
769
  }
769
- }, L = (C) => C.trim().length === 0 ? 0 : C.split(" ").length, P = (C, S) => {
770
- C.read(() => {
771
- let k = "";
772
- _(L(M().getTextContent().replace(/\s+/g, " ").trim())), k = mr(rr(S)), k = pr(k), d(k);
770
+ }, N = (p) => p.trim().length === 0 ? 0 : p.split(" ").length, k = (p, $) => {
771
+ p.read(() => {
772
+ let B = "";
773
+ E(N(F().getTextContent().replace(/\s+/g, " ").trim())), B = mr(nr($)), B = pr(B), m(B);
773
774
  });
774
775
  };
775
776
  return b(() => {
776
- m(r.toLocaleLowerCase());
777
- }, [r, m]), b(() => {
778
- const C = e.replace(/<br\s*\/?>|&nbsp;/gi, " ").replace(/<\/?[^>]+(>|$)|&[a-z]+;/g, "").replace(/\s+/g, " ").trim();
779
- _(L(C));
780
- }, [e]), /* @__PURE__ */ A("div", { className: $.editor__container, children: [
781
- /* @__PURE__ */ A("div", { className: $.editor__header, children: [
777
+ v(r.toLocaleLowerCase());
778
+ }, [r, v]), b(() => {
779
+ const p = e.replace(/<br\s*\/?>|&nbsp;/gi, " ").replace(/<\/?[^>]+(>|$)|&[a-z]+;/g, "").replace(/\s+/g, " ").trim();
780
+ E(N(p));
781
+ }, [e]), /* @__PURE__ */ M("div", { className: T.editor__container, children: [
782
+ /* @__PURE__ */ M("div", { className: T.editor__header, children: [
782
783
  /* @__PURE__ */ f(wr, { label: n, info: o, required: a }),
783
- /* @__PURE__ */ A("div", { className: $["editor__header-word-count"], children: [
784
- /* @__PURE__ */ f("span", { className: cr({ [$["editor__header-word-count--alert"]]: v > l }), children: v }),
784
+ /* @__PURE__ */ M("div", { className: T["editor__header-word-count"], children: [
785
+ /* @__PURE__ */ f("span", { className: Ce({ [T["editor__header-word-count--alert"]]: x > d }), children: x }),
785
786
  " / ",
786
- l
787
+ d
787
788
  ] })
788
789
  ] }),
789
- /* @__PURE__ */ f("div", { className: $.editor, children: /* @__PURE__ */ A(kr, { initialConfig: N, children: [
790
- /* @__PURE__ */ f(vr, { editorScrollPosition: w }),
791
- /* @__PURE__ */ A("div", { className: $["editor__field-wrapper"], children: [
792
- /* @__PURE__ */ f(
793
- Hr,
794
- {
795
- contentEditable: /* @__PURE__ */ f(
796
- qr,
790
+ /* @__PURE__ */ f(
791
+ "div",
792
+ {
793
+ className: Ce(T.editor, {
794
+ [T["not-valid"]]: s
795
+ }),
796
+ children: /* @__PURE__ */ M(kr, { initialConfig: P, children: [
797
+ /* @__PURE__ */ f(vr, { editorScrollPosition: w }),
798
+ /* @__PURE__ */ M("div", { className: T["editor__field-wrapper"], children: [
799
+ /* @__PURE__ */ f(
800
+ Hr,
797
801
  {
798
- className: $.editor__field,
799
- "aria-label": h.common.rteAriaLabel,
800
- "aria-placeholder": t,
801
- title: h.common.rteTitle,
802
- placeholder: /* @__PURE__ */ f("div", { className: $.editor__placeholder, children: t }),
803
- spellCheck: !1,
804
- id: `${y}_rteEditor`,
805
- style: { height: `${i}`, maxHeight: `${i}` },
806
- onScroll: (C) => E(C.currentTarget.scrollTop)
802
+ contentEditable: /* @__PURE__ */ f(
803
+ qr,
804
+ {
805
+ className: T.editor__field,
806
+ "aria-label": S.common.rteAriaLabel,
807
+ "aria-placeholder": t,
808
+ title: S.common.rteTitle,
809
+ placeholder: /* @__PURE__ */ f("div", { className: T.editor__placeholder, children: t }),
810
+ spellCheck: !1,
811
+ id: `${_}_rteEditor`,
812
+ style: { height: `${l}`, maxHeight: `${l}` },
813
+ onScroll: (p) => y(p.currentTarget.scrollTop)
814
+ }
815
+ ),
816
+ placeholder: /* @__PURE__ */ f("div", { className: T.editor__placeholder, children: t }),
817
+ ErrorBoundary: Qr
807
818
  }
808
819
  ),
809
- placeholder: /* @__PURE__ */ f("div", { className: $.editor__placeholder, children: t }),
810
- ErrorBoundary: Qr
811
- }
812
- ),
813
- /* @__PURE__ */ f(cn, {}),
814
- /* @__PURE__ */ f(Jt, {}),
815
- /* @__PURE__ */ f(dn, {}),
816
- /* @__PURE__ */ f(rn, {}),
817
- /* @__PURE__ */ f(nn, { validateUrl: gr }),
818
- /* @__PURE__ */ f(an, { matchers: hr }),
819
- /* @__PURE__ */ f(sn, {}),
820
- /* @__PURE__ */ f(tn, { onChange: P }),
821
- /* @__PURE__ */ f(br, {}),
822
- u && /* @__PURE__ */ f(fn, { editorRef: u })
823
- ] })
824
- ] }) }),
825
- s !== "" && /* @__PURE__ */ f(Cr, { level: "error", feedback: s })
820
+ /* @__PURE__ */ f(cn, {}),
821
+ /* @__PURE__ */ f(jt, {}),
822
+ /* @__PURE__ */ f(dn, {}),
823
+ /* @__PURE__ */ f(rn, {}),
824
+ /* @__PURE__ */ f(nn, { validateUrl: gr }),
825
+ /* @__PURE__ */ f(an, { matchers: hr }),
826
+ /* @__PURE__ */ f(sn, {}),
827
+ /* @__PURE__ */ f(tn, { onChange: k }),
828
+ /* @__PURE__ */ f(br, {}),
829
+ u && /* @__PURE__ */ f(fn, { editorRef: u })
830
+ ] })
831
+ ] })
832
+ }
833
+ ),
834
+ i !== "" && /* @__PURE__ */ f(Cr, { level: "error", feedback: i })
826
835
  ] });
827
836
  }, io = ({
828
837
  currentLanguage: r = "NL",
@@ -831,9 +840,10 @@ const je = 200, mn = ({
831
840
  label: n = "",
832
841
  info: o = "",
833
842
  required: a = !1,
834
- notValidatedText: s = "",
835
- maxWords: i = je,
836
- rteRef: l,
843
+ notValid: s = !1,
844
+ notValidatedText: i = "",
845
+ maxWords: l = qe,
846
+ rteRef: d,
837
847
  onChange: u
838
848
  }) => /* @__PURE__ */ f(Sr, { children: /* @__PURE__ */ f(
839
849
  mn,
@@ -844,9 +854,10 @@ const je = 200, mn = ({
844
854
  label: n,
845
855
  info: o,
846
856
  required: a,
847
- notValidatedText: s,
848
- maxWords: i,
849
- rteRef: l,
857
+ notValid: s,
858
+ notValidatedText: i,
859
+ maxWords: l,
860
+ rteRef: d,
850
861
  onChange: u
851
862
  }
852
863
  ) });