@uva-glass/component-library 1.64.6 → 1.65.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (55) hide show
  1. package/dist/{Lexical.prod-CFhL_6Md.js → Lexical.prod-DeeCy7Xd.js} +260 -255
  2. package/dist/Lexical.prod-DeeCy7Xd.js.map +1 -0
  3. package/dist/{LexicalClipboard.prod-BsGZ_U-F.js → LexicalClipboard.prod-CayrMfkI.js} +26 -26
  4. package/dist/LexicalClipboard.prod-CayrMfkI.js.map +1 -0
  5. package/dist/{LexicalLink.prod-DOD0hvjh.js → LexicalLink.prod-Biaqry-c.js} +5 -5
  6. package/dist/{LexicalLink.prod-DOD0hvjh.js.map → LexicalLink.prod-Biaqry-c.js.map} +1 -1
  7. package/dist/{LexicalList.prod-C66L7HSr.js → LexicalList.prod-Uk8UObU7.js} +17 -17
  8. package/dist/{LexicalList.prod-C66L7HSr.js.map → LexicalList.prod-Uk8UObU7.js.map} +1 -1
  9. package/dist/{LexicalSelection.prod-mI1PjnKs.js → LexicalSelection.prod-C1TEIGhq.js} +4 -4
  10. package/dist/{LexicalSelection.prod-mI1PjnKs.js.map → LexicalSelection.prod-C1TEIGhq.js.map} +1 -1
  11. package/dist/{LexicalTable.prod-Dg8eGg1m.js → LexicalTable.prod-hx6rW3fc.js} +85 -85
  12. package/dist/{LexicalTable.prod-Dg8eGg1m.js.map → LexicalTable.prod-hx6rW3fc.js.map} +1 -1
  13. package/dist/{LexicalUtils.prod-0Sd05E-o.js → LexicalUtils.prod-CCjlRAc-.js} +10 -10
  14. package/dist/{LexicalUtils.prod-0Sd05E-o.js.map → LexicalUtils.prod-CCjlRAc-.js.map} +1 -1
  15. package/dist/{TablePlugin-ChuaCSFq.js → TablePlugin-BbiBRjod.js} +4 -4
  16. package/dist/{TablePlugin-ChuaCSFq.js.map → TablePlugin-BbiBRjod.js.map} +1 -1
  17. package/dist/assets/Label.css +1 -1
  18. package/dist/components/CheckboxTree/CheckboxTree.js +1 -1
  19. package/dist/components/FormInput/FormInput.d.ts +3 -1
  20. package/dist/components/FormInput/FormInput.js +23 -22
  21. package/dist/components/FormInput/FormInput.js.map +1 -1
  22. package/dist/components/InputField/InputField.stories.js +1 -1
  23. package/dist/components/Label/Label.d.ts +3 -1
  24. package/dist/components/Label/Label.js +14 -12
  25. package/dist/components/Label/Label.js.map +1 -1
  26. package/dist/components/MultiSelect/MultiSelect.js +1 -1
  27. package/dist/components/MultiSelect/MultiSelect.stories.js +1 -1
  28. package/dist/components/MultiSelect/components/MultiSelectHeader.js +1 -1
  29. package/dist/components/MultiSelect/index.js +1 -1
  30. package/dist/components/PeriodSelector/PeriodSelector.js +1 -1
  31. package/dist/components/ProgrammeCard/ProgrammeCard.stories.js +1 -1
  32. package/dist/components/RteEditor/EditorHeader/EditorHeader.js +1 -1
  33. package/dist/components/RteEditor/Plugins/BlockFormatPlugin/BlockFormatPlugin.js +4 -4
  34. package/dist/components/RteEditor/Plugins/HistoryPlugin/HistoryPlugin.js +2 -2
  35. package/dist/components/RteEditor/Plugins/LinkPlugin/AddLinkForm/AddLinkFrom.js +2 -2
  36. package/dist/components/RteEditor/Plugins/LinkPlugin/LinkContextMenu/LinkContextMenu.js +1 -1
  37. package/dist/components/RteEditor/Plugins/LinkPlugin/LinkPlugin.js +9 -9
  38. package/dist/components/RteEditor/Plugins/LinkPlugin/helpers.js +1 -1
  39. package/dist/components/RteEditor/Plugins/ListPlugin/ListPlugin.js +21 -21
  40. package/dist/components/RteEditor/Plugins/PasteHandlerPlugin/PasteHandlerPlugin.js +6 -6
  41. package/dist/components/RteEditor/Plugins/TablePlugin/AddTableFrom.js +1 -1
  42. package/dist/components/RteEditor/Plugins/TablePlugin/TablePlugin.js +3 -3
  43. package/dist/components/RteEditor/Plugins/TablePlugin/helpers.js +10 -10
  44. package/dist/components/RteEditor/Plugins/TablePlugin/index.js +1 -1
  45. package/dist/components/RteEditor/Plugins/ToolbarPlugin/ToolbarPlugin.js +3 -3
  46. package/dist/components/RteEditor/Plugins/index.js +1 -1
  47. package/dist/components/RteEditor/RteEditor.js +94 -94
  48. package/dist/components/RteEditor/helpers.js +8 -8
  49. package/dist/components/index.js +1 -1
  50. package/dist/{helpers-CnEW_8nD.js → helpers-CgzuKnuq.js} +7 -7
  51. package/dist/{helpers-CnEW_8nD.js.map → helpers-CgzuKnuq.js.map} +1 -1
  52. package/dist/index.js +1 -1
  53. package/package.json +6 -6
  54. package/dist/Lexical.prod-CFhL_6Md.js.map +0 -1
  55. package/dist/LexicalClipboard.prod-BsGZ_U-F.js.map +0 -1
@@ -1,13 +1,13 @@
1
- function Zs(n) {
1
+ function to(n) {
2
2
  return {};
3
3
  }
4
- const Nn = {}, to = {}, Ii = {}, ve = {}, ye = {}, Zn = {}, jt = {}, Kr = {}, tr = {}, Se = {}, Ce = {}, wt = {}, Jr = {}, $r = {}, Ai = {}, Bi = {}, zi = {}, Wi = {}, Ri = {}, Ki = {}, Ji = {}, hn = {}, $i = {}, Ui = {}, Vi = {}, ji = {}, Hi = {}, eo = {}, no = {}, ro = {}, qi = {}, io = {}, Gi = {}, Qi = {}, Xi = {}, Ur = {}, Vr = {}, er = {}, so = {}, oo = {}, lo = {}, ao = {}, Yi = {}, Zi = {}, ts = {}, nt = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0, es = nt && "documentMode" in document ? document.documentMode : null, Z = nt && /Mac|iPod|iPhone|iPad/.test(navigator.platform), xt = nt && /^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent), Te = !(!nt || !("InputEvent" in window) || es) && "getTargetRanges" in new window.InputEvent("input"), Be = nt && /Version\/[\d.]+.*Safari/.test(navigator.userAgent), re = nt && /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream, ns = nt && /Android/.test(navigator.userAgent), jr = nt && /^(?=.*Chrome).*/i.test(navigator.userAgent), rs = nt && ns && jr, En = nt && /AppleWebKit\/[\d.]+/.test(navigator.userAgent) && !jr, ie = 1, Ct = 3, Et = 0, Hr = 1, At = 2, is = 0, ss = 1, os = 2, ke = 4, be = 8, Pn = 128, ls = 112 | (3 | ke | be) | Pn, Fn = 1, Ln = 2, Dn = 3, On = 4, Mn = 5, In = 6, ze = Be || re || En ? " " : "​", ct = `
4
+ const Nn = {}, eo = {}, Ai = {}, ve = {}, ye = {}, Zn = {}, jt = {}, Kr = {}, tr = {}, Se = {}, Ce = {}, wt = {}, Jr = {}, $r = {}, Bi = {}, zi = {}, Wi = {}, Ri = {}, Ki = {}, Ji = {}, $i = {}, hn = {}, Ui = {}, Vi = {}, ji = {}, Hi = {}, qi = {}, no = {}, ro = {}, io = {}, Gi = {}, so = {}, Qi = {}, Xi = {}, Yi = {}, Ur = {}, Vr = {}, er = {}, oo = {}, lo = {}, ao = {}, co = {}, Zi = {}, ts = {}, es = {}, nt = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0, ns = nt && "documentMode" in document ? document.documentMode : null, Z = nt && /Mac|iPod|iPhone|iPad/.test(navigator.platform), xt = nt && /^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent), Te = !(!nt || !("InputEvent" in window) || ns) && "getTargetRanges" in new window.InputEvent("input"), Be = nt && /Version\/[\d.]+.*Safari/.test(navigator.userAgent), re = nt && /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream, rs = nt && /Android/.test(navigator.userAgent), jr = nt && /^(?=.*Chrome).*/i.test(navigator.userAgent), is = nt && rs && jr, En = nt && /AppleWebKit\/[\d.]+/.test(navigator.userAgent) && !jr, ie = 1, Ct = 3, Et = 0, Hr = 1, At = 2, ss = 0, os = 1, ls = 2, ke = 4, be = 8, Pn = 128, as = 112 | (3 | ke | be) | Pn, Fn = 1, Dn = 2, Ln = 3, On = 4, Mn = 5, In = 6, ze = Be || re || En ? " " : "​", ct = `
5
5
 
6
- `, as = xt ? " " : ze, qr = "֑-߿יִ-﷽ﹰ-ﻼ", Gr = "A-Za-zÀ-ÖØ-öø-ʸ̀-֐ࠀ-῿‎Ⰰ-﬜︀-﹯﻽-￿", cs = new RegExp("^[^" + Gr + "]*[" + qr + "]"), us = new RegExp("^[^" + qr + "]*[" + Gr + "]"), at = { bold: 1, code: 16, highlight: Pn, italic: 2, strikethrough: ke, subscript: 32, superscript: 64, underline: be }, fs = { directionless: 1, unmergeable: 2 }, nr = { center: Ln, end: In, justify: On, left: Fn, right: Dn, start: Mn }, ds = { [Ln]: "center", [In]: "end", [On]: "justify", [Fn]: "left", [Dn]: "right", [Mn]: "start" }, hs = { normal: 0, segmented: 2, token: 1 }, gs = { [is]: "normal", [os]: "segmented", [ss]: "token" };
7
- function _s(n) {
6
+ `, cs = xt ? " " : ze, qr = "֑-߿יִ-﷽ﹰ-ﻼ", Gr = "A-Za-zÀ-ÖØ-öø-ʸ̀-֐ࠀ-῿‎Ⰰ-﬜︀-﹯﻽-￿", us = new RegExp("^[^" + Gr + "]*[" + qr + "]"), fs = new RegExp("^[^" + qr + "]*[" + Gr + "]"), at = { bold: 1, code: 16, highlight: Pn, italic: 2, strikethrough: ke, subscript: 32, superscript: 64, underline: be }, ds = { directionless: 1, unmergeable: 2 }, nr = { center: Dn, end: In, justify: On, left: Fn, right: Ln, start: Mn }, hs = { [Dn]: "center", [In]: "end", [On]: "justify", [Fn]: "left", [Ln]: "right", [Mn]: "start" }, gs = { normal: 0, segmented: 2, token: 1 }, _s = { [ss]: "normal", [ls]: "segmented", [os]: "token" };
7
+ function ps(n) {
8
8
  return n && n.__esModule && Object.prototype.hasOwnProperty.call(n, "default") ? n.default : n;
9
9
  }
