From 8794dc8e29a3f14e743d9bbb94d83a6890107bb6 Mon Sep 17 00:00:00 2001 From: goto-bus-stop Date: Thu, 26 Sep 2024 18:50:21 +0000 Subject: [PATCH] Rebuild (automated) --- dist/index.js | 44136 +++++++++++++++--------------------------------- 1 file changed, 13565 insertions(+), 30571 deletions(-) diff --git a/dist/index.js b/dist/index.js index b1803e4..f3ae47f 100644 --- a/dist/index.js +++ b/dist/index.js @@ -84,7 +84,7 @@ var require_re = __commonJS({ } = require_constants(); var debug = require_debug(); exports2 = module2.exports = {}; - var re2 = exports2.re = []; + var re = exports2.re = []; var safeRe = exports2.safeRe = []; var src = exports2.src = []; var t = exports2.t = {}; @@ -107,7 +107,7 @@ var require_re = __commonJS({ debug(name, index, value); t[name] = index; src[index] = value; - re2[index] = new RegExp(value, isGlobal ? "g" : void 0); + re[index] = new RegExp(value, isGlobal ? "g" : void 0); safeRe[index] = new RegExp(safe, isGlobal ? "g" : void 0); }, "createToken"); createToken("NUMERICIDENTIFIER", "0|[1-9]\\d*"); @@ -203,38 +203,38 @@ var require_semver = __commonJS({ "node_modules/semver/classes/semver.js"(exports2, module2) { var debug = require_debug(); var { MAX_LENGTH, MAX_SAFE_INTEGER } = require_constants(); - var { safeRe: re2, t } = require_re(); + var { safeRe: re, t } = require_re(); var parseOptions = require_parse_options(); var { compareIdentifiers } = require_identifiers(); var SemVer = class _SemVer { static { __name(this, "SemVer"); } - constructor(version3, options) { + constructor(version2, options) { options = parseOptions(options); - if (version3 instanceof _SemVer) { - if (version3.loose === !!options.loose && version3.includePrerelease === !!options.includePrerelease) { - return version3; + if (version2 instanceof _SemVer) { + if (version2.loose === !!options.loose && version2.includePrerelease === !!options.includePrerelease) { + return version2; } else { - version3 = version3.version; + version2 = version2.version; } - } else if (typeof version3 !== "string") { - throw new TypeError(`Invalid version. Must be a string. Got type "${typeof version3}".`); + } else if (typeof version2 !== "string") { + throw new TypeError(`Invalid version. Must be a string. Got type "${typeof version2}".`); } - if (version3.length > MAX_LENGTH) { + if (version2.length > MAX_LENGTH) { throw new TypeError( `version is longer than ${MAX_LENGTH} characters` ); } - debug("SemVer", version3, options); + debug("SemVer", version2, options); this.options = options; this.loose = !!options.loose; this.includePrerelease = !!options.includePrerelease; - const m = version3.trim().match(options.loose ? re2[t.LOOSE] : re2[t.FULL]); + const m = version2.trim().match(options.loose ? re[t.LOOSE] : re[t.FULL]); if (!m) { - throw new TypeError(`Invalid Version: ${version3}`); + throw new TypeError(`Invalid Version: ${version2}`); } - this.raw = version3; + this.raw = version2; this.major = +m[1]; this.minor = +m[2]; this.patch = +m[3]; @@ -329,7 +329,7 @@ var require_semver = __commonJS({ do { const a = this.build[i]; const b = other.build[i]; - debug("prerelease compare", i, a, b); + debug("build compare", i, a, b); if (a === void 0 && b === void 0) { return 0; } else if (b === void 0) { @@ -447,12 +447,12 @@ var require_semver = __commonJS({ var require_parse = __commonJS({ "node_modules/semver/functions/parse.js"(exports2, module2) { var SemVer = require_semver(); - var parse3 = /* @__PURE__ */ __name((version3, options, throwErrors = false) => { - if (version3 instanceof SemVer) { - return version3; + var parse2 = /* @__PURE__ */ __name((version2, options, throwErrors = false) => { + if (version2 instanceof SemVer) { + return version2; } try { - return new SemVer(version3, options); + return new SemVer(version2, options); } catch (er) { if (!throwErrors) { return null; @@ -460,16 +460,16 @@ var require_parse = __commonJS({ throw er; } }, "parse"); - module2.exports = parse3; + module2.exports = parse2; } }); // node_modules/semver/functions/valid.js var require_valid = __commonJS({ "node_modules/semver/functions/valid.js"(exports2, module2) { - var parse3 = require_parse(); - var valid = /* @__PURE__ */ __name((version3, options) => { - const v = parse3(version3, options); + var parse2 = require_parse(); + var valid = /* @__PURE__ */ __name((version2, options) => { + const v = parse2(version2, options); return v ? v.version : null; }, "valid"); module2.exports = valid; @@ -479,9 +479,9 @@ var require_valid = __commonJS({ // node_modules/semver/functions/clean.js var require_clean = __commonJS({ "node_modules/semver/functions/clean.js"(exports2, module2) { - var parse3 = require_parse(); - var clean = /* @__PURE__ */ __name((version3, options) => { - const s = parse3(version3.trim().replace(/^[=v]+/, ""), options); + var parse2 = require_parse(); + var clean = /* @__PURE__ */ __name((version2, options) => { + const s = parse2(version2.trim().replace(/^[=v]+/, ""), options); return s ? s.version : null; }, "clean"); module2.exports = clean; @@ -492,7 +492,7 @@ var require_clean = __commonJS({ var require_inc = __commonJS({ "node_modules/semver/functions/inc.js"(exports2, module2) { var SemVer = require_semver(); - var inc = /* @__PURE__ */ __name((version3, release, options, identifier, identifierBase) => { + var inc = /* @__PURE__ */ __name((version2, release, options, identifier, identifierBase) => { if (typeof options === "string") { identifierBase = identifier; identifier = options; @@ -500,7 +500,7 @@ var require_inc = __commonJS({ } try { return new SemVer( - version3 instanceof SemVer ? version3.version : version3, + version2 instanceof SemVer ? version2.version : version2, options ).inc(release, identifier, identifierBase).version; } catch (er) { @@ -514,17 +514,17 @@ var require_inc = __commonJS({ // node_modules/semver/functions/diff.js var require_diff = __commonJS({ "node_modules/semver/functions/diff.js"(exports2, module2) { - var parse3 = require_parse(); - var diff = /* @__PURE__ */ __name((version1, version22) => { - const v13 = parse3(version1, null, true); - const v2 = parse3(version22, null, true); - const comparison = v13.compare(v2); + var parse2 = require_parse(); + var diff = /* @__PURE__ */ __name((version1, version2) => { + const v12 = parse2(version1, null, true); + const v2 = parse2(version2, null, true); + const comparison = v12.compare(v2); if (comparison === 0) { return null; } const v1Higher = comparison > 0; - const highVersion = v1Higher ? v13 : v2; - const lowVersion = v1Higher ? v2 : v13; + const highVersion = v1Higher ? v12 : v2; + const lowVersion = v1Higher ? v2 : v12; const highHasPre = !!highVersion.prerelease.length; const lowHasPre = !!lowVersion.prerelease.length; if (lowHasPre && !highHasPre) { @@ -540,13 +540,13 @@ var require_diff = __commonJS({ return "major"; } const prefix = highHasPre ? "pre" : ""; - if (v13.major !== v2.major) { + if (v12.major !== v2.major) { return prefix + "major"; } - if (v13.minor !== v2.minor) { + if (v12.minor !== v2.minor) { return prefix + "minor"; } - if (v13.patch !== v2.patch) { + if (v12.patch !== v2.patch) { return prefix + "patch"; } return "prerelease"; @@ -559,8 +559,8 @@ var require_diff = __commonJS({ var require_major = __commonJS({ "node_modules/semver/functions/major.js"(exports2, module2) { var SemVer = require_semver(); - var major2 = /* @__PURE__ */ __name((a, loose) => new SemVer(a, loose).major, "major"); - module2.exports = major2; + var major = /* @__PURE__ */ __name((a, loose) => new SemVer(a, loose).major, "major"); + module2.exports = major; } }); @@ -585,9 +585,9 @@ var require_patch = __commonJS({ // node_modules/semver/functions/prerelease.js var require_prerelease = __commonJS({ "node_modules/semver/functions/prerelease.js"(exports2, module2) { - var parse3 = require_parse(); - var prerelease = /* @__PURE__ */ __name((version3, options) => { - const parsed = parse3(version3, options); + var parse2 = require_parse(); + var prerelease = /* @__PURE__ */ __name((version2, options) => { + const parsed = parse2(version2, options); return parsed && parsed.prerelease.length ? parsed.prerelease : null; }, "prerelease"); module2.exports = prerelease; @@ -759,26 +759,26 @@ var require_cmp = __commonJS({ var require_coerce = __commonJS({ "node_modules/semver/functions/coerce.js"(exports2, module2) { var SemVer = require_semver(); - var parse3 = require_parse(); - var { safeRe: re2, t } = require_re(); - var coerce = /* @__PURE__ */ __name((version3, options) => { - if (version3 instanceof SemVer) { - return version3; + var parse2 = require_parse(); + var { safeRe: re, t } = require_re(); + var coerce = /* @__PURE__ */ __name((version2, options) => { + if (version2 instanceof SemVer) { + return version2; } - if (typeof version3 === "number") { - version3 = String(version3); + if (typeof version2 === "number") { + version2 = String(version2); } - if (typeof version3 !== "string") { + if (typeof version2 !== "string") { return null; } options = options || {}; let match = null; if (!options.rtl) { - match = version3.match(options.includePrerelease ? re2[t.COERCEFULL] : re2[t.COERCE]); + match = version2.match(options.includePrerelease ? re[t.COERCEFULL] : re[t.COERCE]); } else { - const coerceRtlRegex = options.includePrerelease ? re2[t.COERCERTLFULL] : re2[t.COERCERTL]; + const coerceRtlRegex = options.includePrerelease ? re[t.COERCERTLFULL] : re[t.COERCERTL]; let next; - while ((next = coerceRtlRegex.exec(version3)) && (!match || match.index + match[0].length !== version3.length)) { + while ((next = coerceRtlRegex.exec(version2)) && (!match || match.index + match[0].length !== version2.length)) { if (!match || next.index + next[0].length !== match.index + match[0].length) { match = next; } @@ -789,677 +789,53 @@ var require_coerce = __commonJS({ if (match === null) { return null; } - const major2 = match[2]; + const major = match[2]; const minor = match[3] || "0"; const patch = match[4] || "0"; const prerelease = options.includePrerelease && match[5] ? `-${match[5]}` : ""; const build = options.includePrerelease && match[6] ? `+${match[6]}` : ""; - return parse3(`${major2}.${minor}.${patch}${prerelease}${build}`, options); + return parse2(`${major}.${minor}.${patch}${prerelease}${build}`, options); }, "coerce"); module2.exports = coerce; } }); -// node_modules/yallist/iterator.js -var require_iterator = __commonJS({ - "node_modules/yallist/iterator.js"(exports2, module2) { - "use strict"; - module2.exports = function(Yallist) { - Yallist.prototype[Symbol.iterator] = function* () { - for (let walker = this.head; walker; walker = walker.next) { - yield walker.value; - } - }; - }; - } -}); - -// node_modules/yallist/yallist.js -var require_yallist = __commonJS({ - "node_modules/yallist/yallist.js"(exports2, module2) { - "use strict"; - module2.exports = Yallist; - Yallist.Node = Node; - Yallist.create = Yallist; - function Yallist(list) { - var self2 = this; - if (!(self2 instanceof Yallist)) { - self2 = new Yallist(); - } - self2.tail = null; - self2.head = null; - self2.length = 0; - if (list && typeof list.forEach === "function") { - list.forEach(function(item) { - self2.push(item); - }); - } else if (arguments.length > 0) { - for (var i = 0, l = arguments.length; i < l; i++) { - self2.push(arguments[i]); - } - } - return self2; - } - __name(Yallist, "Yallist"); - Yallist.prototype.removeNode = function(node) { - if (node.list !== this) { - throw new Error("removing node which does not belong to this list"); - } - var next = node.next; - var prev = node.prev; - if (next) { - next.prev = prev; - } - if (prev) { - prev.next = next; - } - if (node === this.head) { - this.head = next; - } - if (node === this.tail) { - this.tail = prev; - } - node.list.length--; - node.next = null; - node.prev = null; - node.list = null; - return next; - }; - Yallist.prototype.unshiftNode = function(node) { - if (node === this.head) { - return; - } - if (node.list) { - node.list.removeNode(node); - } - var head = this.head; - node.list = this; - node.next = head; - if (head) { - head.prev = node; - } - this.head = node; - if (!this.tail) { - this.tail = node; - } - this.length++; - }; - Yallist.prototype.pushNode = function(node) { - if (node === this.tail) { - return; - } - if (node.list) { - node.list.removeNode(node); - } - var tail = this.tail; - node.list = this; - node.prev = tail; - if (tail) { - tail.next = node; - } - this.tail = node; - if (!this.head) { - this.head = node; - } - this.length++; - }; - Yallist.prototype.push = function() { - for (var i = 0, l = arguments.length; i < l; i++) { - push(this, arguments[i]); - } - return this.length; - }; - Yallist.prototype.unshift = function() { - for (var i = 0, l = arguments.length; i < l; i++) { - unshift(this, arguments[i]); - } - return this.length; - }; - Yallist.prototype.pop = function() { - if (!this.tail) { - return void 0; - } - var res = this.tail.value; - this.tail = this.tail.prev; - if (this.tail) { - this.tail.next = null; - } else { - this.head = null; - } - this.length--; - return res; - }; - Yallist.prototype.shift = function() { - if (!this.head) { - return void 0; - } - var res = this.head.value; - this.head = this.head.next; - if (this.head) { - this.head.prev = null; - } else { - this.tail = null; - } - this.length--; - return res; - }; - Yallist.prototype.forEach = function(fn, thisp) { - thisp = thisp || this; - for (var walker = this.head, i = 0; walker !== null; i++) { - fn.call(thisp, walker.value, i, this); - walker = walker.next; - } - }; - Yallist.prototype.forEachReverse = function(fn, thisp) { - thisp = thisp || this; - for (var walker = this.tail, i = this.length - 1; walker !== null; i--) { - fn.call(thisp, walker.value, i, this); - walker = walker.prev; - } - }; - Yallist.prototype.get = function(n) { - for (var i = 0, walker = this.head; walker !== null && i < n; i++) { - walker = walker.next; - } - if (i === n && walker !== null) { - return walker.value; - } - }; - Yallist.prototype.getReverse = function(n) { - for (var i = 0, walker = this.tail; walker !== null && i < n; i++) { - walker = walker.prev; - } - if (i === n && walker !== null) { - return walker.value; - } - }; - Yallist.prototype.map = function(fn, thisp) { - thisp = thisp || this; - var res = new Yallist(); - for (var walker = this.head; walker !== null; ) { - res.push(fn.call(thisp, walker.value, this)); - walker = walker.next; - } - return res; - }; - Yallist.prototype.mapReverse = function(fn, thisp) { - thisp = thisp || this; - var res = new Yallist(); - for (var walker = this.tail; walker !== null; ) { - res.push(fn.call(thisp, walker.value, this)); - walker = walker.prev; - } - return res; - }; - Yallist.prototype.reduce = function(fn, initial) { - var acc; - var walker = this.head; - if (arguments.length > 1) { - acc = initial; - } else if (this.head) { - walker = this.head.next; - acc = this.head.value; - } else { - throw new TypeError("Reduce of empty list with no initial value"); - } - for (var i = 0; walker !== null; i++) { - acc = fn(acc, walker.value, i); - walker = walker.next; - } - return acc; - }; - Yallist.prototype.reduceReverse = function(fn, initial) { - var acc; - var walker = this.tail; - if (arguments.length > 1) { - acc = initial; - } else if (this.tail) { - walker = this.tail.prev; - acc = this.tail.value; - } else { - throw new TypeError("Reduce of empty list with no initial value"); - } - for (var i = this.length - 1; walker !== null; i--) { - acc = fn(acc, walker.value, i); - walker = walker.prev; - } - return acc; - }; - Yallist.prototype.toArray = function() { - var arr = new Array(this.length); - for (var i = 0, walker = this.head; walker !== null; i++) { - arr[i] = walker.value; - walker = walker.next; - } - return arr; - }; - Yallist.prototype.toArrayReverse = function() { - var arr = new Array(this.length); - for (var i = 0, walker = this.tail; walker !== null; i++) { - arr[i] = walker.value; - walker = walker.prev; - } - return arr; - }; - Yallist.prototype.slice = function(from, to) { - to = to || this.length; - if (to < 0) { - to += this.length; - } - from = from || 0; - if (from < 0) { - from += this.length; - } - var ret = new Yallist(); - if (to < from || to < 0) { - return ret; - } - if (from < 0) { - from = 0; - } - if (to > this.length) { - to = this.length; - } - for (var i = 0, walker = this.head; walker !== null && i < from; i++) { - walker = walker.next; - } - for (; walker !== null && i < to; i++, walker = walker.next) { - ret.push(walker.value); - } - return ret; - }; - Yallist.prototype.sliceReverse = function(from, to) { - to = to || this.length; - if (to < 0) { - to += this.length; - } - from = from || 0; - if (from < 0) { - from += this.length; - } - var ret = new Yallist(); - if (to < from || to < 0) { - return ret; - } - if (from < 0) { - from = 0; - } - if (to > this.length) { - to = this.length; - } - for (var i = this.length, walker = this.tail; walker !== null && i > to; i--) { - walker = walker.prev; - } - for (; walker !== null && i > from; i--, walker = walker.prev) { - ret.push(walker.value); - } - return ret; - }; - Yallist.prototype.splice = function(start, deleteCount, ...nodes) { - if (start > this.length) { - start = this.length - 1; - } - if (start < 0) { - start = this.length + start; - } - for (var i = 0, walker = this.head; walker !== null && i < start; i++) { - walker = walker.next; - } - var ret = []; - for (var i = 0; walker && i < deleteCount; i++) { - ret.push(walker.value); - walker = this.removeNode(walker); - } - if (walker === null) { - walker = this.tail; - } - if (walker !== this.head && walker !== this.tail) { - walker = walker.prev; - } - for (var i = 0; i < nodes.length; i++) { - walker = insert(this, walker, nodes[i]); - } - return ret; - }; - Yallist.prototype.reverse = function() { - var head = this.head; - var tail = this.tail; - for (var walker = head; walker !== null; walker = walker.prev) { - var p = walker.prev; - walker.prev = walker.next; - walker.next = p; - } - this.head = tail; - this.tail = head; - return this; - }; - function insert(self2, node, value) { - var inserted = node === self2.head ? new Node(value, null, node, self2) : new Node(value, node, node.next, self2); - if (inserted.next === null) { - self2.tail = inserted; - } - if (inserted.prev === null) { - self2.head = inserted; - } - self2.length++; - return inserted; - } - __name(insert, "insert"); - function push(self2, item) { - self2.tail = new Node(item, self2.tail, null, self2); - if (!self2.head) { - self2.head = self2.tail; - } - self2.length++; - } - __name(push, "push"); - function unshift(self2, item) { - self2.head = new Node(item, null, self2.head, self2); - if (!self2.tail) { - self2.tail = self2.head; - } - self2.length++; - } - __name(unshift, "unshift"); - function Node(value, prev, next, list) { - if (!(this instanceof Node)) { - return new Node(value, prev, next, list); - } - this.list = list; - this.value = value; - if (prev) { - prev.next = this; - this.prev = prev; - } else { - this.prev = null; - } - if (next) { - next.prev = this; - this.next = next; - } else { - this.next = null; - } - } - __name(Node, "Node"); - try { - require_iterator()(Yallist); - } catch (er) { - } - } -}); - -// node_modules/lru-cache/index.js -var require_lru_cache = __commonJS({ - "node_modules/lru-cache/index.js"(exports2, module2) { - "use strict"; - var Yallist = require_yallist(); - var MAX = Symbol("max"); - var LENGTH = Symbol("length"); - var LENGTH_CALCULATOR = Symbol("lengthCalculator"); - var ALLOW_STALE = Symbol("allowStale"); - var MAX_AGE = Symbol("maxAge"); - var DISPOSE = Symbol("dispose"); - var NO_DISPOSE_ON_SET = Symbol("noDisposeOnSet"); - var LRU_LIST = Symbol("lruList"); - var CACHE = Symbol("cache"); - var UPDATE_AGE_ON_GET = Symbol("updateAgeOnGet"); - var naiveLength = /* @__PURE__ */ __name(() => 1, "naiveLength"); +// node_modules/semver/internal/lrucache.js +var require_lrucache = __commonJS({ + "node_modules/semver/internal/lrucache.js"(exports2, module2) { var LRUCache = class { static { __name(this, "LRUCache"); } - constructor(options) { - if (typeof options === "number") - options = { max: options }; - if (!options) - options = {}; - if (options.max && (typeof options.max !== "number" || options.max < 0)) - throw new TypeError("max must be a non-negative number"); - const max = this[MAX] = options.max || Infinity; - const lc = options.length || naiveLength; - this[LENGTH_CALCULATOR] = typeof lc !== "function" ? naiveLength : lc; - this[ALLOW_STALE] = options.stale || false; - if (options.maxAge && typeof options.maxAge !== "number") - throw new TypeError("maxAge must be a number"); - this[MAX_AGE] = options.maxAge || 0; - this[DISPOSE] = options.dispose; - this[NO_DISPOSE_ON_SET] = options.noDisposeOnSet || false; - this[UPDATE_AGE_ON_GET] = options.updateAgeOnGet || false; - this.reset(); - } - // resize the cache when the max changes. - set max(mL) { - if (typeof mL !== "number" || mL < 0) - throw new TypeError("max must be a non-negative number"); - this[MAX] = mL || Infinity; - trim(this); - } - get max() { - return this[MAX]; - } - set allowStale(allowStale) { - this[ALLOW_STALE] = !!allowStale; - } - get allowStale() { - return this[ALLOW_STALE]; - } - set maxAge(mA) { - if (typeof mA !== "number") - throw new TypeError("maxAge must be a non-negative number"); - this[MAX_AGE] = mA; - trim(this); - } - get maxAge() { - return this[MAX_AGE]; - } - // resize the cache when the lengthCalculator changes. - set lengthCalculator(lC) { - if (typeof lC !== "function") - lC = naiveLength; - if (lC !== this[LENGTH_CALCULATOR]) { - this[LENGTH_CALCULATOR] = lC; - this[LENGTH] = 0; - this[LRU_LIST].forEach((hit) => { - hit.length = this[LENGTH_CALCULATOR](hit.value, hit.key); - this[LENGTH] += hit.length; - }); - } - trim(this); - } - get lengthCalculator() { - return this[LENGTH_CALCULATOR]; - } - get length() { - return this[LENGTH]; - } - get itemCount() { - return this[LRU_LIST].length; - } - rforEach(fn, thisp) { - thisp = thisp || this; - for (let walker = this[LRU_LIST].tail; walker !== null; ) { - const prev = walker.prev; - forEachStep(this, fn, walker, thisp); - walker = prev; - } - } - forEach(fn, thisp) { - thisp = thisp || this; - for (let walker = this[LRU_LIST].head; walker !== null; ) { - const next = walker.next; - forEachStep(this, fn, walker, thisp); - walker = next; - } - } - keys() { - return this[LRU_LIST].toArray().map((k) => k.key); - } - values() { - return this[LRU_LIST].toArray().map((k) => k.value); - } - reset() { - if (this[DISPOSE] && this[LRU_LIST] && this[LRU_LIST].length) { - this[LRU_LIST].forEach((hit) => this[DISPOSE](hit.key, hit.value)); - } - this[CACHE] = /* @__PURE__ */ new Map(); - this[LRU_LIST] = new Yallist(); - this[LENGTH] = 0; - } - dump() { - return this[LRU_LIST].map((hit) => isStale(this, hit) ? false : { - k: hit.key, - v: hit.value, - e: hit.now + (hit.maxAge || 0) - }).toArray().filter((h) => h); - } - dumpLru() { - return this[LRU_LIST]; - } - set(key, value, maxAge) { - maxAge = maxAge || this[MAX_AGE]; - if (maxAge && typeof maxAge !== "number") - throw new TypeError("maxAge must be a number"); - const now = maxAge ? Date.now() : 0; - const len = this[LENGTH_CALCULATOR](value, key); - if (this[CACHE].has(key)) { - if (len > this[MAX]) { - del(this, this[CACHE].get(key)); - return false; - } - const node = this[CACHE].get(key); - const item = node.value; - if (this[DISPOSE]) { - if (!this[NO_DISPOSE_ON_SET]) - this[DISPOSE](key, item.value); - } - item.now = now; - item.maxAge = maxAge; - item.value = value; - this[LENGTH] += len - item.length; - item.length = len; - this.get(key); - trim(this); - return true; - } - const hit = new Entry(key, value, len, now, maxAge); - if (hit.length > this[MAX]) { - if (this[DISPOSE]) - this[DISPOSE](key, value); - return false; - } - this[LENGTH] += hit.length; - this[LRU_LIST].unshift(hit); - this[CACHE].set(key, this[LRU_LIST].head); - trim(this); - return true; - } - has(key) { - if (!this[CACHE].has(key)) - return false; - const hit = this[CACHE].get(key).value; - return !isStale(this, hit); + constructor() { + this.max = 1e3; + this.map = /* @__PURE__ */ new Map(); } get(key) { - return get(this, key, true); - } - peek(key) { - return get(this, key, false); - } - pop() { - const node = this[LRU_LIST].tail; - if (!node) - return null; - del(this, node); - return node.value; - } - del(key) { - del(this, this[CACHE].get(key)); - } - load(arr) { - this.reset(); - const now = Date.now(); - for (let l = arr.length - 1; l >= 0; l--) { - const hit = arr[l]; - const expiresAt = hit.e || 0; - if (expiresAt === 0) - this.set(hit.k, hit.v); - else { - const maxAge = expiresAt - now; - if (maxAge > 0) { - this.set(hit.k, hit.v, maxAge); - } - } - } - } - prune() { - this[CACHE].forEach((value, key) => get(this, key, false)); - } - }; - var get = /* @__PURE__ */ __name((self2, key, doUse) => { - const node = self2[CACHE].get(key); - if (node) { - const hit = node.value; - if (isStale(self2, hit)) { - del(self2, node); - if (!self2[ALLOW_STALE]) - return void 0; + const value = this.map.get(key); + if (value === void 0) { + return void 0; } else { - if (doUse) { - if (self2[UPDATE_AGE_ON_GET]) - node.value.now = Date.now(); - self2[LRU_LIST].unshiftNode(node); + this.map.delete(key); + this.map.set(key, value); + return value; + } + } + delete(key) { + return this.map.delete(key); + } + set(key, value) { + const deleted = this.delete(key); + if (!deleted && value !== void 0) { + if (this.map.size >= this.max) { + const firstKey = this.map.keys().next().value; + this.delete(firstKey); } + this.map.set(key, value); } - return hit.value; - } - }, "get"); - var isStale = /* @__PURE__ */ __name((self2, hit) => { - if (!hit || !hit.maxAge && !self2[MAX_AGE]) - return false; - const diff = Date.now() - hit.now; - return hit.maxAge ? diff > hit.maxAge : self2[MAX_AGE] && diff > self2[MAX_AGE]; - }, "isStale"); - var trim = /* @__PURE__ */ __name((self2) => { - if (self2[LENGTH] > self2[MAX]) { - for (let walker = self2[LRU_LIST].tail; self2[LENGTH] > self2[MAX] && walker !== null; ) { - const prev = walker.prev; - del(self2, walker); - walker = prev; - } - } - }, "trim"); - var del = /* @__PURE__ */ __name((self2, node) => { - if (node) { - const hit = node.value; - if (self2[DISPOSE]) - self2[DISPOSE](hit.key, hit.value); - self2[LENGTH] -= hit.length; - self2[CACHE].delete(hit.key); - self2[LRU_LIST].removeNode(node); - } - }, "del"); - var Entry = class { - static { - __name(this, "Entry"); - } - constructor(key, value, length, now, maxAge) { - this.key = key; - this.value = value; - this.length = length; - this.now = now; - this.maxAge = maxAge || 0; + return this; } }; - var forEachStep = /* @__PURE__ */ __name((self2, fn, node, thisp) => { - let hit = node.value; - if (isStale(self2, hit)) { - del(self2, node); - if (!self2[ALLOW_STALE]) - hit = void 0; - } - if (hit) - fn.call(thisp, hit.value, hit.key, self2); - }, "forEachStep"); module2.exports = LRUCache; } }); @@ -1467,6 +843,7 @@ var require_lru_cache = __commonJS({ // node_modules/semver/classes/range.js var require_range = __commonJS({ "node_modules/semver/classes/range.js"(exports2, module2) { + var SPACE_CHARACTERS = /\s+/g; var Range = class _Range { static { __name(this, "Range"); @@ -1483,13 +860,13 @@ var require_range = __commonJS({ if (range instanceof Comparator) { this.raw = range.value; this.set = [[range]]; - this.format(); + this.formatted = void 0; return this; } this.options = options; this.loose = !!options.loose; this.includePrerelease = !!options.includePrerelease; - this.raw = range.trim().split(/\s+/).join(" "); + this.raw = range.trim().replace(SPACE_CHARACTERS, " "); this.set = this.raw.split("||").map((r) => this.parseRange(r.trim())).filter((c) => c.length); if (!this.set.length) { throw new TypeError(`Invalid SemVer Range: ${this.raw}`); @@ -1508,10 +885,27 @@ var require_range = __commonJS({ } } } - this.format(); + this.formatted = void 0; + } + get range() { + if (this.formatted === void 0) { + this.formatted = ""; + for (let i = 0; i < this.set.length; i++) { + if (i > 0) { + this.formatted += "||"; + } + const comps = this.set[i]; + for (let k = 0; k < comps.length; k++) { + if (k > 0) { + this.formatted += " "; + } + this.formatted += comps[k].toString().trim(); + } + } + } + return this.formatted; } format() { - this.range = this.set.map((comps) => comps.join(" ").trim()).join("||").trim(); return this.range; } toString() { @@ -1525,20 +919,20 @@ var require_range = __commonJS({ return cached; } const loose = this.options.loose; - const hr = loose ? re2[t.HYPHENRANGELOOSE] : re2[t.HYPHENRANGE]; + const hr = loose ? re[t.HYPHENRANGELOOSE] : re[t.HYPHENRANGE]; range = range.replace(hr, hyphenReplace(this.options.includePrerelease)); debug("hyphen replace", range); - range = range.replace(re2[t.COMPARATORTRIM], comparatorTrimReplace); + range = range.replace(re[t.COMPARATORTRIM], comparatorTrimReplace); debug("comparator trim", range); - range = range.replace(re2[t.TILDETRIM], tildeTrimReplace); + range = range.replace(re[t.TILDETRIM], tildeTrimReplace); debug("tilde trim", range); - range = range.replace(re2[t.CARETTRIM], caretTrimReplace); + range = range.replace(re[t.CARETTRIM], caretTrimReplace); debug("caret trim", range); let rangeList = range.split(" ").map((comp) => parseComparator(comp, this.options)).join(" ").split(/\s+/).map((comp) => replaceGTE0(comp, this.options)); if (loose) { rangeList = rangeList.filter((comp) => { debug("loose invalid filter", comp, this.options); - return !!comp.match(re2[t.COMPARATORLOOSE]); + return !!comp.match(re[t.COMPARATORLOOSE]); }); } debug("range list", rangeList); @@ -1572,19 +966,19 @@ var require_range = __commonJS({ }); } // if ANY of the sets match ALL of its comparators, then pass - test(version3) { - if (!version3) { + test(version2) { + if (!version2) { return false; } - if (typeof version3 === "string") { + if (typeof version2 === "string") { try { - version3 = new SemVer(version3, this.options); + version2 = new SemVer(version2, this.options); } catch (er) { return false; } } for (let i = 0; i < this.set.length; i++) { - if (testSet(this.set[i], version3, this.options)) { + if (testSet(this.set[i], version2, this.options)) { return true; } } @@ -1592,14 +986,14 @@ var require_range = __commonJS({ } }; module2.exports = Range; - var LRU = require_lru_cache(); - var cache2 = new LRU({ max: 1e3 }); + var LRU = require_lrucache(); + var cache2 = new LRU(); var parseOptions = require_parse_options(); var Comparator = require_comparator(); var debug = require_debug(); var SemVer = require_semver(); var { - safeRe: re2, + safeRe: re, t, comparatorTrimReplace, tildeTrimReplace, @@ -1637,7 +1031,7 @@ var require_range = __commonJS({ return comp.trim().split(/\s+/).map((c) => replaceTilde(c, options)).join(" "); }, "replaceTildes"); var replaceTilde = /* @__PURE__ */ __name((comp, options) => { - const r = options.loose ? re2[t.TILDELOOSE] : re2[t.TILDE]; + const r = options.loose ? re[t.TILDELOOSE] : re[t.TILDE]; return comp.replace(r, (_, M, m, p, pr) => { debug("tilde", comp, _, M, m, p, pr); let ret; @@ -1662,7 +1056,7 @@ var require_range = __commonJS({ }, "replaceCarets"); var replaceCaret = /* @__PURE__ */ __name((comp, options) => { debug("caret", comp, options); - const r = options.loose ? re2[t.CARETLOOSE] : re2[t.CARET]; + const r = options.loose ? re[t.CARETLOOSE] : re[t.CARET]; const z = options.includePrerelease ? "-0" : ""; return comp.replace(r, (_, M, m, p, pr) => { debug("caret", comp, _, M, m, p, pr); @@ -1710,7 +1104,7 @@ var require_range = __commonJS({ }, "replaceXRanges"); var replaceXRange = /* @__PURE__ */ __name((comp, options) => { comp = comp.trim(); - const r = options.loose ? re2[t.XRANGELOOSE] : re2[t.XRANGE]; + const r = options.loose ? re[t.XRANGELOOSE] : re[t.XRANGE]; return comp.replace(r, (ret, gtlt, M, m, p, pr) => { debug("xRange", comp, ret, gtlt, M, m, p, pr); const xM = isX(M); @@ -1765,13 +1159,13 @@ var require_range = __commonJS({ }, "replaceXRange"); var replaceStars = /* @__PURE__ */ __name((comp, options) => { debug("replaceStars", comp, options); - return comp.trim().replace(re2[t.STAR], ""); + return comp.trim().replace(re[t.STAR], ""); }, "replaceStars"); var replaceGTE0 = /* @__PURE__ */ __name((comp, options) => { debug("replaceGTE0", comp, options); - return comp.trim().replace(re2[options.includePrerelease ? t.GTE0PRE : t.GTE0], ""); + return comp.trim().replace(re[options.includePrerelease ? t.GTE0PRE : t.GTE0], ""); }, "replaceGTE0"); - var hyphenReplace = /* @__PURE__ */ __name((incPr) => ($0, from, fM, fm, fp, fpr, fb, to, tM, tm, tp, tpr, tb) => { + var hyphenReplace = /* @__PURE__ */ __name((incPr) => ($0, from, fM, fm, fp, fpr, fb, to, tM, tm, tp, tpr) => { if (isX(fM)) { from = ""; } else if (isX(fm)) { @@ -1798,13 +1192,13 @@ var require_range = __commonJS({ } return `${from} ${to}`.trim(); }, "hyphenReplace"); - var testSet = /* @__PURE__ */ __name((set, version3, options) => { + var testSet = /* @__PURE__ */ __name((set, version2, options) => { for (let i = 0; i < set.length; i++) { - if (!set[i].test(version3)) { + if (!set[i].test(version2)) { return false; } } - if (version3.prerelease.length && !options.includePrerelease) { + if (version2.prerelease.length && !options.includePrerelease) { for (let i = 0; i < set.length; i++) { debug(set[i].semver); if (set[i].semver === Comparator.ANY) { @@ -1812,7 +1206,7 @@ var require_range = __commonJS({ } if (set[i].semver.prerelease.length > 0) { const allowed = set[i].semver; - if (allowed.major === version3.major && allowed.minor === version3.minor && allowed.patch === version3.patch) { + if (allowed.major === version2.major && allowed.minor === version2.minor && allowed.patch === version2.patch) { return true; } } @@ -1857,7 +1251,7 @@ var require_comparator = __commonJS({ debug("comp", this); } parse(comp) { - const r = this.options.loose ? re2[t.COMPARATORLOOSE] : re2[t.COMPARATOR]; + const r = this.options.loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR]; const m = comp.match(r); if (!m) { throw new TypeError(`Invalid comparator: ${comp}`); @@ -1875,19 +1269,19 @@ var require_comparator = __commonJS({ toString() { return this.value; } - test(version3) { - debug("Comparator.test", version3, this.options.loose); - if (this.semver === ANY || version3 === ANY) { + test(version2) { + debug("Comparator.test", version2, this.options.loose); + if (this.semver === ANY || version2 === ANY) { return true; } - if (typeof version3 === "string") { + if (typeof version2 === "string") { try { - version3 = new SemVer(version3, this.options); + version2 = new SemVer(version2, this.options); } catch (er) { return false; } } - return cmp(version3, this.operator, this.semver, this.options); + return cmp(version2, this.operator, this.semver, this.options); } intersects(comp, options) { if (!(comp instanceof _Comparator)) { @@ -1931,7 +1325,7 @@ var require_comparator = __commonJS({ }; module2.exports = Comparator; var parseOptions = require_parse_options(); - var { safeRe: re2, t } = require_re(); + var { safeRe: re, t } = require_re(); var cmp = require_cmp(); var debug = require_debug(); var SemVer = require_semver(); @@ -1943,13 +1337,13 @@ var require_comparator = __commonJS({ var require_satisfies = __commonJS({ "node_modules/semver/functions/satisfies.js"(exports2, module2) { var Range = require_range(); - var satisfies = /* @__PURE__ */ __name((version3, range, options) => { + var satisfies = /* @__PURE__ */ __name((version2, range, options) => { try { range = new Range(range, options); } catch (er) { return false; } - return range.test(version3); + return range.test(version2); }, "satisfies"); module2.exports = satisfies; } @@ -2103,8 +1497,8 @@ var require_outside = __commonJS({ var lt = require_lt(); var lte = require_lte(); var gte = require_gte(); - var outside = /* @__PURE__ */ __name((version3, range, hilo, options) => { - version3 = new SemVer(version3, options); + var outside = /* @__PURE__ */ __name((version2, range, hilo, options) => { + version2 = new SemVer(version2, options); range = new Range(range, options); let gtfn, ltefn, ltfn, comp, ecomp; switch (hilo) { @@ -2125,7 +1519,7 @@ var require_outside = __commonJS({ default: throw new TypeError('Must provide a hilo val of "<" or ">"'); } - if (satisfies(version3, range, options)) { + if (satisfies(version2, range, options)) { return false; } for (let i = 0; i < range.set.length; ++i) { @@ -2147,9 +1541,9 @@ var require_outside = __commonJS({ if (high.operator === comp || high.operator === ecomp) { return false; } - if ((!low.operator || low.operator === comp) && ltefn(version3, low.semver)) { + if ((!low.operator || low.operator === comp) && ltefn(version2, low.semver)) { return false; - } else if (low.operator === ecomp && ltfn(version3, low.semver)) { + } else if (low.operator === ecomp && ltfn(version2, low.semver)) { return false; } } @@ -2163,7 +1557,7 @@ var require_outside = __commonJS({ var require_gtr = __commonJS({ "node_modules/semver/ranges/gtr.js"(exports2, module2) { var outside = require_outside(); - var gtr = /* @__PURE__ */ __name((version3, range, options) => outside(version3, range, ">", options), "gtr"); + var gtr = /* @__PURE__ */ __name((version2, range, options) => outside(version2, range, ">", options), "gtr"); module2.exports = gtr; } }); @@ -2172,7 +1566,7 @@ var require_gtr = __commonJS({ var require_ltr = __commonJS({ "node_modules/semver/ranges/ltr.js"(exports2, module2) { var outside = require_outside(); - var ltr = /* @__PURE__ */ __name((version3, range, options) => outside(version3, range, "<", options), "ltr"); + var ltr = /* @__PURE__ */ __name((version2, range, options) => outside(version2, range, "<", options), "ltr"); module2.exports = ltr; } }); @@ -2200,12 +1594,12 @@ var require_simplify = __commonJS({ let first = null; let prev = null; const v = versions.sort((a, b) => compare(a, b, options)); - for (const version3 of v) { - const included = satisfies(version3, range, options); + for (const version2 of v) { + const included = satisfies(version2, range, options); if (included) { - prev = version3; + prev = version2; if (!first) { - first = version3; + first = version2; } } else { if (prev) { @@ -2408,12 +1802,12 @@ var require_semver2 = __commonJS({ var constants = require_constants(); var SemVer = require_semver(); var identifiers = require_identifiers(); - var parse3 = require_parse(); + var parse2 = require_parse(); var valid = require_valid(); var clean = require_clean(); var inc = require_inc(); var diff = require_diff(); - var major2 = require_major(); + var major = require_major(); var minor = require_minor(); var patch = require_patch(); var prerelease = require_prerelease(); @@ -2446,12 +1840,12 @@ var require_semver2 = __commonJS({ var simplifyRange = require_simplify(); var subset = require_subset(); module2.exports = { - parse: parse3, + parse: parse2, valid, clean, inc, diff, - major: major2, + major, minor, patch, prerelease, @@ -2596,14 +1990,14 @@ var require_command = __commonJS({ let first = true; for (const key in this.properties) { if (this.properties.hasOwnProperty(key)) { - const val = this.properties[key]; - if (val) { + const val2 = this.properties[key]; + if (val2) { if (first) { first = false; } else { cmdStr += ","; } - cmdStr += `${key}=${escapeProperty(val)}`; + cmdStr += `${key}=${escapeProperty(val2)}`; } } } @@ -2787,7 +2181,7 @@ function stringToBytes(str) { } return bytes; } -function v35_default(name, version3, hashfunc) { +function v35_default(name, version2, hashfunc) { function generateUUID(value, namespace, buf, offset) { if (typeof value === "string") { value = stringToBytes(value); @@ -2802,7 +2196,7 @@ function v35_default(name, version3, hashfunc) { bytes.set(namespace); bytes.set(value, namespace.length); bytes = hashfunc(bytes); - bytes[6] = bytes[6] & 15 | version3; + bytes[6] = bytes[6] & 15 | version2; bytes[8] = bytes[8] & 63 | 128; if (buf) { offset = offset || 0; @@ -3056,10 +2450,10 @@ var require_proxy = __commonJS({ })(); if (proxyVar) { try { - return new URL(proxyVar); + return new DecodedURL(proxyVar); } catch (_a) { if (!proxyVar.startsWith("http://") && !proxyVar.startsWith("https://")) - return new URL(`http://${proxyVar}`); + return new DecodedURL(`http://${proxyVar}`); } } else { return void 0; @@ -3105,6 +2499,22 @@ var require_proxy = __commonJS({ return hostLower === "localhost" || hostLower.startsWith("127.") || hostLower.startsWith("[::1]") || hostLower.startsWith("[0:0:0:0:0:0:0:1]"); } __name(isLoopbackAddress, "isLoopbackAddress"); + var DecodedURL = class extends URL { + static { + __name(this, "DecodedURL"); + } + constructor(url, base) { + super(url, base); + this._decodedUsername = decodeURIComponent(super.username); + this._decodedPassword = decodeURIComponent(super.password); + } + get username() { + return this._decodedUsername; + } + get password() { + return this._decodedPassword; + } + }; } }); @@ -3830,7 +3240,7 @@ var require_util = __commonJS({ var { InvalidArgumentError } = require_errors(); var { Blob: Blob2 } = require("buffer"); var nodeUtil = require("util"); - var { stringify: stringify3 } = require("querystring"); + var { stringify: stringify2 } = require("querystring"); var { headerNameLowerCasedRecord } = require_constants2(); var [nodeMajor, nodeMinor] = process.versions.node.split(".").map((v) => Number(v)); function nop() { @@ -3848,7 +3258,7 @@ var require_util = __commonJS({ if (url.includes("?") || url.includes("#")) { throw new Error('Query params cannot be passed when url already contains "?" or "#".'); } - const stringified = stringify3(queryParams); + const stringified = stringify2(queryParams); if (stringified) { url += "?" + stringified; } @@ -3986,8 +3396,8 @@ var require_util = __commonJS({ } __name(destroy, "destroy"); var KEEPALIVE_TIMEOUT_EXPR = /timeout=(\d+)/; - function parseKeepAliveTimeout(val) { - const m = val.toString().match(KEEPALIVE_TIMEOUT_EXPR); + function parseKeepAliveTimeout(val2) { + const m = val2.toString().match(KEEPALIVE_TIMEOUT_EXPR); return m ? parseInt(m[1], 10) * 1e3 : null; } __name(parseKeepAliveTimeout, "parseKeepAliveTimeout"); @@ -4000,19 +3410,19 @@ var require_util = __commonJS({ return headers; for (let i = 0; i < headers.length; i += 2) { const key = headers[i].toString().toLowerCase(); - let val = obj[key]; - if (!val) { + let val2 = obj[key]; + if (!val2) { if (Array.isArray(headers[i + 1])) { obj[key] = headers[i + 1].map((x) => x.toString("utf8")); } else { obj[key] = headers[i + 1].toString("utf8"); } } else { - if (!Array.isArray(val)) { - val = [val]; - obj[key] = val; + if (!Array.isArray(val2)) { + val2 = [val2]; + obj[key] = val2; } - val.push(headers[i + 1].toString("utf8")); + val2.push(headers[i + 1].toString("utf8")); } } if ("content-length" in obj && "content-disposition" in obj) { @@ -4027,14 +3437,14 @@ var require_util = __commonJS({ let contentDispositionIdx = -1; for (let n = 0; n < headers.length; n += 2) { const key = headers[n + 0].toString(); - const val = headers[n + 1].toString("utf8"); + const val2 = headers[n + 1].toString("utf8"); if (key.length === 14 && (key === "content-length" || key.toLowerCase() === "content-length")) { - ret.push(key, val); + ret.push(key, val2); hasContentLength = true; } else if (key.length === 19 && (key === "content-disposition" || key.toLowerCase() === "content-disposition")) { - contentDispositionIdx = ret.push(key, val) - 1; + contentDispositionIdx = ret.push(key, val2) - 1; } else { - ret.push(key, val); + ret.push(key, val2); } } if (hasContentLength && contentDispositionIdx !== -1) { @@ -4112,16 +3522,16 @@ var require_util = __commonJS({ } } __name(convertIterableToBuffer, "convertIterableToBuffer"); - var ReadableStream; + var ReadableStream2; function ReadableStreamFrom(iterable) { - if (!ReadableStream) { - ReadableStream = require("stream/web").ReadableStream; + if (!ReadableStream2) { + ReadableStream2 = require("stream/web").ReadableStream; } - if (ReadableStream.from) { - return ReadableStream.from(convertIterableToBuffer(iterable)); + if (ReadableStream2.from) { + return ReadableStream2.from(convertIterableToBuffer(iterable)); } let iterator; - return new ReadableStream( + return new ReadableStream2( { async start() { iterator = iterable[Symbol.asyncIterator](); @@ -4175,13 +3585,13 @@ var require_util = __commonJS({ } __name(addAbortListener, "addAbortListener"); var hasToWellFormed = !!String.prototype.toWellFormed; - function toUSVString(val) { + function toUSVString(val2) { if (hasToWellFormed) { - return `${val}`.toWellFormed(); + return `${val2}`.toWellFormed(); } else if (nodeUtil.toUSVString) { - return nodeUtil.toUSVString(val); + return nodeUtil.toUSVString(val2); } - return `${val}`; + return `${val2}`; } __name(toUSVString, "toUSVString"); function parseRangeHeader(range) { @@ -4467,12 +3877,12 @@ var require_PartStream = __commonJS({ "node_modules/@fastify/busboy/deps/dicer/lib/PartStream.js"(exports2, module2) { "use strict"; var inherits = require("node:util").inherits; - var ReadableStream = require("node:stream").Readable; + var ReadableStream2 = require("node:stream").Readable; function PartStream(opts) { - ReadableStream.call(this, opts); + ReadableStream2.call(this, opts); } __name(PartStream, "PartStream"); - inherits(PartStream, ReadableStream); + inherits(PartStream, ReadableStream2); PartStream.prototype._read = function(n) { }; module2.exports = PartStream; @@ -6576,11 +5986,11 @@ var require_util2 = __commonJS({ var assert = require("assert"); var { isUint8Array } = require("util/types"); var supportedHashes = []; - var crypto7; + var crypto4; try { - crypto7 = require("crypto"); + crypto4 = require("crypto"); const possibleRelevantHashes = ["sha256", "sha384", "sha512"]; - supportedHashes = crypto7.getHashes().filter((hash) => possibleRelevantHashes.includes(hash)); + supportedHashes = crypto4.getHashes().filter((hash) => possibleRelevantHashes.includes(hash)); } catch { } function responseURL(response) { @@ -6870,7 +6280,7 @@ var require_util2 = __commonJS({ } __name(isURLPotentiallyTrustworthy, "isURLPotentiallyTrustworthy"); function bytesMatch(bytes, metadataList) { - if (crypto7 === void 0) { + if (crypto4 === void 0) { return true; } const parsedMetadata = parseMetadata(metadataList); @@ -6885,7 +6295,7 @@ var require_util2 = __commonJS({ for (const item of metadata) { const algorithm = item.algo; const expectedValue = item.hash; - let actualValue = crypto7.createHash(algorithm).update(bytes).digest("base64"); + let actualValue = crypto4.createHash(algorithm).update(bytes).digest("base64"); if (actualValue[actualValue.length - 1] === "=") { if (actualValue[actualValue.length - 2] === "=") { actualValue = actualValue.slice(0, -2); @@ -7097,12 +6507,12 @@ var require_util2 = __commonJS({ } } __name(fullyReadBody, "fullyReadBody"); - var ReadableStream = globalThis.ReadableStream; + var ReadableStream2 = globalThis.ReadableStream; function isReadableStreamLike(stream) { - if (!ReadableStream) { - ReadableStream = require("stream/web").ReadableStream; + if (!ReadableStream2) { + ReadableStream2 = require("stream/web").ReadableStream; } - return stream instanceof ReadableStream || stream[Symbol.toStringTag] === "ReadableStream" && typeof stream.tee === "function"; + return stream instanceof ReadableStream2 || stream[Symbol.toStringTag] === "ReadableStream" && typeof stream.tee === "function"; } __name(isReadableStreamLike, "isReadableStreamLike"); var MAXIMUM_ARGUMENT_LENGTH = 65535; @@ -7244,18 +6654,18 @@ var require_webidl = __commonJS({ webidl.errors.exception = function(message) { return new TypeError(`${message.header}: ${message.message}`); }; - webidl.errors.conversionFailed = function(context2) { - const plural = context2.types.length === 1 ? "" : " one of"; - const message = `${context2.argument} could not be converted to${plural}: ${context2.types.join(", ")}.`; + webidl.errors.conversionFailed = function(context) { + const plural = context.types.length === 1 ? "" : " one of"; + const message = `${context.argument} could not be converted to${plural}: ${context.types.join(", ")}.`; return webidl.errors.exception({ - header: context2.prefix, + header: context.prefix, message }); }; - webidl.errors.invalidArgument = function(context2) { + webidl.errors.invalidArgument = function(context) { return webidl.errors.exception({ - header: context2.prefix, - message: `"${context2.value}" is an invalid ${context2.type}.` + header: context.prefix, + message: `"${context.value}" is an invalid ${context.type}.` }); }; webidl.brandCheck = function(V, I, opts = void 0) { @@ -7915,7 +7325,7 @@ var require_file = __commonJS({ var { parseMIMEType, serializeAMimeType } = require_dataURL(); var { kEnumerableProperty } = require_util(); var encoder = new TextEncoder(); - var File = class _File extends Blob2 { + var File2 = class _File extends Blob2 { static { __name(this, "File"); } @@ -8009,7 +7419,7 @@ var require_file = __commonJS({ return "File"; } }; - Object.defineProperties(File.prototype, { + Object.defineProperties(File2.prototype, { [Symbol.toStringTag]: { value: "File", configurable: true @@ -8091,10 +7501,10 @@ var require_file = __commonJS({ } __name(convertLineEndingsNative, "convertLineEndingsNative"); function isFileLike(object) { - return NativeFile && object instanceof NativeFile || object instanceof File || object && (typeof object.stream === "function" || typeof object.arrayBuffer === "function") && object[Symbol.toStringTag] === "File"; + return NativeFile && object instanceof NativeFile || object instanceof File2 || object && (typeof object.stream === "function" || typeof object.arrayBuffer === "function") && object[Symbol.toStringTag] === "File"; } __name(isFileLike, "isFileLike"); - module2.exports = { File, FileLike, isFileLike }; + module2.exports = { File: File2, FileLike, isFileLike }; } }); @@ -8107,8 +7517,8 @@ var require_formdata = __commonJS({ var { File: UndiciFile, FileLike, isFileLike } = require_file(); var { webidl } = require_webidl(); var { Blob: Blob2, File: NativeFile } = require("buffer"); - var File = NativeFile ?? UndiciFile; - var FormData = class _FormData { + var File2 = NativeFile ?? UndiciFile; + var FormData2 = class _FormData { static { __name(this, "FormData"); } @@ -8228,8 +7638,8 @@ var require_formdata = __commonJS({ } } }; - FormData.prototype[Symbol.iterator] = FormData.prototype.entries; - Object.defineProperties(FormData.prototype, { + FormData2.prototype[Symbol.iterator] = FormData2.prototype.entries; + Object.defineProperties(FormData2.prototype, { [Symbol.toStringTag]: { value: "FormData", configurable: true @@ -8241,20 +7651,20 @@ var require_formdata = __commonJS({ value = Buffer.from(value).toString("utf8"); } else { if (!isFileLike(value)) { - value = value instanceof Blob2 ? new File([value], "blob", { type: value.type }) : new FileLike(value, "blob", { type: value.type }); + value = value instanceof Blob2 ? new File2([value], "blob", { type: value.type }) : new FileLike(value, "blob", { type: value.type }); } if (filename !== void 0) { const options = { type: value.type, lastModified: value.lastModified }; - value = NativeFile && value instanceof NativeFile || value instanceof UndiciFile ? new File([value], filename, options) : new FileLike(value, filename, options); + value = NativeFile && value instanceof NativeFile || value instanceof UndiciFile ? new File2([value], filename, options) : new FileLike(value, filename, options); } } return { name, value }; } __name(makeEntry, "makeEntry"); - module2.exports = { FormData }; + module2.exports = { FormData: FormData2 }; } }); @@ -8272,7 +7682,7 @@ var require_body = __commonJS({ createDeferredPromise, fullyReadBody } = require_util2(); - var { FormData } = require_formdata(); + var { FormData: FormData2 } = require_formdata(); var { kState } = require_symbols2(); var { webidl } = require_webidl(); var { DOMException: DOMException2, structuredClone } = require_constants3(); @@ -8283,21 +7693,21 @@ var require_body = __commonJS({ var { isUint8Array, isArrayBuffer } = require("util/types"); var { File: UndiciFile } = require_file(); var { parseMIMEType, serializeAMimeType } = require_dataURL(); - var ReadableStream = globalThis.ReadableStream; - var File = NativeFile ?? UndiciFile; + var ReadableStream2 = globalThis.ReadableStream; + var File2 = NativeFile ?? UndiciFile; var textEncoder = new TextEncoder(); var textDecoder = new TextDecoder(); function extractBody(object, keepalive = false) { - if (!ReadableStream) { - ReadableStream = require("stream/web").ReadableStream; + if (!ReadableStream2) { + ReadableStream2 = require("stream/web").ReadableStream; } let stream = null; - if (object instanceof ReadableStream) { + if (object instanceof ReadableStream2) { stream = object; } else if (isBlobLike(object)) { stream = object.stream(); } else { - stream = new ReadableStream({ + stream = new ReadableStream2({ async pull(controller) { controller.enqueue( typeof source === "string" ? textEncoder.encode(source) : source @@ -8387,14 +7797,14 @@ Content-Type: ${value.type || "application/octet-stream"}\r "Response body object should not be disturbed or locked" ); } - stream = object instanceof ReadableStream ? object : ReadableStreamFrom(object); + stream = object instanceof ReadableStream2 ? object : ReadableStreamFrom(object); } if (typeof source === "string" || util.isBuffer(source)) { length = Buffer.byteLength(source); } if (action != null) { let iterator; - stream = new ReadableStream({ + stream = new ReadableStream2({ async start() { iterator = action(object)[Symbol.asyncIterator](); }, @@ -8422,10 +7832,10 @@ Content-Type: ${value.type || "application/octet-stream"}\r } __name(extractBody, "extractBody"); function safelyExtractBody(object, keepalive = false) { - if (!ReadableStream) { - ReadableStream = require("stream/web").ReadableStream; + if (!ReadableStream2) { + ReadableStream2 = require("stream/web").ReadableStream; } - if (object instanceof ReadableStream) { + if (object instanceof ReadableStream2) { assert(!util.isDisturbed(object), "The body has already been consumed."); assert(!object.locked, "The stream is locked."); } @@ -8500,7 +7910,7 @@ Content-Type: ${value.type || "application/octet-stream"}\r const headers = {}; for (const [key, value] of this.headers) headers[key.toLowerCase()] = value; - const responseFormData = new FormData(); + const responseFormData = new FormData2(); let busboy; try { busboy = new Busboy({ @@ -8525,14 +7935,14 @@ Content-Type: ${value.type || "application/octet-stream"}\r }); value.on("end", () => { chunks.push(Buffer.from(base64chunk, "base64")); - responseFormData.append(name, new File(chunks, filename, { type: mimeType })); + responseFormData.append(name, new File2(chunks, filename, { type: mimeType })); }); } else { value.on("data", (chunk) => { chunks.push(chunk); }); value.on("end", () => { - responseFormData.append(name, new File(chunks, filename, { type: mimeType })); + responseFormData.append(name, new File2(chunks, filename, { type: mimeType })); }); } }); @@ -8562,7 +7972,7 @@ Content-Type: ${value.type || "application/octet-stream"}\r } catch (err) { throw Object.assign(new TypeError(), { cause: err }); } - const formData = new FormData(); + const formData = new FormData2(); for (const [name, value] of entries) { formData.append(name, value); } @@ -8952,44 +8362,44 @@ var require_request = __commonJS({ return headers; } }; - function processHeaderValue(key, val, skipAppend) { - if (val && typeof val === "object") { + function processHeaderValue(key, val2, skipAppend) { + if (val2 && typeof val2 === "object") { throw new InvalidArgumentError(`invalid ${key} header`); } - val = val != null ? `${val}` : ""; - if (headerCharRegex.exec(val) !== null) { + val2 = val2 != null ? `${val2}` : ""; + if (headerCharRegex.exec(val2) !== null) { throw new InvalidArgumentError(`invalid ${key} header`); } - return skipAppend ? val : `${key}: ${val}\r + return skipAppend ? val2 : `${key}: ${val2}\r `; } __name(processHeaderValue, "processHeaderValue"); - function processHeader(request, key, val, skipAppend = false) { - if (val && (typeof val === "object" && !Array.isArray(val))) { + function processHeader(request, key, val2, skipAppend = false) { + if (val2 && (typeof val2 === "object" && !Array.isArray(val2))) { throw new InvalidArgumentError(`invalid ${key} header`); - } else if (val === void 0) { + } else if (val2 === void 0) { return; } if (request.host === null && key.length === 4 && key.toLowerCase() === "host") { - if (headerCharRegex.exec(val) !== null) { + if (headerCharRegex.exec(val2) !== null) { throw new InvalidArgumentError(`invalid ${key} header`); } - request.host = val; + request.host = val2; } else if (request.contentLength === null && key.length === 14 && key.toLowerCase() === "content-length") { - request.contentLength = parseInt(val, 10); + request.contentLength = parseInt(val2, 10); if (!Number.isFinite(request.contentLength)) { throw new InvalidArgumentError("invalid content-length header"); } } else if (request.contentType === null && key.length === 12 && key.toLowerCase() === "content-type") { - request.contentType = val; + request.contentType = val2; if (skipAppend) - request.headers[key] = processHeaderValue(key, val, skipAppend); + request.headers[key] = processHeaderValue(key, val2, skipAppend); else - request.headers += processHeaderValue(key, val); + request.headers += processHeaderValue(key, val2); } else if (key.length === 17 && key.toLowerCase() === "transfer-encoding") { throw new InvalidArgumentError("invalid transfer-encoding header"); } else if (key.length === 10 && key.toLowerCase() === "connection") { - const value = typeof val === "string" ? val.toLowerCase() : null; + const value = typeof val2 === "string" ? val2.toLowerCase() : null; if (value !== "close" && value !== "keep-alive") { throw new InvalidArgumentError("invalid connection header"); } else if (value === "close") { @@ -9004,22 +8414,22 @@ var require_request = __commonJS({ } else if (tokenRegExp.exec(key) === null) { throw new InvalidArgumentError("invalid header key"); } else { - if (Array.isArray(val)) { - for (let i = 0; i < val.length; i++) { + if (Array.isArray(val2)) { + for (let i = 0; i < val2.length; i++) { if (skipAppend) { if (request.headers[key]) - request.headers[key] += `,${processHeaderValue(key, val[i], skipAppend)}`; + request.headers[key] += `,${processHeaderValue(key, val2[i], skipAppend)}`; else - request.headers[key] = processHeaderValue(key, val[i], skipAppend); + request.headers[key] = processHeaderValue(key, val2[i], skipAppend); } else { - request.headers += processHeaderValue(key, val[i]); + request.headers += processHeaderValue(key, val2[i]); } } } else { if (skipAppend) - request.headers[key] = processHeaderValue(key, val, skipAppend); + request.headers[key] = processHeaderValue(key, val2, skipAppend); else - request.headers += processHeaderValue(key, val); + request.headers += processHeaderValue(key, val2); } } } @@ -12738,15 +12148,15 @@ var require_api_request = __commonJS({ } addSignal(this, signal); } - onConnect(abort, context2) { + onConnect(abort, context) { if (!this.callback) { throw new RequestAbortedError(); } this.abort = abort; - this.context = context2; + this.context = context; } onHeaders(statusCode, rawHeaders, resume, statusMessage) { - const { callback, opaque, abort, context: context2, responseHeaders, highWaterMark } = this; + const { callback, opaque, abort, context, responseHeaders, highWaterMark } = this; const headers = responseHeaders === "raw" ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders); if (statusCode < 200) { if (this.onInfo) { @@ -12773,7 +12183,7 @@ var require_api_request = __commonJS({ trailers: this.trailers, opaque, body, - context: context2 + context }); } } @@ -12897,15 +12307,15 @@ var require_api_stream = __commonJS({ } addSignal(this, signal); } - onConnect(abort, context2) { + onConnect(abort, context) { if (!this.callback) { throw new RequestAbortedError(); } this.abort = abort; - this.context = context2; + this.context = context; } onHeaders(statusCode, rawHeaders, resume, statusMessage) { - const { factory, opaque, context: context2, callback, responseHeaders } = this; + const { factory, opaque, context, callback, responseHeaders } = this; const headers = responseHeaders === "raw" ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders); if (statusCode < 200) { if (this.onInfo) { @@ -12933,7 +12343,7 @@ var require_api_stream = __commonJS({ statusCode, headers, opaque, - context: context2 + context }); if (!res || typeof res.write !== "function" || typeof res.end !== "function" || typeof res.on !== "function") { throw new InvalidReturnValueError("expected Writable"); @@ -13135,17 +12545,17 @@ var require_api_pipeline = __commonJS({ this.res = null; addSignal(this, signal); } - onConnect(abort, context2) { + onConnect(abort, context) { const { ret, res } = this; assert(!res, "pipeline cannot be retried"); if (ret.destroyed) { throw new RequestAbortedError(); } this.abort = abort; - this.context = context2; + this.context = context; } onHeaders(statusCode, rawHeaders, resume) { - const { opaque, handler, context: context2 } = this; + const { opaque, handler, context } = this; if (statusCode < 200) { if (this.onInfo) { const headers = this.responseHeaders === "raw" ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders); @@ -13163,7 +12573,7 @@ var require_api_pipeline = __commonJS({ headers, opaque, body: this.res, - context: context2 + context }); } catch (err) { this.res.on("error", util.nop); @@ -13251,7 +12661,7 @@ var require_api_upgrade = __commonJS({ this.context = null; addSignal(this, signal); } - onConnect(abort, context2) { + onConnect(abort, context) { if (!this.callback) { throw new RequestAbortedError(); } @@ -13262,7 +12672,7 @@ var require_api_upgrade = __commonJS({ throw new SocketError("bad upgrade", null); } onUpgrade(statusCode, rawHeaders, socket) { - const { callback, opaque, context: context2 } = this; + const { callback, opaque, context } = this; assert.strictEqual(statusCode, 101); removeSignal(this); this.callback = null; @@ -13271,7 +12681,7 @@ var require_api_upgrade = __commonJS({ headers, socket, opaque, - context: context2 + context }); } onError(err) { @@ -13343,18 +12753,18 @@ var require_api_connect = __commonJS({ this.abort = null; addSignal(this, signal); } - onConnect(abort, context2) { + onConnect(abort, context) { if (!this.callback) { throw new RequestAbortedError(); } this.abort = abort; - this.context = context2; + this.context = context; } onHeaders() { throw new SocketError("bad connect", null); } onUpgrade(statusCode, rawHeaders, socket) { - const { callback, opaque, context: context2 } = this; + const { callback, opaque, context } = this; removeSignal(this); this.callback = null; let headers = rawHeaders; @@ -13366,7 +12776,7 @@ var require_api_connect = __commonJS({ headers, socket, opaque, - context: context2 + context }); } onError(err) { @@ -14273,7 +13683,7 @@ var require_proxy_agent = __commonJS({ "node_modules/undici/lib/proxy-agent.js"(exports2, module2) { "use strict"; var { kProxy, kClose, kDestroy, kInterceptors } = require_symbols(); - var { URL: URL4 } = require("url"); + var { URL: URL3 } = require("url"); var Agent = require_agent(); var Pool = require_pool(); var DispatcherBase = require_dispatcher_base(); @@ -14328,7 +13738,7 @@ var require_proxy_agent = __commonJS({ this[kRequestTls] = opts.requestTls; this[kProxyTls] = opts.proxyTls; this[kProxyHeaders] = opts.headers || {}; - const resolvedUrl = new URL4(opts.uri); + const resolvedUrl = new URL3(opts.uri); const { origin, port, host, username, password } = resolvedUrl; if (opts.auth && opts.token) { throw new InvalidArgumentError("opts.auth cannot be used in combination with opts.token"); @@ -14383,7 +13793,7 @@ var require_proxy_agent = __commonJS({ }); } dispatch(opts, handler) { - const { host } = new URL4(opts.origin); + const { host } = new URL3(opts.origin); const headers = buildHeaders(opts.headers); throwIfProxyAuthIsSent(headers); return this[kAgent].dispatch( @@ -15192,13 +14602,13 @@ var require_response = __commonJS({ } = require_constants3(); var { kState, kHeaders, kGuard, kRealm } = require_symbols2(); var { webidl } = require_webidl(); - var { FormData } = require_formdata(); + var { FormData: FormData2 } = require_formdata(); var { getGlobalOrigin } = require_global(); var { URLSerializer } = require_dataURL(); var { kHeadersList, kConstruct } = require_symbols(); var assert = require("assert"); var { types } = require("util"); - var ReadableStream = globalThis.ReadableStream || require("stream/web").ReadableStream; + var ReadableStream2 = globalThis.ReadableStream || require("stream/web").ReadableStream; var textEncoder = new TextEncoder("utf-8"); var Response = class _Response { static { @@ -15495,10 +14905,10 @@ var require_response = __commonJS({ } __name(initializeResponse, "initializeResponse"); webidl.converters.ReadableStream = webidl.interfaceConverter( - ReadableStream + ReadableStream2 ); webidl.converters.FormData = webidl.interfaceConverter( - FormData + FormData2 ); webidl.converters.URLSearchParams = webidl.interfaceConverter( URLSearchParams @@ -15522,7 +14932,7 @@ var require_response = __commonJS({ return webidl.converters.DOMString(V); }; webidl.converters.BodyInit = function(V) { - if (V instanceof ReadableStream) { + if (V instanceof ReadableStream2) { return webidl.converters.ReadableStream(V); } if (V?.[Symbol.asyncIterator]) { @@ -15826,8 +15236,8 @@ var require_request2 = __commonJS({ const headers = init.headers !== void 0 ? init.headers : new HeadersList(headersList); headersList.clear(); if (headers instanceof HeadersList) { - for (const [key, val] of headers) { - headersList.append(key, val); + for (const [key, val2] of headers) { + headersList.append(key, val2); } headersList.cookies = headers.cookies; } else { @@ -16267,7 +15677,7 @@ var require_fetch = __commonJS({ var { STATUS_CODES } = require("http"); var GET_OR_HEAD = ["GET", "HEAD"]; var resolveObjectURL; - var ReadableStream = globalThis.ReadableStream; + var ReadableStream2 = globalThis.ReadableStream; var Fetch = class extends EE { static { __name(this, "Fetch"); @@ -17029,10 +16439,10 @@ var require_fetch = __commonJS({ const cancelAlgorithm = /* @__PURE__ */ __name((reason) => { fetchParams.controller.abort(reason); }, "cancelAlgorithm"); - if (!ReadableStream) { - ReadableStream = require("stream/web").ReadableStream; + if (!ReadableStream2) { + ReadableStream2 = require("stream/web").ReadableStream; } - const stream = new ReadableStream( + const stream = new ReadableStream2( { async start(controller) { fetchParams.controller.controller = controller; @@ -17145,24 +16555,24 @@ var require_fetch = __commonJS({ if (Array.isArray(headersList)) { for (let n = 0; n < headersList.length; n += 2) { const key = headersList[n + 0].toString("latin1"); - const val = headersList[n + 1].toString("latin1"); + const val2 = headersList[n + 1].toString("latin1"); if (key.toLowerCase() === "content-encoding") { - codings = val.toLowerCase().split(",").map((x) => x.trim()); + codings = val2.toLowerCase().split(",").map((x) => x.trim()); } else if (key.toLowerCase() === "location") { - location = val; + location = val2; } - headers[kHeadersList].append(key, val); + headers[kHeadersList].append(key, val2); } } else { const keys = Object.keys(headersList); for (const key of keys) { - const val = headersList[key]; + const val2 = headersList[key]; if (key.toLowerCase() === "content-encoding") { - codings = val.toLowerCase().split(",").map((x) => x.trim()).reverse(); + codings = val2.toLowerCase().split(",").map((x) => x.trim()).reverse(); } else if (key.toLowerCase() === "location") { - location = val; + location = val2; } - headers[kHeadersList].append(key, val); + headers[kHeadersList].append(key, val2); } } this.body = new Readable({ read: resume }); @@ -17229,8 +16639,8 @@ var require_fetch = __commonJS({ const headers = new Headers(); for (let n = 0; n < headersList.length; n += 2) { const key = headersList[n + 0].toString("latin1"); - const val = headersList[n + 1].toString("latin1"); - headers[kHeadersList].append(key, val); + const val2 = headersList[n + 1].toString("latin1"); + headers[kHeadersList].append(key, val2); } resolve({ status, @@ -18881,7 +18291,7 @@ var require_util6 = __commonJS({ } } __name(validateCookieMaxAge, "validateCookieMaxAge"); - function stringify3(cookie) { + function stringify2(cookie) { if (cookie.name.length === 0) { return null; } @@ -18929,7 +18339,7 @@ var require_util6 = __commonJS({ } return out.join("; "); } - __name(stringify3, "stringify"); + __name(stringify2, "stringify"); var kHeadersListNode; function getHeadersList(headers) { if (headers[kHeadersList]) { @@ -18948,7 +18358,7 @@ var require_util6 = __commonJS({ __name(getHeadersList, "getHeadersList"); module2.exports = { isCTLExcludingHtab, - stringify: stringify3, + stringify: stringify2, getHeadersList }; } @@ -19101,7 +18511,7 @@ var require_cookies = __commonJS({ "node_modules/undici/lib/cookies/index.js"(exports2, module2) { "use strict"; var { parseSetCookie } = require_parse2(); - var { stringify: stringify3, getHeadersList } = require_util6(); + var { stringify: stringify2, getHeadersList } = require_util6(); var { webidl } = require_webidl(); var { Headers } = require_headers(); function getCookies(headers) { @@ -19146,9 +18556,9 @@ var require_cookies = __commonJS({ webidl.argumentLengthCheck(arguments, 2, { header: "setCookie" }); webidl.brandCheck(headers, Headers, { strict: false }); cookie = webidl.converters.Cookie(cookie); - const str = stringify3(cookie); + const str = stringify2(cookie); if (str) { - headers.append("Set-Cookie", stringify3(cookie)); + headers.append("Set-Cookie", stringify2(cookie)); } } __name(setCookie, "setCookie"); @@ -19662,9 +19072,9 @@ var require_connection = __commonJS({ channels.open = diagnosticsChannel.channel("undici:websocket:open"); channels.close = diagnosticsChannel.channel("undici:websocket:close"); channels.socketError = diagnosticsChannel.channel("undici:websocket:socket_error"); - var crypto7; + var crypto4; try { - crypto7 = require("crypto"); + crypto4 = require("crypto"); } catch { } function establishWebSocketConnection(url, protocols, ws, onEstablish, options) { @@ -19683,7 +19093,7 @@ var require_connection = __commonJS({ const headersList = new Headers(options.headers)[kHeadersList]; request.headersList = headersList; } - const keyValue = crypto7.randomBytes(16).toString("base64"); + const keyValue = crypto4.randomBytes(16).toString("base64"); request.headersList.append("sec-websocket-key", keyValue); request.headersList.append("sec-websocket-version", "13"); for (const protocol of protocols) { @@ -19712,7 +19122,7 @@ var require_connection = __commonJS({ return; } const secWSAccept = response.headersList.get("Sec-WebSocket-Accept"); - const digest = crypto7.createHash("sha1").update(keyValue + uid).digest("base64"); + const digest = crypto4.createHash("sha1").update(keyValue + uid).digest("base64"); if (secWSAccept !== digest) { failWebsocketConnection(ws, "Incorrect hash received in Sec-WebSocket-Accept header."); return; @@ -19796,9 +19206,9 @@ var require_frame = __commonJS({ "node_modules/undici/lib/websocket/frame.js"(exports2, module2) { "use strict"; var { maxUnsigned16Bit } = require_constants6(); - var crypto7; + var crypto4; try { - crypto7 = require("crypto"); + crypto4 = require("crypto"); } catch { } var WebsocketFrameSend = class { @@ -19810,7 +19220,7 @@ var require_frame = __commonJS({ */ constructor(data) { this.frameData = data; - this.maskKey = crypto7.randomBytes(4); + this.maskKey = crypto4.randomBytes(4); } createFrame(opcode) { const bodyLength = this.frameData?.byteLength ?? 0; @@ -21202,7 +20612,7 @@ var require_lib = __commonJS({ } const usingSsl = parsedUrl.protocol === "https:"; proxyAgent = new undici_1.ProxyAgent(Object.assign({ uri: proxyUrl.href, pipelining: !this._keepAlive ? 0 : 1 }, (proxyUrl.username || proxyUrl.password) && { - token: `${proxyUrl.username}:${proxyUrl.password}` + token: `Basic ${Buffer.from(`${proxyUrl.username}:${proxyUrl.password}`).toString("base64")}` })); this._proxyAgentDispatcher = proxyAgent; if (usingSsl && this._ignoreSslError) { @@ -21932,12 +21342,12 @@ var require_core = __commonJS({ ExitCode2[ExitCode2["Success"] = 0] = "Success"; ExitCode2[ExitCode2["Failure"] = 1] = "Failure"; })(ExitCode = exports2.ExitCode || (exports2.ExitCode = {})); - function exportVariable(name, val) { - const convertedVal = utils_1.toCommandValue(val); + function exportVariable(name, val2) { + const convertedVal = utils_1.toCommandValue(val2); process.env[name] = convertedVal; const filePath = process.env["GITHUB_ENV"] || ""; if (filePath) { - return file_command_1.issueFileCommand("ENV", file_command_1.prepareKeyValueMessage(name, val)); + return file_command_1.issueFileCommand("ENV", file_command_1.prepareKeyValueMessage(name, val2)); } command_1.issueCommand("set-env", { name }, convertedVal); } @@ -21960,14 +21370,14 @@ var require_core = __commonJS({ __name(addPath, "addPath"); exports2.addPath = addPath; function getInput(name, options) { - const val = process.env[`INPUT_${name.replace(/ /g, "_").toUpperCase()}`] || ""; - if (options && options.required && !val) { + const val2 = process.env[`INPUT_${name.replace(/ /g, "_").toUpperCase()}`] || ""; + if (options && options.required && !val2) { throw new Error(`Input required and not supplied: ${name}`); } if (options && options.trimWhitespace === false) { - return val; + return val2; } - return val.trim(); + return val2.trim(); } __name(getInput, "getInput"); exports2.getInput = getInput; @@ -21983,10 +21393,10 @@ var require_core = __commonJS({ function getBooleanInput(name, options) { const trueValue = ["true", "True", "TRUE"]; const falseValue = ["false", "False", "FALSE"]; - const val = getInput(name, options); - if (trueValue.includes(val)) + const val2 = getInput(name, options); + if (trueValue.includes(val2)) return true; - if (falseValue.includes(val)) + if (falseValue.includes(val2)) return false; throw new TypeError(`Input does not meet YAML 1.2 "Core Schema" specification: ${name} Support boolean input list: \`true | True | TRUE | false | False | FALSE\``); @@ -23937,9 +23347,9 @@ var require_minimatch = __commonJS({ throw new TypeError("pattern is too long"); } }, "assertValidPattern"); - Minimatch.prototype.parse = parse3; + Minimatch.prototype.parse = parse2; var SUBPARSE = {}; - function parse3(pattern, isSub) { + function parse2(pattern, isSub) { assertValidPattern(pattern); var options = this.options; if (pattern === "**") { @@ -23950,7 +23360,7 @@ var require_minimatch = __commonJS({ } if (pattern === "") return ""; - var re2 = ""; + var re = ""; var hasMagic = !!options.nocase; var escaping = false; var patternListStack = []; @@ -23965,26 +23375,26 @@ var require_minimatch = __commonJS({ if (stateChar) { switch (stateChar) { case "*": - re2 += star; + re += star; hasMagic = true; break; case "?": - re2 += qmark; + re += qmark; hasMagic = true; break; default: - re2 += "\\" + stateChar; + re += "\\" + stateChar; break; } - self2.debug("clearStateChar %j %j", stateChar, re2); + self2.debug("clearStateChar %j %j", stateChar, re); stateChar = false; } } __name(clearStateChar, "clearStateChar"); for (var i = 0, len = pattern.length, c; i < len && (c = pattern.charAt(i)); i++) { - this.debug("%s %s %s %j", pattern, i, re2, c); + this.debug("%s %s %s %j", pattern, i, re, c); if (escaping && reSpecials[c]) { - re2 += "\\" + c; + re += "\\" + c; escaping = false; continue; } @@ -24001,12 +23411,12 @@ var require_minimatch = __commonJS({ case "+": case "@": case "!": - this.debug("%s %s %s %j <-- stateChar", pattern, i, re2, c); + this.debug("%s %s %s %j <-- stateChar", pattern, i, re, c); if (inClass) { this.debug(" in class"); if (c === "!" && i === classStart + 1) c = "^"; - re2 += c; + re += c; continue; } self2.debug("call clearStateChar %j", stateChar); @@ -24017,61 +23427,61 @@ var require_minimatch = __commonJS({ continue; case "(": if (inClass) { - re2 += "("; + re += "("; continue; } if (!stateChar) { - re2 += "\\("; + re += "\\("; continue; } patternListStack.push({ type: stateChar, start: i - 1, - reStart: re2.length, + reStart: re.length, open: plTypes[stateChar].open, close: plTypes[stateChar].close }); - re2 += stateChar === "!" ? "(?:(?!(?:" : "(?:"; - this.debug("plType %j %j", stateChar, re2); + re += stateChar === "!" ? "(?:(?!(?:" : "(?:"; + this.debug("plType %j %j", stateChar, re); stateChar = false; continue; case ")": if (inClass || !patternListStack.length) { - re2 += "\\)"; + re += "\\)"; continue; } clearStateChar(); hasMagic = true; var pl = patternListStack.pop(); - re2 += pl.close; + re += pl.close; if (pl.type === "!") { negativeLists.push(pl); } - pl.reEnd = re2.length; + pl.reEnd = re.length; continue; case "|": if (inClass || !patternListStack.length || escaping) { - re2 += "\\|"; + re += "\\|"; escaping = false; continue; } clearStateChar(); - re2 += "|"; + re += "|"; continue; case "[": clearStateChar(); if (inClass) { - re2 += "\\" + c; + re += "\\" + c; continue; } inClass = true; classStart = i; - reClassStart = re2.length; - re2 += c; + reClassStart = re.length; + re += c; continue; case "]": if (i === classStart + 1 || !inClass) { - re2 += "\\" + c; + re += "\\" + c; escaping = false; continue; } @@ -24080,51 +23490,51 @@ var require_minimatch = __commonJS({ RegExp("[" + cs + "]"); } catch (er) { var sp = this.parse(cs, SUBPARSE); - re2 = re2.substr(0, reClassStart) + "\\[" + sp[0] + "\\]"; + re = re.substr(0, reClassStart) + "\\[" + sp[0] + "\\]"; hasMagic = hasMagic || sp[1]; inClass = false; continue; } hasMagic = true; inClass = false; - re2 += c; + re += c; continue; default: clearStateChar(); if (escaping) { escaping = false; } else if (reSpecials[c] && !(c === "^" && inClass)) { - re2 += "\\"; + re += "\\"; } - re2 += c; + re += c; } } if (inClass) { cs = pattern.substr(classStart + 1); sp = this.parse(cs, SUBPARSE); - re2 = re2.substr(0, reClassStart) + "\\[" + sp[0]; + re = re.substr(0, reClassStart) + "\\[" + sp[0]; hasMagic = hasMagic || sp[1]; } for (pl = patternListStack.pop(); pl; pl = patternListStack.pop()) { - var tail = re2.slice(pl.reStart + pl.open.length); - this.debug("setting tail", re2, pl); + var tail = re.slice(pl.reStart + pl.open.length); + this.debug("setting tail", re, pl); tail = tail.replace(/((?:\\{2}){0,64})(\\?)\|/g, function(_, $1, $2) { if (!$2) { $2 = "\\"; } return $1 + $1 + $2 + "|"; }); - this.debug("tail=%j\n %s", tail, tail, pl, re2); + this.debug("tail=%j\n %s", tail, tail, pl, re); var t = pl.type === "*" ? star : pl.type === "?" ? qmark : "\\" + pl.type; hasMagic = true; - re2 = re2.slice(0, pl.reStart) + t + "\\(" + tail; + re = re.slice(0, pl.reStart) + t + "\\(" + tail; } clearStateChar(); if (escaping) { - re2 += "\\\\"; + re += "\\\\"; } var addPatternStart = false; - switch (re2.charAt(0)) { + switch (re.charAt(0)) { case "[": case ".": case "(": @@ -24132,10 +23542,10 @@ var require_minimatch = __commonJS({ } for (var n = negativeLists.length - 1; n > -1; n--) { var nl = negativeLists[n]; - var nlBefore = re2.slice(0, nl.reStart); - var nlFirst = re2.slice(nl.reStart, nl.reEnd - 8); - var nlLast = re2.slice(nl.reEnd - 8, nl.reEnd); - var nlAfter = re2.slice(nl.reEnd); + var nlBefore = re.slice(0, nl.reStart); + var nlFirst = re.slice(nl.reStart, nl.reEnd - 8); + var nlLast = re.slice(nl.reEnd - 8, nl.reEnd); + var nlAfter = re.slice(nl.reEnd); nlLast += nlAfter; var openParensBefore = nlBefore.split("(").length - 1; var cleanAfter = nlAfter; @@ -24148,31 +23558,31 @@ var require_minimatch = __commonJS({ dollar = "$"; } var newRe = nlBefore + nlFirst + nlAfter + dollar + nlLast; - re2 = newRe; + re = newRe; } - if (re2 !== "" && hasMagic) { - re2 = "(?=.)" + re2; + if (re !== "" && hasMagic) { + re = "(?=.)" + re; } if (addPatternStart) { - re2 = patternStart + re2; + re = patternStart + re; } if (isSub === SUBPARSE) { - return [re2, hasMagic]; + return [re, hasMagic]; } if (!hasMagic) { return globUnescape(pattern); } var flags = options.nocase ? "i" : ""; try { - var regExp = new RegExp("^" + re2 + "$", flags); + var regExp = new RegExp("^" + re + "$", flags); } catch (er) { return new RegExp("$."); } regExp._glob = pattern; - regExp._src = re2; + regExp._src = re; return regExp; } - __name(parse3, "parse"); + __name(parse2, "parse"); minimatch.makeRe = function(pattern, options) { return new Minimatch(pattern, options || {}).makeRe(); }; @@ -24188,16 +23598,16 @@ var require_minimatch = __commonJS({ var options = this.options; var twoStar = options.noglobstar ? star : options.dot ? twoStarDot : twoStarNoDot; var flags = options.nocase ? "i" : ""; - var re2 = set.map(function(pattern) { + var re = set.map(function(pattern) { return pattern.map(function(p) { return p === GLOBSTAR ? twoStar : typeof p === "string" ? regExpEscape(p) : p._src; }).join("\\/"); }).join("|"); - re2 = "^(?:" + re2 + ")$"; + re = "^(?:" + re + ")$"; if (this.negate) - re2 = "^(?!" + re2 + ").*$"; + re = "^(?!" + re + ").*$"; try { - this.regexp = new RegExp(re2, flags); + this.regexp = new RegExp(re, flags); } catch (ex) { this.regexp = false; } @@ -25027,7 +24437,7 @@ var require_semver3 = __commonJS({ 9007199254740991; var MAX_SAFE_COMPONENT_LENGTH = 16; var MAX_SAFE_BUILD_LENGTH = MAX_LENGTH - 6; - var re2 = exports2.re = []; + var re = exports2.re = []; var safeRe = exports2.safeRe = []; var src = exports2.src = []; var t = exports2.tokens = {}; @@ -25098,13 +24508,13 @@ var require_semver3 = __commonJS({ tok("COERCE"); src[t.COERCE] = "(^|[^\\d])(\\d{1," + MAX_SAFE_COMPONENT_LENGTH + "})(?:\\.(\\d{1," + MAX_SAFE_COMPONENT_LENGTH + "}))?(?:\\.(\\d{1," + MAX_SAFE_COMPONENT_LENGTH + "}))?(?:$|[^\\d])"; tok("COERCERTL"); - re2[t.COERCERTL] = new RegExp(src[t.COERCE], "g"); + re[t.COERCERTL] = new RegExp(src[t.COERCE], "g"); safeRe[t.COERCERTL] = new RegExp(makeSafeRe(src[t.COERCE]), "g"); tok("LONETILDE"); src[t.LONETILDE] = "(?:~>?)"; tok("TILDETRIM"); src[t.TILDETRIM] = "(\\s*)" + src[t.LONETILDE] + "\\s+"; - re2[t.TILDETRIM] = new RegExp(src[t.TILDETRIM], "g"); + re[t.TILDETRIM] = new RegExp(src[t.TILDETRIM], "g"); safeRe[t.TILDETRIM] = new RegExp(makeSafeRe(src[t.TILDETRIM]), "g"); var tildeTrimReplace = "$1~"; tok("TILDE"); @@ -25115,7 +24525,7 @@ var require_semver3 = __commonJS({ src[t.LONECARET] = "(?:\\^)"; tok("CARETTRIM"); src[t.CARETTRIM] = "(\\s*)" + src[t.LONECARET] + "\\s+"; - re2[t.CARETTRIM] = new RegExp(src[t.CARETTRIM], "g"); + re[t.CARETTRIM] = new RegExp(src[t.CARETTRIM], "g"); safeRe[t.CARETTRIM] = new RegExp(makeSafeRe(src[t.CARETTRIM]), "g"); var caretTrimReplace = "$1^"; tok("CARET"); @@ -25128,7 +24538,7 @@ var require_semver3 = __commonJS({ src[t.COMPARATOR] = "^" + src[t.GTLT] + "\\s*(" + src[t.FULLPLAIN] + ")$|^$"; tok("COMPARATORTRIM"); src[t.COMPARATORTRIM] = "(\\s*)" + src[t.GTLT] + "\\s*(" + src[t.LOOSEPLAIN] + "|" + src[t.XRANGEPLAIN] + ")"; - re2[t.COMPARATORTRIM] = new RegExp(src[t.COMPARATORTRIM], "g"); + re[t.COMPARATORTRIM] = new RegExp(src[t.COMPARATORTRIM], "g"); safeRe[t.COMPARATORTRIM] = new RegExp(makeSafeRe(src[t.COMPARATORTRIM]), "g"); var comparatorTrimReplace = "$1$2$3"; tok("HYPHENRANGE"); @@ -25139,83 +24549,83 @@ var require_semver3 = __commonJS({ src[t.STAR] = "(<|>)?=?\\s*\\*"; for (i = 0; i < R; i++) { debug(i, src[i]); - if (!re2[i]) { - re2[i] = new RegExp(src[i]); + if (!re[i]) { + re[i] = new RegExp(src[i]); safeRe[i] = new RegExp(makeSafeRe(src[i])); } } var i; - exports2.parse = parse3; - function parse3(version3, options) { + exports2.parse = parse2; + function parse2(version2, options) { if (!options || typeof options !== "object") { options = { loose: !!options, includePrerelease: false }; } - if (version3 instanceof SemVer) { - return version3; + if (version2 instanceof SemVer) { + return version2; } - if (typeof version3 !== "string") { + if (typeof version2 !== "string") { return null; } - if (version3.length > MAX_LENGTH) { + if (version2.length > MAX_LENGTH) { return null; } var r = options.loose ? safeRe[t.LOOSE] : safeRe[t.FULL]; - if (!r.test(version3)) { + if (!r.test(version2)) { return null; } try { - return new SemVer(version3, options); + return new SemVer(version2, options); } catch (er) { return null; } } - __name(parse3, "parse"); + __name(parse2, "parse"); exports2.valid = valid; - function valid(version3, options) { - var v = parse3(version3, options); + function valid(version2, options) { + var v = parse2(version2, options); return v ? v.version : null; } __name(valid, "valid"); exports2.clean = clean; - function clean(version3, options) { - var s = parse3(version3.trim().replace(/^[=v]+/, ""), options); + function clean(version2, options) { + var s = parse2(version2.trim().replace(/^[=v]+/, ""), options); return s ? s.version : null; } __name(clean, "clean"); exports2.SemVer = SemVer; - function SemVer(version3, options) { + function SemVer(version2, options) { if (!options || typeof options !== "object") { options = { loose: !!options, includePrerelease: false }; } - if (version3 instanceof SemVer) { - if (version3.loose === options.loose) { - return version3; + if (version2 instanceof SemVer) { + if (version2.loose === options.loose) { + return version2; } else { - version3 = version3.version; + version2 = version2.version; } - } else if (typeof version3 !== "string") { - throw new TypeError("Invalid Version: " + version3); + } else if (typeof version2 !== "string") { + throw new TypeError("Invalid Version: " + version2); } - if (version3.length > MAX_LENGTH) { + if (version2.length > MAX_LENGTH) { throw new TypeError("version is longer than " + MAX_LENGTH + " characters"); } if (!(this instanceof SemVer)) { - return new SemVer(version3, options); + return new SemVer(version2, options); } - debug("SemVer", version3, options); + debug("SemVer", version2, options); this.options = options; this.loose = !!options.loose; - var m = version3.trim().match(options.loose ? safeRe[t.LOOSE] : safeRe[t.FULL]); + var m = version2.trim().match(options.loose ? safeRe[t.LOOSE] : safeRe[t.FULL]); if (!m) { - throw new TypeError("Invalid Version: " + version3); + throw new TypeError("Invalid Version: " + version2); } - this.raw = version3; + this.raw = version2; this.major = +m[1]; this.minor = +m[2]; this.patch = +m[3]; @@ -25399,33 +24809,33 @@ var require_semver3 = __commonJS({ return this; }; exports2.inc = inc; - function inc(version3, release, loose, identifier) { + function inc(version2, release, loose, identifier) { if (typeof loose === "string") { identifier = loose; loose = void 0; } try { - return new SemVer(version3, loose).inc(release, identifier).version; + return new SemVer(version2, loose).inc(release, identifier).version; } catch (er) { return null; } } __name(inc, "inc"); exports2.diff = diff; - function diff(version1, version22) { - if (eq(version1, version22)) { + function diff(version1, version2) { + if (eq(version1, version2)) { return null; } else { - var v13 = parse3(version1); - var v2 = parse3(version22); + var v12 = parse2(version1); + var v2 = parse2(version2); var prefix = ""; - if (v13.prerelease.length || v2.prerelease.length) { + if (v12.prerelease.length || v2.prerelease.length) { prefix = "pre"; var defaultResult = "prerelease"; } - for (var key in v13) { + for (var key in v12) { if (key === "major" || key === "minor" || key === "patch") { - if (v13[key] !== v2[key]) { + if (v12[key] !== v2[key]) { return prefix + key; } } @@ -25451,11 +24861,11 @@ var require_semver3 = __commonJS({ return compareIdentifiers(b, a); } __name(rcompareIdentifiers, "rcompareIdentifiers"); - exports2.major = major2; - function major2(a, loose) { + exports2.major = major; + function major(a, loose) { return new SemVer(a, loose).major; } - __name(major2, "major"); + __name(major, "major"); exports2.minor = minor; function minor(a, loose) { return new SemVer(a, loose).minor; @@ -25617,19 +25027,19 @@ var require_semver3 = __commonJS({ Comparator.prototype.toString = function() { return this.value; }; - Comparator.prototype.test = function(version3) { - debug("Comparator.test", version3, this.options.loose); - if (this.semver === ANY || version3 === ANY) { + Comparator.prototype.test = function(version2) { + debug("Comparator.test", version2, this.options.loose); + if (this.semver === ANY || version2 === ANY) { return true; } - if (typeof version3 === "string") { + if (typeof version2 === "string") { try { - version3 = new SemVer(version3, this.options); + version2 = new SemVer(version2, this.options); } catch (er) { return false; } } - return cmp(version3, this.operator, this.semver, this.options); + return cmp(version2, this.operator, this.semver, this.options); }; Comparator.prototype.intersects = function(comp, options) { if (!(comp instanceof Comparator)) { @@ -25952,31 +25362,31 @@ var require_semver3 = __commonJS({ return (from + " " + to).trim(); } __name(hyphenReplace, "hyphenReplace"); - Range.prototype.test = function(version3) { - if (!version3) { + Range.prototype.test = function(version2) { + if (!version2) { return false; } - if (typeof version3 === "string") { + if (typeof version2 === "string") { try { - version3 = new SemVer(version3, this.options); + version2 = new SemVer(version2, this.options); } catch (er) { return false; } } for (var i2 = 0; i2 < this.set.length; i2++) { - if (testSet(this.set[i2], version3, this.options)) { + if (testSet(this.set[i2], version2, this.options)) { return true; } } return false; }; - function testSet(set, version3, options) { + function testSet(set, version2, options) { for (var i2 = 0; i2 < set.length; i2++) { - if (!set[i2].test(version3)) { + if (!set[i2].test(version2)) { return false; } } - if (version3.prerelease.length && !options.includePrerelease) { + if (version2.prerelease.length && !options.includePrerelease) { for (i2 = 0; i2 < set.length; i2++) { debug(set[i2].semver); if (set[i2].semver === ANY) { @@ -25984,7 +25394,7 @@ var require_semver3 = __commonJS({ } if (set[i2].semver.prerelease.length > 0) { var allowed = set[i2].semver; - if (allowed.major === version3.major && allowed.minor === version3.minor && allowed.patch === version3.patch) { + if (allowed.major === version2.major && allowed.minor === version2.minor && allowed.patch === version2.patch) { return true; } } @@ -25995,13 +25405,13 @@ var require_semver3 = __commonJS({ } __name(testSet, "testSet"); exports2.satisfies = satisfies; - function satisfies(version3, range, options) { + function satisfies(version2, range, options) { try { range = new Range(range, options); } catch (er) { return false; } - return range.test(version3); + return range.test(version2); } __name(satisfies, "satisfies"); exports2.maxSatisfying = maxSatisfying; @@ -26098,18 +25508,18 @@ var require_semver3 = __commonJS({ } __name(validRange, "validRange"); exports2.ltr = ltr; - function ltr(version3, range, options) { - return outside(version3, range, "<", options); + function ltr(version2, range, options) { + return outside(version2, range, "<", options); } __name(ltr, "ltr"); exports2.gtr = gtr; - function gtr(version3, range, options) { - return outside(version3, range, ">", options); + function gtr(version2, range, options) { + return outside(version2, range, ">", options); } __name(gtr, "gtr"); exports2.outside = outside; - function outside(version3, range, hilo, options) { - version3 = new SemVer(version3, options); + function outside(version2, range, hilo, options) { + version2 = new SemVer(version2, options); range = new Range(range, options); var gtfn, ltefn, ltfn, comp, ecomp; switch (hilo) { @@ -26130,7 +25540,7 @@ var require_semver3 = __commonJS({ default: throw new TypeError('Must provide a hilo val of "<" or ">"'); } - if (satisfies(version3, range, options)) { + if (satisfies(version2, range, options)) { return false; } for (var i2 = 0; i2 < range.set.length; ++i2) { @@ -26152,9 +25562,9 @@ var require_semver3 = __commonJS({ if (high.operator === comp || high.operator === ecomp) { return false; } - if ((!low.operator || low.operator === comp) && ltefn(version3, low.semver)) { + if ((!low.operator || low.operator === comp) && ltefn(version2, low.semver)) { return false; - } else if (low.operator === ecomp && ltfn(version3, low.semver)) { + } else if (low.operator === ecomp && ltfn(version2, low.semver)) { return false; } } @@ -26162,8 +25572,8 @@ var require_semver3 = __commonJS({ } __name(outside, "outside"); exports2.prerelease = prerelease; - function prerelease(version3, options) { - var parsed = parse3(version3, options); + function prerelease(version2, options) { + var parsed = parse2(version2, options); return parsed && parsed.prerelease.length ? parsed.prerelease : null; } __name(prerelease, "prerelease"); @@ -26175,23 +25585,23 @@ var require_semver3 = __commonJS({ } __name(intersects, "intersects"); exports2.coerce = coerce; - function coerce(version3, options) { - if (version3 instanceof SemVer) { - return version3; + function coerce(version2, options) { + if (version2 instanceof SemVer) { + return version2; } - if (typeof version3 === "number") { - version3 = String(version3); + if (typeof version2 === "number") { + version2 = String(version2); } - if (typeof version3 !== "string") { + if (typeof version2 !== "string") { return null; } options = options || {}; var match = null; if (!options.rtl) { - match = version3.match(safeRe[t.COERCE]); + match = version2.match(safeRe[t.COERCE]); } else { var next; - while ((next = safeRe[t.COERCERTL].exec(version3)) && (!match || match.index + match[0].length !== version3.length)) { + while ((next = safeRe[t.COERCERTL].exec(version2)) && (!match || match.index + match[0].length !== version2.length)) { if (!match || next.index + next[0].length !== match.index + match[0].length) { match = next; } @@ -26202,7 +25612,7 @@ var require_semver3 = __commonJS({ if (match === null) { return null; } - return parse3(match[2] + "." + (match[3] || "0") + "." + (match[4] || "0"), options); + return parse2(match[2] + "." + (match[3] || "0") + "." + (match[4] || "0"), options); } __name(coerce, "coerce"); } @@ -26211,9 +25621,9 @@ var require_semver3 = __commonJS({ // node_modules/uuid/lib/rng.js var require_rng = __commonJS({ "node_modules/uuid/lib/rng.js"(exports2, module2) { - var crypto7 = require("crypto"); + var crypto4 = require("crypto"); module2.exports = /* @__PURE__ */ __name(function nodeRNG() { - return crypto7.randomBytes(16); + return crypto4.randomBytes(16); }, "nodeRNG"); } }); @@ -26221,14 +25631,14 @@ var require_rng = __commonJS({ // node_modules/uuid/lib/bytesToUuid.js var require_bytesToUuid = __commonJS({ "node_modules/uuid/lib/bytesToUuid.js"(exports2, module2) { - var byteToHex3 = []; + var byteToHex2 = []; for (i = 0; i < 256; ++i) { - byteToHex3[i] = (i + 256).toString(16).substr(1); + byteToHex2[i] = (i + 256).toString(16).substr(1); } var i; function bytesToUuid(buf, offset) { var i2 = offset || 0; - var bth = byteToHex3; + var bth = byteToHex2; return [ bth[buf[i2++]], bth[buf[i2++]], @@ -26260,22 +25670,22 @@ var require_bytesToUuid = __commonJS({ // node_modules/uuid/v1.js var require_v1 = __commonJS({ "node_modules/uuid/v1.js"(exports2, module2) { - var rng3 = require_rng(); + var rng2 = require_rng(); var bytesToUuid = require_bytesToUuid(); - var _nodeId3; - var _clockseq3; - var _lastMSecs3 = 0; - var _lastNSecs3 = 0; - function v13(options, buf, offset) { + var _nodeId2; + var _clockseq2; + var _lastMSecs2 = 0; + var _lastNSecs2 = 0; + function v12(options, buf, offset) { var i = buf && offset || 0; var b = buf || []; options = options || {}; - var node = options.node || _nodeId3; - var clockseq = options.clockseq !== void 0 ? options.clockseq : _clockseq3; + var node = options.node || _nodeId2; + var clockseq = options.clockseq !== void 0 ? options.clockseq : _clockseq2; if (node == null || clockseq == null) { - var seedBytes = rng3(); + var seedBytes = rng2(); if (node == null) { - node = _nodeId3 = [ + node = _nodeId2 = [ seedBytes[0] | 1, seedBytes[1], seedBytes[2], @@ -26285,24 +25695,24 @@ var require_v1 = __commonJS({ ]; } if (clockseq == null) { - clockseq = _clockseq3 = (seedBytes[6] << 8 | seedBytes[7]) & 16383; + clockseq = _clockseq2 = (seedBytes[6] << 8 | seedBytes[7]) & 16383; } } var msecs = options.msecs !== void 0 ? options.msecs : (/* @__PURE__ */ new Date()).getTime(); - var nsecs = options.nsecs !== void 0 ? options.nsecs : _lastNSecs3 + 1; - var dt = msecs - _lastMSecs3 + (nsecs - _lastNSecs3) / 1e4; + var nsecs = options.nsecs !== void 0 ? options.nsecs : _lastNSecs2 + 1; + var dt = msecs - _lastMSecs2 + (nsecs - _lastNSecs2) / 1e4; if (dt < 0 && options.clockseq === void 0) { clockseq = clockseq + 1 & 16383; } - if ((dt < 0 || msecs > _lastMSecs3) && options.nsecs === void 0) { + if ((dt < 0 || msecs > _lastMSecs2) && options.nsecs === void 0) { nsecs = 0; } if (nsecs >= 1e4) { throw new Error("uuid.v1(): Can't create more than 10M uuids/sec"); } - _lastMSecs3 = msecs; - _lastNSecs3 = nsecs; - _clockseq3 = clockseq; + _lastMSecs2 = msecs; + _lastNSecs2 = nsecs; + _clockseq2 = clockseq; msecs += 122192928e5; var tl = ((msecs & 268435455) * 1e4 + nsecs) % 4294967296; b[i++] = tl >>> 24 & 255; @@ -26321,24 +25731,24 @@ var require_v1 = __commonJS({ } return buf ? buf : bytesToUuid(b); } - __name(v13, "v1"); - module2.exports = v13; + __name(v12, "v1"); + module2.exports = v12; } }); // node_modules/uuid/v4.js var require_v4 = __commonJS({ "node_modules/uuid/v4.js"(exports2, module2) { - var rng3 = require_rng(); + var rng2 = require_rng(); var bytesToUuid = require_bytesToUuid(); - function v43(options, buf, offset) { + function v42(options, buf, offset) { var i = buf && offset || 0; if (typeof options == "string") { buf = options === "binary" ? new Array(16) : null; options = null; } options = options || {}; - var rnds = options.random || (options.rng || rng3)(); + var rnds = options.random || (options.rng || rng2)(); rnds[6] = rnds[6] & 15 | 64; rnds[8] = rnds[8] & 63 | 128; if (buf) { @@ -26348,19 +25758,19 @@ var require_v4 = __commonJS({ } return buf || bytesToUuid(rnds); } - __name(v43, "v4"); - module2.exports = v43; + __name(v42, "v4"); + module2.exports = v42; } }); // node_modules/uuid/index.js var require_uuid = __commonJS({ "node_modules/uuid/index.js"(exports2, module2) { - var v13 = require_v1(); - var v43 = require_v4(); - var uuid = v43; - uuid.v1 = v13; - uuid.v4 = v43; + var v12 = require_v1(); + var v42 = require_v4(); + var uuid = v42; + uuid.v1 = v12; + uuid.v4 = v42; module2.exports = uuid; } }); @@ -26598,8 +26008,8 @@ var require_cacheUtils = __commonJS({ function getCompressionMethod() { return __awaiter2(this, void 0, void 0, function* () { const versionOutput = yield getVersion("zstd", ["--quiet"]); - const version3 = semver2.clean(versionOutput); - core.debug(`zstd version: ${version3}`); + const version2 = semver2.clean(versionOutput); + core.debug(`zstd version: ${version2}`); if (versionOutput === "") { return constants_1.CompressionMethod.Gzip; } else { @@ -26645,348 +26055,199 @@ var require_cacheUtils = __commonJS({ } }); -// node_modules/@azure/core-http/node_modules/uuid/dist/esm-node/rng.js -function rng2() { - if (poolPtr2 > rnds8Pool2.length - 16) { - import_crypto4.default.randomFillSync(rnds8Pool2); - poolPtr2 = 0; - } - return rnds8Pool2.slice(poolPtr2, poolPtr2 += 16); -} -var import_crypto4, rnds8Pool2, poolPtr2; -var init_rng2 = __esm({ - "node_modules/@azure/core-http/node_modules/uuid/dist/esm-node/rng.js"() { - import_crypto4 = __toESM(require("crypto")); - rnds8Pool2 = new Uint8Array(256); - poolPtr2 = rnds8Pool2.length; - __name(rng2, "rng"); - } -}); - -// node_modules/@azure/core-http/node_modules/uuid/dist/esm-node/regex.js -var regex_default2; -var init_regex2 = __esm({ - "node_modules/@azure/core-http/node_modules/uuid/dist/esm-node/regex.js"() { - regex_default2 = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i; - } -}); - -// node_modules/@azure/core-http/node_modules/uuid/dist/esm-node/validate.js -function validate2(uuid) { - return typeof uuid === "string" && regex_default2.test(uuid); -} -var validate_default2; -var init_validate2 = __esm({ - "node_modules/@azure/core-http/node_modules/uuid/dist/esm-node/validate.js"() { - init_regex2(); - __name(validate2, "validate"); - validate_default2 = validate2; - } -}); - -// node_modules/@azure/core-http/node_modules/uuid/dist/esm-node/stringify.js -function stringify2(arr, offset = 0) { - const uuid = (byteToHex2[arr[offset + 0]] + byteToHex2[arr[offset + 1]] + byteToHex2[arr[offset + 2]] + byteToHex2[arr[offset + 3]] + "-" + byteToHex2[arr[offset + 4]] + byteToHex2[arr[offset + 5]] + "-" + byteToHex2[arr[offset + 6]] + byteToHex2[arr[offset + 7]] + "-" + byteToHex2[arr[offset + 8]] + byteToHex2[arr[offset + 9]] + "-" + byteToHex2[arr[offset + 10]] + byteToHex2[arr[offset + 11]] + byteToHex2[arr[offset + 12]] + byteToHex2[arr[offset + 13]] + byteToHex2[arr[offset + 14]] + byteToHex2[arr[offset + 15]]).toLowerCase(); - if (!validate_default2(uuid)) { - throw TypeError("Stringified UUID is invalid"); - } - return uuid; -} -var byteToHex2, stringify_default2; -var init_stringify2 = __esm({ - "node_modules/@azure/core-http/node_modules/uuid/dist/esm-node/stringify.js"() { - init_validate2(); - byteToHex2 = []; - for (let i = 0; i < 256; ++i) { - byteToHex2.push((i + 256).toString(16).substr(1)); - } - __name(stringify2, "stringify"); - stringify_default2 = stringify2; - } -}); - -// node_modules/@azure/core-http/node_modules/uuid/dist/esm-node/v1.js -function v12(options, buf, offset) { - let i = buf && offset || 0; - const b = buf || new Array(16); - options = options || {}; - let node = options.node || _nodeId2; - let clockseq = options.clockseq !== void 0 ? options.clockseq : _clockseq2; - if (node == null || clockseq == null) { - const seedBytes = options.random || (options.rng || rng2)(); - if (node == null) { - node = _nodeId2 = [seedBytes[0] | 1, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]]; - } - if (clockseq == null) { - clockseq = _clockseq2 = (seedBytes[6] << 8 | seedBytes[7]) & 16383; - } - } - let msecs = options.msecs !== void 0 ? options.msecs : Date.now(); - let nsecs = options.nsecs !== void 0 ? options.nsecs : _lastNSecs2 + 1; - const dt = msecs - _lastMSecs2 + (nsecs - _lastNSecs2) / 1e4; - if (dt < 0 && options.clockseq === void 0) { - clockseq = clockseq + 1 & 16383; - } - if ((dt < 0 || msecs > _lastMSecs2) && options.nsecs === void 0) { - nsecs = 0; - } - if (nsecs >= 1e4) { - throw new Error("uuid.v1(): Can't create more than 10M uuids/sec"); - } - _lastMSecs2 = msecs; - _lastNSecs2 = nsecs; - _clockseq2 = clockseq; - msecs += 122192928e5; - const tl = ((msecs & 268435455) * 1e4 + nsecs) % 4294967296; - b[i++] = tl >>> 24 & 255; - b[i++] = tl >>> 16 & 255; - b[i++] = tl >>> 8 & 255; - b[i++] = tl & 255; - const tmh = msecs / 4294967296 * 1e4 & 268435455; - b[i++] = tmh >>> 8 & 255; - b[i++] = tmh & 255; - b[i++] = tmh >>> 24 & 15 | 16; - b[i++] = tmh >>> 16 & 255; - b[i++] = clockseq >>> 8 | 128; - b[i++] = clockseq & 255; - for (let n = 0; n < 6; ++n) { - b[i + n] = node[n]; - } - return buf || stringify_default2(b); -} -var _nodeId2, _clockseq2, _lastMSecs2, _lastNSecs2, v1_default2; -var init_v12 = __esm({ - "node_modules/@azure/core-http/node_modules/uuid/dist/esm-node/v1.js"() { - init_rng2(); - init_stringify2(); - _lastMSecs2 = 0; - _lastNSecs2 = 0; - __name(v12, "v1"); - v1_default2 = v12; - } -}); - -// node_modules/@azure/core-http/node_modules/uuid/dist/esm-node/parse.js -function parse2(uuid) { - if (!validate_default2(uuid)) { - throw TypeError("Invalid UUID"); - } - let v; - const arr = new Uint8Array(16); - arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24; - arr[1] = v >>> 16 & 255; - arr[2] = v >>> 8 & 255; - arr[3] = v & 255; - arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8; - arr[5] = v & 255; - arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8; - arr[7] = v & 255; - arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8; - arr[9] = v & 255; - arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 1099511627776 & 255; - arr[11] = v / 4294967296 & 255; - arr[12] = v >>> 24 & 255; - arr[13] = v >>> 16 & 255; - arr[14] = v >>> 8 & 255; - arr[15] = v & 255; - return arr; -} -var parse_default2; -var init_parse2 = __esm({ - "node_modules/@azure/core-http/node_modules/uuid/dist/esm-node/parse.js"() { - init_validate2(); - __name(parse2, "parse"); - parse_default2 = parse2; - } -}); - -// node_modules/@azure/core-http/node_modules/uuid/dist/esm-node/v35.js -function stringToBytes2(str) { - str = unescape(encodeURIComponent(str)); - const bytes = []; - for (let i = 0; i < str.length; ++i) { - bytes.push(str.charCodeAt(i)); - } - return bytes; -} -function v35_default2(name, version3, hashfunc) { - function generateUUID(value, namespace, buf, offset) { - if (typeof value === "string") { - value = stringToBytes2(value); - } - if (typeof namespace === "string") { - namespace = parse_default2(namespace); - } - if (namespace.length !== 16) { - throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)"); - } - let bytes = new Uint8Array(16 + value.length); - bytes.set(namespace); - bytes.set(value, namespace.length); - bytes = hashfunc(bytes); - bytes[6] = bytes[6] & 15 | version3; - bytes[8] = bytes[8] & 63 | 128; - if (buf) { - offset = offset || 0; - for (let i = 0; i < 16; ++i) { - buf[offset + i] = bytes[i]; +// node_modules/@azure/core-rest-pipeline/dist/commonjs/pipeline.js +var require_pipeline = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/pipeline.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createEmptyPipeline = createEmptyPipeline; + var ValidPhaseNames = /* @__PURE__ */ new Set(["Deserialize", "Serialize", "Retry", "Sign"]); + var HttpPipeline = class _HttpPipeline { + static { + __name(this, "HttpPipeline"); } - return buf; + constructor(policies) { + var _a; + this._policies = []; + this._policies = (_a = policies === null || policies === void 0 ? void 0 : policies.slice(0)) !== null && _a !== void 0 ? _a : []; + this._orderedPolicies = void 0; + } + addPolicy(policy, options = {}) { + if (options.phase && options.afterPhase) { + throw new Error("Policies inside a phase cannot specify afterPhase."); + } + if (options.phase && !ValidPhaseNames.has(options.phase)) { + throw new Error(`Invalid phase name: ${options.phase}`); + } + if (options.afterPhase && !ValidPhaseNames.has(options.afterPhase)) { + throw new Error(`Invalid afterPhase name: ${options.afterPhase}`); + } + this._policies.push({ + policy, + options + }); + this._orderedPolicies = void 0; + } + removePolicy(options) { + const removedPolicies = []; + this._policies = this._policies.filter((policyDescriptor) => { + if (options.name && policyDescriptor.policy.name === options.name || options.phase && policyDescriptor.options.phase === options.phase) { + removedPolicies.push(policyDescriptor.policy); + return false; + } else { + return true; + } + }); + this._orderedPolicies = void 0; + return removedPolicies; + } + sendRequest(httpClient, request) { + const policies = this.getOrderedPolicies(); + const pipeline = policies.reduceRight((next, policy) => { + return (req) => { + return policy.sendRequest(req, next); + }; + }, (req) => httpClient.sendRequest(req)); + return pipeline(request); + } + getOrderedPolicies() { + if (!this._orderedPolicies) { + this._orderedPolicies = this.orderPolicies(); + } + return this._orderedPolicies; + } + clone() { + return new _HttpPipeline(this._policies); + } + static create() { + return new _HttpPipeline(); + } + orderPolicies() { + const result = []; + const policyMap = /* @__PURE__ */ new Map(); + function createPhase(name) { + return { + name, + policies: /* @__PURE__ */ new Set(), + hasRun: false, + hasAfterPolicies: false + }; + } + __name(createPhase, "createPhase"); + const serializePhase = createPhase("Serialize"); + const noPhase = createPhase("None"); + const deserializePhase = createPhase("Deserialize"); + const retryPhase = createPhase("Retry"); + const signPhase = createPhase("Sign"); + const orderedPhases = [serializePhase, noPhase, deserializePhase, retryPhase, signPhase]; + function getPhase(phase) { + if (phase === "Retry") { + return retryPhase; + } else if (phase === "Serialize") { + return serializePhase; + } else if (phase === "Deserialize") { + return deserializePhase; + } else if (phase === "Sign") { + return signPhase; + } else { + return noPhase; + } + } + __name(getPhase, "getPhase"); + for (const descriptor of this._policies) { + const policy = descriptor.policy; + const options = descriptor.options; + const policyName = policy.name; + if (policyMap.has(policyName)) { + throw new Error("Duplicate policy names not allowed in pipeline"); + } + const node = { + policy, + dependsOn: /* @__PURE__ */ new Set(), + dependants: /* @__PURE__ */ new Set() + }; + if (options.afterPhase) { + node.afterPhase = getPhase(options.afterPhase); + node.afterPhase.hasAfterPolicies = true; + } + policyMap.set(policyName, node); + const phase = getPhase(options.phase); + phase.policies.add(node); + } + for (const descriptor of this._policies) { + const { policy, options } = descriptor; + const policyName = policy.name; + const node = policyMap.get(policyName); + if (!node) { + throw new Error(`Missing node for policy ${policyName}`); + } + if (options.afterPolicies) { + for (const afterPolicyName of options.afterPolicies) { + const afterNode = policyMap.get(afterPolicyName); + if (afterNode) { + node.dependsOn.add(afterNode); + afterNode.dependants.add(node); + } + } + } + if (options.beforePolicies) { + for (const beforePolicyName of options.beforePolicies) { + const beforeNode = policyMap.get(beforePolicyName); + if (beforeNode) { + beforeNode.dependsOn.add(node); + node.dependants.add(beforeNode); + } + } + } + } + function walkPhase(phase) { + phase.hasRun = true; + for (const node of phase.policies) { + if (node.afterPhase && (!node.afterPhase.hasRun || node.afterPhase.policies.size)) { + continue; + } + if (node.dependsOn.size === 0) { + result.push(node.policy); + for (const dependant of node.dependants) { + dependant.dependsOn.delete(node); + } + policyMap.delete(node.policy.name); + phase.policies.delete(node); + } + } + } + __name(walkPhase, "walkPhase"); + function walkPhases() { + for (const phase of orderedPhases) { + walkPhase(phase); + if (phase.policies.size > 0 && phase !== noPhase) { + if (!noPhase.hasRun) { + walkPhase(noPhase); + } + return; + } + if (phase.hasAfterPolicies) { + walkPhase(noPhase); + } + } + } + __name(walkPhases, "walkPhases"); + let iteration = 0; + while (policyMap.size > 0) { + iteration++; + const initialResultLength = result.length; + walkPhases(); + if (result.length <= initialResultLength && iteration > 1) { + throw new Error("Cannot satisfy policy dependencies due to requirements cycle."); + } + } + return result; + } + }; + function createEmptyPipeline() { + return HttpPipeline.create(); } - return stringify_default2(bytes); - } - __name(generateUUID, "generateUUID"); - try { - generateUUID.name = name; - } catch (err) { - } - generateUUID.DNS = DNS2; - generateUUID.URL = URL3; - return generateUUID; -} -var DNS2, URL3; -var init_v352 = __esm({ - "node_modules/@azure/core-http/node_modules/uuid/dist/esm-node/v35.js"() { - init_stringify2(); - init_parse2(); - __name(stringToBytes2, "stringToBytes"); - DNS2 = "6ba7b810-9dad-11d1-80b4-00c04fd430c8"; - URL3 = "6ba7b811-9dad-11d1-80b4-00c04fd430c8"; - __name(v35_default2, "default"); - } -}); - -// node_modules/@azure/core-http/node_modules/uuid/dist/esm-node/md5.js -function md52(bytes) { - if (Array.isArray(bytes)) { - bytes = Buffer.from(bytes); - } else if (typeof bytes === "string") { - bytes = Buffer.from(bytes, "utf8"); - } - return import_crypto5.default.createHash("md5").update(bytes).digest(); -} -var import_crypto5, md5_default2; -var init_md52 = __esm({ - "node_modules/@azure/core-http/node_modules/uuid/dist/esm-node/md5.js"() { - import_crypto5 = __toESM(require("crypto")); - __name(md52, "md5"); - md5_default2 = md52; - } -}); - -// node_modules/@azure/core-http/node_modules/uuid/dist/esm-node/v3.js -var v32, v3_default2; -var init_v32 = __esm({ - "node_modules/@azure/core-http/node_modules/uuid/dist/esm-node/v3.js"() { - init_v352(); - init_md52(); - v32 = v35_default2("v3", 48, md5_default2); - v3_default2 = v32; - } -}); - -// node_modules/@azure/core-http/node_modules/uuid/dist/esm-node/v4.js -function v42(options, buf, offset) { - options = options || {}; - const rnds = options.random || (options.rng || rng2)(); - rnds[6] = rnds[6] & 15 | 64; - rnds[8] = rnds[8] & 63 | 128; - if (buf) { - offset = offset || 0; - for (let i = 0; i < 16; ++i) { - buf[offset + i] = rnds[i]; - } - return buf; - } - return stringify_default2(rnds); -} -var v4_default2; -var init_v42 = __esm({ - "node_modules/@azure/core-http/node_modules/uuid/dist/esm-node/v4.js"() { - init_rng2(); - init_stringify2(); - __name(v42, "v4"); - v4_default2 = v42; - } -}); - -// node_modules/@azure/core-http/node_modules/uuid/dist/esm-node/sha1.js -function sha12(bytes) { - if (Array.isArray(bytes)) { - bytes = Buffer.from(bytes); - } else if (typeof bytes === "string") { - bytes = Buffer.from(bytes, "utf8"); - } - return import_crypto6.default.createHash("sha1").update(bytes).digest(); -} -var import_crypto6, sha1_default2; -var init_sha12 = __esm({ - "node_modules/@azure/core-http/node_modules/uuid/dist/esm-node/sha1.js"() { - import_crypto6 = __toESM(require("crypto")); - __name(sha12, "sha1"); - sha1_default2 = sha12; - } -}); - -// node_modules/@azure/core-http/node_modules/uuid/dist/esm-node/v5.js -var v52, v5_default2; -var init_v52 = __esm({ - "node_modules/@azure/core-http/node_modules/uuid/dist/esm-node/v5.js"() { - init_v352(); - init_sha12(); - v52 = v35_default2("v5", 80, sha1_default2); - v5_default2 = v52; - } -}); - -// node_modules/@azure/core-http/node_modules/uuid/dist/esm-node/nil.js -var nil_default2; -var init_nil2 = __esm({ - "node_modules/@azure/core-http/node_modules/uuid/dist/esm-node/nil.js"() { - nil_default2 = "00000000-0000-0000-0000-000000000000"; - } -}); - -// node_modules/@azure/core-http/node_modules/uuid/dist/esm-node/version.js -function version2(uuid) { - if (!validate_default2(uuid)) { - throw TypeError("Invalid UUID"); - } - return parseInt(uuid.substr(14, 1), 16); -} -var version_default2; -var init_version2 = __esm({ - "node_modules/@azure/core-http/node_modules/uuid/dist/esm-node/version.js"() { - init_validate2(); - __name(version2, "version"); - version_default2 = version2; - } -}); - -// node_modules/@azure/core-http/node_modules/uuid/dist/esm-node/index.js -var esm_node_exports2 = {}; -__export(esm_node_exports2, { - NIL: () => nil_default2, - parse: () => parse_default2, - stringify: () => stringify_default2, - v1: () => v1_default2, - v3: () => v3_default2, - v4: () => v4_default2, - v5: () => v5_default2, - validate: () => validate_default2, - version: () => version_default2 -}); -var init_esm_node2 = __esm({ - "node_modules/@azure/core-http/node_modules/uuid/dist/esm-node/index.js"() { - init_v12(); - init_v32(); - init_v42(); - init_v52(); - init_nil2(); - init_version2(); - init_validate2(); - init_stringify2(); - init_parse2(); + __name(createEmptyPipeline, "createEmptyPipeline"); } }); @@ -27075,17 +26336,17 @@ function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, e var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {}); var _, done = false; for (var i = decorators.length - 1; i >= 0; i--) { - var context2 = {}; + var context = {}; for (var p in contextIn) - context2[p] = p === "access" ? {} : contextIn[p]; + context[p] = p === "access" ? {} : contextIn[p]; for (var p in contextIn.access) - context2.access[p] = contextIn.access[p]; - context2.addInitializer = function(f) { + context.access[p] = contextIn.access[p]; + context.addInitializer = function(f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); }; - var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context2); + var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context); if (kind === "accessor") { if (result === void 0) continue; @@ -27163,8 +26424,8 @@ function __generator(thisArg, body) { if (t[0] & 1) throw t[1]; return t[1]; - }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { + }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); + return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; function verb(n) { @@ -27307,16 +26568,25 @@ function __asyncGenerator(thisArg, _arguments, generator) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var g = generator.apply(thisArg, _arguments || []), i, q = []; - return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { + return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function() { return this; }, i; - function verb(n) { - if (g[n]) + function awaitReturn(f) { + return function(v) { + return Promise.resolve(v).then(f, reject); + }; + } + __name(awaitReturn, "awaitReturn"); + function verb(n, f) { + if (g[n]) { i[n] = function(v) { return new Promise(function(a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; + if (f) + i[n] = f(i[n]); + } } __name(verb, "verb"); function resume(n, v) { @@ -27429,7 +26699,7 @@ function __addDisposableResource(env, value, async) { if (value !== null && value !== void 0) { if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected."); - var dispose; + var dispose, inner; if (async) { if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined."); @@ -27439,9 +26709,19 @@ function __addDisposableResource(env, value, async) { if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined."); dispose = value[Symbol.dispose]; + if (async) + inner = dispose; } if (typeof dispose !== "function") throw new TypeError("Object not disposable."); + if (inner) + dispose = /* @__PURE__ */ __name(function() { + try { + inner.call(this); + } catch (e) { + return Promise.reject(e); + } + }, "dispose"); env.stack.push({ value, dispose, async }); } else if (async) { env.stack.push({ async: true }); @@ -27454,20 +26734,27 @@ function __disposeResources(env) { env.hasError = true; } __name(fail, "fail"); + var r, s = 0; function next() { - while (env.stack.length) { - var rec = env.stack.pop(); + while (r = env.stack.pop()) { try { - var result = rec.dispose && rec.dispose.call(rec.value); - if (rec.async) - return Promise.resolve(result).then(next, function(e) { - fail(e); - return next(); - }); + if (!r.async && s === 1) + return s = 0, env.stack.push(r), Promise.resolve().then(next); + if (r.dispose) { + var result = r.dispose.call(r.value); + if (r.async) + return s |= 2, Promise.resolve(result).then(next, function(e) { + fail(e); + return next(); + }); + } else + s |= 1; } catch (e) { fail(e); } } + if (s === 1) + return env.hasError ? Promise.reject(env.error) : Promise.resolve(); if (env.hasError) throw env.error; } @@ -27584,6415 +26871,12 @@ var init_tslib_es6 = __esm({ } }); -// node_modules/xml2js/lib/defaults.js -var require_defaults = __commonJS({ - "node_modules/xml2js/lib/defaults.js"(exports2) { - (function() { - exports2.defaults = { - "0.1": { - explicitCharkey: false, - trim: true, - normalize: true, - normalizeTags: false, - attrkey: "@", - charkey: "#", - explicitArray: false, - ignoreAttrs: false, - mergeAttrs: false, - explicitRoot: false, - validator: null, - xmlns: false, - explicitChildren: false, - childkey: "@@", - charsAsChildren: false, - includeWhiteChars: false, - async: false, - strict: true, - attrNameProcessors: null, - attrValueProcessors: null, - tagNameProcessors: null, - valueProcessors: null, - emptyTag: "" - }, - "0.2": { - explicitCharkey: false, - trim: false, - normalize: false, - normalizeTags: false, - attrkey: "$", - charkey: "_", - explicitArray: true, - ignoreAttrs: false, - mergeAttrs: false, - explicitRoot: true, - validator: null, - xmlns: false, - explicitChildren: false, - preserveChildrenOrder: false, - childkey: "$$", - charsAsChildren: false, - includeWhiteChars: false, - async: false, - strict: true, - attrNameProcessors: null, - attrValueProcessors: null, - tagNameProcessors: null, - valueProcessors: null, - rootName: "root", - xmldec: { - "version": "1.0", - "encoding": "UTF-8", - "standalone": true - }, - doctype: null, - renderOpts: { - "pretty": true, - "indent": " ", - "newline": "\n" - }, - headless: false, - chunkSize: 1e4, - emptyTag: "", - cdata: false - } - }; - }).call(exports2); - } -}); - -// node_modules/xmlbuilder/lib/Utility.js -var require_Utility = __commonJS({ - "node_modules/xmlbuilder/lib/Utility.js"(exports2, module2) { - (function() { - var assign, getValue, isArray, isEmpty, isFunction, isObject, isPlainObject, slice = [].slice, hasProp = {}.hasOwnProperty; - assign = /* @__PURE__ */ __name(function() { - var i, key, len, source, sources, target; - target = arguments[0], sources = 2 <= arguments.length ? slice.call(arguments, 1) : []; - if (isFunction(Object.assign)) { - Object.assign.apply(null, arguments); - } else { - for (i = 0, len = sources.length; i < len; i++) { - source = sources[i]; - if (source != null) { - for (key in source) { - if (!hasProp.call(source, key)) - continue; - target[key] = source[key]; - } - } - } - } - return target; - }, "assign"); - isFunction = /* @__PURE__ */ __name(function(val) { - return !!val && Object.prototype.toString.call(val) === "[object Function]"; - }, "isFunction"); - isObject = /* @__PURE__ */ __name(function(val) { - var ref; - return !!val && ((ref = typeof val) === "function" || ref === "object"); - }, "isObject"); - isArray = /* @__PURE__ */ __name(function(val) { - if (isFunction(Array.isArray)) { - return Array.isArray(val); - } else { - return Object.prototype.toString.call(val) === "[object Array]"; - } - }, "isArray"); - isEmpty = /* @__PURE__ */ __name(function(val) { - var key; - if (isArray(val)) { - return !val.length; - } else { - for (key in val) { - if (!hasProp.call(val, key)) - continue; - return false; - } - return true; - } - }, "isEmpty"); - isPlainObject = /* @__PURE__ */ __name(function(val) { - var ctor, proto; - return isObject(val) && (proto = Object.getPrototypeOf(val)) && (ctor = proto.constructor) && typeof ctor === "function" && ctor instanceof ctor && Function.prototype.toString.call(ctor) === Function.prototype.toString.call(Object); - }, "isPlainObject"); - getValue = /* @__PURE__ */ __name(function(obj) { - if (isFunction(obj.valueOf)) { - return obj.valueOf(); - } else { - return obj; - } - }, "getValue"); - module2.exports.assign = assign; - module2.exports.isFunction = isFunction; - module2.exports.isObject = isObject; - module2.exports.isArray = isArray; - module2.exports.isEmpty = isEmpty; - module2.exports.isPlainObject = isPlainObject; - module2.exports.getValue = getValue; - }).call(exports2); - } -}); - -// node_modules/xmlbuilder/lib/XMLDOMImplementation.js -var require_XMLDOMImplementation = __commonJS({ - "node_modules/xmlbuilder/lib/XMLDOMImplementation.js"(exports2, module2) { - (function() { - var XMLDOMImplementation; - module2.exports = XMLDOMImplementation = function() { - function XMLDOMImplementation2() { - } - __name(XMLDOMImplementation2, "XMLDOMImplementation"); - XMLDOMImplementation2.prototype.hasFeature = function(feature, version3) { - return true; - }; - XMLDOMImplementation2.prototype.createDocumentType = function(qualifiedName, publicId, systemId) { - throw new Error("This DOM method is not implemented."); - }; - XMLDOMImplementation2.prototype.createDocument = function(namespaceURI, qualifiedName, doctype) { - throw new Error("This DOM method is not implemented."); - }; - XMLDOMImplementation2.prototype.createHTMLDocument = function(title) { - throw new Error("This DOM method is not implemented."); - }; - XMLDOMImplementation2.prototype.getFeature = function(feature, version3) { - throw new Error("This DOM method is not implemented."); - }; - return XMLDOMImplementation2; - }(); - }).call(exports2); - } -}); - -// node_modules/xmlbuilder/lib/XMLDOMErrorHandler.js -var require_XMLDOMErrorHandler = __commonJS({ - "node_modules/xmlbuilder/lib/XMLDOMErrorHandler.js"(exports2, module2) { - (function() { - var XMLDOMErrorHandler; - module2.exports = XMLDOMErrorHandler = function() { - function XMLDOMErrorHandler2() { - } - __name(XMLDOMErrorHandler2, "XMLDOMErrorHandler"); - XMLDOMErrorHandler2.prototype.handleError = function(error) { - throw new Error(error); - }; - return XMLDOMErrorHandler2; - }(); - }).call(exports2); - } -}); - -// node_modules/xmlbuilder/lib/XMLDOMStringList.js -var require_XMLDOMStringList = __commonJS({ - "node_modules/xmlbuilder/lib/XMLDOMStringList.js"(exports2, module2) { - (function() { - var XMLDOMStringList; - module2.exports = XMLDOMStringList = function() { - function XMLDOMStringList2(arr) { - this.arr = arr || []; - } - __name(XMLDOMStringList2, "XMLDOMStringList"); - Object.defineProperty(XMLDOMStringList2.prototype, "length", { - get: function() { - return this.arr.length; - } - }); - XMLDOMStringList2.prototype.item = function(index) { - return this.arr[index] || null; - }; - XMLDOMStringList2.prototype.contains = function(str) { - return this.arr.indexOf(str) !== -1; - }; - return XMLDOMStringList2; - }(); - }).call(exports2); - } -}); - -// node_modules/xmlbuilder/lib/XMLDOMConfiguration.js -var require_XMLDOMConfiguration = __commonJS({ - "node_modules/xmlbuilder/lib/XMLDOMConfiguration.js"(exports2, module2) { - (function() { - var XMLDOMConfiguration, XMLDOMErrorHandler, XMLDOMStringList; - XMLDOMErrorHandler = require_XMLDOMErrorHandler(); - XMLDOMStringList = require_XMLDOMStringList(); - module2.exports = XMLDOMConfiguration = function() { - function XMLDOMConfiguration2() { - var clonedSelf; - this.defaultParams = { - "canonical-form": false, - "cdata-sections": false, - "comments": false, - "datatype-normalization": false, - "element-content-whitespace": true, - "entities": true, - "error-handler": new XMLDOMErrorHandler(), - "infoset": true, - "validate-if-schema": false, - "namespaces": true, - "namespace-declarations": true, - "normalize-characters": false, - "schema-location": "", - "schema-type": "", - "split-cdata-sections": true, - "validate": false, - "well-formed": true - }; - this.params = clonedSelf = Object.create(this.defaultParams); - } - __name(XMLDOMConfiguration2, "XMLDOMConfiguration"); - Object.defineProperty(XMLDOMConfiguration2.prototype, "parameterNames", { - get: function() { - return new XMLDOMStringList(Object.keys(this.defaultParams)); - } - }); - XMLDOMConfiguration2.prototype.getParameter = function(name) { - if (this.params.hasOwnProperty(name)) { - return this.params[name]; - } else { - return null; - } - }; - XMLDOMConfiguration2.prototype.canSetParameter = function(name, value) { - return true; - }; - XMLDOMConfiguration2.prototype.setParameter = function(name, value) { - if (value != null) { - return this.params[name] = value; - } else { - return delete this.params[name]; - } - }; - return XMLDOMConfiguration2; - }(); - }).call(exports2); - } -}); - -// node_modules/xmlbuilder/lib/NodeType.js -var require_NodeType = __commonJS({ - "node_modules/xmlbuilder/lib/NodeType.js"(exports2, module2) { - (function() { - module2.exports = { - Element: 1, - Attribute: 2, - Text: 3, - CData: 4, - EntityReference: 5, - EntityDeclaration: 6, - ProcessingInstruction: 7, - Comment: 8, - Document: 9, - DocType: 10, - DocumentFragment: 11, - NotationDeclaration: 12, - Declaration: 201, - Raw: 202, - AttributeDeclaration: 203, - ElementDeclaration: 204, - Dummy: 205 - }; - }).call(exports2); - } -}); - -// node_modules/xmlbuilder/lib/XMLAttribute.js -var require_XMLAttribute = __commonJS({ - "node_modules/xmlbuilder/lib/XMLAttribute.js"(exports2, module2) { - (function() { - var NodeType, XMLAttribute, XMLNode; - NodeType = require_NodeType(); - XMLNode = require_XMLNode(); - module2.exports = XMLAttribute = function() { - function XMLAttribute2(parent, name, value) { - this.parent = parent; - if (this.parent) { - this.options = this.parent.options; - this.stringify = this.parent.stringify; - } - if (name == null) { - throw new Error("Missing attribute name. " + this.debugInfo(name)); - } - this.name = this.stringify.name(name); - this.value = this.stringify.attValue(value); - this.type = NodeType.Attribute; - this.isId = false; - this.schemaTypeInfo = null; - } - __name(XMLAttribute2, "XMLAttribute"); - Object.defineProperty(XMLAttribute2.prototype, "nodeType", { - get: function() { - return this.type; - } - }); - Object.defineProperty(XMLAttribute2.prototype, "ownerElement", { - get: function() { - return this.parent; - } - }); - Object.defineProperty(XMLAttribute2.prototype, "textContent", { - get: function() { - return this.value; - }, - set: function(value) { - return this.value = value || ""; - } - }); - Object.defineProperty(XMLAttribute2.prototype, "namespaceURI", { - get: function() { - return ""; - } - }); - Object.defineProperty(XMLAttribute2.prototype, "prefix", { - get: function() { - return ""; - } - }); - Object.defineProperty(XMLAttribute2.prototype, "localName", { - get: function() { - return this.name; - } - }); - Object.defineProperty(XMLAttribute2.prototype, "specified", { - get: function() { - return true; - } - }); - XMLAttribute2.prototype.clone = function() { - return Object.create(this); - }; - XMLAttribute2.prototype.toString = function(options) { - return this.options.writer.attribute(this, this.options.writer.filterOptions(options)); - }; - XMLAttribute2.prototype.debugInfo = function(name) { - name = name || this.name; - if (name == null) { - return "parent: <" + this.parent.name + ">"; - } else { - return "attribute: {" + name + "}, parent: <" + this.parent.name + ">"; - } - }; - XMLAttribute2.prototype.isEqualNode = function(node) { - if (node.namespaceURI !== this.namespaceURI) { - return false; - } - if (node.prefix !== this.prefix) { - return false; - } - if (node.localName !== this.localName) { - return false; - } - if (node.value !== this.value) { - return false; - } - return true; - }; - return XMLAttribute2; - }(); - }).call(exports2); - } -}); - -// node_modules/xmlbuilder/lib/XMLNamedNodeMap.js -var require_XMLNamedNodeMap = __commonJS({ - "node_modules/xmlbuilder/lib/XMLNamedNodeMap.js"(exports2, module2) { - (function() { - var XMLNamedNodeMap; - module2.exports = XMLNamedNodeMap = function() { - function XMLNamedNodeMap2(nodes) { - this.nodes = nodes; - } - __name(XMLNamedNodeMap2, "XMLNamedNodeMap"); - Object.defineProperty(XMLNamedNodeMap2.prototype, "length", { - get: function() { - return Object.keys(this.nodes).length || 0; - } - }); - XMLNamedNodeMap2.prototype.clone = function() { - return this.nodes = null; - }; - XMLNamedNodeMap2.prototype.getNamedItem = function(name) { - return this.nodes[name]; - }; - XMLNamedNodeMap2.prototype.setNamedItem = function(node) { - var oldNode; - oldNode = this.nodes[node.nodeName]; - this.nodes[node.nodeName] = node; - return oldNode || null; - }; - XMLNamedNodeMap2.prototype.removeNamedItem = function(name) { - var oldNode; - oldNode = this.nodes[name]; - delete this.nodes[name]; - return oldNode || null; - }; - XMLNamedNodeMap2.prototype.item = function(index) { - return this.nodes[Object.keys(this.nodes)[index]] || null; - }; - XMLNamedNodeMap2.prototype.getNamedItemNS = function(namespaceURI, localName) { - throw new Error("This DOM method is not implemented."); - }; - XMLNamedNodeMap2.prototype.setNamedItemNS = function(node) { - throw new Error("This DOM method is not implemented."); - }; - XMLNamedNodeMap2.prototype.removeNamedItemNS = function(namespaceURI, localName) { - throw new Error("This DOM method is not implemented."); - }; - return XMLNamedNodeMap2; - }(); - }).call(exports2); - } -}); - -// node_modules/xmlbuilder/lib/XMLElement.js -var require_XMLElement = __commonJS({ - "node_modules/xmlbuilder/lib/XMLElement.js"(exports2, module2) { - (function() { - var NodeType, XMLAttribute, XMLElement, XMLNamedNodeMap, XMLNode, getValue, isFunction, isObject, ref, extend = /* @__PURE__ */ __name(function(child, parent) { - for (var key in parent) { - if (hasProp.call(parent, key)) - child[key] = parent[key]; - } - function ctor() { - this.constructor = child; - } - __name(ctor, "ctor"); - ctor.prototype = parent.prototype; - child.prototype = new ctor(); - child.__super__ = parent.prototype; - return child; - }, "extend"), hasProp = {}.hasOwnProperty; - ref = require_Utility(), isObject = ref.isObject, isFunction = ref.isFunction, getValue = ref.getValue; - XMLNode = require_XMLNode(); - NodeType = require_NodeType(); - XMLAttribute = require_XMLAttribute(); - XMLNamedNodeMap = require_XMLNamedNodeMap(); - module2.exports = XMLElement = function(superClass) { - extend(XMLElement2, superClass); - function XMLElement2(parent, name, attributes) { - var child, j, len, ref1; - XMLElement2.__super__.constructor.call(this, parent); - if (name == null) { - throw new Error("Missing element name. " + this.debugInfo()); - } - this.name = this.stringify.name(name); - this.type = NodeType.Element; - this.attribs = {}; - this.schemaTypeInfo = null; - if (attributes != null) { - this.attribute(attributes); - } - if (parent.type === NodeType.Document) { - this.isRoot = true; - this.documentObject = parent; - parent.rootObject = this; - if (parent.children) { - ref1 = parent.children; - for (j = 0, len = ref1.length; j < len; j++) { - child = ref1[j]; - if (child.type === NodeType.DocType) { - child.name = this.name; - break; - } - } - } - } - } - __name(XMLElement2, "XMLElement"); - Object.defineProperty(XMLElement2.prototype, "tagName", { - get: function() { - return this.name; - } - }); - Object.defineProperty(XMLElement2.prototype, "namespaceURI", { - get: function() { - return ""; - } - }); - Object.defineProperty(XMLElement2.prototype, "prefix", { - get: function() { - return ""; - } - }); - Object.defineProperty(XMLElement2.prototype, "localName", { - get: function() { - return this.name; - } - }); - Object.defineProperty(XMLElement2.prototype, "id", { - get: function() { - throw new Error("This DOM method is not implemented." + this.debugInfo()); - } - }); - Object.defineProperty(XMLElement2.prototype, "className", { - get: function() { - throw new Error("This DOM method is not implemented." + this.debugInfo()); - } - }); - Object.defineProperty(XMLElement2.prototype, "classList", { - get: function() { - throw new Error("This DOM method is not implemented." + this.debugInfo()); - } - }); - Object.defineProperty(XMLElement2.prototype, "attributes", { - get: function() { - if (!this.attributeMap || !this.attributeMap.nodes) { - this.attributeMap = new XMLNamedNodeMap(this.attribs); - } - return this.attributeMap; - } - }); - XMLElement2.prototype.clone = function() { - var att, attName, clonedSelf, ref1; - clonedSelf = Object.create(this); - if (clonedSelf.isRoot) { - clonedSelf.documentObject = null; - } - clonedSelf.attribs = {}; - ref1 = this.attribs; - for (attName in ref1) { - if (!hasProp.call(ref1, attName)) - continue; - att = ref1[attName]; - clonedSelf.attribs[attName] = att.clone(); - } - clonedSelf.children = []; - this.children.forEach(function(child) { - var clonedChild; - clonedChild = child.clone(); - clonedChild.parent = clonedSelf; - return clonedSelf.children.push(clonedChild); - }); - return clonedSelf; - }; - XMLElement2.prototype.attribute = function(name, value) { - var attName, attValue; - if (name != null) { - name = getValue(name); - } - if (isObject(name)) { - for (attName in name) { - if (!hasProp.call(name, attName)) - continue; - attValue = name[attName]; - this.attribute(attName, attValue); - } - } else { - if (isFunction(value)) { - value = value.apply(); - } - if (this.options.keepNullAttributes && value == null) { - this.attribs[name] = new XMLAttribute(this, name, ""); - } else if (value != null) { - this.attribs[name] = new XMLAttribute(this, name, value); - } - } - return this; - }; - XMLElement2.prototype.removeAttribute = function(name) { - var attName, j, len; - if (name == null) { - throw new Error("Missing attribute name. " + this.debugInfo()); - } - name = getValue(name); - if (Array.isArray(name)) { - for (j = 0, len = name.length; j < len; j++) { - attName = name[j]; - delete this.attribs[attName]; - } - } else { - delete this.attribs[name]; - } - return this; - }; - XMLElement2.prototype.toString = function(options) { - return this.options.writer.element(this, this.options.writer.filterOptions(options)); - }; - XMLElement2.prototype.att = function(name, value) { - return this.attribute(name, value); - }; - XMLElement2.prototype.a = function(name, value) { - return this.attribute(name, value); - }; - XMLElement2.prototype.getAttribute = function(name) { - if (this.attribs.hasOwnProperty(name)) { - return this.attribs[name].value; - } else { - return null; - } - }; - XMLElement2.prototype.setAttribute = function(name, value) { - throw new Error("This DOM method is not implemented." + this.debugInfo()); - }; - XMLElement2.prototype.getAttributeNode = function(name) { - if (this.attribs.hasOwnProperty(name)) { - return this.attribs[name]; - } else { - return null; - } - }; - XMLElement2.prototype.setAttributeNode = function(newAttr) { - throw new Error("This DOM method is not implemented." + this.debugInfo()); - }; - XMLElement2.prototype.removeAttributeNode = function(oldAttr) { - throw new Error("This DOM method is not implemented." + this.debugInfo()); - }; - XMLElement2.prototype.getElementsByTagName = function(name) { - throw new Error("This DOM method is not implemented." + this.debugInfo()); - }; - XMLElement2.prototype.getAttributeNS = function(namespaceURI, localName) { - throw new Error("This DOM method is not implemented." + this.debugInfo()); - }; - XMLElement2.prototype.setAttributeNS = function(namespaceURI, qualifiedName, value) { - throw new Error("This DOM method is not implemented." + this.debugInfo()); - }; - XMLElement2.prototype.removeAttributeNS = function(namespaceURI, localName) { - throw new Error("This DOM method is not implemented." + this.debugInfo()); - }; - XMLElement2.prototype.getAttributeNodeNS = function(namespaceURI, localName) { - throw new Error("This DOM method is not implemented." + this.debugInfo()); - }; - XMLElement2.prototype.setAttributeNodeNS = function(newAttr) { - throw new Error("This DOM method is not implemented." + this.debugInfo()); - }; - XMLElement2.prototype.getElementsByTagNameNS = function(namespaceURI, localName) { - throw new Error("This DOM method is not implemented." + this.debugInfo()); - }; - XMLElement2.prototype.hasAttribute = function(name) { - return this.attribs.hasOwnProperty(name); - }; - XMLElement2.prototype.hasAttributeNS = function(namespaceURI, localName) { - throw new Error("This DOM method is not implemented." + this.debugInfo()); - }; - XMLElement2.prototype.setIdAttribute = function(name, isId) { - if (this.attribs.hasOwnProperty(name)) { - return this.attribs[name].isId; - } else { - return isId; - } - }; - XMLElement2.prototype.setIdAttributeNS = function(namespaceURI, localName, isId) { - throw new Error("This DOM method is not implemented." + this.debugInfo()); - }; - XMLElement2.prototype.setIdAttributeNode = function(idAttr, isId) { - throw new Error("This DOM method is not implemented." + this.debugInfo()); - }; - XMLElement2.prototype.getElementsByTagName = function(tagname) { - throw new Error("This DOM method is not implemented." + this.debugInfo()); - }; - XMLElement2.prototype.getElementsByTagNameNS = function(namespaceURI, localName) { - throw new Error("This DOM method is not implemented." + this.debugInfo()); - }; - XMLElement2.prototype.getElementsByClassName = function(classNames) { - throw new Error("This DOM method is not implemented." + this.debugInfo()); - }; - XMLElement2.prototype.isEqualNode = function(node) { - var i, j, ref1; - if (!XMLElement2.__super__.isEqualNode.apply(this, arguments).isEqualNode(node)) { - return false; - } - if (node.namespaceURI !== this.namespaceURI) { - return false; - } - if (node.prefix !== this.prefix) { - return false; - } - if (node.localName !== this.localName) { - return false; - } - if (node.attribs.length !== this.attribs.length) { - return false; - } - for (i = j = 0, ref1 = this.attribs.length - 1; 0 <= ref1 ? j <= ref1 : j >= ref1; i = 0 <= ref1 ? ++j : --j) { - if (!this.attribs[i].isEqualNode(node.attribs[i])) { - return false; - } - } - return true; - }; - return XMLElement2; - }(XMLNode); - }).call(exports2); - } -}); - -// node_modules/xmlbuilder/lib/XMLCharacterData.js -var require_XMLCharacterData = __commonJS({ - "node_modules/xmlbuilder/lib/XMLCharacterData.js"(exports2, module2) { - (function() { - var XMLCharacterData, XMLNode, extend = /* @__PURE__ */ __name(function(child, parent) { - for (var key in parent) { - if (hasProp.call(parent, key)) - child[key] = parent[key]; - } - function ctor() { - this.constructor = child; - } - __name(ctor, "ctor"); - ctor.prototype = parent.prototype; - child.prototype = new ctor(); - child.__super__ = parent.prototype; - return child; - }, "extend"), hasProp = {}.hasOwnProperty; - XMLNode = require_XMLNode(); - module2.exports = XMLCharacterData = function(superClass) { - extend(XMLCharacterData2, superClass); - function XMLCharacterData2(parent) { - XMLCharacterData2.__super__.constructor.call(this, parent); - this.value = ""; - } - __name(XMLCharacterData2, "XMLCharacterData"); - Object.defineProperty(XMLCharacterData2.prototype, "data", { - get: function() { - return this.value; - }, - set: function(value) { - return this.value = value || ""; - } - }); - Object.defineProperty(XMLCharacterData2.prototype, "length", { - get: function() { - return this.value.length; - } - }); - Object.defineProperty(XMLCharacterData2.prototype, "textContent", { - get: function() { - return this.value; - }, - set: function(value) { - return this.value = value || ""; - } - }); - XMLCharacterData2.prototype.clone = function() { - return Object.create(this); - }; - XMLCharacterData2.prototype.substringData = function(offset, count) { - throw new Error("This DOM method is not implemented." + this.debugInfo()); - }; - XMLCharacterData2.prototype.appendData = function(arg) { - throw new Error("This DOM method is not implemented." + this.debugInfo()); - }; - XMLCharacterData2.prototype.insertData = function(offset, arg) { - throw new Error("This DOM method is not implemented." + this.debugInfo()); - }; - XMLCharacterData2.prototype.deleteData = function(offset, count) { - throw new Error("This DOM method is not implemented." + this.debugInfo()); - }; - XMLCharacterData2.prototype.replaceData = function(offset, count, arg) { - throw new Error("This DOM method is not implemented." + this.debugInfo()); - }; - XMLCharacterData2.prototype.isEqualNode = function(node) { - if (!XMLCharacterData2.__super__.isEqualNode.apply(this, arguments).isEqualNode(node)) { - return false; - } - if (node.data !== this.data) { - return false; - } - return true; - }; - return XMLCharacterData2; - }(XMLNode); - }).call(exports2); - } -}); - -// node_modules/xmlbuilder/lib/XMLCData.js -var require_XMLCData = __commonJS({ - "node_modules/xmlbuilder/lib/XMLCData.js"(exports2, module2) { - (function() { - var NodeType, XMLCData, XMLCharacterData, extend = /* @__PURE__ */ __name(function(child, parent) { - for (var key in parent) { - if (hasProp.call(parent, key)) - child[key] = parent[key]; - } - function ctor() { - this.constructor = child; - } - __name(ctor, "ctor"); - ctor.prototype = parent.prototype; - child.prototype = new ctor(); - child.__super__ = parent.prototype; - return child; - }, "extend"), hasProp = {}.hasOwnProperty; - NodeType = require_NodeType(); - XMLCharacterData = require_XMLCharacterData(); - module2.exports = XMLCData = function(superClass) { - extend(XMLCData2, superClass); - function XMLCData2(parent, text) { - XMLCData2.__super__.constructor.call(this, parent); - if (text == null) { - throw new Error("Missing CDATA text. " + this.debugInfo()); - } - this.name = "#cdata-section"; - this.type = NodeType.CData; - this.value = this.stringify.cdata(text); - } - __name(XMLCData2, "XMLCData"); - XMLCData2.prototype.clone = function() { - return Object.create(this); - }; - XMLCData2.prototype.toString = function(options) { - return this.options.writer.cdata(this, this.options.writer.filterOptions(options)); - }; - return XMLCData2; - }(XMLCharacterData); - }).call(exports2); - } -}); - -// node_modules/xmlbuilder/lib/XMLComment.js -var require_XMLComment = __commonJS({ - "node_modules/xmlbuilder/lib/XMLComment.js"(exports2, module2) { - (function() { - var NodeType, XMLCharacterData, XMLComment, extend = /* @__PURE__ */ __name(function(child, parent) { - for (var key in parent) { - if (hasProp.call(parent, key)) - child[key] = parent[key]; - } - function ctor() { - this.constructor = child; - } - __name(ctor, "ctor"); - ctor.prototype = parent.prototype; - child.prototype = new ctor(); - child.__super__ = parent.prototype; - return child; - }, "extend"), hasProp = {}.hasOwnProperty; - NodeType = require_NodeType(); - XMLCharacterData = require_XMLCharacterData(); - module2.exports = XMLComment = function(superClass) { - extend(XMLComment2, superClass); - function XMLComment2(parent, text) { - XMLComment2.__super__.constructor.call(this, parent); - if (text == null) { - throw new Error("Missing comment text. " + this.debugInfo()); - } - this.name = "#comment"; - this.type = NodeType.Comment; - this.value = this.stringify.comment(text); - } - __name(XMLComment2, "XMLComment"); - XMLComment2.prototype.clone = function() { - return Object.create(this); - }; - XMLComment2.prototype.toString = function(options) { - return this.options.writer.comment(this, this.options.writer.filterOptions(options)); - }; - return XMLComment2; - }(XMLCharacterData); - }).call(exports2); - } -}); - -// node_modules/xmlbuilder/lib/XMLDeclaration.js -var require_XMLDeclaration = __commonJS({ - "node_modules/xmlbuilder/lib/XMLDeclaration.js"(exports2, module2) { - (function() { - var NodeType, XMLDeclaration, XMLNode, isObject, extend = /* @__PURE__ */ __name(function(child, parent) { - for (var key in parent) { - if (hasProp.call(parent, key)) - child[key] = parent[key]; - } - function ctor() { - this.constructor = child; - } - __name(ctor, "ctor"); - ctor.prototype = parent.prototype; - child.prototype = new ctor(); - child.__super__ = parent.prototype; - return child; - }, "extend"), hasProp = {}.hasOwnProperty; - isObject = require_Utility().isObject; - XMLNode = require_XMLNode(); - NodeType = require_NodeType(); - module2.exports = XMLDeclaration = function(superClass) { - extend(XMLDeclaration2, superClass); - function XMLDeclaration2(parent, version3, encoding, standalone) { - var ref; - XMLDeclaration2.__super__.constructor.call(this, parent); - if (isObject(version3)) { - ref = version3, version3 = ref.version, encoding = ref.encoding, standalone = ref.standalone; - } - if (!version3) { - version3 = "1.0"; - } - this.type = NodeType.Declaration; - this.version = this.stringify.xmlVersion(version3); - if (encoding != null) { - this.encoding = this.stringify.xmlEncoding(encoding); - } - if (standalone != null) { - this.standalone = this.stringify.xmlStandalone(standalone); - } - } - __name(XMLDeclaration2, "XMLDeclaration"); - XMLDeclaration2.prototype.toString = function(options) { - return this.options.writer.declaration(this, this.options.writer.filterOptions(options)); - }; - return XMLDeclaration2; - }(XMLNode); - }).call(exports2); - } -}); - -// node_modules/xmlbuilder/lib/XMLDTDAttList.js -var require_XMLDTDAttList = __commonJS({ - "node_modules/xmlbuilder/lib/XMLDTDAttList.js"(exports2, module2) { - (function() { - var NodeType, XMLDTDAttList, XMLNode, extend = /* @__PURE__ */ __name(function(child, parent) { - for (var key in parent) { - if (hasProp.call(parent, key)) - child[key] = parent[key]; - } - function ctor() { - this.constructor = child; - } - __name(ctor, "ctor"); - ctor.prototype = parent.prototype; - child.prototype = new ctor(); - child.__super__ = parent.prototype; - return child; - }, "extend"), hasProp = {}.hasOwnProperty; - XMLNode = require_XMLNode(); - NodeType = require_NodeType(); - module2.exports = XMLDTDAttList = function(superClass) { - extend(XMLDTDAttList2, superClass); - function XMLDTDAttList2(parent, elementName, attributeName, attributeType, defaultValueType, defaultValue) { - XMLDTDAttList2.__super__.constructor.call(this, parent); - if (elementName == null) { - throw new Error("Missing DTD element name. " + this.debugInfo()); - } - if (attributeName == null) { - throw new Error("Missing DTD attribute name. " + this.debugInfo(elementName)); - } - if (!attributeType) { - throw new Error("Missing DTD attribute type. " + this.debugInfo(elementName)); - } - if (!defaultValueType) { - throw new Error("Missing DTD attribute default. " + this.debugInfo(elementName)); - } - if (defaultValueType.indexOf("#") !== 0) { - defaultValueType = "#" + defaultValueType; - } - if (!defaultValueType.match(/^(#REQUIRED|#IMPLIED|#FIXED|#DEFAULT)$/)) { - throw new Error("Invalid default value type; expected: #REQUIRED, #IMPLIED, #FIXED or #DEFAULT. " + this.debugInfo(elementName)); - } - if (defaultValue && !defaultValueType.match(/^(#FIXED|#DEFAULT)$/)) { - throw new Error("Default value only applies to #FIXED or #DEFAULT. " + this.debugInfo(elementName)); - } - this.elementName = this.stringify.name(elementName); - this.type = NodeType.AttributeDeclaration; - this.attributeName = this.stringify.name(attributeName); - this.attributeType = this.stringify.dtdAttType(attributeType); - if (defaultValue) { - this.defaultValue = this.stringify.dtdAttDefault(defaultValue); - } - this.defaultValueType = defaultValueType; - } - __name(XMLDTDAttList2, "XMLDTDAttList"); - XMLDTDAttList2.prototype.toString = function(options) { - return this.options.writer.dtdAttList(this, this.options.writer.filterOptions(options)); - }; - return XMLDTDAttList2; - }(XMLNode); - }).call(exports2); - } -}); - -// node_modules/xmlbuilder/lib/XMLDTDEntity.js -var require_XMLDTDEntity = __commonJS({ - "node_modules/xmlbuilder/lib/XMLDTDEntity.js"(exports2, module2) { - (function() { - var NodeType, XMLDTDEntity, XMLNode, isObject, extend = /* @__PURE__ */ __name(function(child, parent) { - for (var key in parent) { - if (hasProp.call(parent, key)) - child[key] = parent[key]; - } - function ctor() { - this.constructor = child; - } - __name(ctor, "ctor"); - ctor.prototype = parent.prototype; - child.prototype = new ctor(); - child.__super__ = parent.prototype; - return child; - }, "extend"), hasProp = {}.hasOwnProperty; - isObject = require_Utility().isObject; - XMLNode = require_XMLNode(); - NodeType = require_NodeType(); - module2.exports = XMLDTDEntity = function(superClass) { - extend(XMLDTDEntity2, superClass); - function XMLDTDEntity2(parent, pe, name, value) { - XMLDTDEntity2.__super__.constructor.call(this, parent); - if (name == null) { - throw new Error("Missing DTD entity name. " + this.debugInfo(name)); - } - if (value == null) { - throw new Error("Missing DTD entity value. " + this.debugInfo(name)); - } - this.pe = !!pe; - this.name = this.stringify.name(name); - this.type = NodeType.EntityDeclaration; - if (!isObject(value)) { - this.value = this.stringify.dtdEntityValue(value); - this.internal = true; - } else { - if (!value.pubID && !value.sysID) { - throw new Error("Public and/or system identifiers are required for an external entity. " + this.debugInfo(name)); - } - if (value.pubID && !value.sysID) { - throw new Error("System identifier is required for a public external entity. " + this.debugInfo(name)); - } - this.internal = false; - if (value.pubID != null) { - this.pubID = this.stringify.dtdPubID(value.pubID); - } - if (value.sysID != null) { - this.sysID = this.stringify.dtdSysID(value.sysID); - } - if (value.nData != null) { - this.nData = this.stringify.dtdNData(value.nData); - } - if (this.pe && this.nData) { - throw new Error("Notation declaration is not allowed in a parameter entity. " + this.debugInfo(name)); - } - } - } - __name(XMLDTDEntity2, "XMLDTDEntity"); - Object.defineProperty(XMLDTDEntity2.prototype, "publicId", { - get: function() { - return this.pubID; - } - }); - Object.defineProperty(XMLDTDEntity2.prototype, "systemId", { - get: function() { - return this.sysID; - } - }); - Object.defineProperty(XMLDTDEntity2.prototype, "notationName", { - get: function() { - return this.nData || null; - } - }); - Object.defineProperty(XMLDTDEntity2.prototype, "inputEncoding", { - get: function() { - return null; - } - }); - Object.defineProperty(XMLDTDEntity2.prototype, "xmlEncoding", { - get: function() { - return null; - } - }); - Object.defineProperty(XMLDTDEntity2.prototype, "xmlVersion", { - get: function() { - return null; - } - }); - XMLDTDEntity2.prototype.toString = function(options) { - return this.options.writer.dtdEntity(this, this.options.writer.filterOptions(options)); - }; - return XMLDTDEntity2; - }(XMLNode); - }).call(exports2); - } -}); - -// node_modules/xmlbuilder/lib/XMLDTDElement.js -var require_XMLDTDElement = __commonJS({ - "node_modules/xmlbuilder/lib/XMLDTDElement.js"(exports2, module2) { - (function() { - var NodeType, XMLDTDElement, XMLNode, extend = /* @__PURE__ */ __name(function(child, parent) { - for (var key in parent) { - if (hasProp.call(parent, key)) - child[key] = parent[key]; - } - function ctor() { - this.constructor = child; - } - __name(ctor, "ctor"); - ctor.prototype = parent.prototype; - child.prototype = new ctor(); - child.__super__ = parent.prototype; - return child; - }, "extend"), hasProp = {}.hasOwnProperty; - XMLNode = require_XMLNode(); - NodeType = require_NodeType(); - module2.exports = XMLDTDElement = function(superClass) { - extend(XMLDTDElement2, superClass); - function XMLDTDElement2(parent, name, value) { - XMLDTDElement2.__super__.constructor.call(this, parent); - if (name == null) { - throw new Error("Missing DTD element name. " + this.debugInfo()); - } - if (!value) { - value = "(#PCDATA)"; - } - if (Array.isArray(value)) { - value = "(" + value.join(",") + ")"; - } - this.name = this.stringify.name(name); - this.type = NodeType.ElementDeclaration; - this.value = this.stringify.dtdElementValue(value); - } - __name(XMLDTDElement2, "XMLDTDElement"); - XMLDTDElement2.prototype.toString = function(options) { - return this.options.writer.dtdElement(this, this.options.writer.filterOptions(options)); - }; - return XMLDTDElement2; - }(XMLNode); - }).call(exports2); - } -}); - -// node_modules/xmlbuilder/lib/XMLDTDNotation.js -var require_XMLDTDNotation = __commonJS({ - "node_modules/xmlbuilder/lib/XMLDTDNotation.js"(exports2, module2) { - (function() { - var NodeType, XMLDTDNotation, XMLNode, extend = /* @__PURE__ */ __name(function(child, parent) { - for (var key in parent) { - if (hasProp.call(parent, key)) - child[key] = parent[key]; - } - function ctor() { - this.constructor = child; - } - __name(ctor, "ctor"); - ctor.prototype = parent.prototype; - child.prototype = new ctor(); - child.__super__ = parent.prototype; - return child; - }, "extend"), hasProp = {}.hasOwnProperty; - XMLNode = require_XMLNode(); - NodeType = require_NodeType(); - module2.exports = XMLDTDNotation = function(superClass) { - extend(XMLDTDNotation2, superClass); - function XMLDTDNotation2(parent, name, value) { - XMLDTDNotation2.__super__.constructor.call(this, parent); - if (name == null) { - throw new Error("Missing DTD notation name. " + this.debugInfo(name)); - } - if (!value.pubID && !value.sysID) { - throw new Error("Public or system identifiers are required for an external entity. " + this.debugInfo(name)); - } - this.name = this.stringify.name(name); - this.type = NodeType.NotationDeclaration; - if (value.pubID != null) { - this.pubID = this.stringify.dtdPubID(value.pubID); - } - if (value.sysID != null) { - this.sysID = this.stringify.dtdSysID(value.sysID); - } - } - __name(XMLDTDNotation2, "XMLDTDNotation"); - Object.defineProperty(XMLDTDNotation2.prototype, "publicId", { - get: function() { - return this.pubID; - } - }); - Object.defineProperty(XMLDTDNotation2.prototype, "systemId", { - get: function() { - return this.sysID; - } - }); - XMLDTDNotation2.prototype.toString = function(options) { - return this.options.writer.dtdNotation(this, this.options.writer.filterOptions(options)); - }; - return XMLDTDNotation2; - }(XMLNode); - }).call(exports2); - } -}); - -// node_modules/xmlbuilder/lib/XMLDocType.js -var require_XMLDocType = __commonJS({ - "node_modules/xmlbuilder/lib/XMLDocType.js"(exports2, module2) { - (function() { - var NodeType, XMLDTDAttList, XMLDTDElement, XMLDTDEntity, XMLDTDNotation, XMLDocType, XMLNamedNodeMap, XMLNode, isObject, extend = /* @__PURE__ */ __name(function(child, parent) { - for (var key in parent) { - if (hasProp.call(parent, key)) - child[key] = parent[key]; - } - function ctor() { - this.constructor = child; - } - __name(ctor, "ctor"); - ctor.prototype = parent.prototype; - child.prototype = new ctor(); - child.__super__ = parent.prototype; - return child; - }, "extend"), hasProp = {}.hasOwnProperty; - isObject = require_Utility().isObject; - XMLNode = require_XMLNode(); - NodeType = require_NodeType(); - XMLDTDAttList = require_XMLDTDAttList(); - XMLDTDEntity = require_XMLDTDEntity(); - XMLDTDElement = require_XMLDTDElement(); - XMLDTDNotation = require_XMLDTDNotation(); - XMLNamedNodeMap = require_XMLNamedNodeMap(); - module2.exports = XMLDocType = function(superClass) { - extend(XMLDocType2, superClass); - function XMLDocType2(parent, pubID, sysID) { - var child, i, len, ref, ref1, ref2; - XMLDocType2.__super__.constructor.call(this, parent); - this.type = NodeType.DocType; - if (parent.children) { - ref = parent.children; - for (i = 0, len = ref.length; i < len; i++) { - child = ref[i]; - if (child.type === NodeType.Element) { - this.name = child.name; - break; - } - } - } - this.documentObject = parent; - if (isObject(pubID)) { - ref1 = pubID, pubID = ref1.pubID, sysID = ref1.sysID; - } - if (sysID == null) { - ref2 = [pubID, sysID], sysID = ref2[0], pubID = ref2[1]; - } - if (pubID != null) { - this.pubID = this.stringify.dtdPubID(pubID); - } - if (sysID != null) { - this.sysID = this.stringify.dtdSysID(sysID); - } - } - __name(XMLDocType2, "XMLDocType"); - Object.defineProperty(XMLDocType2.prototype, "entities", { - get: function() { - var child, i, len, nodes, ref; - nodes = {}; - ref = this.children; - for (i = 0, len = ref.length; i < len; i++) { - child = ref[i]; - if (child.type === NodeType.EntityDeclaration && !child.pe) { - nodes[child.name] = child; - } - } - return new XMLNamedNodeMap(nodes); - } - }); - Object.defineProperty(XMLDocType2.prototype, "notations", { - get: function() { - var child, i, len, nodes, ref; - nodes = {}; - ref = this.children; - for (i = 0, len = ref.length; i < len; i++) { - child = ref[i]; - if (child.type === NodeType.NotationDeclaration) { - nodes[child.name] = child; - } - } - return new XMLNamedNodeMap(nodes); - } - }); - Object.defineProperty(XMLDocType2.prototype, "publicId", { - get: function() { - return this.pubID; - } - }); - Object.defineProperty(XMLDocType2.prototype, "systemId", { - get: function() { - return this.sysID; - } - }); - Object.defineProperty(XMLDocType2.prototype, "internalSubset", { - get: function() { - throw new Error("This DOM method is not implemented." + this.debugInfo()); - } - }); - XMLDocType2.prototype.element = function(name, value) { - var child; - child = new XMLDTDElement(this, name, value); - this.children.push(child); - return this; - }; - XMLDocType2.prototype.attList = function(elementName, attributeName, attributeType, defaultValueType, defaultValue) { - var child; - child = new XMLDTDAttList(this, elementName, attributeName, attributeType, defaultValueType, defaultValue); - this.children.push(child); - return this; - }; - XMLDocType2.prototype.entity = function(name, value) { - var child; - child = new XMLDTDEntity(this, false, name, value); - this.children.push(child); - return this; - }; - XMLDocType2.prototype.pEntity = function(name, value) { - var child; - child = new XMLDTDEntity(this, true, name, value); - this.children.push(child); - return this; - }; - XMLDocType2.prototype.notation = function(name, value) { - var child; - child = new XMLDTDNotation(this, name, value); - this.children.push(child); - return this; - }; - XMLDocType2.prototype.toString = function(options) { - return this.options.writer.docType(this, this.options.writer.filterOptions(options)); - }; - XMLDocType2.prototype.ele = function(name, value) { - return this.element(name, value); - }; - XMLDocType2.prototype.att = function(elementName, attributeName, attributeType, defaultValueType, defaultValue) { - return this.attList(elementName, attributeName, attributeType, defaultValueType, defaultValue); - }; - XMLDocType2.prototype.ent = function(name, value) { - return this.entity(name, value); - }; - XMLDocType2.prototype.pent = function(name, value) { - return this.pEntity(name, value); - }; - XMLDocType2.prototype.not = function(name, value) { - return this.notation(name, value); - }; - XMLDocType2.prototype.up = function() { - return this.root() || this.documentObject; - }; - XMLDocType2.prototype.isEqualNode = function(node) { - if (!XMLDocType2.__super__.isEqualNode.apply(this, arguments).isEqualNode(node)) { - return false; - } - if (node.name !== this.name) { - return false; - } - if (node.publicId !== this.publicId) { - return false; - } - if (node.systemId !== this.systemId) { - return false; - } - return true; - }; - return XMLDocType2; - }(XMLNode); - }).call(exports2); - } -}); - -// node_modules/xmlbuilder/lib/XMLRaw.js -var require_XMLRaw = __commonJS({ - "node_modules/xmlbuilder/lib/XMLRaw.js"(exports2, module2) { - (function() { - var NodeType, XMLNode, XMLRaw, extend = /* @__PURE__ */ __name(function(child, parent) { - for (var key in parent) { - if (hasProp.call(parent, key)) - child[key] = parent[key]; - } - function ctor() { - this.constructor = child; - } - __name(ctor, "ctor"); - ctor.prototype = parent.prototype; - child.prototype = new ctor(); - child.__super__ = parent.prototype; - return child; - }, "extend"), hasProp = {}.hasOwnProperty; - NodeType = require_NodeType(); - XMLNode = require_XMLNode(); - module2.exports = XMLRaw = function(superClass) { - extend(XMLRaw2, superClass); - function XMLRaw2(parent, text) { - XMLRaw2.__super__.constructor.call(this, parent); - if (text == null) { - throw new Error("Missing raw text. " + this.debugInfo()); - } - this.type = NodeType.Raw; - this.value = this.stringify.raw(text); - } - __name(XMLRaw2, "XMLRaw"); - XMLRaw2.prototype.clone = function() { - return Object.create(this); - }; - XMLRaw2.prototype.toString = function(options) { - return this.options.writer.raw(this, this.options.writer.filterOptions(options)); - }; - return XMLRaw2; - }(XMLNode); - }).call(exports2); - } -}); - -// node_modules/xmlbuilder/lib/XMLText.js -var require_XMLText = __commonJS({ - "node_modules/xmlbuilder/lib/XMLText.js"(exports2, module2) { - (function() { - var NodeType, XMLCharacterData, XMLText, extend = /* @__PURE__ */ __name(function(child, parent) { - for (var key in parent) { - if (hasProp.call(parent, key)) - child[key] = parent[key]; - } - function ctor() { - this.constructor = child; - } - __name(ctor, "ctor"); - ctor.prototype = parent.prototype; - child.prototype = new ctor(); - child.__super__ = parent.prototype; - return child; - }, "extend"), hasProp = {}.hasOwnProperty; - NodeType = require_NodeType(); - XMLCharacterData = require_XMLCharacterData(); - module2.exports = XMLText = function(superClass) { - extend(XMLText2, superClass); - function XMLText2(parent, text) { - XMLText2.__super__.constructor.call(this, parent); - if (text == null) { - throw new Error("Missing element text. " + this.debugInfo()); - } - this.name = "#text"; - this.type = NodeType.Text; - this.value = this.stringify.text(text); - } - __name(XMLText2, "XMLText"); - Object.defineProperty(XMLText2.prototype, "isElementContentWhitespace", { - get: function() { - throw new Error("This DOM method is not implemented." + this.debugInfo()); - } - }); - Object.defineProperty(XMLText2.prototype, "wholeText", { - get: function() { - var next, prev, str; - str = ""; - prev = this.previousSibling; - while (prev) { - str = prev.data + str; - prev = prev.previousSibling; - } - str += this.data; - next = this.nextSibling; - while (next) { - str = str + next.data; - next = next.nextSibling; - } - return str; - } - }); - XMLText2.prototype.clone = function() { - return Object.create(this); - }; - XMLText2.prototype.toString = function(options) { - return this.options.writer.text(this, this.options.writer.filterOptions(options)); - }; - XMLText2.prototype.splitText = function(offset) { - throw new Error("This DOM method is not implemented." + this.debugInfo()); - }; - XMLText2.prototype.replaceWholeText = function(content) { - throw new Error("This DOM method is not implemented." + this.debugInfo()); - }; - return XMLText2; - }(XMLCharacterData); - }).call(exports2); - } -}); - -// node_modules/xmlbuilder/lib/XMLProcessingInstruction.js -var require_XMLProcessingInstruction = __commonJS({ - "node_modules/xmlbuilder/lib/XMLProcessingInstruction.js"(exports2, module2) { - (function() { - var NodeType, XMLCharacterData, XMLProcessingInstruction, extend = /* @__PURE__ */ __name(function(child, parent) { - for (var key in parent) { - if (hasProp.call(parent, key)) - child[key] = parent[key]; - } - function ctor() { - this.constructor = child; - } - __name(ctor, "ctor"); - ctor.prototype = parent.prototype; - child.prototype = new ctor(); - child.__super__ = parent.prototype; - return child; - }, "extend"), hasProp = {}.hasOwnProperty; - NodeType = require_NodeType(); - XMLCharacterData = require_XMLCharacterData(); - module2.exports = XMLProcessingInstruction = function(superClass) { - extend(XMLProcessingInstruction2, superClass); - function XMLProcessingInstruction2(parent, target, value) { - XMLProcessingInstruction2.__super__.constructor.call(this, parent); - if (target == null) { - throw new Error("Missing instruction target. " + this.debugInfo()); - } - this.type = NodeType.ProcessingInstruction; - this.target = this.stringify.insTarget(target); - this.name = this.target; - if (value) { - this.value = this.stringify.insValue(value); - } - } - __name(XMLProcessingInstruction2, "XMLProcessingInstruction"); - XMLProcessingInstruction2.prototype.clone = function() { - return Object.create(this); - }; - XMLProcessingInstruction2.prototype.toString = function(options) { - return this.options.writer.processingInstruction(this, this.options.writer.filterOptions(options)); - }; - XMLProcessingInstruction2.prototype.isEqualNode = function(node) { - if (!XMLProcessingInstruction2.__super__.isEqualNode.apply(this, arguments).isEqualNode(node)) { - return false; - } - if (node.target !== this.target) { - return false; - } - return true; - }; - return XMLProcessingInstruction2; - }(XMLCharacterData); - }).call(exports2); - } -}); - -// node_modules/xmlbuilder/lib/XMLDummy.js -var require_XMLDummy = __commonJS({ - "node_modules/xmlbuilder/lib/XMLDummy.js"(exports2, module2) { - (function() { - var NodeType, XMLDummy, XMLNode, extend = /* @__PURE__ */ __name(function(child, parent) { - for (var key in parent) { - if (hasProp.call(parent, key)) - child[key] = parent[key]; - } - function ctor() { - this.constructor = child; - } - __name(ctor, "ctor"); - ctor.prototype = parent.prototype; - child.prototype = new ctor(); - child.__super__ = parent.prototype; - return child; - }, "extend"), hasProp = {}.hasOwnProperty; - XMLNode = require_XMLNode(); - NodeType = require_NodeType(); - module2.exports = XMLDummy = function(superClass) { - extend(XMLDummy2, superClass); - function XMLDummy2(parent) { - XMLDummy2.__super__.constructor.call(this, parent); - this.type = NodeType.Dummy; - } - __name(XMLDummy2, "XMLDummy"); - XMLDummy2.prototype.clone = function() { - return Object.create(this); - }; - XMLDummy2.prototype.toString = function(options) { - return ""; - }; - return XMLDummy2; - }(XMLNode); - }).call(exports2); - } -}); - -// node_modules/xmlbuilder/lib/XMLNodeList.js -var require_XMLNodeList = __commonJS({ - "node_modules/xmlbuilder/lib/XMLNodeList.js"(exports2, module2) { - (function() { - var XMLNodeList; - module2.exports = XMLNodeList = function() { - function XMLNodeList2(nodes) { - this.nodes = nodes; - } - __name(XMLNodeList2, "XMLNodeList"); - Object.defineProperty(XMLNodeList2.prototype, "length", { - get: function() { - return this.nodes.length || 0; - } - }); - XMLNodeList2.prototype.clone = function() { - return this.nodes = null; - }; - XMLNodeList2.prototype.item = function(index) { - return this.nodes[index] || null; - }; - return XMLNodeList2; - }(); - }).call(exports2); - } -}); - -// node_modules/xmlbuilder/lib/DocumentPosition.js -var require_DocumentPosition = __commonJS({ - "node_modules/xmlbuilder/lib/DocumentPosition.js"(exports2, module2) { - (function() { - module2.exports = { - Disconnected: 1, - Preceding: 2, - Following: 4, - Contains: 8, - ContainedBy: 16, - ImplementationSpecific: 32 - }; - }).call(exports2); - } -}); - -// node_modules/xmlbuilder/lib/XMLNode.js -var require_XMLNode = __commonJS({ - "node_modules/xmlbuilder/lib/XMLNode.js"(exports2, module2) { - (function() { - var DocumentPosition, NodeType, XMLCData, XMLComment, XMLDeclaration, XMLDocType, XMLDummy, XMLElement, XMLNamedNodeMap, XMLNode, XMLNodeList, XMLProcessingInstruction, XMLRaw, XMLText, getValue, isEmpty, isFunction, isObject, ref1, hasProp = {}.hasOwnProperty; - ref1 = require_Utility(), isObject = ref1.isObject, isFunction = ref1.isFunction, isEmpty = ref1.isEmpty, getValue = ref1.getValue; - XMLElement = null; - XMLCData = null; - XMLComment = null; - XMLDeclaration = null; - XMLDocType = null; - XMLRaw = null; - XMLText = null; - XMLProcessingInstruction = null; - XMLDummy = null; - NodeType = null; - XMLNodeList = null; - XMLNamedNodeMap = null; - DocumentPosition = null; - module2.exports = XMLNode = function() { - function XMLNode2(parent1) { - this.parent = parent1; - if (this.parent) { - this.options = this.parent.options; - this.stringify = this.parent.stringify; - } - this.value = null; - this.children = []; - this.baseURI = null; - if (!XMLElement) { - XMLElement = require_XMLElement(); - XMLCData = require_XMLCData(); - XMLComment = require_XMLComment(); - XMLDeclaration = require_XMLDeclaration(); - XMLDocType = require_XMLDocType(); - XMLRaw = require_XMLRaw(); - XMLText = require_XMLText(); - XMLProcessingInstruction = require_XMLProcessingInstruction(); - XMLDummy = require_XMLDummy(); - NodeType = require_NodeType(); - XMLNodeList = require_XMLNodeList(); - XMLNamedNodeMap = require_XMLNamedNodeMap(); - DocumentPosition = require_DocumentPosition(); - } - } - __name(XMLNode2, "XMLNode"); - Object.defineProperty(XMLNode2.prototype, "nodeName", { - get: function() { - return this.name; - } - }); - Object.defineProperty(XMLNode2.prototype, "nodeType", { - get: function() { - return this.type; - } - }); - Object.defineProperty(XMLNode2.prototype, "nodeValue", { - get: function() { - return this.value; - } - }); - Object.defineProperty(XMLNode2.prototype, "parentNode", { - get: function() { - return this.parent; - } - }); - Object.defineProperty(XMLNode2.prototype, "childNodes", { - get: function() { - if (!this.childNodeList || !this.childNodeList.nodes) { - this.childNodeList = new XMLNodeList(this.children); - } - return this.childNodeList; - } - }); - Object.defineProperty(XMLNode2.prototype, "firstChild", { - get: function() { - return this.children[0] || null; - } - }); - Object.defineProperty(XMLNode2.prototype, "lastChild", { - get: function() { - return this.children[this.children.length - 1] || null; - } - }); - Object.defineProperty(XMLNode2.prototype, "previousSibling", { - get: function() { - var i; - i = this.parent.children.indexOf(this); - return this.parent.children[i - 1] || null; - } - }); - Object.defineProperty(XMLNode2.prototype, "nextSibling", { - get: function() { - var i; - i = this.parent.children.indexOf(this); - return this.parent.children[i + 1] || null; - } - }); - Object.defineProperty(XMLNode2.prototype, "ownerDocument", { - get: function() { - return this.document() || null; - } - }); - Object.defineProperty(XMLNode2.prototype, "textContent", { - get: function() { - var child, j, len, ref2, str; - if (this.nodeType === NodeType.Element || this.nodeType === NodeType.DocumentFragment) { - str = ""; - ref2 = this.children; - for (j = 0, len = ref2.length; j < len; j++) { - child = ref2[j]; - if (child.textContent) { - str += child.textContent; - } - } - return str; - } else { - return null; - } - }, - set: function(value) { - throw new Error("This DOM method is not implemented." + this.debugInfo()); - } - }); - XMLNode2.prototype.setParent = function(parent) { - var child, j, len, ref2, results; - this.parent = parent; - if (parent) { - this.options = parent.options; - this.stringify = parent.stringify; - } - ref2 = this.children; - results = []; - for (j = 0, len = ref2.length; j < len; j++) { - child = ref2[j]; - results.push(child.setParent(this)); - } - return results; - }; - XMLNode2.prototype.element = function(name, attributes, text) { - var childNode, item, j, k, key, lastChild, len, len1, ref2, ref3, val; - lastChild = null; - if (attributes === null && text == null) { - ref2 = [{}, null], attributes = ref2[0], text = ref2[1]; - } - if (attributes == null) { - attributes = {}; - } - attributes = getValue(attributes); - if (!isObject(attributes)) { - ref3 = [attributes, text], text = ref3[0], attributes = ref3[1]; - } - if (name != null) { - name = getValue(name); - } - if (Array.isArray(name)) { - for (j = 0, len = name.length; j < len; j++) { - item = name[j]; - lastChild = this.element(item); - } - } else if (isFunction(name)) { - lastChild = this.element(name.apply()); - } else if (isObject(name)) { - for (key in name) { - if (!hasProp.call(name, key)) - continue; - val = name[key]; - if (isFunction(val)) { - val = val.apply(); - } - if (!this.options.ignoreDecorators && this.stringify.convertAttKey && key.indexOf(this.stringify.convertAttKey) === 0) { - lastChild = this.attribute(key.substr(this.stringify.convertAttKey.length), val); - } else if (!this.options.separateArrayItems && Array.isArray(val) && isEmpty(val)) { - lastChild = this.dummy(); - } else if (isObject(val) && isEmpty(val)) { - lastChild = this.element(key); - } else if (!this.options.keepNullNodes && val == null) { - lastChild = this.dummy(); - } else if (!this.options.separateArrayItems && Array.isArray(val)) { - for (k = 0, len1 = val.length; k < len1; k++) { - item = val[k]; - childNode = {}; - childNode[key] = item; - lastChild = this.element(childNode); - } - } else if (isObject(val)) { - if (!this.options.ignoreDecorators && this.stringify.convertTextKey && key.indexOf(this.stringify.convertTextKey) === 0) { - lastChild = this.element(val); - } else { - lastChild = this.element(key); - lastChild.element(val); - } - } else { - lastChild = this.element(key, val); - } - } - } else if (!this.options.keepNullNodes && text === null) { - lastChild = this.dummy(); - } else { - if (!this.options.ignoreDecorators && this.stringify.convertTextKey && name.indexOf(this.stringify.convertTextKey) === 0) { - lastChild = this.text(text); - } else if (!this.options.ignoreDecorators && this.stringify.convertCDataKey && name.indexOf(this.stringify.convertCDataKey) === 0) { - lastChild = this.cdata(text); - } else if (!this.options.ignoreDecorators && this.stringify.convertCommentKey && name.indexOf(this.stringify.convertCommentKey) === 0) { - lastChild = this.comment(text); - } else if (!this.options.ignoreDecorators && this.stringify.convertRawKey && name.indexOf(this.stringify.convertRawKey) === 0) { - lastChild = this.raw(text); - } else if (!this.options.ignoreDecorators && this.stringify.convertPIKey && name.indexOf(this.stringify.convertPIKey) === 0) { - lastChild = this.instruction(name.substr(this.stringify.convertPIKey.length), text); - } else { - lastChild = this.node(name, attributes, text); - } - } - if (lastChild == null) { - throw new Error("Could not create any elements with: " + name + ". " + this.debugInfo()); - } - return lastChild; - }; - XMLNode2.prototype.insertBefore = function(name, attributes, text) { - var child, i, newChild, refChild, removed; - if (name != null ? name.type : void 0) { - newChild = name; - refChild = attributes; - newChild.setParent(this); - if (refChild) { - i = children.indexOf(refChild); - removed = children.splice(i); - children.push(newChild); - Array.prototype.push.apply(children, removed); - } else { - children.push(newChild); - } - return newChild; - } else { - if (this.isRoot) { - throw new Error("Cannot insert elements at root level. " + this.debugInfo(name)); - } - i = this.parent.children.indexOf(this); - removed = this.parent.children.splice(i); - child = this.parent.element(name, attributes, text); - Array.prototype.push.apply(this.parent.children, removed); - return child; - } - }; - XMLNode2.prototype.insertAfter = function(name, attributes, text) { - var child, i, removed; - if (this.isRoot) { - throw new Error("Cannot insert elements at root level. " + this.debugInfo(name)); - } - i = this.parent.children.indexOf(this); - removed = this.parent.children.splice(i + 1); - child = this.parent.element(name, attributes, text); - Array.prototype.push.apply(this.parent.children, removed); - return child; - }; - XMLNode2.prototype.remove = function() { - var i, ref2; - if (this.isRoot) { - throw new Error("Cannot remove the root element. " + this.debugInfo()); - } - i = this.parent.children.indexOf(this); - [].splice.apply(this.parent.children, [i, i - i + 1].concat(ref2 = [])), ref2; - return this.parent; - }; - XMLNode2.prototype.node = function(name, attributes, text) { - var child, ref2; - if (name != null) { - name = getValue(name); - } - attributes || (attributes = {}); - attributes = getValue(attributes); - if (!isObject(attributes)) { - ref2 = [attributes, text], text = ref2[0], attributes = ref2[1]; - } - child = new XMLElement(this, name, attributes); - if (text != null) { - child.text(text); - } - this.children.push(child); - return child; - }; - XMLNode2.prototype.text = function(value) { - var child; - if (isObject(value)) { - this.element(value); - } - child = new XMLText(this, value); - this.children.push(child); - return this; - }; - XMLNode2.prototype.cdata = function(value) { - var child; - child = new XMLCData(this, value); - this.children.push(child); - return this; - }; - XMLNode2.prototype.comment = function(value) { - var child; - child = new XMLComment(this, value); - this.children.push(child); - return this; - }; - XMLNode2.prototype.commentBefore = function(value) { - var child, i, removed; - i = this.parent.children.indexOf(this); - removed = this.parent.children.splice(i); - child = this.parent.comment(value); - Array.prototype.push.apply(this.parent.children, removed); - return this; - }; - XMLNode2.prototype.commentAfter = function(value) { - var child, i, removed; - i = this.parent.children.indexOf(this); - removed = this.parent.children.splice(i + 1); - child = this.parent.comment(value); - Array.prototype.push.apply(this.parent.children, removed); - return this; - }; - XMLNode2.prototype.raw = function(value) { - var child; - child = new XMLRaw(this, value); - this.children.push(child); - return this; - }; - XMLNode2.prototype.dummy = function() { - var child; - child = new XMLDummy(this); - return child; - }; - XMLNode2.prototype.instruction = function(target, value) { - var insTarget, insValue, instruction, j, len; - if (target != null) { - target = getValue(target); - } - if (value != null) { - value = getValue(value); - } - if (Array.isArray(target)) { - for (j = 0, len = target.length; j < len; j++) { - insTarget = target[j]; - this.instruction(insTarget); - } - } else if (isObject(target)) { - for (insTarget in target) { - if (!hasProp.call(target, insTarget)) - continue; - insValue = target[insTarget]; - this.instruction(insTarget, insValue); - } - } else { - if (isFunction(value)) { - value = value.apply(); - } - instruction = new XMLProcessingInstruction(this, target, value); - this.children.push(instruction); - } - return this; - }; - XMLNode2.prototype.instructionBefore = function(target, value) { - var child, i, removed; - i = this.parent.children.indexOf(this); - removed = this.parent.children.splice(i); - child = this.parent.instruction(target, value); - Array.prototype.push.apply(this.parent.children, removed); - return this; - }; - XMLNode2.prototype.instructionAfter = function(target, value) { - var child, i, removed; - i = this.parent.children.indexOf(this); - removed = this.parent.children.splice(i + 1); - child = this.parent.instruction(target, value); - Array.prototype.push.apply(this.parent.children, removed); - return this; - }; - XMLNode2.prototype.declaration = function(version3, encoding, standalone) { - var doc, xmldec; - doc = this.document(); - xmldec = new XMLDeclaration(doc, version3, encoding, standalone); - if (doc.children.length === 0) { - doc.children.unshift(xmldec); - } else if (doc.children[0].type === NodeType.Declaration) { - doc.children[0] = xmldec; - } else { - doc.children.unshift(xmldec); - } - return doc.root() || doc; - }; - XMLNode2.prototype.dtd = function(pubID, sysID) { - var child, doc, doctype, i, j, k, len, len1, ref2, ref3; - doc = this.document(); - doctype = new XMLDocType(doc, pubID, sysID); - ref2 = doc.children; - for (i = j = 0, len = ref2.length; j < len; i = ++j) { - child = ref2[i]; - if (child.type === NodeType.DocType) { - doc.children[i] = doctype; - return doctype; - } - } - ref3 = doc.children; - for (i = k = 0, len1 = ref3.length; k < len1; i = ++k) { - child = ref3[i]; - if (child.isRoot) { - doc.children.splice(i, 0, doctype); - return doctype; - } - } - doc.children.push(doctype); - return doctype; - }; - XMLNode2.prototype.up = function() { - if (this.isRoot) { - throw new Error("The root node has no parent. Use doc() if you need to get the document object."); - } - return this.parent; - }; - XMLNode2.prototype.root = function() { - var node; - node = this; - while (node) { - if (node.type === NodeType.Document) { - return node.rootObject; - } else if (node.isRoot) { - return node; - } else { - node = node.parent; - } - } - }; - XMLNode2.prototype.document = function() { - var node; - node = this; - while (node) { - if (node.type === NodeType.Document) { - return node; - } else { - node = node.parent; - } - } - }; - XMLNode2.prototype.end = function(options) { - return this.document().end(options); - }; - XMLNode2.prototype.prev = function() { - var i; - i = this.parent.children.indexOf(this); - if (i < 1) { - throw new Error("Already at the first node. " + this.debugInfo()); - } - return this.parent.children[i - 1]; - }; - XMLNode2.prototype.next = function() { - var i; - i = this.parent.children.indexOf(this); - if (i === -1 || i === this.parent.children.length - 1) { - throw new Error("Already at the last node. " + this.debugInfo()); - } - return this.parent.children[i + 1]; - }; - XMLNode2.prototype.importDocument = function(doc) { - var clonedRoot; - clonedRoot = doc.root().clone(); - clonedRoot.parent = this; - clonedRoot.isRoot = false; - this.children.push(clonedRoot); - return this; - }; - XMLNode2.prototype.debugInfo = function(name) { - var ref2, ref3; - name = name || this.name; - if (name == null && !((ref2 = this.parent) != null ? ref2.name : void 0)) { - return ""; - } else if (name == null) { - return "parent: <" + this.parent.name + ">"; - } else if (!((ref3 = this.parent) != null ? ref3.name : void 0)) { - return "node: <" + name + ">"; - } else { - return "node: <" + name + ">, parent: <" + this.parent.name + ">"; - } - }; - XMLNode2.prototype.ele = function(name, attributes, text) { - return this.element(name, attributes, text); - }; - XMLNode2.prototype.nod = function(name, attributes, text) { - return this.node(name, attributes, text); - }; - XMLNode2.prototype.txt = function(value) { - return this.text(value); - }; - XMLNode2.prototype.dat = function(value) { - return this.cdata(value); - }; - XMLNode2.prototype.com = function(value) { - return this.comment(value); - }; - XMLNode2.prototype.ins = function(target, value) { - return this.instruction(target, value); - }; - XMLNode2.prototype.doc = function() { - return this.document(); - }; - XMLNode2.prototype.dec = function(version3, encoding, standalone) { - return this.declaration(version3, encoding, standalone); - }; - XMLNode2.prototype.e = function(name, attributes, text) { - return this.element(name, attributes, text); - }; - XMLNode2.prototype.n = function(name, attributes, text) { - return this.node(name, attributes, text); - }; - XMLNode2.prototype.t = function(value) { - return this.text(value); - }; - XMLNode2.prototype.d = function(value) { - return this.cdata(value); - }; - XMLNode2.prototype.c = function(value) { - return this.comment(value); - }; - XMLNode2.prototype.r = function(value) { - return this.raw(value); - }; - XMLNode2.prototype.i = function(target, value) { - return this.instruction(target, value); - }; - XMLNode2.prototype.u = function() { - return this.up(); - }; - XMLNode2.prototype.importXMLBuilder = function(doc) { - return this.importDocument(doc); - }; - XMLNode2.prototype.replaceChild = function(newChild, oldChild) { - throw new Error("This DOM method is not implemented." + this.debugInfo()); - }; - XMLNode2.prototype.removeChild = function(oldChild) { - throw new Error("This DOM method is not implemented." + this.debugInfo()); - }; - XMLNode2.prototype.appendChild = function(newChild) { - throw new Error("This DOM method is not implemented." + this.debugInfo()); - }; - XMLNode2.prototype.hasChildNodes = function() { - return this.children.length !== 0; - }; - XMLNode2.prototype.cloneNode = function(deep) { - throw new Error("This DOM method is not implemented." + this.debugInfo()); - }; - XMLNode2.prototype.normalize = function() { - throw new Error("This DOM method is not implemented." + this.debugInfo()); - }; - XMLNode2.prototype.isSupported = function(feature, version3) { - return true; - }; - XMLNode2.prototype.hasAttributes = function() { - return this.attribs.length !== 0; - }; - XMLNode2.prototype.compareDocumentPosition = function(other) { - var ref, res; - ref = this; - if (ref === other) { - return 0; - } else if (this.document() !== other.document()) { - res = DocumentPosition.Disconnected | DocumentPosition.ImplementationSpecific; - if (Math.random() < 0.5) { - res |= DocumentPosition.Preceding; - } else { - res |= DocumentPosition.Following; - } - return res; - } else if (ref.isAncestor(other)) { - return DocumentPosition.Contains | DocumentPosition.Preceding; - } else if (ref.isDescendant(other)) { - return DocumentPosition.Contains | DocumentPosition.Following; - } else if (ref.isPreceding(other)) { - return DocumentPosition.Preceding; - } else { - return DocumentPosition.Following; - } - }; - XMLNode2.prototype.isSameNode = function(other) { - throw new Error("This DOM method is not implemented." + this.debugInfo()); - }; - XMLNode2.prototype.lookupPrefix = function(namespaceURI) { - throw new Error("This DOM method is not implemented." + this.debugInfo()); - }; - XMLNode2.prototype.isDefaultNamespace = function(namespaceURI) { - throw new Error("This DOM method is not implemented." + this.debugInfo()); - }; - XMLNode2.prototype.lookupNamespaceURI = function(prefix) { - throw new Error("This DOM method is not implemented." + this.debugInfo()); - }; - XMLNode2.prototype.isEqualNode = function(node) { - var i, j, ref2; - if (node.nodeType !== this.nodeType) { - return false; - } - if (node.children.length !== this.children.length) { - return false; - } - for (i = j = 0, ref2 = this.children.length - 1; 0 <= ref2 ? j <= ref2 : j >= ref2; i = 0 <= ref2 ? ++j : --j) { - if (!this.children[i].isEqualNode(node.children[i])) { - return false; - } - } - return true; - }; - XMLNode2.prototype.getFeature = function(feature, version3) { - throw new Error("This DOM method is not implemented." + this.debugInfo()); - }; - XMLNode2.prototype.setUserData = function(key, data, handler) { - throw new Error("This DOM method is not implemented." + this.debugInfo()); - }; - XMLNode2.prototype.getUserData = function(key) { - throw new Error("This DOM method is not implemented." + this.debugInfo()); - }; - XMLNode2.prototype.contains = function(other) { - if (!other) { - return false; - } - return other === this || this.isDescendant(other); - }; - XMLNode2.prototype.isDescendant = function(node) { - var child, isDescendantChild, j, len, ref2; - ref2 = this.children; - for (j = 0, len = ref2.length; j < len; j++) { - child = ref2[j]; - if (node === child) { - return true; - } - isDescendantChild = child.isDescendant(node); - if (isDescendantChild) { - return true; - } - } - return false; - }; - XMLNode2.prototype.isAncestor = function(node) { - return node.isDescendant(this); - }; - XMLNode2.prototype.isPreceding = function(node) { - var nodePos, thisPos; - nodePos = this.treePosition(node); - thisPos = this.treePosition(this); - if (nodePos === -1 || thisPos === -1) { - return false; - } else { - return nodePos < thisPos; - } - }; - XMLNode2.prototype.isFollowing = function(node) { - var nodePos, thisPos; - nodePos = this.treePosition(node); - thisPos = this.treePosition(this); - if (nodePos === -1 || thisPos === -1) { - return false; - } else { - return nodePos > thisPos; - } - }; - XMLNode2.prototype.treePosition = function(node) { - var found, pos; - pos = 0; - found = false; - this.foreachTreeNode(this.document(), function(childNode) { - pos++; - if (!found && childNode === node) { - return found = true; - } - }); - if (found) { - return pos; - } else { - return -1; - } - }; - XMLNode2.prototype.foreachTreeNode = function(node, func) { - var child, j, len, ref2, res; - node || (node = this.document()); - ref2 = node.children; - for (j = 0, len = ref2.length; j < len; j++) { - child = ref2[j]; - if (res = func(child)) { - return res; - } else { - res = this.foreachTreeNode(child, func); - if (res) { - return res; - } - } - } - }; - return XMLNode2; - }(); - }).call(exports2); - } -}); - -// node_modules/xmlbuilder/lib/XMLStringifier.js -var require_XMLStringifier = __commonJS({ - "node_modules/xmlbuilder/lib/XMLStringifier.js"(exports2, module2) { - (function() { - var XMLStringifier, bind = /* @__PURE__ */ __name(function(fn, me) { - return function() { - return fn.apply(me, arguments); - }; - }, "bind"), hasProp = {}.hasOwnProperty; - module2.exports = XMLStringifier = function() { - function XMLStringifier2(options) { - this.assertLegalName = bind(this.assertLegalName, this); - this.assertLegalChar = bind(this.assertLegalChar, this); - var key, ref, value; - options || (options = {}); - this.options = options; - if (!this.options.version) { - this.options.version = "1.0"; - } - ref = options.stringify || {}; - for (key in ref) { - if (!hasProp.call(ref, key)) - continue; - value = ref[key]; - this[key] = value; - } - } - __name(XMLStringifier2, "XMLStringifier"); - XMLStringifier2.prototype.name = function(val) { - if (this.options.noValidation) { - return val; - } - return this.assertLegalName("" + val || ""); - }; - XMLStringifier2.prototype.text = function(val) { - if (this.options.noValidation) { - return val; - } - return this.assertLegalChar(this.textEscape("" + val || "")); - }; - XMLStringifier2.prototype.cdata = function(val) { - if (this.options.noValidation) { - return val; - } - val = "" + val || ""; - val = val.replace("]]>", "]]]]>"); - return this.assertLegalChar(val); - }; - XMLStringifier2.prototype.comment = function(val) { - if (this.options.noValidation) { - return val; - } - val = "" + val || ""; - if (val.match(/--/)) { - throw new Error("Comment text cannot contain double-hypen: " + val); - } - return this.assertLegalChar(val); - }; - XMLStringifier2.prototype.raw = function(val) { - if (this.options.noValidation) { - return val; - } - return "" + val || ""; - }; - XMLStringifier2.prototype.attValue = function(val) { - if (this.options.noValidation) { - return val; - } - return this.assertLegalChar(this.attEscape(val = "" + val || "")); - }; - XMLStringifier2.prototype.insTarget = function(val) { - if (this.options.noValidation) { - return val; - } - return this.assertLegalChar("" + val || ""); - }; - XMLStringifier2.prototype.insValue = function(val) { - if (this.options.noValidation) { - return val; - } - val = "" + val || ""; - if (val.match(/\?>/)) { - throw new Error("Invalid processing instruction value: " + val); - } - return this.assertLegalChar(val); - }; - XMLStringifier2.prototype.xmlVersion = function(val) { - if (this.options.noValidation) { - return val; - } - val = "" + val || ""; - if (!val.match(/1\.[0-9]+/)) { - throw new Error("Invalid version number: " + val); - } - return val; - }; - XMLStringifier2.prototype.xmlEncoding = function(val) { - if (this.options.noValidation) { - return val; - } - val = "" + val || ""; - if (!val.match(/^[A-Za-z](?:[A-Za-z0-9._-])*$/)) { - throw new Error("Invalid encoding: " + val); - } - return this.assertLegalChar(val); - }; - XMLStringifier2.prototype.xmlStandalone = function(val) { - if (this.options.noValidation) { - return val; - } - if (val) { - return "yes"; - } else { - return "no"; - } - }; - XMLStringifier2.prototype.dtdPubID = function(val) { - if (this.options.noValidation) { - return val; - } - return this.assertLegalChar("" + val || ""); - }; - XMLStringifier2.prototype.dtdSysID = function(val) { - if (this.options.noValidation) { - return val; - } - return this.assertLegalChar("" + val || ""); - }; - XMLStringifier2.prototype.dtdElementValue = function(val) { - if (this.options.noValidation) { - return val; - } - return this.assertLegalChar("" + val || ""); - }; - XMLStringifier2.prototype.dtdAttType = function(val) { - if (this.options.noValidation) { - return val; - } - return this.assertLegalChar("" + val || ""); - }; - XMLStringifier2.prototype.dtdAttDefault = function(val) { - if (this.options.noValidation) { - return val; - } - return this.assertLegalChar("" + val || ""); - }; - XMLStringifier2.prototype.dtdEntityValue = function(val) { - if (this.options.noValidation) { - return val; - } - return this.assertLegalChar("" + val || ""); - }; - XMLStringifier2.prototype.dtdNData = function(val) { - if (this.options.noValidation) { - return val; - } - return this.assertLegalChar("" + val || ""); - }; - XMLStringifier2.prototype.convertAttKey = "@"; - XMLStringifier2.prototype.convertPIKey = "?"; - XMLStringifier2.prototype.convertTextKey = "#text"; - XMLStringifier2.prototype.convertCDataKey = "#cdata"; - XMLStringifier2.prototype.convertCommentKey = "#comment"; - XMLStringifier2.prototype.convertRawKey = "#raw"; - XMLStringifier2.prototype.assertLegalChar = function(str) { - var regex, res; - if (this.options.noValidation) { - return str; - } - regex = ""; - if (this.options.version === "1.0") { - regex = /[\0-\x08\x0B\f\x0E-\x1F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/; - if (res = str.match(regex)) { - throw new Error("Invalid character in string: " + str + " at index " + res.index); - } - } else if (this.options.version === "1.1") { - regex = /[\0\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/; - if (res = str.match(regex)) { - throw new Error("Invalid character in string: " + str + " at index " + res.index); - } - } - return str; - }; - XMLStringifier2.prototype.assertLegalName = function(str) { - var regex; - if (this.options.noValidation) { - return str; - } - this.assertLegalChar(str); - regex = /^([:A-Z_a-z\xC0-\xD6\xD8-\xF6\xF8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])([\x2D\.0-:A-Z_a-z\xB7\xC0-\xD6\xD8-\xF6\xF8-\u037D\u037F-\u1FFF\u200C\u200D\u203F\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])*$/; - if (!str.match(regex)) { - throw new Error("Invalid character in name"); - } - return str; - }; - XMLStringifier2.prototype.textEscape = function(str) { - var ampregex; - if (this.options.noValidation) { - return str; - } - ampregex = this.options.noDoubleEncoding ? /(?!&\S+;)&/g : /&/g; - return str.replace(ampregex, "&").replace(//g, ">").replace(/\r/g, " "); - }; - XMLStringifier2.prototype.attEscape = function(str) { - var ampregex; - if (this.options.noValidation) { - return str; - } - ampregex = this.options.noDoubleEncoding ? /(?!&\S+;)&/g : /&/g; - return str.replace(ampregex, "&").replace(/ 0) { - return new Array(indentLevel).join(options.indent); - } - } - return ""; - }; - XMLWriterBase2.prototype.endline = function(node, options, level) { - if (!options.pretty || options.suppressPrettyCount) { - return ""; - } else { - return options.newline; - } - }; - XMLWriterBase2.prototype.attribute = function(att, options, level) { - var r; - this.openAttribute(att, options, level); - r = " " + att.name + '="' + att.value + '"'; - this.closeAttribute(att, options, level); - return r; - }; - XMLWriterBase2.prototype.cdata = function(node, options, level) { - var r; - this.openNode(node, options, level); - options.state = WriterState.OpenTag; - r = this.indent(node, options, level) + "" + this.endline(node, options, level); - options.state = WriterState.None; - this.closeNode(node, options, level); - return r; - }; - XMLWriterBase2.prototype.comment = function(node, options, level) { - var r; - this.openNode(node, options, level); - options.state = WriterState.OpenTag; - r = this.indent(node, options, level) + "" + this.endline(node, options, level); - options.state = WriterState.None; - this.closeNode(node, options, level); - return r; - }; - XMLWriterBase2.prototype.declaration = function(node, options, level) { - var r; - this.openNode(node, options, level); - options.state = WriterState.OpenTag; - r = this.indent(node, options, level) + ""; - r += this.endline(node, options, level); - options.state = WriterState.None; - this.closeNode(node, options, level); - return r; - }; - XMLWriterBase2.prototype.docType = function(node, options, level) { - var child, i, len, r, ref; - level || (level = 0); - this.openNode(node, options, level); - options.state = WriterState.OpenTag; - r = this.indent(node, options, level); - r += " 0) { - r += " ["; - r += this.endline(node, options, level); - options.state = WriterState.InsideTag; - ref = node.children; - for (i = 0, len = ref.length; i < len; i++) { - child = ref[i]; - r += this.writeChildNode(child, options, level + 1); - } - options.state = WriterState.CloseTag; - r += "]"; - } - options.state = WriterState.CloseTag; - r += options.spaceBeforeSlash + ">"; - r += this.endline(node, options, level); - options.state = WriterState.None; - this.closeNode(node, options, level); - return r; - }; - XMLWriterBase2.prototype.element = function(node, options, level) { - var att, child, childNodeCount, firstChildNode, i, j, len, len1, name, prettySuppressed, r, ref, ref1, ref2; - level || (level = 0); - prettySuppressed = false; - r = ""; - this.openNode(node, options, level); - options.state = WriterState.OpenTag; - r += this.indent(node, options, level) + "<" + node.name; - ref = node.attribs; - for (name in ref) { - if (!hasProp.call(ref, name)) - continue; - att = ref[name]; - r += this.attribute(att, options, level); - } - childNodeCount = node.children.length; - firstChildNode = childNodeCount === 0 ? null : node.children[0]; - if (childNodeCount === 0 || node.children.every(function(e) { - return (e.type === NodeType.Text || e.type === NodeType.Raw) && e.value === ""; - })) { - if (options.allowEmpty) { - r += ">"; - options.state = WriterState.CloseTag; - r += "" + this.endline(node, options, level); - } else { - options.state = WriterState.CloseTag; - r += options.spaceBeforeSlash + "/>" + this.endline(node, options, level); - } - } else if (options.pretty && childNodeCount === 1 && (firstChildNode.type === NodeType.Text || firstChildNode.type === NodeType.Raw) && firstChildNode.value != null) { - r += ">"; - options.state = WriterState.InsideTag; - options.suppressPrettyCount++; - prettySuppressed = true; - r += this.writeChildNode(firstChildNode, options, level + 1); - options.suppressPrettyCount--; - prettySuppressed = false; - options.state = WriterState.CloseTag; - r += "" + this.endline(node, options, level); - } else { - if (options.dontPrettyTextNodes) { - ref1 = node.children; - for (i = 0, len = ref1.length; i < len; i++) { - child = ref1[i]; - if ((child.type === NodeType.Text || child.type === NodeType.Raw) && child.value != null) { - options.suppressPrettyCount++; - prettySuppressed = true; - break; - } - } - } - r += ">" + this.endline(node, options, level); - options.state = WriterState.InsideTag; - ref2 = node.children; - for (j = 0, len1 = ref2.length; j < len1; j++) { - child = ref2[j]; - r += this.writeChildNode(child, options, level + 1); - } - options.state = WriterState.CloseTag; - r += this.indent(node, options, level) + ""; - if (prettySuppressed) { - options.suppressPrettyCount--; - } - r += this.endline(node, options, level); - options.state = WriterState.None; - } - this.closeNode(node, options, level); - return r; - }; - XMLWriterBase2.prototype.writeChildNode = function(node, options, level) { - switch (node.type) { - case NodeType.CData: - return this.cdata(node, options, level); - case NodeType.Comment: - return this.comment(node, options, level); - case NodeType.Element: - return this.element(node, options, level); - case NodeType.Raw: - return this.raw(node, options, level); - case NodeType.Text: - return this.text(node, options, level); - case NodeType.ProcessingInstruction: - return this.processingInstruction(node, options, level); - case NodeType.Dummy: - return ""; - case NodeType.Declaration: - return this.declaration(node, options, level); - case NodeType.DocType: - return this.docType(node, options, level); - case NodeType.AttributeDeclaration: - return this.dtdAttList(node, options, level); - case NodeType.ElementDeclaration: - return this.dtdElement(node, options, level); - case NodeType.EntityDeclaration: - return this.dtdEntity(node, options, level); - case NodeType.NotationDeclaration: - return this.dtdNotation(node, options, level); - default: - throw new Error("Unknown XML node type: " + node.constructor.name); - } - }; - XMLWriterBase2.prototype.processingInstruction = function(node, options, level) { - var r; - this.openNode(node, options, level); - options.state = WriterState.OpenTag; - r = this.indent(node, options, level) + ""; - r += this.endline(node, options, level); - options.state = WriterState.None; - this.closeNode(node, options, level); - return r; - }; - XMLWriterBase2.prototype.raw = function(node, options, level) { - var r; - this.openNode(node, options, level); - options.state = WriterState.OpenTag; - r = this.indent(node, options, level); - options.state = WriterState.InsideTag; - r += node.value; - options.state = WriterState.CloseTag; - r += this.endline(node, options, level); - options.state = WriterState.None; - this.closeNode(node, options, level); - return r; - }; - XMLWriterBase2.prototype.text = function(node, options, level) { - var r; - this.openNode(node, options, level); - options.state = WriterState.OpenTag; - r = this.indent(node, options, level); - options.state = WriterState.InsideTag; - r += node.value; - options.state = WriterState.CloseTag; - r += this.endline(node, options, level); - options.state = WriterState.None; - this.closeNode(node, options, level); - return r; - }; - XMLWriterBase2.prototype.dtdAttList = function(node, options, level) { - var r; - this.openNode(node, options, level); - options.state = WriterState.OpenTag; - r = this.indent(node, options, level) + "" + this.endline(node, options, level); - options.state = WriterState.None; - this.closeNode(node, options, level); - return r; - }; - XMLWriterBase2.prototype.dtdElement = function(node, options, level) { - var r; - this.openNode(node, options, level); - options.state = WriterState.OpenTag; - r = this.indent(node, options, level) + "" + this.endline(node, options, level); - options.state = WriterState.None; - this.closeNode(node, options, level); - return r; - }; - XMLWriterBase2.prototype.dtdEntity = function(node, options, level) { - var r; - this.openNode(node, options, level); - options.state = WriterState.OpenTag; - r = this.indent(node, options, level) + "" + this.endline(node, options, level); - options.state = WriterState.None; - this.closeNode(node, options, level); - return r; - }; - XMLWriterBase2.prototype.dtdNotation = function(node, options, level) { - var r; - this.openNode(node, options, level); - options.state = WriterState.OpenTag; - r = this.indent(node, options, level) + "" + this.endline(node, options, level); - options.state = WriterState.None; - this.closeNode(node, options, level); - return r; - }; - XMLWriterBase2.prototype.openNode = function(node, options, level) { - }; - XMLWriterBase2.prototype.closeNode = function(node, options, level) { - }; - XMLWriterBase2.prototype.openAttribute = function(att, options, level) { - }; - XMLWriterBase2.prototype.closeAttribute = function(att, options, level) { - }; - return XMLWriterBase2; - }(); - }).call(exports2); - } -}); - -// node_modules/xmlbuilder/lib/XMLStringWriter.js -var require_XMLStringWriter = __commonJS({ - "node_modules/xmlbuilder/lib/XMLStringWriter.js"(exports2, module2) { - (function() { - var XMLStringWriter, XMLWriterBase, extend = /* @__PURE__ */ __name(function(child, parent) { - for (var key in parent) { - if (hasProp.call(parent, key)) - child[key] = parent[key]; - } - function ctor() { - this.constructor = child; - } - __name(ctor, "ctor"); - ctor.prototype = parent.prototype; - child.prototype = new ctor(); - child.__super__ = parent.prototype; - return child; - }, "extend"), hasProp = {}.hasOwnProperty; - XMLWriterBase = require_XMLWriterBase(); - module2.exports = XMLStringWriter = function(superClass) { - extend(XMLStringWriter2, superClass); - function XMLStringWriter2(options) { - XMLStringWriter2.__super__.constructor.call(this, options); - } - __name(XMLStringWriter2, "XMLStringWriter"); - XMLStringWriter2.prototype.document = function(doc, options) { - var child, i, len, r, ref; - options = this.filterOptions(options); - r = ""; - ref = doc.children; - for (i = 0, len = ref.length; i < len; i++) { - child = ref[i]; - r += this.writeChildNode(child, options, 0); - } - if (options.pretty && r.slice(-options.newline.length) === options.newline) { - r = r.slice(0, -options.newline.length); - } - return r; - }; - return XMLStringWriter2; - }(XMLWriterBase); - }).call(exports2); - } -}); - -// node_modules/xmlbuilder/lib/XMLDocument.js -var require_XMLDocument = __commonJS({ - "node_modules/xmlbuilder/lib/XMLDocument.js"(exports2, module2) { - (function() { - var NodeType, XMLDOMConfiguration, XMLDOMImplementation, XMLDocument, XMLNode, XMLStringWriter, XMLStringifier, isPlainObject, extend = /* @__PURE__ */ __name(function(child, parent) { - for (var key in parent) { - if (hasProp.call(parent, key)) - child[key] = parent[key]; - } - function ctor() { - this.constructor = child; - } - __name(ctor, "ctor"); - ctor.prototype = parent.prototype; - child.prototype = new ctor(); - child.__super__ = parent.prototype; - return child; - }, "extend"), hasProp = {}.hasOwnProperty; - isPlainObject = require_Utility().isPlainObject; - XMLDOMImplementation = require_XMLDOMImplementation(); - XMLDOMConfiguration = require_XMLDOMConfiguration(); - XMLNode = require_XMLNode(); - NodeType = require_NodeType(); - XMLStringifier = require_XMLStringifier(); - XMLStringWriter = require_XMLStringWriter(); - module2.exports = XMLDocument = function(superClass) { - extend(XMLDocument2, superClass); - function XMLDocument2(options) { - XMLDocument2.__super__.constructor.call(this, null); - this.name = "#document"; - this.type = NodeType.Document; - this.documentURI = null; - this.domConfig = new XMLDOMConfiguration(); - options || (options = {}); - if (!options.writer) { - options.writer = new XMLStringWriter(); - } - this.options = options; - this.stringify = new XMLStringifier(options); - } - __name(XMLDocument2, "XMLDocument"); - Object.defineProperty(XMLDocument2.prototype, "implementation", { - value: new XMLDOMImplementation() - }); - Object.defineProperty(XMLDocument2.prototype, "doctype", { - get: function() { - var child, i, len, ref; - ref = this.children; - for (i = 0, len = ref.length; i < len; i++) { - child = ref[i]; - if (child.type === NodeType.DocType) { - return child; - } - } - return null; - } - }); - Object.defineProperty(XMLDocument2.prototype, "documentElement", { - get: function() { - return this.rootObject || null; - } - }); - Object.defineProperty(XMLDocument2.prototype, "inputEncoding", { - get: function() { - return null; - } - }); - Object.defineProperty(XMLDocument2.prototype, "strictErrorChecking", { - get: function() { - return false; - } - }); - Object.defineProperty(XMLDocument2.prototype, "xmlEncoding", { - get: function() { - if (this.children.length !== 0 && this.children[0].type === NodeType.Declaration) { - return this.children[0].encoding; - } else { - return null; - } - } - }); - Object.defineProperty(XMLDocument2.prototype, "xmlStandalone", { - get: function() { - if (this.children.length !== 0 && this.children[0].type === NodeType.Declaration) { - return this.children[0].standalone === "yes"; - } else { - return false; - } - } - }); - Object.defineProperty(XMLDocument2.prototype, "xmlVersion", { - get: function() { - if (this.children.length !== 0 && this.children[0].type === NodeType.Declaration) { - return this.children[0].version; - } else { - return "1.0"; - } - } - }); - Object.defineProperty(XMLDocument2.prototype, "URL", { - get: function() { - return this.documentURI; - } - }); - Object.defineProperty(XMLDocument2.prototype, "origin", { - get: function() { - return null; - } - }); - Object.defineProperty(XMLDocument2.prototype, "compatMode", { - get: function() { - return null; - } - }); - Object.defineProperty(XMLDocument2.prototype, "characterSet", { - get: function() { - return null; - } - }); - Object.defineProperty(XMLDocument2.prototype, "contentType", { - get: function() { - return null; - } - }); - XMLDocument2.prototype.end = function(writer) { - var writerOptions; - writerOptions = {}; - if (!writer) { - writer = this.options.writer; - } else if (isPlainObject(writer)) { - writerOptions = writer; - writer = this.options.writer; - } - return writer.document(this, writer.filterOptions(writerOptions)); - }; - XMLDocument2.prototype.toString = function(options) { - return this.options.writer.document(this, this.options.writer.filterOptions(options)); - }; - XMLDocument2.prototype.createElement = function(tagName) { - throw new Error("This DOM method is not implemented." + this.debugInfo()); - }; - XMLDocument2.prototype.createDocumentFragment = function() { - throw new Error("This DOM method is not implemented." + this.debugInfo()); - }; - XMLDocument2.prototype.createTextNode = function(data) { - throw new Error("This DOM method is not implemented." + this.debugInfo()); - }; - XMLDocument2.prototype.createComment = function(data) { - throw new Error("This DOM method is not implemented." + this.debugInfo()); - }; - XMLDocument2.prototype.createCDATASection = function(data) { - throw new Error("This DOM method is not implemented." + this.debugInfo()); - }; - XMLDocument2.prototype.createProcessingInstruction = function(target, data) { - throw new Error("This DOM method is not implemented." + this.debugInfo()); - }; - XMLDocument2.prototype.createAttribute = function(name) { - throw new Error("This DOM method is not implemented." + this.debugInfo()); - }; - XMLDocument2.prototype.createEntityReference = function(name) { - throw new Error("This DOM method is not implemented." + this.debugInfo()); - }; - XMLDocument2.prototype.getElementsByTagName = function(tagname) { - throw new Error("This DOM method is not implemented." + this.debugInfo()); - }; - XMLDocument2.prototype.importNode = function(importedNode, deep) { - throw new Error("This DOM method is not implemented." + this.debugInfo()); - }; - XMLDocument2.prototype.createElementNS = function(namespaceURI, qualifiedName) { - throw new Error("This DOM method is not implemented." + this.debugInfo()); - }; - XMLDocument2.prototype.createAttributeNS = function(namespaceURI, qualifiedName) { - throw new Error("This DOM method is not implemented." + this.debugInfo()); - }; - XMLDocument2.prototype.getElementsByTagNameNS = function(namespaceURI, localName) { - throw new Error("This DOM method is not implemented." + this.debugInfo()); - }; - XMLDocument2.prototype.getElementById = function(elementId) { - throw new Error("This DOM method is not implemented." + this.debugInfo()); - }; - XMLDocument2.prototype.adoptNode = function(source) { - throw new Error("This DOM method is not implemented." + this.debugInfo()); - }; - XMLDocument2.prototype.normalizeDocument = function() { - throw new Error("This DOM method is not implemented." + this.debugInfo()); - }; - XMLDocument2.prototype.renameNode = function(node, namespaceURI, qualifiedName) { - throw new Error("This DOM method is not implemented." + this.debugInfo()); - }; - XMLDocument2.prototype.getElementsByClassName = function(classNames) { - throw new Error("This DOM method is not implemented." + this.debugInfo()); - }; - XMLDocument2.prototype.createEvent = function(eventInterface) { - throw new Error("This DOM method is not implemented." + this.debugInfo()); - }; - XMLDocument2.prototype.createRange = function() { - throw new Error("This DOM method is not implemented." + this.debugInfo()); - }; - XMLDocument2.prototype.createNodeIterator = function(root, whatToShow, filter) { - throw new Error("This DOM method is not implemented." + this.debugInfo()); - }; - XMLDocument2.prototype.createTreeWalker = function(root, whatToShow, filter) { - throw new Error("This DOM method is not implemented." + this.debugInfo()); - }; - return XMLDocument2; - }(XMLNode); - }).call(exports2); - } -}); - -// node_modules/xmlbuilder/lib/XMLDocumentCB.js -var require_XMLDocumentCB = __commonJS({ - "node_modules/xmlbuilder/lib/XMLDocumentCB.js"(exports2, module2) { - (function() { - var NodeType, WriterState, XMLAttribute, XMLCData, XMLComment, XMLDTDAttList, XMLDTDElement, XMLDTDEntity, XMLDTDNotation, XMLDeclaration, XMLDocType, XMLDocument, XMLDocumentCB, XMLElement, XMLProcessingInstruction, XMLRaw, XMLStringWriter, XMLStringifier, XMLText, getValue, isFunction, isObject, isPlainObject, ref, hasProp = {}.hasOwnProperty; - ref = require_Utility(), isObject = ref.isObject, isFunction = ref.isFunction, isPlainObject = ref.isPlainObject, getValue = ref.getValue; - NodeType = require_NodeType(); - XMLDocument = require_XMLDocument(); - XMLElement = require_XMLElement(); - XMLCData = require_XMLCData(); - XMLComment = require_XMLComment(); - XMLRaw = require_XMLRaw(); - XMLText = require_XMLText(); - XMLProcessingInstruction = require_XMLProcessingInstruction(); - XMLDeclaration = require_XMLDeclaration(); - XMLDocType = require_XMLDocType(); - XMLDTDAttList = require_XMLDTDAttList(); - XMLDTDEntity = require_XMLDTDEntity(); - XMLDTDElement = require_XMLDTDElement(); - XMLDTDNotation = require_XMLDTDNotation(); - XMLAttribute = require_XMLAttribute(); - XMLStringifier = require_XMLStringifier(); - XMLStringWriter = require_XMLStringWriter(); - WriterState = require_WriterState(); - module2.exports = XMLDocumentCB = function() { - function XMLDocumentCB2(options, onData, onEnd) { - var writerOptions; - this.name = "?xml"; - this.type = NodeType.Document; - options || (options = {}); - writerOptions = {}; - if (!options.writer) { - options.writer = new XMLStringWriter(); - } else if (isPlainObject(options.writer)) { - writerOptions = options.writer; - options.writer = new XMLStringWriter(); - } - this.options = options; - this.writer = options.writer; - this.writerOptions = this.writer.filterOptions(writerOptions); - this.stringify = new XMLStringifier(options); - this.onDataCallback = onData || function() { - }; - this.onEndCallback = onEnd || function() { - }; - this.currentNode = null; - this.currentLevel = -1; - this.openTags = {}; - this.documentStarted = false; - this.documentCompleted = false; - this.root = null; - } - __name(XMLDocumentCB2, "XMLDocumentCB"); - XMLDocumentCB2.prototype.createChildNode = function(node) { - var att, attName, attributes, child, i, len, ref1, ref2; - switch (node.type) { - case NodeType.CData: - this.cdata(node.value); - break; - case NodeType.Comment: - this.comment(node.value); - break; - case NodeType.Element: - attributes = {}; - ref1 = node.attribs; - for (attName in ref1) { - if (!hasProp.call(ref1, attName)) - continue; - att = ref1[attName]; - attributes[attName] = att.value; - } - this.node(node.name, attributes); - break; - case NodeType.Dummy: - this.dummy(); - break; - case NodeType.Raw: - this.raw(node.value); - break; - case NodeType.Text: - this.text(node.value); - break; - case NodeType.ProcessingInstruction: - this.instruction(node.target, node.value); - break; - default: - throw new Error("This XML node type is not supported in a JS object: " + node.constructor.name); - } - ref2 = node.children; - for (i = 0, len = ref2.length; i < len; i++) { - child = ref2[i]; - this.createChildNode(child); - if (child.type === NodeType.Element) { - this.up(); - } - } - return this; - }; - XMLDocumentCB2.prototype.dummy = function() { - return this; - }; - XMLDocumentCB2.prototype.node = function(name, attributes, text) { - var ref1; - if (name == null) { - throw new Error("Missing node name."); - } - if (this.root && this.currentLevel === -1) { - throw new Error("Document can only have one root node. " + this.debugInfo(name)); - } - this.openCurrent(); - name = getValue(name); - if (attributes == null) { - attributes = {}; - } - attributes = getValue(attributes); - if (!isObject(attributes)) { - ref1 = [attributes, text], text = ref1[0], attributes = ref1[1]; - } - this.currentNode = new XMLElement(this, name, attributes); - this.currentNode.children = false; - this.currentLevel++; - this.openTags[this.currentLevel] = this.currentNode; - if (text != null) { - this.text(text); - } - return this; - }; - XMLDocumentCB2.prototype.element = function(name, attributes, text) { - var child, i, len, oldValidationFlag, ref1, root; - if (this.currentNode && this.currentNode.type === NodeType.DocType) { - this.dtdElement.apply(this, arguments); - } else { - if (Array.isArray(name) || isObject(name) || isFunction(name)) { - oldValidationFlag = this.options.noValidation; - this.options.noValidation = true; - root = new XMLDocument(this.options).element("TEMP_ROOT"); - root.element(name); - this.options.noValidation = oldValidationFlag; - ref1 = root.children; - for (i = 0, len = ref1.length; i < len; i++) { - child = ref1[i]; - this.createChildNode(child); - if (child.type === NodeType.Element) { - this.up(); - } - } - } else { - this.node(name, attributes, text); - } - } - return this; - }; - XMLDocumentCB2.prototype.attribute = function(name, value) { - var attName, attValue; - if (!this.currentNode || this.currentNode.children) { - throw new Error("att() can only be used immediately after an ele() call in callback mode. " + this.debugInfo(name)); - } - if (name != null) { - name = getValue(name); - } - if (isObject(name)) { - for (attName in name) { - if (!hasProp.call(name, attName)) - continue; - attValue = name[attName]; - this.attribute(attName, attValue); - } - } else { - if (isFunction(value)) { - value = value.apply(); - } - if (this.options.keepNullAttributes && value == null) { - this.currentNode.attribs[name] = new XMLAttribute(this, name, ""); - } else if (value != null) { - this.currentNode.attribs[name] = new XMLAttribute(this, name, value); - } - } - return this; - }; - XMLDocumentCB2.prototype.text = function(value) { - var node; - this.openCurrent(); - node = new XMLText(this, value); - this.onData(this.writer.text(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1); - return this; - }; - XMLDocumentCB2.prototype.cdata = function(value) { - var node; - this.openCurrent(); - node = new XMLCData(this, value); - this.onData(this.writer.cdata(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1); - return this; - }; - XMLDocumentCB2.prototype.comment = function(value) { - var node; - this.openCurrent(); - node = new XMLComment(this, value); - this.onData(this.writer.comment(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1); - return this; - }; - XMLDocumentCB2.prototype.raw = function(value) { - var node; - this.openCurrent(); - node = new XMLRaw(this, value); - this.onData(this.writer.raw(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1); - return this; - }; - XMLDocumentCB2.prototype.instruction = function(target, value) { - var i, insTarget, insValue, len, node; - this.openCurrent(); - if (target != null) { - target = getValue(target); - } - if (value != null) { - value = getValue(value); - } - if (Array.isArray(target)) { - for (i = 0, len = target.length; i < len; i++) { - insTarget = target[i]; - this.instruction(insTarget); - } - } else if (isObject(target)) { - for (insTarget in target) { - if (!hasProp.call(target, insTarget)) - continue; - insValue = target[insTarget]; - this.instruction(insTarget, insValue); - } - } else { - if (isFunction(value)) { - value = value.apply(); - } - node = new XMLProcessingInstruction(this, target, value); - this.onData(this.writer.processingInstruction(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1); - } - return this; - }; - XMLDocumentCB2.prototype.declaration = function(version3, encoding, standalone) { - var node; - this.openCurrent(); - if (this.documentStarted) { - throw new Error("declaration() must be the first node."); - } - node = new XMLDeclaration(this, version3, encoding, standalone); - this.onData(this.writer.declaration(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1); - return this; - }; - XMLDocumentCB2.prototype.doctype = function(root, pubID, sysID) { - this.openCurrent(); - if (root == null) { - throw new Error("Missing root node name."); - } - if (this.root) { - throw new Error("dtd() must come before the root node."); - } - this.currentNode = new XMLDocType(this, pubID, sysID); - this.currentNode.rootNodeName = root; - this.currentNode.children = false; - this.currentLevel++; - this.openTags[this.currentLevel] = this.currentNode; - return this; - }; - XMLDocumentCB2.prototype.dtdElement = function(name, value) { - var node; - this.openCurrent(); - node = new XMLDTDElement(this, name, value); - this.onData(this.writer.dtdElement(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1); - return this; - }; - XMLDocumentCB2.prototype.attList = function(elementName, attributeName, attributeType, defaultValueType, defaultValue) { - var node; - this.openCurrent(); - node = new XMLDTDAttList(this, elementName, attributeName, attributeType, defaultValueType, defaultValue); - this.onData(this.writer.dtdAttList(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1); - return this; - }; - XMLDocumentCB2.prototype.entity = function(name, value) { - var node; - this.openCurrent(); - node = new XMLDTDEntity(this, false, name, value); - this.onData(this.writer.dtdEntity(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1); - return this; - }; - XMLDocumentCB2.prototype.pEntity = function(name, value) { - var node; - this.openCurrent(); - node = new XMLDTDEntity(this, true, name, value); - this.onData(this.writer.dtdEntity(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1); - return this; - }; - XMLDocumentCB2.prototype.notation = function(name, value) { - var node; - this.openCurrent(); - node = new XMLDTDNotation(this, name, value); - this.onData(this.writer.dtdNotation(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1); - return this; - }; - XMLDocumentCB2.prototype.up = function() { - if (this.currentLevel < 0) { - throw new Error("The document node has no parent."); - } - if (this.currentNode) { - if (this.currentNode.children) { - this.closeNode(this.currentNode); - } else { - this.openNode(this.currentNode); - } - this.currentNode = null; - } else { - this.closeNode(this.openTags[this.currentLevel]); - } - delete this.openTags[this.currentLevel]; - this.currentLevel--; - return this; - }; - XMLDocumentCB2.prototype.end = function() { - while (this.currentLevel >= 0) { - this.up(); - } - return this.onEnd(); - }; - XMLDocumentCB2.prototype.openCurrent = function() { - if (this.currentNode) { - this.currentNode.children = true; - return this.openNode(this.currentNode); - } - }; - XMLDocumentCB2.prototype.openNode = function(node) { - var att, chunk, name, ref1; - if (!node.isOpen) { - if (!this.root && this.currentLevel === 0 && node.type === NodeType.Element) { - this.root = node; - } - chunk = ""; - if (node.type === NodeType.Element) { - this.writerOptions.state = WriterState.OpenTag; - chunk = this.writer.indent(node, this.writerOptions, this.currentLevel) + "<" + node.name; - ref1 = node.attribs; - for (name in ref1) { - if (!hasProp.call(ref1, name)) - continue; - att = ref1[name]; - chunk += this.writer.attribute(att, this.writerOptions, this.currentLevel); - } - chunk += (node.children ? ">" : "/>") + this.writer.endline(node, this.writerOptions, this.currentLevel); - this.writerOptions.state = WriterState.InsideTag; - } else { - this.writerOptions.state = WriterState.OpenTag; - chunk = this.writer.indent(node, this.writerOptions, this.currentLevel) + ""; - } - chunk += this.writer.endline(node, this.writerOptions, this.currentLevel); - } - this.onData(chunk, this.currentLevel); - return node.isOpen = true; - } - }; - XMLDocumentCB2.prototype.closeNode = function(node) { - var chunk; - if (!node.isClosed) { - chunk = ""; - this.writerOptions.state = WriterState.CloseTag; - if (node.type === NodeType.Element) { - chunk = this.writer.indent(node, this.writerOptions, this.currentLevel) + "" + this.writer.endline(node, this.writerOptions, this.currentLevel); - } else { - chunk = this.writer.indent(node, this.writerOptions, this.currentLevel) + "]>" + this.writer.endline(node, this.writerOptions, this.currentLevel); - } - this.writerOptions.state = WriterState.None; - this.onData(chunk, this.currentLevel); - return node.isClosed = true; - } - }; - XMLDocumentCB2.prototype.onData = function(chunk, level) { - this.documentStarted = true; - return this.onDataCallback(chunk, level + 1); - }; - XMLDocumentCB2.prototype.onEnd = function() { - this.documentCompleted = true; - return this.onEndCallback(); - }; - XMLDocumentCB2.prototype.debugInfo = function(name) { - if (name == null) { - return ""; - } else { - return "node: <" + name + ">"; - } - }; - XMLDocumentCB2.prototype.ele = function() { - return this.element.apply(this, arguments); - }; - XMLDocumentCB2.prototype.nod = function(name, attributes, text) { - return this.node(name, attributes, text); - }; - XMLDocumentCB2.prototype.txt = function(value) { - return this.text(value); - }; - XMLDocumentCB2.prototype.dat = function(value) { - return this.cdata(value); - }; - XMLDocumentCB2.prototype.com = function(value) { - return this.comment(value); - }; - XMLDocumentCB2.prototype.ins = function(target, value) { - return this.instruction(target, value); - }; - XMLDocumentCB2.prototype.dec = function(version3, encoding, standalone) { - return this.declaration(version3, encoding, standalone); - }; - XMLDocumentCB2.prototype.dtd = function(root, pubID, sysID) { - return this.doctype(root, pubID, sysID); - }; - XMLDocumentCB2.prototype.e = function(name, attributes, text) { - return this.element(name, attributes, text); - }; - XMLDocumentCB2.prototype.n = function(name, attributes, text) { - return this.node(name, attributes, text); - }; - XMLDocumentCB2.prototype.t = function(value) { - return this.text(value); - }; - XMLDocumentCB2.prototype.d = function(value) { - return this.cdata(value); - }; - XMLDocumentCB2.prototype.c = function(value) { - return this.comment(value); - }; - XMLDocumentCB2.prototype.r = function(value) { - return this.raw(value); - }; - XMLDocumentCB2.prototype.i = function(target, value) { - return this.instruction(target, value); - }; - XMLDocumentCB2.prototype.att = function() { - if (this.currentNode && this.currentNode.type === NodeType.DocType) { - return this.attList.apply(this, arguments); - } else { - return this.attribute.apply(this, arguments); - } - }; - XMLDocumentCB2.prototype.a = function() { - if (this.currentNode && this.currentNode.type === NodeType.DocType) { - return this.attList.apply(this, arguments); - } else { - return this.attribute.apply(this, arguments); - } - }; - XMLDocumentCB2.prototype.ent = function(name, value) { - return this.entity(name, value); - }; - XMLDocumentCB2.prototype.pent = function(name, value) { - return this.pEntity(name, value); - }; - XMLDocumentCB2.prototype.not = function(name, value) { - return this.notation(name, value); - }; - return XMLDocumentCB2; - }(); - }).call(exports2); - } -}); - -// node_modules/xmlbuilder/lib/XMLStreamWriter.js -var require_XMLStreamWriter = __commonJS({ - "node_modules/xmlbuilder/lib/XMLStreamWriter.js"(exports2, module2) { - (function() { - var NodeType, WriterState, XMLStreamWriter, XMLWriterBase, extend = /* @__PURE__ */ __name(function(child, parent) { - for (var key in parent) { - if (hasProp.call(parent, key)) - child[key] = parent[key]; - } - function ctor() { - this.constructor = child; - } - __name(ctor, "ctor"); - ctor.prototype = parent.prototype; - child.prototype = new ctor(); - child.__super__ = parent.prototype; - return child; - }, "extend"), hasProp = {}.hasOwnProperty; - NodeType = require_NodeType(); - XMLWriterBase = require_XMLWriterBase(); - WriterState = require_WriterState(); - module2.exports = XMLStreamWriter = function(superClass) { - extend(XMLStreamWriter2, superClass); - function XMLStreamWriter2(stream, options) { - this.stream = stream; - XMLStreamWriter2.__super__.constructor.call(this, options); - } - __name(XMLStreamWriter2, "XMLStreamWriter"); - XMLStreamWriter2.prototype.endline = function(node, options, level) { - if (node.isLastRootNode && options.state === WriterState.CloseTag) { - return ""; - } else { - return XMLStreamWriter2.__super__.endline.call(this, node, options, level); - } - }; - XMLStreamWriter2.prototype.document = function(doc, options) { - var child, i, j, k, len, len1, ref, ref1, results; - ref = doc.children; - for (i = j = 0, len = ref.length; j < len; i = ++j) { - child = ref[i]; - child.isLastRootNode = i === doc.children.length - 1; - } - options = this.filterOptions(options); - ref1 = doc.children; - results = []; - for (k = 0, len1 = ref1.length; k < len1; k++) { - child = ref1[k]; - results.push(this.writeChildNode(child, options, 0)); - } - return results; - }; - XMLStreamWriter2.prototype.attribute = function(att, options, level) { - return this.stream.write(XMLStreamWriter2.__super__.attribute.call(this, att, options, level)); - }; - XMLStreamWriter2.prototype.cdata = function(node, options, level) { - return this.stream.write(XMLStreamWriter2.__super__.cdata.call(this, node, options, level)); - }; - XMLStreamWriter2.prototype.comment = function(node, options, level) { - return this.stream.write(XMLStreamWriter2.__super__.comment.call(this, node, options, level)); - }; - XMLStreamWriter2.prototype.declaration = function(node, options, level) { - return this.stream.write(XMLStreamWriter2.__super__.declaration.call(this, node, options, level)); - }; - XMLStreamWriter2.prototype.docType = function(node, options, level) { - var child, j, len, ref; - level || (level = 0); - this.openNode(node, options, level); - options.state = WriterState.OpenTag; - this.stream.write(this.indent(node, options, level)); - this.stream.write(" 0) { - this.stream.write(" ["); - this.stream.write(this.endline(node, options, level)); - options.state = WriterState.InsideTag; - ref = node.children; - for (j = 0, len = ref.length; j < len; j++) { - child = ref[j]; - this.writeChildNode(child, options, level + 1); - } - options.state = WriterState.CloseTag; - this.stream.write("]"); - } - options.state = WriterState.CloseTag; - this.stream.write(options.spaceBeforeSlash + ">"); - this.stream.write(this.endline(node, options, level)); - options.state = WriterState.None; - return this.closeNode(node, options, level); - }; - XMLStreamWriter2.prototype.element = function(node, options, level) { - var att, child, childNodeCount, firstChildNode, j, len, name, prettySuppressed, ref, ref1; - level || (level = 0); - this.openNode(node, options, level); - options.state = WriterState.OpenTag; - this.stream.write(this.indent(node, options, level) + "<" + node.name); - ref = node.attribs; - for (name in ref) { - if (!hasProp.call(ref, name)) - continue; - att = ref[name]; - this.attribute(att, options, level); - } - childNodeCount = node.children.length; - firstChildNode = childNodeCount === 0 ? null : node.children[0]; - if (childNodeCount === 0 || node.children.every(function(e) { - return (e.type === NodeType.Text || e.type === NodeType.Raw) && e.value === ""; - })) { - if (options.allowEmpty) { - this.stream.write(">"); - options.state = WriterState.CloseTag; - this.stream.write(""); - } else { - options.state = WriterState.CloseTag; - this.stream.write(options.spaceBeforeSlash + "/>"); - } - } else if (options.pretty && childNodeCount === 1 && (firstChildNode.type === NodeType.Text || firstChildNode.type === NodeType.Raw) && firstChildNode.value != null) { - this.stream.write(">"); - options.state = WriterState.InsideTag; - options.suppressPrettyCount++; - prettySuppressed = true; - this.writeChildNode(firstChildNode, options, level + 1); - options.suppressPrettyCount--; - prettySuppressed = false; - options.state = WriterState.CloseTag; - this.stream.write(""); - } else { - this.stream.write(">" + this.endline(node, options, level)); - options.state = WriterState.InsideTag; - ref1 = node.children; - for (j = 0, len = ref1.length; j < len; j++) { - child = ref1[j]; - this.writeChildNode(child, options, level + 1); - } - options.state = WriterState.CloseTag; - this.stream.write(this.indent(node, options, level) + ""); - } - this.stream.write(this.endline(node, options, level)); - options.state = WriterState.None; - return this.closeNode(node, options, level); - }; - XMLStreamWriter2.prototype.processingInstruction = function(node, options, level) { - return this.stream.write(XMLStreamWriter2.__super__.processingInstruction.call(this, node, options, level)); - }; - XMLStreamWriter2.prototype.raw = function(node, options, level) { - return this.stream.write(XMLStreamWriter2.__super__.raw.call(this, node, options, level)); - }; - XMLStreamWriter2.prototype.text = function(node, options, level) { - return this.stream.write(XMLStreamWriter2.__super__.text.call(this, node, options, level)); - }; - XMLStreamWriter2.prototype.dtdAttList = function(node, options, level) { - return this.stream.write(XMLStreamWriter2.__super__.dtdAttList.call(this, node, options, level)); - }; - XMLStreamWriter2.prototype.dtdElement = function(node, options, level) { - return this.stream.write(XMLStreamWriter2.__super__.dtdElement.call(this, node, options, level)); - }; - XMLStreamWriter2.prototype.dtdEntity = function(node, options, level) { - return this.stream.write(XMLStreamWriter2.__super__.dtdEntity.call(this, node, options, level)); - }; - XMLStreamWriter2.prototype.dtdNotation = function(node, options, level) { - return this.stream.write(XMLStreamWriter2.__super__.dtdNotation.call(this, node, options, level)); - }; - return XMLStreamWriter2; - }(XMLWriterBase); - }).call(exports2); - } -}); - -// node_modules/xmlbuilder/lib/index.js -var require_lib2 = __commonJS({ - "node_modules/xmlbuilder/lib/index.js"(exports2, module2) { - (function() { - var NodeType, WriterState, XMLDOMImplementation, XMLDocument, XMLDocumentCB, XMLStreamWriter, XMLStringWriter, assign, isFunction, ref; - ref = require_Utility(), assign = ref.assign, isFunction = ref.isFunction; - XMLDOMImplementation = require_XMLDOMImplementation(); - XMLDocument = require_XMLDocument(); - XMLDocumentCB = require_XMLDocumentCB(); - XMLStringWriter = require_XMLStringWriter(); - XMLStreamWriter = require_XMLStreamWriter(); - NodeType = require_NodeType(); - WriterState = require_WriterState(); - module2.exports.create = function(name, xmldec, doctype, options) { - var doc, root; - if (name == null) { - throw new Error("Root element needs a name."); - } - options = assign({}, xmldec, doctype, options); - doc = new XMLDocument(options); - root = doc.element(name); - if (!options.headless) { - doc.declaration(options); - if (options.pubID != null || options.sysID != null) { - doc.dtd(options); - } - } - return root; - }; - module2.exports.begin = function(options, onData, onEnd) { - var ref1; - if (isFunction(options)) { - ref1 = [options, onData], onData = ref1[0], onEnd = ref1[1]; - options = {}; - } - if (onData) { - return new XMLDocumentCB(options, onData, onEnd); - } else { - return new XMLDocument(options); - } - }; - module2.exports.stringWriter = function(options) { - return new XMLStringWriter(options); - }; - module2.exports.streamWriter = function(stream, options) { - return new XMLStreamWriter(stream, options); - }; - module2.exports.implementation = new XMLDOMImplementation(); - module2.exports.nodeType = NodeType; - module2.exports.writerState = WriterState; - }).call(exports2); - } -}); - -// node_modules/xml2js/lib/builder.js -var require_builder = __commonJS({ - "node_modules/xml2js/lib/builder.js"(exports2) { - (function() { - "use strict"; - var builder, defaults, escapeCDATA, requiresCDATA, wrapCDATA, hasProp = {}.hasOwnProperty; - builder = require_lib2(); - defaults = require_defaults().defaults; - requiresCDATA = /* @__PURE__ */ __name(function(entry) { - return typeof entry === "string" && (entry.indexOf("&") >= 0 || entry.indexOf(">") >= 0 || entry.indexOf("<") >= 0); - }, "requiresCDATA"); - wrapCDATA = /* @__PURE__ */ __name(function(entry) { - return ""; - }, "wrapCDATA"); - escapeCDATA = /* @__PURE__ */ __name(function(entry) { - return entry.replace("]]>", "]]]]>"); - }, "escapeCDATA"); - exports2.Builder = function() { - function Builder(opts) { - var key, ref, value; - this.options = {}; - ref = defaults["0.2"]; - for (key in ref) { - if (!hasProp.call(ref, key)) - continue; - value = ref[key]; - this.options[key] = value; - } - for (key in opts) { - if (!hasProp.call(opts, key)) - continue; - value = opts[key]; - this.options[key] = value; - } - } - __name(Builder, "Builder"); - Builder.prototype.buildObject = function(rootObj) { - var attrkey, charkey, render, rootElement, rootName; - attrkey = this.options.attrkey; - charkey = this.options.charkey; - if (Object.keys(rootObj).length === 1 && this.options.rootName === defaults["0.2"].rootName) { - rootName = Object.keys(rootObj)[0]; - rootObj = rootObj[rootName]; - } else { - rootName = this.options.rootName; - } - render = /* @__PURE__ */ function(_this) { - return function(element, obj) { - var attr, child, entry, index, key, value; - if (typeof obj !== "object") { - if (_this.options.cdata && requiresCDATA(obj)) { - element.raw(wrapCDATA(obj)); - } else { - element.txt(obj); - } - } else if (Array.isArray(obj)) { - for (index in obj) { - if (!hasProp.call(obj, index)) - continue; - child = obj[index]; - for (key in child) { - entry = child[key]; - element = render(element.ele(key), entry).up(); - } - } - } else { - for (key in obj) { - if (!hasProp.call(obj, key)) - continue; - child = obj[key]; - if (key === attrkey) { - if (typeof child === "object") { - for (attr in child) { - value = child[attr]; - element = element.att(attr, value); - } - } - } else if (key === charkey) { - if (_this.options.cdata && requiresCDATA(child)) { - element = element.raw(wrapCDATA(child)); - } else { - element = element.txt(child); - } - } else if (Array.isArray(child)) { - for (index in child) { - if (!hasProp.call(child, index)) - continue; - entry = child[index]; - if (typeof entry === "string") { - if (_this.options.cdata && requiresCDATA(entry)) { - element = element.ele(key).raw(wrapCDATA(entry)).up(); - } else { - element = element.ele(key, entry).up(); - } - } else { - element = render(element.ele(key), entry).up(); - } - } - } else if (typeof child === "object") { - element = render(element.ele(key), child).up(); - } else { - if (typeof child === "string" && _this.options.cdata && requiresCDATA(child)) { - element = element.ele(key).raw(wrapCDATA(child)).up(); - } else { - if (child == null) { - child = ""; - } - element = element.ele(key, child.toString()).up(); - } - } - } - } - return element; - }; - }(this); - rootElement = builder.create(rootName, this.options.xmldec, this.options.doctype, { - headless: this.options.headless, - allowSurrogateChars: this.options.allowSurrogateChars - }); - return render(rootElement, rootObj).end(this.options.renderOpts); - }; - return Builder; - }(); - }).call(exports2); - } -}); - -// node_modules/sax/lib/sax.js -var require_sax = __commonJS({ - "node_modules/sax/lib/sax.js"(exports2) { - (function(sax) { - sax.parser = function(strict, opt) { - return new SAXParser(strict, opt); - }; - sax.SAXParser = SAXParser; - sax.SAXStream = SAXStream; - sax.createStream = createStream; - sax.MAX_BUFFER_LENGTH = 64 * 1024; - var buffers = [ - "comment", - "sgmlDecl", - "textNode", - "tagName", - "doctype", - "procInstName", - "procInstBody", - "entity", - "attribName", - "attribValue", - "cdata", - "script" - ]; - sax.EVENTS = [ - "text", - "processinginstruction", - "sgmldeclaration", - "doctype", - "comment", - "opentagstart", - "attribute", - "opentag", - "closetag", - "opencdata", - "cdata", - "closecdata", - "error", - "end", - "ready", - "script", - "opennamespace", - "closenamespace" - ]; - function SAXParser(strict, opt) { - if (!(this instanceof SAXParser)) { - return new SAXParser(strict, opt); - } - var parser = this; - clearBuffers(parser); - parser.q = parser.c = ""; - parser.bufferCheckPosition = sax.MAX_BUFFER_LENGTH; - parser.opt = opt || {}; - parser.opt.lowercase = parser.opt.lowercase || parser.opt.lowercasetags; - parser.looseCase = parser.opt.lowercase ? "toLowerCase" : "toUpperCase"; - parser.tags = []; - parser.closed = parser.closedRoot = parser.sawRoot = false; - parser.tag = parser.error = null; - parser.strict = !!strict; - parser.noscript = !!(strict || parser.opt.noscript); - parser.state = S.BEGIN; - parser.strictEntities = parser.opt.strictEntities; - parser.ENTITIES = parser.strictEntities ? Object.create(sax.XML_ENTITIES) : Object.create(sax.ENTITIES); - parser.attribList = []; - if (parser.opt.xmlns) { - parser.ns = Object.create(rootNS); - } - parser.trackPosition = parser.opt.position !== false; - if (parser.trackPosition) { - parser.position = parser.line = parser.column = 0; - } - emit(parser, "onready"); - } - __name(SAXParser, "SAXParser"); - if (!Object.create) { - Object.create = function(o) { - function F() { - } - __name(F, "F"); - F.prototype = o; - var newf = new F(); - return newf; - }; - } - if (!Object.keys) { - Object.keys = function(o) { - var a = []; - for (var i in o) - if (o.hasOwnProperty(i)) - a.push(i); - return a; - }; - } - function checkBufferLength(parser) { - var maxAllowed = Math.max(sax.MAX_BUFFER_LENGTH, 10); - var maxActual = 0; - for (var i = 0, l = buffers.length; i < l; i++) { - var len = parser[buffers[i]].length; - if (len > maxAllowed) { - switch (buffers[i]) { - case "textNode": - closeText(parser); - break; - case "cdata": - emitNode(parser, "oncdata", parser.cdata); - parser.cdata = ""; - break; - case "script": - emitNode(parser, "onscript", parser.script); - parser.script = ""; - break; - default: - error(parser, "Max buffer length exceeded: " + buffers[i]); - } - } - maxActual = Math.max(maxActual, len); - } - var m = sax.MAX_BUFFER_LENGTH - maxActual; - parser.bufferCheckPosition = m + parser.position; - } - __name(checkBufferLength, "checkBufferLength"); - function clearBuffers(parser) { - for (var i = 0, l = buffers.length; i < l; i++) { - parser[buffers[i]] = ""; - } - } - __name(clearBuffers, "clearBuffers"); - function flushBuffers(parser) { - closeText(parser); - if (parser.cdata !== "") { - emitNode(parser, "oncdata", parser.cdata); - parser.cdata = ""; - } - if (parser.script !== "") { - emitNode(parser, "onscript", parser.script); - parser.script = ""; - } - } - __name(flushBuffers, "flushBuffers"); - SAXParser.prototype = { - end: function() { - end(this); - }, - write, - resume: function() { - this.error = null; - return this; - }, - close: function() { - return this.write(null); - }, - flush: function() { - flushBuffers(this); - } - }; - var Stream; - try { - Stream = require("stream").Stream; - } catch (ex) { - Stream = /* @__PURE__ */ __name(function() { - }, "Stream"); - } - if (!Stream) - Stream = /* @__PURE__ */ __name(function() { - }, "Stream"); - var streamWraps = sax.EVENTS.filter(function(ev) { - return ev !== "error" && ev !== "end"; - }); - function createStream(strict, opt) { - return new SAXStream(strict, opt); - } - __name(createStream, "createStream"); - function SAXStream(strict, opt) { - if (!(this instanceof SAXStream)) { - return new SAXStream(strict, opt); - } - Stream.apply(this); - this._parser = new SAXParser(strict, opt); - this.writable = true; - this.readable = true; - var me = this; - this._parser.onend = function() { - me.emit("end"); - }; - this._parser.onerror = function(er) { - me.emit("error", er); - me._parser.error = null; - }; - this._decoder = null; - streamWraps.forEach(function(ev) { - Object.defineProperty(me, "on" + ev, { - get: function() { - return me._parser["on" + ev]; - }, - set: function(h) { - if (!h) { - me.removeAllListeners(ev); - me._parser["on" + ev] = h; - return h; - } - me.on(ev, h); - }, - enumerable: true, - configurable: false - }); - }); - } - __name(SAXStream, "SAXStream"); - SAXStream.prototype = Object.create(Stream.prototype, { - constructor: { - value: SAXStream - } - }); - SAXStream.prototype.write = function(data) { - if (typeof Buffer === "function" && typeof Buffer.isBuffer === "function" && Buffer.isBuffer(data)) { - if (!this._decoder) { - var SD = require("string_decoder").StringDecoder; - this._decoder = new SD("utf8"); - } - data = this._decoder.write(data); - } - this._parser.write(data.toString()); - this.emit("data", data); - return true; - }; - SAXStream.prototype.end = function(chunk) { - if (chunk && chunk.length) { - this.write(chunk); - } - this._parser.end(); - return true; - }; - SAXStream.prototype.on = function(ev, handler) { - var me = this; - if (!me._parser["on" + ev] && streamWraps.indexOf(ev) !== -1) { - me._parser["on" + ev] = function() { - var args = arguments.length === 1 ? [arguments[0]] : Array.apply(null, arguments); - args.splice(0, 0, ev); - me.emit.apply(me, args); - }; - } - return Stream.prototype.on.call(me, ev, handler); - }; - var CDATA = "[CDATA["; - var DOCTYPE = "DOCTYPE"; - var XML_NAMESPACE = "http://www.w3.org/XML/1998/namespace"; - var XMLNS_NAMESPACE = "http://www.w3.org/2000/xmlns/"; - var rootNS = { xml: XML_NAMESPACE, xmlns: XMLNS_NAMESPACE }; - var nameStart = /[:_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]/; - var nameBody = /[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/; - var entityStart = /[#:_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]/; - var entityBody = /[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/; - function isWhitespace(c) { - return c === " " || c === "\n" || c === "\r" || c === " "; - } - __name(isWhitespace, "isWhitespace"); - function isQuote(c) { - return c === '"' || c === "'"; - } - __name(isQuote, "isQuote"); - function isAttribEnd(c) { - return c === ">" || isWhitespace(c); - } - __name(isAttribEnd, "isAttribEnd"); - function isMatch(regex, c) { - return regex.test(c); - } - __name(isMatch, "isMatch"); - function notMatch(regex, c) { - return !isMatch(regex, c); - } - __name(notMatch, "notMatch"); - var S = 0; - sax.STATE = { - BEGIN: S++, - // leading byte order mark or whitespace - BEGIN_WHITESPACE: S++, - // leading whitespace - TEXT: S++, - // general stuff - TEXT_ENTITY: S++, - // & and such. - OPEN_WAKA: S++, - // < - SGML_DECL: S++, - // - SCRIPT: S++, - //