@tempots/beatui 0.67.0 → 0.69.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 (30) hide show
  1. package/dist/auth/index.cjs.js +1 -1
  2. package/dist/auth/index.es.js +2 -2
  3. package/dist/{index-CWuw5oBV.cjs → index-B7lXSIXm.cjs} +4 -2
  4. package/dist/{index-BaNgZ2Pb.js → index-CzuXAuLZ.js} +575 -570
  5. package/dist/{index-CdyjO-u1.js → index-GLoRnI6r.js} +1 -1
  6. package/dist/{index-CmNppgrA.cjs → index-gSTSk9KZ.cjs} +1 -1
  7. package/dist/index.cjs.js +2 -2
  8. package/dist/index.es.js +122 -119
  9. package/dist/json-schema/index.cjs.js +4 -4
  10. package/dist/json-schema/index.es.js +2495 -2507
  11. package/dist/{modal-D9LzHK9g.js → modal-DJWj5M5e.js} +1 -1
  12. package/dist/{modal-BFmCVPI6.cjs → modal-D_paG9Sr.cjs} +1 -1
  13. package/dist/{notice-BuSRMaZb.cjs → notice-CgT9ma2m.cjs} +2 -2
  14. package/dist/{notice-CTONCH2t.js → notice-Um1LwKBF.js} +52 -55
  15. package/dist/prosemirror/index.cjs.js +1 -1
  16. package/dist/prosemirror/index.es.js +1 -1
  17. package/dist/types/components/form/controller/union-controller.d.ts +1 -1
  18. package/dist/types/components/form/use-form.d.ts +2 -2
  19. package/dist/types/components/json-schema/controls/generic-control.d.ts +2 -1
  20. package/dist/types/components/json-schema/controls/shared-utils.d.ts +17 -1
  21. package/dist/types/components/json-schema/index.d.ts +1 -0
  22. package/dist/types/components/json-schema/json-schema-form.d.ts +5 -2
  23. package/dist/types/components/json-schema/schema-context.d.ts +3 -0
  24. package/dist/types/components/json-schema/widgets/widget-customization.d.ts +55 -0
  25. package/dist/types/index.d.ts +1 -0
  26. package/dist/widget-customization-BcbRhAAR.cjs +1 -0
  27. package/dist/widget-customization-D6Y_Qm7o.js +2788 -0
  28. package/package.json +1 -1
  29. package/dist/utils-BbvrUmvw.js +0 -2554
  30. package/dist/utils-CIHYei1q.cjs +0 -1
@@ -1,4 +1,4 @@
1
- import { When as It, attr as je, prop as Bi, Fragment as vi, OnDispose as mr, Ensure as gr, signal as br, computedOf as zi, Use as Pi, Repeat as $o, Value as j, html as au, Task as Wo, WithElement as Ho } from "@tempots/dom";
1
+ import { When as Sn, attr as je, prop as vi, Fragment as zi, OnDispose as mr, Ensure as gr, signal as br, computedOf as xr, Use as Pi, Repeat as $o, Value as j, html as cu, Task as Wo, WithElement as Ho } from "@tempots/dom";
2
2
  import { a as Li, b as qi, T as Jo } from "./toolbar-Bk5-22ln.js";
3
3
  import { I as jo, T as Uo, a as Ko } from "./translations-BUTBIDsS.js";
4
4
  import { L as Zo } from "./link-portal-Cr2l9f3k.js";
