@harbour-enterprises/superdoc 0.10.23 → 0.10.24-RC1

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 (32) hide show
  1. package/dist/chunks/{super-editor.es-PmZ_vC_x.es.js → super-editor.es-C7FklFR7.es.js} +1210 -1153
  2. package/dist/chunks/{super-editor.es-CXLaCRCo.cjs → super-editor.es-LVnq3DMw.cjs} +3 -3
  3. package/dist/super-editor/ai-writer.es.js +1 -1
  4. package/dist/super-editor/chunks/{converter-GjUq7j91.js → converter-J9ViHxhj.js} +781 -728
  5. package/dist/super-editor/chunks/{docx-zipper-Dsr0bWUJ.js → docx-zipper-C1kMsjg4.js} +1 -1
  6. package/dist/super-editor/chunks/{editor-BKwduR0i.js → editor-DwlgXynb.js} +234 -229
  7. package/dist/super-editor/chunks/{toolbar-BWzCKGqH.js → toolbar-Dtt8NSGy.js} +2 -2
  8. package/dist/super-editor/converter.es.js +1 -1
  9. package/dist/super-editor/core/Editor.d.ts.map +1 -1
  10. package/dist/super-editor/core/ExtensionService.d.ts.map +1 -1
  11. package/dist/super-editor/core/Mark.d.ts +1 -0
  12. package/dist/super-editor/core/Mark.d.ts.map +1 -1
  13. package/dist/super-editor/core/super-converter/SuperConverter.d.ts +3 -2
  14. package/dist/super-editor/core/super-converter/SuperConverter.d.ts.map +1 -1
  15. package/dist/super-editor/core/super-converter/exporter.d.ts.map +1 -1
  16. package/dist/super-editor/core/super-converter/v2/importer/bookmarkNodeImporter.d.ts.map +1 -1
  17. package/dist/super-editor/core/super-converter/v2/importer/runNodeImporter.d.ts.map +1 -1
  18. package/dist/super-editor/docx-zipper.es.js +2 -2
  19. package/dist/super-editor/editor.es.js +3 -3
  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/tests/e2e/test-app/dist/assets/index-BTMvkUyI.d.ts +3 -0
  23. package/dist/super-editor/tests/e2e/test-app/dist/assets/index-BTMvkUyI.d.ts.map +1 -0
  24. package/dist/super-editor/tests/e2e/test-app/vite.config.d.ts +1 -1
  25. package/dist/super-editor/toolbar.es.js +2 -2
  26. package/dist/super-editor.cjs +1 -1
  27. package/dist/super-editor.es.js +1 -1
  28. package/dist/superdoc.cjs +2 -2
  29. package/dist/superdoc.es.js +3 -3
  30. package/dist/superdoc.umd.js +1346 -1288
  31. package/dist/superdoc.umd.js.map +1 -1
  32. package/package.json +1 -1
