sheetxl
Version:
SheetXL - Command line tool
909 lines • 104 kB
JavaScript
/**
* @license sheetxl - SheetXL - Command line tool - v0.6.0
*
* (C) 2025-present SheetXL Inc. & Michael T. Ford
* License: The license can be found at https://www.sheetxl.com/license.
*/
import { g as e } from "../cli.js";
function r(e2, r2) {
for (var t2 = 0; t2 < r2.length; t2++) {
const n2 = r2[t2];
if ("string" != typeof n2 && !Array.isArray(n2)) {
for (const r3 in n2) if ("default" !== r3 && !(r3 in e2)) {
const t3 = Object.getOwnPropertyDescriptor(n2, r3);
t3 && Object.defineProperty(e2, r3, t3.get ? t3 : { enumerable: true, get: () => n2[r3] });
}
}
}
return Object.freeze(Object.defineProperty(e2, Symbol.toStringTag, { value: "Module" }));
}
var t, n = {}, o = {};
function a() {
if (t) return o;
function e2(e3, r3) {
return void 0 === r3 && (r3 = Object), r3 && "function" == typeof r3.getOwnPropertyDescriptors && (e3 = r3.create(null, r3.getOwnPropertyDescriptors(e3))), r3 && "function" == typeof r3.freeze ? r3.freeze(e3) : e3;
}
function r2(e3, r3) {
return Object.prototype.hasOwnProperty.call(e3, r3);
}
t = 1;
var n2 = e2({ allowfullscreen: true, async: true, autofocus: true, autoplay: true, checked: true, controls: true, default: true, defer: true, disabled: true, formnovalidate: true, hidden: true, ismap: true, itemscope: true, loop: true, multiple: true, muted: true, nomodule: true, novalidate: true, open: true, playsinline: true, readonly: true, required: true, reversed: true, selected: true });
var a2 = e2({ area: true, base: true, br: true, col: true, embed: true, hr: true, img: true, input: true, link: true, meta: true, param: true, source: true, track: true, wbr: true });
var i2 = e2({ script: false, style: false, textarea: true, title: true });
function s2(e3) {
return e3 === l2.HTML;
}
var l2 = e2({ HTML: "text/html", XML_APPLICATION: "application/xml", XML_TEXT: "text/xml", XML_XHTML_APPLICATION: "application/xhtml+xml", XML_SVG_IMAGE: "image/svg+xml" }), c2 = Object.keys(l2).map(function(e3) {
return l2[e3];
});
var u2 = e2({ HTML: "http://www.w3.org/1999/xhtml", SVG: "http://www.w3.org/2000/svg", XML: "http://www.w3.org/XML/1998/namespace", XMLNS: "http://www.w3.org/2000/xmlns/" });
return o.assign = function(e3, t2) {
if (null === e3 || "object" != typeof e3) throw new TypeError("target is not an object");
for (var n3 in t2) r2(t2, n3) && (e3[n3] = t2[n3]);
return e3;
}, o.find = function(e3, t2, n3) {
if (void 0 === n3 && (n3 = Array.prototype), e3 && "function" == typeof n3.find) return n3.find.call(e3, t2);
for (var o2 = 0; o2 < e3.length; o2++) if (r2(e3, o2)) {
var a3 = e3[o2];
if (t2.call(void 0, a3, o2, e3)) return a3;
}
}, o.freeze = e2, o.HTML_BOOLEAN_ATTRIBUTES = n2, o.HTML_RAW_TEXT_ELEMENTS = i2, o.HTML_VOID_ELEMENTS = a2, o.hasDefaultHTMLNamespace = function(e3) {
return s2(e3) || e3 === l2.XML_XHTML_APPLICATION;
}, o.hasOwn = r2, o.isHTMLBooleanAttribute = function(e3) {
return r2(n2, e3.toLowerCase());
}, o.isHTMLRawTextElement = function(e3) {
var t2 = e3.toLowerCase();
return r2(i2, t2) && !i2[t2];
}, o.isHTMLEscapableRawTextElement = function(e3) {
var t2 = e3.toLowerCase();
return r2(i2, t2) && i2[t2];
}, o.isHTMLMimeType = s2, o.isHTMLVoidElement = function(e3) {
return r2(a2, e3.toLowerCase());
}, o.isValidMimeType = function(e3) {
return c2.indexOf(e3) > -1;
}, o.MIME_TYPE = l2, o.NAMESPACE = u2, o;
}
var i, s = {};
function l() {
if (i) return s;
function e2(e3, r3) {
e3.prototype = Object.create(Error.prototype, { constructor: { value: e3 }, name: { value: e3.name, enumerable: true, writable: r3 } });
}
i = 1;
var r2 = a().freeze({ Error: "Error", IndexSizeError: "IndexSizeError", DomstringSizeError: "DomstringSizeError", HierarchyRequestError: "HierarchyRequestError", WrongDocumentError: "WrongDocumentError", InvalidCharacterError: "InvalidCharacterError", NoDataAllowedError: "NoDataAllowedError", NoModificationAllowedError: "NoModificationAllowedError", NotFoundError: "NotFoundError", NotSupportedError: "NotSupportedError", InUseAttributeError: "InUseAttributeError", InvalidStateError: "InvalidStateError", SyntaxError: "SyntaxError", InvalidModificationError: "InvalidModificationError", NamespaceError: "NamespaceError", InvalidAccessError: "InvalidAccessError", ValidationError: "ValidationError", TypeMismatchError: "TypeMismatchError", SecurityError: "SecurityError", NetworkError: "NetworkError", AbortError: "AbortError", URLMismatchError: "URLMismatchError", QuotaExceededError: "QuotaExceededError", TimeoutError: "TimeoutError", InvalidNodeTypeError: "InvalidNodeTypeError", DataCloneError: "DataCloneError", EncodingError: "EncodingError", NotReadableError: "NotReadableError", UnknownError: "UnknownError", ConstraintError: "ConstraintError", DataError: "DataError", TransactionInactiveError: "TransactionInactiveError", ReadOnlyError: "ReadOnlyError", VersionError: "VersionError", OperationError: "OperationError", NotAllowedError: "NotAllowedError", OptOutError: "OptOutError" }), t2 = Object.keys(r2);
function n2(e3) {
return "number" == typeof e3 && e3 >= 1 && e3 <= 25;
}
function o2(e3, a2) {
var i2;
n2(e3) ? (this.name = t2[e3], this.message = a2 || "") : (this.message = e3, this.name = "string" == typeof (i2 = a2) && i2.substring(i2.length - r2.Error.length) === r2.Error ? a2 : r2.Error), Error.captureStackTrace && Error.captureStackTrace(this, o2);
}
e2(o2, true), Object.defineProperties(o2.prototype, { code: { enumerable: true, get: function() {
var e3 = t2.indexOf(this.name);
return n2(e3) ? e3 : 0;
} } });
for (var l2 = { INDEX_SIZE_ERR: 1, DOMSTRING_SIZE_ERR: 2, HIERARCHY_REQUEST_ERR: 3, WRONG_DOCUMENT_ERR: 4, INVALID_CHARACTER_ERR: 5, NO_DATA_ALLOWED_ERR: 6, NO_MODIFICATION_ALLOWED_ERR: 7, NOT_FOUND_ERR: 8, NOT_SUPPORTED_ERR: 9, INUSE_ATTRIBUTE_ERR: 10, INVALID_STATE_ERR: 11, SYNTAX_ERR: 12, INVALID_MODIFICATION_ERR: 13, NAMESPACE_ERR: 14, INVALID_ACCESS_ERR: 15, VALIDATION_ERR: 16, TYPE_MISMATCH_ERR: 17, SECURITY_ERR: 18, NETWORK_ERR: 19, ABORT_ERR: 20, URL_MISMATCH_ERR: 21, QUOTA_EXCEEDED_ERR: 22, TIMEOUT_ERR: 23, INVALID_NODE_TYPE_ERR: 24, DATA_CLONE_ERR: 25 }, c2 = Object.entries(l2), u2 = 0; u2 < c2.length; u2++) {
o2[c2[u2][0]] = c2[u2][1];
}
function p2(e3, r3) {
this.message = e3, this.locator = r3, Error.captureStackTrace && Error.captureStackTrace(this, p2);
}
return e2(p2), s.DOMException = o2, s.DOMExceptionName = r2, s.ExceptionCode = l2, s.ParseError = p2, s;
}
var c, u, p = {}, d = {};
function f() {
if (c) return d;
function e2(e3) {
try {
"function" != typeof e3 && (e3 = RegExp);
var r3 = new e3("𝌆", "u").exec("𝌆");
return !!r3 && 2 === r3[0].length;
} catch (e4) {
}
return false;
}
c = 1;
var r2 = e2();
function t2(e3) {
if ("[" !== e3.source[0]) throw new Error(e3 + " can not be used with chars");
return e3.source.slice(1, e3.source.lastIndexOf("]"));
}
function n2(e3, t3) {
if ("[" !== e3.source[0]) throw new Error("/" + e3.source + "/ can not be used with chars_without");
if (!t3 || "string" != typeof t3) throw new Error(JSON.stringify(t3) + " is not a valid search");
if (-1 === e3.source.indexOf(t3)) throw new Error('"' + t3 + '" is not is /' + e3.source + "/");
if ("-" === t3 && 1 !== e3.source.indexOf(t3)) throw new Error('"' + t3 + '" is not at the first postion of /' + e3.source + "/");
return new RegExp(e3.source.replace(t3, ""), r2 ? "u" : "");
}
function o2(e3) {
var t3 = this;
return new RegExp(Array.prototype.slice.call(arguments).map(function(e4) {
var r3 = "string" == typeof e4;
if (r3 && void 0 === t3 && "|" === e4) throw new Error("use regg instead of reg to wrap expressions with `|`!");
return r3 ? e4 : e4.source;
}).join(""), r2 ? "mu" : "m");
}
function a2(e3) {
if (0 === arguments.length) throw new Error("no parameters provided");
return o2.apply(a2, ["(?:"].concat(Array.prototype.slice.call(arguments), [")"]));
}
var i2 = /[-\x09\x0A\x0D\x20-\x2C\x2E-\uD7FF\uE000-\uFFFD]/;
r2 && (i2 = o2("[", t2(i2), "\\u{10000}-\\u{10FFFF}", "]"));
var s2 = /[\x20\x09\x0D\x0A]/, l2 = t2(s2), u2 = o2(s2, "+"), p2 = o2(s2, "*"), f2 = /[:_a-zA-Z\xC0-\xD6\xD8-\xF6\xF8-\u02FF\u0370-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/;
r2 && (f2 = o2("[", t2(f2), "\\u{10000}-\\u{10FFFF}", "]"));
var h2 = o2("[", t2(f2), t2(/[-.0-9\xB7]/), t2(/[\u0300-\u036F\u203F-\u2040]/), "]"), m2 = o2(f2, h2, "*"), E2 = o2(h2, "+"), g2 = o2("&", m2, ";"), N2 = a2(/&#[0-9]+;|&#x[0-9a-fA-F]+;/), T2 = a2(g2, "|", N2), b2 = o2("%", m2, ";"), w2 = a2(o2('"', a2(/[^%&"]/, "|", b2, "|", T2), "*", '"'), "|", o2("'", a2(/[^%&']/, "|", b2, "|", T2), "*", "'")), v2 = a2('"', a2(/[^<&"]/, "|", T2), "*", '"', "|", "'", a2(/[^<&']/, "|", T2), "*", "'"), y2 = o2(n2(f2, ":"), n2(h2, ":"), "*"), D2 = o2(y2, a2(":", y2), "?"), S2 = o2("^", D2, "$"), A2 = o2("(", D2, ")"), I = a2(/"[^"]*"|'[^']*'/), O = o2(/^<\?/, "(", m2, ")", a2(u2, "(", i2, "*?)"), "?", /\?>/), C = /[\x20\x0D\x0Aa-zA-Z0-9-'()+,./:=?;!*#@$_%]/, x = a2('"', C, '*"', "|", "'", n2(C, "'"), "*'"), R = "<!--", _ = o2(R, a2(n2(i2, "-"), "|", o2("-", n2(i2, "-"))), "*", "-->"), L = "#PCDATA", M = a2(o2(/\(/, p2, L, a2(p2, /\|/, p2, D2), "*", p2, /\)\*/), "|", o2(/\(/, p2, L, p2, /\)/)), q = a2("EMPTY", "|", "ANY", "|", M, "|", o2(/\([^>]+\)/, /[?*+]?/)), U = o2("<!ELEMENT", u2, a2(D2, "|", b2), u2, a2(q, "|", b2), p2, ">"), P = o2("NOTATION", u2, /\(/, p2, m2, a2(p2, /\|/, p2, m2), "*", p2, /\)/), k = o2(/\(/, p2, E2, a2(p2, /\|/, p2, E2), "*", p2, /\)/), H = a2(P, "|", k), V = a2(/CDATA|ID|IDREF|IDREFS|ENTITY|ENTITIES|NMTOKEN|NMTOKENS/, "|", H), B = a2(/#REQUIRED|#IMPLIED/, "|", a2(a2("#FIXED", u2), "?", v2)), F = o2("<!ATTLIST", u2, m2, a2(u2, m2, u2, V, u2, B), "*", p2, ">"), G = "about:legacy-compat", Y = a2('"' + G + '"', "|", "'" + G + "'"), X = "SYSTEM", j = "PUBLIC", z = a2(a2(X, u2, I), "|", a2(j, u2, x, u2, I)), Q = o2("^", a2(a2(X, u2, "(?<SystemLiteralOnly>", I, ")"), "|", a2(j, u2, "(?<PubidLiteral>", x, ")", u2, "(?<SystemLiteral>", I, ")"))), W = a2(u2, "NDATA", u2, m2), Z = "<!ENTITY", $ = o2(Z, u2, m2, u2, a2(w2, "|", a2(z, W, "?")), p2, ">"), J = a2(w2, "|", z), K = a2($, "|", o2(Z, u2, "%", u2, m2, u2, J, p2, ">")), ee = o2(j, u2, x), re = o2("<!NOTATION", u2, m2, u2, a2(z, "|", ee), p2, ">"), te = o2(p2, "=", p2), ne = /1[.]\d+/, oe = o2(u2, "version", te, a2("'", ne, "'", "|", '"', ne, '"')), ae = /[A-Za-z][-A-Za-z0-9._]*/, ie = o2(/^<\?xml/, oe, a2(u2, "encoding", te, a2('"', ae, '"', "|", "'", ae, "'")), "?", a2(u2, "standalone", te, a2("'", a2("yes", "|", "no"), "'", "|", '"', a2("yes", "|", "no"), '"')), "?", p2, /\?>/), se = o2(i2, "*?", /\]\]>/), le = o2(/<!\[CDATA\[/, se);
return d.chars = t2, d.chars_without = n2, d.detectUnicodeSupport = e2, d.reg = o2, d.regg = a2, d.ABOUT_LEGACY_COMPAT = G, d.ABOUT_LEGACY_COMPAT_SystemLiteral = Y, d.AttlistDecl = F, d.CDATA_START = "<![CDATA[", d.CDATA_END = "]]>", d.CDSect = le, d.Char = i2, d.Comment = _, d.COMMENT_START = R, d.COMMENT_END = "-->", d.DOCTYPE_DECL_START = "<!DOCTYPE", d.elementdecl = U, d.EntityDecl = K, d.EntityValue = w2, d.ExternalID = z, d.ExternalID_match = Q, d.Name = m2, d.NotationDecl = re, d.Reference = T2, d.PEReference = b2, d.PI = O, d.PUBLIC = j, d.PubidLiteral = x, d.QName = D2, d.QName_exact = S2, d.QName_group = A2, d.S = u2, d.SChar_s = l2, d.S_OPT = p2, d.SYSTEM = X, d.SystemLiteral = I, d.UNICODE_REPLACEMENT_CHARACTER = "�", d.UNICODE_SUPPORT = r2, d.XMLDecl = ie, d;
}
function h() {
if (u) return p;
u = 1;
var e2 = a(), r2 = e2.find, t2 = e2.hasDefaultHTMLNamespace, n2 = e2.hasOwn, o2 = e2.isHTMLMimeType, i2 = e2.isHTMLRawTextElement, s2 = e2.isHTMLVoidElement, c2 = e2.MIME_TYPE, d2 = e2.NAMESPACE, h2 = Symbol(), m2 = l(), E2 = m2.DOMException, g2 = m2.DOMExceptionName, N2 = f();
function T2(e3) {
if (e3 !== h2) throw new TypeError("Illegal constructor");
}
function b2(e3) {
return "" !== e3;
}
function w2(e3, r3) {
return n2(e3, r3) || (e3[r3] = true), e3;
}
function v2(e3) {
if (!e3) return [];
var r3 = function(e4) {
return e4 ? e4.split(/[\t\n\f\r ]+/).filter(b2) : [];
}(e3);
return Object.keys(r3.reduce(w2, {}));
}
function y2(e3) {
if (!N2.QName_exact.test(e3)) throw new E2(E2.INVALID_CHARACTER_ERR, 'invalid character in qualified name "' + e3 + '"');
}
function D2(r3, t3) {
y2(t3), r3 = r3 || null;
var n3 = null, o3 = t3;
if (t3.indexOf(":") >= 0) {
var a2 = t3.split(":");
n3 = a2[0], o3 = a2[1];
}
if (null !== n3 && null === r3) throw new E2(E2.NAMESPACE_ERR, "prefix is non-null and namespace is null");
if ("xml" === n3 && r3 !== e2.NAMESPACE.XML) throw new E2(E2.NAMESPACE_ERR, 'prefix is "xml" and namespace is not the XML namespace');
if (("xmlns" === n3 || "xmlns" === t3) && r3 !== e2.NAMESPACE.XMLNS) throw new E2(E2.NAMESPACE_ERR, 'either qualifiedName or prefix is "xmlns" and namespace is not the XMLNS namespace');
if (r3 === e2.NAMESPACE.XMLNS && "xmlns" !== n3 && "xmlns" !== t3) throw new E2(E2.NAMESPACE_ERR, 'namespace is the XMLNS namespace and neither qualifiedName nor prefix is "xmlns"');
return [r3, n3, o3];
}
function S2(e3, r3) {
for (var t3 in e3) n2(e3, t3) && (r3[t3] = e3[t3]);
}
function A2(e3, r3) {
var t3 = e3.prototype;
if (!(t3 instanceof r3)) {
let n3 = function() {
};
n3.prototype = r3.prototype, S2(t3, n3 = new n3()), e3.prototype = t3 = n3;
}
t3.constructor != e3 && ("function" != typeof e3 && console.error("unknown Class:" + e3), t3.constructor = e3);
}
var I = {}, O = I.ELEMENT_NODE = 1, C = I.ATTRIBUTE_NODE = 2, x = I.TEXT_NODE = 3, R = I.CDATA_SECTION_NODE = 4, _ = I.ENTITY_REFERENCE_NODE = 5, L = I.ENTITY_NODE = 6, M = I.PROCESSING_INSTRUCTION_NODE = 7, q = I.COMMENT_NODE = 8, U = I.DOCUMENT_NODE = 9, P = I.DOCUMENT_TYPE_NODE = 10, k = I.DOCUMENT_FRAGMENT_NODE = 11, H = I.NOTATION_NODE = 12, V = e2.freeze({ DOCUMENT_POSITION_DISCONNECTED: 1, DOCUMENT_POSITION_PRECEDING: 2, DOCUMENT_POSITION_FOLLOWING: 4, DOCUMENT_POSITION_CONTAINS: 8, DOCUMENT_POSITION_CONTAINED_BY: 16, DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: 32 });
function B(e3, r3) {
if (r3.length < e3.length) return B(r3, e3);
var t3 = null;
for (var n3 in e3) {
if (e3[n3] !== r3[n3]) return t3;
t3 = e3[n3];
}
return t3;
}
function F(e3) {
return e3.guid || (e3.guid = Math.random()), e3.guid;
}
function G() {
}
function Y(e3, r3) {
this._node = e3, this._refresh = r3, X(this);
}
function X(e3) {
var r3 = e3._node._inc || e3._node.ownerDocument._inc;
if (e3._inc !== r3) {
var t3 = e3._refresh(e3._node);
if (_e(e3, "length", t3.length), !e3.$$length || t3.length < e3.$$length) for (var o3 = t3.length; o3 in e3; o3++) n2(e3, o3) && delete e3[o3];
S2(t3, e3), e3._inc = r3;
}
}
function j() {
}
function z(e3, r3) {
for (var t3 = 0; t3 < e3.length; ) {
if (e3[t3] === r3) return t3;
t3++;
}
}
function Q(e3, r3, t3, n3) {
if (n3 ? r3[z(r3, n3)] = t3 : (r3[r3.length] = t3, r3.length++), e3) {
t3.ownerElement = e3;
var o3 = e3.ownerDocument;
o3 && (n3 && re(o3, e3, n3), function(e4, r4, t4) {
e4 && e4._inc++;
var n4 = t4.namespaceURI;
n4 === d2.XMLNS && (r4._nsMap[t4.prefix ? t4.localName : ""] = t4.value);
}(o3, e3, t3));
}
}
function W(e3, r3, t3) {
var n3 = z(r3, t3);
if (n3 >= 0) {
for (var o3 = r3.length - 1; n3 <= o3; ) r3[n3] = r3[++n3];
if (r3.length = o3, e3) {
var a2 = e3.ownerDocument;
a2 && re(a2, e3, t3), t3.ownerElement = null;
}
}
}
function Z() {
}
function $(e3) {
T2(e3);
}
function J(e3) {
return ("<" == e3 ? "<" : ">" == e3 && ">") || "&" == e3 && "&" || '"' == e3 && """ || "&#" + e3.charCodeAt() + ";";
}
function K(e3, r3) {
if (r3(e3)) return true;
if (e3 = e3.firstChild) do {
if (K(e3, r3)) return true;
} while (e3 = e3.nextSibling);
}
function ee(e3, r3) {
T2(e3);
var t3 = r3 || {};
this.ownerDocument = this, this.contentType = t3.contentType || c2.XML_APPLICATION, this.type = o2(this.contentType) ? "html" : "xml";
}
function re(e3, r3, t3, n3) {
e3 && e3._inc++, t3.namespaceURI === d2.XMLNS && delete r3._nsMap[t3.prefix ? t3.localName : ""];
}
function te(e3, r3, t3) {
if (e3 && e3._inc) {
e3._inc++;
var n3 = r3.childNodes;
if (t3 && !t3.nextSibling) n3[n3.length++] = t3;
else {
for (var o3 = r3.firstChild, a2 = 0; o3; ) n3[a2++] = o3, o3 = o3.nextSibling;
n3.length = a2, delete n3[n3.length];
}
}
}
function ne(e3, r3) {
if (e3 !== r3.parentNode) throw new E2(E2.NOT_FOUND_ERR, "child's parent is not parent");
var t3 = r3.previousSibling, n3 = r3.nextSibling;
return t3 ? t3.nextSibling = n3 : e3.firstChild = n3, n3 ? n3.previousSibling = t3 : e3.lastChild = t3, te(e3.ownerDocument, e3), r3.parentNode = null, r3.previousSibling = null, r3.nextSibling = null, r3;
}
function oe(e3) {
return e3 && e3.nodeType === $.DOCUMENT_TYPE_NODE;
}
function ae(e3) {
return e3 && e3.nodeType === $.ELEMENT_NODE;
}
function ie(e3) {
return e3 && e3.nodeType === $.TEXT_NODE;
}
function se(e3, t3) {
var n3 = e3.childNodes || [];
if (r2(n3, ae) || oe(t3)) return false;
var o3 = r2(n3, oe);
return !(t3 && o3 && n3.indexOf(o3) > n3.indexOf(t3));
}
function le(e3, t3) {
var n3 = e3.childNodes || [];
if (r2(n3, function(e4) {
return ae(e4) && e4 !== t3;
})) return false;
var o3 = r2(n3, oe);
return !(t3 && o3 && n3.indexOf(o3) > n3.indexOf(t3));
}
function ce(e3, r3, t3) {
if (!function(e4) {
return e4 && (e4.nodeType === $.DOCUMENT_NODE || e4.nodeType === $.DOCUMENT_FRAGMENT_NODE || e4.nodeType === $.ELEMENT_NODE);
}(e3)) throw new E2(E2.HIERARCHY_REQUEST_ERR, "Unexpected parent node type " + e3.nodeType);
if (t3 && t3.parentNode !== e3) throw new E2(E2.NOT_FOUND_ERR, "child not in parent");
if (!function(e4) {
return e4 && (e4.nodeType === $.CDATA_SECTION_NODE || e4.nodeType === $.COMMENT_NODE || e4.nodeType === $.DOCUMENT_FRAGMENT_NODE || e4.nodeType === $.DOCUMENT_TYPE_NODE || e4.nodeType === $.ELEMENT_NODE || e4.nodeType === $.PROCESSING_INSTRUCTION_NODE || e4.nodeType === $.TEXT_NODE);
}(r3) || oe(r3) && e3.nodeType !== $.DOCUMENT_NODE) throw new E2(E2.HIERARCHY_REQUEST_ERR, "Unexpected node type " + r3.nodeType + " for parent node type " + e3.nodeType);
}
function ue(e3, t3, n3) {
var o3 = e3.childNodes || [], a2 = t3.childNodes || [];
if (t3.nodeType === $.DOCUMENT_FRAGMENT_NODE) {
var i3 = a2.filter(ae);
if (i3.length > 1 || r2(a2, ie)) throw new E2(E2.HIERARCHY_REQUEST_ERR, "More than one element or text in fragment");
if (1 === i3.length && !se(e3, n3)) throw new E2(E2.HIERARCHY_REQUEST_ERR, "Element in fragment can not be inserted before doctype");
}
if (ae(t3) && !se(e3, n3)) throw new E2(E2.HIERARCHY_REQUEST_ERR, "Only one element can be added and only after doctype");
if (oe(t3)) {
if (r2(o3, oe)) throw new E2(E2.HIERARCHY_REQUEST_ERR, "Only one doctype is allowed");
var s3 = r2(o3, ae);
if (n3 && o3.indexOf(s3) < o3.indexOf(n3)) throw new E2(E2.HIERARCHY_REQUEST_ERR, "Doctype can only be inserted before an element");
if (!n3 && s3) throw new E2(E2.HIERARCHY_REQUEST_ERR, "Doctype can not be appended since element is present");
}
}
function pe(e3, t3, n3) {
var o3 = e3.childNodes || [], a2 = t3.childNodes || [];
if (t3.nodeType === $.DOCUMENT_FRAGMENT_NODE) {
var i3 = a2.filter(ae);
if (i3.length > 1 || r2(a2, ie)) throw new E2(E2.HIERARCHY_REQUEST_ERR, "More than one element or text in fragment");
if (1 === i3.length && !le(e3, n3)) throw new E2(E2.HIERARCHY_REQUEST_ERR, "Element in fragment can not be inserted before doctype");
}
if (ae(t3) && !le(e3, n3)) throw new E2(E2.HIERARCHY_REQUEST_ERR, "Only one element can be added and only after doctype");
if (oe(t3)) {
let l2 = function(e4) {
return oe(e4) && e4 !== n3;
};
if (r2(o3, l2)) throw new E2(E2.HIERARCHY_REQUEST_ERR, "Only one doctype is allowed");
var s3 = r2(o3, ae);
if (n3 && o3.indexOf(s3) < o3.indexOf(n3)) throw new E2(E2.HIERARCHY_REQUEST_ERR, "Doctype can only be inserted before an element");
}
}
function de(e3, r3, t3, n3) {
ce(e3, r3, t3), e3.nodeType === $.DOCUMENT_NODE && (n3 || ue)(e3, r3, t3);
var o3 = r3.parentNode;
if (o3 && o3.removeChild(r3), r3.nodeType === k) {
var a2 = r3.firstChild;
if (null == a2) return r3;
var i3 = r3.lastChild;
} else a2 = i3 = r3;
var s3 = t3 ? t3.previousSibling : e3.lastChild;
a2.previousSibling = s3, i3.nextSibling = t3, s3 ? s3.nextSibling = a2 : e3.firstChild = a2, null == t3 ? e3.lastChild = i3 : t3.previousSibling = i3;
do {
a2.parentNode = e3;
} while (a2 !== i3 && (a2 = a2.nextSibling));
return te(e3.ownerDocument || e3, e3, r3), r3.nodeType == k && (r3.firstChild = r3.lastChild = null), r3;
}
function fe(e3) {
T2(e3), this._nsMap = /* @__PURE__ */ Object.create(null);
}
function he(e3) {
T2(e3), this.namespaceURI = null, this.prefix = null, this.ownerElement = null;
}
function me(e3) {
T2(e3);
}
function Ee(e3) {
T2(e3);
}
function ge(e3) {
T2(e3);
}
function Ne(e3) {
T2(e3);
}
function Te(e3) {
T2(e3);
}
function be(e3) {
T2(e3);
}
function we(e3) {
T2(e3);
}
function ve(e3) {
T2(e3);
}
function ye(e3) {
T2(e3);
}
function De(e3) {
T2(e3);
}
function Se() {
}
function Ae(e3) {
var r3 = [], t3 = this.nodeType === U && this.documentElement || this, n3 = t3.prefix, o3 = t3.namespaceURI;
if (o3 && null == n3 && null == (n3 = t3.lookupPrefix(o3))) var a2 = [{ namespace: o3, prefix: null }];
return Ce(this, r3, e3, a2), r3.join("");
}
function Ie(e3, r3, t3) {
var n3 = e3.prefix || "", o3 = e3.namespaceURI;
if (!o3) return false;
if ("xml" === n3 && o3 === d2.XML || o3 === d2.XMLNS) return false;
for (var a2 = t3.length; a2--; ) {
var i3 = t3[a2];
if (i3.prefix === n3) return i3.namespace !== o3;
}
return true;
}
function Oe(e3, r3, t3) {
e3.push(" ", r3, '="', t3.replace(/[<>&"\t\n\r]/g, J), '"');
}
function Ce(e3, r3, t3, n3) {
n3 || (n3 = []);
var o3 = "html" === (e3.nodeType === U ? e3 : e3.ownerDocument).type;
if (t3) {
if (!(e3 = t3(e3))) return;
if ("string" == typeof e3) return void r3.push(e3);
}
switch (e3.nodeType) {
case O:
var a2 = e3.attributes, l2 = a2.length, c3 = e3.firstChild, u2 = e3.tagName, p2 = u2;
if (!o3 && !e3.prefix && e3.namespaceURI) {
for (var f2, h3 = 0; h3 < a2.length; h3++) if ("xmlns" === a2.item(h3).name) {
f2 = a2.item(h3).value;
break;
}
if (!f2) for (var m3 = n3.length - 1; m3 >= 0; m3--) {
if ("" === (E3 = n3[m3]).prefix && E3.namespace === e3.namespaceURI) {
f2 = E3.namespace;
break;
}
}
if (f2 !== e3.namespaceURI) for (m3 = n3.length - 1; m3 >= 0; m3--) {
var E3;
if ((E3 = n3[m3]).namespace === e3.namespaceURI) {
E3.prefix && (p2 = E3.prefix + ":" + u2);
break;
}
}
}
r3.push("<", p2);
for (var g3 = 0; g3 < l2; g3++) {
"xmlns" == (T3 = a2.item(g3)).prefix ? n3.push({ prefix: T3.localName, namespace: T3.value }) : "xmlns" == T3.nodeName && n3.push({ prefix: "", namespace: T3.value });
}
for (g3 = 0; g3 < l2; g3++) {
var T3, b3, w3;
if (Ie(T3 = a2.item(g3), 0, n3)) Oe(r3, (b3 = T3.prefix || "") ? "xmlns:" + b3 : "xmlns", w3 = T3.namespaceURI), n3.push({ prefix: b3, namespace: w3 });
Ce(T3, r3, t3, n3);
}
if (u2 === p2 && Ie(e3, 0, n3)) Oe(r3, (b3 = e3.prefix || "") ? "xmlns:" + b3 : "xmlns", w3 = e3.namespaceURI), n3.push({ prefix: b3, namespace: w3 });
var v3 = !c3;
if (v3 && (o3 || e3.namespaceURI === d2.HTML) && (v3 = s2(u2)), v3) r3.push("/>");
else {
if (r3.push(">"), o3 && i2(u2)) for (; c3; ) c3.data ? r3.push(c3.data) : Ce(c3, r3, t3, n3.slice()), c3 = c3.nextSibling;
else for (; c3; ) Ce(c3, r3, t3, n3.slice()), c3 = c3.nextSibling;
r3.push("</", p2, ">");
}
return;
case U:
case k:
for (c3 = e3.firstChild; c3; ) Ce(c3, r3, t3, n3.slice()), c3 = c3.nextSibling;
return;
case C:
return Oe(r3, e3.name, e3.value);
case x:
return r3.push(e3.data.replace(/[<&>]/g, J));
case R:
return r3.push(N2.CDATA_START, e3.data, N2.CDATA_END);
case q:
return r3.push(N2.COMMENT_START, e3.data, N2.COMMENT_END);
case P:
var y3 = e3.publicId, D3 = e3.systemId;
return r3.push(N2.DOCTYPE_DECL_START, " ", e3.name), y3 ? (r3.push(" ", N2.PUBLIC, " ", y3), D3 && "." !== D3 && r3.push(" ", D3)) : D3 && "." !== D3 && r3.push(" ", N2.SYSTEM, " ", D3), e3.internalSubset && r3.push(" [", e3.internalSubset, "]"), void r3.push(">");
case M:
return r3.push("<?", e3.target, " ", e3.data, "?>");
case _:
return r3.push("&", e3.nodeName, ";");
default:
r3.push("??", e3.nodeName);
}
}
function xe(e3, r3, t3) {
var n3;
switch (r3.nodeType) {
case O:
(n3 = r3.cloneNode(false)).ownerDocument = e3;
case k:
break;
case C:
t3 = true;
}
if (n3 || (n3 = r3.cloneNode(false)), n3.ownerDocument = e3, n3.parentNode = null, t3) for (var o3 = r3.firstChild; o3; ) n3.appendChild(xe(e3, o3, t3)), o3 = o3.nextSibling;
return n3;
}
function Re(e3, r3, t3) {
var o3 = new r3.constructor(h2);
for (var a2 in r3) if (n2(r3, a2)) {
var i3 = r3[a2];
"object" != typeof i3 && i3 != o3[a2] && (o3[a2] = i3);
}
switch (r3.childNodes && (o3.childNodes = new G()), o3.ownerDocument = e3, o3.nodeType) {
case O:
var s3 = r3.attributes, l2 = o3.attributes = new j(), c3 = s3.length;
l2._ownerElement = o3;
for (var u2 = 0; u2 < c3; u2++) o3.setAttributeNode(Re(e3, s3.item(u2), true));
break;
case C:
t3 = true;
}
if (t3) for (var p2 = r3.firstChild; p2; ) o3.appendChild(Re(e3, p2, t3)), p2 = p2.nextSibling;
return o3;
}
function _e(e3, r3, t3) {
e3[r3] = t3;
}
G.prototype = { length: 0, item: function(e3) {
return e3 >= 0 && e3 < this.length ? this[e3] : null;
}, toString: function(e3) {
for (var r3 = [], t3 = 0; t3 < this.length; t3++) Ce(this[t3], r3, e3);
return r3.join("");
}, filter: function(e3) {
return Array.prototype.filter.call(this, e3);
}, indexOf: function(e3) {
return Array.prototype.indexOf.call(this, e3);
} }, G.prototype[Symbol.iterator] = function() {
var e3 = this, r3 = 0;
return { next: function() {
return r3 < e3.length ? { value: e3[r3++], done: false } : { done: true };
}, return: function() {
return { done: true };
} };
}, Y.prototype.item = function(e3) {
return X(this), this[e3] || null;
}, A2(Y, G), j.prototype = { length: 0, item: G.prototype.item, getNamedItem: function(e3) {
this._ownerElement && this._ownerElement._isInHTMLDocumentAndNamespace() && (e3 = e3.toLowerCase());
for (var r3 = 0; r3 < this.length; ) {
var t3 = this[r3];
if (t3.nodeName === e3) return t3;
r3++;
}
return null;
}, setNamedItem: function(e3) {
var r3 = e3.ownerElement;
if (r3 && r3 !== this._ownerElement) throw new E2(E2.INUSE_ATTRIBUTE_ERR);
var t3 = this.getNamedItemNS(e3.namespaceURI, e3.localName);
return t3 === e3 ? e3 : (Q(this._ownerElement, this, e3, t3), t3);
}, setNamedItemNS: function(e3) {
return this.setNamedItem(e3);
}, removeNamedItem: function(e3) {
var r3 = this.getNamedItem(e3);
if (!r3) throw new E2(E2.NOT_FOUND_ERR, e3);
return W(this._ownerElement, this, r3), r3;
}, removeNamedItemNS: function(e3, r3) {
var t3 = this.getNamedItemNS(e3, r3);
if (!t3) throw new E2(E2.NOT_FOUND_ERR, e3 ? e3 + " : " + r3 : r3);
return W(this._ownerElement, this, t3), t3;
}, getNamedItemNS: function(e3, r3) {
e3 || (e3 = null);
for (var t3 = 0; t3 < this.length; ) {
var n3 = this[t3];
if (n3.localName === r3 && n3.namespaceURI === e3) return n3;
t3++;
}
return null;
} }, j.prototype[Symbol.iterator] = function() {
var e3 = this, r3 = 0;
return { next: function() {
return r3 < e3.length ? { value: e3[r3++], done: false } : { done: true };
}, return: function() {
return { done: true };
} };
}, Z.prototype = { hasFeature: function(e3, r3) {
return true;
}, createDocument: function(e3, r3, t3) {
var n3 = c2.XML_APPLICATION;
e3 === d2.HTML ? n3 = c2.XML_XHTML_APPLICATION : e3 === d2.SVG && (n3 = c2.XML_SVG_IMAGE);
var o3 = new ee(h2, { contentType: n3 });
if (o3.implementation = this, o3.childNodes = new G(), o3.doctype = t3 || null, t3 && o3.appendChild(t3), r3) {
var a2 = o3.createElementNS(e3, r3);
o3.appendChild(a2);
}
return o3;
}, createDocumentType: function(e3, r3, t3, n3) {
y2(e3);
var o3 = new Te(h2);
return o3.name = e3, o3.nodeName = e3, o3.publicId = r3 || "", o3.systemId = t3 || "", o3.internalSubset = n3 || "", o3.childNodes = new G(), o3;
}, createHTMLDocument: function(e3) {
var r3 = new ee(h2, { contentType: c2.HTML });
if (r3.implementation = this, r3.childNodes = new G(), false !== e3) {
r3.doctype = this.createDocumentType("html"), r3.doctype.ownerDocument = r3, r3.appendChild(r3.doctype);
var t3 = r3.createElement("html");
r3.appendChild(t3);
var n3 = r3.createElement("head");
if (t3.appendChild(n3), "string" == typeof e3) {
var o3 = r3.createElement("title");
o3.appendChild(r3.createTextNode(e3)), n3.appendChild(o3);
}
t3.appendChild(r3.createElement("body"));
}
return r3;
} }, $.prototype = { firstChild: null, lastChild: null, previousSibling: null, nextSibling: null, parentNode: null, get parentElement() {
return this.parentNode && this.parentNode.nodeType === this.ELEMENT_NODE ? this.parentNode : null;
}, childNodes: null, ownerDocument: null, nodeValue: null, namespaceURI: null, prefix: null, localName: null, baseURI: "about:blank", get isConnected() {
var e3 = this.getRootNode();
return e3 && e3.nodeType === e3.DOCUMENT_NODE;
}, contains: function(e3) {
if (!e3) return false;
var r3 = e3;
do {
if (this === r3) return true;
r3 = e3.parentNode;
} while (r3);
return false;
}, getRootNode: function(e3) {
var r3 = this;
do {
if (!r3.parentNode) return r3;
r3 = r3.parentNode;
} while (r3);
}, isEqualNode: function(e3) {
if (!e3) return false;
if (this.nodeType !== e3.nodeType) return false;
switch (this.nodeType) {
case this.DOCUMENT_TYPE_NODE:
if (this.name !== e3.name) return false;
if (this.publicId !== e3.publicId) return false;
if (this.systemId !== e3.systemId) return false;
break;
case this.ELEMENT_NODE:
if (this.namespaceURI !== e3.namespaceURI) return false;
if (this.prefix !== e3.prefix) return false;
if (this.localName !== e3.localName) return false;
if (this.attributes.length !== e3.attributes.length) return false;
for (var r3 = 0; r3 < this.attributes.length; r3++) {
var t3 = this.attributes.item(r3);
if (!t3.isEqualNode(e3.getAttributeNodeNS(t3.namespaceURI, t3.localName))) return false;
}
break;
case this.ATTRIBUTE_NODE:
if (this.namespaceURI !== e3.namespaceURI) return false;
if (this.localName !== e3.localName) return false;
if (this.value !== e3.value) return false;
break;
case this.PROCESSING_INSTRUCTION_NODE:
if (this.target !== e3.target || this.data !== e3.data) return false;
break;
case this.TEXT_NODE:
case this.COMMENT_NODE:
if (this.data !== e3.data) return false;
}
if (this.childNodes.length !== e3.childNodes.length) return false;
for (r3 = 0; r3 < this.childNodes.length; r3++) if (!this.childNodes[r3].isEqualNode(e3.childNodes[r3])) return false;
return true;
}, isSameNode: function(e3) {
return this === e3;
}, insertBefore: function(e3, r3) {
return de(this, e3, r3);
}, replaceChild: function(e3, r3) {
de(this, e3, r3, pe), r3 && this.removeChild(r3);
}, removeChild: function(e3) {
return ne(this, e3);
}, appendChild: function(e3) {
return this.insertBefore(e3, null);
}, hasChildNodes: function() {
return null != this.firstChild;
}, cloneNode: function(e3) {
return Re(this.ownerDocument || this, this, e3);
}, normalize: function() {
for (var e3 = this.firstChild; e3; ) {
var r3 = e3.nextSibling;
r3 && r3.nodeType == x && e3.nodeType == x ? (this.removeChild(r3), e3.appendData(r3.data)) : (e3.normalize(), e3 = r3);
}
}, isSupported: function(e3, r3) {
return this.ownerDocument.implementation.hasFeature(e3, r3);
}, lookupPrefix: function(e3) {
for (var r3 = this; r3; ) {
var t3 = r3._nsMap;
if (t3) {
for (var o3 in t3) if (n2(t3, o3) && t3[o3] === e3) return o3;
}
r3 = r3.nodeType == C ? r3.ownerDocument : r3.parentNode;
}
return null;
}, lookupNamespaceURI: function(e3) {
for (var r3 = this; r3; ) {
var t3 = r3._nsMap;
if (t3 && n2(t3, e3)) return t3[e3];
r3 = r3.nodeType == C ? r3.ownerDocument : r3.parentNode;
}
return null;
}, isDefaultNamespace: function(e3) {
return null == this.lookupPrefix(e3);
}, compareDocumentPosition: function(e3) {
if (this === e3) return 0;
var r3 = e3, t3 = this, n3 = null, o3 = null;
if (r3 instanceof he && (r3 = (n3 = r3).ownerElement), t3 instanceof he && (t3 = (o3 = t3).ownerElement, n3 && r3 && t3 === r3)) for (var a2, i3 = 0; a2 = t3.attributes[i3]; i3++) {
if (a2 === n3) return V.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC + V.DOCUMENT_POSITION_PRECEDING;
if (a2 === o3) return V.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC + V.DOCUMENT_POSITION_FOLLOWING;
}
if (!r3 || !t3 || t3.ownerDocument !== r3.ownerDocument) return V.DOCUMENT_POSITION_DISCONNECTED + V.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC + (F(t3.ownerDocument) > F(r3.ownerDocument) ? V.DOCUMENT_POSITION_FOLLOWING : V.DOCUMENT_POSITION_PRECEDING);
if (o3 && r3 === t3) return V.DOCUMENT_POSITION_CONTAINS + V.DOCUMENT_POSITION_PRECEDING;
if (n3 && r3 === t3) return V.DOCUMENT_POSITION_CONTAINED_BY + V.DOCUMENT_POSITION_FOLLOWING;
for (var s3 = [], l2 = r3.parentNode; l2; ) {
if (!o3 && l2 === t3) return V.DOCUMENT_POSITION_CONTAINED_BY + V.DOCUMENT_POSITION_FOLLOWING;
s3.push(l2), l2 = l2.parentNode;
}
s3.reverse();
for (var c3 = [], u2 = t3.parentNode; u2; ) {
if (!n3 && u2 === r3) return V.DOCUMENT_POSITION_CONTAINS + V.DOCUMENT_POSITION_PRECEDING;
c3.push(u2), u2 = u2.parentNode;
}
c3.reverse();
var p2 = B(s3, c3);
for (var d3 in p2.childNodes) {
var f2 = p2.childNodes[d3];
if (f2 === t3) return V.DOCUMENT_POSITION_FOLLOWING;
if (f2 === r3) return V.DOCUMENT_POSITION_PRECEDING;
if (c3.indexOf(f2) >= 0) return V.DOCUMENT_POSITION_FOLLOWING;
if (s3.indexOf(f2) >= 0) return V.DOCUMENT_POSITION_PRECEDING;
}
return 0;
} }, S2(I, $), S2(I, $.prototype), S2(V, $), S2(V, $.prototype), ee.prototype = { implementation: null, nodeName: "#document", nodeType: U, doctype: null, documentElement: null, _inc: 1, insertBefore: function(e3, r3) {
if (e3.nodeType === k) {
for (var t3 = e3.firstChild; t3; ) {
var n3 = t3.nextSibling;
this.insertBefore(t3, r3), t3 = n3;
}
return e3;
}
return de(this, e3, r3), e3.ownerDocument = this, null === this.documentElement && e3.nodeType === O && (this.documentElement = e3), e3;
}, removeChild: function(e3) {
var r3 = ne(this, e3);
return r3 === this.documentElement && (this.documentElement = null), r3;
}, replaceChild: function(e3, r3) {
de(this, e3, r3, pe), e3.ownerDocument = this, r3 && this.removeChild(r3), ae(e3) && (this.documentElement = e3);
}, importNode: function(e3, r3) {
return xe(this, e3, r3);
}, getElementById: function(e3) {
var r3 = null;
return K(this.documentElement, function(t3) {
if (t3.nodeType == O && t3.getAttribute("id") == e3) return r3 = t3, true;
}), r3;
}, createElement: function(e3) {
var r3 = new fe(h2);
return r3.ownerDocument = this, "html" === this.type && (e3 = e3.toLowerCase()), t2(this.contentType) && (r3.namespaceURI = d2.HTML), r3.nodeName = e3, r3.tagName = e3, r3.localName = e3, r3.childNodes = new G(), (r3.attributes = new j())._ownerElement = r3, r3;
}, createDocumentFragment: function() {
var e3 = new ye(h2);
return e3.ownerDocument = this, e3.childNodes = new G(), e3;
}, createTextNode: function(e3) {
var r3 = new Ee(h2);
return r3.ownerDocument = this, r3.childNodes = new G(), r3.appendData(e3), r3;
}, createComment: function(e3) {
var r3 = new ge(h2);
return r3.ownerDocument = this, r3.childNodes = new G(), r3.appendData(e3), r3;
}, createCDATASection: function(e3) {
var r3 = new Ne(h2);
return r3.ownerDocument = this, r3.childNodes = new G(), r3.appendData(e3), r3;
}, createProcessingInstruction: function(e3, r3) {
var t3 = new De(h2);
return t3.ownerDocument = this, t3.childNodes = new G(), t3.nodeName = t3.target = e3, t3.nodeValue = t3.data = r3, t3;
}, createAttribute: function(e3) {
if (!N2.QName_exact.test(e3)) throw new E2(E2.INVALID_CHARACTER_ERR, 'invalid character in name "' + e3 + '"');
return "html" === this.type && (e3 = e3.toLowerCase()), this._createAttribute(e3);
}, _createAttribute: function(e3) {
var r3 = new he(h2);
return r3.ownerDocument = this, r3.childNodes = new G(), r3.name = e3, r3.nodeName = e3, r3.localName = e3, r3.specified = true, r3;
}, createEntityReference: function(e3) {
if (!N2.Name.test(e3)) throw new E2(E2.INVALID_CHARACTER_ERR, 'not a valid xml name "' + e3 + '"');
if ("html" === this.type) throw new E2("document is an html document", g2.NotSupportedError);
var r3 = new ve(h2);
return r3.ownerDocument = this, r3.childNodes = new G(), r3.nodeName = e3, r3;
}, createElementNS: function(e3, r3) {
var t3 = D2(e3, r3), n3 = new fe(h2), o3 = n3.attributes = new j();
return n3.childNodes = new G(), n3.ownerDocument = this, n3.nodeName = r3, n3.tagName = r3, n3.namespaceURI = t3[0], n3.prefix = t3[1], n3.localName = t3[2], o3._ownerElement = n3, n3;
}, createAttributeNS: function(e3, r3) {
var t3 = D2(e3, r3), n3 = new he(h2);
return n3.ownerDocument = this, n3.childNodes = new G(), n3.nodeName = r3, n3.name = r3, n3.specified = true, n3.namespaceURI = t3[0], n3.prefix = t3[1], n3.localName = t3[2], n3;
} }, A2(ee, $), fe.prototype = { nodeType: O, attributes: null, getQualifiedName: function() {
return this.prefix ? this.prefix + ":" + this.localName : this.localName;
}, _isInHTMLDocumentAndNamespace: function() {
return "html" === this.ownerDocument.type && this.namespaceURI === d2.HTML;
}, hasAttributes: function() {
return !(!this.attributes || !this.attributes.length);
}, hasAttribute: function(e3) {
return !!this.getAttributeNode(e3);
}, getAttribute: function(e3) {
var r3 = this.getAttributeNode(e3);
return r3 ? r3.value : null;
}, getAttributeNode: function(e3) {
return this._isInHTMLDocumentAndNamespace() && (e3 = e3.toLowerCase()), this.attributes.getNamedItem(e3);
}, setAttribute: function(e3, r3) {
this._isInHTMLDocumentAndNamespace() && (e3 = e3.toLowerCase());
var t3 = this.getAttributeNode(e3);
t3 ? t3.value = t3.nodeValue = "" + r3 : ((t3 = this.ownerDocument._createAttribute(e3)).value = t3.nodeValue = "" + r3, this.setAttributeNode(t3));
}, removeAttribute: function(e3) {
var r3 = this.getAttributeNode(e3);
r3 && this.removeAttributeNode(r3);
}, setAttributeNode: function(e3) {
return this.attributes.setNamedItem(e3);
}, setAttributeNodeNS: function(e3) {
return this.attributes.setNamedItemNS(e3);
}, removeAttributeNode: function(e3) {
return this.attributes.removeNamedItem(e3.nodeName);
}, removeAttributeNS: function(e3, r3) {
var t3 = this.getAttributeNodeNS(e3, r3);
t3 && this.removeAttributeNode(t3);
}, hasAttributeNS: function(e3, r3) {
return null != this.getAttributeNodeNS(e3, r3);
}, getAttributeNS: function(e3, r3) {
var t3 = this.getAttributeNodeNS(e3, r3);
return t3 ? t3.value : null;
}, setAttributeNS: function(e3, r3, t3) {
var n3 = D2(e3, r3)[2], o3 = this.getAttributeNodeNS(e3, n3);
o3 ? o3.value = o3.nodeValue = "" + t3 : ((o3 = this.ownerDocument.createAttributeNS(e3, r3)).value = o3.nodeValue = "" + t3, this.setAttributeNode(o3));
}, getAttributeNodeNS: function(e3, r3) {
return this.attributes.getNamedItemNS(e3, r3);
}, getElementsByClassName: function(e3) {
var r3 = v2(e3);
return new Y(this, function(t3) {
var n3 = [];
return r3.length > 0 && K(t3, function(o3) {
if (o3 !== t3 && o3.nodeType === O) {
var a2 = o3.getAttribute("class");
if (a2) {
var i3 = e3 === a2;
if (!i3) {
var s3 = v2(a2);
i3 = r3.every((l2 = s3, function(e4) {
return l2 && -1 !== l2.indexOf(e4);
}));
}
i3 && n3.push(o3);
}
}
var l2;
}), n3;
});
}, getElementsByTagName: function(e3) {
var r3 = "html" === (this.nodeType === U ? this : this.ownerDocument).type, t3 = e3.toLowerCase();
return new Y(this, function(n3) {
var o3 = [];
return K(n3, function(a2) {
a2 !== n3 && a2.nodeType === O && (("*" === e3 || a2.getQualifiedName() === (r3 && a2.namespaceURI === d2.HTML ? t3 : e3)) && o3.push(a2));
}), o3;
});
}, getElementsByTagNameNS: function(e3, r3) {
return new Y(this, function(t3) {
var n3 = [];
return K(t3, function(o3) {
o3 === t3 || o3.nodeType !== O || "*" !== e3 && o3.namespaceURI !== e3 || "*" !== r3 && o3.localName != r3 || n3.push(o3);
}), n3;
});
} }, ee.prototype.getElementsByClassName = fe.prototype.getElementsByClassName, ee.prototype.getElementsByTagName = fe.prototype.getElementsByTagName, ee.prototype.getElementsByTagNameNS = fe.prototype.getElementsByTagNameNS, A2(fe, $), he.prototype.nodeType = C, A2(he, $), me.prototype = { data: "", substringData: function(e3, r3) {
return this.data.substring(e3, e3 + r3);
}, appendData: function(e3) {
e3 = this.data + e3, this.nodeValue = this.data = e3, this.length = e3.length;
}, insertData: function(e3, r3) {
this.replaceData(e3, 0, r3);
}, deleteData: function(e3, r3) {
this.replaceData(e3, r3, "");
}, replaceData: function(e3, r3, t3) {
t3 = this.data.substring(0, e3) + t3 + this.data.substring(e3 + r3), this.nodeValue = this.data = t3, this.length = t3.length;
} }, A2(me, $), Ee.prototype = { nodeName: "#text", nodeType: x, splitText: function(e3) {
var r3 = this.data, t3 = r3.substring(e3);
r3 = r3.substring(0, e3), this.data = this.nodeValue = r3, this.length = r3.length;
var n3 = this.ownerDocument.createTextNode(t3);
return this.parentNode && this.parentNode.insertBefore(n3, this.nextSibling), n3;
} }, A2(Ee, me), ge.prototype = { nodeName: "#comment", nodeType: q }, A2(ge, me), Ne.prototype = { nodeName: "#cdata-section", nodeType: R }, A2(Ne, Ee), Te.prototype.nodeType = P, A2(Te, $), be.prototype.nodeType = H, A2(be, $), we.prototype.nodeType = L, A2(we, $), ve.prototype.nodeType = _, A2(ve, $), ye.prototype.nodeName = "#document-fragment", ye.prototype.nodeType = k, A2(ye, $), De.prototype.nodeType = M, A2(De, me), Se.prototype.serializeToString = function(e3, r3) {
return Ae.call(e3, r3);
}, $.prototype.toString = Ae;
try {
if (Object.defineProperty) {
let Le = function(e3) {
switch (e3.nodeType) {
case O:
case k:
var r3 = [];
for (e3 = e3.firstChild; e3; ) 7 !== e3.nodeType && 8 !== e3.nodeType && r3.push(Le(e3)), e3 = e3.nextSibling;
return r3.join("");
default:
return e3.nodeValue;
}
};
Object.defineProperty(Y.prototype, "length", { get: function() {
return X(this), this.$$length;
} }), Object.defineProperty($.prototype, "textContent", { get: function() {
return Le(this);
}, set: function(e3) {
switch (this.nodeType) {
case O:
case k:
for (; this.firstChild; ) this.removeChild(this.firstChild);
(e3 || String(e3)) && this.appendChild(this.ownerDocument.createTextNode(e3));
break;
default:
this.data = e3, this.value = e3, this.nodeValue = e3;
}
} }), _e = function(e3, r3, t3) {
e3["$$" + r3] = t3;
};
}
} catch (Me) {
}
return p._updateLiveList = X, p.Attr = he, p.CDATASection = Ne, p.CharacterData = me, p.Comment = ge, p.Document = ee, p.DocumentFragment = ye, p.DocumentType = Te, p.DOMImplementation = Z, p.Element = fe, p.Entity = we, p.EntityReference = ve, p.LiveNodeList = Y, p.NamedNodeMap = j, p.Node = $, p.NodeList = G, p.Notation = be, p.Text = Ee, p.ProcessingInstruction = De, p.XMLSerializer = Se, p;
}
var m, E = {}, g = {};
function N() {
return m || (m = 1, e2 = g, r2 = a().freeze, e2.XML_ENTITIES = r2({ amp: "&", apos: "'", gt: ">", lt: "<", quot: '"' }), e2.HTML_ENTITIES = r2({ Aacute: "Á", aacute: "á", Abreve: "Ă", abreve: "ă", ac: "∾", acd: "∿", acE: "∾̳", Acirc: "Â", acirc: "â", acute: "´", Acy: "А", acy: "а", AElig: "Æ", aelig: "æ", af: "", Afr: "𝔄", afr: "𝔞", Agrave: "À", agrave: "à", alefsym: "ℵ", aleph: "ℵ", Alpha: "Α", alpha: "α", Amacr: "Ā", amacr: "ā", amalg: "⨿", AMP: "&", amp: "&", And: "⩓", and: "∧", andand: "⩕", andd: "⩜", andslope: "⩘", andv: "⩚", ang: "∠", ange: "⦤", angle: "∠", angmsd: "∡", angmsdaa: "⦨", angmsdab: "⦩", angmsdac: "⦪", angmsdad: "⦫", angmsdae: "⦬", angmsdaf: "⦭", angmsdag: "⦮", angmsdah: "⦯", angrt: "∟", angrtvb: "⊾", angrtvbd: "⦝", angsph: "∢", angst: "Å", angzarr: "⍼", Aogon: "Ą", aogon: "ą", Aopf: "𝔸", aopf: "𝕒", ap: "≈", apacir: "⩯", apE: "⩰", ape: "≊", apid: "≋", apos: "'", ApplyFunction: "", approx: "≈", approxeq: "≊", Aring: "Å", aring: "å", Ascr: "𝒜", ascr: "𝒶", Assign: "≔", ast: "*", asymp: "≈", asympeq: "≍", Atilde: "Ã", atilde: "ã", Auml: "Ä", auml: "ä", awconint: "∳", awint: "⨑", backcong: "≌", backepsilon: "϶", backprime: "‵", backsim: "∽", backsimeq: "⋍", Backslash: "∖", Barv: "⫧", barvee: "⊽", Barwed: "⌆", barwed: "⌅", barwedge: "⌅", bbrk: "⎵", bbrktbrk: "⎶", bcong: "≌", Bcy: "Б", bcy: "б", bdquo: "„", becaus: "∵", Because: "∵", because: "∵", bemptyv: "⦰", bepsi: "϶", bernou: "ℬ", Bernoullis: "ℬ", Beta: "Β", beta: "β", beth: "ℶ", between: "≬", Bfr: "𝔅", bfr: "𝔟", bigcap: "⋂", bigcirc: "◯", bigcup: "⋃", bigodot: "⨀", bigoplus: "⨁", bigotimes: "⨂", bigsqcup: "⨆", bigstar: "★", bigtriangledown: "▽", bigtriangleup: "△", biguplus: "⨄", bigvee: "⋁", bigwedge: "⋀", bkarow: "⤍", blacklozenge: "⧫", blacksquare: "▪", blacktriangle: "▴", blacktriangledown: "▾", blacktriangleleft: "◂", blacktriangleright: "▸", blank: "␣", blk12: "▒", blk14: "░", blk34: "▓", block: "█", bne: "=⃥", bnequiv: "≡⃥", bNot: "⫭", bnot: "⌐", Bopf: "𝔹", bopf: "𝕓", bot: "⊥", bottom: "⊥", bowtie: "⋈", boxbox: "⧉", boxDL: "╗", boxDl: "╖", boxdL: "╕", boxdl: "┐", boxDR: "╔", boxDr: "╓", boxdR: "╒", boxdr: "┌", boxH: "═", boxh: "─", boxHD: "╦", boxHd: "╤", boxhD: "╥", boxhd: "┬", boxHU: "╩", boxHu: "╧", boxhU: "╨", boxhu: "┴", boxminus: "⊟", boxplus: "⊞", boxtimes: "⊠", boxUL: "╝", boxUl: "╜", boxuL: "╛", boxul: "┘", boxUR: "╚", boxUr: "╙", boxuR: "╘", boxur: "└", boxV: "║", boxv: "│", boxVH: "╬", boxVh: "╫", boxvH: "╪", boxvh: "┼", boxVL: "╣", boxVl: "╢", boxvL: "╡", boxvl: "┤", boxVR: "╠", boxVr: "╟", boxvR: "╞", boxvr: "├", bprime: "‵", Breve: "˘", breve: "˘", brvbar: "¦", Bscr: "ℬ", bscr: "𝒷", bsemi: "⁏", bsim: "∽", bsime: "⋍", bsol: "\\", bsolb: "⧅", bsolhsub: "⟈", bull: "•", bullet: "•", bump: "≎", bumpE: "⪮", bumpe: "≏", Bumpeq: "≎", bumpeq: "≏", Cacute: "Ć", cacute: "ć", Cap: "⋒", cap: "∩", capand: "⩄", capbrcup: "⩉", capcap: "⩋", capcup: "⩇", capdot: "⩀", CapitalDifferentialD: "ⅅ", caps: "∩︀", caret: "⁁", caron: "ˇ", Cayleys: "ℭ", ccaps: "⩍", Ccaron: "Č", ccaron: "č", Ccedil: "Ç", ccedil: "ç", Ccirc: "Ĉ", ccirc: "ĉ", Cconint: "∰", ccups: "⩌", ccupssm: "⩐", Cdot: "Ċ", cdot: "ċ", cedil: "¸", Cedilla: "¸", cemptyv: "⦲", cent: "¢", CenterDot: "·", centerdot: "·", Cfr: "ℭ", cfr: "𝔠", CHcy: "Ч", chcy: "ч", check: "✓", checkmark: "✓", Chi: "Χ", chi: "χ", cir: "○", circ: "ˆ", circeq: "≗", circlearrowleft: "↺", circlearrowright: "↻", circledast: "⊛", circledcirc: "⊚", circleddash: "⊝", CircleDot: "⊙", circledR: "®", circledS: "Ⓢ", CircleMinus: "⊖", CirclePlus: "⊕", CircleTimes: "⊗", cirE: "⧃", cire: "≗", cirfnint