@harbour-enterprises/superdoc 0.10.14 → 0.10.16

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.
@@ -1,15 +1,15 @@
1
- var hf = Object.defineProperty;
1
+ var pf = Object.defineProperty;
2
2
  var Qs = (t) => {
3
3
  throw TypeError(t);
4
4
  };
5
- var mf = (t, e, n) => e in t ? hf(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
6
- var P = (t, e, n) => mf(t, typeof e != "symbol" ? e + "" : e, n), Ho = (t, e, n) => e.has(t) || Qs("Cannot " + n);
5
+ var hf = (t, e, n) => e in t ? pf(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
6
+ var P = (t, e, n) => hf(t, typeof e != "symbol" ? e + "" : e, n), Ho = (t, e, n) => e.has(t) || Qs("Cannot " + n);
7
7
  var Ge = (t, e, n) => (Ho(t, e, "read from private field"), n ? n.call(t) : e.get(t)), ft = (t, e, n) => e.has(t) ? Qs("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, n), jo = (t, e, n, r) => (Ho(t, e, "write to private field"), r ? r.call(t, n) : e.set(t, n), n), D = (t, e, n) => (Ho(t, e, "access private method"), n);
8
8
  import * as T from "yjs";
9
- import { UndoManager as gf, Item as yf, ContentType as bf, Text as wf, XmlElement as vf } from "yjs";
10
- import { P as G, a as Z, M as cr, c as K, N as B, S as Y, T as H, b as W, D as Vn, F as I, d as tn, e as kf, f as Zl, A as Ar, p as ie, B as Cf, i as Sf, g as Ql, h as xf, j as wt, l as Or, k as Ht, m as ec, r as tc, R as an, o as dr, n as ea, q as Vt, s as bi, t as nc, u as Mf, v as Af, w as ue, x as Ve, y as Do, z as Cn, C as fo, E as Of, G as Se, H as to, I as rc, J as Sn, K as Wo, L as Uo, O as qo, Q as no, U as Rt, V as ys, W as Tf, X as ta, Y as na, Z as Df, _ as Nf, $ as Ef } from "./converter-D2y9EpE_.js";
11
- import { ref as ra, computed as If, createElementBlock as Kt, openBlock as Xt, withModifiers as Ko, Fragment as Pf, renderList as Rf, normalizeClass as Lf, createCommentVNode as oa, toDisplayString as Xo, createElementVNode as Ff, createApp as Bf } from "vue";
12
- import { D as ia } from "./docx-zipper-BbBE5I9n.js";
9
+ import { UndoManager as mf, Item as gf, ContentType as yf, Text as bf, XmlElement as wf } from "yjs";
10
+ import { P as G, a as Z, M as cr, c as K, N as B, S as Y, T as H, b as W, D as Vn, F as I, d as tn, e as vf, f as Zl, A as Ar, p as ie, B as kf, i as Cf, g as Ql, h as Sf, j as wt, l as Or, k as Ht, m as ec, r as tc, R as an, o as dr, n as ea, q as Vt, s as bi, t as nc, u as xf, v as Mf, w as ue, x as Ve, y as Do, z as Cn, C as fo, E as Af, G as Se, H as to, I as rc, J as Sn, K as Wo, L as Uo, O as qo, Q as no, U as Rt, V as ys, W as Of, X as ta, Y as na, Z as Tf, _ as Df, $ as Nf } from "./converter-am5lAIyg.js";
11
+ import { ref as ra, computed as Ef, createElementBlock as Kt, openBlock as Xt, withModifiers as Ko, Fragment as If, renderList as Pf, normalizeClass as Rf, createCommentVNode as oa, toDisplayString as Xo, createElementVNode as Lf, createApp as Ff } from "vue";
12
+ import { D as ia } from "./docx-zipper-DTNfiohr.js";
13
13
  function No(t) {
14
14
  const { from: e, to: n, empty: r } = t.selection, o = [];
15
15
  return r ? (t.storedMarks && o.push(...t.storedMarks), o.push(...t.selection.$head.marks())) : t.doc.nodesBetween(e, n, (i) => {
@@ -32,7 +32,7 @@ const Eo = (t, e, n = !1) => {
32
32
  }
33
33
  }), n ? d : c;
34
34
  };
35
- function zf(t) {
35
+ function Bf(t) {
36
36
  const { state: e } = t, { selection: n } = e, r = No(e), o = n.$head.parent.attrs.marksAttrs, i = r.filter((f) => !["textStyle", "link"].includes(f.type.name)).map((f) => ({ name: f.type.name, attrs: f.attrs })), s = r.filter((f) => f.type.name === "textStyle");
37
37
  if (i.push(...s.flatMap(sa)), o) {
38
38
  const f = o.filter((h) => !["textStyle", "link"].includes(h.type)).map((h) => ({ name: h.type, attrs: h.attrs || {} })), p = o.filter((h) => h.type === "textStyle");
@@ -43,7 +43,7 @@ function zf(t) {
43
43
  let { from: f, to: p, attrs: h } = l;
44
44
  n.from >= f && n.to <= p && i.push({ name: "link", attrs: h });
45
45
  }
46
- const c = ["paragraphSpacing"], d = _f(e);
46
+ const c = ["paragraphSpacing"], d = zf(e);
47
47
  return Object.keys(d).forEach((f) => {
48
48
  if (c.includes(f)) return;
49
49
  const p = {};
@@ -56,7 +56,7 @@ function sa(t) {
56
56
  n[r] && e.push({ name: r, attrs: { [r]: n[r] } });
57
57
  }), e;
58
58
  }
59
- function _f(t) {
59
+ function zf(t) {
60
60
  try {
61
61
  const { from: e, to: n, empty: r } = t.selection, o = {}, i = (l) => {
62
62
  Object.keys(l.attrs).forEach((c) => {
@@ -79,7 +79,7 @@ fe.prototype.prepend = function(e) {
79
79
  return e.length ? fe.from(e).append(this) : this;
80
80
  };
81
81
  fe.prototype.appendInner = function(e) {
82
- return new Vf(this, e);
82
+ return new _f(this, e);
83
83
  };
84
84
  fe.prototype.slice = function(e, n) {
85
85
  return e === void 0 && (e = 0), n === void 0 && (n = this.length), e >= n ? fe.empty : this.sliceInner(Math.max(0, e), Math.min(this.length, n));
@@ -134,7 +134,7 @@ var oc = /* @__PURE__ */ function(t) {
134
134
  }, Object.defineProperties(e.prototype, n), e;
135
135
  }(fe);
136
136
  fe.empty = new oc([]);
137
- var Vf = /* @__PURE__ */ function(t) {
137
+ var _f = /* @__PURE__ */ function(t) {
138
138
  function e(n, r) {
139
139
  t.call(this), this.left = n, this.right = r, this.length = n.length + r.length, this.depth = Math.max(n.depth, r.depth) + 1;
140
140
  }
@@ -167,7 +167,7 @@ var Vf = /* @__PURE__ */ function(t) {
167
167
  return this.left.depth >= Math.max(this.right.depth, r.depth) + 1 ? new e(this.left, new e(this.right, r)) : new e(this, r);
168
168
  }, e;
169
169
  }(fe);
170
- const $f = 500;
170
+ const Vf = 500;
171
171
  class Xe {
172
172
  constructor(e, n) {
173
173
  this.items = e, this.eventCount = n;
@@ -209,7 +209,7 @@ class Xe {
209
209
  (p = l && l.merge(f)) && (f = p, d ? i.pop() : a = a.slice(0, a.length - 1)), i.push(f), n && (s++, n = void 0), o || (l = f);
210
210
  }
211
211
  let c = s - r.depth;
212
- return c > jf && (a = Hf(a, c), s -= c), new Xe(a.append(i), s);
212
+ return c > Hf && (a = $f(a, c), s -= c), new Xe(a.append(i), s);
213
213
  }
214
214
  remapping(e, n) {
215
215
  let r = new cr();
@@ -249,7 +249,7 @@ class Xe {
249
249
  for (let f = n; f < s; f++)
250
250
  c.push(new Qe(i.maps[f]));
251
251
  let d = this.items.slice(0, o).append(c).append(r), u = new Xe(d, a);
252
- return u.emptyItemCount() > $f && (u = u.compress(this.items.length - r.length)), u;
252
+ return u.emptyItemCount() > Vf && (u = u.compress(this.items.length - r.length)), u;
253
253
  }
254
254
  emptyItemCount() {
255
255
  let e = 0;
@@ -281,7 +281,7 @@ class Xe {
281
281
  }
282
282
  }
283
283
  Xe.empty = new Xe(fe.empty, 0);
284
- function Hf(t, e) {
284
+ function $f(t, e) {
285
285
  let n;
286
286
  return t.forEach((r, o) => {
287
287
  if (r.selection && e-- == 0)
@@ -305,23 +305,23 @@ class Tt {
305
305
  this.done = e, this.undone = n, this.prevRanges = r, this.prevTime = o, this.prevComposition = i;
306
306
  }
307
307
  }
308
- const jf = 20;
309
- function Wf(t, e, n, r) {
308
+ const Hf = 20;
309
+ function jf(t, e, n, r) {
310
310
  let o = n.getMeta(vt), i;
311
311
  if (o)
312
312
  return o.historyState;
313
- n.getMeta(Kf) && (t = new Tt(t.done, t.undone, null, 0, -1));
313
+ n.getMeta(qf) && (t = new Tt(t.done, t.undone, null, 0, -1));
314
314
  let s = n.getMeta("appendedTransaction");
315
315
  if (n.steps.length == 0)
316
316
  return t;
317
317
  if (s && s.getMeta(vt))
318
318
  return s.getMeta(vt).redo ? new Tt(t.done.addTransform(n, void 0, r, ro(e)), t.undone, aa(n.mapping.maps), t.prevTime, t.prevComposition) : new Tt(t.done, t.undone.addTransform(n, void 0, r, ro(e)), null, t.prevTime, t.prevComposition);
319
319
  if (n.getMeta("addToHistory") !== !1 && !(s && s.getMeta("addToHistory") === !1)) {
320
- let a = n.getMeta("composition"), l = t.prevTime == 0 || !s && t.prevComposition != a && (t.prevTime < (n.time || 0) - r.newGroupDelay || !Uf(n, t.prevRanges)), c = s ? Jo(t.prevRanges, n.mapping) : aa(n.mapping.maps);
320
+ let a = n.getMeta("composition"), l = t.prevTime == 0 || !s && t.prevComposition != a && (t.prevTime < (n.time || 0) - r.newGroupDelay || !Wf(n, t.prevRanges)), c = s ? Jo(t.prevRanges, n.mapping) : aa(n.mapping.maps);
321
321
  return new Tt(t.done.addTransform(n, l ? e.selection.getBookmark() : void 0, r, ro(e)), Xe.empty, c, n.time, a ?? t.prevComposition);
322
322
  } else return (i = n.getMeta("rebased")) ? new Tt(t.done.rebased(n, i), t.undone.rebased(n, i), Jo(t.prevRanges, n.mapping), t.prevTime, t.prevComposition) : new Tt(t.done.addMaps(n.mapping.maps), t.undone.addMaps(n.mapping.maps), Jo(t.prevRanges, n.mapping), t.prevTime, t.prevComposition);
323
323
  }
324
- function Uf(t, e) {
324
+ function Wf(t, e) {
325
325
  if (!e)
326
326
  return !1;
327
327
  if (!t.docChanged)
@@ -348,7 +348,7 @@ function Jo(t, e) {
348
348
  }
349
349
  return n;
350
350
  }
351
- function qf(t, e, n) {
351
+ function Uf(t, e, n) {
352
352
  let r = ro(e), o = vt.get(e).spec.config, i = (n ? t.undone : t.done).popEvent(e, r);
353
353
  if (!i)
354
354
  return null;
@@ -368,8 +368,8 @@ function ro(t) {
368
368
  }
369
369
  return Yo;
370
370
  }
371
- const vt = new G("history"), Kf = new G("closeHistory");
372
- function Xf(t = {}) {
371
+ const vt = new G("history"), qf = new G("closeHistory");
372
+ function Kf(t = {}) {
373
373
  return t = {
374
374
  depth: t.depth || 100,
375
375
  newGroupDelay: t.newGroupDelay || 500
@@ -380,7 +380,7 @@ function Xf(t = {}) {
380
380
  return new Tt(Xe.empty, Xe.empty, null, 0, -1);
381
381
  },
382
382
  apply(e, n, r) {
383
- return Wf(n, r, e, t);
383
+ return jf(n, r, e, t);
384
384
  }
385
385
  },
386
386
  config: t,
@@ -400,7 +400,7 @@ function ic(t, e) {
400
400
  if (!o || (t ? o.undone : o.done).eventCount == 0)
401
401
  return !1;
402
402
  if (r) {
403
- let i = qf(o, n, t);
403
+ let i = Uf(o, n, t);
404
404
  i && r(e ? i.scrollIntoView() : i);
405
405
  }
406
406
  return !0;
@@ -449,7 +449,7 @@ class Q {
449
449
  return new Q(...e);
450
450
  }
451
451
  }
452
- const Jf = Q.create({
452
+ const Xf = Q.create({
453
453
  name: "history",
454
454
  addOptions() {
455
455
  return {
@@ -458,7 +458,7 @@ const Jf = Q.create({
458
458
  };
459
459
  },
460
460
  addPmPlugins() {
461
- return [Xf(this.options)];
461
+ return [Kf(this.options)];
462
462
  },
463
463
  //prettier-ignore
464
464
  addCommands() {
@@ -486,18 +486,18 @@ let wi = null;
486
486
  const mt = function(t, e, n) {
487
487
  let r = wi || (wi = document.createRange());
488
488
  return r.setEnd(t, n ?? t.nodeValue.length), r.setStart(t, e || 0), r;
489
- }, Yf = function() {
489
+ }, Jf = function() {
490
490
  wi = null;
491
491
  }, ln = function(t, e, n, r) {
492
492
  return n && (ca(t, e, n, r, -1) || ca(t, e, n, r, 1));
493
- }, Gf = /^(img|br|input|textarea|hr)$/i;
493
+ }, Yf = /^(img|br|input|textarea|hr)$/i;
494
494
  function ca(t, e, n, r, o) {
495
495
  for (; ; ) {
496
496
  if (t == n && e == r)
497
497
  return !0;
498
498
  if (e == (o < 0 ? 0 : _e(t))) {
499
499
  let i = t.parentNode;
500
- if (!i || i.nodeType != 1 || Tr(t) || Gf.test(t.nodeName) || t.contentEditable == "false")
500
+ if (!i || i.nodeType != 1 || Tr(t) || Yf.test(t.nodeName) || t.contentEditable == "false")
501
501
  return !1;
502
502
  e = me(t) + (o < 0 ? 0 : 1), t = i;
503
503
  } else if (t.nodeType == 1) {
@@ -511,7 +511,7 @@ function ca(t, e, n, r, o) {
511
511
  function _e(t) {
512
512
  return t.nodeType == 3 ? t.nodeValue.length : t.childNodes.length;
513
513
  }
514
- function Zf(t, e) {
514
+ function Gf(t, e) {
515
515
  for (; ; ) {
516
516
  if (t.nodeType == 3 && e)
517
517
  return t;
@@ -525,7 +525,7 @@ function Zf(t, e) {
525
525
  return null;
526
526
  }
527
527
  }
528
- function Qf(t, e) {
528
+ function Zf(t, e) {
529
529
  for (; ; ) {
530
530
  if (t.nodeType == 3 && e < t.nodeValue.length)
531
531
  return t;
@@ -539,7 +539,7 @@ function Qf(t, e) {
539
539
  return null;
540
540
  }
541
541
  }
542
- function ep(t, e, n) {
542
+ function Qf(t, e, n) {
543
543
  for (let r = e == 0, o = e == _e(t); r || o; ) {
544
544
  if (t == n)
545
545
  return !0;
@@ -562,13 +562,13 @@ function Gt(t, e) {
562
562
  let n = document.createEvent("Event");
563
563
  return n.initEvent("keydown", !0, !0), n.keyCode = t, n.key = n.code = e, n;
564
564
  }
565
- function tp(t) {
565
+ function ep(t) {
566
566
  let e = t.activeElement;
567
567
  for (; e && e.shadowRoot; )
568
568
  e = e.shadowRoot.activeElement;
569
569
  return e;
570
570
  }
571
- function np(t, e, n) {
571
+ function tp(t, e, n) {
572
572
  if (t.caretPositionFromPoint)
573
573
  try {
574
574
  let r = t.caretPositionFromPoint(e, n);
@@ -584,8 +584,8 @@ function np(t, e, n) {
584
584
  }
585
585
  const ot = typeof navigator < "u" ? navigator : null, da = typeof document < "u" ? document : null, jt = ot && ot.userAgent || "", vi = /Edge\/(\d+)/.exec(jt), lc = /MSIE \d/.exec(jt), ki = /Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(jt), Oe = !!(lc || ki || vi), Lt = lc ? document.documentMode : ki ? +ki[1] : vi ? +vi[1] : 0, Je = !Oe && /gecko\/(\d+)/i.test(jt);
586
586
  Je && +(/Firefox\/(\d+)/.exec(jt) || [0, 0])[1];
587
- const Ci = !Oe && /Chrome\/(\d+)/.exec(jt), be = !!Ci, cc = Ci ? +Ci[1] : 0, xe = !Oe && !!ot && /Apple Computer/.test(ot.vendor), Dn = xe && (/Mobile\/\w+/.test(jt) || !!ot && ot.maxTouchPoints > 2), ze = Dn || (ot ? /Mac/.test(ot.platform) : !1), rp = ot ? /Win/.test(ot.platform) : !1, bt = /Android \d/.test(jt), Dr = !!da && "webkitFontSmoothing" in da.documentElement.style, op = Dr ? +(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent) || [0, 0])[1] : 0;
588
- function ip(t) {
587
+ const Ci = !Oe && /Chrome\/(\d+)/.exec(jt), be = !!Ci, cc = Ci ? +Ci[1] : 0, xe = !Oe && !!ot && /Apple Computer/.test(ot.vendor), Dn = xe && (/Mobile\/\w+/.test(jt) || !!ot && ot.maxTouchPoints > 2), ze = Dn || (ot ? /Mac/.test(ot.platform) : !1), np = ot ? /Win/.test(ot.platform) : !1, bt = /Android \d/.test(jt), Dr = !!da && "webkitFontSmoothing" in da.documentElement.style, rp = Dr ? +(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent) || [0, 0])[1] : 0;
588
+ function op(t) {
589
589
  let e = t.defaultView && t.defaultView.visualViewport;
590
590
  return e ? {
591
591
  left: 0,
@@ -602,7 +602,7 @@ function ip(t) {
602
602
  function pt(t, e) {
603
603
  return typeof t == "number" ? t : t[e];
604
604
  }
605
- function sp(t) {
605
+ function ip(t) {
606
606
  let e = t.getBoundingClientRect(), n = e.width / t.offsetWidth || 1, r = e.height / t.offsetHeight || 1;
607
607
  return {
608
608
  left: e.left,
@@ -618,7 +618,7 @@ function ua(t, e, n) {
618
618
  s = Tn(s);
619
619
  continue;
620
620
  }
621
- let a = s, l = a == i.body, c = l ? ip(i) : sp(a), d = 0, u = 0;
621
+ let a = s, l = a == i.body, c = l ? op(i) : ip(a), d = 0, u = 0;
622
622
  if (e.top < c.top + pt(r, "top") ? u = -(c.top - e.top + pt(o, "top")) : e.bottom > c.bottom - pt(r, "bottom") && (u = e.bottom - e.top > c.bottom - c.top ? e.top + pt(o, "top") - c.top : e.bottom - c.bottom + pt(o, "bottom")), e.left < c.left + pt(r, "left") ? d = -(c.left - e.left + pt(o, "left")) : e.right > c.right - pt(r, "right") && (d = e.right - c.right + pt(o, "right")), d || u)
623
623
  if (l)
624
624
  i.defaultView.scrollBy(d, u);
@@ -634,7 +634,7 @@ function ua(t, e, n) {
634
634
  s = f == "absolute" ? s.offsetParent : Tn(s);
635
635
  }
636
636
  }
637
- function ap(t) {
637
+ function sp(t) {
638
638
  let e = t.dom.getBoundingClientRect(), n = Math.max(0, e.top), r, o;
639
639
  for (let i = (e.left + e.right) / 2, s = n + 1; s < Math.min(innerHeight, e.bottom); s += 5) {
640
640
  let a = t.root.elementFromPoint(i, s);
@@ -654,7 +654,7 @@ function dc(t) {
654
654
  ;
655
655
  return e;
656
656
  }
657
- function lp({ refDOM: t, refTop: e, stack: n }) {
657
+ function ap({ refDOM: t, refTop: e, stack: n }) {
658
658
  let r = t ? t.getBoundingClientRect().top : 0;
659
659
  uc(n, r == 0 ? 0 : r - e);
660
660
  }
@@ -665,7 +665,7 @@ function uc(t, e) {
665
665
  }
666
666
  }
667
667
  let gn = null;
668
- function cp(t) {
668
+ function lp(t) {
669
669
  if (t.setActive)
670
670
  return t.setActive();
671
671
  if (gn)
@@ -703,9 +703,9 @@ function fc(t, e) {
703
703
  !n && (e.left >= h.right && e.top >= h.top || e.left >= h.left && e.top >= h.bottom) && (i = u + 1);
704
704
  }
705
705
  }
706
- return !n && l && (n = l, o = c, r = 0), n && n.nodeType == 3 ? dp(n, o) : !n || r && n.nodeType == 1 ? { node: t, offset: i } : fc(n, o);
706
+ return !n && l && (n = l, o = c, r = 0), n && n.nodeType == 3 ? cp(n, o) : !n || r && n.nodeType == 1 ? { node: t, offset: i } : fc(n, o);
707
707
  }
708
- function dp(t, e) {
708
+ function cp(t, e) {
709
709
  let n = t.nodeValue.length, r = document.createRange();
710
710
  for (let o = 0; o < n; o++) {
711
711
  r.setEnd(t, o + 1), r.setStart(t, o);
@@ -718,11 +718,11 @@ function dp(t, e) {
718
718
  function bs(t, e) {
719
719
  return t.left >= e.left - 1 && t.left <= e.right + 1 && t.top >= e.top - 1 && t.top <= e.bottom + 1;
720
720
  }
721
- function up(t, e) {
721
+ function dp(t, e) {
722
722
  let n = t.parentNode;
723
723
  return n && /^li$/i.test(n.nodeName) && e.left < t.getBoundingClientRect().left ? n : t;
724
724
  }
725
- function fp(t, e, n) {
725
+ function up(t, e, n) {
726
726
  let { node: r, offset: o } = fc(e, n), i = -1;
727
727
  if (r.nodeType == 1 && !r.firstChild) {
728
728
  let s = r.getBoundingClientRect();
@@ -730,7 +730,7 @@ function fp(t, e, n) {
730
730
  }
731
731
  return t.docView.posFromDOM(r, o, i);
732
732
  }
733
- function pp(t, e, n, r) {
733
+ function fp(t, e, n, r) {
734
734
  let o = -1;
735
735
  for (let i = e, s = !1; i != t.dom; ) {
736
736
  let a = t.docView.nearestDesc(i, !0), l;
@@ -761,8 +761,8 @@ function pc(t, e, n) {
761
761
  }
762
762
  return t;
763
763
  }
764
- function hp(t, e) {
765
- let n = t.dom.ownerDocument, r, o = 0, i = np(n, e.left, e.top);
764
+ function pp(t, e) {
765
+ let n = t.dom.ownerDocument, r, o = 0, i = tp(n, e.left, e.top);
766
766
  i && ({ node: r, offset: o } = i);
767
767
  let s = (t.root.elementFromPoint ? t.root : n).elementFromPoint(e.left, e.top), a;
768
768
  if (!s || !t.dom.contains(s.nodeType != 1 ? s.parentNode : s)) {
@@ -773,15 +773,15 @@ function hp(t, e) {
773
773
  if (xe)
774
774
  for (let c = s; r && c; c = Tn(c))
775
775
  c.draggable && (r = void 0);
776
- if (s = up(s, e), r) {
776
+ if (s = dp(s, e), r) {
777
777
  if (Je && r.nodeType == 1 && (o = Math.min(o, r.childNodes.length), o < r.childNodes.length)) {
778
778
  let d = r.childNodes[o], u;
779
779
  d.nodeName == "IMG" && (u = d.getBoundingClientRect()).right <= e.left && u.bottom > e.top && o++;
780
780
  }
781
781
  let c;
782
- Dr && o && r.nodeType == 1 && (c = r.childNodes[o - 1]).nodeType == 1 && c.contentEditable == "false" && c.getBoundingClientRect().top >= e.top && o--, r == t.dom && o == r.childNodes.length - 1 && r.lastChild.nodeType == 1 && e.top > r.lastChild.getBoundingClientRect().bottom ? a = t.state.doc.content.size : (o == 0 || r.nodeType != 1 || r.childNodes[o - 1].nodeName != "BR") && (a = pp(t, r, o, e));
782
+ Dr && o && r.nodeType == 1 && (c = r.childNodes[o - 1]).nodeType == 1 && c.contentEditable == "false" && c.getBoundingClientRect().top >= e.top && o--, r == t.dom && o == r.childNodes.length - 1 && r.lastChild.nodeType == 1 && e.top > r.lastChild.getBoundingClientRect().bottom ? a = t.state.doc.content.size : (o == 0 || r.nodeType != 1 || r.childNodes[o - 1].nodeName != "BR") && (a = fp(t, r, o, e));
783
783
  }
784
- a == null && (a = fp(t, s, e));
784
+ a == null && (a = up(t, s, e));
785
785
  let l = t.docView.nearestDesc(s, !0);
786
786
  return { pos: a, inside: l ? l.posAtStart - l.border : -1 };
787
787
  }
@@ -797,11 +797,11 @@ function Ot(t, e) {
797
797
  }
798
798
  return Array.prototype.find.call(n, fa) || t.getBoundingClientRect();
799
799
  }
800
- const mp = /[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;
800
+ const hp = /[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;
801
801
  function hc(t, e, n) {
802
802
  let { node: r, offset: o, atom: i } = t.docView.domFromPos(e, n < 0 ? -1 : 1), s = Dr || Je;
803
803
  if (r.nodeType == 3)
804
- if (s && (mp.test(r.nodeValue) || (n < 0 ? !o : o == r.nodeValue.length))) {
804
+ if (s && (hp.test(r.nodeValue) || (n < 0 ? !o : o == r.nodeValue.length))) {
805
805
  let l = Ot(mt(r, o, o), n);
806
806
  if (Je && o && /\s/.test(r.nodeValue[o - 1]) && o < r.nodeValue.length) {
807
807
  let c = Ot(mt(r, o - 1, o - 1), -1);
@@ -865,7 +865,7 @@ function mc(t, e, n) {
865
865
  r != e && t.updateState(r), o != t.dom && o && o.focus();
866
866
  }
867
867
  }
868
- function gp(t, e, n) {
868
+ function mp(t, e, n) {
869
869
  let r = e.selection, o = n == "up" ? r.$from : r.$to;
870
870
  return mc(t, e, () => {
871
871
  let { node: i } = t.docView.domFromPos(o.pos, n == "up" ? -1 : 1);
@@ -897,13 +897,13 @@ function gp(t, e, n) {
897
897
  return !0;
898
898
  });
899
899
  }
900
- const yp = /[\u0590-\u08ac]/;
901
- function bp(t, e, n) {
900
+ const gp = /[\u0590-\u08ac]/;
901
+ function yp(t, e, n) {
902
902
  let { $head: r } = e.selection;
903
903
  if (!r.parent.isTextblock)
904
904
  return !1;
905
905
  let o = r.parentOffset, i = !o, s = o == r.parent.content.size, a = t.domSelection();
906
- return a ? !yp.test(r.parent.textContent) || !a.modify ? n == "left" || n == "backward" ? i : s : mc(t, e, () => {
906
+ return a ? !gp.test(r.parent.textContent) || !a.modify ? n == "left" || n == "backward" ? i : s : mc(t, e, () => {
907
907
  let { focusNode: l, focusOffset: c, anchorNode: d, anchorOffset: u } = t.domSelectionRange(), f = a.caretBidiLevel;
908
908
  a.modify("move", n, "character");
909
909
  let p = r.depth ? t.docView.domAfterPos(r.before()) : t.dom, { focusNode: h, focusOffset: m } = t.domSelectionRange(), g = h && !p.contains(h.nodeType == 1 ? h : h.parentNode) || l == h && c == m;
@@ -915,8 +915,8 @@ function bp(t, e, n) {
915
915
  }) : r.pos == r.start() || r.pos == r.end();
916
916
  }
917
917
  let pa = null, ha = null, ma = !1;
918
- function wp(t, e, n) {
919
- return pa == e && ha == n ? ma : (pa = e, ha = n, ma = n == "up" || n == "down" ? gp(t, e, n) : bp(t, e, n));
918
+ function bp(t, e, n) {
919
+ return pa == e && ha == n ? ma : (pa = e, ha = n, ma = n == "up" || n == "down" ? mp(t, e, n) : yp(t, e, n));
920
920
  }
921
921
  const $e = 0, ga = 1, Zt = 2, it = 3;
922
922
  class Nr {
@@ -1300,7 +1300,7 @@ class gc extends Nr {
1300
1300
  return this.widget.type.side;
1301
1301
  }
1302
1302
  }
1303
- class vp extends Nr {
1303
+ class wp extends Nr {
1304
1304
  constructor(e, n, r, o) {
1305
1305
  super(e, [], n, null), this.textDOM = r, this.text = o;
1306
1306
  }
@@ -1381,7 +1381,7 @@ class Ft extends Nr {
1381
1381
  } else d || ({ dom: d, contentDOM: u } = Vn.renderSpec(document, n.type.spec.toDOM(n), null, n.attrs));
1382
1382
  !u && !n.isText && d.nodeName != "BR" && (d.hasAttribute("contenteditable") || (d.contentEditable = "false"), n.type.spec.draggable && (d.draggable = !0));
1383
1383
  let f = d;
1384
- return d = vc(d, r, n), c ? l = new kp(e, n, r, o, d, u || null, f, c, i, s + 1) : n.isText ? new Po(e, n, r, o, d, f, i) : new Ft(e, n, r, o, d, u || null, f, i, s + 1);
1384
+ return d = vc(d, r, n), c ? l = new vp(e, n, r, o, d, u || null, f, c, i, s + 1) : n.isText ? new Po(e, n, r, o, d, f, i) : new Ft(e, n, r, o, d, u || null, f, i, s + 1);
1385
1385
  }
1386
1386
  parseRule() {
1387
1387
  if (this.node.type.spec.reparseInView)
@@ -1417,14 +1417,14 @@ class Ft extends Nr {
1417
1417
  // separate step, syncs the DOM inside `this.contentDOM` to
1418
1418
  // `this.children`.
1419
1419
  updateChildren(e, n) {
1420
- let r = this.node.inlineContent, o = n, i = e.composing ? this.localCompositionInfo(e, n) : null, s = i && i.pos > -1 ? i : null, a = i && i.pos < 0, l = new Sp(this, s && s.node, e);
1421
- Ap(this.node, this.innerDeco, (c, d, u) => {
1422
- c.spec.marks ? l.syncToMarks(c.spec.marks, r, e) : c.type.side >= 0 && !u && l.syncToMarks(d == this.node.childCount ? kf.none : this.node.child(d).marks, r, e), l.placeWidget(c, e, o);
1420
+ let r = this.node.inlineContent, o = n, i = e.composing ? this.localCompositionInfo(e, n) : null, s = i && i.pos > -1 ? i : null, a = i && i.pos < 0, l = new Cp(this, s && s.node, e);
1421
+ Mp(this.node, this.innerDeco, (c, d, u) => {
1422
+ c.spec.marks ? l.syncToMarks(c.spec.marks, r, e) : c.type.side >= 0 && !u && l.syncToMarks(d == this.node.childCount ? vf.none : this.node.child(d).marks, r, e), l.placeWidget(c, e, o);
1423
1423
  }, (c, d, u, f) => {
1424
1424
  l.syncToMarks(c.marks, r, e);
1425
1425
  let p;
1426
1426
  l.findNodeMatch(c, d, u, f) || a && e.state.selection.from > o && e.state.selection.to < o + c.nodeSize && (p = l.findIndexWithChild(i.node)) > -1 && l.updateNodeAt(c, d, u, p, e) || l.updateNextNode(c, d, u, e, f, o) || l.addNode(c, d, u, e, o), o += c.nodeSize;
1427
- }), l.syncToMarks([], r, e), this.node.isTextblock && l.addTextblockHacks(), l.destroyRest(), (l.changed || this.dirty == Zt) && (s && this.protectLocalComposition(e, s), bc(this.contentDOM, this.children, e), Dn && Op(this.dom));
1427
+ }), l.syncToMarks([], r, e), this.node.isTextblock && l.addTextblockHacks(), l.destroyRest(), (l.changed || this.dirty == Zt) && (s && this.protectLocalComposition(e, s), bc(this.contentDOM, this.children, e), Dn && Ap(this.dom));
1428
1428
  }
1429
1429
  localCompositionInfo(e, n) {
1430
1430
  let { from: r, to: o } = e.state.selection;
@@ -1434,7 +1434,7 @@ class Ft extends Nr {
1434
1434
  if (!i || !this.dom.contains(i.parentNode))
1435
1435
  return null;
1436
1436
  if (this.node.inlineContent) {
1437
- let s = i.nodeValue, a = Tp(this.node.content, s, r - n, o - n);
1437
+ let s = i.nodeValue, a = Op(this.node.content, s, r - n, o - n);
1438
1438
  return a < 0 ? null : { node: i, pos: a, text: s };
1439
1439
  } else
1440
1440
  return { node: i, pos: -1, text: "" };
@@ -1450,7 +1450,7 @@ class Ft extends Nr {
1450
1450
  i.parentNode.removeChild(i.nextSibling);
1451
1451
  i.pmViewDesc && (i.pmViewDesc = void 0);
1452
1452
  }
1453
- let s = new vp(this, i, n, o);
1453
+ let s = new wp(this, i, n, o);
1454
1454
  e.input.compositionNodes.push(s), this.children = xi(this.children, r, r + o.length, e, s);
1455
1455
  }
1456
1456
  // If this desc must be updated to match the given node decoration,
@@ -1541,7 +1541,7 @@ class yc extends Nr {
1541
1541
  return this.dom.nodeName == "IMG";
1542
1542
  }
1543
1543
  }
1544
- class kp extends Ft {
1544
+ class vp extends Ft {
1545
1545
  constructor(e, n, r, o, i, s, a, l, c, d) {
1546
1546
  super(e, n, r, o, i, s, a, c, d), this.spec = l;
1547
1547
  }
@@ -1625,11 +1625,11 @@ function wc(t, e, n, r) {
1625
1625
  let l;
1626
1626
  a && a.nodeName == s.nodeName && o != t && (l = o.parentNode) && l.nodeName.toLowerCase() == s.nodeName || (l = document.createElement(s.nodeName), l.pmIsDeco = !0, l.appendChild(o), a = Qt[0]), o = l;
1627
1627
  }
1628
- Cp(o, a || Qt[0], s);
1628
+ kp(o, a || Qt[0], s);
1629
1629
  }
1630
1630
  return o;
1631
1631
  }
1632
- function Cp(t, e, n) {
1632
+ function kp(t, e, n) {
1633
1633
  for (let r in e)
1634
1634
  r != "class" && r != "style" && r != "nodeName" && !(r in n) && t.removeAttribute(r);
1635
1635
  for (let r in n)
@@ -1666,9 +1666,9 @@ function ba(t) {
1666
1666
  let e = t.nextSibling;
1667
1667
  return t.parentNode.removeChild(t), e;
1668
1668
  }
1669
- class Sp {
1669
+ class Cp {
1670
1670
  constructor(e, n, r) {
1671
- this.lock = n, this.view = r, this.index = 0, this.stack = [], this.changed = !1, this.top = e, this.preMatch = xp(e.node.content, e);
1671
+ this.lock = n, this.view = r, this.index = 0, this.stack = [], this.changed = !1, this.top = e, this.preMatch = Sp(e.node.content, e);
1672
1672
  }
1673
1673
  // Destroy and remove the children between the given indices in
1674
1674
  // `this.top`.
@@ -1816,7 +1816,7 @@ class Sp {
1816
1816
  return this.lock && (e == this.lock || e.nodeType == 1 && e.contains(this.lock.parentNode));
1817
1817
  }
1818
1818
  }
1819
- function xp(t, e) {
1819
+ function Sp(t, e) {
1820
1820
  let n = e, r = n.children.length, o = t.childCount, i = /* @__PURE__ */ new Map(), s = [];
1821
1821
  e: for (; o > 0; ) {
1822
1822
  let a;
@@ -1843,10 +1843,10 @@ function xp(t, e) {
1843
1843
  }
1844
1844
  return { index: o, matched: i, matches: s.reverse() };
1845
1845
  }
1846
- function Mp(t, e) {
1846
+ function xp(t, e) {
1847
1847
  return t.type.side - e.type.side;
1848
1848
  }
1849
- function Ap(t, e, n, r) {
1849
+ function Mp(t, e, n, r) {
1850
1850
  let o = e.locals(t), i = 0;
1851
1851
  if (o.length == 0) {
1852
1852
  for (let c = 0; c < t.childCount; c++) {
@@ -1864,7 +1864,7 @@ function Ap(t, e, n, r) {
1864
1864
  }
1865
1865
  if (d)
1866
1866
  if (u) {
1867
- u.sort(Mp);
1867
+ u.sort(xp);
1868
1868
  for (let g = 0; g < u.length; g++)
1869
1869
  n(u[g], c, !!l);
1870
1870
  } else
@@ -1894,13 +1894,13 @@ function Ap(t, e, n, r) {
1894
1894
  r(f, m, e.forChild(i, f), p), i = h;
1895
1895
  }
1896
1896
  }
1897
- function Op(t) {
1897
+ function Ap(t) {
1898
1898
  if (t.nodeName == "UL" || t.nodeName == "OL") {
1899
1899
  let e = t.style.cssText;
1900
1900
  t.style.cssText = e + "; list-style: square !important", window.getComputedStyle(t).listStyle, t.style.cssText = e;
1901
1901
  }
1902
1902
  }
1903
- function Tp(t, e, n, r) {
1903
+ function Op(t, e, n, r) {
1904
1904
  for (let o = 0, i = 0; o < t.childCount && i <= r; ) {
1905
1905
  let s = t.child(o++), a = i;
1906
1906
  if (i += s.nodeSize, !s.isText)
@@ -1944,7 +1944,7 @@ function ws(t, e = null) {
1944
1944
  for (l = s; o && !o.node; )
1945
1945
  o = o.parent;
1946
1946
  let u = o.node;
1947
- if (o && u.isAtom && B.isSelectable(u) && o.parent && !(u.isInline && ep(n.focusNode, n.focusOffset, o.dom))) {
1947
+ if (o && u.isAtom && B.isSelectable(u) && o.parent && !(u.isInline && Qf(n.focusNode, n.focusOffset, o.dom))) {
1948
1948
  let f = o.posBefore;
1949
1949
  c = new B(s == f ? a : r.resolve(f));
1950
1950
  }
@@ -1984,10 +1984,10 @@ function kt(t, e = !1) {
1984
1984
  }
1985
1985
  }
1986
1986
  if (t.domObserver.disconnectSelection(), t.cursorWrapper)
1987
- Np(t);
1987
+ Dp(t);
1988
1988
  else {
1989
1989
  let { anchor: r, head: o } = n, i, s;
1990
- wa && !(n instanceof H) && (n.$from.parent.inlineContent || (i = va(t, n.from)), !n.empty && !n.$from.parent.inlineContent && (s = va(t, n.to))), t.docView.setSelection(r, o, t, e), wa && (i && ka(i), s && ka(s)), n.visible ? t.dom.classList.remove("ProseMirror-hideselection") : (t.dom.classList.add("ProseMirror-hideselection"), "onselectionchange" in document && Dp(t));
1990
+ wa && !(n instanceof H) && (n.$from.parent.inlineContent || (i = va(t, n.from)), !n.empty && !n.$from.parent.inlineContent && (s = va(t, n.to))), t.docView.setSelection(r, o, t, e), wa && (i && ka(i), s && ka(s)), n.visible ? t.dom.classList.remove("ProseMirror-hideselection") : (t.dom.classList.add("ProseMirror-hideselection"), "onselectionchange" in document && Tp(t));
1991
1991
  }
1992
1992
  t.domObserver.setCurSelection(), t.domObserver.connectSelection();
1993
1993
  }
@@ -2010,7 +2010,7 @@ function Qo(t) {
2010
2010
  function ka(t) {
2011
2011
  t.contentEditable = "false", t.wasDraggable && (t.draggable = !0, t.wasDraggable = null);
2012
2012
  }
2013
- function Dp(t) {
2013
+ function Tp(t) {
2014
2014
  let e = t.dom.ownerDocument;
2015
2015
  e.removeEventListener("selectionchange", t.input.hideSelectionGuard);
2016
2016
  let n = t.domSelectionRange(), r = n.anchorNode, o = n.anchorOffset;
@@ -2020,7 +2020,7 @@ function Dp(t) {
2020
2020
  }, 20));
2021
2021
  });
2022
2022
  }
2023
- function Np(t) {
2023
+ function Dp(t) {
2024
2024
  let e = t.domSelection(), n = document.createRange();
2025
2025
  if (!e)
2026
2026
  return;
@@ -2053,7 +2053,7 @@ function Sc(t) {
2053
2053
  return !1;
2054
2054
  }
2055
2055
  }
2056
- function Ep(t) {
2056
+ function Np(t) {
2057
2057
  let e = t.docView.domFromPos(t.state.selection.anchor, 0), n = t.domSelectionRange();
2058
2058
  return ln(e.node, e.offset, n.anchorNode, n.anchorOffset);
2059
2059
  }
@@ -2102,9 +2102,9 @@ function tr(t, e) {
2102
2102
  return n && n.size == 0 && (e < 0 || t.nextSibling || t.nodeName != "BR");
2103
2103
  }
2104
2104
  function yn(t, e) {
2105
- return e < 0 ? Ip(t) : Pp(t);
2105
+ return e < 0 ? Ep(t) : Ip(t);
2106
2106
  }
2107
- function Ip(t) {
2107
+ function Ep(t) {
2108
2108
  let e = t.domSelectionRange(), n = e.focusNode, r = e.focusOffset;
2109
2109
  if (!n)
2110
2110
  return;
@@ -2140,7 +2140,7 @@ function Ip(t) {
2140
2140
  }
2141
2141
  s ? Ai(t, n, r) : o && Ai(t, o, i);
2142
2142
  }
2143
- function Pp(t) {
2143
+ function Ip(t) {
2144
2144
  let e = t.domSelectionRange(), n = e.focusNode, r = e.focusOffset;
2145
2145
  if (!n)
2146
2146
  return;
@@ -2176,7 +2176,7 @@ function xc(t) {
2176
2176
  let e = t.pmViewDesc;
2177
2177
  return e && e.node && e.node.isBlock;
2178
2178
  }
2179
- function Rp(t, e) {
2179
+ function Pp(t, e) {
2180
2180
  for (; t && e == t.childNodes.length && !Tr(t); )
2181
2181
  e = me(t) + 1, t = t.parentNode;
2182
2182
  for (; t && e < t.childNodes.length; ) {
@@ -2188,7 +2188,7 @@ function Rp(t, e) {
2188
2188
  t = n, e = 0;
2189
2189
  }
2190
2190
  }
2191
- function Lp(t, e) {
2191
+ function Rp(t, e) {
2192
2192
  for (; t && !e && !Tr(t); )
2193
2193
  e = me(t), t = t.parentNode;
2194
2194
  for (; t && e; ) {
@@ -2203,7 +2203,7 @@ function Lp(t, e) {
2203
2203
  function Ai(t, e, n) {
2204
2204
  if (e.nodeType != 3) {
2205
2205
  let i, s;
2206
- (s = Rp(e, n)) ? (e = s, n = 0) : (i = Lp(e, n)) && (e = i, n = i.nodeValue.length);
2206
+ (s = Pp(e, n)) ? (e = s, n = 0) : (i = Rp(e, n)) && (e = i, n = i.nodeValue.length);
2207
2207
  }
2208
2208
  let r = t.domSelection();
2209
2209
  if (!r)
@@ -2220,7 +2220,7 @@ function Ai(t, e, n) {
2220
2220
  }
2221
2221
  function Ma(t, e) {
2222
2222
  let n = t.state.doc.resolve(e);
2223
- if (!(be || rp) && n.parent.inlineContent) {
2223
+ if (!(be || np) && n.parent.inlineContent) {
2224
2224
  let o = t.coordsAtPos(e);
2225
2225
  if (e > n.start()) {
2226
2226
  let i = t.coordsAtPos(e - 1), s = (i.top + i.bottom) / 2;
@@ -2271,7 +2271,7 @@ function Oa(t, e) {
2271
2271
  function Ta(t, e, n) {
2272
2272
  t.domObserver.stop(), e.contentEditable = n, t.domObserver.start();
2273
2273
  }
2274
- function Fp(t) {
2274
+ function Lp(t) {
2275
2275
  if (!xe || t.state.selection.$head.parentOffset > 0)
2276
2276
  return !1;
2277
2277
  let { focusNode: e, focusOffset: n } = t.domSelectionRange();
@@ -2281,12 +2281,12 @@ function Fp(t) {
2281
2281
  }
2282
2282
  return !1;
2283
2283
  }
2284
- function Bp(t) {
2284
+ function Fp(t) {
2285
2285
  let e = "";
2286
2286
  return t.ctrlKey && (e += "c"), t.metaKey && (e += "m"), t.altKey && (e += "a"), t.shiftKey && (e += "s"), e;
2287
2287
  }
2288
- function zp(t, e) {
2289
- let n = e.keyCode, r = Bp(e);
2288
+ function Bp(t, e) {
2289
+ let n = e.keyCode, r = Fp(e);
2290
2290
  if (n == 8 || ze && n == 72 && r == "c")
2291
2291
  return Oa(t, -1) || yn(t, -1);
2292
2292
  if (n == 46 && !e.shiftKey || ze && n == 68 && r == "c")
@@ -2303,7 +2303,7 @@ function zp(t, e) {
2303
2303
  if (n == 38 || ze && n == 80 && r == "c")
2304
2304
  return Aa(t, -1, r) || yn(t, -1);
2305
2305
  if (n == 40 || ze && n == 78 && r == "c")
2306
- return Fp(t) || Aa(t, 1, r) || yn(t, 1);
2306
+ return Lp(t) || Aa(t, 1, r) || yn(t, 1);
2307
2307
  if (r == (ze ? "m" : "c") && (n == 66 || n == 73 || n == 89 || n == 90))
2308
2308
  return !0;
2309
2309
  }
@@ -2361,7 +2361,7 @@ function Mc(t, e, n, r, o) {
2361
2361
  } else
2362
2362
  t.someProp("transformPastedHTML", (u) => {
2363
2363
  n = u(n, t);
2364
- }), s = Hp(n), Dr && jp(s);
2364
+ }), s = $p(n), Dr && Hp(s);
2365
2365
  let c = s && s.querySelector("[data-pm-slice]"), d = c && /^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(c.getAttribute("data-pm-slice") || "");
2366
2366
  if (d && d[3])
2367
2367
  for (let u = +d[3]; u > 0; u--) {
@@ -2376,11 +2376,11 @@ function Mc(t, e, n, r, o) {
2376
2376
  preserveWhitespace: !!(l || d),
2377
2377
  context: o,
2378
2378
  ruleFromNode(f) {
2379
- return f.nodeName == "BR" && !f.nextSibling && f.parentNode && !_p.test(f.parentNode.nodeName) ? { ignore: !0 } : null;
2379
+ return f.nodeName == "BR" && !f.nextSibling && f.parentNode && !zp.test(f.parentNode.nodeName) ? { ignore: !0 } : null;
2380
2380
  }
2381
2381
  })), d)
2382
- a = Wp(Da(a, +d[1], +d[2]), d[4]);
2383
- else if (a = W.maxOpen(Vp(a.content, o), !0), a.openStart || a.openEnd) {
2382
+ a = jp(Da(a, +d[1], +d[2]), d[4]);
2383
+ else if (a = W.maxOpen(_p(a.content, o), !0), a.openStart || a.openEnd) {
2384
2384
  let u = 0, f = 0;
2385
2385
  for (let p = a.content.firstChild; u < a.openStart && !p.type.spec.isolating; u++, p = p.firstChild)
2386
2386
  ;
@@ -2392,8 +2392,8 @@ function Mc(t, e, n, r, o) {
2392
2392
  a = u(a, t);
2393
2393
  }), a;
2394
2394
  }
2395
- const _p = /^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/i;
2396
- function Vp(t, e) {
2395
+ const zp = /^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/i;
2396
+ function _p(t, e) {
2397
2397
  if (t.childCount < 2)
2398
2398
  return t;
2399
2399
  for (let n = e.depth; n >= 0; n--) {
@@ -2459,27 +2459,27 @@ function Nc() {
2459
2459
  return Na || (Na = document.implementation.createHTMLDocument("title"));
2460
2460
  }
2461
2461
  let ei = null;
2462
- function $p(t) {
2462
+ function Vp(t) {
2463
2463
  let e = window.trustedTypes;
2464
2464
  return e ? (ei || (ei = e.createPolicy("ProseMirrorClipboard", { createHTML: (n) => n })), ei.createHTML(t)) : t;
2465
2465
  }
2466
- function Hp(t) {
2466
+ function $p(t) {
2467
2467
  let e = /^(\s*<meta [^>]*>)*/.exec(t);
2468
2468
  e && (t = t.slice(e[0].length));
2469
2469
  let n = Nc().createElement("div"), r = /<([a-z][^>\s]+)/i.exec(t), o;
2470
- if ((o = r && Dc[r[1].toLowerCase()]) && (t = o.map((i) => "<" + i + ">").join("") + t + o.map((i) => "</" + i + ">").reverse().join("")), n.innerHTML = $p(t), o)
2470
+ if ((o = r && Dc[r[1].toLowerCase()]) && (t = o.map((i) => "<" + i + ">").join("") + t + o.map((i) => "</" + i + ">").reverse().join("")), n.innerHTML = Vp(t), o)
2471
2471
  for (let i = 0; i < o.length; i++)
2472
2472
  n = n.querySelector(o[i]) || n;
2473
2473
  return n;
2474
2474
  }
2475
- function jp(t) {
2475
+ function Hp(t) {
2476
2476
  let e = t.querySelectorAll(be ? "span:not([class]):not([style])" : "span.Apple-converted-space");
2477
2477
  for (let n = 0; n < e.length; n++) {
2478
2478
  let r = e[n];
2479
2479
  r.childNodes.length == 1 && r.textContent == " " && r.parentNode && r.parentNode.replaceChild(t.ownerDocument.createTextNode(" "), r);
2480
2480
  }
2481
2481
  }
2482
- function Wp(t, e) {
2482
+ function jp(t, e) {
2483
2483
  if (!t.size)
2484
2484
  return t;
2485
2485
  let n = t.content.firstChild.type.schema, r;
@@ -2497,25 +2497,25 @@ function Wp(t, e) {
2497
2497
  }
2498
2498
  return new W(o, i, s);
2499
2499
  }
2500
- const Me = {}, Ae = {}, Up = { touchstart: !0, touchmove: !0 };
2501
- class qp {
2500
+ const Me = {}, Ae = {}, Wp = { touchstart: !0, touchmove: !0 };
2501
+ class Up {
2502
2502
  constructor() {
2503
2503
  this.shiftKey = !1, this.mouseDown = null, this.lastKeyCode = null, this.lastKeyCodeTime = 0, this.lastClick = { time: 0, x: 0, y: 0, type: "" }, this.lastSelectionOrigin = null, this.lastSelectionTime = 0, this.lastIOSEnter = 0, this.lastIOSEnterFallbackTimeout = -1, this.lastFocus = 0, this.lastTouch = 0, this.lastChromeDelete = 0, this.composing = !1, this.compositionNode = null, this.composingTimeout = -1, this.compositionNodes = [], this.compositionEndedAt = -2e8, this.compositionID = 1, this.compositionPendingChanges = 0, this.domChangeCount = 0, this.eventHandlers = /* @__PURE__ */ Object.create(null), this.hideSelectionGuard = null;
2504
2504
  }
2505
2505
  }
2506
- function Kp(t) {
2506
+ function qp(t) {
2507
2507
  for (let e in Me) {
2508
2508
  let n = Me[e];
2509
2509
  t.dom.addEventListener(e, t.input.eventHandlers[e] = (r) => {
2510
- Jp(t, r) && !Cs(t, r) && (t.editable || !(r.type in Ae)) && n(t, r);
2511
- }, Up[e] ? { passive: !0 } : void 0);
2510
+ Xp(t, r) && !Cs(t, r) && (t.editable || !(r.type in Ae)) && n(t, r);
2511
+ }, Wp[e] ? { passive: !0 } : void 0);
2512
2512
  }
2513
2513
  xe && t.dom.addEventListener("input", () => null), Ti(t);
2514
2514
  }
2515
2515
  function It(t, e) {
2516
2516
  t.input.lastSelectionOrigin = e, t.input.lastSelectionTime = Date.now();
2517
2517
  }
2518
- function Xp(t) {
2518
+ function Kp(t) {
2519
2519
  t.domObserver.stop();
2520
2520
  for (let e in t.input.eventHandlers)
2521
2521
  t.dom.removeEventListener(e, t.input.eventHandlers[e]);
@@ -2533,7 +2533,7 @@ function Cs(t, e) {
2533
2533
  return r ? r(t, e) || e.defaultPrevented : !1;
2534
2534
  });
2535
2535
  }
2536
- function Jp(t, e) {
2536
+ function Xp(t, e) {
2537
2537
  if (!e.bubbles)
2538
2538
  return !0;
2539
2539
  if (e.defaultPrevented)
@@ -2543,7 +2543,7 @@ function Jp(t, e) {
2543
2543
  return !1;
2544
2544
  return !0;
2545
2545
  }
2546
- function Yp(t, e) {
2546
+ function Jp(t, e) {
2547
2547
  !Cs(t, e) && Me[e.type] && (t.editable || !(e.type in Ae)) && Me[e.type](t, e);
2548
2548
  }
2549
2549
  Ae.keydown = (t, e) => {
@@ -2554,7 +2554,7 @@ Ae.keydown = (t, e) => {
2554
2554
  t.input.lastIOSEnter = r, t.input.lastIOSEnterFallbackTimeout = setTimeout(() => {
2555
2555
  t.input.lastIOSEnter == r && (t.someProp("handleKeyDown", (o) => o(t, Gt(13, "Enter"))), t.input.lastIOSEnter = 0);
2556
2556
  }, 200);
2557
- } else t.someProp("handleKeyDown", (r) => r(t, n)) || zp(t, n) ? n.preventDefault() : It(t, "key");
2557
+ } else t.someProp("handleKeyDown", (r) => r(t, n)) || Bp(t, n) ? n.preventDefault() : It(t, "key");
2558
2558
  };
2559
2559
  Ae.keyup = (t, e) => {
2560
2560
  e.keyCode == 16 && (t.input.shiftKey = !1);
@@ -2576,7 +2576,7 @@ Ae.keypress = (t, e) => {
2576
2576
  function Ro(t) {
2577
2577
  return { left: t.clientX, top: t.clientY };
2578
2578
  }
2579
- function Gp(t, e) {
2579
+ function Yp(t, e) {
2580
2580
  let n = e.x - t.clientX, r = e.y - t.clientY;
2581
2581
  return n * n + r * r < 100;
2582
2582
  }
@@ -2595,13 +2595,13 @@ function On(t, e, n) {
2595
2595
  let r = t.state.tr.setSelection(e);
2596
2596
  r.setMeta("pointer", !0), t.dispatch(r);
2597
2597
  }
2598
- function Zp(t, e) {
2598
+ function Gp(t, e) {
2599
2599
  if (e == -1)
2600
2600
  return !1;
2601
2601
  let n = t.state.doc.resolve(e), r = n.nodeAfter;
2602
2602
  return r && r.isAtom && B.isSelectable(r) ? (On(t, new B(n)), !0) : !1;
2603
2603
  }
2604
- function Qp(t, e) {
2604
+ function Zp(t, e) {
2605
2605
  if (e == -1)
2606
2606
  return !1;
2607
2607
  let n = t.state.selection, r, o;
@@ -2616,16 +2616,16 @@ function Qp(t, e) {
2616
2616
  }
2617
2617
  return o != null ? (On(t, B.create(t.state.doc, o)), !0) : !1;
2618
2618
  }
2619
- function eh(t, e, n, r, o) {
2620
- return Ss(t, "handleClickOn", e, n, r) || t.someProp("handleClick", (i) => i(t, e, r)) || (o ? Qp(t, n) : Zp(t, n));
2619
+ function Qp(t, e, n, r, o) {
2620
+ return Ss(t, "handleClickOn", e, n, r) || t.someProp("handleClick", (i) => i(t, e, r)) || (o ? Zp(t, n) : Gp(t, n));
2621
2621
  }
2622
- function th(t, e, n, r) {
2622
+ function eh(t, e, n, r) {
2623
2623
  return Ss(t, "handleDoubleClickOn", e, n, r) || t.someProp("handleDoubleClick", (o) => o(t, e, r));
2624
2624
  }
2625
- function nh(t, e, n, r) {
2626
- return Ss(t, "handleTripleClickOn", e, n, r) || t.someProp("handleTripleClick", (o) => o(t, e, r)) || rh(t, n, r);
2625
+ function th(t, e, n, r) {
2626
+ return Ss(t, "handleTripleClickOn", e, n, r) || t.someProp("handleTripleClick", (o) => o(t, e, r)) || nh(t, n, r);
2627
2627
  }
2628
- function rh(t, e, n) {
2628
+ function nh(t, e, n) {
2629
2629
  if (n.button != 0)
2630
2630
  return !1;
2631
2631
  let r = t.state.doc;
@@ -2651,11 +2651,11 @@ Me.mousedown = (t, e) => {
2651
2651
  let n = e;
2652
2652
  t.input.shiftKey = n.shiftKey;
2653
2653
  let r = xs(t), o = Date.now(), i = "singleClick";
2654
- o - t.input.lastClick.time < 500 && Gp(n, t.input.lastClick) && !n[Ec] && (t.input.lastClick.type == "singleClick" ? i = "doubleClick" : t.input.lastClick.type == "doubleClick" && (i = "tripleClick")), t.input.lastClick = { time: o, x: n.clientX, y: n.clientY, type: i };
2654
+ o - t.input.lastClick.time < 500 && Yp(n, t.input.lastClick) && !n[Ec] && (t.input.lastClick.type == "singleClick" ? i = "doubleClick" : t.input.lastClick.type == "doubleClick" && (i = "tripleClick")), t.input.lastClick = { time: o, x: n.clientX, y: n.clientY, type: i };
2655
2655
  let s = t.posAtCoords(Ro(n));
2656
- s && (i == "singleClick" ? (t.input.mouseDown && t.input.mouseDown.done(), t.input.mouseDown = new oh(t, s, n, !!r)) : (i == "doubleClick" ? th : nh)(t, s.pos, s.inside, n) ? n.preventDefault() : It(t, "pointer"));
2656
+ s && (i == "singleClick" ? (t.input.mouseDown && t.input.mouseDown.done(), t.input.mouseDown = new rh(t, s, n, !!r)) : (i == "doubleClick" ? eh : th)(t, s.pos, s.inside, n) ? n.preventDefault() : It(t, "pointer"));
2657
2657
  };
2658
- class oh {
2658
+ class rh {
2659
2659
  constructor(e, n, r, o) {
2660
2660
  this.view = e, this.pos = n, this.event = r, this.flushed = o, this.delayedSelectionSync = !1, this.mightDrag = null, this.startDoc = e.state.doc, this.selectNode = !!r[Ec], this.allowDefault = r.shiftKey;
2661
2661
  let i, s;
@@ -2684,7 +2684,7 @@ class oh {
2684
2684
  if (this.done(), !this.view.dom.contains(e.target))
2685
2685
  return;
2686
2686
  let n = this.pos;
2687
- this.view.state.doc != this.startDoc && (n = this.view.posAtCoords(Ro(e))), this.updateAllowDefault(e), this.allowDefault || !n ? It(this.view, "pointer") : eh(this.view, n.pos, n.inside, e, this.selectNode) ? e.preventDefault() : e.button == 0 && (this.flushed || // Safari ignores clicks on draggable elements
2687
+ this.view.state.doc != this.startDoc && (n = this.view.posAtCoords(Ro(e))), this.updateAllowDefault(e), this.allowDefault || !n ? It(this.view, "pointer") : Qp(this.view, n.pos, n.inside, e, this.selectNode) ? e.preventDefault() : e.button == 0 && (this.flushed || // Safari ignores clicks on draggable elements
2688
2688
  xe && this.mightDrag && !this.mightDrag.node.isAtom || // Chrome will sometimes treat a node selection as a
2689
2689
  // cursor, but still report that the node is selected
2690
2690
  // when asked through getSelection. You'll then get a
@@ -2711,7 +2711,7 @@ Me.contextmenu = (t) => xs(t);
2711
2711
  function Ic(t, e) {
2712
2712
  return t.composing ? !0 : xe && Math.abs(e.timeStamp - t.input.compositionEndedAt) < 500 ? (t.input.compositionEndedAt = -2e8, !0) : !1;
2713
2713
  }
2714
- const ih = bt ? 5e3 : -1;
2714
+ const oh = bt ? 5e3 : -1;
2715
2715
  Ae.compositionstart = Ae.compositionupdate = (t) => {
2716
2716
  if (!t.composing) {
2717
2717
  t.domObserver.flush();
@@ -2734,7 +2734,7 @@ Ae.compositionstart = Ae.compositionupdate = (t) => {
2734
2734
  }
2735
2735
  t.input.composing = !0;
2736
2736
  }
2737
- Pc(t, ih);
2737
+ Pc(t, oh);
2738
2738
  };
2739
2739
  Ae.compositionend = (t, e) => {
2740
2740
  t.composing && (t.input.composing = !1, t.input.compositionEndedAt = e.timeStamp, t.input.compositionPendingChanges = t.domObserver.pendingRecords().length ? t.input.compositionID : 0, t.input.compositionNode = null, t.input.compositionPendingChanges && Promise.resolve().then(() => t.domObserver.flush()), t.input.compositionID++, Pc(t, 20));
@@ -2743,14 +2743,14 @@ function Pc(t, e) {
2743
2743
  clearTimeout(t.input.composingTimeout), e > -1 && (t.input.composingTimeout = setTimeout(() => go(t), e));
2744
2744
  }
2745
2745
  function Rc(t) {
2746
- for (t.composing && (t.input.composing = !1, t.input.compositionEndedAt = ah()); t.input.compositionNodes.length > 0; )
2746
+ for (t.composing && (t.input.composing = !1, t.input.compositionEndedAt = sh()); t.input.compositionNodes.length > 0; )
2747
2747
  t.input.compositionNodes.pop().markParentsDirty();
2748
2748
  }
2749
- function sh(t) {
2749
+ function ih(t) {
2750
2750
  let e = t.domSelectionRange();
2751
2751
  if (!e.focusNode)
2752
2752
  return null;
2753
- let n = Zf(e.focusNode, e.focusOffset), r = Qf(e.focusNode, e.focusOffset);
2753
+ let n = Gf(e.focusNode, e.focusOffset), r = Zf(e.focusNode, e.focusOffset);
2754
2754
  if (n && r && n != r) {
2755
2755
  let o = r.pmViewDesc, i = t.domObserver.lastChangedTextNode;
2756
2756
  if (n == i || r == i)
@@ -2765,7 +2765,7 @@ function sh(t) {
2765
2765
  }
2766
2766
  return n || r;
2767
2767
  }
2768
- function ah() {
2768
+ function sh() {
2769
2769
  let t = document.createEvent("Event");
2770
2770
  return t.initEvent("event", !0, !0), t.timeStamp;
2771
2771
  }
@@ -2778,7 +2778,7 @@ function go(t, e = !1) {
2778
2778
  return !1;
2779
2779
  }
2780
2780
  }
2781
- function lh(t, e) {
2781
+ function ah(t, e) {
2782
2782
  if (!t.dom.parentNode)
2783
2783
  return;
2784
2784
  let n = t.dom.parentNode.appendChild(document.createElement("div"));
@@ -2788,18 +2788,18 @@ function lh(t, e) {
2788
2788
  n.parentNode && n.parentNode.removeChild(n), t.focus();
2789
2789
  }, 50);
2790
2790
  }
2791
- const ur = Oe && Lt < 15 || Dn && op < 604;
2791
+ const ur = Oe && Lt < 15 || Dn && rp < 604;
2792
2792
  Me.copy = Ae.cut = (t, e) => {
2793
2793
  let n = e, r = t.state.selection, o = n.type == "cut";
2794
2794
  if (r.empty)
2795
2795
  return;
2796
2796
  let i = ur ? null : n.clipboardData, s = r.content(), { dom: a, text: l } = ks(t, s);
2797
- i ? (n.preventDefault(), i.clearData(), i.setData("text/html", a.innerHTML), i.setData("text/plain", l)) : lh(t, a), o && t.dispatch(t.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent", "cut"));
2797
+ i ? (n.preventDefault(), i.clearData(), i.setData("text/html", a.innerHTML), i.setData("text/plain", l)) : ah(t, a), o && t.dispatch(t.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent", "cut"));
2798
2798
  };
2799
- function ch(t) {
2799
+ function lh(t) {
2800
2800
  return t.openStart == 0 && t.openEnd == 0 && t.content.childCount == 1 ? t.content.firstChild : null;
2801
2801
  }
2802
- function dh(t, e) {
2802
+ function ch(t, e) {
2803
2803
  if (!t.dom.parentNode)
2804
2804
  return;
2805
2805
  let n = t.input.shiftKey || t.state.selection.$from.parent.type.spec.code, r = t.dom.parentNode.appendChild(document.createElement(n ? "textarea" : "div"));
@@ -2815,7 +2815,7 @@ function fr(t, e, n, r, o) {
2815
2815
  return !0;
2816
2816
  if (!i)
2817
2817
  return !1;
2818
- let s = ch(i), a = s ? t.state.tr.replaceSelectionWith(s, r) : t.state.tr.replaceSelection(i);
2818
+ let s = lh(i), a = s ? t.state.tr.replaceSelectionWith(s, r) : t.state.tr.replaceSelection(i);
2819
2819
  return t.dispatch(a.scrollIntoView().setMeta("paste", !0).setMeta("uiEvent", "paste")), !0;
2820
2820
  }
2821
2821
  function Lc(t) {
@@ -2830,17 +2830,17 @@ Ae.paste = (t, e) => {
2830
2830
  if (t.composing && !bt)
2831
2831
  return;
2832
2832
  let r = ur ? null : n.clipboardData, o = t.input.shiftKey && t.input.lastKeyCode != 45;
2833
- r && fr(t, Lc(r), r.getData("text/html"), o, n) ? n.preventDefault() : dh(t, n);
2833
+ r && fr(t, Lc(r), r.getData("text/html"), o, n) ? n.preventDefault() : ch(t, n);
2834
2834
  };
2835
2835
  class Fc {
2836
2836
  constructor(e, n, r) {
2837
2837
  this.slice = e, this.move = n, this.node = r;
2838
2838
  }
2839
2839
  }
2840
- const uh = ze ? "altKey" : "ctrlKey";
2840
+ const dh = ze ? "altKey" : "ctrlKey";
2841
2841
  function Bc(t, e) {
2842
2842
  let n = t.someProp("dragCopies", (r) => !r(e));
2843
- return n ?? !e[uh];
2843
+ return n ?? !e[dh];
2844
2844
  }
2845
2845
  Me.dragstart = (t, e) => {
2846
2846
  let n = e, r = t.input.mouseDown;
@@ -3122,7 +3122,7 @@ class F {
3122
3122
  let l = this.local[a].map(e, r, o);
3123
3123
  l && l.type.valid(n, l) ? (s || (s = [])).push(l) : i.onRemove && i.onRemove(this.local[a].spec);
3124
3124
  }
3125
- return this.children.length ? fh(this.children, s || [], e, n, r, o, i) : s ? new F(s.sort(rn), xn) : ye;
3125
+ return this.children.length ? uh(this.children, s || [], e, n, r, o, i) : s ? new F(s.sort(rn), xn) : ye;
3126
3126
  }
3127
3127
  /**
3128
3128
  Add the given array of decorations to the ones in the set,
@@ -3300,7 +3300,7 @@ class Nt {
3300
3300
  this.members[n].forEachSet(e);
3301
3301
  }
3302
3302
  }
3303
- function fh(t, e, n, r, o, i, s) {
3303
+ function uh(t, e, n, r, o, i, s) {
3304
3304
  let a = t.slice();
3305
3305
  for (let c = 0, d = i; c < n.maps.length; c++) {
3306
3306
  let u = 0;
@@ -3336,7 +3336,7 @@ function fh(t, e, n, r, o, i, s) {
3336
3336
  l = !0;
3337
3337
  }
3338
3338
  if (l) {
3339
- let c = ph(a, t, e, n, o, i, s), d = bo(c, r, 0, s);
3339
+ let c = fh(a, t, e, n, o, i, s), d = bo(c, r, 0, s);
3340
3340
  e = d.local;
3341
3341
  for (let u = 0; u < a.length; u += 3)
3342
3342
  a[u + 1] < 0 && (a.splice(u, 3), u -= 3);
@@ -3359,7 +3359,7 @@ function zc(t, e) {
3359
3359
  }
3360
3360
  return n;
3361
3361
  }
3362
- function ph(t, e, n, r, o, i, s) {
3362
+ function fh(t, e, n, r, o, i, s) {
3363
3363
  function a(l, c) {
3364
3364
  for (let d = 0; d < l.local.length; d++) {
3365
3365
  let u = l.local[d].map(r, o, c);
@@ -3434,15 +3434,15 @@ function ti(t) {
3434
3434
  r && r != ye && e.push(r);
3435
3435
  }), t.cursorWrapper && e.push(F.create(t.state.doc, [t.cursorWrapper.deco])), Nt.from(e);
3436
3436
  }
3437
- const hh = {
3437
+ const ph = {
3438
3438
  childList: !0,
3439
3439
  characterData: !0,
3440
3440
  characterDataOldValue: !0,
3441
3441
  attributes: !0,
3442
3442
  attributeOldValue: !0,
3443
3443
  subtree: !0
3444
- }, mh = Oe && Lt <= 11;
3445
- class gh {
3444
+ }, hh = Oe && Lt <= 11;
3445
+ class mh {
3446
3446
  constructor() {
3447
3447
  this.anchorNode = null, this.anchorOffset = 0, this.focusNode = null, this.focusOffset = 0;
3448
3448
  }
@@ -3456,13 +3456,13 @@ class gh {
3456
3456
  return e.anchorNode == this.anchorNode && e.anchorOffset == this.anchorOffset && e.focusNode == this.focusNode && e.focusOffset == this.focusOffset;
3457
3457
  }
3458
3458
  }
3459
- class yh {
3459
+ class gh {
3460
3460
  constructor(e, n) {
3461
- this.view = e, this.handleDOMChange = n, this.queue = [], this.flushingSoon = -1, this.observer = null, this.currentSelection = new gh(), this.onCharData = null, this.suppressingSelectionUpdates = !1, this.lastChangedTextNode = null, this.observer = window.MutationObserver && new window.MutationObserver((r) => {
3461
+ this.view = e, this.handleDOMChange = n, this.queue = [], this.flushingSoon = -1, this.observer = null, this.currentSelection = new mh(), this.onCharData = null, this.suppressingSelectionUpdates = !1, this.lastChangedTextNode = null, this.observer = window.MutationObserver && new window.MutationObserver((r) => {
3462
3462
  for (let o = 0; o < r.length; o++)
3463
3463
  this.queue.push(r[o]);
3464
3464
  Oe && Lt <= 11 && r.some((o) => o.type == "childList" && o.removedNodes.length || o.type == "characterData" && o.oldValue.length > o.target.nodeValue.length) ? this.flushSoon() : this.flush();
3465
- }), mh && (this.onCharData = (r) => {
3465
+ }), hh && (this.onCharData = (r) => {
3466
3466
  this.queue.push({ target: r.target, type: "characterData", oldValue: r.prevValue }), this.flushSoon();
3467
3467
  }), this.onSelectionChange = this.onSelectionChange.bind(this);
3468
3468
  }
@@ -3475,7 +3475,7 @@ class yh {
3475
3475
  this.flushingSoon > -1 && (window.clearTimeout(this.flushingSoon), this.flushingSoon = -1, this.flush());
3476
3476
  }
3477
3477
  start() {
3478
- this.observer && (this.observer.takeRecords(), this.observer.observe(this.view.dom, hh)), this.onCharData && this.view.dom.addEventListener("DOMCharacterDataModified", this.onCharData), this.connectSelection();
3478
+ this.observer && (this.observer.takeRecords(), this.observer.observe(this.view.dom, ph)), this.onCharData && this.view.dom.addEventListener("DOMCharacterDataModified", this.onCharData), this.connectSelection();
3479
3479
  }
3480
3480
  stop() {
3481
3481
  if (this.observer) {
@@ -3558,12 +3558,12 @@ class yh {
3558
3558
  let { focusNode: u } = this.currentSelection;
3559
3559
  for (let f of d) {
3560
3560
  let p = f.parentNode;
3561
- p && p.nodeName == "LI" && (!u || vh(e, u) != p) && f.remove();
3561
+ p && p.nodeName == "LI" && (!u || wh(e, u) != p) && f.remove();
3562
3562
  }
3563
3563
  }
3564
3564
  }
3565
3565
  let c = null;
3566
- i < 0 && o && e.input.lastFocus > Date.now() - 200 && Math.max(e.input.lastTouch, e.input.lastClick.time) < Date.now() - 300 && Io(r) && (c = ws(e)) && c.eq(Y.near(e.state.doc.resolve(0), 1)) ? (e.input.lastFocus = 0, kt(e), this.currentSelection.set(r), e.scrollToSelection()) : (i > -1 || o) && (i > -1 && (e.docView.markDirty(i, s), bh(e)), this.handleDOMChange(i, s, a, l), e.docView && e.docView.dirty ? e.updateState(e.state) : this.currentSelection.eq(r) || kt(e), this.currentSelection.set(r));
3566
+ i < 0 && o && e.input.lastFocus > Date.now() - 200 && Math.max(e.input.lastTouch, e.input.lastClick.time) < Date.now() - 300 && Io(r) && (c = ws(e)) && c.eq(Y.near(e.state.doc.resolve(0), 1)) ? (e.input.lastFocus = 0, kt(e), this.currentSelection.set(r), e.scrollToSelection()) : (i > -1 || o) && (i > -1 && (e.docView.markDirty(i, s), yh(e)), this.handleDOMChange(i, s, a, l), e.docView && e.docView.dirty ? e.updateState(e.state) : this.currentSelection.eq(r) || kt(e), this.currentSelection.set(r));
3567
3567
  }
3568
3568
  registerMutation(e, n) {
3569
3569
  if (n.indexOf(e.target) > -1)
@@ -3599,7 +3599,7 @@ class yh {
3599
3599
  }
3600
3600
  }
3601
3601
  let Ia = /* @__PURE__ */ new WeakMap(), Pa = !1;
3602
- function bh(t) {
3602
+ function yh(t) {
3603
3603
  if (!Ia.has(t) && (Ia.set(t, null), ["normal", "nowrap", "pre-line"].indexOf(getComputedStyle(t.dom).whiteSpace) !== -1)) {
3604
3604
  if (t.requiresGeckoHackNode = Je, Pa)
3605
3605
  return;
@@ -3610,7 +3610,7 @@ function Ra(t, e) {
3610
3610
  let n = e.startContainer, r = e.startOffset, o = e.endContainer, i = e.endOffset, s = t.domAtPos(t.state.selection.anchor);
3611
3611
  return ln(s.node, s.offset, o, i) && ([n, r, o, i] = [o, i, n, r]), { anchorNode: n, anchorOffset: r, focusNode: o, focusOffset: i };
3612
3612
  }
3613
- function wh(t, e) {
3613
+ function bh(t, e) {
3614
3614
  if (e.getComposedRanges) {
3615
3615
  let o = e.getComposedRanges(t.root)[0];
3616
3616
  if (o)
@@ -3622,7 +3622,7 @@ function wh(t, e) {
3622
3622
  }
3623
3623
  return t.dom.addEventListener("beforeinput", r, !0), document.execCommand("indent"), t.dom.removeEventListener("beforeinput", r, !0), n ? Ra(t, n) : null;
3624
3624
  }
3625
- function vh(t, e) {
3625
+ function wh(t, e) {
3626
3626
  for (let n = e.parentNode; n && n != t.dom; n = n.parentNode) {
3627
3627
  let r = t.docView.nearestDesc(n, !0);
3628
3628
  if (r && r.node.isBlock)
@@ -3630,7 +3630,7 @@ function vh(t, e) {
3630
3630
  }
3631
3631
  return null;
3632
3632
  }
3633
- function kh(t, e, n) {
3633
+ function vh(t, e, n) {
3634
3634
  let { node: r, fromOffset: o, toOffset: i, from: s, to: a } = t.docView.parseRange(e, n), l = t.domSelectionRange(), c, d = l.anchorNode;
3635
3635
  if (d && t.dom.contains(d.nodeType == 1 ? d : d.parentNode) && (c = [{ node: d, offset: l.anchorOffset }], Io(l) || c.push({ node: l.focusNode, offset: l.focusOffset })), be && t.input.lastKeyCode === 8)
3636
3636
  for (let g = i; g > o; g--) {
@@ -3650,7 +3650,7 @@ function kh(t, e, n) {
3650
3650
  to: i,
3651
3651
  preserveWhitespace: p.parent.type.whitespace == "pre" ? "full" : !0,
3652
3652
  findPositions: c,
3653
- ruleFromNode: Ch,
3653
+ ruleFromNode: kh,
3654
3654
  context: p
3655
3655
  });
3656
3656
  if (c && c[0].pos != null) {
@@ -3659,7 +3659,7 @@ function kh(t, e, n) {
3659
3659
  }
3660
3660
  return { doc: m, sel: h, from: s, to: a };
3661
3661
  }
3662
- function Ch(t) {
3662
+ function kh(t) {
3663
3663
  let e = t.pmViewDesc;
3664
3664
  if (e)
3665
3665
  return e.parseRule();
@@ -3673,8 +3673,8 @@ function Ch(t) {
3673
3673
  return { ignore: !0 };
3674
3674
  return null;
3675
3675
  }
3676
- const Sh = /^(a|abbr|acronym|b|bd[io]|big|br|button|cite|code|data(list)?|del|dfn|em|i|ins|kbd|label|map|mark|meter|output|q|ruby|s|samp|small|span|strong|su[bp]|time|u|tt|var)$/i;
3677
- function xh(t, e, n, r, o) {
3676
+ const Ch = /^(a|abbr|acronym|b|bd[io]|big|br|button|cite|code|data(list)?|del|dfn|em|i|ins|kbd|label|map|mark|meter|output|q|ruby|s|samp|small|span|strong|su[bp]|time|u|tt|var)$/i;
3677
+ function Sh(t, e, n, r, o) {
3678
3678
  let i = t.input.compositionPendingChanges || (t.composing ? t.input.compositionID : 0);
3679
3679
  if (t.input.compositionPendingChanges = 0, e < 0) {
3680
3680
  let x = t.input.lastSelectionTime > Date.now() - 50 ? t.input.lastSelectionOrigin : null, _ = ws(t, x);
@@ -3688,10 +3688,10 @@ function xh(t, e, n, r, o) {
3688
3688
  }
3689
3689
  let s = t.state.doc.resolve(e), a = s.sharedDepth(n);
3690
3690
  e = s.before(a + 1), n = t.state.doc.resolve(n).after(a + 1);
3691
- let l = t.state.selection, c = kh(t, e, n), d = t.state.doc, u = d.slice(c.from, c.to), f, p;
3691
+ let l = t.state.selection, c = vh(t, e, n), d = t.state.doc, u = d.slice(c.from, c.to), f, p;
3692
3692
  t.input.lastKeyCode === 8 && Date.now() - 100 < t.input.lastKeyCodeTime ? (f = t.state.selection.to, p = "end") : (f = t.state.selection.from, p = "start"), t.input.lastKeyCode = null;
3693
- let h = Oh(u.content, c.doc.content, c.from, f, p);
3694
- if (h && t.input.domChangeCount++, (Dn && t.input.lastIOSEnter > Date.now() - 225 || bt) && o.some((x) => x.nodeType == 1 && !Sh.test(x.nodeName)) && (!h || h.endA >= h.endB) && t.someProp("handleKeyDown", (x) => x(t, Gt(13, "Enter")))) {
3693
+ let h = Ah(u.content, c.doc.content, c.from, f, p);
3694
+ if (h && t.input.domChangeCount++, (Dn && t.input.lastIOSEnter > Date.now() - 225 || bt) && o.some((x) => x.nodeType == 1 && !Ch.test(x.nodeName)) && (!h || h.endA >= h.endB) && t.someProp("handleKeyDown", (x) => x(t, Gt(13, "Enter")))) {
3695
3695
  t.input.lastIOSEnter = 0;
3696
3696
  return;
3697
3697
  }
@@ -3714,7 +3714,7 @@ function xh(t, e, n, r, o) {
3714
3714
  t.input.lastIOSEnter = 0;
3715
3715
  return;
3716
3716
  }
3717
- if (t.state.selection.anchor > h.start && Ah(d, h.start, h.endA, m, g) && t.someProp("handleKeyDown", (x) => x(t, Gt(8, "Backspace")))) {
3717
+ if (t.state.selection.anchor > h.start && Mh(d, h.start, h.endA, m, g) && t.someProp("handleKeyDown", (x) => x(t, Gt(8, "Backspace")))) {
3718
3718
  bt && be && t.domObserver.suppressSelectionUpdates();
3719
3719
  return;
3720
3720
  }
@@ -3729,7 +3729,7 @@ function xh(t, e, n, r, o) {
3729
3729
  Oe && Lt <= 11 && m.parentOffset == 0 && (t.domObserver.suppressSelectionUpdates(), setTimeout(() => kt(t), 20)), k = t.state.tr.delete(y, S), A = d.resolve(h.start).marksAcross(d.resolve(h.endA));
3730
3730
  else if (
3731
3731
  // Adding or removing a mark
3732
- h.endA == h.endB && (L = Mh(m.parent.content.cut(m.parentOffset, g.parentOffset), b.parent.content.cut(b.parentOffset, h.endA - b.start())))
3732
+ h.endA == h.endB && (L = xh(m.parent.content.cut(m.parentOffset, g.parentOffset), b.parent.content.cut(b.parentOffset, h.endA - b.start())))
3733
3733
  )
3734
3734
  k = t.state.tr, L.type == "add" ? k.addMark(y, S, L.mark) : k.removeMark(y, S, L.mark);
3735
3735
  else if (m.parent.child(m.index()).isText && m.index() == g.index() - (g.textOffset ? 0 : 1)) {
@@ -3748,7 +3748,7 @@ function xh(t, e, n, r, o) {
3748
3748
  function La(t, e, n) {
3749
3749
  return Math.max(n.anchor, n.head) > e.content.size ? null : vs(t, e.resolve(n.anchor), e.resolve(n.head));
3750
3750
  }
3751
- function Mh(t, e) {
3751
+ function xh(t, e) {
3752
3752
  let n = t.firstChild.marks, r = e.firstChild.marks, o = n, i = r, s, a, l;
3753
3753
  for (let d = 0; d < r.length; d++)
3754
3754
  o = r[d].removeFromSet(o);
@@ -3766,7 +3766,7 @@ function Mh(t, e) {
3766
3766
  if (I.from(c).eq(t))
3767
3767
  return { mark: a, type: s };
3768
3768
  }
3769
- function Ah(t, e, n, r, o) {
3769
+ function Mh(t, e, n, r, o) {
3770
3770
  if (
3771
3771
  // The content must have shrunk
3772
3772
  n - e <= o.pos - r.pos || // newEnd must point directly at or after the end of the block that newStart points into
@@ -3794,7 +3794,7 @@ function ni(t, e, n) {
3794
3794
  }
3795
3795
  return o;
3796
3796
  }
3797
- function Oh(t, e, n, r, o) {
3797
+ function Ah(t, e, n, r, o) {
3798
3798
  let i = t.findDiffStart(e, n);
3799
3799
  if (i == null)
3800
3800
  return null;
@@ -3827,7 +3827,7 @@ class $c {
3827
3827
  added to the document.
3828
3828
  */
3829
3829
  constructor(e, n) {
3830
- 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 qp(), this.prevDirectPlugins = [], this.pluginViews = [], this.requiresGeckoHackNode = !1, this.dragging = null, this._props = n, this.state = n.state, this.directPlugins = n.plugins || [], this.directPlugins.forEach($a), 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 = _a(this), za(this), this.nodeViews = Va(this), this.docView = ya(this.state.doc, Ba(this), ti(this), this.dom, this), this.domObserver = new yh(this, (r, o, i, s) => xh(this, r, o, i, s)), this.domObserver.start(), Kp(this), this.updatePluginViews();
3830
+ 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 Up(), this.prevDirectPlugins = [], this.pluginViews = [], this.requiresGeckoHackNode = !1, this.dragging = null, this._props = n, this.state = n.state, this.directPlugins = n.plugins || [], this.directPlugins.forEach($a), 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 = _a(this), za(this), this.nodeViews = Va(this), this.docView = ya(this.state.doc, Ba(this), ti(this), this.dom, this), this.domObserver = new gh(this, (r, o, i, s) => Sh(this, r, o, i, s)), this.domObserver.start(), qp(this), this.updatePluginViews();
3831
3831
  }
3832
3832
  /**
3833
3833
  Holds `true` when a
@@ -3887,22 +3887,22 @@ class $c {
3887
3887
  let a = o.plugins != e.plugins || this._props.plugins != n.plugins;
3888
3888
  if (a || this._props.plugins != n.plugins || this._props.nodeViews != n.nodeViews) {
3889
3889
  let p = Va(this);
3890
- Dh(p, this.nodeViews) && (this.nodeViews = p, i = !0);
3890
+ Th(p, this.nodeViews) && (this.nodeViews = p, i = !0);
3891
3891
  }
3892
3892
  (a || n.handleDOMEvents != this._props.handleDOMEvents) && Ti(this), this.editable = _a(this), za(this);
3893
3893
  let l = ti(this), c = Ba(this), d = o.plugins != e.plugins && !o.doc.eq(e.doc) ? "reset" : e.scrollToSelection > o.scrollToSelection ? "to selection" : "preserve", u = i || !this.docView.matchesNode(e.doc, c, l);
3894
3894
  (u || !e.selection.eq(o.selection)) && (s = !0);
3895
- let f = d == "preserve" && s && this.dom.style.overflowAnchor == null && ap(this);
3895
+ let f = d == "preserve" && s && this.dom.style.overflowAnchor == null && sp(this);
3896
3896
  if (s) {
3897
3897
  this.domObserver.stop();
3898
- let p = u && (Oe || be) && !this.composing && !o.selection.empty && !e.selection.empty && Th(o.selection, e.selection);
3898
+ let p = u && (Oe || be) && !this.composing && !o.selection.empty && !e.selection.empty && Oh(o.selection, e.selection);
3899
3899
  if (u) {
3900
3900
  let h = be ? this.trackWrites = this.domSelectionRange().focusNode : null;
3901
- this.composing && (this.input.compositionNode = sh(this)), (i || !this.docView.update(e.doc, c, l, this)) && (this.docView.updateOuterDeco(c), this.docView.destroy(), this.docView = ya(e.doc, c, l, this.dom, this)), h && !this.trackWrites && (p = !0);
3901
+ this.composing && (this.input.compositionNode = ih(this)), (i || !this.docView.update(e.doc, c, l, this)) && (this.docView.updateOuterDeco(c), this.docView.destroy(), this.docView = ya(e.doc, c, l, this.dom, this)), h && !this.trackWrites && (p = !0);
3902
3902
  }
3903
- p || !(this.input.mouseDown && this.domObserver.currentSelection.eq(this.domSelectionRange()) && Ep(this)) ? kt(this, p) : (Cc(this, e.selection), this.domObserver.setCurSelection()), this.domObserver.start();
3903
+ p || !(this.input.mouseDown && this.domObserver.currentSelection.eq(this.domSelectionRange()) && Np(this)) ? kt(this, p) : (Cc(this, e.selection), this.domObserver.setCurSelection()), this.domObserver.start();
3904
3904
  }
3905
- this.updatePluginViews(o), !((r = this.dragging) === null || r === void 0) && r.node && !o.doc.eq(e.doc) && this.updateDraggedNode(this.dragging, o), d == "reset" ? this.dom.scrollTop = 0 : d == "to selection" ? this.scrollToSelection() : f && lp(f);
3905
+ this.updatePluginViews(o), !((r = this.dragging) === null || r === void 0) && r.node && !o.doc.eq(e.doc) && this.updateDraggedNode(this.dragging, o), d == "reset" ? this.dom.scrollTop = 0 : d == "to selection" ? this.scrollToSelection() : f && ap(f);
3906
3906
  }
3907
3907
  /**
3908
3908
  @internal
@@ -3989,7 +3989,7 @@ class $c {
3989
3989
  Focus the editor.
3990
3990
  */
3991
3991
  focus() {
3992
- this.domObserver.stop(), this.editable && cp(this.dom), kt(this), this.domObserver.start();
3992
+ this.domObserver.stop(), this.editable && lp(this.dom), kt(this), this.domObserver.start();
3993
3993
  }
3994
3994
  /**
3995
3995
  Get the document root in which the editor exists. This will
@@ -4023,7 +4023,7 @@ class $c {
4023
4023
  the top level, not in any node.
4024
4024
  */
4025
4025
  posAtCoords(e) {
4026
- return hp(this, e);
4026
+ return pp(this, e);
4027
4027
  }
4028
4028
  /**
4029
4029
  Returns the viewport rectangle at a given document position.
@@ -4088,7 +4088,7 @@ class $c {
4088
4088
  pass a different state.
4089
4089
  */
4090
4090
  endOfTextblock(e, n) {
4091
- return wp(this, n || this.state, e);
4091
+ return bp(this, n || this.state, e);
4092
4092
  }
4093
4093
  /**
4094
4094
  Run the editor's paste logic with the given HTML string. The
@@ -4120,7 +4120,7 @@ class $c {
4120
4120
  views](https://prosemirror.net/docs/ref/#view.NodeView).
4121
4121
  */
4122
4122
  destroy() {
4123
- this.docView && (Xp(this), this.destroyPluginViews(), this.mounted ? (this.docView.update(this.state.doc, [], ti(this), this), this.dom.textContent = "") : this.dom.parentNode && this.dom.parentNode.removeChild(this.dom), this.docView.destroy(), this.docView = null, Yf());
4123
+ this.docView && (Kp(this), this.destroyPluginViews(), this.mounted ? (this.docView.update(this.state.doc, [], ti(this), this), this.dom.textContent = "") : this.dom.parentNode && this.dom.parentNode.removeChild(this.dom), this.docView.destroy(), this.docView = null, Jf());
4124
4124
  }
4125
4125
  /**
4126
4126
  This is true when the view has been
@@ -4134,7 +4134,7 @@ class $c {
4134
4134
  Used for testing.
4135
4135
  */
4136
4136
  dispatchEvent(e) {
4137
- return Yp(this, e);
4137
+ return Jp(this, e);
4138
4138
  }
4139
4139
  /**
4140
4140
  Dispatch a transaction. Will call
@@ -4154,7 +4154,7 @@ class $c {
4154
4154
  */
4155
4155
  domSelectionRange() {
4156
4156
  let e = this.domSelection();
4157
- return e ? xe && this.root.nodeType === 11 && tp(this.dom.ownerDocument) == this.dom && wh(this, e) || e : { focusNode: null, focusOffset: 0, anchorNode: null, anchorOffset: 0 };
4157
+ return e ? xe && this.root.nodeType === 11 && ep(this.dom.ownerDocument) == this.dom && bh(this, e) || e : { focusNode: null, focusOffset: 0, anchorNode: null, anchorOffset: 0 };
4158
4158
  }
4159
4159
  /**
4160
4160
  @internal
@@ -4181,7 +4181,7 @@ function za(t) {
4181
4181
  function _a(t) {
4182
4182
  return !t.someProp("editable", (e) => e(t.state) === !1);
4183
4183
  }
4184
- function Th(t, e) {
4184
+ function Oh(t, e) {
4185
4185
  let n = Math.min(t.$anchor.sharedDepth(t.head), e.$anchor.sharedDepth(e.head));
4186
4186
  return t.$anchor.start(n) != e.$anchor.start(n);
4187
4187
  }
@@ -4193,7 +4193,7 @@ function Va(t) {
4193
4193
  }
4194
4194
  return t.someProp("nodeViews", n), t.someProp("markViews", n), e;
4195
4195
  }
4196
- function Dh(t, e) {
4196
+ function Th(t, e) {
4197
4197
  let n = 0, r = 0;
4198
4198
  for (let o in t) {
4199
4199
  if (t[o] != e[o])
@@ -4208,7 +4208,7 @@ function $a(t) {
4208
4208
  if (t.spec.state || t.spec.filterTransaction || t.spec.appendTransaction)
4209
4209
  throw new RangeError("Plugins passed directly to the view must not have a state component");
4210
4210
  }
4211
- const hr = Math.floor, Nh = Math.abs, zt = (t, e) => t < e ? t : e, Nn = (t, e) => t > e ? t : e, Eh = (t) => t !== 0 ? t < 0 : 1 / t < 0, Ih = 64, mr = 128, Ph = 1 << 29, Ha = 63, nr = 127, Rh = 2147483647, Lh = Number.isInteger || ((t) => typeof t == "number" && isFinite(t) && hr(t) === t), Fh = () => /* @__PURE__ */ new Set(), Bh = Array.isArray, zh = String.fromCharCode, _h = (t) => t.toLowerCase(), Vh = /^\s*/g, $h = (t) => t.replace(Vh, ""), Hh = /([A-Z])/g, ja = (t, e) => $h(t.replace(Hh, (n) => `${e}${_h(n)}`)), jh = (t) => {
4211
+ const hr = Math.floor, Dh = Math.abs, zt = (t, e) => t < e ? t : e, Nn = (t, e) => t > e ? t : e, Nh = (t) => t !== 0 ? t < 0 : 1 / t < 0, Eh = 64, mr = 128, Ih = 1 << 29, Ha = 63, nr = 127, Ph = 2147483647, Rh = Number.isInteger || ((t) => typeof t == "number" && isFinite(t) && hr(t) === t), Lh = () => /* @__PURE__ */ new Set(), Fh = Array.isArray, Bh = String.fromCharCode, zh = (t) => t.toLowerCase(), _h = /^\s*/g, Vh = (t) => t.replace(_h, ""), $h = /([A-Z])/g, ja = (t, e) => Vh(t.replace($h, (n) => `${e}${zh(n)}`)), Hh = (t) => {
4212
4212
  const e = unescape(encodeURIComponent(t)), n = e.length, r = new Uint8Array(n);
4213
4213
  for (let o = 0; o < n; o++)
4214
4214
  r[o] = /** @type {number} */
@@ -4217,31 +4217,31 @@ const hr = Math.floor, Nh = Math.abs, zt = (t, e) => t < e ? t : e, Nn = (t, e)
4217
4217
  }, gr = (
4218
4218
  /** @type {TextEncoder} */
4219
4219
  typeof TextEncoder < "u" ? new TextEncoder() : null
4220
- ), Wh = (t) => gr.encode(t), Uh = gr ? Wh : jh;
4220
+ ), jh = (t) => gr.encode(t), Wh = gr ? jh : Hh;
4221
4221
  let ri = typeof TextDecoder > "u" ? null : new TextDecoder("utf-8", { fatal: !0, ignoreBOM: !0 });
4222
4222
  ri && ri.decode(new Uint8Array()).length === 1 && (ri = null);
4223
- class qh {
4223
+ class Uh {
4224
4224
  constructor() {
4225
4225
  this.cpos = 0, this.cbuf = new Uint8Array(100), this.bufs = [];
4226
4226
  }
4227
4227
  }
4228
- const Kh = () => new qh(), Xh = (t) => {
4229
- const e = Kh();
4230
- return t(e), Yh(e);
4231
- }, Jh = (t) => {
4228
+ const qh = () => new Uh(), Kh = (t) => {
4229
+ const e = qh();
4230
+ return t(e), Jh(e);
4231
+ }, Xh = (t) => {
4232
4232
  let e = t.cpos;
4233
4233
  for (let n = 0; n < t.bufs.length; n++)
4234
4234
  e += t.bufs[n].length;
4235
4235
  return e;
4236
- }, Yh = (t) => {
4237
- const e = new Uint8Array(Jh(t));
4236
+ }, Jh = (t) => {
4237
+ const e = new Uint8Array(Xh(t));
4238
4238
  let n = 0;
4239
4239
  for (let r = 0; r < t.bufs.length; r++) {
4240
4240
  const o = t.bufs[r];
4241
4241
  e.set(o, n), n += o.length;
4242
4242
  }
4243
4243
  return e.set(new Uint8Array(t.cbuf.buffer, 0, t.cpos), n), e;
4244
- }, Gh = (t, e) => {
4244
+ }, Yh = (t, e) => {
4245
4245
  const n = t.cbuf.length;
4246
4246
  n - t.cpos < e && (t.bufs.push(new Uint8Array(t.cbuf.buffer, 0, t.cpos)), t.cbuf = new Uint8Array(Nn(n, e) * 2), t.cpos = 0);
4247
4247
  }, pe = (t, e) => {
@@ -4251,19 +4251,19 @@ const Kh = () => new qh(), Xh = (t) => {
4251
4251
  for (; e > nr; )
4252
4252
  pe(t, mr | nr & e), e = hr(e / 128);
4253
4253
  pe(t, nr & e);
4254
- }, Zh = (t, e) => {
4255
- const n = Eh(e);
4256
- for (n && (e = -e), pe(t, (e > Ha ? mr : 0) | (n ? Ih : 0) | Ha & e), e = hr(e / 64); e > 0; )
4254
+ }, Gh = (t, e) => {
4255
+ const n = Nh(e);
4256
+ for (n && (e = -e), pe(t, (e > Ha ? mr : 0) | (n ? Eh : 0) | Ha & e), e = hr(e / 64); e > 0; )
4257
4257
  pe(t, (e > nr ? mr : 0) | nr & e), e = hr(e / 128);
4258
- }, Di = new Uint8Array(3e4), Qh = Di.length / 3, em = (t, e) => {
4259
- if (e.length < Qh) {
4258
+ }, Di = new Uint8Array(3e4), Zh = Di.length / 3, Qh = (t, e) => {
4259
+ if (e.length < Zh) {
4260
4260
  const n = gr.encodeInto(e, Di).written || 0;
4261
4261
  yr(t, n);
4262
4262
  for (let r = 0; r < n; r++)
4263
4263
  pe(t, Di[r]);
4264
4264
  } else
4265
- Hc(t, Uh(e));
4266
- }, tm = (t, e) => {
4265
+ Hc(t, Wh(e));
4266
+ }, em = (t, e) => {
4267
4267
  const n = unescape(encodeURIComponent(e)), r = n.length;
4268
4268
  yr(t, r);
4269
4269
  for (let o = 0; o < r; o++)
@@ -4273,33 +4273,33 @@ const Kh = () => new qh(), Xh = (t) => {
4273
4273
  n.codePointAt(o)
4274
4274
  );
4275
4275
  }, Wa = gr && /** @type {any} */
4276
- gr.encodeInto ? em : tm, nm = (t, e) => {
4276
+ gr.encodeInto ? Qh : em, tm = (t, e) => {
4277
4277
  const n = t.cbuf.length, r = t.cpos, o = zt(n - r, e.length), i = e.length - o;
4278
4278
  t.cbuf.set(e.subarray(0, o), r), t.cpos += o, i > 0 && (t.bufs.push(t.cbuf), t.cbuf = new Uint8Array(Nn(n * 2, i)), t.cbuf.set(e.subarray(o)), t.cpos = i);
4279
4279
  }, Hc = (t, e) => {
4280
- yr(t, e.byteLength), nm(t, e);
4280
+ yr(t, e.byteLength), tm(t, e);
4281
4281
  }, Os = (t, e) => {
4282
- Gh(t, e);
4282
+ Yh(t, e);
4283
4283
  const n = new DataView(t.cbuf.buffer, t.cpos, e);
4284
4284
  return t.cpos += e, n;
4285
- }, rm = (t, e) => Os(t, 4).setFloat32(0, e, !1), om = (t, e) => Os(t, 8).setFloat64(0, e, !1), im = (t, e) => (
4285
+ }, nm = (t, e) => Os(t, 4).setFloat32(0, e, !1), rm = (t, e) => Os(t, 8).setFloat64(0, e, !1), om = (t, e) => (
4286
4286
  /** @type {any} */
4287
4287
  Os(t, 8).setBigInt64(0, e, !1)
4288
- ), Ua = new DataView(new ArrayBuffer(4)), sm = (t) => (Ua.setFloat32(0, t), Ua.getFloat32(0) === t), Ni = (t, e) => {
4288
+ ), Ua = new DataView(new ArrayBuffer(4)), im = (t) => (Ua.setFloat32(0, t), Ua.getFloat32(0) === t), Ni = (t, e) => {
4289
4289
  switch (typeof e) {
4290
4290
  case "string":
4291
4291
  pe(t, 119), Wa(t, e);
4292
4292
  break;
4293
4293
  case "number":
4294
- Lh(e) && Nh(e) <= Rh ? (pe(t, 125), Zh(t, e)) : sm(e) ? (pe(t, 124), rm(t, e)) : (pe(t, 123), om(t, e));
4294
+ Rh(e) && Dh(e) <= Ph ? (pe(t, 125), Gh(t, e)) : im(e) ? (pe(t, 124), nm(t, e)) : (pe(t, 123), rm(t, e));
4295
4295
  break;
4296
4296
  case "bigint":
4297
- pe(t, 122), im(t, e);
4297
+ pe(t, 122), om(t, e);
4298
4298
  break;
4299
4299
  case "object":
4300
4300
  if (e === null)
4301
4301
  pe(t, 126);
4302
- else if (Bh(e)) {
4302
+ else if (Fh(e)) {
4303
4303
  pe(t, 117), yr(t, e.length);
4304
4304
  for (let n = 0; n < e.length; n++)
4305
4305
  Ni(t, e[n]);
@@ -4321,19 +4321,19 @@ gr.encodeInto ? em : tm, nm = (t, e) => {
4321
4321
  default:
4322
4322
  pe(t, 127);
4323
4323
  }
4324
- }, jc = (t) => new Error(t), am = () => {
4324
+ }, jc = (t) => new Error(t), sm = () => {
4325
4325
  throw jc("Method unimplemented");
4326
4326
  }, Wc = () => {
4327
4327
  throw jc("Unexpected case");
4328
4328
  }, oo = () => /* @__PURE__ */ new Map(), Uc = (t, e, n) => {
4329
4329
  let r = t.get(e);
4330
4330
  return r === void 0 && t.set(e, r = n()), r;
4331
- }, lm = Object.keys, cm = (t, e) => {
4331
+ }, am = Object.keys, lm = (t, e) => {
4332
4332
  for (const n in t)
4333
4333
  if (!e(t[n], n))
4334
4334
  return !1;
4335
4335
  return !0;
4336
- }, dm = (t, e) => e.includes(t), um = () => {
4336
+ }, cm = (t, e) => e.includes(t), dm = () => {
4337
4337
  let t = !0;
4338
4338
  return (e, n) => {
4339
4339
  if (t) {
@@ -4345,19 +4345,19 @@ gr.encodeInto ? em : tm, nm = (t, e) => {
4345
4345
  }
4346
4346
  } else n !== void 0 && n();
4347
4347
  };
4348
- }, fm = /[\uD800-\uDBFF]/, pm = /[\uDC00-\uDFFF]/, hm = (t, e) => {
4348
+ }, um = /[\uD800-\uDBFF]/, fm = /[\uDC00-\uDFFF]/, pm = (t, e) => {
4349
4349
  let n = 0, r = 0;
4350
4350
  for (; n < t.length && n < e.length && t[n] === e[n]; )
4351
4351
  n++;
4352
- for (n > 0 && fm.test(t[n - 1]) && n--; r + n < t.length && r + n < e.length && t[t.length - r - 1] === e[e.length - r - 1]; )
4352
+ for (n > 0 && um.test(t[n - 1]) && n--; r + n < t.length && r + n < e.length && t[t.length - r - 1] === e[e.length - r - 1]; )
4353
4353
  r++;
4354
- return r > 0 && pm.test(t[t.length - r]) && r--, {
4354
+ return r > 0 && fm.test(t[t.length - r]) && r--, {
4355
4355
  index: n,
4356
4356
  remove: t.length - n - r,
4357
4357
  insert: e.slice(n, e.length - r)
4358
4358
  };
4359
- }, mm = hm, te = new G("y-sync"), _t = new G("y-undo"), qr = new G("yjs-cursor"), gm = Math.random, ym = (t) => t[hr(gm() * t.length)], qa = (t) => t === void 0 ? null : t;
4360
- class bm {
4359
+ }, hm = pm, te = new G("y-sync"), _t = new G("y-undo"), qr = new G("yjs-cursor"), mm = Math.random, gm = (t) => t[hr(mm() * t.length)], qa = (t) => t === void 0 ? null : t;
4360
+ class ym {
4361
4361
  constructor() {
4362
4362
  this.map = /* @__PURE__ */ new Map();
4363
4363
  }
@@ -4375,14 +4375,14 @@ class bm {
4375
4375
  return this.map.get(e);
4376
4376
  }
4377
4377
  }
4378
- let qc = new bm(), wm = !0;
4378
+ let qc = new ym(), bm = !0;
4379
4379
  try {
4380
- typeof localStorage < "u" && localStorage && (qc = localStorage, wm = !1);
4380
+ typeof localStorage < "u" && localStorage && (qc = localStorage, bm = !1);
4381
4381
  } catch {
4382
4382
  }
4383
- const vm = qc, En = typeof ie < "u" && ie.release && /node|io\.js/.test(ie.release.name) && Object.prototype.toString.call(typeof ie < "u" ? ie : 0) === "[object process]", Kc = typeof window < "u" && typeof document < "u" && !En;
4383
+ const wm = qc, En = typeof ie < "u" && ie.release && /node|io\.js/.test(ie.release.name) && Object.prototype.toString.call(typeof ie < "u" ? ie : 0) === "[object process]", Kc = typeof window < "u" && typeof document < "u" && !En;
4384
4384
  let Ze;
4385
- const km = () => {
4385
+ const vm = () => {
4386
4386
  if (Ze === void 0)
4387
4387
  if (En) {
4388
4388
  Ze = oo();
@@ -4400,17 +4400,17 @@ const km = () => {
4400
4400
  }
4401
4401
  })) : Ze = oo();
4402
4402
  return Ze;
4403
- }, Ei = (t) => km().has(t), Ii = (t) => qa(En ? ie.env[t.toUpperCase().replaceAll("-", "_")] : vm.getItem(t)), Xc = (t) => Ei("--" + t) || Ii(t) !== null;
4403
+ }, Ei = (t) => vm().has(t), Ii = (t) => qa(En ? ie.env[t.toUpperCase().replaceAll("-", "_")] : wm.getItem(t)), Xc = (t) => Ei("--" + t) || Ii(t) !== null;
4404
4404
  Xc("production");
4405
- const Cm = En && dm(ie.env.FORCE_COLOR, ["true", "1", "2"]);
4406
- Cm || !Ei("--no-colors") && // @todo deprecate --no-colors
4405
+ const km = En && cm(ie.env.FORCE_COLOR, ["true", "1", "2"]);
4406
+ km || !Ei("--no-colors") && // @todo deprecate --no-colors
4407
4407
  !Xc("no-color") && (!En || ie.stdout.isTTY) && (!En || Ei("--color") || Ii("COLORTERM") !== null || (Ii("TERM") || "").includes("color"));
4408
- const Sm = (
4408
+ const Cm = (
4409
4409
  /** @type {Document} */
4410
4410
  typeof document < "u" ? document : {}
4411
4411
  );
4412
4412
  typeof DOMParser < "u" && new DOMParser();
4413
- const xm = (t) => class {
4413
+ const Sm = (t) => class {
4414
4414
  /**
4415
4415
  * @param {number} timeoutId
4416
4416
  */
@@ -4420,7 +4420,7 @@ const xm = (t) => class {
4420
4420
  destroy() {
4421
4421
  t(this._);
4422
4422
  }
4423
- }, Mm = xm(clearTimeout), Ts = (t, e) => new Mm(setTimeout(e, t)), nt = (t, e) => t >>> e | t << 32 - e, Am = (t) => nt(t, 2) ^ nt(t, 13) ^ nt(t, 22), Om = (t) => nt(t, 6) ^ nt(t, 11) ^ nt(t, 25), Tm = (t) => nt(t, 7) ^ nt(t, 18) ^ t >>> 3, Dm = (t) => nt(t, 17) ^ nt(t, 19) ^ t >>> 10, Nm = new Uint32Array([
4423
+ }, xm = Sm(clearTimeout), Ts = (t, e) => new xm(setTimeout(e, t)), nt = (t, e) => t >>> e | t << 32 - e, Mm = (t) => nt(t, 2) ^ nt(t, 13) ^ nt(t, 22), Am = (t) => nt(t, 6) ^ nt(t, 11) ^ nt(t, 25), Om = (t) => nt(t, 7) ^ nt(t, 18) ^ t >>> 3, Tm = (t) => nt(t, 17) ^ nt(t, 19) ^ t >>> 10, Dm = new Uint32Array([
4424
4424
  1116352408,
4425
4425
  1899447441,
4426
4426
  3049323471,
@@ -4485,7 +4485,7 @@ const xm = (t) => class {
4485
4485
  2756734187,
4486
4486
  3204031479,
4487
4487
  3329325298
4488
- ]), Em = new Uint32Array([
4488
+ ]), Nm = new Uint32Array([
4489
4489
  1779033703,
4490
4490
  3144134277,
4491
4491
  1013904242,
@@ -4495,18 +4495,18 @@ const xm = (t) => class {
4495
4495
  528734635,
4496
4496
  1541459225
4497
4497
  ]);
4498
- class Im {
4498
+ class Em {
4499
4499
  constructor() {
4500
4500
  const e = new ArrayBuffer(320);
4501
- this._H = new Uint32Array(e, 0, 8), this._H.set(Em), this._W = new Uint32Array(e, 64, 64);
4501
+ this._H = new Uint32Array(e, 0, 8), this._H.set(Nm), this._W = new Uint32Array(e, 64, 64);
4502
4502
  }
4503
4503
  _updateHash() {
4504
4504
  const e = this._H, n = this._W;
4505
4505
  for (let u = 16; u < 64; u++)
4506
- n[u] = Dm(n[u - 2]) + n[u - 7] + Tm(n[u - 15]) + n[u - 16];
4506
+ n[u] = Tm(n[u - 2]) + n[u - 7] + Om(n[u - 15]) + n[u - 16];
4507
4507
  let r = e[0], o = e[1], i = e[2], s = e[3], a = e[4], l = e[5], c = e[6], d = e[7];
4508
4508
  for (let u = 0, f, p; u < 64; u++)
4509
- f = d + Om(a) + (a & l ^ ~a & c) + Nm[u] + n[u] >>> 0, p = Am(r) + (r & o ^ r & i ^ o & i) >>> 0, d = c, c = l, l = a, a = s + f >>> 0, s = i, i = o, o = r, r = f + p >>> 0;
4509
+ f = d + Am(a) + (a & l ^ ~a & c) + Dm[u] + n[u] >>> 0, p = Mm(r) + (r & o ^ r & i ^ o & i) >>> 0, d = c, c = l, l = a, a = s + f >>> 0, s = i, i = o, o = r, r = f + p >>> 0;
4510
4510
  e[0] += r, e[1] += o, e[2] += i, e[3] += s, e[4] += a, e[5] += l, e[6] += c, e[7] += d;
4511
4511
  }
4512
4512
  /**
@@ -4533,7 +4533,7 @@ class Im {
4533
4533
  for (; n < e.length; o++)
4534
4534
  for (let s = 3; s >= 0 && n < e.length; s--)
4535
4535
  this._W[o] |= e[n++] << s * 8;
4536
- r || (this._W[o - (n % 4 === 0 ? 0 : 1)] |= mr << (3 - n % 4) * 8), this._W[14] = e.byteLength / Ph, this._W[15] = e.byteLength * 8, this._updateHash();
4536
+ r || (this._W[o - (n % 4 === 0 ? 0 : 1)] |= mr << (3 - n % 4) * 8), this._W[14] = e.byteLength / Ih, this._W[15] = e.byteLength * 8, this._updateHash();
4537
4537
  const i = new Uint8Array(32);
4538
4538
  for (let s = 0; s < this._H.length; s++)
4539
4539
  for (let a = 0; a < 4; a++)
@@ -4541,33 +4541,33 @@ class Im {
4541
4541
  return i;
4542
4542
  }
4543
4543
  }
4544
- const Pm = (t) => new Im().digest(t), Rm = (t) => {
4544
+ const Im = (t) => new Em().digest(t), Pm = (t) => {
4545
4545
  let e = "";
4546
4546
  for (let n = 0; n < t.byteLength; n++)
4547
- e += zh(t[n]);
4547
+ e += Bh(t[n]);
4548
4548
  return btoa(e);
4549
- }, Lm = (t) => Cf.from(t.buffer, t.byteOffset, t.byteLength).toString("base64"), Fm = Kc ? Rm : Lm, Bm = (t) => Xh((e) => Ni(e, t)), zm = (t) => {
4549
+ }, Rm = (t) => kf.from(t.buffer, t.byteOffset, t.byteLength).toString("base64"), Lm = Kc ? Pm : Rm, Fm = (t) => Kh((e) => Ni(e, t)), Bm = (t) => {
4550
4550
  for (let n = 6; n < t.length; n++)
4551
4551
  t[n % 6] = t[n % 6] ^ t[n];
4552
4552
  return t.slice(0, 6);
4553
- }, _m = (t) => Fm(zm(Pm(Bm(t)))), Vm = () => ({
4553
+ }, zm = (t) => Lm(Bm(Im(Fm(t)))), _m = () => ({
4554
4554
  mapping: /* @__PURE__ */ new Map(),
4555
4555
  isOMark: /* @__PURE__ */ new Map()
4556
4556
  }), wo = (t, e) => e === void 0 ? !t.deleted : e.sv.has(t.id.client) && /** @type {number} */
4557
- e.sv.get(t.id.client) > t.id.clock && !T.isDeleted(e.ds, t.id), $m = [{ light: "#ecd44433", dark: "#ecd444" }], Hm = (t, e, n) => {
4557
+ e.sv.get(t.id.client) > t.id.clock && !T.isDeleted(e.ds, t.id), Vm = [{ light: "#ecd44433", dark: "#ecd444" }], $m = (t, e, n) => {
4558
4558
  if (!t.has(n)) {
4559
4559
  if (t.size < e.length) {
4560
- const r = Fh();
4560
+ const r = Lh();
4561
4561
  t.forEach((o) => r.add(o)), e = e.filter((o) => !r.has(o));
4562
4562
  }
4563
- t.set(n, ym(e));
4563
+ t.set(n, gm(e));
4564
4564
  }
4565
4565
  return (
4566
4566
  /** @type {ColorDef} */
4567
4567
  t.get(n)
4568
4568
  );
4569
- }, jm = (t, {
4570
- colors: e = $m,
4569
+ }, Hm = (t, {
4570
+ colors: e = Vm,
4571
4571
  colorMapping: n = /* @__PURE__ */ new Map(),
4572
4572
  permanentUserData: r = null,
4573
4573
  onFirstRender: o = () => {
@@ -4575,7 +4575,7 @@ e.sv.get(t.id.client) > t.id.clock && !T.isDeleted(e.ds, t.id), $m = [{ light: "
4575
4575
  mapping: i
4576
4576
  } = {}) => {
4577
4577
  let s = !1;
4578
- const a = new Um(t, i), l = new Z({
4578
+ const a = new Wm(t, i), l = new Z({
4579
4579
  props: {
4580
4580
  editable: (c) => {
4581
4581
  const d = te.getState(c);
@@ -4650,7 +4650,7 @@ e.sv.get(t.id.client) > t.id.clock && !T.isDeleted(e.ds, t.id), $m = [{ light: "
4650
4650
  })
4651
4651
  });
4652
4652
  return l;
4653
- }, Wm = (t, e, n) => {
4653
+ }, jm = (t, e, n) => {
4654
4654
  if (e !== null && e.anchor !== null && e.head !== null)
4655
4655
  if (e.type === "all")
4656
4656
  t.setSelection(new Ar(t.doc));
@@ -4684,13 +4684,13 @@ e.sv.get(t.id.client) > t.id.clock && !T.isDeleted(e.ds, t.id), $m = [{ light: "
4684
4684
  t.mapping
4685
4685
  )
4686
4686
  });
4687
- class Um {
4687
+ class Wm {
4688
4688
  /**
4689
4689
  * @param {Y.XmlFragment} yXmlFragment The bind source
4690
4690
  * @param {ProsemirrorMapping} mapping
4691
4691
  */
4692
4692
  constructor(e, n = /* @__PURE__ */ new Map()) {
4693
- this.type = e, this.prosemirrorView = null, this.mux = um(), this.mapping = n, this.isOMark = /* @__PURE__ */ new Map(), this._observeFunction = this._typeChanged.bind(this), this.doc = e.doc, this.beforeTransactionSelection = null, this.beforeAllTransactions = () => {
4693
+ this.type = e, this.prosemirrorView = null, this.mux = dm(), this.mapping = n, this.isOMark = /* @__PURE__ */ new Map(), this._observeFunction = this._typeChanged.bind(this), this.doc = e.doc, this.beforeTransactionSelection = null, this.beforeAllTransactions = () => {
4694
4694
  this.beforeTransactionSelection === null && this.prosemirrorView != null && (this.beforeTransactionSelection = Pi(
4695
4695
  this,
4696
4696
  this.prosemirrorView.state
@@ -4717,7 +4717,7 @@ class Um {
4717
4717
  if (e == null || e.anchorNode == null) return !1;
4718
4718
  const n = this.prosemirrorView._root.createRange();
4719
4719
  n.setStart(e.anchorNode, e.anchorOffset), n.setEnd(e.focusNode, e.focusOffset), n.getClientRects().length === 0 && n.startContainer && n.collapsed && n.selectNodeContents(n.startContainer);
4720
- const o = n.getBoundingClientRect(), i = Sm.documentElement;
4720
+ const o = n.getBoundingClientRect(), i = Cm.documentElement;
4721
4721
  return o.bottom >= 0 && o.right >= 0 && o.left <= (window.innerWidth || i.clientWidth || 0) && o.top <= (window.innerHeight || i.clientHeight || 0);
4722
4722
  }
4723
4723
  /**
@@ -4804,7 +4804,7 @@ class Um {
4804
4804
  return {
4805
4805
  user: p,
4806
4806
  type: u,
4807
- color: Hm(
4807
+ color: $m(
4808
4808
  r.colorMapping,
4809
4809
  r.colors,
4810
4810
  p
@@ -4871,7 +4871,7 @@ class Um {
4871
4871
  this.prosemirrorView.state.doc.content.size,
4872
4872
  new W(I.from(i), 0, 0)
4873
4873
  );
4874
- Wm(s, this.beforeTransactionSelection, this), s = s.setMeta(te, { isChangeOrigin: !0, isUndoRedoOperation: n.origin instanceof T.UndoManager }), this.beforeTransactionSelection !== null && this._isLocalCursorInView() && s.scrollIntoView(), this.prosemirrorView.dispatch(s);
4874
+ jm(s, this.beforeTransactionSelection, this), s = s.setMeta(te, { isChangeOrigin: !0, isUndoRedoOperation: n.origin instanceof T.UndoManager }), this.beforeTransactionSelection !== null && this._isLocalCursorInView() && s.scrollIntoView(), this.prosemirrorView.dispatch(s);
4875
4875
  });
4876
4876
  }
4877
4877
  /**
@@ -4911,7 +4911,7 @@ const Jc = (t, e, n, r, o, i) => {
4911
4911
  o,
4912
4912
  i
4913
4913
  );
4914
- throw am();
4914
+ throw sm();
4915
4915
  }
4916
4916
  return s;
4917
4917
  }, rr = (t, e, n, r, o, i) => {
@@ -4937,7 +4937,7 @@ const Jc = (t, e, n, r, o, i) => {
4937
4937
  ]), c.doc.transact((u) => {
4938
4938
  c._item.delete(u);
4939
4939
  }));
4940
- const d = qm(
4940
+ const d = Um(
4941
4941
  l,
4942
4942
  e,
4943
4943
  n,
@@ -4977,12 +4977,12 @@ const Jc = (t, e, n, r, o, i) => {
4977
4977
  t._item.delete(c);
4978
4978
  }, te), n.mapping.delete(t), null;
4979
4979
  }
4980
- }, qm = (t, e, n, r, o, i) => {
4980
+ }, Um = (t, e, n, r, o, i) => {
4981
4981
  const s = [], a = t.toDelta(r, o, i);
4982
4982
  try {
4983
4983
  for (let l = 0; l < a.length; l++) {
4984
4984
  const c = a[l];
4985
- s.push(e.text(c.insert, Zm(c.attributes, e)));
4985
+ s.push(e.text(c.insert, Gm(c.attributes, e)));
4986
4986
  }
4987
4987
  } catch {
4988
4988
  return t.doc.transact((c) => {
@@ -4990,14 +4990,14 @@ const Jc = (t, e, n, r, o, i) => {
4990
4990
  }, te), null;
4991
4991
  }
4992
4992
  return s;
4993
- }, Km = (t, e) => {
4993
+ }, qm = (t, e) => {
4994
4994
  const n = new T.XmlText(), r = t.map((o) => ({
4995
4995
  // @ts-ignore
4996
4996
  insert: o.text,
4997
4997
  attributes: Zc(o.marks, e)
4998
4998
  }));
4999
4999
  return n.applyDelta(r), e.mapping.set(n, t), n;
5000
- }, Xm = (t, e) => {
5000
+ }, Km = (t, e) => {
5001
5001
  const n = new T.XmlElement(t.type.name);
5002
5002
  for (const r in t.attrs) {
5003
5003
  const o = t.attrs[r];
@@ -5009,7 +5009,7 @@ const Jc = (t, e, n, r, o, i) => {
5009
5009
  (r) => Ri(r, e)
5010
5010
  )
5011
5011
  ), e.mapping.set(n, t), n;
5012
- }, Ri = (t, e) => t instanceof Array ? Km(t, e) : Xm(t, e), Ka = (t) => typeof t == "object" && t !== null, Ds = (t, e) => {
5012
+ }, Ri = (t, e) => t instanceof Array ? qm(t, e) : Km(t, e), Ka = (t) => typeof t == "object" && t !== null, Ds = (t, e) => {
5013
5013
  const n = Object.keys(t).filter((o) => t[o] !== null);
5014
5014
  let r = n.length === Object.keys(e).filter((o) => e[o] !== null).length;
5015
5015
  for (let o = 0; o < n.length && r; o++) {
@@ -5035,7 +5035,7 @@ const Jc = (t, e, n, r, o, i) => {
5035
5035
  return n.length === e.length && n.every(
5036
5036
  /** @type {(d:any,i:number) => boolean} */
5037
5037
  (r, o) => r.insert === /** @type {any} */
5038
- e[o].text && lm(r.attributes || {}).length === e[o].marks.length && cm(r.attributes, (i, s) => {
5038
+ e[o].text && am(r.attributes || {}).length === e[o].marks.length && lm(r.attributes, (i, s) => {
5039
5039
  const a = Gc(s), l = e[o].marks;
5040
5040
  return Ds(i, l.find(
5041
5041
  /** @param {any} mark */
@@ -5074,7 +5074,7 @@ const Jc = (t, e, n, r, o, i) => {
5074
5074
  equalityFactor: l + c,
5075
5075
  foundMappedChild: d
5076
5076
  };
5077
- }, Jm = (t) => {
5077
+ }, Xm = (t) => {
5078
5078
  let e = "", n = t._start;
5079
5079
  const r = {};
5080
5080
  for (; n !== null; )
@@ -5083,22 +5083,22 @@ const Jc = (t, e, n, r, o, i) => {
5083
5083
  str: e,
5084
5084
  nAttrs: r
5085
5085
  };
5086
- }, Ym = (t, e, n) => {
5086
+ }, Jm = (t, e, n) => {
5087
5087
  n.mapping.set(t, e);
5088
- const { nAttrs: r, str: o } = Jm(t), i = e.map((c) => ({
5088
+ const { nAttrs: r, str: o } = Xm(t), i = e.map((c) => ({
5089
5089
  insert: (
5090
5090
  /** @type {any} */
5091
5091
  c.text
5092
5092
  ),
5093
5093
  attributes: Object.assign({}, r, Zc(c.marks, n))
5094
- })), { insert: s, remove: a, index: l } = mm(
5094
+ })), { insert: s, remove: a, index: l } = hm(
5095
5095
  o,
5096
5096
  i.map((c) => c.insert).join("")
5097
5097
  );
5098
5098
  t.delete(l, a), t.insert(l, s), t.applyDelta(
5099
5099
  i.map((c) => ({ retain: c.insert.length, attributes: c.attributes }))
5100
5100
  );
5101
- }, Gm = /(.*)(--[a-zA-Z0-9+/=]{8})$/, Gc = (t) => Gm.exec(t)?.[1] ?? t, Zm = (t, e) => {
5101
+ }, Ym = /(.*)(--[a-zA-Z0-9+/=]{8})$/, Gc = (t) => Ym.exec(t)?.[1] ?? t, Gm = (t, e) => {
5102
5102
  const n = [];
5103
5103
  for (const r in t)
5104
5104
  n.push(e.mark(Gc(r), t[r]));
@@ -5108,7 +5108,7 @@ const Jc = (t, e, n, r, o, i) => {
5108
5108
  return t.forEach((r) => {
5109
5109
  if (r.type.name !== "ychange") {
5110
5110
  const o = Uc(e.isOMark, r.type, () => !r.type.excludes(r.type));
5111
- n[o ? `${r.type.name}--${_m(r.toJSON())}` : r.type.name] = r.attrs;
5111
+ n[o ? `${r.type.name}--${zm(r.toJSON())}` : r.type.name] = r.attrs;
5112
5112
  }
5113
5113
  }), n;
5114
5114
  }, Li = (t, e, n, r) => {
@@ -5143,7 +5143,7 @@ const Jc = (t, e, n, r, o, i) => {
5143
5143
  for (; a - c - d > 0 && i - c - d > 0; ) {
5144
5144
  const f = s[c], p = o[c], h = s[a - d - 1], m = o[i - d - 1];
5145
5145
  if (f instanceof T.XmlText && p instanceof Array)
5146
- Yc(f, p) || Ym(f, p, r), c += 1;
5146
+ Yc(f, p) || Jm(f, p, r), c += 1;
5147
5147
  else {
5148
5148
  let g = f instanceof T.XmlElement && Fi(f, p), b = h instanceof T.XmlElement && Fi(h, m);
5149
5149
  if (g && b) {
@@ -5191,7 +5191,7 @@ const Jc = (t, e, n, r, o, i) => {
5191
5191
  }, te);
5192
5192
  }, Fi = (t, e) => !(e instanceof Array) && t.nodeName === e.type.name;
5193
5193
  let or = null;
5194
- const Qm = () => {
5194
+ const Zm = () => {
5195
5195
  const t = (
5196
5196
  /** @type {Map<EditorView, Map<any, any>>} */
5197
5197
  or
@@ -5202,8 +5202,8 @@ const Qm = () => {
5202
5202
  r.setMeta(s, i);
5203
5203
  }), n.dispatch(r));
5204
5204
  });
5205
- }, eg = (t, e, n) => {
5206
- or || (or = /* @__PURE__ */ new Map(), Ts(0, Qm)), Uc(or, t, oo).set(e, n);
5205
+ }, Qm = (t, e, n) => {
5206
+ or || (or = /* @__PURE__ */ new Map(), Ts(0, Zm)), Uc(or, t, oo).set(e, n);
5207
5207
  }, ko = (t, e, n) => {
5208
5208
  if (t === 0)
5209
5209
  return T.createRelativePositionFromTypeIndex(e, 0, -1);
@@ -5260,10 +5260,10 @@ const Qm = () => {
5260
5260
  if (r === null)
5261
5261
  throw Wc();
5262
5262
  if (t === 0 && r.constructor !== T.XmlText && r !== e)
5263
- return tg(r._item.parent, r._item);
5263
+ return eg(r._item.parent, r._item);
5264
5264
  }
5265
5265
  return T.createRelativePositionFromTypeIndex(e, e._length, -1);
5266
- }, tg = (t, e) => {
5266
+ }, eg = (t, e) => {
5267
5267
  let n = null, r = null;
5268
5268
  return t._item === null ? r = T.findRootTypeKey(t) : n = T.createID(t._item.id.client, t._item.id.clock), new T.RelativePosition(n, r, e.id);
5269
5269
  }, wr = (t, e, n, r) => {
@@ -5312,32 +5312,32 @@ const Qm = () => {
5312
5312
  a;
5313
5313
  }
5314
5314
  return s - 1;
5315
- }, ng = (t, e) => {
5315
+ }, tg = (t, e) => {
5316
5316
  const n = t.toArray().map(
5317
5317
  (r) => rr(
5318
5318
  /** @type {Y.XmlElement} */
5319
5319
  r,
5320
5320
  e,
5321
- Vm()
5321
+ _m()
5322
5322
  )
5323
5323
  ).filter((r) => r !== null);
5324
5324
  return I.fromArray(n);
5325
- }, rg = (t, e) => e.topNodeType.create(null, ng(t, e)), og = (t, e, n) => t !== e, ig = (t) => {
5325
+ }, ng = (t, e) => e.topNodeType.create(null, tg(t, e)), rg = (t, e, n) => t !== e, og = (t) => {
5326
5326
  const e = document.createElement("span");
5327
5327
  e.classList.add("ProseMirror-yjs-cursor"), e.setAttribute("style", `border-color: ${t.color}`);
5328
5328
  const n = document.createElement("div");
5329
5329
  n.setAttribute("style", `background-color: ${t.color}`), n.insertBefore(document.createTextNode(t.name), null);
5330
5330
  const r = document.createTextNode("⁠"), o = document.createTextNode("⁠");
5331
5331
  return e.insertBefore(r, null), e.insertBefore(n, null), e.insertBefore(o, null), e;
5332
- }, sg = (t) => ({
5332
+ }, ig = (t) => ({
5333
5333
  style: `background-color: ${t.color}70`,
5334
5334
  class: "ProseMirror-yjs-selection"
5335
- }), ag = /^#[0-9a-fA-F]{6}$/, Ja = (t, e, n, r, o) => {
5335
+ }), sg = /^#[0-9a-fA-F]{6}$/, Ja = (t, e, n, r, o) => {
5336
5336
  const i = te.getState(t), s = i.doc, a = [];
5337
5337
  return i.snapshot != null || i.prevSnapshot != null || i.binding.mapping.size === 0 ? F.create(t.doc, []) : (e.getStates().forEach((l, c) => {
5338
5338
  if (n(s.clientID, c, l) && l.cursor != null) {
5339
5339
  const d = l.user || {};
5340
- d.color == null ? d.color = "#ffa500" : ag.test(d.color) || console.warn("A user uses an unsupported color format", d), d.name == null && (d.name = `User: ${c}`);
5340
+ d.color == null ? d.color = "#ffa500" : sg.test(d.color) || console.warn("A user uses an unsupported color format", d), d.name == null && (d.name = `User: ${c}`);
5341
5341
  let u = wr(
5342
5342
  s,
5343
5343
  i.type,
@@ -5367,10 +5367,10 @@ const Qm = () => {
5367
5367
  }
5368
5368
  }
5369
5369
  }), F.create(t.doc, a));
5370
- }, lg = (t, {
5371
- awarenessStateFilter: e = og,
5372
- cursorBuilder: n = ig,
5373
- selectionBuilder: r = sg,
5370
+ }, ag = (t, {
5371
+ awarenessStateFilter: e = rg,
5372
+ cursorBuilder: n = og,
5373
+ selectionBuilder: r = ig,
5374
5374
  getSelection: o = (s) => s.selection
5375
5375
  } = {}, i = "cursor") => new Z({
5376
5376
  key: qr,
@@ -5400,7 +5400,7 @@ const Qm = () => {
5400
5400
  },
5401
5401
  view: (s) => {
5402
5402
  const a = () => {
5403
- s.docView && eg(s, qr, { awarenessUpdated: !0 });
5403
+ s.docView && Qm(s, qr, { awarenessUpdated: !0 });
5404
5404
  }, l = () => {
5405
5405
  const c = te.getState(s.state), d = t.getLocalState() || {};
5406
5406
  if (s.hasFocus()) {
@@ -5437,21 +5437,21 @@ const Qm = () => {
5437
5437
  }
5438
5438
  };
5439
5439
  }
5440
- }), cg = (t) => {
5440
+ }), lg = (t) => {
5441
5441
  const e = _t.getState(t).undoManager;
5442
5442
  if (e != null)
5443
5443
  return e.undo(), !0;
5444
- }, dg = (t) => {
5444
+ }, cg = (t) => {
5445
5445
  const e = _t.getState(t).undoManager;
5446
5446
  if (e != null)
5447
5447
  return e.redo(), !0;
5448
- }, ug = /* @__PURE__ */ new Set(["paragraph"]), fg = (t, e) => !(t instanceof yf) || !(t.content instanceof bf) || !(t.content.type instanceof wf || t.content.type instanceof vf && e.has(t.content.type.nodeName)) || t.content.type._length === 0, pg = ({ protectedNodes: t = ug, trackedOrigins: e = [], undoManager: n = null } = {}) => new Z({
5448
+ }, dg = /* @__PURE__ */ new Set(["paragraph"]), ug = (t, e) => !(t instanceof gf) || !(t.content instanceof yf) || !(t.content.type instanceof bf || t.content.type instanceof wf && e.has(t.content.type.nodeName)) || t.content.type._length === 0, fg = ({ protectedNodes: t = dg, trackedOrigins: e = [], undoManager: n = null } = {}) => new Z({
5449
5449
  key: _t,
5450
5450
  state: {
5451
5451
  init: (r, o) => {
5452
- const i = te.getState(o), s = n || new gf(i.type, {
5452
+ const i = te.getState(o), s = n || new mf(i.type, {
5453
5453
  trackedOrigins: new Set([te].concat(e)),
5454
- deleteFilter: (a) => fg(a, t),
5454
+ deleteFilter: (a) => ug(a, t),
5455
5455
  captureTransaction: (a) => a.meta.get("addToHistory") !== !1
5456
5456
  });
5457
5457
  return {
@@ -5493,7 +5493,7 @@ const Qm = () => {
5493
5493
  }
5494
5494
  });
5495
5495
  var et;
5496
- class hg {
5496
+ class pg {
5497
5497
  constructor() {
5498
5498
  ft(this, et, /* @__PURE__ */ new Map());
5499
5499
  }
@@ -5616,18 +5616,18 @@ var $t = {
5616
5616
  220: "|",
5617
5617
  221: "}",
5618
5618
  222: '"'
5619
- }, mg = typeof navigator < "u" && /Mac/.test(navigator.platform), gg = typeof navigator < "u" && /MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);
5619
+ }, hg = typeof navigator < "u" && /Mac/.test(navigator.platform), mg = typeof navigator < "u" && /MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);
5620
5620
  for (var ge = 0; ge < 10; ge++) $t[48 + ge] = $t[96 + ge] = String(ge);
5621
5621
  for (var ge = 1; ge <= 24; ge++) $t[ge + 111] = "F" + ge;
5622
5622
  for (var ge = 65; ge <= 90; ge++)
5623
5623
  $t[ge] = String.fromCharCode(ge + 32), Co[ge] = String.fromCharCode(ge);
5624
5624
  for (var oi in $t) Co.hasOwnProperty(oi) || (Co[oi] = $t[oi]);
5625
- function yg(t) {
5626
- var e = mg && t.metaKey && t.shiftKey && !t.ctrlKey && !t.altKey || gg && t.shiftKey && t.key && t.key.length == 1 || t.key == "Unidentified", n = !e && t.key || (t.shiftKey ? Co : $t)[t.keyCode] || t.key || "Unidentified";
5625
+ function gg(t) {
5626
+ var e = hg && t.metaKey && t.shiftKey && !t.ctrlKey && !t.altKey || mg && t.shiftKey && t.key && t.key.length == 1 || t.key == "Unidentified", n = !e && t.key || (t.shiftKey ? Co : $t)[t.keyCode] || t.key || "Unidentified";
5627
5627
  return n == "Esc" && (n = "Escape"), n == "Del" && (n = "Delete"), n == "Left" && (n = "ArrowLeft"), n == "Up" && (n = "ArrowUp"), n == "Right" && (n = "ArrowRight"), n == "Down" && (n = "ArrowDown"), n;
5628
5628
  }
5629
- const bg = typeof navigator < "u" ? /Mac|iP(hone|[oa]d)/.test(navigator.platform) : !1;
5630
- function wg(t) {
5629
+ const yg = typeof navigator < "u" ? /Mac|iP(hone|[oa]d)/.test(navigator.platform) : !1;
5630
+ function bg(t) {
5631
5631
  let e = t.split(/-(?!$)/), n = e[e.length - 1];
5632
5632
  n == "Space" && (n = " ");
5633
5633
  let r, o, i, s;
@@ -5642,28 +5642,28 @@ function wg(t) {
5642
5642
  else if (/^s(hift)?$/i.test(l))
5643
5643
  i = !0;
5644
5644
  else if (/^mod$/i.test(l))
5645
- bg ? s = !0 : o = !0;
5645
+ yg ? s = !0 : o = !0;
5646
5646
  else
5647
5647
  throw new Error("Unrecognized modifier name: " + l);
5648
5648
  }
5649
5649
  return r && (n = "Alt-" + n), o && (n = "Ctrl-" + n), s && (n = "Meta-" + n), i && (n = "Shift-" + n), n;
5650
5650
  }
5651
- function vg(t) {
5651
+ function wg(t) {
5652
5652
  let e = /* @__PURE__ */ Object.create(null);
5653
5653
  for (let n in t)
5654
- e[wg(n)] = t[n];
5654
+ e[bg(n)] = t[n];
5655
5655
  return e;
5656
5656
  }
5657
5657
  function ii(t, e, n = !0) {
5658
5658
  return e.altKey && (t = "Alt-" + t), e.ctrlKey && (t = "Ctrl-" + t), e.metaKey && (t = "Meta-" + t), n && e.shiftKey && (t = "Shift-" + t), t;
5659
5659
  }
5660
- function kg(t) {
5660
+ function vg(t) {
5661
5661
  return new Z({ props: { handleKeyDown: Ns(t) } });
5662
5662
  }
5663
5663
  function Ns(t) {
5664
- let e = vg(t);
5664
+ let e = wg(t);
5665
5665
  return function(n, r) {
5666
- let o = yg(r), i, s = e[ii(o, r)];
5666
+ let o = gg(r), i, s = e[ii(o, r)];
5667
5667
  if (s && s(n.state, n.dispatch, n))
5668
5668
  return !0;
5669
5669
  if (o.length == 1 && o != " ") {
@@ -5881,7 +5881,7 @@ Bn = new WeakSet(), Qc = function(e, n) {
5881
5881
  return r;
5882
5882
  }, ft(N, Bn);
5883
5883
  function Bi(t) {
5884
- const e = Object.entries(t).filter(([n, r]) => n === "attrs" && Sf(r) ? !1 : r != null);
5884
+ const e = Object.entries(t).filter(([n, r]) => n === "attrs" && Cf(r) ? !1 : r != null);
5885
5885
  return Object.fromEntries(e);
5886
5886
  }
5887
5887
  var zn, td, nd;
@@ -5967,7 +5967,7 @@ let zi = lr;
5967
5967
  function Yn(t, e) {
5968
5968
  return e.nodes[t] || e.marks[t] || null;
5969
5969
  }
5970
- function Cg(t, e) {
5970
+ function kg(t, e) {
5971
5971
  return Array.isArray(e) ? e.some((n) => (typeof n == "string" ? n : n.name) === t.name) : e;
5972
5972
  }
5973
5973
  function Es(t, e) {
@@ -6088,11 +6088,11 @@ class Fo {
6088
6088
  return a;
6089
6089
  }
6090
6090
  }
6091
- function Sg(t, e) {
6091
+ function Cg(t, e) {
6092
6092
  const n = Vn.fromSchema(e).serializeFragment(t), o = document.implementation.createHTMLDocument().createElement("div");
6093
6093
  return o.appendChild(n), o.innerHTML;
6094
6094
  }
6095
- const xg = (t, e = 500) => {
6095
+ const Sg = (t, e = 500) => {
6096
6096
  let n = "";
6097
6097
  const r = t.parentOffset;
6098
6098
  return t.parent.nodesBetween(
@@ -6109,15 +6109,15 @@ const xg = (t, e = 500) => {
6109
6109
  }
6110
6110
  ), n;
6111
6111
  };
6112
- class Mg {
6112
+ class xg {
6113
6113
  constructor(e) {
6114
6114
  P(this, "match");
6115
6115
  P(this, "handler");
6116
6116
  this.match = e.match, this.handler = e.handler;
6117
6117
  }
6118
6118
  }
6119
- const Ag = (t, e) => {
6120
- if (xf(e))
6119
+ const Mg = (t, e) => {
6120
+ if (Sf(e))
6121
6121
  return e.exec(t);
6122
6122
  const n = e(t);
6123
6123
  if (!n)
@@ -6141,11 +6141,11 @@ const Ag = (t, e) => {
6141
6141
  if (l.parent.type.spec.code || (l.nodeBefore || l.nodeAfter)?.marks.find((u) => u.type.spec.code))
6142
6142
  return !1;
6143
6143
  let c = !1;
6144
- const d = xg(l) + o;
6144
+ const d = Sg(l) + o;
6145
6145
  return i.forEach((u) => {
6146
6146
  if (c)
6147
6147
  return;
6148
- const f = Ag(d, u.match);
6148
+ const f = Mg(d, u.match);
6149
6149
  if (!f)
6150
6150
  return;
6151
6151
  const p = a.state.tr, h = Es(p, a.state), m = {
@@ -6169,7 +6169,7 @@ const Ag = (t, e) => {
6169
6169
  text: o
6170
6170
  }), a.dispatch(p), c = !0);
6171
6171
  }), c;
6172
- }, Og = ({ editor: t, rules: e }) => {
6172
+ }, Ag = ({ editor: t, rules: e }) => {
6173
6173
  const n = new Z({
6174
6174
  key: new G("inputRulesPlugin"),
6175
6175
  state: {
@@ -6183,7 +6183,7 @@ const Ag = (t, e) => {
6183
6183
  const a = r.getMeta("applyInputRules");
6184
6184
  return !!a && setTimeout(() => {
6185
6185
  let { text: c } = a;
6186
- typeof c != "string" && (c = Sg(I.from(c), i.schema));
6186
+ typeof c != "string" && (c = Cg(I.from(c), i.schema));
6187
6187
  const { from: d } = a, u = d + c.length;
6188
6188
  si({
6189
6189
  editor: t,
@@ -6236,7 +6236,7 @@ const Ag = (t, e) => {
6236
6236
  case "word-html":
6237
6237
  break;
6238
6238
  case "browser-html":
6239
- return Tg(a, t);
6239
+ return Og(a, t);
6240
6240
  }
6241
6241
  return !1;
6242
6242
  }
@@ -6244,14 +6244,14 @@ const Ag = (t, e) => {
6244
6244
  isInputRules: !0
6245
6245
  });
6246
6246
  return n;
6247
- }, Tg = (t, e, n) => {
6248
- const r = Dg(t), o = document.createElement("div");
6247
+ }, Og = (t, e, n) => {
6248
+ const r = Tg(t), o = document.createElement("div");
6249
6249
  o.innerHTML = r;
6250
6250
  const i = tn.fromSchema(e.schema).parse(o);
6251
6251
  o.remove();
6252
6252
  const { dispatch: s } = e.view;
6253
6253
  return s ? (s(e.view.state.tr.replaceSelectionWith(i, !0)), !0) : !1;
6254
- }, Dg = (t) => t.replace(
6254
+ }, Tg = (t) => t.replace(
6255
6255
  /font-size\s*:\s*([\d.]+)em/gi,
6256
6256
  (e, n) => {
6257
6257
  const r = parseFloat(n);
@@ -6342,9 +6342,9 @@ const An = class An {
6342
6342
  const f = Object.entries(l()).map(([p, h]) => [p, (...m) => h({ editor: e, keymapArgs: m })]);
6343
6343
  c = { ...Object.fromEntries(f) };
6344
6344
  }
6345
- a.push(kg(c));
6345
+ a.push(vg(c));
6346
6346
  const d = E(i, "addInputRules", s);
6347
- Cg(i, e.options.enableInputRules) && d && r.push(...d());
6347
+ kg(i, e.options.enableInputRules) && d && r.push(...d());
6348
6348
  const u = E(i, "addPmPlugins", s);
6349
6349
  if (u) {
6350
6350
  const f = u();
@@ -6353,7 +6353,7 @@ const An = class An {
6353
6353
  return a;
6354
6354
  }).flat();
6355
6355
  return [
6356
- Og({
6356
+ Ag({
6357
6357
  editor: e,
6358
6358
  rules: r
6359
6359
  }),
@@ -6422,22 +6422,22 @@ od = function(e) {
6422
6422
  r && this.editor.on("beforeCreate", r), o && this.editor.on("create", o), i && this.editor.on("update", i), s && this.editor.on("selectionUpdate", s), a && this.editor.on("transaction", a), l && this.editor.on("focus", l), c && this.editor.on("blur", c), d && this.editor.on("destroy", d);
6423
6423
  };
6424
6424
  let _i = An;
6425
- const Ng = (t) => (e) => {
6425
+ const Dg = (t) => (e) => {
6426
6426
  const n = typeof t == "function" ? t(e) : t;
6427
6427
  for (let r = 0; r < n.length; r += 1)
6428
6428
  if (n[r](e)) return !0;
6429
6429
  return !1;
6430
- }, Eg = (t) => (e) => t(e), Ig = () => ({ tr: t }) => (t.insertText(" ", t.selection.from, t.selection.to), !0), Pg = () => ({ tr: t, state: e }) => {
6430
+ }, Ng = (t) => (e) => t(e), Eg = () => ({ tr: t }) => (t.insertText(" ", t.selection.from, t.selection.to), !0), Ig = () => ({ tr: t, state: e }) => {
6431
6431
  let n = t.selection.from;
6432
6432
  const r = e.schema.nodes.tab.create();
6433
6433
  return t.insert(n, r), !0;
6434
- }, Rg = (t, e) => ({ tr: n }) => (n.setMeta(t, e), !0), Is = (t, e) => t.selection.empty ? !1 : (e && e(t.tr.deleteSelection().scrollIntoView()), !0);
6435
- function Lg(t, e) {
6434
+ }, Pg = (t, e) => ({ tr: n }) => (n.setMeta(t, e), !0), Is = (t, e) => t.selection.empty ? !1 : (e && e(t.tr.deleteSelection().scrollIntoView()), !0);
6435
+ function Rg(t, e) {
6436
6436
  let { $cursor: n } = t.selection;
6437
6437
  return !n || (e ? !e.endOfTextblock("backward", t) : n.parentOffset > 0) ? null : n;
6438
6438
  }
6439
6439
  const id = (t, e, n) => {
6440
- let r = Lg(t, n);
6440
+ let r = Rg(t, n);
6441
6441
  if (!r)
6442
6442
  return !1;
6443
6443
  let o = ad(r);
@@ -6494,12 +6494,12 @@ function ad(t) {
6494
6494
  }
6495
6495
  return null;
6496
6496
  }
6497
- function Fg(t, e) {
6497
+ function Lg(t, e) {
6498
6498
  let { $cursor: n } = t.selection;
6499
6499
  return !n || (e ? !e.endOfTextblock("forward", t) : n.parentOffset < n.parent.content.size) ? null : n;
6500
6500
  }
6501
6501
  const ld = (t, e, n) => {
6502
- let r = Fg(t, n);
6502
+ let r = Lg(t, n);
6503
6503
  if (!r)
6504
6504
  return !1;
6505
6505
  let o = dd(r);
@@ -6542,7 +6542,7 @@ function dd(t) {
6542
6542
  }
6543
6543
  return null;
6544
6544
  }
6545
- const Bg = (t, e) => {
6545
+ const Fg = (t, e) => {
6546
6546
  let n = t.selection, r = n instanceof B, o;
6547
6547
  if (r) {
6548
6548
  if (n.node.isTextblock || !Ht(t.doc, n.from))
@@ -6555,7 +6555,7 @@ const Bg = (t, e) => {
6555
6555
  r && i.setSelection(B.create(i.doc, o - t.doc.resolve(o).nodeBefore.nodeSize)), e(i.scrollIntoView());
6556
6556
  }
6557
6557
  return !0;
6558
- }, zg = (t, e) => {
6558
+ }, Bg = (t, e) => {
6559
6559
  let n = t.selection, r;
6560
6560
  if (n instanceof B) {
6561
6561
  if (n.node.isTextblock || !Ht(t.doc, n.to))
@@ -6577,7 +6577,7 @@ function Ps(t) {
6577
6577
  }
6578
6578
  return null;
6579
6579
  }
6580
- const _g = (t, e) => {
6580
+ const zg = (t, e) => {
6581
6581
  let { $head: n, $anchor: r } = t.selection;
6582
6582
  if (!n.parent.type.spec.code || !n.sameParent(r))
6583
6583
  return !1;
@@ -6613,7 +6613,7 @@ const _g = (t, e) => {
6613
6613
  let r = n.blockRange(), o = r && Or(r);
6614
6614
  return o == null ? !1 : (e && e(t.tr.lift(r, o).scrollIntoView()), !0);
6615
6615
  };
6616
- function Vg(t) {
6616
+ function _g(t) {
6617
6617
  return (e, n) => {
6618
6618
  let { $from: r, $to: o } = e.selection;
6619
6619
  if (e.selection instanceof B && e.selection.node.isBlock)
@@ -6640,14 +6640,14 @@ function Vg(t) {
6640
6640
  return n && n(d.scrollIntoView()), !0;
6641
6641
  };
6642
6642
  }
6643
- const $g = Vg(), Hg = (t, e) => (e && e(t.tr.setSelection(new Ar(t.doc))), !0);
6644
- function jg(t, e, n) {
6643
+ const Vg = _g(), $g = (t, e) => (e && e(t.tr.setSelection(new Ar(t.doc))), !0);
6644
+ function Hg(t, e, n) {
6645
6645
  let r = e.nodeBefore, o = e.nodeAfter, i = e.index();
6646
6646
  return !r || !o || !r.type.compatibleContent(o.type) ? !1 : !r.content.size && e.parent.canReplace(i - 1, i) ? (n && n(t.tr.delete(e.pos - r.nodeSize, e.pos).scrollIntoView()), !0) : !e.parent.canReplace(i, i + 1) || !(o.isTextblock || Ht(t.doc, e.pos)) ? !1 : (n && n(t.tr.join(e.pos).scrollIntoView()), !0);
6647
6647
  }
6648
6648
  function hd(t, e, n, r) {
6649
6649
  let o = e.nodeBefore, i = e.nodeAfter, s, a, l = o.type.spec.isolating || i.type.spec.isolating;
6650
- if (!l && jg(t, e, n))
6650
+ if (!l && Hg(t, e, n))
6651
6651
  return !0;
6652
6652
  let c = !l && e.parent.canReplace(e.index(), e.index() + 1);
6653
6653
  if (c && (s = (a = o.contentMatchAt(o.childCount)).findWrapping(i.type)) && a.matchType(s[0] || i.type).validEnd) {
@@ -6695,7 +6695,7 @@ function md(t) {
6695
6695
  return o.node(i).isTextblock ? (n && n(e.tr.setSelection(H.create(e.doc, t < 0 ? o.start(i) : o.end(i)))), !0) : !1;
6696
6696
  };
6697
6697
  }
6698
- const Wg = md(-1), Ug = md(1);
6698
+ const jg = md(-1), Wg = md(1);
6699
6699
  function Ya(t, e = null) {
6700
6700
  return function(n, r) {
6701
6701
  let o = !1;
@@ -6736,7 +6736,7 @@ function Rs(...t) {
6736
6736
  }
6737
6737
  Rs(Is, id, sd);
6738
6738
  Rs(Is, ld, cd);
6739
- Rs(ud, fd, pd, $g);
6739
+ Rs(ud, fd, pd, Vg);
6740
6740
  typeof navigator < "u" ? /Mac|iP(hone|[oa]d)/.test(navigator.platform) : typeof os < "u" && os.platform && os.platform() == "darwin";
6741
6741
  function gd(t) {
6742
6742
  for (let e = 0; e < t.edgeCount; e++) {
@@ -6751,7 +6751,7 @@ const Ga = (t, e) => {
6751
6751
  const r = n.filter((o) => e?.includes(o.type.name));
6752
6752
  t.tr.ensureMarks(r);
6753
6753
  }
6754
- }, qg = ({ keepMarks: t = !0 } = {}) => (e) => {
6754
+ }, Ug = ({ keepMarks: t = !0 } = {}) => (e) => {
6755
6755
  const { tr: n, state: r, dispatch: o, editor: i } = e, { selection: s, doc: a } = n, { $from: l, $to: c } = s, d = i.extensionService.attributes, u = N.getSplittedAttributes(d, l.node().type.name, l.node().attrs);
6756
6756
  if (s instanceof B && s.node.isBlock)
6757
6757
  return !l.parentOffset || !wt(a, l.pos) ? !1 : (o && (t && Ga(r, i.extensionService.splittableMarks), n.split(l.pos).scrollIntoView()), !0);
@@ -6768,9 +6768,9 @@ const Ga = (t, e) => {
6768
6768
  t && Ga(r, i.extensionService.splittableMarks), n.scrollIntoView();
6769
6769
  }
6770
6770
  return !0;
6771
- }, Kg = () => ({ state: t, dispatch: e }) => pd(t, e), Xg = () => ({ state: t, dispatch: e }) => fd(t, e), Jg = () => ({ state: t, dispatch: e }) => ud(t, e), Yg = () => ({ state: t, dispatch: e }) => _g(t, e), yd = (t) => {
6771
+ }, qg = () => ({ state: t, dispatch: e }) => pd(t, e), Kg = () => ({ state: t, dispatch: e }) => fd(t, e), Xg = () => ({ state: t, dispatch: e }) => ud(t, e), Jg = () => ({ state: t, dispatch: e }) => zg(t, e), yd = (t) => {
6772
6772
  };
6773
- function Gg(t, e, n) {
6773
+ function Yg(t, e, n) {
6774
6774
  const { selection: r } = e;
6775
6775
  let o = null;
6776
6776
  if (yd() && (o = r.$cursor), o) {
@@ -6789,7 +6789,7 @@ function Gg(t, e, n) {
6789
6789
  }), a;
6790
6790
  });
6791
6791
  }
6792
- const Zg = (t, e = {}) => ({ tr: n, state: r, dispatch: o }) => {
6792
+ const Gg = (t, e = {}) => ({ tr: n, state: r, dispatch: o }) => {
6793
6793
  const { selection: i } = n, { empty: s, ranges: a } = i, l = St(t, r.schema);
6794
6794
  if (o)
6795
6795
  if (s) {
@@ -6817,12 +6817,12 @@ const Zg = (t, e = {}) => ({ tr: n, state: r, dispatch: o }) => {
6817
6817
  }) : n.addMark(h, m, l.create(e));
6818
6818
  });
6819
6819
  });
6820
- return Gg(r, n, l);
6820
+ return Yg(r, n, l);
6821
6821
  };
6822
6822
  function Vi(t, e, n = {}) {
6823
6823
  return t.find((r) => r.type === e && dr(r.attrs, n));
6824
6824
  }
6825
- function Qg(t, e, n = {}) {
6825
+ function Zg(t, e, n = {}) {
6826
6826
  return !!Vi(t, e, n);
6827
6827
  }
6828
6828
  function Ls(t, e, n = {}) {
@@ -6834,11 +6834,11 @@ function Ls(t, e, n = {}) {
6834
6834
  let i = r.index, s = t.start() + r.offset, a = i + 1, l = s + r.node.nodeSize;
6835
6835
  for (Vi([...r.node.marks], e, n); i > 0 && o.isInSet(t.parent.child(i - 1).marks); )
6836
6836
  i -= 1, s -= t.parent.child(i).nodeSize;
6837
- for (; a < t.parent.childCount && Qg([...t.parent.child(a).marks], e, n); )
6837
+ for (; a < t.parent.childCount && Zg([...t.parent.child(a).marks], e, n); )
6838
6838
  l += t.parent.child(a).nodeSize, a += 1;
6839
6839
  return { from: s, to: l };
6840
6840
  }
6841
- const ey = (t, e = {}) => ({ tr: n, state: r, dispatch: o }) => {
6841
+ const Qg = (t, e = {}) => ({ tr: n, state: r, dispatch: o }) => {
6842
6842
  const { extendEmptyMarkRange: i = !1 } = e, { selection: s } = n, a = St(t, r.schema), { $from: l, empty: c, ranges: d } = s;
6843
6843
  if (!o) return !0;
6844
6844
  if (c && i) {
@@ -6850,7 +6850,7 @@ const ey = (t, e = {}) => ({ tr: n, state: r, dispatch: o }) => {
6850
6850
  n.removeMark(u.$from.pos, u.$to.pos, a);
6851
6851
  });
6852
6852
  return n.removeStoredMark(a), !0;
6853
- }, ty = () => ({ tr: t, dispatch: e }) => {
6853
+ }, ey = () => ({ tr: t, dispatch: e }) => {
6854
6854
  const { selection: n } = t, { empty: r, ranges: o } = n;
6855
6855
  return r || e && o.forEach((i) => {
6856
6856
  t.removeMark(i.$from.pos, i.$to.pos);
@@ -6879,10 +6879,10 @@ function So(t, e, n = {}) {
6879
6879
  const l = a.filter((u) => i ? i.name === u.mark.type.name : !0).filter((u) => dr(u.mark.attrs, n, { strict: !1 })).reduce((u, f) => u + f.to - f.from, 0), c = a.filter((u) => i ? u.mark.type !== i && u.mark.type.excludes(i) : !0).reduce((u, f) => u + f.to - f.from, 0);
6880
6880
  return (l > 0 ? l + c : l) >= s;
6881
6881
  }
6882
- const ny = (t, e = {}, n = {}) => ({ state: r, commands: o }) => {
6882
+ const ty = (t, e = {}, n = {}) => ({ state: r, commands: o }) => {
6883
6883
  const { extendEmptyMarkRange: i = !1 } = n, s = St(t, r.schema);
6884
6884
  return So(r, s, e) ? o.unsetMark(s, { extendEmptyMarkRange: i }) : o.setMark(s, e);
6885
- }, ry = () => ({ state: t, tr: e, dispatch: n }) => {
6885
+ }, ny = () => ({ state: t, tr: e, dispatch: n }) => {
6886
6886
  const { selection: r } = e, { ranges: o } = r;
6887
6887
  return n && o.forEach(({ $from: i, $to: s }) => {
6888
6888
  t.doc.nodesBetween(i.pos, s.pos, (a, l) => {
@@ -6897,7 +6897,7 @@ const ny = (t, e = {}, n = {}) => ({ state: r, commands: o }) => {
6897
6897
  (h || h === 0) && e.lift(p, h);
6898
6898
  });
6899
6899
  }), !0;
6900
- }, oy = (t, e = {}) => ({ state: n, dispatch: r, chain: o }) => {
6900
+ }, ry = (t, e = {}) => ({ state: n, dispatch: r, chain: o }) => {
6901
6901
  const i = le(t, n.schema);
6902
6902
  return i.isTextblock ? o().command(({ commands: s }) => Ya(i, e)(n) ? !0 : s.clearNodes()).command(({ state: s }) => Ya(i, e)(s, r)).run() : !1;
6903
6903
  };
@@ -6915,10 +6915,10 @@ function xo(t, e, n = {}) {
6915
6915
  const l = o - r, c = a.filter((u) => s ? s.name === u.node.type.name : !0).filter((u) => dr(u.node.attrs, n, { strict: !1 }));
6916
6916
  return i ? !!c.length : c.reduce((u, f) => u + f.to - f.from, 0) >= l;
6917
6917
  }
6918
- const iy = (t, e, n = {}) => ({ state: r, commands: o }) => {
6918
+ const oy = (t, e, n = {}) => ({ state: r, commands: o }) => {
6919
6919
  const i = le(t, r.schema), s = le(e, r.schema);
6920
6920
  return xo(r, i, n) ? o.setNode(s) : o.setNode(i, n);
6921
- }, sy = () => ({ state: t, dispatch: e }) => Hg(t, e), ay = () => ({ state: t, dispatch: e }) => Is(t, e), ly = (t, e = {}) => ({ tr: n, state: r, dispatch: o }) => {
6921
+ }, iy = () => ({ state: t, dispatch: e }) => $g(t, e), sy = () => ({ state: t, dispatch: e }) => Is(t, e), ay = (t, e = {}) => ({ tr: n, state: r, dispatch: o }) => {
6922
6922
  let i = null, s = null;
6923
6923
  const a = Er(
6924
6924
  typeof t == "string" ? t : t.name,
@@ -6935,7 +6935,7 @@ const iy = (t, e, n = {}) => ({ state: r, commands: o }) => {
6935
6935
  });
6936
6936
  });
6937
6937
  }), !0) : !1;
6938
- }, cy = (t, e) => ({ tr: n, state: r, dispatch: o }) => {
6938
+ }, ly = (t, e) => ({ tr: n, state: r, dispatch: o }) => {
6939
6939
  let i = null, s = null;
6940
6940
  const a = Er(
6941
6941
  typeof t == "string" ? t : t.name,
@@ -6948,7 +6948,7 @@ const iy = (t, e, n = {}) => ({ state: r, commands: o }) => {
6948
6948
  });
6949
6949
  });
6950
6950
  }), !0) : !1;
6951
- }, dy = () => ({ state: t, dispatch: e }) => Bg(t, e), uy = () => ({ state: t, dispatch: e }) => zg(t, e), fy = () => ({ state: t, dispatch: e }) => id(t, e), py = () => ({ state: t, dispatch: e }) => ld(t, e), hy = () => ({ state: t, dispatch: e }) => sd(t, e), my = () => ({ state: t, dispatch: e }) => cd(t, e), gy = () => ({ state: t, dispatch: e }) => Wg(t, e), yy = () => ({ state: t, dispatch: e }) => Ug(t, e), by = (t, e) => ({ tr: n, commands: r }) => r.insertContentAt({ from: n.selection.from, to: n.selection.to }, t, e), bd = (t) => {
6951
+ }, cy = () => ({ state: t, dispatch: e }) => Fg(t, e), dy = () => ({ state: t, dispatch: e }) => Bg(t, e), uy = () => ({ state: t, dispatch: e }) => id(t, e), fy = () => ({ state: t, dispatch: e }) => ld(t, e), py = () => ({ state: t, dispatch: e }) => sd(t, e), hy = () => ({ state: t, dispatch: e }) => cd(t, e), my = () => ({ state: t, dispatch: e }) => jg(t, e), gy = () => ({ state: t, dispatch: e }) => Wg(t, e), yy = (t, e) => ({ tr: n, commands: r }) => r.insertContentAt({ from: n.selection.from, to: n.selection.to }, t, e), bd = (t) => {
6952
6952
  const e = t.childNodes;
6953
6953
  for (let n = e.length - 1; n >= 0; n -= 1) {
6954
6954
  const r = e[n];
@@ -7009,7 +7009,7 @@ function $i(t, e, n) {
7009
7009
  }
7010
7010
  return $i("", e, n);
7011
7011
  }
7012
- function wy(t, e, n) {
7012
+ function by(t, e, n) {
7013
7013
  const r = t.steps.length - 1;
7014
7014
  if (r < e)
7015
7015
  return;
@@ -7022,7 +7022,7 @@ function wy(t, e, n) {
7022
7022
  s === 0 && (s = d);
7023
7023
  }), t.setSelection(Y.near(t.doc.resolve(s), n));
7024
7024
  }
7025
- const vy = (t) => !("type" in t), ky = (t, e, n) => ({ tr: r, dispatch: o, editor: i }) => {
7025
+ const wy = (t) => !("type" in t), vy = (t, e, n) => ({ tr: r, dispatch: o, editor: i }) => {
7026
7026
  if (o) {
7027
7027
  n = {
7028
7028
  parseOptions: {},
@@ -7050,17 +7050,17 @@ const vy = (t) => !("type" in t), ky = (t, e, n) => ({ tr: r, dispatch: o, edito
7050
7050
  }), !1;
7051
7051
  }
7052
7052
  let { from: a, to: l } = typeof t == "number" ? { from: t, to: t } : { from: t.from, to: t.to }, c = !0, d = !0;
7053
- if ((vy(s) ? s : [s]).forEach((p) => {
7053
+ if ((wy(s) ? s : [s]).forEach((p) => {
7054
7054
  p.check(), c = c ? p.isText && p.marks.length === 0 : !1, d = d ? p.isBlock : !1;
7055
7055
  }), a === l && d) {
7056
7056
  const { parent: p } = r.doc.resolve(a);
7057
7057
  p.isTextblock && !p.type.spec.code && !p.childCount && (a -= 1, l += 1);
7058
7058
  }
7059
7059
  let f;
7060
- c ? (Array.isArray(e) ? f = e.map((p) => p.text || "").join("") : typeof e == "object" && e && e.text ? f = e.text : f = e, r.insertText(f, a, l)) : (f = s, r.replaceWith(a, l, f)), n.updateSelection && wy(r, r.steps.length - 1, -1), n.applyInputRules && r.setMeta("applyInputRules", { from: a, text: f }), n.applyPasteRules && r.setMeta("applyPasteRules", { from: a, text: f });
7060
+ c ? (Array.isArray(e) ? f = e.map((p) => p.text || "").join("") : typeof e == "object" && e && e.text ? f = e.text : f = e, r.insertText(f, a, l)) : (f = s, r.replaceWith(a, l, f)), n.updateSelection && by(r, r.steps.length - 1, -1), n.applyInputRules && r.setMeta("applyInputRules", { from: a, text: f }), n.applyPasteRules && r.setMeta("applyPasteRules", { from: a, text: f });
7061
7061
  }
7062
7062
  return !0;
7063
- }, Cy = () => ({ state: t, dispatch: e }) => {
7063
+ }, ky = () => ({ state: t, dispatch: e }) => {
7064
7064
  const n = t.plugins;
7065
7065
  for (let r = 0; r < n.length; r += 1) {
7066
7066
  const o = n[r];
@@ -7081,16 +7081,16 @@ const vy = (t) => !("type" in t), ky = (t, e, n) => ({ tr: r, dispatch: o, edito
7081
7081
  }
7082
7082
  return !1;
7083
7083
  };
7084
- function Sy(t, e = null) {
7084
+ function Cy(t, e = null) {
7085
7085
  return function(n, r) {
7086
7086
  let { $from: o, $to: i } = n.selection, s = o.blockRange(i);
7087
7087
  if (!s)
7088
7088
  return !1;
7089
7089
  let a = r ? n.tr : null;
7090
- return xy(a, s, t, e) ? (r && r(a.scrollIntoView()), !0) : !1;
7090
+ return Sy(a, s, t, e) ? (r && r(a.scrollIntoView()), !0) : !1;
7091
7091
  };
7092
7092
  }
7093
- function xy(t, e, n, r = null) {
7093
+ function Sy(t, e, n, r = null) {
7094
7094
  let o = !1, i = e, s = e.$from.doc;
7095
7095
  if (e.depth >= 2 && e.$from.node(e.depth - 1).type.compatibleContent(n) && e.startIndex == 0) {
7096
7096
  if (e.$from.index(e.depth - 1) == 0)
@@ -7099,9 +7099,9 @@ function xy(t, e, n, r = null) {
7099
7099
  i = new bi(l, l, e.depth), e.endIndex < e.parent.childCount && (e = new bi(e.$from, s.resolve(e.$to.end(e.depth)), e.depth)), o = !0;
7100
7100
  }
7101
7101
  let a = nc(i, n, r, e);
7102
- return a ? (t && My(t, e, a, o, n), !0) : !1;
7102
+ return a ? (t && xy(t, e, a, o, n), !0) : !1;
7103
7103
  }
7104
- function My(t, e, n, r, o) {
7104
+ function xy(t, e, n, r, o) {
7105
7105
  let i = I.empty;
7106
7106
  for (let d = n.length - 1; d >= 0; d--)
7107
7107
  i = I.from(n[d].type.create(n[d].attrs, i));
@@ -7114,13 +7114,13 @@ function My(t, e, n, r, o) {
7114
7114
  !f && wt(t.doc, l, a) && (t.split(l, a), l += 2 * a), l += c.child(d).nodeSize;
7115
7115
  return t;
7116
7116
  }
7117
- function Ay(t) {
7117
+ function My(t) {
7118
7118
  return function(e, n) {
7119
7119
  let { $from: r, $to: o } = e.selection, i = r.blockRange(o, (s) => s.childCount > 0 && s.firstChild.type == t);
7120
- return i ? n ? r.node(i.depth - 1).type == t ? Oy(e, n, t, i) : Ty(e, n, i) : !0 : !1;
7120
+ return i ? n ? r.node(i.depth - 1).type == t ? Ay(e, n, t, i) : Oy(e, n, i) : !0 : !1;
7121
7121
  };
7122
7122
  }
7123
- function Oy(t, e, n, r) {
7123
+ function Ay(t, e, n, r) {
7124
7124
  let o = t.tr, i = r.end, s = r.$to.end(r.depth);
7125
7125
  i < s && (o.step(new an(i - 1, s, i, s, new W(I.from(n.create(null, r.parent.copy())), 1, 0), 1, !0)), r = new bi(o.doc.resolve(r.$from.pos), o.doc.resolve(s), r.depth));
7126
7126
  const a = Or(r);
@@ -7130,7 +7130,7 @@ function Oy(t, e, n, r) {
7130
7130
  let l = o.doc.resolve(o.mapping.map(i, -1) - 1);
7131
7131
  return Ht(o.doc, l.pos) && l.nodeBefore.type == l.nodeAfter.type && o.join(l.pos), e(o.scrollIntoView()), !0;
7132
7132
  }
7133
- function Ty(t, e, n) {
7133
+ function Oy(t, e, n) {
7134
7134
  let r = t.tr, o = n.parent;
7135
7135
  for (let p = n.end, h = n.endIndex - 1, m = n.startIndex; h > m; h--)
7136
7136
  p -= o.child(h).nodeSize, r.delete(p - 1, p + 1);
@@ -7143,7 +7143,7 @@ function Ty(t, e, n) {
7143
7143
  let u = i.pos, f = u + s.nodeSize;
7144
7144
  return r.step(new an(u - (a ? 1 : 0), f + (l ? 1 : 0), u + 1, f - 1, new W((a ? I.empty : I.from(o.copy(I.empty))).append(l ? I.empty : I.from(o.copy(I.empty))), a ? 0 : 1, l ? 0 : 1), a ? 0 : 1)), e(r.scrollIntoView()), !0;
7145
7145
  }
7146
- function Dy(t) {
7146
+ function Ty(t) {
7147
7147
  return function(e, n) {
7148
7148
  let { $from: r, $to: o } = e.selection, i = r.blockRange(o, (c) => c.childCount > 0 && c.firstChild.type == t);
7149
7149
  if (!i)
@@ -7161,9 +7161,9 @@ function Dy(t) {
7161
7161
  return !0;
7162
7162
  };
7163
7163
  }
7164
- const Ny = (t, e = {}) => ({ state: n, dispatch: r }) => {
7164
+ const Dy = (t, e = {}) => ({ state: n, dispatch: r }) => {
7165
7165
  const o = le(t, n.schema);
7166
- return Sy(o, e)(n, r);
7166
+ return Cy(o, e)(n, r);
7167
7167
  }, Bo = (t, e) => {
7168
7168
  for (let n = t.depth; n > 0; n--) {
7169
7169
  const r = t.node(n);
@@ -7184,7 +7184,7 @@ const Ny = (t, e = {}) => ({ state: n, dispatch: r }) => {
7184
7184
  storage: r.storage
7185
7185
  }, i = K(E(r, "group", o));
7186
7186
  return typeof i != "string" ? !1 : i.split(" ").includes("list");
7187
- }, Ey = {
7187
+ }, Ny = {
7188
7188
  type: "element",
7189
7189
  name: "w:abstractNum",
7190
7190
  attributes: {
@@ -7683,7 +7683,7 @@ const Ny = (t, e = {}) => ({ state: n, dispatch: r }) => {
7683
7683
  ]
7684
7684
  }
7685
7685
  ]
7686
- }, Iy = {
7686
+ }, Ey = {
7687
7687
  type: "element",
7688
7688
  name: "w:abstractNum",
7689
7689
  attributes: {
@@ -8341,14 +8341,14 @@ const Ny = (t, e = {}) => ({ state: n, dispatch: r }) => {
8341
8341
  if (r === void 0) return !0;
8342
8342
  const o = t.doc.nodeAt(r);
8343
8343
  return n.node.type === o?.type && Ht(t.doc, r) && t.join(r), !0;
8344
- }, Py = (t, e, n, r = {}) => (o) => {
8344
+ }, Iy = (t, e, n, r = {}) => (o) => {
8345
8345
  const { editor: i, tr: s, state: a, dispatch: l, chain: c, can: d, commands: u } = o, { extensions: f, splittableMarks: p } = i.extensionService, h = le(t, a.schema), m = le(e, a.schema), { selection: g, storedMarks: b } = a, { $from: w, $to: C } = g, y = w.blockRange(C), S = b || g.$to.parentOffset && g.$from.marks();
8346
8346
  if (!y) return !1;
8347
8347
  const k = He((z) => Hi(z.type.name, f))(g), { numbering: A } = i.converter;
8348
8348
  if (y.depth >= 1 && k && y.depth - k.depth <= 1) {
8349
8349
  if (k.node.type === h) {
8350
8350
  const { listId: z } = k.node.attrs;
8351
- return i.converter.numbering = Ly(z, A), u.liftListItem(m);
8351
+ return i.converter.numbering = Ry(z, A), u.liftListItem(m);
8352
8352
  }
8353
8353
  if (Hi(k.node.type.name, f) && h.validContent(k.node.content) && l)
8354
8354
  return c().command(() => (s.setNodeMarkup(k.pos, h), !0)).command(() => ai(s, h)).command(() => li(s, h)).run();
@@ -8361,9 +8361,9 @@ const Ny = (t, e = {}) => ({ state: n, dispatch: r }) => {
8361
8361
  }
8362
8362
  return $ ? !0 : u.clearNodes();
8363
8363
  }, x = wd(A.definitions);
8364
- return i.converter.numbering = Ry(x, A, h), r.listId = x, !n || !S || !l ? c().command(L({ ensureMarks: !1 })).wrapInList(h, r).command(() => ai(s, h)).command(() => li(s, h)).run() : c().command(L({ ensureMarks: !0 })).wrapInList(h, r).command(() => ai(s, h)).command(() => li(s, h)).run();
8365
- }, wd = (t) => Math.max(...Object.keys(t).map(Number)) + 1, Ry = (t, e, n) => {
8366
- const r = n.name === "orderedList" ? Ey : Iy, o = { ...e }, i = wd(o.abstracts), s = {
8364
+ return i.converter.numbering = Py(x, A, h), r.listId = x, !n || !S || !l ? c().command(L({ ensureMarks: !1 })).wrapInList(h, r).command(() => ai(s, h)).command(() => li(s, h)).run() : c().command(L({ ensureMarks: !0 })).wrapInList(h, r).command(() => ai(s, h)).command(() => li(s, h)).run();
8365
+ }, wd = (t) => Math.max(...Object.keys(t).map(Number)) + 1, Py = (t, e, n) => {
8366
+ const r = n.name === "orderedList" ? Ny : Ey, o = { ...e }, i = wd(o.abstracts), s = {
8367
8367
  ...r,
8368
8368
  attributes: {
8369
8369
  ...r.attributes,
@@ -8383,10 +8383,10 @@ const Ny = (t, e = {}) => ({ state: n, dispatch: r }) => {
8383
8383
  ]
8384
8384
  };
8385
8385
  return o.definitions[t] = a, o;
8386
- }, Ly = (t, e) => {
8386
+ }, Ry = (t, e) => {
8387
8387
  const { definitions: n, abstracts: r } = e, o = n[t].elements[0].attributes["w:val"];
8388
8388
  return delete n[t], delete r[o], e;
8389
- }, Fy = (t) => (e) => {
8389
+ }, Ly = (t) => (e) => {
8390
8390
  const { tr: n, state: r, dispatch: o, editor: i } = e, s = le(t, r.schema), { $from: a, $to: l, node: c } = r.selection;
8391
8391
  if (c && c.isBlock || a.depth < 2 || !a.sameParent(l))
8392
8392
  return !1;
@@ -8438,57 +8438,57 @@ const Ny = (t, e = {}) => ({ state: n, dispatch: r }) => {
8438
8438
  n.ensureMarks(y), n.setMeta("splitListItem", y);
8439
8439
  }
8440
8440
  return !0;
8441
- }, By = (t) => ({ state: e, dispatch: n }) => {
8441
+ }, Fy = (t) => ({ state: e, dispatch: n }) => {
8442
8442
  const r = le(t, e.schema);
8443
- return Dy(r)(e, n);
8444
- }, zy = (t) => ({ state: e, dispatch: n }) => {
8443
+ return Ty(r)(e, n);
8444
+ }, By = (t) => ({ state: e, dispatch: n }) => {
8445
8445
  const r = le(t, e.schema);
8446
- return Ay(r)(e, n);
8447
- }, _y = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
8446
+ return My(r)(e, n);
8447
+ }, zy = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
8448
8448
  __proto__: null,
8449
- clearNodes: ry,
8450
- command: Eg,
8451
- createParagraphNear: Xg,
8452
- deleteSelection: ay,
8453
- exitCode: Yg,
8454
- first: Ng,
8455
- insertContent: by,
8456
- insertContentAt: ky,
8457
- insertTabChar: Ig,
8458
- insertTabNode: Pg,
8459
- joinBackward: fy,
8460
- joinDown: uy,
8461
- joinForward: py,
8462
- joinUp: dy,
8463
- liftEmptyBlock: Kg,
8464
- liftListItem: zy,
8465
- newlineInCode: Jg,
8466
- resetAttributes: cy,
8467
- selectAll: sy,
8468
- selectNodeBackward: hy,
8469
- selectNodeForward: my,
8470
- selectTextblockEnd: yy,
8471
- selectTextblockStart: gy,
8472
- setMark: Zg,
8473
- setMeta: Rg,
8474
- setNode: oy,
8475
- sinkListItem: By,
8476
- splitBlock: qg,
8477
- splitListItem: Fy,
8478
- toggleList: Py,
8479
- toggleMark: ny,
8480
- toggleNode: iy,
8481
- undoInputRule: Cy,
8482
- unsetAllMarks: ty,
8483
- unsetMark: ey,
8484
- updateAttributes: ly,
8485
- wrapInList: Ny
8486
- }, Symbol.toStringTag, { value: "Module" })), Vy = Q.create({
8449
+ clearNodes: ny,
8450
+ command: Ng,
8451
+ createParagraphNear: Kg,
8452
+ deleteSelection: sy,
8453
+ exitCode: Jg,
8454
+ first: Dg,
8455
+ insertContent: yy,
8456
+ insertContentAt: vy,
8457
+ insertTabChar: Eg,
8458
+ insertTabNode: Ig,
8459
+ joinBackward: uy,
8460
+ joinDown: dy,
8461
+ joinForward: fy,
8462
+ joinUp: cy,
8463
+ liftEmptyBlock: qg,
8464
+ liftListItem: By,
8465
+ newlineInCode: Xg,
8466
+ resetAttributes: ly,
8467
+ selectAll: iy,
8468
+ selectNodeBackward: py,
8469
+ selectNodeForward: hy,
8470
+ selectTextblockEnd: gy,
8471
+ selectTextblockStart: my,
8472
+ setMark: Gg,
8473
+ setMeta: Pg,
8474
+ setNode: ry,
8475
+ sinkListItem: Fy,
8476
+ splitBlock: Ug,
8477
+ splitListItem: Ly,
8478
+ toggleList: Iy,
8479
+ toggleMark: ty,
8480
+ toggleNode: oy,
8481
+ undoInputRule: ky,
8482
+ unsetAllMarks: ey,
8483
+ unsetMark: Qg,
8484
+ updateAttributes: ay,
8485
+ wrapInList: Dy
8486
+ }, Symbol.toStringTag, { value: "Module" })), _y = Q.create({
8487
8487
  name: "commands",
8488
8488
  addCommands() {
8489
- return { ..._y };
8489
+ return { ...zy };
8490
8490
  }
8491
- }), $y = (t) => {
8491
+ }), Vy = (t) => {
8492
8492
  t.commands.first(({ commands: e }) => [
8493
8493
  () => e.newlineInCode(),
8494
8494
  () => e.createParagraphNear(),
@@ -8509,11 +8509,11 @@ const Ny = (t, e = {}) => ({ state: n, dispatch: r }) => {
8509
8509
  () => e.joinForward(),
8510
8510
  () => e.selectNodeForward()
8511
8511
  ]);
8512
- }, Hy = Q.create({
8512
+ }, $y = Q.create({
8513
8513
  name: "keymap",
8514
8514
  addShortcuts() {
8515
8515
  const t = {
8516
- Enter: () => $y(this.editor),
8516
+ Enter: () => Vy(this.editor),
8517
8517
  "Mod-Enter": () => this.editor.commands.exitCode(),
8518
8518
  Backspace: () => Xn(this.editor),
8519
8519
  "Mod-Backspace": () => Xn(this.editor),
@@ -8536,9 +8536,9 @@ const Ny = (t, e = {}) => ({ state: n, dispatch: r }) => {
8536
8536
  "Ctrl-e": () => this.editor.commands.selectTextblockEnd(),
8537
8537
  "Ctrl-t": () => this.editor.commands.insertTabChar()
8538
8538
  };
8539
- return Mf() || Af() ? n : e;
8539
+ return xf() || Mf() ? n : e;
8540
8540
  }
8541
- }), jy = Q.create({
8541
+ }), Hy = Q.create({
8542
8542
  name: "editable",
8543
8543
  addPmPlugins() {
8544
8544
  return [new Z({
@@ -8548,7 +8548,7 @@ const Ny = (t, e = {}) => ({ state: n, dispatch: r }) => {
8548
8548
  }
8549
8549
  })];
8550
8550
  }
8551
- }), Wy = Q.create({
8551
+ }), jy = Q.create({
8552
8552
  name: "editorFocus",
8553
8553
  addPmPlugins() {
8554
8554
  const t = this.editor;
@@ -8662,7 +8662,7 @@ const Fs = ({
8662
8662
  )) : d.attrs.track && !d.attrs.track.find((f) => f.type === ue) && ["bulletList", "orderedList"].includes(d.type.name);
8663
8663
  }), { deletionMark: a, deletionMap: l, nodes: c };
8664
8664
  };
8665
- function Uy(t) {
8665
+ function Wy(t) {
8666
8666
  const e = {
8667
8667
  bulletList: 1,
8668
8668
  orderedList: 2
@@ -8712,7 +8712,7 @@ function Uy(t) {
8712
8712
  }
8713
8713
  };
8714
8714
  }
8715
- function qy(t, e, n) {
8715
+ function Uy(t, e, n) {
8716
8716
  const r = [];
8717
8717
  return t === e ? n.resolve(t).marks().forEach((o) => {
8718
8718
  const i = n.resolve(t - 1), s = Ls(i, o.type);
@@ -8771,14 +8771,14 @@ const Md = (t) => {
8771
8771
  findMark: Eo,
8772
8772
  findParentNode: He,
8773
8773
  findParentNodeClosestToPos: Bo,
8774
- generateDocxListAttributes: Uy,
8774
+ generateDocxListAttributes: Wy,
8775
8775
  generateDocxRandomId: Cn,
8776
- generateRandom32BitHex: Of,
8777
- getActiveFormatting: zf,
8776
+ generateRandom32BitHex: Af,
8777
+ getActiveFormatting: Bf,
8778
8778
  getExtensionConfigField: E,
8779
8779
  getMarkRange: Ls,
8780
8780
  getMarkType: St,
8781
- getMarksBetween: qy,
8781
+ getMarksBetween: Uy,
8782
8782
  getMarksFromSelection: No,
8783
8783
  getNodeType: le,
8784
8784
  getSchemaTypeByName: Yn,
@@ -8790,7 +8790,7 @@ const Md = (t) => {
8790
8790
  isNodeActive: xo,
8791
8791
  isTextSelection: yd,
8792
8792
  posToDOMRect: xd
8793
- }, Symbol.toStringTag, { value: "Module" })), Ky = (t, e, n) => {
8793
+ }, Symbol.toStringTag, { value: "Module" })), qy = (t, e, n) => {
8794
8794
  const r = t.resolve(e), o = r.parent, i = o.childAfter(r.parentOffset);
8795
8795
  if (!i.node)
8796
8796
  return null;
@@ -8820,11 +8820,11 @@ const Md = (t) => {
8820
8820
  throw new Error('Invalid "predicate" parameter');
8821
8821
  } else throw new Error('Invalid "node" parameter');
8822
8822
  return Od(t, n).filter((r) => e(r.node));
8823
- }, Dd = (t, e) => Td(t, (n) => n.isInline, e), Xy = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
8823
+ }, Dd = (t, e) => Td(t, (n) => n.isInline, e), Ky = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
8824
8824
  __proto__: null,
8825
8825
  findChildren: Td,
8826
8826
  findInlineNodes: Dd,
8827
- findMarkPosition: Ky,
8827
+ findMarkPosition: qy,
8828
8828
  flatten: Od
8829
8829
  }, Symbol.toStringTag, { value: "Module" })), zs = (t, e = null) => {
8830
8830
  const n = [], r = Dd(t.doc);
@@ -8838,7 +8838,7 @@ const Md = (t) => {
8838
8838
  });
8839
8839
  });
8840
8840
  }), e ? n.filter(({ mark: o }) => o.attrs.id === e) : n) : n;
8841
- }, de = new G("TrackChangesBase"), Jy = (t = {}) => new Z({
8841
+ }, de = new G("TrackChangesBase"), Xy = (t = {}) => new Z({
8842
8842
  key: de,
8843
8843
  state: {
8844
8844
  init(e, n) {
@@ -8959,10 +8959,10 @@ const Md = (t) => {
8959
8959
  }
8960
8960
  }), F.create(t.doc, r)) : F.empty;
8961
8961
  }, Pe = "commentMark", Za = ({ commentId: t, state: e, tr: n, dispatch: r }) => {
8962
- Yy(t, e.doc).forEach(({ from: i, to: s }) => {
8962
+ Jy(t, e.doc).forEach(({ from: i, to: s }) => {
8963
8963
  n.removeMark(i, s, e.schema.marks[Pe]);
8964
8964
  }), r(n);
8965
- }, Yy = (t, e) => {
8965
+ }, Jy = (t, e) => {
8966
8966
  const n = [];
8967
8967
  return e.descendants((r, o) => {
8968
8968
  const { marks: i } = r, s = i.find((a) => a.type.name === Pe);
@@ -8971,7 +8971,7 @@ const Md = (t) => {
8971
8971
  t === l && n.push({ from: o, to: o + r.nodeSize });
8972
8972
  }
8973
8973
  }), n;
8974
- }, Gy = (t, e, n, r = []) => {
8974
+ }, Yy = (t, e, n, r = []) => {
8975
8975
  const o = [], i = [], s = /* @__PURE__ */ new Set();
8976
8976
  return t.descendants((a, l) => {
8977
8977
  (a.marks?.filter((d) => d.type.name === Pe)).forEach((d) => {
@@ -9017,7 +9017,7 @@ const Md = (t) => {
9017
9017
  "w:id": e,
9018
9018
  internal: n
9019
9019
  };
9020
- }, Zy = (t, e, n, r) => {
9020
+ }, Gy = (t, e, n, r) => {
9021
9021
  const o = [], i = [];
9022
9022
  t.descendants((s, a) => {
9023
9023
  const { type: l } = s;
@@ -9044,7 +9044,7 @@ const Md = (t) => {
9044
9044
  }), i.sort((s, a) => a.start - s.start).forEach(({ start: s, end: a }) => {
9045
9045
  e.delete(s, a);
9046
9046
  });
9047
- }, Qy = (t = {}) => {
9047
+ }, Zy = (t = {}) => {
9048
9048
  const { before: e = [], after: n = [] } = t, r = new Set(e.map((h) => h.type)), o = new Set(n.map((h) => h.type)), i = [...o].filter((h) => !r.has(h)), s = [...r].filter((h) => !o.has(h)), a = [], l = i.filter((h) => !["textStyle", "commentMark"].includes(h));
9049
9049
  l.length && a.push(`Added formatting: ${l.join(", ")}`);
9050
9050
  const c = s.filter((h) => !["textStyle", "commentMark"].includes(h));
@@ -9063,11 +9063,11 @@ const Md = (t) => {
9063
9063
  }
9064
9064
  }
9065
9065
  }), f.length && a.push(`Modified text style: ${f.join(", ")}`), a.length ? a.join(". ") : "No formatting changes.";
9066
- }, eb = ({ activeThreadId: t, threadId: e, isInternal: n, editor: r }) => {
9066
+ }, Qy = ({ activeThreadId: t, threadId: e, isInternal: n, editor: r }) => {
9067
9067
  if (!r.options.isInternal && n) return "transparent";
9068
9068
  const o = he.getState(r.state), i = n ? o.internalColor : o.externalColor, s = t == e ? "44" : "22";
9069
9069
  return `${i}${s}`;
9070
- }, on = new G("paginationPlugin"), tb = async (t) => {
9070
+ }, on = new G("paginationPlugin"), eb = async (t) => {
9071
9071
  if (!t.converter) return;
9072
9072
  const e = { headers: {}, footers: {} }, n = t.converter.headerIds, r = t.converter.footerIds;
9073
9073
  for (let o in n) {
@@ -9133,7 +9133,7 @@ const Md = (t) => {
9133
9133
  }), n({ height: d, sectionEditor: c, sectionContainer: r });
9134
9134
  });
9135
9135
  });
9136
- }), _s = [Ve, ue, Se], he = new G("comments"), nb = Q.create({
9136
+ }), _s = [Ve, ue, Se], he = new G("comments"), tb = Q.create({
9137
9137
  name: "comments",
9138
9138
  addCommands() {
9139
9139
  return {
@@ -9208,7 +9208,7 @@ const Md = (t) => {
9208
9208
  allCommentPositions: d.allCommentPositions
9209
9209
  };
9210
9210
  const f = o.getMeta(de), p = i.trackedChanges;
9211
- f && (i.trackedChanges = ob(
9211
+ f && (i.trackedChanges = rb(
9212
9212
  f,
9213
9213
  p,
9214
9214
  a,
@@ -9217,7 +9217,7 @@ const Md = (t) => {
9217
9217
  const h = d?.type === "setActiveComment";
9218
9218
  if (!o.docChanged && o.selectionSet || h) {
9219
9219
  const { selection: m } = o;
9220
- let g = rb(a.doc, m);
9220
+ let g = nb(a.doc, m);
9221
9221
  if (h && (g = d.activeThreadId), n !== g) {
9222
9222
  n = g;
9223
9223
  const w = {
@@ -9261,7 +9261,7 @@ const Md = (t) => {
9261
9261
  });
9262
9262
  const z = L.internal;
9263
9263
  S || (S = n === x);
9264
- let $ = eb({ activeThreadId: n, threadId: x, isInternal: z, editor: t });
9264
+ let $ = Qy({ activeThreadId: n, threadId: x, isInternal: z, editor: t });
9265
9265
  const j = V.inline(w, w + b.nodeSize, {
9266
9266
  style: `background-color: ${$};`,
9267
9267
  "data-thread-id": x,
@@ -9323,7 +9323,7 @@ const Md = (t) => {
9323
9323
  const s = t[e];
9324
9324
  s.start = Math.min(s.start, n), s.end = Math.max(s.end, n + o.nodeSize), s.bounds.top = Math.min(s.bounds.top, r.top), s.bounds.bottom = Math.max(s.bounds.bottom, r.bottom);
9325
9325
  }
9326
- }, rb = (t, e) => {
9326
+ }, nb = (t, e) => {
9327
9327
  if (!e) return;
9328
9328
  const { $from: n, $to: r } = e;
9329
9329
  if (n.pos !== r.pos || !t.nodeAt(n.pos)) return;
@@ -9375,7 +9375,7 @@ const Md = (t) => {
9375
9375
  mark: c
9376
9376
  });
9377
9377
  }), s;
9378
- }, ob = (t, e, n, r) => {
9378
+ }, rb = (t, e, n, r) => {
9379
9379
  const {
9380
9380
  insertedMark: o,
9381
9381
  deletionMark: i,
@@ -9396,7 +9396,7 @@ const Md = (t) => {
9396
9396
  if (h.marks.find((b) => b.type.name === Se))
9397
9397
  return f = [h], !1;
9398
9398
  });
9399
- const p = sb({
9399
+ const p = ib({
9400
9400
  documentId: r.options.documentId,
9401
9401
  event: d ? "add" : "update",
9402
9402
  marks: {
@@ -9409,7 +9409,7 @@ const Md = (t) => {
9409
9409
  newEditorState: n
9410
9410
  });
9411
9411
  return p && r.emit("commentsUpdate", p), l;
9412
- }, ib = ({
9412
+ }, ob = ({
9413
9413
  state: t,
9414
9414
  node: e,
9415
9415
  mark: n,
@@ -9419,9 +9419,9 @@ const Md = (t) => {
9419
9419
  deletionNodes: s = []
9420
9420
  }) => {
9421
9421
  let a = "", l = "";
9422
- if (o === Ve && (a = e?.text ?? ""), o === Se && (a = Qy(n.attrs)), (o === ue || i) && (l = e?.text ?? "", i)) {
9422
+ if (o === Ve && (a = e?.text ?? ""), o === Se && (a = Zy(n.attrs)), (o === ue || i) && (l = e?.text ?? "", i)) {
9423
9423
  let { id: c } = r.deletionMark.attrs;
9424
- l = ab(t.doc, (u) => {
9424
+ l = sb(t.doc, (u) => {
9425
9425
  const { marks: f = [] } = u, p = f.filter((m) => _s.includes(m.type.name));
9426
9426
  if (!p.length) return !1;
9427
9427
  if (p.find((m) => m.attrs.id === c)) return !0;
@@ -9431,7 +9431,7 @@ const Md = (t) => {
9431
9431
  deletionText: l,
9432
9432
  trackedChangeText: a
9433
9433
  };
9434
- }, sb = ({ event: t, marks: e, deletionNodes: n, nodes: r, newEditorState: o, documentId: i }) => {
9434
+ }, ib = ({ event: t, marks: e, deletionNodes: n, nodes: r, newEditorState: o, documentId: i }) => {
9435
9435
  const s = e.insertedMark || e.deletionMark || e.formatMark, { type: a, attrs: l } = s, { name: c } = a, { author: d, authorEmail: u, date: f } = l, p = l.id, h = r[0], m = !!(e.insertedMark && e.deletionMark);
9436
9436
  let g;
9437
9437
  o.doc.descendants((y, S) => {
@@ -9439,7 +9439,7 @@ const Md = (t) => {
9439
9439
  if (!A.length) return;
9440
9440
  if (A.find((x) => x.attrs.id === p) && (g = y), g) return !1;
9441
9441
  });
9442
- const { deletionText: b, trackedChangeText: w } = ib({
9442
+ const { deletionText: b, trackedChangeText: w } = ob({
9443
9443
  state: o,
9444
9444
  node: g || h,
9445
9445
  mark: s,
@@ -9464,7 +9464,7 @@ const Md = (t) => {
9464
9464
  };
9465
9465
  return t === "add" ? C.event = to.ADD : t === "update" && (C.event = to.UPDATE), C;
9466
9466
  };
9467
- function ab(t, e) {
9467
+ function sb(t, e) {
9468
9468
  let n = null;
9469
9469
  return t.descendants((r, o) => {
9470
9470
  if (e(r) && (n = { node: r, pos: o }), n) return !1;
@@ -9506,8 +9506,8 @@ const Ed = ({ state: t, tr: e, step: n, newTr: r, map: o, doc: i, user: s, date:
9506
9506
  m.deletionNodes = w, m.deletionMark = g, o.appendMapping(b);
9507
9507
  }
9508
9508
  r.setMeta(de, m), r.setMeta(he, { type: "force" });
9509
+ }, ab = () => {
9509
9510
  }, lb = () => {
9510
- }, cb = () => {
9511
9511
  }, Id = ({ state: t, tr: e, step: n, newTr: r, map: o, doc: i, user: s, date: a }) => {
9512
9512
  const l = {};
9513
9513
  i.nodesBetween(n.from, n.to, (c, d) => {
@@ -9642,7 +9642,7 @@ const Ed = ({ state: t, tr: e, step: n, newTr: r, map: o, doc: i, user: s, date:
9642
9642
  i.setSelection(new H(i.doc.resolve(c)));
9643
9643
  }
9644
9644
  return t.storedMarksSet && i.setStoredMarks(t.storedMarks), t.scrolledIntoView && i.scrollIntoView(), i;
9645
- }, db = (t) => {
9645
+ }, cb = (t) => {
9646
9646
  const { state: e } = t, { dispatch: n } = t.view, { tr: r } = e;
9647
9647
  if (n)
9648
9648
  return e.doc.descendants((o, i) => {
@@ -9663,13 +9663,13 @@ const Ed = ({ state: t, tr: e, step: n, newTr: r, map: o, doc: i, user: s, date:
9663
9663
  });
9664
9664
  }
9665
9665
  }), n(r), !0;
9666
- }, ub = {
9667
- initial: db
9666
+ }, db = {
9667
+ initial: cb
9668
9668
  }, nl = (t) => {
9669
- if (t === "initial" || t === "0.4.14") return Object.values(ub);
9669
+ if (t === "initial" || t === "0.4.14") return Object.values(db);
9670
9670
  };
9671
9671
  var en, gs, M, Ld, Fd, Wi, Ui, Bd, qi, Ki, Xi, Ji, Yi, Gi, Zi, Qi, es, ts, zd, Gn, Zn, _d, Vd, $d, Hd;
9672
- const Gs = class Gs extends hg {
9672
+ const Gs = class Gs extends pg {
9673
9673
  constructor(n) {
9674
9674
  super();
9675
9675
  ft(this, M);
@@ -10034,7 +10034,7 @@ const Gs = class Gs extends hg {
10034
10034
  * @returns {Y.Doc | undefined} Updated Y.Doc if any, otherwise undefined
10035
10035
  */
10036
10036
  processCollaborationMigrations() {
10037
- if (console.debug("[checkVersionMigrations] Current editor version", "0.10.14"), !this.options.ydoc) return;
10037
+ if (console.debug("[checkVersionMigrations] Current editor version", "0.10.16"), !this.options.ydoc) return;
10038
10038
  let r = this.options.ydoc.getMap("meta").get("version");
10039
10039
  r || (r = "initial"), console.debug("[checkVersionMigrations] Document version", r);
10040
10040
  const o = nl(r) || [], s = this.state.plugins.find((c) => c.key.startsWith("y-sync"));
@@ -10095,7 +10095,7 @@ qi = function() {
10095
10095
  * Creates extension service.
10096
10096
  */
10097
10097
  Xi = function() {
10098
- const n = ["extension", "node", "mark"], r = [jy, Vy, Wy, Hy], o = this.options.externalExtensions || [], i = [...r, ...this.options.extensions].filter(
10098
+ const n = ["extension", "node", "mark"], r = [Hy, _y, jy, $y], o = this.options.externalExtensions || [], i = [...r, ...this.options.extensions].filter(
10099
10099
  (s) => n.includes(s?.type)
10100
10100
  );
10101
10101
  this.extensionService = _i.create(i, o, this);
@@ -10139,7 +10139,7 @@ Qi = function() {
10139
10139
  let n;
10140
10140
  try {
10141
10141
  const { mode: r, fragment: o, isHeadless: i, content: s, loadFromSchema: a } = this.options;
10142
- r === "docx" ? (n = vd(this.converter, this.schema, this), n = D(this, M, Vd).call(this, n), this.options.html && (n = D(this, M, es).call(this, this.options.html)), o && i && (n = rg(o, this.schema))) : (r === "text" || r === "html") && (a ? n = this.schema.nodeFromJSON(s) : s ? n = D(this, M, es).call(this, s) : n = this.schema.topNodeType.createAndFill());
10142
+ r === "docx" ? (n = vd(this.converter, this.schema, this), n = D(this, M, Vd).call(this, n), this.options.html && (n = D(this, M, es).call(this, this.options.html)), o && i && (n = ng(o, this.schema))) : (r === "text" || r === "html") && (a ? n = this.schema.nodeFromJSON(s) : s ? n = D(this, M, es).call(this, s) : n = this.schema.topNodeType.createAndFill());
10143
10143
  } catch (r) {
10144
10144
  console.error(r), this.emit("contentError", { editor: this, error: r });
10145
10145
  }
@@ -10190,7 +10190,7 @@ Gn = function() {
10190
10190
  if (this.options.isHeadless || !this.extensionService) return;
10191
10191
  if (this.options.extensions.find((r) => r.name === "pagination") && this.options.pagination) {
10192
10192
  console.debug("🔗 [super-editor] Initializing pagination");
10193
- const r = await tb(this);
10193
+ const r = await eb(this);
10194
10194
  this.storage.pagination.sectionData = r;
10195
10195
  const { state: o, dispatch: i } = this.view, s = o.tr.setMeta(on, { isReadyToInit: !0 });
10196
10196
  i(s);
@@ -10247,7 +10247,7 @@ Vd = function(n) {
10247
10247
  schema: this.schema,
10248
10248
  doc: n
10249
10249
  }), { tr: o, doc: i } = r;
10250
- return Zy(i, o, this.schema, this.converter), r.apply(o).doc;
10250
+ return Gy(i, o, this.schema, this.converter), r.apply(o).doc;
10251
10251
  }, /**
10252
10252
  * Prepare the document for export. Any necessary pre-export processing to the state
10253
10253
  * can happen here.
@@ -10260,7 +10260,7 @@ $d = function(n = []) {
10260
10260
  doc: this.state.doc,
10261
10261
  plugins: this.state.plugins
10262
10262
  }), { tr: o, doc: i } = r;
10263
- return Gy(i, o, this.schema, n), r.apply(o).doc.toJSON();
10263
+ return Yy(i, o, this.schema, n), r.apply(o).doc.toJSON();
10264
10264
  }, /**
10265
10265
  * Destroy collaboration provider and ydoc
10266
10266
  */
@@ -10614,14 +10614,14 @@ const jd = Q.create({
10614
10614
  };
10615
10615
  }
10616
10616
  });
10617
- function fb(t = {}) {
10617
+ function ub(t = {}) {
10618
10618
  return new Z({
10619
10619
  view(e) {
10620
- return new pb(e, t);
10620
+ return new fb(e, t);
10621
10621
  }
10622
10622
  });
10623
10623
  }
10624
- class pb {
10624
+ class fb {
10625
10625
  constructor(e, n) {
10626
10626
  var r;
10627
10627
  this.editorView = e, this.cursorPos = null, this.element = null, this.timeout = -1, this.width = (r = n.width) !== null && r !== void 0 ? r : 1, this.color = n.color === !1 ? void 0 : n.color || "black", this.class = n.class, this.handlers = ["dragover", "dragend", "drop", "dragleave"].map((o) => {
@@ -10703,7 +10703,7 @@ const Yd = Q.create({
10703
10703
  };
10704
10704
  },
10705
10705
  addPmPlugins() {
10706
- return [fb(this.options)];
10706
+ return [ub(this.options)];
10707
10707
  }
10708
10708
  });
10709
10709
  class re extends Y {
@@ -10745,7 +10745,7 @@ class re extends Y {
10745
10745
  */
10746
10746
  static valid(e) {
10747
10747
  let n = e.parent;
10748
- if (n.isTextblock || !hb(e) || !mb(e))
10748
+ if (n.isTextblock || !pb(e) || !hb(e))
10749
10749
  return !1;
10750
10750
  let r = n.type.spec.allowGapCursor;
10751
10751
  if (r != null)
@@ -10806,7 +10806,7 @@ class Vs {
10806
10806
  return re.valid(n) ? new re(n) : Y.near(n);
10807
10807
  }
10808
10808
  }
10809
- function hb(t) {
10809
+ function pb(t) {
10810
10810
  for (let e = t.depth; e >= 0; e--) {
10811
10811
  let n = t.index(e), r = t.node(e);
10812
10812
  if (n == 0) {
@@ -10823,7 +10823,7 @@ function hb(t) {
10823
10823
  }
10824
10824
  return !0;
10825
10825
  }
10826
- function mb(t) {
10826
+ function hb(t) {
10827
10827
  for (let e = t.depth; e >= 0; e--) {
10828
10828
  let n = t.indexAfter(e), r = t.node(e);
10829
10829
  if (n == r.childCount) {
@@ -10840,20 +10840,20 @@ function mb(t) {
10840
10840
  }
10841
10841
  return !0;
10842
10842
  }
10843
- function gb() {
10843
+ function mb() {
10844
10844
  return new Z({
10845
10845
  props: {
10846
- decorations: vb,
10846
+ decorations: wb,
10847
10847
  createSelectionBetween(t, e, n) {
10848
10848
  return e.pos == n.pos && re.valid(n) ? new re(n) : null;
10849
10849
  },
10850
- handleClick: bb,
10851
- handleKeyDown: yb,
10852
- handleDOMEvents: { beforeinput: wb }
10850
+ handleClick: yb,
10851
+ handleKeyDown: gb,
10852
+ handleDOMEvents: { beforeinput: bb }
10853
10853
  }
10854
10854
  });
10855
10855
  }
10856
- const yb = Ns({
10856
+ const gb = Ns({
10857
10857
  ArrowLeft: Xr("horiz", -1),
10858
10858
  ArrowRight: Xr("horiz", 1),
10859
10859
  ArrowUp: Xr("vert", -1),
@@ -10872,7 +10872,7 @@ function Xr(t, e) {
10872
10872
  return c ? (o && o(r.tr.setSelection(new re(c))), !0) : !1;
10873
10873
  };
10874
10874
  }
10875
- function bb(t, e, n) {
10875
+ function yb(t, e, n) {
10876
10876
  if (!t || !t.editable)
10877
10877
  return !1;
10878
10878
  let r = t.state.doc.resolve(e);
@@ -10881,7 +10881,7 @@ function bb(t, e, n) {
10881
10881
  let o = t.posAtCoords({ left: n.clientX, top: n.clientY });
10882
10882
  return o && o.inside > -1 && B.isSelectable(t.state.doc.nodeAt(o.inside)) ? !1 : (t.dispatch(t.state.tr.setSelection(new re(r))), !0);
10883
10883
  }
10884
- function wb(t, e) {
10884
+ function bb(t, e) {
10885
10885
  if (e.inputType != "insertCompositionText" || !(t.state.selection instanceof re))
10886
10886
  return !1;
10887
10887
  let { $from: n } = t.state.selection, r = n.parent.contentMatchAt(n.index()).findWrapping(t.state.schema.nodes.text);
@@ -10893,17 +10893,17 @@ function wb(t, e) {
10893
10893
  let i = t.state.tr.replace(n.pos, n.pos, new W(o, 0, 0));
10894
10894
  return i.setSelection(H.near(i.doc.resolve(n.pos + 1))), t.dispatch(i), !1;
10895
10895
  }
10896
- function vb(t) {
10896
+ function wb(t) {
10897
10897
  if (!(t.selection instanceof re))
10898
10898
  return null;
10899
10899
  let e = document.createElement("div");
10900
10900
  return e.className = "ProseMirror-gapcursor", F.create(t.doc, [V.widget(t.selection.head, e, { key: "gapcursor" })]);
10901
10901
  }
10902
- const kb = Q.create({
10902
+ const vb = Q.create({
10903
10903
  name: "gapCursor",
10904
10904
  addPmPlugins() {
10905
10905
  return [
10906
- gb()
10906
+ mb()
10907
10907
  ];
10908
10908
  },
10909
10909
  extendNodeSchema(t) {
@@ -10915,7 +10915,7 @@ const kb = Q.create({
10915
10915
  })) ?? null
10916
10916
  };
10917
10917
  }
10918
- }), Cb = new G("collaboration"), Sb = Q.create({
10918
+ }), kb = new G("collaboration"), Cb = Q.create({
10919
10919
  name: "collaboration",
10920
10920
  priority: 1e3,
10921
10921
  addOptions() {
@@ -10929,9 +10929,9 @@ const kb = Q.create({
10929
10929
  addPmPlugins() {
10930
10930
  if (!this.editor.options.ydoc) return [];
10931
10931
  this.options.ydoc = this.editor.options.ydoc;
10932
- const t = Mb();
10933
- Ab(this.options.ydoc, this.editor), Ob(this.options.ydoc, this.editor, this);
10934
- const [e, n] = xb(this.options.ydoc, this.editor);
10932
+ const t = xb();
10933
+ Mb(this.options.ydoc, this.editor), Ab(this.options.ydoc, this.editor, this);
10934
+ const [e, n] = Sb(this.options.ydoc, this.editor);
10935
10935
  this.options.fragment = n;
10936
10936
  const r = this.options.ydoc.getMap("media");
10937
10937
  return r.observe((o) => {
@@ -10945,8 +10945,8 @@ const kb = Q.create({
10945
10945
  },
10946
10946
  addCommands() {
10947
10947
  return {
10948
- undo: () => ({ tr: t, state: e, dispatch: n }) => (t.setMeta("preventDispatch", !0), t.setMeta("inputType", "historyUndo"), _t.getState(e).undoManager.undoStack.length === 0 ? !1 : n ? cg(e) : !0),
10949
- redo: () => ({ tr: t, state: e, dispatch: n }) => (t.setMeta("preventDispatch", !0), t.setMeta("inputType", "historyRedo"), _t.getState(e).undoManager.redoStack.length === 0 ? !1 : n ? dg(e) : !0),
10948
+ undo: () => ({ tr: t, state: e, dispatch: n }) => (t.setMeta("preventDispatch", !0), t.setMeta("inputType", "historyUndo"), _t.getState(e).undoManager.undoStack.length === 0 ? !1 : n ? lg(e) : !0),
10949
+ redo: () => ({ tr: t, state: e, dispatch: n }) => (t.setMeta("preventDispatch", !0), t.setMeta("inputType", "historyRedo"), _t.getState(e).undoManager.redoStack.length === 0 ? !1 : n ? cg(e) : !0),
10950
10950
  addImageToCollaboration: ({ mediaPath: t, fileData: e }) => () => {
10951
10951
  if (!this.options.ydoc) return;
10952
10952
  this.options.ydoc.getMap("media").set(t, e);
@@ -10960,14 +10960,14 @@ const kb = Q.create({
10960
10960
  "Mod-y": () => this.editor.commands.redo()
10961
10961
  };
10962
10962
  }
10963
- }), xb = (t, e) => {
10963
+ }), Sb = (t, e) => {
10964
10964
  const n = t.getXmlFragment("supereditor");
10965
- return [jm(n, { onFirstRender: () => {
10965
+ return [Hm(n, { onFirstRender: () => {
10966
10966
  if (!e.options.isNewFile) return;
10967
10967
  const o = t.getMap("meta");
10968
10968
  o.set("docx", e.options.content), o.set("fonts", e.options.fonts);
10969
10969
  } }), n];
10970
- }, Mb = () => pg(), Ab = (t, e) => {
10970
+ }, xb = () => fg(), Mb = (t, e) => {
10971
10971
  const n = t.getMap("meta");
10972
10972
  n.observe((r) => {
10973
10973
  const o = n.get("lockedBy"), i = n.get("locked");
@@ -10975,7 +10975,7 @@ const kb = Q.create({
10975
10975
  const s = o?.email !== e.options.user?.email, a = e.options.editable !== !i;
10976
10976
  !s || !a || (i ? console.debug("--- Locking editor ---", o, e.options.user) : console.debug("--- Unlocking editor ---", o), e.setEditable(!i), e.emit("locked", { editor: e, isLocked: i, lockedBy: o }));
10977
10977
  });
10978
- }, Ob = (t, e, n) => {
10978
+ }, Ab = (t, e, n) => {
10979
10979
  const r = e.options.collaborationProvider;
10980
10980
  if (!r) return;
10981
10981
  const o = () => {
@@ -10988,7 +10988,7 @@ const kb = Q.create({
10988
10988
  return;
10989
10989
  }
10990
10990
  r.on("synced", o);
10991
- }, Tb = Q.create({
10991
+ }, Ob = Q.create({
10992
10992
  name: "collaborationCursor",
10993
10993
  priority: 999,
10994
10994
  addOptions() {
@@ -11007,9 +11007,9 @@ const kb = Q.create({
11007
11007
  },
11008
11008
  addPmPlugins() {
11009
11009
  const { collaborationProvider: t = null } = this.editor.options;
11010
- return t ? [lg(t.awareness, { cursorBuilder: Db })] : [];
11010
+ return t ? [ag(t.awareness, { cursorBuilder: Tb })] : [];
11011
11011
  }
11012
- }), Db = (t) => {
11012
+ }), Tb = (t) => {
11013
11013
  const e = document.createElement("span");
11014
11014
  e.classList.add("ProseMirror-yjs-cursor"), e.setAttribute("style", `border-color: ${t.color}`);
11015
11015
  const n = document.createElement("div");
@@ -11035,7 +11035,7 @@ const kb = Q.create({
11035
11035
  name: "text",
11036
11036
  group: "inline",
11037
11037
  inline: !0
11038
- }), Nb = J.create({
11038
+ }), Db = J.create({
11039
11039
  name: "run",
11040
11040
  group: "inline",
11041
11041
  content: "text*",
@@ -11055,7 +11055,7 @@ const kb = Q.create({
11055
11055
  }
11056
11056
  });
11057
11057
  function Mo(t) {
11058
- return new Mg({
11058
+ return new xg({
11059
11059
  match: t.match,
11060
11060
  handler: ({
11061
11061
  state: e,
@@ -11148,7 +11148,7 @@ const rl = /^\s*([-+*])\s$/, Qd = J.create({
11148
11148
  ];
11149
11149
  }
11150
11150
  });
11151
- function Eb(t = {}) {
11151
+ function Nb(t = {}) {
11152
11152
  return new Z({
11153
11153
  key: new G("orderedListSync"),
11154
11154
  appendTransaction: (e, n, r) => {
@@ -11185,16 +11185,16 @@ function Eb(t = {}) {
11185
11185
  }
11186
11186
  });
11187
11187
  }
11188
- function Ib() {
11188
+ function Eb() {
11189
11189
  return Math.floor(Math.random() * 4294967295).toString();
11190
11190
  }
11191
- function Pb(t) {
11191
+ function Ib(t) {
11192
11192
  return new Z({
11193
11193
  key: new G("orderedListMarker"),
11194
11194
  appendTransaction: (e, n, r) => {
11195
11195
  if (!(e.some((c) => c.docChanged) && !n.doc.eq(r.doc)))
11196
11196
  return;
11197
- let { doc: i, tr: s } = r, a = Rb(r);
11197
+ let { doc: i, tr: s } = r, a = Pb(r);
11198
11198
  if (!a.size)
11199
11199
  return;
11200
11200
  let l = !1;
@@ -11204,14 +11204,14 @@ function Pb(t) {
11204
11204
  u.node.attrs.syncId;
11205
11205
  let h = u.node.childCount !== f.length;
11206
11206
  if (p) {
11207
- f.forEach((y) => Fb(s, y)), l = !0;
11207
+ f.forEach((y) => Lb(s, y)), l = !0;
11208
11208
  return;
11209
11209
  }
11210
11210
  if (h) {
11211
- let y = Lb({ state: r, list: u });
11211
+ let y = Rb({ state: r, list: u });
11212
11212
  y.length && (f = y);
11213
11213
  }
11214
- let m = f[0], g = Bb({ state: r, listItems: f }), b = eu(), w = {
11214
+ let m = f[0], g = Fb({ state: r, listItems: f }), b = eu(), w = {
11215
11215
  lvlText: m.node.attrs.lvlText ?? b.lvlText,
11216
11216
  listLevel: m.node.attrs.listLevel ?? b.listLevel,
11217
11217
  listNumberingType: m.node.attrs.listNumberingType ?? b.listNumberingType
@@ -11243,7 +11243,7 @@ function Pb(t) {
11243
11243
  }
11244
11244
  });
11245
11245
  }
11246
- function Rb(t) {
11246
+ function Pb(t) {
11247
11247
  let { doc: e } = t, n = /* @__PURE__ */ new Map();
11248
11248
  return e.descendants((r, o) => {
11249
11249
  let { attrs: i } = r, s = r.type.name === "listItem", a = !!i.listLevel?.length, l = !!i.lvlText, c = i.listNumberingType && i.listNumberingType !== "bullet";
@@ -11253,7 +11253,7 @@ function Rb(t) {
11253
11253
  }
11254
11254
  }), n;
11255
11255
  }
11256
- function Lb({ state: t, list: e }) {
11256
+ function Rb({ state: t, list: e }) {
11257
11257
  let { doc: n } = t, r = [];
11258
11258
  return n.descendants((o, i) => {
11259
11259
  let s = o.type.name === "listItem", a = n.resolve(i);
@@ -11267,7 +11267,7 @@ function eu({ lvlText: t = "", listLevel: e = [], listNumberingType: n = "decima
11267
11267
  listNumberingType: n
11268
11268
  };
11269
11269
  }
11270
- function Fb(t, e) {
11270
+ function Lb(t, e) {
11271
11271
  let { pos: n, node: r } = e;
11272
11272
  t.setNodeMarkup(n, void 0, {
11273
11273
  ...r.attrs,
@@ -11279,7 +11279,7 @@ function Fb(t, e) {
11279
11279
  function ol(t, e) {
11280
11280
  return t.length === e.length && t.every((n, r) => n === e[r]);
11281
11281
  }
11282
- function Bb({ state: t, listItems: e }) {
11282
+ function Fb({ state: t, listItems: e }) {
11283
11283
  let { doc: n } = t, r = e[0], { lvlText: o, listLevel: i, listNumberingType: s } = r.node.attrs, a = eu({
11284
11284
  lvlText: "%1.",
11285
11285
  listLevel: [1],
@@ -11338,7 +11338,7 @@ const il = /^(\d+)\.\s$/, tu = J.create({
11338
11338
  renderDOM: (t) => {
11339
11339
  let e = t["list-style-type"];
11340
11340
  return e ? (e === "lowerLetter" && (e = "lowerAlpha"), {
11341
- style: `list-style-type: ${Tf(e)};`
11341
+ style: `list-style-type: ${Of(e)};`
11342
11342
  }) : {};
11343
11343
  }
11344
11344
  },
@@ -11414,7 +11414,7 @@ const il = /^(\d+)\.\s$/, tu = J.create({
11414
11414
  return !1;
11415
11415
  let { $from: p } = r.selection, h = r.doc.nodeAt(f), m = p.after(), g = r.doc.nodeAt(m), b = h?.type.name === this.name, w = g?.type.name === this.name;
11416
11416
  if (b && w) {
11417
- let C = h.attrs.order || 1, y = h.childCount, S = h.attrs.syncId, k = y + C, A = S || Ib();
11417
+ let C = h.attrs.order || 1, y = h.childCount, S = h.attrs.syncId, k = y + C, A = S || Eb();
11418
11418
  r.setNodeMarkup(m, void 0, {
11419
11419
  ...g.attrs,
11420
11420
  order: k,
@@ -11436,7 +11436,7 @@ const il = /^(\d+)\.\s$/, tu = J.create({
11436
11436
  };
11437
11437
  },
11438
11438
  addPmPlugins() {
11439
- return [Pb(this.editor), Eb()];
11439
+ return [Ib(this.editor), Nb()];
11440
11440
  },
11441
11441
  addInputRules() {
11442
11442
  let t = Mo({
@@ -11457,19 +11457,19 @@ const il = /^(\d+)\.\s$/, tu = J.create({
11457
11457
  t
11458
11458
  ];
11459
11459
  }
11460
- }), zb = ({ listLevel: t, lvlText: e, listNumberingType: n }) => {
11461
- const r = Hb[n];
11460
+ }), Bb = ({ listLevel: t, lvlText: e, listNumberingType: n }) => {
11461
+ const r = $b[n];
11462
11462
  return r ? r(t, e) : null;
11463
- }, _b = (t, e) => $s(t, e, String), nu = (t, e) => $s(t, e, Wb), Vb = (t, e) => nu(t, e).toLowerCase(), $b = (t, e) => ru(t, e).toLowerCase(), ru = (t, e) => $s(t, e, (n) => Ub(n)), Hb = {
11464
- decimal: _b,
11465
- lowerRoman: Vb,
11463
+ }, zb = (t, e) => $s(t, e, String), nu = (t, e) => $s(t, e, jb), _b = (t, e) => nu(t, e).toLowerCase(), Vb = (t, e) => ru(t, e).toLowerCase(), ru = (t, e) => $s(t, e, (n) => Wb(n)), $b = {
11464
+ decimal: zb,
11465
+ lowerRoman: _b,
11466
11466
  upperRoman: nu,
11467
- lowerLetter: $b,
11467
+ lowerLetter: Vb,
11468
11468
  upperLetter: ru
11469
- }, jb = (t, e) => t.reduce((n, r, o) => n.replace(`%${o + 1}`, r), e), $s = (t, e, n) => {
11469
+ }, Hb = (t, e) => t.reduce((n, r, o) => n.replace(`%${o + 1}`, r), e), $s = (t, e, n) => {
11470
11470
  const r = t.map(n);
11471
- return jb(r, e);
11472
- }, Wb = (t) => {
11471
+ return Hb(r, e);
11472
+ }, jb = (t) => {
11473
11473
  const e = [
11474
11474
  { value: 1e3, numeral: "M" },
11475
11475
  { value: 900, numeral: "CM" },
@@ -11490,7 +11490,7 @@ const il = /^(\d+)\.\s$/, tu = J.create({
11490
11490
  for (; t >= r; )
11491
11491
  n += o, t -= r;
11492
11492
  return n;
11493
- }, Ub = (t) => {
11493
+ }, Wb = (t) => {
11494
11494
  let e = "";
11495
11495
  const n = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
11496
11496
  for (; t > 0; ) {
@@ -11499,7 +11499,7 @@ const il = /^(\d+)\.\s$/, tu = J.create({
11499
11499
  }
11500
11500
  return e;
11501
11501
  };
11502
- function qb(t = {}) {
11502
+ function Ub(t = {}) {
11503
11503
  return new Z({
11504
11504
  key: new G("styledListMarker"),
11505
11505
  state: {
@@ -11532,11 +11532,11 @@ function sl(t, e = []) {
11532
11532
  let i = Bs(n, (s) => s.type.name === "listItem");
11533
11533
  return i.length && i.forEach(({ node: s, pos: a }) => {
11534
11534
  let l = St("textStyle", n.type.schema), c = [...e.filter((b) => b.type === l)];
11535
- if (Xb(s) && e.length) {
11535
+ if (Kb(s) && e.length) {
11536
11536
  const b = e.filter((w) => w.type === l);
11537
11537
  c.push(...b);
11538
11538
  } else {
11539
- const b = Kb(s, n, l);
11539
+ const b = qb(s, n, l);
11540
11540
  c.push(...b);
11541
11541
  }
11542
11542
  let u = null, f = null;
@@ -11574,7 +11574,7 @@ function al(t) {
11574
11574
  n.push(a);
11575
11575
  }), n;
11576
11576
  }
11577
- function Kb(t, e, n) {
11577
+ function qb(t, e, n) {
11578
11578
  let r = [];
11579
11579
  return t.forEach((o) => {
11580
11580
  o.type.name === "paragraph" && o.forEach((i) => {
@@ -11586,7 +11586,7 @@ function Kb(t, e, n) {
11586
11586
  });
11587
11587
  }), r;
11588
11588
  }
11589
- function Xb(t) {
11589
+ function Kb(t) {
11590
11590
  return t.childCount === 1 && t.firstChild?.type.name === "paragraph" && t.firstChild?.content.size === 0;
11591
11591
  }
11592
11592
  const ou = J.create({
@@ -11617,7 +11617,7 @@ const ou = J.create({
11617
11617
  let { listLevel: e, listNumberingType: n, lvlText: r } = t;
11618
11618
  if (!!!e?.length || !r)
11619
11619
  return {};
11620
- let i = zb({
11620
+ let i = Bb({
11621
11621
  listLevel: e,
11622
11622
  lvlText: r,
11623
11623
  listNumberingType: n
@@ -11709,12 +11709,12 @@ const ou = J.create({
11709
11709
  };
11710
11710
  },
11711
11711
  addPmPlugins() {
11712
- return [qb()];
11712
+ return [Ub()];
11713
11713
  }
11714
- }), io = new G("linkedStyles"), Jb = Q.create({
11714
+ }), io = new G("linkedStyles"), Xb = Q.create({
11715
11715
  name: "linkedStyles",
11716
11716
  addPmPlugins() {
11717
- return [Yb(this.editor)];
11717
+ return [Jb(this.editor)];
11718
11718
  },
11719
11719
  addCommands() {
11720
11720
  return {
@@ -11734,7 +11734,7 @@ const ou = J.create({
11734
11734
  }
11735
11735
  };
11736
11736
  }
11737
- }), Yb = (t) => new Z({
11737
+ }), Jb = (t) => new Z({
11738
11738
  key: io,
11739
11739
  state: {
11740
11740
  init(e, { doc: n, selection: r }) {
@@ -11766,14 +11766,14 @@ const ou = J.create({
11766
11766
  return t.descendants((o, i) => {
11767
11767
  const { name: s } = o.type;
11768
11768
  if (o?.attrs?.styleId && (r = o.attrs.styleId), s === "paragraph" && !o.attrs?.styleId && (r = null), s !== "text") return;
11769
- const a = Zb(r, e);
11769
+ const a = Gb(r, e);
11770
11770
  if (!a) return;
11771
- const l = Gb(a, o);
11771
+ const l = Yb(a, o);
11772
11772
  if (!l) return;
11773
11773
  const c = V.inline(i, i + o.nodeSize, { style: l });
11774
11774
  n.push(c);
11775
11775
  }), F.create(t, n);
11776
- }, Gb = (t, e, n = !0) => {
11776
+ }, Yb = (t, e, n = !0) => {
11777
11777
  if (!t?.definition?.styles) return "";
11778
11778
  const r = {};
11779
11779
  return Object.entries(t.definition.styles).forEach(([o, i]) => {
@@ -11789,7 +11789,7 @@ const ou = J.create({
11789
11789
  a.push({ key: c.type.name, value: c.attrs[s] });
11790
11790
  }), !a.find((c) => c.key === s))
11791
11791
  if (s === "spacing" && n) {
11792
- const c = Qb(i);
11792
+ const c = Zb(i);
11793
11793
  Object.entries(c).forEach(([d, u]) => {
11794
11794
  r[d] = u;
11795
11795
  });
@@ -11798,20 +11798,20 @@ const ou = J.create({
11798
11798
  c && (r["margin-left"] = c + "px"), d && (r["margin-right"] = d + "px"), u && (r["text-indent"] = u + "px");
11799
11799
  } else s === "bold" ? r["font-weight"] = "bold" : r[s] = i;
11800
11800
  }), Object.entries(r).map(([o, i]) => `${o}: ${i}`).join(";");
11801
- }, Zb = (t, e = []) => e.find((n) => n.id === t), Qb = (t) => {
11801
+ }, Gb = (t, e = []) => e.find((n) => n.id === t), Zb = (t) => {
11802
11802
  const { lineSpaceBefore: e, lineSpaceAfter: n, line: r } = t;
11803
11803
  return {
11804
11804
  "margin-top": e + "px",
11805
11805
  "margin-bottom": n + "px",
11806
11806
  ...ys(r, "")
11807
11807
  };
11808
- }, e0 = (t) => {
11808
+ }, Qb = (t) => {
11809
11809
  const { lineSpaceBefore: e, lineSpaceAfter: n } = t;
11810
11810
  return `
11811
11811
  ${e ? `margin-top: ${e}px;` : ""}
11812
11812
  ${n ? `margin-bottom: ${n}px;` : ""}
11813
11813
  `.trim();
11814
- }, t0 = (t) => {
11814
+ }, e0 = (t) => {
11815
11815
  let e = "";
11816
11816
  for (const n of t)
11817
11817
  switch (n.type) {
@@ -11849,7 +11849,7 @@ const ou = J.create({
11849
11849
  renderDOM: (t) => {
11850
11850
  const { spacing: e } = t;
11851
11851
  if (!e) return {};
11852
- const n = e0(e);
11852
+ const n = Qb(e);
11853
11853
  return n ? { style: n } : {};
11854
11854
  }
11855
11855
  },
@@ -11867,7 +11867,7 @@ const ou = J.create({
11867
11867
  renderDOM: (t) => {
11868
11868
  const { marksAttrs: e } = t;
11869
11869
  if (!e?.length) return {};
11870
- const n = t0(e);
11870
+ const n = e0(e);
11871
11871
  return n ? { style: n } : {};
11872
11872
  }
11873
11873
  },
@@ -11947,7 +11947,7 @@ const ou = J.create({
11947
11947
  {}
11948
11948
  );
11949
11949
  }
11950
- }), n0 = J.create({
11950
+ }), t0 = J.create({
11951
11951
  name: "commentRangeStart",
11952
11952
  group: "inline",
11953
11953
  inline: !0,
@@ -11978,7 +11978,7 @@ const ou = J.create({
11978
11978
  }
11979
11979
  };
11980
11980
  }
11981
- }), r0 = J.create({
11981
+ }), n0 = J.create({
11982
11982
  name: "commentRangeEnd",
11983
11983
  group: "inline",
11984
11984
  inline: !0,
@@ -12005,7 +12005,7 @@ const ou = J.create({
12005
12005
  }
12006
12006
  };
12007
12007
  }
12008
- }), o0 = J.create({
12008
+ }), r0 = J.create({
12009
12009
  name: "commentReference",
12010
12010
  group: "inline",
12011
12011
  inline: !0,
@@ -12032,7 +12032,7 @@ const ou = J.create({
12032
12032
  }
12033
12033
  };
12034
12034
  }
12035
- }), i0 = Le.create({
12035
+ }), o0 = Le.create({
12036
12036
  name: Pe,
12037
12037
  group: "comments",
12038
12038
  excludes: "",
@@ -12057,7 +12057,7 @@ const ou = J.create({
12057
12057
  renderDOM({ htmlAttributes: t }) {
12058
12058
  return [Pe, N.mergeAttributes(this.options.htmlAttributes, t)];
12059
12059
  }
12060
- }), s0 = J.create({
12060
+ }), i0 = J.create({
12061
12061
  name: "tab",
12062
12062
  group: "inline",
12063
12063
  inline: !0,
@@ -12121,21 +12121,21 @@ const ou = J.create({
12121
12121
  try {
12122
12122
  t.doc.nodesBetween(o - s - 1, o - 1, (d, u) => {
12123
12123
  if (d.isText && d.textContent !== " ") {
12124
- const f = a0(e, u);
12124
+ const f = s0(e, u);
12125
12125
  a += f;
12126
12126
  }
12127
12127
  });
12128
12128
  } catch {
12129
12129
  return;
12130
12130
  }
12131
- const l = i.nodeBefore?.type.name === "tab" ? ci : ci - a % ci, c = l0(i);
12131
+ const l = i.nodeBefore?.type.name === "tab" ? ci : ci - a % ci, c = a0(i);
12132
12132
  n.push(
12133
12133
  V.node(o, o + r.nodeSize, { style: `width: ${l}px; height: ${c};` })
12134
12134
  );
12135
12135
  }
12136
12136
  }), n;
12137
12137
  };
12138
- function a0(t, e) {
12138
+ function s0(t, e) {
12139
12139
  const n = t.nodeDOM(e);
12140
12140
  if (n) {
12141
12141
  const r = document.createRange();
@@ -12143,11 +12143,11 @@ function a0(t, e) {
12143
12143
  }
12144
12144
  return 0;
12145
12145
  }
12146
- function l0(t) {
12146
+ function a0(t) {
12147
12147
  const i = t.node(1).firstChild.marks.find((a) => a.type.name === "textStyle");
12148
12148
  return `${(parseInt(i?.attrs.fontSize) * 1.333 || 16) * 1.1}px`;
12149
12149
  }
12150
- const au = J.create({
12150
+ const l0 = J.create({
12151
12151
  name: "lineBreak",
12152
12152
  group: "inline",
12153
12153
  inline: !0,
@@ -12157,7 +12157,7 @@ const au = J.create({
12157
12157
  renderDOM() {
12158
12158
  return ["br", {}, 0];
12159
12159
  }
12160
- }), lu = J.create({
12160
+ }), au = J.create({
12161
12161
  name: "hardBreak",
12162
12162
  group: "inline",
12163
12163
  inline: !0,
@@ -12245,7 +12245,7 @@ function fl(t, e) {
12245
12245
  }
12246
12246
  r = Math.ceil(Math.max(o, i)), t.style.setProperty("--table-border-width", `${r || n}px`);
12247
12247
  }
12248
- const pl = (t, e = null) => e ? t.createChecked(null, e) : t.createAndFill(), cu = ({
12248
+ const pl = (t, e = null) => e ? t.createChecked(null, e) : t.createAndFill(), lu = ({
12249
12249
  size: t = 0.66665,
12250
12250
  color: e = "#000000"
12251
12251
  } = {}) => ({
@@ -12274,7 +12274,7 @@ const pl = (t, e = null) => e ? t.createChecked(null, e) : t.createAndFill(), cu
12274
12274
  const u = r && d === 0 ? s : a;
12275
12275
  l.push(i.tableRow.createChecked(null, u));
12276
12276
  }
12277
- const c = cu();
12277
+ const c = lu();
12278
12278
  return i.table.createChecked({ borders: c }, l);
12279
12279
  };
12280
12280
  var ns, rs;
@@ -12535,7 +12535,7 @@ function y0(t) {
12535
12535
  function Hs(t, e) {
12536
12536
  return t.depth == e.depth && t.pos >= e.start(-1) && t.pos <= e.end(-1);
12537
12537
  }
12538
- function du(t, e, n) {
12538
+ function cu(t, e, n) {
12539
12539
  const r = t.node(-1), o = oe.get(r), i = t.start(-1), s = o.nextCell(t.pos - i, e, n);
12540
12540
  return s == null ? null : t.node(0).resolve(i + s);
12541
12541
  }
@@ -12543,7 +12543,7 @@ function dn(t, e, n = 1) {
12543
12543
  const r = { ...t, colspan: t.colspan - n };
12544
12544
  return r.colwidth && (r.colwidth = r.colwidth.slice(), r.colwidth.splice(e, n), r.colwidth.some((o) => o > 0) || (r.colwidth = null)), r;
12545
12545
  }
12546
- function uu(t, e, n = 1) {
12546
+ function du(t, e, n = 1) {
12547
12547
  const r = { ...t, colspan: t.colspan + n };
12548
12548
  if (r.colwidth) {
12549
12549
  r.colwidth = r.colwidth.slice();
@@ -12574,7 +12574,7 @@ var X = class ht extends Y {
12574
12574
  if (!u)
12575
12575
  throw RangeError(`No cell with offset ${d} found`);
12576
12576
  const f = i + d + 1;
12577
- return new Df(
12577
+ return new Tf(
12578
12578
  a.resolve(f),
12579
12579
  a.resolve(f + u.content.size)
12580
12580
  );
@@ -12724,12 +12724,12 @@ var X = class ht extends Y {
12724
12724
  };
12725
12725
  X.prototype.visible = !1;
12726
12726
  Y.jsonID("cell", X);
12727
- var w0 = class fu {
12727
+ var w0 = class uu {
12728
12728
  constructor(e, n) {
12729
12729
  this.anchor = e, this.head = n;
12730
12730
  }
12731
12731
  map(e) {
12732
- return new fu(e.map(this.anchor), e.map(this.head));
12732
+ return new uu(e.map(this.anchor), e.map(this.head));
12733
12733
  }
12734
12734
  resolve(e) {
12735
12735
  const n = e.resolve(this.anchor), r = e.resolve(this.head);
@@ -12789,7 +12789,7 @@ function S0(t, e, n) {
12789
12789
  return i && (e || (e = t.tr)).setSelection(i), e;
12790
12790
  }
12791
12791
  var x0 = new G("fix-tables");
12792
- function pu(t, e, n, r) {
12792
+ function fu(t, e, n, r) {
12793
12793
  const o = t.childCount, i = e.childCount;
12794
12794
  e: for (let s = 0, a = 0; s < i; s++) {
12795
12795
  const l = e.child(s);
@@ -12798,15 +12798,15 @@ function pu(t, e, n, r) {
12798
12798
  a = c + 1, n += l.nodeSize;
12799
12799
  continue e;
12800
12800
  }
12801
- r(l, n), a < o && t.child(a).sameMarkup(l) ? pu(t.child(a), l, n + 1, r) : l.nodesBetween(0, l.content.size, r, n + 1), n += l.nodeSize;
12801
+ r(l, n), a < o && t.child(a).sameMarkup(l) ? fu(t.child(a), l, n + 1, r) : l.nodesBetween(0, l.content.size, r, n + 1), n += l.nodeSize;
12802
12802
  }
12803
12803
  }
12804
- function hu(t, e) {
12804
+ function pu(t, e) {
12805
12805
  let n;
12806
12806
  const r = (o, i) => {
12807
12807
  o.type.spec.tableRole == "table" && (n = M0(t, o, i, n));
12808
12808
  };
12809
- return e ? e.doc != t.doc && pu(e.doc, t.doc, 0, r) : t.doc.descendants(r), n;
12809
+ return e ? e.doc != t.doc && fu(e.doc, t.doc, 0, r) : t.doc.descendants(r), n;
12810
12810
  }
12811
12811
  function M0(t, e, n, r) {
12812
12812
  const o = oe.get(e);
@@ -12874,7 +12874,7 @@ function at(t) {
12874
12874
  e.$headCell.pos - o
12875
12875
  ) : i.findCell(n.pos - o), tableStart: o, map: i, table: r };
12876
12876
  }
12877
- function mu(t, { map: e, tableStart: n, table: r }, o) {
12877
+ function hu(t, { map: e, tableStart: n, table: r }, o) {
12878
12878
  let i = o > 0 ? -1 : 0;
12879
12879
  b0(e, r, o + i) && (i = o == 0 || o == e.width ? null : 0);
12880
12880
  for (let s = 0; s < e.height; s++) {
@@ -12884,7 +12884,7 @@ function mu(t, { map: e, tableStart: n, table: r }, o) {
12884
12884
  t.setNodeMarkup(
12885
12885
  t.mapping.map(n + l),
12886
12886
  null,
12887
- uu(c.attrs, o - e.colCount(l))
12887
+ du(c.attrs, o - e.colCount(l))
12888
12888
  ), s += c.attrs.rowspan - 1;
12889
12889
  } else {
12890
12890
  const l = i == null ? we(r.type.schema).cell : r.nodeAt(e.map[a + i]).type, c = e.positionAt(s, o, r);
@@ -12897,7 +12897,7 @@ function A0(t, e) {
12897
12897
  if (!Ye(t)) return !1;
12898
12898
  if (e) {
12899
12899
  const n = at(t);
12900
- e(mu(t.tr, n, n.left));
12900
+ e(hu(t.tr, n, n.left));
12901
12901
  }
12902
12902
  return !0;
12903
12903
  }
@@ -12905,7 +12905,7 @@ function O0(t, e) {
12905
12905
  if (!Ye(t)) return !1;
12906
12906
  if (e) {
12907
12907
  const n = at(t);
12908
- e(mu(t.tr, n, n.right));
12908
+ e(hu(t.tr, n, n.right));
12909
12909
  }
12910
12910
  return !0;
12911
12911
  }
@@ -12949,7 +12949,7 @@ function N0(t, e, n) {
12949
12949
  return !1;
12950
12950
  return !0;
12951
12951
  }
12952
- function gu(t, { map: e, tableStart: n, table: r }, o) {
12952
+ function mu(t, { map: e, tableStart: n, table: r }, o) {
12953
12953
  var i;
12954
12954
  let s = n;
12955
12955
  for (let c = 0; c < o; c++) s += r.child(c).nodeSize;
@@ -12973,7 +12973,7 @@ function E0(t, e) {
12973
12973
  if (!Ye(t)) return !1;
12974
12974
  if (e) {
12975
12975
  const n = at(t);
12976
- e(gu(t.tr, n, n.top));
12976
+ e(mu(t.tr, n, n.top));
12977
12977
  }
12978
12978
  return !0;
12979
12979
  }
@@ -12981,7 +12981,7 @@ function I0(t, e) {
12981
12981
  if (!Ye(t)) return !1;
12982
12982
  if (e) {
12983
12983
  const n = at(t);
12984
- e(gu(t.tr, n, n.bottom));
12984
+ e(mu(t.tr, n, n.bottom));
12985
12985
  }
12986
12986
  return !0;
12987
12987
  }
@@ -13067,7 +13067,7 @@ function ml(t, e) {
13067
13067
  if (l == null || c == null)
13068
13068
  return !0;
13069
13069
  if (i.setNodeMarkup(l + r.tableStart, null, {
13070
- ...uu(
13070
+ ...du(
13071
13071
  c.attrs,
13072
13072
  c.attrs.colspan,
13073
13073
  r.right - r.left - c.attrs.colspan
@@ -13351,7 +13351,7 @@ function j0(t, e) {
13351
13351
  }
13352
13352
  function ss(t, e) {
13353
13353
  const n = t.createAndFill();
13354
- return new Nf(n).replace(0, n.content.size, e).doc;
13354
+ return new Df(n).replace(0, n.content.size, e).doc;
13355
13355
  }
13356
13356
  function W0({ width: t, height: e, rows: n }, r, o) {
13357
13357
  if (t != r) {
@@ -13526,7 +13526,7 @@ function Yr(t, e) {
13526
13526
  Y.near(i.$headCell, e)
13527
13527
  );
13528
13528
  if (t != "horiz" && !i.empty) return !1;
13529
- const s = yu(o, t, e);
13529
+ const s = gu(o, t, e);
13530
13530
  if (s == null) return !1;
13531
13531
  if (t == "horiz")
13532
13532
  return so(
@@ -13535,7 +13535,7 @@ function Yr(t, e) {
13535
13535
  Y.near(n.doc.resolve(i.head + e), e)
13536
13536
  );
13537
13537
  {
13538
- const a = n.doc.resolve(s), l = du(a, t, e);
13538
+ const a = n.doc.resolve(s), l = cu(a, t, e);
13539
13539
  let c;
13540
13540
  return l ? c = Y.near(l, 1) : e < 0 ? c = Y.near(n.doc.resolve(a.before(-1)), -1) : c = Y.near(n.doc.resolve(a.after(-1)), 1), so(n, r, c);
13541
13541
  }
@@ -13549,11 +13549,11 @@ function Gr(t, e) {
13549
13549
  if (i instanceof X)
13550
13550
  s = i;
13551
13551
  else {
13552
- const l = yu(o, t, e);
13552
+ const l = gu(o, t, e);
13553
13553
  if (l == null) return !1;
13554
13554
  s = new X(n.doc.resolve(l));
13555
13555
  }
13556
- const a = du(s.$headCell, t, e);
13556
+ const a = cu(s.$headCell, t, e);
13557
13557
  return a ? so(
13558
13558
  n,
13559
13559
  r,
@@ -13633,7 +13633,7 @@ function J0(t, e) {
13633
13633
  }
13634
13634
  t.root.addEventListener("mouseup", s), t.root.addEventListener("dragstart", s), t.root.addEventListener("mousemove", a);
13635
13635
  }
13636
- function yu(t, e, n) {
13636
+ function gu(t, e, n) {
13637
13637
  if (!(t.state.selection instanceof H)) return null;
13638
13638
  const { $head: r } = t.state.selection;
13639
13639
  for (let o = r.depth - 1; o >= 0; o--) {
@@ -13783,14 +13783,14 @@ function Q0(t, e, n, r) {
13783
13783
  if (c.colCount(a.pos - d) + a.nodeAfter.attrs.colspan - 1 == c.width - 1)
13784
13784
  return;
13785
13785
  }
13786
- bu(t, s);
13786
+ yu(t, s);
13787
13787
  }
13788
13788
  }
13789
13789
  }
13790
13790
  function ew(t) {
13791
13791
  if (!t.editable) return;
13792
13792
  const e = Ee.getState(t.state);
13793
- e && e.activeHandle > -1 && !e.dragging && bu(t, -1);
13793
+ e && e.activeHandle > -1 && !e.dragging && yu(t, -1);
13794
13794
  }
13795
13795
  function tw(t, e, n, r) {
13796
13796
  var o;
@@ -13866,7 +13866,7 @@ function xl(t, e, n) {
13866
13866
  const r = e.clientX - t.startX;
13867
13867
  return Math.max(n, t.startWidth + r);
13868
13868
  }
13869
- function bu(t, e) {
13869
+ function yu(t, e) {
13870
13870
  t.dispatch(
13871
13871
  t.state.tr.setMeta(Ee, { setHandle: e })
13872
13872
  );
@@ -13958,7 +13958,7 @@ function aw({
13958
13958
  appendTransaction(e, n, r) {
13959
13959
  return S0(
13960
13960
  r,
13961
- hu(r, n),
13961
+ pu(r, n),
13962
13962
  t
13963
13963
  );
13964
13964
  }
@@ -13972,7 +13972,7 @@ const lw = (t) => t instanceof X, Zr = ({ editor: t }) => {
13972
13972
  if (i.type.name === "table") return !1;
13973
13973
  ["tableCell", "tableHeader"].includes(i.type.name) && (n += 1);
13974
13974
  }), n === e.ranges.length ? (t.commands.deleteTable(), !0) : !1;
13975
- }, wu = ({
13975
+ }, bu = ({
13976
13976
  size: t = 0.66665,
13977
13977
  color: e = "#000000"
13978
13978
  } = {}) => ({
@@ -13980,7 +13980,7 @@ const lw = (t) => t instanceof X, Zr = ({ editor: t }) => {
13980
13980
  left: { size: t, color: e },
13981
13981
  bottom: { size: t, color: e },
13982
13982
  right: { size: t, color: e }
13983
- }), vu = J.create({
13983
+ }), wu = J.create({
13984
13984
  name: "table",
13985
13985
  content: "tableRow+",
13986
13986
  group: "block",
@@ -14052,7 +14052,7 @@ const lw = (t) => t instanceof X, Zr = ({ editor: t }) => {
14052
14052
  return [{ tag: "table" }];
14053
14053
  },
14054
14054
  renderDOM({ node: t, htmlAttributes: e }) {
14055
- const { colgroup: n, tableWidth: r, tableMinWidth: o } = Ef(
14055
+ const { colgroup: n, tableWidth: r, tableMinWidth: o } = Nf(
14056
14056
  t,
14057
14057
  this.options.cellMinWidth
14058
14058
  );
@@ -14091,7 +14091,7 @@ const lw = (t) => t instanceof X, Zr = ({ editor: t }) => {
14091
14091
  setCellAttr: (t, e) => ({ state: n, dispatch: r }) => B0(t, e)(n, r),
14092
14092
  goToNextCell: () => ({ state: t, dispatch: e }) => bl(1)(t, e),
14093
14093
  goToPreviousCell: () => ({ state: t, dispatch: e }) => bl(-1)(t, e),
14094
- fixTables: () => ({ state: t, dispatch: e }) => (e && hu(t), !0),
14094
+ fixTables: () => ({ state: t, dispatch: e }) => (e && pu(t), !0),
14095
14095
  setCellSelection: (t) => ({ tr: e, dispatch: n }) => (n && e.setSelection(X.create(e.doc, t.anchorCell, t.headCell)), !0),
14096
14096
  deleteCellAndTableBorders: () => ({ chain: t, state: e, tr: n }) => {
14097
14097
  if (!Md(e))
@@ -14103,11 +14103,11 @@ const lw = (t) => t instanceof X, Zr = ({ editor: t }) => {
14103
14103
  return e.doc.nodesBetween(o, i, (s, a) => {
14104
14104
  ["tableCell", "tableHeader"].includes(s.type.name) && n.setNodeMarkup(a, void 0, {
14105
14105
  ...s.attrs,
14106
- borders: wu({ size: 0 })
14106
+ borders: bu({ size: 0 })
14107
14107
  });
14108
14108
  }), n.setNodeMarkup(r.pos, void 0, {
14109
14109
  ...r.node.attrs,
14110
- borders: cu({ size: 0 })
14110
+ borders: lu({ size: 0 })
14111
14111
  }), !0;
14112
14112
  }
14113
14113
  };
@@ -14149,7 +14149,7 @@ const lw = (t) => t instanceof X, Zr = ({ editor: t }) => {
14149
14149
  }))
14150
14150
  };
14151
14151
  }
14152
- }), ku = J.create({
14152
+ }), vu = J.create({
14153
14153
  name: "tableHeader",
14154
14154
  content: "block+",
14155
14155
  tableRole: "header_cell",
@@ -14185,7 +14185,7 @@ const lw = (t) => t instanceof X, Zr = ({ editor: t }) => {
14185
14185
  renderDOM({ htmlAttributes: t }) {
14186
14186
  return ["th", N.mergeAttributes(this.options.htmlAttributes, t), 0];
14187
14187
  }
14188
- }), Cu = J.create({
14188
+ }), ku = J.create({
14189
14189
  name: "tableRow",
14190
14190
  content: "(tableCell | tableHeader)*",
14191
14191
  tableRole: "row",
@@ -14209,7 +14209,7 @@ const lw = (t) => t instanceof X, Zr = ({ editor: t }) => {
14209
14209
  renderDOM({ htmlAttributes: t }) {
14210
14210
  return ["tr", N.mergeAttributes(this.options.htmlAttributes, t), 0];
14211
14211
  }
14212
- }), Su = J.create({
14212
+ }), Cu = J.create({
14213
14213
  name: "tableCell",
14214
14214
  content: "block+",
14215
14215
  tableRole: "cell",
@@ -14267,7 +14267,7 @@ const lw = (t) => t instanceof X, Zr = ({ editor: t }) => {
14267
14267
  }
14268
14268
  },
14269
14269
  borders: {
14270
- default: () => wu(),
14270
+ default: () => bu(),
14271
14271
  renderDOM({ borders: t }) {
14272
14272
  return t ? { style: ["top", "right", "bottom", "left"].map((r) => {
14273
14273
  const o = t?.[r];
@@ -14440,7 +14440,7 @@ yt = new WeakSet(), Jt = function({ displayLabel: e } = {}) {
14440
14440
  content: o
14441
14441
  };
14442
14442
  };
14443
- function xu(t) {
14443
+ function Su(t) {
14444
14444
  let e = [];
14445
14445
  return !t.steps.length || t.meta && !Object.keys(t.meta).every((n) => ["inputType", "uiEvent", "paste"].includes(n)) || ["historyUndo", "historyRedo"].includes(t.getMeta("inputType")) || ["drop"].includes(t.getMeta("uiEvent")) || t.getMeta("fieldAnnotationUpdate") === !0 || t.steps.forEach((n, r) => {
14446
14446
  if (n instanceof Vt && n.from !== n.to) {
@@ -14451,8 +14451,8 @@ function xu(t) {
14451
14451
  }
14452
14452
  }), e;
14453
14453
  }
14454
- function Mu(t, e) {
14455
- let n = xu(e);
14454
+ function xu(t, e) {
14455
+ let n = Su(e);
14456
14456
  n.length > 0 && setTimeout(() => {
14457
14457
  t.emit("fieldAnnotationDeleted", {
14458
14458
  editor: t,
@@ -14473,7 +14473,7 @@ const uw = (t = {}) => {
14473
14473
  return null;
14474
14474
  },
14475
14475
  apply(r, o) {
14476
- return Mu(e, r), o;
14476
+ return xu(e, r), o;
14477
14477
  }
14478
14478
  },
14479
14479
  props: {
@@ -14604,10 +14604,10 @@ const Xk = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
14604
14604
  findFieldAnnotationsBetween: co,
14605
14605
  findFieldAnnotationsByFieldId: lo,
14606
14606
  findFirstFieldAnnotationByFieldId: gw,
14607
- findRemovedFieldAnnotations: xu,
14607
+ findRemovedFieldAnnotations: Su,
14608
14608
  getAllFieldAnnotations: Pt,
14609
14609
  getAllFieldAnnotationsWithRect: pw,
14610
- trackFieldAnnotationsDeletion: Mu
14610
+ trackFieldAnnotationsDeletion: xu
14611
14611
  }, Symbol.toStringTag, { value: "Module" }));
14612
14612
  function ls(t, e, n) {
14613
14613
  return Math.min(Math.max(t, n), e);
@@ -14683,7 +14683,7 @@ function Dw(t) {
14683
14683
  };
14684
14684
  return `#${i(e)}${i(n)}${i(r)}${o < 1 ? i(Math.round(o * 255)) : ""}`;
14685
14685
  }
14686
- const cs = "annotation", Au = "annotation-content", Ou = J.create({
14686
+ const cs = "annotation", Mu = "annotation-content", Au = J.create({
14687
14687
  name: "fieldAnnotation",
14688
14688
  group: "inline",
14689
14689
  inline: !0,
@@ -14696,7 +14696,7 @@ const cs = "annotation", Au = "annotation-content", Ou = J.create({
14696
14696
  class: cs
14697
14697
  },
14698
14698
  annotationClass: cs,
14699
- annotationContentClass: Au,
14699
+ annotationContentClass: Mu,
14700
14700
  types: ["text", "image", "signature", "checkbox", "html", "link"],
14701
14701
  // annotation types
14702
14702
  defaultType: "text",
@@ -15209,7 +15209,7 @@ const Ao = new G("ImagePlaceholder"), Ew = (t = {}) => new Z({
15209
15209
  }), Jk = (t, e) => {
15210
15210
  let r = Ao.getState(t)?.find(null, null, (o) => o.id === e);
15211
15211
  return r?.length ? r[0].from : null;
15212
- }, Tu = J.create({
15212
+ }, Ou = J.create({
15213
15213
  name: "image",
15214
15214
  group: "inline",
15215
15215
  inline: !0,
@@ -15316,7 +15316,7 @@ const Ao = new G("ImagePlaceholder"), Ew = (t = {}) => new Z({
15316
15316
  renderDOM({ htmlAttributes: t }) {
15317
15317
  return ["a", N.mergeAttributes(this.options.htmlAttributes, t)];
15318
15318
  }
15319
- }), Du = J.create({
15319
+ }), Tu = J.create({
15320
15320
  name: "mention",
15321
15321
  group: "inline",
15322
15322
  inline: !0,
@@ -15390,7 +15390,7 @@ const Ao = new G("ImagePlaceholder"), Ew = (t = {}) => new Z({
15390
15390
  renderDOM({ htmlAttributes: t }) {
15391
15391
  return ["span", N.mergeAttributes(this.options.htmlAttributes, t), 0];
15392
15392
  }
15393
- }), Nu = Le.create({
15393
+ }), Du = Le.create({
15394
15394
  name: "textStyle",
15395
15395
  addOptions() {
15396
15396
  return {
@@ -15402,7 +15402,7 @@ const Ao = new G("ImagePlaceholder"), Ew = (t = {}) => new Z({
15402
15402
  {
15403
15403
  tag: "span",
15404
15404
  getAttrs: (t) => {
15405
- const e = t.hasAttribute("style"), n = t.classList.contains(cs) || t.classList.contains(Au);
15405
+ const e = t.hasAttribute("style"), n = t.classList.contains(cs) || t.classList.contains(Mu);
15406
15406
  return !e || n ? !1 : {};
15407
15407
  }
15408
15408
  }
@@ -15419,7 +15419,7 @@ const Ao = new G("ImagePlaceholder"), Ew = (t = {}) => new Z({
15419
15419
  }
15420
15420
  };
15421
15421
  }
15422
- }), Eu = Le.create({
15422
+ }), Nu = Le.create({
15423
15423
  name: "bold",
15424
15424
  addOptions() {
15425
15425
  return {
@@ -15451,7 +15451,7 @@ const Ao = new G("ImagePlaceholder"), Ew = (t = {}) => new Z({
15451
15451
  "Mod-B": () => this.editor.commands.toggleBold()
15452
15452
  };
15453
15453
  }
15454
- }), Iu = Le.create({
15454
+ }), Eu = Le.create({
15455
15455
  name: "italic",
15456
15456
  addOptions() {
15457
15457
  return {
@@ -15483,7 +15483,7 @@ const Ao = new G("ImagePlaceholder"), Ew = (t = {}) => new Z({
15483
15483
  "Mod-I": () => this.editor.commands.toggleItalic()
15484
15484
  };
15485
15485
  }
15486
- }), Pu = Le.create({
15486
+ }), Iu = Le.create({
15487
15487
  name: "underline",
15488
15488
  addOptions() {
15489
15489
  return {
@@ -15521,7 +15521,7 @@ const Ao = new G("ImagePlaceholder"), Ew = (t = {}) => new Z({
15521
15521
  "Mod-U": () => this.editor.commands.toggleUnderline()
15522
15522
  };
15523
15523
  }
15524
- }), Ru = Le.create({
15524
+ }), Pu = Le.create({
15525
15525
  name: "highlight",
15526
15526
  addOptions() {
15527
15527
  return {
@@ -15559,7 +15559,7 @@ const Ao = new G("ImagePlaceholder"), Ew = (t = {}) => new Z({
15559
15559
  "Mod-Shift-h": () => this.editor.commands.toggleHighlight()
15560
15560
  };
15561
15561
  }
15562
- }), Lu = Le.create({
15562
+ }), Ru = Le.create({
15563
15563
  name: "strike",
15564
15564
  addOptions() {
15565
15565
  return {
@@ -15588,7 +15588,7 @@ const Ao = new G("ImagePlaceholder"), Ew = (t = {}) => new Z({
15588
15588
  "Mod-Shift-s": () => this.editor.commands.toggleStrike()
15589
15589
  };
15590
15590
  }
15591
- }), Fu = Le.create({
15591
+ }), Lu = Le.create({
15592
15592
  name: "link",
15593
15593
  priority: 1e3,
15594
15594
  keepOnSplit: !1,
@@ -15647,7 +15647,7 @@ function Tl(t, e) {
15647
15647
  o && n.push(o);
15648
15648
  }), !t || t.replace(Lw, "").match(new RegExp(`^(?:(?:${n.join("|")}):|[^a-z]|[a-z+.-]+(?:[^a-z+.-:]|$))`, "i"));
15649
15649
  }
15650
- const Fw = "track-insert", Bu = Le.create({
15650
+ const Fw = "track-insert", Fu = Le.create({
15651
15651
  name: Ve,
15652
15652
  group: "track",
15653
15653
  inclusive: !1,
@@ -15696,7 +15696,7 @@ const Fw = "track-insert", Bu = Le.create({
15696
15696
  renderDOM({ htmlAttributes: t }) {
15697
15697
  return ["span", N.mergeAttributes(this.options.htmlAttributes, t), 0];
15698
15698
  }
15699
- }), Bw = "track-delete", zu = Le.create({
15699
+ }), Bw = "track-delete", Bu = Le.create({
15700
15700
  name: ue,
15701
15701
  group: "track",
15702
15702
  inclusive: !1,
@@ -15757,18 +15757,18 @@ const Fw = "track-insert", Bu = Le.create({
15757
15757
  }, Yk = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
15758
15758
  __proto__: null,
15759
15759
  addMarkStep: Id,
15760
- documentHelpers: Xy,
15760
+ documentHelpers: Ky,
15761
15761
  findTrackedMarkBetween: Fs,
15762
15762
  getTrackChanges: zs,
15763
15763
  markDeletion: Sd,
15764
15764
  markInsertion: Cd,
15765
- markWrapping: lb,
15765
+ markWrapping: ab,
15766
15766
  parseFormatList: ds,
15767
15767
  removeMarkStep: Pd,
15768
- replaceAroundStep: cb,
15768
+ replaceAroundStep: lb,
15769
15769
  replaceStep: Ed,
15770
15770
  trackedTransaction: Rd
15771
- }, Symbol.toStringTag, { value: "Module" })), zw = "track-format", _u = Le.create({
15771
+ }, Symbol.toStringTag, { value: "Module" })), zw = "track-format", zu = Le.create({
15772
15772
  name: Se,
15773
15773
  group: "track",
15774
15774
  inclusive: !1,
@@ -16001,7 +16001,7 @@ const Fw = "track-insert", Bu = Le.create({
16001
16001
  };
16002
16002
  },
16003
16003
  addPmPlugins() {
16004
- return [Jy()];
16004
+ return [Xy()];
16005
16005
  }
16006
16006
  }), Dl = (t, e) => {
16007
16007
  const n = zs(t), r = n.findIndex(({ mark: l }) => l.attrs.id === e);
@@ -16039,9 +16039,9 @@ const Fw = "track-insert", Bu = Le.create({
16039
16039
  })];
16040
16040
  }
16041
16041
  });
16042
- var Te = "top", We = "bottom", Ue = "right", De = "left", js = "auto", Ir = [Te, We, Ue, De], Pn = "start", Cr = "end", $w = "clippingParents", Vu = "viewport", Jn = "popper", Hw = "reference", Nl = /* @__PURE__ */ Ir.reduce(function(t, e) {
16042
+ var Te = "top", We = "bottom", Ue = "right", De = "left", js = "auto", Ir = [Te, We, Ue, De], Pn = "start", Cr = "end", $w = "clippingParents", _u = "viewport", Jn = "popper", Hw = "reference", Nl = /* @__PURE__ */ Ir.reduce(function(t, e) {
16043
16043
  return t.concat([e + "-" + Pn, e + "-" + Cr]);
16044
- }, []), $u = /* @__PURE__ */ [].concat(Ir, [js]).reduce(function(t, e) {
16044
+ }, []), Vu = /* @__PURE__ */ [].concat(Ir, [js]).reduce(function(t, e) {
16045
16045
  return t.concat([e, e + "-" + Pn, e + "-" + Cr]);
16046
16046
  }, []), jw = "beforeRead", Ww = "read", Uw = "afterRead", qw = "beforeMain", Kw = "main", Xw = "afterMain", Jw = "beforeWrite", Yw = "write", Gw = "afterWrite", Zw = [jw, Ww, Uw, qw, Kw, Xw, Jw, Yw, Gw];
16047
16047
  function st(t) {
@@ -16104,7 +16104,7 @@ function ev(t) {
16104
16104
  });
16105
16105
  };
16106
16106
  }
16107
- const Hu = {
16107
+ const $u = {
16108
16108
  name: "applyStyles",
16109
16109
  enabled: !0,
16110
16110
  phase: "write",
@@ -16122,14 +16122,14 @@ function us() {
16122
16122
  return e.brand + "/" + e.version;
16123
16123
  }).join(" ") : navigator.userAgent;
16124
16124
  }
16125
- function ju() {
16125
+ function Hu() {
16126
16126
  return !/^((?!chrome|android).)*safari/i.test(us());
16127
16127
  }
16128
16128
  function Ln(t, e, n) {
16129
16129
  e === void 0 && (e = !1), n === void 0 && (n = !1);
16130
16130
  var r = t.getBoundingClientRect(), o = 1, i = 1;
16131
16131
  e && je(t) && (o = t.offsetWidth > 0 && Rn(r.width) / t.offsetWidth || 1, i = t.offsetHeight > 0 && Rn(r.height) / t.offsetHeight || 1);
16132
- var s = un(t) ? Re(t) : window, a = s.visualViewport, l = !ju() && n, c = (r.left + (l && a ? a.offsetLeft : 0)) / o, d = (r.top + (l && a ? a.offsetTop : 0)) / i, u = r.width / o, f = r.height / i;
16132
+ var s = un(t) ? Re(t) : window, a = s.visualViewport, l = !Hu() && n, c = (r.left + (l && a ? a.offsetLeft : 0)) / o, d = (r.top + (l && a ? a.offsetTop : 0)) / i, u = r.width / o, f = r.height / i;
16133
16133
  return {
16134
16134
  width: u,
16135
16135
  height: f,
@@ -16150,7 +16150,7 @@ function Us(t) {
16150
16150
  height: r
16151
16151
  };
16152
16152
  }
16153
- function Wu(t, e) {
16153
+ function ju(t, e) {
16154
16154
  var n = e.getRootNode && e.getRootNode();
16155
16155
  if (t.contains(e))
16156
16156
  return !0;
@@ -16223,7 +16223,7 @@ function rv(t, e, n) {
16223
16223
  var r = ir(t, e, n);
16224
16224
  return r > n ? n : r;
16225
16225
  }
16226
- function Uu() {
16226
+ function Wu() {
16227
16227
  return {
16228
16228
  top: 0,
16229
16229
  right: 0,
@@ -16231,10 +16231,10 @@ function Uu() {
16231
16231
  left: 0
16232
16232
  };
16233
16233
  }
16234
- function qu(t) {
16235
- return Object.assign({}, Uu(), t);
16234
+ function Uu(t) {
16235
+ return Object.assign({}, Wu(), t);
16236
16236
  }
16237
- function Ku(t, e) {
16237
+ function qu(t, e) {
16238
16238
  return e.reduce(function(n, r) {
16239
16239
  return n[r] = t, n;
16240
16240
  }, {});
@@ -16242,7 +16242,7 @@ function Ku(t, e) {
16242
16242
  var ov = function(e, n) {
16243
16243
  return e = typeof e == "function" ? e(Object.assign({}, n.rects, {
16244
16244
  placement: n.placement
16245
- })) : e, qu(typeof e != "number" ? e : Ku(e, Ir));
16245
+ })) : e, Uu(typeof e != "number" ? e : qu(e, Ir));
16246
16246
  };
16247
16247
  function iv(t) {
16248
16248
  var e, n = t.state, r = t.name, o = t.options, i = n.elements.arrow, s = n.modifiersData.popperOffsets, a = rt(n.placement), l = qs(a), c = [De, Ue].indexOf(a) >= 0, d = c ? "height" : "width";
@@ -16253,7 +16253,7 @@ function iv(t) {
16253
16253
  }
16254
16254
  function sv(t) {
16255
16255
  var e = t.state, n = t.options, r = n.element, o = r === void 0 ? "[data-popper-arrow]" : r;
16256
- o != null && (typeof o == "string" && (o = e.elements.popper.querySelector(o), !o) || Wu(e.elements.popper, o) && (e.elements.arrow = o));
16256
+ o != null && (typeof o == "string" && (o = e.elements.popper.querySelector(o), !o) || ju(e.elements.popper, o) && (e.elements.arrow = o));
16257
16257
  }
16258
16258
  const av = {
16259
16259
  name: "arrow",
@@ -16410,7 +16410,7 @@ function gv(t, e) {
16410
16410
  var n = Re(t), r = Wt(t), o = n.visualViewport, i = r.clientWidth, s = r.clientHeight, a = 0, l = 0;
16411
16411
  if (o) {
16412
16412
  i = o.width, s = o.height;
16413
- var c = ju();
16413
+ var c = Hu();
16414
16414
  (c || !c && e === "fixed") && (a = o.offsetLeft, l = o.offsetTop);
16415
16415
  }
16416
16416
  return {
@@ -16433,13 +16433,13 @@ function Js(t) {
16433
16433
  var e = Ct(t), n = e.overflow, r = e.overflowX, o = e.overflowY;
16434
16434
  return /auto|scroll|overlay|hidden/.test(n + o + r);
16435
16435
  }
16436
- function Xu(t) {
16437
- return ["html", "body", "#document"].indexOf(st(t)) >= 0 ? t.ownerDocument.body : je(t) && Js(t) ? t : Xu(_o(t));
16436
+ function Ku(t) {
16437
+ return ["html", "body", "#document"].indexOf(st(t)) >= 0 ? t.ownerDocument.body : je(t) && Js(t) ? t : Ku(_o(t));
16438
16438
  }
16439
16439
  function sr(t, e) {
16440
16440
  var n;
16441
16441
  e === void 0 && (e = []);
16442
- var r = Xu(t), o = r === ((n = t.ownerDocument) == null ? void 0 : n.body), i = Re(r), s = o ? [i].concat(i.visualViewport || [], Js(r) ? r : []) : r, a = e.concat(s);
16442
+ var r = Ku(t), o = r === ((n = t.ownerDocument) == null ? void 0 : n.body), i = Re(r), s = o ? [i].concat(i.visualViewport || [], Js(r) ? r : []) : r, a = e.concat(s);
16443
16443
  return o ? a : (
16444
16444
  // $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here
16445
16445
  a.concat(sr(_o(s)))
@@ -16458,12 +16458,12 @@ function bv(t, e) {
16458
16458
  return n.top = n.top + t.clientTop, n.left = n.left + t.clientLeft, n.bottom = n.top + t.clientHeight, n.right = n.left + t.clientWidth, n.width = t.clientWidth, n.height = t.clientHeight, n.x = n.left, n.y = n.top, n;
16459
16459
  }
16460
16460
  function Rl(t, e, n) {
16461
- return e === Vu ? fs(gv(t, n)) : un(e) ? bv(e, n) : fs(yv(Wt(t)));
16461
+ return e === _u ? fs(gv(t, n)) : un(e) ? bv(e, n) : fs(yv(Wt(t)));
16462
16462
  }
16463
16463
  function wv(t) {
16464
16464
  var e = sr(_o(t)), n = ["absolute", "fixed"].indexOf(Ct(t).position) >= 0, r = n && je(t) ? Pr(t) : t;
16465
16465
  return un(r) ? e.filter(function(o) {
16466
- return un(o) && Wu(o, r) && st(o) !== "body";
16466
+ return un(o) && ju(o, r) && st(o) !== "body";
16467
16467
  }) : [];
16468
16468
  }
16469
16469
  function vv(t, e, n, r) {
@@ -16473,7 +16473,7 @@ function vv(t, e, n, r) {
16473
16473
  }, Rl(t, s, r));
16474
16474
  return a.width = a.right - a.left, a.height = a.bottom - a.top, a.x = a.left, a.y = a.top, a;
16475
16475
  }
16476
- function Ju(t) {
16476
+ function Xu(t) {
16477
16477
  var e = t.reference, n = t.element, r = t.placement, o = r ? rt(r) : null, i = r ? Fn(r) : null, s = e.x + e.width / 2 - n.width / 2, a = e.y + e.height / 2 - n.height / 2, l;
16478
16478
  switch (o) {
16479
16479
  case Te:
@@ -16522,7 +16522,7 @@ function Ju(t) {
16522
16522
  }
16523
16523
  function Sr(t, e) {
16524
16524
  e === void 0 && (e = {});
16525
- var n = e, r = n.placement, o = r === void 0 ? t.placement : r, i = n.strategy, s = i === void 0 ? t.strategy : i, a = n.boundary, l = a === void 0 ? $w : a, c = n.rootBoundary, d = c === void 0 ? Vu : c, u = n.elementContext, f = u === void 0 ? Jn : u, p = n.altBoundary, h = p === void 0 ? !1 : p, m = n.padding, g = m === void 0 ? 0 : m, b = qu(typeof g != "number" ? g : Ku(g, Ir)), w = f === Jn ? Hw : Jn, C = t.rects.popper, y = t.elements[h ? w : f], S = vv(un(y) ? y : y.contextElement || Wt(t.elements.popper), l, d, s), k = Ln(t.elements.reference), A = Ju({
16525
+ var n = e, r = n.placement, o = r === void 0 ? t.placement : r, i = n.strategy, s = i === void 0 ? t.strategy : i, a = n.boundary, l = a === void 0 ? $w : a, c = n.rootBoundary, d = c === void 0 ? _u : c, u = n.elementContext, f = u === void 0 ? Jn : u, p = n.altBoundary, h = p === void 0 ? !1 : p, m = n.padding, g = m === void 0 ? 0 : m, b = Uu(typeof g != "number" ? g : qu(g, Ir)), w = f === Jn ? Hw : Jn, C = t.rects.popper, y = t.elements[h ? w : f], S = vv(un(y) ? y : y.contextElement || Wt(t.elements.popper), l, d, s), k = Ln(t.elements.reference), A = Xu({
16526
16526
  reference: k,
16527
16527
  element: C,
16528
16528
  placement: o
@@ -16543,7 +16543,7 @@ function Sr(t, e) {
16543
16543
  }
16544
16544
  function kv(t, e) {
16545
16545
  e === void 0 && (e = {});
16546
- var n = e, r = n.placement, o = n.boundary, i = n.rootBoundary, s = n.padding, a = n.flipVariations, l = n.allowedAutoPlacements, c = l === void 0 ? $u : l, d = Fn(r), u = d ? a ? Nl : Nl.filter(function(h) {
16546
+ var n = e, r = n.placement, o = n.boundary, i = n.rootBoundary, s = n.padding, a = n.flipVariations, l = n.allowedAutoPlacements, c = l === void 0 ? Vu : l, d = Fn(r), u = d ? a ? Nl : Nl.filter(function(h) {
16547
16547
  return Fn(h) === d;
16548
16548
  }) : Ir, f = u.filter(function(h) {
16549
16549
  return c.indexOf(h) >= 0;
@@ -16677,7 +16677,7 @@ function Ov(t, e, n) {
16677
16677
  };
16678
16678
  }
16679
16679
  function Tv(t) {
16680
- var e = t.state, n = t.options, r = t.name, o = n.offset, i = o === void 0 ? [0, 0] : o, s = $u.reduce(function(d, u) {
16680
+ var e = t.state, n = t.options, r = t.name, o = n.offset, i = o === void 0 ? [0, 0] : o, s = Vu.reduce(function(d, u) {
16681
16681
  return d[u] = Ov(u, e.rects, i), d;
16682
16682
  }, {}), a = s[e.placement], l = a.x, c = a.y;
16683
16683
  e.modifiersData.popperOffsets != null && (e.modifiersData.popperOffsets.x += l, e.modifiersData.popperOffsets.y += c), e.modifiersData[r] = s;
@@ -16691,7 +16691,7 @@ const Dv = {
16691
16691
  };
16692
16692
  function Nv(t) {
16693
16693
  var e = t.state, n = t.name;
16694
- e.modifiersData[n] = Ju({
16694
+ e.modifiersData[n] = Xu({
16695
16695
  reference: e.rects.reference,
16696
16696
  element: e.rects.popper,
16697
16697
  placement: e.placement
@@ -16730,7 +16730,7 @@ function Pv(t) {
16730
16730
  var j, se = y === "y" ? Te : De, ce = y === "y" ? We : Ue, ae = y === "y" ? "height" : "width", ee = k[y], ne = ee + g[se], ve = ee - g[ce], ke = p ? -L[ae] / 2 : 0, lt = w === Pn ? A[ae] : L[ae], Fe = w === Pn ? -L[ae] : -A[ae], ct = e.elements.arrow, qe = p && ct ? Us(ct) : {
16731
16731
  width: 0,
16732
16732
  height: 0
16733
- }, Ne = e.modifiersData["arrow#persistent"] ? e.modifiersData["arrow#persistent"].padding : Uu(), Ke = Ne[se], xt = Ne[ce], dt = ir(0, A[ae], qe[ae]), fn = C ? A[ae] / 2 - ke - dt - Ke - _.mainAxis : lt - dt - Ke - _.mainAxis, Mt = C ? -A[ae] / 2 + ke + dt + xt + _.mainAxis : Fe + dt + xt + _.mainAxis, pn = e.elements.arrow && Pr(e.elements.arrow), Lr = pn ? y === "y" ? pn.clientTop || 0 : pn.clientLeft || 0 : 0, Hn = (j = z?.[y]) != null ? j : 0, Fr = ee + fn - Hn - Lr, Br = ee + Mt - Hn, jn = ir(p ? Oo(ne, Fr) : ne, ee, p ? sn(ve, Br) : ve);
16733
+ }, Ne = e.modifiersData["arrow#persistent"] ? e.modifiersData["arrow#persistent"].padding : Wu(), Ke = Ne[se], xt = Ne[ce], dt = ir(0, A[ae], qe[ae]), fn = C ? A[ae] / 2 - ke - dt - Ke - _.mainAxis : lt - dt - Ke - _.mainAxis, Mt = C ? -A[ae] / 2 + ke + dt + xt + _.mainAxis : Fe + dt + xt + _.mainAxis, pn = e.elements.arrow && Pr(e.elements.arrow), Lr = pn ? y === "y" ? pn.clientTop || 0 : pn.clientLeft || 0 : 0, Hn = (j = z?.[y]) != null ? j : 0, Fr = ee + fn - Hn - Lr, Br = ee + Mt - Hn, jn = ir(p ? Oo(ne, Fr) : ne, ee, p ? sn(ve, Br) : ve);
16734
16734
  k[y] = jn, $[y] = jn - ee;
16735
16735
  }
16736
16736
  if (a) {
@@ -16937,12 +16937,12 @@ function jv(t) {
16937
16937
  return p;
16938
16938
  };
16939
16939
  }
16940
- var Wv = [pv, Ev, uv, Hu, Dv, xv, Rv, av, Av], Uv = /* @__PURE__ */ jv({
16940
+ var Wv = [pv, Ev, uv, $u, Dv, xv, Rv, av, Av], Uv = /* @__PURE__ */ jv({
16941
16941
  defaultModifiers: Wv
16942
- }), qv = "tippy-box", Yu = "tippy-content", Kv = "tippy-backdrop", Gu = "tippy-arrow", Zu = "tippy-svg-arrow", Yt = {
16942
+ }), qv = "tippy-box", Ju = "tippy-content", Kv = "tippy-backdrop", Yu = "tippy-arrow", Gu = "tippy-svg-arrow", Yt = {
16943
16943
  passive: !0,
16944
16944
  capture: !0
16945
- }, Qu = function() {
16945
+ }, Zu = function() {
16946
16946
  return document.body;
16947
16947
  };
16948
16948
  function Xv(t, e) {
@@ -16959,7 +16959,7 @@ function Ys(t, e) {
16959
16959
  var n = {}.toString.call(t);
16960
16960
  return n.indexOf("[object") === 0 && n.indexOf(e + "]") > -1;
16961
16961
  }
16962
- function ef(t, e) {
16962
+ function Qu(t, e) {
16963
16963
  return typeof t == "function" ? t.apply(void 0, e) : t;
16964
16964
  }
16965
16965
  function _l(t, e) {
@@ -17066,11 +17066,11 @@ var tt = {
17066
17066
  isTouch: !1
17067
17067
  }, Wl = 0;
17068
17068
  function ik() {
17069
- tt.isTouch || (tt.isTouch = !0, window.performance && document.addEventListener("mousemove", tf));
17069
+ tt.isTouch || (tt.isTouch = !0, window.performance && document.addEventListener("mousemove", ef));
17070
17070
  }
17071
- function tf() {
17071
+ function ef() {
17072
17072
  var t = performance.now();
17073
- t - Wl < 20 && (tt.isTouch = !1, document.removeEventListener("mousemove", tf)), Wl = t;
17073
+ t - Wl < 20 && (tt.isTouch = !1, document.removeEventListener("mousemove", ef)), Wl = t;
17074
17074
  }
17075
17075
  function sk() {
17076
17076
  var t = document.activeElement;
@@ -17103,7 +17103,7 @@ function dk(t) {
17103
17103
  %c👷‍ This is a development-only message. It will be removed in production.
17104
17104
  `);
17105
17105
  }
17106
- function nf(t) {
17106
+ function tf(t) {
17107
17107
  return [
17108
17108
  dk(t),
17109
17109
  // title
@@ -17122,20 +17122,20 @@ function uk() {
17122
17122
  function gt(t, e) {
17123
17123
  if (t && !Mr.has(e)) {
17124
17124
  var n;
17125
- Mr.add(e), (n = console).warn.apply(n, nf(e));
17125
+ Mr.add(e), (n = console).warn.apply(n, tf(e));
17126
17126
  }
17127
17127
  }
17128
17128
  function ps(t, e) {
17129
17129
  if (t && !Mr.has(e)) {
17130
17130
  var n;
17131
- Mr.add(e), (n = console).error.apply(n, nf(e));
17131
+ Mr.add(e), (n = console).error.apply(n, tf(e));
17132
17132
  }
17133
17133
  }
17134
17134
  function fk(t) {
17135
17135
  var e = !t, n = Object.prototype.toString.call(t) === "[object Object]" && !t.addEventListener;
17136
17136
  ps(e, ["tippy() was passed", "`" + String(t) + "`", "as its targets (first) argument. Valid types are: String, Element,", "Element[], or NodeList."].join(" ")), ps(n, ["tippy() was passed a plain object which is not supported as an argument", "for virtual positioning. Use props.getReferenceClientRect instead."].join(" "));
17137
17137
  }
17138
- var rf = {
17138
+ var nf = {
17139
17139
  animateFill: !1,
17140
17140
  followCursor: !1,
17141
17141
  inlinePositioning: !1,
@@ -17151,7 +17151,7 @@ var rf = {
17151
17151
  theme: "",
17152
17152
  zIndex: 9999
17153
17153
  }, Ie = Object.assign({
17154
- appendTo: Qu,
17154
+ appendTo: Zu,
17155
17155
  aria: {
17156
17156
  content: "auto",
17157
17157
  expanded: "auto"
@@ -17198,14 +17198,14 @@ var rf = {
17198
17198
  touch: !0,
17199
17199
  trigger: "mouseenter focus",
17200
17200
  triggerTarget: null
17201
- }, rf, pk), hk = Object.keys(Ie), mk = function(e) {
17202
- ie.env.NODE_ENV !== "production" && sf(e, []);
17201
+ }, nf, pk), hk = Object.keys(Ie), mk = function(e) {
17202
+ ie.env.NODE_ENV !== "production" && of(e, []);
17203
17203
  var n = Object.keys(e);
17204
17204
  n.forEach(function(r) {
17205
17205
  Ie[r] = e[r];
17206
17206
  });
17207
17207
  };
17208
- function of(t) {
17208
+ function rf(t) {
17209
17209
  var e = t.plugins || [], n = e.reduce(function(r, o) {
17210
17210
  var i = o.name, s = o.defaultValue;
17211
17211
  if (i) {
@@ -17217,7 +17217,7 @@ function of(t) {
17217
17217
  return Object.assign({}, t, n);
17218
17218
  }
17219
17219
  function gk(t, e) {
17220
- var n = e ? Object.keys(of(Object.assign({}, Ie, {
17220
+ var n = e ? Object.keys(rf(Object.assign({}, Ie, {
17221
17221
  plugins: e
17222
17222
  }))) : hk, r = n.reduce(function(o, i) {
17223
17223
  var s = (t.getAttribute("data-tippy-" + i) || "").trim();
@@ -17237,18 +17237,18 @@ function gk(t, e) {
17237
17237
  }
17238
17238
  function ql(t, e) {
17239
17239
  var n = Object.assign({}, e, {
17240
- content: ef(e.content, [t])
17240
+ content: Qu(e.content, [t])
17241
17241
  }, e.ignoreAttributes ? {} : gk(t, e.plugins));
17242
17242
  return n.aria = Object.assign({}, Ie.aria, n.aria), n.aria = {
17243
17243
  expanded: n.aria.expanded === "auto" ? e.interactive : n.aria.expanded,
17244
17244
  content: n.aria.content === "auto" ? e.interactive ? null : "describedby" : n.aria.content
17245
17245
  }, n;
17246
17246
  }
17247
- function sf(t, e) {
17247
+ function of(t, e) {
17248
17248
  t === void 0 && (t = {}), e === void 0 && (e = []);
17249
17249
  var n = Object.keys(t);
17250
17250
  n.forEach(function(r) {
17251
- var o = Jv(Ie, Object.keys(rf)), i = !Xv(o, r);
17251
+ var o = Jv(Ie, Object.keys(nf)), i = !Xv(o, r);
17252
17252
  i && (i = e.filter(function(s) {
17253
17253
  return s.name === r;
17254
17254
  }).length === 0), gt(i, ["`" + r + "`", "is not a valid prop. You may have spelled it incorrectly, or if it's", "a plugin, forgot to pass it in an array as props.plugins.", `
@@ -17265,7 +17265,7 @@ function hs(t, e) {
17265
17265
  }
17266
17266
  function Kl(t) {
17267
17267
  var e = ar();
17268
- return t === !0 ? e.className = Gu : (e.className = Zu, xr(t) ? e.appendChild(t) : hs(e, t)), e;
17268
+ return t === !0 ? e.className = Yu : (e.className = Gu, xr(t) ? e.appendChild(t) : hs(e, t)), e;
17269
17269
  }
17270
17270
  function Xl(t, e) {
17271
17271
  xr(e.content) ? (hs(t, ""), t.appendChild(e.content)) : typeof e.content != "function" && (e.allowHTML ? hs(t, e.content) : t.textContent = e.content);
@@ -17275,21 +17275,21 @@ function ms(t) {
17275
17275
  return {
17276
17276
  box: e,
17277
17277
  content: n.find(function(r) {
17278
- return r.classList.contains(Yu);
17278
+ return r.classList.contains(Ju);
17279
17279
  }),
17280
17280
  arrow: n.find(function(r) {
17281
- return r.classList.contains(Gu) || r.classList.contains(Zu);
17281
+ return r.classList.contains(Yu) || r.classList.contains(Gu);
17282
17282
  }),
17283
17283
  backdrop: n.find(function(r) {
17284
17284
  return r.classList.contains(Kv);
17285
17285
  })
17286
17286
  };
17287
17287
  }
17288
- function af(t) {
17288
+ function sf(t) {
17289
17289
  var e = ar(), n = ar();
17290
17290
  n.className = qv, n.setAttribute("data-state", "hidden"), n.setAttribute("tabindex", "-1");
17291
17291
  var r = ar();
17292
- r.className = Yu, r.setAttribute("data-state", "hidden"), Xl(r, t.props), e.appendChild(n), n.appendChild(r), o(t.props, t.props);
17292
+ r.className = Ju, r.setAttribute("data-state", "hidden"), Xl(r, t.props), e.appendChild(n), n.appendChild(r), o(t.props, t.props);
17293
17293
  function o(i, s) {
17294
17294
  var a = ms(e), l = a.box, c = a.content, d = a.arrow;
17295
17295
  s.theme ? l.setAttribute("data-theme", s.theme) : l.removeAttribute("data-theme"), typeof s.animation == "string" ? l.setAttribute("data-animation", s.animation) : l.removeAttribute("data-animation"), s.inertia ? l.setAttribute("data-inertia", "") : l.removeAttribute("data-inertia"), l.style.maxWidth = typeof s.maxWidth == "number" ? s.maxWidth + "px" : s.maxWidth, s.role ? l.setAttribute("role", s.role) : l.removeAttribute("role"), (i.content !== s.content || i.allowHTML !== s.allowHTML) && Xl(c, t.props), s.arrow ? d ? i.arrow !== s.arrow && (l.removeChild(d), l.appendChild(Kl(s.arrow))) : l.appendChild(Kl(s.arrow)) : d && l.removeChild(d);
@@ -17299,10 +17299,10 @@ function af(t) {
17299
17299
  onUpdate: o
17300
17300
  };
17301
17301
  }
17302
- af.$$tippy = !0;
17302
+ sf.$$tippy = !0;
17303
17303
  var bk = 1, eo = [], hi = [];
17304
17304
  function wk(t, e) {
17305
- var n = ql(t, Object.assign({}, Ie, of($l(e)))), r, o, i, s = !1, a = !1, l = !1, c = !1, d, u, f, p = [], h = _l(Fr, n.interactiveDebounce), m, g = bk++, b = null, w = Gv(n.plugins), C = {
17305
+ var n = ql(t, Object.assign({}, Ie, rf($l(e)))), r, o, i, s = !1, a = !1, l = !1, c = !1, d, u, f, p = [], h = _l(Fr, n.interactiveDebounce), m, g = bk++, b = null, w = Gv(n.plugins), C = {
17306
17306
  // Is the instance currently enabled?
17307
17307
  isEnabled: !0,
17308
17308
  // Is the tippy currently showing and not transitioning out?
@@ -17326,13 +17326,13 @@ function wk(t, e) {
17326
17326
  clearDelayTimeouts: $r,
17327
17327
  setProps: Hr,
17328
17328
  setContent: jr,
17329
- show: lf,
17330
- hide: cf,
17331
- hideWithInteractivity: df,
17329
+ show: af,
17330
+ hide: lf,
17331
+ hideWithInteractivity: cf,
17332
17332
  enable: qn,
17333
17333
  disable: Vr,
17334
- unmount: uf,
17335
- destroy: ff
17334
+ unmount: df,
17335
+ destroy: uf
17336
17336
  };
17337
17337
  if (!n.render)
17338
17338
  return ie.env.NODE_ENV !== "production" && ps(!0, "render() function has not been supplied."), y;
@@ -17547,7 +17547,7 @@ function wk(t, e) {
17547
17547
  fn: function(Wr) {
17548
17548
  var mn = Wr.state;
17549
17549
  if ($()) {
17550
- var pf = ce(), $o = pf.box;
17550
+ var ff = ce(), $o = ff.box;
17551
17551
  ["placement", "reference-hidden", "escaped"].forEach(function(Ur) {
17552
17552
  Ur === "placement" ? $o.setAttribute("data-placement", mn.placement) : mn.attributes.popper["data-popper-" + Ur] ? $o.setAttribute("data-" + Ur, "") : $o.removeAttribute("data-" + Ur);
17553
17553
  }), mn.attributes.popper = {};
@@ -17596,7 +17596,7 @@ function wk(t, e) {
17596
17596
  }
17597
17597
  function ut() {
17598
17598
  var v = y.props.appendTo, O, R = j();
17599
- y.props.interactive && v === Qu || v === "parent" ? O = R.parentNode : O = ef(v, [R]), O.contains(k) || O.appendChild(k), y.state.isMounted = !0, zr(), ie.env.NODE_ENV !== "production" && gt(y.props.interactive && v === Ie.appendTo && R.nextElementSibling !== k, ["Interactive tippy element may not be accessible via keyboard", "navigation because it is not directly after the reference element", "in the DOM source order.", `
17599
+ y.props.interactive && v === Zu || v === "parent" ? O = R.parentNode : O = Qu(v, [R]), O.contains(k) || O.appendChild(k), y.state.isMounted = !0, zr(), ie.env.NODE_ENV !== "production" && gt(y.props.interactive && v === Ie.appendTo && R.nextElementSibling !== k, ["Interactive tippy element may not be accessible via keyboard", "navigation because it is not directly after the reference element", "in the DOM source order.", `
17600
17600
 
17601
17601
  `, "Using a wrapper <div> or <span> tag around the reference element", "solves this by creating a new parentNode context.", `
17602
17602
 
@@ -17655,7 +17655,7 @@ function wk(t, e) {
17655
17655
  content: v
17656
17656
  });
17657
17657
  }
17658
- function lf() {
17658
+ function af() {
17659
17659
  ie.env.NODE_ENV !== "production" && gt(y.state.isDestroyed, vn("show"));
17660
17660
  var v = y.state.isVisible, O = y.state.isDestroyed, R = !y.state.isEnabled, q = tt.isTouch && !y.props.touch, U = ui(y.props.duration, 0, Ie.duration);
17661
17661
  if (!(v || O || R || q) && !j().hasAttribute("disabled") && (ne("onShow", [y], !1), y.props.onShow(y) !== !1)) {
@@ -17677,7 +17677,7 @@ function wk(t, e) {
17677
17677
  }, ut();
17678
17678
  }
17679
17679
  }
17680
- function cf() {
17680
+ function lf() {
17681
17681
  ie.env.NODE_ENV !== "production" && gt(y.state.isDestroyed, vn("hide"));
17682
17682
  var v = !y.state.isVisible, O = y.state.isDestroyed, R = !y.state.isEnabled, q = ui(y.props.duration, 1, Ie.duration);
17683
17683
  if (!(v || O || R) && (ne("onHide", [y], !1), y.props.onHide(y) !== !1)) {
@@ -17688,24 +17688,24 @@ function wk(t, e) {
17688
17688
  ve(), ke(), y.props.animation ? $() && xt(q, y.unmount) : y.unmount();
17689
17689
  }
17690
17690
  }
17691
- function df(v) {
17691
+ function cf(v) {
17692
17692
  ie.env.NODE_ENV !== "production" && gt(y.state.isDestroyed, vn("hideWithInteractivity")), se().addEventListener("mousemove", h), Vl(eo, h), h(v);
17693
17693
  }
17694
- function uf() {
17694
+ function df() {
17695
17695
  ie.env.NODE_ENV !== "production" && gt(y.state.isDestroyed, vn("unmount")), y.state.isVisible && y.hide(), y.state.isMounted && (_r(), At().forEach(function(v) {
17696
17696
  v._tippy.unmount();
17697
17697
  }), k.parentNode && k.parentNode.removeChild(k), hi = hi.filter(function(v) {
17698
17698
  return v !== y;
17699
17699
  }), y.state.isMounted = !1, ne("onHidden", [y]));
17700
17700
  }
17701
- function ff() {
17701
+ function uf() {
17702
17702
  ie.env.NODE_ENV !== "production" && gt(y.state.isDestroyed, vn("destroy")), !y.state.isDestroyed && (y.clearDelayTimeouts(), y.unmount(), Lr(), delete t._tippy, y.state.isDestroyed = !0, ne("onDestroy", [y]));
17703
17703
  }
17704
17704
  }
17705
17705
  function Rr(t, e) {
17706
17706
  e === void 0 && (e = {});
17707
17707
  var n = Ie.plugins.concat(e.plugins || []);
17708
- ie.env.NODE_ENV !== "production" && (fk(t), sf(e, n)), ak();
17708
+ ie.env.NODE_ENV !== "production" && (fk(t), of(e, n)), ak();
17709
17709
  var r = Object.assign({}, e, {
17710
17710
  plugins: n
17711
17711
  }), o = nk(t);
@@ -17727,7 +17727,7 @@ function Rr(t, e) {
17727
17727
  Rr.defaultProps = Ie;
17728
17728
  Rr.setDefaultProps = mk;
17729
17729
  Rr.currentInput = tt;
17730
- Object.assign({}, Hu, {
17730
+ Object.assign({}, $u, {
17731
17731
  effect: function(e) {
17732
17732
  var n = e.state, r = {
17733
17733
  popper: {
@@ -17745,7 +17745,7 @@ Object.assign({}, Hu, {
17745
17745
  }
17746
17746
  });
17747
17747
  Rr.setDefaultProps({
17748
- render: af
17748
+ render: sf
17749
17749
  });
17750
17750
  const vk = (t, e) => {
17751
17751
  const n = t.__vccOpts || t;
@@ -17769,7 +17769,7 @@ const vk = (t, e) => {
17769
17769
  }
17770
17770
  },
17771
17771
  setup(t) {
17772
- const e = t, n = ra(null), r = ra(null), o = If(() => {
17772
+ const e = t, n = ra(null), r = ra(null), o = Ef(() => {
17773
17773
  const l = e.mention.slice(1)?.toLowerCase();
17774
17774
  return e.users.filter((d) => {
17775
17775
  const u = d.role === "viewer", f = d.name?.toLowerCase().startsWith(l), p = d.email?.toLowerCase().startsWith(l);
@@ -17797,18 +17797,18 @@ const vk = (t, e) => {
17797
17797
  onFocus: Ko(a, ["stop", "prevent"]),
17798
17798
  tabindex: "0"
17799
17799
  }, [
17800
- (Xt(!0), Kt(Pf, null, Rf(o.value, (d, u) => (Xt(), Kt("div", {
17800
+ (Xt(!0), Kt(If, null, Pf(o.value, (d, u) => (Xt(), Kt("div", {
17801
17801
  onClick: Ko((f) => i(d), ["stop", "prevent"]),
17802
17802
  onMouseenter: (f) => r.value = u,
17803
17803
  onMouseleave: c[0] || (c[0] = (f) => r.value = null),
17804
17804
  key: d.email,
17805
- class: Lf(["user-row", { selected: r.value === u }])
17805
+ class: Rf(["user-row", { selected: r.value === u }])
17806
17806
  }, [
17807
17807
  d.name ? (Xt(), Kt("div", Ck, [
17808
17808
  d.name ? (Xt(), Kt("span", Sk, Xo(d.name), 1)) : oa("", !0),
17809
17809
  d.name && d.email ? (Xt(), Kt("span", xk, " (" + Xo(d.email) + ")", 1)) : oa("", !0)
17810
17810
  ])) : (Xt(), Kt("div", Mk, [
17811
- Ff("span", null, Xo(d.email), 1)
17811
+ Lf("span", null, Xo(d.email), 1)
17812
17812
  ]))
17813
17813
  ], 42, kk))), 128))
17814
17814
  ], 544));
@@ -17867,7 +17867,7 @@ class Dk {
17867
17867
  this.view.dom.removeEventListener("keydown", this.handleKeyDown);
17868
17868
  }
17869
17869
  mountVueComponent(e, n = {}) {
17870
- this.app && this.app.unmount(), this.app = Bf(e, n), this.app.mount(this.popover), this.tippyInstance.setContent(this.popover);
17870
+ this.app && this.app.unmount(), this.app = Ff(e, n), this.app.mount(this.popover), this.tippyInstance.setContent(this.popover);
17871
17871
  }
17872
17872
  update(e, n) {
17873
17873
  this.state = e.state;
@@ -18019,7 +18019,7 @@ const Nk = !1, Ek = Q.create({
18019
18019
  if (!e.converter) return F.empty;
18020
18020
  const r = e.converter.pageStyles?.pageSize, { width: o, height: i } = r;
18021
18021
  if (!o || !i) return F.empty;
18022
- const s = [Cb, on], { state: a } = t, l = no.create({
18022
+ const s = [kb, on], { state: a } = t, l = no.create({
18023
18023
  schema: a.schema,
18024
18024
  doc: a.doc,
18025
18025
  plugins: a.plugins.filter((h) => s.includes(h.key))
@@ -18141,93 +18141,92 @@ const Gl = (t) => {
18141
18141
  e.setMeta("forceUpdatePagination", !0), t.view.dispatch(e);
18142
18142
  });
18143
18143
  }, Fk = () => [
18144
- Eu,
18144
+ Nu,
18145
18145
  Qd,
18146
18146
  jd,
18147
18147
  Gd,
18148
18148
  Wd,
18149
18149
  Ud,
18150
- Jf,
18150
+ Xf,
18151
18151
  su,
18152
- Iu,
18152
+ Eu,
18153
18153
  ou,
18154
18154
  Xd,
18155
- Fu,
18155
+ Lu,
18156
18156
  tu,
18157
18157
  iu,
18158
18158
  au,
18159
- lu,
18160
- Lu,
18159
+ Ru,
18161
18160
  Zd,
18162
18161
  qd,
18163
18162
  Kd,
18164
- Nu,
18165
- Pu,
18163
+ Du,
18164
+ Iu,
18166
18165
  Vw,
18167
18166
  Tk,
18168
- Du,
18169
- Ru,
18167
+ Tu,
18168
+ Pu,
18170
18169
  Jd,
18171
- vu,
18172
- Cu,
18173
- Su,
18170
+ wu,
18174
18171
  ku,
18175
- Ou,
18172
+ Cu,
18173
+ vu,
18174
+ Au,
18176
18175
  Yd,
18176
+ Fu,
18177
18177
  Bu,
18178
18178
  zu,
18179
- _u,
18180
- Tu
18179
+ Ou
18181
18180
  ], Bk = () => [
18182
- Eu,
18181
+ Nu,
18183
18182
  Qd,
18184
18183
  jd,
18184
+ t0,
18185
18185
  n0,
18186
18186
  r0,
18187
- o0,
18188
18187
  Gd,
18189
18188
  Wd,
18190
18189
  Ud,
18191
18190
  // History,
18192
18191
  su,
18193
- Iu,
18192
+ Eu,
18194
18193
  ou,
18195
18194
  Xd,
18196
- Fu,
18195
+ Lu,
18197
18196
  tu,
18198
18197
  iu,
18198
+ l0,
18199
18199
  au,
18200
- lu,
18201
- Nb,
18202
- Lu,
18203
- s0,
18200
+ Db,
18201
+ Ru,
18202
+ i0,
18204
18203
  Zd,
18205
18204
  qd,
18206
18205
  Kd,
18207
- Nu,
18208
- Pu,
18206
+ Du,
18207
+ Iu,
18209
18208
  Jd,
18210
- nb,
18211
- kb,
18212
- vu,
18213
- Cu,
18214
- Su,
18209
+ tb,
18210
+ vb,
18211
+ wu,
18215
18212
  ku,
18216
- Ou,
18213
+ Cu,
18214
+ vu,
18215
+ Au,
18217
18216
  Yd,
18218
- Tu,
18217
+ Ou,
18219
18218
  Iw,
18220
- Du,
18221
- Sb,
18222
- Tb,
18219
+ Tu,
18220
+ Cb,
18221
+ Ob,
18223
18222
  _w,
18223
+ Fu,
18224
18224
  Bu,
18225
18225
  zu,
18226
- _u,
18227
- i0,
18226
+ o0,
18228
18227
  Ek,
18229
- Ru,
18230
- Jb,
18228
+ Pu,
18229
+ Xb,
18231
18230
  Pw,
18232
18231
  Rw
18233
18232
  ];
@@ -18236,14 +18235,15 @@ export {
18236
18235
  he as C,
18237
18236
  ji as E,
18238
18237
  Ao as I,
18238
+ Le as M,
18239
18239
  J as N,
18240
18240
  Vw as P,
18241
18241
  de as T,
18242
18242
  vk as _,
18243
18243
  qk as a,
18244
- Gb as b,
18244
+ Yb as b,
18245
18245
  He as c,
18246
- zf as d,
18246
+ Bf as d,
18247
18247
  Bk as e,
18248
18248
  Jk as f,
18249
18249
  Go as g,