Merge remote-tracking branch 'origin/main' into mbg/csra/upload-failed-sarif-artifact

This commit is contained in:
Michael B. Gale
2026-03-09 18:32:36 +00:00
144 changed files with 14401 additions and 10117 deletions

File diff suppressed because it is too large Load Diff

832
lib/analyze-action.js generated

File diff suppressed because it is too large Load Diff

548
lib/autobuild-action.js generated
View File

@@ -45986,7 +45986,7 @@ var require_package = __commonJS({
"package.json"(exports2, module2) {
module2.exports = {
name: "codeql",
version: "4.32.5",
version: "4.32.7",
private: true,
description: "CodeQL action",
scripts: {
@@ -45995,7 +45995,7 @@ var require_package = __commonJS({
lint: "eslint --report-unused-disable-directives --max-warnings=0 .",
"lint-ci": "SARIF_ESLINT_IGNORE_SUPPRESSED=true eslint --report-unused-disable-directives --max-warnings=0 . --format @microsoft/eslint-formatter-sarif --output-file=eslint.sarif",
"lint-fix": "eslint --report-unused-disable-directives --max-warnings=0 . --fix",
ava: "npm run transpile && ava --serial --verbose",
ava: "npm run transpile && ava --verbose",
test: "npm run ava -- src/",
"test-debug": "npm run test -- --timeout=20m",
transpile: "tsc --build --verbose"
@@ -46044,6 +46044,7 @@ var require_package = __commonJS({
"@types/js-yaml": "^4.0.9",
"@types/node": "^20.19.9",
"@types/node-forge": "^1.3.14",
"@types/sarif": "^2.1.7",
"@types/semver": "^7.7.1",
"@types/sinon": "^21.0.0",
ava: "^6.4.1",
@@ -46052,14 +46053,14 @@ var require_package = __commonJS({
"eslint-import-resolver-typescript": "^3.8.7",
"eslint-plugin-github": "^6.0.0",
"eslint-plugin-import-x": "^4.16.1",
"eslint-plugin-jsdoc": "^62.5.0",
"eslint-plugin-jsdoc": "^62.7.1",
"eslint-plugin-no-async-foreach": "^0.1.1",
glob: "^11.1.0",
globals: "^16.5.0",
globals: "^17.3.0",
nock: "^14.0.11",
sinon: "^21.0.1",
typescript: "^5.9.3",
"typescript-eslint": "^8.56.0"
"typescript-eslint": "^8.56.1"
},
overrides: {
"@actions/tool-cache": {
@@ -49361,6 +49362,7 @@ var require_minimatch = __commonJS({
pattern = pattern.split(path7.sep).join("/");
}
this.options = options;
this.maxGlobstarRecursion = options.maxGlobstarRecursion !== void 0 ? options.maxGlobstarRecursion : 200;
this.set = [];
this.pattern = pattern;
this.regexp = null;
@@ -49757,50 +49759,147 @@ var require_minimatch = __commonJS({
return this.negate;
};
Minimatch.prototype.matchOne = function(file, pattern, partial) {
var options = this.options;
this.debug(
"matchOne",
{ "this": this, file, pattern }
if (pattern.indexOf(GLOBSTAR) !== -1) {
return this._matchGlobstar(file, pattern, partial, 0, 0);
}
return this._matchOne(file, pattern, partial, 0, 0);
};
Minimatch.prototype._matchGlobstar = function(file, pattern, partial, fileIndex, patternIndex) {
var i;
var firstgs = -1;
for (i = patternIndex; i < pattern.length; i++) {
if (pattern[i] === GLOBSTAR) {
firstgs = i;
break;
}
}
var lastgs = -1;
for (i = pattern.length - 1; i >= 0; i--) {
if (pattern[i] === GLOBSTAR) {
lastgs = i;
break;
}
}
var head = pattern.slice(patternIndex, firstgs);
var body = partial ? pattern.slice(firstgs + 1) : pattern.slice(firstgs + 1, lastgs);
var tail = partial ? [] : pattern.slice(lastgs + 1);
if (head.length) {
var fileHead = file.slice(fileIndex, fileIndex + head.length);
if (!this._matchOne(fileHead, head, partial, 0, 0)) {
return false;
}
fileIndex += head.length;
}
var fileTailMatch = 0;
if (tail.length) {
if (tail.length + fileIndex > file.length) return false;
var tailStart = file.length - tail.length;
if (this._matchOne(file, tail, partial, tailStart, 0)) {
fileTailMatch = tail.length;
} else {
if (file[file.length - 1] !== "" || fileIndex + tail.length === file.length) {
return false;
}
tailStart--;
if (!this._matchOne(file, tail, partial, tailStart, 0)) {
return false;
}
fileTailMatch = tail.length + 1;
}
}
if (!body.length) {
var sawSome = !!fileTailMatch;
for (i = fileIndex; i < file.length - fileTailMatch; i++) {
var f = String(file[i]);
sawSome = true;
if (f === "." || f === ".." || !this.options.dot && f.charAt(0) === ".") {
return false;
}
}
return partial || sawSome;
}
var bodySegments = [[[], 0]];
var currentBody = bodySegments[0];
var nonGsParts = 0;
var nonGsPartsSums = [0];
for (var bi = 0; bi < body.length; bi++) {
var b = body[bi];
if (b === GLOBSTAR) {
nonGsPartsSums.push(nonGsParts);
currentBody = [[], 0];
bodySegments.push(currentBody);
} else {
currentBody[0].push(b);
nonGsParts++;
}
}
var idx = bodySegments.length - 1;
var fileLength = file.length - fileTailMatch;
for (var si = 0; si < bodySegments.length; si++) {
bodySegments[si][1] = fileLength - (nonGsPartsSums[idx--] + bodySegments[si][0].length);
}
return !!this._matchGlobStarBodySections(
file,
bodySegments,
fileIndex,
0,
partial,
0,
!!fileTailMatch
);
this.debug("matchOne", file.length, pattern.length);
for (var fi = 0, pi = 0, fl = file.length, pl = pattern.length; fi < fl && pi < pl; fi++, pi++) {
};
Minimatch.prototype._matchGlobStarBodySections = function(file, bodySegments, fileIndex, bodyIndex, partial, globStarDepth, sawTail) {
var bs = bodySegments[bodyIndex];
if (!bs) {
for (var i = fileIndex; i < file.length; i++) {
sawTail = true;
var f = file[i];
if (f === "." || f === ".." || !this.options.dot && f.charAt(0) === ".") {
return false;
}
}
return sawTail;
}
var body = bs[0];
var after = bs[1];
while (fileIndex <= after) {
var m = this._matchOne(
file.slice(0, fileIndex + body.length),
body,
partial,
fileIndex,
0
);
if (m && globStarDepth < this.maxGlobstarRecursion) {
var sub = this._matchGlobStarBodySections(
file,
bodySegments,
fileIndex + body.length,
bodyIndex + 1,
partial,
globStarDepth + 1,
sawTail
);
if (sub !== false) {
return sub;
}
}
var f = file[fileIndex];
if (f === "." || f === ".." || !this.options.dot && f.charAt(0) === ".") {
return false;
}
fileIndex++;
}
return partial || null;
};
Minimatch.prototype._matchOne = function(file, pattern, partial, fileIndex, patternIndex) {
var fi, pi, fl, pl;
for (fi = fileIndex, pi = patternIndex, fl = file.length, pl = pattern.length; fi < fl && pi < pl; fi++, pi++) {
this.debug("matchOne loop");
var p = pattern[pi];
var f = file[fi];
this.debug(pattern, p, f);
if (p === false) return false;
if (p === GLOBSTAR) {
this.debug("GLOBSTAR", [pattern, p, f]);
var fr = fi;
var pr = pi + 1;
if (pr === pl) {
this.debug("** at the end");
for (; fi < fl; fi++) {
if (file[fi] === "." || file[fi] === ".." || !options.dot && file[fi].charAt(0) === ".") return false;
}
return true;
}
while (fr < fl) {
var swallowee = file[fr];
this.debug("\nglobstar while", file, fr, pattern, pr, swallowee);
if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) {
this.debug("globstar found match!", fr, fl, swallowee);
return true;
} else {
if (swallowee === "." || swallowee === ".." || !options.dot && swallowee.charAt(0) === ".") {
this.debug("dot detected!", file, fr, pattern, pr);
break;
}
this.debug("globstar swallow a segment, and continue");
fr++;
}
}
if (partial) {
this.debug("\n>>> no match, partial?", file, fr, pattern, pr);
if (fr === fl) return true;
}
return false;
}
if (p === false || p === GLOBSTAR) return false;
var hit;
if (typeof p === "string") {
hit = f === p;
@@ -61840,7 +61939,7 @@ var require_fxp = __commonJS({
}, o: (t2, e2) => Object.prototype.hasOwnProperty.call(t2, e2), r: (t2) => {
"undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(t2, Symbol.toStringTag, { value: "Module" }), Object.defineProperty(t2, "__esModule", { value: true });
} }, e = {};
t.r(e), t.d(e, { XMLBuilder: () => dt, XMLParser: () => it, XMLValidator: () => gt });
t.r(e), t.d(e, { XMLBuilder: () => gt, XMLParser: () => it, XMLValidator: () => xt });
const n = ":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", i = new RegExp("^[" + n + "][" + n + "\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$");
function s(t2, e2) {
const n2 = [];
@@ -61862,90 +61961,90 @@ var require_fxp = __commonJS({
const n2 = [];
let i2 = false, s2 = false;
"\uFEFF" === t2[0] && (t2 = t2.substr(1));
for (let o2 = 0; o2 < t2.length; o2++) if ("<" === t2[o2] && "?" === t2[o2 + 1]) {
if (o2 += 2, o2 = u(t2, o2), o2.err) return o2;
for (let r2 = 0; r2 < t2.length; r2++) if ("<" === t2[r2] && "?" === t2[r2 + 1]) {
if (r2 += 2, r2 = u(t2, r2), r2.err) return r2;
} else {
if ("<" !== t2[o2]) {
if (l(t2[o2])) continue;
return m("InvalidChar", "char '" + t2[o2] + "' is not expected.", b(t2, o2));
if ("<" !== t2[r2]) {
if (l(t2[r2])) continue;
return m("InvalidChar", "char '" + t2[r2] + "' is not expected.", N(t2, r2));
}
{
let a2 = o2;
if (o2++, "!" === t2[o2]) {
o2 = h(t2, o2);
let o2 = r2;
if (r2++, "!" === t2[r2]) {
r2 = d(t2, r2);
continue;
}
{
let d2 = false;
"/" === t2[o2] && (d2 = true, o2++);
let p2 = "";
for (; o2 < t2.length && ">" !== t2[o2] && " " !== t2[o2] && " " !== t2[o2] && "\n" !== t2[o2] && "\r" !== t2[o2]; o2++) p2 += t2[o2];
if (p2 = p2.trim(), "/" === p2[p2.length - 1] && (p2 = p2.substring(0, p2.length - 1), o2--), !r(p2)) {
let a2 = false;
"/" === t2[r2] && (a2 = true, r2++);
let h2 = "";
for (; r2 < t2.length && ">" !== t2[r2] && " " !== t2[r2] && " " !== t2[r2] && "\n" !== t2[r2] && "\r" !== t2[r2]; r2++) h2 += t2[r2];
if (h2 = h2.trim(), "/" === h2[h2.length - 1] && (h2 = h2.substring(0, h2.length - 1), r2--), !b(h2)) {
let e3;
return e3 = 0 === p2.trim().length ? "Invalid space after '<'." : "Tag '" + p2 + "' is an invalid name.", m("InvalidTag", e3, b(t2, o2));
return e3 = 0 === h2.trim().length ? "Invalid space after '<'." : "Tag '" + h2 + "' is an invalid name.", m("InvalidTag", e3, N(t2, r2));
}
const c2 = f(t2, o2);
if (false === c2) return m("InvalidAttr", "Attributes for '" + p2 + "' have open quote.", b(t2, o2));
let E2 = c2.value;
if (o2 = c2.index, "/" === E2[E2.length - 1]) {
const n3 = o2 - E2.length;
E2 = E2.substring(0, E2.length - 1);
const s3 = g(E2, e2);
if (true !== s3) return m(s3.err.code, s3.err.msg, b(t2, n3 + s3.err.line));
const p2 = c(t2, r2);
if (false === p2) return m("InvalidAttr", "Attributes for '" + h2 + "' have open quote.", N(t2, r2));
let f2 = p2.value;
if (r2 = p2.index, "/" === f2[f2.length - 1]) {
const n3 = r2 - f2.length;
f2 = f2.substring(0, f2.length - 1);
const s3 = g(f2, e2);
if (true !== s3) return m(s3.err.code, s3.err.msg, N(t2, n3 + s3.err.line));
i2 = true;
} else if (d2) {
if (!c2.tagClosed) return m("InvalidTag", "Closing tag '" + p2 + "' doesn't have proper closing.", b(t2, o2));
if (E2.trim().length > 0) return m("InvalidTag", "Closing tag '" + p2 + "' can't have attributes or invalid starting.", b(t2, a2));
if (0 === n2.length) return m("InvalidTag", "Closing tag '" + p2 + "' has not been opened.", b(t2, a2));
} else if (a2) {
if (!p2.tagClosed) return m("InvalidTag", "Closing tag '" + h2 + "' doesn't have proper closing.", N(t2, r2));
if (f2.trim().length > 0) return m("InvalidTag", "Closing tag '" + h2 + "' can't have attributes or invalid starting.", N(t2, o2));
if (0 === n2.length) return m("InvalidTag", "Closing tag '" + h2 + "' has not been opened.", N(t2, o2));
{
const e3 = n2.pop();
if (p2 !== e3.tagName) {
let n3 = b(t2, e3.tagStartPos);
return m("InvalidTag", "Expected closing tag '" + e3.tagName + "' (opened in line " + n3.line + ", col " + n3.col + ") instead of closing tag '" + p2 + "'.", b(t2, a2));
if (h2 !== e3.tagName) {
let n3 = N(t2, e3.tagStartPos);
return m("InvalidTag", "Expected closing tag '" + e3.tagName + "' (opened in line " + n3.line + ", col " + n3.col + ") instead of closing tag '" + h2 + "'.", N(t2, o2));
}
0 == n2.length && (s2 = true);
}
} else {
const r2 = g(E2, e2);
if (true !== r2) return m(r2.err.code, r2.err.msg, b(t2, o2 - E2.length + r2.err.line));
if (true === s2) return m("InvalidXml", "Multiple possible root nodes found.", b(t2, o2));
-1 !== e2.unpairedTags.indexOf(p2) || n2.push({ tagName: p2, tagStartPos: a2 }), i2 = true;
const a3 = g(f2, e2);
if (true !== a3) return m(a3.err.code, a3.err.msg, N(t2, r2 - f2.length + a3.err.line));
if (true === s2) return m("InvalidXml", "Multiple possible root nodes found.", N(t2, r2));
-1 !== e2.unpairedTags.indexOf(h2) || n2.push({ tagName: h2, tagStartPos: o2 }), i2 = true;
}
for (o2++; o2 < t2.length; o2++) if ("<" === t2[o2]) {
if ("!" === t2[o2 + 1]) {
o2++, o2 = h(t2, o2);
for (r2++; r2 < t2.length; r2++) if ("<" === t2[r2]) {
if ("!" === t2[r2 + 1]) {
r2++, r2 = d(t2, r2);
continue;
}
if ("?" !== t2[o2 + 1]) break;
if (o2 = u(t2, ++o2), o2.err) return o2;
} else if ("&" === t2[o2]) {
const e3 = x(t2, o2);
if (-1 == e3) return m("InvalidChar", "char '&' is not expected.", b(t2, o2));
o2 = e3;
} else if (true === s2 && !l(t2[o2])) return m("InvalidXml", "Extra text at the end", b(t2, o2));
"<" === t2[o2] && o2--;
if ("?" !== t2[r2 + 1]) break;
if (r2 = u(t2, ++r2), r2.err) return r2;
} else if ("&" === t2[r2]) {
const e3 = x(t2, r2);
if (-1 == e3) return m("InvalidChar", "char '&' is not expected.", N(t2, r2));
r2 = e3;
} else if (true === s2 && !l(t2[r2])) return m("InvalidXml", "Extra text at the end", N(t2, r2));
"<" === t2[r2] && r2--;
}
}
}
return i2 ? 1 == n2.length ? m("InvalidTag", "Unclosed tag '" + n2[0].tagName + "'.", b(t2, n2[0].tagStartPos)) : !(n2.length > 0) || m("InvalidXml", "Invalid '" + JSON.stringify(n2.map(((t3) => t3.tagName)), null, 4).replace(/\r?\n/g, "") + "' found.", { line: 1, col: 1 }) : m("InvalidXml", "Start tag expected.", 1);
return i2 ? 1 == n2.length ? m("InvalidTag", "Unclosed tag '" + n2[0].tagName + "'.", N(t2, n2[0].tagStartPos)) : !(n2.length > 0) || m("InvalidXml", "Invalid '" + JSON.stringify(n2.map((t3) => t3.tagName), null, 4).replace(/\r?\n/g, "") + "' found.", { line: 1, col: 1 }) : m("InvalidXml", "Start tag expected.", 1);
}
function l(t2) {
return " " === t2 || " " === t2 || "\n" === t2 || "\r" === t2;
}
function u(t2, e2) {
const n2 = e2;
for (; e2 < t2.length; e2++) if ("?" != t2[e2] && " " != t2[e2]) ;
else {
for (; e2 < t2.length; e2++) if ("?" == t2[e2] || " " == t2[e2]) {
const i2 = t2.substr(n2, e2 - n2);
if (e2 > 5 && "xml" === i2) return m("InvalidXml", "XML declaration allowed only at the start of the document.", b(t2, e2));
if (e2 > 5 && "xml" === i2) return m("InvalidXml", "XML declaration allowed only at the start of the document.", N(t2, e2));
if ("?" == t2[e2] && ">" == t2[e2 + 1]) {
e2++;
break;
}
continue;
}
return e2;
}
function h(t2, e2) {
function d(t2, e2) {
if (t2.length > e2 + 5 && "-" === t2[e2 + 1] && "-" === t2[e2 + 2]) {
for (e2 += 3; e2 < t2.length; e2++) if ("-" === t2[e2] && "-" === t2[e2 + 1] && ">" === t2[e2 + 2]) {
e2 += 2;
@@ -61963,11 +62062,11 @@ var require_fxp = __commonJS({
}
return e2;
}
const d = '"', p = "'";
function f(t2, e2) {
const h = '"', p = "'";
function c(t2, e2) {
let n2 = "", i2 = "", s2 = false;
for (; e2 < t2.length; e2++) {
if (t2[e2] === d || t2[e2] === p) "" === i2 ? i2 = t2[e2] : i2 !== t2[e2] || (i2 = "");
if (t2[e2] === h || t2[e2] === p) "" === i2 ? i2 = t2[e2] : i2 !== t2[e2] || (i2 = "");
else if (">" === t2[e2] && "" === i2) {
s2 = true;
break;
@@ -61976,16 +62075,16 @@ var require_fxp = __commonJS({
}
return "" === i2 && { value: n2, index: e2, tagClosed: s2 };
}
const c = new RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`, "g");
const f = new RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`, "g");
function g(t2, e2) {
const n2 = s(t2, c), i2 = {};
const n2 = s(t2, f), i2 = {};
for (let t3 = 0; t3 < n2.length; t3++) {
if (0 === n2[t3][1].length) return m("InvalidAttr", "Attribute '" + n2[t3][2] + "' has no space in starting.", N(n2[t3]));
if (void 0 !== n2[t3][3] && void 0 === n2[t3][4]) return m("InvalidAttr", "Attribute '" + n2[t3][2] + "' is without value.", N(n2[t3]));
if (void 0 === n2[t3][3] && !e2.allowBooleanAttributes) return m("InvalidAttr", "boolean attribute '" + n2[t3][2] + "' is not allowed.", N(n2[t3]));
if (0 === n2[t3][1].length) return m("InvalidAttr", "Attribute '" + n2[t3][2] + "' has no space in starting.", y(n2[t3]));
if (void 0 !== n2[t3][3] && void 0 === n2[t3][4]) return m("InvalidAttr", "Attribute '" + n2[t3][2] + "' is without value.", y(n2[t3]));
if (void 0 === n2[t3][3] && !e2.allowBooleanAttributes) return m("InvalidAttr", "boolean attribute '" + n2[t3][2] + "' is not allowed.", y(n2[t3]));
const s2 = n2[t3][2];
if (!E(s2)) return m("InvalidAttr", "Attribute '" + s2 + "' is an invalid name.", N(n2[t3]));
if (i2.hasOwnProperty(s2)) return m("InvalidAttr", "Attribute '" + s2 + "' is repeated.", N(n2[t3]));
if (!E(s2)) return m("InvalidAttr", "Attribute '" + s2 + "' is an invalid name.", y(n2[t3]));
if (Object.prototype.hasOwnProperty.call(i2, s2)) return m("InvalidAttr", "Attribute '" + s2 + "' is repeated.", y(n2[t3]));
i2[s2] = 1;
}
return true;
@@ -62013,49 +62112,52 @@ var require_fxp = __commonJS({
function E(t2) {
return r(t2);
}
function b(t2, e2) {
function b(t2) {
return r(t2);
}
function N(t2, e2) {
const n2 = t2.substring(0, e2).split(/\r?\n/);
return { line: n2.length, col: n2[n2.length - 1].length + 1 };
}
function N(t2) {
function y(t2) {
return t2.startIndex + t2[1].length;
}
const y = { preserveOrder: false, attributeNamePrefix: "@_", attributesGroupName: false, textNodeName: "#text", ignoreAttributes: true, removeNSPrefix: false, allowBooleanAttributes: false, parseTagValue: true, parseAttributeValue: false, trimValues: true, cdataPropName: false, numberParseOptions: { hex: true, leadingZeros: true, eNotation: true }, tagValueProcessor: function(t2, e2) {
const T = { preserveOrder: false, attributeNamePrefix: "@_", attributesGroupName: false, textNodeName: "#text", ignoreAttributes: true, removeNSPrefix: false, allowBooleanAttributes: false, parseTagValue: true, parseAttributeValue: false, trimValues: true, cdataPropName: false, numberParseOptions: { hex: true, leadingZeros: true, eNotation: true }, tagValueProcessor: function(t2, e2) {
return e2;
}, attributeValueProcessor: function(t2, e2) {
return e2;
}, stopNodes: [], alwaysCreateTextNode: false, isArray: () => false, commentPropName: false, unpairedTags: [], processEntities: true, htmlEntities: false, ignoreDeclaration: false, ignorePiTags: false, transformTagName: false, transformAttributeName: false, updateTag: function(t2, e2, n2) {
return t2;
}, captureMetaData: false };
function T(t2) {
return "boolean" == typeof t2 ? { enabled: t2, maxEntitySize: 1e4, maxExpansionDepth: 10, maxTotalExpansions: 1e3, maxExpandedLength: 1e5, allowedTags: null, tagFilter: null } : "object" == typeof t2 && null !== t2 ? { enabled: false !== t2.enabled, maxEntitySize: t2.maxEntitySize ?? 1e4, maxExpansionDepth: t2.maxExpansionDepth ?? 10, maxTotalExpansions: t2.maxTotalExpansions ?? 1e3, maxExpandedLength: t2.maxExpandedLength ?? 1e5, allowedTags: t2.allowedTags ?? null, tagFilter: t2.tagFilter ?? null } : T(true);
}, captureMetaData: false, maxNestedTags: 100, strictReservedNames: true };
function w(t2) {
return "boolean" == typeof t2 ? { enabled: t2, maxEntitySize: 1e4, maxExpansionDepth: 10, maxTotalExpansions: 1e3, maxExpandedLength: 1e5, allowedTags: null, tagFilter: null } : "object" == typeof t2 && null !== t2 ? { enabled: false !== t2.enabled, maxEntitySize: t2.maxEntitySize ?? 1e4, maxExpansionDepth: t2.maxExpansionDepth ?? 10, maxTotalExpansions: t2.maxTotalExpansions ?? 1e3, maxExpandedLength: t2.maxExpandedLength ?? 1e5, allowedTags: t2.allowedTags ?? null, tagFilter: t2.tagFilter ?? null } : w(true);
}
const w = function(t2) {
const e2 = Object.assign({}, y, t2);
return e2.processEntities = T(e2.processEntities), e2;
const v = function(t2) {
const e2 = Object.assign({}, T, t2);
return e2.processEntities = w(e2.processEntities), e2;
};
let v;
v = "function" != typeof Symbol ? "@@xmlMetadata" : /* @__PURE__ */ Symbol("XML Node Metadata");
let O;
O = "function" != typeof Symbol ? "@@xmlMetadata" : /* @__PURE__ */ Symbol("XML Node Metadata");
class I {
constructor(t2) {
this.tagname = t2, this.child = [], this[":@"] = {};
this.tagname = t2, this.child = [], this[":@"] = /* @__PURE__ */ Object.create(null);
}
add(t2, e2) {
"__proto__" === t2 && (t2 = "#__proto__"), this.child.push({ [t2]: e2 });
}
addChild(t2, e2) {
"__proto__" === t2.tagname && (t2.tagname = "#__proto__"), t2[":@"] && Object.keys(t2[":@"]).length > 0 ? this.child.push({ [t2.tagname]: t2.child, ":@": t2[":@"] }) : this.child.push({ [t2.tagname]: t2.child }), void 0 !== e2 && (this.child[this.child.length - 1][v] = { startIndex: e2 });
"__proto__" === t2.tagname && (t2.tagname = "#__proto__"), t2[":@"] && Object.keys(t2[":@"]).length > 0 ? this.child.push({ [t2.tagname]: t2.child, ":@": t2[":@"] }) : this.child.push({ [t2.tagname]: t2.child }), void 0 !== e2 && (this.child[this.child.length - 1][O] = { startIndex: e2 });
}
static getMetaDataSymbol() {
return v;
return O;
}
}
class O {
class P {
constructor(t2) {
this.suppressValidationErr = !t2, this.options = t2;
}
readDocType(t2, e2) {
const n2 = {};
const n2 = /* @__PURE__ */ Object.create(null);
if ("O" !== t2[e2 + 3] || "C" !== t2[e2 + 4] || "T" !== t2[e2 + 5] || "Y" !== t2[e2 + 6] || "P" !== t2[e2 + 7] || "E" !== t2[e2 + 8]) throw new Error("Invalid Tag instead of DOCTYPE");
{
e2 += 9;
@@ -62064,23 +62166,23 @@ var require_fxp = __commonJS({
if (r2 ? "-" === t2[e2 - 1] && "-" === t2[e2 - 2] && (r2 = false, i2--) : i2--, 0 === i2) break;
} else "[" === t2[e2] ? s2 = true : o2 += t2[e2];
else {
if (s2 && A(t2, "!ENTITY", e2)) {
if (s2 && S(t2, "!ENTITY", e2)) {
let i3, s3;
if (e2 += 7, [i3, s3, e2] = this.readEntityExp(t2, e2 + 1, this.suppressValidationErr), -1 === s3.indexOf("&")) {
const t3 = i3.replace(/[.\-+*:]/g, "\\.");
n2[i3] = { regx: RegExp(`&${t3};`, "g"), val: s3 };
}
} else if (s2 && A(t2, "!ELEMENT", e2)) {
} else if (s2 && S(t2, "!ELEMENT", e2)) {
e2 += 8;
const { index: n3 } = this.readElementExp(t2, e2 + 1);
e2 = n3;
} else if (s2 && A(t2, "!ATTLIST", e2)) e2 += 8;
else if (s2 && A(t2, "!NOTATION", e2)) {
} else if (s2 && S(t2, "!ATTLIST", e2)) e2 += 8;
else if (s2 && S(t2, "!NOTATION", e2)) {
e2 += 9;
const { index: n3 } = this.readNotationExp(t2, e2 + 1, this.suppressValidationErr);
e2 = n3;
} else {
if (!A(t2, "!--", e2)) throw new Error("Invalid DOCTYPE");
if (!S(t2, "!--", e2)) throw new Error("Invalid DOCTYPE");
r2 = true;
}
i2++, o2 = "";
@@ -62090,10 +62192,10 @@ var require_fxp = __commonJS({
return { entities: n2, i: e2 };
}
readEntityExp(t2, e2) {
e2 = P(t2, e2);
e2 = A(t2, e2);
let n2 = "";
for (; e2 < t2.length && !/\s/.test(t2[e2]) && '"' !== t2[e2] && "'" !== t2[e2]; ) n2 += t2[e2], e2++;
if (S(n2), e2 = P(t2, e2), !this.suppressValidationErr) {
if (C(n2), e2 = A(t2, e2), !this.suppressValidationErr) {
if ("SYSTEM" === t2.substring(e2, e2 + 6).toUpperCase()) throw new Error("External entities are not supported");
if ("%" === t2[e2]) throw new Error("Parameter entities are not supported");
}
@@ -62102,15 +62204,15 @@ var require_fxp = __commonJS({
return [n2, i2, --e2];
}
readNotationExp(t2, e2) {
e2 = P(t2, e2);
e2 = A(t2, e2);
let n2 = "";
for (; e2 < t2.length && !/\s/.test(t2[e2]); ) n2 += t2[e2], e2++;
!this.suppressValidationErr && S(n2), e2 = P(t2, e2);
!this.suppressValidationErr && C(n2), e2 = A(t2, e2);
const i2 = t2.substring(e2, e2 + 6).toUpperCase();
if (!this.suppressValidationErr && "SYSTEM" !== i2 && "PUBLIC" !== i2) throw new Error(`Expected SYSTEM or PUBLIC, found "${i2}"`);
e2 += i2.length, e2 = P(t2, e2);
e2 += i2.length, e2 = A(t2, e2);
let s2 = null, r2 = null;
if ("PUBLIC" === i2) [e2, s2] = this.readIdentifierVal(t2, e2, "publicIdentifier"), '"' !== t2[e2 = P(t2, e2)] && "'" !== t2[e2] || ([e2, r2] = this.readIdentifierVal(t2, e2, "systemIdentifier"));
if ("PUBLIC" === i2) [e2, s2] = this.readIdentifierVal(t2, e2, "publicIdentifier"), '"' !== t2[e2 = A(t2, e2)] && "'" !== t2[e2] || ([e2, r2] = this.readIdentifierVal(t2, e2, "systemIdentifier"));
else if ("SYSTEM" === i2 && ([e2, r2] = this.readIdentifierVal(t2, e2, "systemIdentifier"), !this.suppressValidationErr && !r2)) throw new Error("Missing mandatory system identifier for SYSTEM notation");
return { notationName: n2, publicIdentifier: s2, systemIdentifier: r2, index: --e2 };
}
@@ -62123,13 +62225,13 @@ var require_fxp = __commonJS({
return [++e2, i2];
}
readElementExp(t2, e2) {
e2 = P(t2, e2);
e2 = A(t2, e2);
let n2 = "";
for (; e2 < t2.length && !/\s/.test(t2[e2]); ) n2 += t2[e2], e2++;
if (!this.suppressValidationErr && !r(n2)) throw new Error(`Invalid element name: "${n2}"`);
let i2 = "";
if ("E" === t2[e2 = P(t2, e2)] && A(t2, "MPTY", e2)) e2 += 4;
else if ("A" === t2[e2] && A(t2, "NY", e2)) e2 += 2;
if ("E" === t2[e2 = A(t2, e2)] && S(t2, "MPTY", e2)) e2 += 4;
else if ("A" === t2[e2] && S(t2, "NY", e2)) e2 += 2;
else if ("(" === t2[e2]) {
for (e2++; e2 < t2.length && ")" !== t2[e2]; ) i2 += t2[e2], e2++;
if (")" !== t2[e2]) throw new Error("Unterminated content model");
@@ -62137,24 +62239,24 @@ var require_fxp = __commonJS({
return { elementName: n2, contentModel: i2.trim(), index: e2 };
}
readAttlistExp(t2, e2) {
e2 = P(t2, e2);
e2 = A(t2, e2);
let n2 = "";
for (; e2 < t2.length && !/\s/.test(t2[e2]); ) n2 += t2[e2], e2++;
S(n2), e2 = P(t2, e2);
C(n2), e2 = A(t2, e2);
let i2 = "";
for (; e2 < t2.length && !/\s/.test(t2[e2]); ) i2 += t2[e2], e2++;
if (!S(i2)) throw new Error(`Invalid attribute name: "${i2}"`);
e2 = P(t2, e2);
if (!C(i2)) throw new Error(`Invalid attribute name: "${i2}"`);
e2 = A(t2, e2);
let s2 = "";
if ("NOTATION" === t2.substring(e2, e2 + 8).toUpperCase()) {
if (s2 = "NOTATION", "(" !== t2[e2 = P(t2, e2 += 8)]) throw new Error(`Expected '(', found "${t2[e2]}"`);
if (s2 = "NOTATION", "(" !== t2[e2 = A(t2, e2 += 8)]) throw new Error(`Expected '(', found "${t2[e2]}"`);
e2++;
let n3 = [];
for (; e2 < t2.length && ")" !== t2[e2]; ) {
let i3 = "";
for (; e2 < t2.length && "|" !== t2[e2] && ")" !== t2[e2]; ) i3 += t2[e2], e2++;
if (i3 = i3.trim(), !S(i3)) throw new Error(`Invalid notation name: "${i3}"`);
n3.push(i3), "|" === t2[e2] && (e2++, e2 = P(t2, e2));
if (i3 = i3.trim(), !C(i3)) throw new Error(`Invalid notation name: "${i3}"`);
n3.push(i3), "|" === t2[e2] && (e2++, e2 = A(t2, e2));
}
if (")" !== t2[e2]) throw new Error("Unterminated list of notations");
e2++, s2 += " (" + n3.join("|") + ")";
@@ -62163,45 +62265,43 @@ var require_fxp = __commonJS({
const n3 = ["CDATA", "ID", "IDREF", "IDREFS", "ENTITY", "ENTITIES", "NMTOKEN", "NMTOKENS"];
if (!this.suppressValidationErr && !n3.includes(s2.toUpperCase())) throw new Error(`Invalid attribute type: "${s2}"`);
}
e2 = P(t2, e2);
e2 = A(t2, e2);
let r2 = "";
return "#REQUIRED" === t2.substring(e2, e2 + 8).toUpperCase() ? (r2 = "#REQUIRED", e2 += 8) : "#IMPLIED" === t2.substring(e2, e2 + 7).toUpperCase() ? (r2 = "#IMPLIED", e2 += 7) : [e2, r2] = this.readIdentifierVal(t2, e2, "ATTLIST"), { elementName: n2, attributeName: i2, attributeType: s2, defaultValue: r2, index: e2 };
}
}
const P = (t2, e2) => {
const A = (t2, e2) => {
for (; e2 < t2.length && /\s/.test(t2[e2]); ) e2++;
return e2;
};
function A(t2, e2, n2) {
function S(t2, e2, n2) {
for (let i2 = 0; i2 < e2.length; i2++) if (e2[i2] !== t2[n2 + i2 + 1]) return false;
return true;
}
function S(t2) {
function C(t2) {
if (r(t2)) return t2;
throw new Error(`Invalid entity name ${t2}`);
}
const C = /^[-+]?0x[a-fA-F0-9]+$/, $ = /^([\-\+])?(0*)([0-9]*(\.[0-9]*)?)$/, V = { hex: true, leadingZeros: true, decimalPoint: ".", eNotation: true };
const D = /^([-+])?(0*)(\d*(\.\d*)?[eE][-\+]?\d+)$/;
function L(t2) {
return "function" == typeof t2 ? t2 : Array.isArray(t2) ? (e2) => {
for (const n2 of t2) {
if ("string" == typeof n2 && e2 === n2) return true;
if (n2 instanceof RegExp && n2.test(e2)) return true;
}
} : () => false;
}
class F {
const $ = /^[-+]?0x[a-fA-F0-9]+$/, V = /^([\-\+])?(0*)([0-9]*(\.[0-9]*)?)$/, D = { hex: true, leadingZeros: true, decimalPoint: ".", eNotation: true };
const j = /^([-+])?(0*)(\d*(\.\d*)?[eE][-\+]?\d+)$/;
class L {
constructor(t2) {
if (this.options = t2, this.currentNode = null, this.tagsNodeStack = [], this.docTypeEntities = {}, this.lastEntities = { apos: { regex: /&(apos|#39|#x27);/g, val: "'" }, gt: { regex: /&(gt|#62|#x3E);/g, val: ">" }, lt: { regex: /&(lt|#60|#x3C);/g, val: "<" }, quot: { regex: /&(quot|#34|#x22);/g, val: '"' } }, this.ampEntity = { regex: /&(amp|#38|#x26);/g, val: "&" }, this.htmlEntities = { space: { regex: /&(nbsp|#160);/g, val: " " }, cent: { regex: /&(cent|#162);/g, val: "\xA2" }, pound: { regex: /&(pound|#163);/g, val: "\xA3" }, yen: { regex: /&(yen|#165);/g, val: "\xA5" }, euro: { regex: /&(euro|#8364);/g, val: "\u20AC" }, copyright: { regex: /&(copy|#169);/g, val: "\xA9" }, reg: { regex: /&(reg|#174);/g, val: "\xAE" }, inr: { regex: /&(inr|#8377);/g, val: "\u20B9" }, num_dec: { regex: /&#([0-9]{1,7});/g, val: (t3, e2) => K(e2, 10, "&#") }, num_hex: { regex: /&#x([0-9a-fA-F]{1,6});/g, val: (t3, e2) => K(e2, 16, "&#x") } }, this.addExternalEntities = j, this.parseXml = B, this.parseTextData = M, this.resolveNameSpace = _, this.buildAttributesMap = U, this.isItStopNode = X, this.replaceEntitiesValue = Y, this.readStopNodeData = q, this.saveTextToParentTag = G, this.addChild = R, this.ignoreAttributesFn = L(this.options.ignoreAttributes), this.entityExpansionCount = 0, this.currentExpandedLength = 0, this.options.stopNodes && this.options.stopNodes.length > 0) {
var e2;
if (this.options = t2, this.currentNode = null, this.tagsNodeStack = [], this.docTypeEntities = {}, this.lastEntities = { apos: { regex: /&(apos|#39|#x27);/g, val: "'" }, gt: { regex: /&(gt|#62|#x3E);/g, val: ">" }, lt: { regex: /&(lt|#60|#x3C);/g, val: "<" }, quot: { regex: /&(quot|#34|#x22);/g, val: '"' } }, this.ampEntity = { regex: /&(amp|#38|#x26);/g, val: "&" }, this.htmlEntities = { space: { regex: /&(nbsp|#160);/g, val: " " }, cent: { regex: /&(cent|#162);/g, val: "\xA2" }, pound: { regex: /&(pound|#163);/g, val: "\xA3" }, yen: { regex: /&(yen|#165);/g, val: "\xA5" }, euro: { regex: /&(euro|#8364);/g, val: "\u20AC" }, copyright: { regex: /&(copy|#169);/g, val: "\xA9" }, reg: { regex: /&(reg|#174);/g, val: "\xAE" }, inr: { regex: /&(inr|#8377);/g, val: "\u20B9" }, num_dec: { regex: /&#([0-9]{1,7});/g, val: (t3, e3) => K(e3, 10, "&#") }, num_hex: { regex: /&#x([0-9a-fA-F]{1,6});/g, val: (t3, e3) => K(e3, 16, "&#x") } }, this.addExternalEntities = F, this.parseXml = R, this.parseTextData = M, this.resolveNameSpace = k, this.buildAttributesMap = U, this.isItStopNode = X, this.replaceEntitiesValue = Y, this.readStopNodeData = q, this.saveTextToParentTag = G, this.addChild = B, this.ignoreAttributesFn = "function" == typeof (e2 = this.options.ignoreAttributes) ? e2 : Array.isArray(e2) ? (t3) => {
for (const n2 of e2) {
if ("string" == typeof n2 && t3 === n2) return true;
if (n2 instanceof RegExp && n2.test(t3)) return true;
}
} : () => false, this.entityExpansionCount = 0, this.currentExpandedLength = 0, this.options.stopNodes && this.options.stopNodes.length > 0) {
this.stopNodesExact = /* @__PURE__ */ new Set(), this.stopNodesWildcard = /* @__PURE__ */ new Set();
for (let t3 = 0; t3 < this.options.stopNodes.length; t3++) {
const e2 = this.options.stopNodes[t3];
"string" == typeof e2 && (e2.startsWith("*.") ? this.stopNodesWildcard.add(e2.substring(2)) : this.stopNodesExact.add(e2));
const e3 = this.options.stopNodes[t3];
"string" == typeof e3 && (e3.startsWith("*.") ? this.stopNodesWildcard.add(e3.substring(2)) : this.stopNodesExact.add(e3));
}
}
}
}
function j(t2) {
function F(t2) {
const e2 = Object.keys(t2);
for (let n2 = 0; n2 < e2.length; n2++) {
const i2 = e2[n2], s2 = i2.replace(/[.\-+*:]/g, "\\.");
@@ -62215,7 +62315,7 @@ var require_fxp = __commonJS({
return null == i3 ? t2 : typeof i3 != typeof t2 || i3 !== t2 ? i3 : this.options.trimValues || t2.trim() === t2 ? Z(t2, this.options.parseTagValue, this.options.numberParseOptions) : t2;
}
}
function _(t2) {
function k(t2) {
if (this.options.removeNSPrefix) {
const e2 = t2.split(":"), n2 = "/" === t2.charAt(0) ? "/" : "";
if ("xmlns" === e2[0]) return "";
@@ -62223,10 +62323,10 @@ var require_fxp = __commonJS({
}
return t2;
}
const k = new RegExp(`([^\\s=]+)\\s*(=\\s*(['"])([\\s\\S]*?)\\3)?`, "gm");
const _ = new RegExp(`([^\\s=]+)\\s*(=\\s*(['"])([\\s\\S]*?)\\3)?`, "gm");
function U(t2, e2, n2) {
if (true !== this.options.ignoreAttributes && "string" == typeof t2) {
const i2 = s(t2, k), r2 = i2.length, o2 = {};
const i2 = s(t2, _), r2 = i2.length, o2 = {};
for (let t3 = 0; t3 < r2; t3++) {
const s2 = this.resolveNameSpace(i2[t3][1]);
if (this.ignoreAttributesFn(s2, e2)) continue;
@@ -62245,12 +62345,12 @@ var require_fxp = __commonJS({
return o2;
}
}
const B = function(t2) {
const R = function(t2) {
t2 = t2.replace(/\r\n?/g, "\n");
const e2 = new I("!xml");
let n2 = e2, i2 = "", s2 = "";
this.entityExpansionCount = 0, this.currentExpandedLength = 0;
const r2 = new O(this.options.processEntities);
const r2 = new P(this.options.processEntities);
for (let o2 = 0; o2 < t2.length; o2++) if ("<" === t2[o2]) if ("/" === t2[o2 + 1]) {
const e3 = z(t2, ">", o2, "Closing Tag is not closed.");
let r3 = t2.substring(o2 + 2, e3).trim();
@@ -62290,26 +62390,27 @@ var require_fxp = __commonJS({
} else {
let r3 = W(t2, o2, this.options.removeNSPrefix), a2 = r3.tagName;
const l2 = r3.rawTagName;
let u2 = r3.tagExp, h2 = r3.attrExpPresent, d2 = r3.closeIndex;
let u2 = r3.tagExp, d2 = r3.attrExpPresent, h2 = r3.closeIndex;
if (this.options.transformTagName) {
const t3 = this.options.transformTagName(a2);
u2 === a2 && (u2 = t3), a2 = t3;
}
if (this.options.strictReservedNames && (a2 === this.options.commentPropName || a2 === this.options.cdataPropName)) throw new Error(`Invalid tag name: ${a2}`);
n2 && i2 && "!xml" !== n2.tagname && (i2 = this.saveTextToParentTag(i2, n2, s2, false));
const p2 = n2;
p2 && -1 !== this.options.unpairedTags.indexOf(p2.tagname) && (n2 = this.tagsNodeStack.pop(), s2 = s2.substring(0, s2.lastIndexOf("."))), a2 !== e2.tagname && (s2 += s2 ? "." + a2 : a2);
const f2 = o2;
const c2 = o2;
if (this.isItStopNode(this.stopNodesExact, this.stopNodesWildcard, s2, a2)) {
let e3 = "";
if (u2.length > 0 && u2.lastIndexOf("/") === u2.length - 1) "/" === a2[a2.length - 1] ? (a2 = a2.substr(0, a2.length - 1), s2 = s2.substr(0, s2.length - 1), u2 = a2) : u2 = u2.substr(0, u2.length - 1), o2 = r3.closeIndex;
else if (-1 !== this.options.unpairedTags.indexOf(a2)) o2 = r3.closeIndex;
else {
const n3 = this.readStopNodeData(t2, l2, d2 + 1);
const n3 = this.readStopNodeData(t2, l2, h2 + 1);
if (!n3) throw new Error(`Unexpected end of ${l2}`);
o2 = n3.i, e3 = n3.tagContent;
}
const i3 = new I(a2);
a2 !== u2 && h2 && (i3[":@"] = this.buildAttributesMap(u2, s2, a2)), e3 && (e3 = this.parseTextData(e3, a2, s2, true, h2, true, true)), s2 = s2.substr(0, s2.lastIndexOf(".")), i3.add(this.options.textNodeName, e3), this.addChild(n2, i3, s2, f2);
a2 !== u2 && d2 && (i3[":@"] = this.buildAttributesMap(u2, s2, a2)), e3 && (e3 = this.parseTextData(e3, a2, s2, true, d2, true, true)), s2 = s2.substr(0, s2.lastIndexOf(".")), i3.add(this.options.textNodeName, e3), this.addChild(n2, i3, s2, c2);
} else {
if (u2.length > 0 && u2.lastIndexOf("/") === u2.length - 1) {
if ("/" === a2[a2.length - 1] ? (a2 = a2.substr(0, a2.length - 1), s2 = s2.substr(0, s2.length - 1), u2 = a2) : u2 = u2.substr(0, u2.length - 1), this.options.transformTagName) {
@@ -62317,18 +62418,26 @@ var require_fxp = __commonJS({
u2 === a2 && (u2 = t4), a2 = t4;
}
const t3 = new I(a2);
a2 !== u2 && h2 && (t3[":@"] = this.buildAttributesMap(u2, s2, a2)), this.addChild(n2, t3, s2, f2), s2 = s2.substr(0, s2.lastIndexOf("."));
a2 !== u2 && d2 && (t3[":@"] = this.buildAttributesMap(u2, s2, a2)), this.addChild(n2, t3, s2, c2), s2 = s2.substr(0, s2.lastIndexOf("."));
} else {
const t3 = new I(a2);
this.tagsNodeStack.push(n2), a2 !== u2 && h2 && (t3[":@"] = this.buildAttributesMap(u2, s2, a2)), this.addChild(n2, t3, s2, f2), n2 = t3;
if (-1 !== this.options.unpairedTags.indexOf(a2)) {
const t3 = new I(a2);
a2 !== u2 && d2 && (t3[":@"] = this.buildAttributesMap(u2, s2)), this.addChild(n2, t3, s2, c2), s2 = s2.substr(0, s2.lastIndexOf(".")), o2 = r3.closeIndex;
continue;
}
{
const t3 = new I(a2);
if (this.tagsNodeStack.length > this.options.maxNestedTags) throw new Error("Maximum nested tags exceeded");
this.tagsNodeStack.push(n2), a2 !== u2 && d2 && (t3[":@"] = this.buildAttributesMap(u2, s2, a2)), this.addChild(n2, t3, s2, c2), n2 = t3;
}
}
i2 = "", o2 = d2;
i2 = "", o2 = h2;
}
}
else i2 += t2[o2];
return e2.child;
};
function R(t2, e2, n2, i2) {
function B(t2, e2, n2, i2) {
this.options.captureMetaData || (i2 = void 0);
const s2 = this.options.updateTag(e2.tagname, n2, e2[":@"]);
false === s2 || ("string" == typeof s2 ? (e2.tagname = s2, t2.addChild(e2, i2)) : t2.addChild(e2, i2));
@@ -62389,12 +62498,12 @@ var require_fxp = __commonJS({
const o2 = s2.index, a2 = r2.search(/\s/);
let l2 = r2, u2 = true;
-1 !== a2 && (l2 = r2.substring(0, a2), r2 = r2.substring(a2 + 1).trimStart());
const h2 = l2;
const d2 = l2;
if (n2) {
const t3 = l2.indexOf(":");
-1 !== t3 && (l2 = l2.substr(t3 + 1), u2 = l2 !== s2.data.substr(t3 + 1));
}
return { tagName: l2, tagExp: r2, closeIndex: o2, attrExpPresent: u2, rawTagName: h2 };
return { tagName: l2, tagExp: r2, closeIndex: o2, attrExpPresent: u2, rawTagName: d2 };
}
function q(t2, e2, n2) {
const i2 = n2;
@@ -62415,19 +62524,19 @@ var require_fxp = __commonJS({
if (e2 && "string" == typeof t2) {
const e3 = t2.trim();
return "true" === e3 || "false" !== e3 && (function(t3, e4 = {}) {
if (e4 = Object.assign({}, V, e4), !t3 || "string" != typeof t3) return t3;
if (e4 = Object.assign({}, D, e4), !t3 || "string" != typeof t3) return t3;
let n3 = t3.trim();
if (void 0 !== e4.skipLike && e4.skipLike.test(n3)) return t3;
if ("0" === t3) return 0;
if (e4.hex && C.test(n3)) return (function(t4) {
if (e4.hex && $.test(n3)) return (function(t4) {
if (parseInt) return parseInt(t4, 16);
if (Number.parseInt) return Number.parseInt(t4, 16);
if (window && window.parseInt) return window.parseInt(t4, 16);
throw new Error("parseInt, Number.parseInt, window.parseInt are not supported");
})(n3);
if (-1 !== n3.search(/.+[eE].+/)) return (function(t4, e5, n4) {
if (n3.includes("e") || n3.includes("E")) return (function(t4, e5, n4) {
if (!n4.eNotation) return t4;
const i3 = e5.match(D);
const i3 = e5.match(j);
if (i3) {
let s2 = i3[1] || "";
const r2 = -1 === i3[3].indexOf("e") ? "E" : "e", o2 = i3[2], a2 = s2 ? t4[o2.length + 1] === r2 : t4[o2.length] === r2;
@@ -62436,7 +62545,7 @@ var require_fxp = __commonJS({
return t4;
})(t3, n3, e4);
{
const s2 = $.exec(n3);
const s2 = V.exec(n3);
if (s2) {
const r2 = s2[1] || "", o2 = s2[2];
let a2 = (i2 = s2[3]) && -1 !== i2.indexOf(".") ? ("." === (i2 = i2.replace(/0+$/, "")) ? i2 = "0" : "." === i2[0] ? i2 = "0" + i2 : "." === i2[i2.length - 1] && (i2 = i2.substring(0, i2.length - 1)), i2) : i2;
@@ -62444,7 +62553,7 @@ var require_fxp = __commonJS({
if (!e4.leadingZeros && (o2.length > 1 || 1 === o2.length && !l2)) return t3;
{
const i3 = Number(n3), s3 = String(i3);
if (0 === i3 || -0 === i3) return i3;
if (0 === i3) return i3;
if (-1 !== s3.search(/[eE]/)) return e4.eNotation ? i3 : t3;
if (-1 !== n3.indexOf(".")) return "0" === s3 || s3 === a2 || s3 === `${r2}${a2}` ? i3 : t3;
let l3 = o2 ? a2 : n3;
@@ -62478,7 +62587,7 @@ var require_fxp = __commonJS({
if (o2[a2]) {
let t3 = H(o2[a2], e2, l2);
const n3 = nt(t3, e2);
void 0 !== o2[Q] && (t3[Q] = o2[Q]), o2[":@"] ? et(t3, o2[":@"], l2, e2) : 1 !== Object.keys(t3).length || void 0 === t3[e2.textNodeName] || e2.alwaysCreateTextNode ? 0 === Object.keys(t3).length && (e2.alwaysCreateTextNode ? t3[e2.textNodeName] = "" : t3 = "") : t3 = t3[e2.textNodeName], void 0 !== s2[a2] && s2.hasOwnProperty(a2) ? (Array.isArray(s2[a2]) || (s2[a2] = [s2[a2]]), s2[a2].push(t3)) : e2.isArray(a2, l2, n3) ? s2[a2] = [t3] : s2[a2] = t3;
o2[":@"] ? et(t3, o2[":@"], l2, e2) : 1 !== Object.keys(t3).length || void 0 === t3[e2.textNodeName] || e2.alwaysCreateTextNode ? 0 === Object.keys(t3).length && (e2.alwaysCreateTextNode ? t3[e2.textNodeName] = "" : t3 = "") : t3 = t3[e2.textNodeName], void 0 !== o2[Q] && "object" == typeof t3 && null !== t3 && (t3[Q] = o2[Q]), void 0 !== s2[a2] && Object.prototype.hasOwnProperty.call(s2, a2) ? (Array.isArray(s2[a2]) || (s2[a2] = [s2[a2]]), s2[a2].push(t3)) : e2.isArray(a2, l2, n3) ? s2[a2] = [t3] : s2[a2] = t3;
}
}
}
@@ -62506,7 +62615,7 @@ var require_fxp = __commonJS({
}
class it {
constructor(t2) {
this.externalEntities = {}, this.options = w(t2);
this.externalEntities = {}, this.options = v(t2);
}
parse(t2, e2) {
if ("string" != typeof t2 && t2.toString) t2 = t2.toString();
@@ -62516,7 +62625,7 @@ var require_fxp = __commonJS({
const n3 = a(t2, e2);
if (true !== n3) throw Error(`${n3.err.msg}:${n3.err.line}:${n3.err.col}`);
}
const n2 = new F(this.options);
const n2 = new L(this.options);
n2.addExternalEntities(this.externalEntities);
const i2 = n2.parseXml(t2);
return this.options.preserveOrder || void 0 === i2 ? i2 : J(i2, this.options);
@@ -62537,6 +62646,13 @@ var require_fxp = __commonJS({
}
function rt(t2, e2, n2, i2) {
let s2 = "", r2 = false;
if (!Array.isArray(t2)) {
if (null != t2) {
let n3 = t2.toString();
return n3 = ut(n3, e2), n3;
}
return "";
}
for (let o2 = 0; o2 < t2.length; o2++) {
const a2 = t2[o2], l2 = ot(a2);
if (void 0 === l2) continue;
@@ -62560,10 +62676,10 @@ var require_fxp = __commonJS({
o3 = 0 !== o3.length ? " " + o3 : "", s2 += n3 + `<${l2}${o3}${t3}?>`, r2 = true;
continue;
}
let h2 = i2;
"" !== h2 && (h2 += e2.indentBy);
const d2 = i2 + `<${l2}${at(a2[":@"], e2)}`, p2 = rt(a2[l2], e2, u2, h2);
-1 !== e2.unpairedTags.indexOf(l2) ? e2.suppressUnpairedNode ? s2 += d2 + ">" : s2 += d2 + "/>" : p2 && 0 !== p2.length || !e2.suppressEmptyNode ? p2 && p2.endsWith(">") ? s2 += d2 + `>${p2}${i2}</${l2}>` : (s2 += d2 + ">", p2 && "" !== i2 && (p2.includes("/>") || p2.includes("</")) ? s2 += i2 + e2.indentBy + p2 + i2 : s2 += p2, s2 += `</${l2}>`) : s2 += d2 + "/>", r2 = true;
let d2 = i2;
"" !== d2 && (d2 += e2.indentBy);
const h2 = i2 + `<${l2}${at(a2[":@"], e2)}`, p2 = rt(a2[l2], e2, u2, d2);
-1 !== e2.unpairedTags.indexOf(l2) ? e2.suppressUnpairedNode ? s2 += h2 + ">" : s2 += h2 + "/>" : p2 && 0 !== p2.length || !e2.suppressEmptyNode ? p2 && p2.endsWith(">") ? s2 += h2 + `>${p2}${i2}</${l2}>` : (s2 += h2 + ">", p2 && "" !== i2 && (p2.includes("/>") || p2.includes("</")) ? s2 += i2 + e2.indentBy + p2 + i2 : s2 += p2, s2 += `</${l2}>`) : s2 += h2 + "/>", r2 = true;
}
return s2;
}
@@ -62571,13 +62687,13 @@ var require_fxp = __commonJS({
const e2 = Object.keys(t2);
for (let n2 = 0; n2 < e2.length; n2++) {
const i2 = e2[n2];
if (t2.hasOwnProperty(i2) && ":@" !== i2) return i2;
if (Object.prototype.hasOwnProperty.call(t2, i2) && ":@" !== i2) return i2;
}
}
function at(t2, e2) {
let n2 = "";
if (t2 && !e2.ignoreAttributes) for (let i2 in t2) {
if (!t2.hasOwnProperty(i2)) continue;
if (!Object.prototype.hasOwnProperty.call(t2, i2)) continue;
let s2 = e2.attributeValueProcessor(i2, t2[i2]);
s2 = ut(s2, e2), true === s2 && e2.suppressBooleanAttributes ? n2 += ` ${i2.substr(e2.attributeNamePrefix.length)}` : n2 += ` ${i2.substr(e2.attributeNamePrefix.length)}="${s2}"`;
}
@@ -62595,15 +62711,21 @@ var require_fxp = __commonJS({
}
return t2;
}
const ht = { attributeNamePrefix: "@_", attributesGroupName: false, textNodeName: "#text", ignoreAttributes: true, cdataPropName: false, format: false, indentBy: " ", suppressEmptyNode: false, suppressUnpairedNode: true, suppressBooleanAttributes: true, tagValueProcessor: function(t2, e2) {
const dt = { attributeNamePrefix: "@_", attributesGroupName: false, textNodeName: "#text", ignoreAttributes: true, cdataPropName: false, format: false, indentBy: " ", suppressEmptyNode: false, suppressUnpairedNode: true, suppressBooleanAttributes: true, tagValueProcessor: function(t2, e2) {
return e2;
}, attributeValueProcessor: function(t2, e2) {
return e2;
}, preserveOrder: false, commentPropName: false, unpairedTags: [], entities: [{ regex: new RegExp("&", "g"), val: "&amp;" }, { regex: new RegExp(">", "g"), val: "&gt;" }, { regex: new RegExp("<", "g"), val: "&lt;" }, { regex: new RegExp("'", "g"), val: "&apos;" }, { regex: new RegExp('"', "g"), val: "&quot;" }], processEntities: true, stopNodes: [], oneListGroup: false };
function dt(t2) {
this.options = Object.assign({}, ht, t2), true === this.options.ignoreAttributes || this.options.attributesGroupName ? this.isAttribute = function() {
function ht(t2) {
var e2;
this.options = Object.assign({}, dt, t2), true === this.options.ignoreAttributes || this.options.attributesGroupName ? this.isAttribute = function() {
return false;
} : (this.ignoreAttributesFn = L(this.options.ignoreAttributes), this.attrPrefixLen = this.options.attributeNamePrefix.length, this.isAttribute = ct), this.processTextOrObjNode = pt, this.options.format ? (this.indentate = ft, this.tagEndChar = ">\n", this.newLine = "\n") : (this.indentate = function() {
} : (this.ignoreAttributesFn = "function" == typeof (e2 = this.options.ignoreAttributes) ? e2 : Array.isArray(e2) ? (t3) => {
for (const n2 of e2) {
if ("string" == typeof n2 && t3 === n2) return true;
if (n2 instanceof RegExp && n2.test(t3)) return true;
}
} : () => false, this.attrPrefixLen = this.options.attributeNamePrefix.length, this.isAttribute = ft), this.processTextOrObjNode = pt, this.options.format ? (this.indentate = ct, this.tagEndChar = ">\n", this.newLine = "\n") : (this.indentate = function() {
return "";
}, this.tagEndChar = ">", this.newLine = "");
}
@@ -62611,15 +62733,15 @@ var require_fxp = __commonJS({
const s2 = this.j2x(t2, n2 + 1, i2.concat(e2));
return void 0 !== t2[this.options.textNodeName] && 1 === Object.keys(t2).length ? this.buildTextValNode(t2[this.options.textNodeName], e2, s2.attrStr, n2) : this.buildObjectNode(s2.val, e2, s2.attrStr, n2);
}
function ft(t2) {
function ct(t2) {
return this.options.indentBy.repeat(t2);
}
function ct(t2) {
function ft(t2) {
return !(!t2.startsWith(this.options.attributeNamePrefix) || t2 === this.options.textNodeName) && t2.substr(this.attrPrefixLen);
}
dt.prototype.build = function(t2) {
ht.prototype.build = function(t2) {
return this.options.preserveOrder ? st(t2, this.options) : (Array.isArray(t2) && this.options.arrayNodeName && this.options.arrayNodeName.length > 1 && (t2 = { [this.options.arrayNodeName]: t2 }), this.j2x(t2, 0, []).val);
}, dt.prototype.j2x = function(t2, e2, n2) {
}, ht.prototype.j2x = function(t2, e2, n2) {
let i2 = "", s2 = "";
const r2 = n2.join(".");
for (let o2 in t2) if (Object.prototype.hasOwnProperty.call(t2, o2)) if (void 0 === t2[o2]) this.isAttribute(o2) && (s2 += "");
@@ -62654,18 +62776,18 @@ var require_fxp = __commonJS({
for (let s3 = 0; s3 < n3; s3++) i2 += this.buildAttrPairStr(e3[s3], "" + t2[o2][e3[s3]]);
} else s2 += this.processTextOrObjNode(t2[o2], o2, e2, n2);
return { attrStr: i2, val: s2 };
}, dt.prototype.buildAttrPairStr = function(t2, e2) {
}, ht.prototype.buildAttrPairStr = function(t2, e2) {
return e2 = this.options.attributeValueProcessor(t2, "" + e2), e2 = this.replaceEntitiesValue(e2), this.options.suppressBooleanAttributes && "true" === e2 ? " " + t2 : " " + t2 + '="' + e2 + '"';
}, dt.prototype.buildObjectNode = function(t2, e2, n2, i2) {
}, ht.prototype.buildObjectNode = function(t2, e2, n2, i2) {
if ("" === t2) return "?" === e2[0] ? this.indentate(i2) + "<" + e2 + n2 + "?" + this.tagEndChar : this.indentate(i2) + "<" + e2 + n2 + this.closeTag(e2) + this.tagEndChar;
{
let s2 = "</" + e2 + this.tagEndChar, r2 = "";
return "?" === e2[0] && (r2 = "?", s2 = ""), !n2 && "" !== n2 || -1 !== t2.indexOf("<") ? false !== this.options.commentPropName && e2 === this.options.commentPropName && 0 === r2.length ? this.indentate(i2) + `<!--${t2}-->` + this.newLine : this.indentate(i2) + "<" + e2 + n2 + r2 + this.tagEndChar + t2 + this.indentate(i2) + s2 : this.indentate(i2) + "<" + e2 + n2 + r2 + ">" + t2 + s2;
}
}, dt.prototype.closeTag = function(t2) {
}, ht.prototype.closeTag = function(t2) {
let e2 = "";
return -1 !== this.options.unpairedTags.indexOf(t2) ? this.options.suppressUnpairedNode || (e2 = "/") : e2 = this.options.suppressEmptyNode ? "/" : `></${t2}`, e2;
}, dt.prototype.buildTextValNode = function(t2, e2, n2, i2) {
}, ht.prototype.buildTextValNode = function(t2, e2, n2, i2) {
if (false !== this.options.cdataPropName && e2 === this.options.cdataPropName) return this.indentate(i2) + `<![CDATA[${t2}]]>` + this.newLine;
if (false !== this.options.commentPropName && e2 === this.options.commentPropName) return this.indentate(i2) + `<!--${t2}-->` + this.newLine;
if ("?" === e2[0]) return this.indentate(i2) + "<" + e2 + n2 + "?" + this.tagEndChar;
@@ -62673,14 +62795,14 @@ var require_fxp = __commonJS({
let s2 = this.options.tagValueProcessor(e2, t2);
return s2 = this.replaceEntitiesValue(s2), "" === s2 ? this.indentate(i2) + "<" + e2 + n2 + this.closeTag(e2) + this.tagEndChar : this.indentate(i2) + "<" + e2 + n2 + ">" + s2 + "</" + e2 + this.tagEndChar;
}
}, dt.prototype.replaceEntitiesValue = function(t2) {
}, ht.prototype.replaceEntitiesValue = function(t2) {
if (t2 && t2.length > 0 && this.options.processEntities) for (let e2 = 0; e2 < this.options.entities.length; e2++) {
const n2 = this.options.entities[e2];
t2 = t2.replace(n2.regex, n2.val);
}
return t2;
};
const gt = { validate: a };
const gt = ht, xt = { validate: a };
module2.exports = e;
})();
}
@@ -102870,7 +102992,7 @@ var safeDump = renamed("safeDump", "dump");
var semver = __toESM(require_semver2());
// src/api-compatibility.json
var maximumVersion = "3.20";
var maximumVersion = "3.21";
var minimumVersion = "3.14";
// src/util.ts
@@ -103698,8 +103820,8 @@ var path3 = __toESM(require("path"));
var semver5 = __toESM(require_semver2());
// src/defaults.json
var bundleVersion = "codeql-bundle-v2.24.2";
var cliVersion = "2.24.2";
var bundleVersion = "codeql-bundle-v2.24.3";
var cliVersion = "2.24.3";
// src/overlay/index.ts
var fs2 = __toESM(require("fs"));
@@ -104154,6 +104276,11 @@ var featureConfig = {
// cannot be found when interpreting results.
minimumVersion: void 0
},
["start_proxy_remove_unused_registries" /* StartProxyRemoveUnusedRegistries */]: {
defaultValue: false,
envVar: "CODEQL_ACTION_START_PROXY_REMOVE_UNUSED_REGISTRIES",
minimumVersion: void 0
},
["start_proxy_use_features_release" /* StartProxyUseFeaturesRelease */]: {
defaultValue: false,
envVar: "CODEQL_ACTION_START_PROXY_USE_FEATURES_RELEASE",
@@ -104165,11 +104292,6 @@ var featureConfig = {
minimumVersion: void 0,
toolsFeature: "bundleSupportsOverlay" /* BundleSupportsOverlay */
},
["use_repository_properties_v2" /* UseRepositoryProperties */]: {
defaultValue: false,
envVar: "CODEQL_ACTION_USE_REPOSITORY_PROPERTIES",
minimumVersion: void 0
},
["validate_db_config" /* ValidateDbConfig */]: {
defaultValue: false,
envVar: "CODEQL_ACTION_VALIDATE_DB_CONFIG",

View File

@@ -1,6 +1,6 @@
{
"bundleVersion": "codeql-bundle-v2.24.2",
"cliVersion": "2.24.2",
"priorBundleVersion": "codeql-bundle-v2.24.1",
"priorCliVersion": "2.24.1"
"bundleVersion": "codeql-bundle-v2.24.3",
"cliVersion": "2.24.3",
"priorBundleVersion": "codeql-bundle-v2.24.2",
"priorCliVersion": "2.24.2"
}

1819
lib/init-action-post.js generated

File diff suppressed because it is too large Load Diff

842
lib/init-action.js generated

File diff suppressed because it is too large Load Diff

View File

@@ -45986,7 +45986,7 @@ var require_package = __commonJS({
"package.json"(exports2, module2) {
module2.exports = {
name: "codeql",
version: "4.32.5",
version: "4.32.7",
private: true,
description: "CodeQL action",
scripts: {
@@ -45995,7 +45995,7 @@ var require_package = __commonJS({
lint: "eslint --report-unused-disable-directives --max-warnings=0 .",
"lint-ci": "SARIF_ESLINT_IGNORE_SUPPRESSED=true eslint --report-unused-disable-directives --max-warnings=0 . --format @microsoft/eslint-formatter-sarif --output-file=eslint.sarif",
"lint-fix": "eslint --report-unused-disable-directives --max-warnings=0 . --fix",
ava: "npm run transpile && ava --serial --verbose",
ava: "npm run transpile && ava --verbose",
test: "npm run ava -- src/",
"test-debug": "npm run test -- --timeout=20m",
transpile: "tsc --build --verbose"
@@ -46044,6 +46044,7 @@ var require_package = __commonJS({
"@types/js-yaml": "^4.0.9",
"@types/node": "^20.19.9",
"@types/node-forge": "^1.3.14",
"@types/sarif": "^2.1.7",
"@types/semver": "^7.7.1",
"@types/sinon": "^21.0.0",
ava: "^6.4.1",
@@ -46052,14 +46053,14 @@ var require_package = __commonJS({
"eslint-import-resolver-typescript": "^3.8.7",
"eslint-plugin-github": "^6.0.0",
"eslint-plugin-import-x": "^4.16.1",
"eslint-plugin-jsdoc": "^62.5.0",
"eslint-plugin-jsdoc": "^62.7.1",
"eslint-plugin-no-async-foreach": "^0.1.1",
glob: "^11.1.0",
globals: "^16.5.0",
globals: "^17.3.0",
nock: "^14.0.11",
sinon: "^21.0.1",
typescript: "^5.9.3",
"typescript-eslint": "^8.56.0"
"typescript-eslint": "^8.56.1"
},
overrides: {
"@actions/tool-cache": {
@@ -49361,6 +49362,7 @@ var require_minimatch = __commonJS({
pattern = pattern.split(path5.sep).join("/");
}
this.options = options;
this.maxGlobstarRecursion = options.maxGlobstarRecursion !== void 0 ? options.maxGlobstarRecursion : 200;
this.set = [];
this.pattern = pattern;
this.regexp = null;
@@ -49757,50 +49759,147 @@ var require_minimatch = __commonJS({
return this.negate;
};
Minimatch.prototype.matchOne = function(file, pattern, partial) {
var options = this.options;
this.debug(
"matchOne",
{ "this": this, file, pattern }
if (pattern.indexOf(GLOBSTAR) !== -1) {
return this._matchGlobstar(file, pattern, partial, 0, 0);
}
return this._matchOne(file, pattern, partial, 0, 0);
};
Minimatch.prototype._matchGlobstar = function(file, pattern, partial, fileIndex, patternIndex) {
var i;
var firstgs = -1;
for (i = patternIndex; i < pattern.length; i++) {
if (pattern[i] === GLOBSTAR) {
firstgs = i;
break;
}
}
var lastgs = -1;
for (i = pattern.length - 1; i >= 0; i--) {
if (pattern[i] === GLOBSTAR) {
lastgs = i;
break;
}
}
var head = pattern.slice(patternIndex, firstgs);
var body = partial ? pattern.slice(firstgs + 1) : pattern.slice(firstgs + 1, lastgs);
var tail = partial ? [] : pattern.slice(lastgs + 1);
if (head.length) {
var fileHead = file.slice(fileIndex, fileIndex + head.length);
if (!this._matchOne(fileHead, head, partial, 0, 0)) {
return false;
}
fileIndex += head.length;
}
var fileTailMatch = 0;
if (tail.length) {
if (tail.length + fileIndex > file.length) return false;
var tailStart = file.length - tail.length;
if (this._matchOne(file, tail, partial, tailStart, 0)) {
fileTailMatch = tail.length;
} else {
if (file[file.length - 1] !== "" || fileIndex + tail.length === file.length) {
return false;
}
tailStart--;
if (!this._matchOne(file, tail, partial, tailStart, 0)) {
return false;
}
fileTailMatch = tail.length + 1;
}
}
if (!body.length) {
var sawSome = !!fileTailMatch;
for (i = fileIndex; i < file.length - fileTailMatch; i++) {
var f = String(file[i]);
sawSome = true;
if (f === "." || f === ".." || !this.options.dot && f.charAt(0) === ".") {
return false;
}
}
return partial || sawSome;
}
var bodySegments = [[[], 0]];
var currentBody = bodySegments[0];
var nonGsParts = 0;
var nonGsPartsSums = [0];
for (var bi = 0; bi < body.length; bi++) {
var b = body[bi];
if (b === GLOBSTAR) {
nonGsPartsSums.push(nonGsParts);
currentBody = [[], 0];
bodySegments.push(currentBody);
} else {
currentBody[0].push(b);
nonGsParts++;
}
}
var idx = bodySegments.length - 1;
var fileLength = file.length - fileTailMatch;
for (var si = 0; si < bodySegments.length; si++) {
bodySegments[si][1] = fileLength - (nonGsPartsSums[idx--] + bodySegments[si][0].length);
}
return !!this._matchGlobStarBodySections(
file,
bodySegments,
fileIndex,
0,
partial,
0,
!!fileTailMatch
);
this.debug("matchOne", file.length, pattern.length);
for (var fi = 0, pi = 0, fl = file.length, pl = pattern.length; fi < fl && pi < pl; fi++, pi++) {
};
Minimatch.prototype._matchGlobStarBodySections = function(file, bodySegments, fileIndex, bodyIndex, partial, globStarDepth, sawTail) {
var bs = bodySegments[bodyIndex];
if (!bs) {
for (var i = fileIndex; i < file.length; i++) {
sawTail = true;
var f = file[i];
if (f === "." || f === ".." || !this.options.dot && f.charAt(0) === ".") {
return false;
}
}
return sawTail;
}
var body = bs[0];
var after = bs[1];
while (fileIndex <= after) {
var m = this._matchOne(
file.slice(0, fileIndex + body.length),
body,
partial,
fileIndex,
0
);
if (m && globStarDepth < this.maxGlobstarRecursion) {
var sub = this._matchGlobStarBodySections(
file,
bodySegments,
fileIndex + body.length,
bodyIndex + 1,
partial,
globStarDepth + 1,
sawTail
);
if (sub !== false) {
return sub;
}
}
var f = file[fileIndex];
if (f === "." || f === ".." || !this.options.dot && f.charAt(0) === ".") {
return false;
}
fileIndex++;
}
return partial || null;
};
Minimatch.prototype._matchOne = function(file, pattern, partial, fileIndex, patternIndex) {
var fi, pi, fl, pl;
for (fi = fileIndex, pi = patternIndex, fl = file.length, pl = pattern.length; fi < fl && pi < pl; fi++, pi++) {
this.debug("matchOne loop");
var p = pattern[pi];
var f = file[fi];
this.debug(pattern, p, f);
if (p === false) return false;
if (p === GLOBSTAR) {
this.debug("GLOBSTAR", [pattern, p, f]);
var fr = fi;
var pr = pi + 1;
if (pr === pl) {
this.debug("** at the end");
for (; fi < fl; fi++) {
if (file[fi] === "." || file[fi] === ".." || !options.dot && file[fi].charAt(0) === ".") return false;
}
return true;
}
while (fr < fl) {
var swallowee = file[fr];
this.debug("\nglobstar while", file, fr, pattern, pr, swallowee);
if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) {
this.debug("globstar found match!", fr, fl, swallowee);
return true;
} else {
if (swallowee === "." || swallowee === ".." || !options.dot && swallowee.charAt(0) === ".") {
this.debug("dot detected!", file, fr, pattern, pr);
break;
}
this.debug("globstar swallow a segment, and continue");
fr++;
}
}
if (partial) {
this.debug("\n>>> no match, partial?", file, fr, pattern, pr);
if (fr === fl) return true;
}
return false;
}
if (p === false || p === GLOBSTAR) return false;
var hit;
if (typeof p === "string") {
hit = f === p;
@@ -61840,7 +61939,7 @@ var require_fxp = __commonJS({
}, o: (t2, e2) => Object.prototype.hasOwnProperty.call(t2, e2), r: (t2) => {
"undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(t2, Symbol.toStringTag, { value: "Module" }), Object.defineProperty(t2, "__esModule", { value: true });
} }, e = {};
t.r(e), t.d(e, { XMLBuilder: () => dt, XMLParser: () => it, XMLValidator: () => gt });
t.r(e), t.d(e, { XMLBuilder: () => gt, XMLParser: () => it, XMLValidator: () => xt });
const n = ":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", i = new RegExp("^[" + n + "][" + n + "\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$");
function s(t2, e2) {
const n2 = [];
@@ -61862,90 +61961,90 @@ var require_fxp = __commonJS({
const n2 = [];
let i2 = false, s2 = false;
"\uFEFF" === t2[0] && (t2 = t2.substr(1));
for (let o2 = 0; o2 < t2.length; o2++) if ("<" === t2[o2] && "?" === t2[o2 + 1]) {
if (o2 += 2, o2 = u(t2, o2), o2.err) return o2;
for (let r2 = 0; r2 < t2.length; r2++) if ("<" === t2[r2] && "?" === t2[r2 + 1]) {
if (r2 += 2, r2 = u(t2, r2), r2.err) return r2;
} else {
if ("<" !== t2[o2]) {
if (l(t2[o2])) continue;
return m("InvalidChar", "char '" + t2[o2] + "' is not expected.", b(t2, o2));
if ("<" !== t2[r2]) {
if (l(t2[r2])) continue;
return m("InvalidChar", "char '" + t2[r2] + "' is not expected.", N(t2, r2));
}
{
let a2 = o2;
if (o2++, "!" === t2[o2]) {
o2 = h(t2, o2);
let o2 = r2;
if (r2++, "!" === t2[r2]) {
r2 = d(t2, r2);
continue;
}
{
let d2 = false;
"/" === t2[o2] && (d2 = true, o2++);
let p2 = "";
for (; o2 < t2.length && ">" !== t2[o2] && " " !== t2[o2] && " " !== t2[o2] && "\n" !== t2[o2] && "\r" !== t2[o2]; o2++) p2 += t2[o2];
if (p2 = p2.trim(), "/" === p2[p2.length - 1] && (p2 = p2.substring(0, p2.length - 1), o2--), !r(p2)) {
let a2 = false;
"/" === t2[r2] && (a2 = true, r2++);
let h2 = "";
for (; r2 < t2.length && ">" !== t2[r2] && " " !== t2[r2] && " " !== t2[r2] && "\n" !== t2[r2] && "\r" !== t2[r2]; r2++) h2 += t2[r2];
if (h2 = h2.trim(), "/" === h2[h2.length - 1] && (h2 = h2.substring(0, h2.length - 1), r2--), !b(h2)) {
let e3;
return e3 = 0 === p2.trim().length ? "Invalid space after '<'." : "Tag '" + p2 + "' is an invalid name.", m("InvalidTag", e3, b(t2, o2));
return e3 = 0 === h2.trim().length ? "Invalid space after '<'." : "Tag '" + h2 + "' is an invalid name.", m("InvalidTag", e3, N(t2, r2));
}
const c2 = f(t2, o2);
if (false === c2) return m("InvalidAttr", "Attributes for '" + p2 + "' have open quote.", b(t2, o2));
let E2 = c2.value;
if (o2 = c2.index, "/" === E2[E2.length - 1]) {
const n3 = o2 - E2.length;
E2 = E2.substring(0, E2.length - 1);
const s3 = g(E2, e2);
if (true !== s3) return m(s3.err.code, s3.err.msg, b(t2, n3 + s3.err.line));
const p2 = c(t2, r2);
if (false === p2) return m("InvalidAttr", "Attributes for '" + h2 + "' have open quote.", N(t2, r2));
let f2 = p2.value;
if (r2 = p2.index, "/" === f2[f2.length - 1]) {
const n3 = r2 - f2.length;
f2 = f2.substring(0, f2.length - 1);
const s3 = g(f2, e2);
if (true !== s3) return m(s3.err.code, s3.err.msg, N(t2, n3 + s3.err.line));
i2 = true;
} else if (d2) {
if (!c2.tagClosed) return m("InvalidTag", "Closing tag '" + p2 + "' doesn't have proper closing.", b(t2, o2));
if (E2.trim().length > 0) return m("InvalidTag", "Closing tag '" + p2 + "' can't have attributes or invalid starting.", b(t2, a2));
if (0 === n2.length) return m("InvalidTag", "Closing tag '" + p2 + "' has not been opened.", b(t2, a2));
} else if (a2) {
if (!p2.tagClosed) return m("InvalidTag", "Closing tag '" + h2 + "' doesn't have proper closing.", N(t2, r2));
if (f2.trim().length > 0) return m("InvalidTag", "Closing tag '" + h2 + "' can't have attributes or invalid starting.", N(t2, o2));
if (0 === n2.length) return m("InvalidTag", "Closing tag '" + h2 + "' has not been opened.", N(t2, o2));
{
const e3 = n2.pop();
if (p2 !== e3.tagName) {
let n3 = b(t2, e3.tagStartPos);
return m("InvalidTag", "Expected closing tag '" + e3.tagName + "' (opened in line " + n3.line + ", col " + n3.col + ") instead of closing tag '" + p2 + "'.", b(t2, a2));
if (h2 !== e3.tagName) {
let n3 = N(t2, e3.tagStartPos);
return m("InvalidTag", "Expected closing tag '" + e3.tagName + "' (opened in line " + n3.line + ", col " + n3.col + ") instead of closing tag '" + h2 + "'.", N(t2, o2));
}
0 == n2.length && (s2 = true);
}
} else {
const r2 = g(E2, e2);
if (true !== r2) return m(r2.err.code, r2.err.msg, b(t2, o2 - E2.length + r2.err.line));
if (true === s2) return m("InvalidXml", "Multiple possible root nodes found.", b(t2, o2));
-1 !== e2.unpairedTags.indexOf(p2) || n2.push({ tagName: p2, tagStartPos: a2 }), i2 = true;
const a3 = g(f2, e2);
if (true !== a3) return m(a3.err.code, a3.err.msg, N(t2, r2 - f2.length + a3.err.line));
if (true === s2) return m("InvalidXml", "Multiple possible root nodes found.", N(t2, r2));
-1 !== e2.unpairedTags.indexOf(h2) || n2.push({ tagName: h2, tagStartPos: o2 }), i2 = true;
}
for (o2++; o2 < t2.length; o2++) if ("<" === t2[o2]) {
if ("!" === t2[o2 + 1]) {
o2++, o2 = h(t2, o2);
for (r2++; r2 < t2.length; r2++) if ("<" === t2[r2]) {
if ("!" === t2[r2 + 1]) {
r2++, r2 = d(t2, r2);
continue;
}
if ("?" !== t2[o2 + 1]) break;
if (o2 = u(t2, ++o2), o2.err) return o2;
} else if ("&" === t2[o2]) {
const e3 = x(t2, o2);
if (-1 == e3) return m("InvalidChar", "char '&' is not expected.", b(t2, o2));
o2 = e3;
} else if (true === s2 && !l(t2[o2])) return m("InvalidXml", "Extra text at the end", b(t2, o2));
"<" === t2[o2] && o2--;
if ("?" !== t2[r2 + 1]) break;
if (r2 = u(t2, ++r2), r2.err) return r2;
} else if ("&" === t2[r2]) {
const e3 = x(t2, r2);
if (-1 == e3) return m("InvalidChar", "char '&' is not expected.", N(t2, r2));
r2 = e3;
} else if (true === s2 && !l(t2[r2])) return m("InvalidXml", "Extra text at the end", N(t2, r2));
"<" === t2[r2] && r2--;
}
}
}
return i2 ? 1 == n2.length ? m("InvalidTag", "Unclosed tag '" + n2[0].tagName + "'.", b(t2, n2[0].tagStartPos)) : !(n2.length > 0) || m("InvalidXml", "Invalid '" + JSON.stringify(n2.map(((t3) => t3.tagName)), null, 4).replace(/\r?\n/g, "") + "' found.", { line: 1, col: 1 }) : m("InvalidXml", "Start tag expected.", 1);
return i2 ? 1 == n2.length ? m("InvalidTag", "Unclosed tag '" + n2[0].tagName + "'.", N(t2, n2[0].tagStartPos)) : !(n2.length > 0) || m("InvalidXml", "Invalid '" + JSON.stringify(n2.map((t3) => t3.tagName), null, 4).replace(/\r?\n/g, "") + "' found.", { line: 1, col: 1 }) : m("InvalidXml", "Start tag expected.", 1);
}
function l(t2) {
return " " === t2 || " " === t2 || "\n" === t2 || "\r" === t2;
}
function u(t2, e2) {
const n2 = e2;
for (; e2 < t2.length; e2++) if ("?" != t2[e2] && " " != t2[e2]) ;
else {
for (; e2 < t2.length; e2++) if ("?" == t2[e2] || " " == t2[e2]) {
const i2 = t2.substr(n2, e2 - n2);
if (e2 > 5 && "xml" === i2) return m("InvalidXml", "XML declaration allowed only at the start of the document.", b(t2, e2));
if (e2 > 5 && "xml" === i2) return m("InvalidXml", "XML declaration allowed only at the start of the document.", N(t2, e2));
if ("?" == t2[e2] && ">" == t2[e2 + 1]) {
e2++;
break;
}
continue;
}
return e2;
}
function h(t2, e2) {
function d(t2, e2) {
if (t2.length > e2 + 5 && "-" === t2[e2 + 1] && "-" === t2[e2 + 2]) {
for (e2 += 3; e2 < t2.length; e2++) if ("-" === t2[e2] && "-" === t2[e2 + 1] && ">" === t2[e2 + 2]) {
e2 += 2;
@@ -61963,11 +62062,11 @@ var require_fxp = __commonJS({
}
return e2;
}
const d = '"', p = "'";
function f(t2, e2) {
const h = '"', p = "'";
function c(t2, e2) {
let n2 = "", i2 = "", s2 = false;
for (; e2 < t2.length; e2++) {
if (t2[e2] === d || t2[e2] === p) "" === i2 ? i2 = t2[e2] : i2 !== t2[e2] || (i2 = "");
if (t2[e2] === h || t2[e2] === p) "" === i2 ? i2 = t2[e2] : i2 !== t2[e2] || (i2 = "");
else if (">" === t2[e2] && "" === i2) {
s2 = true;
break;
@@ -61976,16 +62075,16 @@ var require_fxp = __commonJS({
}
return "" === i2 && { value: n2, index: e2, tagClosed: s2 };
}
const c = new RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`, "g");
const f = new RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`, "g");
function g(t2, e2) {
const n2 = s(t2, c), i2 = {};
const n2 = s(t2, f), i2 = {};
for (let t3 = 0; t3 < n2.length; t3++) {
if (0 === n2[t3][1].length) return m("InvalidAttr", "Attribute '" + n2[t3][2] + "' has no space in starting.", N(n2[t3]));
if (void 0 !== n2[t3][3] && void 0 === n2[t3][4]) return m("InvalidAttr", "Attribute '" + n2[t3][2] + "' is without value.", N(n2[t3]));
if (void 0 === n2[t3][3] && !e2.allowBooleanAttributes) return m("InvalidAttr", "boolean attribute '" + n2[t3][2] + "' is not allowed.", N(n2[t3]));
if (0 === n2[t3][1].length) return m("InvalidAttr", "Attribute '" + n2[t3][2] + "' has no space in starting.", y(n2[t3]));
if (void 0 !== n2[t3][3] && void 0 === n2[t3][4]) return m("InvalidAttr", "Attribute '" + n2[t3][2] + "' is without value.", y(n2[t3]));
if (void 0 === n2[t3][3] && !e2.allowBooleanAttributes) return m("InvalidAttr", "boolean attribute '" + n2[t3][2] + "' is not allowed.", y(n2[t3]));
const s2 = n2[t3][2];
if (!E(s2)) return m("InvalidAttr", "Attribute '" + s2 + "' is an invalid name.", N(n2[t3]));
if (i2.hasOwnProperty(s2)) return m("InvalidAttr", "Attribute '" + s2 + "' is repeated.", N(n2[t3]));
if (!E(s2)) return m("InvalidAttr", "Attribute '" + s2 + "' is an invalid name.", y(n2[t3]));
if (Object.prototype.hasOwnProperty.call(i2, s2)) return m("InvalidAttr", "Attribute '" + s2 + "' is repeated.", y(n2[t3]));
i2[s2] = 1;
}
return true;
@@ -62013,49 +62112,52 @@ var require_fxp = __commonJS({
function E(t2) {
return r(t2);
}
function b(t2, e2) {
function b(t2) {
return r(t2);
}
function N(t2, e2) {
const n2 = t2.substring(0, e2).split(/\r?\n/);
return { line: n2.length, col: n2[n2.length - 1].length + 1 };
}
function N(t2) {
function y(t2) {
return t2.startIndex + t2[1].length;
}
const y = { preserveOrder: false, attributeNamePrefix: "@_", attributesGroupName: false, textNodeName: "#text", ignoreAttributes: true, removeNSPrefix: false, allowBooleanAttributes: false, parseTagValue: true, parseAttributeValue: false, trimValues: true, cdataPropName: false, numberParseOptions: { hex: true, leadingZeros: true, eNotation: true }, tagValueProcessor: function(t2, e2) {
const T = { preserveOrder: false, attributeNamePrefix: "@_", attributesGroupName: false, textNodeName: "#text", ignoreAttributes: true, removeNSPrefix: false, allowBooleanAttributes: false, parseTagValue: true, parseAttributeValue: false, trimValues: true, cdataPropName: false, numberParseOptions: { hex: true, leadingZeros: true, eNotation: true }, tagValueProcessor: function(t2, e2) {
return e2;
}, attributeValueProcessor: function(t2, e2) {
return e2;
}, stopNodes: [], alwaysCreateTextNode: false, isArray: () => false, commentPropName: false, unpairedTags: [], processEntities: true, htmlEntities: false, ignoreDeclaration: false, ignorePiTags: false, transformTagName: false, transformAttributeName: false, updateTag: function(t2, e2, n2) {
return t2;
}, captureMetaData: false };
function T(t2) {
return "boolean" == typeof t2 ? { enabled: t2, maxEntitySize: 1e4, maxExpansionDepth: 10, maxTotalExpansions: 1e3, maxExpandedLength: 1e5, allowedTags: null, tagFilter: null } : "object" == typeof t2 && null !== t2 ? { enabled: false !== t2.enabled, maxEntitySize: t2.maxEntitySize ?? 1e4, maxExpansionDepth: t2.maxExpansionDepth ?? 10, maxTotalExpansions: t2.maxTotalExpansions ?? 1e3, maxExpandedLength: t2.maxExpandedLength ?? 1e5, allowedTags: t2.allowedTags ?? null, tagFilter: t2.tagFilter ?? null } : T(true);
}, captureMetaData: false, maxNestedTags: 100, strictReservedNames: true };
function w(t2) {
return "boolean" == typeof t2 ? { enabled: t2, maxEntitySize: 1e4, maxExpansionDepth: 10, maxTotalExpansions: 1e3, maxExpandedLength: 1e5, allowedTags: null, tagFilter: null } : "object" == typeof t2 && null !== t2 ? { enabled: false !== t2.enabled, maxEntitySize: t2.maxEntitySize ?? 1e4, maxExpansionDepth: t2.maxExpansionDepth ?? 10, maxTotalExpansions: t2.maxTotalExpansions ?? 1e3, maxExpandedLength: t2.maxExpandedLength ?? 1e5, allowedTags: t2.allowedTags ?? null, tagFilter: t2.tagFilter ?? null } : w(true);
}
const w = function(t2) {
const e2 = Object.assign({}, y, t2);
return e2.processEntities = T(e2.processEntities), e2;
const v = function(t2) {
const e2 = Object.assign({}, T, t2);
return e2.processEntities = w(e2.processEntities), e2;
};
let v;
v = "function" != typeof Symbol ? "@@xmlMetadata" : /* @__PURE__ */ Symbol("XML Node Metadata");
let O;
O = "function" != typeof Symbol ? "@@xmlMetadata" : /* @__PURE__ */ Symbol("XML Node Metadata");
class I {
constructor(t2) {
this.tagname = t2, this.child = [], this[":@"] = {};
this.tagname = t2, this.child = [], this[":@"] = /* @__PURE__ */ Object.create(null);
}
add(t2, e2) {
"__proto__" === t2 && (t2 = "#__proto__"), this.child.push({ [t2]: e2 });
}
addChild(t2, e2) {
"__proto__" === t2.tagname && (t2.tagname = "#__proto__"), t2[":@"] && Object.keys(t2[":@"]).length > 0 ? this.child.push({ [t2.tagname]: t2.child, ":@": t2[":@"] }) : this.child.push({ [t2.tagname]: t2.child }), void 0 !== e2 && (this.child[this.child.length - 1][v] = { startIndex: e2 });
"__proto__" === t2.tagname && (t2.tagname = "#__proto__"), t2[":@"] && Object.keys(t2[":@"]).length > 0 ? this.child.push({ [t2.tagname]: t2.child, ":@": t2[":@"] }) : this.child.push({ [t2.tagname]: t2.child }), void 0 !== e2 && (this.child[this.child.length - 1][O] = { startIndex: e2 });
}
static getMetaDataSymbol() {
return v;
return O;
}
}
class O {
class P {
constructor(t2) {
this.suppressValidationErr = !t2, this.options = t2;
}
readDocType(t2, e2) {
const n2 = {};
const n2 = /* @__PURE__ */ Object.create(null);
if ("O" !== t2[e2 + 3] || "C" !== t2[e2 + 4] || "T" !== t2[e2 + 5] || "Y" !== t2[e2 + 6] || "P" !== t2[e2 + 7] || "E" !== t2[e2 + 8]) throw new Error("Invalid Tag instead of DOCTYPE");
{
e2 += 9;
@@ -62064,23 +62166,23 @@ var require_fxp = __commonJS({
if (r2 ? "-" === t2[e2 - 1] && "-" === t2[e2 - 2] && (r2 = false, i2--) : i2--, 0 === i2) break;
} else "[" === t2[e2] ? s2 = true : o2 += t2[e2];
else {
if (s2 && A(t2, "!ENTITY", e2)) {
if (s2 && S(t2, "!ENTITY", e2)) {
let i3, s3;
if (e2 += 7, [i3, s3, e2] = this.readEntityExp(t2, e2 + 1, this.suppressValidationErr), -1 === s3.indexOf("&")) {
const t3 = i3.replace(/[.\-+*:]/g, "\\.");
n2[i3] = { regx: RegExp(`&${t3};`, "g"), val: s3 };
}
} else if (s2 && A(t2, "!ELEMENT", e2)) {
} else if (s2 && S(t2, "!ELEMENT", e2)) {
e2 += 8;
const { index: n3 } = this.readElementExp(t2, e2 + 1);
e2 = n3;
} else if (s2 && A(t2, "!ATTLIST", e2)) e2 += 8;
else if (s2 && A(t2, "!NOTATION", e2)) {
} else if (s2 && S(t2, "!ATTLIST", e2)) e2 += 8;
else if (s2 && S(t2, "!NOTATION", e2)) {
e2 += 9;
const { index: n3 } = this.readNotationExp(t2, e2 + 1, this.suppressValidationErr);
e2 = n3;
} else {
if (!A(t2, "!--", e2)) throw new Error("Invalid DOCTYPE");
if (!S(t2, "!--", e2)) throw new Error("Invalid DOCTYPE");
r2 = true;
}
i2++, o2 = "";
@@ -62090,10 +62192,10 @@ var require_fxp = __commonJS({
return { entities: n2, i: e2 };
}
readEntityExp(t2, e2) {
e2 = P(t2, e2);
e2 = A(t2, e2);
let n2 = "";
for (; e2 < t2.length && !/\s/.test(t2[e2]) && '"' !== t2[e2] && "'" !== t2[e2]; ) n2 += t2[e2], e2++;
if (S(n2), e2 = P(t2, e2), !this.suppressValidationErr) {
if (C(n2), e2 = A(t2, e2), !this.suppressValidationErr) {
if ("SYSTEM" === t2.substring(e2, e2 + 6).toUpperCase()) throw new Error("External entities are not supported");
if ("%" === t2[e2]) throw new Error("Parameter entities are not supported");
}
@@ -62102,15 +62204,15 @@ var require_fxp = __commonJS({
return [n2, i2, --e2];
}
readNotationExp(t2, e2) {
e2 = P(t2, e2);
e2 = A(t2, e2);
let n2 = "";
for (; e2 < t2.length && !/\s/.test(t2[e2]); ) n2 += t2[e2], e2++;
!this.suppressValidationErr && S(n2), e2 = P(t2, e2);
!this.suppressValidationErr && C(n2), e2 = A(t2, e2);
const i2 = t2.substring(e2, e2 + 6).toUpperCase();
if (!this.suppressValidationErr && "SYSTEM" !== i2 && "PUBLIC" !== i2) throw new Error(`Expected SYSTEM or PUBLIC, found "${i2}"`);
e2 += i2.length, e2 = P(t2, e2);
e2 += i2.length, e2 = A(t2, e2);
let s2 = null, r2 = null;
if ("PUBLIC" === i2) [e2, s2] = this.readIdentifierVal(t2, e2, "publicIdentifier"), '"' !== t2[e2 = P(t2, e2)] && "'" !== t2[e2] || ([e2, r2] = this.readIdentifierVal(t2, e2, "systemIdentifier"));
if ("PUBLIC" === i2) [e2, s2] = this.readIdentifierVal(t2, e2, "publicIdentifier"), '"' !== t2[e2 = A(t2, e2)] && "'" !== t2[e2] || ([e2, r2] = this.readIdentifierVal(t2, e2, "systemIdentifier"));
else if ("SYSTEM" === i2 && ([e2, r2] = this.readIdentifierVal(t2, e2, "systemIdentifier"), !this.suppressValidationErr && !r2)) throw new Error("Missing mandatory system identifier for SYSTEM notation");
return { notationName: n2, publicIdentifier: s2, systemIdentifier: r2, index: --e2 };
}
@@ -62123,13 +62225,13 @@ var require_fxp = __commonJS({
return [++e2, i2];
}
readElementExp(t2, e2) {
e2 = P(t2, e2);
e2 = A(t2, e2);
let n2 = "";
for (; e2 < t2.length && !/\s/.test(t2[e2]); ) n2 += t2[e2], e2++;
if (!this.suppressValidationErr && !r(n2)) throw new Error(`Invalid element name: "${n2}"`);
let i2 = "";
if ("E" === t2[e2 = P(t2, e2)] && A(t2, "MPTY", e2)) e2 += 4;
else if ("A" === t2[e2] && A(t2, "NY", e2)) e2 += 2;
if ("E" === t2[e2 = A(t2, e2)] && S(t2, "MPTY", e2)) e2 += 4;
else if ("A" === t2[e2] && S(t2, "NY", e2)) e2 += 2;
else if ("(" === t2[e2]) {
for (e2++; e2 < t2.length && ")" !== t2[e2]; ) i2 += t2[e2], e2++;
if (")" !== t2[e2]) throw new Error("Unterminated content model");
@@ -62137,24 +62239,24 @@ var require_fxp = __commonJS({
return { elementName: n2, contentModel: i2.trim(), index: e2 };
}
readAttlistExp(t2, e2) {
e2 = P(t2, e2);
e2 = A(t2, e2);
let n2 = "";
for (; e2 < t2.length && !/\s/.test(t2[e2]); ) n2 += t2[e2], e2++;
S(n2), e2 = P(t2, e2);
C(n2), e2 = A(t2, e2);
let i2 = "";
for (; e2 < t2.length && !/\s/.test(t2[e2]); ) i2 += t2[e2], e2++;
if (!S(i2)) throw new Error(`Invalid attribute name: "${i2}"`);
e2 = P(t2, e2);
if (!C(i2)) throw new Error(`Invalid attribute name: "${i2}"`);
e2 = A(t2, e2);
let s2 = "";
if ("NOTATION" === t2.substring(e2, e2 + 8).toUpperCase()) {
if (s2 = "NOTATION", "(" !== t2[e2 = P(t2, e2 += 8)]) throw new Error(`Expected '(', found "${t2[e2]}"`);
if (s2 = "NOTATION", "(" !== t2[e2 = A(t2, e2 += 8)]) throw new Error(`Expected '(', found "${t2[e2]}"`);
e2++;
let n3 = [];
for (; e2 < t2.length && ")" !== t2[e2]; ) {
let i3 = "";
for (; e2 < t2.length && "|" !== t2[e2] && ")" !== t2[e2]; ) i3 += t2[e2], e2++;
if (i3 = i3.trim(), !S(i3)) throw new Error(`Invalid notation name: "${i3}"`);
n3.push(i3), "|" === t2[e2] && (e2++, e2 = P(t2, e2));
if (i3 = i3.trim(), !C(i3)) throw new Error(`Invalid notation name: "${i3}"`);
n3.push(i3), "|" === t2[e2] && (e2++, e2 = A(t2, e2));
}
if (")" !== t2[e2]) throw new Error("Unterminated list of notations");
e2++, s2 += " (" + n3.join("|") + ")";
@@ -62163,45 +62265,43 @@ var require_fxp = __commonJS({
const n3 = ["CDATA", "ID", "IDREF", "IDREFS", "ENTITY", "ENTITIES", "NMTOKEN", "NMTOKENS"];
if (!this.suppressValidationErr && !n3.includes(s2.toUpperCase())) throw new Error(`Invalid attribute type: "${s2}"`);
}
e2 = P(t2, e2);
e2 = A(t2, e2);
let r2 = "";
return "#REQUIRED" === t2.substring(e2, e2 + 8).toUpperCase() ? (r2 = "#REQUIRED", e2 += 8) : "#IMPLIED" === t2.substring(e2, e2 + 7).toUpperCase() ? (r2 = "#IMPLIED", e2 += 7) : [e2, r2] = this.readIdentifierVal(t2, e2, "ATTLIST"), { elementName: n2, attributeName: i2, attributeType: s2, defaultValue: r2, index: e2 };
}
}
const P = (t2, e2) => {
const A = (t2, e2) => {
for (; e2 < t2.length && /\s/.test(t2[e2]); ) e2++;
return e2;
};
function A(t2, e2, n2) {
function S(t2, e2, n2) {
for (let i2 = 0; i2 < e2.length; i2++) if (e2[i2] !== t2[n2 + i2 + 1]) return false;
return true;
}
function S(t2) {
function C(t2) {
if (r(t2)) return t2;
throw new Error(`Invalid entity name ${t2}`);
}
const C = /^[-+]?0x[a-fA-F0-9]+$/, $ = /^([\-\+])?(0*)([0-9]*(\.[0-9]*)?)$/, V = { hex: true, leadingZeros: true, decimalPoint: ".", eNotation: true };
const D = /^([-+])?(0*)(\d*(\.\d*)?[eE][-\+]?\d+)$/;
function L(t2) {
return "function" == typeof t2 ? t2 : Array.isArray(t2) ? (e2) => {
for (const n2 of t2) {
if ("string" == typeof n2 && e2 === n2) return true;
if (n2 instanceof RegExp && n2.test(e2)) return true;
}
} : () => false;
}
class F {
const $ = /^[-+]?0x[a-fA-F0-9]+$/, V = /^([\-\+])?(0*)([0-9]*(\.[0-9]*)?)$/, D = { hex: true, leadingZeros: true, decimalPoint: ".", eNotation: true };
const j = /^([-+])?(0*)(\d*(\.\d*)?[eE][-\+]?\d+)$/;
class L {
constructor(t2) {
if (this.options = t2, this.currentNode = null, this.tagsNodeStack = [], this.docTypeEntities = {}, this.lastEntities = { apos: { regex: /&(apos|#39|#x27);/g, val: "'" }, gt: { regex: /&(gt|#62|#x3E);/g, val: ">" }, lt: { regex: /&(lt|#60|#x3C);/g, val: "<" }, quot: { regex: /&(quot|#34|#x22);/g, val: '"' } }, this.ampEntity = { regex: /&(amp|#38|#x26);/g, val: "&" }, this.htmlEntities = { space: { regex: /&(nbsp|#160);/g, val: " " }, cent: { regex: /&(cent|#162);/g, val: "\xA2" }, pound: { regex: /&(pound|#163);/g, val: "\xA3" }, yen: { regex: /&(yen|#165);/g, val: "\xA5" }, euro: { regex: /&(euro|#8364);/g, val: "\u20AC" }, copyright: { regex: /&(copy|#169);/g, val: "\xA9" }, reg: { regex: /&(reg|#174);/g, val: "\xAE" }, inr: { regex: /&(inr|#8377);/g, val: "\u20B9" }, num_dec: { regex: /&#([0-9]{1,7});/g, val: (t3, e2) => K(e2, 10, "&#") }, num_hex: { regex: /&#x([0-9a-fA-F]{1,6});/g, val: (t3, e2) => K(e2, 16, "&#x") } }, this.addExternalEntities = j, this.parseXml = B, this.parseTextData = M, this.resolveNameSpace = _, this.buildAttributesMap = U, this.isItStopNode = X, this.replaceEntitiesValue = Y, this.readStopNodeData = q, this.saveTextToParentTag = G, this.addChild = R, this.ignoreAttributesFn = L(this.options.ignoreAttributes), this.entityExpansionCount = 0, this.currentExpandedLength = 0, this.options.stopNodes && this.options.stopNodes.length > 0) {
var e2;
if (this.options = t2, this.currentNode = null, this.tagsNodeStack = [], this.docTypeEntities = {}, this.lastEntities = { apos: { regex: /&(apos|#39|#x27);/g, val: "'" }, gt: { regex: /&(gt|#62|#x3E);/g, val: ">" }, lt: { regex: /&(lt|#60|#x3C);/g, val: "<" }, quot: { regex: /&(quot|#34|#x22);/g, val: '"' } }, this.ampEntity = { regex: /&(amp|#38|#x26);/g, val: "&" }, this.htmlEntities = { space: { regex: /&(nbsp|#160);/g, val: " " }, cent: { regex: /&(cent|#162);/g, val: "\xA2" }, pound: { regex: /&(pound|#163);/g, val: "\xA3" }, yen: { regex: /&(yen|#165);/g, val: "\xA5" }, euro: { regex: /&(euro|#8364);/g, val: "\u20AC" }, copyright: { regex: /&(copy|#169);/g, val: "\xA9" }, reg: { regex: /&(reg|#174);/g, val: "\xAE" }, inr: { regex: /&(inr|#8377);/g, val: "\u20B9" }, num_dec: { regex: /&#([0-9]{1,7});/g, val: (t3, e3) => K(e3, 10, "&#") }, num_hex: { regex: /&#x([0-9a-fA-F]{1,6});/g, val: (t3, e3) => K(e3, 16, "&#x") } }, this.addExternalEntities = F, this.parseXml = R, this.parseTextData = M, this.resolveNameSpace = k, this.buildAttributesMap = U, this.isItStopNode = X, this.replaceEntitiesValue = Y, this.readStopNodeData = q, this.saveTextToParentTag = G, this.addChild = B, this.ignoreAttributesFn = "function" == typeof (e2 = this.options.ignoreAttributes) ? e2 : Array.isArray(e2) ? (t3) => {
for (const n2 of e2) {
if ("string" == typeof n2 && t3 === n2) return true;
if (n2 instanceof RegExp && n2.test(t3)) return true;
}
} : () => false, this.entityExpansionCount = 0, this.currentExpandedLength = 0, this.options.stopNodes && this.options.stopNodes.length > 0) {
this.stopNodesExact = /* @__PURE__ */ new Set(), this.stopNodesWildcard = /* @__PURE__ */ new Set();
for (let t3 = 0; t3 < this.options.stopNodes.length; t3++) {
const e2 = this.options.stopNodes[t3];
"string" == typeof e2 && (e2.startsWith("*.") ? this.stopNodesWildcard.add(e2.substring(2)) : this.stopNodesExact.add(e2));
const e3 = this.options.stopNodes[t3];
"string" == typeof e3 && (e3.startsWith("*.") ? this.stopNodesWildcard.add(e3.substring(2)) : this.stopNodesExact.add(e3));
}
}
}
}
function j(t2) {
function F(t2) {
const e2 = Object.keys(t2);
for (let n2 = 0; n2 < e2.length; n2++) {
const i2 = e2[n2], s2 = i2.replace(/[.\-+*:]/g, "\\.");
@@ -62215,7 +62315,7 @@ var require_fxp = __commonJS({
return null == i3 ? t2 : typeof i3 != typeof t2 || i3 !== t2 ? i3 : this.options.trimValues || t2.trim() === t2 ? Z(t2, this.options.parseTagValue, this.options.numberParseOptions) : t2;
}
}
function _(t2) {
function k(t2) {
if (this.options.removeNSPrefix) {
const e2 = t2.split(":"), n2 = "/" === t2.charAt(0) ? "/" : "";
if ("xmlns" === e2[0]) return "";
@@ -62223,10 +62323,10 @@ var require_fxp = __commonJS({
}
return t2;
}
const k = new RegExp(`([^\\s=]+)\\s*(=\\s*(['"])([\\s\\S]*?)\\3)?`, "gm");
const _ = new RegExp(`([^\\s=]+)\\s*(=\\s*(['"])([\\s\\S]*?)\\3)?`, "gm");
function U(t2, e2, n2) {
if (true !== this.options.ignoreAttributes && "string" == typeof t2) {
const i2 = s(t2, k), r2 = i2.length, o2 = {};
const i2 = s(t2, _), r2 = i2.length, o2 = {};
for (let t3 = 0; t3 < r2; t3++) {
const s2 = this.resolveNameSpace(i2[t3][1]);
if (this.ignoreAttributesFn(s2, e2)) continue;
@@ -62245,12 +62345,12 @@ var require_fxp = __commonJS({
return o2;
}
}
const B = function(t2) {
const R = function(t2) {
t2 = t2.replace(/\r\n?/g, "\n");
const e2 = new I("!xml");
let n2 = e2, i2 = "", s2 = "";
this.entityExpansionCount = 0, this.currentExpandedLength = 0;
const r2 = new O(this.options.processEntities);
const r2 = new P(this.options.processEntities);
for (let o2 = 0; o2 < t2.length; o2++) if ("<" === t2[o2]) if ("/" === t2[o2 + 1]) {
const e3 = z(t2, ">", o2, "Closing Tag is not closed.");
let r3 = t2.substring(o2 + 2, e3).trim();
@@ -62290,26 +62390,27 @@ var require_fxp = __commonJS({
} else {
let r3 = W(t2, o2, this.options.removeNSPrefix), a2 = r3.tagName;
const l2 = r3.rawTagName;
let u2 = r3.tagExp, h2 = r3.attrExpPresent, d2 = r3.closeIndex;
let u2 = r3.tagExp, d2 = r3.attrExpPresent, h2 = r3.closeIndex;
if (this.options.transformTagName) {
const t3 = this.options.transformTagName(a2);
u2 === a2 && (u2 = t3), a2 = t3;
}
if (this.options.strictReservedNames && (a2 === this.options.commentPropName || a2 === this.options.cdataPropName)) throw new Error(`Invalid tag name: ${a2}`);
n2 && i2 && "!xml" !== n2.tagname && (i2 = this.saveTextToParentTag(i2, n2, s2, false));
const p2 = n2;
p2 && -1 !== this.options.unpairedTags.indexOf(p2.tagname) && (n2 = this.tagsNodeStack.pop(), s2 = s2.substring(0, s2.lastIndexOf("."))), a2 !== e2.tagname && (s2 += s2 ? "." + a2 : a2);
const f2 = o2;
const c2 = o2;
if (this.isItStopNode(this.stopNodesExact, this.stopNodesWildcard, s2, a2)) {
let e3 = "";
if (u2.length > 0 && u2.lastIndexOf("/") === u2.length - 1) "/" === a2[a2.length - 1] ? (a2 = a2.substr(0, a2.length - 1), s2 = s2.substr(0, s2.length - 1), u2 = a2) : u2 = u2.substr(0, u2.length - 1), o2 = r3.closeIndex;
else if (-1 !== this.options.unpairedTags.indexOf(a2)) o2 = r3.closeIndex;
else {
const n3 = this.readStopNodeData(t2, l2, d2 + 1);
const n3 = this.readStopNodeData(t2, l2, h2 + 1);
if (!n3) throw new Error(`Unexpected end of ${l2}`);
o2 = n3.i, e3 = n3.tagContent;
}
const i3 = new I(a2);
a2 !== u2 && h2 && (i3[":@"] = this.buildAttributesMap(u2, s2, a2)), e3 && (e3 = this.parseTextData(e3, a2, s2, true, h2, true, true)), s2 = s2.substr(0, s2.lastIndexOf(".")), i3.add(this.options.textNodeName, e3), this.addChild(n2, i3, s2, f2);
a2 !== u2 && d2 && (i3[":@"] = this.buildAttributesMap(u2, s2, a2)), e3 && (e3 = this.parseTextData(e3, a2, s2, true, d2, true, true)), s2 = s2.substr(0, s2.lastIndexOf(".")), i3.add(this.options.textNodeName, e3), this.addChild(n2, i3, s2, c2);
} else {
if (u2.length > 0 && u2.lastIndexOf("/") === u2.length - 1) {
if ("/" === a2[a2.length - 1] ? (a2 = a2.substr(0, a2.length - 1), s2 = s2.substr(0, s2.length - 1), u2 = a2) : u2 = u2.substr(0, u2.length - 1), this.options.transformTagName) {
@@ -62317,18 +62418,26 @@ var require_fxp = __commonJS({
u2 === a2 && (u2 = t4), a2 = t4;
}
const t3 = new I(a2);
a2 !== u2 && h2 && (t3[":@"] = this.buildAttributesMap(u2, s2, a2)), this.addChild(n2, t3, s2, f2), s2 = s2.substr(0, s2.lastIndexOf("."));
a2 !== u2 && d2 && (t3[":@"] = this.buildAttributesMap(u2, s2, a2)), this.addChild(n2, t3, s2, c2), s2 = s2.substr(0, s2.lastIndexOf("."));
} else {
const t3 = new I(a2);
this.tagsNodeStack.push(n2), a2 !== u2 && h2 && (t3[":@"] = this.buildAttributesMap(u2, s2, a2)), this.addChild(n2, t3, s2, f2), n2 = t3;
if (-1 !== this.options.unpairedTags.indexOf(a2)) {
const t3 = new I(a2);
a2 !== u2 && d2 && (t3[":@"] = this.buildAttributesMap(u2, s2)), this.addChild(n2, t3, s2, c2), s2 = s2.substr(0, s2.lastIndexOf(".")), o2 = r3.closeIndex;
continue;
}
{
const t3 = new I(a2);
if (this.tagsNodeStack.length > this.options.maxNestedTags) throw new Error("Maximum nested tags exceeded");
this.tagsNodeStack.push(n2), a2 !== u2 && d2 && (t3[":@"] = this.buildAttributesMap(u2, s2, a2)), this.addChild(n2, t3, s2, c2), n2 = t3;
}
}
i2 = "", o2 = d2;
i2 = "", o2 = h2;
}
}
else i2 += t2[o2];
return e2.child;
};
function R(t2, e2, n2, i2) {
function B(t2, e2, n2, i2) {
this.options.captureMetaData || (i2 = void 0);
const s2 = this.options.updateTag(e2.tagname, n2, e2[":@"]);
false === s2 || ("string" == typeof s2 ? (e2.tagname = s2, t2.addChild(e2, i2)) : t2.addChild(e2, i2));
@@ -62389,12 +62498,12 @@ var require_fxp = __commonJS({
const o2 = s2.index, a2 = r2.search(/\s/);
let l2 = r2, u2 = true;
-1 !== a2 && (l2 = r2.substring(0, a2), r2 = r2.substring(a2 + 1).trimStart());
const h2 = l2;
const d2 = l2;
if (n2) {
const t3 = l2.indexOf(":");
-1 !== t3 && (l2 = l2.substr(t3 + 1), u2 = l2 !== s2.data.substr(t3 + 1));
}
return { tagName: l2, tagExp: r2, closeIndex: o2, attrExpPresent: u2, rawTagName: h2 };
return { tagName: l2, tagExp: r2, closeIndex: o2, attrExpPresent: u2, rawTagName: d2 };
}
function q(t2, e2, n2) {
const i2 = n2;
@@ -62415,19 +62524,19 @@ var require_fxp = __commonJS({
if (e2 && "string" == typeof t2) {
const e3 = t2.trim();
return "true" === e3 || "false" !== e3 && (function(t3, e4 = {}) {
if (e4 = Object.assign({}, V, e4), !t3 || "string" != typeof t3) return t3;
if (e4 = Object.assign({}, D, e4), !t3 || "string" != typeof t3) return t3;
let n3 = t3.trim();
if (void 0 !== e4.skipLike && e4.skipLike.test(n3)) return t3;
if ("0" === t3) return 0;
if (e4.hex && C.test(n3)) return (function(t4) {
if (e4.hex && $.test(n3)) return (function(t4) {
if (parseInt) return parseInt(t4, 16);
if (Number.parseInt) return Number.parseInt(t4, 16);
if (window && window.parseInt) return window.parseInt(t4, 16);
throw new Error("parseInt, Number.parseInt, window.parseInt are not supported");
})(n3);
if (-1 !== n3.search(/.+[eE].+/)) return (function(t4, e5, n4) {
if (n3.includes("e") || n3.includes("E")) return (function(t4, e5, n4) {
if (!n4.eNotation) return t4;
const i3 = e5.match(D);
const i3 = e5.match(j);
if (i3) {
let s2 = i3[1] || "";
const r2 = -1 === i3[3].indexOf("e") ? "E" : "e", o2 = i3[2], a2 = s2 ? t4[o2.length + 1] === r2 : t4[o2.length] === r2;
@@ -62436,7 +62545,7 @@ var require_fxp = __commonJS({
return t4;
})(t3, n3, e4);
{
const s2 = $.exec(n3);
const s2 = V.exec(n3);
if (s2) {
const r2 = s2[1] || "", o2 = s2[2];
let a2 = (i2 = s2[3]) && -1 !== i2.indexOf(".") ? ("." === (i2 = i2.replace(/0+$/, "")) ? i2 = "0" : "." === i2[0] ? i2 = "0" + i2 : "." === i2[i2.length - 1] && (i2 = i2.substring(0, i2.length - 1)), i2) : i2;
@@ -62444,7 +62553,7 @@ var require_fxp = __commonJS({
if (!e4.leadingZeros && (o2.length > 1 || 1 === o2.length && !l2)) return t3;
{
const i3 = Number(n3), s3 = String(i3);
if (0 === i3 || -0 === i3) return i3;
if (0 === i3) return i3;
if (-1 !== s3.search(/[eE]/)) return e4.eNotation ? i3 : t3;
if (-1 !== n3.indexOf(".")) return "0" === s3 || s3 === a2 || s3 === `${r2}${a2}` ? i3 : t3;
let l3 = o2 ? a2 : n3;
@@ -62478,7 +62587,7 @@ var require_fxp = __commonJS({
if (o2[a2]) {
let t3 = H(o2[a2], e2, l2);
const n3 = nt(t3, e2);
void 0 !== o2[Q] && (t3[Q] = o2[Q]), o2[":@"] ? et(t3, o2[":@"], l2, e2) : 1 !== Object.keys(t3).length || void 0 === t3[e2.textNodeName] || e2.alwaysCreateTextNode ? 0 === Object.keys(t3).length && (e2.alwaysCreateTextNode ? t3[e2.textNodeName] = "" : t3 = "") : t3 = t3[e2.textNodeName], void 0 !== s2[a2] && s2.hasOwnProperty(a2) ? (Array.isArray(s2[a2]) || (s2[a2] = [s2[a2]]), s2[a2].push(t3)) : e2.isArray(a2, l2, n3) ? s2[a2] = [t3] : s2[a2] = t3;
o2[":@"] ? et(t3, o2[":@"], l2, e2) : 1 !== Object.keys(t3).length || void 0 === t3[e2.textNodeName] || e2.alwaysCreateTextNode ? 0 === Object.keys(t3).length && (e2.alwaysCreateTextNode ? t3[e2.textNodeName] = "" : t3 = "") : t3 = t3[e2.textNodeName], void 0 !== o2[Q] && "object" == typeof t3 && null !== t3 && (t3[Q] = o2[Q]), void 0 !== s2[a2] && Object.prototype.hasOwnProperty.call(s2, a2) ? (Array.isArray(s2[a2]) || (s2[a2] = [s2[a2]]), s2[a2].push(t3)) : e2.isArray(a2, l2, n3) ? s2[a2] = [t3] : s2[a2] = t3;
}
}
}
@@ -62506,7 +62615,7 @@ var require_fxp = __commonJS({
}
class it {
constructor(t2) {
this.externalEntities = {}, this.options = w(t2);
this.externalEntities = {}, this.options = v(t2);
}
parse(t2, e2) {
if ("string" != typeof t2 && t2.toString) t2 = t2.toString();
@@ -62516,7 +62625,7 @@ var require_fxp = __commonJS({
const n3 = a(t2, e2);
if (true !== n3) throw Error(`${n3.err.msg}:${n3.err.line}:${n3.err.col}`);
}
const n2 = new F(this.options);
const n2 = new L(this.options);
n2.addExternalEntities(this.externalEntities);
const i2 = n2.parseXml(t2);
return this.options.preserveOrder || void 0 === i2 ? i2 : J(i2, this.options);
@@ -62537,6 +62646,13 @@ var require_fxp = __commonJS({
}
function rt(t2, e2, n2, i2) {
let s2 = "", r2 = false;
if (!Array.isArray(t2)) {
if (null != t2) {
let n3 = t2.toString();
return n3 = ut(n3, e2), n3;
}
return "";
}
for (let o2 = 0; o2 < t2.length; o2++) {
const a2 = t2[o2], l2 = ot(a2);
if (void 0 === l2) continue;
@@ -62560,10 +62676,10 @@ var require_fxp = __commonJS({
o3 = 0 !== o3.length ? " " + o3 : "", s2 += n3 + `<${l2}${o3}${t3}?>`, r2 = true;
continue;
}
let h2 = i2;
"" !== h2 && (h2 += e2.indentBy);
const d2 = i2 + `<${l2}${at(a2[":@"], e2)}`, p2 = rt(a2[l2], e2, u2, h2);
-1 !== e2.unpairedTags.indexOf(l2) ? e2.suppressUnpairedNode ? s2 += d2 + ">" : s2 += d2 + "/>" : p2 && 0 !== p2.length || !e2.suppressEmptyNode ? p2 && p2.endsWith(">") ? s2 += d2 + `>${p2}${i2}</${l2}>` : (s2 += d2 + ">", p2 && "" !== i2 && (p2.includes("/>") || p2.includes("</")) ? s2 += i2 + e2.indentBy + p2 + i2 : s2 += p2, s2 += `</${l2}>`) : s2 += d2 + "/>", r2 = true;
let d2 = i2;
"" !== d2 && (d2 += e2.indentBy);
const h2 = i2 + `<${l2}${at(a2[":@"], e2)}`, p2 = rt(a2[l2], e2, u2, d2);
-1 !== e2.unpairedTags.indexOf(l2) ? e2.suppressUnpairedNode ? s2 += h2 + ">" : s2 += h2 + "/>" : p2 && 0 !== p2.length || !e2.suppressEmptyNode ? p2 && p2.endsWith(">") ? s2 += h2 + `>${p2}${i2}</${l2}>` : (s2 += h2 + ">", p2 && "" !== i2 && (p2.includes("/>") || p2.includes("</")) ? s2 += i2 + e2.indentBy + p2 + i2 : s2 += p2, s2 += `</${l2}>`) : s2 += h2 + "/>", r2 = true;
}
return s2;
}
@@ -62571,13 +62687,13 @@ var require_fxp = __commonJS({
const e2 = Object.keys(t2);
for (let n2 = 0; n2 < e2.length; n2++) {
const i2 = e2[n2];
if (t2.hasOwnProperty(i2) && ":@" !== i2) return i2;
if (Object.prototype.hasOwnProperty.call(t2, i2) && ":@" !== i2) return i2;
}
}
function at(t2, e2) {
let n2 = "";
if (t2 && !e2.ignoreAttributes) for (let i2 in t2) {
if (!t2.hasOwnProperty(i2)) continue;
if (!Object.prototype.hasOwnProperty.call(t2, i2)) continue;
let s2 = e2.attributeValueProcessor(i2, t2[i2]);
s2 = ut(s2, e2), true === s2 && e2.suppressBooleanAttributes ? n2 += ` ${i2.substr(e2.attributeNamePrefix.length)}` : n2 += ` ${i2.substr(e2.attributeNamePrefix.length)}="${s2}"`;
}
@@ -62595,15 +62711,21 @@ var require_fxp = __commonJS({
}
return t2;
}
const ht = { attributeNamePrefix: "@_", attributesGroupName: false, textNodeName: "#text", ignoreAttributes: true, cdataPropName: false, format: false, indentBy: " ", suppressEmptyNode: false, suppressUnpairedNode: true, suppressBooleanAttributes: true, tagValueProcessor: function(t2, e2) {
const dt = { attributeNamePrefix: "@_", attributesGroupName: false, textNodeName: "#text", ignoreAttributes: true, cdataPropName: false, format: false, indentBy: " ", suppressEmptyNode: false, suppressUnpairedNode: true, suppressBooleanAttributes: true, tagValueProcessor: function(t2, e2) {
return e2;
}, attributeValueProcessor: function(t2, e2) {
return e2;
}, preserveOrder: false, commentPropName: false, unpairedTags: [], entities: [{ regex: new RegExp("&", "g"), val: "&amp;" }, { regex: new RegExp(">", "g"), val: "&gt;" }, { regex: new RegExp("<", "g"), val: "&lt;" }, { regex: new RegExp("'", "g"), val: "&apos;" }, { regex: new RegExp('"', "g"), val: "&quot;" }], processEntities: true, stopNodes: [], oneListGroup: false };
function dt(t2) {
this.options = Object.assign({}, ht, t2), true === this.options.ignoreAttributes || this.options.attributesGroupName ? this.isAttribute = function() {
function ht(t2) {
var e2;
this.options = Object.assign({}, dt, t2), true === this.options.ignoreAttributes || this.options.attributesGroupName ? this.isAttribute = function() {
return false;
} : (this.ignoreAttributesFn = L(this.options.ignoreAttributes), this.attrPrefixLen = this.options.attributeNamePrefix.length, this.isAttribute = ct), this.processTextOrObjNode = pt, this.options.format ? (this.indentate = ft, this.tagEndChar = ">\n", this.newLine = "\n") : (this.indentate = function() {
} : (this.ignoreAttributesFn = "function" == typeof (e2 = this.options.ignoreAttributes) ? e2 : Array.isArray(e2) ? (t3) => {
for (const n2 of e2) {
if ("string" == typeof n2 && t3 === n2) return true;
if (n2 instanceof RegExp && n2.test(t3)) return true;
}
} : () => false, this.attrPrefixLen = this.options.attributeNamePrefix.length, this.isAttribute = ft), this.processTextOrObjNode = pt, this.options.format ? (this.indentate = ct, this.tagEndChar = ">\n", this.newLine = "\n") : (this.indentate = function() {
return "";
}, this.tagEndChar = ">", this.newLine = "");
}
@@ -62611,15 +62733,15 @@ var require_fxp = __commonJS({
const s2 = this.j2x(t2, n2 + 1, i2.concat(e2));
return void 0 !== t2[this.options.textNodeName] && 1 === Object.keys(t2).length ? this.buildTextValNode(t2[this.options.textNodeName], e2, s2.attrStr, n2) : this.buildObjectNode(s2.val, e2, s2.attrStr, n2);
}
function ft(t2) {
function ct(t2) {
return this.options.indentBy.repeat(t2);
}
function ct(t2) {
function ft(t2) {
return !(!t2.startsWith(this.options.attributeNamePrefix) || t2 === this.options.textNodeName) && t2.substr(this.attrPrefixLen);
}
dt.prototype.build = function(t2) {
ht.prototype.build = function(t2) {
return this.options.preserveOrder ? st(t2, this.options) : (Array.isArray(t2) && this.options.arrayNodeName && this.options.arrayNodeName.length > 1 && (t2 = { [this.options.arrayNodeName]: t2 }), this.j2x(t2, 0, []).val);
}, dt.prototype.j2x = function(t2, e2, n2) {
}, ht.prototype.j2x = function(t2, e2, n2) {
let i2 = "", s2 = "";
const r2 = n2.join(".");
for (let o2 in t2) if (Object.prototype.hasOwnProperty.call(t2, o2)) if (void 0 === t2[o2]) this.isAttribute(o2) && (s2 += "");
@@ -62654,18 +62776,18 @@ var require_fxp = __commonJS({
for (let s3 = 0; s3 < n3; s3++) i2 += this.buildAttrPairStr(e3[s3], "" + t2[o2][e3[s3]]);
} else s2 += this.processTextOrObjNode(t2[o2], o2, e2, n2);
return { attrStr: i2, val: s2 };
}, dt.prototype.buildAttrPairStr = function(t2, e2) {
}, ht.prototype.buildAttrPairStr = function(t2, e2) {
return e2 = this.options.attributeValueProcessor(t2, "" + e2), e2 = this.replaceEntitiesValue(e2), this.options.suppressBooleanAttributes && "true" === e2 ? " " + t2 : " " + t2 + '="' + e2 + '"';
}, dt.prototype.buildObjectNode = function(t2, e2, n2, i2) {
}, ht.prototype.buildObjectNode = function(t2, e2, n2, i2) {
if ("" === t2) return "?" === e2[0] ? this.indentate(i2) + "<" + e2 + n2 + "?" + this.tagEndChar : this.indentate(i2) + "<" + e2 + n2 + this.closeTag(e2) + this.tagEndChar;
{
let s2 = "</" + e2 + this.tagEndChar, r2 = "";
return "?" === e2[0] && (r2 = "?", s2 = ""), !n2 && "" !== n2 || -1 !== t2.indexOf("<") ? false !== this.options.commentPropName && e2 === this.options.commentPropName && 0 === r2.length ? this.indentate(i2) + `<!--${t2}-->` + this.newLine : this.indentate(i2) + "<" + e2 + n2 + r2 + this.tagEndChar + t2 + this.indentate(i2) + s2 : this.indentate(i2) + "<" + e2 + n2 + r2 + ">" + t2 + s2;
}
}, dt.prototype.closeTag = function(t2) {
}, ht.prototype.closeTag = function(t2) {
let e2 = "";
return -1 !== this.options.unpairedTags.indexOf(t2) ? this.options.suppressUnpairedNode || (e2 = "/") : e2 = this.options.suppressEmptyNode ? "/" : `></${t2}`, e2;
}, dt.prototype.buildTextValNode = function(t2, e2, n2, i2) {
}, ht.prototype.buildTextValNode = function(t2, e2, n2, i2) {
if (false !== this.options.cdataPropName && e2 === this.options.cdataPropName) return this.indentate(i2) + `<![CDATA[${t2}]]>` + this.newLine;
if (false !== this.options.commentPropName && e2 === this.options.commentPropName) return this.indentate(i2) + `<!--${t2}-->` + this.newLine;
if ("?" === e2[0]) return this.indentate(i2) + "<" + e2 + n2 + "?" + this.tagEndChar;
@@ -62673,14 +62795,14 @@ var require_fxp = __commonJS({
let s2 = this.options.tagValueProcessor(e2, t2);
return s2 = this.replaceEntitiesValue(s2), "" === s2 ? this.indentate(i2) + "<" + e2 + n2 + this.closeTag(e2) + this.tagEndChar : this.indentate(i2) + "<" + e2 + n2 + ">" + s2 + "</" + e2 + this.tagEndChar;
}
}, dt.prototype.replaceEntitiesValue = function(t2) {
}, ht.prototype.replaceEntitiesValue = function(t2) {
if (t2 && t2.length > 0 && this.options.processEntities) for (let e2 = 0; e2 < this.options.entities.length; e2++) {
const n2 = this.options.entities[e2];
t2 = t2.replace(n2.regex, n2.val);
}
return t2;
};
const gt = { validate: a };
const gt = ht, xt = { validate: a };
module2.exports = e;
})();
}
@@ -102870,7 +102992,7 @@ var safeDump = renamed("safeDump", "dump");
var semver = __toESM(require_semver2());
// src/api-compatibility.json
var maximumVersion = "3.20";
var maximumVersion = "3.21";
var minimumVersion = "3.14";
// src/util.ts
@@ -104145,6 +104267,11 @@ var featureConfig = {
// cannot be found when interpreting results.
minimumVersion: void 0
},
["start_proxy_remove_unused_registries" /* StartProxyRemoveUnusedRegistries */]: {
defaultValue: false,
envVar: "CODEQL_ACTION_START_PROXY_REMOVE_UNUSED_REGISTRIES",
minimumVersion: void 0
},
["start_proxy_use_features_release" /* StartProxyUseFeaturesRelease */]: {
defaultValue: false,
envVar: "CODEQL_ACTION_START_PROXY_USE_FEATURES_RELEASE",
@@ -104156,11 +104283,6 @@ var featureConfig = {
minimumVersion: void 0,
toolsFeature: "bundleSupportsOverlay" /* BundleSupportsOverlay */
},
["use_repository_properties_v2" /* UseRepositoryProperties */]: {
defaultValue: false,
envVar: "CODEQL_ACTION_USE_REPOSITORY_PROPERTIES",
minimumVersion: void 0
},
["validate_db_config" /* ValidateDbConfig */]: {
defaultValue: false,
envVar: "CODEQL_ACTION_VALIDATE_DB_CONFIG",

View File

@@ -45986,7 +45986,7 @@ var require_package = __commonJS({
"package.json"(exports2, module2) {
module2.exports = {
name: "codeql",
version: "4.32.5",
version: "4.32.7",
private: true,
description: "CodeQL action",
scripts: {
@@ -45995,7 +45995,7 @@ var require_package = __commonJS({
lint: "eslint --report-unused-disable-directives --max-warnings=0 .",
"lint-ci": "SARIF_ESLINT_IGNORE_SUPPRESSED=true eslint --report-unused-disable-directives --max-warnings=0 . --format @microsoft/eslint-formatter-sarif --output-file=eslint.sarif",
"lint-fix": "eslint --report-unused-disable-directives --max-warnings=0 . --fix",
ava: "npm run transpile && ava --serial --verbose",
ava: "npm run transpile && ava --verbose",
test: "npm run ava -- src/",
"test-debug": "npm run test -- --timeout=20m",
transpile: "tsc --build --verbose"
@@ -46044,6 +46044,7 @@ var require_package = __commonJS({
"@types/js-yaml": "^4.0.9",
"@types/node": "^20.19.9",
"@types/node-forge": "^1.3.14",
"@types/sarif": "^2.1.7",
"@types/semver": "^7.7.1",
"@types/sinon": "^21.0.0",
ava: "^6.4.1",
@@ -46052,14 +46053,14 @@ var require_package = __commonJS({
"eslint-import-resolver-typescript": "^3.8.7",
"eslint-plugin-github": "^6.0.0",
"eslint-plugin-import-x": "^4.16.1",
"eslint-plugin-jsdoc": "^62.5.0",
"eslint-plugin-jsdoc": "^62.7.1",
"eslint-plugin-no-async-foreach": "^0.1.1",
glob: "^11.1.0",
globals: "^16.5.0",
globals: "^17.3.0",
nock: "^14.0.11",
sinon: "^21.0.1",
typescript: "^5.9.3",
"typescript-eslint": "^8.56.0"
"typescript-eslint": "^8.56.1"
},
overrides: {
"@actions/tool-cache": {
@@ -48064,6 +48065,7 @@ var require_minimatch = __commonJS({
pattern = pattern.split(path9.sep).join("/");
}
this.options = options;
this.maxGlobstarRecursion = options.maxGlobstarRecursion !== void 0 ? options.maxGlobstarRecursion : 200;
this.set = [];
this.pattern = pattern;
this.regexp = null;
@@ -48460,50 +48462,147 @@ var require_minimatch = __commonJS({
return this.negate;
};
Minimatch.prototype.matchOne = function(file, pattern, partial) {
var options = this.options;
this.debug(
"matchOne",
{ "this": this, file, pattern }
if (pattern.indexOf(GLOBSTAR) !== -1) {
return this._matchGlobstar(file, pattern, partial, 0, 0);
}
return this._matchOne(file, pattern, partial, 0, 0);
};
Minimatch.prototype._matchGlobstar = function(file, pattern, partial, fileIndex, patternIndex) {
var i;
var firstgs = -1;
for (i = patternIndex; i < pattern.length; i++) {
if (pattern[i] === GLOBSTAR) {
firstgs = i;
break;
}
}
var lastgs = -1;
for (i = pattern.length - 1; i >= 0; i--) {
if (pattern[i] === GLOBSTAR) {
lastgs = i;
break;
}
}
var head = pattern.slice(patternIndex, firstgs);
var body = partial ? pattern.slice(firstgs + 1) : pattern.slice(firstgs + 1, lastgs);
var tail = partial ? [] : pattern.slice(lastgs + 1);
if (head.length) {
var fileHead = file.slice(fileIndex, fileIndex + head.length);
if (!this._matchOne(fileHead, head, partial, 0, 0)) {
return false;
}
fileIndex += head.length;
}
var fileTailMatch = 0;
if (tail.length) {
if (tail.length + fileIndex > file.length) return false;
var tailStart = file.length - tail.length;
if (this._matchOne(file, tail, partial, tailStart, 0)) {
fileTailMatch = tail.length;
} else {
if (file[file.length - 1] !== "" || fileIndex + tail.length === file.length) {
return false;
}
tailStart--;
if (!this._matchOne(file, tail, partial, tailStart, 0)) {
return false;
}
fileTailMatch = tail.length + 1;
}
}
if (!body.length) {
var sawSome = !!fileTailMatch;
for (i = fileIndex; i < file.length - fileTailMatch; i++) {
var f = String(file[i]);
sawSome = true;
if (f === "." || f === ".." || !this.options.dot && f.charAt(0) === ".") {
return false;
}
}
return partial || sawSome;
}
var bodySegments = [[[], 0]];
var currentBody = bodySegments[0];
var nonGsParts = 0;
var nonGsPartsSums = [0];
for (var bi = 0; bi < body.length; bi++) {
var b = body[bi];
if (b === GLOBSTAR) {
nonGsPartsSums.push(nonGsParts);
currentBody = [[], 0];
bodySegments.push(currentBody);
} else {
currentBody[0].push(b);
nonGsParts++;
}
}
var idx = bodySegments.length - 1;
var fileLength = file.length - fileTailMatch;
for (var si = 0; si < bodySegments.length; si++) {
bodySegments[si][1] = fileLength - (nonGsPartsSums[idx--] + bodySegments[si][0].length);
}
return !!this._matchGlobStarBodySections(
file,
bodySegments,
fileIndex,
0,
partial,
0,
!!fileTailMatch
);
this.debug("matchOne", file.length, pattern.length);
for (var fi = 0, pi = 0, fl = file.length, pl = pattern.length; fi < fl && pi < pl; fi++, pi++) {
};
Minimatch.prototype._matchGlobStarBodySections = function(file, bodySegments, fileIndex, bodyIndex, partial, globStarDepth, sawTail) {
var bs = bodySegments[bodyIndex];
if (!bs) {
for (var i = fileIndex; i < file.length; i++) {
sawTail = true;
var f = file[i];
if (f === "." || f === ".." || !this.options.dot && f.charAt(0) === ".") {
return false;
}
}
return sawTail;
}
var body = bs[0];
var after = bs[1];
while (fileIndex <= after) {
var m = this._matchOne(
file.slice(0, fileIndex + body.length),
body,
partial,
fileIndex,
0
);
if (m && globStarDepth < this.maxGlobstarRecursion) {
var sub = this._matchGlobStarBodySections(
file,
bodySegments,
fileIndex + body.length,
bodyIndex + 1,
partial,
globStarDepth + 1,
sawTail
);
if (sub !== false) {
return sub;
}
}
var f = file[fileIndex];
if (f === "." || f === ".." || !this.options.dot && f.charAt(0) === ".") {
return false;
}
fileIndex++;
}
return partial || null;
};
Minimatch.prototype._matchOne = function(file, pattern, partial, fileIndex, patternIndex) {
var fi, pi, fl, pl;
for (fi = fileIndex, pi = patternIndex, fl = file.length, pl = pattern.length; fi < fl && pi < pl; fi++, pi++) {
this.debug("matchOne loop");
var p = pattern[pi];
var f = file[fi];
this.debug(pattern, p, f);
if (p === false) return false;
if (p === GLOBSTAR) {
this.debug("GLOBSTAR", [pattern, p, f]);
var fr = fi;
var pr = pi + 1;
if (pr === pl) {
this.debug("** at the end");
for (; fi < fl; fi++) {
if (file[fi] === "." || file[fi] === ".." || !options.dot && file[fi].charAt(0) === ".") return false;
}
return true;
}
while (fr < fl) {
var swallowee = file[fr];
this.debug("\nglobstar while", file, fr, pattern, pr, swallowee);
if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) {
this.debug("globstar found match!", fr, fl, swallowee);
return true;
} else {
if (swallowee === "." || swallowee === ".." || !options.dot && swallowee.charAt(0) === ".") {
this.debug("dot detected!", file, fr, pattern, pr);
break;
}
this.debug("globstar swallow a segment, and continue");
fr++;
}
}
if (partial) {
this.debug("\n>>> no match, partial?", file, fr, pattern, pr);
if (fr === fl) return true;
}
return false;
}
if (p === false || p === GLOBSTAR) return false;
var hit;
if (typeof p === "string") {
hit = f === p;
@@ -60543,7 +60642,7 @@ var require_fxp = __commonJS({
}, o: (t2, e2) => Object.prototype.hasOwnProperty.call(t2, e2), r: (t2) => {
"undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(t2, Symbol.toStringTag, { value: "Module" }), Object.defineProperty(t2, "__esModule", { value: true });
} }, e = {};
t.r(e), t.d(e, { XMLBuilder: () => dt, XMLParser: () => it, XMLValidator: () => gt });
t.r(e), t.d(e, { XMLBuilder: () => gt, XMLParser: () => it, XMLValidator: () => xt });
const n = ":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", i = new RegExp("^[" + n + "][" + n + "\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$");
function s(t2, e2) {
const n2 = [];
@@ -60565,90 +60664,90 @@ var require_fxp = __commonJS({
const n2 = [];
let i2 = false, s2 = false;
"\uFEFF" === t2[0] && (t2 = t2.substr(1));
for (let o2 = 0; o2 < t2.length; o2++) if ("<" === t2[o2] && "?" === t2[o2 + 1]) {
if (o2 += 2, o2 = u(t2, o2), o2.err) return o2;
for (let r2 = 0; r2 < t2.length; r2++) if ("<" === t2[r2] && "?" === t2[r2 + 1]) {
if (r2 += 2, r2 = u(t2, r2), r2.err) return r2;
} else {
if ("<" !== t2[o2]) {
if (l(t2[o2])) continue;
return m("InvalidChar", "char '" + t2[o2] + "' is not expected.", b(t2, o2));
if ("<" !== t2[r2]) {
if (l(t2[r2])) continue;
return m("InvalidChar", "char '" + t2[r2] + "' is not expected.", N(t2, r2));
}
{
let a2 = o2;
if (o2++, "!" === t2[o2]) {
o2 = h(t2, o2);
let o2 = r2;
if (r2++, "!" === t2[r2]) {
r2 = d(t2, r2);
continue;
}
{
let d2 = false;
"/" === t2[o2] && (d2 = true, o2++);
let p2 = "";
for (; o2 < t2.length && ">" !== t2[o2] && " " !== t2[o2] && " " !== t2[o2] && "\n" !== t2[o2] && "\r" !== t2[o2]; o2++) p2 += t2[o2];
if (p2 = p2.trim(), "/" === p2[p2.length - 1] && (p2 = p2.substring(0, p2.length - 1), o2--), !r(p2)) {
let a2 = false;
"/" === t2[r2] && (a2 = true, r2++);
let h2 = "";
for (; r2 < t2.length && ">" !== t2[r2] && " " !== t2[r2] && " " !== t2[r2] && "\n" !== t2[r2] && "\r" !== t2[r2]; r2++) h2 += t2[r2];
if (h2 = h2.trim(), "/" === h2[h2.length - 1] && (h2 = h2.substring(0, h2.length - 1), r2--), !b(h2)) {
let e3;
return e3 = 0 === p2.trim().length ? "Invalid space after '<'." : "Tag '" + p2 + "' is an invalid name.", m("InvalidTag", e3, b(t2, o2));
return e3 = 0 === h2.trim().length ? "Invalid space after '<'." : "Tag '" + h2 + "' is an invalid name.", m("InvalidTag", e3, N(t2, r2));
}
const c2 = f(t2, o2);
if (false === c2) return m("InvalidAttr", "Attributes for '" + p2 + "' have open quote.", b(t2, o2));
let E2 = c2.value;
if (o2 = c2.index, "/" === E2[E2.length - 1]) {
const n3 = o2 - E2.length;
E2 = E2.substring(0, E2.length - 1);
const s3 = g(E2, e2);
if (true !== s3) return m(s3.err.code, s3.err.msg, b(t2, n3 + s3.err.line));
const p2 = c(t2, r2);
if (false === p2) return m("InvalidAttr", "Attributes for '" + h2 + "' have open quote.", N(t2, r2));
let f2 = p2.value;
if (r2 = p2.index, "/" === f2[f2.length - 1]) {
const n3 = r2 - f2.length;
f2 = f2.substring(0, f2.length - 1);
const s3 = g(f2, e2);
if (true !== s3) return m(s3.err.code, s3.err.msg, N(t2, n3 + s3.err.line));
i2 = true;
} else if (d2) {
if (!c2.tagClosed) return m("InvalidTag", "Closing tag '" + p2 + "' doesn't have proper closing.", b(t2, o2));
if (E2.trim().length > 0) return m("InvalidTag", "Closing tag '" + p2 + "' can't have attributes or invalid starting.", b(t2, a2));
if (0 === n2.length) return m("InvalidTag", "Closing tag '" + p2 + "' has not been opened.", b(t2, a2));
} else if (a2) {
if (!p2.tagClosed) return m("InvalidTag", "Closing tag '" + h2 + "' doesn't have proper closing.", N(t2, r2));
if (f2.trim().length > 0) return m("InvalidTag", "Closing tag '" + h2 + "' can't have attributes or invalid starting.", N(t2, o2));
if (0 === n2.length) return m("InvalidTag", "Closing tag '" + h2 + "' has not been opened.", N(t2, o2));
{
const e3 = n2.pop();
if (p2 !== e3.tagName) {
let n3 = b(t2, e3.tagStartPos);
return m("InvalidTag", "Expected closing tag '" + e3.tagName + "' (opened in line " + n3.line + ", col " + n3.col + ") instead of closing tag '" + p2 + "'.", b(t2, a2));
if (h2 !== e3.tagName) {
let n3 = N(t2, e3.tagStartPos);
return m("InvalidTag", "Expected closing tag '" + e3.tagName + "' (opened in line " + n3.line + ", col " + n3.col + ") instead of closing tag '" + h2 + "'.", N(t2, o2));
}
0 == n2.length && (s2 = true);
}
} else {
const r2 = g(E2, e2);
if (true !== r2) return m(r2.err.code, r2.err.msg, b(t2, o2 - E2.length + r2.err.line));
if (true === s2) return m("InvalidXml", "Multiple possible root nodes found.", b(t2, o2));
-1 !== e2.unpairedTags.indexOf(p2) || n2.push({ tagName: p2, tagStartPos: a2 }), i2 = true;
const a3 = g(f2, e2);
if (true !== a3) return m(a3.err.code, a3.err.msg, N(t2, r2 - f2.length + a3.err.line));
if (true === s2) return m("InvalidXml", "Multiple possible root nodes found.", N(t2, r2));
-1 !== e2.unpairedTags.indexOf(h2) || n2.push({ tagName: h2, tagStartPos: o2 }), i2 = true;
}
for (o2++; o2 < t2.length; o2++) if ("<" === t2[o2]) {
if ("!" === t2[o2 + 1]) {
o2++, o2 = h(t2, o2);
for (r2++; r2 < t2.length; r2++) if ("<" === t2[r2]) {
if ("!" === t2[r2 + 1]) {
r2++, r2 = d(t2, r2);
continue;
}
if ("?" !== t2[o2 + 1]) break;
if (o2 = u(t2, ++o2), o2.err) return o2;
} else if ("&" === t2[o2]) {
const e3 = x(t2, o2);
if (-1 == e3) return m("InvalidChar", "char '&' is not expected.", b(t2, o2));
o2 = e3;
} else if (true === s2 && !l(t2[o2])) return m("InvalidXml", "Extra text at the end", b(t2, o2));
"<" === t2[o2] && o2--;
if ("?" !== t2[r2 + 1]) break;
if (r2 = u(t2, ++r2), r2.err) return r2;
} else if ("&" === t2[r2]) {
const e3 = x(t2, r2);
if (-1 == e3) return m("InvalidChar", "char '&' is not expected.", N(t2, r2));
r2 = e3;
} else if (true === s2 && !l(t2[r2])) return m("InvalidXml", "Extra text at the end", N(t2, r2));
"<" === t2[r2] && r2--;
}
}
}
return i2 ? 1 == n2.length ? m("InvalidTag", "Unclosed tag '" + n2[0].tagName + "'.", b(t2, n2[0].tagStartPos)) : !(n2.length > 0) || m("InvalidXml", "Invalid '" + JSON.stringify(n2.map(((t3) => t3.tagName)), null, 4).replace(/\r?\n/g, "") + "' found.", { line: 1, col: 1 }) : m("InvalidXml", "Start tag expected.", 1);
return i2 ? 1 == n2.length ? m("InvalidTag", "Unclosed tag '" + n2[0].tagName + "'.", N(t2, n2[0].tagStartPos)) : !(n2.length > 0) || m("InvalidXml", "Invalid '" + JSON.stringify(n2.map((t3) => t3.tagName), null, 4).replace(/\r?\n/g, "") + "' found.", { line: 1, col: 1 }) : m("InvalidXml", "Start tag expected.", 1);
}
function l(t2) {
return " " === t2 || " " === t2 || "\n" === t2 || "\r" === t2;
}
function u(t2, e2) {
const n2 = e2;
for (; e2 < t2.length; e2++) if ("?" != t2[e2] && " " != t2[e2]) ;
else {
for (; e2 < t2.length; e2++) if ("?" == t2[e2] || " " == t2[e2]) {
const i2 = t2.substr(n2, e2 - n2);
if (e2 > 5 && "xml" === i2) return m("InvalidXml", "XML declaration allowed only at the start of the document.", b(t2, e2));
if (e2 > 5 && "xml" === i2) return m("InvalidXml", "XML declaration allowed only at the start of the document.", N(t2, e2));
if ("?" == t2[e2] && ">" == t2[e2 + 1]) {
e2++;
break;
}
continue;
}
return e2;
}
function h(t2, e2) {
function d(t2, e2) {
if (t2.length > e2 + 5 && "-" === t2[e2 + 1] && "-" === t2[e2 + 2]) {
for (e2 += 3; e2 < t2.length; e2++) if ("-" === t2[e2] && "-" === t2[e2 + 1] && ">" === t2[e2 + 2]) {
e2 += 2;
@@ -60666,11 +60765,11 @@ var require_fxp = __commonJS({
}
return e2;
}
const d = '"', p = "'";
function f(t2, e2) {
const h = '"', p = "'";
function c(t2, e2) {
let n2 = "", i2 = "", s2 = false;
for (; e2 < t2.length; e2++) {
if (t2[e2] === d || t2[e2] === p) "" === i2 ? i2 = t2[e2] : i2 !== t2[e2] || (i2 = "");
if (t2[e2] === h || t2[e2] === p) "" === i2 ? i2 = t2[e2] : i2 !== t2[e2] || (i2 = "");
else if (">" === t2[e2] && "" === i2) {
s2 = true;
break;
@@ -60679,16 +60778,16 @@ var require_fxp = __commonJS({
}
return "" === i2 && { value: n2, index: e2, tagClosed: s2 };
}
const c = new RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`, "g");
const f = new RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`, "g");
function g(t2, e2) {
const n2 = s(t2, c), i2 = {};
const n2 = s(t2, f), i2 = {};
for (let t3 = 0; t3 < n2.length; t3++) {
if (0 === n2[t3][1].length) return m("InvalidAttr", "Attribute '" + n2[t3][2] + "' has no space in starting.", N(n2[t3]));
if (void 0 !== n2[t3][3] && void 0 === n2[t3][4]) return m("InvalidAttr", "Attribute '" + n2[t3][2] + "' is without value.", N(n2[t3]));
if (void 0 === n2[t3][3] && !e2.allowBooleanAttributes) return m("InvalidAttr", "boolean attribute '" + n2[t3][2] + "' is not allowed.", N(n2[t3]));
if (0 === n2[t3][1].length) return m("InvalidAttr", "Attribute '" + n2[t3][2] + "' has no space in starting.", y(n2[t3]));
if (void 0 !== n2[t3][3] && void 0 === n2[t3][4]) return m("InvalidAttr", "Attribute '" + n2[t3][2] + "' is without value.", y(n2[t3]));
if (void 0 === n2[t3][3] && !e2.allowBooleanAttributes) return m("InvalidAttr", "boolean attribute '" + n2[t3][2] + "' is not allowed.", y(n2[t3]));
const s2 = n2[t3][2];
if (!E(s2)) return m("InvalidAttr", "Attribute '" + s2 + "' is an invalid name.", N(n2[t3]));
if (i2.hasOwnProperty(s2)) return m("InvalidAttr", "Attribute '" + s2 + "' is repeated.", N(n2[t3]));
if (!E(s2)) return m("InvalidAttr", "Attribute '" + s2 + "' is an invalid name.", y(n2[t3]));
if (Object.prototype.hasOwnProperty.call(i2, s2)) return m("InvalidAttr", "Attribute '" + s2 + "' is repeated.", y(n2[t3]));
i2[s2] = 1;
}
return true;
@@ -60716,49 +60815,52 @@ var require_fxp = __commonJS({
function E(t2) {
return r(t2);
}
function b(t2, e2) {
function b(t2) {
return r(t2);
}
function N(t2, e2) {
const n2 = t2.substring(0, e2).split(/\r?\n/);
return { line: n2.length, col: n2[n2.length - 1].length + 1 };
}
function N(t2) {
function y(t2) {
return t2.startIndex + t2[1].length;
}
const y = { preserveOrder: false, attributeNamePrefix: "@_", attributesGroupName: false, textNodeName: "#text", ignoreAttributes: true, removeNSPrefix: false, allowBooleanAttributes: false, parseTagValue: true, parseAttributeValue: false, trimValues: true, cdataPropName: false, numberParseOptions: { hex: true, leadingZeros: true, eNotation: true }, tagValueProcessor: function(t2, e2) {
const T = { preserveOrder: false, attributeNamePrefix: "@_", attributesGroupName: false, textNodeName: "#text", ignoreAttributes: true, removeNSPrefix: false, allowBooleanAttributes: false, parseTagValue: true, parseAttributeValue: false, trimValues: true, cdataPropName: false, numberParseOptions: { hex: true, leadingZeros: true, eNotation: true }, tagValueProcessor: function(t2, e2) {
return e2;
}, attributeValueProcessor: function(t2, e2) {
return e2;
}, stopNodes: [], alwaysCreateTextNode: false, isArray: () => false, commentPropName: false, unpairedTags: [], processEntities: true, htmlEntities: false, ignoreDeclaration: false, ignorePiTags: false, transformTagName: false, transformAttributeName: false, updateTag: function(t2, e2, n2) {
return t2;
}, captureMetaData: false };
function T(t2) {
return "boolean" == typeof t2 ? { enabled: t2, maxEntitySize: 1e4, maxExpansionDepth: 10, maxTotalExpansions: 1e3, maxExpandedLength: 1e5, allowedTags: null, tagFilter: null } : "object" == typeof t2 && null !== t2 ? { enabled: false !== t2.enabled, maxEntitySize: t2.maxEntitySize ?? 1e4, maxExpansionDepth: t2.maxExpansionDepth ?? 10, maxTotalExpansions: t2.maxTotalExpansions ?? 1e3, maxExpandedLength: t2.maxExpandedLength ?? 1e5, allowedTags: t2.allowedTags ?? null, tagFilter: t2.tagFilter ?? null } : T(true);
}, captureMetaData: false, maxNestedTags: 100, strictReservedNames: true };
function w(t2) {
return "boolean" == typeof t2 ? { enabled: t2, maxEntitySize: 1e4, maxExpansionDepth: 10, maxTotalExpansions: 1e3, maxExpandedLength: 1e5, allowedTags: null, tagFilter: null } : "object" == typeof t2 && null !== t2 ? { enabled: false !== t2.enabled, maxEntitySize: t2.maxEntitySize ?? 1e4, maxExpansionDepth: t2.maxExpansionDepth ?? 10, maxTotalExpansions: t2.maxTotalExpansions ?? 1e3, maxExpandedLength: t2.maxExpandedLength ?? 1e5, allowedTags: t2.allowedTags ?? null, tagFilter: t2.tagFilter ?? null } : w(true);
}
const w = function(t2) {
const e2 = Object.assign({}, y, t2);
return e2.processEntities = T(e2.processEntities), e2;
const v = function(t2) {
const e2 = Object.assign({}, T, t2);
return e2.processEntities = w(e2.processEntities), e2;
};
let v;
v = "function" != typeof Symbol ? "@@xmlMetadata" : /* @__PURE__ */ Symbol("XML Node Metadata");
let O;
O = "function" != typeof Symbol ? "@@xmlMetadata" : /* @__PURE__ */ Symbol("XML Node Metadata");
class I {
constructor(t2) {
this.tagname = t2, this.child = [], this[":@"] = {};
this.tagname = t2, this.child = [], this[":@"] = /* @__PURE__ */ Object.create(null);
}
add(t2, e2) {
"__proto__" === t2 && (t2 = "#__proto__"), this.child.push({ [t2]: e2 });
}
addChild(t2, e2) {
"__proto__" === t2.tagname && (t2.tagname = "#__proto__"), t2[":@"] && Object.keys(t2[":@"]).length > 0 ? this.child.push({ [t2.tagname]: t2.child, ":@": t2[":@"] }) : this.child.push({ [t2.tagname]: t2.child }), void 0 !== e2 && (this.child[this.child.length - 1][v] = { startIndex: e2 });
"__proto__" === t2.tagname && (t2.tagname = "#__proto__"), t2[":@"] && Object.keys(t2[":@"]).length > 0 ? this.child.push({ [t2.tagname]: t2.child, ":@": t2[":@"] }) : this.child.push({ [t2.tagname]: t2.child }), void 0 !== e2 && (this.child[this.child.length - 1][O] = { startIndex: e2 });
}
static getMetaDataSymbol() {
return v;
return O;
}
}
class O {
class P {
constructor(t2) {
this.suppressValidationErr = !t2, this.options = t2;
}
readDocType(t2, e2) {
const n2 = {};
const n2 = /* @__PURE__ */ Object.create(null);
if ("O" !== t2[e2 + 3] || "C" !== t2[e2 + 4] || "T" !== t2[e2 + 5] || "Y" !== t2[e2 + 6] || "P" !== t2[e2 + 7] || "E" !== t2[e2 + 8]) throw new Error("Invalid Tag instead of DOCTYPE");
{
e2 += 9;
@@ -60767,23 +60869,23 @@ var require_fxp = __commonJS({
if (r2 ? "-" === t2[e2 - 1] && "-" === t2[e2 - 2] && (r2 = false, i2--) : i2--, 0 === i2) break;
} else "[" === t2[e2] ? s2 = true : o2 += t2[e2];
else {
if (s2 && A(t2, "!ENTITY", e2)) {
if (s2 && S(t2, "!ENTITY", e2)) {
let i3, s3;
if (e2 += 7, [i3, s3, e2] = this.readEntityExp(t2, e2 + 1, this.suppressValidationErr), -1 === s3.indexOf("&")) {
const t3 = i3.replace(/[.\-+*:]/g, "\\.");
n2[i3] = { regx: RegExp(`&${t3};`, "g"), val: s3 };
}
} else if (s2 && A(t2, "!ELEMENT", e2)) {
} else if (s2 && S(t2, "!ELEMENT", e2)) {
e2 += 8;
const { index: n3 } = this.readElementExp(t2, e2 + 1);
e2 = n3;
} else if (s2 && A(t2, "!ATTLIST", e2)) e2 += 8;
else if (s2 && A(t2, "!NOTATION", e2)) {
} else if (s2 && S(t2, "!ATTLIST", e2)) e2 += 8;
else if (s2 && S(t2, "!NOTATION", e2)) {
e2 += 9;
const { index: n3 } = this.readNotationExp(t2, e2 + 1, this.suppressValidationErr);
e2 = n3;
} else {
if (!A(t2, "!--", e2)) throw new Error("Invalid DOCTYPE");
if (!S(t2, "!--", e2)) throw new Error("Invalid DOCTYPE");
r2 = true;
}
i2++, o2 = "";
@@ -60793,10 +60895,10 @@ var require_fxp = __commonJS({
return { entities: n2, i: e2 };
}
readEntityExp(t2, e2) {
e2 = P(t2, e2);
e2 = A(t2, e2);
let n2 = "";
for (; e2 < t2.length && !/\s/.test(t2[e2]) && '"' !== t2[e2] && "'" !== t2[e2]; ) n2 += t2[e2], e2++;
if (S(n2), e2 = P(t2, e2), !this.suppressValidationErr) {
if (C(n2), e2 = A(t2, e2), !this.suppressValidationErr) {
if ("SYSTEM" === t2.substring(e2, e2 + 6).toUpperCase()) throw new Error("External entities are not supported");
if ("%" === t2[e2]) throw new Error("Parameter entities are not supported");
}
@@ -60805,15 +60907,15 @@ var require_fxp = __commonJS({
return [n2, i2, --e2];
}
readNotationExp(t2, e2) {
e2 = P(t2, e2);
e2 = A(t2, e2);
let n2 = "";
for (; e2 < t2.length && !/\s/.test(t2[e2]); ) n2 += t2[e2], e2++;
!this.suppressValidationErr && S(n2), e2 = P(t2, e2);
!this.suppressValidationErr && C(n2), e2 = A(t2, e2);
const i2 = t2.substring(e2, e2 + 6).toUpperCase();
if (!this.suppressValidationErr && "SYSTEM" !== i2 && "PUBLIC" !== i2) throw new Error(`Expected SYSTEM or PUBLIC, found "${i2}"`);
e2 += i2.length, e2 = P(t2, e2);
e2 += i2.length, e2 = A(t2, e2);
let s2 = null, r2 = null;
if ("PUBLIC" === i2) [e2, s2] = this.readIdentifierVal(t2, e2, "publicIdentifier"), '"' !== t2[e2 = P(t2, e2)] && "'" !== t2[e2] || ([e2, r2] = this.readIdentifierVal(t2, e2, "systemIdentifier"));
if ("PUBLIC" === i2) [e2, s2] = this.readIdentifierVal(t2, e2, "publicIdentifier"), '"' !== t2[e2 = A(t2, e2)] && "'" !== t2[e2] || ([e2, r2] = this.readIdentifierVal(t2, e2, "systemIdentifier"));
else if ("SYSTEM" === i2 && ([e2, r2] = this.readIdentifierVal(t2, e2, "systemIdentifier"), !this.suppressValidationErr && !r2)) throw new Error("Missing mandatory system identifier for SYSTEM notation");
return { notationName: n2, publicIdentifier: s2, systemIdentifier: r2, index: --e2 };
}
@@ -60826,13 +60928,13 @@ var require_fxp = __commonJS({
return [++e2, i2];
}
readElementExp(t2, e2) {
e2 = P(t2, e2);
e2 = A(t2, e2);
let n2 = "";
for (; e2 < t2.length && !/\s/.test(t2[e2]); ) n2 += t2[e2], e2++;
if (!this.suppressValidationErr && !r(n2)) throw new Error(`Invalid element name: "${n2}"`);
let i2 = "";
if ("E" === t2[e2 = P(t2, e2)] && A(t2, "MPTY", e2)) e2 += 4;
else if ("A" === t2[e2] && A(t2, "NY", e2)) e2 += 2;
if ("E" === t2[e2 = A(t2, e2)] && S(t2, "MPTY", e2)) e2 += 4;
else if ("A" === t2[e2] && S(t2, "NY", e2)) e2 += 2;
else if ("(" === t2[e2]) {
for (e2++; e2 < t2.length && ")" !== t2[e2]; ) i2 += t2[e2], e2++;
if (")" !== t2[e2]) throw new Error("Unterminated content model");
@@ -60840,24 +60942,24 @@ var require_fxp = __commonJS({
return { elementName: n2, contentModel: i2.trim(), index: e2 };
}
readAttlistExp(t2, e2) {
e2 = P(t2, e2);
e2 = A(t2, e2);
let n2 = "";
for (; e2 < t2.length && !/\s/.test(t2[e2]); ) n2 += t2[e2], e2++;
S(n2), e2 = P(t2, e2);
C(n2), e2 = A(t2, e2);
let i2 = "";
for (; e2 < t2.length && !/\s/.test(t2[e2]); ) i2 += t2[e2], e2++;
if (!S(i2)) throw new Error(`Invalid attribute name: "${i2}"`);
e2 = P(t2, e2);
if (!C(i2)) throw new Error(`Invalid attribute name: "${i2}"`);
e2 = A(t2, e2);
let s2 = "";
if ("NOTATION" === t2.substring(e2, e2 + 8).toUpperCase()) {
if (s2 = "NOTATION", "(" !== t2[e2 = P(t2, e2 += 8)]) throw new Error(`Expected '(', found "${t2[e2]}"`);
if (s2 = "NOTATION", "(" !== t2[e2 = A(t2, e2 += 8)]) throw new Error(`Expected '(', found "${t2[e2]}"`);
e2++;
let n3 = [];
for (; e2 < t2.length && ")" !== t2[e2]; ) {
let i3 = "";
for (; e2 < t2.length && "|" !== t2[e2] && ")" !== t2[e2]; ) i3 += t2[e2], e2++;
if (i3 = i3.trim(), !S(i3)) throw new Error(`Invalid notation name: "${i3}"`);
n3.push(i3), "|" === t2[e2] && (e2++, e2 = P(t2, e2));
if (i3 = i3.trim(), !C(i3)) throw new Error(`Invalid notation name: "${i3}"`);
n3.push(i3), "|" === t2[e2] && (e2++, e2 = A(t2, e2));
}
if (")" !== t2[e2]) throw new Error("Unterminated list of notations");
e2++, s2 += " (" + n3.join("|") + ")";
@@ -60866,45 +60968,43 @@ var require_fxp = __commonJS({
const n3 = ["CDATA", "ID", "IDREF", "IDREFS", "ENTITY", "ENTITIES", "NMTOKEN", "NMTOKENS"];
if (!this.suppressValidationErr && !n3.includes(s2.toUpperCase())) throw new Error(`Invalid attribute type: "${s2}"`);
}
e2 = P(t2, e2);
e2 = A(t2, e2);
let r2 = "";
return "#REQUIRED" === t2.substring(e2, e2 + 8).toUpperCase() ? (r2 = "#REQUIRED", e2 += 8) : "#IMPLIED" === t2.substring(e2, e2 + 7).toUpperCase() ? (r2 = "#IMPLIED", e2 += 7) : [e2, r2] = this.readIdentifierVal(t2, e2, "ATTLIST"), { elementName: n2, attributeName: i2, attributeType: s2, defaultValue: r2, index: e2 };
}
}
const P = (t2, e2) => {
const A = (t2, e2) => {
for (; e2 < t2.length && /\s/.test(t2[e2]); ) e2++;
return e2;
};
function A(t2, e2, n2) {
function S(t2, e2, n2) {
for (let i2 = 0; i2 < e2.length; i2++) if (e2[i2] !== t2[n2 + i2 + 1]) return false;
return true;
}
function S(t2) {
function C(t2) {
if (r(t2)) return t2;
throw new Error(`Invalid entity name ${t2}`);
}
const C = /^[-+]?0x[a-fA-F0-9]+$/, $ = /^([\-\+])?(0*)([0-9]*(\.[0-9]*)?)$/, V = { hex: true, leadingZeros: true, decimalPoint: ".", eNotation: true };
const D = /^([-+])?(0*)(\d*(\.\d*)?[eE][-\+]?\d+)$/;
function L(t2) {
return "function" == typeof t2 ? t2 : Array.isArray(t2) ? (e2) => {
for (const n2 of t2) {
if ("string" == typeof n2 && e2 === n2) return true;
if (n2 instanceof RegExp && n2.test(e2)) return true;
}
} : () => false;
}
class F {
const $ = /^[-+]?0x[a-fA-F0-9]+$/, V = /^([\-\+])?(0*)([0-9]*(\.[0-9]*)?)$/, D = { hex: true, leadingZeros: true, decimalPoint: ".", eNotation: true };
const j = /^([-+])?(0*)(\d*(\.\d*)?[eE][-\+]?\d+)$/;
class L {
constructor(t2) {
if (this.options = t2, this.currentNode = null, this.tagsNodeStack = [], this.docTypeEntities = {}, this.lastEntities = { apos: { regex: /&(apos|#39|#x27);/g, val: "'" }, gt: { regex: /&(gt|#62|#x3E);/g, val: ">" }, lt: { regex: /&(lt|#60|#x3C);/g, val: "<" }, quot: { regex: /&(quot|#34|#x22);/g, val: '"' } }, this.ampEntity = { regex: /&(amp|#38|#x26);/g, val: "&" }, this.htmlEntities = { space: { regex: /&(nbsp|#160);/g, val: " " }, cent: { regex: /&(cent|#162);/g, val: "\xA2" }, pound: { regex: /&(pound|#163);/g, val: "\xA3" }, yen: { regex: /&(yen|#165);/g, val: "\xA5" }, euro: { regex: /&(euro|#8364);/g, val: "\u20AC" }, copyright: { regex: /&(copy|#169);/g, val: "\xA9" }, reg: { regex: /&(reg|#174);/g, val: "\xAE" }, inr: { regex: /&(inr|#8377);/g, val: "\u20B9" }, num_dec: { regex: /&#([0-9]{1,7});/g, val: (t3, e2) => K(e2, 10, "&#") }, num_hex: { regex: /&#x([0-9a-fA-F]{1,6});/g, val: (t3, e2) => K(e2, 16, "&#x") } }, this.addExternalEntities = j, this.parseXml = B, this.parseTextData = M, this.resolveNameSpace = _, this.buildAttributesMap = U, this.isItStopNode = X, this.replaceEntitiesValue = Y, this.readStopNodeData = q, this.saveTextToParentTag = G, this.addChild = R, this.ignoreAttributesFn = L(this.options.ignoreAttributes), this.entityExpansionCount = 0, this.currentExpandedLength = 0, this.options.stopNodes && this.options.stopNodes.length > 0) {
var e2;
if (this.options = t2, this.currentNode = null, this.tagsNodeStack = [], this.docTypeEntities = {}, this.lastEntities = { apos: { regex: /&(apos|#39|#x27);/g, val: "'" }, gt: { regex: /&(gt|#62|#x3E);/g, val: ">" }, lt: { regex: /&(lt|#60|#x3C);/g, val: "<" }, quot: { regex: /&(quot|#34|#x22);/g, val: '"' } }, this.ampEntity = { regex: /&(amp|#38|#x26);/g, val: "&" }, this.htmlEntities = { space: { regex: /&(nbsp|#160);/g, val: " " }, cent: { regex: /&(cent|#162);/g, val: "\xA2" }, pound: { regex: /&(pound|#163);/g, val: "\xA3" }, yen: { regex: /&(yen|#165);/g, val: "\xA5" }, euro: { regex: /&(euro|#8364);/g, val: "\u20AC" }, copyright: { regex: /&(copy|#169);/g, val: "\xA9" }, reg: { regex: /&(reg|#174);/g, val: "\xAE" }, inr: { regex: /&(inr|#8377);/g, val: "\u20B9" }, num_dec: { regex: /&#([0-9]{1,7});/g, val: (t3, e3) => K(e3, 10, "&#") }, num_hex: { regex: /&#x([0-9a-fA-F]{1,6});/g, val: (t3, e3) => K(e3, 16, "&#x") } }, this.addExternalEntities = F, this.parseXml = R, this.parseTextData = M, this.resolveNameSpace = k, this.buildAttributesMap = U, this.isItStopNode = X, this.replaceEntitiesValue = Y, this.readStopNodeData = q, this.saveTextToParentTag = G, this.addChild = B, this.ignoreAttributesFn = "function" == typeof (e2 = this.options.ignoreAttributes) ? e2 : Array.isArray(e2) ? (t3) => {
for (const n2 of e2) {
if ("string" == typeof n2 && t3 === n2) return true;
if (n2 instanceof RegExp && n2.test(t3)) return true;
}
} : () => false, this.entityExpansionCount = 0, this.currentExpandedLength = 0, this.options.stopNodes && this.options.stopNodes.length > 0) {
this.stopNodesExact = /* @__PURE__ */ new Set(), this.stopNodesWildcard = /* @__PURE__ */ new Set();
for (let t3 = 0; t3 < this.options.stopNodes.length; t3++) {
const e2 = this.options.stopNodes[t3];
"string" == typeof e2 && (e2.startsWith("*.") ? this.stopNodesWildcard.add(e2.substring(2)) : this.stopNodesExact.add(e2));
const e3 = this.options.stopNodes[t3];
"string" == typeof e3 && (e3.startsWith("*.") ? this.stopNodesWildcard.add(e3.substring(2)) : this.stopNodesExact.add(e3));
}
}
}
}
function j(t2) {
function F(t2) {
const e2 = Object.keys(t2);
for (let n2 = 0; n2 < e2.length; n2++) {
const i2 = e2[n2], s2 = i2.replace(/[.\-+*:]/g, "\\.");
@@ -60918,7 +61018,7 @@ var require_fxp = __commonJS({
return null == i3 ? t2 : typeof i3 != typeof t2 || i3 !== t2 ? i3 : this.options.trimValues || t2.trim() === t2 ? Z(t2, this.options.parseTagValue, this.options.numberParseOptions) : t2;
}
}
function _(t2) {
function k(t2) {
if (this.options.removeNSPrefix) {
const e2 = t2.split(":"), n2 = "/" === t2.charAt(0) ? "/" : "";
if ("xmlns" === e2[0]) return "";
@@ -60926,10 +61026,10 @@ var require_fxp = __commonJS({
}
return t2;
}
const k = new RegExp(`([^\\s=]+)\\s*(=\\s*(['"])([\\s\\S]*?)\\3)?`, "gm");
const _ = new RegExp(`([^\\s=]+)\\s*(=\\s*(['"])([\\s\\S]*?)\\3)?`, "gm");
function U(t2, e2, n2) {
if (true !== this.options.ignoreAttributes && "string" == typeof t2) {
const i2 = s(t2, k), r2 = i2.length, o2 = {};
const i2 = s(t2, _), r2 = i2.length, o2 = {};
for (let t3 = 0; t3 < r2; t3++) {
const s2 = this.resolveNameSpace(i2[t3][1]);
if (this.ignoreAttributesFn(s2, e2)) continue;
@@ -60948,12 +61048,12 @@ var require_fxp = __commonJS({
return o2;
}
}
const B = function(t2) {
const R = function(t2) {
t2 = t2.replace(/\r\n?/g, "\n");
const e2 = new I("!xml");
let n2 = e2, i2 = "", s2 = "";
this.entityExpansionCount = 0, this.currentExpandedLength = 0;
const r2 = new O(this.options.processEntities);
const r2 = new P(this.options.processEntities);
for (let o2 = 0; o2 < t2.length; o2++) if ("<" === t2[o2]) if ("/" === t2[o2 + 1]) {
const e3 = z(t2, ">", o2, "Closing Tag is not closed.");
let r3 = t2.substring(o2 + 2, e3).trim();
@@ -60993,26 +61093,27 @@ var require_fxp = __commonJS({
} else {
let r3 = W(t2, o2, this.options.removeNSPrefix), a2 = r3.tagName;
const l2 = r3.rawTagName;
let u2 = r3.tagExp, h2 = r3.attrExpPresent, d2 = r3.closeIndex;
let u2 = r3.tagExp, d2 = r3.attrExpPresent, h2 = r3.closeIndex;
if (this.options.transformTagName) {
const t3 = this.options.transformTagName(a2);
u2 === a2 && (u2 = t3), a2 = t3;
}
if (this.options.strictReservedNames && (a2 === this.options.commentPropName || a2 === this.options.cdataPropName)) throw new Error(`Invalid tag name: ${a2}`);
n2 && i2 && "!xml" !== n2.tagname && (i2 = this.saveTextToParentTag(i2, n2, s2, false));
const p2 = n2;
p2 && -1 !== this.options.unpairedTags.indexOf(p2.tagname) && (n2 = this.tagsNodeStack.pop(), s2 = s2.substring(0, s2.lastIndexOf("."))), a2 !== e2.tagname && (s2 += s2 ? "." + a2 : a2);
const f2 = o2;
const c2 = o2;
if (this.isItStopNode(this.stopNodesExact, this.stopNodesWildcard, s2, a2)) {
let e3 = "";
if (u2.length > 0 && u2.lastIndexOf("/") === u2.length - 1) "/" === a2[a2.length - 1] ? (a2 = a2.substr(0, a2.length - 1), s2 = s2.substr(0, s2.length - 1), u2 = a2) : u2 = u2.substr(0, u2.length - 1), o2 = r3.closeIndex;
else if (-1 !== this.options.unpairedTags.indexOf(a2)) o2 = r3.closeIndex;
else {
const n3 = this.readStopNodeData(t2, l2, d2 + 1);
const n3 = this.readStopNodeData(t2, l2, h2 + 1);
if (!n3) throw new Error(`Unexpected end of ${l2}`);
o2 = n3.i, e3 = n3.tagContent;
}
const i3 = new I(a2);
a2 !== u2 && h2 && (i3[":@"] = this.buildAttributesMap(u2, s2, a2)), e3 && (e3 = this.parseTextData(e3, a2, s2, true, h2, true, true)), s2 = s2.substr(0, s2.lastIndexOf(".")), i3.add(this.options.textNodeName, e3), this.addChild(n2, i3, s2, f2);
a2 !== u2 && d2 && (i3[":@"] = this.buildAttributesMap(u2, s2, a2)), e3 && (e3 = this.parseTextData(e3, a2, s2, true, d2, true, true)), s2 = s2.substr(0, s2.lastIndexOf(".")), i3.add(this.options.textNodeName, e3), this.addChild(n2, i3, s2, c2);
} else {
if (u2.length > 0 && u2.lastIndexOf("/") === u2.length - 1) {
if ("/" === a2[a2.length - 1] ? (a2 = a2.substr(0, a2.length - 1), s2 = s2.substr(0, s2.length - 1), u2 = a2) : u2 = u2.substr(0, u2.length - 1), this.options.transformTagName) {
@@ -61020,18 +61121,26 @@ var require_fxp = __commonJS({
u2 === a2 && (u2 = t4), a2 = t4;
}
const t3 = new I(a2);
a2 !== u2 && h2 && (t3[":@"] = this.buildAttributesMap(u2, s2, a2)), this.addChild(n2, t3, s2, f2), s2 = s2.substr(0, s2.lastIndexOf("."));
a2 !== u2 && d2 && (t3[":@"] = this.buildAttributesMap(u2, s2, a2)), this.addChild(n2, t3, s2, c2), s2 = s2.substr(0, s2.lastIndexOf("."));
} else {
const t3 = new I(a2);
this.tagsNodeStack.push(n2), a2 !== u2 && h2 && (t3[":@"] = this.buildAttributesMap(u2, s2, a2)), this.addChild(n2, t3, s2, f2), n2 = t3;
if (-1 !== this.options.unpairedTags.indexOf(a2)) {
const t3 = new I(a2);
a2 !== u2 && d2 && (t3[":@"] = this.buildAttributesMap(u2, s2)), this.addChild(n2, t3, s2, c2), s2 = s2.substr(0, s2.lastIndexOf(".")), o2 = r3.closeIndex;
continue;
}
{
const t3 = new I(a2);
if (this.tagsNodeStack.length > this.options.maxNestedTags) throw new Error("Maximum nested tags exceeded");
this.tagsNodeStack.push(n2), a2 !== u2 && d2 && (t3[":@"] = this.buildAttributesMap(u2, s2, a2)), this.addChild(n2, t3, s2, c2), n2 = t3;
}
}
i2 = "", o2 = d2;
i2 = "", o2 = h2;
}
}
else i2 += t2[o2];
return e2.child;
};
function R(t2, e2, n2, i2) {
function B(t2, e2, n2, i2) {
this.options.captureMetaData || (i2 = void 0);
const s2 = this.options.updateTag(e2.tagname, n2, e2[":@"]);
false === s2 || ("string" == typeof s2 ? (e2.tagname = s2, t2.addChild(e2, i2)) : t2.addChild(e2, i2));
@@ -61092,12 +61201,12 @@ var require_fxp = __commonJS({
const o2 = s2.index, a2 = r2.search(/\s/);
let l2 = r2, u2 = true;
-1 !== a2 && (l2 = r2.substring(0, a2), r2 = r2.substring(a2 + 1).trimStart());
const h2 = l2;
const d2 = l2;
if (n2) {
const t3 = l2.indexOf(":");
-1 !== t3 && (l2 = l2.substr(t3 + 1), u2 = l2 !== s2.data.substr(t3 + 1));
}
return { tagName: l2, tagExp: r2, closeIndex: o2, attrExpPresent: u2, rawTagName: h2 };
return { tagName: l2, tagExp: r2, closeIndex: o2, attrExpPresent: u2, rawTagName: d2 };
}
function q(t2, e2, n2) {
const i2 = n2;
@@ -61118,19 +61227,19 @@ var require_fxp = __commonJS({
if (e2 && "string" == typeof t2) {
const e3 = t2.trim();
return "true" === e3 || "false" !== e3 && (function(t3, e4 = {}) {
if (e4 = Object.assign({}, V, e4), !t3 || "string" != typeof t3) return t3;
if (e4 = Object.assign({}, D, e4), !t3 || "string" != typeof t3) return t3;
let n3 = t3.trim();
if (void 0 !== e4.skipLike && e4.skipLike.test(n3)) return t3;
if ("0" === t3) return 0;
if (e4.hex && C.test(n3)) return (function(t4) {
if (e4.hex && $.test(n3)) return (function(t4) {
if (parseInt) return parseInt(t4, 16);
if (Number.parseInt) return Number.parseInt(t4, 16);
if (window && window.parseInt) return window.parseInt(t4, 16);
throw new Error("parseInt, Number.parseInt, window.parseInt are not supported");
})(n3);
if (-1 !== n3.search(/.+[eE].+/)) return (function(t4, e5, n4) {
if (n3.includes("e") || n3.includes("E")) return (function(t4, e5, n4) {
if (!n4.eNotation) return t4;
const i3 = e5.match(D);
const i3 = e5.match(j);
if (i3) {
let s2 = i3[1] || "";
const r2 = -1 === i3[3].indexOf("e") ? "E" : "e", o2 = i3[2], a2 = s2 ? t4[o2.length + 1] === r2 : t4[o2.length] === r2;
@@ -61139,7 +61248,7 @@ var require_fxp = __commonJS({
return t4;
})(t3, n3, e4);
{
const s2 = $.exec(n3);
const s2 = V.exec(n3);
if (s2) {
const r2 = s2[1] || "", o2 = s2[2];
let a2 = (i2 = s2[3]) && -1 !== i2.indexOf(".") ? ("." === (i2 = i2.replace(/0+$/, "")) ? i2 = "0" : "." === i2[0] ? i2 = "0" + i2 : "." === i2[i2.length - 1] && (i2 = i2.substring(0, i2.length - 1)), i2) : i2;
@@ -61147,7 +61256,7 @@ var require_fxp = __commonJS({
if (!e4.leadingZeros && (o2.length > 1 || 1 === o2.length && !l2)) return t3;
{
const i3 = Number(n3), s3 = String(i3);
if (0 === i3 || -0 === i3) return i3;
if (0 === i3) return i3;
if (-1 !== s3.search(/[eE]/)) return e4.eNotation ? i3 : t3;
if (-1 !== n3.indexOf(".")) return "0" === s3 || s3 === a2 || s3 === `${r2}${a2}` ? i3 : t3;
let l3 = o2 ? a2 : n3;
@@ -61181,7 +61290,7 @@ var require_fxp = __commonJS({
if (o2[a2]) {
let t3 = H(o2[a2], e2, l2);
const n3 = nt(t3, e2);
void 0 !== o2[Q] && (t3[Q] = o2[Q]), o2[":@"] ? et(t3, o2[":@"], l2, e2) : 1 !== Object.keys(t3).length || void 0 === t3[e2.textNodeName] || e2.alwaysCreateTextNode ? 0 === Object.keys(t3).length && (e2.alwaysCreateTextNode ? t3[e2.textNodeName] = "" : t3 = "") : t3 = t3[e2.textNodeName], void 0 !== s2[a2] && s2.hasOwnProperty(a2) ? (Array.isArray(s2[a2]) || (s2[a2] = [s2[a2]]), s2[a2].push(t3)) : e2.isArray(a2, l2, n3) ? s2[a2] = [t3] : s2[a2] = t3;
o2[":@"] ? et(t3, o2[":@"], l2, e2) : 1 !== Object.keys(t3).length || void 0 === t3[e2.textNodeName] || e2.alwaysCreateTextNode ? 0 === Object.keys(t3).length && (e2.alwaysCreateTextNode ? t3[e2.textNodeName] = "" : t3 = "") : t3 = t3[e2.textNodeName], void 0 !== o2[Q] && "object" == typeof t3 && null !== t3 && (t3[Q] = o2[Q]), void 0 !== s2[a2] && Object.prototype.hasOwnProperty.call(s2, a2) ? (Array.isArray(s2[a2]) || (s2[a2] = [s2[a2]]), s2[a2].push(t3)) : e2.isArray(a2, l2, n3) ? s2[a2] = [t3] : s2[a2] = t3;
}
}
}
@@ -61209,7 +61318,7 @@ var require_fxp = __commonJS({
}
class it {
constructor(t2) {
this.externalEntities = {}, this.options = w(t2);
this.externalEntities = {}, this.options = v(t2);
}
parse(t2, e2) {
if ("string" != typeof t2 && t2.toString) t2 = t2.toString();
@@ -61219,7 +61328,7 @@ var require_fxp = __commonJS({
const n3 = a(t2, e2);
if (true !== n3) throw Error(`${n3.err.msg}:${n3.err.line}:${n3.err.col}`);
}
const n2 = new F(this.options);
const n2 = new L(this.options);
n2.addExternalEntities(this.externalEntities);
const i2 = n2.parseXml(t2);
return this.options.preserveOrder || void 0 === i2 ? i2 : J(i2, this.options);
@@ -61240,6 +61349,13 @@ var require_fxp = __commonJS({
}
function rt(t2, e2, n2, i2) {
let s2 = "", r2 = false;
if (!Array.isArray(t2)) {
if (null != t2) {
let n3 = t2.toString();
return n3 = ut(n3, e2), n3;
}
return "";
}
for (let o2 = 0; o2 < t2.length; o2++) {
const a2 = t2[o2], l2 = ot(a2);
if (void 0 === l2) continue;
@@ -61263,10 +61379,10 @@ var require_fxp = __commonJS({
o3 = 0 !== o3.length ? " " + o3 : "", s2 += n3 + `<${l2}${o3}${t3}?>`, r2 = true;
continue;
}
let h2 = i2;
"" !== h2 && (h2 += e2.indentBy);
const d2 = i2 + `<${l2}${at(a2[":@"], e2)}`, p2 = rt(a2[l2], e2, u2, h2);
-1 !== e2.unpairedTags.indexOf(l2) ? e2.suppressUnpairedNode ? s2 += d2 + ">" : s2 += d2 + "/>" : p2 && 0 !== p2.length || !e2.suppressEmptyNode ? p2 && p2.endsWith(">") ? s2 += d2 + `>${p2}${i2}</${l2}>` : (s2 += d2 + ">", p2 && "" !== i2 && (p2.includes("/>") || p2.includes("</")) ? s2 += i2 + e2.indentBy + p2 + i2 : s2 += p2, s2 += `</${l2}>`) : s2 += d2 + "/>", r2 = true;
let d2 = i2;
"" !== d2 && (d2 += e2.indentBy);
const h2 = i2 + `<${l2}${at(a2[":@"], e2)}`, p2 = rt(a2[l2], e2, u2, d2);
-1 !== e2.unpairedTags.indexOf(l2) ? e2.suppressUnpairedNode ? s2 += h2 + ">" : s2 += h2 + "/>" : p2 && 0 !== p2.length || !e2.suppressEmptyNode ? p2 && p2.endsWith(">") ? s2 += h2 + `>${p2}${i2}</${l2}>` : (s2 += h2 + ">", p2 && "" !== i2 && (p2.includes("/>") || p2.includes("</")) ? s2 += i2 + e2.indentBy + p2 + i2 : s2 += p2, s2 += `</${l2}>`) : s2 += h2 + "/>", r2 = true;
}
return s2;
}
@@ -61274,13 +61390,13 @@ var require_fxp = __commonJS({
const e2 = Object.keys(t2);
for (let n2 = 0; n2 < e2.length; n2++) {
const i2 = e2[n2];
if (t2.hasOwnProperty(i2) && ":@" !== i2) return i2;
if (Object.prototype.hasOwnProperty.call(t2, i2) && ":@" !== i2) return i2;
}
}
function at(t2, e2) {
let n2 = "";
if (t2 && !e2.ignoreAttributes) for (let i2 in t2) {
if (!t2.hasOwnProperty(i2)) continue;
if (!Object.prototype.hasOwnProperty.call(t2, i2)) continue;
let s2 = e2.attributeValueProcessor(i2, t2[i2]);
s2 = ut(s2, e2), true === s2 && e2.suppressBooleanAttributes ? n2 += ` ${i2.substr(e2.attributeNamePrefix.length)}` : n2 += ` ${i2.substr(e2.attributeNamePrefix.length)}="${s2}"`;
}
@@ -61298,15 +61414,21 @@ var require_fxp = __commonJS({
}
return t2;
}
const ht = { attributeNamePrefix: "@_", attributesGroupName: false, textNodeName: "#text", ignoreAttributes: true, cdataPropName: false, format: false, indentBy: " ", suppressEmptyNode: false, suppressUnpairedNode: true, suppressBooleanAttributes: true, tagValueProcessor: function(t2, e2) {
const dt = { attributeNamePrefix: "@_", attributesGroupName: false, textNodeName: "#text", ignoreAttributes: true, cdataPropName: false, format: false, indentBy: " ", suppressEmptyNode: false, suppressUnpairedNode: true, suppressBooleanAttributes: true, tagValueProcessor: function(t2, e2) {
return e2;
}, attributeValueProcessor: function(t2, e2) {
return e2;
}, preserveOrder: false, commentPropName: false, unpairedTags: [], entities: [{ regex: new RegExp("&", "g"), val: "&amp;" }, { regex: new RegExp(">", "g"), val: "&gt;" }, { regex: new RegExp("<", "g"), val: "&lt;" }, { regex: new RegExp("'", "g"), val: "&apos;" }, { regex: new RegExp('"', "g"), val: "&quot;" }], processEntities: true, stopNodes: [], oneListGroup: false };
function dt(t2) {
this.options = Object.assign({}, ht, t2), true === this.options.ignoreAttributes || this.options.attributesGroupName ? this.isAttribute = function() {
function ht(t2) {
var e2;
this.options = Object.assign({}, dt, t2), true === this.options.ignoreAttributes || this.options.attributesGroupName ? this.isAttribute = function() {
return false;
} : (this.ignoreAttributesFn = L(this.options.ignoreAttributes), this.attrPrefixLen = this.options.attributeNamePrefix.length, this.isAttribute = ct), this.processTextOrObjNode = pt, this.options.format ? (this.indentate = ft, this.tagEndChar = ">\n", this.newLine = "\n") : (this.indentate = function() {
} : (this.ignoreAttributesFn = "function" == typeof (e2 = this.options.ignoreAttributes) ? e2 : Array.isArray(e2) ? (t3) => {
for (const n2 of e2) {
if ("string" == typeof n2 && t3 === n2) return true;
if (n2 instanceof RegExp && n2.test(t3)) return true;
}
} : () => false, this.attrPrefixLen = this.options.attributeNamePrefix.length, this.isAttribute = ft), this.processTextOrObjNode = pt, this.options.format ? (this.indentate = ct, this.tagEndChar = ">\n", this.newLine = "\n") : (this.indentate = function() {
return "";
}, this.tagEndChar = ">", this.newLine = "");
}
@@ -61314,15 +61436,15 @@ var require_fxp = __commonJS({
const s2 = this.j2x(t2, n2 + 1, i2.concat(e2));
return void 0 !== t2[this.options.textNodeName] && 1 === Object.keys(t2).length ? this.buildTextValNode(t2[this.options.textNodeName], e2, s2.attrStr, n2) : this.buildObjectNode(s2.val, e2, s2.attrStr, n2);
}
function ft(t2) {
function ct(t2) {
return this.options.indentBy.repeat(t2);
}
function ct(t2) {
function ft(t2) {
return !(!t2.startsWith(this.options.attributeNamePrefix) || t2 === this.options.textNodeName) && t2.substr(this.attrPrefixLen);
}
dt.prototype.build = function(t2) {
ht.prototype.build = function(t2) {
return this.options.preserveOrder ? st(t2, this.options) : (Array.isArray(t2) && this.options.arrayNodeName && this.options.arrayNodeName.length > 1 && (t2 = { [this.options.arrayNodeName]: t2 }), this.j2x(t2, 0, []).val);
}, dt.prototype.j2x = function(t2, e2, n2) {
}, ht.prototype.j2x = function(t2, e2, n2) {
let i2 = "", s2 = "";
const r2 = n2.join(".");
for (let o2 in t2) if (Object.prototype.hasOwnProperty.call(t2, o2)) if (void 0 === t2[o2]) this.isAttribute(o2) && (s2 += "");
@@ -61357,18 +61479,18 @@ var require_fxp = __commonJS({
for (let s3 = 0; s3 < n3; s3++) i2 += this.buildAttrPairStr(e3[s3], "" + t2[o2][e3[s3]]);
} else s2 += this.processTextOrObjNode(t2[o2], o2, e2, n2);
return { attrStr: i2, val: s2 };
}, dt.prototype.buildAttrPairStr = function(t2, e2) {
}, ht.prototype.buildAttrPairStr = function(t2, e2) {
return e2 = this.options.attributeValueProcessor(t2, "" + e2), e2 = this.replaceEntitiesValue(e2), this.options.suppressBooleanAttributes && "true" === e2 ? " " + t2 : " " + t2 + '="' + e2 + '"';
}, dt.prototype.buildObjectNode = function(t2, e2, n2, i2) {
}, ht.prototype.buildObjectNode = function(t2, e2, n2, i2) {
if ("" === t2) return "?" === e2[0] ? this.indentate(i2) + "<" + e2 + n2 + "?" + this.tagEndChar : this.indentate(i2) + "<" + e2 + n2 + this.closeTag(e2) + this.tagEndChar;
{
let s2 = "</" + e2 + this.tagEndChar, r2 = "";
return "?" === e2[0] && (r2 = "?", s2 = ""), !n2 && "" !== n2 || -1 !== t2.indexOf("<") ? false !== this.options.commentPropName && e2 === this.options.commentPropName && 0 === r2.length ? this.indentate(i2) + `<!--${t2}-->` + this.newLine : this.indentate(i2) + "<" + e2 + n2 + r2 + this.tagEndChar + t2 + this.indentate(i2) + s2 : this.indentate(i2) + "<" + e2 + n2 + r2 + ">" + t2 + s2;
}
}, dt.prototype.closeTag = function(t2) {
}, ht.prototype.closeTag = function(t2) {
let e2 = "";
return -1 !== this.options.unpairedTags.indexOf(t2) ? this.options.suppressUnpairedNode || (e2 = "/") : e2 = this.options.suppressEmptyNode ? "/" : `></${t2}`, e2;
}, dt.prototype.buildTextValNode = function(t2, e2, n2, i2) {
}, ht.prototype.buildTextValNode = function(t2, e2, n2, i2) {
if (false !== this.options.cdataPropName && e2 === this.options.cdataPropName) return this.indentate(i2) + `<![CDATA[${t2}]]>` + this.newLine;
if (false !== this.options.commentPropName && e2 === this.options.commentPropName) return this.indentate(i2) + `<!--${t2}-->` + this.newLine;
if ("?" === e2[0]) return this.indentate(i2) + "<" + e2 + n2 + "?" + this.tagEndChar;
@@ -61376,14 +61498,14 @@ var require_fxp = __commonJS({
let s2 = this.options.tagValueProcessor(e2, t2);
return s2 = this.replaceEntitiesValue(s2), "" === s2 ? this.indentate(i2) + "<" + e2 + n2 + this.closeTag(e2) + this.tagEndChar : this.indentate(i2) + "<" + e2 + n2 + ">" + s2 + "</" + e2 + this.tagEndChar;
}
}, dt.prototype.replaceEntitiesValue = function(t2) {
}, ht.prototype.replaceEntitiesValue = function(t2) {
if (t2 && t2.length > 0 && this.options.processEntities) for (let e2 = 0; e2 < this.options.entities.length; e2++) {
const n2 = this.options.entities[e2];
t2 = t2.replace(n2.regex, n2.val);
}
return t2;
};
const gt = { validate: a };
const gt = ht, xt = { validate: a };
module2.exports = e;
})();
}
@@ -102926,7 +103048,7 @@ var safeDump = renamed("safeDump", "dump");
var semver = __toESM(require_semver2());
// src/api-compatibility.json
var maximumVersion = "3.20";
var maximumVersion = "3.21";
var minimumVersion = "3.14";
// src/util.ts
@@ -103557,8 +103679,8 @@ var path4 = __toESM(require("path"));
var semver4 = __toESM(require_semver2());
// src/defaults.json
var bundleVersion = "codeql-bundle-v2.24.2";
var cliVersion = "2.24.2";
var bundleVersion = "codeql-bundle-v2.24.3";
var cliVersion = "2.24.3";
// src/overlay/index.ts
var fs3 = __toESM(require("fs"));
@@ -104042,6 +104164,11 @@ var featureConfig = {
// cannot be found when interpreting results.
minimumVersion: void 0
},
["start_proxy_remove_unused_registries" /* StartProxyRemoveUnusedRegistries */]: {
defaultValue: false,
envVar: "CODEQL_ACTION_START_PROXY_REMOVE_UNUSED_REGISTRIES",
minimumVersion: void 0
},
["start_proxy_use_features_release" /* StartProxyUseFeaturesRelease */]: {
defaultValue: false,
envVar: "CODEQL_ACTION_START_PROXY_USE_FEATURES_RELEASE",
@@ -104053,11 +104180,6 @@ var featureConfig = {
minimumVersion: void 0,
toolsFeature: "bundleSupportsOverlay" /* BundleSupportsOverlay */
},
["use_repository_properties_v2" /* UseRepositoryProperties */]: {
defaultValue: false,
envVar: "CODEQL_ACTION_USE_REPOSITORY_PROPERTIES",
minimumVersion: void 0
},
["validate_db_config" /* ValidateDbConfig */]: {
defaultValue: false,
envVar: "CODEQL_ACTION_VALIDATE_DB_CONFIG",

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

838
lib/upload-lib.js generated

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff