@harbour-enterprises/superdoc 0.11.19 → 0.11.21

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 (30) hide show
  1. package/dist/chunks/{index-MTg0RB9I.cjs → index-BXKGjuVW.cjs} +1 -1
  2. package/dist/chunks/{index-k2jVlnWa.es.js → index-CPZ-IxHT.es.js} +1 -1
  3. package/dist/chunks/{index-f-drtAbP.cjs → index-CqRwYOdx.cjs} +1 -1
  4. package/dist/chunks/{index-Gs0-9Zg-.es.js → index-Y7BlAr93.es.js} +2 -2
  5. package/dist/chunks/{super-editor.es-C5WxgouW.es.js → super-editor.es-CQRFThWH.es.js} +477 -455
  6. package/dist/chunks/{super-editor.es-BpCrZwJM.cjs → super-editor.es-DRPNP_YX.cjs} +25 -25
  7. package/dist/chunks/{url-BY6ThfSE.cjs → url-6Xu7gR4T.cjs} +1 -1
  8. package/dist/chunks/{url-C5LEOXW-.es.js → url-t15h9onH.es.js} +1 -1
  9. package/dist/chunks/{xml-js-DjJijnzm.es.js → xml-js-kwrvzyhm.es.js} +355 -366
  10. package/dist/chunks/xml-js-zhwNEV5e.cjs +10 -0
  11. package/dist/super-editor/ai-writer.es.js +1 -1
  12. package/dist/super-editor/chunks/{converter-DsBQa9mA.js → converter-BeV1PiJu.js} +2 -2
  13. package/dist/super-editor/chunks/{docx-zipper-BhZqF_Iv.js → docx-zipper-qGh2UQO8.js} +1 -1
  14. package/dist/super-editor/chunks/{editor-C1MQt5t_.js → editor-DJF0d36B.js} +523 -501
  15. package/dist/super-editor/chunks/{toolbar-CKwDSMyY.js → toolbar-DPhBinni.js} +2 -2
  16. package/dist/super-editor/converter.es.js +1 -1
  17. package/dist/super-editor/docx-zipper.es.js +2 -2
  18. package/dist/super-editor/editor.es.js +3 -3
  19. package/dist/super-editor/extensions/search/search.d.ts.map +1 -1
  20. package/dist/super-editor/file-zipper.es.js +1 -1
  21. package/dist/super-editor/super-editor.es.js +6 -6
  22. package/dist/super-editor/toolbar.es.js +2 -2
  23. package/dist/super-editor.cjs +1 -1
  24. package/dist/super-editor.es.js +1 -1
  25. package/dist/superdoc.cjs +3 -3
  26. package/dist/superdoc.es.js +6 -6
  27. package/dist/superdoc.umd.js +461 -439
  28. package/dist/superdoc.umd.js.map +1 -1
  29. package/package.json +1 -1
  30. package/dist/chunks/xml-js-C-3oH1mO.cjs +0 -10
