@php-wasm/xdebug-bridge 3.1.35 → 3.1.38
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cli.cjs +1 -1
- package/cli.js +1 -1
- package/index.cjs +1 -1
- package/index.js +1 -1
- package/lib/start-bridge.d.ts +1 -0
- package/lib/xdebug-cdp-bridge.d.ts +3 -0
- package/package.json +7 -6
- package/{run-cli-Czgudx2V.js → run-cli-D9LfaCIl.js} +759 -743
- package/{run-cli-C15jrZ5h.cjs → run-cli-DzMn-eSu.cjs} +24 -24
|
@@ -337,7 +337,7 @@ st.prototype.removeListener = function(t, e) {
|
|
|
337
337
|
}
|
|
338
338
|
if (i < 0)
|
|
339
339
|
return this;
|
|
340
|
-
i === 0 ? n.shift() :
|
|
340
|
+
i === 0 ? n.shift() : _s(n, i), n.length === 1 && (s[t] = n[0]), s.removeListener !== void 0 && this.emit("removeListener", t, a || e);
|
|
341
341
|
}
|
|
342
342
|
return this;
|
|
343
343
|
};
|
|
@@ -366,7 +366,7 @@ function jr(o, t, e) {
|
|
|
366
366
|
if (n === void 0)
|
|
367
367
|
return [];
|
|
368
368
|
var s = n[t];
|
|
369
|
-
return s === void 0 ? [] : typeof s == "function" ? e ? [s.listener || s] : [s] : e ?
|
|
369
|
+
return s === void 0 ? [] : typeof s == "function" ? e ? [s.listener || s] : [s] : e ? Cs(s) : Rr(s, s.length);
|
|
370
370
|
}
|
|
371
371
|
st.prototype.listeners = function(t) {
|
|
372
372
|
return jr(this, t, !0);
|
|
@@ -397,12 +397,12 @@ function Rr(o, t) {
|
|
|
397
397
|
e[n] = o[n];
|
|
398
398
|
return e;
|
|
399
399
|
}
|
|
400
|
-
function
|
|
400
|
+
function _s(o, t) {
|
|
401
401
|
for (; t + 1 < o.length; t++)
|
|
402
402
|
o[t] = o[t + 1];
|
|
403
403
|
o.pop();
|
|
404
404
|
}
|
|
405
|
-
function
|
|
405
|
+
function Cs(o) {
|
|
406
406
|
for (var t = new Array(o.length), e = 0; e < t.length; ++e)
|
|
407
407
|
t[e] = o[e].listener || o[e];
|
|
408
408
|
return t;
|
|
@@ -789,7 +789,7 @@ class Ws {
|
|
|
789
789
|
"strip-aliased": !1,
|
|
790
790
|
"strip-dashed": !1,
|
|
791
791
|
"unknown-options-as-args": !1
|
|
792
|
-
}, n.configuration), c = Object.assign(/* @__PURE__ */ Object.create(null), n.default), y = n.configObjects || [], p = n.envPrefix, l = a["populate--"], h = l ? "--" : "_",
|
|
792
|
+
}, n.configuration), c = Object.assign(/* @__PURE__ */ Object.create(null), n.default), y = n.configObjects || [], p = n.envPrefix, l = a["populate--"], h = l ? "--" : "_", b = /* @__PURE__ */ Object.create(null), E = /* @__PURE__ */ Object.create(null), I = n.__ || Ft.format, O = {
|
|
793
793
|
aliases: /* @__PURE__ */ Object.create(null),
|
|
794
794
|
arrays: /* @__PURE__ */ Object.create(null),
|
|
795
795
|
bools: /* @__PURE__ */ Object.create(null),
|
|
@@ -801,7 +801,7 @@ class Ws {
|
|
|
801
801
|
nargs: /* @__PURE__ */ Object.create(null),
|
|
802
802
|
coercions: /* @__PURE__ */ Object.create(null),
|
|
803
803
|
keys: []
|
|
804
|
-
}, P = /^-([0-9]+(\.[0-9]+)?|\.[0-9]+)$/,
|
|
804
|
+
}, P = /^-([0-9]+(\.[0-9]+)?|\.[0-9]+)$/, C = new RegExp("^--" + a["negation-prefix"] + "(.+)");
|
|
805
805
|
[].concat(n.array || []).filter(Boolean).forEach(function(f) {
|
|
806
806
|
const T = typeof f == "object" ? f.key : f, F = Object.keys(f).map(function(M) {
|
|
807
807
|
return {
|
|
@@ -847,39 +847,39 @@ class Ws {
|
|
|
847
847
|
B(T);
|
|
848
848
|
continue;
|
|
849
849
|
} else if (T.match(/^--.+=/) || !a["short-option-groups"] && T.match(/^-.+=/))
|
|
850
|
-
X = T.match(/^--?([^=]+)=([\s\S]*)$/), X !== null && Array.isArray(X) && X.length >= 3 && (K(X[1], O.arrays) ? f = D(f, X[1], s, X[2]) : K(X[1], O.nargs) !== !1 ? f = S(f, X[1], s, X[2]) :
|
|
851
|
-
else if (T.match(
|
|
852
|
-
X = T.match(
|
|
850
|
+
X = T.match(/^--?([^=]+)=([\s\S]*)$/), X !== null && Array.isArray(X) && X.length >= 3 && (K(X[1], O.arrays) ? f = D(f, X[1], s, X[2]) : K(X[1], O.nargs) !== !1 ? f = S(f, X[1], s, X[2]) : w(X[1], X[2], !0));
|
|
851
|
+
else if (T.match(C) && a["boolean-negation"])
|
|
852
|
+
X = T.match(C), X !== null && Array.isArray(X) && X.length >= 2 && (v = X[1], w(v, K(v, O.arrays) ? [!1] : !1));
|
|
853
853
|
else if (T.match(/^--.+/) || !a["short-option-groups"] && T.match(/^-[^-]+/))
|
|
854
|
-
X = T.match(/^--?(.+)/), X !== null && Array.isArray(X) && X.length >= 2 && (v = X[1], K(v, O.arrays) ? f = D(f, v, s) : K(v, O.nargs) !== !1 ? f = S(f, v, s) : (W = s[f + 1], W !== void 0 && (!W.match(/^-/) || W.match(P)) && !K(v, O.bools) && !K(v, O.counts) || /^(true|false)$/.test(W) ? (
|
|
854
|
+
X = T.match(/^--?(.+)/), X !== null && Array.isArray(X) && X.length >= 2 && (v = X[1], K(v, O.arrays) ? f = D(f, v, s) : K(v, O.nargs) !== !1 ? f = S(f, v, s) : (W = s[f + 1], W !== void 0 && (!W.match(/^-/) || W.match(P)) && !K(v, O.bools) && !K(v, O.counts) || /^(true|false)$/.test(W) ? (w(v, W), f++) : w(v, ot(v))));
|
|
855
855
|
else if (T.match(/^-.\..+=/))
|
|
856
|
-
X = T.match(/^-([^=]+)=([\s\S]*)$/), X !== null && Array.isArray(X) && X.length >= 3 &&
|
|
856
|
+
X = T.match(/^-([^=]+)=([\s\S]*)$/), X !== null && Array.isArray(X) && X.length >= 3 && w(X[1], X[2]);
|
|
857
857
|
else if (T.match(/^-.\..+/) && !T.match(P))
|
|
858
|
-
W = s[f + 1], X = T.match(/^-(.\..+)/), X !== null && Array.isArray(X) && X.length >= 2 && (v = X[1], W !== void 0 && !W.match(/^-/) && !K(v, O.bools) && !K(v, O.counts) ? (
|
|
858
|
+
W = s[f + 1], X = T.match(/^-(.\..+)/), X !== null && Array.isArray(X) && X.length >= 2 && (v = X[1], W !== void 0 && !W.match(/^-/) && !K(v, O.bools) && !K(v, O.counts) ? (w(v, W), f++) : w(v, ot(v)));
|
|
859
859
|
else if (T.match(/^-[^-]+/) && !T.match(P)) {
|
|
860
860
|
$ = T.slice(1, -1).split(""), M = !1;
|
|
861
861
|
for (let gt = 0; gt < $.length; gt++) {
|
|
862
862
|
if (W = T.slice(gt + 2), $[gt + 1] && $[gt + 1] === "=") {
|
|
863
|
-
rt = T.slice(gt + 3), v = $[gt], K(v, O.arrays) ? f = D(f, v, s, rt) : K(v, O.nargs) !== !1 ? f = S(f, v, s, rt) :
|
|
863
|
+
rt = T.slice(gt + 3), v = $[gt], K(v, O.arrays) ? f = D(f, v, s, rt) : K(v, O.nargs) !== !1 ? f = S(f, v, s, rt) : w(v, rt), M = !0;
|
|
864
864
|
break;
|
|
865
865
|
}
|
|
866
866
|
if (W === "-") {
|
|
867
|
-
|
|
867
|
+
w($[gt], W);
|
|
868
868
|
continue;
|
|
869
869
|
}
|
|
870
870
|
if (/[A-Za-z]/.test($[gt]) && /^-?\d+(\.\d*)?(e-?\d+)?$/.test(W) && K(W, O.bools) === !1) {
|
|
871
|
-
|
|
871
|
+
w($[gt], W), M = !0;
|
|
872
872
|
break;
|
|
873
873
|
}
|
|
874
874
|
if ($[gt + 1] && $[gt + 1].match(/\W/)) {
|
|
875
|
-
|
|
875
|
+
w($[gt], W), M = !0;
|
|
876
876
|
break;
|
|
877
877
|
} else
|
|
878
|
-
|
|
878
|
+
w($[gt], ot($[gt]));
|
|
879
879
|
}
|
|
880
|
-
v = T.slice(-1)[0], !M && v !== "-" && (K(v, O.arrays) ? f = D(f, v, s) : K(v, O.nargs) !== !1 ? f = S(f, v, s) : (W = s[f + 1], W !== void 0 && (!/^(-|--)[^-]/.test(W) || W.match(P)) && !K(v, O.bools) && !K(v, O.counts) || /^(true|false)$/.test(W) ? (
|
|
880
|
+
v = T.slice(-1)[0], !M && v !== "-" && (K(v, O.arrays) ? f = D(f, v, s) : K(v, O.nargs) !== !1 ? f = S(f, v, s) : (W = s[f + 1], W !== void 0 && (!/^(-|--)[^-]/.test(W) || W.match(P)) && !K(v, O.bools) && !K(v, O.counts) || /^(true|false)$/.test(W) ? (w(v, W), f++) : w(v, ot(v))));
|
|
881
881
|
} else if (T.match(/^-[0-9]$/) && T.match(P) && K(T.slice(1), O.bools))
|
|
882
|
-
v = T.slice(1),
|
|
882
|
+
v = T.slice(1), w(v, ot(v));
|
|
883
883
|
else if (T === "--") {
|
|
884
884
|
_ = s.slice(f + 1);
|
|
885
885
|
break;
|
|
@@ -890,7 +890,7 @@ class Ws {
|
|
|
890
890
|
B(T);
|
|
891
891
|
}
|
|
892
892
|
H(x, !0), H(x, !1), U(x), Y(), nt(x, O.aliases, c, !0), at(x), a["set-placeholder-key"] && Mt(x), Object.keys(O.counts).forEach(function(f) {
|
|
893
|
-
Dt(x, f.split(".")) ||
|
|
893
|
+
Dt(x, f.split(".")) || w(f, 0);
|
|
894
894
|
}), l && _.length && (x[h] = []), _.forEach(function(f) {
|
|
895
895
|
x[h].push(f);
|
|
896
896
|
}), a["camel-case-expansion"] && a["strip-dashed"] && Object.keys(x).filter((f) => f !== "--" && f.includes("-")).forEach((f) => {
|
|
@@ -905,18 +905,18 @@ class Ws {
|
|
|
905
905
|
function S(f, T, F, M) {
|
|
906
906
|
let v, $ = K(T, O.nargs);
|
|
907
907
|
if ($ = typeof $ != "number" || isNaN($) ? 1 : $, $ === 0)
|
|
908
|
-
return u(M) || (d = Error(
|
|
908
|
+
return u(M) || (d = Error(I("Argument unexpected for: %s", T))), w(T, ot(T)), f;
|
|
909
909
|
let X = u(M) ? 0 : 1;
|
|
910
910
|
if (a["nargs-eats-options"])
|
|
911
|
-
F.length - (f + 1) + X < $ && (d = Error(
|
|
911
|
+
F.length - (f + 1) + X < $ && (d = Error(I("Not enough arguments following: %s", T))), X = $;
|
|
912
912
|
else {
|
|
913
913
|
for (v = f + 1; v < F.length && (!F[v].match(/^-[^0-9]/) || F[v].match(P) || ct(F[v])); v++)
|
|
914
914
|
X++;
|
|
915
|
-
X < $ && (d = Error(
|
|
915
|
+
X < $ && (d = Error(I("Not enough arguments following: %s", T)));
|
|
916
916
|
}
|
|
917
917
|
let W = Math.min(X, $);
|
|
918
|
-
for (!u(M) && W > 0 && (
|
|
919
|
-
|
|
918
|
+
for (!u(M) && W > 0 && (w(T, M), W--), v = f + 1; v < W + f + 1; v++)
|
|
919
|
+
w(T, F[v]);
|
|
920
920
|
return f + W;
|
|
921
921
|
}
|
|
922
922
|
function D(f, T, F, M) {
|
|
@@ -934,9 +934,9 @@ class Ws {
|
|
|
934
934
|
for (let W = f + 1; W < F.length && !(!a["greedy-arrays"] && v.length > 0 || X && typeof X == "number" && v.length >= X || ($ = F[W], /^-/.test($) && !P.test($) && !ct($))); W++)
|
|
935
935
|
f = W, v.push(L(T, $, i));
|
|
936
936
|
}
|
|
937
|
-
return typeof X == "number" && (X && v.length < X || isNaN(X) && v.length === 0) && (d = Error(
|
|
937
|
+
return typeof X == "number" && (X && v.length < X || isNaN(X) && v.length === 0) && (d = Error(I("Not enough arguments following: %s", T))), w(T, v), f;
|
|
938
938
|
}
|
|
939
|
-
function
|
|
939
|
+
function w(f, T, F = i) {
|
|
940
940
|
if (/-/.test(f) && a["camel-case-expansion"]) {
|
|
941
941
|
const $ = f.split(".").map(function(X) {
|
|
942
942
|
return le(X);
|
|
@@ -964,7 +964,7 @@ class Ws {
|
|
|
964
964
|
});
|
|
965
965
|
}
|
|
966
966
|
function N(f, T) {
|
|
967
|
-
O.aliases[f] && O.aliases[f].length || (O.aliases[f] = [T],
|
|
967
|
+
O.aliases[f] && O.aliases[f].length || (O.aliases[f] = [T], b[T] = !0), O.aliases[T] && O.aliases[T].length || N(T, f);
|
|
968
968
|
}
|
|
969
969
|
function L(f, T, F) {
|
|
970
970
|
F && (T = Vs(T)), (K(f, O.bools) || K(f, O.counts)) && typeof T == "string" && (T = T === "true");
|
|
@@ -998,14 +998,14 @@ class Ws {
|
|
|
998
998
|
v = Ft.require($);
|
|
999
999
|
k(v);
|
|
1000
1000
|
} catch (v) {
|
|
1001
|
-
v.name === "PermissionDenied" ? d = v : f[F] && (d = Error(
|
|
1001
|
+
v.name === "PermissionDenied" ? d = v : f[F] && (d = Error(I("Invalid JSON config file: %s", M)));
|
|
1002
1002
|
}
|
|
1003
1003
|
});
|
|
1004
1004
|
}
|
|
1005
1005
|
function k(f, T) {
|
|
1006
1006
|
Object.keys(f).forEach(function(F) {
|
|
1007
1007
|
const M = f[F], v = T ? T + "." + F : F;
|
|
1008
|
-
typeof M == "object" && M !== null && !Array.isArray(M) && a["dot-notation"] ? k(M, v) : (!Dt(x, v.split(".")) || K(v, O.arrays) && a["combine-arrays"]) &&
|
|
1008
|
+
typeof M == "object" && M !== null && !Array.isArray(M) && a["dot-notation"] ? k(M, v) : (!Dt(x, v.split(".")) || K(v, O.arrays) && a["combine-arrays"]) && w(v, M);
|
|
1009
1009
|
});
|
|
1010
1010
|
}
|
|
1011
1011
|
function Y() {
|
|
@@ -1022,7 +1022,7 @@ class Ws {
|
|
|
1022
1022
|
const $ = v.split("__").map(function(X, W) {
|
|
1023
1023
|
return W === 0 && (X = X.substring(F.length)), le(X);
|
|
1024
1024
|
});
|
|
1025
|
-
(T && O.configs[$.join(".")] || !T) && !Dt(f, $) &&
|
|
1025
|
+
(T && O.configs[$.join(".")] || !T) && !Dt(f, $) && w($.join("."), M[v]);
|
|
1026
1026
|
}
|
|
1027
1027
|
});
|
|
1028
1028
|
}
|
|
@@ -1076,12 +1076,12 @@ class Ws {
|
|
|
1076
1076
|
O.aliases[F] || (O.aliases[F] = [].concat(r[F] || []), O.aliases[F].concat(F).forEach(function(M) {
|
|
1077
1077
|
if (/-/.test(M) && a["camel-case-expansion"]) {
|
|
1078
1078
|
const v = le(M);
|
|
1079
|
-
v !== F && O.aliases[F].indexOf(v) === -1 && (O.aliases[F].push(v),
|
|
1079
|
+
v !== F && O.aliases[F].indexOf(v) === -1 && (O.aliases[F].push(v), b[v] = !0);
|
|
1080
1080
|
}
|
|
1081
1081
|
}), O.aliases[F].concat(F).forEach(function(M) {
|
|
1082
1082
|
if (M.length > 1 && /[A-Z]/.test(M) && a["camel-case-expansion"]) {
|
|
1083
1083
|
const v = $r(M, "-");
|
|
1084
|
-
v !== F && O.aliases[F].indexOf(v) === -1 && (O.aliases[F].push(v),
|
|
1084
|
+
v !== F && O.aliases[F].indexOf(v) === -1 && (O.aliases[F].push(v), b[v] = !0);
|
|
1085
1085
|
}
|
|
1086
1086
|
}), O.aliases[F].forEach(function(M) {
|
|
1087
1087
|
O.aliases[M] = [F].concat(O.aliases[F].filter(function(v) {
|
|
@@ -1126,7 +1126,7 @@ class Ws {
|
|
|
1126
1126
|
return a["unknown-options-as-args"] && et(f);
|
|
1127
1127
|
}
|
|
1128
1128
|
function et(f) {
|
|
1129
|
-
return f = f.replace(/^-{3,}/, "--"), f.match(P) || it(f) ? !1 : !z(f, /^-+([^=]+?)=[\s\S]*$/,
|
|
1129
|
+
return f = f.replace(/^-{3,}/, "--"), f.match(P) || it(f) ? !1 : !z(f, /^-+([^=]+?)=[\s\S]*$/, C, /^-+([^=]+?)$/, /^-+([^=]+?)-$/, /^-+([^=]+?\d+)$/, /^-+([^=]+?)\W+.*$/);
|
|
1130
1130
|
}
|
|
1131
1131
|
function ot(f) {
|
|
1132
1132
|
return !K(f, O.bools) && !K(f, O.counts) && `${f}` in c ? c[f] : ut(m(f));
|
|
@@ -1147,7 +1147,7 @@ class Ws {
|
|
|
1147
1147
|
return f === void 0;
|
|
1148
1148
|
}
|
|
1149
1149
|
function A() {
|
|
1150
|
-
Object.keys(O.counts).find((f) => K(f, O.arrays) ? (d = Error(
|
|
1150
|
+
Object.keys(O.counts).find((f) => K(f, O.arrays) ? (d = Error(I("Invalid configuration: %s, opts.count excludes opts.array.", f)), !0) : K(f, O.nargs) ? (d = Error(I("Invalid configuration: %s, opts.count excludes opts.narg.", f)), !0) : !1);
|
|
1151
1151
|
}
|
|
1152
1152
|
return {
|
|
1153
1153
|
aliases: Object.assign({}, O.aliases),
|
|
@@ -1155,7 +1155,7 @@ class Ws {
|
|
|
1155
1155
|
configuration: a,
|
|
1156
1156
|
defaulted: Object.assign({}, E),
|
|
1157
1157
|
error: d,
|
|
1158
|
-
newAliases: Object.assign({},
|
|
1158
|
+
newAliases: Object.assign({}, b)
|
|
1159
1159
|
};
|
|
1160
1160
|
}
|
|
1161
1161
|
}
|
|
@@ -1466,13 +1466,13 @@ function V(o, t, e) {
|
|
|
1466
1466
|
if (y > p)
|
|
1467
1467
|
throw new ht(`Too many arguments provided. Expected max ${p} but received ${y}.`);
|
|
1468
1468
|
i.demanded.forEach((l) => {
|
|
1469
|
-
const h = c.shift(),
|
|
1470
|
-
l.cmd.filter((
|
|
1469
|
+
const h = c.shift(), b = yi(h);
|
|
1470
|
+
l.cmd.filter((I) => I === b || I === "*").length === 0 && bi(b, l.cmd, s), s += 1;
|
|
1471
1471
|
}), i.optional.forEach((l) => {
|
|
1472
1472
|
if (c.length === 0)
|
|
1473
1473
|
return;
|
|
1474
|
-
const h = c.shift(),
|
|
1475
|
-
l.cmd.filter((
|
|
1474
|
+
const h = c.shift(), b = yi(h);
|
|
1475
|
+
l.cmd.filter((I) => I === b || I === "*").length === 0 && bi(b, l.cmd, s), s += 1;
|
|
1476
1476
|
});
|
|
1477
1477
|
} catch (s) {
|
|
1478
1478
|
console.warn(s.stack);
|
|
@@ -1893,22 +1893,22 @@ function mo(o, t) {
|
|
|
1893
1893
|
n.command = function(L, R, U, k, Y = !1) {
|
|
1894
1894
|
U && (h = h.map((H) => (H[2] = !1, H))), h.push([L, R || "", U, k, Y]);
|
|
1895
1895
|
}, n.getCommands = () => h;
|
|
1896
|
-
let
|
|
1896
|
+
let b = {};
|
|
1897
1897
|
n.describe = function(L, R) {
|
|
1898
1898
|
Array.isArray(L) ? L.forEach((U) => {
|
|
1899
1899
|
n.describe(U, R);
|
|
1900
1900
|
}) : typeof L == "object" ? Object.keys(L).forEach((U) => {
|
|
1901
1901
|
n.describe(U, L[U]);
|
|
1902
|
-
}) :
|
|
1903
|
-
}, n.getDescriptions = () =>
|
|
1902
|
+
}) : b[L] = R;
|
|
1903
|
+
}, n.getDescriptions = () => b;
|
|
1904
1904
|
let E = [];
|
|
1905
1905
|
n.epilog = (N) => {
|
|
1906
1906
|
E.push(N);
|
|
1907
1907
|
};
|
|
1908
|
-
let
|
|
1908
|
+
let I = !1, O;
|
|
1909
1909
|
n.wrap = (N) => {
|
|
1910
|
-
|
|
1911
|
-
}, n.getWrap = () => t.getEnv("YARGS_DISABLE_WRAP") ? null : (
|
|
1910
|
+
I = !0, O = N;
|
|
1911
|
+
}, n.getWrap = () => t.getEnv("YARGS_DISABLE_WRAP") ? null : (I || (O = S(), I = !0), O);
|
|
1912
1912
|
const P = "__yargsString__:";
|
|
1913
1913
|
n.deferY18nLookup = (N) => P + N, n.help = function() {
|
|
1914
1914
|
if (_)
|
|
@@ -1916,7 +1916,7 @@ function mo(o, t) {
|
|
|
1916
1916
|
d();
|
|
1917
1917
|
const L = o.customScriptName ? o.$0 : t.path.basename(o.$0), R = o.getDemandedOptions(), U = o.getDemandedCommands(), k = o.getDeprecatedOptions(), Y = o.getGroups(), H = o.getOptions();
|
|
1918
1918
|
let at = [];
|
|
1919
|
-
at = at.concat(Object.keys(
|
|
1919
|
+
at = at.concat(Object.keys(b)), at = at.concat(Object.keys(R)), at = at.concat(Object.keys(U)), at = at.concat(Object.keys(H.default)), at = at.filter(j), at = Object.keys(at.reduce((z, it) => (it !== "_" && (z[it] = !0), z), {}));
|
|
1920
1920
|
const Mt = n.getWrap(), nt = t.cliui({
|
|
1921
1921
|
width: Mt,
|
|
1922
1922
|
wrap: !!Mt
|
|
@@ -1943,7 +1943,7 @@ function mo(o, t) {
|
|
|
1943
1943
|
nt.span({
|
|
1944
1944
|
text: ot,
|
|
1945
1945
|
padding: [0, 2, 0, 2],
|
|
1946
|
-
width:
|
|
1946
|
+
width: C(h, Mt, `${L}${it}`) + 4
|
|
1947
1947
|
}, { text: et[1] });
|
|
1948
1948
|
const ut = [];
|
|
1949
1949
|
et[2] && ut.push(`[${e("default")}]`), et[3] && et[3].length && ut.push(`[${e("aliases:")} ${et[3].join(", ")}]`), et[4] && (typeof et[4] == "string" ? ut.push(`[${e("deprecated: %s", et[4])}]`) : ut.push(`[${e("deprecated")}]`)), ut.length ? nt.div({
|
|
@@ -1978,7 +1978,7 @@ function mo(o, t) {
|
|
|
1978
1978
|
}), K.forEach(({ groupName: z, normalizedKeys: it, switches: ct }) => {
|
|
1979
1979
|
nt.div(z), it.forEach((et) => {
|
|
1980
1980
|
const ot = ct[et];
|
|
1981
|
-
let ut =
|
|
1981
|
+
let ut = b[et] || "", m = null;
|
|
1982
1982
|
ut.includes(P) && (ut = e(ut.substring(P.length))), H.boolean.includes(et) && (m = `[${e("boolean")}]`), H.count.includes(et) && (m = `[${e("count")}]`), H.string.includes(et) && (m = `[${e("string")}]`), H.normalize.includes(et) && (m = `[${e("string")}]`), H.array.includes(et) && (m = `[${e("array")}]`), H.number.includes(et) && (m = `[${e("number")}]`);
|
|
1983
1983
|
const u = (T) => typeof T == "string" ? `[${e("deprecated: %s", T)}]` : `[${e("deprecated")}]`, A = [
|
|
1984
1984
|
et in k ? u(k[et]) : null,
|
|
@@ -1990,7 +1990,7 @@ function mo(o, t) {
|
|
|
1990
1990
|
nt.span({
|
|
1991
1991
|
text: we(ot),
|
|
1992
1992
|
padding: [0, 2, 0, 2 + Oi(ot)],
|
|
1993
|
-
width:
|
|
1993
|
+
width: C(ct, Mt) + 4
|
|
1994
1994
|
}, ut);
|
|
1995
1995
|
const f = o.getInternalMethods().getUsageConfiguration()["hide-types"] === !0;
|
|
1996
1996
|
A && !f ? nt.div({ text: A, padding: [0, 0, 0, 2], align: "right" }) : nt.div();
|
|
@@ -2004,7 +2004,7 @@ function mo(o, t) {
|
|
|
2004
2004
|
}) : nt.div({
|
|
2005
2005
|
text: z[0],
|
|
2006
2006
|
padding: [0, 2, 0, 2],
|
|
2007
|
-
width:
|
|
2007
|
+
width: C(l, Mt) + 4
|
|
2008
2008
|
}, {
|
|
2009
2009
|
text: z[1]
|
|
2010
2010
|
});
|
|
@@ -2016,7 +2016,7 @@ function mo(o, t) {
|
|
|
2016
2016
|
}
|
|
2017
2017
|
return nt.toString().replace(/\s*$/, "");
|
|
2018
2018
|
};
|
|
2019
|
-
function
|
|
2019
|
+
function C(N, L, R) {
|
|
2020
2020
|
let U = 0;
|
|
2021
2021
|
return Array.isArray(N) || (N = Object.values(N).map((k) => [k])), N.forEach((k) => {
|
|
2022
2022
|
U = Math.max(t.stringWidth(R ? `${R} ${we(k[0])}` : we(k[0])) + Oi(k[0]), U);
|
|
@@ -2026,7 +2026,7 @@ function mo(o, t) {
|
|
|
2026
2026
|
const N = o.getDemandedOptions(), L = o.getOptions();
|
|
2027
2027
|
(Object.keys(L.alias) || []).forEach((R) => {
|
|
2028
2028
|
L.alias[R].forEach((U) => {
|
|
2029
|
-
|
|
2029
|
+
b[U] && n.describe(R, b[U]), U in N && o.demandOption(R, N[U]), L.boolean.includes(U) && o.boolean(R), L.count.includes(U) && o.count(R), L.string.includes(U) && o.string(R), L.normalize.includes(U) && o.normalize(R), L.array.includes(U) && o.array(R), L.number.includes(U) && o.number(R);
|
|
2030
2030
|
});
|
|
2031
2031
|
});
|
|
2032
2032
|
}
|
|
@@ -2088,11 +2088,11 @@ function mo(o, t) {
|
|
|
2088
2088
|
const L = o.getInternalMethods().getLoggerInstance();
|
|
2089
2089
|
N || (N = "error"), (typeof N == "function" ? N : L[N])(D);
|
|
2090
2090
|
}, n.reset = function(L) {
|
|
2091
|
-
return i = null, c = !1, y = [], p = !1, E = [], l = [], h = [],
|
|
2091
|
+
return i = null, c = !1, y = [], p = !1, E = [], l = [], h = [], b = ye(b, (R) => !L[R]), n;
|
|
2092
2092
|
};
|
|
2093
|
-
const
|
|
2093
|
+
const w = [];
|
|
2094
2094
|
return n.freeze = function() {
|
|
2095
|
-
|
|
2095
|
+
w.push({
|
|
2096
2096
|
failMessage: i,
|
|
2097
2097
|
failureOutput: c,
|
|
2098
2098
|
usages: y,
|
|
@@ -2100,11 +2100,11 @@ function mo(o, t) {
|
|
|
2100
2100
|
epilogs: E,
|
|
2101
2101
|
examples: l,
|
|
2102
2102
|
commands: h,
|
|
2103
|
-
descriptions:
|
|
2103
|
+
descriptions: b
|
|
2104
2104
|
});
|
|
2105
2105
|
}, n.unfreeze = function(L = !1) {
|
|
2106
|
-
const R =
|
|
2107
|
-
R && (L ? (
|
|
2106
|
+
const R = w.pop();
|
|
2107
|
+
R && (L ? (b = { ...R.descriptions, ...b }, h = [...R.commands, ...h], y = [...R.usages, ...y], l = [...R.examples, ...l], E = [...R.epilogs, ...E]) : {
|
|
2108
2108
|
failMessage: i,
|
|
2109
2109
|
failureOutput: c,
|
|
2110
2110
|
usages: y,
|
|
@@ -2112,7 +2112,7 @@ function mo(o, t) {
|
|
|
2112
2112
|
epilogs: E,
|
|
2113
2113
|
examples: l,
|
|
2114
2114
|
commands: h,
|
|
2115
|
-
descriptions:
|
|
2115
|
+
descriptions: b
|
|
2116
2116
|
} = R);
|
|
2117
2117
|
}, n;
|
|
2118
2118
|
}
|
|
@@ -2271,13 +2271,13 @@ class wo {
|
|
|
2271
2271
|
var i, r, a, c;
|
|
2272
2272
|
let y = t;
|
|
2273
2273
|
if (this.zshShell) {
|
|
2274
|
-
const
|
|
2275
|
-
const
|
|
2276
|
-
return typeof
|
|
2277
|
-
}),
|
|
2274
|
+
const b = this.usage.getDescriptions(), E = (r = (i = this === null || this === void 0 ? void 0 : this.aliases) === null || i === void 0 ? void 0 : i[t]) === null || r === void 0 ? void 0 : r.find((P) => {
|
|
2275
|
+
const C = b[P];
|
|
2276
|
+
return typeof C == "string" && C.length > 0;
|
|
2277
|
+
}), I = E ? b[E] : void 0, O = (c = (a = b[t]) !== null && a !== void 0 ? a : I) !== null && c !== void 0 ? c : "";
|
|
2278
2278
|
y = `${t.replace(/:/g, "\\:")}:${O.replace("__yargsString__:", "").replace(/(\r\n|\n|\r)/gm, " ")}`;
|
|
2279
2279
|
}
|
|
2280
|
-
const p = (
|
|
2280
|
+
const p = (b) => /^--/.test(b), l = (b) => /^[^0-9]$/.test(b), h = !p(n) && l(t) ? "-" : "--";
|
|
2281
2281
|
e.push(h + y), s && e.push(h + "no-" + y);
|
|
2282
2282
|
}
|
|
2283
2283
|
customCompletion(t, e, n, s) {
|
|
@@ -2323,7 +2323,7 @@ function Eo(o) {
|
|
|
2323
2323
|
function Do(o) {
|
|
2324
2324
|
return o.length > 3;
|
|
2325
2325
|
}
|
|
2326
|
-
function
|
|
2326
|
+
function _o(o, t) {
|
|
2327
2327
|
if (o.length === 0)
|
|
2328
2328
|
return t.length;
|
|
2329
2329
|
if (t.length === 0)
|
|
@@ -2341,7 +2341,7 @@ function Co(o, t) {
|
|
|
2341
2341
|
return e[t.length][o.length];
|
|
2342
2342
|
}
|
|
2343
2343
|
const Ei = ["$0", "--", "_"];
|
|
2344
|
-
function
|
|
2344
|
+
function Co(o, t, e) {
|
|
2345
2345
|
const n = e.y18n.__, s = e.y18n.__n, i = {};
|
|
2346
2346
|
i.nonOptionCount = function(l) {
|
|
2347
2347
|
const h = o.getDemandedCommands(), E = l._.length + (l["--"] ? l["--"].length : 0) - o.getInternalMethods().getContext().commands.length;
|
|
@@ -2349,67 +2349,67 @@ function _o(o, t, e) {
|
|
|
2349
2349
|
}, i.positionalCount = function(l, h) {
|
|
2350
2350
|
h < l && t.fail(s("Not enough non-option arguments: got %s, need at least %s", "Not enough non-option arguments: got %s, need at least %s", h, h + "", l + ""));
|
|
2351
2351
|
}, i.requiredArguments = function(l, h) {
|
|
2352
|
-
let
|
|
2352
|
+
let b = null;
|
|
2353
2353
|
for (const E of Object.keys(h))
|
|
2354
|
-
(!Object.prototype.hasOwnProperty.call(l, E) || typeof l[E] > "u") && (
|
|
2355
|
-
if (
|
|
2354
|
+
(!Object.prototype.hasOwnProperty.call(l, E) || typeof l[E] > "u") && (b = b || {}, b[E] = h[E]);
|
|
2355
|
+
if (b) {
|
|
2356
2356
|
const E = [];
|
|
2357
|
-
for (const O of Object.keys(
|
|
2358
|
-
const P =
|
|
2357
|
+
for (const O of Object.keys(b)) {
|
|
2358
|
+
const P = b[O];
|
|
2359
2359
|
P && E.indexOf(P) < 0 && E.push(P);
|
|
2360
2360
|
}
|
|
2361
|
-
const
|
|
2361
|
+
const I = E.length ? `
|
|
2362
2362
|
${E.join(`
|
|
2363
2363
|
`)}` : "";
|
|
2364
|
-
t.fail(s("Missing required argument: %s", "Missing required arguments: %s", Object.keys(
|
|
2364
|
+
t.fail(s("Missing required argument: %s", "Missing required arguments: %s", Object.keys(b).length, Object.keys(b).join(", ") + I));
|
|
2365
2365
|
}
|
|
2366
|
-
}, i.unknownArguments = function(l, h,
|
|
2366
|
+
}, i.unknownArguments = function(l, h, b, E, I = !0) {
|
|
2367
2367
|
var O;
|
|
2368
|
-
const P = o.getInternalMethods().getCommandInstance().getCommands(),
|
|
2368
|
+
const P = o.getInternalMethods().getCommandInstance().getCommands(), C = [], d = o.getInternalMethods().getContext();
|
|
2369
2369
|
if (Object.keys(l).forEach((_) => {
|
|
2370
|
-
!Ei.includes(_) && !Object.prototype.hasOwnProperty.call(
|
|
2371
|
-
}),
|
|
2372
|
-
P.includes("" + _) ||
|
|
2373
|
-
}),
|
|
2370
|
+
!Ei.includes(_) && !Object.prototype.hasOwnProperty.call(b, _) && !Object.prototype.hasOwnProperty.call(o.getInternalMethods().getParseContext(), _) && !i.isValidAndSomeAliasIsNotNew(_, h) && C.push(_);
|
|
2371
|
+
}), I && (d.commands.length > 0 || P.length > 0 || E) && l._.slice(d.commands.length).forEach((_) => {
|
|
2372
|
+
P.includes("" + _) || C.push("" + _);
|
|
2373
|
+
}), I) {
|
|
2374
2374
|
const x = ((O = o.getDemandedCommands()._) === null || O === void 0 ? void 0 : O.max) || 0, j = d.commands.length + x;
|
|
2375
2375
|
j < l._.length && l._.slice(j).forEach((B) => {
|
|
2376
|
-
B = String(B), !d.commands.includes(B) && !
|
|
2376
|
+
B = String(B), !d.commands.includes(B) && !C.includes(B) && C.push(B);
|
|
2377
2377
|
});
|
|
2378
2378
|
}
|
|
2379
|
-
|
|
2379
|
+
C.length && t.fail(s("Unknown argument: %s", "Unknown arguments: %s", C.length, C.map((_) => _.trim() ? _ : `"${_}"`).join(", ")));
|
|
2380
2380
|
}, i.unknownCommands = function(l) {
|
|
2381
|
-
const h = o.getInternalMethods().getCommandInstance().getCommands(),
|
|
2382
|
-
return (E.commands.length > 0 || h.length > 0) && l._.slice(E.commands.length).forEach((
|
|
2383
|
-
h.includes("" +
|
|
2384
|
-
}),
|
|
2381
|
+
const h = o.getInternalMethods().getCommandInstance().getCommands(), b = [], E = o.getInternalMethods().getContext();
|
|
2382
|
+
return (E.commands.length > 0 || h.length > 0) && l._.slice(E.commands.length).forEach((I) => {
|
|
2383
|
+
h.includes("" + I) || b.push("" + I);
|
|
2384
|
+
}), b.length > 0 ? (t.fail(s("Unknown command: %s", "Unknown commands: %s", b.length, b.join(", "))), !0) : !1;
|
|
2385
2385
|
}, i.isValidAndSomeAliasIsNotNew = function(l, h) {
|
|
2386
2386
|
if (!Object.prototype.hasOwnProperty.call(h, l))
|
|
2387
2387
|
return !1;
|
|
2388
|
-
const
|
|
2389
|
-
return [l, ...h[l]].some((E) => !Object.prototype.hasOwnProperty.call(
|
|
2388
|
+
const b = o.parsed.newAliases;
|
|
2389
|
+
return [l, ...h[l]].some((E) => !Object.prototype.hasOwnProperty.call(b, E) || !b[l]);
|
|
2390
2390
|
}, i.limitedChoices = function(l) {
|
|
2391
|
-
const h = o.getOptions(),
|
|
2391
|
+
const h = o.getOptions(), b = {};
|
|
2392
2392
|
if (!Object.keys(h.choices).length)
|
|
2393
2393
|
return;
|
|
2394
2394
|
Object.keys(l).forEach((O) => {
|
|
2395
2395
|
Ei.indexOf(O) === -1 && Object.prototype.hasOwnProperty.call(h.choices, O) && [].concat(l[O]).forEach((P) => {
|
|
2396
|
-
h.choices[O].indexOf(P) === -1 && P !== void 0 && (
|
|
2396
|
+
h.choices[O].indexOf(P) === -1 && P !== void 0 && (b[O] = (b[O] || []).concat(P));
|
|
2397
2397
|
});
|
|
2398
2398
|
});
|
|
2399
|
-
const E = Object.keys(
|
|
2399
|
+
const E = Object.keys(b);
|
|
2400
2400
|
if (!E.length)
|
|
2401
2401
|
return;
|
|
2402
|
-
let
|
|
2402
|
+
let I = n("Invalid values:");
|
|
2403
2403
|
E.forEach((O) => {
|
|
2404
|
-
|
|
2405
|
-
${n("Argument: %s, Given: %s, Choices: %s", O, t.stringifiedValues(
|
|
2406
|
-
}), t.fail(
|
|
2404
|
+
I += `
|
|
2405
|
+
${n("Argument: %s, Given: %s, Choices: %s", O, t.stringifiedValues(b[O]), t.stringifiedValues(h.choices[O]))}`;
|
|
2406
|
+
}), t.fail(I);
|
|
2407
2407
|
};
|
|
2408
2408
|
let r = {};
|
|
2409
2409
|
i.implies = function(l, h) {
|
|
2410
|
-
V("<string|object> [array|number|string]", [l, h], arguments.length), typeof l == "object" ? Object.keys(l).forEach((
|
|
2411
|
-
i.implies(
|
|
2412
|
-
}) : (o.global(l), r[l] || (r[l] = []), Array.isArray(h) ? h.forEach((
|
|
2410
|
+
V("<string|object> [array|number|string]", [l, h], arguments.length), typeof l == "object" ? Object.keys(l).forEach((b) => {
|
|
2411
|
+
i.implies(b, l[b]);
|
|
2412
|
+
}) : (o.global(l), r[l] || (r[l] = []), Array.isArray(h) ? h.forEach((b) => i.implies(l, b)) : (At(h, void 0, e), r[l].push(h)));
|
|
2413
2413
|
}, i.getImplied = function() {
|
|
2414
2414
|
return r;
|
|
2415
2415
|
};
|
|
@@ -2419,42 +2419,42 @@ ${E.join(`
|
|
|
2419
2419
|
}
|
|
2420
2420
|
i.implications = function(l) {
|
|
2421
2421
|
const h = [];
|
|
2422
|
-
if (Object.keys(r).forEach((
|
|
2423
|
-
const E =
|
|
2424
|
-
(r[
|
|
2422
|
+
if (Object.keys(r).forEach((b) => {
|
|
2423
|
+
const E = b;
|
|
2424
|
+
(r[b] || []).forEach((I) => {
|
|
2425
2425
|
let O = E;
|
|
2426
|
-
const P =
|
|
2427
|
-
O = a(l, O),
|
|
2426
|
+
const P = I;
|
|
2427
|
+
O = a(l, O), I = a(l, I), O && !I && h.push(` ${E} -> ${P}`);
|
|
2428
2428
|
});
|
|
2429
2429
|
}), h.length) {
|
|
2430
|
-
let
|
|
2430
|
+
let b = `${n("Implications failed:")}
|
|
2431
2431
|
`;
|
|
2432
2432
|
h.forEach((E) => {
|
|
2433
|
-
|
|
2434
|
-
}), t.fail(
|
|
2433
|
+
b += E;
|
|
2434
|
+
}), t.fail(b);
|
|
2435
2435
|
}
|
|
2436
2436
|
};
|
|
2437
2437
|
let c = {};
|
|
2438
2438
|
i.conflicts = function(l, h) {
|
|
2439
|
-
V("<string|object> [array|string]", [l, h], arguments.length), typeof l == "object" ? Object.keys(l).forEach((
|
|
2440
|
-
i.conflicts(
|
|
2441
|
-
}) : (o.global(l), c[l] || (c[l] = []), Array.isArray(h) ? h.forEach((
|
|
2439
|
+
V("<string|object> [array|string]", [l, h], arguments.length), typeof l == "object" ? Object.keys(l).forEach((b) => {
|
|
2440
|
+
i.conflicts(b, l[b]);
|
|
2441
|
+
}) : (o.global(l), c[l] || (c[l] = []), Array.isArray(h) ? h.forEach((b) => i.conflicts(l, b)) : c[l].push(h));
|
|
2442
2442
|
}, i.getConflicting = () => c, i.conflicting = function(l) {
|
|
2443
2443
|
Object.keys(l).forEach((h) => {
|
|
2444
|
-
c[h] && c[h].forEach((
|
|
2445
|
-
|
|
2444
|
+
c[h] && c[h].forEach((b) => {
|
|
2445
|
+
b && l[h] !== void 0 && l[b] !== void 0 && t.fail(n("Arguments %s and %s are mutually exclusive", h, b));
|
|
2446
2446
|
});
|
|
2447
2447
|
}), o.getInternalMethods().getParserConfiguration()["strip-dashed"] && Object.keys(c).forEach((h) => {
|
|
2448
|
-
c[h].forEach((
|
|
2449
|
-
|
|
2448
|
+
c[h].forEach((b) => {
|
|
2449
|
+
b && l[e.Parser.camelCase(h)] !== void 0 && l[e.Parser.camelCase(b)] !== void 0 && t.fail(n("Arguments %s and %s are mutually exclusive", h, b));
|
|
2450
2450
|
});
|
|
2451
2451
|
});
|
|
2452
2452
|
}, i.recommendCommands = function(l, h) {
|
|
2453
2453
|
h = h.sort((O, P) => P.length - O.length);
|
|
2454
|
-
let E = null,
|
|
2454
|
+
let E = null, I = 1 / 0;
|
|
2455
2455
|
for (let O = 0, P; (P = h[O]) !== void 0; O++) {
|
|
2456
|
-
const
|
|
2457
|
-
|
|
2456
|
+
const C = _o(l, P);
|
|
2457
|
+
C <= 3 && C < I && (I = C, E = P);
|
|
2458
2458
|
}
|
|
2459
2459
|
E && t.fail(n("Did you mean %s?", E));
|
|
2460
2460
|
}, i.reset = function(l) {
|
|
@@ -2518,7 +2518,7 @@ var q = function(o, t, e, n, s) {
|
|
|
2518
2518
|
if (e === "a" && !n) throw new TypeError("Private accessor was defined without a getter");
|
|
2519
2519
|
if (typeof t == "function" ? o !== t || !n : !t.has(o)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
2520
2520
|
return e === "m" ? n : e === "a" ? n.call(o) : n ? n.value : t.get(o);
|
|
2521
|
-
}, ft, Vt, ce,
|
|
2521
|
+
}, ft, Vt, ce, _t, bt, Oe, Ut, Ht, Ee, Ct, De, It, Lt, wt, Tt, _e, ne, mt, G, Ce, Ie, Ot, zt, ie, Gt, $t, Te, Q, Yt, Kt, kt, J, xe, St, lt;
|
|
2522
2522
|
function xo(o) {
|
|
2523
2523
|
return (t = [], e = o.process.cwd(), n) => {
|
|
2524
2524
|
const s = new vo(t, e, n, o);
|
|
@@ -2528,10 +2528,10 @@ function xo(o) {
|
|
|
2528
2528
|
}), s.help(), s.version(), s;
|
|
2529
2529
|
};
|
|
2530
2530
|
}
|
|
2531
|
-
const Di = Symbol("copyDoubleDash"),
|
|
2531
|
+
const Di = Symbol("copyDoubleDash"), _i = Symbol("copyDoubleDash"), We = Symbol("deleteFromParserHintObject"), Ci = Symbol("emitWarning"), Ii = Symbol("freeze"), Ti = Symbol("getDollarZero"), Qt = Symbol("getParserConfiguration"), xi = Symbol("getUsageConfiguration"), qe = Symbol("guessLocale"), vi = Symbol("guessVersion"), Ni = Symbol("parsePositionalNumbers"), Ve = Symbol("pkgUp"), Wt = Symbol("populateParserHintArray"), re = Symbol("populateParserHintSingleValueDictionary"), He = Symbol("populateParserHintArrayDictionary"), ze = Symbol("populateParserHintDictionary"), Ge = Symbol("sanitizeKey"), Ye = Symbol("setKey"), Ke = Symbol("unfreeze"), Pi = Symbol("validateAsync"), Ai = Symbol("getCommandInstance"), Mi = Symbol("getContext"), Li = Symbol("getHasOutput"), Si = Symbol("getLoggerInstance"), ji = Symbol("getParseContext"), Fi = Symbol("getUsageInstance"), Ri = Symbol("getValidationInstance"), ve = Symbol("hasParseCallback"), Bi = Symbol("isGlobalContext"), Jt = Symbol("postProcess"), Xi = Symbol("rebase"), ke = Symbol("reset"), ue = Symbol("runYargsParserAndExecuteCommands"), Qe = Symbol("runValidation"), Ui = Symbol("setHasOutput"), Zt = Symbol("kTrackManuallySetKeys");
|
|
2532
2532
|
class vo {
|
|
2533
2533
|
constructor(t = [], e, n, s) {
|
|
2534
|
-
this.customScriptName = !1, this.parsed = !1, ft.set(this, void 0), Vt.set(this, void 0), ce.set(this, { commands: [], fullCommands: [] }),
|
|
2534
|
+
this.customScriptName = !1, this.parsed = !1, ft.set(this, void 0), Vt.set(this, void 0), ce.set(this, { commands: [], fullCommands: [] }), _t.set(this, null), bt.set(this, null), Oe.set(this, "show-hidden"), Ut.set(this, null), Ht.set(this, !0), Ee.set(this, {}), Ct.set(this, !0), De.set(this, []), It.set(this, void 0), Lt.set(this, {}), wt.set(this, !1), Tt.set(this, null), _e.set(this, !0), ne.set(this, void 0), mt.set(this, ""), G.set(this, void 0), Ce.set(this, void 0), Ie.set(this, {}), Ot.set(this, null), zt.set(this, null), ie.set(this, {}), Gt.set(this, {}), $t.set(this, void 0), Te.set(this, !1), Q.set(this, void 0), Yt.set(this, !1), Kt.set(this, !1), kt.set(this, !1), J.set(this, void 0), xe.set(this, {}), St.set(this, null), lt.set(this, void 0), q(this, Q, s, "f"), q(this, $t, t, "f"), q(this, Vt, e, "f"), q(this, Ce, n, "f"), q(this, It, new ro(this), "f"), this.$0 = this[Ti](), this[ke](), q(this, ft, g(this, ft, "f"), "f"), q(this, J, g(this, J, "f"), "f"), q(this, lt, g(this, lt, "f"), "f"), q(this, G, g(this, G, "f"), "f"), g(this, G, "f").showHiddenOpt = g(this, Oe, "f"), q(this, ne, this[_i](), "f");
|
|
2535
2535
|
}
|
|
2536
2536
|
addHelpOpt(t, e) {
|
|
2537
2537
|
const n = "help";
|
|
@@ -2601,7 +2601,7 @@ class vo {
|
|
|
2601
2601
|
}), this);
|
|
2602
2602
|
}
|
|
2603
2603
|
completion(t, e, n) {
|
|
2604
|
-
return V("[string] [string|boolean|function] [function]", [t, e, n], arguments.length), typeof e == "function" && (n = e, e = void 0), q(this, bt, t || g(this, bt, "f") || "completion", "f"), !e && e !== !1 && (e = "generate completion script"), this.command(g(this, bt, "f"), e), n && g(this,
|
|
2604
|
+
return V("[string] [string|boolean|function] [function]", [t, e, n], arguments.length), typeof e == "function" && (n = e, e = void 0), q(this, bt, t || g(this, bt, "f") || "completion", "f"), !e && e !== !1 && (e = "generate completion script"), this.command(g(this, bt, "f"), e), n && g(this, _t, "f").registerFunction(n), this;
|
|
2605
2605
|
}
|
|
2606
2606
|
command(t, e, n, s, i, r) {
|
|
2607
2607
|
return V("<string|array|object> [string|boolean] [function|object] [function] [array] [boolean|string]", [t, e, n, s, i, r], arguments.length), g(this, ft, "f").addHandler(t, e, n, s, i, r), this;
|
|
@@ -2611,7 +2611,7 @@ class vo {
|
|
|
2611
2611
|
}
|
|
2612
2612
|
commandDir(t, e) {
|
|
2613
2613
|
V("<string> [object]", [t, e], arguments.length);
|
|
2614
|
-
const n = g(this,
|
|
2614
|
+
const n = g(this, Ce, "f") || g(this, Q, "f").require;
|
|
2615
2615
|
return g(this, ft, "f").addDirectory(t, n, g(this, Q, "f").getCallerFile(), e), this;
|
|
2616
2616
|
}
|
|
2617
2617
|
count(t) {
|
|
@@ -2663,10 +2663,10 @@ class vo {
|
|
|
2663
2663
|
return V("<string|array> [string]", [t, e], arguments.length), Array.isArray(t) ? t.forEach((n) => this.example(...n)) : g(this, J, "f").example(t, e), this;
|
|
2664
2664
|
}
|
|
2665
2665
|
exit(t, e) {
|
|
2666
|
-
q(this, wt, !0, "f"), q(this, Ut, e, "f"), g(this,
|
|
2666
|
+
q(this, wt, !0, "f"), q(this, Ut, e, "f"), g(this, Ct, "f") && g(this, Q, "f").process.exit(t);
|
|
2667
2667
|
}
|
|
2668
2668
|
exitProcess(t = !0) {
|
|
2669
|
-
return V("[boolean]", [t], arguments.length), q(this,
|
|
2669
|
+
return V("[boolean]", [t], arguments.length), q(this, Ct, t, "f"), this;
|
|
2670
2670
|
}
|
|
2671
2671
|
fail(t) {
|
|
2672
2672
|
if (V("<function|boolean>", [t], arguments.length), typeof t == "boolean" && t !== !1)
|
|
@@ -2677,8 +2677,8 @@ class vo {
|
|
|
2677
2677
|
return this.parsed ? this.parsed.aliases : {};
|
|
2678
2678
|
}
|
|
2679
2679
|
async getCompletion(t, e) {
|
|
2680
|
-
return V("<array> [function]", [t, e], arguments.length), e ? g(this,
|
|
2681
|
-
g(this,
|
|
2680
|
+
return V("<array> [function]", [t, e], arguments.length), e ? g(this, _t, "f").getCompletion(t, e) : new Promise((n, s) => {
|
|
2681
|
+
g(this, _t, "f").getCompletion(t, (i, r) => {
|
|
2682
2682
|
i ? s(i) : n(r);
|
|
2683
2683
|
});
|
|
2684
2684
|
});
|
|
@@ -2696,7 +2696,7 @@ class vo {
|
|
|
2696
2696
|
return g(this, Ht, "f");
|
|
2697
2697
|
}
|
|
2698
2698
|
getExitProcess() {
|
|
2699
|
-
return g(this,
|
|
2699
|
+
return g(this, Ct, "f");
|
|
2700
2700
|
}
|
|
2701
2701
|
getGroups() {
|
|
2702
2702
|
return Object.assign({}, g(this, Lt, "f"), g(this, Gt, "f"));
|
|
@@ -2765,7 +2765,7 @@ class vo {
|
|
|
2765
2765
|
this.options(n, t[n]);
|
|
2766
2766
|
});
|
|
2767
2767
|
else {
|
|
2768
|
-
typeof e != "object" && (e = {}), this[Zt](t), g(this, St, "f") && (t === "version" || e?.alias === "version") && this[
|
|
2768
|
+
typeof e != "object" && (e = {}), this[Zt](t), g(this, St, "f") && (t === "version" || e?.alias === "version") && this[Ci]([
|
|
2769
2769
|
'"version" is a reserved word.',
|
|
2770
2770
|
"Please do one of the following:",
|
|
2771
2771
|
'- Disable version with `yargs.version(false)` if using "version" as an option',
|
|
@@ -2787,9 +2787,9 @@ class vo {
|
|
|
2787
2787
|
return this.option(t, e);
|
|
2788
2788
|
}
|
|
2789
2789
|
parse(t, e, n) {
|
|
2790
|
-
V("[string|array] [function|boolean|object] [function]", [t, e, n], arguments.length), this[Ii](), typeof t > "u" && (t = g(this, $t, "f")), typeof e == "object" && (q(this, zt, e, "f"), e = n), typeof e == "function" && (q(this, Ot, e, "f"), e = !1), e || q(this, $t, t, "f"), g(this, Ot, "f") && q(this,
|
|
2790
|
+
V("[string|array] [function|boolean|object] [function]", [t, e, n], arguments.length), this[Ii](), typeof t > "u" && (t = g(this, $t, "f")), typeof e == "object" && (q(this, zt, e, "f"), e = n), typeof e == "function" && (q(this, Ot, e, "f"), e = !1), e || q(this, $t, t, "f"), g(this, Ot, "f") && q(this, Ct, !1, "f");
|
|
2791
2791
|
const s = this[ue](t, !!e), i = this.parsed;
|
|
2792
|
-
return g(this,
|
|
2792
|
+
return g(this, _t, "f").setParsed(this.parsed), pt(s) ? s.then((r) => (g(this, Ot, "f") && g(this, Ot, "f").call(this, g(this, Ut, "f"), r, g(this, mt, "f")), r)).catch((r) => {
|
|
2793
2793
|
throw g(this, Ot, "f") && g(this, Ot, "f")(r, this.parsed.argv, g(this, mt, "f")), r;
|
|
2794
2794
|
}).finally(() => {
|
|
2795
2795
|
this[Ke](), this.parsed = i;
|
|
@@ -2855,7 +2855,7 @@ class vo {
|
|
|
2855
2855
|
return V("<array|string|object> [number]", [t], arguments.length), typeof t == "string" && g(this, G, "f").narg[t] ? this : (this[re](this.requiresArg.bind(this), "narg", t, NaN), this);
|
|
2856
2856
|
}
|
|
2857
2857
|
showCompletionScript(t, e) {
|
|
2858
|
-
return V("[string] [string]", [t, e], arguments.length), t = t || this.$0, g(this, ne, "f").log(g(this,
|
|
2858
|
+
return V("[string] [string]", [t, e], arguments.length), t = t || this.$0, g(this, ne, "f").log(g(this, _t, "f").generateCompletionScript(t, e || g(this, bt, "f") || "completion")), this;
|
|
2859
2859
|
}
|
|
2860
2860
|
showHelp(t) {
|
|
2861
2861
|
if (V("[string|function]", [t], arguments.length), q(this, wt, !0, "f"), !g(this, J, "f").hasCachedHelpMessage()) {
|
|
@@ -2932,7 +2932,7 @@ class vo {
|
|
|
2932
2932
|
wrap(t) {
|
|
2933
2933
|
return V("<number|null|undefined>", [t], arguments.length), g(this, J, "f").wrap(t), this;
|
|
2934
2934
|
}
|
|
2935
|
-
[(ft = /* @__PURE__ */ new WeakMap(), Vt = /* @__PURE__ */ new WeakMap(), ce = /* @__PURE__ */ new WeakMap(),
|
|
2935
|
+
[(ft = /* @__PURE__ */ new WeakMap(), Vt = /* @__PURE__ */ new WeakMap(), ce = /* @__PURE__ */ new WeakMap(), _t = /* @__PURE__ */ new WeakMap(), bt = /* @__PURE__ */ new WeakMap(), Oe = /* @__PURE__ */ new WeakMap(), Ut = /* @__PURE__ */ new WeakMap(), Ht = /* @__PURE__ */ new WeakMap(), Ee = /* @__PURE__ */ new WeakMap(), Ct = /* @__PURE__ */ new WeakMap(), De = /* @__PURE__ */ new WeakMap(), It = /* @__PURE__ */ new WeakMap(), Lt = /* @__PURE__ */ new WeakMap(), wt = /* @__PURE__ */ new WeakMap(), Tt = /* @__PURE__ */ new WeakMap(), _e = /* @__PURE__ */ new WeakMap(), ne = /* @__PURE__ */ new WeakMap(), mt = /* @__PURE__ */ new WeakMap(), G = /* @__PURE__ */ new WeakMap(), Ce = /* @__PURE__ */ new WeakMap(), Ie = /* @__PURE__ */ new WeakMap(), Ot = /* @__PURE__ */ new WeakMap(), zt = /* @__PURE__ */ new WeakMap(), ie = /* @__PURE__ */ new WeakMap(), Gt = /* @__PURE__ */ new WeakMap(), $t = /* @__PURE__ */ new WeakMap(), Te = /* @__PURE__ */ new WeakMap(), Q = /* @__PURE__ */ new WeakMap(), Yt = /* @__PURE__ */ new WeakMap(), Kt = /* @__PURE__ */ new WeakMap(), kt = /* @__PURE__ */ new WeakMap(), J = /* @__PURE__ */ new WeakMap(), xe = /* @__PURE__ */ new WeakMap(), St = /* @__PURE__ */ new WeakMap(), lt = /* @__PURE__ */ new WeakMap(), Di)](t) {
|
|
2936
2936
|
if (!t._ || !t["--"])
|
|
2937
2937
|
return t;
|
|
2938
2938
|
t._.push.apply(t._, t["--"]);
|
|
@@ -2942,7 +2942,7 @@ class vo {
|
|
|
2942
2942
|
}
|
|
2943
2943
|
return t;
|
|
2944
2944
|
}
|
|
2945
|
-
[
|
|
2945
|
+
[_i]() {
|
|
2946
2946
|
return {
|
|
2947
2947
|
log: (...t) => {
|
|
2948
2948
|
this[ve]() || console.log(...t), q(this, wt, !0, "f"), g(this, mt, "f").length && q(this, mt, g(this, mt, "f") + `
|
|
@@ -2962,14 +2962,14 @@ class vo {
|
|
|
2962
2962
|
Array.isArray(n) ? n.includes(t) && n.splice(n.indexOf(t), 1) : typeof n == "object" && delete n[t];
|
|
2963
2963
|
}), delete g(this, J, "f").getDescriptions()[t];
|
|
2964
2964
|
}
|
|
2965
|
-
[
|
|
2965
|
+
[Ci](t, e, n) {
|
|
2966
2966
|
g(this, Ee, "f")[n] || (g(this, Q, "f").process.emitWarning(t, e), g(this, Ee, "f")[n] = !0);
|
|
2967
2967
|
}
|
|
2968
2968
|
[Ii]() {
|
|
2969
2969
|
g(this, De, "f").push({
|
|
2970
2970
|
options: g(this, G, "f"),
|
|
2971
2971
|
configObjects: g(this, G, "f").configObjects.slice(0),
|
|
2972
|
-
exitProcess: g(this,
|
|
2972
|
+
exitProcess: g(this, Ct, "f"),
|
|
2973
2973
|
groups: g(this, Lt, "f"),
|
|
2974
2974
|
strict: g(this, Yt, "f"),
|
|
2975
2975
|
strictCommands: g(this, Kt, "f"),
|
|
@@ -3062,49 +3062,49 @@ class vo {
|
|
|
3062
3062
|
}
|
|
3063
3063
|
[Ke]() {
|
|
3064
3064
|
var t, e, n, s, i, r, a, c, y, p, l, h;
|
|
3065
|
-
const
|
|
3066
|
-
At(
|
|
3065
|
+
const b = g(this, De, "f").pop();
|
|
3066
|
+
At(b, void 0, g(this, Q, "f"));
|
|
3067
3067
|
let E;
|
|
3068
3068
|
t = this, e = this, n = this, s = this, i = this, r = this, a = this, c = this, y = this, p = this, l = this, h = this, {
|
|
3069
|
-
options: { set value(
|
|
3070
|
-
q(t, G,
|
|
3069
|
+
options: { set value(I) {
|
|
3070
|
+
q(t, G, I, "f");
|
|
3071
3071
|
} }.value,
|
|
3072
3072
|
configObjects: E,
|
|
3073
|
-
exitProcess: { set value(
|
|
3074
|
-
q(e,
|
|
3073
|
+
exitProcess: { set value(I) {
|
|
3074
|
+
q(e, Ct, I, "f");
|
|
3075
3075
|
} }.value,
|
|
3076
|
-
groups: { set value(
|
|
3077
|
-
q(n, Lt,
|
|
3076
|
+
groups: { set value(I) {
|
|
3077
|
+
q(n, Lt, I, "f");
|
|
3078
3078
|
} }.value,
|
|
3079
|
-
output: { set value(
|
|
3080
|
-
q(s, mt,
|
|
3079
|
+
output: { set value(I) {
|
|
3080
|
+
q(s, mt, I, "f");
|
|
3081
3081
|
} }.value,
|
|
3082
|
-
exitError: { set value(
|
|
3083
|
-
q(i, Ut,
|
|
3082
|
+
exitError: { set value(I) {
|
|
3083
|
+
q(i, Ut, I, "f");
|
|
3084
3084
|
} }.value,
|
|
3085
|
-
hasOutput: { set value(
|
|
3086
|
-
q(r, wt,
|
|
3085
|
+
hasOutput: { set value(I) {
|
|
3086
|
+
q(r, wt, I, "f");
|
|
3087
3087
|
} }.value,
|
|
3088
3088
|
parsed: this.parsed,
|
|
3089
|
-
strict: { set value(
|
|
3090
|
-
q(a, Yt,
|
|
3089
|
+
strict: { set value(I) {
|
|
3090
|
+
q(a, Yt, I, "f");
|
|
3091
3091
|
} }.value,
|
|
3092
|
-
strictCommands: { set value(
|
|
3093
|
-
q(c, Kt,
|
|
3092
|
+
strictCommands: { set value(I) {
|
|
3093
|
+
q(c, Kt, I, "f");
|
|
3094
3094
|
} }.value,
|
|
3095
|
-
strictOptions: { set value(
|
|
3096
|
-
q(y, kt,
|
|
3095
|
+
strictOptions: { set value(I) {
|
|
3096
|
+
q(y, kt, I, "f");
|
|
3097
3097
|
} }.value,
|
|
3098
|
-
completionCommand: { set value(
|
|
3099
|
-
q(p, bt,
|
|
3098
|
+
completionCommand: { set value(I) {
|
|
3099
|
+
q(p, bt, I, "f");
|
|
3100
3100
|
} }.value,
|
|
3101
|
-
parseFn: { set value(
|
|
3102
|
-
q(l, Ot,
|
|
3101
|
+
parseFn: { set value(I) {
|
|
3102
|
+
q(l, Ot, I, "f");
|
|
3103
3103
|
} }.value,
|
|
3104
|
-
parseContext: { set value(
|
|
3105
|
-
q(h, zt,
|
|
3104
|
+
parseContext: { set value(I) {
|
|
3105
|
+
q(h, zt, I, "f");
|
|
3106
3106
|
} }.value
|
|
3107
|
-
} =
|
|
3107
|
+
} = b, g(this, G, "f").configObjects = E, g(this, J, "f").unfreeze(), g(this, lt, "f").unfreeze(), g(this, ft, "f").unfreeze(), g(this, It, "f").unfreeze();
|
|
3108
3108
|
}
|
|
3109
3109
|
[Pi](t, e) {
|
|
3110
3110
|
return me(e, (n) => (t(n), n));
|
|
@@ -3154,7 +3154,7 @@ class vo {
|
|
|
3154
3154
|
return !!g(this, Ot, "f");
|
|
3155
3155
|
}
|
|
3156
3156
|
[Bi]() {
|
|
3157
|
-
return g(this,
|
|
3157
|
+
return g(this, _e, "f");
|
|
3158
3158
|
}
|
|
3159
3159
|
[Jt](t, e, n, s) {
|
|
3160
3160
|
return n || pt(t) || (e || (t = this[Di](t)), (this[Qt]()["parse-positional-numbers"] || this[Qt]()["parse-positional-numbers"] === void 0) && (t = this[Ni](t)), s && (t = de(t, this, g(this, It, "f").getMiddleware(), !1))), t;
|
|
@@ -3197,7 +3197,7 @@ class vo {
|
|
|
3197
3197
|
e[r] = (g(this, G, "f")[r] || []).filter((a) => !n[a]);
|
|
3198
3198
|
}), i.forEach((r) => {
|
|
3199
3199
|
e[r] = ye(g(this, G, "f")[r], (a) => !n[a]);
|
|
3200
|
-
}), e.envPrefix = g(this, G, "f").envPrefix, q(this, G, e, "f"), q(this, J, g(this, J, "f") ? g(this, J, "f").reset(n) : mo(this, g(this, Q, "f")), "f"), q(this, lt, g(this, lt, "f") ? g(this, lt, "f").reset(n) :
|
|
3200
|
+
}), e.envPrefix = g(this, G, "f").envPrefix, q(this, G, e, "f"), q(this, J, g(this, J, "f") ? g(this, J, "f").reset(n) : mo(this, g(this, Q, "f")), "f"), q(this, lt, g(this, lt, "f") ? g(this, lt, "f").reset(n) : Co(this, g(this, J, "f"), g(this, Q, "f")), "f"), q(this, ft, g(this, ft, "f") ? g(this, ft, "f").reset() : uo(g(this, J, "f"), g(this, lt, "f"), g(this, It, "f"), g(this, Q, "f")), "f"), g(this, _t, "f") || q(this, _t, Oo(this, g(this, J, "f"), g(this, ft, "f"), g(this, Q, "f")), "f"), g(this, It, "f").reset(), q(this, bt, null, "f"), q(this, mt, "", "f"), q(this, Ut, null, "f"), q(this, wt, !1, "f"), this.parsed = !1, this;
|
|
3201
3201
|
}
|
|
3202
3202
|
[Xi](t, e) {
|
|
3203
3203
|
return g(this, Q, "f").path.relative(t, e);
|
|
@@ -3212,38 +3212,38 @@ class vo {
|
|
|
3212
3212
|
})), p = Object.assign(y.argv, g(this, zt, "f"));
|
|
3213
3213
|
let l;
|
|
3214
3214
|
const h = y.aliases;
|
|
3215
|
-
let
|
|
3216
|
-
Object.keys(p).forEach((
|
|
3217
|
-
|
|
3215
|
+
let b = !1, E = !1;
|
|
3216
|
+
Object.keys(p).forEach((I) => {
|
|
3217
|
+
I === g(this, Tt, "f") && p[I] ? b = !0 : I === g(this, St, "f") && p[I] && (E = !0);
|
|
3218
3218
|
}), p.$0 = this.$0, this.parsed = y, s === 0 && g(this, J, "f").clearCachedHelpMessage();
|
|
3219
3219
|
try {
|
|
3220
3220
|
if (this[qe](), e)
|
|
3221
3221
|
return this[Jt](p, a, !!n, !1);
|
|
3222
|
-
g(this, Tt, "f") && [g(this, Tt, "f")].concat(h[g(this, Tt, "f")] || []).filter((d) => d.length > 1).includes("" + p._[p._.length - 1]) && (p._.pop(),
|
|
3223
|
-
const
|
|
3222
|
+
g(this, Tt, "f") && [g(this, Tt, "f")].concat(h[g(this, Tt, "f")] || []).filter((d) => d.length > 1).includes("" + p._[p._.length - 1]) && (p._.pop(), b = !0), q(this, _e, !1, "f");
|
|
3223
|
+
const I = g(this, ft, "f").getCommands(), O = g(this, _t, "f").completionKey in p, P = b || O || i;
|
|
3224
3224
|
if (p._.length) {
|
|
3225
|
-
if (
|
|
3226
|
-
let
|
|
3225
|
+
if (I.length) {
|
|
3226
|
+
let C;
|
|
3227
3227
|
for (let d = s || 0, _; p._[d] !== void 0; d++)
|
|
3228
|
-
if (_ = String(p._[d]),
|
|
3229
|
-
const x = g(this, ft, "f").runCommand(_, this, y, d + 1, i,
|
|
3228
|
+
if (_ = String(p._[d]), I.includes(_) && _ !== g(this, bt, "f")) {
|
|
3229
|
+
const x = g(this, ft, "f").runCommand(_, this, y, d + 1, i, b || E || i);
|
|
3230
3230
|
return this[Jt](x, a, !!n, !1);
|
|
3231
|
-
} else if (!
|
|
3232
|
-
|
|
3231
|
+
} else if (!C && _ !== g(this, bt, "f")) {
|
|
3232
|
+
C = _;
|
|
3233
3233
|
break;
|
|
3234
3234
|
}
|
|
3235
|
-
!g(this, ft, "f").hasDefaultCommand() && g(this, Te, "f") &&
|
|
3235
|
+
!g(this, ft, "f").hasDefaultCommand() && g(this, Te, "f") && C && !P && g(this, lt, "f").recommendCommands(C, I);
|
|
3236
3236
|
}
|
|
3237
|
-
g(this, bt, "f") && p._.includes(g(this, bt, "f")) && !O && (g(this,
|
|
3237
|
+
g(this, bt, "f") && p._.includes(g(this, bt, "f")) && !O && (g(this, Ct, "f") && fe(!0), this.showCompletionScript(), this.exit(0));
|
|
3238
3238
|
}
|
|
3239
3239
|
if (g(this, ft, "f").hasDefaultCommand() && !P) {
|
|
3240
|
-
const
|
|
3241
|
-
return this[Jt](
|
|
3240
|
+
const C = g(this, ft, "f").runCommand(null, this, y, 0, i, b || E || i);
|
|
3241
|
+
return this[Jt](C, a, !!n, !1);
|
|
3242
3242
|
}
|
|
3243
3243
|
if (O) {
|
|
3244
|
-
g(this,
|
|
3245
|
-
const
|
|
3246
|
-
return g(this,
|
|
3244
|
+
g(this, Ct, "f") && fe(!0), t = [].concat(t);
|
|
3245
|
+
const C = t.slice(t.indexOf(`--${g(this, _t, "f").completionKey}`) + 1);
|
|
3246
|
+
return g(this, _t, "f").getCompletion(C, (d, _) => {
|
|
3247
3247
|
if (d)
|
|
3248
3248
|
throw new ht(d.message);
|
|
3249
3249
|
(_ || []).forEach((x) => {
|
|
@@ -3251,19 +3251,19 @@ class vo {
|
|
|
3251
3251
|
}), this.exit(0);
|
|
3252
3252
|
}), this[Jt](p, !a, !!n, !1);
|
|
3253
3253
|
}
|
|
3254
|
-
if (g(this, wt, "f") || (
|
|
3254
|
+
if (g(this, wt, "f") || (b ? (g(this, Ct, "f") && fe(!0), r = !0, this.showHelp("log"), this.exit(0)) : E && (g(this, Ct, "f") && fe(!0), r = !0, g(this, J, "f").showVersion("log"), this.exit(0))), !r && g(this, G, "f").skipValidation.length > 0 && (r = Object.keys(p).some((C) => g(this, G, "f").skipValidation.indexOf(C) >= 0 && p[C] === !0)), !r) {
|
|
3255
3255
|
if (y.error)
|
|
3256
3256
|
throw new ht(y.error.message);
|
|
3257
3257
|
if (!O) {
|
|
3258
|
-
const
|
|
3259
|
-
n || (l = de(p, this, g(this, It, "f").getMiddleware(), !0)), l = this[Pi](
|
|
3258
|
+
const C = this[Qe](h, {}, y.error);
|
|
3259
|
+
n || (l = de(p, this, g(this, It, "f").getMiddleware(), !0)), l = this[Pi](C, l ?? p), pt(l) && !n && (l = l.then(() => de(p, this, g(this, It, "f").getMiddleware(), !1)));
|
|
3260
3260
|
}
|
|
3261
3261
|
}
|
|
3262
|
-
} catch (
|
|
3263
|
-
if (
|
|
3264
|
-
g(this, J, "f").fail(
|
|
3262
|
+
} catch (I) {
|
|
3263
|
+
if (I instanceof ht)
|
|
3264
|
+
g(this, J, "f").fail(I.message, I);
|
|
3265
3265
|
else
|
|
3266
|
-
throw
|
|
3266
|
+
throw I;
|
|
3267
3267
|
}
|
|
3268
3268
|
return this[Jt](l ?? p, a, !!n, !0);
|
|
3269
3269
|
}
|
|
@@ -3371,12 +3371,12 @@ function Xt() {
|
|
|
3371
3371
|
return Wi || (Wi = 1, function() {
|
|
3372
3372
|
var o, t, e, n, s, i, r, a = [].slice, c = {}.hasOwnProperty;
|
|
3373
3373
|
o = function() {
|
|
3374
|
-
var y, p, l, h,
|
|
3375
|
-
if (E = arguments[0],
|
|
3374
|
+
var y, p, l, h, b, E;
|
|
3375
|
+
if (E = arguments[0], b = 2 <= arguments.length ? a.call(arguments, 1) : [], s(Object.assign))
|
|
3376
3376
|
Object.assign.apply(null, arguments);
|
|
3377
3377
|
else
|
|
3378
|
-
for (y = 0, l =
|
|
3379
|
-
if (h =
|
|
3378
|
+
for (y = 0, l = b.length; y < l; y++)
|
|
3379
|
+
if (h = b[y], h != null)
|
|
3380
3380
|
for (p in h)
|
|
3381
3381
|
c.call(h, p) && (E[p] = h[p]);
|
|
3382
3382
|
return E;
|
|
@@ -3610,21 +3610,21 @@ function zn() {
|
|
|
3610
3610
|
var o, t, e, n, s, i, r, a, c = function(p, l) {
|
|
3611
3611
|
for (var h in l)
|
|
3612
3612
|
y.call(l, h) && (p[h] = l[h]);
|
|
3613
|
-
function
|
|
3613
|
+
function b() {
|
|
3614
3614
|
this.constructor = p;
|
|
3615
3615
|
}
|
|
3616
|
-
return
|
|
3616
|
+
return b.prototype = l.prototype, p.prototype = new b(), p.__super__ = l.prototype, p;
|
|
3617
3617
|
}, y = {}.hasOwnProperty;
|
|
3618
3618
|
a = Xt(), r = a.isObject, i = a.isFunction, s = a.getValue, n = vt(), o = dt(), t = Gr(), e = Hn(), an.exports = function(p) {
|
|
3619
3619
|
c(l, p);
|
|
3620
|
-
function l(h,
|
|
3621
|
-
var
|
|
3622
|
-
if (l.__super__.constructor.call(this, h),
|
|
3620
|
+
function l(h, b, E) {
|
|
3621
|
+
var I, O, P, C;
|
|
3622
|
+
if (l.__super__.constructor.call(this, h), b == null)
|
|
3623
3623
|
throw new Error("Missing element name. " + this.debugInfo());
|
|
3624
|
-
if (this.name = this.stringify.name(
|
|
3625
|
-
for (
|
|
3626
|
-
if (
|
|
3627
|
-
|
|
3624
|
+
if (this.name = this.stringify.name(b), this.type = o.Element, this.attribs = {}, this.schemaTypeInfo = null, E != null && this.attribute(E), h.type === o.Document && (this.isRoot = !0, this.documentObject = h, h.rootObject = this, h.children)) {
|
|
3625
|
+
for (C = h.children, O = 0, P = C.length; O < P; O++)
|
|
3626
|
+
if (I = C[O], I.type === o.DocType) {
|
|
3627
|
+
I.name = this.name;
|
|
3628
3628
|
break;
|
|
3629
3629
|
}
|
|
3630
3630
|
}
|
|
@@ -3662,41 +3662,41 @@ function zn() {
|
|
|
3662
3662
|
return (!this.attributeMap || !this.attributeMap.nodes) && (this.attributeMap = new e(this.attribs)), this.attributeMap;
|
|
3663
3663
|
}
|
|
3664
3664
|
}), l.prototype.clone = function() {
|
|
3665
|
-
var h,
|
|
3666
|
-
E = Object.create(this), E.isRoot && (E.documentObject = null), E.attribs = {},
|
|
3667
|
-
for (
|
|
3668
|
-
y.call(
|
|
3665
|
+
var h, b, E, I;
|
|
3666
|
+
E = Object.create(this), E.isRoot && (E.documentObject = null), E.attribs = {}, I = this.attribs;
|
|
3667
|
+
for (b in I)
|
|
3668
|
+
y.call(I, b) && (h = I[b], E.attribs[b] = h.clone());
|
|
3669
3669
|
return E.children = [], this.children.forEach(function(O) {
|
|
3670
3670
|
var P;
|
|
3671
3671
|
return P = O.clone(), P.parent = E, E.children.push(P);
|
|
3672
3672
|
}), E;
|
|
3673
|
-
}, l.prototype.attribute = function(h,
|
|
3674
|
-
var E,
|
|
3673
|
+
}, l.prototype.attribute = function(h, b) {
|
|
3674
|
+
var E, I;
|
|
3675
3675
|
if (h != null && (h = s(h)), r(h))
|
|
3676
3676
|
for (E in h)
|
|
3677
|
-
y.call(h, E) && (
|
|
3677
|
+
y.call(h, E) && (I = h[E], this.attribute(E, I));
|
|
3678
3678
|
else
|
|
3679
|
-
i(
|
|
3679
|
+
i(b) && (b = b.apply()), this.options.keepNullAttributes && b == null ? this.attribs[h] = new t(this, h, "") : b != null && (this.attribs[h] = new t(this, h, b));
|
|
3680
3680
|
return this;
|
|
3681
3681
|
}, l.prototype.removeAttribute = function(h) {
|
|
3682
|
-
var
|
|
3682
|
+
var b, E, I;
|
|
3683
3683
|
if (h == null)
|
|
3684
3684
|
throw new Error("Missing attribute name. " + this.debugInfo());
|
|
3685
3685
|
if (h = s(h), Array.isArray(h))
|
|
3686
|
-
for (E = 0,
|
|
3687
|
-
|
|
3686
|
+
for (E = 0, I = h.length; E < I; E++)
|
|
3687
|
+
b = h[E], delete this.attribs[b];
|
|
3688
3688
|
else
|
|
3689
3689
|
delete this.attribs[h];
|
|
3690
3690
|
return this;
|
|
3691
3691
|
}, l.prototype.toString = function(h) {
|
|
3692
3692
|
return this.options.writer.element(this, this.options.writer.filterOptions(h));
|
|
3693
|
-
}, l.prototype.att = function(h,
|
|
3694
|
-
return this.attribute(h,
|
|
3695
|
-
}, l.prototype.a = function(h,
|
|
3696
|
-
return this.attribute(h,
|
|
3693
|
+
}, l.prototype.att = function(h, b) {
|
|
3694
|
+
return this.attribute(h, b);
|
|
3695
|
+
}, l.prototype.a = function(h, b) {
|
|
3696
|
+
return this.attribute(h, b);
|
|
3697
3697
|
}, l.prototype.getAttribute = function(h) {
|
|
3698
3698
|
return this.attribs.hasOwnProperty(h) ? this.attribs[h].value : null;
|
|
3699
|
-
}, l.prototype.setAttribute = function(h,
|
|
3699
|
+
}, l.prototype.setAttribute = function(h, b) {
|
|
3700
3700
|
throw new Error("This DOM method is not implemented." + this.debugInfo());
|
|
3701
3701
|
}, l.prototype.getAttributeNode = function(h) {
|
|
3702
3702
|
return this.attribs.hasOwnProperty(h) ? this.attribs[h] : null;
|
|
@@ -3706,40 +3706,40 @@ function zn() {
|
|
|
3706
3706
|
throw new Error("This DOM method is not implemented." + this.debugInfo());
|
|
3707
3707
|
}, l.prototype.getElementsByTagName = function(h) {
|
|
3708
3708
|
throw new Error("This DOM method is not implemented." + this.debugInfo());
|
|
3709
|
-
}, l.prototype.getAttributeNS = function(h,
|
|
3709
|
+
}, l.prototype.getAttributeNS = function(h, b) {
|
|
3710
3710
|
throw new Error("This DOM method is not implemented." + this.debugInfo());
|
|
3711
|
-
}, l.prototype.setAttributeNS = function(h,
|
|
3711
|
+
}, l.prototype.setAttributeNS = function(h, b, E) {
|
|
3712
3712
|
throw new Error("This DOM method is not implemented." + this.debugInfo());
|
|
3713
|
-
}, l.prototype.removeAttributeNS = function(h,
|
|
3713
|
+
}, l.prototype.removeAttributeNS = function(h, b) {
|
|
3714
3714
|
throw new Error("This DOM method is not implemented." + this.debugInfo());
|
|
3715
|
-
}, l.prototype.getAttributeNodeNS = function(h,
|
|
3715
|
+
}, l.prototype.getAttributeNodeNS = function(h, b) {
|
|
3716
3716
|
throw new Error("This DOM method is not implemented." + this.debugInfo());
|
|
3717
3717
|
}, l.prototype.setAttributeNodeNS = function(h) {
|
|
3718
3718
|
throw new Error("This DOM method is not implemented." + this.debugInfo());
|
|
3719
|
-
}, l.prototype.getElementsByTagNameNS = function(h,
|
|
3719
|
+
}, l.prototype.getElementsByTagNameNS = function(h, b) {
|
|
3720
3720
|
throw new Error("This DOM method is not implemented." + this.debugInfo());
|
|
3721
3721
|
}, l.prototype.hasAttribute = function(h) {
|
|
3722
3722
|
return this.attribs.hasOwnProperty(h);
|
|
3723
|
-
}, l.prototype.hasAttributeNS = function(h,
|
|
3723
|
+
}, l.prototype.hasAttributeNS = function(h, b) {
|
|
3724
3724
|
throw new Error("This DOM method is not implemented." + this.debugInfo());
|
|
3725
|
-
}, l.prototype.setIdAttribute = function(h,
|
|
3726
|
-
return this.attribs.hasOwnProperty(h) ? this.attribs[h].isId :
|
|
3727
|
-
}, l.prototype.setIdAttributeNS = function(h,
|
|
3725
|
+
}, l.prototype.setIdAttribute = function(h, b) {
|
|
3726
|
+
return this.attribs.hasOwnProperty(h) ? this.attribs[h].isId : b;
|
|
3727
|
+
}, l.prototype.setIdAttributeNS = function(h, b, E) {
|
|
3728
3728
|
throw new Error("This DOM method is not implemented." + this.debugInfo());
|
|
3729
|
-
}, l.prototype.setIdAttributeNode = function(h,
|
|
3729
|
+
}, l.prototype.setIdAttributeNode = function(h, b) {
|
|
3730
3730
|
throw new Error("This DOM method is not implemented." + this.debugInfo());
|
|
3731
3731
|
}, l.prototype.getElementsByTagName = function(h) {
|
|
3732
3732
|
throw new Error("This DOM method is not implemented." + this.debugInfo());
|
|
3733
|
-
}, l.prototype.getElementsByTagNameNS = function(h,
|
|
3733
|
+
}, l.prototype.getElementsByTagNameNS = function(h, b) {
|
|
3734
3734
|
throw new Error("This DOM method is not implemented." + this.debugInfo());
|
|
3735
3735
|
}, l.prototype.getElementsByClassName = function(h) {
|
|
3736
3736
|
throw new Error("This DOM method is not implemented." + this.debugInfo());
|
|
3737
3737
|
}, l.prototype.isEqualNode = function(h) {
|
|
3738
|
-
var
|
|
3738
|
+
var b, E, I;
|
|
3739
3739
|
if (!l.__super__.isEqualNode.apply(this, arguments).isEqualNode(h) || h.namespaceURI !== this.namespaceURI || h.prefix !== this.prefix || h.localName !== this.localName || h.attribs.length !== this.attribs.length)
|
|
3740
3740
|
return !1;
|
|
3741
|
-
for (
|
|
3742
|
-
if (!this.attribs[
|
|
3741
|
+
for (b = E = 0, I = this.attribs.length - 1; 0 <= I ? E <= I : E >= I; b = 0 <= I ? ++E : --E)
|
|
3742
|
+
if (!this.attribs[b].isEqualNode(h.attribs[b]))
|
|
3743
3743
|
return !1;
|
|
3744
3744
|
return !0;
|
|
3745
3745
|
}, l;
|
|
@@ -4030,37 +4030,37 @@ function ti() {
|
|
|
4030
4030
|
var o, t, e, n, s, i, r, a, c = function(p, l) {
|
|
4031
4031
|
for (var h in l)
|
|
4032
4032
|
y.call(l, h) && (p[h] = l[h]);
|
|
4033
|
-
function
|
|
4033
|
+
function b() {
|
|
4034
4034
|
this.constructor = p;
|
|
4035
4035
|
}
|
|
4036
|
-
return
|
|
4036
|
+
return b.prototype = l.prototype, p.prototype = new b(), p.__super__ = l.prototype, p;
|
|
4037
4037
|
}, y = {}.hasOwnProperty;
|
|
4038
4038
|
a = Xt().isObject, r = vt(), o = dt(), t = kn(), n = Qn(), e = Jn(), s = Zn(), i = Hn(), mn.exports = function(p) {
|
|
4039
4039
|
c(l, p);
|
|
4040
|
-
function l(h,
|
|
4041
|
-
var
|
|
4040
|
+
function l(h, b, E) {
|
|
4041
|
+
var I, O, P, C, d, _;
|
|
4042
4042
|
if (l.__super__.constructor.call(this, h), this.type = o.DocType, h.children) {
|
|
4043
|
-
for (
|
|
4044
|
-
if (
|
|
4045
|
-
this.name =
|
|
4043
|
+
for (C = h.children, O = 0, P = C.length; O < P; O++)
|
|
4044
|
+
if (I = C[O], I.type === o.Element) {
|
|
4045
|
+
this.name = I.name;
|
|
4046
4046
|
break;
|
|
4047
4047
|
}
|
|
4048
4048
|
}
|
|
4049
|
-
this.documentObject = h, a(
|
|
4049
|
+
this.documentObject = h, a(b) && (d = b, b = d.pubID, E = d.sysID), E == null && (_ = [b, E], E = _[0], b = _[1]), b != null && (this.pubID = this.stringify.dtdPubID(b)), E != null && (this.sysID = this.stringify.dtdSysID(E));
|
|
4050
4050
|
}
|
|
4051
4051
|
return Object.defineProperty(l.prototype, "entities", {
|
|
4052
4052
|
get: function() {
|
|
4053
|
-
var h,
|
|
4054
|
-
for (
|
|
4055
|
-
h = O[
|
|
4056
|
-
return new i(
|
|
4053
|
+
var h, b, E, I, O;
|
|
4054
|
+
for (I = {}, O = this.children, b = 0, E = O.length; b < E; b++)
|
|
4055
|
+
h = O[b], h.type === o.EntityDeclaration && !h.pe && (I[h.name] = h);
|
|
4056
|
+
return new i(I);
|
|
4057
4057
|
}
|
|
4058
4058
|
}), Object.defineProperty(l.prototype, "notations", {
|
|
4059
4059
|
get: function() {
|
|
4060
|
-
var h,
|
|
4061
|
-
for (
|
|
4062
|
-
h = O[
|
|
4063
|
-
return new i(
|
|
4060
|
+
var h, b, E, I, O;
|
|
4061
|
+
for (I = {}, O = this.children, b = 0, E = O.length; b < E; b++)
|
|
4062
|
+
h = O[b], h.type === o.NotationDeclaration && (I[h.name] = h);
|
|
4063
|
+
return new i(I);
|
|
4064
4064
|
}
|
|
4065
4065
|
}), Object.defineProperty(l.prototype, "publicId", {
|
|
4066
4066
|
get: function() {
|
|
@@ -4074,33 +4074,33 @@ function ti() {
|
|
|
4074
4074
|
get: function() {
|
|
4075
4075
|
throw new Error("This DOM method is not implemented." + this.debugInfo());
|
|
4076
4076
|
}
|
|
4077
|
-
}), l.prototype.element = function(h,
|
|
4077
|
+
}), l.prototype.element = function(h, b) {
|
|
4078
4078
|
var E;
|
|
4079
|
-
return E = new e(this, h,
|
|
4080
|
-
}, l.prototype.attList = function(h,
|
|
4079
|
+
return E = new e(this, h, b), this.children.push(E), this;
|
|
4080
|
+
}, l.prototype.attList = function(h, b, E, I, O) {
|
|
4081
4081
|
var P;
|
|
4082
|
-
return P = new t(this, h,
|
|
4083
|
-
}, l.prototype.entity = function(h,
|
|
4082
|
+
return P = new t(this, h, b, E, I, O), this.children.push(P), this;
|
|
4083
|
+
}, l.prototype.entity = function(h, b) {
|
|
4084
4084
|
var E;
|
|
4085
|
-
return E = new n(this, !1, h,
|
|
4086
|
-
}, l.prototype.pEntity = function(h,
|
|
4085
|
+
return E = new n(this, !1, h, b), this.children.push(E), this;
|
|
4086
|
+
}, l.prototype.pEntity = function(h, b) {
|
|
4087
4087
|
var E;
|
|
4088
|
-
return E = new n(this, !0, h,
|
|
4089
|
-
}, l.prototype.notation = function(h,
|
|
4088
|
+
return E = new n(this, !0, h, b), this.children.push(E), this;
|
|
4089
|
+
}, l.prototype.notation = function(h, b) {
|
|
4090
4090
|
var E;
|
|
4091
|
-
return E = new s(this, h,
|
|
4091
|
+
return E = new s(this, h, b), this.children.push(E), this;
|
|
4092
4092
|
}, l.prototype.toString = function(h) {
|
|
4093
4093
|
return this.options.writer.docType(this, this.options.writer.filterOptions(h));
|
|
4094
|
-
}, l.prototype.ele = function(h,
|
|
4095
|
-
return this.element(h,
|
|
4096
|
-
}, l.prototype.att = function(h,
|
|
4097
|
-
return this.attList(h,
|
|
4098
|
-
}, l.prototype.ent = function(h,
|
|
4099
|
-
return this.entity(h,
|
|
4100
|
-
}, l.prototype.pent = function(h,
|
|
4101
|
-
return this.pEntity(h,
|
|
4102
|
-
}, l.prototype.not = function(h,
|
|
4103
|
-
return this.notation(h,
|
|
4094
|
+
}, l.prototype.ele = function(h, b) {
|
|
4095
|
+
return this.element(h, b);
|
|
4096
|
+
}, l.prototype.att = function(h, b, E, I, O) {
|
|
4097
|
+
return this.attList(h, b, E, I, O);
|
|
4098
|
+
}, l.prototype.ent = function(h, b) {
|
|
4099
|
+
return this.entity(h, b);
|
|
4100
|
+
}, l.prototype.pent = function(h, b) {
|
|
4101
|
+
return this.pEntity(h, b);
|
|
4102
|
+
}, l.prototype.not = function(h, b) {
|
|
4103
|
+
return this.notation(h, b);
|
|
4104
4104
|
}, l.prototype.up = function() {
|
|
4105
4105
|
return this.root() || this.documentObject;
|
|
4106
4106
|
}, l.prototype.isEqualNode = function(h) {
|
|
@@ -4206,7 +4206,7 @@ function ii() {
|
|
|
4206
4206
|
}(t);
|
|
4207
4207
|
}.call(Z)), Dn.exports;
|
|
4208
4208
|
}
|
|
4209
|
-
var
|
|
4209
|
+
var _n = { exports: {} }, ur;
|
|
4210
4210
|
function Yr() {
|
|
4211
4211
|
return ur || (ur = 1, function() {
|
|
4212
4212
|
var o, t, e = function(s, i) {
|
|
@@ -4217,7 +4217,7 @@ function Yr() {
|
|
|
4217
4217
|
}
|
|
4218
4218
|
return a.prototype = i.prototype, s.prototype = new a(), s.__super__ = i.prototype, s;
|
|
4219
4219
|
}, n = {}.hasOwnProperty;
|
|
4220
|
-
t = vt(), o = dt(),
|
|
4220
|
+
t = vt(), o = dt(), _n.exports = function(s) {
|
|
4221
4221
|
e(i, s);
|
|
4222
4222
|
function i(r) {
|
|
4223
4223
|
i.__super__.constructor.call(this, r), this.type = o.Dummy;
|
|
@@ -4228,12 +4228,12 @@ function Yr() {
|
|
|
4228
4228
|
return "";
|
|
4229
4229
|
}, i;
|
|
4230
4230
|
}(t);
|
|
4231
|
-
}.call(Z)),
|
|
4231
|
+
}.call(Z)), _n.exports;
|
|
4232
4232
|
}
|
|
4233
|
-
var
|
|
4233
|
+
var Cn = { exports: {} }, lr;
|
|
4234
4234
|
function So() {
|
|
4235
4235
|
return lr || (lr = 1, function() {
|
|
4236
|
-
|
|
4236
|
+
Cn.exports = function() {
|
|
4237
4237
|
function o(t) {
|
|
4238
4238
|
this.nodes = t;
|
|
4239
4239
|
}
|
|
@@ -4247,7 +4247,7 @@ function So() {
|
|
|
4247
4247
|
return this.nodes[t] || null;
|
|
4248
4248
|
}, o;
|
|
4249
4249
|
}();
|
|
4250
|
-
}.call(Z)),
|
|
4250
|
+
}.call(Z)), Cn.exports;
|
|
4251
4251
|
}
|
|
4252
4252
|
var In = { exports: {} }, fr;
|
|
4253
4253
|
function jo() {
|
|
@@ -4265,54 +4265,54 @@ function jo() {
|
|
|
4265
4265
|
var hr;
|
|
4266
4266
|
function vt() {
|
|
4267
4267
|
return hr || (hr = 1, function() {
|
|
4268
|
-
var o, t, e, n, s, i, r, a, c, y, p, l, h,
|
|
4269
|
-
O = Xt(),
|
|
4270
|
-
function
|
|
4268
|
+
var o, t, e, n, s, i, r, a, c, y, p, l, h, b, E, I, O, P = {}.hasOwnProperty;
|
|
4269
|
+
O = Xt(), I = O.isObject, E = O.isFunction, b = O.isEmpty, h = O.getValue, a = null, e = null, n = null, s = null, i = null, p = null, l = null, y = null, r = null, t = null, c = null, o = null, on.exports = function() {
|
|
4270
|
+
function C(d) {
|
|
4271
4271
|
this.parent = d, this.parent && (this.options = this.parent.options, this.stringify = this.parent.stringify), this.value = null, this.children = [], this.baseURI = null, a || (a = zn(), e = Gn(), n = Yn(), s = Kn(), i = ti(), p = ei(), l = ni(), y = ii(), r = Yr(), t = dt(), c = So(), Hn(), o = jo());
|
|
4272
4272
|
}
|
|
4273
|
-
return Object.defineProperty(
|
|
4273
|
+
return Object.defineProperty(C.prototype, "nodeName", {
|
|
4274
4274
|
get: function() {
|
|
4275
4275
|
return this.name;
|
|
4276
4276
|
}
|
|
4277
|
-
}), Object.defineProperty(
|
|
4277
|
+
}), Object.defineProperty(C.prototype, "nodeType", {
|
|
4278
4278
|
get: function() {
|
|
4279
4279
|
return this.type;
|
|
4280
4280
|
}
|
|
4281
|
-
}), Object.defineProperty(
|
|
4281
|
+
}), Object.defineProperty(C.prototype, "nodeValue", {
|
|
4282
4282
|
get: function() {
|
|
4283
4283
|
return this.value;
|
|
4284
4284
|
}
|
|
4285
|
-
}), Object.defineProperty(
|
|
4285
|
+
}), Object.defineProperty(C.prototype, "parentNode", {
|
|
4286
4286
|
get: function() {
|
|
4287
4287
|
return this.parent;
|
|
4288
4288
|
}
|
|
4289
|
-
}), Object.defineProperty(
|
|
4289
|
+
}), Object.defineProperty(C.prototype, "childNodes", {
|
|
4290
4290
|
get: function() {
|
|
4291
4291
|
return (!this.childNodeList || !this.childNodeList.nodes) && (this.childNodeList = new c(this.children)), this.childNodeList;
|
|
4292
4292
|
}
|
|
4293
|
-
}), Object.defineProperty(
|
|
4293
|
+
}), Object.defineProperty(C.prototype, "firstChild", {
|
|
4294
4294
|
get: function() {
|
|
4295
4295
|
return this.children[0] || null;
|
|
4296
4296
|
}
|
|
4297
|
-
}), Object.defineProperty(
|
|
4297
|
+
}), Object.defineProperty(C.prototype, "lastChild", {
|
|
4298
4298
|
get: function() {
|
|
4299
4299
|
return this.children[this.children.length - 1] || null;
|
|
4300
4300
|
}
|
|
4301
|
-
}), Object.defineProperty(
|
|
4301
|
+
}), Object.defineProperty(C.prototype, "previousSibling", {
|
|
4302
4302
|
get: function() {
|
|
4303
4303
|
var d;
|
|
4304
4304
|
return d = this.parent.children.indexOf(this), this.parent.children[d - 1] || null;
|
|
4305
4305
|
}
|
|
4306
|
-
}), Object.defineProperty(
|
|
4306
|
+
}), Object.defineProperty(C.prototype, "nextSibling", {
|
|
4307
4307
|
get: function() {
|
|
4308
4308
|
var d;
|
|
4309
4309
|
return d = this.parent.children.indexOf(this), this.parent.children[d + 1] || null;
|
|
4310
4310
|
}
|
|
4311
|
-
}), Object.defineProperty(
|
|
4311
|
+
}), Object.defineProperty(C.prototype, "ownerDocument", {
|
|
4312
4312
|
get: function() {
|
|
4313
4313
|
return this.document() || null;
|
|
4314
4314
|
}
|
|
4315
|
-
}), Object.defineProperty(
|
|
4315
|
+
}), Object.defineProperty(C.prototype, "textContent", {
|
|
4316
4316
|
get: function() {
|
|
4317
4317
|
var d, _, x, j, B;
|
|
4318
4318
|
if (this.nodeType === t.Element || this.nodeType === t.DocumentFragment) {
|
|
@@ -4325,112 +4325,112 @@ function vt() {
|
|
|
4325
4325
|
set: function(d) {
|
|
4326
4326
|
throw new Error("This DOM method is not implemented." + this.debugInfo());
|
|
4327
4327
|
}
|
|
4328
|
-
}),
|
|
4328
|
+
}), C.prototype.setParent = function(d) {
|
|
4329
4329
|
var _, x, j, B, S;
|
|
4330
4330
|
for (this.parent = d, d && (this.options = d.options, this.stringify = d.stringify), B = this.children, S = [], x = 0, j = B.length; x < j; x++)
|
|
4331
4331
|
_ = B[x], S.push(_.setParent(this));
|
|
4332
4332
|
return S;
|
|
4333
|
-
},
|
|
4334
|
-
var j, B, S, D,
|
|
4335
|
-
if (N = null, _ === null && x == null && (U = [{}, null], _ = U[0], x = U[1]), _ == null && (_ = {}), _ = h(_),
|
|
4333
|
+
}, C.prototype.element = function(d, _, x) {
|
|
4334
|
+
var j, B, S, D, w, N, L, R, U, k, Y;
|
|
4335
|
+
if (N = null, _ === null && x == null && (U = [{}, null], _ = U[0], x = U[1]), _ == null && (_ = {}), _ = h(_), I(_) || (k = [_, x], x = k[0], _ = k[1]), d != null && (d = h(d)), Array.isArray(d))
|
|
4336
4336
|
for (S = 0, L = d.length; S < L; S++)
|
|
4337
4337
|
B = d[S], N = this.element(B);
|
|
4338
4338
|
else if (E(d))
|
|
4339
4339
|
N = this.element(d.apply());
|
|
4340
|
-
else if (
|
|
4341
|
-
for (
|
|
4342
|
-
if (P.call(d,
|
|
4343
|
-
if (Y = d[
|
|
4344
|
-
N = this.attribute(
|
|
4345
|
-
else if (!this.options.separateArrayItems && Array.isArray(Y) &&
|
|
4340
|
+
else if (I(d)) {
|
|
4341
|
+
for (w in d)
|
|
4342
|
+
if (P.call(d, w))
|
|
4343
|
+
if (Y = d[w], E(Y) && (Y = Y.apply()), !this.options.ignoreDecorators && this.stringify.convertAttKey && w.indexOf(this.stringify.convertAttKey) === 0)
|
|
4344
|
+
N = this.attribute(w.substr(this.stringify.convertAttKey.length), Y);
|
|
4345
|
+
else if (!this.options.separateArrayItems && Array.isArray(Y) && b(Y))
|
|
4346
4346
|
N = this.dummy();
|
|
4347
|
-
else if (
|
|
4348
|
-
N = this.element(
|
|
4347
|
+
else if (I(Y) && b(Y))
|
|
4348
|
+
N = this.element(w);
|
|
4349
4349
|
else if (!this.options.keepNullNodes && Y == null)
|
|
4350
4350
|
N = this.dummy();
|
|
4351
4351
|
else if (!this.options.separateArrayItems && Array.isArray(Y))
|
|
4352
4352
|
for (D = 0, R = Y.length; D < R; D++)
|
|
4353
|
-
B = Y[D], j = {}, j[
|
|
4354
|
-
else
|
|
4353
|
+
B = Y[D], j = {}, j[w] = B, N = this.element(j);
|
|
4354
|
+
else I(Y) ? !this.options.ignoreDecorators && this.stringify.convertTextKey && w.indexOf(this.stringify.convertTextKey) === 0 ? N = this.element(Y) : (N = this.element(w), N.element(Y)) : N = this.element(w, Y);
|
|
4355
4355
|
} else !this.options.keepNullNodes && x === null ? N = this.dummy() : !this.options.ignoreDecorators && this.stringify.convertTextKey && d.indexOf(this.stringify.convertTextKey) === 0 ? N = this.text(x) : !this.options.ignoreDecorators && this.stringify.convertCDataKey && d.indexOf(this.stringify.convertCDataKey) === 0 ? N = this.cdata(x) : !this.options.ignoreDecorators && this.stringify.convertCommentKey && d.indexOf(this.stringify.convertCommentKey) === 0 ? N = this.comment(x) : !this.options.ignoreDecorators && this.stringify.convertRawKey && d.indexOf(this.stringify.convertRawKey) === 0 ? N = this.raw(x) : !this.options.ignoreDecorators && this.stringify.convertPIKey && d.indexOf(this.stringify.convertPIKey) === 0 ? N = this.instruction(d.substr(this.stringify.convertPIKey.length), x) : N = this.node(d, _, x);
|
|
4356
4356
|
if (N == null)
|
|
4357
4357
|
throw new Error("Could not create any elements with: " + d + ". " + this.debugInfo());
|
|
4358
4358
|
return N;
|
|
4359
|
-
},
|
|
4360
|
-
var j, B, S, D,
|
|
4359
|
+
}, C.prototype.insertBefore = function(d, _, x) {
|
|
4360
|
+
var j, B, S, D, w;
|
|
4361
4361
|
if (d?.type)
|
|
4362
|
-
return S = d, D = _, S.setParent(this), D ? (B = children.indexOf(D),
|
|
4362
|
+
return S = d, D = _, S.setParent(this), D ? (B = children.indexOf(D), w = children.splice(B), children.push(S), Array.prototype.push.apply(children, w)) : children.push(S), S;
|
|
4363
4363
|
if (this.isRoot)
|
|
4364
4364
|
throw new Error("Cannot insert elements at root level. " + this.debugInfo(d));
|
|
4365
|
-
return B = this.parent.children.indexOf(this),
|
|
4366
|
-
},
|
|
4365
|
+
return B = this.parent.children.indexOf(this), w = this.parent.children.splice(B), j = this.parent.element(d, _, x), Array.prototype.push.apply(this.parent.children, w), j;
|
|
4366
|
+
}, C.prototype.insertAfter = function(d, _, x) {
|
|
4367
4367
|
var j, B, S;
|
|
4368
4368
|
if (this.isRoot)
|
|
4369
4369
|
throw new Error("Cannot insert elements at root level. " + this.debugInfo(d));
|
|
4370
4370
|
return B = this.parent.children.indexOf(this), S = this.parent.children.splice(B + 1), j = this.parent.element(d, _, x), Array.prototype.push.apply(this.parent.children, S), j;
|
|
4371
|
-
},
|
|
4371
|
+
}, C.prototype.remove = function() {
|
|
4372
4372
|
var d;
|
|
4373
4373
|
if (this.isRoot)
|
|
4374
4374
|
throw new Error("Cannot remove the root element. " + this.debugInfo());
|
|
4375
4375
|
return d = this.parent.children.indexOf(this), [].splice.apply(this.parent.children, [d, d - d + 1].concat([])), this.parent;
|
|
4376
|
-
},
|
|
4376
|
+
}, C.prototype.node = function(d, _, x) {
|
|
4377
4377
|
var j, B;
|
|
4378
|
-
return d != null && (d = h(d)), _ || (_ = {}), _ = h(_),
|
|
4379
|
-
},
|
|
4378
|
+
return d != null && (d = h(d)), _ || (_ = {}), _ = h(_), I(_) || (B = [_, x], x = B[0], _ = B[1]), j = new a(this, d, _), x != null && j.text(x), this.children.push(j), j;
|
|
4379
|
+
}, C.prototype.text = function(d) {
|
|
4380
4380
|
var _;
|
|
4381
|
-
return
|
|
4382
|
-
},
|
|
4381
|
+
return I(d) && this.element(d), _ = new l(this, d), this.children.push(_), this;
|
|
4382
|
+
}, C.prototype.cdata = function(d) {
|
|
4383
4383
|
var _;
|
|
4384
4384
|
return _ = new e(this, d), this.children.push(_), this;
|
|
4385
|
-
},
|
|
4385
|
+
}, C.prototype.comment = function(d) {
|
|
4386
4386
|
var _;
|
|
4387
4387
|
return _ = new n(this, d), this.children.push(_), this;
|
|
4388
|
-
},
|
|
4388
|
+
}, C.prototype.commentBefore = function(d) {
|
|
4389
4389
|
var _, x;
|
|
4390
4390
|
return _ = this.parent.children.indexOf(this), x = this.parent.children.splice(_), this.parent.comment(d), Array.prototype.push.apply(this.parent.children, x), this;
|
|
4391
|
-
},
|
|
4391
|
+
}, C.prototype.commentAfter = function(d) {
|
|
4392
4392
|
var _, x;
|
|
4393
4393
|
return _ = this.parent.children.indexOf(this), x = this.parent.children.splice(_ + 1), this.parent.comment(d), Array.prototype.push.apply(this.parent.children, x), this;
|
|
4394
|
-
},
|
|
4394
|
+
}, C.prototype.raw = function(d) {
|
|
4395
4395
|
var _;
|
|
4396
4396
|
return _ = new p(this, d), this.children.push(_), this;
|
|
4397
|
-
},
|
|
4397
|
+
}, C.prototype.dummy = function() {
|
|
4398
4398
|
var d;
|
|
4399
4399
|
return d = new r(this), d;
|
|
4400
|
-
},
|
|
4400
|
+
}, C.prototype.instruction = function(d, _) {
|
|
4401
4401
|
var x, j, B, S, D;
|
|
4402
4402
|
if (d != null && (d = h(d)), _ != null && (_ = h(_)), Array.isArray(d))
|
|
4403
4403
|
for (S = 0, D = d.length; S < D; S++)
|
|
4404
4404
|
x = d[S], this.instruction(x);
|
|
4405
|
-
else if (
|
|
4405
|
+
else if (I(d))
|
|
4406
4406
|
for (x in d)
|
|
4407
4407
|
P.call(d, x) && (j = d[x], this.instruction(x, j));
|
|
4408
4408
|
else
|
|
4409
4409
|
E(_) && (_ = _.apply()), B = new y(this, d, _), this.children.push(B);
|
|
4410
4410
|
return this;
|
|
4411
|
-
},
|
|
4411
|
+
}, C.prototype.instructionBefore = function(d, _) {
|
|
4412
4412
|
var x, j;
|
|
4413
4413
|
return x = this.parent.children.indexOf(this), j = this.parent.children.splice(x), this.parent.instruction(d, _), Array.prototype.push.apply(this.parent.children, j), this;
|
|
4414
|
-
},
|
|
4414
|
+
}, C.prototype.instructionAfter = function(d, _) {
|
|
4415
4415
|
var x, j;
|
|
4416
4416
|
return x = this.parent.children.indexOf(this), j = this.parent.children.splice(x + 1), this.parent.instruction(d, _), Array.prototype.push.apply(this.parent.children, j), this;
|
|
4417
|
-
},
|
|
4417
|
+
}, C.prototype.declaration = function(d, _, x) {
|
|
4418
4418
|
var j, B;
|
|
4419
4419
|
return j = this.document(), B = new s(j, d, _, x), j.children.length === 0 ? j.children.unshift(B) : j.children[0].type === t.Declaration ? j.children[0] = B : j.children.unshift(B), j.root() || j;
|
|
4420
|
-
},
|
|
4421
|
-
var x, j, B, S, D,
|
|
4420
|
+
}, C.prototype.dtd = function(d, _) {
|
|
4421
|
+
var x, j, B, S, D, w, N, L, R, U;
|
|
4422
4422
|
for (j = this.document(), B = new i(j, d, _), R = j.children, S = D = 0, N = R.length; D < N; S = ++D)
|
|
4423
4423
|
if (x = R[S], x.type === t.DocType)
|
|
4424
4424
|
return j.children[S] = B, B;
|
|
4425
|
-
for (U = j.children, S =
|
|
4425
|
+
for (U = j.children, S = w = 0, L = U.length; w < L; S = ++w)
|
|
4426
4426
|
if (x = U[S], x.isRoot)
|
|
4427
4427
|
return j.children.splice(S, 0, B), B;
|
|
4428
4428
|
return j.children.push(B), B;
|
|
4429
|
-
},
|
|
4429
|
+
}, C.prototype.up = function() {
|
|
4430
4430
|
if (this.isRoot)
|
|
4431
4431
|
throw new Error("The root node has no parent. Use doc() if you need to get the document object.");
|
|
4432
4432
|
return this.parent;
|
|
4433
|
-
},
|
|
4433
|
+
}, C.prototype.root = function() {
|
|
4434
4434
|
var d;
|
|
4435
4435
|
for (d = this; d; ) {
|
|
4436
4436
|
if (d.type === t.Document)
|
|
@@ -4439,93 +4439,93 @@ function vt() {
|
|
|
4439
4439
|
return d;
|
|
4440
4440
|
d = d.parent;
|
|
4441
4441
|
}
|
|
4442
|
-
},
|
|
4442
|
+
}, C.prototype.document = function() {
|
|
4443
4443
|
var d;
|
|
4444
4444
|
for (d = this; d; ) {
|
|
4445
4445
|
if (d.type === t.Document)
|
|
4446
4446
|
return d;
|
|
4447
4447
|
d = d.parent;
|
|
4448
4448
|
}
|
|
4449
|
-
},
|
|
4449
|
+
}, C.prototype.end = function(d) {
|
|
4450
4450
|
return this.document().end(d);
|
|
4451
|
-
},
|
|
4451
|
+
}, C.prototype.prev = function() {
|
|
4452
4452
|
var d;
|
|
4453
4453
|
if (d = this.parent.children.indexOf(this), d < 1)
|
|
4454
4454
|
throw new Error("Already at the first node. " + this.debugInfo());
|
|
4455
4455
|
return this.parent.children[d - 1];
|
|
4456
|
-
},
|
|
4456
|
+
}, C.prototype.next = function() {
|
|
4457
4457
|
var d;
|
|
4458
4458
|
if (d = this.parent.children.indexOf(this), d === -1 || d === this.parent.children.length - 1)
|
|
4459
4459
|
throw new Error("Already at the last node. " + this.debugInfo());
|
|
4460
4460
|
return this.parent.children[d + 1];
|
|
4461
|
-
},
|
|
4461
|
+
}, C.prototype.importDocument = function(d) {
|
|
4462
4462
|
var _;
|
|
4463
4463
|
return _ = d.root().clone(), _.parent = this, _.isRoot = !1, this.children.push(_), this;
|
|
4464
|
-
},
|
|
4464
|
+
}, C.prototype.debugInfo = function(d) {
|
|
4465
4465
|
var _, x;
|
|
4466
4466
|
return d = d || this.name, d == null && !((_ = this.parent) != null && _.name) ? "" : d == null ? "parent: <" + this.parent.name + ">" : (x = this.parent) != null && x.name ? "node: <" + d + ">, parent: <" + this.parent.name + ">" : "node: <" + d + ">";
|
|
4467
|
-
},
|
|
4467
|
+
}, C.prototype.ele = function(d, _, x) {
|
|
4468
4468
|
return this.element(d, _, x);
|
|
4469
|
-
},
|
|
4469
|
+
}, C.prototype.nod = function(d, _, x) {
|
|
4470
4470
|
return this.node(d, _, x);
|
|
4471
|
-
},
|
|
4471
|
+
}, C.prototype.txt = function(d) {
|
|
4472
4472
|
return this.text(d);
|
|
4473
|
-
},
|
|
4473
|
+
}, C.prototype.dat = function(d) {
|
|
4474
4474
|
return this.cdata(d);
|
|
4475
|
-
},
|
|
4475
|
+
}, C.prototype.com = function(d) {
|
|
4476
4476
|
return this.comment(d);
|
|
4477
|
-
},
|
|
4477
|
+
}, C.prototype.ins = function(d, _) {
|
|
4478
4478
|
return this.instruction(d, _);
|
|
4479
|
-
},
|
|
4479
|
+
}, C.prototype.doc = function() {
|
|
4480
4480
|
return this.document();
|
|
4481
|
-
},
|
|
4481
|
+
}, C.prototype.dec = function(d, _, x) {
|
|
4482
4482
|
return this.declaration(d, _, x);
|
|
4483
|
-
},
|
|
4483
|
+
}, C.prototype.e = function(d, _, x) {
|
|
4484
4484
|
return this.element(d, _, x);
|
|
4485
|
-
},
|
|
4485
|
+
}, C.prototype.n = function(d, _, x) {
|
|
4486
4486
|
return this.node(d, _, x);
|
|
4487
|
-
},
|
|
4487
|
+
}, C.prototype.t = function(d) {
|
|
4488
4488
|
return this.text(d);
|
|
4489
|
-
},
|
|
4489
|
+
}, C.prototype.d = function(d) {
|
|
4490
4490
|
return this.cdata(d);
|
|
4491
|
-
},
|
|
4491
|
+
}, C.prototype.c = function(d) {
|
|
4492
4492
|
return this.comment(d);
|
|
4493
|
-
},
|
|
4493
|
+
}, C.prototype.r = function(d) {
|
|
4494
4494
|
return this.raw(d);
|
|
4495
|
-
},
|
|
4495
|
+
}, C.prototype.i = function(d, _) {
|
|
4496
4496
|
return this.instruction(d, _);
|
|
4497
|
-
},
|
|
4497
|
+
}, C.prototype.u = function() {
|
|
4498
4498
|
return this.up();
|
|
4499
|
-
},
|
|
4499
|
+
}, C.prototype.importXMLBuilder = function(d) {
|
|
4500
4500
|
return this.importDocument(d);
|
|
4501
|
-
},
|
|
4501
|
+
}, C.prototype.replaceChild = function(d, _) {
|
|
4502
4502
|
throw new Error("This DOM method is not implemented." + this.debugInfo());
|
|
4503
|
-
},
|
|
4503
|
+
}, C.prototype.removeChild = function(d) {
|
|
4504
4504
|
throw new Error("This DOM method is not implemented." + this.debugInfo());
|
|
4505
|
-
},
|
|
4505
|
+
}, C.prototype.appendChild = function(d) {
|
|
4506
4506
|
throw new Error("This DOM method is not implemented." + this.debugInfo());
|
|
4507
|
-
},
|
|
4507
|
+
}, C.prototype.hasChildNodes = function() {
|
|
4508
4508
|
return this.children.length !== 0;
|
|
4509
|
-
},
|
|
4509
|
+
}, C.prototype.cloneNode = function(d) {
|
|
4510
4510
|
throw new Error("This DOM method is not implemented." + this.debugInfo());
|
|
4511
|
-
},
|
|
4511
|
+
}, C.prototype.normalize = function() {
|
|
4512
4512
|
throw new Error("This DOM method is not implemented." + this.debugInfo());
|
|
4513
|
-
},
|
|
4513
|
+
}, C.prototype.isSupported = function(d, _) {
|
|
4514
4514
|
return !0;
|
|
4515
|
-
},
|
|
4515
|
+
}, C.prototype.hasAttributes = function() {
|
|
4516
4516
|
return this.attribs.length !== 0;
|
|
4517
|
-
},
|
|
4517
|
+
}, C.prototype.compareDocumentPosition = function(d) {
|
|
4518
4518
|
var _, x;
|
|
4519
4519
|
return _ = this, _ === d ? 0 : this.document() !== d.document() ? (x = o.Disconnected | o.ImplementationSpecific, Math.random() < 0.5 ? x |= o.Preceding : x |= o.Following, x) : _.isAncestor(d) ? o.Contains | o.Preceding : _.isDescendant(d) ? o.Contains | o.Following : _.isPreceding(d) ? o.Preceding : o.Following;
|
|
4520
|
-
},
|
|
4520
|
+
}, C.prototype.isSameNode = function(d) {
|
|
4521
4521
|
throw new Error("This DOM method is not implemented." + this.debugInfo());
|
|
4522
|
-
},
|
|
4522
|
+
}, C.prototype.lookupPrefix = function(d) {
|
|
4523
4523
|
throw new Error("This DOM method is not implemented." + this.debugInfo());
|
|
4524
|
-
},
|
|
4524
|
+
}, C.prototype.isDefaultNamespace = function(d) {
|
|
4525
4525
|
throw new Error("This DOM method is not implemented." + this.debugInfo());
|
|
4526
|
-
},
|
|
4526
|
+
}, C.prototype.lookupNamespaceURI = function(d) {
|
|
4527
4527
|
throw new Error("This DOM method is not implemented." + this.debugInfo());
|
|
4528
|
-
},
|
|
4528
|
+
}, C.prototype.isEqualNode = function(d) {
|
|
4529
4529
|
var _, x, j;
|
|
4530
4530
|
if (d.nodeType !== this.nodeType || d.children.length !== this.children.length)
|
|
4531
4531
|
return !1;
|
|
@@ -4533,35 +4533,35 @@ function vt() {
|
|
|
4533
4533
|
if (!this.children[_].isEqualNode(d.children[_]))
|
|
4534
4534
|
return !1;
|
|
4535
4535
|
return !0;
|
|
4536
|
-
},
|
|
4536
|
+
}, C.prototype.getFeature = function(d, _) {
|
|
4537
4537
|
throw new Error("This DOM method is not implemented." + this.debugInfo());
|
|
4538
|
-
},
|
|
4538
|
+
}, C.prototype.setUserData = function(d, _, x) {
|
|
4539
4539
|
throw new Error("This DOM method is not implemented." + this.debugInfo());
|
|
4540
|
-
},
|
|
4540
|
+
}, C.prototype.getUserData = function(d) {
|
|
4541
4541
|
throw new Error("This DOM method is not implemented." + this.debugInfo());
|
|
4542
|
-
},
|
|
4542
|
+
}, C.prototype.contains = function(d) {
|
|
4543
4543
|
return d ? d === this || this.isDescendant(d) : !1;
|
|
4544
|
-
},
|
|
4544
|
+
}, C.prototype.isDescendant = function(d) {
|
|
4545
4545
|
var _, x, j, B, S;
|
|
4546
4546
|
for (S = this.children, j = 0, B = S.length; j < B; j++)
|
|
4547
4547
|
if (_ = S[j], d === _ || (x = _.isDescendant(d), x))
|
|
4548
4548
|
return !0;
|
|
4549
4549
|
return !1;
|
|
4550
|
-
},
|
|
4550
|
+
}, C.prototype.isAncestor = function(d) {
|
|
4551
4551
|
return d.isDescendant(this);
|
|
4552
|
-
},
|
|
4552
|
+
}, C.prototype.isPreceding = function(d) {
|
|
4553
4553
|
var _, x;
|
|
4554
4554
|
return _ = this.treePosition(d), x = this.treePosition(this), _ === -1 || x === -1 ? !1 : _ < x;
|
|
4555
|
-
},
|
|
4555
|
+
}, C.prototype.isFollowing = function(d) {
|
|
4556
4556
|
var _, x;
|
|
4557
4557
|
return _ = this.treePosition(d), x = this.treePosition(this), _ === -1 || x === -1 ? !1 : _ > x;
|
|
4558
|
-
},
|
|
4558
|
+
}, C.prototype.treePosition = function(d) {
|
|
4559
4559
|
var _, x;
|
|
4560
4560
|
return x = 0, _ = !1, this.foreachTreeNode(this.document(), function(j) {
|
|
4561
4561
|
if (x++, !_ && j === d)
|
|
4562
4562
|
return _ = !0;
|
|
4563
4563
|
}), _ ? x : -1;
|
|
4564
|
-
},
|
|
4564
|
+
}, C.prototype.foreachTreeNode = function(d, _) {
|
|
4565
4565
|
var x, j, B, S, D;
|
|
4566
4566
|
for (d || (d = this.document()), S = d.children, j = 0, B = S.length; j < B; j++) {
|
|
4567
4567
|
if (x = S[j], D = _(x))
|
|
@@ -4569,7 +4569,7 @@ function vt() {
|
|
|
4569
4569
|
if (D = this.foreachTreeNode(x, _), D)
|
|
4570
4570
|
return D;
|
|
4571
4571
|
}
|
|
4572
|
-
},
|
|
4572
|
+
}, C;
|
|
4573
4573
|
}();
|
|
4574
4574
|
}.call(Z)), on.exports;
|
|
4575
4575
|
}
|
|
@@ -4691,11 +4691,11 @@ function kr() {
|
|
|
4691
4691
|
n.call(a, r) && (c = a[r], this["_" + r] = this[r], this[r] = c);
|
|
4692
4692
|
}
|
|
4693
4693
|
return s.prototype.filterOptions = function(i) {
|
|
4694
|
-
var r, a, c, y, p, l, h,
|
|
4694
|
+
var r, a, c, y, p, l, h, b;
|
|
4695
4695
|
return i || (i = {}), i = e({}, this.options, i), r = {
|
|
4696
4696
|
writer: this
|
|
4697
4697
|
}, r.pretty = i.pretty || !1, r.allowEmpty = i.allowEmpty || !1, r.indent = (a = i.indent) != null ? a : " ", r.newline = (c = i.newline) != null ? c : `
|
|
4698
|
-
`, r.offset = (y = i.offset) != null ? y : 0, r.dontPrettyTextNodes = (p = (l = i.dontPrettyTextNodes) != null ? l : i.dontprettytextnodes) != null ? p : 0, r.spaceBeforeSlash = (h = (
|
|
4698
|
+
`, r.offset = (y = i.offset) != null ? y : 0, r.dontPrettyTextNodes = (p = (l = i.dontPrettyTextNodes) != null ? l : i.dontprettytextnodes) != null ? p : 0, r.spaceBeforeSlash = (h = (b = i.spaceBeforeSlash) != null ? b : i.spacebeforeslash) != null ? h : "", r.spaceBeforeSlash === !0 && (r.spaceBeforeSlash = " "), r.suppressPrettyCount = 0, r.user = {}, r.state = t.None, r;
|
|
4699
4699
|
}, s.prototype.indent = function(i, r, a) {
|
|
4700
4700
|
var c;
|
|
4701
4701
|
return !r.pretty || r.suppressPrettyCount ? "" : r.pretty && (c = (a || 0) + r.offset + 1, c > 0) ? new Array(c).join(r.indent) : "";
|
|
@@ -4722,16 +4722,16 @@ function kr() {
|
|
|
4722
4722
|
}
|
|
4723
4723
|
return r.state = t.CloseTag, l += r.spaceBeforeSlash + ">", l += this.endline(i, r, a), r.state = t.None, this.closeNode(i, r, a), l;
|
|
4724
4724
|
}, s.prototype.element = function(i, r, a) {
|
|
4725
|
-
var c, y, p, l, h,
|
|
4726
|
-
a || (a = 0), P = !1,
|
|
4725
|
+
var c, y, p, l, h, b, E, I, O, P, C, d, _, x;
|
|
4726
|
+
a || (a = 0), P = !1, C = "", this.openNode(i, r, a), r.state = t.OpenTag, C += this.indent(i, r, a) + "<" + i.name, d = i.attribs;
|
|
4727
4727
|
for (O in d)
|
|
4728
|
-
n.call(d, O) && (c = d[O],
|
|
4728
|
+
n.call(d, O) && (c = d[O], C += this.attribute(c, r, a));
|
|
4729
4729
|
if (p = i.children.length, l = p === 0 ? null : i.children[0], p === 0 || i.children.every(function(j) {
|
|
4730
4730
|
return (j.type === o.Text || j.type === o.Raw) && j.value === "";
|
|
4731
4731
|
}))
|
|
4732
|
-
r.allowEmpty ? (
|
|
4732
|
+
r.allowEmpty ? (C += ">", r.state = t.CloseTag, C += "</" + i.name + ">" + this.endline(i, r, a)) : (r.state = t.CloseTag, C += r.spaceBeforeSlash + "/>" + this.endline(i, r, a));
|
|
4733
4733
|
else if (r.pretty && p === 1 && (l.type === o.Text || l.type === o.Raw) && l.value != null)
|
|
4734
|
-
|
|
4734
|
+
C += ">", r.state = t.InsideTag, r.suppressPrettyCount++, P = !0, C += this.writeChildNode(l, r, a + 1), r.suppressPrettyCount--, P = !1, r.state = t.CloseTag, C += "</" + i.name + ">" + this.endline(i, r, a);
|
|
4735
4735
|
else {
|
|
4736
4736
|
if (r.dontPrettyTextNodes) {
|
|
4737
4737
|
for (_ = i.children, h = 0, E = _.length; h < E; h++)
|
|
@@ -4740,11 +4740,11 @@ function kr() {
|
|
|
4740
4740
|
break;
|
|
4741
4741
|
}
|
|
4742
4742
|
}
|
|
4743
|
-
for (
|
|
4744
|
-
y = x[
|
|
4745
|
-
r.state = t.CloseTag,
|
|
4743
|
+
for (C += ">" + this.endline(i, r, a), r.state = t.InsideTag, x = i.children, b = 0, I = x.length; b < I; b++)
|
|
4744
|
+
y = x[b], C += this.writeChildNode(y, r, a + 1);
|
|
4745
|
+
r.state = t.CloseTag, C += this.indent(i, r, a) + "</" + i.name + ">", P && r.suppressPrettyCount--, C += this.endline(i, r, a), r.state = t.None;
|
|
4746
4746
|
}
|
|
4747
|
-
return this.closeNode(i, r, a),
|
|
4747
|
+
return this.closeNode(i, r, a), C;
|
|
4748
4748
|
}, s.prototype.writeChildNode = function(i, r, a) {
|
|
4749
4749
|
switch (i.type) {
|
|
4750
4750
|
case o.CData:
|
|
@@ -4850,8 +4850,8 @@ function Qr() {
|
|
|
4850
4850
|
value: new e()
|
|
4851
4851
|
}), Object.defineProperty(p.prototype, "doctype", {
|
|
4852
4852
|
get: function() {
|
|
4853
|
-
var l, h,
|
|
4854
|
-
for (E = this.children, h = 0,
|
|
4853
|
+
var l, h, b, E;
|
|
4854
|
+
for (E = this.children, h = 0, b = E.length; h < b; h++)
|
|
4855
4855
|
if (l = E[h], l.type === o.DocType)
|
|
4856
4856
|
return l;
|
|
4857
4857
|
return null;
|
|
@@ -4937,7 +4937,7 @@ function Qr() {
|
|
|
4937
4937
|
throw new Error("This DOM method is not implemented." + this.debugInfo());
|
|
4938
4938
|
}, p.prototype.normalizeDocument = function() {
|
|
4939
4939
|
throw new Error("This DOM method is not implemented." + this.debugInfo());
|
|
4940
|
-
}, p.prototype.renameNode = function(l, h,
|
|
4940
|
+
}, p.prototype.renameNode = function(l, h, b) {
|
|
4941
4941
|
throw new Error("This DOM method is not implemented." + this.debugInfo());
|
|
4942
4942
|
}, p.prototype.getElementsByClassName = function(l) {
|
|
4943
4943
|
throw new Error("This DOM method is not implemented." + this.debugInfo());
|
|
@@ -4945,9 +4945,9 @@ function Qr() {
|
|
|
4945
4945
|
throw new Error("This DOM method is not implemented." + this.debugInfo());
|
|
4946
4946
|
}, p.prototype.createRange = function() {
|
|
4947
4947
|
throw new Error("This DOM method is not implemented." + this.debugInfo());
|
|
4948
|
-
}, p.prototype.createNodeIterator = function(l, h,
|
|
4948
|
+
}, p.prototype.createNodeIterator = function(l, h, b) {
|
|
4949
4949
|
throw new Error("This DOM method is not implemented." + this.debugInfo());
|
|
4950
|
-
}, p.prototype.createTreeWalker = function(l, h,
|
|
4950
|
+
}, p.prototype.createTreeWalker = function(l, h, b) {
|
|
4951
4951
|
throw new Error("This DOM method is not implemented." + this.debugInfo());
|
|
4952
4952
|
}, p;
|
|
4953
4953
|
}(n);
|
|
@@ -4956,16 +4956,16 @@ function Qr() {
|
|
|
4956
4956
|
var Pn = { exports: {} }, br;
|
|
4957
4957
|
function Fo() {
|
|
4958
4958
|
return br || (br = 1, function() {
|
|
4959
|
-
var o, t, e, n, s, i, r, a, c, y, p, l, h,
|
|
4960
|
-
j = Xt(), _ = j.isObject, d = j.isFunction, x = j.isPlainObject,
|
|
4961
|
-
function S(D,
|
|
4959
|
+
var o, t, e, n, s, i, r, a, c, y, p, l, h, b, E, I, O, P, C, d, _, x, j, B = {}.hasOwnProperty;
|
|
4960
|
+
j = Xt(), _ = j.isObject, d = j.isFunction, x = j.isPlainObject, C = j.getValue, o = dt(), l = Qr(), h = zn(), n = Gn(), s = Yn(), E = ei(), P = ni(), b = ii(), y = Kn(), p = ti(), i = kn(), a = Qn(), r = Jn(), c = Zn(), e = Gr(), O = Kr(), I = ri(), t = Fe(), Pn.exports = function() {
|
|
4961
|
+
function S(D, w, N) {
|
|
4962
4962
|
var L;
|
|
4963
|
-
this.name = "?xml", this.type = o.Document, D || (D = {}), L = {}, D.writer ? x(D.writer) && (L = D.writer, D.writer = new
|
|
4963
|
+
this.name = "?xml", this.type = o.Document, D || (D = {}), L = {}, D.writer ? x(D.writer) && (L = D.writer, D.writer = new I()) : D.writer = new I(), this.options = D, this.writer = D.writer, this.writerOptions = this.writer.filterOptions(L), this.stringify = new O(D), this.onDataCallback = w || function() {
|
|
4964
4964
|
}, this.onEndCallback = N || function() {
|
|
4965
4965
|
}, this.currentNode = null, this.currentLevel = -1, this.openTags = {}, this.documentStarted = !1, this.documentCompleted = !1, this.root = null;
|
|
4966
4966
|
}
|
|
4967
4967
|
return S.prototype.createChildNode = function(D) {
|
|
4968
|
-
var
|
|
4968
|
+
var w, N, L, R, U, k, Y, H;
|
|
4969
4969
|
switch (D.type) {
|
|
4970
4970
|
case o.CData:
|
|
4971
4971
|
this.cdata(D.value);
|
|
@@ -4976,7 +4976,7 @@ function Fo() {
|
|
|
4976
4976
|
case o.Element:
|
|
4977
4977
|
L = {}, Y = D.attribs;
|
|
4978
4978
|
for (N in Y)
|
|
4979
|
-
B.call(Y, N) && (
|
|
4979
|
+
B.call(Y, N) && (w = Y[N], L[N] = w.value);
|
|
4980
4980
|
this.node(D.name, L);
|
|
4981
4981
|
break;
|
|
4982
4982
|
case o.Dummy:
|
|
@@ -4999,14 +4999,14 @@ function Fo() {
|
|
|
4999
4999
|
return this;
|
|
5000
5000
|
}, S.prototype.dummy = function() {
|
|
5001
5001
|
return this;
|
|
5002
|
-
}, S.prototype.node = function(D,
|
|
5002
|
+
}, S.prototype.node = function(D, w, N) {
|
|
5003
5003
|
var L;
|
|
5004
5004
|
if (D == null)
|
|
5005
5005
|
throw new Error("Missing node name.");
|
|
5006
5006
|
if (this.root && this.currentLevel === -1)
|
|
5007
5007
|
throw new Error("Document can only have one root node. " + this.debugInfo(D));
|
|
5008
|
-
return this.openCurrent(), D =
|
|
5009
|
-
}, S.prototype.element = function(D,
|
|
5008
|
+
return this.openCurrent(), D = C(D), w == null && (w = {}), w = C(w), _(w) || (L = [w, N], N = L[0], w = L[1]), this.currentNode = new h(this, D, w), this.currentNode.children = !1, this.currentLevel++, this.openTags[this.currentLevel] = this.currentNode, N != null && this.text(N), this;
|
|
5009
|
+
}, S.prototype.element = function(D, w, N) {
|
|
5010
5010
|
var L, R, U, k, Y, H;
|
|
5011
5011
|
if (this.currentNode && this.currentNode.type === o.DocType)
|
|
5012
5012
|
this.dtdElement.apply(this, arguments);
|
|
@@ -5014,67 +5014,67 @@ function Fo() {
|
|
|
5014
5014
|
for (k = this.options.noValidation, this.options.noValidation = !0, H = new l(this.options).element("TEMP_ROOT"), H.element(D), this.options.noValidation = k, Y = H.children, R = 0, U = Y.length; R < U; R++)
|
|
5015
5015
|
L = Y[R], this.createChildNode(L), L.type === o.Element && this.up();
|
|
5016
5016
|
else
|
|
5017
|
-
this.node(D,
|
|
5017
|
+
this.node(D, w, N);
|
|
5018
5018
|
return this;
|
|
5019
|
-
}, S.prototype.attribute = function(D,
|
|
5019
|
+
}, S.prototype.attribute = function(D, w) {
|
|
5020
5020
|
var N, L;
|
|
5021
5021
|
if (!this.currentNode || this.currentNode.children)
|
|
5022
5022
|
throw new Error("att() can only be used immediately after an ele() call in callback mode. " + this.debugInfo(D));
|
|
5023
|
-
if (D != null && (D =
|
|
5023
|
+
if (D != null && (D = C(D)), _(D))
|
|
5024
5024
|
for (N in D)
|
|
5025
5025
|
B.call(D, N) && (L = D[N], this.attribute(N, L));
|
|
5026
5026
|
else
|
|
5027
|
-
d(
|
|
5027
|
+
d(w) && (w = w.apply()), this.options.keepNullAttributes && w == null ? this.currentNode.attribs[D] = new e(this, D, "") : w != null && (this.currentNode.attribs[D] = new e(this, D, w));
|
|
5028
5028
|
return this;
|
|
5029
5029
|
}, S.prototype.text = function(D) {
|
|
5030
|
-
var
|
|
5031
|
-
return this.openCurrent(),
|
|
5030
|
+
var w;
|
|
5031
|
+
return this.openCurrent(), w = new P(this, D), this.onData(this.writer.text(w, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1), this;
|
|
5032
5032
|
}, S.prototype.cdata = function(D) {
|
|
5033
|
-
var
|
|
5034
|
-
return this.openCurrent(),
|
|
5033
|
+
var w;
|
|
5034
|
+
return this.openCurrent(), w = new n(this, D), this.onData(this.writer.cdata(w, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1), this;
|
|
5035
5035
|
}, S.prototype.comment = function(D) {
|
|
5036
|
-
var
|
|
5037
|
-
return this.openCurrent(),
|
|
5036
|
+
var w;
|
|
5037
|
+
return this.openCurrent(), w = new s(this, D), this.onData(this.writer.comment(w, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1), this;
|
|
5038
5038
|
}, S.prototype.raw = function(D) {
|
|
5039
|
-
var
|
|
5040
|
-
return this.openCurrent(),
|
|
5041
|
-
}, S.prototype.instruction = function(D,
|
|
5039
|
+
var w;
|
|
5040
|
+
return this.openCurrent(), w = new E(this, D), this.onData(this.writer.raw(w, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1), this;
|
|
5041
|
+
}, S.prototype.instruction = function(D, w) {
|
|
5042
5042
|
var N, L, R, U, k;
|
|
5043
|
-
if (this.openCurrent(), D != null && (D =
|
|
5043
|
+
if (this.openCurrent(), D != null && (D = C(D)), w != null && (w = C(w)), Array.isArray(D))
|
|
5044
5044
|
for (N = 0, U = D.length; N < U; N++)
|
|
5045
5045
|
L = D[N], this.instruction(L);
|
|
5046
5046
|
else if (_(D))
|
|
5047
5047
|
for (L in D)
|
|
5048
5048
|
B.call(D, L) && (R = D[L], this.instruction(L, R));
|
|
5049
5049
|
else
|
|
5050
|
-
d(
|
|
5050
|
+
d(w) && (w = w.apply()), k = new b(this, D, w), this.onData(this.writer.processingInstruction(k, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1);
|
|
5051
5051
|
return this;
|
|
5052
|
-
}, S.prototype.declaration = function(D,
|
|
5052
|
+
}, S.prototype.declaration = function(D, w, N) {
|
|
5053
5053
|
var L;
|
|
5054
5054
|
if (this.openCurrent(), this.documentStarted)
|
|
5055
5055
|
throw new Error("declaration() must be the first node.");
|
|
5056
|
-
return L = new y(this, D,
|
|
5057
|
-
}, S.prototype.doctype = function(D,
|
|
5056
|
+
return L = new y(this, D, w, N), this.onData(this.writer.declaration(L, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1), this;
|
|
5057
|
+
}, S.prototype.doctype = function(D, w, N) {
|
|
5058
5058
|
if (this.openCurrent(), D == null)
|
|
5059
5059
|
throw new Error("Missing root node name.");
|
|
5060
5060
|
if (this.root)
|
|
5061
5061
|
throw new Error("dtd() must come before the root node.");
|
|
5062
|
-
return this.currentNode = new p(this,
|
|
5063
|
-
}, S.prototype.dtdElement = function(D,
|
|
5062
|
+
return this.currentNode = new p(this, w, N), this.currentNode.rootNodeName = D, this.currentNode.children = !1, this.currentLevel++, this.openTags[this.currentLevel] = this.currentNode, this;
|
|
5063
|
+
}, S.prototype.dtdElement = function(D, w) {
|
|
5064
5064
|
var N;
|
|
5065
|
-
return this.openCurrent(), N = new r(this, D,
|
|
5066
|
-
}, S.prototype.attList = function(D,
|
|
5065
|
+
return this.openCurrent(), N = new r(this, D, w), this.onData(this.writer.dtdElement(N, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1), this;
|
|
5066
|
+
}, S.prototype.attList = function(D, w, N, L, R) {
|
|
5067
5067
|
var U;
|
|
5068
|
-
return this.openCurrent(), U = new i(this, D,
|
|
5069
|
-
}, S.prototype.entity = function(D,
|
|
5068
|
+
return this.openCurrent(), U = new i(this, D, w, N, L, R), this.onData(this.writer.dtdAttList(U, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1), this;
|
|
5069
|
+
}, S.prototype.entity = function(D, w) {
|
|
5070
5070
|
var N;
|
|
5071
|
-
return this.openCurrent(), N = new a(this, !1, D,
|
|
5072
|
-
}, S.prototype.pEntity = function(D,
|
|
5071
|
+
return this.openCurrent(), N = new a(this, !1, D, w), this.onData(this.writer.dtdEntity(N, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1), this;
|
|
5072
|
+
}, S.prototype.pEntity = function(D, w) {
|
|
5073
5073
|
var N;
|
|
5074
|
-
return this.openCurrent(), N = new a(this, !0, D,
|
|
5075
|
-
}, S.prototype.notation = function(D,
|
|
5074
|
+
return this.openCurrent(), N = new a(this, !0, D, w), this.onData(this.writer.dtdEntity(N, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1), this;
|
|
5075
|
+
}, S.prototype.notation = function(D, w) {
|
|
5076
5076
|
var N;
|
|
5077
|
-
return this.openCurrent(), N = new c(this, D,
|
|
5077
|
+
return this.openCurrent(), N = new c(this, D, w), this.onData(this.writer.dtdNotation(N, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1), this;
|
|
5078
5078
|
}, S.prototype.up = function() {
|
|
5079
5079
|
if (this.currentLevel < 0)
|
|
5080
5080
|
throw new Error("The document node has no parent.");
|
|
@@ -5087,47 +5087,47 @@ function Fo() {
|
|
|
5087
5087
|
if (this.currentNode)
|
|
5088
5088
|
return this.currentNode.children = !0, this.openNode(this.currentNode);
|
|
5089
5089
|
}, S.prototype.openNode = function(D) {
|
|
5090
|
-
var
|
|
5090
|
+
var w, N, L, R;
|
|
5091
5091
|
if (!D.isOpen) {
|
|
5092
5092
|
if (!this.root && this.currentLevel === 0 && D.type === o.Element && (this.root = D), N = "", D.type === o.Element) {
|
|
5093
5093
|
this.writerOptions.state = t.OpenTag, N = this.writer.indent(D, this.writerOptions, this.currentLevel) + "<" + D.name, R = D.attribs;
|
|
5094
5094
|
for (L in R)
|
|
5095
|
-
B.call(R, L) && (
|
|
5095
|
+
B.call(R, L) && (w = R[L], N += this.writer.attribute(w, this.writerOptions, this.currentLevel));
|
|
5096
5096
|
N += (D.children ? ">" : "/>") + this.writer.endline(D, this.writerOptions, this.currentLevel), this.writerOptions.state = t.InsideTag;
|
|
5097
5097
|
} else
|
|
5098
5098
|
this.writerOptions.state = t.OpenTag, N = this.writer.indent(D, this.writerOptions, this.currentLevel) + "<!DOCTYPE " + D.rootNodeName, D.pubID && D.sysID ? N += ' PUBLIC "' + D.pubID + '" "' + D.sysID + '"' : D.sysID && (N += ' SYSTEM "' + D.sysID + '"'), D.children ? (N += " [", this.writerOptions.state = t.InsideTag) : (this.writerOptions.state = t.CloseTag, N += ">"), N += this.writer.endline(D, this.writerOptions, this.currentLevel);
|
|
5099
5099
|
return this.onData(N, this.currentLevel), D.isOpen = !0;
|
|
5100
5100
|
}
|
|
5101
5101
|
}, S.prototype.closeNode = function(D) {
|
|
5102
|
-
var
|
|
5102
|
+
var w;
|
|
5103
5103
|
if (!D.isClosed)
|
|
5104
|
-
return
|
|
5105
|
-
}, S.prototype.onData = function(D,
|
|
5106
|
-
return this.documentStarted = !0, this.onDataCallback(D,
|
|
5104
|
+
return w = "", this.writerOptions.state = t.CloseTag, D.type === o.Element ? w = this.writer.indent(D, this.writerOptions, this.currentLevel) + "</" + D.name + ">" + this.writer.endline(D, this.writerOptions, this.currentLevel) : w = this.writer.indent(D, this.writerOptions, this.currentLevel) + "]>" + this.writer.endline(D, this.writerOptions, this.currentLevel), this.writerOptions.state = t.None, this.onData(w, this.currentLevel), D.isClosed = !0;
|
|
5105
|
+
}, S.prototype.onData = function(D, w) {
|
|
5106
|
+
return this.documentStarted = !0, this.onDataCallback(D, w + 1);
|
|
5107
5107
|
}, S.prototype.onEnd = function() {
|
|
5108
5108
|
return this.documentCompleted = !0, this.onEndCallback();
|
|
5109
5109
|
}, S.prototype.debugInfo = function(D) {
|
|
5110
5110
|
return D == null ? "" : "node: <" + D + ">";
|
|
5111
5111
|
}, S.prototype.ele = function() {
|
|
5112
5112
|
return this.element.apply(this, arguments);
|
|
5113
|
-
}, S.prototype.nod = function(D,
|
|
5114
|
-
return this.node(D,
|
|
5113
|
+
}, S.prototype.nod = function(D, w, N) {
|
|
5114
|
+
return this.node(D, w, N);
|
|
5115
5115
|
}, S.prototype.txt = function(D) {
|
|
5116
5116
|
return this.text(D);
|
|
5117
5117
|
}, S.prototype.dat = function(D) {
|
|
5118
5118
|
return this.cdata(D);
|
|
5119
5119
|
}, S.prototype.com = function(D) {
|
|
5120
5120
|
return this.comment(D);
|
|
5121
|
-
}, S.prototype.ins = function(D,
|
|
5122
|
-
return this.instruction(D,
|
|
5123
|
-
}, S.prototype.dec = function(D,
|
|
5124
|
-
return this.declaration(D,
|
|
5125
|
-
}, S.prototype.dtd = function(D,
|
|
5126
|
-
return this.doctype(D,
|
|
5127
|
-
}, S.prototype.e = function(D,
|
|
5128
|
-
return this.element(D,
|
|
5129
|
-
}, S.prototype.n = function(D,
|
|
5130
|
-
return this.node(D,
|
|
5121
|
+
}, S.prototype.ins = function(D, w) {
|
|
5122
|
+
return this.instruction(D, w);
|
|
5123
|
+
}, S.prototype.dec = function(D, w, N) {
|
|
5124
|
+
return this.declaration(D, w, N);
|
|
5125
|
+
}, S.prototype.dtd = function(D, w, N) {
|
|
5126
|
+
return this.doctype(D, w, N);
|
|
5127
|
+
}, S.prototype.e = function(D, w, N) {
|
|
5128
|
+
return this.element(D, w, N);
|
|
5129
|
+
}, S.prototype.n = function(D, w, N) {
|
|
5130
|
+
return this.node(D, w, N);
|
|
5131
5131
|
}, S.prototype.t = function(D) {
|
|
5132
5132
|
return this.text(D);
|
|
5133
5133
|
}, S.prototype.d = function(D) {
|
|
@@ -5136,18 +5136,18 @@ function Fo() {
|
|
|
5136
5136
|
return this.comment(D);
|
|
5137
5137
|
}, S.prototype.r = function(D) {
|
|
5138
5138
|
return this.raw(D);
|
|
5139
|
-
}, S.prototype.i = function(D,
|
|
5140
|
-
return this.instruction(D,
|
|
5139
|
+
}, S.prototype.i = function(D, w) {
|
|
5140
|
+
return this.instruction(D, w);
|
|
5141
5141
|
}, S.prototype.att = function() {
|
|
5142
5142
|
return this.currentNode && this.currentNode.type === o.DocType ? this.attList.apply(this, arguments) : this.attribute.apply(this, arguments);
|
|
5143
5143
|
}, S.prototype.a = function() {
|
|
5144
5144
|
return this.currentNode && this.currentNode.type === o.DocType ? this.attList.apply(this, arguments) : this.attribute.apply(this, arguments);
|
|
5145
|
-
}, S.prototype.ent = function(D,
|
|
5146
|
-
return this.entity(D,
|
|
5147
|
-
}, S.prototype.pent = function(D,
|
|
5148
|
-
return this.pEntity(D,
|
|
5149
|
-
}, S.prototype.not = function(D,
|
|
5150
|
-
return this.notation(D,
|
|
5145
|
+
}, S.prototype.ent = function(D, w) {
|
|
5146
|
+
return this.entity(D, w);
|
|
5147
|
+
}, S.prototype.pent = function(D, w) {
|
|
5148
|
+
return this.pEntity(D, w);
|
|
5149
|
+
}, S.prototype.not = function(D, w) {
|
|
5150
|
+
return this.notation(D, w);
|
|
5151
5151
|
}, S;
|
|
5152
5152
|
}();
|
|
5153
5153
|
}.call(Z)), Pn.exports;
|
|
@@ -5171,9 +5171,9 @@ function Ro() {
|
|
|
5171
5171
|
return r.prototype.endline = function(a, c, y) {
|
|
5172
5172
|
return a.isLastRootNode && c.state === t.CloseTag ? "" : r.__super__.endline.call(this, a, c, y);
|
|
5173
5173
|
}, r.prototype.document = function(a, c) {
|
|
5174
|
-
var y, p, l, h,
|
|
5175
|
-
for (
|
|
5176
|
-
y =
|
|
5174
|
+
var y, p, l, h, b, E, I, O, P;
|
|
5175
|
+
for (I = a.children, p = l = 0, b = I.length; l < b; p = ++l)
|
|
5176
|
+
y = I[p], y.isLastRootNode = p === a.children.length - 1;
|
|
5177
5177
|
for (c = this.filterOptions(c), O = a.children, P = [], h = 0, E = O.length; h < E; h++)
|
|
5178
5178
|
y = O[h], P.push(this.writeChildNode(y, c, 0));
|
|
5179
5179
|
return P;
|
|
@@ -5186,27 +5186,27 @@ function Ro() {
|
|
|
5186
5186
|
}, r.prototype.declaration = function(a, c, y) {
|
|
5187
5187
|
return this.stream.write(r.__super__.declaration.call(this, a, c, y));
|
|
5188
5188
|
}, r.prototype.docType = function(a, c, y) {
|
|
5189
|
-
var p, l, h,
|
|
5189
|
+
var p, l, h, b;
|
|
5190
5190
|
if (y || (y = 0), this.openNode(a, c, y), c.state = t.OpenTag, this.stream.write(this.indent(a, c, y)), this.stream.write("<!DOCTYPE " + a.root().name), a.pubID && a.sysID ? this.stream.write(' PUBLIC "' + a.pubID + '" "' + a.sysID + '"') : a.sysID && this.stream.write(' SYSTEM "' + a.sysID + '"'), a.children.length > 0) {
|
|
5191
|
-
for (this.stream.write(" ["), this.stream.write(this.endline(a, c, y)), c.state = t.InsideTag,
|
|
5192
|
-
p =
|
|
5191
|
+
for (this.stream.write(" ["), this.stream.write(this.endline(a, c, y)), c.state = t.InsideTag, b = a.children, l = 0, h = b.length; l < h; l++)
|
|
5192
|
+
p = b[l], this.writeChildNode(p, c, y + 1);
|
|
5193
5193
|
c.state = t.CloseTag, this.stream.write("]");
|
|
5194
5194
|
}
|
|
5195
5195
|
return c.state = t.CloseTag, this.stream.write(c.spaceBeforeSlash + ">"), this.stream.write(this.endline(a, c, y)), c.state = t.None, this.closeNode(a, c, y);
|
|
5196
5196
|
}, r.prototype.element = function(a, c, y) {
|
|
5197
|
-
var p, l, h,
|
|
5197
|
+
var p, l, h, b, E, I, O, P, C;
|
|
5198
5198
|
y || (y = 0), this.openNode(a, c, y), c.state = t.OpenTag, this.stream.write(this.indent(a, c, y) + "<" + a.name), P = a.attribs;
|
|
5199
5199
|
for (O in P)
|
|
5200
5200
|
s.call(P, O) && (p = P[O], this.attribute(p, c, y));
|
|
5201
|
-
if (h = a.children.length,
|
|
5201
|
+
if (h = a.children.length, b = h === 0 ? null : a.children[0], h === 0 || a.children.every(function(d) {
|
|
5202
5202
|
return (d.type === o.Text || d.type === o.Raw) && d.value === "";
|
|
5203
5203
|
}))
|
|
5204
5204
|
c.allowEmpty ? (this.stream.write(">"), c.state = t.CloseTag, this.stream.write("</" + a.name + ">")) : (c.state = t.CloseTag, this.stream.write(c.spaceBeforeSlash + "/>"));
|
|
5205
|
-
else if (c.pretty && h === 1 && (
|
|
5206
|
-
this.stream.write(">"), c.state = t.InsideTag, c.suppressPrettyCount++, this.writeChildNode(
|
|
5205
|
+
else if (c.pretty && h === 1 && (b.type === o.Text || b.type === o.Raw) && b.value != null)
|
|
5206
|
+
this.stream.write(">"), c.state = t.InsideTag, c.suppressPrettyCount++, this.writeChildNode(b, c, y + 1), c.suppressPrettyCount--, c.state = t.CloseTag, this.stream.write("</" + a.name + ">");
|
|
5207
5207
|
else {
|
|
5208
|
-
for (this.stream.write(">" + this.endline(a, c, y)), c.state = t.InsideTag,
|
|
5209
|
-
l =
|
|
5208
|
+
for (this.stream.write(">" + this.endline(a, c, y)), c.state = t.InsideTag, C = a.children, E = 0, I = C.length; E < I; E++)
|
|
5209
|
+
l = C[E], this.writeChildNode(l, c, y + 1);
|
|
5210
5210
|
c.state = t.CloseTag, this.stream.write(this.indent(a, c, y) + "</" + a.name + ">");
|
|
5211
5211
|
}
|
|
5212
5212
|
return this.stream.write(this.endline(a, c, y)), c.state = t.None, this.closeNode(a, c, y);
|
|
@@ -5232,14 +5232,14 @@ var Or;
|
|
|
5232
5232
|
function Bo() {
|
|
5233
5233
|
return Or || (Or = 1, function() {
|
|
5234
5234
|
var o, t, e, n, s, i, r, a, c, y;
|
|
5235
|
-
y = Xt(), a = y.assign, c = y.isFunction, e = zr(), n = Qr(), s = Fo(), r = ri(), i = Ro(), o = dt(), t = Fe(), Rt.create = function(p, l, h,
|
|
5236
|
-
var E,
|
|
5235
|
+
y = Xt(), a = y.assign, c = y.isFunction, e = zr(), n = Qr(), s = Fo(), r = ri(), i = Ro(), o = dt(), t = Fe(), Rt.create = function(p, l, h, b) {
|
|
5236
|
+
var E, I;
|
|
5237
5237
|
if (p == null)
|
|
5238
5238
|
throw new Error("Root element needs a name.");
|
|
5239
|
-
return
|
|
5239
|
+
return b = a({}, l, h, b), E = new n(b), I = E.element(p), b.headless || (E.declaration(b), (b.pubID != null || b.sysID != null) && E.dtd(b)), I;
|
|
5240
5240
|
}, Rt.begin = function(p, l, h) {
|
|
5241
|
-
var
|
|
5242
|
-
return c(p) && (
|
|
5241
|
+
var b;
|
|
5242
|
+
return c(p) && (b = [p, l], l = b[0], h = b[1], p = {}), l ? new s(p, l, h) : new n(p);
|
|
5243
5243
|
}, Rt.stringWriter = function(p) {
|
|
5244
5244
|
return new r(p);
|
|
5245
5245
|
}, Rt.streamWriter = function(p, l) {
|
|
@@ -5268,31 +5268,31 @@ function Xo() {
|
|
|
5268
5268
|
}
|
|
5269
5269
|
return r.prototype.buildObject = function(a) {
|
|
5270
5270
|
var c, y, p, l, h;
|
|
5271
|
-
return c = this.options.attrkey, y = this.options.charkey, Object.keys(a).length === 1 && this.options.rootName === t["0.2"].rootName ? (h = Object.keys(a)[0], a = a[h]) : h = this.options.rootName, p = /* @__PURE__ */ function(
|
|
5272
|
-
return function(E,
|
|
5273
|
-
var O, P,
|
|
5274
|
-
if (typeof
|
|
5275
|
-
|
|
5276
|
-
else if (Array.isArray(
|
|
5277
|
-
for (d in
|
|
5278
|
-
if (i.call(
|
|
5279
|
-
P =
|
|
5271
|
+
return c = this.options.attrkey, y = this.options.charkey, Object.keys(a).length === 1 && this.options.rootName === t["0.2"].rootName ? (h = Object.keys(a)[0], a = a[h]) : h = this.options.rootName, p = /* @__PURE__ */ function(b) {
|
|
5272
|
+
return function(E, I) {
|
|
5273
|
+
var O, P, C, d, _, x;
|
|
5274
|
+
if (typeof I != "object")
|
|
5275
|
+
b.options.cdata && n(I) ? E.raw(s(I)) : E.txt(I);
|
|
5276
|
+
else if (Array.isArray(I)) {
|
|
5277
|
+
for (d in I)
|
|
5278
|
+
if (i.call(I, d)) {
|
|
5279
|
+
P = I[d];
|
|
5280
5280
|
for (_ in P)
|
|
5281
|
-
|
|
5281
|
+
C = P[_], E = p(E.ele(_), C).up();
|
|
5282
5282
|
}
|
|
5283
5283
|
} else
|
|
5284
|
-
for (_ in
|
|
5285
|
-
if (i.call(
|
|
5286
|
-
if (P =
|
|
5284
|
+
for (_ in I)
|
|
5285
|
+
if (i.call(I, _))
|
|
5286
|
+
if (P = I[_], _ === c) {
|
|
5287
5287
|
if (typeof P == "object")
|
|
5288
5288
|
for (O in P)
|
|
5289
5289
|
x = P[O], E = E.att(O, x);
|
|
5290
5290
|
} else if (_ === y)
|
|
5291
|
-
|
|
5291
|
+
b.options.cdata && n(P) ? E = E.raw(s(P)) : E = E.txt(P);
|
|
5292
5292
|
else if (Array.isArray(P))
|
|
5293
5293
|
for (d in P)
|
|
5294
|
-
i.call(P, d) && (
|
|
5295
|
-
else typeof P == "object" ? E = p(E.ele(_), P).up() : typeof P == "string" &&
|
|
5294
|
+
i.call(P, d) && (C = P[d], typeof C == "string" ? b.options.cdata && n(C) ? E = E.ele(_).raw(s(C)).up() : E = E.ele(_, C).up() : E = p(E.ele(_), C).up());
|
|
5295
|
+
else typeof P == "object" ? E = p(E.ele(_), P).up() : typeof P == "string" && b.options.cdata && n(P) ? E = E.ele(_).raw(s(P)).up() : (P == null && (P = ""), E = E.ele(_, P.toString()).up());
|
|
5296
5296
|
return E;
|
|
5297
5297
|
};
|
|
5298
5298
|
}(this), l = o.create(h, this.options.xmldec, this.options.doctype, {
|
|
@@ -5348,7 +5348,7 @@ function Uo() {
|
|
|
5348
5348
|
if (!(this instanceof n))
|
|
5349
5349
|
return new n(m, u);
|
|
5350
5350
|
var A = this;
|
|
5351
|
-
i(A), A.q = A.c = "", A.bufferCheckPosition = t.MAX_BUFFER_LENGTH, A.encoding = null, A.opt = u || {}, A.opt.lowercase = A.opt.lowercase || A.opt.lowercasetags, A.looseCase = A.opt.lowercase ? "toLowerCase" : "toUpperCase", A.opt.maxEntityCount = A.opt.maxEntityCount || 512, A.opt.maxEntityDepth = A.opt.maxEntityDepth || 4, A.entityCount = A.entityDepth = 0, A.tags = [], A.closed = A.closedRoot = A.sawRoot = !1, A.tag = A.error = null, A.strict = !!m, A.noscript = !!(m || A.opt.noscript), A.state =
|
|
5351
|
+
i(A), A.q = A.c = "", A.bufferCheckPosition = t.MAX_BUFFER_LENGTH, A.encoding = null, A.opt = u || {}, A.opt.lowercase = A.opt.lowercase || A.opt.lowercasetags, A.looseCase = A.opt.lowercase ? "toLowerCase" : "toUpperCase", A.opt.maxEntityCount = A.opt.maxEntityCount || 512, A.opt.maxEntityDepth = A.opt.maxEntityDepth || 4, A.entityCount = A.entityDepth = 0, A.tags = [], A.closed = A.closedRoot = A.sawRoot = !1, A.tag = A.error = null, A.strict = !!m, A.noscript = !!(m || A.opt.noscript), A.state = w.BEGIN, A.strictEntities = A.opt.strictEntities, A.ENTITIES = A.strictEntities ? Object.create(t.XML_ENTITIES) : Object.create(t.ENTITIES), A.attribList = [], A.opt.xmlns && (A.ns = Object.create(O)), A.opt.unquotedAttributeValues === void 0 && (A.opt.unquotedAttributeValues = !m), A.trackPosition = A.opt.position !== !1, A.trackPosition && (A.position = A.line = A.column = 0), L(A, "onready");
|
|
5352
5352
|
}
|
|
5353
5353
|
Object.create || (Object.create = function(m) {
|
|
5354
5354
|
function u() {
|
|
@@ -5489,7 +5489,7 @@ function Uo() {
|
|
|
5489
5489
|
f.splice(0, 0, m), A.emit.apply(A, f);
|
|
5490
5490
|
}), a.prototype.on.call(A, m, u);
|
|
5491
5491
|
};
|
|
5492
|
-
var h = "[CDATA[",
|
|
5492
|
+
var h = "[CDATA[", b = "DOCTYPE", E = "http://www.w3.org/XML/1998/namespace", I = "http://www.w3.org/2000/xmlns/", O = { xml: E, xmlns: I }, P = /[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/, C = /[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/, d = /[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/, _ = /[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/;
|
|
5493
5493
|
function x(m) {
|
|
5494
5494
|
return m === " " || m === `
|
|
5495
5495
|
` || m === "\r" || m === " ";
|
|
@@ -5506,79 +5506,79 @@ function Uo() {
|
|
|
5506
5506
|
function D(m, u) {
|
|
5507
5507
|
return !S(m, u);
|
|
5508
5508
|
}
|
|
5509
|
-
var
|
|
5509
|
+
var w = 0;
|
|
5510
5510
|
t.STATE = {
|
|
5511
|
-
BEGIN:
|
|
5511
|
+
BEGIN: w++,
|
|
5512
5512
|
// leading byte order mark or whitespace
|
|
5513
|
-
BEGIN_WHITESPACE:
|
|
5513
|
+
BEGIN_WHITESPACE: w++,
|
|
5514
5514
|
// leading whitespace
|
|
5515
|
-
TEXT:
|
|
5515
|
+
TEXT: w++,
|
|
5516
5516
|
// general stuff
|
|
5517
|
-
TEXT_ENTITY:
|
|
5517
|
+
TEXT_ENTITY: w++,
|
|
5518
5518
|
// & and such.
|
|
5519
|
-
OPEN_WAKA:
|
|
5519
|
+
OPEN_WAKA: w++,
|
|
5520
5520
|
// <
|
|
5521
|
-
SGML_DECL:
|
|
5521
|
+
SGML_DECL: w++,
|
|
5522
5522
|
// <!BLARG
|
|
5523
|
-
SGML_DECL_QUOTED:
|
|
5523
|
+
SGML_DECL_QUOTED: w++,
|
|
5524
5524
|
// <!BLARG foo "bar
|
|
5525
|
-
DOCTYPE:
|
|
5525
|
+
DOCTYPE: w++,
|
|
5526
5526
|
// <!DOCTYPE
|
|
5527
|
-
DOCTYPE_QUOTED:
|
|
5527
|
+
DOCTYPE_QUOTED: w++,
|
|
5528
5528
|
// <!DOCTYPE "//blah
|
|
5529
|
-
DOCTYPE_DTD:
|
|
5529
|
+
DOCTYPE_DTD: w++,
|
|
5530
5530
|
// <!DOCTYPE "//blah" [ ...
|
|
5531
|
-
DOCTYPE_DTD_QUOTED:
|
|
5531
|
+
DOCTYPE_DTD_QUOTED: w++,
|
|
5532
5532
|
// <!DOCTYPE "//blah" [ "foo
|
|
5533
|
-
COMMENT_STARTING:
|
|
5533
|
+
COMMENT_STARTING: w++,
|
|
5534
5534
|
// <!-
|
|
5535
|
-
COMMENT:
|
|
5535
|
+
COMMENT: w++,
|
|
5536
5536
|
// <!--
|
|
5537
|
-
COMMENT_ENDING:
|
|
5537
|
+
COMMENT_ENDING: w++,
|
|
5538
5538
|
// <!-- blah -
|
|
5539
|
-
COMMENT_ENDED:
|
|
5539
|
+
COMMENT_ENDED: w++,
|
|
5540
5540
|
// <!-- blah --
|
|
5541
|
-
CDATA:
|
|
5541
|
+
CDATA: w++,
|
|
5542
5542
|
// <![CDATA[ something
|
|
5543
|
-
CDATA_ENDING:
|
|
5543
|
+
CDATA_ENDING: w++,
|
|
5544
5544
|
// ]
|
|
5545
|
-
CDATA_ENDING_2:
|
|
5545
|
+
CDATA_ENDING_2: w++,
|
|
5546
5546
|
// ]]
|
|
5547
|
-
PROC_INST:
|
|
5547
|
+
PROC_INST: w++,
|
|
5548
5548
|
// <?hi
|
|
5549
|
-
PROC_INST_BODY:
|
|
5549
|
+
PROC_INST_BODY: w++,
|
|
5550
5550
|
// <?hi there
|
|
5551
|
-
PROC_INST_ENDING:
|
|
5551
|
+
PROC_INST_ENDING: w++,
|
|
5552
5552
|
// <?hi "there" ?
|
|
5553
|
-
OPEN_TAG:
|
|
5553
|
+
OPEN_TAG: w++,
|
|
5554
5554
|
// <strong
|
|
5555
|
-
OPEN_TAG_SLASH:
|
|
5555
|
+
OPEN_TAG_SLASH: w++,
|
|
5556
5556
|
// <strong /
|
|
5557
|
-
ATTRIB:
|
|
5557
|
+
ATTRIB: w++,
|
|
5558
5558
|
// <a
|
|
5559
|
-
ATTRIB_NAME:
|
|
5559
|
+
ATTRIB_NAME: w++,
|
|
5560
5560
|
// <a foo
|
|
5561
|
-
ATTRIB_NAME_SAW_WHITE:
|
|
5561
|
+
ATTRIB_NAME_SAW_WHITE: w++,
|
|
5562
5562
|
// <a foo _
|
|
5563
|
-
ATTRIB_VALUE:
|
|
5563
|
+
ATTRIB_VALUE: w++,
|
|
5564
5564
|
// <a foo=
|
|
5565
|
-
ATTRIB_VALUE_QUOTED:
|
|
5565
|
+
ATTRIB_VALUE_QUOTED: w++,
|
|
5566
5566
|
// <a foo="bar
|
|
5567
|
-
ATTRIB_VALUE_CLOSED:
|
|
5567
|
+
ATTRIB_VALUE_CLOSED: w++,
|
|
5568
5568
|
// <a foo="bar"
|
|
5569
|
-
ATTRIB_VALUE_UNQUOTED:
|
|
5569
|
+
ATTRIB_VALUE_UNQUOTED: w++,
|
|
5570
5570
|
// <a foo=bar
|
|
5571
|
-
ATTRIB_VALUE_ENTITY_Q:
|
|
5571
|
+
ATTRIB_VALUE_ENTITY_Q: w++,
|
|
5572
5572
|
// <foo bar="""
|
|
5573
|
-
ATTRIB_VALUE_ENTITY_U:
|
|
5573
|
+
ATTRIB_VALUE_ENTITY_U: w++,
|
|
5574
5574
|
// <foo bar="
|
|
5575
|
-
CLOSE_TAG:
|
|
5575
|
+
CLOSE_TAG: w++,
|
|
5576
5576
|
// </a
|
|
5577
|
-
CLOSE_TAG_SAW_WHITE:
|
|
5577
|
+
CLOSE_TAG_SAW_WHITE: w++,
|
|
5578
5578
|
// </a >
|
|
5579
|
-
SCRIPT:
|
|
5579
|
+
SCRIPT: w++,
|
|
5580
5580
|
// <script> ...
|
|
5581
|
-
SCRIPT_ENDING:
|
|
5581
|
+
SCRIPT_ENDING: w++
|
|
5582
5582
|
// <script> ... <
|
|
5583
5583
|
}, t.XML_ENTITIES = {
|
|
5584
5584
|
amp: "&",
|
|
@@ -5846,7 +5846,7 @@ function Uo() {
|
|
|
5846
5846
|
});
|
|
5847
5847
|
for (var N in t.STATE)
|
|
5848
5848
|
t.STATE[t.STATE[N]] = N;
|
|
5849
|
-
|
|
5849
|
+
w = t.STATE;
|
|
5850
5850
|
function L(m, u, A) {
|
|
5851
5851
|
m[u] && m[u](A);
|
|
5852
5852
|
}
|
|
@@ -5886,7 +5886,7 @@ Column: ` + m.column + `
|
|
|
5886
5886
|
Char: ` + m.c), u = new Error(u), m.error = u, L(m, "onerror", u), m;
|
|
5887
5887
|
}
|
|
5888
5888
|
function Dt(m) {
|
|
5889
|
-
return m.sawRoot && !m.closedRoot && tt(m, "Unclosed root tag"), m.state !==
|
|
5889
|
+
return m.sawRoot && !m.closedRoot && tt(m, "Unclosed root tag"), m.state !== w.BEGIN && m.state !== w.BEGIN_WHITESPACE && m.state !== w.TEXT && nt(m, "Unexpected end"), at(m), m.c = "", m.closed = !0, L(m, "onend"), n.call(m, m.strict, m.opt), m;
|
|
5890
5890
|
}
|
|
5891
5891
|
function tt(m, u) {
|
|
5892
5892
|
if (typeof m != "object" || !(m instanceof n))
|
|
@@ -5916,10 +5916,10 @@ Char: ` + m.c), u = new Error(u), m.error = u, L(m, "onerror", u), m;
|
|
|
5916
5916
|
"xml: prefix must be bound to " + E + `
|
|
5917
5917
|
Actual: ` + m.attribValue
|
|
5918
5918
|
);
|
|
5919
|
-
else if (f === "xmlns" && m.attribValue !==
|
|
5919
|
+
else if (f === "xmlns" && m.attribValue !== I)
|
|
5920
5920
|
tt(
|
|
5921
5921
|
m,
|
|
5922
|
-
"xmlns: prefix must be bound to " +
|
|
5922
|
+
"xmlns: prefix must be bound to " + I + `
|
|
5923
5923
|
Actual: ` + m.attribValue
|
|
5924
5924
|
);
|
|
5925
5925
|
else {
|
|
@@ -5963,16 +5963,16 @@ Actual: ` + m.attribValue
|
|
|
5963
5963
|
}
|
|
5964
5964
|
m.attribList.length = 0;
|
|
5965
5965
|
}
|
|
5966
|
-
m.tag.isSelfClosing = !!u, m.sawRoot = !0, m.tags.push(m.tag), H(m, "onopentag", m.tag), u || (!m.noscript && m.tagName.toLowerCase() === "script" ? m.state =
|
|
5966
|
+
m.tag.isSelfClosing = !!u, m.sawRoot = !0, m.tags.push(m.tag), H(m, "onopentag", m.tag), u || (!m.noscript && m.tagName.toLowerCase() === "script" ? m.state = w.SCRIPT : m.state = w.TEXT, m.tag = null, m.tagName = ""), m.attribName = m.attribValue = "", m.attribList.length = 0;
|
|
5967
5967
|
}
|
|
5968
5968
|
function it(m) {
|
|
5969
5969
|
if (!m.tagName) {
|
|
5970
|
-
tt(m, "Weird empty close tag."), m.textNode += "</>", m.state =
|
|
5970
|
+
tt(m, "Weird empty close tag."), m.textNode += "</>", m.state = w.TEXT;
|
|
5971
5971
|
return;
|
|
5972
5972
|
}
|
|
5973
5973
|
if (m.script) {
|
|
5974
5974
|
if (m.tagName !== "script") {
|
|
5975
|
-
m.script += "</" + m.tagName + ">", m.tagName = "", m.state =
|
|
5975
|
+
m.script += "</" + m.tagName + ">", m.tagName = "", m.state = w.SCRIPT;
|
|
5976
5976
|
return;
|
|
5977
5977
|
}
|
|
5978
5978
|
H(m, "onscript", m.script), m.script = "";
|
|
@@ -5987,7 +5987,7 @@ Actual: ` + m.attribValue
|
|
|
5987
5987
|
break;
|
|
5988
5988
|
}
|
|
5989
5989
|
if (u < 0) {
|
|
5990
|
-
tt(m, "Unmatched closing tag: " + m.tagName), m.textNode += "</" + m.tagName + ">", m.state =
|
|
5990
|
+
tt(m, "Unmatched closing tag: " + m.tagName), m.textNode += "</" + m.tagName + ">", m.state = w.TEXT;
|
|
5991
5991
|
return;
|
|
5992
5992
|
}
|
|
5993
5993
|
m.tagName = A;
|
|
@@ -6003,14 +6003,14 @@ Actual: ` + m.attribValue
|
|
|
6003
6003
|
H(m, "onclosenamespace", { prefix: W, uri: rt });
|
|
6004
6004
|
});
|
|
6005
6005
|
}
|
|
6006
|
-
u === 0 && (m.closedRoot = !0), m.tagName = m.attribValue = m.attribName = "", m.attribList.length = 0, m.state =
|
|
6006
|
+
u === 0 && (m.closedRoot = !0), m.tagName = m.attribValue = m.attribName = "", m.attribList.length = 0, m.state = w.TEXT;
|
|
6007
6007
|
}
|
|
6008
6008
|
function ct(m) {
|
|
6009
6009
|
var u = m.entity, A = u.toLowerCase(), f, T = "";
|
|
6010
6010
|
return m.ENTITIES[u] ? m.ENTITIES[u] : m.ENTITIES[A] ? m.ENTITIES[A] : (u = A, u.charAt(0) === "#" && (u.charAt(1) === "x" ? (u = u.slice(2), f = parseInt(u, 16), T = f.toString(16)) : (u = u.slice(1), f = parseInt(u, 10), T = f.toString(10))), u = u.replace(/^0+/, ""), isNaN(f) || T.toLowerCase() !== u || f < 0 || f > 1114111 ? (tt(m, "Invalid character entity"), "&" + m.entity + ";") : String.fromCodePoint(f));
|
|
6011
6011
|
}
|
|
6012
6012
|
function et(m, u) {
|
|
6013
|
-
u === "<" ? (m.state =
|
|
6013
|
+
u === "<" ? (m.state = w.OPEN_WAKA, m.startTagPosition = m.position) : x(u) || (tt(m, "Non-whitespace before first tag."), m.textNode = u, m.state = w.TEXT);
|
|
6014
6014
|
}
|
|
6015
6015
|
function ot(m, u) {
|
|
6016
6016
|
var A = "";
|
|
@@ -6031,188 +6031,188 @@ Actual: ` + m.attribValue
|
|
|
6031
6031
|
for (var A = 0, f = ""; f = ot(m, A++), u.c = f, !!f; )
|
|
6032
6032
|
switch (u.trackPosition && (u.position++, f === `
|
|
6033
6033
|
` ? (u.line++, u.column = 0) : u.column++), u.state) {
|
|
6034
|
-
case
|
|
6035
|
-
if (u.state =
|
|
6034
|
+
case w.BEGIN:
|
|
6035
|
+
if (u.state = w.BEGIN_WHITESPACE, f === "\uFEFF")
|
|
6036
6036
|
continue;
|
|
6037
6037
|
et(u, f);
|
|
6038
6038
|
continue;
|
|
6039
|
-
case
|
|
6039
|
+
case w.BEGIN_WHITESPACE:
|
|
6040
6040
|
et(u, f);
|
|
6041
6041
|
continue;
|
|
6042
|
-
case
|
|
6042
|
+
case w.TEXT:
|
|
6043
6043
|
if (u.sawRoot && !u.closedRoot) {
|
|
6044
6044
|
for (var F = A - 1; f && f !== "<" && f !== "&"; )
|
|
6045
6045
|
f = ot(m, A++), f && u.trackPosition && (u.position++, f === `
|
|
6046
6046
|
` ? (u.line++, u.column = 0) : u.column++);
|
|
6047
6047
|
u.textNode += m.substring(F, A - 1);
|
|
6048
6048
|
}
|
|
6049
|
-
f === "<" && !(u.sawRoot && u.closedRoot && !u.strict) ? (u.state =
|
|
6049
|
+
f === "<" && !(u.sawRoot && u.closedRoot && !u.strict) ? (u.state = w.OPEN_WAKA, u.startTagPosition = u.position) : (!x(f) && (!u.sawRoot || u.closedRoot) && tt(u, "Text data outside of root node."), f === "&" ? u.state = w.TEXT_ENTITY : u.textNode += f);
|
|
6050
6050
|
continue;
|
|
6051
|
-
case
|
|
6052
|
-
f === "<" ? u.state =
|
|
6051
|
+
case w.SCRIPT:
|
|
6052
|
+
f === "<" ? u.state = w.SCRIPT_ENDING : u.script += f;
|
|
6053
6053
|
continue;
|
|
6054
|
-
case
|
|
6055
|
-
f === "/" ? u.state =
|
|
6054
|
+
case w.SCRIPT_ENDING:
|
|
6055
|
+
f === "/" ? u.state = w.CLOSE_TAG : (u.script += "<" + f, u.state = w.SCRIPT);
|
|
6056
6056
|
continue;
|
|
6057
|
-
case
|
|
6057
|
+
case w.OPEN_WAKA:
|
|
6058
6058
|
if (f === "!")
|
|
6059
|
-
u.state =
|
|
6059
|
+
u.state = w.SGML_DECL, u.sgmlDecl = "";
|
|
6060
6060
|
else if (!x(f)) if (S(P, f))
|
|
6061
|
-
u.state =
|
|
6061
|
+
u.state = w.OPEN_TAG, u.tagName = f;
|
|
6062
6062
|
else if (f === "/")
|
|
6063
|
-
u.state =
|
|
6063
|
+
u.state = w.CLOSE_TAG, u.tagName = "";
|
|
6064
6064
|
else if (f === "?")
|
|
6065
|
-
u.state =
|
|
6065
|
+
u.state = w.PROC_INST, u.procInstName = u.procInstBody = "";
|
|
6066
6066
|
else {
|
|
6067
6067
|
if (tt(u, "Unencoded <"), u.startTagPosition + 1 < u.position) {
|
|
6068
6068
|
var T = u.position - u.startTagPosition;
|
|
6069
6069
|
f = new Array(T).join(" ") + f;
|
|
6070
6070
|
}
|
|
6071
|
-
u.textNode += "<" + f, u.state =
|
|
6071
|
+
u.textNode += "<" + f, u.state = w.TEXT;
|
|
6072
6072
|
}
|
|
6073
6073
|
continue;
|
|
6074
|
-
case
|
|
6074
|
+
case w.SGML_DECL:
|
|
6075
6075
|
if (u.sgmlDecl + f === "--") {
|
|
6076
|
-
u.state =
|
|
6076
|
+
u.state = w.COMMENT, u.comment = "", u.sgmlDecl = "";
|
|
6077
6077
|
continue;
|
|
6078
6078
|
}
|
|
6079
|
-
u.doctype && u.doctype !== !0 && u.sgmlDecl ? (u.state =
|
|
6079
|
+
u.doctype && u.doctype !== !0 && u.sgmlDecl ? (u.state = w.DOCTYPE_DTD, u.doctype += "<!" + u.sgmlDecl + f, u.sgmlDecl = "") : (u.sgmlDecl + f).toUpperCase() === h ? (H(u, "onopencdata"), u.state = w.CDATA, u.sgmlDecl = "", u.cdata = "") : (u.sgmlDecl + f).toUpperCase() === b ? (u.state = w.DOCTYPE, (u.doctype || u.sawRoot) && tt(
|
|
6080
6080
|
u,
|
|
6081
6081
|
"Inappropriately located doctype declaration"
|
|
6082
|
-
), u.doctype = "", u.sgmlDecl = "") : f === ">" ? (H(u, "onsgmldeclaration", u.sgmlDecl), u.sgmlDecl = "", u.state =
|
|
6082
|
+
), u.doctype = "", u.sgmlDecl = "") : f === ">" ? (H(u, "onsgmldeclaration", u.sgmlDecl), u.sgmlDecl = "", u.state = w.TEXT) : (j(f) && (u.state = w.SGML_DECL_QUOTED), u.sgmlDecl += f);
|
|
6083
6083
|
continue;
|
|
6084
|
-
case
|
|
6085
|
-
f === u.q && (u.state =
|
|
6084
|
+
case w.SGML_DECL_QUOTED:
|
|
6085
|
+
f === u.q && (u.state = w.SGML_DECL, u.q = ""), u.sgmlDecl += f;
|
|
6086
6086
|
continue;
|
|
6087
|
-
case
|
|
6088
|
-
f === ">" ? (u.state =
|
|
6087
|
+
case w.DOCTYPE:
|
|
6088
|
+
f === ">" ? (u.state = w.TEXT, H(u, "ondoctype", u.doctype), u.doctype = !0) : (u.doctype += f, f === "[" ? u.state = w.DOCTYPE_DTD : j(f) && (u.state = w.DOCTYPE_QUOTED, u.q = f));
|
|
6089
6089
|
continue;
|
|
6090
|
-
case
|
|
6091
|
-
u.doctype += f, f === u.q && (u.q = "", u.state =
|
|
6090
|
+
case w.DOCTYPE_QUOTED:
|
|
6091
|
+
u.doctype += f, f === u.q && (u.q = "", u.state = w.DOCTYPE);
|
|
6092
6092
|
continue;
|
|
6093
|
-
case
|
|
6094
|
-
f === "]" ? (u.doctype += f, u.state =
|
|
6093
|
+
case w.DOCTYPE_DTD:
|
|
6094
|
+
f === "]" ? (u.doctype += f, u.state = w.DOCTYPE) : f === "<" ? (u.state = w.OPEN_WAKA, u.startTagPosition = u.position) : j(f) ? (u.doctype += f, u.state = w.DOCTYPE_DTD_QUOTED, u.q = f) : u.doctype += f;
|
|
6095
6095
|
continue;
|
|
6096
|
-
case
|
|
6097
|
-
u.doctype += f, f === u.q && (u.state =
|
|
6096
|
+
case w.DOCTYPE_DTD_QUOTED:
|
|
6097
|
+
u.doctype += f, f === u.q && (u.state = w.DOCTYPE_DTD, u.q = "");
|
|
6098
6098
|
continue;
|
|
6099
|
-
case
|
|
6100
|
-
f === "-" ? u.state =
|
|
6099
|
+
case w.COMMENT:
|
|
6100
|
+
f === "-" ? u.state = w.COMMENT_ENDING : u.comment += f;
|
|
6101
6101
|
continue;
|
|
6102
|
-
case
|
|
6103
|
-
f === "-" ? (u.state =
|
|
6102
|
+
case w.COMMENT_ENDING:
|
|
6103
|
+
f === "-" ? (u.state = w.COMMENT_ENDED, u.comment = Mt(u.opt, u.comment), u.comment && H(u, "oncomment", u.comment), u.comment = "") : (u.comment += "-" + f, u.state = w.COMMENT);
|
|
6104
6104
|
continue;
|
|
6105
|
-
case
|
|
6106
|
-
f !== ">" ? (tt(u, "Malformed comment"), u.comment += "--" + f, u.state =
|
|
6105
|
+
case w.COMMENT_ENDED:
|
|
6106
|
+
f !== ">" ? (tt(u, "Malformed comment"), u.comment += "--" + f, u.state = w.COMMENT) : u.doctype && u.doctype !== !0 ? u.state = w.DOCTYPE_DTD : u.state = w.TEXT;
|
|
6107
6107
|
continue;
|
|
6108
|
-
case
|
|
6108
|
+
case w.CDATA:
|
|
6109
6109
|
for (var F = A - 1; f && f !== "]"; )
|
|
6110
6110
|
f = ot(m, A++), f && u.trackPosition && (u.position++, f === `
|
|
6111
6111
|
` ? (u.line++, u.column = 0) : u.column++);
|
|
6112
|
-
u.cdata += m.substring(F, A - 1), f === "]" && (u.state =
|
|
6112
|
+
u.cdata += m.substring(F, A - 1), f === "]" && (u.state = w.CDATA_ENDING);
|
|
6113
6113
|
continue;
|
|
6114
|
-
case
|
|
6115
|
-
f === "]" ? u.state =
|
|
6114
|
+
case w.CDATA_ENDING:
|
|
6115
|
+
f === "]" ? u.state = w.CDATA_ENDING_2 : (u.cdata += "]" + f, u.state = w.CDATA);
|
|
6116
6116
|
continue;
|
|
6117
|
-
case
|
|
6118
|
-
f === ">" ? (u.cdata && H(u, "oncdata", u.cdata), H(u, "onclosecdata"), u.cdata = "", u.state =
|
|
6117
|
+
case w.CDATA_ENDING_2:
|
|
6118
|
+
f === ">" ? (u.cdata && H(u, "oncdata", u.cdata), H(u, "onclosecdata"), u.cdata = "", u.state = w.TEXT) : f === "]" ? u.cdata += "]" : (u.cdata += "]]" + f, u.state = w.CDATA);
|
|
6119
6119
|
continue;
|
|
6120
|
-
case
|
|
6121
|
-
f === "?" ? u.state =
|
|
6120
|
+
case w.PROC_INST:
|
|
6121
|
+
f === "?" ? u.state = w.PROC_INST_ENDING : x(f) ? u.state = w.PROC_INST_BODY : u.procInstName += f;
|
|
6122
6122
|
continue;
|
|
6123
|
-
case
|
|
6123
|
+
case w.PROC_INST_BODY:
|
|
6124
6124
|
if (!u.procInstBody && x(f))
|
|
6125
6125
|
continue;
|
|
6126
|
-
f === "?" ? u.state =
|
|
6126
|
+
f === "?" ? u.state = w.PROC_INST_ENDING : u.procInstBody += f;
|
|
6127
6127
|
continue;
|
|
6128
|
-
case
|
|
6128
|
+
case w.PROC_INST_ENDING:
|
|
6129
6129
|
if (f === ">") {
|
|
6130
6130
|
const X = {
|
|
6131
6131
|
name: u.procInstName,
|
|
6132
6132
|
body: u.procInstBody
|
|
6133
6133
|
};
|
|
6134
|
-
Y(u, X), H(u, "onprocessinginstruction", X), u.procInstName = u.procInstBody = "", u.state =
|
|
6134
|
+
Y(u, X), H(u, "onprocessinginstruction", X), u.procInstName = u.procInstBody = "", u.state = w.TEXT;
|
|
6135
6135
|
} else
|
|
6136
|
-
u.procInstBody += "?" + f, u.state =
|
|
6136
|
+
u.procInstBody += "?" + f, u.state = w.PROC_INST_BODY;
|
|
6137
6137
|
continue;
|
|
6138
|
-
case
|
|
6139
|
-
S(
|
|
6138
|
+
case w.OPEN_TAG:
|
|
6139
|
+
S(C, f) ? u.tagName += f : (jt(u), f === ">" ? z(u) : f === "/" ? u.state = w.OPEN_TAG_SLASH : (x(f) || tt(u, "Invalid character in tag name"), u.state = w.ATTRIB));
|
|
6140
6140
|
continue;
|
|
6141
|
-
case
|
|
6141
|
+
case w.OPEN_TAG_SLASH:
|
|
6142
6142
|
f === ">" ? (z(u, !0), it(u)) : (tt(
|
|
6143
6143
|
u,
|
|
6144
6144
|
"Forward-slash in opening tag not followed by >"
|
|
6145
|
-
), u.state =
|
|
6145
|
+
), u.state = w.ATTRIB);
|
|
6146
6146
|
continue;
|
|
6147
|
-
case
|
|
6147
|
+
case w.ATTRIB:
|
|
6148
6148
|
if (x(f))
|
|
6149
6149
|
continue;
|
|
6150
|
-
f === ">" ? z(u) : f === "/" ? u.state =
|
|
6150
|
+
f === ">" ? z(u) : f === "/" ? u.state = w.OPEN_TAG_SLASH : S(P, f) ? (u.attribName = f, u.attribValue = "", u.state = w.ATTRIB_NAME) : tt(u, "Invalid attribute name");
|
|
6151
6151
|
continue;
|
|
6152
|
-
case
|
|
6153
|
-
f === "=" ? u.state =
|
|
6152
|
+
case w.ATTRIB_NAME:
|
|
6153
|
+
f === "=" ? u.state = w.ATTRIB_VALUE : f === ">" ? (tt(u, "Attribute without value"), u.attribValue = u.attribName, qt(u), z(u)) : x(f) ? u.state = w.ATTRIB_NAME_SAW_WHITE : S(C, f) ? u.attribName += f : tt(u, "Invalid attribute name");
|
|
6154
6154
|
continue;
|
|
6155
|
-
case
|
|
6155
|
+
case w.ATTRIB_NAME_SAW_WHITE:
|
|
6156
6156
|
if (f === "=")
|
|
6157
|
-
u.state =
|
|
6157
|
+
u.state = w.ATTRIB_VALUE;
|
|
6158
6158
|
else {
|
|
6159
6159
|
if (x(f))
|
|
6160
6160
|
continue;
|
|
6161
6161
|
tt(u, "Attribute without value"), u.tag.attributes[u.attribName] = "", u.attribValue = "", H(u, "onattribute", {
|
|
6162
6162
|
name: u.attribName,
|
|
6163
6163
|
value: ""
|
|
6164
|
-
}), u.attribName = "", f === ">" ? z(u) : S(P, f) ? (u.attribName = f, u.state =
|
|
6164
|
+
}), u.attribName = "", f === ">" ? z(u) : S(P, f) ? (u.attribName = f, u.state = w.ATTRIB_NAME) : (tt(u, "Invalid attribute name"), u.state = w.ATTRIB);
|
|
6165
6165
|
}
|
|
6166
6166
|
continue;
|
|
6167
|
-
case
|
|
6167
|
+
case w.ATTRIB_VALUE:
|
|
6168
6168
|
if (x(f))
|
|
6169
6169
|
continue;
|
|
6170
|
-
j(f) ? (u.q = f, u.state =
|
|
6170
|
+
j(f) ? (u.q = f, u.state = w.ATTRIB_VALUE_QUOTED) : (u.opt.unquotedAttributeValues || nt(u, "Unquoted attribute value"), u.state = w.ATTRIB_VALUE_UNQUOTED, u.attribValue = f);
|
|
6171
6171
|
continue;
|
|
6172
|
-
case
|
|
6172
|
+
case w.ATTRIB_VALUE_QUOTED:
|
|
6173
6173
|
if (f !== u.q) {
|
|
6174
|
-
f === "&" ? u.state =
|
|
6174
|
+
f === "&" ? u.state = w.ATTRIB_VALUE_ENTITY_Q : u.attribValue += f;
|
|
6175
6175
|
continue;
|
|
6176
6176
|
}
|
|
6177
|
-
qt(u), u.q = "", u.state =
|
|
6177
|
+
qt(u), u.q = "", u.state = w.ATTRIB_VALUE_CLOSED;
|
|
6178
6178
|
continue;
|
|
6179
|
-
case
|
|
6180
|
-
x(f) ? u.state =
|
|
6179
|
+
case w.ATTRIB_VALUE_CLOSED:
|
|
6180
|
+
x(f) ? u.state = w.ATTRIB : f === ">" ? z(u) : f === "/" ? u.state = w.OPEN_TAG_SLASH : S(P, f) ? (tt(u, "No whitespace between attributes"), u.attribName = f, u.attribValue = "", u.state = w.ATTRIB_NAME) : tt(u, "Invalid attribute name");
|
|
6181
6181
|
continue;
|
|
6182
|
-
case
|
|
6182
|
+
case w.ATTRIB_VALUE_UNQUOTED:
|
|
6183
6183
|
if (!B(f)) {
|
|
6184
|
-
f === "&" ? u.state =
|
|
6184
|
+
f === "&" ? u.state = w.ATTRIB_VALUE_ENTITY_U : u.attribValue += f;
|
|
6185
6185
|
continue;
|
|
6186
6186
|
}
|
|
6187
|
-
qt(u), f === ">" ? z(u) : u.state =
|
|
6187
|
+
qt(u), f === ">" ? z(u) : u.state = w.ATTRIB;
|
|
6188
6188
|
continue;
|
|
6189
|
-
case
|
|
6189
|
+
case w.CLOSE_TAG:
|
|
6190
6190
|
if (u.tagName)
|
|
6191
|
-
f === ">" ? it(u) : S(
|
|
6191
|
+
f === ">" ? it(u) : S(C, f) ? u.tagName += f : u.script ? (u.script += "</" + u.tagName + f, u.tagName = "", u.state = w.SCRIPT) : (x(f) || tt(u, "Invalid tagname in closing tag"), u.state = w.CLOSE_TAG_SAW_WHITE);
|
|
6192
6192
|
else {
|
|
6193
6193
|
if (x(f))
|
|
6194
6194
|
continue;
|
|
6195
|
-
D(P, f) ? u.script ? (u.script += "</" + f, u.state =
|
|
6195
|
+
D(P, f) ? u.script ? (u.script += "</" + f, u.state = w.SCRIPT) : tt(u, "Invalid tagname in closing tag.") : u.tagName = f;
|
|
6196
6196
|
}
|
|
6197
6197
|
continue;
|
|
6198
|
-
case
|
|
6198
|
+
case w.CLOSE_TAG_SAW_WHITE:
|
|
6199
6199
|
if (x(f))
|
|
6200
6200
|
continue;
|
|
6201
6201
|
f === ">" ? it(u) : tt(u, "Invalid characters in closing tag");
|
|
6202
6202
|
continue;
|
|
6203
|
-
case
|
|
6204
|
-
case
|
|
6205
|
-
case
|
|
6203
|
+
case w.TEXT_ENTITY:
|
|
6204
|
+
case w.ATTRIB_VALUE_ENTITY_Q:
|
|
6205
|
+
case w.ATTRIB_VALUE_ENTITY_U:
|
|
6206
6206
|
var M, v;
|
|
6207
6207
|
switch (u.state) {
|
|
6208
|
-
case
|
|
6209
|
-
M =
|
|
6208
|
+
case w.TEXT_ENTITY:
|
|
6209
|
+
M = w.TEXT, v = "textNode";
|
|
6210
6210
|
break;
|
|
6211
|
-
case
|
|
6212
|
-
M =
|
|
6211
|
+
case w.ATTRIB_VALUE_ENTITY_Q:
|
|
6212
|
+
M = w.ATTRIB_VALUE_QUOTED, v = "attribValue";
|
|
6213
6213
|
break;
|
|
6214
|
-
case
|
|
6215
|
-
M =
|
|
6214
|
+
case w.ATTRIB_VALUE_ENTITY_U:
|
|
6215
|
+
M = w.ATTRIB_VALUE_UNQUOTED, v = "attribValue";
|
|
6216
6216
|
break;
|
|
6217
6217
|
}
|
|
6218
6218
|
if (f === ";") {
|
|
@@ -6257,17 +6257,17 @@ Actual: ` + m.attribValue
|
|
|
6257
6257
|
})(o);
|
|
6258
6258
|
}(Ln)), Ln;
|
|
6259
6259
|
}
|
|
6260
|
-
var Sn = {},
|
|
6260
|
+
var Sn = {}, _r;
|
|
6261
6261
|
function $o() {
|
|
6262
|
-
return
|
|
6262
|
+
return _r || (_r = 1, function() {
|
|
6263
6263
|
Sn.stripBOM = function(o) {
|
|
6264
6264
|
return o[0] === "\uFEFF" ? o.substring(1) : o;
|
|
6265
6265
|
};
|
|
6266
6266
|
}.call(Z)), Sn;
|
|
6267
6267
|
}
|
|
6268
|
-
var te = {},
|
|
6268
|
+
var te = {}, Cr;
|
|
6269
6269
|
function Jr() {
|
|
6270
|
-
return
|
|
6270
|
+
return Cr || (Cr = 1, function() {
|
|
6271
6271
|
var o;
|
|
6272
6272
|
o = new RegExp(/(?!xmlns)^.*:/), te.normalize = function(t) {
|
|
6273
6273
|
return t.toLowerCase();
|
|
@@ -6286,54 +6286,54 @@ var Ir;
|
|
|
6286
6286
|
function Wo() {
|
|
6287
6287
|
return Ir || (Ir = 1, function(o) {
|
|
6288
6288
|
(function() {
|
|
6289
|
-
var t, e, n, s, i, r, a, c, y, p = function(
|
|
6289
|
+
var t, e, n, s, i, r, a, c, y, p = function(b, E) {
|
|
6290
6290
|
return function() {
|
|
6291
|
-
return
|
|
6291
|
+
return b.apply(E, arguments);
|
|
6292
6292
|
};
|
|
6293
|
-
}, l = function(
|
|
6294
|
-
for (var
|
|
6295
|
-
h.call(E,
|
|
6293
|
+
}, l = function(b, E) {
|
|
6294
|
+
for (var I in E)
|
|
6295
|
+
h.call(E, I) && (b[I] = E[I]);
|
|
6296
6296
|
function O() {
|
|
6297
|
-
this.constructor =
|
|
6297
|
+
this.constructor = b;
|
|
6298
6298
|
}
|
|
6299
|
-
return O.prototype = E.prototype,
|
|
6299
|
+
return O.prototype = E.prototype, b.prototype = new O(), b.__super__ = E.prototype, b;
|
|
6300
6300
|
}, h = {}.hasOwnProperty;
|
|
6301
|
-
c = Uo(), s = Wn, t = $o(), a = Jr(), y = ds.setImmediate, e = Vn().defaults, i = function(
|
|
6302
|
-
return typeof
|
|
6303
|
-
}, r = function(
|
|
6304
|
-
var O, P,
|
|
6305
|
-
for (O = 0, P =
|
|
6306
|
-
|
|
6301
|
+
c = Uo(), s = Wn, t = $o(), a = Jr(), y = ds.setImmediate, e = Vn().defaults, i = function(b) {
|
|
6302
|
+
return typeof b == "object" && b != null && Object.keys(b).length === 0;
|
|
6303
|
+
}, r = function(b, E, I) {
|
|
6304
|
+
var O, P, C;
|
|
6305
|
+
for (O = 0, P = b.length; O < P; O++)
|
|
6306
|
+
C = b[O], E = C(E, I);
|
|
6307
6307
|
return E;
|
|
6308
|
-
}, n = function(
|
|
6308
|
+
}, n = function(b, E, I) {
|
|
6309
6309
|
var O;
|
|
6310
|
-
return O = /* @__PURE__ */ Object.create(null), O.value =
|
|
6311
|
-
}, o.Parser = function(
|
|
6312
|
-
l(E,
|
|
6313
|
-
function E(
|
|
6310
|
+
return O = /* @__PURE__ */ Object.create(null), O.value = I, O.writable = !0, O.enumerable = !0, O.configurable = !0, Object.defineProperty(b, E, O);
|
|
6311
|
+
}, o.Parser = function(b) {
|
|
6312
|
+
l(E, b);
|
|
6313
|
+
function E(I) {
|
|
6314
6314
|
this.parseStringPromise = p(this.parseStringPromise, this), this.parseString = p(this.parseString, this), this.reset = p(this.reset, this), this.assignOrPush = p(this.assignOrPush, this), this.processAsync = p(this.processAsync, this);
|
|
6315
|
-
var O, P,
|
|
6315
|
+
var O, P, C;
|
|
6316
6316
|
if (!(this instanceof o.Parser))
|
|
6317
|
-
return new o.Parser(
|
|
6317
|
+
return new o.Parser(I);
|
|
6318
6318
|
this.options = {}, P = e["0.2"];
|
|
6319
6319
|
for (O in P)
|
|
6320
|
-
h.call(P, O) && (
|
|
6321
|
-
for (O in
|
|
6322
|
-
h.call(
|
|
6320
|
+
h.call(P, O) && (C = P[O], this.options[O] = C);
|
|
6321
|
+
for (O in I)
|
|
6322
|
+
h.call(I, O) && (C = I[O], this.options[O] = C);
|
|
6323
6323
|
this.options.xmlns && (this.options.xmlnskey = this.options.attrkey + "ns"), this.options.normalizeTags && (this.options.tagNameProcessors || (this.options.tagNameProcessors = []), this.options.tagNameProcessors.unshift(a.normalize)), this.reset();
|
|
6324
6324
|
}
|
|
6325
6325
|
return E.prototype.processAsync = function() {
|
|
6326
|
-
var
|
|
6326
|
+
var I, O;
|
|
6327
6327
|
try {
|
|
6328
|
-
return this.remaining.length <= this.options.chunkSize ? (
|
|
6328
|
+
return this.remaining.length <= this.options.chunkSize ? (I = this.remaining, this.remaining = "", this.saxParser = this.saxParser.write(I), this.saxParser.close()) : (I = this.remaining.substr(0, this.options.chunkSize), this.remaining = this.remaining.substr(this.options.chunkSize, this.remaining.length), this.saxParser = this.saxParser.write(I), y(this.processAsync));
|
|
6329
6329
|
} catch (P) {
|
|
6330
6330
|
if (O = P, !this.saxParser.errThrown)
|
|
6331
6331
|
return this.saxParser.errThrown = !0, this.emit(O);
|
|
6332
6332
|
}
|
|
6333
|
-
}, E.prototype.assignOrPush = function(
|
|
6334
|
-
return O in
|
|
6333
|
+
}, E.prototype.assignOrPush = function(I, O, P) {
|
|
6334
|
+
return O in I ? (I[O] instanceof Array || n(I, O, [I[O]]), I[O].push(P)) : this.options.explicitArray ? n(I, O, [P]) : n(I, O, P);
|
|
6335
6335
|
}, E.prototype.reset = function() {
|
|
6336
|
-
var
|
|
6336
|
+
var I, O, P, C;
|
|
6337
6337
|
return this.removeAllListeners(), this.saxParser = c.parser(this.options.strict, {
|
|
6338
6338
|
trim: !1,
|
|
6339
6339
|
normalize: !1,
|
|
@@ -6348,26 +6348,26 @@ function Wo() {
|
|
|
6348
6348
|
if (!d.saxParser.ended)
|
|
6349
6349
|
return d.saxParser.ended = !0, d.emit("end", d.resultObject);
|
|
6350
6350
|
};
|
|
6351
|
-
}(this), this.saxParser.ended = !1, this.EXPLICIT_CHARKEY = this.options.explicitCharkey, this.resultObject = null,
|
|
6351
|
+
}(this), this.saxParser.ended = !1, this.EXPLICIT_CHARKEY = this.options.explicitCharkey, this.resultObject = null, C = [], I = this.options.attrkey, O = this.options.charkey, this.saxParser.onopentag = /* @__PURE__ */ function(d) {
|
|
6352
6352
|
return function(_) {
|
|
6353
6353
|
var x, j, B, S, D;
|
|
6354
6354
|
if (B = {}, B[O] = "", !d.options.ignoreAttrs) {
|
|
6355
6355
|
D = _.attributes;
|
|
6356
6356
|
for (x in D)
|
|
6357
|
-
h.call(D, x) && (!(
|
|
6357
|
+
h.call(D, x) && (!(I in B) && !d.options.mergeAttrs && (B[I] = {}), j = d.options.attrValueProcessors ? r(d.options.attrValueProcessors, _.attributes[x], x) : _.attributes[x], S = d.options.attrNameProcessors ? r(d.options.attrNameProcessors, x) : x, d.options.mergeAttrs ? d.assignOrPush(B, S, j) : n(B[I], S, j));
|
|
6358
6358
|
}
|
|
6359
6359
|
return B["#name"] = d.options.tagNameProcessors ? r(d.options.tagNameProcessors, _.name) : _.name, d.options.xmlns && (B[d.options.xmlnskey] = {
|
|
6360
6360
|
uri: _.uri,
|
|
6361
6361
|
local: _.local
|
|
6362
|
-
}),
|
|
6362
|
+
}), C.push(B);
|
|
6363
6363
|
};
|
|
6364
6364
|
}(this), this.saxParser.onclosetag = /* @__PURE__ */ function(d) {
|
|
6365
6365
|
return function() {
|
|
6366
|
-
var _, x, j, B, S, D,
|
|
6367
|
-
if (D =
|
|
6366
|
+
var _, x, j, B, S, D, w, N, L, R;
|
|
6367
|
+
if (D = C.pop(), S = D["#name"], (!d.options.explicitChildren || !d.options.preserveChildrenOrder) && delete D["#name"], D.cdata === !0 && (_ = D.cdata, delete D.cdata), L = C[C.length - 1], D[O].match(/^\s*$/) && !_ ? (x = D[O], delete D[O]) : (d.options.trim && (D[O] = D[O].trim()), d.options.normalize && (D[O] = D[O].replace(/\s{2,}/g, " ").trim()), D[O] = d.options.valueProcessors ? r(d.options.valueProcessors, D[O], S) : D[O], Object.keys(D).length === 1 && O in D && !d.EXPLICIT_CHARKEY && (D = D[O])), i(D) && (typeof d.options.emptyTag == "function" ? D = d.options.emptyTag() : D = d.options.emptyTag !== "" ? d.options.emptyTag : x), d.options.validator != null && (R = "/" + function() {
|
|
6368
6368
|
var U, k, Y;
|
|
6369
|
-
for (Y = [], U = 0, k =
|
|
6370
|
-
B =
|
|
6369
|
+
for (Y = [], U = 0, k = C.length; U < k; U++)
|
|
6370
|
+
B = C[U], Y.push(B["#name"]);
|
|
6371
6371
|
return Y;
|
|
6372
6372
|
}().concat(S).join("/"), function() {
|
|
6373
6373
|
var U;
|
|
@@ -6380,18 +6380,18 @@ function Wo() {
|
|
|
6380
6380
|
if (!d.options.preserveChildrenOrder)
|
|
6381
6381
|
B = {}, d.options.attrkey in D && (B[d.options.attrkey] = D[d.options.attrkey], delete D[d.options.attrkey]), !d.options.charsAsChildren && d.options.charkey in D && (B[d.options.charkey] = D[d.options.charkey], delete D[d.options.charkey]), Object.getOwnPropertyNames(D).length > 0 && (B[d.options.childkey] = D), D = B;
|
|
6382
6382
|
else if (L) {
|
|
6383
|
-
L[d.options.childkey] = L[d.options.childkey] || [],
|
|
6383
|
+
L[d.options.childkey] = L[d.options.childkey] || [], w = {};
|
|
6384
6384
|
for (j in D)
|
|
6385
|
-
h.call(D, j) && n(
|
|
6386
|
-
L[d.options.childkey].push(
|
|
6385
|
+
h.call(D, j) && n(w, j, D[j]);
|
|
6386
|
+
L[d.options.childkey].push(w), delete D["#name"], Object.keys(D).length === 1 && O in D && !d.EXPLICIT_CHARKEY && (D = D[O]);
|
|
6387
6387
|
}
|
|
6388
6388
|
}
|
|
6389
|
-
return
|
|
6389
|
+
return C.length > 0 ? d.assignOrPush(L, S, D) : (d.options.explicitRoot && (N = D, D = {}, n(D, S, N)), d.resultObject = D, d.saxParser.ended = !0, d.emit("end", d.resultObject));
|
|
6390
6390
|
};
|
|
6391
6391
|
}(this), P = /* @__PURE__ */ function(d) {
|
|
6392
6392
|
return function(_) {
|
|
6393
6393
|
var x, j;
|
|
6394
|
-
if (j =
|
|
6394
|
+
if (j = C[C.length - 1], j)
|
|
6395
6395
|
return j[O] += _, d.options.explicitChildren && d.options.preserveChildrenOrder && d.options.charsAsChildren && (d.options.includeWhiteChars || _.replace(/\\n/g, "").trim() !== "") && (j[d.options.childkey] = j[d.options.childkey] || [], x = {
|
|
6396
6396
|
"#name": "__text__"
|
|
6397
6397
|
}, x[O] = _, d.options.normalize && (x[O] = x[O].replace(/\s{2,}/g, " ").trim()), j[d.options.childkey].push(x)), j;
|
|
@@ -6403,36 +6403,36 @@ function Wo() {
|
|
|
6403
6403
|
return x.cdata = !0;
|
|
6404
6404
|
};
|
|
6405
6405
|
}();
|
|
6406
|
-
}, E.prototype.parseString = function(
|
|
6406
|
+
}, E.prototype.parseString = function(I, O) {
|
|
6407
6407
|
var P;
|
|
6408
|
-
O != null && typeof O == "function" && (this.on("end", function(
|
|
6409
|
-
return this.reset(), O(null,
|
|
6410
|
-
}), this.on("error", function(
|
|
6411
|
-
return this.reset(), O(
|
|
6408
|
+
O != null && typeof O == "function" && (this.on("end", function(C) {
|
|
6409
|
+
return this.reset(), O(null, C);
|
|
6410
|
+
}), this.on("error", function(C) {
|
|
6411
|
+
return this.reset(), O(C);
|
|
6412
6412
|
}));
|
|
6413
6413
|
try {
|
|
6414
|
-
return
|
|
6415
|
-
} catch (
|
|
6416
|
-
if (P =
|
|
6414
|
+
return I = I.toString(), I.trim() === "" ? (this.emit("end", null), !0) : (I = t.stripBOM(I), this.options.async ? (this.remaining = I, y(this.processAsync), this.saxParser) : this.saxParser.write(I).close());
|
|
6415
|
+
} catch (C) {
|
|
6416
|
+
if (P = C, this.saxParser.errThrown || this.saxParser.ended) {
|
|
6417
6417
|
if (this.saxParser.ended)
|
|
6418
6418
|
throw P;
|
|
6419
6419
|
} else return this.emit("error", P), this.saxParser.errThrown = !0;
|
|
6420
6420
|
}
|
|
6421
|
-
}, E.prototype.parseStringPromise = function(
|
|
6421
|
+
}, E.prototype.parseStringPromise = function(I) {
|
|
6422
6422
|
return new Promise(/* @__PURE__ */ function(O) {
|
|
6423
|
-
return function(P,
|
|
6424
|
-
return O.parseString(
|
|
6425
|
-
return d ?
|
|
6423
|
+
return function(P, C) {
|
|
6424
|
+
return O.parseString(I, function(d, _) {
|
|
6425
|
+
return d ? C(d) : P(_);
|
|
6426
6426
|
});
|
|
6427
6427
|
};
|
|
6428
6428
|
}(this));
|
|
6429
6429
|
}, E;
|
|
6430
|
-
}(s), o.parseString = function(
|
|
6431
|
-
var O, P,
|
|
6432
|
-
return
|
|
6433
|
-
}, o.parseStringPromise = function(
|
|
6434
|
-
var
|
|
6435
|
-
return typeof E == "object" && (
|
|
6430
|
+
}(s), o.parseString = function(b, E, I) {
|
|
6431
|
+
var O, P, C;
|
|
6432
|
+
return I != null ? (typeof I == "function" && (O = I), typeof E == "object" && (P = E)) : (typeof E == "function" && (O = E), P = {}), C = new o.Parser(P), C.parseString(b, O);
|
|
6433
|
+
}, o.parseStringPromise = function(b, E) {
|
|
6434
|
+
var I, O;
|
|
6435
|
+
return typeof E == "object" && (I = E), O = new o.Parser(I), O.parseStringPromise(b);
|
|
6436
6436
|
};
|
|
6437
6437
|
}).call(Z);
|
|
6438
6438
|
}(Mn)), Mn;
|
|
@@ -6457,7 +6457,7 @@ var Zr;
|
|
|
6457
6457
|
}).call(Z);
|
|
6458
6458
|
class qo {
|
|
6459
6459
|
constructor(t, e, n) {
|
|
6460
|
-
this.nextTxnId = 1, this.pendingCommands = /* @__PURE__ */ new Map(), this.breakpoints = /* @__PURE__ */ new Map(), this.scriptIdByUrl = /* @__PURE__ */ new Map(), this.nextScriptId = 1, this.objectHandles = /* @__PURE__ */ new Map(), this.nextObjectId = 1, this.callFramesMap = /* @__PURE__ */ new Map(), this.xdebugConnected = !1, this.dbgp = t, this.cdp = e, this.readPHPFile = n.getPHPFile, this.phpRoot = n.phpRoot || "";
|
|
6460
|
+
this.nextTxnId = 1, this.pendingCommands = /* @__PURE__ */ new Map(), this.breakpoints = /* @__PURE__ */ new Map(), this.scriptIdByUrl = /* @__PURE__ */ new Map(), this.nextScriptId = 1, this.objectHandles = /* @__PURE__ */ new Map(), this.nextObjectId = 1, this.callFramesMap = /* @__PURE__ */ new Map(), this.xdebugConnected = !1, this.dbgp = t, this.cdp = e, this.readPHPFile = n.getPHPFile, this.phpRoot = n.phpRoot || "", this.excludedPaths = n.excludedPaths || [];
|
|
6461
6461
|
for (const s of n.knownScriptUrls)
|
|
6462
6462
|
this.scriptIdByUrl.set(s, this.getOrCreateScriptId(s));
|
|
6463
6463
|
this.breakOnFirstLine = n.breakOnFirstLine || !1;
|
|
@@ -6554,7 +6554,9 @@ class qo {
|
|
|
6554
6554
|
sources: [n],
|
|
6555
6555
|
sourcesContent: [i],
|
|
6556
6556
|
mappings: a
|
|
6557
|
-
}
|
|
6557
|
+
};
|
|
6558
|
+
this.isExcludedPath(t) && (c.x_google_ignoreList = [0]);
|
|
6559
|
+
const p = `data:application/json;base64,${Buffer.from(
|
|
6558
6560
|
JSON.stringify(c),
|
|
6559
6561
|
"utf-8"
|
|
6560
6562
|
).toString("base64")}`;
|
|
@@ -6589,6 +6591,11 @@ class qo {
|
|
|
6589
6591
|
let e = this.scriptIdByUrl.get(t);
|
|
6590
6592
|
return e || (e = ps("sha256").update(String(this.nextScriptId++)).digest("hex").slice(0, 16), this.scriptIdByUrl.set(t, e)), e;
|
|
6591
6593
|
}
|
|
6594
|
+
isExcludedPath(t) {
|
|
6595
|
+
return this.excludedPaths.some(
|
|
6596
|
+
(e) => t === e || t.startsWith(e + "/")
|
|
6597
|
+
);
|
|
6598
|
+
}
|
|
6592
6599
|
// Utility: escape and quote Xdebug fullname for property_get
|
|
6593
6600
|
formatPropertyFullName(t) {
|
|
6594
6601
|
let e = !1, n = "";
|
|
@@ -6617,9 +6624,9 @@ class qo {
|
|
|
6617
6624
|
}
|
|
6618
6625
|
const y = this.uriFromCDPToBridge(a), p = this.uriFromBridgeToDBGP(y), l = (typeof c == "number" ? c : 0) + 1, h = String(this.breakpoints.size + 1);
|
|
6619
6626
|
if (this.xdebugConnected) {
|
|
6620
|
-
const
|
|
6627
|
+
const b = `breakpoint_set -t line -f ${this.formatPropertyFullName(
|
|
6621
6628
|
p
|
|
6622
|
-
)} -n ${l}`, E = this.sendDbgpCommand(
|
|
6629
|
+
)} -n ${l}`, E = this.sendDbgpCommand(b);
|
|
6623
6630
|
this.pendingCommands.set(E, {
|
|
6624
6631
|
cdpId: e,
|
|
6625
6632
|
cdpMethod: n,
|
|
@@ -6723,23 +6730,23 @@ class qo {
|
|
|
6723
6730
|
const { objectId: a } = s, c = this.objectHandles.get(a);
|
|
6724
6731
|
if (c && this.xdebugConnected)
|
|
6725
6732
|
if (c.type === "context") {
|
|
6726
|
-
const y = c.contextId ?? 0, l = `context_get -d ${c.depth} -c ${y} -p 0 -m 32`, h = this.sendDbgpCommand(l),
|
|
6733
|
+
const y = c.contextId ?? 0, l = `context_get -d ${c.depth} -c ${y} -p 0 -m 32`, h = this.sendDbgpCommand(l), b = {
|
|
6727
6734
|
...c,
|
|
6728
6735
|
currentPage: 0,
|
|
6729
6736
|
aggregatedProps: []
|
|
6730
6737
|
};
|
|
6731
|
-
this.objectHandles.set(a,
|
|
6738
|
+
this.objectHandles.set(a, b), this.pendingCommands.set(h, {
|
|
6732
6739
|
cdpId: e,
|
|
6733
6740
|
cdpMethod: n,
|
|
6734
6741
|
params: { objectId: a }
|
|
6735
6742
|
}), r = !1;
|
|
6736
6743
|
} else if (c.type === "property") {
|
|
6737
|
-
const y = c.depth, p = c.fullname, l = this.formatPropertyFullName(p), h = `property_get -d ${y} -n ${l} -p 0 -m 32`,
|
|
6744
|
+
const y = c.depth, p = c.fullname, l = this.formatPropertyFullName(p), h = `property_get -d ${y} -n ${l} -p 0 -m 32`, b = this.sendDbgpCommand(h), E = {
|
|
6738
6745
|
...c,
|
|
6739
6746
|
currentPage: 0,
|
|
6740
6747
|
aggregatedProps: []
|
|
6741
6748
|
};
|
|
6742
|
-
this.objectHandles.set(a, E), this.pendingCommands.set(
|
|
6749
|
+
this.objectHandles.set(a, E), this.pendingCommands.set(b, {
|
|
6743
6750
|
cdpId: e,
|
|
6744
6751
|
cdpMethod: n,
|
|
6745
6752
|
params: { parentObjectId: a }
|
|
@@ -6840,7 +6847,7 @@ class qo {
|
|
|
6840
6847
|
fileUri: p,
|
|
6841
6848
|
lineNumber: l
|
|
6842
6849
|
});
|
|
6843
|
-
const h = this.getOrCreateScriptId(p),
|
|
6850
|
+
const h = this.getOrCreateScriptId(p), b = {
|
|
6844
6851
|
breakpointId: y,
|
|
6845
6852
|
locations: [
|
|
6846
6853
|
{
|
|
@@ -6850,7 +6857,7 @@ class qo {
|
|
|
6850
6857
|
}
|
|
6851
6858
|
]
|
|
6852
6859
|
};
|
|
6853
|
-
this.cdp.sendMessage({ id: r.cdpId, result:
|
|
6860
|
+
this.cdp.sendMessage({ id: r.cdpId, result: b });
|
|
6854
6861
|
}
|
|
6855
6862
|
this.pendingCommands.delete(i);
|
|
6856
6863
|
}
|
|
@@ -6905,20 +6912,20 @@ class qo {
|
|
|
6905
6912
|
value: h ?? ""
|
|
6906
6913
|
};
|
|
6907
6914
|
else if (p === "int" || p === "float" || p === "bool" || p === "boolen" || p === "integer" || p === "double") {
|
|
6908
|
-
let
|
|
6909
|
-
p.startsWith("int") || p === "integer" ?
|
|
6915
|
+
let b = h;
|
|
6916
|
+
p.startsWith("int") || p === "integer" ? b = parseInt(h || "0", 10) : p === "float" || p === "double" ? b = parseFloat(h || "0") : p.startsWith("bool") && (b = h === "1" || h === "true"), a = { type: "number", value: b };
|
|
6910
6917
|
} else if (p === "array" || p === "object") {
|
|
6911
|
-
const
|
|
6918
|
+
const b = y.$.classname || (p === "array" ? "Array" : "Object"), E = String(this.nextObjectId++), I = y.$.fullname || "";
|
|
6912
6919
|
this.objectHandles.set(E, {
|
|
6913
6920
|
type: "property",
|
|
6914
6921
|
depth: 0,
|
|
6915
6922
|
contextId: 0,
|
|
6916
|
-
fullname:
|
|
6923
|
+
fullname: I
|
|
6917
6924
|
}), a = {
|
|
6918
6925
|
type: "object",
|
|
6919
6926
|
objectId: E,
|
|
6920
|
-
className:
|
|
6921
|
-
description:
|
|
6927
|
+
className: b,
|
|
6928
|
+
description: b
|
|
6922
6929
|
};
|
|
6923
6930
|
} else p === "null" ? a = {
|
|
6924
6931
|
type: "object",
|
|
@@ -6945,9 +6952,9 @@ class qo {
|
|
|
6945
6952
|
if (y) {
|
|
6946
6953
|
const l = Array.isArray(y) ? y : [y];
|
|
6947
6954
|
for (const h of l) {
|
|
6948
|
-
const
|
|
6955
|
+
const b = h.$.name || h.$.fullname || "";
|
|
6949
6956
|
let E = h.$.type || "undefined";
|
|
6950
|
-
const
|
|
6957
|
+
const I = h.$.children === "1", O = h.$.encoding;
|
|
6951
6958
|
let P = null;
|
|
6952
6959
|
if (typeof h._ < "u" && (P = h._), O === "base64" && P !== null)
|
|
6953
6960
|
try {
|
|
@@ -6957,8 +6964,8 @@ class qo {
|
|
|
6957
6964
|
).toString();
|
|
6958
6965
|
} catch {
|
|
6959
6966
|
}
|
|
6960
|
-
if (
|
|
6961
|
-
const
|
|
6967
|
+
if (I) {
|
|
6968
|
+
const C = h.$.classname || (E === "array" ? "Array" : "Object"), d = String(
|
|
6962
6969
|
this.nextObjectId++
|
|
6963
6970
|
), _ = r.cdpMethod === "Runtime.getProperties" && r.params?.parentObjectId && this.objectHandles.get(
|
|
6964
6971
|
r.params.parentObjectId
|
|
@@ -6969,13 +6976,13 @@ class qo {
|
|
|
6969
6976
|
type: "property",
|
|
6970
6977
|
depth: x,
|
|
6971
6978
|
contextId: _,
|
|
6972
|
-
fullname: h.$.fullname ||
|
|
6979
|
+
fullname: h.$.fullname || b
|
|
6973
6980
|
}), p.push({
|
|
6974
|
-
name: h.$.key ||
|
|
6981
|
+
name: h.$.key || b,
|
|
6975
6982
|
value: {
|
|
6976
6983
|
type: "object",
|
|
6977
|
-
className:
|
|
6978
|
-
description:
|
|
6984
|
+
className: C,
|
|
6985
|
+
description: C,
|
|
6979
6986
|
objectId: d
|
|
6980
6987
|
},
|
|
6981
6988
|
writable: !1,
|
|
@@ -6983,13 +6990,13 @@ class qo {
|
|
|
6983
6990
|
enumerable: !0
|
|
6984
6991
|
});
|
|
6985
6992
|
} else {
|
|
6986
|
-
let
|
|
6987
|
-
E === "string" ?
|
|
6993
|
+
let C, d;
|
|
6994
|
+
E === "string" ? C = P ?? "" : E === "int" || E === "integer" ? C = parseInt(P || "0", 10) : E === "float" || E === "double" ? C = parseFloat(P || "0") : E === "bool" || E === "boolean" ? (C = P === "1" || P === "true", E = "boolean") : E === "null" ? (C = null, d = "null") : C = P;
|
|
6988
6995
|
const _ = {
|
|
6989
6996
|
type: E === "integer" ? "number" : E
|
|
6990
6997
|
};
|
|
6991
|
-
d && (_.subtype = d), _.value =
|
|
6992
|
-
name: h.$.key ||
|
|
6998
|
+
d && (_.subtype = d), _.value = C, p.push({
|
|
6999
|
+
name: h.$.key || b,
|
|
6993
7000
|
value: _,
|
|
6994
7001
|
writable: !1,
|
|
6995
7002
|
configurable: !1,
|
|
@@ -7001,22 +7008,22 @@ class qo {
|
|
|
7001
7008
|
if (c) {
|
|
7002
7009
|
const l = (c.aggregatedProps || []).concat(p), h = 32;
|
|
7003
7010
|
if (p.length === h) {
|
|
7004
|
-
const E = (c.currentPage || 0) + 1,
|
|
7011
|
+
const E = (c.currentPage || 0) + 1, I = {
|
|
7005
7012
|
...c,
|
|
7006
7013
|
currentPage: E,
|
|
7007
7014
|
aggregatedProps: l
|
|
7008
7015
|
};
|
|
7009
7016
|
this.objectHandles.set(
|
|
7010
7017
|
a,
|
|
7011
|
-
|
|
7018
|
+
I
|
|
7012
7019
|
);
|
|
7013
7020
|
let O;
|
|
7014
7021
|
if (s === "context_get") {
|
|
7015
|
-
const
|
|
7016
|
-
O = `context_get -d ${c.depth} -c ${
|
|
7022
|
+
const C = c.contextId ?? 0;
|
|
7023
|
+
O = `context_get -d ${c.depth} -c ${C} -p ${E} -m ${h}`;
|
|
7017
7024
|
} else {
|
|
7018
|
-
const
|
|
7019
|
-
O = `property_get -d ${
|
|
7025
|
+
const C = c.depth, d = c.fullname, _ = this.formatPropertyFullName(d);
|
|
7026
|
+
O = `property_get -d ${C} -n ${_} -p ${E} -m ${h}`;
|
|
7020
7027
|
}
|
|
7021
7028
|
const P = this.sendDbgpCommand(O);
|
|
7022
7029
|
this.pendingCommands.set(P, {
|
|
@@ -7052,8 +7059,8 @@ class qo {
|
|
|
7052
7059
|
for (const p of a) {
|
|
7053
7060
|
const l = parseInt(p.$.level, 10), h = this.uriFromDBGPToBridge(
|
|
7054
7061
|
p.$.filename
|
|
7055
|
-
),
|
|
7056
|
-
this.callFramesMap.set(
|
|
7062
|
+
), b = parseInt(p.$.lineno, 10), E = p.$.where && p.$.where !== "{main}" ? p.$.where : "(anonymous)", I = `frame:${l}`;
|
|
7063
|
+
this.callFramesMap.set(I, l);
|
|
7057
7064
|
const O = [], P = String(this.nextObjectId++);
|
|
7058
7065
|
this.objectHandles.set(P, {
|
|
7059
7066
|
type: "context",
|
|
@@ -7067,24 +7074,24 @@ class qo {
|
|
|
7067
7074
|
description: "Local"
|
|
7068
7075
|
}
|
|
7069
7076
|
});
|
|
7070
|
-
const
|
|
7071
|
-
this.objectHandles.set(
|
|
7077
|
+
const C = String(this.nextObjectId++);
|
|
7078
|
+
this.objectHandles.set(C, {
|
|
7072
7079
|
type: "context",
|
|
7073
7080
|
contextId: 1,
|
|
7074
7081
|
depth: l
|
|
7075
7082
|
}), O.push({
|
|
7076
7083
|
type: "global",
|
|
7077
7084
|
object: {
|
|
7078
|
-
objectId:
|
|
7085
|
+
objectId: C,
|
|
7079
7086
|
className: "Object",
|
|
7080
7087
|
description: "Global"
|
|
7081
7088
|
}
|
|
7082
7089
|
}), c.push({
|
|
7083
|
-
callFrameId:
|
|
7090
|
+
callFrameId: I,
|
|
7084
7091
|
functionName: E,
|
|
7085
7092
|
location: {
|
|
7086
7093
|
scriptId: this.getOrCreateScriptId(h),
|
|
7087
|
-
lineNumber:
|
|
7094
|
+
lineNumber: b - 1,
|
|
7088
7095
|
columnNumber: 0
|
|
7089
7096
|
},
|
|
7090
7097
|
scopeChain: O,
|
|
@@ -7092,7 +7099,7 @@ class qo {
|
|
|
7092
7099
|
type: "object",
|
|
7093
7100
|
className: "Object",
|
|
7094
7101
|
description: "Object",
|
|
7095
|
-
objectId:
|
|
7102
|
+
objectId: C
|
|
7096
7103
|
}
|
|
7097
7104
|
});
|
|
7098
7105
|
}
|
|
@@ -7106,8 +7113,8 @@ class qo {
|
|
|
7106
7113
|
p.$.lineno,
|
|
7107
7114
|
10
|
|
7108
7115
|
);
|
|
7109
|
-
for (const
|
|
7110
|
-
if (
|
|
7116
|
+
for (const b of this.breakpoints.values())
|
|
7117
|
+
if (b.fileUri === l && b.lineNumber === h) {
|
|
7111
7118
|
y = "breakpoint";
|
|
7112
7119
|
break;
|
|
7113
7120
|
}
|
|
@@ -7149,32 +7156,41 @@ class qo {
|
|
|
7149
7156
|
}
|
|
7150
7157
|
}
|
|
7151
7158
|
async function Vo(o) {
|
|
7152
|
-
const t = o.cdpPort ?? 9229, e = o.dbgpPort ?? 9003, n = o.cdpHost ?? "127.0.0.1", s = o.phpRoot ?? process.cwd(), i = o.breakOnFirstLine ?? !1;
|
|
7159
|
+
const t = o.cdpPort ?? 9229, e = o.dbgpPort ?? 9003, n = o.cdpHost ?? "127.0.0.1", s = o.phpRoot ?? process.cwd(), i = o.breakOnFirstLine ?? !1, r = o.excludedPaths ?? [];
|
|
7153
7160
|
xt.log("Starting XDebug Bridge...");
|
|
7154
|
-
const
|
|
7161
|
+
const a = new xs(t);
|
|
7155
7162
|
xt.log("Connect Chrome DevTools to CDP at:"), xt.log(
|
|
7156
7163
|
`devtools://devtools/bundled/inspector.html?ws=${n}:${t}
|
|
7157
7164
|
`
|
|
7158
|
-
), await new Promise((
|
|
7159
|
-
const
|
|
7165
|
+
), await new Promise((b) => a.on("clientConnected", b)), await new Promise((b) => setTimeout(b, 2e3)), xt.log("Chrome connected! Initializing Xdebug receiver...");
|
|
7166
|
+
const c = new vs(e);
|
|
7160
7167
|
xt.log(`XDebug receiver running on port ${e}`), xt.log("Running a PHP script with Xdebug enabled...");
|
|
7161
|
-
|
|
7162
|
-
|
|
7163
|
-
|
|
7164
|
-
|
|
7165
|
-
|
|
7166
|
-
|
|
7167
|
-
|
|
7168
|
-
|
|
7168
|
+
function y(b) {
|
|
7169
|
+
return r.some(
|
|
7170
|
+
(E) => b === E || b.startsWith(E + "/")
|
|
7171
|
+
);
|
|
7172
|
+
}
|
|
7173
|
+
async function p(b) {
|
|
7174
|
+
if (y(b))
|
|
7175
|
+
return [];
|
|
7176
|
+
const E = [], I = o.phpInstance ? await o.phpInstance.listFiles(b) : vr(b);
|
|
7177
|
+
for (const O of I) {
|
|
7178
|
+
const P = Tr.join(b, O);
|
|
7179
|
+
if (!y(P))
|
|
7180
|
+
try {
|
|
7181
|
+
(o.phpInstance ? await o.phpInstance.isDir(P) : cs(P).isDirectory()) ? E.push(...await p(P)) : O.endsWith(".php") && E.push(P);
|
|
7182
|
+
} catch {
|
|
7183
|
+
}
|
|
7169
7184
|
}
|
|
7170
|
-
return
|
|
7185
|
+
return E;
|
|
7171
7186
|
}
|
|
7172
|
-
const
|
|
7173
|
-
return new qo(
|
|
7174
|
-
knownScriptUrls:
|
|
7187
|
+
const l = o.phpInstance ? (b) => o.phpInstance.readFileAsText(b) : o.getPHPFile ? o.getPHPFile : (b) => Le(b, "utf-8"), h = await p(s);
|
|
7188
|
+
return new qo(c, a, {
|
|
7189
|
+
knownScriptUrls: h,
|
|
7175
7190
|
phpRoot: s,
|
|
7176
|
-
getPHPFile:
|
|
7177
|
-
breakOnFirstLine: i
|
|
7191
|
+
getPHPFile: l,
|
|
7192
|
+
breakOnFirstLine: i,
|
|
7193
|
+
excludedPaths: r
|
|
7178
7194
|
});
|
|
7179
7195
|
}
|
|
7180
7196
|
const ts = {
|