@harbour-enterprises/superdoc 0.11.48 → 0.11.50

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (33) hide show
  1. package/dist/chunks/{super-editor.es-URZC9eM6.es.js → super-editor.es-CITIL9eV.es.js} +4078 -4028
  2. package/dist/chunks/{super-editor.es-QPtPXoJ-.cjs → super-editor.es-CudgUBHs.cjs} +54 -54
  3. package/dist/super-editor/ai-writer.es.js +2 -2
  4. package/dist/super-editor/chunks/{converter-CmRoa_i9.js → converter-BiL-klqi.js} +695 -660
  5. package/dist/super-editor/chunks/{docx-zipper-Bl-uAN1u.js → docx-zipper-7JabcOwU.js} +749 -763
  6. package/dist/super-editor/chunks/{editor-BpfdiU4_.js → editor-mLcbG4xA.js} +338 -308
  7. package/dist/super-editor/chunks/{toolbar-7GhL4qam.js → toolbar-DeKcvBhf.js} +2 -2
  8. package/dist/super-editor/converter.es.js +1 -1
  9. package/dist/super-editor/core/DocxZipper.d.ts.map +1 -1
  10. package/dist/super-editor/core/super-converter/exporter.d.ts.map +1 -1
  11. package/dist/super-editor/core/super-converter/v2/importer/docxImporter.d.ts.map +1 -1
  12. package/dist/super-editor/core/super-converter/v2/importer/structuredDocumentNodeImporter.d.ts +9 -0
  13. package/dist/super-editor/core/super-converter/v2/importer/structuredDocumentNodeImporter.d.ts.map +1 -0
  14. package/dist/super-editor/docx-zipper.es.js +2 -2
  15. package/dist/super-editor/editor.es.js +3 -3
  16. package/dist/super-editor/extensions/index.d.ts +2 -1
  17. package/dist/super-editor/extensions/index.d.ts.map +1 -1
  18. package/dist/super-editor/extensions/structured-content/index.d.ts +2 -0
  19. package/dist/super-editor/extensions/structured-content/index.d.ts.map +1 -0
  20. package/dist/super-editor/extensions/structured-content/structured-content.d.ts +2 -0
  21. package/dist/super-editor/extensions/structured-content/structured-content.d.ts.map +1 -0
  22. package/dist/super-editor/file-zipper.es.js +1 -1
  23. package/dist/super-editor/super-editor.es.js +6 -6
  24. package/dist/super-editor/tests/import/sdt-nodes/structuredDocumentNodeTests.test.d.ts +2 -0
  25. package/dist/super-editor/tests/import/sdt-nodes/structuredDocumentNodeTests.test.d.ts.map +1 -0
  26. package/dist/super-editor/toolbar.es.js +2 -2
  27. package/dist/super-editor.cjs +1 -1
  28. package/dist/super-editor.es.js +1 -1
  29. package/dist/superdoc.cjs +4 -4
  30. package/dist/superdoc.es.js +3 -3
  31. package/dist/superdoc.umd.js +2454 -2404
  32. package/dist/superdoc.umd.js.map +1 -1
  33. package/package.json +1 -1
@@ -1,17 +1,17 @@
1
- var Iu = Object.defineProperty;
1
+ var Ru = Object.defineProperty;
2
2
  var _i = (r) => {
3
3
  throw TypeError(r);
4
4
  };
