@dialpad/dialtone 9.19.0 → 9.20.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (29) hide show
  1. package/dist/css/dialtone.css +2 -2
  2. package/dist/tokens/android/java/tokens-dark.kt +1 -1
  3. package/dist/tokens/android/java/tokens-light.kt +1 -1
  4. package/dist/tokens/android/res/values/colors-dark.xml +1 -1
  5. package/dist/tokens/android/res/values/colors-light.xml +1 -1
  6. package/dist/tokens/android/res/values/dimens.xml +1 -1
  7. package/dist/tokens/css/variables-dark.css +1 -1
  8. package/dist/tokens/css/variables-light.css +1 -1
  9. package/dist/tokens/ios/tokens-dark.swift +1 -1
  10. package/dist/tokens/ios/tokens-light.swift +1 -1
  11. package/dist/tokens/less/variables-dark.less +1 -1
  12. package/dist/tokens/less/variables-light.less +1 -1
  13. package/dist/vue2/dialtone-vue.cjs +2 -2
  14. package/dist/vue2/dialtone-vue.js +73 -73
  15. package/dist/vue2/message_input.cjs +1 -1
  16. package/dist/vue2/message_input.js +3 -3
  17. package/dist/vue2/{rich_text_editor-TX19t44m.cjs → rich_text_editor-OOdKm54S.cjs} +2 -2
  18. package/dist/vue2/{rich_text_editor-AZuWkf9m.js → rich_text_editor-QsHU2mru.js} +860 -861
  19. package/dist/vue2/style.css +1 -1
  20. package/dist/vue2/types/recipes/conversation_view/message_input/message_input.vue.d.ts +1 -1
  21. package/dist/vue3/dialtone-vue.cjs +2 -2
  22. package/dist/vue3/dialtone-vue.js +244 -233
  23. package/dist/vue3/message_input.cjs +1 -1
  24. package/dist/vue3/message_input.js +76 -76
  25. package/dist/vue3/{rich_text_editor-S31F6RAP.js → rich_text_editor-PlDAAo2K.js} +2 -2
  26. package/dist/vue3/{rich_text_editor-fciM1V1t.cjs → rich_text_editor-m8DM-vOU.cjs} +2 -2
  27. package/dist/vue3/style.css +1 -1
  28. package/dist/vue3/types/recipes/conversation_view/message_input/message_input.vue.d.ts +1 -1
  29. package/package.json +6 -2
@@ -1,6 +1,6 @@
1
1
  import { n as ee, g as Ti, d as Ya, u as Xa, e as Qa, P as Za, h as As, i as ec, j as tc, k as nc, l as rc, m as ic, o as sc, p as oc, q as lc, T as Ns, t as sl, r as ac, s as cc } from "./tooltip-mMe9F6C6.js";
2
2
  import De from "vue";
3
- import { B as uc, w as hr, I as dc, L as fc, C as hc, t as ol, D as ll, E as pc, m as mc, o as al } from "./index-74FmkvkN.js";
3
+ import { B as dc, w as hr, I as uc, L as fc, C as hc, t as ol, D as ll, E as pc, m as mc, o as al } from "./index-74FmkvkN.js";
4
4
  const Lt = {
5
5
  BUSY: "busy",
6
6
  AWAY: "away",
@@ -99,7 +99,7 @@ const xc = Sc.exports, Xr = {
99
99
  "1800"
100
100
  ], Ds = (n) => n > 1;
101
101
  function Tc() {
102
- return [void 0, ...uc];
102
+ return [void 0, ...dc];
103
103
  }
104
104
  const Mc = (n) => {
105
105
  if (typeof n != "string" || !n.trim())
@@ -246,7 +246,7 @@ const Mc = (n) => {
246
246
  iconSize: {
247
247
  type: String,
248
248
  default: "",
249
- validator: (n) => !n || Object.keys(dc).includes(n)
249
+ validator: (n) => !n || Object.keys(uc).includes(n)
250
250
  },
251
251
  /**
252
252
  * Full name used to extract initials.
@@ -373,8 +373,7 @@ const Mc = (n) => {
373
373
  this.imageLoadedSuccessfully = !1, n.classList.add("d-d-none");
374
374
  },
375
375
  validateProps() {
376
- if (this.imageSrc && this.imageAlt === void 0)
377
- throw new Error("full-name or image-alt must be set if image-src is provided");
376
+ this.imageSrc && this.imageAlt === void 0 && console.error('image-alt required if image-src is provided. Can be set to "" (empty string) if the image is described in text nearby');
378
377
  },
379
378
  handleClick(n) {
380
379
  this.clickable && this.$emit("click", n);
@@ -618,7 +617,7 @@ const qc = Vc.exports, cl = ':not(:disabled):not([aria-disabled="true"]):not([ro
618
617
  }, Qr = {
619
618
  DEFAULT: "default",
620
619
  CUSTOM: "custom"
621
- }, un = {
620
+ }, dn = {
622
621
  ARROW_KEYS: "arrow-keys",
623
622
  TAB: "tab",
624
623
  NONE: "none"
@@ -710,8 +709,8 @@ const Is = Xc.exports, Qc = ["listitem", "menuitem", "option"], Zc = {
710
709
  */
711
710
  navigationType: {
712
711
  type: String,
713
- default: un.NONE,
714
- validator: (n) => Object.values(un).includes(n)
712
+ default: dn.NONE,
713
+ validator: (n) => Object.values(dn).includes(n)
715
714
  },
716
715
  /**
717
716
  * Applies selected styles to the list item
@@ -788,13 +787,13 @@ const Is = Xc.exports, Qc = ["listitem", "menuitem", "option"], Zc = {
788
787
  return this.isHoverable ? this.highlightId && this.highlightId() ? this.id === this.highlightId() : this.mouseHighlighted : !1;
789
788
  },
790
789
  isFocusable() {
791
- return this.navigationType === un.TAB;
790
+ return this.navigationType === dn.TAB;
792
791
  },
793
792
  /**
794
793
  * Whether to apply hover styles.
795
794
  */
796
795
  isHoverable() {
797
- return this.navigationType !== un.NONE;
796
+ return this.navigationType !== dn.NONE;
798
797
  }
799
798
  },
800
799
  methods: {
@@ -809,7 +808,7 @@ const Is = Xc.exports, Qc = ["listitem", "menuitem", "option"], Zc = {
809
808
  }
810
809
  }
811
810
  };
812
- var eu = function() {
811
+ var ed = function() {
813
812
  var e = this, t = e._self._c;
814
813
  return t(e.elementType, e._g({ tag: "component", class: ["dt-list-item", {
815
814
  "dt-list-item--focusable": e.isFocusable,
@@ -822,27 +821,27 @@ var eu = function() {
822
821
  }), e.selected ? { key: "selected", fn: function() {
823
822
  return [t("dt-icon", { staticClass: "dt-list-item--selected-icon", attrs: { name: "check", size: "400" } })];
824
823
  }, proxy: !0 } : null], null, !0) }) : e._t("default")], 2);
825
- }, tu = [], nu = /* @__PURE__ */ ee(
824
+ }, td = [], nd = /* @__PURE__ */ ee(
826
825
  Zc,
827
- eu,
828
- tu,
826
+ ed,
827
+ td,
829
828
  !1,
830
829
  null,
831
830
  null,
832
831
  null,
833
832
  null
834
833
  );
835
- const ru = nu.exports, ut = {
834
+ const rd = nd.exports, dt = {
836
835
  default: "column",
837
836
  column: "column",
838
837
  row: "row",
839
838
  "row-reverse": "row-reverse",
840
839
  "column-reverse": "column-reverse"
841
- }, ul = ["sm", "md", "lg", "xl"], es = ["0", "100", "200", "300", "400", "450", "500", "600"];
842
- let iu = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict", su = (n = 21) => {
840
+ }, dl = ["sm", "md", "lg", "xl"], es = ["0", "100", "200", "300", "400", "450", "500", "600"];
841
+ let id = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict", sd = (n = 21) => {
843
842
  let e = "", t = n;
844
843
  for (; t--; )
845
- e += iu[Math.random() * 64 | 0];
844
+ e += id[Math.random() * 64 | 0];
846
845
  return e;
847
846
  };
848
847
  function kn(n) {
@@ -853,11 +852,11 @@ function kn(n) {
853
852
  return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
854
853
  }, kn(n);
855
854
  }