@@ -7,9 +7,9 @@ var R = (t, e, n) => Pf(t, typeof e != "symbol" ? e + "" : e, n), Zo = (t, e, n)
7
7
  var Qe = (t, e, n) => (Zo(t, e, "read from private field"), n ? n.call(t) : e.get(t)), ft = (t, e, n) => e.has(t) ? aa("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, n), Qo = (t, e, n, r) => (Zo(t, e, "write to private field"), r ? r.call(t, n) : e.set(t, n), n), N = (t, e, n) => (Zo(t, e, "access private method"), n);
8
8
  import * as D from "yjs";
9
9
  import { UndoManager as If, Item as Rf, ContentType as Lf, Text as Ff, XmlElement as Bf } from "yjs";
10
- import { P as J, a as Y, M as fr, c as X, N as _, S as ee, T as j, b as W, D as Hn, F as T, d as rn, e as zf, f as fc, A as Er, p as oe, B as $f, i as _f, g as pc, h as Vf, j as wt, l as Nr, k as jt, m as hc, r as mc, R as ln, o as pr, n as la, q as Vt, s as Ti, t as gc, u as Hf, v as jf, w as de, x as Ve, y as $o, z as xn, C as xo, E as Wf, G as Se, H as co, I as yc, J as Sn, K as ei, L as ti, O as ni, Q as uo, U as Rt, V as _o, W as Uf, X as ca, Y as da, Z as qf, _ as Kf, $ as Xf } from "./converter-DsBQa9mA.js";
10
+ import { P as K, a as X, M as fr, c as Y, N as _, S as ee, T as j, b as W, D as Hn, F as T, d as rn, e as zf, f as fc, A as Er, p as oe, B as $f, i as _f, g as pc, h as Vf, j as wt, l as Nr, k as jt, m as hc, r as mc, R as ln, o as pr, n as la, q as Vt, s as Ti, t as gc, u as Hf, v as jf, w as de, x as Ve, y as Pr, z as xn, C as So, E as Wf, G as Se, H as uo, I as yc, J as Sn, K as ei, L as ti, O as ni, Q as fo, U as Rt, V as _o, W as Uf, X as ca, Y as da, Z as qf, _ as Kf, $ as Xf } from "./converter-BeV1PiJu.js";
11
11
  import { ref as ua, computed as Jf, createElementBlock as Xt, openBlock as Jt, withModifiers as ri, Fragment as Yf, renderList as Gf, normalizeClass as Zf, createCommentVNode as fa, toDisplayString as oi, createElementVNode as Qf, createApp as ep } from "vue";
12
- import { D as pa } from "./docx-zipper-BhZqF_Iv.js";
12
+ import { D as pa } from "./docx-zipper-qGh2UQO8.js";
13
13
  function Vo(t) {
14
14
  const { from: e, to: n, empty: r } = t.selection, o = [];
15
15
  return r ? (t.storedMarks && o.push(...t.storedMarks), o.push(...t.selection.$head.marks())) : t.doc.nodesBetween(e, n, (i) => {
@@ -70,10 +70,10 @@ function np(t) {
70
70
  return {};
71
71
  }
72
72
  }
73
- var So = 200, ue = function() {
73
+ var Co = 200, ue = function() {
74
74
  };
75
75
  ue.prototype.append = function(e) {
76
- return e.length ? (e = ue.from(e), !this.length && e || e.length < So && this.leafAppend(e) || this.length < So && e.leafPrepend(this) || this.appendInner(e)) : this;
76
+ return e.length ? (e = ue.from(e), !this.length && e || e.length < Co && this.leafAppend(e) || this.length < Co && e.leafPrepend(this) || this.appendInner(e)) : this;
77
77
  };
78
78
  ue.prototype.prepend = function(e) {
79
79
  return e.length ? ue.from(e).append(this) : this;
@@ -122,10 +122,10 @@ var bc = /* @__PURE__ */ function(t) {
122
122
  if (o(this.values[l], a + l) === !1)
123
123
  return !1;
124
124
  }, e.prototype.leafAppend = function(o) {
125
- if (this.length + o.length <= So)
125
+ if (this.length + o.length <= Co)
126
126
  return new e(this.values.concat(o.flatten()));
127
127
  }, e.prototype.leafPrepend = function(o) {
128
- if (this.length + o.length <= So)
128
+ if (this.length + o.length <= Co)
129
129
  return new e(o.flatten().concat(this.values));
130
130
  }, n.length.get = function() {
131
131
  return this.values.length;
@@ -315,10 +315,10 @@ function ap(t, e, n, r) {
315
315
  if (n.steps.length == 0)
316
316
  return t;
317
317
  if (s && s.getMeta(vt))
318
- return s.getMeta(vt).redo ? new Tt(t.done.addTransform(n, void 0, r, fo(e)), t.undone, ma(n.mapping.maps), t.prevTime, t.prevComposition) : new Tt(t.done, t.undone.addTransform(n, void 0, r, fo(e)), null, t.prevTime, t.prevComposition);
318
+ return s.getMeta(vt).redo ? new Tt(t.done.addTransform(n, void 0, r, po(e)), t.undone, ma(n.mapping.maps), t.prevTime, t.prevComposition) : new Tt(t.done, t.undone.addTransform(n, void 0, r, po(e)), null, t.prevTime, t.prevComposition);
319
319
  if (n.getMeta("addToHistory") !== !1 && !(s && s.getMeta("addToHistory") === !1)) {
320
320
  let a = n.getMeta("composition"), l = t.prevTime == 0 || !s && t.prevComposition != a && (t.prevTime < (n.time || 0) - r.newGroupDelay || !lp(n, t.prevRanges)), c = s ? ii(t.prevRanges, n.mapping) : ma(n.mapping.maps);
321
- return new Tt(t.done.addTransform(n, l ? e.selection.getBookmark() : void 0, r, fo(e)), Ye.empty, c, n.time, a ?? t.prevComposition);
321
+ return new Tt(t.done.addTransform(n, l ? e.selection.getBookmark() : void 0, r, po(e)), Ye.empty, c, n.time, a ?? t.prevComposition);
322
322
  } else return (i = n.getMeta("rebased")) ? new Tt(t.done.rebased(n, i), t.undone.rebased(n, i), ii(t.prevRanges, n.mapping), t.prevTime, t.prevComposition) : new Tt(t.done.addMaps(n.mapping.maps), t.undone.addMaps(n.mapping.maps), ii(t.prevRanges, n.mapping), t.prevTime, t.prevComposition);
323
323
  }
324
324
  function lp(t, e) {
@@ -349,14 +349,14 @@ function ii(t, e) {
349
349
  return n;
350
350
  }
351
351
  function cp(t, e, n) {
352
- let r = fo(e), o = vt.get(e).spec.config, i = (n ? t.undone : t.done).popEvent(e, r);
352
+ let r = po(e), o = vt.get(e).spec.config, i = (n ? t.undone : t.done).popEvent(e, r);
353
353
  if (!i)
354
354
  return null;
355
355
  let s = i.selection.resolve(i.transform.doc), a = (n ? t.done : t.undone).addTransform(i.transform, e.selection.getBookmark(), o, r), l = new Tt(n ? a : i.remaining, n ? i.remaining : a, null, 0, -1);
356
356
  return i.transform.setSelection(s).setMeta(vt, { redo: n, historyState: l });
357
357
  }
358
358
  let si = !1, ga = null;
359
- function fo(t) {
359
+ function po(t) {
360
360
  let e = t.plugins;
361
361
  if (ga != e) {
362
362
  si = !1, ga = e;
@@ -368,12 +368,12 @@ function fo(t) {
368
368
  }
369
369
  return si;
370
370
  }
371
- const vt = new J("history"), dp = new J("closeHistory");
371
+ const vt = new K("history"), dp = new K("closeHistory");
372
372
  function up(t = {}) {
373
373
  return t = {
374
374
  depth: t.depth || 100,
375
375
  newGroupDelay: t.newGroupDelay || 500
376
- }, new Y({
376
+ }, new X({
377
377
  key: vt,
378
378
  state: {
379
379
  init() {
@@ -430,11 +430,11 @@ class Z {
430
430
  this.config = {
431
431
  ...this.config,
432
432
  ...e
433
- }, this.name = this.config.name, this.config.addOptions && (this.options = X(
433
+ }, this.name = this.config.name, this.config.addOptions && (this.options = Y(
434
434
  I(this, "addOptions", {
435
435
  name: this.name
436
436
  })
437
- )), this.storage = X(
437
+ )), this.storage = Y(
438
438
  I(this, "addStorage", {
439
439
  name: this.name,
440
440
  options: this.options
@@ -497,7 +497,7 @@ function ya(t, e, n, r, o) {
497
497
  return !0;
498
498
  if (e == (o < 0 ? 0 : _e(t))) {
499
499
  let i = t.parentNode;
500
- if (!i || i.nodeType != 1 || Pr(t) || pp.test(t.nodeName) || t.contentEditable == "false")
500
+ if (!i || i.nodeType != 1 || Ir(t) || pp.test(t.nodeName) || t.contentEditable == "false")
501
501
  return !1;
502
502
  e = ye(t) + (o < 0 ? 0 : 1), t = i;
503
503
  } else if (t.nodeType == 1) {
@@ -519,7 +519,7 @@ function hp(t, e) {
519
519
  if (t.contentEditable == "false")
520
520
  return null;
521
521
  t = t.childNodes[e - 1], e = _e(t);
522
- } else if (t.parentNode && !Pr(t))
522
+ } else if (t.parentNode && !Ir(t))
523
523
  e = ye(t), t = t.parentNode;
524
524
  else
525
525
  return null;
@@ -533,7 +533,7 @@ function mp(t, e) {
533
533
  if (t.contentEditable == "false")
534
534
  return null;
535
535
  t = t.childNodes[e], e = 0;
536
- } else if (t.parentNode && !Pr(t))
536
+ } else if (t.parentNode && !Ir(t))
537
537
  e = ye(t) + 1, t = t.parentNode;
538
538
  else
539
539
  return null;
@@ -549,7 +549,7 @@ function gp(t, e, n) {
549
549
  r = r && i == 0, o = o && i == _e(t);
550
550
  }
551
551
  }
552
- function Pr(t) {
552
+ function Ir(t) {
553
553
  let e;
554
554
  for (let n = t; n && !(e = n.pmViewDesc); n = n.parentNode)
555
555
  ;
@@ -584,7 +584,7 @@ function bp(t, e, n) {
584
584
  }
585
585
  const st = typeof navigator < "u" ? navigator : null, ba = typeof document < "u" ? document : null, Wt = st && st.userAgent || "", Ei = /Edge\/(\d+)/.exec(Wt), Sc = /MSIE \d/.exec(Wt), Ni = /Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Wt), De = !!(Sc || Ni || Ei), Lt = Sc ? document.documentMode : Ni ? +Ni[1] : Ei ? +Ei[1] : 0, Ge = !De && /gecko\/(\d+)/i.test(Wt);
586
586
  Ge && +(/Firefox\/(\d+)/.exec(Wt) || [0, 0])[1];
587
- const Pi = !De && /Chrome\/(\d+)/.exec(Wt), ve = !!Pi, Cc = Pi ? +Pi[1] : 0, Ce = !De && !!st && /Apple Computer/.test(st.vendor), En = Ce && (/Mobile\/\w+/.test(Wt) || !!st && st.maxTouchPoints > 2), $e = En || (st ? /Mac/.test(st.platform) : !1), wp = st ? /Win/.test(st.platform) : !1, bt = /Android \d/.test(Wt), Ir = !!ba && "webkitFontSmoothing" in ba.documentElement.style, vp = Ir ? +(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent) || [0, 0])[1] : 0;
587
+ const Pi = !De && /Chrome\/(\d+)/.exec(Wt), ve = !!Pi, Cc = Pi ? +Pi[1] : 0, Ce = !De && !!st && /Apple Computer/.test(st.vendor), En = Ce && (/Mobile\/\w+/.test(Wt) || !!st && st.maxTouchPoints > 2), $e = En || (st ? /Mac/.test(st.platform) : !1), wp = st ? /Win/.test(st.platform) : !1, bt = /Android \d/.test(Wt), Rr = !!ba && "webkitFontSmoothing" in ba.documentElement.style, vp = Rr ? +(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent) || [0, 0])[1] : 0;
588
588
  function kp(t) {
589
589
  let e = t.defaultView && t.defaultView.visualViewport;
590
590
  return e ? {
@@ -779,7 +779,7 @@ function Ep(t, e) {
779
779
  d.nodeName == "IMG" && (u = d.getBoundingClientRect()).right <= e.left && u.bottom > e.top && o++;
780
780
  }
781
781
  let c;
782
- Ir && o && r.nodeType == 1 && (c = r.childNodes[o - 1]).nodeType == 1 && c.contentEditable == "false" && c.getBoundingClientRect().top >= e.top && o--, r == t.dom && o == r.childNodes.length - 1 && r.lastChild.nodeType == 1 && e.top > r.lastChild.getBoundingClientRect().bottom ? a = t.state.doc.content.size : (o == 0 || r.nodeType != 1 || r.childNodes[o - 1].nodeName != "BR") && (a = Dp(t, r, o, e));
782
+ Rr && o && r.nodeType == 1 && (c = r.childNodes[o - 1]).nodeType == 1 && c.contentEditable == "false" && c.getBoundingClientRect().top >= e.top && o--, r == t.dom && o == r.childNodes.length - 1 && r.lastChild.nodeType == 1 && e.top > r.lastChild.getBoundingClientRect().bottom ? a = t.state.doc.content.size : (o == 0 || r.nodeType != 1 || r.childNodes[o - 1].nodeName != "BR") && (a = Dp(t, r, o, e));
783
783
  }
784
784
  a == null && (a = Tp(t, s, e));
785
785
  let l = t.docView.nearestDesc(s, !0);
@@ -799,7 +799,7 @@ function Ot(t, e) {
799
799
  }
800
800
  const Np = /[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;
801
801
  function Dc(t, e, n) {
802
- let { node: r, offset: o, atom: i } = t.docView.domFromPos(e, n < 0 ? -1 : 1), s = Ir || Ge;
802
+ let { node: r, offset: o, atom: i } = t.docView.domFromPos(e, n < 0 ? -1 : 1), s = Rr || Ge;
803
803
  if (r.nodeType == 3)
804
804
  if (s && (Np.test(r.nodeValue) || (n < 0 ? !o : o == r.nodeValue.length))) {
805
805
  let l = Ot(mt(r, o, o), n);
@@ -919,7 +919,7 @@ function Lp(t, e, n) {
919
919
  return ka == e && xa == n ? Sa : (ka = e, xa = n, Sa = n == "up" || n == "down" ? Pp(t, e, n) : Rp(t, e, n));
920
920
  }
921
921
  const He = 0, Ca = 1, en = 2, at = 3;
922
- class Rr {
922
+ class Lr {
923
923
  constructor(e, n, r, o) {
924
924
  this.parent = e, this.children = n, this.dom = r, this.contentDOM = o, this.dirty = He, r.pmViewDesc = this;
925
925
  }
@@ -1260,7 +1260,7 @@ class Rr {
1260
1260
  return !1;
1261
1261
  }
1262
1262
  }
1263
- class Nc extends Rr {
1263
+ class Nc extends Lr {
1264
1264
  constructor(e, n, r, o) {
1265
1265
  let i, s = n.type.toDOM;
1266
1266
  if (typeof s == "function" && (s = s(r, () => {
@@ -1300,7 +1300,7 @@ class Nc extends Rr {
1300
1300
  return this.widget.type.side;
1301
1301
  }
1302
1302
  }
1303
- class Fp extends Rr {
1303
+ class Fp extends Lr {
1304
1304
  constructor(e, n, r, o) {
1305
1305
  super(e, [], n, null), this.textDOM = r, this.text = o;
1306
1306
  }
@@ -1317,7 +1317,7 @@ class Fp extends Rr {
1317
1317
  return e.type === "characterData" && e.target.nodeValue == e.oldValue;
1318
1318
  }
1319
1319
  }
1320
- class dn extends Rr {
1320
+ class dn extends Lr {
1321
1321
  constructor(e, n, r, o, i) {
1322
1322
  super(e, [], r, o), this.mark = n, this.spec = i;
1323
1323
  }
@@ -1353,7 +1353,7 @@ class dn extends Rr {
1353
1353
  this.spec.destroy && this.spec.destroy(), super.destroy();
1354
1354
  }
1355
1355
  }
1356
- class Ft extends Rr {
1356
+ class Ft extends Lr {
1357
1357
  constructor(e, n, r, o, i, s, a, l, c) {
1358
1358
  super(e, [], i, s), this.node = n, this.outerDeco = r, this.innerDeco = o, this.nodeDOM = a;
1359
1359
  }
@@ -1404,7 +1404,7 @@ class Ft extends Rr {
1404
1404
  return e;
1405
1405
  }
1406
1406
  matchesNode(e, n, r) {
1407
- return this.dirty == He && e.eq(this.node) && Co(n, this.outerDeco) && r.eq(this.innerDeco);
1407
+ return this.dirty == He && e.eq(this.node) && Mo(n, this.outerDeco) && r.eq(this.innerDeco);
1408
1408
  }
1409
1409
  get size() {
1410
1410
  return this.node.nodeSize;
@@ -1462,7 +1462,7 @@ class Ft extends Rr {
1462
1462
  this.updateOuterDeco(n), this.node = e, this.innerDeco = r, this.contentDOM && this.updateChildren(o, this.posAtStart), this.dirty = He;
1463
1463
  }
1464
1464
  updateOuterDeco(e) {
1465
- if (Co(e, this.outerDeco))
1465
+ if (Mo(e, this.outerDeco))
1466
1466
  return;
1467
1467
  let n = this.nodeDOM.nodeType != 1, r = this.dom;
1468
1468
  this.dom = Rc(this.dom, this.nodeDOM, Ii(this.outerDeco, this.node, n), Ii(e, this.node, n)), this.dom != r && (r.pmViewDesc = void 0, this.dom.pmViewDesc = this), this.outerDeco = e;
@@ -1527,7 +1527,7 @@ class Wo extends Ft {
1527
1527
  return this.node.text == e;
1528
1528
  }
1529
1529
  }
1530
- class Pc extends Rr {
1530
+ class Pc extends Lr {
1531
1531
  parseRule() {
1532
1532
  return { ignore: !0 };
1533
1533
  }
@@ -1654,7 +1654,7 @@ function zp(t, e, n) {
1654
1654
  function Lc(t, e, n) {
1655
1655
  return Rc(t, t, tn, Ii(e, n, t.nodeType != 1));
1656
1656
  }
1657
- function Co(t, e) {
1657
+ function Mo(t, e) {
1658
1658
  if (t.length != e.length)
1659
1659
  return !1;
1660
1660
  for (let n = 0; n < t.length; n++)
@@ -1756,7 +1756,7 @@ class $p {
1756
1756
  let c = this.preMatch.matched.get(l);
1757
1757
  if (c != null && c != i)
1758
1758
  return !1;
1759
- let d = l.dom, u, f = this.isLocked(d) && !(e.isText && l.node && l.node.isText && l.nodeDOM.nodeValue == e.text && l.dirty != at && Co(n, l.outerDeco));
1759
+ let d = l.dom, u, f = this.isLocked(d) && !(e.isText && l.node && l.node.isText && l.nodeDOM.nodeValue == e.text && l.dirty != at && Mo(n, l.outerDeco));
1760
1760
  if (!f && l.update(e, n, r, o))
1761
1761
  return this.destroyBetween(this.index, a), l.dom != d && (this.changed = !0), this.index++, !0;
1762
1762
  if (!f && (u = this.recreateWrapper(l, e, n, r, o, s)))
@@ -1769,7 +1769,7 @@ class $p {
1769
1769
  // When a node with content is replaced by a different node with
1770
1770
  // identical content, move over its children.
1771
1771
  recreateWrapper(e, n, r, o, i, s) {
1772
- if (e.dirty || n.isAtom || !e.children.length || !e.node.content.eq(n.content) || !Co(r, e.outerDeco) || !o.eq(e.innerDeco))
1772
+ if (e.dirty || n.isAtom || !e.children.length || !e.node.content.eq(n.content) || !Mo(r, e.outerDeco) || !o.eq(e.innerDeco))
1773
1773
  return null;
1774
1774
  let a = Ft.create(this.top, n, r, o, i, s);
1775
1775
  if (a.contentDOM) {
@@ -2082,7 +2082,7 @@ function Pa(t, e, n) {
2082
2082
  if (!i || i.isText)
2083
2083
  return !1;
2084
2084
  let a = e < 0 ? o.pos - i.nodeSize : o.pos;
2085
- return i.isAtom || (s = t.docView.descAt(a)) && !s.contentDOM ? _.isSelectable(i) ? Dt(t, new _(e < 0 ? t.state.doc.resolve(o.pos - i.nodeSize) : o)) : Ir ? Dt(t, new j(t.state.doc.resolve(e < 0 ? a : a + i.nodeSize))) : !1 : !1;
2085
+ return i.isAtom || (s = t.docView.descAt(a)) && !s.contentDOM ? _.isSelectable(i) ? Dt(t, new _(e < 0 ? t.state.doc.resolve(o.pos - i.nodeSize) : o)) : Rr ? Dt(t, new j(t.state.doc.resolve(e < 0 ? a : a + i.nodeSize))) : !1 : !1;
2086
2086
  }
2087
2087
  } else return !1;
2088
2088
  else {
@@ -2094,7 +2094,7 @@ function Pa(t, e, n) {
2094
2094
  }
2095
2095
  }
2096
2096
  }
2097
- function Mo(t) {
2097
+ function Ao(t) {
2098
2098
  return t.nodeType == 3 ? t.nodeValue.length : t.childNodes.length;
2099
2099
  }
2100
2100
  function rr(t, e) {
@@ -2109,7 +2109,7 @@ function Xp(t) {
2109
2109
  if (!n)
2110
2110
  return;
2111
2111
  let o, i, s = !1;
2112
- for (Ge && n.nodeType == 1 && r < Mo(n) && rr(n.childNodes[r], -1) && (s = !0); ; )
2112
+ for (Ge && n.nodeType == 1 && r < Ao(n) && rr(n.childNodes[r], -1) && (s = !0); ; )
2113
2113
  if (r > 0) {
2114
2114
  if (n.nodeType != 1)
2115
2115
  break;
@@ -2130,7 +2130,7 @@ function Xp(t) {
2130
2130
  for (; a && rr(a, -1); )
2131
2131
  o = n.parentNode, i = ye(a), a = a.previousSibling;
2132
2132
  if (a)
2133
- n = a, r = Mo(n);
2133
+ n = a, r = Ao(n);
2134
2134
  else {
2135
2135
  if (n = n.parentNode, n == t.dom)
2136
2136
  break;
@@ -2144,7 +2144,7 @@ function Jp(t) {
2144
2144
  let e = t.domSelectionRange(), n = e.focusNode, r = e.focusOffset;
2145
2145
  if (!n)
2146
2146
  return;
2147
- let o = Mo(n), i, s;
2147
+ let o = Ao(n), i, s;
2148
2148
  for (; ; )
2149
2149
  if (r < o) {
2150
2150
  if (n.nodeType != 1)
@@ -2162,7 +2162,7 @@ function Jp(t) {
2162
2162
  for (; a && rr(a, 1); )
2163
2163
  i = a.parentNode, s = ye(a) + 1, a = a.nextSibling;
2164
2164
  if (a)
2165
- n = a, r = 0, o = Mo(n);
2165
+ n = a, r = 0, o = Ao(n);
2166
2166
  else {
2167
2167
  if (n = n.parentNode, n == t.dom)
2168
2168
  break;
@@ -2177,7 +2177,7 @@ function $c(t) {
2177
2177
  return e && e.node && e.node.isBlock;
2178
2178
  }
2179
2179
  function Yp(t, e) {
2180
- for (; t && e == t.childNodes.length && !Pr(t); )
2180
+ for (; t && e == t.childNodes.length && !Ir(t); )
2181
2181
  e = ye(t) + 1, t = t.parentNode;
2182
2182
  for (; t && e < t.childNodes.length; ) {
2183
2183
  let n = t.childNodes[e];
@@ -2189,7 +2189,7 @@ function Yp(t, e) {
2189
2189
  }
2190
2190
  }
2191
2191
  function Gp(t, e) {
2192
- for (; t && !e && !Pr(t); )
2192
+ for (; t && !e && !Ir(t); )
2193
2193
  e = ye(t), t = t.parentNode;
2194
2194
  for (; t && e; ) {
2195
2195
  let n = t.childNodes[e - 1];
@@ -2361,7 +2361,7 @@ function _c(t, e, n, r, o) {
2361
2361
  } else
2362
2362
  t.someProp("transformPastedHTML", (u) => {
2363
2363
  n = u(n, t);
2364
- }), s = oh(n), Ir && ih(s);
2364
+ }), s = oh(n), Rr && ih(s);
2365
2365
  let c = s && s.querySelector("[data-pm-slice]"), d = c && /^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(c.getAttribute("data-pm-slice") || "");
2366
2366
  if (d && d[3])
2367
2367
  for (let u = +d[3]; u > 0; u--) {
@@ -2644,7 +2644,7 @@ function wh(t, e, n) {
2644
2644
  }
2645
2645
  }
2646
2646
  function Ns(t) {
2647
- return Ao(t);
2647
+ return Oo(t);
2648
2648
  }
2649
2649
  const qc = $e ? "metaKey" : "ctrlKey";
2650
2650
  Me.mousedown = (t, e) => {
@@ -2717,8 +2717,8 @@ Ae.compositionstart = Ae.compositionupdate = (t) => {
2717
2717
  t.domObserver.flush();
2718
2718
  let { state: e } = t, n = e.selection.$to;
2719
2719
  if (e.selection instanceof j && (e.storedMarks || !n.textOffset && n.parentOffset && n.nodeBefore.marks.some((r) => r.type.spec.inclusive === !1)))
2720
- t.markCursor = t.state.storedMarks || n.marks(), Ao(t, !0), t.markCursor = null;
2721
- else if (Ao(t, !e.selection.empty), Ge && e.selection.empty && n.parentOffset && !n.textOffset && n.nodeBefore.marks.length) {
2720
+ t.markCursor = t.state.storedMarks || n.marks(), Oo(t, !0), t.markCursor = null;
2721
+ else if (Oo(t, !e.selection.empty), Ge && e.selection.empty && n.parentOffset && !n.textOffset && n.nodeBefore.marks.length) {
2722
2722
  let r = t.domSelectionRange();
2723
2723
  for (let o = r.focusNode, i = r.focusOffset; o && o.nodeType == 1 && i != 0; ) {
2724
2724
  let s = i < 0 ? o.lastChild : o.childNodes[i - 1];
@@ -2740,7 +2740,7 @@ Ae.compositionend = (t, e) => {
2740
2740
  t.composing && (t.input.composing = !1, t.input.compositionEndedAt = e.timeStamp, t.input.compositionPendingChanges = t.domObserver.pendingRecords().length ? t.input.compositionID : 0, t.input.compositionNode = null, t.input.compositionPendingChanges && Promise.resolve().then(() => t.domObserver.flush()), t.input.compositionID++, Xc(t, 20));
2741
2741
  };
2742
2742
  function Xc(t, e) {
2743
- clearTimeout(t.input.composingTimeout), e > -1 && (t.input.composingTimeout = setTimeout(() => Ao(t), e));
2743
+ clearTimeout(t.input.composingTimeout), e > -1 && (t.input.composingTimeout = setTimeout(() => Oo(t), e));
2744
2744
  }
2745
2745
  function Jc(t) {
2746
2746
  for (t.composing && (t.input.composing = !1, t.input.compositionEndedAt = Sh()); t.input.compositionNodes.length > 0; )
@@ -2769,7 +2769,7 @@ function Sh() {
2769
2769
  let t = document.createEvent("Event");
2770
2770
  return t.initEvent("event", !0, !0), t.timeStamp;
2771
2771
  }
2772
- function Ao(t, e = !1) {
2772
+ function Oo(t, e = !1) {
2773
2773
  if (!(bt && t.domObserver.flushingSoon >= 0)) {
2774
2774
  if (t.domObserver.forceFlush(), Jc(t), e || t.docView && t.docView.dirty) {
2775
2775
  let n = As(t);
@@ -2937,19 +2937,19 @@ function gr(t, e) {
2937
2937
  return !1;
2938
2938
  return !0;
2939
2939
  }
2940
- class Oo {
2940
+ class To {
2941
2941
  constructor(e, n) {
2942
2942
  this.toDOM = e, this.spec = n || on, this.side = this.spec.side || 0;
2943
2943
  }
2944
2944
  map(e, n, r, o) {
2945
2945
  let { pos: i, deleted: s } = e.mapResult(n.from + o, this.side < 0 ? -1 : 1);
2946
- return s ? null : new z(i - r, i - r, this);
2946
+ return s ? null : new F(i - r, i - r, this);
2947
2947
  }
2948
2948
  valid() {
2949
2949
  return !0;
2950
2950
  }
2951
2951
  eq(e) {
2952
- return this == e || e instanceof Oo && (this.spec.key && this.spec.key == e.spec.key || this.toDOM == e.toDOM && gr(this.spec, e.spec));
2952
+ return this == e || e instanceof To && (this.spec.key && this.spec.key == e.spec.key || this.toDOM == e.toDOM && gr(this.spec, e.spec));
2953
2953
  }
2954
2954
  destroy(e) {
2955
2955
  this.spec.destroy && this.spec.destroy(e);
@@ -2961,7 +2961,7 @@ class Bt {
2961
2961
  }
2962
2962
  map(e, n, r, o) {
2963
2963
  let i = e.map(n.from + o, this.spec.inclusiveStart ? -1 : 1) - r, s = e.map(n.to + o, this.spec.inclusiveEnd ? 1 : -1) - r;
2964
- return i >= s ? null : new z(i, s, this);
2964
+ return i >= s ? null : new F(i, s, this);
2965
2965
  }
2966
2966
  valid(e, n) {
2967
2967
  return n.from < n.to;
@@ -2984,7 +2984,7 @@ class Ps {
2984
2984
  if (i.deleted)
2985
2985
  return null;
2986
2986
  let s = e.mapResult(n.to + o, -1);
2987
- return s.deleted || s.pos <= i.pos ? null : new z(i.pos - r, s.pos - r, this);
2987
+ return s.deleted || s.pos <= i.pos ? null : new F(i.pos - r, s.pos - r, this);
2988
2988
  }
2989
2989
  valid(e, n) {
2990
2990
  let { index: r, offset: o } = e.content.findIndex(n.from), i;
@@ -2996,7 +2996,7 @@ class Ps {
2996
2996
  destroy() {
2997
2997
  }
2998
2998
  }
2999
- class z {
2999
+ class F {
3000
3000
  /**
3001
3001
  @internal
3002
3002
  */
@@ -3007,7 +3007,7 @@ class z {
3007
3007
  @internal
3008
3008
  */
3009
3009
  copy(e, n) {
3010
- return new z(e, n, this.type);
3010
+ return new F(e, n, this.type);
3011
3011
  }
3012
3012
  /**
3013
3013
  @internal
@@ -3030,14 +3030,14 @@ class z {
3030
3030
  widget's current document position.
3031
3031
  */
3032
3032
  static widget(e, n, r) {
3033
- return new z(e, e, new Oo(n, r));
3033
+ return new F(e, e, new To(n, r));
3034
3034
  }
3035
3035
  /**
3036
3036
  Creates an inline decoration, which adds the given attributes to
3037
3037
  each inline node between `from` and `to`.
3038
3038
  */
3039
3039
  static inline(e, n, r, o) {
3040
- return new z(e, n, new Bt(r, o));
3040
+ return new F(e, n, new Bt(r, o));
3041
3041
  }
3042
3042
  /**
3043
3043
  Creates a node decoration. `from` and `to` should point precisely
@@ -3045,7 +3045,7 @@ class z {
3045
3045
  node, will receive the given attributes.
3046
3046
  */
3047
3047
  static node(e, n, r, o) {
3048
- return new z(e, n, new Ps(r, o));
3048
+ return new F(e, n, new Ps(r, o));
3049
3049
  }
3050
3050
  /**
3051
3051
  The spec provided when creating this decoration. Can be useful
@@ -3064,7 +3064,7 @@ class z {
3064
3064
  @internal
3065
3065
  */
3066
3066
  get widget() {
3067
- return this.type instanceof Oo;
3067
+ return this.type instanceof To;
3068
3068
  }
3069
3069
  }
3070
3070
  const Cn = [], on = {};
@@ -3081,7 +3081,7 @@ class P {
3081
3081
  you must make a copy if you want need to preserve that.
3082
3082
  */
3083
3083
  static create(e, n) {
3084
- return n.length ? To(n, e, 0, on) : we;
3084
+ return n.length ? Do(n, e, 0, on) : we;
3085
3085
  }
3086
3086
  /**
3087
3087
  Find all decorations in this set which touch the given range
@@ -3140,7 +3140,7 @@ class P {
3140
3140
  if (d = ed(n, a, c)) {
3141
3141
  for (o || (o = this.children.slice()); i < o.length && o[i] < l; )
3142
3142
  i += 3;
3143
- o[i] == l ? o[i + 2] = o[i + 2].addInner(a, d, c + 1) : o.splice(i, 0, l, l + a.nodeSize, To(d, a, c + 1, on)), i += 3;
3143
+ o[i] == l ? o[i + 2] = o[i + 2].addInner(a, d, c + 1) : o.splice(i, 0, l, l + a.nodeSize, Do(d, a, c + 1, on)), i += 3;
3144
3144
  }
3145
3145
  });
3146
3146
  let s = Qc(i ? td(n) : n, -r);
@@ -3336,7 +3336,7 @@ function Th(t, e, n, r, o, i, s) {
3336
3336
  l = !0;
3337
3337
  }
3338
3338
  if (l) {
3339
- let c = Dh(a, t, e, n, o, i, s), d = To(c, r, 0, s);
3339
+ let c = Dh(a, t, e, n, o, i, s), d = Do(c, r, 0, s);
3340
3340
  e = d.local;
3341
3341
  for (let u = 0; u < a.length; u += 3)
3342
3342
  a[u + 1] < 0 && (a.splice(u, 3), u -= 3);
@@ -3355,7 +3355,7 @@ function Qc(t, e) {
3355
3355
  let n = [];
3356
3356
  for (let r = 0; r < t.length; r++) {
3357
3357
  let o = t[r];
3358
- n.push(new z(o.from + e, o.to + e, o.type));
3358
+ n.push(new F(o.from + e, o.to + e, o.type));
3359
3359
  }
3360
3360
  return n;
3361
3361
  }
@@ -3386,13 +3386,13 @@ function td(t) {
3386
3386
  t[n] != null && e.push(t[n]);
3387
3387
  return e;
3388
3388
  }
3389
- function To(t, e, n, r) {
3389
+ function Do(t, e, n, r) {
3390
3390
  let o = [], i = !1;
3391
3391
  e.forEach((a, l) => {
3392
3392
  let c = ed(t, a, l + n);
3393
3393
  if (c) {
3394
3394
  i = !0;
3395
- let d = To(c, a, n + l + 1, r);
3395
+ let d = Do(c, a, n + l + 1, r);
3396
3396
  d != we && o.push(l, l + a.nodeSize, d);
3397
3397
  }
3398
3398
  });
@@ -3679,7 +3679,7 @@ function _h(t, e, n, r, o) {
3679
3679
  if (t.input.compositionPendingChanges = 0, e < 0) {
3680
3680
  let C = t.input.lastSelectionTime > Date.now() - 50 ? t.input.lastSelectionOrigin : null, V = As(t, C);
3681
3681
  if (V && !t.state.selection.eq(V)) {
3682
- if (ve && bt && t.input.lastKeyCode === 13 && Date.now() - 100 < t.input.lastKeyCodeTime && t.someProp("handleKeyDown", (B) => B(t, Qt(13, "Enter"))))
3682
+ if (ve && bt && t.input.lastKeyCode === 13 && Date.now() - 100 < t.input.lastKeyCodeTime && t.someProp("handleKeyDown", (z) => z(t, Qt(13, "Enter"))))
3683
3683
  return;
3684
3684
  let $ = t.state.tr.setSelection(V);
3685
3685
  C == "pointer" ? $.setMeta("pointer", !0) : C == "key" && $.scrollIntoView(), i && $.setMeta("composition", i), t.dispatch($);
@@ -3723,15 +3723,15 @@ function _h(t, e, n, r, o) {
3723
3723
  return C(t, Qt(13, "Enter"));
3724
3724
  });
3725
3725
  }, 20));
3726
- let y = h.start, S = h.endA, k, M, F;
3726
+ let y = h.start, S = h.endA, k, M, B;
3727
3727
  if (w) {
3728
3728
  if (m.pos == g.pos)
3729
3729
  De && Lt <= 11 && m.parentOffset == 0 && (t.domObserver.suppressSelectionUpdates(), setTimeout(() => kt(t), 20)), k = t.state.tr.delete(y, S), M = d.resolve(h.start).marksAcross(d.resolve(h.endA));
3730
3730
  else if (
3731
3731
  // Adding or removing a mark
3732
- h.endA == h.endB && (F = Vh(m.parent.content.cut(m.parentOffset, g.parentOffset), b.parent.content.cut(b.parentOffset, h.endA - b.start())))
3732
+ h.endA == h.endB && (B = Vh(m.parent.content.cut(m.parentOffset, g.parentOffset), b.parent.content.cut(b.parentOffset, h.endA - b.start())))
3733
3733
  )
3734
- k = t.state.tr, F.type == "add" ? k.addMark(y, S, F.mark) : k.removeMark(y, S, F.mark);
3734
+ k = t.state.tr, B.type == "add" ? k.addMark(y, S, B.mark) : k.removeMark(y, S, B.mark);
3735
3735
  else if (m.parent.child(m.index()).isText && m.index() == g.index() - (g.textOffset ? 0 : 1)) {
3736
3736
  let C = m.parent.textBetween(m.parentOffset, g.parentOffset);
3737
3737
  if (t.someProp("handleTextInput", (V) => V(t, y, S, C)))
@@ -4169,12 +4169,12 @@ function Ua(t) {
4169
4169
  if (typeof n == "function" && (n = n(t.state)), n)
4170
4170
  for (let r in n)
4171
4171
  r == "class" ? e.class += " " + n[r] : r == "style" ? e.style = (e.style ? e.style + ";" : "") + n[r] : !e[r] && r != "contenteditable" && r != "nodeName" && (e[r] = String(n[r]));
4172
- }), e.translate || (e.translate = "no"), [z.node(0, t.state.doc.content.size, e)];
4172
+ }), e.translate || (e.translate = "no"), [F.node(0, t.state.doc.content.size, e)];
4173
4173
  }
4174
4174
  function qa(t) {
4175
4175
  if (t.markCursor) {
4176
4176
  let e = document.createElement("img");
4177
- e.className = "ProseMirror-separator", e.setAttribute("mark-placeholder", "true"), e.setAttribute("alt", ""), t.cursorWrapper = { dom: e, deco: z.widget(t.state.selection.from, e, { raw: !0, marks: t.markCursor }) };
4177
+ e.className = "ProseMirror-separator", e.setAttribute("mark-placeholder", "true"), e.setAttribute("alt", ""), t.cursorWrapper = { dom: e, deco: F.widget(t.state.selection.from, e, { raw: !0, marks: t.markCursor }) };
4178
4178
  } else
4179
4179
  t.cursorWrapper = null;
4180
4180
  }
@@ -4325,7 +4325,7 @@ wr.encodeInto ? gm : ym, bm = (t, e) => {
4325
4325
  throw od("Method unimplemented");
4326
4326
  }, id = () => {
4327
4327
  throw od("Unexpected case");
4328
- }, po = () => /* @__PURE__ */ new Map(), sd = (t, e, n) => {
4328
+ }, ho = () => /* @__PURE__ */ new Map(), sd = (t, e, n) => {
4329
4329
  let r = t.get(e);
4330
4330
  return r === void 0 && t.set(e, r = n()), r;
4331
4331
  }, Cm = Object.keys, Mm = (t, e) => {
@@ -4356,7 +4356,7 @@ wr.encodeInto ? gm : ym, bm = (t, e) => {
4356
4356
  remove: t.length - n - r,
4357
4357
  insert: e.slice(n, e.length - r)
4358
4358
  };
4359
- }, Nm = Em, te = new J("y-sync"), $t = new J("y-undo"), Gr = new J("yjs-cursor"), Pm = Math.random, Im = (t) => t[yr(Pm() * t.length)], el = (t) => t === void 0 ? null : t;
4359
+ }, Nm = Em, te = new K("y-sync"), $t = new K("y-undo"), Zr = new K("yjs-cursor"), Pm = Math.random, Im = (t) => t[yr(Pm() * t.length)], el = (t) => t === void 0 ? null : t;
4360
4360
  class Rm {
4361
4361
  constructor() {
4362
4362
  this.map = /* @__PURE__ */ new Map();
@@ -4385,7 +4385,7 @@ let et;
4385
4385
  const Bm = () => {
4386
4386
  if (et === void 0)
4387
4387
  if (Pn) {
4388
- et = po();
4388
+ et = ho();
4389
4389
  const t = oe.argv;
4390
4390
  let e = null;
4391
4391
  for (let n = 0; n < t.length; n++) {
@@ -4393,12 +4393,12 @@ const Bm = () => {
4393
4393
  r[0] === "-" ? (e !== null && et.set(e, ""), e = r) : e !== null && (et.set(e, r), e = null);
4394
4394
  }
4395
4395
  e !== null && et.set(e, "");
4396
- } else typeof location == "object" ? (et = po(), (location.search || "?").slice(1).split("&").forEach((t) => {
4396
+ } else typeof location == "object" ? (et = ho(), (location.search || "?").slice(1).split("&").forEach((t) => {
4397
4397
  if (t.length !== 0) {
4398
4398
  const [e, n] = t.split("=");
4399
4399
  et.set(`--${Ga(e, "-")}`, n), et.set(`-${Ga(e, "-")}`, n);
4400
4400
  }
4401
- })) : et = po();
4401
+ })) : et = ho();
4402
4402
  return et;
4403
4403
  }, Vi = (t) => Bm().has(t), Hi = (t) => el(Pn ? oe.env[t.toUpperCase().replaceAll("-", "_")] : Fm.getItem(t)), cd = (t) => Vi("--" + t) || Hi(t) !== null;
4404
4404
  cd("production");
@@ -4553,7 +4553,7 @@ const Jm = (t) => new Xm().digest(t), Ym = (t) => {
4553
4553
  }, tg = (t) => Zm(eg(Jm(Qm(t)))), ng = () => ({
4554
4554
  mapping: /* @__PURE__ */ new Map(),
4555
4555
  isOMark: /* @__PURE__ */ new Map()
4556
- }), Do = (t, e) => e === void 0 ? !t.deleted : e.sv.has(t.id.client) && /** @type {number} */
4556
+ }), Eo = (t, e) => e === void 0 ? !t.deleted : e.sv.has(t.id.client) && /** @type {number} */
4557
4557
  e.sv.get(t.id.client) > t.id.clock && !D.isDeleted(e.ds, t.id), rg = [{ light: "#ecd44433", dark: "#ecd444" }], og = (t, e, n) => {
4558
4558
  if (!t.has(n)) {
4559
4559
  if (t.size < e.length) {
@@ -4575,7 +4575,7 @@ e.sv.get(t.id.client) > t.id.clock && !D.isDeleted(e.ds, t.id), rg = [{ light: "
4575
4575
  mapping: i
4576
4576
  } = {}) => {
4577
4577
  let s = !1;
4578
- const a = new ag(t, i), l = new Y({
4578
+ const a = new ag(t, i), l = new X({
4579
4579
  props: {
4580
4580
  editable: (c) => {
4581
4581
  const d = te.getState(c);
@@ -4673,12 +4673,12 @@ e.sv.get(t.id.client) > t.id.clock && !D.isDeleted(e.ds, t.id), rg = [{ light: "
4673
4673
  /** @type {any} */
4674
4674
  e.selection.jsonID
4675
4675
  ),
4676
- anchor: No(
4676
+ anchor: Po(
4677
4677
  e.selection.anchor,
4678
4678
  t.type,
4679
4679
  t.mapping
4680
4680
  ),
4681
- head: No(
4681
+ head: Po(
4682
4682
  e.selection.head,
4683
4683
  t.type,
4684
4684
  t.mapping
@@ -4813,7 +4813,7 @@ class ag {
4813
4813
  }, c = D.typeListToArraySnapshot(
4814
4814
  i,
4815
4815
  new D.Snapshot(n.ds, e.sv)
4816
- ).map((u) => !u._item.deleted || Do(u._item, e) || Do(u._item, n) ? ir(
4816
+ ).map((u) => !u._item.deleted || Eo(u._item, e) || Eo(u._item, n) ? ir(
4817
4817
  u,
4818
4818
  this.prosemirrorView.state.schema,
4819
4819
  { mapping: /* @__PURE__ */ new Map(), isOMark: /* @__PURE__ */ new Map() },
@@ -4953,11 +4953,11 @@ const dd = (t, e, n, r, o, i) => {
4953
4953
  r === void 0 || o === void 0 ? t.toArray().forEach(a) : D.typeListToArraySnapshot(t, new D.Snapshot(o.ds, r.sv)).forEach(a);
4954
4954
  try {
4955
4955
  const l = t.getAttributes(r);
4956
- r !== void 0 && (Do(
4956
+ r !== void 0 && (Eo(
4957
4957
  /** @type {Y.Item} */
4958
4958
  t._item,
4959
4959
  r
4960
- ) ? Do(
4960
+ ) ? Eo(
4961
4961
  /** @type {Y.Item} */
4962
4962
  t._item,
4963
4963
  o
@@ -5051,21 +5051,21 @@ const dd = (t, e, n, r, o, i) => {
5051
5051
  );
5052
5052
  }
5053
5053
  return t instanceof D.XmlText && e instanceof Array && ud(t, e);
5054
- }, Eo = (t, e) => t === e || t instanceof Array && e instanceof Array && t.length === e.length && t.every(
5054
+ }, No = (t, e) => t === e || t instanceof Array && e instanceof Array && t.length === e.length && t.every(
5055
5055
  (n, r) => e[r] === n
5056
5056
  ), nl = (t, e, n) => {
5057
5057
  const r = t.toArray(), o = qo(e), i = o.length, s = r.length, a = zt(s, i);
5058
5058
  let l = 0, c = 0, d = !1;
5059
5059
  for (; l < a; l++) {
5060
5060
  const u = r[l], f = o[l];
5061
- if (Eo(n.mapping.get(u), f))
5061
+ if (No(n.mapping.get(u), f))
5062
5062
  d = !0;
5063
5063
  else if (!kr(u, f))
5064
5064
  break;
5065
5065
  }
5066
5066
  for (; l + c < a; c++) {
5067
5067
  const u = r[s - c - 1], f = o[i - c - 1];
5068
- if (Eo(n.mapping.get(u), f))
5068
+ if (No(n.mapping.get(u), f))
5069
5069
  d = !0;
5070
5070
  else if (!kr(u, f))
5071
5071
  break;
@@ -5125,7 +5125,7 @@ const dd = (t, e, n, r, o, i) => {
5125
5125
  let c = 0, d = 0;
5126
5126
  for (; c < l; c++) {
5127
5127
  const u = s[c], f = o[c];
5128
- if (!Eo(r.mapping.get(u), f))
5128
+ if (!No(r.mapping.get(u), f))
5129
5129
  if (kr(u, f))
5130
5130
  r.mapping.set(u, f);
5131
5131
  else
@@ -5133,7 +5133,7 @@ const dd = (t, e, n, r, o, i) => {
5133
5133
  }
5134
5134
  for (; d + c + 1 < l; d++) {
5135
5135
  const u = s[a - d - 1], f = o[i - d - 1];
5136
- if (!Eo(r.mapping.get(u), f))
5136
+ if (!No(r.mapping.get(u), f))
5137
5137
  if (kr(u, f))
5138
5138
  r.mapping.set(u, f);
5139
5139
  else
@@ -5203,8 +5203,8 @@ const mg = () => {
5203
5203
  }), n.dispatch(r));
5204
5204
  });
5205
5205
  }, gg = (t, e, n) => {
5206
- sr || (sr = /* @__PURE__ */ new Map(), Ls(0, mg)), sd(sr, t, po).set(e, n);
5207
- }, No = (t, e, n) => {
5206
+ sr || (sr = /* @__PURE__ */ new Map(), Ls(0, mg)), sd(sr, t, ho).set(e, n);
5207
+ }, Po = (t, e, n) => {
5208
5208
  if (t === 0)
5209
5209
  return D.createRelativePositionFromTypeIndex(e, 0, -1);
5210
5210
  let r = e._first === null ? null : (
@@ -5352,14 +5352,14 @@ const mg = () => {
5352
5352
  if (u !== null && f !== null) {
5353
5353
  const p = Nn(t.doc.content.size - 1, 0);
5354
5354
  u = zt(u, p), f = zt(f, p), a.push(
5355
- z.widget(f, () => r(d, c), {
5355
+ F.widget(f, () => r(d, c), {
5356
5356
  key: c + "",
5357
5357
  side: 10
5358
5358
  })
5359
5359
  );
5360
5360
  const h = zt(u, f), m = Nn(u, f);
5361
5361
  a.push(
5362
- z.inline(h, m, o(d, c), {
5362
+ F.inline(h, m, o(d, c), {
5363
5363
  inclusiveEnd: !0,
5364
5364
  inclusiveStart: !1
5365
5365
  })
@@ -5372,8 +5372,8 @@ const mg = () => {
5372
5372
  cursorBuilder: n = kg,
5373
5373
  selectionBuilder: r = xg,
5374
5374
  getSelection: o = (s) => s.selection
5375
- } = {}, i = "cursor") => new Y({
5376
- key: Gr,
5375
+ } = {}, i = "cursor") => new X({
5376
+ key: Zr,
5377
5377
  state: {
5378
5378
  init(s, a) {
5379
5379
  return rl(
@@ -5385,7 +5385,7 @@ const mg = () => {
5385
5385
  );
5386
5386
  },
5387
5387
  apply(s, a, l, c) {
5388
- const d = te.getState(c), u = s.getMeta(Gr);
5388
+ const d = te.getState(c), u = s.getMeta(Zr);
5389
5389
  return d && d.isChangeOrigin || u && u.awarenessUpdated ? rl(
5390
5390
  c,
5391
5391
  t,
@@ -5396,19 +5396,19 @@ const mg = () => {
5396
5396
  }
5397
5397
  },
5398
5398
  props: {
5399
- decorations: (s) => Gr.getState(s)
5399
+ decorations: (s) => Zr.getState(s)
5400
5400
  },
5401
5401
  view: (s) => {
5402
5402
  const a = () => {
5403
- s.docView && gg(s, Gr, { awarenessUpdated: !0 });
5403
+ s.docView && gg(s, Zr, { awarenessUpdated: !0 });
5404
5404
  }, l = () => {
5405
5405
  const c = te.getState(s.state), d = t.getLocalState() || {};
5406
5406
  if (s.hasFocus()) {
5407
- const u = o(s.state), f = No(
5407
+ const u = o(s.state), f = Po(
5408
5408
  u.anchor,
5409
5409
  c.type,
5410
5410
  c.binding.mapping
5411
- ), p = No(
5411
+ ), p = Po(
5412
5412
  u.head,
5413
5413
  c.type,
5414
5414
  c.binding.mapping
@@ -5445,7 +5445,7 @@ const mg = () => {
5445
5445
  const e = $t.getState(t).undoManager;
5446
5446
  if (e != null)
5447
5447
  return e.redo(), !0;
5448
- }, Og = /* @__PURE__ */ new Set(["paragraph"]), Tg = (t, e) => !(t instanceof Rf) || !(t.content instanceof Lf) || !(t.content.type instanceof Ff || t.content.type instanceof Bf && e.has(t.content.type.nodeName)) || t.content.type._length === 0, Dg = ({ protectedNodes: t = Og, trackedOrigins: e = [], undoManager: n = null } = {}) => new Y({
5448
+ }, Og = /* @__PURE__ */ new Set(["paragraph"]), Tg = (t, e) => !(t instanceof Rf) || !(t.content instanceof Lf) || !(t.content.type instanceof Ff || t.content.type instanceof Bf && e.has(t.content.type.nodeName)) || t.content.type._length === 0, Dg = ({ protectedNodes: t = Og, trackedOrigins: e = [], undoManager: n = null } = {}) => new X({
5449
5449
  key: $t,
5450
5450
  state: {
5451
5451
  init: (r, o) => {
@@ -5591,7 +5591,7 @@ var Ht = {
5591
5591
  220: "\\",
5592
5592
  221: "]",
5593
5593
  222: "'"
5594
- }, Po = {
5594
+ }, Io = {
5595
5595
  48: ")",
5596
5596
  49: "!",
5597
5597
  50: "@",
@@ -5620,10 +5620,10 @@ var Ht = {
5620
5620
  for (var be = 0; be < 10; be++) Ht[48 + be] = Ht[96 + be] = String(be);
5621
5621
  for (var be = 1; be <= 24; be++) Ht[be + 111] = "F" + be;
5622
5622
  for (var be = 65; be <= 90; be++)
5623
- Ht[be] = String.fromCharCode(be + 32), Po[be] = String.fromCharCode(be);
5624
- for (var hi in Ht) Po.hasOwnProperty(hi) || (Po[hi] = Ht[hi]);
5623
+ Ht[be] = String.fromCharCode(be + 32), Io[be] = String.fromCharCode(be);
5624
+ for (var hi in Ht) Io.hasOwnProperty(hi) || (Io[hi] = Ht[hi]);
5625
5625
  function Ig(t) {
5626
- var e = Ng && t.metaKey && t.shiftKey && !t.ctrlKey && !t.altKey || Pg && t.shiftKey && t.key && t.key.length == 1 || t.key == "Unidentified", n = !e && t.key || (t.shiftKey ? Po : Ht)[t.keyCode] || t.key || "Unidentified";
5626
+ var e = Ng && t.metaKey && t.shiftKey && !t.ctrlKey && !t.altKey || Pg && t.shiftKey && t.key && t.key.length == 1 || t.key == "Unidentified", n = !e && t.key || (t.shiftKey ? Io : Ht)[t.keyCode] || t.key || "Unidentified";
5627
5627
  return n == "Esc" && (n = "Escape"), n == "Del" && (n = "Delete"), n == "Left" && (n = "ArrowLeft"), n == "Up" && (n = "ArrowUp"), n == "Right" && (n = "ArrowRight"), n == "Down" && (n = "ArrowDown"), n;
5628
5628
  }
5629
5629
  const Rg = typeof navigator < "u" ? /Mac|iP(hone|[oa]d)/.test(navigator.platform) : !1;
@@ -5658,7 +5658,7 @@ function mi(t, e, n = !0) {
5658
5658
  return e.altKey && (t = "Alt-" + t), e.ctrlKey && (t = "Ctrl-" + t), e.metaKey && (t = "Meta-" + t), n && e.shiftKey && (t = "Shift-" + t), t;
5659
5659
  }
5660
5660
  function Bg(t) {
5661
- return new Y({ props: { handleKeyDown: Bs(t) } });
5661
+ return new X({ props: { handleKeyDown: Bs(t) } });
5662
5662
  }
5663
5663
  function Bs(t) {
5664
5664
  let e = Fg(t);
@@ -5697,7 +5697,7 @@ function St(t, e) {
5697
5697
  }
5698
5698
  return t;
5699
5699
  }
5700
- function Lr(t, e) {
5700
+ function Fr(t, e) {
5701
5701
  return e.nodes[t] ? "node" : e.marks[t] ? "mark" : null;
5702
5702
  }
5703
5703
  var $n, hd, md;
@@ -5822,7 +5822,7 @@ class E {
5822
5822
  * @returns The attrs of the node/mark or an empty object.
5823
5823
  */
5824
5824
  static getAttributes(e, n) {
5825
- const r = Lr(
5825
+ const r = Fr(
5826
5826
  typeof n == "string" ? n : n.name,
5827
5827
  e.schema
5828
5828
  );
@@ -5914,19 +5914,19 @@ _n = new WeakSet(), gd = function(e, n, r) {
5914
5914
  ...g ? g(i) : {}
5915
5915
  };
5916
5916
  }, {}), d = Ki({
5917
- content: X(I(i, "content", a)),
5918
- group: X(I(i, "group", a)),
5919
- marks: X(I(i, "marks", a)),
5920
- inline: X(I(i, "inline", a)),
5921
- atom: X(I(i, "atom", a)),
5922
- selectable: X(I(i, "selectable", a)),
5923
- draggable: X(I(i, "draggable", a)),
5924
- code: X(I(i, "code", a)),
5925
- defining: X(I(i, "defining", a)),
5926
- isolating: X(I(i, "isolating", a)),
5917
+ content: Y(I(i, "content", a)),
5918
+ group: Y(I(i, "group", a)),
5919
+ marks: Y(I(i, "marks", a)),
5920
+ inline: Y(I(i, "inline", a)),
5921
+ atom: Y(I(i, "atom", a)),
5922
+ selectable: Y(I(i, "selectable", a)),
5923
+ draggable: Y(I(i, "draggable", a)),
5924
+ code: Y(I(i, "code", a)),
5925
+ defining: Y(I(i, "defining", a)),
5926
+ isolating: Y(I(i, "isolating", a)),
5927
5927
  attrs: l,
5928
5928
  ...c
5929
- }), u = X(I(i, "parseDOM", a));
5929
+ }), u = Y(I(i, "parseDOM", a));
5930
5930
  u && (d.parseDOM = u.map((h) => E.insertExtensionAttrsToParseRule(h, s)));
5931
5931
  const f = I(i, "renderDOM", a);
5932
5932
  f && (d.toDOM = (h) => f({
@@ -5947,13 +5947,13 @@ _n = new WeakSet(), gd = function(e, n, r) {
5947
5947
  }, l = Object.fromEntries(
5948
5948
  s.map((f) => [f.name, { default: f?.attribute?.default }])
5949
5949
  ), c = Ki({
5950
- group: X(I(i, "group", a)),
5951
- inclusive: X(I(i, "inclusive", a)),
5952
- excludes: X(I(i, "excludes", a)),
5953
- spanning: X(I(i, "spanning", a)),
5954
- code: X(I(i, "code", a)),
5950
+ group: Y(I(i, "group", a)),
5951
+ inclusive: Y(I(i, "inclusive", a)),
5952
+ excludes: Y(I(i, "excludes", a)),
5953
+ spanning: Y(I(i, "spanning", a)),
5954
+ code: Y(I(i, "code", a)),
5955
5955
  attrs: l
5956
- }), d = X(I(i, "parseDOM", a));
5956
+ }), d = Y(I(i, "parseDOM", a));
5957
5957
  d && (c.parseDOM = d.map((f) => E.insertExtensionAttrsToParseRule(f, s)));
5958
5958
  const u = I(i, "renderDOM", a);
5959
5959
  return u && (c.toDOM = (f) => u({
@@ -6170,8 +6170,8 @@ const Hg = (t, e) => {
6170
6170
  }), a.dispatch(p), c = !0);
6171
6171
  }), c;
6172
6172
  }, jg = ({ editor: t, rules: e }) => {
6173
- const n = new Y({
6174
- key: new J("inputRulesPlugin"),
6173
+ const n = new X({
6174
+ key: new K("inputRulesPlugin"),
6175
6175
  state: {
6176
6176
  init() {
6177
6177
  return null;
@@ -6407,7 +6407,7 @@ bd = function() {
6407
6407
  editor: this.editor,
6408
6408
  type: Zn(e.name, this.schema)
6409
6409
  };
6410
- e.type === "mark" && (X(I(e, "keepOnSplit", n)) ?? !0) && this.splittableMarks.push(e.name), N(this, Vn, wd).call(this, e);
6410
+ e.type === "mark" && (Y(I(e, "keepOnSplit", n)) ?? !0) && this.splittableMarks.push(e.name), N(this, Vn, wd).call(this, e);
6411
6411
  }
6412
6412
  }, /**
6413
6413
  * Attach editor events to extension
@@ -6859,7 +6859,7 @@ const gy = (t, e = {}) => ({ tr: n, state: r, dispatch: o }) => {
6859
6859
  t.removeMark(i.$from.pos, i.$to.pos);
6860
6860
  }), !0;
6861
6861
  };
6862
- function Io(t, e, n = {}) {
6862
+ function Ro(t, e, n = {}) {
6863
6863
  const { empty: r, ranges: o } = t.selection, i = e ? St(e, t.schema) : null;
6864
6864
  if (r)
6865
6865
  return !!(t.storedMarks || t.selection.$from.marks()).filter((u) => i ? i.name === u.type.name : !0).find((u) => pr(u.attrs, n, { strict: !1 }));
@@ -6884,7 +6884,7 @@ function Io(t, e, n = {}) {
6884
6884
  }
6885
6885
  const by = (t, e = {}, n = {}) => ({ state: r, commands: o }) => {
6886
6886
  const { extendEmptyMarkRange: i = !1 } = n, s = St(t, r.schema);
6887
- return Io(r, s, e) ? o.unsetMark(s, { extendEmptyMarkRange: i }) : o.setMark(s, e);
6887
+ return Ro(r, s, e) ? o.unsetMark(s, { extendEmptyMarkRange: i }) : o.setMark(s, e);
6888
6888
  }, wy = () => ({ state: t, tr: e, dispatch: n }) => {
6889
6889
  const { selection: r } = e, { ranges: o } = r;
6890
6890
  return n && o.forEach(({ $from: i, $to: s }) => {
@@ -6904,7 +6904,7 @@ const by = (t, e = {}, n = {}) => ({ state: r, commands: o }) => {
6904
6904
  const i = le(t, n.schema);
6905
6905
  return i.isTextblock ? o().command(({ commands: s }) => ol(i, e)(n) ? !0 : s.clearNodes()).command(({ state: s }) => ol(i, e)(s, r)).run() : !1;
6906
6906
  };
6907
- function Ro(t, e, n = {}) {
6907
+ function Lo(t, e, n = {}) {
6908
6908
  const { from: r, to: o, empty: i } = t.selection, s = e ? le(e, t.schema) : null, a = [];
6909
6909
  t.doc.nodesBetween(r, o, (u, f) => {
6910
6910
  if (u.isText) return;
@@ -6920,10 +6920,10 @@ function Ro(t, e, n = {}) {
6920
6920
  }
6921
6921
  const ky = (t, e, n = {}) => ({ state: r, commands: o }) => {
6922
6922
  const i = le(t, r.schema), s = le(e, r.schema);
6923
- return Ro(r, i, n) ? o.setNode(s) : o.setNode(i, n);
6923
+ return Lo(r, i, n) ? o.setNode(s) : o.setNode(i, n);
6924
6924
  }, xy = () => ({ state: t, dispatch: e }) => oy(t, e), Sy = () => ({ state: t, dispatch: e }) => $s(t, e), Cy = (t, e = {}) => ({ tr: n, state: r, dispatch: o }) => {
6925
6925
  let i = null, s = null;
6926
- const a = Lr(
6926
+ const a = Fr(
6927
6927
  typeof t == "string" ? t : t.name,
6928
6928
  r.schema
6929
6929
  );
@@ -6940,7 +6940,7 @@ const ky = (t, e, n = {}) => ({ state: r, commands: o }) => {
6940
6940
  }), !0) : !1;
6941
6941
  }, My = (t, e) => ({ tr: n, state: r, dispatch: o }) => {
6942
6942
  let i = null, s = null;
6943
- const a = Lr(
6943
+ const a = Fr(
6944
6944
  typeof t == "string" ? t : t.name,
6945
6945
  r.schema
6946
6946
  );
@@ -6959,7 +6959,7 @@ const ky = (t, e, n = {}) => ({ state: r, commands: o }) => {
6959
6959
  }
6960
6960
  return t;
6961
6961
  };
6962
- function Zr(t) {
6962
+ function Qr(t) {
6963
6963
  const e = `<body>${t}</body>`, n = new window.DOMParser().parseFromString(e, "text/html").body;
6964
6964
  return Id(n);
6965
6965
  }
@@ -7002,13 +7002,13 @@ function Gi(t, e, n) {
7002
7002
  }
7003
7003
  })
7004
7004
  });
7005
- if (n.slice ? rn.fromSchema(l).parseSlice(Zr(t), n.parseOptions) : rn.fromSchema(l).parse(Zr(t), n.parseOptions), n.errorOnInvalidContent && s)
7005
+ if (n.slice ? rn.fromSchema(l).parseSlice(Qr(t), n.parseOptions) : rn.fromSchema(l).parse(Qr(t), n.parseOptions), n.errorOnInvalidContent && s)
7006
7006
  throw new Error("[super-editor error]: Invalid HTML content", {
7007
7007
  cause: new Error(`Invalid element found: ${a}`)
7008
7008
  });
7009
7009
  }
7010
7010
  const i = rn.fromSchema(e);
7011
- return n.slice ? i.parseSlice(Zr(t), n.parseOptions).content : i.parse(Zr(t), n.parseOptions);
7011
+ return n.slice ? i.parseSlice(Qr(t), n.parseOptions).content : i.parse(Qr(t), n.parseOptions);
7012
7012
  }
7013
7013
  return Gi("", e, n);
7014
7014
  }
@@ -7167,7 +7167,7 @@ function Uy(t) {
7167
7167
  const qy = (t, e = {}) => ({ state: n, dispatch: r }) => {
7168
7168
  const o = le(t, n.schema);
7169
7169
  return $y(o, e)(n, r);
7170
- }, Fr = (t, e) => {
7170
+ }, Br = (t, e) => {
7171
7171
  for (let n = t.depth; n > 0; n--) {
7172
7172
  const r = t.node(n);
7173
7173
  if (e(r))
@@ -7178,14 +7178,14 @@ const qy = (t, e = {}) => ({ state: n, dispatch: r }) => {
7178
7178
  node: r
7179
7179
  };
7180
7180
  }
7181
- }, je = (t) => ({ $from: e }) => Fr(e, t), Zi = (t, e) => {
7181
+ }, je = (t) => ({ $from: e }) => Br(e, t), Zi = (t, e) => {
7182
7182
  const r = e.filter((s) => s.type === "node").find((s) => s.name === t);
7183
7183
  if (!r) return !1;
7184
7184
  const o = {
7185
7185
  name: r.name,
7186
7186
  options: r.options,
7187
7187
  storage: r.storage
7188
- }, i = X(I(r, "group", o));
7188
+ }, i = Y(I(r, "group", o));
7189
7189
  return typeof i != "string" ? !1 : i.split(" ").includes("list");
7190
7190
  }, Ky = {
7191
7191
  type: "element",
@@ -8356,15 +8356,15 @@ const qy = (t, e = {}) => ({ state: n, dispatch: r }) => {
8356
8356
  if (Zi(k.node.type.name, f) && h.validContent(k.node.content) && l)
8357
8357
  return c().command(() => (s.setNodeMarkup(k.pos, h), !0)).command(() => yi(s, h)).command(() => bi(s, h)).run();
8358
8358
  }
8359
- const F = ({ ensureMarks: $ = !1 }) => () => {
8360
- const B = d().wrapInList(h, r);
8359
+ const B = ({ ensureMarks: $ = !1 }) => () => {
8360
+ const z = d().wrapInList(h, r);
8361
8361
  if ($) {
8362
8362
  const H = S.filter((ie) => p.includes(ie.type.name));
8363
8363
  s.ensureMarks(H);
8364
8364
  }
8365
- return B ? !0 : u.clearNodes();
8365
+ return z ? !0 : u.clearNodes();
8366
8366
  }, C = Rd(M.definitions);
8367
- return i.converter.numbering = Yy(C, M, h), r.listId = C, !n || !S || !l ? c().command(F({ ensureMarks: !1 })).wrapInList(h, r).command(() => yi(s, h)).command(() => bi(s, h)).run() : c().command(F({ ensureMarks: !0 })).wrapInList(h, r).command(() => yi(s, h)).command(() => bi(s, h)).run();
8367
+ return i.converter.numbering = Yy(C, M, h), r.listId = C, !n || !S || !l ? c().command(B({ ensureMarks: !1 })).wrapInList(h, r).command(() => yi(s, h)).command(() => bi(s, h)).run() : c().command(B({ ensureMarks: !0 })).wrapInList(h, r).command(() => yi(s, h)).command(() => bi(s, h)).run();
8368
8368
  }, Rd = (t) => Math.max(...Object.keys(t).map(Number)) + 1, Yy = (t, e, n) => {
8369
8369
  const r = n.name === "orderedList" ? Ky : Xy, o = { ...e }, i = Rd(o.abstracts), s = {
8370
8370
  ...r,
@@ -8415,9 +8415,9 @@ const qy = (t, e = {}) => ({ state: n, dispatch: r }) => {
8415
8415
  const S = a.before(a.depth - (b - 1));
8416
8416
  n.replace(S, a.after(-w), new W(g, 4 - b, 0));
8417
8417
  let k = -1;
8418
- n.doc.nodesBetween(S, n.doc.content.size, (M, F) => {
8418
+ n.doc.nodesBetween(S, n.doc.content.size, (M, B) => {
8419
8419
  if (k > -1) return !1;
8420
- M.isTextblock && M.content.size === 0 && (k = F + 1);
8420
+ M.isTextblock && M.content.size === 0 && (k = B + 1);
8421
8421
  }), k > -1 && n.setSelection(j.near(n.doc.resolve(k))), n.scrollIntoView();
8422
8422
  }
8423
8423
  return !0;
@@ -8538,8 +8538,8 @@ const qy = (t, e = {}) => ({ state: n, dispatch: r }) => {
8538
8538
  }), ib = Z.create({
8539
8539
  name: "editable",
8540
8540
  addPmPlugins() {
8541
- return [new Y({
8542
- key: new J("editable"),
8541
+ return [new X({
8542
+ key: new K("editable"),
8543
8543
  props: {
8544
8544
  editable: () => this.editor.options.editable
8545
8545
  }
@@ -8549,8 +8549,8 @@ const qy = (t, e = {}) => ({ state: n, dispatch: r }) => {
8549
8549
  name: "editorFocus",
8550
8550
  addPmPlugins() {
8551
8551
  const t = this.editor;
8552
- return [new Y({
8553
- key: new J("editorFocus"),
8552
+ return [new X({
8553
+ key: new K("editorFocus"),
8554
8554
  props: {
8555
8555
  handleDOMEvents: {
8556
8556
  focus: (n, r) => {
@@ -8578,9 +8578,9 @@ function Ld(t, e, n, { check: r = !1 } = {}) {
8578
8578
  }
8579
8579
  function Fd(t, e, n = {}) {
8580
8580
  if (!e)
8581
- return Ro(t, null, n) || Io(t, null, n);
8582
- const r = Lr(e, t.schema);
8583
- return r === "node" ? Ro(t, e, n) : r === "mark" ? Io(t, e, n) : !1;
8581
+ return Lo(t, null, n) || Ro(t, null, n);
8582
+ const r = Fr(e, t.schema);
8583
+ return r === "node" ? Lo(t, e, n) : r === "mark" ? Ro(t, e, n) : !1;
8584
8584
  }
8585
8585
  const js = ({
8586
8586
  tr: t,
@@ -8614,7 +8614,7 @@ const js = ({
8614
8614
  markName: Ve,
8615
8615
  attrs: { authorEmail: r.email }
8616
8616
  }), s;
8617
- i ? s = i.mark.attrs.id : s = $o();
8617
+ i ? s = i.mark.attrs.id : s = Pr();
8618
8618
  const a = t.doc.type.schema.marks[Ve].create({
8619
8619
  id: s,
8620
8620
  author: r.name,
@@ -8635,7 +8635,7 @@ const js = ({
8635
8635
  markName: de,
8636
8636
  attrs: { authorEmail: r.email }
8637
8637
  }), s;
8638
- i ? s = i.mark.attrs.id : s = $o();
8638
+ i ? s = i.mark.attrs.id : s = Pr();
8639
8639
  const a = t.doc.type.schema.marks[de].create({
8640
8640
  id: s,
8641
8641
  author: r.name,
@@ -8737,7 +8737,7 @@ function Ws(t, e) {
8737
8737
  }), n;
8738
8738
  }
8739
8739
  function $d(t, e, n) {
8740
- const o = t.state.doc.content.size, i = xo(e, 0, o), s = xo(n, 0, o), a = t.coordsAtPos(i), l = t.coordsAtPos(s, -1), c = Math.min(a.top, l.top), d = Math.max(a.bottom, l.bottom), u = Math.min(a.left, l.left), f = Math.max(a.right, l.right), p = f - u, h = d - c, b = {
8740
+ const o = t.state.doc.content.size, i = So(e, 0, o), s = So(n, 0, o), a = t.coordsAtPos(i), l = t.coordsAtPos(s, -1), c = Math.min(a.top, l.top), d = Math.max(a.bottom, l.bottom), u = Math.min(a.left, l.left), f = Math.max(a.right, l.right), p = f - u, h = d - c, b = {
8741
8741
  top: c,
8742
8742
  bottom: d,
8743
8743
  left: u,
@@ -8767,7 +8767,7 @@ const _d = (t) => {
8767
8767
  findChildren: Ws,
8768
8768
  findMark: Ho,
8769
8769
  findParentNode: je,
8770
- findParentNodeClosestToPos: Fr,
8770
+ findParentNodeClosestToPos: Br,
8771
8771
  generateDocxListAttributes: ab,
8772
8772
  generateDocxRandomId: xn,
8773
8773
  generateRandom32BitHex: Wf,
@@ -8779,12 +8779,12 @@ const _d = (t) => {
8779
8779
  getMarksFromSelection: Vo,
8780
8780
  getNodeType: le,
8781
8781
  getSchemaTypeByName: Zn,
8782
- getSchemaTypeNameByName: Lr,
8782
+ getSchemaTypeNameByName: Fr,
8783
8783
  isActive: Fd,
8784
8784
  isInTable: _d,
8785
8785
  isList: Zi,
8786
- isMarkActive: Io,
8787
- isNodeActive: Ro,
8786
+ isMarkActive: Ro,
8787
+ isNodeActive: Lo,
8788
8788
  isTextSelection: Pd,
8789
8789
  posToDOMRect: $d
8790
8790
  }, Symbol.toStringTag, { value: "Module" })), cb = (t, e, n) => {
@@ -8835,7 +8835,7 @@ const _d = (t) => {
8835
8835
  });
8836
8836
  });
8837
8837
  }), e ? n.filter(({ mark: o }) => o.attrs.id === e) : n) : n;
8838
- }, ce = new J("TrackChangesBase"), ub = (t = {}) => new Y({
8838
+ }, ce = new K("TrackChangesBase"), ub = (t = {}) => new X({
8839
8839
  key: ce,
8840
8840
  state: {
8841
8841
  init(e, n) {
@@ -8895,39 +8895,39 @@ const _d = (t) => {
8895
8895
  return o.length ? (o.forEach(({ mark: i, from: s, to: a }) => {
8896
8896
  if (i.type.name === Ve)
8897
8897
  if (e) {
8898
- const l = z.inline(s, a, {
8898
+ const l = F.inline(s, a, {
8899
8899
  class: "track-insert-dec hidden"
8900
8900
  });
8901
8901
  r.push(l);
8902
8902
  } else if (n) {
8903
- const l = z.inline(s, a, {
8903
+ const l = F.inline(s, a, {
8904
8904
  class: "track-insert-dec normal"
8905
8905
  });
8906
8906
  r.push(l);
8907
8907
  } else {
8908
- const l = z.inline(s, a, {
8908
+ const l = F.inline(s, a, {
8909
8909
  class: "track-insert-dec highlighted"
8910
8910
  });
8911
8911
  r.push(l);
8912
8912
  }
8913
8913
  if (i.type.name === de)
8914
8914
  if (e) {
8915
- const l = z.inline(s, a, {
8915
+ const l = F.inline(s, a, {
8916
8916
  class: "track-delete-dec normal"
8917
8917
  });
8918
8918
  r.push(l);
8919
8919
  } else if (n) {
8920
- const l = z.inline(s, a, {
8920
+ const l = F.inline(s, a, {
8921
8921
  class: "track-delete-dec hidden"
8922
8922
  });
8923
8923
  r.push(l);
8924
8924
  } else {
8925
- const l = z.inline(s, a, {
8925
+ const l = F.inline(s, a, {
8926
8926
  class: "track-delete-dec highlighted"
8927
8927
  // 'hidden'
8928
8928
  });
8929
8929
  r.push(l);
8930
- const c = z.widget(
8930
+ const c = F.widget(
8931
8931
  s,
8932
8932
  () => {
8933
8933
  const d = document.createElement("span");
@@ -8939,17 +8939,17 @@ const _d = (t) => {
8939
8939
  }
8940
8940
  if (i.type.name === Se)
8941
8941
  if (e) {
8942
- const l = z.inline(s, a, {
8942
+ const l = F.inline(s, a, {
8943
8943
  class: "track-format-dec before"
8944
8944
  });
8945
8945
  r.push(l);
8946
8946
  } else if (n) {
8947
- const l = z.inline(s, a, {
8947
+ const l = F.inline(s, a, {
8948
8948
  class: "track-format-dec normal"
8949
8949
  });
8950
8950
  r.push(l);
8951
8951
  } else {
8952
- const l = z.inline(s, a, {
8952
+ const l = F.inline(s, a, {
8953
8953
  class: "track-format-dec highlighted"
8954
8954
  });
8955
8955
  r.push(l);
@@ -9064,7 +9064,7 @@ const _d = (t) => {
9064
9064
  if (!r.options.isInternal && n) return "transparent";
9065
9065
  const o = ge.getState(r.state), i = n ? o.internalColor : o.externalColor, s = t == e ? "44" : "22";
9066
9066
  return `${i}${s}`;
9067
- }, _t = new J("paginationPlugin"), yb = async (t) => {
9067
+ }, _t = new K("paginationPlugin"), yb = async (t) => {
9068
9068
  if (!t.converter) return;
9069
9069
  const e = { headers: {}, footers: {} }, n = t.converter.headerIds.ids, r = t.converter.footerIds.ids;
9070
9070
  for (let o in n) {
@@ -9130,7 +9130,7 @@ const _d = (t) => {
9130
9130
  }), n({ height: d, sectionEditor: c, sectionContainer: r });
9131
9131
  });
9132
9132
  });
9133
- }) : {}, Ks = [Ve, de, Se], ge = new J("comments"), bb = Z.create({
9133
+ }) : {}, Ks = [Ve, de, Se], ge = new K("comments"), bb = Z.create({
9134
9134
  name: "comments",
9135
9135
  addCommands() {
9136
9136
  return {
@@ -9179,7 +9179,7 @@ const _d = (t) => {
9179
9179
  addPmPlugins() {
9180
9180
  const t = this.editor;
9181
9181
  let e, n;
9182
- return t.options.isHeadless ? [] : [new Y({
9182
+ return t.options.isHeadless ? [] : [new X({
9183
9183
  key: ge,
9184
9184
  state: {
9185
9185
  init() {
@@ -9218,7 +9218,7 @@ const _d = (t) => {
9218
9218
  if (h && (g = d.activeThreadId), n !== g) {
9219
9219
  n = g;
9220
9220
  const w = {
9221
- type: co.SELECTED,
9221
+ type: uo.SELECTED,
9222
9222
  activeCommentId: n || null
9223
9223
  };
9224
9224
  e = !0, t.emit("commentsUpdate", w);
@@ -9248,7 +9248,7 @@ const _d = (t) => {
9248
9248
  );
9249
9249
  let S = !1;
9250
9250
  y.forEach((M) => {
9251
- const { attrs: F } = M, C = F.commentId || F.importedId, V = s.coordsAtPos(w);
9251
+ const { attrs: B } = M, C = B.commentId || B.importedId, V = s.coordsAtPos(w);
9252
9252
  cl({
9253
9253
  allCommentPositions: f,
9254
9254
  threadId: C,
@@ -9256,11 +9256,11 @@ const _d = (t) => {
9256
9256
  currentBounds: V,
9257
9257
  node: b
9258
9258
  });
9259
- const $ = F.internal;
9259
+ const $ = B.internal;
9260
9260
  S || (S = n === C);
9261
- let B = gb({ activeThreadId: n, threadId: C, isInternal: $, editor: t });
9262
- const H = z.inline(w, w + b.nodeSize, {
9263
- style: `background-color: ${B};`,
9261
+ let z = gb({ activeThreadId: n, threadId: C, isInternal: $, editor: t });
9262
+ const H = F.inline(w, w + b.nodeSize, {
9263
+ style: `background-color: ${z};`,
9264
9264
  "data-thread-id": C,
9265
9265
  class: "sd-editor-comment-highlight"
9266
9266
  });
@@ -9272,10 +9272,10 @@ const _d = (t) => {
9272
9272
  to: w + b.nodeSize
9273
9273
  });
9274
9274
  if (k) {
9275
- const M = s.coordsAtPos(w), { id: F } = k.mark.attrs;
9275
+ const M = s.coordsAtPos(w), { id: B } = k.mark.attrs;
9276
9276
  cl({
9277
9277
  allCommentPositions: f,
9278
- threadId: F,
9278
+ threadId: B,
9279
9279
  pos: w,
9280
9280
  currentBounds: M,
9281
9281
  node: b
@@ -9448,7 +9448,7 @@ const _d = (t) => {
9448
9448
  if (!b && !w)
9449
9449
  return;
9450
9450
  const x = {
9451
- event: co.ADD,
9451
+ event: uo.ADD,
9452
9452
  type: "trackedChange",
9453
9453
  documentId: i,
9454
9454
  changeId: p,
@@ -9459,7 +9459,7 @@ const _d = (t) => {
9459
9459
  authorEmail: u,
9460
9460
  date: f
9461
9461
  };
9462
- return t === "add" ? x.event = co.ADD : t === "update" && (x.event = co.UPDATE), x;
9462
+ return t === "add" ? x.event = uo.ADD : t === "update" && (x.event = uo.UPDATE), x;
9463
9463
  };
9464
9464
  function Sb(t, e) {
9465
9465
  let n = null;
@@ -9512,7 +9512,7 @@ const Ud = ({ state: t, tr: e, step: n, newTr: r, map: o, doc: i, user: s, date:
9512
9512
  return;
9513
9513
  if (c.marks.find((h) => h.type.name === de))
9514
9514
  return !1;
9515
- const u = c.marks.find((h) => [de, Se].includes(h.type.name)), f = u ? u.attrs.id : $o();
9515
+ const u = c.marks.find((h) => [de, Se].includes(h.type.name)), f = u ? u.attrs.id : Pr();
9516
9516
  if (r.addMark(Math.max(n.from, d), Math.min(n.to, d + c.nodeSize), n.mark), ["bold", "italic", "strike", "underline", "textStyle"].includes(n.mark.type.name) && !c.marks.find((h) => h.type === n.mark.type)) {
9517
9517
  const h = c.marks.find((b) => b.type.name === Se);
9518
9518
  let m = [], g = [];
@@ -9572,7 +9572,7 @@ const Ud = ({ state: t, tr: e, step: n, newTr: r, map: o, doc: i, user: s, date:
9572
9572
  }
9573
9573
  ]), p.length || h.length) {
9574
9574
  const m = t.schema.marks[Se].create({
9575
- id: $o(),
9575
+ id: Pr(),
9576
9576
  author: s.name,
9577
9577
  authorEmail: s.email,
9578
9578
  date: a,
@@ -9665,7 +9665,7 @@ const Ud = ({ state: t, tr: e, step: n, newTr: r, map: o, doc: i, user: s, date:
9665
9665
  }, dl = (t) => {
9666
9666
  if (t === "initial" || t === "0.4.14") return Object.values(Ob);
9667
9667
  };
9668
- var nn, Cs, A, Jd, Yd, es, ts, Gd, ho, ns, rs, is, ss, as, Zd, ls, cs, mo, ds, Qd, Qn, er, eu, tu, nu, ru;
9668
+ var nn, Cs, A, Jd, Yd, es, ts, Gd, mo, ns, rs, is, ss, as, Zd, ls, cs, go, ds, Qd, Qn, er, eu, tu, nu, ru;
9669
9669
  const ia = class ia extends Eg {
9670
9670
  constructor(n) {
9671
9671
  super();
@@ -9822,9 +9822,9 @@ const ia = class ia extends Eg {
9822
9822
  initializeCollaborationData() {
9823
9823
  if (!this.options.isNewFile || !this.options.collaborationProvider) return;
9824
9824
  const { collaborationProvider: n } = this.options, r = () => {
9825
- n.off("synced", r), N(this, A, ho).call(this);
9825
+ n.off("synced", r), N(this, A, mo).call(this);
9826
9826
  };
9827
- n.synced ? N(this, A, ho).call(this) : n.on("synced", r);
9827
+ n.synced ? N(this, A, mo).call(this) : n.on("synced", r);
9828
9828
  }
9829
9829
  /**
9830
9830
  * Set editor options and update state.
@@ -10042,7 +10042,7 @@ const ia = class ia extends Eg {
10042
10042
  * @returns {Y.Doc | undefined} Updated Y.Doc if any, otherwise undefined
10043
10043
  */
10044
10044
  processCollaborationMigrations() {
10045
- if (console.debug("[checkVersionMigrations] Current editor version", "0.11.19"), !this.options.ydoc) return;
10045
+ if (console.debug("[checkVersionMigrations] Current editor version", "0.11.21"), !this.options.ydoc) return;
10046
10046
  let r = this.options.ydoc.getMap("meta").get("version");
10047
10047
  r || (r = "initial"), console.debug("[checkVersionMigrations] Document version", r);
10048
10048
  const o = dl(r) || [], s = this.state.plugins.find((c) => c.key.startsWith("y-sync"));
@@ -10065,7 +10065,7 @@ const ia = class ia extends Eg {
10065
10065
  isNewFile: !0,
10066
10066
  shouldLoadComments: !0,
10067
10067
  replacedFile: !0
10068
- }), N(this, A, ss).call(this), N(this, A, as).call(this), this.initDefaultStyles(), this.options.ydoc && this.options.collaborationProvider ? this.initializeCollaborationData(!0) : N(this, A, ho).call(this), this.options.ydoc || (N(this, A, er).call(this), N(this, A, Qn).call(this));
10068
+ }), N(this, A, ss).call(this), N(this, A, as).call(this), this.initDefaultStyles(), this.options.ydoc && this.options.collaborationProvider ? this.initializeCollaborationData(!0) : N(this, A, mo).call(this), this.options.ydoc || (N(this, A, er).call(this), N(this, A, Qn).call(this));
10069
10069
  }
10070
10070
  getNodesOfType(n) {
10071
10071
  const { findChildren: r } = Us;
@@ -10074,7 +10074,7 @@ const ia = class ia extends Eg {
10074
10074
  replaceNodeWithHTML(n, r) {
10075
10075
  const { tr: o } = this.state, { dispatch: i } = this.view;
10076
10076
  if (!n || !r) return;
10077
- const s = n.pos, a = s + n.node.nodeSize, l = N(this, A, mo).call(this, r);
10077
+ const s = n.pos, a = s + n.node.nodeSize, l = N(this, A, go).call(this, r);
10078
10078
  o.replaceWith(s, a, l), i(o);
10079
10079
  }
10080
10080
  };
@@ -10100,7 +10100,7 @@ nn = new WeakMap(), Cs = new WeakMap(), A = new WeakSet(), Jd = function(n) {
10100
10100
  * Replace the current document with new data. Necessary for initializing a new collaboration file,
10101
10101
  * since we need to insert the data only after the provider has synced.
10102
10102
  */
10103
- ho = function() {
10103
+ mo = function() {
10104
10104
  if (!this.options.isNewFile) return;
10105
10105
  this.options.isNewFile = !1;
10106
10106
  const n = N(this, A, cs).call(this), r = this.state.tr.replaceWith(0, this.state.doc.content.size, n);
@@ -10165,7 +10165,7 @@ cs = function() {
10165
10165
  let n;
10166
10166
  try {
10167
10167
  const { mode: r, fragment: o, isHeadless: i, content: s, loadFromSchema: a } = this.options;
10168
- r === "docx" ? (n = Ld(this.converter, this.schema, this), n = N(this, A, tu).call(this, n), this.options.html && (n = N(this, A, mo).call(this, this.options.html)), o && (n = wg(o, this.schema))) : (r === "text" || r === "html") && (a ? n = this.schema.nodeFromJSON(s) : s ? n = N(this, A, mo).call(this, s) : n = this.schema.topNodeType.createAndFill());
10168
+ r === "docx" ? (n = Ld(this.converter, this.schema, this), n = N(this, A, tu).call(this, n), this.options.html && (n = N(this, A, go).call(this, this.options.html)), o && (n = wg(o, this.schema))) : (r === "text" || r === "html") && (a ? n = this.schema.nodeFromJSON(s) : s ? n = N(this, A, go).call(this, s) : n = this.schema.topNodeType.createAndFill());
10169
10169
  } catch (r) {
10170
10170
  console.error(r), this.emit("contentError", { editor: this, error: r });
10171
10171
  }
@@ -10175,7 +10175,7 @@ cs = function() {
10175
10175
  * @param {string} content HTML content.
10176
10176
  * @returns {ProseMirrorNode} ProseMirror document.
10177
10177
  */
10178
- mo = function(n) {
10178
+ go = function(n) {
10179
10179
  let r = n;
10180
10180
  if (typeof n == "string") {
10181
10181
  const o = document.createElement("div");
@@ -10191,7 +10191,7 @@ ds = function() {
10191
10191
  this.options.ydoc || (r.doc = n), this.view = new nd(this.options.element, {
10192
10192
  ...this.options.editorProps,
10193
10193
  dispatchTransaction: N(this, A, eu).bind(this),
10194
- state: uo.create(r)
10194
+ state: fo.create(r)
10195
10195
  });
10196
10196
  const o = this.state.reconfigure({
10197
10197
  plugins: [...this.extensionService.plugins]
@@ -10269,7 +10269,7 @@ eu = function(n) {
10269
10269
  * @returns {import('prosemirror-model').Node} The updated prosemirror document
10270
10270
  */
10271
10271
  tu = function(n) {
10272
- const r = uo.create({
10272
+ const r = fo.create({
10273
10273
  schema: this.schema,
10274
10274
  doc: n
10275
10275
  }), { tr: o, doc: i } = r;
@@ -10281,7 +10281,7 @@ tu = function(n) {
10281
10281
  * @returns {Record<string, any>} The updated document JSON
10282
10282
  */
10283
10283
  nu = function(n = []) {
10284
- const r = uo.create({
10284
+ const r = fo.create({
10285
10285
  schema: this.schema,
10286
10286
  doc: this.state.doc,
10287
10287
  plugins: this.state.plugins
@@ -10298,7 +10298,7 @@ ru = function() {
10298
10298
  }
10299
10299
  };
10300
10300
  let Qi = ia;
10301
- class K {
10301
+ class J {
10302
10302
  constructor(e) {
10303
10303
  R(this, "type", "node");
10304
10304
  R(this, "name", "node");
@@ -10310,11 +10310,11 @@ class K {
10310
10310
  this.config = {
10311
10311
  ...this.config,
10312
10312
  ...e
10313
- }, this.name = this.config.name, this.config.addOptions && (this.options = X(
10313
+ }, this.name = this.config.name, this.config.addOptions && (this.options = Y(
10314
10314
  I(this, "addOptions", {
10315
10315
  name: this.name
10316
10316
  })
10317
- )), this.storage = X(
10317
+ )), this.storage = Y(
10318
10318
  I(this, "addStorage", {
10319
10319
  name: this.name,
10320
10320
  options: this.options
@@ -10326,7 +10326,7 @@ class K {
10326
10326
  * @param args Arguments for the constructor.
10327
10327
  */
10328
10328
  static create(...e) {
10329
- return new K(...e);
10329
+ return new J(...e);
10330
10330
  }
10331
10331
  }
10332
10332
  class Oe {
@@ -10342,11 +10342,11 @@ class Oe {
10342
10342
  this.config = {
10343
10343
  ...this.config,
10344
10344
  ...e
10345
- }, this.name = this.config.name, this.isExternal = !!this.config.isExternal, this.config.addOptions && (this.options = X(
10345
+ }, this.name = this.config.name, this.isExternal = !!this.config.isExternal, this.config.addOptions && (this.options = Y(
10346
10346
  I(this, "addOptions", {
10347
10347
  name: this.name
10348
10348
  })
10349
- )), this.storage = X(
10349
+ )), this.storage = Y(
10350
10350
  I(this, "addStorage", {
10351
10351
  name: this.name,
10352
10352
  options: this.options
@@ -10453,7 +10453,7 @@ const ou = Z.create({
10453
10453
  if (Number.isNaN(n))
10454
10454
  return !1;
10455
10455
  let { min: o, max: i, unit: s } = this.options.defaults;
10456
- return n = xo(n, o, i), r = r || s, e().setMark("textStyle", { fontSize: `${n}${r}` }).run();
10456
+ return n = So(n, o, i), r = r || s, e().setMark("textStyle", { fontSize: `${n}${r}` }).run();
10457
10457
  },
10458
10458
  unsetFontSize: () => ({ chain: t }) => t().setMark("textStyle", { fontSize: null }).removeEmptyTextStyle().run()
10459
10459
  };
@@ -10642,7 +10642,7 @@ const ou = Z.create({
10642
10642
  }
10643
10643
  });
10644
10644
  function Tb(t = {}) {
10645
- return new Y({
10645
+ return new X({
10646
10646
  view(e) {
10647
10647
  return new Db(e, t);
10648
10648
  }
@@ -10868,7 +10868,7 @@ function Nb(t) {
10868
10868
  return !0;
10869
10869
  }
10870
10870
  function Pb() {
10871
- return new Y({
10871
+ return new X({
10872
10872
  props: {
10873
10873
  decorations: Fb,
10874
10874
  createSelectionBetween(t, e, n) {
@@ -10881,12 +10881,12 @@ function Pb() {
10881
10881
  });
10882
10882
  }
10883
10883
  const Ib = Bs({
10884
- ArrowLeft: Qr("horiz", -1),
10885
- ArrowRight: Qr("horiz", 1),
10886
- ArrowUp: Qr("vert", -1),
10887
- ArrowDown: Qr("vert", 1)
10884
+ ArrowLeft: eo("horiz", -1),
10885
+ ArrowRight: eo("horiz", 1),
10886
+ ArrowUp: eo("vert", -1),
10887
+ ArrowDown: eo("vert", 1)
10888
10888
  });
10889
- function Qr(t, e) {
10889
+ function eo(t, e) {
10890
10890
  const n = t == "vert" ? e > 0 ? "down" : "up" : e > 0 ? "right" : "left";
10891
10891
  return function(r, o, i) {
10892
10892
  let s = r.selection, a = e > 0 ? s.$to : s.$from, l = s.empty;
@@ -10924,7 +10924,7 @@ function Fb(t) {
10924
10924
  if (!(t.selection instanceof ne))
10925
10925
  return null;
10926
10926
  let e = document.createElement("div");
10927
- return e.className = "ProseMirror-gapcursor", P.create(t.doc, [z.widget(t.selection.head, e, { key: "gapcursor" })]);
10927
+ return e.className = "ProseMirror-gapcursor", P.create(t.doc, [F.widget(t.selection.head, e, { key: "gapcursor" })]);
10928
10928
  }
10929
10929
  const Bb = Z.create({
10930
10930
  name: "gapCursor",
@@ -10935,14 +10935,14 @@ const Bb = Z.create({
10935
10935
  },
10936
10936
  extendNodeSchema(t) {
10937
10937
  return {
10938
- allowGapCursor: X(I(t, "allowGapCursor", {
10938
+ allowGapCursor: Y(I(t, "allowGapCursor", {
10939
10939
  name: t.name,
10940
10940
  options: t.options,
10941
10941
  storage: t.storage
10942
10942
  })) ?? null
10943
10943
  };
10944
10944
  }
10945
- }), zb = new J("collaboration"), $b = Z.create({
10945
+ }), zb = new K("collaboration"), $b = Z.create({
10946
10946
  name: "collaboration",
10947
10947
  priority: 1e3,
10948
10948
  addOptions() {
@@ -11041,7 +11041,7 @@ const Bb = Z.create({
11041
11041
  e.classList.add("ProseMirror-yjs-cursor"), e.setAttribute("style", `border-color: ${t.color}`);
11042
11042
  const n = document.createElement("div");
11043
11043
  return n.setAttribute("style", `background-color: ${t.color}`), n.insertBefore(document.createTextNode(t.name || t.email), null), e.insertBefore(n, null), e;
11044
- }, Tn = "aiMark", eo = "aiAnimationMark", qb = Oe.create({
11044
+ }, Tn = "aiMark", to = "aiAnimationMark", qb = Oe.create({
11045
11045
  name: Tn,
11046
11046
  group: "ai",
11047
11047
  inclusive: !1,
@@ -11065,11 +11065,11 @@ const Bb = Z.create({
11065
11065
  return [Tn, E.mergeAttributes(this.options.htmlAttributes, t)];
11066
11066
  }
11067
11067
  }), Kb = Oe.create({
11068
- name: eo,
11068
+ name: to,
11069
11069
  group: "ai",
11070
11070
  inclusive: !1,
11071
11071
  spanning: !1,
11072
- excludes: eo,
11072
+ excludes: to,
11073
11073
  addOptions() {
11074
11074
  return {
11075
11075
  htmlAttributes: {}
@@ -11092,12 +11092,12 @@ const Bb = Z.create({
11092
11092
  };
11093
11093
  },
11094
11094
  parseDOM() {
11095
- return [{ tag: eo }];
11095
+ return [{ tag: to }];
11096
11096
  },
11097
11097
  renderDOM({ htmlAttributes: t }) {
11098
- return [eo, E.mergeAttributes(this.options.htmlAttributes, t)];
11098
+ return [to, E.mergeAttributes(this.options.htmlAttributes, t)];
11099
11099
  }
11100
- }), Xb = new J("ai"), fu = Z.create({
11100
+ }), Xb = new K("ai"), fu = Z.create({
11101
11101
  name: "ai",
11102
11102
  addCommands() {
11103
11103
  return {
@@ -11129,7 +11129,7 @@ const Bb = Z.create({
11129
11129
  },
11130
11130
  addPmPlugins() {
11131
11131
  const t = this.editor;
11132
- return [new Y({
11132
+ return [new X({
11133
11133
  key: Xb,
11134
11134
  state: {
11135
11135
  init() {
@@ -11160,7 +11160,7 @@ const Bb = Z.create({
11160
11160
  return e.descendants((o, i) => {
11161
11161
  const { marks: s = [] } = o;
11162
11162
  if (s.find((l) => l.type.name === Tn)) {
11163
- const l = z.inline(
11163
+ const l = F.inline(
11164
11164
  i,
11165
11165
  i + o.nodeSize,
11166
11166
  {
@@ -11171,7 +11171,7 @@ const Bb = Z.create({
11171
11171
  r.push(l);
11172
11172
  }
11173
11173
  }), { decorations: r };
11174
- }, pu = K.create({
11174
+ }, pu = J.create({
11175
11175
  name: "doc",
11176
11176
  topNode: !0,
11177
11177
  content: "block+",
@@ -11188,11 +11188,11 @@ const Bb = Z.create({
11188
11188
  }
11189
11189
  };
11190
11190
  }
11191
- }), hu = K.create({
11191
+ }), hu = J.create({
11192
11192
  name: "text",
11193
11193
  group: "inline",
11194
11194
  inline: !0
11195
- }), Yb = K.create({
11195
+ }), Yb = J.create({
11196
11196
  name: "run",
11197
11197
  group: "inline",
11198
11198
  content: "text*",
@@ -11211,7 +11211,7 @@ const Bb = Z.create({
11211
11211
  };
11212
11212
  }
11213
11213
  });
11214
- function Lo(t) {
11214
+ function Fo(t) {
11215
11215
  return new Vg({
11216
11216
  match: t.match,
11217
11217
  handler: ({
@@ -11220,7 +11220,7 @@ function Lo(t) {
11220
11220
  match: r,
11221
11221
  chain: o
11222
11222
  }) => {
11223
- const i = X(t.getAttributes, null, r) || {}, s = e.tr.delete(n.from, n.to), l = s.doc.resolve(n.from).blockRange(), c = l && gc(l, t.type, i);
11223
+ const i = Y(t.getAttributes, null, r) || {}, s = e.tr.delete(n.from, n.to), l = s.doc.resolve(n.from).blockRange(), c = l && gc(l, t.type, i);
11224
11224
  if (!c)
11225
11225
  return null;
11226
11226
  if (s.wrap(l, c), t.keepMarks && t.editor) {
@@ -11239,7 +11239,7 @@ function Lo(t) {
11239
11239
  }
11240
11240
  });
11241
11241
  }
11242
- const ul = /^\s*([-+*])\s$/, mu = K.create({
11242
+ const ul = /^\s*([-+*])\s$/, mu = J.create({
11243
11243
  name: "bulletList",
11244
11244
  group: "block list",
11245
11245
  content() {
@@ -11289,11 +11289,11 @@ const ul = /^\s*([-+*])\s$/, mu = K.create({
11289
11289
  },
11290
11290
  // Input rules.
11291
11291
  addInputRules() {
11292
- let t = Lo({
11292
+ let t = Fo({
11293
11293
  match: ul,
11294
11294
  type: this.type
11295
11295
  });
11296
- return (this.options.keepMarks || this.options.keepAttributes) && (t = Lo({
11296
+ return (this.options.keepMarks || this.options.keepAttributes) && (t = Fo({
11297
11297
  match: ul,
11298
11298
  type: this.type,
11299
11299
  keepMarks: this.options.keepMarks,
@@ -11306,8 +11306,8 @@ const ul = /^\s*([-+*])\s$/, mu = K.create({
11306
11306
  }
11307
11307
  });
11308
11308
  function Gb(t = {}) {
11309
- return new Y({
11310
- key: new J("orderedListSync"),
11309
+ return new X({
11310
+ key: new K("orderedListSync"),
11311
11311
  appendTransaction: (e, n, r) => {
11312
11312
  if (!(e.some((d) => d.docChanged) && !n.doc.eq(r.doc)))
11313
11313
  return;
@@ -11346,8 +11346,8 @@ function Zb() {
11346
11346
  return Math.floor(Math.random() * 4294967295).toString();
11347
11347
  }
11348
11348
  function Qb(t) {
11349
- return new Y({
11350
- key: new J("orderedListMarker"),
11349
+ return new X({
11350
+ key: new K("orderedListMarker"),
11351
11351
  appendTransaction: (e, n, r) => {
11352
11352
  if (!(e.some((c) => c.docChanged) && !n.doc.eq(r.doc)))
11353
11353
  return;
@@ -11379,10 +11379,10 @@ function Qb(t) {
11379
11379
  }), l = !0, w = g), f.forEach((y, S) => {
11380
11380
  if (S === 0)
11381
11381
  return;
11382
- let { node: k, pos: M } = y, { lvlText: F, listLevel: C, listNumberingType: V } = k.attrs;
11382
+ let { node: k, pos: M } = y, { lvlText: B, listLevel: C, listNumberingType: V } = k.attrs;
11383
11383
  Array.isArray(w.listLevel) || (w.listLevel = JSON.parse(w.listLevel));
11384
11384
  let $ = [...w.listLevel.slice(0, -1), w.listLevel.at(-1) + 1];
11385
- if (!(F === w.lvlText && V === w.listNumberingType && fl(C, $))) {
11385
+ if (!(B === w.lvlText && V === w.listNumberingType && fl(C, $))) {
11386
11386
  let { selection: H, storedMarks: ie } = r, ae = ie || H.$to.parentOffset && H.$from.marks();
11387
11387
  s.setNodeMarkup(M, void 0, {
11388
11388
  ...k.attrs,
@@ -11454,7 +11454,7 @@ function r0({ state: t, listItems: e }) {
11454
11454
  listNumberingType: s
11455
11455
  };
11456
11456
  }
11457
- const pl = /^(\d+)\.\s$/, yu = K.create({
11457
+ const pl = /^(\d+)\.\s$/, yu = J.create({
11458
11458
  name: "orderedList",
11459
11459
  group: "block list",
11460
11460
  content() {
@@ -11596,13 +11596,13 @@ const pl = /^(\d+)\.\s$/, yu = K.create({
11596
11596
  return [Qb(this.editor), Gb()];
11597
11597
  },
11598
11598
  addInputRules() {
11599
- let t = Lo({
11599
+ let t = Fo({
11600
11600
  match: pl,
11601
11601
  type: this.type,
11602
11602
  getAttributes: (e) => ({ start: +e[1] }),
11603
11603
  joinPredicate: (e, n) => n.childCount + n.attrs.start === +e[1]
11604
11604
  });
11605
- return (this.options.keepMarks || this.options.keepAttributes) && (t = Lo({
11605
+ return (this.options.keepMarks || this.options.keepAttributes) && (t = Fo({
11606
11606
  match: pl,
11607
11607
  type: this.type,
11608
11608
  keepMarks: this.options.keepMarks,
@@ -11657,8 +11657,8 @@ const pl = /^(\d+)\.\s$/, yu = K.create({
11657
11657
  return e;
11658
11658
  };
11659
11659
  function f0(t = {}) {
11660
- return new Y({
11661
- key: new J("styledListMarker"),
11660
+ return new X({
11661
+ key: new K("styledListMarker"),
11662
11662
  state: {
11663
11663
  init(e, n) {
11664
11664
  const r = [
@@ -11709,7 +11709,7 @@ function hl(t, e = []) {
11709
11709
  style: `--marker-font-size: ${u ?? "initial"}`
11710
11710
  }, h = {
11711
11711
  style: `--marker-font-family: ${f ?? "initial"}`
11712
- }, m = E.mergeAttributes(p, h), g = z.node(a, a + s.nodeSize, m);
11712
+ }, m = E.mergeAttributes(p, h), g = F.node(a, a + s.nodeSize, m);
11713
11713
  o.push(g);
11714
11714
  }), o;
11715
11715
  }
@@ -11727,7 +11727,7 @@ function ml(t) {
11727
11727
  `.trim()
11728
11728
  };
11729
11729
  }
11730
- let a = z.node(i, i + o.nodeSize, s);
11730
+ let a = F.node(i, i + o.nodeSize, s);
11731
11731
  n.push(a);
11732
11732
  }), n;
11733
11733
  }
@@ -11746,7 +11746,7 @@ function p0(t, e, n) {
11746
11746
  function h0(t) {
11747
11747
  return t.childCount === 1 && t.firstChild?.type.name === "paragraph" && t.firstChild?.content.size === 0;
11748
11748
  }
11749
- const vu = K.create({
11749
+ const vu = J.create({
11750
11750
  name: "listItem",
11751
11751
  content: "paragraph* block*",
11752
11752
  defining: !0,
@@ -11868,7 +11868,7 @@ const vu = K.create({
11868
11868
  addPmPlugins() {
11869
11869
  return [f0()];
11870
11870
  }
11871
- }), go = new J("linkedStyles"), m0 = Z.create({
11871
+ }), yo = new K("linkedStyles"), m0 = Z.create({
11872
11872
  name: "linkedStyles",
11873
11873
  addPmPlugins() {
11874
11874
  return [g0(this.editor)];
@@ -11891,8 +11891,8 @@ const vu = K.create({
11891
11891
  }
11892
11892
  };
11893
11893
  }
11894
- }), g0 = (t) => new Y({
11895
- key: go,
11894
+ }), g0 = (t) => new X({
11895
+ key: yo,
11896
11896
  state: {
11897
11897
  init(e, { doc: n, selection: r }) {
11898
11898
  if (!t.converter || t.options.mode !== "docx") return {};
@@ -11906,7 +11906,7 @@ const vu = K.create({
11906
11906
  if (!t.converter || t.options.mode !== "docx") return { ...n };
11907
11907
  let i = n.decorations || P.empty;
11908
11908
  if (e.docChanged) {
11909
- const s = go.getState(t.state).styles;
11909
+ const s = yo.getState(t.state).styles;
11910
11910
  i = gl(o, s);
11911
11911
  }
11912
11912
  return { ...n, decorations: i };
@@ -11914,7 +11914,7 @@ const vu = K.create({
11914
11914
  },
11915
11915
  props: {
11916
11916
  decorations(e) {
11917
- return go.getState(e)?.decorations;
11917
+ return yo.getState(e)?.decorations;
11918
11918
  }
11919
11919
  }
11920
11920
  }), gl = (t, e) => {
@@ -11928,7 +11928,7 @@ const vu = K.create({
11928
11928
  if (!l) return;
11929
11929
  const d = t.doc.resolve(s).parent, u = y0(l, i, d);
11930
11930
  if (!u) return;
11931
- const f = z.inline(s, s + i.nodeSize, { style: u });
11931
+ const f = F.inline(s, s + i.nodeSize, { style: u });
11932
11932
  n.push(f);
11933
11933
  }), P.create(o, n);
11934
11934
  }, y0 = (t, e, n, r = !0) => {
@@ -11993,7 +11993,7 @@ const vu = K.create({
11993
11993
  e += `${r ? `font-family: ${r};` : ""} ${o ? `font-size: ${o};` : ""}`;
11994
11994
  }
11995
11995
  return e.trim();
11996
- }, Ix = (t) => t?.converter ? (t.converter.linkedStyles || []).filter((n) => n.type === "paragraph" && n.definition.attrs).sort((n, r) => n.definition.attrs?.name.localeCompare(r.definition.attrs?.name)) : [], ku = K.create({
11996
+ }, Ix = (t) => t?.converter ? (t.converter.linkedStyles || []).filter((n) => n.type === "paragraph" && n.definition.attrs).sort((n, r) => n.definition.attrs?.name.localeCompare(r.definition.attrs?.name)) : [], ku = J.create({
11997
11997
  name: "paragraph",
11998
11998
  priority: 1e3,
11999
11999
  group: "block",
@@ -12080,9 +12080,9 @@ const vu = K.create({
12080
12080
  },
12081
12081
  addPmPlugins() {
12082
12082
  const { view: t } = this.editor;
12083
- return [new Y({
12083
+ return [new X({
12084
12084
  name: "dropcapPlugin",
12085
- key: new J("dropcapPlugin"),
12085
+ key: new K("dropcapPlugin"),
12086
12086
  state: {
12087
12087
  init(n, r) {
12088
12088
  let o = yl(r, t);
@@ -12106,7 +12106,7 @@ const vu = K.create({
12106
12106
  if (r.attrs.dropcap?.type === "margin") {
12107
12107
  const i = x0(e, o);
12108
12108
  n.push(
12109
- z.node(o, o + r.nodeSize, { style: `margin-left: -${i}px;` })
12109
+ F.node(o, o + r.nodeSize, { style: `margin-left: -${i}px;` })
12110
12110
  );
12111
12111
  }
12112
12112
  }), n;
@@ -12119,7 +12119,7 @@ function x0(t, e) {
12119
12119
  }
12120
12120
  return 0;
12121
12121
  }
12122
- const xu = K.create({
12122
+ const xu = J.create({
12123
12123
  name: "heading",
12124
12124
  group: "block",
12125
12125
  content: "inline*",
@@ -12162,7 +12162,7 @@ const xu = K.create({
12162
12162
  {}
12163
12163
  );
12164
12164
  }
12165
- }), S0 = K.create({
12165
+ }), S0 = J.create({
12166
12166
  name: "commentRangeStart",
12167
12167
  group: "inline",
12168
12168
  inline: !0,
@@ -12193,7 +12193,7 @@ const xu = K.create({
12193
12193
  }
12194
12194
  };
12195
12195
  }
12196
- }), C0 = K.create({
12196
+ }), C0 = J.create({
12197
12197
  name: "commentRangeEnd",
12198
12198
  group: "inline",
12199
12199
  inline: !0,
@@ -12220,7 +12220,7 @@ const xu = K.create({
12220
12220
  }
12221
12221
  };
12222
12222
  }
12223
- }), M0 = K.create({
12223
+ }), M0 = J.create({
12224
12224
  name: "commentReference",
12225
12225
  group: "inline",
12226
12226
  inline: !0,
@@ -12272,7 +12272,7 @@ const xu = K.create({
12272
12272
  renderDOM({ htmlAttributes: t }) {
12273
12273
  return [Le, E.mergeAttributes(this.options.htmlAttributes, t)];
12274
12274
  }
12275
- }), O0 = K.create({
12275
+ }), O0 = J.create({
12276
12276
  name: "tab",
12277
12277
  group: "inline",
12278
12278
  inline: !0,
@@ -12306,9 +12306,9 @@ const xu = K.create({
12306
12306
  },
12307
12307
  addPmPlugins() {
12308
12308
  const { view: t } = this.editor;
12309
- return [new Y({
12309
+ return [new X({
12310
12310
  name: "tabPlugin",
12311
- key: new J("tabPlugin"),
12311
+ key: new K("tabPlugin"),
12312
12312
  state: {
12313
12313
  init(n, r) {
12314
12314
  let o = bl(r, t);
@@ -12345,7 +12345,7 @@ const xu = K.create({
12345
12345
  }
12346
12346
  const l = i.nodeBefore?.type.name === "tab" ? wi : wi - a % wi, c = D0(i);
12347
12347
  n.push(
12348
- z.node(o, o + r.nodeSize, { style: `width: ${l}px; height: ${c};` })
12348
+ F.node(o, o + r.nodeSize, { style: `width: ${l}px; height: ${c};` })
12349
12349
  );
12350
12350
  }
12351
12351
  }), n;
@@ -12362,7 +12362,7 @@ function D0(t) {
12362
12362
  const i = t.node(1).firstChild.marks.find((a) => a.type.name === "textStyle");
12363
12363
  return `${(parseInt(i?.attrs.fontSize) * 1.333 || 16) * 1.1}px`;
12364
12364
  }
12365
- const E0 = K.create({
12365
+ const E0 = J.create({
12366
12366
  name: "lineBreak",
12367
12367
  group: "inline",
12368
12368
  inline: !0,
@@ -12377,7 +12377,7 @@ const E0 = K.create({
12377
12377
  renderDOM() {
12378
12378
  return ["br", {}];
12379
12379
  }
12380
- }), Su = K.create({
12380
+ }), Su = J.create({
12381
12381
  name: "hardBreak",
12382
12382
  group: "inline",
12383
12383
  inline: !0,
@@ -12636,8 +12636,8 @@ function I0(t) {
12636
12636
  });
12637
12637
  const k = w && w[S];
12638
12638
  if (k) {
12639
- const M = (y + S) % e * 2, F = s[M];
12640
- F == null || F != k && s[M + 1] == 1 ? (s[M] = k, s[M + 1] = 1) : F == k && s[M + 1]++;
12639
+ const M = (y + S) % e * 2, B = s[M];
12640
+ B == null || B != k && s[M + 1] == 1 ? (s[M] = k, s[M + 1] = 1) : B == k && s[M + 1]++;
12641
12641
  }
12642
12642
  }
12643
12643
  }
@@ -12716,7 +12716,7 @@ function ke(t) {
12716
12716
  }
12717
12717
  return e;
12718
12718
  }
12719
- var Nt = new J("selectingCells");
12719
+ var Nt = new K("selectingCells");
12720
12720
  function jn(t) {
12721
12721
  for (let e = t.depth - 1; e > 0; e--)
12722
12722
  if (t.node(e).type.spec.tableRole == "row")
@@ -12973,7 +12973,7 @@ function H0(t) {
12973
12973
  const e = [];
12974
12974
  return t.selection.forEachCell((n, r) => {
12975
12975
  e.push(
12976
- z.node(r, r + n.nodeSize, { class: "selectedCell" })
12976
+ F.node(r, r + n.nodeSize, { class: "selectedCell" })
12977
12977
  );
12978
12978
  }), P.create(t.doc, e);
12979
12979
  }
@@ -13020,7 +13020,7 @@ function U0(t, e, n) {
13020
13020
  } else r instanceof j && j0(r) ? i = j.create(o, r.from) : r instanceof j && W0(r) && (i = j.create(o, r.$from.start(), r.$from.end()));
13021
13021
  return i && (e || (e = t.tr)).setSelection(i), e;
13022
13022
  }
13023
- var q0 = new J("fix-tables");
13023
+ var q0 = new K("fix-tables");
13024
13024
  function Tu(t, e, n, r) {
13025
13025
  const o = t.childCount, i = e.childCount;
13026
13026
  e: for (let s = 0, a = 0; s < i; s++) {
@@ -13519,7 +13519,7 @@ function cw(t, e) {
13519
13519
  ), !0;
13520
13520
  return !1;
13521
13521
  }
13522
- function to(t, e) {
13522
+ function no(t, e) {
13523
13523
  const n = t.selection;
13524
13524
  if (!(n instanceof G)) return !1;
13525
13525
  if (e) {
@@ -13731,28 +13731,28 @@ function El(t, e, n, r, o) {
13731
13731
  ), e(u);
13732
13732
  }
13733
13733
  var hw = Bs({
13734
- ArrowLeft: no("horiz", -1),
13735
- ArrowRight: no("horiz", 1),
13736
- ArrowUp: no("vert", -1),
13737
- ArrowDown: no("vert", 1),
13738
- "Shift-ArrowLeft": ro("horiz", -1),
13739
- "Shift-ArrowRight": ro("horiz", 1),
13740
- "Shift-ArrowUp": ro("vert", -1),
13741
- "Shift-ArrowDown": ro("vert", 1),
13742
- Backspace: to,
13743
- "Mod-Backspace": to,
13744
- Delete: to,
13745
- "Mod-Delete": to
13734
+ ArrowLeft: ro("horiz", -1),
13735
+ ArrowRight: ro("horiz", 1),
13736
+ ArrowUp: ro("vert", -1),
13737
+ ArrowDown: ro("vert", 1),
13738
+ "Shift-ArrowLeft": oo("horiz", -1),
13739
+ "Shift-ArrowRight": oo("horiz", 1),
13740
+ "Shift-ArrowUp": oo("vert", -1),
13741
+ "Shift-ArrowDown": oo("vert", 1),
13742
+ Backspace: no,
13743
+ "Mod-Backspace": no,
13744
+ Delete: no,
13745
+ "Mod-Delete": no
13746
13746
  });
13747
- function yo(t, e, n) {
13747
+ function bo(t, e, n) {
13748
13748
  return n.eq(t.selection) ? !1 : (e && e(t.tr.setSelection(n).scrollIntoView()), !0);
13749
13749
  }
13750
- function no(t, e) {
13750
+ function ro(t, e) {
13751
13751
  return (n, r, o) => {
13752
13752
  if (!o) return !1;
13753
13753
  const i = n.selection;
13754
13754
  if (i instanceof G)
13755
- return yo(
13755
+ return bo(
13756
13756
  n,
13757
13757
  r,
13758
13758
  ee.near(i.$headCell, e)
@@ -13761,7 +13761,7 @@ function no(t, e) {
13761
13761
  const s = Pu(o, t, e);
13762
13762
  if (s == null) return !1;
13763
13763
  if (t == "horiz")
13764
- return yo(
13764
+ return bo(
13765
13765
  n,
13766
13766
  r,
13767
13767
  ee.near(n.doc.resolve(i.head + e), e)
@@ -13769,11 +13769,11 @@ function no(t, e) {
13769
13769
  {
13770
13770
  const a = n.doc.resolve(s), l = Mu(a, t, e);
13771
13771
  let c;
13772
- return l ? c = ee.near(l, 1) : e < 0 ? c = ee.near(n.doc.resolve(a.before(-1)), -1) : c = ee.near(n.doc.resolve(a.after(-1)), 1), yo(n, r, c);
13772
+ return l ? c = ee.near(l, 1) : e < 0 ? c = ee.near(n.doc.resolve(a.before(-1)), -1) : c = ee.near(n.doc.resolve(a.after(-1)), 1), bo(n, r, c);
13773
13773
  }
13774
13774
  };
13775
13775
  }
13776
- function ro(t, e) {
13776
+ function oo(t, e) {
13777
13777
  return (n, r, o) => {
13778
13778
  if (!o) return !1;
13779
13779
  const i = n.selection;
@@ -13786,7 +13786,7 @@ function ro(t, e) {
13786
13786
  s = new G(n.doc.resolve(l));
13787
13787
  }
13788
13788
  const a = Mu(s.$headCell, t, e);
13789
- return a ? yo(
13789
+ return a ? bo(
13790
13790
  n,
13791
13791
  r,
13792
13792
  new G(s.$anchorCell, a)
@@ -13934,7 +13934,7 @@ function ms(t, e, n, r, o, i) {
13934
13934
  l ? (n.style.width = a + "px", n.style.minWidth = "") : (n.style.width = "", n.style.minWidth = a + "px");
13935
13935
  }
13936
13936
  }
13937
- var Ie = new J(
13937
+ var Ie = new K(
13938
13938
  "tableColumnResizing"
13939
13939
  );
13940
13940
  function ww({
@@ -13944,7 +13944,7 @@ function ww({
13944
13944
  View: r = bw,
13945
13945
  lastColumnResizable: o = !0
13946
13946
  } = {}) {
13947
- const i = new Y({
13947
+ const i = new X({
13948
13948
  key: Ie,
13949
13949
  state: {
13950
13950
  init(s, a) {
@@ -13982,19 +13982,19 @@ function ww({
13982
13982
  });
13983
13983
  return i;
13984
13984
  }
13985
- var vw = class bo {
13985
+ var vw = class wo {
13986
13986
  constructor(e, n) {
13987
13987
  this.activeHandle = e, this.dragging = n;
13988
13988
  }
13989
13989
  apply(e) {
13990
13990
  const n = this, r = e.getMeta(Ie);
13991
13991
  if (r && r.setHandle != null)
13992
- return new bo(r.setHandle, !1);
13992
+ return new wo(r.setHandle, !1);
13993
13993
  if (r && r.setDragging !== void 0)
13994
- return new bo(n.activeHandle, r.setDragging);
13994
+ return new wo(n.activeHandle, r.setDragging);
13995
13995
  if (n.activeHandle > -1 && e.docChanged) {
13996
13996
  let o = e.mapping.map(n.activeHandle, -1);
13997
- return ps(e.doc.resolve(o)) || (o = -1), new bo(o, n.dragging);
13997
+ return ps(e.doc.resolve(o)) || (o = -1), new wo(o, n.dragging);
13998
13998
  }
13999
13999
  return n;
14000
14000
  }
@@ -14143,14 +14143,14 @@ function Tw(t, e) {
14143
14143
  if ((l == s.width - 1 || s.map[d] != s.map[d + 1]) && (c == 0 || s.map[d] != s.map[d - s.width])) {
14144
14144
  const u = s.map[d], f = a + u + i.nodeAt(u).nodeSize - 1, p = document.createElement("div");
14145
14145
  p.className = "column-resize-handle", (n = Ie.getState(t)) != null && n.dragging && r.push(
14146
- z.node(
14146
+ F.node(
14147
14147
  a + u,
14148
14148
  a + u + i.nodeAt(u).nodeSize,
14149
14149
  {
14150
14150
  class: "column-resize-dragging"
14151
14151
  }
14152
14152
  )
14153
- ), r.push(z.widget(f, p));
14153
+ ), r.push(F.widget(f, p));
14154
14154
  }
14155
14155
  }
14156
14156
  return P.create(t.doc, r);
@@ -14158,7 +14158,7 @@ function Tw(t, e) {
14158
14158
  function Dw({
14159
14159
  allowTableNodeSelection: t = !1
14160
14160
  } = {}) {
14161
- return new Y({
14161
+ return new X({
14162
14162
  key: Nt,
14163
14163
  // This piece of state is used to remember when a mouse-drag
14164
14164
  // cell-selection is happening, so that it can continue even as
@@ -14196,11 +14196,11 @@ function Dw({
14196
14196
  }
14197
14197
  });
14198
14198
  }
14199
- const Ew = (t) => t instanceof G, oo = ({ editor: t }) => {
14199
+ const Ew = (t) => t instanceof G, io = ({ editor: t }) => {
14200
14200
  const { selection: e } = t.state;
14201
14201
  if (!Ew(e)) return !1;
14202
14202
  let n = 0;
14203
- return Fr(e.ranges[0].$from, (i) => i.type.name === "table")?.node.descendants((i) => {
14203
+ return Br(e.ranges[0].$from, (i) => i.type.name === "table")?.node.descendants((i) => {
14204
14204
  if (i.type.name === "table") return !1;
14205
14205
  ["tableCell", "tableHeader"].includes(i.type.name) && (n += 1);
14206
14206
  }), n === e.ranges.length ? (t.commands.deleteTable(), !0) : !1;
@@ -14220,7 +14220,7 @@ const Ew = (t) => t instanceof G, oo = ({ editor: t }) => {
14220
14220
  image: Rw
14221
14221
  }[n];
14222
14222
  return o ? o(e) : {};
14223
- }, Pw = (t) => ({ rawHtml: t }), Iw = (t) => ({ displayLabel: t }), Rw = (t) => ({ imageSrc: t }), Lw = (t) => ({ displayLabel: t }), Lu = K.create({
14223
+ }, Pw = (t) => ({ rawHtml: t }), Iw = (t) => ({ displayLabel: t }), Rw = (t) => ({ imageSrc: t }), Lw = (t) => ({ displayLabel: t }), Lu = J.create({
14224
14224
  name: "table",
14225
14225
  content: "tableRow+",
14226
14226
  group: "block",
@@ -14351,7 +14351,7 @@ const Ew = (t) => t instanceof G, oo = ({ editor: t }) => {
14351
14351
  }), !0;
14352
14352
  },
14353
14353
  generateTable: (t, e, n) => ({ tr: r, editor: o }) => {
14354
- const i = [], { state: { doc: s, schema: a } } = o, { tableRow: l, tableCell: c, fieldAnnotation: d, paragraph: u } = a.nodes, f = s.resolve(t.pos), p = Fr(f, (w) => w.type === l);
14354
+ const i = [], { state: { doc: s, schema: a } } = o, { tableRow: l, tableCell: c, fieldAnnotation: d, paragraph: u } = a.nodes, f = s.resolve(t.pos), p = Br(f, (w) => w.type === l);
14355
14355
  if (!p) return;
14356
14356
  if (p.node.descendants((w, x) => {
14357
14357
  w.type.name === "fieldAnnotation" && i.push(w.attrs.fieldId);
@@ -14385,10 +14385,10 @@ const Ew = (t) => t instanceof G, oo = ({ editor: t }) => {
14385
14385
  return {
14386
14386
  Tab: () => this.editor.commands.goToNextCell() ? !0 : this.editor.can().addRowAfter() ? this.editor.chain().addRowAfter().goToNextCell().run() : !1,
14387
14387
  "Shift-Tab": () => this.editor.commands.goToPreviousCell(),
14388
- Backspace: oo,
14389
- "Mod-Backspace": oo,
14390
- Delete: oo,
14391
- "Mod-Delete": oo
14388
+ Backspace: io,
14389
+ "Mod-Backspace": io,
14390
+ Delete: io,
14391
+ "Mod-Delete": io
14392
14392
  };
14393
14393
  },
14394
14394
  addPmPlugins() {
@@ -14411,14 +14411,14 @@ const Ew = (t) => t instanceof G, oo = ({ editor: t }) => {
14411
14411
  },
14412
14412
  extendNodeSchema(t) {
14413
14413
  return {
14414
- tableRole: X(I(t, "tableRole", {
14414
+ tableRole: Y(I(t, "tableRole", {
14415
14415
  name: t.name,
14416
14416
  options: t.options,
14417
14417
  storage: t.storage
14418
14418
  }))
14419
14419
  };
14420
14420
  }
14421
- }), Fu = K.create({
14421
+ }), Fu = J.create({
14422
14422
  name: "tableHeader",
14423
14423
  content: "block+",
14424
14424
  tableRole: "header_cell",
@@ -14454,7 +14454,7 @@ const Ew = (t) => t instanceof G, oo = ({ editor: t }) => {
14454
14454
  renderDOM({ htmlAttributes: t }) {
14455
14455
  return ["th", E.mergeAttributes(this.options.htmlAttributes, t), 0];
14456
14456
  }
14457
- }), Bu = K.create({
14457
+ }), Bu = J.create({
14458
14458
  name: "tableRow",
14459
14459
  content: "(tableCell | tableHeader)*",
14460
14460
  tableRole: "row",
@@ -14478,7 +14478,7 @@ const Ew = (t) => t instanceof G, oo = ({ editor: t }) => {
14478
14478
  renderDOM({ htmlAttributes: t }) {
14479
14479
  return ["tr", E.mergeAttributes(this.options.htmlAttributes, t), 0];
14480
14480
  }
14481
- }), zu = K.create({
14481
+ }), zu = J.create({
14482
14482
  name: "tableCell",
14483
14483
  content: "block+",
14484
14484
  tableRole: "cell",
@@ -14735,8 +14735,8 @@ function It(t) {
14735
14735
  }
14736
14736
  const zw = (t = {}) => {
14737
14737
  let { editor: e, annotationClass: n } = t;
14738
- return new Y({
14739
- key: new J("fieldAnnotation"),
14738
+ return new X({
14739
+ key: new K("fieldAnnotation"),
14740
14740
  state: {
14741
14741
  init() {
14742
14742
  return null;
@@ -14843,7 +14843,7 @@ function Vw(t, e) {
14843
14843
  }), r;
14844
14844
  }
14845
14845
  const { findChildren: Hw } = Us;
14846
- function wo(t, e) {
14846
+ function vo(t, e) {
14847
14847
  return Hw(e.doc, (r) => {
14848
14848
  let o = r.type.name === "fieldAnnotation";
14849
14849
  return Array.isArray(t) ? o && t.includes(r.attrs.fieldId) : o && r.attrs.fieldId === t;
@@ -14858,7 +14858,7 @@ function Ww(t, e) {
14858
14858
  if (e(r) && (n = { node: r, pos: o }), n) return !1;
14859
14859
  }), n;
14860
14860
  }
14861
- function vo(t, e, n) {
14861
+ function ko(t, e, n) {
14862
14862
  let r = [];
14863
14863
  return n.nodesBetween(t, e, (o, i) => {
14864
14864
  !o || o?.nodeSize === void 0 || o.type.name === "fieldAnnotation" && r.push({
@@ -14870,8 +14870,8 @@ function vo(t, e, n) {
14870
14870
  const Lx = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
14871
14871
  __proto__: null,
14872
14872
  findFieldAnnotations: Vw,
14873
- findFieldAnnotationsBetween: vo,
14874
- findFieldAnnotationsByFieldId: wo,
14873
+ findFieldAnnotationsBetween: ko,
14874
+ findFieldAnnotationsByFieldId: vo,
14875
14875
  findFirstFieldAnnotationByFieldId: jw,
14876
14876
  findRemovedFieldAnnotations: $u,
14877
14877
  getAllFieldAnnotations: It,
@@ -14952,7 +14952,7 @@ function nv(t) {
14952
14952
  };
14953
14953
  return `#${i(e)}${i(n)}${i(r)}${o < 1 ? i(Math.round(o * 255)) : ""}`;
14954
14954
  }
14955
- const ys = "annotation", Vu = "annotation-content", Hu = K.create({
14955
+ const ys = "annotation", Vu = "annotation-content", Hu = J.create({
14956
14956
  name: "fieldAnnotation",
14957
14957
  group: "inline",
14958
14958
  inline: !0,
@@ -15242,7 +15242,7 @@ const ys = "annotation", Vu = "annotation-content", Hu = K.create({
15242
15242
  * })
15243
15243
  */
15244
15244
  updateFieldAnnotations: (t, e = {}) => ({ dispatch: n, state: r, commands: o }) => {
15245
- let i = wo(t, r);
15245
+ let i = vo(t, r);
15246
15246
  return i.length && n ? o.updateFieldAnnotationsAttributes(i, e) : !0;
15247
15247
  },
15248
15248
  /**
@@ -15277,7 +15277,7 @@ const ys = "annotation", Vu = "annotation-content", Hu = K.create({
15277
15277
  * editor.commands.deleteFieldAnnotations(['123', '456'])
15278
15278
  */
15279
15279
  deleteFieldAnnotations: (t) => ({ dispatch: e, state: n, tr: r }) => {
15280
- let o = wo(t, n);
15280
+ let o = vo(t, n);
15281
15281
  return o.length && e && o.forEach((i) => {
15282
15282
  let { pos: s, node: a } = i, l = r.mapping.map(s), c = r.mapping.map(s + a.nodeSize), d = r.doc.nodeAt(l);
15283
15283
  a.eq(d) && r.delete(l, c);
@@ -15306,7 +15306,7 @@ const ys = "annotation", Vu = "annotation-content", Hu = K.create({
15306
15306
  * editor.commands.sliceFieldAnnotations(['123', '456'], 5)
15307
15307
  */
15308
15308
  sliceFieldAnnotations: (t, e) => ({ dispatch: n, state: r, tr: o }) => {
15309
- let i = wo(t, r);
15309
+ let i = vo(t, r);
15310
15310
  return i.length && n && i.forEach((s, a) => {
15311
15311
  if (a >= e) {
15312
15312
  let { pos: l, node: c } = s, d = o.mapping.map(l), u = o.mapping.map(l + c.nodeSize), f = o.doc.nodeAt(d);
@@ -15392,7 +15392,7 @@ const ys = "annotation", Vu = "annotation-content", Hu = K.create({
15392
15392
  toggleFieldAnnotationsFormat: (t, e = !1) => ({ dispatch: n, tr: r, state: o, commands: i }) => {
15393
15393
  if (!this.options.toggleFormatNames.includes(t))
15394
15394
  return !1;
15395
- let { from: a, to: l, node: c } = o.selection, d = vo(a, l, o.doc);
15395
+ let { from: a, to: l, node: c } = o.selection, d = ko(a, l, o.doc);
15396
15396
  return d.length && n && (d.forEach((u) => {
15397
15397
  i.updateFieldAnnotationsAttributes([u], {
15398
15398
  [t]: !u.node.attrs[t]
@@ -15400,7 +15400,7 @@ const ys = "annotation", Vu = "annotation-content", Hu = K.create({
15400
15400
  }), e && c?.type.name === this.name && r.setSelection(_.create(r.doc, a))), !0;
15401
15401
  },
15402
15402
  setFieldAnnotationsFontFamily: (t, e = !1) => ({ dispatch: n, tr: r, state: o, commands: i }) => {
15403
- let { from: s, to: a, node: l } = o.selection, c = vo(s, a, o.doc);
15403
+ let { from: s, to: a, node: l } = o.selection, c = ko(s, a, o.doc);
15404
15404
  return c.length && n && (c.forEach((d) => {
15405
15405
  i.updateFieldAnnotationsAttributes([d], {
15406
15406
  fontFamily: t
@@ -15408,11 +15408,11 @@ const ys = "annotation", Vu = "annotation-content", Hu = K.create({
15408
15408
  }), e && l?.type.name === this.name && r.setSelection(_.create(r.doc, s))), !0;
15409
15409
  },
15410
15410
  setFieldAnnotationsFontSize: (t, e = !1) => ({ dispatch: n, tr: r, state: o, commands: i }) => {
15411
- let { from: s, to: a, node: l } = o.selection, c = vo(s, a, o.doc);
15411
+ let { from: s, to: a, node: l } = o.selection, c = ko(s, a, o.doc);
15412
15412
  if (!c.length)
15413
15413
  return !0;
15414
15414
  let [d, u] = Rt(t), f = 8, p = 96, h = "pt";
15415
- return Number.isNaN(d) ? !1 : (d = xo(d, f, p), u = u || h, n && (c.forEach((m) => {
15415
+ return Number.isNaN(d) ? !1 : (d = So(d, f, p), u = u || h, n && (c.forEach((m) => {
15416
15416
  i.updateFieldAnnotationsAttributes([m], {
15417
15417
  fontSize: `${d}${u}`
15418
15418
  });
@@ -15456,17 +15456,17 @@ function rv(t) {
15456
15456
  }
15457
15457
  return e;
15458
15458
  }
15459
- const Fo = new J("ImagePlaceholder"), ov = (t = {}) => new Y({
15460
- key: Fo,
15459
+ const Bo = new K("ImagePlaceholder"), ov = (t = {}) => new X({
15460
+ key: Bo,
15461
15461
  state: {
15462
15462
  init() {
15463
15463
  return P.empty;
15464
15464
  },
15465
15465
  apply(e, n, r, o) {
15466
15466
  n = n.map(e.mapping, e.doc);
15467
- let i = e.getMeta(Fo);
15467
+ let i = e.getMeta(Bo);
15468
15468
  if (i?.type === "add") {
15469
- let s = document.createElement("placeholder"), a = z.widget(i.pos, s, {
15469
+ let s = document.createElement("placeholder"), a = F.widget(i.pos, s, {
15470
15470
  id: i.id
15471
15471
  });
15472
15472
  n = n.add(e.doc, [a]);
@@ -15480,12 +15480,12 @@ const Fo = new J("ImagePlaceholder"), ov = (t = {}) => new Y({
15480
15480
  }
15481
15481
  }
15482
15482
  }), Fx = (t, e) => {
15483
- let r = Fo.getState(t)?.find(null, null, (o) => o.id === e);
15483
+ let r = Bo.getState(t)?.find(null, null, (o) => o.id === e);
15484
15484
  return r?.length ? r[0].from : null;
15485
- }, Bl = new J("ImagePosition"), iv = ({ editor: t }) => {
15485
+ }, Bl = new K("ImagePosition"), iv = ({ editor: t }) => {
15486
15486
  const { view: e } = t;
15487
15487
  let n = !1;
15488
- return new Y({
15488
+ return new X({
15489
15489
  name: "ImagePositionPlugin",
15490
15490
  key: Bl,
15491
15491
  state: {
@@ -15537,11 +15537,11 @@ const Fo = new J("ImagePlaceholder"), ov = (t = {}) => new Y({
15537
15537
  }
15538
15538
  if (i += a === "margin" ? `position: absolute; top: ${u?.offsetTop + u?.offsetHeight}px; ` : "", a === "margin") {
15539
15539
  const f = e.posAtDOM(u, 1), p = document.createElement("div");
15540
- p.className = "anchor-image-placeholder", p.style.float = l, p.style.width = c.width + parseInt(d[l]) + "px", p.style.height = c.height + parseInt(d.top) + parseInt(d.bottom) + "px", n.push(z.widget(f, p, { key: "stable-key" }));
15540
+ p.className = "anchor-image-placeholder", p.style.float = l, p.style.width = c.width + parseInt(d[l]) + "px", p.style.height = c.height + parseInt(d.top) + parseInt(d.bottom) + "px", n.push(F.widget(f, p, { key: "stable-key" }));
15541
15541
  }
15542
15542
  }
15543
15543
  n.push(
15544
- z.node(o, o + r.nodeSize, { style: i, class: s })
15544
+ F.node(o, o + r.nodeSize, { style: i, class: s })
15545
15545
  );
15546
15546
  }
15547
15547
  }), n;
@@ -15557,7 +15557,7 @@ const Fo = new J("ImagePlaceholder"), ov = (t = {}) => new Y({
15557
15557
  r = r.parentNode;
15558
15558
  }
15559
15559
  return null;
15560
- }, ju = K.create({
15560
+ }, ju = J.create({
15561
15561
  name: "image",
15562
15562
  group: "inline",
15563
15563
  inline: !0,
@@ -15656,7 +15656,7 @@ const Fo = new J("ImagePlaceholder"), ov = (t = {}) => new Y({
15656
15656
  addPmPlugins() {
15657
15657
  return [ov(), iv({ editor: this.editor })];
15658
15658
  }
15659
- }), av = K.create({
15659
+ }), av = J.create({
15660
15660
  name: "bookmarkStart",
15661
15661
  group: "inline",
15662
15662
  content: "inline*",
@@ -15681,7 +15681,7 @@ const Fo = new J("ImagePlaceholder"), ov = (t = {}) => new Y({
15681
15681
  renderDOM({ htmlAttributes: t }) {
15682
15682
  return ["a", E.mergeAttributes(this.options.htmlAttributes, t)];
15683
15683
  }
15684
- }), Wu = K.create({
15684
+ }), Wu = J.create({
15685
15685
  name: "mention",
15686
15686
  group: "inline",
15687
15687
  inline: !0,
@@ -15719,7 +15719,7 @@ const Fo = new J("ImagePlaceholder"), ov = (t = {}) => new Y({
15719
15719
  email: { default: null }
15720
15720
  };
15721
15721
  }
15722
- }), lv = K.create({
15722
+ }), lv = J.create({
15723
15723
  name: "page-number",
15724
15724
  group: "inline",
15725
15725
  inline: !0,
@@ -15737,7 +15737,7 @@ const Fo = new J("ImagePlaceholder"), ov = (t = {}) => new Y({
15737
15737
  renderDOM({ htmlAttributes: t }) {
15738
15738
  return ["span", E.mergeAttributes(this.options.htmlAttributes, t), 0];
15739
15739
  }
15740
- }), cv = K.create({
15740
+ }), cv = J.create({
15741
15741
  name: "total-page-number",
15742
15742
  group: "inline",
15743
15743
  inline: !0,
@@ -15755,7 +15755,7 @@ const Fo = new J("ImagePlaceholder"), ov = (t = {}) => new Y({
15755
15755
  renderDOM({ htmlAttributes: t }) {
15756
15756
  return ["span", E.mergeAttributes(this.options.htmlAttributes, t), 0];
15757
15757
  }
15758
- }), dv = K.create({
15758
+ }), dv = J.create({
15759
15759
  name: "shapeContainer",
15760
15760
  group: "block",
15761
15761
  content: "block+",
@@ -15801,7 +15801,7 @@ const Fo = new J("ImagePlaceholder"), ov = (t = {}) => new Y({
15801
15801
  0
15802
15802
  ];
15803
15803
  }
15804
- }), uv = K.create({
15804
+ }), uv = J.create({
15805
15805
  name: "shapeTextbox",
15806
15806
  group: "block",
15807
15807
  content: "paragraph* block*",
@@ -15834,7 +15834,7 @@ const Fo = new J("ImagePlaceholder"), ov = (t = {}) => new Y({
15834
15834
  0
15835
15835
  ];
15836
15836
  }
15837
- }), fv = K.create({
15837
+ }), fv = J.create({
15838
15838
  name: "contentBlock",
15839
15839
  group: "block",
15840
15840
  content: "",
@@ -16513,14 +16513,14 @@ const hv = "track-insert", Zu = Oe.create({
16513
16513
  addPmPlugins() {
16514
16514
  const t = (n) => {
16515
16515
  if (n.doc.textBetween(0, n.doc.content.size, " ", " ") !== "") return P.empty;
16516
- const { $from: o } = n.selection, i = z.node(o.before(), o.after(), {
16516
+ const { $from: o } = n.selection, i = F.node(o.before(), o.after(), {
16517
16517
  "data-placeholder": this.options.placeholder,
16518
16518
  class: "sd-editor-placeholder"
16519
16519
  });
16520
16520
  return P.create(n.doc, [i]);
16521
16521
  };
16522
- return [new Y({
16523
- key: new J("placeholder"),
16522
+ return [new X({
16523
+ key: new K("placeholder"),
16524
16524
  state: {
16525
16525
  init: (n, r) => t(r),
16526
16526
  apply: (n, r, o, i) => t(i)
@@ -16533,9 +16533,9 @@ const hv = "track-insert", Zu = Oe.create({
16533
16533
  })];
16534
16534
  }
16535
16535
  });
16536
- var Ee = "top", Ue = "bottom", qe = "right", Ne = "left", Gs = "auto", Br = [Ee, Ue, qe, Ne], Rn = "start", Mr = "end", wv = "clippingParents", tf = "viewport", Gn = "popper", vv = "reference", Vl = /* @__PURE__ */ Br.reduce(function(t, e) {
16536
+ var Ee = "top", Ue = "bottom", qe = "right", Ne = "left", Gs = "auto", zr = [Ee, Ue, qe, Ne], Rn = "start", Mr = "end", wv = "clippingParents", tf = "viewport", Gn = "popper", vv = "reference", Vl = /* @__PURE__ */ zr.reduce(function(t, e) {
16537
16537
  return t.concat([e + "-" + Rn, e + "-" + Mr]);
16538
- }, []), nf = /* @__PURE__ */ [].concat(Br, [Gs]).reduce(function(t, e) {
16538
+ }, []), nf = /* @__PURE__ */ [].concat(zr, [Gs]).reduce(function(t, e) {
16539
16539
  return t.concat([e, e + "-" + Rn, e + "-" + Mr]);
16540
16540
  }, []), kv = "beforeRead", xv = "read", Sv = "afterRead", Cv = "beforeMain", Mv = "main", Av = "afterMain", Ov = "beforeWrite", Tv = "write", Dv = "afterWrite", Ev = [kv, xv, Sv, Cv, Mv, Av, Ov, Tv, Dv];
16541
16541
  function lt(t) {
@@ -16609,7 +16609,7 @@ const rf = {
16609
16609
  function it(t) {
16610
16610
  return t.split("-")[0];
16611
16611
  }
16612
- var an = Math.max, Bo = Math.min, Ln = Math.round;
16612
+ var an = Math.max, zo = Math.min, Ln = Math.round;
16613
16613
  function ws() {
16614
16614
  var t = navigator.userAgentData;
16615
16615
  return t != null && t.brands && Array.isArray(t.brands) ? t.brands.map(function(e) {
@@ -16702,7 +16702,7 @@ function Rv(t) {
16702
16702
  }
16703
16703
  return null;
16704
16704
  }
16705
- function zr(t) {
16705
+ function $r(t) {
16706
16706
  for (var e = Fe(t), n = Hl(t); n && Iv(n) && xt(n).position === "static"; )
16707
16707
  n = Hl(n);
16708
16708
  return n && (lt(n) === "html" || lt(n) === "body" && xt(n).position === "static") ? e : n || Rv(t) || e;
@@ -16711,7 +16711,7 @@ function ea(t) {
16711
16711
  return ["top", "bottom"].indexOf(t) >= 0 ? "x" : "y";
16712
16712
  }
16713
16713
  function ar(t, e, n) {
16714
- return an(t, Bo(e, n));
16714
+ return an(t, zo(e, n));
16715
16715
  }
16716
16716
  function Lv(t, e, n) {
16717
16717
  var r = ar(t, e, n);
@@ -16736,13 +16736,13 @@ function cf(t, e) {
16736
16736
  var Fv = function(e, n) {
16737
16737
  return e = typeof e == "function" ? e(Object.assign({}, n.rects, {
16738
16738
  placement: n.placement
16739
- })) : e, lf(typeof e != "number" ? e : cf(e, Br));
16739
+ })) : e, lf(typeof e != "number" ? e : cf(e, zr));
16740
16740
  };
16741
16741
  function Bv(t) {
16742
16742
  var e, n = t.state, r = t.name, o = t.options, i = n.elements.arrow, s = n.modifiersData.popperOffsets, a = it(n.placement), l = ea(a), c = [Ne, qe].indexOf(a) >= 0, d = c ? "height" : "width";
16743
16743
  if (!(!i || !s)) {
16744
- var u = Fv(o.padding, n), f = Qs(i), p = l === "y" ? Ee : Ne, h = l === "y" ? Ue : qe, m = n.rects.reference[d] + n.rects.reference[l] - s[l] - n.rects.popper[d], g = s[l] - n.rects.reference[l], b = zr(i), w = b ? l === "y" ? b.clientHeight || 0 : b.clientWidth || 0 : 0, x = m / 2 - g / 2, y = u[p], S = w - f[d] - u[h], k = w / 2 - f[d] / 2 + x, M = ar(y, k, S), F = l;
16745
- n.modifiersData[r] = (e = {}, e[F] = M, e.centerOffset = M - k, e);
16744
+ var u = Fv(o.padding, n), f = Qs(i), p = l === "y" ? Ee : Ne, h = l === "y" ? Ue : qe, m = n.rects.reference[d] + n.rects.reference[l] - s[l] - n.rects.popper[d], g = s[l] - n.rects.reference[l], b = $r(i), w = b ? l === "y" ? b.clientHeight || 0 : b.clientWidth || 0 : 0, x = m / 2 - g / 2, y = u[p], S = w - f[d] - u[h], k = w / 2 - f[d] / 2 + x, M = ar(y, k, S), B = l;
16745
+ n.modifiersData[r] = (e = {}, e[B] = M, e.centerOffset = M - k, e);
16746
16746
  }
16747
16747
  }
16748
16748
  function zv(t) {
@@ -16785,8 +16785,8 @@ function jl(t) {
16785
16785
  p = g.x, m = g.y;
16786
16786
  var b = s.hasOwnProperty("x"), w = s.hasOwnProperty("y"), x = Ne, y = Ee, S = window;
16787
16787
  if (c) {
16788
- var k = zr(n), M = "clientHeight", F = "clientWidth";
16789
- if (k === Fe(n) && (k = Ut(n), xt(k).position !== "static" && a === "absolute" && (M = "scrollHeight", F = "scrollWidth")), k = k, o === Ee || (o === Ne || o === qe) && i === Mr) {
16788
+ var k = $r(n), M = "clientHeight", B = "clientWidth";
16789
+ if (k === Fe(n) && (k = Ut(n), xt(k).position !== "static" && a === "absolute" && (M = "scrollHeight", B = "scrollWidth")), k = k, o === Ee || (o === Ne || o === qe) && i === Mr) {
16790
16790
  y = Ue;
16791
16791
  var C = u && k === S && S.visualViewport ? S.visualViewport.height : (
16792
16792
  // $FlowFixMe[prop-missing]
@@ -16798,21 +16798,21 @@ function jl(t) {
16798
16798
  x = qe;
16799
16799
  var V = u && k === S && S.visualViewport ? S.visualViewport.width : (
16800
16800
  // $FlowFixMe[prop-missing]
16801
- k[F]
16801
+ k[B]
16802
16802
  );
16803
16803
  p -= V - r.width, p *= l ? 1 : -1;
16804
16804
  }
16805
16805
  }
16806
16806
  var $ = Object.assign({
16807
16807
  position: a
16808
- }, c && _v), B = d === !0 ? Vv({
16808
+ }, c && _v), z = d === !0 ? Vv({
16809
16809
  x: p,
16810
16810
  y: m
16811
16811
  }, Fe(n)) : {
16812
16812
  x: p,
16813
16813
  y: m
16814
16814
  };
16815
- if (p = B.x, m = B.y, l) {
16815
+ if (p = z.x, m = z.y, l) {
16816
16816
  var H;
16817
16817
  return Object.assign({}, $, (H = {}, H[y] = w ? "0" : "", H[x] = b ? "0" : "", H.transform = (S.devicePixelRatio || 1) <= 1 ? "translate(" + p + "px, " + m + "px)" : "translate3d(" + p + "px, " + m + "px, 0)", H));
16818
16818
  }
@@ -16848,17 +16848,17 @@ const jv = {
16848
16848
  fn: Hv,
16849
16849
  data: {}
16850
16850
  };
16851
- var io = {
16851
+ var so = {
16852
16852
  passive: !0
16853
16853
  };
16854
16854
  function Wv(t) {
16855
16855
  var e = t.state, n = t.instance, r = t.options, o = r.scroll, i = o === void 0 ? !0 : o, s = r.resize, a = s === void 0 ? !0 : s, l = Fe(e.elements.popper), c = [].concat(e.scrollParents.reference, e.scrollParents.popper);
16856
16856
  return i && c.forEach(function(d) {
16857
- d.addEventListener("scroll", n.update, io);
16858
- }), a && l.addEventListener("resize", n.update, io), function() {
16857
+ d.addEventListener("scroll", n.update, so);
16858
+ }), a && l.addEventListener("resize", n.update, so), function() {
16859
16859
  i && c.forEach(function(d) {
16860
- d.removeEventListener("scroll", n.update, io);
16861
- }), a && l.removeEventListener("resize", n.update, io);
16860
+ d.removeEventListener("scroll", n.update, so);
16861
+ }), a && l.removeEventListener("resize", n.update, so);
16862
16862
  };
16863
16863
  }
16864
16864
  const Uv = {
@@ -16876,7 +16876,7 @@ var qv = {
16876
16876
  bottom: "top",
16877
16877
  top: "bottom"
16878
16878
  };
16879
- function ko(t) {
16879
+ function xo(t) {
16880
16880
  return t.replace(/left|right|bottom|top/g, function(e) {
16881
16881
  return qv[e];
16882
16882
  });
@@ -16955,7 +16955,7 @@ function Ul(t, e, n) {
16955
16955
  return e === tf ? vs(Xv(t, n)) : fn(e) ? Yv(e, n) : vs(Jv(Ut(t)));
16956
16956
  }
16957
16957
  function Gv(t) {
16958
- var e = lr(Jo(t)), n = ["absolute", "fixed"].indexOf(xt(t).position) >= 0, r = n && We(t) ? zr(t) : t;
16958
+ var e = lr(Jo(t)), n = ["absolute", "fixed"].indexOf(xt(t).position) >= 0, r = n && We(t) ? $r(t) : t;
16959
16959
  return fn(r) ? e.filter(function(o) {
16960
16960
  return fn(o) && sf(o, r) && lt(o) !== "body";
16961
16961
  }) : [];
@@ -16963,7 +16963,7 @@ function Gv(t) {
16963
16963
  function Zv(t, e, n, r) {
16964
16964
  var o = e === "clippingParents" ? Gv(t) : [].concat(e), i = [].concat(o, [n]), s = i[0], a = i.reduce(function(l, c) {
16965
16965
  var d = Ul(t, c, r);
16966
- return l.top = an(d.top, l.top), l.right = Bo(d.right, l.right), l.bottom = Bo(d.bottom, l.bottom), l.left = an(d.left, l.left), l;
16966
+ return l.top = an(d.top, l.top), l.right = zo(d.right, l.right), l.bottom = zo(d.bottom, l.bottom), l.left = an(d.left, l.left), l;
16967
16967
  }, Ul(t, s, r));
16968
16968
  return a.width = a.right - a.left, a.height = a.bottom - a.top, a.x = a.left, a.y = a.top, a;
16969
16969
  }
@@ -17016,21 +17016,21 @@ function uf(t) {
17016
17016
  }
17017
17017
  function Ar(t, e) {
17018
17018
  e === void 0 && (e = {});
17019
- var n = e, r = n.placement, o = r === void 0 ? t.placement : r, i = n.strategy, s = i === void 0 ? t.strategy : i, a = n.boundary, l = a === void 0 ? wv : a, c = n.rootBoundary, d = c === void 0 ? tf : c, u = n.elementContext, f = u === void 0 ? Gn : u, p = n.altBoundary, h = p === void 0 ? !1 : p, m = n.padding, g = m === void 0 ? 0 : m, b = lf(typeof g != "number" ? g : cf(g, Br)), w = f === Gn ? vv : Gn, x = t.rects.popper, y = t.elements[h ? w : f], S = Zv(fn(y) ? y : y.contextElement || Ut(t.elements.popper), l, d, s), k = Fn(t.elements.reference), M = uf({
17019
+ var n = e, r = n.placement, o = r === void 0 ? t.placement : r, i = n.strategy, s = i === void 0 ? t.strategy : i, a = n.boundary, l = a === void 0 ? wv : a, c = n.rootBoundary, d = c === void 0 ? tf : c, u = n.elementContext, f = u === void 0 ? Gn : u, p = n.altBoundary, h = p === void 0 ? !1 : p, m = n.padding, g = m === void 0 ? 0 : m, b = lf(typeof g != "number" ? g : cf(g, zr)), w = f === Gn ? vv : Gn, x = t.rects.popper, y = t.elements[h ? w : f], S = Zv(fn(y) ? y : y.contextElement || Ut(t.elements.popper), l, d, s), k = Fn(t.elements.reference), M = uf({
17020
17020
  reference: k,
17021
17021
  element: x,
17022
17022
  placement: o
17023
- }), F = vs(Object.assign({}, x, M)), C = f === Gn ? F : k, V = {
17023
+ }), B = vs(Object.assign({}, x, M)), C = f === Gn ? B : k, V = {
17024
17024
  top: S.top - C.top + b.top,
17025
17025
  bottom: C.bottom - S.bottom + b.bottom,
17026
17026
  left: S.left - C.left + b.left,
17027
17027
  right: C.right - S.right + b.right
17028
17028
  }, $ = t.modifiersData.offset;
17029
17029
  if (f === Gn && $) {
17030
- var B = $[o];
17030
+ var z = $[o];
17031
17031
  Object.keys(V).forEach(function(H) {
17032
17032
  var ie = [qe, Ue].indexOf(H) >= 0 ? 1 : -1, ae = [Ee, Ue].indexOf(H) >= 0 ? "y" : "x";
17033
- V[H] += B[ae] * ie;
17033
+ V[H] += z[ae] * ie;
17034
17034
  });
17035
17035
  }
17036
17036
  return V;
@@ -17039,7 +17039,7 @@ function Qv(t, e) {
17039
17039
  e === void 0 && (e = {});
17040
17040
  var n = e, r = n.placement, o = n.boundary, i = n.rootBoundary, s = n.padding, a = n.flipVariations, l = n.allowedAutoPlacements, c = l === void 0 ? nf : l, d = Bn(r), u = d ? a ? Vl : Vl.filter(function(h) {
17041
17041
  return Bn(h) === d;
17042
- }) : Br, f = u.filter(function(h) {
17042
+ }) : zr, f = u.filter(function(h) {
17043
17043
  return c.indexOf(h) >= 0;
17044
17044
  });
17045
17045
  f.length === 0 && (f = u);
@@ -17058,13 +17058,13 @@ function Qv(t, e) {
17058
17058
  function ek(t) {
17059
17059
  if (it(t) === Gs)
17060
17060
  return [];
17061
- var e = ko(t);
17061
+ var e = xo(t);
17062
17062
  return [Wl(t), e, Wl(e)];
17063
17063
  }
17064
17064
  function tk(t) {
17065
17065
  var e = t.state, n = t.options, r = t.name;
17066
17066
  if (!e.modifiersData[r]._skip) {
17067
- for (var o = n.mainAxis, i = o === void 0 ? !0 : o, s = n.altAxis, a = s === void 0 ? !0 : s, l = n.fallbackPlacements, c = n.padding, d = n.boundary, u = n.rootBoundary, f = n.altBoundary, p = n.flipVariations, h = p === void 0 ? !0 : p, m = n.allowedAutoPlacements, g = e.options.placement, b = it(g), w = b === g, x = l || (w || !h ? [ko(g)] : ek(g)), y = [g].concat(x).reduce(function(Ke, Pe) {
17067
+ for (var o = n.mainAxis, i = o === void 0 ? !0 : o, s = n.altAxis, a = s === void 0 ? !0 : s, l = n.fallbackPlacements, c = n.padding, d = n.boundary, u = n.rootBoundary, f = n.altBoundary, p = n.flipVariations, h = p === void 0 ? !0 : p, m = n.allowedAutoPlacements, g = e.options.placement, b = it(g), w = b === g, x = l || (w || !h ? [xo(g)] : ek(g)), y = [g].concat(x).reduce(function(Ke, Pe) {
17068
17068
  return Ke.concat(it(Pe) === Gs ? Qv(e, {
17069
17069
  placement: Pe,
17070
17070
  boundary: d,
@@ -17073,25 +17073,25 @@ function tk(t) {
17073
17073
  flipVariations: h,
17074
17074
  allowedAutoPlacements: m
17075
17075
  }) : Pe);
17076
- }, []), S = e.rects.reference, k = e.rects.popper, M = /* @__PURE__ */ new Map(), F = !0, C = y[0], V = 0; V < y.length; V++) {
17077
- var $ = y[V], B = it($), H = Bn($) === Rn, ie = [Ee, Ue].indexOf(B) >= 0, ae = ie ? "width" : "height", fe = Ar(e, {
17076
+ }, []), S = e.rects.reference, k = e.rects.popper, M = /* @__PURE__ */ new Map(), B = !0, C = y[0], V = 0; V < y.length; V++) {
17077
+ var $ = y[V], z = it($), H = Bn($) === Rn, ie = [Ee, Ue].indexOf(z) >= 0, ae = ie ? "width" : "height", fe = Ar(e, {
17078
17078
  placement: $,
17079
17079
  boundary: d,
17080
17080
  rootBoundary: u,
17081
17081
  altBoundary: f,
17082
17082
  padding: c
17083
17083
  }), se = ie ? H ? qe : Ne : H ? Ue : Ee;
17084
- S[ae] > k[ae] && (se = ko(se));
17085
- var Q = ko(se), pe = [];
17086
- if (i && pe.push(fe[B] <= 0), a && pe.push(fe[se] <= 0, fe[Q] <= 0), pe.every(function(Ke) {
17084
+ S[ae] > k[ae] && (se = xo(se));
17085
+ var Q = xo(se), pe = [];
17086
+ if (i && pe.push(fe[z] <= 0), a && pe.push(fe[se] <= 0, fe[Q] <= 0), pe.every(function(Ke) {
17087
17087
  return Ke;
17088
17088
  })) {
17089
- C = $, F = !1;
17089
+ C = $, B = !1;
17090
17090
  break;
17091
17091
  }
17092
17092
  M.set($, pe);
17093
17093
  }
17094
- if (F)
17094
+ if (B)
17095
17095
  for (var he = h ? 3 : 1, Te = function(Pe) {
17096
17096
  var Xe = y.find(function(Ct) {
17097
17097
  var Je = M.get(Ct);
@@ -17207,7 +17207,7 @@ function uk(t) {
17207
17207
  rootBoundary: c,
17208
17208
  padding: u,
17209
17209
  altBoundary: d
17210
- }), b = it(e.placement), w = Bn(e.placement), x = !w, y = ea(b), S = dk(y), k = e.modifiersData.popperOffsets, M = e.rects.reference, F = e.rects.popper, C = typeof m == "function" ? m(Object.assign({}, e.rects, {
17210
+ }), b = it(e.placement), w = Bn(e.placement), x = !w, y = ea(b), S = dk(y), k = e.modifiersData.popperOffsets, M = e.rects.reference, B = e.rects.popper, C = typeof m == "function" ? m(Object.assign({}, e.rects, {
17211
17211
  placement: e.placement
17212
17212
  })) : m, V = typeof C == "number" ? {
17213
17213
  mainAxis: C,
@@ -17215,23 +17215,23 @@ function uk(t) {
17215
17215
  } : Object.assign({
17216
17216
  mainAxis: 0,
17217
17217
  altAxis: 0
17218
- }, C), $ = e.modifiersData.offset ? e.modifiersData.offset[e.placement] : null, B = {
17218
+ }, C), $ = e.modifiersData.offset ? e.modifiersData.offset[e.placement] : null, z = {
17219
17219
  x: 0,
17220
17220
  y: 0
17221
17221
  };
17222
17222
  if (k) {
17223
17223
  if (i) {
17224
- var H, ie = y === "y" ? Ee : Ne, ae = y === "y" ? Ue : qe, fe = y === "y" ? "height" : "width", se = k[y], Q = se + g[ie], pe = se - g[ae], he = p ? -F[fe] / 2 : 0, Te = w === Rn ? M[fe] : F[fe], Be = w === Rn ? -F[fe] : -M[fe], dt = e.elements.arrow, Ke = p && dt ? Qs(dt) : {
17224
+ var H, ie = y === "y" ? Ee : Ne, ae = y === "y" ? Ue : qe, fe = y === "y" ? "height" : "width", se = k[y], Q = se + g[ie], pe = se - g[ae], he = p ? -B[fe] / 2 : 0, Te = w === Rn ? M[fe] : B[fe], Be = w === Rn ? -B[fe] : -M[fe], dt = e.elements.arrow, Ke = p && dt ? Qs(dt) : {
17225
17225
  width: 0,
17226
17226
  height: 0
17227
- }, Pe = e.modifiersData["arrow#persistent"] ? e.modifiersData["arrow#persistent"].padding : af(), Xe = Pe[ie], Ct = Pe[ae], Je = ar(0, M[fe], Ke[fe]), pn = x ? M[fe] / 2 - he - Je - Xe - V.mainAxis : Te - Je - Xe - V.mainAxis, Mt = x ? -M[fe] / 2 + he + Je + Ct + V.mainAxis : Be + Je + Ct + V.mainAxis, hn = e.elements.arrow && zr(e.elements.arrow), _r = hn ? y === "y" ? hn.clientTop || 0 : hn.clientLeft || 0 : 0, Wn = (H = $?.[y]) != null ? H : 0, Vr = se + pn - Wn - _r, Hr = se + Mt - Wn, Un = ar(p ? Bo(Q, Vr) : Q, se, p ? an(pe, Hr) : pe);
17228
- k[y] = Un, B[y] = Un - se;
17227
+ }, Pe = e.modifiersData["arrow#persistent"] ? e.modifiersData["arrow#persistent"].padding : af(), Xe = Pe[ie], Ct = Pe[ae], Je = ar(0, M[fe], Ke[fe]), pn = x ? M[fe] / 2 - he - Je - Xe - V.mainAxis : Te - Je - Xe - V.mainAxis, Mt = x ? -M[fe] / 2 + he + Je + Ct + V.mainAxis : Be + Je + Ct + V.mainAxis, hn = e.elements.arrow && $r(e.elements.arrow), Vr = hn ? y === "y" ? hn.clientTop || 0 : hn.clientLeft || 0 : 0, Wn = (H = $?.[y]) != null ? H : 0, Hr = se + pn - Wn - Vr, jr = se + Mt - Wn, Un = ar(p ? zo(Q, Hr) : Q, se, p ? an(pe, jr) : pe);
17228
+ k[y] = Un, z[y] = Un - se;
17229
17229
  }
17230
17230
  if (a) {
17231
- var qn, jr = y === "x" ? Ee : Ne, Wr = y === "x" ? Ue : qe, ut = k[S], At = S === "y" ? "height" : "width", Kn = ut + g[jr], qt = ut - g[Wr], Xn = [Ee, Ne].indexOf(b) !== -1, Ur = (qn = $?.[S]) != null ? qn : 0, qr = Xn ? Kn : ut - M[At] - F[At] - Ur + V.altAxis, Kr = Xn ? ut + M[At] + F[At] - Ur - V.altAxis : qt, Xr = p && Xn ? Lv(qr, ut, Kr) : ar(p ? qr : Kn, ut, p ? Kr : qt);
17232
- k[S] = Xr, B[S] = Xr - ut;
17231
+ var qn, Wr = y === "x" ? Ee : Ne, Ur = y === "x" ? Ue : qe, ut = k[S], At = S === "y" ? "height" : "width", Kn = ut + g[Wr], qt = ut - g[Ur], Xn = [Ee, Ne].indexOf(b) !== -1, qr = (qn = $?.[S]) != null ? qn : 0, Kr = Xn ? Kn : ut - M[At] - B[At] - qr + V.altAxis, Xr = Xn ? ut + M[At] + B[At] - qr - V.altAxis : qt, Jr = p && Xn ? Lv(Kr, ut, Xr) : ar(p ? Kr : Kn, ut, p ? Xr : qt);
17232
+ k[S] = Jr, z[S] = Jr - ut;
17233
17233
  }
17234
- e.modifiersData[r] = B;
17234
+ e.modifiersData[r] = z;
17235
17235
  }
17236
17236
  }
17237
17237
  const fk = {
@@ -17371,7 +17371,7 @@ function kk(t) {
17371
17371
  var b = d.elements, w = b.reference, x = b.popper;
17372
17372
  if (Jl(w, x)) {
17373
17373
  d.rects = {
17374
- reference: gk(w, zr(x), d.options.strategy === "fixed"),
17374
+ reference: gk(w, $r(x), d.options.strategy === "fixed"),
17375
17375
  popper: Qs(x)
17376
17376
  }, d.reset = !1, d.placement = d.options.placement, d.orderedModifiers.forEach(function(V) {
17377
17377
  return d.modifiersData[V.name] = Object.assign({}, V.data);
@@ -17381,10 +17381,10 @@ function kk(t) {
17381
17381
  d.reset = !1, y = -1;
17382
17382
  continue;
17383
17383
  }
17384
- var S = d.orderedModifiers[y], k = S.fn, M = S.options, F = M === void 0 ? {} : M, C = S.name;
17384
+ var S = d.orderedModifiers[y], k = S.fn, M = S.options, B = M === void 0 ? {} : M, C = S.name;
17385
17385
  typeof k == "function" && (d = k({
17386
17386
  state: d,
17387
- options: F,
17387
+ options: B,
17388
17388
  name: C,
17389
17389
  instance: p
17390
17390
  }) || d);
@@ -17489,7 +17489,7 @@ function Dk(t) {
17489
17489
  function Ek(t) {
17490
17490
  return t.split("-")[0];
17491
17491
  }
17492
- function zo(t) {
17492
+ function $o(t) {
17493
17493
  return [].slice.call(t);
17494
17494
  }
17495
17495
  function Zl(t) {
@@ -17515,7 +17515,7 @@ function Ik(t) {
17515
17515
  return !!(t && t._tippy && t._tippy.reference === t);
17516
17516
  }
17517
17517
  function Rk(t) {
17518
- return Or(t) ? [t] : Nk(t) ? zo(t) : Array.isArray(t) ? t : zo(document.querySelectorAll(t));
17518
+ return Or(t) ? [t] : Nk(t) ? $o(t) : Array.isArray(t) ? t : $o(document.querySelectorAll(t));
17519
17519
  }
17520
17520
  function xi(t, e) {
17521
17521
  t.forEach(function(n) {
@@ -17765,7 +17765,7 @@ function ic(t, e) {
17765
17765
  Or(e.content) ? (xs(t, ""), t.appendChild(e.content)) : typeof e.content != "function" && (e.allowHTML ? xs(t, e.content) : t.textContent = e.content);
17766
17766
  }
17767
17767
  function Ss(t) {
17768
- var e = t.firstElementChild, n = zo(e.children);
17768
+ var e = t.firstElementChild, n = $o(e.children);
17769
17769
  return {
17770
17770
  box: e,
17771
17771
  content: n.find(function(r) {
@@ -17794,9 +17794,9 @@ function xf(t) {
17794
17794
  };
17795
17795
  }
17796
17796
  xf.$$tippy = !0;
17797
- var Yk = 1, so = [], Ci = [];
17797
+ var Yk = 1, ao = [], Ci = [];
17798
17798
  function Gk(t, e) {
17799
- var n = rc(t, Object.assign({}, Re, vf(Zl(e)))), r, o, i, s = !1, a = !1, l = !1, c = !1, d, u, f, p = [], h = Yl(Vr, n.interactiveDebounce), m, g = Yk++, b = null, w = Dk(n.plugins), x = {
17799
+ var n = rc(t, Object.assign({}, Re, vf(Zl(e)))), r, o, i, s = !1, a = !1, l = !1, c = !1, d, u, f, p = [], h = Yl(Hr, n.interactiveDebounce), m, g = Yk++, b = null, w = Dk(n.plugins), x = {
17800
17800
  // Is the instance currently enabled?
17801
17801
  isEnabled: !0,
17802
17802
  // Is the tippy currently showing and not transitioning out?
@@ -17817,14 +17817,14 @@ function Gk(t, e) {
17817
17817
  state: x,
17818
17818
  plugins: w,
17819
17819
  // methods
17820
- clearDelayTimeouts: qr,
17821
- setProps: Kr,
17822
- setContent: Xr,
17820
+ clearDelayTimeouts: Kr,
17821
+ setProps: Xr,
17822
+ setContent: Jr,
17823
17823
  show: Mf,
17824
17824
  hide: Af,
17825
17825
  hideWithInteractivity: Of,
17826
17826
  enable: Xn,
17827
- disable: Ur,
17827
+ disable: qr,
17828
17828
  unmount: Tf,
17829
17829
  destroy: Df
17830
17830
  };
@@ -17832,7 +17832,7 @@ function Gk(t, e) {
17832
17832
  return oe.env.NODE_ENV !== "production" && ks(!0, "render() function has not been supplied."), y;
17833
17833
  var S = n.render(y), k = S.popper, M = S.onUpdate;
17834
17834
  k.setAttribute("data-tippy-root", ""), k.id = "tippy-" + y.id, y.popper = k, t._tippy = y, k._tippy = y;
17835
- var F = w.map(function(v) {
17835
+ var B = w.map(function(v) {
17836
17836
  return v.fn(y);
17837
17837
  }), C = t.hasAttribute("aria-expanded");
17838
17838
  return hn(), he(), se(), Q("onCreate", [y]), n.showOnCreate && Kn(), k.addEventListener("mouseenter", function() {
@@ -17847,7 +17847,7 @@ function Gk(t, e) {
17847
17847
  function $() {
17848
17848
  return V()[0] === "hold";
17849
17849
  }
17850
- function B() {
17850
+ function z() {
17851
17851
  var v;
17852
17852
  return !!((v = y.props.render) != null && v.$$tippy);
17853
17853
  }
@@ -17868,7 +17868,7 @@ function Gk(t, e) {
17868
17868
  v === void 0 && (v = !1), k.style.pointerEvents = y.props.interactive && !v ? "" : "none", k.style.zIndex = "" + y.props.zIndex;
17869
17869
  }
17870
17870
  function Q(v, O, L) {
17871
- if (L === void 0 && (L = !0), F.forEach(function(U) {
17871
+ if (L === void 0 && (L = !0), B.forEach(function(U) {
17872
17872
  U[v] && U[v].apply(U, O);
17873
17873
  }), L) {
17874
17874
  var q;
@@ -17899,7 +17899,7 @@ function Gk(t, e) {
17899
17899
  }
17900
17900
  }
17901
17901
  function Te() {
17902
- ie().removeEventListener("mousemove", h), so = so.filter(function(v) {
17902
+ ie().removeEventListener("mousemove", h), ao = ao.filter(function(v) {
17903
17903
  return v !== h;
17904
17904
  });
17905
17905
  }
@@ -17966,13 +17966,13 @@ function Gk(t, e) {
17966
17966
  function hn() {
17967
17967
  $() && (Mt("touchstart", Wn, {
17968
17968
  passive: !0
17969
- }), Mt("touchend", Hr, {
17969
+ }), Mt("touchend", jr, {
17970
17970
  passive: !0
17971
17971
  })), Tk(y.props.trigger).forEach(function(v) {
17972
17972
  if (v !== "manual")
17973
17973
  switch (Mt(v, Wn), v) {
17974
17974
  case "mouseenter":
17975
- Mt("mouseleave", Hr);
17975
+ Mt("mouseleave", jr);
17976
17976
  break;
17977
17977
  case "focus":
17978
17978
  Mt(Vk ? "focusout" : "blur", Un);
@@ -17983,7 +17983,7 @@ function Gk(t, e) {
17983
17983
  }
17984
17984
  });
17985
17985
  }
17986
- function _r() {
17986
+ function Vr() {
17987
17987
  p.forEach(function(v) {
17988
17988
  var O = v.node, L = v.eventType, q = v.handler, U = v.options;
17989
17989
  O.removeEventListener(L, q, U);
@@ -17993,12 +17993,12 @@ function Gk(t, e) {
17993
17993
  var O, L = !1;
17994
17994
  if (!(!y.state.isEnabled || qn(v) || a)) {
17995
17995
  var q = ((O = d) == null ? void 0 : O.type) === "focus";
17996
- d = v, m = v.currentTarget, he(), !y.state.isVisible && Pk(v) && so.forEach(function(U) {
17996
+ d = v, m = v.currentTarget, he(), !y.state.isVisible && Pk(v) && ao.forEach(function(U) {
17997
17997
  return U(v);
17998
17998
  }), v.type === "click" && (y.props.trigger.indexOf("mouseenter") < 0 || s) && y.props.hideOnClick !== !1 && y.state.isVisible ? L = !0 : Kn(v), v.type === "click" && (s = !L), L && !q && qt(v);
17999
17999
  }
18000
18000
  }
18001
- function Vr(v) {
18001
+ function Hr(v) {
18002
18002
  var O = v.target, L = H().contains(O) || k.contains(O);
18003
18003
  if (!(v.type === "mousemove" && L)) {
18004
18004
  var q = At().concat(k).map(function(U) {
@@ -18012,7 +18012,7 @@ function Gk(t, e) {
18012
18012
  Fk(q, v) && (Te(), qt(v));
18013
18013
  }
18014
18014
  }
18015
- function Hr(v) {
18015
+ function jr(v) {
18016
18016
  var O = qn(v) || y.props.trigger.indexOf("click") >= 0 && s;
18017
18017
  if (!O) {
18018
18018
  if (y.props.interactive) {
@@ -18028,9 +18028,9 @@ function Gk(t, e) {
18028
18028
  function qn(v) {
18029
18029
  return rt.isTouch ? $() !== v.type.indexOf("touch") >= 0 : !1;
18030
18030
  }
18031
- function jr() {
18032
- Wr();
18033
- var v = y.props, O = v.popperOptions, L = v.placement, q = v.offset, U = v.getReferenceClientRect, xe = v.moveTransition, ze = B() ? Ss(k).arrow : null, mn = U ? {
18031
+ function Wr() {
18032
+ Ur();
18033
+ var v = y.props, O = v.popperOptions, L = v.placement, q = v.offset, U = v.getReferenceClientRect, xe = v.moveTransition, ze = z() ? Ss(k).arrow : null, mn = U ? {
18034
18034
  getBoundingClientRect: U,
18035
18035
  contextElement: U.contextElement || H()
18036
18036
  } : t, sa = {
@@ -18038,12 +18038,12 @@ function Gk(t, e) {
18038
18038
  enabled: !0,
18039
18039
  phase: "beforeWrite",
18040
18040
  requires: ["computeStyles"],
18041
- fn: function(Jr) {
18042
- var gn = Jr.state;
18043
- if (B()) {
18041
+ fn: function(Yr) {
18042
+ var gn = Yr.state;
18043
+ if (z()) {
18044
18044
  var Ef = ae(), Go = Ef.box;
18045
- ["placement", "reference-hidden", "escaped"].forEach(function(Yr) {
18046
- Yr === "placement" ? Go.setAttribute("data-placement", gn.placement) : gn.attributes.popper["data-popper-" + Yr] ? Go.setAttribute("data-" + Yr, "") : Go.removeAttribute("data-" + Yr);
18045
+ ["placement", "reference-hidden", "escaped"].forEach(function(Gr) {
18046
+ Gr === "placement" ? Go.setAttribute("data-placement", gn.placement) : gn.attributes.popper["data-popper-" + Gr] ? Go.setAttribute("data-" + Gr, "") : Go.removeAttribute("data-" + Gr);
18047
18047
  }), gn.attributes.popper = {};
18048
18048
  }
18049
18049
  }
@@ -18073,7 +18073,7 @@ function Gk(t, e) {
18073
18073
  adaptive: !xe
18074
18074
  }
18075
18075
  }, sa];
18076
- B() && ze && Kt.push({
18076
+ z() && ze && Kt.push({
18077
18077
  name: "arrow",
18078
18078
  options: {
18079
18079
  element: ze,
@@ -18085,12 +18085,12 @@ function Gk(t, e) {
18085
18085
  modifiers: Kt
18086
18086
  }));
18087
18087
  }
18088
- function Wr() {
18088
+ function Ur() {
18089
18089
  y.popperInstance && (y.popperInstance.destroy(), y.popperInstance = null);
18090
18090
  }
18091
18091
  function ut() {
18092
18092
  var v = y.props.appendTo, O, L = H();
18093
- y.props.interactive && v === mf || v === "parent" ? O = L.parentNode : O = gf(v, [L]), O.contains(k) || O.appendChild(k), y.state.isMounted = !0, jr(), oe.env.NODE_ENV !== "production" && gt(y.props.interactive && v === Re.appendTo && L.nextElementSibling !== k, ["Interactive tippy element may not be accessible via keyboard", "navigation because it is not directly after the reference element", "in the DOM source order.", `
18093
+ y.props.interactive && v === mf || v === "parent" ? O = L.parentNode : O = gf(v, [L]), O.contains(k) || O.appendChild(k), y.state.isMounted = !0, Wr(), oe.env.NODE_ENV !== "production" && gt(y.props.interactive && v === Re.appendTo && L.nextElementSibling !== k, ["Interactive tippy element may not be accessible via keyboard", "navigation because it is not directly after the reference element", "in the DOM source order.", `
18094
18094
 
18095
18095
  `, "Using a wrapper <div> or <span> tag around the reference element", "solves this by creating a new parentNode context.", `
18096
18096
 
@@ -18099,7 +18099,7 @@ function Gk(t, e) {
18099
18099
  `, "See: https://atomiks.github.io/tippyjs/v6/accessibility/#interactivity"].join(" "));
18100
18100
  }
18101
18101
  function At() {
18102
- return zo(k.querySelectorAll("[data-tippy-root]"));
18102
+ return $o(k.querySelectorAll("[data-tippy-root]"));
18103
18103
  }
18104
18104
  function Kn(v) {
18105
18105
  y.clearDelayTimeouts(), v && Q("onTrigger", [y, v]), Pe();
@@ -18125,26 +18125,26 @@ function Gk(t, e) {
18125
18125
  function Xn() {
18126
18126
  y.state.isEnabled = !0;
18127
18127
  }
18128
- function Ur() {
18128
+ function qr() {
18129
18129
  y.hide(), y.state.isEnabled = !1;
18130
18130
  }
18131
- function qr() {
18131
+ function Kr() {
18132
18132
  clearTimeout(r), clearTimeout(o), cancelAnimationFrame(i);
18133
18133
  }
18134
- function Kr(v) {
18134
+ function Xr(v) {
18135
18135
  if (oe.env.NODE_ENV !== "production" && gt(y.state.isDestroyed, kn("setProps")), !y.state.isDestroyed) {
18136
- Q("onBeforeUpdate", [y, v]), _r();
18136
+ Q("onBeforeUpdate", [y, v]), Vr();
18137
18137
  var O = y.props, L = rc(t, Object.assign({}, O, Zl(v), {
18138
18138
  ignoreAttributes: !0
18139
18139
  }));
18140
- y.props = L, hn(), O.interactiveDebounce !== L.interactiveDebounce && (Te(), h = Yl(Vr, L.interactiveDebounce)), O.triggerTarget && !L.triggerTarget ? Mn(O.triggerTarget).forEach(function(q) {
18140
+ y.props = L, hn(), O.interactiveDebounce !== L.interactiveDebounce && (Te(), h = Yl(Hr, L.interactiveDebounce)), O.triggerTarget && !L.triggerTarget ? Mn(O.triggerTarget).forEach(function(q) {
18141
18141
  q.removeAttribute("aria-expanded");
18142
- }) : L.triggerTarget && t.removeAttribute("aria-expanded"), he(), se(), M && M(O, L), y.popperInstance && (jr(), At().forEach(function(q) {
18142
+ }) : L.triggerTarget && t.removeAttribute("aria-expanded"), he(), se(), M && M(O, L), y.popperInstance && (Wr(), At().forEach(function(q) {
18143
18143
  requestAnimationFrame(q._tippy.popperInstance.forceUpdate);
18144
18144
  })), Q("onAfterUpdate", [y, v]);
18145
18145
  }
18146
18146
  }
18147
- function Xr(v) {
18147
+ function Jr(v) {
18148
18148
  y.setProps({
18149
18149
  content: v
18150
18150
  });
@@ -18153,18 +18153,18 @@ function Gk(t, e) {
18153
18153
  oe.env.NODE_ENV !== "production" && gt(y.state.isDestroyed, kn("show"));
18154
18154
  var v = y.state.isVisible, O = y.state.isDestroyed, L = !y.state.isEnabled, q = rt.isTouch && !y.props.touch, U = ki(y.props.duration, 0, Re.duration);
18155
18155
  if (!(v || O || L || q) && !H().hasAttribute("disabled") && (Q("onShow", [y], !1), y.props.onShow(y) !== !1)) {
18156
- if (y.state.isVisible = !0, B() && (k.style.visibility = "visible"), se(), Pe(), y.state.isMounted || (k.style.transition = "none"), B()) {
18156
+ if (y.state.isVisible = !0, z() && (k.style.visibility = "visible"), se(), Pe(), y.state.isMounted || (k.style.transition = "none"), z()) {
18157
18157
  var xe = ae(), ze = xe.box, mn = xe.content;
18158
18158
  xi([ze, mn], 0);
18159
18159
  }
18160
18160
  f = function() {
18161
18161
  var Kt;
18162
18162
  if (!(!y.state.isVisible || c)) {
18163
- if (c = !0, k.offsetHeight, k.style.transition = y.props.moveTransition, B() && y.props.animation) {
18164
- var Yo = ae(), Jr = Yo.box, gn = Yo.content;
18165
- xi([Jr, gn], U), Ql([Jr, gn], "visible");
18163
+ if (c = !0, k.offsetHeight, k.style.transition = y.props.moveTransition, z() && y.props.animation) {
18164
+ var Yo = ae(), Yr = Yo.box, gn = Yo.content;
18165
+ xi([Yr, gn], U), Ql([Yr, gn], "visible");
18166
18166
  }
18167
- pe(), he(), Gl(Ci, y), (Kt = y.popperInstance) == null || Kt.forceUpdate(), Q("onMount", [y]), y.props.animation && B() && Je(U, function() {
18167
+ pe(), he(), Gl(Ci, y), (Kt = y.popperInstance) == null || Kt.forceUpdate(), Q("onMount", [y]), y.props.animation && z() && Je(U, function() {
18168
18168
  y.state.isShown = !0, Q("onShown", [y]);
18169
18169
  });
18170
18170
  }
@@ -18175,28 +18175,28 @@ function Gk(t, e) {
18175
18175
  oe.env.NODE_ENV !== "production" && gt(y.state.isDestroyed, kn("hide"));
18176
18176
  var v = !y.state.isVisible, O = y.state.isDestroyed, L = !y.state.isEnabled, q = ki(y.props.duration, 1, Re.duration);
18177
18177
  if (!(v || O || L) && (Q("onHide", [y], !1), y.props.onHide(y) !== !1)) {
18178
- if (y.state.isVisible = !1, y.state.isShown = !1, c = !1, s = !1, B() && (k.style.visibility = "hidden"), Te(), Xe(), se(!0), B()) {
18178
+ if (y.state.isVisible = !1, y.state.isShown = !1, c = !1, s = !1, z() && (k.style.visibility = "hidden"), Te(), Xe(), se(!0), z()) {
18179
18179
  var U = ae(), xe = U.box, ze = U.content;
18180
18180
  y.props.animation && (xi([xe, ze], q), Ql([xe, ze], "hidden"));
18181
18181
  }
18182
- pe(), he(), y.props.animation ? B() && Ct(q, y.unmount) : y.unmount();
18182
+ pe(), he(), y.props.animation ? z() && Ct(q, y.unmount) : y.unmount();
18183
18183
  }
18184
18184
  }
18185
18185
  function Of(v) {
18186
- oe.env.NODE_ENV !== "production" && gt(y.state.isDestroyed, kn("hideWithInteractivity")), ie().addEventListener("mousemove", h), Gl(so, h), h(v);
18186
+ oe.env.NODE_ENV !== "production" && gt(y.state.isDestroyed, kn("hideWithInteractivity")), ie().addEventListener("mousemove", h), Gl(ao, h), h(v);
18187
18187
  }
18188
18188
  function Tf() {
18189
- oe.env.NODE_ENV !== "production" && gt(y.state.isDestroyed, kn("unmount")), y.state.isVisible && y.hide(), y.state.isMounted && (Wr(), At().forEach(function(v) {
18189
+ oe.env.NODE_ENV !== "production" && gt(y.state.isDestroyed, kn("unmount")), y.state.isVisible && y.hide(), y.state.isMounted && (Ur(), At().forEach(function(v) {
18190
18190
  v._tippy.unmount();
18191
18191
  }), k.parentNode && k.parentNode.removeChild(k), Ci = Ci.filter(function(v) {
18192
18192
  return v !== y;
18193
18193
  }), y.state.isMounted = !1, Q("onHidden", [y]));
18194
18194
  }
18195
18195
  function Df() {
18196
- oe.env.NODE_ENV !== "production" && gt(y.state.isDestroyed, kn("destroy")), !y.state.isDestroyed && (y.clearDelayTimeouts(), y.unmount(), _r(), delete t._tippy, y.state.isDestroyed = !0, Q("onDestroy", [y]));
18196
+ oe.env.NODE_ENV !== "production" && gt(y.state.isDestroyed, kn("destroy")), !y.state.isDestroyed && (y.clearDelayTimeouts(), y.unmount(), Vr(), delete t._tippy, y.state.isDestroyed = !0, Q("onDestroy", [y]));
18197
18197
  }
18198
18198
  }
18199
- function $r(t, e) {
18199
+ function _r(t, e) {
18200
18200
  e === void 0 && (e = {});
18201
18201
  var n = Re.plugins.concat(e.plugins || []);
18202
18202
  oe.env.NODE_ENV !== "production" && (Wk(t), kf(e, n)), $k();
@@ -18218,9 +18218,9 @@ function $r(t, e) {
18218
18218
  }, []);
18219
18219
  return Or(t) ? a[0] : a;
18220
18220
  }
18221
- $r.defaultProps = Re;
18222
- $r.setDefaultProps = Kk;
18223
- $r.currentInput = rt;
18221
+ _r.defaultProps = Re;
18222
+ _r.setDefaultProps = Kk;
18223
+ _r.currentInput = rt;
18224
18224
  Object.assign({}, rf, {
18225
18225
  effect: function(e) {
18226
18226
  var n = e.state, r = {
@@ -18238,7 +18238,7 @@ Object.assign({}, rf, {
18238
18238
  Object.assign(n.elements.popper.style, r.popper), n.styles = r, n.elements.arrow && Object.assign(n.elements.arrow.style, r.arrow);
18239
18239
  }
18240
18240
  });
18241
- $r.setDefaultProps({
18241
+ _r.setDefaultProps({
18242
18242
  render: xf
18243
18243
  });
18244
18244
  const Zk = (t, e) => {
@@ -18307,10 +18307,10 @@ const Zk = (t, e) => {
18307
18307
  ], 42, Qk))), 128))
18308
18308
  ], 544));
18309
18309
  }
18310
- }, ix = /* @__PURE__ */ Zk(ox, [["__scopeId", "data-v-0a2a8b4e"]]), sc = new J("popoverPlugin"), sx = Z.create({
18310
+ }, ix = /* @__PURE__ */ Zk(ox, [["__scopeId", "data-v-0a2a8b4e"]]), sc = new K("popoverPlugin"), sx = Z.create({
18311
18311
  name: "popoverPlugin",
18312
18312
  addPmPlugins() {
18313
- return [new Y({
18313
+ return [new X({
18314
18314
  key: sc,
18315
18315
  state: {
18316
18316
  init: () => ({}),
@@ -18339,7 +18339,7 @@ class ax {
18339
18339
  const n = e.key === "ArrowDown" || e.key === "ArrowUp";
18340
18340
  this.tippyInstance.state.isVisible && n && (e.preventDefault(), this.popover.firstChild.focus());
18341
18341
  });
18342
- this.editor = n, this.view = e, this.popover = document.createElement("div"), this.popover.className = "sd-editor-popover", document.body.appendChild(this.popover), this.tippyInstance = $r(this.popover, {
18342
+ this.editor = n, this.view = e, this.popover = document.createElement("div"), this.popover.className = "sd-editor-popover", document.body.appendChild(this.popover), this.tippyInstance = _r(this.popover, {
18343
18343
  trigger: "manual",
18344
18344
  placement: "bottom-start",
18345
18345
  interactive: !0,
@@ -18438,7 +18438,7 @@ const lx = !1, cx = Z.create({
18438
18438
  addPmPlugins() {
18439
18439
  const t = this.editor;
18440
18440
  let e = !1, n = !1, r = !1, o = !1;
18441
- return [new Y({
18441
+ return [new X({
18442
18442
  key: _t,
18443
18443
  state: {
18444
18444
  isReadyToInit: !1,
@@ -18452,7 +18452,7 @@ const lx = !1, cx = Z.create({
18452
18452
  apply(s, a, l, c) {
18453
18453
  const d = s.getMeta(_t);
18454
18454
  d && d.isReadyToInit && (n = !0, o = d.isReadyToInit);
18455
- const u = s.getMeta(Fo);
18455
+ const u = s.getMeta(Bo);
18456
18456
  if (u) {
18457
18457
  if (u.type === "remove") {
18458
18458
  const h = u.pos, m = t.view.domAtPos(h).node.querySelector("img");
@@ -18507,7 +18507,7 @@ const lx = !1, cx = Z.create({
18507
18507
  const s = i.even, a = i.odd, l = i.first, c = i.default;
18508
18508
  if (i?.titlePg && l && t === 1) return l;
18509
18509
  let d = i.default;
18510
- return t === 1 && (d = l || c), o && (t === 1 && (d = l), t % 2 === 0 ? d = s || c : d = a || c), d;
18510
+ return t === 1 && (d = c), o && (t === 1 && (d = l), t % 2 === 0 ? d = s || c : d = a || c), d;
18511
18511
  }, dx = (t, e, n) => {
18512
18512
  const r = t.storage.pagination.sectionData, o = ux(e, t, r);
18513
18513
  if (!n.eq(o)) {
@@ -18522,7 +18522,7 @@ const lx = !1, cx = Z.create({
18522
18522
  if (!e.converter) return P.empty;
18523
18523
  const r = e.converter.pageStyles?.pageSize, { width: o, height: i } = r;
18524
18524
  if (!o || !i) return P.empty;
18525
- const s = [zb, _t], { state: a } = t, l = uo.create({
18525
+ const s = [zb, _t], { state: a } = t, l = fo.create({
18526
18526
  schema: a.schema,
18527
18527
  doc: a.doc,
18528
18528
  plugins: a.plugins.filter((h) => s.includes(h.key))
@@ -18544,57 +18544,57 @@ function fx(t, e, n, r) {
18544
18544
  const o = [], { pageSize: i, pageMargins: s } = n.converter.pageStyles, a = i.height * 96;
18545
18545
  n.options.scale;
18546
18546
  let l = 1, c = a, d = null, u = null;
18547
- const f = Yt(l, "headerIds", n), p = ao(s, i, r, f), h = lo({ editor: n, header: p, isFirstHeader: !0 });
18548
- o.push(z.widget(0, h, { key: "stable-key" }));
18547
+ const f = Yt(l, "headerIds", n), p = lo(s, i, r, f), h = co({ editor: n, header: p, isFirstHeader: !0 });
18548
+ o.push(F.widget(0, h, { key: "stable-key" }));
18549
18549
  const m = Yt(l, "footerIds", n), g = Mi(s, i, r, m);
18550
18550
  c -= p.headerHeight + g.footerHeight;
18551
18551
  let b = e?.coordsAtPos(t.content.size);
18552
18552
  if (!b) return [];
18553
18553
  t.descendants((V, $) => {
18554
- let B = V, H = $;
18554
+ let z = V, H = $;
18555
18555
  if (b = e?.coordsAtPos(H), !b) return;
18556
- let ie = b.bottom > c, ae = B.type.name === "hardBreak";
18557
- if (B.attrs?.pageBreakSource === "sectPr" && (t.nodeAt(H + B.nodeSize)?.attrs?.pageBreakSource === "sectPr" || (ae = !0), l === 1)) {
18558
- const pe = Yt(l, "headerIds", n, B);
18556
+ let ie = b.bottom > c, ae = z.type.name === "hardBreak";
18557
+ if (z.attrs?.pageBreakSource === "sectPr" && (t.nodeAt(H + z.nodeSize)?.attrs?.pageBreakSource === "sectPr" || (ae = !0), l === 1)) {
18558
+ const pe = Yt(l, "headerIds", n, z);
18559
18559
  o.pop();
18560
- const he = ao(s, i, r, pe), Te = lo({ editor: n, header: he, isFirstHeader: !0 });
18561
- o.push(z.widget(0, Te, { key: "stable-key" }));
18560
+ const he = lo(s, i, r, pe), Te = co({ editor: n, header: he, isFirstHeader: !0 });
18561
+ o.push(F.widget(0, Te, { key: "stable-key" }));
18562
18562
  }
18563
- if (B.type.name === "paragraph" && B.attrs.styleId) {
18564
- const Q = go.getState(n.state)?.styles?.find((pe) => pe.id === B.attrs.styleId);
18563
+ if (z.type.name === "paragraph" && z.attrs.styleId) {
18564
+ const Q = yo.getState(n.state)?.styles?.find((pe) => pe.id === z.attrs.styleId);
18565
18565
  if (Q) {
18566
18566
  const { definition: pe = {} } = Q, { pageBreakBefore: he, pageBreakAfter: Te } = pe.attrs || {};
18567
18567
  (he || Te) && (ie = !0);
18568
18568
  }
18569
18569
  }
18570
18570
  if (ae || ie) {
18571
- const se = e.state.doc.resolve(H), Q = Fr(se, (Je) => Je.type.name === "tableRow");
18572
- Q && (B = Q.node, H = Q.pos);
18571
+ const se = e.state.doc.resolve(H), Q = Br(se, (Je) => Je.type.name === "tableRow");
18572
+ Q && (z = Q.node, H = Q.pos);
18573
18573
  const {
18574
18574
  top: pe,
18575
18575
  bottom: he,
18576
18576
  pos: Te
18577
- } = px(e, H, c), Be = Yt(l, "footerIds", n, B);
18577
+ } = px(e, H, c), Be = Yt(l, "footerIds", n, z);
18578
18578
  l++;
18579
18579
  const dt = Yt(l, "headerIds", n);
18580
- u = ao(s, i, r, dt), d = Mi(s, i, r, Be, l - 1);
18581
- const Ke = c - he, { node: Pe } = ac(Ke), Xe = z.widget(Te, Pe, { key: "stable-key" });
18580
+ u = lo(s, i, r, dt), d = Mi(s, i, r, Be, l - 1);
18581
+ const Ke = c - he, { node: Pe } = ac(Ke), Xe = F.widget(Te, Pe, { key: "stable-key" });
18582
18582
  o.push(Xe);
18583
- const Ct = lo({ editor: n, header: u, footer: d });
18584
- o.push(z.widget(Te, Ct, { key: "stable-key" })), c = he + (a - u.headerHeight - d.footerHeight);
18583
+ const Ct = co({ editor: n, header: u, footer: d });
18584
+ o.push(F.widget(Te, Ct, { key: "stable-key" })), c = he + (a - u.headerHeight - d.footerHeight);
18585
18585
  }
18586
18586
  });
18587
18587
  let w = t.content.size;
18588
18588
  const x = e.coordsAtPos(w), y = Yt(l, "headerIds", n), S = Yt(l, "footerIds", n);
18589
- u = ao(s, i, r, y), d = Mi(s, i, r, S, l);
18590
- const k = c - x.bottom, { node: M } = ac(k), F = z.widget(t.content.size, M, { key: "stable-key" });
18591
- o.push(F);
18592
- const C = lo({ editor: n, footer: d, isLastFooter: !0 });
18593
- return o.push(z.widget(t.content.size, C, { key: "stable-key" })), o.forEach((V) => {
18594
- const B = V.type.toDOM?.querySelector('span[data-id="auto-total-pages"]');
18595
- if (B) {
18596
- const H = B.previousElementSibling?.style?.fontSize || B.nextElementSibling?.style?.fontSize;
18597
- H && (B.style.fontSize = H), B.innerText = l;
18589
+ u = lo(s, i, r, y), d = Mi(s, i, r, S, l);
18590
+ const k = c - x.bottom, { node: M } = ac(k), B = F.widget(t.content.size, M, { key: "stable-key" });
18591
+ o.push(B);
18592
+ const C = co({ editor: n, footer: d, isLastFooter: !0 });
18593
+ return o.push(F.widget(t.content.size, C, { key: "stable-key" })), o.forEach((V) => {
18594
+ const z = V.type.toDOM?.querySelector('span[data-id="auto-total-pages"]');
18595
+ if (z) {
18596
+ const H = z.previousElementSibling?.style?.fontSize || z.nextElementSibling?.style?.fontSize;
18597
+ H && (z.style.fontSize = H), z.innerText = l;
18598
18598
  }
18599
18599
  }), o;
18600
18600
  }
@@ -18602,7 +18602,7 @@ function ac(t) {
18602
18602
  const e = document.createElement("div");
18603
18603
  return e.className = "pagination-page-spacer", e.style.userSelect = "none", e.style.pointerEvents = "none", e.style.height = t + "px", { nodeHeight: t, node: e };
18604
18604
  }
18605
- function ao(t, e, n, r) {
18605
+ function lo(t, e, n, r) {
18606
18606
  const o = n.headers?.[r], i = t.top * 96, s = t.header * 96, l = o?.height > i - s ? s : 0, c = Math.max(o?.height || 0, i) + l;
18607
18607
  let d = o?.sectionContainer?.cloneNode(!0);
18608
18608
  return d || (d = document.createElement("div")), d.className = "pagination-section-header", d.style.paddingTop = s + "px", d.style.paddingLeft = t.left * 96 + "px", d.style.paddingRight = t.right * 96 + "px", d.style.height = c + "px", d.style.width = e.width * 96 + "px", {
@@ -18624,7 +18624,7 @@ function Mi(t, e, n, r, o) {
18624
18624
  footerHeight: l + a
18625
18625
  };
18626
18626
  }
18627
- function lo({ editor: t, header: e, footer: n, footerBottom: r = null, isFirstHeader: o, isLastFooter: i }) {
18627
+ function co({ editor: t, header: e, footer: n, footerBottom: r = null, isFirstHeader: o, isLastFooter: i }) {
18628
18628
  const { pageSize: s, pageMargins: a } = t.converter.pageStyles;
18629
18629
  let l = 0;
18630
18630
  const c = document.createElement("div");
@@ -18877,13 +18877,13 @@ function Oi(t, e, n) {
18877
18877
  if (!a)
18878
18878
  break;
18879
18879
  let l = a.from == o.from && a.to == o.to ? "ProseMirror-active-search-match" : "ProseMirror-search-match";
18880
- r.push(z.inline(a.from, a.to, { class: l })), i = a.to;
18880
+ r.push(F.inline(a.from, a.to, { class: l })), i = a.to;
18881
18881
  }
18882
18882
  return P.create(t.doc, r);
18883
18883
  }
18884
- const dr = new J("search");
18884
+ const dr = new K("search");
18885
18885
  function vx(t = {}) {
18886
- return new Y({
18886
+ return new X({
18887
18887
  key: dr,
18888
18888
  state: {
18889
18889
  init(e, n) {
@@ -18918,8 +18918,29 @@ function kx(t, e, n = null) {
18918
18918
  return t.setMeta(dr, { query: e, range: n });
18919
18919
  }
18920
18920
  const xx = Z.create({
18921
+ addStorage() {
18922
+ return {
18923
+ searchResults: []
18924
+ };
18925
+ },
18921
18926
  addPmPlugins() {
18922
- return [vx()];
18927
+ const t = this.editor, e = this.storage, n = new X({
18928
+ key: new K("customSearchHighlights"),
18929
+ props: {
18930
+ decorations(r) {
18931
+ if (!t) return null;
18932
+ const o = e?.searchResults;
18933
+ if (!o?.length) return null;
18934
+ const i = o.map(
18935
+ (s, a) => F.inline(s.from, s.to, {
18936
+ id: `search-match-${s.id}`
18937
+ })
18938
+ );
18939
+ return P.create(r.doc, i);
18940
+ }
18941
+ }
18942
+ });
18943
+ return [vx(), n];
18923
18944
  },
18924
18945
  addCommands() {
18925
18946
  return {
@@ -18929,29 +18950,30 @@ const xx = Z.create({
18929
18950
  const o = r.children.find((s) => s.local), i = r.children[0] + o.local[0].from + 1;
18930
18951
  e.view.domAtPos(i)?.node?.scrollIntoView(!0);
18931
18952
  },
18932
- search: (t) => ({ state: e, dispatch: n }) => {
18933
- let r, o = !1, i = !1;
18934
- const s = !1;
18953
+ search: (t) => ({ state: e, editor: n, dispatch: r }) => {
18954
+ let o, i = !1, s = !1;
18955
+ const a = !1;
18935
18956
  if (t instanceof RegExp)
18936
- i = !0, r = t.source, o = !t.flags.includes("i");
18957
+ s = !0, o = t.source, i = !t.flags.includes("i");
18937
18958
  else if (typeof t == "string" && /^\/(.+)\/([gimsuy]*)$/.test(t)) {
18938
- const [, f, p] = t.match(/^\/(.+)\/([gimsuy]*)$/);
18939
- i = !0, r = f, o = !p.includes("i");
18959
+ const [, h, m] = t.match(/^\/(.+)\/([gimsuy]*)$/);
18960
+ s = !0, o = h, i = !m.includes("i");
18940
18961
  } else
18941
- r = String(t);
18942
- const a = new Sf({
18943
- search: r,
18944
- caseSensitive: o,
18945
- regexp: i,
18946
- wholeWord: s
18947
- }), l = kx(e.tr, a);
18948
- n(l);
18949
- const c = e.apply(l), d = uc(c);
18950
- return (d ? d.find() : []).map((f) => ({
18951
- from: f.from,
18952
- to: f.to,
18953
- text: c.doc.textBetween(f.from, f.to)
18962
+ o = String(t);
18963
+ const l = new Sf({
18964
+ search: o,
18965
+ caseSensitive: i,
18966
+ regexp: s,
18967
+ wholeWord: a
18968
+ }), c = kx(e.tr, l);
18969
+ r(c);
18970
+ const d = e.apply(c), u = uc(d), p = (u ? u.find() : []).map((h) => ({
18971
+ from: h.from,
18972
+ to: h.to,
18973
+ text: d.doc.textBetween(h.from, h.to),
18974
+ id: Pr()
18954
18975
  }));
18976
+ return this.storage.searchResults = p, p;
18955
18977
  },
18956
18978
  goToSearchResult: (t) => ({ state: e, dispatch: n, editor: r }) => {
18957
18979
  const { from: o, to: i } = t;
@@ -19065,9 +19087,9 @@ export {
19065
19087
  E as A,
19066
19088
  ge as C,
19067
19089
  Qi as E,
19068
- Fo as I,
19090
+ Bo as I,
19069
19091
  Oe as M,
19070
- K as N,
19092
+ J as N,
19071
19093
  bv as P,
19072
19094
  ce as T,
19073
19095
  Zk as _,