10
- var T = _s(function(n) {
10
+ var T = ps(function(n) {
11
11
  const t = new URLSearchParams();
12
12
  t.append("code", n);
13
13
  for (let e = 1; e < arguments.length; e++) t.append("v", arguments[e]);
@@ -18,31 +18,31 @@ function we(...n) {
18
18
  for (const e of n) if (e && typeof e == "string") for (const [r] of e.matchAll(/\S+/g)) t.push(r);
19
19
  return t;
20
20
  }
21
- const ps = 100;
21
+ const ys = 100;
22
22
  let gn = !1, An = 0;
23
- function ys(n) {
23
+ function ms(n) {
24
24
  An = n.timeStamp;
25
25
  }
26
26
  function nn(n, t, e) {
27
27
  const r = n.nodeName === "BR", i = t.__lexicalLineBreak;
28
28
  return i && (n === i || r && n.previousSibling === i) || r && Ke(n, e) !== void 0;
29
29
  }
30
- function ms(n, t, e) {
30
+ function xs(n, t, e) {
31
31
  const r = it(e._window);
32
32
  let i = null, s = null;
33
33
  r !== null && r.anchorNode === n && (i = r.anchorOffset, s = r.focusOffset);
34
34
  const o = n.nodeValue;
35
35
  o !== null && Kn(t, o, i, s, !1);
36
36
  }
37
- function xs(n, t, e) {
37
+ function vs(n, t, e) {
38
38
  if (F(n)) {
39
39
  const r = n.anchor.getNode();
40
40
  if (r.is(e) && n.format !== r.getFormat()) return !1;
41
41
  }
42
42
  return t.nodeType === Ct && e.isAttached();
43
43
  }
44
- function vs(n, t, e, r) {
45
- for (let i = n; i && !Ms(i); i = se(i)) {
44
+ function Ss(n, t, e, r) {
45
+ for (let i = n; i && !Is(i); i = se(i)) {
46
46
  const s = Ke(i, t);
47
47
  if (s !== void 0) {
48
48
  const o = V(s, e);
@@ -52,7 +52,7 @@ function vs(n, t, e, r) {
52
52
  }
53
53
  function Qr(n, t, e) {
54
54
  gn = !0;
55
- const r = performance.now() - An > ps;
55
+ const r = performance.now() - An > ys;
56
56
  try {
57
57
  Q(n, () => {
58
58
  const i = M() || function(f) {
@@ -63,10 +63,10 @@ function Qr(n, t, e) {
63
63
  }(n), s = /* @__PURE__ */ new Map(), o = n.getRootElement(), l = n._editorState, a = n._blockCursorElement;
64
64
  let c = !1, u = "";
65
65
  for (let f = 0; f < t.length; f++) {
66
- const h = t[f], g = h.type, _ = h.target, p = vs(_, n, l, o);
66
+ const h = t[f], g = h.type, _ = h.target, p = Ss(_, n, l, o);
67
67
  if (!p) continue;
68
68
  const [m, y] = p;
69
- if (g === "characterData") r && E(y) && xs(i, _, y) && ms(_, y, n);
69
+ if (g === "characterData") r && E(y) && vs(i, _, y) && xs(_, y, n);
70
70
  else if (g === "childList") {
71
71
  c = !0;
72
72
  const x = h.addedNodes;
@@ -74,8 +74,8 @@ function Qr(n, t, e) {
74
74
  const P = x[v], C = ni(P), N = P.parentNode;
75
75
  if (N != null && P !== a && C === null && !nn(P, N, n)) {
76
76
  if (xt) {
77
- const L = P.innerText || P.nodeValue;
78
- L && (u += L);
77
+ const D = P.innerText || P.nodeValue;
78
+ D && (u += D);
79
79
  }
80
80
  N.removeChild(P);
81
81
  }
@@ -115,7 +115,7 @@ function Xr(n) {
115
115
  }
116
116
  function Yr(n) {
117
117
  (function(t) {
118
- An === 0 && $e(t).addEventListener("textInput", ys, !0);
118
+ An === 0 && $e(t).addEventListener("textInput", ms, !0);
119
119
  })(n), n._observer = new MutationObserver((t, e) => {
120
120
  Qr(n, t, e);
121
121
  });
@@ -153,7 +153,7 @@ function sr(n) {
153
153
  }
154
154
  } else r.remove();
155
155
  }
156
- function Ss(n) {
156
+ function Cs(n) {
157
157
  return or(n.anchor), or(n.focus), n;
158
158
  }
159
159
  function or(n) {
@@ -168,8 +168,8 @@ function or(n) {
168
168
  n.set(r.__key, i ? r.getChildrenSize() : 0, "element");
169
169
  }
170
170
  }
171
- let Cs = 1;
172
- const Ts = typeof queueMicrotask == "function" ? queueMicrotask : (n) => {
171
+ let Ts = 1;
172
+ const ks = typeof queueMicrotask == "function" ? queueMicrotask : (n) => {
173
173
  Promise.resolve().then(n);
174
174
  };
175
175
  function Zr(n) {
@@ -204,13 +204,13 @@ function Re(n) {
204
204
  function bt(n) {
205
205
  return n.isToken() || n.isSegmented();
206
206
  }
207
- function ks(n) {
207
+ function bs(n) {
208
208
  return n.nodeType === Ct;
209
209
  }
210
210
  function Ne(n) {
211
211
  let t = n;
212
212
  for (; t != null; ) {
213
- if (ks(t)) return t;
213
+ if (bs(t)) return t;
214
214
  t = t.firstChild;
215
215
  }
216
216
  return null;
@@ -221,13 +221,13 @@ function Ee(n, t, e) {
221
221
  let i = n ^ r;
222
222
  return t === "subscript" ? i &= ~at.superscript : t === "superscript" && (i &= ~at.subscript), i;
223
223
  }
224
- function co(n) {
224
+ function uo(n) {
225
225
  return E(n) || It(n) || I(n);
226
226
  }
227
227
  function ei(n, t) {
228
228
  if (t != null) return void (n.__key = t);
229
229
  q(), Ei();
230
- const e = A(), r = ft(), i = "" + Cs++;
230
+ const e = A(), r = ft(), i = "" + Ts++;
231
231
  r._nodeMap.set(i, n), S(n) ? e._dirtyElements.set(i, !0) : e._dirtyLeaves.add(i), e._cloneNotNeeded.add(i), e._dirtyType = Hr, n.__key = i;
232
232
  }
233
233
  function Nt(n) {
@@ -410,7 +410,7 @@ function Kn(n, t, e, r, i) {
410
410
  }
411
411
  }
412
412
  }
413
- function bs(n, t) {
413
+ function ws(n, t) {
414
414
  if (t.isSegmented()) return !0;
415
415
  if (!n.isCollapsed()) return !1;
416
416
  const e = n.anchor.offset, r = t.getParentOrThrow(), i = t.isToken();
@@ -440,9 +440,9 @@ function Kt(n) {
440
440
  function dr(n, t, e) {
441
441
  return n.toLowerCase() === "a" && Ut(t, e);
442
442
  }
443
- function uo() {
443
+ function fo() {
444
444
  const n = Y();
445
- ut(Ss(n.select(0, n.getChildrenSize())));
445
+ ut(Cs(n.select(0, n.getChildrenSize())));
446
446
  }
447
447
  function Ht(n, t) {
448
448
  n.__lexicalClassNameCache === void 0 && (n.__lexicalClassNameCache = {});
@@ -488,7 +488,7 @@ function ai(n) {
488
488
  return e === "insertFromPaste" || e === "insertFromPasteAsQuotation";
489
489
  }
490
490
  function w(n, t, e) {
491
- return Li(n, t, e);
491
+ return Di(n, t, e);
492
492
  }
493
493
  function Je(n) {
494
494
  return !X(n) && !n.isLastChild() && !n.isInline();
@@ -513,7 +513,7 @@ function $e(n) {
513
513
  const t = n._window;
514
514
  return t === null && T(78), t;
515
515
  }
516
- function ws(n) {
516
+ function Ns(n) {
517
517
  let t = n.getParentOrThrow();
518
518
  for (; t !== null; ) {
519
519
  if (Pt(t)) return t;
@@ -524,7 +524,7 @@ function ws(n) {
524
524
  function Pt(n) {
525
525
  return X(n) || S(n) && n.isShadowRoot();
526
526
  }
527
- function Ns(n) {
527
+ function Es(n) {
528
528
  const t = n.constructor.clone(n);
529
529
  return ei(t, null), t;
530
530
  }
@@ -549,7 +549,7 @@ function $n(n, t, e) {
549
549
  const r = n.parentElement;
550
550
  r !== null && r.removeChild(n);
551
551
  }
552
- function Es(n, t, e) {
552
+ function Ps(n, t, e) {
553
553
  let r = n._blockCursorElement;
554
554
  if (F(e) && e.isCollapsed() && e.anchor.type === "element" && t.contains(document.activeElement)) {
555
555
  const i = e.anchor, s = i.getNode(), o = i.offset;
@@ -585,11 +585,11 @@ function Es(n, t, e) {
585
585
  function it(n) {
586
586
  return nt ? (n || window).getSelection() : null;
587
587
  }
588
- function fo(n, t) {
588
+ function ho(n, t) {
589
589
  let e = n.getChildAtIndex(t);
590
590
  e == null && (e = n), Pt(n) && T(102);
591
591
  const r = (o) => {
592
- const l = o.getParentOrThrow(), a = Pt(l), c = o !== e || a ? Ns(o) : o;
592
+ const l = o.getParentOrThrow(), a = Pt(l), c = o !== e || a ? Es(o) : o;
593
593
  if (a) return S(o) && S(c) || T(133), o.insertAfter(c), [o, c, c];
594
594
  {
595
595
  const [u, d, f] = r(l), h = o.getNextSiblings();
@@ -598,16 +598,16 @@ function fo(n, t) {
598
598
  }, [i, s] = r(e);
599
599
  return [i, s];
600
600
  }
601
- function ho(n) {
601
+ function go(n) {
602
602
  return Ve(n) && n.tagName === "A";
603
603
  }
604
604
  function Ve(n) {
605
605
  return n.nodeType === 1;
606
606
  }
607
- function go(n) {
607
+ function _o(n) {
608
608
  return n.nodeType === 11;
609
609
  }
610
- function Ps(n) {
610
+ function Fs(n) {
611
611
  const t = new RegExp(/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var|#text)$/, "i");
612
612
  return n.nodeName.match(t) !== null;
613
613
  }
@@ -626,12 +626,12 @@ function Jt(n, t) {
626
626
  for (; e !== null && e.getParent() !== null && !t(e); ) e = e.getParentOrThrow();
627
627
  return t(e) ? e : null;
628
628
  }
629
- function _o() {
629
+ function po() {
630
630
  return A();
631
631
  }
632
- const pr = /* @__PURE__ */ new WeakMap(), Fs = /* @__PURE__ */ new Map();
632
+ const pr = /* @__PURE__ */ new WeakMap(), Ds = /* @__PURE__ */ new Map();
633
633
  function Ls(n) {
634
- if (!n._readOnly && n.isEmpty()) return Fs;
634
+ if (!n._readOnly && n.isEmpty()) return Ds;
635
635
  n._readOnly || T(192);
636
636
  let t = pr.get(n);
637
637
  if (!t) {
@@ -644,18 +644,18 @@ function Ls(n) {
644
644
  }
645
645
  return t;
646
646
  }
647
- function Ds(n) {
647
+ function Os(n) {
648
648
  const t = n.constructor.clone(n);
649
649
  return t.afterCloneFrom(n), t;
650
650
  }
651
- function Os(n, t) {
651
+ function Ms(n, t) {
652
652
  const e = (parseInt(n.style.paddingInlineStart, 10) || 0) / 40;
653
653
  t.setIndent(e);
654
654
  }
655
- function po(n) {
655
+ function yo(n) {
656
656
  n.__lexicalUnmanaged = !0;
657
657
  }
658
- function Ms(n) {
658
+ function Is(n) {
659
659
  return n.__lexicalUnmanaged === !0;
660
660
  }
661
661
  function ci(n, t, e, r, i, s) {
@@ -666,7 +666,7 @@ function ci(n, t, e, r, i, s) {
666
666
  }
667
667
  }
668
668
  let St, H, Zt, je, _n, pn, Ft, et, yn, te, W = "", j = "", rt = null, tt = "", lt = "", ui = !1, ee = !1, me = null;
669
- function Le(n, t) {
669
+ function De(n, t) {
670
670
  const e = Ft.get(n);
671
671
  if (t !== null) {
672
672
  const r = vn(n);
@@ -682,27 +682,27 @@ function mn(n, t, e, r) {
682
682
  let i = t;
683
683
  for (; i <= e; ++i) {
684
684
  const s = n[i];
685
- s !== void 0 && Le(s, r);
685
+ s !== void 0 && De(s, r);
686
686
  }
687
687
  }
688
688
  function kt(n, t) {
689
689
  n.setProperty("text-align", t);
690
690
  }
691
- const Is = "40px";
691
+ const As = "40px";
692
692
  function fi(n, t) {
693
693
  const e = St.theme.indent;
694
694
  if (typeof e == "string") {
695
695
  const i = n.classList.contains(e);
696
696
  t > 0 && !i ? n.classList.add(e) : t < 1 && i && n.classList.remove(e);
697
697
  }
698
- const r = getComputedStyle(n).getPropertyValue("--lexical-indent-base-value") || Is;
698
+ const r = getComputedStyle(n).getPropertyValue("--lexical-indent-base-value") || As;
699
699
  n.style.setProperty("padding-inline-start", t === 0 ? "" : `calc(${t} * ${r})`);
700
700
  }
701
701
  function di(n, t) {
702
702
  const e = n.style;
703
- t === 0 ? kt(e, "") : t === Fn ? kt(e, "left") : t === Ln ? kt(e, "center") : t === Dn ? kt(e, "right") : t === On ? kt(e, "justify") : t === Mn ? kt(e, "start") : t === In && kt(e, "end");
703
+ t === 0 ? kt(e, "") : t === Fn ? kt(e, "left") : t === Dn ? kt(e, "center") : t === Ln ? kt(e, "right") : t === On ? kt(e, "justify") : t === Mn ? kt(e, "start") : t === In && kt(e, "end");
704
704
  }
705
- function De(n, t) {
705
+ function Le(n, t) {
706
706
  const e = et.get(n);
707
707
  e === void 0 && T(60);
708
708
  const r = e.createDOM(St, H);
@@ -737,7 +737,7 @@ function xn(n, t, e, r, i) {
737
737
  W = "";
738
738
  let o = e;
739
739
  for (; o <= r; ++o) {
740
- De(n[o], i);
740
+ Le(n[o], i);
741
741
  const l = et.get(n[o]);
742
742
  l !== null && E(l) && (rt === null && (rt = l.getFormat()), tt === "" && (tt = l.getStyle()));
743
743
  }
@@ -761,7 +761,7 @@ function hi(n, t, e) {
761
761
  function gi(n, t) {
762
762
  const e = t.__lexicalDirTextContent || "", r = t.__lexicalDir || "";
763
763
  if (e !== j || r !== me) {
764
- const s = j === "", o = s ? me : (i = j, cs.test(i) ? "rtl" : us.test(i) ? "ltr" : null);
764
+ const s = j === "", o = s ? me : (i = j, us.test(i) ? "rtl" : fs.test(i) ? "ltr" : null);
765
765
  if (o !== r) {
766
766
  const l = t.classList, a = St.theme;
767
767
  let c = r !== null ? a[r] : void 0, u = o !== null ? a[o] : void 0;
@@ -789,7 +789,7 @@ function gi(n, t) {
789
789
  }
790
790
  var i;
791
791
  }
792
- function As(n, t, e) {
792
+ function Bs(n, t, e) {
793
793
  const r = j;
794
794
  var i;
795
795
  j = "", rt = null, tt = "", function(s, o, l) {
@@ -800,7 +800,7 @@ function As(n, t, e) {
800
800
  const f = s.__first, h = o.__first;
801
801
  if (f === h) Vt(f, d);
802
802
  else {
803
- const _ = vn(f), p = De(h, null);
803
+ const _ = vn(f), p = Le(h, null);
804
804
  try {
805
805
  d.replaceChild(p, _);
806
806
  } catch (m) {
@@ -810,7 +810,7 @@ function As(n, t, e) {
810
810
  }
811
811
  throw m;
812
812
  }
813
- Le(f, null);
813
+ De(f, null);
814
814
  }
815
815
  const g = et.get(h);
816
816
  E(g) && (rt === null && (rt = g.getFormat()), tt === "" && (tt = g.getStyle()));
@@ -824,26 +824,26 @@ function As(n, t, e) {
824
824
  }
825
825
  } else (function(g, _, p, m, y, x) {
826
826
  const b = m - 1, k = y - 1;
827
- let v, P, C = x.getFirstChild(), N = 0, L = 0;
828
- for (; N <= b && L <= k; ) {
829
- const D = _[N], R = p[L];
830
- if (D === R) C = on(Vt(R, x.element)), N++, L++;
827
+ let v, P, C = x.getFirstChild(), N = 0, D = 0;
828
+ for (; N <= b && D <= k; ) {
829
+ const L = _[N], R = p[D];
830
+ if (L === R) C = on(Vt(R, x.element)), N++, D++;
831
831
  else {
832
832
  v === void 0 && (v = new Set(_)), P === void 0 && (P = new Set(p));
833
- const dt = P.has(D), Lt = v.has(R);
834
- if (dt) if (Lt) {
833
+ const dt = P.has(L), Dt = v.has(R);
834
+ if (dt) if (Dt) {
835
835
  const fe = Fe(H, R);
836
- fe === C ? C = on(Vt(R, x.element)) : (x.withBefore(C).insertChild(fe), Vt(R, x.element)), N++, L++;
837
- } else De(R, x.withBefore(C)), L++;
838
- else C = on(vn(D)), Le(D, x.element), N++;
836
+ fe === C ? C = on(Vt(R, x.element)) : (x.withBefore(C).insertChild(fe), Vt(R, x.element)), N++, D++;
837
+ } else Le(R, x.withBefore(C)), D++;
838
+ else C = on(vn(L)), De(L, x.element), N++;
839
839
  }
840
840
  const z = et.get(R);
841
841
  z !== null && E(z) && (rt === null && (rt = z.getFormat()), tt === "" && (tt = z.getStyle()));
842
842
  }
843
- const O = N > b, B = L > k;
843
+ const O = N > b, B = D > k;
844
844
  if (O && !B) {
845
- const D = p[k + 1], R = D === void 0 ? null : H.getElementByKey(D);
846
- xn(p, g, L, k, x.withBefore(R));
845
+ const L = p[k + 1], R = L === void 0 ? null : H.getElementByKey(L);
846
+ xn(p, g, D, k, x.withBefore(R));
847
847
  } else B && !O && mn(_, N, b, x.element);
848
848
  })(o, f, h, c, u, l);
849
849
  }
@@ -879,14 +879,14 @@ function Vt(n, t) {
879
879
  return s;
880
880
  }
881
881
  if (e !== r && i && Jn(te, Zt, je, r, "updated"), r.updateDOM(e, s, St)) {
882
- const o = De(n, null);
883
- return t === null && T(62), t.replaceChild(o, s), Le(n, null), o;
882
+ const o = Le(n, null);
883
+ return t === null && T(62), t.replaceChild(o, s), De(n, null), o;
884
884
  }
885
885
  if (S(e) && S(r)) {
886
886
  const o = r.__indent;
887
887
  o !== e.__indent && fi(s, o);
888
888
  const l = r.__format;
889
- l !== e.__format && di(s, l), i && (As(e, r, s), X(r) || r.isInline() || hi(e, r, s)), Je(r) && (W += ct, lt += ct);
889
+ l !== e.__format && di(s, l), i && (Bs(e, r, s), X(r) || r.isInline() || hi(e, r, s)), Je(r) && (W += ct, lt += ct);
890
890
  } else {
891
891
  const o = r.getTextContent();
892
892
  if (I(r)) {
@@ -914,7 +914,7 @@ function on(n) {
914
914
  let t = n.nextSibling;
915
915
  return t !== null && t === H._blockCursorElement && (t = t.nextSibling), t;
916
916
  }
917
- function Bs(n, t, e, r, i, s) {
917
+ function zs(n, t, e, r, i, s) {
918
918
  W = "", lt = "", j = "", ui = r === At, me = null, H = e, St = e._config, Zt = e._nodes, je = H._listeners.mutation, _n = i, pn = s, Ft = n._nodeMap, et = t._nodeMap, ee = t._readOnly, yn = new Map(e._keyToDOMMap);
919
919
  const o = /* @__PURE__ */ new Map();
920
920
  return te = o, Vt("root", null), H = void 0, Zt = void 0, _n = void 0, pn = void 0, Ft = void 0, et = void 0, St = void 0, yn = void 0, te = void 0, o;
@@ -926,35 +926,35 @@ function vn(n) {
926
926
  const ot = Object.freeze({}), Sn = 30, Cn = [["keydown", function(n, t) {
927
927
  if (Gt = n.timeStamp, pi = n.key, t.isComposing()) return;
928
928
  const { key: e, shiftKey: r, ctrlKey: i, metaKey: s, altKey: o } = n;
929
- if (!w(t, Ai, n) && e != null) {
929
+ if (!w(t, Bi, n) && e != null) {
930
930
  if (function(l, a, c, u) {
931
931
  return ur(l) && !a && !u && !c;
932
- }(e, i, o, s)) w(t, Bi, n);
932
+ }(e, i, o, s)) w(t, zi, n);
933
933
  else if (function(l, a, c, u, d) {
934
934
  return ur(l) && !u && !c && (a || d);
935
- }(e, i, r, o, s)) w(t, zi, n);
935
+ }(e, i, r, o, s)) w(t, Wi, n);
936
936
  else if (function(l, a, c, u) {
937
937
  return cr(l) && !a && !u && !c;
938
- }(e, i, o, s)) w(t, Wi, n);
938
+ }(e, i, o, s)) w(t, Ri, n);
939
939
  else if (function(l, a, c, u, d) {
940
940
  return cr(l) && !u && !c && (a || d);
941
- }(e, i, r, o, s)) w(t, Ri, n);
941
+ }(e, i, r, o, s)) w(t, Ki, n);
942
942
  else if (/* @__PURE__ */ function(l, a, c) {
943
943
  return /* @__PURE__ */ function(u) {
944
944
  return u === "ArrowUp";
945
945
  }(l) && !a && !c;
946
- }(e, i, s)) w(t, Ki, n);
946
+ }(e, i, s)) w(t, Ji, n);
947
947
  else if (/* @__PURE__ */ function(l, a, c) {
948
948
  return /* @__PURE__ */ function(u) {
949
949
  return u === "ArrowDown";
950
950
  }(l) && !a && !c;
951
- }(e, i, s)) w(t, Ji, n);
951
+ }(e, i, s)) w(t, $i, n);
952
952
  else if (function(l, a) {
953
953
  return fr(l) && a;
954
954
  }(e, r)) Qt = !0, w(t, hn, n);
955
955
  else if (/* @__PURE__ */ function(l) {
956
956
  return l === " ";
957
- }(e)) w(t, $i, n);
957
+ }(e)) w(t, Ui, n);
958
958
  else if (function(l, a) {
959
959
  return Z && a && l.toLowerCase() === "o";
960
960
  }(e, i)) n.preventDefault(), Qt = !0, w(t, ye, !0);
@@ -963,13 +963,13 @@ const ot = Object.freeze({}), Sn = 30, Cn = [["keydown", function(n, t) {
963
963
  }(e, r)) Qt = !1, w(t, hn, n);
964
964
  else if (function(l, a, c, u) {
965
965
  return Z ? !a && !c && (Rt(l) || l.toLowerCase() === "h" && u) : !(u || a || c) && Rt(l);
966
- }(e, o, s, i)) Rt(e) ? w(t, Ui, n) : (n.preventDefault(), w(t, ve, !0));
966
+ }(e, o, s, i)) Rt(e) ? w(t, Vi, n) : (n.preventDefault(), w(t, ve, !0));
967
967
  else if (/* @__PURE__ */ function(l) {
968
968
  return l === "Escape";
969
- }(e)) w(t, Vi, n);
969
+ }(e)) w(t, ji, n);
970
970
  else if (function(l, a, c, u, d) {
971
971
  return Z ? !(c || u || d) && (Kt(l) || l.toLowerCase() === "d" && a) : !(a || u || d) && Kt(l);
972
- }(e, i, r, o, s)) Kt(e) ? w(t, ji, n) : (n.preventDefault(), w(t, ve, !1));
972
+ }(e, i, r, o, s)) Kt(e) ? w(t, Hi, n) : (n.preventDefault(), w(t, ve, !1));
973
973
  else if (function(l, a, c) {
974
974
  return Rt(l) && (Z ? a : c);
975
975
  }(e, o, i)) n.preventDefault(), w(t, Se, !0);
@@ -993,7 +993,7 @@ const ot = Object.freeze({}), Sn = 30, Cn = [["keydown", function(n, t) {
993
993
  }(e, o, s, i)) n.preventDefault(), w(t, wt, "italic");
994
994
  else if (/* @__PURE__ */ function(l, a, c, u) {
995
995
  return l === "Tab" && !a && !c && !u;
996
- }(e, o, i, s)) w(t, Hi, n);
996
+ }(e, o, i, s)) w(t, qi, n);
997
997
  else if (function(l, a, c, u) {
998
998
  return l.toLowerCase() === "z" && !a && Ut(c, u);
999
999
  }(e, r, s, i)) n.preventDefault(), w(t, Jr, void 0);
@@ -1010,7 +1010,7 @@ const ot = Object.freeze({}), Sn = 30, Cn = [["keydown", function(n, t) {
1010
1010
  }
1011
1011
  /* @__PURE__ */ (function(l, a, c, u) {
1012
1012
  return l || a || c || u;
1013
- })(i, r, o, s) && w(t, ts, n);
1013
+ })(i, r, o, s) && w(t, es, n);
1014
1014
  }
1015
1015
  }], ["pointerdown", function(n, t) {
1016
1016
  const e = n.target, r = n.pointerType;
@@ -1022,7 +1022,7 @@ const ot = Object.freeze({}), Sn = 30, Cn = [["keydown", function(n, t) {
1022
1022
  const e = M();
1023
1023
  if (F(e) && !t.isComposing()) {
1024
1024
  const r = e.anchor, i = e.anchor.getNode();
1025
- U(r.key), (n.timeStamp < Gt + Sn || r.type === "element" || !e.isCollapsed() || i.getFormat() !== e.format || E(i) && i.getStyle() !== e.style) && w(t, jt, as);
1025
+ U(r.key), (n.timeStamp < Gt + Sn || r.type === "element" || !e.isCollapsed() || i.getFormat() !== e.format || E(i) && i.getStyle() !== e.style) && w(t, jt, cs);
1026
1026
  }
1027
1027
  });
1028
1028
  }], ["compositionend", function(n, t) {
@@ -1043,7 +1043,7 @@ const ot = Object.freeze({}), Sn = 30, Cn = [["keydown", function(n, t) {
1043
1043
  } else
1044
1044
  Rn(!1, t, r !== null ? r : void 0), $t && (ln(t, r || void 0), $t = !1);
1045
1045
  q(), Xr(A());
1046
- }), Dt = null;
1046
+ }), Lt = null;
1047
1047
  }], ["click", function(n, t) {
1048
1048
  Q(t, () => {
1049
1049
  const e = M(), r = it(t._window), i = ae();
@@ -1059,7 +1059,7 @@ const ot = Object.freeze({}), Sn = 30, Cn = [["keydown", function(n, t) {
1059
1059
  }
1060
1060
  }
1061
1061
  }
1062
- w(t, Ii, n);
1062
+ w(t, Ai, n);
1063
1063
  });
1064
1064
  }], ["cut", ot], ["copy", ot], ["dragstart", ot], ["dragover", ot], ["dragend", ot], ["paste", ot], ["focus", ot], ["blur", ot], ["drop", ot]];
1065
1065
  Te && Cn.push(["beforeinput", (n, t) => function(e, r) {
@@ -1086,7 +1086,7 @@ Te && Cn.push(["beforeinput", (n, t) => function(e, r) {
1086
1086
  } else {
1087
1087
  U(null), e.preventDefault();
1088
1088
  const g = o.anchor.getNode(), _ = g.getTextContent(), p = g.canInsertTextAfter(), m = o.anchor.offset === 0 && o.focus.offset === _.length;
1089
- rs && h && !m && p || w(r, ve, !0);
1089
+ is && h && !m && p || w(r, ve, !0);
1090
1090
  }
1091
1091
  return;
1092
1092
  }
@@ -1094,7 +1094,7 @@ Te && Cn.push(["beforeinput", (n, t) => function(e, r) {
1094
1094
  var l;
1095
1095
  if (!F(o)) return;
1096
1096
  const a = e.data;
1097
- Dt !== null && Rn(!1, r, Dt), o.dirty && Dt === null || !o.isCollapsed() || X(o.anchor.getNode()) || s === null || o.applyDOMRange(s), Dt = null;
1097
+ Lt !== null && Rn(!1, r, Lt), o.dirty && Lt === null || !o.isCollapsed() || X(o.anchor.getNode()) || s === null || o.applyDOMRange(s), Lt = null;
1098
1098
  const c = o.anchor, u = o.focus, d = c.getNode(), f = u.getNode();
1099
1099
  if (i !== "insertText" && i !== "insertTranspose") switch (e.preventDefault(), i) {
1100
1100
  case "insertFromYank":
@@ -1167,17 +1167,17 @@ Te && Cn.push(["beforeinput", (n, t) => function(e, r) {
1167
1167
  else if (a == null && e.dataTransfer) {
1168
1168
  const h = e.dataTransfer.getData("text/plain");
1169
1169
  e.preventDefault(), o.insertRawText(h);
1170
- } else a != null && xi(o, s, a, e.timeStamp, !0) ? (e.preventDefault(), w(r, jt, a)) : Dt = a;
1170
+ } else a != null && xi(o, s, a, e.timeStamp, !0) ? (e.preventDefault(), w(r, jt, a)) : Lt = a;
1171
1171
  yi = e.timeStamp;
1172
1172
  }
1173
1173
  });
1174
1174
  }(n, t)]);
1175
- let Gt = 0, pi = null, yi = 0, Dt = null;
1175
+ let Gt = 0, pi = null, yi = 0, Lt = null;
1176
1176
  const Me = /* @__PURE__ */ new WeakMap();
1177
1177
  let Tn = !1, kn = !1, Qt = !1, $t = !1, mi = [0, "", 0, "root", 0];
1178
1178
  function xi(n, t, e, r, i) {
1179
1179
  const s = n.anchor, o = n.focus, l = s.getNode(), a = A(), c = it(a._window), u = c !== null ? c.anchorNode : null, d = s.key, f = a.getElementByKey(d), h = e.length;
1180
- return d !== o.key || !E(l) || (!i && (!Te || yi < r + 50) || l.isDirty() && h < 2 || si(e)) && s.offset !== o.offset && !l.isComposing() || bt(l) || l.isDirty() && h > 1 || (i || !Te) && f !== null && !l.isComposing() && u !== Ne(f) || c !== null && t !== null && (!t.collapsed || t.startContainer !== c.anchorNode || t.startOffset !== c.anchorOffset) || l.getFormat() !== n.format || l.getStyle() !== n.style || bs(n, l);
1180
+ return d !== o.key || !E(l) || (!i && (!Te || yi < r + 50) || l.isDirty() && h < 2 || si(e)) && s.offset !== o.offset && !l.isComposing() || bt(l) || l.isDirty() && h > 1 || (i || !Te) && f !== null && !l.isComposing() && u !== Ne(f) || c !== null && t !== null && (!t.collapsed || t.startContainer !== c.anchorNode || t.startOffset !== c.anchorOffset) || l.getFormat() !== n.format || l.getStyle() !== n.style || ws(n, l);
1181
1181
  }
1182
1182
  function mr(n, t) {
1183
1183
  return n !== null && n.nodeValue !== null && n.nodeType === Ct && t !== 0 && t !== n.nodeValue.length;
@@ -1201,7 +1201,7 @@ function xr(n, t, e) {
1201
1201
  }
1202
1202
  } else {
1203
1203
  const u = a.key, d = l.focus.key, f = l.getNodes(), h = f.length, g = l.isBackward(), _ = g ? o : i, p = g ? i : o, m = g ? d : u, y = g ? u : d;
1204
- let x = ls, b = !1;
1204
+ let x = as, b = !1;
1205
1205
  for (let k = 0; k < h; k++) {
1206
1206
  const v = f[k], P = v.getTextContentSize();
1207
1207
  if (E(v) && P !== 0 && !(k === 0 && v.__key === m && _ === P || k === h - 1 && v.__key === y && p === 0) && (b = !0, x &= v.getFormat(), x === 0)) break;
@@ -1260,7 +1260,7 @@ function vr(n) {
1260
1260
  function Sr(n) {
1261
1261
  return n._lexicalHandled === !0;
1262
1262
  }
1263
- function zs(n) {
1263
+ function Ws(n) {
1264
1264
  const t = n.ownerDocument, e = Me.get(t);
1265
1265
  e === void 0 && T(162);
1266
1266
  const r = e - 1;
@@ -1496,7 +1496,7 @@ class He {
1496
1496
  q();
1497
1497
  const t = ft(), e = A(), r = t._nodeMap, i = this.__key, s = this.getLatest(), o = e._cloneNotNeeded, l = M();
1498
1498
  if (l !== null && l.setCachedNodes(null), o.has(i)) return Pe(s), s;
1499
- const a = Ds(s);
1499
+ const a = Os(s);
1500
1500
  return o.add(i), Pe(a), r.set(i, a), a;
1501
1501
  }
1502
1502
  getTextContent() {
@@ -1652,7 +1652,7 @@ class oe extends He {
1652
1652
  if (s === e || s.previousSibling === e && _e(s)) return !0;
1653
1653
  }
1654
1654
  return !1;
1655
- }(t) ? null : { conversion: Ws, priority: 0 } };
1655
+ }(t) ? null : { conversion: Rs, priority: 0 } };
1656
1656
  }
1657
1657
  static importJSON(t) {
1658
1658
  return ne();
@@ -1661,7 +1661,7 @@ class oe extends He {
1661
1661
  return { type: "linebreak", version: 1 };
1662
1662
  }
1663
1663
  }
1664
- function Ws(n) {
1664
+ function Rs(n) {
1665
1665
  return { node: ne() };
1666
1666
  }
1667
1667
  function ne() {
@@ -1744,7 +1744,7 @@ class Bt extends He {
1744
1744
  }
1745
1745
  getMode() {
1746
1746
  const t = this.getLatest();
1747
- return gs[t.__mode];
1747
+ return _s[t.__mode];
1748
1748
  }
1749
1749
  getStyle() {
1750
1750
  return this.getLatest().__style;
@@ -1804,7 +1804,7 @@ class Bt extends He {
1804
1804
  return h !== g && (e.style.cssText = g), !1;
1805
1805
  }
1806
1806
  static importDOM() {
1807
- return { "#text": () => ({ conversion: $s, priority: 0 }), b: () => ({ conversion: Ks, priority: 0 }), code: () => ({ conversion: gt, priority: 0 }), em: () => ({ conversion: gt, priority: 0 }), i: () => ({ conversion: gt, priority: 0 }), s: () => ({ conversion: gt, priority: 0 }), span: () => ({ conversion: Rs, priority: 0 }), strong: () => ({ conversion: gt, priority: 0 }), sub: () => ({ conversion: gt, priority: 0 }), sup: () => ({ conversion: gt, priority: 0 }), u: () => ({ conversion: gt, priority: 0 }) };
1807
+ return { "#text": () => ({ conversion: Us, priority: 0 }), b: () => ({ conversion: Js, priority: 0 }), code: () => ({ conversion: gt, priority: 0 }), em: () => ({ conversion: gt, priority: 0 }), i: () => ({ conversion: gt, priority: 0 }), s: () => ({ conversion: gt, priority: 0 }), span: () => ({ conversion: Ks, priority: 0 }), strong: () => ({ conversion: gt, priority: 0 }), sub: () => ({ conversion: gt, priority: 0 }), sup: () => ({ conversion: gt, priority: 0 }), u: () => ({ conversion: gt, priority: 0 }) };
1808
1808
  }
1809
1809
  static importJSON(t) {
1810
1810
  const e = $(t.text);
@@ -1825,7 +1825,7 @@ class Bt extends He {
1825
1825
  }
1826
1826
  setDetail(t) {
1827
1827
  const e = this.getWritable();
1828
- return e.__detail = typeof t == "string" ? fs[t] : t, e;
1828
+ return e.__detail = typeof t == "string" ? ds[t] : t, e;
1829
1829
  }
1830
1830
  setStyle(t) {
1831
1831
  const e = this.getWritable();
@@ -1844,7 +1844,7 @@ class Bt extends He {
1844
1844
  return t.__detail ^= 2, t;
1845
1845
  }
1846
1846
  setMode(t) {
1847
- const e = hs[t];
1847
+ const e = gs[t];
1848
1848
  if (this.__mode === e) return this;
1849
1849
  const r = this.getWritable();
1850
1850
  return r.__mode = e, r;
@@ -1913,12 +1913,12 @@ class Bt extends He {
1913
1913
  for (let k = 1; k < u; k++) {
1914
1914
  const v = l[k], P = v.length, C = $(v).getWritable();
1915
1915
  C.__format = g, C.__style = _, C.__detail = p;
1916
- const N = C.__key, L = b + P;
1916
+ const N = C.__key, D = b + P;
1917
1917
  if (F(y)) {
1918
1918
  const O = y.anchor, B = y.focus;
1919
- O.key === i && O.type === "text" && O.offset > b && O.offset <= L && (O.key = N, O.offset -= b, y.dirty = !0), B.key === i && B.type === "text" && B.offset > b && B.offset <= L && (B.key = N, B.offset -= b, y.dirty = !0);
1919
+ O.key === i && O.type === "text" && O.offset > b && O.offset <= D && (O.key = N, O.offset -= b, y.dirty = !0), B.key === i && B.type === "text" && B.offset > b && B.offset <= D && (B.key = N, B.offset -= b, y.dirty = !0);
1920
1920
  }
1921
- s === i && U(N), b = L, x.push(C);
1921
+ s === i && U(N), b = D, x.push(C);
1922
1922
  }
1923
1923
  if (f !== null) {
1924
1924
  (function(P) {
@@ -1949,25 +1949,25 @@ class Bt extends He {
1949
1949
  return !1;
1950
1950
  }
1951
1951
  }
1952
- function Rs(n) {
1952
+ function Ks(n) {
1953
1953
  return { forChild: Un(n.style), node: null };
1954
1954
  }
1955
- function Ks(n) {
1955
+ function Js(n) {
1956
1956
  const t = n, e = t.style.fontWeight === "normal";
1957
1957
  return { forChild: Un(t.style, e ? void 0 : "bold"), node: null };
1958
1958
  }
1959
1959
  const Tr = /* @__PURE__ */ new WeakMap();
1960
- function Js(n) {
1960
+ function $s(n) {
1961
1961
  return n.nodeName === "PRE" || n.nodeType === ie && n.style !== void 0 && n.style.whiteSpace !== void 0 && n.style.whiteSpace.startsWith("pre");
1962
1962
  }
1963
- function $s(n) {
1963
+ function Us(n) {
1964
1964
  const t = n;
1965
1965
  n.parentElement === null && T(129);
1966
1966
  let e = t.textContent || "";
1967
1967
  if (function(r) {
1968
1968
  let i, s = r.parentNode;
1969
1969
  const o = [r];
1970
- for (; s !== null && (i = Tr.get(s)) === void 0 && !Js(s); ) o.push(s), s = s.parentNode;
1970
+ for (; s !== null && (i = Tr.get(s)) === void 0 && !$s(s); ) o.push(s), s = s.parentNode;
1971
1971
  const l = i === void 0 ? s : i;
1972
1972
  for (let a = 0; a < o.length; a++) Tr.set(o[a], l);
1973
1973
  return l;
@@ -2015,7 +2015,7 @@ function kr(n, t) {
2015
2015
  }
2016
2016
  if (e = r, e.nodeType === ie) {
2017
2017
  const s = e.style.display;
2018
- if (s === "" && !Ps(e) || s !== "" && !s.startsWith("inline")) return null;
2018
+ if (s === "" && !Fs(e) || s !== "" && !s.startsWith("inline")) return null;
2019
2019
  }
2020
2020
  let i = e;
2021
2021
  for (; (i = t ? e.firstChild : e.lastChild) !== null; ) e = i;
@@ -2023,9 +2023,9 @@ function kr(n, t) {
2023
2023
  if (e.nodeName === "BR") return null;
2024
2024
  }
2025
2025
  }
2026
- const Us = { code: "code", em: "italic", i: "italic", s: "strikethrough", strong: "bold", sub: "subscript", sup: "superscript", u: "underline" };
2026
+ const Vs = { code: "code", em: "italic", i: "italic", s: "strikethrough", strong: "bold", sub: "subscript", sup: "superscript", u: "underline" };
2027
2027
  function gt(n) {
2028
- const t = Us[n.nodeName.toLowerCase()];
2028
+ const t = Vs[n.nodeName.toLowerCase()];
2029
2029
  return t === void 0 ? { node: null } : { forChild: Un(n.style, t), node: null };
2030
2030
  }
2031
2031
  function $(n = "") {
@@ -2080,10 +2080,10 @@ class le extends Bt {
2080
2080
  function Vn() {
2081
2081
  return Ue(new le());
2082
2082
  }
2083
- function Vs(n) {
2083
+ function js(n) {
2084
2084
  return n instanceof le;
2085
2085
  }
2086
- class js {
2086
+ class Hs {
2087
2087
  constructor(t, e, r) {
2088
2088
  this._selection = null, this.key = t, this.offset = e, this.type = r;
2089
2089
  }
@@ -2113,7 +2113,7 @@ class js {
2113
2113
  }
2114
2114
  }
2115
2115
  function st(n, t, e) {
2116
- return new js(n, t, e);
2116
+ return new Hs(n, t, e);
2117
2117
  }
2118
2118
  function un(n, t) {
2119
2119
  let e = t.__key, r = n.offset, i = "element";
@@ -2333,7 +2333,7 @@ class Tt {
2333
2333
  }
2334
2334
  const p = f.getFormat(), m = f.getStyle();
2335
2335
  if (a !== c || p === i && m === s) {
2336
- if (Vs(f)) {
2336
+ if (js(f)) {
2337
2337
  const x = $(t);
2338
2338
  return x.setFormat(i), x.setStyle(s), x.select(), void f.replace(x);
2339
2339
  }
@@ -2377,8 +2377,8 @@ class Tt {
2377
2377
  if (!v) {
2378
2378
  let C = y, N = null;
2379
2379
  for (; C !== null; ) {
2380
- const L = C.getChildren(), O = L.length;
2381
- (O === 0 || L[O - 1].is(N)) && (p.delete(C.__key), N = C), C = C.getParent();
2380
+ const D = C.getChildren(), O = D.length;
2381
+ (O === 0 || D[O - 1].is(N)) && (p.delete(C.__key), N = C), C = C.getParent();
2382
2382
  }
2383
2383
  }
2384
2384
  if (f.isToken()) if (a === h) f.select();
@@ -2388,8 +2388,8 @@ class Tt {
2388
2388
  }
2389
2389
  else f = f.spliceText(a, h - a, t, !0), f.getTextContent() === "" ? f.remove() : f.isComposing() && this.anchor.type === "text" && (this.anchor.offset -= t.length);
2390
2390
  for (let C = 1; C < d; C++) {
2391
- const N = u[C], L = N.__key;
2392
- p.has(L) || N.remove();
2391
+ const N = u[C], D = N.__key;
2392
+ p.has(D) || N.remove();
2393
2393
  }
2394
2394
  }
2395
2395
  }
@@ -2549,7 +2549,7 @@ class Tt {
2549
2549
  const i = this.focus, s = this.anchor, o = t === "move", l = gr(i, e);
2550
2550
  if (I(l) && !l.isIsolated()) {
2551
2551
  if (o && l.isKeyboardSelectable()) {
2552
- const h = Lr();
2552
+ const h = Dr();
2553
2553
  return h.add(l.__key), void ut(h);
2554
2554
  }
2555
2555
  const f = e ? l.getPreviousSibling() : l.getNextSibling();
@@ -2569,7 +2569,7 @@ class Tt {
2569
2569
  if (d === null || u === null || !S(l) || l.isInline() || l.canBeEmpty() || $n(u, a, d), function(f, h, g, _) {
2570
2570
  f.modify(h, g, _);
2571
2571
  }(c, t, e ? "backward" : "forward", r), c.rangeCount > 0) {
2572
- const f = c.getRangeAt(0), h = this.anchor.getNode(), g = X(h) ? h : ws(h);
2572
+ const f = c.getRangeAt(0), h = this.anchor.getNode(), g = X(h) ? h : Ns(h);
2573
2573
  if (this.applyDOMRange(f), this.dirty = !0, !o) {
2574
2574
  const _ = this.getNodes(), p = [];
2575
2575
  let m = !1;
@@ -2608,7 +2608,7 @@ class Tt {
2608
2608
  if (I(o) && !o.isIsolated()) {
2609
2609
  if (o.isKeyboardSelectable() && S(i) && i.getChildrenSize() === 0) {
2610
2610
  i.remove();
2611
- const l = Lr();
2611
+ const l = Dr();
2612
2612
  l.add(o.__key), ut(l);
2613
2613
  } else
2614
2614
  o.remove(), A().dispatchCommand(Nn, void 0);
@@ -2773,21 +2773,21 @@ function wi(n, t, e, r, i, s) {
2773
2773
  }
2774
2774
  return bi(o, l, s), [o, l];
2775
2775
  }
2776
- function yo(n) {
2776
+ function mo(n) {
2777
2777
  return S(n) && !n.isInline();
2778
2778
  }
2779
2779
  function Ni(n, t, e, r, i, s) {
2780
2780
  const o = ft(), l = new Tt(st(n, t, i), st(e, r, s), 0, "");
2781
2781
  return l.dirty = !0, o._selection = l, l;
2782
2782
  }
2783
- function mo() {
2783
+ function xo() {
2784
2784
  const n = st("root", 0, "element"), t = st("root", 0, "element");
2785
2785
  return new Tt(n, t, 0, "");
2786
2786
  }
2787
- function Lr() {
2787
+ function Dr() {
2788
2788
  return new qe(/* @__PURE__ */ new Set());
2789
2789
  }
2790
- function xo(n, t) {
2790
+ function vo(n, t) {
2791
2791
  return Ge(null, n, t, null);
2792
2792
  }
2793
2793
  function Ge(n, t, e, r) {
@@ -2817,7 +2817,7 @@ function Ie(n, t, e, r = 1) {
2817
2817
  const c = i.offset;
2818
2818
  if (e <= c && r > 0 || e < c && r < 0) {
2819
2819
  const u = Math.max(0, c + r);
2820
- i.set(a, u, "element"), s.set(a, u, "element"), Dr(n);
2820
+ i.set(a, u, "element"), s.set(a, u, "element"), Lr(n);
2821
2821
  }
2822
2822
  } else {
2823
2823
  const c = n.isBackward(), u = c ? s : i, d = u.getNode(), f = c ? i : s, h = f.getNode();
@@ -2830,9 +2830,9 @@ function Ie(n, t, e, r = 1) {
2830
2830
  (e <= g && r > 0 || e < g && r < 0) && f.set(a, Math.max(0, g + r), "element");
2831
2831
  }
2832
2832
  }
2833
- Dr(n);
2833
+ Lr(n);
2834
2834
  }
2835
- function Dr(n) {
2835
+ function Lr(n) {
2836
2836
  const t = n.anchor, e = t.offset, r = n.focus, i = r.offset, s = t.getNode(), o = r.getNode();
2837
2837
  if (n.isCollapsed()) {
2838
2838
  if (!S(s)) return;
@@ -2865,7 +2865,7 @@ function Ae(n, t, e, r, i) {
2865
2865
  function Or(n, t, e, r, i) {
2866
2866
  n.type === "text" ? (n.key = e, t || (n.offset += i)) : n.offset > r.getIndexWithinParent() && (n.offset -= 1);
2867
2867
  }
2868
- function Hs(n, t, e, r, i, s, o) {
2868
+ function qs(n, t, e, r, i, s, o) {
2869
2869
  const l = r.anchorNode, a = r.focusNode, c = r.anchorOffset, u = r.focusOffset, d = document.activeElement;
2870
2870
  if (i.has("collaboration") && d !== s || d !== null && Zr(d)) return;
2871
2871
  if (!F(t)) return void (n !== null && We(e, l, a) && r.removeAllRanges());
@@ -2876,8 +2876,8 @@ function Hs(n, t, e, r, i, s, o) {
2876
2876
  const z = f.getNode();
2877
2877
  N = z.getFormat() !== b || z.getStyle() !== k;
2878
2878
  } else F(n) && n.anchor.type === "text" && (N = !0);
2879
- var L, O, B, D, R;
2880
- if (h.type === "text" && (C = Ne(m)), P !== null && C !== null && (v && (n === null || N || F(n) && (n.format !== b || n.style !== k)) && (L = b, O = k, B = y, D = g, R = performance.now(), mi = [L, O, B, D, R]), c !== y || u !== x || l !== P || a !== C || r.type === "Range" && v || (d !== null && s.contains(d) || s.focus({ preventScroll: !0 }), f.type === "element"))) {
2879
+ var D, O, B, L, R;
2880
+ if (h.type === "text" && (C = Ne(m)), P !== null && C !== null && (v && (n === null || N || F(n) && (n.format !== b || n.style !== k)) && (D = b, O = k, B = y, L = g, R = performance.now(), mi = [D, O, B, L, R]), c !== y || u !== x || l !== P || a !== C || r.type === "Range" && v || (d !== null && s.contains(d) || s.focus({ preventScroll: !0 }), f.type === "element"))) {
2881
2881
  try {
2882
2882
  r.setBaseAndExtent(P, y, C, x);
2883
2883
  } catch {
@@ -2887,16 +2887,16 @@ function Hs(n, t, e, r, i, s, o) {
2887
2887
  if (z !== null) {
2888
2888
  let dt;
2889
2889
  if (z instanceof Text) {
2890
- const Lt = document.createRange();
2891
- Lt.selectNode(z), dt = Lt.getBoundingClientRect();
2890
+ const Dt = document.createRange();
2891
+ Dt.selectNode(z), dt = Dt.getBoundingClientRect();
2892
2892
  } else dt = z.getBoundingClientRect();
2893
- (function(Lt, fe, Gn) {
2893
+ (function(Dt, fe, Gn) {
2894
2894
  const Qn = Gn.ownerDocument, Xn = Qn.defaultView;
2895
2895
  if (Xn === null) return;
2896
2896
  let { top: Ze, bottom: tn } = fe, de = 0, he = 0, ht = Gn;
2897
2897
  for (; ht !== null; ) {
2898
2898
  const en = ht === Qn.body;
2899
- if (en) de = 0, he = $e(Lt).innerHeight;
2899
+ if (en) de = 0, he = $e(Dt).innerHeight;
2900
2900
  else {
2901
2901
  const ge = ht.getBoundingClientRect();
2902
2902
  de = ge.top, he = ge.bottom;
@@ -2918,7 +2918,7 @@ function Hs(n, t, e, r, i, s, o) {
2918
2918
  Tn = !0;
2919
2919
  }
2920
2920
  }
2921
- function vo(n) {
2921
+ function So(n) {
2922
2922
  let t = M() || ae();
2923
2923
  t === null && (t = Y().selectEnd()), t.insertNodes(n);
2924
2924
  }
@@ -2929,10 +2929,10 @@ function fn(n) {
2929
2929
  F(e) && (t = e), F(t) || T(161);
2930
2930
  const r = t.anchor;
2931
2931
  let i = r.getNode(), s = r.offset;
2932
- for (; !_t(i); ) [i, s] = qs(i, s);
2932
+ for (; !_t(i); ) [i, s] = Gs(i, s);
2933
2933
  return s;
2934
2934
  }
2935
- function qs(n, t) {
2935
+ function Gs(n, t) {
2936
2936
  const e = n.getParent();
2937
2937
  if (!e) {
2938
2938
  const i = vt();
@@ -2983,7 +2983,7 @@ function Pi() {
2983
2983
  let r = ` Detected on the page: ${n} compatible editor(s) with version ${e}`;
2984
2984
  return t.size && (r += ` and incompatible editors with versions ${Array.from(t).join(", ")}`), r;
2985
2985
  }
2986
- function Gs() {
2986
+ function Qs() {
2987
2987
  return J;
2988
2988
  }
2989
2989
  function Ir(n, t, e) {
@@ -3006,7 +3006,7 @@ function Fi(n, t) {
3006
3006
  Array.isArray(t) || (r = [t]);
3007
3007
  for (const i of r) e.add(i);
3008
3008
  }
3009
- function So(n) {
3009
+ function Co(n) {
3010
3010
  return Hn(n, A()._nodes);
3011
3011
  }
3012
3012
  function Hn(n, t) {
@@ -3039,10 +3039,10 @@ function mt(n, t) {
3039
3039
  J = n, K = e, G = !1, n._updating = !0;
3040
3040
  try {
3041
3041
  const v = n._dirtyType, P = n._dirtyElements, C = n._dirtyLeaves;
3042
- h.disconnect(), g = Bs(s, e, n, v, P, C);
3042
+ h.disconnect(), g = zs(s, e, n, v, P, C);
3043
3043
  } catch (v) {
3044
3044
  if (v instanceof Error && n._onError(v), dn) throw v;
3045
- return Mi(n, null, r, e), Yr(n), n._dirtyType = At, dn = !0, mt(n, s), void (dn = !1);
3045
+ return Ii(n, null, r, e), Yr(n), n._dirtyType = At, dn = !0, mt(n, s), void (dn = !1);
3046
3046
  } finally {
3047
3047
  h.observe(r, Mr), n._updating = f, K = c, G = u, J = d;
3048
3048
  }
@@ -3052,9 +3052,9 @@ function mt(n, t) {
3052
3052
  a && (n._dirtyType = Et, n._cloneNotNeeded.clear(), n._dirtyLeaves = /* @__PURE__ */ new Set(), n._dirtyElements = /* @__PURE__ */ new Map(), n._normalizedNodes = /* @__PURE__ */ new Set(), n._updateTags = /* @__PURE__ */ new Set()), function(v, P) {
3053
3053
  const C = v._decorators;
3054
3054
  let N = v._pendingDecorators || C;
3055
- const L = P._nodeMap;
3055
+ const D = P._nodeMap;
3056
3056
  let O;
3057
- for (O in N) L.has(O) || (N === C && (N = ri(v)), delete N[O]);
3057
+ for (O in N) D.has(O) || (N === C && (N = ri(v)), delete N[O]);
3058
3058
  }(n, e);
3059
3059
  const b = i ? null : it(n._window);
3060
3060
  if (n._editable && b !== null && (a || l === null || l.dirty)) {
@@ -3062,24 +3062,24 @@ function mt(n, t) {
3062
3062
  try {
3063
3063
  if (h !== null && h.disconnect(), a || l === null || l.dirty) {
3064
3064
  const v = n._blockCursorElement;
3065
- v !== null && $n(v, n, r), Hs(o, l, n, b, y, r);
3065
+ v !== null && $n(v, n, r), qs(o, l, n, b, y, r);
3066
3066
  }
3067
- Es(n, r, l), h !== null && h.observe(r, Mr);
3067
+ Ps(n, r, l), h !== null && h.observe(r, Mr);
3068
3068
  } finally {
3069
3069
  J = d, K = c;
3070
3070
  }
3071
3071
  }
3072
- g !== null && function(v, P, C, N, L) {
3072
+ g !== null && function(v, P, C, N, D) {
3073
3073
  const O = Array.from(v._listeners.mutation), B = O.length;
3074
- for (let D = 0; D < B; D++) {
3075
- const [R, z] = O[D], dt = P.get(z);
3076
- dt !== void 0 && R(dt, { dirtyLeaves: N, prevEditorState: L, updateTags: C });
3074
+ for (let L = 0; L < B; L++) {
3075
+ const [R, z] = O[L], dt = P.get(z);
3076
+ dt !== void 0 && R(dt, { dirtyLeaves: N, prevEditorState: D, updateTags: C });
3077
3077
  }
3078
3078
  }(n, g, y, _, s), F(l) || l === null || o !== null && o.is(l) || n.dispatchCommand(Nn, void 0);
3079
3079
  const k = n._pendingDecorators;
3080
3080
  k !== null && (n._decorators = k, n._pendingDecorators = null, Xt("decorator", n, !0, k)), function(v, P, C) {
3081
- const N = lr(P), L = lr(C);
3082
- N !== L && Xt("textcontent", v, !0, L);
3081
+ const N = lr(P), D = lr(C);
3082
+ N !== D && Xt("textcontent", v, !0, D);
3083
3083
  }(n, t || s, e), Xt("update", n, !0, { dirtyElements: p, dirtyLeaves: _, editorState: e, normalizedNodes: m, prevEditorState: t || s, tags: y }), function(v, P) {
3084
3084
  if (v._deferred = [], P.length !== 0) {
3085
3085
  const C = v._updating;
@@ -3095,8 +3095,8 @@ function mt(n, t) {
3095
3095
  if (P.length !== 0) {
3096
3096
  const C = P.shift();
3097
3097
  if (C) {
3098
- const [N, L] = C;
3099
- Di(v, N, L);
3098
+ const [N, D] = C;
3099
+ Li(v, N, D);
3100
3100
  }
3101
3101
  }
3102
3102
  }(n);
@@ -3111,11 +3111,11 @@ function Xt(n, t, e, ...r) {
3111
3111
  t._updating = i;
3112
3112
  }
3113
3113
  }
3114
- function Li(n, t, e) {
3114
+ function Di(n, t, e) {
3115
3115
  if (n._updating === !1 || J !== n) {
3116
3116
  let i = !1;
3117
3117
  return n.update(() => {
3118
- i = Li(n, t, e);
3118
+ i = Di(n, t, e);
3119
3119
  }), i;
3120
3120
  }
3121
3121
  const r = Wn(n);
@@ -3151,13 +3151,13 @@ function zr(n, t) {
3151
3151
  }
3152
3152
  return r;
3153
3153
  }
3154
- function Di(n, t, e) {
3154
+ function Li(n, t, e) {
3155
3155
  const r = n._updateTags;
3156
3156
  let i, s = !1, o = !1;
3157
3157
  e !== void 0 && (i = e.onUpdate, Fi(n, e.tag), s = e.skipTransforms || !1, o = e.discrete || !1), i && n._deferred.push(i);
3158
3158
  const l = n._editorState;
3159
3159
  let a = n._pendingEditorState, c = !1;
3160
- (a === null || a._readOnly) && (a = n._pendingEditorState = new Xe(new Map((a || l)._nodeMap)), c = !0), a._flushSync = o;
3160
+ (a === null || a._readOnly) && (a = n._pendingEditorState = Oi(a || l), c = !0), a._flushSync = o;
3161
3161
  const u = K, d = G, f = J, h = n._updating;
3162
3162
  K = a, G = !1, n._updating = !0, J = n;
3163
3163
  try {
@@ -3184,13 +3184,13 @@ function Di(n, t, e) {
3184
3184
  }
3185
3185
  }(a, n) : function(m, y) {
3186
3186
  const x = y._dirtyLeaves, b = y._dirtyElements, k = m._nodeMap, v = yt(), P = /* @__PURE__ */ new Map();
3187
- let C = x, N = C.size, L = b, O = L.size;
3187
+ let C = x, N = C.size, D = b, O = D.size;
3188
3188
  for (; N > 0 || O > 0; ) {
3189
3189
  if (N > 0) {
3190
3190
  y._dirtyLeaves = /* @__PURE__ */ new Set();
3191
3191
  for (const B of C) {
3192
- const D = k.get(B);
3193
- E(D) && D.isAttached() && D.isSimpleText() && !D.isUnmergeable() && sr(D), D !== void 0 && Ar(D, v) && Ir(y, D, P), x.add(B);
3192
+ const L = k.get(B);
3193
+ E(L) && L.isAttached() && L.isSimpleText() && !L.isUnmergeable() && sr(L), L !== void 0 && Ar(L, v) && Ir(y, L, P), x.add(B);
3194
3194
  }
3195
3195
  if (C = y._dirtyLeaves, N = C.size, N > 0) {
3196
3196
  xe++;
@@ -3198,13 +3198,13 @@ function Di(n, t, e) {
3198
3198
  }
3199
3199
  }
3200
3200
  y._dirtyLeaves = /* @__PURE__ */ new Set(), y._dirtyElements = /* @__PURE__ */ new Map();
3201
- for (const B of L) {
3202
- const D = B[0], R = B[1];
3203
- if (D !== "root" && !R) continue;
3204
- const z = k.get(D);
3205
- z !== void 0 && Ar(z, v) && Ir(y, z, P), b.set(D, R);
3201
+ for (const B of D) {
3202
+ const L = B[0], R = B[1];
3203
+ if (L !== "root" && !R) continue;
3204
+ const z = k.get(L);
3205
+ z !== void 0 && Ar(z, v) && Ir(y, z, P), b.set(L, R);
3206
3206
  }
3207
- C = y._dirtyLeaves, N = C.size, L = y._dirtyElements, O = L.size, xe++;
3207
+ C = y._dirtyLeaves, N = C.size, D = y._dirtyElements, O = D.size, xe++;
3208
3208
  }
3209
3209
  y._dirtyLeaves = x, y._dirtyElements = b;
3210
3210
  }(a, n), zr(n), function(m, y, x, b) {
@@ -3235,12 +3235,12 @@ function Di(n, t, e) {
3235
3235
  if (y.dirty || !y.is(m)) return !0;
3236
3236
  } else if (m !== null) return !0;
3237
3237
  return !1;
3238
- }(a, n) ? a._flushSync ? (a._flushSync = !1, mt(n)) : c && Ts(() => {
3238
+ }(a, n) ? a._flushSync ? (a._flushSync = !1, mt(n)) : c && ks(() => {
3239
3239
  mt(n);
3240
3240
  }) : (a._flushSync = !1, c && (r.clear(), n._deferred = [], n._pendingEditorState = null));
3241
3241
  }
3242
3242
  function Q(n, t, e) {
3243
- n._updating ? n._updates.push([t, e]) : Di(n, t, e);
3243
+ n._updating ? n._updates.push([t, e]) : Li(n, t, e);
3244
3244
  }
3245
3245
  class Yt {
3246
3246
  constructor(t, e, r) {
@@ -3345,7 +3345,7 @@ class Qe extends He {
3345
3345
  }
3346
3346
  getFormatType() {
3347
3347
  const t = this.getFormat();
3348
- return ds[t] || "";
3348
+ return hs[t] || "";
3349
3349
  }
3350
3350
  getStyle() {
3351
3351
  return this.getLatest().__style;
@@ -3651,7 +3651,7 @@ function Rr(n, t, e) {
3651
3651
  }
3652
3652
  return !1;
3653
3653
  }
3654
- class Qs extends He {
3654
+ class Xs extends He {
3655
3655
  constructor(t) {
3656
3656
  super(t);
3657
3657
  }
@@ -3669,7 +3669,7 @@ class Qs extends He {
3669
3669
  }
3670
3670
  }
3671
3671
  function I(n) {
3672
- return n instanceof Qs;
3672
+ return n instanceof Xs;
3673
3673
  }
3674
3674
  class ue extends Qe {
3675
3675
  static getType() {
@@ -3724,17 +3724,20 @@ class ue extends Qe {
3724
3724
  function X(n) {
3725
3725
  return n instanceof ue;
3726
3726
  }
3727
+ function Oi(n) {
3728
+ return new Xe(new Map(n._nodeMap));
3729
+ }
3727
3730
  function qn() {
3728
3731
  return new Xe(/* @__PURE__ */ new Map([["root", new ue()]]));
3729
3732
  }
3730
- function Oi(n) {
3733
+ function Mi(n) {
3731
3734
  const t = n.exportJSON(), e = n.constructor;
3732
3735
  if (t.type !== e.getType() && T(130, e.name), S(n)) {
3733
3736
  const r = t.children;
3734
3737
  Array.isArray(r) || T(59, e.name);
3735
3738
  const i = n.getChildren();
3736
3739
  for (let s = 0; s < i.length; s++) {
3737
- const o = Oi(i[s]);
3740
+ const o = Mi(i[s]);
3738
3741
  r.push(o);
3739
3742
  }
3740
3743
  }
@@ -3755,10 +3758,10 @@ class Xe {
3755
3758
  return e._readOnly = !0, e;
3756
3759
  }
3757
3760
  toJSON() {
3758
- return Br(null, this, () => ({ root: Oi(Y()) }));
3761
+ return Br(null, this, () => ({ root: Mi(Y()) }));
3759
3762
  }
3760
3763
  }
3761
- class Xs extends Qe {
3764
+ class Ys extends Qe {
3762
3765
  static getType() {
3763
3766
  return "artificial";
3764
3767
  }
@@ -3808,7 +3811,7 @@ class zt extends Qe {
3808
3811
  return !1;
3809
3812
  }
3810
3813
  static importDOM() {
3811
- return { p: (t) => ({ conversion: Ys, priority: 0 }) };
3814
+ return { p: (t) => ({ conversion: Zs, priority: 0 }) };
3812
3815
  }
3813
3816
  exportDOM(t) {
3814
3817
  const { element: e } = super.exportDOM(t);
@@ -3843,9 +3846,9 @@ class zt extends Qe {
3843
3846
  return !1;
3844
3847
  }
3845
3848
  }
3846
- function Ys(n) {
3849
+ function Zs(n) {
3847
3850
  const t = vt();
3848
- return n.style && (t.setFormat(n.style.textAlign), Os(n, t)), { node: t };
3851
+ return n.style && (t.setFormat(n.style.textAlign), Ms(n, t)), { node: t };
3849
3852
  }
3850
3853
  function vt() {
3851
3854
  return Ue(new zt());
@@ -3853,15 +3856,15 @@ function vt() {
3853
3856
  function wn(n) {
3854
3857
  return n instanceof zt;
3855
3858
  }
3856
- const Co = 0, To = 1, ko = 3, bo = 4;
3857
- function Mi(n, t, e, r) {
3859
+ const To = 0, ko = 1, bo = 3, wo = 4;
3860
+ function Ii(n, t, e, r) {
3858
3861
  const i = n._keyToDOMMap;
3859
3862
  i.clear(), n._editorState = qn(), n._pendingEditorState = r, n._compositionKey = null, n._dirtyType = Et, n._cloneNotNeeded.clear(), n._dirtyLeaves = /* @__PURE__ */ new Set(), n._dirtyElements.clear(), n._normalizedNodes = /* @__PURE__ */ new Set(), n._updateTags = /* @__PURE__ */ new Set(), n._updates = [], n._blockCursorElement = null;
3860
3863
  const s = n._observer;
3861
3864
  s !== null && (s.disconnect(), n._observer = null), t !== null && (t.textContent = ""), e !== null && (e.textContent = "", i.set("root", e));
3862
3865
  }
3863
- function wo(n) {
3864
- const t = n || {}, e = Gs(), r = t.theme || {}, i = n === void 0 ? e : t.parentEditor || null, s = t.disableEvents || !1, o = qn(), l = t.namespace || (i !== null ? i._config.namespace : oi()), a = t.editorState, c = [ue, Bt, oe, le, zt, Xs, ...t.nodes || []], { onError: u, html: d } = t, f = t.editable === void 0 || t.editable;
3866
+ function No(n) {
3867
+ const t = n || {}, e = Qs(), r = t.theme || {}, i = n === void 0 ? e : t.parentEditor || null, s = t.disableEvents || !1, o = qn(), l = t.namespace || (i !== null ? i._config.namespace : oi()), a = t.editorState, c = [ue, Bt, oe, le, zt, Ys, ...t.nodes || []], { onError: u, html: d } = t, f = t.editable === void 0 || t.editable;
3865
3868
  let h;
3866
3869
  if (n === void 0 && e !== null) h = e._nodes;
3867
3870
  else {
@@ -4007,7 +4010,7 @@ class Ye {
4007
4010
  const e = this._rootElement;
4008
4011
  if (t !== e) {
4009
4012
  const r = Ht(this._config.theme, "root"), i = this._pendingEditorState || this._editorState;
4010
- if (this._rootElement = t, Mi(this, e, t, i), e !== null && (this._config.disableEvents || zs(e), r != null && e.classList.remove(...r)), t !== null) {
4013
+ if (this._rootElement = t, Ii(this, e, t, i), e !== null && (this._config.disableEvents || Ws(e), r != null && e.classList.remove(...r)), t !== null) {
4011
4014
  const s = function(l) {
4012
4015
  const a = l.ownerDocument;
4013
4016
  return a && a.defaultView || null;
@@ -4031,17 +4034,17 @@ class Ye {
4031
4034
  case "paste":
4032
4035
  return m && w(a, Kr, p);
4033
4036
  case "dragstart":
4034
- return m && w(a, Gi, p);
4035
- case "dragover":
4036
4037
  return m && w(a, Qi, p);
4037
- case "dragend":
4038
+ case "dragover":
4038
4039
  return m && w(a, Xi, p);
4039
- case "focus":
4040
+ case "dragend":
4040
4041
  return m && w(a, Yi, p);
4041
- case "blur":
4042
+ case "focus":
4042
4043
  return m && w(a, Zi, p);
4044
+ case "blur":
4045
+ return m && w(a, ts, p);
4043
4046
  case "drop":
4044
- return m && w(a, qi, p);
4047
+ return m && w(a, Gi, p);
4045
4048
  }
4046
4049
  };
4047
4050
  l.addEventListener(h, _), d.push(() => {
@@ -4060,9 +4063,11 @@ class Ye {
4060
4063
  return this._editorState;
4061
4064
  }
4062
4065
  setEditorState(t, e) {
4063
- t.isEmpty() && T(38), Xr(this);
4064
- const r = this._pendingEditorState, i = this._updateTags, s = e !== void 0 ? e.tag : null;
4065
- r === null || r.isEmpty() || (s != null && i.add(s), mt(this)), this._pendingEditorState = t, this._dirtyType = At, this._dirtyElements.set("root", !1), this._compositionKey = null, s != null && i.add(s), mt(this);
4066
+ t.isEmpty() && T(38);
4067
+ let r = t;
4068
+ r._readOnly && (r = Oi(t), r._selection = t._selection ? t._selection.clone() : null), Xr(this);
4069
+ const i = this._pendingEditorState, s = this._updateTags, o = e !== void 0 ? e.tag : null;
4070
+ i === null || i.isEmpty() || (o != null && s.add(o), mt(this)), this._pendingEditorState = r, this._dirtyType = At, this._dirtyElements.set("root", !1), this._compositionKey = null, o != null && s.add(o), this._updating || mt(this);
4066
4071
  }
4067
4072
  parseEditorState(t, e) {
4068
4073
  return function(r, i, s) {
@@ -4110,102 +4115,102 @@ class Ye {
4110
4115
  return { editorState: this._editorState.toJSON() };
4111
4116
  }
4112
4117
  }
4113
- Ye.version = "0.20.1+prod.esm";
4118
+ Ye.version = "0.20.2+prod.esm";
4114
4119
  export {
4115
4120
  bo as $,
4116
- mo as A,
4117
- vt as B,
4118
- ho as C,
4119
- io as D,
4121
+ xo as A,
4122
+ Vr as B,
4123
+ go as C,
4124
+ Se as D,
4120
4125
  I as E,
4121
4126
  ut as F,
4122
4127
  It as G,
4123
- Bi as H,
4124
- po as I,
4125
- ko as J,
4126
- ae as K,
4127
- Se as L,
4128
- Ce as M,
4129
- Hi as N,
4130
- ve as O,
4131
- _o as P,
4132
- Ui as Q,
4133
- To as R,
4134
- Ji as S,
4128
+ Ce as H,
4129
+ yo as I,
4130
+ ve as J,
4131
+ ko as K,
4132
+ Vi as L,
4133
+ Hi as M,
4134
+ qi as N,
4135
+ so as O,
4136
+ po as P,
4137
+ st as Q,
4138
+ M as R,
4139
+ $i as S,
4135
4140
  Ve as T,
4136
- ji as U,
4137
- st as V,
4138
- Ss as W,
4141
+ wo as U,
4142
+ Cs as V,
4143
+ wn as W,
4139
4144
  ce as X,
4140
4145
  at as Y,
4141
4146
  zt as Z,
4142
4147
  Bt as _,
4143
4148
  F as a,
4144
4149
  Kr as a0,
4145
- fo as a1,
4150
+ ho as a1,
4146
4151
  Nr as a2,
4147
4152
  gr as a3,
4148
4153
  X as a4,
4149
- Ai as a5,
4150
- Co as a6,
4151
- Ii as a7,
4152
- ao as a8,
4153
- lo as a9,
4154
- vo as aA,
4154
+ Bi as a5,
4155
+ To as a6,
4156
+ Ai as a7,
4157
+ co as a8,
4158
+ ao as a9,
4159
+ So as aA,
4155
4160
  tr as aB,
4156
4161
  ti as aC,
4157
- oo as aD,
4158
- so as aE,
4162
+ lo as aD,
4163
+ oo as aE,
4159
4164
  Jr as aa,
4160
4165
  $r as ab,
4161
- Xs as ac,
4166
+ Ys as ac,
4162
4167
  ne as ad,
4163
- Ds as ae,
4164
- go as af,
4165
- yo as ag,
4168
+ Os as ae,
4169
+ _o as af,
4170
+ mo as ag,
4166
4171
  _r as ah,
4167
- Ps as ai,
4172
+ Fs as ai,
4168
4173
  Vn as aj,
4169
- So as ak,
4174
+ Co as ak,
4170
4175
  Ur as al,
4171
4176
  We as am,
4172
4177
  jn as an,
4173
- wo as ao,
4178
+ No as ao,
4174
4179
  Zr as ap,
4175
4180
  er as aq,
4176
- uo as ar,
4177
- Qi as as,
4178
- Gi as at,
4179
- qi as au,
4181
+ fo as ar,
4182
+ Xi as as,
4183
+ Qi as at,
4184
+ Gi as au,
4180
4185
  hn as av,
4181
4186
  ye as aw,
4182
- ro as ax,
4183
- no as ay,
4184
- eo as az,
4187
+ io as ax,
4188
+ ro as ay,
4189
+ no as az,
4185
4190
  S as b,
4186
- M as c,
4191
+ Pt as c,
4187
4192
  $ as d,
4188
- Zs as e,
4189
- Pt as f,
4193
+ to as e,
4194
+ zn as f,
4190
4195
  Ue as g,
4191
4196
  E as h,
4192
- zn as i,
4193
- V as j,
4197
+ V as i,
4198
+ ae as j,
4194
4199
  Qe as k,
4195
- Vi as l,
4196
- Vr as m,
4197
- wt as n,
4200
+ ji as l,
4201
+ wt as m,
4202
+ jt as n,
4198
4203
  Zn as o,
4199
- co as p,
4200
- jt as q,
4201
- Yi as r,
4202
- to as s,
4204
+ uo as p,
4205
+ Zi as q,
4206
+ eo as r,
4207
+ vo as s,
4203
4208
  Nn as t,
4204
- xo as u,
4209
+ Y as u,
4205
4210
  it as v,
4206
- Y as w,
4207
- Ki as x,
4208
- Wi as y,
4209
- wn as z
4211
+ Ji as w,
4212
+ Ri as x,
4213
+ zi as y,
4214
+ vt as z
4210
4215
  };
4211
- //# sourceMappingURL=Lexical.prod-CFhL_6Md.js.map
4216
+ //# sourceMappingURL=Lexical.prod-DeeCy7Xd.js.map