@uva-glass/component-library 1.62.9 → 1.62.11

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 (96) hide show
  1. package/dist/{Lexical.prod-B6kL_nwF.js → Lexical.prod-DOTdxgeo.js} +436 -435
  2. package/dist/Lexical.prod-DOTdxgeo.js.map +1 -0
  3. package/dist/LexicalLink.prod-Cqa5Im8X.js +208 -0
  4. package/dist/LexicalLink.prod-Cqa5Im8X.js.map +1 -0
  5. package/dist/LexicalList.prod-DlqzsJTH.js +564 -0
  6. package/dist/LexicalList.prod-DlqzsJTH.js.map +1 -0
  7. package/dist/LexicalTable.prod-BKz2StgB.js +1525 -0
  8. package/dist/LexicalTable.prod-BKz2StgB.js.map +1 -0
  9. package/dist/{LexicalUtils.prod-BBoyOK4A.js → LexicalUtils.prod-DlLRWqta.js} +2 -2
  10. package/dist/{LexicalUtils.prod-BBoyOK4A.js.map → LexicalUtils.prod-DlLRWqta.js.map} +1 -1
  11. package/dist/RteEditor.module-DcvGRx3a.js +21 -0
  12. package/dist/RteEditor.module-DcvGRx3a.js.map +1 -0
  13. package/dist/TablePlugin-B3ZkyOU_.js +304 -0
  14. package/dist/TablePlugin-B3ZkyOU_.js.map +1 -0
  15. package/dist/assets/Flyout.css +1 -1
  16. package/dist/assets/LinkContextMenu.css +1 -0
  17. package/dist/assets/RteEditor.css +1 -1
  18. package/dist/components/CheckboxTree/CheckboxTree.js +4 -3
  19. package/dist/components/CheckboxTree/CheckboxTree.js.map +1 -1
  20. package/dist/components/FormInput/FormInput.js +8 -7
  21. package/dist/components/FormInput/FormInput.js.map +1 -1
  22. package/dist/components/Icon/icons/index.d.ts +6 -0
  23. package/dist/components/Icon/icons/index.js +46 -41
  24. package/dist/components/Icon/icons/index.js.map +1 -1
  25. package/dist/components/InputField/InputField.stories.js +4 -3
  26. package/dist/components/InputField/InputField.stories.js.map +1 -1
  27. package/dist/components/MultiSelect/MultiSelect.js +1 -1
  28. package/dist/components/MultiSelect/MultiSelect.stories.js +1 -1
  29. package/dist/components/MultiSelect/components/MultiSelectHeader.js +3 -2
  30. package/dist/components/MultiSelect/components/MultiSelectHeader.js.map +1 -1
  31. package/dist/components/MultiSelect/index.js +1 -1
  32. package/dist/components/PeriodSelector/PeriodSelector.js +4 -3
  33. package/dist/components/PeriodSelector/PeriodSelector.js.map +1 -1
  34. package/dist/components/ProgrammeCard/ProgrammeCard.stories.js +4 -3
  35. package/dist/components/ProgrammeCard/ProgrammeCard.stories.js.map +1 -1
  36. package/dist/components/RteEditor/EditorHeader/EditorHeader.js +8 -7
  37. package/dist/components/RteEditor/EditorHeader/EditorHeader.js.map +1 -1
  38. package/dist/components/RteEditor/Plugins/BlockFormatPlugin/BlockFormatPlugin.js +2 -2
  39. package/dist/components/RteEditor/Plugins/HistoryPlugin/HistoryPlugin.js +9 -8
  40. package/dist/components/RteEditor/Plugins/HistoryPlugin/HistoryPlugin.js.map +1 -1
  41. package/dist/components/RteEditor/Plugins/LinkPlugin/{AddLinkFrom.d.ts → AddLinkForm/AddLinkFrom.d.ts} +0 -1
  42. package/dist/components/RteEditor/Plugins/LinkPlugin/AddLinkForm/AddLinkFrom.js +32 -0
  43. package/dist/components/RteEditor/Plugins/LinkPlugin/{AddLinkFrom.js.map → AddLinkForm/AddLinkFrom.js.map} +1 -1
  44. package/dist/components/RteEditor/Plugins/LinkPlugin/LinkContextMenu/LinkContextMenu.d.ts +11 -0
  45. package/dist/components/RteEditor/Plugins/LinkPlugin/LinkContextMenu/LinkContextMenu.js +55 -0
  46. package/dist/components/RteEditor/Plugins/LinkPlugin/LinkContextMenu/LinkContextMenu.js.map +1 -0
  47. package/dist/components/RteEditor/Plugins/LinkPlugin/LinkPlugin.d.ts +5 -1
  48. package/dist/components/RteEditor/Plugins/LinkPlugin/LinkPlugin.js +157 -129
  49. package/dist/components/RteEditor/Plugins/LinkPlugin/LinkPlugin.js.map +1 -1
  50. package/dist/components/RteEditor/Plugins/LinkPlugin/helpers.js +1 -1
  51. package/dist/components/RteEditor/Plugins/ListPlugin/ListPlugin.js +69 -10
  52. package/dist/components/RteEditor/Plugins/ListPlugin/ListPlugin.js.map +1 -1
  53. package/dist/components/RteEditor/Plugins/ListPlugin/index.js +1 -1
  54. package/dist/components/RteEditor/Plugins/TablePlugin/AddTableFrom.js +4 -2
  55. package/dist/components/RteEditor/Plugins/TablePlugin/AddTableFrom.js.map +1 -1
  56. package/dist/components/RteEditor/Plugins/TablePlugin/TableCellContextMenu/TableCellContextMenu.js.map +1 -1
  57. package/dist/components/RteEditor/Plugins/TablePlugin/TablePlugin.js +7 -5
  58. package/dist/components/RteEditor/Plugins/TablePlugin/TablePlugin.js.map +1 -1
  59. package/dist/components/RteEditor/Plugins/TablePlugin/helpers.js +63 -8
  60. package/dist/components/RteEditor/Plugins/TablePlugin/helpers.js.map +1 -1
  61. package/dist/components/RteEditor/Plugins/TablePlugin/index.js +1 -1
  62. package/dist/components/RteEditor/Plugins/ToolbarPlugin/ToolbarPlugin.js +52 -47
  63. package/dist/components/RteEditor/Plugins/ToolbarPlugin/ToolbarPlugin.js.map +1 -1
  64. package/dist/components/RteEditor/Plugins/index.js +5 -5
  65. package/dist/components/RteEditor/RteEditor.d.ts +2 -2
  66. package/dist/components/RteEditor/RteEditor.js +449 -442
  67. package/dist/components/RteEditor/RteEditor.js.map +1 -1
  68. package/dist/components/RteEditor/UvaTheme/UvaTheme.d.ts +3 -0
  69. package/dist/components/RteEditor/UvaTheme/UvaTheme.js +12 -10
  70. package/dist/components/RteEditor/UvaTheme/UvaTheme.js.map +1 -1
  71. package/dist/components/RteEditor/helpers.d.ts +7 -0
  72. package/dist/components/RteEditor/helpers.js +40 -0
  73. package/dist/components/RteEditor/helpers.js.map +1 -0
  74. package/dist/components/RteEditor/hooks/components/Flyout.d.ts +4 -0
  75. package/dist/components/RteEditor/hooks/components/Flyout.js +18 -10
  76. package/dist/components/RteEditor/hooks/components/Flyout.js.map +1 -1
  77. package/dist/components/RteEditor/hooks/useFlyout.d.ts +4 -0
  78. package/dist/components/RteEditor/hooks/useFlyout.js +10 -9
  79. package/dist/components/RteEditor/hooks/useFlyout.js.map +1 -1
  80. package/dist/components/index.js +1 -1
  81. package/dist/helpers-CC9_diXm.js +168 -0
  82. package/dist/helpers-CC9_diXm.js.map +1 -0
  83. package/dist/index.js +1 -1
  84. package/package.json +11 -11
  85. package/dist/Lexical.prod-B6kL_nwF.js.map +0 -1
  86. package/dist/ListPlugin-CpLcVKRP.js +0 -627
  87. package/dist/ListPlugin-CpLcVKRP.js.map +0 -1
  88. package/dist/RteEditor.module-CHbWzGpE.js +0 -28
  89. package/dist/RteEditor.module-CHbWzGpE.js.map +0 -1
  90. package/dist/TablePlugin-DQR5VWGq.js +0 -301
  91. package/dist/TablePlugin-DQR5VWGq.js.map +0 -1
  92. package/dist/components/RteEditor/Plugins/LinkPlugin/AddLinkFrom.js +0 -31
  93. package/dist/helpers-C7Yo7VY3.js +0 -367
  94. package/dist/helpers-C7Yo7VY3.js.map +0 -1
  95. package/dist/helpers-CVB_4CnL.js +0 -1580
  96. package/dist/helpers-CVB_4CnL.js.map +0 -1
@@ -1,9 +1,9 @@
1
1
  function qi(n) {
2
2
  return {};
3
3
  }
4
- const wn = {}, Qi = {}, Ls = {}, yt = {}, gt = {}, Yn = {}, He = {}, Wr = {}, Zn = {}, mt = {}, xt = {}, we = {}, Br = {}, Rr = {}, Os = {}, Is = {}, As = {}, Ms = {}, zs = {}, Ws = {}, Bs = {}, dn = {}, Rs = {}, Ks = {}, Js = {}, $s = {}, Us = {}, Xi = {}, Yi = {}, Zi = {}, Vs = {}, Gi = {}, js = {}, Hs = {}, qs = {}, Kr = {}, Jr = {}, Gn = {}, eo = {}, to = {}, no = {}, ro = {}, Qs = {}, Xs = {}, Ys = {}, ne = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0, Zs = ne && "documentMode" in document ? document.documentMode : null, G = ne && /Mac|iPod|iPhone|iPad/.test(navigator.platform), xe = ne && /^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent), vt = !(!ne || !("InputEvent" in window) || Zs) && "getTargetRanges" in new window.InputEvent("input"), Nn = ne && /Version\/[\d.]+.*Safari/.test(navigator.userAgent), It = ne && /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream, Gs = ne && /Android/.test(navigator.userAgent), $r = ne && /^(?=.*Chrome).*/i.test(navigator.userAgent), ei = ne && Gs && $r, En = ne && /AppleWebKit\/[\d.]+/.test(navigator.userAgent) && !$r, rt = 1, Te = 3, Ee = 0, Ur = 1, Me = 2, ti = 0, ni = 1, ri = 2, St = 4, Tt = 8, Pn = 128, si = 112 | (3 | St | Tt) | Pn, Fn = 1, Dn = 2, Ln = 3, On = 4, In = 5, An = 6, At = Nn || It || En ? " " : "​", ae = `
4
+ const wn = {}, Qi = {}, Ls = {}, yt = {}, gt = {}, Yn = {}, He = {}, Wr = {}, Zn = {}, mt = {}, xt = {}, we = {}, Br = {}, Rr = {}, Os = {}, Is = {}, As = {}, Ms = {}, zs = {}, Ws = {}, Bs = {}, dn = {}, Rs = {}, Ks = {}, Js = {}, $s = {}, Us = {}, Xi = {}, Yi = {}, Zi = {}, Vs = {}, Gi = {}, js = {}, Hs = {}, qs = {}, Kr = {}, Jr = {}, Gn = {}, eo = {}, to = {}, no = {}, ro = {}, Qs = {}, Xs = {}, Ys = {}, ne = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0, Zs = ne && "documentMode" in document ? document.documentMode : null, G = ne && /Mac|iPod|iPhone|iPad/.test(navigator.platform), xe = ne && /^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent), vt = !(!ne || !("InputEvent" in window) || Zs) && "getTargetRanges" in new window.InputEvent("input"), Nn = ne && /Version\/[\d.]+.*Safari/.test(navigator.userAgent), It = ne && /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream, Gs = ne && /Android/.test(navigator.userAgent), $r = ne && /^(?=.*Chrome).*/i.test(navigator.userAgent), ei = ne && Gs && $r, En = ne && /AppleWebKit\/[\d.]+/.test(navigator.userAgent) && !$r, rt = 1, Te = 3, Ee = 0, Ur = 1, Me = 2, ti = 0, ni = 1, ri = 2, St = 4, Tt = 8, Pn = 128, si = 112 | (3 | St | Tt) | Pn, Fn = 1, Dn = 2, Ln = 3, On = 4, In = 5, An = 6, At = Nn || It || En ? " " : "​", ce = `
5
5
 
6
- `, ii = xe ? " " : At, Vr = "֑-߿יִ-﷽ﹰ-ﻼ", jr = "A-Za-zÀ-ÖØ-öø-ʸ̀-֐ࠀ-῿‎Ⰰ-﬜︀-﹯﻽-￿", oi = new RegExp("^[^" + jr + "]*[" + Vr + "]"), li = new RegExp("^[^" + Vr + "]*[" + jr + "]"), ce = { bold: 1, code: 16, highlight: Pn, italic: 2, strikethrough: St, subscript: 32, superscript: 64, underline: Tt }, ci = { directionless: 1, unmergeable: 2 }, er = { center: Dn, end: An, justify: On, left: Fn, right: Ln, start: In }, ai = { [Dn]: "center", [An]: "end", [On]: "justify", [Fn]: "left", [Ln]: "right", [In]: "start" }, ui = { normal: 0, segmented: 2, token: 1 }, fi = { [ti]: "normal", [ri]: "segmented", [ni]: "token" };
6
+ `, ii = xe ? " " : At, Vr = "֑-߿יִ-﷽ﹰ-ﻼ", jr = "A-Za-zÀ-ÖØ-öø-ʸ̀-֐ࠀ-῿‎Ⰰ-﬜︀-﹯﻽-￿", oi = new RegExp("^[^" + jr + "]*[" + Vr + "]"), li = new RegExp("^[^" + Vr + "]*[" + jr + "]"), ae = { bold: 1, code: 16, highlight: Pn, italic: 2, strikethrough: St, subscript: 32, superscript: 64, underline: Tt }, ai = { directionless: 1, unmergeable: 2 }, er = { center: Dn, end: An, justify: On, left: Fn, right: Ln, start: In }, ci = { [Dn]: "center", [An]: "end", [On]: "justify", [Fn]: "left", [Ln]: "right", [In]: "start" }, ui = { normal: 0, segmented: 2, token: 1 }, fi = { [ti]: "normal", [ri]: "segmented", [ni]: "token" };
7
7
  function di(n) {
8
8
  return n && n.__esModule && Object.prototype.hasOwnProperty.call(n, "default") ? n.default : n;
9
9
  }
@@ -50,19 +50,19 @@ function Hr(n, e, t) {
50
50
  const d = I();
51
51
  return d !== null ? d.clone() : null;
52
52
  });