5
- var Ru = (r, e, t) => e in r ? Iu(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t;
6
- var Mt = (r, e, t) => Ru(r, typeof e != "symbol" ? e + "" : e, t), Pu = (r, e, t) => e.has(r) || _i("Cannot " + t);
5
+ var Pu = (r, e, t) => e in r ? Ru(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t;
6
+ var Mt = (r, e, t) => Pu(r, typeof e != "symbol" ? e + "" : e, t), Ou = (r, e, t) => e.has(r) || _i("Cannot " + t);
7
7
  var Ir = (r, e, t) => e.has(r) ? _i("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(r) : e.set(r, t);
8
- var Ke = (r, e, t) => (Pu(r, e, "access private method"), t);
8
+ var Ke = (r, e, t) => (Ou(r, e, "access private method"), t);
9
9
  import "vue";
10
10
  var Je = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
11
11
  function qo(r) {
12
12
  return r && r.__esModule && Object.prototype.hasOwnProperty.call(r, "default") ? r.default : r;
13
13
  }
14
- function Ou(r) {
14
+ function Lu(r) {
15
15
  if (r.__esModule) return r;
16
16
  var e = r.default;
17
17
  if (typeof e == "function") {
@@ -31,11 +31,11 @@ function Ou(r) {
31
31
  }), t;
32
32
  }
33
33
  var Fe = {}, Dr = {};
34
- Dr.byteLength = qu;
35
- Dr.toByteArray = Uu;
36
- Dr.fromByteArray = Vu;
37
- var Qe = [], ze = [], Lu = typeof Uint8Array < "u" ? Uint8Array : Array, Rr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
38
- for (var Dt = 0, _u = Rr.length; Dt < _u; ++Dt)
34
+ Dr.byteLength = Mu;
35
+ Dr.toByteArray = ju;
36
+ Dr.fromByteArray = zu;
37
+ var Qe = [], ze = [], _u = typeof Uint8Array < "u" ? Uint8Array : Array, Rr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
38
+ for (var Dt = 0, qu = Rr.length; Dt < qu; ++Dt)
39
39
  Qe[Dt] = Rr[Dt], ze[Rr.charCodeAt(Dt)] = Dt;
40
40
  ze[45] = 62;
41
41
  ze[95] = 63;
@@ -48,30 +48,30 @@ function Mo(r) {
48
48
  var n = t === e ? 0 : 4 - t % 4;
49
49
  return [t, n];
50
50
  }
51
- function qu(r) {
51
+ function Mu(r) {
52
52
  var e = Mo(r), t = e[0], n = e[1];
53
53
  return (t + n) * 3 / 4 - n;
54
54
  }
55
- function Mu(r, e, t) {
55
+ function Uu(r, e, t) {
56
56
  return (e + t) * 3 / 4 - t;
57
57
  }
58
- function Uu(r) {
59
- var e, t = Mo(r), n = t[0], i = t[1], s = new Lu(Mu(r, n, i)), o = 0, a = i > 0 ? n - 4 : n, u;
58
+ function ju(r) {
59
+ var e, t = Mo(r), n = t[0], i = t[1], s = new _u(Uu(r, n, i)), o = 0, a = i > 0 ? n - 4 : n, u;
60
60
  for (u = 0; u < a; u += 4)
61
61
  e = ze[r.charCodeAt(u)] << 18 | ze[r.charCodeAt(u + 1)] << 12 | ze[r.charCodeAt(u + 2)] << 6 | ze[r.charCodeAt(u + 3)], s[o++] = e >> 16 & 255, s[o++] = e >> 8 & 255, s[o++] = e & 255;
62
62
  return i === 2 && (e = ze[r.charCodeAt(u)] << 2 | ze[r.charCodeAt(u + 1)] >> 4, s[o++] = e & 255), i === 1 && (e = ze[r.charCodeAt(u)] << 10 | ze[r.charCodeAt(u + 1)] << 4 | ze[r.charCodeAt(u + 2)] >> 2, s[o++] = e >> 8 & 255, s[o++] = e & 255), s;
63
63
  }
64
- function ju(r) {
64
+ function Hu(r) {
65
65
  return Qe[r >> 18 & 63] + Qe[r >> 12 & 63] + Qe[r >> 6 & 63] + Qe[r & 63];
66
66
  }
67
- function Hu(r, e, t) {
67
+ function Vu(r, e, t) {
68
68
  for (var n, i = [], s = e; s < t; s += 3)
69
- n = (r[s] << 16 & 16711680) + (r[s + 1] << 8 & 65280) + (r[s + 2] & 255), i.push(ju(n));
69
+ n = (r[s] << 16 & 16711680) + (r[s + 1] << 8 & 65280) + (r[s + 2] & 255), i.push(Hu(n));
70
70
  return i.join("");
71
71
  }
72
- function Vu(r) {
72
+ function zu(r) {
73
73
  for (var e, t = r.length, n = t % 3, i = [], s = 16383, o = 0, a = t - n; o < a; o += s)
74
- i.push(Hu(r, o, o + s > a ? a : o + s));
74
+ i.push(Vu(r, o, o + s > a ? a : o + s));
75
75
  return n === 1 ? (e = r[t - 1], i.push(
76
76
  Qe[e >> 2] + Qe[e << 4 & 63] + "=="
77
77
  )) : n === 2 && (e = (r[t - 2] << 8) + r[t - 1], i.push(
@@ -620,7 +620,7 @@ bi.write = function(r, e, t, n, i, s) {
620
620
  (!f || f < 0) && (f = 0), (!d || d < 0 || d > T) && (d = T);
621
621
  let O = "";
622
622
  for (let H = f; H < d; ++H)
623
- O += lt[y[H]];
623
+ O += ct[y[H]];
624
624
  return O;
625
625
  }
626
626
  function V(y, f, d) {
@@ -1033,7 +1033,7 @@ bi.write = function(r, e, t, n, i, s) {
1033
1033
  function st(y) {
1034
1034
  return y !== y;
1035
1035
  }
1036
- const lt = function() {
1036
+ const ct = function() {
1037
1037
  const y = "0123456789abcdef", f = new Array(256);
1038
1038
  for (let d = 0; d < 16; ++d) {
1039
1039
  const T = d * 16;
@@ -1043,32 +1043,32 @@ bi.write = function(r, e, t, n, i, s) {
1043
1043
  return f;
1044
1044
  }();
1045
1045
  function Le(y) {
1046
- return typeof BigInt > "u" ? Nu : y;
1046
+ return typeof BigInt > "u" ? Iu : y;
1047
1047
  }
1048
- function Nu() {
1048
+ function Iu() {
1049
1049
  throw new Error("BigInt not supported");
1050
1050
  }
1051
1051
  })(Fe);
1052
- const St = Fe.Buffer, zu = Fe.Blob, Gu = Fe.BlobOptions, Wu = Fe.Buffer, Ju = Fe.File, $u = Fe.FileOptions, Ku = Fe.INSPECT_MAX_BYTES, Xu = Fe.SlowBuffer, Yu = Fe.TranscodeEncoding, Zu = Fe.atob, Qu = Fe.btoa, el = Fe.constants, tl = Fe.isAscii, rl = Fe.isUtf8, nl = Fe.kMaxLength, il = Fe.kStringMaxLength, sl = Fe.resolveObjectURL, ol = Fe.transcode, al = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1052
+ const St = Fe.Buffer, Gu = Fe.Blob, Wu = Fe.BlobOptions, Ju = Fe.Buffer, $u = Fe.File, Ku = Fe.FileOptions, Xu = Fe.INSPECT_MAX_BYTES, Yu = Fe.SlowBuffer, Zu = Fe.TranscodeEncoding, Qu = Fe.atob, el = Fe.btoa, tl = Fe.constants, rl = Fe.isAscii, nl = Fe.isUtf8, il = Fe.kMaxLength, sl = Fe.kStringMaxLength, ol = Fe.resolveObjectURL, al = Fe.transcode, ul = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1053
1053
  __proto__: null,
1054
- Blob: zu,
1055
- BlobOptions: Gu,
1056
- Buffer: Wu,
1057
- File: Ju,
1058
- FileOptions: $u,
1059
- INSPECT_MAX_BYTES: Ku,
1060
- SlowBuffer: Xu,
1061
- TranscodeEncoding: Yu,
1062
- atob: Zu,
1063
- btoa: Qu,
1064
- constants: el,
1054
+ Blob: Gu,
1055
+ BlobOptions: Wu,
1056
+ Buffer: Ju,
1057
+ File: $u,
1058
+ FileOptions: Ku,
1059
+ INSPECT_MAX_BYTES: Xu,
1060
+ SlowBuffer: Yu,
1061
+ TranscodeEncoding: Zu,
1062
+ atob: Qu,
1063
+ btoa: el,
1064
+ constants: tl,
1065
1065
  default: St,
1066
- isAscii: tl,
1067
- isUtf8: rl,
1068
- kMaxLength: nl,
1069
- kStringMaxLength: il,
1070
- resolveObjectURL: sl,
1071
- transcode: ol
1066
+ isAscii: rl,
1067
+ isUtf8: nl,
1068
+ kMaxLength: il,
1069
+ kStringMaxLength: sl,
1070
+ resolveObjectURL: ol,
1071
+ transcode: al
1072
1072
  }, Symbol.toStringTag, { value: "Module" }));
1073
1073
  var Uo = {}, Qt = { exports: {} }, qi;
1074
1074
  function xi() {
@@ -1302,7 +1302,7 @@ function At() {
1302
1302
  }
1303
1303
  }), er.exports;
1304
1304
  }
1305
- function ul(r) {
1305
+ function ll(r) {
1306
1306
  return r && r.__esModule && Object.prototype.hasOwnProperty.call(r, "default") ? r.default : r;
1307
1307
  }
1308
1308
  var jo = { exports: {} }, ve = jo.exports = {}, Xe, Ye;
@@ -1339,7 +1339,7 @@ function Ho(r) {
1339
1339
  }
1340
1340
  }
1341
1341
  }
1342
- function ll(r) {
1342
+ function cl(r) {
1343
1343
  if (Ye === clearTimeout)
1344
1344
  return clearTimeout(r);
1345
1345
  if ((Ye === ui || !Ye) && clearTimeout)
@@ -1355,19 +1355,19 @@ function ll(r) {
1355
1355
  }
1356
1356
  }
1357
1357
  var ot = [], Tt = !1, ht, ar = -1;
1358
- function cl() {
1358
+ function fl() {
1359
1359
  !Tt || !ht || (Tt = !1, ht.length ? ot = ht.concat(ot) : ar = -1, ot.length && Vo());
1360
1360
  }
1361
1361
  function Vo() {
1362
1362
  if (!Tt) {
1363
- var r = Ho(cl);
1363
+ var r = Ho(fl);
1364
1364
  Tt = !0;
1365
1365
  for (var e = ot.length; e; ) {
1366
1366
  for (ht = ot, ot = []; ++ar < e; )
1367
1367
  ht && ht[ar].run();
1368
1368
  ar = -1, e = ot.length;
1369
1369
  }
1370
- ht = null, Tt = !1, ll(r);
1370
+ ht = null, Tt = !1, cl(r);
1371
1371
  }
1372
1372
  }
1373
1373
  ve.nextTick = function(r) {
@@ -1415,13 +1415,13 @@ ve.chdir = function(r) {
1415
1415
  ve.umask = function() {
1416
1416
  return 0;
1417
1417
  };
1418
- var fl = jo.exports;
1419
- const ge = /* @__PURE__ */ ul(fl);
1418
+ var dl = jo.exports;
1419
+ const ge = /* @__PURE__ */ ll(dl);
1420
1420
  var Pr, Ui;
1421
1421
  function Go() {
1422
1422
  return Ui || (Ui = 1, Pr = xi().EventEmitter), Pr;
1423
1423
  }
1424
- const vr = /* @__PURE__ */ Ou(al);
1424
+ const vr = /* @__PURE__ */ Lu(ul);
1425
1425
  var Or = {}, Lr = {}, _r, ji;
1426
1426
  function Wo() {
1427
1427
  return ji || (ji = 1, _r = function() {
@@ -1466,19 +1466,19 @@ function Jo() {
1466
1466
  return Vi || (Vi = 1, Mr = Object), Mr;
1467
1467
  }
1468
1468
  var Ur, zi;
1469
- function dl() {
1469
+ function ml() {
1470
1470
  return zi || (zi = 1, Ur = Error), Ur;
1471
1471
  }
1472
1472
  var jr, Gi;
1473
- function ml() {
1473
+ function pl() {
1474
1474
  return Gi || (Gi = 1, jr = EvalError), jr;
1475
1475
  }
1476
1476
  var Hr, Wi;
1477
- function pl() {
1477
+ function hl() {
1478
1478
  return Wi || (Wi = 1, Hr = RangeError), Hr;
1479
1479
  }
1480
1480
  var Vr, Ji;
1481
- function hl() {
1481
+ function gl() {
1482
1482
  return Ji || (Ji = 1, Vr = ReferenceError), Vr;
1483
1483
  }
1484
1484
  var zr, $i;
@@ -1490,57 +1490,57 @@ function $t() {
1490
1490
  return Ki || (Ki = 1, Gr = TypeError), Gr;
1491
1491
  }
1492
1492
  var Wr, Xi;
1493
- function gl() {
1493
+ function wl() {
1494
1494
  return Xi || (Xi = 1, Wr = URIError), Wr;
1495
1495
  }
1496
1496
  var Jr, Yi;
1497
- function wl() {
1497
+ function yl() {
1498
1498
  return Yi || (Yi = 1, Jr = Math.abs), Jr;
1499
1499
  }
1500
1500
  var $r, Zi;
1501
- function yl() {
1501
+ function bl() {
1502
1502
  return Zi || (Zi = 1, $r = Math.floor), $r;
1503
1503
  }
1504
1504
  var Kr, Qi;
1505
- function bl() {
1505
+ function xl() {
1506
1506
  return Qi || (Qi = 1, Kr = Math.max), Kr;
1507
1507
  }
1508
1508
  var Xr, es;
1509
- function xl() {
1509
+ function Al() {
1510
1510
  return es || (es = 1, Xr = Math.min), Xr;
1511
1511
  }
1512
1512
  var Yr, ts;
1513
- function Al() {
1513
+ function Dl() {
1514
1514
  return ts || (ts = 1, Yr = Math.pow), Yr;
1515
1515
  }
1516
1516
  var Zr, rs;
1517
- function Dl() {
1517
+ function vl() {
1518
1518
  return rs || (rs = 1, Zr = Math.round), Zr;
1519
1519
  }
1520
1520
  var Qr, ns;
1521
- function vl() {
1521
+ function El() {
1522
1522
  return ns || (ns = 1, Qr = Number.isNaN || function(e) {
1523
1523
  return e !== e;
1524
1524
  }), Qr;
1525
1525
  }
1526
1526
  var en, is;
1527
- function El() {
1527
+ function Cl() {
1528
1528
  if (is) return en;
1529
1529
  is = 1;
1530
- var r = vl();
1530
+ var r = El();
1531
1531
  return en = function(t) {
1532
1532
  return r(t) || t === 0 ? t : t < 0 ? -1 : 1;
1533
1533
  }, en;
1534
1534
  }
1535
1535
  var tn, ss;
1536
- function Cl() {
1536
+ function Sl() {
1537
1537
  return ss || (ss = 1, tn = Object.getOwnPropertyDescriptor), tn;
1538
1538
  }
1539
1539
  var rn, os;
1540
1540
  function Lt() {
1541
1541
  if (os) return rn;
1542
1542
  os = 1;
1543
- var r = Cl();
1543
+ var r = Sl();
1544
1544
  if (r)
1545
1545
  try {
1546
1546
  r([], "length");
@@ -1563,7 +1563,7 @@ function Cr() {
1563
1563
  return nn = r, nn;
1564
1564
  }
1565
1565
  var sn, us;
1566
- function Sl() {
1566
+ function Tl() {
1567
1567
  if (us) return sn;
1568
1568
  us = 1;
1569
1569
  var r = typeof Symbol < "u" && Symbol, e = Wo();
@@ -1583,7 +1583,7 @@ function Xo() {
1583
1583
  return an = r.getPrototypeOf || null, an;
1584
1584
  }
1585
1585
  var un, fs;
1586
- function Tl() {
1586
+ function Fl() {
1587
1587
  if (fs) return un;
1588
1588
  fs = 1;
1589
1589
  var r = "Function.prototype.bind called on incompatible ", e = Object.prototype.toString, t = Math.max, n = "[object Function]", i = function(u, c) {
@@ -1631,7 +1631,7 @@ var ln, ds;
1631
1631
  function Kt() {
1632
1632
  if (ds) return ln;
1633
1633
  ds = 1;
1634
- var r = Tl();
1634
+ var r = Fl();
1635
1635
  return ln = Function.prototype.bind || r, ln;
1636
1636
  }
1637
1637
  var cn, ms;
@@ -1643,14 +1643,14 @@ function Di() {
1643
1643
  return ps || (ps = 1, fn = Function.prototype.apply), fn;
1644
1644
  }
1645
1645
  var dn, hs;
1646
- function Fl() {
1646
+ function Bl() {
1647
1647
  return hs || (hs = 1, dn = typeof Reflect < "u" && Reflect && Reflect.apply), dn;
1648
1648
  }
1649
1649
  var mn, gs;
1650
1650
  function Yo() {
1651
1651
  if (gs) return mn;
1652
1652
  gs = 1;
1653
- var r = Kt(), e = Di(), t = Ai(), n = Fl();
1653
+ var r = Kt(), e = Di(), t = Ai(), n = Bl();
1654
1654
  return mn = n || r.call(t, e), mn;
1655
1655
  }
1656
1656
  var pn, ws;
@@ -1665,7 +1665,7 @@ function vi() {
1665
1665
  }, pn;
1666
1666
  }
1667
1667
  var hn, ys;
1668
- function Bl() {
1668
+ function kl() {
1669
1669
  if (ys) return hn;
1670
1670
  ys = 1;
1671
1671
  var r = vi(), e = Lt(), t;
@@ -1692,7 +1692,7 @@ var gn, bs;
1692
1692
  function Ei() {
1693
1693
  if (bs) return gn;
1694
1694
  bs = 1;
1695
- var r = Ko(), e = Xo(), t = Bl();
1695
+ var r = Ko(), e = Xo(), t = kl();
1696
1696
  return gn = r ? function(i) {
1697
1697
  return r(i);
1698
1698
  } : e ? function(i) {
@@ -1714,7 +1714,7 @@ var yn, As;
1714
1714
  function Qo() {
1715
1715
  if (As) return yn;
1716
1716
  As = 1;
1717
- var r, e = Jo(), t = dl(), n = ml(), i = pl(), s = hl(), o = $o(), a = $t(), u = gl(), c = wl(), l = yl(), h = bl(), g = xl(), E = Al(), A = Dl(), v = El(), F = Function, w = function(I) {
1717
+ var r, e = Jo(), t = ml(), n = pl(), i = hl(), s = gl(), o = $o(), a = $t(), u = wl(), c = yl(), l = bl(), h = xl(), g = Al(), E = Dl(), A = vl(), v = Cl(), F = Function, w = function(I) {
1718
1718
  try {
1719
1719
  return F('"use strict"; return (' + I + ").constructor;")();
1720
1720
  } catch {
@@ -1731,7 +1731,7 @@ function Qo() {
1731
1731
  return D;
1732
1732
  }
1733
1733
  }
1734
- }() : D, N = Sl()(), M = Ei(), _ = Xo(), C = Ko(), J = Di(), oe = Ai(), Z = {}, fe = typeof Uint8Array > "u" || !M ? r : M(Uint8Array), de = {
1734
+ }() : D, N = Tl()(), M = Ei(), _ = Xo(), C = Ko(), J = Di(), oe = Ai(), Z = {}, fe = typeof Uint8Array > "u" || !M ? r : M(Uint8Array), de = {
1735
1735
  __proto__: null,
1736
1736
  "%AggregateError%": typeof AggregateError > "u" ? r : AggregateError,
1737
1737
  "%Array%": Array,
@@ -1964,7 +1964,7 @@ function Xt() {
1964
1964
  }, bn;
1965
1965
  }
1966
1966
  var xn, vs;
1967
- function kl() {
1967
+ function Nl() {
1968
1968
  if (vs) return xn;
1969
1969
  vs = 1;
1970
1970
  var r = Er()(), e = Xt(), t = e("Object.prototype.toString"), n = function(a) {
@@ -1977,7 +1977,7 @@ function kl() {
1977
1977
  return n.isLegacyArguments = i, xn = s ? n : i, xn;
1978
1978
  }
1979
1979
  var An, Es;
1980
- function Nl() {
1980
+ function Il() {
1981
1981
  if (Es) return An;
1982
1982
  Es = 1;
1983
1983
  var r = Xt(), e = Er()(), t = Zo(), n = Lt(), i;
@@ -2021,10 +2021,10 @@ function Nl() {
2021
2021
  return An = i, An;
2022
2022
  }
2023
2023
  var Dn, Cs;
2024
- function Il() {
2024
+ function Rl() {
2025
2025
  if (Cs) return Dn;
2026
2026
  Cs = 1;
2027
- var r = Xt(), e = Nl(), t = r("RegExp.prototype.exec"), n = $t();
2027
+ var r = Xt(), e = Il(), t = r("RegExp.prototype.exec"), n = $t();
2028
2028
  return Dn = function(s) {
2029
2029
  if (!e(s))
2030
2030
  throw new n("`regex` must be a RegExp");
@@ -2034,10 +2034,10 @@ function Il() {
2034
2034
  }, Dn;
2035
2035
  }
2036
2036
  var vn, Ss;
2037
- function Rl() {
2037
+ function Pl() {
2038
2038
  if (Ss) return vn;
2039
2039
  Ss = 1;
2040
- var r = Xt(), e = Il(), t = e(/^\s*(?:function)?\*/), n = Er()(), i = Ei(), s = r("Object.prototype.toString"), o = r("Function.prototype.toString"), a = function() {
2040
+ var r = Xt(), e = Rl(), t = e(/^\s*(?:function)?\*/), n = Er()(), i = Ei(), s = r("Object.prototype.toString"), o = r("Function.prototype.toString"), a = function() {
2041
2041
  if (!n)
2042
2042
  return !1;
2043
2043
  try {
@@ -2067,7 +2067,7 @@ function Rl() {
2067
2067
  }, vn;
2068
2068
  }
2069
2069
  var En, Ts;
2070
- function Pl() {
2070
+ function Ol() {
2071
2071
  if (Ts) return En;
2072
2072
  Ts = 1;
2073
2073
  var r = Function.prototype.toString, e = typeof Reflect == "object" && Reflect !== null && Reflect.apply, t, n;
@@ -2139,10 +2139,10 @@ function Pl() {
2139
2139
  }, En;
2140
2140
  }
2141
2141
  var Cn, Fs;
2142
- function Ol() {
2142
+ function Ll() {
2143
2143
  if (Fs) return Cn;
2144
2144
  Fs = 1;
2145
- var r = Pl(), e = Object.prototype.toString, t = Object.prototype.hasOwnProperty, n = function(u, c, l) {
2145
+ var r = Ol(), e = Object.prototype.toString, t = Object.prototype.hasOwnProperty, n = function(u, c, l) {
2146
2146
  for (var h = 0, g = u.length; h < g; h++)
2147
2147
  t.call(u, h) && (l == null ? c(u[h], h, u) : c.call(l, u[h], h, u));
2148
2148
  }, i = function(u, c, l) {
@@ -2163,7 +2163,7 @@ function Ol() {
2163
2163
  }, Cn;
2164
2164
  }
2165
2165
  var Sn, Bs;
2166
- function Ll() {
2166
+ function _l() {
2167
2167
  return Bs || (Bs = 1, Sn = [
2168
2168
  "Float16Array",
2169
2169
  "Float32Array",
@@ -2180,10 +2180,10 @@ function Ll() {
2180
2180
  ]), Sn;
2181
2181
  }
2182
2182
  var Tn, ks;
2183
- function _l() {
2183
+ function ql() {
2184
2184
  if (ks) return Tn;
2185
2185
  ks = 1;
2186
- var r = Ll(), e = typeof globalThis > "u" ? Je : globalThis;
2186
+ var r = _l(), e = typeof globalThis > "u" ? Je : globalThis;
2187
2187
  return Tn = function() {
2188
2188
  for (var n = [], i = 0; i < r.length; i++)
2189
2189
  typeof e[r[i]] == "function" && (n[n.length] = r[i]);
@@ -2191,7 +2191,7 @@ function _l() {
2191
2191
  }, Tn;
2192
2192
  }
2193
2193
  var Fn = { exports: {} }, Bn, Ns;
2194
- function ql() {
2194
+ function Ml() {
2195
2195
  if (Ns) return Bn;
2196
2196
  Ns = 1;
2197
2197
  var r = Cr(), e = $o(), t = $t(), n = Lt();
@@ -2223,7 +2223,7 @@ function ql() {
2223
2223
  }, Bn;
2224
2224
  }
2225
2225
  var kn, Is;
2226
- function Ml() {
2226
+ function Ul() {
2227
2227
  if (Is) return kn;
2228
2228
  Is = 1;
2229
2229
  var r = Cr(), e = function() {
@@ -2240,10 +2240,10 @@ function Ml() {
2240
2240
  }, kn = e, kn;
2241
2241
  }
2242
2242
  var Nn, Rs;
2243
- function Ul() {
2243
+ function jl() {
2244
2244
  if (Rs) return Nn;
2245
2245
  Rs = 1;
2246
- var r = Qo(), e = ql(), t = Ml()(), n = Lt(), i = $t(), s = r("%Math.floor%");
2246
+ var r = Qo(), e = Ml(), t = Ul()(), n = Lt(), i = $t(), s = r("%Math.floor%");
2247
2247
  return Nn = function(a, u) {
2248
2248
  if (typeof a != "function")
2249
2249
  throw new i("`fn` is not a function");
@@ -2270,7 +2270,7 @@ function Ul() {
2270
2270
  }, Nn;
2271
2271
  }
2272
2272
  var In, Ps;
2273
- function jl() {
2273
+ function Hl() {
2274
2274
  if (Ps) return In;
2275
2275
  Ps = 1;
2276
2276
  var r = Kt(), e = Di(), t = Yo();
@@ -2279,9 +2279,9 @@ function jl() {
2279
2279
  }, In;
2280
2280
  }
2281
2281
  var Os;
2282
- function Hl() {
2282
+ function Vl() {
2283
2283
  return Os || (Os = 1, function(r) {
2284
- var e = Ul(), t = Cr(), n = vi(), i = jl();
2284
+ var e = jl(), t = Cr(), n = vi(), i = Hl();
2285
2285
  r.exports = function(o) {
2286
2286
  var a = n(arguments), u = o.length - (arguments.length - 1);
2287
2287
  return e(
@@ -2296,7 +2296,7 @@ var Rn, Ls;
2296
2296
  function ea() {
2297
2297
  if (Ls) return Rn;
2298
2298
  Ls = 1;
2299
- var r = Ol(), e = _l(), t = Hl(), n = Xt(), i = Lt(), s = Ei(), o = n("Object.prototype.toString"), a = Er()(), u = typeof globalThis > "u" ? Je : globalThis, c = e(), l = n("String.prototype.slice"), h = n("Array.prototype.indexOf", !0) || function(F, w) {
2299
+ var r = Ll(), e = ql(), t = Vl(), n = Xt(), i = Lt(), s = Ei(), o = n("Object.prototype.toString"), a = Er()(), u = typeof globalThis > "u" ? Je : globalThis, c = e(), l = n("String.prototype.slice"), h = n("Array.prototype.indexOf", !0) || function(F, w) {
2300
2300
  for (var B = 0; B < F.length; B += 1)
2301
2301
  if (F[B] === w)
2302
2302
  return B;
@@ -2363,7 +2363,7 @@ function ea() {
2363
2363
  }, Rn;
2364
2364
  }
2365
2365
  var Pn, _s;
2366
- function Vl() {
2366
+ function zl() {
2367
2367
  if (_s) return Pn;
2368
2368
  _s = 1;
2369
2369
  var r = ea();
@@ -2372,9 +2372,9 @@ function Vl() {
2372
2372
  }, Pn;
2373
2373
  }
2374
2374
  var qs;
2375
- function zl() {
2375
+ function Gl() {
2376
2376
  return qs || (qs = 1, function(r) {
2377
- var e = kl(), t = Rl(), n = ea(), i = Vl();
2377
+ var e = Nl(), t = Pl(), n = ea(), i = zl();
2378
2378
  function s(z) {
2379
2379
  return z.call.bind(z);
2380
2380
  }
@@ -2559,7 +2559,7 @@ function zl() {
2559
2559
  }(Lr)), Lr;
2560
2560
  }
2561
2561
  var On, Ms;
2562
- function Gl() {
2562
+ function Wl() {
2563
2563
  return Ms || (Ms = 1, On = function(e) {
2564
2564
  return e && typeof e == "object" && typeof e.copy == "function" && typeof e.fill == "function" && typeof e.readUInt8 == "function";
2565
2565
  }), On;
@@ -2785,7 +2785,7 @@ function ta() {
2785
2785
  `) + " " + L.join(`,
2786
2786
  `) + " " + q[1] : q[0] + V + " " + L.join(", ") + " " + q[1];
2787
2787
  }
2788
- r.types = zl();
2788
+ r.types = Gl();
2789
2789
  function F(L) {
2790
2790
  return Array.isArray(L);
2791
2791
  }
@@ -2842,7 +2842,7 @@ function ta() {
2842
2842
  return L === null || typeof L == "boolean" || typeof L == "number" || typeof L == "string" || typeof L == "symbol" || // ES6 symbol
2843
2843
  typeof L > "u";
2844
2844
  }
2845
- r.isPrimitive = fe, r.isBuffer = Gl();
2845
+ r.isPrimitive = fe, r.isBuffer = Wl();
2846
2846
  function de(L) {
2847
2847
  return Object.prototype.toString.call(L);
2848
2848
  }
@@ -2959,7 +2959,7 @@ function ta() {
2959
2959
  }(Or)), Or;
2960
2960
  }
2961
2961
  var Ln, js;
2962
- function Wl() {
2962
+ function Jl() {
2963
2963
  if (js) return Ln;
2964
2964
  js = 1;
2965
2965
  function r(A, v) {
@@ -3240,7 +3240,7 @@ function na() {
3240
3240
  }, Mn;
3241
3241
  }
3242
3242
  var Un, Gs;
3243
- function Jl() {
3243
+ function $l() {
3244
3244
  if (Gs) return Un;
3245
3245
  Gs = 1, Un = r;
3246
3246
  function r(t, n) {
@@ -3281,7 +3281,7 @@ function ia() {
3281
3281
  var e;
3282
3282
  _.WritableState = N;
3283
3283
  var t = {
3284
- deprecate: Jl()
3284
+ deprecate: $l()
3285
3285
  }, n = Go(), i = vr.Buffer, s = (typeof Je < "u" ? Je : typeof window < "u" ? window : typeof self < "u" ? self : {}).Uint8Array || function() {
3286
3286
  };
3287
3287
  function o(P) {
@@ -3560,7 +3560,7 @@ function kt() {
3560
3560
  }), Hn;
3561
3561
  }
3562
3562
  var Vn = {}, tr = { exports: {} }, $s;
3563
- function $l() {
3563
+ function Kl() {
3564
3564
  return $s || ($s = 1, function(r, e) {
3565
3565
  var t = vr, n = t.Buffer;
3566
3566
  function i(o, a) {
@@ -3595,7 +3595,7 @@ var Ks;
3595
3595
  function li() {
3596
3596
  if (Ks) return Vn;
3597
3597
  Ks = 1;
3598
- var r = $l().Buffer, e = r.isEncoding || function(w) {
3598
+ var r = Kl().Buffer, e = r.isEncoding || function(w) {
3599
3599
  switch (w = "" + w, w && w.toLowerCase()) {
3600
3600
  case "hex":
3601
3601
  case "utf8":
@@ -3797,7 +3797,7 @@ function Ci() {
3797
3797
  return zn = i, zn;
3798
3798
  }
3799
3799
  var Gn, Ys;
3800
- function Kl() {
3800
+ function Xl() {
3801
3801
  if (Ys) return Gn;
3802
3802
  Ys = 1;
3803
3803
  var r;
@@ -3923,7 +3923,7 @@ function Kl() {
3923
3923
  return Gn = B, Gn;
3924
3924
  }
3925
3925
  var Wn, Zs;
3926
- function Xl() {
3926
+ function Yl() {
3927
3927
  return Zs || (Zs = 1, Wn = function() {
3928
3928
  throw new Error("Readable.from is not available in the browser");
3929
3929
  }), Wn;
@@ -3947,7 +3947,7 @@ function sa() {
3947
3947
  var a = ta(), u;
3948
3948
  a && a.debuglog ? u = a.debuglog("stream") : u = function() {
3949
3949
  };
3950
- var c = Wl(), l = ra(), h = na(), g = h.getHighWaterMark, E = _t().codes, A = E.ERR_INVALID_ARG_TYPE, v = E.ERR_STREAM_PUSH_AFTER_EOF, F = E.ERR_METHOD_NOT_IMPLEMENTED, w = E.ERR_STREAM_UNSHIFT_AFTER_END_EVENT, B, R, D;
3950
+ var c = Jl(), l = ra(), h = na(), g = h.getHighWaterMark, E = _t().codes, A = E.ERR_INVALID_ARG_TYPE, v = E.ERR_STREAM_PUSH_AFTER_EOF, F = E.ERR_METHOD_NOT_IMPLEMENTED, w = E.ERR_STREAM_UNSHIFT_AFTER_END_EVENT, B, R, D;
3951
3951
  At()(C, t);
3952
3952
  var k = l.errorOrDestroy, N = ["error", "close", "destroy", "pause", "resume"];
3953
3953
  function M(b, x, U) {
@@ -4086,8 +4086,8 @@ function sa() {
4086
4086
  W.pipesCount += 1, u("pipe count=%d opts=%j", W.pipesCount, x);
4087
4087
  var ee = (!x || x.end !== !1) && b !== ge.stdout && b !== ge.stderr, X = ee ? ue : st;
4088
4088
  W.endEmitted ? ge.nextTick(X) : U.once("end", X), b.on("unpipe", te);
4089
- function te(lt, Le) {
4090
- u("onunpipe"), lt === U && Le && Le.hasUnpiped === !1 && (Le.hasUnpiped = !0, Be());
4089
+ function te(ct, Le) {
4090
+ u("onunpipe"), ct === U && Le && Le.hasUnpiped === !1 && (Le.hasUnpiped = !0, Be());
4091
4091
  }
4092
4092
  function ue() {
4093
4093
  u("onend"), b.end();
@@ -4099,13 +4099,13 @@ function sa() {
4099
4099
  u("cleanup"), b.removeListener("close", je), b.removeListener("finish", _e), b.removeListener("drain", z), b.removeListener("error", Ge), b.removeListener("unpipe", te), U.removeListener("end", ue), U.removeListener("end", st), U.removeListener("data", Ve), Se = !0, W.awaitDrain && (!b._writableState || b._writableState.needDrain) && z();
4100
4100
  }
4101
4101
  U.on("data", Ve);
4102
- function Ve(lt) {
4102
+ function Ve(ct) {
4103
4103
  u("ondata");
4104
- var Le = b.write(lt);
4104
+ var Le = b.write(ct);
4105
4105
  u("dest.write", Le), Le === !1 && ((W.pipesCount === 1 && W.pipes === b || W.pipesCount > 1 && S(W.pipes, b) !== -1) && !Se && (u("false write response, pause", W.awaitDrain), W.awaitDrain++), U.pause());
4106
4106
  }
4107
- function Ge(lt) {
4108
- u("onerror", lt), st(), b.removeListener("error", Ge), e(b, "error") === 0 && k(b, lt);
4107
+ function Ge(ct) {
4108
+ u("onerror", ct), st(), b.removeListener("error", Ge), e(b, "error") === 0 && k(b, ct);
4109
4109
  }
4110
4110
  M(b, "error", Ge);
4111
4111
  function je() {
@@ -4204,7 +4204,7 @@ function sa() {
4204
4204
  u("wrapped _read", te), W && (W = !1, b.resume());
4205
4205
  }, this;
4206
4206
  }, typeof Symbol == "function" && (C.prototype[Symbol.asyncIterator] = function() {
4207
- return R === void 0 && (R = Kl()), R(this);
4207
+ return R === void 0 && (R = Xl()), R(this);
4208
4208
  }), Object.defineProperty(C.prototype, "readableHighWaterMark", {
4209
4209
  // making it explicit this property is not enumerable
4210
4210
  // because otherwise some prototype manipulation in
@@ -4257,7 +4257,7 @@ function sa() {
4257
4257
  }
4258
4258
  }
4259
4259
  typeof Symbol == "function" && (C.from = function(b, x) {
4260
- return D === void 0 && (D = Xl()), D(C, b, x);
4260
+ return D === void 0 && (D = Yl()), D(C, b, x);
4261
4261
  });
4262
4262
  function S(b, x) {
4263
4263
  for (var U = 0, W = b.length; U < W; U++)
@@ -4326,7 +4326,7 @@ function oa() {
4326
4326
  return $n;
4327
4327
  }
4328
4328
  var Kn, to;
4329
- function Yl() {
4329
+ function Zl() {
4330
4330
  if (to) return Kn;
4331
4331
  to = 1, Kn = e;
4332
4332
  var r = oa();
@@ -4340,7 +4340,7 @@ function Yl() {
4340
4340
  }, Kn;
4341
4341
  }
4342
4342
  var Xn, ro;
4343
- function Zl() {
4343
+ function Ql() {
4344
4344
  if (ro) return Xn;
4345
4345
  ro = 1;
4346
4346
  var r;
@@ -4404,11 +4404,11 @@ function Zl() {
4404
4404
  return Xn = h, Xn;
4405
4405
  }
4406
4406
  var Yn, no;
4407
- function Ql() {
4407
+ function ec() {
4408
4408
  if (no) return Yn;
4409
4409
  no = 1, Yn = t;
4410
4410
  var r = xi().EventEmitter, e = At();
4411
- e(t, r), t.Readable = sa(), t.Writable = ia(), t.Duplex = kt(), t.Transform = oa(), t.PassThrough = Yl(), t.finished = Ci(), t.pipeline = Zl(), t.Stream = t;
4411
+ e(t, r), t.Readable = sa(), t.Writable = ia(), t.Duplex = kt(), t.Transform = oa(), t.PassThrough = Zl(), t.finished = Ci(), t.pipeline = Ql(), t.Stream = t;
4412
4412
  function t() {
4413
4413
  r.call(this);
4414
4414
  }
@@ -4542,7 +4542,7 @@ function Ql() {
4542
4542
  };
4543
4543
  var a;
4544
4544
  try {
4545
- a = Ql().Stream;
4545
+ a = ec().Stream;
4546
4546
  } catch {
4547
4547
  a = function() {
4548
4548
  };
@@ -5330,7 +5330,7 @@ var Si = {
5330
5330
  isArray: function(r) {
5331
5331
  return Array.isArray ? Array.isArray(r) : Object.prototype.toString.call(r) === "[object Array]";
5332
5332
  }
5333
- }, ec = Si.isArray, Ti = {
5333
+ }, tc = Si.isArray, Ti = {
5334
5334
  copyOptions: function(r) {
5335
5335
  var e, t = {};
5336
5336
  for (e in r)
@@ -5344,7 +5344,7 @@ var Si = {
5344
5344
  (!("spaces" in r) || typeof r.spaces != "number" && typeof r.spaces != "string") && (r.spaces = 0);
5345
5345
  },
5346
5346
  ensureAlwaysArrayExists: function(r) {
5347
- (!("alwaysArray" in r) || typeof r.alwaysArray != "boolean" && !ec(r.alwaysArray)) && (r.alwaysArray = !1);
5347
+ (!("alwaysArray" in r) || typeof r.alwaysArray != "boolean" && !tc(r.alwaysArray)) && (r.alwaysArray = !1);
5348
5348
  },
5349
5349
  ensureKeyExists: function(r, e) {
5350
5350
  (!(r + "Key" in e) || typeof e[r + "Key"] != "string") && (e[r + "Key"] = e.compact ? "_" + r : r);
@@ -5352,8 +5352,8 @@ var Si = {
5352
5352
  checkFnExists: function(r, e) {
5353
5353
  return r + "Fn" in e;
5354
5354
  }
5355
- }, tc = Uo, me = Ti, Ft = Si.isArray, j, le;
5356
- function rc(r) {
5355
+ }, rc = Uo, me = Ti, Ft = Si.isArray, j, le;
5356
+ function nc(r) {
5357
5357
  return j = me.copyOptions(r), me.ensureFlagExists("ignoreDeclaration", j), me.ensureFlagExists("ignoreInstruction", j), me.ensureFlagExists("ignoreAttributes", j), me.ensureFlagExists("ignoreText", j), me.ensureFlagExists("ignoreComment", j), me.ensureFlagExists("ignoreCdata", j), me.ensureFlagExists("ignoreDoctype", j), me.ensureFlagExists("compact", j), me.ensureFlagExists("alwaysChildren", j), me.ensureFlagExists("addParent", j), me.ensureFlagExists("trim", j), me.ensureFlagExists("nativeType", j), me.ensureFlagExists("nativeTypeAttributes", j), me.ensureFlagExists("sanitize", j), me.ensureFlagExists("instructionHasAttributes", j), me.ensureFlagExists("captureSpacesBetweenElements", j), me.ensureAlwaysArrayExists(j), me.ensureKeyExists("declaration", j), me.ensureKeyExists("instruction", j), me.ensureKeyExists("attributes", j), me.ensureKeyExists("text", j), me.ensureKeyExists("comment", j), me.ensureKeyExists("cdata", j), me.ensureKeyExists("doctype", j), me.ensureKeyExists("type", j), me.ensureKeyExists("name", j), me.ensureKeyExists("elements", j), me.ensureKeyExists("parent", j), me.checkFnExists("doctype", j), me.checkFnExists("instruction", j), me.checkFnExists("cdata", j), me.checkFnExists("comment", j), me.checkFnExists("text", j), me.checkFnExists("instructionName", j), me.checkFnExists("elementName", j), me.checkFnExists("attributeName", j), me.checkFnExists("attributeValue", j), me.checkFnExists("attributes", j), j;
5358
5358
  }
5359
5359
  function aa(r) {
@@ -5401,7 +5401,7 @@ function ua(r) {
5401
5401
  }
5402
5402
  return r;
5403
5403
  }
5404
- function nc(r) {
5404
+ function ic(r) {
5405
5405
  var e = {};
5406
5406
  if (r.body && (r.name.toLowerCase() === "xml" || j.instructionHasAttributes)) {
5407
5407
  for (var t = /([\w:-]+)\s*=\s*(?:"([^"]*)"|'([^']*)'|(\w+))\s*/g, n; (n = t.exec(r.body)) !== null; )
@@ -5420,7 +5420,7 @@ function nc(r) {
5420
5420
  j.instructionHasAttributes && Object.keys(e).length ? (i[r.name] = {}, i[r.name][j.attributesKey] = e) : i[r.name] = r.body, Yt("instruction", i);
5421
5421
  }
5422
5422
  }
5423
- function ic(r, e) {
5423
+ function sc(r, e) {
5424
5424
  var t;
5425
5425
  if (typeof r == "object" && (e = r.attributes, r = r.name), e = ua(e), "elementNameFn" in j && (r = j.elementNameFn(r, le)), j.compact) {
5426
5426
  if (t = {}, !j.ignoreAttributes && e && Object.keys(e).length) {
@@ -5434,44 +5434,44 @@ function ic(r, e) {
5434
5434
  le[j.elementsKey] || (le[j.elementsKey] = []), t = {}, t[j.typeKey] = "element", t[j.nameKey] = r, !j.ignoreAttributes && e && Object.keys(e).length && (t[j.attributesKey] = e), j.alwaysChildren && (t[j.elementsKey] = []), le[j.elementsKey].push(t);
5435
5435
  t[j.parentKey] = le, le = t;
5436
5436
  }
5437
- function sc(r) {
5437
+ function oc(r) {
5438
5438
  j.ignoreText || !r.trim() && !j.captureSpacesBetweenElements || (j.trim && (r = r.trim()), j.nativeType && (r = aa(r)), j.sanitize && (r = r.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;")), Yt("text", r));
5439
5439
  }
5440
- function oc(r) {
5440
+ function ac(r) {
5441
5441
  j.ignoreComment || (j.trim && (r = r.trim()), Yt("comment", r));
5442
5442
  }
5443
- function ac(r) {
5443
+ function uc(r) {
5444
5444
  var e = le[j.parentKey];
5445
5445
  j.addParent || delete le[j.parentKey], le = e;
5446
5446
  }
5447
- function uc(r) {
5447
+ function lc(r) {
5448
5448
  j.ignoreCdata || (j.trim && (r = r.trim()), Yt("cdata", r));
5449
5449
  }
5450
- function lc(r) {
5450
+ function cc(r) {
5451
5451
  j.ignoreDoctype || (r = r.replace(/^ /, ""), j.trim && (r = r.trim()), Yt("doctype", r));
5452
5452
  }
5453
- function cc(r) {
5453
+ function fc(r) {
5454
5454
  r.note = r;
5455
5455
  }
5456
5456
  var la = function(r, e) {
5457
- var t = tc.parser(!0, {}), n = {};
5458
- if (le = n, j = rc(e), t.opt = { strictEntities: !0 }, t.onopentag = ic, t.ontext = sc, t.oncomment = oc, t.onclosetag = ac, t.onerror = cc, t.oncdata = uc, t.ondoctype = lc, t.onprocessinginstruction = nc, t.write(r).close(), n[j.elementsKey]) {
5457
+ var t = rc.parser(!0, {}), n = {};
5458
+ if (le = n, j = nc(e), t.opt = { strictEntities: !0 }, t.onopentag = sc, t.ontext = oc, t.oncomment = ac, t.onclosetag = uc, t.onerror = fc, t.oncdata = lc, t.ondoctype = cc, t.onprocessinginstruction = ic, t.write(r).close(), n[j.elementsKey]) {
5459
5459
  var i = n[j.elementsKey];
5460
5460
  delete n[j.elementsKey], n[j.elementsKey] = i, delete n.text;
5461
5461
  }
5462
5462
  return n;
5463
- }, io = Ti, fc = la;
5464
- function dc(r) {
5463
+ }, io = Ti, dc = la;
5464
+ function mc(r) {
5465
5465
  var e = io.copyOptions(r);
5466
5466
  return io.ensureSpacesExists(e), e;
5467
5467
  }
5468
- var mc = function(r, e) {
5468
+ var pc = function(r, e) {
5469
5469
  var t, n, i, s;
5470
- return t = dc(e), n = fc(r, t), s = "compact" in t && t.compact ? "_parent" : "parent", "addParent" in t && t.addParent ? i = JSON.stringify(n, function(o, a) {
5470
+ return t = mc(e), n = dc(r, t), s = "compact" in t && t.compact ? "_parent" : "parent", "addParent" in t && t.addParent ? i = JSON.stringify(n, function(o, a) {
5471
5471
  return o === s ? "_" : a;
5472
5472
  }, t.spaces) : i = JSON.stringify(n, null, t.spaces), i.replace(/\u2028/g, "\\u2028").replace(/\u2029/g, "\\u2029");
5473
- }, he = Ti, pc = Si.isArray, Re, Pe;
5474
- function hc(r) {
5473
+ }, he = Ti, hc = Si.isArray, Re, Pe;
5474
+ function gc(r) {
5475
5475
  var e = he.copyOptions(r);
5476
5476
  return he.ensureFlagExists("ignoreDeclaration", e), he.ensureFlagExists("ignoreInstruction", e), he.ensureFlagExists("ignoreAttributes", e), he.ensureFlagExists("ignoreText", e), he.ensureFlagExists("ignoreComment", e), he.ensureFlagExists("ignoreCdata", e), he.ensureFlagExists("ignoreDoctype", e), he.ensureFlagExists("compact", e), he.ensureFlagExists("indentText", e), he.ensureFlagExists("indentCdata", e), he.ensureFlagExists("indentAttributes", e), he.ensureFlagExists("indentInstruction", e), he.ensureFlagExists("fullTagEmptyElement", e), he.ensureFlagExists("noQuotesForNativeAttributes", e), he.ensureSpacesExists(e), typeof e.spaces == "number" && (e.spaces = Array(e.spaces + 1).join(" ")), he.ensureKeyExists("declaration", e), he.ensureKeyExists("instruction", e), he.ensureKeyExists("attributes", e), he.ensureKeyExists("text", e), he.ensureKeyExists("comment", e), he.ensureKeyExists("cdata", e), he.ensureKeyExists("doctype", e), he.ensureKeyExists("type", e), he.ensureKeyExists("name", e), he.ensureKeyExists("elements", e), he.checkFnExists("doctype", e), he.checkFnExists("instruction", e), he.checkFnExists("cdata", e), he.checkFnExists("comment", e), he.checkFnExists("text", e), he.checkFnExists("instructionName", e), he.checkFnExists("elementName", e), he.checkFnExists("attributeName", e), he.checkFnExists("attributeValue", e), he.checkFnExists("attributes", e), he.checkFnExists("fullTagEmptyElement", e), e;
5477
5477
  }
@@ -5516,7 +5516,7 @@ function pa(r, e) {
5516
5516
  function Fi(r, e) {
5517
5517
  return e.ignoreText ? "" : (r = "" + r, r = r.replace(/&amp;/g, "&"), r = r.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;"), "textFn" in e ? e.textFn(r, Pe, Re) : r);
5518
5518
  }
5519
- function gc(r, e) {
5519
+ function wc(r, e) {
5520
5520
  var t;
5521
5521
  if (r.elements && r.elements.length)
5522
5522
  for (t = 0; t < r.elements.length; ++t)
@@ -5542,12 +5542,12 @@ function gc(r, e) {
5542
5542
  }
5543
5543
  return !1;
5544
5544
  }
5545
- function wc(r, e, t) {
5545
+ function yc(r, e, t) {
5546
5546
  Re = r, Pe = r.name;
5547
5547
  var n = [], i = "elementNameFn" in e ? e.elementNameFn(r.name, r) : r.name;
5548
5548
  n.push("<" + i), r[e.attributesKey] && n.push(Sr(r[e.attributesKey], e, t));
5549
5549
  var s = r[e.elementsKey] && r[e.elementsKey].length || r[e.attributesKey] && r[e.attributesKey]["xml:space"] === "preserve";
5550
- return s || ("fullTagEmptyElementFn" in e ? s = e.fullTagEmptyElementFn(r.name, r) : s = e.fullTagEmptyElement), s ? (n.push(">"), r[e.elementsKey] && r[e.elementsKey].length && (n.push(ha(r[e.elementsKey], e, t + 1)), Re = r, Pe = r.name), n.push(e.spaces && gc(r, e) ? `
5550
+ return s || ("fullTagEmptyElementFn" in e ? s = e.fullTagEmptyElementFn(r.name, r) : s = e.fullTagEmptyElement), s ? (n.push(">"), r[e.elementsKey] && r[e.elementsKey].length && (n.push(ha(r[e.elementsKey], e, t + 1)), Re = r, Pe = r.name), n.push(e.spaces && wc(r, e) ? `
5551
5551
  ` + Array(t + 1).join(e.spaces) : ""), n.push("</" + i + ">")) : n.push("/>"), n.join("");
5552
5552
  }
5553
5553
  function ha(r, e, t, n) {
@@ -5555,7 +5555,7 @@ function ha(r, e, t, n) {
5555
5555
  var o = Ze(e, t, n && !i);
5556
5556
  switch (s.type) {
5557
5557
  case "element":
5558
- return i + o + wc(s, e, t);
5558
+ return i + o + yc(s, e, t);
5559
5559
  case "comment":
5560
5560
  return i + o + da(s[e.commentKey], e);
5561
5561
  case "doctype":
@@ -5598,7 +5598,7 @@ function ga(r, e, t) {
5598
5598
  }
5599
5599
  return !1;
5600
5600
  }
5601
- function yc(r, e, t, n, i) {
5601
+ function bc(r, e, t, n, i) {
5602
5602
  Re = r, Pe = e;
5603
5603
  var s = "elementNameFn" in t ? t.elementNameFn(e, r) : e;
5604
5604
  if (typeof r > "u" || r === null || r === "")
@@ -5620,7 +5620,7 @@ function wa(r, e, t, n) {
5620
5620
  var i, s, o, a = [];
5621
5621
  for (s in r)
5622
5622
  if (r.hasOwnProperty(s))
5623
- for (o = pc(r[s]) ? r[s] : [r[s]], i = 0; i < o.length; ++i) {
5623
+ for (o = hc(r[s]) ? r[s] : [r[s]], i = 0; i < o.length; ++i) {
5624
5624
  switch (s) {
5625
5625
  case e.declarationKey:
5626
5626
  a.push(ca(o[i], e, t));
@@ -5644,17 +5644,17 @@ function wa(r, e, t, n) {
5644
5644
  a.push(Ze(e, t, n) + da(o[i], e));
5645
5645
  break;
5646
5646
  default:
5647
- a.push(Ze(e, t, n) + yc(o[i], s, e, t, ga(o[i], e)));
5647
+ a.push(Ze(e, t, n) + bc(o[i], s, e, t, ga(o[i], e)));
5648
5648
  }
5649
5649
  n = n && !a.length;
5650
5650
  }
5651
5651
  return a.join("");
5652
5652
  }
5653
5653
  var ya = function(r, e) {
5654
- e = hc(e);
5654
+ e = gc(e);
5655
5655
  var t = [];
5656
5656
  return Re = r, Pe = "_root_", e.compact ? t.push(wa(r, e, 0, !0)) : (r[e.declarationKey] && t.push(ca(r[e.declarationKey], e, 0)), r[e.elementsKey] && r[e.elementsKey].length && t.push(ha(r[e.elementsKey], e, 0, !t.length))), t.join("");
5657
- }, bc = ya, xc = function(r, e) {
5657
+ }, xc = ya, Ac = function(r, e) {
5658
5658
  r instanceof St && (r = r.toString());
5659
5659
  var t = null;
5660
5660
  if (typeof r == "string")
@@ -5665,37 +5665,37 @@ var ya = function(r, e) {
5665
5665
  }
5666
5666
  else
5667
5667
  t = r;
5668
- return bc(t, e);
5669
- }, Ac = la, Dc = mc, vc = ya, Ec = xc, Cc = {
5670
- xml2js: Ac,
5671
- xml2json: Dc,
5672
- js2xml: vc,
5673
- json2xml: Ec
5668
+ return xc(t, e);
5669
+ }, Dc = la, vc = pc, Ec = ya, Cc = Ac, Sc = {
5670
+ xml2js: Dc,
5671
+ xml2json: vc,
5672
+ js2xml: Ec,
5673
+ json2xml: Cc
5674
5674
  };
5675
- const ba = /* @__PURE__ */ qo(Cc);
5676
- var rr, Sc = new Uint8Array(16);
5677
- function Tc() {
5675
+ const ba = /* @__PURE__ */ qo(Sc);
5676
+ var rr, Tc = new Uint8Array(16);
5677
+ function Fc() {
5678
5678
  if (!rr && (rr = typeof crypto < "u" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || typeof msCrypto < "u" && typeof msCrypto.getRandomValues == "function" && msCrypto.getRandomValues.bind(msCrypto), !rr))
5679
5679
  throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
5680
- return rr(Sc);
5680
+ return rr(Tc);
5681
5681
  }
5682
- const Fc = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;
5683
- function Bc(r) {
5684
- return typeof r == "string" && Fc.test(r);
5682
+ const Bc = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;
5683
+ function kc(r) {
5684
+ return typeof r == "string" && Bc.test(r);
5685
5685
  }
5686
5686
  var ke = [];
5687
5687
  for (var Zn = 0; Zn < 256; ++Zn)
5688
5688
  ke.push((Zn + 256).toString(16).substr(1));
5689
- function kc(r) {
5689
+ function Nc(r) {
5690
5690
  var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0, t = (ke[r[e + 0]] + ke[r[e + 1]] + ke[r[e + 2]] + ke[r[e + 3]] + "-" + ke[r[e + 4]] + ke[r[e + 5]] + "-" + ke[r[e + 6]] + ke[r[e + 7]] + "-" + ke[r[e + 8]] + ke[r[e + 9]] + "-" + ke[r[e + 10]] + ke[r[e + 11]] + ke[r[e + 12]] + ke[r[e + 13]] + ke[r[e + 14]] + ke[r[e + 15]]).toLowerCase();
5691
- if (!Bc(t))
5691
+ if (!kc(t))
5692
5692
  throw TypeError("Stringified UUID is invalid");
5693
5693
  return t;
5694
5694
  }
5695
5695
  function xa(r, e, t) {
5696
5696
  r = r || {};
5697
- var n = r.random || (r.rng || Tc)();
5698
- return n[6] = n[6] & 15 | 64, n[8] = n[8] & 63 | 128, kc(n);
5697
+ var n = r.random || (r.rng || Fc)();
5698
+ return n[6] = n[6] & 15 | 64, n[8] = n[8] & 63 | 128, Nc(n);
5699
5699
  }
5700
5700
  var dr = { exports: {} };
5701
5701
  /*! https://mths.be/he v1.2.0 by @mathias | MIT license */
@@ -5807,8 +5807,8 @@ dr.exports;
5807
5807
  t.he = Y;
5808
5808
  })(Je);
5809
5809
  })(dr, dr.exports);
5810
- var Nc = dr.exports;
5811
- const Ic = /* @__PURE__ */ qo(Nc);
5810
+ var Ic = dr.exports;
5811
+ const Rc = /* @__PURE__ */ qo(Ic);
5812
5812
  function Ne(r) {
5813
5813
  this.content = r;
5814
5814
  }
@@ -6446,7 +6446,7 @@ function Ea(r, e, t, n) {
6446
6446
  let a = Ea(o.content, e - s - 1, t);
6447
6447
  return a && r.replaceChild(i, o.copy(a));
6448
6448
  }
6449
- function Rc(r, e, t) {
6449
+ function Pc(r, e, t) {
6450
6450
  if (t.openStart > r.depth)
6451
6451
  throw new pr("Inserted content deeper than insertion position");
6452
6452
  if (r.depth - t.openStart != e.depth - t.openEnd)
@@ -6463,7 +6463,7 @@ function Ca(r, e, t, n) {
6463
6463
  let o = r.parent, a = o.content;
6464
6464
  return wt(o, a.cut(0, r.parentOffset).append(t.content).append(a.cut(e.parentOffset)));
6465
6465
  } else {
6466
- let { start: o, end: a } = Pc(t, r);
6466
+ let { start: o, end: a } = Oc(t, r);
6467
6467
  return wt(s, Ta(r, o, a, e, n));
6468
6468
  }
6469
6469
  else return wt(s, hr(r, e, n));
@@ -6502,7 +6502,7 @@ function hr(r, e, t) {
6502
6502
  }
6503
6503
  return Vt(e, null, t, n), new Q(n);
6504
6504
  }
6505
- function Pc(r, e) {
6505
+ function Oc(r, e) {
6506
6506
  let t = e.depth - r.openStart, i = e.node(t).copy(r.content);
6507
6507
  for (let s = t - 1; s >= 0; s--)
6508
6508
  i = e.node(s).copy(Q.from(i));
@@ -6696,7 +6696,7 @@ class zt {
6696
6696
  return e.blockRange(this);
6697
6697
  for (let n = this.depth - (this.parent.inlineContent || this.pos == e.pos ? 1 : 0); n >= 0; n--)
6698
6698
  if (e.pos <= this.end(n) && (!t || t(this.node(n))))
6699
- return new _c(this, e, n);
6699
+ return new qc(this, e, n);
6700
6700
  return null;
6701
6701
  }
6702
6702
  /**
@@ -6753,18 +6753,18 @@ class zt {
6753
6753
  return o;
6754
6754
  }
6755
6755
  else
6756
- so.set(e, n = new Oc());
6756
+ so.set(e, n = new Lc());
6757
6757
  let i = n.elts[n.i] = zt.resolve(e, t);
6758
- return n.i = (n.i + 1) % Lc, i;
6758
+ return n.i = (n.i + 1) % _c, i;
6759
6759
  }
6760
6760
  }
6761
- class Oc {
6761
+ class Lc {
6762
6762
  constructor() {
6763
6763
  this.elts = [], this.i = 0;
6764
6764
  }
6765
6765
  }
6766
- const Lc = 12, so = /* @__PURE__ */ new WeakMap();
6767
- class _c {
6766
+ const _c = 12, so = /* @__PURE__ */ new WeakMap();
6767
+ class qc {
6768
6768
  /**
6769
6769
  Construct a node range. `$from` and `$to` should point into the
6770
6770
  same node until at least the given `depth`, since a node range
@@ -6804,7 +6804,7 @@ class _c {
6804
6804
  return this.$to.indexAfter(this.depth);
6805
6805
  }
6806
6806
  }
6807
- const qc = /* @__PURE__ */ Object.create(null);
6807
+ const Mc = /* @__PURE__ */ Object.create(null);
6808
6808
  class rt {
6809
6809
  /**
6810
6810
  @internal
@@ -6923,7 +6923,7 @@ class rt {
6923
6923
  attributes, and marks.
6924
6924
  */
6925
6925
  hasMarkup(e, t, n) {
6926
- return this.type == e && mr(this.attrs, t || e.defaultAttrs || qc) && we.sameSet(this.marks, n || we.none);
6926
+ return this.type == e && mr(this.attrs, t || e.defaultAttrs || Mc) && we.sameSet(this.marks, n || we.none);
6927
6927
  }
6928
6928
  /**
6929
6929
  Create a new node with the same markup as this node, containing
@@ -6966,7 +6966,7 @@ class rt {
6966
6966
  [`ReplaceError`](https://prosemirror.net/docs/ref/#model.ReplaceError) is thrown.
6967
6967
  */
6968
6968
  replace(e, t, n) {
6969
- return Rc(this.resolve(e), this.resolve(t), n);
6969
+ return Pc(this.resolve(e), this.resolve(t), n);
6970
6970
  }
6971
6971
  /**
6972
6972
  Find the node directly after the given position.
@@ -7229,13 +7229,13 @@ class yt {
7229
7229
  @internal
7230
7230
  */
7231
7231
  static parse(e, t) {
7232
- let n = new Mc(e, t);
7232
+ let n = new Uc(e, t);
7233
7233
  if (n.next == null)
7234
7234
  return yt.empty;
7235
7235
  let i = Ba(n);
7236
7236
  n.next && n.err("Unexpected trailing text");
7237
- let s = Wc(Gc(i));
7238
- return Jc(s, n), s;
7237
+ let s = Jc(Wc(i));
7238
+ return $c(s, n), s;
7239
7239
  }
7240
7240
  /**
7241
7241
  Match a node type, returning a match after that node if
@@ -7381,7 +7381,7 @@ class yt {
7381
7381
  }
7382
7382
  }
7383
7383
  yt.empty = new yt(!0);
7384
- class Mc {
7384
+ class Uc {
7385
7385
  constructor(e, t) {
7386
7386
  this.string = e, this.nodeTypes = t, this.inline = null, this.pos = 0, this.tokens = e.split(/\s*(?=\b|\W|$)/), this.tokens[this.tokens.length - 1] == "" && this.tokens.pop(), this.tokens[0] == "" && this.tokens.shift();
7387
7387
  }
@@ -7398,19 +7398,19 @@ class Mc {
7398
7398
  function Ba(r) {
7399
7399
  let e = [];
7400
7400
  do
7401
- e.push(Uc(r));
7401
+ e.push(jc(r));
7402
7402
  while (r.eat("|"));
7403
7403
  return e.length == 1 ? e[0] : { type: "choice", exprs: e };
7404
7404
  }
7405
- function Uc(r) {
7405
+ function jc(r) {
7406
7406
  let e = [];
7407
7407
  do
7408
- e.push(jc(r));
7408
+ e.push(Hc(r));
7409
7409
  while (r.next && r.next != ")" && r.next != "|");
7410
7410
  return e.length == 1 ? e[0] : { type: "seq", exprs: e };
7411
7411
  }
7412
- function jc(r) {
7413
- let e = zc(r);
7412
+ function Hc(r) {
7413
+ let e = Gc(r);
7414
7414
  for (; ; )
7415
7415
  if (r.eat("+"))
7416
7416
  e = { type: "plus", expr: e };
@@ -7419,7 +7419,7 @@ function jc(r) {
7419
7419
  else if (r.eat("?"))
7420
7420
  e = { type: "opt", expr: e };
7421
7421
  else if (r.eat("{"))
7422
- e = Hc(r, e);
7422
+ e = Vc(r, e);
7423
7423
  else
7424
7424
  break;
7425
7425
  return e;
@@ -7429,11 +7429,11 @@ function oo(r) {
7429
7429
  let e = Number(r.next);
7430
7430
  return r.pos++, e;
7431
7431
  }
7432
- function Hc(r, e) {
7432
+ function Vc(r, e) {
7433
7433
  let t = oo(r), n = t;
7434
7434
  return r.eat(",") && (r.next != "}" ? n = oo(r) : n = -1), r.eat("}") || r.err("Unclosed braced range"), { type: "range", min: t, max: n, expr: e };
7435
7435
  }
7436
- function Vc(r, e) {
7436
+ function zc(r, e) {
7437
7437
  let t = r.nodeTypes, n = t[e];
7438
7438
  if (n)
7439
7439
  return [n];
@@ -7444,18 +7444,18 @@ function Vc(r, e) {
7444
7444
  }
7445
7445
  return i.length == 0 && r.err("No node type or group '" + e + "' found"), i;
7446
7446
  }
7447
- function zc(r) {
7447
+ function Gc(r) {
7448
7448
  if (r.eat("(")) {
7449
7449
  let e = Ba(r);
7450
7450
  return r.eat(")") || r.err("Missing closing paren"), e;
7451
7451
  } else if (/\W/.test(r.next))
7452
7452
  r.err("Unexpected token '" + r.next + "'");
7453
7453
  else {
7454
- let e = Vc(r, r.next).map((t) => (r.inline == null ? r.inline = t.isInline : r.inline != t.isInline && r.err("Mixing inline and block content"), { type: "name", value: t }));
7454
+ let e = zc(r, r.next).map((t) => (r.inline == null ? r.inline = t.isInline : r.inline != t.isInline && r.err("Mixing inline and block content"), { type: "name", value: t }));
7455
7455
  return r.pos++, e.length == 1 ? e[0] : { type: "choice", exprs: e };
7456
7456
  }
7457
7457
  }
7458
- function Gc(r) {
7458
+ function Wc(r) {
7459
7459
  let e = [[]];
7460
7460
  return i(s(r, 0), t()), e;
7461
7461
  function t() {
@@ -7526,7 +7526,7 @@ function ao(r, e) {
7526
7526
  }
7527
7527
  }
7528
7528
  }
7529
- function Wc(r) {
7529
+ function Jc(r) {
7530
7530
  let e = /* @__PURE__ */ Object.create(null);
7531
7531
  return t(ao(r, 0));
7532
7532
  function t(n) {
@@ -7551,7 +7551,7 @@ function Wc(r) {
7551
7551
  return s;
7552
7552
  }
7553
7553
  }
7554
- function Jc(r, e) {
7554
+ function $c(r, e) {
7555
7555
  for (let t = 0, n = [r]; t < n.length; t++) {
7556
7556
  let i = n[t], s = !i.validEnd, o = [];
7557
7557
  for (let a = 0; a < i.next.length; a++) {
@@ -7599,7 +7599,7 @@ function Pa(r, e) {
7599
7599
  let t = /* @__PURE__ */ Object.create(null);
7600
7600
  if (e)
7601
7601
  for (let n in e)
7602
- t[n] = new Kc(r, n, e[n]);
7602
+ t[n] = new Xc(r, n, e[n]);
7603
7603
  return t;
7604
7604
  }
7605
7605
  class wr {
@@ -7781,7 +7781,7 @@ class wr {
7781
7781
  return n;
7782
7782
  }
7783
7783
  }
7784
- function $c(r, e, t) {
7784
+ function Kc(r, e, t) {
7785
7785
  let n = t.split("|");
7786
7786
  return (i) => {
7787
7787
  let s = i === null ? "null" : typeof i;
@@ -7789,9 +7789,9 @@ function $c(r, e, t) {
7789
7789
  throw new RangeError(`Expected value of type ${n} for attribute ${e} on type ${r}, got ${s}`);
7790
7790
  };
7791
7791
  }
7792
- class Kc {
7792
+ class Xc {
7793
7793
  constructor(e, t, n) {
7794
- this.hasDefault = Object.prototype.hasOwnProperty.call(n, "default"), this.default = n.default, this.validate = typeof n.validate == "string" ? $c(e, t, n.validate) : n.validate;
7794
+ this.hasDefault = Object.prototype.hasOwnProperty.call(n, "default"), this.default = n.default, this.validate = typeof n.validate == "string" ? Kc(e, t, n.validate) : n.validate;
7795
7795
  }
7796
7796
  get isRequired() {
7797
7797
  return !this.hasDefault;
@@ -7852,7 +7852,7 @@ class Tr {
7852
7852
  return this.excluded.indexOf(e) > -1;
7853
7853
  }
7854
7854
  }
7855
- let Ip = class {
7855
+ let Op = class {
7856
7856
  /**
7857
7857
  Construct a schema from a schema [specification](https://prosemirror.net/docs/ref/#model.SchemaSpec).
7858
7858
  */
@@ -7951,10 +7951,10 @@ function uo(r, e) {
7951
7951
  }
7952
7952
  return t;
7953
7953
  }
7954
- function Xc(r) {
7954
+ function Yc(r) {
7955
7955
  return r.tag != null;
7956
7956
  }
7957
- function Yc(r) {
7957
+ function Zc(r) {
7958
7958
  return r.style != null;
7959
7959
  }
7960
7960
  class yr {
@@ -7966,9 +7966,9 @@ class yr {
7966
7966
  this.schema = e, this.rules = t, this.tags = [], this.styles = [];
7967
7967
  let n = this.matchedStyles = [];
7968
7968
  t.forEach((i) => {
7969
- if (Xc(i))
7969
+ if (Yc(i))
7970
7970
  this.tags.push(i);
7971
- else if (Yc(i)) {
7971
+ else if (Zc(i)) {
7972
7972
  let s = /[^=]*/.exec(i.style)[0];
7973
7973
  n.indexOf(s) < 0 && n.push(s), this.styles.push(i);
7974
7974
  }
@@ -8004,7 +8004,7 @@ class yr {
8004
8004
  matchTag(e, t, n) {
8005
8005
  for (let i = n ? this.tags.indexOf(n) + 1 : 0; i < this.tags.length; i++) {
8006
8006
  let s = this.tags[i];
8007
- if (ef(e, s.tag) && (s.namespace === void 0 || e.namespaceURI == s.namespace) && (!s.context || t.matchesContext(s.context))) {
8007
+ if (tf(e, s.tag) && (s.namespace === void 0 || e.namespaceURI == s.namespace) && (!s.context || t.matchesContext(s.context))) {
8008
8008
  if (s.getAttrs) {
8009
8009
  let o = s.getAttrs(e);
8010
8010
  if (o === !1)
@@ -8105,7 +8105,7 @@ const Oa = {
8105
8105
  table: !0,
8106
8106
  tfoot: !0,
8107
8107
  ul: !0
8108
- }, Zc = {
8108
+ }, Qc = {
8109
8109
  head: !0,
8110
8110
  noscript: !0,
8111
8111
  object: !0,
@@ -8184,9 +8184,9 @@ class co {
8184
8184
  let i = this.localPreserveWS, s = this.top;
8185
8185
  (e.tagName == "PRE" || /pre/.test(e.style && e.style.whiteSpace)) && (this.localPreserveWS = !0);
8186
8186
  let o = e.nodeName.toLowerCase(), a;
8187
- La.hasOwnProperty(o) && this.parser.normalizeLists && Qc(e);
8187
+ La.hasOwnProperty(o) && this.parser.normalizeLists && ef(e);
8188
8188
  let u = this.options.ruleFromNode && this.options.ruleFromNode(e) || (a = this.parser.matchTag(e, this, n));
8189
- e: if (u ? u.ignore : Zc.hasOwnProperty(o))
8189
+ e: if (u ? u.ignore : Qc.hasOwnProperty(o))
8190
8190
  this.findInside(e), this.ignoreFallback(e, t);
8191
8191
  else if (!u || u.skip || u.closeParent) {
8192
8192
  u && u.closeParent ? this.open = Math.max(0, this.open - 1) : u && u.skip.nodeType && (e = u.skip);
@@ -8423,13 +8423,13 @@ class co {
8423
8423
  }
8424
8424
  }
8425
8425
  }
8426
- function Qc(r) {
8426
+ function ef(r) {
8427
8427
  for (let e = r.firstChild, t = null; e; e = e.nextSibling) {
8428
8428
  let n = e.nodeType == 1 ? e.nodeName.toLowerCase() : null;
8429
8429
  n && La.hasOwnProperty(n) && t ? (t.appendChild(e), e = t) : n == "li" ? t = e : n && (t = null);
8430
8430
  }
8431
8431
  }
8432
- function ef(r, e) {
8432
+ function tf(r, e) {
8433
8433
  return (r.matches || r.msMatchesSelector || r.webkitMatchesSelector || r.mozMatchesSelector).call(r, e);
8434
8434
  }
8435
8435
  function fo(r) {
@@ -8572,11 +8572,11 @@ function ei(r) {
8572
8572
  return r.document || window.document;
8573
8573
  }
8574
8574
  const ho = /* @__PURE__ */ new WeakMap();
8575
- function tf(r) {
8575
+ function rf(r) {
8576
8576
  let e = ho.get(r);
8577
- return e === void 0 && ho.set(r, e = rf(r)), e;
8577
+ return e === void 0 && ho.set(r, e = nf(r)), e;
8578
8578
  }
8579
- function rf(r) {
8579
+ function nf(r) {
8580
8580
  let e = null;
8581
8581
  function t(n) {
8582
8582
  if (n && typeof n == "object")
@@ -8602,7 +8602,7 @@ function lr(r, e, t, n) {
8602
8602
  let i = e[0], s;
8603
8603
  if (typeof i != "string")
8604
8604
  throw new RangeError("Invalid array passed to renderSpec");
8605
- if (n && (s = tf(n)) && s.indexOf(e) > -1)
8605
+ if (n && (s = rf(n)) && s.indexOf(e) > -1)
8606
8606
  throw new RangeError("Using an array from an attribute object as a DOM spec. This may be an attempted cross site scripting attack.");
8607
8607
  let o = i.indexOf(" ");
8608
8608
  o > 0 && (t = i.slice(0, o), i = i.slice(o + 1));
@@ -8633,13 +8633,13 @@ function lr(r, e, t, n) {
8633
8633
  return { dom: u, contentDOM: a };
8634
8634
  }
8635
8635
  const qa = 65535, Ma = Math.pow(2, 16);
8636
- function nf(r, e) {
8636
+ function sf(r, e) {
8637
8637
  return r + e * Ma;
8638
8638
  }
8639
8639
  function go(r) {
8640
8640
  return r & qa;
8641
8641
  }
8642
- function sf(r) {
8642
+ function of(r) {
8643
8643
  return (r - (r & qa)) / Ma;
8644
8644
  }
8645
8645
  const Ua = 1, ja = 2, cr = 4, Ha = 8;
@@ -8697,7 +8697,7 @@ class He {
8697
8697
  if (!this.inverted)
8698
8698
  for (let i = 0; i < n; i++)
8699
8699
  t += this.ranges[i * 3 + 2] - this.ranges[i * 3 + 1];
8700
- return this.ranges[n * 3] + t + sf(e);
8700
+ return this.ranges[n * 3] + t + of(e);
8701
8701
  }
8702
8702
  mapResult(e, t = 1) {
8703
8703
  return this._map(e, t, !1);
@@ -8719,7 +8719,7 @@ class He {
8719
8719
  let g = c ? e == u ? -1 : e == h ? 1 : t : t, E = u + i + (g < 0 ? 0 : l);
8720
8720
  if (n)
8721
8721
  return E;
8722
- let A = e == (t < 0 ? u : h) ? null : nf(a / 3, e - u), v = e == u ? ja : e == h ? Ua : cr;
8722
+ let A = e == (t < 0 ? u : h) ? null : sf(a / 3, e - u), v = e == u ? ja : e == h ? Ua : cr;
8723
8723
  return (t < 0 ? e != u : e != h) && (v |= Ha), new di(E, v, A);
8724
8724
  }
8725
8725
  i += l - c;
@@ -8967,7 +8967,7 @@ function Bi(r, e, t) {
8967
8967
  }
8968
8968
  return Q.fromArray(n);
8969
8969
  }
8970
- class ct extends Oe {
8970
+ class ft extends Oe {
8971
8971
  /**
8972
8972
  Create a mark step.
8973
8973
  */
@@ -8983,10 +8983,10 @@ class ct extends Oe {
8983
8983
  }
8984
8984
  map(e) {
8985
8985
  let t = e.mapResult(this.from, 1), n = e.mapResult(this.to, -1);
8986
- return t.deleted && n.deleted || t.pos >= n.pos ? null : new ct(t.pos, n.pos, this.mark);
8986
+ return t.deleted && n.deleted || t.pos >= n.pos ? null : new ft(t.pos, n.pos, this.mark);
8987
8987
  }
8988
8988
  merge(e) {
8989
- return e instanceof ct && e.mark.eq(this.mark) && this.from <= e.to && this.to >= e.from ? new ct(Math.min(this.from, e.from), Math.max(this.to, e.to), this.mark) : null;
8989
+ return e instanceof ft && e.mark.eq(this.mark) && this.from <= e.to && this.to >= e.from ? new ft(Math.min(this.from, e.from), Math.max(this.to, e.to), this.mark) : null;
8990
8990
  }
8991
8991
  toJSON() {
8992
8992
  return {
@@ -9002,10 +9002,10 @@ class ct extends Oe {
9002
9002
  static fromJSON(e, t) {
9003
9003
  if (typeof t.from != "number" || typeof t.to != "number")
9004
9004
  throw new RangeError("Invalid input for AddMarkStep.fromJSON");
9005
- return new ct(t.from, t.to, e.markFromJSON(t.mark));
9005
+ return new ft(t.from, t.to, e.markFromJSON(t.mark));
9006
9006
  }
9007
9007
  }
9008
- Oe.jsonID("addMark", ct);
9008
+ Oe.jsonID("addMark", ft);
9009
9009
  class et extends Oe {
9010
9010
  /**
9011
9011
  Create a mark-removing step.
@@ -9018,7 +9018,7 @@ class et extends Oe {
9018
9018
  return Ce.fromReplace(e, this.from, this.to, n);
9019
9019
  }
9020
9020
  invert() {
9021
- return new ct(this.from, this.to, this.mark);
9021
+ return new ft(this.from, this.to, this.mark);
9022
9022
  }
9023
9023
  map(e) {
9024
9024
  let t = e.mapResult(this.from, 1), n = e.mapResult(this.to, -1);
@@ -9045,7 +9045,7 @@ class et extends Oe {
9045
9045
  }
9046
9046
  }
9047
9047
  Oe.jsonID("removeMark", et);
9048
- class ft extends Oe {
9048
+ class dt extends Oe {
9049
9049
  /**
9050
9050
  Create a node mark step.
9051
9051
  */
@@ -9066,15 +9066,15 @@ class ft extends Oe {
9066
9066
  if (n.length == t.marks.length) {
9067
9067
  for (let i = 0; i < t.marks.length; i++)
9068
9068
  if (!t.marks[i].isInSet(n))
9069
- return new ft(this.pos, t.marks[i]);
9070
- return new ft(this.pos, this.mark);
9069
+ return new dt(this.pos, t.marks[i]);
9070
+ return new dt(this.pos, this.mark);
9071
9071
  }
9072
9072
  }
9073
9073
  return new bt(this.pos, this.mark);
9074
9074
  }
9075
9075
  map(e) {
9076
9076
  let t = e.mapResult(this.pos, 1);
9077
- return t.deletedAfter ? null : new ft(t.pos, this.mark);
9077
+ return t.deletedAfter ? null : new dt(t.pos, this.mark);
9078
9078
  }
9079
9079
  toJSON() {
9080
9080
  return { stepType: "addNodeMark", pos: this.pos, mark: this.mark.toJSON() };
@@ -9085,10 +9085,10 @@ class ft extends Oe {
9085
9085
  static fromJSON(e, t) {
9086
9086
  if (typeof t.pos != "number")
9087
9087
  throw new RangeError("Invalid input for AddNodeMarkStep.fromJSON");
9088
- return new ft(t.pos, e.markFromJSON(t.mark));
9088
+ return new dt(t.pos, e.markFromJSON(t.mark));
9089
9089
  }
9090
9090
  }
9091
- Oe.jsonID("addNodeMark", ft);
9091
+ Oe.jsonID("addNodeMark", dt);
9092
9092
  class bt extends Oe {
9093
9093
  /**
9094
9094
  Create a mark-removing step.
@@ -9105,7 +9105,7 @@ class bt extends Oe {
9105
9105
  }
9106
9106
  invert(e) {
9107
9107
  let t = e.nodeAt(this.pos);
9108
- return !t || !this.mark.isInSet(t.marks) ? this : new ft(this.pos, this.mark);
9108
+ return !t || !this.mark.isInSet(t.marks) ? this : new dt(this.pos, this.mark);
9109
9109
  }
9110
9110
  map(e) {
9111
9111
  let t = e.mapResult(this.pos, 1);
@@ -9248,7 +9248,7 @@ function mi(r, e, t) {
9248
9248
  }
9249
9249
  return !1;
9250
9250
  }
9251
- function of(r, e, t, n) {
9251
+ function af(r, e, t, n) {
9252
9252
  let i = [], s = [], o, a;
9253
9253
  r.doc.nodesBetween(e, t, (u, c, l) => {
9254
9254
  if (!u.isInline)
@@ -9258,11 +9258,11 @@ function of(r, e, t, n) {
9258
9258
  let g = Math.max(c, e), E = Math.min(c + u.nodeSize, t), A = n.addToSet(h);
9259
9259
  for (let v = 0; v < h.length; v++)
9260
9260
  h[v].isInSet(A) || (o && o.to == g && o.mark.eq(h[v]) ? o.to = E : i.push(o = new et(g, E, h[v])));
9261
- a && a.to == g ? a.to = E : s.push(a = new ct(g, E, n));
9261
+ a && a.to == g ? a.to = E : s.push(a = new ft(g, E, n));
9262
9262
  }
9263
9263
  }), i.forEach((u) => r.step(u)), s.forEach((u) => r.step(u));
9264
9264
  }
9265
- function af(r, e, t, n) {
9265
+ function uf(r, e, t, n) {
9266
9266
  let i = [], s = 0;
9267
9267
  r.doc.nodesBetween(e, t, (o, a) => {
9268
9268
  if (!o.isInline)
@@ -9312,21 +9312,21 @@ function ki(r, e, t, n = t.contentMatch, i = !0) {
9312
9312
  for (let u = o.length - 1; u >= 0; u--)
9313
9313
  r.step(o[u]);
9314
9314
  }
9315
- function uf(r, e, t) {
9315
+ function lf(r, e, t) {
9316
9316
  return (e == 0 || r.canReplace(e, r.childCount)) && (t == r.childCount || r.canReplace(0, t));
9317
9317
  }
9318
- function Pp(r) {
9318
+ function _p(r) {
9319
9319
  let t = r.parent.content.cutByIndex(r.startIndex, r.endIndex);
9320
9320
  for (let n = r.depth; ; --n) {
9321
9321
  let i = r.$from.node(n), s = r.$from.index(n), o = r.$to.indexAfter(n);
9322
9322
  if (n < r.depth && i.canReplace(s, o, t))
9323
9323
  return n;
9324
- if (n == 0 || i.type.spec.isolating || !uf(i, s, o))
9324
+ if (n == 0 || i.type.spec.isolating || !lf(i, s, o))
9325
9325
  break;
9326
9326
  }
9327
9327
  return null;
9328
9328
  }
9329
- function lf(r, e, t) {
9329
+ function cf(r, e, t) {
9330
9330
  let { $from: n, $to: i, depth: s } = e, o = n.before(s + 1), a = i.after(s + 1), u = o, c = a, l = Q.empty, h = 0;
9331
9331
  for (let A = s, v = !1; A > t; A--)
9332
9332
  v || n.index(A) > 0 ? (v = !0, l = Q.from(n.node(A).copy(l)), h++) : u--;
@@ -9335,21 +9335,21 @@ function lf(r, e, t) {
9335
9335
  v || i.after(A + 1) < i.end(A) ? (v = !0, g = Q.from(i.node(A).copy(g)), E++) : c++;
9336
9336
  r.step(new $e(u, c, o, a, new ae(l.append(g), h, E), l.size - h, !0));
9337
9337
  }
9338
- function Op(r, e, t = null, n = r) {
9339
- let i = cf(r, e), s = i && ff(n, e);
9338
+ function qp(r, e, t = null, n = r) {
9339
+ let i = ff(r, e), s = i && df(n, e);
9340
9340
  return s ? i.map(wo).concat({ type: e, attrs: t }).concat(s.map(wo)) : null;
9341
9341
  }
9342
9342
  function wo(r) {
9343
9343
  return { type: r, attrs: null };
9344
9344
  }
9345
- function cf(r, e) {
9345
+ function ff(r, e) {
9346
9346
  let { parent: t, startIndex: n, endIndex: i } = r, s = t.contentMatchAt(n).findWrapping(e);
9347
9347
  if (!s)
9348
9348
  return null;
9349
9349
  let o = s.length ? s[0] : e;
9350
9350
  return t.canReplaceWith(n, i, o) ? s : null;
9351
9351
  }
9352
- function ff(r, e) {
9352
+ function df(r, e) {
9353
9353
  let { parent: t, startIndex: n, endIndex: i } = r, s = t.child(n), o = e.contentMatch.findWrapping(s.type);
9354
9354
  if (!o)
9355
9355
  return null;
@@ -9358,7 +9358,7 @@ function ff(r, e) {
9358
9358
  u = u.matchType(t.child(c).type);
9359
9359
  return !u || !u.validEnd ? null : o;
9360
9360
  }
9361
- function df(r, e, t) {
9361
+ function mf(r, e, t) {
9362
9362
  let n = Q.empty;
9363
9363
  for (let o = t.length - 1; o >= 0; o--) {
9364
9364
  if (n.size) {
@@ -9371,13 +9371,13 @@ function df(r, e, t) {
9371
9371
  let i = e.start, s = e.end;
9372
9372
  r.step(new $e(i, s, i, s, new ae(n, 0, 0), t.length, !0));
9373
9373
  }
9374
- function mf(r, e, t, n, i) {
9374
+ function pf(r, e, t, n, i) {
9375
9375
  if (!n.isTextblock)
9376
9376
  throw new RangeError("Type given to setBlockType should be a textblock");
9377
9377
  let s = r.steps.length;
9378
9378
  r.doc.nodesBetween(e, t, (o, a) => {
9379
9379
  let u = typeof i == "function" ? i(o) : i;
9380
- if (o.isTextblock && !o.hasMarkup(n, u) && pf(r.doc, r.mapping.slice(s).map(a), n)) {
9380
+ if (o.isTextblock && !o.hasMarkup(n, u) && hf(r.doc, r.mapping.slice(s).map(a), n)) {
9381
9381
  let c = null;
9382
9382
  if (n.schema.linebreakReplacement) {
9383
9383
  let E = n.whitespace == "pre", A = !!n.contentMatch.matchType(n.schema.linebreakReplacement);
@@ -9409,11 +9409,11 @@ function za(r, e, t, n) {
9409
9409
  }
9410
9410
  });
9411
9411
  }
9412
- function pf(r, e, t) {
9412
+ function hf(r, e, t) {
9413
9413
  let n = r.resolve(e), i = n.index();
9414
9414
  return n.parent.canReplaceWith(i, i + 1, t);
9415
9415
  }
9416
- function hf(r, e, t, n, i) {
9416
+ function gf(r, e, t, n, i) {
9417
9417
  let s = r.doc.nodeAt(e);
9418
9418
  if (!s)
9419
9419
  throw new RangeError("No node at given position");
@@ -9425,7 +9425,7 @@ function hf(r, e, t, n, i) {
9425
9425
  throw new RangeError("Invalid content for node type " + t.name);
9426
9426
  r.step(new $e(e, e + s.nodeSize, e + 1, e + s.nodeSize - 1, new ae(Q.from(o), 0, 0), 1, !0));
9427
9427
  }
9428
- function Lp(r, e, t = 1, n) {
9428
+ function Mp(r, e, t = 1, n) {
9429
9429
  let i = r.resolve(e), s = i.depth - t, o = n && n[n.length - 1] || i.parent;
9430
9430
  if (s < 0 || i.parent.type.spec.isolating || !i.parent.canReplace(i.index(), i.parent.childCount) || !o.type.validContent(i.parent.content.cutByIndex(i.index(), i.parent.childCount)))
9431
9431
  return !1;
@@ -9442,7 +9442,7 @@ function Lp(r, e, t = 1, n) {
9442
9442
  let a = i.indexAfter(s), u = n && n[0];
9443
9443
  return i.node(s).canReplaceWith(a, a, u ? u.type : i.node(s + 1).type);
9444
9444
  }
9445
- function gf(r, e, t = 1, n) {
9445
+ function wf(r, e, t = 1, n) {
9446
9446
  let i = r.doc.resolve(e), s = Q.empty, o = Q.empty;
9447
9447
  for (let a = i.depth, u = i.depth - t, c = t - 1; a > u; a--, c--) {
9448
9448
  s = Q.from(i.node(a).copy(s));
@@ -9451,11 +9451,11 @@ function gf(r, e, t = 1, n) {
9451
9451
  }
9452
9452
  r.step(new Ie(e, e, new ae(s.append(o), t, t), !0));
9453
9453
  }
9454
- function _p(r, e) {
9454
+ function Up(r, e) {
9455
9455
  let t = r.resolve(e), n = t.index();
9456
9456
  return Ga(t.nodeBefore, t.nodeAfter) && t.parent.canReplace(n, n + 1);
9457
9457
  }
9458
- function wf(r, e) {
9458
+ function yf(r, e) {
9459
9459
  e.content.size || r.type.compatibleContent(e.type);
9460
9460
  let t = r.contentMatchAt(r.childCount), { linebreakReplacement: n } = r.type.schema;
9461
9461
  for (let i = 0; i < e.childCount; i++) {
@@ -9466,9 +9466,9 @@ function wf(r, e) {
9466
9466
  return t.validEnd;
9467
9467
  }
9468
9468
  function Ga(r, e) {
9469
- return !!(r && e && !r.isLeaf && wf(r, e));
9469
+ return !!(r && e && !r.isLeaf && yf(r, e));
9470
9470
  }
9471
- function qp(r, e, t = -1) {
9471
+ function jp(r, e, t = -1) {
9472
9472
  let n = r.resolve(e);
9473
9473
  for (let i = n.depth; ; i--) {
9474
9474
  let s, o, a = n.index(i);
@@ -9479,7 +9479,7 @@ function qp(r, e, t = -1) {
9479
9479
  e = t < 0 ? n.before(i) : n.after(i);
9480
9480
  }
9481
9481
  }
9482
- function yf(r, e, t) {
9482
+ function bf(r, e, t) {
9483
9483
  let n = null, { linebreakReplacement: i } = r.doc.type.schema, s = r.doc.resolve(e - t), o = s.node().type;
9484
9484
  if (i && o.inlineContent) {
9485
9485
  let l = o.whitespace == "pre", h = !!o.contentMatch.matchType(i);
@@ -9498,7 +9498,7 @@ function yf(r, e, t) {
9498
9498
  }
9499
9499
  return r;
9500
9500
  }
9501
- function bf(r, e, t) {
9501
+ function xf(r, e, t) {
9502
9502
  let n = r.resolve(e);
9503
9503
  if (n.parent.canReplaceWith(n.index(), n.index(), t))
9504
9504
  return e;
@@ -9520,7 +9520,7 @@ function bf(r, e, t) {
9520
9520
  }
9521
9521
  return null;
9522
9522
  }
9523
- function Mp(r, e, t) {
9523
+ function Hp(r, e, t) {
9524
9524
  let n = r.resolve(e);
9525
9525
  if (!t.content.size)
9526
9526
  return e;
@@ -9541,16 +9541,16 @@ function Mp(r, e, t) {
9541
9541
  }
9542
9542
  return null;
9543
9543
  }
9544
- function xf(r, e, t = e, n = ae.empty) {
9544
+ function Af(r, e, t = e, n = ae.empty) {
9545
9545
  if (e == t && !n.size)
9546
9546
  return null;
9547
9547
  let i = r.resolve(e), s = r.resolve(t);
9548
- return Wa(i, s, n) ? new Ie(e, t, n) : new Af(i, s, n).fit();
9548
+ return Wa(i, s, n) ? new Ie(e, t, n) : new Df(i, s, n).fit();
9549
9549
  }
9550
9550
  function Wa(r, e, t) {
9551
9551
  return !t.openStart && !t.openEnd && r.start() == e.start() && r.parent.canReplace(r.index(), e.index(), t.content);
9552
9552
  }
9553
- class Af {
9553
+ class Df {
9554
9554
  constructor(e, t, n) {
9555
9555
  this.$from = e, this.$to = t, this.unplaced = n, this.frontier = [], this.placed = Q.empty;
9556
9556
  for (let i = 0; i <= e.depth; i++) {
@@ -9719,18 +9719,18 @@ function ni(r, e, t, n, i) {
9719
9719
  if (o == s.childCount && !t.compatibleContent(s.type))
9720
9720
  return null;
9721
9721
  let a = n.fillBefore(s.content, !0, o);
9722
- return a && !Df(t, s.content, o) ? a : null;
9722
+ return a && !vf(t, s.content, o) ? a : null;
9723
9723
  }
9724
- function Df(r, e, t) {
9724
+ function vf(r, e, t) {
9725
9725
  for (let n = t; n < e.childCount; n++)
9726
9726
  if (!r.allowsMarks(e.child(n).marks))
9727
9727
  return !0;
9728
9728
  return !1;
9729
9729
  }
9730
- function vf(r) {
9730
+ function Ef(r) {
9731
9731
  return r.spec.defining || r.spec.definingForContent;
9732
9732
  }
9733
- function Ef(r, e, t, n) {
9733
+ function Cf(r, e, t, n) {
9734
9734
  if (!n.size)
9735
9735
  return r.deleteRange(e, t);
9736
9736
  let i = r.doc.resolve(e), s = r.doc.resolve(t);
@@ -9754,7 +9754,7 @@ function Ef(r, e, t, n) {
9754
9754
  g = A.content;
9755
9755
  }
9756
9756
  for (let g = l - 1; g >= 0; g--) {
9757
- let E = c[g], A = vf(E.type);
9757
+ let E = c[g], A = Ef(E.type);
9758
9758
  if (A && !E.sameMarkup(i.node(Math.abs(a) - 1)))
9759
9759
  l = g;
9760
9760
  else if (A || !E.type.isTextblock)
@@ -9788,14 +9788,14 @@ function $a(r, e, t, n, i) {
9788
9788
  }
9789
9789
  return r;
9790
9790
  }
9791
- function Cf(r, e, t, n) {
9791
+ function Sf(r, e, t, n) {
9792
9792
  if (!n.isInline && e == t && r.doc.resolve(e).parent.content.size) {
9793
- let i = bf(r.doc, e, n.type);
9793
+ let i = xf(r.doc, e, n.type);
9794
9794
  i != null && (e = t = i);
9795
9795
  }
9796
9796
  r.replaceRange(e, t, new ae(Q.from(n), 0, 0));
9797
9797
  }
9798
- function Sf(r, e, t) {
9798
+ function Tf(r, e, t) {
9799
9799
  let n = r.doc.resolve(e), i = r.doc.resolve(t), s = Ka(n, i);
9800
9800
  for (let o = 0; o < s.length; o++) {
9801
9801
  let a = s[o], u = o == s.length - 1;
@@ -9900,7 +9900,7 @@ Nt = function r(e) {
9900
9900
  Nt.prototype = Object.create(Error.prototype);
9901
9901
  Nt.prototype.constructor = Nt;
9902
9902
  Nt.prototype.name = "TransformError";
9903
- class Tf {
9903
+ class Ff {
9904
9904
  /**
9905
9905
  Create a transform that starts with the given document.
9906
9906
  */
@@ -9949,7 +9949,7 @@ class Tf {
9949
9949
  given `slice`.
9950
9950
  */
9951
9951
  replace(e, t = e, n = ae.empty) {
9952
- let i = xf(this.doc, e, t, n);
9952
+ let i = Af(this.doc, e, t, n);
9953
9953
  return i && this.step(i), this;
9954
9954
  }
9955
9955
  /**
@@ -9991,7 +9991,7 @@ class Tf {
9991
9991
  control over what happens.
9992
9992
  */
9993
9993
  replaceRange(e, t, n) {
9994
- return Ef(this, e, t, n), this;
9994
+ return Cf(this, e, t, n), this;
9995
9995
  }
9996
9996
  /**
9997
9997
  Replace the given range with a node, but use `from` and `to` as
@@ -10003,14 +10003,14 @@ class Tf {
10003
10003
  that parent node.
10004
10004
  */
10005
10005
  replaceRangeWith(e, t, n) {
10006
- return Cf(this, e, t, n), this;
10006
+ return Sf(this, e, t, n), this;
10007
10007
  }
10008
10008
  /**
10009
10009
  Delete the given range, expanding it to cover fully covered
10010
10010
  parent nodes until a valid replace is found.
10011
10011
  */
10012
10012
  deleteRange(e, t) {
10013
- return Sf(this, e, t), this;
10013
+ return Tf(this, e, t), this;
10014
10014
  }
10015
10015
  /**
10016
10016
  Split the content in the given range off from its parent, if there
@@ -10020,14 +10020,14 @@ class Tf {
10020
10020
  sure the lift is valid.
10021
10021
  */
10022
10022
  lift(e, t) {
10023
- return lf(this, e, t), this;
10023
+ return cf(this, e, t), this;
10024
10024
  }
10025
10025
  /**
10026
10026
  Join the blocks around the given position. If depth is 2, their
10027
10027
  last and first siblings are also joined, and so on.
10028
10028
  */
10029
10029
  join(e, t = 1) {
10030
- return yf(this, e, t), this;
10030
+ return bf(this, e, t), this;
10031
10031
  }
10032
10032
  /**
10033
10033
  Wrap the given [range](https://prosemirror.net/docs/ref/#model.NodeRange) in the given set of wrappers.
@@ -10035,21 +10035,21 @@ class Tf {
10035
10035
  probably be computed with [`findWrapping`](https://prosemirror.net/docs/ref/#transform.findWrapping).
10036
10036
  */
10037
10037
  wrap(e, t) {
10038
- return df(this, e, t), this;
10038
+ return mf(this, e, t), this;
10039
10039
  }
10040
10040
  /**
10041
10041
  Set the type of all textblocks (partly) between `from` and `to` to
10042
10042
  the given node type with the given attributes.
10043
10043
  */
10044
10044
  setBlockType(e, t = e, n, i = null) {
10045
- return mf(this, e, t, n, i), this;
10045
+ return pf(this, e, t, n, i), this;
10046
10046
  }
10047
10047
  /**
10048
10048
  Change the type, attributes, and/or marks of the node at `pos`.
10049
10049
  When `type` isn't given, the existing node type is preserved,
10050
10050
  */
10051
10051
  setNodeMarkup(e, t, n = null, i) {
10052
- return hf(this, e, t, n, i), this;
10052
+ return gf(this, e, t, n, i), this;
10053
10053
  }
10054
10054
  /**
10055
10055
  Set a single attribute on a given node to a new value.
@@ -10069,7 +10069,7 @@ class Tf {
10069
10069
  Add a mark to the node at position `pos`.
10070
10070
  */
10071
10071
  addNodeMark(e, t) {
10072
- return this.step(new ft(e, t)), this;
10072
+ return this.step(new dt(e, t)), this;
10073
10073
  }
10074
10074
  /**
10075
10075
  Remove a mark (or all marks of the given type) from the node at
@@ -10098,13 +10098,13 @@ class Tf {
10098
10098
  use after the split (with the outermost nodes coming first).
10099
10099
  */
10100
10100
  split(e, t = 1, n) {
10101
- return gf(this, e, t, n), this;
10101
+ return wf(this, e, t, n), this;
10102
10102
  }
10103
10103
  /**
10104
10104
  Add the given mark to the inline content between `from` and `to`.
10105
10105
  */
10106
10106
  addMark(e, t, n) {
10107
- return of(this, e, t, n), this;
10107
+ return af(this, e, t, n), this;
10108
10108
  }
10109
10109
  /**
10110
10110
  Remove marks from inline nodes between `from` and `to`. When
@@ -10113,7 +10113,7 @@ class Tf {
10113
10113
  remove all marks of any type.
10114
10114
  */
10115
10115
  removeMark(e, t, n) {
10116
- return af(this, e, t, n), this;
10116
+ return uf(this, e, t, n), this;
10117
10117
  }
10118
10118
  /**
10119
10119
  Removes all marks and nodes from the content of the node at
@@ -10133,7 +10133,7 @@ class Ee {
10133
10133
  `$head`.
10134
10134
  */
10135
10135
  constructor(e, t, n) {
10136
- this.$anchor = e, this.$head = t, this.ranges = n || [new Ff(e.min(t), e.max(t))];
10136
+ this.$anchor = e, this.$head = t, this.ranges = n || [new Bf(e.min(t), e.max(t))];
10137
10137
  }
10138
10138
  /**
10139
10139
  The selection's anchor, as an unresolved position.
@@ -10291,7 +10291,7 @@ class Ee {
10291
10291
  }
10292
10292
  }
10293
10293
  Ee.prototype.visible = !0;
10294
- class Ff {
10294
+ class Bf {
10295
10295
  /**
10296
10296
  Create a range.
10297
10297
  */
@@ -10479,11 +10479,11 @@ class at extends Ee {
10479
10479
  return e instanceof at;
10480
10480
  }
10481
10481
  getBookmark() {
10482
- return Bf;
10482
+ return kf;
10483
10483
  }
10484
10484
  }
10485
10485
  Ee.jsonID("all", at);
10486
- const Bf = {
10486
+ const kf = {
10487
10487
  map() {
10488
10488
  return this;
10489
10489
  },
@@ -10521,7 +10521,7 @@ function xo(r, e, t) {
10521
10521
  }), r.setSelection(Ee.near(r.doc.resolve(o), t));
10522
10522
  }
10523
10523
  const Ao = 1, Do = 2, vo = 4;
10524
- class kf extends Tf {
10524
+ class Nf extends Ff {
10525
10525
  /**
10526
10526
  @internal
10527
10527
  */
@@ -10680,7 +10680,7 @@ class Ht {
10680
10680
  this.name = e, this.init = Eo(t.init, n), this.apply = Eo(t.apply, n);
10681
10681
  }
10682
10682
  }
10683
- const Nf = [
10683
+ const If = [
10684
10684
  new Ht("doc", {
10685
10685
  init(r) {
10686
10686
  return r.doc || r.schema.topNodeType.createAndFill();
@@ -10716,7 +10716,7 @@ const Nf = [
10716
10716
  ];
10717
10717
  class si {
10718
10718
  constructor(e, t) {
10719
- this.schema = e, this.plugins = [], this.pluginsByKey = /* @__PURE__ */ Object.create(null), this.fields = Nf.slice(), t && t.forEach((n) => {
10719
+ this.schema = e, this.plugins = [], this.pluginsByKey = /* @__PURE__ */ Object.create(null), this.fields = If.slice(), t && t.forEach((n) => {
10720
10720
  if (this.pluginsByKey[n.key])
10721
10721
  throw new RangeError("Adding different instances of a keyed plugin (" + n.key + ")");
10722
10722
  this.plugins.push(n), this.pluginsByKey[n.key] = n, n.spec.state && this.fields.push(new Ht(n.key, n.spec.state, n));
@@ -10809,7 +10809,7 @@ class Ct {
10809
10809
  Start a [transaction](https://prosemirror.net/docs/ref/#state.Transaction) from this state.
10810
10810
  */
10811
10811
  get tr() {
10812
- return new kf(this);
10812
+ return new Nf(this);
10813
10813
  }
10814
10814
  /**
10815
10815
  Create a new state.
@@ -10895,7 +10895,7 @@ function Xa(r, e, t) {
10895
10895
  }
10896
10896
  return t;
10897
10897
  }
10898
- class Up {
10898
+ class Vp {
10899
10899
  /**
10900
10900
  Create a plugin.
10901
10901
  */
@@ -10913,7 +10913,7 @@ const oi = /* @__PURE__ */ Object.create(null);
10913
10913
  function Ya(r) {
10914
10914
  return r in oi ? r + "$" + ++oi[r] : (oi[r] = 0, r + "$");
10915
10915
  }
10916
- class jp {
10916
+ class zp {
10917
10917
  /**
10918
10918
  Create a plugin key.
10919
10919
  */
@@ -10934,7 +10934,7 @@ class jp {
10934
10934
  return e[this.key];
10935
10935
  }
10936
10936
  }
10937
- const Za = (r) => r.replace(/[A-Z]/g, (e) => `-${e.toLowerCase()}`), Hp = (r) => Za(r), Vp = Object.freeze({
10937
+ const Za = (r) => r.replace(/[A-Z]/g, (e) => `-${e.toLowerCase()}`), Gp = (r) => Za(r), Wp = Object.freeze({
10938
10938
  RESOLVED: "resolved",
10939
10939
  NEW: "new",
10940
10940
  ADD: "add",
@@ -10947,7 +10947,7 @@ const Za = (r) => r.replace(/[A-Z]/g, (e) => `-${e.toLowerCase()}`), Hp = (r) =>
10947
10947
  // Tracked changes
10948
10948
  CHANGE_ACCEPTED: "change-accepted",
10949
10949
  CHANGE_REJECTED: "change-rejected"
10950
- }), zp = {
10950
+ }), Jp = {
10951
10951
  mounted(r, e, t) {
10952
10952
  const n = (i) => {
10953
10953
  r.contains(i.target) || e.value(i);
@@ -10958,29 +10958,29 @@ const Za = (r) => r.replace(/[A-Z]/g, (e) => `-${e.toLowerCase()}`), Hp = (r) =>
10958
10958
  document.removeEventListener("click", r.__clickOutsideHandler), delete r.__clickOutsideHandler;
10959
10959
  }
10960
10960
  };
10961
- function Gp(r, e = null, ...t) {
10961
+ function $p(r, e = null, ...t) {
10962
10962
  return typeof r == "function" ? e ? r.bind(e)(...t) : r(...t) : r;
10963
10963
  }
10964
- function Wp(r = {}) {
10964
+ function Kp(r = {}) {
10965
10965
  return Object.keys(r).length === 0 && r.constructor === Object;
10966
10966
  }
10967
- const Jp = () => typeof navigator < "u" ? /Mac/.test(navigator.platform) : !1, $p = () => ["iPad Simulator", "iPhone Simulator", "iPod Simulator", "iPad", "iPhone", "iPod"].includes(
10967
+ const Xp = () => typeof navigator < "u" ? /Mac/.test(navigator.platform) : !1, Yp = () => ["iPad Simulator", "iPhone Simulator", "iPod Simulator", "iPad", "iPhone", "iPod"].includes(
10968
10968
  navigator.platform
10969
- ), If = (r) => Object.prototype.toString.call(r) === "[object RegExp]";
10970
- function Rf(r, e, t = { strict: !0 }) {
10969
+ ), Rf = (r) => Object.prototype.toString.call(r) === "[object RegExp]";
10970
+ function Pf(r, e, t = { strict: !0 }) {
10971
10971
  const n = Object.keys(e);
10972
- return n.length ? n.every((i) => t.strict ? e[i] === r[i] : If(e[i]) ? e[i].test(r[i]) : e[i] === r[i]) : !0;
10972
+ return n.length ? n.every((i) => t.strict ? e[i] === r[i] : Rf(e[i]) ? e[i].test(r[i]) : e[i] === r[i]) : !0;
10973
10973
  }
10974
- function Kp(r, e) {
10974
+ function Zp(r, e) {
10975
10975
  const n = typeof e == "string" ? [e] : e;
10976
10976
  return Object.keys(r).reduce((i, s) => (n.includes(s) || (i[s] = r[s]), i), {});
10977
10977
  }
10978
- const Pf = /[\d-.]+(\w+)$/, Of = ["px", "rem", "em", "in", "q", "mm", "cm", "pt", "pc", "vh", "vw", "vmin", "vmax"];
10979
- function Lf(r = "0") {
10980
- const e = r.toString() || "0", t = Number.parseFloat(e), i = (e.match(Pf)?.[1] ?? "").toLowerCase();
10981
- return [t, Of.includes(i) ? i : null];
10978
+ const Of = /[\d-.]+(\w+)$/, Lf = ["px", "rem", "em", "in", "q", "mm", "cm", "pt", "pc", "vh", "vw", "vmin", "vmax"];
10979
+ function _f(r = "0") {
10980
+ const e = r.toString() || "0", t = Number.parseFloat(e), i = (e.match(Of)?.[1] ?? "").toLowerCase();
10981
+ return [t, Lf.includes(i) ? i : null];
10982
10982
  }
10983
- function Xp(r = 0, e = 0, t = 0) {
10983
+ function Qp(r = 0, e = 0, t = 0) {
10984
10984
  return Math.min(Math.max(r, e), t);
10985
10985
  }
10986
10986
  function It(r) {
@@ -11007,7 +11007,7 @@ function pi(r) {
11007
11007
  if (r != null)
11008
11008
  return r * 240;
11009
11009
  }
11010
- function _f(r) {
11010
+ function qf(r) {
11011
11011
  if (r != null)
11012
11012
  return Math.round(r / 2);
11013
11013
  }
@@ -11032,11 +11032,11 @@ function tu(r) {
11032
11032
  if (r != null)
11033
11033
  return r / 20;
11034
11034
  }
11035
- function qf(r) {
11035
+ function Mf(r) {
11036
11036
  if (r != null)
11037
11037
  return r * 20;
11038
11038
  }
11039
- const Mf = async (r, e) => {
11039
+ const Uf = async (r, e) => {
11040
11040
  const t = /^https?:|^blob:|^file:|^data:/i.test(r);
11041
11041
  if (e && t && typeof fetch == "function") {
11042
11042
  const s = await fetch(r);
@@ -11056,10 +11056,10 @@ const Mf = async (r, e) => {
11056
11056
  }
11057
11057
  const i = St.from(n, "base64");
11058
11058
  return i.buffer.slice(i.byteOffset, i.byteOffset + i.byteLength);
11059
- }, Yp = (r) => {
11059
+ }, eh = (r) => {
11060
11060
  const n = new window.DOMParser().parseFromString(r, "text/xml").querySelectorAll("Default");
11061
11061
  return Array.from(n).map((i) => i.getAttribute("Extension"));
11062
- }, Uf = (r) => (/* @__PURE__ */ new Map([
11062
+ }, jf = (r) => (/* @__PURE__ */ new Map([
11063
11063
  ["yellow", "#ffff00"],
11064
11064
  ["green", "#00ff00"],
11065
11065
  ["blue", "#0000FFFF"],
@@ -11076,7 +11076,7 @@ const Mf = async (r, e) => {
11076
11076
  ["lightGray", "#C0C0C0FF"],
11077
11077
  ["black", "#000"]
11078
11078
  ])).get(r) || null;
11079
- function jf(r) {
11079
+ function Hf(r) {
11080
11080
  if (!r || typeof r != "string") return !1;
11081
11081
  switch (r.length) {
11082
11082
  case 3:
@@ -11089,13 +11089,13 @@ function jf(r) {
11089
11089
  return !1;
11090
11090
  }
11091
11091
  }
11092
- const Hf = (r) => {
11092
+ const Vf = (r) => {
11093
11093
  const e = Number(r).toString(16);
11094
11094
  return e.length === 1 ? "0" + e : e;
11095
- }, Vf = (r) => "#" + r.match(/\d+/g).map(Hf).join(""), Zp = (r, e, t = "", n = !1) => {
11096
- let [i, s] = Lf(r);
11095
+ }, zf = (r) => "#" + r.match(/\d+/g).map(Vf).join(""), th = (r, e, t = "", n = !1) => {
11096
+ let [i, s] = _f(r);
11097
11097
  return Number.isNaN(i) || i === 0 ? {} : t === "atLeast" && i < 1 ? {} : (s = s || e, i += s ? 4 : 0.2, n ? { "line-height": `${i}${s}` } : `line-height: ${i}${s}`);
11098
- }, zf = (r, e) => {
11098
+ }, Gf = (r, e) => {
11099
11099
  const t = new Uint8Array(r), n = e.replace(/[-{}]/g, "");
11100
11100
  if (n.length !== 32) {
11101
11101
  console.error("Invalid GUID");
@@ -11124,7 +11124,7 @@ function Ri(r = 8) {
11124
11124
  function ru() {
11125
11125
  return Math.floor(Math.random() * 2147483647).toString(16).toUpperCase().padStart(8, "0");
11126
11126
  }
11127
- const Gf = {
11127
+ const Wf = {
11128
11128
  "xmlns:wpc": "http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas",
11129
11129
  "xmlns:cx": "http://schemas.microsoft.com/office/drawing/2014/chartex",
11130
11130
  "xmlns:cx1": "http://schemas.microsoft.com/office/drawing/2015/9/8/chartex",
@@ -11161,7 +11161,7 @@ const Gf = {
11161
11161
  "xmlns:wne": "http://schemas.microsoft.com/office/word/2006/wordml",
11162
11162
  "xmlns:wps": "http://schemas.microsoft.com/office/word/2010/wordprocessingShape",
11163
11163
  "mc:Ignorable": "w14 w15 w16se w16cid w16 w16cex w16sdtdh w16sdtfl w16du wp14"
11164
- }, Wf = {
11164
+ }, Jf = {
11165
11165
  elements: [
11166
11166
  {
11167
11167
  type: "element",
@@ -11173,7 +11173,7 @@ const Gf = {
11173
11173
  elements: []
11174
11174
  }
11175
11175
  ]
11176
- }, Jf = {
11176
+ }, $f = {
11177
11177
  elements: [{
11178
11178
  type: "element",
11179
11179
  name: "w:settings",
@@ -11182,7 +11182,7 @@ const Gf = {
11182
11182
  },
11183
11183
  elements: []
11184
11184
  }]
11185
- }, $f = {
11185
+ }, Kf = {
11186
11186
  type: "element",
11187
11187
  name: "w:r",
11188
11188
  elements: [
@@ -11858,7 +11858,7 @@ const Gf = {
11858
11858
  }
11859
11859
  ]
11860
11860
  }
11861
- }, Kf = {
11861
+ }, Xf = {
11862
11862
  declaration: {
11863
11863
  attributes: {
11864
11864
  version: "1.0",
@@ -11911,7 +11911,7 @@ const Gf = {
11911
11911
  elements: []
11912
11912
  }
11913
11913
  ]
11914
- }, Xf = {
11914
+ }, Yf = {
11915
11915
  declaration: {
11916
11916
  attributes: {
11917
11917
  version: "1.0",
@@ -11964,7 +11964,7 @@ const Gf = {
11964
11964
  elements: []
11965
11965
  }
11966
11966
  ]
11967
- }, Yf = {
11967
+ }, Zf = {
11968
11968
  declaration: {
11969
11969
  attributes: {
11970
11970
  version: "1.0",
@@ -12018,7 +12018,7 @@ const Gf = {
12018
12018
  elements: []
12019
12019
  }
12020
12020
  ]
12021
- }, Zf = {
12021
+ }, Qf = {
12022
12022
  declaration: {
12023
12023
  attributes: {
12024
12024
  version: "1.0",
@@ -12071,7 +12071,7 @@ const Gf = {
12071
12071
  elements: []
12072
12072
  }
12073
12073
  ]
12074
- }, Qf = {
12074
+ }, ed = {
12075
12075
  elements: [
12076
12076
  {
12077
12077
  type: "element",
@@ -12173,7 +12173,7 @@ const Gf = {
12173
12173
  ]
12174
12174
  }
12175
12175
  ]
12176
- }, ed = {
12176
+ }, td = {
12177
12177
  declaration: {
12178
12178
  attributes: {
12179
12179
  version: "1.0",
@@ -12321,12 +12321,12 @@ const Gf = {
12321
12321
  }
12322
12322
  ]
12323
12323
  }, Et = {
12324
- COMMENTS_XML_DEF: Kf,
12325
- COMMENTS_EXTENDED_XML_DEF: Xf,
12326
- COMMENTS_EXTENSIBLE_XML_DEF: Yf,
12327
- COMMENTS_IDS_XML_DEF: Zf,
12328
- DOCUMENT_RELS_XML_DEF: Qf,
12329
- CONTENT_TYPES: ed
12324
+ COMMENTS_XML_DEF: Xf,
12325
+ COMMENTS_EXTENDED_XML_DEF: Yf,
12326
+ COMMENTS_EXTENSIBLE_XML_DEF: Zf,
12327
+ COMMENTS_IDS_XML_DEF: Qf,
12328
+ DOCUMENT_RELS_XML_DEF: ed,
12329
+ CONTENT_TYPES: td
12330
12330
  }, xr = "trackInsert", Pi = "trackDelete", Oi = "trackFormat", Ue = (r) => {
12331
12331
  if (r)
12332
12332
  try {
@@ -12335,11 +12335,11 @@ const Gf = {
12335
12335
  console.error("Error in carbonCopy", r, e);
12336
12336
  return;
12337
12337
  }
12338
- }, td = {
12338
+ }, rd = {
12339
12339
  attributes: {
12340
12340
  "w:abstractNumId": "1"
12341
12341
  }
12342
- }, rd = {
12342
+ }, nd = {
12343
12343
  attributes: {
12344
12344
  "w:abstractNumId": "0"
12345
12345
  }
@@ -13593,7 +13593,7 @@ function So(r, e) {
13593
13593
  u && (c = r.comments.find((E) => E.commentId === u || E.importedId === u));
13594
13594
  const l = c?.isInternal || o.isInternal;
13595
13595
  if (n === "external" && l || !!o.resolvedTime) return;
13596
- let g = nd(e, a);
13596
+ let g = id(e, a);
13597
13597
  if (e === "End") {
13598
13598
  const E = {
13599
13599
  name: "w:r",
@@ -13603,21 +13603,21 @@ function So(r, e) {
13603
13603
  }
13604
13604
  return g;
13605
13605
  }
13606
- const nd = (r, e) => ({
13606
+ const id = (r, e) => ({
13607
13607
  name: `w:commentRange${r}`,
13608
13608
  attributes: {
13609
13609
  "w:id": String(e)
13610
13610
  }
13611
- }), id = (r) => ({
13611
+ }), sd = (r) => ({
13612
13612
  ...r,
13613
13613
  commentParaId: ru()
13614
- }), sd = (r, e, t, n) => {
13614
+ }), od = (r, e, t, n) => {
13615
13615
  const i = su({ editor: n, node: r.commentJSON }), s = {
13616
13616
  "w:id": String(e),
13617
13617
  "w:author": r.creatorName || r.importedAuthor?.name,
13618
13618
  "w:email": r.creatorEmail || r.importedAuthor?.email,
13619
13619
  "w:date": iu(r.createdTime),
13620
- "w:initials": od(r.creatorName),
13620
+ "w:initials": ad(r.creatorName),
13621
13621
  "w:done": r.resolvedTime ? "1" : "0",
13622
13622
  "w15:paraId": r.commentParaId,
13623
13623
  "custom:internalId": r.commentId || r.internalId,
@@ -13636,10 +13636,10 @@ const nd = (r, e) => ({
13636
13636
  attributes: s,
13637
13637
  elements: [i]
13638
13638
  };
13639
- }, od = (r) => r ? r.replace("(imported)", "").trim().split(" ").map((n) => n[0]).join("") : null, iu = (r) => new Date(r || Date.now()).toISOString().replace(/\.\d{3}Z$/, "Z"), ad = (r = [], e) => {
13639
+ }, ad = (r) => r ? r.replace("(imported)", "").trim().split(" ").map((n) => n[0]).join("") : null, iu = (r) => new Date(r || Date.now()).toISOString().replace(/\.\d{3}Z$/, "Z"), ud = (r = [], e) => {
13640
13640
  const t = Ue(e);
13641
13641
  return r.forEach((n) => {
13642
- n.elements[0].elements.unshift($f);
13642
+ n.elements[0].elements.unshift(Kf);
13643
13643
  const s = n.attributes["w15:paraId"];
13644
13644
  n.elements[0].attributes["w14:paraId"] = s, n.attributes = {
13645
13645
  "w:id": n.attributes["w:id"],
@@ -13655,7 +13655,7 @@ const nd = (r, e) => ({
13655
13655
  "xmlns:custom": "http://schemas.openxmlformats.org/wordprocessingml/2006/main"
13656
13656
  };
13657
13657
  }), t.elements[0].elements = r, t;
13658
- }, ud = (r = [], e) => {
13658
+ }, ld = (r = [], e) => {
13659
13659
  const t = Ue(e), n = r.map((i) => {
13660
13660
  const s = {
13661
13661
  "w15:paraId": i.commentParaId,
@@ -13672,7 +13672,7 @@ const nd = (r, e) => ({
13672
13672
  };
13673
13673
  });
13674
13674
  return t.elements[0].elements = n, t;
13675
- }, ld = (r = [], e, t) => {
13675
+ }, cd = (r = [], e, t) => {
13676
13676
  const n = Ue(e), i = Ue(t);
13677
13677
  return n.elements[0].elements = [], i.elements[0].elements = [], r.forEach((s) => {
13678
13678
  const o = ru(), a = {
@@ -13697,13 +13697,13 @@ const nd = (r, e) => ({
13697
13697
  documentIdsUpdated: n,
13698
13698
  extensibleUpdated: i
13699
13699
  };
13700
- }, cd = (r) => {
13700
+ }, fd = (r) => {
13701
13701
  const e = Ue(r);
13702
13702
  return e["word/comments.xml"] = Et.COMMENTS_XML_DEF, e["word/commentsExtended.xml"] = Et.COMMENTS_EXTENDED_XML_DEF, e["word/commentsExtensible.xml"] = Et.COMMENTS_EXTENSIBLE_XML_DEF, e["word/commentsIds.xml"] = Et.COMMENTS_IDS_XML_DEF, e["[Content_Types].xml"] = Et.CONTENT_TYPES, e;
13703
- }, fd = (r) => {
13703
+ }, dd = (r) => {
13704
13704
  const e = Ue(r);
13705
13705
  return delete e["word/comments.xml"], delete e["word/commentsExtended.xml"], delete e["word/commentsExtensible.xml"], delete e["word/commentsIds.xml"], e;
13706
- }, sr = (r) => ({ ...Et.DOCUMENT_RELS_XML_DEF.elements[0].elements.find((n) => n.attributes.Target === r) }), dd = ({
13706
+ }, sr = (r) => ({ ...Et.DOCUMENT_RELS_XML_DEF.elements[0].elements.find((n) => n.attributes.Target === r) }), md = ({
13707
13707
  convertedXml: r,
13708
13708
  defs: e,
13709
13709
  commentsWithParaIds: t,
@@ -13712,16 +13712,16 @@ const nd = (r, e) => ({
13712
13712
  }) => {
13713
13713
  const s = [];
13714
13714
  if (n === "clean")
13715
- return { documentXml: fd(r), relationships: s };
13716
- const o = cd(r);
13717
- o["word/comments.xml"] = ad(
13715
+ return { documentXml: dd(r), relationships: s };
13716
+ const o = fd(r);
13717
+ o["word/comments.xml"] = ud(
13718
13718
  e,
13719
13719
  o["word/comments.xml"]
13720
- ), s.push(sr("comments.xml")), o["word/commentsExtended.xml"] = ud(
13720
+ ), s.push(sr("comments.xml")), o["word/commentsExtended.xml"] = ld(
13721
13721
  t,
13722
13722
  o["word/commentsExtended.xml"]
13723
13723
  ), s.push(sr("commentsExtended.xml"));
13724
- const { documentIdsUpdated: a, extensibleUpdated: u } = ld(
13724
+ const { documentIdsUpdated: a, extensibleUpdated: u } = cd(
13725
13725
  t,
13726
13726
  o["word/commentsIds.xml"],
13727
13727
  o["word/commentsExtensible.xml"]
@@ -13730,7 +13730,7 @@ const nd = (r, e) => ({
13730
13730
  relationships: s,
13731
13731
  documentXml: o
13732
13732
  };
13733
- }, md = (r, e) => e ? ["width", `${Math.max(e, r)}px`] : ["min-width", `${r}px`], pd = (r, e, t, n) => {
13733
+ }, pd = (r, e) => e ? ["width", `${Math.max(e, r)}px`] : ["min-width", `${r}px`], hd = (r, e, t, n) => {
13734
13734
  let i = 0, s = !0;
13735
13735
  const o = [], a = [], u = r.firstChild;
13736
13736
  if (!u) return {};
@@ -13739,7 +13739,7 @@ const nd = (r, e) => ({
13739
13739
  for (let w = 0; w < v; w++, A++) {
13740
13740
  const B = t === A ? n : F && F[w];
13741
13741
  i += B || e, B || (s = !1);
13742
- const [R, D] = md(e, B);
13742
+ const [R, D] = pd(e, B);
13743
13743
  o.push(["col", { style: `${R}: ${D}` }]), a.push(parseInt(D, 10));
13744
13744
  }
13745
13745
  }
@@ -13753,31 +13753,32 @@ const nd = (r, e) => ({
13753
13753
  };
13754
13754
  function qt(r) {
13755
13755
  const { type: e } = r.node || {}, t = {
13756
- doc: wd,
13757
- body: hd,
13756
+ doc: yd,
13757
+ body: gd,
13758
13758
  paragraph: su,
13759
- text: bd,
13759
+ text: xd,
13760
13760
  bulletList: Fo,
13761
13761
  orderedList: Fo,
13762
- lineBreak: Td,
13763
- table: Fd,
13764
- tableRow: Pd,
13765
- tableCell: Ld,
13766
- bookmarkStart: Md,
13767
- fieldAnnotation: Wd,
13768
- tab: kd,
13762
+ lineBreak: Fd,
13763
+ table: Bd,
13764
+ tableRow: Od,
13765
+ tableCell: _d,
13766
+ bookmarkStart: Ud,
13767
+ fieldAnnotation: Jd,
13768
+ tab: Nd,
13769
13769
  image: lu,
13770
- hardBreak: Jd,
13770
+ hardBreak: $d,
13771
13771
  commentRangeStart: () => So(r, "Start"),
13772
13772
  commentRangeEnd: () => So(r, "End"),
13773
13773
  commentReference: () => null,
13774
- shapeContainer: $d,
13775
- shapeTextbox: Kd,
13776
- contentBlock: Xd
13774
+ shapeContainer: Kd,
13775
+ shapeTextbox: Xd,
13776
+ contentBlock: Yd,
13777
+ structuredContent: em
13777
13778
  };
13778
13779
  return t[e] ? t[e](r) : (console.error("No translation function found for node type:", e), null);
13779
13780
  }
13780
- function hd(r) {
13781
+ function gd(r) {
13781
13782
  const e = r.bodyNode?.elements.find((n) => n.name === "w:sectPr") || {};
13782
13783
  if (r.converter) {
13783
13784
  const n = r.converter.pageStyles.pageMargins, i = e.elements.find((o) => o.name === "w:pgMar"), { attributes: s } = i;
@@ -13788,14 +13789,14 @@ function hd(r) {
13788
13789
  }
13789
13790
  return {
13790
13791
  name: "w:body",
13791
- elements: [...dt(r), e]
13792
+ elements: [...lt(r), e]
13792
13793
  };
13793
13794
  }
13794
13795
  function su(r) {
13795
- const e = dt(r), t = e.find((s) => s.name === "htmlAnnotation");
13796
+ const e = lt(r), t = e.find((s) => s.name === "htmlAnnotation");
13796
13797
  if (t)
13797
13798
  return t.elements;
13798
- const n = gd(r.node);
13799
+ const n = wd(r.node);
13799
13800
  n && e.unshift(n);
13800
13801
  let i = {};
13801
13802
  return r.node.attrs?.rsidRDefault && (i["w:rsidRDefault"] = r.node.attrs.rsidRDefault), {
@@ -13804,13 +13805,13 @@ function su(r) {
13804
13805
  attributes: i
13805
13806
  };
13806
13807
  }
13807
- function gd(r) {
13808
+ function wd(r) {
13808
13809
  const { attrs: e = {} } = r, t = [], { styleId: n } = e;
13809
13810
  n && t.push({ name: "w:pStyle", attributes: { "w:val": n } });
13810
13811
  const { spacing: i, indent: s, textAlign: o, textIndent: a, lineHeight: u, marksAttrs: c, keepLines: l, keepNext: h, dropcap: g } = e;
13811
13812
  if (i) {
13812
13813
  const { lineSpaceBefore: A, lineSpaceAfter: v, line: F, lineRule: w } = i, B = {};
13813
- A >= 0 && (B["w:before"] = Te(A)), v >= 0 && (B["w:after"] = Te(v)), w === "exact" ? u && (B["w:line"] = qf(parseFloat(u))) : u && (B["w:line"] = pi(u)), B["w:lineRule"] = w || "auto";
13814
+ A >= 0 && (B["w:before"] = Te(A)), v >= 0 && (B["w:after"] = Te(v)), w === "exact" ? u && (B["w:line"] = Mf(parseFloat(u))) : u && (B["w:line"] = pi(u)), B["w:lineRule"] = w || "auto";
13814
13815
  const R = {
13815
13816
  name: "w:spacing",
13816
13817
  attributes: B
@@ -13876,7 +13877,7 @@ function gd(r) {
13876
13877
  elements: t
13877
13878
  } : null;
13878
13879
  }
13879
- function wd(r) {
13880
+ function yd(r) {
13880
13881
  const e = {
13881
13882
  type: "body",
13882
13883
  content: r.node.content
@@ -13884,36 +13885,37 @@ function wd(r) {
13884
13885
  return [{
13885
13886
  name: "w:document",
13886
13887
  elements: [qt({ ...r, node: e })],
13887
- attributes: Gf
13888
+ attributes: Wf
13888
13889
  }, r];
13889
13890
  }
13890
- function dt(r) {
13891
+ function lt(r) {
13891
13892
  const { content: e } = r.node;
13892
13893
  if (!e) return [];
13893
13894
  const t = [];
13894
13895
  return e.forEach((n) => {
13895
13896
  let i = qt({ ...r, node: n });
13896
- i = yd(i), i instanceof Array ? t.push(...i) : t.push(i);
13897
+ (i?.name || i?.type) !== "w:sdt" && (i = bd(i)), i instanceof Array ? t.push(...i) : t.push(i);
13897
13898
  }), t.filter((n) => n);
13898
13899
  }
13899
- const yd = (r) => {
13900
+ const bd = (r) => {
13900
13901
  if (!r) return r;
13901
- const e = r.elements?.some((i) => i.name === "w:r"), t = r.elements?.some((i) => i.name === "w:sdt");
13902
- let n = r;
13902
+ const e = r.elements?.some((a) => a.name === "w:r"), t = r.elements?.some((a) => a.name === "w:sdt");
13903
+ if (!r.elements?.find((a) => a.name === "w:sdt")?.elements?.find((a) => a.name === "w:sdtPr")?.elements?.some((a) => a.name === "w:alias")) return r;
13904
+ let o = r;
13903
13905
  if (e && t) {
13904
- const i = r.elements.filter((a) => a.name === "w:sdt"), s = r.elements.filter((a) => a.name !== "w:sdt");
13905
- n = [
13906
- ...s.filter((a) => a.name === "w:r").every((a) => a.elements.filter((c) => c.name === "w:t")?.every((c) => c.elements[0].text.trim().length > 0)) ? [{
13906
+ const a = r.elements.filter((l) => l.name === "w:sdt"), u = r.elements.filter((l) => l.name !== "w:sdt");
13907
+ o = [
13908
+ ...u.filter((l) => l.name === "w:r").every((l) => l.elements.filter((g) => g.name === "w:t")?.every((g) => g.elements[0].text.trim().length > 0)) ? [{
13907
13909
  ...r,
13908
- elements: s
13910
+ elements: u
13909
13911
  }] : [],
13910
13912
  {
13911
13913
  name: "w:p",
13912
- elements: i
13914
+ elements: a
13913
13915
  }
13914
13916
  ];
13915
13917
  }
13916
- return n;
13918
+ return o;
13917
13919
  };
13918
13920
  function Br(r, e, t) {
13919
13921
  const i = /^\s|\s$/.test(r) ? "preserve" : null, s = i ? { "xml:space": i } : null, o = [], a = kr(e);
@@ -13950,14 +13952,14 @@ function Br(r, e, t) {
13950
13952
  }
13951
13953
  return Zt(o, a);
13952
13954
  }
13953
- function bd(r) {
13955
+ function xd(r) {
13954
13956
  const { node: e } = r, t = [xr, Pi];
13955
- if (e.marks?.some((a) => t.includes(a.type))) return Ad(r);
13956
- if (e.marks?.some((a) => a.type === "link")) return Dd(r);
13957
+ if (e.marks?.some((a) => t.includes(a.type))) return Dd(r);
13958
+ if (e.marks?.some((a) => a.type === "link")) return vd(r);
13957
13959
  const { text: s, marks: o = [] } = e;
13958
13960
  return Br(s, o, r);
13959
13961
  }
13960
- function xd(r) {
13962
+ function Ad(r) {
13961
13963
  const e = r.find((t) => t.type === Oi);
13962
13964
  if (e)
13963
13965
  return {
@@ -13972,8 +13974,8 @@ function xd(r) {
13972
13974
  elements: e.attrs.before.map((n) => kr([n])).filter((n) => n !== void 0)
13973
13975
  };
13974
13976
  }
13975
- function Ad(r) {
13976
- const { node: e } = r, t = e.marks, n = [xr, Pi, Oi], i = t.find((c) => n.includes(c.type)), s = i.type === xr, o = xd(t);
13977
+ function Dd(r) {
13978
+ const { node: e } = r, t = e.marks, n = [xr, Pi, Oi], i = t.find((c) => n.includes(c.type)), s = i.type === xr, o = Ad(t);
13977
13979
  e.marks = t.filter((c) => !n.includes(c.type)), o && e.marks.push(o);
13978
13980
  const a = qt({ ...r, node: e });
13979
13981
  if (!s) {
@@ -14011,7 +14013,7 @@ function kr(r = []) {
14011
14013
  return Bo(i);
14012
14014
  }) : Bo(e));
14013
14015
  }
14014
- function Dd(r) {
14016
+ function vd(r) {
14015
14017
  const { node: e } = r, t = e.marks.find((u) => u.type === "link"), n = t.attrs.href;
14016
14018
  let i = t.attrs.rId;
14017
14019
  i || (i = uu(r, n)), e.marks = e.marks.filter((u) => u.type !== "link");
@@ -14080,9 +14082,9 @@ function To(r, e) {
14080
14082
  return r.relationships.push(n), t;
14081
14083
  }
14082
14084
  function Fo(r) {
14083
- const { type: e } = r.node, t = Sd(r), n = [];
14085
+ const { type: e } = r.node, t = Td(r), n = [];
14084
14086
  return t.forEach((i) => {
14085
- const { level: s, listType: o, pPrs: a, content: u, attrs: c = {} } = i, g = (i.attrs.numId || i.listId) ?? vd(r, o), E = Cd(s, g, a);
14087
+ const { level: s, listType: o, pPrs: a, content: u, attrs: c = {} } = i, g = (i.attrs.numId || i.listId) ?? Ed(r, o), E = Sd(s, g, a);
14086
14088
  u.forEach((A, v) => {
14087
14089
  const F = Object.assign({}, A);
14088
14090
  F.attrs = {
@@ -14118,8 +14120,8 @@ function Fo(r) {
14118
14120
  });
14119
14121
  }), n;
14120
14122
  }
14121
- function vd(r, e) {
14122
- const t = Ed(r.converter?.numbering?.definitions), n = e === "bullet" ? rd : td, i = t, s = n.attributes["w:abstractNumId"], o = {
14123
+ function Ed(r, e) {
14124
+ const t = Cd(r.converter?.numbering?.definitions), n = e === "bullet" ? nd : rd, i = t, s = n.attributes["w:abstractNumId"], o = {
14123
14125
  type: "element",
14124
14126
  name: "w:num",
14125
14127
  attributes: {
@@ -14132,8 +14134,8 @@ function vd(r, e) {
14132
14134
  };
14133
14135
  return r.converter.numbering.definitions[i] = o, i;
14134
14136
  }
14135
- const Ed = (r) => !r || !Object.keys(r).length ? 0 : Math.max(...Object.keys(r).map((t) => parseInt(t, 10))) + 1;
14136
- function Cd(r, e, t = []) {
14137
+ const Cd = (r) => !r || !Object.keys(r).length ? 0 : Math.max(...Object.keys(r).map((t) => parseInt(t, 10))) + 1;
14138
+ function Sd(r, e, t = []) {
14137
14139
  return {
14138
14140
  name: "w:pPr",
14139
14141
  type: "element",
@@ -14158,7 +14160,7 @@ function Cd(r, e, t = []) {
14158
14160
  ]
14159
14161
  };
14160
14162
  }
14161
- function Sd({ node: r }) {
14163
+ function Td({ node: r }) {
14162
14164
  const { content: e, attrs: t = {} } = r, { listId: n, syncId: i } = r.attrs || {}, s = r.attrs["list-style-type"], { attributes: o = {} } = t, a = o?.parentAttributes?.paragraphProperties?.elements?.filter((l) => l.name !== "w:numPr") || [], u = [];
14163
14165
  function c(l, h = 0) {
14164
14166
  !l || !l.length || l.forEach((g) => {
@@ -14179,22 +14181,22 @@ function Sd({ node: r }) {
14179
14181
  }
14180
14182
  return c(e), u;
14181
14183
  }
14182
- function Td(r) {
14184
+ function Fd(r) {
14183
14185
  const e = {}, { lineBreakType: t } = r.node?.attrs || {};
14184
14186
  return t && (e["w:type"] = t), {
14185
14187
  name: "w:br",
14186
14188
  attributes: e
14187
14189
  };
14188
14190
  }
14189
- function Fd(r) {
14190
- r.node = Bd(r.node, r);
14191
- const e = dt(r), t = Nd(r.node), n = Rd(r.node, r);
14191
+ function Bd(r) {
14192
+ r.node = kd(r.node, r);
14193
+ const e = lt(r), t = Id(r.node), n = Pd(r.node, r);
14192
14194
  return e.unshift(t), e.unshift(n), {
14193
14195
  name: "w:tbl",
14194
14196
  elements: e
14195
14197
  };
14196
14198
  }
14197
- function Bd(r, { editorSchema: e }) {
14199
+ function kd(r, { editorSchema: e }) {
14198
14200
  const { content: t } = r;
14199
14201
  for (let n = 0; n < t.length; n++) {
14200
14202
  const i = t[n];
@@ -14230,13 +14232,13 @@ function Bd(r, { editorSchema: e }) {
14230
14232
  }
14231
14233
  return r;
14232
14234
  }
14233
- function kd(r) {
14235
+ function Nd(r) {
14234
14236
  const { marks: e = [] } = r.node, t = kr(e);
14235
14237
  return Zt({
14236
14238
  name: "w:tab"
14237
14239
  }, t);
14238
14240
  }
14239
- function Nd(r) {
14241
+ function Id(r) {
14240
14242
  const e = [], { attrs: t } = r, { tableWidth: n, tableWidthType: i, tableStyleId: s, borders: o, tableIndent: a, tableLayout: u, tableCellSpacing: c } = t;
14241
14243
  if (s) {
14242
14244
  const l = {
@@ -14246,7 +14248,7 @@ function Nd(r) {
14246
14248
  e.push(l);
14247
14249
  }
14248
14250
  if (o) {
14249
- const l = Id(r);
14251
+ const l = Rd(r);
14250
14252
  e.push(l);
14251
14253
  }
14252
14254
  if (a) {
@@ -14281,7 +14283,7 @@ function Nd(r) {
14281
14283
  elements: e
14282
14284
  };
14283
14285
  }
14284
- function Id(r) {
14286
+ function Rd(r) {
14285
14287
  const { borders: e } = r.attrs, t = [];
14286
14288
  return e ? (["top", "bottom", "left", "right", "insideH", "insideV"].forEach((i) => {
14287
14289
  const s = e[i];
@@ -14305,11 +14307,11 @@ function Id(r) {
14305
14307
  elements: t
14306
14308
  }) : void 0;
14307
14309
  }
14308
- function Rd(r, e) {
14310
+ function Pd(r, e) {
14309
14311
  const { editorSchema: t } = e;
14310
14312
  let n = [];
14311
14313
  try {
14312
- const s = t.nodeFromJSON(r), o = 25, { colgroupValues: a } = pd(
14314
+ const s = t.nodeFromJSON(r), o = 25, { colgroupValues: a } = hd(
14313
14315
  s,
14314
14316
  o
14315
14317
  );
@@ -14328,14 +14330,14 @@ function Rd(r, e) {
14328
14330
  elements: i
14329
14331
  };
14330
14332
  }
14331
- function Pd(r) {
14332
- const e = dt(r), t = Od(r.node);
14333
+ function Od(r) {
14334
+ const e = lt(r), t = Ld(r.node);
14333
14335
  return t.elements.length && e.unshift(t), {
14334
14336
  name: "w:tr",
14335
14337
  elements: e
14336
14338
  };
14337
14339
  }
14338
- function Od(r) {
14340
+ function Ld(r) {
14339
14341
  const { attrs: e } = r, t = [], { rowHeight: n, rowHeightType: i } = e;
14340
14342
  if (n) {
14341
14343
  const s = { "w:val": Te(n) };
@@ -14351,17 +14353,17 @@ function Od(r) {
14351
14353
  elements: t
14352
14354
  };
14353
14355
  }
14354
- function Ld(r) {
14355
- const e = dt({
14356
+ function _d(r) {
14357
+ const e = lt({
14356
14358
  ...r,
14357
14359
  tableCell: r.node
14358
- }), t = _d(r.node);
14360
+ }), t = qd(r.node);
14359
14361
  return e.unshift(t), {
14360
14362
  name: "w:tc",
14361
14363
  elements: e
14362
14364
  };
14363
14365
  }
14364
- function _d(r) {
14366
+ function qd(r) {
14365
14367
  const e = [], { attrs: t } = r, { colwidth: n = [], cellWidthType: i = "dxa", background: s = {}, colspan: o, rowspan: a, widthUnit: u } = t, c = n.reduce((v, F) => v + F, 0), l = {
14366
14368
  name: "w:tcW",
14367
14369
  attributes: { "w:w": u === "px" ? Te(c) : It(c), "w:type": i }
@@ -14385,7 +14387,7 @@ function _d(r) {
14385
14387
  if (g) {
14386
14388
  const v = {
14387
14389
  name: "w:tcMar",
14388
- elements: qd(g)
14390
+ elements: Md(g)
14389
14391
  };
14390
14392
  e.push(v);
14391
14393
  }
@@ -14437,11 +14439,11 @@ function _d(r) {
14437
14439
  elements: e
14438
14440
  };
14439
14441
  }
14440
- function qd(r) {
14442
+ function Md(r) {
14441
14443
  const e = [], { top: t, right: n, bottom: i, left: s } = r;
14442
14444
  return t != null && e.push({ name: "w:top", attributes: { "w:w": Te(t) } }), n != null && e.push({ name: "w:right", attributes: { "w:w": Te(n) } }), i != null && e.push({ name: "w:bottom", attributes: { "w:w": Te(i) } }), s != null && e.push({ name: "w:left", attributes: { "w:w": Te(s) } }), e;
14443
14445
  }
14444
- function Md(r) {
14446
+ function Ud(r) {
14445
14447
  const e = {
14446
14448
  name: "w:bookmarkStart",
14447
14449
  attributes: {
@@ -14481,7 +14483,7 @@ function Bo(r) {
14481
14483
  break;
14482
14484
  case "color":
14483
14485
  let s = n.color.replace(/^#/, "").replace(/;$/, "");
14484
- s.startsWith("rgb") && (s = Vf(s)), t.attributes["w:val"] = s;
14486
+ s.startsWith("rgb") && (s = zf(s)), t.attributes["w:val"] = s;
14485
14487
  break;
14486
14488
  case "textAlign":
14487
14489
  t.attributes["w:val"] = n.textAlign;
@@ -14498,7 +14500,7 @@ function Bo(r) {
14498
14500
  }
14499
14501
  return t;
14500
14502
  }
14501
- function Ud(r) {
14503
+ function jd(r) {
14502
14504
  if (!r) return {};
14503
14505
  const e = r.split(";")[0].split("/")[1];
14504
14506
  if (!r || e !== "png")
@@ -14512,7 +14514,7 @@ function Ud(r) {
14512
14514
  originalHeight: i.getInt32(20)
14513
14515
  };
14514
14516
  }
14515
- function jd(r, e, t, n) {
14517
+ function Hd(r, e, t, n) {
14516
14518
  let i = r, s = e, o = Math.min(t / r, n / e);
14517
14519
  return i = Math.round(i * o), s = Math.round(s * o), { scaledWidth: i, scaledHeight: s };
14518
14520
  }
@@ -14522,20 +14524,20 @@ function lu(r, e) {
14522
14524
  tableCell: i
14523
14525
  } = r;
14524
14526
  let s = t.rId;
14525
- const o = t.src || t.imageSrc, { originalWidth: a, originalHeight: u } = Ud(o);
14527
+ const o = t.src || t.imageSrc, { originalWidth: a, originalHeight: u } = jd(o);
14526
14528
  let c = t.size ? {
14527
14529
  w: mt(t.size.width),
14528
14530
  h: mt(t.size.height)
14529
14531
  } : e;
14530
14532
  if (a && u) {
14531
- const F = Me(c.w), w = Me(c.h), { scaledWidth: B, scaledHeight: R } = jd(a, u, F, w);
14533
+ const F = Me(c.w), w = Me(c.h), { scaledWidth: B, scaledHeight: R } = Hd(a, u, F, w);
14532
14534
  c = {
14533
14535
  w: mt(B),
14534
14536
  h: mt(R)
14535
14537
  };
14536
14538
  }
14537
14539
  if (i) {
14538
- const F = i.attrs.colwidth.reduce((N, M) => N + M, 0), w = i.attrs.cellMargins?.left || 8, B = i.attrs.cellMargins?.right || 8, R = mt(F - (w + B)), { width: D, height: k } = Yd(c.w, c.h, R);
14540
+ const F = i.attrs.colwidth.reduce((N, M) => N + M, 0), w = i.attrs.cellMargins?.left || 8, B = i.attrs.cellMargins?.right || 8, R = mt(F - (w + B)), { width: D, height: k } = Zd(c.w, c.h, R);
14539
14541
  D && k && (c = { w: D, h: k });
14540
14542
  }
14541
14543
  if (r.node.type === "image" && !s) {
@@ -14776,13 +14778,13 @@ function cu(r) {
14776
14778
  } = r, n = fu(e);
14777
14779
  return Br(e.displayLabel, [...t, ...n], r);
14778
14780
  }
14779
- function Hd(r) {
14781
+ function Vd(r) {
14780
14782
  const {
14781
14783
  node: { attrs: e = {}, marks: t = [] }
14782
- } = r, n = Ic.decode(e.displayLabel);
14784
+ } = r, n = Rc.decode(e.displayLabel);
14783
14785
  return Br(n, t, r);
14784
14786
  }
14785
- function Vd(r) {
14787
+ function zd(r) {
14786
14788
  const {
14787
14789
  node: { attrs: e = {}, marks: t = [] },
14788
14790
  editorSchema: n
@@ -14790,11 +14792,11 @@ function Vd(r) {
14790
14792
  let u = Ct.create({
14791
14793
  doc: yr.fromSchema(n).parse(s)
14792
14794
  });
14793
- a.length && (u = Zd(u, a));
14795
+ a.length && (u = Qd(u, a));
14794
14796
  const c = u.doc.toJSON();
14795
14797
  return {
14796
14798
  name: "htmlAnnotation",
14797
- elements: dt({
14799
+ elements: lt({
14798
14800
  ...r,
14799
14801
  node: c
14800
14802
  })
@@ -14803,7 +14805,7 @@ function Vd(r) {
14803
14805
  function ko(r, e) {
14804
14806
  return lu(r, e);
14805
14807
  }
14806
- function zd(r) {
14808
+ function Gd(r) {
14807
14809
  const {
14808
14810
  node: { attrs: e = {}, marks: t = [] }
14809
14811
  } = r, n = uu(r, e.linkUrl), i = Br(e.linkUrl, t, r), s = au(i);
@@ -14817,7 +14819,7 @@ function zd(r) {
14817
14819
  elements: [s]
14818
14820
  };
14819
14821
  }
14820
- function Gd(r) {
14822
+ function Wd(r) {
14821
14823
  const e = {
14822
14824
  w: 4286250,
14823
14825
  h: 4286250
@@ -14829,9 +14831,9 @@ function Gd(r) {
14829
14831
  text: cu,
14830
14832
  image: (i) => ko(i, e),
14831
14833
  signature: (i) => ko(i, t),
14832
- checkbox: Hd,
14833
- html: Vd,
14834
- link: zd
14834
+ checkbox: Vd,
14835
+ html: zd,
14836
+ link: Gd
14835
14837
  }[r];
14836
14838
  }
14837
14839
  const fu = (r = {}) => {
@@ -14846,8 +14848,8 @@ const fu = (r = {}) => {
14846
14848
  } = r, u = [];
14847
14849
  return e && u.push({ type: "fontFamily", attrs: { fontFamily: e } }), t && u.push({ type: "fontSize", attrs: { fontSize: t } }), n && u.push({ type: "bold", attrs: {} }), i && u.push({ type: "underline", attrs: {} }), s && u.push({ type: "italic", attrs: {} }), o && u.push({ type: "color", attrs: { color: o } }), a && u.push({ type: "highlight", attrs: { color: a } }), u;
14848
14850
  };
14849
- function Wd(r) {
14850
- const { node: e, isFinalDoc: t } = r, { attrs: n = {} } = e, i = Gd(n.type);
14851
+ function Jd(r) {
14852
+ const { node: e, isFinalDoc: t } = r, { attrs: n = {} } = e, i = Wd(n.type);
14851
14853
  if (!i) return {};
14852
14854
  let s, o;
14853
14855
  if (t)
@@ -14927,7 +14929,7 @@ function Wd(r) {
14927
14929
  ]
14928
14930
  };
14929
14931
  }
14930
- function Jd(r) {
14932
+ function $d(r) {
14931
14933
  const { node: e = {} } = r, { attrs: t = {} } = e, { pageBreakSource: n } = t;
14932
14934
  return n === "sectPr" ? null : {
14933
14935
  name: "w:r",
@@ -14938,8 +14940,8 @@ function Jd(r) {
14938
14940
  }]
14939
14941
  };
14940
14942
  }
14941
- function $d(r) {
14942
- const { node: e } = r, t = dt(r), n = {
14943
+ function Kd(r) {
14944
+ const { node: e } = r, t = lt(r), n = {
14943
14945
  name: "v:shape",
14944
14946
  attributes: {
14945
14947
  ...e.attrs.attributes,
@@ -14964,10 +14966,10 @@ function $d(r) {
14964
14966
  elements: [Zt(i)]
14965
14967
  };
14966
14968
  }
14967
- function Kd(r) {
14969
+ function Xd(r) {
14968
14970
  const { node: e } = r, n = {
14969
14971
  name: "w:txbxContent",
14970
- elements: dt(r)
14972
+ elements: lt(r)
14971
14973
  };
14972
14974
  return {
14973
14975
  name: "v:textbox",
@@ -14977,7 +14979,7 @@ function Kd(r) {
14977
14979
  elements: [n]
14978
14980
  };
14979
14981
  }
14980
- function Xd(r) {
14982
+ function Yd(r) {
14981
14983
  const { node: e } = r, { drawingContent: t } = e.attrs, n = {
14982
14984
  name: "w:drawing",
14983
14985
  elements: [
@@ -15044,14 +15046,14 @@ nt = new WeakSet(), du = function(e, t = falase) {
15044
15046
  }
15045
15047
  return a || u.push(`</${n}>`), u;
15046
15048
  };
15047
- function Yd(r, e, t) {
15049
+ function Zd(r, e, t) {
15048
15050
  if (r > t) {
15049
15051
  let n = t / r, i = Math.round(e * n);
15050
15052
  return { width: t, height: i };
15051
15053
  }
15052
15054
  return { width: r, height: e };
15053
15055
  }
15054
- function Zd(r, e) {
15056
+ function Qd(r, e) {
15055
15057
  const { tr: t, doc: n, schema: i } = r, s = ["fontFamily", "fontSize", "highlight"];
15056
15058
  if (!e.some((h) => s.includes(h.type)))
15057
15059
  return r;
@@ -15073,21 +15075,33 @@ function Zd(r, e) {
15073
15075
  }));
15074
15076
  }), r.apply(t);
15075
15077
  }
15076
- const Qd = '<w:document xmlns:wpc="http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas" xmlns:cx="http://schemas.microsoft.com/office/drawing/2014/chartex" xmlns:cx1="http://schemas.microsoft.com/office/drawing/2015/9/8/chartex" xmlns:cx2="http://schemas.microsoft.com/office/drawing/2015/10/21/chartex" xmlns:cx3="http://schemas.microsoft.com/office/drawing/2016/5/9/chartex" xmlns:cx4="http://schemas.microsoft.com/office/drawing/2016/5/10/chartex" xmlns:cx5="http://schemas.microsoft.com/office/drawing/2016/5/11/chartex" xmlns:cx6="http://schemas.microsoft.com/office/drawing/2016/5/12/chartex" xmlns:cx7="http://schemas.microsoft.com/office/drawing/2016/5/13/chartex" xmlns:cx8="http://schemas.microsoft.com/office/drawing/2016/5/14/chartex" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:aink="http://schemas.microsoft.com/office/drawing/2016/ink" xmlns:am3d="http://schemas.microsoft.com/office/drawing/2017/model3d" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:oel="http://schemas.microsoft.com/office/2019/extlst" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:m="http://schemas.openxmlformats.org/officeDocument/2006/math" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:wp14="http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing" xmlns:wp="http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing" xmlns:w10="urn:schemas-microsoft-com:office:word" xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main" xmlns:w14="http://schemas.microsoft.com/office/word/2010/wordml" xmlns:w15="http://schemas.microsoft.com/office/word/2012/wordml" xmlns:w16cex="http://schemas.microsoft.com/office/word/2018/wordml/cex" xmlns:w16cid="http://schemas.microsoft.com/office/word/2016/wordml/cid" xmlns:w16="http://schemas.microsoft.com/office/word/2018/wordml" xmlns:w16sdtdh="http://schemas.microsoft.com/office/word/2020/wordml/sdtdatahash" xmlns:w16se="http://schemas.microsoft.com/office/word/2015/wordml/symex" xmlns:wpg="http://schemas.microsoft.com/office/word/2010/wordprocessingGroup" xmlns:wpi="http://schemas.microsoft.com/office/word/2010/wordprocessingInk" xmlns:wne="http://schemas.microsoft.com/office/word/2006/wordml" xmlns:wps="http://schemas.microsoft.com/office/word/2010/wordprocessingShape" mc:Ignorable="w14 w15 w16se w16cid w16 w16cex w16sdtdh wp14"><w:body></w:body></w:document>', em = (r) => JSON.parse(ba.xml2json(r, null, 2)), tm = (r, e = Qd) => r["word/document.xml"] || em(e), rm = (r) => {
15078
+ function em(r) {
15079
+ const { node: e } = r, { attrs: t = {} } = e, i = [
15080
+ {
15081
+ name: "w:sdtContent",
15082
+ elements: lt({ ...r, nodes: e.content })
15083
+ }
15084
+ ];
15085
+ return i.unshift(t.sdtPr), {
15086
+ name: "w:sdt",
15087
+ elements: i
15088
+ };
15089
+ }
15090
+ const tm = '<w:document xmlns:wpc="http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas" xmlns:cx="http://schemas.microsoft.com/office/drawing/2014/chartex" xmlns:cx1="http://schemas.microsoft.com/office/drawing/2015/9/8/chartex" xmlns:cx2="http://schemas.microsoft.com/office/drawing/2015/10/21/chartex" xmlns:cx3="http://schemas.microsoft.com/office/drawing/2016/5/9/chartex" xmlns:cx4="http://schemas.microsoft.com/office/drawing/2016/5/10/chartex" xmlns:cx5="http://schemas.microsoft.com/office/drawing/2016/5/11/chartex" xmlns:cx6="http://schemas.microsoft.com/office/drawing/2016/5/12/chartex" xmlns:cx7="http://schemas.microsoft.com/office/drawing/2016/5/13/chartex" xmlns:cx8="http://schemas.microsoft.com/office/drawing/2016/5/14/chartex" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:aink="http://schemas.microsoft.com/office/drawing/2016/ink" xmlns:am3d="http://schemas.microsoft.com/office/drawing/2017/model3d" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:oel="http://schemas.microsoft.com/office/2019/extlst" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:m="http://schemas.openxmlformats.org/officeDocument/2006/math" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:wp14="http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing" xmlns:wp="http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing" xmlns:w10="urn:schemas-microsoft-com:office:word" xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main" xmlns:w14="http://schemas.microsoft.com/office/word/2010/wordml" xmlns:w15="http://schemas.microsoft.com/office/word/2012/wordml" xmlns:w16cex="http://schemas.microsoft.com/office/word/2018/wordml/cex" xmlns:w16cid="http://schemas.microsoft.com/office/word/2016/wordml/cid" xmlns:w16="http://schemas.microsoft.com/office/word/2018/wordml" xmlns:w16sdtdh="http://schemas.microsoft.com/office/word/2020/wordml/sdtdatahash" xmlns:w16se="http://schemas.microsoft.com/office/word/2015/wordml/symex" xmlns:wpg="http://schemas.microsoft.com/office/word/2010/wordprocessingGroup" xmlns:wpi="http://schemas.microsoft.com/office/word/2010/wordprocessingInk" xmlns:wne="http://schemas.microsoft.com/office/word/2006/wordml" xmlns:wps="http://schemas.microsoft.com/office/word/2010/wordprocessingShape" mc:Ignorable="w14 w15 w16se w16cid w16 w16cex w16sdtdh wp14"><w:body></w:body></w:document>', rm = (r) => JSON.parse(ba.xml2json(r, null, 2)), nm = (r, e = tm) => r["word/document.xml"] || rm(e), im = (r) => {
15077
15091
  const { nodes: e } = r;
15078
15092
  if (e.length === 0)
15079
15093
  return { nodes: [], consumed: 0 };
15080
15094
  const t = e[0];
15081
15095
  switch (t.name) {
15082
15096
  case "w:tbl":
15083
- return { nodes: [im(t, r)], consumed: 1 };
15097
+ return { nodes: [om(t, r)], consumed: 1 };
15084
15098
  }
15085
15099
  return { nodes: [], consumed: 0 };
15086
- }, nm = {
15100
+ }, sm = {
15087
15101
  handlerName: "tableNodeHandler",
15088
- handler: rm
15102
+ handler: im
15089
15103
  };
15090
- function im(r, e) {
15104
+ function om(r, e) {
15091
15105
  const { docx: t, nodeListHandler: n } = e, i = r.elements.find((k) => k.name === "w:tblPr"), o = i.elements.find((k) => k.name === "w:tblBorders")?.elements || [], { borders: a, rowBorders: u } = pu(o), c = i.elements.find((k) => k.name === "w:tblStyle"), h = { tableStyleId: c?.attributes["w:val"] }, g = i?.elements.find((k) => k.name === "w:tblInd");
15092
15106
  if (g) {
15093
15107
  const { "w:w": k, "w:type": N } = g.attributes;
@@ -15112,7 +15126,7 @@ function im(r, e) {
15112
15126
  h.borders = B;
15113
15127
  const D = [];
15114
15128
  return w.forEach((k) => {
15115
- const N = am(k, r, R, c, e);
15129
+ const N = lm(k, r, R, c, e);
15116
15130
  N.content?.length && D.push(N);
15117
15131
  }), {
15118
15132
  type: "table",
@@ -15120,15 +15134,15 @@ function im(r, e) {
15120
15134
  attrs: h
15121
15135
  };
15122
15136
  }
15123
- function sm(r, e, t, n, i = null, s, o, a) {
15124
- const { docx: u, nodeListHandler: c } = o, l = r.elements.find((se) => se.name === "w:tcPr"), h = l?.elements?.find((se) => se.name === "w:tcBorders"), g = om(h, n), E = hu(t), A = l?.elements?.find((se) => se.name === "w:tcW");
15137
+ function am(r, e, t, n, i = null, s, o, a) {
15138
+ const { docx: u, nodeListHandler: c } = o, l = r.elements.find((se) => se.name === "w:tcPr"), h = l?.elements?.find((se) => se.name === "w:tcBorders"), g = um(h, n), E = hu(t), A = l?.elements?.find((se) => se.name === "w:tcW");
15125
15139
  let v = A ? be(A.attributes["w:w"]) : null;
15126
15140
  const F = A?.attributes["w:type"];
15127
15141
  !v && i && (v = i);
15128
15142
  const w = Io(r), { attributes: B } = w || {}, D = {
15129
15143
  color: l?.elements?.find((se) => se.name === "w:shd")?.attributes["w:fill"]
15130
15144
  }, N = l?.elements?.find((se) => se.name === "w:gridSpan")?.attributes["w:val"], M = l?.elements?.find((se) => se.name === "w:tcMar"), C = l?.elements?.find((se) => se.name === "w:vAlign")?.attributes["w:val"] || "top", J = {}, oe = mu(s, u) || {};
15131
- J.cellMargins = um(M, oe);
15145
+ J.cellMargins = cm(M, oe);
15132
15146
  const { fontSize: Z, fonts: fe = {} } = oe, de = fe.ascii;
15133
15147
  if (v) {
15134
15148
  J.colwidth = [v], J.widthUnit = "px";
@@ -15174,7 +15188,7 @@ const Io = (r) => r.elements.find((n) => n.name === "w:tcPr")?.elements?.find((n
15174
15188
  return Object.keys(i) ? (i.val = "none", i) : null;
15175
15189
  }
15176
15190
  return null;
15177
- }, om = (r, e) => {
15191
+ }, um = (r, e) => {
15178
15192
  if (!r) return null;
15179
15193
  const t = {}, n = or(r, "bottom", e);
15180
15194
  n && (t.bottom = n);
@@ -15212,7 +15226,7 @@ function mu(r, e, t) {
15212
15226
  n.fonts = { ascii: w, hAnsi: B, cs: R };
15213
15227
  }
15214
15228
  const F = E.elements.find((w) => w.name === "w:sz");
15215
- F?.attributes && (n.fontSize = _f(F.attributes["w:val"]) + "pt");
15229
+ F?.attributes && (n.fontSize = qf(F.attributes["w:val"]) + "pt");
15216
15230
  }
15217
15231
  const A = c.elements.find((v) => v.name === "w:tblPr");
15218
15232
  if (A && A.elements) {
@@ -15242,7 +15256,7 @@ function pu(r) {
15242
15256
  rowBorders: t
15243
15257
  };
15244
15258
  }
15245
- function am(r, e, t, n, i) {
15259
+ function lm(r, e, t, n, i) {
15246
15260
  const s = {}, a = r.elements.find((A) => A.name === "w:trPr")?.elements?.find((A) => A.name === "w:trHeight"), u = a?.attributes["w:val"];
15247
15261
  a?.attributes["w:hRule"];
15248
15262
  const c = {};
@@ -15252,12 +15266,12 @@ function am(r, e, t, n, i) {
15252
15266
  type: "tableRow",
15253
15267
  content: h?.map((A, v) => {
15254
15268
  const F = h.length > 1 ? l[v] : null;
15255
- return sm(A, r, e, c, F, n, i, v);
15269
+ return am(A, r, e, c, F, n, i, v);
15256
15270
  }) || [],
15257
15271
  attrs: s
15258
15272
  };
15259
15273
  }
15260
- const um = (r, e) => {
15274
+ const cm = (r, e) => {
15261
15275
  const t = r?.elements?.find((F) => F.name === "w:left"), n = r?.elements?.find((F) => F.name === "w:right"), i = r?.elements?.find((F) => F.name === "w:top"), s = r?.elements?.find((F) => F.name === "w:bottom"), o = t?.attributes["w:w"], a = n?.attributes["w:w"], u = i?.attributes["w:w"], c = s?.attributes["w:w"], { cellMargins: l = {} } = e, {
15262
15276
  marginLeft: h,
15263
15277
  marginRight: g,
@@ -15270,7 +15284,7 @@ const um = (r, e) => {
15270
15284
  top: be(u ?? E),
15271
15285
  bottom: be(c ?? A)
15272
15286
  };
15273
- }, hu = (r) => r.elements.find((t) => t.name === "w:tblGrid")?.elements?.flatMap((t) => t.name !== "w:gridCol" ? [] : be(t.attributes["w:w"])) || [], lm = (r) => {
15287
+ }, hu = (r) => r.elements.find((t) => t.name === "w:tblGrid")?.elements?.flatMap((t) => t.name !== "w:gridCol" ? [] : be(t.attributes["w:w"])) || [], fm = (r) => {
15274
15288
  const { nodes: e, filename: t } = r, n = ["w:drawing", "w:p"];
15275
15289
  if (e.length === 0 || !n.includes(e[0].name))
15276
15290
  return { nodes: [], consumed: 0 };
@@ -15294,7 +15308,7 @@ function Ro(r, e, t) {
15294
15308
  height: Me(o.attributes?.cy)
15295
15309
  }, c = r.elements.find((q) => q.name === "a:graphic").elements.find((q) => q.name === "a:graphicData"), { uri: l } = c?.attributes;
15296
15310
  if (l && l === "http://schemas.microsoft.com/office/word/2010/wordprocessingShape")
15297
- return cm(t, r, c);
15311
+ return dm(t, r, c);
15298
15312
  const g = c.elements.find((q) => q.name === "pic:pic");
15299
15313
  if (!g || !g.elements) return null;
15300
15314
  const A = g.elements.find((q) => q.name === "pic:blipFill").elements.find((q) => q.name === "a:blip"), v = r.elements.find((q) => q.name === "wp:positionH"), F = v?.elements.find((q) => q.name === "wp:posOffset"), w = Me(F?.elements[0]?.text), B = v?.attributes.relativeFrom, R = v?.elements.find((q) => q.name === "wp:align")?.elements[0]?.text, D = r.elements.find((q) => q.name === "wp:positionV"), k = D?.elements.find((q) => q.name === "wp:posOffset"), N = Me(k?.elements[0]?.text), M = D?.attributes.relativeFrom, _ = D?.elements.find((q) => q.name === "wp:align")?.elements[0]?.text, C = r.elements.find((q) => q.name === "wp:simplePos"), J = r.elements.find((q) => q.name === "wp:wrapSquare"), oe = r.elements.find((q) => q.name === "wp:wrapTopAndBottom"), Z = r.elements.find((q) => q.name === "wp:docPr");
@@ -15345,12 +15359,12 @@ function Ro(r, e, t) {
15345
15359
  }
15346
15360
  };
15347
15361
  }
15348
- const cm = (r, e, t) => {
15362
+ const dm = (r, e, t) => {
15349
15363
  const n = t.elements.find((l) => l.name === "wps:wsp"), s = n.elements.find((l) => l.name === "wps:txbx")?.elements?.find((l) => l.name === "w:txbxContent");
15350
15364
  e.elements.find((l) => l.name === "wp:docPr");
15351
15365
  const o = n.elements.find((l) => l.name === "wps:spPr"), a = o?.elements.find((l) => l.name === "a:prstGeom");
15352
15366
  if (a && a.attributes.prst === "rect")
15353
- return fm(r, o);
15367
+ return mm(r, o);
15354
15368
  if (!s)
15355
15369
  return null;
15356
15370
  const { nodeListHandler: u } = r;
@@ -15359,7 +15373,7 @@ const cm = (r, e, t) => {
15359
15373
  node: s.elements[0],
15360
15374
  nodes: s.elements
15361
15375
  })[0];
15362
- }, fm = (r, e) => {
15376
+ }, mm = (r, e) => {
15363
15377
  const t = {}, [n] = r.nodes;
15364
15378
  n?.name === "w:drawing" && (t.drawingContent = n);
15365
15379
  const i = e.elements.find((l) => l.name === "a:xfrm"), s = i.elements.find((l) => l.name === "a:off"), o = i.elements.find((l) => l.name === "a:ext");
@@ -15376,9 +15390,9 @@ const cm = (r, e, t) => {
15376
15390
  type: "contentBlock",
15377
15391
  attrs: t
15378
15392
  };
15379
- }, dm = {
15393
+ }, pm = {
15380
15394
  handlerName: "drawingNodeHandler",
15381
- handler: lm
15395
+ handler: fm
15382
15396
  };
15383
15397
  function Rt(r, e = [], t = null) {
15384
15398
  const n = [], i = /* @__PURE__ */ new Set();
@@ -15403,7 +15417,7 @@ function Rt(r, e = [], t = null) {
15403
15417
  const { attributes: u = {} } = s, c = { type: a.type };
15404
15418
  if (!(u["w:val"] == "0" || u["w:val"] === "none")) {
15405
15419
  if (a.mark && (c.type = a.mark), Object.keys(u).length) {
15406
- const l = pm(a.type, u, t);
15420
+ const l = gm(a.type, u, t);
15407
15421
  if (l == null) return;
15408
15422
  c.attrs = {}, c.attrs[a.property] = l;
15409
15423
  }
@@ -15412,7 +15426,7 @@ function Rt(r, e = [], t = null) {
15412
15426
  });
15413
15427
  }), wi(n);
15414
15428
  }
15415
- function mm(r, e) {
15429
+ function hm(r, e) {
15416
15430
  const t = r.elements?.find((o) => o.name === "w:rPrChange");
15417
15431
  if (!t)
15418
15432
  return [];
@@ -15433,25 +15447,25 @@ function wi(r) {
15433
15447
  });
15434
15448
  }), [...t, { type: "textStyle", attrs: n }];
15435
15449
  }
15436
- function pm(r, e, t) {
15450
+ function gm(r, e, t) {
15437
15451
  r === "tabs" && (r = "textIndent");
15438
15452
  const n = {
15439
15453
  color: () => `#${e["w:val"]}`,
15440
15454
  fontSize: () => `${e["w:val"] / 2}pt`,
15441
- textIndent: () => gm(e),
15442
- fontFamily: () => hm(e, t),
15443
- lineHeight: () => wm(e),
15455
+ textIndent: () => ym(e),
15456
+ fontFamily: () => wm(e, t),
15457
+ lineHeight: () => bm(e),
15444
15458
  textAlign: () => e["w:val"],
15445
15459
  link: () => e.href,
15446
15460
  underline: () => e["w:val"],
15447
15461
  bold: () => e?.["w:val"] || null,
15448
15462
  italic: () => e?.["w:val"] || null,
15449
- highlight: () => ym(e)
15463
+ highlight: () => xm(e)
15450
15464
  };
15451
15465
  if (r in n || console.debug("❗️❗️ No value mapper for:", r, "Attributes:", e), r in n)
15452
15466
  return n[r], n[r]();
15453
15467
  }
15454
- function hm(r, e) {
15468
+ function wm(r, e) {
15455
15469
  const t = r["w:ascii"], n = r["w:asciiTheme"];
15456
15470
  if (!e || !n) return t;
15457
15471
  const i = e["word/theme/theme1.xml"];
@@ -15459,21 +15473,21 @@ function hm(r, e) {
15459
15473
  const { elements: s } = i, { elements: o } = s[0];
15460
15474
  return o.find((g) => g.name === "a:themeElements").elements.find((g) => g.name === "a:fontScheme").elements.find((g) => g.name === "a:majorFont").elements.find((g) => g.name === "a:latin").attributes.typeface;
15461
15475
  }
15462
- function gm(r) {
15476
+ function ym(r) {
15463
15477
  let e = r["w:left"];
15464
15478
  return e ? `${qe(e)}in` : null;
15465
15479
  }
15466
- function wm(r) {
15480
+ function bm(r) {
15467
15481
  const e = r["w:line"], t = r["w:lineRule"];
15468
15482
  return !e || e === "0" ? null : t === "exact" ? `${tu(e)}pt` : `${Ii(e)}`;
15469
15483
  }
15470
- function ym(r) {
15484
+ function xm(r) {
15471
15485
  const e = r["w:fill"];
15472
- return e && e !== "auto" ? `#${e}` : jf(r?.["w:val"]) ? `#${r["w:val"]}` : Uf(r?.["w:val"]) || null;
15486
+ return e && e !== "auto" ? `#${e}` : Hf(r?.["w:val"]) ? `#${r["w:val"]}` : jf(r?.["w:val"]) || null;
15473
15487
  }
15474
15488
  function xt(r, e) {
15475
- const t = [], n = [], { attributes: i = {}, elements: s = [] } = r, { nodes: o, paragraphProperties: a = {}, runProperties: u = {} } = bm(s);
15476
- return s.find((l) => l.name === "w:r") && (a.elements = a?.elements?.filter((l) => l.name !== "w:rPr")), u && u?.elements?.length && t.push(...Rt(u, n)), a && a.elements?.length && t.push(...Rt(a, n)), t.push(...mm(u, t)), a && a.elements?.length && (i.paragraphProperties = a), t && r.name === "w:p" && t.forEach((l) => {
15489
+ const t = [], n = [], { attributes: i = {}, elements: s = [] } = r, { nodes: o, paragraphProperties: a = {}, runProperties: u = {} } = Am(s);
15490
+ return s.find((l) => l.name === "w:r") && (a.elements = a?.elements?.filter((l) => l.name !== "w:rPr")), u && u?.elements?.length && t.push(...Rt(u, n)), a && a.elements?.length && t.push(...Rt(a, n)), t.push(...hm(u, t)), a && a.elements?.length && (i.paragraphProperties = a), t && r.name === "w:p" && t.forEach((l) => {
15477
15491
  const h = Object.keys(l.attrs ?? {})[0];
15478
15492
  if (h) {
15479
15493
  const g = l.attrs[h];
@@ -15481,7 +15495,7 @@ function xt(r, e) {
15481
15495
  }
15482
15496
  }), { elements: o, attributes: i, marks: t, unknownMarks: n };
15483
15497
  }
15484
- function bm(r) {
15498
+ function Am(r) {
15485
15499
  const e = r.find((s) => s.name === "w:pPr"), t = r.find((s) => s.name === "w:rPr"), n = r.find((s) => s.name === "w:sectPr");
15486
15500
  return {
15487
15501
  nodes: r.filter((s) => s.name !== "w:pPr" && s.name !== "w:rPr" && s.name !== "w:sectPr"),
@@ -15493,11 +15507,11 @@ function bm(r) {
15493
15507
  function fr(r) {
15494
15508
  return Ot.allowedElements[r.name || r.type];
15495
15509
  }
15496
- const xm = (r) => !!Ot.propertyTypes[r.name || r.type];
15510
+ const Dm = (r) => !!Ot.propertyTypes[r.name || r.type];
15497
15511
  function gu(r) {
15498
15512
  return r.filter((n) => n.name === "w:r").some((n) => n.elements.some((i) => i.name === "w:t"));
15499
15513
  }
15500
- const Am = (r) => {
15514
+ const vm = (r) => {
15501
15515
  const { nodes: e, nodeListHandler: t } = r;
15502
15516
  if (e.length === 0 || !(e[0].name === "w:del" || e[0].name === "w:ins" || e[0].name === "w:sdt"))
15503
15517
  return { nodes: [], consumed: 0 };
@@ -15520,10 +15534,10 @@ const Am = (r) => {
15520
15534
  return u.forEach((h) => {
15521
15535
  h.marks === void 0 && (h.marks = []), h.marks.push({ type: c, attrs: l });
15522
15536
  }), { nodes: u, consumed: 1 };
15523
- }, Dm = {
15537
+ }, Em = {
15524
15538
  handlerName: "trackChangeNodeHandler",
15525
- handler: Am
15526
- }, vm = (r) => {
15539
+ handler: vm
15540
+ }, Cm = (r) => {
15527
15541
  const { nodes: e, docx: t, nodeListHandler: n } = r;
15528
15542
  if (e.length === 0 || e[0].name !== "w:hyperlink")
15529
15543
  return { nodes: [], consumed: 0 };
@@ -15542,16 +15556,16 @@ const Am = (r) => {
15542
15556
  }
15543
15557
  }
15544
15558
  return { nodes: n.handler({ ...r, nodes: A }), consumed: 1 };
15545
- }, Em = {
15559
+ }, Sm = {
15546
15560
  handlerName: "hyperlinkNodeHandler",
15547
- handler: vm
15548
- }, Cm = (r) => {
15561
+ handler: Cm
15562
+ }, Tm = (r) => {
15549
15563
  const { nodes: e, nodeListHandler: t, parentStyleId: n, docx: i } = r;
15550
15564
  if (e.length === 0 || e[0].name !== "w:r")
15551
15565
  return { nodes: [], consumed: 0 };
15552
15566
  const s = e[0], o = { ...r, nodes: s.elements };
15553
15567
  let a = t.handler(o)?.filter((l) => l) || [];
15554
- const u = s.elements?.some((l) => l.name === "w:rPr"), c = Sm(i, n);
15568
+ const u = s.elements?.some((l) => l.name === "w:rPr"), c = Fm(i, n);
15555
15569
  if (u) {
15556
15570
  const { marks: l = [], attributes: h = {} } = xt(s), g = l.find((v) => v.type === "textStyle"), E = g && Object.keys(g.attrs).length > 0;
15557
15571
  c.marks && !E && l.push(...c.marks), s.marks && l.push(...s.marks);
@@ -15562,16 +15576,16 @@ const Am = (r) => {
15562
15576
  });
15563
15577
  } else c.marks && (a = a.map((l) => ({ ...l, marks: wi(c.marks) })));
15564
15578
  return { nodes: a, consumed: 1 };
15565
- }, Sm = (r, e) => {
15579
+ }, Fm = (r, e) => {
15566
15580
  const t = r?.["word/styles.xml"];
15567
15581
  if (!t)
15568
15582
  return {};
15569
15583
  const i = t.elements[0].elements.filter((s) => s.name === "w:style").find((s) => s.attributes["w:styleId"] === e) || {};
15570
15584
  return i ? xt(i) : {};
15571
- }, Tm = {
15585
+ }, Bm = {
15572
15586
  handlerName: "runNodeHandler",
15573
- handler: Cm
15574
- }, Fm = (r) => {
15587
+ handler: Tm
15588
+ }, km = (r) => {
15575
15589
  const { nodes: e, insideTrackChange: t } = r;
15576
15590
  if (e.length === 0 || !(e[0].name === "w:t" || t && e[0].name === "w:delText"))
15577
15591
  return { nodes: [], consumed: 0 };
@@ -15592,29 +15606,29 @@ const Am = (r) => {
15592
15606
  ],
15593
15607
  consumed: 1
15594
15608
  };
15595
- }, Bm = {
15609
+ }, Nm = {
15596
15610
  handlerName: "textNodeHandler",
15597
- handler: Fm
15611
+ handler: km
15598
15612
  }, wu = (r) => {
15599
15613
  if (!r || !Array.isArray(r))
15600
15614
  return r;
15601
15615
  let e = [], t = null;
15602
15616
  for (let n of r)
15603
- n.type === "text" ? t && km(t, n) ? t = {
15617
+ n.type === "text" ? t && Im(t, n) ? t = {
15604
15618
  ...t,
15605
15619
  text: t.text += n.text
15606
15620
  } : (t && e.push(t), t = { ...n }) : (t && (e.push(t), t = null), e.push(n));
15607
15621
  return t && e.push(t), e;
15608
- }, km = (r, e) => {
15622
+ }, Im = (r, e) => {
15609
15623
  if (!r || !e) return !1;
15610
15624
  let t = r.marks ?? [], n = e.marks ?? [];
15611
15625
  if (t.length !== n.length)
15612
15626
  return !1;
15613
15627
  for (let i = 0; i < t.length; i++)
15614
- if (t[i].attrs || (t[i].attrs = {}), n[i].attrs || (n[i].attrs = {}), t[i].type !== n[i].type || Object.keys(t[i].attrs).length !== Object.keys(n[i].attrs).length || !Nm(t[i].attrs, n[i].attrs))
15628
+ if (t[i].attrs || (t[i].attrs = {}), n[i].attrs || (n[i].attrs = {}), t[i].type !== n[i].type || Object.keys(t[i].attrs).length !== Object.keys(n[i].attrs).length || !Rm(t[i].attrs, n[i].attrs))
15615
15629
  return !1;
15616
15630
  return !0;
15617
- }, Nm = (r = {}, e = {}) => Rf(r, e), Im = (r) => {
15631
+ }, Rm = (r = {}, e = {}) => Pf(r, e), Pm = (r) => {
15618
15632
  const { nodes: e, lists: t, docx: n } = r;
15619
15633
  if (e.length === 0 || e[0].name !== "w:p")
15620
15634
  return { nodes: [], consumed: 0 };
@@ -15633,9 +15647,9 @@ const Am = (r) => {
15633
15647
  };
15634
15648
  } else
15635
15649
  return { nodes: [], consumed: 0, lists: t };
15636
- }, Rm = {
15650
+ }, Om = {
15637
15651
  handlerName: "listHandler",
15638
- handler: Im
15652
+ handler: Pm
15639
15653
  };
15640
15654
  function yu({
15641
15655
  listItems: r,
@@ -15674,9 +15688,9 @@ function yu({
15674
15688
  lvlText: re,
15675
15689
  lvlJc: ie,
15676
15690
  numId: L
15677
- } = _m(N, n, u);
15691
+ } = Mm(N, n, u);
15678
15692
  E = se;
15679
- const V = parseInt(ne), q = i === V && L === s, K = Lm({
15693
+ const V = parseInt(ne), q = i === V && L === s, K = qm({
15680
15694
  firstListId: L,
15681
15695
  secondListId: s,
15682
15696
  level: V,
@@ -15800,7 +15814,7 @@ function Po(r, e, t) {
15800
15814
  marks: t
15801
15815
  };
15802
15816
  }
15803
- const Pm = [
15817
+ const Lm = [
15804
15818
  "decimal",
15805
15819
  // eg: 1, 2, 3, 4, 5, ...
15806
15820
  "decimalZero",
@@ -15825,7 +15839,7 @@ const Pm = [
15825
15839
  // eg: (0, 1, 2, ..., 9, 10, 11, 12, ..., 19, 1A, 1B, 1C, ..., 1Z, 20, 21, ..., 2Z)
15826
15840
  "none"
15827
15841
  // No bullet
15828
- ], Om = [
15842
+ ], _m = [
15829
15843
  "bullet",
15830
15844
  // A standard bullet point (•)
15831
15845
  "square",
@@ -15834,7 +15848,7 @@ const Pm = [
15834
15848
  // Circle bullets (◦)
15835
15849
  "disc"
15836
15850
  // Disc bullets (●)
15837
- ], Lm = ({ firstListId: r, secondListId: e, level: t, pStyleId: n, docx: i }) => {
15851
+ ], qm = ({ firstListId: r, secondListId: e, level: t, pStyleId: n, docx: i }) => {
15838
15852
  const { numFmt: s, lvlText: o, lvlJc: a } = Ar(r, t, n, i), {
15839
15853
  numFmt: u,
15840
15854
  lvlText: c,
@@ -15864,7 +15878,7 @@ const Pm = [
15864
15878
  }
15865
15879
  const a = o.elements, u = a.filter((N) => N.name === "w:abstractNum"), h = a.filter((N) => N.name === "w:num").find((N) => N.attributes["w:numId"] === r)?.elements[0].attributes["w:val"], g = u?.find(
15866
15880
  (N) => N.attributes["w:abstractNumId"] === h
15867
- ), E = qm(g, e), v = g?.elements?.find((N) => N.name === "w:numStyleLink")?.attributes["w:val"];
15881
+ ), E = Um(g, e), v = g?.elements?.find((N) => N.name === "w:numStyleLink")?.attributes["w:val"];
15868
15882
  if (v) {
15869
15883
  const N = Oo(v, n);
15870
15884
  return Ar(N.numId, e, null, n);
@@ -15872,7 +15886,7 @@ const Pm = [
15872
15886
  const F = E?.elements?.find((N) => N.name === "w:start")?.attributes["w:val"], w = E?.elements?.find((N) => N.name === "w:numFmt")?.attributes["w:val"], B = E?.elements?.find((N) => N.name === "w:lvlText").attributes["w:val"], R = E?.elements?.find((N) => N.name === "w:lvlJc").attributes["w:val"], D = E?.elements?.find((N) => N.name === "w:pPr"), k = E?.elements?.find((N) => N.name === "w:rPr");
15873
15887
  return { start: F, numFmt: w, lvlText: B, lvlJc: R, pPr: D, rPr: k };
15874
15888
  };
15875
- function _m(r, e, t) {
15889
+ function Mm(r, e, t) {
15876
15890
  if (!r) return;
15877
15891
  const { attributes: n = {} } = r, { paragraphProperties: i = {} } = n, { elements: s = [] } = i, u = r.elements.find((C) => C.name === "w:pPr")?.elements?.find((C) => C.name === "w:pStyle")?.attributes["w:val"], c = Nr({ node: r, styleId: u, docx: t });
15878
15892
  if (!c) return {};
@@ -15885,17 +15899,17 @@ function _m(r, e, t) {
15885
15899
  rPr: k
15886
15900
  } = Ar(h, e, v, t);
15887
15901
  let N, M;
15888
- D && (N = Mm(D)), k && (M = Um(k));
15902
+ D && (N = jm(D)), k && (M = Hm(k));
15889
15903
  let _;
15890
- if (Om.includes(w?.toLowerCase())) _ = "bulletList";
15891
- else if (Pm.includes(w)) _ = "orderedList";
15904
+ if (_m.includes(w?.toLowerCase())) _ = "bulletList";
15905
+ else if (Lm.includes(w)) _ = "orderedList";
15892
15906
  else return {};
15893
15907
  return { listType: _, listOrderingType: w, ilvl: E, numId: h, listrPrs: M, listpPrs: N, start: F, lvlText: B, lvlJc: R };
15894
15908
  }
15895
- function qm(r, e) {
15909
+ function Um(r, e) {
15896
15910
  return r?.elements?.find((t) => Number(t.attributes["w:ilvl"]) === e);
15897
15911
  }
15898
- function Mm(r) {
15912
+ function jm(r) {
15899
15913
  const { elements: e } = r, t = ["w:ind", "w:jc", "w:tabs"], n = {};
15900
15914
  return e && e.forEach((i) => {
15901
15915
  t.includes(i.name);
@@ -15905,7 +15919,7 @@ function Mm(r) {
15905
15919
  });
15906
15920
  }), n;
15907
15921
  }
15908
- function Um(r) {
15922
+ function Hm(r) {
15909
15923
  const { elements: e } = r, t = [
15910
15924
  "w:rFonts",
15911
15925
  "w:b",
@@ -15962,7 +15976,7 @@ const xu = (r) => {
15962
15976
  }
15963
15977
  let v;
15964
15978
  if (g && (v = g.attributes["w:val"], o.attrs.styleId = v), t) {
15965
- const D = jm(s, t, v);
15979
+ const D = Vm(s, t, v);
15966
15980
  o.attrs.indent || (o.attrs.indent = {}), (D.left || D.left === 0) && (o.attrs.indent.left = D.left), (D.right || D.right === 0) && (o.attrs.indent.right = D.right), (D.firstLine || D.firstLine === 0) && (o.attrs.indent.firstLine = D.firstLine), (D.hanging || D.hanging === 0) && (o.attrs.indent.hanging = D.hanging), (D.textIndent || D.textIndent === 0) && (o.attrs.textIndent = `${D.textIndent}in`);
15967
15981
  }
15968
15982
  const F = h?.elements?.find((D) => D.name === "w:jc");
@@ -15986,7 +16000,7 @@ const xu = (r) => {
15986
16000
  });
15987
16001
  const R = h?.elements?.find((D) => D.name === "w:sectPr");
15988
16002
  return R && (o.attrs.paragraphProperties || (o.attrs.paragraphProperties = {}), o.attrs.paragraphProperties.sectPr = R, o.attrs.pageBreakSource = "sectPr"), { nodes: o ? [o] : [], consumed: 1 };
15989
- }, jm = (r, e, t = "") => {
16003
+ }, Vm = (r, e, t = "") => {
15990
16004
  const n = {
15991
16005
  left: 0,
15992
16006
  right: 0,
@@ -16029,11 +16043,11 @@ const xu = (r) => {
16029
16043
  indent: k || R || D,
16030
16044
  justify: B
16031
16045
  };
16032
- }, Hm = {
16046
+ }, zm = {
16033
16047
  handlerName: "paragraphNodeHandler",
16034
16048
  handler: xu
16035
16049
  };
16036
- function Vm(r, e) {
16050
+ function Gm(r, e) {
16037
16051
  const t = { lineSpaceBefore: null, lineSpaceAfter: null };
16038
16052
  if (!r) return t;
16039
16053
  const n = e["word/styles.xml"];
@@ -16097,14 +16111,14 @@ function vu(r = []) {
16097
16111
  continue;
16098
16112
  }
16099
16113
  if (o === "end" && n) {
16100
- t.push(i), e.push(...zm(t)), t = [], n = !1;
16114
+ t.push(i), e.push(...Wm(t)), t = [], n = !1;
16101
16115
  continue;
16102
16116
  }
16103
16117
  n ? t.push(i) : e.push(i);
16104
16118
  }
16105
16119
  return t.length && e.push(...t), e;
16106
16120
  }
16107
- const zm = (r = []) => {
16121
+ const Wm = (r = []) => {
16108
16122
  let e = [], t = !1, n = !1;
16109
16123
  const i = r.findIndex(
16110
16124
  (h) => h.elements?.some((g) => g.name === "w:fldChar" && g.attributes["w:fldCharType"] === "separate")
@@ -16141,7 +16155,7 @@ const zm = (r = []) => {
16141
16155
  });
16142
16156
  }
16143
16157
  return e;
16144
- }, Gm = (r) => nodeListHandler.handler({ ...r, nodes: node.elements }), Wm = (r) => {
16158
+ }, Jm = (r) => nodeListHandler.handler({ ...r, nodes: node.elements }), $m = (r) => {
16145
16159
  const { nodes: e } = r;
16146
16160
  if (e.length === 0 || e[0].name !== "w:sdt")
16147
16161
  return { nodes: [], consumed: 0 };
@@ -16156,14 +16170,14 @@ const zm = (r = []) => {
16156
16170
  consumed: 1
16157
16171
  };
16158
16172
  }, Lo = {
16159
- "Table of Contents": Gm
16160
- }, Jm = (r) => {
16173
+ "Table of Contents": Jm
16174
+ }, Km = (r) => {
16161
16175
  const { nodes: e, docx: t, nodeListHandler: n, insideTrackChange: i } = r;
16162
16176
  if (e.length === 0 || e[0].name !== "w:sdt")
16163
16177
  return { nodes: [], consumed: 0 };
16164
- const s = e[0], o = s.elements.find((_) => _.name === "w:sdtPr"), a = s.elements.find((_) => _.name === "w:sdtContent"), u = o?.elements.find((_) => _.name === "w:fieldTypeShort")?.attributes["w:val"], { attrs: c, marks: l } = $m(a);
16178
+ const s = e[0], o = s.elements.find((_) => _.name === "w:sdtPr"), a = s.elements.find((_) => _.name === "w:sdtContent"), u = o?.elements.find((_) => _.name === "w:fieldTypeShort")?.attributes["w:val"], { attrs: c, marks: l } = Eu(a);
16165
16179
  if (o?.elements.find((_) => _.name === "w:docPartObj"))
16166
- return Wm({ nodes: e, docx: t, nodeListHandler: n, insideTrackChange: i });
16180
+ return $m({ nodes: e, docx: t, nodeListHandler: n, insideTrackChange: i });
16167
16181
  const g = o?.elements.find((_) => _.name === "w:alias"), E = o?.elements.find((_) => _.name === "w:tag"), A = o?.elements.find((_) => _.name === "w:fieldType")?.attributes["w:val"], v = o?.elements.find((_) => _.name === "w:fieldColor")?.attributes["w:val"], F = o?.elements.find((_) => _.name === "w:fieldMultipleImage")?.attributes["w:val"], w = o?.elements.find((_) => _.name === "w:fieldFontFamily")?.attributes["w:val"], B = o?.elements.find((_) => _.name === "w:fieldFontSize")?.attributes["w:val"], R = o?.elements.find((_) => _.name === "w:fieldTextColor")?.attributes["w:val"], D = o?.elements.find((_) => _.name === "w:fieldTextHighlight")?.attributes["w:val"], k = {
16168
16182
  type: u,
16169
16183
  fieldId: E?.attributes["w:val"],
@@ -16191,7 +16205,7 @@ const zm = (r = []) => {
16191
16205
  nodes: [M],
16192
16206
  consumed: 1
16193
16207
  };
16194
- }, $m = (r = {}, e) => {
16208
+ }, Eu = (r = {}, e) => {
16195
16209
  const i = r.elements?.find((c) => c.name === "w:r")?.elements?.find((c) => c.name === "w:rPr");
16196
16210
  if (!i) return {};
16197
16211
  const o = Rt(i, []) || [], a = [];
@@ -16213,17 +16227,36 @@ const zm = (r = []) => {
16213
16227
  attrs: u,
16214
16228
  marks: o
16215
16229
  };
16216
- }, Km = {
16230
+ }, Xm = {
16217
16231
  handlerName: "annotationNodeHandler",
16218
- handler: Jm
16219
- }, Xm = (r) => {
16232
+ handler: Km
16233
+ }, Ym = (r) => {
16234
+ const { nodes: e, nodeListHandler: t } = r;
16235
+ if (e.length === 0 || e[0].name !== "w:sdt")
16236
+ return { nodes: [], consumed: 0 };
16237
+ const n = e[0], i = n.elements.find((c) => c.name === "w:sdtPr"), s = n.elements.find((c) => c.name === "w:sdtContent"), { marks: o } = Eu(s);
16238
+ return {
16239
+ nodes: [{
16240
+ type: "structuredContent",
16241
+ content: t.handler({ ...r, nodes: s?.elements }),
16242
+ marks: o,
16243
+ attrs: {
16244
+ sdtPr: i
16245
+ }
16246
+ }],
16247
+ consumed: 1
16248
+ };
16249
+ }, Zm = {
16250
+ handlerName: "sdtNodeHandler",
16251
+ handler: Ym
16252
+ }, Qm = (r) => {
16220
16253
  const { nodes: e, docx: t, nodeListHandler: n } = r;
16221
16254
  if (!e || e.length === 0)
16222
16255
  return { nodes: [], consumed: 0 };
16223
16256
  const i = e[0], { name: s } = i, { attributes: o, elements: a, marks: u = [] } = xt(i);
16224
16257
  if (s === "w:sdt")
16225
16258
  return { nodes: [], consumed: 0 };
16226
- if (xm(i))
16259
+ if (Dm(i))
16227
16260
  return {
16228
16261
  nodes: [{
16229
16262
  type: fr(i),
@@ -16243,7 +16276,7 @@ const zm = (r = []) => {
16243
16276
  consumed: 0,
16244
16277
  unhandled: !0
16245
16278
  };
16246
- const c = [], l = Ym(i);
16279
+ const c = [], l = ep(i);
16247
16280
  if (a && a.length) {
16248
16281
  const g = a.map((v) => (v.marks || (v.marks = []), v.marks.push(...u), v)), E = { ...r, nodes: g, parentStyleId: l }, A = n.handler(E);
16249
16282
  c.push(...A);
@@ -16254,13 +16287,13 @@ const zm = (r = []) => {
16254
16287
  attrs: { ...o },
16255
16288
  marks: []
16256
16289
  }], consumed: 1 };
16257
- }, Ym = (r) => {
16290
+ }, ep = (r) => {
16258
16291
  const t = r.elements?.find((n) => n.name === "w:pPr")?.elements?.find((n) => n.name === "w:pStyle");
16259
16292
  return t ? t.attributes["w:val"] : null;
16260
- }, Zm = {
16293
+ }, tp = {
16261
16294
  handlerName: "standardNodeHandler",
16262
- handler: Xm
16263
- }, Qm = (r) => {
16295
+ handler: Qm
16296
+ }, rp = (r) => {
16264
16297
  const { nodes: e } = r;
16265
16298
  return e.length === 0 || e[0].name !== "w:br" ? { nodes: [], consumed: 0 } : {
16266
16299
  nodes: [{
@@ -16268,10 +16301,10 @@ const zm = (r = []) => {
16268
16301
  }],
16269
16302
  consumed: 1
16270
16303
  };
16271
- }, ep = {
16304
+ }, np = {
16272
16305
  handlerName: "lineBreakNodeHandler",
16273
- handler: Qm
16274
- }, tp = (r) => {
16306
+ handler: rp
16307
+ }, ip = (r) => {
16275
16308
  const { nodes: e, nodeListHandler: t, editor: n } = r;
16276
16309
  if (e.length === 0 || e[0].name !== "w:bookmarkStart")
16277
16310
  return { nodes: [], consumed: 0 };
@@ -16300,10 +16333,10 @@ const zm = (r = []) => {
16300
16333
  }
16301
16334
  const c = { ...r, nodes: [i] }, l = s(c);
16302
16335
  return l.nodes.length === 1 && (l.nodes[0].attrs.name = i.attributes["w:name"], l.nodes[0].attrs.id = i.attributes["w:id"]), l;
16303
- }, rp = {
16336
+ }, sp = {
16304
16337
  handlerName: "bookmarkNodeHandler",
16305
- handler: tp
16306
- }, np = (r) => {
16338
+ handler: ip
16339
+ }, op = (r) => {
16307
16340
  const e = { nodes: [], consumed: 0 }, { nodes: t, nodeListHandler: n, parentStyleId: i, docx: s } = r;
16308
16341
  if (t.length === 0 || t[0].name !== "w:p")
16309
16342
  return e;
@@ -16322,26 +16355,26 @@ const zm = (r = []) => {
16322
16355
  ...r,
16323
16356
  nodes: g
16324
16357
  }), consumed: 1 };
16325
- }, ip = {
16358
+ }, ap = {
16326
16359
  handlerName: "alternateChoiceHandler",
16327
- handler: np
16328
- }, sp = (r) => {
16360
+ handler: op
16361
+ }, up = (r) => {
16329
16362
  const { nodes: e } = r;
16330
16363
  return e.length === 0 || e[0].name !== "sd:autoPageNumber" ? { nodes: [], consumed: 0 } : { nodes: [{
16331
16364
  type: "page-number"
16332
16365
  }], consumed: 1 };
16333
- }, op = {
16366
+ }, lp = {
16334
16367
  handlerName: "autoPageNumberHandler",
16335
- handler: sp
16336
- }, ap = (r) => {
16368
+ handler: up
16369
+ }, cp = (r) => {
16337
16370
  const { nodes: e } = r;
16338
16371
  return e.length === 0 || e[0].name !== "sd:totalPageNumber" ? { nodes: [], consumed: 0 } : { nodes: [{
16339
16372
  type: "total-page-number"
16340
16373
  }], consumed: 1 };
16341
- }, up = {
16374
+ }, fp = {
16342
16375
  handlerName: "autoTotalPageCountEntity",
16343
- handler: ap
16344
- }, lp = (r) => {
16376
+ handler: cp
16377
+ }, dp = (r) => {
16345
16378
  const { nodes: e, docx: t, parentStyleId: n } = r;
16346
16379
  if (e.length === 0 || e[0].name !== "w:tab")
16347
16380
  return { nodes: [], consumed: 0 };
@@ -16358,10 +16391,10 @@ const zm = (r = []) => {
16358
16391
  },
16359
16392
  content: []
16360
16393
  }], consumed: 1 };
16361
- }, cp = {
16394
+ }, mp = {
16362
16395
  handlerName: "tabNodeHandler",
16363
- handler: lp
16364
- }, fp = (r) => {
16396
+ handler: dp
16397
+ }, pp = (r) => {
16365
16398
  const { nodes: e } = r;
16366
16399
  if (!e.length || e[0].name !== "w:p")
16367
16400
  return { nodes: [], consumed: 0 };
@@ -16374,14 +16407,14 @@ const zm = (r = []) => {
16374
16407
  if (!o && !a)
16375
16408
  return { nodes: [], consumed: 0 };
16376
16409
  let u = null;
16377
- return a && !o ? u = null : o.elements?.find((h) => h.name === "v:textbox") && (u = dp({
16410
+ return a && !o ? u = null : o.elements?.find((h) => h.name === "v:textbox") && (u = hp({
16378
16411
  pict: i,
16379
16412
  pNode: t,
16380
16413
  shape: o,
16381
16414
  params: r
16382
16415
  })), { nodes: u ? [u] : [], consumed: 1 };
16383
16416
  };
16384
- function dp({
16417
+ function hp({
16385
16418
  pict: r,
16386
16419
  pNode: e,
16387
16420
  shape: t,
@@ -16389,7 +16422,7 @@ function dp({
16389
16422
  }) {
16390
16423
  const i = {}, s = {}, o = t.attributes || {};
16391
16424
  i.attributes = o, o.fillcolor && (i.fillcolor = o.fillcolor);
16392
- const a = mp(o.style), u = pp(a);
16425
+ const a = gp(o.style), u = wp(a);
16393
16426
  u && (i.style = u);
16394
16427
  const c = t.elements?.find((w) => w.name === "v:textbox"), l = t.elements?.find((w) => w.name === "w10:wrap");
16395
16428
  l?.attributes && (i.wrapAttributes = l.attributes), c?.attributes && (s.attributes = c.attributes);
@@ -16408,13 +16441,13 @@ function dp({
16408
16441
  }]
16409
16442
  };
16410
16443
  }
16411
- function mp(r) {
16444
+ function gp(r) {
16412
16445
  return r ? r.split(";").filter((e) => !!e.trim()).reduce((e, t) => {
16413
16446
  const [n, i] = t.split(":").map((s) => s.trim());
16414
16447
  return n && i && (e[n] = i), e;
16415
16448
  }, {}) : {};
16416
16449
  }
16417
- function pp(r) {
16450
+ function wp(r) {
16418
16451
  const e = [
16419
16452
  "width",
16420
16453
  "height"
@@ -16432,11 +16465,11 @@ function pp(r) {
16432
16465
  e.includes(n) && (t += `${n}: ${i};`);
16433
16466
  return t;
16434
16467
  }
16435
- const hp = {
16468
+ const yp = {
16436
16469
  handlerName: "handlePictNode",
16437
- handler: fp
16470
+ handler: pp
16438
16471
  };
16439
- function gp({ docx: r }) {
16472
+ function bp({ docx: r }) {
16440
16473
  const e = Jt(), t = r["word/comments.xml"];
16441
16474
  if (!t) return;
16442
16475
  const { elements: n } = t;
@@ -16462,16 +16495,16 @@ function gp({ docx: r }) {
16462
16495
  trackedDeletedText: B
16463
16496
  };
16464
16497
  });
16465
- return wp({ docx: r, comments: s });
16498
+ return xp({ docx: r, comments: s });
16466
16499
  }
16467
- const wp = ({ docx: r, comments: e }) => {
16500
+ const xp = ({ docx: r, comments: e }) => {
16468
16501
  const t = r["word/commentsExtended.xml"];
16469
16502
  if (!t) return [];
16470
16503
  const { elements: n } = t, { elements: i } = n[0], s = i.filter((o) => o.name === "w15:commentEx");
16471
16504
  return e.map((o) => {
16472
16505
  const a = s.find((g) => g.attributes["w15:paraId"] === o.paraId);
16473
16506
  if (!a) return { ...o };
16474
- const { isDone: u, paraIdParent: c } = yp(a);
16507
+ const { isDone: u, paraIdParent: c } = Ap(a);
16475
16508
  let l;
16476
16509
  return c && (l = e.find((g) => g.paraId === c)), {
16477
16510
  ...o,
@@ -16479,11 +16512,11 @@ const wp = ({ docx: r, comments: e }) => {
16479
16512
  parentCommentId: l?.commentId
16480
16513
  };
16481
16514
  });
16482
- }, yp = (r) => {
16515
+ }, Ap = (r) => {
16483
16516
  const { attributes: e } = r, t = e["w15:paraId"], n = e["w15:done"] === "1", i = e["w15:paraIdParent"];
16484
16517
  return { paraId: t, isDone: n, paraIdParent: i };
16485
- }, bp = (r, e, t) => {
16486
- const n = Ue(tm(r));
16518
+ }, Dp = (r, e, t) => {
16519
+ const n = Ue(nm(r));
16487
16520
  if (!n) return null;
16488
16521
  if (e?.telemetry) {
16489
16522
  const o = Object.keys(r).map((a) => {
@@ -16508,7 +16541,7 @@ const wp = ({ docx: r, comments: e }) => {
16508
16541
  }
16509
16542
  const i = Jt(), s = n.elements[0].elements.find((o) => o.name === "w:body");
16510
16543
  if (s) {
16511
- const o = s, a = ["w:sectPr"], u = o.elements?.filter((E) => !a.includes(E.name)) ?? [], c = gp({ docx: r }), l = {}, g = {
16544
+ const o = s, a = ["w:sectPr"], u = o.elements?.filter((E) => !a.includes(E.name)) ?? [], c = bp({ docx: r }), l = {}, g = {
16512
16545
  type: "doc",
16513
16546
  content: i.handler({
16514
16547
  nodes: u,
@@ -16531,39 +16564,40 @@ const wp = ({ docx: r, comments: e }) => {
16531
16564
  ), {
16532
16565
  pmDoc: g,
16533
16566
  savedTagsToRestore: o,
16534
- pageStyles: Ap(o, r, e, t),
16567
+ pageStyles: Ep(o, r, e, t),
16535
16568
  comments: c,
16536
- linkedStyles: Dp(r),
16537
- numbering: Cp(r)
16569
+ linkedStyles: Cp(r),
16570
+ numbering: Fp(r)
16538
16571
  };
16539
16572
  }
16540
16573
  return null;
16541
16574
  }, Jt = () => {
16542
16575
  const r = [
16543
- ip,
16544
- Tm,
16545
- hp,
16546
- Hm,
16547
- Rm,
16576
+ ap,
16548
16577
  Bm,
16549
- ep,
16550
- Km,
16551
- rp,
16578
+ yp,
16579
+ zm,
16580
+ Om,
16581
+ Nm,
16582
+ np,
16583
+ Xm,
16584
+ Zm,
16585
+ sp,
16586
+ Sm,
16587
+ pm,
16552
16588
  Em,
16553
- dm,
16554
- Dm,
16555
- nm,
16556
- cp,
16557
- op,
16558
- up,
16559
- Zm
16589
+ sm,
16590
+ mp,
16591
+ lp,
16592
+ fp,
16593
+ tp
16560
16594
  //this should be the last one, bcs this parses everything!!!
16561
16595
  ];
16562
16596
  return {
16563
- handler: xp(r),
16597
+ handler: vp(r),
16564
16598
  handlerEntities: r
16565
16599
  };
16566
- }, xp = (r) => {
16600
+ }, vp = (r) => {
16567
16601
  const e = (n, i, s, o) => !n || i < 0 || i >= n.length ? {
16568
16602
  elementIndex: i,
16569
16603
  error: "index_out_of_bounds",
@@ -16648,7 +16682,7 @@ const wp = ({ docx: r, comments: e }) => {
16648
16682
  };
16649
16683
  return t;
16650
16684
  };
16651
- function Ap(r, e, t, n) {
16685
+ function Ep(r, e, t, n) {
16652
16686
  const i = r.elements?.find((o) => o.name === "w:sectPr"), s = {};
16653
16687
  return i?.elements?.forEach((o) => {
16654
16688
  const { name: a, attributes: u } = o;
@@ -16686,9 +16720,9 @@ function Ap(r, e, t, n) {
16686
16720
  case "w:titlePg":
16687
16721
  t.headerIds.titlePg = !0;
16688
16722
  }
16689
- }), Ep(e, t, n), s.alternateHeaders = Sp(e), s;
16723
+ }), Tp(e, t, n), s.alternateHeaders = Bp(e), s;
16690
16724
  }
16691
- function Dp(r) {
16725
+ function Cp(r) {
16692
16726
  const e = r["word/styles.xml"];
16693
16727
  if (!e) return [];
16694
16728
  const { elements: t } = e.elements[0], n = t.filter((o) => o.name === "w:style");
@@ -16698,7 +16732,7 @@ function Dp(r) {
16698
16732
  });
16699
16733
  const s = [];
16700
16734
  return n.forEach((o) => {
16701
- const a = o.attributes["w:styleId"], u = Vm(a, r), c = {
16735
+ const a = o.attributes["w:styleId"], u = Gm(a, r), c = {
16702
16736
  id: o.attributes["w:styleId"],
16703
16737
  type: o.attributes["w:type"],
16704
16738
  definition: u,
@@ -16707,7 +16741,7 @@ function Dp(r) {
16707
16741
  s.push(c);
16708
16742
  }), s;
16709
16743
  }
16710
- function vp(r) {
16744
+ function Sp(r) {
16711
16745
  if (!r) return null;
16712
16746
  const e = Ue(r), { elements: t } = e.elements[0];
16713
16747
  return Object.keys(Co).forEach((n) => {
@@ -16717,8 +16751,8 @@ function vp(r) {
16717
16751
  }
16718
16752
  }), e;
16719
16753
  }
16720
- const Ep = (r, e, t) => {
16721
- const i = r["word/_rels/document.xml.rels"].elements.find((g) => g.name === "Relationships"), { elements: s } = i, o = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/header", a = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/footer", u = s.filter((g) => g.attributes.Type === o), c = s.filter((g) => g.attributes.Type === a), h = (Eu(r["word/document.xml"]) || []).flatMap((g) => g.elements);
16754
+ const Tp = (r, e, t) => {
16755
+ const i = r["word/_rels/document.xml.rels"].elements.find((g) => g.name === "Relationships"), { elements: s } = i, o = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/header", a = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/footer", u = s.filter((g) => g.attributes.Type === o), c = s.filter((g) => g.attributes.Type === a), h = (Cu(r["word/document.xml"]) || []).flatMap((g) => g.elements);
16722
16756
  u.forEach((g) => {
16723
16757
  const { rId: E, referenceFile: A, currentFileName: v } = _o(g, r);
16724
16758
  let w = h.find((D) => D.name === "w:headerReference" && D.attributes["r:id"] === E)?.attributes["w:type"];
@@ -16743,9 +16777,9 @@ const Ep = (r, e, t) => {
16743
16777
  });
16744
16778
  e.footerIds.ids || (e.footerIds.ids = []), e.footerIds.ids.push(E), e.footers[E] = { type: "doc", content: [...R] }, e.footerIds[w] = E;
16745
16779
  });
16746
- }, Eu = (r, e = []) => {
16780
+ }, Cu = (r, e = []) => {
16747
16781
  for (const t in r)
16748
- r[t] === "w:sectPr" ? e.push(r) : typeof r[t] == "object" && Eu(r[t], e);
16782
+ r[t] === "w:sectPr" ? e.push(r) : typeof r[t] == "object" && Cu(r[t], e);
16749
16783
  return e;
16750
16784
  }, _o = (r, e) => {
16751
16785
  const t = r.attributes.Id, n = r.attributes.Target, i = e[`word/${n}`];
@@ -16755,7 +16789,7 @@ const Ep = (r, e, t) => {
16755
16789
  currentFileName: n
16756
16790
  };
16757
16791
  };
16758
- function Cp(r) {
16792
+ function Fp(r) {
16759
16793
  let e = r["word/numbering.xml"];
16760
16794
  (!e || !e.elements?.length || !e.elements[0].elements?.length) && (e = nu);
16761
16795
  const t = e.elements[0].elements, n = t.filter((a) => a.name === "w:abstractNum"), i = t.filter((a) => a.name === "w:num"), s = {};
@@ -16772,13 +16806,13 @@ function Cp(r) {
16772
16806
  definitions: o
16773
16807
  };
16774
16808
  }
16775
- const Sp = (r) => {
16809
+ const Bp = (r) => {
16776
16810
  const e = r["word/settings.xml"];
16777
16811
  if (!e || !e.elements?.length) return !1;
16778
16812
  const { elements: t = [] } = e.elements[0];
16779
16813
  return !!t.find((i) => i.name === "w:evenAndOddHeaders");
16780
- }, Tp = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink";
16781
- var it, Cu, Su, Tu, Fu;
16814
+ }, kp = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink";
16815
+ var it, Su, Tu, Fu, Bu;
16782
16816
  const pt = class pt {
16783
16817
  constructor(e = null) {
16784
16818
  Ir(this, it);
@@ -16786,7 +16820,7 @@ const pt = class pt {
16786
16820
  }
16787
16821
  parseFromXml() {
16788
16822
  this.docx?.forEach((e) => {
16789
- this.convertedXml[e.name] = this.parseXmlToJson(e.content), e.name === "word/document.xml" && (this.documentAttributes = this.convertedXml[e.name].elements[0]?.attributes), e.name === "word/styles.xml" && (this.convertedXml[e.name] = vp(this.convertedXml[e.name]));
16823
+ this.convertedXml[e.name] = this.parseXmlToJson(e.content), e.name === "word/document.xml" && (this.documentAttributes = this.convertedXml[e.name].elements[0]?.attributes), e.name === "word/styles.xml" && (this.convertedXml[e.name] = Sp(this.convertedXml[e.name]));
16790
16824
  }), this.initialJSON = this.convertedXml["word/document.xml"], this.initialJSON || (this.initialJSON = this.parseXmlToJson(this.xml)), this.declaration = this.initialJSON?.declaration;
16791
16825
  }
16792
16826
  parseXmlToJson(e) {
@@ -16805,9 +16839,9 @@ const pt = class pt {
16805
16839
  return;
16806
16840
  }
16807
16841
  }
16808
- static updateDocumentVersion(e = this.convertedXml, t = "0.11.48") {
16842
+ static updateDocumentVersion(e = this.convertedXml, t = "0.11.50") {
16809
16843
  const n = "docProps/custom.xml";
16810
- e[n] || (e[n] = Bu());
16844
+ e[n] || (e[n] = ku());
16811
16845
  const i = e["docProps/custom.xml"];
16812
16846
  if (!i) return;
16813
16847
  const s = i.elements.find((a) => a.name === "Properties");
@@ -16816,7 +16850,7 @@ const pt = class pt {
16816
16850
  if (o)
16817
16851
  o.elements[0].elements[0].elements[0].text = t;
16818
16852
  else {
16819
- const a = ku();
16853
+ const a = Nu();
16820
16854
  s.elements.push(a);
16821
16855
  }
16822
16856
  return e;
@@ -16858,7 +16892,7 @@ const pt = class pt {
16858
16892
  if (!l) return;
16859
16893
  const g = this.fonts[`word/${l}`]?.buffer;
16860
16894
  if (!g) return;
16861
- const E = zf(g, c.attributes["w:fontKey"]);
16895
+ const E = Gf(g, c.attributes["w:fontKey"]);
16862
16896
  if (!E) return;
16863
16897
  const A = new Blob([E], { type: "font/ttf" }), v = URL.createObjectURL(A), F = c.name.includes("Regular"), w = c.name.includes("Bold"), B = c.name.includes("Italic"), R = c.name.includes("Light");
16864
16898
  u += `
@@ -16875,7 +16909,7 @@ const pt = class pt {
16875
16909
  }
16876
16910
  getDocumentInternalId() {
16877
16911
  const e = "word/settings.xml";
16878
- this.convertedXml[e] || (this.convertedXml[e] = Jf);
16912
+ this.convertedXml[e] || (this.convertedXml[e] = $f);
16879
16913
  const t = Object.assign({}, this.convertedXml[e]);
16880
16914
  if (!t.elements[0]?.elements?.length) {
16881
16915
  const i = this.createDocumentIdElement(t);
@@ -16907,14 +16941,14 @@ const pt = class pt {
16907
16941
  }
16908
16942
  getSchema(e) {
16909
16943
  this.getDocumentInternalId();
16910
- const t = bp({ ...this.convertedXml, media: this.media }, this, e);
16944
+ const t = Dp({ ...this.convertedXml, media: this.media }, this, e);
16911
16945
  return t ? (this.savedTagsToRestore.push({ ...t.savedTagsToRestore }), this.pageStyles = t.pageStyles, this.numbering = t.numbering, this.comments = t.comments, this.linkedStyles = t.linkedStyles, t.pmDoc) : null;
16912
16946
  }
16913
16947
  schemaToXml(e, t = !1) {
16914
16948
  return new No(this).schemaToXml(e, t);
16915
16949
  }
16916
16950
  async exportToDocx(e, t, n, i = !1, s, o = [], a) {
16917
- const u = o.map((F) => id(F)), c = u.map((F, w) => sd(F, w, u, a)), { result: l, params: h } = this.exportToXmlJson({
16951
+ const u = o.map((F) => sd(F)), c = u.map((F, w) => od(F, w, u, a)), { result: l, params: h } = this.exportToXmlJson({
16918
16952
  data: e,
16919
16953
  editorSchema: t,
16920
16954
  comments: o,
@@ -16923,21 +16957,21 @@ const pt = class pt {
16923
16957
  isFinalDoc: i,
16924
16958
  editor: a
16925
16959
  }), E = new No(this).schemaToXml(l);
16926
- await Ke(this, it, Fu).call(this, {
16960
+ await Ke(this, it, Bu).call(this, {
16927
16961
  ...n,
16928
16962
  ...h.media,
16929
16963
  ...this.media
16930
16964
  }, a);
16931
16965
  let A = { ...this.convertedXml }, v = [];
16932
16966
  if (o.length) {
16933
- const { documentXml: F, relationships: w } = Ke(this, it, Su).call(this, {
16967
+ const { documentXml: F, relationships: w } = Ke(this, it, Tu).call(this, {
16934
16968
  defs: h.exportedCommentDefs,
16935
16969
  exportType: s,
16936
16970
  commentsWithParaIds: u
16937
16971
  });
16938
16972
  A = { ...F }, v = w;
16939
16973
  }
16940
- return this.convertedXml = { ...this.convertedXml, ...A }, Ke(this, it, Tu).call(this, [...h.relationships, ...v]), Fp(this.convertedXml), Ke(this, it, Cu).call(this, h), E;
16974
+ return this.convertedXml = { ...this.convertedXml, ...A }, Ke(this, it, Fu).call(this, [...h.relationships, ...v]), Np(this.convertedXml), Ke(this, it, Su).call(this, h), E;
16941
16975
  }
16942
16976
  exportToXmlJson({
16943
16977
  data: e,
@@ -16966,7 +17000,7 @@ const pt = class pt {
16966
17000
  return { result: c, params: l };
16967
17001
  }
16968
17002
  };
16969
- it = new WeakSet(), Cu = function(e) {
17003
+ it = new WeakSet(), Su = function(e) {
16970
17004
  const t = "word/numbering.xml";
16971
17005
  let n = this.convertedXml[t];
16972
17006
  const i = this.numbering;
@@ -16976,8 +17010,8 @@ it = new WeakSet(), Cu = function(e) {
16976
17010
  }, /**
16977
17011
  * Update comments files and relationships depending on export type
16978
17012
  */
16979
- Su = function({ defs: e, exportType: t, commentsWithParaIds: n }) {
16980
- const { documentXml: i, relationships: s } = dd({
17013
+ Tu = function({ defs: e, exportType: t, commentsWithParaIds: n }) {
17014
+ const { documentXml: i, relationships: s } = md({
16981
17015
  exportType: t,
16982
17016
  convertedXml: this.convertedXml,
16983
17017
  defs: e,
@@ -16985,19 +17019,19 @@ Su = function({ defs: e, exportType: t, commentsWithParaIds: n }) {
16985
17019
  converter: this
16986
17020
  });
16987
17021
  return { documentXml: i, relationships: s };
16988
- }, Tu = function(e = []) {
17022
+ }, Fu = function(e = []) {
16989
17023
  const t = this.convertedXml["word/_rels/document.xml.rels"], n = t.elements.find((a) => a.name === "Relationships"), i = [], s = /rId|mi/g;
16990
17024
  let o = Math.max(...n.elements.map((a) => Number(a.attributes.Id.replace(s, ""))));
16991
17025
  e.forEach((a) => {
16992
- const u = a.attributes.Id, c = n.elements.find((g) => g.attributes.Target === a.attributes.Target), l = a.attributes.Target?.startsWith("media/") && u.length > 6, h = a.attributes.Type === Tp && u.length > 6;
17026
+ const u = a.attributes.Id, c = n.elements.find((g) => g.attributes.Target === a.attributes.Target), l = a.attributes.Target?.startsWith("media/") && u.length > 6, h = a.attributes.Type === kp && u.length > 6;
16993
17027
  c && !l && !h || (a.attributes.Target = a.attributes?.Target?.replace(/&/g, "&amp;"), a.attributes.Id = u.length > 6 ? u : `rId${++o}`, i.push(a));
16994
17028
  }), n.elements = [...n.elements, ...i], this.convertedXml["word/_rels/document.xml.rels"] = t;
16995
- }, Fu = async function(e, t) {
17029
+ }, Bu = async function(e, t) {
16996
17030
  const n = {};
16997
17031
  for (const i in e) {
16998
17032
  if (typeof e[i] != "string") return;
16999
17033
  const s = i.split("/").pop();
17000
- n[s] = await Mf(e[i], t.options.isHeadless);
17034
+ n[s] = await Uf(e[i], t.options.isHeadless);
17001
17035
  }
17002
17036
  this.convertedXml.media = {
17003
17037
  ...this.convertedXml.media,
@@ -17049,9 +17083,9 @@ Su = function({ defs: e, exportType: t, commentsWithParaIds: n }) {
17049
17083
  "w:tcPr": "tableCellProperties"
17050
17084
  })), Mt(pt, "elements", /* @__PURE__ */ new Set(["w:document", "w:body", "w:p", "w:r", "w:t", "w:delText"]));
17051
17085
  let Ot = pt;
17052
- function Fp(r) {
17086
+ function Np(r) {
17053
17087
  const e = "docProps/custom.xml";
17054
- r[e] || (r[e] = Bu());
17088
+ r[e] || (r[e] = ku());
17055
17089
  const n = r[e].elements.find((a) => a.name === "Properties");
17056
17090
  n.elements || (n.elements = []);
17057
17091
  const i = n.elements, s = i.filter((a) => typeof a == "object" && a !== null).filter((a) => {
@@ -17063,12 +17097,12 @@ function Fp(r) {
17063
17097
  o = s.length ? Math.max(...i.map((a) => a.attributes.pid)) + 1 : 2;
17064
17098
  } catch {
17065
17099
  }
17066
- return s.push(ku(o)), n.elements = s, r;
17100
+ return s.push(Nu(o)), n.elements = s, r;
17067
17101
  }
17068
- function Bu() {
17069
- return Wf;
17102
+ function ku() {
17103
+ return Jf;
17070
17104
  }
17071
- function ku(r = 2, e = "0.11.48") {
17105
+ function Nu(r = 2, e = "0.11.50") {
17072
17106
  return {
17073
17107
  type: "element",
17074
17108
  name: "property",
@@ -17092,7 +17126,7 @@ function ku(r = 2, e = "0.11.48") {
17092
17126
  };
17093
17127
  }
17094
17128
  export {
17095
- pd as $,
17129
+ hd as $,
17096
17130
  at as A,
17097
17131
  St as B,
17098
17132
  xr as C,
@@ -17100,54 +17134,55 @@ export {
17100
17134
  xa as E,
17101
17135
  Q as F,
17102
17136
  Oi as G,
17103
- Vp as H,
17104
- ct as I,
17137
+ Wp as H,
17138
+ ft as I,
17105
17139
  et as J,
17106
17140
  Ii as K,
17107
17141
  Te as L,
17108
17142
  br as M,
17109
17143
  We as N,
17110
17144
  Ot as O,
17111
- jp as P,
17145
+ zp as P,
17112
17146
  Ct as Q,
17113
17147
  $e as R,
17114
- Ip as S,
17148
+ Op as S,
17115
17149
  tt as T,
17116
- Lf as U,
17117
- Zp as V,
17118
- Hp as W,
17150
+ _f as U,
17151
+ th as V,
17152
+ Gp as W,
17119
17153
  Za as X,
17120
- md as Y,
17121
- Ff as Z,
17122
- Tf as _,
17123
- Up as a,
17154
+ pd as Y,
17155
+ Bf as Z,
17156
+ Ff as _,
17157
+ Vp as a,
17124
17158
  Je as a0,
17125
17159
  qo as a1,
17126
- Yp as a2,
17127
- zp as a3,
17128
- Lp as b,
17129
- Gp as c,
17130
- _p as d,
17160
+ eh as a2,
17161
+ ba as a3,
17162
+ Jp as a4,
17163
+ Mp as b,
17164
+ $p as c,
17165
+ Up as d,
17131
17166
  Ee as e,
17132
17167
  ae as f,
17133
- Kp as g,
17168
+ Zp as g,
17134
17169
  Ie as h,
17135
- Wp as i,
17136
- qp as j,
17137
- _c as k,
17138
- Pp as l,
17139
- Op as m,
17140
- Jp as n,
17141
- Rf as o,
17142
- $p as p,
17170
+ Kp as i,
17171
+ jp as j,
17172
+ qc as k,
17173
+ _p as l,
17174
+ qp as m,
17175
+ Xp as n,
17176
+ Pf as o,
17177
+ Yp as p,
17143
17178
  Ri as q,
17144
- xf as r,
17145
- Xp as s,
17179
+ Af as r,
17180
+ Qp as s,
17146
17181
  ru as t,
17147
17182
  _a as u,
17148
17183
  we as v,
17149
- Mp as w,
17184
+ Hp as w,
17150
17185
  ge as x,
17151
- If as y,
17186
+ Rf as y,
17152
17187
  Pi as z
17153
17188
  };