@opencloud-eu/web-client 7.0.0 → 7.1.2
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/axios-idnwLrbl.js +1862 -0
- package/dist/{dist-CSYfvE5O.js → dist-DXLl1XQj.js} +1 -1
- package/dist/{generated-DpuGzXYs.js → generated-Dr-mKneP.js} +4 -1
- package/dist/{graph-DDFvgcOx.js → graph-C_btwMni.js} +3 -3
- package/dist/{helpers-BuCcZhiF.js → helpers-B_uB5urn.js} +3 -3
- package/dist/{ocs-BX4C1k3k.js → ocs-VeFt8RO1.js} +253 -239
- package/dist/src/ocs/capabilities.d.ts +0 -1
- package/dist/src/sse/index.d.ts +3 -0
- package/dist/{toString-9BJo4tor.js → toString-DIrlTUQN.js} +1 -1
- package/dist/web-client/graph/generated.js +1 -1
- package/dist/web-client/graph.js +1 -1
- package/dist/web-client/ocs.js +1 -1
- package/dist/web-client/sse.js +2 -2
- package/dist/web-client/webdav.js +2 -2
- package/dist/web-client.js +5 -5
- package/dist/{webdav-BS8H6On8.js → webdav-uHUUUQAP.js} +659 -598
- package/package.json +14 -4
- package/dist/axios-DAxu7d04.js +0 -1689
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as e } from "./dist-
|
|
2
|
-
import { a as t, n, s as r, t as i, u as a } from "./toString-
|
|
1
|
+
import { t as e } from "./dist-DXLl1XQj.js";
|
|
2
|
+
import { a as t, n, s as r, t as i, u as a } from "./toString-DIrlTUQN.js";
|
|
3
3
|
//#region ../../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_isKey.js
|
|
4
4
|
var o = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, s = /^\w*$/;
|
|
5
5
|
function c(e, n) {
|
|
@@ -124,7 +124,6 @@ function T(...e) {
|
|
|
124
124
|
function E(e) {
|
|
125
125
|
return new DataView(e.buffer, e.byteOffset, e.byteLength);
|
|
126
126
|
}
|
|
127
|
-
new Uint8Array(new Uint32Array([287454020]).buffer)[0], typeof Uint8Array.from([]).toHex == "function" && Uint8Array.fromHex;
|
|
128
127
|
function re(e) {
|
|
129
128
|
if (typeof e != "string") throw TypeError("string expected");
|
|
130
129
|
return new Uint8Array(new TextEncoder().encode(e));
|
|
@@ -333,7 +332,7 @@ function N(e, t, n, r) {
|
|
|
333
332
|
l: i | 0
|
|
334
333
|
};
|
|
335
334
|
}
|
|
336
|
-
var ye = (e, t, n) => (e >>> 0) + (t >>> 0) + (n >>> 0), be = (e, t, n, r) => t + n + r + (e / 2 ** 32 | 0) | 0, xe = (e, t, n, r) => (e >>> 0) + (t >>> 0) + (n >>> 0) + (r >>> 0), Se = (e, t, n, r, i) => t + n + r + i + (e / 2 ** 32 | 0) | 0, Ce = (e, t, n, r, i) => (e >>> 0) + (t >>> 0) + (n >>> 0) + (r >>> 0) + (i >>> 0), we = (e, t, n, r, i, a) => t + n + r + i + a + (e / 2 ** 32 | 0) | 0, Te = ge((/* @__PURE__ */ "0x428a2f98d728ae22.0x7137449123ef65cd.0xb5c0fbcfec4d3b2f.0xe9b5dba58189dbbc.0x3956c25bf348b538.0x59f111f1b605d019.0x923f82a4af194f9b.0xab1c5ed5da6d8118.0xd807aa98a3030242.0x12835b0145706fbe.0x243185be4ee4b28c.0x550c7dc3d5ffb4e2.0x72be5d74f27b896f.0x80deb1fe3b1696b1.0x9bdc06a725c71235.0xc19bf174cf692694.0xe49b69c19ef14ad2.0xefbe4786384f25e3.0x0fc19dc68b8cd5b5.0x240ca1cc77ac9c65.0x2de92c6f592b0275.0x4a7484aa6ea6e483.0x5cb0a9dcbd41fbd4.0x76f988da831153b5.0x983e5152ee66dfab.0xa831c66d2db43210.0xb00327c898fb213f.0xbf597fc7beef0ee4.0xc6e00bf33da88fc2.0xd5a79147930aa725.0x06ca6351e003826f.0x142929670a0e6e70.0x27b70a8546d22ffc.0x2e1b21385c26c926.0x4d2c6dfc5ac42aed.0x53380d139d95b3df.0x650a73548baf63de.0x766a0abb3c77b2a8.0x81c2c92e47edaee6.0x92722c851482353b.0xa2bfe8a14cf10364.0xa81a664bbc423001.0xc24b8b70d0f89791.0xc76c51a30654be30.0xd192e819d6ef5218.0xd69906245565a910.0xf40e35855771202a.0x106aa07032bbd1b8.0x19a4c116b8d2d0c8.0x1e376c085141ab53.0x2748774cdf8eeb99.0x34b0bcb5e19b48a8.0x391c0cb3c5c95a63.0x4ed8aa4ae3418acb.0x5b9cca4f7763e373.0x682e6ff3d6b2b8a3.0x748f82ee5defb2fc.0x78a5636f43172f60.0x84c87814a1f0ab72.0x8cc702081a6439ec.0x90befffa23631e28.0xa4506cebde82bde9.0xbef9a3f7b2c67915.0xc67178f2e372532b.0xca273eceea26619c.0xd186b8c721c0c207.0xeada7dd6cde0eb1e.0xf57d4f7fee6ed178.0x06f067aa72176fba.0x0a637dc5a2c898a6.0x113f9804bef90dae.0x1b710b35131c471b.0x28db77f523047d84.0x32caab7b40c72493.0x3c9ebe0a15c9bebc.0x431d67c49c100d4c.0x4cc5d4becb3e42b6.0x597f299cfc657e2a.0x5fcb6fab3ad6faec.0x6c44198c4a475817".split(".")).map((e) => BigInt(e))), Ee = Te[0], De = Te[1], P = /* @__PURE__ */ new Uint32Array(80), F = /* @__PURE__ */ new Uint32Array(80), Oe = class extends pe {
|
|
335
|
+
var ye = (e, t, n) => (e >>> 0) + (t >>> 0) + (n >>> 0), be = (e, t, n, r) => t + n + r + (e / 2 ** 32 | 0) | 0, xe = (e, t, n, r) => (e >>> 0) + (t >>> 0) + (n >>> 0) + (r >>> 0), Se = (e, t, n, r, i) => t + n + r + i + (e / 2 ** 32 | 0) | 0, Ce = (e, t, n, r, i) => (e >>> 0) + (t >>> 0) + (n >>> 0) + (r >>> 0) + (i >>> 0), we = (e, t, n, r, i, a) => t + n + r + i + a + (e / 2 ** 32 | 0) | 0, Te = /* @__PURE__ */ ge((/* @__PURE__ */ "0x428a2f98d728ae22.0x7137449123ef65cd.0xb5c0fbcfec4d3b2f.0xe9b5dba58189dbbc.0x3956c25bf348b538.0x59f111f1b605d019.0x923f82a4af194f9b.0xab1c5ed5da6d8118.0xd807aa98a3030242.0x12835b0145706fbe.0x243185be4ee4b28c.0x550c7dc3d5ffb4e2.0x72be5d74f27b896f.0x80deb1fe3b1696b1.0x9bdc06a725c71235.0xc19bf174cf692694.0xe49b69c19ef14ad2.0xefbe4786384f25e3.0x0fc19dc68b8cd5b5.0x240ca1cc77ac9c65.0x2de92c6f592b0275.0x4a7484aa6ea6e483.0x5cb0a9dcbd41fbd4.0x76f988da831153b5.0x983e5152ee66dfab.0xa831c66d2db43210.0xb00327c898fb213f.0xbf597fc7beef0ee4.0xc6e00bf33da88fc2.0xd5a79147930aa725.0x06ca6351e003826f.0x142929670a0e6e70.0x27b70a8546d22ffc.0x2e1b21385c26c926.0x4d2c6dfc5ac42aed.0x53380d139d95b3df.0x650a73548baf63de.0x766a0abb3c77b2a8.0x81c2c92e47edaee6.0x92722c851482353b.0xa2bfe8a14cf10364.0xa81a664bbc423001.0xc24b8b70d0f89791.0xc76c51a30654be30.0xd192e819d6ef5218.0xd69906245565a910.0xf40e35855771202a.0x106aa07032bbd1b8.0x19a4c116b8d2d0c8.0x1e376c085141ab53.0x2748774cdf8eeb99.0x34b0bcb5e19b48a8.0x391c0cb3c5c95a63.0x4ed8aa4ae3418acb.0x5b9cca4f7763e373.0x682e6ff3d6b2b8a3.0x748f82ee5defb2fc.0x78a5636f43172f60.0x84c87814a1f0ab72.0x8cc702081a6439ec.0x90befffa23631e28.0xa4506cebde82bde9.0xbef9a3f7b2c67915.0xc67178f2e372532b.0xca273eceea26619c.0xd186b8c721c0c207.0xeada7dd6cde0eb1e.0xf57d4f7fee6ed178.0x06f067aa72176fba.0x0a637dc5a2c898a6.0x113f9804bef90dae.0x1b710b35131c471b.0x28db77f523047d84.0x32caab7b40c72493.0x3c9ebe0a15c9bebc.0x431d67c49c100d4c.0x4cc5d4becb3e42b6.0x597f299cfc657e2a.0x5fcb6fab3ad6faec.0x6c44198c4a475817".split(".")).map((e) => BigInt(e))), Ee = Te[0], De = Te[1], P = /* @__PURE__ */ new Uint32Array(80), F = /* @__PURE__ */ new Uint32Array(80), Oe = class extends pe {
|
|
337
336
|
constructor(e) {
|
|
338
337
|
super(128, e, 16, !1);
|
|
339
338
|
}
|
|
@@ -405,10 +404,8 @@ var ye = (e, t, n) => (e >>> 0) + (t >>> 0) + (n >>> 0), be = (e, t, n, r) => t
|
|
|
405
404
|
}, Ae = /* @__PURE__ */ oe(() => new ke(), /* @__PURE__ */ se(3)), je = (t, n, r, i) => e.from(fe(Ae, t, n, {
|
|
406
405
|
c: r,
|
|
407
406
|
dkLen: i
|
|
408
|
-
})), Me = ":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD";
|
|
409
|
-
|
|
410
|
-
var Ne = "[" + Me + "][:A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*", Pe = RegExp("^" + Ne + "$");
|
|
411
|
-
function Fe(e, t) {
|
|
407
|
+
})), Me = /* @__PURE__ */ RegExp("^[:A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$");
|
|
408
|
+
function Ne(e, t) {
|
|
412
409
|
let n = [], r = t.exec(e);
|
|
413
410
|
for (; r;) {
|
|
414
411
|
let i = [];
|
|
@@ -419,13 +416,13 @@ function Fe(e, t) {
|
|
|
419
416
|
}
|
|
420
417
|
return n;
|
|
421
418
|
}
|
|
422
|
-
var
|
|
423
|
-
return
|
|
419
|
+
var Pe = function(e) {
|
|
420
|
+
return Me.exec(e) != null;
|
|
424
421
|
};
|
|
425
|
-
function
|
|
422
|
+
function Fe(e) {
|
|
426
423
|
return e !== void 0;
|
|
427
424
|
}
|
|
428
|
-
var
|
|
425
|
+
var I = [
|
|
429
426
|
"hasOwnProperty",
|
|
430
427
|
"toString",
|
|
431
428
|
"valueOf",
|
|
@@ -433,94 +430,94 @@ var L = [
|
|
|
433
430
|
"__defineSetter__",
|
|
434
431
|
"__lookupGetter__",
|
|
435
432
|
"__lookupSetter__"
|
|
436
|
-
],
|
|
433
|
+
], Ie = [
|
|
437
434
|
"__proto__",
|
|
438
435
|
"constructor",
|
|
439
436
|
"prototype"
|
|
440
|
-
],
|
|
437
|
+
], Le = {
|
|
441
438
|
allowBooleanAttributes: !1,
|
|
442
439
|
unpairedTags: []
|
|
443
440
|
};
|
|
444
|
-
function
|
|
445
|
-
t = Object.assign({},
|
|
441
|
+
function Re(e, t) {
|
|
442
|
+
t = Object.assign({}, Le, t);
|
|
446
443
|
let n = [], r = !1, i = !1;
|
|
447
444
|
e[0] === "" && (e = e.substr(1));
|
|
448
445
|
for (let a = 0; a < e.length; a++) if (e[a] === "<" && e[a + 1] === "?") {
|
|
449
|
-
if (a += 2, a =
|
|
446
|
+
if (a += 2, a = Be(e, a), a.err) return a;
|
|
450
447
|
} else if (e[a] === "<") {
|
|
451
448
|
let o = a;
|
|
452
449
|
if (a++, e[a] === "!") {
|
|
453
|
-
a =
|
|
450
|
+
a = Ve(e, a);
|
|
454
451
|
continue;
|
|
455
452
|
} else {
|
|
456
453
|
let s = !1;
|
|
457
454
|
e[a] === "/" && (s = !0, a++);
|
|
458
455
|
let c = "";
|
|
459
456
|
for (; a < e.length && e[a] !== ">" && e[a] !== " " && e[a] !== " " && e[a] !== "\n" && e[a] !== "\r"; a++) c += e[a];
|
|
460
|
-
if (c = c.trim(), c[c.length - 1] === "/" && (c = c.substring(0, c.length - 1), a--), !
|
|
457
|
+
if (c = c.trim(), c[c.length - 1] === "/" && (c = c.substring(0, c.length - 1), a--), !Xe(c)) {
|
|
461
458
|
let t;
|
|
462
|
-
return t = c.trim().length === 0 ? "Invalid space after '<'." : "Tag '" + c + "' is an invalid name.",
|
|
459
|
+
return t = c.trim().length === 0 ? "Invalid space after '<'." : "Tag '" + c + "' is an invalid name.", L("InvalidTag", t, R(e, a));
|
|
463
460
|
}
|
|
464
|
-
let l =
|
|
465
|
-
if (l === !1) return
|
|
461
|
+
let l = We(e, a);
|
|
462
|
+
if (l === !1) return L("InvalidAttr", "Attributes for '" + c + "' have open quote.", R(e, a));
|
|
466
463
|
let u = l.value;
|
|
467
464
|
if (a = l.index, u[u.length - 1] === "/") {
|
|
468
465
|
let n = a - u.length;
|
|
469
466
|
u = u.substring(0, u.length - 1);
|
|
470
|
-
let i =
|
|
467
|
+
let i = Ke(u, t);
|
|
471
468
|
if (i === !0) r = !0;
|
|
472
|
-
else return
|
|
469
|
+
else return L(i.err.code, i.err.msg, R(e, n + i.err.line));
|
|
473
470
|
} else if (s) {
|
|
474
|
-
if (!l.tagClosed) return
|
|
475
|
-
if (u.trim().length > 0) return
|
|
476
|
-
if (n.length === 0) return
|
|
471
|
+
if (!l.tagClosed) return L("InvalidTag", "Closing tag '" + c + "' doesn't have proper closing.", R(e, a));
|
|
472
|
+
if (u.trim().length > 0) return L("InvalidTag", "Closing tag '" + c + "' can't have attributes or invalid starting.", R(e, o));
|
|
473
|
+
if (n.length === 0) return L("InvalidTag", "Closing tag '" + c + "' has not been opened.", R(e, o));
|
|
477
474
|
{
|
|
478
475
|
let t = n.pop();
|
|
479
476
|
if (c !== t.tagName) {
|
|
480
|
-
let n =
|
|
481
|
-
return
|
|
477
|
+
let n = R(e, t.tagStartPos);
|
|
478
|
+
return L("InvalidTag", "Expected closing tag '" + t.tagName + "' (opened in line " + n.line + ", col " + n.col + ") instead of closing tag '" + c + "'.", R(e, o));
|
|
482
479
|
}
|
|
483
480
|
n.length == 0 && (i = !0);
|
|
484
481
|
}
|
|
485
482
|
} else {
|
|
486
|
-
let s =
|
|
487
|
-
if (s !== !0) return
|
|
488
|
-
if (i === !0) return
|
|
483
|
+
let s = Ke(u, t);
|
|
484
|
+
if (s !== !0) return L(s.err.code, s.err.msg, R(e, a - u.length + s.err.line));
|
|
485
|
+
if (i === !0) return L("InvalidXml", "Multiple possible root nodes found.", R(e, a));
|
|
489
486
|
t.unpairedTags.indexOf(c) !== -1 || n.push({
|
|
490
487
|
tagName: c,
|
|
491
488
|
tagStartPos: o
|
|
492
489
|
}), r = !0;
|
|
493
490
|
}
|
|
494
491
|
for (a++; a < e.length; a++) if (e[a] === "<") if (e[a + 1] === "!") {
|
|
495
|
-
a++, a =
|
|
492
|
+
a++, a = Ve(e, a);
|
|
496
493
|
continue;
|
|
497
494
|
} else if (e[a + 1] === "?") {
|
|
498
|
-
if (a =
|
|
495
|
+
if (a = Be(e, ++a), a.err) return a;
|
|
499
496
|
} else break;
|
|
500
497
|
else if (e[a] === "&") {
|
|
501
|
-
let t =
|
|
502
|
-
if (t == -1) return
|
|
498
|
+
let t = Je(e, a);
|
|
499
|
+
if (t == -1) return L("InvalidChar", "char '&' is not expected.", R(e, a));
|
|
503
500
|
a = t;
|
|
504
|
-
} else if (i === !0 && !
|
|
501
|
+
} else if (i === !0 && !ze(e[a])) return L("InvalidXml", "Extra text at the end", R(e, a));
|
|
505
502
|
e[a] === "<" && a--;
|
|
506
503
|
}
|
|
507
504
|
} else {
|
|
508
|
-
if (
|
|
509
|
-
return
|
|
505
|
+
if (ze(e[a])) continue;
|
|
506
|
+
return L("InvalidChar", "char '" + e[a] + "' is not expected.", R(e, a));
|
|
510
507
|
}
|
|
511
|
-
return r ? n.length == 1 ?
|
|
508
|
+
return r ? n.length == 1 ? L("InvalidTag", "Unclosed tag '" + n[0].tagName + "'.", R(e, n[0].tagStartPos)) : n.length > 0 ? L("InvalidXml", "Invalid '" + JSON.stringify(n.map((e) => e.tagName), null, 4).replace(/\r?\n/g, "") + "' found.", {
|
|
512
509
|
line: 1,
|
|
513
510
|
col: 1
|
|
514
|
-
}) : !0 :
|
|
511
|
+
}) : !0 : L("InvalidXml", "Start tag expected.", 1);
|
|
515
512
|
}
|
|
516
|
-
function
|
|
513
|
+
function ze(e) {
|
|
517
514
|
return e === " " || e === " " || e === "\n" || e === "\r";
|
|
518
515
|
}
|
|
519
|
-
function
|
|
516
|
+
function Be(e, t) {
|
|
520
517
|
let n = t;
|
|
521
518
|
for (; t < e.length; t++) if (e[t] == "?" || e[t] == " ") {
|
|
522
519
|
let r = e.substr(n, t - n);
|
|
523
|
-
if (t > 5 && r === "xml") return
|
|
520
|
+
if (t > 5 && r === "xml") return L("InvalidXml", "XML declaration allowed only at the start of the document.", R(e, t));
|
|
524
521
|
if (e[t] == "?" && e[t + 1] == ">") {
|
|
525
522
|
t++;
|
|
526
523
|
break;
|
|
@@ -528,7 +525,7 @@ function Ve(e, t) {
|
|
|
528
525
|
}
|
|
529
526
|
return t;
|
|
530
527
|
}
|
|
531
|
-
function
|
|
528
|
+
function Ve(e, t) {
|
|
532
529
|
if (e.length > t + 5 && e[t + 1] === "-" && e[t + 2] === "-") {
|
|
533
530
|
for (t += 3; t < e.length; t++) if (e[t] === "-" && e[t + 1] === "-" && e[t + 2] === ">") {
|
|
534
531
|
t += 2;
|
|
@@ -546,11 +543,11 @@ function He(e, t) {
|
|
|
546
543
|
}
|
|
547
544
|
return t;
|
|
548
545
|
}
|
|
549
|
-
var
|
|
550
|
-
function
|
|
546
|
+
var He = "\"", Ue = "'";
|
|
547
|
+
function We(e, t) {
|
|
551
548
|
let n = "", r = "", i = !1;
|
|
552
549
|
for (; t < e.length; t++) {
|
|
553
|
-
if (e[t] ===
|
|
550
|
+
if (e[t] === He || e[t] === Ue) r === "" ? r = e[t] : r !== e[t] || (r = "");
|
|
554
551
|
else if (e[t] === ">" && r === "") {
|
|
555
552
|
i = !0;
|
|
556
553
|
break;
|
|
@@ -563,21 +560,21 @@ function Ge(e, t) {
|
|
|
563
560
|
tagClosed: i
|
|
564
561
|
} : !1;
|
|
565
562
|
}
|
|
566
|
-
var
|
|
567
|
-
function
|
|
568
|
-
let n =
|
|
563
|
+
var Ge = /* @__PURE__ */ RegExp("(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['\"])(([\\s\\S])*?)\\5)?", "g");
|
|
564
|
+
function Ke(e, t) {
|
|
565
|
+
let n = Ne(e, Ge), r = {};
|
|
569
566
|
for (let e = 0; e < n.length; e++) {
|
|
570
|
-
if (n[e][1].length === 0) return
|
|
571
|
-
if (n[e][3] !== void 0 && n[e][4] === void 0) return
|
|
572
|
-
if (n[e][3] === void 0 && !t.allowBooleanAttributes) return
|
|
567
|
+
if (n[e][1].length === 0) return L("InvalidAttr", "Attribute '" + n[e][2] + "' has no space in starting.", z(n[e]));
|
|
568
|
+
if (n[e][3] !== void 0 && n[e][4] === void 0) return L("InvalidAttr", "Attribute '" + n[e][2] + "' is without value.", z(n[e]));
|
|
569
|
+
if (n[e][3] === void 0 && !t.allowBooleanAttributes) return L("InvalidAttr", "boolean attribute '" + n[e][2] + "' is not allowed.", z(n[e]));
|
|
573
570
|
let i = n[e][2];
|
|
574
|
-
if (!
|
|
571
|
+
if (!Ye(i)) return L("InvalidAttr", "Attribute '" + i + "' is an invalid name.", z(n[e]));
|
|
575
572
|
if (!Object.prototype.hasOwnProperty.call(r, i)) r[i] = 1;
|
|
576
|
-
else return
|
|
573
|
+
else return L("InvalidAttr", "Attribute '" + i + "' is repeated.", z(n[e]));
|
|
577
574
|
}
|
|
578
575
|
return !0;
|
|
579
576
|
}
|
|
580
|
-
function
|
|
577
|
+
function qe(e, t) {
|
|
581
578
|
let n = /\d/;
|
|
582
579
|
for (e[t] === "x" && (t++, n = /[\da-fA-F]/); t < e.length; t++) {
|
|
583
580
|
if (e[t] === ";") return t;
|
|
@@ -585,9 +582,9 @@ function Je(e, t) {
|
|
|
585
582
|
}
|
|
586
583
|
return -1;
|
|
587
584
|
}
|
|
588
|
-
function
|
|
585
|
+
function Je(e, t) {
|
|
589
586
|
if (t++, e[t] === ";") return -1;
|
|
590
|
-
if (e[t] === "#") return t++,
|
|
587
|
+
if (e[t] === "#") return t++, qe(e, t);
|
|
591
588
|
let n = 0;
|
|
592
589
|
for (; t < e.length; t++, n++) if (!(e[t].match(/\w/) && n < 20)) {
|
|
593
590
|
if (e[t] === ";") break;
|
|
@@ -595,7 +592,7 @@ function Ye(e, t) {
|
|
|
595
592
|
}
|
|
596
593
|
return t;
|
|
597
594
|
}
|
|
598
|
-
function
|
|
595
|
+
function L(e, t, n) {
|
|
599
596
|
return { err: {
|
|
600
597
|
code: e,
|
|
601
598
|
msg: t,
|
|
@@ -603,25 +600,25 @@ function R(e, t, n) {
|
|
|
603
600
|
col: n.col
|
|
604
601
|
} };
|
|
605
602
|
}
|
|
606
|
-
function
|
|
607
|
-
return
|
|
603
|
+
function Ye(e) {
|
|
604
|
+
return Pe(e);
|
|
608
605
|
}
|
|
609
|
-
function
|
|
610
|
-
return
|
|
606
|
+
function Xe(e) {
|
|
607
|
+
return Pe(e);
|
|
611
608
|
}
|
|
612
|
-
function
|
|
609
|
+
function R(e, t) {
|
|
613
610
|
let n = e.substring(0, t).split(/\r?\n/);
|
|
614
611
|
return {
|
|
615
612
|
line: n.length,
|
|
616
613
|
col: n[n.length - 1].length + 1
|
|
617
614
|
};
|
|
618
615
|
}
|
|
619
|
-
function
|
|
616
|
+
function z(e) {
|
|
620
617
|
return e.startIndex + e[1].length;
|
|
621
618
|
}
|
|
622
619
|
//#endregion
|
|
623
620
|
//#region ../../node_modules/.pnpm/@nodable+entities@2.1.0/node_modules/@nodable/entities/src/entities.js
|
|
624
|
-
var
|
|
621
|
+
var Ze = {
|
|
625
622
|
amp: "&",
|
|
626
623
|
AMP: "&",
|
|
627
624
|
lt: "<",
|
|
@@ -700,7 +697,7 @@ var Qe = {
|
|
|
700
697
|
times: "×",
|
|
701
698
|
div: "÷",
|
|
702
699
|
divide: "÷"
|
|
703
|
-
},
|
|
700
|
+
}, Qe = {
|
|
704
701
|
Agrave: "À",
|
|
705
702
|
agrave: "à",
|
|
706
703
|
Aacute: "Á",
|
|
@@ -764,7 +761,7 @@ var Qe = {
|
|
|
764
761
|
szlig: "ß",
|
|
765
762
|
yuml: "ÿ",
|
|
766
763
|
Yuml: "Ÿ"
|
|
767
|
-
},
|
|
764
|
+
}, $e = {
|
|
768
765
|
Amacr: "Ā",
|
|
769
766
|
amacr: "ā",
|
|
770
767
|
Abreve: "Ă",
|
|
@@ -882,7 +879,7 @@ var Qe = {
|
|
|
882
879
|
zdot: "ż",
|
|
883
880
|
Zcaron: "Ž",
|
|
884
881
|
zcaron: "ž"
|
|
885
|
-
},
|
|
882
|
+
}, et = {
|
|
886
883
|
Alpha: "Α",
|
|
887
884
|
alpha: "α",
|
|
888
885
|
Beta: "Β",
|
|
@@ -953,7 +950,7 @@ var Qe = {
|
|
|
953
950
|
Gammad: "Ϝ",
|
|
954
951
|
gammad: "ϝ",
|
|
955
952
|
digamma: "ϝ"
|
|
956
|
-
},
|
|
953
|
+
}, tt = {
|
|
957
954
|
Afr: "𝔄",
|
|
958
955
|
afr: "𝔞",
|
|
959
956
|
Acy: "А",
|
|
@@ -1048,7 +1045,7 @@ var Qe = {
|
|
|
1048
1045
|
ubrcy: "ў",
|
|
1049
1046
|
DZcy: "Џ",
|
|
1050
1047
|
dzcy: "џ"
|
|
1051
|
-
},
|
|
1048
|
+
}, nt = {
|
|
1052
1049
|
plus: "+",
|
|
1053
1050
|
minus: "−",
|
|
1054
1051
|
mnplus: "∓",
|
|
@@ -1137,7 +1134,7 @@ var Qe = {
|
|
|
1137
1134
|
lesseqqgtr: "⪋",
|
|
1138
1135
|
greater: ">",
|
|
1139
1136
|
less: "<"
|
|
1140
|
-
},
|
|
1137
|
+
}, rt = {
|
|
1141
1138
|
alefsym: "ℵ",
|
|
1142
1139
|
aleph: "ℵ",
|
|
1143
1140
|
beth: "ℶ",
|
|
@@ -1259,7 +1256,7 @@ var Qe = {
|
|
|
1259
1256
|
npr: "⊀",
|
|
1260
1257
|
nsucc: "⊁",
|
|
1261
1258
|
nsc: "⊁"
|
|
1262
|
-
},
|
|
1259
|
+
}, it = {
|
|
1263
1260
|
larr: "←",
|
|
1264
1261
|
leftarrow: "←",
|
|
1265
1262
|
LeftArrow: "←",
|
|
@@ -1416,7 +1413,7 @@ var Qe = {
|
|
|
1416
1413
|
LeftArrowBar: "⇤",
|
|
1417
1414
|
rarrb: "⇥",
|
|
1418
1415
|
RightArrowBar: "⇥"
|
|
1419
|
-
},
|
|
1416
|
+
}, at = {
|
|
1420
1417
|
square: "□",
|
|
1421
1418
|
Square: "□",
|
|
1422
1419
|
squ: "□",
|
|
@@ -1509,7 +1506,7 @@ var Qe = {
|
|
|
1509
1506
|
boxvH: "╪",
|
|
1510
1507
|
boxVh: "╫",
|
|
1511
1508
|
boxVH: "╬"
|
|
1512
|
-
},
|
|
1509
|
+
}, ot = {
|
|
1513
1510
|
excl: "!",
|
|
1514
1511
|
iexcl: "¡",
|
|
1515
1512
|
brvbar: "¦",
|
|
@@ -1561,7 +1558,7 @@ var Qe = {
|
|
|
1561
1558
|
DiacriticalDoubleAcute: "˝",
|
|
1562
1559
|
grave: "`",
|
|
1563
1560
|
acute: "´"
|
|
1564
|
-
},
|
|
1561
|
+
}, st = {
|
|
1565
1562
|
cent: "¢",
|
|
1566
1563
|
pound: "£",
|
|
1567
1564
|
curren: "¤",
|
|
@@ -1578,7 +1575,7 @@ var Qe = {
|
|
|
1578
1575
|
won: "₩",
|
|
1579
1576
|
yuan: "¥",
|
|
1580
1577
|
cedil: "¸"
|
|
1581
|
-
},
|
|
1578
|
+
}, ct = {
|
|
1582
1579
|
frac12: "½",
|
|
1583
1580
|
half: "½",
|
|
1584
1581
|
frac13: "⅓",
|
|
@@ -1596,7 +1593,7 @@ var Qe = {
|
|
|
1596
1593
|
frac58: "⅝",
|
|
1597
1594
|
frac78: "⅞",
|
|
1598
1595
|
frasl: "⁄"
|
|
1599
|
-
},
|
|
1596
|
+
}, lt = {
|
|
1600
1597
|
trade: "™",
|
|
1601
1598
|
TRADE: "™",
|
|
1602
1599
|
telrec: "⌕",
|
|
@@ -1664,6 +1661,7 @@ var Qe = {
|
|
|
1664
1661
|
nVDash: "⊯"
|
|
1665
1662
|
};
|
|
1666
1663
|
({
|
|
1664
|
+
...Ze,
|
|
1667
1665
|
...Qe,
|
|
1668
1666
|
...$e,
|
|
1669
1667
|
...et,
|
|
@@ -1675,16 +1673,15 @@ var Qe = {
|
|
|
1675
1673
|
...ot,
|
|
1676
1674
|
...st,
|
|
1677
1675
|
...ct,
|
|
1678
|
-
...lt
|
|
1679
|
-
...ut
|
|
1676
|
+
...lt
|
|
1680
1677
|
});
|
|
1681
|
-
var
|
|
1678
|
+
var ut = {
|
|
1682
1679
|
amp: "&",
|
|
1683
1680
|
apos: "'",
|
|
1684
1681
|
gt: ">",
|
|
1685
1682
|
lt: "<",
|
|
1686
1683
|
quot: "\""
|
|
1687
|
-
},
|
|
1684
|
+
}, dt = {
|
|
1688
1685
|
nbsp: "\xA0",
|
|
1689
1686
|
copy: "©",
|
|
1690
1687
|
reg: "®",
|
|
@@ -1705,13 +1702,13 @@ var dt = {
|
|
|
1705
1702
|
frac12: "½",
|
|
1706
1703
|
frac14: "¼",
|
|
1707
1704
|
frac34: "¾"
|
|
1708
|
-
},
|
|
1709
|
-
function
|
|
1705
|
+
}, ft = /* @__PURE__ */ new Set("!?\\\\/[]$%{}^&*()<>|+");
|
|
1706
|
+
function pt(e) {
|
|
1710
1707
|
if (e[0] === "#") throw Error(`[EntityReplacer] Invalid character '#' in entity name: "${e}"`);
|
|
1711
|
-
for (let t of e) if (
|
|
1708
|
+
for (let t of e) if (ft.has(t)) throw Error(`[EntityReplacer] Invalid character '${t}' in entity name: "${e}"`);
|
|
1712
1709
|
return e;
|
|
1713
1710
|
}
|
|
1714
|
-
function
|
|
1711
|
+
function B(...e) {
|
|
1715
1712
|
let t = Object.create(null);
|
|
1716
1713
|
for (let n of e) if (n) for (let e of Object.keys(n)) {
|
|
1717
1714
|
let r = n[e];
|
|
@@ -1723,11 +1720,11 @@ function V(...e) {
|
|
|
1723
1720
|
}
|
|
1724
1721
|
return t;
|
|
1725
1722
|
}
|
|
1726
|
-
var
|
|
1723
|
+
var V = "external", H = "base", mt = "all";
|
|
1727
1724
|
function ht(e) {
|
|
1728
|
-
return !e || e ===
|
|
1725
|
+
return !e || e === V ? new Set([V]) : e === mt ? new Set([mt]) : e === H ? new Set([H]) : Array.isArray(e) ? new Set(e) : new Set([V]);
|
|
1729
1726
|
}
|
|
1730
|
-
var
|
|
1727
|
+
var U = Object.freeze({
|
|
1731
1728
|
allow: 0,
|
|
1732
1729
|
leave: 1,
|
|
1733
1730
|
remove: 2,
|
|
@@ -1740,31 +1737,31 @@ var G = Object.freeze({
|
|
|
1740
1737
|
function _t(e) {
|
|
1741
1738
|
if (!e) return {
|
|
1742
1739
|
xmlVersion: 1,
|
|
1743
|
-
onLevel:
|
|
1744
|
-
nullLevel:
|
|
1740
|
+
onLevel: U.allow,
|
|
1741
|
+
nullLevel: U.remove
|
|
1745
1742
|
};
|
|
1746
|
-
let t = e.xmlVersion === 1.1 ? 1.1 : 1, n =
|
|
1743
|
+
let t = e.xmlVersion === 1.1 ? 1.1 : 1, n = U[e.onNCR] ?? U.allow, r = U[e.nullNCR] ?? U.remove;
|
|
1747
1744
|
return {
|
|
1748
1745
|
xmlVersion: t,
|
|
1749
1746
|
onLevel: n,
|
|
1750
|
-
nullLevel: Math.max(r,
|
|
1747
|
+
nullLevel: Math.max(r, U.remove)
|
|
1751
1748
|
};
|
|
1752
1749
|
}
|
|
1753
1750
|
var vt = class {
|
|
1754
1751
|
constructor(e = {}) {
|
|
1755
|
-
this._limit = e.limit || {}, this._maxTotalExpansions = this._limit.maxTotalExpansions || 0, this._maxExpandedLength = this._limit.maxExpandedLength || 0, this._postCheck = typeof e.postCheck == "function" ? e.postCheck : (e) => e, this._limitTiers = ht(this._limit.applyLimitsTo ??
|
|
1752
|
+
this._limit = e.limit || {}, this._maxTotalExpansions = this._limit.maxTotalExpansions || 0, this._maxExpandedLength = this._limit.maxExpandedLength || 0, this._postCheck = typeof e.postCheck == "function" ? e.postCheck : (e) => e, this._limitTiers = ht(this._limit.applyLimitsTo ?? V), this._numericAllowed = e.numericAllowed ?? !0, this._baseMap = B(ut, e.namedEntities || null), this._externalMap = Object.create(null), this._inputMap = Object.create(null), this._totalExpansions = 0, this._expandedLength = 0, this._removeSet = new Set(e.remove && Array.isArray(e.remove) ? e.remove : []), this._leaveSet = new Set(e.leave && Array.isArray(e.leave) ? e.leave : []);
|
|
1756
1753
|
let t = _t(e.ncr);
|
|
1757
1754
|
this._ncrXmlVersion = t.xmlVersion, this._ncrOnLevel = t.onLevel, this._ncrNullLevel = t.nullLevel;
|
|
1758
1755
|
}
|
|
1759
1756
|
setExternalEntities(e) {
|
|
1760
|
-
if (e) for (let t of Object.keys(e))
|
|
1761
|
-
this._externalMap =
|
|
1757
|
+
if (e) for (let t of Object.keys(e)) pt(t);
|
|
1758
|
+
this._externalMap = B(e);
|
|
1762
1759
|
}
|
|
1763
1760
|
addExternalEntity(e, t) {
|
|
1764
|
-
|
|
1761
|
+
pt(e), typeof t == "string" && t.indexOf("&") === -1 && (this._externalMap[e] = t);
|
|
1765
1762
|
}
|
|
1766
1763
|
addInputEntities(e) {
|
|
1767
|
-
this._totalExpansions = 0, this._expandedLength = 0, this._inputMap =
|
|
1764
|
+
this._totalExpansions = 0, this._expandedLength = 0, this._inputMap = B(e);
|
|
1768
1765
|
}
|
|
1769
1766
|
reset() {
|
|
1770
1767
|
return this._inputMap = Object.create(null), this._totalExpansions = 0, this._expandedLength = 0, this;
|
|
@@ -1792,7 +1789,7 @@ var vt = class {
|
|
|
1792
1789
|
continue;
|
|
1793
1790
|
}
|
|
1794
1791
|
let u, d;
|
|
1795
|
-
if (this._removeSet.has(l)) u = "", d === void 0 && (d =
|
|
1792
|
+
if (this._removeSet.has(l)) u = "", d === void 0 && (d = V);
|
|
1796
1793
|
else if (this._leaveSet.has(l)) {
|
|
1797
1794
|
a++;
|
|
1798
1795
|
continue;
|
|
@@ -1802,7 +1799,7 @@ var vt = class {
|
|
|
1802
1799
|
a++;
|
|
1803
1800
|
continue;
|
|
1804
1801
|
}
|
|
1805
|
-
u = e, d =
|
|
1802
|
+
u = e, d = H;
|
|
1806
1803
|
} else {
|
|
1807
1804
|
let e = this._resolveName(l);
|
|
1808
1805
|
u = e?.value, d = e?.tier;
|
|
@@ -1824,31 +1821,31 @@ var vt = class {
|
|
|
1824
1821
|
return this._postCheck(l, t);
|
|
1825
1822
|
}
|
|
1826
1823
|
_tierCounts(e) {
|
|
1827
|
-
return this._limitTiers.has(
|
|
1824
|
+
return this._limitTiers.has(mt) ? !0 : this._limitTiers.has(e);
|
|
1828
1825
|
}
|
|
1829
1826
|
_resolveName(e) {
|
|
1830
1827
|
if (e in this._inputMap) return {
|
|
1831
1828
|
value: this._inputMap[e],
|
|
1832
|
-
tier:
|
|
1829
|
+
tier: V
|
|
1833
1830
|
};
|
|
1834
1831
|
if (e in this._externalMap) return {
|
|
1835
1832
|
value: this._externalMap[e],
|
|
1836
|
-
tier:
|
|
1833
|
+
tier: V
|
|
1837
1834
|
};
|
|
1838
1835
|
if (e in this._baseMap) return {
|
|
1839
1836
|
value: this._baseMap[e],
|
|
1840
|
-
tier:
|
|
1837
|
+
tier: H
|
|
1841
1838
|
};
|
|
1842
1839
|
}
|
|
1843
1840
|
_classifyNCR(e) {
|
|
1844
|
-
return e === 0 ? this._ncrNullLevel : e >= 55296 && e <= 57343 || this._ncrXmlVersion === 1 && e >= 1 && e <= 31 && !gt.has(e) ?
|
|
1841
|
+
return e === 0 ? this._ncrNullLevel : e >= 55296 && e <= 57343 || this._ncrXmlVersion === 1 && e >= 1 && e <= 31 && !gt.has(e) ? U.remove : -1;
|
|
1845
1842
|
}
|
|
1846
1843
|
_applyNCRAction(e, t, n) {
|
|
1847
1844
|
switch (e) {
|
|
1848
|
-
case
|
|
1849
|
-
case
|
|
1850
|
-
case
|
|
1851
|
-
case
|
|
1845
|
+
case U.allow: return String.fromCodePoint(n);
|
|
1846
|
+
case U.remove: return "";
|
|
1847
|
+
case U.leave: return;
|
|
1848
|
+
case U.throw: throw Error(`[EntityDecoder] Prohibited numeric character reference &${t}; (U+${n.toString(16).toUpperCase().padStart(4, "0")})`);
|
|
1852
1849
|
default: return String.fromCodePoint(n);
|
|
1853
1850
|
}
|
|
1854
1851
|
}
|
|
@@ -1856,11 +1853,11 @@ var vt = class {
|
|
|
1856
1853
|
let t = e.charCodeAt(1), n;
|
|
1857
1854
|
if (n = t === 120 || t === 88 ? parseInt(e.slice(2), 16) : parseInt(e.slice(1), 10), Number.isNaN(n) || n < 0 || n > 1114111) return;
|
|
1858
1855
|
let r = this._classifyNCR(n);
|
|
1859
|
-
if (!this._numericAllowed && r <
|
|
1856
|
+
if (!this._numericAllowed && r < U.remove) return;
|
|
1860
1857
|
let i = r === -1 ? this._ncrOnLevel : Math.max(this._ncrOnLevel, r);
|
|
1861
1858
|
return this._applyNCRAction(i, e, n);
|
|
1862
1859
|
}
|
|
1863
|
-
}, yt = (e) =>
|
|
1860
|
+
}, yt = (e) => I.includes(e) ? "__" + e : e, bt = {
|
|
1864
1861
|
preserveOrder: !1,
|
|
1865
1862
|
attributeNamePrefix: "@_",
|
|
1866
1863
|
attributesGroupName: !1,
|
|
@@ -1907,7 +1904,7 @@ var vt = class {
|
|
|
1907
1904
|
function xt(e, t) {
|
|
1908
1905
|
if (typeof e != "string") return;
|
|
1909
1906
|
let n = e.toLowerCase();
|
|
1910
|
-
if (
|
|
1907
|
+
if (I.some((e) => n === e.toLowerCase()) || Ie.some((e) => n === e.toLowerCase())) throw Error(`[SECURITY] Invalid ${t}: "${e}" is a reserved JavaScript keyword that could cause prototype pollution`);
|
|
1911
1908
|
}
|
|
1912
1909
|
function St(e, t) {
|
|
1913
1910
|
return typeof e == "boolean" ? {
|
|
@@ -1957,7 +1954,7 @@ var Ct = function(e) {
|
|
|
1957
1954
|
];
|
|
1958
1955
|
for (let { value: e, name: t } of n) e && xt(e, t);
|
|
1959
1956
|
return t.onDangerousProperty === null && (t.onDangerousProperty = yt), t.processEntities = St(t.processEntities, t.htmlEntities), t.unpairedTagsSet = new Set(t.unpairedTags), t.stopNodes && Array.isArray(t.stopNodes) && (t.stopNodes = t.stopNodes.map((e) => typeof e == "string" && e.startsWith("*.") ? ".." + e.substring(2) : e)), t;
|
|
1960
|
-
}, wt = typeof Symbol == "function" ? Symbol("XML Node Metadata") : "@@xmlMetadata",
|
|
1957
|
+
}, wt = typeof Symbol == "function" ? Symbol("XML Node Metadata") : "@@xmlMetadata", W = class {
|
|
1961
1958
|
constructor(e) {
|
|
1962
1959
|
this.tagname = e, this.child = [], this[":@"] = Object.create(null);
|
|
1963
1960
|
}
|
|
@@ -1973,9 +1970,21 @@ var Ct = function(e) {
|
|
|
1973
1970
|
static getMetaDataSymbol() {
|
|
1974
1971
|
return wt;
|
|
1975
1972
|
}
|
|
1976
|
-
}, Tt =
|
|
1977
|
-
|
|
1978
|
-
|
|
1973
|
+
}, Tt = ":A-Za-z_À-ÖØ-öø-˿Ͱ-ͽͿ-҆҈--⁰-Ⰰ-、-豈-﷏ﷰ-�", Et = ":A-Za-z_À-ÖØ-öø-˿Ͱ-ͽͿ-҆҈--⁰-Ⰰ-、-豈-﷏ﷰ-�\\-\\.\\d·̀-ͯ‿-⁀", Dt = ":A-Za-z_À-˿Ͱ-ͽͿ-҆҈--⁰-Ⰰ-、-豈-﷏ﷰ-�𐀀-", Ot = ":A-Za-z_À-˿Ͱ-ͽͿ-҆҈--⁰-Ⰰ-、-豈-﷏ﷰ-�𐀀-\\-\\.\\d·̀-ͯ҇‿-⁀", kt = (e, t, n = "") => {
|
|
1974
|
+
let r = `[${e.replace(":", "")}][${t.replace(":", "")}]*`;
|
|
1975
|
+
return {
|
|
1976
|
+
name: RegExp(`^[${e}][${t}]*$`, n),
|
|
1977
|
+
ncName: RegExp(`^${r}$`, n),
|
|
1978
|
+
qName: RegExp(`^${r}(?::${r})?$`, n),
|
|
1979
|
+
nmToken: RegExp(`^[${t}]+$`, n),
|
|
1980
|
+
nmTokens: RegExp(`^[${t}]+(?:\\s+[${t}]+)*$`, n)
|
|
1981
|
+
};
|
|
1982
|
+
}, At = kt(Tt, Et), jt = kt(Dt, Ot, "u"), Mt = (e = "1.0") => e === "1.1" ? jt : At, G = (e, { xmlVersion: t = "1.0" } = {}) => Mt(t).qName.test(e), Nt = class {
|
|
1983
|
+
constructor(e, t) {
|
|
1984
|
+
this.suppressValidationErr = !e, this.options = e, this.xmlVersion = t || 1;
|
|
1985
|
+
}
|
|
1986
|
+
setXmlVersion(e = 1) {
|
|
1987
|
+
this.xmlVersion = e;
|
|
1979
1988
|
}
|
|
1980
1989
|
readDocType(e, t) {
|
|
1981
1990
|
let n = Object.create(null), r = 0;
|
|
@@ -1983,23 +1992,23 @@ var Ct = function(e) {
|
|
|
1983
1992
|
t += 9;
|
|
1984
1993
|
let i = 1, a = !1, o = !1, s = "";
|
|
1985
1994
|
for (; t < e.length; t++) if (e[t] === "<" && !o) {
|
|
1986
|
-
if (a &&
|
|
1995
|
+
if (a && q(e, "!ENTITY", t)) {
|
|
1987
1996
|
t += 7;
|
|
1988
1997
|
let i, a;
|
|
1989
1998
|
if ([i, a, t] = this.readEntityExp(e, t + 1, this.suppressValidationErr), a.indexOf("&") === -1) {
|
|
1990
1999
|
if (this.options.enabled !== !1 && this.options.maxEntityCount != null && r >= this.options.maxEntityCount) throw Error(`Entity count (${r + 1}) exceeds maximum allowed (${this.options.maxEntityCount})`);
|
|
1991
2000
|
n[i] = a, r++;
|
|
1992
2001
|
}
|
|
1993
|
-
} else if (a &&
|
|
2002
|
+
} else if (a && q(e, "!ELEMENT", t)) {
|
|
1994
2003
|
t += 8;
|
|
1995
2004
|
let { index: n } = this.readElementExp(e, t + 1);
|
|
1996
2005
|
t = n;
|
|
1997
|
-
} else if (a &&
|
|
1998
|
-
else if (a &&
|
|
2006
|
+
} else if (a && q(e, "!ATTLIST", t)) t += 8;
|
|
2007
|
+
else if (a && q(e, "!NOTATION", t)) {
|
|
1999
2008
|
t += 9;
|
|
2000
2009
|
let { index: n } = this.readNotationExp(e, t + 1, this.suppressValidationErr);
|
|
2001
2010
|
t = n;
|
|
2002
|
-
} else if (
|
|
2011
|
+
} else if (q(e, "!--", t)) o = !0;
|
|
2003
2012
|
else throw Error("Invalid DOCTYPE");
|
|
2004
2013
|
i++, s = "";
|
|
2005
2014
|
} else if (e[t] === ">") {
|
|
@@ -2013,11 +2022,11 @@ var Ct = function(e) {
|
|
|
2013
2022
|
};
|
|
2014
2023
|
}
|
|
2015
2024
|
readEntityExp(e, t) {
|
|
2016
|
-
t =
|
|
2025
|
+
t = K(e, t);
|
|
2017
2026
|
let n = t;
|
|
2018
2027
|
for (; t < e.length && !/\s/.test(e[t]) && e[t] !== "\"" && e[t] !== "'";) t++;
|
|
2019
2028
|
let r = e.substring(n, t);
|
|
2020
|
-
if (
|
|
2029
|
+
if (J(r, { xmlVersion: this.xmlVersion }), t = K(e, t), !this.suppressValidationErr) {
|
|
2021
2030
|
if (e.substring(t, t + 6).toUpperCase() === "SYSTEM") throw Error("External entities are not supported");
|
|
2022
2031
|
if (e[t] === "%") throw Error("Parameter entities are not supported");
|
|
2023
2032
|
}
|
|
@@ -2030,16 +2039,16 @@ var Ct = function(e) {
|
|
|
2030
2039
|
];
|
|
2031
2040
|
}
|
|
2032
2041
|
readNotationExp(e, t) {
|
|
2033
|
-
t =
|
|
2042
|
+
t = K(e, t);
|
|
2034
2043
|
let n = t;
|
|
2035
2044
|
for (; t < e.length && !/\s/.test(e[t]);) t++;
|
|
2036
2045
|
let r = e.substring(n, t);
|
|
2037
|
-
!this.suppressValidationErr &&
|
|
2046
|
+
!this.suppressValidationErr && J(r, { xmlVersion: this.xmlVersion }), t = K(e, t);
|
|
2038
2047
|
let i = e.substring(t, t + 6).toUpperCase();
|
|
2039
2048
|
if (!this.suppressValidationErr && i !== "SYSTEM" && i !== "PUBLIC") throw Error(`Expected SYSTEM or PUBLIC, found "${i}"`);
|
|
2040
|
-
t += i.length, t =
|
|
2049
|
+
t += i.length, t = K(e, t);
|
|
2041
2050
|
let a = null, o = null;
|
|
2042
|
-
if (i === "PUBLIC") [t, a] = this.readIdentifierVal(e, t, "publicIdentifier"), t =
|
|
2051
|
+
if (i === "PUBLIC") [t, a] = this.readIdentifierVal(e, t, "publicIdentifier"), t = K(e, t), (e[t] === "\"" || e[t] === "'") && ([t, o] = this.readIdentifierVal(e, t, "systemIdentifier"));
|
|
2043
2052
|
else if (i === "SYSTEM" && ([t, o] = this.readIdentifierVal(e, t, "systemIdentifier"), !this.suppressValidationErr && !o)) throw Error("Missing mandatory system identifier for SYSTEM notation");
|
|
2044
2053
|
return {
|
|
2045
2054
|
notationName: r,
|
|
@@ -2058,15 +2067,15 @@ var Ct = function(e) {
|
|
|
2058
2067
|
return t++, [t, r];
|
|
2059
2068
|
}
|
|
2060
2069
|
readElementExp(e, t) {
|
|
2061
|
-
t =
|
|
2070
|
+
t = K(e, t);
|
|
2062
2071
|
let n = t;
|
|
2063
2072
|
for (; t < e.length && !/\s/.test(e[t]);) t++;
|
|
2064
2073
|
let r = e.substring(n, t);
|
|
2065
|
-
if (!this.suppressValidationErr && !
|
|
2066
|
-
t =
|
|
2074
|
+
if (!this.suppressValidationErr && !G(r, { xmlVersion: this.xmlVersion })) throw Error(`Invalid element name: "${r}"`);
|
|
2075
|
+
t = K(e, t);
|
|
2067
2076
|
let i = "";
|
|
2068
|
-
if (e[t] === "E" &&
|
|
2069
|
-
else if (e[t] === "A" &&
|
|
2077
|
+
if (e[t] === "E" && q(e, "MPTY", t)) t += 4;
|
|
2078
|
+
else if (e[t] === "A" && q(e, "NY", t)) t += 2;
|
|
2070
2079
|
else if (e[t] === "(") {
|
|
2071
2080
|
t++;
|
|
2072
2081
|
let n = t;
|
|
@@ -2080,25 +2089,25 @@ var Ct = function(e) {
|
|
|
2080
2089
|
};
|
|
2081
2090
|
}
|
|
2082
2091
|
readAttlistExp(e, t) {
|
|
2083
|
-
t =
|
|
2092
|
+
t = K(e, t);
|
|
2084
2093
|
let n = t;
|
|
2085
2094
|
for (; t < e.length && !/\s/.test(e[t]);) t++;
|
|
2086
2095
|
let r = e.substring(n, t);
|
|
2087
|
-
for (
|
|
2096
|
+
for (J(r, { xmlVersion: this.xmlVersion }), t = K(e, t), n = t; t < e.length && !/\s/.test(e[t]);) t++;
|
|
2088
2097
|
let i = e.substring(n, t);
|
|
2089
|
-
if (!
|
|
2090
|
-
t =
|
|
2098
|
+
if (!J(i, { xmlVersion: this.xmlVersion })) throw Error(`Invalid attribute name: "${i}"`);
|
|
2099
|
+
t = K(e, t);
|
|
2091
2100
|
let a = "";
|
|
2092
2101
|
if (e.substring(t, t + 8).toUpperCase() === "NOTATION") {
|
|
2093
|
-
if (a = "NOTATION", t += 8, t =
|
|
2102
|
+
if (a = "NOTATION", t += 8, t = K(e, t), e[t] !== "(") throw Error(`Expected '(', found "${e[t]}"`);
|
|
2094
2103
|
t++;
|
|
2095
2104
|
let n = [];
|
|
2096
2105
|
for (; t < e.length && e[t] !== ")";) {
|
|
2097
2106
|
let r = t;
|
|
2098
2107
|
for (; t < e.length && e[t] !== "|" && e[t] !== ")";) t++;
|
|
2099
2108
|
let i = e.substring(r, t);
|
|
2100
|
-
if (i = i.trim(), !
|
|
2101
|
-
n.push(i), e[t] === "|" && (t++, t =
|
|
2109
|
+
if (i = i.trim(), !J(i, { xmlVersion: this.xmlVersion })) throw Error(`Invalid notation name: "${i}"`);
|
|
2110
|
+
n.push(i), e[t] === "|" && (t++, t = K(e, t));
|
|
2102
2111
|
}
|
|
2103
2112
|
if (e[t] !== ")") throw Error("Unterminated list of notations");
|
|
2104
2113
|
t++, a += " (" + n.join("|") + ")";
|
|
@@ -2116,7 +2125,7 @@ var Ct = function(e) {
|
|
|
2116
2125
|
"NMTOKENS"
|
|
2117
2126
|
].includes(a.toUpperCase())) throw Error(`Invalid attribute type: "${a}"`);
|
|
2118
2127
|
}
|
|
2119
|
-
t =
|
|
2128
|
+
t = K(e, t);
|
|
2120
2129
|
let o = "";
|
|
2121
2130
|
return e.substring(t, t + 8).toUpperCase() === "#REQUIRED" ? (o = "#REQUIRED", t += 8) : e.substring(t, t + 7).toUpperCase() === "#IMPLIED" ? (o = "#IMPLIED", t += 7) : [t, o] = this.readIdentifierVal(e, t, "ATTLIST"), {
|
|
2122
2131
|
elementName: r,
|
|
@@ -2126,39 +2135,43 @@ var Ct = function(e) {
|
|
|
2126
2135
|
index: t
|
|
2127
2136
|
};
|
|
2128
2137
|
}
|
|
2129
|
-
},
|
|
2138
|
+
}, K = (e, t) => {
|
|
2130
2139
|
for (; t < e.length && /\s/.test(e[t]);) t++;
|
|
2131
2140
|
return t;
|
|
2132
2141
|
};
|
|
2133
|
-
function
|
|
2142
|
+
function q(e, t, n) {
|
|
2134
2143
|
for (let r = 0; r < t.length; r++) if (t[r] !== e[n + r + 1]) return !1;
|
|
2135
2144
|
return !0;
|
|
2136
2145
|
}
|
|
2137
|
-
function
|
|
2138
|
-
if (
|
|
2146
|
+
function J(e, t) {
|
|
2147
|
+
if (G(e, { xmlVersion: t })) return e;
|
|
2139
2148
|
throw Error(`Invalid entity name ${e}`);
|
|
2140
2149
|
}
|
|
2141
2150
|
//#endregion
|
|
2142
|
-
//#region ../../node_modules/.pnpm/strnum@2.
|
|
2143
|
-
var
|
|
2151
|
+
//#region ../../node_modules/.pnpm/strnum@2.3.0/node_modules/strnum/strnum.js
|
|
2152
|
+
var Pt = /^[-+]?0x[a-fA-F0-9]+$/, Ft = /^0b[01]+$/, It = /^0o[0-7]+$/, Lt = /^([\-\+])?(0*)([0-9]*(\.[0-9]*)?)$/, Rt = {
|
|
2144
2153
|
hex: !0,
|
|
2154
|
+
binary: !1,
|
|
2155
|
+
octal: !1,
|
|
2145
2156
|
leadingZeros: !0,
|
|
2146
2157
|
decimalPoint: ".",
|
|
2147
2158
|
eNotation: !0,
|
|
2148
2159
|
infinity: "original"
|
|
2149
2160
|
};
|
|
2150
|
-
function
|
|
2151
|
-
if (t = Object.assign({},
|
|
2161
|
+
function zt(e, t = {}) {
|
|
2162
|
+
if (t = Object.assign({}, Rt, t), !e || typeof e != "string") return e;
|
|
2152
2163
|
let n = e.trim();
|
|
2153
2164
|
if (n.length === 0 || t.skipLike !== void 0 && t.skipLike.test(n)) return e;
|
|
2154
2165
|
if (n === "0") return 0;
|
|
2155
|
-
if (t.hex &&
|
|
2156
|
-
if (
|
|
2157
|
-
if (
|
|
2166
|
+
if (t.hex && Pt.test(n)) return Y(n, 16);
|
|
2167
|
+
if (t.binary && Ft.test(n)) return Y(n, 2);
|
|
2168
|
+
if (t.octal && It.test(n)) return Y(n, 8);
|
|
2169
|
+
if (!isFinite(n)) return Ut(e, Number(n), t);
|
|
2170
|
+
if (n.includes("e") || n.includes("E")) return Vt(e, n, t);
|
|
2158
2171
|
{
|
|
2159
|
-
let r =
|
|
2172
|
+
let r = Lt.exec(n);
|
|
2160
2173
|
if (r) {
|
|
2161
|
-
let i = r[1] || "", a = r[2], o =
|
|
2174
|
+
let i = r[1] || "", a = r[2], o = Ht(r[3]), s = i ? e[a.length + 1] === "." : e[a.length] === ".";
|
|
2162
2175
|
if (!t.leadingZeros && (a.length > 1 || a.length === 1 && !s)) return e;
|
|
2163
2176
|
{
|
|
2164
2177
|
let r = Number(n), s = String(r);
|
|
@@ -2171,25 +2184,26 @@ function kt(e, t = {}) {
|
|
|
2171
2184
|
} else return e;
|
|
2172
2185
|
}
|
|
2173
2186
|
}
|
|
2174
|
-
var
|
|
2175
|
-
function
|
|
2187
|
+
var Bt = /^([-+])?(0*)(\d*(\.\d*)?[eE][-\+]?\d+)$/;
|
|
2188
|
+
function Vt(e, t, n) {
|
|
2176
2189
|
if (!n.eNotation) return e;
|
|
2177
|
-
let r = t.match(
|
|
2190
|
+
let r = t.match(Bt);
|
|
2178
2191
|
if (r) {
|
|
2179
2192
|
let i = r[1] || "", a = r[3].indexOf("e") === -1 ? "E" : "e", o = r[2], s = i ? e[o.length + 1] === a : e[o.length] === a;
|
|
2180
2193
|
return o.length > 1 && s ? e : o.length === 1 && (r[3].startsWith(`.${a}`) || r[3][0] === a) ? Number(t) : o.length > 0 ? n.leadingZeros && !s ? (t = (r[1] || "") + r[3], Number(t)) : e : Number(t);
|
|
2181
2194
|
} else return e;
|
|
2182
2195
|
}
|
|
2183
|
-
function
|
|
2196
|
+
function Ht(e) {
|
|
2184
2197
|
return e && e.indexOf(".") !== -1 ? (e = e.replace(/0+$/, ""), e === "." ? e = "0" : e[0] === "." ? e = "0" + e : e[e.length - 1] === "." && (e = e.substring(0, e.length - 1)), e) : e;
|
|
2185
2198
|
}
|
|
2186
|
-
function
|
|
2187
|
-
|
|
2199
|
+
function Y(e, t) {
|
|
2200
|
+
let n = e.trim();
|
|
2201
|
+
if ((t === 2 || t === 8) && (e = n.substring(2)), parseInt) return parseInt(e, t);
|
|
2188
2202
|
if (Number.parseInt) return Number.parseInt(e, t);
|
|
2189
2203
|
if (window && window.parseInt) return window.parseInt(e, t);
|
|
2190
2204
|
throw Error("parseInt, Number.parseInt, window.parseInt are not supported");
|
|
2191
2205
|
}
|
|
2192
|
-
function
|
|
2206
|
+
function Ut(e, t, n) {
|
|
2193
2207
|
let r = t === Infinity;
|
|
2194
2208
|
switch (n.infinity.toLowerCase()) {
|
|
2195
2209
|
case "null": return null;
|
|
@@ -2199,8 +2213,8 @@ function Pt(e, t, n) {
|
|
|
2199
2213
|
}
|
|
2200
2214
|
}
|
|
2201
2215
|
//#endregion
|
|
2202
|
-
//#region ../../node_modules/.pnpm/fast-xml-parser@5.
|
|
2203
|
-
function
|
|
2216
|
+
//#region ../../node_modules/.pnpm/fast-xml-parser@5.8.0/node_modules/fast-xml-parser/src/ignoreAttributes.js
|
|
2217
|
+
function Wt(e) {
|
|
2204
2218
|
return typeof e == "function" ? e : Array.isArray(e) ? (t) => {
|
|
2205
2219
|
for (let n of e) if (typeof n == "string" && t === n || n instanceof RegExp && n.test(t)) return !0;
|
|
2206
2220
|
} : () => !1;
|
|
@@ -2263,7 +2277,7 @@ var X = class {
|
|
|
2263
2277
|
toString() {
|
|
2264
2278
|
return this.pattern;
|
|
2265
2279
|
}
|
|
2266
|
-
},
|
|
2280
|
+
}, Gt = class {
|
|
2267
2281
|
constructor() {
|
|
2268
2282
|
this._byDepthAndTag = /* @__PURE__ */ new Map(), this._wildcardByDepth = /* @__PURE__ */ new Map(), this._deepWildcards = [], this._patterns = /* @__PURE__ */ new Set(), this._sealed = !1;
|
|
2269
2283
|
}
|
|
@@ -2310,7 +2324,7 @@ var X = class {
|
|
|
2310
2324
|
for (let t = 0; t < this._deepWildcards.length; t++) if (e.matches(this._deepWildcards[t])) return this._deepWildcards[t];
|
|
2311
2325
|
return null;
|
|
2312
2326
|
}
|
|
2313
|
-
},
|
|
2327
|
+
}, Kt = class {
|
|
2314
2328
|
constructor(e) {
|
|
2315
2329
|
this._matcher = e;
|
|
2316
2330
|
}
|
|
@@ -2361,9 +2375,9 @@ var X = class {
|
|
|
2361
2375
|
matchesAny(e) {
|
|
2362
2376
|
return e.matchesAny(this._matcher);
|
|
2363
2377
|
}
|
|
2364
|
-
},
|
|
2378
|
+
}, qt = class {
|
|
2365
2379
|
constructor(e = {}) {
|
|
2366
|
-
this.separator = e.separator || ".", this.path = [], this.siblingStacks = [], this._pathStringCache = null, this._view = new
|
|
2380
|
+
this.separator = e.separator || ".", this.path = [], this.siblingStacks = [], this._pathStringCache = null, this._view = new Kt(this);
|
|
2367
2381
|
}
|
|
2368
2382
|
push(e, t = null, n = null) {
|
|
2369
2383
|
this._pathStringCache = null, this.path.length > 0 && (this.path[this.path.length - 1].values = void 0);
|
|
@@ -2486,8 +2500,8 @@ var X = class {
|
|
|
2486
2500
|
}
|
|
2487
2501
|
};
|
|
2488
2502
|
//#endregion
|
|
2489
|
-
//#region ../../node_modules/.pnpm/fast-xml-parser@5.
|
|
2490
|
-
function
|
|
2503
|
+
//#region ../../node_modules/.pnpm/fast-xml-parser@5.8.0/node_modules/fast-xml-parser/src/xmlparser/OrderedObjParser.js
|
|
2504
|
+
function Jt(e, t) {
|
|
2491
2505
|
if (!e) return {};
|
|
2492
2506
|
let n = t.attributesGroupName ? e[t.attributesGroupName] : e;
|
|
2493
2507
|
if (!n) return {};
|
|
@@ -2498,7 +2512,7 @@ function zt(e, t) {
|
|
|
2498
2512
|
} else r[e] = n[e];
|
|
2499
2513
|
return r;
|
|
2500
2514
|
}
|
|
2501
|
-
function
|
|
2515
|
+
function Yt(e) {
|
|
2502
2516
|
if (!e || typeof e != "string") return;
|
|
2503
2517
|
let t = e.indexOf(":");
|
|
2504
2518
|
if (t !== -1 && t > 0) {
|
|
@@ -2506,13 +2520,13 @@ function Bt(e) {
|
|
|
2506
2520
|
if (n !== "xmlns") return n;
|
|
2507
2521
|
}
|
|
2508
2522
|
}
|
|
2509
|
-
var
|
|
2523
|
+
var Xt = class {
|
|
2510
2524
|
constructor(e, t) {
|
|
2511
|
-
this.options = e, this.currentNode = null, this.tagsNodeStack = [], this.parseXml =
|
|
2512
|
-
let n = { ...
|
|
2525
|
+
this.options = e, this.currentNode = null, this.tagsNodeStack = [], this.parseXml = tn, this.parseTextData = Zt, this.resolveNameSpace = Qt, this.buildAttributesMap = en, this.isItStopNode = on, this.replaceEntitiesValue = rn, this.readStopNodeData = ln, this.saveTextToParentTag = an, this.addChild = nn, this.ignoreAttributesFn = Wt(this.options.ignoreAttributes), this.entityExpansionCount = 0, this.currentExpandedLength = 0;
|
|
2526
|
+
let n = { ...ut };
|
|
2513
2527
|
this.options.entityDecoder ? this.entityDecoder = this.options.entityDecoder : (typeof this.options.htmlEntities == "object" ? n = this.options.htmlEntities : this.options.htmlEntities === !0 && (n = {
|
|
2514
|
-
...
|
|
2515
|
-
...
|
|
2528
|
+
...dt,
|
|
2529
|
+
...st
|
|
2516
2530
|
}), this.entityDecoder = new vt({
|
|
2517
2531
|
namedEntities: {
|
|
2518
2532
|
...n,
|
|
@@ -2524,7 +2538,7 @@ var Vt = class {
|
|
|
2524
2538
|
maxExpandedLength: this.options.processEntities.maxExpandedLength,
|
|
2525
2539
|
applyLimitsTo: this.options.processEntities.appliesTo
|
|
2526
2540
|
}
|
|
2527
|
-
})), this.matcher = new
|
|
2541
|
+
})), this.matcher = new qt(), this.readonlyMatcher = this.matcher.readOnly(), this.isCurrentNodeStopNode = !1, this.stopNodeExpressionsSet = new Gt();
|
|
2528
2542
|
let r = this.options.stopNodes;
|
|
2529
2543
|
if (r && r.length > 0) {
|
|
2530
2544
|
for (let e = 0; e < r.length; e++) {
|
|
@@ -2535,15 +2549,15 @@ var Vt = class {
|
|
|
2535
2549
|
}
|
|
2536
2550
|
}
|
|
2537
2551
|
};
|
|
2538
|
-
function
|
|
2552
|
+
function Zt(e, t, n, r, i, a, o) {
|
|
2539
2553
|
let s = this.options;
|
|
2540
2554
|
if (e !== void 0 && (s.trimValues && !r && (e = e.trim()), e.length > 0)) {
|
|
2541
2555
|
o || (e = this.replaceEntitiesValue(e, t, n));
|
|
2542
2556
|
let r = s.jPath ? n.toString() : n, c = s.tagValueProcessor(t, e, r, i, a);
|
|
2543
|
-
return c == null ? e : typeof c != typeof e || c !== e ? c : s.trimValues || e.trim() === e ?
|
|
2557
|
+
return c == null ? e : typeof c != typeof e || c !== e ? c : s.trimValues || e.trim() === e ? un(e, s.parseTagValue, s.numberParseOptions) : e;
|
|
2544
2558
|
}
|
|
2545
2559
|
}
|
|
2546
|
-
function
|
|
2560
|
+
function Qt(e) {
|
|
2547
2561
|
if (this.options.removeNSPrefix) {
|
|
2548
2562
|
let t = e.split(":"), n = e.charAt(0) === "/" ? "/" : "";
|
|
2549
2563
|
if (t[0] === "xmlns") return "";
|
|
@@ -2551,11 +2565,11 @@ function Ut(e) {
|
|
|
2551
2565
|
}
|
|
2552
2566
|
return e;
|
|
2553
2567
|
}
|
|
2554
|
-
var
|
|
2555
|
-
function
|
|
2568
|
+
var $t = /* @__PURE__ */ RegExp("([^\\s=]+)\\s*(=\\s*(['\"])([\\s\\S]*?)\\3)?", "gm");
|
|
2569
|
+
function en(e, t, n, r = !1) {
|
|
2556
2570
|
let i = this.options;
|
|
2557
2571
|
if (r === !0 || i.ignoreAttributes !== !0 && typeof e == "string") {
|
|
2558
|
-
let r =
|
|
2572
|
+
let r = Ne(e, $t), a = r.length, o = {}, s = Array(a), c = !1, l = {};
|
|
2559
2573
|
for (let e = 0; e < a; e++) {
|
|
2560
2574
|
let t = this.resolveNameSpace(r[e][1]), a = r[e][4];
|
|
2561
2575
|
if (t.length && a !== void 0) {
|
|
@@ -2569,9 +2583,9 @@ function Gt(e, t, n, r = !1) {
|
|
|
2569
2583
|
let t = this.resolveNameSpace(r[e][1]);
|
|
2570
2584
|
if (this.ignoreAttributesFn(t, u)) continue;
|
|
2571
2585
|
let n = i.attributeNamePrefix + t;
|
|
2572
|
-
if (t.length) if (i.transformAttributeName && (n = i.transformAttributeName(n)), n =
|
|
2586
|
+
if (t.length) if (i.transformAttributeName && (n = i.transformAttributeName(n)), n = dn(n, i), r[e][4] !== void 0) {
|
|
2573
2587
|
let r = s[e], a = i.attributeValueProcessor(t, r, u);
|
|
2574
|
-
a == null ? o[n] = r : typeof a != typeof r || a !== r ? o[n] = a : o[n] =
|
|
2588
|
+
a == null ? o[n] = r : typeof a != typeof r || a !== r ? o[n] = a : o[n] = un(r, i.parseAttributeValue, i.numberParseOptions), d = !0;
|
|
2575
2589
|
} else i.allowBooleanAttributes && (o[n] = !0, d = !0);
|
|
2576
2590
|
}
|
|
2577
2591
|
if (!d) return;
|
|
@@ -2582,11 +2596,11 @@ function Gt(e, t, n, r = !1) {
|
|
|
2582
2596
|
return o;
|
|
2583
2597
|
}
|
|
2584
2598
|
}
|
|
2585
|
-
var
|
|
2599
|
+
var tn = function(e) {
|
|
2586
2600
|
e = e.replace(/\r\n?/g, "\n");
|
|
2587
|
-
let t = new
|
|
2601
|
+
let t = new W("!xml"), n = t, r = "";
|
|
2588
2602
|
this.matcher.reset(), this.entityDecoder.reset(), this.entityExpansionCount = 0, this.currentExpandedLength = 0;
|
|
2589
|
-
let i = this.options, a = new
|
|
2603
|
+
let i = this.options, a = new Nt(i.processEntities), o = e.length;
|
|
2590
2604
|
for (let s = 0; s < o; s++) if (e[s] === "<") {
|
|
2591
2605
|
let c = e.charCodeAt(s + 1);
|
|
2592
2606
|
if (c === 47) {
|
|
@@ -2603,14 +2617,14 @@ var Kt = function(e) {
|
|
|
2603
2617
|
let t = Q(e, s, !1, "?>");
|
|
2604
2618
|
if (!t) throw Error("Pi Tag is not closed.");
|
|
2605
2619
|
r = this.saveTextToParentTag(r, n, this.readonlyMatcher);
|
|
2606
|
-
let
|
|
2607
|
-
if (
|
|
2608
|
-
let e =
|
|
2609
|
-
this.entityDecoder.setXmlVersion(Number(e) || 1);
|
|
2620
|
+
let o = this.buildAttributesMap(t.tagExp, this.matcher, t.tagName, !0);
|
|
2621
|
+
if (o) {
|
|
2622
|
+
let e = o[this.options.attributeNamePrefix + "version"];
|
|
2623
|
+
this.entityDecoder.setXmlVersion(Number(e) || 1), a.setXmlVersion(Number(e) || 1);
|
|
2610
2624
|
}
|
|
2611
2625
|
if (!(i.ignoreDeclaration && t.tagName === "?xml" || i.ignorePiTags)) {
|
|
2612
|
-
let e = new
|
|
2613
|
-
e.add(i.textNodeName, ""), t.tagName !== t.tagExp && t.attrExpPresent && i.ignoreAttributes !== !0 && (e[":@"] =
|
|
2626
|
+
let e = new W(t.tagName);
|
|
2627
|
+
e.add(i.textNodeName, ""), t.tagName !== t.tagExp && t.attrExpPresent && i.ignoreAttributes !== !0 && (e[":@"] = o), this.addChild(n, e, this.readonlyMatcher, s);
|
|
2614
2628
|
}
|
|
2615
2629
|
s = t.closeIndex + 1;
|
|
2616
2630
|
} else if (c === 33 && e.charCodeAt(s + 2) === 45 && e.charCodeAt(s + 3) === 45) {
|
|
@@ -2642,7 +2656,7 @@ var Kt = function(e) {
|
|
|
2642
2656
|
let m = !1;
|
|
2643
2657
|
u.length > 0 && u.lastIndexOf("/") === u.length - 1 && (m = !0, c[c.length - 1] === "/" ? (c = c.substr(0, c.length - 1), u = c) : u = u.substr(0, u.length - 1), d = c !== u);
|
|
2644
2658
|
let h = null, g;
|
|
2645
|
-
g =
|
|
2659
|
+
g = Yt(l), c !== t.tagname && this.matcher.push(c, {}, g), c !== u && d && (h = this.buildAttributesMap(u, this.matcher, c), h && Jt(h, i)), c !== t.tagname && (this.isCurrentNodeStopNode = this.isItStopNode());
|
|
2646
2660
|
let _ = s;
|
|
2647
2661
|
if (this.isCurrentNodeStopNode) {
|
|
2648
2662
|
let t = "";
|
|
@@ -2653,19 +2667,19 @@ var Kt = function(e) {
|
|
|
2653
2667
|
if (!n) throw Error(`Unexpected end of ${l}`);
|
|
2654
2668
|
s = n.i, t = n.tagContent;
|
|
2655
2669
|
}
|
|
2656
|
-
let r = new
|
|
2670
|
+
let r = new W(c);
|
|
2657
2671
|
h && (r[":@"] = h), r.add(i.textNodeName, t), this.matcher.pop(), this.isCurrentNodeStopNode = !1, this.addChild(n, r, this.readonlyMatcher, _);
|
|
2658
2672
|
} else {
|
|
2659
2673
|
if (m) {
|
|
2660
2674
|
({tagName: c, tagExp: u} = $(i.transformTagName, c, u, i));
|
|
2661
|
-
let e = new
|
|
2675
|
+
let e = new W(c);
|
|
2662
2676
|
h && (e[":@"] = h), this.addChild(n, e, this.readonlyMatcher, _), this.matcher.pop(), this.isCurrentNodeStopNode = !1;
|
|
2663
2677
|
} else if (i.unpairedTagsSet.has(c)) {
|
|
2664
|
-
let e = new
|
|
2678
|
+
let e = new W(c);
|
|
2665
2679
|
h && (e[":@"] = h), this.addChild(n, e, this.readonlyMatcher, _), this.matcher.pop(), this.isCurrentNodeStopNode = !1, s = a.closeIndex;
|
|
2666
2680
|
continue;
|
|
2667
2681
|
} else {
|
|
2668
|
-
let e = new
|
|
2682
|
+
let e = new W(c);
|
|
2669
2683
|
if (this.tagsNodeStack.length > i.maxNestedTags) throw Error("Maximum nested tags exceeded");
|
|
2670
2684
|
this.tagsNodeStack.push(n), h && (e[":@"] = h), this.addChild(n, e, this.readonlyMatcher, _), n = e;
|
|
2671
2685
|
}
|
|
@@ -2675,12 +2689,12 @@ var Kt = function(e) {
|
|
|
2675
2689
|
} else r += e[s];
|
|
2676
2690
|
return t.child;
|
|
2677
2691
|
};
|
|
2678
|
-
function
|
|
2692
|
+
function nn(e, t, n, r) {
|
|
2679
2693
|
this.options.captureMetaData || (r = void 0);
|
|
2680
2694
|
let i = this.options.jPath ? n.toString() : n, a = this.options.updateTag(t.tagname, i, t[":@"]);
|
|
2681
2695
|
a === !1 || (typeof a == "string" && (t.tagname = a), e.addChild(t, r));
|
|
2682
2696
|
}
|
|
2683
|
-
function
|
|
2697
|
+
function rn(e, t, n) {
|
|
2684
2698
|
let r = this.options.processEntities;
|
|
2685
2699
|
if (!r || !r.enabled) return e;
|
|
2686
2700
|
if (r.allowedTags) {
|
|
@@ -2693,13 +2707,13 @@ function Jt(e, t, n) {
|
|
|
2693
2707
|
}
|
|
2694
2708
|
return this.entityDecoder.decode(e);
|
|
2695
2709
|
}
|
|
2696
|
-
function
|
|
2710
|
+
function an(e, t, n, r) {
|
|
2697
2711
|
return e &&= (r === void 0 && (r = t.child.length === 0), e = this.parseTextData(e, t.tagname, n, !1, t[":@"] ? Object.keys(t[":@"]).length !== 0 : !1, r), e !== void 0 && e !== "" && t.add(this.options.textNodeName, e), ""), e;
|
|
2698
2712
|
}
|
|
2699
|
-
function
|
|
2713
|
+
function on() {
|
|
2700
2714
|
return this.stopNodeExpressionsSet.size === 0 ? !1 : this.matcher.matchesAny(this.stopNodeExpressionsSet);
|
|
2701
2715
|
}
|
|
2702
|
-
function
|
|
2716
|
+
function sn(e, t, n = ">") {
|
|
2703
2717
|
let r = 0, i = e.length, a = n.charCodeAt(0), o = n.length > 1 ? n.charCodeAt(1) : -1, s = "", c = t;
|
|
2704
2718
|
for (let n = t; n < i; n++) {
|
|
2705
2719
|
let t = e.charCodeAt(n);
|
|
@@ -2722,13 +2736,13 @@ function Z(e, t, n, r) {
|
|
|
2722
2736
|
if (i === -1) throw Error(r);
|
|
2723
2737
|
return i + t.length - 1;
|
|
2724
2738
|
}
|
|
2725
|
-
function
|
|
2739
|
+
function cn(e, t, n, r) {
|
|
2726
2740
|
let i = e.indexOf(t, n);
|
|
2727
2741
|
if (i === -1) throw Error(r);
|
|
2728
2742
|
return i;
|
|
2729
2743
|
}
|
|
2730
2744
|
function Q(e, t, n, r = ">") {
|
|
2731
|
-
let i =
|
|
2745
|
+
let i = sn(e, t + 1, r);
|
|
2732
2746
|
if (!i) return;
|
|
2733
2747
|
let a = i.data, o = i.index, s = a.search(/\s/), c = a, l = !0;
|
|
2734
2748
|
s !== -1 && (c = a.substring(0, s), a = a.substring(s + 1).trimStart());
|
|
@@ -2745,12 +2759,12 @@ function Q(e, t, n, r = ">") {
|
|
|
2745
2759
|
rawTagName: u
|
|
2746
2760
|
};
|
|
2747
2761
|
}
|
|
2748
|
-
function
|
|
2762
|
+
function ln(e, t, n) {
|
|
2749
2763
|
let r = n, i = 1, a = e.length;
|
|
2750
2764
|
for (; n < a; n++) if (e[n] === "<") {
|
|
2751
2765
|
let a = e.charCodeAt(n + 1);
|
|
2752
2766
|
if (a === 47) {
|
|
2753
|
-
let a =
|
|
2767
|
+
let a = cn(e, ">", n, `${t} is not closed`);
|
|
2754
2768
|
if (e.substring(n + 2, a).trim() === t && (i--, i === 0)) return {
|
|
2755
2769
|
tagContent: e.substring(r, n),
|
|
2756
2770
|
i: a
|
|
@@ -2760,16 +2774,16 @@ function $t(e, t, n) {
|
|
|
2760
2774
|
else if (a === 33 && e.charCodeAt(n + 2) === 45 && e.charCodeAt(n + 3) === 45) n = Z(e, "-->", n + 3, "StopNode is not closed.");
|
|
2761
2775
|
else if (a === 33 && e.charCodeAt(n + 2) === 91) n = Z(e, "]]>", n, "StopNode is not closed.") - 2;
|
|
2762
2776
|
else {
|
|
2763
|
-
let r = Q(e, n,
|
|
2777
|
+
let r = Q(e, n, !1);
|
|
2764
2778
|
r && ((r && r.tagName) === t && r.tagExp[r.tagExp.length - 1] !== "/" && i++, n = r.closeIndex);
|
|
2765
2779
|
}
|
|
2766
2780
|
}
|
|
2767
2781
|
}
|
|
2768
|
-
function
|
|
2782
|
+
function un(e, t, n) {
|
|
2769
2783
|
if (t && typeof e == "string") {
|
|
2770
2784
|
let t = e.trim();
|
|
2771
|
-
return t === "true" ? !0 : t === "false" ? !1 :
|
|
2772
|
-
} else if (
|
|
2785
|
+
return t === "true" ? !0 : t === "false" ? !1 : zt(e, n);
|
|
2786
|
+
} else if (Fe(e)) return e;
|
|
2773
2787
|
else return "";
|
|
2774
2788
|
}
|
|
2775
2789
|
function $(e, t, n, r) {
|
|
@@ -2777,19 +2791,19 @@ function $(e, t, n, r) {
|
|
|
2777
2791
|
let r = e(t);
|
|
2778
2792
|
n === t && (n = r), t = r;
|
|
2779
2793
|
}
|
|
2780
|
-
return t =
|
|
2794
|
+
return t = dn(t, r), {
|
|
2781
2795
|
tagName: t,
|
|
2782
2796
|
tagExp: n
|
|
2783
2797
|
};
|
|
2784
2798
|
}
|
|
2785
|
-
function
|
|
2786
|
-
if (
|
|
2787
|
-
return
|
|
2799
|
+
function dn(e, t) {
|
|
2800
|
+
if (Ie.includes(e)) throw Error(`[SECURITY] Invalid name: "${e}" is a reserved JavaScript keyword that could cause prototype pollution`);
|
|
2801
|
+
return I.includes(e) ? t.onDangerousProperty(e) : e;
|
|
2788
2802
|
}
|
|
2789
2803
|
//#endregion
|
|
2790
|
-
//#region ../../node_modules/.pnpm/fast-xml-parser@5.
|
|
2791
|
-
var
|
|
2792
|
-
function
|
|
2804
|
+
//#region ../../node_modules/.pnpm/fast-xml-parser@5.8.0/node_modules/fast-xml-parser/src/xmlparser/node2json.js
|
|
2805
|
+
var fn = W.getMetaDataSymbol();
|
|
2806
|
+
function pn(e, t) {
|
|
2793
2807
|
if (!e || typeof e != "object") return {};
|
|
2794
2808
|
if (!t) return e;
|
|
2795
2809
|
let n = {};
|
|
@@ -2799,22 +2813,22 @@ function rn(e, t) {
|
|
|
2799
2813
|
} else n[r] = e[r];
|
|
2800
2814
|
return n;
|
|
2801
2815
|
}
|
|
2802
|
-
function
|
|
2803
|
-
return
|
|
2816
|
+
function mn(e, t, n, r) {
|
|
2817
|
+
return hn(e, t, n, r);
|
|
2804
2818
|
}
|
|
2805
|
-
function
|
|
2819
|
+
function hn(e, t, n, r) {
|
|
2806
2820
|
let i, a = {};
|
|
2807
2821
|
for (let o = 0; o < e.length; o++) {
|
|
2808
|
-
let s = e[o], c =
|
|
2822
|
+
let s = e[o], c = gn(s);
|
|
2809
2823
|
if (c !== void 0 && c !== t.textNodeName) {
|
|
2810
|
-
let e =
|
|
2824
|
+
let e = pn(s[":@"] || {}, t.attributeNamePrefix);
|
|
2811
2825
|
n.push(c, e);
|
|
2812
2826
|
}
|
|
2813
2827
|
if (c === t.textNodeName) i === void 0 ? i = s[c] : i += "" + s[c];
|
|
2814
2828
|
else if (c === void 0) continue;
|
|
2815
2829
|
else if (s[c]) {
|
|
2816
|
-
let e =
|
|
2817
|
-
if (s[":@"] ?
|
|
2830
|
+
let e = hn(s[c], t, n, r), i = vn(e, t);
|
|
2831
|
+
if (Object.keys(e).length === 0 && t.alwaysCreateTextNode && (e[t.textNodeName] = ""), s[":@"] ? _n(e, s[":@"], r, t) : Object.keys(e).length === 1 && e[t.textNodeName] !== void 0 && !t.alwaysCreateTextNode ? e = e[t.textNodeName] : Object.keys(e).length === 0 && (t.alwaysCreateTextNode ? e[t.textNodeName] = "" : e = ""), s[fn] !== void 0 && typeof e == "object" && e && (e[fn] = s[fn]), a[c] !== void 0 && Object.prototype.hasOwnProperty.call(a, c)) Array.isArray(a[c]) || (a[c] = [a[c]]), a[c].push(e);
|
|
2818
2832
|
else {
|
|
2819
2833
|
let n = t.jPath ? r.toString() : r;
|
|
2820
2834
|
t.isArray(c, n, i) ? a[c] = [e] : a[c] = e;
|
|
@@ -2824,14 +2838,14 @@ function on(e, t, n, r) {
|
|
|
2824
2838
|
}
|
|
2825
2839
|
return typeof i == "string" ? i.length > 0 && (a[t.textNodeName] = i) : i !== void 0 && (a[t.textNodeName] = i), a;
|
|
2826
2840
|
}
|
|
2827
|
-
function
|
|
2841
|
+
function gn(e) {
|
|
2828
2842
|
let t = Object.keys(e);
|
|
2829
2843
|
for (let e = 0; e < t.length; e++) {
|
|
2830
2844
|
let n = t[e];
|
|
2831
2845
|
if (n !== ":@") return n;
|
|
2832
2846
|
}
|
|
2833
2847
|
}
|
|
2834
|
-
function
|
|
2848
|
+
function _n(e, t, n, r) {
|
|
2835
2849
|
if (t) {
|
|
2836
2850
|
let i = Object.keys(t), a = i.length;
|
|
2837
2851
|
for (let o = 0; o < a; o++) {
|
|
@@ -2840,13 +2854,13 @@ function cn(e, t, n, r) {
|
|
|
2840
2854
|
}
|
|
2841
2855
|
}
|
|
2842
2856
|
}
|
|
2843
|
-
function
|
|
2857
|
+
function vn(e, t) {
|
|
2844
2858
|
let { textNodeName: n } = t, r = Object.keys(e).length;
|
|
2845
2859
|
return !!(r === 0 || r === 1 && (e[n] || typeof e[n] == "boolean" || e[n] === 0));
|
|
2846
2860
|
}
|
|
2847
2861
|
//#endregion
|
|
2848
|
-
//#region ../../node_modules/.pnpm/fast-xml-parser@5.
|
|
2849
|
-
var
|
|
2862
|
+
//#region ../../node_modules/.pnpm/fast-xml-parser@5.8.0/node_modules/fast-xml-parser/src/xmlparser/XMLParser.js
|
|
2863
|
+
var yn = class {
|
|
2850
2864
|
constructor(e) {
|
|
2851
2865
|
this.externalEntities = {}, this.options = Ct(e);
|
|
2852
2866
|
}
|
|
@@ -2855,11 +2869,11 @@ var un = class {
|
|
|
2855
2869
|
else if (typeof e != "string") throw Error("XML data is accepted in String or Bytes[] form.");
|
|
2856
2870
|
if (t) {
|
|
2857
2871
|
t === !0 && (t = {});
|
|
2858
|
-
let n =
|
|
2872
|
+
let n = Re(e, t);
|
|
2859
2873
|
if (n !== !0) throw Error(`${n.err.msg}:${n.err.line}:${n.err.col}`);
|
|
2860
2874
|
}
|
|
2861
|
-
let n = new
|
|
2862
|
-
return this.options.preserveOrder || r === void 0 ? r :
|
|
2875
|
+
let n = new Xt(this.options, this.externalEntities), r = n.parseXml(e);
|
|
2876
|
+
return this.options.preserveOrder || r === void 0 ? r : mn(r, this.options, n.matcher, n.readonlyMatcher);
|
|
2863
2877
|
}
|
|
2864
2878
|
addEntity(e, t) {
|
|
2865
2879
|
if (t.indexOf("&") !== -1) throw Error("Entity value can't have '&'");
|
|
@@ -2868,9 +2882,9 @@ var un = class {
|
|
|
2868
2882
|
this.externalEntities[e] = t;
|
|
2869
2883
|
}
|
|
2870
2884
|
static getMetaDataSymbol() {
|
|
2871
|
-
return
|
|
2885
|
+
return W.getMetaDataSymbol();
|
|
2872
2886
|
}
|
|
2873
|
-
},
|
|
2887
|
+
}, bn = class {
|
|
2874
2888
|
axiosClient;
|
|
2875
2889
|
baseURI;
|
|
2876
2890
|
xmlParser;
|
|
@@ -2880,7 +2894,7 @@ var un = class {
|
|
|
2880
2894
|
HASH_LENGTH = 32;
|
|
2881
2895
|
ITERATION_COUNT = 1e4;
|
|
2882
2896
|
constructor({ axiosClient: e, baseURI: t }) {
|
|
2883
|
-
this.axiosClient = e, this.baseURI = t, this.xmlParser = new
|
|
2897
|
+
this.axiosClient = e, this.baseURI = t, this.xmlParser = new yn();
|
|
2884
2898
|
}
|
|
2885
2899
|
async signUrl(e, t) {
|
|
2886
2900
|
let n = new URL(e);
|
|
@@ -2896,14 +2910,14 @@ var un = class {
|
|
|
2896
2910
|
async createHashedKey(e) {
|
|
2897
2911
|
return je(e, await this.getSignKey(), this.ITERATION_COUNT, this.HASH_LENGTH, this.ALGORITHM).toString("hex");
|
|
2898
2912
|
}
|
|
2899
|
-
},
|
|
2913
|
+
}, xn = (e, t) => {
|
|
2900
2914
|
let n = new URL(e);
|
|
2901
2915
|
n.pathname = [
|
|
2902
2916
|
...n.pathname.split("/"),
|
|
2903
2917
|
"ocs",
|
|
2904
2918
|
"v1.php"
|
|
2905
2919
|
].filter(Boolean).join("/");
|
|
2906
|
-
let r = n.href, i = v(r, t), a = new
|
|
2920
|
+
let r = n.href, i = v(r, t), a = new bn({
|
|
2907
2921
|
baseURI: e,
|
|
2908
2922
|
axiosClient: t
|
|
2909
2923
|
});
|
|
@@ -2913,4 +2927,4 @@ var un = class {
|
|
|
2913
2927
|
};
|
|
2914
2928
|
};
|
|
2915
2929
|
//#endregion
|
|
2916
|
-
export {
|
|
2930
|
+
export { G as a, X as i, yn as n, v as o, qt as r, xn as t };
|