@uva-glass/component-library 3.27.0 → 3.27.2

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 (61) hide show
  1. package/dist/{Lexical.prod-m3GJsAAT.js → Lexical.prod-UwAbgYpF.js} +1043 -1036
  2. package/dist/Lexical.prod-UwAbgYpF.js.map +1 -0
  3. package/dist/{LexicalClipboard.prod-HyvHKdDm.js → LexicalClipboard.prod-DHIGjydG.js} +25 -25
  4. package/dist/{LexicalClipboard.prod-HyvHKdDm.js.map → LexicalClipboard.prod-DHIGjydG.js.map} +1 -1
  5. package/dist/{LexicalLink.prod-D0qasaVP.js → LexicalLink.prod-Bsa9J7L-.js} +13 -13
  6. package/dist/{LexicalLink.prod-D0qasaVP.js.map → LexicalLink.prod-Bsa9J7L-.js.map} +1 -1
  7. package/dist/{LexicalList.prod-CQz14k_F.js → LexicalList.prod-jxGuZd4b.js} +26 -26
  8. package/dist/{LexicalList.prod-CQz14k_F.js.map → LexicalList.prod-jxGuZd4b.js.map} +1 -1
  9. package/dist/LexicalSelection.prod-xk5MiZnZ.js +101 -0
  10. package/dist/LexicalSelection.prod-xk5MiZnZ.js.map +1 -0
  11. package/dist/{LexicalTable.prod-BHKhA4PF.js → LexicalTable.prod-BSjs04iE.js} +164 -164
  12. package/dist/{LexicalTable.prod-BHKhA4PF.js.map → LexicalTable.prod-BSjs04iE.js.map} +1 -1
  13. package/dist/{LexicalUtils.prod-Vqqof-U-.js → LexicalUtils.prod-cQutjKA3.js} +43 -43
  14. package/dist/{LexicalUtils.prod-Vqqof-U-.js.map → LexicalUtils.prod-cQutjKA3.js.map} +1 -1
  15. package/dist/{TablePlugin-CykqKW6X.js → TablePlugin-NmJsn2fm.js} +4 -4
  16. package/dist/{TablePlugin-CykqKW6X.js.map → TablePlugin-NmJsn2fm.js.map} +1 -1
  17. package/dist/assets/MultiSelectBox.css +1 -1
  18. package/dist/assets/TextArea.css +1 -1
  19. package/dist/components/CheckboxTree/CheckboxTree.js +1 -1
  20. package/dist/components/FormInput/FormInput.js +1 -1
  21. package/dist/components/InputField/InputField.stories.js +1 -1
  22. package/dist/components/MultiSelect/MultiSelect.js +1 -1
  23. package/dist/components/MultiSelect/MultiSelect.stories.js +1 -1
  24. package/dist/components/MultiSelect/components/MultiSelectHeader.js +1 -1
  25. package/dist/components/MultiSelect/index.js +1 -1
  26. package/dist/components/MultiSelectBox/MultiSelectBox.d.ts +3 -1
  27. package/dist/components/MultiSelectBox/MultiSelectBox.js +82 -78
  28. package/dist/components/MultiSelectBox/MultiSelectBox.js.map +1 -1
  29. package/dist/components/PeriodSelector/PeriodSelector.js +1 -1
  30. package/dist/components/ProgrammeCard/ProgrammeCard.stories.js +1 -1
  31. package/dist/components/RadioTabSelector/RadioTabSelector.js +1 -1
  32. package/dist/components/RteEditor/EditorHeader/EditorHeader.js +1 -1
  33. package/dist/components/RteEditor/Plugins/BlockFormatPlugin/BlockFormatPlugin.js +1 -1
  34. package/dist/components/RteEditor/Plugins/HistoryPlugin/HistoryPlugin.js +2 -2
  35. package/dist/components/RteEditor/Plugins/LinkPlugin/AddLinkForm/AddLinkFrom.js +2 -2
  36. package/dist/components/RteEditor/Plugins/LinkPlugin/LinkContextMenu/LinkContextMenu.js +1 -1
  37. package/dist/components/RteEditor/Plugins/LinkPlugin/LinkPlugin.js +30 -30
  38. package/dist/components/RteEditor/Plugins/LinkPlugin/helpers.js +1 -1
  39. package/dist/components/RteEditor/Plugins/ListPlugin/ListPlugin.js +12 -12
  40. package/dist/components/RteEditor/Plugins/PasteHandlerPlugin/PasteHandlerPlugin.js +3 -3
  41. package/dist/components/RteEditor/Plugins/TablePlugin/AddTableFrom.js +1 -1
  42. package/dist/components/RteEditor/Plugins/TablePlugin/TablePlugin.js +3 -3
  43. package/dist/components/RteEditor/Plugins/TablePlugin/helpers.js +2 -2
  44. package/dist/components/RteEditor/Plugins/TablePlugin/index.js +1 -1
  45. package/dist/components/RteEditor/Plugins/ToolbarPlugin/ToolbarPlugin.js +7 -7
  46. package/dist/components/RteEditor/Plugins/index.js +1 -1
  47. package/dist/components/RteEditor/RteEditor.js +74 -74
  48. package/dist/components/RteEditor/helpers.js +4 -4
  49. package/dist/components/SelectListbox/SelectListBox.stories.js +5 -0
  50. package/dist/components/SelectListbox/SelectListBox.stories.js.map +1 -1
  51. package/dist/components/SelectListbox/SelectProvider.js +24 -33
  52. package/dist/components/SelectListbox/SelectProvider.js.map +1 -1
  53. package/dist/components/TextArea/TextArea.js +14 -14
  54. package/dist/components/index.js +1 -1
  55. package/dist/{helpers-5AryUrYu.js → helpers-DZIm3MiJ.js} +4 -4
  56. package/dist/{helpers-5AryUrYu.js.map → helpers-DZIm3MiJ.js.map} +1 -1
  57. package/dist/index.js +1 -1
  58. package/package.json +6 -6
  59. package/dist/Lexical.prod-m3GJsAAT.js.map +0 -1
  60. package/dist/LexicalSelection.prod-Bh25dAig.js +0 -101
  61. package/dist/LexicalSelection.prod-Bh25dAig.js.map +0 -1