856
- var dl = {
857
- selector: "vue-portal-target-".concat(su())
858
- }, ou = function(e) {
859
- return dl.selector = e;
860
- }, Zr = typeof window < "u" && (typeof document > "u" ? "undefined" : kn(document)) !== void 0, lu = De.extend({
855
+ var ul = {
856
+ selector: "vue-portal-target-".concat(sd())
857
+ }, od = function(e) {
858
+ return ul.selector = e;
859
+ }, Zr = typeof window < "u" && (typeof document > "u" ? "undefined" : kn(document)) !== void 0, ld = De.extend({
861
860
  // as an abstract component, it doesn't appear in
862
861
  // the $parent chain of components.
863
862
  // which means the next parent of any component rendered inside of this oen
@@ -891,7 +890,7 @@ var dl = {
891
890
  selector: {
892
891
  type: String,
893
892
  default: function() {
894
- return "#".concat(dl.selector);
893
+ return "#".concat(ul.selector);
895
894
  }
896
895
  },
897
896
  tag: {
@@ -941,7 +940,7 @@ var dl = {
941
940
  mount: function() {
942
941
  if (Zr) {
943
942
  var e = this.getTargetEl(), t = document.createElement("DIV");
944
- this.prepend && e.firstChild ? e.insertBefore(t, e.firstChild) : e.appendChild(t), this.container = new lu({
943
+ this.prepend && e.firstChild ? e.insertBefore(t, e.firstChild) : e.appendChild(t), this.container = new ld({
945
944
  el: t,
946
945
  parent: this,
947
946
  propsData: {
@@ -956,12 +955,12 @@ var dl = {
956
955
  }
957
956
  }
958
957
  });
959
- function au(n) {
958
+ function ad(n) {
960
959
  var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
961
- n.component(e.name || "portal", fl), e.defaultSelector && ou(e.defaultSelector);
960
+ n.component(e.name || "portal", fl), e.defaultSelector && od(e.defaultSelector);
962
961
  }
963
- typeof window < "u" && window.Vue && window.Vue === De && De.use(au);
964
- const cu = {
962
+ typeof window < "u" && window.Vue && window.Vue === De && De.use(ad);
963
+ const cd = {
965
964
  name: "PopoverHeaderFooter",
966
965
  components: {
967
966
  DtButton: ol,
@@ -1017,7 +1016,7 @@ const cu = {
1017
1016
  }
1018
1017
  }
1019
1018
  };
1020
- var uu = function() {
1019
+ var dd = function() {
1021
1020
  var e = this, t = e._self._c;
1022
1021
  return t("div", { class: {
1023
1022
  "d-popover__header": e.type === "header",
@@ -1033,17 +1032,17 @@ var uu = function() {
1033
1032
  } }, scopedSlots: e._u([{ key: "icon", fn: function() {
1034
1033
  return [t("dt-icon", { attrs: { name: "close", size: "300" } })];
1035
1034
  }, proxy: !0 }], null, !1, 2538694920) }, "dt-button", e.closeButtonProps, !1)) : e._e()], 1);
1036
- }, du = [], fu = /* @__PURE__ */ ee(
1037
- cu,
1038
- uu,
1039
- du,
1035
+ }, ud = [], fd = /* @__PURE__ */ ee(
1036
+ cd,
1037
+ dd,
1038
+ ud,
1040
1039
  !1,
1041
1040
  null,
1042
1041
  null,
1043
1042
  null,
1044
1043
  null
1045
1044
  );
1046
- const hu = fu.exports, pu = {
1045
+ const hd = fd.exports, pd = {
1047
1046
  name: "DtPopover",
1048
1047
  /********************
1049
1048
  * CHILD COMPONENTS *
@@ -1051,7 +1050,7 @@ const hu = fu.exports, pu = {
1051
1050
  components: {
1052
1051
  SrOnlyCloseButton: qc,
1053
1052
  DtLazyShow: Qa,
1054
- PopoverHeaderFooter: hu,
1053
+ PopoverHeaderFooter: hd,
1055
1054
  Portal: fl
1056
1055
  },
1057
1056
  mixins: [Uc, Fc],
@@ -1671,7 +1670,7 @@ const hu = fu.exports, pu = {
1671
1670
  // ----------------------------------------------------------------------------
1672
1671
  }
1673
1672
  };
1674
- var mu = function() {
1673
+ var md = function() {
1675
1674
  var e = this, t = e._self._c;
1676
1675
  return t("div", [e.modal && e.isOpen ? t("portal", [t("div", { staticClass: "d-modal--transparent", attrs: { "aria-hidden": e.modal && e.isOpen ? "false" : "true" }, on: { click: function(r) {
1677
1676
  r.preventDefault(), r.stopPropagation();
@@ -1699,56 +1698,56 @@ var mu = function() {
1699
1698
  ], attrs: { "data-qa": e.$attrs["data-qa"] ? `${e.$attrs["data-qa"]}-content` : "dt-popover-content" } }, [e._t("content", null, { close: e.closePopover })], 2), e.$slots.footerContent ? t("popover-header-footer", { ref: "popover__footer", class: e.POPOVER_HEADER_FOOTER_PADDING_CLASSES[e.padding], attrs: { type: "footer", "content-class": e.footerClass }, scopedSlots: e._u([{ key: "content", fn: function() {
1700
1699
  return [e._t("footerContent", null, { close: e.closePopover })];
1701
1700
  }, proxy: !0 }], null, !0) }) : e._e(), e.showVisuallyHiddenClose ? t("sr-only-close-button", { attrs: { "visually-hidden-close-label": e.visuallyHiddenCloseLabel }, on: { close: e.closePopover } }) : e._e()], 1)], 1)], 1);
1702
- }, gu = [], yu = /* @__PURE__ */ ee(
1703
- pu,
1704
- mu,
1705
- gu,
1701
+ }, gd = [], yd = /* @__PURE__ */ ee(
1702
+ pd,
1703
+ md,
1704
+ gd,
1706
1705
  !1,
1707
1706
  null,
1708
1707
  null,
1709
1708
  null,
1710
1709
  null
1711
1710
  );
1712
- const a0 = yu.exports;
1711
+ const a0 = yd.exports;
1713
1712
  function Rs(n) {
1714
- return n === ut.default;
1713
+ return n === dt.default;
1715
1714
  }
1716
1715
  function _s(n) {
1717
1716
  if (Jt(n) === "string")
1718
- return Rs(n) ? null : ut[n];
1717
+ return Rs(n) ? null : dt[n];
1719
1718
  if (Jt(n) === "object") {
1720
1719
  const { default: e } = n;
1721
- return Rs(e) ? null : ut[e];
1720
+ return Rs(e) ? null : dt[e];
1722
1721
  } else
1723
1722
  return null;
1724
1723
  }
1725
1724
  function Jt(n) {
1726
1725
  return typeof n;
1727
1726
  }
1728
- function bu(n) {
1729
- return _s(n) ? `d-stack--${ut[_s(n)]}` : null;
1727
+ function bd(n) {
1728
+ return _s(n) ? `d-stack--${dt[_s(n)]}` : null;
1730
1729
  }
1731
- function ku(n) {
1730
+ function kd(n) {
1732
1731
  return Jt(n) === "object" ? [
1733
- ...ul.map((e) => n[e] ? `d-stack--${e}--${n[e]}` : null)
1732
+ ...dl.map((e) => n[e] ? `d-stack--${e}--${n[e]}` : null)
1734
1733
  ] : null;
1735
1734
  }
1736
- function Su(n) {
1735
+ function Sd(n) {
1737
1736
  return es.includes(n) ? `d-stack--gap-${n}` : null;
1738
1737
  }
1739
- function xu(n) {
1738
+ function xd(n) {
1740
1739
  if (Jt(n) === "string")
1741
- return Object.keys(ut).includes(n);
1740
+ return Object.keys(dt).includes(n);
1742
1741
  if (Jt(n) === "object") {
1743
1742
  const { default: e } = n;
1744
- return Object.keys(ut).includes(e);
1743
+ return Object.keys(dt).includes(e);
1745
1744
  } else
1746
1745
  return null;
1747
1746
  }
1748
- function Ou(n) {
1747
+ function Od(n) {
1749
1748
  return es.includes(n);
1750
1749
  }
1751
- const vu = {
1750
+ const vd = {
1752
1751
  name: "DtStack",
1753
1752
  props: {
1754
1753
  /**
@@ -1762,7 +1761,7 @@ const vu = {
1762
1761
  direction: {
1763
1762
  type: [String, Object],
1764
1763
  default: "column",
1765
- validator: (n) => xu(n)
1764
+ validator: (n) => xd(n)
1766
1765
  },
1767
1766
  /**
1768
1767
  * Set this prop to render stack as a specific HTML element.
@@ -1778,29 +1777,29 @@ const vu = {
1778
1777
  gap: {
1779
1778
  type: String,
1780
1779
  default: "0",
1781
- validator: (n) => Ou(n)
1780
+ validator: (n) => Od(n)
1782
1781
  }
1783
1782
  },
1784
1783
  data() {
1785
1784
  return {
1786
- DT_STACK_DIRECTION: ut,
1785
+ DT_STACK_DIRECTION: dt,
1787
1786
  DT_STACK_GAP: es,
1788
- DT_STACK_RESPONSIVE_BREAKPOINTS: ul
1787
+ DT_STACK_RESPONSIVE_BREAKPOINTS: dl
1789
1788
  };
1790
1789
  },
1791
1790
  computed: {
1792
1791
  stackGap() {
1793
- return Su(this.gap);
1792
+ return Sd(this.gap);
1794
1793
  },
1795
1794
  defaultDirection() {
1796
- return bu(this.direction);
1795
+ return bd(this.direction);
1797
1796
  },
1798
1797
  stackResponsive() {
1799
- return ku(this.direction);
1798
+ return kd(this.direction);
1800
1799
  }
1801
1800
  }
1802
1801
  };
1803
- var Cu = function() {
1802
+ var Cd = function() {
1804
1803
  var e = this, t = e._self._c;
1805
1804
  return t(e.as, { tag: "component", class: [
1806
1805
  "d-stack",
@@ -1808,17 +1807,17 @@ var Cu = function() {
1808
1807
  e.stackResponsive,
1809
1808
  e.stackGap
1810
1809
  ] }, [e._t("default")], 2);
1811
- }, Eu = [], Tu = /* @__PURE__ */ ee(
1812
- vu,
1813
- Cu,
1814
- Eu,
1810
+ }, Ed = [], Td = /* @__PURE__ */ ee(
1811
+ vd,
1812
+ Cd,
1813
+ Ed,
1815
1814
  !1,
1816
1815
  null,
1817
1816
  null,
1818
1817
  null,
1819
1818
  null
1820
1819
  );
1821
- const hl = Tu.exports;
1820
+ const hl = Td.exports;
1822
1821
  function j(n) {
1823
1822
  this.content = n;
1824
1823
  }
@@ -1960,8 +1959,8 @@ function ml(n, e, t, r) {
1960
1959
  if (!o.sameMarkup(l))
1961
1960
  return { a: t, b: r };
1962
1961
  if (o.isText && o.text != l.text) {
1963
- let c = 0, u = Math.min(o.text.length, l.text.length);
1964
- for (; c < u && o.text[o.text.length - c - 1] == l.text[l.text.length - c - 1]; )
1962
+ let c = 0, d = Math.min(o.text.length, l.text.length);
1963
+ for (; c < d && o.text[o.text.length - c - 1] == l.text[l.text.length - c - 1]; )
1965
1964
  c++, t--, r--;
1966
1965
  return { a: t, b: r };
1967
1966
  }
@@ -1991,8 +1990,8 @@ class b {
1991
1990
  for (let o = 0, l = 0; l < t; o++) {
1992
1991
  let a = this.content[o], c = l + a.nodeSize;
1993
1992
  if (c > e && r(a, i + l, s || null, o) !== !1 && a.content.size) {
1994
- let u = l + 1;
1995
- a.nodesBetween(Math.max(0, e - u), Math.min(a.content.size, t - u), r, i + u);
1993
+ let d = l + 1;
1994
+ a.nodesBetween(Math.max(0, e - d), Math.min(a.content.size, t - d), r, i + d);
1996
1995
  }
1997
1996
  l = c;
1998
1997
  }
@@ -2152,15 +2151,15 @@ class b {
2152
2151
  */
2153
2152
  findIndex(e, t = -1) {
2154
2153
  if (e == 0)
2155
- return dn(0, e);
2154
+ return un(0, e);
2156
2155
  if (e == this.size)
2157
- return dn(this.content.length, e);
2156
+ return un(this.content.length, e);
2158
2157
  if (e > this.size || e < 0)
2159
2158
  throw new RangeError(`Position ${e} outside of fragment (${this})`);
2160
2159
  for (let r = 0, i = 0; ; r++) {
2161
2160
  let s = this.child(r), o = i + s.nodeSize;
2162
2161
  if (o >= e)
2163
- return o == e || t > 0 ? dn(r + 1, o) : dn(r, i);
2162
+ return o == e || t > 0 ? un(r + 1, o) : un(r, i);
2164
2163
  i = o;
2165
2164
  }
2166
2165
  }
@@ -2226,7 +2225,7 @@ class b {
2226
2225
  }
2227
2226
  b.empty = new b([], 0);
2228
2227
  const ei = { index: 0, offset: 0 };
2229
- function dn(n, e) {
2228
+ function un(n, e) {
2230
2229
  return ei.index = n, ei.offset = e, ei;
2231
2230
  }
2232
2231
  function Cn(n, e) {
@@ -2459,7 +2458,7 @@ function yl(n, e, t, r) {
2459
2458
  let l = yl(o.content, e - s - 1, t);
2460
2459
  return l && n.replaceChild(i, o.copy(l));
2461
2460
  }
2462
- function Mu(n, e, t) {
2461
+ function Md(n, e, t) {
2463
2462
  if (t.openStart > n.depth)
2464
2463
  throw new En("Inserted content deeper than insertion position");
2465
2464
  if (n.depth - t.openStart != e.depth - t.openEnd)
@@ -2476,7 +2475,7 @@ function bl(n, e, t, r) {
2476
2475
  let o = n.parent, l = o.content;
2477
2476
  return ot(o, l.cut(0, n.parentOffset).append(t.content).append(l.cut(e.parentOffset)));
2478
2477
  } else {
2479
- let { start: o, end: l } = wu(t, n);
2478
+ let { start: o, end: l } = wd(t, n);
2480
2479
  return ot(s, Sl(n, o, l, e, r));
2481
2480
  }
2482
2481
  else
@@ -2516,7 +2515,7 @@ function Tn(n, e, t) {
2516
2515
  }
2517
2516
  return zt(e, null, t, r), new b(r);
2518
2517
  }
2519
- function wu(n, e) {
2518
+ function wd(n, e) {
2520
2519
  let t = e.depth - n.openStart, i = e.node(t).copy(n.content);
2521
2520
  for (let s = t - 1; s >= 0; s--)
2522
2521
  i = e.node(s).copy(b.from(i));
@@ -2765,10 +2764,10 @@ class Gt {
2765
2764
  return s;
2766
2765
  }
2767
2766
  let r = ti[ni] = Gt.resolve(e, t);
2768
- return ni = (ni + 1) % Au, r;
2767
+ return ni = (ni + 1) % Ad, r;
2769
2768
  }
2770
2769
  }
2771
- let ti = [], ni = 0, Au = 12;
2770
+ let ti = [], ni = 0, Ad = 12;
2772
2771
  class Mn {
2773
2772
  /**
2774
2773
  Construct a node range. `$from` and `$to` should point into the
@@ -2809,7 +2808,7 @@ class Mn {
2809
2808
  return this.$to.indexAfter(this.depth);
2810
2809
  }
2811
2810
  }
2812
- const Nu = /* @__PURE__ */ Object.create(null);
2811
+ const Nd = /* @__PURE__ */ Object.create(null);
2813
2812
  let lt = class Ai {
2814
2813
  /**
2815
2814
  @internal
@@ -2922,7 +2921,7 @@ let lt = class Ai {
2922
2921
  attributes, and marks.
2923
2922
  */
2924
2923
  hasMarkup(e, t, r) {
2925
- return this.type == e && Cn(this.attrs, t || e.defaultAttrs || Nu) && R.sameSet(this.marks, r || R.none);
2924
+ return this.type == e && Cn(this.attrs, t || e.defaultAttrs || Nd) && R.sameSet(this.marks, r || R.none);
2926
2925
  }
2927
2926
  /**
2928
2927
  Create a new node with the same markup as this node, containing
@@ -2965,7 +2964,7 @@ let lt = class Ai {
2965
2964
  [`ReplaceError`](https://prosemirror.net/docs/ref/#model.ReplaceError) is thrown.
2966
2965
  */
2967
2966
  replace(e, t, r) {
2968
- return Mu(this.resolve(e), this.resolve(t), r);
2967
+ return Md(this.resolve(e), this.resolve(t), r);
2969
2968
  }
2970
2969
  /**
2971
2970
  Find the node directly after the given position.
@@ -3215,7 +3214,7 @@ function xl(n, e) {
3215
3214
  e = n[t].type.name + "(" + e + ")";
3216
3215
  return e;
3217
3216
  }
3218
- class dt {
3217
+ class ut {
3219
3218
  /**
3220
3219
  @internal
3221
3220
  */
@@ -3226,13 +3225,13 @@ class dt {
3226
3225
  @internal
3227
3226
  */
3228
3227
  static parse(e, t) {
3229
- let r = new Pu(e, t);
3228
+ let r = new Pd(e, t);
3230
3229
  if (r.next == null)
3231
- return dt.empty;
3230
+ return ut.empty;
3232
3231
  let i = Ol(r);
3233
3232
  r.next && r.err("Unexpected trailing text");
3234
- let s = $u(Bu(i));
3235
- return Fu(s, r), s;
3233
+ let s = $d(Bd(i));
3234
+ return Fd(s, r), s;
3236
3235
  }
3237
3236
  /**
3238
3237
  Match a node type, returning a match after that node if
@@ -3297,10 +3296,10 @@ class dt {
3297
3296
  if (a && (!t || a.validEnd))
3298
3297
  return b.from(l.map((c) => c.createAndFill()));
3299
3298
  for (let c = 0; c < o.next.length; c++) {
3300
- let { type: u, next: d } = o.next[c];
3301
- if (!(u.isText || u.hasRequiredAttrs()) && i.indexOf(d) == -1) {
3302
- i.push(d);
3303
- let f = s(d, l.concat(u));
3299
+ let { type: d, next: u } = o.next[c];
3300
+ if (!(d.isText || d.hasRequiredAttrs()) && i.indexOf(u) == -1) {
3301
+ i.push(u);
3302
+ let f = s(u, l.concat(d));
3304
3303
  if (f)
3305
3304
  return f;
3306
3305
  }
@@ -3377,8 +3376,8 @@ class dt {
3377
3376
  `);
3378
3377
  }
3379
3378
  }
3380
- dt.empty = new dt(!0);
3381
- class Pu {
3379
+ ut.empty = new ut(!0);
3380
+ class Pd {
3382
3381
  constructor(e, t) {
3383
3382
  this.string = e, this.nodeTypes = t, this.inline = null, this.pos = 0, this.tokens = e.split(/\s*(?=\b|\W|$)/), this.tokens[this.tokens.length - 1] == "" && this.tokens.pop(), this.tokens[0] == "" && this.tokens.shift();
3384
3383
  }
@@ -3395,19 +3394,19 @@ class Pu {
3395
3394
  function Ol(n) {
3396
3395
  let e = [];
3397
3396
  do
3398
- e.push(Du(n));
3397
+ e.push(Dd(n));
3399
3398
  while (n.eat("|"));
3400
3399
  return e.length == 1 ? e[0] : { type: "choice", exprs: e };
3401
3400
  }
3402
- function Du(n) {
3401
+ function Dd(n) {
3403
3402
  let e = [];
3404
3403
  do
3405
- e.push(Iu(n));
3404
+ e.push(Id(n));
3406
3405
  while (n.next && n.next != ")" && n.next != "|");
3407
3406
  return e.length == 1 ? e[0] : { type: "seq", exprs: e };
3408
3407
  }
3409
- function Iu(n) {
3410
- let e = Lu(n);
3408
+ function Id(n) {
3409
+ let e = Ld(n);
3411
3410
  for (; ; )
3412
3411
  if (n.eat("+"))
3413
3412
  e = { type: "plus", expr: e };
@@ -3416,7 +3415,7 @@ function Iu(n) {
3416
3415
  else if (n.eat("?"))
3417
3416
  e = { type: "opt", expr: e };
3418
3417
  else if (n.eat("{"))
3419
- e = Ru(n, e);
3418
+ e = Rd(n, e);
3420
3419
  else
3421
3420
  break;
3422
3421
  return e;
@@ -3426,11 +3425,11 @@ function Ls(n) {
3426
3425
  let e = Number(n.next);
3427
3426
  return n.pos++, e;
3428
3427
  }
3429
- function Ru(n, e) {
3428
+ function Rd(n, e) {
3430
3429
  let t = Ls(n), r = t;
3431
3430
  return n.eat(",") && (n.next != "}" ? r = Ls(n) : r = -1), n.eat("}") || n.err("Unclosed braced range"), { type: "range", min: t, max: r, expr: e };
3432
3431
  }
3433
- function _u(n, e) {
3432
+ function _d(n, e) {
3434
3433
  let t = n.nodeTypes, r = t[e];
3435
3434
  if (r)
3436
3435
  return [r];
@@ -3441,18 +3440,18 @@ function _u(n, e) {
3441
3440
  }
3442
3441
  return i.length == 0 && n.err("No node type or group '" + e + "' found"), i;
3443
3442
  }
3444
- function Lu(n) {
3443
+ function Ld(n) {
3445
3444
  if (n.eat("(")) {
3446
3445
  let e = Ol(n);
3447
3446
  return n.eat(")") || n.err("Missing closing paren"), e;
3448
3447
  } else if (/\W/.test(n.next))
3449
3448
  n.err("Unexpected token '" + n.next + "'");
3450
3449
  else {
3451
- let e = _u(n, n.next).map((t) => (n.inline == null ? n.inline = t.isInline : n.inline != t.isInline && n.err("Mixing inline and block content"), { type: "name", value: t }));
3450
+ let e = _d(n, n.next).map((t) => (n.inline == null ? n.inline = t.isInline : n.inline != t.isInline && n.err("Mixing inline and block content"), { type: "name", value: t }));
3452
3451
  return n.pos++, e.length == 1 ? e[0] : { type: "choice", exprs: e };
3453
3452
  }
3454
3453
  }
3455
- function Bu(n) {
3454
+ function Bd(n) {
3456
3455
  let e = [[]];
3457
3456
  return i(s(n, 0), t()), e;
3458
3457
  function t() {
@@ -3487,15 +3486,15 @@ function Bu(n) {
3487
3486
  if (o.type == "range") {
3488
3487
  let a = l;
3489
3488
  for (let c = 0; c < o.min; c++) {
3490
- let u = t();
3491
- i(s(o.expr, a), u), a = u;
3489
+ let d = t();
3490
+ i(s(o.expr, a), d), a = d;
3492
3491
  }
3493
3492
  if (o.max == -1)
3494
3493
  i(s(o.expr, a), a);
3495
3494
  else
3496
3495
  for (let c = o.min; c < o.max; c++) {
3497
- let u = t();
3498
- r(a, u), i(s(o.expr, a), u), a = u;
3496
+ let d = t();
3497
+ r(a, d), i(s(o.expr, a), d), a = d;
3499
3498
  }
3500
3499
  return [r(a)];
3501
3500
  } else {
@@ -3523,7 +3522,7 @@ function Bs(n, e) {
3523
3522
  }
3524
3523
  }
3525
3524
  }
3526
- function $u(n) {
3525
+ function $d(n) {
3527
3526
  let e = /* @__PURE__ */ Object.create(null);
3528
3527
  return t(Bs(n, 0));
3529
3528
  function t(r) {
@@ -3533,14 +3532,14 @@ function $u(n) {
3533
3532
  if (!l)
3534
3533
  return;
3535
3534
  let c;
3536
- for (let u = 0; u < i.length; u++)
3537
- i[u][0] == l && (c = i[u][1]);
3538
- Bs(n, a).forEach((u) => {
3539
- c || i.push([l, c = []]), c.indexOf(u) == -1 && c.push(u);
3535
+ for (let d = 0; d < i.length; d++)
3536
+ i[d][0] == l && (c = i[d][1]);
3537
+ Bs(n, a).forEach((d) => {
3538
+ c || i.push([l, c = []]), c.indexOf(d) == -1 && c.push(d);
3540
3539
  });
3541
3540
  });
3542
3541
  });
3543
- let s = e[r.join(",")] = new dt(r.indexOf(n.length - 1) > -1);
3542
+ let s = e[r.join(",")] = new ut(r.indexOf(n.length - 1) > -1);
3544
3543
  for (let o = 0; o < i.length; o++) {
3545
3544
  let l = i[o][1].sort(vl);
3546
3545
  s.next.push({ type: i[o][0], next: e[l.join(",")] || t(l) });
@@ -3548,7 +3547,7 @@ function $u(n) {
3548
3547
  return s;
3549
3548
  }
3550
3549
  }
3551
- function Fu(n, e) {
3550
+ function Fd(n, e) {
3552
3551
  for (let t = 0, r = [n]; t < r.length; t++) {
3553
3552
  let i = r[t], s = !i.validEnd, o = [];
3554
3553
  for (let l = 0; l < i.next.length; l++) {
@@ -3587,7 +3586,7 @@ function Tl(n) {
3587
3586
  let e = /* @__PURE__ */ Object.create(null);
3588
3587
  if (n)
3589
3588
  for (let t in n)
3590
- e[t] = new zu(n[t]);
3589
+ e[t] = new zd(n[t]);
3591
3590
  return e;
3592
3591
  }
3593
3592
  let $s = class Ml {
@@ -3614,7 +3613,7 @@ let $s = class Ml {
3614
3613
  True for node types that allow no content.
3615
3614
  */
3616
3615
  get isLeaf() {
3617
- return this.contentMatch == dt.empty;
3616
+ return this.contentMatch == ut.empty;
3618
3617
  }
3619
3618
  /**
3620
3619
  True when this node is an atom, i.e. when it does not have
@@ -3756,7 +3755,7 @@ let $s = class Ml {
3756
3755
  return r;
3757
3756
  }
3758
3757
  };
3759
- class zu {
3758
+ class zd {
3760
3759
  constructor(e) {
3761
3760
  this.hasDefault = Object.prototype.hasOwnProperty.call(e, "default"), this.default = e.default;
3762
3761
  }
@@ -3813,7 +3812,7 @@ class pr {
3813
3812
  return this.excluded.indexOf(e) > -1;
3814
3813
  }
3815
3814
  }
3816
- class Hu {
3815
+ class Hd {
3817
3816
  /**
3818
3817
  Construct a schema from a schema [specification](https://prosemirror.net/docs/ref/#model.SchemaSpec).
3819
3818
  */
@@ -3828,7 +3827,7 @@ class Hu {
3828
3827
  if (i in this.marks)
3829
3828
  throw new RangeError(i + " can not be both a node and a mark");
3830
3829
  let s = this.nodes[i], o = s.spec.content || "", l = s.spec.marks;
3831
- s.contentMatch = r[o] || (r[o] = dt.parse(o, this.nodes)), s.inlineContent = s.contentMatch.inlineContent, s.markSet = l == "_" ? null : l ? Fs(this, l.split(" ")) : l == "" || !s.inlineContent ? [] : null;
3830
+ s.contentMatch = r[o] || (r[o] = ut.parse(o, this.nodes)), s.inlineContent = s.contentMatch.inlineContent, s.markSet = l == "_" ? null : l ? Fs(this, l.split(" ")) : l == "" || !s.inlineContent ? [] : null;
3832
3831
  }
3833
3832
  for (let i in this.marks) {
3834
3833
  let s = this.marks[i], o = s.spec.excludes;
@@ -3946,7 +3945,7 @@ let ts = class Ni {
3946
3945
  matchTag(e, t, r) {
3947
3946
  for (let i = r ? this.tags.indexOf(r) + 1 : 0; i < this.tags.length; i++) {
3948
3947
  let s = this.tags[i];
3949
- if (qu(e, s.tag) && (s.namespace === void 0 || e.namespaceURI == s.namespace) && (!s.context || t.matchesContext(s.context))) {
3948
+ if (qd(e, s.tag) && (s.namespace === void 0 || e.namespaceURI == s.namespace) && (!s.context || t.matchesContext(s.context))) {
3950
3949
  if (s.getAttrs) {
3951
3950
  let o = s.getAttrs(e);
3952
3951
  if (o === !1)
@@ -4047,7 +4046,7 @@ const wl = {
4047
4046
  table: !0,
4048
4047
  tfoot: !0,
4049
4048
  ul: !0
4050
- }, ju = {
4049
+ }, jd = {
4051
4050
  head: !0,
4052
4051
  noscript: !0,
4053
4052
  object: !0,
@@ -4095,7 +4094,7 @@ class fn {
4095
4094
  applyPending(e) {
4096
4095
  for (let t = 0, r = this.pendingMarks; t < r.length; t++) {
4097
4096
  let i = r[t];
4098
- (this.type ? this.type.allowsMarkType(i.type) : Ku(i.type, e)) && !i.isInSet(this.activeMarks) && (this.activeMarks = i.addToSet(this.activeMarks), this.pendingMarks = i.removeFromSet(this.pendingMarks));
4097
+ (this.type ? this.type.allowsMarkType(i.type) : Kd(i.type, e)) && !i.isInSet(this.activeMarks) && (this.activeMarks = i.addToSet(this.activeMarks), this.pendingMarks = i.removeFromSet(this.pendingMarks));
4099
4098
  }
4100
4099
  }
4101
4100
  inlineContext(e) {
@@ -4121,7 +4120,7 @@ class Hs {
4121
4120
  let r = e.getAttribute("style");
4122
4121
  if (!r)
4123
4122
  return t();
4124
- let i = this.readStyles(Wu(r));
4123
+ let i = this.readStyles(Wd(r));
4125
4124
  if (!i)
4126
4125
  return;
4127
4126
  let [s, o] = i, l = this.top;
@@ -4153,9 +4152,9 @@ class Hs {
4153
4152
  // none is found, the element's content nodes are added directly.
4154
4153
  addElement(e, t) {
4155
4154
  let r = e.nodeName.toLowerCase(), i;
4156
- Al.hasOwnProperty(r) && this.parser.normalizeLists && Vu(e);
4155
+ Al.hasOwnProperty(r) && this.parser.normalizeLists && Vd(e);
4157
4156
  let s = this.options.ruleFromNode && this.options.ruleFromNode(e) || (i = this.parser.matchTag(e, this, t));
4158
- if (s ? s.ignore : ju.hasOwnProperty(r))
4157
+ if (s ? s.ignore : jd.hasOwnProperty(r))
4159
4158
  this.findInside(e), this.ignoreFallback(e);
4160
4159
  else if (!s || s.skip || s.closeParent) {
4161
4160
  s && s.closeParent ? this.open = Math.max(0, this.open - 1) : s && s.skip.nodeType && (e = s.skip);
@@ -4343,8 +4342,8 @@ class Hs {
4343
4342
  return !0;
4344
4343
  return !1;
4345
4344
  } else {
4346
- let u = a > 0 || a == 0 && i ? this.nodes[a].type : r && a >= s ? r.node(a - s).type : null;
4347
- if (!u || u.name != c && u.groups.indexOf(c) == -1)
4345
+ let d = a > 0 || a == 0 && i ? this.nodes[a].type : r && a >= s ? r.node(a - s).type : null;
4346
+ if (!d || d.name != c && d.groups.indexOf(c) == -1)
4348
4347
  return !1;
4349
4348
  a--;
4350
4349
  }
@@ -4368,7 +4367,7 @@ class Hs {
4368
4367
  }
4369
4368
  }
4370
4369
  addPendingMark(e) {
4371
- let t = Uu(e, this.top.pendingMarks);
4370
+ let t = Ud(e, this.top.pendingMarks);
4372
4371
  t && this.top.stashMarks.push(t), this.top.pendingMarks = e.addToSet(this.top.pendingMarks);
4373
4372
  }
4374
4373
  removePendingMark(e, t) {
@@ -4386,16 +4385,16 @@ class Hs {
4386
4385
  }
4387
4386
  }
4388
4387
  }
4389
- function Vu(n) {
4388
+ function Vd(n) {
4390
4389
  for (let e = n.firstChild, t = null; e; e = e.nextSibling) {
4391
4390
  let r = e.nodeType == 1 ? e.nodeName.toLowerCase() : null;
4392
4391
  r && Al.hasOwnProperty(r) && t ? (t.appendChild(e), e = t) : r == "li" ? t = e : r && (t = null);
4393
4392
  }
4394
4393
  }
4395
- function qu(n, e) {
4394
+ function qd(n, e) {
4396
4395
  return (n.matches || n.msMatchesSelector || n.webkitMatchesSelector || n.mozMatchesSelector).call(n, e);
4397
4396
  }
4398
- function Wu(n) {
4397
+ function Wd(n) {
4399
4398
  let e = /\s*([\w-]+)\s*:\s*([^;]+)/g, t, r = [];
4400
4399
  for (; t = e.exec(n); )
4401
4400
  r.push(t[1], t[2].trim());
@@ -4407,7 +4406,7 @@ function js(n) {
4407
4406
  e[t] = n[t];
4408
4407
  return e;
4409
4408
  }
4410
- function Ku(n, e) {
4409
+ function Kd(n, e) {
4411
4410
  let t = e.schema.nodes;
4412
4411
  for (let r in t) {
4413
4412
  let i = t[r];
@@ -4416,8 +4415,8 @@ function Ku(n, e) {
4416
4415
  let s = [], o = (l) => {
4417
4416
  s.push(l);
4418
4417
  for (let a = 0; a < l.edgeCount; a++) {
4419
- let { type: c, next: u } = l.edge(a);
4420
- if (c == e || s.indexOf(u) < 0 && o(u))
4418
+ let { type: c, next: d } = l.edge(a);
4419
+ if (c == e || s.indexOf(d) < 0 && o(d))
4421
4420
  return !0;
4422
4421
  }
4423
4422
  };
@@ -4425,7 +4424,7 @@ function Ku(n, e) {
4425
4424
  return !0;
4426
4425
  }
4427
4426
  }
4428
- function Uu(n, e) {
4427
+ function Ud(n, e) {
4429
4428
  for (let t = 0; t < e.length; t++)
4430
4429
  if (n.eq(e[t]))
4431
4430
  return e[t];
@@ -4468,8 +4467,8 @@ class ve {
4468
4467
  for (; l < s.length; )
4469
4468
  i = s.pop()[1];
4470
4469
  for (; a < o.marks.length; ) {
4471
- let c = o.marks[a++], u = this.serializeMark(c, o.isInline, t);
4472
- u && (s.push([c, i]), i.appendChild(u.dom), i = u.contentDOM || u.dom);
4470
+ let c = o.marks[a++], d = this.serializeMark(c, o.isInline, t);
4471
+ d && (s.push([c, i]), i.appendChild(d.dom), i = d.contentDOM || d.dom);
4473
4472
  }
4474
4473
  }
4475
4474
  i.appendChild(this.serializeNodeInner(o, t));
@@ -4526,20 +4525,20 @@ class ve {
4526
4525
  let o, l = r ? e.createElementNS(r, i) : e.createElement(i), a = t[1], c = 1;
4527
4526
  if (a && typeof a == "object" && a.nodeType == null && !Array.isArray(a)) {
4528
4527
  c = 2;
4529
- for (let u in a)
4530
- if (a[u] != null) {
4531
- let d = u.indexOf(" ");
4532
- d > 0 ? l.setAttributeNS(u.slice(0, d), u.slice(d + 1), a[u]) : l.setAttribute(u, a[u]);
4528
+ for (let d in a)
4529
+ if (a[d] != null) {
4530
+ let u = d.indexOf(" ");
4531
+ u > 0 ? l.setAttributeNS(d.slice(0, u), d.slice(u + 1), a[d]) : l.setAttribute(d, a[d]);
4533
4532
  }
4534
4533
  }
4535
- for (let u = c; u < t.length; u++) {
4536
- let d = t[u];
4537
- if (d === 0) {
4538
- if (u < t.length - 1 || u > c)
4534
+ for (let d = c; d < t.length; d++) {
4535
+ let u = t[d];
4536
+ if (u === 0) {
4537
+ if (d < t.length - 1 || d > c)
4539
4538
  throw new RangeError("Content hole must be the only child of its parent node");
4540
4539
  return { dom: l, contentDOM: l };
4541
4540
  } else {
4542
- let { dom: f, contentDOM: h } = ve.renderSpec(e, d, r);
4541
+ let { dom: f, contentDOM: h } = ve.renderSpec(e, u, r);
4543
4542
  if (l.appendChild(f), h) {
4544
4543
  if (o)
4545
4544
  throw new RangeError("Multiple content holes");
@@ -4583,13 +4582,13 @@ function ri(n) {
4583
4582
  return n.document || window.document;
4584
4583
  }
4585
4584
  const Nl = 65535, Pl = Math.pow(2, 16);
4586
- function Ju(n, e) {
4585
+ function Jd(n, e) {
4587
4586
  return n + e * Pl;
4588
4587
  }
4589
4588
  function qs(n) {
4590
4589
  return n & Nl;
4591
4590
  }
4592
- function Gu(n) {
4591
+ function Gd(n) {
4593
4592
  return (n - (n & Nl)) / Pl;
4594
4593
  }
4595
4594
  const Dl = 1, Il = 2, Sn = 4, Rl = 8;
@@ -4647,7 +4646,7 @@ class le {
4647
4646
  if (!this.inverted)
4648
4647
  for (let i = 0; i < r; i++)
4649
4648
  t += this.ranges[i * 3 + 2] - this.ranges[i * 3 + 1];
4650
- return this.ranges[r * 3] + t + Gu(e);
4649
+ return this.ranges[r * 3] + t + Gd(e);
4651
4650
  }
4652
4651
  mapResult(e, t = 1) {
4653
4652
  return this._map(e, t, !1);
@@ -4664,15 +4663,15 @@ class le {
4664
4663
  let a = this.ranges[l] - (this.inverted ? i : 0);
4665
4664
  if (a > e)
4666
4665
  break;
4667
- let c = this.ranges[l + s], u = this.ranges[l + o], d = a + c;
4668
- if (e <= d) {
4669
- let f = c ? e == a ? -1 : e == d ? 1 : t : t, h = a + i + (f < 0 ? 0 : u);
4666
+ let c = this.ranges[l + s], d = this.ranges[l + o], u = a + c;
4667
+ if (e <= u) {
4668
+ let f = c ? e == a ? -1 : e == u ? 1 : t : t, h = a + i + (f < 0 ? 0 : d);
4670
4669
  if (r)
4671
4670
  return h;
4672
- let p = e == (t < 0 ? a : d) ? null : Ju(l / 3, e - a), m = e == a ? Il : e == d ? Dl : Sn;
4673
- return (t < 0 ? e != a : e != d) && (m |= Rl), new Pi(h, m, p);
4671
+ let p = e == (t < 0 ? a : u) ? null : Jd(l / 3, e - a), m = e == a ? Il : e == u ? Dl : Sn;
4672
+ return (t < 0 ? e != a : e != u) && (m |= Rl), new Pi(h, m, p);
4674
4673
  }
4675
- i += u - c;
4674
+ i += d - c;
4676
4675
  }
4677
4676
  return r ? e + i : new Pi(e + i, 0, null);
4678
4677
  }
@@ -4685,8 +4684,8 @@ class le {
4685
4684
  let a = this.ranges[l] - (this.inverted ? r : 0);
4686
4685
  if (a > e)
4687
4686
  break;
4688
- let c = this.ranges[l + s], u = a + c;
4689
- if (e <= u && l == i * 3)
4687
+ let c = this.ranges[l + s], d = a + c;
4688
+ if (e <= d && l == i * 3)
4690
4689
  return !0;
4691
4690
  r += this.ranges[l + o] - c;
4692
4691
  }
@@ -4699,8 +4698,8 @@ class le {
4699
4698
  forEach(e) {
4700
4699
  let t = this.inverted ? 2 : 1, r = this.inverted ? 1 : 2;
4701
4700
  for (let i = 0, s = 0; i < this.ranges.length; i += 3) {
4702
- let o = this.ranges[i], l = o - (this.inverted ? s : 0), a = o + (this.inverted ? 0 : s), c = this.ranges[i + t], u = this.ranges[i + r];
4703
- e(l, l + c, a, a + u), s += u - c;
4701
+ let o = this.ranges[i], l = o - (this.inverted ? s : 0), a = o + (this.inverted ? 0 : s), c = this.ranges[i + t], d = this.ranges[i + r];
4702
+ e(l, l + c, a, a + d), s += d - c;
4704
4703
  }
4705
4704
  }
4706
4705
  /**
@@ -5198,21 +5197,21 @@ function Di(n, e, t) {
5198
5197
  }
5199
5198
  return !1;
5200
5199
  }
5201
- function Yu(n, e, t, r) {
5200
+ function Yd(n, e, t, r) {
5202
5201
  let i = [], s = [], o, l;
5203
- n.doc.nodesBetween(e, t, (a, c, u) => {
5202
+ n.doc.nodesBetween(e, t, (a, c, d) => {
5204
5203
  if (!a.isInline)
5205
5204
  return;
5206
- let d = a.marks;
5207
- if (!r.isInSet(d) && u.type.allowsMarkType(r.type)) {
5208
- let f = Math.max(c, e), h = Math.min(c + a.nodeSize, t), p = r.addToSet(d);
5209
- for (let m = 0; m < d.length; m++)
5210
- d[m].isInSet(p) || (o && o.to == f && o.mark.eq(d[m]) ? o.to = h : i.push(o = new Ce(f, h, d[m])));
5205
+ let u = a.marks;
5206
+ if (!r.isInSet(u) && d.type.allowsMarkType(r.type)) {
5207
+ let f = Math.max(c, e), h = Math.min(c + a.nodeSize, t), p = r.addToSet(u);
5208
+ for (let m = 0; m < u.length; m++)
5209
+ u[m].isInSet(p) || (o && o.to == f && o.mark.eq(u[m]) ? o.to = h : i.push(o = new Ce(f, h, u[m])));
5211
5210
  l && l.to == f ? l.to = h : s.push(l = new Ve(f, h, r));
5212
5211
  }
5213
5212
  }), i.forEach((a) => n.step(a)), s.forEach((a) => n.step(a));
5214
5213
  }
5215
- function Xu(n, e, t, r) {
5214
+ function Xd(n, e, t, r) {
5216
5215
  let i = [], s = 0;
5217
5216
  n.doc.nodesBetween(e, t, (o, l) => {
5218
5217
  if (!o.isInline)
@@ -5220,38 +5219,38 @@ function Xu(n, e, t, r) {
5220
5219
  s++;
5221
5220
  let a = null;
5222
5221
  if (r instanceof pr) {
5223
- let c = o.marks, u;
5224
- for (; u = r.isInSet(c); )
5225
- (a || (a = [])).push(u), c = u.removeFromSet(c);
5222
+ let c = o.marks, d;
5223
+ for (; d = r.isInSet(c); )
5224
+ (a || (a = [])).push(d), c = d.removeFromSet(c);
5226
5225
  } else
5227
5226
  r ? r.isInSet(o.marks) && (a = [r]) : a = o.marks;
5228
5227
  if (a && a.length) {
5229
5228
  let c = Math.min(l + o.nodeSize, t);
5230
- for (let u = 0; u < a.length; u++) {
5231
- let d = a[u], f;
5229
+ for (let d = 0; d < a.length; d++) {
5230
+ let u = a[d], f;
5232
5231
  for (let h = 0; h < i.length; h++) {
5233
5232
  let p = i[h];
5234
- p.step == s - 1 && d.eq(i[h].style) && (f = p);
5233
+ p.step == s - 1 && u.eq(i[h].style) && (f = p);
5235
5234
  }
5236
- f ? (f.to = c, f.step = s) : i.push({ style: d, from: Math.max(l, e), to: c, step: s });
5235
+ f ? (f.to = c, f.step = s) : i.push({ style: u, from: Math.max(l, e), to: c, step: s });
5237
5236
  }
5238
5237
  }
5239
5238
  }), i.forEach((o) => n.step(new Ce(o.from, o.to, o.style)));
5240
5239
  }
5241
- function Qu(n, e, t, r = t.contentMatch) {
5240
+ function Qd(n, e, t, r = t.contentMatch) {
5242
5241
  let i = n.doc.nodeAt(e), s = [], o = e + 1;
5243
5242
  for (let l = 0; l < i.childCount; l++) {
5244
- let a = i.child(l), c = o + a.nodeSize, u = r.matchType(a.type);
5245
- if (!u)
5243
+ let a = i.child(l), c = o + a.nodeSize, d = r.matchType(a.type);
5244
+ if (!d)
5246
5245
  s.push(new V(o, c, S.empty));
5247
5246
  else {
5248
- r = u;
5249
- for (let d = 0; d < a.marks.length; d++)
5250
- t.allowsMarkType(a.marks[d].type) || n.step(new Ce(o, c, a.marks[d]));
5247
+ r = d;
5248
+ for (let u = 0; u < a.marks.length; u++)
5249
+ t.allowsMarkType(a.marks[u].type) || n.step(new Ce(o, c, a.marks[u]));
5251
5250
  if (a.isText && !t.spec.code) {
5252
- let d, f = /\r?\n|\r/g, h;
5253
- for (; d = f.exec(a.text); )
5254
- h || (h = new S(b.from(t.schema.text(" ", t.allowedMarks(a.marks))), 0, 0)), s.push(new V(o + d.index, o + d.index + d[0].length, h));
5251
+ let u, f = /\r?\n|\r/g, h;
5252
+ for (; u = f.exec(a.text); )
5253
+ h || (h = new S(b.from(t.schema.text(" ", t.allowedMarks(a.marks))), 0, 0)), s.push(new V(o + u.index, o + u.index + u[0].length, h));
5255
5254
  }
5256
5255
  }
5257
5256
  o = c;
@@ -5263,7 +5262,7 @@ function Qu(n, e, t, r = t.contentMatch) {
5263
5262
  for (let l = s.length - 1; l >= 0; l--)
5264
5263
  n.step(s[l]);
5265
5264
  }
5266
- function Zu(n, e, t) {
5265
+ function Zd(n, e, t) {
5267
5266
  return (e == 0 || n.canReplace(e, n.childCount)) && (t == n.childCount || n.canReplace(0, t));
5268
5267
  }
5269
5268
  function Dt(n) {
@@ -5272,35 +5271,35 @@ function Dt(n) {
5272
5271
  let i = n.$from.node(r), s = n.$from.index(r), o = n.$to.indexAfter(r);
5273
5272
  if (r < n.depth && i.canReplace(s, o, t))
5274
5273
  return r;
5275
- if (r == 0 || i.type.spec.isolating || !Zu(i, s, o))
5274
+ if (r == 0 || i.type.spec.isolating || !Zd(i, s, o))
5276
5275
  break;
5277
5276
  }
5278
5277
  return null;
5279
5278
  }
5280
- function ed(n, e, t) {
5281
- let { $from: r, $to: i, depth: s } = e, o = r.before(s + 1), l = i.after(s + 1), a = o, c = l, u = b.empty, d = 0;
5279
+ function eu(n, e, t) {
5280
+ let { $from: r, $to: i, depth: s } = e, o = r.before(s + 1), l = i.after(s + 1), a = o, c = l, d = b.empty, u = 0;
5282
5281
  for (let p = s, m = !1; p > t; p--)
5283
- m || r.index(p) > 0 ? (m = !0, u = b.from(r.node(p).copy(u)), d++) : a--;
5282
+ m || r.index(p) > 0 ? (m = !0, d = b.from(r.node(p).copy(d)), u++) : a--;
5284
5283
  let f = b.empty, h = 0;
5285
5284
  for (let p = s, m = !1; p > t; p--)
5286
5285
  m || i.after(p + 1) < i.end(p) ? (m = !0, f = b.from(i.node(p).copy(f)), h++) : c++;
5287
- n.step(new z(a, c, o, l, new S(u.append(f), d, h), u.size - d, !0));
5286
+ n.step(new z(a, c, o, l, new S(d.append(f), u, h), d.size - u, !0));
5288
5287
  }
5289
5288
  function rs(n, e, t = null, r = n) {
5290
- let i = td(n, e), s = i && nd(r, e);
5289
+ let i = tu(n, e), s = i && nu(r, e);
5291
5290
  return s ? i.map(Ws).concat({ type: e, attrs: t }).concat(s.map(Ws)) : null;
5292
5291
  }
5293
5292
  function Ws(n) {
5294
5293
  return { type: n, attrs: null };
5295
5294
  }
5296
- function td(n, e) {
5295
+ function tu(n, e) {
5297
5296
  let { parent: t, startIndex: r, endIndex: i } = n, s = t.contentMatchAt(r).findWrapping(e);
5298
5297
  if (!s)
5299
5298
  return null;
5300
5299
  let o = s.length ? s[0] : e;
5301
5300
  return t.canReplaceWith(r, i, o) ? s : null;
5302
5301
  }
5303
- function nd(n, e) {
5302
+ function nu(n, e) {
5304
5303
  let { parent: t, startIndex: r, endIndex: i } = n, s = t.child(r), o = e.contentMatch.findWrapping(s.type);
5305
5304
  if (!o)
5306
5305
  return null;
@@ -5309,7 +5308,7 @@ function nd(n, e) {
5309
5308
  a = a.matchType(t.child(c).type);
5310
5309
  return !a || !a.validEnd ? null : o;
5311
5310
  }
5312
- function rd(n, e, t) {
5311
+ function ru(n, e, t) {
5313
5312
  let r = b.empty;
5314
5313
  for (let o = t.length - 1; o >= 0; o--) {
5315
5314
  if (r.size) {
@@ -5322,23 +5321,23 @@ function rd(n, e, t) {
5322
5321
  let i = e.start, s = e.end;
5323
5322
  n.step(new z(i, s, i, s, new S(r, 0, 0), t.length, !0));
5324
5323
  }
5325
- function id(n, e, t, r, i) {
5324
+ function iu(n, e, t, r, i) {
5326
5325
  if (!r.isTextblock)
5327
5326
  throw new RangeError("Type given to setBlockType should be a textblock");
5328
5327
  let s = n.steps.length;
5329
5328
  n.doc.nodesBetween(e, t, (o, l) => {
5330
- if (o.isTextblock && !o.hasMarkup(r, i) && sd(n.doc, n.mapping.slice(s).map(l), r)) {
5329
+ if (o.isTextblock && !o.hasMarkup(r, i) && su(n.doc, n.mapping.slice(s).map(l), r)) {
5331
5330
  n.clearIncompatible(n.mapping.slice(s).map(l, 1), r);
5332
- let a = n.mapping.slice(s), c = a.map(l, 1), u = a.map(l + o.nodeSize, 1);
5333
- return n.step(new z(c, u, c + 1, u - 1, new S(b.from(r.create(i, null, o.marks)), 0, 0), 1, !0)), !1;
5331
+ let a = n.mapping.slice(s), c = a.map(l, 1), d = a.map(l + o.nodeSize, 1);
5332
+ return n.step(new z(c, d, c + 1, d - 1, new S(b.from(r.create(i, null, o.marks)), 0, 0), 1, !0)), !1;
5334
5333
  }
5335
5334
  });
5336
5335
  }
5337
- function sd(n, e, t) {
5336
+ function su(n, e, t) {
5338
5337
  let r = n.resolve(e), i = r.index();
5339
5338
  return r.parent.canReplaceWith(i, i + 1, t);
5340
5339
  }
5341
- function od(n, e, t, r, i) {
5340
+ function ou(n, e, t, r, i) {
5342
5341
  let s = n.doc.nodeAt(e);
5343
5342
  if (!s)
5344
5343
  throw new RangeError("No node at given position");
@@ -5354,25 +5353,25 @@ function vt(n, e, t = 1, r) {
5354
5353
  let i = n.resolve(e), s = i.depth - t, o = r && r[r.length - 1] || i.parent;
5355
5354
  if (s < 0 || i.parent.type.spec.isolating || !i.parent.canReplace(i.index(), i.parent.childCount) || !o.type.validContent(i.parent.content.cutByIndex(i.index(), i.parent.childCount)))
5356
5355
  return !1;
5357
- for (let c = i.depth - 1, u = t - 2; c > s; c--, u--) {
5358
- let d = i.node(c), f = i.index(c);
5359
- if (d.type.spec.isolating)
5356
+ for (let c = i.depth - 1, d = t - 2; c > s; c--, d--) {
5357
+ let u = i.node(c), f = i.index(c);
5358
+ if (u.type.spec.isolating)
5360
5359
  return !1;
5361
- let h = d.content.cutByIndex(f, d.childCount), p = r && r[u + 1];
5360
+ let h = u.content.cutByIndex(f, u.childCount), p = r && r[d + 1];
5362
5361
  p && (h = h.replaceChild(0, p.type.create(p.attrs)));
5363
- let m = r && r[u] || d;
5364
- if (!d.canReplace(f + 1, d.childCount) || !m.type.validContent(h))
5362
+ let m = r && r[d] || u;
5363
+ if (!u.canReplace(f + 1, u.childCount) || !m.type.validContent(h))
5365
5364
  return !1;
5366
5365
  }
5367
5366
  let l = i.indexAfter(s), a = r && r[0];
5368
5367
  return i.node(s).canReplaceWith(l, l, a ? a.type : i.node(s + 1).type);
5369
5368
  }
5370
- function ld(n, e, t = 1, r) {
5369
+ function lu(n, e, t = 1, r) {
5371
5370
  let i = n.doc.resolve(e), s = b.empty, o = b.empty;
5372
5371
  for (let l = i.depth, a = i.depth - t, c = t - 1; l > a; l--, c--) {
5373
5372
  s = b.from(i.node(l).copy(s));
5374
- let u = r && r[c];
5375
- o = b.from(u ? u.type.create(u.attrs, o) : i.node(l).copy(o));
5373
+ let d = r && r[c];
5374
+ o = b.from(d ? d.type.create(d.attrs, o) : i.node(l).copy(o));
5376
5375
  }
5377
5376
  n.step(new V(e, e, new S(s.append(o), t, t), !0));
5378
5377
  }
@@ -5394,11 +5393,11 @@ function Ll(n, e, t = -1) {
5394
5393
  e = t < 0 ? r.before(i) : r.after(i);
5395
5394
  }
5396
5395
  }
5397
- function ad(n, e, t) {
5396
+ function au(n, e, t) {
5398
5397
  let r = new V(e - t, e + t, S.empty, !0);
5399
5398
  n.step(r);
5400
5399
  }
5401
- function cd(n, e, t) {
5400
+ function cu(n, e, t) {
5402
5401
  let r = n.resolve(e);
5403
5402
  if (r.parent.canReplaceWith(r.index(), r.index(), t))
5404
5403
  return e;
@@ -5420,7 +5419,7 @@ function cd(n, e, t) {
5420
5419
  }
5421
5420
  return null;
5422
5421
  }
5423
- function ud(n, e, t) {
5422
+ function du(n, e, t) {
5424
5423
  let r = n.resolve(e);
5425
5424
  if (!t.content.size)
5426
5425
  return e;
@@ -5429,14 +5428,14 @@ function ud(n, e, t) {
5429
5428
  i = i.firstChild.content;
5430
5429
  for (let s = 1; s <= (t.openStart == 0 && t.size ? 2 : 1); s++)
5431
5430
  for (let o = r.depth; o >= 0; o--) {
5432
- let l = o == r.depth ? 0 : r.pos <= (r.start(o + 1) + r.end(o + 1)) / 2 ? -1 : 1, a = r.index(o) + (l > 0 ? 1 : 0), c = r.node(o), u = !1;
5431
+ let l = o == r.depth ? 0 : r.pos <= (r.start(o + 1) + r.end(o + 1)) / 2 ? -1 : 1, a = r.index(o) + (l > 0 ? 1 : 0), c = r.node(o), d = !1;
5433
5432
  if (s == 1)
5434
- u = c.canReplace(a, a, i);
5433
+ d = c.canReplace(a, a, i);
5435
5434
  else {
5436
- let d = c.contentMatchAt(a).findWrapping(i.firstChild.type);
5437
- u = d && c.canReplaceWith(a, a, d[0]);
5435
+ let u = c.contentMatchAt(a).findWrapping(i.firstChild.type);
5436
+ d = u && c.canReplaceWith(a, a, u[0]);
5438
5437
  }
5439
- if (u)
5438
+ if (d)
5440
5439
  return l == 0 ? r.pos : l < 0 ? r.before(o + 1) : r.after(o + 1);
5441
5440
  }
5442
5441
  return null;
@@ -5445,12 +5444,12 @@ function is(n, e, t = e, r = S.empty) {
5445
5444
  if (e == t && !r.size)
5446
5445
  return null;
5447
5446
  let i = n.resolve(e), s = n.resolve(t);
5448
- return Bl(i, s, r) ? new V(e, t, r) : new dd(i, s, r).fit();
5447
+ return Bl(i, s, r) ? new V(e, t, r) : new uu(i, s, r).fit();
5449
5448
  }
5450
5449
  function Bl(n, e, t) {
5451
5450
  return !t.openStart && !t.openEnd && n.start() == e.start() && n.parent.canReplace(n.index(), e.index(), t.content);
5452
5451
  }
5453
- class dd {
5452
+ class uu {
5454
5453
  constructor(e, t, r) {
5455
5454
  this.$from = e, this.$to = t, this.unplaced = r, this.frontier = [], this.placed = b.empty;
5456
5455
  for (let i = 0; i <= e.depth; i++) {
@@ -5499,11 +5498,11 @@ class dd {
5499
5498
  r ? (s = si(this.unplaced.content, r - 1).firstChild, i = s.content) : i = this.unplaced.content;
5500
5499
  let o = i.firstChild;
5501
5500
  for (let l = this.depth; l >= 0; l--) {
5502
- let { type: a, match: c } = this.frontier[l], u, d = null;
5503
- if (t == 1 && (o ? c.matchType(o.type) || (d = c.fillBefore(b.from(o), !1)) : s && a.compatibleContent(s.type)))
5504
- return { sliceDepth: r, frontierDepth: l, parent: s, inject: d };
5505
- if (t == 2 && o && (u = c.findWrapping(o.type)))
5506
- return { sliceDepth: r, frontierDepth: l, parent: s, wrap: u };
5501
+ let { type: a, match: c } = this.frontier[l], d, u = null;
5502
+ if (t == 1 && (o ? c.matchType(o.type) || (u = c.fillBefore(b.from(o), !1)) : s && a.compatibleContent(s.type)))
5503
+ return { sliceDepth: r, frontierDepth: l, parent: s, inject: u };
5504
+ if (t == 2 && o && (d = c.findWrapping(o.type)))
5505
+ return { sliceDepth: r, frontierDepth: l, parent: s, wrap: d };
5507
5506
  if (s && c.matchType(s.type))
5508
5507
  break;
5509
5508
  }
@@ -5530,21 +5529,21 @@ class dd {
5530
5529
  if (s)
5531
5530
  for (let m = 0; m < s.length; m++)
5532
5531
  this.openFrontierNode(s[m]);
5533
- let o = this.unplaced, l = r ? r.content : o.content, a = o.openStart - e, c = 0, u = [], { match: d, type: f } = this.frontier[t];
5532
+ let o = this.unplaced, l = r ? r.content : o.content, a = o.openStart - e, c = 0, d = [], { match: u, type: f } = this.frontier[t];
5534
5533
  if (i) {
5535
5534
  for (let m = 0; m < i.childCount; m++)
5536
- u.push(i.child(m));
5537
- d = d.matchFragment(i);
5535
+ d.push(i.child(m));
5536
+ u = u.matchFragment(i);
5538
5537
  }
5539
5538
  let h = l.size + e - (o.content.size - o.openEnd);
5540
5539
  for (; c < l.childCount; ) {
5541
- let m = l.child(c), g = d.matchType(m.type);
5540
+ let m = l.child(c), g = u.matchType(m.type);
5542
5541
  if (!g)
5543
5542
  break;
5544
- c++, (c > 1 || a == 0 || m.content.size) && (d = g, u.push($l(m.mark(f.allowedMarks(m.marks)), c == 1 ? a : 0, c == l.childCount ? h : -1)));
5543
+ c++, (c > 1 || a == 0 || m.content.size) && (u = g, d.push($l(m.mark(f.allowedMarks(m.marks)), c == 1 ? a : 0, c == l.childCount ? h : -1)));
5545
5544
  }
5546
5545
  let p = c == l.childCount;
5547
- p || (h = -1), this.placed = $t(this.placed, t, b.from(u)), this.frontier[t].match = d, p && h < 0 && r && r.type == this.frontier[this.depth].type && this.frontier.length > 1 && this.closeFrontierNode();
5546
+ p || (h = -1), this.placed = $t(this.placed, t, b.from(d)), this.frontier[t].match = u, p && h < 0 && r && r.type == this.frontier[this.depth].type && this.frontier.length > 1 && this.closeFrontierNode();
5548
5547
  for (let m = 0, g = l; m < h; m++) {
5549
5548
  let y = g.lastChild;
5550
5549
  this.frontier.push({ type: y.type, match: y.contentMatchAt(y.childCount) }), g = y.content;
@@ -5568,8 +5567,8 @@ class dd {
5568
5567
  let { match: r, type: i } = this.frontier[t], s = t < e.depth && e.end(t + 1) == e.pos + (e.depth - (t + 1)), o = oi(e, t, i, r, s);
5569
5568
  if (o) {
5570
5569
  for (let l = t - 1; l >= 0; l--) {
5571
- let { match: a, type: c } = this.frontier[l], u = oi(e, l, c, a, !0);
5572
- if (!u || u.childCount)
5570
+ let { match: a, type: c } = this.frontier[l], d = oi(e, l, c, a, !0);
5571
+ if (!d || d.childCount)
5573
5572
  continue e;
5574
5573
  }
5575
5574
  return { depth: t, fit: o, move: s ? e.doc.resolve(e.after(t + 1)) : e };
@@ -5620,18 +5619,18 @@ function oi(n, e, t, r, i) {
5620
5619
  if (o == s.childCount && !t.compatibleContent(s.type))
5621
5620
  return null;
5622
5621
  let l = r.fillBefore(s.content, !0, o);
5623
- return l && !fd(t, s.content, o) ? l : null;
5622
+ return l && !fu(t, s.content, o) ? l : null;
5624
5623
  }
5625
- function fd(n, e, t) {
5624
+ function fu(n, e, t) {
5626
5625
  for (let r = t; r < e.childCount; r++)
5627
5626
  if (!n.allowsMarks(e.child(r).marks))
5628
5627
  return !0;
5629
5628
  return !1;
5630
5629
  }
5631
- function hd(n) {
5630
+ function hu(n) {
5632
5631
  return n.spec.defining || n.spec.definingForContent;
5633
5632
  }
5634
- function pd(n, e, t, r) {
5633
+ function pu(n, e, t, r) {
5635
5634
  if (!r.size)
5636
5635
  return n.deleteRange(e, t);
5637
5636
  let i = n.doc.resolve(e), s = n.doc.resolve(t);
@@ -5647,22 +5646,22 @@ function pd(n, e, t, r) {
5647
5646
  break;
5648
5647
  o.indexOf(f) > -1 ? l = f : i.before(f) == h && o.splice(1, 0, -f);
5649
5648
  }
5650
- let a = o.indexOf(l), c = [], u = r.openStart;
5649
+ let a = o.indexOf(l), c = [], d = r.openStart;
5651
5650
  for (let f = r.content, h = 0; ; h++) {
5652
5651
  let p = f.firstChild;
5653
5652
  if (c.push(p), h == r.openStart)
5654
5653
  break;
5655
5654
  f = p.content;
5656
5655
  }
5657
- for (let f = u - 1; f >= 0; f--) {
5658
- let h = c[f], p = hd(h.type);
5656
+ for (let f = d - 1; f >= 0; f--) {
5657
+ let h = c[f], p = hu(h.type);
5659
5658
  if (p && !h.sameMarkup(i.node(Math.abs(l) - 1)))
5660
- u = f;
5659
+ d = f;
5661
5660
  else if (p || !h.type.isTextblock)
5662
5661
  break;
5663
5662
  }
5664
5663
  for (let f = r.openStart; f >= 0; f--) {
5665
- let h = (f + u + 1) % (r.openStart + 1), p = c[h];
5664
+ let h = (f + d + 1) % (r.openStart + 1), p = c[h];
5666
5665
  if (p)
5667
5666
  for (let m = 0; m < o.length; m++) {
5668
5667
  let g = o[(m + a) % o.length], y = !0;
@@ -5672,8 +5671,8 @@ function pd(n, e, t, r) {
5672
5671
  return n.replace(i.before(g), y ? s.after(g) : t, new S(Fl(r.content, 0, r.openStart, h), h, r.openEnd));
5673
5672
  }
5674
5673
  }
5675
- let d = n.steps.length;
5676
- for (let f = o.length - 1; f >= 0 && (n.replace(e, t, r), !(n.steps.length > d)); f--) {
5674
+ let u = n.steps.length;
5675
+ for (let f = o.length - 1; f >= 0 && (n.replace(e, t, r), !(n.steps.length > u)); f--) {
5677
5676
  let h = o[f];
5678
5677
  h < 0 || (e = i.before(h), t = s.after(h));
5679
5678
  }
@@ -5689,14 +5688,14 @@ function Fl(n, e, t, r, i) {
5689
5688
  }
5690
5689
  return n;
5691
5690
  }
5692
- function md(n, e, t, r) {
5691
+ function mu(n, e, t, r) {
5693
5692
  if (!r.isInline && e == t && n.doc.resolve(e).parent.content.size) {
5694
- let i = cd(n.doc, e, r.type);
5693
+ let i = cu(n.doc, e, r.type);
5695
5694
  i != null && (e = t = i);
5696
5695
  }
5697
5696
  n.replaceRange(e, t, new S(b.from(r), 0, 0));
5698
5697
  }
5699
- function gd(n, e, t) {
5698
+ function gu(n, e, t) {
5700
5699
  let r = n.doc.resolve(e), i = n.doc.resolve(t), s = zl(r, i);
5701
5700
  for (let o = 0; o < s.length; o++) {
5702
5701
  let l = s[o], a = o == s.length - 1;
@@ -5892,7 +5891,7 @@ class Hl {
5892
5891
  control over what happens.
5893
5892
  */
5894
5893
  replaceRange(e, t, r) {
5895
- return pd(this, e, t, r), this;
5894
+ return pu(this, e, t, r), this;
5896
5895
  }
5897
5896
  /**
5898
5897
  Replace the given range with a node, but use `from` and `to` as
@@ -5904,14 +5903,14 @@ class Hl {
5904
5903
  that parent node.
5905
5904
  */
5906
5905
  replaceRangeWith(e, t, r) {
5907
- return md(this, e, t, r), this;
5906
+ return mu(this, e, t, r), this;
5908
5907
  }
5909
5908
  /**
5910
5909
  Delete the given range, expanding it to cover fully covered
5911
5910
  parent nodes until a valid replace is found.
5912
5911
  */
5913
5912
  deleteRange(e, t) {
5914
- return gd(this, e, t), this;
5913
+ return gu(this, e, t), this;
5915
5914
  }
5916
5915
  /**
5917
5916
  Split the content in the given range off from its parent, if there
@@ -5921,14 +5920,14 @@ class Hl {
5921
5920
  sure the lift is valid.
5922
5921
  */
5923
5922
  lift(e, t) {
5924
- return ed(this, e, t), this;
5923
+ return eu(this, e, t), this;
5925
5924
  }
5926
5925
  /**
5927
5926
  Join the blocks around the given position. If depth is 2, their
5928
5927
  last and first siblings are also joined, and so on.
5929
5928
  */
5930
5929
  join(e, t = 1) {
5931
- return ad(this, e, t), this;
5930
+ return au(this, e, t), this;
5932
5931
  }
5933
5932
  /**
5934
5933
  Wrap the given [range](https://prosemirror.net/docs/ref/#model.NodeRange) in the given set of wrappers.
@@ -5936,21 +5935,21 @@ class Hl {
5936
5935
  probably be computed with [`findWrapping`](https://prosemirror.net/docs/ref/#transform.findWrapping).
5937
5936
  */
5938
5937
  wrap(e, t) {
5939
- return rd(this, e, t), this;
5938
+ return ru(this, e, t), this;
5940
5939
  }
5941
5940
  /**
5942
5941
  Set the type of all textblocks (partly) between `from` and `to` to
5943
5942
  the given node type with the given attributes.
5944
5943
  */
5945
5944
  setBlockType(e, t = e, r, i = null) {
5946
- return id(this, e, t, r, i), this;
5945
+ return iu(this, e, t, r, i), this;
5947
5946
  }
5948
5947
  /**
5949
5948
  Change the type, attributes, and/or marks of the node at `pos`.
5950
5949
  When `type` isn't given, the existing node type is preserved,
5951
5950
  */
5952
5951
  setNodeMarkup(e, t, r = null, i) {
5953
- return od(this, e, t, r, i), this;
5952
+ return ou(this, e, t, r, i), this;
5954
5953
  }
5955
5954
  /**
5956
5955
  Set a single attribute on a given node to a new value.
@@ -5994,13 +5993,13 @@ class Hl {
5994
5993
  use after the split.
5995
5994
  */
5996
5995
  split(e, t = 1, r) {
5997
- return ld(this, e, t, r), this;
5996
+ return lu(this, e, t, r), this;
5998
5997
  }
5999
5998
  /**
6000
5999
  Add the given mark to the inline content between `from` and `to`.
6001
6000
  */
6002
6001
  addMark(e, t, r) {
6003
- return Yu(this, e, t, r), this;
6002
+ return Yd(this, e, t, r), this;
6004
6003
  }
6005
6004
  /**
6006
6005
  Remove marks from inline nodes between `from` and `to`. When
@@ -6009,7 +6008,7 @@ class Hl {
6009
6008
  remove all marks of any type.
6010
6009
  */
6011
6010
  removeMark(e, t, r) {
6012
- return Xu(this, e, t, r), this;
6011
+ return Xd(this, e, t, r), this;
6013
6012
  }
6014
6013
  /**
6015
6014
  Removes all marks and nodes from the content of the node at
@@ -6018,7 +6017,7 @@ class Hl {
6018
6017
  third argument.
6019
6018
  */
6020
6019
  clearIncompatible(e, t, r) {
6021
- return Qu(this, e, t, r), this;
6020
+ return Qd(this, e, t, r), this;
6022
6021
  }
6023
6022
  }
6024
6023
  const li = /* @__PURE__ */ Object.create(null);
@@ -6029,7 +6028,7 @@ class A {
6029
6028
  `$head`.
6030
6029
  */
6031
6030
  constructor(e, t, r) {
6032
- this.$anchor = e, this.$head = t, this.ranges = r || [new yd(e.min(t), e.max(t))];
6031
+ this.$anchor = e, this.$head = t, this.ranges = r || [new yu(e.min(t), e.max(t))];
6033
6032
  }
6034
6033
  /**
6035
6034
  The selection's anchor, as an unresolved position.
@@ -6093,8 +6092,8 @@ class A {
6093
6092
  i = r, r = r.lastChild;
6094
6093
  let s = e.steps.length, o = this.ranges;
6095
6094
  for (let l = 0; l < o.length; l++) {
6096
- let { $from: a, $to: c } = o[l], u = e.mapping.slice(s);
6097
- e.replaceRange(u.map(a.pos), u.map(c.pos), l ? S.empty : t), l == 0 && Js(e, s, (r ? r.isInline : i && i.isTextblock) ? -1 : 1);
6095
+ let { $from: a, $to: c } = o[l], d = e.mapping.slice(s);
6096
+ e.replaceRange(d.map(a.pos), d.map(c.pos), l ? S.empty : t), l == 0 && Js(e, s, (r ? r.isInline : i && i.isTextblock) ? -1 : 1);
6098
6097
  }
6099
6098
  }
6100
6099
  /**
@@ -6104,8 +6103,8 @@ class A {
6104
6103
  replaceWith(e, t) {
6105
6104
  let r = e.steps.length, i = this.ranges;
6106
6105
  for (let s = 0; s < i.length; s++) {
6107
- let { $from: o, $to: l } = i[s], a = e.mapping.slice(r), c = a.map(o.pos), u = a.map(l.pos);
6108
- s ? e.deleteRange(c, u) : (e.replaceRangeWith(c, u, t), Js(e, r, t.isInline ? -1 : 1));
6106
+ let { $from: o, $to: l } = i[s], a = e.mapping.slice(r), c = a.map(o.pos), d = a.map(l.pos);
6107
+ s ? e.deleteRange(c, d) : (e.replaceRangeWith(c, d, t), Js(e, r, t.isInline ? -1 : 1));
6109
6108
  }
6110
6109
  }
6111
6110
  /**
@@ -6187,7 +6186,7 @@ class A {
6187
6186
  }
6188
6187
  }
6189
6188
  A.prototype.visible = !0;
6190
- class yd {
6189
+ class yu {
6191
6190
  /**
6192
6191
  Create a range.
6193
6192
  */
@@ -6375,11 +6374,11 @@ class ge extends A {
6375
6374
  return e instanceof ge;
6376
6375
  }
6377
6376
  getBookmark() {
6378
- return bd;
6377
+ return bu;
6379
6378
  }
6380
6379
  }
6381
6380
  A.jsonID("all", ge);
6382
- const bd = {
6381
+ const bu = {
6383
6382
  map() {
6384
6383
  return this;
6385
6384
  },
@@ -6412,12 +6411,12 @@ function Js(n, e, t) {
6412
6411
  if (!(i instanceof V || i instanceof z))
6413
6412
  return;
6414
6413
  let s = n.mapping.maps[r], o;
6415
- s.forEach((l, a, c, u) => {
6416
- o == null && (o = u);
6414
+ s.forEach((l, a, c, d) => {
6415
+ o == null && (o = d);
6417
6416
  }), n.setSelection(A.near(n.doc.resolve(o), t));
6418
6417
  }
6419
6418
  const Gs = 1, hn = 2, Ys = 4;
6420
- class kd extends Hl {
6419
+ class ku extends Hl {
6421
6420
  /**
6422
6421
  @internal
6423
6422
  */
@@ -6576,7 +6575,7 @@ class Ft {
6576
6575
  this.name = e, this.init = Xs(t.init, r), this.apply = Xs(t.apply, r);
6577
6576
  }
6578
6577
  }
6579
- const Sd = [
6578
+ const Su = [
6580
6579
  new Ft("doc", {
6581
6580
  init(n) {
6582
6581
  return n.doc || n.schema.topNodeType.createAndFill();
@@ -6612,7 +6611,7 @@ const Sd = [
6612
6611
  ];
6613
6612
  class ai {
6614
6613
  constructor(e, t) {
6615
- this.schema = e, this.plugins = [], this.pluginsByKey = /* @__PURE__ */ Object.create(null), this.fields = Sd.slice(), t && t.forEach((r) => {
6614
+ this.schema = e, this.plugins = [], this.pluginsByKey = /* @__PURE__ */ Object.create(null), this.fields = Su.slice(), t && t.forEach((r) => {
6616
6615
  if (this.pluginsByKey[r.key])
6617
6616
  throw new RangeError("Adding different instances of a keyed plugin (" + r.key + ")");
6618
6617
  this.plugins.push(r), this.pluginsByKey[r.key] = r, r.spec.state && this.fields.push(new Ft(r.key, r.spec.state, r));
@@ -6672,14 +6671,14 @@ class xt {
6672
6671
  for (let o = 0; o < this.config.plugins.length; o++) {
6673
6672
  let l = this.config.plugins[o];
6674
6673
  if (l.spec.appendTransaction) {
6675
- let a = i ? i[o].n : 0, c = i ? i[o].state : this, u = a < t.length && l.spec.appendTransaction.call(l, a ? t.slice(a) : t, c, r);
6676
- if (u && r.filterTransaction(u, o)) {
6677
- if (u.setMeta("appendedTransaction", e), !i) {
6674
+ let a = i ? i[o].n : 0, c = i ? i[o].state : this, d = a < t.length && l.spec.appendTransaction.call(l, a ? t.slice(a) : t, c, r);
6675
+ if (d && r.filterTransaction(d, o)) {
6676
+ if (d.setMeta("appendedTransaction", e), !i) {
6678
6677
  i = [];
6679
- for (let d = 0; d < this.config.plugins.length; d++)
6680
- i.push(d < o ? { state: r, n: t.length } : { state: this, n: 0 });
6678
+ for (let u = 0; u < this.config.plugins.length; u++)
6679
+ i.push(u < o ? { state: r, n: t.length } : { state: this, n: 0 });
6681
6680
  }
6682
- t.push(u), r = r.applyInner(u), s = !0;
6681
+ t.push(d), r = r.applyInner(d), s = !0;
6683
6682
  }
6684
6683
  i && (i[o] = { state: r, n: t.length });
6685
6684
  }
@@ -6705,7 +6704,7 @@ class xt {
6705
6704
  Start a [transaction](https://prosemirror.net/docs/ref/#state.Transaction) from this state.
6706
6705
  */
6707
6706
  get tr() {
6708
- return new kd(this);
6707
+ return new ku(this);
6709
6708
  }
6710
6709
  /**
6711
6710
  Create a new state.
@@ -6844,14 +6843,14 @@ const Ne = function(n, e, t) {
6844
6843
  return r.setEnd(n, t ?? n.nodeValue.length), r.setStart(n, e || 0), r;
6845
6844
  }, ft = function(n, e, t, r) {
6846
6845
  return t && (Zs(n, e, t, r, -1) || Zs(n, e, t, r, 1));
6847
- }, xd = /^(img|br|input|textarea|hr)$/i;
6846
+ }, xu = /^(img|br|input|textarea|hr)$/i;
6848
6847
  function Zs(n, e, t, r, i) {
6849
6848
  for (; ; ) {
6850
6849
  if (n == t && e == r)
6851
6850
  return !0;
6852
6851
  if (e == (i < 0 ? 0 : Oe(n))) {
6853
6852
  let s = n.parentNode;
6854
- if (!s || s.nodeType != 1 || ls(n) || xd.test(n.nodeName) || n.contentEditable == "false")
6853
+ if (!s || s.nodeType != 1 || ls(n) || xu.test(n.nodeName) || n.contentEditable == "false")
6855
6854
  return !1;
6856
6855
  e = Y(n) + (i < 0 ? 0 : 1), n = s;
6857
6856
  } else if (n.nodeType == 1) {
@@ -6865,7 +6864,7 @@ function Zs(n, e, t, r, i) {
6865
6864
  function Oe(n) {
6866
6865
  return n.nodeType == 3 ? n.nodeValue.length : n.childNodes.length;
6867
6866
  }
6868
- function Od(n, e, t) {
6867
+ function Ou(n, e, t) {
6869
6868
  for (let r = e == 0, i = e == Oe(n); r || i; ) {
6870
6869
  if (n == t)
6871
6870
  return !0;
@@ -6888,13 +6887,13 @@ function et(n, e) {
6888
6887
  let t = document.createEvent("Event");
6889
6888
  return t.initEvent("keydown", !0, !0), t.keyCode = n, t.key = t.code = e, t;
6890
6889
  }
6891
- function vd(n) {
6890
+ function vu(n) {
6892
6891
  let e = n.activeElement;
6893
6892
  for (; e && e.shadowRoot; )
6894
6893
  e = e.shadowRoot.activeElement;
6895
6894
  return e;
6896
6895
  }
6897
- function Cd(n, e, t) {
6896
+ function Cu(n, e, t) {
6898
6897
  if (n.caretPositionFromPoint)
6899
6898
  try {
6900
6899
  let r = n.caretPositionFromPoint(e, t);
@@ -6910,8 +6909,8 @@ function Cd(n, e, t) {
6910
6909
  }
6911
6910
  const Ee = typeof navigator < "u" ? navigator : null, eo = typeof document < "u" ? document : null, Xe = Ee && Ee.userAgent || "", Ii = /Edge\/(\d+)/.exec(Xe), ql = /MSIE \d/.exec(Xe), Ri = /Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Xe), ie = !!(ql || Ri || Ii), Ke = ql ? document.documentMode : Ri ? +Ri[1] : Ii ? +Ii[1] : 0, ye = !ie && /gecko\/(\d+)/i.test(Xe);
6912
6911
  ye && +(/Firefox\/(\d+)/.exec(Xe) || [0, 0])[1];
6913
- const _i = !ie && /Chrome\/(\d+)/.exec(Xe), U = !!_i, Ed = _i ? +_i[1] : 0, X = !ie && !!Ee && /Apple Computer/.test(Ee.vendor), wt = X && (/Mobile\/\w+/.test(Xe) || !!Ee && Ee.maxTouchPoints > 2), de = wt || (Ee ? /Mac/.test(Ee.platform) : !1), Td = Ee ? /Win/.test(Ee.platform) : !1, me = /Android \d/.test(Xe), ln = !!eo && "webkitFontSmoothing" in eo.documentElement.style, Md = ln ? +(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent) || [0, 0])[1] : 0;
6914
- function wd(n) {
6912
+ const _i = !ie && /Chrome\/(\d+)/.exec(Xe), U = !!_i, Eu = _i ? +_i[1] : 0, X = !ie && !!Ee && /Apple Computer/.test(Ee.vendor), wt = X && (/Mobile\/\w+/.test(Xe) || !!Ee && Ee.maxTouchPoints > 2), ue = wt || (Ee ? /Mac/.test(Ee.platform) : !1), Tu = Ee ? /Win/.test(Ee.platform) : !1, me = /Android \d/.test(Xe), ln = !!eo && "webkitFontSmoothing" in eo.documentElement.style, Mu = ln ? +(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent) || [0, 0])[1] : 0;
6913
+ function wu(n) {
6915
6914
  return {
6916
6915
  left: 0,
6917
6916
  right: n.documentElement.clientWidth,
@@ -6922,7 +6921,7 @@ function wd(n) {
6922
6921
  function Me(n, e) {
6923
6922
  return typeof n == "number" ? n : n[e];
6924
6923
  }
6925
- function Ad(n) {
6924
+ function Au(n) {
6926
6925
  let e = n.getBoundingClientRect(), t = e.width / n.offsetWidth || 1, r = e.height / n.offsetHeight || 1;
6927
6926
  return {
6928
6927
  left: e.left,
@@ -6936,13 +6935,13 @@ function to(n, e, t) {
6936
6935
  for (let o = t || n.dom; o; o = Xt(o)) {
6937
6936
  if (o.nodeType != 1)
6938
6937
  continue;
6939
- let l = o, a = l == s.body, c = a ? wd(s) : Ad(l), u = 0, d = 0;
6940
- if (e.top < c.top + Me(r, "top") ? d = -(c.top - e.top + Me(i, "top")) : e.bottom > c.bottom - Me(r, "bottom") && (d = e.bottom - e.top > c.bottom - c.top ? e.top + Me(i, "top") - c.top : e.bottom - c.bottom + Me(i, "bottom")), e.left < c.left + Me(r, "left") ? u = -(c.left - e.left + Me(i, "left")) : e.right > c.right - Me(r, "right") && (u = e.right - c.right + Me(i, "right")), u || d)
6938
+ let l = o, a = l == s.body, c = a ? wu(s) : Au(l), d = 0, u = 0;
6939
+ if (e.top < c.top + Me(r, "top") ? u = -(c.top - e.top + Me(i, "top")) : e.bottom > c.bottom - Me(r, "bottom") && (u = e.bottom - e.top > c.bottom - c.top ? e.top + Me(i, "top") - c.top : e.bottom - c.bottom + Me(i, "bottom")), e.left < c.left + Me(r, "left") ? d = -(c.left - e.left + Me(i, "left")) : e.right > c.right - Me(r, "right") && (d = e.right - c.right + Me(i, "right")), d || u)
6941
6940
  if (a)
6942
- s.defaultView.scrollBy(u, d);
6941
+ s.defaultView.scrollBy(d, u);
6943
6942
  else {
6944
6943
  let f = l.scrollLeft, h = l.scrollTop;
6945
- d && (l.scrollTop += d), u && (l.scrollLeft += u);
6944
+ u && (l.scrollTop += u), d && (l.scrollLeft += d);
6946
6945
  let p = l.scrollLeft - f, m = l.scrollTop - h;
6947
6946
  e = { left: e.left - p, top: e.top - m, right: e.right - p, bottom: e.bottom - m };
6948
6947
  }
@@ -6950,7 +6949,7 @@ function to(n, e, t) {
6950
6949
  break;
6951
6950
  }
6952
6951
  }
6953
- function Nd(n) {
6952
+ function Nu(n) {
6954
6953
  let e = n.dom.getBoundingClientRect(), t = Math.max(0, e.top), r, i;
6955
6954
  for (let s = (e.left + e.right) / 2, o = t + 1; o < Math.min(innerHeight, e.bottom); o += 5) {
6956
6955
  let l = n.root.elementFromPoint(s, o);
@@ -6970,7 +6969,7 @@ function Wl(n) {
6970
6969
  ;
6971
6970
  return e;
6972
6971
  }
6973
- function Pd({ refDOM: n, refTop: e, stack: t }) {
6972
+ function Pu({ refDOM: n, refTop: e, stack: t }) {
6974
6973
  let r = n ? n.getBoundingClientRect().top : 0;
6975
6974
  Kl(t, r == 0 ? 0 : r - e);
6976
6975
  }
@@ -6981,7 +6980,7 @@ function Kl(n, e) {
6981
6980
  }
6982
6981
  }
6983
6982
  let mt = null;
6984
- function Dd(n) {
6983
+ function Du(n) {
6985
6984
  if (n.setActive)
6986
6985
  return n.setActive();
6987
6986
  if (mt)
@@ -6995,12 +6994,12 @@ function Dd(n) {
6995
6994
  }
6996
6995
  function Ul(n, e) {
6997
6996
  let t, r = 2e8, i, s = 0, o = e.top, l = e.top, a, c;
6998
- for (let u = n.firstChild, d = 0; u; u = u.nextSibling, d++) {
6997
+ for (let d = n.firstChild, u = 0; d; d = d.nextSibling, u++) {
6999
6998
  let f;
7000
- if (u.nodeType == 1)
7001
- f = u.getClientRects();
7002
- else if (u.nodeType == 3)
7003
- f = Ne(u).getClientRects();
6999
+ if (d.nodeType == 1)
7000
+ f = d.getClientRects();
7001
+ else if (d.nodeType == 3)
7002
+ f = Ne(d).getClientRects();
7004
7003
  else
7005
7004
  continue;
7006
7005
  for (let h = 0; h < f.length; h++) {
@@ -7009,20 +7008,20 @@ function Ul(n, e) {
7009
7008
  o = Math.max(p.bottom, o), l = Math.min(p.top, l);
7010
7009
  let m = p.left > e.left ? p.left - e.left : p.right < e.left ? e.left - p.right : 0;
7011
7010
  if (m < r) {
7012
- t = u, r = m, i = m && t.nodeType == 3 ? {
7011
+ t = d, r = m, i = m && t.nodeType == 3 ? {
7013
7012
  left: p.right < e.left ? p.right : p.left,
7014
7013
  top: e.top
7015
- } : e, u.nodeType == 1 && m && (s = d + (e.left >= (p.left + p.right) / 2 ? 1 : 0));
7014
+ } : e, d.nodeType == 1 && m && (s = u + (e.left >= (p.left + p.right) / 2 ? 1 : 0));
7016
7015
  continue;
7017
7016
  }
7018
7017
  } else
7019
- p.top > e.top && !a && p.left <= e.left && p.right >= e.left && (a = u, c = { left: Math.max(p.left, Math.min(p.right, e.left)), top: p.top });
7020
- !t && (e.left >= p.right && e.top >= p.top || e.left >= p.left && e.top >= p.bottom) && (s = d + 1);
7018
+ p.top > e.top && !a && p.left <= e.left && p.right >= e.left && (a = d, c = { left: Math.max(p.left, Math.min(p.right, e.left)), top: p.top });
7019
+ !t && (e.left >= p.right && e.top >= p.top || e.left >= p.left && e.top >= p.bottom) && (s = u + 1);
7021
7020
  }
7022
7021
  }
7023
- return !t && a && (t = a, i = c, r = 0), t && t.nodeType == 3 ? Id(t, i) : !t || r && t.nodeType == 1 ? { node: n, offset: s } : Ul(t, i);
7022
+ return !t && a && (t = a, i = c, r = 0), t && t.nodeType == 3 ? Iu(t, i) : !t || r && t.nodeType == 1 ? { node: n, offset: s } : Ul(t, i);
7024
7023
  }
7025
- function Id(n, e) {
7024
+ function Iu(n, e) {
7026
7025
  let t = n.nodeValue.length, r = document.createRange();
7027
7026
  for (let i = 0; i < t; i++) {
7028
7027
  r.setEnd(n, i + 1), r.setStart(n, i);
@@ -7035,11 +7034,11 @@ function Id(n, e) {
7035
7034
  function as(n, e) {
7036
7035
  return n.left >= e.left - 1 && n.left <= e.right + 1 && n.top >= e.top - 1 && n.top <= e.bottom + 1;
7037
7036
  }
7038
- function Rd(n, e) {
7037
+ function Ru(n, e) {
7039
7038
  let t = n.parentNode;
7040
7039
  return t && /^li$/i.test(t.nodeName) && e.left < n.getBoundingClientRect().left ? t : n;
7041
7040
  }
7042
- function _d(n, e, t) {
7041
+ function _u(n, e, t) {
7043
7042
  let { node: r, offset: i } = Ul(e, t), s = -1;
7044
7043
  if (r.nodeType == 1 && !r.firstChild) {
7045
7044
  let o = r.getBoundingClientRect();
@@ -7047,7 +7046,7 @@ function _d(n, e, t) {
7047
7046
  }
7048
7047
  return n.docView.posFromDOM(r, i, s);
7049
7048
  }
7050
- function Ld(n, e, t, r) {
7049
+ function Lu(n, e, t, r) {
7051
7050
  let i = -1;
7052
7051
  for (let s = e, o = !1; s != n.dom; ) {
7053
7052
  let l = n.docView.nearestDesc(s, !0);
@@ -7080,8 +7079,8 @@ function Jl(n, e, t) {
7080
7079
  }
7081
7080
  return n;
7082
7081
  }
7083
- function Bd(n, e) {
7084
- let t = n.dom.ownerDocument, r, i = 0, s = Cd(t, e.left, e.top);
7082
+ function Bu(n, e) {
7083
+ let t = n.dom.ownerDocument, r, i = 0, s = Cu(t, e.left, e.top);
7085
7084
  s && ({ node: r, offset: i } = s);
7086
7085
  let o = (n.root.elementFromPoint ? n.root : t).elementFromPoint(e.left, e.top), l;
7087
7086
  if (!o || !n.dom.contains(o.nodeType != 1 ? o.parentNode : o)) {
@@ -7092,15 +7091,15 @@ function Bd(n, e) {
7092
7091
  if (X)
7093
7092
  for (let c = o; r && c; c = Xt(c))
7094
7093
  c.draggable && (r = void 0);
7095
- if (o = Rd(o, e), r) {
7094
+ if (o = Ru(o, e), r) {
7096
7095
  if (ye && r.nodeType == 1 && (i = Math.min(i, r.childNodes.length), i < r.childNodes.length)) {
7097
- let u = r.childNodes[i], d;
7098
- u.nodeName == "IMG" && (d = u.getBoundingClientRect()).right <= e.left && d.bottom > e.top && i++;
7096
+ let d = r.childNodes[i], u;
7097
+ d.nodeName == "IMG" && (u = d.getBoundingClientRect()).right <= e.left && u.bottom > e.top && i++;
7099
7098
  }
7100
7099
  let c;
7101
- ln && i && r.nodeType == 1 && (c = r.childNodes[i - 1]).nodeType == 1 && c.contentEditable == "false" && c.getBoundingClientRect().top >= e.top && i--, r == n.dom && i == r.childNodes.length - 1 && r.lastChild.nodeType == 1 && e.top > r.lastChild.getBoundingClientRect().bottom ? l = n.state.doc.content.size : (i == 0 || r.nodeType != 1 || r.childNodes[i - 1].nodeName != "BR") && (l = Ld(n, r, i, e));
7100
+ ln && i && r.nodeType == 1 && (c = r.childNodes[i - 1]).nodeType == 1 && c.contentEditable == "false" && c.getBoundingClientRect().top >= e.top && i--, r == n.dom && i == r.childNodes.length - 1 && r.lastChild.nodeType == 1 && e.top > r.lastChild.getBoundingClientRect().bottom ? l = n.state.doc.content.size : (i == 0 || r.nodeType != 1 || r.childNodes[i - 1].nodeName != "BR") && (l = Lu(n, r, i, e));
7102
7101
  }
7103
- l == null && (l = _d(n, o, e));
7102
+ l == null && (l = _u(n, o, e));
7104
7103
  let a = n.docView.nearestDesc(o, !0);
7105
7104
  return { pos: l, inside: a ? a.posAtStart - a.border : -1 };
7106
7105
  }
@@ -7116,37 +7115,37 @@ function $e(n, e) {
7116
7115
  }
7117
7116
  return Array.prototype.find.call(t, no) || n.getBoundingClientRect();
7118
7117
  }
7119
- const $d = /[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;
7118
+ const $u = /[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;
7120
7119
  function Gl(n, e, t) {
7121
7120
  let { node: r, offset: i, atom: s } = n.docView.domFromPos(e, t < 0 ? -1 : 1), o = ln || ye;
7122
7121
  if (r.nodeType == 3)
7123
- if (o && ($d.test(r.nodeValue) || (t < 0 ? !i : i == r.nodeValue.length))) {
7122
+ if (o && ($u.test(r.nodeValue) || (t < 0 ? !i : i == r.nodeValue.length))) {
7124
7123
  let a = $e(Ne(r, i, i), t);
7125
7124
  if (ye && i && /\s/.test(r.nodeValue[i - 1]) && i < r.nodeValue.length) {
7126
7125
  let c = $e(Ne(r, i - 1, i - 1), -1);
7127
7126
  if (c.top == a.top) {
7128
- let u = $e(Ne(r, i, i + 1), -1);
7129
- if (u.top != a.top)
7130
- return _t(u, u.left < c.left);
7127
+ let d = $e(Ne(r, i, i + 1), -1);
7128
+ if (d.top != a.top)
7129
+ return _t(d, d.left < c.left);
7131
7130
  }
7132
7131
  }
7133
7132
  return a;
7134
7133
  } else {
7135
- let a = i, c = i, u = t < 0 ? 1 : -1;
7136
- return t < 0 && !i ? (c++, u = -1) : t >= 0 && i == r.nodeValue.length ? (a--, u = 1) : t < 0 ? a-- : c++, _t($e(Ne(r, a, c), u), u < 0);
7134
+ let a = i, c = i, d = t < 0 ? 1 : -1;
7135
+ return t < 0 && !i ? (c++, d = -1) : t >= 0 && i == r.nodeValue.length ? (a--, d = 1) : t < 0 ? a-- : c++, _t($e(Ne(r, a, c), d), d < 0);
7137
7136
  }
7138
7137
  if (!n.state.doc.resolve(e - (s || 0)).parent.inlineContent) {
7139
7138
  if (s == null && i && (t < 0 || i == Oe(r))) {
7140
7139
  let a = r.childNodes[i - 1];
7141
7140
  if (a.nodeType == 1)
7142
- return ui(a.getBoundingClientRect(), !1);
7141
+ return di(a.getBoundingClientRect(), !1);
7143
7142
  }
7144
7143
  if (s == null && i < Oe(r)) {
7145
7144
  let a = r.childNodes[i];
7146
7145
  if (a.nodeType == 1)
7147
- return ui(a.getBoundingClientRect(), !0);
7146
+ return di(a.getBoundingClientRect(), !0);
7148
7147
  }
7149
- return ui(r.getBoundingClientRect(), t >= 0);
7148
+ return di(r.getBoundingClientRect(), t >= 0);
7150
7149
  }
7151
7150
  if (s == null && i && (t < 0 || i == Oe(r))) {
7152
7151
  let a = r.childNodes[i - 1], c = a.nodeType == 3 ? Ne(a, Oe(a) - (o ? 0 : 1)) : a.nodeType == 1 && (a.nodeName != "BR" || !a.nextSibling) ? a : null;
@@ -7169,7 +7168,7 @@ function _t(n, e) {
7169
7168
  let t = e ? n.left : n.right;
7170
7169
  return { top: n.top, bottom: n.bottom, left: t, right: t };
7171
7170
  }
7172
- function ui(n, e) {
7171
+ function di(n, e) {
7173
7172
  if (n.height == 0)
7174
7173
  return n;
7175
7174
  let t = e ? n.top : n.bottom;
@@ -7184,7 +7183,7 @@ function Yl(n, e, t) {
7184
7183
  r != e && n.updateState(r), i != n.dom && i && i.focus();
7185
7184
  }
7186
7185
  }
7187
- function Fd(n, e, t) {
7186
+ function Fu(n, e, t) {
7188
7187
  let r = e.selection, i = t == "up" ? r.$from : r.$to;
7189
7188
  return Yl(n, e, () => {
7190
7189
  let { node: s } = n.docView.domFromPos(i.pos, t == "up" ? -1 : 1);
@@ -7208,34 +7207,34 @@ function Fd(n, e, t) {
7208
7207
  else
7209
7208
  continue;
7210
7209
  for (let c = 0; c < a.length; c++) {
7211
- let u = a[c];
7212
- if (u.bottom > u.top + 1 && (t == "up" ? o.top - u.top > (u.bottom - o.top) * 2 : u.bottom - o.bottom > (o.bottom - u.top) * 2))
7210
+ let d = a[c];
7211
+ if (d.bottom > d.top + 1 && (t == "up" ? o.top - d.top > (d.bottom - o.top) * 2 : d.bottom - o.bottom > (o.bottom - d.top) * 2))
7213
7212
  return !1;
7214
7213
  }
7215
7214
  }
7216
7215
  return !0;
7217
7216
  });
7218
7217
  }
7219
- const zd = /[\u0590-\u08ac]/;
7220
- function Hd(n, e, t) {
7218
+ const zu = /[\u0590-\u08ac]/;
7219
+ function Hu(n, e, t) {
7221
7220
  let { $head: r } = e.selection;
7222
7221
  if (!r.parent.isTextblock)
7223
7222
  return !1;
7224
7223
  let i = r.parentOffset, s = !i, o = i == r.parent.content.size, l = n.domSelection();
7225
- return !zd.test(r.parent.textContent) || !l.modify ? t == "left" || t == "backward" ? s : o : Yl(n, e, () => {
7226
- let { focusNode: a, focusOffset: c, anchorNode: u, anchorOffset: d } = n.domSelectionRange(), f = l.caretBidiLevel;
7224
+ return !zu.test(r.parent.textContent) || !l.modify ? t == "left" || t == "backward" ? s : o : Yl(n, e, () => {
7225
+ let { focusNode: a, focusOffset: c, anchorNode: d, anchorOffset: u } = n.domSelectionRange(), f = l.caretBidiLevel;
7227
7226
  l.modify("move", t, "character");
7228
7227
  let h = r.depth ? n.docView.domAfterPos(r.before()) : n.dom, { focusNode: p, focusOffset: m } = n.domSelectionRange(), g = p && !h.contains(p.nodeType == 1 ? p : p.parentNode) || a == p && c == m;
7229
7228
  try {
7230
- l.collapse(u, d), a && (a != u || c != d) && l.extend && l.extend(a, c);
7229
+ l.collapse(d, u), a && (a != d || c != u) && l.extend && l.extend(a, c);
7231
7230
  } catch {
7232
7231
  }
7233
7232
  return f != null && (l.caretBidiLevel = f), g;
7234
7233
  });
7235
7234
  }
7236
7235
  let ro = null, io = null, so = !1;
7237
- function jd(n, e, t) {
7238
- return ro == e && io == t ? so : (ro = e, io = t, so = t == "up" || t == "down" ? Fd(n, e, t) : Hd(n, e, t));
7236
+ function ju(n, e, t) {
7237
+ return ro == e && io == t ? so : (ro = e, io = t, so = t == "up" || t == "down" ? Fu(n, e, t) : Hu(n, e, t));
7239
7238
  }
7240
7239
  const fe = 0, oo = 1, tt = 2, Te = 3;
7241
7240
  class an {
@@ -7434,12 +7433,12 @@ class an {
7434
7433
  for (let o = r, l = 0; ; l++) {
7435
7434
  let a = this.children[l], c = o + a.size;
7436
7435
  if (i == -1 && e <= c) {
7437
- let u = o + a.border;
7438
- if (e >= u && t <= c - a.border && a.node && a.contentDOM && this.contentDOM.contains(a.contentDOM))
7439
- return a.parseRange(e, t, u);
7436
+ let d = o + a.border;
7437
+ if (e >= d && t <= c - a.border && a.node && a.contentDOM && this.contentDOM.contains(a.contentDOM))
7438
+ return a.parseRange(e, t, d);
7440
7439
  e = o;
7441
- for (let d = l; d > 0; d--) {
7442
- let f = this.children[d - 1];
7440
+ for (let u = l; u > 0; u--) {
7441
+ let f = this.children[u - 1];
7443
7442
  if (f.size && f.dom.parentNode == this.contentDOM && !f.emptyChildAt(1)) {
7444
7443
  i = Y(f.dom) + 1;
7445
7444
  break;
@@ -7450,13 +7449,13 @@ class an {
7450
7449
  }
7451
7450
  if (i > -1 && (c > t || l == this.children.length - 1)) {
7452
7451
  t = c;
7453
- for (let u = l + 1; u < this.children.length; u++) {
7454
- let d = this.children[u];
7455
- if (d.size && d.dom.parentNode == this.contentDOM && !d.emptyChildAt(-1)) {
7456
- s = Y(d.dom);
7452
+ for (let d = l + 1; d < this.children.length; d++) {
7453
+ let u = this.children[d];
7454
+ if (u.size && u.dom.parentNode == this.contentDOM && !u.emptyChildAt(-1)) {
7455
+ s = Y(u.dom);
7457
7456
  break;
7458
7457
  }
7459
- t += d.size;
7458
+ t += u.size;
7460
7459
  }
7461
7460
  s == -1 && (s = this.contentDOM.childNodes.length);
7462
7461
  break;
@@ -7490,12 +7489,12 @@ class an {
7490
7489
  return p.setSelection(e - h - p.border, t - h - p.border, r, i);
7491
7490
  h = m;
7492
7491
  }
7493
- let l = this.domFromPos(e, e ? -1 : 1), a = t == e ? l : this.domFromPos(t, t ? -1 : 1), c = r.getSelection(), u = !1;
7492
+ let l = this.domFromPos(e, e ? -1 : 1), a = t == e ? l : this.domFromPos(t, t ? -1 : 1), c = r.getSelection(), d = !1;
7494
7493
  if ((ye || X) && e == t) {
7495
7494
  let { node: f, offset: h } = l;
7496
7495
  if (f.nodeType == 3) {
7497
- if (u = !!(h && f.nodeValue[h - 1] == `
7498
- `), u && h == f.nodeValue.length)
7496
+ if (d = !!(h && f.nodeValue[h - 1] == `
7497
+ `), d && h == f.nodeValue.length)
7499
7498
  for (let p = f, m; p; p = p.parentNode) {
7500
7499
  if (m = p.nextSibling) {
7501
7500
  m.nodeName == "BR" && (l = a = { node: m.parentNode, offset: Y(m) + 1 });
@@ -7507,24 +7506,24 @@ class an {
7507
7506
  }
7508
7507
  } else {
7509
7508
  let p = f.childNodes[h - 1];
7510
- u = p && (p.nodeName == "BR" || p.contentEditable == "false");
7509
+ d = p && (p.nodeName == "BR" || p.contentEditable == "false");
7511
7510
  }
7512
7511
  }
7513
7512
  if (ye && c.focusNode && c.focusNode != a.node && c.focusNode.nodeType == 1) {
7514
7513
  let f = c.focusNode.childNodes[c.focusOffset];
7515
7514
  f && f.contentEditable == "false" && (i = !0);
7516
7515
  }
7517
- if (!(i || u && X) && ft(l.node, l.offset, c.anchorNode, c.anchorOffset) && ft(a.node, a.offset, c.focusNode, c.focusOffset))
7516
+ if (!(i || d && X) && ft(l.node, l.offset, c.anchorNode, c.anchorOffset) && ft(a.node, a.offset, c.focusNode, c.focusOffset))
7518
7517
  return;
7519
- let d = !1;
7520
- if ((c.extend || e == t) && !u) {
7518
+ let u = !1;
7519
+ if ((c.extend || e == t) && !d) {
7521
7520
  c.collapse(l.node, l.offset);
7522
7521
  try {
7523
- e != t && c.extend(a.node, a.offset), d = !0;
7522
+ e != t && c.extend(a.node, a.offset), u = !0;
7524
7523
  } catch {
7525
7524
  }
7526
7525
  }
7527
- if (!d) {
7526
+ if (!u) {
7528
7527
  if (e > t) {
7529
7528
  let h = l;
7530
7529
  l = a, a = h;
@@ -7610,7 +7609,7 @@ class Xl extends an {
7610
7609
  return this.widget.type.side;
7611
7610
  }
7612
7611
  }
7613
- class Vd extends an {
7612
+ class Vu extends an {
7614
7613
  constructor(e, t, r, i) {
7615
7614
  super(e, [], t, null), this.textDOM = r, this.text = i;
7616
7615
  }
@@ -7676,17 +7675,17 @@ class Ue extends an {
7676
7675
  return o;
7677
7676
  if (a.parent)
7678
7677
  return a.parent.posBeforeChild(a);
7679
- }, r, i), u = c && c.dom, d = c && c.contentDOM;
7678
+ }, r, i), d = c && c.dom, u = c && c.contentDOM;
7680
7679
  if (t.isText) {
7681
- if (!u)
7682
- u = document.createTextNode(t.text);
7683
- else if (u.nodeType != 3)
7680
+ if (!d)
7681
+ d = document.createTextNode(t.text);
7682
+ else if (d.nodeType != 3)
7684
7683
  throw new RangeError("Text must be rendered as a DOM text node");
7685
7684
  } else
7686
- u || ({ dom: u, contentDOM: d } = ve.renderSpec(document, t.type.spec.toDOM(t)));
7687
- !d && !t.isText && u.nodeName != "BR" && (u.hasAttribute("contenteditable") || (u.contentEditable = "false"), t.type.spec.draggable && (u.draggable = !0));
7688
- let f = u;
7689
- return u = ta(u, r, t), c ? a = new qd(e, t, r, i, u, d || null, f, c, s, o + 1) : t.isText ? new yr(e, t, r, i, u, f, s) : new Ue(e, t, r, i, u, d || null, f, s, o + 1);
7685
+ d || ({ dom: d, contentDOM: u } = ve.renderSpec(document, t.type.spec.toDOM(t)));
7686
+ !u && !t.isText && d.nodeName != "BR" && (d.hasAttribute("contenteditable") || (d.contentEditable = "false"), t.type.spec.draggable && (d.draggable = !0));
7687
+ let f = d;
7688
+ return d = ta(d, r, t), c ? a = new qu(e, t, r, i, d, u || null, f, c, s, o + 1) : t.isText ? new yr(e, t, r, i, d, f, s) : new Ue(e, t, r, i, d, u || null, f, s, o + 1);
7690
7689
  }
7691
7690
  parseRule() {
7692
7691
  if (this.node.type.spec.reparseInView)
@@ -7722,24 +7721,24 @@ class Ue extends an {
7722
7721
  // separate step, syncs the DOM inside `this.contentDOM` to
7723
7722
  // `this.children`.
7724
7723
  updateChildren(e, t) {
7725
- let r = this.node.inlineContent, i = t, s = e.composing ? this.localCompositionInfo(e, t) : null, o = s && s.pos > -1 ? s : null, l = s && s.pos < 0, a = new Kd(this, o && o.node, e);
7726
- Gd(this.node, this.innerDeco, (c, u, d) => {
7727
- c.spec.marks ? a.syncToMarks(c.spec.marks, r, e) : c.type.side >= 0 && !d && a.syncToMarks(u == this.node.childCount ? R.none : this.node.child(u).marks, r, e), a.placeWidget(c, e, i);
7728
- }, (c, u, d, f) => {
7724
+ let r = this.node.inlineContent, i = t, s = e.composing ? this.localCompositionInfo(e, t) : null, o = s && s.pos > -1 ? s : null, l = s && s.pos < 0, a = new Ku(this, o && o.node, e);
7725
+ Gu(this.node, this.innerDeco, (c, d, u) => {
7726
+ c.spec.marks ? a.syncToMarks(c.spec.marks, r, e) : c.type.side >= 0 && !u && a.syncToMarks(d == this.node.childCount ? R.none : this.node.child(d).marks, r, e), a.placeWidget(c, e, i);
7727
+ }, (c, d, u, f) => {
7729
7728
  a.syncToMarks(c.marks, r, e);
7730
7729
  let h;
7731
- a.findNodeMatch(c, u, d, f) || l && e.state.selection.from > i && e.state.selection.to < i + c.nodeSize && (h = a.findIndexWithChild(s.node)) > -1 && a.updateNodeAt(c, u, d, h, e) || a.updateNextNode(c, u, d, e, f, i) || a.addNode(c, u, d, e, i), i += c.nodeSize;
7732
- }), a.syncToMarks([], r, e), this.node.isTextblock && a.addTextblockHacks(), a.destroyRest(), (a.changed || this.dirty == tt) && (o && this.protectLocalComposition(e, o), Zl(this.contentDOM, this.children, e), wt && Yd(this.dom));
7730
+ a.findNodeMatch(c, d, u, f) || l && e.state.selection.from > i && e.state.selection.to < i + c.nodeSize && (h = a.findIndexWithChild(s.node)) > -1 && a.updateNodeAt(c, d, u, h, e) || a.updateNextNode(c, d, u, e, f, i) || a.addNode(c, d, u, e, i), i += c.nodeSize;
7731
+ }), a.syncToMarks([], r, e), this.node.isTextblock && a.addTextblockHacks(), a.destroyRest(), (a.changed || this.dirty == tt) && (o && this.protectLocalComposition(e, o), Zl(this.contentDOM, this.children, e), wt && Yu(this.dom));
7733
7732
  }
7734
7733
  localCompositionInfo(e, t) {
7735
7734
  let { from: r, to: i } = e.state.selection;
7736
7735
  if (!(e.state.selection instanceof N) || r < t || i > t + this.node.content.size)
7737
7736
  return null;
7738
- let s = e.domSelectionRange(), o = Xd(s.focusNode, s.focusOffset);
7737
+ let s = e.domSelectionRange(), o = Xu(s.focusNode, s.focusOffset);
7739
7738
  if (!o || !this.dom.contains(o.parentNode))
7740
7739
  return null;
7741
7740
  if (this.node.inlineContent) {
7742
- let l = o.nodeValue, a = Qd(this.node.content, l, r - t, i - t);
7741
+ let l = o.nodeValue, a = Qu(this.node.content, l, r - t, i - t);
7743
7742
  return a < 0 ? null : { node: o, pos: a, text: l };
7744
7743
  } else
7745
7744
  return { node: o, pos: -1, text: "" };
@@ -7755,7 +7754,7 @@ class Ue extends an {
7755
7754
  s.parentNode.removeChild(s.nextSibling);
7756
7755
  s.pmViewDesc && (s.pmViewDesc = void 0);
7757
7756
  }
7758
- let o = new Vd(this, s, t, i);
7757
+ let o = new Vu(this, s, t, i);
7759
7758
  e.input.compositionNodes.push(o), this.children = $i(this.children, r, r + i.length, e, o);
7760
7759
  }
7761
7760
  // If this desc must be updated to match the given node decoration,
@@ -7843,9 +7842,9 @@ class Ql extends an {
7843
7842
  return this.dom.nodeName == "IMG";
7844
7843
  }
7845
7844
  }
7846
- class qd extends Ue {
7847
- constructor(e, t, r, i, s, o, l, a, c, u) {
7848
- super(e, t, r, i, s, o, l, c, u), this.spec = a;
7845
+ class qu extends Ue {
7846
+ constructor(e, t, r, i, s, o, l, a, c, d) {
7847
+ super(e, t, r, i, s, o, l, c, d), this.spec = a;
7849
7848
  }
7850
7849
  // A custom `update` method gets to decide whether the update goes
7851
7850
  // through. If it does, and there's a `contentDOM` node, our logic
@@ -7928,11 +7927,11 @@ function ea(n, e, t, r) {
7928
7927
  let a;
7929
7928
  l && l.nodeName == o.nodeName && i != n && (a = i.parentNode) && a.nodeName.toLowerCase() == o.nodeName || (a = document.createElement(o.nodeName), a.pmIsDeco = !0, a.appendChild(i), l = nt[0]), i = a;
7930
7929
  }
7931
- Wd(i, l || nt[0], o);
7930
+ Wu(i, l || nt[0], o);
7932
7931
  }
7933
7932
  return i;
7934
7933
  }
7935
- function Wd(n, e, t) {
7934
+ function Wu(n, e, t) {
7936
7935
  for (let r in e)
7937
7936
  r != "class" && r != "style" && r != "nodeName" && !(r in t) && n.removeAttribute(r);
7938
7937
  for (let r in t)
@@ -7969,9 +7968,9 @@ function ao(n) {
7969
7968
  let e = n.nextSibling;
7970
7969
  return n.parentNode.removeChild(n), e;
7971
7970
  }
7972
- class Kd {
7971
+ class Ku {
7973
7972
  constructor(e, t, r) {
7974
- this.lock = t, this.view = r, this.index = 0, this.stack = [], this.changed = !1, this.top = e, this.preMatch = Ud(e.node.content, e);
7973
+ this.lock = t, this.view = r, this.index = 0, this.stack = [], this.changed = !1, this.top = e, this.preMatch = Uu(e.node.content, e);
7975
7974
  }
7976
7975
  // Destroy and remove the children between the given indices in
7977
7976
  // `this.top`.
@@ -8059,11 +8058,11 @@ class Kd {
8059
8058
  let c = this.preMatch.matched.get(a);
8060
8059
  if (c != null && c != s)
8061
8060
  return !1;
8062
- let u = a.dom, d, f = this.isLocked(u) && !(e.isText && a.node && a.node.isText && a.nodeDOM.nodeValue == e.text && a.dirty != Te && Bi(t, a.outerDeco));
8061
+ let d = a.dom, u, f = this.isLocked(d) && !(e.isText && a.node && a.node.isText && a.nodeDOM.nodeValue == e.text && a.dirty != Te && Bi(t, a.outerDeco));
8063
8062
  if (!f && a.update(e, t, r, i))
8064
- return this.destroyBetween(this.index, l), a.dom != u && (this.changed = !0), this.index++, !0;
8065
- if (!f && (d = this.recreateWrapper(a, e, t, r, i, o)))
8066
- return this.top.children[this.index] = d, d.contentDOM && (d.dirty = tt, d.updateChildren(i, o + 1), d.dirty = fe), this.changed = !0, this.index++, !0;
8063
+ return this.destroyBetween(this.index, l), a.dom != d && (this.changed = !0), this.index++, !0;
8064
+ if (!f && (u = this.recreateWrapper(a, e, t, r, i, o)))
8065
+ return this.top.children[this.index] = u, u.contentDOM && (u.dirty = tt, u.updateChildren(i, o + 1), u.dirty = fe), this.changed = !0, this.index++, !0;
8067
8066
  break;
8068
8067
  }
8069
8068
  }
@@ -8119,7 +8118,7 @@ class Kd {
8119
8118
  return this.lock && (e == this.lock || e.nodeType == 1 && e.contains(this.lock.parentNode));
8120
8119
  }
8121
8120
  }
8122
- function Ud(n, e) {
8121
+ function Uu(n, e) {
8123
8122
  let t = e, r = t.children.length, i = n.childCount, s = /* @__PURE__ */ new Map(), o = [];
8124
8123
  e:
8125
8124
  for (; i > 0; ) {
@@ -8147,32 +8146,32 @@ function Ud(n, e) {
8147
8146
  }
8148
8147
  return { index: i, matched: s, matches: o.reverse() };
8149
8148
  }
8150
- function Jd(n, e) {
8149
+ function Ju(n, e) {
8151
8150
  return n.type.side - e.type.side;
8152
8151
  }
8153
- function Gd(n, e, t, r) {
8152
+ function Gu(n, e, t, r) {
8154
8153
  let i = e.locals(n), s = 0;
8155
8154
  if (i.length == 0) {
8156
8155
  for (let c = 0; c < n.childCount; c++) {
8157
- let u = n.child(c);
8158
- r(u, i, e.forChild(s, u), c), s += u.nodeSize;
8156
+ let d = n.child(c);
8157
+ r(d, i, e.forChild(s, d), c), s += d.nodeSize;
8159
8158
  }
8160
8159
  return;
8161
8160
  }
8162
8161
  let o = 0, l = [], a = null;
8163
8162
  for (let c = 0; ; ) {
8164
- let u, d;
8163
+ let d, u;
8165
8164
  for (; o < i.length && i[o].to == s; ) {
8166
8165
  let g = i[o++];
8167
- g.widget && (u ? (d || (d = [u])).push(g) : u = g);
8166
+ g.widget && (d ? (u || (u = [d])).push(g) : d = g);
8168
8167
  }
8169
- if (u)
8170
- if (d) {
8171
- d.sort(Jd);
8172
- for (let g = 0; g < d.length; g++)
8173
- t(d[g], c, !!a);
8168
+ if (d)
8169
+ if (u) {
8170
+ u.sort(Ju);
8171
+ for (let g = 0; g < u.length; g++)
8172
+ t(u[g], c, !!a);
8174
8173
  } else
8175
- t(u, c, !!a);
8174
+ t(d, c, !!a);
8176
8175
  let f, h;
8177
8176
  if (a)
8178
8177
  h = -1, f = a, a = null;
@@ -8196,13 +8195,13 @@ function Gd(n, e, t, r) {
8196
8195
  r(f, m, e.forChild(s, f), h), s = p;
8197
8196
  }
8198
8197
  }
8199
- function Yd(n) {
8198
+ function Yu(n) {
8200
8199
  if (n.nodeName == "UL" || n.nodeName == "OL") {
8201
8200
  let e = n.style.cssText;
8202
8201
  n.style.cssText = e + "; list-style: square !important", window.getComputedStyle(n).listStyle, n.style.cssText = e;
8203
8202
  }
8204
8203
  }
8205
- function Xd(n, e) {
8204
+ function Xu(n, e) {
8206
8205
  for (; ; ) {
8207
8206
  if (n.nodeType == 3)
8208
8207
  return n;
@@ -8216,7 +8215,7 @@ function Xd(n, e) {
8216
8215
  return null;
8217
8216
  }
8218
8217
  }
8219
- function Qd(n, e, t, r) {
8218
+ function Qu(n, e, t, r) {
8220
8219
  for (let i = 0, s = 0; i < n.childCount && s <= r; ) {
8221
8220
  let o = n.child(i++), l = s;
8222
8221
  if (s += o.nodeSize, !o.isText)
@@ -8243,8 +8242,8 @@ function Qd(n, e, t, r) {
8243
8242
  function $i(n, e, t, r, i) {
8244
8243
  let s = [];
8245
8244
  for (let o = 0, l = 0; o < n.length; o++) {
8246
- let a = n[o], c = l, u = l += a.size;
8247
- c >= t || u <= e ? s.push(a) : (c < e && s.push(a.slice(0, e - c, r)), i && (s.push(i), i = void 0), u > t && s.push(a.slice(t - c, a.size, r)));
8245
+ let a = n[o], c = l, d = l += a.size;
8246
+ c >= t || d <= e ? s.push(a) : (c < e && s.push(a.slice(0, e - c, r)), i && (s.push(i), i = void 0), d > t && s.push(a.slice(t - c, a.size, r)));
8248
8247
  }
8249
8248
  return s;
8250
8249
  }
@@ -8259,20 +8258,20 @@ function cs(n, e = null) {
8259
8258
  if (gr(t)) {
8260
8259
  for (a = l; i && !i.node; )
8261
8260
  i = i.parent;
8262
- let u = i.node;
8263
- if (i && u.isAtom && C.isSelectable(u) && i.parent && !(u.isInline && Od(t.focusNode, t.focusOffset, i.dom))) {
8264
- let d = i.posBefore;
8265
- c = new C(o == d ? l : r.resolve(d));
8261
+ let d = i.node;
8262
+ if (i && d.isAtom && C.isSelectable(d) && i.parent && !(d.isInline && Ou(t.focusNode, t.focusOffset, i.dom))) {
8263
+ let u = i.posBefore;
8264
+ c = new C(o == u ? l : r.resolve(u));
8266
8265
  }
8267
8266
  } else {
8268
- let u = n.docView.posFromDOM(t.anchorNode, t.anchorOffset, 1);
8269
- if (u < 0)
8267
+ let d = n.docView.posFromDOM(t.anchorNode, t.anchorOffset, 1);
8268
+ if (d < 0)
8270
8269
  return null;
8271
- a = r.resolve(u);
8270
+ a = r.resolve(d);
8272
8271
  }
8273
8272
  if (!c) {
8274
- let u = e == "pointer" || n.state.selection.head < l.pos && !s ? 1 : -1;
8275
- c = us(n, a, l, u);
8273
+ let d = e == "pointer" || n.state.selection.head < l.pos && !s ? 1 : -1;
8274
+ c = ds(n, a, l, d);
8276
8275
  }
8277
8276
  return c;
8278
8277
  }
@@ -8293,30 +8292,30 @@ function Pe(n, e = !1) {
8293
8292
  ef(n);
8294
8293
  else {
8295
8294
  let { anchor: r, head: i } = t, s, o;
8296
- co && !(t instanceof N) && (t.$from.parent.inlineContent || (s = uo(n, t.from)), !t.empty && !t.$from.parent.inlineContent && (o = uo(n, t.to))), n.docView.setSelection(r, i, n.root, e), co && (s && fo(s), o && fo(o)), t.visible ? n.dom.classList.remove("ProseMirror-hideselection") : (n.dom.classList.add("ProseMirror-hideselection"), "onselectionchange" in document && Zd(n));
8295
+ co && !(t instanceof N) && (t.$from.parent.inlineContent || (s = uo(n, t.from)), !t.empty && !t.$from.parent.inlineContent && (o = uo(n, t.to))), n.docView.setSelection(r, i, n.root, e), co && (s && fo(s), o && fo(o)), t.visible ? n.dom.classList.remove("ProseMirror-hideselection") : (n.dom.classList.add("ProseMirror-hideselection"), "onselectionchange" in document && Zu(n));
8297
8296
  }
8298
8297
  n.domObserver.setCurSelection(), n.domObserver.connectSelection();
8299
8298
  }
8300
8299
  }
8301
- const co = X || U && Ed < 63;
8300
+ const co = X || U && Eu < 63;
8302
8301
  function uo(n, e) {
8303
8302
  let { node: t, offset: r } = n.docView.domFromPos(e, 0), i = r < t.childNodes.length ? t.childNodes[r] : null, s = r ? t.childNodes[r - 1] : null;
8304
8303
  if (X && i && i.contentEditable == "false")
8305
- return di(i);
8304
+ return ui(i);
8306
8305
  if ((!i || i.contentEditable == "false") && (!s || s.contentEditable == "false")) {
8307
8306
  if (i)
8308
- return di(i);
8307
+ return ui(i);
8309
8308
  if (s)
8310
- return di(s);
8309
+ return ui(s);
8311
8310
  }
8312
8311
  }
8313
- function di(n) {
8312
+ function ui(n) {
8314
8313
  return n.contentEditable = "true", X && n.draggable && (n.draggable = !1, n.wasDraggable = !0), n;
8315
8314
  }
8316
8315
  function fo(n) {
8317
8316
  n.contentEditable = "false", n.wasDraggable && (n.draggable = !0, n.wasDraggable = null);
8318
8317
  }
8319
- function Zd(n) {
8318
+ function Zu(n) {
8320
8319
  let e = n.dom.ownerDocument;
8321
8320
  e.removeEventListener("selectionchange", n.input.hideSelectionGuard);
8322
8321
  let t = n.domSelectionRange(), r = t.anchorNode, i = t.anchorOffset;
@@ -8340,7 +8339,7 @@ function ra(n, e) {
8340
8339
  function ho(n) {
8341
8340
  n.lastSelectedViewDesc && (n.lastSelectedViewDesc.parent && n.lastSelectedViewDesc.deselectNode(), n.lastSelectedViewDesc = void 0);
8342
8341
  }
8343
- function us(n, e, t, r) {
8342
+ function ds(n, e, t, r) {
8344
8343
  return n.someProp("createSelectionBetween", (i) => i(n, e, t)) || N.between(e, t, r);
8345
8344
  }
8346
8345
  function po(n) {
@@ -8380,7 +8379,7 @@ function mo(n, e, t) {
8380
8379
  if (n.endOfTextblock(e > 0 ? "forward" : "backward")) {
8381
8380
  let i = Fi(n.state, e);
8382
8381
  return i && i instanceof C ? Fe(n, i) : !1;
8383
- } else if (!(de && t.indexOf("m") > -1)) {
8382
+ } else if (!(ue && t.indexOf("m") > -1)) {
8384
8383
  let i = r.$head, s = i.textOffset ? null : e < 0 ? i.nodeBefore : i.nodeAfter, o;
8385
8384
  if (!s || s.isText)
8386
8385
  return !1;
@@ -8523,7 +8522,7 @@ function zi(n, e, t) {
8523
8522
  }
8524
8523
  function go(n, e) {
8525
8524
  let t = n.state.doc.resolve(e);
8526
- if (!(U || Td) && t.parent.inlineContent) {
8525
+ if (!(U || Tu) && t.parent.inlineContent) {
8527
8526
  let i = n.coordsAtPos(e);
8528
8527
  if (e > t.start()) {
8529
8528
  let s = n.coordsAtPos(e - 1), o = (s.top + s.bottom) / 2;
@@ -8540,7 +8539,7 @@ function go(n, e) {
8540
8539
  }
8541
8540
  function yo(n, e, t) {
8542
8541
  let r = n.state.selection;
8543
- if (r instanceof N && !r.empty || t.indexOf("s") > -1 || de && t.indexOf("m") > -1)
8542
+ if (r instanceof N && !r.empty || t.indexOf("s") > -1 || ue && t.indexOf("m") > -1)
8544
8543
  return !1;
8545
8544
  let { $from: i, $to: s } = r;
8546
8545
  if (!i.parent.inlineContent || n.endOfTextblock(e < 0 ? "up" : "down")) {
@@ -8590,24 +8589,24 @@ function af(n) {
8590
8589
  }
8591
8590
  function cf(n, e) {
8592
8591
  let t = e.keyCode, r = af(e);
8593
- if (t == 8 || de && t == 72 && r == "c")
8592
+ if (t == 8 || ue && t == 72 && r == "c")
8594
8593
  return bo(n, -1) || gt(n, -1);
8595
- if (t == 46 && !e.shiftKey || de && t == 68 && r == "c")
8594
+ if (t == 46 && !e.shiftKey || ue && t == 68 && r == "c")
8596
8595
  return bo(n, 1) || gt(n, 1);
8597
8596
  if (t == 13 || t == 27)
8598
8597
  return !0;
8599
- if (t == 37 || de && t == 66 && r == "c") {
8598
+ if (t == 37 || ue && t == 66 && r == "c") {
8600
8599
  let i = t == 37 ? go(n, n.state.selection.from) == "ltr" ? -1 : 1 : -1;
8601
8600
  return mo(n, i, r) || gt(n, i);
8602
- } else if (t == 39 || de && t == 70 && r == "c") {
8601
+ } else if (t == 39 || ue && t == 70 && r == "c") {
8603
8602
  let i = t == 39 ? go(n, n.state.selection.from) == "ltr" ? 1 : -1 : 1;
8604
8603
  return mo(n, i, r) || gt(n, i);
8605
8604
  } else {
8606
- if (t == 38 || de && t == 80 && r == "c")
8605
+ if (t == 38 || ue && t == 80 && r == "c")
8607
8606
  return yo(n, -1, r) || gt(n, -1);
8608
- if (t == 40 || de && t == 78 && r == "c")
8607
+ if (t == 40 || ue && t == 78 && r == "c")
8609
8608
  return lf(n) || yo(n, 1, r) || gt(n, 1);
8610
- if (r == (de ? "m" : "c") && (t == 66 || t == 73 || t == 89 || t == 90))
8609
+ if (r == (ue ? "m" : "c") && (t == 66 || t == 73 || t == 89 || t == 90))
8611
8610
  return !0;
8612
8611
  }
8613
8612
  return !1;
@@ -8624,17 +8623,17 @@ function oa(n, e) {
8624
8623
  }
8625
8624
  let o = n.someProp("clipboardSerializer") || ve.fromSchema(n.state.schema), l = fa(), a = l.createElement("div");
8626
8625
  a.appendChild(o.serializeFragment(r, { document: l }));
8627
- let c = a.firstChild, u, d = 0;
8628
- for (; c && c.nodeType == 1 && (u = da[c.nodeName.toLowerCase()]); ) {
8629
- for (let h = u.length - 1; h >= 0; h--) {
8630
- let p = l.createElement(u[h]);
8626
+ let c = a.firstChild, d, u = 0;
8627
+ for (; c && c.nodeType == 1 && (d = ua[c.nodeName.toLowerCase()]); ) {
8628
+ for (let h = d.length - 1; h >= 0; h--) {
8629
+ let p = l.createElement(d[h]);
8631
8630
  for (; a.firstChild; )
8632
8631
  p.appendChild(a.firstChild);
8633
- a.appendChild(p), d++;
8632
+ a.appendChild(p), u++;
8634
8633
  }
8635
8634
  c = a.firstChild;
8636
8635
  }
8637
- c && c.nodeType == 1 && c.setAttribute("data-pm-slice", `${i} ${s}${d ? ` -${d}` : ""} ${JSON.stringify(t)}`);
8636
+ c && c.nodeType == 1 && c.setAttribute("data-pm-slice", `${i} ${s}${u ? ` -${u}` : ""} ${JSON.stringify(t)}`);
8638
8637
  let f = n.someProp("clipboardTextSerializer", (h) => h(e, n)) || e.content.textBetween(0, e.content.size, `
8639
8638
 
8640
8639
  `);
@@ -8651,9 +8650,9 @@ function la(n, e, t, r, i) {
8651
8650
  }), s)
8652
8651
  return e ? new S(b.from(n.state.schema.text(e.replace(/\r\n?/g, `
8653
8652
  `))), 0, 0) : S.empty;
8654
- let d = n.someProp("clipboardTextParser", (f) => f(e, i, r, n));
8655
- if (d)
8656
- l = d;
8653
+ let u = n.someProp("clipboardTextParser", (f) => f(e, i, r, n));
8654
+ if (u)
8655
+ l = u;
8657
8656
  else {
8658
8657
  let f = i.marks(), { schema: h } = n.state, p = ve.fromSchema(h);
8659
8658
  o = document.createElement("div"), e.split(/(?:\r\n?|\n)+/).forEach((m) => {
@@ -8662,12 +8661,12 @@ function la(n, e, t, r, i) {
8662
8661
  });
8663
8662
  }
8664
8663
  } else
8665
- n.someProp("transformPastedHTML", (d) => {
8666
- t = d(t, n);
8664
+ n.someProp("transformPastedHTML", (u) => {
8665
+ t = u(t, n);
8667
8666
  }), o = ff(t), ln && hf(o);
8668
- let c = o && o.querySelector("[data-pm-slice]"), u = c && /^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(c.getAttribute("data-pm-slice") || "");
8669
- if (u && u[3])
8670
- for (let d = +u[3]; d > 0; d--) {
8667
+ let c = o && o.querySelector("[data-pm-slice]"), d = c && /^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(c.getAttribute("data-pm-slice") || "");
8668
+ if (d && d[3])
8669
+ for (let u = +d[3]; u > 0; u--) {
8671
8670
  let f = o.firstChild;
8672
8671
  for (; f && f.nodeType != 1; )
8673
8672
  f = f.nextSibling;
@@ -8676,27 +8675,27 @@ function la(n, e, t, r, i) {
8676
8675
  o = f;
8677
8676
  }
8678
8677
  if (l || (l = (n.someProp("clipboardParser") || n.someProp("domParser") || ts.fromSchema(n.state.schema)).parseSlice(o, {
8679
- preserveWhitespace: !!(a || u),
8678
+ preserveWhitespace: !!(a || d),
8680
8679
  context: i,
8681
8680
  ruleFromNode(f) {
8682
- return f.nodeName == "BR" && !f.nextSibling && f.parentNode && !uf.test(f.parentNode.nodeName) ? { ignore: !0 } : null;
8681
+ return f.nodeName == "BR" && !f.nextSibling && f.parentNode && !df.test(f.parentNode.nodeName) ? { ignore: !0 } : null;
8683
8682
  }
8684
- })), u)
8685
- l = pf(So(l, +u[1], +u[2]), u[4]);
8686
- else if (l = S.maxOpen(df(l.content, i), !0), l.openStart || l.openEnd) {
8687
- let d = 0, f = 0;
8688
- for (let h = l.content.firstChild; d < l.openStart && !h.type.spec.isolating; d++, h = h.firstChild)
8683
+ })), d)
8684
+ l = pf(So(l, +d[1], +d[2]), d[4]);
8685
+ else if (l = S.maxOpen(uf(l.content, i), !0), l.openStart || l.openEnd) {
8686
+ let u = 0, f = 0;
8687
+ for (let h = l.content.firstChild; u < l.openStart && !h.type.spec.isolating; u++, h = h.firstChild)
8689
8688
  ;
8690
8689
  for (let h = l.content.lastChild; f < l.openEnd && !h.type.spec.isolating; f++, h = h.lastChild)
8691
8690
  ;
8692
- l = So(l, d, f);
8691
+ l = So(l, u, f);
8693
8692
  }
8694
- return n.someProp("transformPasted", (d) => {
8695
- l = d(l, n);
8693
+ return n.someProp("transformPasted", (u) => {
8694
+ l = u(l, n);
8696
8695
  }), l;
8697
8696
  }
8698
- const uf = /^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/i;
8699
- function df(n, e) {
8697
+ const df = /^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/i;
8698
+ function uf(n, e) {
8700
8699
  if (n.childCount < 2)
8701
8700
  return n;
8702
8701
  for (let t = e.depth; t >= 0; t--) {
@@ -8710,9 +8709,9 @@ function df(n, e) {
8710
8709
  if (c = o.length && s.length && ca(a, s, l, o[o.length - 1], 0))
8711
8710
  o[o.length - 1] = c;
8712
8711
  else {
8713
- o.length && (o[o.length - 1] = ua(o[o.length - 1], s.length));
8714
- let u = aa(l, a);
8715
- o.push(u), i = i.matchType(u.type), s = a;
8712
+ o.length && (o[o.length - 1] = da(o[o.length - 1], s.length));
8713
+ let d = aa(l, a);
8714
+ o.push(d), i = i.matchType(d.type), s = a;
8716
8715
  }
8717
8716
  }), o)
8718
8717
  return b.from(o);
@@ -8733,10 +8732,10 @@ function ca(n, e, t, r, i) {
8733
8732
  return r.copy(r.content.append(b.from(aa(t, n, i + 1))));
8734
8733
  }
8735
8734
  }
8736
- function ua(n, e) {
8735
+ function da(n, e) {
8737
8736
  if (e == 0)
8738
8737
  return n;
8739
- let t = n.content.replaceChild(n.childCount - 1, ua(n.lastChild, e - 1)), r = n.contentMatchAt(n.childCount).fillBefore(b.empty, !0);
8738
+ let t = n.content.replaceChild(n.childCount - 1, da(n.lastChild, e - 1)), r = n.contentMatchAt(n.childCount).fillBefore(b.empty, !0);
8740
8739
  return n.copy(t.append(r));
8741
8740
  }
8742
8741
  function Hi(n, e, t, r, i, s) {
@@ -8746,7 +8745,7 @@ function Hi(n, e, t, r, i, s) {
8746
8745
  function So(n, e, t) {
8747
8746
  return e < n.openStart && (n = new S(Hi(n.content, -1, e, n.openStart, 0, n.openEnd), e, n.openEnd)), t < n.openEnd && (n = new S(Hi(n.content, 1, t, n.openEnd, 0, 0), n.openStart, t)), n;
8748
8747
  }
8749
- const da = {
8748
+ const ua = {
8750
8749
  thead: ["table"],
8751
8750
  tbody: ["table"],
8752
8751
  tfoot: ["table"],
@@ -8765,7 +8764,7 @@ function ff(n) {
8765
8764
  let e = /^(\s*<meta [^>]*>)*/.exec(n);
8766
8765
  e && (n = n.slice(e[0].length));
8767
8766
  let t = fa().createElement("div"), r = /<([a-z][^>\s]+)/i.exec(n), i;
8768
- if ((i = r && da[r[1].toLowerCase()]) && (n = i.map((s) => "<" + s + ">").join("") + n + i.map((s) => "</" + s + ">").reverse().join("")), t.innerHTML = n, i)
8767
+ if ((i = r && ua[r[1].toLowerCase()]) && (n = i.map((s) => "<" + s + ">").join("") + n + i.map((s) => "</" + s + ">").reverse().join("")), t.innerHTML = n, i)
8769
8768
  for (let s = 0; s < i.length; s++)
8770
8769
  t = t.querySelector(i[s]) || t;
8771
8770
  return t;
@@ -8805,7 +8804,7 @@ function yf(n) {
8805
8804
  for (let e in Q) {
8806
8805
  let t = Q[e];
8807
8806
  n.dom.addEventListener(e, n.input.eventHandlers[e] = (r) => {
8808
- kf(n, r) && !ds(n, r) && (n.editable || !(r.type in Z)) && t(n, r);
8807
+ kf(n, r) && !us(n, r) && (n.editable || !(r.type in Z)) && t(n, r);
8809
8808
  }, mf[e] ? { passive: !0 } : void 0);
8810
8809
  }
8811
8810
  X && n.dom.addEventListener("input", () => null), ji(n);
@@ -8822,10 +8821,10 @@ function bf(n) {
8822
8821
  function ji(n) {
8823
8822
  n.someProp("handleDOMEvents", (e) => {
8824
8823
  for (let t in e)
8825
- n.input.eventHandlers[t] || n.dom.addEventListener(t, n.input.eventHandlers[t] = (r) => ds(n, r));
8824
+ n.input.eventHandlers[t] || n.dom.addEventListener(t, n.input.eventHandlers[t] = (r) => us(n, r));
8826
8825
  });
8827
8826
  }
8828
- function ds(n, e) {
8827
+ function us(n, e) {
8829
8828
  return n.someProp("handleDOMEvents", (t) => {
8830
8829
  let r = t[e.type];
8831
8830
  return r ? r(n, e) || e.defaultPrevented : !1;
@@ -8842,7 +8841,7 @@ function kf(n, e) {
8842
8841
  return !0;
8843
8842
  }
8844
8843
  function Sf(n, e) {
8845
- !ds(n, e) && Q[e.type] && (n.editable || !(e.type in Z)) && Q[e.type](n, e);
8844
+ !us(n, e) && Q[e.type] && (n.editable || !(e.type in Z)) && Q[e.type](n, e);
8846
8845
  }
8847
8846
  Z.keydown = (n, e) => {
8848
8847
  let t = e;
@@ -8860,7 +8859,7 @@ Z.keyup = (n, e) => {
8860
8859
  };
8861
8860
  Z.keypress = (n, e) => {
8862
8861
  let t = e;
8863
- if (pa(n, t) || !t.charCode || t.ctrlKey && !t.altKey || de && t.metaKey)
8862
+ if (pa(n, t) || !t.charCode || t.ctrlKey && !t.altKey || ue && t.metaKey)
8864
8863
  return;
8865
8864
  if (n.someProp("handleKeyPress", (i) => i(n, t))) {
8866
8865
  t.preventDefault();
@@ -8944,7 +8943,7 @@ function Mf(n, e, t) {
8944
8943
  function hs(n) {
8945
8944
  return Dn(n);
8946
8945
  }
8947
- const ha = de ? "metaKey" : "ctrlKey";
8946
+ const ha = ue ? "metaKey" : "ctrlKey";
8948
8947
  Q.mousedown = (n, e) => {
8949
8948
  let t = e;
8950
8949
  n.input.shiftKey = t.shiftKey;
@@ -8960,8 +8959,8 @@ class wf {
8960
8959
  if (t.inside > -1)
8961
8960
  s = e.state.doc.nodeAt(t.inside), o = t.inside;
8962
8961
  else {
8963
- let u = e.state.doc.resolve(t.pos);
8964
- s = u.parent, o = u.depth ? u.before() : 0;
8962
+ let d = e.state.doc.resolve(t.pos);
8963
+ s = d.parent, o = d.depth ? d.before() : 0;
8965
8964
  }
8966
8965
  const l = i ? null : r.target, a = l ? e.docView.nearestDesc(l, !0) : null;
8967
8966
  this.target = a ? a.dom : null;
@@ -9066,7 +9065,7 @@ function Pf(n, e) {
9066
9065
  t.parentNode && t.parentNode.removeChild(t), n.focus();
9067
9066
  }, 50);
9068
9067
  }
9069
- const Qt = ie && Ke < 15 || wt && Md < 604;
9068
+ const Qt = ie && Ke < 15 || wt && Mu < 604;
9070
9069
  Q.copy = Z.cut = (n, e) => {
9071
9070
  let t = e, r = n.state.selection, i = t.type == "cut";
9072
9071
  if (r.empty)
@@ -9115,7 +9114,7 @@ class Rf {
9115
9114
  this.slice = e, this.move = t;
9116
9115
  }
9117
9116
  }
9118
- const ba = de ? "altKey" : "ctrlKey";
9117
+ const ba = ue ? "altKey" : "ctrlKey";
9119
9118
  Q.dragstart = (n, e) => {
9120
9119
  let t = e, r = n.input.mouseDown;
9121
9120
  if (r && r.done(), !t.dataTransfer)
@@ -9158,19 +9157,19 @@ Z.drop = (n, e) => {
9158
9157
  if (!o)
9159
9158
  return;
9160
9159
  t.preventDefault();
9161
- let a = o ? ud(n.state.doc, s.pos, o) : s.pos;
9160
+ let a = o ? du(n.state.doc, s.pos, o) : s.pos;
9162
9161
  a == null && (a = s.pos);
9163
9162
  let c = n.state.tr;
9164
9163
  l && c.deleteSelection();
9165
- let u = c.mapping.map(a), d = o.openStart == 0 && o.openEnd == 0 && o.content.childCount == 1, f = c.doc;
9166
- if (d ? c.replaceRangeWith(u, u, o.content.firstChild) : c.replaceRange(u, u, o), c.doc.eq(f))
9164
+ let d = c.mapping.map(a), u = o.openStart == 0 && o.openEnd == 0 && o.content.childCount == 1, f = c.doc;
9165
+ if (u ? c.replaceRangeWith(d, d, o.content.firstChild) : c.replaceRange(d, d, o), c.doc.eq(f))
9167
9166
  return;
9168
- let h = c.doc.resolve(u);
9169
- if (d && C.isSelectable(o.content.firstChild) && h.nodeAfter && h.nodeAfter.sameMarkup(o.content.firstChild))
9167
+ let h = c.doc.resolve(d);
9168
+ if (u && C.isSelectable(o.content.firstChild) && h.nodeAfter && h.nodeAfter.sameMarkup(o.content.firstChild))
9170
9169
  c.setSelection(new C(h));
9171
9170
  else {
9172
9171
  let p = c.mapping.map(a);
9173
- c.mapping.maps[c.mapping.maps.length - 1].forEach((m, g, y, O) => p = O), c.setSelection(us(n, h, c.doc.resolve(p)));
9172
+ c.mapping.maps[c.mapping.maps.length - 1].forEach((m, g, y, O) => p = O), c.setSelection(ds(n, h, c.doc.resolve(p)));
9174
9173
  }
9175
9174
  n.focus(), n.dispatch(c.setMeta("uiEvent", "drop"));
9176
9175
  };
@@ -9407,11 +9406,11 @@ class $ {
9407
9406
  addInner(e, t, r) {
9408
9407
  let i, s = 0;
9409
9408
  e.forEach((l, a) => {
9410
- let c = a + r, u;
9411
- if (u = Sa(t, l, c)) {
9409
+ let c = a + r, d;
9410
+ if (d = Sa(t, l, c)) {
9412
9411
  for (i || (i = this.children.slice()); s < i.length && i[s] < a; )
9413
9412
  s += 3;
9414
- i[s] == a ? i[s + 2] = i[s + 2].addInner(l, u, c + 1) : i.splice(s, 0, a, a + l.nodeSize, Rn(u, l, c + 1, at)), s += 3;
9413
+ i[s] == a ? i[s + 2] = i[s + 2].addInner(l, d, c + 1) : i.splice(s, 0, a, a + l.nodeSize, Rn(d, l, c + 1, at)), s += 3;
9415
9414
  }
9416
9415
  });
9417
9416
  let o = ka(s ? xa(t) : t, -r);
@@ -9430,8 +9429,8 @@ class $ {
9430
9429
  let r = this.children, i = this.local;
9431
9430
  for (let s = 0; s < r.length; s += 3) {
9432
9431
  let o, l = r[s] + t, a = r[s + 1] + t;
9433
- for (let u = 0, d; u < e.length; u++)
9434
- (d = e[u]) && d.from > l && d.to < a && (e[u] = null, (o || (o = [])).push(d));
9432
+ for (let d = 0, u; d < e.length; d++)
9433
+ (u = e[d]) && u.from > l && u.to < a && (e[d] = null, (o || (o = [])).push(u));
9435
9434
  if (!o)
9436
9435
  continue;
9437
9436
  r == this.children && (r = this.children.slice());
@@ -9464,8 +9463,8 @@ class $ {
9464
9463
  for (let l = 0; l < this.local.length; l++) {
9465
9464
  let a = this.local[l];
9466
9465
  if (a.from < o && a.to > s && a.type instanceof Je) {
9467
- let c = Math.max(s, a.from) - s, u = Math.min(o, a.to) - s;
9468
- c < u && (i || (i = [])).push(a.copy(c, u));
9466
+ let c = Math.max(s, a.from) - s, d = Math.min(o, a.to) - s;
9467
+ c < d && (i || (i = [])).push(a.copy(c, d));
9469
9468
  }
9470
9469
  }
9471
9470
  if (i) {
@@ -9569,19 +9568,19 @@ class He {
9569
9568
  }
9570
9569
  function _f(n, e, t, r, i, s, o) {
9571
9570
  let l = n.slice();
9572
- for (let c = 0, u = s; c < t.maps.length; c++) {
9573
- let d = 0;
9571
+ for (let c = 0, d = s; c < t.maps.length; c++) {
9572
+ let u = 0;
9574
9573
  t.maps[c].forEach((f, h, p, m) => {
9575
9574
  let g = m - p - (h - f);
9576
9575
  for (let y = 0; y < l.length; y += 3) {
9577
9576
  let O = l[y + 1];
9578
- if (O < 0 || f > O + u - d)
9577
+ if (O < 0 || f > O + d - u)
9579
9578
  continue;
9580
- let E = l[y] + u - d;
9579
+ let E = l[y] + d - u;
9581
9580
  h >= E ? l[y + 1] = f <= E ? -2 : -1 : p >= i && g && (l[y] += g, l[y + 1] += g);
9582
9581
  }
9583
- d += g;
9584
- }), u = t.maps[c].map(u, -1);
9582
+ u += g;
9583
+ }), d = t.maps[c].map(d, -1);
9585
9584
  }
9586
9585
  let a = !1;
9587
9586
  for (let c = 0; c < l.length; c += 3)
@@ -9590,28 +9589,28 @@ function _f(n, e, t, r, i, s, o) {
9590
9589
  a = !0, l[c + 1] = -1;
9591
9590
  continue;
9592
9591
  }
9593
- let u = t.map(n[c] + s), d = u - i;
9594
- if (d < 0 || d >= r.content.size) {
9592
+ let d = t.map(n[c] + s), u = d - i;
9593
+ if (u < 0 || u >= r.content.size) {
9595
9594
  a = !0;
9596
9595
  continue;
9597
9596
  }
9598
- let f = t.map(n[c + 1] + s, -1), h = f - i, { index: p, offset: m } = r.content.findIndex(d), g = r.maybeChild(p);
9599
- if (g && m == d && m + g.nodeSize == h) {
9600
- let y = l[c + 2].mapInner(t, g, u + 1, n[c] + s + 1, o);
9601
- y != K ? (l[c] = d, l[c + 1] = h, l[c + 2] = y) : (l[c + 1] = -2, a = !0);
9597
+ let f = t.map(n[c + 1] + s, -1), h = f - i, { index: p, offset: m } = r.content.findIndex(u), g = r.maybeChild(p);
9598
+ if (g && m == u && m + g.nodeSize == h) {
9599
+ let y = l[c + 2].mapInner(t, g, d + 1, n[c] + s + 1, o);
9600
+ y != K ? (l[c] = u, l[c + 1] = h, l[c + 2] = y) : (l[c + 1] = -2, a = !0);
9602
9601
  } else
9603
9602
  a = !0;
9604
9603
  }
9605
9604
  if (a) {
9606
- let c = Lf(l, n, e, t, i, s, o), u = Rn(c, r, 0, o);
9607
- e = u.local;
9608
- for (let d = 0; d < l.length; d += 3)
9609
- l[d + 1] < 0 && (l.splice(d, 3), d -= 3);
9610
- for (let d = 0, f = 0; d < u.children.length; d += 3) {
9611
- let h = u.children[d];
9605
+ let c = Lf(l, n, e, t, i, s, o), d = Rn(c, r, 0, o);
9606
+ e = d.local;
9607
+ for (let u = 0; u < l.length; u += 3)
9608
+ l[u + 1] < 0 && (l.splice(u, 3), u -= 3);
9609
+ for (let u = 0, f = 0; u < d.children.length; u += 3) {
9610
+ let h = d.children[u];
9612
9611
  for (; f < l.length && l[f] < h; )
9613
9612
  f += 3;
9614
- l.splice(f, 0, u.children[d], u.children[d + 1], u.children[d + 2]);
9613
+ l.splice(f, 0, d.children[u], d.children[u + 1], d.children[u + 2]);
9615
9614
  }
9616
9615
  }
9617
9616
  return new $(e.sort(ct), l);
@@ -9628,12 +9627,12 @@ function ka(n, e) {
9628
9627
  }
9629
9628
  function Lf(n, e, t, r, i, s, o) {
9630
9629
  function l(a, c) {
9631
- for (let u = 0; u < a.local.length; u++) {
9632
- let d = a.local[u].map(r, i, c);
9633
- d ? t.push(d) : o.onRemove && o.onRemove(a.local[u].spec);
9630
+ for (let d = 0; d < a.local.length; d++) {
9631
+ let u = a.local[d].map(r, i, c);
9632
+ u ? t.push(u) : o.onRemove && o.onRemove(a.local[d].spec);
9634
9633
  }
9635
- for (let u = 0; u < a.children.length; u += 3)
9636
- l(a.children[u + 2], a.children[u] + c + 1);
9634
+ for (let d = 0; d < a.children.length; d += 3)
9635
+ l(a.children[d + 2], a.children[d] + c + 1);
9637
9636
  }
9638
9637
  for (let a = 0; a < n.length; a += 3)
9639
9638
  n[a + 1] == -1 && l(n[a + 2], e[a] + s + 1);
@@ -9659,8 +9658,8 @@ function Rn(n, e, t, r) {
9659
9658
  let c = Sa(n, l, a + t);
9660
9659
  if (c) {
9661
9660
  s = !0;
9662
- let u = Rn(c, l, t + a + 1, r);
9663
- u != K && i.push(a, a + l.nodeSize, u);
9661
+ let d = Rn(c, l, t + a + 1, r);
9662
+ d != K && i.push(a, a + l.nodeSize, d);
9664
9663
  }
9665
9664
  });
9666
9665
  let o = ka(s ? xa(n) : n, -t).sort(ct);
@@ -9812,15 +9811,15 @@ class zf {
9812
9811
  t.length && (this.queue = []);
9813
9812
  let r = e.domSelectionRange(), i = !this.suppressingSelectionUpdates && !this.currentSelection.eq(r) && po(e) && !this.ignoreSelectionChange(r), s = -1, o = -1, l = !1, a = [];
9814
9813
  if (e.editable)
9815
- for (let u = 0; u < t.length; u++) {
9816
- let d = this.registerMutation(t[u], a);
9817
- d && (s = s < 0 ? d.from : Math.min(d.from, s), o = o < 0 ? d.to : Math.max(d.to, o), d.typeOver && (l = !0));
9814
+ for (let d = 0; d < t.length; d++) {
9815
+ let u = this.registerMutation(t[d], a);
9816
+ u && (s = s < 0 ? u.from : Math.min(u.from, s), o = o < 0 ? u.to : Math.max(u.to, o), u.typeOver && (l = !0));
9818
9817
  }
9819
9818
  if (ye && a.length > 1) {
9820
- let u = a.filter((d) => d.nodeName == "BR");
9821
- if (u.length == 2) {
9822
- let d = u[0], f = u[1];
9823
- d.parentNode && d.parentNode.parentNode == f.parentNode ? f.remove() : d.remove();
9819
+ let d = a.filter((u) => u.nodeName == "BR");
9820
+ if (d.length == 2) {
9821
+ let u = d[0], f = d[1];
9822
+ u.parentNode && u.parentNode.parentNode == f.parentNode ? f.remove() : u.remove();
9824
9823
  }
9825
9824
  }
9826
9825
  let c = null;
@@ -9834,15 +9833,15 @@ class zf {
9834
9833
  e.attributeName == "style" && !e.oldValue && !e.target.getAttribute("style")) || !r || r.ignoreMutation(e))
9835
9834
  return null;
9836
9835
  if (e.type == "childList") {
9837
- for (let u = 0; u < e.addedNodes.length; u++)
9838
- t.push(e.addedNodes[u]);
9836
+ for (let d = 0; d < e.addedNodes.length; d++)
9837
+ t.push(e.addedNodes[d]);
9839
9838
  if (r.contentDOM && r.contentDOM != r.dom && !r.contentDOM.contains(e.target))
9840
9839
  return { from: r.posBefore, to: r.posAfter };
9841
9840
  let i = e.previousSibling, s = e.nextSibling;
9842
9841
  if (ie && Ke <= 11 && e.addedNodes.length)
9843
- for (let u = 0; u < e.addedNodes.length; u++) {
9844
- let { previousSibling: d, nextSibling: f } = e.addedNodes[u];
9845
- (!d || Array.prototype.indexOf.call(e.addedNodes, d) < 0) && (i = d), (!f || Array.prototype.indexOf.call(e.addedNodes, f) < 0) && (s = f);
9842
+ for (let d = 0; d < e.addedNodes.length; d++) {
9843
+ let { previousSibling: u, nextSibling: f } = e.addedNodes[d];
9844
+ (!u || Array.prototype.indexOf.call(e.addedNodes, u) < 0) && (i = u), (!f || Array.prototype.indexOf.call(e.addedNodes, f) < 0) && (s = f);
9846
9845
  }
9847
9846
  let o = i && i.parentNode == e.target ? Y(i) + 1 : 0, l = r.localPosFromDOM(e.target, o, -1), a = s && s.parentNode == e.target ? Y(s) : e.target.childNodes.length, c = r.localPosFromDOM(e.target, a, 1);
9848
9847
  return { from: l, to: c };
@@ -9876,8 +9875,8 @@ function jf(n) {
9876
9875
  return ft(l.node, l.offset, s, o) && ([r, i, s, o] = [s, o, r, i]), { anchorNode: r, anchorOffset: i, focusNode: s, focusOffset: o };
9877
9876
  }
9878
9877
  function Vf(n, e, t) {
9879
- let { node: r, fromOffset: i, toOffset: s, from: o, to: l } = n.docView.parseRange(e, t), a = n.domSelectionRange(), c, u = a.anchorNode;
9880
- if (u && n.dom.contains(u.nodeType == 1 ? u : u.parentNode) && (c = [{ node: u, offset: a.anchorOffset }], gr(a) || c.push({ node: a.focusNode, offset: a.focusOffset })), U && n.input.lastKeyCode === 8)
9878
+ let { node: r, fromOffset: i, toOffset: s, from: o, to: l } = n.docView.parseRange(e, t), a = n.domSelectionRange(), c, d = a.anchorNode;
9879
+ if (d && n.dom.contains(d.nodeType == 1 ? d : d.parentNode) && (c = [{ node: d, offset: a.anchorOffset }], gr(a) || c.push({ node: a.focusNode, offset: a.focusOffset })), U && n.input.lastKeyCode === 8)
9881
9880
  for (let g = s; g > i; g--) {
9882
9881
  let y = r.childNodes[g - 1], O = y.pmViewDesc;
9883
9882
  if (y.nodeName == "BR" && !O) {
@@ -9887,7 +9886,7 @@ function Vf(n, e, t) {
9887
9886
  if (!O || O.size)
9888
9887
  break;
9889
9888
  }
9890
- let d = n.state.doc, f = n.someProp("domParser") || ts.fromSchema(n.state.schema), h = d.resolve(o), p = null, m = f.parse(r, {
9889
+ let u = n.state.doc, f = n.someProp("domParser") || ts.fromSchema(n.state.schema), h = u.resolve(o), p = null, m = f.parse(r, {
9891
9890
  topNode: h.parent,
9892
9891
  topMatch: h.parent.contentMatchAt(h.index()),
9893
9892
  topOpen: !0,
@@ -9933,9 +9932,9 @@ function Kf(n, e, t, r, i) {
9933
9932
  }
9934
9933
  let o = n.state.doc.resolve(e), l = o.sharedDepth(t);
9935
9934
  e = o.before(l + 1), t = n.state.doc.resolve(t).after(l + 1);
9936
- let a = n.state.selection, c = Vf(n, e, t), u = n.state.doc, d = u.slice(c.from, c.to), f, h;
9935
+ let a = n.state.selection, c = Vf(n, e, t), d = n.state.doc, u = d.slice(c.from, c.to), f, h;
9937
9936
  n.input.lastKeyCode === 8 && Date.now() - 100 < n.input.lastKeyCodeTime ? (f = n.state.selection.to, h = "end") : (f = n.state.selection.from, h = "start"), n.input.lastKeyCode = null;
9938
- let p = Gf(d.content, c.doc.content, c.from, f, h);
9937
+ let p = Gf(u.content, c.doc.content, c.from, f, h);
9939
9938
  if ((wt && n.input.lastIOSEnter > Date.now() - 225 || me) && i.some((v) => v.nodeType == 1 && !Wf.test(v.nodeName)) && (!p || p.endA >= p.endB) && n.someProp("handleKeyDown", (v) => v(n, et(13, "Enter")))) {
9940
9939
  n.input.lastIOSEnter = 0;
9941
9940
  return;
@@ -9958,12 +9957,12 @@ function Kf(n, e, t, r, i) {
9958
9957
  c.sel = { anchor: c.sel.anchor + v, head: c.sel.anchor + v };
9959
9958
  }
9960
9959
  n.input.domChangeCount++, n.state.selection.from < n.state.selection.to && p.start == p.endB && n.state.selection instanceof N && (p.start > n.state.selection.from && p.start <= n.state.selection.from + 2 && n.state.selection.from >= c.from ? p.start = n.state.selection.from : p.endA < n.state.selection.to && p.endA >= n.state.selection.to - 2 && n.state.selection.to <= c.to && (p.endB += n.state.selection.to - p.endA, p.endA = n.state.selection.to)), ie && Ke <= 11 && p.endB == p.start + 1 && p.endA == p.start && p.start > c.from && c.doc.textBetween(p.start - c.from - 1, p.start - c.from + 1) == "  " && (p.start--, p.endA--, p.endB--);
9961
- let m = c.doc.resolveNoCache(p.start - c.from), g = c.doc.resolveNoCache(p.endB - c.from), y = u.resolve(p.start), O = m.sameParent(g) && m.parent.inlineContent && y.end() >= p.endA, E;
9960
+ let m = c.doc.resolveNoCache(p.start - c.from), g = c.doc.resolveNoCache(p.endB - c.from), y = d.resolve(p.start), O = m.sameParent(g) && m.parent.inlineContent && y.end() >= p.endA, E;
9962
9961
  if ((wt && n.input.lastIOSEnter > Date.now() - 225 && (!O || i.some((v) => v.nodeName == "DIV" || v.nodeName == "P")) || !O && m.pos < c.doc.content.size && !m.sameParent(g) && (E = A.findFrom(c.doc.resolve(m.pos + 1), 1, !0)) && E.head == g.pos) && n.someProp("handleKeyDown", (v) => v(n, et(13, "Enter")))) {
9963
9962
  n.input.lastIOSEnter = 0;
9964
9963
  return;
9965
9964
  }
9966
- if (n.state.selection.anchor > p.start && Jf(u, p.start, p.endA, m, g) && n.someProp("handleKeyDown", (v) => v(n, et(8, "Backspace")))) {
9965
+ if (n.state.selection.anchor > p.start && Jf(d, p.start, p.endA, m, g) && n.someProp("handleKeyDown", (v) => v(n, et(8, "Backspace")))) {
9967
9966
  me && U && n.domObserver.suppressSelectionUpdates();
9968
9967
  return;
9969
9968
  }
@@ -9975,7 +9974,7 @@ function Kf(n, e, t, r, i) {
9975
9974
  let I = p.start, D = p.endA, T, _, P;
9976
9975
  if (O) {
9977
9976
  if (m.pos == g.pos)
9978
- ie && Ke <= 11 && m.parentOffset == 0 && (n.domObserver.suppressSelectionUpdates(), setTimeout(() => Pe(n), 20)), T = n.state.tr.delete(I, D), _ = u.resolve(p.start).marksAcross(u.resolve(p.endA));
9977
+ ie && Ke <= 11 && m.parentOffset == 0 && (n.domObserver.suppressSelectionUpdates(), setTimeout(() => Pe(n), 20)), T = n.state.tr.delete(I, D), _ = d.resolve(p.start).marksAcross(d.resolve(p.endA));
9979
9978
  else if (
9980
9979
  // Adding or removing a mark
9981
9980
  p.endA == p.endB && (P = Uf(m.parent.content.cut(m.parentOffset, g.parentOffset), y.parent.content.cut(y.parentOffset, p.endA - y.start())))
@@ -9995,23 +9994,23 @@ function Kf(n, e, t, r, i) {
9995
9994
  _ && T.ensureMarks(_), s && T.setMeta("composition", s), n.dispatch(T.scrollIntoView());
9996
9995
  }
9997
9996
  function Eo(n, e, t) {
9998
- return Math.max(t.anchor, t.head) > e.content.size ? null : us(n, e.resolve(t.anchor), e.resolve(t.head));
9997
+ return Math.max(t.anchor, t.head) > e.content.size ? null : ds(n, e.resolve(t.anchor), e.resolve(t.head));
9999
9998
  }
10000
9999
  function Uf(n, e) {
10001
10000
  let t = n.firstChild.marks, r = e.firstChild.marks, i = t, s = r, o, l, a;
10002
- for (let u = 0; u < r.length; u++)
10003
- i = r[u].removeFromSet(i);
10004
- for (let u = 0; u < t.length; u++)
10005
- s = t[u].removeFromSet(s);
10001
+ for (let d = 0; d < r.length; d++)
10002
+ i = r[d].removeFromSet(i);
10003
+ for (let d = 0; d < t.length; d++)
10004
+ s = t[d].removeFromSet(s);
10006
10005
  if (i.length == 1 && s.length == 0)
10007
- l = i[0], o = "add", a = (u) => u.mark(l.addToSet(u.marks));
10006
+ l = i[0], o = "add", a = (d) => d.mark(l.addToSet(d.marks));
10008
10007
  else if (i.length == 0 && s.length == 1)
10009
- l = s[0], o = "remove", a = (u) => u.mark(l.removeFromSet(u.marks));
10008
+ l = s[0], o = "remove", a = (d) => d.mark(l.removeFromSet(d.marks));
10010
10009
  else
10011
10010
  return null;
10012
10011
  let c = [];
10013
- for (let u = 0; u < e.childCount; u++)
10014
- c.push(a(e.child(u)));
10012
+ for (let d = 0; d < e.childCount; d++)
10013
+ c.push(a(e.child(d)));
10015
10014
  if (b.from(c).eq(n))
10016
10015
  return { mark: l, type: o };
10017
10016
  }
@@ -10126,19 +10125,19 @@ class Yf {
10126
10125
  Qf(f, this.nodeViews) && (this.nodeViews = f, i = !0);
10127
10126
  }
10128
10127
  (o || t.handleDOMEvents != this._props.handleDOMEvents) && ji(this), this.editable = wo(this), Mo(this);
10129
- let l = fi(this), a = To(this), c = r.plugins != e.plugins && !r.doc.eq(e.doc) ? "reset" : e.scrollToSelection > r.scrollToSelection ? "to selection" : "preserve", u = i || !this.docView.matchesNode(e.doc, a, l);
10130
- (u || !e.selection.eq(r.selection)) && (s = !0);
10131
- let d = c == "preserve" && s && this.dom.style.overflowAnchor == null && Nd(this);
10128
+ let l = fi(this), a = To(this), c = r.plugins != e.plugins && !r.doc.eq(e.doc) ? "reset" : e.scrollToSelection > r.scrollToSelection ? "to selection" : "preserve", d = i || !this.docView.matchesNode(e.doc, a, l);
10129
+ (d || !e.selection.eq(r.selection)) && (s = !0);
10130
+ let u = c == "preserve" && s && this.dom.style.overflowAnchor == null && Nu(this);
10132
10131
  if (s) {
10133
10132
  this.domObserver.stop();
10134
- let f = u && (ie || U) && !this.composing && !r.selection.empty && !e.selection.empty && Xf(r.selection, e.selection);
10135
- if (u) {
10133
+ let f = d && (ie || U) && !this.composing && !r.selection.empty && !e.selection.empty && Xf(r.selection, e.selection);
10134
+ if (d) {
10136
10135
  let h = U ? this.trackWrites = this.domSelectionRange().focusNode : null;
10137
10136
  (i || !this.docView.update(e.doc, a, l, this)) && (this.docView.updateOuterDeco([]), this.docView.destroy(), this.docView = lo(e.doc, a, l, this.dom, this)), h && !this.trackWrites && (f = !0);
10138
10137
  }
10139
10138
  f || !(this.input.mouseDown && this.domObserver.currentSelection.eq(this.domSelectionRange()) && tf(this)) ? Pe(this, f) : (ra(this, e.selection), this.domObserver.setCurSelection()), this.domObserver.start();
10140
10139
  }
10141
- this.updatePluginViews(r), c == "reset" ? this.dom.scrollTop = 0 : c == "to selection" ? this.scrollToSelection() : d && Pd(d);
10140
+ this.updatePluginViews(r), c == "reset" ? this.dom.scrollTop = 0 : c == "to selection" ? this.scrollToSelection() : u && Pu(u);
10142
10141
  }
10143
10142
  /**
10144
10143
  @internal
@@ -10214,7 +10213,7 @@ class Yf {
10214
10213
  Focus the editor.
10215
10214
  */
10216
10215
  focus() {
10217
- this.domObserver.stop(), this.editable && Dd(this.dom), Pe(this), this.domObserver.start();
10216
+ this.domObserver.stop(), this.editable && Du(this.dom), Pe(this), this.domObserver.start();
10218
10217
  }
10219
10218
  /**
10220
10219
  Get the document root in which the editor exists. This will
@@ -10248,7 +10247,7 @@ class Yf {
10248
10247
  the top level, not in any node.
10249
10248
  */
10250
10249
  posAtCoords(e) {
10251
- return Bd(this, e);
10250
+ return Bu(this, e);
10252
10251
  }
10253
10252
  /**
10254
10253
  Returns the viewport rectangle at a given document position.
@@ -10313,7 +10312,7 @@ class Yf {
10313
10312
  pass a different state.
10314
10313
  */
10315
10314
  endOfTextblock(e, t) {
10316
- return jd(this, t || this.state, e);
10315
+ return ju(this, t || this.state, e);
10317
10316
  }
10318
10317
  /**
10319
10318
  Run the editor's paste logic with the given HTML string. The
@@ -10367,7 +10366,7 @@ class Yf {
10367
10366
  @internal
10368
10367
  */
10369
10368
  domSelectionRange() {
10370
- return X && this.root.nodeType === 11 && vd(this.dom.ownerDocument) == this.dom ? jf(this) : this.domSelection();
10369
+ return X && this.root.nodeType === 11 && vu(this.dom.ownerDocument) == this.dom ? jf(this) : this.domSelection();
10371
10370
  }
10372
10371
  /**
10373
10372
  @internal
@@ -10605,7 +10604,7 @@ function At(n, e, t = !1) {
10605
10604
  }
10606
10605
  return !1;
10607
10606
  }
10608
- const uh = (n, e, t) => {
10607
+ const dh = (n, e, t) => {
10609
10608
  let { $head: r, empty: i } = n.selection, s = r;
10610
10609
  if (!i)
10611
10610
  return !1;
@@ -10627,12 +10626,12 @@ function Oa(n) {
10627
10626
  }
10628
10627
  return null;
10629
10628
  }
10630
- function dh(n, e) {
10629
+ function uh(n, e) {
10631
10630
  let { $cursor: t } = n.selection;
10632
10631
  return !t || (e ? !e.endOfTextblock("forward", n) : t.parentOffset < t.parent.content.size) ? null : t;
10633
10632
  }
10634
10633
  const fh = (n, e, t) => {
10635
- let r = dh(n, t);
10634
+ let r = uh(n, t);
10636
10635
  if (!r)
10637
10636
  return !1;
10638
10637
  let i = va(r);
@@ -10765,26 +10764,26 @@ function Ea(n, e, t) {
10765
10764
  let l = e.parent.canReplace(e.index(), e.index() + 1);
10766
10765
  if (l && (s = (o = r.contentMatchAt(r.childCount)).findWrapping(i.type)) && o.matchType(s[0] || i.type).validEnd) {
10767
10766
  if (t) {
10768
- let d = e.pos + i.nodeSize, f = b.empty;
10767
+ let u = e.pos + i.nodeSize, f = b.empty;
10769
10768
  for (let m = s.length - 1; m >= 0; m--)
10770
10769
  f = b.from(s[m].create(null, f));
10771
10770
  f = b.from(r.copy(f));
10772
- let h = n.tr.step(new z(e.pos - 1, d, e.pos, d, new S(f, 1, 0), s.length, !0)), p = d + 2 * s.length;
10771
+ let h = n.tr.step(new z(e.pos - 1, u, e.pos, u, new S(f, 1, 0), s.length, !0)), p = u + 2 * s.length;
10773
10772
  Ye(h.doc, p) && h.join(p), t(h.scrollIntoView());
10774
10773
  }
10775
10774
  return !0;
10776
10775
  }
10777
- let a = A.findFrom(e, 1), c = a && a.$from.blockRange(a.$to), u = c && Dt(c);
10778
- if (u != null && u >= e.depth)
10779
- return t && t(n.tr.lift(c, u).scrollIntoView()), !0;
10776
+ let a = A.findFrom(e, 1), c = a && a.$from.blockRange(a.$to), d = c && Dt(c);
10777
+ if (d != null && d >= e.depth)
10778
+ return t && t(n.tr.lift(c, d).scrollIntoView()), !0;
10780
10779
  if (l && At(i, "start", !0) && At(r, "end")) {
10781
- let d = r, f = [];
10782
- for (; f.push(d), !d.isTextblock; )
10783
- d = d.lastChild;
10780
+ let u = r, f = [];
10781
+ for (; f.push(u), !u.isTextblock; )
10782
+ u = u.lastChild;
10784
10783
  let h = i, p = 1;
10785
10784
  for (; !h.isTextblock; h = h.firstChild)
10786
10785
  p++;
10787
- if (d.canReplace(d.childCount, d.childCount, h.content)) {
10786
+ if (u.canReplace(u.childCount, u.childCount, h.content)) {
10788
10787
  if (t) {
10789
10788
  let m = b.empty;
10790
10789
  for (let y = f.length - 1; y >= 0; y--)
@@ -10827,8 +10826,8 @@ function Po(n, e = null) {
10827
10826
  if (a.type == n)
10828
10827
  i = !0;
10829
10828
  else {
10830
- let u = t.doc.resolve(c), d = u.index();
10831
- i = u.parent.canReplaceWith(d, d + 1, n);
10829
+ let d = t.doc.resolve(c), u = d.index();
10830
+ i = d.parent.canReplaceWith(u, u + 1, n);
10832
10831
  }
10833
10832
  });
10834
10833
  }
@@ -10854,8 +10853,8 @@ function Th(n, e = null) {
10854
10853
  if (o.depth >= 2 && i.node(o.depth - 1).type.compatibleContent(n) && o.startIndex == 0) {
10855
10854
  if (i.index(o.depth - 1) == 0)
10856
10855
  return !1;
10857
- let u = t.doc.resolve(o.start - 2);
10858
- a = new Mn(u, u, o.depth), o.endIndex < o.parent.childCount && (o = new Mn(i, t.doc.resolve(s.end(o.depth)), o.depth)), l = !0;
10856
+ let d = t.doc.resolve(o.start - 2);
10857
+ a = new Mn(d, d, o.depth), o.endIndex < o.parent.childCount && (o = new Mn(i, t.doc.resolve(s.end(o.depth)), o.depth)), l = !0;
10859
10858
  }
10860
10859
  let c = rs(a, n, e, o);
10861
10860
  return c ? (r && r(Mh(t.tr, o, c, l, n).scrollIntoView()), !0) : !1;
@@ -10863,15 +10862,15 @@ function Th(n, e = null) {
10863
10862
  }
10864
10863
  function Mh(n, e, t, r, i) {
10865
10864
  let s = b.empty;
10866
- for (let u = t.length - 1; u >= 0; u--)
10867
- s = b.from(t[u].type.create(t[u].attrs, s));
10865
+ for (let d = t.length - 1; d >= 0; d--)
10866
+ s = b.from(t[d].type.create(t[d].attrs, s));
10868
10867
  n.step(new z(e.start - (r ? 2 : 0), e.end, e.start, e.end, new S(s, 0, 0), t.length, !0));
10869
10868
  let o = 0;
10870
- for (let u = 0; u < t.length; u++)
10871
- t[u].type == i && (o = u + 1);
10869
+ for (let d = 0; d < t.length; d++)
10870
+ t[d].type == i && (o = d + 1);
10872
10871
  let l = t.length - o, a = e.start + t.length - (r ? 2 : 0), c = e.parent;
10873
- for (let u = e.startIndex, d = e.endIndex, f = !0; u < d; u++, f = !1)
10874
- !f && vt(n.doc, a, l) && (n.split(a, l), a += 2 * l), a += c.child(u).nodeSize;
10872
+ for (let d = e.startIndex, u = e.endIndex, f = !0; d < u; d++, f = !1)
10873
+ !f && vt(n.doc, a, l) && (n.split(a, l), a += 2 * l), a += c.child(d).nodeSize;
10875
10874
  return n;
10876
10875
  }
10877
10876
  function wh(n) {
@@ -10897,11 +10896,11 @@ function Nh(n, e, t) {
10897
10896
  let s = r.doc.resolve(t.start), o = s.nodeAfter;
10898
10897
  if (r.mapping.map(t.end) != t.start + s.nodeAfter.nodeSize)
10899
10898
  return !1;
10900
- let l = t.startIndex == 0, a = t.endIndex == i.childCount, c = s.node(-1), u = s.index(-1);
10901
- if (!c.canReplace(u + (l ? 0 : 1), u + 1, o.content.append(a ? b.empty : b.from(i))))
10899
+ let l = t.startIndex == 0, a = t.endIndex == i.childCount, c = s.node(-1), d = s.index(-1);
10900
+ if (!c.canReplace(d + (l ? 0 : 1), d + 1, o.content.append(a ? b.empty : b.from(i))))
10902
10901
  return !1;
10903
- let d = s.pos, f = d + o.nodeSize;
10904
- return r.step(new z(d - (l ? 1 : 0), f + (a ? 1 : 0), d + 1, f - 1, new S((l ? b.empty : b.from(i.copy(b.empty))).append(a ? b.empty : b.from(i.copy(b.empty))), l ? 0 : 1, a ? 0 : 1), l ? 0 : 1)), e(r.scrollIntoView()), !0;
10902
+ let u = s.pos, f = u + o.nodeSize;
10903
+ return r.step(new z(u - (l ? 1 : 0), f + (a ? 1 : 0), u + 1, f - 1, new S((l ? b.empty : b.from(i.copy(b.empty))).append(a ? b.empty : b.from(i.copy(b.empty))), l ? 0 : 1, a ? 0 : 1), l ? 0 : 1)), e(r.scrollIntoView()), !0;
10905
10904
  }
10906
10905
  function Ph(n) {
10907
10906
  return function(e, t) {
@@ -10915,8 +10914,8 @@ function Ph(n) {
10915
10914
  if (a.type != n)
10916
10915
  return !1;
10917
10916
  if (t) {
10918
- let c = a.lastChild && a.lastChild.type == l.type, u = b.from(c ? n.create() : null), d = new S(b.from(n.create(null, b.from(l.type.create(null, u)))), c ? 3 : 1, 0), f = s.start, h = s.end;
10919
- t(e.tr.step(new z(f - (c ? 3 : 1), h, f, h, d, 1, !0)).scrollIntoView());
10917
+ let c = a.lastChild && a.lastChild.type == l.type, d = b.from(c ? n.create() : null), u = new S(b.from(n.create(null, b.from(l.type.create(null, d)))), c ? 3 : 1, 0), f = s.start, h = s.end;
10918
+ t(e.tr.step(new z(f - (c ? 3 : 1), h, f, h, u, 1, !0)).scrollIntoView());
10920
10919
  }
10921
10920
  return !0;
10922
10921
  };
@@ -10959,9 +10958,9 @@ class Sr {
10959
10958
  }
10960
10959
  get commands() {
10961
10960
  const { rawCommands: e, editor: t, state: r } = this, { view: i } = t, { tr: s } = r, o = this.buildProps(s);
10962
- return Object.fromEntries(Object.entries(e).map(([l, a]) => [l, (...u) => {
10963
- const d = a(...u)(o);
10964
- return !s.getMeta("preventDispatch") && !this.hasCustomState && i.dispatch(s), d;
10961
+ return Object.fromEntries(Object.entries(e).map(([l, a]) => [l, (...d) => {
10962
+ const u = a(...d)(o);
10963
+ return !s.getMeta("preventDispatch") && !this.hasCustomState && i.dispatch(s), u;
10965
10964
  }]));
10966
10965
  }
10967
10966
  get chain() {
@@ -10971,19 +10970,19 @@ class Sr {
10971
10970
  return () => this.createCan();
10972
10971
  }
10973
10972
  createChain(e, t = !0) {
10974
- const { rawCommands: r, editor: i, state: s } = this, { view: o } = i, l = [], a = !!e, c = e || s.tr, u = () => (!a && t && !c.getMeta("preventDispatch") && !this.hasCustomState && o.dispatch(c), l.every((f) => f === !0)), d = {
10973
+ const { rawCommands: r, editor: i, state: s } = this, { view: o } = i, l = [], a = !!e, c = e || s.tr, d = () => (!a && t && !c.getMeta("preventDispatch") && !this.hasCustomState && o.dispatch(c), l.every((f) => f === !0)), u = {
10975
10974
  ...Object.fromEntries(Object.entries(r).map(([f, h]) => [f, (...m) => {
10976
10975
  const g = this.buildProps(c, t), y = h(...m)(g);
10977
- return l.push(y), d;
10976
+ return l.push(y), u;
10978
10977
  }])),
10979
- run: u
10978
+ run: d
10980
10979
  };
10981
- return d;
10980
+ return u;
10982
10981
  }
10983
10982
  createCan(e) {
10984
10983
  const { rawCommands: t, state: r } = this, i = !1, s = e || r.tr, o = this.buildProps(s, i);
10985
10984
  return {
10986
- ...Object.fromEntries(Object.entries(t).map(([a, c]) => [a, (...u) => c(...u)({ ...o, dispatch: void 0 })])),
10985
+ ...Object.fromEntries(Object.entries(t).map(([a, c]) => [a, (...d) => c(...d)({ ...o, dispatch: void 0 })])),
10987
10986
  chain: () => this.createChain(s, i)
10988
10987
  };
10989
10988
  }
@@ -11003,7 +11002,7 @@ class Sr {
11003
11002
  chain: () => this.createChain(e),
11004
11003
  can: () => this.createCan(e),
11005
11004
  get commands() {
11006
- return Object.fromEntries(Object.entries(r).map(([a, c]) => [a, (...u) => c(...u)(l)]));
11005
+ return Object.fromEntries(Object.entries(r).map(([a, c]) => [a, (...d) => c(...d)(l)]));
11007
11006
  }
11008
11007
  };
11009
11008
  return l;
@@ -11059,11 +11058,11 @@ function Ma(n) {
11059
11058
  }, a = x(o, "addGlobalAttributes", l);
11060
11059
  if (!a)
11061
11060
  return;
11062
- a().forEach((u) => {
11063
- u.types.forEach((d) => {
11064
- Object.entries(u.attributes).forEach(([f, h]) => {
11061
+ a().forEach((d) => {
11062
+ d.types.forEach((u) => {
11063
+ Object.entries(d.attributes).forEach(([f, h]) => {
11065
11064
  e.push({
11066
- type: d,
11065
+ type: u,
11067
11066
  name: f,
11068
11067
  attribute: {
11069
11068
  ...s,
@@ -11082,14 +11081,14 @@ function Ma(n) {
11082
11081
  if (!a)
11083
11082
  return;
11084
11083
  const c = a();
11085
- Object.entries(c).forEach(([u, d]) => {
11084
+ Object.entries(c).forEach(([d, u]) => {
11086
11085
  const f = {
11087
11086
  ...s,
11088
- ...d
11087
+ ...u
11089
11088
  };
11090
11089
  typeof (f == null ? void 0 : f.default) == "function" && (f.default = f.default()), f != null && f.isRequired && (f == null ? void 0 : f.default) === void 0 && delete f.default, e.push({
11091
11090
  type: o.name,
11092
- name: u,
11091
+ name: d,
11093
11092
  attribute: f
11094
11093
  });
11095
11094
  });
@@ -11159,74 +11158,74 @@ function Io(n) {
11159
11158
  function _h(n, e) {
11160
11159
  var t;
11161
11160
  const r = Ma(n), { nodeExtensions: i, markExtensions: s } = xr(n), o = (t = i.find((c) => x(c, "topNode"))) === null || t === void 0 ? void 0 : t.name, l = Object.fromEntries(i.map((c) => {
11162
- const u = r.filter((y) => y.type === c.name), d = {
11161
+ const d = r.filter((y) => y.type === c.name), u = {
11163
11162
  name: c.name,
11164
11163
  options: c.options,
11165
11164
  storage: c.storage,
11166
11165
  editor: e
11167
11166
  }, f = n.reduce((y, O) => {
11168
- const E = x(O, "extendNodeSchema", d);
11167
+ const E = x(O, "extendNodeSchema", u);
11169
11168
  return {
11170
11169
  ...y,
11171
11170
  ...E ? E(c) : {}
11172
11171
  };
11173
11172
  }, {}), h = Io({
11174
11173
  ...f,
11175
- content: w(x(c, "content", d)),
11176
- marks: w(x(c, "marks", d)),
11177
- group: w(x(c, "group", d)),
11178
- inline: w(x(c, "inline", d)),
11179
- atom: w(x(c, "atom", d)),
11180
- selectable: w(x(c, "selectable", d)),
11181
- draggable: w(x(c, "draggable", d)),
11182
- code: w(x(c, "code", d)),
11183
- defining: w(x(c, "defining", d)),
11184
- isolating: w(x(c, "isolating", d)),
11185
- attrs: Object.fromEntries(u.map((y) => {
11174
+ content: w(x(c, "content", u)),
11175
+ marks: w(x(c, "marks", u)),
11176
+ group: w(x(c, "group", u)),
11177
+ inline: w(x(c, "inline", u)),
11178
+ atom: w(x(c, "atom", u)),
11179
+ selectable: w(x(c, "selectable", u)),
11180
+ draggable: w(x(c, "draggable", u)),
11181
+ code: w(x(c, "code", u)),
11182
+ defining: w(x(c, "defining", u)),
11183
+ isolating: w(x(c, "isolating", u)),
11184
+ attrs: Object.fromEntries(d.map((y) => {
11186
11185
  var O;
11187
11186
  return [y.name, { default: (O = y == null ? void 0 : y.attribute) === null || O === void 0 ? void 0 : O.default }];
11188
11187
  }))
11189
- }), p = w(x(c, "parseHTML", d));
11190
- p && (h.parseDOM = p.map((y) => Do(y, u)));
11191
- const m = x(c, "renderHTML", d);
11188
+ }), p = w(x(c, "parseHTML", u));
11189
+ p && (h.parseDOM = p.map((y) => Do(y, d)));
11190
+ const m = x(c, "renderHTML", u);
11192
11191
  m && (h.toDOM = (y) => m({
11193
11192
  node: y,
11194
- HTMLAttributes: Vi(y, u)
11193
+ HTMLAttributes: Vi(y, d)
11195
11194
  }));
11196
- const g = x(c, "renderText", d);
11195
+ const g = x(c, "renderText", u);
11197
11196
  return g && (h.toText = g), [c.name, h];
11198
11197
  })), a = Object.fromEntries(s.map((c) => {
11199
- const u = r.filter((g) => g.type === c.name), d = {
11198
+ const d = r.filter((g) => g.type === c.name), u = {
11200
11199
  name: c.name,
11201
11200
  options: c.options,
11202
11201
  storage: c.storage,
11203
11202
  editor: e
11204
11203
  }, f = n.reduce((g, y) => {
11205
- const O = x(y, "extendMarkSchema", d);
11204
+ const O = x(y, "extendMarkSchema", u);
11206
11205
  return {
11207
11206
  ...g,
11208
11207
  ...O ? O(c) : {}
11209
11208
  };
11210
11209
  }, {}), h = Io({
11211
11210
  ...f,
11212
- inclusive: w(x(c, "inclusive", d)),
11213
- excludes: w(x(c, "excludes", d)),
11214
- group: w(x(c, "group", d)),
11215
- spanning: w(x(c, "spanning", d)),
11216
- code: w(x(c, "code", d)),
11217
- attrs: Object.fromEntries(u.map((g) => {
11211
+ inclusive: w(x(c, "inclusive", u)),
11212
+ excludes: w(x(c, "excludes", u)),
11213
+ group: w(x(c, "group", u)),
11214
+ spanning: w(x(c, "spanning", u)),
11215
+ code: w(x(c, "code", u)),
11216
+ attrs: Object.fromEntries(d.map((g) => {
11218
11217
  var y;
11219
11218
  return [g.name, { default: (y = g == null ? void 0 : g.attribute) === null || y === void 0 ? void 0 : y.default }];
11220
11219
  }))
11221
- }), p = w(x(c, "parseHTML", d));
11222
- p && (h.parseDOM = p.map((g) => Do(g, u)));
11223
- const m = x(c, "renderHTML", d);
11220
+ }), p = w(x(c, "parseHTML", u));
11221
+ p && (h.parseDOM = p.map((g) => Do(g, d)));
11222
+ const m = x(c, "renderHTML", u);
11224
11223
  return m && (h.toDOM = (g) => m({
11225
11224
  mark: g,
11226
- HTMLAttributes: Vi(g, u)
11225
+ HTMLAttributes: Vi(g, d)
11227
11226
  })), [c.name, h];
11228
11227
  }));
11229
- return new Hu({
11228
+ return new Hd({
11230
11229
  topNode: o,
11231
11230
  nodes: l,
11232
11231
  marks: a
@@ -11243,13 +11242,13 @@ const Lh = (n, e = 500) => {
11243
11242
  const r = n.parentOffset;
11244
11243
  return n.parent.nodesBetween(Math.max(0, r - e), r, (i, s, o, l) => {
11245
11244
  var a, c;
11246
- const u = ((c = (a = i.type.spec).toText) === null || c === void 0 ? void 0 : c.call(a, {
11245
+ const d = ((c = (a = i.type.spec).toText) === null || c === void 0 ? void 0 : c.call(a, {
11247
11246
  node: i,
11248
11247
  pos: s,
11249
11248
  parent: o,
11250
11249
  index: l
11251
11250
  })) || i.textContent || "%leaf%";
11252
- t += u.slice(0, Math.max(0, r - s));
11251
+ t += d.slice(0, Math.max(0, r - s));
11253
11252
  }), t;
11254
11253
  };
11255
11254
  function gs(n) {
@@ -11280,12 +11279,12 @@ function yi(n) {
11280
11279
  c.parent.type.spec.code || !((e = c.nodeBefore || c.nodeAfter) === null || e === void 0) && e.marks.find((f) => f.type.spec.code)
11281
11280
  )
11282
11281
  return !1;
11283
- let u = !1;
11284
- const d = Lh(c) + s;
11282
+ let d = !1;
11283
+ const u = Lh(c) + s;
11285
11284
  return o.forEach((f) => {
11286
- if (u)
11285
+ if (d)
11287
11286
  return;
11288
- const h = Bh(d, f.find);
11287
+ const h = Bh(u, f.find);
11289
11288
  if (!h)
11290
11289
  return;
11291
11290
  const p = a.state.tr, m = kr({
@@ -11310,8 +11309,8 @@ function yi(n) {
11310
11309
  from: r,
11311
11310
  to: i,
11312
11311
  text: s
11313
- }), a.dispatch(p), u = !0);
11314
- }), u;
11312
+ }), a.dispatch(p), d = !0);
11313
+ }), d;
11315
11314
  }
11316
11315
  function $h(n) {
11317
11316
  const { editor: e, rules: t } = n, r = new te({
@@ -11392,10 +11391,10 @@ function Hh(n) {
11392
11391
  editor: e,
11393
11392
  state: t
11394
11393
  }), c = [];
11395
- return t.doc.nodesBetween(r, i, (d, f) => {
11396
- if (!d.isTextblock || d.type.spec.code)
11394
+ return t.doc.nodesBetween(r, i, (u, f) => {
11395
+ if (!u.isTextblock || u.type.spec.code)
11397
11396
  return;
11398
- const h = Math.max(r, f), p = Math.min(i, f + d.content.size), m = d.textBetween(h - f, p - f, void 0, "");
11397
+ const h = Math.max(r, f), p = Math.min(i, f + u.content.size), m = u.textBetween(h - f, p - f, void 0, "");
11399
11398
  zh(m, s.find).forEach((y) => {
11400
11399
  if (y.index === void 0)
11401
11400
  return;
@@ -11412,7 +11411,7 @@ function Hh(n) {
11412
11411
  });
11413
11412
  c.push(D);
11414
11413
  });
11415
- }), c.every((d) => d !== null);
11414
+ }), c.every((u) => u !== null);
11416
11415
  }
11417
11416
  function jh(n) {
11418
11417
  const { editor: e, rules: t } = n;
@@ -11420,9 +11419,9 @@ function jh(n) {
11420
11419
  return t.map((l) => new te({
11421
11420
  // we register a global drag handler to track the current drag source element
11422
11421
  view(a) {
11423
- const c = (u) => {
11424
- var d;
11425
- r = !((d = a.dom.parentElement) === null || d === void 0) && d.contains(u.target) ? a.dom.parentElement : null;
11422
+ const c = (d) => {
11423
+ var u;
11424
+ r = !((u = a.dom.parentElement) === null || u === void 0) && u.contains(d.target) ? a.dom.parentElement : null;
11426
11425
  };
11427
11426
  return window.addEventListener("dragstart", c), {
11428
11427
  destroy() {
@@ -11434,21 +11433,21 @@ function jh(n) {
11434
11433
  handleDOMEvents: {
11435
11434
  drop: (a) => (s = r === a.dom.parentElement, !1),
11436
11435
  paste: (a, c) => {
11437
- var u;
11438
- const d = (u = c.clipboardData) === null || u === void 0 ? void 0 : u.getData("text/html");
11439
- return i = !!(d != null && d.includes("data-pm-slice")), !1;
11436
+ var d;
11437
+ const u = (d = c.clipboardData) === null || d === void 0 ? void 0 : d.getData("text/html");
11438
+ return i = !!(u != null && u.includes("data-pm-slice")), !1;
11440
11439
  }
11441
11440
  }
11442
11441
  },
11443
- appendTransaction: (a, c, u) => {
11444
- const d = a[0], f = d.getMeta("uiEvent") === "paste" && !i, h = d.getMeta("uiEvent") === "drop" && !s;
11442
+ appendTransaction: (a, c, d) => {
11443
+ const u = a[0], f = u.getMeta("uiEvent") === "paste" && !i, h = u.getMeta("uiEvent") === "drop" && !s;
11445
11444
  if (!f && !h)
11446
11445
  return;
11447
- const p = c.doc.content.findDiffStart(u.doc.content), m = c.doc.content.findDiffEnd(u.doc.content);
11446
+ const p = c.doc.content.findDiffStart(d.doc.content), m = c.doc.content.findDiffEnd(d.doc.content);
11448
11447
  if (!Fh(p) || !m || p === m.b)
11449
11448
  return;
11450
- const g = u.tr, y = kr({
11451
- state: u,
11449
+ const g = d.tr, y = kr({
11450
+ state: d,
11452
11451
  transaction: g
11453
11452
  });
11454
11453
  if (!(!Hh({
@@ -11487,10 +11486,10 @@ class Ot {
11487
11486
  a && this.editor.on("update", a);
11488
11487
  const c = x(r, "onSelectionUpdate", s);
11489
11488
  c && this.editor.on("selectionUpdate", c);
11490
- const u = x(r, "onTransaction", s);
11491
- u && this.editor.on("transaction", u);
11492
- const d = x(r, "onFocus", s);
11493
- d && this.editor.on("focus", d);
11489
+ const d = x(r, "onTransaction", s);
11490
+ d && this.editor.on("transaction", d);
11491
+ const u = x(r, "onFocus", s);
11492
+ u && this.editor.on("focus", u);
11494
11493
  const f = x(r, "onBlur", s);
11495
11494
  f && this.editor.on("blur", f);
11496
11495
  const h = x(r, "onDestroy", s);
@@ -11541,13 +11540,13 @@ class Ot {
11541
11540
  editor: e,
11542
11541
  type: gi(o.name, this.schema)
11543
11542
  }, a = [], c = x(o, "addKeyboardShortcuts", l);
11544
- let u = {};
11545
- if (o.type === "mark" && o.config.exitable && (u.ArrowRight = () => he.handleExit({ editor: e, mark: o })), c) {
11543
+ let d = {};
11544
+ if (o.type === "mark" && o.config.exitable && (d.ArrowRight = () => he.handleExit({ editor: e, mark: o })), c) {
11546
11545
  const m = Object.fromEntries(Object.entries(c()).map(([g, y]) => [g, () => y({ editor: e })]));
11547
- u = { ...u, ...m };
11546
+ d = { ...d, ...m };
11548
11547
  }
11549
- const d = sh(u);
11550
- a.push(d);
11548
+ const u = sh(d);
11549
+ a.push(u);
11551
11550
  const f = x(o, "addInputRules", l);
11552
11551
  Ro(o, e.options.enableInputRules) && f && r.push(...f());
11553
11552
  const h = x(o, "addPasteRules", l);
@@ -11586,13 +11585,13 @@ class Ot {
11586
11585
  }, o = x(r, "addNodeView", s);
11587
11586
  if (!o)
11588
11587
  return [];
11589
- const l = (a, c, u, d) => {
11588
+ const l = (a, c, d, u) => {
11590
11589
  const f = Vi(a, i);
11591
11590
  return o()({
11592
11591
  editor: e,
11593
11592
  node: a,
11594
- getPos: u,
11595
- decorations: d,
11593
+ getPos: d,
11594
+ decorations: u,
11596
11595
  HTMLAttributes: f,
11597
11596
  extension: r
11598
11597
  });
@@ -11653,16 +11652,16 @@ function Na(n, e, t) {
11653
11652
 
11654
11653
  `, textSerializers: o = {} } = t || {};
11655
11654
  let l = "", a = !0;
11656
- return n.nodesBetween(r, i, (c, u, d, f) => {
11655
+ return n.nodesBetween(r, i, (c, d, u, f) => {
11657
11656
  var h;
11658
11657
  const p = o == null ? void 0 : o[c.type.name];
11659
- p ? (c.isBlock && !a && (l += s, a = !0), d && (l += p({
11658
+ p ? (c.isBlock && !a && (l += s, a = !0), u && (l += p({
11660
11659
  node: c,
11661
- pos: u,
11662
- parent: d,
11660
+ pos: d,
11661
+ parent: u,
11663
11662
  index: f,
11664
11663
  range: e
11665
- }))) : c.isText ? (l += (h = c == null ? void 0 : c.text) === null || h === void 0 ? void 0 : h.slice(Math.max(r, u) - u, i - u), a = !1) : c.isBlock && !a && (l += s, a = !0);
11664
+ }))) : c.isText ? (l += (h = c == null ? void 0 : c.text) === null || h === void 0 ? void 0 : h.slice(Math.max(r, d) - d, i - d), a = !1) : c.isBlock && !a && (l += s, a = !0);
11666
11665
  }), l;
11667
11666
  }
11668
11667
  function Pa(n) {
@@ -11676,7 +11675,7 @@ const Wh = be.create({
11676
11675
  key: new se("clipboardTextSerializer"),
11677
11676
  props: {
11678
11677
  clipboardTextSerializer: () => {
11679
- const { editor: n } = this, { state: e, schema: t } = n, { doc: r, selection: i } = e, { ranges: s } = i, o = Math.min(...s.map((u) => u.$from.pos)), l = Math.max(...s.map((u) => u.$to.pos)), a = Pa(t);
11678
+ const { editor: n } = this, { state: e, schema: t } = n, { doc: r, selection: i } = e, { ranges: s } = i, o = Math.min(...s.map((d) => d.$from.pos)), l = Math.max(...s.map((d) => d.$to.pos)), a = Pa(t);
11680
11679
  return Na(r, { from: o, to: l }, {
11681
11680
  textSerializers: a
11682
11681
  });
@@ -11694,12 +11693,12 @@ const Wh = be.create({
11694
11693
  n.doc.nodesBetween(s.pos, o.pos, (l, a) => {
11695
11694
  if (l.type.isText)
11696
11695
  return;
11697
- const { doc: c, mapping: u } = e, d = c.resolve(u.map(a)), f = c.resolve(u.map(a + l.nodeSize)), h = d.blockRange(f);
11696
+ const { doc: c, mapping: d } = e, u = c.resolve(d.map(a)), f = c.resolve(d.map(a + l.nodeSize)), h = u.blockRange(f);
11698
11697
  if (!h)
11699
11698
  return;
11700
11699
  const p = Dt(h);
11701
11700
  if (l.type.isTextblock) {
11702
- const { defaultType: m } = d.parent.contentMatchAt(d.index());
11701
+ const { defaultType: m } = u.parent.contentMatchAt(u.index());
11703
11702
  e.setNodeMarkup(h.start, m);
11704
11703
  }
11705
11704
  (p || p === 0) && e.lift(h, p);
@@ -11772,11 +11771,11 @@ function Qe(n, e) {
11772
11771
  return n;
11773
11772
  }
11774
11773
  const ip = (n, e = {}) => ({ tr: t, state: r, dispatch: i }) => {
11775
- const s = Qe(n, r.schema), { doc: o, selection: l } = t, { $from: a, from: c, to: u } = l;
11774
+ const s = Qe(n, r.schema), { doc: o, selection: l } = t, { $from: a, from: c, to: d } = l;
11776
11775
  if (i) {
11777
- const d = ys(a, s, e);
11778
- if (d && d.from <= c && d.to >= u) {
11779
- const f = N.create(o, d.from, d.to);
11776
+ const u = ys(a, s, e);
11777
+ if (u && u.from <= c && u.to >= d) {
11778
+ const f = N.create(o, u.from, u.to);
11780
11779
  t.setSelection(f);
11781
11780
  }
11782
11781
  }
@@ -11862,11 +11861,11 @@ function cp(n, e, t) {
11862
11861
  return;
11863
11862
  const s = n.mapping.maps[r];
11864
11863
  let o = 0;
11865
- s.forEach((l, a, c, u) => {
11866
- o === 0 && (o = u);
11864
+ s.forEach((l, a, c, d) => {
11865
+ o === 0 && (o = d);
11867
11866
  }), n.setSelection(A.near(n.doc.resolve(o), t));
11868
11867
  }
11869
- const up = (n) => n.toString().startsWith("<"), dp = (n, e, t) => ({ tr: r, dispatch: i, editor: s }) => {
11868
+ const dp = (n) => n.toString().startsWith("<"), up = (n, e, t) => ({ tr: r, dispatch: i, editor: s }) => {
11870
11869
  if (i) {
11871
11870
  t = {
11872
11871
  parseOptions: {},
@@ -11881,10 +11880,10 @@ const up = (n) => n.toString().startsWith("<"), dp = (n, e, t) => ({ tr: r, disp
11881
11880
  });
11882
11881
  if (o.toString() === "<>")
11883
11882
  return !0;
11884
- let { from: l, to: a } = typeof n == "number" ? { from: n, to: n } : n, c = !0, u = !0;
11885
- if ((up(o) ? o : [o]).forEach((f) => {
11886
- f.check(), c = c ? f.isText && f.marks.length === 0 : !1, u = u ? f.isBlock : !1;
11887
- }), l === a && u) {
11883
+ let { from: l, to: a } = typeof n == "number" ? { from: n, to: n } : n, c = !0, d = !0;
11884
+ if ((dp(o) ? o : [o]).forEach((f) => {
11885
+ f.check(), c = c ? f.isText && f.marks.length === 0 : !1, d = d ? f.isBlock : !1;
11886
+ }), l === a && d) {
11888
11887
  const { parent: f } = r.doc.resolve(l);
11889
11888
  f.isTextblock && !f.type.spec.code && !f.childCount && (l -= 1, a += 1);
11890
11889
  }
@@ -11930,24 +11929,24 @@ const yp = (n) => ({ editor: e, view: t, tr: r, dispatch: i }) => {
11930
11929
  t.someProp("handleKeyDown", (c) => c(t, l));
11931
11930
  });
11932
11931
  return a == null || a.steps.forEach((c) => {
11933
- const u = c.map(r.mapping);
11934
- u && i && r.maybeStep(u);
11932
+ const d = c.map(r.mapping);
11933
+ d && i && r.maybeStep(d);
11935
11934
  }), !0;
11936
11935
  };
11937
11936
  function tn(n, e, t = {}) {
11938
11937
  const { from: r, to: i, empty: s } = n.selection, o = e ? H(e, n.schema) : null, l = [];
11939
- n.doc.nodesBetween(r, i, (d, f) => {
11940
- if (d.isText)
11938
+ n.doc.nodesBetween(r, i, (u, f) => {
11939
+ if (u.isText)
11941
11940
  return;
11942
- const h = Math.max(r, f), p = Math.min(i, f + d.nodeSize);
11941
+ const h = Math.max(r, f), p = Math.min(i, f + u.nodeSize);
11943
11942
  l.push({
11944
- node: d,
11943
+ node: u,
11945
11944
  from: h,
11946
11945
  to: p
11947
11946
  });
11948
11947
  });
11949
- const a = i - r, c = l.filter((d) => o ? o.name === d.node.type.name : !0).filter((d) => Ln(d.node.attrs, t, { strict: !1 }));
11950
- return s ? !!c.length : c.reduce((d, f) => d + f.to - f.from, 0) >= a;
11948
+ const a = i - r, c = l.filter((u) => o ? o.name === u.node.type.name : !0).filter((u) => Ln(u.node.attrs, t, { strict: !1 }));
11949
+ return s ? !!c.length : c.reduce((u, f) => u + f.to - f.from, 0) >= a;
11951
11950
  }
11952
11951
  const bp = (n, e = {}) => ({ state: t, dispatch: r }) => {
11953
11952
  const i = H(n, t.schema);
@@ -11967,16 +11966,16 @@ const Op = (n, e) => ({ tr: t, state: r, dispatch: i }) => {
11967
11966
  let s = null, o = null;
11968
11967
  const l = Er(typeof n == "string" ? n : n.name, r.schema);
11969
11968
  return l ? (l === "node" && (s = H(n, r.schema)), l === "mark" && (o = Qe(n, r.schema)), i && t.selection.ranges.forEach((a) => {
11970
- r.doc.nodesBetween(a.$from.pos, a.$to.pos, (c, u) => {
11971
- s && s === c.type && t.setNodeMarkup(u, void 0, Lo(c.attrs, e)), o && c.marks.length && c.marks.forEach((d) => {
11972
- o === d.type && t.addMark(u, u + c.nodeSize, o.create(Lo(d.attrs, e)));
11969
+ r.doc.nodesBetween(a.$from.pos, a.$to.pos, (c, d) => {
11970
+ s && s === c.type && t.setNodeMarkup(d, void 0, Lo(c.attrs, e)), o && c.marks.length && c.marks.forEach((u) => {
11971
+ o === u.type && t.addMark(d, d + c.nodeSize, o.create(Lo(u.attrs, e)));
11973
11972
  });
11974
11973
  });
11975
11974
  }), !0) : !1;
11976
11975
  }, vp = () => ({ tr: n, dispatch: e }) => (e && n.scrollIntoView(), !0), Cp = () => ({ tr: n, commands: e }) => e.setTextSelection({
11977
11976
  from: 0,
11978
11977
  to: n.doc.content.size
11979
- }), Ep = () => ({ state: n, dispatch: e }) => uh(n, e), Tp = () => ({ state: n, dispatch: e }) => hh(n, e), Mp = () => ({ state: n, dispatch: e }) => xh(n, e), wp = () => ({ state: n, dispatch: e }) => Ch(n, e), Ap = () => ({ state: n, dispatch: e }) => vh(n, e);
11978
+ }), Ep = () => ({ state: n, dispatch: e }) => dh(n, e), Tp = () => ({ state: n, dispatch: e }) => hh(n, e), Mp = () => ({ state: n, dispatch: e }) => xh(n, e), wp = () => ({ state: n, dispatch: e }) => Ch(n, e), Ap = () => ({ state: n, dispatch: e }) => vh(n, e);
11980
11979
  function Ra(n, e, t = {}) {
11981
11980
  return Bn(n, e, { slice: !1, parseOptions: t });
11982
11981
  }
@@ -12081,15 +12080,15 @@ function $a(n) {
12081
12080
  o.push({ from: l, to: a });
12082
12081
  }
12083
12082
  o.forEach(({ from: l, to: a }) => {
12084
- const c = e.slice(s).map(l, -1), u = e.slice(s).map(a), d = e.invert().map(c, -1), f = e.invert().map(u);
12083
+ const c = e.slice(s).map(l, -1), d = e.slice(s).map(a), u = e.invert().map(c, -1), f = e.invert().map(d);
12085
12084
  r.push({
12086
12085
  oldRange: {
12087
- from: d,
12086
+ from: u,
12088
12087
  to: f
12089
12088
  },
12090
12089
  newRange: {
12091
12090
  from: c,
12092
- to: u
12091
+ to: d
12093
12092
  }
12094
12093
  });
12095
12094
  });
@@ -12120,11 +12119,11 @@ function xn(n, e, t) {
12120
12119
  function Wi(n, e, t = {}) {
12121
12120
  const { empty: r, ranges: i } = n.selection, s = e ? Qe(e, n.schema) : null;
12122
12121
  if (r)
12123
- return !!(n.storedMarks || n.selection.$from.marks()).filter((d) => s ? s.name === d.type.name : !0).find((d) => Ln(d.attrs, t, { strict: !1 }));
12122
+ return !!(n.storedMarks || n.selection.$from.marks()).filter((u) => s ? s.name === u.type.name : !0).find((u) => Ln(u.attrs, t, { strict: !1 }));
12124
12123
  let o = 0;
12125
12124
  const l = [];
12126
- if (i.forEach(({ $from: d, $to: f }) => {
12127
- const h = d.pos, p = f.pos;
12125
+ if (i.forEach(({ $from: u, $to: f }) => {
12126
+ const h = u.pos, p = f.pos;
12128
12127
  n.doc.nodesBetween(h, p, (m, g) => {
12129
12128
  if (!m.isText && !m.marks.length)
12130
12129
  return;
@@ -12137,7 +12136,7 @@ function Wi(n, e, t = {}) {
12137
12136
  });
12138
12137
  }), o === 0)
12139
12138
  return !1;
12140
- const a = l.filter((d) => s ? s.name === d.mark.type.name : !0).filter((d) => Ln(d.mark.attrs, t, { strict: !1 })).reduce((d, f) => d + f.to - f.from, 0), c = l.filter((d) => s ? d.mark.type !== s && d.mark.type.excludes(s) : !0).reduce((d, f) => d + f.to - f.from, 0);
12139
+ const a = l.filter((u) => s ? s.name === u.mark.type.name : !0).filter((u) => Ln(u.mark.attrs, t, { strict: !1 })).reduce((u, f) => u + f.to - f.from, 0), c = l.filter((u) => s ? u.mark.type !== s && u.mark.type.excludes(s) : !0).reduce((u, f) => u + f.to - f.from, 0);
12141
12140
  return (a > 0 ? a + c : a) >= o;
12142
12141
  }
12143
12142
  function $p(n, e, t = {}) {
@@ -12173,11 +12172,11 @@ function zp(n, e, t) {
12173
12172
  const { ranges: o } = i;
12174
12173
  return o.some(({ $from: l, $to: a }) => {
12175
12174
  let c = l.depth === 0 ? n.doc.inlineContent && n.doc.type.allowsMarkType(t) : !1;
12176
- return n.doc.nodesBetween(l.pos, a.pos, (u, d, f) => {
12175
+ return n.doc.nodesBetween(l.pos, a.pos, (d, u, f) => {
12177
12176
  if (c)
12178
12177
  return !1;
12179
- if (u.isInline) {
12180
- const h = !f || f.type.allowsMarkType(t), p = !!t.isInSet(u.marks) || !u.marks.some((m) => m.type.excludes(t));
12178
+ if (d.isInline) {
12179
+ const h = !f || f.type.allowsMarkType(t), p = !!t.isInSet(d.marks) || !d.marks.some((m) => m.type.excludes(t));
12181
12180
  c = h && p;
12182
12181
  }
12183
12182
  return !c;
@@ -12195,9 +12194,9 @@ const Hp = (n, e = {}) => ({ tr: t, state: r, dispatch: i }) => {
12195
12194
  }));
12196
12195
  } else
12197
12196
  l.forEach((c) => {
12198
- const u = c.$from.pos, d = c.$to.pos;
12199
- r.doc.nodesBetween(u, d, (f, h) => {
12200
- const p = Math.max(h, u), m = Math.min(h + f.nodeSize, d);
12197
+ const d = c.$from.pos, u = c.$to.pos;
12198
+ r.doc.nodesBetween(d, u, (f, h) => {
12199
+ const p = Math.max(h, d), m = Math.min(h + f.nodeSize, u);
12201
12200
  f.marks.find((y) => y.type === a) ? f.marks.forEach((y) => {
12202
12201
  a === y.type && t.addMark(p, m, a.create({
12203
12202
  ...y.attrs,
@@ -12218,8 +12217,8 @@ const Hp = (n, e = {}) => ({ tr: t, state: r, dispatch: i }) => {
12218
12217
  return !0;
12219
12218
  }, Wp = (n) => ({ tr: e, dispatch: t }) => {
12220
12219
  if (t) {
12221
- const { doc: r } = e, { from: i, to: s } = typeof n == "number" ? { from: n, to: n } : n, o = N.atStart(r).from, l = N.atEnd(r).to, a = rt(i, o, l), c = rt(s, o, l), u = N.create(r, a, c);
12222
- e.setSelection(u);
12220
+ const { doc: r } = e, { from: i, to: s } = typeof n == "number" ? { from: n, to: n } : n, o = N.atStart(r).from, l = N.atEnd(r).to, a = rt(i, o, l), c = rt(s, o, l), d = N.create(r, a, c);
12221
+ e.setSelection(d);
12223
12222
  }
12224
12223
  return !0;
12225
12224
  }, Kp = (n) => ({ state: e, dispatch: t }) => {
@@ -12234,27 +12233,27 @@ function $o(n, e) {
12234
12233
  }
12235
12234
  }
12236
12235
  const Up = ({ keepMarks: n = !0 } = {}) => ({ tr: e, state: t, dispatch: r, editor: i }) => {
12237
- const { selection: s, doc: o } = e, { $from: l, $to: a } = s, c = i.extensionManager.attributes, u = xn(c, l.node().type.name, l.node().attrs);
12236
+ const { selection: s, doc: o } = e, { $from: l, $to: a } = s, c = i.extensionManager.attributes, d = xn(c, l.node().type.name, l.node().attrs);
12238
12237
  if (s instanceof C && s.node.isBlock)
12239
12238
  return !l.parentOffset || !vt(o, l.pos) ? !1 : (r && (n && $o(t, i.extensionManager.splittableMarks), e.split(l.pos).scrollIntoView()), !0);
12240
12239
  if (!l.parent.isBlock)
12241
12240
  return !1;
12242
12241
  if (r) {
12243
- const d = a.parentOffset === a.parent.content.size;
12242
+ const u = a.parentOffset === a.parent.content.size;
12244
12243
  s instanceof N && e.deleteSelection();
12245
12244
  const f = l.depth === 0 ? void 0 : Pp(l.node(-1).contentMatchAt(l.indexAfter(-1)));
12246
- let h = d && f ? [
12245
+ let h = u && f ? [
12247
12246
  {
12248
12247
  type: f,
12249
- attrs: u
12248
+ attrs: d
12250
12249
  }
12251
12250
  ] : void 0, p = vt(e.doc, e.mapping.map(l.pos), 1, h);
12252
12251
  if (!h && !p && vt(e.doc, e.mapping.map(l.pos), 1, f ? [{ type: f }] : void 0) && (p = !0, h = f ? [
12253
12252
  {
12254
12253
  type: f,
12255
- attrs: u
12254
+ attrs: d
12256
12255
  }
12257
- ] : void 0), p && (e.split(e.mapping.map(l.pos), 1, h), f && !d && !l.parentOffset && l.parent.type !== f)) {
12256
+ ] : void 0), p && (e.split(e.mapping.map(l.pos), 1, h), f && !u && !l.parentOffset && l.parent.type !== f)) {
12258
12257
  const m = e.mapping.map(l.before()), g = e.doc.resolve(m);
12259
12258
  l.node(-1).canReplaceWith(g.index(), g.index() + 1, f) && e.setNodeMarkup(e.mapping.map(l.before()), f);
12260
12259
  }
@@ -12266,10 +12265,10 @@ const Up = ({ keepMarks: n = !0 } = {}) => ({ tr: e, state: t, dispatch: r, edit
12266
12265
  const o = H(n, t.schema), { $from: l, $to: a } = t.selection, c = t.selection.node;
12267
12266
  if (c && c.isBlock || l.depth < 2 || !l.sameParent(a))
12268
12267
  return !1;
12269
- const u = l.node(-1);
12270
- if (u.type !== o)
12268
+ const d = l.node(-1);
12269
+ if (d.type !== o)
12271
12270
  return !1;
12272
- const d = i.extensionManager.attributes;
12271
+ const u = i.extensionManager.attributes;
12273
12272
  if (l.parent.content.size === 0 && l.node(-1).childCount === l.indexAfter(-1)) {
12274
12273
  if (l.depth === 2 || l.node(-3).type !== o || l.index(-2) !== l.node(-2).childCount - 1)
12275
12274
  return !1;
@@ -12278,7 +12277,7 @@ const Up = ({ keepMarks: n = !0 } = {}) => ({ tr: e, state: t, dispatch: r, edit
12278
12277
  const y = l.index(-1) ? 1 : l.index(-2) ? 2 : 3;
12279
12278
  for (let _ = l.depth - y; _ >= l.depth - 3; _ -= 1)
12280
12279
  g = b.from(l.node(_).copy(g));
12281
- const O = l.indexAfter(-1) < l.node(-2).childCount ? 1 : l.indexAfter(-2) < l.node(-3).childCount ? 2 : 3, E = xn(d, l.node().type.name, l.node().attrs), I = ((s = o.contentMatch.defaultType) === null || s === void 0 ? void 0 : s.createAndFill(E)) || void 0;
12280
+ const O = l.indexAfter(-1) < l.node(-2).childCount ? 1 : l.indexAfter(-2) < l.node(-3).childCount ? 2 : 3, E = xn(u, l.node().type.name, l.node().attrs), I = ((s = o.contentMatch.defaultType) === null || s === void 0 ? void 0 : s.createAndFill(E)) || void 0;
12282
12281
  g = g.append(b.from(o.createAndFill(null, I) || void 0));
12283
12282
  const D = l.before(l.depth - (y - 1));
12284
12283
  e.replace(D, l.after(-O), new S(g, 4 - y, 0));
@@ -12291,7 +12290,7 @@ const Up = ({ keepMarks: n = !0 } = {}) => ({ tr: e, state: t, dispatch: r, edit
12291
12290
  }
12292
12291
  return !0;
12293
12292
  }
12294
- const f = a.pos === l.end() ? u.contentMatchAt(0).defaultType : null, h = xn(d, u.type.name, u.attrs), p = xn(d, l.node().type.name, l.node().attrs);
12293
+ const f = a.pos === l.end() ? d.contentMatchAt(0).defaultType : null, h = xn(u, d.type.name, d.attrs), p = xn(u, l.node().type.name, l.node().attrs);
12295
12294
  e.delete(l.pos, a.pos);
12296
12295
  const m = f ? [
12297
12296
  { type: o, attrs: h },
@@ -12325,19 +12324,19 @@ const Up = ({ keepMarks: n = !0 } = {}) => ({ tr: e, state: t, dispatch: r, edit
12325
12324
  return !0;
12326
12325
  const i = n.doc.nodeAt(r);
12327
12326
  return t.node.type === (i == null ? void 0 : i.type) && Ye(n.doc, r) && n.join(r), !0;
12328
- }, Gp = (n, e, t, r = {}) => ({ editor: i, tr: s, state: o, dispatch: l, chain: a, commands: c, can: u }) => {
12329
- const { extensions: d, splittableMarks: f } = i.extensionManager, h = H(n, o.schema), p = H(e, o.schema), { selection: m, storedMarks: g } = o, { $from: y, $to: O } = m, E = y.blockRange(O), I = g || m.$to.parentOffset && m.$from.marks();
12327
+ }, Gp = (n, e, t, r = {}) => ({ editor: i, tr: s, state: o, dispatch: l, chain: a, commands: c, can: d }) => {
12328
+ const { extensions: u, splittableMarks: f } = i.extensionManager, h = H(n, o.schema), p = H(e, o.schema), { selection: m, storedMarks: g } = o, { $from: y, $to: O } = m, E = y.blockRange(O), I = g || m.$to.parentOffset && m.$from.marks();
12330
12329
  if (!E)
12331
12330
  return !1;
12332
- const D = ks((T) => Bo(T.type.name, d))(m);
12331
+ const D = ks((T) => Bo(T.type.name, u))(m);
12333
12332
  if (E.depth >= 1 && D && E.depth - D.depth <= 1) {
12334
12333
  if (D.node.type === h)
12335
12334
  return c.liftListItem(p);
12336
- if (Bo(D.node.type.name, d) && h.validContent(D.node.content) && l)
12335
+ if (Bo(D.node.type.name, u) && h.validContent(D.node.content) && l)
12337
12336
  return a().command(() => (s.setNodeMarkup(D.pos, h), !0)).command(() => ki(s, h)).command(() => Si(s, h)).run();
12338
12337
  }
12339
- return !t || !I || !l ? a().command(() => u().wrapInList(h, r) ? !0 : c.clearNodes()).wrapInList(h, r).command(() => ki(s, h)).command(() => Si(s, h)).run() : a().command(() => {
12340
- const T = u().wrapInList(h, r), _ = I.filter((P) => f.includes(P.type.name));
12338
+ return !t || !I || !l ? a().command(() => d().wrapInList(h, r) ? !0 : c.clearNodes()).wrapInList(h, r).command(() => ki(s, h)).command(() => Si(s, h)).run() : a().command(() => {
12339
+ const T = d().wrapInList(h, r), _ = I.filter((P) => f.includes(P.type.name));
12341
12340
  return s.ensureMarks(_), T ? !0 : c.clearNodes();
12342
12341
  }).wrapInList(h, r).command(() => ki(s, h)).command(() => Si(s, h)).run();
12343
12342
  }, Yp = (n, e = {}, t = {}) => ({ state: r, commands: i }) => {
@@ -12376,15 +12375,15 @@ const Up = ({ keepMarks: n = !0 } = {}) => ({ tr: e, state: t, dispatch: r, edit
12376
12375
  }), !0;
12377
12376
  }, tm = (n, e = {}) => ({ tr: t, state: r, dispatch: i }) => {
12378
12377
  var s;
12379
- const { extendEmptyMarkRange: o = !1 } = e, { selection: l } = t, a = Qe(n, r.schema), { $from: c, empty: u, ranges: d } = l;
12378
+ const { extendEmptyMarkRange: o = !1 } = e, { selection: l } = t, a = Qe(n, r.schema), { $from: c, empty: d, ranges: u } = l;
12380
12379
  if (!i)
12381
12380
  return !0;
12382
- if (u && o) {
12381
+ if (d && o) {
12383
12382
  let { from: f, to: h } = l;
12384
12383
  const p = (s = c.marks().find((g) => g.type === a)) === null || s === void 0 ? void 0 : s.attrs, m = ys(c, a, p);
12385
12384
  m && (f = m.from, h = m.to), t.removeMark(f, h, a);
12386
12385
  } else
12387
- d.forEach((f) => {
12386
+ u.forEach((f) => {
12388
12387
  t.removeMark(f.$from.pos, f.$to.pos, a);
12389
12388
  });
12390
12389
  return t.removeStoredMark(a), !0;
@@ -12392,14 +12391,14 @@ const Up = ({ keepMarks: n = !0 } = {}) => ({ tr: e, state: t, dispatch: r, edit
12392
12391
  let s = null, o = null;
12393
12392
  const l = Er(typeof n == "string" ? n : n.name, r.schema);
12394
12393
  return l ? (l === "node" && (s = H(n, r.schema)), l === "mark" && (o = Qe(n, r.schema)), i && t.selection.ranges.forEach((a) => {
12395
- const c = a.$from.pos, u = a.$to.pos;
12396
- r.doc.nodesBetween(c, u, (d, f) => {
12397
- s && s === d.type && t.setNodeMarkup(f, void 0, {
12398
- ...d.attrs,
12394
+ const c = a.$from.pos, d = a.$to.pos;
12395
+ r.doc.nodesBetween(c, d, (u, f) => {
12396
+ s && s === u.type && t.setNodeMarkup(f, void 0, {
12397
+ ...u.attrs,
12399
12398
  ...e
12400
- }), o && d.marks.length && d.marks.forEach((h) => {
12399
+ }), o && u.marks.length && u.marks.forEach((h) => {
12401
12400
  if (o === h.type) {
12402
- const p = Math.max(f, c), m = Math.min(f + d.nodeSize, u);
12401
+ const p = Math.max(f, c), m = Math.min(f + u.nodeSize, d);
12403
12402
  t.addMark(p, m, o.create({
12404
12403
  ...h.attrs,
12405
12404
  ...e
@@ -12433,7 +12432,7 @@ var sm = /* @__PURE__ */ Object.freeze({
12433
12432
  focus: op,
12434
12433
  forEach: lp,
12435
12434
  insertContent: ap,
12436
- insertContentAt: dp,
12435
+ insertContentAt: up,
12437
12436
  joinUp: fp,
12438
12437
  joinDown: hp,
12439
12438
  joinBackward: pp,
@@ -12521,8 +12520,8 @@ const om = be.create({
12521
12520
  () => o.undoInputRule(),
12522
12521
  // maybe convert first text block node to default node
12523
12522
  () => o.command(({ tr: l }) => {
12524
- const { selection: a, doc: c } = l, { empty: u, $anchor: d } = a, { pos: f, parent: h } = d, p = A.atStart(c).from === f;
12525
- return !u || !p || !h.type.isTextblock || h.textContent.length ? !1 : o.clearNodes();
12523
+ const { selection: a, doc: c } = l, { empty: d, $anchor: u } = a, { pos: f, parent: h } = u, p = A.atStart(c).from === f;
12524
+ return !d || !p || !h.type.isTextblock || h.textContent.length ? !1 : o.clearNodes();
12526
12525
  }),
12527
12526
  () => o.deleteSelection(),
12528
12527
  () => o.joinBackward(),
@@ -12576,20 +12575,20 @@ const om = be.create({
12576
12575
  const { empty: i, from: s, to: o } = e.selection, l = A.atStart(e.doc).from, a = A.atEnd(e.doc).to;
12577
12576
  if (i || !(s === l && o === a) || !(t.doc.textBetween(0, t.doc.content.size, " ", " ").length === 0))
12578
12577
  return;
12579
- const d = t.tr, f = kr({
12578
+ const u = t.tr, f = kr({
12580
12579
  state: t,
12581
- transaction: d
12580
+ transaction: u
12582
12581
  }), { commands: h } = new Sr({
12583
12582
  editor: this.editor,
12584
12583
  state: f
12585
12584
  });
12586
- if (h.clearNodes(), !!d.steps.length)
12587
- return d;
12585
+ if (h.clearNodes(), !!u.steps.length)
12586
+ return u;
12588
12587
  }
12589
12588
  })
12590
12589
  ];
12591
12590
  }
12592
- }), um = be.create({
12591
+ }), dm = be.create({
12593
12592
  name: "tabindex",
12594
12593
  addProseMirrorPlugins() {
12595
12594
  return [
@@ -12602,14 +12601,14 @@ const om = be.create({
12602
12601
  ];
12603
12602
  }
12604
12603
  });
12605
- var dm = /* @__PURE__ */ Object.freeze({
12604
+ var um = /* @__PURE__ */ Object.freeze({
12606
12605
  __proto__: null,
12607
12606
  ClipboardTextSerializer: Wh,
12608
12607
  Commands: om,
12609
12608
  Editable: lm,
12610
12609
  FocusEvents: am,
12611
12610
  Keymap: cm,
12612
- Tabindex: um
12611
+ Tabindex: dm
12613
12612
  });
12614
12613
  const fm = `.ProseMirror {
12615
12614
  position: relative;
@@ -12807,7 +12806,7 @@ let pm = class extends Dh {
12807
12806
  * Creates an extension manager.
12808
12807
  */
12809
12808
  createExtensionManager() {
12810
- const t = [...this.options.enableCoreExtensions ? Object.values(dm) : [], ...this.options.extensions].filter((r) => ["extension", "node", "mark"].includes(r == null ? void 0 : r.type));
12809
+ const t = [...this.options.enableCoreExtensions ? Object.values(um) : [], ...this.options.extensions].filter((r) => ["extension", "node", "mark"].includes(r == null ? void 0 : r.type));
12811
12810
  this.extensionManager = new Ot(t, this);
12812
12811
  }
12813
12812
  /**
@@ -12973,10 +12972,10 @@ function nn(n) {
12973
12972
  const { tr: s } = e, o = r[r.length - 1], l = r[0];
12974
12973
  let a = t.to;
12975
12974
  if (o) {
12976
- const c = l.search(/\S/), u = t.from + l.indexOf(o), d = u + o.length;
12977
- if (Mr(t.from, t.to, e.doc).filter((h) => h.mark.type.excluded.find((m) => m === n.type && m !== h.mark.type)).filter((h) => h.to > u).length)
12975
+ const c = l.search(/\S/), d = t.from + l.indexOf(o), u = d + o.length;
12976
+ if (Mr(t.from, t.to, e.doc).filter((h) => h.mark.type.excluded.find((m) => m === n.type && m !== h.mark.type)).filter((h) => h.to > d).length)
12978
12977
  return null;
12979
- d < t.to && s.delete(d, t.to), u > t.from && s.delete(t.from + c, u), a = t.from + c + o.length, s.addMark(t.from + c, a, n.type.create(i || {})), s.removeStoredMark(n.type);
12978
+ u < t.to && s.delete(u, t.to), d > t.from && s.delete(t.from + c, d), a = t.from + c + o.length, s.addMark(t.from + c, a, n.type.create(i || {})), s.removeStoredMark(n.type);
12980
12979
  }
12981
12980
  }
12982
12981
  });
@@ -12991,8 +12990,8 @@ function Fo(n) {
12991
12990
  const a = r[0].lastIndexOf(r[1]);
12992
12991
  let c = o + a;
12993
12992
  c > l ? c = l : l = c + r[1].length;
12994
- const u = r[0][r[0].length - 1];
12995
- s.insertText(u, o + r[0].length - 1), s.replaceWith(c, l, n.type.create(i));
12993
+ const d = r[0][r[0].length - 1];
12994
+ s.insertText(d, o + r[0].length - 1), s.replaceWith(c, l, n.type.create(i));
12996
12995
  } else
12997
12996
  r[0] && s.replaceWith(o, l, n.type.create(i));
12998
12997
  }
@@ -13017,18 +13016,18 @@ function rn(n) {
13017
13016
  if (!c)
13018
13017
  return null;
13019
13018
  if (o.wrap(a, c), n.keepMarks && n.editor) {
13020
- const { selection: d, storedMarks: f } = e, { splittableMarks: h } = n.editor.extensionManager, p = f || d.$to.parentOffset && d.$from.marks();
13019
+ const { selection: u, storedMarks: f } = e, { splittableMarks: h } = n.editor.extensionManager, p = f || u.$to.parentOffset && u.$from.marks();
13021
13020
  if (p) {
13022
13021
  const m = p.filter((g) => h.includes(g.type.name));
13023
13022
  o.ensureMarks(m);
13024
13023
  }
13025
13024
  }
13026
13025
  if (n.keepAttributes) {
13027
- const d = n.type.name === "bulletList" || n.type.name === "orderedList" ? "listItem" : "taskList";
13028
- i().updateAttributes(d, s).run();
13026
+ const u = n.type.name === "bulletList" || n.type.name === "orderedList" ? "listItem" : "taskList";
13027
+ i().updateAttributes(u, s).run();
13029
13028
  }
13030
- const u = o.doc.resolve(t.from - 1).nodeBefore;
13031
- u && u.type === n.type && Ye(o.doc, t.from - 1) && (!n.joinPredicate || n.joinPredicate(r, u)) && o.join(t.from - 1);
13029
+ const d = o.doc.resolve(t.from - 1).nodeBefore;
13030
+ d && d.type === n.type && Ye(o.doc, t.from - 1) && (!n.joinPredicate || n.joinPredicate(r, d)) && o.join(t.from - 1);
13032
13031
  }
13033
13032
  });
13034
13033
  }
@@ -13131,12 +13130,12 @@ class mm {
13131
13130
  }
13132
13131
  onDragStart(e) {
13133
13132
  var t, r, i, s, o, l, a;
13134
- const { view: c } = this.editor, u = e.target, d = u.nodeType === 3 ? (t = u.parentElement) === null || t === void 0 ? void 0 : t.closest("[data-drag-handle]") : u.closest("[data-drag-handle]");
13135
- if (!this.dom || !((r = this.contentDOM) === null || r === void 0) && r.contains(u) || !d)
13133
+ const { view: c } = this.editor, d = e.target, u = d.nodeType === 3 ? (t = d.parentElement) === null || t === void 0 ? void 0 : t.closest("[data-drag-handle]") : d.closest("[data-drag-handle]");
13134
+ if (!this.dom || !((r = this.contentDOM) === null || r === void 0) && r.contains(d) || !u)
13136
13135
  return;
13137
13136
  let f = 0, h = 0;
13138
- if (this.dom !== d) {
13139
- const g = this.dom.getBoundingClientRect(), y = d.getBoundingClientRect(), O = (i = e.offsetX) !== null && i !== void 0 ? i : (s = e.nativeEvent) === null || s === void 0 ? void 0 : s.offsetX, E = (o = e.offsetY) !== null && o !== void 0 ? o : (l = e.nativeEvent) === null || l === void 0 ? void 0 : l.offsetY;
13137
+ if (this.dom !== u) {
13138
+ const g = this.dom.getBoundingClientRect(), y = u.getBoundingClientRect(), O = (i = e.offsetX) !== null && i !== void 0 ? i : (s = e.nativeEvent) === null || s === void 0 ? void 0 : s.offsetX, E = (o = e.offsetY) !== null && o !== void 0 ? o : (l = e.nativeEvent) === null || l === void 0 ? void 0 : l.offsetY;
13140
13139
  f = y.x - g.x + O, h = y.y - g.y + E;
13141
13140
  }
13142
13141
  (a = e.dataTransfer) === null || a === void 0 || a.setDragImage(this.dom, f, h);
@@ -13155,10 +13154,10 @@ class mm {
13155
13154
  const s = e.type.startsWith("drag"), o = e.type === "drop";
13156
13155
  if ((["INPUT", "BUTTON", "SELECT", "TEXTAREA"].includes(r.tagName) || r.isContentEditable) && !o && !s)
13157
13156
  return !0;
13158
- const { isEditable: a } = this.editor, { isDragging: c } = this, u = !!this.node.type.spec.draggable, d = C.isSelectable(this.node), f = e.type === "copy", h = e.type === "paste", p = e.type === "cut", m = e.type === "mousedown";
13159
- if (!u && d && s && e.preventDefault(), u && s && !c)
13157
+ const { isEditable: a } = this.editor, { isDragging: c } = this, d = !!this.node.type.spec.draggable, u = C.isSelectable(this.node), f = e.type === "copy", h = e.type === "paste", p = e.type === "cut", m = e.type === "mousedown";
13158
+ if (!d && u && s && e.preventDefault(), d && s && !c)
13160
13159
  return e.preventDefault(), !1;
13161
- if (u && a && !c && m) {
13160
+ if (d && a && !c && m) {
13162
13161
  const g = r.closest("[data-drag-handle]");
13163
13162
  g && (this.dom === g || this.dom.contains(g)) && (this.isDragging = !0, document.addEventListener("dragend", () => {
13164
13163
  this.isDragging = !1;
@@ -13168,7 +13167,7 @@ class mm {
13168
13167
  this.isDragging = !1;
13169
13168
  }, { once: !0 }));
13170
13169
  }
13171
- return !(c || o || f || h || p || m && d);
13170
+ return !(c || o || f || h || p || m && u);
13172
13171
  }
13173
13172
  ignoreMutation(e) {
13174
13173
  return !this.dom || !this.contentDOM ? !0 : typeof this.options.ignoreMutation == "function" ? this.options.ignoreMutation({ mutation: e }) : this.node.isLeaf || this.node.isAtom ? !0 : e.type === "selection" || this.dom.contains(e.target) && e.type === "childList" && Cr() && this.editor.isFocused && [
@@ -13200,10 +13199,10 @@ function Nt(n) {
13200
13199
  const { tr: s } = e, o = r[r.length - 1], l = r[0];
13201
13200
  let a = t.to;
13202
13201
  if (o) {
13203
- const c = l.search(/\S/), u = t.from + l.indexOf(o), d = u + o.length;
13204
- if (Mr(t.from, t.to, e.doc).filter((h) => h.mark.type.excluded.find((m) => m === n.type && m !== h.mark.type)).filter((h) => h.to > u).length)
13202
+ const c = l.search(/\S/), d = t.from + l.indexOf(o), u = d + o.length;
13203
+ if (Mr(t.from, t.to, e.doc).filter((h) => h.mark.type.excluded.find((m) => m === n.type && m !== h.mark.type)).filter((h) => h.to > d).length)
13205
13204
  return null;
13206
- d < t.to && s.delete(d, t.to), u > t.from && s.delete(t.from + c, u), a = t.from + c + o.length, s.addMark(t.from + c, a, n.type.create(i || {})), s.removeStoredMark(n.type);
13205
+ u < t.to && s.delete(u, t.to), d > t.from && s.delete(t.from + c, d), a = t.from + c + o.length, s.addMark(t.from + c, a, n.type.create(i || {})), s.removeStoredMark(n.type);
13207
13206
  }
13208
13207
  }
13209
13208
  });
@@ -13264,13 +13263,13 @@ Dr.isSymbol = Sm;
13264
13263
  Object.defineProperty(n, "__esModule", { value: !0 }), n.isSymbol = n.isOneOf = n.isInteger = n.isInstanceOf = n.vuePropValidator = void 0;
13265
13264
  const t = e(De);
13266
13265
  function r(a, ...c) {
13267
- const u = a ? [...c, a] : c;
13268
- if (u.length !== 0)
13269
- return (d) => {
13270
- for (const f of u) {
13271
- const h = f(d);
13266
+ const d = a ? [...c, a] : c;
13267
+ if (d.length !== 0)
13268
+ return (u) => {
13269
+ for (const f of d) {
13270
+ const h = f(u);
13272
13271
  if (h)
13273
- return typeof t.default == "object" && "util" in t.default ? t.default.util.warn(`${h} (received: '${String(d)}')`) : console.warn(`${h} (received: '${String(d)}')`), !1;
13272
+ return typeof t.default == "object" && "util" in t.default ? t.default.util.warn(`${h} (received: '${String(u)}')`) : console.warn(`${h} (received: '${String(u)}')`), !1;
13274
13273
  }
13275
13274
  return !0;
13276
13275
  };
@@ -13490,13 +13489,13 @@ Jr.isNonPositive = rg;
13490
13489
  Object.defineProperty(n, "objectProp", { enumerable: !0, get: function() {
13491
13490
  return c.objectProp;
13492
13491
  } });
13493
- var u = Hr;
13492
+ var d = Hr;
13494
13493
  Object.defineProperty(n, "functionProp", { enumerable: !0, get: function() {
13495
- return u.functionProp;
13494
+ return d.functionProp;
13496
13495
  } });
13497
- var d = cn;
13496
+ var u = cn;
13498
13497
  Object.defineProperty(n, "oneOfProp", { enumerable: !0, get: function() {
13499
- return d.oneOfProp;
13498
+ return u.oneOfProp;
13500
13499
  } });
13501
13500
  var f = jr;
13502
13501
  Object.defineProperty(n, "oneOfObjectKeysProp", { enumerable: !0, get: function() {
@@ -13731,7 +13730,7 @@ const lg = /^\s*>\s$/, ag = J.create({
13731
13730
  })
13732
13731
  ];
13733
13732
  }
13734
- }), cg = /^```([a-z]+)?[\s\n]$/, ug = /^~~~([a-z]+)?[\s\n]$/, dg = J.create({
13733
+ }), cg = /^```([a-z]+)?[\s\n]$/, dg = /^~~~([a-z]+)?[\s\n]$/, ug = J.create({
13735
13734
  name: "codeBlock",
13736
13735
  addOptions() {
13737
13736
  return {
@@ -13828,7 +13827,7 @@ const lg = /^\s*>\s$/, ag = J.create({
13828
13827
  })
13829
13828
  }),
13830
13829
  zo({
13831
- find: ug,
13830
+ find: dg,
13832
13831
  type: this.type,
13833
13832
  getAttributes: (n) => ({
13834
13833
  language: n[1]
@@ -13893,10 +13892,10 @@ const lg = /^\s*>\s$/, ag = J.create({
13893
13892
  if (i.$from.parent.type.spec.isolating)
13894
13893
  return !1;
13895
13894
  const { keepMarks: o } = this.options, { splittableMarks: l } = r.extensionManager, a = s || i.$to.parentOffset && i.$from.marks();
13896
- return e().insertContent({ type: this.name }).command(({ tr: c, dispatch: u }) => {
13897
- if (u && a && o) {
13898
- const d = a.filter((f) => l.includes(f.type.name));
13899
- c.ensureMarks(d);
13895
+ return e().insertContent({ type: this.name }).command(({ tr: c, dispatch: d }) => {
13896
+ if (d && a && o) {
13897
+ const u = a.filter((f) => l.includes(f.type.name));
13898
+ c.ensureMarks(u);
13900
13899
  }
13901
13900
  return !0;
13902
13901
  }).run();
@@ -13961,12 +13960,12 @@ const lg = /^\s*>\s$/, ag = J.create({
13961
13960
  return null;
13962
13961
  const s = n.type.createAndFill(), o = (s == null ? void 0 : s.sameMarkup(n)) && s.content.findDiffStart(n.content) === null;
13963
13962
  return n.descendants((l, a) => {
13964
- const c = r >= a && r <= a + l.nodeSize, u = !l.isLeaf && !l.childCount;
13965
- if ((c || !this.options.showOnlyCurrent) && u) {
13966
- const d = [this.options.emptyNodeClass];
13967
- o && d.push(this.options.emptyEditorClass);
13963
+ const c = r >= a && r <= a + l.nodeSize, d = !l.isLeaf && !l.childCount;
13964
+ if ((c || !this.options.showOnlyCurrent) && d) {
13965
+ const u = [this.options.emptyNodeClass];
13966
+ o && u.push(this.options.emptyEditorClass);
13968
13967
  const f = ae.node(a, a + l.nodeSize, {
13969
- class: d.join(" "),
13968
+ class: u.join(" "),
13970
13969
  "data-placeholder": typeof this.options.placeholder == "function" ? this.options.placeholder({
13971
13970
  editor: this.editor,
13972
13971
  node: l,
@@ -14354,7 +14353,7 @@ re.prototype = {
14354
14353
  return i.j[n] = o, o;
14355
14354
  }
14356
14355
  };
14357
- const M = (n, e, t, r, i) => n.ta(e, t, r, i), ce = (n, e, t, r, i) => n.tr(e, t, r, i), Ko = (n, e, t, r, i) => n.ts(e, t, r, i), k = (n, e, t, r, i) => n.tt(e, t, r, i), Ae = "WORD", Yi = "UWORD", sn = "LOCALHOST", Xi = "TLD", Qi = "UTLD", vn = "SCHEME", St = "SLASH_SCHEME", xs = "NUM", Va = "WS", Os = "NL", Wt = "OPENBRACE", Kt = "CLOSEBRACE", $n = "OPENBRACKET", Fn = "CLOSEBRACKET", zn = "OPENPAREN", Hn = "CLOSEPAREN", jn = "OPENANGLEBRACKET", Vn = "CLOSEANGLEBRACKET", qn = "FULLWIDTHLEFTPAREN", Wn = "FULLWIDTHRIGHTPAREN", Kn = "LEFTCORNERBRACKET", Un = "RIGHTCORNERBRACKET", Jn = "LEFTWHITECORNERBRACKET", Gn = "RIGHTWHITECORNERBRACKET", Yn = "FULLWIDTHLESSTHAN", Xn = "FULLWIDTHGREATERTHAN", Qn = "AMPERSAND", Zn = "APOSTROPHE", er = "ASTERISK", ze = "AT", tr = "BACKSLASH", nr = "BACKTICK", rr = "CARET", je = "COLON", vs = "COMMA", ir = "DOLLAR", ke = "DOT", sr = "EQUALS", Cs = "EXCLAMATION", Se = "HYPHEN", or = "PERCENT", lr = "PIPE", ar = "PLUS", cr = "POUND", ur = "QUERY", Es = "QUOTE", Ts = "SEMI", xe = "SLASH", Ut = "TILDE", dr = "UNDERSCORE", qa = "EMOJI", fr = "SYM";
14356
+ const M = (n, e, t, r, i) => n.ta(e, t, r, i), ce = (n, e, t, r, i) => n.tr(e, t, r, i), Ko = (n, e, t, r, i) => n.ts(e, t, r, i), k = (n, e, t, r, i) => n.tt(e, t, r, i), Ae = "WORD", Yi = "UWORD", sn = "LOCALHOST", Xi = "TLD", Qi = "UTLD", vn = "SCHEME", St = "SLASH_SCHEME", xs = "NUM", Va = "WS", Os = "NL", Wt = "OPENBRACE", Kt = "CLOSEBRACE", $n = "OPENBRACKET", Fn = "CLOSEBRACKET", zn = "OPENPAREN", Hn = "CLOSEPAREN", jn = "OPENANGLEBRACKET", Vn = "CLOSEANGLEBRACKET", qn = "FULLWIDTHLEFTPAREN", Wn = "FULLWIDTHRIGHTPAREN", Kn = "LEFTCORNERBRACKET", Un = "RIGHTCORNERBRACKET", Jn = "LEFTWHITECORNERBRACKET", Gn = "RIGHTWHITECORNERBRACKET", Yn = "FULLWIDTHLESSTHAN", Xn = "FULLWIDTHGREATERTHAN", Qn = "AMPERSAND", Zn = "APOSTROPHE", er = "ASTERISK", ze = "AT", tr = "BACKSLASH", nr = "BACKTICK", rr = "CARET", je = "COLON", vs = "COMMA", ir = "DOLLAR", ke = "DOT", sr = "EQUALS", Cs = "EXCLAMATION", Se = "HYPHEN", or = "PERCENT", lr = "PIPE", ar = "PLUS", cr = "POUND", dr = "QUERY", Es = "QUOTE", Ts = "SEMI", xe = "SLASH", Ut = "TILDE", ur = "UNDERSCORE", qa = "EMOJI", fr = "SYM";
14358
14357
  var Wa = /* @__PURE__ */ Object.freeze({
14359
14358
  __proto__: null,
14360
14359
  WORD: Ae,
@@ -14401,12 +14400,12 @@ var Wa = /* @__PURE__ */ Object.freeze({
14401
14400
  PIPE: lr,
14402
14401
  PLUS: ar,
14403
14402
  POUND: cr,
14404
- QUERY: ur,
14403
+ QUERY: dr,
14405
14404
  QUOTE: Es,
14406
14405
  SEMI: Ts,
14407
14406
  SLASH: xe,
14408
14407
  TILDE: Ut,
14409
- UNDERSCORE: dr,
14408
+ UNDERSCORE: ur,
14410
14409
  EMOJI: qa,
14411
14410
  SYM: fr
14412
14411
  });
@@ -14418,7 +14417,7 @@ function Lg(n) {
14418
14417
  const e = {};
14419
14418
  re.groups = e;
14420
14419
  const t = new re();
14421
- gn == null && (gn = Go(wg)), yn == null && (yn = Go(Ag)), k(t, "'", Zn), k(t, "{", Wt), k(t, "}", Kt), k(t, "[", $n), k(t, "]", Fn), k(t, "(", zn), k(t, ")", Hn), k(t, "<", jn), k(t, ">", Vn), k(t, "(", qn), k(t, ")", Wn), k(t, "「", Kn), k(t, "」", Un), k(t, "『", Jn), k(t, "』", Gn), k(t, "<", Yn), k(t, ">", Xn), k(t, "&", Qn), k(t, "*", er), k(t, "@", ze), k(t, "`", nr), k(t, "^", rr), k(t, ":", je), k(t, ",", vs), k(t, "$", ir), k(t, ".", ke), k(t, "=", sr), k(t, "!", Cs), k(t, "-", Se), k(t, "%", or), k(t, "|", lr), k(t, "+", ar), k(t, "#", cr), k(t, "?", ur), k(t, '"', Es), k(t, "/", xe), k(t, ";", Ts), k(t, "~", Ut), k(t, "_", dr), k(t, "\\", tr);
14420
+ gn == null && (gn = Go(wg)), yn == null && (yn = Go(Ag)), k(t, "'", Zn), k(t, "{", Wt), k(t, "}", Kt), k(t, "[", $n), k(t, "]", Fn), k(t, "(", zn), k(t, ")", Hn), k(t, "<", jn), k(t, ">", Vn), k(t, "(", qn), k(t, ")", Wn), k(t, "「", Kn), k(t, "」", Un), k(t, "『", Jn), k(t, "』", Gn), k(t, "<", Yn), k(t, ">", Xn), k(t, "&", Qn), k(t, "*", er), k(t, "@", ze), k(t, "`", nr), k(t, "^", rr), k(t, ":", je), k(t, ",", vs), k(t, "$", ir), k(t, ".", ke), k(t, "=", sr), k(t, "!", Cs), k(t, "-", Se), k(t, "%", or), k(t, "|", lr), k(t, "+", ar), k(t, "#", cr), k(t, "?", dr), k(t, '"', Es), k(t, "/", xe), k(t, ";", Ts), k(t, "~", Ut), k(t, "_", ur), k(t, "\\", tr);
14422
14421
  const r = ce(t, Ci, xs, {
14423
14422
  [Ki]: !0
14424
14423
  });
@@ -14443,11 +14442,11 @@ function Lg(n) {
14443
14442
  ce(l, vi, l), k(l, Rg, l);
14444
14443
  const a = k(l, _g);
14445
14444
  ce(a, vi, l);
14446
- const c = [[yt, i]], u = [[yt, null], [Oi, s]];
14447
- for (let d = 0; d < gn.length; d++)
14448
- Be(t, gn[d], Xi, Ae, c);
14449
- for (let d = 0; d < yn.length; d++)
14450
- Be(t, yn[d], Qi, Yi, u);
14445
+ const c = [[yt, i]], d = [[yt, null], [Oi, s]];
14446
+ for (let u = 0; u < gn.length; u++)
14447
+ Be(t, gn[u], Xi, Ae, c);
14448
+ for (let u = 0; u < yn.length; u++)
14449
+ Be(t, yn[u], Qi, Yi, d);
14451
14450
  it(Xi, {
14452
14451
  tld: !0,
14453
14452
  ascii: !0
@@ -14460,9 +14459,9 @@ function Lg(n) {
14460
14459
  }, e), it(St, {
14461
14460
  slashscheme: !0,
14462
14461
  ascii: !0
14463
- }, e), n = n.sort((d, f) => d[0] > f[0] ? 1 : -1);
14464
- for (let d = 0; d < n.length; d++) {
14465
- const f = n[d][0], p = n[d][1] ? {
14462
+ }, e), n = n.sort((u, f) => u[0] > f[0] ? 1 : -1);
14463
+ for (let u = 0; u < n.length; u++) {
14464
+ const f = n[u][0], p = n[u][1] ? {
14466
14465
  [Ng]: !0
14467
14466
  } : {
14468
14467
  [Pg]: !0
@@ -14482,11 +14481,11 @@ function Bg(n, e) {
14482
14481
  const t = $g(e.replace(/[A-Z]/g, (l) => l.toLowerCase())), r = t.length, i = [];
14483
14482
  let s = 0, o = 0;
14484
14483
  for (; o < r; ) {
14485
- let l = n, a = null, c = 0, u = null, d = -1, f = -1;
14484
+ let l = n, a = null, c = 0, d = null, u = -1, f = -1;
14486
14485
  for (; o < r && (a = l.go(t[o])); )
14487
- l = a, l.accepts() ? (d = 0, f = 0, u = l) : d >= 0 && (d += t[o].length, f++), c += t[o].length, s += t[o].length, o++;
14488
- s -= d, o -= f, c -= d, i.push({
14489
- t: u.t,
14486
+ l = a, l.accepts() ? (u = 0, f = 0, d = l) : u >= 0 && (u += t[o].length, f++), c += t[o].length, s += t[o].length, o++;
14487
+ s -= u, o -= f, c -= u, i.push({
14488
+ t: d.t,
14490
14489
  // token type/name
14491
14490
  v: e.slice(s - c, s),
14492
14491
  // string value
@@ -14721,12 +14720,12 @@ Ka.prototype = {
14721
14720
  * @param {Options} options Formattinng options
14722
14721
  */
14723
14722
  render(n) {
14724
- const e = this, t = this.toHref(n.get("defaultProtocol")), r = n.get("formatHref", t, this), i = n.get("tagName", t, e), s = this.toFormattedString(n), o = {}, l = n.get("className", t, e), a = n.get("target", t, e), c = n.get("rel", t, e), u = n.getObj("attributes", t, e), d = n.getObj("events", t, e);
14725
- return o.href = r, l && (o.class = l), a && (o.target = a), c && (o.rel = c), u && Pt(o, u), {
14723
+ const e = this, t = this.toHref(n.get("defaultProtocol")), r = n.get("formatHref", t, this), i = n.get("tagName", t, e), s = this.toFormattedString(n), o = {}, l = n.get("className", t, e), a = n.get("target", t, e), c = n.get("rel", t, e), d = n.getObj("attributes", t, e), u = n.getObj("events", t, e);
14724
+ return o.href = r, l && (o.class = l), a && (o.target = a), c && (o.rel = c), d && Pt(o, d), {
14726
14725
  tagName: i,
14727
14726
  attributes: o,
14728
14727
  content: s,
14729
- eventListeners: d
14728
+ eventListeners: u
14730
14729
  };
14731
14730
  }
14732
14731
  };
@@ -14765,36 +14764,36 @@ const Xo = Gr("email", {
14765
14764
  const n = this.tk;
14766
14765
  return n.length >= 2 && n[0].t !== sn && n[1].t === je;
14767
14766
  }
14768
- }), ue = (n) => new re(n);
14767
+ }), de = (n) => new re(n);
14769
14768
  function zg(n) {
14770
14769
  let {
14771
14770
  groups: e
14772
14771
  } = n;
14773
- const t = e.domain.concat([Qn, er, ze, tr, nr, rr, ir, sr, Se, xs, or, lr, ar, cr, xe, fr, Ut, dr]), r = [Zn, je, vs, ke, Cs, ur, Es, Ts, jn, Vn, Wt, Kt, Fn, $n, zn, Hn, qn, Wn, Kn, Un, Jn, Gn, Yn, Xn], i = [Qn, Zn, er, tr, nr, rr, ir, sr, Se, Wt, Kt, or, lr, ar, cr, ur, xe, fr, Ut, dr], s = ue(), o = k(s, Ut);
14772
+ const t = e.domain.concat([Qn, er, ze, tr, nr, rr, ir, sr, Se, xs, or, lr, ar, cr, xe, fr, Ut, ur]), r = [Zn, je, vs, ke, Cs, dr, Es, Ts, jn, Vn, Wt, Kt, Fn, $n, zn, Hn, qn, Wn, Kn, Un, Jn, Gn, Yn, Xn], i = [Qn, Zn, er, tr, nr, rr, ir, sr, Se, Wt, Kt, or, lr, ar, cr, dr, xe, fr, Ut, ur], s = de(), o = k(s, Ut);
14774
14773
  M(o, i, o), M(o, e.domain, o);
14775
- const l = ue(), a = ue(), c = ue();
14774
+ const l = de(), a = de(), c = de();
14776
14775
  M(s, e.domain, l), M(s, e.scheme, a), M(s, e.slashscheme, c), M(l, i, o), M(l, e.domain, l);
14777
- const u = k(l, ze);
14778
- k(o, ze, u), k(a, ze, u), k(c, ze, u);
14779
- const d = k(o, ke);
14780
- M(d, i, o), M(d, e.domain, o);
14781
- const f = ue();
14782
- M(u, e.domain, f), M(f, e.domain, f);
14776
+ const d = k(l, ze);
14777
+ k(o, ze, d), k(a, ze, d), k(c, ze, d);
14778
+ const u = k(o, ke);
14779
+ M(u, i, o), M(u, e.domain, o);
14780
+ const f = de();
14781
+ M(d, e.domain, f), M(f, e.domain, f);
14783
14782
  const h = k(f, ke);
14784
14783
  M(h, e.domain, f);
14785
- const p = ue(Xo);
14786
- M(h, e.tld, p), M(h, e.utld, p), k(u, sn, p);
14784
+ const p = de(Xo);
14785
+ M(h, e.tld, p), M(h, e.utld, p), k(d, sn, p);
14787
14786
  const m = k(f, Se);
14788
14787
  M(m, e.domain, f), M(p, e.domain, f), k(p, ke, h), k(p, Se, m);
14789
14788
  const g = k(p, je);
14790
14789
  M(g, e.numeric, Xo);
14791
14790
  const y = k(l, Se), O = k(l, ke);
14792
14791
  M(y, e.domain, l), M(O, i, o), M(O, e.domain, l);
14793
- const E = ue(bn);
14794
- M(O, e.tld, E), M(O, e.utld, E), M(E, e.domain, l), M(E, i, o), k(E, ke, O), k(E, Se, y), k(E, ze, u);
14795
- const I = k(E, je), D = ue(bn);
14792
+ const E = de(bn);
14793
+ M(O, e.tld, E), M(O, e.utld, E), M(E, e.domain, l), M(E, i, o), k(E, ke, O), k(E, Se, y), k(E, ze, d);
14794
+ const I = k(E, je), D = de(bn);
14796
14795
  M(I, e.numeric, D);
14797
- const T = ue(bn), _ = ue();
14796
+ const T = de(bn), _ = de();
14798
14797
  M(T, t, T), M(T, r, _), M(_, t, T), M(_, r, _), k(E, xe, T), k(D, xe, T);
14799
14798
  const P = k(a, je), v = k(c, je), W = k(v, xe), pe = k(W, xe);
14800
14799
  M(a, e.domain, l), k(a, ke, O), k(a, Se, y), M(c, e.domain, l), k(c, ke, O), k(c, Se, y), M(P, e.domain, T), k(P, xe, T), M(pe, e.domain, T), M(pe, t, T), k(pe, xe, T);
@@ -14819,9 +14818,9 @@ function zg(n) {
14819
14818
  for (let It = 0; It < Ze.length; It++) {
14820
14819
  const [Ie, Re] = Ze[It], _e = k(T, Ie);
14821
14820
  k(_, Ie, _e), k(_e, Re, T);
14822
- const oe = ue(bn);
14821
+ const oe = de(bn);
14823
14822
  M(_e, t, oe);
14824
- const Le = ue();
14823
+ const Le = de();
14825
14824
  M(_e, r), M(oe, t, oe), M(oe, r, Le), M(Le, t, oe), M(Le, r, Le), k(oe, Re, T), k(Le, Re, T);
14826
14825
  }
14827
14826
  return k(s, sn, E), k(s, Os, Fg), {
@@ -14832,16 +14831,16 @@ function zg(n) {
14832
14831
  function Hg(n, e, t) {
14833
14832
  let r = t.length, i = 0, s = [], o = [];
14834
14833
  for (; i < r; ) {
14835
- let l = n, a = null, c = null, u = 0, d = null, f = -1;
14834
+ let l = n, a = null, c = null, d = 0, u = null, f = -1;
14836
14835
  for (; i < r && !(a = l.go(t[i].t)); )
14837
14836
  o.push(t[i++]);
14838
14837
  for (; i < r && (c = a || l.go(t[i].t)); )
14839
- a = null, l = c, l.accepts() ? (f = 0, d = l) : f >= 0 && f++, i++, u++;
14838
+ a = null, l = c, l.accepts() ? (f = 0, u = l) : f >= 0 && f++, i++, d++;
14840
14839
  if (f < 0)
14841
- i -= u, i < r && (o.push(t[i]), i++);
14840
+ i -= d, i < r && (o.push(t[i]), i++);
14842
14841
  else {
14843
- o.length > 0 && (s.push(Ei(Qo, e, o)), o = []), i -= f, u -= f;
14844
- const h = d.t, p = t.slice(i - u, i);
14842
+ o.length > 0 && (s.push(Ei(Qo, e, o)), o = []), i -= f, d -= f;
14843
+ const h = u.t, p = t.slice(i - d, i);
14845
14844
  s.push(Ei(h, e, p));
14846
14845
  }
14847
14846
  }
@@ -14910,13 +14909,13 @@ function Ug(n) {
14910
14909
  return;
14911
14910
  const { tr: o } = r, l = _a(t.doc, [...e]);
14912
14911
  if ($a(l).forEach(({ newRange: c }) => {
14913
- const u = La(r.doc, c, (h) => h.isTextblock);
14914
- let d, f;
14915
- if (u.length > 1 ? (d = u[0], f = r.doc.textBetween(d.pos, d.pos + d.node.nodeSize, void 0, " ")) : u.length && r.doc.textBetween(c.from, c.to, " ", " ").endsWith(" ") && (d = u[0], f = r.doc.textBetween(d.pos, c.to, void 0, " ")), d && f) {
14912
+ const d = La(r.doc, c, (h) => h.isTextblock);
14913
+ let u, f;
14914
+ if (d.length > 1 ? (u = d[0], f = r.doc.textBetween(u.pos, u.pos + u.node.nodeSize, void 0, " ")) : d.length && r.doc.textBetween(c.from, c.to, " ", " ").endsWith(" ") && (u = d[0], f = r.doc.textBetween(u.pos, c.to, void 0, " ")), u && f) {
14916
14915
  const h = f.split(" ").filter((g) => g !== "");
14917
14916
  if (h.length <= 0)
14918
14917
  return !1;
14919
- const p = h[h.length - 1], m = d.pos + f.lastIndexOf(p);
14918
+ const p = h[h.length - 1], m = u.pos + f.lastIndexOf(p);
14920
14919
  if (!p)
14921
14920
  return !1;
14922
14921
  ws(p).filter((g) => g.isLink).map((g) => ({
@@ -14942,8 +14941,8 @@ function Jg(n) {
14942
14941
  var i, s;
14943
14942
  if (r.button !== 0 || r.target.nodeName !== "A")
14944
14943
  return !1;
14945
- const l = Ba(e.state, n.type.name), a = r.target, c = (i = a == null ? void 0 : a.href) !== null && i !== void 0 ? i : l.href, u = (s = a == null ? void 0 : a.target) !== null && s !== void 0 ? s : l.target;
14946
- return a && c ? (e.editable && window.open(c, u), !0) : !1;
14944
+ const l = Ba(e.state, n.type.name), a = r.target, c = (i = a == null ? void 0 : a.href) !== null && i !== void 0 ? i : l.href, d = (s = a == null ? void 0 : a.target) !== null && s !== void 0 ? s : l.target;
14945
+ return a && c ? (e.editable && window.open(c, d), !0) : !1;
14947
14946
  }
14948
14947
  }
14949
14948
  });
@@ -15378,13 +15377,13 @@ var ly = function() {
15378
15377
  null,
15379
15378
  null
15380
15379
  );
15381
- const uy = cy.exports;
15382
- function dy(n) {
15380
+ const dy = cy.exports;
15381
+ function uy(n) {
15383
15382
  var e;
15384
- const { char: t, allowSpaces: r, allowedPrefixes: i, startOfLine: s, $position: o } = n, l = gm(t), a = new RegExp(`\\s${l}$`), c = s ? "^" : "", u = r ? new RegExp(`${c}${l}.*?(?=\\s${l}|$)`, "gm") : new RegExp(`${c}(?:^)?${l}[^\\s${l}]*`, "gm"), d = ((e = o.nodeBefore) === null || e === void 0 ? void 0 : e.isText) && o.nodeBefore.text;
15385
- if (!d)
15383
+ const { char: t, allowSpaces: r, allowedPrefixes: i, startOfLine: s, $position: o } = n, l = gm(t), a = new RegExp(`\\s${l}$`), c = s ? "^" : "", d = r ? new RegExp(`${c}${l}.*?(?=\\s${l}|$)`, "gm") : new RegExp(`${c}(?:^)?${l}[^\\s${l}]*`, "gm"), u = ((e = o.nodeBefore) === null || e === void 0 ? void 0 : e.isText) && o.nodeBefore.text;
15384
+ if (!u)
15386
15385
  return null;
15387
- const f = o.pos - d.length, h = Array.from(d.matchAll(u)).pop();
15386
+ const f = o.pos - u.length, h = Array.from(u.matchAll(d)).pop();
15388
15387
  if (!h || h.input === void 0 || h.index === void 0)
15389
15388
  return null;
15390
15389
  const p = h.input.slice(Math.max(0, h.index - 1), h.index), m = new RegExp(`^[${i == null ? void 0 : i.join("")}\0]?$`).test(p);
@@ -15392,7 +15391,7 @@ function dy(n) {
15392
15391
  return null;
15393
15392
  const g = f + h.index;
15394
15393
  let y = g + h[0].length;
15395
- return r && a.test(d.slice(y - 1, y + 1)) && (h[0] += " ", y += 1), g < o.pos && y >= o.pos ? {
15394
+ return r && a.test(u.slice(y - 1, y + 1)) && (h[0] += " ", y += 1), g < o.pos && y >= o.pos ? {
15396
15395
  range: {
15397
15396
  from: g,
15398
15397
  to: y
@@ -15402,9 +15401,9 @@ function dy(n) {
15402
15401
  } : null;
15403
15402
  }
15404
15403
  const fy = new se("suggestion");
15405
- function Ua({ pluginKey: n = fy, editor: e, char: t = "@", allowSpaces: r = !1, allowedPrefixes: i = [" "], startOfLine: s = !1, decorationTag: o = "span", decorationClass: l = "suggestion", command: a = () => null, items: c = () => [], render: u = () => ({}), allow: d = () => !0 }) {
15404
+ function Ua({ pluginKey: n = fy, editor: e, char: t = "@", allowSpaces: r = !1, allowedPrefixes: i = [" "], startOfLine: s = !1, decorationTag: o = "span", decorationClass: l = "suggestion", command: a = () => null, items: c = () => [], render: d = () => ({}), allow: u = () => !0 }) {
15406
15405
  let f;
15407
- const h = u == null ? void 0 : u(), p = new te({
15406
+ const h = d == null ? void 0 : d(), p = new te({
15408
15407
  key: n,
15409
15408
  view() {
15410
15409
  return {
@@ -15465,14 +15464,14 @@ function Ua({ pluginKey: n = fy, editor: e, char: t = "@", allowSpaces: r = !1,
15465
15464
  const { isEditable: E } = e, { composing: I } = e.view, { selection: D } = m, { empty: T, from: _ } = D, P = { ...g };
15466
15465
  if (P.composing = I, E && (T || e.view.composing)) {
15467
15466
  (_ < g.range.from || _ > g.range.to) && !I && !g.composing && (P.active = !1);
15468
- const v = dy({
15467
+ const v = uy({
15469
15468
  char: t,
15470
15469
  allowSpaces: r,
15471
15470
  allowedPrefixes: i,
15472
15471
  startOfLine: s,
15473
15472
  $position: D.$from
15474
15473
  }), W = `id_${Math.floor(Math.random() * 4294967295)}`;
15475
- v && d({ editor: e, state: O, range: v.range }) ? (P.active = !0, P.decorationId = g.decorationId ? g.decorationId : W, P.range = v.range, P.query = v.query, P.text = v.text) : P.active = !1;
15474
+ v && u({ editor: e, state: O, range: v.range }) ? (P.active = !0, P.decorationId = g.decorationId ? g.decorationId : W, P.range = v.range, P.query = v.query, P.text = v.text) : P.active = !1;
15476
15475
  } else
15477
15476
  P.active = !1;
15478
15477
  return P.active || (P.decorationId = null, P.range = { from: 0, to: 0 }, P.query = null, P.text = null), P;
@@ -15503,7 +15502,7 @@ function Ua({ pluginKey: n = fy, editor: e, char: t = "@", allowSpaces: r = !1,
15503
15502
  const hy = {
15504
15503
  name: "SuggestionList",
15505
15504
  components: {
15506
- DtListItem: ru
15505
+ DtListItem: rd
15507
15506
  },
15508
15507
  props: {
15509
15508
  items: {
@@ -15696,7 +15695,7 @@ const xy = Sy.exports, Oy = {
15696
15695
  inline: !0,
15697
15696
  selectable: !0,
15698
15697
  addNodeView() {
15699
- return Ha(uy);
15698
+ return Ha(dy);
15700
15699
  },
15701
15700
  addAttributes() {
15702
15701
  return {
@@ -15849,8 +15848,8 @@ function il(n, e, t, r, i, s) {
15849
15848
  l,
15850
15849
  "right",
15851
15850
  rl
15852
- ), u = n.slice(a.from, c.to);
15853
- Ny(u, cc, Py).forEach((f) => {
15851
+ ), d = n.slice(a.from, c.to);
15852
+ Ny(d, cc, Py).forEach((f) => {
15854
15853
  const h = Dy(f[0]), p = e + a.from + f.index + 1, m = p + h.length;
15855
15854
  i.addMark(p, m, s.create());
15856
15855
  });
@@ -15860,7 +15859,7 @@ function _y(n) {
15860
15859
  return new te({
15861
15860
  key: new se("autolink"),
15862
15861
  appendTransaction: (t, r, i) => {
15863
- const s = t.some((u) => u.docChanged) && !r.doc.eq(i.doc);
15862
+ const s = t.some((d) => d.docChanged) && !r.doc.eq(i.doc);
15864
15863
  if (e && !s)
15865
15864
  return;
15866
15865
  const { tr: o } = i, { textContent: l } = i.doc;
@@ -15869,17 +15868,17 @@ function _y(n) {
15869
15868
  r.doc,
15870
15869
  [...t]
15871
15870
  );
15872
- return $a(a).forEach(({ oldRange: u, newRange: d }) => {
15873
- Ry(d, i.doc, o, n.type), La(
15871
+ return $a(a).forEach(({ oldRange: d, newRange: u }) => {
15872
+ Ry(u, i.doc, o, n.type), La(
15874
15873
  i.doc,
15875
- d,
15874
+ u,
15876
15875
  (h) => h.isTextblock
15877
15876
  ).forEach(({ node: h, pos: p }) => {
15878
15877
  il(
15879
15878
  h.textContent,
15880
15879
  p,
15881
- u.from,
15882
- d.to,
15880
+ d.from,
15881
+ u.to,
15883
15882
  o,
15884
15883
  n.type
15885
15884
  );
@@ -16104,7 +16103,7 @@ const qy = Vy.exports, Wy = Fy.extend({
16104
16103
  };
16105
16104
  var Yy = function() {
16106
16105
  var e = this, t = e._self._c;
16107
- return t("dt-stack", { attrs: { direction: "row", gap: "400" } }, [t("dt-avatar", { attrs: { "full-name": e.name, "image-src": e.avatarSrc, size: "xs" } }), e._v(" " + e._s(e.name) + " ")], 1);
16106
+ return t("dt-stack", { attrs: { direction: "row", gap: "400" } }, [t("dt-avatar", { attrs: { "full-name": e.name, "image-src": e.avatarSrc, "image-alt": "", size: "xs" } }), e._v(" " + e._s(e.name) + " ")], 1);
16108
16107
  }, Xy = [], Qy = /* @__PURE__ */ ee(
16109
16108
  Gy,
16110
16109
  Yy,
@@ -16332,7 +16331,7 @@ const Zy = Qy.exports, e0 = {
16332
16331
  return n.push(Ay), n.push(sy.configure({
16333
16332
  types: ["paragraph"],
16334
16333
  defaultAlignment: "left"
16335
- })), n.push(dg.configure({
16334
+ })), n.push(ug.configure({
16336
16335
  HTMLAttributes: {
16337
16336
  class: "dt-rich-text-editor--code-block"
16338
16337
  }
@@ -16446,20 +16445,20 @@ var n0 = function() {
16446
16445
  null,
16447
16446
  null
16448
16447
  );
16449
- const u0 = i0.exports;
16448
+ const d0 = i0.exports;
16450
16449
  export {
16451
16450
  Xr as A,
16452
16451
  a0 as D,
16453
- un as L,
16452
+ dn as L,
16454
16453
  Uc as M,
16455
16454
  fl as P,
16456
16455
  Uy as R,
16457
16456
  qc as S,
16458
- u0 as a,
16457
+ d0 as a,
16459
16458
  Ky as b,
16460
16459
  Fc as c,
16461
16460
  $c as d,
16462
- ru as e,
16461
+ rd as e,
16463
16462
  es as f,
16464
16463
  hl as g,
16465
16464
  Ic as h,
@@ -16474,6 +16473,6 @@ export {
16474
16473
  xc as q,
16475
16474
  Lt as r,
16476
16475
  gc as s,
16477
- ut as t,
16478
- ul as u
16476
+ dt as t,
16477
+ dl as u
16479
16478
  };