@uva-glass/component-library 3.0.2 → 3.0.4

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 (120) hide show
  1. package/dist/{Lexical.prod-CQl7J8uU.js → Lexical.prod-CZAqLAjm.js} +32 -32
  2. package/dist/Lexical.prod-CZAqLAjm.js.map +1 -0
  3. package/dist/{LexicalClipboard.prod-C48GDxiy.js → LexicalClipboard.prod-B0GrUtzr.js} +16 -16
  4. package/dist/{LexicalClipboard.prod-C48GDxiy.js.map → LexicalClipboard.prod-B0GrUtzr.js.map} +1 -1
  5. package/dist/{LexicalComposerContext.prod-DxxjdrXB.js → LexicalComposerContext.prod-BCXERl09.js} +6 -7
  6. package/dist/{LexicalComposerContext.prod-DxxjdrXB.js.map → LexicalComposerContext.prod-BCXERl09.js.map} +1 -1
  7. package/dist/{LexicalLink.prod-D8-zZW0o.js → LexicalLink.prod-kqeQGYSo.js} +13 -13
  8. package/dist/LexicalLink.prod-kqeQGYSo.js.map +1 -0
  9. package/dist/{LexicalList.prod-B4_DTbPB.js → LexicalList.prod-BEKqHUO2.js} +10 -10
  10. package/dist/LexicalList.prod-BEKqHUO2.js.map +1 -0
  11. package/dist/{LexicalSelection.prod-BU3GAQB4.js → LexicalSelection.prod-B1DTqn9H.js} +14 -14
  12. package/dist/{LexicalSelection.prod-BU3GAQB4.js.map → LexicalSelection.prod-B1DTqn9H.js.map} +1 -1
  13. package/dist/{LexicalTable.prod-BvJxbarH.js → LexicalTable.prod-DtAMjSWg.js} +24 -24
  14. package/dist/{LexicalTable.prod-BvJxbarH.js.map → LexicalTable.prod-DtAMjSWg.js.map} +1 -1
  15. package/dist/{LexicalUtils.prod-D9KKqgU7.js → LexicalUtils.prod-C-NXnTzK.js} +3 -3
  16. package/dist/{LexicalUtils.prod-D9KKqgU7.js.map → LexicalUtils.prod-C-NXnTzK.js.map} +1 -1
  17. package/dist/{SortableProvider-RaH_ZXB3.js → SortableProvider-Ck_XnBVq.js} +10 -10
  18. package/dist/{SortableProvider-RaH_ZXB3.js.map → SortableProvider-Ck_XnBVq.js.map} +1 -1
  19. package/dist/{TablePlugin-CPEwD-wi.js → TablePlugin-DkL40qIf.js} +54 -55
  20. package/dist/{TablePlugin-CPEwD-wi.js.map → TablePlugin-DkL40qIf.js.map} +1 -1
  21. package/dist/__mocks__/fileMock.d.ts +2 -0
  22. package/dist/__mocks__/svgrMock.d.ts +3 -0
  23. package/dist/__mocks__/svgrMock.js +10 -0
  24. package/dist/__mocks__/svgrMock.js.map +1 -0
  25. package/dist/client-CTOhtEms.js +33 -0
  26. package/dist/client-CTOhtEms.js.map +1 -0
  27. package/dist/components/AccordionCard/AccordionCard.stories.js +1 -1
  28. package/dist/components/Buttons/Button.stories.js +2 -2
  29. package/dist/components/Buttons/LinkButton.stories.js +2 -2
  30. package/dist/components/Buttons/MenuButton.stories.js +2 -2
  31. package/dist/components/Checkbox/Checkbox.stories.js +1 -1
  32. package/dist/components/CheckboxButton/CheckboxButton.stories.js +1 -1
  33. package/dist/components/CheckboxButtonBar/CheckboxButtonBar.stories.js +1 -1
  34. package/dist/components/CheckboxTree/CheckboxTree.js +2 -2
  35. package/dist/components/CheckboxTree/CheckboxTree.stories.js +11 -11
  36. package/dist/components/Chip/Chip.stories.js +1 -1
  37. package/dist/components/Drawer/Drawer.stories.js +1 -1
  38. package/dist/components/FormInput/FormInput.js +3 -3
  39. package/dist/components/FormInput/FormInput.stories.js +1 -1
  40. package/dist/components/IconButton/IconButton.stories.js +1 -1
  41. package/dist/components/InputField/InputField.stories.js +3 -3
  42. package/dist/components/Label/Label.test.d.ts +0 -0
  43. package/dist/components/Label/Label.test.js +4257 -0
  44. package/dist/components/Label/Label.test.js.map +1 -0
  45. package/dist/components/MenuLink/MenuLink.d.ts +4 -1
  46. package/dist/components/MenuLink/MenuLink.js +12 -12
  47. package/dist/components/MenuLink/MenuLink.js.map +1 -1
  48. package/dist/components/MenuLink/MenuLink.stories.d.ts +3 -1
  49. package/dist/components/MenuLink/MenuLink.stories.js +12 -7
  50. package/dist/components/MenuLink/MenuLink.stories.js.map +1 -1
  51. package/dist/components/ModalDialog/ModalDialog.stories.js +1 -1
  52. package/dist/components/MultiSelect/MultiSelect.js +1 -1
  53. package/dist/components/MultiSelect/MultiSelect.stories.js +2 -2
  54. package/dist/components/MultiSelect/components/MultiSelectHeader.js +2 -2
  55. package/dist/components/MultiSelect/index.js +1 -1
  56. package/dist/components/OverlayCloseButton/OverlayCloseButton.stories.js +1 -1
  57. package/dist/components/OverlayStepBar/OverlayStepBar.js +2 -2
  58. package/dist/components/PeriodSelector/PeriodSelector.js +2 -2
  59. package/dist/components/PeriodSelector/PeriodSelector.stories.js +1 -1
  60. package/dist/components/ProgrammeCard/ProgrammeCard.stories.js +4 -4
  61. package/dist/components/Repeater/Repeater.stories.js +1 -1
  62. package/dist/components/RteEditor/EditorHeader/EditorHeader.js +2 -2
  63. package/dist/components/RteEditor/Plugins/BlockFormatPlugin/BlockFormatPlugin.js +2 -2
  64. package/dist/components/RteEditor/Plugins/HistoryPlugin/HistoryPlugin.js +4 -4
  65. package/dist/components/RteEditor/Plugins/LinkPlugin/AddLinkForm/AddLinkFrom.js +3 -3
  66. package/dist/components/RteEditor/Plugins/LinkPlugin/LinkContextMenu/LinkContextMenu.js +1 -1
  67. package/dist/components/RteEditor/Plugins/LinkPlugin/LinkPlugin.js +19 -19
  68. package/dist/components/RteEditor/Plugins/LinkPlugin/helpers.js +1 -1
  69. package/dist/components/RteEditor/Plugins/ListPlugin/ListPlugin.js +4 -4
  70. package/dist/components/RteEditor/Plugins/PasteHandlerPlugin/PasteHandlerPlugin.js +4 -4
  71. package/dist/components/RteEditor/Plugins/TablePlugin/AddTableFrom.js +2 -2
  72. package/dist/components/RteEditor/Plugins/TablePlugin/TableCellContextMenu/TableCellContextMenu.js +1 -1
  73. package/dist/components/RteEditor/Plugins/TablePlugin/TablePlugin.js +5 -5
  74. package/dist/components/RteEditor/Plugins/TablePlugin/helpers.js +15 -15
  75. package/dist/components/RteEditor/Plugins/TablePlugin/index.js +1 -1
  76. package/dist/components/RteEditor/Plugins/ToolbarPlugin/ToolbarPlugin.js +4 -4
  77. package/dist/components/RteEditor/Plugins/index.js +1 -1
  78. package/dist/components/RteEditor/Providers/LanguageProvider.js +3 -3
  79. package/dist/components/RteEditor/RteEditor.js +408 -408
  80. package/dist/components/RteEditor/RteEditor.js.map +1 -1
  81. package/dist/components/RteEditor/helpers.js +4 -4
  82. package/dist/components/RteEditor/hooks/components/Flyout.js +12 -13
  83. package/dist/components/RteEditor/hooks/components/Flyout.js.map +1 -1
  84. package/dist/components/SelectListbox/SelectListBox.stories.js +1 -1
  85. package/dist/components/SelectListbox/SelectListbox.js +8 -9
  86. package/dist/components/SelectListbox/SelectListbox.js.map +1 -1
  87. package/dist/components/SelectListbox/SelectProvider.js +3 -3
  88. package/dist/components/Sortable/Sortable.js +1 -1
  89. package/dist/components/Sortable/Sortable.stories.js +1 -1
  90. package/dist/components/Sortable/SortableProvider.js +1 -1
  91. package/dist/components/Sortable/actions.js +8 -8
  92. package/dist/components/Sortable/components/SortableContainer.js +1 -1
  93. package/dist/components/Sortable/components/SortableItem.js +1 -1
  94. package/dist/components/Spinner/Spinner.js +11 -12
  95. package/dist/components/Spinner/Spinner.js.map +1 -1
  96. package/dist/components/ToggleSwitch/ToggleSwitch.stories.js +1 -1
  97. package/dist/components/index.js +1 -1
  98. package/dist/{helpers-C_Mib4v3.js → helpers-DYmWlhgC.js} +15 -15
  99. package/dist/{helpers-C_Mib4v3.js.map → helpers-DYmWlhgC.js.map} +1 -1
  100. package/dist/index-BqHyOZsF.js +10322 -0
  101. package/dist/index-BqHyOZsF.js.map +1 -0
  102. package/dist/{index-Sh2oo6_C.js → index-DkNZhwJb.js} +399 -392
  103. package/dist/index-DkNZhwJb.js.map +1 -0
  104. package/dist/index.js +1 -1
  105. package/dist/react-18-CcyoHPTJ.js +38 -0
  106. package/dist/react-18-CcyoHPTJ.js.map +1 -0
  107. package/dist/setupTests.d.ts +0 -0
  108. package/dist/setupTests.js +1573 -0
  109. package/dist/setupTests.js.map +1 -0
  110. package/dist/storybook__react.d.js +538 -1657
  111. package/dist/storybook__react.d.js.map +1 -1
  112. package/dist/test-utils-CTqdUiUm.js +1126 -0
  113. package/dist/test-utils-CTqdUiUm.js.map +1 -0
  114. package/package.json +47 -28
  115. package/dist/Lexical.prod-CQl7J8uU.js.map +0 -1
  116. package/dist/LexicalLink.prod-D8-zZW0o.js.map +0 -1
  117. package/dist/LexicalList.prod-B4_DTbPB.js.map +0 -1
  118. package/dist/index-Sh2oo6_C.js.map +0 -1
  119. package/dist/react-18-C9Y1Flwa.js +0 -65
  120. package/dist/react-18-C9Y1Flwa.js.map +0 -1