@@ -1,63 +1,63 @@
1
- var As = Object.defineProperty;
2
- var Os = (n, e, t) => e in n ? As(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
3
- var se = (n, e, t) => Os(n, typeof e != "symbol" ? e + "" : e, t);
1
+ var Ds = Object.defineProperty;
2
+ var Ps = (n, e, t) => e in n ? Ds(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
3
+ var se = (n, e, t) => Ps(n, typeof e != "symbol" ? e + "" : e, t);
4
4
  function T(n, ...e) {
5
5
  const t = new URL("https://lexical.dev/docs/error"), r = new URLSearchParams();
6
6
  r.append("code", n);
7
7
  for (const i of e) r.append("v", i);
8
8
  throw t.search = r.toString(), Error(`Minified Lexical error #${n}; visit ${t.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`);
9
9
  }
10
- const ae = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0, Ds = ae && "documentMode" in document ? document.documentMode : null, fe = ae && /Mac|iPod|iPhone|iPad/.test(navigator.platform), Me = ae && /^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent), Gt = !(!ae || !("InputEvent" in window) || Ds) && "getTargetRanges" in new window.InputEvent("input"), Ct = ae && /Version\/[\d.]+.*Safari/.test(navigator.userAgent), rt = ae && /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream, Ps = ae && /Android/.test(navigator.userAgent), wi = ae && /^(?=.*Chrome).*/i.test(navigator.userAgent), Pr = ae && Ps && wi, Xt = ae && /AppleWebKit\/[\d.]+/.test(navigator.userAgent) && !wi;
11
- function Qt(...n) {
10
+ const ae = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0, Fs = ae && "documentMode" in document ? document.documentMode : null, fe = ae && /Mac|iPod|iPhone|iPad/.test(navigator.platform), We = ae && /^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent), Xt = !(!ae || !("InputEvent" in window) || Fs) && "getTargetRanges" in new window.InputEvent("input"), St = ae && /Version\/[\d.]+.*Safari/.test(navigator.userAgent), it = ae && /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream, Ls = ae && /Android/.test(navigator.userAgent), Ei = ae && /^(?=.*Chrome).*/i.test(navigator.userAgent), Fr = ae && Ls && Ei, Qt = ae && /AppleWebKit\/[\d.]+/.test(navigator.userAgent) && !Ei;
11
+ function Zt(...n) {
12
12
  const e = [];
13
13
  for (const t of n) if (t && typeof t == "string") for (const [r] of t.matchAll(/\S+/g)) e.push(r);
14
14
  return e;
15
15
  }
16
- const Fs = 1, Ls = 3, Is = 9, Ks = 11, Re = 0, Ei = 1, it = 2, zs = 0, Bs = 1, Rs = 2, Zt = 4, en = 8, sr = 128, Ws = 1792 | (112 | (3 | Zt | en) | sr), or = 1, lr = 2, ar = 3, cr = 4, ur = 5, fr = 6, hn = Ct || rt || Xt ? " " : "​", ke = `
16
+ const Is = 1, Ks = 3, zs = 9, Bs = 11, Je = 0, Mi = 1, st = 2, Rs = 0, Ws = 1, Js = 2, en = 4, tn = 8, or = 128, Us = 1792 | (112 | (3 | en | tn) | or), lr = 1, ar = 2, cr = 3, ur = 4, fr = 5, dr = 6, gn = St || it || Qt ? " " : "​", ke = `
17
17
 
18
- `, Js = Me ? " " : hn, Mi = "֑-߿יִ-﷽ﹰ-ﻼ", Ai = "A-Za-zÀ-ÖØ-öø-ʸ̀-֐ࠀ-῿‎Ⰰ-﬜︀-﹯﻽-￿", Us = new RegExp("^[^" + Ai + "]*[" + Mi + "]"), $s = new RegExp("^[^" + Mi + "]*[" + Ai + "]"), We = { bold: 1, capitalize: 1024, code: 16, highlight: sr, italic: 2, lowercase: 256, strikethrough: Zt, subscript: 32, superscript: 64, underline: en, uppercase: 512 }, js = { directionless: 1, unmergeable: 2 }, Fr = { center: lr, end: fr, justify: cr, left: or, right: ar, start: ur }, Vs = { [lr]: "center", [fr]: "end", [cr]: "justify", [or]: "left", [ar]: "right", [ur]: "start" }, Ys = { normal: 0, segmented: 2, token: 1 }, Hs = { [zs]: "normal", [Rs]: "segmented", [Bs]: "token" }, qs = "$";
19
- function Oi(n, e, t, r, i, s) {
18
+ `, js = We ? " " : gn, Ai = "֑-߿יִ-﷽ﹰ-ﻼ", Oi = "A-Za-zÀ-ÖØ-öø-ʸ̀-֐ࠀ-῿‎Ⰰ-﬜︀-﹯﻽-￿", $s = new RegExp("^[^" + Oi + "]*[" + Ai + "]"), Vs = new RegExp("^[^" + Ai + "]*[" + Oi + "]"), Ue = { bold: 1, capitalize: 1024, code: 16, highlight: or, italic: 2, lowercase: 256, strikethrough: en, subscript: 32, superscript: 64, underline: tn, uppercase: 512 }, Ys = { directionless: 1, unmergeable: 2 }, Lr = { center: ar, end: dr, justify: ur, left: lr, right: cr, start: fr }, Hs = { [ar]: "center", [dr]: "end", [ur]: "justify", [lr]: "left", [cr]: "right", [fr]: "start" }, qs = { normal: 0, segmented: 2, token: 1 }, Gs = { [Rs]: "normal", [Js]: "segmented", [Ws]: "token" }, Xs = "$";
19
+ function Di(n, e, t, r, i, s) {
20
20
  let o = n.getFirstChild();
21
21
  for (; o !== null; ) {
22
22
  const l = o.__key;
23
- o.__parent === e && (v(o) && Oi(o, l, t, r, i, s), t.has(l) || s.delete(l), i.push(l)), o = o.getNextSibling();
23
+ o.__parent === e && (v(o) && Di(o, l, t, r, i, s), t.has(l) || s.delete(l), i.push(l)), o = o.getNextSibling();
24
24
  }
25
25
  }
26
- const Gs = 100;
27
- let Un = !1, dr = 0;
28
- function Xs(n) {
29
- dr = n.timeStamp;
26
+ const Qs = 100;
27
+ let jn = !1, hr = 0;
28
+ function Zs(n) {
29
+ hr = n.timeStamp;
30
30
  }
31
- function Mn(n, e, t) {
31
+ function An(n, e, t) {
32
32
  const r = n.nodeName === "BR", i = e.__lexicalLineBreak;
33
- return i && (n === i || r && n.previousSibling === i) || r && kn(n, t) !== void 0;
33
+ return i && (n === i || r && n.previousSibling === i) || r && Tn(n, t) !== void 0;
34
34
  }
35
- function Qs(n, e, t) {
35
+ function eo(n, e, t) {
36
36
  const r = Te(oe(t));
37
37
  let i = null, s = null;
38
38
  r !== null && r.anchorNode === n && (i = r.anchorOffset, s = r.focusOffset);
39
39
  const o = n.nodeValue;
40
- o !== null && Tr(e, o, i, s, !1);
40
+ o !== null && br(e, o, i, s, !1);
41
41
  }
42
- function Zs(n, e, t) {
42
+ function to(n, e, t) {
43
43
  if (O(n)) {
44
44
  const r = n.anchor.getNode();
45
45
  if (r.is(t) && n.format !== r.getFormat()) return !1;
46
46
  }
47
47
  return be(e) && t.isAttached();
48
48
  }
49
- function eo(n, e, t, r) {
50
- for (let i = n; i && !al(i); i = Dt(i)) {
51
- const s = kn(i, e);
49
+ function no(n, e, t, r) {
50
+ for (let i = n; i && !cl(i); i = Pt(i)) {
51
+ const s = Tn(i, e);
52
52
  if (s !== void 0) {
53
- const o = j(s, t);
53
+ const o = $(s, t);
54
54
  if (o) return z(o) || !ee(i) ? void 0 : [i, o];
55
- } else if (i === r) return [r, xs(t)];
55
+ } else if (i === r) return [r, Ss(t)];
56
56
  }
57
57
  }
58
- function Di(n, e, t) {
59
- Un = !0;
60
- const r = performance.now() - dr > Gs;
58
+ function Pi(n, e, t) {
59
+ jn = !0;
60
+ const r = performance.now() - hr > Qs;
61
61
  try {
62
62
  te(n, () => {
63
63
  const i = L() || function(f) {
@@ -68,17 +68,17 @@ function Di(n, e, t) {
68
68
  }(n), s = /* @__PURE__ */ new Map(), o = n.getRootElement(), l = n._editorState, a = n._blockCursorElement;
69
69
  let c = !1, u = "";
70
70
  for (let f = 0; f < e.length; f++) {
71
- const g = e[f], d = g.type, _ = g.target, p = eo(_, n, l, o);
71
+ const g = e[f], d = g.type, _ = g.target, p = no(_, n, l, o);
72
72
  if (!p) continue;
73
73
  const [x, y] = p;
74
- if (d === "characterData") r && M(y) && be(_) && Zs(i, _, y) && Qs(_, y, n);
74
+ if (d === "characterData") r && M(y) && be(_) && to(i, _, y) && eo(_, y, n);
75
75
  else if (d === "childList") {
76
76
  c = !0;
77
77
  const m = g.addedNodes;
78
78
  for (let C = 0; C < m.length; C++) {
79
- const w = m[C], k = ys(w), S = w.parentNode;
80
- if (S != null && w !== a && k === null && !Mn(w, S, n)) {
81
- if (Me) {
79
+ const w = m[C], k = xs(w), S = w.parentNode;
80
+ if (S != null && w !== a && k === null && !An(w, S, n)) {
81
+ if (We) {
82
82
  const A = (ee(w) ? w.innerText : null) || w.nodeValue;
83
83
  A && (u += A);
84
84
  }
@@ -90,7 +90,7 @@ function Di(n, e, t) {
90
90
  let C = 0;
91
91
  for (let w = 0; w < N; w++) {
92
92
  const k = b[w];
93
- (Mn(k, _, n) || a === k) && (_.appendChild(k), C++);
93
+ (An(k, _, n) || a === k) && (_.appendChild(k), C++);
94
94
  }
95
95
  N !== C && s.set(x, y);
96
96
  }
@@ -103,29 +103,29 @@ function Di(n, e, t) {
103
103
  const g = h[f], d = g.addedNodes, _ = g.target;
104
104
  for (let p = 0; p < d.length; p++) {
105
105
  const x = d[p], y = x.parentNode;
106
- y == null || x.nodeName !== "BR" || Mn(x, _, n) || y.removeChild(x);
106
+ y == null || x.nodeName !== "BR" || An(x, _, n) || y.removeChild(x);
107
107
  }
108
108
  }
109
109
  t.takeRecords();
110
110
  }
111
- i !== null && (c && ie(i), Me && ks(n) && i.insertRawText(u));
111
+ i !== null && (c && ie(i), We && bs(n) && i.insertRawText(u));
112
112
  });
113
113
  } finally {
114
- Un = !1;
114
+ jn = !1;
115
115
  }
116
116
  }
117
- function Pi(n) {
117
+ function Fi(n) {
118
118
  const e = n._observer;
119
- e !== null && Di(n, e.takeRecords(), e);
119
+ e !== null && Pi(n, e.takeRecords(), e);
120
120
  }
121
- function Fi(n) {
121
+ function Li(n) {
122
122
  (function(e) {
123
- dr === 0 && oe(e).addEventListener("textInput", Xs, !0);
123
+ hr === 0 && oe(e).addEventListener("textInput", Zs, !0);
124
124
  })(n), n._observer = new MutationObserver((e, t) => {
125
- Di(n, e, t);
125
+ Pi(n, e, t);
126
126
  });
127
127
  }
128
- class hr {
128
+ class gr {
129
129
  constructor(e, t = /* @__PURE__ */ new Map(), r = void 0, i = /* @__PURE__ */ new Map(), s = void 0) {
130
130
  this.node = e, this.sharedConfigMap = t, this.unknownState = r, this.knownState = i;
131
131
  const o = s !== void 0 ? s : function(l, a, c) {
@@ -155,14 +155,14 @@ class hr {
155
155
  toJSON() {
156
156
  const e = { ...this.unknownState };
157
157
  for (const [t, r] of this.knownState) t.isEqual(r, t.defaultValue) ? delete e[t.key] : e[t.key] = t.unparse(r);
158
- return zt(e) ? { [qs]: e } : {};
158
+ return Bt(e) ? { [Xs]: e } : {};
159
159
  }
160
160
  getWritable(e) {
161
161
  if (this.node === e) return this;
162
- const t = new Map(this.knownState), r = zt(i = this.unknownState) && { ...i };
162
+ const t = new Map(this.knownState), r = Bt(i = this.unknownState) && { ...i };
163
163
  var i;
164
164
  if (r) for (const s of t.keys()) delete r[s.key];
165
- return new hr(e, this.sharedConfigMap, zt(r), t, this.size);
165
+ return new gr(e, this.sharedConfigMap, Bt(r), t, this.size);
166
166
  }
167
167
  updateFromKnown(e, t) {
168
168
  const r = e.key;
@@ -178,17 +178,17 @@ class hr {
178
178
  const { knownState: t } = this;
179
179
  for (const r of t.keys()) t.set(r, r.defaultValue);
180
180
  if (this.size = t.size, this.unknownState = {}, e) for (const [r, i] of Object.entries(e)) this.updateFromUnknown(r, i);
181
- this.unknownState = zt(this.unknownState);
181
+ this.unknownState = Bt(this.unknownState);
182
182
  }
183
183
  }
184
- function zt(n) {
184
+ function Bt(n) {
185
185
  if (n) for (const e in n) return n;
186
186
  }
187
- function to(n) {
188
- const e = n.getWritable(), t = e.__state ? e.__state.getWritable(e) : new hr(e);
187
+ function ro(n) {
188
+ const e = n.getWritable(), t = e.__state ? e.__state.getWritable(e) : new gr(e);
189
189
  return e.__state = t, t;
190
190
  }
191
- function Lr(n, e) {
191
+ function Ir(n, e) {
192
192
  const t = n.__mode, r = n.__format, i = n.__style, s = e.__mode, o = e.__format, l = e.__style, a = n.__state, c = e.__state;
193
193
  return (t === null || t === s) && (r === null || r === o) && (i === null || i === l) && (n.__state === null || a === c || function(u, h) {
194
194
  if (u === h) return !0;
@@ -211,17 +211,17 @@ function Lr(n, e) {
211
211
  return !(u && g(u, h) || h && g(h, u) || u && d(u, h) || h && d(h, u));
212
212
  }(a, c));
213
213
  }
214
- function Ir(n, e) {
214
+ function Kr(n, e) {
215
215
  const t = n.mergeWithSibling(e), r = R()._normalizedNodes;
216
216
  return r.add(n.__key), r.add(e.__key), t;
217
217
  }
218
- function Kr(n) {
218
+ function zr(n) {
219
219
  let e, t, r = n;
220
220
  if (r.__text !== "" || !r.isSimpleText() || r.isUnmergeable()) {
221
221
  for (; (e = r.getPreviousSibling()) !== null && M(e) && e.isSimpleText() && !e.isUnmergeable(); ) {
222
222
  if (e.__text !== "") {
223
- if (Lr(e, r)) {
224
- r = Ir(e, r);
223
+ if (Ir(e, r)) {
224
+ r = Kr(e, r);
225
225
  break;
226
226
  }
227
227
  break;
@@ -230,8 +230,8 @@ function Kr(n) {
230
230
  }
231
231
  for (; (t = r.getNextSibling()) !== null && M(t) && t.isSimpleText() && !t.isUnmergeable(); ) {
232
232
  if (t.__text !== "") {
233
- if (Lr(r, t)) {
234
- r = Ir(r, t);
233
+ if (Ir(r, t)) {
234
+ r = Kr(r, t);
235
235
  break;
236
236
  }
237
237
  break;
@@ -241,9 +241,9 @@ function Kr(n) {
241
241
  } else r.remove();
242
242
  }
243
243
  function $n(n) {
244
- return zr(n.anchor), zr(n.focus), n;
244
+ return Br(n.anchor), Br(n.focus), n;
245
245
  }
246
- function zr(n) {
246
+ function Br(n) {
247
247
  for (; n.type === "element"; ) {
248
248
  const e = n.getNode(), t = n.offset;
249
249
  let r, i;
@@ -255,44 +255,44 @@ function zr(n) {
255
255
  n.set(r.__key, i ? r.getChildrenSize() : 0, "element", !0);
256
256
  }
257
257
  }
258
- let De, Q, St, gn, jn, Vn, Je, le, Yn, vt, J = "", X = "", ce = null, ue = "", Se = "", Li = !1, kt = !1, $t = null;
259
- function tn(n, e) {
260
- const t = Je.get(n);
258
+ let De, Q, vt, _n, Vn, Yn, je, le, Hn, kt, J = "", X = "", ce = null, ue = "", Se = "", Ii = !1, Tt = !1, $t = null;
259
+ function nn(n, e) {
260
+ const t = je.get(n);
261
261
  if (e !== null) {
262
- const r = Gn(n);
262
+ const r = Xn(n);
263
263
  r.parentNode === e && e.removeChild(r);
264
264
  }
265
265
  if (le.has(n) || Q._keyToDOMMap.delete(n), v(t)) {
266
- const r = rn(t, Je);
267
- Hn(r, 0, r.length - 1, null);
266
+ const r = sn(t, je);
267
+ qn(r, 0, r.length - 1, null);
268
268
  }
269
- t !== void 0 && br(vt, St, gn, t, "destroyed");
269
+ t !== void 0 && Nr(kt, vt, _n, t, "destroyed");
270
270
  }
271
- function Hn(n, e, t, r) {
271
+ function qn(n, e, t, r) {
272
272
  let i = e;
273
273
  for (; i <= t; ++i) {
274
274
  const s = n[i];
275
- s !== void 0 && tn(s, r);
275
+ s !== void 0 && nn(s, r);
276
276
  }
277
277
  }
278
278
  function Ie(n, e) {
279
279
  n.setProperty("text-align", e);
280
280
  }
281
- const no = "40px";
282
- function Ii(n, e) {
281
+ const io = "40px";
282
+ function Ki(n, e) {
283
283
  const t = De.theme.indent;
284
284
  if (typeof t == "string") {
285
285
  const i = n.classList.contains(t);
286
286
  e > 0 && !i ? n.classList.add(t) : e < 1 && i && n.classList.remove(t);
287
287
  }
288
- const r = getComputedStyle(n).getPropertyValue("--lexical-indent-base-value") || no;
288
+ const r = getComputedStyle(n).getPropertyValue("--lexical-indent-base-value") || io;
289
289
  n.style.setProperty("padding-inline-start", e === 0 ? "" : `calc(${e} * ${r})`);
290
290
  }
291
- function Ki(n, e) {
291
+ function zi(n, e) {
292
292
  const t = n.style;
293
- e === 0 ? Ie(t, "") : e === or ? Ie(t, "left") : e === lr ? Ie(t, "center") : e === ar ? Ie(t, "right") : e === cr ? Ie(t, "justify") : e === ur ? Ie(t, "start") : e === fr && Ie(t, "end");
293
+ e === 0 ? Ie(t, "") : e === lr ? Ie(t, "left") : e === ar ? Ie(t, "center") : e === cr ? Ie(t, "right") : e === ur ? Ie(t, "justify") : e === fr ? Ie(t, "start") : e === dr && Ie(t, "end");
294
294
  }
295
- function nn(n, e) {
295
+ function rn(n, e) {
296
296
  const t = le.get(n);
297
297
  t === void 0 && T(60);
298
298
  const r = t.createDOM(De, Q);
@@ -304,63 +304,63 @@ function nn(n, e) {
304
304
  })(s, o, i), l.set(i, s);
305
305
  }(n, r, Q), M(t) ? r.setAttribute("data-lexical-text", "true") : z(t) && r.setAttribute("data-lexical-decorator", "true"), v(t)) {
306
306
  const i = t.__indent, s = t.__size;
307
- if (i !== 0 && Ii(r, i), s !== 0) {
307
+ if (i !== 0 && Ki(r, i), s !== 0) {
308
308
  const l = s - 1;
309
309
  (function(a, c, u, h) {
310
310
  const f = X;
311
- X = "", qn(a, u, 0, c, u.getDOMSlot(h)), Bi(u, h), X = f;
312
- })(rn(t, le), l, t, r);
311
+ X = "", Gn(a, u, 0, c, u.getDOMSlot(h)), Ri(u, h), X = f;
312
+ })(sn(t, le), l, t, r);
313
313
  }
314
314
  const o = t.__format;
315
- o !== 0 && Ki(r, o), t.isInline() || zi(null, t, r), Tn(t) && (J += ke, Se += ke);
315
+ o !== 0 && zi(r, o), t.isInline() || Bi(null, t, r), bn(t) && (J += ke, Se += ke);
316
316
  } else {
317
317
  const i = t.getTextContent();
318
318
  if (z(t)) {
319
319
  const s = t.decorate(Q, De);
320
- s !== null && Ri(n, s), r.contentEditable = "false";
320
+ s !== null && Wi(n, s), r.contentEditable = "false";
321
321
  } else M(t) && (t.isDirectionless() || (X += i));
322
322
  J += i, Se += i;
323
323
  }
324
- return e !== null && e.insertChild(r), br(vt, St, gn, t, "created"), r;
324
+ return e !== null && e.insertChild(r), Nr(kt, vt, _n, t, "created"), r;
325
325
  }
326
- function qn(n, e, t, r, i) {
326
+ function Gn(n, e, t, r, i) {
327
327
  const s = J;
328
328
  J = "";
329
329
  let o = t;
330
330
  for (; o <= r; ++o) {
331
- nn(n[o], i);
331
+ rn(n[o], i);
332
332
  const l = le.get(n[o]);
333
333
  l !== null && M(l) && (ce === null && (ce = l.getFormat()), ue === "" && (ue = l.getStyle()));
334
334
  }
335
- Tn(e) && (J += ke), i.element.__lexicalTextContent = J, J = s + J;
335
+ bn(e) && (J += ke), i.element.__lexicalTextContent = J, J = s + J;
336
336
  }
337
- function Br(n, e) {
337
+ function Rr(n, e) {
338
338
  if (n) {
339
339
  const t = n.__last;
340
340
  if (t) {
341
341
  const r = e.get(t);
342
- if (r) return tt(r) ? "line-break" : z(r) && r.isInline() ? "decorator" : null;
342
+ if (r) return nt(r) ? "line-break" : z(r) && r.isInline() ? "decorator" : null;
343
343
  }
344
344
  return "empty";
345
345
  }
346
346
  return null;
347
347
  }
348
- function zi(n, e, t) {
349
- const r = Br(n, Je), i = Br(e, le);
348
+ function Bi(n, e, t) {
349
+ const r = Rr(n, je), i = Rr(e, le);
350
350
  r !== i && e.getDOMSlot(t).setManagedLineBreak(i);
351
351
  }
352
- function Bi(n, e) {
352
+ function Ri(n, e) {
353
353
  const t = e.__lexicalDirTextContent || "", r = e.__lexicalDir || "";
354
354
  if (t !== X || r !== $t) {
355
355
  const i = X === "", s = i ? $t : function(o) {
356
- return Us.test(o) ? "rtl" : $s.test(o) ? "ltr" : null;
356
+ return $s.test(o) ? "rtl" : Vs.test(o) ? "ltr" : null;
357
357
  }(X);
358
358
  if (s !== r) {
359
359
  const o = e.classList, l = De.theme;
360
360
  let a = r !== null ? l[r] : void 0, c = s !== null ? l[s] : void 0;
361
361
  if (a !== void 0) {
362
362
  if (typeof a == "string") {
363
- const u = Qt(a);
363
+ const u = Zt(a);
364
364
  a = l[r] = u;
365
365
  }
366
366
  o.remove(...a);
@@ -369,19 +369,19 @@ function Bi(n, e) {
369
369
  else {
370
370
  if (c !== void 0) {
371
371
  if (typeof c == "string") {
372
- const u = Qt(c);
372
+ const u = Zt(c);
373
373
  c = l[s] = u;
374
374
  }
375
375
  c !== void 0 && o.add(...c);
376
376
  }
377
377
  e.dir = s;
378
378
  }
379
- kt || (n.getWritable().__dir = s);
379
+ Tt || (n.getWritable().__dir = s);
380
380
  }
381
381
  $t = s, e.__lexicalDirTextContent = X, e.__lexicalDir = s;
382
382
  }
383
383
  }
384
- function ro(n, e, t) {
384
+ function so(n, e, t) {
385
385
  const r = X;
386
386
  var i;
387
387
  X = "", ce = null, ue = "", function(s, o, l) {
@@ -390,9 +390,9 @@ function ro(n, e, t) {
390
390
  const h = l.element;
391
391
  if (c === 1 && u === 1) {
392
392
  const f = s.__first, g = o.__first;
393
- if (f === g) gt(f, h);
393
+ if (f === g) _t(f, h);
394
394
  else {
395
- const _ = Gn(f), p = nn(g, null);
395
+ const _ = Xn(f), p = rn(g, null);
396
396
  try {
397
397
  h.replaceChild(p, _);
398
398
  } catch (x) {
@@ -402,32 +402,32 @@ function ro(n, e, t) {
402
402
  }
403
403
  throw x;
404
404
  }
405
- tn(f, null);
405
+ nn(f, null);
406
406
  }
407
407
  const d = le.get(g);
408
408
  M(d) && (ce === null && (ce = d.getFormat()), ue === "" && (ue = d.getStyle()));
409
409
  } else {
410
- const f = rn(s, Je), g = rn(o, le);
411
- if (f.length !== c && T(227), g.length !== u && T(228), c === 0) u !== 0 && qn(g, o, 0, u - 1, l);
410
+ const f = sn(s, je), g = sn(o, le);
411
+ if (f.length !== c && T(227), g.length !== u && T(228), c === 0) u !== 0 && Gn(g, o, 0, u - 1, l);
412
412
  else if (u === 0) {
413
413
  if (c !== 0) {
414
414
  const d = l.after == null && l.before == null && l.element.__lexicalLineBreak == null;
415
- Hn(f, 0, c - 1, d ? null : h), d && (h.textContent = "");
415
+ qn(f, 0, c - 1, d ? null : h), d && (h.textContent = "");
416
416
  }
417
417
  } else (function(d, _, p, x, y, m) {
418
418
  const b = x - 1, N = y - 1;
419
419
  let C, w, k = m.getFirstChild(), S = 0, A = 0;
420
420
  for (; S <= b && A <= N; ) {
421
421
  const K = _[S], P = p[A];
422
- if (K === P) k = An(gt(P, m.element)), S++, A++;
422
+ if (K === P) k = On(_t(P, m.element)), S++, A++;
423
423
  else {
424
424
  C === void 0 && (C = new Set(_)), w === void 0 && (w = new Set(p));
425
425
  const V = w.has(K), _e = C.has(P);
426
426
  if (V) if (_e) {
427
- const pe = ot(Q, P);
428
- pe === k ? k = An(gt(P, m.element)) : (m.withBefore(k).insertChild(pe), gt(P, m.element)), S++, A++;
429
- } else nn(P, m.withBefore(k)), A++;
430
- else k = An(Gn(K)), tn(K, m.element), S++;
427
+ const pe = lt(Q, P);
428
+ pe === k ? k = On(_t(P, m.element)) : (m.withBefore(k).insertChild(pe), _t(P, m.element)), S++, A++;
429
+ } else rn(P, m.withBefore(k)), A++;
430
+ else k = On(Xn(K)), nn(K, m.element), S++;
431
431
  }
432
432
  const B = le.get(P);
433
433
  B !== null && M(B) && (ce === null && (ce = B.getFormat()), ue === "" && (ue = B.getStyle()));
@@ -435,16 +435,16 @@ function ro(n, e, t) {
435
435
  const F = S > b, W = A > N;
436
436
  if (F && !W) {
437
437
  const K = p[N + 1], P = K === void 0 ? null : Q.getElementByKey(K);
438
- qn(p, d, A, N, m.withBefore(P));
439
- } else W && !F && Hn(_, S, b, m.element);
438
+ Gn(p, d, A, N, m.withBefore(P));
439
+ } else W && !F && qn(_, S, b, m.element);
440
440
  })(o, f, g, c, u, l);
441
441
  }
442
- Tn(o) && (J += ke), h.__lexicalTextContent = J, J = a + J;
443
- }(n, e, e.getDOMSlot(t)), Bi(e, t), i = e, ce == null || ce === i.__textFormat || kt || i.setTextFormat(ce), function(s) {
444
- ue === "" || ue === s.__textStyle || kt || s.setTextStyle(ue);
442
+ bn(o) && (J += ke), h.__lexicalTextContent = J, J = a + J;
443
+ }(n, e, e.getDOMSlot(t)), Ri(e, t), i = e, ce == null || ce === i.__textFormat || Tt || i.setTextFormat(ce), function(s) {
444
+ ue === "" || ue === s.__textStyle || Tt || s.setTextStyle(ue);
445
445
  }(e), X = r;
446
446
  }
447
- function rn(n, e) {
447
+ function sn(n, e) {
448
448
  const t = [];
449
449
  let r = n.__first;
450
450
  for (; r !== null; ) {
@@ -453,11 +453,11 @@ function rn(n, e) {
453
453
  }
454
454
  return t;
455
455
  }
456
- function gt(n, e) {
457
- const t = Je.get(n);
456
+ function _t(n, e) {
457
+ const t = je.get(n);
458
458
  let r = le.get(n);
459
459
  t !== void 0 && r !== void 0 || T(61);
460
- const i = Li || Vn.has(n) || jn.has(n), s = ot(Q, n);
460
+ const i = Ii || Yn.has(n) || Vn.has(n), s = lt(Q, n);
461
461
  if (t === r && !i) {
462
462
  if (v(t)) {
463
463
  const o = s.__lexicalTextContent;
@@ -470,112 +470,112 @@ function gt(n, e) {
470
470
  }
471
471
  return s;
472
472
  }
473
- if (t !== r && i && br(vt, St, gn, r, "updated"), r.updateDOM(t, s, De)) {
474
- const o = nn(n, null);
475
- return e === null && T(62), e.replaceChild(o, s), tn(n, null), o;
473
+ if (t !== r && i && Nr(kt, vt, _n, r, "updated"), r.updateDOM(t, s, De)) {
474
+ const o = rn(n, null);
475
+ return e === null && T(62), e.replaceChild(o, s), nn(n, null), o;
476
476
  }
477
477
  if (v(t) && v(r)) {
478
478
  const o = r.__indent;
479
- o !== t.__indent && Ii(s, o);
479
+ o !== t.__indent && Ki(s, o);
480
480
  const l = r.__format;
481
- l !== t.__format && Ki(s, l), i && (ro(t, r, s), ne(r) || r.isInline() || zi(t, r, s)), Tn(r) && (J += ke, Se += ke);
481
+ l !== t.__format && zi(s, l), i && (so(t, r, s), ne(r) || r.isInline() || Bi(t, r, s)), bn(r) && (J += ke, Se += ke);
482
482
  } else {
483
483
  const o = r.getTextContent();
484
484
  if (z(r)) {
485
485
  const l = r.decorate(Q, De);
486
- l !== null && Ri(n, l);
486
+ l !== null && Wi(n, l);
487
487
  } else M(r) && !r.isDirectionless() && (X += o);
488
488
  J += o, Se += o;
489
489
  }
490
- if (!kt && ne(r) && r.__cachedText !== Se) {
490
+ if (!Tt && ne(r) && r.__cachedText !== Se) {
491
491
  const o = r.getWritable();
492
492
  o.__cachedText = Se, r = o;
493
493
  }
494
494
  return s;
495
495
  }
496
- function Ri(n, e) {
496
+ function Wi(n, e) {
497
497
  let t = Q._pendingDecorators;
498
498
  const r = Q._decorators;
499
499
  if (t === null) {
500
500
  if (r[n] === e) return;
501
- t = ms(Q);
501
+ t = Cs(Q);
502
502
  }
503
503
  t[n] = e;
504
504
  }
505
- function An(n) {
505
+ function On(n) {
506
506
  let e = n.nextSibling;
507
507
  return e !== null && e === Q._blockCursorElement && (e = e.nextSibling), e;
508
508
  }
509
- function io(n, e, t, r, i, s) {
510
- J = "", Se = "", X = "", Li = r === it, $t = null, Q = t, De = t._config, St = t._nodes, gn = Q._listeners.mutation, jn = i, Vn = s, Je = n._nodeMap, le = e._nodeMap, kt = e._readOnly, Yn = new Map(t._keyToDOMMap);
509
+ function oo(n, e, t, r, i, s) {
510
+ J = "", Se = "", X = "", Ii = r === st, $t = null, Q = t, De = t._config, vt = t._nodes, _n = Q._listeners.mutation, Vn = i, Yn = s, je = n._nodeMap, le = e._nodeMap, Tt = e._readOnly, Hn = new Map(t._keyToDOMMap);
511
511
  const o = /* @__PURE__ */ new Map();
512
- return vt = o, gt("root", null), Q = void 0, St = void 0, jn = void 0, Vn = void 0, Je = void 0, le = void 0, De = void 0, Yn = void 0, vt = void 0, o;
512
+ return kt = o, _t("root", null), Q = void 0, vt = void 0, Vn = void 0, Yn = void 0, je = void 0, le = void 0, De = void 0, Hn = void 0, kt = void 0, o;
513
513
  }
514
- function Gn(n) {
515
- const e = Yn.get(n);
514
+ function Xn(n) {
515
+ const e = Hn.get(n);
516
516
  return e === void 0 && T(75, n), e;
517
517
  }
518
518
  function D(n) {
519
519
  return { type: n };
520
520
  }
521
- const Wi = D("SELECTION_CHANGE_COMMAND"), Tl = D("SELECTION_INSERT_CLIPBOARD_NODES_COMMAND"), so = D("CLICK_COMMAND"), sn = D("DELETE_CHARACTER_COMMAND"), jt = D("INSERT_LINE_BREAK_COMMAND"), Rr = D("INSERT_PARAGRAPH_COMMAND"), _t = D("CONTROLLED_TEXT_INSERTION_COMMAND"), Ji = D("PASTE_COMMAND"), Wr = D("REMOVE_TEXT_COMMAND"), on = D("DELETE_WORD_COMMAND"), ln = D("DELETE_LINE_COMMAND"), ze = D("FORMAT_TEXT_COMMAND"), Ui = D("UNDO_COMMAND"), $i = D("REDO_COMMAND"), oo = D("KEYDOWN_COMMAND"), lo = D("KEY_ARROW_RIGHT_COMMAND"), ao = D("MOVE_TO_END"), co = D("KEY_ARROW_LEFT_COMMAND"), uo = D("MOVE_TO_START"), fo = D("KEY_ARROW_UP_COMMAND"), ho = D("KEY_ARROW_DOWN_COMMAND"), Xn = D("KEY_ENTER_COMMAND"), go = D("KEY_SPACE_COMMAND"), _o = D("KEY_BACKSPACE_COMMAND"), po = D("KEY_ESCAPE_COMMAND"), yo = D("KEY_DELETE_COMMAND"), mo = D("KEY_TAB_COMMAND"), bl = D("INSERT_TAB_COMMAND"), Nl = D("INDENT_CONTENT_COMMAND"), wl = D("OUTDENT_CONTENT_COMMAND"), xo = D("DROP_COMMAND"), El = D("FORMAT_ELEMENT_COMMAND"), Co = D("DRAGSTART_COMMAND"), So = D("DRAGOVER_COMMAND"), vo = D("DRAGEND_COMMAND"), ji = D("COPY_COMMAND"), Vi = D("CUT_COMMAND"), Jr = D("SELECT_ALL_COMMAND"), Ml = D("CLEAR_EDITOR_COMMAND"), Al = D("CLEAR_HISTORY_COMMAND"), Ol = D("CAN_REDO_COMMAND"), Dl = D("CAN_UNDO_COMMAND"), ko = D("FOCUS_COMMAND"), To = D("BLUR_COMMAND"), bo = D("KEY_MODIFIER_COMMAND"), me = Object.freeze({}), Qn = 30, Zn = [["keydown", function(n, e) {
522
- if (pt = n.timeStamp, Yi = n.key, !e.isComposing() && !E(e, oo, n) && n.key != null) {
523
- if (On && yi(n)) return te(e, () => {
524
- Bt(e, Dn);
525
- }), On = !1, void (Dn = "");
521
+ const Ji = D("SELECTION_CHANGE_COMMAND"), bl = D("SELECTION_INSERT_CLIPBOARD_NODES_COMMAND"), lo = D("CLICK_COMMAND"), on = D("DELETE_CHARACTER_COMMAND"), Vt = D("INSERT_LINE_BREAK_COMMAND"), Wr = D("INSERT_PARAGRAPH_COMMAND"), pt = D("CONTROLLED_TEXT_INSERTION_COMMAND"), Ui = D("PASTE_COMMAND"), Jr = D("REMOVE_TEXT_COMMAND"), ln = D("DELETE_WORD_COMMAND"), an = D("DELETE_LINE_COMMAND"), ze = D("FORMAT_TEXT_COMMAND"), ji = D("UNDO_COMMAND"), $i = D("REDO_COMMAND"), ao = D("KEYDOWN_COMMAND"), co = D("KEY_ARROW_RIGHT_COMMAND"), uo = D("MOVE_TO_END"), fo = D("KEY_ARROW_LEFT_COMMAND"), ho = D("MOVE_TO_START"), go = D("KEY_ARROW_UP_COMMAND"), _o = D("KEY_ARROW_DOWN_COMMAND"), Qn = D("KEY_ENTER_COMMAND"), po = D("KEY_SPACE_COMMAND"), yo = D("KEY_BACKSPACE_COMMAND"), mo = D("KEY_ESCAPE_COMMAND"), xo = D("KEY_DELETE_COMMAND"), Co = D("KEY_TAB_COMMAND"), Nl = D("INSERT_TAB_COMMAND"), wl = D("INDENT_CONTENT_COMMAND"), El = D("OUTDENT_CONTENT_COMMAND"), So = D("DROP_COMMAND"), Ml = D("FORMAT_ELEMENT_COMMAND"), vo = D("DRAGSTART_COMMAND"), ko = D("DRAGOVER_COMMAND"), To = D("DRAGEND_COMMAND"), Vi = D("COPY_COMMAND"), Yi = D("CUT_COMMAND"), Ur = D("SELECT_ALL_COMMAND"), Al = D("CLEAR_EDITOR_COMMAND"), Ol = D("CLEAR_HISTORY_COMMAND"), Dl = D("CAN_REDO_COMMAND"), Pl = D("CAN_UNDO_COMMAND"), bo = D("FOCUS_COMMAND"), No = D("BLUR_COMMAND"), wo = D("KEY_MODIFIER_COMMAND"), me = Object.freeze({}), Zn = 30, er = [["keydown", function(n, e) {
522
+ if (yt = n.timeStamp, Hi = n.key, !e.isComposing() && !E(e, ao, n) && n.key != null) {
523
+ if (Dn && mi(n)) return te(e, () => {
524
+ Rt(e, Pn);
525
+ }), Dn = !1, void (Pn = "");
526
526
  if (function(t) {
527
527
  return I(t, "ArrowRight", { shiftKey: "any" });
528
- }(n)) E(e, lo, n);
528
+ }(n)) E(e, co, n);
529
529
  else if (function(t) {
530
530
  return I(t, "ArrowRight", Ce);
531
- }(n)) E(e, ao, n);
531
+ }(n)) E(e, uo, n);
532
532
  else if (function(t) {
533
533
  return I(t, "ArrowLeft", { shiftKey: "any" });
534
- }(n)) E(e, co, n);
534
+ }(n)) E(e, fo, n);
535
535
  else if (function(t) {
536
536
  return I(t, "ArrowLeft", Ce);
537
- }(n)) E(e, uo, n);
537
+ }(n)) E(e, ho, n);
538
538
  else if (function(t) {
539
539
  return I(t, "ArrowUp", { altKey: "any", shiftKey: "any" });
540
- }(n)) E(e, fo, n);
540
+ }(n)) E(e, go, n);
541
541
  else if (function(t) {
542
542
  return I(t, "ArrowDown", { altKey: "any", shiftKey: "any" });
543
- }(n)) E(e, ho, n);
543
+ }(n)) E(e, _o, n);
544
544
  else if (function(t) {
545
545
  return I(t, "Enter", { altKey: "any", ctrlKey: "any", metaKey: "any", shiftKey: !0 });
546
- }(n)) yt = !0, E(e, Xn, n);
546
+ }(n)) mt = !0, E(e, Qn, n);
547
547
  else if (function(t) {
548
548
  return t.key === " ";
549
- }(n)) E(e, go, n);
549
+ }(n)) E(e, po, n);
550
550
  else if (function(t) {
551
551
  return fe && I(t, "o", { ctrlKey: !0 });
552
- }(n)) n.preventDefault(), yt = !0, E(e, jt, !0);
552
+ }(n)) n.preventDefault(), mt = !0, E(e, Vt, !0);
553
553
  else if (function(t) {
554
554
  return I(t, "Enter", { altKey: "any", ctrlKey: "any", metaKey: "any" });
555
- }(n)) yt = !1, E(e, Xn, n);
555
+ }(n)) mt = !1, E(e, Qn, n);
556
556
  else if (function(t) {
557
557
  return I(t, "Backspace", { shiftKey: "any" }) || fe && I(t, "h", { ctrlKey: !0 });
558
- }(n)) yi(n) ? E(e, _o, n) : (n.preventDefault(), E(e, sn, !0));
558
+ }(n)) mi(n) ? E(e, yo, n) : (n.preventDefault(), E(e, on, !0));
559
559
  else if (function(t) {
560
560
  return t.key === "Escape";
561
- }(n)) E(e, po, n);
561
+ }(n)) E(e, mo, n);
562
562
  else if (function(t) {
563
563
  return I(t, "Delete", {}) || fe && I(t, "d", { ctrlKey: !0 });
564
564
  }(n)) (function(t) {
565
565
  return t.key === "Delete";
566
- })(n) ? E(e, yo, n) : (n.preventDefault(), E(e, sn, !1));
566
+ })(n) ? E(e, xo, n) : (n.preventDefault(), E(e, on, !1));
567
567
  else if (function(t) {
568
- return I(t, "Backspace", pi);
569
- }(n)) n.preventDefault(), E(e, on, !0);
568
+ return I(t, "Backspace", yi);
569
+ }(n)) n.preventDefault(), E(e, ln, !0);
570
570
  else if (function(t) {
571
- return I(t, "Delete", pi);
572
- }(n)) n.preventDefault(), E(e, on, !1);
571
+ return I(t, "Delete", yi);
572
+ }(n)) n.preventDefault(), E(e, ln, !1);
573
573
  else if (function(t) {
574
574
  return fe && I(t, "Backspace", { metaKey: !0 });
575
- }(n)) n.preventDefault(), E(e, ln, !0);
575
+ }(n)) n.preventDefault(), E(e, an, !0);
576
576
  else if (function(t) {
577
577
  return fe && (I(t, "Delete", { metaKey: !0 }) || I(t, "k", { ctrlKey: !0 }));
578
- }(n)) n.preventDefault(), E(e, ln, !1);
578
+ }(n)) n.preventDefault(), E(e, an, !1);
579
579
  else if (function(t) {
580
580
  return I(t, "b", Ce);
581
581
  }(n)) n.preventDefault(), E(e, ze, "bold");
@@ -587,65 +587,65 @@ const Wi = D("SELECTION_CHANGE_COMMAND"), Tl = D("SELECTION_INSERT_CLIPBOARD_NOD
587
587
  }(n)) n.preventDefault(), E(e, ze, "italic");
588
588
  else if (function(t) {
589
589
  return I(t, "Tab", { shiftKey: "any" });
590
- }(n)) E(e, mo, n);
590
+ }(n)) E(e, Co, n);
591
591
  else if (function(t) {
592
592
  return I(t, "z", Ce);
593
- }(n)) n.preventDefault(), E(e, Ui, void 0);
593
+ }(n)) n.preventDefault(), E(e, ji, void 0);
594
594
  else if (function(t) {
595
595
  return fe ? I(t, "z", { metaKey: !0, shiftKey: !0 }) : I(t, "y", { ctrlKey: !0 }) || I(t, "z", { ctrlKey: !0, shiftKey: !0 });
596
596
  }(n)) n.preventDefault(), E(e, $i, void 0);
597
597
  else {
598
598
  const t = e._editorState._selection;
599
- t === null || O(t) ? !Me && mi(n) && (n.preventDefault(), E(e, Jr, n)) : function(r) {
599
+ t === null || O(t) ? xi(n) && (n.preventDefault(), E(e, Ur, n)) : function(r) {
600
600
  return I(r, "c", Ce);
601
- }(n) ? (n.preventDefault(), E(e, ji, n)) : function(r) {
601
+ }(n) ? (n.preventDefault(), E(e, Vi, n)) : function(r) {
602
602
  return I(r, "x", Ce);
603
- }(n) ? (n.preventDefault(), E(e, Vi, n)) : mi(n) && (n.preventDefault(), E(e, Jr, n));
603
+ }(n) ? (n.preventDefault(), E(e, Yi, n)) : xi(n) && (n.preventDefault(), E(e, Ur, n));
604
604
  }
605
605
  (function(t) {
606
606
  return t.ctrlKey || t.shiftKey || t.altKey || t.metaKey;
607
- })(n) && E(e, bo, n);
607
+ })(n) && E(e, wo, n);
608
608
  }
609
609
  }], ["pointerdown", function(n, e) {
610
610
  const t = n.target, r = n.pointerType;
611
- Pt(t) && r !== "touch" && r !== "pen" && n.button === 0 && te(e, () => {
612
- hi(t) || (tr = !0);
611
+ Ft(t) && r !== "touch" && r !== "pen" && n.button === 0 && te(e, () => {
612
+ gi(t) || (nr = !0);
613
613
  });
614
614
  }], ["compositionstart", function(n, e) {
615
615
  te(e, () => {
616
616
  const t = L();
617
617
  if (O(t) && !e.isComposing()) {
618
618
  const r = t.anchor, i = t.anchor.getNode();
619
- H(r.key), (n.timeStamp < pt + Qn || r.type === "element" || !t.isCollapsed() || i.getFormat() !== t.format || M(i) && i.getStyle() !== t.style) && E(e, _t, Js);
619
+ H(r.key), (n.timeStamp < yt + Zn || r.type === "element" || !t.isCollapsed() || i.getFormat() !== t.format || M(i) && i.getStyle() !== t.style) && E(e, pt, js);
620
620
  }
621
621
  });
622
622
  }], ["compositionend", function(n, e) {
623
- Me ? ht = !0 : rt || !Ct && !Xt ? te(e, () => {
624
- Bt(e, n.data);
625
- }) : (On = !0, Dn = n.data);
623
+ We ? gt = !0 : it || !St && !Qt ? te(e, () => {
624
+ Rt(e, n.data);
625
+ }) : (Dn = !0, Pn = n.data);
626
626
  }], ["input", function(n, e) {
627
627
  n.stopPropagation(), te(e, () => {
628
- if (ee(n.target) && hi(n.target)) return;
629
- const t = L(), r = n.data, i = Qi(n);
630
- if (r != null && O(t) && Gi(t, i, r, n.timeStamp, !1)) {
631
- ht && (Bt(e, r), ht = !1);
628
+ if (ee(n.target) && gi(n.target)) return;
629
+ const t = L(), r = n.data, i = Zi(n);
630
+ if (r != null && O(t) && Xi(t, i, r, n.timeStamp, !1)) {
631
+ gt && (Rt(e, r), gt = !1);
632
632
  const s = t.anchor.getNode(), o = Te(oe(e));
633
633
  if (o === null) return;
634
634
  const l = t.isBackward(), a = l ? t.anchor.offset : t.focus.offset, c = l ? t.focus.offset : t.anchor.offset;
635
- Gt && !t.isCollapsed() && M(s) && o.anchorNode !== null && s.getTextContent().slice(0, a) + r + s.getTextContent().slice(a + c) === vs(o.anchorNode) || E(e, _t, r);
635
+ Xt && !t.isCollapsed() && M(s) && o.anchorNode !== null && s.getTextContent().slice(0, a) + r + s.getTextContent().slice(a + c) === Ts(o.anchorNode) || E(e, pt, r);
636
636
  const u = r.length;
637
- Me && u > 1 && n.inputType === "insertCompositionText" && !e.isComposing() && (t.anchor.offset -= u), Ct || rt || Xt || !e.isComposing() || (pt = 0, H(null));
637
+ We && u > 1 && n.inputType === "insertCompositionText" && !e.isComposing() && (t.anchor.offset -= u), St || it || Qt || !e.isComposing() || (yt = 0, H(null));
638
638
  } else
639
- kr(!1, e, r !== null ? r : void 0), ht && (Bt(e, r || void 0), ht = !1);
639
+ Tr(!1, e, r !== null ? r : void 0), gt && (Rt(e, r || void 0), gt = !1);
640
640
  (function() {
641
641
  G();
642
642
  const s = R();
643
- Pi(s);
643
+ Fi(s);
644
644
  })();
645
- }, { event: n }), Xe = null;
645
+ }, { event: n }), Ze = null;
646
646
  }], ["click", function(n, e) {
647
647
  te(e, () => {
648
- const t = L(), r = Te(oe(e)), i = ut();
648
+ const t = L(), r = Te(oe(e)), i = ft();
649
649
  if (r) {
650
650
  if (O(t)) {
651
651
  const s = t.anchor, o = s.getNode();
@@ -663,41 +663,41 @@ const Wi = D("SELECTION_CHANGE_COMMAND"), Tl = D("SELECTION_INSERT_CLIPBOARD_NOD
663
663
  }
664
664
  } else if (n.pointerType === "touch" || n.pointerType === "pen") {
665
665
  const s = r.anchorNode;
666
- (ee(s) || be(s)) && ie(yn(i, r, e, n));
666
+ (ee(s) || be(s)) && ie(mn(i, r, e, n));
667
667
  }
668
668
  }
669
- E(e, so, n);
669
+ E(e, lo, n);
670
670
  });
671
671
  }], ["cut", me], ["copy", me], ["dragstart", me], ["dragover", me], ["dragend", me], ["paste", me], ["focus", me], ["blur", me], ["drop", me]];
672
- Gt && Zn.push(["beforeinput", (n, e) => function(t, r) {
673
- const i = t.inputType, s = Qi(t);
674
- i === "deleteCompositionText" || Me && ks(r) || i !== "insertCompositionText" && te(r, () => {
672
+ Xt && er.push(["beforeinput", (n, e) => function(t, r) {
673
+ const i = t.inputType, s = Zi(t);
674
+ i === "deleteCompositionText" || We && bs(r) || i !== "insertCompositionText" && te(r, () => {
675
675
  const o = L();
676
676
  if (i === "deleteContentBackward") {
677
677
  if (o === null) {
678
- const g = ut();
678
+ const g = ft();
679
679
  if (!O(g)) return;
680
680
  ie(g.clone());
681
681
  }
682
682
  if (O(o)) {
683
683
  const g = o.anchor.key === o.focus.key;
684
- if (l = t.timeStamp, Yi === "MediaLast" && l < pt + Qn && r.isComposing() && g) {
685
- if (H(null), pt = 0, setTimeout(() => {
684
+ if (l = t.timeStamp, Hi === "MediaLast" && l < yt + Zn && r.isComposing() && g) {
685
+ if (H(null), yt = 0, setTimeout(() => {
686
686
  te(r, () => {
687
687
  H(null);
688
688
  });
689
- }, Qn), O(o)) {
689
+ }, Zn), O(o)) {
690
690
  const d = o.anchor.getNode();
691
- d.markDirty(), M(d) || T(142), Xi(o, d);
691
+ d.markDirty(), M(d) || T(142), Qi(o, d);
692
692
  }
693
693
  } else {
694
694
  H(null), t.preventDefault();
695
695
  const d = o.anchor.getNode(), _ = d.getTextContent(), p = d.canInsertTextAfter(), x = o.anchor.offset === 0 && o.focus.offset === _.length;
696
- let y = Pr && g && !x && p;
697
- if (y && o.isCollapsed() && (y = !z(Go(o.anchor, !0))), !y) {
698
- E(r, sn, !0);
696
+ let y = Fr && g && !x && p;
697
+ if (y && o.isCollapsed() && (y = !z(Xo(o.anchor, !0))), !y) {
698
+ E(r, on, !0);
699
699
  const m = L();
700
- Pr && O(m) && m.isCollapsed() && (Ke = m, setTimeout(() => Ke = null));
700
+ Fr && O(m) && m.isCollapsed() && (Ke = m, setTimeout(() => Ke = null));
701
701
  }
702
702
  }
703
703
  return;
@@ -706,53 +706,53 @@ Gt && Zn.push(["beforeinput", (n, e) => function(t, r) {
706
706
  var l;
707
707
  if (!O(o)) return;
708
708
  const a = t.data;
709
- Xe !== null && kr(!1, r, Xe), o.dirty && Xe === null || !o.isCollapsed() || ne(o.anchor.getNode()) || s === null || o.applyDOMRange(s), Xe = null;
709
+ Ze !== null && Tr(!1, r, Ze), o.dirty && Ze === null || !o.isCollapsed() || ne(o.anchor.getNode()) || s === null || o.applyDOMRange(s), Ze = null;
710
710
  const c = o.anchor, u = o.focus, h = c.getNode(), f = u.getNode();
711
711
  if (i !== "insertText" && i !== "insertTranspose") switch (t.preventDefault(), i) {
712
712
  case "insertFromYank":
713
713
  case "insertFromDrop":
714
714
  case "insertReplacementText":
715
- E(r, _t, t);
715
+ E(r, pt, t);
716
716
  break;
717
717
  case "insertFromComposition":
718
- H(null), E(r, _t, t);
718
+ H(null), E(r, pt, t);
719
719
  break;
720
720
  case "insertLineBreak":
721
- H(null), E(r, jt, !1);
721
+ H(null), E(r, Vt, !1);
722
722
  break;
723
723
  case "insertParagraph":
724
- H(null), yt && !rt ? (yt = !1, E(r, jt, !1)) : E(r, Rr, void 0);
724
+ H(null), mt && !it ? (mt = !1, E(r, Vt, !1)) : E(r, Wr, void 0);
725
725
  break;
726
726
  case "insertFromPaste":
727
727
  case "insertFromPasteAsQuotation":
728
- E(r, Ji, t);
728
+ E(r, Ui, t);
729
729
  break;
730
730
  case "deleteByComposition":
731
731
  (function(g, d) {
732
- return g !== d || v(g) || v(d) || !g.isToken() || !d.isToken();
733
- })(h, f) && E(r, Wr, t);
732
+ return g !== d || v(g) || v(d) || !Be(g) || !Be(d);
733
+ })(h, f) && E(r, Jr, t);
734
734
  break;
735
735
  case "deleteByDrag":
736
736
  case "deleteByCut":
737
- E(r, Wr, t);
737
+ E(r, Jr, t);
738
738
  break;
739
739
  case "deleteContent":
740
- E(r, sn, !1);
740
+ E(r, on, !1);
741
741
  break;
742
742
  case "deleteWordBackward":
743
- E(r, on, !0);
743
+ E(r, ln, !0);
744
744
  break;
745
745
  case "deleteWordForward":
746
- E(r, on, !1);
746
+ E(r, ln, !1);
747
747
  break;
748
748
  case "deleteHardLineBackward":
749
749
  case "deleteSoftLineBackward":
750
- E(r, ln, !0);
750
+ E(r, an, !0);
751
751
  break;
752
752
  case "deleteContentForward":
753
753
  case "deleteHardLineForward":
754
754
  case "deleteSoftLineForward":
755
- E(r, ln, !1);
755
+ E(r, an, !1);
756
756
  break;
757
757
  case "formatStrikeThrough":
758
758
  E(r, ze, "strikethrough");
@@ -767,46 +767,46 @@ Gt && Zn.push(["beforeinput", (n, e) => function(t, r) {
767
767
  E(r, ze, "underline");
768
768
  break;
769
769
  case "historyUndo":
770
- E(r, Ui, void 0);
770
+ E(r, ji, void 0);
771
771
  break;
772
772
  case "historyRedo":
773
773
  E(r, $i, void 0);
774
774
  }
775
775
  else {
776
776
  if (a === `
777
- `) t.preventDefault(), E(r, jt, !1);
778
- else if (a === ke) t.preventDefault(), E(r, Rr, void 0);
777
+ `) t.preventDefault(), E(r, Vt, !1);
778
+ else if (a === ke) t.preventDefault(), E(r, Wr, void 0);
779
779
  else if (a == null && t.dataTransfer) {
780
780
  const g = t.dataTransfer.getData("text/plain");
781
781
  t.preventDefault(), o.insertRawText(g);
782
- } else a != null && Gi(o, s, a, t.timeStamp, !0) ? (t.preventDefault(), E(r, _t, a)) : Xe = a;
783
- Hi = t.timeStamp;
782
+ } else a != null && Xi(o, s, a, t.timeStamp, !0) ? (t.preventDefault(), E(r, pt, a)) : Ze = a;
783
+ qi = t.timeStamp;
784
784
  }
785
785
  });
786
786
  }(n, e)]);
787
- let pt = 0, Yi = null, Hi = 0, Xe = null;
788
- const an = /* @__PURE__ */ new WeakMap();
789
- let er = !1, tr = !1, yt = !1, ht = !1, On = !1, Dn = "", Ke = null, qi = [0, "", 0, "root", 0];
790
- function Gi(n, e, t, r, i) {
787
+ let yt = 0, Hi = null, qi = 0, Ze = null;
788
+ const cn = /* @__PURE__ */ new WeakMap();
789
+ let tr = !1, nr = !1, mt = !1, gt = !1, Dn = !1, Pn = "", Ke = null, Gi = [0, "", 0, "root", 0];
790
+ function Xi(n, e, t, r, i) {
791
791
  const s = n.anchor, o = n.focus, l = s.getNode(), a = R(), c = Te(oe(a)), u = c !== null ? c.anchorNode : null, h = s.key, f = a.getElementByKey(h), g = t.length;
792
- return h !== o.key || !M(l) || (!i && (!Gt || Hi < r + 50) || l.isDirty() && g < 2 || Cs(t)) && s.offset !== o.offset && !l.isComposing() || Qe(l) || l.isDirty() && g > 1 || (i || !Gt) && f !== null && !l.isComposing() && u !== st(f) || c !== null && e !== null && (!e.collapsed || e.startContainer !== c.anchorNode || e.startOffset !== c.anchorOffset) || l.getFormat() !== n.format || l.getStyle() !== n.style || function(d, _) {
792
+ return h !== o.key || !M(l) || (!i && (!Xt || qi < r + 50) || l.isDirty() && g < 2 || vs(t)) && s.offset !== o.offset && !l.isComposing() || we(l) || l.isDirty() && g > 1 || (i || !Xt) && f !== null && !l.isComposing() && u !== ot(f) || c !== null && e !== null && (!e.collapsed || e.startContainer !== c.anchorNode || e.startOffset !== c.anchorOffset) || l.getFormat() !== n.format || l.getStyle() !== n.style || function(d, _) {
793
793
  if (_.isSegmented()) return !0;
794
794
  if (!d.isCollapsed()) return !1;
795
- const p = d.anchor.offset, x = _.getParentOrThrow(), y = _.isToken();
795
+ const p = d.anchor.offset, x = _.getParentOrThrow(), y = Be(_);
796
796
  return p === 0 ? !_.canInsertTextBefore() || !x.canInsertTextBefore() && !_.isComposing() || y || function(m) {
797
797
  const b = m.getPreviousSibling();
798
798
  return (M(b) || v(b) && b.isInline()) && !b.canInsertTextAfter();
799
799
  }(_) : p === _.getTextContentSize() && (!_.canInsertTextAfter() || !x.canInsertTextAfter() && !_.isComposing() || y);
800
800
  }(n, l);
801
801
  }
802
- function Ur(n, e) {
802
+ function jr(n, e) {
803
803
  return be(n) && n.nodeValue !== null && e !== 0 && e !== n.nodeValue.length;
804
804
  }
805
805
  function $r(n, e, t) {
806
806
  const { anchorNode: r, anchorOffset: i, focusNode: s, focusOffset: o } = n;
807
- er && (er = !1, Ur(r, i) && Ur(s, o) && !Ke) || te(e, () => {
807
+ tr && (tr = !1, jr(r, i) && jr(s, o) && !Ke) || te(e, () => {
808
808
  if (!t) return void ie(null);
809
- if (!Sn(e, r, s)) return;
809
+ if (!vn(e, r, s)) return;
810
810
  let l = L();
811
811
  if (Ke && O(l) && l.isCollapsed()) {
812
812
  const a = l.anchor, c = Ke.anchor;
@@ -816,20 +816,20 @@ function $r(n, e, t) {
816
816
  const a = l.anchor, c = a.getNode();
817
817
  if (l.isCollapsed()) {
818
818
  n.type === "Range" && n.anchorNode === n.focusNode && (l.dirty = !0);
819
- const u = oe(e).event, h = u ? u.timeStamp : performance.now(), [f, g, d, _, p] = qi, x = re(), y = e.isComposing() === !1 && x.getTextContent() === "";
820
- if (h < p + 200 && a.offset === d && a.key === _) Vt(l, f, g);
821
- else if (a.type === "text") M(c) || T(141), Xi(l, c);
819
+ const u = oe(e).event, h = u ? u.timeStamp : performance.now(), [f, g, d, _, p] = Gi, x = re(), y = e.isComposing() === !1 && x.getTextContent() === "";
820
+ if (h < p + 200 && a.offset === d && a.key === _) Yt(l, f, g);
821
+ else if (a.type === "text") M(c) || T(141), Qi(l, c);
822
822
  else if (a.type === "element" && !y) {
823
823
  v(c) || T(259);
824
824
  const m = a.getNode();
825
825
  m.isEmpty() ? function(b, N) {
826
826
  const C = N.getTextFormat(), w = N.getTextStyle();
827
- Vt(b, C, w);
828
- }(l, m) : Vt(l, 0, "");
827
+ Yt(b, C, w);
828
+ }(l, m) : Yt(l, 0, "");
829
829
  }
830
830
  } else {
831
831
  const u = a.key, h = l.focus.key, f = l.getNodes(), g = f.length, d = l.isBackward(), _ = d ? o : i, p = d ? i : o, x = d ? h : u, y = d ? u : h;
832
- let m = Ws, b = !1;
832
+ let m = Us, b = !1;
833
833
  for (let N = 0; N < g; N++) {
834
834
  const C = f[N], w = C.getTextContentSize();
835
835
  if (M(C) && w !== 0 && !(N === 0 && C.__key === x && _ === w || N === g - 1 && C.__key === y && p === 0) && (b = !0, m &= C.getFormat(), m === 0)) break;
@@ -837,78 +837,78 @@ function $r(n, e, t) {
837
837
  l.format = b ? m : 0;
838
838
  }
839
839
  }
840
- E(e, Wi, void 0);
840
+ E(e, Ji, void 0);
841
841
  });
842
842
  }
843
- function Vt(n, e, t) {
843
+ function Yt(n, e, t) {
844
844
  n.format === e && n.style === t || (n.format = e, n.style = t, n.dirty = !0);
845
845
  }
846
- function Xi(n, e) {
847
- Vt(n, e.getFormat(), e.getStyle());
846
+ function Qi(n, e) {
847
+ Yt(n, e.getFormat(), e.getStyle());
848
848
  }
849
- function Qi(n) {
849
+ function Zi(n) {
850
850
  if (!n.getTargetRanges) return null;
851
851
  const e = n.getTargetRanges();
852
852
  return e.length === 0 ? null : e[0];
853
853
  }
854
- function Bt(n, e) {
854
+ function Rt(n, e) {
855
855
  const t = n._compositionKey;
856
856
  if (H(null), t !== null && e != null) {
857
857
  if (e === "") {
858
- const r = j(t), i = st(n.getElementByKey(t));
859
- return void (i !== null && i.nodeValue !== null && M(r) && Tr(r, i.nodeValue, null, null, !0));
858
+ const r = $(t), i = ot(n.getElementByKey(t));
859
+ return void (i !== null && i.nodeValue !== null && M(r) && br(r, i.nodeValue, null, null, !0));
860
860
  }
861
861
  if (e[e.length - 1] === `
862
862
  `) {
863
863
  const r = L();
864
864
  if (O(r)) {
865
865
  const i = r.focus;
866
- return r.anchor.set(i.key, i.offset, i.type), void E(n, Xn, null);
866
+ return r.anchor.set(i.key, i.offset, i.type), void E(n, Qn, null);
867
867
  }
868
868
  }
869
869
  }
870
- kr(!0, n, e);
870
+ Tr(!0, n, e);
871
871
  }
872
- function Zi(n) {
872
+ function es(n) {
873
873
  let e = n.__lexicalEventHandles;
874
874
  return e === void 0 && (e = [], n.__lexicalEventHandles = e), e;
875
875
  }
876
- const et = /* @__PURE__ */ new Map();
877
- function es(n) {
878
- const e = nl(n.target);
876
+ const tt = /* @__PURE__ */ new Map();
877
+ function ts(n) {
878
+ const e = rl(n.target);
879
879
  if (e === null) return;
880
- const t = _s(e.anchorNode);
880
+ const t = ys(e.anchorNode);
881
881
  if (t === null) return;
882
- tr && (tr = !1, te(t, () => {
883
- const a = ut(), c = e.anchorNode;
884
- (ee(c) || be(c)) && ie(yn(a, e, t, n));
882
+ nr && (nr = !1, te(t, () => {
883
+ const a = ft(), c = e.anchorNode;
884
+ (ee(c) || be(c)) && ie(mn(a, e, t, n));
885
885
  }));
886
- const r = vr(t), i = r[r.length - 1], s = i._key, o = et.get(s), l = o || i;
887
- l !== t && $r(e, l, !1), $r(e, t, !0), t !== i ? et.set(s, t) : o && et.delete(s);
886
+ const r = kr(t), i = r[r.length - 1], s = i._key, o = tt.get(s), l = o || i;
887
+ l !== t && $r(e, l, !1), $r(e, t, !0), t !== i ? tt.set(s, t) : o && tt.delete(s);
888
888
  }
889
- function jr(n) {
889
+ function Vr(n) {
890
890
  n._lexicalHandled = !0;
891
891
  }
892
- function Vr(n) {
892
+ function Yr(n) {
893
893
  return n._lexicalHandled === !0;
894
894
  }
895
- function No(n) {
896
- const e = n.ownerDocument, t = an.get(e);
895
+ function Eo(n) {
896
+ const e = n.ownerDocument, t = cn.get(e);
897
897
  if (t === void 0) return;
898
898
  const r = t - 1;
899
- r >= 0 || T(164), an.set(e, r), r === 0 && e.removeEventListener("selectionchange", es);
900
- const i = vn(n);
901
- Cr(i) ? (function(o) {
899
+ r >= 0 || T(164), cn.set(e, r), r === 0 && e.removeEventListener("selectionchange", ts);
900
+ const i = kn(n);
901
+ Sr(i) ? (function(o) {
902
902
  if (o._parentEditor !== null) {
903
- const l = vr(o), a = l[l.length - 1]._key;
904
- et.get(a) === o && et.delete(a);
905
- } else et.delete(o._key);
903
+ const l = kr(o), a = l[l.length - 1]._key;
904
+ tt.get(a) === o && tt.delete(a);
905
+ } else tt.delete(o._key);
906
906
  }(i), n.__lexicalEditor = null) : i && T(198);
907
- const s = Zi(n);
907
+ const s = es(n);
908
908
  for (let o = 0; o < s.length; o++) s[o]();
909
909
  n.__lexicalEventHandles = [];
910
910
  }
911
- function nr(n, e, t) {
911
+ function rr(n, e, t) {
912
912
  G();
913
913
  const r = n.__key, i = n.getParent();
914
914
  if (i === null) return;
@@ -916,20 +916,20 @@ function nr(n, e, t) {
916
916
  const a = L();
917
917
  if (!O(a) || !v(l)) return a;
918
918
  const { anchor: c, focus: u } = a, h = c.getNode(), f = u.getNode();
919
- return rr(h, l) && c.set(l.__key, 0, "element"), rr(f, l) && u.set(l.__key, 0, "element"), a;
919
+ return ir(h, l) && c.set(l.__key, 0, "element"), ir(f, l) && u.set(l.__key, 0, "element"), a;
920
920
  }(n);
921
921
  let o = !1;
922
922
  if (O(s) && e) {
923
923
  const l = s.anchor, a = s.focus;
924
- l.key === r && (un(l, n, i, n.getPreviousSibling(), n.getNextSibling()), o = !0), a.key === r && (un(a, n, i, n.getPreviousSibling(), n.getNextSibling()), o = !0);
925
- } else pr(s) && e && n.isSelected() && n.selectPrevious();
924
+ l.key === r && (fn(l, n, i, n.getPreviousSibling(), n.getNextSibling()), o = !0), a.key === r && (fn(a, n, i, n.getPreviousSibling(), n.getNextSibling()), o = !0);
925
+ } else yr(s) && e && n.isSelected() && n.selectPrevious();
926
926
  if (O(s) && e && !o) {
927
927
  const l = n.getIndexWithinParent();
928
- Be(n), cn(s, i, l, -1);
929
- } else Be(n);
930
- t || Le(i) || i.canBeEmpty() || !i.isEmpty() || nr(i, e), e && s && ne(i) && i.isEmpty() && i.selectEnd();
928
+ Re(n), un(s, i, l, -1);
929
+ } else Re(n);
930
+ t || Le(i) || i.canBeEmpty() || !i.isEmpty() || rr(i, e), e && s && ne(i) && i.isEmpty() && i.selectEnd();
931
931
  }
932
- class _n {
932
+ class pn {
933
933
  static getType() {
934
934
  T(64, this.name);
935
935
  }
@@ -940,7 +940,7 @@ class _n {
940
940
  this.__parent = e.__parent, this.__next = e.__next, this.__prev = e.__prev, this.__state = e.__state;
941
941
  }
942
942
  constructor(e) {
943
- this.__type = this.constructor.getType(), this.__parent = null, this.__prev = null, this.__next = null, Object.defineProperty(this, "__state", { configurable: !0, enumerable: !1, value: void 0, writable: !0 }), ps(this, e);
943
+ this.__type = this.constructor.getType(), this.__parent = null, this.__prev = null, this.__next = null, Object.defineProperty(this, "__state", { configurable: !0, enumerable: !1, value: void 0, writable: !0 }), ms(this, e);
944
944
  }
945
945
  getType() {
946
946
  return this.__type;
@@ -952,7 +952,7 @@ class _n {
952
952
  let e = this.__key;
953
953
  for (; e !== null; ) {
954
954
  if (e === "root") return !0;
955
- const t = j(e);
955
+ const t = $(e);
956
956
  if (t === null) break;
957
957
  e = t.__parent;
958
958
  }
@@ -988,7 +988,7 @@ class _n {
988
988
  }
989
989
  getParent() {
990
990
  const e = this.getLatest().__parent;
991
- return e === null ? null : j(e);
991
+ return e === null ? null : $(e);
992
992
  }
993
993
  getParentOrThrow() {
994
994
  const e = this.getParent();
@@ -1021,7 +1021,7 @@ class _n {
1021
1021
  }
1022
1022
  getPreviousSibling() {
1023
1023
  const e = this.getLatest().__prev;
1024
- return e === null ? null : j(e);
1024
+ return e === null ? null : $(e);
1025
1025
  }
1026
1026
  getPreviousSiblings() {
1027
1027
  const e = [], t = this.getParent();
@@ -1032,7 +1032,7 @@ class _n {
1032
1032
  }
1033
1033
  getNextSibling() {
1034
1034
  const e = this.getLatest().__next;
1035
- return e === null ? null : j(e);
1035
+ return e === null ? null : $(e);
1036
1036
  }
1037
1037
  getNextSiblings() {
1038
1038
  const e = [];
@@ -1041,18 +1041,18 @@ class _n {
1041
1041
  return e;
1042
1042
  }
1043
1043
  getCommonAncestor(e) {
1044
- const t = v(this) ? this : this.getParent(), r = v(e) ? e : e.getParent(), i = t && r ? Ht(t, r) : null;
1044
+ const t = v(this) ? this : this.getParent(), r = v(e) ? e : e.getParent(), i = t && r ? qt(t, r) : null;
1045
1045
  return i ? i.commonAncestor : null;
1046
1046
  }
1047
1047
  is(e) {
1048
1048
  return e != null && this.__key === e.__key;
1049
1049
  }
1050
1050
  isBefore(e) {
1051
- const t = Ht(this, e);
1052
- return t !== null && (t.type === "descendant" || (t.type === "branch" ? Es(t) === -1 : (t.type !== "same" && t.type !== "ancestor" && T(279), !1)));
1051
+ const t = qt(this, e);
1052
+ return t !== null && (t.type === "descendant" || (t.type === "branch" ? As(t) === -1 : (t.type !== "same" && t.type !== "ancestor" && T(279), !1)));
1053
1053
  }
1054
1054
  isParentOf(e) {
1055
- const t = Ht(this, e);
1055
+ const t = qt(this, e);
1056
1056
  return t !== null && t.type === "ancestor";
1057
1057
  }
1058
1058
  getNodesBetween(e) {
@@ -1087,15 +1087,15 @@ class _n {
1087
1087
  return e !== null && e.has(this.__key);
1088
1088
  }
1089
1089
  getLatest() {
1090
- const e = j(this.__key);
1090
+ const e = $(this.__key);
1091
1091
  return e === null && T(113), e;
1092
1092
  }
1093
1093
  getWritable() {
1094
1094
  G();
1095
1095
  const e = Fe(), t = R(), r = e._nodeMap, i = this.__key, s = this.getLatest(), o = t._cloneNotNeeded, l = L();
1096
- if (l !== null && l.setCachedNodes(null), o.has(i)) return dn(s), s;
1097
- const a = ol(s);
1098
- return o.add(i), dn(a), r.set(i, a), a;
1096
+ if (l !== null && l.setCachedNodes(null), o.has(i)) return hn(s), s;
1097
+ const a = ll(s);
1098
+ return o.add(i), hn(a), r.set(i, a), a;
1099
1099
  }
1100
1100
  getTextContent() {
1101
1101
  return "";
@@ -1122,38 +1122,38 @@ class _n {
1122
1122
  updateFromJSON(e) {
1123
1123
  return function(t, r) {
1124
1124
  const i = t.getWritable();
1125
- return (r || i.__state) && to(t).updateFromJSON(r), i;
1125
+ return (r || i.__state) && ro(t).updateFromJSON(r), i;
1126
1126
  }(this, e.$);
1127
1127
  }
1128
1128
  static transform() {
1129
1129
  return null;
1130
1130
  }
1131
1131
  remove(e) {
1132
- nr(this, !0, e);
1132
+ rr(this, !0, e);
1133
1133
  }
1134
1134
  replace(e, t) {
1135
1135
  G();
1136
1136
  let r = L();
1137
- r !== null && (r = r.clone()), Bn(this, e);
1137
+ r !== null && (r = r.clone()), Rn(this, e);
1138
1138
  const i = this.getLatest(), s = this.__key, o = e.__key, l = e.getWritable(), a = this.getParentOrThrow().getWritable(), c = a.__size;
1139
- Be(l);
1139
+ Re(l);
1140
1140
  const u = i.getPreviousSibling(), h = i.getNextSibling(), f = i.__prev, g = i.__next, d = i.__parent;
1141
- if (nr(i, !1, !0), u === null ? a.__first = o : u.getWritable().__next = o, l.__prev = f, h === null ? a.__last = o : h.getWritable().__prev = o, l.__next = g, l.__parent = d, a.__size = c, t && (v(this) && v(l) || T(139), this.getChildren().forEach((_) => {
1141
+ if (rr(i, !1, !0), u === null ? a.__first = o : u.getWritable().__next = o, l.__prev = f, h === null ? a.__last = o : h.getWritable().__prev = o, l.__next = g, l.__parent = d, a.__size = c, t && (v(this) && v(l) || T(139), this.getChildren().forEach((_) => {
1142
1142
  l.append(_);
1143
1143
  })), O(r)) {
1144
1144
  ie(r);
1145
1145
  const _ = r.anchor, p = r.focus;
1146
- _.key === s && Gr(_, l), p.key === s && Gr(p, l);
1146
+ _.key === s && Xr(_, l), p.key === s && Xr(p, l);
1147
1147
  }
1148
- return Ee() === s && H(o), l;
1148
+ return Me() === s && H(o), l;
1149
1149
  }
1150
1150
  insertAfter(e, t = !0) {
1151
- G(), Bn(this, e);
1151
+ G(), Rn(this, e);
1152
1152
  const r = this.getWritable(), i = e.getWritable(), s = i.getParent(), o = L();
1153
1153
  let l = !1, a = !1;
1154
1154
  if (s !== null) {
1155
1155
  const g = e.getIndexWithinParent();
1156
- if (Be(i), O(o)) {
1156
+ if (Re(i), O(o)) {
1157
1157
  const d = s.__key, _ = o.anchor, p = o.focus;
1158
1158
  l = _.type === "element" && _.key === d && _.offset === g + 1, a = p.type === "element" && p.key === d && p.offset === g + 1;
1159
1159
  }
@@ -1161,20 +1161,20 @@ class _n {
1161
1161
  const c = this.getNextSibling(), u = this.getParentOrThrow().getWritable(), h = i.__key, f = r.__next;
1162
1162
  if (c === null ? u.__last = h : c.getWritable().__prev = h, u.__size++, r.__next = h, i.__next = f, i.__prev = r.__key, i.__parent = r.__parent, t && O(o)) {
1163
1163
  const g = this.getIndexWithinParent();
1164
- cn(o, u, g + 1);
1164
+ un(o, u, g + 1);
1165
1165
  const d = u.__key;
1166
1166
  l && o.anchor.set(d, g + 2, "element"), a && o.focus.set(d, g + 2, "element");
1167
1167
  }
1168
1168
  return e;
1169
1169
  }
1170
1170
  insertBefore(e, t = !0) {
1171
- G(), Bn(this, e);
1171
+ G(), Rn(this, e);
1172
1172
  const r = this.getWritable(), i = e.getWritable(), s = i.__key;
1173
- Be(i);
1173
+ Re(i);
1174
1174
  const o = this.getPreviousSibling(), l = this.getParentOrThrow().getWritable(), a = r.__prev, c = this.getIndexWithinParent();
1175
1175
  o === null ? l.__first = s : o.getWritable().__next = s, l.__size++, r.__prev = s, i.__prev = a, i.__next = r.__key, i.__parent = r.__parent;
1176
1176
  const u = L();
1177
- return t && O(u) && cn(u, this.getParentOrThrow(), c), e;
1177
+ return t && O(u) && un(u, this.getParentOrThrow(), c), e;
1178
1178
  }
1179
1179
  isParentRequired() {
1180
1180
  return !1;
@@ -1217,12 +1217,12 @@ class _n {
1217
1217
  this.markDirty();
1218
1218
  }
1219
1219
  }
1220
- class wt extends _n {
1220
+ class Et extends pn {
1221
1221
  static getType() {
1222
1222
  return "linebreak";
1223
1223
  }
1224
1224
  static clone(e) {
1225
- return new wt(e.__key);
1225
+ return new Et(e.__key);
1226
1226
  }
1227
1227
  constructor(e) {
1228
1228
  super(e);
@@ -1243,57 +1243,57 @@ class wt extends _n {
1243
1243
  static importDOM() {
1244
1244
  return { br: (e) => function(t) {
1245
1245
  const r = t.parentElement;
1246
- if (r !== null && Ci(r)) {
1246
+ if (r !== null && Si(r)) {
1247
1247
  const i = r.firstChild;
1248
- if (i === t || i.nextSibling === t && Rt(i)) {
1248
+ if (i === t || i.nextSibling === t && Wt(i)) {
1249
1249
  const s = r.lastChild;
1250
- if (s === t || s.previousSibling === t && Rt(s)) return !0;
1250
+ if (s === t || s.previousSibling === t && Wt(s)) return !0;
1251
1251
  }
1252
1252
  }
1253
1253
  return !1;
1254
1254
  }(e) || function(t) {
1255
1255
  const r = t.parentElement;
1256
- if (r !== null && Ci(r)) {
1256
+ if (r !== null && Si(r)) {
1257
1257
  const i = r.firstChild;
1258
- if (i === t || i.nextSibling === t && Rt(i)) return !1;
1258
+ if (i === t || i.nextSibling === t && Wt(i)) return !1;
1259
1259
  const s = r.lastChild;
1260
- if (s === t || s.previousSibling === t && Rt(s)) return !0;
1260
+ if (s === t || s.previousSibling === t && Wt(s)) return !0;
1261
1261
  }
1262
1262
  return !1;
1263
- }(e) ? null : { conversion: wo, priority: 0 } };
1263
+ }(e) ? null : { conversion: Mo, priority: 0 } };
1264
1264
  }
1265
1265
  static importJSON(e) {
1266
- return Tt().updateFromJSON(e);
1266
+ return bt().updateFromJSON(e);
1267
1267
  }
1268
1268
  }
1269
- function wo(n) {
1270
- return { node: Tt() };
1269
+ function Mo(n) {
1270
+ return { node: bt() };
1271
1271
  }
1272
- function Tt() {
1273
- return bn(new wt());
1272
+ function bt() {
1273
+ return Nn(new Et());
1274
1274
  }
1275
- function tt(n) {
1276
- return n instanceof wt;
1275
+ function nt(n) {
1276
+ return n instanceof Et;
1277
1277
  }
1278
- function Rt(n) {
1278
+ function Wt(n) {
1279
1279
  return be(n) && /^( |\t|\r?\n)+$/.test(n.textContent || "");
1280
1280
  }
1281
- function Pn(n, e) {
1282
- return 16 & e ? "code" : e & sr ? "mark" : 32 & e ? "sub" : 64 & e ? "sup" : null;
1283
- }
1284
1281
  function Fn(n, e) {
1282
+ return 16 & e ? "code" : e & or ? "mark" : 32 & e ? "sub" : 64 & e ? "sup" : null;
1283
+ }
1284
+ function Ln(n, e) {
1285
1285
  return 1 & e ? "strong" : 2 & e ? "em" : "span";
1286
1286
  }
1287
- function ts(n, e, t, r, i) {
1287
+ function ns(n, e, t, r, i) {
1288
1288
  const s = r.classList;
1289
- let o = nt(i, "base");
1290
- o !== void 0 && s.add(...o), o = nt(i, "underlineStrikethrough");
1289
+ let o = rt(i, "base");
1290
+ o !== void 0 && s.add(...o), o = rt(i, "underlineStrikethrough");
1291
1291
  let l = !1;
1292
- const a = e & en && e & Zt;
1293
- o !== void 0 && (t & en && t & Zt ? (l = !0, a || s.add(...o)) : a && s.remove(...o));
1294
- for (const c in We) {
1295
- const u = We[c];
1296
- if (o = nt(i, c), o !== void 0) if (t & u) {
1292
+ const a = e & tn && e & en;
1293
+ o !== void 0 && (t & tn && t & en ? (l = !0, a || s.add(...o)) : a && s.remove(...o));
1294
+ for (const c in Ue) {
1295
+ const u = Ue[c];
1296
+ if (o = rt(i, c), o !== void 0) if (t & u) {
1297
1297
  if (l && (c === "underline" || c === "strikethrough")) {
1298
1298
  e & u && s.remove(...o);
1299
1299
  continue;
@@ -1302,12 +1302,12 @@ function ts(n, e, t, r, i) {
1302
1302
  } else e & u && s.remove(...o);
1303
1303
  }
1304
1304
  }
1305
- function ns(n, e, t) {
1306
- const r = e.firstChild, i = t.isComposing(), s = n + (i ? hn : "");
1305
+ function rs(n, e, t) {
1306
+ const r = e.firstChild, i = t.isComposing(), s = n + (i ? gn : "");
1307
1307
  if (r == null) e.textContent = s;
1308
1308
  else {
1309
1309
  const o = r.nodeValue;
1310
- if (o !== s) if (i || Me) {
1310
+ if (o !== s) if (i || We) {
1311
1311
  const [l, a, c] = function(u, h) {
1312
1312
  const f = u.length, g = h.length;
1313
1313
  let d = 0, _ = 0;
@@ -1319,21 +1319,21 @@ function ns(n, e, t) {
1319
1319
  } else r.nodeValue = s;
1320
1320
  }
1321
1321
  }
1322
- function Yr(n, e, t, r, i, s) {
1323
- ns(i, n, e);
1322
+ function Hr(n, e, t, r, i, s) {
1323
+ rs(i, n, e);
1324
1324
  const o = s.theme.text;
1325
- o !== void 0 && ts(0, 0, r, n, o);
1325
+ o !== void 0 && ns(0, 0, r, n, o);
1326
1326
  }
1327
- function Wt(n, e) {
1327
+ function Jt(n, e) {
1328
1328
  const t = document.createElement(e);
1329
1329
  return t.appendChild(n), t;
1330
1330
  }
1331
- class ct extends _n {
1331
+ class ut extends pn {
1332
1332
  static getType() {
1333
1333
  return "text";
1334
1334
  }
1335
1335
  static clone(e) {
1336
- return new ct(e.__text, e.__key);
1336
+ return new ut(e.__text, e.__key);
1337
1337
  }
1338
1338
  afterCloneFrom(e) {
1339
1339
  super.afterCloneFrom(e), this.__text = e.__text, this.__format = e.__format, this.__style = e.__style, this.__mode = e.__mode, this.__detail = e.__detail;
@@ -1349,7 +1349,7 @@ class ct extends _n {
1349
1349
  }
1350
1350
  getMode() {
1351
1351
  const e = this.getLatest();
1352
- return Hs[e.__mode];
1352
+ return Gs[e.__mode];
1353
1353
  }
1354
1354
  getStyle() {
1355
1355
  return this.getLatest().__style;
@@ -1358,7 +1358,7 @@ class ct extends _n {
1358
1358
  return this.getLatest().__mode === 1;
1359
1359
  }
1360
1360
  isComposing() {
1361
- return this.__key === Ee();
1361
+ return this.__key === Me();
1362
1362
  }
1363
1363
  isSegmented() {
1364
1364
  return this.getLatest().__mode === 2;
@@ -1370,7 +1370,7 @@ class ct extends _n {
1370
1370
  return !!(2 & this.getLatest().__detail);
1371
1371
  }
1372
1372
  hasFormat(e) {
1373
- const t = We[e];
1373
+ const t = Ue[e];
1374
1374
  return !!(this.getFormat() & t);
1375
1375
  }
1376
1376
  isSimpleText() {
@@ -1380,7 +1380,7 @@ class ct extends _n {
1380
1380
  return this.getLatest().__text;
1381
1381
  }
1382
1382
  getFormatFlags(e, t) {
1383
- return fn(this.getLatest().__format, e, t);
1383
+ return dn(this.getLatest().__format, e, t);
1384
1384
  }
1385
1385
  canHaveFormat() {
1386
1386
  return !0;
@@ -1389,30 +1389,30 @@ class ct extends _n {
1389
1389
  return !0;
1390
1390
  }
1391
1391
  createDOM(e, t) {
1392
- const r = this.__format, i = Pn(0, r), s = Fn(0, r), o = i === null ? s : i, l = document.createElement(o);
1392
+ const r = this.__format, i = Fn(0, r), s = Ln(0, r), o = i === null ? s : i, l = document.createElement(o);
1393
1393
  let a = l;
1394
- this.hasFormat("code") && l.setAttribute("spellcheck", "false"), i !== null && (a = document.createElement(s), l.appendChild(a)), Yr(a, this, 0, r, this.__text, e);
1394
+ this.hasFormat("code") && l.setAttribute("spellcheck", "false"), i !== null && (a = document.createElement(s), l.appendChild(a)), Hr(a, this, 0, r, this.__text, e);
1395
1395
  const c = this.__style;
1396
1396
  return c !== "" && (l.style.cssText = c), l;
1397
1397
  }
1398
1398
  updateDOM(e, t, r) {
1399
- const i = this.__text, s = e.__format, o = this.__format, l = Pn(0, s), a = Pn(0, o), c = Fn(0, s), u = Fn(0, o);
1399
+ const i = this.__text, s = e.__format, o = this.__format, l = Fn(0, s), a = Fn(0, o), c = Ln(0, s), u = Ln(0, o);
1400
1400
  if ((l === null ? c : l) !== (a === null ? u : a)) return !0;
1401
1401
  if (l === a && c !== u) {
1402
1402
  const _ = t.firstChild;
1403
1403
  _ == null && T(48);
1404
1404
  const p = document.createElement(u);
1405
- return Yr(p, this, 0, o, i, r), t.replaceChild(p, _), !1;
1405
+ return Hr(p, this, 0, o, i, r), t.replaceChild(p, _), !1;
1406
1406
  }
1407
1407
  let h = t;
1408
- a !== null && l !== null && (h = t.firstChild, h == null && T(49)), ns(i, h, this);
1408
+ a !== null && l !== null && (h = t.firstChild, h == null && T(49)), rs(i, h, this);
1409
1409
  const f = r.theme.text;
1410
- f !== void 0 && s !== o && ts(0, s, o, h, f);
1410
+ f !== void 0 && s !== o && ns(0, s, o, h, f);
1411
1411
  const g = e.__style, d = this.__style;
1412
1412
  return g !== d && (t.style.cssText = d), !1;
1413
1413
  }
1414
1414
  static importDOM() {
1415
- return { "#text": () => ({ conversion: Oo, priority: 0 }), b: () => ({ conversion: Mo, priority: 0 }), code: () => ({ conversion: xe, priority: 0 }), em: () => ({ conversion: xe, priority: 0 }), i: () => ({ conversion: xe, priority: 0 }), mark: () => ({ conversion: xe, priority: 0 }), s: () => ({ conversion: xe, priority: 0 }), span: () => ({ conversion: Eo, priority: 0 }), strong: () => ({ conversion: xe, priority: 0 }), sub: () => ({ conversion: xe, priority: 0 }), sup: () => ({ conversion: xe, priority: 0 }), u: () => ({ conversion: xe, priority: 0 }) };
1415
+ return { "#text": () => ({ conversion: Po, priority: 0 }), b: () => ({ conversion: Oo, priority: 0 }), code: () => ({ conversion: xe, priority: 0 }), em: () => ({ conversion: xe, priority: 0 }), i: () => ({ conversion: xe, priority: 0 }), mark: () => ({ conversion: xe, priority: 0 }), s: () => ({ conversion: xe, priority: 0 }), span: () => ({ conversion: Ao, priority: 0 }), strong: () => ({ conversion: xe, priority: 0 }), sub: () => ({ conversion: xe, priority: 0 }), sup: () => ({ conversion: xe, priority: 0 }), u: () => ({ conversion: xe, priority: 0 }) };
1416
1416
  }
1417
1417
  static importJSON(e) {
1418
1418
  return Y().updateFromJSON(e);
@@ -1422,7 +1422,7 @@ class ct extends _n {
1422
1422
  }
1423
1423
  exportDOM(e) {
1424
1424
  let { element: t } = super.exportDOM(e);
1425
- return ee(t) || T(132), t.style.whiteSpace = "pre-wrap", this.hasFormat("lowercase") ? t.style.textTransform = "lowercase" : this.hasFormat("uppercase") ? t.style.textTransform = "uppercase" : this.hasFormat("capitalize") && (t.style.textTransform = "capitalize"), this.hasFormat("bold") && (t = Wt(t, "b")), this.hasFormat("italic") && (t = Wt(t, "i")), this.hasFormat("strikethrough") && (t = Wt(t, "s")), this.hasFormat("underline") && (t = Wt(t, "u")), { element: t };
1425
+ return ee(t) || T(132), t.style.whiteSpace = "pre-wrap", this.hasFormat("lowercase") ? t.style.textTransform = "lowercase" : this.hasFormat("uppercase") ? t.style.textTransform = "uppercase" : this.hasFormat("capitalize") && (t.style.textTransform = "capitalize"), this.hasFormat("bold") && (t = Jt(t, "b")), this.hasFormat("italic") && (t = Jt(t, "i")), this.hasFormat("strikethrough") && (t = Jt(t, "s")), this.hasFormat("underline") && (t = Jt(t, "u")), { element: t };
1426
1426
  }
1427
1427
  exportJSON() {
1428
1428
  return { detail: this.getDetail(), format: this.getFormat(), mode: this.getMode(), style: this.getStyle(), text: this.getTextContent(), ...super.exportJSON() };
@@ -1431,18 +1431,18 @@ class ct extends _n {
1431
1431
  }
1432
1432
  setFormat(e) {
1433
1433
  const t = this.getWritable();
1434
- return t.__format = typeof e == "string" ? We[e] : e, t;
1434
+ return t.__format = typeof e == "string" ? Ue[e] : e, t;
1435
1435
  }
1436
1436
  setDetail(e) {
1437
1437
  const t = this.getWritable();
1438
- return t.__detail = typeof e == "string" ? js[e] : e, t;
1438
+ return t.__detail = typeof e == "string" ? Ys[e] : e, t;
1439
1439
  }
1440
1440
  setStyle(e) {
1441
1441
  const t = this.getWritable();
1442
1442
  return t.__style = e, t;
1443
1443
  }
1444
1444
  toggleFormat(e) {
1445
- const t = fn(this.getFormat(), e, null);
1445
+ const t = dn(this.getFormat(), e, null);
1446
1446
  return this.setFormat(t);
1447
1447
  }
1448
1448
  toggleDirectionless() {
@@ -1454,7 +1454,7 @@ class ct extends _n {
1454
1454
  return e.__detail ^= 2, e;
1455
1455
  }
1456
1456
  setMode(e) {
1457
- const t = Ys[e];
1457
+ const t = qs[e];
1458
1458
  if (this.__mode === t) return this;
1459
1459
  const r = this.getWritable();
1460
1460
  return r.__mode = t, r;
@@ -1472,9 +1472,9 @@ class ct extends _n {
1472
1472
  const a = o.length;
1473
1473
  r === void 0 && (r = a), i === void 0 && (i = a);
1474
1474
  } else r = 0, i = 0;
1475
- if (!O(s)) return ss(l, r, l, i, "text", "text");
1475
+ if (!O(s)) return ls(l, r, l, i, "text", "text");
1476
1476
  {
1477
- const a = Ee();
1477
+ const a = Me();
1478
1478
  a !== s.anchor.key && a !== s.focus.key || H(l), s.setTextNodeRange(this, r, this, i);
1479
1479
  }
1480
1480
  return s;
@@ -1508,7 +1508,7 @@ class ct extends _n {
1508
1508
  G();
1509
1509
  const t = this.getLatest(), r = t.getTextContent();
1510
1510
  if (r === "") return [];
1511
- const i = t.__key, s = Ee(), o = r.length;
1511
+ const i = t.__key, s = Me(), o = r.length;
1512
1512
  e.sort((k, S) => k - S), e.push(o);
1513
1513
  const l = [], a = e.length;
1514
1514
  for (let k = 0, S = 0; k < o && S <= a; S++) {
@@ -1526,7 +1526,7 @@ class ct extends _n {
1526
1526
  const [k, S] = m.isBackward() ? [m.focus, m.anchor] : [m.anchor, m.focus];
1527
1527
  k.type === "text" && k.key === i && (x = k), S.type === "text" && S.key === i && (y = S);
1528
1528
  }
1529
- t.isSegmented() ? (f = Y(u), f.__format = g, f.__style = d, f.__detail = _, p = !0) : (f = t.getWritable(), f.__text = u);
1529
+ t.isSegmented() ? (f = Y(u), f.__format = g, f.__style = d, f.__detail = _, p = !0) : f = t.setTextContent(u);
1530
1530
  const b = [f];
1531
1531
  for (let k = 1; k < c; k++) {
1532
1532
  const S = Y(l[k]);
@@ -1548,10 +1548,10 @@ class ct extends _n {
1548
1548
  if (h !== null) {
1549
1549
  (function(A) {
1550
1550
  const F = A.getPreviousSibling(), W = A.getNextSibling();
1551
- F !== null && dn(F), W !== null && dn(W);
1551
+ F !== null && hn(F), W !== null && hn(W);
1552
1552
  })(this);
1553
1553
  const k = h.getWritable(), S = this.getIndexWithinParent();
1554
- p ? (k.splice(S, 0, b), this.remove()) : k.splice(S, 1, b), O(m) && cn(m, h, S, c - 1);
1554
+ p ? (k.splice(S, 0, b), this.remove()) : k.splice(S, 1, b), O(m) && un(m, h, S, c - 1);
1555
1555
  }
1556
1556
  return b;
1557
1557
  }
@@ -1559,11 +1559,11 @@ class ct extends _n {
1559
1559
  const t = e === this.getPreviousSibling();
1560
1560
  t || e === this.getNextSibling() || T(50);
1561
1561
  const r = this.__key, i = e.__key, s = this.__text, o = s.length;
1562
- Ee() === i && H(r);
1562
+ Me() === i && H(r);
1563
1563
  const l = L();
1564
1564
  if (O(l)) {
1565
1565
  const h = l.anchor, f = l.focus;
1566
- h !== null && h.key === i && ii(h, t, r, e, o), f !== null && f.key === i && ii(f, t, r, e, o);
1566
+ h !== null && h.key === i && si(h, t, r, e, o), f !== null && f.key === i && si(f, t, r, e, o);
1567
1567
  }
1568
1568
  const a = e.__text, c = t ? a + s : s + a;
1569
1569
  this.setTextContent(c);
@@ -1574,30 +1574,30 @@ class ct extends _n {
1574
1574
  return !1;
1575
1575
  }
1576
1576
  }
1577
- function Eo(n) {
1578
- return { forChild: gr(n.style), node: null };
1577
+ function Ao(n) {
1578
+ return { forChild: _r(n.style), node: null };
1579
1579
  }
1580
- function Mo(n) {
1580
+ function Oo(n) {
1581
1581
  const e = n, t = e.style.fontWeight === "normal";
1582
- return { forChild: gr(e.style, t ? void 0 : "bold"), node: null };
1582
+ return { forChild: _r(e.style, t ? void 0 : "bold"), node: null };
1583
1583
  }
1584
- const Hr = /* @__PURE__ */ new WeakMap();
1585
- function Ao(n) {
1584
+ const qr = /* @__PURE__ */ new WeakMap();
1585
+ function Do(n) {
1586
1586
  if (!ee(n)) return !1;
1587
1587
  if (n.nodeName === "PRE") return !0;
1588
1588
  const e = n.style.whiteSpace;
1589
1589
  return typeof e == "string" && e.startsWith("pre");
1590
1590
  }
1591
- function Oo(n) {
1591
+ function Po(n) {
1592
1592
  const e = n;
1593
1593
  n.parentElement === null && T(129);
1594
1594
  let t = e.textContent || "";
1595
1595
  if (function(r) {
1596
1596
  let i, s = r.parentNode;
1597
1597
  const o = [r];
1598
- for (; s !== null && (i = Hr.get(s)) === void 0 && !Ao(s); ) o.push(s), s = s.parentNode;
1598
+ for (; s !== null && (i = qr.get(s)) === void 0 && !Do(s); ) o.push(s), s = s.parentNode;
1599
1599
  const l = i === void 0 ? s : i;
1600
- for (let a = 0; a < o.length; a++) Hr.set(o[a], l);
1600
+ for (let a = 0; a < o.length; a++) qr.set(o[a], l);
1601
1601
  return l;
1602
1602
  }(e) !== null) {
1603
1603
  const r = t.split(/(\r?\n|\t)/), i = [], s = r.length;
@@ -1605,14 +1605,14 @@ function Oo(n) {
1605
1605
  const l = r[o];
1606
1606
  l === `
1607
1607
  ` || l === `\r
1608
- ` ? i.push(Tt()) : l === " " ? i.push(_r()) : l !== "" && i.push(Y(l));
1608
+ ` ? i.push(bt()) : l === " " ? i.push(pr()) : l !== "" && i.push(Y(l));
1609
1609
  }
1610
1610
  return { node: i };
1611
1611
  }
1612
1612
  if (t = t.replace(/\r/g, "").replace(/[ \t\n]+/g, " "), t === "") return { node: null };
1613
1613
  if (t[0] === " ") {
1614
1614
  let r = e, i = !0;
1615
- for (; r !== null && (r = qr(r, !1)) !== null; ) {
1615
+ for (; r !== null && (r = Gr(r, !1)) !== null; ) {
1616
1616
  const s = r.textContent || "";
1617
1617
  if (s.length > 0) {
1618
1618
  /[ \t\n]$/.test(s) && (t = t.slice(1)), i = !1;
@@ -1623,7 +1623,7 @@ function Oo(n) {
1623
1623
  }
1624
1624
  if (t[t.length - 1] === " ") {
1625
1625
  let r = e, i = !0;
1626
- for (; r !== null && (r = qr(r, !0)) !== null; )
1626
+ for (; r !== null && (r = Gr(r, !0)) !== null; )
1627
1627
  if ((r.textContent || "").replace(/^( |\t|\r?\n)+/, "").length > 0) {
1628
1628
  i = !1;
1629
1629
  break;
@@ -1632,7 +1632,7 @@ function Oo(n) {
1632
1632
  }
1633
1633
  return t === "" ? { node: null } : { node: Y(t) };
1634
1634
  }
1635
- function qr(n, e) {
1635
+ function Gr(n, e) {
1636
1636
  let t = n;
1637
1637
  for (; ; ) {
1638
1638
  let r;
@@ -1643,7 +1643,7 @@ function qr(n, e) {
1643
1643
  }
1644
1644
  if (t = r, ee(t)) {
1645
1645
  const s = t.style.display;
1646
- if (s === "" && !il(t) || s !== "" && !s.startsWith("inline")) return null;
1646
+ if (s === "" && !sl(t) || s !== "" && !s.startsWith("inline")) return null;
1647
1647
  }
1648
1648
  let i = t;
1649
1649
  for (; (i = e ? t.firstChild : t.lastChild) !== null; ) t = i;
@@ -1651,27 +1651,27 @@ function qr(n, e) {
1651
1651
  if (t.nodeName === "BR") return null;
1652
1652
  }
1653
1653
  }
1654
- const Do = { code: "code", em: "italic", i: "italic", mark: "highlight", s: "strikethrough", strong: "bold", sub: "subscript", sup: "superscript", u: "underline" };
1654
+ const Fo = { code: "code", em: "italic", i: "italic", mark: "highlight", s: "strikethrough", strong: "bold", sub: "subscript", sup: "superscript", u: "underline" };
1655
1655
  function xe(n) {
1656
- const e = Do[n.nodeName.toLowerCase()];
1657
- return e === void 0 ? { node: null } : { forChild: gr(n.style, e), node: null };
1656
+ const e = Fo[n.nodeName.toLowerCase()];
1657
+ return e === void 0 ? { node: null } : { forChild: _r(n.style, e), node: null };
1658
1658
  }
1659
1659
  function Y(n = "") {
1660
- return bn(new ct(n));
1660
+ return Nn(new ut(n));
1661
1661
  }
1662
1662
  function M(n) {
1663
- return n instanceof ct;
1663
+ return n instanceof ut;
1664
1664
  }
1665
- function gr(n, e) {
1665
+ function _r(n, e) {
1666
1666
  const t = n.fontWeight, r = n.textDecoration.split(" "), i = t === "700" || t === "bold", s = r.includes("line-through"), o = n.fontStyle === "italic", l = r.includes("underline"), a = n.verticalAlign;
1667
1667
  return (c) => (M(c) && (i && !c.hasFormat("bold") && c.toggleFormat("bold"), s && !c.hasFormat("strikethrough") && c.toggleFormat("strikethrough"), o && !c.hasFormat("italic") && c.toggleFormat("italic"), l && !c.hasFormat("underline") && c.toggleFormat("underline"), a !== "sub" || c.hasFormat("subscript") || c.toggleFormat("subscript"), a !== "super" || c.hasFormat("superscript") || c.toggleFormat("superscript"), e && !c.hasFormat(e) && c.toggleFormat(e)), c);
1668
1668
  }
1669
- class Et extends ct {
1669
+ class Mt extends ut {
1670
1670
  static getType() {
1671
1671
  return "tab";
1672
1672
  }
1673
1673
  static clone(e) {
1674
- return new Et(e.__key);
1674
+ return new Mt(e.__key);
1675
1675
  }
1676
1676
  constructor(e) {
1677
1677
  super(" ", e), this.__detail = 2;
@@ -1680,14 +1680,17 @@ class Et extends ct {
1680
1680
  return null;
1681
1681
  }
1682
1682
  createDOM(e) {
1683
- const t = super.createDOM(e), r = nt(e.theme, "tab");
1683
+ const t = super.createDOM(e), r = rt(e.theme, "tab");
1684
1684
  return r !== void 0 && t.classList.add(...r), t;
1685
1685
  }
1686
1686
  static importJSON(e) {
1687
- return _r().updateFromJSON(e);
1687
+ return pr().updateFromJSON(e);
1688
1688
  }
1689
1689
  setTextContent(e) {
1690
- return e !== " " && e !== "" && T(126), super.setTextContent(e);
1690
+ return e !== " " && e !== "" && T(126), super.setTextContent(" ");
1691
+ }
1692
+ spliceText(e, t, r, i) {
1693
+ return r === "" && t === 0 || r === " " && t === 1 || T(286), this;
1691
1694
  }
1692
1695
  setDetail(e) {
1693
1696
  return e !== 2 && T(127), this;
@@ -1702,13 +1705,13 @@ class Et extends ct {
1702
1705
  return !1;
1703
1706
  }
1704
1707
  }
1705
- function _r() {
1706
- return bn(new Et());
1708
+ function pr() {
1709
+ return Nn(new Mt());
1707
1710
  }
1708
- function Po(n) {
1709
- return n instanceof Et;
1711
+ function is(n) {
1712
+ return n instanceof Mt;
1710
1713
  }
1711
- class Fo {
1714
+ class Lo {
1712
1715
  constructor(e, t, r) {
1713
1716
  this._selection = null, this.key = e, this.offset = t, this.type = r;
1714
1717
  }
@@ -1716,21 +1719,21 @@ class Fo {
1716
1719
  return this.key === e.key && this.offset === e.offset && this.type === e.type;
1717
1720
  }
1718
1721
  isBefore(e) {
1719
- return this.key === e.key ? this.offset < e.offset : ws(de(Ye(this, "next")), de(Ye(e, "next"))) < 0;
1722
+ return this.key === e.key ? this.offset < e.offset : Ms(de(qe(this, "next")), de(qe(e, "next"))) < 0;
1720
1723
  }
1721
1724
  getNode() {
1722
- const e = j(this.key);
1725
+ const e = $(this.key);
1723
1726
  return e === null && T(20), e;
1724
1727
  }
1725
1728
  set(e, t, r, i) {
1726
1729
  const s = this._selection, o = this.key;
1727
- i && this.key === e && this.offset === t && this.type === r || (this.key = e, this.offset = t, this.type = r, Mt() || (Ee() === o && H(e), s !== null && (s.setCachedNodes(null), s.dirty = !0)));
1730
+ i && this.key === e && this.offset === t && this.type === r || (this.key = e, this.offset = t, this.type = r, At() || (Me() === o && H(e), s !== null && (s.setCachedNodes(null), s.dirty = !0)));
1728
1731
  }
1729
1732
  }
1730
1733
  function ge(n, e, t) {
1731
- return new Fo(n, e, t);
1734
+ return new Lo(n, e, t);
1732
1735
  }
1733
- function Ln(n, e) {
1736
+ function In(n, e) {
1734
1737
  let t = e.__key, r = n.offset, i = "element";
1735
1738
  if (M(e)) {
1736
1739
  i = "text";
@@ -1746,13 +1749,13 @@ function Ln(n, e) {
1746
1749
  }
1747
1750
  n.set(t, r, i);
1748
1751
  }
1749
- function Gr(n, e) {
1752
+ function Xr(n, e) {
1750
1753
  if (v(e)) {
1751
1754
  const t = e.getLastDescendant();
1752
- v(t) || M(t) ? Ln(n, t) : Ln(n, e);
1753
- } else Ln(n, e);
1755
+ v(t) || M(t) ? In(n, t) : In(n, e);
1756
+ } else In(n, e);
1754
1757
  }
1755
- class pn {
1758
+ class yn {
1756
1759
  constructor(e) {
1757
1760
  this._cachedNodes = null, this._nodes = e, this.dirty = !1;
1758
1761
  }
@@ -1763,7 +1766,7 @@ class pn {
1763
1766
  this._cachedNodes = e;
1764
1767
  }
1765
1768
  is(e) {
1766
- if (!pr(e)) return !1;
1769
+ if (!yr(e)) return !1;
1767
1770
  const t = this._nodes, r = e._nodes;
1768
1771
  return t.size === r.size && Array.from(t).every((i) => r.has(i));
1769
1772
  }
@@ -1789,7 +1792,7 @@ class pn {
1789
1792
  return this._nodes.has(e);
1790
1793
  }
1791
1794
  clone() {
1792
- return new pn(new Set(this._nodes));
1795
+ return new yn(new Set(this._nodes));
1793
1796
  }
1794
1797
  extract() {
1795
1798
  return this.getNodes();
@@ -1814,10 +1817,10 @@ class pn {
1814
1817
  if (e !== null) return e;
1815
1818
  const t = this._nodes, r = [];
1816
1819
  for (const i of t) {
1817
- const s = j(i);
1820
+ const s = $(i);
1818
1821
  s !== null && r.push(s);
1819
1822
  }
1820
- return Mt() || (this._cachedNodes = r), r;
1823
+ return At() || (this._cachedNodes = r), r;
1821
1824
  }
1822
1825
  getTextContent() {
1823
1826
  const e = this.getNodes();
@@ -1827,17 +1830,17 @@ class pn {
1827
1830
  }
1828
1831
  deleteNodes() {
1829
1832
  const e = this.getNodes();
1830
- if ((L() || ut()) === this && e[0]) {
1833
+ if ((L() || ft()) === this && e[0]) {
1831
1834
  const t = q(e[0], "next");
1832
- yl(Ve(t, t));
1835
+ ml(He(t, t));
1833
1836
  }
1834
1837
  for (const t of e) t.remove();
1835
1838
  }
1836
1839
  }
1837
1840
  function O(n) {
1838
- return n instanceof qe;
1841
+ return n instanceof Xe;
1839
1842
  }
1840
- class qe {
1843
+ class Xe {
1841
1844
  constructor(e, t, r, i) {
1842
1845
  this.anchor = e, this.focus = t, e._selection = this, t._selection = this, this._cachedNodes = null, this.format = r, this.style = i, this.dirty = !1;
1843
1846
  }
@@ -1867,7 +1870,7 @@ class qe {
1867
1870
  const { origin: u } = c;
1868
1871
  v(u) && a.has(u) || i.push(u);
1869
1872
  }
1870
- if (o && i.push(o.caret.origin), lt(r.focus) && v(r.focus.origin) && r.focus.getNodeAtCaret() === null) for (let c = Pe(r.focus.origin, "previous"); he(c) && l.has(c.origin) && !c.origin.isEmpty() && c.origin.is(i[i.length - 1]); c = Mr(c)) l.delete(c.origin), i.pop();
1873
+ if (o && i.push(o.caret.origin), at(r.focus) && v(r.focus.origin) && r.focus.getNodeAtCaret() === null) for (let c = Pe(r.focus.origin, "previous"); he(c) && l.has(c.origin) && !c.origin.isEmpty() && c.origin.is(i[i.length - 1]); c = Ar(c)) l.delete(c.origin), i.pop();
1871
1874
  for (; i.length > 1; ) {
1872
1875
  const c = i[i.length - 1];
1873
1876
  if (!v(c) || a.has(c) || c.isEmpty() || l.has(c)) break;
@@ -1878,8 +1881,8 @@ class qe {
1878
1881
  i.push(f);
1879
1882
  }
1880
1883
  return i;
1881
- }(Ms(bi(this), "next"));
1882
- return Mt() || (this._cachedNodes = t), t;
1884
+ }(Os(Ni(this), "next"));
1885
+ return At() || (this._cachedNodes = t), t;
1883
1886
  }
1884
1887
  setTextNodeRange(e, t, r, i) {
1885
1888
  this.anchor.set(e.__key, t, "text"), this.focus.set(r.__key, i, "text");
@@ -1887,7 +1890,7 @@ class qe {
1887
1890
  getTextContent() {
1888
1891
  const e = this.getNodes();
1889
1892
  if (e.length === 0) return "";
1890
- const t = e[0], r = e[e.length - 1], i = this.anchor, s = this.focus, o = i.isBefore(s), [l, a] = Qr(this);
1893
+ const t = e[0], r = e[e.length - 1], i = this.anchor, s = this.focus, o = i.isBefore(s), [l, a] = Zr(this);
1891
1894
  let c = "", u = !0;
1892
1895
  for (let h = 0; h < e.length; h++) {
1893
1896
  const f = e[h];
@@ -1896,28 +1899,28 @@ class qe {
1896
1899
  else if (u = !1, M(f)) {
1897
1900
  let g = f.getTextContent();
1898
1901
  f === t ? f === r ? i.type === "element" && s.type === "element" && s.offset !== i.offset || (g = l < a ? g.slice(l, a) : g.slice(a, l)) : g = o ? g.slice(l) : g.slice(a) : f === r && (g = o ? g.slice(0, a) : g.slice(0, l)), c += g;
1899
- } else !z(f) && !tt(f) || f === r && this.isCollapsed() || (c += f.getTextContent());
1902
+ } else !z(f) && !nt(f) || f === r && this.isCollapsed() || (c += f.getTextContent());
1900
1903
  }
1901
1904
  return c;
1902
1905
  }
1903
1906
  applyDOMRange(e) {
1904
- const t = R(), r = t.getEditorState()._selection, i = is(e.startContainer, e.startOffset, e.endContainer, e.endOffset, t, r);
1907
+ const t = R(), r = t.getEditorState()._selection, i = os(e.startContainer, e.startOffset, e.endContainer, e.endOffset, t, r);
1905
1908
  if (i === null) return;
1906
1909
  const [s, o] = i;
1907
1910
  this.anchor.set(s.key, s.offset, s.type, !0), this.focus.set(o.key, o.offset, o.type, !0), $n(this);
1908
1911
  }
1909
1912
  clone() {
1910
1913
  const e = this.anchor, t = this.focus;
1911
- return new qe(ge(e.key, e.offset, e.type), ge(t.key, t.offset, t.type), this.format, this.style);
1914
+ return new Xe(ge(e.key, e.offset, e.type), ge(t.key, t.offset, t.type), this.format, this.style);
1912
1915
  }
1913
1916
  toggleFormat(e) {
1914
- this.format = fn(this.format, e, null), this.dirty = !0;
1917
+ this.format = dn(this.format, e, null), this.dirty = !0;
1915
1918
  }
1916
1919
  setStyle(e) {
1917
1920
  this.style = e, this.dirty = !0;
1918
1921
  }
1919
1922
  hasFormat(e) {
1920
- const t = We[e];
1923
+ const t = Ue[e];
1921
1924
  return !!(this.format & t);
1922
1925
  }
1923
1926
  insertRawText(e) {
@@ -1926,7 +1929,7 @@ class qe {
1926
1929
  const o = t[s];
1927
1930
  o === `
1928
1931
  ` || o === `\r
1929
- ` ? r.push(Tt()) : o === " " ? r.push(_r()) : r.push(Y(o));
1932
+ ` ? r.push(bt()) : o === " " ? r.push(pr()) : r.push(Y(o));
1930
1933
  }
1931
1934
  this.insertNodes(r);
1932
1935
  }
@@ -1936,7 +1939,7 @@ class qe {
1936
1939
  !this.isCollapsed() && r.isBefore(t) && (o = r, l = t), o.type === "element" && function(p, x, y, m) {
1937
1940
  const b = p.getNode(), N = b.getChildAtIndex(p.offset), C = Y(), w = ne(b) ? Ae().append(C) : C;
1938
1941
  C.setFormat(y), C.setStyle(m), N === null ? b.append(w) : N.insertBefore(w), p.is(x) && x.set(C.__key, 0, "text"), p.set(C.__key, 0, "text");
1939
- }(o, l, i, s), l.type === "element" && Nt(l, de(Ye(l, "next")));
1942
+ }(o, l, i, s), l.type === "element" && wt(l, de(qe(l, "next")));
1940
1943
  const a = o.offset;
1941
1944
  let c = l.offset;
1942
1945
  const u = this.getNodes(), h = u.length;
@@ -1944,27 +1947,27 @@ class qe {
1944
1947
  M(f) || T(26);
1945
1948
  const g = f.getTextContent().length, d = f.getParentOrThrow();
1946
1949
  let _ = u[h - 1];
1947
- if (h === 1 && l.type === "element" && (c = g, l.set(o.key, c, "text")), this.isCollapsed() && a === g && (f.isSegmented() || f.isToken() || !f.canInsertTextAfter() || !d.canInsertTextAfter() && f.getNextSibling() === null)) {
1950
+ if (h === 1 && l.type === "element" && (c = g, l.set(o.key, c, "text")), this.isCollapsed() && a === g && (we(f) || !f.canInsertTextAfter() || !d.canInsertTextAfter() && f.getNextSibling() === null)) {
1948
1951
  let p = f.getNextSibling();
1949
- if (M(p) && p.canInsertTextBefore() && !Qe(p) || (p = Y(), p.setFormat(i), p.setStyle(s), d.canInsertTextAfter() ? f.insertAfter(p) : d.insertAfter(p)), p.select(0, 0), f = p, e !== "") return void this.insertText(e);
1950
- } else if (this.isCollapsed() && a === 0 && (f.isSegmented() || f.isToken() || !f.canInsertTextBefore() || !d.canInsertTextBefore() && f.getPreviousSibling() === null)) {
1952
+ if (M(p) && p.canInsertTextBefore() && !we(p) || (p = Y(), p.setFormat(i), p.setStyle(s), d.canInsertTextAfter() ? f.insertAfter(p) : d.insertAfter(p)), p.select(0, 0), f = p, e !== "") return void this.insertText(e);
1953
+ } else if (this.isCollapsed() && a === 0 && (we(f) || !f.canInsertTextBefore() || !d.canInsertTextBefore() && f.getPreviousSibling() === null)) {
1951
1954
  let p = f.getPreviousSibling();
1952
- if (M(p) && !Qe(p) || (p = Y(), p.setFormat(i), d.canInsertTextBefore() ? f.insertBefore(p) : d.insertBefore(p)), p.select(), f = p, e !== "") return void this.insertText(e);
1955
+ if (M(p) && !we(p) || (p = Y(), p.setFormat(i), d.canInsertTextBefore() ? f.insertBefore(p) : d.insertBefore(p)), p.select(), f = p, e !== "") return void this.insertText(e);
1953
1956
  } else if (f.isSegmented() && a !== g) {
1954
1957
  const p = Y(f.getTextContent());
1955
1958
  p.setFormat(i), f.replace(p), f = p;
1956
1959
  } else if (!this.isCollapsed() && e !== "") {
1957
1960
  const p = _.getParent();
1958
- if (!d.canInsertTextBefore() || !d.canInsertTextAfter() || v(p) && (!p.canInsertTextBefore() || !p.canInsertTextAfter())) return this.insertText(""), rs(this.anchor, this.focus, null), void this.insertText(e);
1961
+ if (!d.canInsertTextBefore() || !d.canInsertTextAfter() || v(p) && (!p.canInsertTextBefore() || !p.canInsertTextAfter())) return this.insertText(""), ss(this.anchor, this.focus, null), void this.insertText(e);
1959
1962
  }
1960
1963
  if (h === 1) {
1961
- if (f.isToken()) {
1964
+ if (Be(f)) {
1962
1965
  const m = Y(e);
1963
1966
  return m.select(), void f.replace(m);
1964
1967
  }
1965
1968
  const p = f.getFormat(), x = f.getStyle();
1966
1969
  if (a !== c || p === i && x === s) {
1967
- if (Po(f)) {
1970
+ if (is(f)) {
1968
1971
  const m = Y(e);
1969
1972
  return m.setFormat(i), m.setStyle(s), m.select(), void f.replace(m);
1970
1973
  }
@@ -1988,7 +1991,7 @@ class qe {
1988
1991
  if (!x.is(y) && y.isInline()) do
1989
1992
  m = y, y = y.getParentOrThrow();
1990
1993
  while (y.isInline());
1991
- if (l.type === "text" && (c !== 0 || _.getTextContent() === "") || l.type === "element" && _.getIndexWithinParent() < c) if (M(_) && !_.isToken() && c !== _.getTextContentSize()) {
1994
+ if (l.type === "text" && (c !== 0 || _.getTextContent() === "") || l.type === "element" && _.getIndexWithinParent() < c) if (M(_) && !Be(_) && c !== _.getTextContentSize()) {
1992
1995
  if (_.isSegmented()) {
1993
1996
  const k = Y(_.getTextContent());
1994
1997
  _.replace(k), _ = k;
@@ -2012,7 +2015,7 @@ class qe {
2012
2015
  (F === 0 || A[F - 1].is(S)) && (p.delete(k.__key), S = k), k = k.getParent();
2013
2016
  }
2014
2017
  }
2015
- if (f.isToken()) if (a === g) f.select();
2018
+ if (Be(f)) if (a === g) f.select();
2016
2019
  else {
2017
2020
  const k = Y(e);
2018
2021
  k.select(), f.replace(k);
@@ -2026,7 +2029,7 @@ class qe {
2026
2029
  }
2027
2030
  removeText() {
2028
2031
  const e = L() === this;
2029
- qt(this, ml(bi(this))), e && L() !== this && ie(this);
2032
+ Gt(this, xl(Ni(this))), e && L() !== this && ie(this);
2030
2033
  }
2031
2034
  formatText(e, t = null) {
2032
2035
  if (this.isCollapsed()) return this.toggleFormat(e), void H(null);
@@ -2051,16 +2054,16 @@ class qe {
2051
2054
  const y = h.type === "text" ? h.offset : x.getTextContentSize();
2052
2055
  if (g.is(x)) {
2053
2056
  if (d === y) return;
2054
- if (Qe(g) || d === 0 && y === g.getTextContentSize()) g.setFormat(_);
2057
+ if (we(g) || d === 0 && y === g.getTextContentSize()) g.setFormat(_);
2055
2058
  else {
2056
2059
  const b = g.splitText(d, y), N = d === 0 ? b[0] : b[1];
2057
2060
  N.setFormat(_), u.type === "text" && u.set(N.__key, 0, "text"), h.type === "text" && h.set(N.__key, y - d, "text");
2058
2061
  }
2059
2062
  return void (this.format = _);
2060
2063
  }
2061
- d === 0 || Qe(g) || ([, g] = g.splitText(d), d = 0), g.setFormat(_);
2064
+ d === 0 || we(g) || ([, g] = g.splitText(d), d = 0), g.setFormat(_);
2062
2065
  const m = x.getFormatFlags(e, _);
2063
- y > 0 && (y === x.getTextContentSize() || Qe(x) || ([x] = x.splitText(y)), x.setFormat(m));
2066
+ y > 0 && (y === x.getTextContentSize() || we(x) || ([x] = x.splitText(y)), x.setFormat(m));
2064
2067
  for (let b = f + 1; b < p; b++) {
2065
2068
  const N = i[b], C = N.getFormatFlags(e, m);
2066
2069
  N.setFormat(C);
@@ -2074,25 +2077,25 @@ class qe {
2074
2077
  const d = L();
2075
2078
  return O(d) || T(134), d.insertNodes(e);
2076
2079
  }
2077
- const t = (this.isBackward() ? this.focus : this.anchor).getNode(), r = Wn(t, we), i = e[e.length - 1];
2080
+ const t = (this.isBackward() ? this.focus : this.anchor).getNode(), r = Jn(t, Ee), i = e[e.length - 1];
2078
2081
  if (v(r) && "__language" in r) {
2079
2082
  if ("__language" in e[0]) this.insertText(e[0].getTextContent());
2080
2083
  else {
2081
- const d = In(this);
2084
+ const d = Kn(this);
2082
2085
  r.splice(d, 0, e), i.selectEnd();
2083
2086
  }
2084
2087
  return;
2085
2088
  }
2086
2089
  if (!e.some((d) => (v(d) || z(d)) && !d.isInline())) {
2087
2090
  v(r) || T(211, t.constructor.name, t.getType());
2088
- const d = In(this);
2091
+ const d = Kn(this);
2089
2092
  return r.splice(d, 0, e), void i.selectEnd();
2090
2093
  }
2091
2094
  const s = function(d) {
2092
2095
  const _ = Ae();
2093
2096
  let p = null;
2094
2097
  for (let x = 0; x < d.length; x++) {
2095
- const y = d[x], m = tt(y);
2098
+ const y = d[x], m = nt(y);
2096
2099
  if (m || z(y) && y.isInline() || v(y) && y.isInline() || M(y) || y.isParentRequired()) {
2097
2100
  if (p === null && (p = y.createParentElementNode(), _.append(p), m)) continue;
2098
2101
  p !== null && p.append(y);
@@ -2102,7 +2105,7 @@ class qe {
2102
2105
  }(e), o = s.getLastDescendant(), l = s.getChildren(), a = !v(r) || !r.isEmpty() ? this.insertParagraph() : null, c = l[l.length - 1];
2103
2106
  let u = l[0];
2104
2107
  var h;
2105
- v(h = u) && we(h) && !h.isEmpty() && v(r) && (!r.isEmpty() || r.canMergeWhenEmpty()) && (v(r) || T(211, t.constructor.name, t.getType()), r.append(...u.getChildren()), u = l[1]), u && (r === null && T(212, t.constructor.name, t.getType()), function(d, _, p) {
2108
+ v(h = u) && Ee(h) && !h.isEmpty() && v(r) && (!r.isEmpty() || r.canMergeWhenEmpty()) && (v(r) || T(211, t.constructor.name, t.getType()), r.append(...u.getChildren()), u = l[1]), u && (r === null && T(212, t.constructor.name, t.getType()), function(d, _, p) {
2106
2109
  const x = _.getParentOrThrow().getLastChild();
2107
2110
  let y = _;
2108
2111
  const m = [_];
@@ -2110,23 +2113,23 @@ class qe {
2110
2113
  let b = d;
2111
2114
  for (const N of m) b = b.insertAfter(N);
2112
2115
  }(r, u));
2113
- const f = Wn(o, we);
2114
- a && v(f) && (a.canMergeWhenEmpty() || we(c)) && (f.append(...a.getChildren()), a.remove()), v(r) && r.isEmpty() && r.remove(), o.selectEnd();
2116
+ const f = Jn(o, Ee);
2117
+ a && v(f) && (a.canMergeWhenEmpty() || Ee(c)) && (f.append(...a.getChildren()), a.remove()), v(r) && r.isEmpty() && r.remove(), o.selectEnd();
2115
2118
  const g = v(r) ? r.getLastChild() : null;
2116
- tt(g) && f !== r && g.remove();
2119
+ nt(g) && f !== r && g.remove();
2117
2120
  }
2118
2121
  insertParagraph() {
2119
2122
  if (this.anchor.key === "root") {
2120
2123
  const o = Ae();
2121
2124
  return re().splice(this.anchor.offset, 0, [o]), o.select(), o;
2122
2125
  }
2123
- const e = In(this), t = Wn(this.anchor.getNode(), we);
2126
+ const e = Kn(this), t = Jn(this.anchor.getNode(), Ee);
2124
2127
  v(t) || T(213);
2125
2128
  const r = t.getChildAtIndex(e), i = r ? [r, ...r.getNextSiblings()] : [], s = t.insertNewAfter(this, !1);
2126
2129
  return s ? (s.append(...i), s.selectStart(), s) : null;
2127
2130
  }
2128
2131
  insertLineBreak(e) {
2129
- const t = Tt();
2132
+ const t = bt();
2130
2133
  if (this.insertNodes([t]), e) {
2131
2134
  const r = t.getParentOrThrow(), i = t.getIndexWithinParent();
2132
2135
  r.select(i, i);
@@ -2135,7 +2138,7 @@ class qe {
2135
2138
  extract() {
2136
2139
  const e = this.getNodes(), t = e.length, r = t - 1, i = this.anchor, s = this.focus;
2137
2140
  let o = e[0], l = e[r];
2138
- const [a, c] = Qr(this);
2141
+ const [a, c] = Zr(this);
2139
2142
  if (t === 0) return [];
2140
2143
  if (t === 1) {
2141
2144
  if (M(o) && !this.isCollapsed()) {
@@ -2156,24 +2159,24 @@ class qe {
2156
2159
  return e;
2157
2160
  }
2158
2161
  modify(e, t, r) {
2159
- if (si(this, e, t, r)) return;
2162
+ if (oi(this, e, t, r)) return;
2160
2163
  const i = e === "move", s = R(), o = Te(oe(s));
2161
2164
  if (!o) return;
2162
2165
  const l = s._blockCursorElement, a = s._rootElement, c = this.focus.getNode();
2163
- if (a === null || l === null || !v(c) || c.isInline() || c.canBeEmpty() || ir(l, s, a), this.dirty) {
2164
- let u = ot(s, this.anchor.key), h = ot(s, this.focus.key);
2165
- this.anchor.type === "text" && (u = st(u)), this.focus.type === "text" && (h = st(h)), u && h && ls(o, u, this.anchor.offset, h, this.focus.offset);
2166
+ if (a === null || l === null || !v(c) || c.isInline() || c.canBeEmpty() || sr(l, s, a), this.dirty) {
2167
+ let u = lt(s, this.anchor.key), h = lt(s, this.focus.key);
2168
+ this.anchor.type === "text" && (u = ot(u)), this.focus.type === "text" && (h = ot(h)), u && h && cs(o, u, this.anchor.offset, h, this.focus.offset);
2166
2169
  }
2167
2170
  if (function(u, h, f, g) {
2168
2171
  u.modify(h, f, g);
2169
2172
  }(o, e, t ? "backward" : "forward", r), o.rangeCount > 0) {
2170
- const u = o.getRangeAt(0), h = this.anchor.getNode(), f = ne(h) ? h : Zo(h);
2173
+ const u = o.getRangeAt(0), h = this.anchor.getNode(), f = ne(h) ? h : el(h);
2171
2174
  if (this.applyDOMRange(u), this.dirty = !0, !i) {
2172
2175
  const g = this.getNodes(), d = [];
2173
2176
  let _ = !1;
2174
2177
  for (let p = 0; p < g.length; p++) {
2175
2178
  const x = g[p];
2176
- rr(x, f) ? d.push(x) : _ = !0;
2179
+ ir(x, f) ? d.push(x) : _ = !0;
2177
2180
  }
2178
2181
  if (_ && d.length > 0) if (t) {
2179
2182
  const p = d[0];
@@ -2188,7 +2191,7 @@ class qe {
2188
2191
  }(this);
2189
2192
  }
2190
2193
  }
2191
- r === "lineboundary" && si(this, e, t, r, "decorators");
2194
+ r === "lineboundary" && oi(this, e, t, r, "decorators");
2192
2195
  }
2193
2196
  forwardDeletion(e, t, r) {
2194
2197
  if (!r && (e.type === "element" && v(t) && e.offset === t.getChildrenSize() || e.type === "text" && e.offset === t.getTextContentSize())) {
@@ -2203,7 +2206,7 @@ class qe {
2203
2206
  const r = this.anchor;
2204
2207
  let i = r.getNode();
2205
2208
  if (this.forwardDeletion(r, i, e)) return;
2206
- const s = bs(Ye(r, e ? "previous" : "next"));
2209
+ const s = ws(qe(r, e ? "previous" : "next"));
2207
2210
  if (s.getTextSlices().every((l) => l === null || l.distance === 0)) {
2208
2211
  let l = { type: "initial" };
2209
2212
  for (const a of s.iterNodeCarets("shadowRoot")) if (he(a)) {
@@ -2212,7 +2215,7 @@ class qe {
2212
2215
  if (l.type === "merge-block") break;
2213
2216
  if (v(s.anchor.origin) && s.anchor.origin.isEmpty()) {
2214
2217
  const c = de(a);
2215
- qt(this, Ve(c, c)), s.anchor.origin.remove();
2218
+ Gt(this, He(c, c)), s.anchor.origin.remove();
2216
2219
  }
2217
2220
  return;
2218
2221
  }
@@ -2220,7 +2223,7 @@ class qe {
2220
2223
  }
2221
2224
  } else {
2222
2225
  if (l.type === "merge-block") break;
2223
- if (lt(a)) {
2226
+ if (at(a)) {
2224
2227
  if (v(a.origin)) {
2225
2228
  if (a.origin.isInline()) {
2226
2229
  if (!a.origin.isParentOf(s.anchor.origin)) break;
@@ -2230,7 +2233,7 @@ class qe {
2230
2233
  if (z(a.origin)) {
2231
2234
  if (!a.origin.isIsolated()) if (l.type === "merge-next-block" && (a.origin.isKeyboardSelectable() || !a.origin.isInline()) && v(s.anchor.origin) && s.anchor.origin.isEmpty()) {
2232
2235
  s.anchor.origin.remove();
2233
- const c = os();
2236
+ const c = as();
2234
2237
  c.add(a.origin.getKey()), ie(c);
2235
2238
  } else a.origin.remove();
2236
2239
  return;
@@ -2240,27 +2243,27 @@ class qe {
2240
2243
  }
2241
2244
  if (l.type === "merge-block") {
2242
2245
  const { caret: a, block: c } = l;
2243
- return qt(this, Ve(!a.origin.isEmpty() && c.isEmpty() ? Ft(q(c, a.direction)) : s.anchor, a)), this.removeText();
2246
+ return Gt(this, He(!a.origin.isEmpty() && c.isEmpty() ? Lt(q(c, a.direction)) : s.anchor, a)), this.removeText();
2244
2247
  }
2245
2248
  }
2246
2249
  const o = this.focus;
2247
2250
  if (this.modify("extend", e, "character"), this.isCollapsed()) {
2248
- if (e && r.offset === 0 && Zr(this, r.getNode())) return;
2251
+ if (e && r.offset === 0 && ei(this, r.getNode())) return;
2249
2252
  } else {
2250
2253
  const l = o.type === "text" ? o.getNode() : null;
2251
2254
  if (i = r.type === "text" ? r.getNode() : null, l !== null && l.isSegmented()) {
2252
2255
  const a = o.offset, c = l.getTextContentSize();
2253
- if (l.is(i) || e && a !== c || !e && a !== 0) return void ei(l, e, a);
2256
+ if (l.is(i) || e && a !== c || !e && a !== 0) return void ti(l, e, a);
2254
2257
  } else if (i !== null && i.isSegmented()) {
2255
2258
  const a = r.offset, c = i.getTextContentSize();
2256
- if (i.is(l) || e && a !== 0 || !e && a !== c) return void ei(i, e, a);
2259
+ if (i.is(l) || e && a !== 0 || !e && a !== c) return void ti(i, e, a);
2257
2260
  }
2258
2261
  (function(a, c) {
2259
2262
  const u = a.anchor, h = a.focus, f = u.getNode(), g = h.getNode();
2260
2263
  if (f === g && u.type === "text" && h.type === "text") {
2261
2264
  const d = u.offset, _ = h.offset, p = d < _, x = p ? d : _, y = p ? _ : d, m = y - 1;
2262
2265
  x !== m && function(b) {
2263
- return !(Cs(b) || Lo(b));
2266
+ return !(vs(b) || Io(b));
2264
2267
  }(f.getTextContent().slice(x, y)) && (c ? h.set(h.key, m, h.type) : u.set(u.key, m, u.type));
2265
2268
  }
2266
2269
  })(this, e);
@@ -2268,7 +2271,7 @@ class qe {
2268
2271
  }
2269
2272
  if (this.removeText(), e && !t && this.isCollapsed() && this.anchor.type === "element" && this.anchor.offset === 0) {
2270
2273
  const r = this.anchor.getNode();
2271
- r.isEmpty() && ne(r.getParent()) && r.getPreviousSibling() === null && Zr(this, r);
2274
+ r.isEmpty() && ne(r.getParent()) && r.getPreviousSibling() === null && ei(this, r);
2272
2275
  }
2273
2276
  }
2274
2277
  deleteLine(e) {
@@ -2289,22 +2292,22 @@ class qe {
2289
2292
  return [this.anchor, this.focus];
2290
2293
  }
2291
2294
  }
2292
- function pr(n) {
2293
- return n instanceof pn;
2295
+ function yr(n) {
2296
+ return n instanceof yn;
2294
2297
  }
2295
- function Xr(n) {
2298
+ function Qr(n) {
2296
2299
  const e = n.offset;
2297
2300
  if (n.type === "text") return e;
2298
2301
  const t = n.getNode();
2299
2302
  return e === t.getChildrenSize() ? t.getTextContent().length : 0;
2300
2303
  }
2301
- function Qr(n) {
2304
+ function Zr(n) {
2302
2305
  const e = n.getStartEndPoints();
2303
2306
  if (e === null) return [0, 0];
2304
2307
  const [t, r] = e;
2305
- return t.type === "element" && r.type === "element" && t.key === r.key && t.offset === r.offset ? [0, 0] : [Xr(t), Xr(r)];
2308
+ return t.type === "element" && r.type === "element" && t.key === r.key && t.offset === r.offset ? [0, 0] : [Qr(t), Qr(r)];
2306
2309
  }
2307
- function Zr(n, e) {
2310
+ function ei(n, e) {
2308
2311
  for (let t = e; t; t = t.getParent()) {
2309
2312
  if (v(t)) {
2310
2313
  if (t.collapseAtStart(n)) return !0;
@@ -2314,7 +2317,7 @@ function Zr(n, e) {
2314
2317
  }
2315
2318
  return !1;
2316
2319
  }
2317
- const Lo = (() => {
2320
+ const Io = (() => {
2318
2321
  try {
2319
2322
  const n = new RegExp("\\p{Emoji}", "u"), e = n.test.bind(n);
2320
2323
  if (e("❤️") && e("#️⃣") && e("👍")) return e;
@@ -2322,7 +2325,7 @@ const Lo = (() => {
2322
2325
  }
2323
2326
  return () => !1;
2324
2327
  })();
2325
- function ei(n, e, t) {
2328
+ function ti(n, e, t) {
2326
2329
  const r = n, i = r.getTextContent().split(/(?=\s)/g), s = i.length;
2327
2330
  let o = 0, l = 0;
2328
2331
  for (let c = 0; c < s; c++) {
@@ -2335,7 +2338,7 @@ function ei(n, e, t) {
2335
2338
  const a = i.join("").trim();
2336
2339
  a === "" ? r.remove() : (r.setTextContent(a), r.select(l, l));
2337
2340
  }
2338
- function ti(n, e, t, r) {
2341
+ function ni(n, e, t, r) {
2339
2342
  let i, s = e;
2340
2343
  if (ee(n)) {
2341
2344
  let o = !1;
@@ -2347,9 +2350,9 @@ function ti(n, e, t, r) {
2347
2350
  const f = c.parentNode;
2348
2351
  n === f && e > Array.prototype.indexOf.call(f.children, c) && s--;
2349
2352
  }
2350
- if (i = Ze(u), M(i)) s = _i(i, o);
2353
+ if (i = et(u), M(i)) s = pi(i, o);
2351
2354
  else {
2352
- let f = Ze(n);
2355
+ let f = et(n);
2353
2356
  if (f === null) return null;
2354
2357
  if (v(f)) {
2355
2358
  const g = r.getElementByKey(f.getKey());
@@ -2362,17 +2365,17 @@ function ti(n, e, t, r) {
2362
2365
  const p = o ? _.getLastDescendant() : _.getFirstDescendant();
2363
2366
  p === null ? f = _ : (_ = p, f = v(_) ? _ : _.getParentOrThrow()), s = 0;
2364
2367
  }
2365
- M(_) ? (i = _, f = null, s = _i(_, o)) : _ !== f && o && !h && (v(f) || T(216), s = Math.min(f.getChildrenSize(), s + 1));
2368
+ M(_) ? (i = _, f = null, s = pi(_, o)) : _ !== f && o && !h && (v(f) || T(216), s = Math.min(f.getChildrenSize(), s + 1));
2366
2369
  } else {
2367
2370
  const g = f.getIndexWithinParent();
2368
- s = e === 0 && z(f) && Ze(n) === f ? g : g + 1, f = f.getParentOrThrow();
2371
+ s = e === 0 && z(f) && et(n) === f ? g : g + 1, f = f.getParentOrThrow();
2369
2372
  }
2370
2373
  if (v(f)) return ge(f.__key, s, "element");
2371
2374
  }
2372
- } else i = Ze(n);
2375
+ } else i = et(n);
2373
2376
  return M(i) ? ge(i.__key, s, "text") : null;
2374
2377
  }
2375
- function ni(n, e, t) {
2378
+ function ri(n, e, t) {
2376
2379
  const r = n.offset, i = n.getNode();
2377
2380
  if (r === 0) {
2378
2381
  const s = i.getPreviousSibling(), o = i.getParent();
@@ -2391,10 +2394,10 @@ function ni(n, e, t) {
2391
2394
  }
2392
2395
  }
2393
2396
  }
2394
- function rs(n, e, t) {
2397
+ function ss(n, e, t) {
2395
2398
  if (n.type === "text" && e.type === "text") {
2396
2399
  const r = n.isBefore(e), i = n.is(e);
2397
- ni(n, r, i), ni(e, !r, i), i && e.set(n.key, n.offset, n.type);
2400
+ ri(n, r, i), ri(e, !r, i), i && e.set(n.key, n.offset, n.type);
2398
2401
  const s = R();
2399
2402
  if (s.isComposing() && s._compositionKey !== n.key && O(t)) {
2400
2403
  const o = t.anchor, l = t.focus;
@@ -2402,55 +2405,55 @@ function rs(n, e, t) {
2402
2405
  }
2403
2406
  }
2404
2407
  }
2405
- function is(n, e, t, r, i, s) {
2406
- if (n === null || t === null || !Sn(i, n, t)) return null;
2407
- const o = ti(n, e, O(s) ? s.anchor : null, i);
2408
+ function os(n, e, t, r, i, s) {
2409
+ if (n === null || t === null || !vn(i, n, t)) return null;
2410
+ const o = ni(n, e, O(s) ? s.anchor : null, i);
2408
2411
  if (o === null) return null;
2409
- const l = ti(t, r, O(s) ? s.focus : null, i);
2412
+ const l = ni(t, r, O(s) ? s.focus : null, i);
2410
2413
  if (l === null) return null;
2411
2414
  if (o.type === "element" && l.type === "element") {
2412
- const a = Ze(n), c = Ze(t);
2415
+ const a = et(n), c = et(t);
2413
2416
  if (z(a) && z(c)) return null;
2414
2417
  }
2415
- return rs(o, l, s), [o, l];
2418
+ return ss(o, l, s), [o, l];
2416
2419
  }
2417
- function Pl(n) {
2420
+ function Fl(n) {
2418
2421
  return v(n) && !n.isInline();
2419
2422
  }
2420
- function ss(n, e, t, r, i, s) {
2421
- const o = Fe(), l = new qe(ge(n, e, i), ge(t, r, s), 0, "");
2423
+ function ls(n, e, t, r, i, s) {
2424
+ const o = Fe(), l = new Xe(ge(n, e, i), ge(t, r, s), 0, "");
2422
2425
  return l.dirty = !0, o._selection = l, l;
2423
2426
  }
2424
- function Io() {
2427
+ function Ko() {
2425
2428
  const n = ge("root", 0, "element"), e = ge("root", 0, "element");
2426
- return new qe(n, e, 0, "");
2429
+ return new Xe(n, e, 0, "");
2427
2430
  }
2428
- function os() {
2429
- return new pn(/* @__PURE__ */ new Set());
2431
+ function as() {
2432
+ return new yn(/* @__PURE__ */ new Set());
2430
2433
  }
2431
- function Fl(n, e) {
2432
- return yn(null, n, e, null);
2434
+ function Ll(n, e) {
2435
+ return mn(null, n, e, null);
2433
2436
  }
2434
- function yn(n, e, t, r) {
2437
+ function mn(n, e, t, r) {
2435
2438
  const i = t._window;
2436
2439
  if (i === null) return null;
2437
- const s = r || i.event, o = s ? s.type : void 0, l = o === "selectionchange", a = !Un && (l || o === "beforeinput" || o === "compositionstart" || o === "compositionend" || o === "click" && s && s.detail === 3 || o === "drop" || o === void 0);
2440
+ const s = r || i.event, o = s ? s.type : void 0, l = o === "selectionchange", a = !jn && (l || o === "beforeinput" || o === "compositionstart" || o === "compositionend" || o === "click" && s && s.detail === 3 || o === "drop" || o === void 0);
2438
2441
  let c, u, h, f;
2439
2442
  if (O(n) && !a) return n.clone();
2440
2443
  if (e === null) return null;
2441
- if (c = e.anchorNode, u = e.focusNode, h = e.anchorOffset, f = e.focusOffset, l && O(n) && !Sn(t, c, u)) return n.clone();
2442
- const g = is(c, h, u, f, t, n);
2444
+ if (c = e.anchorNode, u = e.focusNode, h = e.anchorOffset, f = e.focusOffset, l && O(n) && !vn(t, c, u)) return n.clone();
2445
+ const g = os(c, h, u, f, t, n);
2443
2446
  if (g === null) return null;
2444
2447
  const [d, _] = g;
2445
- return new qe(d, _, O(n) ? n.format : 0, O(n) ? n.style : "");
2448
+ return new Xe(d, _, O(n) ? n.format : 0, O(n) ? n.style : "");
2446
2449
  }
2447
2450
  function L() {
2448
2451
  return Fe()._selection;
2449
2452
  }
2450
- function ut() {
2453
+ function ft() {
2451
2454
  return R()._editorState._selection;
2452
2455
  }
2453
- function cn(n, e, t, r = 1) {
2456
+ function un(n, e, t, r = 1) {
2454
2457
  const i = n.anchor, s = n.focus, o = i.getNode(), l = s.getNode();
2455
2458
  if (!e.is(o) && !e.is(l)) return;
2456
2459
  const a = e.__key;
@@ -2458,7 +2461,7 @@ function cn(n, e, t, r = 1) {
2458
2461
  const c = i.offset;
2459
2462
  if (t <= c && r > 0 || t < c && r < 0) {
2460
2463
  const u = Math.max(0, c + r);
2461
- i.set(a, u, "element"), s.set(a, u, "element"), ri(n);
2464
+ i.set(a, u, "element"), s.set(a, u, "element"), ii(n);
2462
2465
  }
2463
2466
  } else {
2464
2467
  const c = n.isBackward(), u = c ? s : i, h = u.getNode(), f = c ? i : s, g = f.getNode();
@@ -2471,9 +2474,9 @@ function cn(n, e, t, r = 1) {
2471
2474
  (t <= d && r > 0 || t < d && r < 0) && f.set(a, Math.max(0, d + r), "element");
2472
2475
  }
2473
2476
  }
2474
- ri(n);
2477
+ ii(n);
2475
2478
  }
2476
- function ri(n) {
2479
+ function ii(n) {
2477
2480
  const e = n.anchor, t = e.offset, r = n.focus, i = r.offset, s = e.getNode(), o = r.getNode();
2478
2481
  if (n.isCollapsed()) {
2479
2482
  if (!v(s)) return;
@@ -2499,33 +2502,33 @@ function ri(n) {
2499
2502
  }
2500
2503
  }
2501
2504
  }
2502
- function un(n, e, t, r, i) {
2505
+ function fn(n, e, t, r, i) {
2503
2506
  let s = null, o = 0, l = null;
2504
2507
  r !== null ? (s = r.__key, M(r) ? (o = r.getTextContentSize(), l = "text") : v(r) && (o = r.getChildrenSize(), l = "element")) : i !== null && (s = i.__key, M(i) ? l = "text" : v(i) && (l = "element")), s !== null && l !== null ? n.set(s, o, l) : (o = e.getIndexWithinParent(), o === -1 && (o = t.getChildrenSize()), n.set(t.__key, o, "element"));
2505
2508
  }
2506
- function ii(n, e, t, r, i) {
2509
+ function si(n, e, t, r, i) {
2507
2510
  n.type === "text" ? n.set(t, n.offset + (e ? 0 : i), "text") : n.offset > r.getIndexWithinParent() && n.set(n.key, n.offset - 1, "element");
2508
2511
  }
2509
- function ls(n, e, t, r, i) {
2512
+ function cs(n, e, t, r, i) {
2510
2513
  try {
2511
2514
  n.setBaseAndExtent(e, t, r, i);
2512
2515
  } catch {
2513
2516
  }
2514
2517
  }
2515
- function Ko(n, e, t, r, i, s, o) {
2518
+ function zo(n, e, t, r, i, s, o) {
2516
2519
  const l = r.anchorNode, a = r.focusNode, c = r.anchorOffset, u = r.focusOffset, h = document.activeElement;
2517
- if (i.has(Wo) && h !== s || h !== null && gs(h)) return;
2518
- if (!O(e)) return void (n !== null && Sn(t, l, a) && r.removeAllRanges());
2519
- const f = e.anchor, g = e.focus, d = f.key, _ = g.key, p = ot(t, d), x = ot(t, _), y = f.offset, m = g.offset, b = e.format, N = e.style, C = e.isCollapsed();
2520
+ if (i.has(Jo) && h !== s || h !== null && ps(h)) return;
2521
+ if (!O(e)) return void (n !== null && vn(t, l, a) && r.removeAllRanges());
2522
+ const f = e.anchor, g = e.focus, d = f.key, _ = g.key, p = lt(t, d), x = lt(t, _), y = f.offset, m = g.offset, b = e.format, N = e.style, C = e.isCollapsed();
2520
2523
  let w = p, k = x, S = !1;
2521
2524
  if (f.type === "text") {
2522
- w = st(p);
2525
+ w = ot(p);
2523
2526
  const B = f.getNode();
2524
2527
  S = B.getFormat() !== b || B.getStyle() !== N;
2525
2528
  } else O(n) && n.anchor.type === "text" && (S = !0);
2526
2529
  var A, F, W, K, P;
2527
- if (g.type === "text" && (k = st(x)), w !== null && k !== null && (C && (n === null || S || O(n) && (n.format !== b || n.style !== N)) && (A = b, F = N, W = y, K = d, P = performance.now(), qi = [A, F, W, K, P]), c !== y || u !== m || l !== w || a !== k || r.type === "Range" && C || (h !== null && s.contains(h) || s.focus({ preventScroll: !0 }), f.type === "element"))) {
2528
- if (ls(r, w, y, k, m), !i.has(Jo) && e.isCollapsed() && s !== null && s === document.activeElement) {
2530
+ if (g.type === "text" && (k = ot(x)), w !== null && k !== null && (C && (n === null || S || O(n) && (n.format !== b || n.style !== N)) && (A = b, F = N, W = y, K = d, P = performance.now(), Gi = [A, F, W, K, P]), c !== y || u !== m || l !== w || a !== k || r.type === "Range" && C || (h !== null && s.contains(h) || s.focus({ preventScroll: !0 }), f.type === "element"))) {
2531
+ if (cs(r, w, y, k, m), !i.has(Uo) && e.isCollapsed() && s !== null && s === document.activeElement) {
2529
2532
  const B = O(e) && e.anchor.type === "element" ? w.childNodes[y] || null : r.rangeCount > 0 ? r.getRangeAt(0) : null;
2530
2533
  if (B !== null) {
2531
2534
  let V;
@@ -2534,51 +2537,51 @@ function Ko(n, e, t, r, i, s, o) {
2534
2537
  _e.selectNode(B), V = _e.getBoundingClientRect();
2535
2538
  } else V = B.getBoundingClientRect();
2536
2539
  (function(_e, pe, ye) {
2537
- const ft = Ts(ye), Or = Nr(ft);
2538
- if (ft === null || Or === null) return;
2539
- let { top: Nn, bottom: wn } = pe, Lt = 0, It = 0, Ne = ye;
2540
+ const dt = Ns(ye), Dr = wr(dt);
2541
+ if (dt === null || Dr === null) return;
2542
+ let { top: wn, bottom: En } = pe, It = 0, Kt = 0, Ne = ye;
2540
2543
  for (; Ne !== null; ) {
2541
- const En = Ne === ft.body;
2542
- if (En) Lt = 0, It = oe(_e).innerHeight;
2544
+ const Mn = Ne === dt.body;
2545
+ if (Mn) It = 0, Kt = oe(_e).innerHeight;
2543
2546
  else {
2544
- const Kt = Ne.getBoundingClientRect();
2545
- Lt = Kt.top, It = Kt.bottom;
2547
+ const zt = Ne.getBoundingClientRect();
2548
+ It = zt.top, Kt = zt.bottom;
2546
2549
  }
2547
- let dt = 0;
2548
- if (Nn < Lt ? dt = -(Lt - Nn) : wn > It && (dt = wn - It), dt !== 0) if (En) Or.scrollBy(0, dt);
2550
+ let ht = 0;
2551
+ if (wn < It ? ht = -(It - wn) : En > Kt && (ht = En - Kt), ht !== 0) if (Mn) Dr.scrollBy(0, ht);
2549
2552
  else {
2550
- const Kt = Ne.scrollTop;
2551
- Ne.scrollTop += dt;
2552
- const Dr = Ne.scrollTop - Kt;
2553
- Nn -= Dr, wn -= Dr;
2553
+ const zt = Ne.scrollTop;
2554
+ Ne.scrollTop += ht;
2555
+ const Pr = Ne.scrollTop - zt;
2556
+ wn -= Pr, En -= Pr;
2554
2557
  }
2555
- if (En) break;
2556
- Ne = Dt(Ne);
2558
+ if (Mn) break;
2559
+ Ne = Pt(Ne);
2557
2560
  }
2558
2561
  })(t, V, s);
2559
2562
  }
2560
2563
  }
2561
- er = !0;
2564
+ tr = !0;
2562
2565
  }
2563
2566
  }
2564
- function Ll(n) {
2565
- let e = L() || ut();
2567
+ function Il(n) {
2568
+ let e = L() || ft();
2566
2569
  e === null && (e = re().selectEnd()), e.insertNodes(n);
2567
2570
  }
2568
- function In(n) {
2571
+ function Kn(n) {
2569
2572
  let e = n;
2570
2573
  n.isCollapsed() || e.removeText();
2571
2574
  const t = L();
2572
2575
  O(t) && (e = t), O(e) || T(161);
2573
2576
  const r = e.anchor;
2574
2577
  let i = r.getNode(), s = r.offset;
2575
- for (; !we(i); ) {
2578
+ for (; !Ee(i); ) {
2576
2579
  const o = i;
2577
- if ([i, s] = zo(i, s), o.is(i)) break;
2580
+ if ([i, s] = Bo(i, s), o.is(i)) break;
2578
2581
  }
2579
2582
  return s;
2580
2583
  }
2581
- function zo(n, e) {
2584
+ function Bo(n, e) {
2582
2585
  const t = n.getParent();
2583
2586
  if (!t) {
2584
2587
  const i = Ae();
@@ -2593,25 +2596,25 @@ function zo(n, e) {
2593
2596
  if (!v(n) || e === 0) return [t, n.getIndexWithinParent()];
2594
2597
  const r = n.getChildAtIndex(e);
2595
2598
  if (r) {
2596
- const i = new qe(ge(n.__key, e, "element"), ge(n.__key, e, "element"), 0, ""), s = n.insertNewAfter(i);
2599
+ const i = new Xe(ge(n.__key, e, "element"), ge(n.__key, e, "element"), 0, ""), s = n.insertNewAfter(i);
2597
2600
  s && s.append(r, ...r.getNextSiblings());
2598
2601
  }
2599
2602
  return [t, n.getIndexWithinParent() + 1];
2600
2603
  }
2601
- function si(n, e, t, r, i = "decorators-and-blocks") {
2604
+ function oi(n, e, t, r, i = "decorators-and-blocks") {
2602
2605
  if (e === "move" && r === "character" && !n.isCollapsed()) {
2603
2606
  const [u, h] = t === n.isBackward() ? [n.focus, n.anchor] : [n.anchor, n.focus];
2604
2607
  return h.set(u.key, u.offset, u.type), !0;
2605
2608
  }
2606
- const s = Ye(n.focus, t ? "previous" : "next"), o = r === "lineboundary", l = e === "move";
2609
+ const s = qe(n.focus, t ? "previous" : "next"), o = r === "lineboundary", l = e === "move";
2607
2610
  let a = s, c = i === "decorators-and-blocks";
2608
- if (!xl(a)) {
2611
+ if (!Cl(a)) {
2609
2612
  for (const u of a) {
2610
2613
  c = !1;
2611
2614
  const { origin: h } = u;
2612
2615
  if (!z(h) || h.isIsolated() || (a = u, !o || !h.isInline())) break;
2613
2616
  }
2614
- if (c) for (const u of bs(s).iterNodeCarets(e === "extend" ? "shadowRoot" : "root")) {
2617
+ if (c) for (const u of ws(s).iterNodeCarets(e === "extend" ? "shadowRoot" : "root")) {
2615
2618
  if (he(u)) u.origin.isInline() || (a = u);
2616
2619
  else {
2617
2620
  if (v(u.origin)) continue;
@@ -2622,34 +2625,34 @@ function si(n, e, t, r, i = "decorators-and-blocks") {
2622
2625
  }
2623
2626
  if (a === s) return !1;
2624
2627
  if (l && !o && z(a.origin) && a.origin.isKeyboardSelectable()) {
2625
- const u = os();
2628
+ const u = as();
2626
2629
  return u.add(a.origin.getKey()), ie(u), !0;
2627
2630
  }
2628
- return a = de(a), l && Nt(n.anchor, a), Nt(n.focus, a), c || !o;
2631
+ return a = de(a), l && wt(n.anchor, a), wt(n.focus, a), c || !o;
2629
2632
  }
2630
- let U = null, $ = null, Z = !1, Kn = !1, Yt = 0;
2631
- const oi = { characterData: !0, childList: !0, subtree: !0 };
2632
- function Mt() {
2633
+ let U = null, j = null, Z = !1, zn = !1, Ht = 0;
2634
+ const li = { characterData: !0, childList: !0, subtree: !0 };
2635
+ function At() {
2633
2636
  return Z || U !== null && U._readOnly;
2634
2637
  }
2635
2638
  function G() {
2636
2639
  Z && T(13);
2637
2640
  }
2638
- function as() {
2639
- Yt > 99 && T(14);
2641
+ function us() {
2642
+ Ht > 99 && T(14);
2640
2643
  }
2641
2644
  function Fe() {
2642
- return U === null && T(195, cs()), U;
2645
+ return U === null && T(195, fs()), U;
2643
2646
  }
2644
2647
  function R() {
2645
- return $ === null && T(196, cs()), $;
2648
+ return j === null && T(196, fs()), j;
2646
2649
  }
2647
- function cs() {
2650
+ function fs() {
2648
2651
  let n = 0;
2649
- const e = /* @__PURE__ */ new Set(), t = Cn.version;
2652
+ const e = /* @__PURE__ */ new Set(), t = Sn.version;
2650
2653
  if (typeof window < "u") for (const i of document.querySelectorAll("[contenteditable]")) {
2651
- const s = vn(i);
2652
- if (Cr(s)) n++;
2654
+ const s = kn(i);
2655
+ if (Sr(s)) n++;
2653
2656
  else if (s) {
2654
2657
  let o = String(s.constructor.version || "<0.17.1");
2655
2658
  o === t && (o += " (separately built, likely a bundler configuration issue)"), e.add(o);
@@ -2658,10 +2661,10 @@ function cs() {
2658
2661
  let r = ` Detected on the page: ${n} compatible editor(s) with version ${t}`;
2659
2662
  return e.size && (r += ` and incompatible editors with versions ${Array.from(e).join(", ")}`), r;
2660
2663
  }
2661
- function Bo() {
2662
- return $;
2664
+ function Ro() {
2665
+ return j;
2663
2666
  }
2664
- function li(n, e, t) {
2667
+ function ai(n, e, t) {
2665
2668
  const r = e.__type, i = function(l, a) {
2666
2669
  const c = l._nodes.get(a);
2667
2670
  return c === void 0 && T(30, a), c;
@@ -2671,73 +2674,73 @@ function li(n, e, t) {
2671
2674
  const o = s.length;
2672
2675
  for (let l = 0; l < o && (s[l](e), e.isAttached()); l++) ;
2673
2676
  }
2674
- function ai(n, e) {
2677
+ function ci(n, e) {
2675
2678
  return n !== void 0 && n.__key !== e && n.isAttached();
2676
2679
  }
2677
- function us(n, e) {
2680
+ function ds(n, e) {
2678
2681
  if (!e) return;
2679
2682
  const t = n._updateTags;
2680
2683
  let r = e;
2681
2684
  Array.isArray(e) || (r = [e]);
2682
2685
  for (const i of r) t.add(i);
2683
2686
  }
2684
- function Il(n) {
2685
- return yr(n, R()._nodes);
2687
+ function Kl(n) {
2688
+ return mr(n, R()._nodes);
2686
2689
  }
2687
- function yr(n, e) {
2690
+ function mr(n, e) {
2688
2691
  const t = n.type, r = e.get(t);
2689
2692
  r === void 0 && T(17, t);
2690
2693
  const i = r.klass;
2691
2694
  n.type !== i.getType() && T(18, i.name);
2692
2695
  const s = i.importJSON(n), o = n.children;
2693
2696
  if (v(s) && Array.isArray(o)) for (let l = 0; l < o.length; l++) {
2694
- const a = yr(o[l], e);
2697
+ const a = mr(o[l], e);
2695
2698
  s.append(a);
2696
2699
  }
2697
2700
  return s;
2698
2701
  }
2699
- function ci(n, e, t) {
2700
- const r = U, i = Z, s = $;
2701
- U = e, Z = !0, $ = n;
2702
+ function ui(n, e, t) {
2703
+ const r = U, i = Z, s = j;
2704
+ U = e, Z = !0, j = n;
2702
2705
  try {
2703
2706
  return t();
2704
2707
  } finally {
2705
- U = r, Z = i, $ = s;
2708
+ U = r, Z = i, j = s;
2706
2709
  }
2707
2710
  }
2708
2711
  function ve(n, e) {
2709
2712
  const t = n._pendingEditorState, r = n._rootElement, i = n._headless || r === null;
2710
2713
  if (t === null) return;
2711
- const s = n._editorState, o = s._selection, l = t._selection, a = n._dirtyType !== Re, c = U, u = Z, h = $, f = n._updating, g = n._observer;
2714
+ const s = n._editorState, o = s._selection, l = t._selection, a = n._dirtyType !== Je, c = U, u = Z, h = j, f = n._updating, g = n._observer;
2712
2715
  let d = null;
2713
2716
  if (n._pendingEditorState = null, n._editorState = t, !i && a && g !== null) {
2714
- $ = n, U = t, Z = !1, n._updating = !0;
2717
+ j = n, U = t, Z = !1, n._updating = !0;
2715
2718
  try {
2716
2719
  const C = n._dirtyType, w = n._dirtyElements, k = n._dirtyLeaves;
2717
- g.disconnect(), d = io(s, t, n, C, w, k);
2720
+ g.disconnect(), d = oo(s, t, n, C, w, k);
2718
2721
  } catch (C) {
2719
- if (C instanceof Error && n._onError(C), Kn) throw C;
2720
- return hs(n, null, r, t), Fi(n), n._dirtyType = it, Kn = !0, ve(n, s), void (Kn = !1);
2722
+ if (C instanceof Error && n._onError(C), zn) throw C;
2723
+ return _s(n, null, r, t), Li(n), n._dirtyType = st, zn = !0, ve(n, s), void (zn = !1);
2721
2724
  } finally {
2722
- g.observe(r, oi), n._updating = f, U = c, Z = u, $ = h;
2725
+ g.observe(r, li), n._updating = f, U = c, Z = u, j = h;
2723
2726
  }
2724
2727
  }
2725
2728
  t._readOnly || (t._readOnly = !0);
2726
2729
  const _ = n._dirtyLeaves, p = n._dirtyElements, x = n._normalizedNodes, y = n._updateTags, m = n._deferred;
2727
- a && (n._dirtyType = Re, n._cloneNotNeeded.clear(), n._dirtyLeaves = /* @__PURE__ */ new Set(), n._dirtyElements = /* @__PURE__ */ new Map(), n._normalizedNodes = /* @__PURE__ */ new Set(), n._updateTags = /* @__PURE__ */ new Set()), function(C, w) {
2730
+ a && (n._dirtyType = Je, n._cloneNotNeeded.clear(), n._dirtyLeaves = /* @__PURE__ */ new Set(), n._dirtyElements = /* @__PURE__ */ new Map(), n._normalizedNodes = /* @__PURE__ */ new Set(), n._updateTags = /* @__PURE__ */ new Set()), function(C, w) {
2728
2731
  const k = C._decorators;
2729
2732
  let S = C._pendingDecorators || k;
2730
2733
  const A = w._nodeMap;
2731
2734
  let F;
2732
- for (F in S) A.has(F) || (S === k && (S = ms(C)), delete S[F]);
2735
+ for (F in S) A.has(F) || (S === k && (S = Cs(C)), delete S[F]);
2733
2736
  }(n, t);
2734
2737
  const b = i ? null : Te(oe(n));
2735
- if (n._editable && b !== null && (a || l === null || l.dirty) && r !== null && !y.has(Uo)) {
2736
- $ = n, U = t;
2738
+ if (n._editable && b !== null && (a || l === null || l.dirty) && r !== null && !y.has(jo)) {
2739
+ j = n, U = t;
2737
2740
  try {
2738
2741
  if (g !== null && g.disconnect(), a || l === null || l.dirty) {
2739
2742
  const C = n._blockCursorElement;
2740
- C !== null && ir(C, n, r), Ko(o, l, n, b, y, r);
2743
+ C !== null && sr(C, n, r), zo(o, l, n, b, y, r);
2741
2744
  }
2742
2745
  (function(C, w, k) {
2743
2746
  let S = C._blockCursorElement;
@@ -2745,12 +2748,12 @@ function ve(n, e) {
2745
2748
  const A = k.anchor, F = A.getNode(), W = A.offset;
2746
2749
  let K = !1, P = null;
2747
2750
  if (W === F.getChildrenSize())
2748
- Rn(F.getChildAtIndex(W - 1)) && (K = !0);
2751
+ Wn(F.getChildAtIndex(W - 1)) && (K = !0);
2749
2752
  else {
2750
2753
  const B = F.getChildAtIndex(W);
2751
- if (B !== null && Rn(B)) {
2754
+ if (B !== null && Wn(B)) {
2752
2755
  const V = B.getPreviousSibling();
2753
- (V === null || Rn(V)) && (K = !0, P = C.getElementByKey(B.__key));
2756
+ (V === null || Wn(V)) && (K = !0, P = C.getElementByKey(B.__key));
2754
2757
  }
2755
2758
  }
2756
2759
  if (K) {
@@ -2761,8 +2764,8 @@ function ve(n, e) {
2761
2764
  let ye = _e.blockCursor;
2762
2765
  if (ye !== void 0) {
2763
2766
  if (typeof ye == "string") {
2764
- const ft = Qt(ye);
2765
- ye = _e.blockCursor = ft;
2767
+ const dt = Zt(ye);
2768
+ ye = _e.blockCursor = dt;
2766
2769
  }
2767
2770
  ye !== void 0 && pe.classList.add(...ye);
2768
2771
  }
@@ -2770,10 +2773,10 @@ function ve(n, e) {
2770
2773
  }(C._config)), w.style.caretColor = "transparent", void (P === null ? B.appendChild(S) : B.insertBefore(S, P));
2771
2774
  }
2772
2775
  }
2773
- S !== null && ir(S, C, w);
2776
+ S !== null && sr(S, C, w);
2774
2777
  })(n, r, l);
2775
2778
  } finally {
2776
- g !== null && g.observe(r, oi), $ = h, U = c;
2779
+ g !== null && g.observe(r, li), j = h, U = c;
2777
2780
  }
2778
2781
  }
2779
2782
  d !== null && function(C, w, k, S, A) {
@@ -2782,12 +2785,12 @@ function ve(n, e) {
2782
2785
  const [P, B] = F[K], V = w.get(B);
2783
2786
  V !== void 0 && P(V, { dirtyLeaves: S, prevEditorState: A, updateTags: k });
2784
2787
  }
2785
- }(n, d, y, _, s), O(l) || l === null || o !== null && o.is(l) || n.dispatchCommand(Wi, void 0);
2788
+ }(n, d, y, _, s), O(l) || l === null || o !== null && o.is(l) || n.dispatchCommand(Ji, void 0);
2786
2789
  const N = n._pendingDecorators;
2787
- N !== null && (n._decorators = N, n._pendingDecorators = null, mt("decorator", n, !0, N)), function(C, w, k) {
2788
- const S = gi(w), A = gi(k);
2789
- S !== A && mt("textcontent", C, !0, A);
2790
- }(n, e || s, t), mt("update", n, !0, { dirtyElements: p, dirtyLeaves: _, editorState: t, mutatedNodes: d, normalizedNodes: x, prevEditorState: e || s, tags: y }), function(C, w) {
2790
+ N !== null && (n._decorators = N, n._pendingDecorators = null, xt("decorator", n, !0, N)), function(C, w, k) {
2791
+ const S = _i(w), A = _i(k);
2792
+ S !== A && xt("textcontent", C, !0, A);
2793
+ }(n, e || s, t), xt("update", n, !0, { dirtyElements: p, dirtyLeaves: _, editorState: t, mutatedNodes: d, normalizedNodes: x, prevEditorState: e || s, tags: y }), function(C, w) {
2791
2794
  if (C._deferred = [], w.length !== 0) {
2792
2795
  const k = C._updating;
2793
2796
  C._updating = !0;
@@ -2803,12 +2806,12 @@ function ve(n, e) {
2803
2806
  const k = w.shift();
2804
2807
  if (k) {
2805
2808
  const [S, A] = k;
2806
- mr(C, S, A);
2809
+ xr(C, S, A);
2807
2810
  }
2808
2811
  }
2809
2812
  }(n);
2810
2813
  }
2811
- function mt(n, e, t, ...r) {
2814
+ function xt(n, e, t, ...r) {
2812
2815
  const i = e._updating;
2813
2816
  e._updating = t;
2814
2817
  try {
@@ -2818,7 +2821,7 @@ function mt(n, e, t, ...r) {
2818
2821
  e._updating = i;
2819
2822
  }
2820
2823
  }
2821
- function ui(n, e) {
2824
+ function fi(n, e) {
2822
2825
  const t = n._updates;
2823
2826
  let r = e || !1;
2824
2827
  for (; t.length !== 0; ) {
@@ -2831,30 +2834,30 @@ function ui(n, e) {
2831
2834
  const a = n._pendingEditorState;
2832
2835
  a === null && T(191), a._flushSync = !0;
2833
2836
  }
2834
- l && n._deferred.push(l), us(n, o.tag);
2837
+ l && n._deferred.push(l), ds(n, o.tag);
2835
2838
  }
2836
2839
  s();
2837
2840
  }
2838
2841
  }
2839
2842
  return r;
2840
2843
  }
2841
- function mr(n, e, t) {
2844
+ function xr(n, e, t) {
2842
2845
  const r = n._updateTags;
2843
2846
  let i, s = !1, o = !1;
2844
- t !== void 0 && (i = t.onUpdate, us(n, t.tag), s = t.skipTransforms || !1, o = t.discrete || !1), i && n._deferred.push(i);
2847
+ t !== void 0 && (i = t.onUpdate, ds(n, t.tag), s = t.skipTransforms || !1, o = t.discrete || !1), i && n._deferred.push(i);
2845
2848
  const l = n._editorState;
2846
2849
  let a = n._pendingEditorState, c = !1;
2847
- (a === null || a._readOnly) && (a = n._pendingEditorState = fs(a || l), c = !0), a._flushSync = o;
2848
- const u = U, h = Z, f = $, g = n._updating;
2849
- U = a, Z = !1, n._updating = !0, $ = n;
2850
+ (a === null || a._readOnly) && (a = n._pendingEditorState = hs(a || l), c = !0), a._flushSync = o;
2851
+ const u = U, h = Z, f = j, g = n._updating;
2852
+ U = a, Z = !1, n._updating = !0, j = n;
2850
2853
  const d = n._headless || n.getRootElement() === null;
2851
2854
  try {
2852
2855
  c && (d ? l._selection !== null && (a._selection = l._selection.clone()) : a._selection = function(y, m) {
2853
2856
  const b = y.getEditorState()._selection, N = Te(oe(y));
2854
- return O(b) || b == null ? yn(b, N, y, m) : b.clone();
2857
+ return O(b) || b == null ? mn(b, N, y, m) : b.clone();
2855
2858
  }(n, t && t.event || null));
2856
2859
  const p = n._compositionKey;
2857
- e(), s = ui(n, s), function(y, m) {
2860
+ e(), s = fi(n, s), function(y, m) {
2858
2861
  const b = m.getEditorState()._selection, N = y._selection;
2859
2862
  if (O(N)) {
2860
2863
  const C = N.anchor, w = N.focus;
@@ -2864,24 +2867,24 @@ function mr(n, e, t) {
2864
2867
  k !== S && S.selectionTransform(b, N);
2865
2868
  }
2866
2869
  }
2867
- }(a, n), n._dirtyType !== Re && (s ? function(y, m) {
2870
+ }(a, n), n._dirtyType !== Je && (s ? function(y, m) {
2868
2871
  const b = m._dirtyLeaves, N = y._nodeMap;
2869
2872
  for (const C of b) {
2870
2873
  const w = N.get(C);
2871
- M(w) && w.isAttached() && w.isSimpleText() && !w.isUnmergeable() && Kr(w);
2874
+ M(w) && w.isAttached() && w.isSimpleText() && !w.isUnmergeable() && zr(w);
2872
2875
  }
2873
2876
  }(a, n) : function(y, m) {
2874
- const b = m._dirtyLeaves, N = m._dirtyElements, C = y._nodeMap, w = Ee(), k = /* @__PURE__ */ new Map();
2877
+ const b = m._dirtyLeaves, N = m._dirtyElements, C = y._nodeMap, w = Me(), k = /* @__PURE__ */ new Map();
2875
2878
  let S = b, A = S.size, F = N, W = F.size;
2876
2879
  for (; A > 0 || W > 0; ) {
2877
2880
  if (A > 0) {
2878
2881
  m._dirtyLeaves = /* @__PURE__ */ new Set();
2879
2882
  for (const K of S) {
2880
2883
  const P = C.get(K);
2881
- M(P) && P.isAttached() && P.isSimpleText() && !P.isUnmergeable() && Kr(P), P !== void 0 && ai(P, w) && li(m, P, k), b.add(K);
2884
+ M(P) && P.isAttached() && P.isSimpleText() && !P.isUnmergeable() && zr(P), P !== void 0 && ci(P, w) && ai(m, P, k), b.add(K);
2882
2885
  }
2883
2886
  if (S = m._dirtyLeaves, A = S.size, A > 0) {
2884
- Yt++;
2887
+ Ht++;
2885
2888
  continue;
2886
2889
  }
2887
2890
  }
@@ -2890,16 +2893,16 @@ function mr(n, e, t) {
2890
2893
  const P = K[0], B = K[1];
2891
2894
  if (N.set(P, B), !B) continue;
2892
2895
  const V = C.get(P);
2893
- V !== void 0 && ai(V, w) && li(m, V, k);
2896
+ V !== void 0 && ci(V, w) && ai(m, V, k);
2894
2897
  }
2895
- S = m._dirtyLeaves, A = S.size, F = m._dirtyElements, W = F.size, Yt++;
2898
+ S = m._dirtyLeaves, A = S.size, F = m._dirtyElements, W = F.size, Ht++;
2896
2899
  }
2897
2900
  m._dirtyLeaves = b, m._dirtyElements = N;
2898
- }(a, n), ui(n), function(y, m, b, N) {
2901
+ }(a, n), fi(n), function(y, m, b, N) {
2899
2902
  const C = y._nodeMap, w = m._nodeMap, k = [];
2900
2903
  for (const [S] of N) {
2901
2904
  const A = w.get(S);
2902
- A !== void 0 && (A.isAttached() || (v(A) && Oi(A, S, C, w, k, N), C.has(S) || N.delete(S), k.push(S)));
2905
+ A !== void 0 && (A.isAttached() || (v(A) && Di(A, S, C, w, k, N), C.has(S) || N.delete(S), k.push(S)));
2903
2906
  }
2904
2907
  for (const S of k) w.delete(S);
2905
2908
  for (const S of b) {
@@ -2911,37 +2914,37 @@ function mr(n, e, t) {
2911
2914
  if (O(x)) {
2912
2915
  const y = a._nodeMap, m = x.anchor.key, b = x.focus.key;
2913
2916
  y.get(m) !== void 0 && y.get(b) !== void 0 || T(19);
2914
- } else pr(x) && x._nodes.size === 0 && (a._selection = null);
2917
+ } else yr(x) && x._nodes.size === 0 && (a._selection = null);
2915
2918
  } catch (p) {
2916
- return p instanceof Error && n._onError(p), n._pendingEditorState = l, n._dirtyType = it, n._cloneNotNeeded.clear(), n._dirtyLeaves = /* @__PURE__ */ new Set(), n._dirtyElements.clear(), void ve(n);
2919
+ return p instanceof Error && n._onError(p), n._pendingEditorState = l, n._dirtyType = st, n._cloneNotNeeded.clear(), n._dirtyLeaves = /* @__PURE__ */ new Set(), n._dirtyElements.clear(), void ve(n);
2917
2920
  } finally {
2918
- U = u, Z = h, $ = f, n._updating = g, Yt = 0;
2921
+ U = u, Z = h, j = f, n._updating = g, Ht = 0;
2919
2922
  }
2920
- n._dirtyType !== Re || n._deferred.length > 0 || function(p, x) {
2923
+ n._dirtyType !== Je || n._deferred.length > 0 || function(p, x) {
2921
2924
  const y = x.getEditorState()._selection, m = p._selection;
2922
2925
  if (m !== null) {
2923
2926
  if (m.dirty || !m.is(y)) return !0;
2924
2927
  } else if (y !== null) return !0;
2925
2928
  return !1;
2926
- }(a, n) ? a._flushSync ? (a._flushSync = !1, ve(n)) : c && Yo(() => {
2929
+ }(a, n) ? a._flushSync ? (a._flushSync = !1, ve(n)) : c && Ho(() => {
2927
2930
  ve(n);
2928
2931
  }) : (a._flushSync = !1, c && (r.clear(), n._deferred = [], n._pendingEditorState = null));
2929
2932
  }
2930
2933
  function te(n, e, t) {
2931
- $ === n && t === void 0 ? e() : mr(n, e, t);
2934
+ j === n && t === void 0 ? e() : xr(n, e, t);
2932
2935
  }
2933
- class xt {
2936
+ class Ct {
2934
2937
  constructor(e, t, r) {
2935
2938
  this.element = e, this.before = t || null, this.after = r || null;
2936
2939
  }
2937
2940
  withBefore(e) {
2938
- return new xt(this.element, e, this.after);
2941
+ return new Ct(this.element, e, this.after);
2939
2942
  }
2940
2943
  withAfter(e) {
2941
- return new xt(this.element, this.before, e);
2944
+ return new Ct(this.element, this.before, e);
2942
2945
  }
2943
2946
  withElement(e) {
2944
- return this.element === e ? this : new xt(e, this.before, this.after);
2947
+ return this.element === e ? this : new Ct(e, this.before, this.after);
2945
2948
  }
2946
2949
  insertChild(e) {
2947
2950
  const t = this.before || this.getManagedLineBreak();
@@ -2963,7 +2966,7 @@ class xt {
2963
2966
  setManagedLineBreak(e) {
2964
2967
  if (e === null) this.removeManagedLineBreak();
2965
2968
  else {
2966
- const t = e === "decorator" && (rt || Ct);
2969
+ const t = e === "decorator" && (it || St);
2967
2970
  this.insertManagedLineBreak(t);
2968
2971
  }
2969
2972
  }
@@ -2996,9 +2999,9 @@ class xt {
2996
2999
  const a = this.getFirstChildOffset();
2997
3000
  return [e, Math.min(a + e.getChildrenSize(), Math.max(a, i))];
2998
3001
  }
2999
- const s = fi(t, r);
3002
+ const s = di(t, r);
3000
3003
  s.push(i);
3001
- const o = fi(t, this.element);
3004
+ const o = di(t, this.element);
3002
3005
  let l = e.getIndexWithinParent();
3003
3006
  for (let a = 0; a < o.length; a++) {
3004
3007
  const c = s[a], u = o[a];
@@ -3011,7 +3014,7 @@ class xt {
3011
3014
  return [e.getParentOrThrow(), l];
3012
3015
  }
3013
3016
  }
3014
- function fi(n, e) {
3017
+ function di(n, e) {
3015
3018
  const t = [];
3016
3019
  let r = e;
3017
3020
  for (; r !== n && r !== null; r = r.parentNode) {
@@ -3021,7 +3024,7 @@ function fi(n, e) {
3021
3024
  }
3022
3025
  return r !== n && T(225), t.reverse();
3023
3026
  }
3024
- class mn extends _n {
3027
+ class xn extends pn {
3025
3028
  constructor(e) {
3026
3029
  super(e), this.__first = null, this.__last = null, this.__size = 0, this.__format = 0, this.__style = "", this.__indent = 0, this.__dir = null, this.__textFormat = 0, this.__textStyle = "";
3027
3030
  }
@@ -3033,7 +3036,7 @@ class mn extends _n {
3033
3036
  }
3034
3037
  getFormatType() {
3035
3038
  const e = this.getFormat();
3036
- return Vs[e] || "";
3039
+ return Hs[e] || "";
3037
3040
  }
3038
3041
  getStyle() {
3039
3042
  return this.getLatest().__style;
@@ -3108,7 +3111,7 @@ class mn extends _n {
3108
3111
  }
3109
3112
  getFirstChild() {
3110
3113
  const e = this.getLatest().__first;
3111
- return e === null ? null : j(e);
3114
+ return e === null ? null : $(e);
3112
3115
  }
3113
3116
  getFirstChildOrThrow() {
3114
3117
  const e = this.getFirstChild();
@@ -3116,7 +3119,7 @@ class mn extends _n {
3116
3119
  }
3117
3120
  getLastChild() {
3118
3121
  const e = this.getLatest().__last;
3119
- return e === null ? null : j(e);
3122
+ return e === null ? null : $(e);
3120
3123
  }
3121
3124
  getLastChildOrThrow() {
3122
3125
  const e = this.getLastChild();
@@ -3164,17 +3167,17 @@ class mn extends _n {
3164
3167
  }
3165
3168
  hasFormat(e) {
3166
3169
  if (e !== "") {
3167
- const t = Fr[e];
3170
+ const t = Lr[e];
3168
3171
  return !!(this.getFormat() & t);
3169
3172
  }
3170
3173
  return !1;
3171
3174
  }
3172
3175
  hasTextFormat(e) {
3173
- const t = We[e];
3176
+ const t = Ue[e];
3174
3177
  return !!(this.getTextFormat() & t);
3175
3178
  }
3176
3179
  getFormatFlags(e, t) {
3177
- return fn(this.getLatest().__textFormat, e, t);
3180
+ return dn(this.getLatest().__textFormat, e, t);
3178
3181
  }
3179
3182
  getTextStyle() {
3180
3183
  return this.getLatest().__textStyle;
@@ -3195,7 +3198,7 @@ class mn extends _n {
3195
3198
  }
3196
3199
  i === void 0 && (i = o), s === void 0 && (s = o);
3197
3200
  const l = this.__key;
3198
- return O(r) ? (r.anchor.set(l, i, "element"), r.focus.set(l, s, "element"), r.dirty = !0, r) : ss(l, i, l, s, "element", "element");
3201
+ return O(r) ? (r.anchor.set(l, i, "element"), r.focus.set(l, s, "element"), r.dirty = !0, r) : ls(l, i, l, s, "element", "element");
3199
3202
  }
3200
3203
  selectStart() {
3201
3204
  const e = this.getFirstDescendant();
@@ -3217,7 +3220,7 @@ class mn extends _n {
3217
3220
  return t.__dir = e, t;
3218
3221
  }
3219
3222
  setFormat(e) {
3220
- return this.getWritable().__format = e !== "" ? Fr[e] : 0, this;
3223
+ return this.getWritable().__format = e !== "" ? Lr[e] : 0, this;
3221
3224
  }
3222
3225
  setStyle(e) {
3223
3226
  return this.getWritable().__style = e || "", this;
@@ -3248,7 +3251,7 @@ class mn extends _n {
3248
3251
  for (let _ = 0; _ < t; _++) {
3249
3252
  d === null && T(100);
3250
3253
  const p = d.getNextSibling(), x = d.__key;
3251
- Be(d.getWritable()), c.push(x), d = p;
3254
+ Re(d.getWritable()), c.push(x), d = p;
3252
3255
  }
3253
3256
  }
3254
3257
  let g = h;
@@ -3256,7 +3259,7 @@ class mn extends _n {
3256
3259
  const _ = r[d];
3257
3260
  g !== null && _.is(g) && (h = g = g.getPreviousSibling());
3258
3261
  const p = _.getWritable();
3259
- p.__parent === l && f--, Be(p);
3262
+ p.__parent === l && f--, Re(p);
3260
3263
  const x = _.__key;
3261
3264
  if (g === null) o.__first = x, p.__prev = null;
3262
3265
  else {
@@ -3278,13 +3281,13 @@ class mn extends _n {
3278
3281
  const d = L();
3279
3282
  if (O(d)) {
3280
3283
  const _ = new Set(c), p = new Set(a), { anchor: x, focus: y } = d;
3281
- di(x, _, p) && un(x, x.getNode(), this, h, u), di(y, _, p) && un(y, y.getNode(), this, h, u), f !== 0 || this.canBeEmpty() || Le(this) || this.remove();
3284
+ hi(x, _, p) && fn(x, x.getNode(), this, h, u), hi(y, _, p) && fn(y, y.getNode(), this, h, u), f !== 0 || this.canBeEmpty() || Le(this) || this.remove();
3282
3285
  }
3283
3286
  }
3284
3287
  return o;
3285
3288
  }
3286
3289
  getDOMSlot(e) {
3287
- return new xt(e);
3290
+ return new Ct(e);
3288
3291
  }
3289
3292
  exportDOM(e) {
3290
3293
  const { element: t } = super.exportDOM(e);
@@ -3355,9 +3358,9 @@ class mn extends _n {
3355
3358
  }
3356
3359
  }
3357
3360
  function v(n) {
3358
- return n instanceof mn;
3361
+ return n instanceof xn;
3359
3362
  }
3360
- function di(n, e, t) {
3363
+ function hi(n, e, t) {
3361
3364
  let r = n.getNode();
3362
3365
  for (; r; ) {
3363
3366
  const i = r.__key;
@@ -3366,7 +3369,7 @@ function di(n, e, t) {
3366
3369
  }
3367
3370
  return !1;
3368
3371
  }
3369
- class Ro extends _n {
3372
+ class Wo extends pn {
3370
3373
  decorate(e, t) {
3371
3374
  T(47);
3372
3375
  }
@@ -3381,14 +3384,14 @@ class Ro extends _n {
3381
3384
  }
3382
3385
  }
3383
3386
  function z(n) {
3384
- return n instanceof Ro;
3387
+ return n instanceof Wo;
3385
3388
  }
3386
- class At extends mn {
3389
+ class Ot extends xn {
3387
3390
  static getType() {
3388
3391
  return "root";
3389
3392
  }
3390
3393
  static clone() {
3391
- return new At();
3394
+ return new Ot();
3392
3395
  }
3393
3396
  constructor() {
3394
3397
  super("root"), this.__cachedText = null;
@@ -3398,7 +3401,7 @@ class At extends mn {
3398
3401
  }
3399
3402
  getTextContent() {
3400
3403
  const e = this.__cachedText;
3401
- return !Mt() && R()._dirtyType !== Re || e === null ? super.getTextContent() : e;
3404
+ return !At() && R()._dirtyType !== Je || e === null ? super.getTextContent() : e;
3402
3405
  }
3403
3406
  remove() {
3404
3407
  T(52);
@@ -3427,28 +3430,28 @@ class At extends mn {
3427
3430
  }
3428
3431
  }
3429
3432
  function ne(n) {
3430
- return n instanceof At;
3433
+ return n instanceof Ot;
3431
3434
  }
3432
- function fs(n) {
3433
- return new xn(new Map(n._nodeMap));
3435
+ function hs(n) {
3436
+ return new Cn(new Map(n._nodeMap));
3434
3437
  }
3435
- function xr() {
3436
- return new xn(/* @__PURE__ */ new Map([["root", new At()]]));
3438
+ function Cr() {
3439
+ return new Cn(/* @__PURE__ */ new Map([["root", new Ot()]]));
3437
3440
  }
3438
- function ds(n) {
3441
+ function gs(n) {
3439
3442
  const e = n.exportJSON(), t = n.constructor;
3440
3443
  if (e.type !== t.getType() && T(130, t.name), v(n)) {
3441
3444
  const r = e.children;
3442
3445
  Array.isArray(r) || T(59, t.name);
3443
3446
  const i = n.getChildren();
3444
3447
  for (let s = 0; s < i.length; s++) {
3445
- const o = ds(i[s]);
3448
+ const o = gs(i[s]);
3446
3449
  r.push(o);
3447
3450
  }
3448
3451
  }
3449
3452
  return e;
3450
3453
  }
3451
- class xn {
3454
+ class Cn {
3452
3455
  constructor(e, t) {
3453
3456
  this._nodeMap = e, this._selection = t || null, this._flushSync = !1, this._readOnly = !1;
3454
3457
  }
@@ -3456,18 +3459,18 @@ class xn {
3456
3459
  return this._nodeMap.size === 1 && this._selection === null;
3457
3460
  }
3458
3461
  read(e, t) {
3459
- return ci(t && t.editor || null, this, e);
3462
+ return ui(t && t.editor || null, this, e);
3460
3463
  }
3461
3464
  clone(e) {
3462
- const t = new xn(this._nodeMap, e === void 0 ? this._selection : e);
3465
+ const t = new Cn(this._nodeMap, e === void 0 ? this._selection : e);
3463
3466
  return t._readOnly = !0, t;
3464
3467
  }
3465
3468
  toJSON() {
3466
- return ci(null, this, () => ({ root: ds(re()) }));
3469
+ return ui(null, this, () => ({ root: gs(re()) }));
3467
3470
  }
3468
3471
  }
3469
- const Kl = "historic", zl = "history-push", zn = "history-merge", Bl = "paste", Wo = "collaboration", Jo = "skip-scroll-into-view", Uo = "skip-dom-selection";
3470
- class $o extends mn {
3472
+ const zl = "historic", Bl = "history-push", Bn = "history-merge", Rl = "paste", Jo = "collaboration", Uo = "skip-scroll-into-view", jo = "skip-dom-selection";
3473
+ class $o extends xn {
3471
3474
  static getType() {
3472
3475
  return "artificial";
3473
3476
  }
@@ -3475,22 +3478,22 @@ class $o extends mn {
3475
3478
  return document.createElement("div");
3476
3479
  }
3477
3480
  }
3478
- class Ot extends mn {
3481
+ class Dt extends xn {
3479
3482
  static getType() {
3480
3483
  return "paragraph";
3481
3484
  }
3482
3485
  static clone(e) {
3483
- return new Ot(e.__key);
3486
+ return new Dt(e.__key);
3484
3487
  }
3485
3488
  createDOM(e) {
3486
- const t = document.createElement("p"), r = nt(e.theme, "paragraph");
3489
+ const t = document.createElement("p"), r = rt(e.theme, "paragraph");
3487
3490
  return r !== void 0 && t.classList.add(...r), t;
3488
3491
  }
3489
3492
  updateDOM(e, t, r) {
3490
3493
  return !1;
3491
3494
  }
3492
3495
  static importDOM() {
3493
- return { p: (e) => ({ conversion: jo, priority: 0 }) };
3496
+ return { p: (e) => ({ conversion: Vo, priority: 0 }) };
3494
3497
  }
3495
3498
  exportDOM(e) {
3496
3499
  const { element: t } = super.exportDOM(e);
@@ -3522,25 +3525,25 @@ class Ot extends mn {
3522
3525
  return !1;
3523
3526
  }
3524
3527
  }
3525
- function jo(n) {
3528
+ function Vo(n) {
3526
3529
  const e = Ae();
3527
- return n.style && (e.setFormat(n.style.textAlign), ll(n, e)), { node: e };
3530
+ return n.style && (e.setFormat(n.style.textAlign), al(n, e)), { node: e };
3528
3531
  }
3529
3532
  function Ae() {
3530
- return bn(new Ot());
3533
+ return Nn(new Dt());
3531
3534
  }
3532
- function Rl(n) {
3533
- return n instanceof Ot;
3535
+ function Wl(n) {
3536
+ return n instanceof Dt;
3534
3537
  }
3535
- const Wl = 0, Jl = 1, Ul = 3, $l = 4;
3536
- function hs(n, e, t, r) {
3538
+ const Jl = 0, Ul = 1, jl = 3, $l = 4;
3539
+ function _s(n, e, t, r) {
3537
3540
  const i = n._keyToDOMMap;
3538
- i.clear(), n._editorState = xr(), n._pendingEditorState = r, n._compositionKey = null, n._dirtyType = Re, n._cloneNotNeeded.clear(), n._dirtyLeaves = /* @__PURE__ */ new Set(), n._dirtyElements.clear(), n._normalizedNodes = /* @__PURE__ */ new Set(), n._updateTags = /* @__PURE__ */ new Set(), n._updates = [], n._blockCursorElement = null;
3541
+ i.clear(), n._editorState = Cr(), n._pendingEditorState = r, n._compositionKey = null, n._dirtyType = Je, n._cloneNotNeeded.clear(), n._dirtyLeaves = /* @__PURE__ */ new Set(), n._dirtyElements.clear(), n._normalizedNodes = /* @__PURE__ */ new Set(), n._updateTags = /* @__PURE__ */ new Set(), n._updates = [], n._blockCursorElement = null;
3539
3542
  const s = n._observer;
3540
3543
  s !== null && (s.disconnect(), n._observer = null), e !== null && (e.textContent = ""), t !== null && (t.textContent = "", i.set("root", t));
3541
3544
  }
3542
- function jl(n) {
3543
- const e = n || {}, t = Bo(), r = e.theme || {}, i = n === void 0 ? t : e.parentEditor || null, s = e.disableEvents || !1, o = xr(), l = e.namespace || (i !== null ? i._config.namespace : Ss()), a = e.editorState, c = [At, ct, wt, Et, Ot, $o, ...e.nodes || []], { onError: u, html: h } = e, f = e.editable === void 0 || e.editable;
3545
+ function Vl(n) {
3546
+ const e = n || {}, t = Ro(), r = e.theme || {}, i = n === void 0 ? t : e.parentEditor || null, s = e.disableEvents || !1, o = Cr(), l = e.namespace || (i !== null ? i._config.namespace : ks()), a = e.editorState, c = [Ot, ut, Et, Mt, Dt, $o, ...e.nodes || []], { onError: u, html: h } = e, f = e.editable === void 0 || e.editable;
3544
3547
  let g;
3545
3548
  if (n === void 0 && t !== null) g = t._nodes;
3546
3549
  else {
@@ -3555,7 +3558,7 @@ function jl(n) {
3555
3558
  b !== null && N.add(b), g.set(m, { exportDOM: h && h.export ? h.export.get(p) : void 0, klass: p, replace: x, replaceWithKlass: y, transforms: N });
3556
3559
  }
3557
3560
  }
3558
- const d = new Cn(o, i, g, { disableEvents: s, namespace: l, theme: r }, u || console.error, function(_, p) {
3561
+ const d = new Sn(o, i, g, { disableEvents: s, namespace: l, theme: r }, u || console.error, function(_, p) {
3559
3562
  const x = /* @__PURE__ */ new Map(), y = /* @__PURE__ */ new Set(), m = (b) => {
3560
3563
  Object.keys(b).forEach((N) => {
3561
3564
  let C = x.get(N);
@@ -3570,11 +3573,11 @@ function jl(n) {
3570
3573
  C !== null && m(C);
3571
3574
  }), p && m(p), x;
3572
3575
  }(g, h ? h.import : void 0), f, n);
3573
- return a !== void 0 && (d._pendingEditorState = a, d._dirtyType = it), d;
3576
+ return a !== void 0 && (d._pendingEditorState = a, d._dirtyType = st), d;
3574
3577
  }
3575
- class Cn {
3578
+ class Sn {
3576
3579
  constructor(e, t, r, i, s, o, l, a) {
3577
- this._createEditorArgs = a, this._parentEditor = t, this._rootElement = null, this._editorState = e, this._pendingEditorState = null, this._compositionKey = null, this._deferred = [], this._keyToDOMMap = /* @__PURE__ */ new Map(), this._updates = [], this._updating = !1, this._listeners = { decorator: /* @__PURE__ */ new Set(), editable: /* @__PURE__ */ new Set(), mutation: /* @__PURE__ */ new Map(), root: /* @__PURE__ */ new Set(), textcontent: /* @__PURE__ */ new Set(), update: /* @__PURE__ */ new Set() }, this._commands = /* @__PURE__ */ new Map(), this._config = i, this._nodes = r, this._decorators = {}, this._pendingDecorators = null, this._dirtyType = Re, this._cloneNotNeeded = /* @__PURE__ */ new Set(), this._dirtyLeaves = /* @__PURE__ */ new Set(), this._dirtyElements = /* @__PURE__ */ new Map(), this._normalizedNodes = /* @__PURE__ */ new Set(), this._updateTags = /* @__PURE__ */ new Set(), this._observer = null, this._key = Ss(), this._onError = s, this._htmlConversions = o, this._editable = l, this._headless = t !== null && t._headless, this._window = null, this._blockCursorElement = null;
3580
+ this._createEditorArgs = a, this._parentEditor = t, this._rootElement = null, this._editorState = e, this._pendingEditorState = null, this._compositionKey = null, this._deferred = [], this._keyToDOMMap = /* @__PURE__ */ new Map(), this._updates = [], this._updating = !1, this._listeners = { decorator: /* @__PURE__ */ new Set(), editable: /* @__PURE__ */ new Set(), mutation: /* @__PURE__ */ new Map(), root: /* @__PURE__ */ new Set(), textcontent: /* @__PURE__ */ new Set(), update: /* @__PURE__ */ new Set() }, this._commands = /* @__PURE__ */ new Map(), this._config = i, this._nodes = r, this._decorators = {}, this._pendingDecorators = null, this._dirtyType = Je, this._cloneNotNeeded = /* @__PURE__ */ new Set(), this._dirtyLeaves = /* @__PURE__ */ new Set(), this._dirtyElements = /* @__PURE__ */ new Map(), this._normalizedNodes = /* @__PURE__ */ new Set(), this._updateTags = /* @__PURE__ */ new Set(), this._observer = null, this._key = ks(), this._onError = s, this._htmlConversions = o, this._editable = l, this._headless = t !== null && t._headless, this._window = null, this._blockCursorElement = null;
3578
3581
  }
3579
3582
  isComposing() {
3580
3583
  return this._compositionKey != null;
@@ -3637,7 +3640,7 @@ class Cn {
3637
3640
  return e;
3638
3641
  }
3639
3642
  initializeMutationListener(e, t) {
3640
- const r = this._editorState, i = vi(r).get(t.getType());
3643
+ const r = this._editorState, i = ki(r).get(t.getType());
3641
3644
  if (!i) return;
3642
3645
  const s = /* @__PURE__ */ new Map();
3643
3646
  for (const o of i.keys()) s.set(o, "created");
@@ -3654,17 +3657,17 @@ class Cn {
3654
3657
  i.push(o);
3655
3658
  }
3656
3659
  return function(o, l) {
3657
- const a = vi(o.getEditorState()), c = [];
3660
+ const a = ki(o.getEditorState()), c = [];
3658
3661
  for (const u of l) {
3659
3662
  const h = a.get(u);
3660
3663
  h && c.push(h);
3661
3664
  }
3662
3665
  c.length !== 0 && o.update(() => {
3663
3666
  for (const u of c) for (const h of u.keys()) {
3664
- const f = j(h);
3667
+ const f = $(h);
3665
3668
  f && f.markDirty();
3666
3669
  }
3667
- }, o._pendingEditorState === null ? { tag: zn } : void 0);
3670
+ }, o._pendingEditorState === null ? { tag: Bn } : void 0);
3668
3671
  }(this, i.map((o) => o.klass.getType())), () => {
3669
3672
  i.forEach((o) => o.transforms.delete(t));
3670
3673
  };
@@ -3690,39 +3693,39 @@ class Cn {
3690
3693
  setRootElement(e) {
3691
3694
  const t = this._rootElement;
3692
3695
  if (e !== t) {
3693
- const r = nt(this._config.theme, "root"), i = this._pendingEditorState || this._editorState;
3694
- if (this._rootElement = e, hs(this, t, e, i), t !== null && (this._config.disableEvents || No(t), r != null && t.classList.remove(...r)), e !== null) {
3695
- const s = Nr(e), o = e.style;
3696
- o.userSelect = "text", o.whiteSpace = "pre-wrap", o.wordBreak = "break-word", e.setAttribute("data-lexical-editor", "true"), this._window = s, this._dirtyType = it, Fi(this), this._updateTags.add(zn), ve(this), this._config.disableEvents || function(l, a) {
3697
- const c = l.ownerDocument, u = an.get(c);
3698
- (u === void 0 || u < 1) && c.addEventListener("selectionchange", es), an.set(c, (u || 0) + 1), l.__lexicalEditor = a;
3699
- const h = Zi(l);
3700
- for (let f = 0; f < Zn.length; f++) {
3701
- const [g, d] = Zn[f], _ = typeof d == "function" ? (p) => {
3702
- Vr(p) || (jr(p), (a.isEditable() || g === "click") && d(p, a));
3696
+ const r = rt(this._config.theme, "root"), i = this._pendingEditorState || this._editorState;
3697
+ if (this._rootElement = e, _s(this, t, e, i), t !== null && (this._config.disableEvents || Eo(t), r != null && t.classList.remove(...r)), e !== null) {
3698
+ const s = wr(e), o = e.style;
3699
+ o.userSelect = "text", o.whiteSpace = "pre-wrap", o.wordBreak = "break-word", e.setAttribute("data-lexical-editor", "true"), this._window = s, this._dirtyType = st, Li(this), this._updateTags.add(Bn), ve(this), this._config.disableEvents || function(l, a) {
3700
+ const c = l.ownerDocument, u = cn.get(c);
3701
+ (u === void 0 || u < 1) && c.addEventListener("selectionchange", ts), cn.set(c, (u || 0) + 1), l.__lexicalEditor = a;
3702
+ const h = es(l);
3703
+ for (let f = 0; f < er.length; f++) {
3704
+ const [g, d] = er[f], _ = typeof d == "function" ? (p) => {
3705
+ Yr(p) || (Vr(p), (a.isEditable() || g === "click") && d(p, a));
3703
3706
  } : (p) => {
3704
- if (Vr(p)) return;
3705
- jr(p);
3707
+ if (Yr(p)) return;
3708
+ Vr(p);
3706
3709
  const x = a.isEditable();
3707
3710
  switch (g) {
3708
3711
  case "cut":
3709
- return x && E(a, Vi, p);
3712
+ return x && E(a, Yi, p);
3710
3713
  case "copy":
3711
- return E(a, ji, p);
3714
+ return E(a, Vi, p);
3712
3715
  case "paste":
3713
- return x && E(a, Ji, p);
3716
+ return x && E(a, Ui, p);
3714
3717
  case "dragstart":
3715
- return x && E(a, Co, p);
3718
+ return x && E(a, vo, p);
3716
3719
  case "dragover":
3717
- return x && E(a, So, p);
3720
+ return x && E(a, ko, p);
3718
3721
  case "dragend":
3719
- return x && E(a, vo, p);
3722
+ return x && E(a, To, p);
3720
3723
  case "focus":
3721
- return x && E(a, ko, p);
3724
+ return x && E(a, bo, p);
3722
3725
  case "blur":
3723
- return x && E(a, To, p);
3726
+ return x && E(a, No, p);
3724
3727
  case "drop":
3725
- return x && E(a, xo, p);
3728
+ return x && E(a, So, p);
3726
3729
  }
3727
3730
  };
3728
3731
  l.addEventListener(g, _), h.push(() => {
@@ -3730,8 +3733,8 @@ class Cn {
3730
3733
  });
3731
3734
  }
3732
3735
  }(e, this), r != null && e.classList.add(...r);
3733
- } else this._window = null, this._updateTags.add(zn), ve(this);
3734
- mt("root", this, !1, e, t);
3736
+ } else this._window = null, this._updateTags.add(Bn), ve(this);
3737
+ xt("root", this, !1, e, t);
3735
3738
  }
3736
3739
  }
3737
3740
  getElementByKey(e) {
@@ -3743,21 +3746,21 @@ class Cn {
3743
3746
  setEditorState(e, t) {
3744
3747
  e.isEmpty() && T(38);
3745
3748
  let r = e;
3746
- r._readOnly && (r = fs(e), r._selection = e._selection ? e._selection.clone() : null), Pi(this);
3749
+ r._readOnly && (r = hs(e), r._selection = e._selection ? e._selection.clone() : null), Fi(this);
3747
3750
  const i = this._pendingEditorState, s = this._updateTags, o = t !== void 0 ? t.tag : null;
3748
- i === null || i.isEmpty() || (o != null && s.add(o), ve(this)), this._pendingEditorState = r, this._dirtyType = it, this._dirtyElements.set("root", !1), this._compositionKey = null, o != null && s.add(o), this._updating || ve(this);
3751
+ i === null || i.isEmpty() || (o != null && s.add(o), ve(this)), this._pendingEditorState = r, this._dirtyType = st, this._dirtyElements.set("root", !1), this._compositionKey = null, o != null && s.add(o), this._updating || ve(this);
3749
3752
  }
3750
3753
  parseEditorState(e, t) {
3751
3754
  return function(r, i, s) {
3752
- const o = xr(), l = U, a = Z, c = $, u = i._dirtyElements, h = i._dirtyLeaves, f = i._cloneNotNeeded, g = i._dirtyType;
3753
- i._dirtyElements = /* @__PURE__ */ new Map(), i._dirtyLeaves = /* @__PURE__ */ new Set(), i._cloneNotNeeded = /* @__PURE__ */ new Set(), i._dirtyType = 0, U = o, Z = !1, $ = i;
3755
+ const o = Cr(), l = U, a = Z, c = j, u = i._dirtyElements, h = i._dirtyLeaves, f = i._cloneNotNeeded, g = i._dirtyType;
3756
+ i._dirtyElements = /* @__PURE__ */ new Map(), i._dirtyLeaves = /* @__PURE__ */ new Set(), i._cloneNotNeeded = /* @__PURE__ */ new Set(), i._dirtyType = 0, U = o, Z = !1, j = i;
3754
3757
  try {
3755
3758
  const d = i._nodes;
3756
- yr(r.root, d), s && s(), o._readOnly = !0;
3759
+ mr(r.root, d), s && s(), o._readOnly = !0;
3757
3760
  } catch (d) {
3758
3761
  d instanceof Error && i._onError(d);
3759
3762
  } finally {
3760
- i._dirtyElements = u, i._dirtyLeaves = h, i._cloneNotNeeded = f, i._dirtyType = g, U = l, Z = a, $ = c;
3763
+ i._dirtyElements = u, i._dirtyLeaves = h, i._cloneNotNeeded = f, i._dirtyType = g, U = l, Z = a, j = c;
3761
3764
  }
3762
3765
  return o;
3763
3766
  }(typeof e == "string" ? JSON.parse(e) : e, this, t);
@@ -3767,14 +3770,14 @@ class Cn {
3767
3770
  }
3768
3771
  update(e, t) {
3769
3772
  (function(r, i, s) {
3770
- r._updating ? r._updates.push([i, s]) : mr(r, i, s);
3773
+ r._updating ? r._updates.push([i, s]) : xr(r, i, s);
3771
3774
  })(this, e, t);
3772
3775
  }
3773
3776
  focus(e, t = {}) {
3774
3777
  const r = this._rootElement;
3775
3778
  r !== null && (r.setAttribute("autocapitalize", "off"), te(this, () => {
3776
3779
  const i = L(), s = re();
3777
- i !== null ? i.dirty || ie(i.clone()) : s.getChildrenSize() !== 0 && (t.defaultSelection === "rootStart" ? s.selectStart() : s.selectEnd()), Xo("focus"), Qo(() => {
3780
+ i !== null ? i.dirty || ie(i.clone()) : s.getChildrenSize() !== 0 && (t.defaultSelection === "rootStart" ? s.selectStart() : s.selectEnd()), Qo("focus"), Zo(() => {
3778
3781
  r.removeAttribute("autocapitalize"), e && e();
3779
3782
  });
3780
3783
  }), this._pendingEditorState === null && r.removeAttribute("autocapitalize"));
@@ -3789,59 +3792,62 @@ class Cn {
3789
3792
  return this._editable;
3790
3793
  }
3791
3794
  setEditable(e) {
3792
- this._editable !== e && (this._editable = e, mt("editable", this, !0, e));
3795
+ this._editable !== e && (this._editable = e, xt("editable", this, !0, e));
3793
3796
  }
3794
3797
  toJSON() {
3795
3798
  return { editorState: this._editorState.toJSON() };
3796
3799
  }
3797
3800
  }
3798
- Cn.version = "0.32.0+prod.esm";
3799
- let Vo = 1;
3800
- const Yo = typeof queueMicrotask == "function" ? queueMicrotask : (n) => {
3801
+ Sn.version = "0.32.1+prod.esm";
3802
+ let Yo = 1;
3803
+ const Ho = typeof queueMicrotask == "function" ? queueMicrotask : (n) => {
3801
3804
  Promise.resolve().then(n);
3802
3805
  };
3803
- function hi(n) {
3804
- return z(Sr(n));
3806
+ function gi(n) {
3807
+ return z(vr(n));
3805
3808
  }
3806
- function gs(n) {
3809
+ function ps(n) {
3807
3810
  const e = document.activeElement;
3808
3811
  if (!ee(e)) return !1;
3809
3812
  const t = e.nodeName;
3810
- return z(Sr(n)) && (t === "INPUT" || t === "TEXTAREA" || e.contentEditable === "true" && vn(e) == null);
3813
+ return z(vr(n)) && (t === "INPUT" || t === "TEXTAREA" || e.contentEditable === "true" && kn(e) == null);
3811
3814
  }
3812
- function Sn(n, e, t) {
3815
+ function vn(n, e, t) {
3813
3816
  const r = n.getRootElement();
3814
3817
  try {
3815
- return r !== null && r.contains(e) && r.contains(t) && e !== null && !gs(e) && _s(e) === n;
3818
+ return r !== null && r.contains(e) && r.contains(t) && e !== null && !ps(e) && ys(e) === n;
3816
3819
  } catch {
3817
3820
  return !1;
3818
3821
  }
3819
3822
  }
3820
- function Cr(n) {
3821
- return n instanceof Cn;
3823
+ function Sr(n) {
3824
+ return n instanceof Sn;
3822
3825
  }
3823
- function _s(n) {
3826
+ function ys(n) {
3824
3827
  let e = n;
3825
3828
  for (; e != null; ) {
3826
- const t = vn(e);
3827
- if (Cr(t)) return t;
3828
- e = Dt(e);
3829
+ const t = kn(e);
3830
+ if (Sr(t)) return t;
3831
+ e = Pt(e);
3829
3832
  }
3830
3833
  return null;
3831
3834
  }
3832
- function vn(n) {
3835
+ function kn(n) {
3833
3836
  return n ? n.__lexicalEditor : null;
3834
3837
  }
3835
- function Qe(n) {
3836
- return n.isToken() || n.isSegmented();
3838
+ function Be(n) {
3839
+ return is(n) || n.isToken();
3840
+ }
3841
+ function we(n) {
3842
+ return Be(n) || n.isSegmented();
3837
3843
  }
3838
3844
  function be(n) {
3839
- return Pt(n) && n.nodeType === Ls;
3845
+ return Ft(n) && n.nodeType === Ks;
3840
3846
  }
3841
- function Ho(n) {
3842
- return Pt(n) && n.nodeType === Is;
3847
+ function qo(n) {
3848
+ return Ft(n) && n.nodeType === zs;
3843
3849
  }
3844
- function st(n) {
3850
+ function ot(n) {
3845
3851
  let e = n;
3846
3852
  for (; e != null; ) {
3847
3853
  if (be(e)) return e;
@@ -3849,30 +3855,30 @@ function st(n) {
3849
3855
  }
3850
3856
  return null;
3851
3857
  }
3852
- function fn(n, e, t) {
3853
- const r = We[e];
3858
+ function dn(n, e, t) {
3859
+ const r = Ue[e];
3854
3860
  if (t !== null && (n & r) == (t & r)) return n;
3855
3861
  let i = n ^ r;
3856
3862
  return e === "subscript" ? i &= -65 : e === "superscript" ? i &= -33 : e === "lowercase" ? (i &= -513, i &= -1025) : e === "uppercase" ? (i &= -257, i &= -1025) : e === "capitalize" && (i &= -257, i &= -513), i;
3857
3863
  }
3858
- function Vl(n) {
3859
- return M(n) || tt(n) || z(n);
3864
+ function Yl(n) {
3865
+ return M(n) || nt(n) || z(n);
3860
3866
  }
3861
- function ps(n, e) {
3867
+ function ms(n, e) {
3862
3868
  if (e != null) return void (n.__key = e);
3863
- G(), as();
3864
- const t = R(), r = Fe(), i = "" + Vo++;
3865
- r._nodeMap.set(i, n), v(n) ? t._dirtyElements.set(i, !0) : t._dirtyLeaves.add(i), t._cloneNotNeeded.add(i), t._dirtyType = Ei, n.__key = i;
3869
+ G(), us();
3870
+ const t = R(), r = Fe(), i = "" + Yo++;
3871
+ r._nodeMap.set(i, n), v(n) ? t._dirtyElements.set(i, !0) : t._dirtyLeaves.add(i), t._cloneNotNeeded.add(i), t._dirtyType = Mi, n.__key = i;
3866
3872
  }
3867
- function Be(n) {
3873
+ function Re(n) {
3868
3874
  const e = n.getParent();
3869
3875
  if (e !== null) {
3870
3876
  const t = n.getWritable(), r = e.getWritable(), i = n.getPreviousSibling(), s = n.getNextSibling(), o = s !== null ? s.__key : null, l = i !== null ? i.__key : null, a = i !== null ? i.getWritable() : null, c = s !== null ? s.getWritable() : null;
3871
3877
  i === null && (r.__first = o), s === null && (r.__last = l), a !== null && (a.__next = o), c !== null && (c.__prev = l), t.__prev = null, t.__next = null, t.__parent = null, r.__size--;
3872
3878
  }
3873
3879
  }
3874
- function dn(n) {
3875
- as();
3880
+ function hn(n) {
3881
+ us();
3876
3882
  const e = n.getLatest(), t = e.__parent, r = Fe(), i = R(), s = r._nodeMap, o = i._dirtyElements;
3877
3883
  t !== null && function(a, c, u) {
3878
3884
  let h = a;
@@ -3884,56 +3890,56 @@ function dn(n) {
3884
3890
  }
3885
3891
  }(t, s, o);
3886
3892
  const l = e.__key;
3887
- i._dirtyType = Ei, v(n) ? o.set(l, !0) : i._dirtyLeaves.add(l);
3893
+ i._dirtyType = Mi, v(n) ? o.set(l, !0) : i._dirtyLeaves.add(l);
3888
3894
  }
3889
3895
  function H(n) {
3890
3896
  G();
3891
3897
  const e = R(), t = e._compositionKey;
3892
3898
  if (n !== t) {
3893
3899
  if (e._compositionKey = n, t !== null) {
3894
- const r = j(t);
3900
+ const r = $(t);
3895
3901
  r !== null && r.getWritable();
3896
3902
  }
3897
3903
  if (n !== null) {
3898
- const r = j(n);
3904
+ const r = $(n);
3899
3905
  r !== null && r.getWritable();
3900
3906
  }
3901
3907
  }
3902
3908
  }
3903
- function Ee() {
3904
- return Mt() ? null : R()._compositionKey;
3909
+ function Me() {
3910
+ return At() ? null : R()._compositionKey;
3905
3911
  }
3906
- function j(n, e) {
3912
+ function $(n, e) {
3907
3913
  const t = (e || Fe())._nodeMap.get(n);
3908
3914
  return t === void 0 ? null : t;
3909
3915
  }
3910
- function ys(n, e) {
3911
- const t = kn(n, R());
3912
- return t !== void 0 ? j(t, e) : null;
3916
+ function xs(n, e) {
3917
+ const t = Tn(n, R());
3918
+ return t !== void 0 ? $(t, e) : null;
3913
3919
  }
3914
- function kn(n, e) {
3920
+ function Tn(n, e) {
3915
3921
  return n[`__lexicalKey_${e._key}`];
3916
3922
  }
3917
- function Sr(n, e) {
3923
+ function vr(n, e) {
3918
3924
  let t = n;
3919
3925
  for (; t != null; ) {
3920
- const r = ys(t, e);
3926
+ const r = xs(t, e);
3921
3927
  if (r !== null) return r;
3922
- t = Dt(t);
3928
+ t = Pt(t);
3923
3929
  }
3924
3930
  return null;
3925
3931
  }
3926
- function ms(n) {
3932
+ function Cs(n) {
3927
3933
  const e = n._decorators, t = Object.assign({}, e);
3928
3934
  return n._pendingDecorators = t, t;
3929
3935
  }
3930
- function gi(n) {
3936
+ function _i(n) {
3931
3937
  return n.read(() => re().getTextContent());
3932
3938
  }
3933
3939
  function re() {
3934
- return xs(Fe());
3940
+ return Ss(Fe());
3935
3941
  }
3936
- function xs(n) {
3942
+ function Ss(n) {
3937
3943
  return n._nodeMap.get("root");
3938
3944
  }
3939
3945
  function ie(n) {
@@ -3941,63 +3947,63 @@ function ie(n) {
3941
3947
  const e = Fe();
3942
3948
  n !== null && (n.dirty = !0, n.setCachedNodes(null)), e._selection = n;
3943
3949
  }
3944
- function Ze(n) {
3950
+ function et(n) {
3945
3951
  const e = R(), t = function(r, i) {
3946
3952
  let s = r;
3947
3953
  for (; s != null; ) {
3948
- const o = kn(s, i);
3954
+ const o = Tn(s, i);
3949
3955
  if (o !== void 0) return o;
3950
- s = Dt(s);
3956
+ s = Pt(s);
3951
3957
  }
3952
3958
  return null;
3953
3959
  }(n, e);
3954
- return t === null ? n === e.getRootElement() ? j("root") : null : j(t);
3960
+ return t === null ? n === e.getRootElement() ? $("root") : null : $(t);
3955
3961
  }
3956
- function _i(n, e) {
3962
+ function pi(n, e) {
3957
3963
  return e ? n.getTextContentSize() : 0;
3958
3964
  }
3959
- function Cs(n) {
3965
+ function vs(n) {
3960
3966
  return /[\uD800-\uDBFF][\uDC00-\uDFFF]/g.test(n);
3961
3967
  }
3962
- function vr(n) {
3968
+ function kr(n) {
3963
3969
  const e = [];
3964
3970
  let t = n;
3965
3971
  for (; t !== null; ) e.push(t), t = t._parentEditor;
3966
3972
  return e;
3967
3973
  }
3968
- function Ss() {
3974
+ function ks() {
3969
3975
  return Math.random().toString(36).replace(/[^a-z]+/g, "").substring(0, 5);
3970
3976
  }
3971
- function vs(n) {
3977
+ function Ts(n) {
3972
3978
  return be(n) ? n.nodeValue : null;
3973
3979
  }
3974
- function kr(n, e, t) {
3980
+ function Tr(n, e, t) {
3975
3981
  const r = Te(oe(e));
3976
3982
  if (r === null) return;
3977
3983
  const i = r.anchorNode;
3978
3984
  let { anchorOffset: s, focusOffset: o } = r;
3979
3985
  if (i !== null) {
3980
- let l = vs(i);
3981
- const a = Sr(i);
3986
+ let l = Ts(i);
3987
+ const a = vr(i);
3982
3988
  if (l !== null && M(a)) {
3983
- if (l === hn && t) {
3989
+ if (l === gn && t) {
3984
3990
  const c = t.length;
3985
3991
  l = t, s = c, o = c;
3986
3992
  }
3987
- l !== null && Tr(a, l, s, o, n);
3993
+ l !== null && br(a, l, s, o, n);
3988
3994
  }
3989
3995
  }
3990
3996
  }
3991
- function Tr(n, e, t, r, i) {
3997
+ function br(n, e, t, r, i) {
3992
3998
  let s = n;
3993
3999
  if (s.isAttached() && (i || !s.isDirty())) {
3994
4000
  const o = s.isComposing();
3995
4001
  let l = e;
3996
- (o || i) && e[e.length - 1] === hn && (l = e.slice(0, -1));
4002
+ (o || i) && e[e.length - 1] === gn && (l = e.slice(0, -1));
3997
4003
  const a = s.getTextContent();
3998
4004
  if (i || l !== a) {
3999
4005
  if (l === "") {
4000
- if (H(null), Ct || rt || Xt) s.remove();
4006
+ if (H(null), St || it || Qt) s.remove();
4001
4007
  else {
4002
4008
  const _ = R();
4003
4009
  setTimeout(() => {
@@ -4008,7 +4014,7 @@ function Tr(n, e, t, r, i) {
4008
4014
  }
4009
4015
  return;
4010
4016
  }
4011
- const c = s.getParent(), u = ut(), h = s.getTextContentSize(), f = Ee(), g = s.getKey();
4017
+ const c = s.getParent(), u = ft(), h = s.getTextContentSize(), f = Me(), g = s.getKey();
4012
4018
  if (s.isToken() || f !== null && g === f && !o || O(u) && (c !== null && !c.canInsertTextBefore() && u.anchor.offset === 0 || u.anchor.key === n.__key && u.anchor.offset === 0 && !s.canInsertTextBefore() && !o || u.focus.key === n.__key && u.focus.offset === h && !s.canInsertTextAfter() && !o)) return void s.markDirty();
4013
4019
  const d = L();
4014
4020
  if (!O(d) || t === null || r === null) return void s.setTextContent(l);
@@ -4020,24 +4026,24 @@ function Tr(n, e, t, r, i) {
4020
4026
  }
4021
4027
  }
4022
4028
  }
4023
- function Jt(n, e, t) {
4029
+ function Ut(n, e, t) {
4024
4030
  const r = e[t] || !1;
4025
4031
  return r === "any" || r === n[t];
4026
4032
  }
4027
- function qo(n, e) {
4028
- return Jt(n, e, "altKey") && Jt(n, e, "ctrlKey") && Jt(n, e, "shiftKey") && Jt(n, e, "metaKey");
4033
+ function Go(n, e) {
4034
+ return Ut(n, e, "altKey") && Ut(n, e, "ctrlKey") && Ut(n, e, "shiftKey") && Ut(n, e, "metaKey");
4029
4035
  }
4030
4036
  function I(n, e, t) {
4031
- return qo(n, t) && n.key.toLowerCase() === e.toLowerCase();
4037
+ return Go(n, t) && n.key.toLowerCase() === e.toLowerCase();
4032
4038
  }
4033
- const Ce = { ctrlKey: !fe, metaKey: fe }, pi = { altKey: fe, ctrlKey: !fe };
4034
- function yi(n) {
4039
+ const Ce = { ctrlKey: !fe, metaKey: fe }, yi = { altKey: fe, ctrlKey: !fe };
4040
+ function mi(n) {
4035
4041
  return n.key === "Backspace";
4036
4042
  }
4037
- function mi(n) {
4043
+ function xi(n) {
4038
4044
  return I(n, "a", Ce);
4039
4045
  }
4040
- function Yl(n) {
4046
+ function Hl(n) {
4041
4047
  const e = re();
4042
4048
  if (O(n)) {
4043
4049
  const t = n.anchor, r = n.focus, i = t.getNode().getTopLevelElementOrThrow().getParentOrThrow();
@@ -4048,18 +4054,18 @@ function Yl(n) {
4048
4054
  return ie($n(t)), t;
4049
4055
  }
4050
4056
  }
4051
- function nt(n, e) {
4057
+ function rt(n, e) {
4052
4058
  n.__lexicalClassNameCache === void 0 && (n.__lexicalClassNameCache = {});
4053
4059
  const t = n.__lexicalClassNameCache, r = t[e];
4054
4060
  if (r !== void 0) return r;
4055
4061
  const i = n[e];
4056
4062
  if (typeof i == "string") {
4057
- const s = Qt(i);
4063
+ const s = Zt(i);
4058
4064
  return t[e] = s, s;
4059
4065
  }
4060
4066
  return i;
4061
4067
  }
4062
- function br(n, e, t, r, i) {
4068
+ function Nr(n, e, t, r, i) {
4063
4069
  if (t.size === 0) return;
4064
4070
  const s = r.__type, o = r.__key, l = e.get(s);
4065
4071
  l === void 0 && T(33, s);
@@ -4069,31 +4075,31 @@ function br(n, e, t, r, i) {
4069
4075
  const u = c.get(o), h = u === "destroyed" && i === "created";
4070
4076
  (u === void 0 || h) && c.set(o, h ? "updated" : i);
4071
4077
  }
4072
- function xi(n, e, t) {
4078
+ function Ci(n, e, t) {
4073
4079
  const r = n.getParent();
4074
4080
  let i = t, s = n;
4075
4081
  return r !== null && (e && t === 0 ? (i = s.getIndexWithinParent(), s = r) : e || t !== s.getChildrenSize() || (i = s.getIndexWithinParent() + 1, s = r)), s.getChildAtIndex(e ? i - 1 : i);
4076
4082
  }
4077
- function Go(n, e) {
4083
+ function Xo(n, e) {
4078
4084
  const t = n.offset;
4079
4085
  if (n.type === "element")
4080
- return xi(n.getNode(), e, t);
4086
+ return Ci(n.getNode(), e, t);
4081
4087
  {
4082
4088
  const r = n.getNode();
4083
4089
  if (e && t === 0 || !e && t === r.getTextContentSize()) {
4084
4090
  const i = e ? r.getPreviousSibling() : r.getNextSibling();
4085
- return i === null ? xi(r.getParentOrThrow(), e, r.getIndexWithinParent() + (e ? 0 : 1)) : i;
4091
+ return i === null ? Ci(r.getParentOrThrow(), e, r.getIndexWithinParent() + (e ? 0 : 1)) : i;
4086
4092
  }
4087
4093
  }
4088
4094
  return null;
4089
4095
  }
4090
- function ks(n) {
4096
+ function bs(n) {
4091
4097
  const e = oe(n).event, t = e && e.inputType;
4092
4098
  return t === "insertFromPaste" || t === "insertFromPasteAsQuotation";
4093
4099
  }
4094
4100
  function E(n, e, t) {
4095
4101
  return function(r, i, s) {
4096
- const o = vr(r);
4102
+ const o = kr(r);
4097
4103
  for (let l = 4; l >= 0; l--) for (let a = 0; a < o.length; a++) {
4098
4104
  const c = o[a], u = c._commands.get(i);
4099
4105
  if (u !== void 0) {
@@ -4110,27 +4116,27 @@ function E(n, e, t) {
4110
4116
  return !1;
4111
4117
  }(n, e, t);
4112
4118
  }
4113
- function Tn(n) {
4119
+ function bn(n) {
4114
4120
  return !ne(n) && !n.isLastChild() && !n.isInline();
4115
4121
  }
4116
- function ot(n, e) {
4122
+ function lt(n, e) {
4117
4123
  const t = n._keyToDOMMap.get(e);
4118
4124
  return t === void 0 && T(75, e), t;
4119
4125
  }
4120
- function Dt(n) {
4126
+ function Pt(n) {
4121
4127
  const e = n.assignedSlot || n.parentElement;
4122
- return rl(e) ? e.host : e;
4128
+ return il(e) ? e.host : e;
4123
4129
  }
4124
- function Ts(n) {
4125
- return Ho(n) ? n : ee(n) ? n.ownerDocument : null;
4130
+ function Ns(n) {
4131
+ return qo(n) ? n : ee(n) ? n.ownerDocument : null;
4126
4132
  }
4127
- function Xo(n) {
4133
+ function Qo(n) {
4128
4134
  G(), R()._updateTags.add(n);
4129
4135
  }
4130
- function Qo(n) {
4136
+ function Zo(n) {
4131
4137
  G(), R()._deferred.push(n);
4132
4138
  }
4133
- function rr(n, e) {
4139
+ function ir(n, e) {
4134
4140
  let t = n.getParent();
4135
4141
  for (; t !== null; ) {
4136
4142
  if (t.is(e)) return !0;
@@ -4138,18 +4144,18 @@ function rr(n, e) {
4138
4144
  }
4139
4145
  return !1;
4140
4146
  }
4141
- function Nr(n) {
4142
- const e = Ts(n);
4147
+ function wr(n) {
4148
+ const e = Ns(n);
4143
4149
  return e ? e.defaultView : null;
4144
4150
  }
4145
4151
  function oe(n) {
4146
4152
  const e = n._window;
4147
4153
  return e === null && T(78), e;
4148
4154
  }
4149
- function Hl(n) {
4155
+ function ql(n) {
4150
4156
  return v(n) && n.isInline() || z(n) && n.isInline();
4151
4157
  }
4152
- function Zo(n) {
4158
+ function el(n) {
4153
4159
  let e = n.getParentOrThrow();
4154
4160
  for (; e !== null; ) {
4155
4161
  if (Le(e)) return e;
@@ -4160,11 +4166,11 @@ function Zo(n) {
4160
4166
  function Le(n) {
4161
4167
  return ne(n) || v(n) && n.isShadowRoot();
4162
4168
  }
4163
- function el(n) {
4169
+ function tl(n) {
4164
4170
  const e = n.constructor.clone(n);
4165
- return ps(e, null), e;
4171
+ return ms(e, null), e;
4166
4172
  }
4167
- function bn(n) {
4173
+ function Nn(n) {
4168
4174
  const e = R(), t = n.constructor.getType(), r = e._nodes.get(t);
4169
4175
  r === void 0 && T(200, n.constructor.name, t);
4170
4176
  const { replace: i, replaceWithKlass: s } = r;
@@ -4174,17 +4180,17 @@ function bn(n) {
4174
4180
  }
4175
4181
  return n;
4176
4182
  }
4177
- function Bn(n, e) {
4183
+ function Rn(n, e) {
4178
4184
  !ne(n.getParent()) || v(e) || z(e) || T(99);
4179
4185
  }
4180
- function tl(n) {
4181
- const e = j(n);
4186
+ function nl(n) {
4187
+ const e = $(n);
4182
4188
  return e === null && T(63, n), e;
4183
4189
  }
4184
- function Rn(n) {
4190
+ function Wn(n) {
4185
4191
  return (z(n) || v(n) && !n.canBeEmpty()) && !n.isInline();
4186
4192
  }
4187
- function ir(n, e, t) {
4193
+ function sr(n, e, t) {
4188
4194
  t.style.removeProperty("caret-color"), e._blockCursorElement = null;
4189
4195
  const r = n.parentElement;
4190
4196
  r !== null && r.removeChild(n);
@@ -4192,49 +4198,49 @@ function ir(n, e, t) {
4192
4198
  function Te(n) {
4193
4199
  return ae ? (n || window).getSelection() : null;
4194
4200
  }
4195
- function nl(n) {
4196
- const e = Nr(n);
4201
+ function rl(n) {
4202
+ const e = wr(n);
4197
4203
  return e ? e.getSelection() : null;
4198
4204
  }
4199
- function ql(n) {
4205
+ function Gl(n) {
4200
4206
  return ee(n) && n.tagName === "A";
4201
4207
  }
4202
4208
  function ee(n) {
4203
- return Pt(n) && n.nodeType === Fs;
4209
+ return Ft(n) && n.nodeType === Is;
4204
4210
  }
4205
- function Pt(n) {
4211
+ function Ft(n) {
4206
4212
  return typeof n == "object" && n !== null && "nodeType" in n && typeof n.nodeType == "number";
4207
4213
  }
4208
- function rl(n) {
4209
- return Pt(n) && n.nodeType === Ks;
4210
- }
4211
4214
  function il(n) {
4215
+ return Ft(n) && n.nodeType === Bs;
4216
+ }
4217
+ function sl(n) {
4212
4218
  const e = new RegExp(/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|mark|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var|#text)$/, "i");
4213
4219
  return n.nodeName.match(e) !== null;
4214
4220
  }
4215
- function Ci(n) {
4221
+ function Si(n) {
4216
4222
  const e = new RegExp(/^(address|article|aside|blockquote|canvas|dd|div|dl|dt|fieldset|figcaption|figure|footer|form|h1|h2|h3|h4|h5|h6|header|hr|li|main|nav|noscript|ol|p|pre|section|table|td|tfoot|ul|video)$/, "i");
4217
4223
  return n.nodeName.match(e) !== null;
4218
4224
  }
4219
- function we(n) {
4225
+ function Ee(n) {
4220
4226
  if (z(n) && !n.isInline()) return !0;
4221
4227
  if (!v(n) || Le(n)) return !1;
4222
- const e = n.getFirstChild(), t = e === null || tt(e) || M(e) || e.isInline();
4228
+ const e = n.getFirstChild(), t = e === null || nt(e) || M(e) || e.isInline();
4223
4229
  return !n.isInline() && n.canBeEmpty() !== !1 && t;
4224
4230
  }
4225
- function Wn(n, e) {
4231
+ function Jn(n, e) {
4226
4232
  let t = n;
4227
4233
  for (; t !== null && t.getParent() !== null && !e(t); ) t = t.getParentOrThrow();
4228
4234
  return e(t) ? t : null;
4229
4235
  }
4230
- function Gl() {
4236
+ function Xl() {
4231
4237
  return R();
4232
4238
  }
4233
- const Si = /* @__PURE__ */ new WeakMap(), sl = /* @__PURE__ */ new Map();
4234
- function vi(n) {
4235
- if (!n._readOnly && n.isEmpty()) return sl;
4239
+ const vi = /* @__PURE__ */ new WeakMap(), ol = /* @__PURE__ */ new Map();
4240
+ function ki(n) {
4241
+ if (!n._readOnly && n.isEmpty()) return ol;
4236
4242
  n._readOnly || T(192);
4237
- let e = Si.get(n);
4243
+ let e = vi.get(n);
4238
4244
  return e || (e = function(t) {
4239
4245
  const r = /* @__PURE__ */ new Map();
4240
4246
  for (const [i, s] of t._nodeMap) {
@@ -4243,29 +4249,29 @@ function vi(n) {
4243
4249
  l || (l = /* @__PURE__ */ new Map(), r.set(o, l)), l.set(i, s);
4244
4250
  }
4245
4251
  return r;
4246
- }(n), Si.set(n, e)), e;
4252
+ }(n), vi.set(n, e)), e;
4247
4253
  }
4248
- function ol(n) {
4254
+ function ll(n) {
4249
4255
  const e = n.constructor.clone(n);
4250
4256
  return e.afterCloneFrom(n), e;
4251
4257
  }
4252
- function ll(n, e) {
4258
+ function al(n, e) {
4253
4259
  const t = parseInt(n.style.paddingInlineStart, 10) || 0, r = Math.round(t / 40);
4254
4260
  e.setIndent(r);
4255
4261
  }
4256
- function Xl(n) {
4262
+ function Ql(n) {
4257
4263
  n.__lexicalUnmanaged = !0;
4258
4264
  }
4259
- function al(n) {
4265
+ function cl(n) {
4260
4266
  return n.__lexicalUnmanaged === !0;
4261
4267
  }
4262
- const cl = { next: "previous", previous: "next" };
4263
- class wr {
4268
+ const ul = { next: "previous", previous: "next" };
4269
+ class Er {
4264
4270
  constructor(e) {
4265
4271
  this.origin = e;
4266
4272
  }
4267
4273
  [Symbol.iterator]() {
4268
- return Ns({ hasNext: lt, initial: this.getAdjacentCaret(), map: (e) => e, step: (e) => e.getAdjacentCaret() });
4274
+ return Es({ hasNext: at, initial: this.getAdjacentCaret(), map: (e) => e, step: (e) => e.getAdjacentCaret() });
4269
4275
  }
4270
4276
  getAdjacentCaret() {
4271
4277
  return q(this.getNodeAtCaret(), this.direction);
@@ -4305,7 +4311,7 @@ class wr {
4305
4311
  return this;
4306
4312
  }
4307
4313
  }
4308
- class bt extends wr {
4314
+ class Nt extends Er {
4309
4315
  constructor() {
4310
4316
  super(...arguments);
4311
4317
  se(this, "type", "child");
@@ -4315,10 +4321,10 @@ class bt extends wr {
4315
4321
  return t === this.origin ? this : Pe(t, this.direction);
4316
4322
  }
4317
4323
  getParentCaret(t = "root") {
4318
- return q(Er(this.getParentAtCaret(), t), this.direction);
4324
+ return q(Mr(this.getParentAtCaret(), t), this.direction);
4319
4325
  }
4320
4326
  getFlipped() {
4321
- const t = Ge(this.direction);
4327
+ const t = Qe(this.direction);
4322
4328
  return q(this.getNodeAtCaret(), t) || Pe(this.origin, t);
4323
4329
  }
4324
4330
  getParentAtCaret() {
@@ -4328,20 +4334,20 @@ class bt extends wr {
4328
4334
  return this;
4329
4335
  }
4330
4336
  isSameNodeCaret(t) {
4331
- return t instanceof bt && this.direction === t.direction && this.origin.is(t.origin);
4337
+ return t instanceof Nt && this.direction === t.direction && this.origin.is(t.origin);
4332
4338
  }
4333
4339
  isSamePointCaret(t) {
4334
4340
  return this.isSameNodeCaret(t);
4335
4341
  }
4336
4342
  }
4337
- const ul = { root: ne, shadowRoot: Le };
4338
- function Ge(n) {
4339
- return cl[n];
4343
+ const fl = { root: ne, shadowRoot: Le };
4344
+ function Qe(n) {
4345
+ return ul[n];
4340
4346
  }
4341
- function Er(n, e = "root") {
4342
- return ul[e](n) ? null : n;
4347
+ function Mr(n, e = "root") {
4348
+ return fl[e](n) ? null : n;
4343
4349
  }
4344
- class Ue extends wr {
4350
+ class $e extends Er {
4345
4351
  constructor() {
4346
4352
  super(...arguments);
4347
4353
  se(this, "type", "sibling");
@@ -4360,20 +4366,20 @@ class Ue extends wr {
4360
4366
  return v(this.origin) ? Pe(this.origin, this.direction) : null;
4361
4367
  }
4362
4368
  getParentCaret(t = "root") {
4363
- return q(Er(this.getParentAtCaret(), t), this.direction);
4369
+ return q(Mr(this.getParentAtCaret(), t), this.direction);
4364
4370
  }
4365
4371
  getFlipped() {
4366
- const t = Ge(this.direction);
4372
+ const t = Qe(this.direction);
4367
4373
  return q(this.getNodeAtCaret(), t) || Pe(this.origin.getParentOrThrow(), t);
4368
4374
  }
4369
4375
  isSamePointCaret(t) {
4370
- return t instanceof Ue && this.direction === t.direction && this.origin.is(t.origin);
4376
+ return t instanceof $e && this.direction === t.direction && this.origin.is(t.origin);
4371
4377
  }
4372
4378
  isSameNodeCaret(t) {
4373
- return (t instanceof Ue || t instanceof $e) && this.direction === t.direction && this.origin.is(t.origin);
4379
+ return (t instanceof $e || t instanceof Ve) && this.direction === t.direction && this.origin.is(t.origin);
4374
4380
  }
4375
4381
  }
4376
- class $e extends wr {
4382
+ class Ve extends Er {
4377
4383
  constructor(t, r) {
4378
4384
  super(t);
4379
4385
  se(this, "type", "text");
@@ -4381,7 +4387,7 @@ class $e extends wr {
4381
4387
  }
4382
4388
  getLatest() {
4383
4389
  const t = this.origin.getLatest();
4384
- return t === this.origin ? this : je(t, this.direction, this.offset);
4390
+ return t === this.origin ? this : Ye(t, this.direction, this.offset);
4385
4391
  }
4386
4392
  getParentAtCaret() {
4387
4393
  return this.origin.getParent();
@@ -4390,31 +4396,31 @@ class $e extends wr {
4390
4396
  return null;
4391
4397
  }
4392
4398
  getParentCaret(t = "root") {
4393
- return q(Er(this.getParentAtCaret(), t), this.direction);
4399
+ return q(Mr(this.getParentAtCaret(), t), this.direction);
4394
4400
  }
4395
4401
  getFlipped() {
4396
- return je(this.origin, Ge(this.direction), this.offset);
4402
+ return Ye(this.origin, Qe(this.direction), this.offset);
4397
4403
  }
4398
4404
  isSamePointCaret(t) {
4399
- return t instanceof $e && this.direction === t.direction && this.origin.is(t.origin) && this.offset === t.offset;
4405
+ return t instanceof Ve && this.direction === t.direction && this.origin.is(t.origin) && this.offset === t.offset;
4400
4406
  }
4401
4407
  isSameNodeCaret(t) {
4402
- return (t instanceof Ue || t instanceof $e) && this.direction === t.direction && this.origin.is(t.origin);
4408
+ return (t instanceof $e || t instanceof Ve) && this.direction === t.direction && this.origin.is(t.origin);
4403
4409
  }
4404
4410
  getSiblingCaret() {
4405
4411
  return q(this.origin, this.direction);
4406
4412
  }
4407
4413
  }
4408
4414
  function Oe(n) {
4409
- return n instanceof $e;
4415
+ return n instanceof Ve;
4410
4416
  }
4411
- function lt(n) {
4412
- return n instanceof Ue;
4417
+ function at(n) {
4418
+ return n instanceof $e;
4413
4419
  }
4414
4420
  function he(n) {
4415
- return n instanceof bt;
4421
+ return n instanceof Nt;
4416
4422
  }
4417
- const fl = { next: class extends $e {
4423
+ const dl = { next: class extends Ve {
4418
4424
  constructor() {
4419
4425
  super(...arguments);
4420
4426
  se(this, "direction", "next");
@@ -4425,7 +4431,7 @@ const fl = { next: class extends $e {
4425
4431
  insert(e) {
4426
4432
  return this.origin.insertAfter(e), this;
4427
4433
  }
4428
- }, previous: class extends $e {
4434
+ }, previous: class extends Ve {
4429
4435
  constructor() {
4430
4436
  super(...arguments);
4431
4437
  se(this, "direction", "previous");
@@ -4436,7 +4442,7 @@ const fl = { next: class extends $e {
4436
4442
  insert(e) {
4437
4443
  return this.origin.insertBefore(e), this;
4438
4444
  }
4439
- } }, dl = { next: class extends Ue {
4445
+ } }, hl = { next: class extends $e {
4440
4446
  constructor() {
4441
4447
  super(...arguments);
4442
4448
  se(this, "direction", "next");
@@ -4447,7 +4453,7 @@ const fl = { next: class extends $e {
4447
4453
  insert(e) {
4448
4454
  return this.origin.insertAfter(e), this;
4449
4455
  }
4450
- }, previous: class extends Ue {
4456
+ }, previous: class extends $e {
4451
4457
  constructor() {
4452
4458
  super(...arguments);
4453
4459
  se(this, "direction", "previous");
@@ -4458,7 +4464,7 @@ const fl = { next: class extends $e {
4458
4464
  insert(e) {
4459
4465
  return this.origin.insertBefore(e), this;
4460
4466
  }
4461
- } }, hl = { next: class extends bt {
4467
+ } }, gl = { next: class extends Nt {
4462
4468
  constructor() {
4463
4469
  super(...arguments);
4464
4470
  se(this, "direction", "next");
@@ -4469,7 +4475,7 @@ const fl = { next: class extends $e {
4469
4475
  insert(e) {
4470
4476
  return this.origin.splice(0, 0, [e]), this;
4471
4477
  }
4472
- }, previous: class extends bt {
4478
+ }, previous: class extends Nt {
4473
4479
  constructor() {
4474
4480
  super(...arguments);
4475
4481
  se(this, "direction", "previous");
@@ -4482,12 +4488,12 @@ const fl = { next: class extends $e {
4482
4488
  }
4483
4489
  } };
4484
4490
  function q(n, e) {
4485
- return n ? new dl[e](n) : null;
4491
+ return n ? new hl[e](n) : null;
4486
4492
  }
4487
- function je(n, e, t) {
4488
- return n ? new fl[e](n, at(n, t)) : null;
4493
+ function Ye(n, e, t) {
4494
+ return n ? new dl[e](n, ct(n, t)) : null;
4489
4495
  }
4490
- function at(n, e) {
4496
+ function ct(n, e) {
4491
4497
  const t = n.getTextContentSize();
4492
4498
  let r = e === "next" ? t : e === "previous" ? 0 : e;
4493
4499
  return (r < 0 || r > t) && (function(i, ...s) {
@@ -4497,26 +4503,26 @@ function at(n, e) {
4497
4503
  o.search = l.toString(), console.warn(`Minified Lexical warning #${i}; visit ${o.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`);
4498
4504
  }(284, String(e), String(t), n.getKey()), r = r < 0 ? 0 : t), r;
4499
4505
  }
4500
- function ki(n, e) {
4501
- return new _l(n, e);
4506
+ function Ti(n, e) {
4507
+ return new pl(n, e);
4502
4508
  }
4503
4509
  function Pe(n, e) {
4504
- return v(n) ? new hl[e](n) : null;
4510
+ return v(n) ? new gl[e](n) : null;
4505
4511
  }
4506
- function gl(n) {
4512
+ function _l(n) {
4507
4513
  return n && n.getChildCaret() || n;
4508
4514
  }
4509
- function Mr(n) {
4510
- return n && gl(n.getAdjacentCaret());
4515
+ function Ar(n) {
4516
+ return n && _l(n.getAdjacentCaret());
4511
4517
  }
4512
- class Ar {
4518
+ class Or {
4513
4519
  constructor(e, t, r) {
4514
4520
  se(this, "type", "node-caret-range");
4515
4521
  this.anchor = e, this.focus = t, this.direction = r;
4516
4522
  }
4517
4523
  getLatest() {
4518
4524
  const e = this.anchor.getLatest(), t = this.focus.getLatest();
4519
- return e === this.anchor && t === this.focus ? this : new Ar(e, t, this.direction);
4525
+ return e === this.anchor && t === this.focus ? this : new Or(e, t, this.direction);
4520
4526
  }
4521
4527
  isCollapsed() {
4522
4528
  return this.anchor.isSamePointCaret(this.focus);
@@ -4525,25 +4531,25 @@ class Ar {
4525
4531
  const e = (i) => {
4526
4532
  const s = this[i].getLatest();
4527
4533
  return Oe(s) ? function(o, l) {
4528
- const { direction: a, origin: c } = o, u = at(c, l === "focus" ? Ge(a) : a);
4529
- return ki(o, u - o.offset);
4534
+ const { direction: a, origin: c } = o, u = ct(c, l === "focus" ? Qe(a) : a);
4535
+ return Ti(o, u - o.offset);
4530
4536
  }(s, i) : null;
4531
4537
  }, t = e("anchor"), r = e("focus");
4532
4538
  if (t && r) {
4533
4539
  const { caret: i } = t, { caret: s } = r;
4534
- if (i.isSameNodeCaret(s)) return [ki(i, s.offset - i.offset), null];
4540
+ if (i.isSameNodeCaret(s)) return [Ti(i, s.offset - i.offset), null];
4535
4541
  }
4536
4542
  return [t, r];
4537
4543
  }
4538
4544
  iterNodeCarets(e = "root") {
4539
- const t = Oe(this.anchor) ? this.anchor.getSiblingCaret() : this.anchor.getLatest(), r = this.focus.getLatest(), i = Oe(r), s = (o) => o.isSameNodeCaret(r) ? null : Mr(o) || o.getParentCaret(e);
4540
- return Ns({ hasNext: (o) => o !== null && !(i && r.isSameNodeCaret(o)), initial: t.isSameNodeCaret(r) ? null : s(t), map: (o) => o, step: s });
4545
+ const t = Oe(this.anchor) ? this.anchor.getSiblingCaret() : this.anchor.getLatest(), r = this.focus.getLatest(), i = Oe(r), s = (o) => o.isSameNodeCaret(r) ? null : Ar(o) || o.getParentCaret(e);
4546
+ return Es({ hasNext: (o) => o !== null && !(i && r.isSameNodeCaret(o)), initial: t.isSameNodeCaret(r) ? null : s(t), map: (o) => o, step: s });
4541
4547
  }
4542
4548
  [Symbol.iterator]() {
4543
4549
  return this.iterNodeCarets("root");
4544
4550
  }
4545
4551
  }
4546
- class _l {
4552
+ class pl {
4547
4553
  constructor(e, t) {
4548
4554
  se(this, "type", "slice");
4549
4555
  this.caret = e, this.distance = t;
@@ -4561,19 +4567,19 @@ class _l {
4561
4567
  }
4562
4568
  removeTextSlice() {
4563
4569
  const { caret: { origin: e, direction: t } } = this, [r, i] = this.getSliceIndices(), s = e.getTextContent();
4564
- return je(e.setTextContent(s.slice(0, r) + s.slice(i)), t, r);
4570
+ return Ye(e.setTextContent(s.slice(0, r) + s.slice(i)), t, r);
4565
4571
  }
4566
4572
  }
4567
- function bs(n) {
4568
- return Ve(n, q(re(), n.direction));
4573
+ function ws(n) {
4574
+ return He(n, q(re(), n.direction));
4569
4575
  }
4570
- function pl(n) {
4571
- return Ve(n, n);
4576
+ function yl(n) {
4577
+ return He(n, n);
4572
4578
  }
4573
- function Ve(n, e) {
4574
- return n.direction !== e.direction && T(265), new Ar(n, e, n.direction);
4579
+ function He(n, e) {
4580
+ return n.direction !== e.direction && T(265), new Or(n, e, n.direction);
4575
4581
  }
4576
- function Ns(n) {
4582
+ function Es(n) {
4577
4583
  const { initial: e, hasNext: t, step: r, map: i } = n;
4578
4584
  let s = e;
4579
4585
  return { [Symbol.iterator]() {
@@ -4584,8 +4590,8 @@ function Ns(n) {
4584
4590
  return s = r(s), o;
4585
4591
  } };
4586
4592
  }
4587
- function ws(n, e) {
4588
- const t = Ht(n.origin, e.origin);
4593
+ function Ms(n, e) {
4594
+ const t = qt(n.origin, e.origin);
4589
4595
  switch (t === null && T(275, n.origin.getKey(), e.origin.getKey()), t.type) {
4590
4596
  case "same": {
4591
4597
  const r = n.type === "text", i = e.type === "text";
@@ -4598,10 +4604,10 @@ function ws(n, e) {
4598
4604
  case "descendant":
4599
4605
  return e.type === "child" ? 1 : -1;
4600
4606
  case "branch":
4601
- return Es(t);
4607
+ return As(t);
4602
4608
  }
4603
4609
  }
4604
- function Es(n) {
4610
+ function As(n) {
4605
4611
  const { a: e, b: t } = n, r = e.__key, i = t.__key;
4606
4612
  let s = e, o = t;
4607
4613
  for (; s && o; s = s.getNextSibling(), o = o.getNextSibling()) {
@@ -4610,67 +4616,67 @@ function Es(n) {
4610
4616
  }
4611
4617
  return s === null ? 1 : -1;
4612
4618
  }
4613
- function Ut(n, e) {
4619
+ function jt(n, e) {
4614
4620
  return e.is(n);
4615
4621
  }
4616
- function Ti(n) {
4622
+ function bi(n) {
4617
4623
  return v(n) ? [n.getLatest(), null] : [n.getParent(), n.getLatest()];
4618
4624
  }
4619
- function Ht(n, e) {
4625
+ function qt(n, e) {
4620
4626
  if (n.is(e)) return { commonAncestor: n, type: "same" };
4621
4627
  const t = /* @__PURE__ */ new Map();
4622
- for (let [r, i] = Ti(n); r; i = r, r = r.getParent()) t.set(r, i);
4623
- for (let [r, i] = Ti(e); r; i = r, r = r.getParent()) {
4628
+ for (let [r, i] = bi(n); r; i = r, r = r.getParent()) t.set(r, i);
4629
+ for (let [r, i] = bi(e); r; i = r, r = r.getParent()) {
4624
4630
  const s = t.get(r);
4625
- if (s !== void 0) return s === null ? (Ut(n, r) || T(276), { commonAncestor: r, type: "ancestor" }) : i === null ? (Ut(e, r) || T(277), { commonAncestor: r, type: "descendant" }) : ((v(s) || Ut(n, s)) && (v(i) || Ut(e, i)) && r.is(s.getParent()) && r.is(i.getParent()) || T(278), { a: s, b: i, commonAncestor: r, type: "branch" });
4631
+ if (s !== void 0) return s === null ? (jt(n, r) || T(276), { commonAncestor: r, type: "ancestor" }) : i === null ? (jt(e, r) || T(277), { commonAncestor: r, type: "descendant" }) : ((v(s) || jt(n, s)) && (v(i) || jt(e, i)) && r.is(s.getParent()) && r.is(i.getParent()) || T(278), { a: s, b: i, commonAncestor: r, type: "branch" });
4626
4632
  }
4627
4633
  return null;
4628
4634
  }
4629
- function Ye(n, e) {
4630
- const { type: t, key: r, offset: i } = n, s = tl(n.key);
4631
- return t === "text" ? (M(s) || T(266, s.getType(), r), je(s, e, i)) : (v(s) || T(267, s.getType(), r), Cl(s, n.offset, e));
4635
+ function qe(n, e) {
4636
+ const { type: t, key: r, offset: i } = n, s = nl(n.key);
4637
+ return t === "text" ? (M(s) || T(266, s.getType(), r), Ye(s, e, i)) : (v(s) || T(267, s.getType(), r), Sl(s, n.offset, e));
4632
4638
  }
4633
- function Nt(n, e) {
4639
+ function wt(n, e) {
4634
4640
  const { origin: t, direction: r } = e, i = r === "next";
4635
- Oe(e) ? n.set(t.getKey(), e.offset, "text") : lt(e) ? M(t) ? n.set(t.getKey(), at(t, r), "text") : n.set(t.getParentOrThrow().getKey(), t.getIndexWithinParent() + (i ? 1 : 0), "element") : (he(e) && v(t) || T(268), n.set(t.getKey(), i ? 0 : t.getChildrenSize(), "element"));
4641
+ Oe(e) ? n.set(t.getKey(), e.offset, "text") : at(e) ? M(t) ? n.set(t.getKey(), ct(t, r), "text") : n.set(t.getParentOrThrow().getKey(), t.getIndexWithinParent() + (i ? 1 : 0), "element") : (he(e) && v(t) || T(268), n.set(t.getKey(), i ? 0 : t.getChildrenSize(), "element"));
4636
4642
  }
4637
- function yl(n) {
4638
- const e = L(), t = O(e) ? e : Io();
4639
- return qt(t, n), ie(t), t;
4643
+ function ml(n) {
4644
+ const e = L(), t = O(e) ? e : Ko();
4645
+ return Gt(t, n), ie(t), t;
4640
4646
  }
4641
- function qt(n, e) {
4642
- Nt(n.anchor, e.anchor), Nt(n.focus, e.focus);
4647
+ function Gt(n, e) {
4648
+ wt(n.anchor, e.anchor), wt(n.focus, e.focus);
4643
4649
  }
4644
- function bi(n) {
4645
- const { anchor: e, focus: t } = n, r = Ye(e, "next"), i = Ye(t, "next"), s = ws(r, i) <= 0 ? "next" : "previous";
4646
- return Ve(He(r, s), He(i, s));
4650
+ function Ni(n) {
4651
+ const { anchor: e, focus: t } = n, r = qe(e, "next"), i = qe(t, "next"), s = Ms(r, i) <= 0 ? "next" : "previous";
4652
+ return He(Ge(r, s), Ge(i, s));
4647
4653
  }
4648
- function Ft(n) {
4649
- const { direction: e, origin: t } = n, r = q(t, Ge(e)).getNodeAtCaret();
4654
+ function Lt(n) {
4655
+ const { direction: e, origin: t } = n, r = q(t, Qe(e)).getNodeAtCaret();
4650
4656
  return r ? q(r, e) : Pe(t.getParentOrThrow(), e);
4651
4657
  }
4652
- function Ni(n, e = "root") {
4658
+ function wi(n, e = "root") {
4653
4659
  const t = [n];
4654
- for (let r = he(n) ? n.getParentCaret(e) : n.getSiblingCaret(); r !== null; r = r.getParentCaret(e)) t.push(Ft(r));
4660
+ for (let r = he(n) ? n.getParentCaret(e) : n.getSiblingCaret(); r !== null; r = r.getParentCaret(e)) t.push(Lt(r));
4655
4661
  return t;
4656
4662
  }
4657
- function Jn(n) {
4663
+ function Un(n) {
4658
4664
  return !!n && n.origin.isAttached();
4659
4665
  }
4660
- function ml(n, e = "removeEmptySlices") {
4666
+ function xl(n, e = "removeEmptySlices") {
4661
4667
  if (n.isCollapsed()) return n;
4662
4668
  const t = "root", r = "next";
4663
4669
  let i = e;
4664
- const s = Ms(n, r), o = Ni(s.anchor, t), l = Ni(s.focus.getFlipped(), t), a = /* @__PURE__ */ new Set(), c = [];
4670
+ const s = Os(n, r), o = wi(s.anchor, t), l = wi(s.focus.getFlipped(), t), a = /* @__PURE__ */ new Set(), c = [];
4665
4671
  for (const d of s.iterNodeCarets(t)) if (he(d)) a.add(d.origin.getKey());
4666
- else if (lt(d)) {
4672
+ else if (at(d)) {
4667
4673
  const { origin: _ } = d;
4668
4674
  v(_) && !a.has(_.getKey()) || c.push(_);
4669
4675
  }
4670
4676
  for (const d of c) d.remove();
4671
4677
  for (const d of s.getTextSlices()) {
4672
4678
  if (!d) continue;
4673
- const { origin: _ } = d.caret, p = _.getTextContentSize(), x = Ft(q(_, r)), y = _.getMode();
4679
+ const { origin: _ } = d.caret, p = _.getTextContentSize(), x = Lt(q(_, r)), y = _.getMode();
4674
4680
  if (Math.abs(d.distance) === p && i === "removeEmptySlices" || y === "token" && d.distance !== 0) x.remove();
4675
4681
  else if (d.distance !== 0) {
4676
4682
  i = "removeEmptySlices";
@@ -4678,17 +4684,17 @@ function ml(n, e = "removeEmptySlices") {
4678
4684
  const b = d.caret.origin;
4679
4685
  if (y === "segmented") {
4680
4686
  const N = m.origin, C = Y(N.getTextContent()).setStyle(N.getStyle()).setFormat(N.getFormat());
4681
- x.replaceOrInsert(C), m = je(C, r, m.offset);
4687
+ x.replaceOrInsert(C), m = Ye(C, r, m.offset);
4682
4688
  }
4683
4689
  b.is(o[0].origin) && (o[0] = m), b.is(l[0].origin) && (l[0] = m.getFlipped());
4684
4690
  }
4685
4691
  }
4686
4692
  let u, h;
4687
- for (const d of o) if (Jn(d)) {
4693
+ for (const d of o) if (Un(d)) {
4688
4694
  u = de(d);
4689
4695
  break;
4690
4696
  }
4691
- for (const d of l) if (Jn(d)) {
4697
+ for (const d of l) if (Un(d)) {
4692
4698
  h = de(d);
4693
4699
  break;
4694
4700
  }
@@ -4711,66 +4717,66 @@ function ml(n, e = "removeEmptySlices") {
4711
4717
  !W && F(P) && (W = P);
4712
4718
  }
4713
4719
  return W;
4714
- }, k = w(m, we), S = k && w(b, (A) => p.has(A.getKey()) && we(A));
4720
+ }, k = w(m, Ee), S = k && w(b, (A) => p.has(A.getKey()) && Ee(A));
4715
4721
  return k && S ? [k, S] : null;
4716
4722
  }(u, h, a);
4717
4723
  if (f) {
4718
4724
  const [d, _] = f;
4719
4725
  Pe(d, "previous").splice(0, _.getChildren()), _.remove();
4720
4726
  }
4721
- const g = [u, h, ...o, ...l].find(Jn);
4727
+ const g = [u, h, ...o, ...l].find(Un);
4722
4728
  if (g)
4723
- return pl(He(de(g), n.direction));
4729
+ return yl(Ge(de(g), n.direction));
4724
4730
  T(269, JSON.stringify(o.map((d) => d.origin.__key)));
4725
4731
  }
4726
4732
  function de(n) {
4727
4733
  const e = function(i) {
4728
4734
  let s = i;
4729
4735
  for (; he(s); ) {
4730
- const o = Mr(s);
4736
+ const o = Ar(s);
4731
4737
  if (!he(o)) break;
4732
4738
  s = o;
4733
4739
  }
4734
4740
  return s;
4735
4741
  }(n.getLatest()), { direction: t } = e;
4736
- if (M(e.origin)) return Oe(e) ? e : je(e.origin, t, t);
4742
+ if (M(e.origin)) return Oe(e) ? e : Ye(e.origin, t, t);
4737
4743
  const r = e.getAdjacentCaret();
4738
- return lt(r) && M(r.origin) ? je(r.origin, t, Ge(t)) : e;
4744
+ return at(r) && M(r.origin) ? Ye(r.origin, t, Qe(t)) : e;
4739
4745
  }
4740
- function xl(n) {
4741
- return Oe(n) && n.offset !== at(n.origin, n.direction);
4746
+ function Cl(n) {
4747
+ return Oe(n) && n.offset !== ct(n.origin, n.direction);
4742
4748
  }
4743
- function He(n, e) {
4749
+ function Ge(n, e) {
4744
4750
  return n.direction === e ? n : n.getFlipped();
4745
4751
  }
4746
- function Ms(n, e) {
4747
- return n.direction === e ? n : Ve(He(n.focus, e), He(n.anchor, e));
4752
+ function Os(n, e) {
4753
+ return n.direction === e ? n : He(Ge(n.focus, e), Ge(n.anchor, e));
4748
4754
  }
4749
- function Cl(n, e, t) {
4755
+ function Sl(n, e, t) {
4750
4756
  let r = Pe(n, "next");
4751
4757
  for (let i = 0; i < e; i++) {
4752
4758
  const s = r.getAdjacentCaret();
4753
4759
  if (s === null) break;
4754
4760
  r = s;
4755
4761
  }
4756
- return He(r, t);
4762
+ return Ge(r, t);
4757
4763
  }
4758
- function Sl(n) {
4764
+ function vl(n) {
4759
4765
  const { origin: e, offset: t, direction: r } = n;
4760
- if (t === at(e, r)) return n.getSiblingCaret();
4761
- if (t === at(e, Ge(r))) return Ft(n.getSiblingCaret());
4766
+ if (t === ct(e, r)) return n.getSiblingCaret();
4767
+ if (t === ct(e, Qe(r))) return Lt(n.getSiblingCaret());
4762
4768
  const [i] = e.splitText(t);
4763
- return M(i) || T(281), He(q(i, "next"), r);
4769
+ return M(i) || T(281), Ge(q(i, "next"), r);
4764
4770
  }
4765
- function vl(n, e) {
4771
+ function kl(n, e) {
4766
4772
  return !0;
4767
4773
  }
4768
- function Ql(n, { $copyElementNode: e = el, $splitTextPointCaretNext: t = Sl, rootMode: r = "shadowRoot", $shouldSplit: i = vl } = {}) {
4774
+ function Zl(n, { $copyElementNode: e = tl, $splitTextPointCaretNext: t = vl, rootMode: r = "shadowRoot", $shouldSplit: i = kl } = {}) {
4769
4775
  if (Oe(n)) return t(n);
4770
4776
  const s = n.getParentCaret(r);
4771
4777
  if (s) {
4772
4778
  const { origin: o } = s;
4773
- if (he(n) && (!o.canBeEmpty() || !i(o, "first"))) return Ft(s);
4779
+ if (he(n) && (!o.canBeEmpty() || !i(o, "first"))) return Lt(s);
4774
4780
  const l = function(a) {
4775
4781
  const c = [];
4776
4782
  for (let u = a.getAdjacentCaret(); u; u = u.getAdjacentCaret()) c.push(u.origin);
@@ -4782,122 +4788,123 @@ function Ql(n, { $copyElementNode: e = el, $splitTextPointCaretNext: t = Sl, roo
4782
4788
  }
4783
4789
  export {
4784
4790
  Te as $,
4785
- lo as A,
4786
- on as B,
4791
+ go as A,
4792
+ co as B,
4787
4793
  ln as C,
4788
- sn as D,
4789
- $l as E,
4790
- Rl as F,
4791
- _o as G,
4794
+ an as D,
4795
+ on as E,
4796
+ Wl as F,
4797
+ $l as G,
4792
4798
  yo as H,
4793
- Jl as I,
4794
- ct as J,
4795
- Ul as K,
4796
- Wl as L,
4797
- ze as M,
4799
+ Ul as I,
4800
+ ut as J,
4801
+ jl as K,
4802
+ Jl as L,
4803
+ xo as M,
4798
4804
  L as N,
4799
- po as O,
4805
+ mo as O,
4800
4806
  Ae as P,
4801
4807
  M as Q,
4802
- El as R,
4803
- _t as S,
4804
- Xl as T,
4805
- Vi as U,
4806
- mo as V,
4807
- ko as W,
4808
+ ze as R,
4809
+ Ml as S,
4810
+ fo as T,
4811
+ Yi as U,
4812
+ Pe as V,
4813
+ pt as W,
4808
4814
  Y as X,
4809
- Wi as Y,
4810
- Le as Z,
4811
- de as _,
4812
- Rr as a,
4815
+ Co as Y,
4816
+ bo as Z,
4817
+ Ji as _,
4818
+ ee as a,
4813
4819
  zl as a$,
4814
- Fl as a0,
4815
- Io as a1,
4820
+ Ll as a0,
4821
+ Ko as a1,
4816
4822
  ne as a2,
4817
4823
  ge as a3,
4818
- Ye as a4,
4819
- xl as a5,
4820
- bs as a6,
4821
- lt as a7,
4824
+ qe as a4,
4825
+ Cl as a5,
4826
+ ws as a6,
4827
+ at as a7,
4822
4828
  he as a8,
4823
4829
  q as a9,
4824
- rl as aA,
4825
- _r as aB,
4826
- ji as aC,
4827
- Il as aD,
4828
- Sn as aE,
4829
- jl as aF,
4830
- zn as aG,
4831
- go as aH,
4832
- gs as aI,
4833
- Bl as aJ,
4834
- Jr as aK,
4835
- Yl as aL,
4836
- So as aM,
4837
- Co as aN,
4838
- xo as aO,
4839
- Xn as aP,
4840
- jt as aQ,
4841
- wl as aR,
4842
- Go as aS,
4843
- Nl as aT,
4844
- bl as aU,
4845
- Ll as aV,
4846
- Wr as aW,
4847
- _s as aX,
4848
- Al as aY,
4849
- Ml as aZ,
4850
- Kl as a_,
4851
- Mr as aa,
4852
- Mt as ab,
4853
- We as ac,
4854
- Ot as ad,
4855
- Ji as ae,
4830
+ ll as aA,
4831
+ il as aB,
4832
+ pr as aC,
4833
+ Vi as aD,
4834
+ Kl as aE,
4835
+ vn as aF,
4836
+ Vl as aG,
4837
+ Bn as aH,
4838
+ po as aI,
4839
+ ps as aJ,
4840
+ Rl as aK,
4841
+ Ur as aL,
4842
+ Hl as aM,
4843
+ ko as aN,
4844
+ vo as aO,
4845
+ So as aP,
4846
+ Qn as aQ,
4847
+ Vt as aR,
4848
+ El as aS,
4849
+ Xo as aT,
4850
+ wl as aU,
4851
+ Nl as aV,
4852
+ Il as aW,
4853
+ Jr as aX,
4854
+ ys as aY,
4855
+ Ol as aZ,
4856
+ Al as a_,
4857
+ Ar as aa,
4858
+ At as ab,
4859
+ Ue as ac,
4860
+ Dt as ad,
4861
+ Ui as ae,
4856
4862
  re as af,
4857
- Ns as ag,
4858
- yl as ah,
4859
- pl as ai,
4860
- He as aj,
4861
- Ql as ak,
4863
+ Es as ag,
4864
+ ml as ah,
4865
+ yl as ai,
4866
+ Ge as aj,
4867
+ Zl as ak,
4862
4868
  Oe as al,
4863
4869
  z as am,
4864
- Qr as an,
4865
- we as ao,
4866
- oo as ap,
4867
- Dl as aq,
4868
- Ol as ar,
4869
- Ui as as,
4870
- $i as at,
4871
- $o as au,
4872
- Tt as av,
4873
- Pl as aw,
4874
- Ci as ax,
4875
- il as ay,
4876
- ol as az,
4877
- ql as b,
4870
+ we as an,
4871
+ Zr as ao,
4872
+ Ee as ap,
4873
+ ao as aq,
4874
+ Pl as ar,
4875
+ Dl as as,
4876
+ ji as at,
4877
+ $i as au,
4878
+ $o as av,
4879
+ bt as aw,
4880
+ Fl as ax,
4881
+ Si as ay,
4882
+ sl as az,
4883
+ Wr as b,
4884
+ Bl as b0,
4878
4885
  O as c,
4879
4886
  v as d,
4880
- bn as e,
4881
- mn as f,
4882
- pr as g,
4883
- Hl as h,
4884
- tt as i,
4885
- Pe as j,
4886
- Sr as k,
4887
- Nt as l,
4888
- Gl as m,
4889
- so as n,
4887
+ wt as e,
4888
+ xn as f,
4889
+ yr as g,
4890
+ ql as h,
4891
+ Yl as i,
4892
+ nt as j,
4893
+ Ql as k,
4894
+ vr as l,
4895
+ ie as m,
4896
+ Nn as n,
4890
4897
  D as o,
4891
- Tl as p,
4892
- Pt as q,
4893
- Vl as r,
4894
- j as s,
4895
- ho as t,
4896
- ee as u,
4898
+ de as p,
4899
+ lo as q,
4900
+ bl as r,
4901
+ Ft as s,
4902
+ Le as t,
4903
+ Gl as u,
4897
4904
  $n as v,
4898
- ut as w,
4899
- fo as x,
4900
- ie as y,
4901
- co as z
4905
+ ft as w,
4906
+ Xl as x,
4907
+ $ as y,
4908
+ _o as z
4902
4909
  };
4903
- //# sourceMappingURL=Lexical.prod-m3GJsAAT.js.map
4910
+ //# sourceMappingURL=Lexical.prod-UwAbgYpF.js.map