@@ -333,15 +333,15 @@ class x {
333
333
  */
334
334
  findIndex(e) {
335
335
  if (e == 0)
336
- return Qt(0, e);
336
+ return Xt(0, e);
337
337
  if (e == this.size)
338
- return Qt(this.content.length, e);
338
+ return Xt(this.content.length, e);
339
339
  if (e > this.size || e < 0)
340
340
  throw new RangeError(`Position ${e} outside of fragment (${this})`);
341
341
  for (let n = 0, r = 0; ; n++) {
342
342
  let u = this.child(n), i = r + u.nodeSize;
343
343
  if (i >= e)
344
- return i == e ? Qt(n + 1, i) : Qt(n, r);
344
+ return i == e ? Xt(n + 1, i) : Xt(n, r);
345
345
  r = i;
346
346
  }
347
347
  }
@@ -407,10 +407,10 @@ class x {
407
407
  }
408
408
  x.empty = new x([], 0);
409
409
  const Ln = { index: 0, offset: 0 };
410
- function Qt(t, e) {
410
+ function Xt(t, e) {
411
411
  return Ln.index = t, Ln.offset = e, Ln;
412
412
  }
413
- function dn(t, e) {
413
+ function fn(t, e) {
414
414
  if (t === e)
415
415
  return !0;
416
416
  if (!(t && typeof t == "object") || !(e && typeof e == "object"))
@@ -422,11 +422,11 @@ function dn(t, e) {
422
422
  if (t.length != e.length)
423
423
  return !1;
424
424
  for (let r = 0; r < t.length; r++)
425
- if (!dn(t[r], e[r]))
425
+ if (!fn(t[r], e[r]))
426
426
  return !1;
427
427
  } else {
428
428
  for (let r in t)
429
- if (!(r in e) || !dn(t[r], e[r]))
429
+ if (!(r in e) || !fn(t[r], e[r]))
430
430
  return !1;
431
431
  for (let r in e)
432
432
  if (!(r in t))
@@ -488,7 +488,7 @@ class w {
488
488
  another mark.
489
489
  */
490
490
  eq(e) {
491
- return this == e || this.type == e.type && dn(this.attrs, e.attrs);
491
+ return this == e || this.type == e.type && fn(this.attrs, e.attrs);
492
492
  }
493
493
  /**
494
494
  Convert this mark to a JSON-serializeable representation.
@@ -540,7 +540,7 @@ class w {
540
540
  }
541
541
  }
542
542
  w.none = [];
543
- class hn extends Error {
543
+ class dn extends Error {
544
544
  }
545
545
  class D {
546
546
  /**
@@ -643,9 +643,9 @@ function Hi(t, e, n, r) {
643
643
  }
644
644
  function Xo(t, e, n) {
645
645
  if (n.openStart > t.depth)
646
- throw new hn("Inserted content deeper than insertion position");
646
+ throw new dn("Inserted content deeper than insertion position");
647
647
  if (t.depth - n.openStart != e.depth - n.openEnd)
648
- throw new hn("Inconsistent open depths");
648
+ throw new dn("Inconsistent open depths");
649
649
  return Ji(t, e, n, 0);
650
650
  }
651
651
  function Ji(t, e, n, r) {
@@ -661,13 +661,13 @@ function Ji(t, e, n, r) {
661
661
  let { start: s, end: o } = Qo(n, t);
662
662
  return Xe(i, Ui(t, s, o, e, r));
663
663
  }
664
- else return Xe(i, pn(t, e, r));
664
+ else return Xe(i, hn(t, e, r));
665
665
  }
666
666
  function ji(t, e) {
667
667
  if (!e.type.compatibleContent(t.type))
668
- throw new hn("Cannot join " + e.type.name + " onto " + t.type.name);
668
+ throw new dn("Cannot join " + e.type.name + " onto " + t.type.name);
669
669
  }
670
- function xr(t, e, n) {
670
+ function kr(t, e, n) {
671
671
  let r = t.node(n);
672
672
  return ji(r, e.node(n)), r;
673
673
  }
@@ -686,14 +686,14 @@ function Xe(t, e) {
686
686
  return t.type.checkContent(e), t.copy(e);
687
687
  }
688
688
  function Ui(t, e, n, r, u) {
689
- let i = t.depth > u && xr(t, e, u + 1), s = r.depth > u && xr(n, r, u + 1), o = [];
690
- return Tt(null, t, u, o), i && s && e.index(u) == n.index(u) ? (ji(i, s), Ye(Xe(i, Ui(t, e, n, r, u + 1)), o)) : (i && Ye(Xe(i, pn(t, e, u + 1)), o), Tt(e, n, u, o), s && Ye(Xe(s, pn(n, r, u + 1)), o)), Tt(r, null, u, o), new x(o);
689
+ let i = t.depth > u && kr(t, e, u + 1), s = r.depth > u && kr(n, r, u + 1), o = [];
690
+ return Tt(null, t, u, o), i && s && e.index(u) == n.index(u) ? (ji(i, s), Ye(Xe(i, Ui(t, e, n, r, u + 1)), o)) : (i && Ye(Xe(i, hn(t, e, u + 1)), o), Tt(e, n, u, o), s && Ye(Xe(s, hn(n, r, u + 1)), o)), Tt(r, null, u, o), new x(o);
691
691
  }
692
- function pn(t, e, n) {
692
+ function hn(t, e, n) {
693
693
  let r = [];
694
694
  if (Tt(null, t, n, r), t.depth > n) {
695
- let u = xr(t, e, n + 1);
696
- Ye(Xe(u, pn(t, e, n + 1)), r);
695
+ let u = kr(t, e, n + 1);
696
+ Ye(Xe(u, hn(t, e, n + 1)), r);
697
697
  }
698
698
  return Tt(e, null, n, r), new x(r);
699
699
  }
@@ -706,7 +706,7 @@ function Qo(t, e) {
706
706
  end: u.resolveNoCache(u.content.size - t.openEnd - n)
707
707
  };
708
708
  }
709
- class Rt {
709
+ class It {
710
710
  /**
711
711
  @internal
712
712
  */
@@ -934,13 +934,13 @@ class Rt {
934
934
  break;
935
935
  i = a - 1, u += l + 1;
936
936
  }
937
- return new Rt(n, r, i);
937
+ return new It(n, r, i);
938
938
  }
939
939
  /**
940
940
  @internal
941
941
  */
942
942
  static resolveCached(e, n) {
943
- let r = cu.get(e);
943
+ let r = fu.get(e);
944
944
  if (r)
945
945
  for (let i = 0; i < r.elts.length; i++) {
946
946
  let s = r.elts[i];
@@ -948,8 +948,8 @@ class Rt {
948
948
  return s;
949
949
  }
950
950
  else
951
- cu.set(e, r = new el());
952
- let u = r.elts[r.i] = Rt.resolve(e, n);
951
+ fu.set(e, r = new el());
952
+ let u = r.elts[r.i] = It.resolve(e, n);
953
953
  return r.i = (r.i + 1) % tl, u;
954
954
  }
955
955
  }
@@ -958,7 +958,7 @@ class el {
958
958
  this.elts = [], this.i = 0;
959
959
  }
960
960
  }
961
- const tl = 12, cu = /* @__PURE__ */ new WeakMap();
961
+ const tl = 12, fu = /* @__PURE__ */ new WeakMap();
962
962
  class nl {
963
963
  /**
964
964
  Construct a node range. `$from` and `$to` should point into the
@@ -1118,7 +1118,7 @@ class xe {
1118
1118
  attributes, and marks.
1119
1119
  */
1120
1120
  hasMarkup(e, n, r) {
1121
- return this.type == e && dn(this.attrs, n || e.defaultAttrs || rl) && w.sameSet(this.marks, r || w.none);
1121
+ return this.type == e && fn(this.attrs, n || e.defaultAttrs || rl) && w.sameSet(this.marks, r || w.none);
1122
1122
  }
1123
1123
  /**
1124
1124
  Create a new node with the same markup as this node, containing
@@ -1204,13 +1204,13 @@ class xe {
1204
1204
  [object](https://prosemirror.net/docs/ref/#model.ResolvedPos) with information about its context.
1205
1205
  */
1206
1206
  resolve(e) {
1207
- return Rt.resolveCached(this, e);
1207
+ return It.resolveCached(this, e);
1208
1208
  }
1209
1209
  /**
1210
1210
  @internal
1211
1211
  */
1212
1212
  resolveNoCache(e) {
1213
- return Rt.resolve(this, e);
1213
+ return It.resolve(this, e);
1214
1214
  }
1215
1215
  /**
1216
1216
  Test whether a given mark or mark type occurs in this document
@@ -1370,7 +1370,7 @@ class xe {
1370
1370
  }
1371
1371
  }
1372
1372
  xe.prototype.text = void 0;
1373
- class mn extends xe {
1373
+ class pn extends xe {
1374
1374
  /**
1375
1375
  @internal
1376
1376
  */
@@ -1392,10 +1392,10 @@ class mn extends xe {
1392
1392
  return this.text.length;
1393
1393
  }
1394
1394
  mark(e) {
1395
- return e == this.marks ? this : new mn(this.type, this.attrs, this.text, e);
1395
+ return e == this.marks ? this : new pn(this.type, this.attrs, this.text, e);
1396
1396
  }
1397
1397
  withText(e) {
1398
- return e == this.text ? this : new mn(this.type, this.attrs, e, this.marks);
1398
+ return e == this.text ? this : new pn(this.type, this.attrs, e, this.marks);
1399
1399
  }
1400
1400
  cut(e = 0, n = this.text.length) {
1401
1401
  return e == 0 && n == this.text.length ? this : this.withText(this.text.slice(e, n));
@@ -1619,14 +1619,14 @@ function sl(t) {
1619
1619
  break;
1620
1620
  return e;
1621
1621
  }
1622
- function fu(t) {
1622
+ function du(t) {
1623
1623
  /\D/.test(t.next) && t.err("Expected number, got '" + t.next + "'");
1624
1624
  let e = Number(t.next);
1625
1625
  return t.pos++, e;
1626
1626
  }
1627
1627
  function ol(t, e) {
1628
- let n = fu(t), r = n;
1629
- return t.eat(",") && (t.next != "}" ? r = fu(t) : r = -1), t.eat("}") || t.err("Unclosed braced range"), { type: "range", min: n, max: r, expr: e };
1628
+ let n = du(t), r = n;
1629
+ return t.eat(",") && (t.next != "}" ? r = du(t) : r = -1), t.eat("}") || t.err("Unclosed braced range"), { type: "range", min: n, max: r, expr: e };
1630
1630
  }
1631
1631
  function ll(t, e) {
1632
1632
  let n = t.nodeTypes, r = n[e];
@@ -1707,7 +1707,7 @@ function cl(t) {
1707
1707
  function Gi(t, e) {
1708
1708
  return e - t;
1709
1709
  }
1710
- function du(t, e) {
1710
+ function hu(t, e) {
1711
1711
  let n = [];
1712
1712
  return r(e), n.sort(Gi);
1713
1713
  function r(u) {
@@ -1723,7 +1723,7 @@ function du(t, e) {
1723
1723
  }
1724
1724
  function fl(t) {
1725
1725
  let e = /* @__PURE__ */ Object.create(null);
1726
- return n(du(t, 0));
1726
+ return n(hu(t, 0));
1727
1727
  function n(r) {
1728
1728
  let u = [];
1729
1729
  r.forEach((s) => {
@@ -1733,7 +1733,7 @@ function fl(t) {
1733
1733
  let a;
1734
1734
  for (let c = 0; c < u.length; c++)
1735
1735
  u[c][0] == o && (a = u[c][1]);
1736
- du(t, l).forEach((c) => {
1736
+ hu(t, l).forEach((c) => {
1737
1737
  a || u.push([o, a = []]), a.indexOf(c) == -1 && a.push(c);
1738
1738
  });
1739
1739
  });
@@ -1797,7 +1797,7 @@ function es(t, e) {
1797
1797
  n[r] = new pl(t, r, e[r]);
1798
1798
  return n;
1799
1799
  }
1800
- let hu = class ts {
1800
+ let pu = class ts {
1801
1801
  /**
1802
1802
  @internal
1803
1803
  */
@@ -2047,7 +2047,7 @@ class An {
2047
2047
  return this.excluded.indexOf(e) > -1;
2048
2048
  }
2049
2049
  }
2050
- class Pr {
2050
+ class Lr {
2051
2051
  /**
2052
2052
  Construct a schema from a schema [specification](https://prosemirror.net/docs/ref/#model.SchemaSpec).
2053
2053
  */
@@ -2056,7 +2056,7 @@ class Pr {
2056
2056
  let n = this.spec = {};
2057
2057
  for (let u in e)
2058
2058
  n[u] = e[u];
2059
- n.nodes = L.from(e.nodes), n.marks = L.from(e.marks || {}), this.nodes = hu.compile(this.spec.nodes, this), this.marks = An.compile(this.spec.marks, this);
2059
+ n.nodes = L.from(e.nodes), n.marks = L.from(e.marks || {}), this.nodes = pu.compile(this.spec.nodes, this), this.marks = An.compile(this.spec.marks, this);
2060
2060
  let r = /* @__PURE__ */ Object.create(null);
2061
2061
  for (let u in this.nodes) {
2062
2062
  if (u in this.marks)
@@ -2069,11 +2069,11 @@ class Pr {
2069
2069
  throw new RangeError("Linebreak replacement nodes must be inline leaf nodes");
2070
2070
  this.linebreakReplacement = i;
2071
2071
  }
2072
- i.markSet = o == "_" ? null : o ? pu(this, o.split(" ")) : o == "" || !i.inlineContent ? [] : null;
2072
+ i.markSet = o == "_" ? null : o ? mu(this, o.split(" ")) : o == "" || !i.inlineContent ? [] : null;
2073
2073
  }
2074
2074
  for (let u in this.marks) {
2075
2075
  let i = this.marks[u], s = i.spec.excludes;
2076
- i.excluded = s == null ? [i] : s == "" ? [] : pu(this, s.split(" "));
2076
+ i.excluded = s == null ? [i] : s == "" ? [] : mu(this, s.split(" "));
2077
2077
  }
2078
2078
  this.nodeFromJSON = (u) => xe.fromJSON(this, u), this.markFromJSON = (u) => w.fromJSON(this, u), this.topNodeType = this.nodes[this.spec.topNode || "doc"], this.cached.wrappings = /* @__PURE__ */ Object.create(null);
2079
2079
  }
@@ -2086,7 +2086,7 @@ class Pr {
2086
2086
  node(e, n = null, r, u) {
2087
2087
  if (typeof e == "string")
2088
2088
  e = this.nodeType(e);
2089
- else if (e instanceof hu) {
2089
+ else if (e instanceof pu) {
2090
2090
  if (e.schema != this)
2091
2091
  throw new RangeError("Node type from different schema used (" + e.name + ")");
2092
2092
  } else throw new RangeError("Invalid node type: " + e);
@@ -2098,7 +2098,7 @@ class Pr {
2098
2098
  */
2099
2099
  text(e, n) {
2100
2100
  let r = this.nodes.text;
2101
- return new mn(r, r.defaultAttrs, e, w.setFrom(n));
2101
+ return new pn(r, r.defaultAttrs, e, w.setFrom(n));
2102
2102
  }
2103
2103
  /**
2104
2104
  Create a mark with the given type and attributes.
@@ -2116,7 +2116,7 @@ class Pr {
2116
2116
  return n;
2117
2117
  }
2118
2118
  }
2119
- function pu(t, e) {
2119
+ function mu(t, e) {
2120
2120
  let n = [];
2121
2121
  for (let r = 0; r < e.length; r++) {
2122
2122
  let u = e[r], i = t.marks[u], s = i;
@@ -2138,7 +2138,7 @@ function ml(t) {
2138
2138
  function gl(t) {
2139
2139
  return t.style != null;
2140
2140
  }
2141
- class Bt {
2141
+ class Rt {
2142
2142
  /**
2143
2143
  Create a parser that targets the given schema, using the given
2144
2144
  parsing rules.
@@ -2164,7 +2164,7 @@ class Bt {
2164
2164
  Parse a document from the content of a DOM node.
2165
2165
  */
2166
2166
  parse(e, n = {}) {
2167
- let r = new gu(this, n, !1);
2167
+ let r = new bu(this, n, !1);
2168
2168
  return r.addAll(e, w.none, n.from, n.to), r.finish();
2169
2169
  }
2170
2170
  /**
@@ -2176,7 +2176,7 @@ class Bt {
2176
2176
  the left of the input and the end of nodes at the end.
2177
2177
  */
2178
2178
  parseSlice(e, n = {}) {
2179
- let r = new gu(this, n, !0);
2179
+ let r = new bu(this, n, !0);
2180
2180
  return r.addAll(e, w.none, n.from, n.to), D.maxOpen(r.finish());
2181
2181
  }
2182
2182
  /**
@@ -2233,13 +2233,13 @@ class Bt {
2233
2233
  for (let u in e.marks) {
2234
2234
  let i = e.marks[u].spec.parseDOM;
2235
2235
  i && i.forEach((s) => {
2236
- r(s = bu(s)), s.mark || s.ignore || s.clearMark || (s.mark = u);
2236
+ r(s = xu(s)), s.mark || s.ignore || s.clearMark || (s.mark = u);
2237
2237
  });
2238
2238
  }
2239
2239
  for (let u in e.nodes) {
2240
2240
  let i = e.nodes[u].spec.parseDOM;
2241
2241
  i && i.forEach((s) => {
2242
- r(s = bu(s)), s.node || s.ignore || s.mark || (s.node = u);
2242
+ r(s = xu(s)), s.node || s.ignore || s.mark || (s.node = u);
2243
2243
  });
2244
2244
  }
2245
2245
  return n;
@@ -2250,7 +2250,7 @@ class Bt {
2250
2250
  [priority](https://prosemirror.net/docs/ref/#model.GenericParseRule.priority).
2251
2251
  */
2252
2252
  static fromSchema(e) {
2253
- return e.cached.domParser || (e.cached.domParser = new Bt(e, Bt.schemaRules(e)));
2253
+ return e.cached.domParser || (e.cached.domParser = new Rt(e, Rt.schemaRules(e)));
2254
2254
  }
2255
2255
  }
2256
2256
  const ns = {
@@ -2293,11 +2293,11 @@ const ns = {
2293
2293
  script: !0,
2294
2294
  style: !0,
2295
2295
  title: !0
2296
- }, rs = { ol: !0, ul: !0 }, vt = 1, kr = 2, Ot = 4;
2297
- function mu(t, e, n) {
2298
- return e != null ? (e ? vt : 0) | (e === "full" ? kr : 0) : t && t.whitespace == "pre" ? vt | kr : n & ~Ot;
2296
+ }, rs = { ol: !0, ul: !0 }, Bt = 1, yr = 2, Ot = 4;
2297
+ function gu(t, e, n) {
2298
+ return e != null ? (e ? Bt : 0) | (e === "full" ? yr : 0) : t && t.whitespace == "pre" ? Bt | yr : n & ~Ot;
2299
2299
  }
2300
- class en {
2300
+ class Qt {
2301
2301
  constructor(e, n, r, u, i, s) {
2302
2302
  this.type = e, this.attrs = n, this.marks = r, this.solid = u, this.options = s, this.content = [], this.activeMarks = w.none, this.match = i || (s & Ot ? null : e.contentMatch);
2303
2303
  }
@@ -2316,7 +2316,7 @@ class en {
2316
2316
  return this.match.findWrapping(e.type);
2317
2317
  }
2318
2318
  finish(e) {
2319
- if (!(this.options & vt)) {
2319
+ if (!(this.options & Bt)) {
2320
2320
  let r = this.content[this.content.length - 1], u;
2321
2321
  if (r && r.isText && (u = /[ \t\r\n\u000c]+$/.exec(r.text))) {
2322
2322
  let i = r;
@@ -2330,11 +2330,11 @@ class en {
2330
2330
  return this.type ? this.type.inlineContent : this.content.length ? this.content[0].isInline : e.parentNode && !ns.hasOwnProperty(e.parentNode.nodeName.toLowerCase());
2331
2331
  }
2332
2332
  }
2333
- class gu {
2333
+ class bu {
2334
2334
  constructor(e, n, r) {
2335
2335
  this.parser = e, this.options = n, this.isOpen = r, this.open = 0, this.localPreserveWS = !1;
2336
- let u = n.topNode, i, s = mu(null, n.preserveWhitespace, 0) | (r ? Ot : 0);
2337
- u ? i = new en(u.type, u.attrs, w.none, !0, n.topMatch || u.type.contentMatch, s) : r ? i = new en(null, null, w.none, !0, null, s) : i = new en(e.schema.topNodeType, null, w.none, !0, null, s), this.nodes = [i], this.find = n.findPositions, this.needsBlock = !1;
2336
+ let u = n.topNode, i, s = gu(null, n.preserveWhitespace, 0) | (r ? Ot : 0);
2337
+ u ? i = new Qt(u.type, u.attrs, w.none, !0, n.topMatch || u.type.contentMatch, s) : r ? i = new Qt(null, null, w.none, !0, null, s) : i = new Qt(e.schema.topNodeType, null, w.none, !0, null, s), this.nodes = [i], this.find = n.findPositions, this.needsBlock = !1;
2338
2338
  }
2339
2339
  get top() {
2340
2340
  return this.nodes[this.open];
@@ -2346,7 +2346,7 @@ class gu {
2346
2346
  e.nodeType == 3 ? this.addTextNode(e, n) : e.nodeType == 1 && this.addElement(e, n);
2347
2347
  }
2348
2348
  addTextNode(e, n) {
2349
- let r = e.nodeValue, u = this.top, i = u.options & kr ? "full" : this.localPreserveWS || (u.options & vt) > 0, { schema: s } = this.parser;
2349
+ let r = e.nodeValue, u = this.top, i = u.options & yr ? "full" : this.localPreserveWS || (u.options & Bt) > 0, { schema: s } = this.parser;
2350
2350
  if (i === "full" || u.inlineContext(e) || /[^ \t\r\n\u000c]/.test(r)) {
2351
2351
  if (i)
2352
2352
  if (i === "full")
@@ -2499,7 +2499,7 @@ class gu {
2499
2499
  i.match && (i.match = i.match.matchType(e.type));
2500
2500
  let s = w.none;
2501
2501
  for (let o of u.concat(e.marks))
2502
- (i.type ? i.type.allowsMarkType(o.type) : xu(o.type, e.type)) && (s = o.addToSet(s));
2502
+ (i.type ? i.type.allowsMarkType(o.type) : ku(o.type, e.type)) && (s = o.addToSet(s));
2503
2503
  return i.content.push(e.mark(s)), !0;
2504
2504
  }
2505
2505
  return !1;
@@ -2515,10 +2515,10 @@ class gu {
2515
2515
  this.closeExtra();
2516
2516
  let s = this.top;
2517
2517
  s.match = s.match && s.match.matchType(e);
2518
- let o = mu(e, i, s.options);
2518
+ let o = gu(e, i, s.options);
2519
2519
  s.options & Ot && s.content.length == 0 && (o |= Ot);
2520
2520
  let l = w.none;
2521
- return r = r.filter((a) => (s.type ? s.type.allowsMarkType(a.type) : xu(a.type, e)) ? (l = a.addToSet(l), !1) : !0), this.nodes.push(new en(e, n, l, u, null, o)), this.open++, r;
2521
+ return r = r.filter((a) => (s.type ? s.type.allowsMarkType(a.type) : ku(a.type, e)) ? (l = a.addToSet(l), !1) : !0), this.nodes.push(new Qt(e, n, l, u, null, o)), this.open++, r;
2522
2522
  }
2523
2523
  // Make sure all nodes above this.open are finished and added to
2524
2524
  // their parents
@@ -2537,7 +2537,7 @@ class gu {
2537
2537
  for (let n = this.open; n >= 0; n--) {
2538
2538
  if (this.nodes[n] == e)
2539
2539
  return this.open = n, !0;
2540
- this.localPreserveWS && (this.nodes[n].options |= vt);
2540
+ this.localPreserveWS && (this.nodes[n].options |= Bt);
2541
2541
  }
2542
2542
  return !1;
2543
2543
  }
@@ -2621,13 +2621,13 @@ function xl(t) {
2621
2621
  function kl(t, e) {
2622
2622
  return (t.matches || t.msMatchesSelector || t.webkitMatchesSelector || t.mozMatchesSelector).call(t, e);
2623
2623
  }
2624
- function bu(t) {
2624
+ function xu(t) {
2625
2625
  let e = {};
2626
2626
  for (let n in t)
2627
2627
  e[n] = t[n];
2628
2628
  return e;
2629
2629
  }
2630
- function xu(t, e) {
2630
+ function ku(t, e) {
2631
2631
  let n = e.schema.nodes;
2632
2632
  for (let r in n) {
2633
2633
  let u = n[r];
@@ -2694,7 +2694,7 @@ class Ct {
2694
2694
  @internal
2695
2695
  */
2696
2696
  serializeNodeInner(e, n) {
2697
- let { dom: r, contentDOM: u } = sn(qn(n), this.nodes[e.type.name](e), null, e.attrs);
2697
+ let { dom: r, contentDOM: u } = un(qn(n), this.nodes[e.type.name](e), null, e.attrs);
2698
2698
  if (u) {
2699
2699
  if (e.isLeaf)
2700
2700
  throw new RangeError("Content hole not allowed in a leaf node spec");
@@ -2722,10 +2722,10 @@ class Ct {
2722
2722
  */
2723
2723
  serializeMark(e, n, r = {}) {
2724
2724
  let u = this.marks[e.type.name];
2725
- return u && sn(qn(r), u(e, n), null, e.attrs);
2725
+ return u && un(qn(r), u(e, n), null, e.attrs);
2726
2726
  }
2727
2727
  static renderSpec(e, n, r = null, u) {
2728
- return sn(e, n, r, u);
2728
+ return un(e, n, r, u);
2729
2729
  }
2730
2730
  /**
2731
2731
  Build a serializer using the [`toDOM`](https://prosemirror.net/docs/ref/#model.NodeSpec.toDOM)
@@ -2739,17 +2739,17 @@ class Ct {
2739
2739
  This can be useful as a base to build a custom serializer from.
2740
2740
  */
2741
2741
  static nodesFromSchema(e) {
2742
- let n = ku(e.nodes);
2742
+ let n = yu(e.nodes);
2743
2743
  return n.text || (n.text = (r) => r.text), n;
2744
2744
  }
2745
2745
  /**
2746
2746
  Gather the serializers in a schema's mark specs into an object.
2747
2747
  */
2748
2748
  static marksFromSchema(e) {
2749
- return ku(e.marks);
2749
+ return yu(e.marks);
2750
2750
  }
2751
2751
  }
2752
- function ku(t) {
2752
+ function yu(t) {
2753
2753
  let e = {};
2754
2754
  for (let n in t) {
2755
2755
  let r = t[n].spec.toDOM;
@@ -2760,10 +2760,10 @@ function ku(t) {
2760
2760
  function qn(t) {
2761
2761
  return t.document || window.document;
2762
2762
  }
2763
- const yu = /* @__PURE__ */ new WeakMap();
2763
+ const Cu = /* @__PURE__ */ new WeakMap();
2764
2764
  function yl(t) {
2765
- let e = yu.get(t);
2766
- return e === void 0 && yu.set(t, e = Cl(t)), e;
2765
+ let e = Cu.get(t);
2766
+ return e === void 0 && Cu.set(t, e = Cl(t)), e;
2767
2767
  }
2768
2768
  function Cl(t) {
2769
2769
  let e = null;
@@ -2781,7 +2781,7 @@ function Cl(t) {
2781
2781
  }
2782
2782
  return n(t), e;
2783
2783
  }
2784
- function sn(t, e, n, r) {
2784
+ function un(t, e, n, r) {
2785
2785
  if (typeof e == "string")
2786
2786
  return { dom: t.createTextNode(e) };
2787
2787
  if (e.nodeType != null)
@@ -2811,7 +2811,7 @@ function sn(t, e, n, r) {
2811
2811
  throw new RangeError("Content hole must be the only child of its parent node");
2812
2812
  return { dom: l, contentDOM: l };
2813
2813
  } else {
2814
- let { dom: h, contentDOM: d } = sn(t, p, n, r);
2814
+ let { dom: h, contentDOM: d } = un(t, p, n, r);
2815
2815
  if (l.appendChild(h), d) {
2816
2816
  if (o)
2817
2817
  throw new RangeError("Multiple content holes");
@@ -2825,14 +2825,14 @@ const us = 65535, is = Math.pow(2, 16);
2825
2825
  function Dl(t, e) {
2826
2826
  return t + e * is;
2827
2827
  }
2828
- function Cu(t) {
2828
+ function Du(t) {
2829
2829
  return t & us;
2830
2830
  }
2831
2831
  function _l(t) {
2832
2832
  return (t - (t & us)) / is;
2833
2833
  }
2834
- const ss = 1, ls = 2, on = 4, as = 8;
2835
- class yr {
2834
+ const ss = 1, ls = 2, sn = 4, as = 8;
2835
+ class Cr {
2836
2836
  /**
2837
2837
  @internal
2838
2838
  */
@@ -2851,13 +2851,13 @@ class yr {
2851
2851
  Tells you whether the token before the mapped position was deleted.
2852
2852
  */
2853
2853
  get deletedBefore() {
2854
- return (this.delInfo & (ss | on)) > 0;
2854
+ return (this.delInfo & (ss | sn)) > 0;
2855
2855
  }
2856
2856
  /**
2857
2857
  True when the token after the mapped position was deleted.
2858
2858
  */
2859
2859
  get deletedAfter() {
2860
- return (this.delInfo & (ls | on)) > 0;
2860
+ return (this.delInfo & (ls | sn)) > 0;
2861
2861
  }
2862
2862
  /**
2863
2863
  Tells whether any of the steps mapped through deletes across the
@@ -2865,7 +2865,7 @@ class yr {
2865
2865
  position).
2866
2866
  */
2867
2867
  get deletedAcross() {
2868
- return (this.delInfo & on) > 0;
2868
+ return (this.delInfo & sn) > 0;
2869
2869
  }
2870
2870
  }
2871
2871
  class Q {
@@ -2882,7 +2882,7 @@ class Q {
2882
2882
  @internal
2883
2883
  */
2884
2884
  recover(e) {
2885
- let n = 0, r = Cu(e);
2885
+ let n = 0, r = Du(e);
2886
2886
  if (!this.inverted)
2887
2887
  for (let u = 0; u < r; u++)
2888
2888
  n += this.ranges[u * 3 + 2] - this.ranges[u * 3 + 1];
@@ -2908,18 +2908,18 @@ class Q {
2908
2908
  let p = a ? e == l ? -1 : e == f ? 1 : n : n, h = l + u + (p < 0 ? 0 : c);
2909
2909
  if (r)
2910
2910
  return h;
2911
- let d = e == (n < 0 ? l : f) ? null : Dl(o / 3, e - l), m = e == l ? ls : e == f ? ss : on;
2912
- return (n < 0 ? e != l : e != f) && (m |= as), new yr(h, m, d);
2911
+ let d = e == (n < 0 ? l : f) ? null : Dl(o / 3, e - l), m = e == l ? ls : e == f ? ss : sn;
2912
+ return (n < 0 ? e != l : e != f) && (m |= as), new Cr(h, m, d);
2913
2913
  }
2914
2914
  u += c - a;
2915
2915
  }
2916
- return r ? e + u : new yr(e + u, 0, null);
2916
+ return r ? e + u : new Cr(e + u, 0, null);
2917
2917
  }
2918
2918
  /**
2919
2919
  @internal
2920
2920
  */
2921
2921
  touches(e, n) {
2922
- let r = 0, u = Cu(n), i = this.inverted ? 2 : 1, s = this.inverted ? 1 : 2;
2922
+ let r = 0, u = Du(n), i = this.inverted ? 2 : 1, s = this.inverted ? 1 : 2;
2923
2923
  for (let o = 0; o < this.ranges.length; o += 3) {
2924
2924
  let l = this.ranges[o] - (this.inverted ? r : 0);
2925
2925
  if (l > e)
@@ -2965,7 +2965,7 @@ class Q {
2965
2965
  }
2966
2966
  }
2967
2967
  Q.empty = new Q([]);
2968
- class zt {
2968
+ class vt {
2969
2969
  /**
2970
2970
  Create a new mapping with the given position maps.
2971
2971
  */
@@ -2982,7 +2982,7 @@ class zt {
2982
2982
  Create a mapping that maps only through a part of this one.
2983
2983
  */
2984
2984
  slice(e = 0, n = this.maps.length) {
2985
- return new zt(this._maps, this.mirror, e, n);
2985
+ return new vt(this._maps, this.mirror, e, n);
2986
2986
  }
2987
2987
  /**
2988
2988
  Add a step map to the end of this mapping. If `mirrors` is
@@ -3033,7 +3033,7 @@ class zt {
3033
3033
  Create an inverted version of this mapping.
3034
3034
  */
3035
3035
  invert() {
3036
- let e = new zt();
3036
+ let e = new vt();
3037
3037
  return e.appendMappingInverted(this), e;
3038
3038
  }
3039
3039
  /**
@@ -3069,7 +3069,7 @@ class zt {
3069
3069
  }
3070
3070
  u |= o.delInfo, e = o.pos;
3071
3071
  }
3072
- return r ? e : new yr(e, u, null);
3072
+ return r ? e : new Cr(e, u, null);
3073
3073
  }
3074
3074
  }
3075
3075
  const Vn = /* @__PURE__ */ Object.create(null);
@@ -3142,17 +3142,17 @@ class R {
3142
3142
  try {
3143
3143
  return R.ok(e.replace(n, r, u));
3144
3144
  } catch (i) {
3145
- if (i instanceof hn)
3145
+ if (i instanceof dn)
3146
3146
  return R.fail(i.message);
3147
3147
  throw i;
3148
3148
  }
3149
3149
  }
3150
3150
  }
3151
- function Lr(t, e, n) {
3151
+ function qr(t, e, n) {
3152
3152
  let r = [];
3153
3153
  for (let u = 0; u < t.childCount; u++) {
3154
3154
  let i = t.child(u);
3155
- i.content.size && (i = i.copy(Lr(i.content, e, i))), i.isInline && (i = e(i, n, u)), r.push(i);
3155
+ i.content.size && (i = i.copy(qr(i.content, e, i))), i.isInline && (i = e(i, n, u)), r.push(i);
3156
3156
  }
3157
3157
  return x.fromArray(r);
3158
3158
  }
@@ -3164,7 +3164,7 @@ class Be extends J {
3164
3164
  super(), this.from = e, this.to = n, this.mark = r;
3165
3165
  }
3166
3166
  apply(e) {
3167
- let n = e.slice(this.from, this.to), r = e.resolve(this.from), u = r.node(r.sharedDepth(this.to)), i = new D(Lr(n.content, (s, o) => !s.isAtom || !o.type.allowsMarkType(this.mark.type) ? s : s.mark(this.mark.addToSet(s.marks)), u), n.openStart, n.openEnd);
3167
+ let n = e.slice(this.from, this.to), r = e.resolve(this.from), u = r.node(r.sharedDepth(this.to)), i = new D(qr(n.content, (s, o) => !s.isAtom || !o.type.allowsMarkType(this.mark.type) ? s : s.mark(this.mark.addToSet(s.marks)), u), n.openStart, n.openEnd);
3168
3168
  return R.fromReplace(e, this.from, this.to, i);
3169
3169
  }
3170
3170
  invert() {
@@ -3203,7 +3203,7 @@ class me extends J {
3203
3203
  super(), this.from = e, this.to = n, this.mark = r;
3204
3204
  }
3205
3205
  apply(e) {
3206
- let n = e.slice(this.from, this.to), r = new D(Lr(n.content, (u) => u.mark(this.mark.removeFromSet(u.marks)), e), n.openStart, n.openEnd);
3206
+ let n = e.slice(this.from, this.to), r = new D(qr(n.content, (u) => u.mark(this.mark.removeFromSet(u.marks)), e), n.openStart, n.openEnd);
3207
3207
  return R.fromReplace(e, this.from, this.to, r);
3208
3208
  }
3209
3209
  invert() {
@@ -3327,7 +3327,7 @@ class W extends J {
3327
3327
  super(), this.from = e, this.to = n, this.slice = r, this.structure = u;
3328
3328
  }
3329
3329
  apply(e) {
3330
- return this.structure && Cr(e, this.from, this.to) ? R.fail("Structure replace would overwrite content") : R.fromReplace(e, this.from, this.to, this.slice);
3330
+ return this.structure && Dr(e, this.from, this.to) ? R.fail("Structure replace would overwrite content") : R.fromReplace(e, this.from, this.to, this.slice);
3331
3331
  }
3332
3332
  getMap() {
3333
3333
  return new Q([this.from, this.to - this.from, this.slice.size]);
@@ -3376,7 +3376,7 @@ class ee extends J {
3376
3376
  super(), this.from = e, this.to = n, this.gapFrom = r, this.gapTo = u, this.slice = i, this.insert = s, this.structure = o;
3377
3377
  }
3378
3378
  apply(e) {
3379
- if (this.structure && (Cr(e, this.from, this.gapFrom) || Cr(e, this.gapTo, this.to)))
3379
+ if (this.structure && (Dr(e, this.from, this.gapFrom) || Dr(e, this.gapTo, this.to)))
3380
3380
  return R.fail("Structure gap-replace would overwrite content");
3381
3381
  let n = e.slice(this.gapFrom, this.gapTo);
3382
3382
  if (n.openStart || n.openEnd)
@@ -3423,7 +3423,7 @@ class ee extends J {
3423
3423
  }
3424
3424
  }
3425
3425
  J.jsonID("replaceAround", ee);
3426
- function Cr(t, e, n) {
3426
+ function Dr(t, e, n) {
3427
3427
  let r = t.resolve(e), u = n - e, i = r.depth;
3428
3428
  for (; u > 0 && i > 0 && r.indexAfter(i) == r.node(i).childCount; )
3429
3429
  i--, u--;
@@ -3476,7 +3476,7 @@ function Sl(t, e, n, r) {
3476
3476
  }
3477
3477
  }), u.forEach((s) => t.step(new me(s.from, s.to, s.style)));
3478
3478
  }
3479
- function qr(t, e, n, r = n.contentMatch, u = !0) {
3479
+ function Vr(t, e, n, r = n.contentMatch, u = !0) {
3480
3480
  let i = t.doc.nodeAt(e), s = [], o = e + 1;
3481
3481
  for (let l = 0; l < i.childCount; l++) {
3482
3482
  let a = i.child(l), c = o + a.nodeSize, f = r.matchType(a.type);
@@ -3526,9 +3526,9 @@ function Ml(t, e, n) {
3526
3526
  }
3527
3527
  function wl(t, e, n = null, r = t) {
3528
3528
  let u = Tl(t, e), i = u && Ol(r, e);
3529
- return i ? u.map(Du).concat({ type: e, attrs: n }).concat(i.map(Du)) : null;
3529
+ return i ? u.map(_u).concat({ type: e, attrs: n }).concat(i.map(_u)) : null;
3530
3530
  }
3531
- function Du(t) {
3531
+ function _u(t) {
3532
3532
  return { type: t, attrs: null };
3533
3533
  }
3534
3534
  function Tl(t, e) {
@@ -3572,7 +3572,7 @@ function Nl(t, e, n, r, u) {
3572
3572
  let h = r.whitespace == "pre", d = !!r.contentMatch.matchType(r.schema.linebreakReplacement);
3573
3573
  h && !d ? a = !1 : !h && d && (a = !0);
3574
3574
  }
3575
- a === !1 && fs(t, s, o, i), qr(t, t.mapping.slice(i).map(o, 1), r, void 0, a === null);
3575
+ a === !1 && fs(t, s, o, i), Vr(t, t.mapping.slice(i).map(o, 1), r, void 0, a === null);
3576
3576
  let c = t.mapping.slice(i), f = c.map(o, 1), p = c.map(o + s.nodeSize, 1);
3577
3577
  return t.step(new ee(f, p, f + 1, p - 1, new D(x.from(r.create(l, null, s.marks)), 0, 0), 1, !0)), a === !0 && cs(t, s, o, i), !1;
3578
3578
  }
@@ -3614,7 +3614,7 @@ function Rl(t, e, n, r, u) {
3614
3614
  throw new RangeError("Invalid content for node type " + n.name);
3615
3615
  t.step(new ee(e, e + i.nodeSize, e + 1, e + i.nodeSize - 1, new D(x.from(s), 0, 0), 1, !0));
3616
3616
  }
3617
- function ln(t, e, n = 1, r) {
3617
+ function on(t, e, n = 1, r) {
3618
3618
  let u = t.resolve(e), i = u.depth - n, s = r && r[r.length - 1] || u.parent;
3619
3619
  if (i < 0 || u.parent.type.spec.isolating || !u.parent.canReplace(u.index(), u.parent.childCount) || !s.type.validContent(u.parent.content.cutByIndex(u.index(), u.parent.childCount)))
3620
3620
  return !1;
@@ -3668,7 +3668,7 @@ function Pl(t, e, n) {
3668
3668
  let c = t.doc.resolve(e + n);
3669
3669
  fs(t, c.node(), c.before(), o);
3670
3670
  }
3671
- s.inlineContent && qr(t, e + n - 1, s, i.node().contentMatchAt(i.index()), r == null);
3671
+ s.inlineContent && Vr(t, e + n - 1, s, i.node().contentMatchAt(i.index()), r == null);
3672
3672
  let l = t.mapping.slice(o), a = l.map(e - n);
3673
3673
  if (t.step(new W(a, l.map(e + n, -1), D.empty, !0)), r === !0) {
3674
3674
  let c = t.doc.resolve(a);
@@ -3719,7 +3719,7 @@ function ql(t, e, n) {
3719
3719
  }
3720
3720
  return null;
3721
3721
  }
3722
- function Vr(t, e, n = e, r = D.empty) {
3722
+ function $r(t, e, n = e, r = D.empty) {
3723
3723
  if (e == n && !r.size)
3724
3724
  return null;
3725
3725
  let u = t.resolve(e), i = t.resolve(n);
@@ -4035,7 +4035,7 @@ class dt extends J {
4035
4035
  }
4036
4036
  }
4037
4037
  J.jsonID("attr", dt);
4038
- class Pt extends J {
4038
+ class zt extends J {
4039
4039
  /**
4040
4040
  Construct an attribute step.
4041
4041
  */
@@ -4054,7 +4054,7 @@ class Pt extends J {
4054
4054
  return Q.empty;
4055
4055
  }
4056
4056
  invert(e) {
4057
- return new Pt(this.attr, e.attrs[this.attr]);
4057
+ return new zt(this.attr, e.attrs[this.attr]);
4058
4058
  }
4059
4059
  map(e) {
4060
4060
  return this;
@@ -4065,10 +4065,10 @@ class Pt extends J {
4065
4065
  static fromJSON(e, n) {
4066
4066
  if (typeof n.attr != "string")
4067
4067
  throw new RangeError("Invalid input for DocAttrStep.fromJSON");
4068
- return new Pt(n.attr, n.value);
4068
+ return new zt(n.attr, n.value);
4069
4069
  }
4070
4070
  }
4071
- J.jsonID("docAttr", Pt);
4071
+ J.jsonID("docAttr", zt);
4072
4072
  let mt = class extends Error {
4073
4073
  };
4074
4074
  mt = function t(e) {
@@ -4083,7 +4083,7 @@ class Ul {
4083
4083
  Create a transform that starts with the given document.
4084
4084
  */
4085
4085
  constructor(e) {
4086
- this.doc = e, this.steps = [], this.docs = [], this.mapping = new zt();
4086
+ this.doc = e, this.steps = [], this.docs = [], this.mapping = new vt();
4087
4087
  }
4088
4088
  /**
4089
4089
  The starting document.
@@ -4127,7 +4127,7 @@ class Ul {
4127
4127
  given `slice`.
4128
4128
  */
4129
4129
  replace(e, n = e, r = D.empty) {
4130
- let u = Vr(this.doc, e, n, r);
4130
+ let u = $r(this.doc, e, n, r);
4131
4131
  return u && this.step(u), this;
4132
4132
  }
4133
4133
  /**
@@ -4241,7 +4241,7 @@ class Ul {
4241
4241
  Set a single attribute on the document to a new value.
4242
4242
  */
4243
4243
  setDocAttribute(e, n) {
4244
- return this.step(new Pt(e, n)), this;
4244
+ return this.step(new zt(e, n)), this;
4245
4245
  }
4246
4246
  /**
4247
4247
  Add a mark to the node at position `pos`.
@@ -4300,7 +4300,7 @@ class Ul {
4300
4300
  third argument.
4301
4301
  */
4302
4302
  clearIncompatible(e, n, r) {
4303
- return qr(this, e, n, r), this;
4303
+ return Vr(this, e, n, r), this;
4304
4304
  }
4305
4305
  }
4306
4306
  const Hn = /* @__PURE__ */ Object.create(null);
@@ -4376,7 +4376,7 @@ class T {
4376
4376
  let i = e.steps.length, s = this.ranges;
4377
4377
  for (let o = 0; o < s.length; o++) {
4378
4378
  let { $from: l, $to: a } = s[o], c = e.mapping.slice(i);
4379
- e.replaceRange(c.map(l.pos), c.map(a.pos), o ? D.empty : n), o == 0 && Su(e, i, (r ? r.isInline : u && u.isTextblock) ? -1 : 1);
4379
+ e.replaceRange(c.map(l.pos), c.map(a.pos), o ? D.empty : n), o == 0 && Au(e, i, (r ? r.isInline : u && u.isTextblock) ? -1 : 1);
4380
4380
  }
4381
4381
  }
4382
4382
  /**
@@ -4387,7 +4387,7 @@ class T {
4387
4387
  let r = e.steps.length, u = this.ranges;
4388
4388
  for (let i = 0; i < u.length; i++) {
4389
4389
  let { $from: s, $to: o } = u[i], l = e.mapping.slice(r), a = l.map(s.pos), c = l.map(o.pos);
4390
- i ? e.deleteRange(a, c) : (e.replaceRangeWith(a, c, n), Su(e, r, n.isInline ? -1 : 1));
4390
+ i ? e.deleteRange(a, c) : (e.replaceRangeWith(a, c, n), Au(e, r, n.isInline ? -1 : 1));
4391
4391
  }
4392
4392
  }
4393
4393
  /**
@@ -4477,16 +4477,16 @@ class Kl {
4477
4477
  this.$from = e, this.$to = n;
4478
4478
  }
4479
4479
  }
4480
- let _u = !1;
4481
- function Eu(t) {
4482
- !_u && !t.parent.inlineContent && (_u = !0, console.warn("TextSelection endpoint not pointing into a node with inline content (" + t.parent.type.name + ")"));
4480
+ let Eu = !1;
4481
+ function Su(t) {
4482
+ !Eu && !t.parent.inlineContent && (Eu = !0, console.warn("TextSelection endpoint not pointing into a node with inline content (" + t.parent.type.name + ")"));
4483
4483
  }
4484
4484
  class O extends T {
4485
4485
  /**
4486
4486
  Construct a text selection between the given points.
4487
4487
  */
4488
4488
  constructor(e, n = e) {
4489
- Eu(e), Eu(n), super(e, n);
4489
+ Su(e), Su(n), super(e, n);
4490
4490
  }
4491
4491
  /**
4492
4492
  Returns a resolved position if this is a cursor selection (an
@@ -4587,7 +4587,7 @@ class S extends T {
4587
4587
  return { type: "node", anchor: this.anchor };
4588
4588
  }
4589
4589
  getBookmark() {
4590
- return new $r(this.anchor);
4590
+ return new Wr(this.anchor);
4591
4591
  }
4592
4592
  /**
4593
4593
  @internal
@@ -4613,13 +4613,13 @@ class S extends T {
4613
4613
  }
4614
4614
  S.prototype.visible = !1;
4615
4615
  T.jsonID("node", S);
4616
- class $r {
4616
+ class Wr {
4617
4617
  constructor(e) {
4618
4618
  this.anchor = e;
4619
4619
  }
4620
4620
  map(e) {
4621
4621
  let { deleted: n, pos: r } = e.mapResult(this.anchor);
4622
- return n ? new wn(r, r) : new $r(r);
4622
+ return n ? new wn(r, r) : new Wr(r);
4623
4623
  }
4624
4624
  resolve(e) {
4625
4625
  let n = e.resolve(this.anchor), r = n.nodeAfter;
@@ -4686,7 +4686,7 @@ function ct(t, e, n, r, u, i = !1) {
4686
4686
  }
4687
4687
  return null;
4688
4688
  }
4689
- function Su(t, e, n) {
4689
+ function Au(t, e, n) {
4690
4690
  let r = t.steps.length - 1;
4691
4691
  if (r < e)
4692
4692
  return;
@@ -4698,7 +4698,7 @@ function Su(t, e, n) {
4698
4698
  s == null && (s = c);
4699
4699
  }), t.setSelection(T.near(t.doc.resolve(s), n));
4700
4700
  }
4701
- const Au = 1, tn = 2, Mu = 4;
4701
+ const Mu = 1, en = 2, wu = 4;
4702
4702
  class Gl extends Ul {
4703
4703
  /**
4704
4704
  @internal
@@ -4722,19 +4722,19 @@ class Gl extends Ul {
4722
4722
  setSelection(e) {
4723
4723
  if (e.$from.doc != this.doc)
4724
4724
  throw new RangeError("Selection passed to setSelection must point at the current document");
4725
- return this.curSelection = e, this.curSelectionFor = this.steps.length, this.updated = (this.updated | Au) & ~tn, this.storedMarks = null, this;
4725
+ return this.curSelection = e, this.curSelectionFor = this.steps.length, this.updated = (this.updated | Mu) & ~en, this.storedMarks = null, this;
4726
4726
  }
4727
4727
  /**
4728
4728
  Whether the selection was explicitly updated by this transaction.
4729
4729
  */
4730
4730
  get selectionSet() {
4731
- return (this.updated & Au) > 0;
4731
+ return (this.updated & Mu) > 0;
4732
4732
  }
4733
4733
  /**
4734
4734
  Set the current stored marks.
4735
4735
  */
4736
4736
  setStoredMarks(e) {
4737
- return this.storedMarks = e, this.updated |= tn, this;
4737
+ return this.storedMarks = e, this.updated |= en, this;
4738
4738
  }
4739
4739
  /**
4740
4740
  Make sure the current stored marks or, if that is null, the marks
@@ -4760,13 +4760,13 @@ class Gl extends Ul {
4760
4760
  Whether the stored marks were explicitly set for this transaction.
4761
4761
  */
4762
4762
  get storedMarksSet() {
4763
- return (this.updated & tn) > 0;
4763
+ return (this.updated & en) > 0;
4764
4764
  }
4765
4765
  /**
4766
4766
  @internal
4767
4767
  */
4768
4768
  addStep(e, n) {
4769
- super.addStep(e, n), this.updated = this.updated & ~tn, this.storedMarks = null;
4769
+ super.addStep(e, n), this.updated = this.updated & ~en, this.storedMarks = null;
4770
4770
  }
4771
4771
  /**
4772
4772
  Update the timestamp for the transaction.
@@ -4841,21 +4841,21 @@ class Gl extends Ul {
4841
4841
  when updated to the state produced by this transaction.
4842
4842
  */
4843
4843
  scrollIntoView() {
4844
- return this.updated |= Mu, this;
4844
+ return this.updated |= wu, this;
4845
4845
  }
4846
4846
  /**
4847
4847
  True when this transaction has had `scrollIntoView` called on it.
4848
4848
  */
4849
4849
  get scrolledIntoView() {
4850
- return (this.updated & Mu) > 0;
4850
+ return (this.updated & wu) > 0;
4851
4851
  }
4852
4852
  }
4853
- function wu(t, e) {
4853
+ function Tu(t, e) {
4854
4854
  return !e || !t ? t : t.bind(e);
4855
4855
  }
4856
4856
  class wt {
4857
4857
  constructor(e, n, r) {
4858
- this.name = e, this.init = wu(n.init, r), this.apply = wu(n.apply, r);
4858
+ this.name = e, this.init = Tu(n.init, r), this.apply = Tu(n.apply, r);
4859
4859
  }
4860
4860
  }
4861
4861
  const Yl = [
@@ -5073,7 +5073,7 @@ function bs(t, e, n) {
5073
5073
  }
5074
5074
  return n;
5075
5075
  }
5076
- class Wr {
5076
+ class Hr {
5077
5077
  /**
5078
5078
  Create a plugin.
5079
5079
  */
@@ -5131,7 +5131,7 @@ const Ql = (t, e, n) => {
5131
5131
  return !0;
5132
5132
  if (r.parent.content.size == 0 && (gt(i, "end") || S.isSelectable(i)))
5133
5133
  for (let s = r.depth; ; s--) {
5134
- let o = Vr(t.doc, r.before(s), r.after(s), D.empty);
5134
+ let o = $r(t.doc, r.before(s), r.after(s), D.empty);
5135
5135
  if (o && o.slice.size < o.to - o.from) {
5136
5136
  if (e) {
5137
5137
  let l = t.tr.step(o);
@@ -5190,7 +5190,7 @@ const na = (t, e, n) => {
5190
5190
  if (_s(t, u, e, 1))
5191
5191
  return !0;
5192
5192
  if (r.parent.content.size == 0 && (gt(i, "start") || S.isSelectable(i))) {
5193
- let s = Vr(t.doc, r.before(), r.after(), D.empty);
5193
+ let s = $r(t.doc, r.before(), r.after(), D.empty);
5194
5194
  if (s && s.slice.size < s.to - s.from) {
5195
5195
  if (e) {
5196
5196
  let o = t.tr.step(s);
@@ -5231,7 +5231,7 @@ const ua = (t, e) => {
5231
5231
  return !n.parent.type.spec.code || !n.sameParent(r) ? !1 : (e && e(t.tr.insertText(`
5232
5232
  `).scrollIntoView()), !0);
5233
5233
  };
5234
- function Hr(t) {
5234
+ function Jr(t) {
5235
5235
  for (let e = 0; e < t.edgeCount; e++) {
5236
5236
  let { type: n } = t.edge(e);
5237
5237
  if (n.isTextblock && !n.hasRequiredAttrs())
@@ -5243,7 +5243,7 @@ const sa = (t, e) => {
5243
5243
  let { $head: n, $anchor: r } = t.selection;
5244
5244
  if (!n.parent.type.spec.code || !n.sameParent(r))
5245
5245
  return !1;
5246
- let u = n.node(-1), i = n.indexAfter(-1), s = Hr(u.contentMatchAt(i));
5246
+ let u = n.node(-1), i = n.indexAfter(-1), s = Jr(u.contentMatchAt(i));
5247
5247
  if (!s || !u.canReplaceWith(i, i, s))
5248
5248
  return !1;
5249
5249
  if (e) {
@@ -5255,7 +5255,7 @@ const sa = (t, e) => {
5255
5255
  let n = t.selection, { $from: r, $to: u } = n;
5256
5256
  if (n instanceof te || r.parent.inlineContent || u.parent.inlineContent)
5257
5257
  return !1;
5258
- let i = Hr(u.parent.contentMatchAt(u.indexAfter()));
5258
+ let i = Jr(u.parent.contentMatchAt(u.indexAfter()));
5259
5259
  if (!i || !i.isTextblock)
5260
5260
  return !1;
5261
5261
  if (e) {
@@ -5269,7 +5269,7 @@ const sa = (t, e) => {
5269
5269
  return !1;
5270
5270
  if (n.depth > 1 && n.after() != n.end(-1)) {
5271
5271
  let i = n.before();
5272
- if (ln(t.doc, i))
5272
+ if (on(t.doc, i))
5273
5273
  return e && e(t.tr.split(i).scrollIntoView()), !0;
5274
5274
  }
5275
5275
  let r = n.blockRange(), u = r && Mn(r);
@@ -5279,13 +5279,13 @@ function aa(t) {
5279
5279
  return (e, n) => {
5280
5280
  let { $from: r, $to: u } = e.selection;
5281
5281
  if (e.selection instanceof S && e.selection.node.isBlock)
5282
- return !r.parentOffset || !ln(e.doc, r.pos) ? !1 : (n && n(e.tr.split(r.pos).scrollIntoView()), !0);
5282
+ return !r.parentOffset || !on(e.doc, r.pos) ? !1 : (n && n(e.tr.split(r.pos).scrollIntoView()), !0);
5283
5283
  if (!r.depth)
5284
5284
  return !1;
5285
5285
  let i = [], s, o, l = !1, a = !1;
5286
5286
  for (let h = r.depth; ; h--)
5287
5287
  if (r.node(h).isBlock) {
5288
- l = r.end(h) == r.pos + (r.depth - h), a = r.start(h) == r.pos - (r.depth - h), o = Hr(r.node(h - 1).contentMatchAt(r.indexAfter(h - 1))), i.unshift(l && o ? { type: o } : null), s = h;
5288
+ l = r.end(h) == r.pos + (r.depth - h), a = r.start(h) == r.pos - (r.depth - h), o = Jr(r.node(h - 1).contentMatchAt(r.indexAfter(h - 1))), i.unshift(l && o ? { type: o } : null), s = h;
5289
5289
  break;
5290
5290
  } else {
5291
5291
  if (h == 1)
@@ -5294,8 +5294,8 @@ function aa(t) {
5294
5294
  }
5295
5295
  let c = e.tr;
5296
5296
  (e.selection instanceof O || e.selection instanceof te) && c.deleteSelection();
5297
- let f = c.mapping.map(r.pos), p = ln(c.doc, f, i.length, i);
5298
- if (p || (i[0] = o ? { type: o } : null, p = ln(c.doc, f, i.length, i)), !p)
5297
+ let f = c.mapping.map(r.pos), p = on(c.doc, f, i.length, i);
5298
+ if (p || (i[0] = o ? { type: o } : null, p = on(c.doc, f, i.length, i)), !p)
5299
5299
  return !1;
5300
5300
  if (c.split(f, i.length, i), !l && a && r.node(s).type != o) {
5301
5301
  let h = c.mapping.map(r.before(s)), d = c.doc.resolve(h);
@@ -5366,7 +5366,7 @@ function ma(t, e = null) {
5366
5366
  return o ? (r && r(n.tr.wrap(s, o).scrollIntoView()), !0) : !1;
5367
5367
  };
5368
5368
  }
5369
- function Dr(t, e = null) {
5369
+ function _r(t, e = null) {
5370
5370
  return function(n, r) {
5371
5371
  let u = !1;
5372
5372
  for (let i = 0; i < n.selection.ranges.length && !u; i++) {
@@ -5408,7 +5408,7 @@ function ga(t, e, n, r) {
5408
5408
  }
5409
5409
  return !1;
5410
5410
  }
5411
- function an(t, e = null, n) {
5411
+ function ln(t, e = null, n) {
5412
5412
  return function(r, u) {
5413
5413
  let { empty: i, $cursor: s, ranges: o } = r.selection;
5414
5414
  if (i && !s || !ga(r.doc, o, t))
@@ -5433,7 +5433,7 @@ function an(t, e = null, n) {
5433
5433
  return !0;
5434
5434
  };
5435
5435
  }
5436
- function Jr(...t) {
5436
+ function jr(...t) {
5437
5437
  return function(e, n, r) {
5438
5438
  for (let u = 0; u < t.length; u++)
5439
5439
  if (t[u](e, n, r))
@@ -5441,15 +5441,15 @@ function Jr(...t) {
5441
5441
  return !1;
5442
5442
  };
5443
5443
  }
5444
- let Un = Jr(ys, Ql, ea), Tu = Jr(ys, na, ra);
5444
+ let Un = jr(ys, Ql, ea), Ou = jr(ys, na, ra);
5445
5445
  const Se = {
5446
- Enter: Jr(ia, oa, la, ca),
5446
+ Enter: jr(ia, oa, la, ca),
5447
5447
  "Mod-Enter": sa,
5448
5448
  Backspace: Un,
5449
5449
  "Mod-Backspace": Un,
5450
5450
  "Shift-Backspace": Un,
5451
- Delete: Tu,
5452
- "Mod-Delete": Tu,
5451
+ Delete: Ou,
5452
+ "Mod-Delete": Ou,
5453
5453
  "Mod-a": fa
5454
5454
  }, Ss = {
5455
5455
  "Ctrl-h": Se.Backspace,
@@ -5496,7 +5496,7 @@ function Ms(t, e) {
5496
5496
  }
5497
5497
  }), s;
5498
5498
  }
5499
- function cn(t, e, n) {
5499
+ function an(t, e, n) {
5500
5500
  return t.map(() => {
5501
5501
  const r = e.value, u = r.state.schema.marks[n];
5502
5502
  return As(r.state, u);
@@ -5527,7 +5527,7 @@ function he({
5527
5527
  icon: i,
5528
5528
  size: s
5529
5529
  }) {
5530
- return It(
5530
+ return Sn(
5531
5531
  e,
5532
5532
  () => Li(
5533
5533
  {
@@ -5593,7 +5593,7 @@ function _a({
5593
5593
  // linkDialogRemoveLink,
5594
5594
  size: i
5595
5595
  }) {
5596
- const s = Bi(null);
5596
+ const s = vi(null);
5597
5597
  s.on((l) => {
5598
5598
  l != null && Ca(e.value, l);
5599
5599
  });
@@ -5604,12 +5604,12 @@ function _a({
5604
5604
  );
5605
5605
  l != null ? s.set(l.attrs.href ?? "") : s.set(null);
5606
5606
  });
5607
- return vi(
5607
+ return zi(
5608
5608
  mr(o),
5609
5609
  qi(
5610
5610
  he({
5611
5611
  display: br(!0),
5612
- active: cn(t, e, "link"),
5612
+ active: an(t, e, "link"),
5613
5613
  disabled: n,
5614
5614
  label: r,
5615
5615
  icon: "mdi:link-variant",
@@ -5652,11 +5652,11 @@ function _a({
5652
5652
  )
5653
5653
  );
5654
5654
  }
5655
- function nn({
5655
+ function tn({
5656
5656
  display: t
5657
5657
  }, ...e) {
5658
- return It(
5659
- zi(...t)((...n) => n.some(Boolean)),
5658
+ return Sn(
5659
+ xr(...t)((...n) => n.some(Boolean)),
5660
5660
  () => qi(...e)
5661
5661
  );
5662
5662
  }
@@ -5673,10 +5673,10 @@ function Ea({
5673
5673
  const o = s.$.prosemirror, l = i;
5674
5674
  return Jo(
5675
5675
  // Text formatting group
5676
- nn(
5676
+ tn(
5677
5677
  { display: [n.$.bold, n.$.italic, n.$.code] },
5678
5678
  he({
5679
- active: cn(e, l, "strong"),
5679
+ active: an(e, l, "strong"),
5680
5680
  display: n.$.bold,
5681
5681
  onClick: () => Kn(l.value, "strong"),
5682
5682
  disabled: r,
@@ -5685,7 +5685,7 @@ function Ea({
5685
5685
  size: u
5686
5686
  }),
5687
5687
  he({
5688
- active: cn(e, l, "em"),
5688
+ active: an(e, l, "em"),
5689
5689
  display: n.$.italic,
5690
5690
  onClick: () => Kn(l.value, "em"),
5691
5691
  disabled: r,
@@ -5694,7 +5694,7 @@ function Ea({
5694
5694
  size: u
5695
5695
  }),
5696
5696
  he({
5697
- active: cn(e, l, "code"),
5697
+ active: an(e, l, "code"),
5698
5698
  display: n.$.code,
5699
5699
  onClick: () => Kn(l.value, "code"),
5700
5700
  disabled: r,
@@ -5704,7 +5704,7 @@ function Ea({
5704
5704
  })
5705
5705
  ),
5706
5706
  // Headings group
5707
- nn(
5707
+ tn(
5708
5708
  { display: [n.$.headings] },
5709
5709
  $o(
5710
5710
  n.$.headerLevels.map(
@@ -5724,12 +5724,12 @@ function Ea({
5724
5724
  )
5725
5725
  ),
5726
5726
  // Lists group
5727
- nn(
5727
+ tn(
5728
5728
  { display: [n.$.bulletList, n.$.orderedList] },
5729
5729
  he({
5730
5730
  active: _t(e, l, "bullet_list"),
5731
5731
  display: n.$.bulletList,
5732
- onClick: () => Ou(l.value, "bullet_list"),
5732
+ onClick: () => Fu(l.value, "bullet_list"),
5733
5733
  disabled: r,
5734
5734
  label: o.$.bulletList,
5735
5735
  icon: "mdi:format-list-bulleted",
@@ -5738,7 +5738,7 @@ function Ea({
5738
5738
  he({
5739
5739
  active: _t(e, l, "ordered_list"),
5740
5740
  display: n.$.orderedList,
5741
- onClick: () => Ou(l.value, "ordered_list"),
5741
+ onClick: () => Fu(l.value, "ordered_list"),
5742
5742
  disabled: r,
5743
5743
  label: o.$.orderedList,
5744
5744
  icon: "mdi:format-list-numbered",
@@ -5746,7 +5746,7 @@ function Ea({
5746
5746
  })
5747
5747
  ),
5748
5748
  // Block formatting group
5749
- nn(
5749
+ tn(
5750
5750
  {
5751
5751
  display: [
5752
5752
  n.$.blockquote,
@@ -5782,7 +5782,7 @@ function Ea({
5782
5782
  size: u
5783
5783
  })
5784
5784
  ),
5785
- It(
5785
+ Sn(
5786
5786
  n.$.links,
5787
5787
  () => _a({
5788
5788
  stateUpdate: e,
@@ -5803,14 +5803,14 @@ function Ea({
5803
5803
  }
5804
5804
  function Kn(t, e) {
5805
5805
  const n = t.state.schema.marks[e];
5806
- n != null && (an(n)(t.state, t.dispatch), t.focus());
5806
+ n != null && (ln(n)(t.state, t.dispatch), t.focus());
5807
5807
  }
5808
5808
  function Sa(t, e) {
5809
5809
  const n = t.state.schema.nodes.heading;
5810
- n != null && (Dr(n, { level: e })(t.state, t.dispatch), t.focus());
5810
+ n != null && (_r(n, { level: e })(t.state, t.dispatch), t.focus());
5811
5811
  }
5812
- async function Ou(t, e) {
5813
- const { wrapInList: n, liftListItem: r } = await import("./index-CdyjO-u1.js"), u = t.state.schema.nodes[e], i = t.state.schema.nodes.list_item;
5812
+ async function Fu(t, e) {
5813
+ const { wrapInList: n, liftListItem: r } = await import("./index-GLoRnI6r.js"), u = t.state.schema.nodes[e], i = t.state.schema.nodes.list_item;
5814
5814
  if (u == null || i == null) return;
5815
5815
  const { state: s } = t, { $from: o } = s.selection;
5816
5816
  let l = null;
@@ -5845,7 +5845,7 @@ function Ma(t) {
5845
5845
  i = !0;
5846
5846
  break;
5847
5847
  }
5848
- i ? Dr(n)(r, t.dispatch) : Dr(e)(r, t.dispatch), t.focus();
5848
+ i ? _r(n)(r, t.dispatch) : _r(e)(r, t.dispatch), t.focus();
5849
5849
  }
5850
5850
  function wa(t) {
5851
5851
  const e = t.state.schema.nodes.horizontal_rule;
@@ -5862,22 +5862,22 @@ const q = function(t) {
5862
5862
  let e = t.assignedSlot || t.parentNode;
5863
5863
  return e && e.nodeType == 11 ? e.host : e;
5864
5864
  };
5865
- let _r = null;
5865
+ let Er = null;
5866
5866
  const Ee = function(t, e, n) {
5867
- let r = _r || (_r = document.createRange());
5867
+ let r = Er || (Er = document.createRange());
5868
5868
  return r.setEnd(t, n ?? t.nodeValue.length), r.setStart(t, e || 0), r;
5869
5869
  }, Ta = function() {
5870
- _r = null;
5870
+ Er = null;
5871
5871
  }, ut = function(t, e, n, r) {
5872
- return n && (Fu(t, e, n, r, -1) || Fu(t, e, n, r, 1));
5872
+ return n && (Nu(t, e, n, r, -1) || Nu(t, e, n, r, 1));
5873
5873
  }, Oa = /^(img|br|input|textarea|hr)$/i;
5874
- function Fu(t, e, n, r, u) {
5874
+ function Nu(t, e, n, r, u) {
5875
5875
  for (var i; ; ) {
5876
5876
  if (t == n && e == r)
5877
5877
  return !0;
5878
5878
  if (e == (u < 0 ? 0 : ie(t))) {
5879
5879
  let s = t.parentNode;
5880
- if (!s || s.nodeType != 1 || jt(t) || Oa.test(t.nodeName) || t.contentEditable == "false")
5880
+ if (!s || s.nodeType != 1 || Jt(t) || Oa.test(t.nodeName) || t.contentEditable == "false")
5881
5881
  return !1;
5882
5882
  e = q(t) + (u < 0 ? 0 : 1), t = s;
5883
5883
  } else if (t.nodeType == 1) {
@@ -5904,7 +5904,7 @@ function Fa(t, e) {
5904
5904
  if (t.contentEditable == "false")
5905
5905
  return null;
5906
5906
  t = t.childNodes[e - 1], e = ie(t);
5907
- } else if (t.parentNode && !jt(t))
5907
+ } else if (t.parentNode && !Jt(t))
5908
5908
  e = q(t), t = t.parentNode;
5909
5909
  else
5910
5910
  return null;
@@ -5918,7 +5918,7 @@ function Na(t, e) {
5918
5918
  if (t.contentEditable == "false")
5919
5919
  return null;
5920
5920
  t = t.childNodes[e], e = 0;
5921
- } else if (t.parentNode && !jt(t))
5921
+ } else if (t.parentNode && !Jt(t))
5922
5922
  e = q(t) + 1, t = t.parentNode;
5923
5923
  else
5924
5924
  return null;
@@ -5934,7 +5934,7 @@ function Ia(t, e, n) {
5934
5934
  r = r && i == 0, u = u && i == ie(t);
5935
5935
  }
5936
5936
  }
5937
- function jt(t) {
5937
+ function Jt(t) {
5938
5938
  let e;
5939
5939
  for (let n = t; n && !(e = n.pmViewDesc); n = n.parentNode)
5940
5940
  ;
@@ -5967,9 +5967,9 @@ function Ba(t, e, n) {
5967
5967
  return { node: r.startContainer, offset: Math.min(ie(r.startContainer), r.startOffset) };
5968
5968
  }
5969
5969
  }
5970
- const ke = typeof navigator < "u" ? navigator : null, Nu = typeof document < "u" ? document : null, He = ke && ke.userAgent || "", Er = /Edge\/(\d+)/.exec(He), Os = /MSIE \d/.exec(He), Sr = /Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(He), G = !!(Os || Sr || Er), Le = Os ? document.documentMode : Sr ? +Sr[1] : Er ? +Er[1] : 0, se = !G && /gecko\/(\d+)/i.test(He);
5970
+ const ke = typeof navigator < "u" ? navigator : null, Iu = typeof document < "u" ? document : null, He = ke && ke.userAgent || "", Sr = /Edge\/(\d+)/.exec(He), Os = /MSIE \d/.exec(He), Ar = /Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(He), G = !!(Os || Ar || Sr), Le = Os ? document.documentMode : Ar ? +Ar[1] : Sr ? +Sr[1] : 0, se = !G && /gecko\/(\d+)/i.test(He);
5971
5971
  se && +(/Firefox\/(\d+)/.exec(He) || [0, 0])[1];
5972
- const Ar = !G && /Chrome\/(\d+)/.exec(He), H = !!Ar, Fs = Ar ? +Ar[1] : 0, U = !G && !!ke && /Apple Computer/.test(ke.vendor), xt = U && (/Mobile\/\w+/.test(He) || !!ke && ke.maxTouchPoints > 2), ue = xt || (ke ? /Mac/.test(ke.platform) : !1), va = ke ? /Win/.test(ke.platform) : !1, Ae = /Android \d/.test(He), Ut = !!Nu && "webkitFontSmoothing" in Nu.documentElement.style, za = Ut ? +(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent) || [0, 0])[1] : 0;
5972
+ const Mr = !G && /Chrome\/(\d+)/.exec(He), H = !!Mr, Fs = Mr ? +Mr[1] : 0, U = !G && !!ke && /Apple Computer/.test(ke.vendor), xt = U && (/Mobile\/\w+/.test(He) || !!ke && ke.maxTouchPoints > 2), ue = xt || (ke ? /Mac/.test(ke.platform) : !1), va = ke ? /Win/.test(ke.platform) : !1, Ae = /Android \d/.test(He), jt = !!Iu && "webkitFontSmoothing" in Iu.documentElement.style, za = jt ? +(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent) || [0, 0])[1] : 0;
5973
5973
  function Pa(t) {
5974
5974
  let e = t.defaultView && t.defaultView.visualViewport;
5975
5975
  return e ? {
@@ -5996,7 +5996,7 @@ function La(t) {
5996
5996
  bottom: e.top + t.clientHeight * r
5997
5997
  };
5998
5998
  }
5999
- function Iu(t, e, n) {
5999
+ function Ru(t, e, n) {
6000
6000
  let r = t.someProp("scrollThreshold") || 0, u = t.someProp("scrollMargin") || 5, i = t.dom.ownerDocument;
6001
6001
  for (let s = n || t.dom; s; ) {
6002
6002
  if (s.nodeType != 1) {
@@ -6095,12 +6095,12 @@ function Wa(t, e) {
6095
6095
  for (let u = 0; u < n; u++) {
6096
6096
  r.setEnd(t, u + 1), r.setStart(t, u);
6097
6097
  let i = Te(r, 1);
6098
- if (i.top != i.bottom && jr(e, i))
6098
+ if (i.top != i.bottom && Ur(e, i))
6099
6099
  return { node: t, offset: u + (e.left >= (i.left + i.right) / 2 ? 1 : 0) };
6100
6100
  }
6101
6101
  return { node: t, offset: 0 };
6102
6102
  }
6103
- function jr(t, e) {
6103
+ function Ur(t, e) {
6104
6104
  return t.left >= e.left - 1 && t.left <= e.right + 1 && t.top >= e.top - 1 && t.top <= e.bottom + 1;
6105
6105
  }
6106
6106
  function Ha(t, e) {
@@ -6137,7 +6137,7 @@ function Bs(t, e, n) {
6137
6137
  let o = s.getClientRects();
6138
6138
  for (let l = 0; l < o.length; l++) {
6139
6139
  let a = o[l];
6140
- if (jr(e, a))
6140
+ if (Ur(e, a))
6141
6141
  return Bs(s, e, a);
6142
6142
  }
6143
6143
  }
@@ -6152,7 +6152,7 @@ function Ua(t, e) {
6152
6152
  let s = (t.root.elementFromPoint ? t.root : n).elementFromPoint(e.left, e.top), o;
6153
6153
  if (!s || !t.dom.contains(s.nodeType != 1 ? s.parentNode : s)) {
6154
6154
  let a = t.dom.getBoundingClientRect();
6155
- if (!jr(e, a) || (s = Bs(t.dom, e, a), !s))
6155
+ if (!Ur(e, a) || (s = Bs(t.dom, e, a), !s))
6156
6156
  return null;
6157
6157
  }
6158
6158
  if (U)
@@ -6164,27 +6164,27 @@ function Ua(t, e) {
6164
6164
  c.nodeName == "IMG" && (f = c.getBoundingClientRect()).right <= e.left && f.bottom > e.top && u++;
6165
6165
  }
6166
6166
  let a;
6167
- Ut && u && r.nodeType == 1 && (a = r.childNodes[u - 1]).nodeType == 1 && a.contentEditable == "false" && a.getBoundingClientRect().top >= e.top && u--, r == t.dom && u == r.childNodes.length - 1 && r.lastChild.nodeType == 1 && e.top > r.lastChild.getBoundingClientRect().bottom ? o = t.state.doc.content.size : (u == 0 || r.nodeType != 1 || r.childNodes[u - 1].nodeName != "BR") && (o = ja(t, r, u, e));
6167
+ jt && u && r.nodeType == 1 && (a = r.childNodes[u - 1]).nodeType == 1 && a.contentEditable == "false" && a.getBoundingClientRect().top >= e.top && u--, r == t.dom && u == r.childNodes.length - 1 && r.lastChild.nodeType == 1 && e.top > r.lastChild.getBoundingClientRect().bottom ? o = t.state.doc.content.size : (u == 0 || r.nodeType != 1 || r.childNodes[u - 1].nodeName != "BR") && (o = ja(t, r, u, e));
6168
6168
  }
6169
6169
  o == null && (o = Ja(t, s, e));
6170
6170
  let l = t.docView.nearestDesc(s, !0);
6171
6171
  return { pos: o, inside: l ? l.posAtStart - l.border : -1 };
6172
6172
  }
6173
- function Ru(t) {
6173
+ function Bu(t) {
6174
6174
  return t.top < t.bottom || t.left < t.right;
6175
6175
  }
6176
6176
  function Te(t, e) {
6177
6177
  let n = t.getClientRects();
6178
6178
  if (n.length) {
6179
6179
  let r = n[e < 0 ? 0 : n.length - 1];
6180
- if (Ru(r))
6180
+ if (Bu(r))
6181
6181
  return r;
6182
6182
  }
6183
- return Array.prototype.find.call(n, Ru) || t.getBoundingClientRect();
6183
+ return Array.prototype.find.call(n, Bu) || t.getBoundingClientRect();
6184
6184
  }
6185
6185
  const Ka = /[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;
6186
6186
  function vs(t, e, n) {
6187
- let { node: r, offset: u, atom: i } = t.docView.domFromPos(e, n < 0 ? -1 : 1), s = Ut || se;
6187
+ let { node: r, offset: u, atom: i } = t.docView.domFromPos(e, n < 0 ? -1 : 1), s = jt || se;
6188
6188
  if (r.nodeType == 3)
6189
6189
  if (s && (Ka.test(r.nodeValue) || (n < 0 ? !u : u == r.nodeValue.length))) {
6190
6190
  let l = Te(Ee(r, u, u), n);
@@ -6299,12 +6299,12 @@ function Ya(t, e, n) {
6299
6299
  return p != null && (o.caretBidiLevel = p), g;
6300
6300
  }) : r.pos == r.start() || r.pos == r.end();
6301
6301
  }
6302
- let Bu = null, vu = null, zu = !1;
6302
+ let vu = null, zu = null, Pu = !1;
6303
6303
  function Xa(t, e, n) {
6304
- return Bu == e && vu == n ? zu : (Bu = e, vu = n, zu = n == "up" || n == "down" ? Za(t, e, n) : Ya(t, e, n));
6304
+ return vu == e && zu == n ? Pu : (vu = e, zu = n, Pu = n == "up" || n == "down" ? Za(t, e, n) : Ya(t, e, n));
6305
6305
  }
6306
- const oe = 0, Pu = 1, Ze = 2, ye = 3;
6307
- class Kt {
6306
+ const oe = 0, Lu = 1, Ze = 2, ye = 3;
6307
+ class Ut {
6308
6308
  constructor(e, n, r, u) {
6309
6309
  this.parent = e, this.children = n, this.dom = r, this.contentDOM = u, this.dirty = oe, r.pmViewDesc = this;
6310
6310
  }
@@ -6619,7 +6619,7 @@ class Kt {
6619
6619
  if (r == s ? e <= s && n >= r : e < s && n > r) {
6620
6620
  let o = r + i.border, l = s - i.border;
6621
6621
  if (e >= o && n <= l) {
6622
- this.dirty = e == r || n == s ? Ze : Pu, e == o && n == l && (i.contentLost || i.dom.parentNode != this.contentDOM) ? i.dirty = ye : i.markDirty(e - o, n - o);
6622
+ this.dirty = e == r || n == s ? Ze : Lu, e == o && n == l && (i.contentLost || i.dom.parentNode != this.contentDOM) ? i.dirty = ye : i.markDirty(e - o, n - o);
6623
6623
  return;
6624
6624
  } else
6625
6625
  i.dirty = i.dom == i.contentDOM && i.dom.parentNode == this.contentDOM && !i.children.length ? Ze : ye;
@@ -6631,7 +6631,7 @@ class Kt {
6631
6631
  markParentsDirty() {
6632
6632
  let e = 1;
6633
6633
  for (let n = this.parent; n; n = n.parent, e++) {
6634
- let r = e == 1 ? Ze : Pu;
6634
+ let r = e == 1 ? Ze : Lu;
6635
6635
  n.dirty < r && (n.dirty = r);
6636
6636
  }
6637
6637
  }
@@ -6648,7 +6648,7 @@ class Kt {
6648
6648
  return !1;
6649
6649
  }
6650
6650
  }
6651
- class Ps extends Kt {
6651
+ class Ps extends Ut {
6652
6652
  constructor(e, n, r, u) {
6653
6653
  let i, s = n.type.toDOM;
6654
6654
  if (typeof s == "function" && (s = s(r, () => {
@@ -6691,7 +6691,7 @@ class Ps extends Kt {
6691
6691
  return this.widget.type.side;
6692
6692
  }
6693
6693
  }
6694
- class Qa extends Kt {
6694
+ class Qa extends Ut {
6695
6695
  constructor(e, n, r, u) {
6696
6696
  super(e, [], n, null), this.textDOM = r, this.text = u;
6697
6697
  }
@@ -6708,7 +6708,7 @@ class Qa extends Kt {
6708
6708
  return e.type === "characterData" && e.target.nodeValue == e.oldValue;
6709
6709
  }
6710
6710
  }
6711
- class it extends Kt {
6711
+ class it extends Ut {
6712
6712
  constructor(e, n, r, u, i) {
6713
6713
  super(e, [], r, u), this.mark = n, this.spec = i;
6714
6714
  }
@@ -6732,7 +6732,7 @@ class it extends Kt {
6732
6732
  }
6733
6733
  slice(e, n, r) {
6734
6734
  let u = it.create(this.parent, this.mark, !0, r), i = this.children, s = this.size;
6735
- n < s && (i = wr(i, n, s, r)), e > 0 && (i = wr(i, 0, e, r));
6735
+ n < s && (i = Tr(i, n, s, r)), e > 0 && (i = Tr(i, 0, e, r));
6736
6736
  for (let o = 0; o < i.length; o++)
6737
6737
  i[o].parent = u;
6738
6738
  return u.children = i, u;
@@ -6744,7 +6744,7 @@ class it extends Kt {
6744
6744
  this.spec.destroy && this.spec.destroy(), super.destroy();
6745
6745
  }
6746
6746
  }
6747
- class qe extends Kt {
6747
+ class qe extends Ut {
6748
6748
  constructor(e, n, r, u, i, s, o, l, a) {
6749
6749
  super(e, [], i, s), this.node = n, this.outerDeco = r, this.innerDeco = u, this.nodeDOM = o;
6750
6750
  }
@@ -6795,7 +6795,7 @@ class qe extends Kt {
6795
6795
  return e;
6796
6796
  }
6797
6797
  matchesNode(e, n, r) {
6798
- return this.dirty == oe && e.eq(this.node) && gn(n, this.outerDeco) && r.eq(this.innerDeco);
6798
+ return this.dirty == oe && e.eq(this.node) && mn(n, this.outerDeco) && r.eq(this.innerDeco);
6799
6799
  }
6800
6800
  get size() {
6801
6801
  return this.node.nodeSize;
@@ -6842,7 +6842,7 @@ class qe extends Kt {
6842
6842
  i.pmViewDesc && (i.pmViewDesc = void 0);
6843
6843
  }
6844
6844
  let s = new Qa(this, i, n, u);
6845
- e.input.compositionNodes.push(s), this.children = wr(this.children, r, r + u.length, e, s);
6845
+ e.input.compositionNodes.push(s), this.children = Tr(this.children, r, r + u.length, e, s);
6846
6846
  }
6847
6847
  // If this desc must be updated to match the given node decoration,
6848
6848
  // do so and return true.
@@ -6853,10 +6853,10 @@ class qe extends Kt {
6853
6853
  this.updateOuterDeco(n), this.node = e, this.innerDeco = r, this.contentDOM && this.updateChildren(u, this.posAtStart), this.dirty = oe;
6854
6854
  }
6855
6855
  updateOuterDeco(e) {
6856
- if (gn(e, this.outerDeco))
6856
+ if (mn(e, this.outerDeco))
6857
6857
  return;
6858
6858
  let n = this.nodeDOM.nodeType != 1, r = this.dom;
6859
- this.dom = Vs(this.dom, this.nodeDOM, Mr(this.outerDeco, this.node, n), Mr(e, this.node, n)), this.dom != r && (r.pmViewDesc = void 0, this.dom.pmViewDesc = this), this.outerDeco = e;
6859
+ this.dom = Vs(this.dom, this.nodeDOM, wr(this.outerDeco, this.node, n), wr(e, this.node, n)), this.dom != r && (r.pmViewDesc = void 0, this.dom.pmViewDesc = this), this.outerDeco = e;
6860
6860
  }
6861
6861
  // Mark this node as being the selected node.
6862
6862
  selectNode() {
@@ -6870,7 +6870,7 @@ class qe extends Kt {
6870
6870
  return this.node.isAtom;
6871
6871
  }
6872
6872
  }
6873
- function Lu(t, e, n, r, u) {
6873
+ function qu(t, e, n, r, u) {
6874
6874
  $s(r, e, t);
6875
6875
  let i = new qe(void 0, t, e, n, r, r, r, u, 0);
6876
6876
  return i.contentDOM && i.updateChildren(u, 0), i;
@@ -6918,7 +6918,7 @@ class On extends qe {
6918
6918
  return this.node.text == e;
6919
6919
  }
6920
6920
  }
6921
- class Ls extends Kt {
6921
+ class Ls extends Ut {
6922
6922
  parseRule() {
6923
6923
  return { ignore: !0 };
6924
6924
  }
@@ -6972,7 +6972,7 @@ function qs(t, e, n) {
6972
6972
  let s = e[i], o = s.dom;
6973
6973
  if (o.parentNode == t) {
6974
6974
  for (; o != r; )
6975
- r = qu(r), u = !0;
6975
+ r = Vu(r), u = !0;
6976
6976
  r = r.nextSibling;
6977
6977
  } else
6978
6978
  u = !0, t.insertBefore(o, r);
@@ -6982,7 +6982,7 @@ function qs(t, e, n) {
6982
6982
  }
6983
6983
  }
6984
6984
  for (; r; )
6985
- r = qu(r), u = !0;
6985
+ r = Vu(r), u = !0;
6986
6986
  u && n.trackWrites == t && (n.trackWrites = null);
6987
6987
  }
6988
6988
  const Ft = function(t) {
@@ -6990,7 +6990,7 @@ const Ft = function(t) {
6990
6990
  };
6991
6991
  Ft.prototype = /* @__PURE__ */ Object.create(null);
6992
6992
  const Ge = [new Ft()];
6993
- function Mr(t, e, n) {
6993
+ function wr(t, e, n) {
6994
6994
  if (t.length == 0)
6995
6995
  return Ge;
6996
6996
  let r = n ? Ge[0] : new Ft(), u = [r];
@@ -7043,9 +7043,9 @@ function tc(t, e, n) {
7043
7043
  }
7044
7044
  }
7045
7045
  function $s(t, e, n) {
7046
- return Vs(t, t, Ge, Mr(e, n, t.nodeType != 1));
7046
+ return Vs(t, t, Ge, wr(e, n, t.nodeType != 1));
7047
7047
  }
7048
- function gn(t, e) {
7048
+ function mn(t, e) {
7049
7049
  if (t.length != e.length)
7050
7050
  return !1;
7051
7051
  for (let n = 0; n < t.length; n++)
@@ -7053,7 +7053,7 @@ function gn(t, e) {
7053
7053
  return !1;
7054
7054
  return !0;
7055
7055
  }
7056
- function qu(t) {
7056
+ function Vu(t) {
7057
7057
  let e = t.nextSibling;
7058
7058
  return t.parentNode.removeChild(t), e;
7059
7059
  }
@@ -7147,7 +7147,7 @@ class nc {
7147
7147
  let a = this.preMatch.matched.get(l);
7148
7148
  if (a != null && a != i)
7149
7149
  return !1;
7150
- let c = l.dom, f, p = this.isLocked(c) && !(e.isText && l.node && l.node.isText && l.nodeDOM.nodeValue == e.text && l.dirty != ye && gn(n, l.outerDeco));
7150
+ let c = l.dom, f, p = this.isLocked(c) && !(e.isText && l.node && l.node.isText && l.nodeDOM.nodeValue == e.text && l.dirty != ye && mn(n, l.outerDeco));
7151
7151
  if (!p && l.update(e, n, r, u))
7152
7152
  return this.destroyBetween(this.index, o), l.dom != c && (this.changed = !0), this.index++, !0;
7153
7153
  if (!p && (f = this.recreateWrapper(l, e, n, r, u, s)))
@@ -7160,7 +7160,7 @@ class nc {
7160
7160
  // When a node with content is replaced by a different node with
7161
7161
  // identical content, move over its children.
7162
7162
  recreateWrapper(e, n, r, u, i, s) {
7163
- if (e.dirty || n.isAtom || !e.children.length || !e.node.content.eq(n.content) || !gn(r, e.outerDeco) || !u.eq(e.innerDeco))
7163
+ if (e.dirty || n.isAtom || !e.children.length || !e.node.content.eq(n.content) || !mn(r, e.outerDeco) || !u.eq(e.innerDeco))
7164
7164
  return null;
7165
7165
  let o = qe.create(this.top, n, r, u, i, s);
7166
7166
  if (o.contentDOM) {
@@ -7315,7 +7315,7 @@ function oc(t, e, n, r) {
7315
7315
  }
7316
7316
  return -1;
7317
7317
  }
7318
- function wr(t, e, n, r, u) {
7318
+ function Tr(t, e, n, r, u) {
7319
7319
  let i = [];
7320
7320
  for (let s = 0, o = 0; s < t.length; s++) {
7321
7321
  let l = t[s], a = o, c = o += l.size;
@@ -7323,7 +7323,7 @@ function wr(t, e, n, r, u) {
7323
7323
  }
7324
7324
  return i;
7325
7325
  }
7326
- function Ur(t, e = null) {
7326
+ function Kr(t, e = null) {
7327
7327
  let n = t.domSelectionRange(), r = t.state.doc;
7328
7328
  if (!n.focusNode)
7329
7329
  return null;
@@ -7357,7 +7357,7 @@ function Ur(t, e = null) {
7357
7357
  let c = r.resolve(l);
7358
7358
  if (!a) {
7359
7359
  let f = e == "pointer" || t.state.selection.head < o.pos && !i ? 1 : -1;
7360
- a = Kr(t, c, o, f);
7360
+ a = Zr(t, c, o, f);
7361
7361
  }
7362
7362
  return a;
7363
7363
  }
@@ -7378,13 +7378,13 @@ function Me(t, e = !1) {
7378
7378
  ac(t);
7379
7379
  else {
7380
7380
  let { anchor: r, head: u } = n, i, s;
7381
- Vu && !(n instanceof O) && (n.$from.parent.inlineContent || (i = $u(t, n.from)), !n.empty && !n.$from.parent.inlineContent && (s = $u(t, n.to))), t.docView.setSelection(r, u, t, e), Vu && (i && Wu(i), s && Wu(s)), n.visible ? t.dom.classList.remove("ProseMirror-hideselection") : (t.dom.classList.add("ProseMirror-hideselection"), "onselectionchange" in document && lc(t));
7381
+ $u && !(n instanceof O) && (n.$from.parent.inlineContent || (i = Wu(t, n.from)), !n.empty && !n.$from.parent.inlineContent && (s = Wu(t, n.to))), t.docView.setSelection(r, u, t, e), $u && (i && Hu(i), s && Hu(s)), n.visible ? t.dom.classList.remove("ProseMirror-hideselection") : (t.dom.classList.add("ProseMirror-hideselection"), "onselectionchange" in document && lc(t));
7382
7382
  }
7383
7383
  t.domObserver.setCurSelection(), t.domObserver.connectSelection();
7384
7384
  }
7385
7385
  }
7386
- const Vu = U || H && Fs < 63;
7387
- function $u(t, e) {
7386
+ const $u = U || H && Fs < 63;
7387
+ function Wu(t, e) {
7388
7388
  let { node: n, offset: r } = t.docView.domFromPos(e, 0), u = r < n.childNodes.length ? n.childNodes[r] : null, i = r ? n.childNodes[r - 1] : null;
7389
7389
  if (U && u && u.contentEditable == "false")
7390
7390
  return Gn(u);
@@ -7398,7 +7398,7 @@ function $u(t, e) {
7398
7398
  function Gn(t) {
7399
7399
  return t.contentEditable = "true", U && t.draggable && (t.draggable = !1, t.wasDraggable = !0), t;
7400
7400
  }
7401
- function Wu(t) {
7401
+ function Hu(t) {
7402
7402
  t.contentEditable = "false", t.wasDraggable && (t.draggable = !0, t.wasDraggable = null);
7403
7403
  }
7404
7404
  function lc(t) {
@@ -7421,17 +7421,17 @@ function ac(t) {
7421
7421
  function Hs(t, e) {
7422
7422
  if (e instanceof S) {
7423
7423
  let n = t.docView.descAt(e.from);
7424
- n != t.lastSelectedViewDesc && (Hu(t), n && n.selectNode(), t.lastSelectedViewDesc = n);
7424
+ n != t.lastSelectedViewDesc && (Ju(t), n && n.selectNode(), t.lastSelectedViewDesc = n);
7425
7425
  } else
7426
- Hu(t);
7426
+ Ju(t);
7427
7427
  }
7428
- function Hu(t) {
7428
+ function Ju(t) {
7429
7429
  t.lastSelectedViewDesc && (t.lastSelectedViewDesc.parent && t.lastSelectedViewDesc.deselectNode(), t.lastSelectedViewDesc = void 0);
7430
7430
  }
7431
- function Kr(t, e, n, r) {
7431
+ function Zr(t, e, n, r) {
7432
7432
  return t.someProp("createSelectionBetween", (u) => u(t, e, n)) || O.between(e, n, r);
7433
7433
  }
7434
- function Ju(t) {
7434
+ function ju(t) {
7435
7435
  return t.editable && !t.hasFocus() ? !1 : Js(t);
7436
7436
  }
7437
7437
  function Js(t) {
@@ -7448,14 +7448,14 @@ function cc(t) {
7448
7448
  let e = t.docView.domFromPos(t.state.selection.anchor, 0), n = t.domSelectionRange();
7449
7449
  return ut(e.node, e.offset, n.anchorNode, n.anchorOffset);
7450
7450
  }
7451
- function Tr(t, e) {
7451
+ function Or(t, e) {
7452
7452
  let { $anchor: n, $head: r } = t.selection, u = e > 0 ? n.max(r) : n.min(r), i = u.parent.inlineContent ? u.depth ? t.doc.resolve(e > 0 ? u.after() : u.before()) : null : u;
7453
7453
  return i && T.findFrom(i, e);
7454
7454
  }
7455
7455
  function Oe(t, e) {
7456
7456
  return t.dispatch(t.state.tr.setSelection(e).scrollIntoView()), !0;
7457
7457
  }
7458
- function ju(t, e, n) {
7458
+ function Uu(t, e, n) {
7459
7459
  let r = t.state.selection;
7460
7460
  if (r instanceof O)
7461
7461
  if (n.indexOf("s") > -1) {
@@ -7466,26 +7466,26 @@ function ju(t, e, n) {
7466
7466
  return Oe(t, new O(r.$anchor, s));
7467
7467
  } else if (r.empty) {
7468
7468
  if (t.endOfTextblock(e > 0 ? "forward" : "backward")) {
7469
- let u = Tr(t.state, e);
7469
+ let u = Or(t.state, e);
7470
7470
  return u && u instanceof S ? Oe(t, u) : !1;
7471
7471
  } else if (!(ue && n.indexOf("m") > -1)) {
7472
7472
  let u = r.$head, i = u.textOffset ? null : e < 0 ? u.nodeBefore : u.nodeAfter, s;
7473
7473
  if (!i || i.isText)
7474
7474
  return !1;
7475
7475
  let o = e < 0 ? u.pos - i.nodeSize : u.pos;
7476
- return i.isAtom || (s = t.docView.descAt(o)) && !s.contentDOM ? S.isSelectable(i) ? Oe(t, new S(e < 0 ? t.state.doc.resolve(u.pos - i.nodeSize) : u)) : Ut ? Oe(t, new O(t.state.doc.resolve(e < 0 ? o : o + i.nodeSize))) : !1 : !1;
7476
+ return i.isAtom || (s = t.docView.descAt(o)) && !s.contentDOM ? S.isSelectable(i) ? Oe(t, new S(e < 0 ? t.state.doc.resolve(u.pos - i.nodeSize) : u)) : jt ? Oe(t, new O(t.state.doc.resolve(e < 0 ? o : o + i.nodeSize))) : !1 : !1;
7477
7477
  }
7478
7478
  } else return !1;
7479
7479
  else {
7480
7480
  if (r instanceof S && r.node.isInline)
7481
7481
  return Oe(t, new O(e > 0 ? r.$to : r.$from));
7482
7482
  {
7483
- let u = Tr(t.state, e);
7483
+ let u = Or(t.state, e);
7484
7484
  return u ? Oe(t, u) : !1;
7485
7485
  }
7486
7486
  }
7487
7487
  }
7488
- function bn(t) {
7488
+ function gn(t) {
7489
7489
  return t.nodeType == 3 ? t.nodeValue.length : t.childNodes.length;
7490
7490
  }
7491
7491
  function Nt(t, e) {
@@ -7500,7 +7500,7 @@ function fc(t) {
7500
7500
  if (!n)
7501
7501
  return;
7502
7502
  let u, i, s = !1;
7503
- for (se && n.nodeType == 1 && r < bn(n) && Nt(n.childNodes[r], -1) && (s = !0); ; )
7503
+ for (se && n.nodeType == 1 && r < gn(n) && Nt(n.childNodes[r], -1) && (s = !0); ; )
7504
7504
  if (r > 0) {
7505
7505
  if (n.nodeType != 1)
7506
7506
  break;
@@ -7521,7 +7521,7 @@ function fc(t) {
7521
7521
  for (; o && Nt(o, -1); )
7522
7522
  u = n.parentNode, i = q(o), o = o.previousSibling;
7523
7523
  if (o)
7524
- n = o, r = bn(n);
7524
+ n = o, r = gn(n);
7525
7525
  else {
7526
7526
  if (n = n.parentNode, n == t.dom)
7527
7527
  break;
@@ -7529,13 +7529,13 @@ function fc(t) {
7529
7529
  }
7530
7530
  }
7531
7531
  }
7532
- s ? Or(t, n, r) : u && Or(t, u, i);
7532
+ s ? Fr(t, n, r) : u && Fr(t, u, i);
7533
7533
  }
7534
7534
  function dc(t) {
7535
7535
  let e = t.domSelectionRange(), n = e.focusNode, r = e.focusOffset;
7536
7536
  if (!n)
7537
7537
  return;
7538
- let u = bn(n), i, s;
7538
+ let u = gn(n), i, s;
7539
7539
  for (; ; )
7540
7540
  if (r < u) {
7541
7541
  if (n.nodeType != 1)
@@ -7553,7 +7553,7 @@ function dc(t) {
7553
7553
  for (; o && Nt(o, 1); )
7554
7554
  i = o.parentNode, s = q(o) + 1, o = o.nextSibling;
7555
7555
  if (o)
7556
- n = o, r = 0, u = bn(n);
7556
+ n = o, r = 0, u = gn(n);
7557
7557
  else {
7558
7558
  if (n = n.parentNode, n == t.dom)
7559
7559
  break;
@@ -7561,14 +7561,14 @@ function dc(t) {
7561
7561
  }
7562
7562
  }
7563
7563
  }
7564
- i && Or(t, i, s);
7564
+ i && Fr(t, i, s);
7565
7565
  }
7566
7566
  function js(t) {
7567
7567
  let e = t.pmViewDesc;
7568
7568
  return e && e.node && e.node.isBlock;
7569
7569
  }
7570
7570
  function hc(t, e) {
7571
- for (; t && e == t.childNodes.length && !jt(t); )
7571
+ for (; t && e == t.childNodes.length && !Jt(t); )
7572
7572
  e = q(t) + 1, t = t.parentNode;
7573
7573
  for (; t && e < t.childNodes.length; ) {
7574
7574
  let n = t.childNodes[e];
@@ -7580,7 +7580,7 @@ function hc(t, e) {
7580
7580
  }
7581
7581
  }
7582
7582
  function pc(t, e) {
7583
- for (; t && !e && !jt(t); )
7583
+ for (; t && !e && !Jt(t); )
7584
7584
  e = q(t), t = t.parentNode;
7585
7585
  for (; t && e; ) {
7586
7586
  let n = t.childNodes[e - 1];
@@ -7591,7 +7591,7 @@ function pc(t, e) {
7591
7591
  t = n, e = t.childNodes.length;
7592
7592
  }
7593
7593
  }
7594
- function Or(t, e, n) {
7594
+ function Fr(t, e, n) {
7595
7595
  if (e.nodeType != 3) {
7596
7596
  let i, s;
7597
7597
  (s = hc(e, n)) ? (e = s, n = 0) : (i = pc(e, n)) && (e = i, n = i.nodeValue.length);
@@ -7609,7 +7609,7 @@ function Or(t, e, n) {
7609
7609
  t.state == u && Me(t);
7610
7610
  }, 50);
7611
7611
  }
7612
- function Uu(t, e) {
7612
+ function Ku(t, e) {
7613
7613
  let n = t.state.doc.resolve(e);
7614
7614
  if (!(H || va) && n.parent.inlineContent) {
7615
7615
  let u = t.coordsAtPos(e);
@@ -7626,13 +7626,13 @@ function Uu(t, e) {
7626
7626
  }
7627
7627
  return getComputedStyle(t.dom).direction == "rtl" ? "rtl" : "ltr";
7628
7628
  }
7629
- function Ku(t, e, n) {
7629
+ function Zu(t, e, n) {
7630
7630
  let r = t.state.selection;
7631
7631
  if (r instanceof O && !r.empty || n.indexOf("s") > -1 || ue && n.indexOf("m") > -1)
7632
7632
  return !1;
7633
7633
  let { $from: u, $to: i } = r;
7634
7634
  if (!u.parent.inlineContent || t.endOfTextblock(e < 0 ? "up" : "down")) {
7635
- let s = Tr(t.state, e);
7635
+ let s = Or(t.state, e);
7636
7636
  if (s && s instanceof S)
7637
7637
  return Oe(t, s);
7638
7638
  }
@@ -7642,7 +7642,7 @@ function Ku(t, e, n) {
7642
7642
  }
7643
7643
  return !1;
7644
7644
  }
7645
- function Zu(t, e) {
7645
+ function Gu(t, e) {
7646
7646
  if (!(t.state.selection instanceof O))
7647
7647
  return !0;
7648
7648
  let { $head: n, $anchor: r, empty: u } = t.state.selection;
@@ -7659,7 +7659,7 @@ function Zu(t, e) {
7659
7659
  }
7660
7660
  return !1;
7661
7661
  }
7662
- function Gu(t, e, n) {
7662
+ function Yu(t, e, n) {
7663
7663
  t.domObserver.stop(), e.contentEditable = n, t.domObserver.start();
7664
7664
  }
7665
7665
  function mc(t) {
@@ -7668,7 +7668,7 @@ function mc(t) {
7668
7668
  let { focusNode: e, focusOffset: n } = t.domSelectionRange();
7669
7669
  if (e && e.nodeType == 1 && n == 0 && e.firstChild && e.firstChild.contentEditable == "false") {
7670
7670
  let r = e.firstChild;
7671
- Gu(t, r, "true"), setTimeout(() => Gu(t, r, "false"), 20);
7671
+ Yu(t, r, "true"), setTimeout(() => Yu(t, r, "false"), 20);
7672
7672
  }
7673
7673
  return !1;
7674
7674
  }
@@ -7679,28 +7679,28 @@ function gc(t) {
7679
7679
  function bc(t, e) {
7680
7680
  let n = e.keyCode, r = gc(e);
7681
7681
  if (n == 8 || ue && n == 72 && r == "c")
7682
- return Zu(t, -1) || lt(t, -1);
7682
+ return Gu(t, -1) || lt(t, -1);
7683
7683
  if (n == 46 && !e.shiftKey || ue && n == 68 && r == "c")
7684
- return Zu(t, 1) || lt(t, 1);
7684
+ return Gu(t, 1) || lt(t, 1);
7685
7685
  if (n == 13 || n == 27)
7686
7686
  return !0;
7687
7687
  if (n == 37 || ue && n == 66 && r == "c") {
7688
- let u = n == 37 ? Uu(t, t.state.selection.from) == "ltr" ? -1 : 1 : -1;
7689
- return ju(t, u, r) || lt(t, u);
7688
+ let u = n == 37 ? Ku(t, t.state.selection.from) == "ltr" ? -1 : 1 : -1;
7689
+ return Uu(t, u, r) || lt(t, u);
7690
7690
  } else if (n == 39 || ue && n == 70 && r == "c") {
7691
- let u = n == 39 ? Uu(t, t.state.selection.from) == "ltr" ? 1 : -1 : 1;
7692
- return ju(t, u, r) || lt(t, u);
7691
+ let u = n == 39 ? Ku(t, t.state.selection.from) == "ltr" ? 1 : -1 : 1;
7692
+ return Uu(t, u, r) || lt(t, u);
7693
7693
  } else {
7694
7694
  if (n == 38 || ue && n == 80 && r == "c")
7695
- return Ku(t, -1, r) || lt(t, -1);
7695
+ return Zu(t, -1, r) || lt(t, -1);
7696
7696
  if (n == 40 || ue && n == 78 && r == "c")
7697
- return mc(t) || Ku(t, 1, r) || lt(t, 1);
7697
+ return mc(t) || Zu(t, 1, r) || lt(t, 1);
7698
7698
  if (r == (ue ? "m" : "c") && (n == 66 || n == 73 || n == 89 || n == 90))
7699
7699
  return !0;
7700
7700
  }
7701
7701
  return !1;
7702
7702
  }
7703
- function Zr(t, e) {
7703
+ function Gr(t, e) {
7704
7704
  t.someProp("transformCopied", (h) => {
7705
7705
  e = h(e, t);
7706
7706
  });
@@ -7754,7 +7754,7 @@ function Us(t, e, n, r, u) {
7754
7754
  } else
7755
7755
  t.someProp("transformPastedHTML", (f) => {
7756
7756
  n = f(n, t);
7757
- }), s = Cc(n), Ut && Dc(s);
7757
+ }), s = Cc(n), jt && Dc(s);
7758
7758
  let a = s && s.querySelector("[data-pm-slice]"), c = a && /^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(a.getAttribute("data-pm-slice") || "");
7759
7759
  if (c && c[3])
7760
7760
  for (let f = +c[3]; f > 0; f--) {
@@ -7765,21 +7765,21 @@ function Us(t, e, n, r, u) {
7765
7765
  break;
7766
7766
  s = p;
7767
7767
  }
7768
- if (o || (o = (t.someProp("clipboardParser") || t.someProp("domParser") || Bt.fromSchema(t.state.schema)).parseSlice(s, {
7768
+ if (o || (o = (t.someProp("clipboardParser") || t.someProp("domParser") || Rt.fromSchema(t.state.schema)).parseSlice(s, {
7769
7769
  preserveWhitespace: !!(l || c),
7770
7770
  context: u,
7771
7771
  ruleFromNode(p) {
7772
7772
  return p.nodeName == "BR" && !p.nextSibling && p.parentNode && !xc.test(p.parentNode.nodeName) ? { ignore: !0 } : null;
7773
7773
  }
7774
7774
  })), c)
7775
- o = _c(Yu(o, +c[1], +c[2]), c[4]);
7775
+ o = _c(Xu(o, +c[1], +c[2]), c[4]);
7776
7776
  else if (o = D.maxOpen(kc(o.content, u), !0), o.openStart || o.openEnd) {
7777
7777
  let f = 0, p = 0;
7778
7778
  for (let h = o.content.firstChild; f < o.openStart && !h.type.spec.isolating; f++, h = h.firstChild)
7779
7779
  ;
7780
7780
  for (let h = o.content.lastChild; p < o.openEnd && !h.type.spec.isolating; p++, h = h.lastChild)
7781
7781
  ;
7782
- o = Yu(o, f, p);
7782
+ o = Xu(o, f, p);
7783
7783
  }
7784
7784
  return t.someProp("transformPasted", (f) => {
7785
7785
  o = f(o, t, l);
@@ -7829,12 +7829,12 @@ function Gs(t, e) {
7829
7829
  let n = t.content.replaceChild(t.childCount - 1, Gs(t.lastChild, e - 1)), r = t.contentMatchAt(t.childCount).fillBefore(x.empty, !0);
7830
7830
  return t.copy(n.append(r));
7831
7831
  }
7832
- function Fr(t, e, n, r, u, i) {
7832
+ function Nr(t, e, n, r, u, i) {
7833
7833
  let s = e < 0 ? t.firstChild : t.lastChild, o = s.content;
7834
- return t.childCount > 1 && (i = 0), u < r - 1 && (o = Fr(o, e, n, r, u + 1, i)), u >= n && (o = e < 0 ? s.contentMatchAt(0).fillBefore(o, i <= u).append(o) : o.append(s.contentMatchAt(s.childCount).fillBefore(x.empty, !0))), t.replaceChild(e < 0 ? 0 : t.childCount - 1, s.copy(o));
7834
+ return t.childCount > 1 && (i = 0), u < r - 1 && (o = Nr(o, e, n, r, u + 1, i)), u >= n && (o = e < 0 ? s.contentMatchAt(0).fillBefore(o, i <= u).append(o) : o.append(s.contentMatchAt(s.childCount).fillBefore(x.empty, !0))), t.replaceChild(e < 0 ? 0 : t.childCount - 1, s.copy(o));
7835
7835
  }
7836
- function Yu(t, e, n) {
7837
- return e < t.openStart && (t = new D(Fr(t.content, -1, e, t.openStart, 0, t.openEnd), e, t.openEnd)), n < t.openEnd && (t = new D(Fr(t.content, 1, n, t.openEnd, 0, 0), t.openStart, n)), t;
7836
+ function Xu(t, e, n) {
7837
+ return e < t.openStart && (t = new D(Nr(t.content, -1, e, t.openStart, 0, t.openEnd), e, t.openEnd)), n < t.openEnd && (t = new D(Nr(t.content, 1, n, t.openEnd, 0, 0), t.openStart, n)), t;
7838
7838
  }
7839
7839
  const Ys = {
7840
7840
  thead: ["table"],
@@ -7847,9 +7847,9 @@ const Ys = {
7847
7847
  td: ["table", "tbody", "tr"],
7848
7848
  th: ["table", "tbody", "tr"]
7849
7849
  };
7850
- let Xu = null;
7850
+ let Qu = null;
7851
7851
  function Xs() {
7852
- return Xu || (Xu = document.implementation.createHTMLDocument("title"));
7852
+ return Qu || (Qu = document.implementation.createHTMLDocument("title"));
7853
7853
  }
7854
7854
  let Yn = null;
7855
7855
  function yc(t) {
@@ -7900,10 +7900,10 @@ function Ac(t) {
7900
7900
  for (let e in K) {
7901
7901
  let n = K[e];
7902
7902
  t.dom.addEventListener(e, t.input.eventHandlers[e] = (r) => {
7903
- wc(t, r) && !Gr(t, r) && (t.editable || !(r.type in Z)) && n(t, r);
7903
+ wc(t, r) && !Yr(t, r) && (t.editable || !(r.type in Z)) && n(t, r);
7904
7904
  }, Ec[e] ? { passive: !0 } : void 0);
7905
7905
  }
7906
- U && t.dom.addEventListener("input", () => null), Nr(t);
7906
+ U && t.dom.addEventListener("input", () => null), Ir(t);
7907
7907
  }
7908
7908
  function ze(t, e) {
7909
7909
  t.input.lastSelectionOrigin = e, t.input.lastSelectionTime = Date.now();
@@ -7914,13 +7914,13 @@ function Mc(t) {
7914
7914
  t.dom.removeEventListener(e, t.input.eventHandlers[e]);
7915
7915
  clearTimeout(t.input.composingTimeout), clearTimeout(t.input.lastIOSEnterFallbackTimeout);
7916
7916
  }
7917
- function Nr(t) {
7917
+ function Ir(t) {
7918
7918
  t.someProp("handleDOMEvents", (e) => {
7919
7919
  for (let n in e)
7920
- t.input.eventHandlers[n] || t.dom.addEventListener(n, t.input.eventHandlers[n] = (r) => Gr(t, r));
7920
+ t.input.eventHandlers[n] || t.dom.addEventListener(n, t.input.eventHandlers[n] = (r) => Yr(t, r));
7921
7921
  });
7922
7922
  }
7923
- function Gr(t, e) {
7923
+ function Yr(t, e) {
7924
7924
  return t.someProp("handleDOMEvents", (n) => {
7925
7925
  let r = n[e.type];
7926
7926
  return r ? r(t, e) || e.defaultPrevented : !1;
@@ -7937,7 +7937,7 @@ function wc(t, e) {
7937
7937
  return !0;
7938
7938
  }
7939
7939
  function Tc(t, e) {
7940
- !Gr(t, e) && K[e.type] && (t.editable || !(e.type in Z)) && K[e.type](t, e);
7940
+ !Yr(t, e) && K[e.type] && (t.editable || !(e.type in Z)) && K[e.type](t, e);
7941
7941
  }
7942
7942
  Z.keydown = (t, e) => {
7943
7943
  let n = e;
@@ -7973,7 +7973,7 @@ function Oc(t, e) {
7973
7973
  let n = e.x - t.clientX, r = e.y - t.clientY;
7974
7974
  return n * n + r * r < 100;
7975
7975
  }
7976
- function Yr(t, e, n, r, u) {
7976
+ function Xr(t, e, n, r, u) {
7977
7977
  if (r == -1)
7978
7978
  return !1;
7979
7979
  let i = t.state.doc.resolve(r);
@@ -8010,13 +8010,13 @@ function Nc(t, e) {
8010
8010
  return u != null ? (ht(t, S.create(t.state.doc, u)), !0) : !1;
8011
8011
  }
8012
8012
  function Ic(t, e, n, r, u) {
8013
- return Yr(t, "handleClickOn", e, n, r) || t.someProp("handleClick", (i) => i(t, e, r)) || (u ? Nc(t, n) : Fc(t, n));
8013
+ return Xr(t, "handleClickOn", e, n, r) || t.someProp("handleClick", (i) => i(t, e, r)) || (u ? Nc(t, n) : Fc(t, n));
8014
8014
  }
8015
8015
  function Rc(t, e, n, r) {
8016
- return Yr(t, "handleDoubleClickOn", e, n, r) || t.someProp("handleDoubleClick", (u) => u(t, e, r));
8016
+ return Xr(t, "handleDoubleClickOn", e, n, r) || t.someProp("handleDoubleClick", (u) => u(t, e, r));
8017
8017
  }
8018
8018
  function Bc(t, e, n, r) {
8019
- return Yr(t, "handleTripleClickOn", e, n, r) || t.someProp("handleTripleClick", (u) => u(t, e, r)) || vc(t, n, r);
8019
+ return Xr(t, "handleTripleClickOn", e, n, r) || t.someProp("handleTripleClick", (u) => u(t, e, r)) || vc(t, n, r);
8020
8020
  }
8021
8021
  function vc(t, e, n) {
8022
8022
  if (n.button != 0)
@@ -8036,14 +8036,14 @@ function vc(t, e, n) {
8036
8036
  return !0;
8037
8037
  }
8038
8038
  }
8039
- function Xr(t) {
8040
- return xn(t);
8039
+ function Qr(t) {
8040
+ return bn(t);
8041
8041
  }
8042
8042
  const Qs = ue ? "metaKey" : "ctrlKey";
8043
8043
  K.mousedown = (t, e) => {
8044
8044
  let n = e;
8045
8045
  t.input.shiftKey = n.shiftKey;
8046
- let r = Xr(t), u = Date.now(), i = "singleClick";
8046
+ let r = Qr(t), u = Date.now(), i = "singleClick";
8047
8047
  u - t.input.lastClick.time < 500 && Oc(n, t.input.lastClick) && !n[Qs] && t.input.lastClick.button == n.button && (t.input.lastClick.type == "singleClick" ? i = "doubleClick" : t.input.lastClick.type == "doubleClick" && (i = "tripleClick")), t.input.lastClick = { time: u, x: n.clientX, y: n.clientY, type: i, button: n.button };
8048
8048
  let s = t.posAtCoords(Fn(n));
8049
8049
  s && (i == "singleClick" ? (t.input.mouseDown && t.input.mouseDown.done(), t.input.mouseDown = new zc(t, s, n, !!r)) : (i == "doubleClick" ? Rc : Bc)(t, s.pos, s.inside, n) ? n.preventDefault() : ze(t, "pointer"));
@@ -8095,12 +8095,12 @@ class zc {
8095
8095
  }
8096
8096
  }
8097
8097
  K.touchstart = (t) => {
8098
- t.input.lastTouch = Date.now(), Xr(t), ze(t, "pointer");
8098
+ t.input.lastTouch = Date.now(), Qr(t), ze(t, "pointer");
8099
8099
  };
8100
8100
  K.touchmove = (t) => {
8101
8101
  t.input.lastTouch = Date.now(), ze(t, "pointer");
8102
8102
  };
8103
- K.contextmenu = (t) => Xr(t);
8103
+ K.contextmenu = (t) => Qr(t);
8104
8104
  function eo(t, e) {
8105
8105
  return t.composing ? !0 : U && Math.abs(e.timeStamp - t.input.compositionEndedAt) < 500 ? (t.input.compositionEndedAt = -2e8, !0) : !1;
8106
8106
  }
@@ -8110,8 +8110,8 @@ Z.compositionstart = Z.compositionupdate = (t) => {
8110
8110
  t.domObserver.flush();
8111
8111
  let { state: e } = t, n = e.selection.$to;
8112
8112
  if (e.selection instanceof O && (e.storedMarks || !n.textOffset && n.parentOffset && n.nodeBefore.marks.some((r) => r.type.spec.inclusive === !1)))
8113
- t.markCursor = t.state.storedMarks || n.marks(), xn(t, !0), t.markCursor = null;
8114
- else if (xn(t, !e.selection.empty), se && e.selection.empty && n.parentOffset && !n.textOffset && n.nodeBefore.marks.length) {
8113
+ t.markCursor = t.state.storedMarks || n.marks(), bn(t, !0), t.markCursor = null;
8114
+ else if (bn(t, !e.selection.empty), se && e.selection.empty && n.parentOffset && !n.textOffset && n.nodeBefore.marks.length) {
8115
8115
  let r = t.domSelectionRange();
8116
8116
  for (let u = r.focusNode, i = r.focusOffset; u && u.nodeType == 1 && i != 0; ) {
8117
8117
  let s = i < 0 ? u.lastChild : u.childNodes[i - 1];
@@ -8133,7 +8133,7 @@ Z.compositionend = (t, e) => {
8133
8133
  t.composing && (t.input.composing = !1, t.input.compositionEndedAt = e.timeStamp, t.input.compositionPendingChanges = t.domObserver.pendingRecords().length ? t.input.compositionID : 0, t.input.compositionNode = null, t.input.compositionPendingChanges && Promise.resolve().then(() => t.domObserver.flush()), t.input.compositionID++, to(t, 20));
8134
8134
  };
8135
8135
  function to(t, e) {
8136
- clearTimeout(t.input.composingTimeout), e > -1 && (t.input.composingTimeout = setTimeout(() => xn(t), e));
8136
+ clearTimeout(t.input.composingTimeout), e > -1 && (t.input.composingTimeout = setTimeout(() => bn(t), e));
8137
8137
  }
8138
8138
  function no(t) {
8139
8139
  for (t.composing && (t.input.composing = !1, t.input.compositionEndedAt = qc()); t.input.compositionNodes.length > 0; )
@@ -8162,10 +8162,10 @@ function qc() {
8162
8162
  let t = document.createEvent("Event");
8163
8163
  return t.initEvent("event", !0, !0), t.timeStamp;
8164
8164
  }
8165
- function xn(t, e = !1) {
8165
+ function bn(t, e = !1) {
8166
8166
  if (!(Ae && t.domObserver.flushingSoon >= 0)) {
8167
8167
  if (t.domObserver.forceFlush(), no(t), e || t.docView && t.docView.dirty) {
8168
- let n = Ur(t), r = t.state.selection;
8168
+ let n = Kr(t), r = t.state.selection;
8169
8169
  return n && !n.eq(r) ? t.dispatch(t.state.tr.setSelection(n)) : (t.markCursor || e) && !r.$from.node(r.$from.sharedDepth(r.to)).inlineContent ? t.dispatch(t.state.tr.deleteSelection()) : t.updateState(t.state), !0;
8170
8170
  }
8171
8171
  return !1;
@@ -8181,12 +8181,12 @@ function Vc(t, e) {
8181
8181
  n.parentNode && n.parentNode.removeChild(n), t.focus();
8182
8182
  }, 50);
8183
8183
  }
8184
- const Lt = G && Le < 15 || xt && za < 604;
8184
+ const Pt = G && Le < 15 || xt && za < 604;
8185
8185
  K.copy = Z.cut = (t, e) => {
8186
8186
  let n = e, r = t.state.selection, u = n.type == "cut";
8187
8187
  if (r.empty)
8188
8188
  return;
8189
- let i = Lt ? null : n.clipboardData, s = r.content(), { dom: o, text: l } = Zr(t, s);
8189
+ let i = Pt ? null : n.clipboardData, s = r.content(), { dom: o, text: l } = Gr(t, s);
8190
8190
  i ? (n.preventDefault(), i.clearData(), i.setData("text/html", o.innerHTML), i.setData("text/plain", l)) : Vc(t, o), u && t.dispatch(t.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent", "cut"));
8191
8191
  };
8192
8192
  function $c(t) {
@@ -8199,10 +8199,10 @@ function Wc(t, e) {
8199
8199
  n || (r.contentEditable = "true"), r.style.cssText = "position: fixed; left: -10000px; top: 10px", r.focus();
8200
8200
  let u = t.input.shiftKey && t.input.lastKeyCode != 45;
8201
8201
  setTimeout(() => {
8202
- t.focus(), r.parentNode && r.parentNode.removeChild(r), n ? qt(t, r.value, null, u, e) : qt(t, r.textContent, r.innerHTML, u, e);
8202
+ t.focus(), r.parentNode && r.parentNode.removeChild(r), n ? Lt(t, r.value, null, u, e) : Lt(t, r.textContent, r.innerHTML, u, e);
8203
8203
  }, 50);
8204
8204
  }
8205
- function qt(t, e, n, r, u) {
8205
+ function Lt(t, e, n, r, u) {
8206
8206
  let i = Us(t, e, n, r, t.state.selection.$from);
8207
8207
  if (t.someProp("handlePaste", (l) => l(t, u, i || D.empty)))
8208
8208
  return !0;
@@ -8222,8 +8222,8 @@ Z.paste = (t, e) => {
8222
8222
  let n = e;
8223
8223
  if (t.composing && !Ae)
8224
8224
  return;
8225
- let r = Lt ? null : n.clipboardData, u = t.input.shiftKey && t.input.lastKeyCode != 45;
8226
- r && qt(t, ro(r), r.getData("text/html"), u, n) ? n.preventDefault() : Wc(t, n);
8225
+ let r = Pt ? null : n.clipboardData, u = t.input.shiftKey && t.input.lastKeyCode != 45;
8226
+ r && Lt(t, ro(r), r.getData("text/html"), u, n) ? n.preventDefault() : Wc(t, n);
8227
8227
  };
8228
8228
  class uo {
8229
8229
  constructor(e, n, r) {
@@ -8248,8 +8248,8 @@ K.dragstart = (t, e) => {
8248
8248
  f && f.node.type.spec.draggable && f != t.docView && (s = S.create(t.state.doc, f.posBefore));
8249
8249
  }
8250
8250
  }
8251
- let o = (s || t.state.selection).content(), { dom: l, text: a, slice: c } = Zr(t, o);
8252
- (!n.dataTransfer.files.length || !H || Fs > 120) && n.dataTransfer.clearData(), n.dataTransfer.setData(Lt ? "Text" : "text/html", l.innerHTML), n.dataTransfer.effectAllowed = "copyMove", Lt || n.dataTransfer.setData("text/plain", a), t.dragging = new uo(c, io(t, n), s);
8251
+ let o = (s || t.state.selection).content(), { dom: l, text: a, slice: c } = Gr(t, o);
8252
+ (!n.dataTransfer.files.length || !H || Fs > 120) && n.dataTransfer.clearData(), n.dataTransfer.setData(Pt ? "Text" : "text/html", l.innerHTML), n.dataTransfer.effectAllowed = "copyMove", Pt || n.dataTransfer.setData("text/plain", a), t.dragging = new uo(c, io(t, n), s);
8253
8253
  };
8254
8254
  K.dragend = (t) => {
8255
8255
  let e = t.dragging;
@@ -8268,7 +8268,7 @@ Z.drop = (t, e) => {
8268
8268
  let i = t.state.doc.resolve(u.pos), s = r && r.slice;
8269
8269
  s ? t.someProp("transformPasted", (d) => {
8270
8270
  s = d(s, t, !1);
8271
- }) : s = Us(t, ro(n.dataTransfer), Lt ? null : n.dataTransfer.getData("text/html"), !1, i);
8271
+ }) : s = Us(t, ro(n.dataTransfer), Pt ? null : n.dataTransfer.getData("text/html"), !1, i);
8272
8272
  let o = !!(r && io(t, n));
8273
8273
  if (t.someProp("handleDrop", (d) => d(t, n, s || D.empty, o))) {
8274
8274
  n.preventDefault();
@@ -8292,7 +8292,7 @@ Z.drop = (t, e) => {
8292
8292
  a.setSelection(new S(h));
8293
8293
  else {
8294
8294
  let d = a.mapping.map(l);
8295
- a.mapping.maps[a.mapping.maps.length - 1].forEach((m, g, b, k) => d = k), a.setSelection(Kr(t, h, a.doc.resolve(d)));
8295
+ a.mapping.maps[a.mapping.maps.length - 1].forEach((m, g, b, k) => d = k), a.setSelection(Zr(t, h, a.doc.resolve(d)));
8296
8296
  }
8297
8297
  t.focus(), t.dispatch(a.setMeta("uiEvent", "drop"));
8298
8298
  };
@@ -8319,7 +8319,7 @@ K.beforeinput = (t, e) => {
8319
8319
  };
8320
8320
  for (let t in Z)
8321
8321
  K[t] = Z[t];
8322
- function Vt(t, e) {
8322
+ function qt(t, e) {
8323
8323
  if (t == e)
8324
8324
  return !0;
8325
8325
  for (let n in t)
@@ -8330,7 +8330,7 @@ function Vt(t, e) {
8330
8330
  return !1;
8331
8331
  return !0;
8332
8332
  }
8333
- class kn {
8333
+ class xn {
8334
8334
  constructor(e, n) {
8335
8335
  this.toDOM = e, this.spec = n || Qe, this.side = this.spec.side || 0;
8336
8336
  }
@@ -8342,7 +8342,7 @@ class kn {
8342
8342
  return !0;
8343
8343
  }
8344
8344
  eq(e) {
8345
- return this == e || e instanceof kn && (this.spec.key && this.spec.key == e.spec.key || this.toDOM == e.toDOM && Vt(this.spec, e.spec));
8345
+ return this == e || e instanceof xn && (this.spec.key && this.spec.key == e.spec.key || this.toDOM == e.toDOM && qt(this.spec, e.spec));
8346
8346
  }
8347
8347
  destroy(e) {
8348
8348
  this.spec.destroy && this.spec.destroy(e);
@@ -8360,7 +8360,7 @@ class Ve {
8360
8360
  return n.from < n.to;
8361
8361
  }
8362
8362
  eq(e) {
8363
- return this == e || e instanceof Ve && Vt(this.attrs, e.attrs) && Vt(this.spec, e.spec);
8363
+ return this == e || e instanceof Ve && qt(this.attrs, e.attrs) && qt(this.spec, e.spec);
8364
8364
  }
8365
8365
  static is(e) {
8366
8366
  return e.type instanceof Ve;
@@ -8368,7 +8368,7 @@ class Ve {
8368
8368
  destroy() {
8369
8369
  }
8370
8370
  }
8371
- class Qr {
8371
+ class eu {
8372
8372
  constructor(e, n) {
8373
8373
  this.attrs = e, this.spec = n || Qe;
8374
8374
  }
@@ -8384,7 +8384,7 @@ class Qr {
8384
8384
  return u == n.from && !(i = e.child(r)).isText && u + i.nodeSize == n.to;
8385
8385
  }
8386
8386
  eq(e) {
8387
- return this == e || e instanceof Qr && Vt(this.attrs, e.attrs) && Vt(this.spec, e.spec);
8387
+ return this == e || e instanceof eu && qt(this.attrs, e.attrs) && qt(this.spec, e.spec);
8388
8388
  }
8389
8389
  destroy() {
8390
8390
  }
@@ -8423,7 +8423,7 @@ class ce {
8423
8423
  widget's current document position.
8424
8424
  */
8425
8425
  static widget(e, n, r) {
8426
- return new ce(e, e, new kn(n, r));
8426
+ return new ce(e, e, new xn(n, r));
8427
8427
  }
8428
8428
  /**
8429
8429
  Creates an inline decoration, which adds the given attributes to
@@ -8438,7 +8438,7 @@ class ce {
8438
8438
  node, will receive the given attributes.
8439
8439
  */
8440
8440
  static node(e, n, r, u) {
8441
- return new ce(e, n, new Qr(r, u));
8441
+ return new ce(e, n, new eu(r, u));
8442
8442
  }
8443
8443
  /**
8444
8444
  The spec provided when creating this decoration. Can be useful
@@ -8457,7 +8457,7 @@ class ce {
8457
8457
  @internal
8458
8458
  */
8459
8459
  get widget() {
8460
- return this.type instanceof kn;
8460
+ return this.type instanceof xn;
8461
8461
  }
8462
8462
  }
8463
8463
  const ft = [], Qe = {};
@@ -8474,7 +8474,7 @@ class v {
8474
8474
  you must make a copy if you want need to preserve that.
8475
8475
  */
8476
8476
  static create(e, n) {
8477
- return n.length ? yn(n, e, 0, Qe) : $;
8477
+ return n.length ? kn(n, e, 0, Qe) : $;
8478
8478
  }
8479
8479
  /**
8480
8480
  Find all decorations in this set which touch the given range
@@ -8533,7 +8533,7 @@ class v {
8533
8533
  if (c = oo(n, o, a)) {
8534
8534
  for (u || (u = this.children.slice()); i < u.length && u[i] < l; )
8535
8535
  i += 3;
8536
- u[i] == l ? u[i + 2] = u[i + 2].addInner(o, c, a + 1) : u.splice(i, 0, l, l + o.nodeSize, yn(c, o, a + 1, Qe)), i += 3;
8536
+ u[i] == l ? u[i + 2] = u[i + 2].addInner(o, c, a + 1) : u.splice(i, 0, l, l + o.nodeSize, kn(c, o, a + 1, Qe)), i += 3;
8537
8537
  }
8538
8538
  });
8539
8539
  let s = so(i ? lo(n) : n, -r);
@@ -8613,7 +8613,7 @@ class v {
8613
8613
  @internal
8614
8614
  */
8615
8615
  locals(e) {
8616
- return eu(this.localsInner(e));
8616
+ return tu(this.localsInner(e));
8617
8617
  }
8618
8618
  /**
8619
8619
  @internal
@@ -8633,7 +8633,7 @@ class v {
8633
8633
  }
8634
8634
  }
8635
8635
  v.empty = new v([], []);
8636
- v.removeOverlap = eu;
8636
+ v.removeOverlap = tu;
8637
8637
  const $ = v.empty;
8638
8638
  class Ie {
8639
8639
  constructor(e) {
@@ -8674,7 +8674,7 @@ class Ie {
8674
8674
  n.push(i[s]);
8675
8675
  }
8676
8676
  }
8677
- return n ? eu(r ? n : n.sort(et)) : ft;
8677
+ return n ? tu(r ? n : n.sort(et)) : ft;
8678
8678
  }
8679
8679
  // Create a group for the given array of decoration sets, or return
8680
8680
  // a single set when possible.
@@ -8729,7 +8729,7 @@ function Jc(t, e, n, r, u, i, s) {
8729
8729
  l = !0;
8730
8730
  }
8731
8731
  if (l) {
8732
- let a = jc(o, t, e, n, u, i, s), c = yn(a, r, 0, s);
8732
+ let a = jc(o, t, e, n, u, i, s), c = kn(a, r, 0, s);
8733
8733
  e = c.local;
8734
8734
  for (let f = 0; f < o.length; f += 3)
8735
8735
  o[f + 1] < 0 && (o.splice(f, 3), f -= 3);
@@ -8779,13 +8779,13 @@ function lo(t) {
8779
8779
  t[n] != null && e.push(t[n]);
8780
8780
  return e;
8781
8781
  }
8782
- function yn(t, e, n, r) {
8782
+ function kn(t, e, n, r) {
8783
8783
  let u = [], i = !1;
8784
8784
  e.forEach((o, l) => {
8785
8785
  let a = oo(t, o, l + n);
8786
8786
  if (a) {
8787
8787
  i = !0;
8788
- let c = yn(a, o, n + l + 1, r);
8788
+ let c = kn(a, o, n + l + 1, r);
8789
8789
  c != $ && u.push(l, l + o.nodeSize, c);
8790
8790
  }
8791
8791
  });
@@ -8797,7 +8797,7 @@ function yn(t, e, n, r) {
8797
8797
  function et(t, e) {
8798
8798
  return t.from - e.from || t.to - e.to;
8799
8799
  }
8800
- function eu(t) {
8800
+ function tu(t) {
8801
8801
  let e = t;
8802
8802
  for (let n = 0; n < e.length - 1; n++) {
8803
8803
  let r = e[n];
@@ -8805,17 +8805,17 @@ function eu(t) {
8805
8805
  for (let u = n + 1; u < e.length; u++) {
8806
8806
  let i = e[u];
8807
8807
  if (i.from == r.from) {
8808
- i.to != r.to && (e == t && (e = t.slice()), e[u] = i.copy(i.from, r.to), Qu(e, u + 1, i.copy(r.to, i.to)));
8808
+ i.to != r.to && (e == t && (e = t.slice()), e[u] = i.copy(i.from, r.to), ei(e, u + 1, i.copy(r.to, i.to)));
8809
8809
  continue;
8810
8810
  } else {
8811
- i.from < r.to && (e == t && (e = t.slice()), e[n] = r.copy(r.from, i.from), Qu(e, u, r.copy(i.from, r.to)));
8811
+ i.from < r.to && (e == t && (e = t.slice()), e[n] = r.copy(r.from, i.from), ei(e, u, r.copy(i.from, r.to)));
8812
8812
  break;
8813
8813
  }
8814
8814
  }
8815
8815
  }
8816
8816
  return e;
8817
8817
  }
8818
- function Qu(t, e, n) {
8818
+ function ei(t, e, n) {
8819
8819
  for (; e < t.length && et(n, t[e]) > 0; )
8820
8820
  e++;
8821
8821
  t.splice(e, 0, n);
@@ -8892,7 +8892,7 @@ class Gc {
8892
8892
  this.suppressingSelectionUpdates = !0, setTimeout(() => this.suppressingSelectionUpdates = !1, 50);
8893
8893
  }
8894
8894
  onSelectionChange() {
8895
- if (Ju(this.view)) {
8895
+ if (ju(this.view)) {
8896
8896
  if (this.suppressingSelectionUpdates)
8897
8897
  return Me(this.view);
8898
8898
  if (G && Le <= 11 && !this.view.state.selection.empty) {
@@ -8936,7 +8936,7 @@ class Gc {
8936
8936
  return;
8937
8937
  let n = this.pendingRecords();
8938
8938
  n.length && (this.queue = []);
8939
- let r = e.domSelectionRange(), u = !this.suppressingSelectionUpdates && !this.currentSelection.eq(r) && Ju(e) && !this.ignoreSelectionChange(r), i = -1, s = -1, o = !1, l = [];
8939
+ let r = e.domSelectionRange(), u = !this.suppressingSelectionUpdates && !this.currentSelection.eq(r) && ju(e) && !this.ignoreSelectionChange(r), i = -1, s = -1, o = !1, l = [];
8940
8940
  if (e.editable)
8941
8941
  for (let c = 0; c < n.length; c++) {
8942
8942
  let f = this.registerMutation(n[c], l);
@@ -8956,7 +8956,7 @@ class Gc {
8956
8956
  }
8957
8957
  }
8958
8958
  let a = null;
8959
- i < 0 && u && e.input.lastFocus > Date.now() - 200 && Math.max(e.input.lastTouch, e.input.lastClick.time) < Date.now() - 300 && Tn(r) && (a = Ur(e)) && a.eq(T.near(e.state.doc.resolve(0), 1)) ? (e.input.lastFocus = 0, Me(e), this.currentSelection.set(r), e.scrollToSelection()) : (i > -1 || u) && (i > -1 && (e.docView.markDirty(i, s), Yc(e)), this.handleDOMChange(i, s, o, l), e.docView && e.docView.dirty ? e.updateState(e.state) : this.currentSelection.eq(r) || Me(e), this.currentSelection.set(r));
8959
+ i < 0 && u && e.input.lastFocus > Date.now() - 200 && Math.max(e.input.lastTouch, e.input.lastClick.time) < Date.now() - 300 && Tn(r) && (a = Kr(e)) && a.eq(T.near(e.state.doc.resolve(0), 1)) ? (e.input.lastFocus = 0, Me(e), this.currentSelection.set(r), e.scrollToSelection()) : (i > -1 || u) && (i > -1 && (e.docView.markDirty(i, s), Yc(e)), this.handleDOMChange(i, s, o, l), e.docView && e.docView.dirty ? e.updateState(e.state) : this.currentSelection.eq(r) || Me(e), this.currentSelection.set(r));
8960
8960
  }
8961
8961
  registerMutation(e, n) {
8962
8962
  if (n.indexOf(e.target) > -1)
@@ -8991,15 +8991,15 @@ class Gc {
8991
8991
  });
8992
8992
  }
8993
8993
  }
8994
- let ei = /* @__PURE__ */ new WeakMap(), ti = !1;
8994
+ let ti = /* @__PURE__ */ new WeakMap(), ni = !1;
8995
8995
  function Yc(t) {
8996
- if (!ei.has(t) && (ei.set(t, null), ["normal", "nowrap", "pre-line"].indexOf(getComputedStyle(t.dom).whiteSpace) !== -1)) {
8997
- if (t.requiresGeckoHackNode = se, ti)
8996
+ if (!ti.has(t) && (ti.set(t, null), ["normal", "nowrap", "pre-line"].indexOf(getComputedStyle(t.dom).whiteSpace) !== -1)) {
8997
+ if (t.requiresGeckoHackNode = se, ni)
8998
8998
  return;
8999
- console.warn("ProseMirror expects the CSS white-space property to be set, preferably to 'pre-wrap'. It is recommended to load style/prosemirror.css from the prosemirror-view package."), ti = !0;
8999
+ console.warn("ProseMirror expects the CSS white-space property to be set, preferably to 'pre-wrap'. It is recommended to load style/prosemirror.css from the prosemirror-view package."), ni = !0;
9000
9000
  }
9001
9001
  }
9002
- function ni(t, e) {
9002
+ function ri(t, e) {
9003
9003
  let n = e.startContainer, r = e.startOffset, u = e.endContainer, i = e.endOffset, s = t.domAtPos(t.state.selection.anchor);
9004
9004
  return ut(s.node, s.offset, u, i) && ([n, r, u, i] = [u, i, n, r]), { anchorNode: n, anchorOffset: r, focusNode: u, focusOffset: i };
9005
9005
  }
@@ -9007,13 +9007,13 @@ function Xc(t, e) {
9007
9007
  if (e.getComposedRanges) {
9008
9008
  let u = e.getComposedRanges(t.root)[0];
9009
9009
  if (u)
9010
- return ni(t, u);
9010
+ return ri(t, u);
9011
9011
  }
9012
9012
  let n;
9013
9013
  function r(u) {
9014
9014
  u.preventDefault(), u.stopImmediatePropagation(), n = u.getTargetRanges()[0];
9015
9015
  }
9016
- return t.dom.addEventListener("beforeinput", r, !0), document.execCommand("indent"), t.dom.removeEventListener("beforeinput", r, !0), n ? ni(t, n) : null;
9016
+ return t.dom.addEventListener("beforeinput", r, !0), document.execCommand("indent"), t.dom.removeEventListener("beforeinput", r, !0), n ? ri(t, n) : null;
9017
9017
  }
9018
9018
  function Qc(t, e) {
9019
9019
  for (let n = e.parentNode; n && n != t.dom; n = n.parentNode) {
@@ -9035,7 +9035,7 @@ function e0(t, e, n) {
9035
9035
  if (!k || k.size)
9036
9036
  break;
9037
9037
  }
9038
- let f = t.state.doc, p = t.someProp("domParser") || Bt.fromSchema(t.state.schema), h = f.resolve(s), d = null, m = p.parse(r, {
9038
+ let f = t.state.doc, p = t.someProp("domParser") || Rt.fromSchema(t.state.schema), h = f.resolve(s), d = null, m = p.parse(r, {
9039
9039
  topNode: h.parent,
9040
9040
  topMatch: h.parent.contentMatchAt(h.index()),
9041
9041
  topOpen: !0,
@@ -9070,7 +9070,7 @@ const n0 = /^(a|abbr|acronym|b|bd[io]|big|br|button|cite|code|data(list)?|del|df
9070
9070
  function r0(t, e, n, r, u) {
9071
9071
  let i = t.input.compositionPendingChanges || (t.composing ? t.input.compositionID : 0);
9072
9072
  if (t.input.compositionPendingChanges = 0, e < 0) {
9073
- let C = t.input.lastSelectionTime > Date.now() - 50 ? t.input.lastSelectionOrigin : null, M = Ur(t, C);
9073
+ let C = t.input.lastSelectionTime > Date.now() - 50 ? t.input.lastSelectionOrigin : null, M = Kr(t, C);
9074
9074
  if (M && !t.state.selection.eq(M)) {
9075
9075
  if (H && Ae && t.input.lastKeyCode === 13 && Date.now() - 100 < t.input.lastKeyCodeTime && t.someProp("handleKeyDown", (X) => X(t, Ue(13, "Enter"))))
9076
9076
  return;
@@ -9093,7 +9093,7 @@ function r0(t, e, n, r, u) {
9093
9093
  d = { start: l.from, endA: l.to, endB: l.to };
9094
9094
  else {
9095
9095
  if (a.sel) {
9096
- let C = ri(t, t.state.doc, a.sel);
9096
+ let C = ui(t, t.state.doc, a.sel);
9097
9097
  if (C && !C.eq(t.state.selection)) {
9098
9098
  let M = t.state.tr.setSelection(C);
9099
9099
  i && M.setMeta("composition", i), t.dispatch(M);
@@ -9119,7 +9119,7 @@ function r0(t, e, n, r, u) {
9119
9119
  let y = d.start, _ = d.endA, E = (C) => {
9120
9120
  let M = C || t.state.tr.replace(y, _, a.doc.slice(d.start - a.from, d.endB - a.from));
9121
9121
  if (a.sel) {
9122
- let N = ri(t, M.doc, a.sel);
9122
+ let N = ui(t, M.doc, a.sel);
9123
9123
  N && !(H && t.composing && N.empty && (d.start != d.endB || t.input.lastChromeDelete < Date.now() - 100) && (N.head == y || N.head == M.mapping.map(_) - 1) || G && N.empty && N.head == y) && M.setSelection(N);
9124
9124
  }
9125
9125
  return i && M.setMeta("composition", i), M.scrollIntoView();
@@ -9143,8 +9143,8 @@ function r0(t, e, n, r, u) {
9143
9143
  else
9144
9144
  t.dispatch(E());
9145
9145
  }
9146
- function ri(t, e, n) {
9147
- return Math.max(n.anchor, n.head) > e.content.size ? null : Kr(t, e.resolve(n.anchor), e.resolve(n.head));
9146
+ function ui(t, e, n) {
9147
+ return Math.max(n.anchor, n.head) > e.content.size ? null : Zr(t, e.resolve(n.anchor), e.resolve(n.head));
9148
9148
  }
9149
9149
  function u0(t, e) {
9150
9150
  let n = t.firstChild.marks, r = e.firstChild.marks, u = n, i = r, s, o, l;
@@ -9203,14 +9203,14 @@ function s0(t, e, n, r, u) {
9203
9203
  }
9204
9204
  if (s < i && t.size < e.size) {
9205
9205
  let l = r <= i && r >= s ? i - r : 0;
9206
- i -= l, i && i < e.size && ui(e.textBetween(i - 1, i + 1)) && (i += l ? 1 : -1), o = i + (o - s), s = i;
9206
+ i -= l, i && i < e.size && ii(e.textBetween(i - 1, i + 1)) && (i += l ? 1 : -1), o = i + (o - s), s = i;
9207
9207
  } else if (o < i) {
9208
9208
  let l = r <= i && r >= o ? i - r : 0;
9209
- i -= l, i && i < t.size && ui(t.textBetween(i - 1, i + 1)) && (i += l ? 1 : -1), s = i + (s - o), o = i;
9209
+ i -= l, i && i < t.size && ii(t.textBetween(i - 1, i + 1)) && (i += l ? 1 : -1), s = i + (s - o), o = i;
9210
9210
  }
9211
9211
  return { start: i, endA: s, endB: o };
9212
9212
  }
9213
- function ui(t) {
9213
+ function ii(t) {
9214
9214
  if (t.length != 2)
9215
9215
  return !1;
9216
9216
  let e = t.charCodeAt(0), n = t.charCodeAt(1);
@@ -9225,7 +9225,7 @@ class ao {
9225
9225
  added to the document.
9226
9226
  */
9227
9227
  constructor(e, n) {
9228
- this._root = null, this.focused = !1, this.trackWrites = null, this.mounted = !1, this.markCursor = null, this.cursorWrapper = null, this.lastSelectedViewDesc = void 0, this.input = new Sc(), this.prevDirectPlugins = [], this.pluginViews = [], this.requiresGeckoHackNode = !1, this.dragging = null, this._props = n, this.state = n.state, this.directPlugins = n.plugins || [], this.directPlugins.forEach(ai), this.dispatch = this.dispatch.bind(this), this.dom = e && e.mount || document.createElement("div"), e && (e.appendChild ? e.appendChild(this.dom) : typeof e == "function" ? e(this.dom) : e.mount && (this.mounted = !0)), this.editable = oi(this), si(this), this.nodeViews = li(this), this.docView = Lu(this.state.doc, ii(this), Xn(this), this.dom, this), this.domObserver = new Gc(this, (r, u, i, s) => r0(this, r, u, i, s)), this.domObserver.start(), Ac(this), this.updatePluginViews();
9228
+ this._root = null, this.focused = !1, this.trackWrites = null, this.mounted = !1, this.markCursor = null, this.cursorWrapper = null, this.lastSelectedViewDesc = void 0, this.input = new Sc(), this.prevDirectPlugins = [], this.pluginViews = [], this.requiresGeckoHackNode = !1, this.dragging = null, this._props = n, this.state = n.state, this.directPlugins = n.plugins || [], this.directPlugins.forEach(ci), this.dispatch = this.dispatch.bind(this), this.dom = e && e.mount || document.createElement("div"), e && (e.appendChild ? e.appendChild(this.dom) : typeof e == "function" ? e(this.dom) : e.mount && (this.mounted = !0)), this.editable = li(this), oi(this), this.nodeViews = ai(this), this.docView = qu(this.state.doc, si(this), Xn(this), this.dom, this), this.domObserver = new Gc(this, (r, u, i, s) => r0(this, r, u, i, s)), this.domObserver.start(), Ac(this), this.updatePluginViews();
9229
9229
  }
9230
9230
  /**
9231
9231
  Holds `true` when a
@@ -9253,9 +9253,9 @@ class ao {
9253
9253
  the DOM.
9254
9254
  */
9255
9255
  update(e) {
9256
- e.handleDOMEvents != this._props.handleDOMEvents && Nr(this);
9256
+ e.handleDOMEvents != this._props.handleDOMEvents && Ir(this);
9257
9257
  let n = this._props;
9258
- this._props = e, e.plugins && (e.plugins.forEach(ai), this.directPlugins = e.plugins), this.updateStateInner(e.state, n);
9258
+ this._props = e, e.plugins && (e.plugins.forEach(ci), this.directPlugins = e.plugins), this.updateStateInner(e.state, n);
9259
9259
  }
9260
9260
  /**
9261
9261
  Update the view by updating existing props object with the object
@@ -9284,11 +9284,11 @@ class ao {
9284
9284
  e.storedMarks && this.composing && (no(this), s = !0), this.state = e;
9285
9285
  let o = u.plugins != e.plugins || this._props.plugins != n.plugins;
9286
9286
  if (o || this._props.plugins != n.plugins || this._props.nodeViews != n.nodeViews) {
9287
- let h = li(this);
9287
+ let h = ai(this);
9288
9288
  l0(h, this.nodeViews) && (this.nodeViews = h, i = !0);
9289
9289
  }
9290
- (o || n.handleDOMEvents != this._props.handleDOMEvents) && Nr(this), this.editable = oi(this), si(this);
9291
- let l = Xn(this), a = ii(this), c = u.plugins != e.plugins && !u.doc.eq(e.doc) ? "reset" : e.scrollToSelection > u.scrollToSelection ? "to selection" : "preserve", f = i || !this.docView.matchesNode(e.doc, a, l);
9290
+ (o || n.handleDOMEvents != this._props.handleDOMEvents) && Ir(this), this.editable = li(this), oi(this);
9291
+ let l = Xn(this), a = si(this), c = u.plugins != e.plugins && !u.doc.eq(e.doc) ? "reset" : e.scrollToSelection > u.scrollToSelection ? "to selection" : "preserve", f = i || !this.docView.matchesNode(e.doc, a, l);
9292
9292
  (f || !e.selection.eq(u.selection)) && (s = !0);
9293
9293
  let p = c == "preserve" && s && this.dom.style.overflowAnchor == null && qa(this);
9294
9294
  if (s) {
@@ -9296,7 +9296,7 @@ class ao {
9296
9296
  let h = f && (G || H) && !this.composing && !u.selection.empty && !e.selection.empty && o0(u.selection, e.selection);
9297
9297
  if (f) {
9298
9298
  let d = H ? this.trackWrites = this.domSelectionRange().focusNode : null;
9299
- this.composing && (this.input.compositionNode = Lc(this)), (i || !this.docView.update(e.doc, a, l, this)) && (this.docView.updateOuterDeco(a), this.docView.destroy(), this.docView = Lu(e.doc, a, l, this.dom, this)), d && !this.trackWrites && (h = !0);
9299
+ this.composing && (this.input.compositionNode = Lc(this)), (i || !this.docView.update(e.doc, a, l, this)) && (this.docView.updateOuterDeco(a), this.docView.destroy(), this.docView = qu(e.doc, a, l, this.dom, this)), d && !this.trackWrites && (h = !0);
9300
9300
  }
9301
9301
  h || !(this.input.mouseDown && this.domObserver.currentSelection.eq(this.domSelectionRange()) && cc(this)) ? Me(this, h) : (Hs(this, e.selection), this.domObserver.setCurSelection()), this.domObserver.start();
9302
9302
  }
@@ -9310,9 +9310,9 @@ class ao {
9310
9310
  if (!(!e || !this.dom.contains(e.nodeType == 1 ? e : e.parentNode))) {
9311
9311
  if (!this.someProp("handleScrollToSelection", (n) => n(this))) if (this.state.selection instanceof S) {
9312
9312
  let n = this.docView.domAfterPos(this.state.selection.from);
9313
- n.nodeType == 1 && Iu(this, n.getBoundingClientRect(), e);
9313
+ n.nodeType == 1 && Ru(this, n.getBoundingClientRect(), e);
9314
9314
  } else
9315
- Iu(this, this.coordsAtPos(this.state.selection.head, 1), e);
9315
+ Ru(this, this.coordsAtPos(this.state.selection.head, 1), e);
9316
9316
  }
9317
9317
  }
9318
9318
  destroyPluginViews() {
@@ -9494,13 +9494,13 @@ class ao {
9494
9494
  [`handlePaste`](https://prosemirror.net/docs/ref/#view.EditorProps.handlePaste) hook.
9495
9495
  */
9496
9496
  pasteHTML(e, n) {
9497
- return qt(this, "", e, !1, n || new ClipboardEvent("paste"));
9497
+ return Lt(this, "", e, !1, n || new ClipboardEvent("paste"));
9498
9498
  }
9499
9499
  /**
9500
9500
  Run the editor's paste logic with the given plain-text input.
9501
9501
  */
9502
9502
  pasteText(e, n) {
9503
- return qt(this, e, null, !0, n || new ClipboardEvent("paste"));
9503
+ return Lt(this, e, null, !0, n || new ClipboardEvent("paste"));
9504
9504
  }
9505
9505
  /**
9506
9506
  Serialize the given slice as it would be if it was copied from
@@ -9511,7 +9511,7 @@ class ao {
9511
9511
  [`transformCopied`](https://prosemirror.net/docs/ref/#view.EditorProps.transformCopied)).
9512
9512
  */
9513
9513
  serializeForClipboard(e) {
9514
- return Zr(this, e);
9514
+ return Gr(this, e);
9515
9515
  }
9516
9516
  /**
9517
9517
  Removes the editor from the DOM and destroys all [node
@@ -9552,7 +9552,7 @@ ao.prototype.dispatch = function(t) {
9552
9552
  let e = this._props.dispatchTransaction;
9553
9553
  e ? e.call(this, t) : this.updateState(this.state.apply(t));
9554
9554
  };
9555
- function ii(t) {
9555
+ function si(t) {
9556
9556
  let e = /* @__PURE__ */ Object.create(null);
9557
9557
  return e.class = "ProseMirror", e.contenteditable = String(t.editable), t.someProp("attributes", (n) => {
9558
9558
  if (typeof n == "function" && (n = n(t.state)), n)
@@ -9560,21 +9560,21 @@ function ii(t) {
9560
9560
  r == "class" ? e.class += " " + n[r] : r == "style" ? e.style = (e.style ? e.style + ";" : "") + n[r] : !e[r] && r != "contenteditable" && r != "nodeName" && (e[r] = String(n[r]));
9561
9561
  }), e.translate || (e.translate = "no"), [ce.node(0, t.state.doc.content.size, e)];
9562
9562
  }
9563
- function si(t) {
9563
+ function oi(t) {
9564
9564
  if (t.markCursor) {
9565
9565
  let e = document.createElement("img");
9566
9566
  e.className = "ProseMirror-separator", e.setAttribute("mark-placeholder", "true"), e.setAttribute("alt", ""), t.cursorWrapper = { dom: e, deco: ce.widget(t.state.selection.from, e, { raw: !0, marks: t.markCursor }) };
9567
9567
  } else
9568
9568
  t.cursorWrapper = null;
9569
9569
  }
9570
- function oi(t) {
9570
+ function li(t) {
9571
9571
  return !t.someProp("editable", (e) => e(t.state) === !1);
9572
9572
  }
9573
9573
  function o0(t, e) {
9574
9574
  let n = Math.min(t.$anchor.sharedDepth(t.head), e.$anchor.sharedDepth(e.head));
9575
9575
  return t.$anchor.start(n) != e.$anchor.start(n);
9576
9576
  }
9577
- function li(t) {
9577
+ function ai(t) {
9578
9578
  let e = /* @__PURE__ */ Object.create(null);
9579
9579
  function n(r) {
9580
9580
  for (let u in r)
@@ -9593,7 +9593,7 @@ function l0(t, e) {
9593
9593
  r++;
9594
9594
  return n != r;
9595
9595
  }
9596
- function ai(t) {
9596
+ function ci(t) {
9597
9597
  if (t.spec.state || t.spec.filterTransaction || t.spec.appendTransaction)
9598
9598
  throw new RangeError("Plugins passed directly to the view must not have a state component");
9599
9599
  }
@@ -9783,12 +9783,12 @@ const a0 = ["p", 0], c0 = ["blockquote", 0], f0 = ["hr"], d0 = ["pre", ["code",
9783
9783
  return b0;
9784
9784
  }
9785
9785
  }
9786
- }, k0 = new Pr({ nodes: p0, marks: x0 }), ci = {};
9786
+ }, k0 = new Lr({ nodes: p0, marks: x0 }), fi = {};
9787
9787
  function y0(t) {
9788
- let e = ci[t];
9788
+ let e = fi[t];
9789
9789
  if (e)
9790
9790
  return e;
9791
- e = ci[t] = [];
9791
+ e = fi[t] = [];
9792
9792
  for (let n = 0; n < 128; n++) {
9793
9793
  const r = String.fromCharCode(n);
9794
9794
  e.push(r);
@@ -9841,12 +9841,12 @@ function kt(t, e) {
9841
9841
  }
9842
9842
  kt.defaultChars = ";/?:@&=+$,#";
9843
9843
  kt.componentChars = "";
9844
- const fi = {};
9844
+ const di = {};
9845
9845
  function C0(t) {
9846
- let e = fi[t];
9846
+ let e = di[t];
9847
9847
  if (e)
9848
9848
  return e;
9849
- e = fi[t] = [];
9849
+ e = di[t] = [];
9850
9850
  for (let n = 0; n < 128; n++) {
9851
9851
  const r = String.fromCharCode(n);
9852
9852
  /^[0-9a-z]$/i.test(r) ? e.push(r) : e.push("%" + ("0" + n.toString(16).toUpperCase()).slice(-2));
@@ -9855,8 +9855,8 @@ function C0(t) {
9855
9855
  e[t.charCodeAt(n)] = t[n];
9856
9856
  return e;
9857
9857
  }
9858
- function Zt(t, e, n) {
9859
- typeof e != "string" && (n = e, e = Zt.defaultChars), typeof n > "u" && (n = !0);
9858
+ function Kt(t, e, n) {
9859
+ typeof e != "string" && (n = e, e = Kt.defaultChars), typeof n > "u" && (n = !0);
9860
9860
  const r = C0(e);
9861
9861
  let u = "";
9862
9862
  for (let i = 0, s = t.length; i < s; i++) {
@@ -9884,20 +9884,20 @@ function Zt(t, e, n) {
9884
9884
  }
9885
9885
  return u;
9886
9886
  }
9887
- Zt.defaultChars = ";/?:@&=+$,-_.!~*'()#";
9888
- Zt.componentChars = "-_.!~*'()";
9889
- function tu(t) {
9887
+ Kt.defaultChars = ";/?:@&=+$,-_.!~*'()#";
9888
+ Kt.componentChars = "-_.!~*'()";
9889
+ function nu(t) {
9890
9890
  let e = "";
9891
9891
  return e += t.protocol || "", e += t.slashes ? "//" : "", e += t.auth ? t.auth + "@" : "", t.hostname && t.hostname.indexOf(":") !== -1 ? e += "[" + t.hostname + "]" : e += t.hostname || "", e += t.port ? ":" + t.port : "", e += t.pathname || "", e += t.search || "", e += t.hash || "", e;
9892
9892
  }
9893
- function Cn() {
9893
+ function yn() {
9894
9894
  this.protocol = null, this.slashes = null, this.auth = null, this.port = null, this.hostname = null, this.hash = null, this.search = null, this.pathname = null;
9895
9895
  }
9896
9896
  const D0 = /^([a-z0-9.+-]+:)/i, _0 = /:[0-9]*$/, E0 = /^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/, S0 = ["<", ">", '"', "`", " ", "\r", `
9897
- `, " "], A0 = ["{", "}", "|", "\\", "^", "`"].concat(S0), M0 = ["'"].concat(A0), di = ["%", "/", "?", ";", "#"].concat(M0), hi = ["/", "?", "#"], w0 = 255, pi = /^[+a-z0-9A-Z_-]{0,63}$/, T0 = /^([+a-z0-9A-Z_-]{0,63})(.*)$/, mi = {
9897
+ `, " "], A0 = ["{", "}", "|", "\\", "^", "`"].concat(S0), M0 = ["'"].concat(A0), hi = ["%", "/", "?", ";", "#"].concat(M0), pi = ["/", "?", "#"], w0 = 255, mi = /^[+a-z0-9A-Z_-]{0,63}$/, T0 = /^([+a-z0-9A-Z_-]{0,63})(.*)$/, gi = {
9898
9898
  javascript: !0,
9899
9899
  "javascript:": !0
9900
- }, gi = {
9900
+ }, bi = {
9901
9901
  http: !0,
9902
9902
  https: !0,
9903
9903
  ftp: !0,
@@ -9909,12 +9909,12 @@ const D0 = /^([a-z0-9.+-]+:)/i, _0 = /:[0-9]*$/, E0 = /^(\/\/?(?!\/)[^\?\s]*)(\?
9909
9909
  "gopher:": !0,
9910
9910
  "file:": !0
9911
9911
  };
9912
- function nu(t, e) {
9913
- if (t && t instanceof Cn) return t;
9914
- const n = new Cn();
9912
+ function ru(t, e) {
9913
+ if (t && t instanceof yn) return t;
9914
+ const n = new yn();
9915
9915
  return n.parse(t, e), n;
9916
9916
  }
9917
- Cn.prototype.parse = function(t, e) {
9917
+ yn.prototype.parse = function(t, e) {
9918
9918
  let n, r, u, i = t;
9919
9919
  if (i = i.trim(), !e && t.split("#").length === 1) {
9920
9920
  const a = E0.exec(i);
@@ -9922,14 +9922,14 @@ Cn.prototype.parse = function(t, e) {
9922
9922
  return this.pathname = a[1], a[2] && (this.search = a[2]), this;
9923
9923
  }
9924
9924
  let s = D0.exec(i);
9925
- if (s && (s = s[0], n = s.toLowerCase(), this.protocol = s, i = i.substr(s.length)), (e || s || i.match(/^\/\/[^@\/]+@[^@\/]+/)) && (u = i.substr(0, 2) === "//", u && !(s && mi[s]) && (i = i.substr(2), this.slashes = !0)), !mi[s] && (u || s && !gi[s])) {
9925
+ if (s && (s = s[0], n = s.toLowerCase(), this.protocol = s, i = i.substr(s.length)), (e || s || i.match(/^\/\/[^@\/]+@[^@\/]+/)) && (u = i.substr(0, 2) === "//", u && !(s && gi[s]) && (i = i.substr(2), this.slashes = !0)), !gi[s] && (u || s && !bi[s])) {
9926
9926
  let a = -1;
9927
- for (let d = 0; d < hi.length; d++)
9928
- r = i.indexOf(hi[d]), r !== -1 && (a === -1 || r < a) && (a = r);
9927
+ for (let d = 0; d < pi.length; d++)
9928
+ r = i.indexOf(pi[d]), r !== -1 && (a === -1 || r < a) && (a = r);
9929
9929
  let c, f;
9930
9930
  a === -1 ? f = i.lastIndexOf("@") : f = i.lastIndexOf("@", a), f !== -1 && (c = i.slice(0, f), i = i.slice(f + 1), this.auth = c), a = -1;
9931
- for (let d = 0; d < di.length; d++)
9932
- r = i.indexOf(di[d]), r !== -1 && (a === -1 || r < a) && (a = r);
9931
+ for (let d = 0; d < hi.length; d++)
9932
+ r = i.indexOf(hi[d]), r !== -1 && (a === -1 || r < a) && (a = r);
9933
9933
  a === -1 && (a = i.length), i[a - 1] === ":" && a--;
9934
9934
  const p = i.slice(0, a);
9935
9935
  i = i.slice(a), this.parseHost(p), this.hostname = this.hostname || "";
@@ -9938,11 +9938,11 @@ Cn.prototype.parse = function(t, e) {
9938
9938
  const d = this.hostname.split(/\./);
9939
9939
  for (let m = 0, g = d.length; m < g; m++) {
9940
9940
  const b = d[m];
9941
- if (b && !b.match(pi)) {
9941
+ if (b && !b.match(mi)) {
9942
9942
  let k = "";
9943
9943
  for (let y = 0, _ = b.length; y < _; y++)
9944
9944
  b.charCodeAt(y) > 127 ? k += "x" : k += b[y];
9945
- if (!k.match(pi)) {
9945
+ if (!k.match(mi)) {
9946
9946
  const y = d.slice(0, m), _ = d.slice(m + 1), E = b.match(T0);
9947
9947
  E && (y.push(E[1]), _.unshift(E[2])), _.length && (i = _.join(".") + i), this.hostname = y.join(".");
9948
9948
  break;
@@ -9955,24 +9955,24 @@ Cn.prototype.parse = function(t, e) {
9955
9955
  const o = i.indexOf("#");
9956
9956
  o !== -1 && (this.hash = i.substr(o), i = i.slice(0, o));
9957
9957
  const l = i.indexOf("?");
9958
- return l !== -1 && (this.search = i.substr(l), i = i.slice(0, l)), i && (this.pathname = i), gi[n] && this.hostname && !this.pathname && (this.pathname = ""), this;
9958
+ return l !== -1 && (this.search = i.substr(l), i = i.slice(0, l)), i && (this.pathname = i), bi[n] && this.hostname && !this.pathname && (this.pathname = ""), this;
9959
9959
  };
9960
- Cn.prototype.parseHost = function(t) {
9960
+ yn.prototype.parseHost = function(t) {
9961
9961
  let e = _0.exec(t);
9962
9962
  e && (e = e[0], e !== ":" && (this.port = e.substr(1)), t = t.substr(0, t.length - e.length)), t && (this.hostname = t);
9963
9963
  };
9964
9964
  const O0 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9965
9965
  __proto__: null,
9966
9966
  decode: kt,
9967
- encode: Zt,
9968
- format: tu,
9969
- parse: nu
9970
- }, Symbol.toStringTag, { value: "Module" })), co = /[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/, fo = /[\0-\x1F\x7F-\x9F]/, F0 = /[\xAD\u0600-\u0605\u061C\u06DD\u070F\u0890\u0891\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804[\uDCBD\uDCCD]|\uD80D[\uDC30-\uDC3F]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/, ru = /[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1B7D\u1B7E\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDEAD\uDF55-\uDF59\uDF86-\uDF89]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5A\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDEB9\uDF3C-\uDF3E]|\uD806[\uDC3B\uDD44-\uDD46\uDDE2\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2\uDF00-\uDF09]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8\uDF43-\uDF4F\uDFFF]|\uD809[\uDC70-\uDC74]|\uD80B[\uDFF1\uDFF2]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A\uDFE2]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/, ho = /[\$\+<->\^`\|~\xA2-\xA6\xA8\xA9\xAC\xAE-\xB1\xB4\xB8\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0384\u0385\u03F6\u0482\u058D-\u058F\u0606-\u0608\u060B\u060E\u060F\u06DE\u06E9\u06FD\u06FE\u07F6\u07FE\u07FF\u0888\u09F2\u09F3\u09FA\u09FB\u0AF1\u0B70\u0BF3-\u0BFA\u0C7F\u0D4F\u0D79\u0E3F\u0F01-\u0F03\u0F13\u0F15-\u0F17\u0F1A-\u0F1F\u0F34\u0F36\u0F38\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE\u0FCF\u0FD5-\u0FD8\u109E\u109F\u1390-\u1399\u166D\u17DB\u1940\u19DE-\u19FF\u1B61-\u1B6A\u1B74-\u1B7C\u1FBD\u1FBF-\u1FC1\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED-\u1FEF\u1FFD\u1FFE\u2044\u2052\u207A-\u207C\u208A-\u208C\u20A0-\u20C0\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F\u218A\u218B\u2190-\u2307\u230C-\u2328\u232B-\u2426\u2440-\u244A\u249C-\u24E9\u2500-\u2767\u2794-\u27C4\u27C7-\u27E5\u27F0-\u2982\u2999-\u29D7\u29DC-\u29FB\u29FE-\u2B73\u2B76-\u2B95\u2B97-\u2BFF\u2CE5-\u2CEA\u2E50\u2E51\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFF\u3004\u3012\u3013\u3020\u3036\u3037\u303E\u303F\u309B\u309C\u3190\u3191\u3196-\u319F\u31C0-\u31E3\u31EF\u3200-\u321E\u322A-\u3247\u3250\u3260-\u327F\u328A-\u32B0\u32C0-\u33FF\u4DC0-\u4DFF\uA490-\uA4C6\uA700-\uA716\uA720\uA721\uA789\uA78A\uA828-\uA82B\uA836-\uA839\uAA77-\uAA79\uAB5B\uAB6A\uAB6B\uFB29\uFBB2-\uFBC2\uFD40-\uFD4F\uFDCF\uFDFC-\uFDFF\uFE62\uFE64-\uFE66\uFE69\uFF04\uFF0B\uFF1C-\uFF1E\uFF3E\uFF40\uFF5C\uFF5E\uFFE0-\uFFE6\uFFE8-\uFFEE\uFFFC\uFFFD]|\uD800[\uDD37-\uDD3F\uDD79-\uDD89\uDD8C-\uDD8E\uDD90-\uDD9C\uDDA0\uDDD0-\uDDFC]|\uD802[\uDC77\uDC78\uDEC8]|\uD805\uDF3F|\uD807[\uDFD5-\uDFF1]|\uD81A[\uDF3C-\uDF3F\uDF45]|\uD82F\uDC9C|\uD833[\uDF50-\uDFC3]|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD64\uDD6A-\uDD6C\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDEA\uDE00-\uDE41\uDE45\uDF00-\uDF56]|\uD835[\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85\uDE86]|\uD838[\uDD4F\uDEFF]|\uD83B[\uDCAC\uDCB0\uDD2E\uDEF0\uDEF1]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD0D-\uDDAD\uDDE6-\uDE02\uDE10-\uDE3B\uDE40-\uDE48\uDE50\uDE51\uDE60-\uDE65\uDF00-\uDFFF]|\uD83D[\uDC00-\uDED7\uDEDC-\uDEEC\uDEF0-\uDEFC\uDF00-\uDF76\uDF7B-\uDFD9\uDFE0-\uDFEB\uDFF0]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDCB0\uDCB1\uDD00-\uDE53\uDE60-\uDE6D\uDE70-\uDE7C\uDE80-\uDE88\uDE90-\uDEBD\uDEBF-\uDEC5\uDECE-\uDEDB\uDEE0-\uDEE8\uDEF0-\uDEF8\uDF00-\uDF92\uDF94-\uDFCA]/, po = /[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/, N0 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9967
+ encode: Kt,
9968
+ format: nu,
9969
+ parse: ru
9970
+ }, Symbol.toStringTag, { value: "Module" })), co = /[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/, fo = /[\0-\x1F\x7F-\x9F]/, F0 = /[\xAD\u0600-\u0605\u061C\u06DD\u070F\u0890\u0891\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804[\uDCBD\uDCCD]|\uD80D[\uDC30-\uDC3F]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/, uu = /[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1B7D\u1B7E\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDEAD\uDF55-\uDF59\uDF86-\uDF89]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5A\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDEB9\uDF3C-\uDF3E]|\uD806[\uDC3B\uDD44-\uDD46\uDDE2\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2\uDF00-\uDF09]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8\uDF43-\uDF4F\uDFFF]|\uD809[\uDC70-\uDC74]|\uD80B[\uDFF1\uDFF2]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A\uDFE2]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/, ho = /[\$\+<->\^`\|~\xA2-\xA6\xA8\xA9\xAC\xAE-\xB1\xB4\xB8\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0384\u0385\u03F6\u0482\u058D-\u058F\u0606-\u0608\u060B\u060E\u060F\u06DE\u06E9\u06FD\u06FE\u07F6\u07FE\u07FF\u0888\u09F2\u09F3\u09FA\u09FB\u0AF1\u0B70\u0BF3-\u0BFA\u0C7F\u0D4F\u0D79\u0E3F\u0F01-\u0F03\u0F13\u0F15-\u0F17\u0F1A-\u0F1F\u0F34\u0F36\u0F38\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE\u0FCF\u0FD5-\u0FD8\u109E\u109F\u1390-\u1399\u166D\u17DB\u1940\u19DE-\u19FF\u1B61-\u1B6A\u1B74-\u1B7C\u1FBD\u1FBF-\u1FC1\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED-\u1FEF\u1FFD\u1FFE\u2044\u2052\u207A-\u207C\u208A-\u208C\u20A0-\u20C0\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F\u218A\u218B\u2190-\u2307\u230C-\u2328\u232B-\u2426\u2440-\u244A\u249C-\u24E9\u2500-\u2767\u2794-\u27C4\u27C7-\u27E5\u27F0-\u2982\u2999-\u29D7\u29DC-\u29FB\u29FE-\u2B73\u2B76-\u2B95\u2B97-\u2BFF\u2CE5-\u2CEA\u2E50\u2E51\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFF\u3004\u3012\u3013\u3020\u3036\u3037\u303E\u303F\u309B\u309C\u3190\u3191\u3196-\u319F\u31C0-\u31E3\u31EF\u3200-\u321E\u322A-\u3247\u3250\u3260-\u327F\u328A-\u32B0\u32C0-\u33FF\u4DC0-\u4DFF\uA490-\uA4C6\uA700-\uA716\uA720\uA721\uA789\uA78A\uA828-\uA82B\uA836-\uA839\uAA77-\uAA79\uAB5B\uAB6A\uAB6B\uFB29\uFBB2-\uFBC2\uFD40-\uFD4F\uFDCF\uFDFC-\uFDFF\uFE62\uFE64-\uFE66\uFE69\uFF04\uFF0B\uFF1C-\uFF1E\uFF3E\uFF40\uFF5C\uFF5E\uFFE0-\uFFE6\uFFE8-\uFFEE\uFFFC\uFFFD]|\uD800[\uDD37-\uDD3F\uDD79-\uDD89\uDD8C-\uDD8E\uDD90-\uDD9C\uDDA0\uDDD0-\uDDFC]|\uD802[\uDC77\uDC78\uDEC8]|\uD805\uDF3F|\uD807[\uDFD5-\uDFF1]|\uD81A[\uDF3C-\uDF3F\uDF45]|\uD82F\uDC9C|\uD833[\uDF50-\uDFC3]|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD64\uDD6A-\uDD6C\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDEA\uDE00-\uDE41\uDE45\uDF00-\uDF56]|\uD835[\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85\uDE86]|\uD838[\uDD4F\uDEFF]|\uD83B[\uDCAC\uDCB0\uDD2E\uDEF0\uDEF1]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD0D-\uDDAD\uDDE6-\uDE02\uDE10-\uDE3B\uDE40-\uDE48\uDE50\uDE51\uDE60-\uDE65\uDF00-\uDFFF]|\uD83D[\uDC00-\uDED7\uDEDC-\uDEEC\uDEF0-\uDEFC\uDF00-\uDF76\uDF7B-\uDFD9\uDFE0-\uDFEB\uDFF0]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDCB0\uDCB1\uDD00-\uDE53\uDE60-\uDE6D\uDE70-\uDE7C\uDE80-\uDE88\uDE90-\uDEBD\uDEBF-\uDEC5\uDECE-\uDEDB\uDEE0-\uDEE8\uDEF0-\uDEF8\uDF00-\uDF92\uDF94-\uDFCA]/, po = /[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/, N0 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9971
9971
  __proto__: null,
9972
9972
  Any: co,
9973
9973
  Cc: fo,
9974
9974
  Cf: F0,
9975
- P: ru,
9975
+ P: uu,
9976
9976
  S: ho,
9977
9977
  Z: po
9978
9978
  }, Symbol.toStringTag, { value: "Module" })), I0 = new Uint16Array(
@@ -10033,14 +10033,14 @@ var Pe;
10033
10033
  (function(t) {
10034
10034
  t[t.VALUE_LENGTH = 49152] = "VALUE_LENGTH", t[t.BRANCH_LENGTH = 16256] = "BRANCH_LENGTH", t[t.JUMP_TABLE = 127] = "JUMP_TABLE";
10035
10035
  })(Pe || (Pe = {}));
10036
- function Ir(t) {
10036
+ function Rr(t) {
10037
10037
  return t >= z.ZERO && t <= z.NINE;
10038
10038
  }
10039
10039
  function L0(t) {
10040
10040
  return t >= z.UPPER_A && t <= z.UPPER_F || t >= z.LOWER_A && t <= z.LOWER_F;
10041
10041
  }
10042
10042
  function q0(t) {
10043
- return t >= z.UPPER_A && t <= z.UPPER_Z || t >= z.LOWER_A && t <= z.LOWER_Z || Ir(t);
10043
+ return t >= z.UPPER_A && t <= z.UPPER_Z || t >= z.LOWER_A && t <= z.LOWER_Z || Rr(t);
10044
10044
  }
10045
10045
  function V0(t) {
10046
10046
  return t === z.EQUALS || q0(t);
@@ -10117,7 +10117,7 @@ class $0 {
10117
10117
  const r = n;
10118
10118
  for (; n < e.length; ) {
10119
10119
  const u = e.charCodeAt(n);
10120
- if (Ir(u) || L0(u))
10120
+ if (Rr(u) || L0(u))
10121
10121
  n += 1;
10122
10122
  else
10123
10123
  return this.addToNumericResult(e, r, n, 16), this.emitNumericEntity(u, 3);
@@ -10137,7 +10137,7 @@ class $0 {
10137
10137
  const r = n;
10138
10138
  for (; n < e.length; ) {
10139
10139
  const u = e.charCodeAt(n);
10140
- if (Ir(u))
10140
+ if (Rr(u))
10141
10141
  n += 1;
10142
10142
  else
10143
10143
  return this.addToNumericResult(e, r, n, 10), this.emitNumericEntity(u, 2);
@@ -10291,7 +10291,7 @@ function go(t, e = Re.Legacy) {
10291
10291
  function J0(t) {
10292
10292
  return Object.prototype.toString.call(t);
10293
10293
  }
10294
- function uu(t) {
10294
+ function iu(t) {
10295
10295
  return J0(t) === "[object String]";
10296
10296
  }
10297
10297
  const j0 = Object.prototype.hasOwnProperty;
@@ -10312,10 +10312,10 @@ function Nn(t) {
10312
10312
  function bo(t, e, n) {
10313
10313
  return [].concat(t.slice(0, e), n, t.slice(e + 1));
10314
10314
  }
10315
- function iu(t) {
10315
+ function su(t) {
10316
10316
  return !(t >= 55296 && t <= 57343 || t >= 64976 && t <= 65007 || (t & 65535) === 65535 || (t & 65535) === 65534 || t >= 0 && t <= 8 || t === 11 || t >= 14 && t <= 31 || t >= 127 && t <= 159 || t > 1114111);
10317
10317
  }
10318
- function Dn(t) {
10318
+ function Cn(t) {
10319
10319
  if (t > 65535) {
10320
10320
  t -= 65536;
10321
10321
  const e = 55296 + (t >> 10), n = 56320 + (t & 1023);
@@ -10327,7 +10327,7 @@ const xo = /\\([!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~])/g, K0 = /&([a-z#][a-z0-9]{
10327
10327
  function Y0(t, e) {
10328
10328
  if (e.charCodeAt(0) === 35 && G0.test(e)) {
10329
10329
  const r = e[1].toLowerCase() === "x" ? parseInt(e.slice(2), 16) : parseInt(e.slice(1), 10);
10330
- return iu(r) ? Dn(r) : t;
10330
+ return su(r) ? Cn(r) : t;
10331
10331
  }
10332
10332
  const n = go(t);
10333
10333
  return n !== t ? n : t;
@@ -10364,7 +10364,7 @@ function F(t) {
10364
10364
  }
10365
10365
  return !1;
10366
10366
  }
10367
- function $t(t) {
10367
+ function Vt(t) {
10368
10368
  if (t >= 8192 && t <= 8202)
10369
10369
  return !0;
10370
10370
  switch (t) {
@@ -10388,10 +10388,10 @@ function $t(t) {
10388
10388
  }
10389
10389
  return !1;
10390
10390
  }
10391
- function Wt(t) {
10392
- return ru.test(t) || ho.test(t);
10391
+ function $t(t) {
10392
+ return uu.test(t) || ho.test(t);
10393
10393
  }
10394
- function Ht(t) {
10394
+ function Wt(t) {
10395
10395
  switch (t) {
10396
10396
  case 33:
10397
10397
  case 34:
@@ -10439,14 +10439,14 @@ const sf = { mdurl: O0, ucmicro: N0 }, of = /* @__PURE__ */ Object.freeze(/* @__
10439
10439
  assign: Nn,
10440
10440
  escapeHtml: $e,
10441
10441
  escapeRE: uf,
10442
- fromCodePoint: Dn,
10442
+ fromCodePoint: Cn,
10443
10443
  has: U0,
10444
- isMdAsciiPunct: Ht,
10445
- isPunctChar: Wt,
10444
+ isMdAsciiPunct: Wt,
10445
+ isPunctChar: $t,
10446
10446
  isSpace: F,
10447
- isString: uu,
10448
- isValidEntityCode: iu,
10449
- isWhiteSpace: $t,
10447
+ isString: iu,
10448
+ isValidEntityCode: su,
10449
+ isWhiteSpace: Vt,
10450
10450
  lib: sf,
10451
10451
  normalizeReference: In,
10452
10452
  unescapeAll: yt,
@@ -10893,8 +10893,8 @@ function Af(t) {
10893
10893
  for (e = t.tokens.length - 1; e >= 0; e--)
10894
10894
  t.tokens[e].type === "inline" && (yf.test(t.tokens[e].content) && Ef(t.tokens[e].children), yo.test(t.tokens[e].content) && Sf(t.tokens[e].children));
10895
10895
  }
10896
- const Mf = /['"]/, bi = /['"]/g, xi = "’";
10897
- function rn(t, e, n) {
10896
+ const Mf = /['"]/, xi = /['"]/g, ki = "’";
10897
+ function nn(t, e, n) {
10898
10898
  return t.slice(0, e) + n + t.slice(e + 1);
10899
10899
  }
10900
10900
  function wf(t, e) {
@@ -10909,8 +10909,8 @@ function wf(t, e) {
10909
10909
  let o = i.content, l = 0, a = o.length;
10910
10910
  e:
10911
10911
  for (; l < a; ) {
10912
- bi.lastIndex = l;
10913
- const c = bi.exec(o);
10912
+ xi.lastIndex = l;
10913
+ const c = xi.exec(o);
10914
10914
  if (!c)
10915
10915
  break;
10916
10916
  let f = !0, p = !0;
@@ -10934,9 +10934,9 @@ function wf(t, e) {
10934
10934
  m = t[n].content.charCodeAt(0);
10935
10935
  break;
10936
10936
  }
10937
- const g = Ht(d) || Wt(String.fromCharCode(d)), b = Ht(m) || Wt(String.fromCharCode(m)), k = $t(d), y = $t(m);
10937
+ const g = Wt(d) || $t(String.fromCharCode(d)), b = Wt(m) || $t(String.fromCharCode(m)), k = Vt(d), y = Vt(m);
10938
10938
  if (y ? f = !1 : b && (k || g || (f = !1)), k ? p = !1 : g && (y || b || (p = !1)), m === 34 && c[0] === '"' && d >= 48 && d <= 57 && (p = f = !1), f && p && (f = g, p = b), !f && !p) {
10939
- h && (i.content = rn(i.content, c.index, xi));
10939
+ h && (i.content = nn(i.content, c.index, ki));
10940
10940
  continue;
10941
10941
  }
10942
10942
  if (p)
@@ -10947,7 +10947,7 @@ function wf(t, e) {
10947
10947
  if (_.single === h && r[n].level === s) {
10948
10948
  _ = r[n];
10949
10949
  let E, A;
10950
- h ? (E = e.md.options.quotes[2], A = e.md.options.quotes[3]) : (E = e.md.options.quotes[0], A = e.md.options.quotes[1]), i.content = rn(i.content, c.index, A), t[_.token].content = rn(
10950
+ h ? (E = e.md.options.quotes[2], A = e.md.options.quotes[3]) : (E = e.md.options.quotes[0], A = e.md.options.quotes[1]), i.content = nn(i.content, c.index, A), t[_.token].content = nn(
10951
10951
  t[_.token].content,
10952
10952
  _.pos,
10953
10953
  E
@@ -10960,7 +10960,7 @@ function wf(t, e) {
10960
10960
  pos: c.index,
10961
10961
  single: h,
10962
10962
  level: s
10963
- }) : p && h && (i.content = rn(i.content, c.index, xi));
10963
+ }) : p && h && (i.content = nn(i.content, c.index, ki));
10964
10964
  }
10965
10965
  }
10966
10966
  }
@@ -10993,17 +10993,17 @@ const tr = [
10993
10993
  // and joins them with the rest of the text
10994
10994
  ["text_join", Of]
10995
10995
  ];
10996
- function su() {
10996
+ function ou() {
10997
10997
  this.ruler = new Y();
10998
10998
  for (let t = 0; t < tr.length; t++)
10999
10999
  this.ruler.push(tr[t][0], tr[t][1]);
11000
11000
  }
11001
- su.prototype.process = function(t) {
11001
+ ou.prototype.process = function(t) {
11002
11002
  const e = this.ruler.getRules("");
11003
11003
  for (let n = 0, r = e.length; n < r; n++)
11004
11004
  e[n](t);
11005
11005
  };
11006
- su.prototype.State = ko;
11006
+ ou.prototype.State = ko;
11007
11007
  function De(t, e, n, r) {
11008
11008
  this.src = t, this.md = e, this.env = n, this.tokens = r, this.bMarks = [], this.eMarks = [], this.tShift = [], this.sCount = [], this.bsCount = [], this.blkIndent = 0, this.line = 0, this.lineMax = 0, this.tight = !1, this.ddIndent = -1, this.listIndent = -1, this.parentType = "root", this.level = 0;
11009
11009
  const u = this.src;
@@ -11088,7 +11088,7 @@ function nr(t, e) {
11088
11088
  const n = t.bMarks[e] + t.tShift[e], r = t.eMarks[e];
11089
11089
  return t.src.slice(n, r);
11090
11090
  }
11091
- function ki(t) {
11091
+ function yi(t) {
11092
11092
  const e = [], n = t.length;
11093
11093
  let r = 0, u = t.charCodeAt(r), i = !1, s = 0, o = "";
11094
11094
  for (; r < n; )
@@ -11131,7 +11131,7 @@ function Nf(t, e, n, r) {
11131
11131
  }
11132
11132
  if (l = nr(t, e).trim(), l.indexOf("|") === -1 || t.sCount[e] - t.blkIndent >= 4)
11133
11133
  return !1;
11134
- a = ki(l), a.length && a[0] === "" && a.shift(), a.length && a[a.length - 1] === "" && a.pop();
11134
+ a = yi(l), a.length && a[0] === "" && a.shift(), a.length && a[a.length - 1] === "" && a.pop();
11135
11135
  const f = a.length;
11136
11136
  if (f === 0 || f !== c.length)
11137
11137
  return !1;
@@ -11160,7 +11160,7 @@ function Nf(t, e, n, r) {
11160
11160
  _ = !0;
11161
11161
  break;
11162
11162
  }
11163
- if (_ || (l = nr(t, u).trim(), !l) || t.sCount[u] - t.blkIndent >= 4 || (a = ki(l), a.length && a[0] === "" && a.shift(), a.length && a[a.length - 1] === "" && a.pop(), y += f - a.length, y > Ff))
11163
+ if (_ || (l = nr(t, u).trim(), !l) || t.sCount[u] - t.blkIndent >= 4 || (a = yi(l), a.length && a[0] === "" && a.shift(), a.length && a[a.length - 1] === "" && a.pop(), y += f - a.length, y > Ff))
11164
11164
  break;
11165
11165
  if (u === e + 2) {
11166
11166
  const A = t.push("tbody_open", "tbody", 1);
@@ -11303,7 +11303,7 @@ function vf(t, e, n, r) {
11303
11303
  const l = t.push("hr", "hr", 0);
11304
11304
  return l.map = [e, t.line], l.markup = Array(o + 1).join(String.fromCharCode(s)), !0;
11305
11305
  }
11306
- function yi(t, e) {
11306
+ function Ci(t, e) {
11307
11307
  const n = t.eMarks[e];
11308
11308
  let r = t.bMarks[e] + t.tShift[e];
11309
11309
  const u = t.src.charCodeAt(r++);
@@ -11316,7 +11316,7 @@ function yi(t, e) {
11316
11316
  }
11317
11317
  return r;
11318
11318
  }
11319
- function Ci(t, e) {
11319
+ function Di(t, e) {
11320
11320
  const n = t.bMarks[e] + t.tShift[e], r = t.eMarks[e];
11321
11321
  let u = n;
11322
11322
  if (u + 1 >= r)
@@ -11350,9 +11350,9 @@ function Pf(t, e, n, r) {
11350
11350
  let c = !1;
11351
11351
  r && t.parentType === "paragraph" && t.sCount[l] >= t.blkIndent && (c = !0);
11352
11352
  let f, p, h;
11353
- if ((h = Ci(t, l)) >= 0) {
11353
+ if ((h = Di(t, l)) >= 0) {
11354
11354
  if (f = !0, s = t.bMarks[l] + t.tShift[l], p = Number(t.src.slice(s, h - 1)), c && p !== 1) return !1;
11355
- } else if ((h = yi(t, l)) >= 0)
11355
+ } else if ((h = Ci(t, l)) >= 0)
11356
11356
  f = !1;
11357
11357
  else
11358
11358
  return !1;
@@ -11399,10 +11399,10 @@ function Pf(t, e, n, r) {
11399
11399
  if (st)
11400
11400
  break;
11401
11401
  if (f) {
11402
- if (h = Ci(t, l), h < 0)
11402
+ if (h = Di(t, l), h < 0)
11403
11403
  break;
11404
11404
  s = t.bMarks[l] + t.tShift[l];
11405
- } else if (h = yi(t, l), h < 0)
11405
+ } else if (h = Ci(t, l), h < 0)
11406
11406
  break;
11407
11407
  if (d !== t.src.charCodeAt(h - 1))
11408
11408
  break;
@@ -11681,7 +11681,7 @@ function nd(t, e, n) {
11681
11681
  const l = t.push("inline", "", 0);
11682
11682
  return l.content = s, l.map = [e, t.line], l.children = [], t.push("paragraph_close", "p", -1), t.parentType = u, !0;
11683
11683
  }
11684
- const un = [
11684
+ const rn = [
11685
11685
  // First 2 params - rule name & source. Secondary array - list of rules,
11686
11686
  // which can be terminated by this one.
11687
11687
  ["table", Nf, ["paragraph", "reference"]],
@@ -11698,8 +11698,8 @@ const un = [
11698
11698
  ];
11699
11699
  function Rn() {
11700
11700
  this.ruler = new Y();
11701
- for (let t = 0; t < un.length; t++)
11702
- this.ruler.push(un[t][0], un[t][1], { alt: (un[t][2] || []).slice() });
11701
+ for (let t = 0; t < rn.length; t++)
11702
+ this.ruler.push(rn[t][0], rn[t][1], { alt: (rn[t][2] || []).slice() });
11703
11703
  }
11704
11704
  Rn.prototype.tokenize = function(t, e, n) {
11705
11705
  const r = this.ruler.getRules(""), u = r.length, i = t.md.options.maxNesting;
@@ -11728,28 +11728,28 @@ Rn.prototype.parse = function(t, e, n, r) {
11728
11728
  this.tokenize(u, u.line, u.lineMax);
11729
11729
  };
11730
11730
  Rn.prototype.State = De;
11731
- function Gt(t, e, n, r) {
11731
+ function Zt(t, e, n, r) {
11732
11732
  this.src = t, this.env = n, this.md = e, this.tokens = r, this.tokens_meta = Array(r.length), this.pos = 0, this.posMax = this.src.length, this.level = 0, this.pending = "", this.pendingLevel = 0, this.cache = {}, this.delimiters = [], this._prev_delimiters = [], this.backticks = {}, this.backticksScanned = !1, this.linkLevel = 0;
11733
11733
  }
11734
- Gt.prototype.pushPending = function() {
11734
+ Zt.prototype.pushPending = function() {
11735
11735
  const t = new fe("text", "", 0);
11736
11736
  return t.content = this.pending, t.level = this.pendingLevel, this.tokens.push(t), this.pending = "", t;
11737
11737
  };
11738
- Gt.prototype.push = function(t, e, n) {
11738
+ Zt.prototype.push = function(t, e, n) {
11739
11739
  this.pending && this.pushPending();
11740
11740
  const r = new fe(t, e, n);
11741
11741
  let u = null;
11742
11742
  return n < 0 && (this.level--, this.delimiters = this._prev_delimiters.pop()), r.level = this.level, n > 0 && (this.level++, this._prev_delimiters.push(this.delimiters), this.delimiters = [], u = { delimiters: this.delimiters }), this.pendingLevel = this.level, this.tokens.push(r), this.tokens_meta.push(u), r;
11743
11743
  };
11744
- Gt.prototype.scanDelims = function(t, e) {
11744
+ Zt.prototype.scanDelims = function(t, e) {
11745
11745
  const n = this.posMax, r = this.src.charCodeAt(t), u = t > 0 ? this.src.charCodeAt(t - 1) : 32;
11746
11746
  let i = t;
11747
11747
  for (; i < n && this.src.charCodeAt(i) === r; )
11748
11748
  i++;
11749
- const s = i - t, o = i < n ? this.src.charCodeAt(i) : 32, l = Ht(u) || Wt(String.fromCharCode(u)), a = Ht(o) || Wt(String.fromCharCode(o)), c = $t(u), f = $t(o), p = !f && (!a || c || l), h = !c && (!l || f || a);
11749
+ const s = i - t, o = i < n ? this.src.charCodeAt(i) : 32, l = Wt(u) || $t(String.fromCharCode(u)), a = Wt(o) || $t(String.fromCharCode(o)), c = Vt(u), f = Vt(o), p = !f && (!a || c || l), h = !c && (!l || f || a);
11750
11750
  return { can_open: p && (e || !h || l), can_close: h && (e || !p || a), length: s };
11751
11751
  };
11752
- Gt.prototype.Token = fe;
11752
+ Zt.prototype.Token = fe;
11753
11753
  function rd(t) {
11754
11754
  switch (t) {
11755
11755
  case 10:
@@ -11830,11 +11830,11 @@ function od(t, e) {
11830
11830
  n++;
11831
11831
  return t.pos = n, !0;
11832
11832
  }
11833
- const ou = [];
11833
+ const lu = [];
11834
11834
  for (let t = 0; t < 256; t++)
11835
- ou.push(0);
11835
+ lu.push(0);
11836
11836
  "\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-".split("").forEach(function(t) {
11837
- ou[t.charCodeAt(0)] = 1;
11837
+ lu[t.charCodeAt(0)] = 1;
11838
11838
  });
11839
11839
  function ld(t, e) {
11840
11840
  let n = t.pos;
@@ -11854,7 +11854,7 @@ function ld(t, e) {
11854
11854
  const s = "\\" + i;
11855
11855
  if (!e) {
11856
11856
  const o = t.push("text_special", "", 0);
11857
- u < 256 && ou[u] !== 0 ? o.content = i : o.content = s, o.markup = s, o.info = "escape";
11857
+ u < 256 && lu[u] !== 0 ? o.content = i : o.content = s, o.markup = s, o.info = "escape";
11858
11858
  }
11859
11859
  return t.pos = n + 1, !0;
11860
11860
  }
@@ -11909,7 +11909,7 @@ function cd(t, e) {
11909
11909
  });
11910
11910
  return t.pos += u.length, !0;
11911
11911
  }
11912
- function Di(t, e) {
11912
+ function _i(t, e) {
11913
11913
  let n;
11914
11914
  const r = [], u = e.length;
11915
11915
  for (let i = 0; i < u; i++) {
@@ -11929,9 +11929,9 @@ function Di(t, e) {
11929
11929
  }
11930
11930
  function fd(t) {
11931
11931
  const e = t.tokens_meta, n = t.tokens_meta.length;
11932
- Di(t, t.delimiters);
11932
+ _i(t, t.delimiters);
11933
11933
  for (let r = 0; r < n; r++)
11934
- e[r] && e[r].delimiters && Di(t, e[r].delimiters);
11934
+ e[r] && e[r].delimiters && _i(t, e[r].delimiters);
11935
11935
  }
11936
11936
  const _o = {
11937
11937
  tokenize: cd,
@@ -11967,7 +11967,7 @@ function dd(t, e) {
11967
11967
  }
11968
11968
  return t.pos += u.length, !0;
11969
11969
  }
11970
- function _i(t, e) {
11970
+ function Ei(t, e) {
11971
11971
  const n = e.length;
11972
11972
  for (let r = n - 1; r >= 0; r--) {
11973
11973
  const u = e[r];
@@ -11983,9 +11983,9 @@ function _i(t, e) {
11983
11983
  }
11984
11984
  function hd(t) {
11985
11985
  const e = t.tokens_meta, n = t.tokens_meta.length;
11986
- _i(t, t.delimiters);
11986
+ Ei(t, t.delimiters);
11987
11987
  for (let r = 0; r < n; r++)
11988
- e[r] && e[r].delimiters && _i(t, e[r].delimiters);
11988
+ e[r] && e[r].delimiters && Ei(t, e[r].delimiters);
11989
11989
  }
11990
11990
  const Eo = {
11991
11991
  tokenize: dd,
@@ -12151,7 +12151,7 @@ function Sd(t, e) {
12151
12151
  if (i) {
12152
12152
  if (!e) {
12153
12153
  const s = i[1][0].toLowerCase() === "x" ? parseInt(i[1].slice(1), 16) : parseInt(i[1], 10), o = t.push("text_special", "", 0);
12154
- o.content = iu(s) ? Dn(s) : Dn(65533), o.markup = i[0], o.info = "entity";
12154
+ o.content = su(s) ? Cn(s) : Cn(65533), o.markup = i[0], o.info = "entity";
12155
12155
  }
12156
12156
  return t.pos += i[0].length, !0;
12157
12157
  }
@@ -12170,7 +12170,7 @@ function Sd(t, e) {
12170
12170
  }
12171
12171
  return !1;
12172
12172
  }
12173
- function Ei(t) {
12173
+ function Si(t) {
12174
12174
  const e = {}, n = t.length;
12175
12175
  if (!n) return;
12176
12176
  let r = 0, u = -2;
@@ -12197,9 +12197,9 @@ function Ei(t) {
12197
12197
  }
12198
12198
  function Ad(t) {
12199
12199
  const e = t.tokens_meta, n = t.tokens_meta.length;
12200
- Ei(t.delimiters);
12200
+ Si(t.delimiters);
12201
12201
  for (let r = 0; r < n; r++)
12202
- e[r] && e[r].delimiters && Ei(e[r].delimiters);
12202
+ e[r] && e[r].delimiters && Si(e[r].delimiters);
12203
12203
  }
12204
12204
  function Md(t) {
12205
12205
  let e, n, r = 0;
@@ -12229,7 +12229,7 @@ const rr = [
12229
12229
  // rule below merges unused segments back with the rest of the text
12230
12230
  ["fragments_join", Md]
12231
12231
  ];
12232
- function Yt() {
12232
+ function Gt() {
12233
12233
  this.ruler = new Y();
12234
12234
  for (let t = 0; t < rr.length; t++)
12235
12235
  this.ruler.push(rr[t][0], rr[t][1]);
@@ -12237,7 +12237,7 @@ function Yt() {
12237
12237
  for (let t = 0; t < ur.length; t++)
12238
12238
  this.ruler2.push(ur[t][0], ur[t][1]);
12239
12239
  }
12240
- Yt.prototype.skipToken = function(t) {
12240
+ Gt.prototype.skipToken = function(t) {
12241
12241
  const e = t.pos, n = this.ruler.getRules(""), r = n.length, u = t.md.options.maxNesting, i = t.cache;
12242
12242
  if (typeof i[e] < "u") {
12243
12243
  t.pos = i[e];
@@ -12255,7 +12255,7 @@ Yt.prototype.skipToken = function(t) {
12255
12255
  t.pos = t.posMax;
12256
12256
  s || t.pos++, i[e] = t.pos;
12257
12257
  };
12258
- Yt.prototype.tokenize = function(t) {
12258
+ Gt.prototype.tokenize = function(t) {
12259
12259
  const e = this.ruler.getRules(""), n = e.length, r = t.posMax, u = t.md.options.maxNesting;
12260
12260
  for (; t.pos < r; ) {
12261
12261
  const i = t.pos;
@@ -12277,17 +12277,17 @@ Yt.prototype.tokenize = function(t) {
12277
12277
  }
12278
12278
  t.pending && t.pushPending();
12279
12279
  };
12280
- Yt.prototype.parse = function(t, e, n, r) {
12280
+ Gt.prototype.parse = function(t, e, n, r) {
12281
12281
  const u = new this.State(t, e, n, r);
12282
12282
  this.tokenize(u);
12283
12283
  const i = this.ruler2.getRules(""), s = i.length;
12284
12284
  for (let o = 0; o < s; o++)
12285
12285
  i[o](u);
12286
12286
  };
12287
- Yt.prototype.State = Gt;
12287
+ Gt.prototype.State = Zt;
12288
12288
  function wd(t) {
12289
12289
  const e = {};
12290
- t = t || {}, e.src_Any = co.source, e.src_Cc = fo.source, e.src_Z = po.source, e.src_P = ru.source, e.src_ZPCc = [e.src_Z, e.src_P, e.src_Cc].join("|"), e.src_ZCc = [e.src_Z, e.src_Cc].join("|");
12290
+ t = t || {}, e.src_Any = co.source, e.src_Cc = fo.source, e.src_Z = po.source, e.src_P = uu.source, e.src_ZPCc = [e.src_Z, e.src_P, e.src_Cc].join("|"), e.src_ZCc = [e.src_Z, e.src_Cc].join("|");
12291
12291
  const n = "[><|]";
12292
12292
  return e.src_pseudo_letter = "(?:(?!" + n + "|" + e.src_ZPCc + ")" + e.src_Any + ")", e.src_ip4 = "(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)", e.src_auth = "(?:(?:(?!" + e.src_ZCc + "|[@/\\[\\]()]).)+@)?", e.src_port = "(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?", e.src_host_terminator = "(?=$|" + n + "|" + e.src_ZPCc + ")(?!" + (t["---"] ? "-(?!--)|" : "-|") + "_|:\\d|\\.-|\\.(?!$|" + e.src_ZPCc + "))", e.src_path = "(?:[/?#](?:(?!" + e.src_ZCc + "|" + n + `|[()[\\]{}.,"'?!\\-;]).|\\[(?:(?!` + e.src_ZCc + "|\\]).)*\\]|\\((?:(?!" + e.src_ZCc + "|[)]).)*\\)|\\{(?:(?!" + e.src_ZCc + '|[}]).)*\\}|\\"(?:(?!' + e.src_ZCc + `|["]).)+\\"|\\'(?:(?!` + e.src_ZCc + "|[']).)+\\'|\\'(?=" + e.src_pseudo_letter + "|[-])|\\.{2,}[a-zA-Z0-9%/&]|\\.(?!" + e.src_ZCc + "|[.]|$)|" + (t["---"] ? "\\-(?!--(?:[^-]|$))(?:-*)|" : "\\-+|") + // allow `,,,` in paths
12293
12293
  ",(?!" + e.src_ZCc + "|$)|;(?!" + e.src_ZCc + "|$)|\\!+(?!" + e.src_ZCc + "|[!]|$)|\\?(?!" + e.src_ZCc + "|[?]|$))+|\\/)?", e.src_email_name = '[\\-;:&=\\+\\$,\\.a-zA-Z0-9_][\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]*', e.src_xn = "xn--[a-z0-9\\-]{1,59}", e.src_domain_root = // Allow letters & digits (http://test1)
@@ -12297,7 +12297,7 @@ function wd(t) {
12297
12297
  // but can start with > (markdown blockquote)
12298
12298
  "(^|(?![.:/\\-_@])(?:[$+<=>^`||]|" + e.src_ZPCc + "))((?![$+<=>^`||])" + e.tpl_host_port_no_ip_fuzzy_strict + e.src_path + ")", e;
12299
12299
  }
12300
- function Rr(t) {
12300
+ function Br(t) {
12301
12301
  return Array.prototype.slice.call(arguments, 1).forEach(function(n) {
12302
12302
  n && Object.keys(n).forEach(function(r) {
12303
12303
  t[r] = n[r];
@@ -12316,7 +12316,7 @@ function Od(t) {
12316
12316
  function Fd(t) {
12317
12317
  return Bn(t) === "[object RegExp]";
12318
12318
  }
12319
- function Si(t) {
12319
+ function Ai(t) {
12320
12320
  return Bn(t) === "[object Function]";
12321
12321
  }
12322
12322
  function Nd(t) {
@@ -12374,12 +12374,12 @@ function Pd(t) {
12374
12374
  return t.test(r) ? r.match(t)[0].length : 0;
12375
12375
  };
12376
12376
  }
12377
- function Ai() {
12377
+ function Mi() {
12378
12378
  return function(t, e) {
12379
12379
  e.normalize(t);
12380
12380
  };
12381
12381
  }
12382
- function _n(t) {
12382
+ function Dn(t) {
12383
12383
  const e = t.re = wd(t.__opts__), n = t.__tlds__.slice();
12384
12384
  t.onCompile(), t.__tlds_replaced__ || n.push(Bd), n.push(e.src_xn), e.src_tlds = n.join("|");
12385
12385
  function r(o) {
@@ -12397,7 +12397,7 @@ function _n(t) {
12397
12397
  return;
12398
12398
  const a = { validate: null, link: null };
12399
12399
  if (t.__compiled__[o] = a, Od(l)) {
12400
- Fd(l.validate) ? a.validate = Pd(l.validate) : Si(l.validate) ? a.validate = l.validate : i(o, l), Si(l.normalize) ? a.normalize = l.normalize : l.normalize ? i(o, l) : a.normalize = Ai();
12400
+ Fd(l.validate) ? a.validate = Pd(l.validate) : Ai(l.validate) ? a.validate = l.validate : i(o, l), Ai(l.normalize) ? a.normalize = l.normalize : l.normalize ? i(o, l) : a.normalize = Mi();
12401
12401
  return;
12402
12402
  }
12403
12403
  if (Td(l)) {
@@ -12407,7 +12407,7 @@ function _n(t) {
12407
12407
  i(o, l);
12408
12408
  }), u.forEach(function(o) {
12409
12409
  t.__compiled__[t.__schemas__[o]] && (t.__compiled__[o].validate = t.__compiled__[t.__schemas__[o]].validate, t.__compiled__[o].normalize = t.__compiled__[t.__schemas__[o]].normalize);
12410
- }), t.__compiled__[""] = { validate: null, normalize: Ai() };
12410
+ }), t.__compiled__[""] = { validate: null, normalize: Mi() };
12411
12411
  const s = Object.keys(t.__compiled__).filter(function(o) {
12412
12412
  return o.length > 0 && t.__compiled__[o];
12413
12413
  }).map(Nd).join("|");
@@ -12420,20 +12420,20 @@ function Ld(t, e) {
12420
12420
  const n = t.__index__, r = t.__last_index__, u = t.__text_cache__.slice(n, r);
12421
12421
  this.schema = t.__schema__.toLowerCase(), this.index = n + e, this.lastIndex = r + e, this.raw = u, this.text = u, this.url = u;
12422
12422
  }
12423
- function Br(t, e) {
12423
+ function vr(t, e) {
12424
12424
  const n = new Ld(t, e);
12425
12425
  return t.__compiled__[n.schema].normalize(n, t), n;
12426
12426
  }
12427
12427
  function ne(t, e) {
12428
12428
  if (!(this instanceof ne))
12429
12429
  return new ne(t, e);
12430
- e || Id(t) && (e = t, t = {}), this.__opts__ = Rr({}, So, e), this.__index__ = -1, this.__last_index__ = -1, this.__schema__ = "", this.__text_cache__ = "", this.__schemas__ = Rr({}, Rd, t), this.__compiled__ = {}, this.__tlds__ = vd, this.__tlds_replaced__ = !1, this.re = {}, _n(this);
12430
+ e || Id(t) && (e = t, t = {}), this.__opts__ = Br({}, So, e), this.__index__ = -1, this.__last_index__ = -1, this.__schema__ = "", this.__text_cache__ = "", this.__schemas__ = Br({}, Rd, t), this.__compiled__ = {}, this.__tlds__ = vd, this.__tlds_replaced__ = !1, this.re = {}, Dn(this);
12431
12431
  }
12432
12432
  ne.prototype.add = function(e, n) {
12433
- return this.__schemas__[e] = n, _n(this), this;
12433
+ return this.__schemas__[e] = n, Dn(this), this;
12434
12434
  };
12435
12435
  ne.prototype.set = function(e) {
12436
- return this.__opts__ = Rr(this.__opts__, e), this;
12436
+ return this.__opts__ = Br(this.__opts__, e), this;
12437
12437
  };
12438
12438
  ne.prototype.test = function(e) {
12439
12439
  if (this.__text_cache__ = e, this.__index__ = -1, !e.length)
@@ -12457,10 +12457,10 @@ ne.prototype.testSchemaAt = function(e, n, r) {
12457
12457
  ne.prototype.match = function(e) {
12458
12458
  const n = [];
12459
12459
  let r = 0;
12460
- this.__index__ >= 0 && this.__text_cache__ === e && (n.push(Br(this, r)), r = this.__last_index__);
12460
+ this.__index__ >= 0 && this.__text_cache__ === e && (n.push(vr(this, r)), r = this.__last_index__);
12461
12461
  let u = r ? e.slice(r) : e;
12462
12462
  for (; this.test(u); )
12463
- n.push(Br(this, r)), u = u.slice(this.__last_index__), r += this.__last_index__;
12463
+ n.push(vr(this, r)), u = u.slice(this.__last_index__), r += this.__last_index__;
12464
12464
  return n.length ? n : null;
12465
12465
  };
12466
12466
  ne.prototype.matchAtStart = function(e) {
@@ -12468,23 +12468,23 @@ ne.prototype.matchAtStart = function(e) {
12468
12468
  const n = this.re.schema_at_start.exec(e);
12469
12469
  if (!n) return null;
12470
12470
  const r = this.testSchemaAt(e, n[2], n[0].length);
12471
- return r ? (this.__schema__ = n[2], this.__index__ = n.index + n[1].length, this.__last_index__ = n.index + n[0].length + r, Br(this, 0)) : null;
12471
+ return r ? (this.__schema__ = n[2], this.__index__ = n.index + n[1].length, this.__last_index__ = n.index + n[0].length + r, vr(this, 0)) : null;
12472
12472
  };
12473
12473
  ne.prototype.tlds = function(e, n) {
12474
12474
  return e = Array.isArray(e) ? e : [e], n ? (this.__tlds__ = this.__tlds__.concat(e).sort().filter(function(r, u, i) {
12475
12475
  return r !== i[u - 1];
12476
- }).reverse(), _n(this), this) : (this.__tlds__ = e.slice(), this.__tlds_replaced__ = !0, _n(this), this);
12476
+ }).reverse(), Dn(this), this) : (this.__tlds__ = e.slice(), this.__tlds_replaced__ = !0, Dn(this), this);
12477
12477
  };
12478
12478
  ne.prototype.normalize = function(e) {
12479
12479
  e.schema || (e.url = "http://" + e.url), e.schema === "mailto:" && !/^mailto:/i.test(e.url) && (e.url = "mailto:" + e.url);
12480
12480
  };
12481
12481
  ne.prototype.onCompile = function() {
12482
12482
  };
12483
- const pt = 2147483647, ge = 36, lu = 1, Jt = 26, qd = 38, Vd = 700, Ao = 72, Mo = 128, wo = "-", $d = /^xn--/, Wd = /[^\0-\x7F]/, Hd = /[\x2E\u3002\uFF0E\uFF61]/g, Jd = {
12483
+ const pt = 2147483647, ge = 36, au = 1, Ht = 26, qd = 38, Vd = 700, Ao = 72, Mo = 128, wo = "-", $d = /^xn--/, Wd = /[^\0-\x7F]/, Hd = /[\x2E\u3002\uFF0E\uFF61]/g, Jd = {
12484
12484
  overflow: "Overflow: input needs wider integers to process",
12485
12485
  "not-basic": "Illegal input >= 0x80 (not a basic code point)",
12486
12486
  "invalid-input": "Invalid input"
12487
- }, ir = ge - lu, be = Math.floor, sr = String.fromCharCode;
12487
+ }, ir = ge - au, be = Math.floor, sr = String.fromCharCode;
12488
12488
  function Fe(t) {
12489
12489
  throw new RangeError(Jd[t]);
12490
12490
  }
@@ -12518,11 +12518,11 @@ function Oo(t) {
12518
12518
  }
12519
12519
  const Ud = (t) => String.fromCodePoint(...t), Kd = function(t) {
12520
12520
  return t >= 48 && t < 58 ? 26 + (t - 48) : t >= 65 && t < 91 ? t - 65 : t >= 97 && t < 123 ? t - 97 : ge;
12521
- }, Mi = function(t, e) {
12521
+ }, wi = function(t, e) {
12522
12522
  return t + 22 + 75 * (t < 26) - ((e != 0) << 5);
12523
12523
  }, Fo = function(t, e, n) {
12524
12524
  let r = 0;
12525
- for (t = n ? be(t / Vd) : t >> 1, t += be(t / e); t > ir * Jt >> 1; r += ge)
12525
+ for (t = n ? be(t / Vd) : t >> 1, t += be(t / e); t > ir * Ht >> 1; r += ge)
12526
12526
  t = be(t / ir);
12527
12527
  return be(r + (ir + 1) * t / (t + qd));
12528
12528
  }, No = function(t) {
@@ -12537,7 +12537,7 @@ const Ud = (t) => String.fromCodePoint(...t), Kd = function(t) {
12537
12537
  o >= n && Fe("invalid-input");
12538
12538
  const p = Kd(t.charCodeAt(o++));
12539
12539
  p >= ge && Fe("invalid-input"), p > be((pt - r) / c) && Fe("overflow"), r += p * c;
12540
- const h = f <= i ? lu : f >= i + Jt ? Jt : f - i;
12540
+ const h = f <= i ? au : f >= i + Ht ? Ht : f - i;
12541
12541
  if (p < h)
12542
12542
  break;
12543
12543
  const d = ge - h;
@@ -12566,15 +12566,15 @@ const Ud = (t) => String.fromCodePoint(...t), Kd = function(t) {
12566
12566
  if (c < r && ++u > pt && Fe("overflow"), c === r) {
12567
12567
  let f = u;
12568
12568
  for (let p = ge; ; p += ge) {
12569
- const h = p <= i ? lu : p >= i + Jt ? Jt : p - i;
12569
+ const h = p <= i ? au : p >= i + Ht ? Ht : p - i;
12570
12570
  if (f < h)
12571
12571
  break;
12572
12572
  const d = f - h, m = ge - h;
12573
12573
  e.push(
12574
- sr(Mi(h + d % m, 0))
12574
+ sr(wi(h + d % m, 0))
12575
12575
  ), f = be(d / m);
12576
12576
  }
12577
- e.push(sr(Mi(f, 0))), i = Fo(u, a, o === s), u = 0, ++o;
12577
+ e.push(sr(wi(f, 0))), i = Fo(u, a, o === s), u = 0, ++o;
12578
12578
  }
12579
12579
  ++u, ++r;
12580
12580
  }
@@ -12785,34 +12785,34 @@ function rh(t) {
12785
12785
  }
12786
12786
  const Bo = ["http:", "https:", "mailto:"];
12787
12787
  function uh(t) {
12788
- const e = nu(t, !0);
12788
+ const e = ru(t, !0);
12789
12789
  if (e.hostname && (!e.protocol || Bo.indexOf(e.protocol) >= 0))
12790
12790
  try {
12791
12791
  e.hostname = Ro.toASCII(e.hostname);
12792
12792
  } catch {
12793
12793
  }
12794
- return Zt(tu(e));
12794
+ return Kt(nu(e));
12795
12795
  }
12796
12796
  function ih(t) {
12797
- const e = nu(t, !0);
12797
+ const e = ru(t, !0);
12798
12798
  if (e.hostname && (!e.protocol || Bo.indexOf(e.protocol) >= 0))
12799
12799
  try {
12800
12800
  e.hostname = Ro.toUnicode(e.hostname);
12801
12801
  } catch {
12802
12802
  }
12803
- return kt(tu(e), kt.defaultChars + "%");
12803
+ return kt(nu(e), kt.defaultChars + "%");
12804
12804
  }
12805
12805
  function re(t, e) {
12806
12806
  if (!(this instanceof re))
12807
12807
  return new re(t, e);
12808
- e || uu(t) || (e = t || {}, t = "default"), this.inline = new Yt(), this.block = new Rn(), this.core = new su(), this.renderer = new Dt(), this.linkify = new ne(), this.validateLink = rh, this.normalizeLink = uh, this.normalizeLinkText = ih, this.utils = of, this.helpers = Nn({}, ff), this.options = {}, this.configure(t), e && this.set(e);
12808
+ e || iu(t) || (e = t || {}, t = "default"), this.inline = new Gt(), this.block = new Rn(), this.core = new ou(), this.renderer = new Dt(), this.linkify = new ne(), this.validateLink = rh, this.normalizeLink = uh, this.normalizeLinkText = ih, this.utils = of, this.helpers = Nn({}, ff), this.options = {}, this.configure(t), e && this.set(e);
12809
12809
  }
12810
12810
  re.prototype.set = function(t) {
12811
12811
  return Nn(this.options, t), this;
12812
12812
  };
12813
12813
  re.prototype.configure = function(t) {
12814
12814
  const e = this;
12815
- if (uu(t)) {
12815
+ if (iu(t)) {
12816
12816
  const n = t;
12817
12817
  if (t = eh[n], !t)
12818
12818
  throw new Error('Wrong `markdown-it` preset "' + n + '", check name');
@@ -12867,7 +12867,7 @@ re.prototype.parseInline = function(t, e) {
12867
12867
  re.prototype.renderInline = function(t, e) {
12868
12868
  return e = e || {}, this.renderer.render(this.parseInline(t, e), this.options, e);
12869
12869
  };
12870
- const sh = new Pr({
12870
+ const sh = new Lr({
12871
12871
  nodes: {
12872
12872
  doc: {
12873
12873
  content: "block+"
@@ -13097,7 +13097,7 @@ function St(t, e, n, r) {
13097
13097
  function or(t, e) {
13098
13098
  return t.noCloseToken || e == "code_inline" || e == "code_block" || e == "fence";
13099
13099
  }
13100
- function wi(t) {
13100
+ function Ti(t) {
13101
13101
  return t[t.length - 1] == `
13102
13102
  ` ? t.slice(0, t.length - 1) : t;
13103
13103
  }
@@ -13110,7 +13110,7 @@ function ah(t, e) {
13110
13110
  if (u.block) {
13111
13111
  let i = t.nodeType(u.block);
13112
13112
  or(u, r) ? n[r] = (s, o, l, a) => {
13113
- s.openNode(i, St(u, o, l, a)), s.addText(wi(o.content)), s.closeNode();
13113
+ s.openNode(i, St(u, o, l, a)), s.addText(Ti(o.content)), s.closeNode();
13114
13114
  } : (n[r + "_open"] = (s, o, l, a) => s.openNode(i, St(u, o, l, a)), n[r + "_close"] = (s) => s.closeNode());
13115
13115
  } else if (u.node) {
13116
13116
  let i = t.nodeType(u.node);
@@ -13118,7 +13118,7 @@ function ah(t, e) {
13118
13118
  } else if (u.mark) {
13119
13119
  let i = t.marks[u.mark];
13120
13120
  or(u, r) ? n[r] = (s, o, l, a) => {
13121
- s.openMark(i.create(St(u, o, l, a))), s.addText(wi(o.content)), s.closeMark(i);
13121
+ s.openMark(i.create(St(u, o, l, a))), s.addText(Ti(o.content)), s.closeMark(i);
13122
13122
  } : (n[r + "_open"] = (s, o, l, a) => s.openMark(i.create(St(u, o, l, a))), n[r + "_close"] = (s) => s.closeMark(i));
13123
13123
  } else if (u.ignore)
13124
13124
  or(u, r) ? n[r] = lr : (n[r + "_open"] = lr, n[r + "_close"] = lr);
@@ -13157,20 +13157,20 @@ class vo {
13157
13157
  return u || this.schema.topNodeType.createAndFill();
13158
13158
  }
13159
13159
  }
13160
- function Ti(t, e) {
13160
+ function Oi(t, e) {
13161
13161
  for (; ++e < t.length; )
13162
13162
  if (t[e].type != "list_item_open")
13163
13163
  return t[e].hidden;
13164
13164
  return !1;
13165
13165
  }
13166
- const vr = new vo(sh, re("commonmark", { html: !1 }), {
13166
+ const zr = new vo(sh, re("commonmark", { html: !1 }), {
13167
13167
  blockquote: { block: "blockquote" },
13168
13168
  paragraph: { block: "paragraph" },
13169
13169
  list_item: { block: "list_item" },
13170
- bullet_list: { block: "bullet_list", getAttrs: (t, e, n) => ({ tight: Ti(e, n) }) },
13170
+ bullet_list: { block: "bullet_list", getAttrs: (t, e, n) => ({ tight: Oi(e, n) }) },
13171
13171
  ordered_list: { block: "ordered_list", getAttrs: (t, e, n) => ({
13172
13172
  order: +t.attrGet("start") || 1,
13173
- tight: Ti(e, n)
13173
+ tight: Oi(e, n)
13174
13174
  }) },
13175
13175
  heading: { block: "heading", getAttrs: (t) => ({ level: +t.tag.slice(1) }) },
13176
13176
  code_block: { block: "code_block", noCloseToken: !0 },
@@ -13270,15 +13270,15 @@ const ar = new fh({
13270
13270
  },
13271
13271
  code: {
13272
13272
  open(t, e, n, r) {
13273
- return Oi(n.child(r), -1);
13273
+ return Fi(n.child(r), -1);
13274
13274
  },
13275
13275
  close(t, e, n, r) {
13276
- return Oi(n.child(r - 1), 1);
13276
+ return Fi(n.child(r - 1), 1);
13277
13277
  },
13278
13278
  escape: !1
13279
13279
  }
13280
13280
  });
13281
- function Oi(t, e) {
13281
+ function Fi(t, e) {
13282
13282
  let n = /`+/g, r, u = 0;
13283
13283
  if (t.isText)
13284
13284
  for (; r = n.exec(t.text); )
@@ -13510,10 +13510,10 @@ class hh {
13510
13510
  };
13511
13511
  }
13512
13512
  }
13513
- var En = 200, P = function() {
13513
+ var _n = 200, P = function() {
13514
13514
  };
13515
13515
  P.prototype.append = function(e) {
13516
- return e.length ? (e = P.from(e), !this.length && e || e.length < En && this.leafAppend(e) || this.length < En && e.leafPrepend(this) || this.appendInner(e)) : this;
13516
+ return e.length ? (e = P.from(e), !this.length && e || e.length < _n && this.leafAppend(e) || this.length < _n && e.leafPrepend(this) || this.appendInner(e)) : this;
13517
13517
  };
13518
13518
  P.prototype.prepend = function(e) {
13519
13519
  return e.length ? P.from(e).append(this) : this;
@@ -13562,10 +13562,10 @@ var zo = /* @__PURE__ */ function(t) {
13562
13562
  if (u(this.values[l], o + l) === !1)
13563
13563
  return !1;
13564
13564
  }, e.prototype.leafAppend = function(u) {
13565
- if (this.length + u.length <= En)
13565
+ if (this.length + u.length <= _n)
13566
13566
  return new e(this.values.concat(u.flatten()));
13567
13567
  }, e.prototype.leafPrepend = function(u) {
13568
- if (this.length + u.length <= En)
13568
+ if (this.length + u.length <= _n)
13569
13569
  return new e(u.flatten().concat(this.values));
13570
13570
  }, n.length.get = function() {
13571
13571
  return this.values.length;
@@ -13652,7 +13652,7 @@ class ae {
13652
13652
  return a > bh && (o = gh(o, a), s -= a), new ae(o.append(i), s);
13653
13653
  }
13654
13654
  remapping(e, n) {
13655
- let r = new zt();
13655
+ let r = new vt();
13656
13656
  return this.items.forEach((u, i) => {
13657
13657
  let s = u.mirrorOffset != null && i - u.mirrorOffset >= e ? r.maps.length - u.mirrorOffset : void 0;
13658
13658
  r.appendMap(u.map, s);
@@ -13755,10 +13755,10 @@ function xh(t, e, n, r) {
13755
13755
  if (n.steps.length == 0)
13756
13756
  return t;
13757
13757
  if (s && s.getMeta(tt))
13758
- return s.getMeta(tt).redo ? new Ne(t.done.addTransform(n, void 0, r, fn(e)), t.undone, Fi(n.mapping.maps), t.prevTime, t.prevComposition) : new Ne(t.done, t.undone.addTransform(n, void 0, r, fn(e)), null, t.prevTime, t.prevComposition);
13758
+ return s.getMeta(tt).redo ? new Ne(t.done.addTransform(n, void 0, r, cn(e)), t.undone, Ni(n.mapping.maps), t.prevTime, t.prevComposition) : new Ne(t.done, t.undone.addTransform(n, void 0, r, cn(e)), null, t.prevTime, t.prevComposition);
13759
13759
  if (n.getMeta("addToHistory") !== !1 && !(s && s.getMeta("addToHistory") === !1)) {
13760
- let o = n.getMeta("composition"), l = t.prevTime == 0 || !s && t.prevComposition != o && (t.prevTime < (n.time || 0) - r.newGroupDelay || !kh(n, t.prevRanges)), a = s ? cr(t.prevRanges, n.mapping) : Fi(n.mapping.maps);
13761
- return new Ne(t.done.addTransform(n, l ? e.selection.getBookmark() : void 0, r, fn(e)), ae.empty, a, n.time, o ?? t.prevComposition);
13760
+ let o = n.getMeta("composition"), l = t.prevTime == 0 || !s && t.prevComposition != o && (t.prevTime < (n.time || 0) - r.newGroupDelay || !kh(n, t.prevRanges)), a = s ? cr(t.prevRanges, n.mapping) : Ni(n.mapping.maps);
13761
+ return new Ne(t.done.addTransform(n, l ? e.selection.getBookmark() : void 0, r, cn(e)), ae.empty, a, n.time, o ?? t.prevComposition);
13762
13762
  } else return (i = n.getMeta("rebased")) ? new Ne(t.done.rebased(n, i), t.undone.rebased(n, i), cr(t.prevRanges, n.mapping), t.prevTime, t.prevComposition) : new Ne(t.done.addMaps(n.mapping.maps), t.undone.addMaps(n.mapping.maps), cr(t.prevRanges, n.mapping), t.prevTime, t.prevComposition);
13763
13763
  }
13764
13764
  function kh(t, e) {
@@ -13772,7 +13772,7 @@ function kh(t, e) {
13772
13772
  r <= e[i + 1] && u >= e[i] && (n = !0);
13773
13773
  }), n;
13774
13774
  }
13775
- function Fi(t) {
13775
+ function Ni(t) {
13776
13776
  let e = [];
13777
13777
  for (let n = t.length - 1; n >= 0 && e.length == 0; n--)
13778
13778
  t[n].forEach((r, u, i, s) => e.push(i, s));
@@ -13789,17 +13789,17 @@ function cr(t, e) {
13789
13789
  return n;
13790
13790
  }
13791
13791
  function yh(t, e, n) {
13792
- let r = fn(e), u = tt.get(e).spec.config, i = (n ? t.undone : t.done).popEvent(e, r);
13792
+ let r = cn(e), u = tt.get(e).spec.config, i = (n ? t.undone : t.done).popEvent(e, r);
13793
13793
  if (!i)
13794
13794
  return null;
13795
13795
  let s = i.selection.resolve(i.transform.doc), o = (n ? t.done : t.undone).addTransform(i.transform, e.selection.getBookmark(), u, r), l = new Ne(n ? o : i.remaining, n ? i.remaining : o, null, 0, -1);
13796
13796
  return i.transform.setSelection(s).setMeta(tt, { redo: n, historyState: l });
13797
13797
  }
13798
- let fr = !1, Ni = null;
13799
- function fn(t) {
13798
+ let fr = !1, Ii = null;
13799
+ function cn(t) {
13800
13800
  let e = t.plugins;
13801
- if (Ni != e) {
13802
- fr = !1, Ni = e;
13801
+ if (Ii != e) {
13802
+ fr = !1, Ii = e;
13803
13803
  for (let n = 0; n < e.length; n++)
13804
13804
  if (e[n].spec.historyPreserveItems) {
13805
13805
  fr = !0;
@@ -13813,7 +13813,7 @@ function Dh(t = {}) {
13813
13813
  return t = {
13814
13814
  depth: t.depth || 100,
13815
13815
  newGroupDelay: t.newGroupDelay || 500
13816
- }, new Wr({
13816
+ }, new Hr({
13817
13817
  key: tt,
13818
13818
  state: {
13819
13819
  init() {
@@ -13827,7 +13827,7 @@ function Dh(t = {}) {
13827
13827
  props: {
13828
13828
  handleDOMEvents: {
13829
13829
  beforeinput(e, n) {
13830
- let r = n.inputType, u = r == "historyUndo" ? Lo : r == "historyRedo" ? zr : null;
13830
+ let r = n.inputType, u = r == "historyUndo" ? Lo : r == "historyRedo" ? Pr : null;
13831
13831
  return u ? (n.preventDefault(), u(e.state, e.dispatch)) : !1;
13832
13832
  }
13833
13833
  }
@@ -13846,7 +13846,7 @@ function Po(t, e) {
13846
13846
  return !0;
13847
13847
  };
13848
13848
  }
13849
- const Lo = Po(!1, !0), zr = Po(!0, !0);
13849
+ const Lo = Po(!1, !0), Pr = Po(!0, !0);
13850
13850
  var We = {
13851
13851
  8: "Backspace",
13852
13852
  9: "Tab",
@@ -13900,7 +13900,7 @@ var We = {
13900
13900
  220: "\\",
13901
13901
  221: "]",
13902
13902
  222: "'"
13903
- }, Sn = {
13903
+ }, En = {
13904
13904
  48: ")",
13905
13905
  49: "!",
13906
13906
  50: "@",
@@ -13929,10 +13929,10 @@ var We = {
13929
13929
  for (var V = 0; V < 10; V++) We[48 + V] = We[96 + V] = String(V);
13930
13930
  for (var V = 1; V <= 24; V++) We[V + 111] = "F" + V;
13931
13931
  for (var V = 65; V <= 90; V++)
13932
- We[V] = String.fromCharCode(V + 32), Sn[V] = String.fromCharCode(V);
13933
- for (var dr in We) Sn.hasOwnProperty(dr) || (Sn[dr] = We[dr]);
13932
+ We[V] = String.fromCharCode(V + 32), En[V] = String.fromCharCode(V);
13933
+ for (var dr in We) En.hasOwnProperty(dr) || (En[dr] = We[dr]);
13934
13934
  function Sh(t) {
13935
- var e = _h && t.metaKey && t.shiftKey && !t.ctrlKey && !t.altKey || Eh && t.shiftKey && t.key && t.key.length == 1 || t.key == "Unidentified", n = !e && t.key || (t.shiftKey ? Sn : We)[t.keyCode] || t.key || "Unidentified";
13935
+ var e = _h && t.metaKey && t.shiftKey && !t.ctrlKey && !t.altKey || Eh && t.shiftKey && t.key && t.key.length == 1 || t.key == "Unidentified", n = !e && t.key || (t.shiftKey ? En : We)[t.keyCode] || t.key || "Unidentified";
13936
13936
  return n == "Esc" && (n = "Escape"), n == "Del" && (n = "Delete"), n == "Left" && (n = "ArrowLeft"), n == "Up" && (n = "ArrowUp"), n == "Right" && (n = "ArrowRight"), n == "Down" && (n = "ArrowDown"), n;
13937
13937
  }
13938
13938
  const Ah = typeof navigator < "u" && /Mac|iP(hone|[oa]d)/.test(navigator.platform), Mh = typeof navigator < "u" && /Win/.test(navigator.platform);
@@ -13967,7 +13967,7 @@ function hr(t, e, n = !0) {
13967
13967
  return e.altKey && (t = "Alt-" + t), e.ctrlKey && (t = "Ctrl-" + t), e.metaKey && (t = "Meta-" + t), n && e.shiftKey && (t = "Shift-" + t), t;
13968
13968
  }
13969
13969
  function pr(t) {
13970
- return new Wr({ props: { handleKeyDown: Oh(t) } });
13970
+ return new Hr({ props: { handleKeyDown: Oh(t) } });
13971
13971
  }
13972
13972
  function Oh(t) {
13973
13973
  let e = Th(t);
@@ -13992,14 +13992,22 @@ function Oh(t) {
13992
13992
  };
13993
13993
  }
13994
13994
  const Fh = new vo(
13995
- vr.schema,
13995
+ zr.schema,
13996
13996
  re("commonmark", { breaks: !0 }),
13997
- vr.tokens
13997
+ zr.tokens
13998
13998
  );
13999
- function Ii(t, e) {
14000
- return (e ? Fh : vr).parse(t ?? "");
13999
+ function Nh(t) {
14000
+ const e = " ";
14001
+ return t.split(`
14002
+ `).map((n, r, u) => n.trim() === "" && r < u.length - 1 ? e : n).join(`
14003
+ `);
14001
14004
  }
14002
- const Ri = {
14005
+ function Ri(t, e) {
14006
+ const n = e ? Fh : zr;
14007
+ let r = t ?? "";
14008
+ return e && (r = Nh(r)), n.parse(r);
14009
+ }
14010
+ const Bi = {
14003
14011
  headings: !0,
14004
14012
  bold: !0,
14005
14013
  italic: !0,
@@ -14013,8 +14021,8 @@ const Ri = {
14013
14021
  hardBreak: !0,
14014
14022
  headerLevels: 3
14015
14023
  };
14016
- function Nh(t) {
14017
- return new Wr({
14024
+ function Ih(t) {
14025
+ return new Hr({
14018
14026
  view: () => ({
14019
14027
  update: () => {
14020
14028
  t();
@@ -14023,7 +14031,7 @@ function Nh(t) {
14023
14031
  filterTransaction: () => (t(), !0)
14024
14032
  });
14025
14033
  }
14026
- const Vh = (t) => {
14034
+ const $h = (t) => {
14027
14035
  const {
14028
14036
  value: e,
14029
14037
  onChange: n,
@@ -14040,17 +14048,15 @@ const Vh = (t) => {
14040
14048
  showToolbar: h = !1,
14041
14049
  features: d,
14042
14050
  preserveLineBreaks: m = !1
14043
- } = t, g = j.toSignal(f), b = j.toSignal(a ?? !1), k = j.toSignal(h), y = zi(d ?? Ri)((A) => ({
14044
- ...Ri,
14051
+ } = t, g = j.toSignal(f), b = j.toSignal(a ?? !1), k = j.toSignal(h), y = xr(d ?? Bi)((A) => ({
14052
+ ...Bi,
14045
14053
  ...A
14046
- })), _ = Bi(null), E = Go();
14047
- return vi(
14054
+ })), _ = vi(null), E = Go();
14055
+ return zi(
14048
14056
  Pi(
14049
14057
  Yo,
14050
- ({ appearance: A }) => au.div(
14051
- mr(() => {
14052
- _.value?.destroy();
14053
- }),
14058
+ ({ appearance: A }) => cu.div(
14059
+ mr(() => _.value?.destroy()),
14054
14060
  (t.cssInjection ?? "none") === "none" ? null : Wo(
14055
14061
  () => import("./styles-url-CzNVxeM7.js"),
14056
14062
  ({ default: C }) => Zo({ id: "beatui-prosemirror-css", href: C })
@@ -14066,43 +14072,42 @@ const Vh = (t) => {
14066
14072
  je.id(s),
14067
14073
  je.name(o),
14068
14074
  // Optional toolbar
14069
- It(
14070
- k,
14071
- () => It(
14072
- _.map((C) => C != null),
14073
- () => Ea({
14074
- view: _,
14075
- stateUpdate: E,
14076
- features: y,
14077
- readOnly: g
14078
- })
14079
- ),
14080
- () => null
14075
+ Sn(
14076
+ xr(
14077
+ k,
14078
+ _
14079
+ )((C, M) => C && M != null),
14080
+ () => Ea({
14081
+ view: _,
14082
+ stateUpdate: E,
14083
+ features: y,
14084
+ readOnly: g
14085
+ })
14081
14086
  ),
14082
14087
  // Editor mount point
14083
- au.div(
14088
+ cu.div(
14084
14089
  je.class("bc-prosemirror-editor"),
14085
14090
  Ho((C) => {
14086
14091
  const M = [];
14087
14092
  return (() => {
14088
14093
  try {
14089
- const X = j.get(e) ?? "", Je = j.get(g) ?? !1, vn = j.get(b) ?? !1, zn = j.get(y), st = Rh(
14090
- Pr,
14094
+ const X = j.get(e) ?? "", Je = j.get(g) ?? !1, vn = j.get(b) ?? !1, zn = j.get(y), st = Bh(
14095
+ Lr,
14091
14096
  k0,
14092
14097
  zn
14093
- ), we = Ii(X, m), Pn = Ih(st), qo = Ke.create({
14098
+ ), we = Ri(X, m), Pn = Rh(st), qo = Ke.create({
14094
14099
  doc: we,
14095
14100
  schema: st,
14096
14101
  plugins: [
14097
14102
  Dh(),
14098
14103
  pr({
14099
14104
  "Mod-z": Lo,
14100
- "Mod-y": zr,
14101
- "Mod-Shift-z": zr
14105
+ "Mod-y": Pr,
14106
+ "Mod-Shift-z": Pr
14102
14107
  }),
14103
14108
  pr(Pn),
14104
14109
  pr(xa),
14105
- Nh(E.tick)
14110
+ Ih(E.tick)
14106
14111
  ]
14107
14112
  }), le = new ao(C, {
14108
14113
  state: qo,
@@ -14110,10 +14115,10 @@ const Vh = (t) => {
14110
14115
  dispatchTransaction(I) {
14111
14116
  const de = le.state.apply(I);
14112
14117
  if (le.updateState(de), I.docChanged && r != null) {
14113
- const Xt = ar.serialize(
14118
+ const Yt = ar.serialize(
14114
14119
  de.doc
14115
14120
  );
14116
- r(Xt);
14121
+ r(Yt);
14117
14122
  }
14118
14123
  }
14119
14124
  });
@@ -14137,10 +14142,10 @@ const Vh = (t) => {
14137
14142
  le.state.doc
14138
14143
  );
14139
14144
  if (I !== de) {
14140
- const Xt = Ii(I, m);
14141
- if (Xt != null) {
14145
+ const Yt = Ri(I, m);
14146
+ if (Yt != null) {
14142
14147
  const Vo = Ke.create({
14143
- doc: Xt,
14148
+ doc: Yt,
14144
14149
  schema: st,
14145
14150
  plugins: le.state.plugins
14146
14151
  });
@@ -14189,15 +14194,15 @@ const Vh = (t) => {
14189
14194
  )
14190
14195
  );
14191
14196
  };
14192
- function Ih(t) {
14197
+ function Rh(t) {
14193
14198
  const e = {}, n = t.marks.strong;
14194
- n != null && (e["Mod-b"] = (i, s) => an(n)(i, s));
14199
+ n != null && (e["Mod-b"] = (i, s) => ln(n)(i, s));
14195
14200
  const r = t.marks.em;
14196
- r != null && (e["Mod-i"] = (i, s) => an(r)(i, s));
14201
+ r != null && (e["Mod-i"] = (i, s) => ln(r)(i, s));
14197
14202
  const u = t.marks.code;
14198
- return u != null && (e["Mod-`"] = (i, s) => an(u)(i, s)), e;
14203
+ return u != null && (e["Mod-`"] = (i, s) => ln(u)(i, s)), e;
14199
14204
  }
14200
- function Rh(t, e, n) {
14205
+ function Bh(t, e, n) {
14201
14206
  const r = {}, u = {}, i = e.spec.nodes.get("doc"), s = e.spec.nodes.get("text");
14202
14207
  if (i == null || s == null)
14203
14208
  throw new Error("Basic schema missing required doc or text nodes");
@@ -14250,13 +14255,13 @@ function Rh(t, e, n) {
14250
14255
  return new t({ nodes: r, marks: u });
14251
14256
  }
14252
14257
  export {
14253
- Ri as D,
14258
+ Bi as D,
14254
14259
  x as F,
14255
14260
  nl as N,
14256
- Vh as P,
14261
+ $h as P,
14257
14262
  ee as R,
14258
14263
  D as S,
14259
- ln as a,
14264
+ on as a,
14260
14265
  Ea as b,
14261
14266
  ds as c,
14262
14267
  wl as f,