@@ -7,9 +7,9 @@ var I = (t, e, n) => yf(t, typeof e != "symbol" ? e + "" : e, n), Wo = (t, e, n)
7
7
  var Ge = (t, e, n) => (Wo(t, e, "read from private field"), n ? n.call(t) : e.get(t)), ft = (t, e, n) => e.has(t) ? ta("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, n), Uo = (t, e, n, r) => (Wo(t, e, "write to private field"), r ? r.call(t, n) : e.set(t, n), n), N = (t, e, n) => (Wo(t, e, "access private method"), n);
8
8
  import * as T from "yjs";
9
9
  import { UndoManager as bf, Item as wf, ContentType as vf, Text as kf, XmlElement as Cf } from "yjs";
10
- import { P as G, a as Z, M as dr, c as K, N as B, S as Y, T as H, b as W, D as Vn, F as P, d as tn, e as Mf, f as ec, A as Or, p as ie, B as Sf, i as xf, g as tc, h as Af, j as wt, l as Tr, k as Ht, m as nc, r as rc, R as an, o as ur, n as na, q as $t, s as vi, t as oc, u as Of, v as Tf, w as ue, x as $e, y as Eo, z as Cn, C as ho, E as Df, G as Me, H as ro, I as ic, J as Mn, K as qo, L as Ko, O as Xo, Q as oo, U as Rt, V as ws, W as Nf, X as ra, Y as oa, Z as Ef, _ as Pf, $ as If } from "./converter-GjUq7j91.js";
10
+ import { P as G, a as Z, M as dr, c as K, N as B, S as Y, T as H, b as W, D as Vn, F as P, d as tn, e as Mf, f as ec, A as Or, p as ie, B as xf, i as Sf, g as tc, h as Af, j as wt, l as Tr, k as Ht, m as nc, r as rc, R as an, o as ur, n as na, q as $t, s as vi, t as oc, u as Of, v as Tf, w as ue, x as $e, y as Eo, z as Cn, C as ho, E as Df, G as Me, H as ro, I as ic, J as Mn, K as qo, L as Ko, O as Xo, Q as oo, U as Rt, V as ws, W as Nf, X as ra, Y as oa, Z as Ef, _ as Pf, $ as If } from "./converter-J9ViHxhj.js";
11
11
  import { ref as ia, computed as Rf, createElementBlock as Kt, openBlock as Xt, withModifiers as Jo, Fragment as Lf, renderList as Ff, normalizeClass as Bf, createCommentVNode as sa, toDisplayString as Yo, createElementVNode as zf, createApp as _f } from "vue";
12
- import { D as aa } from "./docx-zipper-Dsr0bWUJ.js";
12
+ import { D as aa } from "./docx-zipper-C1kMsjg4.js";
13
13
  function Po(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) => {
@@ -584,7 +584,7 @@ function op(t, e, n) {
584
584
  }
585
585
  const ot = typeof navigator < "u" ? navigator : null, fa = typeof document < "u" ? document : null, jt = ot && ot.userAgent || "", Ci = /Edge\/(\d+)/.exec(jt), dc = /MSIE \d/.exec(jt), Mi = /Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(jt), Te = !!(dc || Mi || Ci), Lt = dc ? document.documentMode : Mi ? +Mi[1] : Ci ? +Ci[1] : 0, Je = !Te && /gecko\/(\d+)/i.test(jt);
586
586
  Je && +(/Firefox\/(\d+)/.exec(jt) || [0, 0])[1];
587
- const Si = !Te && /Chrome\/(\d+)/.exec(jt), be = !!Si, uc = Si ? +Si[1] : 0, Se = !Te && !!ot && /Apple Computer/.test(ot.vendor), Nn = Se && (/Mobile\/\w+/.test(jt) || !!ot && ot.maxTouchPoints > 2), ze = Nn || (ot ? /Mac/.test(ot.platform) : !1), ip = ot ? /Win/.test(ot.platform) : !1, bt = /Android \d/.test(jt), Nr = !!fa && "webkitFontSmoothing" in fa.documentElement.style, sp = Nr ? +(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent) || [0, 0])[1] : 0;
587
+ const xi = !Te && /Chrome\/(\d+)/.exec(jt), be = !!xi, uc = xi ? +xi[1] : 0, xe = !Te && !!ot && /Apple Computer/.test(ot.vendor), Nn = xe && (/Mobile\/\w+/.test(jt) || !!ot && ot.maxTouchPoints > 2), ze = Nn || (ot ? /Mac/.test(ot.platform) : !1), ip = ot ? /Win/.test(ot.platform) : !1, bt = /Android \d/.test(jt), Nr = !!fa && "webkitFontSmoothing" in fa.documentElement.style, sp = Nr ? +(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent) || [0, 0])[1] : 0;
588
588
  function ap(t) {
589
589
  let e = t.defaultView && t.defaultView.visualViewport;
590
590
  return e ? {
@@ -770,7 +770,7 @@ function gp(t, e) {
770
770
  if (!vs(e, c) || (s = mc(t.dom, e, c), !s))
771
771
  return null;
772
772
  }
773
- if (Se)
773
+ if (xe)
774
774
  for (let c = s; r && c; c = Dn(c))
775
775
  c.draggable && (r = void 0);
776
776
  if (s = pp(s, e), r) {
@@ -1178,7 +1178,7 @@ class Er {
1178
1178
  h = g;
1179
1179
  }
1180
1180
  let a = this.domFromPos(e, e ? -1 : 1), l = n == e ? a : this.domFromPos(n, n ? -1 : 1), c = r.root.getSelection(), d = r.domSelectionRange(), u = !1;
1181
- if ((Je || Se) && e == n) {
1181
+ if ((Je || xe) && e == n) {
1182
1182
  let { node: p, offset: h } = a;
1183
1183
  if (p.nodeType == 3) {
1184
1184
  if (u = !!(h && p.nodeValue[h - 1] == `
@@ -1201,7 +1201,7 @@ class Er {
1201
1201
  let p = d.focusNode.childNodes[d.focusOffset];
1202
1202
  p && p.contentEditable == "false" && (o = !0);
1203
1203
  }
1204
- if (!(o || u && Se) && ln(a.node, a.offset, d.anchorNode, d.anchorOffset) && ln(l.node, l.offset, d.focusNode, d.focusOffset))
1204
+ if (!(o || u && xe) && ln(a.node, a.offset, d.anchorNode, d.anchorOffset) && ln(l.node, l.offset, d.focusNode, d.focusOffset))
1205
1205
  return;
1206
1206
  let f = !1;
1207
1207
  if ((c.extend || e == n) && !u) {
@@ -1417,7 +1417,7 @@ class Ft extends Er {
1417
1417
  // separate step, syncs the DOM inside `this.contentDOM` to
1418
1418
  // `this.children`.
1419
1419
  updateChildren(e, n) {
1420
- let r = this.node.inlineContent, o = n, i = e.composing ? this.localCompositionInfo(e, n) : null, s = i && i.pos > -1 ? i : null, a = i && i.pos < 0, l = new xp(this, s && s.node, e);
1420
+ let r = this.node.inlineContent, o = n, i = e.composing ? this.localCompositionInfo(e, n) : null, s = i && i.pos > -1 ? i : null, a = i && i.pos < 0, l = new Sp(this, s && s.node, e);
1421
1421
  Tp(this.node, this.innerDeco, (c, d, u) => {
1422
1422
  c.spec.marks ? l.syncToMarks(c.spec.marks, r, e) : c.type.side >= 0 && !u && l.syncToMarks(d == this.node.childCount ? Mf.none : this.node.child(d).marks, r, e), l.placeWidget(c, e, o);
1423
1423
  }, (c, d, u, f) => {
@@ -1465,7 +1465,7 @@ class Ft extends Er {
1465
1465
  if (go(e, this.outerDeco))
1466
1466
  return;
1467
1467
  let n = this.nodeDOM.nodeType != 1, r = this.dom;
1468
- this.dom = kc(this.dom, this.nodeDOM, xi(this.outerDeco, this.node, n), xi(e, this.node, n)), this.dom != r && (r.pmViewDesc = void 0, this.dom.pmViewDesc = this), this.outerDeco = e;
1468
+ this.dom = kc(this.dom, this.nodeDOM, Si(this.outerDeco, this.node, n), Si(e, this.node, n)), this.dom != r && (r.pmViewDesc = void 0, this.dom.pmViewDesc = this), this.outerDeco = e;
1469
1469
  }
1470
1470
  // Mark this node as being the selected node.
1471
1471
  selectNode() {
@@ -1599,7 +1599,7 @@ const tr = function(t) {
1599
1599
  };
1600
1600
  tr.prototype = /* @__PURE__ */ Object.create(null);
1601
1601
  const Qt = [new tr()];
1602
- function xi(t, e, n) {
1602
+ function Si(t, e, n) {
1603
1603
  if (t.length == 0)
1604
1604
  return Qt;
1605
1605
  let r = n ? Qt[0] : new tr(), o = [r];
@@ -1625,11 +1625,11 @@ function kc(t, e, n, r) {
1625
1625
  let l;
1626
1626
  a && a.nodeName == s.nodeName && o != t && (l = o.parentNode) && l.nodeName.toLowerCase() == s.nodeName || (l = document.createElement(s.nodeName), l.pmIsDeco = !0, l.appendChild(o), a = Qt[0]), o = l;
1627
1627
  }
1628
- Sp(o, a || Qt[0], s);
1628
+ xp(o, a || Qt[0], s);
1629
1629
  }
1630
1630
  return o;
1631
1631
  }
1632
- function Sp(t, e, n) {
1632
+ function xp(t, e, n) {
1633
1633
  for (let r in e)
1634
1634
  r != "class" && r != "style" && r != "nodeName" && !(r in n) && t.removeAttribute(r);
1635
1635
  for (let r in n)
@@ -1652,7 +1652,7 @@ function Sp(t, e, n) {
1652
1652
  }
1653
1653
  }
1654
1654
  function Cc(t, e, n) {
1655
- return kc(t, t, Qt, xi(e, n, t.nodeType != 1));
1655
+ return kc(t, t, Qt, Si(e, n, t.nodeType != 1));
1656
1656
  }
1657
1657
  function go(t, e) {
1658
1658
  if (t.length != e.length)
@@ -1666,7 +1666,7 @@ function va(t) {
1666
1666
  let e = t.nextSibling;
1667
1667
  return t.parentNode.removeChild(t), e;
1668
1668
  }
1669
- class xp {
1669
+ class Sp {
1670
1670
  constructor(e, n, r) {
1671
1671
  this.lock = n, this.view = r, this.index = 0, this.stack = [], this.changed = !1, this.top = e, this.preMatch = Ap(e.node.content, e);
1672
1672
  }
@@ -1800,7 +1800,7 @@ class xp {
1800
1800
  for (; e instanceof cn; )
1801
1801
  n = e, e = n.children[n.children.length - 1];
1802
1802
  (!e || // Empty textblock
1803
- !(e instanceof Lo) || /\n$/.test(e.node.text) || this.view.requiresGeckoHackNode && /\s$/.test(e.node.text)) && ((Se || be) && e && e.dom.contentEditable == "false" && this.addHackNode("IMG", n), this.addHackNode("BR", this.top));
1803
+ !(e instanceof Lo) || /\n$/.test(e.node.text) || this.view.requiresGeckoHackNode && /\s$/.test(e.node.text)) && ((xe || be) && e && e.dom.contentEditable == "false" && this.addHackNode("IMG", n), this.addHackNode("BR", this.top));
1804
1804
  }
1805
1805
  addHackNode(e, n) {
1806
1806
  if (n == this.top && this.index < n.children.length && n.children[this.index].matchesHack(e))
@@ -1971,11 +1971,11 @@ function ks(t, e = null) {
1971
1971
  return c;
1972
1972
  }
1973
1973
  function Mc(t) {
1974
- return t.editable ? t.hasFocus() : xc(t) && document.activeElement && document.activeElement.contains(t.dom);
1974
+ return t.editable ? t.hasFocus() : Sc(t) && document.activeElement && document.activeElement.contains(t.dom);
1975
1975
  }
1976
1976
  function kt(t, e = !1) {
1977
1977
  let n = t.state.selection;
1978
- if (Sc(t, n), !!Mc(t)) {
1978
+ if (xc(t, n), !!Mc(t)) {
1979
1979
  if (!e && t.input.mouseDown && t.input.mouseDown.allowDefault && be) {
1980
1980
  let r = t.domSelectionRange(), o = t.domObserver.currentSelection;
1981
1981
  if (r.anchorNode && o.anchorNode && ln(r.anchorNode, r.anchorOffset, o.anchorNode, o.anchorOffset)) {
@@ -1992,10 +1992,10 @@ function kt(t, e = !1) {
1992
1992
  t.domObserver.setCurSelection(), t.domObserver.connectSelection();
1993
1993
  }
1994
1994
  }
1995
- const ka = Se || be && uc < 63;
1995
+ const ka = xe || be && uc < 63;
1996
1996
  function Ca(t, e) {
1997
1997
  let { node: n, offset: r } = t.docView.domFromPos(e, 0), o = r < n.childNodes.length ? n.childNodes[r] : null, i = r ? n.childNodes[r - 1] : null;
1998
- if (Se && o && o.contentEditable == "false")
1998
+ if (xe && o && o.contentEditable == "false")
1999
1999
  return ti(o);
2000
2000
  if ((!o || o.contentEditable == "false") && (!i || i.contentEditable == "false")) {
2001
2001
  if (o)
@@ -2005,7 +2005,7 @@ function Ca(t, e) {
2005
2005
  }
2006
2006
  }
2007
2007
  function ti(t) {
2008
- return t.contentEditable = "true", Se && t.draggable && (t.draggable = !1, t.wasDraggable = !0), t;
2008
+ return t.contentEditable = "true", xe && t.draggable && (t.draggable = !1, t.wasDraggable = !0), t;
2009
2009
  }
2010
2010
  function Ma(t) {
2011
2011
  t.contentEditable = "false", t.wasDraggable && (t.draggable = !0, t.wasDraggable = null);
@@ -2027,23 +2027,23 @@ function Pp(t) {
2027
2027
  let r = t.cursorWrapper.dom, o = r.nodeName == "IMG";
2028
2028
  o ? n.setStart(r.parentNode, me(r) + 1) : n.setStart(r, 0), n.collapse(!0), e.removeAllRanges(), e.addRange(n), !o && !t.state.selection.visible && Te && Lt <= 11 && (r.disabled = !0, r.disabled = !1);
2029
2029
  }
2030
- function Sc(t, e) {
2030
+ function xc(t, e) {
2031
2031
  if (e instanceof B) {
2032
2032
  let n = t.docView.descAt(e.from);
2033
- n != t.lastSelectedViewDesc && (Sa(t), n && n.selectNode(), t.lastSelectedViewDesc = n);
2033
+ n != t.lastSelectedViewDesc && (xa(t), n && n.selectNode(), t.lastSelectedViewDesc = n);
2034
2034
  } else
2035
- Sa(t);
2035
+ xa(t);
2036
2036
  }
2037
- function Sa(t) {
2037
+ function xa(t) {
2038
2038
  t.lastSelectedViewDesc && (t.lastSelectedViewDesc.parent && t.lastSelectedViewDesc.deselectNode(), t.lastSelectedViewDesc = void 0);
2039
2039
  }
2040
2040
  function Cs(t, e, n, r) {
2041
2041
  return t.someProp("createSelectionBetween", (o) => o(t, e, n)) || H.between(e, n, r);
2042
2042
  }
2043
- function xa(t) {
2044
- return t.editable && !t.hasFocus() ? !1 : xc(t);
2043
+ function Sa(t) {
2044
+ return t.editable && !t.hasFocus() ? !1 : Sc(t);
2045
2045
  }
2046
- function xc(t) {
2046
+ function Sc(t) {
2047
2047
  let e = t.domSelectionRange();
2048
2048
  if (!e.anchorNode)
2049
2049
  return !1;
@@ -2272,7 +2272,7 @@ function Na(t, e, n) {
2272
2272
  t.domObserver.stop(), e.contentEditable = n, t.domObserver.start();
2273
2273
  }
2274
2274
  function zp(t) {
2275
- if (!Se || t.state.selection.$head.parentOffset > 0)
2275
+ if (!xe || t.state.selection.$head.parentOffset > 0)
2276
2276
  return !1;
2277
2277
  let { focusNode: e, focusOffset: n } = t.domSelectionRange();
2278
2278
  if (e && e.nodeType == 1 && n == 0 && e.firstChild && e.firstChild.contentEditable == "false") {
@@ -2497,20 +2497,20 @@ function qp(t, e) {
2497
2497
  }
2498
2498
  return new W(o, i, s);
2499
2499
  }
2500
- const xe = {}, Ae = {}, Kp = { touchstart: !0, touchmove: !0 };
2500
+ const Se = {}, Ae = {}, Kp = { touchstart: !0, touchmove: !0 };
2501
2501
  class Xp {
2502
2502
  constructor() {
2503
2503
  this.shiftKey = !1, this.mouseDown = null, this.lastKeyCode = null, this.lastKeyCodeTime = 0, this.lastClick = { time: 0, x: 0, y: 0, type: "" }, this.lastSelectionOrigin = null, this.lastSelectionTime = 0, this.lastIOSEnter = 0, this.lastIOSEnterFallbackTimeout = -1, this.lastFocus = 0, this.lastTouch = 0, this.lastChromeDelete = 0, this.composing = !1, this.compositionNode = null, this.composingTimeout = -1, this.compositionNodes = [], this.compositionEndedAt = -2e8, this.compositionID = 1, this.compositionPendingChanges = 0, this.domChangeCount = 0, this.eventHandlers = /* @__PURE__ */ Object.create(null), this.hideSelectionGuard = null;
2504
2504
  }
2505
2505
  }
2506
2506
  function Jp(t) {
2507
- for (let e in xe) {
2508
- let n = xe[e];
2507
+ for (let e in Se) {
2508
+ let n = Se[e];
2509
2509
  t.dom.addEventListener(e, t.input.eventHandlers[e] = (r) => {
2510
- Gp(t, r) && !Ss(t, r) && (t.editable || !(r.type in Ae)) && n(t, r);
2510
+ Gp(t, r) && !xs(t, r) && (t.editable || !(r.type in Ae)) && n(t, r);
2511
2511
  }, Kp[e] ? { passive: !0 } : void 0);
2512
2512
  }
2513
- Se && t.dom.addEventListener("input", () => null), Ni(t);
2513
+ xe && t.dom.addEventListener("input", () => null), Ni(t);
2514
2514
  }
2515
2515
  function Pt(t, e) {
2516
2516
  t.input.lastSelectionOrigin = e, t.input.lastSelectionTime = Date.now();
@@ -2524,10 +2524,10 @@ function Yp(t) {
2524
2524
  function Ni(t) {
2525
2525
  t.someProp("handleDOMEvents", (e) => {
2526
2526
  for (let n in e)
2527
- t.input.eventHandlers[n] || t.dom.addEventListener(n, t.input.eventHandlers[n] = (r) => Ss(t, r));
2527
+ t.input.eventHandlers[n] || t.dom.addEventListener(n, t.input.eventHandlers[n] = (r) => xs(t, r));
2528
2528
  });
2529
2529
  }
2530
- function Ss(t, e) {
2530
+ function xs(t, e) {
2531
2531
  return t.someProp("handleDOMEvents", (n) => {
2532
2532
  let r = n[e.type];
2533
2533
  return r ? r(t, e) || e.defaultPrevented : !1;
@@ -2544,7 +2544,7 @@ function Gp(t, e) {
2544
2544
  return !0;
2545
2545
  }
2546
2546
  function Zp(t, e) {
2547
- !Ss(t, e) && xe[e.type] && (t.editable || !(e.type in Ae)) && xe[e.type](t, e);
2547
+ !xs(t, e) && Se[e.type] && (t.editable || !(e.type in Ae)) && Se[e.type](t, e);
2548
2548
  }
2549
2549
  Ae.keydown = (t, e) => {
2550
2550
  let n = e;
@@ -2580,7 +2580,7 @@ function Qp(t, e) {
2580
2580
  let n = e.x - t.clientX, r = e.y - t.clientY;
2581
2581
  return n * n + r * r < 100;
2582
2582
  }
2583
- function xs(t, e, n, r, o) {
2583
+ function Ss(t, e, n, r, o) {
2584
2584
  if (r == -1)
2585
2585
  return !1;
2586
2586
  let i = t.state.doc.resolve(r);
@@ -2617,13 +2617,13 @@ function th(t, e) {
2617
2617
  return o != null ? (On(t, B.create(t.state.doc, o)), !0) : !1;
2618
2618
  }
2619
2619
  function nh(t, e, n, r, o) {
2620
- return xs(t, "handleClickOn", e, n, r) || t.someProp("handleClick", (i) => i(t, e, r)) || (o ? th(t, n) : eh(t, n));
2620
+ return Ss(t, "handleClickOn", e, n, r) || t.someProp("handleClick", (i) => i(t, e, r)) || (o ? th(t, n) : eh(t, n));
2621
2621
  }
2622
2622
  function rh(t, e, n, r) {
2623
- return xs(t, "handleDoubleClickOn", e, n, r) || t.someProp("handleDoubleClick", (o) => o(t, e, r));
2623
+ return Ss(t, "handleDoubleClickOn", e, n, r) || t.someProp("handleDoubleClick", (o) => o(t, e, r));
2624
2624
  }
2625
2625
  function oh(t, e, n, r) {
2626
- return xs(t, "handleTripleClickOn", e, n, r) || t.someProp("handleTripleClick", (o) => o(t, e, r)) || ih(t, n, r);
2626
+ return Ss(t, "handleTripleClickOn", e, n, r) || t.someProp("handleTripleClick", (o) => o(t, e, r)) || ih(t, n, r);
2627
2627
  }
2628
2628
  function ih(t, e, n) {
2629
2629
  if (n.button != 0)
@@ -2647,7 +2647,7 @@ function As(t) {
2647
2647
  return bo(t);
2648
2648
  }
2649
2649
  const Ic = ze ? "metaKey" : "ctrlKey";
2650
- xe.mousedown = (t, e) => {
2650
+ Se.mousedown = (t, e) => {
2651
2651
  let n = e;
2652
2652
  t.input.shiftKey = n.shiftKey;
2653
2653
  let r = As(t), o = Date.now(), i = "singleClick";
@@ -2685,7 +2685,7 @@ class sh {
2685
2685
  return;
2686
2686
  let n = this.pos;
2687
2687
  this.view.state.doc != this.startDoc && (n = this.view.posAtCoords(Fo(e))), this.updateAllowDefault(e), this.allowDefault || !n ? Pt(this.view, "pointer") : nh(this.view, n.pos, n.inside, e, this.selectNode) ? e.preventDefault() : e.button == 0 && (this.flushed || // Safari ignores clicks on draggable elements
2688
- Se && this.mightDrag && !this.mightDrag.node.isAtom || // Chrome will sometimes treat a node selection as a
2688
+ xe && this.mightDrag && !this.mightDrag.node.isAtom || // Chrome will sometimes treat a node selection as a
2689
2689
  // cursor, but still report that the node is selected
2690
2690
  // when asked through getSelection. You'll then get a
2691
2691
  // situation where clicking at the point where that
@@ -2701,15 +2701,15 @@ class sh {
2701
2701
  !this.allowDefault && (Math.abs(this.event.x - e.clientX) > 4 || Math.abs(this.event.y - e.clientY) > 4) && (this.allowDefault = !0);
2702
2702
  }
2703
2703
  }
2704
- xe.touchstart = (t) => {
2704
+ Se.touchstart = (t) => {
2705
2705
  t.input.lastTouch = Date.now(), As(t), Pt(t, "pointer");
2706
2706
  };
2707
- xe.touchmove = (t) => {
2707
+ Se.touchmove = (t) => {
2708
2708
  t.input.lastTouch = Date.now(), Pt(t, "pointer");
2709
2709
  };
2710
- xe.contextmenu = (t) => As(t);
2710
+ Se.contextmenu = (t) => As(t);
2711
2711
  function Rc(t, e) {
2712
- return t.composing ? !0 : Se && Math.abs(e.timeStamp - t.input.compositionEndedAt) < 500 ? (t.input.compositionEndedAt = -2e8, !0) : !1;
2712
+ return t.composing ? !0 : xe && Math.abs(e.timeStamp - t.input.compositionEndedAt) < 500 ? (t.input.compositionEndedAt = -2e8, !0) : !1;
2713
2713
  }
2714
2714
  const ah = bt ? 5e3 : -1;
2715
2715
  Ae.compositionstart = Ae.compositionupdate = (t) => {
@@ -2789,7 +2789,7 @@ function dh(t, e) {
2789
2789
  }, 50);
2790
2790
  }
2791
2791
  const fr = Te && Lt < 15 || Nn && sp < 604;
2792
- xe.copy = Ae.cut = (t, e) => {
2792
+ Se.copy = Ae.cut = (t, e) => {
2793
2793
  let n = e, r = t.state.selection, o = n.type == "cut";
2794
2794
  if (r.empty)
2795
2795
  return;
@@ -2842,7 +2842,7 @@ function _c(t, e) {
2842
2842
  let n = t.someProp("dragCopies", (r) => !r(e));
2843
2843
  return n ?? !e[ph];
2844
2844
  }
2845
- xe.dragstart = (t, e) => {
2845
+ Se.dragstart = (t, e) => {
2846
2846
  let n = e, r = t.input.mouseDown;
2847
2847
  if (r && r.done(), !n.dataTransfer)
2848
2848
  return;
@@ -2858,7 +2858,7 @@ xe.dragstart = (t, e) => {
2858
2858
  let a = (s || t.state.selection).content(), { dom: l, text: c, slice: d } = Ms(t, a);
2859
2859
  (!n.dataTransfer.files.length || !be || uc > 120) && n.dataTransfer.clearData(), n.dataTransfer.setData(fr ? "Text" : "text/html", l.innerHTML), n.dataTransfer.effectAllowed = "copyMove", fr || n.dataTransfer.setData("text/plain", c), t.dragging = new zc(d, _c(t, n), s);
2860
2860
  };
2861
- xe.dragend = (t) => {
2861
+ Se.dragend = (t) => {
2862
2862
  let e = t.dragging;
2863
2863
  window.setTimeout(() => {
2864
2864
  t.dragging == e && (t.dragging = null);
@@ -2903,16 +2903,16 @@ Ae.drop = (t, e) => {
2903
2903
  }
2904
2904
  t.focus(), t.dispatch(c.setMeta("uiEvent", "drop"));
2905
2905
  };
2906
- xe.focus = (t) => {
2906
+ Se.focus = (t) => {
2907
2907
  t.input.lastFocus = Date.now(), t.focused || (t.domObserver.stop(), t.dom.classList.add("ProseMirror-focused"), t.domObserver.start(), t.focused = !0, setTimeout(() => {
2908
2908
  t.docView && t.hasFocus() && !t.domObserver.currentSelection.eq(t.domSelectionRange()) && kt(t);
2909
2909
  }, 20));
2910
2910
  };
2911
- xe.blur = (t, e) => {
2911
+ Se.blur = (t, e) => {
2912
2912
  let n = e;
2913
2913
  t.focused && (t.domObserver.stop(), t.dom.classList.remove("ProseMirror-focused"), t.domObserver.start(), n.relatedTarget && t.dom.contains(n.relatedTarget) && t.domObserver.currentSelection.clear(), t.focused = !1);
2914
2914
  };
2915
- xe.beforeinput = (t, e) => {
2915
+ Se.beforeinput = (t, e) => {
2916
2916
  if (be && bt && e.inputType == "deleteContentBackward") {
2917
2917
  t.domObserver.flushSoon();
2918
2918
  let { domChangeCount: r } = t.input;
@@ -2925,7 +2925,7 @@ xe.beforeinput = (t, e) => {
2925
2925
  }
2926
2926
  };
2927
2927
  for (let t in Ae)
2928
- xe[t] = Ae[t];
2928
+ Se[t] = Ae[t];
2929
2929
  function hr(t, e) {
2930
2930
  if (t == e)
2931
2931
  return !0;
@@ -3067,13 +3067,13 @@ class $ {
3067
3067
  return this.type instanceof wo;
3068
3068
  }
3069
3069
  }
3070
- const Sn = [], nn = {};
3070
+ const xn = [], nn = {};
3071
3071
  class L {
3072
3072
  /**
3073
3073
  @internal
3074
3074
  */
3075
3075
  constructor(e, n) {
3076
- this.local = e.length ? e : Sn, this.children = n.length ? n : Sn;
3076
+ this.local = e.length ? e : xn, this.children = n.length ? n : xn;
3077
3077
  }
3078
3078
  /**
3079
3079
  Create a set of decorations, using the structure of the given
@@ -3122,7 +3122,7 @@ class L {
3122
3122
  let l = this.local[a].map(e, r, o);
3123
3123
  l && l.type.valid(n, l) ? (s || (s = [])).push(l) : i.onRemove && i.onRemove(this.local[a].spec);
3124
3124
  }
3125
- return this.children.length ? hh(this.children, s || [], e, n, r, o, i) : s ? new L(s.sort(rn), Sn) : ye;
3125
+ return this.children.length ? hh(this.children, s || [], e, n, r, o, i) : s ? new L(s.sort(rn), xn) : ye;
3126
3126
  }
3127
3127
  /**
3128
3128
  Add the given array of decorations to the ones in the set,
@@ -3195,7 +3195,7 @@ class L {
3195
3195
  }
3196
3196
  }
3197
3197
  if (o) {
3198
- let a = new L(o.sort(rn), Sn);
3198
+ let a = new L(o.sort(rn), xn);
3199
3199
  return r ? new Nt([a, r]) : a;
3200
3200
  }
3201
3201
  return r || ye;
@@ -3227,7 +3227,7 @@ class L {
3227
3227
  */
3228
3228
  localsInner(e) {
3229
3229
  if (this == ye)
3230
- return Sn;
3230
+ return xn;
3231
3231
  if (e.inlineContent || !this.local.some(Bt.is))
3232
3232
  return this.local;
3233
3233
  let n = [];
@@ -3281,7 +3281,7 @@ class Nt {
3281
3281
  n.push(i[s]);
3282
3282
  }
3283
3283
  }
3284
- return n ? Ts(r ? n : n.sort(rn)) : Sn;
3284
+ return n ? Ts(r ? n : n.sort(rn)) : xn;
3285
3285
  }
3286
3286
  // Create a group for the given array of decoration sets, or return
3287
3287
  // a single set when possible.
@@ -3499,7 +3499,7 @@ class wh {
3499
3499
  this.suppressingSelectionUpdates = !0, setTimeout(() => this.suppressingSelectionUpdates = !1, 50);
3500
3500
  }
3501
3501
  onSelectionChange() {
3502
- if (xa(this.view)) {
3502
+ if (Sa(this.view)) {
3503
3503
  if (this.suppressingSelectionUpdates)
3504
3504
  return kt(this.view);
3505
3505
  if (Te && Lt <= 11 && !this.view.state.selection.empty) {
@@ -3543,7 +3543,7 @@ class wh {
3543
3543
  return;
3544
3544
  let n = this.pendingRecords();
3545
3545
  n.length && (this.queue = []);
3546
- let r = e.domSelectionRange(), o = !this.suppressingSelectionUpdates && !this.currentSelection.eq(r) && xa(e) && !this.ignoreSelectionChange(r), i = -1, s = -1, a = !1, l = [];
3546
+ let r = e.domSelectionRange(), o = !this.suppressingSelectionUpdates && !this.currentSelection.eq(r) && Sa(e) && !this.ignoreSelectionChange(r), i = -1, s = -1, a = !1, l = [];
3547
3547
  if (e.editable)
3548
3548
  for (let d = 0; d < n.length; d++) {
3549
3549
  let u = this.registerMutation(n[d], l);
@@ -3650,7 +3650,7 @@ function Mh(t, e, n) {
3650
3650
  to: i,
3651
3651
  preserveWhitespace: p.parent.type.whitespace == "pre" ? "full" : !0,
3652
3652
  findPositions: c,
3653
- ruleFromNode: Sh,
3653
+ ruleFromNode: xh,
3654
3654
  context: p
3655
3655
  });
3656
3656
  if (c && c[0].pos != null) {
@@ -3659,30 +3659,30 @@ function Mh(t, e, n) {
3659
3659
  }
3660
3660
  return { doc: m, sel: h, from: s, to: a };
3661
3661
  }
3662
- function Sh(t) {
3662
+ function xh(t) {
3663
3663
  let e = t.pmViewDesc;
3664
3664
  if (e)
3665
3665
  return e.parseRule();
3666
3666
  if (t.nodeName == "BR" && t.parentNode) {
3667
- if (Se && /^(ul|ol)$/i.test(t.parentNode.nodeName)) {
3667
+ if (xe && /^(ul|ol)$/i.test(t.parentNode.nodeName)) {
3668
3668
  let n = document.createElement("div");
3669
3669
  return n.appendChild(document.createElement("li")), { skip: n };
3670
- } else if (t.parentNode.lastChild == t || Se && /^(tr|table)$/i.test(t.parentNode.nodeName))
3670
+ } else if (t.parentNode.lastChild == t || xe && /^(tr|table)$/i.test(t.parentNode.nodeName))
3671
3671
  return { ignore: !0 };
3672
3672
  } else if (t.nodeName == "IMG" && t.getAttribute("mark-placeholder"))
3673
3673
  return { ignore: !0 };
3674
3674
  return null;
3675
3675
  }
3676
- const xh = /^(a|abbr|acronym|b|bd[io]|big|br|button|cite|code|data(list)?|del|dfn|em|i|ins|kbd|label|map|mark|meter|output|q|ruby|s|samp|small|span|strong|su[bp]|time|u|tt|var)$/i;
3676
+ const Sh = /^(a|abbr|acronym|b|bd[io]|big|br|button|cite|code|data(list)?|del|dfn|em|i|ins|kbd|label|map|mark|meter|output|q|ruby|s|samp|small|span|strong|su[bp]|time|u|tt|var)$/i;
3677
3677
  function Ah(t, e, n, r, o) {
3678
3678
  let i = t.input.compositionPendingChanges || (t.composing ? t.input.compositionID : 0);
3679
3679
  if (t.input.compositionPendingChanges = 0, e < 0) {
3680
- let S = t.input.lastSelectionTime > Date.now() - 50 ? t.input.lastSelectionOrigin : null, _ = ks(t, S);
3680
+ let x = t.input.lastSelectionTime > Date.now() - 50 ? t.input.lastSelectionOrigin : null, _ = ks(t, x);
3681
3681
  if (_ && !t.state.selection.eq(_)) {
3682
3682
  if (be && bt && t.input.lastKeyCode === 13 && Date.now() - 100 < t.input.lastKeyCodeTime && t.someProp("handleKeyDown", (V) => V(t, Gt(13, "Enter"))))
3683
3683
  return;
3684
3684
  let z = t.state.tr.setSelection(_);
3685
- S == "pointer" ? z.setMeta("pointer", !0) : S == "key" && z.scrollIntoView(), i && z.setMeta("composition", i), t.dispatch(z);
3685
+ x == "pointer" ? z.setMeta("pointer", !0) : x == "key" && z.scrollIntoView(), i && z.setMeta("composition", i), t.dispatch(z);
3686
3686
  }
3687
3687
  return;
3688
3688
  }
@@ -3691,7 +3691,7 @@ function Ah(t, e, n, r, o) {
3691
3691
  let l = t.state.selection, c = Mh(t, e, n), d = t.state.doc, u = d.slice(c.from, c.to), f, p;
3692
3692
  t.input.lastKeyCode === 8 && Date.now() - 100 < t.input.lastKeyCodeTime ? (f = t.state.selection.to, p = "end") : (f = t.state.selection.from, p = "start"), t.input.lastKeyCode = null;
3693
3693
  let h = Dh(u.content, c.doc.content, c.from, f, p);
3694
- if (h && t.input.domChangeCount++, (Nn && t.input.lastIOSEnter > Date.now() - 225 || bt) && o.some((S) => S.nodeType == 1 && !xh.test(S.nodeName)) && (!h || h.endA >= h.endB) && t.someProp("handleKeyDown", (S) => S(t, Gt(13, "Enter")))) {
3694
+ if (h && t.input.domChangeCount++, (Nn && t.input.lastIOSEnter > Date.now() - 225 || bt) && o.some((x) => x.nodeType == 1 && !Sh.test(x.nodeName)) && (!h || h.endA >= h.endB) && t.someProp("handleKeyDown", (x) => x(t, Gt(13, "Enter")))) {
3695
3695
  t.input.lastIOSEnter = 0;
3696
3696
  return;
3697
3697
  }
@@ -3700,9 +3700,9 @@ function Ah(t, e, n, r, o) {
3700
3700
  h = { start: l.from, endA: l.to, endB: l.to };
3701
3701
  else {
3702
3702
  if (c.sel) {
3703
- let S = Ba(t, t.state.doc, c.sel);
3704
- if (S && !S.eq(t.state.selection)) {
3705
- let _ = t.state.tr.setSelection(S);
3703
+ let x = Ba(t, t.state.doc, c.sel);
3704
+ if (x && !x.eq(t.state.selection)) {
3705
+ let _ = t.state.tr.setSelection(x);
3706
3706
  i && _.setMeta("composition", i), t.dispatch(_);
3707
3707
  }
3708
3708
  }
@@ -3710,17 +3710,17 @@ function Ah(t, e, n, r, o) {
3710
3710
  }
3711
3711
  t.state.selection.from < t.state.selection.to && h.start == h.endB && t.state.selection instanceof H && (h.start > t.state.selection.from && h.start <= t.state.selection.from + 2 && t.state.selection.from >= c.from ? h.start = t.state.selection.from : h.endA < t.state.selection.to && h.endA >= t.state.selection.to - 2 && t.state.selection.to <= c.to && (h.endB += t.state.selection.to - h.endA, h.endA = t.state.selection.to)), Te && Lt <= 11 && h.endB == h.start + 1 && h.endA == h.start && h.start > c.from && c.doc.textBetween(h.start - c.from - 1, h.start - c.from + 1) == "  " && (h.start--, h.endA--, h.endB--);
3712
3712
  let m = c.doc.resolveNoCache(h.start - c.from), g = c.doc.resolveNoCache(h.endB - c.from), b = d.resolve(h.start), w = m.sameParent(g) && m.parent.inlineContent && b.end() >= h.endA, C;
3713
- if ((Nn && t.input.lastIOSEnter > Date.now() - 225 && (!w || o.some((S) => S.nodeName == "DIV" || S.nodeName == "P")) || !w && m.pos < c.doc.content.size && (!m.sameParent(g) || !m.parent.inlineContent) && (C = Y.findFrom(c.doc.resolve(m.pos + 1), 1, !0)) && C.head > m.pos) && t.someProp("handleKeyDown", (S) => S(t, Gt(13, "Enter")))) {
3713
+ if ((Nn && t.input.lastIOSEnter > Date.now() - 225 && (!w || o.some((x) => x.nodeName == "DIV" || x.nodeName == "P")) || !w && m.pos < c.doc.content.size && (!m.sameParent(g) || !m.parent.inlineContent) && (C = Y.findFrom(c.doc.resolve(m.pos + 1), 1, !0)) && C.head > m.pos) && t.someProp("handleKeyDown", (x) => x(t, Gt(13, "Enter")))) {
3714
3714
  t.input.lastIOSEnter = 0;
3715
3715
  return;
3716
3716
  }
3717
- if (t.state.selection.anchor > h.start && Th(d, h.start, h.endA, m, g) && t.someProp("handleKeyDown", (S) => S(t, Gt(8, "Backspace")))) {
3717
+ if (t.state.selection.anchor > h.start && Th(d, h.start, h.endA, m, g) && t.someProp("handleKeyDown", (x) => x(t, Gt(8, "Backspace")))) {
3718
3718
  bt && be && t.domObserver.suppressSelectionUpdates();
3719
3719
  return;
3720
3720
  }
3721
3721
  be && h.endB == h.start && (t.input.lastChromeDelete = Date.now()), bt && !w && m.start() != g.start() && g.parentOffset == 0 && m.depth == g.depth && c.sel && c.sel.anchor == c.sel.head && c.sel.head == h.endA && (h.endB -= 2, g = c.doc.resolveNoCache(h.endB - c.from), setTimeout(() => {
3722
- t.someProp("handleKeyDown", function(S) {
3723
- return S(t, Gt(13, "Enter"));
3722
+ t.someProp("handleKeyDown", function(x) {
3723
+ return x(t, Gt(13, "Enter"));
3724
3724
  });
3725
3725
  }, 20));
3726
3726
  let y = h.start, M = h.endA, k, A, F;
@@ -3733,15 +3733,15 @@ function Ah(t, e, n, r, o) {
3733
3733
  )
3734
3734
  k = t.state.tr, F.type == "add" ? k.addMark(y, M, F.mark) : k.removeMark(y, M, F.mark);
3735
3735
  else if (m.parent.child(m.index()).isText && m.index() == g.index() - (g.textOffset ? 0 : 1)) {
3736
- let S = m.parent.textBetween(m.parentOffset, g.parentOffset);
3737
- if (t.someProp("handleTextInput", (_) => _(t, y, M, S)))
3736
+ let x = m.parent.textBetween(m.parentOffset, g.parentOffset);
3737
+ if (t.someProp("handleTextInput", (_) => _(t, y, M, x)))
3738
3738
  return;
3739
- k = t.state.tr.insertText(S, y, M);
3739
+ k = t.state.tr.insertText(x, y, M);
3740
3740
  }
3741
3741
  }
3742
3742
  if (k || (k = t.state.tr.replace(y, M, c.doc.slice(h.start - c.from, h.endB - c.from))), c.sel) {
3743
- let S = Ba(t, k.doc, c.sel);
3744
- S && !(be && t.composing && S.empty && (h.start != h.endB || t.input.lastChromeDelete < Date.now() - 100) && (S.head == y || S.head == k.mapping.map(M) - 1) || Te && S.empty && S.head == y) && k.setSelection(S);
3743
+ let x = Ba(t, k.doc, c.sel);
3744
+ x && !(be && t.composing && x.empty && (h.start != h.endB || t.input.lastChromeDelete < Date.now() - 100) && (x.head == y || x.head == k.mapping.map(M) - 1) || Te && x.empty && x.head == y) && k.setSelection(x);
3745
3745
  }
3746
3746
  A && k.ensureMarks(A), i && k.setMeta("composition", i), t.dispatch(k.scrollIntoView());
3747
3747
  }
@@ -3900,7 +3900,7 @@ class jc {
3900
3900
  let h = be ? this.trackWrites = this.domSelectionRange().focusNode : null;
3901
3901
  this.composing && (this.input.compositionNode = lh(this)), (i || !this.docView.update(e.doc, c, l, this)) && (this.docView.updateOuterDeco(c), this.docView.destroy(), this.docView = wa(e.doc, c, l, this.dom, this)), h && !this.trackWrites && (p = !0);
3902
3902
  }
3903
- p || !(this.input.mouseDown && this.domObserver.currentSelection.eq(this.domSelectionRange()) && Ip(this)) ? kt(this, p) : (Sc(this, e.selection), this.domObserver.setCurSelection()), this.domObserver.start();
3903
+ p || !(this.input.mouseDown && this.domObserver.currentSelection.eq(this.domSelectionRange()) && Ip(this)) ? kt(this, p) : (xc(this, e.selection), this.domObserver.setCurSelection()), this.domObserver.start();
3904
3904
  }
3905
3905
  this.updatePluginViews(o), !((r = this.dragging) === null || r === void 0) && r.node && !o.doc.eq(e.doc) && this.updateDraggedNode(this.dragging, o), d == "reset" ? this.dom.scrollTop = 0 : d == "to selection" ? this.scrollToSelection() : f && dp(f);
3906
3906
  }
@@ -4154,7 +4154,7 @@ class jc {
4154
4154
  */
4155
4155
  domSelectionRange() {
4156
4156
  let e = this.domSelection();
4157
- return e ? Se && this.root.nodeType === 11 && rp(this.dom.ownerDocument) == this.dom && kh(this, e) || e : { focusNode: null, focusOffset: 0, anchorNode: null, anchorOffset: 0 };
4157
+ return e ? xe && this.root.nodeType === 11 && rp(this.dom.ownerDocument) == this.dom && kh(this, e) || e : { focusNode: null, focusOffset: 0, anchorNode: null, anchorOffset: 0 };
4158
4158
  }
4159
4159
  /**
4160
4160
  @internal
@@ -4402,10 +4402,10 @@ const Mm = () => {
4402
4402
  return Ze;
4403
4403
  }, Ii = (t) => Mm().has(t), Ri = (t) => Xa(Pn ? ie.env[t.toUpperCase().replaceAll("-", "_")] : Cm.getItem(t)), Yc = (t) => Ii("--" + t) || Ri(t) !== null;
4404
4404
  Yc("production");
4405
- const Sm = Pn && fm(ie.env.FORCE_COLOR, ["true", "1", "2"]);
4406
- Sm || !Ii("--no-colors") && // @todo deprecate --no-colors
4405
+ const xm = Pn && fm(ie.env.FORCE_COLOR, ["true", "1", "2"]);
4406
+ xm || !Ii("--no-colors") && // @todo deprecate --no-colors
4407
4407
  !Yc("no-color") && (!Pn || ie.stdout.isTTY) && (!Pn || Ii("--color") || Ri("COLORTERM") !== null || (Ri("TERM") || "").includes("color"));
4408
- const xm = (
4408
+ const Sm = (
4409
4409
  /** @type {Document} */
4410
4410
  typeof document < "u" ? document : {}
4411
4411
  );
@@ -4546,7 +4546,7 @@ const Lm = (t) => new Rm().digest(t), Fm = (t) => {
4546
4546
  for (let n = 0; n < t.byteLength; n++)
4547
4547
  e += $h(t[n]);
4548
4548
  return btoa(e);
4549
- }, Bm = (t) => Sf.from(t.buffer, t.byteOffset, t.byteLength).toString("base64"), zm = Jc ? Fm : Bm, _m = (t) => Yh((e) => Pi(e, t)), $m = (t) => {
4549
+ }, Bm = (t) => xf.from(t.buffer, t.byteOffset, t.byteLength).toString("base64"), zm = Jc ? Fm : Bm, _m = (t) => Yh((e) => Pi(e, t)), $m = (t) => {
4550
4550
  for (let n = 6; n < t.length; n++)
4551
4551
  t[n % 6] = t[n % 6] ^ t[n];
4552
4552
  return t.slice(0, 6);
@@ -4717,7 +4717,7 @@ class Km {
4717
4717
  if (e == null || e.anchorNode == null) return !1;
4718
4718
  const n = this.prosemirrorView._root.createRange();
4719
4719
  n.setStart(e.anchorNode, e.anchorOffset), n.setEnd(e.focusNode, e.focusOffset), n.getClientRects().length === 0 && n.startContainer && n.collapsed && n.selectNodeContents(n.startContainer);
4720
- const o = n.getBoundingClientRect(), i = xm.documentElement;
4720
+ const o = n.getBoundingClientRect(), i = Sm.documentElement;
4721
4721
  return o.bottom >= 0 && o.right >= 0 && o.left <= (window.innerWidth || i.clientWidth || 0) && o.top <= (window.innerHeight || i.clientHeight || 0);
4722
4722
  }
4723
4723
  /**
@@ -5591,7 +5591,7 @@ var Vt = {
5591
5591
  220: "\\",
5592
5592
  221: "]",
5593
5593
  222: "'"
5594
- }, So = {
5594
+ }, xo = {
5595
5595
  48: ")",
5596
5596
  49: "!",
5597
5597
  50: "@",
@@ -5620,10 +5620,10 @@ var Vt = {
5620
5620
  for (var ge = 0; ge < 10; ge++) Vt[48 + ge] = Vt[96 + ge] = String(ge);
5621
5621
  for (var ge = 1; ge <= 24; ge++) Vt[ge + 111] = "F" + ge;
5622
5622
  for (var ge = 65; ge <= 90; ge++)
5623
- Vt[ge] = String.fromCharCode(ge + 32), So[ge] = String.fromCharCode(ge);
5624
- for (var si in Vt) So.hasOwnProperty(si) || (So[si] = Vt[si]);
5623
+ Vt[ge] = String.fromCharCode(ge + 32), xo[ge] = String.fromCharCode(ge);
5624
+ for (var si in Vt) xo.hasOwnProperty(si) || (xo[si] = Vt[si]);
5625
5625
  function wg(t) {
5626
- var e = yg && t.metaKey && t.shiftKey && !t.ctrlKey && !t.altKey || bg && t.shiftKey && t.key && t.key.length == 1 || t.key == "Unidentified", n = !e && t.key || (t.shiftKey ? So : Vt)[t.keyCode] || t.key || "Unidentified";
5626
+ var e = yg && t.metaKey && t.shiftKey && !t.ctrlKey && !t.altKey || bg && t.shiftKey && t.key && t.key.length == 1 || t.key == "Unidentified", n = !e && t.key || (t.shiftKey ? xo : Vt)[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 vg = typeof navigator < "u" ? /Mac|iP(hone|[oa]d)/.test(navigator.platform) : !1;
@@ -5881,7 +5881,7 @@ zn = new WeakSet(), td = function(e, n) {
5881
5881
  return r;
5882
5882
  }, ft(D, zn);
5883
5883
  function _i(t) {
5884
- const e = Object.entries(t).filter(([n, r]) => n === "attrs" && xf(r) ? !1 : r != null);
5884
+ const e = Object.entries(t).filter(([n, r]) => n === "attrs" && Sf(r) ? !1 : r != null);
5885
5885
  return Object.fromEntries(e);
5886
5886
  }
5887
5887
  var _n, rd, od;
@@ -5967,7 +5967,7 @@ let $i = cr;
5967
5967
  function Gn(t, e) {
5968
5968
  return e.nodes[t] || e.marks[t] || null;
5969
5969
  }
5970
- function Sg(t, e) {
5970
+ function xg(t, e) {
5971
5971
  return Array.isArray(e) ? e.some((n) => (typeof n == "string" ? n : n.name) === t.name) : e;
5972
5972
  }
5973
5973
  function Is(t, e) {
@@ -6088,7 +6088,7 @@ class zo {
6088
6088
  return a;
6089
6089
  }
6090
6090
  }
6091
- function xg(t, e) {
6091
+ function Sg(t, e) {
6092
6092
  const n = Vn.fromSchema(e).serializeFragment(t), o = document.implementation.createHTMLDocument().createElement("div");
6093
6093
  return o.appendChild(n), o.innerHTML;
6094
6094
  }
@@ -6183,7 +6183,7 @@ const Tg = (t, e) => {
6183
6183
  const a = r.getMeta("applyInputRules");
6184
6184
  return !!a && setTimeout(() => {
6185
6185
  let { text: c } = a;
6186
- typeof c != "string" && (c = xg(P.from(c), i.schema));
6186
+ typeof c != "string" && (c = Sg(P.from(c), i.schema));
6187
6187
  const { from: d } = a, u = d + c.length;
6188
6188
  li({
6189
6189
  editor: t,
@@ -6267,7 +6267,10 @@ const An = class An {
6267
6267
  I(this, "extensions");
6268
6268
  I(this, "externalExtensions", []);
6269
6269
  I(this, "splittableMarks", []);
6270
- this.editor = r, this.externalExtensions = n || [], this.extensions = An.getResolvedExtensions([...e, ...this.externalExtensions]), this.schema = $i.createSchemaByExtensions(this.extensions, r), N(this, $n, id).call(this);
6270
+ this.editor = r, this.externalExtensions = n || [], this.externalExtensions = this.externalExtensions.map((o) => ({
6271
+ ...o,
6272
+ isExternal: !0
6273
+ })), this.extensions = An.getResolvedExtensions([...e, ...this.externalExtensions]), this.schema = $i.createSchemaByExtensions(this.extensions, r), N(this, $n, id).call(this);
6271
6274
  }
6272
6275
  /**
6273
6276
  * Static method for creating ExtensionService.
@@ -6344,7 +6347,7 @@ const An = class An {
6344
6347
  }
6345
6348
  a.push(Mg(c));
6346
6349
  const d = E(i, "addInputRules", s);
6347
- Sg(i, e.options.enableInputRules) && d && r.push(...d());
6350
+ xg(i, e.options.enableInputRules) && d && r.push(...d());
6348
6351
  const u = E(i, "addPmPlugins", s);
6349
6352
  if (u) {
6350
6353
  const f = u();
@@ -6856,7 +6859,7 @@ const ny = (t, e = {}) => ({ tr: n, state: r, dispatch: o }) => {
6856
6859
  t.removeMark(i.$from.pos, i.$to.pos);
6857
6860
  }), !0;
6858
6861
  };
6859
- function xo(t, e, n = {}) {
6862
+ function So(t, e, n = {}) {
6860
6863
  const { empty: r, ranges: o } = t.selection, i = e ? Mt(e, t.schema) : null;
6861
6864
  if (r)
6862
6865
  return !!(t.storedMarks || t.selection.$from.marks()).filter((u) => i ? i.name === u.type.name : !0).find((u) => ur(u.attrs, n, { strict: !1 }));
@@ -6881,7 +6884,7 @@ function xo(t, e, n = {}) {
6881
6884
  }
6882
6885
  const oy = (t, e = {}, n = {}) => ({ state: r, commands: o }) => {
6883
6886
  const { extendEmptyMarkRange: i = !1 } = n, s = Mt(t, r.schema);
6884
- return xo(r, s, e) ? o.unsetMark(s, { extendEmptyMarkRange: i }) : o.setMark(s, e);
6887
+ return So(r, s, e) ? o.unsetMark(s, { extendEmptyMarkRange: i }) : o.setMark(s, e);
6885
6888
  }, iy = () => ({ state: t, tr: e, dispatch: n }) => {
6886
6889
  const { selection: r } = e, { ranges: o } = r;
6887
6890
  return n && o.forEach(({ $from: i, $to: s }) => {
@@ -7060,7 +7063,7 @@ const Cy = (t) => !("type" in t), My = (t, e, n) => ({ tr: r, dispatch: o, edito
7060
7063
  c ? (Array.isArray(e) ? f = e.map((p) => p.text || "").join("") : typeof e == "object" && e && e.text ? f = e.text : f = e, r.insertText(f, a, l)) : (f = s, r.replaceWith(a, l, f)), n.updateSelection && ky(r, r.steps.length - 1, -1), n.applyInputRules && r.setMeta("applyInputRules", { from: a, text: f }), n.applyPasteRules && r.setMeta("applyPasteRules", { from: a, text: f });
7061
7064
  }
7062
7065
  return !0;
7063
- }, Sy = () => ({ state: t, dispatch: e }) => {
7066
+ }, xy = () => ({ state: t, dispatch: e }) => {
7064
7067
  const n = t.plugins;
7065
7068
  for (let r = 0; r < n.length; r += 1) {
7066
7069
  const o = n[r];
@@ -7081,7 +7084,7 @@ const Cy = (t) => !("type" in t), My = (t, e, n) => ({ tr: r, dispatch: o, edito
7081
7084
  }
7082
7085
  return !1;
7083
7086
  };
7084
- function xy(t, e = null) {
7087
+ function Sy(t, e = null) {
7085
7088
  return function(n, r) {
7086
7089
  let { $from: o, $to: i } = n.selection, s = o.blockRange(i);
7087
7090
  if (!s)
@@ -7163,7 +7166,7 @@ function Ey(t) {
7163
7166
  }
7164
7167
  const Py = (t, e = {}) => ({ state: n, dispatch: r }) => {
7165
7168
  const o = le(t, n.schema);
7166
- return xy(o, e)(n, r);
7169
+ return Sy(o, e)(n, r);
7167
7170
  }, _o = (t, e) => {
7168
7171
  for (let n = t.depth; n > 0; n--) {
7169
7172
  const r = t.node(n);
@@ -8360,8 +8363,8 @@ const Py = (t, e = {}) => ({ state: n, dispatch: r }) => {
8360
8363
  s.ensureMarks(j);
8361
8364
  }
8362
8365
  return V ? !0 : u.clearNodes();
8363
- }, S = kd(A.definitions);
8364
- return i.converter.numbering = Fy(S, A, h), r.listId = S, !n || !M || !l ? c().command(F({ ensureMarks: !1 })).wrapInList(h, r).command(() => ci(s, h)).command(() => di(s, h)).run() : c().command(F({ ensureMarks: !0 })).wrapInList(h, r).command(() => ci(s, h)).command(() => di(s, h)).run();
8366
+ }, x = kd(A.definitions);
8367
+ return i.converter.numbering = Fy(x, A, h), r.listId = x, !n || !M || !l ? c().command(F({ ensureMarks: !1 })).wrapInList(h, r).command(() => ci(s, h)).command(() => di(s, h)).run() : c().command(F({ ensureMarks: !0 })).wrapInList(h, r).command(() => ci(s, h)).command(() => di(s, h)).run();
8365
8368
  }, kd = (t) => Math.max(...Object.keys(t).map(Number)) + 1, Fy = (t, e, n) => {
8366
8369
  const r = n.name === "orderedList" ? Iy : Ry, o = { ...e }, i = kd(o.abstracts), s = {
8367
8370
  ...r,
@@ -8478,7 +8481,7 @@ const Py = (t, e = {}) => ({ state: n, dispatch: r }) => {
8478
8481
  toggleList: Ly,
8479
8482
  toggleMark: oy,
8480
8483
  toggleNode: ay,
8481
- undoInputRule: Sy,
8484
+ undoInputRule: xy,
8482
8485
  unsetAllMarks: ry,
8483
8486
  unsetMark: ny,
8484
8487
  updateAttributes: dy,
@@ -8581,9 +8584,9 @@ function Cd(t, e, n, { check: r = !1 } = {}) {
8581
8584
  }
8582
8585
  function Md(t, e, n = {}) {
8583
8586
  if (!e)
8584
- return Ao(t, null, n) || xo(t, null, n);
8587
+ return Ao(t, null, n) || So(t, null, n);
8585
8588
  const r = Pr(e, t.schema);
8586
- return r === "node" ? Ao(t, e, n) : r === "mark" ? xo(t, e, n) : !1;
8589
+ return r === "node" ? Ao(t, e, n) : r === "mark" ? So(t, e, n) : !1;
8587
8590
  }
8588
8591
  const zs = ({
8589
8592
  tr: t,
@@ -8608,7 +8611,7 @@ const zs = ({
8608
8611
  mark: f
8609
8612
  });
8610
8613
  }), c;
8611
- }, Sd = ({ tr: t, from: e, to: n, user: r, date: o }) => {
8614
+ }, xd = ({ tr: t, from: e, to: n, user: r, date: o }) => {
8612
8615
  t.removeMark(e, n, t.doc.type.schema.marks[ue]), t.removeMark(e, n, t.doc.type.schema.marks[$e]);
8613
8616
  let i = zs({
8614
8617
  tr: t,
@@ -8630,7 +8633,7 @@ const zs = ({
8630
8633
  if (l.isInline || ["tableRow", "tableCell"].includes(l.type.name) || (l.attrs.track, l.type.name === "table"))
8631
8634
  return !1;
8632
8635
  }), a;
8633
- }, xd = ({ tr: t, from: e, to: n, user: r, date: o }) => {
8636
+ }, Sd = ({ tr: t, from: e, to: n, user: r, date: o }) => {
8634
8637
  let i = zs({
8635
8638
  tr: t,
8636
8639
  from: e,
@@ -8786,7 +8789,7 @@ const Od = (t) => {
8786
8789
  isActive: Md,
8787
8790
  isInTable: Od,
8788
8791
  isList: Wi,
8789
- isMarkActive: xo,
8792
+ isMarkActive: So,
8790
8793
  isNodeActive: Ao,
8791
8794
  isTextSelection: wd,
8792
8795
  posToDOMRect: Ad
@@ -9251,23 +9254,23 @@ const Od = (t) => {
9251
9254
  );
9252
9255
  let M = !1;
9253
9256
  y.forEach((A) => {
9254
- const { attrs: F } = A, S = F.commentId || F.importedId, _ = s.coordsAtPos(w);
9257
+ const { attrs: F } = A, x = F.commentId || F.importedId, _ = s.coordsAtPos(w);
9255
9258
  rl({
9256
9259
  allCommentPositions: f,
9257
- threadId: S,
9260
+ threadId: x,
9258
9261
  pos: w,
9259
9262
  currentBounds: _,
9260
9263
  node: b
9261
9264
  });
9262
9265
  const z = F.internal;
9263
- M || (M = n === S);
9264
- let V = nb({ activeThreadId: n, threadId: S, isInternal: z, editor: t });
9266
+ M || (M = n === x);
9267
+ let V = nb({ activeThreadId: n, threadId: x, isInternal: z, editor: t });
9265
9268
  const j = $.inline(w, w + b.nodeSize, {
9266
9269
  style: `background-color: ${V};`,
9267
- "data-thread-id": S,
9270
+ "data-thread-id": x,
9268
9271
  class: "comment-highlight"
9269
9272
  });
9270
- M && n !== S || u.push(j);
9273
+ M && n !== x || u.push(j);
9271
9274
  });
9272
9275
  const k = Pd({
9273
9276
  doc: c,
@@ -9435,9 +9438,9 @@ const Od = (t) => {
9435
9438
  const s = e.insertedMark || e.deletionMark || e.formatMark, { type: a, attrs: l } = s, { name: c } = a, { author: d, authorEmail: u, date: f } = l, p = l.id, h = r[0], m = !!(e.insertedMark && e.deletionMark);
9436
9439
  let g;
9437
9440
  o.doc.descendants((y, M) => {
9438
- const { marks: k = [] } = y, A = k.filter((S) => Vs.includes(S.type.name));
9441
+ const { marks: k = [] } = y, A = k.filter((x) => Vs.includes(x.type.name));
9439
9442
  if (!A.length) return;
9440
- if (A.find((S) => S.attrs.id === p) && (g = y), g) return !1;
9443
+ if (A.find((x) => x.attrs.id === p) && (g = y), g) return !1;
9441
9444
  });
9442
9445
  const { deletionText: b, trackedChangeText: w } = ab({
9443
9446
  state: o,
@@ -9484,7 +9487,7 @@ const Id = ({ state: t, tr: e, step: n, newTr: r, map: o, doc: i, user: s, date:
9484
9487
  const g = t.apply(r).tr;
9485
9488
  if (g.maybeStep(p).failed)
9486
9489
  return;
9487
- const b = p.getMap().map(p.to), w = Sd({
9490
+ const b = p.getMap().map(p.to), w = xd({
9488
9491
  tr: g,
9489
9492
  from: p.from,
9490
9493
  to: b,
@@ -9496,7 +9499,7 @@ const Id = ({ state: t, tr: e, step: n, newTr: r, map: o, doc: i, user: s, date:
9496
9499
  o.appendMap(C.getMap(), y), p.from !== b && (m.insertedMark = w, m.step = C), r.selection.eq(g.selection) || r.setSelection(g.selection);
9497
9500
  }
9498
9501
  if (n.from !== n.to) {
9499
- const { deletionMark: g, deletionMap: b, nodes: w } = xd({
9502
+ const { deletionMark: g, deletionMap: b, nodes: w } = Sd({
9500
9503
  tr: r,
9501
9504
  from: n.from,
9502
9505
  to: n.to,
@@ -9668,11 +9671,11 @@ const Id = ({ state: t, tr: e, step: n, newTr: r, map: o, doc: i, user: s, date:
9668
9671
  }, ol = (t) => {
9669
9672
  if (t === "initial" || t === "0.4.14") return Object.values(pb);
9670
9673
  };
9671
- var en, bs, x, Bd, zd, qi, Ki, _d, Xi, Ji, Yi, Gi, Zi, Qi, es, ts, ns, rs, $d, Zn, Qn, Vd, Hd, jd, Wd;
9674
+ var en, bs, S, Bd, zd, qi, Ki, _d, Xi, Ji, Yi, Gi, Zi, Qi, es, ts, ns, rs, $d, Zn, Qn, Vd, Hd, jd, Wd;
9672
9675
  const Qs = class Qs extends gg {
9673
9676
  constructor(n) {
9674
9677
  super();
9675
- ft(this, x);
9678
+ ft(this, S);
9676
9679
  ft(this, en);
9677
9680
  I(this, "extensionService");
9678
9681
  I(this, "extensionStorage", {});
@@ -9740,11 +9743,11 @@ const Qs = class Qs extends gg {
9740
9743
  // telemetry
9741
9744
  telemetry: null
9742
9745
  });
9743
- N(this, x, Bd).call(this, n), N(this, x, _d).call(this, n), this.setOptions(n);
9746
+ N(this, S, Bd).call(this, n), N(this, S, _d).call(this, n), this.setOptions(n);
9744
9747
  let r = {
9745
- docx: () => N(this, x, zd).call(this, this.options),
9746
- text: () => N(this, x, qi).call(this, this.options),
9747
- html: () => N(this, x, qi).call(this, this.options),
9748
+ docx: () => N(this, S, zd).call(this, this.options),
9749
+ text: () => N(this, S, qi).call(this, this.options),
9750
+ html: () => N(this, S, qi).call(this, this.options),
9748
9751
  default: () => {
9749
9752
  console.log("Not implemented.");
9750
9753
  }
@@ -9810,7 +9813,7 @@ const Qs = class Qs extends gg {
9810
9813
  }
9811
9814
  setDocumentMode(n) {
9812
9815
  let r = n?.toLowerCase() || "editing";
9813
- this.extensionService && (this.options.role === "viewer" && (r = "viewing"), this.options.role === "suggester" && r === "editing" && (r = "suggesting"), r === "viewing" ? (this.commands.toggleTrackChangesShowOriginal(), this.setEditable(!1, !1)) : r === "suggesting" ? (N(this, x, Ji).call(this, "TrackChangesBase"), this.commands.disableTrackChangesShowOriginal(), this.commands.enableTrackChanges(), this.setEditable(!0, !1)) : r === "editing" && (N(this, x, Ji).call(this, "TrackChangesBase"), this.commands.disableTrackChangesShowOriginal(), this.commands.disableTrackChanges(), this.setEditable(!0, !1)));
9816
+ this.extensionService && (this.options.role === "viewer" && (r = "viewing"), this.options.role === "suggester" && r === "editing" && (r = "suggesting"), r === "viewing" ? (this.commands.toggleTrackChangesShowOriginal(), this.setEditable(!1, !1)) : r === "suggesting" ? (N(this, S, Ji).call(this, "TrackChangesBase"), this.commands.disableTrackChangesShowOriginal(), this.commands.enableTrackChanges(), this.setEditable(!0, !1)) : r === "editing" && (N(this, S, Ji).call(this, "TrackChangesBase"), this.commands.disableTrackChangesShowOriginal(), this.commands.disableTrackChanges(), this.setEditable(!0, !1)));
9814
9817
  }
9815
9818
  /**
9816
9819
  * If we are replacing data and have a valid provider, listen for synced event
@@ -9819,9 +9822,9 @@ const Qs = class Qs extends gg {
9819
9822
  initializeCollaborationData() {
9820
9823
  if (!this.options.isNewFile || !this.options.collaborationProvider) return;
9821
9824
  const { collaborationProvider: n } = this.options, r = () => {
9822
- n.off("synced", r), N(this, x, Xi).call(this);
9825
+ n.off("synced", r), N(this, S, Xi).call(this);
9823
9826
  };
9824
- n.synced ? N(this, x, Xi).call(this) : n.on("synced", r);
9827
+ n.synced ? N(this, S, Xi).call(this) : n.on("synced", r);
9825
9828
  }
9826
9829
  /**
9827
9830
  * Set editor options and update state.
@@ -9984,13 +9987,14 @@ const Qs = class Qs extends gg {
9984
9987
  * Export the editor document to DOCX.
9985
9988
  */
9986
9989
  async exportDocx({ isFinalDoc: n = !1, commentsType: r, comments: o = [] } = {}) {
9987
- const i = N(this, x, jd).call(this, o), s = await this.converter.exportToDocx(
9990
+ const i = N(this, S, jd).call(this, o), s = await this.converter.exportToDocx(
9988
9991
  i,
9989
9992
  this.schema,
9990
9993
  this.storage.image.media,
9991
9994
  n,
9992
9995
  r,
9993
- o
9996
+ o,
9997
+ this
9994
9998
  ), a = this.converter.schemaToXml(this.converter.convertedXml["docProps/custom.xml"].elements[0]), l = this.converter.schemaToXml(this.converter.convertedXml["word/styles.xml"].elements[0]), c = this.converter.schemaToXml(this.converter.convertedXml["word/settings.xml"].elements[0]), d = this.converter.schemaToXml(this.converter.convertedXml["word/_rels/document.xml.rels"].elements[0]), u = this.converter.addedMedia, f = this.converter.convertedXml["word/numbering.xml"], p = this.converter.schemaToXml(f.elements[0]), h = {
9995
9999
  "word/document.xml": String(s),
9996
10000
  "docProps/custom.xml": String(a),
@@ -10021,7 +10025,7 @@ const Qs = class Qs extends gg {
10021
10025
  * Destroy the editor.
10022
10026
  */
10023
10027
  destroy() {
10024
- this.emit("destroy"), this.view && this.view.destroy(), N(this, x, Wd).call(this), this.removeAllListeners();
10028
+ this.emit("destroy"), this.view && this.view.destroy(), N(this, S, Wd).call(this), this.removeAllListeners();
10025
10029
  }
10026
10030
  static checkIfMigrationsNeeded(n) {
10027
10031
  n || (n = "initial");
@@ -10034,7 +10038,7 @@ const Qs = class Qs extends gg {
10034
10038
  * @returns {Y.Doc | undefined} Updated Y.Doc if any, otherwise undefined
10035
10039
  */
10036
10040
  processCollaborationMigrations() {
10037
- if (console.debug("[checkVersionMigrations] Current editor version", "0.10.23"), !this.options.ydoc) return;
10041
+ if (console.debug("[checkVersionMigrations] Current editor version", "0.10.24-RC1"), !this.options.ydoc) return;
10038
10042
  let r = this.options.ydoc.getMap("meta").get("version");
10039
10043
  r || (r = "initial"), console.debug("[checkVersionMigrations] Document version", r);
10040
10044
  const o = ol(r) || [], s = this.state.plugins.find((c) => c.key.startsWith("y-sync"));
@@ -10056,21 +10060,21 @@ const Qs = class Qs extends gg {
10056
10060
  isNewFile: !0,
10057
10061
  shouldLoadComments: !0,
10058
10062
  replacedFile: !0
10059
- }), N(this, x, Zi).call(this), N(this, x, Qi).call(this), this.initDefaultStyles(), this.initializeCollaborationData(!0), this.options.ydoc || (N(this, x, Qn).call(this), N(this, x, Zn).call(this));
10063
+ }), N(this, S, Zi).call(this), N(this, S, Qi).call(this), this.initDefaultStyles(), this.initializeCollaborationData(!0), this.options.ydoc || (N(this, S, Qn).call(this), N(this, S, Zn).call(this));
10060
10064
  }
10061
10065
  };
10062
- en = new WeakMap(), bs = new WeakMap(), x = new WeakSet(), Bd = function(n) {
10066
+ en = new WeakMap(), bs = new WeakMap(), S = new WeakSet(), Bd = function(n) {
10063
10067
  if (!n.element && n.selector) {
10064
10068
  const { selector: r } = n;
10065
10069
  r.startsWith("#") || r.startsWith(".") ? n.element = document.querySelector(r) : n.element = document.getElementById(r), ["text", "html"].includes(n.mode) && n.element && n.element.classList.add("sd-super-editor-html");
10066
10070
  }
10067
10071
  n.element = n.isHeadless ? null : n.element || document.createElement("div");
10068
10072
  }, zd = function(n) {
10069
- N(this, x, Yi).call(this), N(this, x, Gi).call(this), N(this, x, es).call(this), N(this, x, Zi).call(this), N(this, x, Qi).call(this), this.on("beforeCreate", this.options.onBeforeCreate), this.emit("beforeCreate", { editor: this }), this.on("contentError", this.options.onContentError), this.on("exception", this.options.onException), N(this, x, rs).call(this), this.initDefaultStyles(), this.setDocumentMode(n.documentMode), !this.options.isHeadless && (this.on("create", this.options.onCreate), this.on("update", this.options.onUpdate), this.on("selectionUpdate", this.options.onSelectionUpdate), this.on("transaction", this.options.onTransaction), this.on("focus", N(this, x, Ki)), this.on("blur", this.options.onBlur), this.on("destroy", this.options.onDestroy), this.on("trackedChangesUpdate", this.options.onTrackedChangesUpdate), this.on("commentsLoaded", this.options.onCommentsLoaded), this.on("commentClick", this.options.onCommentClicked), this.on("commentsUpdate", this.options.onCommentsUpdate), this.on("locked", this.options.onDocumentLocked), this.on("collaborationReady", N(this, x, $d)), this.on("paginationUpdate", this.options.onPaginationUpdate), this.on("comment-positions", this.options.onCommentLocationsUpdate), this.initializeCollaborationData(), this.options.ydoc || (N(this, x, Qn).call(this), N(this, x, Zn).call(this)), window.setTimeout(() => {
10073
+ N(this, S, Yi).call(this), N(this, S, Gi).call(this), N(this, S, es).call(this), N(this, S, Zi).call(this), N(this, S, Qi).call(this), this.on("beforeCreate", this.options.onBeforeCreate), this.emit("beforeCreate", { editor: this }), this.on("contentError", this.options.onContentError), this.on("exception", this.options.onException), N(this, S, rs).call(this), this.initDefaultStyles(), this.setDocumentMode(n.documentMode), !this.options.isHeadless && (this.on("create", this.options.onCreate), this.on("update", this.options.onUpdate), this.on("selectionUpdate", this.options.onSelectionUpdate), this.on("transaction", this.options.onTransaction), this.on("focus", N(this, S, Ki)), this.on("blur", this.options.onBlur), this.on("destroy", this.options.onDestroy), this.on("trackedChangesUpdate", this.options.onTrackedChangesUpdate), this.on("commentsLoaded", this.options.onCommentsLoaded), this.on("commentClick", this.options.onCommentClicked), this.on("commentsUpdate", this.options.onCommentsUpdate), this.on("locked", this.options.onDocumentLocked), this.on("collaborationReady", N(this, S, $d)), this.on("paginationUpdate", this.options.onPaginationUpdate), this.on("comment-positions", this.options.onCommentLocationsUpdate), this.initializeCollaborationData(), this.options.ydoc || (N(this, S, Qn).call(this), N(this, S, Zn).call(this)), window.setTimeout(() => {
10070
10074
  this.isDestroyed || this.emit("create", { editor: this });
10071
10075
  }, 0));
10072
10076
  }, qi = function(n) {
10073
- (!n.extensions || !n.extensions.length) && (this.options.extensions = jk()), N(this, x, Yi).call(this), N(this, x, Gi).call(this), N(this, x, es).call(this), this.on("beforeCreate", this.options.onBeforeCreate), this.emit("beforeCreate", { editor: this }), this.on("contentError", this.options.onContentError), N(this, x, rs).call(this), this.on("create", this.options.onCreate), this.on("update", this.options.onUpdate), this.on("selectionUpdate", this.options.onSelectionUpdate), this.on("transaction", this.options.onTransaction), this.on("focus", N(this, x, Ki)), this.on("blur", this.options.onBlur), this.on("destroy", this.options.onDestroy), this.on("commentsLoaded", this.options.onCommentsLoaded), this.on("commentClick", this.options.onCommentClicked), this.on("locked", this.options.onDocumentLocked), window.setTimeout(() => {
10077
+ (!n.extensions || !n.extensions.length) && (this.options.extensions = jk()), N(this, S, Yi).call(this), N(this, S, Gi).call(this), N(this, S, es).call(this), this.on("beforeCreate", this.options.onBeforeCreate), this.emit("beforeCreate", { editor: this }), this.on("contentError", this.options.onContentError), N(this, S, rs).call(this), this.on("create", this.options.onCreate), this.on("update", this.options.onUpdate), this.on("selectionUpdate", this.options.onSelectionUpdate), this.on("transaction", this.options.onTransaction), this.on("focus", N(this, S, Ki)), this.on("blur", this.options.onBlur), this.on("destroy", this.options.onDestroy), this.on("commentsLoaded", this.options.onCommentsLoaded), this.on("commentClick", this.options.onCommentClicked), this.on("locked", this.options.onDocumentLocked), window.setTimeout(() => {
10074
10078
  this.isDestroyed || this.emit("create", { editor: this });
10075
10079
  }, 0);
10076
10080
  }, Ki = function({ editor: n, event: r }) {
@@ -10084,9 +10088,9 @@ en = new WeakMap(), bs = new WeakMap(), x = new WeakSet(), Bd = function(n) {
10084
10088
  Xi = function() {
10085
10089
  if (!this.options.isNewFile) return;
10086
10090
  this.options.isNewFile = !1;
10087
- const n = N(this, x, ts).call(this), r = this.state.tr.replaceWith(0, this.state.doc.content.size, n);
10091
+ const n = N(this, S, ts).call(this), r = this.state.tr.replaceWith(0, this.state.doc.content.size, n);
10088
10092
  this.view.dispatch(r), setTimeout(() => {
10089
- N(this, x, Qn).call(this), N(this, x, Zn).call(this);
10093
+ N(this, S, Qn).call(this), N(this, S, Zn).call(this);
10090
10094
  }, 50);
10091
10095
  }, Ji = function(n) {
10092
10096
  const r = this.extensionService?.plugins.find((i) => i.key.startsWith(n)), o = this.state.plugins.find((i) => i.key.startsWith(n));
@@ -10139,7 +10143,7 @@ ts = function() {
10139
10143
  let n;
10140
10144
  try {
10141
10145
  const { mode: r, fragment: o, isHeadless: i, content: s, loadFromSchema: a } = this.options;
10142
- r === "docx" ? (n = Cd(this.converter, this.schema, this), n = N(this, x, Hd).call(this, n), this.options.html && (n = N(this, x, ns).call(this, this.options.html)), o && i && (n = ig(o, this.schema))) : (r === "text" || r === "html") && (a ? n = this.schema.nodeFromJSON(s) : s ? n = N(this, x, ns).call(this, s) : n = this.schema.topNodeType.createAndFill());
10146
+ r === "docx" ? (n = Cd(this.converter, this.schema, this), n = N(this, S, Hd).call(this, n), this.options.html && (n = N(this, S, ns).call(this, this.options.html)), o && i && (n = ig(o, this.schema))) : (r === "text" || r === "html") && (a ? n = this.schema.nodeFromJSON(s) : s ? n = N(this, S, ns).call(this, s) : n = this.schema.topNodeType.createAndFill());
10143
10147
  } catch (r) {
10144
10148
  console.error(r), this.emit("contentError", { editor: this, error: r });
10145
10149
  }
@@ -10160,11 +10164,11 @@ ns = function(n) {
10160
10164
  * Creates PM View.
10161
10165
  */
10162
10166
  rs = function() {
10163
- let n = N(this, x, ts).call(this);
10167
+ let n = N(this, S, ts).call(this);
10164
10168
  const r = { schema: this.schema };
10165
10169
  this.options.ydoc || (r.doc = n), this.view = new jc(this.options.element, {
10166
10170
  ...this.options.editorProps,
10167
- dispatchTransaction: N(this, x, Vd).bind(this),
10171
+ dispatchTransaction: N(this, S, Vd).bind(this),
10168
10172
  state: oo.create(r)
10169
10173
  });
10170
10174
  const o = this.state.reconfigure({
@@ -10174,7 +10178,7 @@ rs = function() {
10174
10178
  const i = this.view.dom;
10175
10179
  i.editor = this, this.options.telemetry?.sendReport();
10176
10180
  }, $d = function({ editor: n, ydoc: r }) {
10177
- this.options.collaborationIsReady || (console.debug("🔗 [super-editor] Collaboration ready"), this.options.onCollaborationReady({ editor: n, ydoc: r }), this.options.collaborationIsReady = !0, this.options.isNewFile || (N(this, x, Qn).call(this), N(this, x, Zn).call(this)));
10181
+ this.options.collaborationIsReady || (console.debug("🔗 [super-editor] Collaboration ready"), this.options.onCollaborationReady({ editor: n, ydoc: r }), this.options.collaborationIsReady = !0, this.options.isNewFile || (N(this, S, Qn).call(this), N(this, S, Zn).call(this)));
10178
10182
  }, /**
10179
10183
  * Initialize comments plugin
10180
10184
  */
@@ -10309,13 +10313,14 @@ class Oe {
10309
10313
  I(this, "name", "mark");
10310
10314
  I(this, "options");
10311
10315
  I(this, "storage");
10316
+ I(this, "isExternal");
10312
10317
  I(this, "config", {
10313
10318
  name: this.name
10314
10319
  });
10315
10320
  this.config = {
10316
10321
  ...this.config,
10317
10322
  ...e
10318
- }, this.name = this.config.name, this.config.addOptions && (this.options = K(
10323
+ }, this.name = this.config.name, this.isExternal = !!this.config.isExternal, this.config.addOptions && (this.options = K(
10319
10324
  E(this, "addOptions", {
10320
10325
  name: this.name
10321
10326
  })
@@ -10915,7 +10920,7 @@ const Mb = Q.create({
10915
10920
  })) ?? null
10916
10921
  };
10917
10922
  }
10918
- }), Sb = new G("collaboration"), xb = Q.create({
10923
+ }), xb = new G("collaboration"), Sb = Q.create({
10919
10924
  name: "collaboration",
10920
10925
  priority: 1e3,
10921
10926
  addOptions() {
@@ -11352,10 +11357,10 @@ function _b(t) {
11352
11357
  }), l = !0, w = g), f.forEach((y, M) => {
11353
11358
  if (M === 0)
11354
11359
  return;
11355
- let { node: k, pos: A } = y, { lvlText: F, listLevel: S, listNumberingType: _ } = k.attrs;
11360
+ let { node: k, pos: A } = y, { lvlText: F, listLevel: x, listNumberingType: _ } = k.attrs;
11356
11361
  Array.isArray(w.listLevel) || (w.listLevel = JSON.parse(w.listLevel));
11357
11362
  let z = [...w.listLevel.slice(0, -1), w.listLevel.at(-1) + 1];
11358
- if (!(F === w.lvlText && _ === w.listNumberingType && sl(S, z))) {
11363
+ if (!(F === w.lvlText && _ === w.listNumberingType && sl(x, z))) {
11359
11364
  let { selection: j, storedMarks: se } = r, ce = se || j.$to.parentOffset && j.$from.marks();
11360
11365
  s.setNodeMarkup(A, void 0, {
11361
11366
  ...k.attrs,
@@ -12659,7 +12664,7 @@ function M0(t) {
12659
12664
  function as(t) {
12660
12665
  return t.parent.type.spec.tableRole == "row" && !!t.nodeAfter;
12661
12666
  }
12662
- function S0(t) {
12667
+ function x0(t) {
12663
12668
  return t.node(0).resolve(t.pos + t.nodeAfter.nodeSize);
12664
12669
  }
12665
12670
  function Ws(t, e) {
@@ -12681,7 +12686,7 @@ function pu(t, e, n = 1) {
12681
12686
  }
12682
12687
  return r;
12683
12688
  }
12684
- function x0(t, e, n) {
12689
+ function S0(t, e, n) {
12685
12690
  const r = we(e.type.schema).header_cell;
12686
12691
  for (let o = 0; o < t.height; o++)
12687
12692
  if (e.nodeAt(t.map[n + o * t.width]).type != r)
@@ -13006,7 +13011,7 @@ function at(t) {
13006
13011
  }
13007
13012
  function yu(t, { map: e, tableStart: n, table: r }, o) {
13008
13013
  let i = o > 0 ? -1 : 0;
13009
- x0(e, r, o + i) && (i = o == 0 || o == e.width ? null : 0);
13014
+ S0(e, r, o + i) && (i = o == 0 || o == e.width ? null : 0);
13010
13015
  for (let s = 0; s < e.height; s++) {
13011
13016
  const a = s * e.width + o;
13012
13017
  if (o > 0 && o < e.width && e.map[a - 1] == e.map[a]) {
@@ -13402,7 +13407,7 @@ function vl(t) {
13402
13407
  if (n) {
13403
13408
  const o = e.doc.resolve(r);
13404
13409
  n(
13405
- e.tr.setSelection(H.between(o, S0(o))).scrollIntoView()
13410
+ e.tr.setSelection(H.between(o, x0(o))).scrollIntoView()
13406
13411
  );
13407
13412
  }
13408
13413
  return !0;
@@ -13729,7 +13734,7 @@ function tw(t, e, n) {
13729
13734
  function nw(t, e) {
13730
13735
  var n;
13731
13736
  if (e.ctrlKey || e.metaKey) return;
13732
- const r = Sl(t, e.target);
13737
+ const r = xl(t, e.target);
13733
13738
  let o;
13734
13739
  if (e.shiftKey && t.state.selection instanceof X)
13735
13740
  i(t.state.selection.$anchorCell, e), e.preventDefault();
@@ -13757,7 +13762,7 @@ function nw(t, e) {
13757
13762
  let u;
13758
13763
  if (d != null)
13759
13764
  u = t.state.doc.resolve(d);
13760
- else if (Sl(t, c.target) != r && (u = fi(t, e), !u))
13765
+ else if (xl(t, c.target) != r && (u = fi(t, e), !u))
13761
13766
  return s();
13762
13767
  u && i(u, c);
13763
13768
  }
@@ -13776,7 +13781,7 @@ function wu(t, e, n) {
13776
13781
  }
13777
13782
  return null;
13778
13783
  }
13779
- function Sl(t, e) {
13784
+ function xl(t, e) {
13780
13785
  for (; e && e != t.dom; e = e.parentNode)
13781
13786
  if (e.nodeName == "TD" || e.nodeName == "TH")
13782
13787
  return e;
@@ -13905,7 +13910,7 @@ function sw(t, e, n, r) {
13905
13910
  let s = -1;
13906
13911
  if (i) {
13907
13912
  const { left: a, right: l } = i.getBoundingClientRect();
13908
- e.clientX - a <= n ? s = xl(t, e, "left", n) : l - e.clientX <= n && (s = xl(t, e, "right", n));
13913
+ e.clientX - a <= n ? s = Sl(t, e, "left", n) : l - e.clientX <= n && (s = Sl(t, e, "right", n));
13909
13914
  }
13910
13915
  if (s != o.activeHandle) {
13911
13916
  if (!r && s !== -1) {
@@ -13980,7 +13985,7 @@ function dw(t) {
13980
13985
  t = t.classList && t.classList.contains("ProseMirror") ? null : t.parentNode;
13981
13986
  return t;
13982
13987
  }
13983
- function xl(t, e, n, r) {
13988
+ function Sl(t, e, n, r) {
13984
13989
  const o = n == "right" ? -r : r, i = t.posAtCoords({
13985
13990
  left: e.clientX + o,
13986
13991
  top: e.clientY
@@ -14315,7 +14320,7 @@ const mw = (t) => t instanceof X, eo = ({ editor: t }) => {
14315
14320
  renderDOM({ htmlAttributes: t }) {
14316
14321
  return ["th", D.mergeAttributes(this.options.htmlAttributes, t), 0];
14317
14322
  }
14318
- }), Su = J.create({
14323
+ }), xu = J.create({
14319
14324
  name: "tableRow",
14320
14325
  content: "(tableCell | tableHeader)*",
14321
14326
  tableRole: "row",
@@ -14339,7 +14344,7 @@ const mw = (t) => t instanceof X, eo = ({ editor: t }) => {
14339
14344
  renderDOM({ htmlAttributes: t }) {
14340
14345
  return ["tr", D.mergeAttributes(this.options.htmlAttributes, t), 0];
14341
14346
  }
14342
- }), xu = J.create({
14347
+ }), Su = J.create({
14343
14348
  name: "tableCell",
14344
14349
  content: "block+",
14345
14350
  tableRole: "cell",
@@ -14711,9 +14716,9 @@ function uo(t, e) {
14711
14716
  });
14712
14717
  }
14713
14718
  function Mw(t, e) {
14714
- return Sw(e.doc, (r) => r.type.name === "fieldAnnotation" && r.attrs.fieldId === t);
14719
+ return xw(e.doc, (r) => r.type.name === "fieldAnnotation" && r.attrs.fieldId === t);
14715
14720
  }
14716
- function Sw(t, e) {
14721
+ function xw(t, e) {
14717
14722
  let n = null;
14718
14723
  return t.descendants((r, o) => {
14719
14724
  if (e(r) && (n = { node: r, pos: o }), n) return !1;
@@ -14742,12 +14747,12 @@ const t1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
14742
14747
  function ds(t, e, n) {
14743
14748
  return Math.min(Math.max(t, n), e);
14744
14749
  }
14745
- class xw extends Error {
14750
+ class Sw extends Error {
14746
14751
  constructor(e) {
14747
14752
  super(`Failed to parse color: "${e}"`);
14748
14753
  }
14749
14754
  }
14750
- var er = xw;
14755
+ var er = Sw;
14751
14756
  function Aw(t) {
14752
14757
  if (typeof t != "string") throw new er(t);
14753
14758
  if (t.trim().toLowerCase() === "transparent") return [0, 0, 0, 0];
@@ -15890,8 +15895,8 @@ const jw = "track-insert", _u = Oe.create({
15890
15895
  documentHelpers: Yy,
15891
15896
  findTrackedMarkBetween: zs,
15892
15897
  getTrackChanges: $s,
15893
- markDeletion: xd,
15894
- markInsertion: Sd,
15898
+ markDeletion: Sd,
15899
+ markInsertion: xd,
15895
15900
  markWrapping: db,
15896
15901
  parseFormatList: fs,
15897
15902
  removeMarkStep: Ld,
@@ -16424,11 +16429,11 @@ function Rl(t) {
16424
16429
  var k = Rr(n), A = "clientHeight", F = "clientWidth";
16425
16430
  if (k === Le(n) && (k = Wt(n), Ct(k).position !== "static" && a === "absolute" && (A = "scrollHeight", F = "scrollWidth")), k = k, o === De || (o === Ne || o === Ue) && i === Mr) {
16426
16431
  y = We;
16427
- var S = u && k === M && M.visualViewport ? M.visualViewport.height : (
16432
+ var x = u && k === M && M.visualViewport ? M.visualViewport.height : (
16428
16433
  // $FlowFixMe[prop-missing]
16429
16434
  k[A]
16430
16435
  );
16431
- m -= S - r.height, m *= l ? 1 : -1;
16436
+ m -= x - r.height, m *= l ? 1 : -1;
16432
16437
  }
16433
16438
  if (o === Ne || (o === De || o === We) && i === Mr) {
16434
16439
  C = Ue;
@@ -16550,7 +16555,7 @@ function Mv(t, e) {
16550
16555
  y: l
16551
16556
  };
16552
16557
  }
16553
- function Sv(t) {
16558
+ function xv(t) {
16554
16559
  var e, n = Wt(t), r = Js(t), o = (e = t.ownerDocument) == null ? void 0 : e.body, i = sn(n.scrollWidth, n.clientWidth, o ? o.scrollWidth : 0, o ? o.clientWidth : 0), s = sn(n.scrollHeight, n.clientHeight, o ? o.scrollHeight : 0, o ? o.clientHeight : 0), a = -r.scrollLeft + Ys(t), l = -r.scrollTop;
16555
16560
  return Ct(o || n).direction === "rtl" && (a += sn(n.clientWidth, o ? o.clientWidth : 0) - i), {
16556
16561
  width: i,
@@ -16583,12 +16588,12 @@ function hs(t) {
16583
16588
  bottom: t.y + t.height
16584
16589
  });
16585
16590
  }
16586
- function xv(t, e) {
16591
+ function Sv(t, e) {
16587
16592
  var n = Fn(t, !1, e === "fixed");
16588
16593
  return n.top = n.top + t.clientTop, n.left = n.left + t.clientLeft, n.bottom = n.top + t.clientHeight, n.right = n.left + t.clientWidth, n.width = t.clientWidth, n.height = t.clientHeight, n.x = n.left, n.y = n.top, n;
16589
16594
  }
16590
16595
  function Fl(t, e, n) {
16591
- return e === Hu ? hs(Mv(t, n)) : un(e) ? xv(e, n) : hs(Sv(Wt(t)));
16596
+ return e === Hu ? hs(Mv(t, n)) : un(e) ? Sv(e, n) : hs(xv(Wt(t)));
16592
16597
  }
16593
16598
  function Av(t) {
16594
16599
  var e = ar(Vo(t)), n = ["absolute", "fixed"].indexOf(Ct(t).position) >= 0, r = n && je(t) ? Rr(t) : t;
@@ -16650,17 +16655,17 @@ function Gu(t) {
16650
16655
  }
16651
16656
  return l;
16652
16657
  }
16653
- function Sr(t, e) {
16658
+ function xr(t, e) {
16654
16659
  e === void 0 && (e = {});
16655
16660
  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 ? Xw : a, c = n.rootBoundary, d = c === void 0 ? Hu : c, u = n.elementContext, f = u === void 0 ? Yn : u, p = n.altBoundary, h = p === void 0 ? !1 : p, m = n.padding, g = m === void 0 ? 0 : m, b = Xu(typeof g != "number" ? g : Ju(g, Ir)), w = f === Yn ? Jw : Yn, C = t.rects.popper, y = t.elements[h ? w : f], M = Ov(un(y) ? y : y.contextElement || Wt(t.elements.popper), l, d, s), k = Fn(t.elements.reference), A = Gu({
16656
16661
  reference: k,
16657
16662
  element: C,
16658
16663
  placement: o
16659
- }), F = hs(Object.assign({}, C, A)), S = f === Yn ? F : k, _ = {
16660
- top: M.top - S.top + b.top,
16661
- bottom: S.bottom - M.bottom + b.bottom,
16662
- left: M.left - S.left + b.left,
16663
- right: S.right - M.right + b.right
16664
+ }), F = hs(Object.assign({}, C, A)), x = f === Yn ? F : k, _ = {
16665
+ top: M.top - x.top + b.top,
16666
+ bottom: x.bottom - M.bottom + b.bottom,
16667
+ left: M.left - x.left + b.left,
16668
+ right: x.right - M.right + b.right
16664
16669
  }, z = t.modifiersData.offset;
16665
16670
  if (f === Yn && z) {
16666
16671
  var V = z[o];
@@ -16680,7 +16685,7 @@ function Tv(t, e) {
16680
16685
  });
16681
16686
  f.length === 0 && (f = u);
16682
16687
  var p = f.reduce(function(h, m) {
16683
- return h[m] = Sr(t, {
16688
+ return h[m] = xr(t, {
16684
16689
  placement: m,
16685
16690
  boundary: o,
16686
16691
  rootBoundary: i,
@@ -16709,8 +16714,8 @@ function Nv(t) {
16709
16714
  flipVariations: h,
16710
16715
  allowedAutoPlacements: m
16711
16716
  }) : Ee);
16712
- }, []), M = e.rects.reference, k = e.rects.popper, A = /* @__PURE__ */ new Map(), F = !0, S = y[0], _ = 0; _ < y.length; _++) {
16713
- var z = y[_], V = rt(z), j = Bn(z) === Rn, se = [De, We].indexOf(V) >= 0, ce = se ? "width" : "height", ae = Sr(e, {
16717
+ }, []), M = e.rects.reference, k = e.rects.popper, A = /* @__PURE__ */ new Map(), F = !0, x = y[0], _ = 0; _ < y.length; _++) {
16718
+ var z = y[_], V = rt(z), j = Bn(z) === Rn, se = [De, We].indexOf(V) >= 0, ce = se ? "width" : "height", ae = xr(e, {
16714
16719
  placement: z,
16715
16720
  boundary: d,
16716
16721
  rootBoundary: u,
@@ -16722,27 +16727,27 @@ function Nv(t) {
16722
16727
  if (i && ve.push(ae[V] <= 0), a && ve.push(ae[ee] <= 0, ae[ne] <= 0), ve.every(function(qe) {
16723
16728
  return qe;
16724
16729
  })) {
16725
- S = z, F = !1;
16730
+ x = z, F = !1;
16726
16731
  break;
16727
16732
  }
16728
16733
  A.set(z, ve);
16729
16734
  }
16730
16735
  if (F)
16731
16736
  for (var ke = h ? 3 : 1, lt = function(Ee) {
16732
- var Ke = y.find(function(St) {
16733
- var dt = A.get(St);
16737
+ var Ke = y.find(function(xt) {
16738
+ var dt = A.get(xt);
16734
16739
  if (dt)
16735
16740
  return dt.slice(0, Ee).every(function(fn) {
16736
16741
  return fn;
16737
16742
  });
16738
16743
  });
16739
16744
  if (Ke)
16740
- return S = Ke, "break";
16745
+ return x = Ke, "break";
16741
16746
  }, Fe = ke; Fe > 0; Fe--) {
16742
16747
  var ct = lt(Fe);
16743
16748
  if (ct === "break") break;
16744
16749
  }
16745
- e.placement !== S && (e.modifiersData[r]._skip = !0, e.placement = S, e.reset = !0);
16750
+ e.placement !== x && (e.modifiersData[r]._skip = !0, e.placement = x, e.reset = !0);
16746
16751
  }
16747
16752
  }
16748
16753
  const Ev = {
@@ -16772,9 +16777,9 @@ function zl(t) {
16772
16777
  });
16773
16778
  }
16774
16779
  function Pv(t) {
16775
- var e = t.state, n = t.name, r = e.rects.reference, o = e.rects.popper, i = e.modifiersData.preventOverflow, s = Sr(e, {
16780
+ var e = t.state, n = t.name, r = e.rects.reference, o = e.rects.popper, i = e.modifiersData.preventOverflow, s = xr(e, {
16776
16781
  elementContext: "reference"
16777
- }), a = Sr(e, {
16782
+ }), a = xr(e, {
16778
16783
  altBoundary: !0
16779
16784
  }), l = Bl(s, r), c = Bl(a, o, i), d = zl(l), u = zl(c);
16780
16785
  e.modifiersData[n] = {
@@ -16838,20 +16843,20 @@ function _v(t) {
16838
16843
  return t === "x" ? "y" : "x";
16839
16844
  }
16840
16845
  function $v(t) {
16841
- var e = t.state, n = t.options, r = t.name, o = n.mainAxis, i = o === void 0 ? !0 : o, s = n.altAxis, a = s === void 0 ? !1 : s, l = n.boundary, c = n.rootBoundary, d = n.altBoundary, u = n.padding, f = n.tether, p = f === void 0 ? !0 : f, h = n.tetherOffset, m = h === void 0 ? 0 : h, g = Sr(e, {
16846
+ var e = t.state, n = t.options, r = t.name, o = n.mainAxis, i = o === void 0 ? !0 : o, s = n.altAxis, a = s === void 0 ? !1 : s, l = n.boundary, c = n.rootBoundary, d = n.altBoundary, u = n.padding, f = n.tether, p = f === void 0 ? !0 : f, h = n.tetherOffset, m = h === void 0 ? 0 : h, g = xr(e, {
16842
16847
  boundary: l,
16843
16848
  rootBoundary: c,
16844
16849
  padding: u,
16845
16850
  altBoundary: d
16846
- }), b = rt(e.placement), w = Bn(e.placement), C = !w, y = Xs(b), M = _v(y), k = e.modifiersData.popperOffsets, A = e.rects.reference, F = e.rects.popper, S = typeof m == "function" ? m(Object.assign({}, e.rects, {
16851
+ }), b = rt(e.placement), w = Bn(e.placement), C = !w, y = Xs(b), M = _v(y), k = e.modifiersData.popperOffsets, A = e.rects.reference, F = e.rects.popper, x = typeof m == "function" ? m(Object.assign({}, e.rects, {
16847
16852
  placement: e.placement
16848
- })) : m, _ = typeof S == "number" ? {
16849
- mainAxis: S,
16850
- altAxis: S
16853
+ })) : m, _ = typeof x == "number" ? {
16854
+ mainAxis: x,
16855
+ altAxis: x
16851
16856
  } : Object.assign({
16852
16857
  mainAxis: 0,
16853
16858
  altAxis: 0
16854
- }, S), z = e.modifiersData.offset ? e.modifiersData.offset[e.placement] : null, V = {
16859
+ }, x), z = e.modifiersData.offset ? e.modifiersData.offset[e.placement] : null, V = {
16855
16860
  x: 0,
16856
16861
  y: 0
16857
16862
  };
@@ -16860,7 +16865,7 @@ function $v(t) {
16860
16865
  var j, se = y === "y" ? De : Ne, ce = y === "y" ? We : Ue, ae = y === "y" ? "height" : "width", ee = k[y], ne = ee + g[se], ve = ee - g[ce], ke = p ? -F[ae] / 2 : 0, lt = w === Rn ? A[ae] : F[ae], Fe = w === Rn ? -F[ae] : -A[ae], ct = e.elements.arrow, qe = p && ct ? Ks(ct) : {
16861
16866
  width: 0,
16862
16867
  height: 0
16863
- }, Ee = e.modifiersData["arrow#persistent"] ? e.modifiersData["arrow#persistent"].padding : Ku(), Ke = Ee[se], St = Ee[ce], dt = sr(0, A[ae], qe[ae]), fn = C ? A[ae] / 2 - ke - dt - Ke - _.mainAxis : lt - dt - Ke - _.mainAxis, xt = C ? -A[ae] / 2 + ke + dt + St + _.mainAxis : Fe + dt + St + _.mainAxis, pn = e.elements.arrow && Rr(e.elements.arrow), Fr = pn ? y === "y" ? pn.clientTop || 0 : pn.clientLeft || 0 : 0, jn = (j = z?.[y]) != null ? j : 0, Br = ee + fn - jn - Fr, zr = ee + xt - jn, Wn = sr(p ? Do(ne, Br) : ne, ee, p ? sn(ve, zr) : ve);
16868
+ }, Ee = e.modifiersData["arrow#persistent"] ? e.modifiersData["arrow#persistent"].padding : Ku(), Ke = Ee[se], xt = Ee[ce], dt = sr(0, A[ae], qe[ae]), fn = C ? A[ae] / 2 - ke - dt - Ke - _.mainAxis : lt - dt - Ke - _.mainAxis, St = C ? -A[ae] / 2 + ke + dt + xt + _.mainAxis : Fe + dt + xt + _.mainAxis, pn = e.elements.arrow && Rr(e.elements.arrow), Fr = pn ? y === "y" ? pn.clientTop || 0 : pn.clientLeft || 0 : 0, jn = (j = z?.[y]) != null ? j : 0, Br = ee + fn - jn - Fr, zr = ee + St - jn, Wn = sr(p ? Do(ne, Br) : ne, ee, p ? sn(ve, zr) : ve);
16864
16869
  k[y] = Wn, V[y] = Wn - ee;
16865
16870
  }
16866
16871
  if (a) {
@@ -17017,11 +17022,11 @@ function Yv(t) {
17017
17022
  d.reset = !1, y = -1;
17018
17023
  continue;
17019
17024
  }
17020
- var M = d.orderedModifiers[y], k = M.fn, A = M.options, F = A === void 0 ? {} : A, S = M.name;
17025
+ var M = d.orderedModifiers[y], k = M.fn, A = M.options, F = A === void 0 ? {} : A, x = M.name;
17021
17026
  typeof k == "function" && (d = k({
17022
17027
  state: d,
17023
17028
  options: F,
17024
- name: S,
17029
+ name: x,
17025
17030
  instance: p
17026
17031
  }) || d);
17027
17032
  }
@@ -17111,7 +17116,7 @@ function nk(t, e) {
17111
17116
  function rk(t) {
17112
17117
  return t.split(/\s+/).filter(Boolean);
17113
17118
  }
17114
- function xn(t) {
17119
+ function Sn(t) {
17115
17120
  return [].concat(t);
17116
17121
  }
17117
17122
  function Hl(t, e) {
@@ -17136,7 +17141,7 @@ function jl(t) {
17136
17141
  function lr() {
17137
17142
  return document.createElement("div");
17138
17143
  }
17139
- function xr(t) {
17144
+ function Sr(t) {
17140
17145
  return ["Element", "Fragment"].some(function(e) {
17141
17146
  return Zs(t, e);
17142
17147
  });
@@ -17151,7 +17156,7 @@ function lk(t) {
17151
17156
  return !!(t && t._tippy && t._tippy.reference === t);
17152
17157
  }
17153
17158
  function ck(t) {
17154
- return xr(t) ? [t] : sk(t) ? No(t) : Array.isArray(t) ? t : No(document.querySelectorAll(t));
17159
+ return Sr(t) ? [t] : sk(t) ? No(t) : Array.isArray(t) ? t : No(document.querySelectorAll(t));
17155
17160
  }
17156
17161
  function hi(t, e) {
17157
17162
  t.forEach(function(n) {
@@ -17164,7 +17169,7 @@ function Wl(t, e) {
17164
17169
  });
17165
17170
  }
17166
17171
  function dk(t) {
17167
- var e, n = xn(t), r = n[0];
17172
+ var e, n = Sn(t), r = n[0];
17168
17173
  return r != null && (e = r.ownerDocument) != null && e.body ? r.ownerDocument : document;
17169
17174
  }
17170
17175
  function uk(t, e) {
@@ -17387,18 +17392,18 @@ function lf(t, e) {
17387
17392
  `, "Plugins: https://atomiks.github.io/tippyjs/v6/plugins/"].join(" "));
17388
17393
  });
17389
17394
  }
17390
- var Sk = function() {
17395
+ var xk = function() {
17391
17396
  return "innerHTML";
17392
17397
  };
17393
17398
  function gs(t, e) {
17394
- t[Sk()] = e;
17399
+ t[xk()] = e;
17395
17400
  }
17396
17401
  function Jl(t) {
17397
17402
  var e = lr();
17398
- return t === !0 ? e.className = Qu : (e.className = ef, xr(t) ? e.appendChild(t) : gs(e, t)), e;
17403
+ return t === !0 ? e.className = Qu : (e.className = ef, Sr(t) ? e.appendChild(t) : gs(e, t)), e;
17399
17404
  }
17400
17405
  function Yl(t, e) {
17401
- xr(e.content) ? (gs(t, ""), t.appendChild(e.content)) : typeof e.content != "function" && (e.allowHTML ? gs(t, e.content) : t.textContent = e.content);
17406
+ Sr(e.content) ? (gs(t, ""), t.appendChild(e.content)) : typeof e.content != "function" && (e.allowHTML ? gs(t, e.content) : t.textContent = e.content);
17402
17407
  }
17403
17408
  function ys(t) {
17404
17409
  var e = t.firstElementChild, n = No(e.children);
@@ -17430,9 +17435,9 @@ function cf(t) {
17430
17435
  };
17431
17436
  }
17432
17437
  cf.$$tippy = !0;
17433
- var xk = 1, no = [], gi = [];
17438
+ var Sk = 1, no = [], gi = [];
17434
17439
  function Ak(t, e) {
17435
- var n = Xl(t, Object.assign({}, Ie, af(jl(e)))), r, o, i, s = !1, a = !1, l = !1, c = !1, d, u, f, p = [], h = Vl(Br, n.interactiveDebounce), m, g = xk++, b = null, w = ok(n.plugins), C = {
17440
+ var n = Xl(t, Object.assign({}, Ie, af(jl(e)))), r, o, i, s = !1, a = !1, l = !1, c = !1, d, u, f, p = [], h = Vl(Br, n.interactiveDebounce), m, g = Sk++, b = null, w = ok(n.plugins), C = {
17436
17441
  // Is the instance currently enabled?
17437
17442
  isEnabled: !0,
17438
17443
  // Is the tippy currently showing and not transitioning out?
@@ -17470,7 +17475,7 @@ function Ak(t, e) {
17470
17475
  k.setAttribute("data-tippy-root", ""), k.id = "tippy-" + y.id, y.popper = k, t._tippy = y, k._tippy = y;
17471
17476
  var F = w.map(function(v) {
17472
17477
  return v.fn(y);
17473
- }), S = t.hasAttribute("aria-expanded");
17478
+ }), x = t.hasAttribute("aria-expanded");
17474
17479
  return pn(), ke(), ee(), ne("onCreate", [y]), n.showOnCreate && qn(), k.addEventListener("mouseenter", function() {
17475
17480
  y.props.interactive && y.state.isVisible && y.clearDelayTimeouts();
17476
17481
  }), k.addEventListener("mouseleave", function() {
@@ -17514,7 +17519,7 @@ function Ak(t, e) {
17514
17519
  function ve() {
17515
17520
  var v = y.props.aria;
17516
17521
  if (v.content) {
17517
- var O = "aria-" + v.content, R = k.id, q = xn(y.props.triggerTarget || t);
17522
+ var O = "aria-" + v.content, R = k.id, q = Sn(y.props.triggerTarget || t);
17518
17523
  q.forEach(function(U) {
17519
17524
  var Ce = U.getAttribute(O);
17520
17525
  if (y.state.isVisible)
@@ -17527,8 +17532,8 @@ function Ak(t, e) {
17527
17532
  }
17528
17533
  }
17529
17534
  function ke() {
17530
- if (!(S || !y.props.aria.expanded)) {
17531
- var v = xn(y.props.triggerTarget || t);
17535
+ if (!(x || !y.props.aria.expanded)) {
17536
+ var v = Sn(y.props.triggerTarget || t);
17532
17537
  v.forEach(function(O) {
17533
17538
  y.props.interactive ? O.setAttribute("aria-expanded", y.state.isVisible && O === j() ? "true" : "false") : O.removeAttribute("aria-expanded");
17534
17539
  });
@@ -17543,7 +17548,7 @@ function Ak(t, e) {
17543
17548
  if (!(tt.isTouch && (l || v.type === "mousedown"))) {
17544
17549
  var O = v.composedPath && v.composedPath()[0] || v.target;
17545
17550
  if (!(y.props.interactive && Ul(k, O))) {
17546
- if (xn(y.props.triggerTarget || t).some(function(R) {
17551
+ if (Sn(y.props.triggerTarget || t).some(function(R) {
17547
17552
  return Ul(R, O);
17548
17553
  })) {
17549
17554
  if (tt.isTouch || y.state.isVisible && y.props.trigger.indexOf("click") >= 0)
@@ -17570,7 +17575,7 @@ function Ak(t, e) {
17570
17575
  var v = se();
17571
17576
  v.removeEventListener("mousedown", Fe, !0), v.removeEventListener("touchend", Fe, Yt), v.removeEventListener("touchstart", qe, Yt), v.removeEventListener("touchmove", ct, Yt);
17572
17577
  }
17573
- function St(v, O) {
17578
+ function xt(v, O) {
17574
17579
  fn(v, function() {
17575
17580
  !y.state.isVisible && k.parentNode && k.parentNode.contains(k) && O();
17576
17581
  });
@@ -17587,9 +17592,9 @@ function Ak(t, e) {
17587
17592
  return O();
17588
17593
  mi(R, "remove", u), mi(R, "add", q), u = q;
17589
17594
  }
17590
- function xt(v, O, R) {
17595
+ function St(v, O, R) {
17591
17596
  R === void 0 && (R = !1);
17592
- var q = xn(y.props.triggerTarget || t);
17597
+ var q = Sn(y.props.triggerTarget || t);
17593
17598
  q.forEach(function(U) {
17594
17599
  U.addEventListener(v, O, R), p.push({
17595
17600
  node: U,
@@ -17600,21 +17605,21 @@ function Ak(t, e) {
17600
17605
  });
17601
17606
  }
17602
17607
  function pn() {
17603
- z() && (xt("touchstart", jn, {
17608
+ z() && (St("touchstart", jn, {
17604
17609
  passive: !0
17605
- }), xt("touchend", zr, {
17610
+ }), St("touchend", zr, {
17606
17611
  passive: !0
17607
17612
  })), rk(y.props.trigger).forEach(function(v) {
17608
17613
  if (v !== "manual")
17609
- switch (xt(v, jn), v) {
17614
+ switch (St(v, jn), v) {
17610
17615
  case "mouseenter":
17611
- xt("mouseleave", zr);
17616
+ St("mouseleave", zr);
17612
17617
  break;
17613
17618
  case "focus":
17614
- xt(gk ? "focusout" : "blur", Wn);
17619
+ St(gk ? "focusout" : "blur", Wn);
17615
17620
  break;
17616
17621
  case "focusin":
17617
- xt("focusout", Wn);
17622
+ St("focusout", Wn);
17618
17623
  break;
17619
17624
  }
17620
17625
  });
@@ -17773,7 +17778,7 @@ function Ak(t, e) {
17773
17778
  var O = y.props, R = Xl(t, Object.assign({}, O, jl(v), {
17774
17779
  ignoreAttributes: !0
17775
17780
  }));
17776
- y.props = R, pn(), O.interactiveDebounce !== R.interactiveDebounce && (lt(), h = Vl(Br, R.interactiveDebounce)), O.triggerTarget && !R.triggerTarget ? xn(O.triggerTarget).forEach(function(q) {
17781
+ y.props = R, pn(), O.interactiveDebounce !== R.interactiveDebounce && (lt(), h = Vl(Br, R.interactiveDebounce)), O.triggerTarget && !R.triggerTarget ? Sn(O.triggerTarget).forEach(function(q) {
17777
17782
  q.removeAttribute("aria-expanded");
17778
17783
  }) : R.triggerTarget && t.removeAttribute("aria-expanded"), ke(), ee(), A && A(O, R), y.popperInstance && (_r(), At().forEach(function(q) {
17779
17784
  requestAnimationFrame(q._tippy.popperInstance.forceUpdate);
@@ -17815,7 +17820,7 @@ function Ak(t, e) {
17815
17820
  var U = ce(), Ce = U.box, Be = U.content;
17816
17821
  y.props.animation && (hi([Ce, Be], q), Wl([Ce, Be], "hidden"));
17817
17822
  }
17818
- ve(), ke(), y.props.animation ? V() && St(q, y.unmount) : y.unmount();
17823
+ ve(), ke(), y.props.animation ? V() && xt(q, y.unmount) : y.unmount();
17819
17824
  }
17820
17825
  }
17821
17826
  function ff(v) {
@@ -17840,7 +17845,7 @@ function Lr(t, e) {
17840
17845
  plugins: n
17841
17846
  }), o = ck(t);
17842
17847
  if (ie.env.NODE_ENV !== "production") {
17843
- var i = xr(r.content), s = o.length > 1;
17848
+ var i = Sr(r.content), s = o.length > 1;
17844
17849
  gt(i && s, ["tippy() was passed an Element as the `content` prop, but more than", "one tippy instance was created by this invocation. This means the", "content element will only be appended to the last tippy instance.", `
17845
17850
 
17846
17851
  `, "Instead, pass the .innerHTML of the element, or use a function that", "returns a cloned version of the element instead.", `
@@ -17852,7 +17857,7 @@ function Lr(t, e) {
17852
17857
  var d = c && Ak(c, r);
17853
17858
  return d && l.push(d), l;
17854
17859
  }, []);
17855
- return xr(t) ? a[0] : a;
17860
+ return Sr(t) ? a[0] : a;
17856
17861
  }
17857
17862
  Lr.defaultProps = Ie;
17858
17863
  Lr.setDefaultProps = Ck;
@@ -18149,7 +18154,7 @@ const Bk = !1, zk = Q.create({
18149
18154
  if (!e.converter) return L.empty;
18150
18155
  const r = e.converter.pageStyles?.pageSize, { width: o, height: i } = r;
18151
18156
  if (!o || !i) return L.empty;
18152
- const s = [Sb, on], { state: a } = t, l = oo.create({
18157
+ const s = [xb, on], { state: a } = t, l = oo.create({
18153
18158
  schema: a.schema,
18154
18159
  doc: a.doc,
18155
18160
  plugins: a.plugins.filter((h) => s.includes(h.key))
@@ -18190,7 +18195,7 @@ function Vk(t, e, n, r) {
18190
18195
  }
18191
18196
  }
18192
18197
  if (ce || se) {
18193
- const ae = e.state.doc.resolve(j), ee = _o(ae, (St) => St.type.name === "tableRow");
18198
+ const ae = e.state.doc.resolve(j), ee = _o(ae, (xt) => xt.type.name === "tableRow");
18194
18199
  ee && (V = ee.node, j = ee.pos);
18195
18200
  const {
18196
18201
  top: ne,
@@ -18211,8 +18216,8 @@ function Vk(t, e, n, r) {
18211
18216
  u = yi(s, i, r, y), d = bi(s, i, r, M, l);
18212
18217
  const k = c - C.bottom, { node: A } = Zl(k), F = $.widget(t.content.size, A, { key: "stable-key" });
18213
18218
  o.push(F);
18214
- const S = wi({ editor: n, footer: d, isLastFooter: !0 });
18215
- return o.push($.widget(t.content.size, S, { key: "stable-key" })), o.forEach((_) => {
18219
+ const x = wi({ editor: n, footer: d, isLastFooter: !0 });
18220
+ return o.push($.widget(t.content.size, x, { key: "stable-key" })), o.forEach((_) => {
18216
18221
  const V = _.type.toDOM?.querySelector('span[data-id="auto-total-pages"]');
18217
18222
  V && (V.innerText = l);
18218
18223
  }), o;
@@ -18298,8 +18303,8 @@ const Ql = (t) => {
18298
18303
  Fu,
18299
18304
  Gd,
18300
18305
  Cu,
18301
- Su,
18302
18306
  xu,
18307
+ Su,
18303
18308
  Mu,
18304
18309
  Du,
18305
18310
  Zd,
@@ -18340,15 +18345,15 @@ const Ql = (t) => {
18340
18345
  ob,
18341
18346
  Mb,
18342
18347
  Cu,
18343
- Su,
18344
18348
  xu,
18349
+ Su,
18345
18350
  Mu,
18346
18351
  Du,
18347
18352
  Zd,
18348
18353
  Nu,
18349
18354
  _w,
18350
18355
  Eu,
18351
- xb,
18356
+ Sb,
18352
18357
  Nb,
18353
18358
  qw,
18354
18359
  _u,