@@ -1,22 +1,22 @@
1
- import { jsx as h, jsxs as K, Fragment as Pe } from "react/jsx-runtime";
2
- import { l as We, o as Je, u as P } from "../../LexicalComposerContext.prod-DxxjdrXB.js";
3
- import { ap as Te, a2 as A, V as Me, H as p, I as q, L as V, j as Xe, v as R, a as g, N as Ge, f as m, aq as Ye, a1 as Re, F as Ie, ar as Ze, B as Qe, ao as F, am as et, as as tt, at as nt, au as rt, d as ne, av as ot, aw as at, w as st, i as it, M as lt, k as ut, ax as ct, ay as fe, o as me, U as dt, R as re, T as ft, a6 as Oe, az as pe, D as mt, C as pt, S as gt, a5 as ge, z as ht, aA as Ct, aB as yt, aC as Et, ak as vt, m as wt, l as bt, aD as $t, p as St, K as _t, G as kt, a8 as xt, e as Nt, q as he, aE as Lt, E as Dt, aa as G, a9 as Y, aF as Pt, aG as Tt, ac as Mt, ab as Rt } from "../../Lexical.prod-CQl7J8uU.js";
1
+ import { jsx as h, jsxs as z, Fragment as Pe } from "react/jsx-runtime";
2
+ import { o as We, l as Je, u as P } from "../../LexicalComposerContext.prod-BCXERl09.js";
3
+ import { ap as Te, a2 as A, V as Me, H as p, U as q, L as V, j as Xe, v as R, a as g, N as Ye, f as m, aq as Ze, a1 as Re, e as Ge, F as Oe, ar as Qe, B as et, ao as I, al as tt, as as nt, at as rt, au as ot, d as ne, av as st, aw as at, T as it, i as lt, M as ut, l as ct, ax as dt, ay as fe, o as me, w as ft, s as re, t as mt, a5 as Fe, az as pe, p as pt, m as gt, S as ht, a4 as ge, k as Ct, aA as yt, aB as Et, aC as vt, ak as wt, C as bt, z as $t, aD as St, D as _t, r as kt, u as xt, a8 as Nt, q as he, aE as Lt, E as Dt, aa as Y, a9 as Z, aF as Pt, aG as Tt, ac as Mt, ab as Rt } from "../../Lexical.prod-CZAqLAjm.js";
4
4
  import * as oe from "react";
5
- import { useMemo as W, useLayoutEffect as j, useEffect as _, useState as I, useRef as Fe, Suspense as It, forwardRef as Ke, useCallback as Ot } from "react";
6
- import { N as U, c as z, o as Ft, r as de } from "../../LexicalUtils.prod-D9KKqgU7.js";
7
- import { flushSync as Kt, createPortal as zt } from "react-dom";
8
- import { N as Ce, O as ye, h as At, m as Bt } from "../../LexicalClipboard.prod-C48GDxiy.js";
9
- import { M as Ee, j as ve } from "../../LexicalSelection.prod-BU3GAQB4.js";
10
- import { V as ze, I as Ae, Z as jt } from "../../LexicalList.prod-B4_DTbPB.js";
11
- import { f as Be, N as we, x as ae, m as Ut, O as Ht } from "../../LexicalLink.prod-D8-zZW0o.js";
12
- import { a as qt, j as Vt, X as Wt, q as Jt, u as je, S as Xt, P as Gt } from "../../LexicalTable.prod-BvJxbarH.js";
13
- import { a as Yt, F as Zt, M as Qt } from "../../helpers-C_Mib4v3.js";
5
+ import { useMemo as W, useLayoutEffect as j, useEffect as _, useState as O, useRef as Ie, Suspense as Ot, forwardRef as ze, useCallback as Ft } from "react";
6
+ import { N as U, c as K, o as It, r as de } from "../../LexicalUtils.prod-C-NXnTzK.js";
7
+ import { flushSync as zt, createPortal as Kt } from "react-dom";
8
+ import { N as Ce, O as ye, h as At, m as Bt } from "../../LexicalClipboard.prod-B0GrUtzr.js";
9
+ import { M as Ee, j as ve } from "../../LexicalSelection.prod-B1DTqn9H.js";
10
+ import { V as Ke, I as Ae, Z as jt } from "../../LexicalList.prod-BEKqHUO2.js";
11
+ import { f as Be, N as we, x as se, m as Ut, O as Ht } from "../../LexicalLink.prod-kqeQGYSo.js";
12
+ import { a as qt, j as Vt, X as Wt, q as Jt, u as je, S as Xt, P as Yt } from "../../LexicalTable.prod-DtAMjSWg.js";
13
+ import { a as Zt, F as Gt, M as Qt } from "../../helpers-DYmWlhgC.js";
14
14
  import { c as en } from "../../clsx-OuTLNxxd.js";
15
15
  import { exportMap as tn, isStartingWithHtmlTag as nn, mergeBoldStrongTags as rn } from "./helpers.js";
16
16
  import { s as M } from "../../RteEditor.module-oFMKEW6f.js";
17
17
  import { ToolBarPlugin as on } from "./Plugins/ToolbarPlugin/ToolbarPlugin.js";
18
- import { useTranslation as an } from "./hooks/useTranslation.js";
19
- import "../../TablePlugin-CPEwD-wi.js";
18
+ import { useTranslation as sn } from "./hooks/useTranslation.js";
19
+ import "../../TablePlugin-DkL40qIf.js";
20
20
  import "./Plugins/LinkPlugin/LinkContextMenu/LinkContextMenu.js";
21
21
  import "./hooks/components/Flyout.js";
22
22
  import "../Buttons/Button.js";
@@ -27,7 +27,7 @@ import "@react-aria/dialog";
27
27
  import "@react-aria/focus";
28
28
  import "@react-aria/overlays";
29
29
  import "../OverlayCloseButton/OverlayCloseButton.js";
30
- import { FeedbackBox as sn } from "../FeedbackBox/FeedbackBox.js";
30
+ import { FeedbackBox as an } from "../FeedbackBox/FeedbackBox.js";
31
31
  import "../GridRow/GridRow.js";
32
32
  import "../IconButton/IconButton.js";
33
33
  import "../Input/Input.js";
@@ -36,15 +36,15 @@ import "react-router";
36
36
  import "../SelectListbox/SelectListbox.js";
37
37
  import "../SelectListbox/SelectProvider.js";
38
38
  import "../Sortable/components/SortableItem.js";
39
- import "../../SortableProvider-RaH_ZXB3.js";
39
+ import "../../SortableProvider-Ck_XnBVq.js";
40
40
  import { UvaTheme as ln } from "./UvaTheme/UvaTheme.js";
41
41
  import { EditorHeader as un } from "./EditorHeader/EditorHeader.js";
42
- import { useLanguage as cn, LanguageProvider as dn } from "./Providers/LanguageProvider.js";
42
+ import { LanguageProvider as cn, useLanguage as dn } from "./Providers/LanguageProvider.js";
43
43
  import { PasteHandlerPlugin as fn } from "./Plugins/PasteHandlerPlugin/PasteHandlerPlugin.js";
44
- const Ue = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0, mn = Ue ? j : _, Z = { tag: "history-merge" };
45
- function pn({ initialConfig: n, children: e }) {
46
- const t = W(() => {
47
- const { theme: o, namespace: a, nodes: r, onError: s, editorState: i, html: l } = n, u = Je(null, o), c = Te({ editable: n.editable, html: l, namespace: a, nodes: r, onError: (d) => s(d, c), theme: o });
44
+ const Ue = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0, mn = Ue ? j : _, G = { tag: "history-merge" };
45
+ function pn({ initialConfig: t, children: e }) {
46
+ const n = W(() => {
47
+ const { theme: o, namespace: s, nodes: r, onError: a, editorState: i, html: l } = t, u = We(null, o), c = Te({ editable: t.editable, html: l, namespace: s, nodes: r, onError: (d) => a(d, c), theme: o });
48
48
  return function(d, f) {
49
49
  if (f !== null) {
50
50
  if (f === void 0) d.update(() => {
@@ -55,63 +55,63 @@ function pn({ initialConfig: n, children: e }) {
55
55
  const w = Ue ? document.activeElement : null;
56
56
  (p() !== null || w !== null && w === d.getRootElement()) && y.select();
57
57
  }
58
- }, Z);
58
+ }, G);
59
59
  else if (f !== null) switch (typeof f) {
60
60
  case "string": {
61
61
  const C = d.parseEditorState(f);
62
- d.setEditorState(C, Z);
62
+ d.setEditorState(C, G);
63
63
  break;
64
64
  }
65
65
  case "object":
66
- d.setEditorState(f, Z);
66
+ d.setEditorState(f, G);
67
67
  break;
68
68
  case "function":
69
69
  d.update(() => {
70
70
  A().isEmpty() && f(d);
71
- }, Z);
71
+ }, G);
72
72
  }
73
73
  }
74
74
  }(c, i), [c, u];
75
75
  }, []);
76
76
  return mn(() => {
77
- const o = n.editable, [a] = t;
78
- a.setEditable(o === void 0 || o);
79
- }, []), h(We.Provider, { value: t, children: e });
77
+ const o = t.editable, [s] = n;
78
+ s.setEditable(o === void 0 || o);
79
+ }, []), h(Je.Provider, { value: n, children: e });
80
80
  }
81
81
  const gn = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0 ? j : _;
