@opencloud-eu/web-client 7.1.2 → 7.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,26 +1,27 @@
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";
1
+ import { t as e } from "./dist-B2vdwwII.js";
2
+ import { t } from "./urlJoin-_pUL1TUx.js";
3
+ import { a as n, n as r, s as i, t as a } from "./toString-BCd-H1lr.js";
3
4
  //#region ../../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_isKey.js
4
5
  var o = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, s = /^\w*$/;
5
- function c(e, n) {
6
- if (t(e)) return !1;
7
- var i = typeof e;
8
- return i == "number" || i == "symbol" || i == "boolean" || e == null || r(e) ? !0 : s.test(e) || !o.test(e) || n != null && e in Object(n);
6
+ function c(e, t) {
7
+ if (n(e)) return !1;
8
+ var r = typeof e;
9
+ return r == "number" || r == "symbol" || r == "boolean" || e == null || i(e) ? !0 : s.test(e) || !o.test(e) || t != null && e in Object(t);
9
10
  }
10
11
  //#endregion
11
12
  //#region ../../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/memoize.js
12
13
  var l = "Expected a function";
13
14
  function u(e, t) {
14
15
  if (typeof e != "function" || t != null && typeof t != "function") throw TypeError(l);
15
- var r = function() {
16
- var n = arguments, i = t ? t.apply(this, n) : n[0], a = r.cache;
16
+ var n = function() {
17
+ var r = arguments, i = t ? t.apply(this, r) : r[0], a = n.cache;
17
18
  if (a.has(i)) return a.get(i);
18
- var o = e.apply(this, n);
19
- return r.cache = a.set(i, o) || a, o;
19
+ var o = e.apply(this, r);
20
+ return n.cache = a.set(i, o) || a, o;
20
21
  };
21
- return r.cache = new (u.Cache || n)(), r;
22
+ return n.cache = new (u.Cache || r)(), n;
22
23
  }
23
- u.Cache = n;
24
+ u.Cache = r;
24
25
  //#endregion
25
26
  //#region ../../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_memoizeCapped.js
26
27
  var d = 500;
@@ -40,14 +41,14 @@ var p = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(
40
41
  });
41
42
  //#endregion
42
43
  //#region ../../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_castPath.js
43
- function g(e, n) {
44
- return t(e) ? e : c(e, n) ? [e] : h(i(e));
44
+ function g(e, t) {
45
+ return n(e) ? e : c(e, t) ? [e] : h(a(e));
45
46
  }
46
47
  //#endregion
47
48
  //#region ../../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_toKey.js
48
49
  var _ = Infinity;
49
50
  function ee(e) {
50
- if (typeof e == "string" || r(e)) return e;
51
+ if (typeof e == "string" || i(e)) return e;
51
52
  var t = e + "";
52
53
  return t == "0" && 1 / e == -_ ? "-0" : t;
53
54
  }
@@ -221,7 +222,7 @@ function de(e, t, n, r, i) {
221
222
  return e.destroy(), t.destroy(), r && r.destroy(), T(i), n;
222
223
  }
223
224
  function fe(e, t, n, r) {
224
- let { c: i, dkLen: a, DK: o, PRF: s, PRFSalt: c } = ue(e, t, n, r), l, u = new Uint8Array(4), d = E(u), f = new Uint8Array(s.outputLen);
225
+ let { c: i, dkLen: a, DK: o, PRF: s, PRFSalt: c } = ue(e, t, n, r), l, u = /* @__PURE__ */ new Uint8Array(4), d = E(u), f = new Uint8Array(s.outputLen);
225
226
  for (let e = 1, t = 0; t < a; e++, t += s.outputLen) {
226
227
  let n = o.subarray(t, t + s.outputLen);
227
228
  d.setInt32(0, e, !1), (l = c._cloneInto(l)).update(u).digestInto(f), n.set(f.subarray(0, n.length));
@@ -422,7 +423,7 @@ var Pe = function(e) {
422
423
  function Fe(e) {
423
424
  return e !== void 0;
424
425
  }
425
- var I = [
426
+ var Ie = [
426
427
  "hasOwnProperty",
427
428
  "toString",
428
429
  "valueOf",
@@ -430,94 +431,94 @@ var I = [
430
431
  "__defineSetter__",
431
432
  "__lookupGetter__",
432
433
  "__lookupSetter__"
433
- ], Ie = [
434
+ ], Le = [
434
435
  "__proto__",
435
436
  "constructor",
436
437
  "prototype"
437
- ], Le = {
438
+ ], Re = {
438
439
  allowBooleanAttributes: !1,
439
440
  unpairedTags: []
440
441
  };
441
- function Re(e, t) {
442
- t = Object.assign({}, Le, t);
442
+ function ze(e, t) {
443
+ t = Object.assign({}, Re, t);
443
444
  let n = [], r = !1, i = !1;
444
445
  e[0] === "" && (e = e.substr(1));
445
446
  for (let a = 0; a < e.length; a++) if (e[a] === "<" && e[a + 1] === "?") {
446
- if (a += 2, a = Be(e, a), a.err) return a;
447
+ if (a += 2, a = Ve(e, a), a.err) return a;
447
448
  } else if (e[a] === "<") {
448
449
  let o = a;
449
450
  if (a++, e[a] === "!") {
450
- a = Ve(e, a);
451
+ a = He(e, a);
451
452
  continue;
452
453
  } else {
453
454
  let s = !1;
454
455
  e[a] === "/" && (s = !0, a++);
455
456
  let c = "";
456
457
  for (; a < e.length && e[a] !== ">" && e[a] !== " " && e[a] !== " " && e[a] !== "\n" && e[a] !== "\r"; a++) c += e[a];
457
- if (c = c.trim(), c[c.length - 1] === "/" && (c = c.substring(0, c.length - 1), a--), !Xe(c)) {
458
+ if (c = c.trim(), c[c.length - 1] === "/" && (c = c.substring(0, c.length - 1), a--), !Ze(c)) {
458
459
  let t;
459
- return t = c.trim().length === 0 ? "Invalid space after '<'." : "Tag '" + c + "' is an invalid name.", L("InvalidTag", t, R(e, a));
460
+ return t = c.trim().length === 0 ? "Invalid space after '<'." : "Tag '" + c + "' is an invalid name.", I("InvalidTag", t, L(e, a));
460
461
  }
461
- let l = We(e, a);
462
- if (l === !1) return L("InvalidAttr", "Attributes for '" + c + "' have open quote.", R(e, a));
462
+ let l = Ge(e, a);
463
+ if (l === !1) return I("InvalidAttr", "Attributes for '" + c + "' have open quote.", L(e, a));
463
464
  let u = l.value;
464
465
  if (a = l.index, u[u.length - 1] === "/") {
465
466
  let n = a - u.length;
466
467
  u = u.substring(0, u.length - 1);
467
- let i = Ke(u, t);
468
+ let i = qe(u, t);
468
469
  if (i === !0) r = !0;
469
- else return L(i.err.code, i.err.msg, R(e, n + i.err.line));
470
+ else return I(i.err.code, i.err.msg, L(e, n + i.err.line));
470
471
  } else if (s) {
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));
472
+ if (!l.tagClosed) return I("InvalidTag", "Closing tag '" + c + "' doesn't have proper closing.", L(e, a));
473
+ if (u.trim().length > 0) return I("InvalidTag", "Closing tag '" + c + "' can't have attributes or invalid starting.", L(e, o));
474
+ if (n.length === 0) return I("InvalidTag", "Closing tag '" + c + "' has not been opened.", L(e, o));
474
475
  {
475
476
  let t = n.pop();
476
477
  if (c !== t.tagName) {
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));
478
+ let n = L(e, t.tagStartPos);
479
+ return I("InvalidTag", "Expected closing tag '" + t.tagName + "' (opened in line " + n.line + ", col " + n.col + ") instead of closing tag '" + c + "'.", L(e, o));
479
480
  }
480
481
  n.length == 0 && (i = !0);
481
482
  }
482
483
  } else {
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));
484
+ let s = qe(u, t);
485
+ if (s !== !0) return I(s.err.code, s.err.msg, L(e, a - u.length + s.err.line));
486
+ if (i === !0) return I("InvalidXml", "Multiple possible root nodes found.", L(e, a));
486
487
  t.unpairedTags.indexOf(c) !== -1 || n.push({
487
488
  tagName: c,
488
489
  tagStartPos: o
489
490
  }), r = !0;
490
491
  }
491
492
  for (a++; a < e.length; a++) if (e[a] === "<") if (e[a + 1] === "!") {
492
- a++, a = Ve(e, a);
493
+ a++, a = He(e, a);
493
494
  continue;
494
495
  } else if (e[a + 1] === "?") {
495
- if (a = Be(e, ++a), a.err) return a;
496
+ if (a = Ve(e, ++a), a.err) return a;
496
497
  } else break;
497
498
  else if (e[a] === "&") {
498
- let t = Je(e, a);
499
- if (t == -1) return L("InvalidChar", "char '&' is not expected.", R(e, a));
499
+ let t = Ye(e, a);
500
+ if (t == -1) return I("InvalidChar", "char '&' is not expected.", L(e, a));
500
501
  a = t;
501
- } else if (i === !0 && !ze(e[a])) return L("InvalidXml", "Extra text at the end", R(e, a));
502
+ } else if (i === !0 && !Be(e[a])) return I("InvalidXml", "Extra text at the end", L(e, a));
502
503
  e[a] === "<" && a--;
503
504
  }
504
505
  } else {
505
- if (ze(e[a])) continue;
506
- return L("InvalidChar", "char '" + e[a] + "' is not expected.", R(e, a));
506
+ if (Be(e[a])) continue;
507
+ return I("InvalidChar", "char '" + e[a] + "' is not expected.", L(e, a));
507
508
  }
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.", {
509
+ return r ? n.length == 1 ? I("InvalidTag", "Unclosed tag '" + n[0].tagName + "'.", L(e, n[0].tagStartPos)) : n.length > 0 ? I("InvalidXml", "Invalid '" + JSON.stringify(n.map((e) => e.tagName), null, 4).replace(/\r?\n/g, "") + "' found.", {
509
510
  line: 1,
510
511
  col: 1
511
- }) : !0 : L("InvalidXml", "Start tag expected.", 1);
512
+ }) : !0 : I("InvalidXml", "Start tag expected.", 1);
512
513
  }
