@harbour-enterprises/superdoc 0.11.24 → 0.11.25
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.
- package/dist/chunks/{super-editor.es-Drj1-k9m.es.js → super-editor.es-BYQUwXzm.es.js} +1900 -1902
- package/dist/chunks/{super-editor.es-hpZRbvKj.cjs → super-editor.es-Dv9_xwE3.cjs} +44 -44
- package/dist/super-editor/ai-writer.es.js +2 -2
- package/dist/super-editor/chunks/{converter-CZN3yFqr.js → converter-Da9SVJB1.js} +769 -771
- package/dist/super-editor/chunks/{docx-zipper-BwpR2edv.js → docx-zipper-BaVRAeT-.js} +1 -1
- package/dist/super-editor/chunks/{editor-BPsKBCAJ.js → editor-C-OrZnnH.js} +3 -3
- package/dist/super-editor/chunks/{toolbar-Ba50Re4w.js → toolbar-ofl_qv42.js} +2 -2
- package/dist/super-editor/converter.es.js +1 -1
- package/dist/super-editor/core/super-converter/v2/importer/paragraphNodeImporter.d.ts +1 -1
- package/dist/super-editor/core/super-converter/v2/importer/paragraphNodeImporter.d.ts.map +1 -1
- package/dist/super-editor/docx-zipper.es.js +2 -2
- package/dist/super-editor/editor.es.js +3 -3
- package/dist/super-editor/file-zipper.es.js +1 -1
- package/dist/super-editor/super-editor.es.js +6 -6
- package/dist/super-editor/toolbar.es.js +2 -2
- package/dist/super-editor.cjs +1 -1
- package/dist/super-editor.es.js +1 -1
- package/dist/superdoc.cjs +2 -2
- package/dist/superdoc.es.js +3 -3
- package/dist/superdoc.umd.js +797 -799
- package/dist/superdoc.umd.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
var
|
|
1
|
+
var Nu = Object.defineProperty;
|
|
2
2
|
var _i = (r) => {
|
|
3
3
|
throw TypeError(r);
|
|
4
4
|
};
|
|
5
|
-
var
|
|
6
|
-
var Mt = (r, e, t) =>
|
|
5
|
+
var Iu = (r, e, t) => e in r ? Nu(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t;
|
|
6
|
+
var Mt = (r, e, t) => Iu(r, typeof e != "symbol" ? e + "" : e, t), Ru = (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) => (
|
|
8
|
+
var Ke = (r, e, t) => (Ru(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
|
-
function
|
|
11
|
+
function qo(r) {
|
|
12
12
|
return r && r.__esModule && Object.prototype.hasOwnProperty.call(r, "default") ? r.default : r;
|
|
13
13
|
}
|
|
14
|
-
function
|
|
14
|
+
function Pu(r) {
|
|
15
15
|
if (r.__esModule) return r;
|
|
16
16
|
var e = r.default;
|
|
17
17
|
if (typeof e == "function") {
|
|
@@ -31,15 +31,15 @@ function Ou(r) {
|
|
|
31
31
|
}), t;
|
|
32
32
|
}
|
|
33
33
|
var Fe = {}, Dr = {};
|
|
34
|
-
Dr.byteLength =
|
|
35
|
-
Dr.toByteArray =
|
|
36
|
-
Dr.fromByteArray =
|
|
37
|
-
var Qe = [], ze = [],
|
|
38
|
-
for (var At = 0,
|
|
34
|
+
Dr.byteLength = _u;
|
|
35
|
+
Dr.toByteArray = Mu;
|
|
36
|
+
Dr.fromByteArray = Hu;
|
|
37
|
+
var Qe = [], ze = [], Ou = typeof Uint8Array < "u" ? Uint8Array : Array, Rr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
|
38
|
+
for (var At = 0, Lu = Rr.length; At < Lu; ++At)
|
|
39
39
|
Qe[At] = Rr[At], ze[Rr.charCodeAt(At)] = At;
|
|
40
40
|
ze[45] = 62;
|
|
41
41
|
ze[95] = 63;
|
|
42
|
-
function
|
|
42
|
+
function Mo(r) {
|
|
43
43
|
var e = r.length;
|
|
44
44
|
if (e % 4 > 0)
|
|
45
45
|
throw new Error("Invalid string. Length must be a multiple of 4");
|
|
@@ -48,30 +48,30 @@ function Uo(r) {
|
|
|
48
48
|
var n = t === e ? 0 : 4 - t % 4;
|
|
49
49
|
return [t, n];
|
|
50
50
|
}
|
|
51
|
-
function
|
|
52
|
-
var e =
|
|
51
|
+
function _u(r) {
|
|
52
|
+
var e = Mo(r), t = e[0], n = e[1];
|
|
53
53
|
return (t + n) * 3 / 4 - n;
|
|
54
54
|
}
|
|
55
|
-
function
|
|
55
|
+
function qu(r, e, t) {
|
|
56
56
|
return (e + t) * 3 / 4 - t;
|
|
57
57
|
}
|
|
58
|
-
function
|
|
59
|
-
var e, t =
|
|
58
|
+
function Mu(r) {
|
|
59
|
+
var e, t = Mo(r), n = t[0], i = t[1], s = new Ou(qu(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
|
|
64
|
+
function Uu(r) {
|
|
65
65
|
return Qe[r >> 18 & 63] + Qe[r >> 12 & 63] + Qe[r >> 6 & 63] + Qe[r & 63];
|
|
66
66
|
}
|
|
67
|
-
function
|
|
67
|
+
function ju(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(
|
|
69
|
+
n = (r[s] << 16 & 16711680) + (r[s + 1] << 8 & 65280) + (r[s + 2] & 255), i.push(Uu(n));
|
|
70
70
|
return i.join("");
|
|
71
71
|
}
|
|
72
|
-
function
|
|
72
|
+
function Hu(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(
|
|
74
|
+
i.push(ju(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(
|
|
@@ -1043,34 +1043,34 @@ 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" ?
|
|
1046
|
+
return typeof BigInt > "u" ? ku : y;
|
|
1047
1047
|
}
|
|
1048
|
-
function
|
|
1048
|
+
function ku() {
|
|
1049
1049
|
throw new Error("BigInt not supported");
|
|
1050
1050
|
}
|
|
1051
1051
|
})(Fe);
|
|
1052
|
-
const Ct = Fe.Buffer,
|
|
1052
|
+
const Ct = Fe.Buffer, Vu = Fe.Blob, zu = Fe.BlobOptions, Gu = Fe.Buffer, Wu = Fe.File, Ju = Fe.FileOptions, $u = Fe.INSPECT_MAX_BYTES, Ku = Fe.SlowBuffer, Xu = Fe.TranscodeEncoding, Yu = Fe.atob, Zu = Fe.btoa, Qu = Fe.constants, el = Fe.isAscii, tl = Fe.isUtf8, rl = Fe.kMaxLength, nl = Fe.kStringMaxLength, il = Fe.resolveObjectURL, sl = Fe.transcode, ol = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1053
1053
|
__proto__: null,
|
|
1054
|
-
Blob:
|
|
1055
|
-
BlobOptions:
|
|
1056
|
-
Buffer:
|
|
1057
|
-
File:
|
|
1058
|
-
FileOptions:
|
|
1059
|
-
INSPECT_MAX_BYTES:
|
|
1060
|
-
SlowBuffer:
|
|
1061
|
-
TranscodeEncoding:
|
|
1062
|
-
atob:
|
|
1063
|
-
btoa:
|
|
1064
|
-
constants:
|
|
1054
|
+
Blob: Vu,
|
|
1055
|
+
BlobOptions: zu,
|
|
1056
|
+
Buffer: Gu,
|
|
1057
|
+
File: Wu,
|
|
1058
|
+
FileOptions: Ju,
|
|
1059
|
+
INSPECT_MAX_BYTES: $u,
|
|
1060
|
+
SlowBuffer: Ku,
|
|
1061
|
+
TranscodeEncoding: Xu,
|
|
1062
|
+
atob: Yu,
|
|
1063
|
+
btoa: Zu,
|
|
1064
|
+
constants: Qu,
|
|
1065
1065
|
default: Ct,
|
|
1066
|
-
isAscii:
|
|
1067
|
-
isUtf8:
|
|
1068
|
-
kMaxLength:
|
|
1069
|
-
kStringMaxLength:
|
|
1070
|
-
resolveObjectURL:
|
|
1071
|
-
transcode:
|
|
1066
|
+
isAscii: el,
|
|
1067
|
+
isUtf8: tl,
|
|
1068
|
+
kMaxLength: rl,
|
|
1069
|
+
kStringMaxLength: nl,
|
|
1070
|
+
resolveObjectURL: il,
|
|
1071
|
+
transcode: sl
|
|
1072
1072
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
1073
|
-
var
|
|
1073
|
+
var Uo = {}, Qt = { exports: {} }, qi;
|
|
1074
1074
|
function xi() {
|
|
1075
1075
|
if (qi) return Qt.exports;
|
|
1076
1076
|
qi = 1;
|
|
@@ -1302,10 +1302,10 @@ function xt() {
|
|
|
1302
1302
|
}
|
|
1303
1303
|
}), er.exports;
|
|
1304
1304
|
}
|
|
1305
|
-
function
|
|
1305
|
+
function al(r) {
|
|
1306
1306
|
return r && r.__esModule && Object.prototype.hasOwnProperty.call(r, "default") ? r.default : r;
|
|
1307
1307
|
}
|
|
1308
|
-
var
|
|
1308
|
+
var jo = { exports: {} }, ve = jo.exports = {}, Xe, Ye;
|
|
1309
1309
|
function ai() {
|
|
1310
1310
|
throw new Error("setTimeout has not been defined");
|
|
1311
1311
|
}
|
|
@@ -1324,7 +1324,7 @@ function ui() {
|
|
|
1324
1324
|
Ye = ui;
|
|
1325
1325
|
}
|
|
1326
1326
|
})();
|
|
1327
|
-
function
|
|
1327
|
+
function Ho(r) {
|
|
1328
1328
|
if (Xe === setTimeout)
|
|
1329
1329
|
return setTimeout(r, 0);
|
|
1330
1330
|
if ((Xe === ai || !Xe) && setTimeout)
|
|
@@ -1339,7 +1339,7 @@ function Vo(r) {
|
|
|
1339
1339
|
}
|
|
1340
1340
|
}
|
|
1341
1341
|
}
|
|
1342
|
-
function
|
|
1342
|
+
function ul(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 = [], St = !1, ht, ar = -1;
|
|
1358
|
-
function
|
|
1359
|
-
!St || !ht || (St = !1, ht.length ? ot = ht.concat(ot) : ar = -1, ot.length &&
|
|
1358
|
+
function ll() {
|
|
1359
|
+
!St || !ht || (St = !1, ht.length ? ot = ht.concat(ot) : ar = -1, ot.length && Vo());
|
|
1360
1360
|
}
|
|
1361
|
-
function
|
|
1361
|
+
function Vo() {
|
|
1362
1362
|
if (!St) {
|
|
1363
|
-
var r =
|
|
1363
|
+
var r = Ho(ll);
|
|
1364
1364
|
St = !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, St = !1,
|
|
1370
|
+
ht = null, St = !1, ul(r);
|
|
1371
1371
|
}
|
|
1372
1372
|
}
|
|
1373
1373
|
ve.nextTick = function(r) {
|
|
@@ -1375,12 +1375,12 @@ ve.nextTick = function(r) {
|
|
|
1375
1375
|
if (arguments.length > 1)
|
|
1376
1376
|
for (var t = 1; t < arguments.length; t++)
|
|
1377
1377
|
e[t - 1] = arguments[t];
|
|
1378
|
-
ot.push(new
|
|
1378
|
+
ot.push(new zo(r, e)), ot.length === 1 && !St && Ho(Vo);
|
|
1379
1379
|
};
|
|
1380
|
-
function
|
|
1380
|
+
function zo(r, e) {
|
|
1381
1381
|
this.fun = r, this.array = e;
|
|
1382
1382
|
}
|
|
1383
|
-
|
|
1383
|
+
zo.prototype.run = function() {
|
|
1384
1384
|
this.fun.apply(null, this.array);
|
|
1385
1385
|
};
|
|
1386
1386
|
ve.title = "browser";
|
|
@@ -1415,15 +1415,15 @@ ve.chdir = function(r) {
|
|
|
1415
1415
|
ve.umask = function() {
|
|
1416
1416
|
return 0;
|
|
1417
1417
|
};
|
|
1418
|
-
var
|
|
1419
|
-
const ge = /* @__PURE__ */
|
|
1418
|
+
var cl = jo.exports;
|
|
1419
|
+
const ge = /* @__PURE__ */ al(cl);
|
|
1420
1420
|
var Pr, Ui;
|
|
1421
|
-
function
|
|
1421
|
+
function Go() {
|
|
1422
1422
|
return Ui || (Ui = 1, Pr = xi().EventEmitter), Pr;
|
|
1423
1423
|
}
|
|
1424
|
-
const vr = /* @__PURE__ */
|
|
1424
|
+
const vr = /* @__PURE__ */ Pu(ol);
|
|
1425
1425
|
var Or = {}, Lr = {}, _r, ji;
|
|
1426
|
-
function
|
|
1426
|
+
function Wo() {
|
|
1427
1427
|
return ji || (ji = 1, _r = function() {
|
|
1428
1428
|
if (typeof Symbol != "function" || typeof Object.getOwnPropertySymbols != "function")
|
|
1429
1429
|
return !1;
|
|
@@ -1456,33 +1456,33 @@ var qr, Hi;
|
|
|
1456
1456
|
function Er() {
|
|
1457
1457
|
if (Hi) return qr;
|
|
1458
1458
|
Hi = 1;
|
|
1459
|
-
var r =
|
|
1459
|
+
var r = Wo();
|
|
1460
1460
|
return qr = function() {
|
|
1461
1461
|
return r() && !!Symbol.toStringTag;
|
|
1462
1462
|
}, qr;
|
|
1463
1463
|
}
|
|
1464
1464
|
var Mr, Vi;
|
|
1465
|
-
function
|
|
1465
|
+
function Jo() {
|
|
1466
1466
|
return Vi || (Vi = 1, Mr = Object), Mr;
|
|
1467
1467
|
}
|
|
1468
1468
|
var Ur, zi;
|
|
1469
|
-
function
|
|
1469
|
+
function fl() {
|
|
1470
1470
|
return zi || (zi = 1, Ur = Error), Ur;
|
|
1471
1471
|
}
|
|
1472
1472
|
var jr, Gi;
|
|
1473
|
-
function
|
|
1473
|
+
function dl() {
|
|
1474
1474
|
return Gi || (Gi = 1, jr = EvalError), jr;
|
|
1475
1475
|
}
|
|
1476
1476
|
var Hr, Wi;
|
|
1477
|
-
function
|
|
1477
|
+
function ml() {
|
|
1478
1478
|
return Wi || (Wi = 1, Hr = RangeError), Hr;
|
|
1479
1479
|
}
|
|
1480
1480
|
var Vr, Ji;
|
|
1481
|
-
function
|
|
1481
|
+
function pl() {
|
|
1482
1482
|
return Ji || (Ji = 1, Vr = ReferenceError), Vr;
|
|
1483
1483
|
}
|
|
1484
1484
|
var zr, $i;
|
|
1485
|
-
function
|
|
1485
|
+
function $o() {
|
|
1486
1486
|
return $i || ($i = 1, zr = SyntaxError), zr;
|
|
1487
1487
|
}
|
|
1488
1488
|
var Gr, Ki;
|
|
@@ -1490,57 +1490,57 @@ function $t() {
|
|
|
1490
1490
|
return Ki || (Ki = 1, Gr = TypeError), Gr;
|
|
1491
1491
|
}
|
|
1492
1492
|
var Wr, Xi;
|
|
1493
|
-
function
|
|
1493
|
+
function hl() {
|
|
1494
1494
|
return Xi || (Xi = 1, Wr = URIError), Wr;
|
|
1495
1495
|
}
|
|
1496
1496
|
var Jr, Yi;
|
|
1497
|
-
function
|
|
1497
|
+
function gl() {
|
|
1498
1498
|
return Yi || (Yi = 1, Jr = Math.abs), Jr;
|
|
1499
1499
|
}
|
|
1500
1500
|
var $r, Zi;
|
|
1501
|
-
function
|
|
1501
|
+
function wl() {
|
|
1502
1502
|
return Zi || (Zi = 1, $r = Math.floor), $r;
|
|
1503
1503
|
}
|
|
1504
1504
|
var Kr, Qi;
|
|
1505
|
-
function
|
|
1505
|
+
function yl() {
|
|
1506
1506
|
return Qi || (Qi = 1, Kr = Math.max), Kr;
|
|
1507
1507
|
}
|
|
1508
1508
|
var Xr, es;
|
|
1509
|
-
function
|
|
1509
|
+
function bl() {
|
|
1510
1510
|
return es || (es = 1, Xr = Math.min), Xr;
|
|
1511
1511
|
}
|
|
1512
1512
|
var Yr, ts;
|
|
1513
|
-
function
|
|
1513
|
+
function xl() {
|
|
1514
1514
|
return ts || (ts = 1, Yr = Math.pow), Yr;
|
|
1515
1515
|
}
|
|
1516
1516
|
var Zr, rs;
|
|
1517
|
-
function
|
|
1517
|
+
function Al() {
|
|
1518
1518
|
return rs || (rs = 1, Zr = Math.round), Zr;
|
|
1519
1519
|
}
|
|
1520
1520
|
var Qr, ns;
|
|
1521
|
-
function
|
|
1521
|
+
function Dl() {
|
|
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
|
|
1527
|
+
function vl() {
|
|
1528
1528
|
if (is) return en;
|
|
1529
1529
|
is = 1;
|
|
1530
|
-
var r =
|
|
1530
|
+
var r = Dl();
|
|
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
|
|
1536
|
+
function El() {
|
|
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 =
|
|
1543
|
+
var r = El();
|
|
1544
1544
|
if (r)
|
|
1545
1545
|
try {
|
|
1546
1546
|
r([], "length");
|
|
@@ -1563,27 +1563,27 @@ function Cr() {
|
|
|
1563
1563
|
return nn = r, nn;
|
|
1564
1564
|
}
|
|
1565
1565
|
var sn, us;
|
|
1566
|
-
function
|
|
1566
|
+
function Cl() {
|
|
1567
1567
|
if (us) return sn;
|
|
1568
1568
|
us = 1;
|
|
1569
|
-
var r = typeof Symbol < "u" && Symbol, e =
|
|
1569
|
+
var r = typeof Symbol < "u" && Symbol, e = Wo();
|
|
1570
1570
|
return sn = function() {
|
|
1571
1571
|
return typeof r != "function" || typeof Symbol != "function" || typeof r("foo") != "symbol" || typeof Symbol("bar") != "symbol" ? !1 : e();
|
|
1572
1572
|
}, sn;
|
|
1573
1573
|
}
|
|
1574
1574
|
var on, ls;
|
|
1575
|
-
function
|
|
1575
|
+
function Ko() {
|
|
1576
1576
|
return ls || (ls = 1, on = typeof Reflect < "u" && Reflect.getPrototypeOf || null), on;
|
|
1577
1577
|
}
|
|
1578
1578
|
var an, cs;
|
|
1579
|
-
function
|
|
1579
|
+
function Xo() {
|
|
1580
1580
|
if (cs) return an;
|
|
1581
1581
|
cs = 1;
|
|
1582
|
-
var r =
|
|
1582
|
+
var r = Jo();
|
|
1583
1583
|
return an = r.getPrototypeOf || null, an;
|
|
1584
1584
|
}
|
|
1585
1585
|
var un, fs;
|
|
1586
|
-
function
|
|
1586
|
+
function Sl() {
|
|
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 =
|
|
1634
|
+
var r = Sl();
|
|
1635
1635
|
return ln = Function.prototype.bind || r, ln;
|
|
1636
1636
|
}
|
|
1637
1637
|
var cn, ms;
|
|
@@ -1643,21 +1643,21 @@ function Di() {
|
|
|
1643
1643
|
return ps || (ps = 1, fn = Function.prototype.apply), fn;
|
|
1644
1644
|
}
|
|
1645
1645
|
var dn, hs;
|
|
1646
|
-
function
|
|
1646
|
+
function Tl() {
|
|
1647
1647
|
return hs || (hs = 1, dn = typeof Reflect < "u" && Reflect && Reflect.apply), dn;
|
|
1648
1648
|
}
|
|
1649
1649
|
var mn, gs;
|
|
1650
|
-
function
|
|
1650
|
+
function Yo() {
|
|
1651
1651
|
if (gs) return mn;
|
|
1652
1652
|
gs = 1;
|
|
1653
|
-
var r = Kt(), e = Di(), t = Ai(), n =
|
|
1653
|
+
var r = Kt(), e = Di(), t = Ai(), n = Tl();
|
|
1654
1654
|
return mn = n || r.call(t, e), mn;
|
|
1655
1655
|
}
|
|
1656
1656
|
var pn, ws;
|
|
1657
1657
|
function vi() {
|
|
1658
1658
|
if (ws) return pn;
|
|
1659
1659
|
ws = 1;
|
|
1660
|
-
var r = Kt(), e = $t(), t = Ai(), n =
|
|
1660
|
+
var r = Kt(), e = $t(), t = Ai(), n = Yo();
|
|
1661
1661
|
return pn = function(s) {
|
|
1662
1662
|
if (s.length < 1 || typeof s[0] != "function")
|
|
1663
1663
|
throw new e("a function is required");
|
|
@@ -1665,7 +1665,7 @@ function vi() {
|
|
|
1665
1665
|
}, pn;
|
|
1666
1666
|
}
|
|
1667
1667
|
var hn, ys;
|
|
1668
|
-
function
|
|
1668
|
+
function Fl() {
|
|
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 =
|
|
1695
|
+
var r = Ko(), e = Xo(), t = Fl();
|
|
1696
1696
|
return gn = r ? function(i) {
|
|
1697
1697
|
return r(i);
|
|
1698
1698
|
} : e ? function(i) {
|
|
@@ -1704,17 +1704,17 @@ function Ei() {
|
|
|
1704
1704
|
} : null, gn;
|
|
1705
1705
|
}
|
|
1706
1706
|
var wn, xs;
|
|
1707
|
-
function
|
|
1707
|
+
function Zo() {
|
|
1708
1708
|
if (xs) return wn;
|
|
1709
1709
|
xs = 1;
|
|
1710
1710
|
var r = Function.prototype.call, e = Object.prototype.hasOwnProperty, t = Kt();
|
|
1711
1711
|
return wn = t.call(r, e), wn;
|
|
1712
1712
|
}
|
|
1713
1713
|
var yn, As;
|
|
1714
|
-
function
|
|
1714
|
+
function Qo() {
|
|
1715
1715
|
if (As) return yn;
|
|
1716
1716
|
As = 1;
|
|
1717
|
-
var r, e =
|
|
1717
|
+
var r, e = Jo(), t = fl(), n = dl(), i = ml(), s = pl(), o = $o(), a = $t(), u = hl(), c = gl(), l = wl(), h = yl(), g = bl(), E = xl(), D = Al(), v = vl(), 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 ea() {
|
|
|
1731
1731
|
return A;
|
|
1732
1732
|
}
|
|
1733
1733
|
}
|
|
1734
|
-
}() : A, k =
|
|
1734
|
+
}() : A, k = Cl()(), q = Ei(), U = Xo(), C = Ko(), J = Di(), oe = Ai(), Z = {}, fe = typeof Uint8Array > "u" || !q ? r : q(Uint8Array), de = {
|
|
1735
1735
|
__proto__: null,
|
|
1736
1736
|
"%AggregateError%": typeof AggregateError > "u" ? r : AggregateError,
|
|
1737
1737
|
"%Array%": Array,
|
|
@@ -1891,7 +1891,7 @@ function ea() {
|
|
|
1891
1891
|
"%URIErrorPrototype%": ["URIError", "prototype"],
|
|
1892
1892
|
"%WeakMapPrototype%": ["WeakMap", "prototype"],
|
|
1893
1893
|
"%WeakSetPrototype%": ["WeakSet", "prototype"]
|
|
1894
|
-
}, ce = Kt(), $ =
|
|
1894
|
+
}, ce = Kt(), $ = Zo(), re = ce.call(oe, Array.prototype.concat), ie = ce.call(J, Array.prototype.splice), L = ce.call(oe, String.prototype.replace), V = ce.call(oe, String.prototype.slice), _ = ce.call(oe, RegExp.prototype.exec), K = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g, P = /\\(\\)?/g, p = function(S) {
|
|
1895
1895
|
var b = V(S, 0, 1), x = V(S, -1);
|
|
1896
1896
|
if (b === "%" && x !== "%")
|
|
1897
1897
|
throw new o("invalid intrinsic syntax, expected closing `%`");
|
|
@@ -1951,7 +1951,7 @@ var bn, Ds;
|
|
|
1951
1951
|
function Xt() {
|
|
1952
1952
|
if (Ds) return bn;
|
|
1953
1953
|
Ds = 1;
|
|
1954
|
-
var r =
|
|
1954
|
+
var r = Qo(), e = vi(), t = e([r("%String.prototype.indexOf%")]);
|
|
1955
1955
|
return bn = function(i, s) {
|
|
1956
1956
|
var o = (
|
|
1957
1957
|
/** @type {(this: unknown, ...args: unknown[]) => unknown} */
|
|
@@ -1964,7 +1964,7 @@ function Xt() {
|
|
|
1964
1964
|
}, bn;
|
|
1965
1965
|
}
|
|
1966
1966
|
var xn, vs;
|
|
1967
|
-
function
|
|
1967
|
+
function Bl() {
|
|
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,10 +1977,10 @@ function kl() {
|
|
|
1977
1977
|
return n.isLegacyArguments = i, xn = s ? n : i, xn;
|
|
1978
1978
|
}
|
|
1979
1979
|
var An, Es;
|
|
1980
|
-
function
|
|
1980
|
+
function kl() {
|
|
1981
1981
|
if (Es) return An;
|
|
1982
1982
|
Es = 1;
|
|
1983
|
-
var r = Xt(), e = Er()(), t =
|
|
1983
|
+
var r = Xt(), e = Er()(), t = Zo(), n = Lt(), i;
|
|
1984
1984
|
if (e) {
|
|
1985
1985
|
var s = r("RegExp.prototype.exec"), o = {}, a = function() {
|
|
1986
1986
|
throw o;
|
|
@@ -2021,10 +2021,10 @@ function Nl() {
|
|
|
2021
2021
|
return An = i, An;
|
|
2022
2022
|
}
|
|
2023
2023
|
var Dn, Cs;
|
|
2024
|
-
function
|
|
2024
|
+
function Nl() {
|
|
2025
2025
|
if (Cs) return Dn;
|
|
2026
2026
|
Cs = 1;
|
|
2027
|
-
var r = Xt(), e =
|
|
2027
|
+
var r = Xt(), e = kl(), 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
|
|
2037
|
+
function Il() {
|
|
2038
2038
|
if (Ss) return vn;
|
|
2039
2039
|
Ss = 1;
|
|
2040
|
-
var r = Xt(), e =
|
|
2040
|
+
var r = Xt(), e = Nl(), 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
|
|
2070
|
+
function Rl() {
|
|
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
|
|
2142
|
+
function Pl() {
|
|
2143
2143
|
if (Fs) return Cn;
|
|
2144
2144
|
Fs = 1;
|
|
2145
|
-
var r =
|
|
2145
|
+
var r = Rl(), 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
|
|
2166
|
+
function Ol() {
|
|
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
|
|
2183
|
+
function Ll() {
|
|
2184
2184
|
if (ks) return Tn;
|
|
2185
2185
|
ks = 1;
|
|
2186
|
-
var r =
|
|
2186
|
+
var r = Ol(), 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,10 +2191,10 @@ function _l() {
|
|
|
2191
2191
|
}, Tn;
|
|
2192
2192
|
}
|
|
2193
2193
|
var Fn = { exports: {} }, Bn, Ns;
|
|
2194
|
-
function
|
|
2194
|
+
function _l() {
|
|
2195
2195
|
if (Ns) return Bn;
|
|
2196
2196
|
Ns = 1;
|
|
2197
|
-
var r = Cr(), e =
|
|
2197
|
+
var r = Cr(), e = $o(), t = $t(), n = Lt();
|
|
2198
2198
|
return Bn = function(s, o, a) {
|
|
2199
2199
|
if (!s || typeof s != "object" && typeof s != "function")
|
|
2200
2200
|
throw new t("`obj` must be an object or a function`");
|
|
@@ -2223,7 +2223,7 @@ function ql() {
|
|
|
2223
2223
|
}, Bn;
|
|
2224
2224
|
}
|
|
2225
2225
|
var kn, Is;
|
|
2226
|
-
function
|
|
2226
|
+
function ql() {
|
|
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
|
|
2243
|
+
function Ml() {
|
|
2244
2244
|
if (Rs) return Nn;
|
|
2245
2245
|
Rs = 1;
|
|
2246
|
-
var r =
|
|
2246
|
+
var r = Qo(), e = _l(), t = ql()(), 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,18 +2270,18 @@ function Ul() {
|
|
|
2270
2270
|
}, Nn;
|
|
2271
2271
|
}
|
|
2272
2272
|
var In, Ps;
|
|
2273
|
-
function
|
|
2273
|
+
function Ul() {
|
|
2274
2274
|
if (Ps) return In;
|
|
2275
2275
|
Ps = 1;
|
|
2276
|
-
var r = Kt(), e = Di(), t =
|
|
2276
|
+
var r = Kt(), e = Di(), t = Yo();
|
|
2277
2277
|
return In = function() {
|
|
2278
2278
|
return t(r, e, arguments);
|
|
2279
2279
|
}, In;
|
|
2280
2280
|
}
|
|
2281
2281
|
var Os;
|
|
2282
|
-
function
|
|
2282
|
+
function jl() {
|
|
2283
2283
|
return Os || (Os = 1, function(r) {
|
|
2284
|
-
var e =
|
|
2284
|
+
var e = Ml(), t = Cr(), n = vi(), i = Ul();
|
|
2285
2285
|
r.exports = function(o) {
|
|
2286
2286
|
var a = n(arguments), u = o.length - (arguments.length - 1);
|
|
2287
2287
|
return e(
|
|
@@ -2293,10 +2293,10 @@ function Hl() {
|
|
|
2293
2293
|
}(Fn)), Fn.exports;
|
|
2294
2294
|
}
|
|
2295
2295
|
var Rn, Ls;
|
|
2296
|
-
function
|
|
2296
|
+
function ea() {
|
|
2297
2297
|
if (Ls) return Rn;
|
|
2298
2298
|
Ls = 1;
|
|
2299
|
-
var r =
|
|
2299
|
+
var r = Pl(), e = Ll(), t = jl(), 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,18 +2363,18 @@ function ta() {
|
|
|
2363
2363
|
}, Rn;
|
|
2364
2364
|
}
|
|
2365
2365
|
var Pn, _s;
|
|
2366
|
-
function
|
|
2366
|
+
function Hl() {
|
|
2367
2367
|
if (_s) return Pn;
|
|
2368
2368
|
_s = 1;
|
|
2369
|
-
var r =
|
|
2369
|
+
var r = ea();
|
|
2370
2370
|
return Pn = function(t) {
|
|
2371
2371
|
return !!r(t);
|
|
2372
2372
|
}, Pn;
|
|
2373
2373
|
}
|
|
2374
2374
|
var qs;
|
|
2375
|
-
function
|
|
2375
|
+
function Vl() {
|
|
2376
2376
|
return qs || (qs = 1, function(r) {
|
|
2377
|
-
var e =
|
|
2377
|
+
var e = Bl(), t = Il(), n = ea(), i = Hl();
|
|
2378
2378
|
function s(z) {
|
|
2379
2379
|
return z.call.bind(z);
|
|
2380
2380
|
}
|
|
@@ -2559,13 +2559,13 @@ function zl() {
|
|
|
2559
2559
|
}(Lr)), Lr;
|
|
2560
2560
|
}
|
|
2561
2561
|
var On, Ms;
|
|
2562
|
-
function
|
|
2562
|
+
function zl() {
|
|
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;
|
|
2566
2566
|
}
|
|
2567
2567
|
var Us;
|
|
2568
|
-
function
|
|
2568
|
+
function ta() {
|
|
2569
2569
|
return Us || (Us = 1, function(r) {
|
|
2570
2570
|
var e = Object.getOwnPropertyDescriptors || function(V) {
|
|
2571
2571
|
for (var _ = Object.keys(V), K = {}, P = 0; P < _.length; P++)
|
|
@@ -2785,7 +2785,7 @@ function ra() {
|
|
|
2785
2785
|
`) + " " + L.join(`,
|
|
2786
2786
|
`) + " " + _[1] : _[0] + V + " " + L.join(", ") + " " + _[1];
|
|
2787
2787
|
}
|
|
2788
|
-
r.types =
|
|
2788
|
+
r.types = Vl();
|
|
2789
2789
|
function F(L) {
|
|
2790
2790
|
return Array.isArray(L);
|
|
2791
2791
|
}
|
|
@@ -2842,7 +2842,7 @@ function ra() {
|
|
|
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 =
|
|
2845
|
+
r.isPrimitive = fe, r.isBuffer = zl();
|
|
2846
2846
|
function de(L) {
|
|
2847
2847
|
return Object.prototype.toString.call(L);
|
|
2848
2848
|
}
|
|
@@ -2959,7 +2959,7 @@ function ra() {
|
|
|
2959
2959
|
}(Or)), Or;
|
|
2960
2960
|
}
|
|
2961
2961
|
var Ln, js;
|
|
2962
|
-
function
|
|
2962
|
+
function Gl() {
|
|
2963
2963
|
if (js) return Ln;
|
|
2964
2964
|
js = 1;
|
|
2965
2965
|
function r(D, v) {
|
|
@@ -3013,7 +3013,7 @@ function Wl() {
|
|
|
3013
3013
|
}
|
|
3014
3014
|
return String(D);
|
|
3015
3015
|
}
|
|
3016
|
-
var u = vr, c = u.Buffer, l =
|
|
3016
|
+
var u = vr, c = u.Buffer, l = ta(), h = l.inspect, g = h && h.custom || "inspect";
|
|
3017
3017
|
function E(D, v, F) {
|
|
3018
3018
|
c.prototype.copy.call(D, v, F);
|
|
3019
3019
|
}
|
|
@@ -3124,7 +3124,7 @@ function Wl() {
|
|
|
3124
3124
|
}(), Ln;
|
|
3125
3125
|
}
|
|
3126
3126
|
var _n, Hs;
|
|
3127
|
-
function
|
|
3127
|
+
function ra() {
|
|
3128
3128
|
if (Hs) return _n;
|
|
3129
3129
|
Hs = 1;
|
|
3130
3130
|
function r(o, a) {
|
|
@@ -3217,7 +3217,7 @@ function _t() {
|
|
|
3217
3217
|
}, TypeError), t("ERR_STREAM_UNSHIFT_AFTER_END_EVENT", "stream.unshift() after end event"), qn.codes = e, qn;
|
|
3218
3218
|
}
|
|
3219
3219
|
var Mn, zs;
|
|
3220
|
-
function
|
|
3220
|
+
function na() {
|
|
3221
3221
|
if (zs) return Mn;
|
|
3222
3222
|
zs = 1;
|
|
3223
3223
|
var r = _t().codes.ERR_INVALID_OPT_VALUE;
|
|
@@ -3240,7 +3240,7 @@ function ia() {
|
|
|
3240
3240
|
}, Mn;
|
|
3241
3241
|
}
|
|
3242
3242
|
var Un, Gs;
|
|
3243
|
-
function
|
|
3243
|
+
function Wl() {
|
|
3244
3244
|
if (Gs) return Un;
|
|
3245
3245
|
Gs = 1, Un = r;
|
|
3246
3246
|
function r(t, n) {
|
|
@@ -3269,7 +3269,7 @@ function Jl() {
|
|
|
3269
3269
|
return Un;
|
|
3270
3270
|
}
|
|
3271
3271
|
var jn, Ws;
|
|
3272
|
-
function
|
|
3272
|
+
function ia() {
|
|
3273
3273
|
if (Ws) return jn;
|
|
3274
3274
|
Ws = 1, jn = U;
|
|
3275
3275
|
function r(P) {
|
|
@@ -3281,8 +3281,8 @@ function sa() {
|
|
|
3281
3281
|
var e;
|
|
3282
3282
|
U.WritableState = k;
|
|
3283
3283
|
var t = {
|
|
3284
|
-
deprecate:
|
|
3285
|
-
}, n =
|
|
3284
|
+
deprecate: Wl()
|
|
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) {
|
|
3288
3288
|
return i.from(P);
|
|
@@ -3290,7 +3290,7 @@ function sa() {
|
|
|
3290
3290
|
function a(P) {
|
|
3291
3291
|
return i.isBuffer(P) || P instanceof s;
|
|
3292
3292
|
}
|
|
3293
|
-
var u =
|
|
3293
|
+
var u = ra(), c = na(), l = c.getHighWaterMark, h = _t().codes, g = h.ERR_INVALID_ARG_TYPE, E = h.ERR_METHOD_NOT_IMPLEMENTED, D = h.ERR_MULTIPLE_CALLBACK, v = h.ERR_STREAM_CANNOT_PIPE, F = h.ERR_STREAM_DESTROYED, w = h.ERR_STREAM_NULL_VALUES, B = h.ERR_STREAM_WRITE_AFTER_END, R = h.ERR_UNKNOWN_ENCODING, A = u.errorOrDestroy;
|
|
3294
3294
|
xt()(U, n);
|
|
3295
3295
|
function N() {
|
|
3296
3296
|
}
|
|
@@ -3505,7 +3505,7 @@ function Bt() {
|
|
|
3505
3505
|
return l;
|
|
3506
3506
|
};
|
|
3507
3507
|
Hn = o;
|
|
3508
|
-
var e =
|
|
3508
|
+
var e = sa(), t = ia();
|
|
3509
3509
|
xt()(o, e);
|
|
3510
3510
|
for (var n = r(t.prototype), i = 0; i < n.length; i++) {
|
|
3511
3511
|
var s = n[i];
|
|
@@ -3560,7 +3560,7 @@ function Bt() {
|
|
|
3560
3560
|
}), Hn;
|
|
3561
3561
|
}
|
|
3562
3562
|
var Vn = {}, tr = { exports: {} }, $s;
|
|
3563
|
-
function
|
|
3563
|
+
function Jl() {
|
|
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 =
|
|
3598
|
+
var r = Jl().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
|
|
3800
|
+
function $l() {
|
|
3801
3801
|
if (Ys) return Gn;
|
|
3802
3802
|
Ys = 1;
|
|
3803
3803
|
var r;
|
|
@@ -3923,20 +3923,20 @@ function Kl() {
|
|
|
3923
3923
|
return Gn = B, Gn;
|
|
3924
3924
|
}
|
|
3925
3925
|
var Wn, Zs;
|
|
3926
|
-
function
|
|
3926
|
+
function Kl() {
|
|
3927
3927
|
return Zs || (Zs = 1, Wn = function() {
|
|
3928
3928
|
throw new Error("Readable.from is not available in the browser");
|
|
3929
3929
|
}), Wn;
|
|
3930
3930
|
}
|
|
3931
3931
|
var Jn, Qs;
|
|
3932
|
-
function
|
|
3932
|
+
function sa() {
|
|
3933
3933
|
if (Qs) return Jn;
|
|
3934
3934
|
Qs = 1, Jn = C;
|
|
3935
3935
|
var r;
|
|
3936
3936
|
C.ReadableState = U, xi().EventEmitter;
|
|
3937
3937
|
var e = function(x, M) {
|
|
3938
3938
|
return x.listeners(M).length;
|
|
3939
|
-
}, t =
|
|
3939
|
+
}, t = Go(), n = vr.Buffer, i = (typeof Je < "u" ? Je : typeof window < "u" ? window : typeof self < "u" ? self : {}).Uint8Array || function() {
|
|
3940
3940
|
};
|
|
3941
3941
|
function s(b) {
|
|
3942
3942
|
return n.from(b);
|
|
@@ -3944,10 +3944,10 @@ function oa() {
|
|
|
3944
3944
|
function o(b) {
|
|
3945
3945
|
return n.isBuffer(b) || b instanceof i;
|
|
3946
3946
|
}
|
|
3947
|
-
var a =
|
|
3947
|
+
var a = ta(), u;
|
|
3948
3948
|
a && a.debuglog ? u = a.debuglog("stream") : u = function() {
|
|
3949
3949
|
};
|
|
3950
|
-
var c =
|
|
3950
|
+
var c = Gl(), l = ra(), h = na(), g = h.getHighWaterMark, E = _t().codes, D = 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, A;
|
|
3951
3951
|
xt()(C, t);
|
|
3952
3952
|
var N = l.errorOrDestroy, k = ["error", "close", "destroy", "pause", "resume"];
|
|
3953
3953
|
function q(b, x, M) {
|
|
@@ -4204,7 +4204,7 @@ function oa() {
|
|
|
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 =
|
|
4207
|
+
return R === void 0 && (R = $l()), 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 oa() {
|
|
|
4257
4257
|
}
|
|
4258
4258
|
}
|
|
4259
4259
|
typeof Symbol == "function" && (C.from = function(b, x) {
|
|
4260
|
-
return A === void 0 && (A =
|
|
4260
|
+
return A === void 0 && (A = Kl()), A(C, b, x);
|
|
4261
4261
|
});
|
|
4262
4262
|
function S(b, x) {
|
|
4263
4263
|
for (var M = 0, W = b.length; M < W; M++)
|
|
@@ -4267,7 +4267,7 @@ function oa() {
|
|
|
4267
4267
|
return Jn;
|
|
4268
4268
|
}
|
|
4269
4269
|
var $n, eo;
|
|
4270
|
-
function
|
|
4270
|
+
function oa() {
|
|
4271
4271
|
if (eo) return $n;
|
|
4272
4272
|
eo = 1, $n = a;
|
|
4273
4273
|
var r = _t().codes, e = r.ERR_METHOD_NOT_IMPLEMENTED, t = r.ERR_MULTIPLE_CALLBACK, n = r.ERR_TRANSFORM_ALREADY_TRANSFORMING, i = r.ERR_TRANSFORM_WITH_LENGTH_0, s = Bt();
|
|
@@ -4326,10 +4326,10 @@ function aa() {
|
|
|
4326
4326
|
return $n;
|
|
4327
4327
|
}
|
|
4328
4328
|
var Kn, to;
|
|
4329
|
-
function
|
|
4329
|
+
function Xl() {
|
|
4330
4330
|
if (to) return Kn;
|
|
4331
4331
|
to = 1, Kn = e;
|
|
4332
|
-
var r =
|
|
4332
|
+
var r = oa();
|
|
4333
4333
|
xt()(e, r);
|
|
4334
4334
|
function e(t) {
|
|
4335
4335
|
if (!(this instanceof e)) return new e(t);
|
|
@@ -4340,7 +4340,7 @@ function Yl() {
|
|
|
4340
4340
|
}, Kn;
|
|
4341
4341
|
}
|
|
4342
4342
|
var Xn, ro;
|
|
4343
|
-
function
|
|
4343
|
+
function Yl() {
|
|
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
|
|
4407
|
+
function Zl() {
|
|
4408
4408
|
if (no) return Yn;
|
|
4409
4409
|
no = 1, Yn = t;
|
|
4410
4410
|
var r = xi().EventEmitter, e = xt();
|
|
4411
|
-
e(t, r), t.Readable =
|
|
4411
|
+
e(t, r), t.Readable = sa(), t.Writable = ia(), t.Duplex = Bt(), t.Transform = oa(), t.PassThrough = Xl(), t.finished = Ci(), t.pipeline = Yl(), 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 =
|
|
4545
|
+
a = Zl().Stream;
|
|
4546
4546
|
} catch {
|
|
4547
4547
|
a = function() {
|
|
4548
4548
|
};
|
|
@@ -5325,12 +5325,12 @@ Actual: ` + p.attribValue
|
|
|
5325
5325
|
}) : String.fromCodePoint = I;
|
|
5326
5326
|
}();
|
|
5327
5327
|
})(r);
|
|
5328
|
-
})(
|
|
5328
|
+
})(Uo);
|
|
5329
5329
|
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
|
-
},
|
|
5333
|
+
}, Ql = 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" && !
|
|
5347
|
+
(!("alwaysArray" in r) || typeof r.alwaysArray != "boolean" && !Ql(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,11 +5352,11 @@ var Si = {
|
|
|
5352
5352
|
checkFnExists: function(r, e) {
|
|
5353
5353
|
return r + "Fn" in e;
|
|
5354
5354
|
}
|
|
5355
|
-
},
|
|
5356
|
-
function
|
|
5355
|
+
}, ec = Uo, me = Ti, Tt = Si.isArray, j, le;
|
|
5356
|
+
function tc(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
|
-
function
|
|
5359
|
+
function aa(r) {
|
|
5360
5360
|
var e = Number(r);
|
|
5361
5361
|
if (!isNaN(e))
|
|
5362
5362
|
return e;
|
|
@@ -5390,23 +5390,23 @@ function Yt(r, e) {
|
|
|
5390
5390
|
j.addParent && (i[j.parentKey] = le), le[j.elementsKey].push(i);
|
|
5391
5391
|
}
|
|
5392
5392
|
}
|
|
5393
|
-
function
|
|
5393
|
+
function ua(r) {
|
|
5394
5394
|
if ("attributesFn" in j && r && (r = j.attributesFn(r, le)), (j.trim || "attributeValueFn" in j || "attributeNameFn" in j || j.nativeTypeAttributes) && r) {
|
|
5395
5395
|
var e;
|
|
5396
5396
|
for (e in r)
|
|
5397
|
-
if (r.hasOwnProperty(e) && (j.trim && (r[e] = r[e].trim()), j.nativeTypeAttributes && (r[e] =
|
|
5397
|
+
if (r.hasOwnProperty(e) && (j.trim && (r[e] = r[e].trim()), j.nativeTypeAttributes && (r[e] = aa(r[e])), "attributeValueFn" in j && (r[e] = j.attributeValueFn(r[e], e, le)), "attributeNameFn" in j)) {
|
|
5398
5398
|
var t = r[e];
|
|
5399
5399
|
delete r[e], r[j.attributeNameFn(e, r[e], le)] = t;
|
|
5400
5400
|
}
|
|
5401
5401
|
}
|
|
5402
5402
|
return r;
|
|
5403
5403
|
}
|
|
5404
|
-
function
|
|
5404
|
+
function rc(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; )
|
|
5408
5408
|
e[n[1]] = n[2] || n[3] || n[4];
|
|
5409
|
-
e =
|
|
5409
|
+
e = ua(e);
|
|
5410
5410
|
}
|
|
5411
5411
|
if (r.name.toLowerCase() === "xml") {
|
|
5412
5412
|
if (j.ignoreDeclaration)
|
|
@@ -5420,9 +5420,9 @@ 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
|
|
5423
|
+
function nc(r, e) {
|
|
5424
5424
|
var t;
|
|
5425
|
-
if (typeof r == "object" && (e = r.attributes, r = r.name), e =
|
|
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) {
|
|
5427
5427
|
t[j.attributesKey] = {};
|
|
5428
5428
|
var n;
|
|
@@ -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
|
|
5438
|
-
j.ignoreText || !r.trim() && !j.captureSpacesBetweenElements || (j.trim && (r = r.trim()), j.nativeType && (r =
|
|
5437
|
+
function ic(r) {
|
|
5438
|
+
j.ignoreText || !r.trim() && !j.captureSpacesBetweenElements || (j.trim && (r = r.trim()), j.nativeType && (r = aa(r)), j.sanitize && (r = r.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">")), Yt("text", r));
|
|
5439
5439
|
}
|
|
5440
|
-
function
|
|
5440
|
+
function sc(r) {
|
|
5441
5441
|
j.ignoreComment || (j.trim && (r = r.trim()), Yt("comment", r));
|
|
5442
5442
|
}
|
|
5443
|
-
function
|
|
5443
|
+
function oc(r) {
|
|
5444
5444
|
var e = le[j.parentKey];
|
|
5445
5445
|
j.addParent || delete le[j.parentKey], le = e;
|
|
5446
5446
|
}
|
|
5447
|
-
function
|
|
5447
|
+
function ac(r) {
|
|
5448
5448
|
j.ignoreCdata || (j.trim && (r = r.trim()), Yt("cdata", r));
|
|
5449
5449
|
}
|
|
5450
|
-
function
|
|
5450
|
+
function uc(r) {
|
|
5451
5451
|
j.ignoreDoctype || (r = r.replace(/^ /, ""), j.trim && (r = r.trim()), Yt("doctype", r));
|
|
5452
5452
|
}
|
|
5453
|
-
function
|
|
5453
|
+
function lc(r) {
|
|
5454
5454
|
r.note = r;
|
|
5455
5455
|
}
|
|
5456
|
-
var
|
|
5457
|
-
var t =
|
|
5458
|
-
if (le = n, j =
|
|
5456
|
+
var la = function(r, e) {
|
|
5457
|
+
var t = ec.parser(!0, {}), n = {};
|
|
5458
|
+
if (le = n, j = tc(e), t.opt = { strictEntities: !0 }, t.onopentag = nc, t.ontext = ic, t.oncomment = sc, t.onclosetag = oc, t.onerror = lc, t.oncdata = ac, t.ondoctype = uc, t.onprocessinginstruction = rc, 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,
|
|
5464
|
-
function
|
|
5463
|
+
}, io = Ti, cc = la;
|
|
5464
|
+
function fc(r) {
|
|
5465
5465
|
var e = io.copyOptions(r);
|
|
5466
5466
|
return io.ensureSpacesExists(e), e;
|
|
5467
5467
|
}
|
|
5468
|
-
var
|
|
5468
|
+
var dc = function(r, e) {
|
|
5469
5469
|
var t, n, i, s;
|
|
5470
|
-
return t =
|
|
5470
|
+
return t = fc(e), n = cc(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,
|
|
5474
|
-
function
|
|
5473
|
+
}, he = Ti, mc = Si.isArray, Re, Pe;
|
|
5474
|
+
function pc(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
|
}
|
|
@@ -5488,10 +5488,10 @@ function Sr(r, e, t) {
|
|
|
5488
5488
|
r.hasOwnProperty(n) && r[n] !== null && r[n] !== void 0 && (o = e.noQuotesForNativeAttributes && typeof r[n] != "string" ? "" : '"', i = "" + r[n], i = i.replace(/"/g, """), s = "attributeNameFn" in e ? e.attributeNameFn(n, i, Pe, Re) : n, a.push(e.spaces && e.indentAttributes ? Ze(e, t + 1, !1) : " "), a.push(s + "=" + o + ("attributeValueFn" in e ? e.attributeValueFn(i, n, Pe, Re) : i) + o));
|
|
5489
5489
|
return r && Object.keys(r).length && e.spaces && e.indentAttributes && a.push(Ze(e, t, !1)), a.join("");
|
|
5490
5490
|
}
|
|
5491
|
-
function
|
|
5491
|
+
function ca(r, e, t) {
|
|
5492
5492
|
return Re = r, Pe = "xml", e.ignoreDeclaration ? "" : "<?xml" + Sr(r[e.attributesKey], e, t) + "?>";
|
|
5493
5493
|
}
|
|
5494
|
-
function
|
|
5494
|
+
function fa(r, e, t) {
|
|
5495
5495
|
if (e.ignoreInstruction)
|
|
5496
5496
|
return "";
|
|
5497
5497
|
var n;
|
|
@@ -5504,19 +5504,19 @@ function da(r, e, t) {
|
|
|
5504
5504
|
var s = r[n] ? r[n] : "";
|
|
5505
5505
|
return "instructionFn" in e && (s = e.instructionFn(s, n, Pe, Re)), "<?" + i + (s ? " " + s : "") + "?>";
|
|
5506
5506
|
}
|
|
5507
|
-
function
|
|
5507
|
+
function da(r, e) {
|
|
5508
5508
|
return e.ignoreComment ? "" : "<!--" + ("commentFn" in e ? e.commentFn(r, Pe, Re) : r) + "-->";
|
|
5509
5509
|
}
|
|
5510
|
-
function
|
|
5510
|
+
function ma(r, e) {
|
|
5511
5511
|
return e.ignoreCdata ? "" : "<![CDATA[" + ("cdataFn" in e ? e.cdataFn(r, Pe, Re) : r.replace("]]>", "]]]]><![CDATA[>")) + "]]>";
|
|
5512
5512
|
}
|
|
5513
|
-
function
|
|
5513
|
+
function pa(r, e) {
|
|
5514
5514
|
return e.ignoreDoctype ? "" : "<!DOCTYPE " + ("doctypeFn" in e ? e.doctypeFn(r, Pe, Re) : r) + ">";
|
|
5515
5515
|
}
|
|
5516
5516
|
function Fi(r, e) {
|
|
5517
5517
|
return e.ignoreText ? "" : (r = "" + r, r = r.replace(/&/g, "&"), r = r.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">"), "textFn" in e ? e.textFn(r, Pe, Re) : r);
|
|
5518
5518
|
}
|
|
5519
|
-
function
|
|
5519
|
+
function hc(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,35 +5542,35 @@ function gc(r, e) {
|
|
|
5542
5542
|
}
|
|
5543
5543
|
return !1;
|
|
5544
5544
|
}
|
|
5545
|
-
function
|
|
5545
|
+
function gc(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(
|
|
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 && hc(r, e) ? `
|
|
5551
5551
|
` + Array(t + 1).join(e.spaces) : ""), n.push("</" + i + ">")) : n.push("/>"), n.join("");
|
|
5552
5552
|
}
|
|
5553
|
-
function
|
|
5553
|
+
function ha(r, e, t, n) {
|
|
5554
5554
|
return r.reduce(function(i, s) {
|
|
5555
5555
|
var o = Ze(e, t, n && !i);
|
|
5556
5556
|
switch (s.type) {
|
|
5557
5557
|
case "element":
|
|
5558
|
-
return i + o +
|
|
5558
|
+
return i + o + gc(s, e, t);
|
|
5559
5559
|
case "comment":
|
|
5560
|
-
return i + o +
|
|
5560
|
+
return i + o + da(s[e.commentKey], e);
|
|
5561
5561
|
case "doctype":
|
|
5562
|
-
return i + o +
|
|
5562
|
+
return i + o + pa(s[e.doctypeKey], e);
|
|
5563
5563
|
case "cdata":
|
|
5564
|
-
return i + (e.indentCdata ? o : "") +
|
|
5564
|
+
return i + (e.indentCdata ? o : "") + ma(s[e.cdataKey], e);
|
|
5565
5565
|
case "text":
|
|
5566
5566
|
return i + (e.indentText ? o : "") + Fi(s[e.textKey], e);
|
|
5567
5567
|
case "instruction":
|
|
5568
5568
|
var a = {};
|
|
5569
|
-
return a[s[e.nameKey]] = s[e.attributesKey] ? s : s[e.instructionKey], i + (e.indentInstruction ? o : "") +
|
|
5569
|
+
return a[s[e.nameKey]] = s[e.attributesKey] ? s : s[e.instructionKey], i + (e.indentInstruction ? o : "") + fa(a, e, t);
|
|
5570
5570
|
}
|
|
5571
5571
|
}, "");
|
|
5572
5572
|
}
|
|
5573
|
-
function
|
|
5573
|
+
function ga(r, e, t) {
|
|
5574
5574
|
var n;
|
|
5575
5575
|
for (n in r)
|
|
5576
5576
|
if (r.hasOwnProperty(n))
|
|
@@ -5598,7 +5598,7 @@ function wa(r, e, t) {
|
|
|
5598
5598
|
}
|
|
5599
5599
|
return !1;
|
|
5600
5600
|
}
|
|
5601
|
-
function
|
|
5601
|
+
function wc(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 === "")
|
|
@@ -5608,25 +5608,25 @@ function yc(r, e, t, n, i) {
|
|
|
5608
5608
|
if (o.push("<" + s), typeof r != "object")
|
|
5609
5609
|
return o.push(">" + Fi(r, t) + "</" + s + ">"), o.join("");
|
|
5610
5610
|
r[t.attributesKey] && o.push(Sr(r[t.attributesKey], t, n));
|
|
5611
|
-
var a =
|
|
5611
|
+
var a = ga(r, t, !0) || r[t.attributesKey] && r[t.attributesKey]["xml:space"] === "preserve";
|
|
5612
5612
|
if (a || ("fullTagEmptyElementFn" in t ? a = t.fullTagEmptyElementFn(e, r) : a = t.fullTagEmptyElement), a)
|
|
5613
5613
|
o.push(">");
|
|
5614
5614
|
else
|
|
5615
5615
|
return o.push("/>"), o.join("");
|
|
5616
5616
|
}
|
|
5617
|
-
return o.push(
|
|
5617
|
+
return o.push(wa(r, t, n + 1, !1)), Re = r, Pe = e, e && o.push((i ? Ze(t, n, !1) : "") + "</" + s + ">"), o.join("");
|
|
5618
5618
|
}
|
|
5619
|
-
function
|
|
5619
|
+
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 =
|
|
5623
|
+
for (o = mc(r[s]) ? r[s] : [r[s]], i = 0; i < o.length; ++i) {
|
|
5624
5624
|
switch (s) {
|
|
5625
5625
|
case e.declarationKey:
|
|
5626
|
-
a.push(
|
|
5626
|
+
a.push(ca(o[i], e, t));
|
|
5627
5627
|
break;
|
|
5628
5628
|
case e.instructionKey:
|
|
5629
|
-
a.push((e.indentInstruction ? Ze(e, t, n) : "") +
|
|
5629
|
+
a.push((e.indentInstruction ? Ze(e, t, n) : "") + fa(o[i], e, t));
|
|
5630
5630
|
break;
|
|
5631
5631
|
case e.attributesKey:
|
|
5632
5632
|
case e.parentKey:
|
|
@@ -5635,26 +5635,26 @@ function ya(r, e, t, n) {
|
|
|
5635
5635
|
a.push((e.indentText ? Ze(e, t, n) : "") + Fi(o[i], e));
|
|
5636
5636
|
break;
|
|
5637
5637
|
case e.cdataKey:
|
|
5638
|
-
a.push((e.indentCdata ? Ze(e, t, n) : "") +
|
|
5638
|
+
a.push((e.indentCdata ? Ze(e, t, n) : "") + ma(o[i], e));
|
|
5639
5639
|
break;
|
|
5640
5640
|
case e.doctypeKey:
|
|
5641
|
-
a.push(Ze(e, t, n) +
|
|
5641
|
+
a.push(Ze(e, t, n) + pa(o[i], e));
|
|
5642
5642
|
break;
|
|
5643
5643
|
case e.commentKey:
|
|
5644
|
-
a.push(Ze(e, t, n) +
|
|
5644
|
+
a.push(Ze(e, t, n) + da(o[i], e));
|
|
5645
5645
|
break;
|
|
5646
5646
|
default:
|
|
5647
|
-
a.push(Ze(e, t, n) +
|
|
5647
|
+
a.push(Ze(e, t, n) + wc(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
|
-
var
|
|
5654
|
-
e =
|
|
5653
|
+
var ya = function(r, e) {
|
|
5654
|
+
e = pc(e);
|
|
5655
5655
|
var t = [];
|
|
5656
|
-
return Re = r, Pe = "_root_", e.compact ? t.push(
|
|
5657
|
-
},
|
|
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
|
+
}, yc = ya, bc = function(r, e) {
|
|
5658
5658
|
r instanceof Ct && (r = r.toString());
|
|
5659
5659
|
var t = null;
|
|
5660
5660
|
if (typeof r == "string")
|
|
@@ -5665,37 +5665,37 @@ var ba = function(r, e) {
|
|
|
5665
5665
|
}
|
|
5666
5666
|
else
|
|
5667
5667
|
t = r;
|
|
5668
|
-
return
|
|
5669
|
-
},
|
|
5670
|
-
xml2js:
|
|
5671
|
-
xml2json:
|
|
5672
|
-
js2xml:
|
|
5673
|
-
json2xml:
|
|
5668
|
+
return yc(t, e);
|
|
5669
|
+
}, xc = la, Ac = dc, Dc = ya, vc = bc, Ec = {
|
|
5670
|
+
xml2js: xc,
|
|
5671
|
+
xml2json: Ac,
|
|
5672
|
+
js2xml: Dc,
|
|
5673
|
+
json2xml: vc
|
|
5674
5674
|
};
|
|
5675
|
-
const
|
|
5676
|
-
var rr,
|
|
5677
|
-
function
|
|
5675
|
+
const ba = /* @__PURE__ */ qo(Ec);
|
|
5676
|
+
var rr, Cc = new Uint8Array(16);
|
|
5677
|
+
function Sc() {
|
|
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(
|
|
5680
|
+
return rr(Cc);
|
|
5681
5681
|
}
|
|
5682
|
-
const
|
|
5683
|
-
function
|
|
5684
|
-
return typeof r == "string" &&
|
|
5682
|
+
const Tc = /^(?:[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 Fc(r) {
|
|
5684
|
+
return typeof r == "string" && Tc.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
|
|
5689
|
+
function Bc(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 (!
|
|
5691
|
+
if (!Fc(t))
|
|
5692
5692
|
throw TypeError("Stringified UUID is invalid");
|
|
5693
5693
|
return t;
|
|
5694
5694
|
}
|
|
5695
|
-
function
|
|
5695
|
+
function xa(r, e, t) {
|
|
5696
5696
|
r = r || {};
|
|
5697
|
-
var n = r.random || (r.rng ||
|
|
5698
|
-
return n[6] = n[6] & 15 | 64, n[8] = n[8] & 63 | 128,
|
|
5697
|
+
var n = r.random || (r.rng || Sc)();
|
|
5698
|
+
return n[6] = n[6] & 15 | 64, n[8] = n[8] & 63 | 128, Bc(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
|
|
5811
|
-
const
|
|
5810
|
+
var kc = dr.exports;
|
|
5811
|
+
const Nc = /* @__PURE__ */ qo(kc);
|
|
5812
5812
|
function Ne(r) {
|
|
5813
5813
|
this.content = r;
|
|
5814
5814
|
}
|
|
@@ -5909,7 +5909,7 @@ Ne.from = function(r) {
|
|
|
5909
5909
|
if (r) for (var t in r) e.push(t, r[t]);
|
|
5910
5910
|
return new Ne(e);
|
|
5911
5911
|
};
|
|
5912
|
-
function
|
|
5912
|
+
function Aa(r, e, t) {
|
|
5913
5913
|
for (let n = 0; ; n++) {
|
|
5914
5914
|
if (n == r.childCount || n == e.childCount)
|
|
5915
5915
|
return r.childCount == e.childCount ? null : t;
|
|
@@ -5926,14 +5926,14 @@ function Da(r, e, t) {
|
|
|
5926
5926
|
return t;
|
|
5927
5927
|
}
|
|
5928
5928
|
if (i.content.size || s.content.size) {
|
|
5929
|
-
let o =
|
|
5929
|
+
let o = Aa(i.content, s.content, t + 1);
|
|
5930
5930
|
if (o != null)
|
|
5931
5931
|
return o;
|
|
5932
5932
|
}
|
|
5933
5933
|
t += i.nodeSize;
|
|
5934
5934
|
}
|
|
5935
5935
|
}
|
|
5936
|
-
function
|
|
5936
|
+
function Da(r, e, t, n) {
|
|
5937
5937
|
for (let i = r.childCount, s = e.childCount; ; ) {
|
|
5938
5938
|
if (i == 0 || s == 0)
|
|
5939
5939
|
return i == s ? null : { a: t, b: n };
|
|
@@ -5951,7 +5951,7 @@ function va(r, e, t, n) {
|
|
|
5951
5951
|
return { a: t, b: n };
|
|
5952
5952
|
}
|
|
5953
5953
|
if (o.content.size || a.content.size) {
|
|
5954
|
-
let c =
|
|
5954
|
+
let c = Da(o.content, a.content, t - 1, n - 1);
|
|
5955
5955
|
if (c)
|
|
5956
5956
|
return c;
|
|
5957
5957
|
}
|
|
@@ -6120,7 +6120,7 @@ class Q {
|
|
|
6120
6120
|
fragment differ, or `null` if they are the same.
|
|
6121
6121
|
*/
|
|
6122
6122
|
findDiffStart(e, t = 0) {
|
|
6123
|
-
return
|
|
6123
|
+
return Aa(this, e, t);
|
|
6124
6124
|
}
|
|
6125
6125
|
/**
|
|
6126
6126
|
Find the first position, searching from the end, at which this
|
|
@@ -6129,7 +6129,7 @@ class Q {
|
|
|
6129
6129
|
nodes, an object with two separate positions is returned.
|
|
6130
6130
|
*/
|
|
6131
6131
|
findDiffEnd(e, t = this.size, n = e.size) {
|
|
6132
|
-
return
|
|
6132
|
+
return Da(this, e, t, n);
|
|
6133
6133
|
}
|
|
6134
6134
|
/**
|
|
6135
6135
|
Find the index and inner offset corresponding to a given relative
|
|
@@ -6373,14 +6373,14 @@ class ae {
|
|
|
6373
6373
|
@internal
|
|
6374
6374
|
*/
|
|
6375
6375
|
insertAt(e, t) {
|
|
6376
|
-
let n =
|
|
6376
|
+
let n = Ea(this.content, e + this.openStart, t);
|
|
6377
6377
|
return n && new ae(n, this.openStart, this.openEnd);
|
|
6378
6378
|
}
|
|
6379
6379
|
/**
|
|
6380
6380
|
@internal
|
|
6381
6381
|
*/
|
|
6382
6382
|
removeBetween(e, t) {
|
|
6383
|
-
return new ae(
|
|
6383
|
+
return new ae(va(this.content, e + this.openStart, t + this.openStart), this.openStart, this.openEnd);
|
|
6384
6384
|
}
|
|
6385
6385
|
/**
|
|
6386
6386
|
Tests whether this slice is equal to another slice.
|
|
@@ -6428,7 +6428,7 @@ class ae {
|
|
|
6428
6428
|
}
|
|
6429
6429
|
}
|
|
6430
6430
|
ae.empty = new ae(Q.empty, 0, 0);
|
|
6431
|
-
function
|
|
6431
|
+
function va(r, e, t) {
|
|
6432
6432
|
let { index: n, offset: i } = r.findIndex(e), s = r.maybeChild(n), { index: o, offset: a } = r.findIndex(t);
|
|
6433
6433
|
if (i == e || s.isText) {
|
|
6434
6434
|
if (a != t && !r.child(o).isText)
|
|
@@ -6437,44 +6437,44 @@ function Ea(r, e, t) {
|
|
|
6437
6437
|
}
|
|
6438
6438
|
if (n != o)
|
|
6439
6439
|
throw new RangeError("Removing non-flat range");
|
|
6440
|
-
return r.replaceChild(n, s.copy(
|
|
6440
|
+
return r.replaceChild(n, s.copy(va(s.content, e - i - 1, t - i - 1)));
|
|
6441
6441
|
}
|
|
6442
|
-
function
|
|
6442
|
+
function Ea(r, e, t, n) {
|
|
6443
6443
|
let { index: i, offset: s } = r.findIndex(e), o = r.maybeChild(i);
|
|
6444
6444
|
if (s == e || o.isText)
|
|
6445
6445
|
return r.cut(0, e).append(t).append(r.cut(e));
|
|
6446
|
-
let a =
|
|
6446
|
+
let a = Ea(o.content, e - s - 1, t);
|
|
6447
6447
|
return a && r.replaceChild(i, o.copy(a));
|
|
6448
6448
|
}
|
|
6449
|
-
function
|
|
6449
|
+
function Ic(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)
|
|
6453
6453
|
throw new pr("Inconsistent open depths");
|
|
6454
|
-
return
|
|
6454
|
+
return Ca(r, e, t, 0);
|
|
6455
6455
|
}
|
|
6456
|
-
function
|
|
6456
|
+
function Ca(r, e, t, n) {
|
|
6457
6457
|
let i = r.index(n), s = r.node(n);
|
|
6458
6458
|
if (i == e.index(n) && n < r.depth - t.openStart) {
|
|
6459
|
-
let o =
|
|
6459
|
+
let o = Ca(r, e, t, n + 1);
|
|
6460
6460
|
return s.copy(s.content.replaceChild(i, o));
|
|
6461
6461
|
} else if (t.content.size)
|
|
6462
6462
|
if (!t.openStart && !t.openEnd && r.depth == n && e.depth == 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 } =
|
|
6467
|
-
return wt(s,
|
|
6466
|
+
let { start: o, end: a } = Rc(t, r);
|
|
6467
|
+
return wt(s, Ta(r, o, a, e, n));
|
|
6468
6468
|
}
|
|
6469
6469
|
else return wt(s, hr(r, e, n));
|
|
6470
6470
|
}
|
|
6471
|
-
function
|
|
6471
|
+
function Sa(r, e) {
|
|
6472
6472
|
if (!e.type.compatibleContent(r.type))
|
|
6473
6473
|
throw new pr("Cannot join " + e.type.name + " onto " + r.type.name);
|
|
6474
6474
|
}
|
|
6475
6475
|
function ci(r, e, t) {
|
|
6476
6476
|
let n = r.node(t);
|
|
6477
|
-
return
|
|
6477
|
+
return Sa(n, e.node(t)), n;
|
|
6478
6478
|
}
|
|
6479
6479
|
function gt(r, e) {
|
|
6480
6480
|
let t = e.length - 1;
|
|
@@ -6490,9 +6490,9 @@ function Vt(r, e, t, n) {
|
|
|
6490
6490
|
function wt(r, e) {
|
|
6491
6491
|
return r.type.checkContent(e), r.copy(e);
|
|
6492
6492
|
}
|
|
6493
|
-
function
|
|
6493
|
+
function Ta(r, e, t, n, i) {
|
|
6494
6494
|
let s = r.depth > i && ci(r, e, i + 1), o = n.depth > i && ci(t, n, i + 1), a = [];
|
|
6495
|
-
return Vt(null, r, i, a), s && o && e.index(i) == t.index(i) ? (
|
|
6495
|
+
return Vt(null, r, i, a), s && o && e.index(i) == t.index(i) ? (Sa(s, o), gt(wt(s, Ta(r, e, t, n, i + 1)), a)) : (s && gt(wt(s, hr(r, e, i + 1)), a), Vt(e, t, i, a), o && gt(wt(o, hr(t, n, i + 1)), a)), Vt(n, null, i, a), new Q(a);
|
|
6496
6496
|
}
|
|
6497
6497
|
function hr(r, e, t) {
|
|
6498
6498
|
let 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
|
|
6505
|
+
function Rc(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
|
|
6699
|
+
return new Lc(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
|
|
6756
|
+
so.set(e, n = new Pc());
|
|
6757
6757
|
let i = n.elts[n.i] = zt.resolve(e, t);
|
|
6758
|
-
return n.i = (n.i + 1) %
|
|
6758
|
+
return n.i = (n.i + 1) % Oc, i;
|
|
6759
6759
|
}
|
|
6760
6760
|
}
|
|
6761
|
-
class
|
|
6761
|
+
class Pc {
|
|
6762
6762
|
constructor() {
|
|
6763
6763
|
this.elts = [], this.i = 0;
|
|
6764
6764
|
}
|
|
6765
6765
|
}
|
|
6766
|
-
const
|
|
6767
|
-
class
|
|
6766
|
+
const Oc = 12, so = /* @__PURE__ */ new WeakMap();
|
|
6767
|
+
class Lc {
|
|
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
|
|
6807
|
+
const _c = /* @__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 ||
|
|
6926
|
+
return this.type == e && mr(this.attrs, t || e.defaultAttrs || _c) && 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
|
|
6969
|
+
return Ic(this.resolve(e), this.resolve(t), n);
|
|
6970
6970
|
}
|
|
6971
6971
|
/**
|
|
6972
6972
|
Find the node directly after the given position.
|
|
@@ -7081,7 +7081,7 @@ class rt {
|
|
|
7081
7081
|
if (this.type.spec.toDebugString)
|
|
7082
7082
|
return this.type.spec.toDebugString(this);
|
|
7083
7083
|
let e = this.type.name;
|
|
7084
|
-
return this.content.size && (e += "(" + this.content.toStringInner() + ")"),
|
|
7084
|
+
return this.content.size && (e += "(" + this.content.toStringInner() + ")"), Fa(this.marks, e);
|
|
7085
7085
|
}
|
|
7086
7086
|
/**
|
|
7087
7087
|
Get the content match in this node at the given index.
|
|
@@ -7185,7 +7185,7 @@ class gr extends rt {
|
|
|
7185
7185
|
this.text = n;
|
|
7186
7186
|
}
|
|
7187
7187
|
toString() {
|
|
7188
|
-
return this.type.spec.toDebugString ? this.type.spec.toDebugString(this) :
|
|
7188
|
+
return this.type.spec.toDebugString ? this.type.spec.toDebugString(this) : Fa(this.marks, JSON.stringify(this.text));
|
|
7189
7189
|
}
|
|
7190
7190
|
get textContent() {
|
|
7191
7191
|
return this.text;
|
|
@@ -7213,7 +7213,7 @@ class gr extends rt {
|
|
|
7213
7213
|
return e.text = this.text, e;
|
|
7214
7214
|
}
|
|
7215
7215
|
}
|
|
7216
|
-
function
|
|
7216
|
+
function Fa(r, e) {
|
|
7217
7217
|
for (let t = r.length - 1; t >= 0; t--)
|
|
7218
7218
|
e = r[t].type.name + "(" + e + ")";
|
|
7219
7219
|
return e;
|
|
@@ -7229,13 +7229,13 @@ class yt {
|
|
|
7229
7229
|
@internal
|
|
7230
7230
|
*/
|
|
7231
7231
|
static parse(e, t) {
|
|
7232
|
-
let n = new
|
|
7232
|
+
let n = new qc(e, t);
|
|
7233
7233
|
if (n.next == null)
|
|
7234
7234
|
return yt.empty;
|
|
7235
|
-
let i =
|
|
7235
|
+
let i = Ba(n);
|
|
7236
7236
|
n.next && n.err("Unexpected trailing text");
|
|
7237
|
-
let s =
|
|
7238
|
-
return
|
|
7237
|
+
let s = Gc(zc(i));
|
|
7238
|
+
return Wc(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
|
|
7384
|
+
class qc {
|
|
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
|
}
|
|
@@ -7395,22 +7395,22 @@ class Mc {
|
|
|
7395
7395
|
throw new SyntaxError(e + " (in content expression '" + this.string + "')");
|
|
7396
7396
|
}
|
|
7397
7397
|
}
|
|
7398
|
-
function
|
|
7398
|
+
function Ba(r) {
|
|
7399
7399
|
let e = [];
|
|
7400
7400
|
do
|
|
7401
|
-
e.push(
|
|
7401
|
+
e.push(Mc(r));
|
|
7402
7402
|
while (r.eat("|"));
|
|
7403
7403
|
return e.length == 1 ? e[0] : { type: "choice", exprs: e };
|
|
7404
7404
|
}
|
|
7405
|
-
function
|
|
7405
|
+
function Mc(r) {
|
|
7406
7406
|
let e = [];
|
|
7407
7407
|
do
|
|
7408
|
-
e.push(
|
|
7408
|
+
e.push(Uc(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
|
|
7413
|
-
let e =
|
|
7412
|
+
function Uc(r) {
|
|
7413
|
+
let e = Vc(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 =
|
|
7422
|
+
e = jc(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
|
|
7432
|
+
function jc(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
|
|
7436
|
+
function Hc(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
|
|
7447
|
+
function Vc(r) {
|
|
7448
7448
|
if (r.eat("(")) {
|
|
7449
|
-
let e =
|
|
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 =
|
|
7454
|
+
let e = Hc(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
|
|
7458
|
+
function zc(r) {
|
|
7459
7459
|
let e = [[]];
|
|
7460
7460
|
return i(s(r, 0), t()), e;
|
|
7461
7461
|
function t() {
|
|
@@ -7509,12 +7509,12 @@ function Gc(r) {
|
|
|
7509
7509
|
}
|
|
7510
7510
|
}
|
|
7511
7511
|
}
|
|
7512
|
-
function
|
|
7512
|
+
function ka(r, e) {
|
|
7513
7513
|
return e - r;
|
|
7514
7514
|
}
|
|
7515
7515
|
function ao(r, e) {
|
|
7516
7516
|
let t = [];
|
|
7517
|
-
return n(e), t.sort(
|
|
7517
|
+
return n(e), t.sort(ka);
|
|
7518
7518
|
function n(i) {
|
|
7519
7519
|
let s = r[i];
|
|
7520
7520
|
if (s.length == 1 && !s[0].term)
|
|
@@ -7526,7 +7526,7 @@ function ao(r, e) {
|
|
|
7526
7526
|
}
|
|
7527
7527
|
}
|
|
7528
7528
|
}
|
|
7529
|
-
function
|
|
7529
|
+
function Gc(r) {
|
|
7530
7530
|
let e = /* @__PURE__ */ Object.create(null);
|
|
7531
7531
|
return t(ao(r, 0));
|
|
7532
7532
|
function t(n) {
|
|
@@ -7545,13 +7545,13 @@ function Wc(r) {
|
|
|
7545
7545
|
});
|
|
7546
7546
|
let s = e[n.join(",")] = new yt(n.indexOf(r.length - 1) > -1);
|
|
7547
7547
|
for (let o = 0; o < i.length; o++) {
|
|
7548
|
-
let a = i[o][1].sort(
|
|
7548
|
+
let a = i[o][1].sort(ka);
|
|
7549
7549
|
s.next.push({ type: i[o][0], next: e[a.join(",")] || t(a) });
|
|
7550
7550
|
}
|
|
7551
7551
|
return s;
|
|
7552
7552
|
}
|
|
7553
7553
|
}
|
|
7554
|
-
function
|
|
7554
|
+
function Wc(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++) {
|
|
@@ -7561,7 +7561,7 @@ function Jc(r, e) {
|
|
|
7561
7561
|
s && e.err("Only non-generatable nodes (" + o.join(", ") + ") in a required position (see https://prosemirror.net/docs/guide/#generatable)");
|
|
7562
7562
|
}
|
|
7563
7563
|
}
|
|
7564
|
-
function
|
|
7564
|
+
function Na(r) {
|
|
7565
7565
|
let e = /* @__PURE__ */ Object.create(null);
|
|
7566
7566
|
for (let t in r) {
|
|
7567
7567
|
let n = r[t];
|
|
@@ -7571,7 +7571,7 @@ function Ia(r) {
|
|
|
7571
7571
|
}
|
|
7572
7572
|
return e;
|
|
7573
7573
|
}
|
|
7574
|
-
function
|
|
7574
|
+
function Ia(r, e) {
|
|
7575
7575
|
let t = /* @__PURE__ */ Object.create(null);
|
|
7576
7576
|
for (let n in r) {
|
|
7577
7577
|
let i = e && e[n];
|
|
@@ -7586,7 +7586,7 @@ function Ra(r, e) {
|
|
|
7586
7586
|
}
|
|
7587
7587
|
return t;
|
|
7588
7588
|
}
|
|
7589
|
-
function
|
|
7589
|
+
function Ra(r, e, t, n) {
|
|
7590
7590
|
for (let i in e)
|
|
7591
7591
|
if (!(i in r))
|
|
7592
7592
|
throw new RangeError(`Unsupported attribute ${i} for ${t} of type ${i}`);
|
|
@@ -7595,11 +7595,11 @@ function Pa(r, e, t, n) {
|
|
|
7595
7595
|
s.validate && s.validate(e[i]);
|
|
7596
7596
|
}
|
|
7597
7597
|
}
|
|
7598
|
-
function
|
|
7598
|
+
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
|
|
7602
|
+
t[n] = new $c(r, n, e[n]);
|
|
7603
7603
|
return t;
|
|
7604
7604
|
}
|
|
7605
7605
|
class wr {
|
|
@@ -7607,7 +7607,7 @@ class wr {
|
|
|
7607
7607
|
@internal
|
|
7608
7608
|
*/
|
|
7609
7609
|
constructor(e, t, n) {
|
|
7610
|
-
this.name = e, this.schema = t, this.spec = n, this.markSet = null, this.groups = n.group ? n.group.split(" ") : [], this.attrs =
|
|
7610
|
+
this.name = e, this.schema = t, this.spec = n, this.markSet = null, this.groups = n.group ? n.group.split(" ") : [], this.attrs = Pa(e, n.attrs), this.defaultAttrs = Na(this.attrs), this.contentMatch = null, this.inlineContent = null, this.isBlock = !(n.inline || e == "text"), this.isText = e == "text";
|
|
7611
7611
|
}
|
|
7612
7612
|
/**
|
|
7613
7613
|
True if this is an inline type.
|
|
@@ -7668,7 +7668,7 @@ class wr {
|
|
|
7668
7668
|
@internal
|
|
7669
7669
|
*/
|
|
7670
7670
|
computeAttrs(e) {
|
|
7671
|
-
return !e && this.defaultAttrs ? this.defaultAttrs :
|
|
7671
|
+
return !e && this.defaultAttrs ? this.defaultAttrs : Ia(this.attrs, e);
|
|
7672
7672
|
}
|
|
7673
7673
|
/**
|
|
7674
7674
|
Create a `Node` of this type. The given attributes are
|
|
@@ -7735,7 +7735,7 @@ class wr {
|
|
|
7735
7735
|
@internal
|
|
7736
7736
|
*/
|
|
7737
7737
|
checkAttrs(e) {
|
|
7738
|
-
|
|
7738
|
+
Ra(this.attrs, e, "node", this.name);
|
|
7739
7739
|
}
|
|
7740
7740
|
/**
|
|
7741
7741
|
Check whether the given mark type is allowed in this node.
|
|
@@ -7781,7 +7781,7 @@ class wr {
|
|
|
7781
7781
|
return n;
|
|
7782
7782
|
}
|
|
7783
7783
|
}
|
|
7784
|
-
function
|
|
7784
|
+
function Jc(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
|
|
7792
|
+
class $c {
|
|
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" ?
|
|
7794
|
+
this.hasDefault = Object.prototype.hasOwnProperty.call(n, "default"), this.default = n.default, this.validate = typeof n.validate == "string" ? Jc(e, t, n.validate) : n.validate;
|
|
7795
7795
|
}
|
|
7796
7796
|
get isRequired() {
|
|
7797
7797
|
return !this.hasDefault;
|
|
@@ -7802,8 +7802,8 @@ class Tr {
|
|
|
7802
7802
|
@internal
|
|
7803
7803
|
*/
|
|
7804
7804
|
constructor(e, t, n, i) {
|
|
7805
|
-
this.name = e, this.rank = t, this.schema = n, this.spec = i, this.attrs =
|
|
7806
|
-
let s =
|
|
7805
|
+
this.name = e, this.rank = t, this.schema = n, this.spec = i, this.attrs = Pa(e, i.attrs), this.excluded = null;
|
|
7806
|
+
let s = Na(this.attrs);
|
|
7807
7807
|
this.instance = s ? new we(this, s) : null;
|
|
7808
7808
|
}
|
|
7809
7809
|
/**
|
|
@@ -7812,7 +7812,7 @@ class Tr {
|
|
|
7812
7812
|
they have defaults, will be added.
|
|
7813
7813
|
*/
|
|
7814
7814
|
create(e = null) {
|
|
7815
|
-
return !e && this.instance ? this.instance : new we(this,
|
|
7815
|
+
return !e && this.instance ? this.instance : new we(this, Ia(this.attrs, e));
|
|
7816
7816
|
}
|
|
7817
7817
|
/**
|
|
7818
7818
|
@internal
|
|
@@ -7842,7 +7842,7 @@ class Tr {
|
|
|
7842
7842
|
@internal
|
|
7843
7843
|
*/
|
|
7844
7844
|
checkAttrs(e) {
|
|
7845
|
-
|
|
7845
|
+
Ra(this.attrs, e, "mark", this.name);
|
|
7846
7846
|
}
|
|
7847
7847
|
/**
|
|
7848
7848
|
Queries whether a given mark type is
|
|
@@ -7951,10 +7951,10 @@ function uo(r, e) {
|
|
|
7951
7951
|
}
|
|
7952
7952
|
return t;
|
|
7953
7953
|
}
|
|
7954
|
-
function
|
|
7954
|
+
function Kc(r) {
|
|
7955
7955
|
return r.tag != null;
|
|
7956
7956
|
}
|
|
7957
|
-
function
|
|
7957
|
+
function Xc(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 (
|
|
7969
|
+
if (Kc(i))
|
|
7970
7970
|
this.tags.push(i);
|
|
7971
|
-
else if (
|
|
7971
|
+
else if (Xc(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 (
|
|
8007
|
+
if (Qc(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)
|
|
@@ -8072,7 +8072,7 @@ class yr {
|
|
|
8072
8072
|
return e.cached.domParser || (e.cached.domParser = new yr(e, yr.schemaRules(e)));
|
|
8073
8073
|
}
|
|
8074
8074
|
}
|
|
8075
|
-
const
|
|
8075
|
+
const Oa = {
|
|
8076
8076
|
address: !0,
|
|
8077
8077
|
article: !0,
|
|
8078
8078
|
aside: !0,
|
|
@@ -8105,14 +8105,14 @@ const La = {
|
|
|
8105
8105
|
table: !0,
|
|
8106
8106
|
tfoot: !0,
|
|
8107
8107
|
ul: !0
|
|
8108
|
-
},
|
|
8108
|
+
}, Yc = {
|
|
8109
8109
|
head: !0,
|
|
8110
8110
|
noscript: !0,
|
|
8111
8111
|
object: !0,
|
|
8112
8112
|
script: !0,
|
|
8113
8113
|
style: !0,
|
|
8114
8114
|
title: !0
|
|
8115
|
-
},
|
|
8115
|
+
}, La = { ol: !0, ul: !0 }, Gt = 1, fi = 2, ur = 4;
|
|
8116
8116
|
function lo(r, e, t) {
|
|
8117
8117
|
return e != null ? (e ? Gt : 0) | (e === "full" ? fi : 0) : r && r.whitespace == "pre" ? Gt | fi : t & -5;
|
|
8118
8118
|
}
|
|
@@ -8146,7 +8146,7 @@ class ir {
|
|
|
8146
8146
|
return !e && this.match && (t = t.append(this.match.fillBefore(Q.empty, !0))), this.type ? this.type.create(this.attrs, t, this.marks) : t;
|
|
8147
8147
|
}
|
|
8148
8148
|
inlineContext(e) {
|
|
8149
|
-
return this.type ? this.type.inlineContent : this.content.length ? this.content[0].isInline : e.parentNode && !
|
|
8149
|
+
return this.type ? this.type.inlineContent : this.content.length ? this.content[0].isInline : e.parentNode && !Oa.hasOwnProperty(e.parentNode.nodeName.toLowerCase());
|
|
8150
8150
|
}
|
|
8151
8151
|
}
|
|
8152
8152
|
class co {
|
|
@@ -8184,14 +8184,14 @@ 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
|
-
|
|
8187
|
+
La.hasOwnProperty(o) && this.parser.normalizeLists && Zc(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 :
|
|
8189
|
+
e: if (u ? u.ignore : Yc.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);
|
|
8193
8193
|
let c, l = this.needsBlock;
|
|
8194
|
-
if (
|
|
8194
|
+
if (Oa.hasOwnProperty(o))
|
|
8195
8195
|
s.content.length && s.content[0].isInline && this.open && (this.open--, s = this.top), c = !0, s.type || (this.needsBlock = !0);
|
|
8196
8196
|
else if (!e.firstChild) {
|
|
8197
8197
|
this.leafFallback(e, t);
|
|
@@ -8418,13 +8418,13 @@ class co {
|
|
|
8418
8418
|
}
|
|
8419
8419
|
}
|
|
8420
8420
|
}
|
|
8421
|
-
function
|
|
8421
|
+
function Zc(r) {
|
|
8422
8422
|
for (let e = r.firstChild, t = null; e; e = e.nextSibling) {
|
|
8423
8423
|
let n = e.nodeType == 1 ? e.nodeName.toLowerCase() : null;
|
|
8424
|
-
n &&
|
|
8424
|
+
n && La.hasOwnProperty(n) && t ? (t.appendChild(e), e = t) : n == "li" ? t = e : n && (t = null);
|
|
8425
8425
|
}
|
|
8426
8426
|
}
|
|
8427
|
-
function
|
|
8427
|
+
function Qc(r, e) {
|
|
8428
8428
|
return (r.matches || r.msMatchesSelector || r.webkitMatchesSelector || r.mozMatchesSelector).call(r, e);
|
|
8429
8429
|
}
|
|
8430
8430
|
function fo(r) {
|
|
@@ -8451,7 +8451,7 @@ function mo(r, e) {
|
|
|
8451
8451
|
return !0;
|
|
8452
8452
|
}
|
|
8453
8453
|
}
|
|
8454
|
-
class
|
|
8454
|
+
class _a {
|
|
8455
8455
|
/**
|
|
8456
8456
|
Create a serializer. `nodes` should map node names to functions
|
|
8457
8457
|
that take a node and return a description of the corresponding
|
|
@@ -8538,7 +8538,7 @@ class qa {
|
|
|
8538
8538
|
properties in a schema's node and mark specs.
|
|
8539
8539
|
*/
|
|
8540
8540
|
static fromSchema(e) {
|
|
8541
|
-
return e.cached.domSerializer || (e.cached.domSerializer = new
|
|
8541
|
+
return e.cached.domSerializer || (e.cached.domSerializer = new _a(this.nodesFromSchema(e), this.marksFromSchema(e)));
|
|
8542
8542
|
}
|
|
8543
8543
|
/**
|
|
8544
8544
|
Gather the serializers in a schema's node specs into an object.
|
|
@@ -8567,11 +8567,11 @@ function ei(r) {
|
|
|
8567
8567
|
return r.document || window.document;
|
|
8568
8568
|
}
|
|
8569
8569
|
const ho = /* @__PURE__ */ new WeakMap();
|
|
8570
|
-
function
|
|
8570
|
+
function ef(r) {
|
|
8571
8571
|
let e = ho.get(r);
|
|
8572
|
-
return e === void 0 && ho.set(r, e =
|
|
8572
|
+
return e === void 0 && ho.set(r, e = tf(r)), e;
|
|
8573
8573
|
}
|
|
8574
|
-
function
|
|
8574
|
+
function tf(r) {
|
|
8575
8575
|
let e = null;
|
|
8576
8576
|
function t(n) {
|
|
8577
8577
|
if (n && typeof n == "object")
|
|
@@ -8597,7 +8597,7 @@ function lr(r, e, t, n) {
|
|
|
8597
8597
|
let i = e[0], s;
|
|
8598
8598
|
if (typeof i != "string")
|
|
8599
8599
|
throw new RangeError("Invalid array passed to renderSpec");
|
|
8600
|
-
if (n && (s =
|
|
8600
|
+
if (n && (s = ef(n)) && s.indexOf(e) > -1)
|
|
8601
8601
|
throw new RangeError("Using an array from an attribute object as a DOM spec. This may be an attempted cross site scripting attack.");
|
|
8602
8602
|
let o = i.indexOf(" ");
|
|
8603
8603
|
o > 0 && (t = i.slice(0, o), i = i.slice(o + 1));
|
|
@@ -8627,17 +8627,17 @@ function lr(r, e, t, n) {
|
|
|
8627
8627
|
}
|
|
8628
8628
|
return { dom: u, contentDOM: a };
|
|
8629
8629
|
}
|
|
8630
|
-
const
|
|
8631
|
-
function
|
|
8632
|
-
return r + e *
|
|
8630
|
+
const qa = 65535, Ma = Math.pow(2, 16);
|
|
8631
|
+
function rf(r, e) {
|
|
8632
|
+
return r + e * Ma;
|
|
8633
8633
|
}
|
|
8634
8634
|
function go(r) {
|
|
8635
|
-
return r &
|
|
8635
|
+
return r & qa;
|
|
8636
8636
|
}
|
|
8637
|
-
function
|
|
8638
|
-
return (r - (r &
|
|
8637
|
+
function nf(r) {
|
|
8638
|
+
return (r - (r & qa)) / Ma;
|
|
8639
8639
|
}
|
|
8640
|
-
const
|
|
8640
|
+
const Ua = 1, ja = 2, cr = 4, Ha = 8;
|
|
8641
8641
|
class di {
|
|
8642
8642
|
/**
|
|
8643
8643
|
@internal
|
|
@@ -8651,19 +8651,19 @@ class di {
|
|
|
8651
8651
|
argument from the document.
|
|
8652
8652
|
*/
|
|
8653
8653
|
get deleted() {
|
|
8654
|
-
return (this.delInfo &
|
|
8654
|
+
return (this.delInfo & Ha) > 0;
|
|
8655
8655
|
}
|
|
8656
8656
|
/**
|
|
8657
8657
|
Tells you whether the token before the mapped position was deleted.
|
|
8658
8658
|
*/
|
|
8659
8659
|
get deletedBefore() {
|
|
8660
|
-
return (this.delInfo & (
|
|
8660
|
+
return (this.delInfo & (Ua | cr)) > 0;
|
|
8661
8661
|
}
|
|
8662
8662
|
/**
|
|
8663
8663
|
True when the token after the mapped position was deleted.
|
|
8664
8664
|
*/
|
|
8665
8665
|
get deletedAfter() {
|
|
8666
|
-
return (this.delInfo & (
|
|
8666
|
+
return (this.delInfo & (ja | cr)) > 0;
|
|
8667
8667
|
}
|
|
8668
8668
|
/**
|
|
8669
8669
|
Tells whether any of the steps mapped through deletes across the
|
|
@@ -8692,7 +8692,7 @@ class je {
|
|
|
8692
8692
|
if (!this.inverted)
|
|
8693
8693
|
for (let i = 0; i < n; i++)
|
|
8694
8694
|
t += this.ranges[i * 3 + 2] - this.ranges[i * 3 + 1];
|
|
8695
|
-
return this.ranges[n * 3] + t +
|
|
8695
|
+
return this.ranges[n * 3] + t + nf(e);
|
|
8696
8696
|
}
|
|
8697
8697
|
mapResult(e, t = 1) {
|
|
8698
8698
|
return this._map(e, t, !1);
|
|
@@ -8714,8 +8714,8 @@ class je {
|
|
|
8714
8714
|
let g = c ? e == u ? -1 : e == h ? 1 : t : t, E = u + i + (g < 0 ? 0 : l);
|
|
8715
8715
|
if (n)
|
|
8716
8716
|
return E;
|
|
8717
|
-
let D = e == (t < 0 ? u : h) ? null :
|
|
8718
|
-
return (t < 0 ? e != u : e != h) && (v |=
|
|
8717
|
+
let D = e == (t < 0 ? u : h) ? null : rf(a / 3, e - u), v = e == u ? ja : e == h ? Ua : cr;
|
|
8718
|
+
return (t < 0 ? e != u : e != h) && (v |= Ha), new di(E, v, D);
|
|
8719
8719
|
}
|
|
8720
8720
|
i += l - c;
|
|
8721
8721
|
}
|
|
@@ -9243,7 +9243,7 @@ function mi(r, e, t) {
|
|
|
9243
9243
|
}
|
|
9244
9244
|
return !1;
|
|
9245
9245
|
}
|
|
9246
|
-
function
|
|
9246
|
+
function sf(r, e, t, n) {
|
|
9247
9247
|
let i = [], s = [], o, a;
|
|
9248
9248
|
r.doc.nodesBetween(e, t, (u, c, l) => {
|
|
9249
9249
|
if (!u.isInline)
|
|
@@ -9257,7 +9257,7 @@ function of(r, e, t, n) {
|
|
|
9257
9257
|
}
|
|
9258
9258
|
}), i.forEach((u) => r.step(u)), s.forEach((u) => r.step(u));
|
|
9259
9259
|
}
|
|
9260
|
-
function
|
|
9260
|
+
function of(r, e, t, n) {
|
|
9261
9261
|
let i = [], s = 0;
|
|
9262
9262
|
r.doc.nodesBetween(e, t, (o, a) => {
|
|
9263
9263
|
if (!o.isInline)
|
|
@@ -9307,7 +9307,7 @@ function ki(r, e, t, n = t.contentMatch, i = !0) {
|
|
|
9307
9307
|
for (let u = o.length - 1; u >= 0; u--)
|
|
9308
9308
|
r.step(o[u]);
|
|
9309
9309
|
}
|
|
9310
|
-
function
|
|
9310
|
+
function af(r, e, t) {
|
|
9311
9311
|
return (e == 0 || r.canReplace(e, r.childCount)) && (t == r.childCount || r.canReplace(0, t));
|
|
9312
9312
|
}
|
|
9313
9313
|
function Np(r) {
|
|
@@ -9316,12 +9316,12 @@ function Np(r) {
|
|
|
9316
9316
|
let i = r.$from.node(n), s = r.$from.index(n), o = r.$to.indexAfter(n);
|
|
9317
9317
|
if (n < r.depth && i.canReplace(s, o, t))
|
|
9318
9318
|
return n;
|
|
9319
|
-
if (n == 0 || i.type.spec.isolating || !
|
|
9319
|
+
if (n == 0 || i.type.spec.isolating || !af(i, s, o))
|
|
9320
9320
|
break;
|
|
9321
9321
|
}
|
|
9322
9322
|
return null;
|
|
9323
9323
|
}
|
|
9324
|
-
function
|
|
9324
|
+
function uf(r, e, t) {
|
|
9325
9325
|
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;
|
|
9326
9326
|
for (let D = s, v = !1; D > t; D--)
|
|
9327
9327
|
v || n.index(D) > 0 ? (v = !0, l = Q.from(n.node(D).copy(l)), h++) : u--;
|
|
@@ -9331,20 +9331,20 @@ function lf(r, e, t) {
|
|
|
9331
9331
|
r.step(new $e(u, c, o, a, new ae(l.append(g), h, E), l.size - h, !0));
|
|
9332
9332
|
}
|
|
9333
9333
|
function Ip(r, e, t = null, n = r) {
|
|
9334
|
-
let i =
|
|
9334
|
+
let i = lf(r, e), s = i && cf(n, e);
|
|
9335
9335
|
return s ? i.map(wo).concat({ type: e, attrs: t }).concat(s.map(wo)) : null;
|
|
9336
9336
|
}
|
|
9337
9337
|
function wo(r) {
|
|
9338
9338
|
return { type: r, attrs: null };
|
|
9339
9339
|
}
|
|
9340
|
-
function
|
|
9340
|
+
function lf(r, e) {
|
|
9341
9341
|
let { parent: t, startIndex: n, endIndex: i } = r, s = t.contentMatchAt(n).findWrapping(e);
|
|
9342
9342
|
if (!s)
|
|
9343
9343
|
return null;
|
|
9344
9344
|
let o = s.length ? s[0] : e;
|
|
9345
9345
|
return t.canReplaceWith(n, i, o) ? s : null;
|
|
9346
9346
|
}
|
|
9347
|
-
function
|
|
9347
|
+
function cf(r, e) {
|
|
9348
9348
|
let { parent: t, startIndex: n, endIndex: i } = r, s = t.child(n), o = e.contentMatch.findWrapping(s.type);
|
|
9349
9349
|
if (!o)
|
|
9350
9350
|
return null;
|
|
@@ -9353,7 +9353,7 @@ function ff(r, e) {
|
|
|
9353
9353
|
u = u.matchType(t.child(c).type);
|
|
9354
9354
|
return !u || !u.validEnd ? null : o;
|
|
9355
9355
|
}
|
|
9356
|
-
function
|
|
9356
|
+
function ff(r, e, t) {
|
|
9357
9357
|
let n = Q.empty;
|
|
9358
9358
|
for (let o = t.length - 1; o >= 0; o--) {
|
|
9359
9359
|
if (n.size) {
|
|
@@ -9366,25 +9366,25 @@ function df(r, e, t) {
|
|
|
9366
9366
|
let i = e.start, s = e.end;
|
|
9367
9367
|
r.step(new $e(i, s, i, s, new ae(n, 0, 0), t.length, !0));
|
|
9368
9368
|
}
|
|
9369
|
-
function
|
|
9369
|
+
function df(r, e, t, n, i) {
|
|
9370
9370
|
if (!n.isTextblock)
|
|
9371
9371
|
throw new RangeError("Type given to setBlockType should be a textblock");
|
|
9372
9372
|
let s = r.steps.length;
|
|
9373
9373
|
r.doc.nodesBetween(e, t, (o, a) => {
|
|
9374
9374
|
let u = typeof i == "function" ? i(o) : i;
|
|
9375
|
-
if (o.isTextblock && !o.hasMarkup(n, u) &&
|
|
9375
|
+
if (o.isTextblock && !o.hasMarkup(n, u) && mf(r.doc, r.mapping.slice(s).map(a), n)) {
|
|
9376
9376
|
let c = null;
|
|
9377
9377
|
if (n.schema.linebreakReplacement) {
|
|
9378
9378
|
let E = n.whitespace == "pre", D = !!n.contentMatch.matchType(n.schema.linebreakReplacement);
|
|
9379
9379
|
E && !D ? c = !1 : !E && D && (c = !0);
|
|
9380
9380
|
}
|
|
9381
|
-
c === !1 &&
|
|
9381
|
+
c === !1 && za(r, o, a, s), ki(r, r.mapping.slice(s).map(a, 1), n, void 0, c === null);
|
|
9382
9382
|
let l = r.mapping.slice(s), h = l.map(a, 1), g = l.map(a + o.nodeSize, 1);
|
|
9383
|
-
return r.step(new $e(h, g, h + 1, g - 1, new ae(Q.from(n.create(u, null, o.marks)), 0, 0), 1, !0)), c === !0 &&
|
|
9383
|
+
return r.step(new $e(h, g, h + 1, g - 1, new ae(Q.from(n.create(u, null, o.marks)), 0, 0), 1, !0)), c === !0 && Va(r, o, a, s), !1;
|
|
9384
9384
|
}
|
|
9385
9385
|
});
|
|
9386
9386
|
}
|
|
9387
|
-
function
|
|
9387
|
+
function Va(r, e, t, n) {
|
|
9388
9388
|
e.forEach((i, s) => {
|
|
9389
9389
|
if (i.isText) {
|
|
9390
9390
|
let o, a = /\r?\n|\r/g;
|
|
@@ -9395,7 +9395,7 @@ function za(r, e, t, n) {
|
|
|
9395
9395
|
}
|
|
9396
9396
|
});
|
|
9397
9397
|
}
|
|
9398
|
-
function
|
|
9398
|
+
function za(r, e, t, n) {
|
|
9399
9399
|
e.forEach((i, s) => {
|
|
9400
9400
|
if (i.type == i.type.schema.linebreakReplacement) {
|
|
9401
9401
|
let o = r.mapping.slice(n).map(t + 1 + s);
|
|
@@ -9404,11 +9404,11 @@ function Ga(r, e, t, n) {
|
|
|
9404
9404
|
}
|
|
9405
9405
|
});
|
|
9406
9406
|
}
|
|
9407
|
-
function
|
|
9407
|
+
function mf(r, e, t) {
|
|
9408
9408
|
let n = r.resolve(e), i = n.index();
|
|
9409
9409
|
return n.parent.canReplaceWith(i, i + 1, t);
|
|
9410
9410
|
}
|
|
9411
|
-
function
|
|
9411
|
+
function pf(r, e, t, n, i) {
|
|
9412
9412
|
let s = r.doc.nodeAt(e);
|
|
9413
9413
|
if (!s)
|
|
9414
9414
|
throw new RangeError("No node at given position");
|
|
@@ -9437,7 +9437,7 @@ function Rp(r, e, t = 1, n) {
|
|
|
9437
9437
|
let a = i.indexAfter(s), u = n && n[0];
|
|
9438
9438
|
return i.node(s).canReplaceWith(a, a, u ? u.type : i.node(s + 1).type);
|
|
9439
9439
|
}
|
|
9440
|
-
function
|
|
9440
|
+
function hf(r, e, t = 1, n) {
|
|
9441
9441
|
let i = r.doc.resolve(e), s = Q.empty, o = Q.empty;
|
|
9442
9442
|
for (let a = i.depth, u = i.depth - t, c = t - 1; a > u; a--, c--) {
|
|
9443
9443
|
s = Q.from(i.node(a).copy(s));
|
|
@@ -9448,9 +9448,9 @@ function gf(r, e, t = 1, n) {
|
|
|
9448
9448
|
}
|
|
9449
9449
|
function Pp(r, e) {
|
|
9450
9450
|
let t = r.resolve(e), n = t.index();
|
|
9451
|
-
return
|
|
9451
|
+
return Ga(t.nodeBefore, t.nodeAfter) && t.parent.canReplace(n, n + 1);
|
|
9452
9452
|
}
|
|
9453
|
-
function
|
|
9453
|
+
function gf(r, e) {
|
|
9454
9454
|
e.content.size || r.type.compatibleContent(e.type);
|
|
9455
9455
|
let t = r.contentMatchAt(r.childCount), { linebreakReplacement: n } = r.type.schema;
|
|
9456
9456
|
for (let i = 0; i < e.childCount; i++) {
|
|
@@ -9460,21 +9460,21 @@ function wf(r, e) {
|
|
|
9460
9460
|
}
|
|
9461
9461
|
return t.validEnd;
|
|
9462
9462
|
}
|
|
9463
|
-
function
|
|
9464
|
-
return !!(r && e && !r.isLeaf &&
|
|
9463
|
+
function Ga(r, e) {
|
|
9464
|
+
return !!(r && e && !r.isLeaf && gf(r, e));
|
|
9465
9465
|
}
|
|
9466
9466
|
function Op(r, e, t = -1) {
|
|
9467
9467
|
let n = r.resolve(e);
|
|
9468
9468
|
for (let i = n.depth; ; i--) {
|
|
9469
9469
|
let s, o, a = n.index(i);
|
|
9470
|
-
if (i == n.depth ? (s = n.nodeBefore, o = n.nodeAfter) : t > 0 ? (s = n.node(i + 1), a++, o = n.node(i).maybeChild(a)) : (s = n.node(i).maybeChild(a - 1), o = n.node(i + 1)), s && !s.isTextblock &&
|
|
9470
|
+
if (i == n.depth ? (s = n.nodeBefore, o = n.nodeAfter) : t > 0 ? (s = n.node(i + 1), a++, o = n.node(i).maybeChild(a)) : (s = n.node(i).maybeChild(a - 1), o = n.node(i + 1)), s && !s.isTextblock && Ga(s, o) && n.node(i).canReplace(a, a + 1))
|
|
9471
9471
|
return e;
|
|
9472
9472
|
if (i == 0)
|
|
9473
9473
|
break;
|
|
9474
9474
|
e = t < 0 ? n.before(i) : n.after(i);
|
|
9475
9475
|
}
|
|
9476
9476
|
}
|
|
9477
|
-
function
|
|
9477
|
+
function wf(r, e, t) {
|
|
9478
9478
|
let n = null, { linebreakReplacement: i } = r.doc.type.schema, s = r.doc.resolve(e - t), o = s.node().type;
|
|
9479
9479
|
if (i && o.inlineContent) {
|
|
9480
9480
|
let l = o.whitespace == "pre", h = !!o.contentMatch.matchType(i);
|
|
@@ -9483,17 +9483,17 @@ function yf(r, e, t) {
|
|
|
9483
9483
|
let a = r.steps.length;
|
|
9484
9484
|
if (n === !1) {
|
|
9485
9485
|
let l = r.doc.resolve(e + t);
|
|
9486
|
-
|
|
9486
|
+
za(r, l.node(), l.before(), a);
|
|
9487
9487
|
}
|
|
9488
9488
|
o.inlineContent && ki(r, e + t - 1, o, s.node().contentMatchAt(s.index()), n == null);
|
|
9489
9489
|
let u = r.mapping.slice(a), c = u.map(e - t);
|
|
9490
9490
|
if (r.step(new Ie(c, u.map(e + t, -1), ae.empty, !0)), n === !0) {
|
|
9491
9491
|
let l = r.doc.resolve(c);
|
|
9492
|
-
|
|
9492
|
+
Va(r, l.node(), l.before(), r.steps.length);
|
|
9493
9493
|
}
|
|
9494
9494
|
return r;
|
|
9495
9495
|
}
|
|
9496
|
-
function
|
|
9496
|
+
function yf(r, e, t) {
|
|
9497
9497
|
let n = r.resolve(e);
|
|
9498
9498
|
if (n.parent.canReplaceWith(n.index(), n.index(), t))
|
|
9499
9499
|
return e;
|
|
@@ -9536,16 +9536,16 @@ function Lp(r, e, t) {
|
|
|
9536
9536
|
}
|
|
9537
9537
|
return null;
|
|
9538
9538
|
}
|
|
9539
|
-
function
|
|
9539
|
+
function bf(r, e, t = e, n = ae.empty) {
|
|
9540
9540
|
if (e == t && !n.size)
|
|
9541
9541
|
return null;
|
|
9542
9542
|
let i = r.resolve(e), s = r.resolve(t);
|
|
9543
|
-
return
|
|
9543
|
+
return Wa(i, s, n) ? new Ie(e, t, n) : new xf(i, s, n).fit();
|
|
9544
9544
|
}
|
|
9545
|
-
function
|
|
9545
|
+
function Wa(r, e, t) {
|
|
9546
9546
|
return !t.openStart && !t.openEnd && r.start() == e.start() && r.parent.canReplace(r.index(), e.index(), t.content);
|
|
9547
9547
|
}
|
|
9548
|
-
class
|
|
9548
|
+
class xf {
|
|
9549
9549
|
constructor(e, t, n) {
|
|
9550
9550
|
this.$from = e, this.$to = t, this.unplaced = n, this.frontier = [], this.placed = Q.empty;
|
|
9551
9551
|
for (let i = 0; i <= e.depth; i++) {
|
|
@@ -9636,7 +9636,7 @@ class Af {
|
|
|
9636
9636
|
let v = a.child(c), F = h.matchType(v.type);
|
|
9637
9637
|
if (!F)
|
|
9638
9638
|
break;
|
|
9639
|
-
c++, (c > 1 || u == 0 || v.content.size) && (h = F, l.push(
|
|
9639
|
+
c++, (c > 1 || u == 0 || v.content.size) && (h = F, l.push(Ja(v.mark(g.allowedMarks(v.marks)), c == 1 ? u : 0, c == a.childCount ? E : -1)));
|
|
9640
9640
|
}
|
|
9641
9641
|
let D = c == a.childCount;
|
|
9642
9642
|
D || (E = -1), this.placed = jt(this.placed, t, Q.from(l)), this.frontier[t].match = h, D && E < 0 && n && n.type == this.frontier[this.depth].type && this.frontier.length > 1 && this.closeFrontierNode();
|
|
@@ -9703,35 +9703,35 @@ function ri(r, e) {
|
|
|
9703
9703
|
r = r.firstChild.content;
|
|
9704
9704
|
return r;
|
|
9705
9705
|
}
|
|
9706
|
-
function
|
|
9706
|
+
function Ja(r, e, t) {
|
|
9707
9707
|
if (e <= 0)
|
|
9708
9708
|
return r;
|
|
9709
9709
|
let n = r.content;
|
|
9710
|
-
return e > 1 && (n = n.replaceChild(0,
|
|
9710
|
+
return e > 1 && (n = n.replaceChild(0, Ja(n.firstChild, e - 1, n.childCount == 1 ? t - 1 : 0))), e > 0 && (n = r.type.contentMatch.fillBefore(n).append(n), t <= 0 && (n = n.append(r.type.contentMatch.matchFragment(n).fillBefore(Q.empty, !0)))), r.copy(n);
|
|
9711
9711
|
}
|
|
9712
9712
|
function ni(r, e, t, n, i) {
|
|
9713
9713
|
let s = r.node(e), o = i ? r.indexAfter(e) : r.index(e);
|
|
9714
9714
|
if (o == s.childCount && !t.compatibleContent(s.type))
|
|
9715
9715
|
return null;
|
|
9716
9716
|
let a = n.fillBefore(s.content, !0, o);
|
|
9717
|
-
return a && !
|
|
9717
|
+
return a && !Af(t, s.content, o) ? a : null;
|
|
9718
9718
|
}
|
|
9719
|
-
function
|
|
9719
|
+
function Af(r, e, t) {
|
|
9720
9720
|
for (let n = t; n < e.childCount; n++)
|
|
9721
9721
|
if (!r.allowsMarks(e.child(n).marks))
|
|
9722
9722
|
return !0;
|
|
9723
9723
|
return !1;
|
|
9724
9724
|
}
|
|
9725
|
-
function
|
|
9725
|
+
function Df(r) {
|
|
9726
9726
|
return r.spec.defining || r.spec.definingForContent;
|
|
9727
9727
|
}
|
|
9728
|
-
function
|
|
9728
|
+
function vf(r, e, t, n) {
|
|
9729
9729
|
if (!n.size)
|
|
9730
9730
|
return r.deleteRange(e, t);
|
|
9731
9731
|
let i = r.doc.resolve(e), s = r.doc.resolve(t);
|
|
9732
|
-
if (
|
|
9732
|
+
if (Wa(i, s, n))
|
|
9733
9733
|
return r.step(new Ie(e, t, n));
|
|
9734
|
-
let o =
|
|
9734
|
+
let o = Ka(i, r.doc.resolve(t));
|
|
9735
9735
|
o[o.length - 1] == 0 && o.pop();
|
|
9736
9736
|
let a = -(i.depth + 1);
|
|
9737
9737
|
o.unshift(a);
|
|
@@ -9749,7 +9749,7 @@ function Ef(r, e, t, n) {
|
|
|
9749
9749
|
g = D.content;
|
|
9750
9750
|
}
|
|
9751
9751
|
for (let g = l - 1; g >= 0; g--) {
|
|
9752
|
-
let E = c[g], D =
|
|
9752
|
+
let E = c[g], D = Df(E.type);
|
|
9753
9753
|
if (D && !E.sameMarkup(i.node(Math.abs(a) - 1)))
|
|
9754
9754
|
l = g;
|
|
9755
9755
|
else if (D || !E.type.isTextblock)
|
|
@@ -9763,7 +9763,7 @@ function Ef(r, e, t, n) {
|
|
|
9763
9763
|
F < 0 && (w = !1, F = -F);
|
|
9764
9764
|
let B = i.node(F - 1), R = i.index(F - 1);
|
|
9765
9765
|
if (B.canReplaceWith(R, R, D.type, D.marks))
|
|
9766
|
-
return r.replace(i.before(F), w ? s.after(F) : t, new ae(
|
|
9766
|
+
return r.replace(i.before(F), w ? s.after(F) : t, new ae($a(n.content, 0, n.openStart, E), E, n.openEnd));
|
|
9767
9767
|
}
|
|
9768
9768
|
}
|
|
9769
9769
|
let h = r.steps.length;
|
|
@@ -9772,10 +9772,10 @@ function Ef(r, e, t, n) {
|
|
|
9772
9772
|
E < 0 || (e = i.before(E), t = s.after(E));
|
|
9773
9773
|
}
|
|
9774
9774
|
}
|
|
9775
|
-
function
|
|
9775
|
+
function $a(r, e, t, n, i) {
|
|
9776
9776
|
if (e < t) {
|
|
9777
9777
|
let s = r.firstChild;
|
|
9778
|
-
r = r.replaceChild(0, s.copy(
|
|
9778
|
+
r = r.replaceChild(0, s.copy($a(s.content, e + 1, t, n, s)));
|
|
9779
9779
|
}
|
|
9780
9780
|
if (e > n) {
|
|
9781
9781
|
let s = i.contentMatchAt(0), o = s.fillBefore(r).append(r);
|
|
@@ -9783,15 +9783,15 @@ function Ka(r, e, t, n, i) {
|
|
|
9783
9783
|
}
|
|
9784
9784
|
return r;
|
|
9785
9785
|
}
|
|
9786
|
-
function
|
|
9786
|
+
function Ef(r, e, t, n) {
|
|
9787
9787
|
if (!n.isInline && e == t && r.doc.resolve(e).parent.content.size) {
|
|
9788
|
-
let i =
|
|
9788
|
+
let i = yf(r.doc, e, n.type);
|
|
9789
9789
|
i != null && (e = t = i);
|
|
9790
9790
|
}
|
|
9791
9791
|
r.replaceRange(e, t, new ae(Q.from(n), 0, 0));
|
|
9792
9792
|
}
|
|
9793
|
-
function
|
|
9794
|
-
let n = r.doc.resolve(e), i = r.doc.resolve(t), s =
|
|
9793
|
+
function Cf(r, e, t) {
|
|
9794
|
+
let n = r.doc.resolve(e), i = r.doc.resolve(t), s = Ka(n, i);
|
|
9795
9795
|
for (let o = 0; o < s.length; o++) {
|
|
9796
9796
|
let a = s[o], u = o == s.length - 1;
|
|
9797
9797
|
if (u && a == 0 || n.node(a).type.contentMatch.validEnd)
|
|
@@ -9804,7 +9804,7 @@ function Sf(r, e, t) {
|
|
|
9804
9804
|
return r.delete(n.before(o), t);
|
|
9805
9805
|
r.delete(e, t);
|
|
9806
9806
|
}
|
|
9807
|
-
function
|
|
9807
|
+
function Ka(r, e) {
|
|
9808
9808
|
let t = [], n = Math.min(r.depth, e.depth);
|
|
9809
9809
|
for (let i = n; i >= 0; i--) {
|
|
9810
9810
|
let s = r.start(i);
|
|
@@ -9895,7 +9895,7 @@ Nt = function r(e) {
|
|
|
9895
9895
|
Nt.prototype = Object.create(Error.prototype);
|
|
9896
9896
|
Nt.prototype.constructor = Nt;
|
|
9897
9897
|
Nt.prototype.name = "TransformError";
|
|
9898
|
-
class
|
|
9898
|
+
class Sf {
|
|
9899
9899
|
/**
|
|
9900
9900
|
Create a transform that starts with the given document.
|
|
9901
9901
|
*/
|
|
@@ -9944,7 +9944,7 @@ class Tf {
|
|
|
9944
9944
|
given `slice`.
|
|
9945
9945
|
*/
|
|
9946
9946
|
replace(e, t = e, n = ae.empty) {
|
|
9947
|
-
let i =
|
|
9947
|
+
let i = bf(this.doc, e, t, n);
|
|
9948
9948
|
return i && this.step(i), this;
|
|
9949
9949
|
}
|
|
9950
9950
|
/**
|
|
@@ -9986,7 +9986,7 @@ class Tf {
|
|
|
9986
9986
|
control over what happens.
|
|
9987
9987
|
*/
|
|
9988
9988
|
replaceRange(e, t, n) {
|
|
9989
|
-
return
|
|
9989
|
+
return vf(this, e, t, n), this;
|
|
9990
9990
|
}
|
|
9991
9991
|
/**
|
|
9992
9992
|
Replace the given range with a node, but use `from` and `to` as
|
|
@@ -9998,14 +9998,14 @@ class Tf {
|
|
|
9998
9998
|
that parent node.
|
|
9999
9999
|
*/
|
|
10000
10000
|
replaceRangeWith(e, t, n) {
|
|
10001
|
-
return
|
|
10001
|
+
return Ef(this, e, t, n), this;
|
|
10002
10002
|
}
|
|
10003
10003
|
/**
|
|
10004
10004
|
Delete the given range, expanding it to cover fully covered
|
|
10005
10005
|
parent nodes until a valid replace is found.
|
|
10006
10006
|
*/
|
|
10007
10007
|
deleteRange(e, t) {
|
|
10008
|
-
return
|
|
10008
|
+
return Cf(this, e, t), this;
|
|
10009
10009
|
}
|
|
10010
10010
|
/**
|
|
10011
10011
|
Split the content in the given range off from its parent, if there
|
|
@@ -10015,14 +10015,14 @@ class Tf {
|
|
|
10015
10015
|
sure the lift is valid.
|
|
10016
10016
|
*/
|
|
10017
10017
|
lift(e, t) {
|
|
10018
|
-
return
|
|
10018
|
+
return uf(this, e, t), this;
|
|
10019
10019
|
}
|
|
10020
10020
|
/**
|
|
10021
10021
|
Join the blocks around the given position. If depth is 2, their
|
|
10022
10022
|
last and first siblings are also joined, and so on.
|
|
10023
10023
|
*/
|
|
10024
10024
|
join(e, t = 1) {
|
|
10025
|
-
return
|
|
10025
|
+
return wf(this, e, t), this;
|
|
10026
10026
|
}
|
|
10027
10027
|
/**
|
|
10028
10028
|
Wrap the given [range](https://prosemirror.net/docs/ref/#model.NodeRange) in the given set of wrappers.
|
|
@@ -10030,21 +10030,21 @@ class Tf {
|
|
|
10030
10030
|
probably be computed with [`findWrapping`](https://prosemirror.net/docs/ref/#transform.findWrapping).
|
|
10031
10031
|
*/
|
|
10032
10032
|
wrap(e, t) {
|
|
10033
|
-
return
|
|
10033
|
+
return ff(this, e, t), this;
|
|
10034
10034
|
}
|
|
10035
10035
|
/**
|
|
10036
10036
|
Set the type of all textblocks (partly) between `from` and `to` to
|
|
10037
10037
|
the given node type with the given attributes.
|
|
10038
10038
|
*/
|
|
10039
10039
|
setBlockType(e, t = e, n, i = null) {
|
|
10040
|
-
return
|
|
10040
|
+
return df(this, e, t, n, i), this;
|
|
10041
10041
|
}
|
|
10042
10042
|
/**
|
|
10043
10043
|
Change the type, attributes, and/or marks of the node at `pos`.
|
|
10044
10044
|
When `type` isn't given, the existing node type is preserved,
|
|
10045
10045
|
*/
|
|
10046
10046
|
setNodeMarkup(e, t, n = null, i) {
|
|
10047
|
-
return
|
|
10047
|
+
return pf(this, e, t, n, i), this;
|
|
10048
10048
|
}
|
|
10049
10049
|
/**
|
|
10050
10050
|
Set a single attribute on a given node to a new value.
|
|
@@ -10088,13 +10088,13 @@ class Tf {
|
|
|
10088
10088
|
use after the split (with the outermost nodes coming first).
|
|
10089
10089
|
*/
|
|
10090
10090
|
split(e, t = 1, n) {
|
|
10091
|
-
return
|
|
10091
|
+
return hf(this, e, t, n), this;
|
|
10092
10092
|
}
|
|
10093
10093
|
/**
|
|
10094
10094
|
Add the given mark to the inline content between `from` and `to`.
|
|
10095
10095
|
*/
|
|
10096
10096
|
addMark(e, t, n) {
|
|
10097
|
-
return
|
|
10097
|
+
return sf(this, e, t, n), this;
|
|
10098
10098
|
}
|
|
10099
10099
|
/**
|
|
10100
10100
|
Remove marks from inline nodes between `from` and `to`. When
|
|
@@ -10103,7 +10103,7 @@ class Tf {
|
|
|
10103
10103
|
remove all marks of any type.
|
|
10104
10104
|
*/
|
|
10105
10105
|
removeMark(e, t, n) {
|
|
10106
|
-
return
|
|
10106
|
+
return of(this, e, t, n), this;
|
|
10107
10107
|
}
|
|
10108
10108
|
/**
|
|
10109
10109
|
Removes all marks and nodes from the content of the node at
|
|
@@ -10123,7 +10123,7 @@ class Ee {
|
|
|
10123
10123
|
`$head`.
|
|
10124
10124
|
*/
|
|
10125
10125
|
constructor(e, t, n) {
|
|
10126
|
-
this.$anchor = e, this.$head = t, this.ranges = n || [new
|
|
10126
|
+
this.$anchor = e, this.$head = t, this.ranges = n || [new Tf(e.min(t), e.max(t))];
|
|
10127
10127
|
}
|
|
10128
10128
|
/**
|
|
10129
10129
|
The selection's anchor, as an unresolved position.
|
|
@@ -10281,7 +10281,7 @@ class Ee {
|
|
|
10281
10281
|
}
|
|
10282
10282
|
}
|
|
10283
10283
|
Ee.prototype.visible = !0;
|
|
10284
|
-
class
|
|
10284
|
+
class Tf {
|
|
10285
10285
|
/**
|
|
10286
10286
|
Create a range.
|
|
10287
10287
|
*/
|
|
@@ -10469,11 +10469,11 @@ class at extends Ee {
|
|
|
10469
10469
|
return e instanceof at;
|
|
10470
10470
|
}
|
|
10471
10471
|
getBookmark() {
|
|
10472
|
-
return
|
|
10472
|
+
return Ff;
|
|
10473
10473
|
}
|
|
10474
10474
|
}
|
|
10475
10475
|
Ee.jsonID("all", at);
|
|
10476
|
-
const
|
|
10476
|
+
const Ff = {
|
|
10477
10477
|
map() {
|
|
10478
10478
|
return this;
|
|
10479
10479
|
},
|
|
@@ -10511,7 +10511,7 @@ function xo(r, e, t) {
|
|
|
10511
10511
|
}), r.setSelection(Ee.near(r.doc.resolve(o), t));
|
|
10512
10512
|
}
|
|
10513
10513
|
const Ao = 1, Do = 2, vo = 4;
|
|
10514
|
-
class
|
|
10514
|
+
class Bf extends Sf {
|
|
10515
10515
|
/**
|
|
10516
10516
|
@internal
|
|
10517
10517
|
*/
|
|
@@ -10670,7 +10670,7 @@ class Ht {
|
|
|
10670
10670
|
this.name = e, this.init = Eo(t.init, n), this.apply = Eo(t.apply, n);
|
|
10671
10671
|
}
|
|
10672
10672
|
}
|
|
10673
|
-
const
|
|
10673
|
+
const kf = [
|
|
10674
10674
|
new Ht("doc", {
|
|
10675
10675
|
init(r) {
|
|
10676
10676
|
return r.doc || r.schema.topNodeType.createAndFill();
|
|
@@ -10706,7 +10706,7 @@ const Nf = [
|
|
|
10706
10706
|
];
|
|
10707
10707
|
class si {
|
|
10708
10708
|
constructor(e, t) {
|
|
10709
|
-
this.schema = e, this.plugins = [], this.pluginsByKey = /* @__PURE__ */ Object.create(null), this.fields =
|
|
10709
|
+
this.schema = e, this.plugins = [], this.pluginsByKey = /* @__PURE__ */ Object.create(null), this.fields = kf.slice(), t && t.forEach((n) => {
|
|
10710
10710
|
if (this.pluginsByKey[n.key])
|
|
10711
10711
|
throw new RangeError("Adding different instances of a keyed plugin (" + n.key + ")");
|
|
10712
10712
|
this.plugins.push(n), this.pluginsByKey[n.key] = n, n.spec.state && this.fields.push(new Ht(n.key, n.spec.state, n));
|
|
@@ -10799,7 +10799,7 @@ class Et {
|
|
|
10799
10799
|
Start a [transaction](https://prosemirror.net/docs/ref/#state.Transaction) from this state.
|
|
10800
10800
|
*/
|
|
10801
10801
|
get tr() {
|
|
10802
|
-
return new
|
|
10802
|
+
return new Bf(this);
|
|
10803
10803
|
}
|
|
10804
10804
|
/**
|
|
10805
10805
|
Create a new state.
|
|
@@ -10878,10 +10878,10 @@ class Et {
|
|
|
10878
10878
|
}), s;
|
|
10879
10879
|
}
|
|
10880
10880
|
}
|
|
10881
|
-
function
|
|
10881
|
+
function Xa(r, e, t) {
|
|
10882
10882
|
for (let n in r) {
|
|
10883
10883
|
let i = r[n];
|
|
10884
|
-
i instanceof Function ? i = i.bind(e) : n == "handleDOMEvents" && (i =
|
|
10884
|
+
i instanceof Function ? i = i.bind(e) : n == "handleDOMEvents" && (i = Xa(i, e, {})), t[n] = i;
|
|
10885
10885
|
}
|
|
10886
10886
|
return t;
|
|
10887
10887
|
}
|
|
@@ -10890,7 +10890,7 @@ class _p {
|
|
|
10890
10890
|
Create a plugin.
|
|
10891
10891
|
*/
|
|
10892
10892
|
constructor(e) {
|
|
10893
|
-
this.spec = e, this.props = {}, e.props &&
|
|
10893
|
+
this.spec = e, this.props = {}, e.props && Xa(e.props, this, this.props), this.key = e.key ? e.key.key : Ya("plugin");
|
|
10894
10894
|
}
|
|
10895
10895
|
/**
|
|
10896
10896
|
Extract the plugin's state field from an editor state.
|
|
@@ -10900,7 +10900,7 @@ class _p {
|
|
|
10900
10900
|
}
|
|
10901
10901
|
}
|
|
10902
10902
|
const oi = /* @__PURE__ */ Object.create(null);
|
|
10903
|
-
function
|
|
10903
|
+
function Ya(r) {
|
|
10904
10904
|
return r in oi ? r + "$" + ++oi[r] : (oi[r] = 0, r + "$");
|
|
10905
10905
|
}
|
|
10906
10906
|
class qp {
|
|
@@ -10908,7 +10908,7 @@ class qp {
|
|
|
10908
10908
|
Create a plugin key.
|
|
10909
10909
|
*/
|
|
10910
10910
|
constructor(e = "key") {
|
|
10911
|
-
this.key =
|
|
10911
|
+
this.key = Ya(e);
|
|
10912
10912
|
}
|
|
10913
10913
|
/**
|
|
10914
10914
|
Get the active plugin with this key, if any, from an editor
|
|
@@ -10924,7 +10924,7 @@ class qp {
|
|
|
10924
10924
|
return e[this.key];
|
|
10925
10925
|
}
|
|
10926
10926
|
}
|
|
10927
|
-
const
|
|
10927
|
+
const Za = (r) => r.replace(/[A-Z]/g, (e) => `-${e.toLowerCase()}`), Mp = (r) => Za(r), Up = Object.freeze({
|
|
10928
10928
|
RESOLVED: "resolved",
|
|
10929
10929
|
NEW: "new",
|
|
10930
10930
|
ADD: "add",
|
|
@@ -10956,19 +10956,19 @@ function Vp(r = {}) {
|
|
|
10956
10956
|
}
|
|
10957
10957
|
const zp = () => typeof navigator < "u" ? /Mac/.test(navigator.platform) : !1, Gp = () => ["iPad Simulator", "iPhone Simulator", "iPod Simulator", "iPad", "iPhone", "iPod"].includes(
|
|
10958
10958
|
navigator.platform
|
|
10959
|
-
),
|
|
10960
|
-
function
|
|
10959
|
+
), Nf = (r) => Object.prototype.toString.call(r) === "[object RegExp]";
|
|
10960
|
+
function If(r, e, t = { strict: !0 }) {
|
|
10961
10961
|
const n = Object.keys(e);
|
|
10962
|
-
return n.length ? n.every((i) => t.strict ? e[i] === r[i] :
|
|
10962
|
+
return n.length ? n.every((i) => t.strict ? e[i] === r[i] : Nf(e[i]) ? e[i].test(r[i]) : e[i] === r[i]) : !0;
|
|
10963
10963
|
}
|
|
10964
10964
|
function Wp(r, e) {
|
|
10965
10965
|
const n = typeof e == "string" ? [e] : e;
|
|
10966
10966
|
return Object.keys(r).reduce((i, s) => (n.includes(s) || (i[s] = r[s]), i), {});
|
|
10967
10967
|
}
|
|
10968
|
-
const
|
|
10969
|
-
function
|
|
10970
|
-
const e = r.toString() || "0", t = Number.parseFloat(e), i = (e.match(
|
|
10971
|
-
return [t,
|
|
10968
|
+
const Rf = /[\d-.]+(\w+)$/, Pf = ["px", "rem", "em", "in", "q", "mm", "cm", "pt", "pc", "vh", "vw", "vmin", "vmax"];
|
|
10969
|
+
function Of(r = "0") {
|
|
10970
|
+
const e = r.toString() || "0", t = Number.parseFloat(e), i = (e.match(Rf)?.[1] ?? "").toLowerCase();
|
|
10971
|
+
return [t, Pf.includes(i) ? i : null];
|
|
10972
10972
|
}
|
|
10973
10973
|
function Jp(r = 0, e = 0, t = 0) {
|
|
10974
10974
|
return Math.min(Math.max(r, e), t);
|
|
@@ -10997,7 +10997,7 @@ function pi(r) {
|
|
|
10997
10997
|
if (r != null)
|
|
10998
10998
|
return r * 240;
|
|
10999
10999
|
}
|
|
11000
|
-
function
|
|
11000
|
+
function Lf(r) {
|
|
11001
11001
|
if (r != null)
|
|
11002
11002
|
return Math.round(r / 2);
|
|
11003
11003
|
}
|
|
@@ -11011,22 +11011,22 @@ function mt(r) {
|
|
|
11011
11011
|
if (r != null)
|
|
11012
11012
|
return typeof r == "string" && (r = parseFloat(r)), Math.round(r * 9525);
|
|
11013
11013
|
}
|
|
11014
|
-
function
|
|
11014
|
+
function Qa(r) {
|
|
11015
11015
|
return r == null ? void 0 : parseFloat(r) / 8 * 1.3333;
|
|
11016
11016
|
}
|
|
11017
|
-
function
|
|
11017
|
+
function eu(r) {
|
|
11018
11018
|
if (r != null)
|
|
11019
11019
|
return Math.round(r * 6);
|
|
11020
11020
|
}
|
|
11021
|
-
function
|
|
11021
|
+
function tu(r) {
|
|
11022
11022
|
if (r != null)
|
|
11023
11023
|
return r / 20;
|
|
11024
11024
|
}
|
|
11025
|
-
function
|
|
11025
|
+
function _f(r) {
|
|
11026
11026
|
if (r != null)
|
|
11027
11027
|
return r * 20;
|
|
11028
11028
|
}
|
|
11029
|
-
const
|
|
11029
|
+
const qf = async (r) => {
|
|
11030
11030
|
const e = r.includes(",") ? r.split(",", 2)[1] : r;
|
|
11031
11031
|
if (typeof globalThis.atob == "function") {
|
|
11032
11032
|
const n = globalThis.atob(e), i = n.length, s = new Uint8Array(i);
|
|
@@ -11042,7 +11042,7 @@ const Mf = async (r) => {
|
|
|
11042
11042
|
}, $p = (r) => {
|
|
11043
11043
|
const n = new window.DOMParser().parseFromString(r, "text/xml").querySelectorAll("Default");
|
|
11044
11044
|
return Array.from(n).map((i) => i.getAttribute("Extension"));
|
|
11045
|
-
},
|
|
11045
|
+
}, Mf = (r) => (/* @__PURE__ */ new Map([
|
|
11046
11046
|
["yellow", "#ffff00"],
|
|
11047
11047
|
["green", "#00ff00"],
|
|
11048
11048
|
["blue", "#0000FFFF"],
|
|
@@ -11059,7 +11059,7 @@ const Mf = async (r) => {
|
|
|
11059
11059
|
["lightGray", "#C0C0C0FF"],
|
|
11060
11060
|
["black", "#000"]
|
|
11061
11061
|
])).get(r) || null;
|
|
11062
|
-
function
|
|
11062
|
+
function Uf(r) {
|
|
11063
11063
|
if (!r || typeof r != "string") return !1;
|
|
11064
11064
|
switch (r.length) {
|
|
11065
11065
|
case 3:
|
|
@@ -11072,13 +11072,13 @@ function jf(r) {
|
|
|
11072
11072
|
return !1;
|
|
11073
11073
|
}
|
|
11074
11074
|
}
|
|
11075
|
-
const
|
|
11075
|
+
const jf = (r) => {
|
|
11076
11076
|
const e = Number(r).toString(16);
|
|
11077
11077
|
return e.length === 1 ? "0" + e : e;
|
|
11078
|
-
},
|
|
11079
|
-
let [i, s] =
|
|
11078
|
+
}, Hf = (r) => "#" + r.match(/\d+/g).map(jf).join(""), Kp = (r, e, t = "", n = !1) => {
|
|
11079
|
+
let [i, s] = Of(r);
|
|
11080
11080
|
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}`);
|
|
11081
|
-
},
|
|
11081
|
+
}, Vf = (r, e) => {
|
|
11082
11082
|
const t = new Uint8Array(r), n = e.replace(/[-{}]/g, "");
|
|
11083
11083
|
if (n.length !== 32) {
|
|
11084
11084
|
console.error("Invalid GUID");
|
|
@@ -11104,10 +11104,10 @@ function Ri(r = 8) {
|
|
|
11104
11104
|
}
|
|
11105
11105
|
return t.join("");
|
|
11106
11106
|
}
|
|
11107
|
-
function
|
|
11107
|
+
function ru() {
|
|
11108
11108
|
return Math.floor(Math.random() * 2147483647).toString(16).toUpperCase().padStart(8, "0");
|
|
11109
11109
|
}
|
|
11110
|
-
const
|
|
11110
|
+
const zf = {
|
|
11111
11111
|
"xmlns:wpc": "http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas",
|
|
11112
11112
|
"xmlns:cx": "http://schemas.microsoft.com/office/drawing/2014/chartex",
|
|
11113
11113
|
"xmlns:cx1": "http://schemas.microsoft.com/office/drawing/2015/9/8/chartex",
|
|
@@ -11144,7 +11144,7 @@ const Gf = {
|
|
|
11144
11144
|
"xmlns:wne": "http://schemas.microsoft.com/office/word/2006/wordml",
|
|
11145
11145
|
"xmlns:wps": "http://schemas.microsoft.com/office/word/2010/wordprocessingShape",
|
|
11146
11146
|
"mc:Ignorable": "w14 w15 w16se w16cid w16 w16cex w16sdtdh w16sdtfl w16du wp14"
|
|
11147
|
-
},
|
|
11147
|
+
}, Gf = {
|
|
11148
11148
|
elements: [
|
|
11149
11149
|
{
|
|
11150
11150
|
type: "element",
|
|
@@ -11156,7 +11156,7 @@ const Gf = {
|
|
|
11156
11156
|
elements: []
|
|
11157
11157
|
}
|
|
11158
11158
|
]
|
|
11159
|
-
},
|
|
11159
|
+
}, Wf = {
|
|
11160
11160
|
elements: [{
|
|
11161
11161
|
type: "element",
|
|
11162
11162
|
name: "w:settings",
|
|
@@ -11165,7 +11165,7 @@ const Gf = {
|
|
|
11165
11165
|
},
|
|
11166
11166
|
elements: []
|
|
11167
11167
|
}]
|
|
11168
|
-
},
|
|
11168
|
+
}, Jf = {
|
|
11169
11169
|
type: "element",
|
|
11170
11170
|
name: "w:r",
|
|
11171
11171
|
elements: [
|
|
@@ -11841,7 +11841,7 @@ const Gf = {
|
|
|
11841
11841
|
}
|
|
11842
11842
|
]
|
|
11843
11843
|
}
|
|
11844
|
-
},
|
|
11844
|
+
}, $f = {
|
|
11845
11845
|
declaration: {
|
|
11846
11846
|
attributes: {
|
|
11847
11847
|
version: "1.0",
|
|
@@ -11894,7 +11894,7 @@ const Gf = {
|
|
|
11894
11894
|
elements: []
|
|
11895
11895
|
}
|
|
11896
11896
|
]
|
|
11897
|
-
},
|
|
11897
|
+
}, Kf = {
|
|
11898
11898
|
declaration: {
|
|
11899
11899
|
attributes: {
|
|
11900
11900
|
version: "1.0",
|
|
@@ -11947,7 +11947,7 @@ const Gf = {
|
|
|
11947
11947
|
elements: []
|
|
11948
11948
|
}
|
|
11949
11949
|
]
|
|
11950
|
-
},
|
|
11950
|
+
}, Xf = {
|
|
11951
11951
|
declaration: {
|
|
11952
11952
|
attributes: {
|
|
11953
11953
|
version: "1.0",
|
|
@@ -12001,7 +12001,7 @@ const Gf = {
|
|
|
12001
12001
|
elements: []
|
|
12002
12002
|
}
|
|
12003
12003
|
]
|
|
12004
|
-
},
|
|
12004
|
+
}, Yf = {
|
|
12005
12005
|
declaration: {
|
|
12006
12006
|
attributes: {
|
|
12007
12007
|
version: "1.0",
|
|
@@ -12054,7 +12054,7 @@ const Gf = {
|
|
|
12054
12054
|
elements: []
|
|
12055
12055
|
}
|
|
12056
12056
|
]
|
|
12057
|
-
},
|
|
12057
|
+
}, Zf = {
|
|
12058
12058
|
elements: [
|
|
12059
12059
|
{
|
|
12060
12060
|
type: "element",
|
|
@@ -12156,7 +12156,7 @@ const Gf = {
|
|
|
12156
12156
|
]
|
|
12157
12157
|
}
|
|
12158
12158
|
]
|
|
12159
|
-
},
|
|
12159
|
+
}, Qf = {
|
|
12160
12160
|
declaration: {
|
|
12161
12161
|
attributes: {
|
|
12162
12162
|
version: "1.0",
|
|
@@ -12304,12 +12304,12 @@ const Gf = {
|
|
|
12304
12304
|
}
|
|
12305
12305
|
]
|
|
12306
12306
|
}, vt = {
|
|
12307
|
-
COMMENTS_XML_DEF:
|
|
12308
|
-
COMMENTS_EXTENDED_XML_DEF:
|
|
12309
|
-
COMMENTS_EXTENSIBLE_XML_DEF:
|
|
12310
|
-
COMMENTS_IDS_XML_DEF:
|
|
12311
|
-
DOCUMENT_RELS_XML_DEF:
|
|
12312
|
-
CONTENT_TYPES:
|
|
12307
|
+
COMMENTS_XML_DEF: $f,
|
|
12308
|
+
COMMENTS_EXTENDED_XML_DEF: Kf,
|
|
12309
|
+
COMMENTS_EXTENSIBLE_XML_DEF: Xf,
|
|
12310
|
+
COMMENTS_IDS_XML_DEF: Yf,
|
|
12311
|
+
DOCUMENT_RELS_XML_DEF: Zf,
|
|
12312
|
+
CONTENT_TYPES: Qf
|
|
12313
12313
|
}, xr = "trackInsert", Pi = "trackDelete", Oi = "trackFormat", He = (r) => {
|
|
12314
12314
|
if (r)
|
|
12315
12315
|
try {
|
|
@@ -12318,15 +12318,15 @@ const Gf = {
|
|
|
12318
12318
|
console.error("Error in carbonCopy", r, e);
|
|
12319
12319
|
return;
|
|
12320
12320
|
}
|
|
12321
|
-
},
|
|
12321
|
+
}, ed = {
|
|
12322
12322
|
attributes: {
|
|
12323
12323
|
"w:abstractNumId": "1"
|
|
12324
12324
|
}
|
|
12325
|
-
},
|
|
12325
|
+
}, td = {
|
|
12326
12326
|
attributes: {
|
|
12327
12327
|
"w:abstractNumId": "0"
|
|
12328
12328
|
}
|
|
12329
|
-
},
|
|
12329
|
+
}, nu = {
|
|
12330
12330
|
declaration: {
|
|
12331
12331
|
attributes: {
|
|
12332
12332
|
version: "1.0",
|
|
@@ -13576,7 +13576,7 @@ function So(r, e) {
|
|
|
13576
13576
|
u && (c = r.comments.find((E) => E.commentId === u || E.importedId === u));
|
|
13577
13577
|
const l = c?.isInternal || o.isInternal;
|
|
13578
13578
|
if (n === "external" && l || !!o.resolvedTime) return;
|
|
13579
|
-
let g =
|
|
13579
|
+
let g = rd(e, a);
|
|
13580
13580
|
if (e === "End") {
|
|
13581
13581
|
const E = {
|
|
13582
13582
|
name: "w:r",
|
|
@@ -13586,21 +13586,21 @@ function So(r, e) {
|
|
|
13586
13586
|
}
|
|
13587
13587
|
return g;
|
|
13588
13588
|
}
|
|
13589
|
-
const
|
|
13589
|
+
const rd = (r, e) => ({
|
|
13590
13590
|
name: `w:commentRange${r}`,
|
|
13591
13591
|
attributes: {
|
|
13592
13592
|
"w:id": String(e)
|
|
13593
13593
|
}
|
|
13594
|
-
}),
|
|
13594
|
+
}), nd = (r) => ({
|
|
13595
13595
|
...r,
|
|
13596
|
-
commentParaId:
|
|
13597
|
-
}),
|
|
13598
|
-
const i =
|
|
13596
|
+
commentParaId: ru()
|
|
13597
|
+
}), id = (r, e, t, n) => {
|
|
13598
|
+
const i = su({ editor: n, node: r.commentJSON }), s = {
|
|
13599
13599
|
"w:id": String(e),
|
|
13600
13600
|
"w:author": r.creatorName || r.importedAuthor?.name,
|
|
13601
13601
|
"w:email": r.creatorEmail || r.importedAuthor?.email,
|
|
13602
|
-
"w:date":
|
|
13603
|
-
"w:initials":
|
|
13602
|
+
"w:date": iu(r.createdTime),
|
|
13603
|
+
"w:initials": sd(r.creatorName),
|
|
13604
13604
|
"w:done": r.resolvedTime ? "1" : "0",
|
|
13605
13605
|
"w15:paraId": r.commentParaId,
|
|
13606
13606
|
"custom:internalId": r.commentId || r.internalId,
|
|
@@ -13619,10 +13619,10 @@ const nd = (r, e) => ({
|
|
|
13619
13619
|
attributes: s,
|
|
13620
13620
|
elements: [i]
|
|
13621
13621
|
};
|
|
13622
|
-
},
|
|
13622
|
+
}, sd = (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"), od = (r = [], e) => {
|
|
13623
13623
|
const t = He(e);
|
|
13624
13624
|
return r.forEach((n) => {
|
|
13625
|
-
n.elements[0].elements.unshift(
|
|
13625
|
+
n.elements[0].elements.unshift(Jf);
|
|
13626
13626
|
const s = n.attributes["w15:paraId"];
|
|
13627
13627
|
n.elements[0].attributes["w14:paraId"] = s, n.attributes = {
|
|
13628
13628
|
"w:id": n.attributes["w:id"],
|
|
@@ -13638,7 +13638,7 @@ const nd = (r, e) => ({
|
|
|
13638
13638
|
"xmlns:custom": "http://schemas.openxmlformats.org/wordprocessingml/2006/main"
|
|
13639
13639
|
};
|
|
13640
13640
|
}), t.elements[0].elements = r, t;
|
|
13641
|
-
},
|
|
13641
|
+
}, ad = (r = [], e) => {
|
|
13642
13642
|
const t = He(e), n = r.map((i) => {
|
|
13643
13643
|
const s = {
|
|
13644
13644
|
"w15:paraId": i.commentParaId,
|
|
@@ -13655,10 +13655,10 @@ const nd = (r, e) => ({
|
|
|
13655
13655
|
};
|
|
13656
13656
|
});
|
|
13657
13657
|
return t.elements[0].elements = n, t;
|
|
13658
|
-
},
|
|
13658
|
+
}, ud = (r = [], e, t) => {
|
|
13659
13659
|
const n = He(e), i = He(t);
|
|
13660
13660
|
return n.elements[0].elements = [], i.elements[0].elements = [], r.forEach((s) => {
|
|
13661
|
-
const o =
|
|
13661
|
+
const o = ru(), a = {
|
|
13662
13662
|
type: "element",
|
|
13663
13663
|
name: "w16cid:commentId",
|
|
13664
13664
|
attributes: {
|
|
@@ -13672,7 +13672,7 @@ const nd = (r, e) => ({
|
|
|
13672
13672
|
name: "w16cex:commentExtensible",
|
|
13673
13673
|
attributes: {
|
|
13674
13674
|
"w16cex:durableId": o,
|
|
13675
|
-
"w16cex:dateUtc":
|
|
13675
|
+
"w16cex:dateUtc": iu()
|
|
13676
13676
|
}
|
|
13677
13677
|
};
|
|
13678
13678
|
i.elements[0].elements.push(u);
|
|
@@ -13680,13 +13680,13 @@ const nd = (r, e) => ({
|
|
|
13680
13680
|
documentIdsUpdated: n,
|
|
13681
13681
|
extensibleUpdated: i
|
|
13682
13682
|
};
|
|
13683
|
-
},
|
|
13683
|
+
}, ld = (r) => {
|
|
13684
13684
|
const e = He(r);
|
|
13685
13685
|
return e["word/comments.xml"] = vt.COMMENTS_XML_DEF, e["word/commentsExtended.xml"] = vt.COMMENTS_EXTENDED_XML_DEF, e["word/commentsExtensible.xml"] = vt.COMMENTS_EXTENSIBLE_XML_DEF, e["word/commentsIds.xml"] = vt.COMMENTS_IDS_XML_DEF, e["[Content_Types].xml"] = vt.CONTENT_TYPES, e;
|
|
13686
|
-
},
|
|
13686
|
+
}, cd = (r) => {
|
|
13687
13687
|
const e = He(r);
|
|
13688
13688
|
return delete e["word/comments.xml"], delete e["word/commentsExtended.xml"], delete e["word/commentsExtensible.xml"], delete e["word/commentsIds.xml"], e;
|
|
13689
|
-
}, sr = (r) => ({ ...vt.DOCUMENT_RELS_XML_DEF.elements[0].elements.find((n) => n.attributes.Target === r) }),
|
|
13689
|
+
}, sr = (r) => ({ ...vt.DOCUMENT_RELS_XML_DEF.elements[0].elements.find((n) => n.attributes.Target === r) }), fd = ({
|
|
13690
13690
|
convertedXml: r,
|
|
13691
13691
|
defs: e,
|
|
13692
13692
|
commentsWithParaIds: t,
|
|
@@ -13695,16 +13695,16 @@ const nd = (r, e) => ({
|
|
|
13695
13695
|
}) => {
|
|
13696
13696
|
const s = [];
|
|
13697
13697
|
if (n === "clean")
|
|
13698
|
-
return { documentXml:
|
|
13699
|
-
const o =
|
|
13700
|
-
o["word/comments.xml"] =
|
|
13698
|
+
return { documentXml: cd(r), relationships: s };
|
|
13699
|
+
const o = ld(r);
|
|
13700
|
+
o["word/comments.xml"] = od(
|
|
13701
13701
|
e,
|
|
13702
13702
|
o["word/comments.xml"]
|
|
13703
|
-
), s.push(sr("comments.xml")), o["word/commentsExtended.xml"] =
|
|
13703
|
+
), s.push(sr("comments.xml")), o["word/commentsExtended.xml"] = ad(
|
|
13704
13704
|
t,
|
|
13705
13705
|
o["word/commentsExtended.xml"]
|
|
13706
13706
|
), s.push(sr("commentsExtended.xml"));
|
|
13707
|
-
const { documentIdsUpdated: a, extensibleUpdated: u } =
|
|
13707
|
+
const { documentIdsUpdated: a, extensibleUpdated: u } = ud(
|
|
13708
13708
|
t,
|
|
13709
13709
|
o["word/commentsIds.xml"],
|
|
13710
13710
|
o["word/commentsExtensible.xml"]
|
|
@@ -13713,7 +13713,7 @@ const nd = (r, e) => ({
|
|
|
13713
13713
|
relationships: s,
|
|
13714
13714
|
documentXml: o
|
|
13715
13715
|
};
|
|
13716
|
-
},
|
|
13716
|
+
}, dd = (r, e) => e ? ["width", `${Math.max(e, r)}px`] : ["min-width", `${r}px`], md = (r, e, t, n) => {
|
|
13717
13717
|
let i = 0, s = !0;
|
|
13718
13718
|
const o = [], a = [], u = r.firstChild;
|
|
13719
13719
|
if (!u) return {};
|
|
@@ -13722,7 +13722,7 @@ const nd = (r, e) => ({
|
|
|
13722
13722
|
for (let w = 0; w < v; w++, D++) {
|
|
13723
13723
|
const B = t === D ? n : F && F[w];
|
|
13724
13724
|
i += B || e, B || (s = !1);
|
|
13725
|
-
const [R, A] =
|
|
13725
|
+
const [R, A] = dd(e, B);
|
|
13726
13726
|
o.push(["col", { style: `${R}: ${A}` }]), a.push(parseInt(A, 10));
|
|
13727
13727
|
}
|
|
13728
13728
|
}
|
|
@@ -13736,31 +13736,31 @@ const nd = (r, e) => ({
|
|
|
13736
13736
|
};
|
|
13737
13737
|
function qt(r) {
|
|
13738
13738
|
const { type: e } = r.node || {}, t = {
|
|
13739
|
-
doc:
|
|
13740
|
-
body:
|
|
13741
|
-
paragraph:
|
|
13742
|
-
text:
|
|
13739
|
+
doc: gd,
|
|
13740
|
+
body: pd,
|
|
13741
|
+
paragraph: su,
|
|
13742
|
+
text: wd,
|
|
13743
13743
|
bulletList: Fo,
|
|
13744
13744
|
orderedList: Fo,
|
|
13745
|
-
lineBreak:
|
|
13746
|
-
table:
|
|
13747
|
-
tableRow:
|
|
13748
|
-
tableCell:
|
|
13749
|
-
bookmarkStart:
|
|
13750
|
-
fieldAnnotation:
|
|
13751
|
-
tab:
|
|
13752
|
-
image:
|
|
13753
|
-
hardBreak:
|
|
13745
|
+
lineBreak: Cd,
|
|
13746
|
+
table: Sd,
|
|
13747
|
+
tableRow: Id,
|
|
13748
|
+
tableCell: Pd,
|
|
13749
|
+
bookmarkStart: _d,
|
|
13750
|
+
fieldAnnotation: zd,
|
|
13751
|
+
tab: Fd,
|
|
13752
|
+
image: uu,
|
|
13753
|
+
hardBreak: Gd,
|
|
13754
13754
|
commentRangeStart: () => So(r, "Start"),
|
|
13755
13755
|
commentRangeEnd: () => So(r, "End"),
|
|
13756
13756
|
commentReference: () => null,
|
|
13757
|
-
shapeContainer:
|
|
13758
|
-
shapeTextbox:
|
|
13759
|
-
contentBlock:
|
|
13757
|
+
shapeContainer: Wd,
|
|
13758
|
+
shapeTextbox: Jd,
|
|
13759
|
+
contentBlock: $d
|
|
13760
13760
|
};
|
|
13761
13761
|
return t[e] ? t[e](r) : (console.error("No translation function found for node type:", e), null);
|
|
13762
13762
|
}
|
|
13763
|
-
function
|
|
13763
|
+
function pd(r) {
|
|
13764
13764
|
const e = r.bodyNode?.elements.find((n) => n.name === "w:sectPr") || {};
|
|
13765
13765
|
if (r.converter) {
|
|
13766
13766
|
const n = r.converter.pageStyles.pageMargins, i = e.elements.find((o) => o.name === "w:pgMar"), { attributes: s } = i;
|
|
@@ -13774,11 +13774,11 @@ function hd(r) {
|
|
|
13774
13774
|
elements: [...dt(r), e]
|
|
13775
13775
|
};
|
|
13776
13776
|
}
|
|
13777
|
-
function
|
|
13777
|
+
function su(r) {
|
|
13778
13778
|
const e = dt(r), t = e.find((s) => s.name === "htmlAnnotation");
|
|
13779
13779
|
if (e.length === 1 && t)
|
|
13780
13780
|
return t.elements;
|
|
13781
|
-
const n =
|
|
13781
|
+
const n = hd(r.node);
|
|
13782
13782
|
n && e.unshift(n);
|
|
13783
13783
|
let i = {};
|
|
13784
13784
|
return r.node.attrs?.rsidRDefault && (i["w:rsidRDefault"] = r.node.attrs.rsidRDefault), {
|
|
@@ -13787,13 +13787,13 @@ function ou(r) {
|
|
|
13787
13787
|
attributes: i
|
|
13788
13788
|
};
|
|
13789
13789
|
}
|
|
13790
|
-
function
|
|
13790
|
+
function hd(r) {
|
|
13791
13791
|
const { attrs: e = {} } = r, t = [], { styleId: n } = e;
|
|
13792
13792
|
n && t.push({ name: "w:pStyle", attributes: { "w:val": n } });
|
|
13793
13793
|
const { spacing: i, indent: s, textAlign: o, textIndent: a, lineHeight: u, marksAttrs: c, keepLines: l, keepNext: h, dropcap: g } = e;
|
|
13794
13794
|
if (i) {
|
|
13795
13795
|
const { lineSpaceBefore: D, lineSpaceAfter: v, line: F, lineRule: w } = i, B = {};
|
|
13796
|
-
D >= 0 && (B["w:before"] = Te(D)), v >= 0 && (B["w:after"] = Te(v)), w === "exact" ? u && (B["w:line"] =
|
|
13796
|
+
D >= 0 && (B["w:before"] = Te(D)), v >= 0 && (B["w:after"] = Te(v)), w === "exact" ? u && (B["w:line"] = _f(parseFloat(u))) : u && (B["w:line"] = pi(u)), B["w:lineRule"] = w || "auto";
|
|
13797
13797
|
const R = {
|
|
13798
13798
|
name: "w:spacing",
|
|
13799
13799
|
attributes: B
|
|
@@ -13834,7 +13834,7 @@ function gd(r) {
|
|
|
13834
13834
|
t.push(D);
|
|
13835
13835
|
}
|
|
13836
13836
|
if (c) {
|
|
13837
|
-
const D = kr(c), v =
|
|
13837
|
+
const D = kr(c), v = ou(D);
|
|
13838
13838
|
t.push(v);
|
|
13839
13839
|
}
|
|
13840
13840
|
l && t.push({
|
|
@@ -13859,7 +13859,7 @@ function gd(r) {
|
|
|
13859
13859
|
elements: t
|
|
13860
13860
|
} : null;
|
|
13861
13861
|
}
|
|
13862
|
-
function
|
|
13862
|
+
function gd(r) {
|
|
13863
13863
|
const e = {
|
|
13864
13864
|
type: "body",
|
|
13865
13865
|
content: r.node.content
|
|
@@ -13867,7 +13867,7 @@ function wd(r) {
|
|
|
13867
13867
|
return [{
|
|
13868
13868
|
name: "w:document",
|
|
13869
13869
|
elements: [qt({ ...r, node: e })],
|
|
13870
|
-
attributes:
|
|
13870
|
+
attributes: zf
|
|
13871
13871
|
}, r];
|
|
13872
13872
|
}
|
|
13873
13873
|
function dt(r) {
|
|
@@ -13914,14 +13914,14 @@ function Br(r, e, t) {
|
|
|
13914
13914
|
}
|
|
13915
13915
|
return Zt(o, a);
|
|
13916
13916
|
}
|
|
13917
|
-
function
|
|
13917
|
+
function wd(r) {
|
|
13918
13918
|
const { node: e } = r, t = [xr, Pi];
|
|
13919
|
-
if (e.marks?.some((a) => t.includes(a.type))) return
|
|
13920
|
-
if (e.marks?.some((a) => a.type === "link")) return
|
|
13919
|
+
if (e.marks?.some((a) => t.includes(a.type))) return bd(r);
|
|
13920
|
+
if (e.marks?.some((a) => a.type === "link")) return xd(r);
|
|
13921
13921
|
const { text: s, marks: o = [] } = e;
|
|
13922
13922
|
return Br(s, o, r);
|
|
13923
13923
|
}
|
|
13924
|
-
function
|
|
13924
|
+
function yd(r) {
|
|
13925
13925
|
const e = r.find((t) => t.type === Oi);
|
|
13926
13926
|
if (e)
|
|
13927
13927
|
return {
|
|
@@ -13936,8 +13936,8 @@ function bd(r) {
|
|
|
13936
13936
|
elements: e.attrs.before.map((n) => kr([n])).filter((n) => n !== void 0)
|
|
13937
13937
|
};
|
|
13938
13938
|
}
|
|
13939
|
-
function
|
|
13940
|
-
const { node: e } = r, t = e.marks, n = [xr, Pi, Oi], i = t.find((c) => n.includes(c.type)), s = i.type === xr, o =
|
|
13939
|
+
function bd(r) {
|
|
13940
|
+
const { node: e } = r, t = e.marks, n = [xr, Pi, Oi], i = t.find((c) => n.includes(c.type)), s = i.type === xr, o = yd(t);
|
|
13941
13941
|
e.marks = t.filter((c) => !n.includes(c.type)), o && e.marks.push(o);
|
|
13942
13942
|
const a = qt({ ...r, node: e });
|
|
13943
13943
|
if (!s) {
|
|
@@ -13958,12 +13958,12 @@ function xd(r) {
|
|
|
13958
13958
|
}
|
|
13959
13959
|
function Zt(r, e) {
|
|
13960
13960
|
let t = [];
|
|
13961
|
-
return Array.isArray(r) ? t = r : t = [r], e && e.length && t.unshift(
|
|
13961
|
+
return Array.isArray(r) ? t = r : t = [r], e && e.length && t.unshift(ou(e)), {
|
|
13962
13962
|
name: "w:r",
|
|
13963
13963
|
elements: t
|
|
13964
13964
|
};
|
|
13965
13965
|
}
|
|
13966
|
-
function
|
|
13966
|
+
function ou(r = []) {
|
|
13967
13967
|
return {
|
|
13968
13968
|
name: "w:rPr",
|
|
13969
13969
|
elements: r.filter((e) => !!Object.keys(e).length)
|
|
@@ -13975,10 +13975,10 @@ function kr(r = []) {
|
|
|
13975
13975
|
return Bo(i);
|
|
13976
13976
|
}) : Bo(e));
|
|
13977
13977
|
}
|
|
13978
|
-
function
|
|
13978
|
+
function xd(r) {
|
|
13979
13979
|
const { node: e } = r, t = e.marks.find((a) => a.type === "link"), n = t.attrs.href;
|
|
13980
13980
|
let i = t.attrs.rId;
|
|
13981
|
-
i || (i =
|
|
13981
|
+
i || (i = au(r, n)), e.marks = e.marks.filter((a) => a.type !== "link");
|
|
13982
13982
|
const s = qt({ ...r, node: e });
|
|
13983
13983
|
return {
|
|
13984
13984
|
name: "w:hyperlink",
|
|
@@ -13989,7 +13989,7 @@ function Ad(r) {
|
|
|
13989
13989
|
elements: [s]
|
|
13990
13990
|
};
|
|
13991
13991
|
}
|
|
13992
|
-
function
|
|
13992
|
+
function au(r, e) {
|
|
13993
13993
|
const t = "rId" + Ri();
|
|
13994
13994
|
return (!r.relationships || !Array.isArray(r.relationships)) && (r.relationships = []), r.relationships.push({
|
|
13995
13995
|
type: "element",
|
|
@@ -14015,9 +14015,9 @@ function To(r, e) {
|
|
|
14015
14015
|
return r.relationships.push(n), t;
|
|
14016
14016
|
}
|
|
14017
14017
|
function Fo(r) {
|
|
14018
|
-
const { type: e } = r.node, t =
|
|
14018
|
+
const { type: e } = r.node, t = Ed(r), n = [];
|
|
14019
14019
|
return t.forEach((i) => {
|
|
14020
|
-
const { level: s, listType: o, pPrs: a, content: u, attrs: c = {} } = i, g = (i.attrs.numId || i.listId) ??
|
|
14020
|
+
const { level: s, listType: o, pPrs: a, content: u, attrs: c = {} } = i, g = (i.attrs.numId || i.listId) ?? Ad(r, o), E = vd(s, g, a);
|
|
14021
14021
|
u.forEach((D, v) => {
|
|
14022
14022
|
const F = Object.assign({}, D);
|
|
14023
14023
|
F.attrs = {
|
|
@@ -14053,8 +14053,8 @@ function Fo(r) {
|
|
|
14053
14053
|
});
|
|
14054
14054
|
}), n;
|
|
14055
14055
|
}
|
|
14056
|
-
function
|
|
14057
|
-
const t =
|
|
14056
|
+
function Ad(r, e) {
|
|
14057
|
+
const t = Dd(r.converter?.numbering?.definitions), n = e === "bullet" ? td : ed, i = t, s = n.attributes["w:abstractNumId"], o = {
|
|
14058
14058
|
type: "element",
|
|
14059
14059
|
name: "w:num",
|
|
14060
14060
|
attributes: {
|
|
@@ -14067,8 +14067,8 @@ function Dd(r, e) {
|
|
|
14067
14067
|
};
|
|
14068
14068
|
return r.converter.numbering.definitions[i] = o, i;
|
|
14069
14069
|
}
|
|
14070
|
-
const
|
|
14071
|
-
function
|
|
14070
|
+
const Dd = (r) => !r || !Object.keys(r).length ? 0 : Math.max(...Object.keys(r).map((t) => parseInt(t, 10))) + 1;
|
|
14071
|
+
function vd(r, e, t = []) {
|
|
14072
14072
|
return {
|
|
14073
14073
|
name: "w:pPr",
|
|
14074
14074
|
type: "element",
|
|
@@ -14093,7 +14093,7 @@ function Ed(r, e, t = []) {
|
|
|
14093
14093
|
]
|
|
14094
14094
|
};
|
|
14095
14095
|
}
|
|
14096
|
-
function
|
|
14096
|
+
function Ed({ node: r }) {
|
|
14097
14097
|
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 = [];
|
|
14098
14098
|
function c(l, h = 0) {
|
|
14099
14099
|
!l || !l.length || l.forEach((g) => {
|
|
@@ -14114,22 +14114,22 @@ function Cd({ node: r }) {
|
|
|
14114
14114
|
}
|
|
14115
14115
|
return c(e), u;
|
|
14116
14116
|
}
|
|
14117
|
-
function
|
|
14117
|
+
function Cd(r) {
|
|
14118
14118
|
const e = {}, { lineBreakType: t } = r.node?.attrs || {};
|
|
14119
14119
|
return t && (e["w:type"] = t), {
|
|
14120
14120
|
name: "w:br",
|
|
14121
14121
|
attributes: e
|
|
14122
14122
|
};
|
|
14123
14123
|
}
|
|
14124
|
-
function
|
|
14125
|
-
r.node =
|
|
14126
|
-
const e = dt(r), t =
|
|
14124
|
+
function Sd(r) {
|
|
14125
|
+
r.node = Td(r.node, r);
|
|
14126
|
+
const e = dt(r), t = Bd(r.node), n = Nd(r.node, r);
|
|
14127
14127
|
return e.unshift(t), e.unshift(n), {
|
|
14128
14128
|
name: "w:tbl",
|
|
14129
14129
|
elements: e
|
|
14130
14130
|
};
|
|
14131
14131
|
}
|
|
14132
|
-
function
|
|
14132
|
+
function Td(r, { editorSchema: e }) {
|
|
14133
14133
|
const { content: t } = r;
|
|
14134
14134
|
for (let n = 0; n < t.length; n++) {
|
|
14135
14135
|
const i = t[n];
|
|
@@ -14165,13 +14165,13 @@ function Fd(r, { editorSchema: e }) {
|
|
|
14165
14165
|
}
|
|
14166
14166
|
return r;
|
|
14167
14167
|
}
|
|
14168
|
-
function
|
|
14168
|
+
function Fd(r) {
|
|
14169
14169
|
const { marks: e = [] } = r.node, t = kr(e);
|
|
14170
14170
|
return Zt({
|
|
14171
14171
|
name: "w:tab"
|
|
14172
14172
|
}, t);
|
|
14173
14173
|
}
|
|
14174
|
-
function
|
|
14174
|
+
function Bd(r) {
|
|
14175
14175
|
const e = [], { attrs: t } = r, { tableWidth: n, tableWidthType: i, tableStyleId: s, borders: o, tableIndent: a, tableLayout: u, tableCellSpacing: c } = t;
|
|
14176
14176
|
if (s) {
|
|
14177
14177
|
const l = {
|
|
@@ -14181,7 +14181,7 @@ function kd(r) {
|
|
|
14181
14181
|
e.push(l);
|
|
14182
14182
|
}
|
|
14183
14183
|
if (o) {
|
|
14184
|
-
const l =
|
|
14184
|
+
const l = kd(r);
|
|
14185
14185
|
e.push(l);
|
|
14186
14186
|
}
|
|
14187
14187
|
if (a) {
|
|
@@ -14216,7 +14216,7 @@ function kd(r) {
|
|
|
14216
14216
|
elements: e
|
|
14217
14217
|
};
|
|
14218
14218
|
}
|
|
14219
|
-
function
|
|
14219
|
+
function kd(r) {
|
|
14220
14220
|
const { borders: e } = r.attrs, t = [];
|
|
14221
14221
|
return e ? (["top", "bottom", "left", "right", "insideH", "insideV"].forEach((i) => {
|
|
14222
14222
|
const s = e[i];
|
|
@@ -14226,7 +14226,7 @@ function Nd(r) {
|
|
|
14226
14226
|
"w:val": "nil"
|
|
14227
14227
|
} : o = {
|
|
14228
14228
|
"w:val": "single",
|
|
14229
|
-
"w:sz":
|
|
14229
|
+
"w:sz": eu(s.size),
|
|
14230
14230
|
"w:space": s.space || 0,
|
|
14231
14231
|
"w:color": s?.color?.substring(1) || "000000"
|
|
14232
14232
|
};
|
|
@@ -14240,11 +14240,11 @@ function Nd(r) {
|
|
|
14240
14240
|
elements: t
|
|
14241
14241
|
}) : void 0;
|
|
14242
14242
|
}
|
|
14243
|
-
function
|
|
14243
|
+
function Nd(r, e) {
|
|
14244
14244
|
const { editorSchema: t } = e;
|
|
14245
14245
|
let n = [];
|
|
14246
14246
|
try {
|
|
14247
|
-
const s = t.nodeFromJSON(r), o = 25, { colgroupValues: a } =
|
|
14247
|
+
const s = t.nodeFromJSON(r), o = 25, { colgroupValues: a } = md(
|
|
14248
14248
|
s,
|
|
14249
14249
|
o
|
|
14250
14250
|
);
|
|
@@ -14263,14 +14263,14 @@ function Id(r, e) {
|
|
|
14263
14263
|
elements: i
|
|
14264
14264
|
};
|
|
14265
14265
|
}
|
|
14266
|
-
function
|
|
14267
|
-
const e = dt(r), t =
|
|
14266
|
+
function Id(r) {
|
|
14267
|
+
const e = dt(r), t = Rd(r.node);
|
|
14268
14268
|
return t.elements.length && e.unshift(t), {
|
|
14269
14269
|
name: "w:tr",
|
|
14270
14270
|
elements: e
|
|
14271
14271
|
};
|
|
14272
14272
|
}
|
|
14273
|
-
function
|
|
14273
|
+
function Rd(r) {
|
|
14274
14274
|
const { attrs: e } = r, t = [], { rowHeight: n, rowHeightType: i } = e;
|
|
14275
14275
|
if (n) {
|
|
14276
14276
|
const s = { "w:val": Te(n) };
|
|
@@ -14286,17 +14286,17 @@ function Pd(r) {
|
|
|
14286
14286
|
elements: t
|
|
14287
14287
|
};
|
|
14288
14288
|
}
|
|
14289
|
-
function
|
|
14289
|
+
function Pd(r) {
|
|
14290
14290
|
const e = dt({
|
|
14291
14291
|
...r,
|
|
14292
14292
|
tableCell: r.node
|
|
14293
|
-
}), t =
|
|
14293
|
+
}), t = Od(r.node);
|
|
14294
14294
|
return e.unshift(t), {
|
|
14295
14295
|
name: "w:tc",
|
|
14296
14296
|
elements: e
|
|
14297
14297
|
};
|
|
14298
14298
|
}
|
|
14299
|
-
function
|
|
14299
|
+
function Od(r) {
|
|
14300
14300
|
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 = {
|
|
14301
14301
|
name: "w:tcW",
|
|
14302
14302
|
attributes: { "w:w": u === "px" ? Te(c) : It(c), "w:type": i }
|
|
@@ -14320,7 +14320,7 @@ function Ld(r) {
|
|
|
14320
14320
|
if (g) {
|
|
14321
14321
|
const v = {
|
|
14322
14322
|
name: "w:tcMar",
|
|
14323
|
-
elements:
|
|
14323
|
+
elements: Ld(g)
|
|
14324
14324
|
};
|
|
14325
14325
|
e.push(v);
|
|
14326
14326
|
}
|
|
@@ -14355,7 +14355,7 @@ function Ld(r) {
|
|
|
14355
14355
|
attributes: {
|
|
14356
14356
|
"w:val": "single",
|
|
14357
14357
|
"w:color": w.color ? w.color.substring(1) : "auto",
|
|
14358
|
-
"w:sz":
|
|
14358
|
+
"w:sz": eu(w.size),
|
|
14359
14359
|
"w:space": w.space || 0
|
|
14360
14360
|
}
|
|
14361
14361
|
} : {
|
|
@@ -14372,11 +14372,11 @@ function Ld(r) {
|
|
|
14372
14372
|
elements: e
|
|
14373
14373
|
};
|
|
14374
14374
|
}
|
|
14375
|
-
function
|
|
14375
|
+
function Ld(r) {
|
|
14376
14376
|
const e = [], { top: t, right: n, bottom: i, left: s } = r;
|
|
14377
14377
|
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;
|
|
14378
14378
|
}
|
|
14379
|
-
function
|
|
14379
|
+
function _d(r) {
|
|
14380
14380
|
const e = {
|
|
14381
14381
|
name: "w:bookmarkStart",
|
|
14382
14382
|
attributes: {
|
|
@@ -14415,7 +14415,7 @@ function Bo(r) {
|
|
|
14415
14415
|
break;
|
|
14416
14416
|
case "color":
|
|
14417
14417
|
let s = n.color.replace(/^#/, "").replace(/;$/, "");
|
|
14418
|
-
s.startsWith("rgb") && (s =
|
|
14418
|
+
s.startsWith("rgb") && (s = Hf(s)), t.attributes["w:val"] = s;
|
|
14419
14419
|
break;
|
|
14420
14420
|
case "textAlign":
|
|
14421
14421
|
t.attributes["w:val"] = n.textAlign;
|
|
@@ -14432,7 +14432,7 @@ function Bo(r) {
|
|
|
14432
14432
|
}
|
|
14433
14433
|
return t;
|
|
14434
14434
|
}
|
|
14435
|
-
function
|
|
14435
|
+
function qd(r) {
|
|
14436
14436
|
if (!r) return {};
|
|
14437
14437
|
const e = r.split(";")[0].split("/")[1];
|
|
14438
14438
|
if (!r || e !== "png")
|
|
@@ -14446,30 +14446,30 @@ function Md(r) {
|
|
|
14446
14446
|
originalHeight: i.getInt32(20)
|
|
14447
14447
|
};
|
|
14448
14448
|
}
|
|
14449
|
-
function
|
|
14449
|
+
function Md(r, e, t, n) {
|
|
14450
14450
|
let i = r, s = e, o = Math.min(t / r, n / e);
|
|
14451
14451
|
return i = Math.round(i * o), s = Math.round(s * o), { scaledWidth: i, scaledHeight: s };
|
|
14452
14452
|
}
|
|
14453
|
-
function
|
|
14453
|
+
function uu(r, e) {
|
|
14454
14454
|
const {
|
|
14455
14455
|
node: { attrs: t = {}, marks: n = [] },
|
|
14456
14456
|
tableCell: i
|
|
14457
14457
|
} = r;
|
|
14458
14458
|
let s = t.rId;
|
|
14459
|
-
const o = t.src || t.imageSrc, { originalWidth: a, originalHeight: u } =
|
|
14459
|
+
const o = t.src || t.imageSrc, { originalWidth: a, originalHeight: u } = qd(o);
|
|
14460
14460
|
let c = t.size ? {
|
|
14461
14461
|
w: mt(t.size.width),
|
|
14462
14462
|
h: mt(t.size.height)
|
|
14463
14463
|
} : e;
|
|
14464
14464
|
if (a && u) {
|
|
14465
|
-
const F = Me(c.w), w = Me(c.h), { scaledWidth: B, scaledHeight: R } =
|
|
14465
|
+
const F = Me(c.w), w = Me(c.h), { scaledWidth: B, scaledHeight: R } = Md(a, u, F, w);
|
|
14466
14466
|
c = {
|
|
14467
14467
|
w: mt(B),
|
|
14468
14468
|
h: mt(R)
|
|
14469
14469
|
};
|
|
14470
14470
|
}
|
|
14471
14471
|
if (i) {
|
|
14472
|
-
const F = i.attrs.colwidth.reduce((k, q) => k + q, 0), w = i.attrs.cellMargins?.left || 8, B = i.attrs.cellMargins?.right || 8, R = mt(F - (w + B)), { width: A, height: N } =
|
|
14472
|
+
const F = i.attrs.colwidth.reduce((k, q) => k + q, 0), w = i.attrs.cellMargins?.left || 8, B = i.attrs.cellMargins?.right || 8, R = mt(F - (w + B)), { width: A, height: N } = Kd(c.w, c.h, R);
|
|
14473
14473
|
A && N && (c = { w: A, h: N });
|
|
14474
14474
|
}
|
|
14475
14475
|
if (r.node.type === "image" && !s) {
|
|
@@ -14478,7 +14478,7 @@ function lu(r, e) {
|
|
|
14478
14478
|
} else if (r.node.type === "fieldAnnotation" && !s) {
|
|
14479
14479
|
const F = o?.split(";")[0].split("/")[1];
|
|
14480
14480
|
if (!F)
|
|
14481
|
-
return
|
|
14481
|
+
return lu(r);
|
|
14482
14482
|
const w = Ri(4), B = t.fieldId.replace("-", "_"), R = `media/${B}_${w}.${F}`;
|
|
14483
14483
|
s = To(r, R), r.media[`${B}_${w}.${F}`] = o;
|
|
14484
14484
|
}
|
|
@@ -14704,27 +14704,27 @@ function lu(r, e) {
|
|
|
14704
14704
|
[]
|
|
14705
14705
|
);
|
|
14706
14706
|
}
|
|
14707
|
-
function
|
|
14707
|
+
function lu(r) {
|
|
14708
14708
|
const {
|
|
14709
14709
|
node: { attrs: e = {}, marks: t = [] }
|
|
14710
|
-
} = r, n =
|
|
14710
|
+
} = r, n = cu(e);
|
|
14711
14711
|
return Br(e.displayLabel, [...t, ...n], r);
|
|
14712
14712
|
}
|
|
14713
|
-
function
|
|
14713
|
+
function Ud(r) {
|
|
14714
14714
|
const {
|
|
14715
14715
|
node: { attrs: e = {}, marks: t = [] }
|
|
14716
|
-
} = r, n =
|
|
14716
|
+
} = r, n = Nc.decode(e.displayLabel);
|
|
14717
14717
|
return Br(n, t, r);
|
|
14718
14718
|
}
|
|
14719
|
-
function
|
|
14719
|
+
function jd(r) {
|
|
14720
14720
|
const {
|
|
14721
14721
|
node: { attrs: e = {}, marks: t = [] },
|
|
14722
14722
|
editorSchema: n
|
|
14723
|
-
} = r, s = new window.DOMParser().parseFromString(e.rawHtml || e.displayLabel, "text/html"), o =
|
|
14723
|
+
} = r, s = new window.DOMParser().parseFromString(e.rawHtml || e.displayLabel, "text/html"), o = cu(e), a = [...t, ...o];
|
|
14724
14724
|
let u = Et.create({
|
|
14725
14725
|
doc: yr.fromSchema(n).parse(s)
|
|
14726
14726
|
});
|
|
14727
|
-
a.length && (u =
|
|
14727
|
+
a.length && (u = Xd(u, a));
|
|
14728
14728
|
const c = u.doc.toJSON();
|
|
14729
14729
|
return {
|
|
14730
14730
|
name: "htmlAnnotation",
|
|
@@ -14735,12 +14735,12 @@ function Hd(r) {
|
|
|
14735
14735
|
};
|
|
14736
14736
|
}
|
|
14737
14737
|
function ko(r, e) {
|
|
14738
|
-
return
|
|
14738
|
+
return uu(r, e);
|
|
14739
14739
|
}
|
|
14740
|
-
function
|
|
14740
|
+
function Hd(r) {
|
|
14741
14741
|
const {
|
|
14742
14742
|
node: { attrs: e = {}, marks: t = [] }
|
|
14743
|
-
} = r, n =
|
|
14743
|
+
} = r, n = au(r, e.linkUrl), i = Br(e.linkUrl, t, r);
|
|
14744
14744
|
return {
|
|
14745
14745
|
name: "w:hyperlink",
|
|
14746
14746
|
type: "element",
|
|
@@ -14751,7 +14751,7 @@ function Vd(r) {
|
|
|
14751
14751
|
elements: [i]
|
|
14752
14752
|
};
|
|
14753
14753
|
}
|
|
14754
|
-
function
|
|
14754
|
+
function Vd(r) {
|
|
14755
14755
|
const e = {
|
|
14756
14756
|
w: 4286250,
|
|
14757
14757
|
h: 4286250
|
|
@@ -14760,15 +14760,15 @@ function zd(r) {
|
|
|
14760
14760
|
h: 495e3
|
|
14761
14761
|
};
|
|
14762
14762
|
return {
|
|
14763
|
-
text:
|
|
14763
|
+
text: lu,
|
|
14764
14764
|
image: (i) => ko(i, e),
|
|
14765
14765
|
signature: (i) => ko(i, t),
|
|
14766
|
-
checkbox:
|
|
14767
|
-
html:
|
|
14768
|
-
link:
|
|
14766
|
+
checkbox: Ud,
|
|
14767
|
+
html: jd,
|
|
14768
|
+
link: Hd
|
|
14769
14769
|
}[r];
|
|
14770
14770
|
}
|
|
14771
|
-
const
|
|
14771
|
+
const cu = (r = {}) => {
|
|
14772
14772
|
const {
|
|
14773
14773
|
fontFamily: e,
|
|
14774
14774
|
fontSize: t,
|
|
@@ -14778,8 +14778,8 @@ const fu = (r = {}) => {
|
|
|
14778
14778
|
} = r, o = [];
|
|
14779
14779
|
return e && o.push({ type: "fontFamily", attrs: { fontFamily: e } }), t && o.push({ type: "fontSize", attrs: { fontSize: t } }), n && o.push({ type: "bold", attrs: {} }), i && o.push({ type: "underline", attrs: {} }), s && o.push({ type: "italic", attrs: {} }), o;
|
|
14780
14780
|
};
|
|
14781
|
-
function
|
|
14782
|
-
const { node: e, isFinalDoc: t } = r, { attrs: n = {} } = e, i =
|
|
14781
|
+
function zd(r) {
|
|
14782
|
+
const { node: e, isFinalDoc: t } = r, { attrs: n = {} } = e, i = Vd(n.type);
|
|
14783
14783
|
if (!i) return {};
|
|
14784
14784
|
let s, o;
|
|
14785
14785
|
if (t)
|
|
@@ -14845,7 +14845,7 @@ function Gd(r) {
|
|
|
14845
14845
|
]
|
|
14846
14846
|
};
|
|
14847
14847
|
}
|
|
14848
|
-
function
|
|
14848
|
+
function Gd(r) {
|
|
14849
14849
|
const { node: e = {} } = r, { attrs: t = {} } = e, { pageBreakSource: n } = t;
|
|
14850
14850
|
return n === "sectPr" ? null : {
|
|
14851
14851
|
name: "w:r",
|
|
@@ -14856,7 +14856,7 @@ function Wd(r) {
|
|
|
14856
14856
|
}]
|
|
14857
14857
|
};
|
|
14858
14858
|
}
|
|
14859
|
-
function
|
|
14859
|
+
function Wd(r) {
|
|
14860
14860
|
const { node: e } = r, t = dt(r), n = {
|
|
14861
14861
|
name: "v:shape",
|
|
14862
14862
|
attributes: {
|
|
@@ -14882,7 +14882,7 @@ function Jd(r) {
|
|
|
14882
14882
|
elements: [Zt(i)]
|
|
14883
14883
|
};
|
|
14884
14884
|
}
|
|
14885
|
-
function
|
|
14885
|
+
function Jd(r) {
|
|
14886
14886
|
const { node: e } = r, n = {
|
|
14887
14887
|
name: "w:txbxContent",
|
|
14888
14888
|
elements: dt(r)
|
|
@@ -14895,7 +14895,7 @@ function $d(r) {
|
|
|
14895
14895
|
elements: [n]
|
|
14896
14896
|
};
|
|
14897
14897
|
}
|
|
14898
|
-
function
|
|
14898
|
+
function $d(r) {
|
|
14899
14899
|
const { node: e } = r, { drawingContent: t } = e.attrs, n = {
|
|
14900
14900
|
name: "w:drawing",
|
|
14901
14901
|
elements: [
|
|
@@ -14914,17 +14914,17 @@ function Kd(r) {
|
|
|
14914
14914
|
})]
|
|
14915
14915
|
};
|
|
14916
14916
|
}
|
|
14917
|
-
var nt,
|
|
14917
|
+
var nt, fu, hi, gi;
|
|
14918
14918
|
class No {
|
|
14919
14919
|
constructor(e) {
|
|
14920
14920
|
Ir(this, nt);
|
|
14921
14921
|
this.converter = e;
|
|
14922
14922
|
}
|
|
14923
14923
|
schemaToXml(e, t = !1) {
|
|
14924
|
-
return Ke(this, nt,
|
|
14924
|
+
return Ke(this, nt, fu).call(this, e, t).join("");
|
|
14925
14925
|
}
|
|
14926
14926
|
}
|
|
14927
|
-
nt = new WeakSet(),
|
|
14927
|
+
nt = new WeakSet(), fu = function(e, t = falase) {
|
|
14928
14928
|
const n = JSON.parse(JSON.stringify(e)), i = this.converter.declaration.attributes, s = `<?xml${Object.entries(i).map(([u, c]) => ` ${u}="${c}"`).join("")}?>`, o = Ke(this, nt, gi).call(this, n, t);
|
|
14929
14929
|
return [s, ...o];
|
|
14930
14930
|
}, hi = function(e) {
|
|
@@ -14962,14 +14962,14 @@ nt = new WeakSet(), du = function(e, t = falase) {
|
|
|
14962
14962
|
}
|
|
14963
14963
|
return a || u.push(`</${n}>`), u;
|
|
14964
14964
|
};
|
|
14965
|
-
function
|
|
14965
|
+
function Kd(r, e, t) {
|
|
14966
14966
|
if (r > t) {
|
|
14967
14967
|
let n = t / r, i = Math.round(e * n);
|
|
14968
14968
|
return { width: t, height: i };
|
|
14969
14969
|
}
|
|
14970
14970
|
return { width: r, height: e };
|
|
14971
14971
|
}
|
|
14972
|
-
function
|
|
14972
|
+
function Xd(r, e) {
|
|
14973
14973
|
const { tr: t, doc: n, schema: i } = r, s = ["fontFamily", "fontSize"];
|
|
14974
14974
|
if (!e.some((u) => s.includes(u.type)))
|
|
14975
14975
|
return r;
|
|
@@ -14993,22 +14993,22 @@ function Yd(r, e) {
|
|
|
14993
14993
|
}));
|
|
14994
14994
|
}), r.apply(t);
|
|
14995
14995
|
}
|
|
14996
|
-
const
|
|
14996
|
+
const Yd = '<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>', Zd = (r) => JSON.parse(ba.xml2json(r, null, 2)), Qd = (r, e = Yd) => r["word/document.xml"] || Zd(e), em = (r) => {
|
|
14997
14997
|
const { nodes: e } = r;
|
|
14998
14998
|
if (e.length === 0)
|
|
14999
14999
|
return { nodes: [], consumed: 0 };
|
|
15000
15000
|
const t = e[0];
|
|
15001
15001
|
switch (t.name) {
|
|
15002
15002
|
case "w:tbl":
|
|
15003
|
-
return { nodes: [
|
|
15003
|
+
return { nodes: [rm(t, r)], consumed: 1 };
|
|
15004
15004
|
}
|
|
15005
15005
|
return { nodes: [], consumed: 0 };
|
|
15006
|
-
},
|
|
15006
|
+
}, tm = {
|
|
15007
15007
|
handlerName: "tableNodeHandler",
|
|
15008
|
-
handler:
|
|
15008
|
+
handler: em
|
|
15009
15009
|
};
|
|
15010
|
-
function
|
|
15011
|
-
const { docx: t, nodeListHandler: n } = e, i = r.elements.find((N) => N.name === "w:tblPr"), o = i.elements.find((N) => N.name === "w:tblBorders")?.elements || [], { borders: a, rowBorders: u } =
|
|
15010
|
+
function rm(r, e) {
|
|
15011
|
+
const { docx: t, nodeListHandler: n } = e, i = r.elements.find((N) => N.name === "w:tblPr"), o = i.elements.find((N) => N.name === "w:tblBorders")?.elements || [], { borders: a, rowBorders: u } = mu(o), c = i.elements.find((N) => N.name === "w:tblStyle"), h = { tableStyleId: c?.attributes["w:val"] }, g = i?.elements.find((N) => N.name === "w:tblInd");
|
|
15012
15012
|
if (g) {
|
|
15013
15013
|
const { "w:w": N, "w:type": k } = g.attributes;
|
|
15014
15014
|
h.tableIndent = { width: be(N), type: k };
|
|
@@ -15018,7 +15018,7 @@ function nm(r, e) {
|
|
|
15018
15018
|
const { "w:type": N } = E.attributes;
|
|
15019
15019
|
h.tableLayout = N;
|
|
15020
15020
|
}
|
|
15021
|
-
const D =
|
|
15021
|
+
const D = du(c, t), v = i.elements.find((N) => N.name === "w:tblW");
|
|
15022
15022
|
v && (h.tableWidth = {
|
|
15023
15023
|
width: be(v.attributes["w:w"]),
|
|
15024
15024
|
type: v.attributes["w:type"]
|
|
@@ -15032,7 +15032,7 @@ function nm(r, e) {
|
|
|
15032
15032
|
h.borders = B;
|
|
15033
15033
|
const A = [];
|
|
15034
15034
|
return w.forEach((N) => {
|
|
15035
|
-
const k =
|
|
15035
|
+
const k = sm(N, r, R, c, e);
|
|
15036
15036
|
k.content?.length && A.push(k);
|
|
15037
15037
|
}), {
|
|
15038
15038
|
type: "table",
|
|
@@ -15040,15 +15040,15 @@ function nm(r, e) {
|
|
|
15040
15040
|
attrs: h
|
|
15041
15041
|
};
|
|
15042
15042
|
}
|
|
15043
|
-
function
|
|
15044
|
-
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 =
|
|
15043
|
+
function nm(r, e, t, n, i = null, s, o, a) {
|
|
15044
|
+
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 = im(h, n), E = pu(t), D = l?.elements?.find((se) => se.name === "w:tcW");
|
|
15045
15045
|
let v = D ? be(D.attributes["w:w"]) : null;
|
|
15046
15046
|
const F = D?.attributes["w:type"];
|
|
15047
15047
|
!v && i && (v = i);
|
|
15048
15048
|
const w = Io(r), { attributes: B } = w || {}, A = {
|
|
15049
15049
|
color: l?.elements?.find((se) => se.name === "w:shd")?.attributes["w:fill"]
|
|
15050
|
-
}, k = l?.elements?.find((se) => se.name === "w:gridSpan")?.attributes["w:val"], q = l?.elements?.find((se) => se.name === "w:tcMar"), C = l?.elements?.find((se) => se.name === "w:vAlign")?.attributes["w:val"] || "top", J = {}, oe =
|
|
15051
|
-
J.cellMargins =
|
|
15050
|
+
}, k = l?.elements?.find((se) => se.name === "w:gridSpan")?.attributes["w:val"], q = l?.elements?.find((se) => se.name === "w:tcMar"), C = l?.elements?.find((se) => se.name === "w:vAlign")?.attributes["w:val"] || "top", J = {}, oe = du(s, u) || {};
|
|
15051
|
+
J.cellMargins = om(q, oe);
|
|
15052
15052
|
const { fontSize: Z, fonts: fe = {} } = oe, de = fe.ascii;
|
|
15053
15053
|
if (v) {
|
|
15054
15054
|
J.colwidth = [v], J.widthUnit = "px";
|
|
@@ -15087,14 +15087,14 @@ const Io = (r) => r.elements.find((n) => n.name === "w:tcPr")?.elements?.find((n
|
|
|
15087
15087
|
const i = {}, s = n["w:color"];
|
|
15088
15088
|
s && (i.color = s === "auto" ? "#000000" : `#${s}`);
|
|
15089
15089
|
const o = n["w:sz"];
|
|
15090
|
-
return o && (i.size =
|
|
15090
|
+
return o && (i.size = Qa(o)), i;
|
|
15091
15091
|
}
|
|
15092
15092
|
if (n && n["w:val"] === "nil") {
|
|
15093
15093
|
const i = Object.assign({}, t[e] || {});
|
|
15094
15094
|
return Object.keys(i) ? (i.val = "none", i) : null;
|
|
15095
15095
|
}
|
|
15096
15096
|
return null;
|
|
15097
|
-
},
|
|
15097
|
+
}, im = (r, e) => {
|
|
15098
15098
|
if (!r) return null;
|
|
15099
15099
|
const t = {}, n = or(r, "bottom", e);
|
|
15100
15100
|
n && (t.bottom = n);
|
|
@@ -15105,7 +15105,7 @@ const Io = (r) => r.elements.find((n) => n.name === "w:tcPr")?.elements?.find((n
|
|
|
15105
15105
|
const o = or(r, "right", e);
|
|
15106
15106
|
return o && (t.right = o), t;
|
|
15107
15107
|
};
|
|
15108
|
-
function
|
|
15108
|
+
function du(r, e, t) {
|
|
15109
15109
|
if (!r) return null;
|
|
15110
15110
|
const n = {}, { attributes: i = {} } = r, s = i["w:val"];
|
|
15111
15111
|
if (!s) return null;
|
|
@@ -15132,12 +15132,12 @@ function mu(r, e, t) {
|
|
|
15132
15132
|
n.fonts = { ascii: w, hAnsi: B, cs: R };
|
|
15133
15133
|
}
|
|
15134
15134
|
const F = E.elements.find((w) => w.name === "w:sz");
|
|
15135
|
-
F?.attributes && (n.fontSize =
|
|
15135
|
+
F?.attributes && (n.fontSize = Lf(F.attributes["w:val"]) + "pt");
|
|
15136
15136
|
}
|
|
15137
15137
|
const D = c.elements.find((v) => v.name === "w:tblPr");
|
|
15138
15138
|
if (D && D.elements) {
|
|
15139
15139
|
h && h.elements && D.elements.push(...h.elements);
|
|
15140
|
-
const v = D?.elements?.find((A) => A.name === "w:tblBorders"), { elements: F = [] } = v || {}, { borders: w, rowBorders: B } =
|
|
15140
|
+
const v = D?.elements?.find((A) => A.name === "w:tblBorders"), { elements: F = [] } = v || {}, { borders: w, rowBorders: B } = mu(F);
|
|
15141
15141
|
w && (n.borders = w), B && (n.rowBorders = B);
|
|
15142
15142
|
const R = D?.elements.find((A) => A.name === "w:tblCellMar");
|
|
15143
15143
|
if (R) {
|
|
@@ -15152,32 +15152,32 @@ function mu(r, e, t) {
|
|
|
15152
15152
|
}
|
|
15153
15153
|
return n;
|
|
15154
15154
|
}
|
|
15155
|
-
function
|
|
15155
|
+
function mu(r) {
|
|
15156
15156
|
const e = {}, t = {};
|
|
15157
15157
|
return r.forEach((n) => {
|
|
15158
15158
|
const { name: i } = n, s = i.split("w:")[1], { attributes: o } = n, a = {}, u = o["w:color"], c = o["w:sz"];
|
|
15159
|
-
u && u !== "auto" && (a.color = u.startsWith("#") ? u : `#${u}`), c && c !== "auto" && (a.size =
|
|
15159
|
+
u && u !== "auto" && (a.color = u.startsWith("#") ? u : `#${u}`), c && c !== "auto" && (a.size = Qa(c)), ["insideH", "insideV"].includes(s) && (t[s] = a), e[s] = a;
|
|
15160
15160
|
}), {
|
|
15161
15161
|
borders: e,
|
|
15162
15162
|
rowBorders: t
|
|
15163
15163
|
};
|
|
15164
15164
|
}
|
|
15165
|
-
function
|
|
15165
|
+
function sm(r, e, t, n, i) {
|
|
15166
15166
|
const s = {}, a = r.elements.find((D) => D.name === "w:trPr")?.elements?.find((D) => D.name === "w:trHeight"), u = a?.attributes["w:val"];
|
|
15167
15167
|
a?.attributes["w:hRule"];
|
|
15168
15168
|
const c = {};
|
|
15169
15169
|
t?.insideH && (c.bottom = t.insideH), t?.insideV && (c.right = t.insideV), s.borders = c, u && (s.rowHeight = be(u));
|
|
15170
|
-
const l =
|
|
15170
|
+
const l = pu(e), h = r.elements.filter((D) => D.name === "w:tc");
|
|
15171
15171
|
return {
|
|
15172
15172
|
type: "tableRow",
|
|
15173
15173
|
content: h?.map((D, v) => {
|
|
15174
15174
|
const F = h.length > 1 ? l[v] : null;
|
|
15175
|
-
return
|
|
15175
|
+
return nm(D, r, e, c, F, n, i, v);
|
|
15176
15176
|
}) || [],
|
|
15177
15177
|
attrs: s
|
|
15178
15178
|
};
|
|
15179
15179
|
}
|
|
15180
|
-
const
|
|
15180
|
+
const om = (r, e) => {
|
|
15181
15181
|
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, {
|
|
15182
15182
|
marginLeft: h,
|
|
15183
15183
|
marginRight: g,
|
|
@@ -15190,7 +15190,7 @@ const am = (r, e) => {
|
|
|
15190
15190
|
top: be(u ?? E),
|
|
15191
15191
|
bottom: be(c ?? D)
|
|
15192
15192
|
};
|
|
15193
|
-
},
|
|
15193
|
+
}, pu = (r) => r.elements.find((t) => t.name === "w:tblGrid")?.elements?.flatMap((t) => t.name !== "w:gridCol" ? [] : be(t.attributes["w:w"])) || [], am = (r) => {
|
|
15194
15194
|
const { nodes: e, filename: t } = r, n = ["w:drawing", "w:p"];
|
|
15195
15195
|
if (e.length === 0 || !n.includes(e[0].name))
|
|
15196
15196
|
return { nodes: [], consumed: 0 };
|
|
@@ -15214,7 +15214,7 @@ function Ro(r, e, t) {
|
|
|
15214
15214
|
height: Me(o.attributes?.cy)
|
|
15215
15215
|
}, c = r.elements.find((_) => _.name === "a:graphic").elements.find((_) => _.name === "a:graphicData"), { uri: l } = c?.attributes;
|
|
15216
15216
|
if (l && l === "http://schemas.microsoft.com/office/word/2010/wordprocessingShape")
|
|
15217
|
-
return
|
|
15217
|
+
return um(t, r, c);
|
|
15218
15218
|
const g = c.elements.find((_) => _.name === "pic:pic");
|
|
15219
15219
|
if (!g || !g.elements) return null;
|
|
15220
15220
|
const D = g.elements.find((_) => _.name === "pic:blipFill").elements.find((_) => _.name === "a:blip"), v = r.elements.find((_) => _.name === "wp:positionH"), F = v?.elements.find((_) => _.name === "wp:posOffset"), w = Me(F?.elements[0]?.text), B = v?.attributes.relativeFrom, R = v?.elements.find((_) => _.name === "wp:align")?.elements[0]?.text, A = r.elements.find((_) => _.name === "wp:positionV"), N = A?.elements.find((_) => _.name === "wp:posOffset"), k = Me(N?.elements[0]?.text), q = A?.attributes.relativeFrom, U = A?.elements.find((_) => _.name === "wp:align")?.elements[0]?.text, C = r.elements.find((_) => _.name === "wp:simplePos"), J = r.elements.find((_) => _.name === "wp:wrapSquare"), oe = r.elements.find((_) => _.name === "wp:wrapTopAndBottom"), Z = r.elements.find((_) => _.name === "wp:docPr");
|
|
@@ -15265,12 +15265,12 @@ function Ro(r, e, t) {
|
|
|
15265
15265
|
}
|
|
15266
15266
|
};
|
|
15267
15267
|
}
|
|
15268
|
-
const
|
|
15268
|
+
const um = (r, e, t) => {
|
|
15269
15269
|
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");
|
|
15270
15270
|
e.elements.find((l) => l.name === "wp:docPr");
|
|
15271
15271
|
const o = n.elements.find((l) => l.name === "wps:spPr"), a = o?.elements.find((l) => l.name === "a:prstGeom");
|
|
15272
15272
|
if (a && a.attributes.prst === "rect")
|
|
15273
|
-
return
|
|
15273
|
+
return lm(r, o);
|
|
15274
15274
|
if (!s)
|
|
15275
15275
|
return null;
|
|
15276
15276
|
const { nodeListHandler: u } = r;
|
|
@@ -15279,7 +15279,7 @@ const lm = (r, e, t) => {
|
|
|
15279
15279
|
node: s.elements[0],
|
|
15280
15280
|
nodes: s.elements
|
|
15281
15281
|
})[0];
|
|
15282
|
-
},
|
|
15282
|
+
}, lm = (r, e) => {
|
|
15283
15283
|
const t = {}, [n] = r.nodes;
|
|
15284
15284
|
n?.name === "w:drawing" && (t.drawingContent = n);
|
|
15285
15285
|
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");
|
|
@@ -15296,9 +15296,9 @@ const lm = (r, e, t) => {
|
|
|
15296
15296
|
type: "contentBlock",
|
|
15297
15297
|
attrs: t
|
|
15298
15298
|
};
|
|
15299
|
-
},
|
|
15299
|
+
}, cm = {
|
|
15300
15300
|
handlerName: "drawingNodeHandler",
|
|
15301
|
-
handler:
|
|
15301
|
+
handler: am
|
|
15302
15302
|
};
|
|
15303
15303
|
function Rt(r, e = [], t = null) {
|
|
15304
15304
|
const n = [], i = /* @__PURE__ */ new Set();
|
|
@@ -15323,7 +15323,7 @@ function Rt(r, e = [], t = null) {
|
|
|
15323
15323
|
const { attributes: u = {} } = s, c = { type: a.type };
|
|
15324
15324
|
if (!(u["w:val"] == "0" || u["w:val"] === "none")) {
|
|
15325
15325
|
if (a.mark && (c.type = a.mark), Object.keys(u).length) {
|
|
15326
|
-
const l =
|
|
15326
|
+
const l = dm(a.type, u, t);
|
|
15327
15327
|
if (l == null) return;
|
|
15328
15328
|
c.attrs = {}, c.attrs[a.property] = l;
|
|
15329
15329
|
}
|
|
@@ -15332,7 +15332,7 @@ function Rt(r, e = [], t = null) {
|
|
|
15332
15332
|
});
|
|
15333
15333
|
}), wi(n);
|
|
15334
15334
|
}
|
|
15335
|
-
function
|
|
15335
|
+
function fm(r, e) {
|
|
15336
15336
|
const t = r.elements?.find((o) => o.name === "w:rPrChange");
|
|
15337
15337
|
if (!t)
|
|
15338
15338
|
return [];
|
|
@@ -15353,25 +15353,25 @@ function wi(r) {
|
|
|
15353
15353
|
});
|
|
15354
15354
|
}), [...t, { type: "textStyle", attrs: n }];
|
|
15355
15355
|
}
|
|
15356
|
-
function
|
|
15356
|
+
function dm(r, e, t) {
|
|
15357
15357
|
r === "tabs" && (r = "textIndent");
|
|
15358
15358
|
const n = {
|
|
15359
15359
|
color: () => `#${e["w:val"]}`,
|
|
15360
15360
|
fontSize: () => `${e["w:val"] / 2}pt`,
|
|
15361
|
-
textIndent: () =>
|
|
15362
|
-
fontFamily: () =>
|
|
15363
|
-
lineHeight: () =>
|
|
15361
|
+
textIndent: () => pm(e),
|
|
15362
|
+
fontFamily: () => mm(e, t),
|
|
15363
|
+
lineHeight: () => hm(e),
|
|
15364
15364
|
textAlign: () => e["w:val"],
|
|
15365
15365
|
link: () => e.href,
|
|
15366
15366
|
underline: () => e["w:val"],
|
|
15367
15367
|
bold: () => e?.["w:val"] || null,
|
|
15368
15368
|
italic: () => e?.["w:val"] || null,
|
|
15369
|
-
highlight: () =>
|
|
15369
|
+
highlight: () => gm(e)
|
|
15370
15370
|
};
|
|
15371
15371
|
if (r in n || console.debug("❗️❗️ No value mapper for:", r, "Attributes:", e), r in n)
|
|
15372
15372
|
return n[r], n[r]();
|
|
15373
15373
|
}
|
|
15374
|
-
function
|
|
15374
|
+
function mm(r, e) {
|
|
15375
15375
|
const t = r["w:ascii"], n = r["w:asciiTheme"];
|
|
15376
15376
|
if (!e || !n) return t;
|
|
15377
15377
|
const i = e["word/theme/theme1.xml"];
|
|
@@ -15379,21 +15379,21 @@ function pm(r, e) {
|
|
|
15379
15379
|
const { elements: s } = i, { elements: o } = s[0];
|
|
15380
15380
|
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;
|
|
15381
15381
|
}
|
|
15382
|
-
function
|
|
15382
|
+
function pm(r) {
|
|
15383
15383
|
let e = r["w:left"];
|
|
15384
15384
|
return e ? `${qe(e)}in` : null;
|
|
15385
15385
|
}
|
|
15386
|
-
function
|
|
15386
|
+
function hm(r) {
|
|
15387
15387
|
const e = r["w:line"], t = r["w:lineRule"];
|
|
15388
|
-
return !e || e === "0" ? null : t === "exact" ? `${
|
|
15388
|
+
return !e || e === "0" ? null : t === "exact" ? `${tu(e)}pt` : `${Ii(e)}`;
|
|
15389
15389
|
}
|
|
15390
|
-
function
|
|
15390
|
+
function gm(r) {
|
|
15391
15391
|
const e = r["w:fill"];
|
|
15392
|
-
return e && e !== "auto" ? `#${e}` :
|
|
15392
|
+
return e && e !== "auto" ? `#${e}` : Uf(r?.["w:val"]) ? `#${r["w:val"]}` : Mf(r?.["w:val"]) || null;
|
|
15393
15393
|
}
|
|
15394
15394
|
function bt(r, e) {
|
|
15395
|
-
const t = [], n = [], { attributes: i = {}, elements: s = [] } = r, { nodes: o, paragraphProperties: a = {}, runProperties: u = {} } =
|
|
15396
|
-
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(...
|
|
15395
|
+
const t = [], n = [], { attributes: i = {}, elements: s = [] } = r, { nodes: o, paragraphProperties: a = {}, runProperties: u = {} } = wm(s);
|
|
15396
|
+
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(...fm(u, t)), a && a.elements?.length && (i.paragraphProperties = a), t && r.name === "w:p" && t.forEach((l) => {
|
|
15397
15397
|
const h = Object.keys(l.attrs ?? {})[0];
|
|
15398
15398
|
if (h) {
|
|
15399
15399
|
const g = l.attrs[h];
|
|
@@ -15401,7 +15401,7 @@ function bt(r, e) {
|
|
|
15401
15401
|
}
|
|
15402
15402
|
}), { elements: o, attributes: i, marks: t, unknownMarks: n };
|
|
15403
15403
|
}
|
|
15404
|
-
function
|
|
15404
|
+
function wm(r) {
|
|
15405
15405
|
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");
|
|
15406
15406
|
return {
|
|
15407
15407
|
nodes: r.filter((s) => s.name !== "w:pPr" && s.name !== "w:rPr" && s.name !== "w:sectPr"),
|
|
@@ -15413,11 +15413,11 @@ function ym(r) {
|
|
|
15413
15413
|
function fr(r) {
|
|
15414
15414
|
return Ot.allowedElements[r.name || r.type];
|
|
15415
15415
|
}
|
|
15416
|
-
const
|
|
15417
|
-
function
|
|
15416
|
+
const ym = (r) => !!Ot.propertyTypes[r.name || r.type];
|
|
15417
|
+
function hu(r) {
|
|
15418
15418
|
return r.filter((n) => n.name === "w:r").some((n) => n.elements.some((i) => i.name === "w:t"));
|
|
15419
15419
|
}
|
|
15420
|
-
const
|
|
15420
|
+
const bm = (r) => {
|
|
15421
15421
|
const { nodes: e, nodeListHandler: t } = r;
|
|
15422
15422
|
if (e.length === 0 || !(e[0].name === "w:del" || e[0].name === "w:ins" || e[0].name === "w:sdt"))
|
|
15423
15423
|
return { nodes: [], consumed: 0 };
|
|
@@ -15440,10 +15440,10 @@ const xm = (r) => {
|
|
|
15440
15440
|
return u.forEach((h) => {
|
|
15441
15441
|
h.marks === void 0 && (h.marks = []), h.marks.push({ type: c, attrs: l });
|
|
15442
15442
|
}), { nodes: u, consumed: 1 };
|
|
15443
|
-
},
|
|
15443
|
+
}, xm = {
|
|
15444
15444
|
handlerName: "trackChangeNodeHandler",
|
|
15445
|
-
handler:
|
|
15446
|
-
},
|
|
15445
|
+
handler: bm
|
|
15446
|
+
}, Am = (r) => {
|
|
15447
15447
|
const { nodes: e, docx: t, nodeListHandler: n } = r;
|
|
15448
15448
|
if (e.length === 0 || e[0].name !== "w:hyperlink")
|
|
15449
15449
|
return { nodes: [], consumed: 0 };
|
|
@@ -15462,16 +15462,16 @@ const xm = (r) => {
|
|
|
15462
15462
|
}
|
|
15463
15463
|
}
|
|
15464
15464
|
return { nodes: n.handler({ ...r, nodes: D }), consumed: 1 };
|
|
15465
|
-
},
|
|
15465
|
+
}, Dm = {
|
|
15466
15466
|
handlerName: "hyperlinkNodeHandler",
|
|
15467
|
-
handler:
|
|
15468
|
-
},
|
|
15467
|
+
handler: Am
|
|
15468
|
+
}, vm = (r) => {
|
|
15469
15469
|
const { nodes: e, nodeListHandler: t, parentStyleId: n, docx: i } = r;
|
|
15470
15470
|
if (e.length === 0 || e[0].name !== "w:r")
|
|
15471
15471
|
return { nodes: [], consumed: 0 };
|
|
15472
15472
|
const s = e[0], o = { ...r, nodes: s.elements };
|
|
15473
15473
|
let a = t.handler(o)?.filter((l) => l) || [];
|
|
15474
|
-
const u = s.elements?.some((l) => l.name === "w:rPr"), c =
|
|
15474
|
+
const u = s.elements?.some((l) => l.name === "w:rPr"), c = Em(i, n);
|
|
15475
15475
|
if (u) {
|
|
15476
15476
|
const { marks: l = [], attributes: h = {} } = bt(s), g = l.find((v) => v.type === "textStyle"), E = g && Object.keys(g.attrs).length > 0;
|
|
15477
15477
|
c.marks && !E && l.push(...c.marks), s.marks && l.push(...s.marks);
|
|
@@ -15482,16 +15482,16 @@ const xm = (r) => {
|
|
|
15482
15482
|
});
|
|
15483
15483
|
} else c.marks && (a = a.map((l) => ({ ...l, marks: wi(c.marks) })));
|
|
15484
15484
|
return { nodes: a, consumed: 1 };
|
|
15485
|
-
},
|
|
15485
|
+
}, Em = (r, e) => {
|
|
15486
15486
|
const t = r?.["word/styles.xml"];
|
|
15487
15487
|
if (!t)
|
|
15488
15488
|
return {};
|
|
15489
15489
|
const i = t.elements[0].elements.filter((s) => s.name === "w:style").find((s) => s.attributes["w:styleId"] === e) || {};
|
|
15490
15490
|
return i ? bt(i) : {};
|
|
15491
|
-
},
|
|
15491
|
+
}, Cm = {
|
|
15492
15492
|
handlerName: "runNodeHandler",
|
|
15493
|
-
handler:
|
|
15494
|
-
},
|
|
15493
|
+
handler: vm
|
|
15494
|
+
}, Sm = (r) => {
|
|
15495
15495
|
const { nodes: e, insideTrackChange: t } = r;
|
|
15496
15496
|
if (e.length === 0 || !(e[0].name === "w:t" || t && e[0].name === "w:delText"))
|
|
15497
15497
|
return { nodes: [], consumed: 0 };
|
|
@@ -15512,52 +15512,52 @@ const xm = (r) => {
|
|
|
15512
15512
|
],
|
|
15513
15513
|
consumed: 1
|
|
15514
15514
|
};
|
|
15515
|
-
},
|
|
15515
|
+
}, Tm = {
|
|
15516
15516
|
handlerName: "textNodeHandler",
|
|
15517
|
-
handler:
|
|
15518
|
-
},
|
|
15517
|
+
handler: Sm
|
|
15518
|
+
}, gu = (r) => {
|
|
15519
15519
|
if (!r || !Array.isArray(r))
|
|
15520
15520
|
return r;
|
|
15521
15521
|
let e = [], t = null;
|
|
15522
15522
|
for (let n of r)
|
|
15523
|
-
n.type === "text" ? t &&
|
|
15523
|
+
n.type === "text" ? t && Fm(t, n) ? t = {
|
|
15524
15524
|
...t,
|
|
15525
15525
|
text: t.text += n.text
|
|
15526
15526
|
} : (t && e.push(t), t = { ...n }) : (t && (e.push(t), t = null), e.push(n));
|
|
15527
15527
|
return t && e.push(t), e;
|
|
15528
|
-
},
|
|
15528
|
+
}, Fm = (r, e) => {
|
|
15529
15529
|
if (!r || !e) return !1;
|
|
15530
15530
|
let t = r.marks ?? [], n = e.marks ?? [];
|
|
15531
15531
|
if (t.length !== n.length)
|
|
15532
15532
|
return !1;
|
|
15533
15533
|
for (let i = 0; i < t.length; i++)
|
|
15534
|
-
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 || !
|
|
15534
|
+
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 || !Bm(t[i].attrs, n[i].attrs))
|
|
15535
15535
|
return !1;
|
|
15536
15536
|
return !0;
|
|
15537
|
-
},
|
|
15537
|
+
}, Bm = (r = {}, e = {}) => If(r, e), km = (r) => {
|
|
15538
15538
|
const { nodes: e, lists: t, docx: n } = r;
|
|
15539
15539
|
if (e.length === 0 || e[0].name !== "w:p")
|
|
15540
15540
|
return { nodes: [], consumed: 0 };
|
|
15541
|
-
const i = He(e[0]), s =
|
|
15541
|
+
const i = He(e[0]), s = Du(i.elements);
|
|
15542
15542
|
i.elements = s;
|
|
15543
15543
|
const o = i.elements.find((a) => a.name === "w:pPr");
|
|
15544
15544
|
if (yi(i, n)) {
|
|
15545
15545
|
const a = He(e), u = [];
|
|
15546
15546
|
let c = a.shift();
|
|
15547
15547
|
for (; c && yi(c, n); )
|
|
15548
|
-
u.push(c), c = a.shift(), c?.elements && !
|
|
15548
|
+
u.push(c), c = a.shift(), c?.elements && !hu(c.elements) && (u.push(c), c = a.shift());
|
|
15549
15549
|
return {
|
|
15550
|
-
nodes: [
|
|
15550
|
+
nodes: [wu({ listItems: u, params: r, originalPpr: o })],
|
|
15551
15551
|
consumed: u.filter((h) => h.seen).length,
|
|
15552
15552
|
lists: t
|
|
15553
15553
|
};
|
|
15554
15554
|
} else
|
|
15555
15555
|
return { nodes: [], consumed: 0, lists: t };
|
|
15556
|
-
},
|
|
15556
|
+
}, Nm = {
|
|
15557
15557
|
handlerName: "listHandler",
|
|
15558
|
-
handler:
|
|
15558
|
+
handler: km
|
|
15559
15559
|
};
|
|
15560
|
-
function
|
|
15560
|
+
function wu({
|
|
15561
15561
|
listItems: r,
|
|
15562
15562
|
originalPpr: e,
|
|
15563
15563
|
params: t,
|
|
@@ -15575,11 +15575,11 @@ function yu({
|
|
|
15575
15575
|
if (!D)
|
|
15576
15576
|
return console.error("Standard node handler not found"), { nodes: [], consumed: 0 };
|
|
15577
15577
|
const w = r[0].elements.find((N) => N.name === "w:pPr")?.elements?.find((N) => N.name === "w:pStyle")?.attributes["w:val"], B = Nr({ node: r[0], styleId: w, docx: u });
|
|
15578
|
-
s = Pt(B), i = parseInt(B?.elements?.find((N) => N.name === "w:ilvl")?.attributes["w:val"]) || 0, i === void 0 && (i =
|
|
15578
|
+
s = Pt(B), i = parseInt(B?.elements?.find((N) => N.name === "w:ilvl")?.attributes["w:val"]) || 0, i === void 0 && (i = yu(w, u));
|
|
15579
15579
|
let R = 0;
|
|
15580
15580
|
for (let [N, k] of r.entries()) {
|
|
15581
15581
|
if (k.seen) continue;
|
|
15582
|
-
if (k.elements && !
|
|
15582
|
+
if (k.elements && !hu(k.elements)) {
|
|
15583
15583
|
const I = D({ ...t, nodes: [k] }).nodes[0];
|
|
15584
15584
|
I && h[h.length - 1]?.content.push(I), k.seen = !0;
|
|
15585
15585
|
continue;
|
|
@@ -15594,9 +15594,9 @@ function yu({
|
|
|
15594
15594
|
lvlText: re,
|
|
15595
15595
|
lvlJc: ie,
|
|
15596
15596
|
numId: L
|
|
15597
|
-
} =
|
|
15597
|
+
} = Om(k, n, u);
|
|
15598
15598
|
E = se;
|
|
15599
|
-
const V = parseInt(ne), _ = i === V && L === s, K =
|
|
15599
|
+
const V = parseInt(ne), _ = i === V && L === s, K = Pm({
|
|
15600
15600
|
firstListId: L,
|
|
15601
15601
|
secondListId: s,
|
|
15602
15602
|
level: V,
|
|
@@ -15619,7 +15619,7 @@ function yu({
|
|
|
15619
15619
|
rsidRDefault: q?.["w:rsidRDefault"] || null,
|
|
15620
15620
|
styleId: w
|
|
15621
15621
|
},
|
|
15622
|
-
content:
|
|
15622
|
+
content: gu(S.content)
|
|
15623
15623
|
}), I.push(S), R = n;
|
|
15624
15624
|
let b = [];
|
|
15625
15625
|
if (E !== "bullet" && (b = [...o, l[s][n]], l[s][i]++), !o.length && i > 0) {
|
|
@@ -15641,11 +15641,11 @@ function yu({
|
|
|
15641
15641
|
parentAttributes: k?.attributes || null
|
|
15642
15642
|
};
|
|
15643
15643
|
const X = e?.elements?.find((ue) => ue.name === "w:rPr");
|
|
15644
|
-
X && (m.attributes.originalInlineRunProps = X), m.numId = L, u && (m.spacing =
|
|
15644
|
+
X && (m.attributes.originalInlineRunProps = X), m.numId = L, u && (m.spacing = xu(k, u, w));
|
|
15645
15645
|
const te = Po(I, m, []);
|
|
15646
15646
|
h.push(te);
|
|
15647
15647
|
} else if (p) {
|
|
15648
|
-
const I = [...o, l[s][n]], S =
|
|
15648
|
+
const I = [...o, l[s][n]], S = wu({
|
|
15649
15649
|
listItems: r.slice(N),
|
|
15650
15650
|
originalPpr: e,
|
|
15651
15651
|
params: t,
|
|
@@ -15680,7 +15680,7 @@ function yu({
|
|
|
15680
15680
|
};
|
|
15681
15681
|
return a && (A.lastNestedListLevel = R), A;
|
|
15682
15682
|
}
|
|
15683
|
-
const
|
|
15683
|
+
const yu = (r, e) => {
|
|
15684
15684
|
const i = Li(r, e)?.elements?.find((s) => s.name === "w:pPr")?.elements?.find((s) => s.name === "w:outlineLvl");
|
|
15685
15685
|
try {
|
|
15686
15686
|
return parseInt(i?.attributes["w:val"]);
|
|
@@ -15720,7 +15720,7 @@ function Po(r, e, t) {
|
|
|
15720
15720
|
marks: t
|
|
15721
15721
|
};
|
|
15722
15722
|
}
|
|
15723
|
-
const
|
|
15723
|
+
const Im = [
|
|
15724
15724
|
"decimal",
|
|
15725
15725
|
// eg: 1, 2, 3, 4, 5, ...
|
|
15726
15726
|
"decimalZero",
|
|
@@ -15745,7 +15745,7 @@ const Rm = [
|
|
|
15745
15745
|
// eg: (0, 1, 2, ..., 9, 10, 11, 12, ..., 19, 1A, 1B, 1C, ..., 1Z, 20, 21, ..., 2Z)
|
|
15746
15746
|
"none"
|
|
15747
15747
|
// No bullet
|
|
15748
|
-
],
|
|
15748
|
+
], Rm = [
|
|
15749
15749
|
"bullet",
|
|
15750
15750
|
// A standard bullet point (•)
|
|
15751
15751
|
"square",
|
|
@@ -15754,7 +15754,7 @@ const Rm = [
|
|
|
15754
15754
|
// Circle bullets (◦)
|
|
15755
15755
|
"disc"
|
|
15756
15756
|
// Disc bullets (●)
|
|
15757
|
-
],
|
|
15757
|
+
], Pm = ({ firstListId: r, secondListId: e, level: t, pStyleId: n, docx: i }) => {
|
|
15758
15758
|
const { numFmt: s, lvlText: o, lvlJc: a } = Ar(r, t, n, i), {
|
|
15759
15759
|
numFmt: u,
|
|
15760
15760
|
lvlText: c,
|
|
@@ -15784,7 +15784,7 @@ const Rm = [
|
|
|
15784
15784
|
}
|
|
15785
15785
|
const a = o.elements, u = a.filter((k) => k.name === "w:abstractNum"), h = a.filter((k) => k.name === "w:num").find((k) => k.attributes["w:numId"] === r)?.elements[0].attributes["w:val"], g = u?.find(
|
|
15786
15786
|
(k) => k.attributes["w:abstractNumId"] === h
|
|
15787
|
-
), E =
|
|
15787
|
+
), E = Lm(g, e), v = g?.elements?.find((k) => k.name === "w:numStyleLink")?.attributes["w:val"];
|
|
15788
15788
|
if (v) {
|
|
15789
15789
|
const k = Oo(v, n);
|
|
15790
15790
|
return Ar(k.numId, e, null, n);
|
|
@@ -15792,11 +15792,11 @@ const Rm = [
|
|
|
15792
15792
|
const F = E?.elements?.find((k) => k.name === "w:start")?.attributes["w:val"], w = E?.elements?.find((k) => k.name === "w:numFmt")?.attributes["w:val"], B = E?.elements?.find((k) => k.name === "w:lvlText").attributes["w:val"], R = E?.elements?.find((k) => k.name === "w:lvlJc").attributes["w:val"], A = E?.elements?.find((k) => k.name === "w:pPr"), N = E?.elements?.find((k) => k.name === "w:rPr");
|
|
15793
15793
|
return { start: F, numFmt: w, lvlText: B, lvlJc: R, pPr: A, rPr: N };
|
|
15794
15794
|
};
|
|
15795
|
-
function
|
|
15795
|
+
function Om(r, e, t) {
|
|
15796
15796
|
if (!r) return;
|
|
15797
15797
|
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 });
|
|
15798
15798
|
if (!c) return {};
|
|
15799
|
-
const h = c?.elements.find((C) => C.name === "w:numId")?.attributes["w:val"], E = c?.elements.find((C) => C.name === "w:ilvl")?.attributes["w:val"] ||
|
|
15799
|
+
const h = c?.elements.find((C) => C.name === "w:numId")?.attributes["w:val"], E = c?.elements.find((C) => C.name === "w:ilvl")?.attributes["w:val"] || yu(u, t), v = s.find((C) => C.name === "w:pStyle")?.attributes["w:val"], {
|
|
15800
15800
|
start: F,
|
|
15801
15801
|
numFmt: w,
|
|
15802
15802
|
lvlText: B,
|
|
@@ -15805,17 +15805,17 @@ function Lm(r, e, t) {
|
|
|
15805
15805
|
rPr: N
|
|
15806
15806
|
} = Ar(h, e, v, t);
|
|
15807
15807
|
let k, q;
|
|
15808
|
-
A && (k =
|
|
15808
|
+
A && (k = _m(A)), N && (q = qm(N));
|
|
15809
15809
|
let U;
|
|
15810
|
-
if (
|
|
15811
|
-
else if (
|
|
15810
|
+
if (Rm.includes(w?.toLowerCase())) U = "bulletList";
|
|
15811
|
+
else if (Im.includes(w)) U = "orderedList";
|
|
15812
15812
|
else return {};
|
|
15813
15813
|
return { listType: U, listOrderingType: w, ilvl: E, numId: h, listrPrs: q, listpPrs: k, start: F, lvlText: B, lvlJc: R };
|
|
15814
15814
|
}
|
|
15815
|
-
function
|
|
15815
|
+
function Lm(r, e) {
|
|
15816
15816
|
return r?.elements?.find((t) => Number(t.attributes["w:ilvl"]) === e);
|
|
15817
15817
|
}
|
|
15818
|
-
function
|
|
15818
|
+
function _m(r) {
|
|
15819
15819
|
const { elements: e } = r, t = ["w:ind", "w:jc", "w:tabs"], n = {};
|
|
15820
15820
|
return e && e.forEach((i) => {
|
|
15821
15821
|
t.includes(i.name);
|
|
@@ -15825,7 +15825,7 @@ function qm(r) {
|
|
|
15825
15825
|
});
|
|
15826
15826
|
}), n;
|
|
15827
15827
|
}
|
|
15828
|
-
function
|
|
15828
|
+
function qm(r) {
|
|
15829
15829
|
const { elements: e } = r, t = [
|
|
15830
15830
|
"w:rFonts",
|
|
15831
15831
|
"w:b",
|
|
@@ -15856,12 +15856,12 @@ function Mm(r) {
|
|
|
15856
15856
|
});
|
|
15857
15857
|
}), n;
|
|
15858
15858
|
}
|
|
15859
|
-
const
|
|
15859
|
+
const bu = (r) => {
|
|
15860
15860
|
const { nodes: e, docx: t, nodeListHandler: n, filename: i } = r;
|
|
15861
15861
|
if (e.length === 0 || e[0].name !== "w:p")
|
|
15862
15862
|
return { nodes: [], consumed: 0 };
|
|
15863
15863
|
const s = He(e[0]);
|
|
15864
|
-
let o, a =
|
|
15864
|
+
let o, a = Du(s.elements);
|
|
15865
15865
|
if (s.elements = a, yi(s, t))
|
|
15866
15866
|
return { nodes: [], consumed: 0 };
|
|
15867
15867
|
const u = n.handlerEntities.find(
|
|
@@ -15882,7 +15882,7 @@ const xu = (r) => {
|
|
|
15882
15882
|
}
|
|
15883
15883
|
let v;
|
|
15884
15884
|
if (g && (v = g.attributes["w:val"], o.attrs.styleId = v), t) {
|
|
15885
|
-
const A =
|
|
15885
|
+
const A = Mm(s, t, v);
|
|
15886
15886
|
o.attrs.indent || (o.attrs.indent = {}), (A.left || A.left === 0) && (o.attrs.indent.left = A.left), (A.right || A.right === 0) && (o.attrs.indent.right = A.right), (A.firstLine || A.firstLine === 0) && (o.attrs.indent.firstLine = A.firstLine), (A.hanging || A.hanging === 0) && (o.attrs.indent.hanging = A.hanging), (A.textIndent || A.textIndent === 0) && (o.attrs.textIndent = `${A.textIndent}in`);
|
|
15887
15887
|
}
|
|
15888
15888
|
const F = h?.elements?.find((A) => A.name === "w:jc");
|
|
@@ -15892,7 +15892,7 @@ const xu = (r) => {
|
|
|
15892
15892
|
const B = h?.elements?.find((A) => A.name === "w:keepNext");
|
|
15893
15893
|
if (B && B.attributes && (o.attrs.keepNext = B.attributes["w:val"]), t) {
|
|
15894
15894
|
const A = s.attributes?.["w:rsidRDefault"];
|
|
15895
|
-
o.attrs.spacing =
|
|
15895
|
+
o.attrs.spacing = xu(s, t, v, o.attrs.marksAttrs), o.attrs.rsidRDefault = A;
|
|
15896
15896
|
}
|
|
15897
15897
|
D && D.attributes["w:dropCap"] && (o.attrs.dropcap = {
|
|
15898
15898
|
type: D.attributes["w:dropCap"],
|
|
@@ -15902,38 +15902,38 @@ const xu = (r) => {
|
|
|
15902
15902
|
vAnchor: D.attributes["w:vAnchor"]
|
|
15903
15903
|
}), o.attrs.filename = i, o && o.content && (o = {
|
|
15904
15904
|
...o,
|
|
15905
|
-
content:
|
|
15905
|
+
content: gu(o.content)
|
|
15906
15906
|
});
|
|
15907
15907
|
const R = h?.elements?.find((A) => A.name === "w:sectPr");
|
|
15908
15908
|
return R && (o.attrs.paragraphProperties || (o.attrs.paragraphProperties = {}), o.attrs.paragraphProperties.sectPr = R, o.attrs.pageBreakSource = "sectPr"), { nodes: o ? [o] : [], consumed: 1 };
|
|
15909
|
-
},
|
|
15909
|
+
}, Mm = (r, e, t = "") => {
|
|
15910
15910
|
const n = {
|
|
15911
15911
|
left: 0,
|
|
15912
15912
|
right: 0,
|
|
15913
15913
|
firstLine: 0,
|
|
15914
15914
|
hanging: 0,
|
|
15915
15915
|
textIndent: 0
|
|
15916
|
-
}, { indent: i = {} } =
|
|
15916
|
+
}, { indent: i = {} } = Au(e, t), a = r.elements?.find((E) => E.name === "w:pPr")?.elements?.find((E) => E.name === "w:ind")?.attributes || {}, u = a?.["w:left"] || i?.["w:left"], c = a?.["w:right"] || i?.["w:right"], l = a?.["w:firstLine"] || i?.["w:firstLine"], h = a?.["w:hanging"] || i?.["w:hanging"];
|
|
15917
15917
|
u && (n.left = be(u)), c && (n.right = be(c)), l && (n.firstLine = be(l)), h && (n.hanging = be(h));
|
|
15918
15918
|
const g = u - parseInt(h || 0) || 0;
|
|
15919
15919
|
return g && (n.textIndent = qe(g)), n;
|
|
15920
|
-
},
|
|
15920
|
+
}, xu = (r, e, t = "", n = []) => {
|
|
15921
15921
|
const i = {
|
|
15922
15922
|
lineSpaceAfter: 0,
|
|
15923
15923
|
lineSpaceBefore: 0,
|
|
15924
15924
|
line: 0,
|
|
15925
15925
|
lineRule: null
|
|
15926
|
-
}, { spacing: s = {} } =
|
|
15926
|
+
}, { spacing: s = {} } = Au(e, t);
|
|
15927
15927
|
let o, a, u, c;
|
|
15928
15928
|
const g = r.elements?.find((N) => N.name === "w:pPr")?.elements?.find((N) => N.name === "w:spacing")?.attributes || {}, D = n.find((N) => N.type === "textStyle")?.attrs?.fontSize, v = g?.["w:line"] || u || s?.["w:line"];
|
|
15929
15929
|
v && (i.line = Ii(v));
|
|
15930
15930
|
const F = g?.["w:lineRule"] || c || s?.["w:lineRule"];
|
|
15931
|
-
F && (i.lineRule = F), F === "exact" && v && (i.line = `${
|
|
15931
|
+
F && (i.lineRule = F), F === "exact" && v && (i.line = `${tu(v)}pt`);
|
|
15932
15932
|
const w = g?.["w:before"] || a || s?.["w:before"];
|
|
15933
15933
|
w && (i.lineSpaceBefore = be(w)), g?.["w:beforeAutospacing"] === "1" && D && (i.lineSpaceBefore += Math.round(parseInt(D) * 0.5 * 96 / 72));
|
|
15934
15934
|
const R = g?.["w:after"] || o || s?.["w:after"];
|
|
15935
15935
|
return R && (i.lineSpaceAfter = be(R)), g?.["w:afterAutospacing"] === "1" && D && (i.lineSpaceAfter += Math.round(parseInt(D) * 0.5 * 96 / 72)), i;
|
|
15936
|
-
},
|
|
15936
|
+
}, Au = (r, e = "") => {
|
|
15937
15937
|
const t = r["word/styles.xml"];
|
|
15938
15938
|
if (!t)
|
|
15939
15939
|
return {};
|
|
@@ -15949,11 +15949,11 @@ const xu = (r) => {
|
|
|
15949
15949
|
indent: N || R || A,
|
|
15950
15950
|
justify: B
|
|
15951
15951
|
};
|
|
15952
|
-
},
|
|
15952
|
+
}, Um = {
|
|
15953
15953
|
handlerName: "paragraphNodeHandler",
|
|
15954
|
-
handler:
|
|
15954
|
+
handler: bu
|
|
15955
15955
|
};
|
|
15956
|
-
function
|
|
15956
|
+
function jm(r, e) {
|
|
15957
15957
|
const t = { lineSpaceBefore: null, lineSpaceAfter: null };
|
|
15958
15958
|
if (!r) return t;
|
|
15959
15959
|
const n = e["word/styles.xml"];
|
|
@@ -15993,7 +15993,7 @@ function Hm(r, e) {
|
|
|
15993
15993
|
const { type: Y, attrs: ce } = ne;
|
|
15994
15994
|
if (Y === "textStyle") {
|
|
15995
15995
|
Object.entries(ce).forEach(([$, re]) => {
|
|
15996
|
-
se[
|
|
15996
|
+
se[Za($)] = re;
|
|
15997
15997
|
});
|
|
15998
15998
|
return;
|
|
15999
15999
|
}
|
|
@@ -16003,30 +16003,28 @@ function Hm(r, e) {
|
|
|
16003
16003
|
styles: se
|
|
16004
16004
|
};
|
|
16005
16005
|
}
|
|
16006
|
-
function
|
|
16007
|
-
|
|
16008
|
-
|
|
16009
|
-
|
|
16010
|
-
i.
|
|
16011
|
-
|
|
16012
|
-
|
|
16013
|
-
|
|
16014
|
-
|
|
16015
|
-
|
|
16016
|
-
|
|
16017
|
-
|
|
16018
|
-
|
|
16019
|
-
|
|
16020
|
-
|
|
16021
|
-
|
|
16022
|
-
|
|
16023
|
-
e.push(...a), t = [];
|
|
16024
|
-
}
|
|
16025
|
-
}
|
|
16006
|
+
function Du(r = []) {
|
|
16007
|
+
const e = [];
|
|
16008
|
+
let t = [], n = !1;
|
|
16009
|
+
for (const i of r) {
|
|
16010
|
+
const o = i.elements?.find((a) => a.name === "w:fldChar")?.attributes?.["w:fldCharType"];
|
|
16011
|
+
if (o === "begin") {
|
|
16012
|
+
t = [i], n = !0;
|
|
16013
|
+
continue;
|
|
16014
|
+
}
|
|
16015
|
+
if (o === "separate" && n) {
|
|
16016
|
+
t.push(i);
|
|
16017
|
+
continue;
|
|
16018
|
+
}
|
|
16019
|
+
if (o === "end" && n) {
|
|
16020
|
+
t.push(i), e.push(...Hm(t)), t = [], n = !1;
|
|
16021
|
+
continue;
|
|
16022
|
+
}
|
|
16026
16023
|
n ? t.push(i) : e.push(i);
|
|
16027
|
-
}
|
|
16024
|
+
}
|
|
16025
|
+
return t.length && e.push(...t), e;
|
|
16028
16026
|
}
|
|
16029
|
-
const
|
|
16027
|
+
const Hm = (r = []) => {
|
|
16030
16028
|
let e = [], t = !1, n = !1;
|
|
16031
16029
|
const i = r.findIndex(
|
|
16032
16030
|
(h) => h.elements?.some((g) => g.name === "w:fldChar" && g.attributes["w:fldCharType"] === "separate")
|
|
@@ -16070,14 +16068,14 @@ const Lo = (r = []) => {
|
|
|
16070
16068
|
const t = e[0], o = t.elements.find((l) => l.name === "w:sdtPr")?.elements.find((l) => l.name === "w:docPartObj")?.elements.find((l) => l.name === "w:docPartGallery")?.attributes["w:val"];
|
|
16071
16069
|
if (!o)
|
|
16072
16070
|
return { nodes: [], consumed: 0 };
|
|
16073
|
-
if (!
|
|
16071
|
+
if (!Lo[o])
|
|
16074
16072
|
return { nodes: [], consumed: 0 };
|
|
16075
|
-
const a = t?.elements.find((l) => l.name === "w:sdtContent"), u =
|
|
16073
|
+
const a = t?.elements.find((l) => l.name === "w:sdtContent"), u = Lo[o];
|
|
16076
16074
|
return {
|
|
16077
16075
|
nodes: u({ ...r, nodes: [a] }),
|
|
16078
16076
|
consumed: 1
|
|
16079
16077
|
};
|
|
16080
|
-
},
|
|
16078
|
+
}, Lo = {
|
|
16081
16079
|
"Table of Contents": Vm
|
|
16082
16080
|
}, Gm = (r) => {
|
|
16083
16081
|
const { nodes: e, docx: t, nodeListHandler: n, insideTrackChange: i } = r;
|
|
@@ -16143,7 +16141,7 @@ const Lo = (r = []) => {
|
|
|
16143
16141
|
const i = e[0], { name: s } = i, { attributes: o, elements: a, marks: u = [] } = bt(i);
|
|
16144
16142
|
if (s === "w:sdt")
|
|
16145
16143
|
return { nodes: [], consumed: 0 };
|
|
16146
|
-
if (
|
|
16144
|
+
if (ym(i))
|
|
16147
16145
|
return {
|
|
16148
16146
|
nodes: [{
|
|
16149
16147
|
type: fr(i),
|
|
@@ -16313,7 +16311,7 @@ function cp({
|
|
|
16313
16311
|
u && (i.style = u);
|
|
16314
16312
|
const c = t.elements?.find((w) => w.name === "v:textbox"), l = t.elements?.find((w) => w.name === "w10:wrap");
|
|
16315
16313
|
l?.attributes && (i.wrapAttributes = l.attributes), c?.attributes && (s.attributes = c.attributes);
|
|
16316
|
-
const D = (c?.elements?.find((w) => w.name === "w:txbxContent")?.elements || []).map((w) =>
|
|
16314
|
+
const D = (c?.elements?.find((w) => w.name === "w:txbxContent")?.elements || []).map((w) => bu({
|
|
16317
16315
|
nodes: [w],
|
|
16318
16316
|
docx: n.docx,
|
|
16319
16317
|
nodeListHandler: Jt()
|
|
@@ -16368,7 +16366,7 @@ function pp({ docx: r }) {
|
|
|
16368
16366
|
docx: r
|
|
16369
16367
|
}), { attrs: C } = U[0], J = C["w14:paraId"];
|
|
16370
16368
|
return {
|
|
16371
|
-
commentId: D ||
|
|
16369
|
+
commentId: D || xa(),
|
|
16372
16370
|
importedId: c,
|
|
16373
16371
|
creatorName: l,
|
|
16374
16372
|
creatorEmail: h,
|
|
@@ -16403,7 +16401,7 @@ const hp = ({ docx: r, comments: e }) => {
|
|
|
16403
16401
|
const { attributes: e } = r, t = e["w15:paraId"], n = e["w15:done"] === "1", i = e["w15:paraIdParent"];
|
|
16404
16402
|
return { paraId: t, isDone: n, paraIdParent: i };
|
|
16405
16403
|
}, wp = (r, e, t) => {
|
|
16406
|
-
const n = He(
|
|
16404
|
+
const n = He(Qd(r));
|
|
16407
16405
|
if (!n) return null;
|
|
16408
16406
|
if (e?.telemetry) {
|
|
16409
16407
|
const o = Object.keys(r).map((a) => {
|
|
@@ -16461,18 +16459,18 @@ const hp = ({ docx: r, comments: e }) => {
|
|
|
16461
16459
|
}, Jt = () => {
|
|
16462
16460
|
const r = [
|
|
16463
16461
|
rp,
|
|
16464
|
-
|
|
16462
|
+
Cm,
|
|
16465
16463
|
mp,
|
|
16466
|
-
|
|
16467
|
-
|
|
16468
|
-
|
|
16464
|
+
Um,
|
|
16465
|
+
Nm,
|
|
16466
|
+
Tm,
|
|
16469
16467
|
Zm,
|
|
16470
16468
|
Jm,
|
|
16471
16469
|
ep,
|
|
16472
|
-
|
|
16473
|
-
|
|
16474
|
-
|
|
16475
|
-
|
|
16470
|
+
Dm,
|
|
16471
|
+
cm,
|
|
16472
|
+
xm,
|
|
16473
|
+
tm,
|
|
16476
16474
|
up,
|
|
16477
16475
|
ip,
|
|
16478
16476
|
op,
|
|
@@ -16618,7 +16616,7 @@ function xp(r) {
|
|
|
16618
16616
|
});
|
|
16619
16617
|
const s = [];
|
|
16620
16618
|
return n.forEach((o) => {
|
|
16621
|
-
const a = o.attributes["w:styleId"], u =
|
|
16619
|
+
const a = o.attributes["w:styleId"], u = jm(a, r), c = {
|
|
16622
16620
|
id: o.attributes["w:styleId"],
|
|
16623
16621
|
type: o.attributes["w:type"],
|
|
16624
16622
|
definition: u,
|
|
@@ -16638,9 +16636,9 @@ function Ap(r) {
|
|
|
16638
16636
|
}), e;
|
|
16639
16637
|
}
|
|
16640
16638
|
const Dp = (r, e, t) => {
|
|
16641
|
-
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 = (
|
|
16639
|
+
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 = (vu(r["word/document.xml"]) || []).flatMap((g) => g.elements);
|
|
16642
16640
|
u.forEach((g) => {
|
|
16643
|
-
const { rId: E, referenceFile: D, currentFileName: v } =
|
|
16641
|
+
const { rId: E, referenceFile: D, currentFileName: v } = _o(g, r);
|
|
16644
16642
|
let w = h.find((A) => A.name === "w:headerReference" && A.attributes["r:id"] === E)?.attributes["w:type"];
|
|
16645
16643
|
e.headerIds[w] && (w = null);
|
|
16646
16644
|
const B = Jt(), R = B.handler({
|
|
@@ -16653,7 +16651,7 @@ const Dp = (r, e, t) => {
|
|
|
16653
16651
|
});
|
|
16654
16652
|
e.headerIds.ids || (e.headerIds.ids = []), e.headerIds.ids.push(E), e.headers[E] = { type: "doc", content: [...R] }, w && (e.headerIds[w] = E);
|
|
16655
16653
|
}), c.forEach((g) => {
|
|
16656
|
-
const { rId: E, referenceFile: D, currentFileName: v } =
|
|
16654
|
+
const { rId: E, referenceFile: D, currentFileName: v } = _o(g, r), w = h.find((A) => A.name === "w:footerReference" && A.attributes["r:id"] === E)?.attributes["w:type"], B = Jt(), R = B.handler({
|
|
16657
16655
|
nodes: D.elements[0].elements,
|
|
16658
16656
|
nodeListHandler: B,
|
|
16659
16657
|
docx: r,
|
|
@@ -16663,11 +16661,11 @@ const Dp = (r, e, t) => {
|
|
|
16663
16661
|
});
|
|
16664
16662
|
e.footerIds.ids || (e.footerIds.ids = []), e.footerIds.ids.push(E), e.footers[E] = { type: "doc", content: [...R] }, e.footerIds[w] = E;
|
|
16665
16663
|
});
|
|
16666
|
-
},
|
|
16664
|
+
}, vu = (r, e = []) => {
|
|
16667
16665
|
for (const t in r)
|
|
16668
|
-
r[t] === "w:sectPr" ? e.push(r) : typeof r[t] == "object" &&
|
|
16666
|
+
r[t] === "w:sectPr" ? e.push(r) : typeof r[t] == "object" && vu(r[t], e);
|
|
16669
16667
|
return e;
|
|
16670
|
-
},
|
|
16668
|
+
}, _o = (r, e) => {
|
|
16671
16669
|
const t = r.attributes.Id, n = r.attributes.Target, i = e[`word/${n}`];
|
|
16672
16670
|
return {
|
|
16673
16671
|
rId: t,
|
|
@@ -16677,7 +16675,7 @@ const Dp = (r, e, t) => {
|
|
|
16677
16675
|
};
|
|
16678
16676
|
function vp(r) {
|
|
16679
16677
|
let e = r["word/numbering.xml"];
|
|
16680
|
-
(!e || !e.elements?.length || !e.elements[0].elements?.length) && (e =
|
|
16678
|
+
(!e || !e.elements?.length || !e.elements[0].elements?.length) && (e = nu);
|
|
16681
16679
|
const t = e.elements[0].elements, n = t.filter((a) => a.name === "w:abstractNum"), i = t.filter((a) => a.name === "w:num"), s = {};
|
|
16682
16680
|
n.forEach((a) => {
|
|
16683
16681
|
const u = Number(a.attributes["w:abstractNumId"]);
|
|
@@ -16698,7 +16696,7 @@ const Ep = (r) => {
|
|
|
16698
16696
|
const { elements: t = [] } = e.elements[0];
|
|
16699
16697
|
return !!t.find((i) => i.name === "w:evenAndOddHeaders");
|
|
16700
16698
|
};
|
|
16701
|
-
var it, Cu, Su, Tu
|
|
16699
|
+
var it, Eu, Cu, Su, Tu;
|
|
16702
16700
|
const pt = class pt {
|
|
16703
16701
|
constructor(e = null) {
|
|
16704
16702
|
Ir(this, it);
|
|
@@ -16710,7 +16708,7 @@ const pt = class pt {
|
|
|
16710
16708
|
}), this.initialJSON = this.convertedXml["word/document.xml"], this.initialJSON || (this.initialJSON = this.parseXmlToJson(this.xml)), this.declaration = this.initialJSON?.declaration;
|
|
16711
16709
|
}
|
|
16712
16710
|
parseXmlToJson(e) {
|
|
16713
|
-
return JSON.parse(
|
|
16711
|
+
return JSON.parse(ba.xml2json(e, null, 2));
|
|
16714
16712
|
}
|
|
16715
16713
|
static getStoredSuperdocVersion(e) {
|
|
16716
16714
|
try {
|
|
@@ -16725,9 +16723,9 @@ const pt = class pt {
|
|
|
16725
16723
|
return;
|
|
16726
16724
|
}
|
|
16727
16725
|
}
|
|
16728
|
-
static updateDocumentVersion(e = this.convertedXml, t = "0.11.
|
|
16726
|
+
static updateDocumentVersion(e = this.convertedXml, t = "0.11.25") {
|
|
16729
16727
|
const n = "docProps/custom.xml";
|
|
16730
|
-
e[n] || (e[n] =
|
|
16728
|
+
e[n] || (e[n] = Fu());
|
|
16731
16729
|
const i = e["docProps/custom.xml"];
|
|
16732
16730
|
if (!i) return;
|
|
16733
16731
|
const s = i.elements.find((a) => a.name === "Properties");
|
|
@@ -16736,7 +16734,7 @@ const pt = class pt {
|
|
|
16736
16734
|
if (o)
|
|
16737
16735
|
o.elements[0].elements[0].elements[0].text = t;
|
|
16738
16736
|
else {
|
|
16739
|
-
const a =
|
|
16737
|
+
const a = Bu();
|
|
16740
16738
|
s.elements.push(a);
|
|
16741
16739
|
}
|
|
16742
16740
|
return e;
|
|
@@ -16778,7 +16776,7 @@ const pt = class pt {
|
|
|
16778
16776
|
if (!l) return;
|
|
16779
16777
|
const g = this.fonts[`word/${l}`]?.buffer;
|
|
16780
16778
|
if (!g) return;
|
|
16781
|
-
const E =
|
|
16779
|
+
const E = Vf(g, c.attributes["w:fontKey"]);
|
|
16782
16780
|
if (!E) return;
|
|
16783
16781
|
const D = new Blob([E], { type: "font/ttf" }), v = URL.createObjectURL(D), F = c.name.includes("Regular"), w = c.name.includes("Bold"), B = c.name.includes("Italic"), R = c.name.includes("Light");
|
|
16784
16782
|
u += `
|
|
@@ -16795,7 +16793,7 @@ const pt = class pt {
|
|
|
16795
16793
|
}
|
|
16796
16794
|
getDocumentInternalId() {
|
|
16797
16795
|
const e = "word/settings.xml";
|
|
16798
|
-
this.convertedXml[e] || (this.convertedXml[e] =
|
|
16796
|
+
this.convertedXml[e] || (this.convertedXml[e] = Wf);
|
|
16799
16797
|
const t = Object.assign({}, this.convertedXml[e]);
|
|
16800
16798
|
if (!t.elements[0]?.elements?.length) {
|
|
16801
16799
|
const i = this.createDocumentIdElement(t);
|
|
@@ -16808,7 +16806,7 @@ const pt = class pt {
|
|
|
16808
16806
|
this.documentInternalId = n?.attributes["w15:val"];
|
|
16809
16807
|
}
|
|
16810
16808
|
createDocumentIdElement() {
|
|
16811
|
-
const e =
|
|
16809
|
+
const e = xa().toUpperCase();
|
|
16812
16810
|
return this.documentInternalId = e, {
|
|
16813
16811
|
type: "element",
|
|
16814
16812
|
name: "w15:docId",
|
|
@@ -16834,7 +16832,7 @@ const pt = class pt {
|
|
|
16834
16832
|
return new No(this).schemaToXml(e, t);
|
|
16835
16833
|
}
|
|
16836
16834
|
async exportToDocx(e, t, n, i = !1, s, o = [], a) {
|
|
16837
|
-
const u = o.map((F) =>
|
|
16835
|
+
const u = o.map((F) => nd(F)), c = u.map((F, w) => id(F, w, u, a)), { result: l, params: h } = this.exportToXmlJson({
|
|
16838
16836
|
data: e,
|
|
16839
16837
|
editorSchema: t,
|
|
16840
16838
|
comments: o,
|
|
@@ -16843,21 +16841,21 @@ const pt = class pt {
|
|
|
16843
16841
|
isFinalDoc: i,
|
|
16844
16842
|
editor: a
|
|
16845
16843
|
}), E = new No(this).schemaToXml(l);
|
|
16846
|
-
await Ke(this, it,
|
|
16844
|
+
await Ke(this, it, Tu).call(this, {
|
|
16847
16845
|
...n,
|
|
16848
16846
|
...h.media,
|
|
16849
16847
|
...this.media
|
|
16850
16848
|
});
|
|
16851
16849
|
let D = { ...this.convertedXml }, v = [];
|
|
16852
16850
|
if (o.length) {
|
|
16853
|
-
const { documentXml: F, relationships: w } = Ke(this, it,
|
|
16851
|
+
const { documentXml: F, relationships: w } = Ke(this, it, Cu).call(this, {
|
|
16854
16852
|
defs: h.exportedCommentDefs,
|
|
16855
16853
|
exportType: s,
|
|
16856
16854
|
commentsWithParaIds: u
|
|
16857
16855
|
});
|
|
16858
16856
|
D = { ...F }, v = w;
|
|
16859
16857
|
}
|
|
16860
|
-
return this.convertedXml = { ...this.convertedXml, ...D }, Ke(this, it,
|
|
16858
|
+
return this.convertedXml = { ...this.convertedXml, ...D }, Ke(this, it, Su).call(this, [...h.relationships, ...v]), Cp(this.convertedXml), Ke(this, it, Eu).call(this, h), E;
|
|
16861
16859
|
}
|
|
16862
16860
|
exportToXmlJson({
|
|
16863
16861
|
data: e,
|
|
@@ -16886,18 +16884,18 @@ const pt = class pt {
|
|
|
16886
16884
|
return { result: c, params: l };
|
|
16887
16885
|
}
|
|
16888
16886
|
};
|
|
16889
|
-
it = new WeakSet(),
|
|
16887
|
+
it = new WeakSet(), Eu = function(e) {
|
|
16890
16888
|
const t = "word/numbering.xml";
|
|
16891
16889
|
let n = this.convertedXml[t];
|
|
16892
16890
|
const i = this.numbering;
|
|
16893
|
-
n || (n =
|
|
16891
|
+
n || (n = nu);
|
|
16894
16892
|
const s = n.elements[0], o = Object.values(i.abstracts).map((u) => u), a = Object.values(i.definitions).map((u) => u);
|
|
16895
16893
|
s.elements = [...o, ...a], this.convertedXml[t] = n;
|
|
16896
16894
|
}, /**
|
|
16897
16895
|
* Update comments files and relationships depending on export type
|
|
16898
16896
|
*/
|
|
16899
|
-
|
|
16900
|
-
const { documentXml: i, relationships: s } =
|
|
16897
|
+
Cu = function({ defs: e, exportType: t, commentsWithParaIds: n }) {
|
|
16898
|
+
const { documentXml: i, relationships: s } = fd({
|
|
16901
16899
|
exportType: t,
|
|
16902
16900
|
convertedXml: this.convertedXml,
|
|
16903
16901
|
defs: e,
|
|
@@ -16905,19 +16903,19 @@ Su = function({ defs: e, exportType: t, commentsWithParaIds: n }) {
|
|
|
16905
16903
|
converter: this
|
|
16906
16904
|
});
|
|
16907
16905
|
return { documentXml: i, relationships: s };
|
|
16908
|
-
},
|
|
16906
|
+
}, Su = function(e = []) {
|
|
16909
16907
|
const t = this.convertedXml["word/_rels/document.xml.rels"], n = t.elements.find((a) => a.name === "Relationships"), i = [], s = /rId|mi/g;
|
|
16910
16908
|
let o = Math.max(...n.elements.map((a) => Number(a.attributes.Id.replace(s, ""))));
|
|
16911
16909
|
e.forEach((a) => {
|
|
16912
16910
|
const u = a.attributes.Id, c = n.elements.find((h) => h.attributes.Target === a.attributes.Target), l = a.attributes.Target?.startsWith("media/") && u.length > 6;
|
|
16913
16911
|
c && !l || (a.attributes.Target = a.attributes?.Target?.replace(/&/g, "&"), a.attributes.Id = u.length > 6 ? u : `rId${++o}`, i.push(a));
|
|
16914
16912
|
}), n.elements = [...n.elements, ...i], this.convertedXml["word/_rels/document.xml.rels"] = t;
|
|
16915
|
-
},
|
|
16913
|
+
}, Tu = async function(e) {
|
|
16916
16914
|
const t = {};
|
|
16917
16915
|
for (const n in e) {
|
|
16918
16916
|
if (typeof e[n] != "string") return;
|
|
16919
16917
|
const i = n.split("/").pop();
|
|
16920
|
-
t[i] = await
|
|
16918
|
+
t[i] = await qf(e[n]);
|
|
16921
16919
|
}
|
|
16922
16920
|
this.convertedXml.media = {
|
|
16923
16921
|
...this.convertedXml.media,
|
|
@@ -16971,7 +16969,7 @@ Su = function({ defs: e, exportType: t, commentsWithParaIds: n }) {
|
|
|
16971
16969
|
let Ot = pt;
|
|
16972
16970
|
function Cp(r) {
|
|
16973
16971
|
const e = "docProps/custom.xml";
|
|
16974
|
-
r[e] || (r[e] =
|
|
16972
|
+
r[e] || (r[e] = Fu());
|
|
16975
16973
|
const n = r[e].elements.find((a) => a.name === "Properties");
|
|
16976
16974
|
n.elements || (n.elements = []);
|
|
16977
16975
|
const i = n.elements, s = i.filter((a) => typeof a == "object" && a !== null).filter((a) => {
|
|
@@ -16983,12 +16981,12 @@ function Cp(r) {
|
|
|
16983
16981
|
o = s.length ? Math.max(...i.map((a) => a.attributes.pid)) + 1 : 2;
|
|
16984
16982
|
} catch {
|
|
16985
16983
|
}
|
|
16986
|
-
return s.push(
|
|
16984
|
+
return s.push(Bu(o)), n.elements = s, r;
|
|
16987
16985
|
}
|
|
16988
|
-
function
|
|
16989
|
-
return
|
|
16986
|
+
function Fu() {
|
|
16987
|
+
return Gf;
|
|
16990
16988
|
}
|
|
16991
|
-
function
|
|
16989
|
+
function Bu(r = 2, e = "0.11.25") {
|
|
16992
16990
|
return {
|
|
16993
16991
|
type: "element",
|
|
16994
16992
|
name: "property",
|
|
@@ -17012,12 +17010,12 @@ function ku(r = 2, e = "0.11.24") {
|
|
|
17012
17010
|
};
|
|
17013
17011
|
}
|
|
17014
17012
|
export {
|
|
17015
|
-
|
|
17013
|
+
md as $,
|
|
17016
17014
|
at as A,
|
|
17017
17015
|
Ct as B,
|
|
17018
17016
|
Jp as C,
|
|
17019
|
-
|
|
17020
|
-
|
|
17017
|
+
_a as D,
|
|
17018
|
+
ru as E,
|
|
17021
17019
|
Q as F,
|
|
17022
17020
|
Oi as G,
|
|
17023
17021
|
Up as H,
|
|
@@ -17033,16 +17031,16 @@ export {
|
|
|
17033
17031
|
$e as R,
|
|
17034
17032
|
Ee as S,
|
|
17035
17033
|
tt as T,
|
|
17036
|
-
|
|
17034
|
+
Of as U,
|
|
17037
17035
|
Kp as V,
|
|
17038
17036
|
Mp as W,
|
|
17039
|
-
|
|
17040
|
-
|
|
17041
|
-
|
|
17042
|
-
|
|
17037
|
+
Za as X,
|
|
17038
|
+
dd as Y,
|
|
17039
|
+
Tf as Z,
|
|
17040
|
+
Sf as _,
|
|
17043
17041
|
_p as a,
|
|
17044
17042
|
Je as a0,
|
|
17045
|
-
|
|
17043
|
+
qo as a1,
|
|
17046
17044
|
$p as a2,
|
|
17047
17045
|
jp as a3,
|
|
17048
17046
|
ae as b,
|
|
@@ -17051,23 +17049,23 @@ export {
|
|
|
17051
17049
|
we as e,
|
|
17052
17050
|
Lp as f,
|
|
17053
17051
|
Bp as g,
|
|
17054
|
-
|
|
17052
|
+
Nf as h,
|
|
17055
17053
|
Vp as i,
|
|
17056
17054
|
Rp as j,
|
|
17057
17055
|
Pp as k,
|
|
17058
17056
|
Np as l,
|
|
17059
17057
|
Op as m,
|
|
17060
17058
|
Wp as n,
|
|
17061
|
-
|
|
17059
|
+
If as o,
|
|
17062
17060
|
ge as p,
|
|
17063
17061
|
Ie as q,
|
|
17064
|
-
|
|
17065
|
-
|
|
17062
|
+
bf as r,
|
|
17063
|
+
Lc as s,
|
|
17066
17064
|
Ip as t,
|
|
17067
17065
|
zp as u,
|
|
17068
17066
|
Gp as v,
|
|
17069
17067
|
Pi as w,
|
|
17070
17068
|
xr as x,
|
|
17071
|
-
|
|
17069
|
+
xa as y,
|
|
17072
17070
|
Ri as z
|
|
17073
17071
|
};
|