82
- function hn(n) {
83
- return { initialValueFn: () => n.isEditable(), subscribe: (e) => n.registerEditableListener(e) };
82
+ function hn(t) {
83
+ return { initialValueFn: () => t.isEditable(), subscribe: (e) => t.registerEditableListener(e) };
84
84
  }
85
85
  function Cn() {
86
- return function(n) {
87
- const [e] = P(), t = W(() => n(e), [e, n]), [o, a] = I(() => t.initialValueFn()), r = Fe(o);
86
+ return function(t) {
87
+ const [e] = P(), n = W(() => t(e), [e, t]), [o, s] = O(() => n.initialValueFn()), r = Ie(o);
88
88
  return gn(() => {
89
- const { initialValueFn: s, subscribe: i } = t, l = s();
90
- return r.current !== l && (r.current = l, a(l)), i((u) => {
91
- r.current = u, a(u);
89
+ const { initialValueFn: a, subscribe: i } = n, l = a();
90
+ return r.current !== l && (r.current = l, s(l)), i((u) => {
91
+ r.current = u, s(u);
92
92
  });
93
- }, [t, n]), o;
93
+ }, [n, t]), o;
94
94
  }(hn);
95
95
  }
96
96
  function yn() {
97
97
  return A().getTextContent();
98
98
  }
99
- function En(n, e = !0) {
100
- if (n) return !1;
101
- let t = yn();
102
- return e && (t = t.trim()), t === "";
103
- }
104
- function vn(n) {
105
- if (!En(n, !1)) return !1;
106
- const e = A().getChildren(), t = e.length;
107
- if (t > 1) return !1;
108
- for (let o = 0; o < t; o++) {
109
- const a = e[o];
110
- if (q(a)) return !1;
111
- if (V(a)) {
112
- if (!Xe(a) || a.__indent !== 0) return !1;
113
- const r = a.getChildren(), s = r.length;
114
- for (let i = 0; i < s; i++) {
99
+ function En(t, e = !0) {
100
+ if (t) return !1;
101
+ let n = yn();
102
+ return e && (n = n.trim()), n === "";
103
+ }
104
+ function vn(t) {
105
+ if (!En(t, !1)) return !1;
106
+ const e = A().getChildren(), n = e.length;
107
+ if (n > 1) return !1;
108
+ for (let o = 0; o < n; o++) {
109
+ const s = e[o];
110
+ if (q(s)) return !1;
111
+ if (V(s)) {
112
+ if (!Xe(s) || s.__indent !== 0) return !1;
113
+ const r = s.getChildren(), a = r.length;
114
+ for (let i = 0; i < a; i++) {
115
115
  const l = r[o];
116
116
  if (!R(l)) return !1;
117
117
  }
@@ -119,38 +119,38 @@ function vn(n) {
119
119
  }
120
120
  return !0;
121
121
  }
122
- function He(n) {
123
- return () => vn(n);
122
+ function He(t) {
123
+ return () => vn(t);
124
124
  }
125
- function wn(n) {
126
- return n.__esModule && Object.prototype.hasOwnProperty.call(n, "default") ? n.default : n;
125
+ function wn(t) {
126
+ return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
127
127
  }
128
- wn(function(n) {
128
+ wn(function(t) {
129
129
  const e = new URLSearchParams();
130
- e.append("code", n);
131
- for (let t = 1; t < arguments.length; t++) e.append("v", arguments[t]);
132
- throw Error(`Minified Lexical error #${n}; visit https://lexical.dev/docs/error?${e} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`);
130
+ e.append("code", t);
131
+ for (let n = 1; n < arguments.length; n++) e.append("v", arguments[n]);
132
+ throw Error(`Minified Lexical error #${t}; visit https://lexical.dev/docs/error?${e} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`);
133
133
  });
134
- function bn(n) {
135
- const e = window.location.origin, t = (o) => {
134
+ function bn(t) {
135
+ const e = window.location.origin, n = (o) => {
136
136
  if (o.origin !== e) return;
137
- const a = n.getRootElement();
138
- if (document.activeElement !== a) return;
137
+ const s = t.getRootElement();
138
+ if (document.activeElement !== s) return;
139
139
  const r = o.data;
140
140
  if (typeof r == "string") {
141
- let s;
141
+ let a;
142
142
  try {
143
- s = JSON.parse(r);
143
+ a = JSON.parse(r);
144
144
  } catch {
145
145
  return;
146
146
  }
147
- if (s && s.protocol === "nuanria_messaging" && s.type === "request") {
148
- const i = s.payload;
147
+ if (a && a.protocol === "nuanria_messaging" && a.type === "request") {
148
+ const i = a.payload;
149
149
  if (i && i.functionId === "makeChanges") {
150
150
  const l = i.args;
151
151
  if (l) {
152
152
  const [u, c, d, f, C, y] = l;
153
- n.update(() => {
153
+ t.update(() => {
154
154
  const w = p();
155
155
  if (g(w)) {
156
156
  const k = w.anchor;
@@ -168,232 +168,232 @@ function bn(n) {
168
168
  }
169
169
  }
170
170
  };
171
- return window.addEventListener("message", t, !0), () => {
172
- window.removeEventListener("message", t, !0);
171
+ return window.addEventListener("message", n, !0), () => {
172
+ window.removeEventListener("message", n, !0);
173
173
  };
174
174
  }
175
- function be(n, e) {
175
+ function be(t, e) {
176
176
  if (document.caretRangeFromPoint !== void 0) {
177
- const t = document.caretRangeFromPoint(n, e);
178
- return t === null ? null : { node: t.startContainer, offset: t.startOffset };
177
+ const n = document.caretRangeFromPoint(t, e);
178
+ return n === null ? null : { node: n.startContainer, offset: n.startOffset };
179
179
  }
180
180
  if (document.caretPositionFromPoint !== "undefined") {
181
- const t = document.caretPositionFromPoint(n, e);
182
- return t === null ? null : { node: t.offsetNode, offset: t.offset };
181
+ const n = document.caretPositionFromPoint(t, e);
182
+ return n === null ? null : { node: n.offsetNode, offset: n.offset };
183
183
  }
184
184
  return null;
185
185
  }
186
- const H = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0, $n = H && "documentMode" in document ? document.documentMode : null, Sn = !(!H || !("InputEvent" in window) || $n) && "getTargetRanges" in new window.InputEvent("input"), _n = H && /Version\/[\d.]+.*Safari/.test(navigator.userAgent), $e = H && /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream, kn = H && /^(?=.*Chrome).*/i.test(navigator.userAgent), xn = H && /AppleWebKit\/[\d.]+/.test(navigator.userAgent) && !kn, Se = Nt();
187
- function Q(n) {
186
+ const H = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0, $n = H && "documentMode" in document ? document.documentMode : null, Sn = !(!H || !("InputEvent" in window) || $n) && "getTargetRanges" in new window.InputEvent("input"), _n = H && /Version\/[\d.]+.*Safari/.test(navigator.userAgent), $e = H && /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream, kn = H && /^(?=.*Chrome).*/i.test(navigator.userAgent), xn = H && /AppleWebKit\/[\d.]+/.test(navigator.userAgent) && !kn, Se = Ge();
187
+ function Q(t) {
188
188
  let e = null;
189
- if (z(n, DragEvent) ? e = n.dataTransfer : z(n, ClipboardEvent) && (e = n.clipboardData), e === null) return [!1, [], !1];
190
- const t = e.types, o = t.includes("Files"), a = t.includes("text/html") || t.includes("text/plain");
191
- return [o, Array.from(e.files), a];
189
+ if (K(t, DragEvent) ? e = t.dataTransfer : K(t, ClipboardEvent) && (e = t.clipboardData), e === null) return [!1, [], !1];
190
+ const n = e.types, o = n.includes("Files"), s = n.includes("text/html") || n.includes("text/plain");
191
+ return [o, Array.from(e.files), s];
192
192
  }
193
- function _e(n) {
193
+ function _e(t) {
194
194
  const e = p();
195
195
  if (!g(e)) return !1;
196
- const t = /* @__PURE__ */ new Set(), o = e.getNodes();
197
- for (let a = 0; a < o.length; a++) {
198
- const r = o[a], s = r.getKey();
199
- if (t.has(s)) continue;
196
+ const n = /* @__PURE__ */ new Set(), o = e.getNodes();
197
+ for (let s = 0; s < o.length; s++) {
198
+ const r = o[s], a = r.getKey();
199
+ if (n.has(a)) continue;
200
200
  const i = de(r, (u) => V(u) && !u.isInline());
201
201
  if (i === null) continue;
202
202
  const l = i.getKey();
203
- i.canIndent() && !t.has(l) && (t.add(l), n(i));
203
+ i.canIndent() && !n.has(l) && (n.add(l), t(i));
204
204
  }
205
- return t.size > 0;
205
+ return n.size > 0;
206
206
  }
207
- function ee(n) {
208
- const e = ne(n);
207
+ function ee(t) {
208
+ const e = ne(t);
209
209
  return q(e);
210
210
  }
211
- function se(n) {
212
- for (const e of ["lowercase", "uppercase", "capitalize"]) n.hasFormat(e) && n.toggleFormat(e);
213
- }
214
- function Nn(n) {
215
- return U(n.registerCommand(xt, (e) => {
216
- const t = p();
217
- return !!F(t) && (t.clear(), !0);
218
- }, 0), n.registerCommand(re, (e) => {
219
- const t = p();
220
- return !!g(t) && (t.deleteCharacter(e), !0);
221
- }, m), n.registerCommand(kt, (e) => {
222
- const t = p();
223
- return !!g(t) && (t.deleteWord(e), !0);
224
- }, m), n.registerCommand(_t, (e) => {
225
- const t = p();
226
- return !!g(t) && (t.deleteLine(e), !0);
227
- }, m), n.registerCommand(St, (e) => {
228
- const t = p();
229
- if (typeof e == "string") t !== null && t.insertText(e);
211
+ function ae(t) {
212
+ for (const e of ["lowercase", "uppercase", "capitalize"]) t.hasFormat(e) && t.toggleFormat(e);
213
+ }
214
+ function Nn(t) {
215
+ return U(t.registerCommand(Nt, (e) => {
216
+ const n = p();
217
+ return !!I(n) && (n.clear(), !0);
218
+ }, 0), t.registerCommand(re, (e) => {
219
+ const n = p();
220
+ return !!g(n) && (n.deleteCharacter(e), !0);
221
+ }, m), t.registerCommand(xt, (e) => {
222
+ const n = p();
223
+ return !!g(n) && (n.deleteWord(e), !0);
224
+ }, m), t.registerCommand(kt, (e) => {
225
+ const n = p();
226
+ return !!g(n) && (n.deleteLine(e), !0);
227
+ }, m), t.registerCommand(_t, (e) => {
228
+ const n = p();
229
+ if (typeof e == "string") n !== null && n.insertText(e);
230
230
  else {
231
- if (t === null) return !1;
231
+ if (n === null) return !1;
232
232
  const o = e.dataTransfer;
233
- if (o != null) Ce(o, t, n);
234
- else if (g(t)) {
235
- const a = e.data;
236
- return a && t.insertText(a), !0;
233
+ if (o != null) Ce(o, n, t);
234
+ else if (g(n)) {
235
+ const s = e.data;
236
+ return s && n.insertText(s), !0;
237
237
  }
238
238
  }
239
239
  return !0;
240
- }, m), n.registerCommand($t, () => {
240
+ }, m), t.registerCommand(St, () => {
241
241
  const e = p();
242
242
  return !!g(e) && (e.removeText(), !0);
243
- }, m), n.registerCommand(bt, (e) => {
244
- const t = p();
245
- return !!g(t) && (t.formatText(e), !0);
246
- }, m), n.registerCommand(wt, (e) => {
247
- const t = p();
248
- if (!g(t) && !F(t)) return !1;
249
- const o = t.getNodes();
250
- for (const a of o) {
251
- const r = de(a, (s) => V(s) && !s.isInline());
243
+ }, m), t.registerCommand($t, (e) => {
244
+ const n = p();
245
+ return !!g(n) && (n.formatText(e), !0);
246
+ }, m), t.registerCommand(bt, (e) => {
247
+ const n = p();
248
+ if (!g(n) && !I(n)) return !1;
249
+ const o = n.getNodes();
250
+ for (const s of o) {
251
+ const r = de(s, (a) => V(a) && !a.isInline());
252
252
  r !== null && r.setFormat(e);
253
253
  }
254
254
  return !0;
255
- }, m), n.registerCommand(fe, (e) => {
256
- const t = p();
257
- return !!g(t) && (t.insertLineBreak(e), !0);
258
- }, m), n.registerCommand(me, () => {
255
+ }, m), t.registerCommand(fe, (e) => {
256
+ const n = p();
257
+ return !!g(n) && (n.insertLineBreak(e), !0);
258
+ }, m), t.registerCommand(me, () => {
259
259
  const e = p();
260
260
  return !!g(e) && (e.insertParagraph(), !0);
261
- }, m), n.registerCommand(yt, () => (Et([vt()]), !0), m), n.registerCommand(Ct, () => _e((e) => {
262
- const t = e.getIndent();
263
- e.setIndent(t + 1);
264
- }), m), n.registerCommand(pe, () => _e((e) => {
265
- const t = e.getIndent();
266
- t > 0 && e.setIndent(t - 1);
267
- }), m), n.registerCommand(ht, (e) => {
268
- const t = p();
269
- if (F(t) && !ee(e.target)) {
270
- const o = t.getNodes();
261
+ }, m), t.registerCommand(Et, () => (vt([wt()]), !0), m), t.registerCommand(yt, () => _e((e) => {
262
+ const n = e.getIndent();
263
+ e.setIndent(n + 1);
264
+ }), m), t.registerCommand(pe, () => _e((e) => {
265
+ const n = e.getIndent();
266
+ n > 0 && e.setIndent(n - 1);
267
+ }), m), t.registerCommand(Ct, (e) => {
268
+ const n = p();
269
+ if (I(n) && !ee(e.target)) {
270
+ const o = n.getNodes();
271
271
  if (o.length > 0) return o[0].selectPrevious(), !0;
272
- } else if (g(t)) {
273
- const o = ge(t.focus, !0);
272
+ } else if (g(n)) {
273
+ const o = ge(n.focus, !0);
274
274
  if (!e.shiftKey && q(o) && !o.isIsolated() && !o.isInline()) return o.selectPrevious(), e.preventDefault(), !0;
275
275
  }
276
276
  return !1;
277
- }, m), n.registerCommand(gt, (e) => {
278
- const t = p();
279
- if (F(t)) {
280
- const o = t.getNodes();
277
+ }, m), t.registerCommand(ht, (e) => {
278
+ const n = p();
279
+ if (I(n)) {
280
+ const o = n.getNodes();
281
281
  if (o.length > 0) return o[0].selectNext(0, 0), !0;
282
- } else if (g(t)) {
283
- if (function(a) {
284
- const r = a.focus;
282
+ } else if (g(n)) {
283
+ if (function(s) {
284
+ const r = s.focus;
285
285
  return r.key === "root" && r.offset === A().getChildrenSize();
286
- }(t)) return e.preventDefault(), !0;
287
- const o = ge(t.focus, !1);
286
+ }(n)) return e.preventDefault(), !0;
287
+ const o = ge(n.focus, !1);
288
288
  if (!e.shiftKey && q(o) && !o.isIsolated() && !o.isInline()) return o.selectNext(), e.preventDefault(), !0;
289
289
  }
290
290
  return !1;
291
- }, m), n.registerCommand(pt, (e) => {
292
- const t = p();
293
- if (F(t)) {
294
- const o = t.getNodes();
291
+ }, m), t.registerCommand(gt, (e) => {
292
+ const n = p();
293
+ if (I(n)) {
294
+ const o = n.getNodes();
295
295
  if (o.length > 0) return e.preventDefault(), o[0].selectPrevious(), !0;
296
296
  }
297
- if (!g(t)) return !1;
298
- if (Ee(t, !0)) {
297
+ if (!g(n)) return !1;
298
+ if (Ee(n, !0)) {
299
299
  const o = e.shiftKey;
300
- return e.preventDefault(), ve(t, o, !0), !0;
300
+ return e.preventDefault(), ve(n, o, !0), !0;
301
301
  }
302
302
  return !1;
303
- }, m), n.registerCommand(mt, (e) => {
304
- const t = p();
305
- if (F(t) && !ee(e.target)) {
306
- const a = t.getNodes();
307
- if (a.length > 0) return e.preventDefault(), a[0].selectNext(0, 0), !0;
303
+ }, m), t.registerCommand(pt, (e) => {
304
+ const n = p();
305
+ if (I(n) && !ee(e.target)) {
306
+ const s = n.getNodes();
307
+ if (s.length > 0) return e.preventDefault(), s[0].selectNext(0, 0), !0;
308
308
  }
309
- if (!g(t)) return !1;
309
+ if (!g(n)) return !1;
310
310
  const o = e.shiftKey;
311
- return !!Ee(t, !1) && (e.preventDefault(), ve(t, o, !1), !0);
312
- }, m), n.registerCommand(ft, (e) => {
311
+ return !!Ee(n, !1) && (e.preventDefault(), ve(n, o, !1), !0);
312
+ }, m), t.registerCommand(mt, (e) => {
313
313
  if (ee(e.target)) return !1;
314
- const t = p();
315
- if (!g(t)) return !1;
316
- const { anchor: o } = t, a = o.getNode();
317
- return t.isCollapsed() && o.offset === 0 && !Oe(a) && Ft(a).getIndent() > 0 ? (e.preventDefault(), n.dispatchCommand(pe, void 0)) : (!$e || navigator.language !== "ko-KR") && (e.preventDefault(), n.dispatchCommand(re, !0));
318
- }, m), n.registerCommand(dt, (e) => {
314
+ const n = p();
315
+ if (!g(n)) return !1;
316
+ const { anchor: o } = n, s = o.getNode();
317
+ return n.isCollapsed() && o.offset === 0 && !Fe(s) && It(s).getIndent() > 0 ? (e.preventDefault(), t.dispatchCommand(pe, void 0)) : (!$e || navigator.language !== "ko-KR") && (e.preventDefault(), t.dispatchCommand(re, !0));
318
+ }, m), t.registerCommand(ft, (e) => {
319
319
  if (ee(e.target)) return !1;
320
- const t = p();
321
- return !!g(t) && (e.preventDefault(), n.dispatchCommand(re, !1));
322
- }, m), n.registerCommand(ct, (e) => {
323
- const t = p();
324
- if (!g(t)) return !1;
325
- if (se(t), e !== null) {
320
+ const n = p();
321
+ return !!g(n) && (e.preventDefault(), t.dispatchCommand(re, !1));
322
+ }, m), t.registerCommand(dt, (e) => {
323
+ const n = p();
324
+ if (!g(n)) return !1;
325
+ if (ae(n), e !== null) {
326
326
  if (($e || _n || xn) && Sn) return !1;
327
- if (e.preventDefault(), e.shiftKey) return n.dispatchCommand(fe, !1);
327
+ if (e.preventDefault(), e.shiftKey) return t.dispatchCommand(fe, !1);
328
328
  }
329
- return n.dispatchCommand(me, void 0);
330
- }, m), n.registerCommand(ut, () => {
329
+ return t.dispatchCommand(me, void 0);
330
+ }, m), t.registerCommand(ct, () => {
331
331
  const e = p();
332
- return !!g(e) && (n.blur(), !0);
333
- }, m), n.registerCommand(at, (e) => {
334
- const [, t] = Q(e);
335
- if (t.length > 0) {
336
- const a = be(e.clientX, e.clientY);
337
- if (a !== null) {
338
- const { offset: r, node: s } = a, i = ne(s);
332
+ return !!g(e) && (t.blur(), !0);
333
+ }, m), t.registerCommand(at, (e) => {
334
+ const [, n] = Q(e);
335
+ if (n.length > 0) {
336
+ const s = be(e.clientX, e.clientY);
337
+ if (s !== null) {
338
+ const { offset: r, node: a } = s, i = ne(a);
339
339
  if (i !== null) {
340
- const l = st();
340
+ const l = it();
341
341
  if (R(i)) l.anchor.set(i.getKey(), r, "text"), l.focus.set(i.getKey(), r, "text");
342
342
  else {
343
343
  const c = i.getParentOrThrow().getKey(), d = i.getIndexWithinParent() + 1;
344
344
  l.anchor.set(c, d, "element"), l.focus.set(c, d, "element");
345
345
  }
346
- const u = it(l);
347
- lt(u);
346
+ const u = lt(l);
347
+ ut(u);
348
348
  }
349
- n.dispatchCommand(Se, t);
349
+ t.dispatchCommand(Se, n);
350
350
  }
351
351
  return e.preventDefault(), !0;
352
352
  }
353
353
  const o = p();
354
354
  return !!g(o);
355
- }, m), n.registerCommand(ot, (e) => {
356
- const [t] = Q(e), o = p();
357
- return !(t && !g(o));
358
- }, m), n.registerCommand(rt, (e) => {
359
- const [t] = Q(e), o = p();
360
- if (t && !g(o)) return !1;
361
- const a = be(e.clientX, e.clientY);
362
- if (a !== null) {
363
- const r = ne(a.node);
355
+ }, m), t.registerCommand(st, (e) => {
356
+ const [n] = Q(e), o = p();
357
+ return !(n && !g(o));
358
+ }, m), t.registerCommand(ot, (e) => {
359
+ const [n] = Q(e), o = p();
360
+ if (n && !g(o)) return !1;
361
+ const s = be(e.clientX, e.clientY);
362
+ if (s !== null) {
363
+ const r = ne(s.node);
364
364
  q(r) && e.preventDefault();
365
365
  }
366
366
  return !0;
367
- }, m), n.registerCommand(tt, () => (nt(), !0), m), n.registerCommand(et, (e) => (ye(n, z(e, ClipboardEvent) ? e : null), !0), m), n.registerCommand(Qe, (e) => (async function(t, o) {
368
- await ye(o, z(t, ClipboardEvent) ? t : null), o.update(() => {
369
- const a = p();
370
- g(a) ? a.removeText() : F(a) && a.getNodes().forEach((r) => r.remove());
367
+ }, m), t.registerCommand(nt, () => (rt(), !0), m), t.registerCommand(tt, (e) => (ye(t, K(e, ClipboardEvent) ? e : null), !0), m), t.registerCommand(et, (e) => (async function(n, o) {
368
+ await ye(o, K(n, ClipboardEvent) ? n : null), o.update(() => {
369
+ const s = p();
370
+ g(s) ? s.removeText() : I(s) && s.getNodes().forEach((r) => r.remove());
371
371
  });
372
- }(e, n), !0), m), n.registerCommand(Re, (e) => {
373
- const [, t, o] = Q(e);
374
- return t.length > 0 && !o ? (n.dispatchCommand(Se, t), !0) : Ie(e.target) && Ze(e.target) ? !1 : p() !== null && (function(a, r) {
375
- a.preventDefault(), r.update(() => {
376
- const s = p(), i = z(a, InputEvent) || z(a, KeyboardEvent) ? null : a.clipboardData;
377
- i != null && s !== null && Ce(i, s, r);
372
+ }(e, t), !0), m), t.registerCommand(Re, (e) => {
373
+ const [, n, o] = Q(e);
374
+ return n.length > 0 && !o ? (t.dispatchCommand(Se, n), !0) : Oe(e.target) && Qe(e.target) ? !1 : p() !== null && (function(s, r) {
375
+ s.preventDefault(), r.update(() => {
376
+ const a = p(), i = K(s, InputEvent) || K(s, KeyboardEvent) ? null : s.clipboardData;
377
+ i != null && a !== null && Ce(i, a, r);
378
378
  }, { tag: "paste" });
379
- }(e, n), !0);
380
- }, m), n.registerCommand(Ye, (e) => {
381
- const t = p();
382
- return g(t) && se(t), !1;
383
- }, m), n.registerCommand(Ge, (e) => {
384
- const t = p();
385
- return g(t) && se(t), !1;
379
+ }(e, t), !0);
380
+ }, m), t.registerCommand(Ze, (e) => {
381
+ const n = p();
382
+ return g(n) && ae(n), !1;
383
+ }, m), t.registerCommand(Ye, (e) => {
384
+ const n = p();
385
+ return g(n) && ae(n), !1;
386
386
  }, m));
387
387
  }
388
388
  const ie = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0 ? j : _;
389
- function ke(n) {
390
- return n.getEditorState().read(He(n.isComposing()));
389
+ function ke(t) {
390
+ return t.getEditorState().read(He(t.isComposing()));
391
391
  }
392
- function Ln({ contentEditable: n, placeholder: e = null, ErrorBoundary: t }) {
393
- const [o] = P(), a = function(r, s) {
394
- const [i, l] = I(() => r.getDecorators());
392
+ function Ln({ contentEditable: t, placeholder: e = null, ErrorBoundary: n }) {
393
+ const [o] = P(), s = function(r, a) {
394
+ const [i, l] = O(() => r.getDecorators());
395
395
  return ie(() => r.registerDecoratorListener((u) => {
396
- Kt(() => {
396
+ zt(() => {
397
397
  l(u);
398
398
  });
399
399
  }), [r]), _(() => {
@@ -401,108 +401,108 @@ function Ln({ contentEditable: n, placeholder: e = null, ErrorBoundary: t }) {
401
401
  }, [r]), W(() => {
402
402
  const u = [], c = Object.keys(i);
403
403
  for (let d = 0; d < c.length; d++) {
404
- const f = c[d], C = h(s, { onError: (w) => r._onError(w), children: h(It, { fallback: null, children: i[f] }) }), y = r.getElementByKey(f);
405
- y !== null && u.push(zt(C, y, f));
404
+ const f = c[d], C = h(a, { onError: (w) => r._onError(w), children: h(Ot, { fallback: null, children: i[f] }) }), y = r.getElementByKey(f);
405
+ y !== null && u.push(Kt(C, y, f));
406
406
  }
407
407
  return u;
408
- }, [s, i, r]);
409
- }(o, t);
408
+ }, [a, i, r]);
409
+ }(o, n);
410
410
  return function(r) {
411
411
  ie(() => U(Nn(r), bn(r)), [r]);
412
- }(o), K(Pe, { children: [n, h(Dn, { content: e }), a] });
412
+ }(o), z(Pe, { children: [t, h(Dn, { content: e }), s] });
413
413
  }
414
- function Dn({ content: n }) {
415
- const [e] = P(), t = function(a) {
416
- const [r, s] = I(() => ke(a));
414
+ function Dn({ content: t }) {
415
+ const [e] = P(), n = function(s) {
416
+ const [r, a] = O(() => ke(s));
417
417
  return ie(() => {
418
418
  function i() {
419
- const l = ke(a);
420
- s(l);
419
+ const l = ke(s);
420
+ a(l);
421
421
  }
422
- return i(), U(a.registerUpdateListener(() => {
422
+ return i(), U(s.registerUpdateListener(() => {
423
423
  i();
424
- }), a.registerEditableListener(() => {
424
+ }), s.registerEditableListener(() => {
425
425
  i();
426
426
  }));
427
- }, [a]), r;
427
+ }, [s]), r;
428
428
  }(e), o = Cn();
429
- return t ? typeof n == "function" ? n(o) : n : null;
429
+ return n ? typeof t == "function" ? t(o) : t : null;
430
430
  }
431
431
  const qe = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0 ? j : _;
432
- function Pn({ editor: n, ariaActiveDescendant: e, ariaAutoComplete: t, ariaControls: o, ariaDescribedBy: a, ariaErrorMessage: r, ariaExpanded: s, ariaInvalid: i, ariaLabel: l, ariaLabelledBy: u, ariaMultiline: c, ariaOwns: d, ariaRequired: f, autoCapitalize: C, className: y, id: w, role: k = "textbox", spellCheck: E = !0, style: v, tabIndex: $, "data-testid": x, ...b }, N) {
433
- const [S, T] = I(n.isEditable()), O = Ot((L) => {
434
- L && L.ownerDocument && L.ownerDocument.defaultView ? n.setRootElement(L) : n.setRootElement(null);
435
- }, [n]), B = W(() => /* @__PURE__ */ function(...L) {
432
+ function Pn({ editor: t, ariaActiveDescendant: e, ariaAutoComplete: n, ariaControls: o, ariaDescribedBy: s, ariaErrorMessage: r, ariaExpanded: a, ariaInvalid: i, ariaLabel: l, ariaLabelledBy: u, ariaMultiline: c, ariaOwns: d, ariaRequired: f, autoCapitalize: C, className: y, id: w, role: k = "textbox", spellCheck: E = !0, style: v, tabIndex: $, "data-testid": x, ...b }, N) {
433
+ const [S, T] = O(t.isEditable()), F = Ft((L) => {
434
+ L && L.ownerDocument && L.ownerDocument.defaultView ? t.setRootElement(L) : t.setRootElement(null);
435
+ }, [t]), B = W(() => /* @__PURE__ */ function(...L) {
436
436
  return (J) => {
437
437
  L.forEach((X) => {
438
438
  typeof X == "function" ? X(J) : X != null && (X.current = J);
439
439
  });
440
440
  };
441
- }(N, O), [O, N]);
442
- return qe(() => (T(n.isEditable()), n.registerEditableListener((L) => {
441
+ }(N, F), [F, N]);
442
+ return qe(() => (T(t.isEditable()), t.registerEditableListener((L) => {
443
443
  T(L);
444
- })), [n]), h("div", { "aria-activedescendant": S ? e : void 0, "aria-autocomplete": S ? t : "none", "aria-controls": S ? o : void 0, "aria-describedby": a, ...r != null ? { "aria-errormessage": r } : {}, "aria-expanded": S && k === "combobox" ? !!s : void 0, ...i != null ? { "aria-invalid": i } : {}, "aria-label": l, "aria-labelledby": u, "aria-multiline": c, "aria-owns": S ? d : void 0, "aria-readonly": !S || void 0, "aria-required": f, autoCapitalize: C, className: y, contentEditable: S, "data-testid": x, id: w, ref: B, role: S ? k : void 0, spellCheck: E, style: v, tabIndex: $, ...b });
444
+ })), [t]), h("div", { "aria-activedescendant": S ? e : void 0, "aria-autocomplete": S ? n : "none", "aria-controls": S ? o : void 0, "aria-describedby": s, ...r != null ? { "aria-errormessage": r } : {}, "aria-expanded": S && k === "combobox" ? !!a : void 0, ...i != null ? { "aria-invalid": i } : {}, "aria-label": l, "aria-labelledby": u, "aria-multiline": c, "aria-owns": S ? d : void 0, "aria-readonly": !S || void 0, "aria-required": f, autoCapitalize: C, className: y, contentEditable: S, "data-testid": x, id: w, ref: B, role: S ? k : void 0, spellCheck: E, style: v, tabIndex: $, ...b });
445
445
  }
446
- const Tn = Ke(Pn);
447
- function xe(n) {
448
- return n.getEditorState().read(He(n.isComposing()));
446
+ const Tn = ze(Pn);
447
+ function xe(t) {
448
+ return t.getEditorState().read(He(t.isComposing()));
449
449
  }
450
- const Mn = Ke(Rn);
451
- function Rn(n, e) {
452
- const { placeholder: t, ...o } = n, [a] = P();
453
- return K(Pe, { children: [h(Tn, { editor: a, ...o, ref: e }), t != null && h(In, { editor: a, content: t })] });
450
+ const Mn = ze(Rn);
451
+ function Rn(t, e) {
452
+ const { placeholder: n, ...o } = t, [s] = P();
453
+ return z(Pe, { children: [h(Tn, { editor: s, ...o, ref: e }), n != null && h(On, { editor: s, content: n })] });
454
454
  }
455
- function In({ content: n, editor: e }) {
456
- const t = function(s) {
457
- const [i, l] = I(() => xe(s));
455
+ function On({ content: t, editor: e }) {
456
+ const n = function(a) {
457
+ const [i, l] = O(() => xe(a));
458
458
  return qe(() => {
459
459
  function u() {
460
- const c = xe(s);
460
+ const c = xe(a);
461
461
  l(c);
462
462
  }
463
- return u(), U(s.registerUpdateListener(() => {
463
+ return u(), U(a.registerUpdateListener(() => {
464
464
  u();
465
- }), s.registerEditableListener(() => {
465
+ }), a.registerEditableListener(() => {
466
466
  u();
467
467
  }));
468
- }, [s]), i;
469
- }(e), [o, a] = I(e.isEditable());
470
- if (j(() => (a(e.isEditable()), e.registerEditableListener((s) => {
471
- a(s);
472
- })), [e]), !t) return null;
468
+ }, [a]), i;
469
+ }(e), [o, s] = O(e.isEditable());
470
+ if (j(() => (s(e.isEditable()), e.registerEditableListener((a) => {
471
+ s(a);
472
+ })), [e]), !n) return null;
473
473
  let r = null;
474
- return typeof n == "function" ? r = n(o) : n !== null && (r = n), r === null ? null : h("div", { "aria-hidden": !0, children: r });
474
+ return typeof t == "function" ? r = t(o) : t !== null && (r = t), r === null ? null : h("div", { "aria-hidden": !0, children: r });
475
475
  }
476
- function le(n, e) {
477
- return le = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(t, o) {
478
- return t.__proto__ = o, t;
479
- }, le(n, e);
476
+ function le(t, e) {
477
+ return le = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(n, o) {
478
+ return n.__proto__ = o, n;
479
+ }, le(t, e);
480
480
  }
481
- var Ne = { error: null }, On = function(n) {
482
- var e, t;
481
+ var Ne = { error: null }, Fn = function(t) {
482
+ var e, n;
483
483
  function o() {
484
- for (var r, s = arguments.length, i = new Array(s), l = 0; l < s; l++) i[l] = arguments[l];
485
- return (r = n.call.apply(n, [this].concat(i)) || this).state = Ne, r.resetErrorBoundary = function() {
484
+ for (var r, a = arguments.length, i = new Array(a), l = 0; l < a; l++) i[l] = arguments[l];
485
+ return (r = t.call.apply(t, [this].concat(i)) || this).state = Ne, r.resetErrorBoundary = function() {
486
486
  for (var u, c = arguments.length, d = new Array(c), f = 0; f < c; f++) d[f] = arguments[f];
487
487
  r.props.onReset == null || (u = r.props).onReset.apply(u, d), r.reset();
488
488
  }, r;
489
489
  }
490
- t = n, (e = o).prototype = Object.create(t.prototype), e.prototype.constructor = e, le(e, t), o.getDerivedStateFromError = function(r) {
490
+ n = t, (e = o).prototype = Object.create(n.prototype), e.prototype.constructor = e, le(e, n), o.getDerivedStateFromError = function(r) {
491
491
  return { error: r };
492
492
  };
493
- var a = o.prototype;
494
- return a.reset = function() {
493
+ var s = o.prototype;
494
+ return s.reset = function() {
495
495
  this.setState(Ne);
496
- }, a.componentDidCatch = function(r, s) {
496
+ }, s.componentDidCatch = function(r, a) {
497
497
  var i, l;
498
- (i = (l = this.props).onError) == null || i.call(l, r, s);
499
- }, a.componentDidUpdate = function(r, s) {
498
+ (i = (l = this.props).onError) == null || i.call(l, r, a);
499
+ }, s.componentDidUpdate = function(r, a) {
500
500
  var i, l, u, c, d = this.state.error, f = this.props.resetKeys;
501
- d !== null && s.error !== null && ((u = r.resetKeys) === void 0 && (u = []), (c = f) === void 0 && (c = []), u.length !== c.length || u.some(function(C, y) {
501
+ d !== null && a.error !== null && ((u = r.resetKeys) === void 0 && (u = []), (c = f) === void 0 && (c = []), u.length !== c.length || u.some(function(C, y) {
502
502
  return !Object.is(C, c[y]);
503
503
  })) && ((i = (l = this.props).onResetKeysChange) == null || i.call(l, r.resetKeys, f), this.reset());
504
- }, a.render = function() {
505
- var r = this.state.error, s = this.props, i = s.fallbackRender, l = s.FallbackComponent, u = s.fallback;
504
+ }, s.render = function() {
505
+ var r = this.state.error, a = this.props, i = a.fallbackRender, l = a.FallbackComponent, u = a.fallback;
506
506
  if (r !== null) {
507
507
  var c = { error: r, resetErrorBoundary: this.resetErrorBoundary };
508
508
  if (oe.isValidElement(u)) return u;
@@ -513,59 +513,59 @@ var Ne = { error: null }, On = function(n) {
513
513
  return this.props.children;
514
514
  }, o;
515
515
  }(oe.Component);
516
- function Fn({ children: n, onError: e }) {
517
- return h(On, { fallback: h("div", { style: { border: "1px solid #f00", color: "#f00", padding: "8px" }, children: "An error was thrown." }), onError: e, children: n });
516
+ function In({ children: t, onError: e }) {
517
+ return h(Fn, { fallback: h("div", { style: { border: "1px solid #f00", color: "#f00", padding: "8px" }, children: "An error was thrown." }), onError: e, children: t });
518
518
  }
519
- const Kn = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0 ? j : _;
520
- function zn({ ignoreHistoryMergeTagChange: n = !0, ignoreSelectionChange: e = !1, onChange: t }) {
519
+ const zn = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0 ? j : _;
520
+ function Kn({ ignoreHistoryMergeTagChange: t = !0, ignoreSelectionChange: e = !1, onChange: n }) {
521
521
  const [o] = P();
522
- return Kn(() => {
523
- if (t) return o.registerUpdateListener(({ editorState: a, dirtyElements: r, dirtyLeaves: s, prevEditorState: i, tags: l }) => {
524
- e && r.size === 0 && s.size === 0 || n && l.has("history-merge") || i.isEmpty() || t(a, o, l);
522
+ return zn(() => {
523
+ if (n) return o.registerUpdateListener(({ editorState: s, dirtyElements: r, dirtyLeaves: a, prevEditorState: i, tags: l }) => {
524
+ e && r.size === 0 && a.size === 0 || t && l.has("history-merge") || i.isEmpty() || n(s, o, l);
525
525
  });
526
- }, [o, n, e, t]), null;
526
+ }, [o, t, e, n]), null;
527
527
  }
528
528
  function An() {
529
- const [n] = P();
529
+ const [t] = P();
530
530
  return _(() => {
531
- if (!n.hasNodes([ze, Ae])) throw new Error("ListPlugin: ListNode and/or ListItemNode not registered on editor");
532
- }, [n]), function(e) {
531
+ if (!t.hasNodes([Ke, Ae])) throw new Error("ListPlugin: ListNode and/or ListItemNode not registered on editor");
532
+ }, [t]), function(e) {
533
533
  _(() => jt(e), [e]);
534
- }(n), null;
534
+ }(t), null;
535
535
  }
536
- function Bn({ validateUrl: n, attributes: e }) {
537
- const [t] = P();
536
+ function Bn({ validateUrl: t, attributes: e }) {
537
+ const [n] = P();
538
538
  return _(() => {
539
- if (!t.hasNodes([Be])) throw new Error("LinkPlugin: LinkNode not registered on editor");
540
- return U(t.registerCommand(we, (o) => {
541
- if (o === null) return ae(o), !0;
542
- if (typeof o == "string") return !(n !== void 0 && !n(o)) && (ae(o, e), !0);
539
+ if (!n.hasNodes([Be])) throw new Error("LinkPlugin: LinkNode not registered on editor");
540
+ return U(n.registerCommand(we, (o) => {
541
+ if (o === null) return se(o), !0;
542
+ if (typeof o == "string") return !(t !== void 0 && !t(o)) && (se(o, e), !0);
543
543
  {
544
- const { url: a, target: r, rel: s, title: i } = o;
545
- return ae(a, { ...e, rel: s, target: r, title: i }), !0;
544
+ const { url: s, target: r, rel: a, title: i } = o;
545
+ return se(s, { ...e, rel: a, target: r, title: i }), !0;
546
546
  }
547
- }, he), n !== void 0 ? t.registerCommand(Re, (o) => {
548
- const a = p();
549
- if (!g(a) || a.isCollapsed() || !z(o, ClipboardEvent)) return !1;
547
+ }, he), t !== void 0 ? n.registerCommand(Re, (o) => {
548
+ const s = p();
549
+ if (!g(s) || s.isCollapsed() || !K(o, ClipboardEvent)) return !1;
550
550
  const r = o;
551
551
  if (r.clipboardData === null) return !1;
552
- const s = r.clipboardData.getData("text");
553
- return !!n(s) && !a.getNodes().some((i) => V(i)) && (t.dispatchCommand(we, { ...e, url: s }), o.preventDefault(), !0);
552
+ const a = r.clipboardData.getData("text");
553
+ return !!t(a) && !s.getNodes().some((i) => V(i)) && (n.dispatchCommand(we, { ...e, url: a }), o.preventDefault(), !0);
554
554
  }, he) : () => {
555
555
  });
556
- }, [t, n, e]), null;
556
+ }, [n, t, e]), null;
557
557
  }
558
- function jn({ newTab: n = !0, disabled: e = !1 }) {
559
- const [t] = P();
558
+ function jn({ newTab: t = !0, disabled: e = !1 }) {
559
+ const [n] = P();
560
560
  return _(() => {
561
561
  const o = (r) => {
562
- const s = r.target;
563
- if (!Ie(s)) return;
564
- const i = Lt(s);
562
+ const a = r.target;
563
+ if (!Oe(a)) return;
564
+ const i = Lt(a);
565
565
  if (i === null) return;
566
566
  let l = null, u = null;
567
567
  if (i.update(() => {
568
- const f = ne(s);
568
+ const f = ne(a);
569
569
  if (f !== null) {
570
570
  const C = de(f, V);
571
571
  if (!e) if (Ut(C)) l = C.sanitizeUrl(C.getURL()), u = C.getTarget();
@@ -577,29 +577,29 @@ function jn({ newTab: n = !0, disabled: e = !1 }) {
577
577
  E = E.parentNode;
578
578
  }
579
579
  return null;
580
- }(s, Dt);
580
+ }(a, Dt);
581
581
  y !== null && (l = y.href, u = y.target);
582
582
  }
583
583
  }
584
584
  }), l === null || l === "") return;
585
- const c = t.getEditorState().read(p);
585
+ const c = n.getEditorState().read(p);
586
586
  if (g(c) && !c.isCollapsed()) return void r.preventDefault();
587
587
  const d = r.type === "auxclick" && r.button === 1;
588
- window.open(l, n || d || r.metaKey || r.ctrlKey || u === "_blank" ? "_blank" : "_self"), r.preventDefault();
589
- }, a = (r) => {
588
+ window.open(l, t || d || r.metaKey || r.ctrlKey || u === "_blank" ? "_blank" : "_self"), r.preventDefault();
589
+ }, s = (r) => {
590
590
  r.button === 1 && o(r);
591
591
  };
592
- return t.registerRootListener((r, s) => {
593
- s !== null && (s.removeEventListener("click", o), s.removeEventListener("mouseup", a)), r !== null && (r.addEventListener("click", o), r.addEventListener("mouseup", a));
592
+ return n.registerRootListener((r, a) => {
593
+ a !== null && (a.removeEventListener("click", o), a.removeEventListener("mouseup", s)), r !== null && (r.addEventListener("click", o), r.addEventListener("mouseup", s));
594
594
  });
595
- }, [t, n, e]), null;
595
+ }, [n, t, e]), null;
596
596
  }
597
597
  const te = 0, ue = 1, ce = 2, D = 0, Un = 1, Le = 2, Hn = 3, qn = 4;
598
- function Vn(n, e, t, o, a) {
599
- if (n === null || t.size === 0 && o.size === 0 && !a) return D;
600
- const r = e._selection, s = n._selection;
601
- if (a) return Un;
602
- if (!(g(r) && g(s) && s.isCollapsed() && r.isCollapsed())) return D;
598
+ function Vn(t, e, n, o, s) {
599
+ if (t === null || n.size === 0 && o.size === 0 && !s) return D;
600
+ const r = e._selection, a = t._selection;
601
+ if (s) return Un;
602
+ if (!(g(r) && g(a) && a.isCollapsed() && r.isCollapsed())) return D;
603
603
  const i = function(E, v, $) {
604
604
  const x = E._nodeMap, b = [];
605
605
  for (const N of v) {
@@ -609,105 +609,105 @@ function Vn(n, e, t, o, a) {
609
609
  for (const [N, S] of $) {
610
610
  if (!S) continue;
611
611
  const T = x.get(N);
612
- T === void 0 || Oe(T) || b.push(T);
612
+ T === void 0 || Fe(T) || b.push(T);
613
613
  }
614
614
  return b;
615
- }(e, t, o);
615
+ }(e, n, o);
616
616
  if (i.length === 0) return D;
617
617
  if (i.length > 1) {
618
- const E = e._nodeMap, v = E.get(r.anchor.key), $ = E.get(s.anchor.key);
619
- return v && $ && !n._nodeMap.has(v.__key) && R(v) && v.__text.length === 1 && r.anchor.offset === 1 ? Le : D;
618
+ const E = e._nodeMap, v = E.get(r.anchor.key), $ = E.get(a.anchor.key);
619
+ return v && $ && !t._nodeMap.has(v.__key) && R(v) && v.__text.length === 1 && r.anchor.offset === 1 ? Le : D;
620
620
  }
621
- const l = i[0], u = n._nodeMap.get(l.__key);
621
+ const l = i[0], u = t._nodeMap.get(l.__key);
622
622
  if (!R(u) || !R(l) || u.__mode !== l.__mode) return D;
623
623
  const c = u.__text, d = l.__text;
624
624
  if (c === d) return D;
625
- const f = r.anchor, C = s.anchor;
625
+ const f = r.anchor, C = a.anchor;
626
626
  if (f.key !== C.key || f.type !== "text") return D;
627
627
  const y = f.offset, w = C.offset, k = d.length - c.length;
628
628
  return k === 1 && w === y - 1 ? Le : k === -1 && w === y + 1 ? Hn : k === -1 && w === y ? qn : D;
629
629
  }
630
- function Wn(n, e) {
631
- let t = Date.now(), o = D;
632
- return (a, r, s, i, l, u) => {
630
+ function Wn(t, e) {
631
+ let n = Date.now(), o = D;
632
+ return (s, r, a, i, l, u) => {
633
633
  const c = Date.now();
634
- if (u.has("historic")) return o = D, t = c, ce;
635
- const d = Vn(a, r, i, l, n.isComposing()), f = (() => {
636
- const C = s === null || s.editor === n, y = u.has("history-push");
634
+ if (u.has("historic")) return o = D, n = c, ce;
635
+ const d = Vn(s, r, i, l, t.isComposing()), f = (() => {
636
+ const C = a === null || a.editor === t, y = u.has("history-push");
637
637
  if (!y && C && u.has("history-merge")) return te;
638
- if (a === null) return ue;
638
+ if (s === null) return ue;
639
639
  const w = r._selection;
640
- return i.size > 0 || l.size > 0 ? y === !1 && d !== D && d === o && c < t + e && C || i.size === 1 && function(k, E, v) {
640
+ return i.size > 0 || l.size > 0 ? y === !1 && d !== D && d === o && c < n + e && C || i.size === 1 && function(k, E, v) {
641
641
  const $ = E._nodeMap.get(k), x = v._nodeMap.get(k), b = E._selection, N = v._selection;
642
642
  return !(g(b) && g(N) && b.anchor.type === "element" && b.focus.type === "element" && N.anchor.type === "text" && N.focus.type === "text" || !R($) || !R(x) || $.__parent !== x.__parent) && JSON.stringify(E.read(() => $.exportJSON())) === JSON.stringify(v.read(() => x.exportJSON()));
643
- }(Array.from(i)[0], a, r) ? te : ue : w !== null ? te : ce;
643
+ }(Array.from(i)[0], s, r) ? te : ue : w !== null ? te : ce;
644
644
  })();
645
- return t = c, o = d, f;
645
+ return n = c, o = d, f;
646
646
  };
647
647
  }
648
- function De(n) {
649
- n.undoStack = [], n.redoStack = [], n.current = null;
648
+ function De(t) {
649
+ t.undoStack = [], t.redoStack = [], t.current = null;
650
650
  }
651
- function Jn(n, e, t) {
652
- const o = Wn(n, t);
653
- return U(n.registerCommand(Rt, () => (function(r, s) {
654
- const i = s.redoStack, l = s.undoStack;
651
+ function Jn(t, e, n) {
652
+ const o = Wn(t, n);
653
+ return U(t.registerCommand(Rt, () => (function(r, a) {
654
+ const i = a.redoStack, l = a.undoStack;
655
655
  if (l.length !== 0) {
656
- const u = s.current, c = l.pop();
657
- u !== null && (i.push(u), r.dispatchCommand(G, !0)), l.length === 0 && r.dispatchCommand(Y, !1), s.current = c || null, c && c.editor.setEditorState(c.editorState, { tag: "historic" });
656
+ const u = a.current, c = l.pop();
657
+ u !== null && (i.push(u), r.dispatchCommand(Y, !0)), l.length === 0 && r.dispatchCommand(Z, !1), a.current = c || null, c && c.editor.setEditorState(c.editorState, { tag: "historic" });
658
658
  }
659
- }(n, e), !0), m), n.registerCommand(Mt, () => (function(r, s) {
660
- const i = s.redoStack, l = s.undoStack;
659
+ }(t, e), !0), m), t.registerCommand(Mt, () => (function(r, a) {
660
+ const i = a.redoStack, l = a.undoStack;
661
661
  if (i.length !== 0) {
662
- const u = s.current;
663
- u !== null && (l.push(u), r.dispatchCommand(Y, !0));
662
+ const u = a.current;
663
+ u !== null && (l.push(u), r.dispatchCommand(Z, !0));
664
664
  const c = i.pop();
665
- i.length === 0 && r.dispatchCommand(G, !1), s.current = c || null, c && c.editor.setEditorState(c.editorState, { tag: "historic" });
665
+ i.length === 0 && r.dispatchCommand(Y, !1), a.current = c || null, c && c.editor.setEditorState(c.editorState, { tag: "historic" });
666
666
  }
667
- }(n, e), !0), m), n.registerCommand(Tt, () => (De(e), !1), m), n.registerCommand(Pt, () => (De(e), n.dispatchCommand(G, !1), n.dispatchCommand(Y, !1), !0), m), n.registerUpdateListener(({ editorState: r, prevEditorState: s, dirtyLeaves: i, dirtyElements: l, tags: u }) => {
667
+ }(t, e), !0), m), t.registerCommand(Tt, () => (De(e), !1), m), t.registerCommand(Pt, () => (De(e), t.dispatchCommand(Y, !1), t.dispatchCommand(Z, !1), !0), m), t.registerUpdateListener(({ editorState: r, prevEditorState: a, dirtyLeaves: i, dirtyElements: l, tags: u }) => {
668
668
  const c = e.current, d = e.redoStack, f = e.undoStack, C = c === null ? null : c.editorState;
669
669
  if (c !== null && r === C) return;
670
- const y = o(s, r, c, i, l, u);
671
- if (y === ue) d.length !== 0 && (e.redoStack = [], n.dispatchCommand(G, !1)), c !== null && (f.push({ ...c }), n.dispatchCommand(Y, !0));
670
+ const y = o(a, r, c, i, l, u);
671
+ if (y === ue) d.length !== 0 && (e.redoStack = [], t.dispatchCommand(Y, !1)), c !== null && (f.push({ ...c }), t.dispatchCommand(Z, !0));
672
672
  else if (y === ce) return;
673
- e.current = { editor: n, editorState: r };
673
+ e.current = { editor: t, editorState: r };
674
674
  }));
675
675
  }
676
676
  function Xn() {
677
677
  return { current: null, redoStack: [], undoStack: [] };
678
678
  }
679
- function Gn({ delay: n, externalHistoryState: e }) {
680
- const [t] = P();
681
- return function(o, a, r = 1e3) {
682
- const s = W(() => a || Xn(), [a]);
683
- _(() => Jn(o, s, r), [r, o, s]);
684
- }(t, e, n), null;
679
+ function Yn({ delay: t, externalHistoryState: e }) {
680
+ const [n] = P();
681
+ return function(o, s, r = 1e3) {
682
+ const a = W(() => s || Xn(), [s]);
683
+ _(() => Jn(o, a, r), [r, o, a]);
684
+ }(n, e, t), null;
685
685
  }
686
- function Yn({ hasCellMerge: n = !0, hasCellBackgroundColor: e = !0, hasTabHandler: t = !0, hasHorizontalScroll: o = !1 }) {
687
- const [a] = P();
686
+ function Zn({ hasCellMerge: t = !0, hasCellBackgroundColor: e = !0, hasTabHandler: n = !0, hasHorizontalScroll: o = !1 }) {
687
+ const [s] = P();
688
688
  return _(() => {
689
- qt(a, o);
690
- }, [a, o]), _(() => Vt(a), [a]), _(() => Wt(a, t), [a, t]), _(() => {
691
- if (!n) return Jt(a);
692
- }, [a, n]), _(() => {
693
- if (!e) return a.registerNodeTransform(je, (r) => {
689
+ qt(s, o);
690
+ }, [s, o]), _(() => Vt(s), [s]), _(() => Wt(s, n), [s, n]), _(() => {
691
+ if (!t) return Jt(s);
692
+ }, [s, t]), _(() => {
693
+ if (!e) return s.registerNodeTransform(je, (r) => {
694
694
  r.getBackgroundColor() !== null && r.setBackgroundColor(null);
695
695
  });
696
- }, [a, e, n]), null;
696
+ }, [s, e, t]), null;
697
697
  }
698
- const Ve = 200, Zn = ({
699
- currentLanguage: n = "NL",
698
+ const Ve = 200, Gn = ({
699
+ currentLanguage: t = "NL",
700
700
  initialValue: e = "",
701
- placeholder: t = "",
701
+ placeholder: n = "",
702
702
  label: o = "",
703
- info: a = "",
703
+ info: s = "",
704
704
  required: r = !1,
705
- notValidatedText: s = "",
705
+ notValidatedText: a = "",
706
706
  maxHeightInRem: i = "20rem",
707
707
  maxWords: l = Ve,
708
708
  onChange: u
709
709
  }) => {
710
- const { switchLanguage: c } = cn(), d = an(), [f] = I(() => Te()), [C, y] = I(0), [w, k] = I(0), E = Fe(null), v = {
710
+ const { switchLanguage: c } = dn(), d = sn(), [f] = O(() => Te()), [C, y] = O(0), [w, k] = O(0), E = Ie(null), v = {
711
711
  html: {
712
712
  export: tn
713
713
  },
@@ -717,17 +717,17 @@ const Ve = 200, Zn = ({
717
717
  onError(b) {
718
718
  throw b;
719
719
  },
720
- nodes: [ze, Ae, Be, Ht, je, Xt, Gt],
720
+ nodes: [Ke, Ae, Be, Ht, je, Xt, Yt],
721
721
  editorState: (b) => {
722
- const S = new DOMParser().parseFromString(e, "text/html"), T = At(b, S), O = A();
723
- if (O.clear(), nn(e))
722
+ const S = new DOMParser().parseFromString(e, "text/html"), T = At(b, S), F = A();
723
+ if (F.clear(), nn(e))
724
724
  T.forEach((B) => {
725
- O.append(B);
725
+ F.append(B);
726
726
  });
727
727
  else {
728
728
  const B = Me();
729
729
  T.forEach((L, J) => {
730
- J === 0 ? (B.append(L), O.append(B)) : O.append(L);
730
+ J === 0 ? (B.append(L), F.append(B)) : F.append(L);
731
731
  });
732
732
  }
733
733
  }
@@ -738,22 +738,22 @@ const Ve = 200, Zn = ({
738
738
  });
739
739
  };
740
740
  return _(() => {
741
- c(n.toLocaleLowerCase());
742
- }, [n, c]), _(() => {
741
+ c(t.toLocaleLowerCase());
742
+ }, [t, c]), _(() => {
743
743
  const b = e.replace(/<br\s*\/?>|&nbsp;/gi, " ").replace(/<\/?[^>]+(>|$)|&[a-z]+;/g, "").replace(/\s+/g, " ").trim();
744
744
  y($(b));
745
- }, []), /* @__PURE__ */ K("div", { className: M.editor__container, children: [
746
- /* @__PURE__ */ K("div", { className: M.editor__header, children: [
747
- /* @__PURE__ */ h(un, { label: o, info: a, required: r }),
748
- /* @__PURE__ */ K("div", { className: M["editor__header-word-count"], children: [
745
+ }, []), /* @__PURE__ */ z("div", { className: M.editor__container, children: [
746
+ /* @__PURE__ */ z("div", { className: M.editor__header, children: [
747
+ /* @__PURE__ */ h(un, { label: o, info: s, required: r }),
748
+ /* @__PURE__ */ z("div", { className: M["editor__header-word-count"], children: [
749
749
  /* @__PURE__ */ h("span", { className: en({ [M["editor__header-word-count--alert"]]: C > l }), children: C }),
750
750
  " / ",
751
751
  l
752
752
  ] })
753
753
  ] }),
754
- /* @__PURE__ */ h("div", { className: M.editor, children: /* @__PURE__ */ K(pn, { initialConfig: v, children: [
754
+ /* @__PURE__ */ h("div", { className: M.editor, children: /* @__PURE__ */ z(pn, { initialConfig: v, children: [
755
755
  /* @__PURE__ */ h(on, { editorScrollPosition: w }),
756
- /* @__PURE__ */ K("div", { className: M["editor__field-wrapper"], children: [
756
+ /* @__PURE__ */ z("div", { className: M["editor__field-wrapper"], children: [
757
757
  /* @__PURE__ */ h(
758
758
  Ln,
759
759
  {
@@ -762,9 +762,9 @@ const Ve = 200, Zn = ({
762
762
  {
763
763
  className: M.editor__field,
764
764
  "aria-label": d.common.rteAriaLabel,
765
- "aria-placeholder": t,
765
+ "aria-placeholder": n,
766
766
  title: d.common.rteTitle,
767
- placeholder: /* @__PURE__ */ h("div", { className: M.editor__placeholder, children: t }),
767
+ placeholder: /* @__PURE__ */ h("div", { className: M.editor__placeholder, children: n }),
768
768
  spellCheck: !1,
769
769
  id: "rteEditor",
770
770
  style: { height: `${i}`, maxHeight: `${i}` },
@@ -772,48 +772,48 @@ const Ve = 200, Zn = ({
772
772
  ref: E
773
773
  }
774
774
  ),
775
- placeholder: /* @__PURE__ */ h("div", { className: M.editor__placeholder, children: t }),
776
- ErrorBoundary: Fn
775
+ placeholder: /* @__PURE__ */ h("div", { className: M.editor__placeholder, children: n }),
776
+ ErrorBoundary: In
777
777
  }
778
778
  ),
779
+ /* @__PURE__ */ h(Zn, {}),
779
780
  /* @__PURE__ */ h(Yn, {}),
780
- /* @__PURE__ */ h(Gn, {}),
781
781
  /* @__PURE__ */ h(An, {}),
782
- /* @__PURE__ */ h(Bn, { validateUrl: Yt }),
783
- /* @__PURE__ */ h(Zt, { matchers: Qt }),
782
+ /* @__PURE__ */ h(Bn, { validateUrl: Zt }),
783
+ /* @__PURE__ */ h(Gt, { matchers: Qt }),
784
784
  /* @__PURE__ */ h(jn, {}),
785
- /* @__PURE__ */ h(zn, { onChange: x }),
785
+ /* @__PURE__ */ h(Kn, { onChange: x }),
786
786
  /* @__PURE__ */ h(fn, {})
787
787
  ] })
788
788
  ] }) }),
789
- s !== "" && /* @__PURE__ */ h(sn, { level: "error", feedback: s })
789
+ a !== "" && /* @__PURE__ */ h(an, { level: "error", feedback: a })
790
790
  ] });
791
791
  }, Br = ({
792
- currentLanguage: n = "NL",
792
+ currentLanguage: t = "NL",
793
793
  initialValue: e = "",
794
- placeholder: t = "",
794
+ placeholder: n = "",
795
795
  label: o = "",
796
- info: a = "",
796
+ info: s = "",
797
797
  required: r = !1,
798
- notValidatedText: s = "",
798
+ notValidatedText: a = "",
799
799
  maxWords: i = Ve,
800
800
  onChange: l
801
- }) => /* @__PURE__ */ h(dn, { children: /* @__PURE__ */ h(
802
- Zn,
801
+ }) => /* @__PURE__ */ h(cn, { children: /* @__PURE__ */ h(
802
+ Gn,
803
803
  {
804
- currentLanguage: n,
804
+ currentLanguage: t,
805
805
  initialValue: e,
806
- placeholder: t,
806
+ placeholder: n,
807
807
  label: o,
808
- info: a,
808
+ info: s,
809
809
  required: r,
810
- notValidatedText: s,
810
+ notValidatedText: a,
811
811
  maxWords: i,
812
812
  onChange: l
813
813
  }
814
814
  ) });
815
815
  export {
816
- Zn as Rte,
816
+ Gn as Rte,
817
817
  Br as RteEditor
818
818
  };
819
819
  //# sourceMappingURL=RteEditor.js.map