513
- function ze(e) {
514
+ function Be(e) {
514
515
  return e === " " || e === " " || e === "\n" || e === "\r";
515
516
  }
516
- function Be(e, t) {
517
+ function Ve(e, t) {
517
518
  let n = t;
518
519
  for (; t < e.length; t++) if (e[t] == "?" || e[t] == " ") {
519
520
  let r = e.substr(n, t - n);
520
- if (t > 5 && r === "xml") return L("InvalidXml", "XML declaration allowed only at the start of the document.", R(e, t));
521
+ if (t > 5 && r === "xml") return I("InvalidXml", "XML declaration allowed only at the start of the document.", L(e, t));
521
522
  if (e[t] == "?" && e[t + 1] == ">") {
522
523
  t++;
523
524
  break;
@@ -525,7 +526,7 @@ function Be(e, t) {
525
526
  }
526
527
  return t;
527
528
  }
528
- function Ve(e, t) {
529
+ function He(e, t) {
529
530
  if (e.length > t + 5 && e[t + 1] === "-" && e[t + 2] === "-") {
530
531
  for (t += 3; t < e.length; t++) if (e[t] === "-" && e[t + 1] === "-" && e[t + 2] === ">") {
531
532
  t += 2;
@@ -543,38 +544,38 @@ function Ve(e, t) {
543
544
  }
544
545
  return t;
545
546
  }
546
- var He = "\"", Ue = "'";
547
- function We(e, t) {
547
+ var Ue = "\"", We = "'";
548
+ function Ge(e, t) {
548
549
  let n = "", r = "", i = !1;
549
550
  for (; t < e.length; t++) {
550
- if (e[t] === He || e[t] === Ue) r === "" ? r = e[t] : r !== e[t] || (r = "");
551
+ if (e[t] === Ue || e[t] === We) r === "" ? r = e[t] : r !== e[t] || (r = "");
551
552
  else if (e[t] === ">" && r === "") {
552
553
  i = !0;
553
554
  break;
554
555
  }
555
556
  n += e[t];
556
557
  }
557
- return r === "" ? {
558
+ return r === "" && {
558
559
  value: n,
559
560
  index: t,
560
561
  tagClosed: i
561
- } : !1;
562
+ };
562
563
  }
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 = {};
564
+ var Ke = /* @__PURE__ */ RegExp("(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['\"])(([\\s\\S])*?)\\5)?", "g");
565
+ function qe(e, t) {
566
+ let n = Ne(e, Ke), r = {};
566
567
  for (let e = 0; e < n.length; e++) {
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]));
568
+ if (n[e][1].length === 0) return I("InvalidAttr", "Attribute '" + n[e][2] + "' has no space in starting.", R(n[e]));
569
+ if (n[e][3] !== void 0 && n[e][4] === void 0) return I("InvalidAttr", "Attribute '" + n[e][2] + "' is without value.", R(n[e]));
570
+ if (n[e][3] === void 0 && !t.allowBooleanAttributes) return I("InvalidAttr", "boolean attribute '" + n[e][2] + "' is not allowed.", R(n[e]));
570
571
  let i = n[e][2];
571
- if (!Ye(i)) return L("InvalidAttr", "Attribute '" + i + "' is an invalid name.", z(n[e]));
572
+ if (!Xe(i)) return I("InvalidAttr", "Attribute '" + i + "' is an invalid name.", R(n[e]));
572
573
  if (!Object.prototype.hasOwnProperty.call(r, i)) r[i] = 1;
573
- else return L("InvalidAttr", "Attribute '" + i + "' is repeated.", z(n[e]));
574
+ else return I("InvalidAttr", "Attribute '" + i + "' is repeated.", R(n[e]));
574
575
  }
575
576
  return !0;
576
577
  }
577
- function qe(e, t) {
578
+ function Je(e, t) {
578
579
  let n = /\d/;
579
580
  for (e[t] === "x" && (t++, n = /[\da-fA-F]/); t < e.length; t++) {
580
581
  if (e[t] === ";") return t;
@@ -582,9 +583,9 @@ function qe(e, t) {
582
583
  }
583
584
  return -1;
584
585
  }
585
- function Je(e, t) {
586
+ function Ye(e, t) {
586
587
  if (t++, e[t] === ";") return -1;
587
- if (e[t] === "#") return t++, qe(e, t);
588
+ if (e[t] === "#") return t++, Je(e, t);
588
589
  let n = 0;
589
590
  for (; t < e.length; t++, n++) if (!(e[t].match(/\w/) && n < 20)) {
590
591
  if (e[t] === ";") break;
@@ -592,7 +593,7 @@ function Je(e, t) {
592
593
  }
593
594
  return t;
594
595
  }
595
- function L(e, t, n) {
596
+ function I(e, t, n) {
596
597
  return { err: {
597
598
  code: e,
598
599
  msg: t,
@@ -600,25 +601,25 @@ function L(e, t, n) {
600
601
  col: n.col
601
602
  } };
602
603
  }
603
- function Ye(e) {
604
+ function Xe(e) {
604
605
  return Pe(e);
605
606
  }
606
- function Xe(e) {
607
+ function Ze(e) {
607
608
  return Pe(e);
608
609
  }
609
- function R(e, t) {
610
+ function L(e, t) {
610
611
  let n = e.substring(0, t).split(/\r?\n/);
611
612
  return {
612
613
  line: n.length,
613
614
  col: n[n.length - 1].length + 1
614
615
  };
615
616
  }
616
- function z(e) {
617
+ function R(e) {
617
618
  return e.startIndex + e[1].length;
618
619
  }
619
620
  //#endregion
620
- //#region ../../node_modules/.pnpm/@nodable+entities@2.1.0/node_modules/@nodable/entities/src/entities.js
621
- var Ze = {
621
+ //#region ../../node_modules/.pnpm/@nodable+entities@2.2.0/node_modules/@nodable/entities/src/entities.js
622
+ var Qe = {
622
623
  amp: "&",
623
624
  AMP: "&",
624
625
  lt: "<",
@@ -645,7 +646,6 @@ var Ze = {
645
646
  num: "#",
646
647
  dollar: "$",
647
648
  percent: "%",
648
- amp: "&",
649
649
  ast: "*",
650
650
  commat: "@",
651
651
  lowbar: "_",
@@ -697,7 +697,7 @@ var Ze = {
697
697
  times: "×",
698
698
  div: "÷",
699
699
  divide: "÷"
700
- }, Qe = {
700
+ }, $e = {
701
701
  Agrave: "À",
702
702
  agrave: "à",
703
703
  Aacute: "Á",
@@ -761,7 +761,7 @@ var Ze = {
761
761
  szlig: "ß",
762
762
  yuml: "ÿ",
763
763
  Yuml: "Ÿ"
764
- }, $e = {
764
+ }, et = {
765
765
  Amacr: "Ā",
766
766
  amacr: "ā",
767
767
  Abreve: "Ă",
@@ -879,7 +879,7 @@ var Ze = {
879
879
  zdot: "ż",
880
880
  Zcaron: "Ž",
881
881
  zcaron: "ž"
882
- }, et = {
882
+ }, tt = {
883
883
  Alpha: "Α",
884
884
  alpha: "α",
885
885
  Beta: "Β",
@@ -950,7 +950,7 @@ var Ze = {
950
950
  Gammad: "Ϝ",
951
951
  gammad: "ϝ",
952
952
  digamma: "ϝ"
953
- }, tt = {
953
+ }, nt = {
954
954
  Afr: "𝔄",
955
955
  afr: "𝔞",
956
956
  Acy: "А",
@@ -1045,11 +1045,8 @@ var Ze = {
1045
1045
  ubrcy: "ў",
1046
1046
  DZcy: "Џ",
1047
1047
  dzcy: "џ"
1048
- }, nt = {
1048
+ }, rt = {
1049
1049
  plus: "+",
1050
- minus: "−",
1051
- mnplus: "∓",
1052
- mp: "∓",
1053
1050
  pm: "±",
1054
1051
  times: "×",
1055
1052
  div: "÷",
@@ -1122,10 +1119,6 @@ var Ze = {
1122
1119
  bumpe: "≏",
1123
1120
  bumpeq: "≏",
1124
1121
  HumpEqual: "≏",
1125
- dotminus: "∸",
1126
- minusd: "∸",
1127
- plusdo: "∔",
1128
- dotplus: "∔",
1129
1122
  le: "≤",
1130
1123
  LessEqual: "≤",
1131
1124
  ge: "≥",
@@ -1134,7 +1127,7 @@ var Ze = {
1134
1127
  lesseqqgtr: "⪋",
1135
1128
  greater: ">",
1136
1129
  less: "<"
1137
- }, rt = {
1130
+ }, it = {
1138
1131
  alefsym: "ℵ",
1139
1132
  aleph: "ℵ",
1140
1133
  beth: "ℶ",
@@ -1236,7 +1229,6 @@ var Ze = {
1236
1229
  wreath: "≀",
1237
1230
  nsime: "≄",
1238
1231
  nsimeq: "≄",
1239
- nsimeq: "≄",
1240
1232
  ncong: "≇",
1241
1233
  simne: "≆",
1242
1234
  ncongdot: "⩭̸",
@@ -1256,7 +1248,7 @@ var Ze = {
1256
1248
  npr: "⊀",
1257
1249
  nsucc: "⊁",
1258
1250
  nsc: "⊁"
1259
- }, it = {
1251
+ }, at = {
1260
1252
  larr: "←",
1261
1253
  leftarrow: "←",
1262
1254
  LeftArrow: "←",
@@ -1347,10 +1339,6 @@ var Ze = {
1347
1339
  mapsto: "↦",
1348
1340
  mapstodown: "↧",
1349
1341
  crarr: "↵",
1350
- nwarrow: "↖",
1351
- nearrow: "↗",
1352
- searrow: "↘",
1353
- swarrow: "↙",
1354
1342
  nleftarrow: "↚",
1355
1343
  nleftrightarrow: "↮",
1356
1344
  nrightarrow: "↛",
@@ -1391,7 +1379,6 @@ var Ze = {
1391
1379
  ldrushar: "⥋",
1392
1380
  rdldhar: "⥩",
1393
1381
  lrhard: "⥭",
1394
- rlhar: "⇌",
1395
1382
  uharr: "↾",
1396
1383
  uharl: "↿",
1397
1384
  dharr: "⇂",
@@ -1407,13 +1394,12 @@ var Ze = {
1407
1394
  nhArr: "⇎",
1408
1395
  nlarr: "↚",
1409
1396
  nlArr: "⇍",
1410
- nrarr: "↛",
1411
1397
  nrArr: "⇏",
1412
1398
  larrb: "⇤",
1413
1399
  LeftArrowBar: "⇤",
1414
1400
  rarrb: "⇥",
1415
1401
  RightArrowBar: "⇥"
1416
- }, at = {
1402
+ }, ot = {
1417
1403
  square: "□",
1418
1404
  Square: "□",
1419
1405
  squ: "□",
@@ -1506,7 +1492,7 @@ var Ze = {
1506
1492
  boxvH: "╪",
1507
1493
  boxVh: "╫",
1508
1494
  boxVH: "╬"
1509
- }, ot = {
1495
+ }, st = {
1510
1496
  excl: "!",
1511
1497
  iexcl: "¡",
1512
1498
  brvbar: "¦",
@@ -1556,16 +1542,14 @@ var Ze = {
1556
1542
  DiacriticalTilde: "˜",
1557
1543
  DiacriticalDot: "˙",
1558
1544
  DiacriticalDoubleAcute: "˝",
1559
- grave: "`",
1560
- acute: "´"
1561
- }, st = {
1545
+ grave: "`"
1546
+ }, ct = {
1562
1547
  cent: "¢",
1563
1548
  pound: "£",
1564
1549
  curren: "¤",
1565
1550
  yen: "¥",
1566
1551
  euro: "€",
1567
1552
  dollar: "$",
1568
- euro: "€",
1569
1553
  fnof: "ƒ",
1570
1554
  inr: "₹",
1571
1555
  af: "؋",
@@ -1575,7 +1559,7 @@ var Ze = {
1575
1559
  won: "₩",
1576
1560
  yuan: "¥",
1577
1561
  cedil: "¸"
1578
- }, ct = {
1562
+ }, lt = {
1579
1563
  frac12: "½",
1580
1564
  half: "½",
1581
1565
  frac13: "⅓",
@@ -1593,7 +1577,7 @@ var Ze = {
1593
1577
  frac58: "⅝",
1594
1578
  frac78: "⅞",
1595
1579
  frasl: "⁄"
1596
- }, lt = {
1580
+ }, ut = {
1597
1581
  trade: "™",
1598
1582
  TRADE: "™",
1599
1583
  telrec: "⌕",
@@ -1653,7 +1637,6 @@ var Ze = {
1653
1637
  Vdash: "⊩",
1654
1638
  dashv: "⊣",
1655
1639
  vDash: "⊨",
1656
- Vdash: "⊩",
1657
1640
  Vvdash: "⊪",
1658
1641
  nvdash: "⊬",
1659
1642
  nvDash: "⊭",
@@ -1661,7 +1644,6 @@ var Ze = {
1661
1644
  nVDash: "⊯"
1662
1645
  };
1663
1646
  ({
1664
- ...Ze,
1665
1647
  ...Qe,
1666
1648
  ...$e,
1667
1649
  ...et,
@@ -1673,15 +1655,16 @@ var Ze = {
1673
1655
  ...ot,
1674
1656
  ...st,
1675
1657
  ...ct,
1676
- ...lt
1658
+ ...lt,
1659
+ ...ut
1677
1660
  });
1678
- var ut = {
1661
+ var dt = {
1679
1662
  amp: "&",
1680
1663
  apos: "'",
1681
1664
  gt: ">",
1682
1665
  lt: "<",
1683
1666
  quot: "\""
1684
- }, dt = {
1667
+ }, ft = {
1685
1668
  nbsp: "\xA0",
1686
1669
  copy: "©",
1687
1670
  reg: "®",
@@ -1702,10 +1685,14 @@ var ut = {
1702
1685
  frac12: "½",
1703
1686
  frac14: "¼",
1704
1687
  frac34: "¾"
1705
- }, ft = /* @__PURE__ */ new Set("!?\\\\/[]$%{}^&*()<>|+");
1706
- function pt(e) {
1688
+ }, z = Object.freeze({
1689
+ ALLOW: "allow",
1690
+ BLOCK: "block",
1691
+ THROW: "throw"
1692
+ }), pt = /* @__PURE__ */ new Set("!?\\\\/[]$%{}^&*()<>|+");
1693
+ function mt(e) {
1707
1694
  if (e[0] === "#") throw Error(`[EntityReplacer] Invalid character '#' in entity name: "${e}"`);
1708
- for (let t of e) if (ft.has(t)) throw Error(`[EntityReplacer] Invalid character '${t}' in entity name: "${e}"`);
1695
+ for (let t of e) if (pt.has(t)) throw Error(`[EntityReplacer] Invalid character '${t}' in entity name: "${e}"`);
1709
1696
  return e;
1710
1697
  }
1711
1698
  function B(...e) {
@@ -1720,16 +1707,16 @@ function B(...e) {
1720
1707
  }
1721
1708
  return t;
1722
1709
  }
1723
- var V = "external", H = "base", mt = "all";
1710
+ var V = "external", H = "base", U = "all";
1724
1711
  function ht(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]);
1712
+ return !e || e === V ? /* @__PURE__ */ new Set([V]) : e === U ? /* @__PURE__ */ new Set([U]) : e === H ? /* @__PURE__ */ new Set([H]) : Array.isArray(e) ? new Set(e) : /* @__PURE__ */ new Set([V]);
1726
1713
  }
1727
- var U = Object.freeze({
1714
+ var W = Object.freeze({
1728
1715
  allow: 0,
1729
1716
  leave: 1,
1730
1717
  remove: 2,
1731
1718
  throw: 3
1732
- }), gt = new Set([
1719
+ }), gt = /* @__PURE__ */ new Set([
1733
1720
  9,
1734
1721
  10,
1735
1722
  13
@@ -1737,31 +1724,50 @@ var U = Object.freeze({
1737
1724
  function _t(e) {
1738
1725
  if (!e) return {
1739
1726
  xmlVersion: 1,
1740
- onLevel: U.allow,
1741
- nullLevel: U.remove
1727
+ onLevel: W.allow,
1728
+ nullLevel: W.remove
1742
1729
  };
1743
- let t = e.xmlVersion === 1.1 ? 1.1 : 1, n = U[e.onNCR] ?? U.allow, r = U[e.nullNCR] ?? U.remove;
1730
+ let t = e.xmlVersion === 1.1 ? 1.1 : 1, n = W[e.onNCR] ?? W.allow, r = W[e.nullNCR] ?? W.remove;
1744
1731
  return {
1745
1732
  xmlVersion: t,
1746
1733
  onLevel: n,
1747
- nullLevel: Math.max(r, U.remove)
1734
+ nullLevel: Math.max(r, W.remove)
1748
1735
  };
1749
1736
  }
1750
1737
  var vt = class {
1751
1738
  constructor(e = {}) {
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 : []);
1739
+ 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(dt, 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 : []);
1753
1740
  let t = _t(e.ncr);
1754
- this._ncrXmlVersion = t.xmlVersion, this._ncrOnLevel = t.onLevel, this._ncrNullLevel = t.nullLevel;
1741
+ this._ncrXmlVersion = t.xmlVersion, this._ncrOnLevel = t.onLevel, this._ncrNullLevel = t.nullLevel, this._onExternalEntity = typeof e.onExternalEntity == "function" ? e.onExternalEntity : null, this._onInputEntity = typeof e.onInputEntity == "function" ? e.onInputEntity : null;
1742
+ }
1743
+ _applyRegistrationHook(e, t, n, r) {
1744
+ if (!e) return !0;
1745
+ let i = e(t, n);
1746
+ if (i === z.BLOCK) return !1;
1747
+ if (i === z.THROW) throw Error(`[EntityDecoder] Registration of ${r} entity "&${t};" was rejected by hook`);
1748
+ return !0;
1755
1749
  }
1756
1750
  setExternalEntities(e) {
1757
- if (e) for (let t of Object.keys(e)) pt(t);
1758
- this._externalMap = B(e);
1751
+ if (e) for (let t of Object.keys(e)) mt(t);
1752
+ if (!this._onExternalEntity) {
1753
+ this._externalMap = B(e);
1754
+ return;
1755
+ }
1756
+ let t = B(e), n = Object.create(null);
1757
+ for (let [e, r] of Object.entries(t)) this._applyRegistrationHook(this._onExternalEntity, e, r, "external") && (n[e] = r);
1758
+ this._externalMap = n;
1759
1759
  }
1760
1760
  addExternalEntity(e, t) {
1761
- pt(e), typeof t == "string" && t.indexOf("&") === -1 && (this._externalMap[e] = t);
1761
+ mt(e), typeof t == "string" && t.indexOf("&") === -1 && this._applyRegistrationHook(this._onExternalEntity, e, t, "external") && (this._externalMap[e] = t);
1762
1762
  }
1763
1763
  addInputEntities(e) {
1764
- this._totalExpansions = 0, this._expandedLength = 0, this._inputMap = B(e);
1764
+ if (this._totalExpansions = 0, this._expandedLength = 0, !this._onInputEntity) {
1765
+ this._inputMap = B(e);
1766
+ return;
1767
+ }
1768
+ let t = B(e), n = Object.create(null);
1769
+ for (let [e, r] of Object.entries(t)) this._applyRegistrationHook(this._onInputEntity, e, r, "input") && (n[e] = r);
1770
+ this._inputMap = n;
1765
1771
  }
1766
1772
  reset() {
1767
1773
  return this._inputMap = Object.create(null), this._totalExpansions = 0, this._expandedLength = 0, this;
@@ -1770,7 +1776,7 @@ var vt = class {
1770
1776
  this._ncrXmlVersion = e === 1.1 ? 1.1 : 1;
1771
1777
  }
1772
1778
  decode(e) {
1773
- if (typeof e != "string" || e.length === 0) return e;
1779
+ if (typeof e != "string" || e.length === 0 || e.indexOf("&") === -1) return e;
1774
1780
  let t = e, n = [], r = e.length, i = 0, a = 0, o = this._maxTotalExpansions > 0, s = this._maxExpandedLength > 0, c = o || s;
1775
1781
  for (; a < r;) {
1776
1782
  if (e.charCodeAt(a) !== 38) {
@@ -1821,7 +1827,7 @@ var vt = class {
1821
1827
  return this._postCheck(l, t);
1822
1828
  }
1823
1829
  _tierCounts(e) {
1824
- return this._limitTiers.has(mt) ? !0 : this._limitTiers.has(e);
1830
+ return this._limitTiers.has(U) ? !0 : this._limitTiers.has(e);
1825
1831
  }
1826
1832
  _resolveName(e) {
1827
1833
  if (e in this._inputMap) return {
@@ -1838,14 +1844,14 @@ var vt = class {
1838
1844
  };
1839
1845
  }
1840
1846
  _classifyNCR(e) {
1841
- return e === 0 ? this._ncrNullLevel : e >= 55296 && e <= 57343 || this._ncrXmlVersion === 1 && e >= 1 && e <= 31 && !gt.has(e) ? U.remove : -1;
1847
+ return e === 0 ? this._ncrNullLevel : e >= 55296 && e <= 57343 || this._ncrXmlVersion === 1 && e >= 1 && e <= 31 && !gt.has(e) ? W.remove : -1;
1842
1848
  }
1843
1849
  _applyNCRAction(e, t, n) {
1844
1850
  switch (e) {
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")})`);
1851
+ case W.allow: return String.fromCodePoint(n);
1852
+ case W.remove: return "";
1853
+ case W.leave: return;
1854
+ case W.throw: throw Error(`[EntityDecoder] Prohibited numeric character reference &${t}; (U+${n.toString(16).toUpperCase().padStart(4, "0")})`);
1849
1855
  default: return String.fromCodePoint(n);
1850
1856
  }
1851
1857
  }
@@ -1853,11 +1859,11 @@ var vt = class {
1853
1859
  let t = e.charCodeAt(1), n;
1854
1860
  if (n = t === 120 || t === 88 ? parseInt(e.slice(2), 16) : parseInt(e.slice(1), 10), Number.isNaN(n) || n < 0 || n > 1114111) return;
1855
1861
  let r = this._classifyNCR(n);
1856
- if (!this._numericAllowed && r < U.remove) return;
1862
+ if (!this._numericAllowed && r < W.remove) return;
1857
1863
  let i = r === -1 ? this._ncrOnLevel : Math.max(this._ncrOnLevel, r);
1858
1864
  return this._applyNCRAction(i, e, n);
1859
1865
  }
1860
- }, yt = (e) => I.includes(e) ? "__" + e : e, bt = {
1866
+ }, yt = (e) => Ie.includes(e) ? "__" + e : e, bt = {
1861
1867
  preserveOrder: !1,
1862
1868
  attributeNamePrefix: "@_",
1863
1869
  attributesGroupName: !1,
@@ -1872,7 +1878,8 @@ var vt = class {
1872
1878
  numberParseOptions: {
1873
1879
  hex: !0,
1874
1880
  leadingZeros: !0,
1875
- eNotation: !0
1881
+ eNotation: !0,
1882
+ unicode: !1
1876
1883
  },
1877
1884
  tagValueProcessor: function(e, t) {
1878
1885
  return t;
@@ -1904,7 +1911,7 @@ var vt = class {
1904
1911
  function xt(e, t) {
1905
1912
  if (typeof e != "string") return;
1906
1913
  let n = e.toLowerCase();
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`);
1914
+ if (Ie.some((e) => n === e.toLowerCase()) || Le.some((e) => n === e.toLowerCase())) throw Error(`[SECURITY] Invalid ${t}: "${e}" is a reserved JavaScript keyword that could cause prototype pollution`);
1908
1915
  }
1909
1916
  function St(e, t) {
1910
1917
  return typeof e == "boolean" ? {
@@ -1954,7 +1961,7 @@ var Ct = function(e) {
1954
1961
  ];
1955
1962
  for (let { value: e, name: t } of n) e && xt(e, t);
1956
1963
  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;
1957
- }, wt = typeof Symbol == "function" ? Symbol("XML Node Metadata") : "@@xmlMetadata", W = class {
1964
+ }, wt = typeof Symbol == "function" ? Symbol("XML Node Metadata") : "@@xmlMetadata", G = class {
1958
1965
  constructor(e) {
1959
1966
  this.tagname = e, this.child = [], this[":@"] = Object.create(null);
1960
1967
  }
@@ -1970,7 +1977,7 @@ var Ct = function(e) {
1970
1977
  static getMetaDataSymbol() {
1971
1978
  return wt;
1972
1979
  }
1973
- }, Tt = ":A-Za-z_À-ÖØ-öø-˿Ͱ-ͽͿ-҆҈-῿‌-‍⁰-↏Ⰰ-⿯、-퟿豈-﷏ﷰ-�", Et = ":A-Za-z_À-ÖØ-öø-˿Ͱ-ͽͿ-҆҈-῿‌-‍⁰-↏Ⰰ-⿯、-퟿豈-﷏ﷰ-�\\-\\.\\d·̀-ͯ‿-⁀", Dt = ":A-Za-z_À-˿Ͱ-ͽͿ-҆҈-῿‌-‍⁰-↏Ⰰ-⿯、-퟿豈-﷏ﷰ-�𐀀-󯿿", Ot = ":A-Za-z_À-˿Ͱ-ͽͿ-҆҈-῿‌-‍⁰-↏Ⰰ-⿯、-퟿豈-﷏ﷰ-�𐀀-󯿿\\-\\.\\d·̀-ͯ҇‿-⁀", kt = (e, t, n = "") => {
1980
+ }, Tt = ":A-Za-z_À-ÖØ-öø-˿Ͱ-ͽͿ-҆҈-῿‌-‍⁰-↏Ⰰ-⿯、-퟿豈-﷏ﷰ-�", Et = ":A-Za-z_À-ÖØ-öø-˿Ͱ-ͽͿ-҆҈-῿‌-‍⁰-↏Ⰰ-⿯、-퟿豈-﷏ﷰ-�\\-\\.\\d·̀-ͯ‿-⁀", Dt = ":A-Za-z_À-˿Ͱ-ͽͿ-҆҈-῿‌-‍⁰-↏Ⰰ-⿯、-퟿豈-﷏ﷰ-�𐀀-󯿿", Ot = ":A-Za-z_À-˿Ͱ-ͽͿ-҆҈-῿‌-‍⁰-↏Ⰰ-⿯、-퟿豈-﷏ﷰ-�𐀀-󯿿\\-\\.\\d·̀-ͯ҇‿-⁀", K = (e, t, n = "") => {
1974
1981
  let r = `[${e.replace(":", "")}][${t.replace(":", "")}]*`;
1975
1982
  return {
1976
1983
  name: RegExp(`^[${e}][${t}]*$`, n),
@@ -1979,7 +1986,24 @@ var Ct = function(e) {
1979
1986
  nmToken: RegExp(`^[${t}]+$`, n),
1980
1987
  nmTokens: RegExp(`^[${t}]+(?:\\s+[${t}]+)*$`, n)
1981
1988
  };
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 {
1989
+ }, kt = K(Tt, Et), At = K(Dt, Ot, "u"), jt = K(":A-Za-z_", ":A-Za-z_\\-\\.\\d"), Mt = (e = "1.0", t = !1) => t ? jt : e === "1.1" ? At : kt, Nt = (e, { xmlVersion: t = "1.0", asciiOnly: n = !1 } = {}) => Mt(t, n).qName.test(e), Pt = [
1990
+ "name",
1991
+ "ncName",
1992
+ "qName",
1993
+ "nmToken",
1994
+ "nmTokens"
1995
+ ], Ft = (e, { xmlVersion: t = "1.0", asciiOnly: n = !1, maxCacheSize: r = 2048 } = {}) => {
1996
+ if (!Pt.includes(e)) throw TypeError(`Unknown production "${e}". Must be one of: ${Pt.join(", ")}`);
1997
+ let i = Mt(t, n)[e], a = /* @__PURE__ */ new Map(), o = (e) => {
1998
+ let t = a.get(e);
1999
+ if (t !== void 0) return t;
2000
+ let n = i.test(e);
2001
+ return a.size < r && a.set(e, n), n;
2002
+ };
2003
+ return o.reset = () => {
2004
+ a = /* @__PURE__ */ new Map();
2005
+ }, o;
2006
+ }, It = class {
1983
2007
  constructor(e, t) {
1984
2008
  this.suppressValidationErr = !e, this.options = e, this.xmlVersion = t || 1;
1985
2009
  }
@@ -1992,23 +2016,23 @@ var Ct = function(e) {
1992
2016
  t += 9;
1993
2017
  let i = 1, a = !1, o = !1, s = "";
1994
2018
  for (; t < e.length; t++) if (e[t] === "<" && !o) {
1995
- if (a && q(e, "!ENTITY", t)) {
2019
+ if (a && J(e, "!ENTITY", t)) {
1996
2020
  t += 7;
1997
2021
  let i, a;
1998
2022
  if ([i, a, t] = this.readEntityExp(e, t + 1, this.suppressValidationErr), a.indexOf("&") === -1) {
1999
2023
  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})`);
2000
2024
  n[i] = a, r++;
2001
2025
  }
2002
- } else if (a && q(e, "!ELEMENT", t)) {
2026
+ } else if (a && J(e, "!ELEMENT", t)) {
2003
2027
  t += 8;
2004
2028
  let { index: n } = this.readElementExp(e, t + 1);
2005
2029
  t = n;
2006
- } else if (a && q(e, "!ATTLIST", t)) t += 8;
2007
- else if (a && q(e, "!NOTATION", t)) {
2030
+ } else if (a && J(e, "!ATTLIST", t)) t += 8;
2031
+ else if (a && J(e, "!NOTATION", t)) {
2008
2032
  t += 9;
2009
2033
  let { index: n } = this.readNotationExp(e, t + 1, this.suppressValidationErr);
2010
2034
  t = n;
2011
- } else if (q(e, "!--", t)) o = !0;
2035
+ } else if (J(e, "!--", t)) o = !0;
2012
2036
  else throw Error("Invalid DOCTYPE");
2013
2037
  i++, s = "";
2014
2038
  } else if (e[t] === ">") {
@@ -2022,11 +2046,11 @@ var Ct = function(e) {
2022
2046
  };
2023
2047
  }
2024
2048
  readEntityExp(e, t) {
2025
- t = K(e, t);
2049
+ t = q(e, t);
2026
2050
  let n = t;
2027
2051
  for (; t < e.length && !/\s/.test(e[t]) && e[t] !== "\"" && e[t] !== "'";) t++;
2028
2052
  let r = e.substring(n, t);
2029
- if (J(r, { xmlVersion: this.xmlVersion }), t = K(e, t), !this.suppressValidationErr) {
2053
+ if (Y(r, { xmlVersion: this.xmlVersion }), t = q(e, t), !this.suppressValidationErr) {
2030
2054
  if (e.substring(t, t + 6).toUpperCase() === "SYSTEM") throw Error("External entities are not supported");
2031
2055
  if (e[t] === "%") throw Error("Parameter entities are not supported");
2032
2056
  }
@@ -2039,16 +2063,16 @@ var Ct = function(e) {
2039
2063
  ];
2040
2064
  }
2041
2065
  readNotationExp(e, t) {
2042
- t = K(e, t);
2066
+ t = q(e, t);
2043
2067
  let n = t;
2044
2068
  for (; t < e.length && !/\s/.test(e[t]);) t++;
2045
2069
  let r = e.substring(n, t);
2046
- !this.suppressValidationErr && J(r, { xmlVersion: this.xmlVersion }), t = K(e, t);
2070
+ !this.suppressValidationErr && Y(r, { xmlVersion: this.xmlVersion }), t = q(e, t);
2047
2071
  let i = e.substring(t, t + 6).toUpperCase();
2048
2072
  if (!this.suppressValidationErr && i !== "SYSTEM" && i !== "PUBLIC") throw Error(`Expected SYSTEM or PUBLIC, found "${i}"`);
2049
- t += i.length, t = K(e, t);
2073
+ t += i.length, t = q(e, t);
2050
2074
  let a = null, o = null;
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"));
2075
+ if (i === "PUBLIC") [t, a] = this.readIdentifierVal(e, t, "publicIdentifier"), t = q(e, t), (e[t] === "\"" || e[t] === "'") && ([t, o] = this.readIdentifierVal(e, t, "systemIdentifier"));
2052
2076
  else if (i === "SYSTEM" && ([t, o] = this.readIdentifierVal(e, t, "systemIdentifier"), !this.suppressValidationErr && !o)) throw Error("Missing mandatory system identifier for SYSTEM notation");
2053
2077
  return {
2054
2078
  notationName: r,
@@ -2067,15 +2091,15 @@ var Ct = function(e) {
2067
2091
  return t++, [t, r];
2068
2092
  }
2069
2093
  readElementExp(e, t) {
2070
- t = K(e, t);
2094
+ t = q(e, t);
2071
2095
  let n = t;
2072
2096
  for (; t < e.length && !/\s/.test(e[t]);) t++;
2073
2097
  let r = e.substring(n, t);
2074
- if (!this.suppressValidationErr && !G(r, { xmlVersion: this.xmlVersion })) throw Error(`Invalid element name: "${r}"`);
2075
- t = K(e, t);
2098
+ if (!this.suppressValidationErr && !Nt(r, { xmlVersion: this.xmlVersion })) throw Error(`Invalid element name: "${r}"`);
2099
+ t = q(e, t);
2076
2100
  let i = "";
2077
- if (e[t] === "E" && q(e, "MPTY", t)) t += 4;
2078
- else if (e[t] === "A" && q(e, "NY", t)) t += 2;
2101
+ if (e[t] === "E" && J(e, "MPTY", t)) t += 4;
2102
+ else if (e[t] === "A" && J(e, "NY", t)) t += 2;
2079
2103
  else if (e[t] === "(") {
2080
2104
  t++;
2081
2105
  let n = t;
@@ -2089,25 +2113,25 @@ var Ct = function(e) {
2089
2113
  };
2090
2114
  }
2091
2115
  readAttlistExp(e, t) {
2092
- t = K(e, t);
2116
+ t = q(e, t);
2093
2117
  let n = t;
2094
2118
  for (; t < e.length && !/\s/.test(e[t]);) t++;
2095
2119
  let r = e.substring(n, t);
2096
- for (J(r, { xmlVersion: this.xmlVersion }), t = K(e, t), n = t; t < e.length && !/\s/.test(e[t]);) t++;
2120
+ for (Y(r, { xmlVersion: this.xmlVersion }), t = q(e, t), n = t; t < e.length && !/\s/.test(e[t]);) t++;
2097
2121
  let i = e.substring(n, t);
2098
- if (!J(i, { xmlVersion: this.xmlVersion })) throw Error(`Invalid attribute name: "${i}"`);
2099
- t = K(e, t);
2122
+ if (!Y(i, { xmlVersion: this.xmlVersion })) throw Error(`Invalid attribute name: "${i}"`);
2123
+ t = q(e, t);
2100
2124
  let a = "";
2101
2125
  if (e.substring(t, t + 8).toUpperCase() === "NOTATION") {
2102
- if (a = "NOTATION", t += 8, t = K(e, t), e[t] !== "(") throw Error(`Expected '(', found "${e[t]}"`);
2126
+ if (a = "NOTATION", t += 8, t = q(e, t), e[t] !== "(") throw Error(`Expected '(', found "${e[t]}"`);
2103
2127
  t++;
2104
2128
  let n = [];
2105
2129
  for (; t < e.length && e[t] !== ")";) {
2106
2130
  let r = t;
2107
2131
  for (; t < e.length && e[t] !== "|" && e[t] !== ")";) t++;
2108
2132
  let i = e.substring(r, 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));
2133
+ if (i = i.trim(), !Y(i, { xmlVersion: this.xmlVersion })) throw Error(`Invalid notation name: "${i}"`);
2134
+ n.push(i), e[t] === "|" && (t++, t = q(e, t));
2111
2135
  }
2112
2136
  if (e[t] !== ")") throw Error("Unterminated list of notations");
2113
2137
  t++, a += " (" + n.join("|") + ")";
@@ -2125,7 +2149,7 @@ var Ct = function(e) {
2125
2149
  "NMTOKENS"
2126
2150
  ].includes(a.toUpperCase())) throw Error(`Invalid attribute type: "${a}"`);
2127
2151
  }
2128
- t = K(e, t);
2152
+ t = q(e, t);
2129
2153
  let o = "";
2130
2154
  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"), {
2131
2155
  elementName: r,
@@ -2135,43 +2159,190 @@ var Ct = function(e) {
2135
2159
  index: t
2136
2160
  };
2137
2161
  }
2138
- }, K = (e, t) => {
2162
+ }, q = (e, t) => {
2139
2163
  for (; t < e.length && /\s/.test(e[t]);) t++;
2140
2164
  return t;
2141
2165
  };
2142
- function q(e, t, n) {
2166
+ function J(e, t, n) {
2143
2167
  for (let r = 0; r < t.length; r++) if (t[r] !== e[n + r + 1]) return !1;
2144
2168
  return !0;
2145
2169
  }
2146
- function J(e, t) {
2147
- if (G(e, { xmlVersion: t })) return e;
2170
+ function Y(e, t) {
2171
+ if (Nt(e, { xmlVersion: t })) return e;
2148
2172
  throw Error(`Invalid entity name ${e}`);
2149
2173
  }
2150
2174
  //#endregion
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 = {
2175
+ //#region ../../node_modules/.pnpm/anynum@1.0.1/node_modules/anynum/digitTable.js
2176
+ var Lt = [
2177
+ 48,
2178
+ 1632,
2179
+ 1776,
2180
+ 2406,
2181
+ 2534,
2182
+ 2662,
2183
+ 2790,
2184
+ 2918,
2185
+ 3046,
2186
+ 3174,
2187
+ 3302,
2188
+ 3430,
2189
+ 3558,
2190
+ 3664,
2191
+ 3792,
2192
+ 3872,
2193
+ 4160,
2194
+ 4240,
2195
+ 6112,
2196
+ 6160,
2197
+ 6470,
2198
+ 6608,
2199
+ 6784,
2200
+ 6800,
2201
+ 6992,
2202
+ 7088,
2203
+ 7232,
2204
+ 7248,
2205
+ 65296,
2206
+ 120782,
2207
+ 120792,
2208
+ 120802,
2209
+ 120812,
2210
+ 120822,
2211
+ 66720,
2212
+ 68912,
2213
+ 69734,
2214
+ 69872,
2215
+ 69942,
2216
+ 70096,
2217
+ 70384,
2218
+ 70736,
2219
+ 70864,
2220
+ 71248,
2221
+ 71360,
2222
+ 71472,
2223
+ 71904,
2224
+ 72016,
2225
+ 72688,
2226
+ 72784,
2227
+ 73040,
2228
+ 73120,
2229
+ 73552,
2230
+ 92768,
2231
+ 92864,
2232
+ 93008,
2233
+ 123200,
2234
+ 123632,
2235
+ 124144,
2236
+ 125264,
2237
+ 130032
2238
+ ], Rt = /* @__PURE__ */ new Map(), zt = 65535, Bt = 1632, Vt = (/* @__PURE__ */ new Uint8Array(63904)).fill(255);
2239
+ for (let e of Lt) for (let t = 0; t < 10; t++) {
2240
+ let n = e + t;
2241
+ n <= zt ? Vt[n - Bt] = t : Rt.set(n, t);
2242
+ }
2243
+ //#endregion
2244
+ //#region ../../node_modules/.pnpm/anynum@1.0.1/node_modules/anynum/anynum.js
2245
+ var Ht = 48, Ut = 57, Wt = 45, X = /* @__PURE__ */ new Set([
2246
+ 8722,
2247
+ 65293,
2248
+ 65123
2249
+ ]);
2250
+ function Gt(e) {
2251
+ if (typeof e != "string") return e;
2252
+ let t = e.length;
2253
+ if (t === 0) return e;
2254
+ let n = -1;
2255
+ for (let r = 0; r < t; r++) {
2256
+ let i = e.charCodeAt(r);
2257
+ if (!(i >= Ht && i <= Ut || i === Wt)) {
2258
+ if (i < 1632) {
2259
+ if (X.has(i)) {
2260
+ n = r;
2261
+ break;
2262
+ }
2263
+ continue;
2264
+ }
2265
+ if (i >= 55296 && i <= 56319) {
2266
+ if (r + 1 < t) {
2267
+ let t = e.charCodeAt(r + 1);
2268
+ if (t >= 56320 && t <= 57343) {
2269
+ let e = 65536 + (i - 55296 << 10) + (t - 56320);
2270
+ if (Rt.has(e)) {
2271
+ n = r;
2272
+ break;
2273
+ }
2274
+ }
2275
+ }
2276
+ continue;
2277
+ }
2278
+ if (Vt[i - 1632] !== 255 || X.has(i)) {
2279
+ n = r;
2280
+ break;
2281
+ }
2282
+ }
2283
+ }
2284
+ if (n === -1) return e;
2285
+ let r = [];
2286
+ n > 0 && r.push(e.slice(0, n));
2287
+ for (let i = n; i < t; i++) {
2288
+ let n = e.charCodeAt(i);
2289
+ if (n >= Ht && n <= Ut || n === Wt) {
2290
+ r.push(e[i]);
2291
+ continue;
2292
+ }
2293
+ if (n < 1632) {
2294
+ r.push(X.has(n) ? "-" : e[i]);
2295
+ continue;
2296
+ }
2297
+ if (n >= 55296 && n <= 56319) {
2298
+ if (i + 1 < t) {
2299
+ let t = e.charCodeAt(i + 1);
2300
+ if (t >= 56320 && t <= 57343) {
2301
+ let e = 65536 + (n - 55296 << 10) + (t - 56320), a = Rt.get(e);
2302
+ if (a !== void 0) {
2303
+ r.push(String.fromCharCode(a + 48)), i++;
2304
+ continue;
2305
+ }
2306
+ }
2307
+ }
2308
+ r.push(e[i]);
2309
+ continue;
2310
+ }
2311
+ if (X.has(n)) {
2312
+ r.push("-");
2313
+ continue;
2314
+ }
2315
+ let a = Vt[n - Bt];
2316
+ r.push(a === 255 ? e[i] : String.fromCharCode(a + 48));
2317
+ }
2318
+ return r.join("");
2319
+ }
2320
+ //#endregion
2321
+ //#region ../../node_modules/.pnpm/strnum@2.4.1/node_modules/strnum/strnum.js
2322
+ var Kt = /^[-+]?0x[a-fA-F0-9]+$/, qt = /^0b[01]+$/, Jt = /^0o[0-7]+$/, Yt = /^([\-\+])?(0*)([0-9]*(\.[0-9]*)?)$/, Xt = {
2153
2323
  hex: !0,
2154
2324
  binary: !1,
2155
2325
  octal: !1,
2156
2326
  leadingZeros: !0,
2157
2327
  decimalPoint: ".",
2158
2328
  eNotation: !0,
2159
- infinity: "original"
2329
+ infinity: "original",
2330
+ unicode: !1
2160
2331
  };
2161
- function zt(e, t = {}) {
2162
- if (t = Object.assign({}, Rt, t), !e || typeof e != "string") return e;
2332
+ function Zt(e, t = {}) {
2333
+ if (t = Object.assign({}, Xt, t), !e || typeof e != "string") return e;
2163
2334
  let n = e.trim();
2164
2335
  if (n.length === 0 || t.skipLike !== void 0 && t.skipLike.test(n)) return e;
2165
- if (n === "0") return 0;
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);
2171
- {
2172
- let r = Lt.exec(n);
2336
+ if (n === "0" || t.unicode && (n = Gt(n), n === "0")) return 0;
2337
+ if (t.hex && Kt.test(n)) return tn(n, 16);
2338
+ if (t.binary && qt.test(n)) return tn(n, 2);
2339
+ if (t.octal && Jt.test(n)) return tn(n, 8);
2340
+ if (!isFinite(n)) return nn(e, Number(n), t);
2341
+ if (n.includes("e") || n.includes("E")) return $t(e, n, t);
2342
+ {
2343
+ let r = Yt.exec(n);
2173
2344
  if (r) {
2174
- let i = r[1] || "", a = r[2], o = Ht(r[3]), s = i ? e[a.length + 1] === "." : e[a.length] === ".";
2345
+ let i = r[1] || "", a = r[2], o = en(r[3]), s = i ? e[a.length + 1] === "." : e[a.length] === ".";
2175
2346
  if (!t.leadingZeros && (a.length > 1 || a.length === 1 && !s)) return e;
2176
2347
  {
2177
2348
  let r = Number(n), s = String(r);
@@ -2184,26 +2355,26 @@ function zt(e, t = {}) {
2184
2355
  } else return e;
2185
2356
  }
2186
2357
  }
2187
- var Bt = /^([-+])?(0*)(\d*(\.\d*)?[eE][-\+]?\d+)$/;
2188
- function Vt(e, t, n) {
2358
+ var Qt = /^([-+])?(0*)(\d*(\.\d*)?[eE][-\+]?\d+)$/;
2359
+ function $t(e, t, n) {
2189
2360
  if (!n.eNotation) return e;
2190
- let r = t.match(Bt);
2361
+ let r = t.match(Qt);
2191
2362
  if (r) {
2192
2363
  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;
2193
2364
  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);
2194
2365
  } else return e;
2195
2366
  }
2196
- function Ht(e) {
2367
+ function en(e) {
2197
2368
  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;
2198
2369
  }
2199
- function Y(e, t) {
2370
+ function tn(e, t) {
2200
2371
  let n = e.trim();
2201
2372
  if ((t === 2 || t === 8) && (e = n.substring(2)), parseInt) return parseInt(e, t);
2202
2373
  if (Number.parseInt) return Number.parseInt(e, t);
2203
2374
  if (window && window.parseInt) return window.parseInt(e, t);
2204
2375
  throw Error("parseInt, Number.parseInt, window.parseInt are not supported");
2205
2376
  }
2206
- function Ut(e, t, n) {
2377
+ function nn(e, t, n) {
2207
2378
  let r = t === Infinity;
2208
2379
  switch (n.infinity.toLowerCase()) {
2209
2380
  case "null": return null;
@@ -2213,15 +2384,15 @@ function Ut(e, t, n) {
2213
2384
  }
2214
2385
  }
2215
2386
  //#endregion
2216
- //#region ../../node_modules/.pnpm/fast-xml-parser@5.8.0/node_modules/fast-xml-parser/src/ignoreAttributes.js
2217
- function Wt(e) {
2387
+ //#region ../../node_modules/.pnpm/fast-xml-parser@5.10.0/node_modules/fast-xml-parser/src/ignoreAttributes.js
2388
+ function rn(e) {
2218
2389
  return typeof e == "function" ? e : Array.isArray(e) ? (t) => {
2219
2390
  for (let n of e) if (typeof n == "string" && t === n || n instanceof RegExp && n.test(t)) return !0;
2220
2391
  } : () => !1;
2221
2392
  }
2222
2393
  //#endregion
2223
- //#region ../../node_modules/.pnpm/path-expression-matcher@1.5.0/node_modules/path-expression-matcher/src/Expression.js
2224
- var X = class {
2394
+ //#region ../../node_modules/.pnpm/path-expression-matcher@1.6.2/node_modules/path-expression-matcher/src/Expression.js
2395
+ var an = class {
2225
2396
  constructor(e, t = {}, n) {
2226
2397
  this.pattern = e, this.separator = t.separator || ".", this.segments = this._parse(e), this.data = n, this._hasDeepWildcard = this.segments.some((e) => e.type === "deep-wildcard"), this._hasAttributeCondition = this.segments.some((e) => e.attrName !== void 0), this._hasPositionSelector = this.segments.some((e) => e.position !== void 0);
2227
2398
  }
@@ -2277,14 +2448,21 @@ var X = class {
2277
2448
  toString() {
2278
2449
  return this.pattern;
2279
2450
  }
2280
- }, Gt = class {
2451
+ }, on = class {
2281
2452
  constructor() {
2282
- this._byDepthAndTag = /* @__PURE__ */ new Map(), this._wildcardByDepth = /* @__PURE__ */ new Map(), this._deepWildcards = [], this._patterns = /* @__PURE__ */ new Set(), this._sealed = !1;
2453
+ this._byDepthAndTag = /* @__PURE__ */ new Map(), this._wildcardByDepth = /* @__PURE__ */ new Map(), this._deepWildcards = [], this._deepByTerminalTag = /* @__PURE__ */ new Map(), this._patterns = /* @__PURE__ */ new Set(), this._sealed = !1;
2283
2454
  }
2284
2455
  add(e) {
2285
2456
  if (this._sealed) throw TypeError("ExpressionSet is sealed. Create a new ExpressionSet to add more expressions.");
2286
2457
  if (this._patterns.has(e.pattern)) return this;
2287
- if (this._patterns.add(e.pattern), e.hasDeepWildcard()) return this._deepWildcards.push(e), this;
2458
+ if (this._patterns.add(e.pattern), e.hasDeepWildcard()) {
2459
+ let t = e.segments[e.segments.length - 1];
2460
+ if (t && t.type !== "deep-wildcard" && t.tag !== "*") {
2461
+ let n = t.tag;
2462
+ this._deepByTerminalTag.has(n) || this._deepByTerminalTag.set(n, []), this._deepByTerminalTag.get(n).push(e);
2463
+ } else this._deepWildcards.push(e);
2464
+ return this;
2465
+ }
2288
2466
  let t = e.length, n = e.segments[e.segments.length - 1]?.tag;
2289
2467
  if (!n || n === "*") this._wildcardByDepth.has(t) || this._wildcardByDepth.set(t, []), this._wildcardByDepth.get(t).push(e);
2290
2468
  else {
@@ -2313,18 +2491,22 @@ var X = class {
2313
2491
  return this.findMatch(e) !== null;
2314
2492
  }
2315
2493
  findMatch(e) {
2316
- let t = e.getDepth(), n = `${t}:${e.getCurrentTag()}`, r = this._byDepthAndTag.get(n);
2317
- if (r) {
2318
- for (let t = 0; t < r.length; t++) if (e.matches(r[t])) return r[t];
2319
- }
2320
- let i = this._wildcardByDepth.get(t);
2494
+ let t = e.getDepth(), n = e.getCurrentTag(), r = `${t}:${n}`, i = this._byDepthAndTag.get(r);
2321
2495
  if (i) {
2322
2496
  for (let t = 0; t < i.length; t++) if (e.matches(i[t])) return i[t];
2323
2497
  }
2498
+ let a = this._wildcardByDepth.get(t);
2499
+ if (a) {
2500
+ for (let t = 0; t < a.length; t++) if (e.matches(a[t])) return a[t];
2501
+ }
2502
+ let o = this._deepByTerminalTag.get(n);
2503
+ if (o) {
2504
+ for (let t = 0; t < o.length; t++) if (e.matches(o[t])) return o[t];
2505
+ }
2324
2506
  for (let t = 0; t < this._deepWildcards.length; t++) if (e.matches(this._deepWildcards[t])) return this._deepWildcards[t];
2325
2507
  return null;
2326
2508
  }
2327
- }, Kt = class {
2509
+ }, sn = class {
2328
2510
  constructor(e) {
2329
2511
  this._matcher = e;
2330
2512
  }
@@ -2349,6 +2531,12 @@ var X = class {
2349
2531
  let n = t[t.length - 1];
2350
2532
  return n.values !== void 0 && e in n.values;
2351
2533
  }
2534
+ getAnyParentAttr(e) {
2535
+ return this._matcher.getAnyParentAttr(e);
2536
+ }
2537
+ hasAnyParentAttr(e) {
2538
+ return this._matcher.hasAnyParentAttr(e);
2539
+ }
2352
2540
  getPosition() {
2353
2541
  let e = this._matcher.path;
2354
2542
  return e.length === 0 ? -1 : e[e.length - 1].position ?? 0;
@@ -2375,29 +2563,43 @@ var X = class {
2375
2563
  matchesAny(e) {
2376
2564
  return e.matchesAny(this._matcher);
2377
2565
  }
2378
- }, qt = class {
2566
+ }, cn = class {
2379
2567
  constructor(e = {}) {
2380
- this.separator = e.separator || ".", this.path = [], this.siblingStacks = [], this._pathStringCache = null, this._view = new Kt(this);
2568
+ this.separator = e.separator || ".", this.path = [], this.siblingStacks = [], this._pathStringCache = null, this._view = new sn(this), this._keptAttrs = [];
2381
2569
  }
2382
- push(e, t = null, n = null) {
2570
+ push(e, t = null, n = null, r = null) {
2383
2571
  this._pathStringCache = null, this.path.length > 0 && (this.path[this.path.length - 1].values = void 0);
2384
- let r = this.path.length;
2385
- this.siblingStacks[r] || (this.siblingStacks[r] = /* @__PURE__ */ new Map());
2386
- let i = this.siblingStacks[r], a = n ? `${n}:${e}` : e, o = i.get(a) || 0, s = 0;
2387
- for (let e of i.values()) s += e;
2388
- i.set(a, o + 1);
2389
- let c = {
2572
+ let i = this.path.length, a = this.siblingStacks[i];
2573
+ a || (a = {
2574
+ counts: /* @__PURE__ */ new Map(),
2575
+ total: 0
2576
+ }, this.siblingStacks[i] = a);
2577
+ let o = n ? `${n}:${e}` : e, s = a.counts.get(o) || 0, c = a.total;
2578
+ a.counts.set(o, s + 1), a.total++;
2579
+ let l = {
2390
2580
  tag: e,
2391
- position: s,
2392
- counter: o
2581
+ position: c,
2582
+ counter: s
2393
2583
  };
2394
- n != null && (c.namespace = n), t != null && (c.values = t), this.path.push(c);
2584
+ n != null && (l.namespace = n), t != null && (l.values = t), this.path.push(l);
2585
+ let u = this.path.length, d = r === null ? null : r.keep;
2586
+ if (d != null && d.length > 0 && t) for (let e = 0; e < d.length; e++) {
2587
+ let n = d[e];
2588
+ t[n] !== void 0 && this._keptAttrs.push({
2589
+ depth: u,
2590
+ name: n,
2591
+ value: t[n]
2592
+ });
2593
+ }
2395
2594
  }
2396
2595
  pop() {
2397
2596
  if (this.path.length === 0) return;
2398
2597
  this._pathStringCache = null;
2399
2598
  let e = this.path.pop();
2400
- return this.siblingStacks.length > this.path.length + 1 && (this.siblingStacks.length = this.path.length + 1), e;
2599
+ this.siblingStacks.length > this.path.length + 1 && (this.siblingStacks.length = this.path.length + 1);
2600
+ let t = this.path.length + 1;
2601
+ for (; this._keptAttrs.length > 0 && this._keptAttrs[this._keptAttrs.length - 1].depth >= t;) this._keptAttrs.pop();
2602
+ return e;
2401
2603
  }
2402
2604
  updateCurrent(e) {
2403
2605
  if (this.path.length > 0) {
@@ -2419,6 +2621,15 @@ var X = class {
2419
2621
  let t = this.path[this.path.length - 1];
2420
2622
  return t.values !== void 0 && e in t.values;
2421
2623
  }
2624
+ getAnyParentAttr(e) {
2625
+ let t = this._keptAttrs;
2626
+ for (let n = t.length - 1; n >= 0; n--) if (t[n].name === e) return t[n].value;
2627
+ }
2628
+ hasAnyParentAttr(e) {
2629
+ let t = this._keptAttrs;
2630
+ for (let n = t.length - 1; n >= 0; n--) if (t[n].name === e) return !0;
2631
+ return !1;
2632
+ }
2422
2633
  getPosition() {
2423
2634
  return this.path.length === 0 ? -1 : this.path[this.path.length - 1].position ?? 0;
2424
2635
  }
@@ -2444,7 +2655,7 @@ var X = class {
2444
2655
  return this.path.map((e) => e.tag);
2445
2656
  }
2446
2657
  reset() {
2447
- this._pathStringCache = null, this.path = [], this.siblingStacks = [];
2658
+ this._pathStringCache = null, this.path = [], this.siblingStacks = [], this._keptAttrs = [];
2448
2659
  }
2449
2660
  matches(e) {
2450
2661
  let t = e.segments;
@@ -2489,19 +2700,660 @@ var X = class {
2489
2700
  snapshot() {
2490
2701
  return {
2491
2702
  path: this.path.map((e) => ({ ...e })),
2492
- siblingStacks: this.siblingStacks.map((e) => new Map(e))
2703
+ siblingStacks: this.siblingStacks.map((e) => e && {
2704
+ counts: new Map(e.counts),
2705
+ total: e.total
2706
+ }),
2707
+ keptAttrs: this._keptAttrs.map((e) => ({ ...e }))
2493
2708
  };
2494
2709
  }
2495
2710
  restore(e) {
2496
- this._pathStringCache = null, this.path = e.path.map((e) => ({ ...e })), this.siblingStacks = e.siblingStacks.map((e) => new Map(e));
2711
+ this._pathStringCache = null, this.path = e.path.map((e) => ({ ...e })), this.siblingStacks = e.siblingStacks.map((e) => e && {
2712
+ counts: new Map(e.counts),
2713
+ total: e.total
2714
+ }), this._keptAttrs = (e.keptAttrs || []).map((e) => ({ ...e }));
2497
2715
  }
2498
2716
  readOnly() {
2499
2717
  return this._view;
2500
2718
  }
2501
- };
2719
+ }, ln = [
2720
+ {
2721
+ id: "html-script-open",
2722
+ description: "<script opening tag",
2723
+ pattern: /<script[\s>/]/i
2724
+ },
2725
+ {
2726
+ id: "html-script-close",
2727
+ description: "<\/script closing tag",
2728
+ pattern: /<\/script[\s>]/i
2729
+ },
2730
+ {
2731
+ id: "html-javascript-protocol",
2732
+ description: "javascript: URI scheme (with optional whitespace/encoding)",
2733
+ pattern: /j[\t\n\r ]*a[\t\n\r ]*v[\t\n\r ]*a[\t\n\r ]*s[\t\n\r ]*c[\t\n\r ]*r[\t\n\r ]*i[\t\n\r ]*p[\t\n\r ]*t[\t\n\r ]*:/i
2734
+ },
2735
+ {
2736
+ id: "html-vbscript-protocol",
2737
+ description: "vbscript: URI scheme",
2738
+ pattern: /vbscript[\t\n\r ]*:/i
2739
+ },
2740
+ {
2741
+ id: "html-data-html",
2742
+ description: "data:text/html URI — can execute scripts in browsers",
2743
+ pattern: /data[\t\n\r ]*:[\t\n\r ]*text\/html/i
2744
+ },
2745
+ {
2746
+ id: "html-data-xhtml",
2747
+ description: "data:application/xhtml+xml URI",
2748
+ pattern: /data[\t\n\r ]*:[\t\n\r ]*application\/xhtml/i
2749
+ },
2750
+ {
2751
+ id: "html-data-svg",
2752
+ description: "data:image/svg+xml URI — can execute scripts",
2753
+ pattern: /data[\t\n\r ]*:[\t\n\r ]*image\/svg\+xml/i
2754
+ },
2755
+ {
2756
+ id: "html-inline-event-handler",
2757
+ description: "Inline event handler attributes: onclick=, onerror=, onload=, etc.",
2758
+ pattern: /\bon\w{1,30}\s*=/i
2759
+ },
2760
+ {
2761
+ id: "html-entity-obfuscated-script",
2762
+ description: "HTML-entity-encoded <script (e.g. &#x3C;script or &lt;script)",
2763
+ pattern: /(?:&#x0*3[Cc];?|&#0*60;?|&lt;)\s*script/i
2764
+ },
2765
+ {
2766
+ id: "html-entity-obfuscated-javascript",
2767
+ description: "HTML-entity-encoded javascript: (partial — catches common &#106; or &#x6a; for \"j\")",
2768
+ pattern: /(?:&#x0*6[Aa];?|&#0*106;?)\s*(?:&#x0*61;?|a)[\s\S]{0,80}script\s*:/i
2769
+ },
2770
+ {
2771
+ id: "html-style-expression",
2772
+ description: "CSS expression() — IE-era code execution in style attributes",
2773
+ pattern: /style[\s\S]{0,20}expression\s*\(/i
2774
+ },
2775
+ {
2776
+ id: "html-object-embed",
2777
+ description: "<object or <embed tags that can load active content",
2778
+ pattern: /<(?:object|embed)[\s>/]/i
2779
+ },
2780
+ {
2781
+ id: "html-base-tag",
2782
+ description: "<base href= — can hijack all relative URLs on a page",
2783
+ pattern: /<base[\s>]/i
2784
+ },
2785
+ {
2786
+ id: "html-meta-refresh",
2787
+ description: "<meta http-equiv=\"refresh\" — can redirect users",
2788
+ pattern: /<meta[\s\S]{0,40}http-equiv[\s\S]{0,20}refresh/i
2789
+ },
2790
+ {
2791
+ id: "html-srcdoc",
2792
+ description: "srcdoc= attribute on iframes — embeds HTML that can run scripts",
2793
+ pattern: /srcdoc\s*=/i
2794
+ },
2795
+ {
2796
+ id: "html-iframe",
2797
+ description: "<iframe tag",
2798
+ pattern: /<iframe[\s>/]/i
2799
+ },
2800
+ {
2801
+ id: "html-form",
2802
+ description: "<form tag — can be used for phishing / credential harvesting injection",
2803
+ pattern: /<form[\s>/]/i
2804
+ }
2805
+ ], un = [
2806
+ {
2807
+ id: "xml-cdata-injection",
2808
+ description: "CDATA section injection: <![CDATA[ breaks out of text node context",
2809
+ pattern: /<!\[CDATA\[/i
2810
+ },
2811
+ {
2812
+ id: "xml-cdata-close",
2813
+ description: "CDATA close sequence: ]]> can terminate an enclosing CDATA section",
2814
+ pattern: /\]\]>/
2815
+ },
2816
+ {
2817
+ id: "xml-processing-instruction",
2818
+ description: "XML processing instruction: <?xml-stylesheet or <?php etc.",
2819
+ pattern: /<\?(?:xml[\- ]|php|asp)/i
2820
+ },
2821
+ {
2822
+ id: "xml-doctype-injection",
2823
+ description: "DOCTYPE declaration embedded in content — can define entities",
2824
+ pattern: /<!DOCTYPE(?:[\s[]|$)/i
2825
+ },
2826
+ {
2827
+ id: "xml-entity-system",
2828
+ description: "SYSTEM keyword — used in external entity declarations (XXE)",
2829
+ pattern: /\bSYSTEM\s+["']/i
2830
+ },
2831
+ {
2832
+ id: "xml-entity-public",
2833
+ description: "PUBLIC keyword — used in external entity declarations (XXE)",
2834
+ pattern: /\bPUBLIC\s+["']/i
2835
+ },
2836
+ {
2837
+ id: "xml-entity-declaration",
2838
+ description: "<!ENTITY declaration — defines entities, potential XXE or entity expansion",
2839
+ pattern: /<!ENTITY[\s%]/i
2840
+ },
2841
+ {
2842
+ id: "xml-billion-laughs",
2843
+ description: "Entity reference chaining / billion laughs: repeated &eX; style references",
2844
+ pattern: /(?:&\w{1,20};){3,}/
2845
+ },
2846
+ {
2847
+ id: "xml-namespace-confusion",
2848
+ description: "xmlns: attribute injection — can redefine namespaces to confuse parsers",
2849
+ pattern: /\bxmlns\s*(?::\w{1,40})?\s*=/i
2850
+ },
2851
+ {
2852
+ id: "xml-comment-injection",
2853
+ description: "<!-- comment injection — can hide content from some parsers",
2854
+ pattern: /<!--/
2855
+ },
2856
+ {
2857
+ id: "xml-comment-close",
2858
+ description: "--> closes an enclosing XML comment",
2859
+ pattern: /-->/
2860
+ },
2861
+ {
2862
+ id: "xml-pi-close",
2863
+ description: "?> closes an enclosing processing instruction",
2864
+ pattern: /\?>/
2865
+ }
2866
+ ], dn = [
2867
+ {
2868
+ id: "svg-script-element",
2869
+ description: "<script element inside SVG executes JavaScript",
2870
+ pattern: /<script[\s>/]/i
2871
+ },
2872
+ {
2873
+ id: "svg-xlink-href-javascript",
2874
+ description: "xlink:href with javascript: — classic SVG XSS via <a> or <use>",
2875
+ pattern: /xlink\s*:\s*href\s*=\s*["']?\s*javascript\s*:/i
2876
+ },
2877
+ {
2878
+ id: "svg-href-javascript",
2879
+ description: "href= with javascript: in SVG context (<a>, <animate>, etc.)",
2880
+ pattern: /href\s*=\s*["']?\s*javascript\s*:/i
2881
+ },
2882
+ {
2883
+ id: "svg-foreignobject",
2884
+ description: "<foreignObject embeds HTML inside SVG — can execute scripts",
2885
+ pattern: /<foreignObject[\s>/]/i
2886
+ },
2887
+ {
2888
+ id: "svg-use-external",
2889
+ description: "<use xlink:href or href pointing to external resource (non-fragment URL)",
2890
+ pattern: /<use[\s\S]{0,60}(?:xlink\s*:\s*)?href\s*=\s*(?:["'][^#]|[^"'#\s>])/i
2891
+ },
2892
+ {
2893
+ id: "svg-animate-href",
2894
+ description: "<animate attributeName=\"href\" — can dynamically change href to javascript:",
2895
+ pattern: /<animate[\s\S]{0,80}attributeName\s*=\s*["'][\s]*href["']/i
2896
+ },
2897
+ {
2898
+ id: "svg-animate-xlinkhref",
2899
+ description: "<animate attributeName=\"xlink:href\"",
2900
+ pattern: /<animate[\s\S]{0,80}attributeName\s*=\s*["'][\s]*xlink\s*:\s*href["']/i
2901
+ },
2902
+ {
2903
+ id: "svg-set-javascript",
2904
+ description: "<set to=\"javascript:...\" — sets an attribute to a javascript: URI",
2905
+ pattern: /<set[\s\S]{0,80}to\s*=\s*["']?\s*javascript\s*:/i
2906
+ },
2907
+ {
2908
+ id: "svg-event-handler",
2909
+ description: "SVG-specific event handler attributes: onload=, onerror=, onactivate=, etc.",
2910
+ pattern: /\bon(?:load|error|activate|begin|end|repeat|focus|blur|click|mouse\w{1,20}|key\w{1,20})\s*=/i
2911
+ },
2912
+ {
2913
+ id: "svg-handler-generic",
2914
+ description: "Generic on* handler catch-all for SVG attributes",
2915
+ pattern: /\bon\w{1,30}\s*=/i
2916
+ },
2917
+ {
2918
+ id: "svg-filter-feimage",
2919
+ description: "<feImage href= — filter primitive that can load external resources",
2920
+ pattern: /<feImage[\s\S]{0,80}(?:xlink\s*:\s*)?href\s*=/i
2921
+ },
2922
+ {
2923
+ id: "svg-image-external",
2924
+ description: "<image xlink:href with http/https or javascript protocol",
2925
+ pattern: /<image[\s\S]{0,80}(?:xlink\s*:\s*)?href\s*=\s*["']?\s*(?:https?|javascript)\s*:/i
2926
+ },
2927
+ {
2928
+ id: "svg-style-javascript",
2929
+ description: "style= attribute containing javascript: (e.g. background:url(javascript:...))",
2930
+ pattern: /style\s*=[\s\S]{0,60}javascript\s*:/i
2931
+ }
2932
+ ], fn = [
2933
+ {
2934
+ id: "sql-block-comment-open",
2935
+ description: "SQL block comment open: /* ... */ — unusual in legitimate user text",
2936
+ pattern: /\/\*/
2937
+ },
2938
+ {
2939
+ id: "sql-union-select",
2940
+ description: "UNION SELECT — most common SQL injection aggregation attack",
2941
+ pattern: /\bUNION\s{1,20}(?:ALL\s{1,20})?SELECT\b/i
2942
+ },
2943
+ {
2944
+ id: "sql-drop-table",
2945
+ description: "DROP TABLE — destructive DDL injection",
2946
+ pattern: /\bDROP\s{1,20}TABLE\b/i
2947
+ },
2948
+ {
2949
+ id: "sql-drop-database",
2950
+ description: "DROP DATABASE — destructive DDL injection",
2951
+ pattern: /\bDROP\s{1,20}DATABASE\b/i
2952
+ },
2953
+ {
2954
+ id: "sql-insert-into",
2955
+ description: "INSERT INTO — data injection",
2956
+ pattern: /\bINSERT\s{1,20}INTO\b/i
2957
+ },
2958
+ {
2959
+ id: "sql-delete-from",
2960
+ description: "DELETE FROM — data deletion injection",
2961
+ pattern: /\bDELETE\s{1,20}FROM\b/i
2962
+ },
2963
+ {
2964
+ id: "sql-update-set",
2965
+ description: "UPDATE ... SET — data modification injection",
2966
+ pattern: /\bUPDATE\b[\s\S]{1,60}\bSET\b/i
2967
+ },
2968
+ {
2969
+ id: "sql-exec-xp",
2970
+ description: "EXEC xp_ — MSSQL extended stored procedure execution",
2971
+ pattern: /\bEXEC(?:UTE)?\s{1,20}xp_/i
2972
+ },
2973
+ {
2974
+ id: "sql-tautology-string",
2975
+ description: "Classic string tautology: ' OR '1'='1 or \" OR \"1\"=\"1\"",
2976
+ pattern: /'\s{0,10}OR\s{0,10}'[^']{0,20}'\s*=\s*'[^']{0,20}/i
2977
+ },
2978
+ {
2979
+ id: "sql-tautology-numeric",
2980
+ description: "Numeric tautology: OR 1=1",
2981
+ pattern: /\bOR\s{1,10}1\s*=\s*1\b/i
2982
+ },
2983
+ {
2984
+ id: "sql-always-true-zero",
2985
+ description: "Numeric tautology: OR 0=0",
2986
+ pattern: /\bOR\s{1,10}0\s*=\s*0\b/i
2987
+ },
2988
+ {
2989
+ id: "sql-sleep-benchmark",
2990
+ description: "Time-based blind injection: SLEEP() or BENCHMARK()",
2991
+ pattern: /\b(?:SLEEP|BENCHMARK)\s*\(/i
2992
+ },
2993
+ {
2994
+ id: "sql-waitfor-delay",
2995
+ description: "MSSQL time-based blind injection: WAITFOR DELAY",
2996
+ pattern: /\bWAITFOR\s{1,20}DELAY\b/i
2997
+ },
2998
+ {
2999
+ id: "sql-char-function",
3000
+ description: "CHAR() function — used to obfuscate injected strings",
3001
+ pattern: /\bCHAR\s*\(\s*\d{1,3}/i
3002
+ },
3003
+ {
3004
+ id: "sql-information-schema",
3005
+ description: "INFORMATION_SCHEMA — reconnaissance query for table/column enumeration",
3006
+ pattern: /\bINFORMATION_SCHEMA\b/i
3007
+ }
3008
+ ], pn = [
3009
+ {
3010
+ id: "shell-path-traversal-unix",
3011
+ description: "Unix path traversal: ../ — climbing the directory tree",
3012
+ pattern: /\.\.\//
3013
+ },
3014
+ {
3015
+ id: "shell-path-traversal-windows",
3016
+ description: "Windows path traversal: ..\\ — climbing the directory tree",
3017
+ pattern: /\.\.\\/
3018
+ },
3019
+ {
3020
+ id: "shell-path-traversal-encoded",
3021
+ description: "URL-encoded path traversal: %2e%2e or %2f variants",
3022
+ pattern: /%2e%2e|%2f\.\.|\.\.%2f/i
3023
+ },
3024
+ {
3025
+ id: "shell-null-byte",
3026
+ description: "Null byte injection: \\x00 or %00 — truncates strings in C-backed functions",
3027
+ pattern: /\x00|%00/
3028
+ },
3029
+ {
3030
+ id: "shell-semicolon",
3031
+ description: "Semicolon command separator: cmd1; cmd2",
3032
+ pattern: /;/
3033
+ },
3034
+ {
3035
+ id: "shell-pipe",
3036
+ description: "Pipe operator: cmd1 | cmd2",
3037
+ pattern: /\|/
3038
+ },
3039
+ {
3040
+ id: "shell-and-operator",
3041
+ description: "AND operator: cmd1 && cmd2",
3042
+ pattern: /&&/
3043
+ },
3044
+ {
3045
+ id: "shell-or-operator",
3046
+ description: "OR operator: cmd1 || cmd2",
3047
+ pattern: /\|\|/
3048
+ },
3049
+ {
3050
+ id: "shell-backtick",
3051
+ description: "Backtick command substitution: `cmd`",
3052
+ pattern: /`/
3053
+ },
3054
+ {
3055
+ id: "shell-dollar-paren",
3056
+ description: "Dollar-paren command substitution: $(cmd)",
3057
+ pattern: /\$\(/
3058
+ },
3059
+ {
3060
+ id: "shell-dollar-brace",
3061
+ description: "Dollar-brace variable expansion: ${var} — can be abused for injection",
3062
+ pattern: /\$\{/
3063
+ },
3064
+ {
3065
+ id: "shell-redirect-out",
3066
+ description: "Output redirection: cmd > file or cmd >> file",
3067
+ pattern: />{1,2}/
3068
+ },
3069
+ {
3070
+ id: "shell-redirect-in",
3071
+ description: "Input redirection: cmd < file",
3072
+ pattern: /</
3073
+ },
3074
+ {
3075
+ id: "shell-newline-injection",
3076
+ description: "Newline injection: \\n or \\r — can inject new shell commands",
3077
+ pattern: /[\n\r]/
3078
+ },
3079
+ {
3080
+ id: "shell-glob-star",
3081
+ description: "Glob expansion: * or ? — can expand to unintended files",
3082
+ pattern: /[/\\][*?]/
3083
+ },
3084
+ {
3085
+ id: "shell-absolute-root",
3086
+ description: "Absolute root path injection: string starting with / or \\ (Windows UNC)",
3087
+ pattern: /^(?:\/|\\\\)/
3088
+ },
3089
+ {
3090
+ id: "shell-windows-drive",
3091
+ description: "Windows drive letter path injection: C:\\ or D:/",
3092
+ pattern: /^[a-zA-Z]:[/\\]/
3093
+ },
3094
+ {
3095
+ id: "shell-curl-wget",
3096
+ description: "curl/wget with URL or flags — can exfiltrate data or download payloads",
3097
+ pattern: /\b(?:curl|wget)\s+(?:https?:\/\/|ftp:\/\/|-)/i
3098
+ }
3099
+ ], mn = [
3100
+ {
3101
+ id: "redos-nested-quantifier-plus",
3102
+ description: "Nested + quantifier inside a group with outer quantifier: (a+)+, (.+b)*, etc.",
3103
+ pattern: /\([^)]*\+[^)]*\)[+*]/
3104
+ },
3105
+ {
3106
+ id: "redos-nested-quantifier-star",
3107
+ description: "Nested * quantifier: (a*)* or (a*)+ — catastrophic backtracking",
3108
+ pattern: /\([^)]*\*[^)]*\)[*+]/
3109
+ },
3110
+ {
3111
+ id: "redos-nested-groups",
3112
+ description: "Doubly nested quantified groups: ((a+)+) — guaranteed catastrophic",
3113
+ pattern: /\(\([^)]{0,40}\)[+*]\)[+*]/
3114
+ },
3115
+ {
3116
+ id: "redos-alternation-overlap",
3117
+ description: "Overlapping alternation under quantifier: (a|a)+ — ambiguous NFA paths",
3118
+ pattern: /\(([^|()]{1,20})\|(?:\1)(?:\|[^|()]{1,20}){0,5}\)[+*?]{1,2}/
3119
+ },
3120
+ {
3121
+ id: "redos-star-plus-concat",
3122
+ description: "(x*x)+ pattern — triggers super-linear backtracking",
3123
+ pattern: /\([^)]{0,10}\*[^)]{0,10}\)[+*]/
3124
+ },
3125
+ {
3126
+ id: "redos-dot-star-greedy",
3127
+ description: "(.*){n,} or (.+){n,} — repeated greedy dot quantifiers",
3128
+ pattern: /\(\.[*+]\)\{?\d/
3129
+ },
3130
+ {
3131
+ id: "redos-large-repetition",
3132
+ description: "Very large fixed or range repetition count {1000,} or {1000,n} — denial of service via backtracking",
3133
+ pattern: /\{\d{4,}(?:,\d*)?\}/
3134
+ },
3135
+ {
3136
+ id: "redos-catastrophic-alternation",
3137
+ description: "Long alternation with many similar branches — polynomial backtracking risk",
3138
+ pattern: /\([^)]{0,200}(?:\|[^|)]{0,50}){9,}\)/
3139
+ }
3140
+ ], Z = "[\"'\\s]*:", hn = [
3141
+ {
3142
+ id: "nosql-where-operator",
3143
+ description: "$where — executes arbitrary JavaScript server-side in MongoDB",
3144
+ pattern: RegExp(`\\$where${Z}`, "i")
3145
+ },
3146
+ {
3147
+ id: "nosql-ne-operator",
3148
+ description: "$ne — \"not equal\" operator used to bypass equality checks",
3149
+ pattern: RegExp(`\\$ne${Z}`, "i")
3150
+ },
3151
+ {
3152
+ id: "nosql-gt-operator",
3153
+ description: "$gt — \"greater than\" used to bypass password/value checks",
3154
+ pattern: RegExp(`\\$gte?${Z}`, "i")
3155
+ },
3156
+ {
3157
+ id: "nosql-lt-operator",
3158
+ description: "$lt / $lte — \"less than\" bypass variants",
3159
+ pattern: RegExp(`\\$lte?${Z}`, "i")
3160
+ },
3161
+ {
3162
+ id: "nosql-regex-operator",
3163
+ description: "$regex — can be used to extract data character by character (blind injection)",
3164
+ pattern: RegExp(`\\$regex${Z}`, "i")
3165
+ },
3166
+ {
3167
+ id: "nosql-or-operator",
3168
+ description: "$or — logical OR; used to create always-true conditions",
3169
+ pattern: RegExp(`\\$or${Z}\\s*\\[`, "i")
3170
+ },
3171
+ {
3172
+ id: "nosql-and-operator",
3173
+ description: "$and — logical AND operator injection",
3174
+ pattern: RegExp(`\\$and${Z}\\s*\\[`, "i")
3175
+ },
3176
+ {
3177
+ id: "nosql-nor-operator",
3178
+ description: "$nor — logical NOR operator injection",
3179
+ pattern: RegExp(`\\$nor${Z}\\s*\\[`, "i")
3180
+ },
3181
+ {
3182
+ id: "nosql-exists-operator",
3183
+ description: "$exists — can enumerate fields to determine schema",
3184
+ pattern: RegExp(`\\$exists${Z}`, "i")
3185
+ },
3186
+ {
3187
+ id: "nosql-in-operator",
3188
+ description: "$in — matches any value in a list; can enumerate values",
3189
+ pattern: RegExp(`\\$in${Z}\\s*\\[`, "i")
3190
+ },
3191
+ {
3192
+ id: "nosql-expr-operator",
3193
+ description: "$expr — allows aggregation expressions in queries (MongoDB 3.6+)",
3194
+ pattern: RegExp(`\\$expr${Z}`, "i")
3195
+ },
3196
+ {
3197
+ id: "nosql-function-operator",
3198
+ description: "$function — executes arbitrary JavaScript in MongoDB 4.4+",
3199
+ pattern: RegExp(`\\$function${Z}`, "i")
3200
+ },
3201
+ {
3202
+ id: "nosql-accumulator-operator",
3203
+ description: "$accumulator — custom aggregation with arbitrary JS execution",
3204
+ pattern: RegExp(`\\$accumulator${Z}`, "i")
3205
+ },
3206
+ {
3207
+ id: "nosql-proto-pollution",
3208
+ description: "__proto__ — prototype pollution via object key injection",
3209
+ pattern: /__proto__/
3210
+ },
3211
+ {
3212
+ id: "nosql-constructor-prototype",
3213
+ description: "constructor.prototype — alternative prototype pollution vector (dot notation or JSON key)",
3214
+ pattern: /constructor[\s"':.,{\[]*prototype/i
3215
+ },
3216
+ {
3217
+ id: "nosql-proto-bracket",
3218
+ description: "[\"__proto__\"] — bracket-notation prototype pollution",
3219
+ pattern: /\[["']__proto__["']\]/
3220
+ }
3221
+ ], gn = [
3222
+ {
3223
+ id: "log-crlf-injection",
3224
+ description: "CRLF injection: literal \\r or \\n embeds fake log lines",
3225
+ pattern: /[\r\n]/
3226
+ },
3227
+ {
3228
+ id: "log-url-encoded-crlf",
3229
+ description: "URL-encoded CRLF: %0d, %0a, %0D, %0A — decoded by some log parsers",
3230
+ pattern: /%0[dDaA]/
3231
+ },
3232
+ {
3233
+ id: "log-unicode-newline",
3234
+ description: "Unicode newline variants: U+2028 (line separator), U+2029 (paragraph separator)",
3235
+ pattern: /[\u2028\u2029]/
3236
+ },
3237
+ {
3238
+ id: "log-log4shell-jndi",
3239
+ description: "Log4Shell: ${jndi:...} triggers remote code execution in Apache Log4j",
3240
+ pattern: /\$\{jndi\s*:/i
3241
+ },
3242
+ {
3243
+ id: "log-log4shell-obfuscated",
3244
+ description: "Obfuscated Log4Shell: ${::-j}... lookup-bypass prefix used to evade WAF detection",
3245
+ pattern: /\$\{::-/
3246
+ },
3247
+ {
3248
+ id: "log-log4j-lookup",
3249
+ description: "Log4j lookup syntax: ${env:...}, ${sys:...}, ${ctx:...} — data exfiltration",
3250
+ pattern: /\$\{(?:env|sys|ctx|main|map|sd|web|docker|k8s|spring)\s*:/i
3251
+ },
3252
+ {
3253
+ id: "log-ssti-double-brace",
3254
+ description: "SSTI double-brace: {{expression}} — Jinja2, Twig, Handlebars, etc.",
3255
+ pattern: /\{\{[\s\S]{0,80}\}\}/
3256
+ },
3257
+ {
3258
+ id: "log-ssti-hash-brace",
3259
+ description: "SSTI hash-brace: #{expression} — Thymeleaf, Velocity, Ruby ERB",
3260
+ pattern: /#\{[\s\S]{0,80}\}/
3261
+ },
3262
+ {
3263
+ id: "log-ssti-dollar-brace",
3264
+ description: "SSTI/EL injection: ${expression with operators or method calls} — JSP EL, Freemarker, SpEL",
3265
+ pattern: /\$\{[^}]*(?:\.|\(|\*|\+|\bclass\b|\bruntime\b|\bprocess\b|\bexec\b)[^}]{0,80}\}/i
3266
+ },
3267
+ {
3268
+ id: "log-ssti-percent-tag",
3269
+ description: "SSTI ERB/ASP tag: <%= expression %> — Ruby ERB, ASP",
3270
+ pattern: /<%=[\s\S]{0,80}%>/
3271
+ },
3272
+ {
3273
+ id: "log-null-byte",
3274
+ description: "Null byte: \\x00 or %00 — can truncate log entries in C-backed loggers",
3275
+ pattern: /\x00|%00/
3276
+ },
3277
+ {
3278
+ id: "log-ansi-escape",
3279
+ description: "ANSI escape sequence: ESC[ — can manipulate terminal output when logs are tailed",
3280
+ pattern: /\x1b\[/
3281
+ }
3282
+ ], _n = [
3283
+ {
3284
+ id: "sql-line-comment",
3285
+ description: "SQL line comment: -- followed by whitespace or end of string",
3286
+ pattern: /--(?:\s|$)/
3287
+ },
3288
+ {
3289
+ id: "sql-stacked-query",
3290
+ description: "Stacked queries: semicolon immediately followed by a SQL keyword",
3291
+ pattern: /;\s{0,10}(?:SELECT|INSERT|UPDATE|DELETE|DROP|CREATE|ALTER|EXEC)\b/i
3292
+ },
3293
+ {
3294
+ id: "sql-hex-encoding",
3295
+ description: "Hex-encoded string injection: 0x41414141 style (MySQL)",
3296
+ pattern: /\b0x[0-9a-f]{4,}/i
3297
+ }
3298
+ ], vn = [...fn, ..._n];
3299
+ ln.label = "HTML", un.label = "XML", dn.label = "SVG", fn.label = "SQL", vn.label = "SQL-STRICT", pn.label = "SHELL", mn.label = "REDOS", hn.label = "NOSQL", gn.label = "LOG", Object.freeze({
3300
+ HTML: ln,
3301
+ XML: un,
3302
+ SVG: dn,
3303
+ SQL: fn,
3304
+ "SQL-STRICT": vn,
3305
+ SHELL: pn,
3306
+ REDOS: mn,
3307
+ NOSQL: hn,
3308
+ LOG: gn
3309
+ });
3310
+ function yn(e) {
3311
+ if (typeof e != "string") throw TypeError(`is-unsafe: first argument must be a string, got ${typeof e}`);
3312
+ }
3313
+ function bn(e) {
3314
+ if (!(e instanceof RegExp)) {
3315
+ if (Array.isArray(e)) {
3316
+ if (e.length === 0) throw TypeError("is-unsafe: context must not be an empty array");
3317
+ if (Array.isArray(e[0])) {
3318
+ for (let t of e) if (!Array.isArray(t) || t.length === 0) throw TypeError("is-unsafe: each context in the array must be a non-empty pattern array (PatternList)");
3319
+ }
3320
+ return;
3321
+ }
3322
+ throw TypeError(`is-unsafe: second argument must be a PatternList (e.g. HTML), an array of PatternLists (e.g. [HTML, XML]), or a RegExp. Got: ${typeof e}`);
3323
+ }
3324
+ }
3325
+ function xn(e) {
3326
+ return e instanceof RegExp ? {
3327
+ lists: null,
3328
+ regex: e
3329
+ } : Array.isArray(e[0]) ? {
3330
+ lists: e,
3331
+ regex: null
3332
+ } : {
3333
+ lists: [e],
3334
+ regex: null
3335
+ };
3336
+ }
3337
+ function Sn(e, t) {
3338
+ let n = t.label ?? "CUSTOM";
3339
+ for (let r of t) if (r.pattern.test(e)) return {
3340
+ context: n,
3341
+ id: r.id,
3342
+ description: r.description,
3343
+ pattern: r.pattern
3344
+ };
3345
+ return null;
3346
+ }
3347
+ function Cn(e, t) {
3348
+ yn(e), bn(t);
3349
+ let { lists: n, regex: r } = xn(t);
3350
+ if (r) return r.test(e);
3351
+ for (let t of n) if (Sn(e, t) !== null) return !0;
3352
+ return !1;
3353
+ }
2502
3354
  //#endregion
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) {
3355
+ //#region ../../node_modules/.pnpm/fast-xml-parser@5.10.0/node_modules/fast-xml-parser/src/xmlparser/OrderedObjParser.js
3356
+ function wn(e, t) {
2505
3357
  if (!e) return {};
2506
3358
  let n = t.attributesGroupName ? e[t.attributesGroupName] : e;
2507
3359
  if (!n) return {};
@@ -2512,7 +3364,7 @@ function Jt(e, t) {
2512
3364
  } else r[e] = n[e];
2513
3365
  return r;
2514
3366
  }
2515
- function Yt(e) {
3367
+ function Tn(e) {
2516
3368
  if (!e || typeof e != "string") return;
2517
3369
  let t = e.indexOf(":");
2518
3370
  if (t !== -1 && t > 0) {
@@ -2520,13 +3372,13 @@ function Yt(e) {
2520
3372
  if (n !== "xmlns") return n;
2521
3373
  }
2522
3374
  }
2523
- var Xt = class {
3375
+ var En = class {
2524
3376
  constructor(e, t) {
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 };
3377
+ this.options = e, this.currentNode = null, this.tagsNodeStack = [], this.parseXml = jn, this.parseTextData = Dn, this.resolveNameSpace = On, this.buildAttributesMap = An, this.isItStopNode = Fn, this.replaceEntitiesValue = Nn, this.readStopNodeData = zn, this.saveTextToParentTag = Pn, this.addChild = Mn, this.ignoreAttributesFn = rn(this.options.ignoreAttributes), this.entityExpansionCount = 0, this.currentExpandedLength = 0;
3378
+ let n = { ...dt };
2527
3379
  this.options.entityDecoder ? this.entityDecoder = this.options.entityDecoder : (typeof this.options.htmlEntities == "object" ? n = this.options.htmlEntities : this.options.htmlEntities === !0 && (n = {
2528
- ...dt,
2529
- ...st
3380
+ ...ft,
3381
+ ...ct
2530
3382
  }), this.entityDecoder = new vt({
2531
3383
  namedEntities: {
2532
3384
  ...n,
@@ -2537,27 +3389,28 @@ var Xt = class {
2537
3389
  maxTotalExpansions: this.options.processEntities.maxTotalExpansions,
2538
3390
  maxExpandedLength: this.options.processEntities.maxExpandedLength,
2539
3391
  applyLimitsTo: this.options.processEntities.appliesTo
2540
- }
2541
- })), this.matcher = new qt(), this.readonlyMatcher = this.matcher.readOnly(), this.isCurrentNodeStopNode = !1, this.stopNodeExpressionsSet = new Gt();
3392
+ },
3393
+ onInputEntity: (e, t) => Cn(t, [ln, un]) ? z.BLOCK : z.ALLOW
3394
+ })), this.matcher = new cn(), this.readonlyMatcher = this.matcher.readOnly(), this.isCurrentNodeStopNode = !1, this.stopNodeExpressionsSet = new on();
2542
3395
  let r = this.options.stopNodes;
2543
3396
  if (r && r.length > 0) {
2544
3397
  for (let e = 0; e < r.length; e++) {
2545
3398
  let t = r[e];
2546
- typeof t == "string" ? this.stopNodeExpressionsSet.add(new X(t)) : t instanceof X && this.stopNodeExpressionsSet.add(t);
3399
+ typeof t == "string" ? this.stopNodeExpressionsSet.add(new an(t)) : t instanceof an && this.stopNodeExpressionsSet.add(t);
2547
3400
  }
2548
3401
  this.stopNodeExpressionsSet.seal();
2549
3402
  }
2550
3403
  }
2551
3404
  };
2552
- function Zt(e, t, n, r, i, a, o) {
3405
+ function Dn(e, t, n, r, i, a, o) {
2553
3406
  let s = this.options;
2554
3407
  if (e !== void 0 && (s.trimValues && !r && (e = e.trim()), e.length > 0)) {
2555
3408
  o || (e = this.replaceEntitiesValue(e, t, n));
2556
3409
  let r = s.jPath ? n.toString() : n, c = s.tagValueProcessor(t, e, r, i, a);
2557
- return c == null ? e : typeof c != typeof e || c !== e ? c : s.trimValues || e.trim() === e ? un(e, s.parseTagValue, s.numberParseOptions) : e;
3410
+ return c == null ? e : typeof c != typeof e || c !== e ? c : s.trimValues || e.trim() === e ? Bn(e, s.parseTagValue, s.numberParseOptions) : e;
2558
3411
  }
2559
3412
  }
2560
- function Qt(e) {
3413
+ function On(e) {
2561
3414
  if (this.options.removeNSPrefix) {
2562
3415
  let t = e.split(":"), n = e.charAt(0) === "/" ? "/" : "";
2563
3416
  if (t[0] === "xmlns") return "";
@@ -2565,11 +3418,11 @@ function Qt(e) {
2565
3418
  }
2566
3419
  return e;
2567
3420
  }
2568
- var $t = /* @__PURE__ */ RegExp("([^\\s=]+)\\s*(=\\s*(['\"])([\\s\\S]*?)\\3)?", "gm");
2569
- function en(e, t, n, r = !1) {
3421
+ var kn = /* @__PURE__ */ RegExp("([^\\s=]+)\\s*(=\\s*(['\"])([\\s\\S]*?)\\3)?", "gm");
3422
+ function An(e, t, n, r = !1) {
2570
3423
  let i = this.options;
2571
3424
  if (r === !0 || i.ignoreAttributes !== !0 && typeof e == "string") {
2572
- let r = Ne(e, $t), a = r.length, o = {}, s = Array(a), c = !1, l = {};
3425
+ let r = Ne(e, kn), a = r.length, o = {}, s = Array(a), c = !1, l = {};
2573
3426
  for (let e = 0; e < a; e++) {
2574
3427
  let t = this.resolveNameSpace(r[e][1]), a = r[e][4];
2575
3428
  if (t.length && a !== void 0) {
@@ -2583,9 +3436,9 @@ function en(e, t, n, r = !1) {
2583
3436
  let t = this.resolveNameSpace(r[e][1]);
2584
3437
  if (this.ignoreAttributesFn(t, u)) continue;
2585
3438
  let n = i.attributeNamePrefix + t;
2586
- if (t.length) if (i.transformAttributeName && (n = i.transformAttributeName(n)), n = dn(n, i), r[e][4] !== void 0) {
3439
+ if (t.length) if (i.transformAttributeName && (n = i.transformAttributeName(n)), n = Hn(n, i), r[e][4] !== void 0) {
2587
3440
  let r = s[e], a = i.attributeValueProcessor(t, r, u);
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;
3441
+ a == null ? o[n] = r : typeof a != typeof r || a !== r ? o[n] = a : o[n] = Bn(r, i.parseAttributeValue, i.numberParseOptions), d = !0;
2589
3442
  } else i.allowBooleanAttributes && (o[n] = !0, d = !0);
2590
3443
  }
2591
3444
  if (!d) return;
@@ -2596,25 +3449,25 @@ function en(e, t, n, r = !1) {
2596
3449
  return o;
2597
3450
  }
2598
3451
  }
2599
- var tn = function(e) {
3452
+ var jn = function(e) {
2600
3453
  e = e.replace(/\r\n?/g, "\n");
2601
- let t = new W("!xml"), n = t, r = "";
3454
+ let t = new G("!xml"), n = t, r = "";
2602
3455
  this.matcher.reset(), this.entityDecoder.reset(), this.entityExpansionCount = 0, this.currentExpandedLength = 0;
2603
- let i = this.options, a = new Nt(i.processEntities), o = e.length;
3456
+ let i = this.options, a = new It(i.processEntities), o = e.length;
2604
3457
  for (let s = 0; s < o; s++) if (e[s] === "<") {
2605
3458
  let c = e.charCodeAt(s + 1);
2606
3459
  if (c === 47) {
2607
- let t = Z(e, ">", s, "Closing Tag is not closed."), a = e.substring(s + 2, t).trim();
3460
+ let t = Q(e, ">", s, "Closing Tag is not closed."), a = e.substring(s + 2, t).trim();
2608
3461
  if (i.removeNSPrefix) {
2609
3462
  let e = a.indexOf(":");
2610
3463
  e !== -1 && (a = a.substr(e + 1));
2611
3464
  }
2612
- a = $(i.transformTagName, a, "", i).tagName, n && (r = this.saveTextToParentTag(r, n, this.readonlyMatcher));
3465
+ a = Vn(i.transformTagName, a, "", i).tagName, n && (r = this.saveTextToParentTag(r, n, this.readonlyMatcher));
2613
3466
  let o = this.matcher.getCurrentTag();
2614
3467
  if (a && i.unpairedTagsSet.has(a)) throw Error(`Unpaired tag can not be used as closing tag: </${a}>`);
2615
3468
  o && i.unpairedTagsSet.has(o) && (this.matcher.pop(), this.tagsNodeStack.pop()), this.matcher.pop(), this.isCurrentNodeStopNode = !1, n = this.tagsNodeStack.pop(), r = "", s = t;
2616
3469
  } else if (c === 63) {
2617
- let t = Q(e, s, !1, "?>");
3470
+ let t = Rn(e, s, !1, "?>");
2618
3471
  if (!t) throw Error("Pi Tag is not closed.");
2619
3472
  r = this.saveTextToParentTag(r, n, this.readonlyMatcher);
2620
3473
  let o = this.buildAttributesMap(t.tagExp, this.matcher, t.tagName, !0);
@@ -2623,12 +3476,12 @@ var tn = function(e) {
2623
3476
  this.entityDecoder.setXmlVersion(Number(e) || 1), a.setXmlVersion(Number(e) || 1);
2624
3477
  }
2625
3478
  if (!(i.ignoreDeclaration && t.tagName === "?xml" || i.ignorePiTags)) {
2626
- let e = new W(t.tagName);
3479
+ let e = new G(t.tagName);
2627
3480
  e.add(i.textNodeName, ""), t.tagName !== t.tagExp && t.attrExpPresent && i.ignoreAttributes !== !0 && (e[":@"] = o), this.addChild(n, e, this.readonlyMatcher, s);
2628
3481
  }
2629
3482
  s = t.closeIndex + 1;
2630
3483
  } else if (c === 33 && e.charCodeAt(s + 2) === 45 && e.charCodeAt(s + 3) === 45) {
2631
- let t = Z(e, "-->", s + 4, "Comment is not closed.");
3484
+ let t = Q(e, "-->", s + 4, "Comment is not closed.");
2632
3485
  if (i.commentPropName) {
2633
3486
  let a = e.substring(s + 4, t - 2);
2634
3487
  r = this.saveTextToParentTag(r, n, this.readonlyMatcher), n.add(i.commentPropName, [{ [i.textNodeName]: a }]);
@@ -2638,25 +3491,25 @@ var tn = function(e) {
2638
3491
  let t = a.readDocType(e, s);
2639
3492
  this.entityDecoder.addInputEntities(t.entities), s = t.i;
2640
3493
  } else if (c === 33 && e.charCodeAt(s + 2) === 91) {
2641
- let t = Z(e, "]]>", s, "CDATA is not closed.") - 2, a = e.substring(s + 9, t);
3494
+ let t = Q(e, "]]>", s, "CDATA is not closed.") - 2, a = e.substring(s + 9, t);
2642
3495
  r = this.saveTextToParentTag(r, n, this.readonlyMatcher);
2643
3496
  let o = this.parseTextData(a, n.tagname, this.readonlyMatcher, !0, !1, !0, !0);
2644
3497
  o ??= "", i.cdataPropName ? n.add(i.cdataPropName, [{ [i.textNodeName]: a }]) : n.add(i.textNodeName, o), s = t + 2;
2645
3498
  } else {
2646
- let a = Q(e, s, i.removeNSPrefix);
3499
+ let a = Rn(e, s, i.removeNSPrefix);
2647
3500
  if (!a) {
2648
3501
  let t = e.substring(Math.max(0, s - 50), Math.min(o, s + 50));
2649
3502
  throw Error(`readTagExp returned undefined at position ${s}. Context: "${t}"`);
2650
3503
  }
2651
3504
  let c = a.tagName, l = a.rawTagName, u = a.tagExp, d = a.attrExpPresent, f = a.closeIndex;
2652
- if ({tagName: c, tagExp: u} = $(i.transformTagName, c, u, i), i.strictReservedNames && (c === i.commentPropName || c === i.cdataPropName || c === i.textNodeName || c === i.attributesGroupName)) throw Error(`Invalid tag name: ${c}`);
3505
+ if ({tagName: c, tagExp: u} = Vn(i.transformTagName, c, u, i), i.strictReservedNames && (c === i.commentPropName || c === i.cdataPropName || c === i.textNodeName || c === i.attributesGroupName)) throw Error(`Invalid tag name: ${c}`);
2653
3506
  n && r && n.tagname !== "!xml" && (r = this.saveTextToParentTag(r, n, this.readonlyMatcher, !1));
2654
3507
  let p = n;
2655
3508
  p && i.unpairedTagsSet.has(p.tagname) && (n = this.tagsNodeStack.pop(), this.matcher.pop());
2656
3509
  let m = !1;
2657
3510
  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);
2658
3511
  let h = null, 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());
3512
+ g = Tn(l), c !== t.tagname && this.matcher.push(c, {}, g), c !== u && d && (h = this.buildAttributesMap(u, this.matcher, c), h && wn(h, i)), c !== t.tagname && (this.isCurrentNodeStopNode = this.isItStopNode());
2660
3513
  let _ = s;
2661
3514
  if (this.isCurrentNodeStopNode) {
2662
3515
  let t = "";
@@ -2667,19 +3520,19 @@ var tn = function(e) {
2667
3520
  if (!n) throw Error(`Unexpected end of ${l}`);
2668
3521
  s = n.i, t = n.tagContent;
2669
3522
  }
2670
- let r = new W(c);
3523
+ let r = new G(c);
2671
3524
  h && (r[":@"] = h), r.add(i.textNodeName, t), this.matcher.pop(), this.isCurrentNodeStopNode = !1, this.addChild(n, r, this.readonlyMatcher, _);
2672
3525
  } else {
2673
3526
  if (m) {
2674
- ({tagName: c, tagExp: u} = $(i.transformTagName, c, u, i));
2675
- let e = new W(c);
3527
+ ({tagName: c, tagExp: u} = Vn(i.transformTagName, c, u, i));
3528
+ let e = new G(c);
2676
3529
  h && (e[":@"] = h), this.addChild(n, e, this.readonlyMatcher, _), this.matcher.pop(), this.isCurrentNodeStopNode = !1;
2677
3530
  } else if (i.unpairedTagsSet.has(c)) {
2678
- let e = new W(c);
3531
+ let e = new G(c);
2679
3532
  h && (e[":@"] = h), this.addChild(n, e, this.readonlyMatcher, _), this.matcher.pop(), this.isCurrentNodeStopNode = !1, s = a.closeIndex;
2680
3533
  continue;
2681
3534
  } else {
2682
- let e = new W(c);
3535
+ let e = new G(c);
2683
3536
  if (this.tagsNodeStack.length > i.maxNestedTags) throw Error("Maximum nested tags exceeded");
2684
3537
  this.tagsNodeStack.push(n), h && (e[":@"] = h), this.addChild(n, e, this.readonlyMatcher, _), n = e;
2685
3538
  }
@@ -2689,12 +3542,12 @@ var tn = function(e) {
2689
3542
  } else r += e[s];
2690
3543
  return t.child;
2691
3544
  };
2692
- function nn(e, t, n, r) {
3545
+ function Mn(e, t, n, r) {
2693
3546
  this.options.captureMetaData || (r = void 0);
2694
3547
  let i = this.options.jPath ? n.toString() : n, a = this.options.updateTag(t.tagname, i, t[":@"]);
2695
3548
  a === !1 || (typeof a == "string" && (t.tagname = a), e.addChild(t, r));
2696
3549
  }
2697
- function rn(e, t, n) {
3550
+ function Nn(e, t, n) {
2698
3551
  let r = this.options.processEntities;
2699
3552
  if (!r || !r.enabled) return e;
2700
3553
  if (r.allowedTags) {
@@ -2707,13 +3560,13 @@ function rn(e, t, n) {
2707
3560
  }
2708
3561
  return this.entityDecoder.decode(e);
2709
3562
  }
2710
- function an(e, t, n, r) {
3563
+ function Pn(e, t, n, r) {
2711
3564
  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;
2712
3565
  }
2713
- function on() {
2714
- return this.stopNodeExpressionsSet.size === 0 ? !1 : this.matcher.matchesAny(this.stopNodeExpressionsSet);
3566
+ function Fn() {
3567
+ return this.stopNodeExpressionsSet.size !== 0 && this.matcher.matchesAny(this.stopNodeExpressionsSet);
2715
3568
  }
2716
- function sn(e, t, n = ">") {
3569
+ function In(e, t, n = ">") {
2717
3570
  let r = 0, i = e.length, a = n.charCodeAt(0), o = n.length > 1 ? n.charCodeAt(1) : -1, s = "", c = t;
2718
3571
  for (let n = t; n < i; n++) {
2719
3572
  let t = e.charCodeAt(n);
@@ -2731,18 +3584,18 @@ function sn(e, t, n = ">") {
2731
3584
  else t === 9 && !r && (s += e.substring(c, n) + " ", c = n + 1);
2732
3585
  }
2733
3586
  }
2734
- function Z(e, t, n, r) {
3587
+ function Q(e, t, n, r) {
2735
3588
  let i = e.indexOf(t, n);
2736
3589
  if (i === -1) throw Error(r);
2737
3590
  return i + t.length - 1;
2738
3591
  }
2739
- function cn(e, t, n, r) {
3592
+ function Ln(e, t, n, r) {
2740
3593
  let i = e.indexOf(t, n);
2741
3594
  if (i === -1) throw Error(r);
2742
3595
  return i;
2743
3596
  }
2744
- function Q(e, t, n, r = ">") {
2745
- let i = sn(e, t + 1, r);
3597
+ function Rn(e, t, n, r = ">") {
3598
+ let i = In(e, t + 1, r);
2746
3599
  if (!i) return;
2747
3600
  let a = i.data, o = i.index, s = a.search(/\s/), c = a, l = !0;
2748
3601
  s !== -1 && (c = a.substring(0, s), a = a.substring(s + 1).trimStart());
@@ -2759,51 +3612,51 @@ function Q(e, t, n, r = ">") {
2759
3612
  rawTagName: u
2760
3613
  };
2761
3614
  }
2762
- function ln(e, t, n) {
3615
+ function zn(e, t, n) {
2763
3616
  let r = n, i = 1, a = e.length;
2764
3617
  for (; n < a; n++) if (e[n] === "<") {
2765
3618
  let a = e.charCodeAt(n + 1);
2766
3619
  if (a === 47) {
2767
- let a = cn(e, ">", n, `${t} is not closed`);
3620
+ let a = Ln(e, ">", n, `${t} is not closed`);
2768
3621
  if (e.substring(n + 2, a).trim() === t && (i--, i === 0)) return {
2769
3622
  tagContent: e.substring(r, n),
2770
3623
  i: a
2771
3624
  };
2772
3625
  n = a;
2773
- } else if (a === 63) n = Z(e, "?>", n + 1, "StopNode is not closed.");
2774
- else if (a === 33 && e.charCodeAt(n + 2) === 45 && e.charCodeAt(n + 3) === 45) n = Z(e, "-->", n + 3, "StopNode is not closed.");
2775
- else if (a === 33 && e.charCodeAt(n + 2) === 91) n = Z(e, "]]>", n, "StopNode is not closed.") - 2;
3626
+ } else if (a === 63) n = Q(e, "?>", n + 1, "StopNode is not closed.");
3627
+ else if (a === 33 && e.charCodeAt(n + 2) === 45 && e.charCodeAt(n + 3) === 45) n = Q(e, "-->", n + 3, "StopNode is not closed.");
3628
+ else if (a === 33 && e.charCodeAt(n + 2) === 91) n = Q(e, "]]>", n, "StopNode is not closed.") - 2;
2776
3629
  else {
2777
- let r = Q(e, n, !1);
3630
+ let r = Rn(e, n, !1);
2778
3631
  r && ((r && r.tagName) === t && r.tagExp[r.tagExp.length - 1] !== "/" && i++, n = r.closeIndex);
2779
3632
  }
2780
3633
  }
2781
3634
  }
2782
- function un(e, t, n) {
3635
+ function Bn(e, t, n) {
2783
3636
  if (t && typeof e == "string") {
2784
3637
  let t = e.trim();
2785
- return t === "true" ? !0 : t === "false" ? !1 : zt(e, n);
3638
+ return t === "true" || t !== "false" && Zt(e, n);
2786
3639
  } else if (Fe(e)) return e;
2787
3640
  else return "";
2788
3641
  }
2789
- function $(e, t, n, r) {
3642
+ function Vn(e, t, n, r) {
2790
3643
  if (e) {
2791
3644
  let r = e(t);
2792
3645
  n === t && (n = r), t = r;
2793
3646
  }
2794
- return t = dn(t, r), {
3647
+ return t = Hn(t, r), {
2795
3648
  tagName: t,
2796
3649
  tagExp: n
2797
3650
  };
2798
3651
  }
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;
3652
+ function Hn(e, t) {
3653
+ if (Le.includes(e)) throw Error(`[SECURITY] Invalid name: "${e}" is a reserved JavaScript keyword that could cause prototype pollution`);
3654
+ return Ie.includes(e) ? t.onDangerousProperty(e) : e;
2802
3655
  }
2803
3656
  //#endregion
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) {
3657
+ //#region ../../node_modules/.pnpm/fast-xml-parser@5.10.0/node_modules/fast-xml-parser/src/xmlparser/node2json.js
3658
+ var $ = G.getMetaDataSymbol();
3659
+ function Un(e, t) {
2807
3660
  if (!e || typeof e != "object") return {};
2808
3661
  if (!t) return e;
2809
3662
  let n = {};
@@ -2813,22 +3666,22 @@ function pn(e, t) {
2813
3666
  } else n[r] = e[r];
2814
3667
  return n;
2815
3668
  }
2816
- function mn(e, t, n, r) {
2817
- return hn(e, t, n, r);
3669
+ function Wn(e, t, n, r) {
3670
+ return Gn(e, t, n, r);
2818
3671
  }
2819
- function hn(e, t, n, r) {
3672
+ function Gn(e, t, n, r) {
2820
3673
  let i, a = {};
2821
3674
  for (let o = 0; o < e.length; o++) {
2822
- let s = e[o], c = gn(s);
3675
+ let s = e[o], c = Kn(s);
2823
3676
  if (c !== void 0 && c !== t.textNodeName) {
2824
- let e = pn(s[":@"] || {}, t.attributeNamePrefix);
3677
+ let e = Un(s[":@"] || {}, t.attributeNamePrefix);
2825
3678
  n.push(c, e);
2826
3679
  }
2827
3680
  if (c === t.textNodeName) i === void 0 ? i = s[c] : i += "" + s[c];
2828
3681
  else if (c === void 0) continue;
2829
3682
  else if (s[c]) {
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);
3683
+ let e = Gn(s[c], t, n, r), i = Jn(e, t);
3684
+ if (Object.keys(e).length === 0 && t.alwaysCreateTextNode && (e[t.textNodeName] = ""), s[":@"] ? qn(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[$] !== void 0 && typeof e == "object" && e && (e[$] = s[$]), a[c] !== void 0 && Object.prototype.hasOwnProperty.call(a, c)) Array.isArray(a[c]) || (a[c] = [a[c]]), a[c].push(e);
2832
3685
  else {
2833
3686
  let n = t.jPath ? r.toString() : r;
2834
3687
  t.isArray(c, n, i) ? a[c] = [e] : a[c] = e;
@@ -2838,14 +3691,14 @@ function hn(e, t, n, r) {
2838
3691
  }
2839
3692
  return typeof i == "string" ? i.length > 0 && (a[t.textNodeName] = i) : i !== void 0 && (a[t.textNodeName] = i), a;
2840
3693
  }
2841
- function gn(e) {
3694
+ function Kn(e) {
2842
3695
  let t = Object.keys(e);
2843
3696
  for (let e = 0; e < t.length; e++) {
2844
3697
  let n = t[e];
2845
3698
  if (n !== ":@") return n;
2846
3699
  }
2847
3700
  }
2848
- function _n(e, t, n, r) {
3701
+ function qn(e, t, n, r) {
2849
3702
  if (t) {
2850
3703
  let i = Object.keys(t), a = i.length;
2851
3704
  for (let o = 0; o < a; o++) {
@@ -2854,13 +3707,13 @@ function _n(e, t, n, r) {
2854
3707
  }
2855
3708
  }
2856
3709
  }
2857
- function vn(e, t) {
3710
+ function Jn(e, t) {
2858
3711
  let { textNodeName: n } = t, r = Object.keys(e).length;
2859
3712
  return !!(r === 0 || r === 1 && (e[n] || typeof e[n] == "boolean" || e[n] === 0));
2860
3713
  }
2861
3714
  //#endregion
2862
- //#region ../../node_modules/.pnpm/fast-xml-parser@5.8.0/node_modules/fast-xml-parser/src/xmlparser/XMLParser.js
2863
- var yn = class {
3715
+ //#region ../../node_modules/.pnpm/fast-xml-parser@5.10.0/node_modules/fast-xml-parser/src/xmlparser/XMLParser.js
3716
+ var Yn = class {
2864
3717
  constructor(e) {
2865
3718
  this.externalEntities = {}, this.options = Ct(e);
2866
3719
  }
@@ -2869,11 +3722,11 @@ var yn = class {
2869
3722
  else if (typeof e != "string") throw Error("XML data is accepted in String or Bytes[] form.");
2870
3723
  if (t) {
2871
3724
  t === !0 && (t = {});
2872
- let n = Re(e, t);
3725
+ let n = ze(e, t);
2873
3726
  if (n !== !0) throw Error(`${n.err.msg}:${n.err.line}:${n.err.col}`);
2874
3727
  }
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);
3728
+ let n = new En(this.options, this.externalEntities), r = n.parseXml(e);
3729
+ return this.options.preserveOrder || r === void 0 ? r : Wn(r, this.options, n.matcher, n.readonlyMatcher);
2877
3730
  }
2878
3731
  addEntity(e, t) {
2879
3732
  if (t.indexOf("&") !== -1) throw Error("Entity value can't have '&'");
@@ -2882,9 +3735,9 @@ var yn = class {
2882
3735
  this.externalEntities[e] = t;
2883
3736
  }
2884
3737
  static getMetaDataSymbol() {
2885
- return W.getMetaDataSymbol();
3738
+ return G.getMetaDataSymbol();
2886
3739
  }
2887
- }, bn = class {
3740
+ }, Xn = class {
2888
3741
  axiosClient;
2889
3742
  baseURI;
2890
3743
  xmlParser;
@@ -2894,7 +3747,7 @@ var yn = class {
2894
3747
  HASH_LENGTH = 32;
2895
3748
  ITERATION_COUNT = 1e4;
2896
3749
  constructor({ axiosClient: e, baseURI: t }) {
2897
- this.axiosClient = e, this.baseURI = t, this.xmlParser = new yn();
3750
+ this.axiosClient = e, this.baseURI = t, this.xmlParser = new Yn();
2898
3751
  }
2899
3752
  async signUrl(e, t) {
2900
3753
  let n = new URL(e);
@@ -2904,20 +3757,20 @@ var yn = class {
2904
3757
  }
2905
3758
  async getSignKey() {
2906
3759
  if (this.signingKey) return this.signingKey;
2907
- let e = await this.axiosClient.get(a(this.baseURI, "ocs/v1.php/cloud/user/signing-key"), { headers: { "Content-Type": "application/x-www-form-urlencoded" } }), t = this.xmlParser.parse(e.data);
2908
- return this.signingKey = t.ocs.data["signing-key"], this.signingKey;
3760
+ let e = await this.axiosClient.get(t(this.baseURI, "ocs/v1.php/cloud/user/signing-key"), { headers: { "Content-Type": "application/x-www-form-urlencoded" } }), n = this.xmlParser.parse(e.data);
3761
+ return this.signingKey = n.ocs.data["signing-key"], this.signingKey;
2909
3762
  }
2910
3763
  async createHashedKey(e) {
2911
3764
  return je(e, await this.getSignKey(), this.ITERATION_COUNT, this.HASH_LENGTH, this.ALGORITHM).toString("hex");
2912
3765
  }
2913
- }, xn = (e, t) => {
3766
+ }, Zn = (e, t) => {
2914
3767
  let n = new URL(e);
2915
3768
  n.pathname = [
2916
3769
  ...n.pathname.split("/"),
2917
3770
  "ocs",
2918
3771
  "v1.php"
2919
3772
  ].filter(Boolean).join("/");
2920
- let r = n.href, i = v(r, t), a = new bn({
3773
+ let r = n.href, i = v(r, t), a = new Xn({
2921
3774
  baseURI: e,
2922
3775
  axiosClient: t
2923
3776
  });
@@ -2927,4 +3780,4 @@ var yn = class {
2927
3780
  };
2928
3781
  };
2929
3782
  //#endregion
2930
- export { G as a, X as i, yn as n, v as o, qt as r, xn as t };
3783
+ export { Ft as a, an as i, Yn as n, v as o, cn as r, Zn as t };