53
- }(n), i = /* @__PURE__ */ new Map(), o = n.getRootElement(), l = n._editorState, c = n._blockCursorElement;
54
- let a = !1, u = "";
53
+ }(n), i = /* @__PURE__ */ new Map(), o = n.getRootElement(), l = n._editorState, a = n._blockCursorElement;
54
+ let c = !1, u = "";
55
55
  for (let f = 0; f < e.length; f++) {
56
56
  const d = e[f], g = d.type, p = d.target;
57
57
  let _ = Wt(p, l);
58
58
  if (!(_ === null && p !== o || A(_))) {
59
59
  if (g === "characterData") r && N(_) && pi(s, p, _) && _i(p, _, n);
60
60
  else if (g === "childList") {
61
- a = !0;
61
+ c = !0;
62
62
  const m = d.addedNodes;
63
63
  for (let k = 0; k < m.length; k++) {
64
64
  const T = m[k], x = Gr(T), P = T.parentNode;
65
- if (P != null && T !== c && x === null && (T.nodeName !== "BR" || !tn(T, P, n))) {
65
+ if (P != null && T !== a && x === null && (T.nodeName !== "BR" || !tn(T, P, n))) {
66
66
  if (xe) {
67
67
  const C = T.innerText || T.nodeValue;
68
68
  C && (u += C);
@@ -75,7 +75,7 @@ function Hr(n, e, t) {
75
75
  let k = 0;
76
76
  for (let T = 0; T < S; T++) {
77
77
  const x = y[T];
78
- (x.nodeName === "BR" && tn(x, p, n) || c === x) && (p.appendChild(x), k++);
78
+ (x.nodeName === "BR" && tn(x, p, n) || a === x) && (p.appendChild(x), k++);
79
79
  }
80
80
  S !== k && (p === o && (_ = ts(l)), i.set(p, _));
81
81
  }
@@ -101,7 +101,7 @@ function Hr(n, e, t) {
101
101
  }
102
102
  t.takeRecords();
103
103
  }
104
- s !== null && (a && (s.dirty = !0, ue(s)), xe && is(n) && s.insertRawText(u));
104
+ s !== null && (c && (s.dirty = !0, ue(s)), xe && is(n) && s.insertRawText(u));
105
105
  });
106
106
  } finally {
107
107
  hn = !1;
@@ -214,10 +214,10 @@ function kt(n) {
214
214
  return null;
215
215
  }
216
216
  function bt(n, e, t) {
217
- const r = ce[e];
217
+ const r = ae[e];
218
218
  if (t !== null && (n & r) == (t & r)) return n;
219
219
  let s = n ^ r;
220
- return e === "subscript" ? s &= ~ce.superscript : e === "superscript" && (s &= ~ce.subscript), s;
220
+ return e === "subscript" ? s &= ~ae.superscript : e === "superscript" && (s &= ~ae.subscript), s;
221
221
  }
222
222
  function so(n) {
223
223
  return N(n) || Ae(n) || A(n);
@@ -262,11 +262,11 @@ function Ne(n) {
262
262
  function wt(n) {
263
263
  bs();
264
264
  const e = n.getLatest(), t = e.__parent, r = fe(), s = M(), i = r._nodeMap, o = s._dirtyElements;
265
- t !== null && function(c, a, u) {
266
- let h = c;
265
+ t !== null && function(a, c, u) {
266
+ let h = a;
267
267
  for (; h !== null; ) {
268
268
  if (u.has(h)) return;
269
- const f = a.get(h);
269
+ const f = c.get(h);
270
270
  if (f === void 0) break;
271
271
  u.set(h, !1), h = f.__parent;
272
272
  }
@@ -363,13 +363,13 @@ function Bn(n, e, t) {
363
363
  let { anchorOffset: i, focusOffset: o } = r;
364
364
  if (s !== null) {
365
365
  let l = ss(s);
366
- const c = Wt(s);
367
- if (l !== null && N(c)) {
366
+ const a = Wt(s);
367
+ if (l !== null && N(a)) {
368
368
  if (l === At && t) {
369
- const a = t.length;
370
- l = t, i = a, o = a;
369
+ const c = t.length;
370
+ l = t, i = c, o = c;
371
371
  }
372
- l !== null && Rn(c, l, i, o, n);
372
+ l !== null && Rn(a, l, i, o, n);
373
373
  }
374
374
  }
375
375
  }
@@ -379,8 +379,8 @@ function Rn(n, e, t, r, s) {
379
379
  const o = i.isComposing();
380
380
  let l = e;
381
381
  (o || s) && e[e.length - 1] === At && (l = e.slice(0, -1));
382
- const c = i.getTextContent();
383
- if (s || l !== c) {
382
+ const a = i.getTextContent();
383
+ if (s || l !== a) {
384
384
  if (l === "") {
385
385
  if ($(null), Nn || It || En) i.remove();
386
386
  else {
@@ -393,8 +393,8 @@ function Rn(n, e, t, r, s) {
393
393
  }
394
394
  return;
395
395
  }
396
- const a = i.getParent(), u = ot(), h = i.getTextContentSize(), f = ye(), d = i.getKey();
397
- if (i.isToken() || f !== null && d === f && !o || F(u) && (a !== null && !a.canInsertTextBefore() && u.anchor.offset === 0 || u.anchor.key === n.__key && u.anchor.offset === 0 && !i.canInsertTextBefore() && !o || u.focus.key === n.__key && u.focus.offset === h && !i.canInsertTextAfter() && !o)) return void i.markDirty();
396
+ const c = i.getParent(), u = ot(), h = i.getTextContentSize(), f = ye(), d = i.getKey();
397
+ if (i.isToken() || f !== null && d === f && !o || F(u) && (c !== null && !c.canInsertTextBefore() && u.anchor.offset === 0 || u.anchor.key === n.__key && u.anchor.offset === 0 && !i.canInsertTextBefore() && !o || u.focus.key === n.__key && u.focus.offset === h && !i.canInsertTextAfter() && !o)) return void i.markDirty();
398
398
  const g = I();
399
399
  if (!F(g) || t === null || r === null) return void i.setTextContent(l);
400
400
  if (g.setTextNodeRange(i, t, i, r), i.isSegmented()) {
@@ -417,13 +417,13 @@ function Si(n, e) {
417
417
  function lr(n) {
418
418
  return n === "ArrowLeft";
419
419
  }
420
- function cr(n) {
420
+ function ar(n) {
421
421
  return n === "ArrowRight";
422
422
  }
423
423
  function Ve(n, e) {
424
424
  return G ? n : e;
425
425
  }
426
- function ar(n) {
426
+ function cr(n) {
427
427
  return n === "Enter";
428
428
  }
429
429
  function Ke(n) {
@@ -454,11 +454,11 @@ function Kn(n, e, t, r, s) {
454
454
  if (t.size === 0) return;
455
455
  const i = r.__type, o = r.__key, l = e.get(i);
456
456
  l === void 0 && b(33, i);
457
- const c = l.klass;
458
- let a = n.get(c);
459
- a === void 0 && (a = /* @__PURE__ */ new Map(), n.set(c, a));
460
- const u = a.get(o), h = u === "destroyed" && s === "created";
461
- (u === void 0 || h) && a.set(o, h ? "updated" : s);
457
+ const a = l.klass;
458
+ let c = n.get(a);
459
+ c === void 0 && (c = /* @__PURE__ */ new Map(), n.set(a, c));
460
+ const u = c.get(o), h = u === "destroyed" && s === "created";
461
+ (u === void 0 || h) && c.set(o, h ? "updated" : s);
462
462
  }
463
463
  function fr(n, e, t) {
464
464
  const r = n.getParent();
@@ -548,18 +548,18 @@ function ki(n, e, t) {
548
548
  let r = n._blockCursorElement;
549
549
  if (F(t) && t.isCollapsed() && t.anchor.type === "element" && e.contains(document.activeElement)) {
550
550
  const s = t.anchor, i = s.getNode(), o = s.offset;
551
- let l = !1, c = null;
551
+ let l = !1, a = null;
552
552
  if (o === i.getChildrenSize())
553
553
  rn(i.getChildAtIndex(o - 1)) && (l = !0);
554
554
  else {
555
- const a = i.getChildAtIndex(o);
556
- if (rn(a)) {
557
- const u = a.getPreviousSibling();
558
- (u === null || rn(u)) && (l = !0, c = n.getElementByKey(a.__key));
555
+ const c = i.getChildAtIndex(o);
556
+ if (rn(c)) {
557
+ const u = c.getPreviousSibling();
558
+ (u === null || rn(u)) && (l = !0, a = n.getElementByKey(c.__key));
559
559
  }
560
560
  }
561
561
  if (l) {
562
- const a = n.getElementByKey(i.__key);
562
+ const c = n.getElementByKey(i.__key);
563
563
  return r === null && (n._blockCursorElement = r = function(u) {
564
564
  const h = u.theme, f = document.createElement("div");
565
565
  f.contentEditable = "false", f.setAttribute("data-lexical-cursor", "true");
@@ -572,7 +572,7 @@ function ki(n, e, t) {
572
572
  d !== void 0 && f.classList.add(...d);
573
573
  }
574
574
  return f;
575
- }(n._config)), e.style.caretColor = "transparent", void (c === null ? a.appendChild(r) : a.insertBefore(r, c));
575
+ }(n._config)), e.style.caretColor = "transparent", void (a === null ? c.appendChild(r) : c.insertBefore(r, a));
576
576
  }
577
577
  }
578
578
  r !== null && Jn(r, n, e);
@@ -584,11 +584,11 @@ function oo(n, e) {
584
584
  let t = n.getChildAtIndex(e);
585
585
  t == null && (t = n), Pe(n) && b(102);
586
586
  const r = (o) => {
587
- const l = o.getParentOrThrow(), c = Pe(l), a = o !== t || c ? Ci(o) : o;
588
- if (c) return v(o) && v(a) || b(133), o.insertAfter(a), [o, a, a];
587
+ const l = o.getParentOrThrow(), a = Pe(l), c = o !== t || a ? Ci(o) : o;
588
+ if (a) return v(o) && v(c) || b(133), o.insertAfter(c), [o, c, c];
589
589
  {
590
590
  const [u, h, f] = r(l), d = o.getNextSiblings();
591
- return f.append(a, ...d), [u, h, a];
591
+ return f.append(c, ...d), [u, h, c];
592
592
  }
593
593
  }, [s, i] = r(t);
594
594
  return [s, i];
@@ -599,7 +599,7 @@ function lo(n) {
599
599
  function $t(n) {
600
600
  return n.nodeType === 1;
601
601
  }
602
- function co(n) {
602
+ function ao(n) {
603
603
  return n.nodeType === 11;
604
604
  }
605
605
  function bi(n) {
@@ -621,7 +621,7 @@ function $e(n, e) {
621
621
  for (; t !== null && t.getParent() !== null && !e(t); ) t = t.getParentOrThrow();
622
622
  return e(t) ? t : null;
623
623
  }
624
- function ao() {
624
+ function co() {
625
625
  return M();
626
626
  }
627
627
  const gr = /* @__PURE__ */ new WeakMap(), wi = /* @__PURE__ */ new Map();
@@ -678,7 +678,7 @@ function ke(n, e) {
678
678
  n.setProperty("text-align", e);
679
679
  }
680
680
  const Fi = "40px";
681
- function cs(n, e) {
681
+ function as(n, e) {
682
682
  const t = Se.theme.indent;
683
683
  if (typeof t == "string") {
684
684
  const s = n.classList.contains(t);
@@ -687,7 +687,7 @@ function cs(n, e) {
687
687
  const r = getComputedStyle(n).getPropertyValue("--lexical-indent-base-value") || Fi;
688
688
  n.style.setProperty("padding-inline-start", e === 0 ? "" : `calc(${e} * ${r})`);
689
689
  }
690
- function as(n, e) {
690
+ function cs(n, e) {
691
691
  const t = n.style;
692
692
  e === 0 ? ke(t, "") : e === Fn ? ke(t, "left") : e === Dn ? ke(t, "center") : e === Ln ? ke(t, "right") : e === On ? ke(t, "justify") : e === In ? ke(t, "start") : e === An && ke(t, "end");
693
693
  }
@@ -696,19 +696,19 @@ function Pt(n, e, t) {
696
696
  r === void 0 && b(60);
697
697
  const s = r.createDOM(Se, H);
698
698
  if (function(i, o, l) {
699
- const c = l._keyToDOMMap;
700
- o["__lexicalKey_" + l._key] = i, c.set(i, o);
699
+ const a = l._keyToDOMMap;
700
+ o["__lexicalKey_" + l._key] = i, a.set(i, o);
701
701
  }(n, s, H), N(r) ? s.setAttribute("data-lexical-text", "true") : A(r) && s.setAttribute("data-lexical-decorator", "true"), v(r)) {
702
702
  const i = r.__indent, o = r.__size;
703
- if (i !== 0 && cs(s, i), o !== 0) {
704
- const c = o - 1;
705
- (function(a, u, h, f) {
703
+ if (i !== 0 && as(s, i), o !== 0) {
704
+ const a = o - 1;
705
+ (function(c, u, h, f) {
706
706
  const d = j;
707
- j = "", mn(a, h, 0, u, f, null), fs(h, f), j = d;
708
- })(Ft(r, te), c, r, s);
707
+ j = "", mn(c, h, 0, u, f, null), fs(h, f), j = d;
708
+ })(Ft(r, te), a, r, s);
709
709
  }
710
710
  const l = r.__format;
711
- l !== 0 && as(s, l), r.isInline() || us(null, r, s), Bt(r) && (B += ae, le += ae);
711
+ l !== 0 && cs(s, l), r.isInline() || us(null, r, s), Bt(r) && (B += ce, le += ce);
712
712
  } else {
713
713
  const i = r.getTextContent();
714
714
  if (A(r)) {
@@ -730,10 +730,10 @@ function mn(n, e, t, r, s, i) {
730
730
  let l = t;
731
731
  for (; l <= r; ++l) {
732
732
  Pt(n[l], s, i);
733
- const c = te.get(n[l]);
734
- c !== null && N(c) && (re === null && (re = c.getFormat()), ee === "" && (ee = c.getStyle()));
733
+ const a = te.get(n[l]);
734
+ a !== null && N(a) && (re === null && (re = a.getFormat()), ee === "" && (ee = a.getStyle()));
735
735
  }
736
- Bt(e) && (B += ae), s.__lexicalTextContent = B, B = o + B;
736
+ Bt(e) && (B += ce), s.__lexicalTextContent = B, B = o + B;
737
737
  }
738
738
  function _r(n, e) {
739
739
  const t = e.get(n);
@@ -765,21 +765,21 @@ function fs(n, e) {
765
765
  if (t !== j || r !== _t) {
766
766
  const i = j === "", o = i ? _t : (s = j, oi.test(s) ? "rtl" : li.test(s) ? "ltr" : null);
767
767
  if (o !== r) {
768
- const l = e.classList, c = Se.theme;
769
- let a = r !== null ? c[r] : void 0, u = o !== null ? c[o] : void 0;
770
- if (a !== void 0) {
771
- if (typeof a == "string") {
772
- const h = Ct(a);
773
- a = c[r] = h;
768
+ const l = e.classList, a = Se.theme;
769
+ let c = r !== null ? a[r] : void 0, u = o !== null ? a[o] : void 0;
770
+ if (c !== void 0) {
771
+ if (typeof c == "string") {
772
+ const h = Ct(c);
773
+ c = a[r] = h;
774
774
  }
775
- l.remove(...a);
775
+ l.remove(...c);
776
776
  }
777
777
  if (o === null || i && o === "ltr") e.removeAttribute("dir");
778
778
  else {
779
779
  if (u !== void 0) {
780
780
  if (typeof u == "string") {
781
781
  const h = Ct(u);
782
- u = c[o] = h;
782
+ u = a[o] = h;
783
783
  }
784
784
  u !== void 0 && l.add(...u);
785
785
  }
@@ -795,8 +795,8 @@ function Di(n, e, t) {
795
795
  const r = j;
796
796
  var s;
797
797
  j = "", re = null, ee = "", function(i, o, l) {
798
- const c = B, a = i.__size, u = o.__size;
799
- if (B = "", a === 1 && u === 1) {
798
+ const a = B, c = i.__size, u = o.__size;
799
+ if (B = "", c === 1 && u === 1) {
800
800
  const h = i.__first, f = o.__first;
801
801
  if (h === f) je(h, l);
802
802
  else {
@@ -816,11 +816,11 @@ function Di(n, e, t) {
816
816
  N(d) && (re === null && (re = d.getFormat()), ee === "" && (ee = d.getStyle()));
817
817
  } else {
818
818
  const h = Ft(i, Fe), f = Ft(o, te);
819
- if (a === 0) u !== 0 && mn(f, o, 0, u - 1, l, null);
819
+ if (c === 0) u !== 0 && mn(f, o, 0, u - 1, l, null);
820
820
  else if (u === 0) {
821
- if (a !== 0) {
821
+ if (c !== 0) {
822
822
  const d = l.__lexicalLineBreak == null;
823
- yn(h, 0, a - 1, d ? null : l), d && (l.textContent = "");
823
+ yn(h, 0, c - 1, d ? null : l), d && (l.textContent = "");
824
824
  }
825
825
  } else (function(d, g, p, _, m, y) {
826
826
  const S = _ - 1, k = m - 1;
@@ -845,9 +845,9 @@ function Di(n, e, t) {
845
845
  const L = p[k + 1];
846
846
  mn(p, d, E, k, y, L === void 0 ? null : H.getElementByKey(L));
847
847
  } else z && !O && yn(g, C, S, y);
848
- })(o, h, f, a, u, l);
848
+ })(o, h, f, c, u, l);
849
849
  }
850
- Bt(o) && (B += ae), l.__lexicalTextContent = B, B = c + B;
850
+ Bt(o) && (B += ce), l.__lexicalTextContent = B, B = a + B;
851
851
  }(n, e, t), fs(e, t), bn(s = e) && re != null && re !== s.__textFormat && !tt && (s.setTextFormat(re), s.setTextStyle(ee)), function(i) {
852
852
  bn(i) && ee !== "" && ee !== i.__textStyle && !tt && i.setTextStyle(ee);
853
853
  }(e), j = r;
@@ -884,9 +884,9 @@ function je(n, e) {
884
884
  }
885
885
  if (v(t) && v(r)) {
886
886
  const o = r.__indent;
887
- o !== t.__indent && cs(i, o);
887
+ o !== t.__indent && as(i, o);
888
888
  const l = r.__format;
889
- l !== t.__format && as(i, l), s && (Di(t, r, i), Y(r) || r.isInline() || us(t, r, i)), Bt(r) && (B += ae, le += ae);
889
+ l !== t.__format && cs(i, l), s && (Di(t, r, i), Y(r) || r.isInline() || us(t, r, i)), Bt(r) && (B += ce, le += ce);
890
890
  } else {
891
891
  const o = r.getTextContent();
892
892
  if (A(r)) {
@@ -926,62 +926,62 @@ function xn(n) {
926
926
  const oe = Object.freeze({}), vn = 30, Sn = [["keydown", function(n, e) {
927
927
  if (Xe = n.timeStamp, hs = n.key, e.isComposing()) return;
928
928
  const { key: t, shiftKey: r, ctrlKey: s, metaKey: i, altKey: o } = n;
929
- w(e, Os, n) || t != null && (function(l, c, a, u) {
930
- return cr(l) && !c && !u && !a;
931
- }(t, s, o, i) ? w(e, Is, n) : function(l, c, a, u, h) {
932
- return cr(l) && !u && !a && (c || h);
933
- }(t, s, r, o, i) ? w(e, As, n) : function(l, c, a, u) {
934
- return lr(l) && !c && !u && !a;
935
- }(t, s, o, i) ? w(e, Ms, n) : function(l, c, a, u, h) {
936
- return lr(l) && !u && !a && (c || h);
937
- }(t, s, r, o, i) ? w(e, zs, n) : /* @__PURE__ */ function(l, c, a) {
929
+ w(e, Os, n) || t != null && (function(l, a, c, u) {
930
+ return ar(l) && !a && !u && !c;
931
+ }(t, s, o, i) ? w(e, Is, n) : function(l, a, c, u, h) {
932
+ return ar(l) && !u && !c && (a || h);
933
+ }(t, s, r, o, i) ? w(e, As, n) : function(l, a, c, u) {
934
+ return lr(l) && !a && !u && !c;
935
+ }(t, s, o, i) ? w(e, Ms, n) : function(l, a, c, u, h) {
936
+ return lr(l) && !u && !c && (a || h);
937
+ }(t, s, r, o, i) ? w(e, zs, n) : /* @__PURE__ */ function(l, a, c) {
938
938
  return /* @__PURE__ */ function(u) {
939
939
  return u === "ArrowUp";
940
- }(l) && !c && !a;
941
- }(t, s, i) ? w(e, Ws, n) : /* @__PURE__ */ function(l, c, a) {
940
+ }(l) && !a && !c;
941
+ }(t, s, i) ? w(e, Ws, n) : /* @__PURE__ */ function(l, a, c) {
942
942
  return /* @__PURE__ */ function(u) {
943
943
  return u === "ArrowDown";
944
- }(l) && !c && !a;
945
- }(t, s, i) ? w(e, Bs, n) : function(l, c) {
946
- return ar(l) && c;
944
+ }(l) && !a && !c;
945
+ }(t, s, i) ? w(e, Bs, n) : function(l, a) {
946
+ return cr(l) && a;
947
947
  }(t, r) ? (Ye = !0, w(e, dn, n)) : /* @__PURE__ */ function(l) {
948
948
  return l === " ";
949
- }(t) ? w(e, Rs, n) : function(l, c) {
950
- return G && c && l.toLowerCase() === "o";
951
- }(t, s) ? (n.preventDefault(), Ye = !0, w(e, gt, !0)) : function(l, c) {
952
- return ar(l) && !c;
953
- }(t, r) ? (Ye = !1, w(e, dn, n)) : function(l, c, a, u) {
954
- return G ? !c && !a && (Ke(l) || l.toLowerCase() === "h" && u) : !(u || c || a) && Ke(l);
949
+ }(t) ? w(e, Rs, n) : function(l, a) {
950
+ return G && a && l.toLowerCase() === "o";
951
+ }(t, s) ? (n.preventDefault(), Ye = !0, w(e, gt, !0)) : function(l, a) {
952
+ return cr(l) && !a;
953
+ }(t, r) ? (Ye = !1, w(e, dn, n)) : function(l, a, c, u) {
954
+ return G ? !a && !c && (Ke(l) || l.toLowerCase() === "h" && u) : !(u || a || c) && Ke(l);
955
955
  }(t, o, i, s) ? Ke(t) ? w(e, Ks, n) : (n.preventDefault(), w(e, yt, !0)) : /* @__PURE__ */ function(l) {
956
956
  return l === "Escape";
957
- }(t) ? w(e, Js, n) : function(l, c, a, u, h) {
958
- return G ? !(a || u || h) && (Je(l) || l.toLowerCase() === "d" && c) : !(c || u || h) && Je(l);
959
- }(t, s, r, o, i) ? Je(t) ? w(e, $s, n) : (n.preventDefault(), w(e, yt, !1)) : function(l, c, a) {
960
- return Ke(l) && (G ? c : a);
961
- }(t, o, s) ? (n.preventDefault(), w(e, mt, !0)) : function(l, c, a) {
962
- return Je(l) && (G ? c : a);
963
- }(t, o, s) ? (n.preventDefault(), w(e, mt, !1)) : function(l, c) {
964
- return G && c && Ke(l);
965
- }(t, i) ? (n.preventDefault(), w(e, xt, !0)) : function(l, c) {
966
- return G && c && Je(l);
967
- }(t, i) ? (n.preventDefault(), w(e, xt, !1)) : function(l, c, a, u) {
968
- return l.toLowerCase() === "b" && !c && Ve(a, u);
969
- }(t, o, i, s) ? (n.preventDefault(), w(e, we, "bold")) : function(l, c, a, u) {
970
- return l.toLowerCase() === "u" && !c && Ve(a, u);
971
- }(t, o, i, s) ? (n.preventDefault(), w(e, we, "underline")) : function(l, c, a, u) {
972
- return l.toLowerCase() === "i" && !c && Ve(a, u);
973
- }(t, o, i, s) ? (n.preventDefault(), w(e, we, "italic")) : /* @__PURE__ */ function(l, c, a, u) {
974
- return l === "Tab" && !c && !a && !u;
975
- }(t, o, s, i) ? w(e, Us, n) : function(l, c, a, u) {
976
- return l.toLowerCase() === "z" && !c && Ve(a, u);
977
- }(t, r, i, s) ? (n.preventDefault(), w(e, Br, void 0)) : function(l, c, a, u) {
978
- return G ? l.toLowerCase() === "z" && a && c : l.toLowerCase() === "y" && u || l.toLowerCase() === "z" && u && c;
979
- }(t, r, i, s) ? (n.preventDefault(), w(e, Rr, void 0)) : Ht(e._editorState._selection) ? function(l, c, a, u) {
980
- return !c && l.toLowerCase() === "c" && (G ? a : u);
981
- }(t, r, i, s) ? (n.preventDefault(), w(e, Kr, n)) : function(l, c, a, u) {
982
- return !c && l.toLowerCase() === "x" && (G ? a : u);
983
- }(t, r, i, s) ? (n.preventDefault(), w(e, Jr, n)) : ur(t, i, s) && (n.preventDefault(), w(e, Gn, n)) : !xe && ur(t, i, s) && (n.preventDefault(), w(e, Gn, n)), /* @__PURE__ */ function(l, c, a, u) {
984
- return l || c || a || u;
957
+ }(t) ? w(e, Js, n) : function(l, a, c, u, h) {
958
+ return G ? !(c || u || h) && (Je(l) || l.toLowerCase() === "d" && a) : !(a || u || h) && Je(l);
959
+ }(t, s, r, o, i) ? Je(t) ? w(e, $s, n) : (n.preventDefault(), w(e, yt, !1)) : function(l, a, c) {
960
+ return Ke(l) && (G ? a : c);
961
+ }(t, o, s) ? (n.preventDefault(), w(e, mt, !0)) : function(l, a, c) {
962
+ return Je(l) && (G ? a : c);
963
+ }(t, o, s) ? (n.preventDefault(), w(e, mt, !1)) : function(l, a) {
964
+ return G && a && Ke(l);
965
+ }(t, i) ? (n.preventDefault(), w(e, xt, !0)) : function(l, a) {
966
+ return G && a && Je(l);
967
+ }(t, i) ? (n.preventDefault(), w(e, xt, !1)) : function(l, a, c, u) {
968
+ return l.toLowerCase() === "b" && !a && Ve(c, u);
969
+ }(t, o, i, s) ? (n.preventDefault(), w(e, we, "bold")) : function(l, a, c, u) {
970
+ return l.toLowerCase() === "u" && !a && Ve(c, u);
971
+ }(t, o, i, s) ? (n.preventDefault(), w(e, we, "underline")) : function(l, a, c, u) {
972
+ return l.toLowerCase() === "i" && !a && Ve(c, u);
973
+ }(t, o, i, s) ? (n.preventDefault(), w(e, we, "italic")) : /* @__PURE__ */ function(l, a, c, u) {
974
+ return l === "Tab" && !a && !c && !u;
975
+ }(t, o, s, i) ? w(e, Us, n) : function(l, a, c, u) {
976
+ return l.toLowerCase() === "z" && !a && Ve(c, u);
977
+ }(t, r, i, s) ? (n.preventDefault(), w(e, Br, void 0)) : function(l, a, c, u) {
978
+ return G ? l.toLowerCase() === "z" && c && a : l.toLowerCase() === "y" && u || l.toLowerCase() === "z" && u && a;
979
+ }(t, r, i, s) ? (n.preventDefault(), w(e, Rr, void 0)) : Ht(e._editorState._selection) ? function(l, a, c, u) {
980
+ return !a && l.toLowerCase() === "c" && (G ? c : u);
981
+ }(t, r, i, s) ? (n.preventDefault(), w(e, Kr, n)) : function(l, a, c, u) {
982
+ return !a && l.toLowerCase() === "x" && (G ? c : u);
983
+ }(t, r, i, s) ? (n.preventDefault(), w(e, Jr, n)) : ur(t, i, s) && (n.preventDefault(), w(e, Gn, n)) : !xe && ur(t, i, s) && (n.preventDefault(), w(e, Gn, n)), /* @__PURE__ */ function(l, a, c, u) {
984
+ return l || a || c || u;
985
985
  }(s, r, o, i) && w(e, Ys, n));
986
986
  }], ["pointerdown", function(n, e) {
987
987
  const t = n.target, r = n.pointerType;
@@ -1007,8 +1007,8 @@ const oe = Object.freeze({}), vn = 30, Sn = [["keydown", function(n, e) {
1007
1007
  Ue && (on(e, r), Ue = !1);
1008
1008
  const i = t.anchor.getNode(), o = se(e._window);
1009
1009
  if (o === null) return;
1010
- const l = t.isBackward(), c = l ? t.anchor.offset : t.focus.offset, a = l ? t.focus.offset : t.anchor.offset;
1011
- vt && !t.isCollapsed() && N(i) && o.anchorNode !== null && i.getTextContent().slice(0, c) + r + i.getTextContent().slice(c + a) === ss(o.anchorNode) || w(e, He, r);
1010
+ const l = t.isBackward(), a = l ? t.anchor.offset : t.focus.offset, c = l ? t.focus.offset : t.anchor.offset;
1011
+ vt && !t.isCollapsed() && N(i) && o.anchorNode !== null && i.getTextContent().slice(0, a) + r + i.getTextContent().slice(a + c) === ss(o.anchorNode) || w(e, He, r);
1012
1012
  const u = r.length;
1013
1013
  xe && u > 1 && n.inputType === "insertCompositionText" && !e.isComposing() && (t.anchor.offset -= u), Nn || It || En || !e.isComposing() || (Xe = 0, $(null));
1014
1014
  } else
@@ -1064,9 +1064,9 @@ vt && Sn.push(["beforeinput", (n, e) => function(t, r) {
1064
1064
  }
1065
1065
  var l;
1066
1066
  if (!F(o)) return;
1067
- const c = t.data;
1067
+ const a = t.data;
1068
1068
  Le !== null && Bn(!1, r, Le), o.dirty && Le === null || !o.isCollapsed() || Y(o.anchor.getNode()) || i === null || o.applyDOMRange(i), Le = null;
1069
- const a = o.anchor, u = o.focus, h = a.getNode(), f = u.getNode();
1069
+ const c = o.anchor, u = o.focus, h = c.getNode(), f = u.getNode();
1070
1070
  if (s !== "insertText" && s !== "insertTranspose") switch (t.preventDefault(), s) {
1071
1071
  case "insertFromYank":
1072
1072
  case "insertFromDrop":
@@ -1132,13 +1132,13 @@ vt && Sn.push(["beforeinput", (n, e) => function(t, r) {
1132
1132
  w(r, Rr, void 0);
1133
1133
  }
1134
1134
  else {
1135
- if (c === `
1135
+ if (a === `
1136
1136
  `) t.preventDefault(), w(r, gt, !1);
1137
- else if (c === ae) t.preventDefault(), w(r, Yn, void 0);
1138
- else if (c == null && t.dataTransfer) {
1137
+ else if (a === ce) t.preventDefault(), w(r, Yn, void 0);
1138
+ else if (a == null && t.dataTransfer) {
1139
1139
  const d = t.dataTransfer.getData("text/plain");
1140
1140
  t.preventDefault(), o.insertRawText(d);
1141
- } else c != null && ps(o, i, c, t.timeStamp, !0) ? (t.preventDefault(), w(r, He, c)) : Le = c;
1141
+ } else a != null && ps(o, i, a, t.timeStamp, !0) ? (t.preventDefault(), w(r, He, a)) : Le = a;
1142
1142
  gs = t.timeStamp;
1143
1143
  }
1144
1144
  });
@@ -1147,8 +1147,8 @@ let Xe = 0, hs = null, gs = 0, Le = null;
1147
1147
  const Dt = /* @__PURE__ */ new WeakMap();
1148
1148
  let Tn = !1, Cn = !1, Ye = !1, Ue = !1, _s = [0, "", 0, "root", 0];
1149
1149
  function ps(n, e, t, r, s) {
1150
- const i = n.anchor, o = n.focus, l = i.getNode(), c = M(), a = se(c._window), u = a !== null ? a.anchorNode : null, h = i.key, f = c.getElementByKey(h), d = t.length;
1151
- return h !== o.key || !N(l) || (!s && (!vt || gs < r + 50) || l.isDirty() && d < 2 || ns(t)) && i.offset !== o.offset && !l.isComposing() || be(l) || l.isDirty() && d > 1 || (s || !vt) && f !== null && !l.isComposing() && u !== kt(f) || a !== null && e !== null && (!e.collapsed || e.startContainer !== a.anchorNode || e.startOffset !== a.anchorOffset) || l.getFormat() !== n.format || l.getStyle() !== n.style || Si(n, l);
1150
+ const i = n.anchor, o = n.focus, l = i.getNode(), a = M(), c = se(a._window), u = c !== null ? c.anchorNode : null, h = i.key, f = a.getElementByKey(h), d = t.length;
1151
+ return h !== o.key || !N(l) || (!s && (!vt || gs < r + 50) || l.isDirty() && d < 2 || ns(t)) && i.offset !== o.offset && !l.isComposing() || be(l) || l.isDirty() && d > 1 || (s || !vt) && f !== null && !l.isComposing() && u !== kt(f) || c !== null && e !== null && (!e.collapsed || e.startContainer !== c.anchorNode || e.startOffset !== c.anchorOffset) || l.getFormat() !== n.format || l.getStyle() !== n.style || Si(n, l);
1152
1152
  }
1153
1153
  function pr(n, e) {
1154
1154
  return n !== null && n.nodeValue !== null && n.nodeType === Te && e !== 0 && e !== n.nodeValue.length;
@@ -1160,18 +1160,18 @@ function yr(n, e, t) {
1160
1160
  if (!Mt(e, r, i)) return;
1161
1161
  const l = I();
1162
1162
  if (F(l)) {
1163
- const c = l.anchor, a = c.getNode();
1163
+ const a = l.anchor, c = a.getNode();
1164
1164
  if (l.isCollapsed()) {
1165
1165
  n.type === "Range" && n.anchorNode === n.focusNode && (l.dirty = !0);
1166
1166
  const u = Kt(e).event, h = u ? u.timeStamp : performance.now(), [f, d, g, p, _] = _s, m = Z(), y = e.isComposing() === !1 && m.getTextContent() === "";
1167
- if (h < _ + 200 && c.offset === g && c.key === p) l.format = f, l.style = d;
1168
- else if (c.type === "text") N(a) || b(141), l.format = a.getFormat(), l.style = a.getStyle();
1169
- else if (c.type === "element" && !y) {
1170
- const S = c.getNode();
1167
+ if (h < _ + 200 && a.offset === g && a.key === p) l.format = f, l.style = d;
1168
+ else if (a.type === "text") N(c) || b(141), l.format = c.getFormat(), l.style = c.getStyle();
1169
+ else if (a.type === "element" && !y) {
1170
+ const S = a.getNode();
1171
1171
  l.style = "", S instanceof We && S.getChildrenSize() === 0 ? (l.format = S.getTextFormat(), l.style = S.getTextStyle()) : l.format = 0;
1172
1172
  }
1173
1173
  } else {
1174
- const u = c.key, h = l.focus.key, f = l.getNodes(), d = f.length, g = l.isBackward(), p = g ? o : s, _ = g ? s : o, m = g ? h : u, y = g ? u : h;
1174
+ const u = a.key, h = l.focus.key, f = l.getNodes(), d = f.length, g = l.isBackward(), p = g ? o : s, _ = g ? s : o, m = g ? h : u, y = g ? u : h;
1175
1175
  let S = si, k = !1;
1176
1176
  for (let T = 0; T < d; T++) {
1177
1177
  const x = f[T], P = x.getTextContentSize();
@@ -1217,13 +1217,13 @@ function xs(n) {
1217
1217
  const r = Yr(t.anchorNode);
1218
1218
  if (r === null) return;
1219
1219
  Cn && (Cn = !1, X(r, () => {
1220
- const a = ot(), u = t.anchorNode;
1220
+ const c = ot(), u = t.anchorNode;
1221
1221
  if (u === null) return;
1222
1222
  const h = u.nodeType;
1223
- h !== rt && h !== Te || ue(qt(a, t, r, n));
1223
+ h !== rt && h !== Te || ue(qt(c, t, r, n));
1224
1224
  }));
1225
- const s = Wn(r), i = s[s.length - 1], o = i._key, l = Ie.get(o), c = l || i;
1226
- c !== r && yr(t, c, !1), yr(t, r, !0), r !== i ? Ie.set(o, r) : l && Ie.delete(o);
1225
+ const s = Wn(r), i = s[s.length - 1], o = i._key, l = Ie.get(o), a = l || i;
1226
+ a !== r && yr(t, a, !1), yr(t, r, !0), r !== i ? Ie.set(o, r) : l && Ie.delete(o);
1227
1227
  }
1228
1228
  function mr(n) {
1229
1229
  n._lexicalHandled = !0;
@@ -1239,8 +1239,8 @@ function Oi(n) {
1239
1239
  const s = zt(n);
1240
1240
  zn(s) ? (function(o) {
1241
1241
  if (o._parentEditor !== null) {
1242
- const l = Wn(o), c = l[l.length - 1]._key;
1243
- Ie.get(c) === o && Ie.delete(c);
1242
+ const l = Wn(o), a = l[l.length - 1]._key;
1243
+ Ie.get(a) === o && Ie.delete(a);
1244
1244
  } else Ie.delete(o._key);
1245
1245
  }(s), n.__lexicalEditor = null) : s && b(198);
1246
1246
  const i = ms(n);
@@ -1252,15 +1252,15 @@ function kn(n, e, t) {
1252
1252
  const r = n.__key, s = n.getParent();
1253
1253
  if (s === null) return;
1254
1254
  const i = function(l) {
1255
- const c = I();
1256
- if (!F(c) || !v(l)) return c;
1257
- const { anchor: a, focus: u } = c, h = a.getNode(), f = u.getNode();
1258
- return Qe(h, l) && a.set(l.__key, 0, "element"), Qe(f, l) && u.set(l.__key, 0, "element"), c;
1255
+ const a = I();
1256
+ if (!F(a) || !v(l)) return a;
1257
+ const { anchor: c, focus: u } = a, h = c.getNode(), f = u.getNode();
1258
+ return Qe(h, l) && c.set(l.__key, 0, "element"), Qe(f, l) && u.set(l.__key, 0, "element"), a;
1259
1259
  }(n);
1260
1260
  let o = !1;
1261
1261
  if (F(i) && e) {
1262
- const l = i.anchor, c = i.focus;
1263
- l.key === r && (Ot(l, n, s, n.getPreviousSibling(), n.getNextSibling()), o = !0), c.key === r && (Ot(c, n, s, n.getPreviousSibling(), n.getNextSibling()), o = !0);
1262
+ const l = i.anchor, a = i.focus;
1263
+ l.key === r && (Ot(l, n, s, n.getPreviousSibling(), n.getNextSibling()), o = !0), a.key === r && (Ot(a, n, s, n.getPreviousSibling(), n.getNextSibling()), o = !0);
1264
1264
  } else Ht(i) && e && n.isSelected() && n.selectPrevious();
1265
1265
  if (F(i) && e && !o) {
1266
1266
  const l = n.getIndexWithinParent();
@@ -1386,8 +1386,8 @@ class Vt {
1386
1386
  if (s === 0 || i === 0 || t[s - 1] !== r[i - 1]) return null;
1387
1387
  const o = new Set(r);
1388
1388
  for (let l = 0; l < s; l++) {
1389
- const c = t[l];
1390
- if (o.has(c)) return c;
1389
+ const a = t[l];
1390
+ if (o.has(a)) return a;
1391
1391
  }
1392
1392
  return null;
1393
1393
  }
@@ -1439,14 +1439,14 @@ class Vt {
1439
1439
  i = l;
1440
1440
  continue;
1441
1441
  }
1442
- const c = t ? i.getNextSibling() : i.getPreviousSibling();
1443
- if (c !== null) {
1444
- i = c;
1442
+ const a = t ? i.getNextSibling() : i.getPreviousSibling();
1443
+ if (a !== null) {
1444
+ i = a;
1445
1445
  continue;
1446
1446
  }
1447
- const a = i.getParentOrThrow();
1448
- if (s.has(a.__key) || r.push(a), a === e) break;
1449
- let u = null, h = a;
1447
+ const c = i.getParentOrThrow();
1448
+ if (s.has(c.__key) || r.push(c), c === e) break;
1449
+ let u = null, h = c;
1450
1450
  do {
1451
1451
  if (h === null && b(68), u = t ? h.getNextSibling() : h.getPreviousSibling(), h = h.getParent(), h === null) break;
1452
1452
  u !== null || s.has(h.__key) || r.push(h);
@@ -1467,8 +1467,8 @@ class Vt {
1467
1467
  q();
1468
1468
  const e = fe(), t = M(), r = e._nodeMap, s = this.__key, i = this.getLatest(), o = t._cloneNotNeeded, l = I();
1469
1469
  if (l !== null && l.setCachedNodes(null), o.has(s)) return wt(i), i;
1470
- const c = Ei(i);
1471
- return o.add(s), wt(c), r.set(s, c), c;
1470
+ const a = Ei(i);
1471
+ return o.add(s), wt(a), r.set(s, a), a;
1472
1472
  }
1473
1473
  getTextContent() {
1474
1474
  return "";
@@ -1501,10 +1501,10 @@ class Vt {
1501
1501
  q();
1502
1502
  let r = I();
1503
1503
  r !== null && (r = r.clone()), nn(this, e);
1504
- const s = this.getLatest(), i = this.__key, o = e.__key, l = e.getWritable(), c = this.getParentOrThrow().getWritable(), a = c.__size;
1504
+ const s = this.getLatest(), i = this.__key, o = e.__key, l = e.getWritable(), a = this.getParentOrThrow().getWritable(), c = a.__size;
1505
1505
  Ne(l);
1506
1506
  const u = s.getPreviousSibling(), h = s.getNextSibling(), f = s.__prev, d = s.__next, g = s.__parent;
1507
- if (kn(s, !1, !0), u === null ? c.__first = o : u.getWritable().__next = o, l.__prev = f, h === null ? c.__last = o : h.getWritable().__prev = o, l.__next = d, l.__parent = g, c.__size = a, t && (v(this) && v(l) || b(139), this.getChildren().forEach((p) => {
1507
+ if (kn(s, !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 = d, l.__parent = g, a.__size = c, t && (v(this) && v(l) || b(139), this.getChildren().forEach((p) => {
1508
1508
  l.append(p);
1509
1509
  })), F(r)) {
1510
1510
  ue(r);
@@ -1516,20 +1516,20 @@ class Vt {
1516
1516
  insertAfter(e, t = !0) {
1517
1517
  q(), nn(this, e);
1518
1518
  const r = this.getWritable(), s = e.getWritable(), i = s.getParent(), o = I();
1519
- let l = !1, c = !1;
1519
+ let l = !1, a = !1;
1520
1520
  if (i !== null) {
1521
1521
  const d = e.getIndexWithinParent();
1522
1522
  if (Ne(s), F(o)) {
1523
1523
  const g = i.__key, p = o.anchor, _ = o.focus;
1524
- l = p.type === "element" && p.key === g && p.offset === d + 1, c = _.type === "element" && _.key === g && _.offset === d + 1;
1524
+ l = p.type === "element" && p.key === g && p.offset === d + 1, a = _.type === "element" && _.key === g && _.offset === d + 1;
1525
1525
  }
1526
1526
  }
1527
- const a = this.getNextSibling(), u = this.getParentOrThrow().getWritable(), h = s.__key, f = r.__next;
1528
- if (a === null ? u.__last = h : a.getWritable().__prev = h, u.__size++, r.__next = h, s.__next = f, s.__prev = r.__key, s.__parent = r.__parent, t && F(o)) {
1527
+ const c = this.getNextSibling(), u = this.getParentOrThrow().getWritable(), h = s.__key, f = r.__next;
1528
+ if (c === null ? u.__last = h : c.getWritable().__prev = h, u.__size++, r.__next = h, s.__next = f, s.__prev = r.__key, s.__parent = r.__parent, t && F(o)) {
1529
1529
  const d = this.getIndexWithinParent();
1530
1530
  Lt(o, u, d + 1);
1531
1531
  const g = u.__key;
1532
- l && o.anchor.set(g, d + 2, "element"), c && o.focus.set(g, d + 2, "element");
1532
+ l && o.anchor.set(g, d + 2, "element"), a && o.focus.set(g, d + 2, "element");
1533
1533
  }
1534
1534
  return e;
1535
1535
  }
@@ -1537,10 +1537,10 @@ class Vt {
1537
1537
  q(), nn(this, e);
1538
1538
  const r = this.getWritable(), s = e.getWritable(), i = s.__key;
1539
1539
  Ne(s);
1540
- const o = this.getPreviousSibling(), l = this.getParentOrThrow().getWritable(), c = r.__prev, a = this.getIndexWithinParent();
1541
- o === null ? l.__first = i : o.getWritable().__next = i, l.__size++, r.__prev = i, s.__prev = c, s.__next = r.__key, s.__parent = r.__parent;
1540
+ const o = this.getPreviousSibling(), l = this.getParentOrThrow().getWritable(), a = r.__prev, c = this.getIndexWithinParent();
1541
+ o === null ? l.__first = i : o.getWritable().__next = i, l.__size++, r.__prev = i, s.__prev = a, s.__next = r.__key, s.__parent = r.__parent;
1542
1542
  const u = I();
1543
- return t && F(u) && Lt(u, this.getParentOrThrow(), a), e;
1543
+ return t && F(u) && Lt(u, this.getParentOrThrow(), c), e;
1544
1544
  }
1545
1545
  isParentRequired() {
1546
1546
  return !1;
@@ -1644,7 +1644,7 @@ function dt(n) {
1644
1644
  function ln(n, e) {
1645
1645
  return 16 & e ? "code" : e & Pn ? "mark" : 32 & e ? "sub" : 64 & e ? "sup" : null;
1646
1646
  }
1647
- function cn(n, e) {
1647
+ function an(n, e) {
1648
1648
  return 1 & e ? "strong" : 2 & e ? "em" : "span";
1649
1649
  }
1650
1650
  function vs(n, e, t, r, s) {
@@ -1652,16 +1652,16 @@ function vs(n, e, t, r, s) {
1652
1652
  let o = qe(s, "base");
1653
1653
  o !== void 0 && i.add(...o), o = qe(s, "underlineStrikethrough");
1654
1654
  let l = !1;
1655
- const c = e & Tt && e & St;
1656
- o !== void 0 && (t & Tt && t & St ? (l = !0, c || i.add(...o)) : c && i.remove(...o));
1657
- for (const a in ce) {
1658
- const u = ce[a];
1659
- if (o = qe(s, a), o !== void 0) if (t & u) {
1660
- if (l && (a === "underline" || a === "strikethrough")) {
1655
+ const a = e & Tt && e & St;
1656
+ o !== void 0 && (t & Tt && t & St ? (l = !0, a || i.add(...o)) : a && i.remove(...o));
1657
+ for (const c in ae) {
1658
+ const u = ae[c];
1659
+ if (o = qe(s, c), o !== void 0) if (t & u) {
1660
+ if (l && (c === "underline" || c === "strikethrough")) {
1661
1661
  e & u && i.remove(...o);
1662
1662
  continue;
1663
1663
  }
1664
- e & u && (!c || a !== "underline") && a !== "strikethrough" || i.add(...o);
1664
+ e & u && (!a || c !== "underline") && c !== "strikethrough" || i.add(...o);
1665
1665
  } else e & u && i.remove(...o);
1666
1666
  }
1667
1667
  }
@@ -1671,14 +1671,14 @@ function Ss(n, e, t) {
1671
1671
  else {
1672
1672
  const o = r.nodeValue;
1673
1673
  if (o !== i) if (s || xe) {
1674
- const [l, c, a] = function(u, h) {
1674
+ const [l, a, c] = function(u, h) {
1675
1675
  const f = u.length, d = h.length;
1676
1676
  let g = 0, p = 0;
1677
1677
  for (; g < f && g < d && u[g] === h[g]; ) g++;
1678
1678
  for (; p + g < f && p + g < d && u[f - p - 1] === h[d - p - 1]; ) p++;
1679
1679
  return [g, f - g - p, h.slice(g, d - p)];
1680
1680
  }(o, i);
1681
- c !== 0 && r.deleteData(l, c), r.insertData(l, a);
1681
+ a !== 0 && r.deleteData(l, a), r.insertData(l, c);
1682
1682
  } else r.nodeValue = i;
1683
1683
  }
1684
1684
  }
@@ -1733,7 +1733,7 @@ class ze extends Vt {
1733
1733
  return !!(2 & this.getLatest().__detail);
1734
1734
  }
1735
1735
  hasFormat(e) {
1736
- const t = ce[e];
1736
+ const t = ae[e];
1737
1737
  return !!(this.getFormat() & t);
1738
1738
  }
1739
1739
  isSimpleText() {
@@ -1749,23 +1749,23 @@ class ze extends Vt {
1749
1749
  return !0;
1750
1750
  }
1751
1751
  createDOM(e, t) {
1752
- const r = this.__format, s = ln(0, r), i = cn(0, r), o = s === null ? i : s, l = document.createElement(o);
1753
- let c = l;
1754
- this.hasFormat("code") && l.setAttribute("spellcheck", "false"), s !== null && (c = document.createElement(i), l.appendChild(c)), vr(c, this, 0, r, this.__text, e);
1755
- const a = this.__style;
1756
- return a !== "" && (l.style.cssText = a), l;
1752
+ const r = this.__format, s = ln(0, r), i = an(0, r), o = s === null ? i : s, l = document.createElement(o);
1753
+ let a = l;
1754
+ this.hasFormat("code") && l.setAttribute("spellcheck", "false"), s !== null && (a = document.createElement(i), l.appendChild(a)), vr(a, this, 0, r, this.__text, e);
1755
+ const c = this.__style;
1756
+ return c !== "" && (l.style.cssText = c), l;
1757
1757
  }
1758
1758
  updateDOM(e, t, r) {
1759
- const s = this.__text, i = e.__format, o = this.__format, l = ln(0, i), c = ln(0, o), a = cn(0, i), u = cn(0, o);
1760
- if ((l === null ? a : l) !== (c === null ? u : c)) return !0;
1761
- if (l === c && a !== u) {
1759
+ const s = this.__text, i = e.__format, o = this.__format, l = ln(0, i), a = ln(0, o), c = an(0, i), u = an(0, o);
1760
+ if ((l === null ? c : l) !== (a === null ? u : a)) return !0;
1761
+ if (l === a && c !== u) {
1762
1762
  const p = t.firstChild;
1763
1763
  p == null && b(48);
1764
1764
  const _ = document.createElement(u);
1765
1765
  return vr(_, this, 0, o, s, r), t.replaceChild(_, p), !1;
1766
1766
  }
1767
1767
  let h = t;
1768
- c !== null && l !== null && (h = t.firstChild, h == null && b(49)), Ss(s, h, this);
1768
+ a !== null && l !== null && (h = t.firstChild, h == null && b(49)), Ss(s, h, this);
1769
1769
  const f = r.theme.text;
1770
1770
  f !== void 0 && i !== o && vs(0, i, o, h, f);
1771
1771
  const d = e.__style, g = this.__style;
@@ -1789,11 +1789,11 @@ class ze extends Vt {
1789
1789
  }
1790
1790
  setFormat(e) {
1791
1791
  const t = this.getWritable();
1792
- return t.__format = typeof e == "string" ? ce[e] : e, t;
1792
+ return t.__format = typeof e == "string" ? ae[e] : e, t;
1793
1793
  }
1794
1794
  setDetail(e) {
1795
1795
  const t = this.getWritable();
1796
- return t.__detail = typeof e == "string" ? ci[e] : e, t;
1796
+ return t.__detail = typeof e == "string" ? ai[e] : e, t;
1797
1797
  }
1798
1798
  setStyle(e) {
1799
1799
  const t = this.getWritable();
@@ -1827,13 +1827,13 @@ class ze extends Vt {
1827
1827
  let r = e, s = t;
1828
1828
  const i = I(), o = this.getTextContent(), l = this.__key;
1829
1829
  if (typeof o == "string") {
1830
- const c = o.length;
1831
- r === void 0 && (r = c), s === void 0 && (s = c);
1830
+ const a = o.length;
1831
+ r === void 0 && (r = a), s === void 0 && (s = a);
1832
1832
  } else r = 0, s = 0;
1833
1833
  if (!F(i)) return ks(l, r, l, s, "text", "text");
1834
1834
  {
1835
- const c = ye();
1836
- c !== i.anchor.key && c !== i.focus.key || $(l), i.setTextNodeRange(this, r, this, s);
1835
+ const a = ye();
1836
+ a !== i.anchor.key && a !== i.focus.key || $(l), i.setTextNodeRange(this, r, this, s);
1837
1837
  }
1838
1838
  return i;
1839
1839
  }
@@ -1846,14 +1846,14 @@ class ze extends Vt {
1846
1846
  }
1847
1847
  spliceText(e, t, r, s) {
1848
1848
  const i = this.getWritable(), o = i.__text, l = r.length;
1849
- let c = e;
1850
- c < 0 && (c = l + c, c < 0 && (c = 0));
1851
- const a = I();
1852
- if (s && F(a)) {
1849
+ let a = e;
1850
+ a < 0 && (a = l + a, a < 0 && (a = 0));
1851
+ const c = I();
1852
+ if (s && F(c)) {
1853
1853
  const h = e + l;
1854
- a.setTextNodeRange(i, h, i, h);
1854
+ c.setTextNodeRange(i, h, i, h);
1855
1855
  }
1856
- const u = o.slice(0, c) + r + o.slice(c + t);
1856
+ const u = o.slice(0, a) + r + o.slice(a + t);
1857
1857
  return i.__text = u, i;
1858
1858
  }
1859
1859
  canInsertTextBefore() {
@@ -1864,10 +1864,10 @@ class ze extends Vt {
1864
1864
  }
1865
1865
  splitText(...e) {
1866
1866
  q();
1867
- const t = this.getLatest(), r = t.getTextContent(), s = t.__key, i = ye(), o = new Set(e), l = [], c = r.length;
1868
- let a = "";
1869
- for (let T = 0; T < c; T++) a !== "" && o.has(T) && (l.push(a), a = ""), a += r[T];
1870
- a !== "" && l.push(a);
1867
+ const t = this.getLatest(), r = t.getTextContent(), s = t.__key, i = ye(), o = new Set(e), l = [], a = r.length;
1868
+ let c = "";
1869
+ for (let T = 0; T < a; T++) c !== "" && o.has(T) && (l.push(c), c = ""), c += r[T];
1870
+ c !== "" && l.push(c);
1871
1871
  const u = l.length;
1872
1872
  if (u === 0) return [];
1873
1873
  if (l[0] === r) return [t];
@@ -1908,8 +1908,8 @@ class ze extends Vt {
1908
1908
  const h = l.anchor, f = l.focus;
1909
1909
  h !== null && h.key === s && (Dr(h, t, r, e, o), l.dirty = !0), f !== null && f.key === s && (Dr(f, t, r, e, o), l.dirty = !0);
1910
1910
  }
1911
- const c = e.__text, a = t ? c + i : i + c;
1912
- this.setTextContent(a);
1911
+ const a = e.__text, c = t ? a + i : i + a;
1912
+ this.setTextContent(c);
1913
1913
  const u = this.getWritable();
1914
1914
  return e.remove(), u;
1915
1915
  }
@@ -1937,7 +1937,7 @@ function Wi(n) {
1937
1937
  const o = [r];
1938
1938
  for (; i !== null && (s = Sr.get(i)) === void 0 && !zi(i); ) o.push(i), i = i.parentNode;
1939
1939
  const l = s === void 0 ? i : s;
1940
- for (let c = 0; c < o.length; c++) Sr.set(o[c], l);
1940
+ for (let a = 0; a < o.length; a++) Sr.set(o[a], l);
1941
1941
  return l;
1942
1942
  }(e) !== null) {
1943
1943
  const r = t.split(/(\r?\n|\t)/), s = [], i = r.length;
@@ -2003,8 +2003,8 @@ function N(n) {
2003
2003
  return n instanceof ze;
2004
2004
  }
2005
2005
  function $n(n, e) {
2006
- const t = n.fontWeight, r = n.textDecoration.split(" "), s = t === "700" || t === "bold", i = r.includes("line-through"), o = n.fontStyle === "italic", l = r.includes("underline"), c = n.verticalAlign;
2007
- return (a) => (N(a) && (s && !a.hasFormat("bold") && a.toggleFormat("bold"), i && !a.hasFormat("strikethrough") && a.toggleFormat("strikethrough"), o && !a.hasFormat("italic") && a.toggleFormat("italic"), l && !a.hasFormat("underline") && a.toggleFormat("underline"), c !== "sub" || a.hasFormat("subscript") || a.toggleFormat("subscript"), c !== "super" || a.hasFormat("superscript") || a.toggleFormat("superscript"), e && !a.hasFormat(e) && a.toggleFormat(e)), a);
2006
+ const t = n.fontWeight, r = n.textDecoration.split(" "), s = t === "700" || t === "bold", i = r.includes("line-through"), o = n.fontStyle === "italic", l = r.includes("underline"), a = n.verticalAlign;
2007
+ return (c) => (N(c) && (s && !c.hasFormat("bold") && c.toggleFormat("bold"), i && !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);
2008
2008
  }
2009
2009
  class it extends ze {
2010
2010
  static getType() {
@@ -2083,7 +2083,7 @@ class Ki {
2083
2083
  function ie(n, e, t) {
2084
2084
  return new Ki(n, e, t);
2085
2085
  }
2086
- function an(n, e) {
2086
+ function cn(n, e) {
2087
2087
  let t = e.__key, r = n.offset, s = "element";
2088
2088
  if (N(e)) {
2089
2089
  s = "text";
@@ -2102,8 +2102,8 @@ function an(n, e) {
2102
2102
  function Cr(n, e) {
2103
2103
  if (v(e)) {
2104
2104
  const t = e.getLastDescendant();
2105
- v(t) || N(t) ? an(n, t) : an(n, e);
2106
- } else an(n, e);
2105
+ v(t) || N(t) ? cn(n, t) : cn(n, e);
2106
+ } else cn(n, e);
2107
2107
  }
2108
2108
  function pe(n, e, t, r) {
2109
2109
  n.key = e, n.offset = t, n.type = r;
@@ -2205,18 +2205,18 @@ class Ce {
2205
2205
  const e = this._cachedNodes;
2206
2206
  if (e !== null) return e;
2207
2207
  const t = this.anchor, r = this.focus, s = t.isBefore(r), i = s ? t : r, o = s ? r : t;
2208
- let l = i.getNode(), c = o.getNode();
2209
- const a = i.offset, u = o.offset;
2208
+ let l = i.getNode(), a = o.getNode();
2209
+ const c = i.offset, u = o.offset;
2210
2210
  if (v(l)) {
2211
- const f = l.getDescendantByIndex(a);
2211
+ const f = l.getDescendantByIndex(c);
2212
2212
  l = f ?? l;
2213
2213
  }
2214
- if (v(c)) {
2215
- let f = c.getDescendantByIndex(u);
2216
- f !== null && f !== l && c.getChildAtIndex(u) === f && (f = f.getPreviousSibling()), c = f ?? c;
2214
+ if (v(a)) {
2215
+ let f = a.getDescendantByIndex(u);
2216
+ f !== null && f !== l && a.getChildAtIndex(u) === f && (f = f.getPreviousSibling()), a = f ?? a;
2217
2217
  }
2218
2218
  let h;
2219
- return h = l.is(c) ? v(l) && l.getChildrenSize() > 0 ? [] : [l] : l.getNodesBetween(c), lt() || (this._cachedNodes = h), h;
2219
+ return h = l.is(a) ? v(l) && l.getChildrenSize() > 0 ? [] : [l] : l.getNodesBetween(a), lt() || (this._cachedNodes = h), h;
2220
2220
  }
2221
2221
  setTextNodeRange(e, t, r, s) {
2222
2222
  pe(this.anchor, e.__key, t, "text"), pe(this.focus, r.__key, s, "text"), this._cachedNodes = null, this.dirty = !0;
@@ -2224,18 +2224,18 @@ class Ce {
2224
2224
  getTextContent() {
2225
2225
  const e = this.getNodes();
2226
2226
  if (e.length === 0) return "";
2227
- const t = e[0], r = e[e.length - 1], s = this.anchor, i = this.focus, o = s.isBefore(i), [l, c] = br(this);
2228
- let a = "", u = !0;
2227
+ const t = e[0], r = e[e.length - 1], s = this.anchor, i = this.focus, o = s.isBefore(i), [l, a] = br(this);
2228
+ let c = "", u = !0;
2229
2229
  for (let h = 0; h < e.length; h++) {
2230
2230
  const f = e[h];
2231
- if (v(f) && !f.isInline()) u || (a += `
2231
+ if (v(f) && !f.isInline()) u || (c += `
2232
2232
  `), u = !f.isEmpty();
2233
2233
  else if (u = !1, N(f)) {
2234
2234
  let d = f.getTextContent();
2235
- f === t ? f === r ? s.type === "element" && i.type === "element" && i.offset !== s.offset || (d = l < c ? d.slice(l, c) : d.slice(c, l)) : d = o ? d.slice(l) : d.slice(c) : f === r && (d = o ? d.slice(0, c) : d.slice(0, l)), a += d;
2236
- } else !A(f) && !Ae(f) || f === r && this.isCollapsed() || (a += f.getTextContent());
2235
+ f === t ? f === r ? s.type === "element" && i.type === "element" && i.offset !== s.offset || (d = l < a ? d.slice(l, a) : d.slice(a, l)) : d = o ? d.slice(l) : d.slice(a) : f === r && (d = o ? d.slice(0, a) : d.slice(0, l)), c += d;
2236
+ } else !A(f) && !Ae(f) || f === r && this.isCollapsed() || (c += f.getTextContent());
2237
2237
  }
2238
- return a;
2238
+ return c;
2239
2239
  }
2240
2240
  applyDOMRange(e) {
2241
2241
  const t = M(), r = t.getEditorState()._selection, s = Cs(e.startContainer, e.startOffset, e.endContainer, e.endOffset, t, r);
@@ -2254,7 +2254,7 @@ class Ce {
2254
2254
  this.style = e, this.dirty = !0;
2255
2255
  }
2256
2256
  hasFormat(e) {
2257
- const t = ce[e];
2257
+ const t = ae[e];
2258
2258
  return !!(this.format & t);
2259
2259
  }
2260
2260
  insertRawText(e) {
@@ -2274,20 +2274,20 @@ class Ce {
2274
2274
  const k = _.getNode(), T = k.getChildAtIndex(_.offset), x = J(), P = Y(k) ? ve().append(x) : x;
2275
2275
  x.setFormat(y), x.setStyle(S), T === null ? k.append(P) : T.insertBefore(P), _.is(m) && m.set(x.__key, 0, "text"), _.set(x.__key, 0, "text");
2276
2276
  }(o, l, s, i);
2277
- const c = o.offset;
2278
- let a = l.offset;
2277
+ const a = o.offset;
2278
+ let c = l.offset;
2279
2279
  const u = this.getNodes(), h = u.length;
2280
2280
  let f = u[0];
2281
2281
  N(f) || b(26);
2282
2282
  const d = f.getTextContent().length, g = f.getParentOrThrow();
2283
2283
  let p = u[h - 1];
2284
- if (h === 1 && l.type === "element" && (a = d, l.set(o.key, a, "text")), this.isCollapsed() && c === d && (f.isSegmented() || f.isToken() || !f.canInsertTextAfter() || !g.canInsertTextAfter() && f.getNextSibling() === null)) {
2284
+ if (h === 1 && l.type === "element" && (c = d, l.set(o.key, c, "text")), this.isCollapsed() && a === d && (f.isSegmented() || f.isToken() || !f.canInsertTextAfter() || !g.canInsertTextAfter() && f.getNextSibling() === null)) {
2285
2285
  let _ = f.getNextSibling();
2286
2286
  if (N(_) && _.canInsertTextBefore() && !be(_) || (_ = J(), _.setFormat(s), _.setStyle(i), g.canInsertTextAfter() ? f.insertAfter(_) : g.insertAfter(_)), _.select(0, 0), f = _, e !== "") return void this.insertText(e);
2287
- } else if (this.isCollapsed() && c === 0 && (f.isSegmented() || f.isToken() || !f.canInsertTextBefore() || !g.canInsertTextBefore() && f.getPreviousSibling() === null)) {
2287
+ } else if (this.isCollapsed() && a === 0 && (f.isSegmented() || f.isToken() || !f.canInsertTextBefore() || !g.canInsertTextBefore() && f.getPreviousSibling() === null)) {
2288
2288
  let _ = f.getPreviousSibling();
2289
2289
  if (N(_) && !be(_) || (_ = J(), _.setFormat(s), g.canInsertTextBefore() ? f.insertBefore(_) : g.insertBefore(_)), _.select(), f = _, e !== "") return void this.insertText(e);
2290
- } else if (f.isSegmented() && c !== d) {
2290
+ } else if (f.isSegmented() && a !== d) {
2291
2291
  const _ = J(f.getTextContent());
2292
2292
  _.setFormat(s), f.replace(_), f = _;
2293
2293
  } else if (!this.isCollapsed() && e !== "") {
@@ -2300,7 +2300,7 @@ class Ce {
2300
2300
  return S.select(), void f.replace(S);
2301
2301
  }
2302
2302
  const _ = f.getFormat(), m = f.getStyle();
2303
- if (c !== a || _ === s && m === i) {
2303
+ if (a !== c || _ === s && m === i) {
2304
2304
  if (Ri(f)) {
2305
2305
  const S = J(e);
2306
2306
  return S.setFormat(s), S.setStyle(i), S.select(), void f.replace(S);
@@ -2308,29 +2308,29 @@ class Ce {
2308
2308
  } else {
2309
2309
  if (f.getTextContent() !== "") {
2310
2310
  const S = J(e);
2311
- if (S.setFormat(s), S.setStyle(i), S.select(), c === 0) f.insertBefore(S, !1);
2311
+ if (S.setFormat(s), S.setStyle(i), S.select(), a === 0) f.insertBefore(S, !1);
2312
2312
  else {
2313
- const [k] = f.splitText(c);
2313
+ const [k] = f.splitText(a);
2314
2314
  k.insertAfter(S, !1);
2315
2315
  }
2316
2316
  return void (S.isComposing() && this.anchor.type === "text" && (this.anchor.offset -= e.length));
2317
2317
  }
2318
2318
  f.setFormat(s), f.setStyle(i);
2319
2319
  }
2320
- const y = a - c;
2321
- f = f.spliceText(c, y, e, !0), f.getTextContent() === "" ? f.remove() : this.anchor.type === "text" && (f.isComposing() ? this.anchor.offset -= e.length : (this.format = _, this.style = m));
2320
+ const y = c - a;
2321
+ f = f.spliceText(a, y, e, !0), f.getTextContent() === "" ? f.remove() : this.anchor.type === "text" && (f.isComposing() ? this.anchor.offset -= e.length : (this.format = _, this.style = m));
2322
2322
  } else {
2323
2323
  const _ = /* @__PURE__ */ new Set([...f.getParentKeys(), ...p.getParentKeys()]), m = v(f) ? f : f.getParentOrThrow();
2324
2324
  let y = v(p) ? p : p.getParentOrThrow(), S = p;
2325
2325
  if (!m.is(y) && y.isInline()) do
2326
2326
  S = y, y = y.getParentOrThrow();
2327
2327
  while (y.isInline());
2328
- if (l.type === "text" && (a !== 0 || p.getTextContent() === "") || l.type === "element" && p.getIndexWithinParent() < a) if (N(p) && !p.isToken() && a !== p.getTextContentSize()) {
2328
+ if (l.type === "text" && (c !== 0 || p.getTextContent() === "") || l.type === "element" && p.getIndexWithinParent() < c) if (N(p) && !p.isToken() && c !== p.getTextContentSize()) {
2329
2329
  if (p.isSegmented()) {
2330
2330
  const C = J(p.getTextContent());
2331
2331
  p.replace(C), p = C;
2332
2332
  }
2333
- Y(l.getNode()) || l.type !== "text" || (p = p.spliceText(0, a, "")), _.add(p.__key);
2333
+ Y(l.getNode()) || l.type !== "text" || (p = p.spliceText(0, c, "")), _.add(p.__key);
2334
2334
  } else {
2335
2335
  const C = p.getParentOrThrow();
2336
2336
  C.canBeEmpty() || C.getChildrenSize() !== 1 ? p.remove() : C.remove();
@@ -2349,12 +2349,12 @@ class Ce {
2349
2349
  (O === 0 || D[O - 1].is(E)) && (_.delete(C.__key), E = C), C = C.getParent();
2350
2350
  }
2351
2351
  }
2352
- if (f.isToken()) if (c === d) f.select();
2352
+ if (f.isToken()) if (a === d) f.select();
2353
2353
  else {
2354
2354
  const C = J(e);
2355
2355
  C.select(), f.replace(C);
2356
2356
  }
2357
- else f = f.spliceText(c, d - c, e, !0), f.getTextContent() === "" ? f.remove() : f.isComposing() && this.anchor.type === "text" && (this.anchor.offset -= e.length);
2357
+ else f = f.spliceText(a, d - a, e, !0), f.getTextContent() === "" ? f.remove() : f.isComposing() && this.anchor.type === "text" && (this.anchor.offset -= e.length);
2358
2358
  for (let C = 1; C < h; C++) {
2359
2359
  const E = u[C], D = E.__key;
2360
2360
  _.has(D) || E.remove();
@@ -2365,7 +2365,7 @@ class Ce {
2365
2365
  if (this.isCollapsed()) return;
2366
2366
  const { anchor: e, focus: t } = this, r = this.getNodes(), s = this.isBackward() ? t : e, i = this.isBackward() ? e : t;
2367
2367
  let o = s.getNode(), l = i.getNode();
2368
- const c = $e(o, _e), a = $e(l, _e);
2368
+ const a = $e(o, _e), c = $e(l, _e);
2369
2369
  N(o) && o.isToken() && s.offset < o.getTextContentSize() && (s.offset = 0), i.offset > 0 && N(l) && l.isToken() && (i.offset = l.getTextContentSize()), r.forEach((h) => {
2370
2370
  Qe(o, h) || Qe(l, h) || h.getKey() === o.getKey() || h.getKey() === l.getKey() || h.remove();
2371
2371
  });
@@ -2384,7 +2384,7 @@ class Ce {
2384
2384
  const h = o.getTextContentSize() - s.offset;
2385
2385
  o.spliceText(s.offset, h, ""), o = u(o, h) || o;
2386
2386
  }
2387
- N(l) && (l.spliceText(0, i.offset, ""), l = u(l, i.offset) || l), o.isAttached() && N(o) ? o.selectEnd() : l.isAttached() && N(l) && l.selectStart(), v(c) && v(a) && c !== a && (c.append(...a.getChildren()), a.remove(), i.set(s.key, s.offset, s.type));
2387
+ N(l) && (l.spliceText(0, i.offset, ""), l = u(l, i.offset) || l), o.isAttached() && N(o) ? o.selectEnd() : l.isAttached() && N(l) && l.selectStart(), v(a) && v(c) && a !== c && (a.append(...c.getChildren()), c.remove(), i.set(s.key, s.offset, s.type));
2388
2388
  }
2389
2389
  formatText(e, t = null) {
2390
2390
  if (this.isCollapsed()) return this.toggleFormat(e), void $(null);
@@ -2399,7 +2399,7 @@ class Ce {
2399
2399
  });
2400
2400
  }, o = s.length;
2401
2401
  if (o === 0) return this.toggleFormat(e), $(null), void i(t);
2402
- const l = this.anchor, c = this.focus, a = this.isBackward(), u = a ? c : l, h = a ? l : c;
2402
+ const l = this.anchor, a = this.focus, c = this.isBackward(), u = c ? a : l, h = c ? l : a;
2403
2403
  let f = 0, d = s[0], g = u.type === "element" ? 0 : u.offset;
2404
2404
  if (u.type === "text" && g === d.getTextContentSize() && (f = 1, d = s[1], g = 0), d == null) return;
2405
2405
  const p = d.getFormatFlags(e, t);
@@ -2457,7 +2457,7 @@ class Ce {
2457
2457
  } else p.append(y), _ = null;
2458
2458
  }
2459
2459
  return p;
2460
- }(e), o = i.getLastDescendant(), l = i.getChildren(), c = !v(r) || !r.isEmpty() ? this.insertParagraph() : null, a = l[l.length - 1];
2460
+ }(e), o = i.getLastDescendant(), l = i.getChildren(), a = !v(r) || !r.isEmpty() ? this.insertParagraph() : null, c = l[l.length - 1];
2461
2461
  let u = l[0];
2462
2462
  var h;
2463
2463
  v(h = u) && _e(h) && !h.isEmpty() && v(r) && (!r.isEmpty() || r.canMergeWhenEmpty()) && (v(r) || b(211, t.constructor.name, t.getType()), r.append(...u.getChildren()), u = l[1]), u && (r === null && b(212, t.constructor.name, t.getType()), function(g, p, _) {
@@ -2469,7 +2469,7 @@ class Ce {
2469
2469
  for (const T of S) k = k.insertAfter(T);
2470
2470
  }(r, u));
2471
2471
  const f = $e(o, _e);
2472
- c && v(f) && (c.canMergeWhenEmpty() || _e(a)) && (f.append(...c.getChildren()), c.remove()), v(r) && r.isEmpty() && r.remove(), o.selectEnd();
2472
+ a && v(f) && (a.canMergeWhenEmpty() || _e(c)) && (f.append(...a.getChildren()), a.remove()), v(r) && r.isEmpty() && r.remove(), o.selectEnd();
2473
2473
  const d = v(r) ? r.getLastChild() : null;
2474
2474
  Ae(d) && f !== r && d.remove();
2475
2475
  }
@@ -2493,22 +2493,22 @@ class Ce {
2493
2493
  extract() {
2494
2494
  const e = this.getNodes(), t = e.length, r = t - 1, s = this.anchor, i = this.focus;
2495
2495
  let o = e[0], l = e[r];
2496
- const [c, a] = br(this);
2496
+ const [a, c] = br(this);
2497
2497
  if (t === 0) return [];
2498
2498
  if (t === 1) {
2499
2499
  if (N(o) && !this.isCollapsed()) {
2500
- const h = c > a ? a : c, f = c > a ? c : a, d = o.splitText(h, f), g = h === 0 ? d[0] : d[1];
2500
+ const h = a > c ? c : a, f = a > c ? a : c, d = o.splitText(h, f), g = h === 0 ? d[0] : d[1];
2501
2501
  return g != null ? [g] : [];
2502
2502
  }
2503
2503
  return [o];
2504
2504
  }
2505
2505
  const u = s.isBefore(i);
2506
2506
  if (N(o)) {
2507
- const h = u ? c : a;
2507
+ const h = u ? a : c;
2508
2508
  h === o.getTextContentSize() ? e.shift() : h !== 0 && ([, o] = o.splitText(h), e[0] = o);
2509
2509
  }
2510
2510
  if (N(l)) {
2511
- const h = l.getTextContent().length, f = u ? a : c;
2511
+ const h = l.getTextContent().length, f = u ? c : a;
2512
2512
  f === 0 ? e.pop() : f !== h && ([l] = l.splitText(f), e[r] = l);
2513
2513
  }
2514
2514
  return e;
@@ -2531,13 +2531,13 @@ class Ce {
2531
2531
  return v(f) ? (p = f.__key, g = t ? f.getChildrenSize() : 0) : (g = l.getIndexWithinParent(), p = d.__key, t || g++), s.set(p, g, "element"), void (o && i.set(p, g, "element"));
2532
2532
  }
2533
2533
  }
2534
- const c = M(), a = se(c._window);
2535
- if (!a) return;
2536
- const u = c._blockCursorElement, h = c._rootElement;
2537
- if (h === null || u === null || !v(l) || l.isInline() || l.canBeEmpty() || Jn(u, c, h), function(f, d, g, p) {
2534
+ const a = M(), c = se(a._window);
2535
+ if (!c) return;
2536
+ const u = a._blockCursorElement, h = a._rootElement;
2537
+ if (h === null || u === null || !v(l) || l.isInline() || l.canBeEmpty() || Jn(u, a, h), function(f, d, g, p) {
2538
2538
  f.modify(d, g, p);
2539
- }(a, e, t ? "backward" : "forward", r), a.rangeCount > 0) {
2540
- const f = a.getRangeAt(0), d = this.anchor.getNode(), g = Y(d) ? d : Ti(d);
2539
+ }(c, e, t ? "backward" : "forward", r), c.rangeCount > 0) {
2540
+ const f = c.getRangeAt(0), d = this.anchor.getNode(), g = Y(d) ? d : Ti(d);
2541
2541
  if (this.applyDOMRange(f), this.dirty = !0, !o) {
2542
2542
  const p = this.getNodes(), _ = [];
2543
2543
  let m = !1;
@@ -2552,7 +2552,7 @@ class Ce {
2552
2552
  const y = _[_.length - 1];
2553
2553
  v(y) ? y.selectEnd() : y.getParentOrThrow().selectEnd();
2554
2554
  }
2555
- a.anchorNode === f.startContainer && a.anchorOffset === f.startOffset || function(y) {
2555
+ c.anchorNode === f.startContainer && c.anchorOffset === f.startOffset || function(y) {
2556
2556
  const S = y.focus, k = y.anchor, T = k.key, x = k.offset, P = k.type;
2557
2557
  pe(k, S.key, S.offset, S.type), pe(S, T, x, P), y._cachedNodes = null;
2558
2558
  }(this);
@@ -2589,17 +2589,17 @@ class Ce {
2589
2589
  } else {
2590
2590
  const l = i.type === "text" ? i.getNode() : null;
2591
2591
  if (s = r.type === "text" ? r.getNode() : null, l !== null && l.isSegmented()) {
2592
- const c = i.offset, a = l.getTextContentSize();
2593
- if (l.is(s) || e && c !== a || !e && c !== 0) return void wr(l, e, c);
2592
+ const a = i.offset, c = l.getTextContentSize();
2593
+ if (l.is(s) || e && a !== c || !e && a !== 0) return void wr(l, e, a);
2594
2594
  } else if (s !== null && s.isSegmented()) {
2595
- const c = r.offset, a = s.getTextContentSize();
2596
- if (s.is(l) || e && c !== 0 || !e && c !== a) return void wr(s, e, c);
2595
+ const a = r.offset, c = s.getTextContentSize();
2596
+ if (s.is(l) || e && a !== 0 || !e && a !== c) return void wr(s, e, a);
2597
2597
  }
2598
- (function(c, a) {
2599
- const u = c.anchor, h = c.focus, f = u.getNode(), d = h.getNode();
2598
+ (function(a, c) {
2599
+ const u = a.anchor, h = a.focus, f = u.getNode(), d = h.getNode();
2600
2600
  if (f === d && u.type === "text" && h.type === "text") {
2601
2601
  const g = u.offset, p = h.offset, _ = g < p, m = _ ? g : p, y = _ ? p : g, S = y - 1;
2602
- m !== S && (ns(f.getTextContent().slice(m, y)) || (a ? h.offset = S : u.offset = S));
2602
+ m !== S && (ns(f.getTextContent().slice(m, y)) || (c ? h.offset = S : u.offset = S));
2603
2603
  }
2604
2604
  })(this, e);
2605
2605
  }
@@ -2652,27 +2652,27 @@ function br(n) {
2652
2652
  function wr(n, e, t) {
2653
2653
  const r = n, s = r.getTextContent().split(/(?=\s)/g), i = s.length;
2654
2654
  let o = 0, l = 0;
2655
- for (let a = 0; a < i; a++) {
2656
- const u = a === i - 1;
2657
- if (l = o, o += s[a].length, e && o === t || o > t || u) {
2658
- s.splice(a, 1), u && (l = void 0);
2655
+ for (let c = 0; c < i; c++) {
2656
+ const u = c === i - 1;
2657
+ if (l = o, o += s[c].length, e && o === t || o > t || u) {
2658
+ s.splice(c, 1), u && (l = void 0);
2659
2659
  break;
2660
2660
  }
2661
2661
  }
2662
- const c = s.join("").trim();
2663
- c === "" ? r.remove() : (r.setTextContent(c), r.select(l, l));
2662
+ const a = s.join("").trim();
2663
+ a === "" ? r.remove() : (r.setTextContent(a), r.select(l, l));
2664
2664
  }
2665
2665
  function Nr(n, e, t, r) {
2666
2666
  let s, i = e;
2667
2667
  if (n.nodeType === rt) {
2668
2668
  let o = !1;
2669
- const l = n.childNodes, c = l.length, a = r._blockCursorElement;
2670
- i === c && (o = !0, i = c - 1);
2669
+ const l = n.childNodes, a = l.length, c = r._blockCursorElement;
2670
+ i === a && (o = !0, i = a - 1);
2671
2671
  let u = l[i], h = !1;
2672
- if (u === a) u = l[i + 1], h = !0;
2673
- else if (a !== null) {
2674
- const f = a.parentNode;
2675
- n === f && e > Array.prototype.indexOf.call(f.children, a) && i--;
2672
+ if (u === c) u = l[i + 1], h = !0;
2673
+ else if (c !== null) {
2674
+ const f = c.parentNode;
2675
+ n === f && e > Array.prototype.indexOf.call(f.children, c) && i--;
2676
2676
  }
2677
2677
  if (s = Oe(u), N(s)) i = or(s, o);
2678
2678
  else {
@@ -2735,8 +2735,8 @@ function Cs(n, e, t, r, s, i) {
2735
2735
  const l = Nr(t, r, F(i) ? i.focus : null, s);
2736
2736
  if (l === null) return null;
2737
2737
  if (o.type === "element" && l.type === "element") {
2738
- const c = Oe(n), a = Oe(t);
2739
- if (A(c) && A(a)) return null;
2738
+ const a = Oe(n), c = Oe(t);
2739
+ if (A(a) && A(c)) return null;
2740
2740
  }
2741
2741
  return Ts(o, l, i), [o, l];
2742
2742
  }
@@ -2760,12 +2760,12 @@ function ho(n, e) {
2760
2760
  function qt(n, e, t, r) {
2761
2761
  const s = t._window;
2762
2762
  if (s === null) return null;
2763
- const i = r || s.event, o = i ? i.type : void 0, l = o === "selectionchange", c = !hn && (l || o === "beforeinput" || o === "compositionstart" || o === "compositionend" || o === "click" && i && i.detail === 3 || o === "drop" || o === void 0);
2764
- let a, u, h, f;
2765
- if (F(n) && !c) return n.clone();
2763
+ const i = r || s.event, o = i ? i.type : void 0, l = o === "selectionchange", a = !hn && (l || o === "beforeinput" || o === "compositionstart" || o === "compositionend" || o === "click" && i && i.detail === 3 || o === "drop" || o === void 0);
2764
+ let c, u, h, f;
2765
+ if (F(n) && !a) return n.clone();
2766
2766
  if (e === null) return null;
2767
- if (a = e.anchorNode, u = e.focusNode, h = e.anchorOffset, f = e.focusOffset, l && F(n) && !Mt(t, a, u)) return n.clone();
2768
- const d = Cs(a, h, u, f, t, n);
2767
+ if (c = e.anchorNode, u = e.focusNode, h = e.anchorOffset, f = e.focusOffset, l && F(n) && !Mt(t, c, u)) return n.clone();
2768
+ const d = Cs(c, h, u, f, t, n);
2769
2769
  if (d === null) return null;
2770
2770
  const [g, p] = d;
2771
2771
  return new Ce(g, p, F(n) ? n.format : 0, F(n) ? n.style : "");
@@ -2779,22 +2779,22 @@ function ot() {
2779
2779
  function Lt(n, e, t, r = 1) {
2780
2780
  const s = n.anchor, i = n.focus, o = s.getNode(), l = i.getNode();
2781
2781
  if (!e.is(o) && !e.is(l)) return;
2782
- const c = e.__key;
2782
+ const a = e.__key;
2783
2783
  if (n.isCollapsed()) {
2784
- const a = s.offset;
2785
- if (t <= a && r > 0 || t < a && r < 0) {
2786
- const u = Math.max(0, a + r);
2787
- s.set(c, u, "element"), i.set(c, u, "element"), Fr(n);
2784
+ const c = s.offset;
2785
+ if (t <= c && r > 0 || t < c && r < 0) {
2786
+ const u = Math.max(0, c + r);
2787
+ s.set(a, u, "element"), i.set(a, u, "element"), Fr(n);
2788
2788
  }
2789
2789
  } else {
2790
- const a = n.isBackward(), u = a ? i : s, h = u.getNode(), f = a ? s : i, d = f.getNode();
2790
+ const c = n.isBackward(), u = c ? i : s, h = u.getNode(), f = c ? s : i, d = f.getNode();
2791
2791
  if (e.is(h)) {
2792
2792
  const g = u.offset;
2793
- (t <= g && r > 0 || t < g && r < 0) && u.set(c, Math.max(0, g + r), "element");
2793
+ (t <= g && r > 0 || t < g && r < 0) && u.set(a, Math.max(0, g + r), "element");
2794
2794
  }
2795
2795
  if (e.is(d)) {
2796
2796
  const g = f.offset;
2797
- (t <= g && r > 0 || t < g && r < 0) && f.set(c, Math.max(0, g + r), "element");
2797
+ (t <= g && r > 0 || t < g && r < 0) && f.set(a, Math.max(0, g + r), "element");
2798
2798
  }
2799
2799
  }
2800
2800
  Fr(n);
@@ -2803,24 +2803,24 @@ function Fr(n) {
2803
2803
  const e = n.anchor, t = e.offset, r = n.focus, s = r.offset, i = e.getNode(), o = r.getNode();
2804
2804
  if (n.isCollapsed()) {
2805
2805
  if (!v(i)) return;
2806
- const l = i.getChildrenSize(), c = t >= l, a = c ? i.getChildAtIndex(l - 1) : i.getChildAtIndex(t);
2807
- if (N(a)) {
2806
+ const l = i.getChildrenSize(), a = t >= l, c = a ? i.getChildAtIndex(l - 1) : i.getChildAtIndex(t);
2807
+ if (N(c)) {
2808
2808
  let u = 0;
2809
- c && (u = a.getTextContentSize()), e.set(a.__key, u, "text"), r.set(a.__key, u, "text");
2809
+ a && (u = c.getTextContentSize()), e.set(c.__key, u, "text"), r.set(c.__key, u, "text");
2810
2810
  }
2811
2811
  } else {
2812
2812
  if (v(i)) {
2813
- const l = i.getChildrenSize(), c = t >= l, a = c ? i.getChildAtIndex(l - 1) : i.getChildAtIndex(t);
2814
- if (N(a)) {
2813
+ const l = i.getChildrenSize(), a = t >= l, c = a ? i.getChildAtIndex(l - 1) : i.getChildAtIndex(t);
2814
+ if (N(c)) {
2815
2815
  let u = 0;
2816
- c && (u = a.getTextContentSize()), e.set(a.__key, u, "text");
2816
+ a && (u = c.getTextContentSize()), e.set(c.__key, u, "text");
2817
2817
  }
2818
2818
  }
2819
2819
  if (v(o)) {
2820
- const l = o.getChildrenSize(), c = s >= l, a = c ? o.getChildAtIndex(l - 1) : o.getChildAtIndex(s);
2821
- if (N(a)) {
2820
+ const l = o.getChildrenSize(), a = s >= l, c = a ? o.getChildAtIndex(l - 1) : o.getChildAtIndex(s);
2821
+ if (N(c)) {
2822
2822
  let u = 0;
2823
- c && (u = a.getTextContentSize()), r.set(a.__key, u, "text");
2823
+ a && (u = c.getTextContentSize()), r.set(c.__key, u, "text");
2824
2824
  }
2825
2825
  }
2826
2826
  }
@@ -2833,9 +2833,9 @@ function Dr(n, e, t, r, s) {
2833
2833
  n.type === "text" ? (n.key = t, e || (n.offset += s)) : n.offset > r.getIndexWithinParent() && (n.offset -= 1);
2834
2834
  }
2835
2835
  function Ji(n, e, t, r, s, i, o) {
2836
- const l = r.anchorNode, c = r.focusNode, a = r.anchorOffset, u = r.focusOffset, h = document.activeElement;
2836
+ const l = r.anchorNode, a = r.focusNode, c = r.anchorOffset, u = r.focusOffset, h = document.activeElement;
2837
2837
  if (s.has("collaboration") && h !== i || h !== null && Xr(h)) return;
2838
- if (!F(e)) return void (n !== null && Mt(t, l, c) && r.removeAllRanges());
2838
+ if (!F(e)) return void (n !== null && Mt(t, l, a) && r.removeAllRanges());
2839
2839
  const f = e.anchor, d = e.focus, g = f.key, p = d.key, _ = Nt(t, g), m = Nt(t, p), y = f.offset, S = d.offset, k = e.format, T = e.style, x = e.isCollapsed();
2840
2840
  let P = _, C = m, E = !1;
2841
2841
  if (f.type === "text") {
@@ -2844,7 +2844,7 @@ function Ji(n, e, t, r, s, i, o) {
2844
2844
  E = W.getFormat() !== k || W.getStyle() !== T;
2845
2845
  } else F(n) && n.anchor.type === "text" && (E = !0);
2846
2846
  var D, O, z, L, U;
2847
- if (d.type === "text" && (C = kt(m)), P !== null && C !== null && (x && (n === null || E || F(n) && (n.format !== k || n.style !== T)) && (D = k, O = T, z = y, L = g, U = performance.now(), _s = [D, O, z, L, U]), a !== y || u !== S || l !== P || c !== C || r.type === "Range" && x || (h !== null && i.contains(h) || i.focus({ preventScroll: !0 }), f.type === "element"))) {
2847
+ if (d.type === "text" && (C = kt(m)), P !== null && C !== null && (x && (n === null || E || F(n) && (n.format !== k || n.style !== T)) && (D = k, O = T, z = y, L = g, U = performance.now(), _s = [D, O, z, L, U]), c !== y || u !== S || l !== P || a !== C || r.type === "Range" && x || (h !== null && i.contains(h) || i.focus({ preventScroll: !0 }), f.type === "element"))) {
2848
2848
  try {
2849
2849
  r.setBaseAndExtent(P, y, C, S);
2850
2850
  } catch {
@@ -2860,16 +2860,16 @@ function Ji(n, e, t, r, s, i, o) {
2860
2860
  (function(De, Be, Hn) {
2861
2861
  const qn = Hn.ownerDocument, Qn = qn.defaultView;
2862
2862
  if (Qn === null) return;
2863
- let { top: Zt, bottom: Gt } = Be, at = 0, ut = 0, he = Hn;
2863
+ let { top: Zt, bottom: Gt } = Be, ct = 0, ut = 0, he = Hn;
2864
2864
  for (; he !== null; ) {
2865
2865
  const en = he === qn.body;
2866
- if (en) at = 0, ut = Kt(De).innerHeight;
2866
+ if (en) ct = 0, ut = Kt(De).innerHeight;
2867
2867
  else {
2868
2868
  const ft = he.getBoundingClientRect();
2869
- at = ft.top, ut = ft.bottom;
2869
+ ct = ft.top, ut = ft.bottom;
2870
2870
  }
2871
2871
  let Re = 0;
2872
- if (Zt < at ? Re = -(at - Zt) : Gt > ut && (Re = Gt - ut), Re !== 0) if (en) Qn.scrollBy(0, Re);
2872
+ if (Zt < ct ? Re = -(ct - Zt) : Gt > ut && (Re = Gt - ut), Re !== 0) if (en) Qn.scrollBy(0, Re);
2873
2873
  else {
2874
2874
  const ft = he.scrollTop;
2875
2875
  he.scrollTop += Re;
@@ -2954,9 +2954,9 @@ function Ui() {
2954
2954
  return K;
2955
2955
  }
2956
2956
  function Or(n, e, t) {
2957
- const r = e.__type, s = function(l, c) {
2958
- const a = l._nodes.get(c);
2959
- return a === void 0 && b(30, c), a;
2957
+ const r = e.__type, s = function(l, a) {
2958
+ const c = l._nodes.get(a);
2959
+ return c === void 0 && b(30, a), c;
2960
2960
  }(n, r);
2961
2961
  let i = t.get(r);
2962
2962
  i === void 0 && (i = Array.from(s.transforms), t.set(r, i));
@@ -2983,8 +2983,8 @@ function Vn(n, e) {
2983
2983
  n.type !== s.getType() && b(18, s.name);
2984
2984
  const i = s.importJSON(n), o = n.children;
2985
2985
  if (v(i) && Array.isArray(o)) for (let l = 0; l < o.length; l++) {
2986
- const c = Vn(o[l], e);
2987
- i.append(c);
2986
+ const a = Vn(o[l], e);
2987
+ i.append(a);
2988
2988
  }
2989
2989
  return i;
2990
2990
  }
@@ -3000,9 +3000,9 @@ function Ar(n, e, t) {
3000
3000
  function me(n, e) {
3001
3001
  const t = n._pendingEditorState, r = n._rootElement, s = n._headless || r === null;
3002
3002
  if (t === null) return;
3003
- const i = n._editorState, o = i._selection, l = t._selection, c = n._dirtyType !== Ee, a = R, u = Q, h = K, f = n._updating, d = n._observer;
3003
+ const i = n._editorState, o = i._selection, l = t._selection, a = n._dirtyType !== Ee, c = R, u = Q, h = K, f = n._updating, d = n._observer;
3004
3004
  let g = null;
3005
- if (n._pendingEditorState = null, n._editorState = t, !s && c && d !== null) {
3005
+ if (n._pendingEditorState = null, n._editorState = t, !s && a && d !== null) {
3006
3006
  K = n, R = t, Q = !1, n._updating = !0;
3007
3007
  try {
3008
3008
  const x = n._dirtyType, P = n._dirtyElements, C = n._dirtyLeaves;
@@ -3011,12 +3011,12 @@ function me(n, e) {
3011
3011
  if (x instanceof Error && n._onError(x), fn) throw x;
3012
3012
  return Ds(n, null, r, t), Qr(n), n._dirtyType = Me, fn = !0, me(n, i), void (fn = !1);
3013
3013
  } finally {
3014
- d.observe(r, Lr), n._updating = f, R = a, Q = u, K = h;
3014
+ d.observe(r, Lr), n._updating = f, R = c, Q = u, K = h;
3015
3015
  }
3016
3016
  }
3017
3017
  t._readOnly || (t._readOnly = !0);
3018
3018
  const p = n._dirtyLeaves, _ = n._dirtyElements, m = n._normalizedNodes, y = n._updateTags, S = n._deferred;
3019
- c && (n._dirtyType = Ee, n._cloneNotNeeded.clear(), n._dirtyLeaves = /* @__PURE__ */ new Set(), n._dirtyElements = /* @__PURE__ */ new Map(), n._normalizedNodes = /* @__PURE__ */ new Set(), n._updateTags = /* @__PURE__ */ new Set()), function(x, P) {
3019
+ a && (n._dirtyType = Ee, n._cloneNotNeeded.clear(), n._dirtyLeaves = /* @__PURE__ */ new Set(), n._dirtyElements = /* @__PURE__ */ new Map(), n._normalizedNodes = /* @__PURE__ */ new Set(), n._updateTags = /* @__PURE__ */ new Set()), function(x, P) {
3020
3020
  const C = x._decorators;
3021
3021
  let E = x._pendingDecorators || C;
3022
3022
  const D = P._nodeMap;
@@ -3024,16 +3024,16 @@ function me(n, e) {
3024
3024
  for (O in E) D.has(O) || (E === C && (E = es(x)), delete E[O]);
3025
3025
  }(n, t);
3026
3026
  const k = s ? null : se(n._window);
3027
- if (n._editable && k !== null && (c || l === null || l.dirty)) {
3027
+ if (n._editable && k !== null && (a || l === null || l.dirty)) {
3028
3028
  K = n, R = t;
3029
3029
  try {
3030
- if (d !== null && d.disconnect(), c || l === null || l.dirty) {
3030
+ if (d !== null && d.disconnect(), a || l === null || l.dirty) {
3031
3031
  const x = n._blockCursorElement;
3032
3032
  x !== null && Jn(x, n, r), Ji(o, l, n, k, y, r);
3033
3033
  }
3034
3034
  ki(n, r, l), d !== null && d.observe(r, Lr);
3035
3035
  } finally {
3036
- K = h, R = a;
3036
+ K = h, R = c;
3037
3037
  }
3038
3038
  }
3039
3039
  g !== null && function(x, P, C, E, D) {
@@ -3091,8 +3091,8 @@ function Es(n, e, t) {
3091
3091
  if (o !== void 0) {
3092
3092
  const l = o[s];
3093
3093
  if (l !== void 0) {
3094
- const c = Array.from(l), a = c.length;
3095
- for (let u = 0; u < a; u++) if (c[u](t, n) === !0) return !0;
3094
+ const a = Array.from(l), c = a.length;
3095
+ for (let u = 0; u < c; u++) if (a[u](t, n) === !0) return !0;
3096
3096
  }
3097
3097
  }
3098
3098
  }
@@ -3108,8 +3108,8 @@ function Mr(n, e) {
3108
3108
  let l;
3109
3109
  if (o !== void 0) {
3110
3110
  if (l = o.onUpdate, o.skipTransforms && (r = !0), o.discrete) {
3111
- const c = n._pendingEditorState;
3112
- c === null && b(191), c._flushSync = !0;
3111
+ const a = n._pendingEditorState;
3112
+ a === null && b(191), a._flushSync = !0;
3113
3113
  }
3114
3114
  l && n._deferred.push(l), Ns(n, o.tag);
3115
3115
  }
@@ -3123,12 +3123,12 @@ function Ps(n, e, t) {
3123
3123
  let s, i = !1, o = !1;
3124
3124
  t !== void 0 && (s = t.onUpdate, Ns(n, t.tag), i = t.skipTransforms || !1, o = t.discrete || !1), s && n._deferred.push(s);
3125
3125
  const l = n._editorState;
3126
- let c = n._pendingEditorState, a = !1;
3127
- (c === null || c._readOnly) && (c = n._pendingEditorState = new Xt(new Map((c || l)._nodeMap)), a = !0), c._flushSync = o;
3126
+ let a = n._pendingEditorState, c = !1;
3127
+ (a === null || a._readOnly) && (a = n._pendingEditorState = new Xt(new Map((a || l)._nodeMap)), c = !0), a._flushSync = o;
3128
3128
  const u = R, h = Q, f = K, d = n._updating;
3129
- R = c, Q = !1, n._updating = !0, K = n;
3129
+ R = a, Q = !1, n._updating = !0, K = n;
3130
3130
  try {
3131
- a && (n._headless ? l._selection !== null && (c._selection = l._selection.clone()) : c._selection = function(m) {
3131
+ c && (n._headless ? l._selection !== null && (a._selection = l._selection.clone()) : a._selection = function(m) {
3132
3132
  const y = m.getEditorState()._selection, S = se(m._window);
3133
3133
  return F(y) || y == null ? qt(y, S, m, null) : y.clone();
3134
3134
  }(n));
@@ -3143,13 +3143,13 @@ function Ps(n, e, t) {
3143
3143
  P !== C && C.selectionTransform(S, k);
3144
3144
  }
3145
3145
  }
3146
- }(c, n), n._dirtyType !== Ee && (i ? function(m, y) {
3146
+ }(a, n), n._dirtyType !== Ee && (i ? function(m, y) {
3147
3147
  const S = y._dirtyLeaves, k = m._nodeMap;
3148
3148
  for (const T of S) {
3149
3149
  const x = k.get(T);
3150
3150
  N(x) && x.isAttached() && x.isSimpleText() && !x.isUnmergeable() && rr(x);
3151
3151
  }
3152
- }(c, n) : function(m, y) {
3152
+ }(a, n) : function(m, y) {
3153
3153
  const S = y._dirtyLeaves, k = y._dirtyElements, T = m._nodeMap, x = ye(), P = /* @__PURE__ */ new Map();
3154
3154
  let C = S, E = C.size, D = k, O = D.size;
3155
3155
  for (; E > 0 || O > 0; ) {
@@ -3174,7 +3174,7 @@ function Ps(n, e, t) {
3174
3174
  C = y._dirtyLeaves, E = C.size, D = y._dirtyElements, O = D.size, pt++;
3175
3175
  }
3176
3176
  y._dirtyLeaves = S, y._dirtyElements = k;
3177
- }(c, n), Mr(n), function(m, y, S, k) {
3177
+ }(a, n), Mr(n), function(m, y, S, k) {
3178
3178
  const T = m._nodeMap, x = y._nodeMap, P = [];
3179
3179
  for (const [C] of k) {
3180
3180
  const E = x.get(C);
@@ -3185,12 +3185,12 @@ function Ps(n, e, t) {
3185
3185
  const E = x.get(C);
3186
3186
  E === void 0 || E.isAttached() || (T.has(C) || S.delete(C), x.delete(C));
3187
3187
  }
3188
- }(l, c, n._dirtyLeaves, n._dirtyElements)), p !== n._compositionKey && (c._flushSync = !0);
3189
- const _ = c._selection;
3188
+ }(l, a, n._dirtyLeaves, n._dirtyElements)), p !== n._compositionKey && (a._flushSync = !0);
3189
+ const _ = a._selection;
3190
3190
  if (F(_)) {
3191
- const m = c._nodeMap, y = _.anchor.key, S = _.focus.key;
3191
+ const m = a._nodeMap, y = _.anchor.key, S = _.focus.key;
3192
3192
  m.get(y) !== void 0 && m.get(S) !== void 0 || b(19);
3193
- } else Ht(_) && _._nodes.size === 0 && (c._selection = null);
3193
+ } else Ht(_) && _._nodes.size === 0 && (a._selection = null);
3194
3194
  } catch (p) {
3195
3195
  return p instanceof Error && n._onError(p), n._pendingEditorState = l, n._dirtyType = Me, n._cloneNotNeeded.clear(), n._dirtyLeaves = /* @__PURE__ */ new Set(), n._dirtyElements.clear(), void me(n);
3196
3196
  } finally {
@@ -3202,9 +3202,9 @@ function Ps(n, e, t) {
3202
3202
  if (y.dirty || !y.is(m)) return !0;
3203
3203
  } else if (m !== null) return !0;
3204
3204
  return !1;
3205
- }(c, n) ? c._flushSync ? (c._flushSync = !1, me(n)) : a && xi(() => {
3205
+ }(a, n) ? a._flushSync ? (a._flushSync = !1, me(n)) : c && xi(() => {
3206
3206
  me(n);
3207
- }) : (c._flushSync = !1, a && (r.clear(), n._deferred = [], n._pendingEditorState = null));
3207
+ }) : (a._flushSync = !1, c && (r.clear(), n._deferred = [], n._pendingEditorState = null));
3208
3208
  }
3209
3209
  function X(n, e, t) {
3210
3210
  n._updating ? n._updates.push([e, t]) : Ps(n, e, t);
@@ -3221,7 +3221,7 @@ class Qt extends Vt {
3221
3221
  }
3222
3222
  getFormatType() {
3223
3223
  const e = this.getFormat();
3224
- return ai[e] || "";
3224
+ return ci[e] || "";
3225
3225
  }
3226
3226
  getStyle() {
3227
3227
  return this.getLatest().__style;
@@ -3331,7 +3331,7 @@ class Qt extends Vt {
3331
3331
  const t = this.getChildren(), r = t.length;
3332
3332
  for (let s = 0; s < r; s++) {
3333
3333
  const i = t[s];
3334
- e += i.getTextContent(), v(i) && s !== r - 1 && !i.isInline() && (e += ae);
3334
+ e += i.getTextContent(), v(i) && s !== r - 1 && !i.isInline() && (e += ce);
3335
3335
  }
3336
3336
  return e;
3337
3337
  }
@@ -3340,7 +3340,7 @@ class Qt extends Vt {
3340
3340
  const t = this.getChildren(), r = t.length;
3341
3341
  for (let s = 0; s < r; s++) {
3342
3342
  const i = t[s];
3343
- e += i.getTextContentSize(), v(i) && s !== r - 1 && !i.isInline() && (e += ae.length);
3343
+ e += i.getTextContentSize(), v(i) && s !== r - 1 && !i.isInline() && (e += ce.length);
3344
3344
  }
3345
3345
  return e;
3346
3346
  }
@@ -3361,11 +3361,11 @@ class Qt extends Vt {
3361
3361
  const o = this.getChildrenSize();
3362
3362
  if (!this.canBeEmpty()) {
3363
3363
  if (e === 0 && t === 0) {
3364
- const c = this.getFirstChild();
3365
- if (N(c) || v(c)) return c.select(0, 0);
3364
+ const a = this.getFirstChild();
3365
+ if (N(a) || v(a)) return a.select(0, 0);
3366
3366
  } else if (!(e !== void 0 && e !== o || t !== void 0 && t !== o)) {
3367
- const c = this.getLastChild();
3368
- if (N(c) || v(c)) return c.select();
3367
+ const a = this.getLastChild();
3368
+ if (N(a) || v(a)) return a.select();
3369
3369
  }
3370
3370
  }
3371
3371
  s === void 0 && (s = o), i === void 0 && (i = o);
@@ -3401,7 +3401,7 @@ class Qt extends Vt {
3401
3401
  return this.getWritable().__indent = e, this;
3402
3402
  }
3403
3403
  splice(e, t, r) {
3404
- const s = r.length, i = this.getChildrenSize(), o = this.getWritable(), l = o.__key, c = [], a = [], u = this.getChildAtIndex(e + t);
3404
+ const s = r.length, i = this.getChildrenSize(), o = this.getWritable(), l = o.__key, a = [], c = [], u = this.getChildAtIndex(e + t);
3405
3405
  let h = null, f = i - t + s;
3406
3406
  if (e !== 0) if (e === i) h = this.getLastChild();
3407
3407
  else {
@@ -3413,7 +3413,7 @@ class Qt extends Vt {
3413
3413
  for (let p = 0; p < t; p++) {
3414
3414
  g === null && b(100);
3415
3415
  const _ = g.getNextSibling(), m = g.__key;
3416
- Ne(g.getWritable()), a.push(m), g = _;
3416
+ Ne(g.getWritable()), c.push(m), g = _;
3417
3417
  }
3418
3418
  }
3419
3419
  let d = h;
@@ -3428,7 +3428,7 @@ class Qt extends Vt {
3428
3428
  const y = d.getWritable();
3429
3429
  y.__next = m, _.__prev = y.__key;
3430
3430
  }
3431
- p.__key === l && b(76), _.__parent = l, c.push(m), d = p;
3431
+ p.__key === l && b(76), _.__parent = l, a.push(m), d = p;
3432
3432
  }
3433
3433
  if (e + t === i)
3434
3434
  d !== null && (d.getWritable().__next = null, o.__last = d.__key);
@@ -3439,10 +3439,10 @@ class Qt extends Vt {
3439
3439
  g.__prev = d.__key, p.__next = u.__key;
3440
3440
  } else g.__prev = null;
3441
3441
  }
3442
- if (o.__size = f, a.length) {
3442
+ if (o.__size = f, c.length) {
3443
3443
  const g = I();
3444
3444
  if (F(g)) {
3445
- const p = new Set(a), _ = new Set(c), { anchor: m, focus: y } = g;
3445
+ const p = new Set(c), _ = new Set(a), { anchor: m, focus: y } = g;
3446
3446
  zr(m, p, _) && Ot(m, m.getNode(), this, h, u), zr(y, p, _) && Ot(y, y.getNode(), this, h, u), f !== 0 || this.canBeEmpty() || Pe(this) || this.remove();
3447
3447
  }
3448
3448
  }
@@ -3534,12 +3534,12 @@ class Vi extends Vt {
3534
3534
  function A(n) {
3535
3535
  return n instanceof Vi;
3536
3536
  }
3537
- class ct extends Qt {
3537
+ class at extends Qt {
3538
3538
  static getType() {
3539
3539
  return "root";
3540
3540
  }
3541
3541
  static clone() {
3542
- return new ct();
3542
+ return new at();
3543
3543
  }
3544
3544
  constructor() {
3545
3545
  super("root"), this.__cachedText = null;
@@ -3585,10 +3585,10 @@ class ct extends Qt {
3585
3585
  }
3586
3586
  }
3587
3587
  function Y(n) {
3588
- return n instanceof ct;
3588
+ return n instanceof at;
3589
3589
  }
3590
3590
  function jn() {
3591
- return new Xt(/* @__PURE__ */ new Map([["root", new ct()]]));
3591
+ return new Xt(/* @__PURE__ */ new Map([["root", new at()]]));
3592
3592
  }
3593
3593
  function Fs(n) {
3594
3594
  const e = n.exportJSON(), t = n.constructor;
@@ -3644,7 +3644,7 @@ class We extends Qt {
3644
3644
  return t.__textFormat = e, t;
3645
3645
  }
3646
3646
  hasTextFormat(e) {
3647
- const t = ce[e];
3647
+ const t = ae[e];
3648
3648
  return !!(this.getTextFormat() & t);
3649
3649
  }
3650
3650
  getFormatFlags(e, t) {
@@ -3724,13 +3724,13 @@ function Ds(n, e, t, r) {
3724
3724
  i !== null && (i.disconnect(), n._observer = null), e !== null && (e.textContent = ""), t !== null && (t.textContent = "", s.set("root", t));
3725
3725
  }
3726
3726
  function vo(n) {
3727
- const e = n || {}, t = Ui(), r = e.theme || {}, s = n === void 0 ? t : e.parentEditor || null, i = e.disableEvents || !1, o = jn(), l = e.namespace || (s !== null ? s._config.namespace : rs()), c = e.editorState, a = [ct, ze, st, it, We, ji, ...e.nodes || []], { onError: u, html: h } = e, f = e.editable === void 0 || e.editable;
3727
+ const e = n || {}, t = Ui(), r = e.theme || {}, s = n === void 0 ? t : e.parentEditor || null, i = e.disableEvents || !1, o = jn(), l = e.namespace || (s !== null ? s._config.namespace : rs()), a = e.editorState, c = [at, ze, st, it, We, ji, ...e.nodes || []], { onError: u, html: h } = e, f = e.editable === void 0 || e.editable;
3728
3728
  let d;
3729
3729
  if (n === void 0 && t !== null) d = t._nodes;
3730
3730
  else {
3731
3731
  d = /* @__PURE__ */ new Map();
3732
- for (let p = 0; p < a.length; p++) {
3733
- let _ = a[p], m = null, y = null;
3732
+ for (let p = 0; p < c.length; p++) {
3733
+ let _ = c[p], m = null, y = null;
3734
3734
  if (typeof _ != "function") {
3735
3735
  const x = _;
3736
3736
  _ = x.replace, m = x.with, y = x.withKlass || null;
@@ -3754,7 +3754,7 @@ function vo(n) {
3754
3754
  x !== null && S(x);
3755
3755
  }), _ && S(_), m;
3756
3756
  }(d, h ? h.import : void 0), f);
3757
- return c !== void 0 && (g._pendingEditorState = c, g._dirtyType = Me), g;
3757
+ return a !== void 0 && (g._pendingEditorState = a, g._dirtyType = Me), g;
3758
3758
  }
3759
3759
  class Yt {
3760
3760
  constructor(e, t, r, s, i, o, l) {
@@ -3834,18 +3834,18 @@ class Yt {
3834
3834
  registerNodeTransform(e, t) {
3835
3835
  const r = this.registerNodeTransformToKlass(e, t), s = [r], i = r.replaceWithKlass;
3836
3836
  if (i != null) {
3837
- const c = this.registerNodeTransformToKlass(i, t);
3838
- s.push(c);
3837
+ const a = this.registerNodeTransformToKlass(i, t);
3838
+ s.push(a);
3839
3839
  }
3840
3840
  var o, l;
3841
3841
  return o = this, l = e.getType(), X(o, () => {
3842
- const c = fe();
3843
- if (c.isEmpty()) return;
3842
+ const a = fe();
3843
+ if (a.isEmpty()) return;
3844
3844
  if (l === "root") return void Z().markDirty();
3845
- const a = c._nodeMap;
3846
- for (const [, u] of a) u.markDirty();
3845
+ const c = a._nodeMap;
3846
+ for (const [, u] of c) u.markDirty();
3847
3847
  }, o._pendingEditorState === null ? { tag: "history-merge" } : void 0), () => {
3848
- s.forEach((c) => c.transforms.delete(t));
3848
+ s.forEach((a) => a.transforms.delete(t));
3849
3849
  };
3850
3850
  }
3851
3851
  hasNode(e) {
@@ -3872,39 +3872,39 @@ class Yt {
3872
3872
  const r = qe(this._config.theme, "root"), s = this._pendingEditorState || this._editorState;
3873
3873
  if (this._rootElement = e, Ds(this, t, e, s), t !== null && (this._config.disableEvents || Oi(t), r != null && t.classList.remove(...r)), e !== null) {
3874
3874
  const i = function(l) {
3875
- const c = l.ownerDocument;
3876
- return c && c.defaultView || null;
3875
+ const a = l.ownerDocument;
3876
+ return a && a.defaultView || null;
3877
3877
  }(e), o = e.style;
3878
- o.userSelect = "text", o.whiteSpace = "pre-wrap", o.wordBreak = "break-word", e.setAttribute("data-lexical-editor", "true"), this._window = i, this._dirtyType = Me, Qr(this), this._updateTags.add("history-merge"), me(this), this._config.disableEvents || function(l, c) {
3879
- const a = l.ownerDocument, u = Dt.get(a);
3880
- (u === void 0 || u < 1) && a.addEventListener("selectionchange", xs), Dt.set(a, (u || 0) + 1), l.__lexicalEditor = c;
3878
+ o.userSelect = "text", o.whiteSpace = "pre-wrap", o.wordBreak = "break-word", e.setAttribute("data-lexical-editor", "true"), this._window = i, this._dirtyType = Me, Qr(this), this._updateTags.add("history-merge"), me(this), this._config.disableEvents || function(l, a) {
3879
+ const c = l.ownerDocument, u = Dt.get(c);
3880
+ (u === void 0 || u < 1) && c.addEventListener("selectionchange", xs), Dt.set(c, (u || 0) + 1), l.__lexicalEditor = a;
3881
3881
  const h = ms(l);
3882
3882
  for (let f = 0; f < Sn.length; f++) {
3883
3883
  const [d, g] = Sn[f], p = typeof g == "function" ? (_) => {
3884
- xr(_) || (mr(_), (c.isEditable() || d === "click") && g(_, c));
3884
+ xr(_) || (mr(_), (a.isEditable() || d === "click") && g(_, a));
3885
3885
  } : (_) => {
3886
3886
  if (xr(_)) return;
3887
3887
  mr(_);
3888
- const m = c.isEditable();
3888
+ const m = a.isEditable();
3889
3889
  switch (d) {
3890
3890
  case "cut":
3891
- return m && w(c, Jr, _);
3891
+ return m && w(a, Jr, _);
3892
3892
  case "copy":
3893
- return w(c, Kr, _);
3893
+ return w(a, Kr, _);
3894
3894
  case "paste":
3895
- return m && w(c, Wr, _);
3895
+ return m && w(a, Wr, _);
3896
3896
  case "dragstart":
3897
- return m && w(c, js, _);
3897
+ return m && w(a, js, _);
3898
3898
  case "dragover":
3899
- return m && w(c, Hs, _);
3899
+ return m && w(a, Hs, _);
3900
3900
  case "dragend":
3901
- return m && w(c, qs, _);
3901
+ return m && w(a, qs, _);
3902
3902
  case "focus":
3903
- return m && w(c, Qs, _);
3903
+ return m && w(a, Qs, _);
3904
3904
  case "blur":
3905
- return m && w(c, Xs, _);
3905
+ return m && w(a, Xs, _);
3906
3906
  case "drop":
3907
- return m && w(c, Vs, _);
3907
+ return m && w(a, Vs, _);
3908
3908
  }
3909
3909
  };
3910
3910
  l.addEventListener(d, p), h.push(() => {
@@ -3929,7 +3929,7 @@ class Yt {
3929
3929
  }
3930
3930
  parseEditorState(e, t) {
3931
3931
  return function(r, s, i) {
3932
- const o = jn(), l = R, c = Q, a = K, u = s._dirtyElements, h = s._dirtyLeaves, f = s._cloneNotNeeded, d = s._dirtyType;
3932
+ const o = jn(), l = R, a = Q, c = K, u = s._dirtyElements, h = s._dirtyLeaves, f = s._cloneNotNeeded, d = s._dirtyType;
3933
3933
  s._dirtyElements = /* @__PURE__ */ new Map(), s._dirtyLeaves = /* @__PURE__ */ new Set(), s._cloneNotNeeded = /* @__PURE__ */ new Set(), s._dirtyType = 0, R = o, Q = !1, K = s;
3934
3934
  try {
3935
3935
  const g = s._nodes;
@@ -3937,7 +3937,7 @@ class Yt {
3937
3937
  } catch (g) {
3938
3938
  g instanceof Error && s._onError(g);
3939
3939
  } finally {
3940
- s._dirtyElements = u, s._dirtyLeaves = h, s._cloneNotNeeded = f, s._dirtyType = d, R = l, Q = c, K = a;
3940
+ s._dirtyElements = u, s._dirtyLeaves = h, s._cloneNotNeeded = f, s._dirtyType = d, R = l, Q = a, K = c;
3941
3941
  }
3942
3942
  return o;
3943
3943
  }(typeof e == "string" ? JSON.parse(e) : e, this, t);
@@ -3991,66 +3991,67 @@ export {
3991
3991
  I as M,
3992
3992
  xo as N,
3993
3993
  po as O,
3994
- Mt as P,
3995
- ao as Q,
3996
- Wt as R,
3994
+ We as P,
3995
+ Mt as Q,
3996
+ co as R,
3997
3997
  $t as S,
3998
3998
  Ht as T,
3999
3999
  nt as U,
4000
4000
  Ae as V,
4001
- Bs as W,
4001
+ Wt as W,
4002
4002
  dr as X,
4003
- mo as Y,
4004
- Ws as Z,
4005
- Os as _,
4006
- N as a,
4007
- Ms as a0,
4008
- Is as a1,
4009
- Js as a2,
4010
- mt as a3,
4011
- xt as a4,
4012
- yt as a5,
4013
- Ks as a6,
4014
- $s as a7,
4015
- Jr as a8,
4016
- Gi as a9,
4017
- to as aA,
4018
- eo as aB,
4019
- He as aa,
4020
- Us as ab,
4021
- Qs as ac,
4022
- ho as ad,
4023
- V as ae,
4024
- fo as af,
4025
- ce as ag,
4003
+ Bs as Y,
4004
+ mo as Z,
4005
+ so as _,
4006
+ lo as a,
4007
+ Ws as a0,
4008
+ Ms as a1,
4009
+ Is as a2,
4010
+ Js as a3,
4011
+ mt as a4,
4012
+ xt as a5,
4013
+ yt as a6,
4014
+ Ks as a7,
4015
+ $s as a8,
4016
+ Jr as a9,
4017
+ Yr as aA,
4018
+ to as aB,
4019
+ eo as aC,
4020
+ Gi as aa,
4021
+ He as ab,
4022
+ Us as ac,
4023
+ Qs as ad,
4024
+ ho as ae,
4025
+ V as af,
4026
+ fo as ag,
4026
4027
  yi as ah,
4027
4028
  lt as ai,
4028
- ie as aj,
4029
- vo as ak,
4030
- Wr as al,
4031
- Xr as am,
4032
- Gn as an,
4033
- io as ao,
4034
- Hs as ap,
4035
- js as aq,
4036
- Vs as ar,
4037
- dn as as,
4038
- gt as at,
4039
- Zi as au,
4040
- Yi as av,
4041
- Xi as aw,
4042
- go as ax,
4043
- Zn as ay,
4044
- Yr as az,
4045
- v as b,
4029
+ ae as aj,
4030
+ ie as ak,
4031
+ vo as al,
4032
+ Wr as am,
4033
+ Xr as an,
4034
+ Gn as ao,
4035
+ io as ap,
4036
+ Hs as aq,
4037
+ js as ar,
4038
+ Vs as as,
4039
+ dn as at,
4040
+ gt as au,
4041
+ Zi as av,
4042
+ Yi as aw,
4043
+ Xi as ax,
4044
+ go as ay,
4045
+ Zn as az,
4046
+ N as b,
4046
4047
  J as c,
4047
- we as d,
4048
- wn as e,
4049
- Jt as f,
4050
- Rr as g,
4051
- Br as h,
4052
- so as i,
4053
- lo as j,
4048
+ Jt as d,
4049
+ oo as e,
4050
+ we as f,
4051
+ Os as g,
4052
+ wn as h,
4053
+ Br as i,
4054
+ Rr as j,
4054
4055
  br as k,
4055
4056
  A as l,
4056
4057
  Qt as m,
@@ -4059,13 +4060,13 @@ export {
4059
4060
  ji as p,
4060
4061
  Ei as q,
4061
4062
  Ls as r,
4062
- co as s,
4063
+ ao as s,
4063
4064
  qi as t,
4064
4065
  Pe as u,
4065
4066
  F as v,
4066
4067
  Z as w,
4067
- oo as x,
4068
+ v as x,
4068
4069
  hr as y,
4069
4070
  ot as z
4070
4071
  };
4071
- //# sourceMappingURL=Lexical.prod-B6kL_nwF.js.map
4072
+ //# sourceMappingURL=Lexical.prod-DOTdxgeo.js.map