From c54623c93d8a34f210bbdd81fcefa27a86335c00 Mon Sep 17 00:00:00 2001 From: yulong Date: Thu, 6 Nov 2025 16:47:43 +0000 Subject: [PATCH] =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E6=96=87=E4=BB=B6=E8=87=B3?= =?UTF-8?q?=20jtxtv09/drpy=5Flibs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- jtxtv09/drpy_libs/cheerio.min.js | 10945 +++++++++++++++++++++++++++++ jtxtv09/drpy_libs/gbk.js | 69 + jtxtv09/drpy_libs/jinja.js | 607 ++ jtxtv09/drpy_libs/jsencrypt.js | 360 + 4 files changed, 11981 insertions(+) create mode 100644 jtxtv09/drpy_libs/cheerio.min.js create mode 100644 jtxtv09/drpy_libs/gbk.js create mode 100644 jtxtv09/drpy_libs/jinja.js create mode 100644 jtxtv09/drpy_libs/jsencrypt.js diff --git a/jtxtv09/drpy_libs/cheerio.min.js b/jtxtv09/drpy_libs/cheerio.min.js new file mode 100644 index 0000000..1c5337a --- /dev/null +++ b/jtxtv09/drpy_libs/cheerio.min.js @@ -0,0 +1,10945 @@ +var e, t = function() { + return t = Object.assign || function(e) { + for (var t, n = 1, r = arguments.length; n < r; n++) + for (var i in t = arguments[n]) Object.prototype.hasOwnProperty.call(t, i) && (e[i] = t[i]); + return e + }, t.apply(this, arguments) + }, + n = { + xml: !1, + decodeEntities: !0 + }, + r = { + _useHtmlParser2: !0, + xmlMode: !0 + }; + +function i(e) { + return (null == e ? void 0 : e.xml) ? "boolean" == typeof e.xml ? r : t(t({}, r), e.xml) : null != e ? e : void 0 +}! function(e) { + e.Root = "root", e.Text = "text", e.Directive = "directive", e.Comment = "comment", e.Script = "script", e.Style = "style", e.Tag = "tag", e.CDATA = "cdata", e.Doctype = "doctype" +}(e || (e = {})); +const s = e.Root, + a = e.Text, + o = e.Directive, + c = e.Comment, + l = e.Script, + h = e.Style, + u = e.Tag, + p = e.CDATA, + f = e.Doctype; +class d { + constructor() { + this.parent = null, this.prev = null, this.next = null, this.startIndex = null, this.endIndex = null + } + get parentNode() { + return this.parent + } + set parentNode(e) { + this.parent = e + } + get previousSibling() { + return this.prev + } + set previousSibling(e) { + this.prev = e + } + get nextSibling() { + return this.next + } + set nextSibling(e) { + this.next = e + } + cloneNode(e = !1) { + return v(this, e) + } +} +class E extends d { + constructor(e) { + super(), this.data = e + } + get nodeValue() { + return this.data + } + set nodeValue(e) { + this.data = e + } +} +class m extends E { + constructor() { + super(...arguments), this.type = e.Text + } + get nodeType() { + return 3 + } +} +class T extends E { + constructor() { + super(...arguments), this.type = e.Comment + } + get nodeType() { + return 8 + } +} +class _ extends E { + constructor(t, n) { + super(n), this.name = t, this.type = e.Directive + } + get nodeType() { + return 1 + } +} +class A extends d { + constructor(e) { + super(), this.children = e + } + get firstChild() { + var e; + return null !== (e = this.children[0]) && void 0 !== e ? e : null + } + get lastChild() { + return this.children.length > 0 ? this.children[this.children.length - 1] : null + } + get childNodes() { + return this.children + } + set childNodes(e) { + this.children = e + } +} +class g extends A { + constructor() { + super(...arguments), this.type = e.CDATA + } + get nodeType() { + return 4 + } +} +class N extends A { + constructor() { + super(...arguments), this.type = e.Root + } + get nodeType() { + return 9 + } +} +class C extends A { + constructor(t, n, r = [], i = ("script" === t ? e.Script : "style" === t ? e.Style : e.Tag)) { + super(r), this.name = t, this.attribs = n, this.type = i + } + get nodeType() { + return 1 + } + get tagName() { + return this.name + } + set tagName(e) { + this.name = e + } + get attributes() { + return Object.keys(this.attribs).map((e => { + var t, n; + return { + name: e, + value: this.attribs[e], + namespace: null === (t = this["x-attribsNamespace"]) || void 0 === t ? void 0 : t[e], + prefix: null === (n = this["x-attribsPrefix"]) || void 0 === n ? void 0 : n[e] + } + })) + } +} + +function I(t) { + return (n = t).type === e.Tag || n.type === e.Script || n.type === e.Style; + var n +} + +function S(t) { + return t.type === e.CDATA +} + +function b(t) { + return t.type === e.Text +} + +function O(t) { + return t.type === e.Comment +} + +function y(t) { + return t.type === e.Directive +} + +function L(t) { + return t.type === e.Root +} + +function k(e) { + return Object.prototype.hasOwnProperty.call(e, "children") +} + +function v(e, t = !1) { + let n; + if (b(e)) n = new m(e.data); + else if (O(e)) n = new T(e.data); + else if (I(e)) { + const r = t ? D(e.children) : [], + i = new C(e.name, { + ...e.attribs + }, r); + r.forEach((e => e.parent = i)), null != e.namespace && (i.namespace = e.namespace), e["x-attribsNamespace"] && (i["x-attribsNamespace"] = { + ...e["x-attribsNamespace"] + }), e["x-attribsPrefix"] && (i["x-attribsPrefix"] = { + ...e["x-attribsPrefix"] + }), n = i + } else if (S(e)) { + const r = t ? D(e.children) : [], + i = new g(r); + r.forEach((e => e.parent = i)), n = i + } else if (L(e)) { + const r = t ? D(e.children) : [], + i = new N(r); + r.forEach((e => e.parent = i)), e["x-mode"] && (i["x-mode"] = e["x-mode"]), n = i + } else { + if (!y(e)) throw new Error(`Not implemented yet: ${e.type}`); + { + const t = new _(e.name, e.data); + null != e["x-name"] && (t["x-name"] = e["x-name"], t["x-publicId"] = e["x-publicId"], t["x-systemId"] = e["x-systemId"]), n = t + } + } + return n.startIndex = e.startIndex, n.endIndex = e.endIndex, null != e.sourceCodeLocation && (n.sourceCodeLocation = e.sourceCodeLocation), n +} + +function D(e) { + const t = e.map((e => v(e, !0))); + for (let e = 1; e < t.length; e++) t[e].prev = t[e - 1], t[e - 1].next = t[e]; + return t +} +const R = { + withStartIndices: !1, + withEndIndices: !1, + xmlMode: !1 +}; +class M { + constructor(e, t, n) { + this.dom = [], this.root = new N(this.dom), this.done = !1, this.tagStack = [this.root], this.lastNode = null, this.parser = null, "function" == typeof t && (n = t, t = R), "object" == typeof e && (t = e, e = void 0), this.callback = null != e ? e : null, this.options = null != t ? t : R, this.elementCB = null != n ? n : null + } + onparserinit(e) { + this.parser = e + } + onreset() { + this.dom = [], this.root = new N(this.dom), this.done = !1, this.tagStack = [this.root], this.lastNode = null, this.parser = null + } + onend() { + this.done || (this.done = !0, this.parser = null, this.handleCallback(null)) + } + onerror(e) { + this.handleCallback(e) + } + onclosetag() { + this.lastNode = null; + const e = this.tagStack.pop(); + this.options.withEndIndices && (e.endIndex = this.parser.endIndex), this.elementCB && this.elementCB(e) + } + onopentag(t, n) { + const r = this.options.xmlMode ? e.Tag : void 0, + i = new C(t, n, void 0, r); + this.addNode(i), this.tagStack.push(i) + } + ontext(t) { + const { + lastNode: n + } = this; + if (n && n.type === e.Text) n.data += t, this.options.withEndIndices && (n.endIndex = this.parser.endIndex); + else { + const e = new m(t); + this.addNode(e), this.lastNode = e + } + } + oncomment(t) { + if (this.lastNode && this.lastNode.type === e.Comment) return void(this.lastNode.data += t); + const n = new T(t); + this.addNode(n), this.lastNode = n + } + oncommentend() { + this.lastNode = null + } + oncdatastart() { + const e = new m(""), + t = new g([e]); + this.addNode(t), e.parent = t, this.lastNode = e + } + oncdataend() { + this.lastNode = null + } + onprocessinginstruction(e, t) { + const n = new _(e, t); + this.addNode(n) + } + handleCallback(e) { + if ("function" == typeof this.callback) this.callback(e, this.dom); + else if (e) throw e + } + addNode(e) { + const t = this.tagStack[this.tagStack.length - 1], + n = t.children[t.children.length - 1]; + this.options.withStartIndices && (e.startIndex = this.parser.startIndex), this.options.withEndIndices && (e.endIndex = this.parser.endIndex), t.children.push(e), n && (e.prev = n, n.next = e), e.parent = t, this.lastNode = null + } +} +const P = /["&'<>$\x80-\uFFFF]/g, + x = new Map([ + [34, """], + [38, "&"], + [39, "'"], + [60, "<"], + [62, ">"] + ]), + w = null != String.prototype.codePointAt ? (e, t) => e.codePointAt(t) : (e, t) => 55296 == (64512 & e.charCodeAt(t)) ? 1024 * (e.charCodeAt(t) - 55296) + e.charCodeAt(t + 1) - 56320 + 65536 : e.charCodeAt(t); + +function B(e) { + let t, n = "", + r = 0; + for (; null !== (t = P.exec(e));) { + const i = t.index, + s = e.charCodeAt(i), + a = x.get(s); + void 0 !== a ? (n += e.substring(r, i) + a, r = i + 1) : (n += `${e.substring(r,i)}&#x${w(e,i).toString(16)};`, r = P.lastIndex += Number(55296 == (64512 & s))) + } + return n + e.substr(r) +} + +function F(e, t) { + return function(n) { + let r, i = 0, + s = ""; + for (; r = e.exec(n);) i !== r.index && (s += n.substring(i, r.index)), s += t.get(r[0].charCodeAt(0)), i = r.index + 1; + return s + n.substring(i) + } +} +const U = F(/["&\u00A0]/g, new Map([ + [34, """], + [38, "&"], + [160, " "] + ])), + H = F(/[&<>\u00A0]/g, new Map([ + [38, "&"], + [60, "<"], + [62, ">"], + [160, " "] + ])), + G = new Map(["altGlyph", "altGlyphDef", "altGlyphItem", "animateColor", "animateMotion", "animateTransform", "clipPath", "feBlend", "feColorMatrix", "feComponentTransfer", "feComposite", "feConvolveMatrix", "feDiffuseLighting", "feDisplacementMap", "feDistantLight", "feDropShadow", "feFlood", "feFuncA", "feFuncB", "feFuncG", "feFuncR", "feGaussianBlur", "feImage", "feMerge", "feMergeNode", "feMorphology", "feOffset", "fePointLight", "feSpecularLighting", "feSpotLight", "feTile", "feTurbulence", "foreignObject", "glyphRef", "linearGradient", "radialGradient", "textPath"].map((e => [e.toLowerCase(), e]))), + Y = new Map(["definitionURL", "attributeName", "attributeType", "baseFrequency", "baseProfile", "calcMode", "clipPathUnits", "diffuseConstant", "edgeMode", "filterUnits", "glyphRef", "gradientTransform", "gradientUnits", "kernelMatrix", "kernelUnitLength", "keyPoints", "keySplines", "keyTimes", "lengthAdjust", "limitingConeAngle", "markerHeight", "markerUnits", "markerWidth", "maskContentUnits", "maskUnits", "numOctaves", "pathLength", "patternContentUnits", "patternTransform", "patternUnits", "pointsAtX", "pointsAtY", "pointsAtZ", "preserveAlpha", "preserveAspectRatio", "primitiveUnits", "refX", "refY", "repeatCount", "repeatDur", "requiredExtensions", "requiredFeatures", "specularConstant", "specularExponent", "spreadMethod", "startOffset", "stdDeviation", "stitchTiles", "surfaceScale", "systemLanguage", "tableValues", "targetX", "targetY", "textLength", "viewBox", "viewTarget", "xChannelSelector", "yChannelSelector", "zoomAndPan"].map((e => [e.toLowerCase(), e]))), + q = new Set(["style", "script", "xmp", "iframe", "noembed", "noframes", "plaintext", "noscript"]); + +function K(e) { + return e.replace(/"/g, """) +} +const j = new Set(["area", "base", "basefont", "br", "col", "command", "embed", "frame", "hr", "img", "input", "isindex", "keygen", "link", "meta", "param", "source", "track", "wbr"]); + +function V(e, t = {}) { + const n = "length" in e ? e : [e]; + let r = ""; + for (let e = 0; e < n.length; e++) r += W(n[e], t); + return r +} + +function W(e, t) { + switch (e.type) { + case s: + return V(e.children, t); + case f: + case o: + return `<${e.data}>`; + case c: + return function(e) { + return `\x3c!--${e.data}--\x3e` + }(e); + case p: + return function(e) { + return `` + }(e); + case l: + case h: + case u: + return function(e, t) { + var n; + "foreign" === t.xmlMode && (e.name = null !== (n = G.get(e.name)) && void 0 !== n ? n : e.name, e.parent && Q.has(e.parent.name) && (t = { + ...t, + xmlMode: !1 + })); + !t.xmlMode && X.has(e.name) && (t = { + ...t, + xmlMode: "foreign" + }); + let r = `<${e.name}`; + const i = function(e, t) { + var n; + if (!e) return; + const r = !1 === (null !== (n = t.encodeEntities) && void 0 !== n ? n : t.decodeEntities) ? K : t.xmlMode || "utf8" !== t.encodeEntities ? B : U; + return Object.keys(e).map((n => { + var i, s; + const a = null !== (i = e[n]) && void 0 !== i ? i : ""; + return "foreign" === t.xmlMode && (n = null !== (s = Y.get(n)) && void 0 !== s ? s : n), t.emptyAttrs || t.xmlMode || "" !== a ? `${n}="${r(a)}"` : n + })).join(" ") + }(e.attribs, t); + i && (r += ` ${i}`); + 0 === e.children.length && (t.xmlMode ? !1 !== t.selfClosingTags : t.selfClosingTags && j.has(e.name)) ? (t.xmlMode || (r += " "), r += "/>") : (r += ">", e.children.length > 0 && (r += V(e.children, t)), !t.xmlMode && j.has(e.name) || (r += ``)); + return r + }(e, t); + case a: + return function(e, t) { + var n; + let r = e.data || ""; + !1 === (null !== (n = t.encodeEntities) && void 0 !== n ? n : t.decodeEntities) || !t.xmlMode && e.parent && q.has(e.parent.name) || (r = t.xmlMode || "utf8" !== t.encodeEntities ? B(r) : H(r)); + return r + }(e, t) + } +} +const Q = new Set(["mi", "mo", "mn", "ms", "mtext", "annotation-xml", "foreignObject", "desc", "title"]), + X = new Set(["svg", "math"]); + +function $(e, t) { + return V(e, t) +} + +function z(e) { + return Array.isArray(e) ? e.map(z).join("") : k(e) && !O(e) ? z(e.children) : b(e) ? e.data : "" +} + +function J(t) { + return Array.isArray(t) ? t.map(J).join("") : k(t) && (t.type === e.Tag || S(t)) ? J(t.children) : b(t) ? t.data : "" +} + +function Z(e) { + return k(e) ? e.children : [] +} + +function ee(e) { + return e.parent || null +} + +function te(e) { + const t = ee(e); + if (null != t) return Z(t); + const n = [e]; + let { + prev: r, + next: i + } = e; + for (; null != r;) n.unshift(r), ({ + prev: r + } = r); + for (; null != i;) n.push(i), ({ + next: i + } = i); + return n +} + +function ne(e) { + let { + next: t + } = e; + for (; null !== t && !I(t);)({ + next: t + } = t); + return t +} + +function re(e) { + let { + prev: t + } = e; + for (; null !== t && !I(t);)({ + prev: t + } = t); + return t +} + +function ie(e) { + if (e.prev && (e.prev.next = e.next), e.next && (e.next.prev = e.prev), e.parent) { + const t = e.parent.children; + t.splice(t.lastIndexOf(e), 1) + } +} + +function se(e, t, n = !0, r = 1 / 0) { + return Array.isArray(t) || (t = [t]), ae(e, t, n, r) +} + +function ae(e, t, n, r) { + const i = []; + for (const s of t) { + if (e(s) && (i.push(s), --r <= 0)) break; + if (n && k(s) && s.children.length > 0) { + const t = ae(e, s.children, n, r); + if (i.push(...t), r -= t.length, r <= 0) break + } + } + return i +} + +function oe(e, t, n = !0) { + let r = null; + for (let i = 0; i < t.length && !r; i++) { + const s = t[i]; + I(s) && (e(s) ? r = s : n && s.children.length > 0 && (r = oe(e, s.children, !0))) + } + return r +} +const ce = { + tag_name: e => "function" == typeof e ? t => I(t) && e(t.name) : "*" === e ? I : t => I(t) && t.name === e, + tag_type: e => "function" == typeof e ? t => e(t.type) : t => t.type === e, + tag_contains: e => "function" == typeof e ? t => b(t) && e(t.data) : t => b(t) && t.data === e +}; + +function le(e, t) { + return "function" == typeof t ? n => I(n) && t(n.attribs[e]) : n => I(n) && n.attribs[e] === t +} + +function he(e, t) { + return n => e(n) || t(n) +} + +function ue(e) { + const t = Object.keys(e).map((t => { + const n = e[t]; + return Object.prototype.hasOwnProperty.call(ce, t) ? ce[t](n) : le(t, n) + })); + return 0 === t.length ? null : t.reduce(he) +} + +function pe(e, t, n = !0, r = 1 / 0) { + return se(ce.tag_name(e), t, n, r) +} +var fe; + +function de(e, t) { + const n = [], + r = []; + if (e === t) return 0; + let i = k(e) ? e : e.parent; + for (; i;) n.unshift(i), i = i.parent; + for (i = k(t) ? t : t.parent; i;) r.unshift(i), i = i.parent; + const s = Math.min(n.length, r.length); + let a = 0; + for (; a < s && n[a] === r[a];) a++; + if (0 === a) return fe.DISCONNECTED; + const o = n[a - 1], + c = o.children, + l = n[a], + h = r[a]; + return c.indexOf(l) > c.indexOf(h) ? o === t ? fe.FOLLOWING | fe.CONTAINED_BY : fe.FOLLOWING : o === e ? fe.PRECEDING | fe.CONTAINS : fe.PRECEDING +} + +function Ee(e) { + return (e = e.filter(((e, t, n) => !n.includes(e, t + 1)))).sort(((e, t) => { + const n = de(e, t); + return n & fe.PRECEDING ? -1 : n & fe.FOLLOWING ? 1 : 0 + })), e +}! function(e) { + e[e.DISCONNECTED = 1] = "DISCONNECTED", e[e.PRECEDING = 2] = "PRECEDING", e[e.FOLLOWING = 4] = "FOLLOWING", e[e.CONTAINS = 8] = "CONTAINS", e[e.CONTAINED_BY = 16] = "CONTAINED_BY" +}(fe || (fe = {})); +const me = ["url", "type", "lang"], + Te = ["fileSize", "bitrate", "framerate", "samplingrate", "channels", "duration", "height", "width"]; + +function _e(e) { + return pe("media:content", e).map((e => { + const { + attribs: t + } = e, n = { + medium: t.medium, + isDefault: !!t.isDefault + }; + for (const e of me) t[e] && (n[e] = t[e]); + for (const e of Te) t[e] && (n[e] = parseInt(t[e], 10)); + return t.expression && (n.expression = t.expression), n + })) +} + +function Ae(e, t) { + return pe(e, t, !0, 1)[0] +} + +function ge(e, t, n = !1) { + return z(pe(e, t, n, 1)).trim() +} + +function Ne(e, t, n, r, i = !1) { + const s = ge(n, r, i); + s && (e[t] = s) +} + +function Ce(e) { + return "rss" === e || "feed" === e || "rdf:RDF" === e +} +var Ie, Se = Object.freeze({ + __proto__: null, + isTag: I, + isCDATA: S, + isText: b, + isComment: O, + isDocument: L, + hasChildren: k, + getOuterHTML: $, + getInnerHTML: function(e, t) { + return k(e) ? e.children.map((e => $(e, t))).join("") : "" + }, + getText: function e(t) { + return Array.isArray(t) ? t.map(e).join("") : I(t) ? "br" === t.name ? "\n" : e(t.children) : S(t) ? e(t.children) : b(t) ? t.data : "" + }, + textContent: z, + innerText: J, + getChildren: Z, + getParent: ee, + getSiblings: te, + getAttributeValue: function(e, t) { + var n; + return null === (n = e.attribs) || void 0 === n ? void 0 : n[t] + }, + hasAttrib: function(e, t) { + return null != e.attribs && Object.prototype.hasOwnProperty.call(e.attribs, t) && null != e.attribs[t] + }, + getName: function(e) { + return e.name + }, + nextElementSibling: ne, + prevElementSibling: re, + removeElement: ie, + replaceElement: function(e, t) { + const n = t.prev = e.prev; + n && (n.next = t); + const r = t.next = e.next; + r && (r.prev = t); + const i = t.parent = e.parent; + if (i) { + const n = i.children; + n[n.lastIndexOf(e)] = t, e.parent = null + } + }, + appendChild: function(e, t) { + if (ie(t), t.next = null, t.parent = e, e.children.push(t) > 1) { + const n = e.children[e.children.length - 2]; + n.next = t, t.prev = n + } else t.prev = null + }, + append: function(e, t) { + ie(t); + const { + parent: n + } = e, r = e.next; + if (t.next = r, t.prev = e, e.next = t, t.parent = n, r) { + if (r.prev = t, n) { + const e = n.children; + e.splice(e.lastIndexOf(r), 0, t) + } + } else n && n.children.push(t) + }, + prependChild: function(e, t) { + if (ie(t), t.parent = e, t.prev = null, 1 !== e.children.unshift(t)) { + const n = e.children[1]; + n.prev = t, t.next = n + } else t.next = null + }, + prepend: function(e, t) { + ie(t); + const { + parent: n + } = e; + if (n) { + const r = n.children; + r.splice(r.indexOf(e), 0, t) + } + e.prev && (e.prev.next = t), t.parent = n, t.prev = e.prev, t.next = e, e.prev = t + }, + filter: se, + find: ae, + findOneChild: function(e, t) { + return t.find(e) + }, + findOne: oe, + existsOne: function e(t, n) { + return n.some((n => I(n) && (t(n) || n.children.length > 0 && e(t, n.children)))) + }, + findAll: function(e, t) { + var n; + const r = [], + i = t.filter(I); + let s; + for (; s = i.shift();) { + const t = null === (n = s.children) || void 0 === n ? void 0 : n.filter(I); + t && t.length > 0 && i.unshift(...t), e(s) && r.push(s) + } + return r + }, + testElement: function(e, t) { + const n = ue(e); + return !n || n(t) + }, + getElements: function(e, t, n, r = 1 / 0) { + const i = ue(e); + return i ? se(i, t, n, r) : [] + }, + getElementById: function(e, t, n = !0) { + return Array.isArray(t) || (t = [t]), oe(le("id", e), t, n) + }, + getElementsByTagName: pe, + getElementsByTagType: function(e, t, n = !0, r = 1 / 0) { + return se(ce.tag_type(e), t, n, r) + }, + removeSubsets: function(e) { + let t = e.length; + for (; --t >= 0;) { + const n = e[t]; + if (t > 0 && e.lastIndexOf(n, t - 1) >= 0) e.splice(t, 1); + else + for (let r = n.parent; r; r = r.parent) + if (e.includes(r)) { + e.splice(t, 1); + break + } + } + return e + }, + get DocumentPosition() { + return fe + }, + compareDocumentPosition: de, + uniqueSort: Ee, + getFeed: function(e) { + const t = Ae(Ce, e); + return t ? "feed" === t.name ? function(e) { + var t; + const n = e.children, + r = { + type: "atom", + items: pe("entry", n).map((e => { + var t; + const { + children: n + } = e, r = { + media: _e(n) + }; + Ne(r, "id", "id", n), Ne(r, "title", "title", n); + const i = null === (t = Ae("link", n)) || void 0 === t ? void 0 : t.attribs.href; + i && (r.link = i); + const s = ge("summary", n) || ge("content", n); + s && (r.description = s); + const a = ge("updated", n); + return a && (r.pubDate = new Date(a)), r + })) + }; + Ne(r, "id", "id", n), Ne(r, "title", "title", n); + const i = null === (t = Ae("link", n)) || void 0 === t ? void 0 : t.attribs.href; + i && (r.link = i); + Ne(r, "description", "subtitle", n); + const s = ge("updated", n); + s && (r.updated = new Date(s)); + return Ne(r, "author", "email", n, !0), r + }(t) : function(e) { + var t, n; + const r = null !== (n = null === (t = Ae("channel", e.children)) || void 0 === t ? void 0 : t.children) && void 0 !== n ? n : [], + i = { + type: e.name.substr(0, 3), + id: "", + items: pe("item", e.children).map((e => { + const { + children: t + } = e, n = { + media: _e(t) + }; + Ne(n, "id", "guid", t), Ne(n, "title", "title", t), Ne(n, "link", "link", t), Ne(n, "description", "description", t); + const r = ge("pubDate", t); + return r && (n.pubDate = new Date(r)), n + })) + }; + Ne(i, "title", "title", r), Ne(i, "link", "link", r), Ne(i, "description", "description", r); + const s = ge("lastBuildDate", r); + s && (i.updated = new Date(s)); + return Ne(i, "author", "managingEditor", r, !0), i + }(t) : null + } + }), + be = "undefined" != typeof global ? global : "undefined" != typeof self ? self : "undefined" != typeof window ? window : {}; + +function Oe(e) { + if (Object.keys) return Object.keys(e); + var t = []; + for (var n in e) t.push(n); + return t +} + +function ye(e, t) { + if (e.forEach) return e.forEach(t); + for (var n = 0; n < e.length; n++) t(e[n], n, e) +} + +function Le() { + try { + return Object.defineProperty({}, "_", {}), + function(e, t, n) { + Object.defineProperty(e, t, { + writable: !0, + enumerable: !1, + configurable: !0, + value: n + }) + } + } catch (e) { + return function(e, t, n) { + e[t] = n + } + } +} +var ke = ["Array", "Boolean", "Date", "Error", "EvalError", "Function", "Infinity", "JSON", "Math", "NaN", "Number", "Object", "RangeError", "ReferenceError", "RegExp", "String", "SyntaxError", "TypeError", "URIError", "decodeURI", "decodeURIComponent", "encodeURI", "encodeURIComponent", "escape", "eval", "isFinite", "isNaN", "parseFloat", "parseInt", "undefined", "unescape"]; + +function ve() {} + +function De(e) { + if (!(this instanceof De)) return new De(e); + this.code = e +} + +function Re(e) { + if (Me(e)) return e; + var t = new ve; + return "object" == typeof e && ye(Oe(e), (function(n) { + t[n] = e[n] + })), t +} + +function Me(e) { + return e instanceof ve +} +ve.prototype = {}, De.prototype.runInContext = function(e) { + if (!(e instanceof ve)) throw new TypeError("needs a 'context' argument."); + if (be.document) { + var t = be.document.createElement("iframe"); + t.style || (t.style = {}), t.style.display = "none", be.document.body.appendChild(t); + var n = t.contentWindow, + r = n.eval, + i = n.execScript; + !r && i && (i.call(n, "null"), r = n.eval), ye(Oe(e), (function(t) { + n[t] = e[t] + })), ye(ke, (function(t) { + e[t] && (n[t] = e[t]) + })); + var s = Oe(n), + a = r.call(n, this.code); + return ye(Oe(n), (function(t) { + (t in e || -1 === function(e, t) { + if (xe) return e.indexOf(t); + for (var n = 0; n < e.length; ++n) + if (e[n] === t) return n; + return -1 + }(s, t)) && (e[t] = n[t]) + })), ye(ke, (function(t) { + var r, i, s; + t in e || (r = e, i = t, s = n[t], "function" != typeof Ie && (Ie = Le), Ie(r, i, s)) + })), be.document.body.removeChild(t), a + } + return function(e, t) { + var n = Oe(be); + return n.push("with (this.__ctx__){return eval(this.__code__)}"), Function.apply(null, n).apply({ + __code__: e, + __ctx__: t + }) + }(this.code, e) +}, De.prototype.runInThisContext = function() { + return new Function("code", "return eval(code);").call(be, this.code) +}, De.prototype.runInNewContext = function(e) { + var t = Re(e), + n = this.runInContext(t); + return e && ye(Oe(t), (function(n) { + e[n] = t[n] + })), n +}; +var Pe = { + runInContext: function(e, t, n) { + return new De(e).runInContext(t, n) + }, + isContext: Me, + createContext: Re, + createScript: function(e) { + return new De(e) + }, + Script: De, + runInThisContext: function(e, t) { + return new De(e).runInThisContext(t) + }, + runInNewContext: function(e, t, n) { + return new De(e).runInNewContext(t, n) + } + }, + xe = [].indexOf; +const { + hasOwnProperty: we +} = Object.prototype; + +function Be(e, t) { + return (e = e.slice()).push(t), e +} + +function Fe(e, t) { + return (t = t.slice()).unshift(e), t +} +class Ue extends Error { + constructor(e) { + super('JSONPath should not be called with "new" (it prevents return of (unwrapped) scalar values)'), this.avoidNew = !0, this.value = e, this.name = "NewError" + } +} + +function He(e, t, n, r, i) { + if (!(this instanceof He)) try { + return new He(e, t, n, r, i) + } catch (e) { + if (!e.avoidNew) throw e; + return e.value + } + "string" == typeof e && (i = r, r = n, n = t, t = e, e = null); + const s = e && "object" == typeof e; + if (e = e || {}, this.json = e.json || n, this.path = e.path || t, this.resultType = e.resultType || "value", this.flatten = e.flatten || !1, this.wrap = !we.call(e, "wrap") || e.wrap, this.sandbox = e.sandbox || {}, this.preventEval = e.preventEval || !1, this.parent = e.parent || null, this.parentProperty = e.parentProperty || null, this.callback = e.callback || r || null, this.otherTypeCallback = e.otherTypeCallback || i || function() { + throw new TypeError("You must supply an otherTypeCallback callback option with the @other() operator.") + }, !1 !== e.autostart) { + const r = { + path: s ? e.path : t + }; + s ? "json" in e && (r.json = e.json) : r.json = n; + const i = this.evaluate(r); + if (!i || "object" != typeof i) throw new Ue(i); + return i + } +} +He.prototype.evaluate = function(e, t, n, r) { + let i = this.parent, + s = this.parentProperty, + { + flatten: a, + wrap: o + } = this; + if (this.currResultType = this.resultType, this.currPreventEval = this.preventEval, this.currSandbox = this.sandbox, n = n || this.callback, this.currOtherTypeCallback = r || this.otherTypeCallback, t = t || this.json, (e = e || this.path) && "object" == typeof e && !Array.isArray(e)) { + if (!e.path && "" !== e.path) throw new TypeError('You must supply a "path" property when providing an object argument to JSONPath.evaluate().'); + if (!we.call(e, "json")) throw new TypeError('You must supply a "json" property when providing an object argument to JSONPath.evaluate().'); + ({ + json: t + } = e), a = we.call(e, "flatten") ? e.flatten : a, this.currResultType = we.call(e, "resultType") ? e.resultType : this.currResultType, this.currSandbox = we.call(e, "sandbox") ? e.sandbox : this.currSandbox, o = we.call(e, "wrap") ? e.wrap : o, this.currPreventEval = we.call(e, "preventEval") ? e.preventEval : this.currPreventEval, n = we.call(e, "callback") ? e.callback : n, this.currOtherTypeCallback = we.call(e, "otherTypeCallback") ? e.otherTypeCallback : this.currOtherTypeCallback, i = we.call(e, "parent") ? e.parent : i, s = we.call(e, "parentProperty") ? e.parentProperty : s, e = e.path + } + if (i = i || null, s = s || null, Array.isArray(e) && (e = He.toPathString(e)), !e && "" !== e || !t) return; + const c = He.toPathArray(e); + "$" === c[0] && c.length > 1 && c.shift(), this._hasParentSelector = null; + const l = this._trace(c, t, ["$"], i, s, n).filter((function(e) { + return e && !e.isParentSelector + })); + return l.length ? o || 1 !== l.length || l[0].hasArrExpr ? l.reduce(((e, t) => { + const n = this._getPreferredOutput(t); + return a && Array.isArray(n) ? e = e.concat(n) : e.push(n), e + }), []) : this._getPreferredOutput(l[0]) : o ? [] : void 0 +}, He.prototype._getPreferredOutput = function(e) { + const t = this.currResultType; + switch (t) { + case "all": { + const t = Array.isArray(e.path) ? e.path : He.toPathArray(e.path); + return e.pointer = He.toPointer(t), e.path = "string" == typeof e.path ? e.path : He.toPathString(e.path), e + } + case "value": + case "parent": + case "parentProperty": + return e[t]; + case "path": + return He.toPathString(e[t]); + case "pointer": + return He.toPointer(e.path); + default: + throw new TypeError("Unknown result type") + } +}, He.prototype._handleCallback = function(e, t, n) { + if (t) { + const r = this._getPreferredOutput(e); + e.path = "string" == typeof e.path ? e.path : He.toPathString(e.path), t(r, n, e) + } +}, He.prototype._trace = function(e, t, n, r, i, s, a, o) { + let c; + if (!e.length) return c = { + path: n, + value: t, + parent: r, + parentProperty: i, + hasArrExpr: a + }, this._handleCallback(c, s, "value"), c; + const l = e[0], + h = e.slice(1), + u = []; + + function p(e) { + Array.isArray(e) ? e.forEach((e => { + u.push(e) + })) : u.push(e) + } + if (("string" != typeof l || o) && t && we.call(t, l)) p(this._trace(h, t[l], Be(n, l), t, l, s, a)); + else if ("*" === l) this._walk(t, (e => { + p(this._trace(h, t[e], Be(n, e), t, e, s, !0, !0)) + })); + else if (".." === l) p(this._trace(h, t, n, r, i, s, a)), this._walk(t, (r => { + "object" == typeof t[r] && p(this._trace(e.slice(), t[r], Be(n, r), t, r, s, !0)) + })); + else { + if ("^" === l) return this._hasParentSelector = !0, { + path: n.slice(0, -1), + expr: h, + isParentSelector: !0 + }; + if ("~" === l) return c = { + path: Be(n, l), + value: i, + parent: r, + parentProperty: null + }, this._handleCallback(c, s, "property"), c; + if ("$" === l) p(this._trace(h, t, n, null, null, s, a)); + else if (/^(-?\d*):(-?\d*):?(\d*)$/u.test(l)) p(this._slice(l, h, t, n, r, i, s)); + else if (0 === l.indexOf("?(")) { + if (this.currPreventEval) throw new Error("Eval [?(expr)] prevented in JSONPath expression."); + const e = l.replace(/^\?\((.*?)\)$/u, "$1"); + this._walk(t, (a => { + this._eval(e, t[a], a, n, r, i) && p(this._trace(h, t[a], Be(n, a), t, a, s, !0)) + })) + } else if ("(" === l[0]) { + if (this.currPreventEval) throw new Error("Eval [(expr)] prevented in JSONPath expression."); + p(this._trace(Fe(this._eval(l, t, n[n.length - 1], n.slice(0, -1), r, i), h), t, n, r, i, s, a)) + } else if ("@" === l[0]) { + let e = !1; + const a = l.slice(1, -2); + switch (a) { + case "scalar": + t && ["object", "function"].includes(typeof t) || (e = !0); + break; + case "boolean": + case "string": + case "undefined": + case "function": + typeof t === a && (e = !0); + break; + case "integer": + !Number.isFinite(t) || t % 1 || (e = !0); + break; + case "number": + Number.isFinite(t) && (e = !0); + break; + case "nonFinite": + "number" != typeof t || Number.isFinite(t) || (e = !0); + break; + case "object": + t && typeof t === a && (e = !0); + break; + case "array": + Array.isArray(t) && (e = !0); + break; + case "other": + e = this.currOtherTypeCallback(t, n, r, i); + break; + case "null": + null === t && (e = !0); + break; + default: + throw new TypeError("Unknown value type " + a) + } + if (e) return c = { + path: n, + value: t, + parent: r, + parentProperty: i + }, this._handleCallback(c, s, "value"), c + } else if ("`" === l[0] && t && we.call(t, l.slice(1))) { + const e = l.slice(1); + p(this._trace(h, t[e], Be(n, e), t, e, s, a, !0)) + } else if (l.includes(",")) { + const e = l.split(","); + for (const a of e) p(this._trace(Fe(a, h), t, n, r, i, s, !0)) + } else !o && t && we.call(t, l) && p(this._trace(h, t[l], Be(n, l), t, l, s, a, !0)) + } + if (this._hasParentSelector) + for (let e = 0; e < u.length; e++) { + const n = u[e]; + if (n && n.isParentSelector) { + const o = this._trace(n.expr, t, n.path, r, i, s, a); + if (Array.isArray(o)) { + u[e] = o[0]; + const t = o.length; + for (let n = 1; n < t; n++) e++, u.splice(e, 0, o[n]) + } else u[e] = o + } + } + return u +}, He.prototype._walk = function(e, t) { + if (Array.isArray(e)) { + const n = e.length; + for (let e = 0; e < n; e++) t(e) + } else e && "object" == typeof e && Object.keys(e).forEach((e => { + t(e) + })) +}, He.prototype._slice = function(e, t, n, r, i, s, a) { + if (!Array.isArray(n)) return; + const o = n.length, + c = e.split(":"), + l = c[2] && Number.parseInt(c[2]) || 1; + let h = c[0] && Number.parseInt(c[0]) || 0, + u = c[1] && Number.parseInt(c[1]) || o; + h = h < 0 ? Math.max(0, h + o) : Math.min(o, h), u = u < 0 ? Math.max(0, u + o) : Math.min(o, u); + const p = []; + for (let e = h; e < u; e += l) { + this._trace(Fe(e, t), n, r, i, s, a, !0).forEach((e => { + p.push(e) + })) + } + return p +}, He.prototype._eval = function(e, t, n, r, i, s) { + this.currSandbox._$_parentProperty = s, this.currSandbox._$_parent = i, this.currSandbox._$_property = n, this.currSandbox._$_root = this.json, this.currSandbox._$_v = t; + const a = e.includes("@path"); + a && (this.currSandbox._$_path = He.toPathString(r.concat([n]))); + const o = "script:" + e; + if (!He.cache[o]) { + let t = e.replace(/@parentProperty/gu, "_$_parentProperty").replace(/@parent/gu, "_$_parent").replace(/@property/gu, "_$_property").replace(/@root/gu, "_$_root").replace(/@([.\s)[])/gu, "_$_v$1"); + a && (t = t.replace(/@path/gu, "_$_path")), He.cache[o] = new this.vm.Script(t) + } + try { + return He.cache[o].runInNewContext(this.currSandbox) + } catch (t) { + throw new Error("jsonPath: " + t.message + ": " + e) + } +}, He.cache = {}, He.toPathString = function(e) { + const t = e, + n = t.length; + let r = "$"; + for (let e = 1; e < n; e++) /^(~|\^|@.*?\(\))$/u.test(t[e]) || (r += /^[0-9*]+$/u.test(t[e]) ? "[" + t[e] + "]" : "['" + t[e] + "']"); + return r +}, He.toPointer = function(e) { + const t = e, + n = t.length; + let r = ""; + for (let e = 1; e < n; e++) /^(~|\^|@.*?\(\))$/u.test(t[e]) || (r += "/" + t[e].toString().replace(/~/gu, "~0").replace(/\//gu, "~1")); + return r +}, He.toPathArray = function(e) { + const { + cache: t + } = He; + if (t[e]) return t[e].concat(); + const n = [], + r = e.replace(/@(?:null|boolean|number|string|integer|undefined|nonFinite|scalar|array|object|function|other)\(\)/gu, ";$&;").replace(/[['](\??\(.*?\))[\]']/gu, (function(e, t) { + return "[#" + (n.push(t) - 1) + "]" + })).replace(/\[['"]([^'\]]*)['"]\]/gu, (function(e, t) { + return "['" + t.replace(/\./gu, "%@%").replace(/~/gu, "%%@@%%") + "']" + })).replace(/~/gu, ";~;").replace(/['"]?\.['"]?(?![^[]*\])|\[['"]?/gu, ";").replace(/%@%/gu, ".").replace(/%%@@%%/gu, "~").replace(/(?:;)?(\^+)(?:;)?/gu, (function(e, t) { + return ";" + t.split("").join(";") + ";" + })).replace(/;;;|;;/gu, ";..;").replace(/;$|'?\]|'$/gu, ""), + i = r.split(";").map((function(e) { + const t = e.match(/#(\d+)/u); + return t && t[1] ? n[t[1]] : e + })); + return t[e] = i, t[e].concat() +}, He.prototype.vm = Pe; +var Ge = "undefined" != typeof globalThis ? globalThis : "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : {}; + +function Ye() { + throw new Error("Dynamic requires are not currently supported by rollup-plugin-commonjs") +} + +function qe(e) { + return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e +} + +function Ke(e, t) { + return e(t = { + exports: {} + }, t.exports), t.exports +} +var je = Ke((function(e) { + var t = Array.prototype, + n = Object.prototype, + r = { + "&": "&", + '"': """, + "'": "'", + "<": "<", + ">": ">" + }, + i = /[&"'<>]/g, + s = e.exports = {}; + + function a(e, t) { + return n.hasOwnProperty.call(e, t) + } + + function o(e) { + return r[e] + } + + function c(e, t, n) { + var r, i, s; + if (e instanceof Error && (e = (i = e).name + ": " + i.message), Object.setPrototypeOf ? (r = new Error(e), Object.setPrototypeOf(r, c.prototype)) : (r = this, Object.defineProperty(r, "message", { + enumerable: !1, + writable: !0, + value: e + })), Object.defineProperty(r, "name", { + value: "Template render error" + }), Error.captureStackTrace && Error.captureStackTrace(r, this.constructor), i) { + var a = Object.getOwnPropertyDescriptor(i, "stack"); + (s = a && (a.get || function() { + return a.value + })) || (s = function() { + return i.stack + }) + } else { + var o = new Error(e).stack; + s = function() { + return o + } + } + return Object.defineProperty(r, "stack", { + get: function() { + return s.call(r) + } + }), Object.defineProperty(r, "cause", { + value: i + }), r.lineno = t, r.colno = n, r.firstUpdate = !0, r.Update = function(e) { + var t = "(" + (e || "unknown path") + ")"; + return this.firstUpdate && (this.lineno && this.colno ? t += " [Line " + this.lineno + ", Column " + this.colno + "]" : this.lineno && (t += " [Line " + this.lineno + "]")), t += "\n ", this.firstUpdate && (t += " "), this.message = t + (this.message || ""), this.firstUpdate = !1, this + }, r + } + + function l(e) { + return "[object Function]" === n.toString.call(e) + } + + function h(e) { + return "[object Array]" === n.toString.call(e) + } + + function u(e) { + return "[object String]" === n.toString.call(e) + } + + function p(e) { + return "[object Object]" === n.toString.call(e) + } + + function f(e) { + var t = function(e) { + return e ? "string" == typeof e ? e.split(".") : [e] : [] + }(e); + return function(e) { + for (var n = e, r = 0; r < t.length; r++) { + var i = t[r]; + if (!a(n, i)) return; + n = n[i] + } + return n + } + } + + function d(e) { + return Array.prototype.slice.call(e) + } + + function E(e, t, n) { + return Array.prototype.indexOf.call(e || [], t, n) + } + + function m(e) { + var t = []; + for (var n in e) a(e, n) && t.push(n); + return t + } + s.hasOwnProp = a, s._prettifyError = function(e, t, n) { + if (n.Update || (n = new s.TemplateError(n)), n.Update(e), !t) { + var r = n; + (n = new Error(r.message)).name = r.name + } + return n + }, Object.setPrototypeOf ? Object.setPrototypeOf(c.prototype, Error.prototype) : c.prototype = Object.create(Error.prototype, { + constructor: { + value: c + } + }), s.TemplateError = c, s.escape = function(e) { + return e.replace(i, o) + }, s.isFunction = l, s.isArray = h, s.isString = u, s.isObject = p, s.getAttrGetter = f, s.groupBy = function(e, t, n) { + for (var r = {}, i = l(t) ? t : f(t), s = 0; s < e.length; s++) { + var a = e[s], + o = i(a, s); + if (void 0 === o && !0 === n) throw new TypeError('groupby: attribute "' + t + '" resolved to undefined'); + (r[o] || (r[o] = [])).push(a) + } + return r + }, s.toArray = d, s.without = function(e) { + var t = []; + if (!e) return t; + for (var n = e.length, r = d(arguments).slice(1), i = -1; ++i < n;) - 1 === E(r, e[i]) && t.push(e[i]); + return t + }, s.repeat = function(e, t) { + for (var n = "", r = 0; r < t; r++) n += e; + return n + }, s.each = function(e, n, r) { + if (null != e) + if (t.forEach && e.forEach === t.forEach) e.forEach(n, r); + else if (e.length === +e.length) + for (var i = 0, s = e.length; i < s; i++) n.call(r, e[i], i, e) + }, s.map = function(e, n) { + var r = []; + if (null == e) return r; + if (t.map && e.map === t.map) return e.map(n); + for (var i = 0; i < e.length; i++) r[r.length] = n(e[i], i); + return e.length === +e.length && (r.length = e.length), r + }, s.asyncIter = function(e, t, n) { + var r = -1; + ! function i() { + ++r < e.length ? t(e[r], r, i, n) : n() + }() + }, s.asyncFor = function(e, t, n) { + var r = m(e || {}), + i = r.length, + s = -1; + ! function a() { + s++; + var o = r[s]; + s < i ? t(o, e[o], s, i, a) : n() + }() + }, s.indexOf = E, s.keys = m, s._entries = function(e) { + return m(e).map((function(t) { + return [t, e[t]] + })) + }, s._values = function(e) { + return m(e).map((function(t) { + return e[t] + })) + }, s._assign = s.extend = function(e, t) { + return e = e || {}, m(t).forEach((function(n) { + e[n] = t[n] + })), e + }, s.inOperator = function(e, t) { + if (h(t) || u(t)) return -1 !== t.indexOf(e); + if (p(t)) return e in t; + throw new Error('Cannot use "in" operator to search for "' + e + '" in unexpected types.') + } +})); + +function Ve() { + throw new Error("setTimeout has not been defined") +} + +function We() { + throw new Error("clearTimeout has not been defined") +} +var Qe = Ve, + Xe = We; + +function $e(e) { + if (Qe === setTimeout) return setTimeout(e, 0); + if ((Qe === Ve || !Qe) && setTimeout) return Qe = setTimeout, setTimeout(e, 0); + try { + return Qe(e, 0) + } catch (t) { + try { + return Qe.call(null, e, 0) + } catch (t) { + return Qe.call(this, e, 0) + } + } +} +"function" == typeof be.setTimeout && (Qe = setTimeout), "function" == typeof be.clearTimeout && (Xe = clearTimeout); +var ze, Je = [], + Ze = !1, + et = -1; + +function tt() { + Ze && ze && (Ze = !1, ze.length ? Je = ze.concat(Je) : et = -1, Je.length && nt()) +} + +function nt() { + if (!Ze) { + var e = $e(tt); + Ze = !0; + for (var t = Je.length; t;) { + for (ze = Je, Je = []; ++et < t;) ze && ze[et].run(); + et = -1, t = Je.length + } + ze = null, Ze = !1, + function(e) { + if (Xe === clearTimeout) return clearTimeout(e); + if ((Xe === We || !Xe) && clearTimeout) return Xe = clearTimeout, clearTimeout(e); + try { + Xe(e) + } catch (t) { + try { + return Xe.call(null, e) + } catch (t) { + return Xe.call(this, e) + } + } + }(e) + } +} + +function rt(e, t) { + this.fun = e, this.array = t +} +rt.prototype.run = function() { + this.fun.apply(null, this.array) +}; + +function it() {} +var st = it, + at = it, + ot = it, + ct = it, + lt = it, + ht = it, + ut = it; +var pt = be.performance || {}, + ft = pt.now || pt.mozNow || pt.msNow || pt.oNow || pt.webkitNow || function() { + return (new Date).getTime() + }; +var dt = new Date; +var Et = { + nextTick: function(e) { + var t = new Array(arguments.length - 1); + if (arguments.length > 1) + for (var n = 1; n < arguments.length; n++) t[n - 1] = arguments[n]; + Je.push(new rt(e, t)), 1 !== Je.length || Ze || $e(nt) + }, + title: "browser", + browser: !0, + env: {}, + argv: [], + version: "", + versions: {}, + on: st, + addListener: at, + once: ot, + off: ct, + removeListener: lt, + removeAllListeners: ht, + emit: ut, + binding: function(e) { + throw new Error("process.binding is not supported") + }, + cwd: function() { + return "/" + }, + chdir: function(e) { + throw new Error("process.chdir is not supported") + }, + umask: function() { + return 0 + }, + hrtime: function(e) { + var t = .001 * ft.call(pt), + n = Math.floor(t), + r = Math.floor(t % 1 * 1e9); + return e && (n -= e[0], (r -= e[1]) < 0 && (n--, r += 1e9)), [n, r] + }, + platform: "browser", + release: {}, + config: {}, + uptime: function() { + return (new Date - dt) / 1e3 + } +}; + +function mt() {} + +function Tt() { + Tt.init.call(this) +} + +function _t(e) { + return void 0 === e._maxListeners ? Tt.defaultMaxListeners : e._maxListeners +} + +function At(e, t, n) { + if (t) e.call(n); + else + for (var r = e.length, i = yt(e, r), s = 0; s < r; ++s) i[s].call(n) +} + +function gt(e, t, n, r) { + if (t) e.call(n, r); + else + for (var i = e.length, s = yt(e, i), a = 0; a < i; ++a) s[a].call(n, r) +} + +function Nt(e, t, n, r, i) { + if (t) e.call(n, r, i); + else + for (var s = e.length, a = yt(e, s), o = 0; o < s; ++o) a[o].call(n, r, i) +} + +function Ct(e, t, n, r, i, s) { + if (t) e.call(n, r, i, s); + else + for (var a = e.length, o = yt(e, a), c = 0; c < a; ++c) o[c].call(n, r, i, s) +} + +function It(e, t, n, r) { + if (t) e.apply(n, r); + else + for (var i = e.length, s = yt(e, i), a = 0; a < i; ++a) s[a].apply(n, r) +} + +function St(e, t, n, r) { + var i, s, a; + if ("function" != typeof n) throw new TypeError('"listener" argument must be a function'); + if ((s = e._events) ? (s.newListener && (e.emit("newListener", t, n.listener ? n.listener : n), s = e._events), a = s[t]) : (s = e._events = new mt, e._eventsCount = 0), a) { + if ("function" == typeof a ? a = s[t] = r ? [n, a] : [a, n] : r ? a.unshift(n) : a.push(n), !a.warned && (i = _t(e)) && i > 0 && a.length > i) { + a.warned = !0; + var o = new Error("Possible EventEmitter memory leak detected. " + a.length + " " + t + " listeners added. Use emitter.setMaxListeners() to increase limit"); + o.name = "MaxListenersExceededWarning", o.emitter = e, o.type = t, o.count = a.length, + function(e) { + "function" == typeof console.warn ? console.warn(e) : console.log(e) + }(o) + } + } else a = s[t] = n, ++e._eventsCount; + return e +} + +function bt(e, t, n) { + var r = !1; + + function i() { + e.removeListener(t, i), r || (r = !0, n.apply(e, arguments)) + } + return i.listener = n, i +} + +function Ot(e) { + var t = this._events; + if (t) { + var n = t[e]; + if ("function" == typeof n) return 1; + if (n) return n.length + } + return 0 +} + +function yt(e, t) { + for (var n = new Array(t); t--;) n[t] = e[t]; + return n +} + +function Lt() { + var e; + Tt.call(this), this.__emitError = (e = this, function(t) { + e.emit("error", t) + }) +} + +function kt() { + return new Lt +} +mt.prototype = Object.create(null), Tt.EventEmitter = Tt, Tt.usingDomains = !1, Tt.prototype.domain = void 0, Tt.prototype._events = void 0, Tt.prototype._maxListeners = void 0, Tt.defaultMaxListeners = 10, Tt.init = function() { + this.domain = null, Tt.usingDomains && undefined.active, this._events && this._events !== Object.getPrototypeOf(this)._events || (this._events = new mt, this._eventsCount = 0), this._maxListeners = this._maxListeners || void 0 +}, Tt.prototype.setMaxListeners = function(e) { + if ("number" != typeof e || e < 0 || isNaN(e)) throw new TypeError('"n" argument must be a positive number'); + return this._maxListeners = e, this +}, Tt.prototype.getMaxListeners = function() { + return _t(this) +}, Tt.prototype.emit = function(e) { + var t, n, r, i, s, a, o, c = "error" === e; + if (a = this._events) c = c && null == a.error; + else if (!c) return !1; + if (o = this.domain, c) { + if (t = arguments[1], !o) { + if (t instanceof Error) throw t; + var l = new Error('Uncaught, unspecified "error" event. (' + t + ")"); + throw l.context = t, l + } + return t || (t = new Error('Uncaught, unspecified "error" event')), t.domainEmitter = this, t.domain = o, t.domainThrown = !1, o.emit("error", t), !1 + } + if (!(n = a[e])) return !1; + var h = "function" == typeof n; + switch (r = arguments.length) { + case 1: + At(n, h, this); + break; + case 2: + gt(n, h, this, arguments[1]); + break; + case 3: + Nt(n, h, this, arguments[1], arguments[2]); + break; + case 4: + Ct(n, h, this, arguments[1], arguments[2], arguments[3]); + break; + default: + for (i = new Array(r - 1), s = 1; s < r; s++) i[s - 1] = arguments[s]; + It(n, h, this, i) + } + return !0 +}, Tt.prototype.addListener = function(e, t) { + return St(this, e, t, !1) +}, Tt.prototype.on = Tt.prototype.addListener, Tt.prototype.prependListener = function(e, t) { + return St(this, e, t, !0) +}, Tt.prototype.once = function(e, t) { + if ("function" != typeof t) throw new TypeError('"listener" argument must be a function'); + return this.on(e, bt(this, e, t)), this +}, Tt.prototype.prependOnceListener = function(e, t) { + if ("function" != typeof t) throw new TypeError('"listener" argument must be a function'); + return this.prependListener(e, bt(this, e, t)), this +}, Tt.prototype.removeListener = function(e, t) { + var n, r, i, s, a; + if ("function" != typeof t) throw new TypeError('"listener" argument must be a function'); + if (!(r = this._events)) return this; + if (!(n = r[e])) return this; + if (n === t || n.listener && n.listener === t) 0 == --this._eventsCount ? this._events = new mt : (delete r[e], r.removeListener && this.emit("removeListener", e, n.listener || t)); + else if ("function" != typeof n) { + for (i = -1, s = n.length; s-- > 0;) + if (n[s] === t || n[s].listener && n[s].listener === t) { + a = n[s].listener, i = s; + break + } if (i < 0) return this; + if (1 === n.length) { + if (n[0] = void 0, 0 == --this._eventsCount) return this._events = new mt, this; + delete r[e] + } else ! function(e, t) { + for (var n = t, r = n + 1, i = e.length; r < i; n += 1, r += 1) e[n] = e[r]; + e.pop() + }(n, i); + r.removeListener && this.emit("removeListener", e, a || t) + } + return this +}, Tt.prototype.removeAllListeners = function(e) { + var t, n; + if (!(n = this._events)) return this; + if (!n.removeListener) return 0 === arguments.length ? (this._events = new mt, this._eventsCount = 0) : n[e] && (0 == --this._eventsCount ? this._events = new mt : delete n[e]), this; + if (0 === arguments.length) { + for (var r, i = Object.keys(n), s = 0; s < i.length; ++s) "removeListener" !== (r = i[s]) && this.removeAllListeners(r); + return this.removeAllListeners("removeListener"), this._events = new mt, this._eventsCount = 0, this + } + if ("function" == typeof(t = n[e])) this.removeListener(e, t); + else if (t) + do { + this.removeListener(e, t[t.length - 1]) + } while (t[0]); + return this +}, Tt.prototype.listeners = function(e) { + var t, n = this._events; + return n && (t = n[e]) ? "function" == typeof t ? [t.listener || t] : function(e) { + for (var t = new Array(e.length), n = 0; n < t.length; ++n) t[n] = e[n].listener || e[n]; + return t + }(t) : [] +}, Tt.listenerCount = function(e, t) { + return "function" == typeof e.listenerCount ? e.listenerCount(t) : Ot.call(e, t) +}, Tt.prototype.listenerCount = Ot, Tt.prototype.eventNames = function() { + return this._eventsCount > 0 ? Reflect.ownKeys(this._events) : [] +}, ("function" == typeof Object.create ? function(e, t) { + e.super_ = t, e.prototype = Object.create(t.prototype, { + constructor: { + value: e, + enumerable: !1, + writable: !0, + configurable: !0 + } + }) +} : function(e, t) { + e.super_ = t; + var n = function() {}; + n.prototype = t.prototype, e.prototype = new n, e.prototype.constructor = e +})(Lt, Tt), Lt.prototype.add = function(e) { + e.on("error", this.__emitError) +}, Lt.prototype.remove = function(e) { + e.removeListener("error", this.__emitError) +}, Lt.prototype.bind = function(e) { + var t = this.__emitError; + return function() { + var n = Array.prototype.slice.call(arguments); + try { + e.apply(null, n) + } catch (e) { + t(e) + } + } +}, Lt.prototype.intercept = function(e) { + var t = this.__emitError; + return function(n) { + if (n) t(n); + else { + var r = Array.prototype.slice.call(arguments, 1); + try { + e.apply(null, r) + } catch (n) { + t(n) + } + } + } +}, Lt.prototype.run = function(e) { + var t = this.__emitError; + try { + e() + } catch (e) { + t(e) + } + return this +}, Lt.prototype.dispose = function() { + return this.removeAllListeners(), this +}, Lt.prototype.enter = Lt.prototype.exit = function() { + return this +}; +var vt, Dt = { + Domain: Lt, + createDomain: kt, + create: kt + }, + Rt = "function" == typeof setImmediate, + Mt = Pt; + +function Pt(e) { + xt.length || (Ut(), wt = !0), xt[xt.length] = e +} +var xt = [], + wt = !1, + Bt = 0; + +function Ft() { + for (; Bt < xt.length;) { + var e = Bt; + if (Bt += 1, xt[e].call(), Bt > 1024) { + for (var t = 0, n = xt.length - Bt; t < n; t++) xt[t] = xt[t + Bt]; + xt.length -= Bt, Bt = 0 + } + } + xt.length = 0, Bt = 0, wt = !1 +} + +function Ut() { + var e = Et.domain; + e && (vt || (vt = Dt), vt.active = Et.domain = null), wt && Rt ? setImmediate(Ft) : Et.nextTick(Ft), e && (vt.active = Et.domain = e) +} +Pt.requestFlush = Ut; +var Ht = [], + Gt = function(e) { + var t; + t = Ht.length ? Ht.pop() : new Yt; + t.task = e, t.domain = Et.domain, Mt(t) + }; + +function Yt() { + this.task = null, this.domain = null +} +Yt.prototype.call = function() { + this.domain && this.domain.enter(); + var e = !0; + try { + this.task.call(), e = !1, this.domain && this.domain.exit() + } finally { + e && Mt.requestFlush(), this.task = null, this.domain = null, Ht.push(this) + } +}; +var qt = Ke((function(e) { + ! function(t) { + var n = function() { + var e = Array.prototype.slice.call(arguments); + "function" == typeof e[0] && e[0].apply(null, e.splice(1)) + }, + r = function(e) { + "function" == typeof setImmediate ? setImmediate(e) : void 0 !== Et && Et.nextTick ? Et.nextTick(e) : setTimeout(e, 0) + }, + i = Array.isArray || function(e) { + return "[object Array]" === Object.prototype.toString.call(e) + }, + s = function(e, t, s) { + var a = s ? r : n; + if (t = t || function() {}, !i(e)) { + var o = new Error("First argument to waterfall must be an array of functions"); + return t(o) + } + if (!e.length) return t(); + var c = function(e) { + return function(n) { + if (n) t.apply(null, arguments), t = function() {}; + else { + var r = Array.prototype.slice.call(arguments, 1), + i = e.next(); + i ? r.push(c(i)) : r.push(t), a((function() { + e.apply(null, r) + })) + } + } + }; + c(function(e) { + var t = function(n) { + var r = function() { + return e.length && e[n].apply(null, arguments), r.next() + }; + return r.next = function() { + return n < e.length - 1 ? t(n + 1) : null + }, r + }; + return t(0) + }(e))() + }; + e.exports ? e.exports = s : t.waterfall = s + }(Ge) +})); + +function Kt(e, t, n, r) { + return { + type: e, + value: t, + lineno: n, + colno: r + } +} +var jt = function() { + function e(e, t) { + this.str = e, this.index = 0, this.len = e.length, this.lineno = 0, this.colno = 0, this.in_code = !1; + var n = (t = t || {}).tags || {}; + this.tags = { + BLOCK_START: n.blockStart || "{%", + BLOCK_END: n.blockEnd || "%}", + VARIABLE_START: n.variableStart || "{{", + VARIABLE_END: n.variableEnd || "}}", + COMMENT_START: n.commentStart || "{#", + COMMENT_END: n.commentEnd || "#}" + }, this.trimBlocks = !!t.trimBlocks, this.lstripBlocks = !!t.lstripBlocks + } + var t = e.prototype; + return t.nextToken = function() { + var e, t = this.lineno, + n = this.colno; + if (this.in_code) { + var r = this.current(); + if (this.isFinished()) return null; + if ('"' === r || "'" === r) return Kt("string", this._parseString(r), t, n); + if (e = this._extract(" \n\t\r ")) return Kt("whitespace", e, t, n); + if ((e = this._extractString(this.tags.BLOCK_END)) || (e = this._extractString("-" + this.tags.BLOCK_END))) return this.in_code = !1, this.trimBlocks && ("\n" === (r = this.current()) ? this.forward() : "\r" === r && (this.forward(), "\n" === (r = this.current()) ? this.forward() : this.back())), Kt("block-end", e, t, n); + if ((e = this._extractString(this.tags.VARIABLE_END)) || (e = this._extractString("-" + this.tags.VARIABLE_END))) return this.in_code = !1, Kt("variable-end", e, t, n); + if ("r" === r && "/" === this.str.charAt(this.index + 1)) { + this.forwardN(2); + for (var i = ""; !this.isFinished();) { + if ("/" === this.current() && "\\" !== this.previous()) { + this.forward(); + break + } + i += this.current(), this.forward() + } + for (var s = ["g", "i", "m", "y"], a = ""; !this.isFinished();) { + if (!(-1 !== s.indexOf(this.current()))) break; + a += this.current(), this.forward() + } + return Kt("regex", { + body: i, + flags: a + }, t, n) + } + if (-1 !== "()[]{}%*-+~/#,:|.<>=!".indexOf(r)) { + this.forward(); + var o, c = ["==", "===", "!=", "!==", "<=", ">=", "//", "**"], + l = r + this.current(); + switch (-1 !== je.indexOf(c, l) && (this.forward(), r = l, -1 !== je.indexOf(c, l + this.current()) && (r = l + this.current(), this.forward())), r) { + case "(": + o = "left-paren"; + break; + case ")": + o = "right-paren"; + break; + case "[": + o = "left-bracket"; + break; + case "]": + o = "right-bracket"; + break; + case "{": + o = "left-curly"; + break; + case "}": + o = "right-curly"; + break; + case ",": + o = "comma"; + break; + case ":": + o = "colon"; + break; + case "~": + o = "tilde"; + break; + case "|": + o = "pipe"; + break; + default: + o = "operator" + } + return Kt(o, r, t, n) + } + if ((e = this._extractUntil(" \n\t\r ()[]{}%*-+~/#,:|.<>=!")).match(/^[-+]?[0-9]+$/)) return "." === this.current() ? (this.forward(), Kt("float", e + "." + this._extract("0123456789"), t, n)) : Kt("int", e, t, n); + if (e.match(/^(true|false)$/)) return Kt("boolean", e, t, n); + if ("none" === e) return Kt("none", e, t, n); + if ("null" === e) return Kt("none", e, t, n); + if (e) return Kt("symbol", e, t, n); + throw new Error("Unexpected value while parsing: " + e) + } + var h, u = this.tags.BLOCK_START.charAt(0) + this.tags.VARIABLE_START.charAt(0) + this.tags.COMMENT_START.charAt(0) + this.tags.COMMENT_END.charAt(0); + if (this.isFinished()) return null; + if ((e = this._extractString(this.tags.BLOCK_START + "-")) || (e = this._extractString(this.tags.BLOCK_START))) return this.in_code = !0, Kt("block-start", e, t, n); + if ((e = this._extractString(this.tags.VARIABLE_START + "-")) || (e = this._extractString(this.tags.VARIABLE_START))) return this.in_code = !0, Kt("variable-start", e, t, n); + e = ""; + var p = !1; + for (this._matches(this.tags.COMMENT_START) && (p = !0, e = this._extractString(this.tags.COMMENT_START)); null !== (h = this._extractUntil(u));) { + if (e += h, (this._matches(this.tags.BLOCK_START) || this._matches(this.tags.VARIABLE_START) || this._matches(this.tags.COMMENT_START)) && !p) { + if (this.lstripBlocks && this._matches(this.tags.BLOCK_START) && this.colno > 0 && this.colno <= e.length) { + var f = e.slice(-this.colno); + if (/^\s+$/.test(f) && !(e = e.slice(0, -this.colno)).length) return this.nextToken() + } + break + } + if (this._matches(this.tags.COMMENT_END)) { + if (!p) throw new Error("unexpected end of comment"); + e += this._extractString(this.tags.COMMENT_END); + break + } + e += this.current(), this.forward() + } + if (null === h && p) throw new Error("expected end of comment, got end of file"); + return Kt(p ? "comment" : "data", e, t, n) + }, t._parseString = function(e) { + this.forward(); + for (var t = ""; !this.isFinished() && this.current() !== e;) { + var n = this.current(); + if ("\\" === n) { + switch (this.forward(), this.current()) { + case "n": + t += "\n"; + break; + case "t": + t += "\t"; + break; + case "r": + t += "\r"; + break; + default: + t += this.current() + } + this.forward() + } else t += n, this.forward() + } + return this.forward(), t + }, t._matches = function(e) { + return this.index + e.length > this.len ? null : this.str.slice(this.index, this.index + e.length) === e + }, t._extractString = function(e) { + return this._matches(e) ? (this.forwardN(e.length), e) : null + }, t._extractUntil = function(e) { + return this._extractMatching(!0, e || "") + }, t._extract = function(e) { + return this._extractMatching(!1, e) + }, t._extractMatching = function(e, t) { + if (this.isFinished()) return null; + var n = t.indexOf(this.current()); + if (e && -1 === n || !e && -1 !== n) { + var r = this.current(); + this.forward(); + for (var i = t.indexOf(this.current()); + (e && -1 === i || !e && -1 !== i) && !this.isFinished();) r += this.current(), this.forward(), i = t.indexOf(this.current()); + return r + } + return "" + }, t._extractRegex = function(e) { + var t = this.currentStr().match(e); + return t ? (this.forwardN(t[0].length), t) : null + }, t.isFinished = function() { + return this.index >= this.len + }, t.forwardN = function(e) { + for (var t = 0; t < e; t++) this.forward() + }, t.forward = function() { + this.index++, "\n" === this.previous() ? (this.lineno++, this.colno = 0) : this.colno++ + }, t.backN = function(e) { + for (var t = 0; t < e; t++) this.back() + }, t.back = function() { + if (this.index--, "\n" === this.current()) { + this.lineno--; + var e = this.src.lastIndexOf("\n", this.index - 1); + this.colno = -1 === e ? this.index : this.index - e + } else this.colno-- + }, t.current = function() { + return this.isFinished() ? "" : this.str.charAt(this.index) + }, t.currentStr = function() { + return this.isFinished() ? "" : this.str.substr(this.index) + }, t.previous = function() { + return this.str.charAt(this.index - 1) + }, e + }(), + Vt = { + lex: function(e, t) { + return new jt(e, t) + }, + TOKEN_STRING: "string", + TOKEN_WHITESPACE: "whitespace", + TOKEN_DATA: "data", + TOKEN_BLOCK_START: "block-start", + TOKEN_BLOCK_END: "block-end", + TOKEN_VARIABLE_START: "variable-start", + TOKEN_VARIABLE_END: "variable-end", + TOKEN_COMMENT: "comment", + TOKEN_LEFT_PAREN: "left-paren", + TOKEN_RIGHT_PAREN: "right-paren", + TOKEN_LEFT_BRACKET: "left-bracket", + TOKEN_RIGHT_BRACKET: "right-bracket", + TOKEN_LEFT_CURLY: "left-curly", + TOKEN_RIGHT_CURLY: "right-curly", + TOKEN_OPERATOR: "operator", + TOKEN_COMMA: "comma", + TOKEN_COLON: "colon", + TOKEN_TILDE: "tilde", + TOKEN_PIPE: "pipe", + TOKEN_INT: "int", + TOKEN_FLOAT: "float", + TOKEN_BOOLEAN: "boolean", + TOKEN_NONE: "none", + TOKEN_SYMBOL: "symbol", + TOKEN_SPECIAL: "special", + TOKEN_REGEX: "regex" + }; + +function Wt(e, t) { + for (var n = 0; n < t.length; n++) { + var r = t[n]; + r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, r.key, r) + } +} + +function Qt(e, t, n) { + return t && Wt(e.prototype, t), n && Wt(e, n), e +} + +function Xt(e, t) { + e.prototype = Object.create(t.prototype), e.prototype.constructor = e, $t(e, t) +} + +function $t(e, t) { + return $t = Object.setPrototypeOf || function(e, t) { + return e.__proto__ = t, e + }, $t(e, t) +} + +function zt(e, t, n) { + n = n || {}, je.keys(n).forEach((function(t) { + n[t] = function(e, t) { + return "function" != typeof e || "function" != typeof t ? t : function() { + var n = this.parent; + this.parent = e; + var r = t.apply(this, arguments); + return this.parent = n, r + } + }(e.prototype[t], n[t]) + })); + var r = function(e) { + function n() { + return e.apply(this, arguments) || this + } + return Xt(n, e), Qt(n, [{ + key: "typename", + get: function() { + return t + } + }]), n + }(e); + return je._assign(r.prototype, n), r +} +var Jt = function() { + function e() { + this.init.apply(this, arguments) + } + return e.prototype.init = function() {}, e.extend = function(e, t) { + return "object" == typeof e && (t = e, e = "anonymous"), zt(this, e, t) + }, Qt(e, [{ + key: "typename", + get: function() { + return this.constructor.name + } + }]), e + }(), + Zt = function(e) { + function t() { + var t, n; + return (t = n = e.call(this) || this).init.apply(t, arguments), n + } + return Xt(t, e), t.prototype.init = function() {}, t.extend = function(e, t) { + return "object" == typeof e && (t = e, e = "anonymous"), zt(this, e, t) + }, Qt(t, [{ + key: "typename", + get: function() { + return this.constructor.name + } + }]), t + }(Tt), + en = { + Obj: Jt, + EmitterObj: Zt + }; + +function tn(e, t) { + for (var n = 0; n < t.length; n++) { + var r = t[n]; + r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, r.key, r) + } +} + +function nn(e, t, n) { + return t && tn(e.prototype, t), n && tn(e, n), e +} + +function rn(e, t) { + e.prototype = Object.create(t.prototype), e.prototype.constructor = e, sn(e, t) +} + +function sn(e, t) { + return sn = Object.setPrototypeOf || function(e, t) { + return e.__proto__ = t, e + }, sn(e, t) +} + +function an(e, t, n) { + e instanceof t && n.push(e), e instanceof on && e.findAll(t, n) +} +var on = function(e) { + function t() { + return e.apply(this, arguments) || this + } + rn(t, e); + var n = t.prototype; + return n.init = function(e, t) { + for (var n = arguments, r = this, i = arguments.length, s = new Array(i > 2 ? i - 2 : 0), a = 2; a < i; a++) s[a - 2] = arguments[a]; + this.lineno = e, this.colno = t, this.fields.forEach((function(e, t) { + var i = n[t + 2]; + void 0 === i && (i = null), r[e] = i + })) + }, n.findAll = function(e, t) { + var n = this; + return t = t || [], this instanceof ln ? this.children.forEach((function(n) { + return an(n, e, t) + })) : this.fields.forEach((function(r) { + return an(n[r], e, t) + })), t + }, n.iterFields = function(e) { + var t = this; + this.fields.forEach((function(n) { + e(t[n], n) + })) + }, t + }(en.Obj), + cn = function(e) { + function t() { + return e.apply(this, arguments) || this + } + return rn(t, e), nn(t, [{ + key: "typename", + get: function() { + return "Value" + } + }, { + key: "fields", + get: function() { + return ["value"] + } + }]), t + }(on), + ln = function(e) { + function t() { + return e.apply(this, arguments) || this + } + rn(t, e); + var n = t.prototype; + return n.init = function(t, n, r) { + e.prototype.init.call(this, t, n, r || []) + }, n.addChild = function(e) { + this.children.push(e) + }, nn(t, [{ + key: "typename", + get: function() { + return "NodeList" + } + }, { + key: "fields", + get: function() { + return ["children"] + } + }]), t + }(on), + hn = ln.extend("Root"), + un = cn.extend("Literal"), + pn = cn.extend("Symbol"), + fn = ln.extend("Group"), + dn = ln.extend("Array"), + En = on.extend("Pair", { + fields: ["key", "value"] + }), + mn = ln.extend("Dict"), + Tn = on.extend("LookupVal", { + fields: ["target", "val"] + }), + _n = on.extend("If", { + fields: ["cond", "body", "else_"] + }), + An = _n.extend("IfAsync"), + gn = on.extend("InlineIf", { + fields: ["cond", "body", "else_"] + }), + Nn = on.extend("For", { + fields: ["arr", "name", "body", "else_"] + }), + Cn = Nn.extend("AsyncEach"), + In = Nn.extend("AsyncAll"), + Sn = on.extend("Macro", { + fields: ["name", "args", "body"] + }), + bn = Sn.extend("Caller"), + On = on.extend("Import", { + fields: ["template", "target", "withContext"] + }), + yn = function(e) { + function t() { + return e.apply(this, arguments) || this + } + return rn(t, e), t.prototype.init = function(t, n, r, i, s) { + e.prototype.init.call(this, t, n, r, i || new ln, s) + }, nn(t, [{ + key: "typename", + get: function() { + return "FromImport" + } + }, { + key: "fields", + get: function() { + return ["template", "names", "withContext"] + } + }]), t + }(on), + Ln = on.extend("FunCall", { + fields: ["name", "args"] + }), + kn = Ln.extend("Filter"), + vn = kn.extend("FilterAsync", { + fields: ["name", "args", "symbol"] + }), + Dn = mn.extend("KeywordArgs"), + Rn = on.extend("Block", { + fields: ["name", "body"] + }), + Mn = on.extend("Super", { + fields: ["blockName", "symbol"] + }), + Pn = on.extend("TemplateRef", { + fields: ["template"] + }).extend("Extends"), + xn = on.extend("Include", { + fields: ["template", "ignoreMissing"] + }), + wn = on.extend("Set", { + fields: ["targets", "value"] + }), + Bn = on.extend("Switch", { + fields: ["expr", "cases", "default"] + }), + Fn = on.extend("Case", { + fields: ["cond", "body"] + }), + Un = ln.extend("Output"), + Hn = on.extend("Capture", { + fields: ["body"] + }), + Gn = un.extend("TemplateData"), + Yn = on.extend("UnaryOp", { + fields: ["target"] + }), + qn = on.extend("BinOp", { + fields: ["left", "right"] + }), + Kn = qn.extend("In"), + jn = qn.extend("Is"), + Vn = qn.extend("Or"), + Wn = qn.extend("And"), + Qn = Yn.extend("Not"), + Xn = qn.extend("Add"), + $n = qn.extend("Concat"), + zn = qn.extend("Sub"), + Jn = qn.extend("Mul"), + Zn = qn.extend("Div"), + er = qn.extend("FloorDiv"), + tr = qn.extend("Mod"), + nr = qn.extend("Pow"), + rr = Yn.extend("Neg"), + ir = Yn.extend("Pos"), + sr = on.extend("Compare", { + fields: ["expr", "ops"] + }), + ar = on.extend("CompareOperand", { + fields: ["expr", "type"] + }), + or = on.extend("CallExtension", { + init: function(e, t, n, r) { + this.parent(), this.extName = e.__name || e, this.prop = t, this.args = n || new ln, this.contentArgs = r || [], this.autoescape = e.autoescape + }, + fields: ["extName", "prop", "args", "contentArgs"] + }), + cr = or.extend("CallExtensionAsync"); + +function lr(e, t, n) { + var r = e.split("\n"); + r.forEach((function(e, i) { + e && (n && i > 0 || !n) && Et.stdout.write(" ".repeat(t)); + var s = i === r.length - 1 ? "" : "\n"; + Et.stdout.write("" + e + s) + })) +} +var hr = { + Node: on, + Root: hn, + NodeList: ln, + Value: cn, + Literal: un, + Symbol: pn, + Group: fn, + Array: dn, + Pair: En, + Dict: mn, + Output: Un, + Capture: Hn, + TemplateData: Gn, + If: _n, + IfAsync: An, + InlineIf: gn, + For: Nn, + AsyncEach: Cn, + AsyncAll: In, + Macro: Sn, + Caller: bn, + Import: On, + FromImport: yn, + FunCall: Ln, + Filter: kn, + FilterAsync: vn, + KeywordArgs: Dn, + Block: Rn, + Super: Mn, + Extends: Pn, + Include: xn, + Set: wn, + Switch: Bn, + Case: Fn, + LookupVal: Tn, + BinOp: qn, + In: Kn, + Is: jn, + Or: Vn, + And: Wn, + Not: Qn, + Add: Xn, + Concat: $n, + Sub: zn, + Mul: Jn, + Div: Zn, + FloorDiv: er, + Mod: tr, + Pow: nr, + Neg: rr, + Pos: ir, + Compare: sr, + CompareOperand: ar, + CallExtension: or, + CallExtensionAsync: cr, + printNodes: function e(t, n) { + if (n = n || 0, lr(t.typename + ": ", n), t instanceof ln) lr("\n"), t.children.forEach((function(t) { + e(t, n + 2) + })); + else if (t instanceof or) lr(t.extName + "." + t.prop + "\n"), t.args && e(t.args, n + 2), t.contentArgs && t.contentArgs.forEach((function(t) { + e(t, n + 2) + })); + else { + var r = [], + i = null; + t.iterFields((function(e, t) { + e instanceof on ? r.push([t, e]) : (i = i || {})[t] = e + })), i ? lr(JSON.stringify(i, null, 2) + "\n", null, !0) : lr("\n"), r.forEach((function(t) { + var r = t[0], + i = t[1]; + lr("[" + r + "] =>", n + 2), e(i, n + 4) + })) + } + } +}; + +function ur(e, t) { + return ur = Object.setPrototypeOf || function(e, t) { + return e.__proto__ = t, e + }, ur(e, t) +} +hr.Node, hr.Root, hr.NodeList, hr.Value, hr.Literal, hr.Group, hr.Pair, hr.Dict, hr.Output, hr.Capture, hr.TemplateData, hr.If, hr.IfAsync, hr.InlineIf, hr.For, hr.AsyncEach, hr.AsyncAll, hr.Macro, hr.Caller, hr.Import, hr.FromImport, hr.FunCall, hr.Filter, hr.FilterAsync, hr.KeywordArgs, hr.Block, hr.Super, hr.Extends, hr.Include, hr.Switch, hr.Case, hr.LookupVal, hr.BinOp, hr.In, hr.Is, hr.Or, hr.And, hr.Not, hr.Add, hr.Concat, hr.Sub, hr.Mul, hr.Div, hr.FloorDiv, hr.Mod, hr.Pow, hr.Neg, hr.Pos, hr.Compare, hr.CompareOperand, hr.CallExtension, hr.CallExtensionAsync, hr.printNodes; +var pr = function(e) { + var t, n; + + function r() { + return e.apply(this, arguments) || this + } + n = e, (t = r).prototype = Object.create(n.prototype), t.prototype.constructor = t, ur(t, n); + var i = r.prototype; + return i.init = function(e) { + this.tokens = e, this.peeked = null, this.breakOnBlocks = null, this.dropLeadingWhitespace = !1, this.extensions = [] + }, i.nextToken = function(e) { + var t; + if (this.peeked) { + if (e || this.peeked.type !== Vt.TOKEN_WHITESPACE) return t = this.peeked, this.peeked = null, t; + this.peeked = null + } + if (t = this.tokens.nextToken(), !e) + for (; t && t.type === Vt.TOKEN_WHITESPACE;) t = this.tokens.nextToken(); + return t + }, i.peekToken = function() { + return this.peeked = this.peeked || this.nextToken(), this.peeked + }, i.pushToken = function(e) { + if (this.peeked) throw new Error("pushToken: can only push one token on between reads"); + this.peeked = e + }, i.error = function(e, t, n) { + if (void 0 === t || void 0 === n) { + var r = this.peekToken() || {}; + t = r.lineno, n = r.colno + } + return void 0 !== t && (t += 1), void 0 !== n && (n += 1), new je.TemplateError(e, t, n) + }, i.fail = function(e, t, n) { + throw this.error(e, t, n) + }, i.skip = function(e) { + var t = this.nextToken(); + return !(!t || t.type !== e) || (this.pushToken(t), !1) + }, i.expect = function(e) { + var t = this.nextToken(); + return t.type !== e && this.fail("expected " + e + ", got " + t.type, t.lineno, t.colno), t + }, i.skipValue = function(e, t) { + var n = this.nextToken(); + return !(!n || n.type !== e || n.value !== t) || (this.pushToken(n), !1) + }, i.skipSymbol = function(e) { + return this.skipValue(Vt.TOKEN_SYMBOL, e) + }, i.advanceAfterBlockEnd = function(e) { + var t; + return e || ((t = this.peekToken()) || this.fail("unexpected end of file"), t.type !== Vt.TOKEN_SYMBOL && this.fail("advanceAfterBlockEnd: expected symbol token or explicit name to be passed"), e = this.nextToken().value), (t = this.nextToken()) && t.type === Vt.TOKEN_BLOCK_END ? "-" === t.value.charAt(0) && (this.dropLeadingWhitespace = !0) : this.fail("expected block end in " + e + " statement"), t + }, i.advanceAfterVariableEnd = function() { + var e = this.nextToken(); + e && e.type === Vt.TOKEN_VARIABLE_END ? this.dropLeadingWhitespace = "-" === e.value.charAt(e.value.length - this.tokens.tags.VARIABLE_END.length - 1) : (this.pushToken(e), this.fail("expected variable end")) + }, i.parseFor = function() { + var e, t, n = this.peekToken(); + if (this.skipSymbol("for") ? (e = new hr.For(n.lineno, n.colno), t = "endfor") : this.skipSymbol("asyncEach") ? (e = new hr.AsyncEach(n.lineno, n.colno), t = "endeach") : this.skipSymbol("asyncAll") ? (e = new hr.AsyncAll(n.lineno, n.colno), t = "endall") : this.fail("parseFor: expected for{Async}", n.lineno, n.colno), e.name = this.parsePrimary(), e.name instanceof hr.Symbol || this.fail("parseFor: variable name expected for loop"), this.peekToken().type === Vt.TOKEN_COMMA) { + var r = e.name; + for (e.name = new hr.Array(r.lineno, r.colno), e.name.addChild(r); this.skip(Vt.TOKEN_COMMA);) { + var i = this.parsePrimary(); + e.name.addChild(i) + } + } + return this.skipSymbol("in") || this.fail('parseFor: expected "in" keyword for loop', n.lineno, n.colno), e.arr = this.parseExpression(), this.advanceAfterBlockEnd(n.value), e.body = this.parseUntilBlocks(t, "else"), this.skipSymbol("else") && (this.advanceAfterBlockEnd("else"), e.else_ = this.parseUntilBlocks(t)), this.advanceAfterBlockEnd(), e + }, i.parseMacro = function() { + var e = this.peekToken(); + this.skipSymbol("macro") || this.fail("expected macro"); + var t = this.parsePrimary(!0), + n = this.parseSignature(), + r = new hr.Macro(e.lineno, e.colno, t, n); + return this.advanceAfterBlockEnd(e.value), r.body = this.parseUntilBlocks("endmacro"), this.advanceAfterBlockEnd(), r + }, i.parseCall = function() { + var e = this.peekToken(); + this.skipSymbol("call") || this.fail("expected call"); + var t = this.parseSignature(!0) || new hr.NodeList, + n = this.parsePrimary(); + this.advanceAfterBlockEnd(e.value); + var r = this.parseUntilBlocks("endcall"); + this.advanceAfterBlockEnd(); + var i = new hr.Symbol(e.lineno, e.colno, "caller"), + s = new hr.Caller(e.lineno, e.colno, i, t, r), + a = n.args.children; + return a[a.length - 1] instanceof hr.KeywordArgs || a.push(new hr.KeywordArgs), a[a.length - 1].addChild(new hr.Pair(e.lineno, e.colno, i, s)), new hr.Output(e.lineno, e.colno, [n]) + }, i.parseWithContext = function() { + var e = this.peekToken(), + t = null; + return this.skipSymbol("with") ? t = !0 : this.skipSymbol("without") && (t = !1), null !== t && (this.skipSymbol("context") || this.fail("parseFrom: expected context after with/without", e.lineno, e.colno)), t + }, i.parseImport = function() { + var e = this.peekToken(); + this.skipSymbol("import") || this.fail("parseImport: expected import", e.lineno, e.colno); + var t = this.parseExpression(); + this.skipSymbol("as") || this.fail('parseImport: expected "as" keyword', e.lineno, e.colno); + var n = this.parseExpression(), + r = this.parseWithContext(), + i = new hr.Import(e.lineno, e.colno, t, n, r); + return this.advanceAfterBlockEnd(e.value), i + }, i.parseFrom = function() { + var e = this.peekToken(); + this.skipSymbol("from") || this.fail("parseFrom: expected from"); + var t = this.parseExpression(); + this.skipSymbol("import") || this.fail("parseFrom: expected import", e.lineno, e.colno); + for (var n, r = new hr.NodeList;;) { + var i = this.peekToken(); + if (i.type === Vt.TOKEN_BLOCK_END) { + r.children.length || this.fail("parseFrom: Expected at least one import name", e.lineno, e.colno), "-" === i.value.charAt(0) && (this.dropLeadingWhitespace = !0), this.nextToken(); + break + } + r.children.length > 0 && !this.skip(Vt.TOKEN_COMMA) && this.fail("parseFrom: expected comma", e.lineno, e.colno); + var s = this.parsePrimary(); + if ("_" === s.value.charAt(0) && this.fail("parseFrom: names starting with an underscore cannot be imported", s.lineno, s.colno), this.skipSymbol("as")) { + var a = this.parsePrimary(); + r.addChild(new hr.Pair(s.lineno, s.colno, s, a)) + } else r.addChild(s); + n = this.parseWithContext() + } + return new hr.FromImport(e.lineno, e.colno, t, r, n) + }, i.parseBlock = function() { + var e = this.peekToken(); + this.skipSymbol("block") || this.fail("parseBlock: expected block", e.lineno, e.colno); + var t = new hr.Block(e.lineno, e.colno); + t.name = this.parsePrimary(), t.name instanceof hr.Symbol || this.fail("parseBlock: variable name expected", e.lineno, e.colno), this.advanceAfterBlockEnd(e.value), t.body = this.parseUntilBlocks("endblock"), this.skipSymbol("endblock"), this.skipSymbol(t.name.value); + var n = this.peekToken(); + return n || this.fail("parseBlock: expected endblock, got end of file"), this.advanceAfterBlockEnd(n.value), t + }, i.parseExtends = function() { + var e = "extends", + t = this.peekToken(); + this.skipSymbol(e) || this.fail("parseTemplateRef: expected extends"); + var n = new hr.Extends(t.lineno, t.colno); + return n.template = this.parseExpression(), this.advanceAfterBlockEnd(t.value), n + }, i.parseInclude = function() { + var e = "include", + t = this.peekToken(); + this.skipSymbol(e) || this.fail("parseInclude: expected include"); + var n = new hr.Include(t.lineno, t.colno); + return n.template = this.parseExpression(), this.skipSymbol("ignore") && this.skipSymbol("missing") && (n.ignoreMissing = !0), this.advanceAfterBlockEnd(t.value), n + }, i.parseIf = function() { + var e, t = this.peekToken(); + this.skipSymbol("if") || this.skipSymbol("elif") || this.skipSymbol("elseif") ? e = new hr.If(t.lineno, t.colno) : this.skipSymbol("ifAsync") ? e = new hr.IfAsync(t.lineno, t.colno) : this.fail("parseIf: expected if, elif, or elseif", t.lineno, t.colno), e.cond = this.parseExpression(), this.advanceAfterBlockEnd(t.value), e.body = this.parseUntilBlocks("elif", "elseif", "else", "endif"); + var n = this.peekToken(); + switch (n && n.value) { + case "elseif": + case "elif": + e.else_ = this.parseIf(); + break; + case "else": + this.advanceAfterBlockEnd(), e.else_ = this.parseUntilBlocks("endif"), this.advanceAfterBlockEnd(); + break; + case "endif": + e.else_ = null, this.advanceAfterBlockEnd(); + break; + default: + this.fail("parseIf: expected elif, else, or endif, got end of file") + } + return e + }, i.parseSet = function() { + var e = this.peekToken(); + this.skipSymbol("set") || this.fail("parseSet: expected set", e.lineno, e.colno); + for (var t, n = new hr.Set(e.lineno, e.colno, []); + (t = this.parsePrimary()) && (n.targets.push(t), this.skip(Vt.TOKEN_COMMA));); + return this.skipValue(Vt.TOKEN_OPERATOR, "=") ? (n.value = this.parseExpression(), this.advanceAfterBlockEnd(e.value)) : this.skip(Vt.TOKEN_BLOCK_END) ? (n.body = new hr.Capture(e.lineno, e.colno, this.parseUntilBlocks("endset")), n.value = null, this.advanceAfterBlockEnd()) : this.fail("parseSet: expected = or block end in set tag", e.lineno, e.colno), n + }, i.parseSwitch = function() { + var e = "switch", + t = "endswitch", + n = "case", + r = "default", + i = this.peekToken(); + this.skipSymbol(e) || this.skipSymbol(n) || this.skipSymbol(r) || this.fail('parseSwitch: expected "switch," "case" or "default"', i.lineno, i.colno); + var s = this.parseExpression(); + this.advanceAfterBlockEnd(e), this.parseUntilBlocks(n, r, t); + var a, o = this.peekToken(), + c = []; + do { + this.skipSymbol(n); + var l = this.parseExpression(); + this.advanceAfterBlockEnd(e); + var h = this.parseUntilBlocks(n, r, t); + c.push(new hr.Case(o.line, o.col, l, h)), o = this.peekToken() + } while (o && o.value === n); + switch (o.value) { + case r: + this.advanceAfterBlockEnd(), a = this.parseUntilBlocks(t), this.advanceAfterBlockEnd(); + break; + case t: + this.advanceAfterBlockEnd(); + break; + default: + this.fail('parseSwitch: expected "case," "default" or "endswitch," got EOF.') + } + return new hr.Switch(i.lineno, i.colno, s, c, a) + }, i.parseStatement = function() { + var e = this.peekToken(); + if (e.type !== Vt.TOKEN_SYMBOL && this.fail("tag name expected", e.lineno, e.colno), this.breakOnBlocks && -1 !== je.indexOf(this.breakOnBlocks, e.value)) return null; + switch (e.value) { + case "raw": + return this.parseRaw(); + case "verbatim": + return this.parseRaw("verbatim"); + case "if": + case "ifAsync": + return this.parseIf(); + case "for": + case "asyncEach": + case "asyncAll": + return this.parseFor(); + case "block": + return this.parseBlock(); + case "extends": + return this.parseExtends(); + case "include": + return this.parseInclude(); + case "set": + return this.parseSet(); + case "macro": + return this.parseMacro(); + case "call": + return this.parseCall(); + case "import": + return this.parseImport(); + case "from": + return this.parseFrom(); + case "filter": + return this.parseFilterStatement(); + case "switch": + return this.parseSwitch(); + default: + if (this.extensions.length) + for (var t = 0; t < this.extensions.length; t++) { + var n = this.extensions[t]; + if (-1 !== je.indexOf(n.tags || [], e.value)) return n.parse(this, hr, Vt) + } + this.fail("unknown block tag: " + e.value, e.lineno, e.colno) + } + }, i.parseRaw = function(e) { + for (var t = "end" + (e = e || "raw"), n = new RegExp("([\\s\\S]*?){%\\s*(" + e + "|" + t + ")\\s*(?=%})%}"), r = 1, i = "", s = null, a = this.advanceAfterBlockEnd(); + (s = this.tokens._extractRegex(n)) && r > 0;) { + var o = s[0], + c = s[1], + l = s[2]; + l === e ? r += 1 : l === t && (r -= 1), 0 === r ? (i += c, this.tokens.backN(o.length - c.length)) : i += o + } + return new hr.Output(a.lineno, a.colno, [new hr.TemplateData(a.lineno, a.colno, i)]) + }, i.parsePostfix = function(e) { + for (var t, n = this.peekToken(); n;) { + if (n.type === Vt.TOKEN_LEFT_PAREN) e = new hr.FunCall(n.lineno, n.colno, e, this.parseSignature()); + else if (n.type === Vt.TOKEN_LEFT_BRACKET)(t = this.parseAggregate()).children.length > 1 && this.fail("invalid index"), e = new hr.LookupVal(n.lineno, n.colno, e, t.children[0]); + else { + if (n.type !== Vt.TOKEN_OPERATOR || "." !== n.value) break; + this.nextToken(); + var r = this.nextToken(); + r.type !== Vt.TOKEN_SYMBOL && this.fail("expected name as lookup value, got " + r.value, r.lineno, r.colno), t = new hr.Literal(r.lineno, r.colno, r.value), e = new hr.LookupVal(n.lineno, n.colno, e, t) + } + n = this.peekToken() + } + return e + }, i.parseExpression = function() { + return this.parseInlineIf() + }, i.parseInlineIf = function() { + var e = this.parseOr(); + if (this.skipSymbol("if")) { + var t = this.parseOr(), + n = e; + (e = new hr.InlineIf(e.lineno, e.colno)).body = n, e.cond = t, this.skipSymbol("else") ? e.else_ = this.parseOr() : e.else_ = null + } + return e + }, i.parseOr = function() { + for (var e = this.parseAnd(); this.skipSymbol("or");) { + var t = this.parseAnd(); + e = new hr.Or(e.lineno, e.colno, e, t) + } + return e + }, i.parseAnd = function() { + for (var e = this.parseNot(); this.skipSymbol("and");) { + var t = this.parseNot(); + e = new hr.And(e.lineno, e.colno, e, t) + } + return e + }, i.parseNot = function() { + var e = this.peekToken(); + return this.skipSymbol("not") ? new hr.Not(e.lineno, e.colno, this.parseNot()) : this.parseIn() + }, i.parseIn = function() { + for (var e = this.parseIs();;) { + var t = this.nextToken(); + if (!t) break; + var n = t.type === Vt.TOKEN_SYMBOL && "not" === t.value; + if (n || this.pushToken(t), !this.skipSymbol("in")) { + n && this.pushToken(t); + break + } + var r = this.parseIs(); + e = new hr.In(e.lineno, e.colno, e, r), n && (e = new hr.Not(e.lineno, e.colno, e)) + } + return e + }, i.parseIs = function() { + var e = this.parseCompare(); + if (this.skipSymbol("is")) { + var t = this.skipSymbol("not"), + n = this.parseCompare(); + e = new hr.Is(e.lineno, e.colno, e, n), t && (e = new hr.Not(e.lineno, e.colno, e)) + } + return e + }, i.parseCompare = function() { + for (var e = ["==", "===", "!=", "!==", "<", ">", "<=", ">="], t = this.parseConcat(), n = [];;) { + var r = this.nextToken(); + if (!r) break; + if (-1 === e.indexOf(r.value)) { + this.pushToken(r); + break + } + n.push(new hr.CompareOperand(r.lineno, r.colno, this.parseConcat(), r.value)) + } + return n.length ? new hr.Compare(n[0].lineno, n[0].colno, t, n) : t + }, i.parseConcat = function() { + for (var e = this.parseAdd(); this.skipValue(Vt.TOKEN_TILDE, "~");) { + var t = this.parseAdd(); + e = new hr.Concat(e.lineno, e.colno, e, t) + } + return e + }, i.parseAdd = function() { + for (var e = this.parseSub(); this.skipValue(Vt.TOKEN_OPERATOR, "+");) { + var t = this.parseSub(); + e = new hr.Add(e.lineno, e.colno, e, t) + } + return e + }, i.parseSub = function() { + for (var e = this.parseMul(); this.skipValue(Vt.TOKEN_OPERATOR, "-");) { + var t = this.parseMul(); + e = new hr.Sub(e.lineno, e.colno, e, t) + } + return e + }, i.parseMul = function() { + for (var e = this.parseDiv(); this.skipValue(Vt.TOKEN_OPERATOR, "*");) { + var t = this.parseDiv(); + e = new hr.Mul(e.lineno, e.colno, e, t) + } + return e + }, i.parseDiv = function() { + for (var e = this.parseFloorDiv(); this.skipValue(Vt.TOKEN_OPERATOR, "/");) { + var t = this.parseFloorDiv(); + e = new hr.Div(e.lineno, e.colno, e, t) + } + return e + }, i.parseFloorDiv = function() { + for (var e = this.parseMod(); this.skipValue(Vt.TOKEN_OPERATOR, "//");) { + var t = this.parseMod(); + e = new hr.FloorDiv(e.lineno, e.colno, e, t) + } + return e + }, i.parseMod = function() { + for (var e = this.parsePow(); this.skipValue(Vt.TOKEN_OPERATOR, "%");) { + var t = this.parsePow(); + e = new hr.Mod(e.lineno, e.colno, e, t) + } + return e + }, i.parsePow = function() { + for (var e = this.parseUnary(); this.skipValue(Vt.TOKEN_OPERATOR, "**");) { + var t = this.parseUnary(); + e = new hr.Pow(e.lineno, e.colno, e, t) + } + return e + }, i.parseUnary = function(e) { + var t, n = this.peekToken(); + return t = this.skipValue(Vt.TOKEN_OPERATOR, "-") ? new hr.Neg(n.lineno, n.colno, this.parseUnary(!0)) : this.skipValue(Vt.TOKEN_OPERATOR, "+") ? new hr.Pos(n.lineno, n.colno, this.parseUnary(!0)) : this.parsePrimary(), e || (t = this.parseFilter(t)), t + }, i.parsePrimary = function(e) { + var t, n = this.nextToken(), + r = null; + if (n ? n.type === Vt.TOKEN_STRING ? t = n.value : n.type === Vt.TOKEN_INT ? t = parseInt(n.value, 10) : n.type === Vt.TOKEN_FLOAT ? t = parseFloat(n.value) : n.type === Vt.TOKEN_BOOLEAN ? "true" === n.value ? t = !0 : "false" === n.value ? t = !1 : this.fail("invalid boolean: " + n.value, n.lineno, n.colno) : n.type === Vt.TOKEN_NONE ? t = null : n.type === Vt.TOKEN_REGEX && (t = new RegExp(n.value.body, n.value.flags)) : this.fail("expected expression, got end of file"), void 0 !== t ? r = new hr.Literal(n.lineno, n.colno, t) : n.type === Vt.TOKEN_SYMBOL ? r = new hr.Symbol(n.lineno, n.colno, n.value) : (this.pushToken(n), r = this.parseAggregate()), e || (r = this.parsePostfix(r)), r) return r; + throw this.error("unexpected token: " + n.value, n.lineno, n.colno) + }, i.parseFilterName = function() { + for (var e = this.expect(Vt.TOKEN_SYMBOL), t = e.value; this.skipValue(Vt.TOKEN_OPERATOR, ".");) t += "." + this.expect(Vt.TOKEN_SYMBOL).value; + return new hr.Symbol(e.lineno, e.colno, t) + }, i.parseFilterArgs = function(e) { + return this.peekToken().type === Vt.TOKEN_LEFT_PAREN ? this.parsePostfix(e).args.children : [] + }, i.parseFilter = function(e) { + for (; this.skip(Vt.TOKEN_PIPE);) { + var t = this.parseFilterName(); + e = new hr.Filter(t.lineno, t.colno, t, new hr.NodeList(t.lineno, t.colno, [e].concat(this.parseFilterArgs(e)))) + } + return e + }, i.parseFilterStatement = function() { + var e = this.peekToken(); + this.skipSymbol("filter") || this.fail("parseFilterStatement: expected filter"); + var t = this.parseFilterName(), + n = this.parseFilterArgs(t); + this.advanceAfterBlockEnd(e.value); + var r = new hr.Capture(t.lineno, t.colno, this.parseUntilBlocks("endfilter")); + this.advanceAfterBlockEnd(); + var i = new hr.Filter(t.lineno, t.colno, t, new hr.NodeList(t.lineno, t.colno, [r].concat(n))); + return new hr.Output(t.lineno, t.colno, [i]) + }, i.parseAggregate = function() { + var e, t = this.nextToken(); + switch (t.type) { + case Vt.TOKEN_LEFT_PAREN: + e = new hr.Group(t.lineno, t.colno); + break; + case Vt.TOKEN_LEFT_BRACKET: + e = new hr.Array(t.lineno, t.colno); + break; + case Vt.TOKEN_LEFT_CURLY: + e = new hr.Dict(t.lineno, t.colno); + break; + default: + return null + } + for (;;) { + var n = this.peekToken().type; + if (n === Vt.TOKEN_RIGHT_PAREN || n === Vt.TOKEN_RIGHT_BRACKET || n === Vt.TOKEN_RIGHT_CURLY) { + this.nextToken(); + break + } + if (e.children.length > 0 && (this.skip(Vt.TOKEN_COMMA) || this.fail("parseAggregate: expected comma after expression", t.lineno, t.colno)), e instanceof hr.Dict) { + var r = this.parsePrimary(); + this.skip(Vt.TOKEN_COLON) || this.fail("parseAggregate: expected colon after dict key", t.lineno, t.colno); + var i = this.parseExpression(); + e.addChild(new hr.Pair(r.lineno, r.colno, r, i)) + } else { + var s = this.parseExpression(); + e.addChild(s) + } + } + return e + }, i.parseSignature = function(e, t) { + var n = this.peekToken(); + if (!t && n.type !== Vt.TOKEN_LEFT_PAREN) { + if (e) return null; + this.fail("expected arguments", n.lineno, n.colno) + } + n.type === Vt.TOKEN_LEFT_PAREN && (n = this.nextToken()); + for (var r = new hr.NodeList(n.lineno, n.colno), i = new hr.KeywordArgs(n.lineno, n.colno), s = !1;;) { + if (n = this.peekToken(), !t && n.type === Vt.TOKEN_RIGHT_PAREN) { + this.nextToken(); + break + } + if (t && n.type === Vt.TOKEN_BLOCK_END) break; + if (s && !this.skip(Vt.TOKEN_COMMA)) this.fail("parseSignature: expected comma after expression", n.lineno, n.colno); + else { + var a = this.parseExpression(); + this.skipValue(Vt.TOKEN_OPERATOR, "=") ? i.addChild(new hr.Pair(a.lineno, a.colno, a, this.parseExpression())) : r.addChild(a) + } + s = !0 + } + return i.children.length && r.addChild(i), r + }, i.parseUntilBlocks = function() { + for (var e = this.breakOnBlocks, t = arguments.length, n = new Array(t), r = 0; r < t; r++) n[r] = arguments[r]; + this.breakOnBlocks = n; + var i = this.parse(); + return this.breakOnBlocks = e, i + }, i.parseNodes = function() { + for (var e, t = []; e = this.nextToken();) + if (e.type === Vt.TOKEN_DATA) { + var n = e.value, + r = this.peekToken(), + i = r && r.value; + this.dropLeadingWhitespace && (n = n.replace(/^\s*/, ""), this.dropLeadingWhitespace = !1), r && (r.type === Vt.TOKEN_BLOCK_START && "-" === i.charAt(i.length - 1) || r.type === Vt.TOKEN_VARIABLE_START && "-" === i.charAt(this.tokens.tags.VARIABLE_START.length) || r.type === Vt.TOKEN_COMMENT && "-" === i.charAt(this.tokens.tags.COMMENT_START.length)) && (n = n.replace(/\s*$/, "")), t.push(new hr.Output(e.lineno, e.colno, [new hr.TemplateData(e.lineno, e.colno, n)])) + } else if (e.type === Vt.TOKEN_BLOCK_START) { + this.dropLeadingWhitespace = !1; + var s = this.parseStatement(); + if (!s) break; + t.push(s) + } else if (e.type === Vt.TOKEN_VARIABLE_START) { + var a = this.parseExpression(); + this.dropLeadingWhitespace = !1, this.advanceAfterVariableEnd(), t.push(new hr.Output(e.lineno, e.colno, [a])) + } else e.type === Vt.TOKEN_COMMENT ? this.dropLeadingWhitespace = "-" === e.value.charAt(e.value.length - this.tokens.tags.COMMENT_END.length - 1) : this.fail("Unexpected token at top-level: " + e.type, e.lineno, e.colno); + return t + }, i.parse = function() { + return new hr.NodeList(0, 0, this.parseNodes()) + }, i.parseAsRoot = function() { + return new hr.Root(0, 0, this.parseNodes()) + }, r + }(en.Obj), + fr = { + parse: function(e, t, n) { + var r = new pr(Vt.lex(e, n)); + return void 0 !== t && (r.extensions = t), r.parseAsRoot() + }, + Parser: pr + }, + dr = 0; + +function Er() { + return "hole_" + dr++ +} + +function mr(e, t) { + for (var n = null, r = 0; r < e.length; r++) { + var i = t(e[r]); + i !== e[r] && (n || (n = e.slice()), n[r] = i) + } + return n || e +} + +function Tr(e, t, n) { + if (!(e instanceof hr.Node)) return e; + if (!n) { + var r = t(e); + if (r && r !== e) return r + } + if (e instanceof hr.NodeList) { + var i = mr(e.children, (function(e) { + return Tr(e, t, n) + })); + i !== e.children && (e = new hr[e.typename](e.lineno, e.colno, i)) + } else if (e instanceof hr.CallExtension) { + var s = Tr(e.args, t, n), + a = mr(e.contentArgs, (function(e) { + return Tr(e, t, n) + })); + s === e.args && a === e.contentArgs || (e = new hr[e.typename](e.extName, e.prop, s, a)) + } else { + var o = e.fields.map((function(t) { + return e[t] + })), + c = mr(o, (function(e) { + return Tr(e, t, n) + })); + c !== o && (e = new hr[e.typename](e.lineno, e.colno), c.forEach((function(t, n) { + e[e.fields[n]] = t + }))) + } + return n && t(e) || e +} + +function _r(e, t) { + return Tr(e, t, !0) +} + +function Ar(e, t, n) { + var r = [], + i = _r(n ? e[n] : e, (function(e) { + var n; + return e instanceof hr.Block ? e : ((e instanceof hr.Filter && -1 !== je.indexOf(t, e.name.value) || e instanceof hr.CallExtensionAsync) && (n = new hr.Symbol(e.lineno, e.colno, Er()), r.push(new hr.FilterAsync(e.lineno, e.colno, e.name, e.args, n))), n) + })); + return n ? e[n] = i : e = i, r.length ? (r.push(e), new hr.NodeList(e.lineno, e.colno, r)) : e +} + +function gr(e, t) { + return function(e) { + return _r(e, (function(e) { + if (e instanceof hr.If || e instanceof hr.For) { + var t = !1; + if (Tr(e, (function(e) { + if (e instanceof hr.FilterAsync || e instanceof hr.IfAsync || e instanceof hr.AsyncEach || e instanceof hr.AsyncAll || e instanceof hr.CallExtensionAsync) return t = !0, e + })), t) { + if (e instanceof hr.If) return new hr.IfAsync(e.lineno, e.colno, e.cond, e.body, e.else_); + if (e instanceof hr.For && !(e instanceof hr.AsyncAll)) return new hr.AsyncEach(e.lineno, e.colno, e.arr, e.name, e.body, e.else_) + } + } + })) + }(function(e) { + return Tr(e, (function(e) { + if (e instanceof hr.Block) { + var t = !1, + n = Er(); + e.body = Tr(e.body, (function(e) { + if (e instanceof hr.FunCall && "super" === e.name.value) return t = !0, new hr.Symbol(e.lineno, e.colno, n) + })), t && e.body.children.unshift(new hr.Super(0, 0, e.name, new hr.Symbol(0, 0, n))) + } + })) + }(function(e, t) { + return _r(e, (function(e) { + return e instanceof hr.Output ? Ar(e, t) : e instanceof hr.Set ? Ar(e, t, "value") : e instanceof hr.For ? Ar(e, t, "arr") : e instanceof hr.If ? Ar(e, t, "cond") : e instanceof hr.CallExtension ? Ar(e, t, "args") : void 0 + })) + }(e, t))) +} +var Nr = { + transform: function(e, t) { + return gr(e, t || []) + } + }, + Cr = Array.from, + Ir = "function" == typeof Symbol && Symbol.iterator && "function" == typeof Cr, + Sr = function() { + function e(e, t) { + this.variables = Object.create(null), this.parent = e, this.topLevel = !1, this.isolateWrites = t + } + var t = e.prototype; + return t.set = function(e, t, n) { + var r = e.split("."), + i = this.variables, + s = this; + if (n && (s = this.resolve(r[0], !0))) s.set(e, t); + else { + for (var a = 0; a < r.length - 1; a++) { + var o = r[a]; + i[o] || (i[o] = {}), i = i[o] + } + i[r[r.length - 1]] = t + } + }, t.get = function(e) { + var t = this.variables[e]; + return void 0 !== t ? t : null + }, t.lookup = function(e) { + var t = this.parent, + n = this.variables[e]; + return void 0 !== n ? n : t && t.lookup(e) + }, t.resolve = function(e, t) { + var n = t && this.isolateWrites ? void 0 : this.parent; + return void 0 !== this.variables[e] ? this : n && n.resolve(e) + }, t.push = function(t) { + return new e(this, t) + }, t.pop = function() { + return this.parent + }, e + }(); + +function br(e) { + return e && Object.prototype.hasOwnProperty.call(e, "__keywords") +} + +function Or(e) { + var t = e.length; + if (t) { + var n = e[t - 1]; + if (br(n)) return n + } + return {} +} + +function yr(e) { + var t = e.length; + return 0 === t ? 0 : br(e[t - 1]) ? t - 1 : t +} + +function Lr(e) { + if ("string" != typeof e) return e; + this.val = e, Object.defineProperty(this, "length", { + writable: !0, + configurable: !0, + value: e.length + }) +} +Lr.prototype = Object.create(String.prototype, { + length: { + writable: !0, + configurable: !0, + value: 0 + } +}), Lr.prototype.valueOf = function() { + return this.val +}, Lr.prototype.toString = function() { + return this.val +}; +var kr = { + Frame: Sr, + makeMacro: function(e, t, n) { + return function() { + for (var r = arguments.length, i = new Array(r), s = 0; s < r; s++) i[s] = arguments[s]; + var a, o = yr(i), + c = Or(i); + if (o > e.length) a = i.slice(0, e.length), i.slice(a.length, o).forEach((function(e, n) { + n < t.length && (c[t[n]] = e) + })), a.push(c); + else if (o < e.length) { + a = i.slice(0, o); + for (var l = o; l < e.length; l++) { + var h = e[l]; + a.push(c[h]), delete c[h] + } + a.push(c) + } else a = i; + return n.apply(this, a) + } + }, + makeKeywordArgs: function(e) { + return e.__keywords = !0, e + }, + numArgs: yr, + suppressValue: function(e, t) { + return "object" == typeof(e = null != e ? e : "") ? new Lr(JSON.stringify(e).toString()) : (!t || e instanceof Lr || (e = je.escape(e.toString())), e) + }, + ensureDefined: function(e, t, n) { + if (null == e) throw new je.TemplateError("attempted to output null or undefined value", t + 1, n + 1); + return e + }, + memberLookup: function(e, t) { + if (null != e) return "function" == typeof e[t] ? function() { + for (var n = arguments.length, r = new Array(n), i = 0; i < n; i++) r[i] = arguments[i]; + return e[t].apply(e, r) + } : e[t] + }, + contextOrFrameLookup: function(e, t, n) { + var r = t.lookup(n); + return void 0 !== r ? r : e.lookup(n) + }, + callWrap: function(e, t, n, r) { + if (!e) throw new Error("Unable to call `" + t + "`, which is undefined or falsey"); + if ("function" != typeof e) throw new Error("Unable to call `" + t + "`, which is not a function"); + return e.apply(n, r) + }, + handleError: function(e, t, n) { + return e.lineno ? e : new je.TemplateError(e, t, n) + }, + isArray: je.isArray, + keys: je.keys, + SafeString: Lr, + copySafeness: function(e, t) { + return e instanceof Lr ? new Lr(t) : t.toString() + }, + markSafe: function(e) { + var t = typeof e; + return "string" === t ? new Lr(e) : "function" !== t ? e : function(t) { + var n = e.apply(this, arguments); + return "string" == typeof n ? new Lr(n) : n + } + }, + asyncEach: function(e, t, n, r) { + if (je.isArray(e)) { + var i = e.length; + je.asyncIter(e, (function(e, r, s) { + switch (t) { + case 1: + n(e, r, i, s); + break; + case 2: + n(e[0], e[1], r, i, s); + break; + case 3: + n(e[0], e[1], e[2], r, i, s); + break; + default: + e.push(r, i, s), n.apply(this, e) + } + }), r) + } else je.asyncFor(e, (function(e, t, r, i, s) { + n(e, t, r, i, s) + }), r) + }, + asyncAll: function(e, t, n, r) { + var i, s, a = 0; + + function o(e, t) { + a++, s[e] = t, a === i && r(null, s.join("")) + } + if (je.isArray(e)) + if (i = e.length, s = new Array(i), 0 === i) r(null, ""); + else + for (var c = 0; c < e.length; c++) { + var l = e[c]; + switch (t) { + case 1: + n(l, c, i, o); + break; + case 2: + n(l[0], l[1], c, i, o); + break; + case 3: + n(l[0], l[1], l[2], c, i, o); + break; + default: + l.push(c, i, o), n.apply(this, l) + } + } else { + var h = je.keys(e || {}); + if (i = h.length, s = new Array(i), 0 === i) r(null, ""); + else + for (var u = 0; u < h.length; u++) { + var p = h[u]; + n(p, e[p], u, i, o) + } + } + }, + inOperator: je.inOperator, + fromIterator: function(e) { + return "object" != typeof e || null === e || je.isArray(e) ? e : Ir && Symbol.iterator in e ? Cr(e) : e + } +}; + +function vr(e, t) { + return vr = Object.setPrototypeOf || function(e, t) { + return e.__proto__ = t, e + }, vr(e, t) +} +kr.Frame, kr.makeMacro, kr.makeKeywordArgs, kr.numArgs, kr.suppressValue, kr.ensureDefined, kr.memberLookup, kr.contextOrFrameLookup, kr.callWrap, kr.handleError, kr.isArray, kr.keys, kr.SafeString, kr.copySafeness, kr.markSafe, kr.asyncEach, kr.asyncAll, kr.inOperator, kr.fromIterator; +var Dr = je.TemplateError, + Rr = kr.Frame, + Mr = { + "==": "==", + "===": "===", + "!=": "!=", + "!==": "!==", + "<": "<", + ">": ">", + "<=": "<=", + ">=": ">=" + }, + Pr = function(e) { + var t, n; + + function r() { + return e.apply(this, arguments) || this + } + n = e, (t = r).prototype = Object.create(n.prototype), t.prototype.constructor = t, vr(t, n); + var i = r.prototype; + return i.init = function(e, t) { + this.templateName = e, this.codebuf = [], this.lastId = 0, this.buffer = null, this.bufferStack = [], this._scopeClosers = "", this.inBlock = !1, this.throwOnUndefined = t + }, i.fail = function(e, t, n) { + throw void 0 !== t && (t += 1), void 0 !== n && (n += 1), new Dr(e, t, n) + }, i._pushBuffer = function() { + var e = this._tmpid(); + return this.bufferStack.push(this.buffer), this.buffer = e, this._emit("var " + this.buffer + ' = "";'), e + }, i._popBuffer = function() { + this.buffer = this.bufferStack.pop() + }, i._emit = function(e) { + this.codebuf.push(e) + }, i._emitLine = function(e) { + this._emit(e + "\n") + }, i._emitLines = function() { + for (var e = this, t = arguments.length, n = new Array(t), r = 0; r < t; r++) n[r] = arguments[r]; + n.forEach((function(t) { + return e._emitLine(t) + })) + }, i._emitFuncBegin = function(e, t) { + this.buffer = "output", this._scopeClosers = "", this._emitLine("function " + t + "(env, context, frame, runtime, cb) {"), this._emitLine("var lineno = " + e.lineno + ";"), this._emitLine("var colno = " + e.colno + ";"), this._emitLine("var " + this.buffer + ' = "";'), this._emitLine("try {") + }, i._emitFuncEnd = function(e) { + e || this._emitLine("cb(null, " + this.buffer + ");"), this._closeScopeLevels(), this._emitLine("} catch (e) {"), this._emitLine(" cb(runtime.handleError(e, lineno, colno));"), this._emitLine("}"), this._emitLine("}"), this.buffer = null + }, i._addScopeLevel = function() { + this._scopeClosers += "})" + }, i._closeScopeLevels = function() { + this._emitLine(this._scopeClosers + ";"), this._scopeClosers = "" + }, i._withScopedSyntax = function(e) { + var t = this._scopeClosers; + this._scopeClosers = "", e.call(this), this._closeScopeLevels(), this._scopeClosers = t + }, i._makeCallback = function(e) { + var t = this._tmpid(); + return "function(" + t + (e ? "," + e : "") + ") {\nif(" + t + ") { cb(" + t + "); return; }" + }, i._tmpid = function() { + return this.lastId++, "t_" + this.lastId + }, i._templateName = function() { + return null == this.templateName ? "undefined" : JSON.stringify(this.templateName) + }, i._compileChildren = function(e, t) { + var n = this; + e.children.forEach((function(e) { + n.compile(e, t) + })) + }, i._compileAggregate = function(e, t, n, r) { + var i = this; + n && this._emit(n), e.children.forEach((function(e, n) { + n > 0 && i._emit(","), i.compile(e, t) + })), r && this._emit(r) + }, i._compileExpression = function(e, t) { + this.assertType(e, hr.Literal, hr.Symbol, hr.Group, hr.Array, hr.Dict, hr.FunCall, hr.Caller, hr.Filter, hr.LookupVal, hr.Compare, hr.InlineIf, hr.In, hr.Is, hr.And, hr.Or, hr.Not, hr.Add, hr.Concat, hr.Sub, hr.Mul, hr.Div, hr.FloorDiv, hr.Mod, hr.Pow, hr.Neg, hr.Pos, hr.Compare, hr.NodeList), this.compile(e, t) + }, i.assertType = function(e) { + for (var t = arguments.length, n = new Array(t > 1 ? t - 1 : 0), r = 1; r < t; r++) n[r - 1] = arguments[r]; + n.some((function(t) { + return e instanceof t + })) || this.fail("assertType: invalid type: " + e.typename, e.lineno, e.colno) + }, i.compileCallExtension = function(e, t, n) { + var r = this, + i = e.args, + s = e.contentArgs, + a = "boolean" != typeof e.autoescape || e.autoescape; + if (n || this._emit(this.buffer + " += runtime.suppressValue("), this._emit('env.getExtension("' + e.extName + '")["' + e.prop + '"]('), this._emit("context"), (i || s) && this._emit(","), i && (i instanceof hr.NodeList || this.fail("compileCallExtension: arguments must be a NodeList, use `parser.parseSignature`"), i.children.forEach((function(e, n) { + r._compileExpression(e, t), (n !== i.children.length - 1 || s.length) && r._emit(",") + }))), s.length && s.forEach((function(e, n) { + if (n > 0 && r._emit(","), e) { + r._emitLine("function(cb) {"), r._emitLine("if(!cb) { cb = function(err) { if(err) { throw err; }}}"); + var i = r._pushBuffer(); + r._withScopedSyntax((function() { + r.compile(e, t), r._emitLine("cb(null, " + i + ");") + })), r._popBuffer(), r._emitLine("return " + i + ";"), r._emitLine("}") + } else r._emit("null") + })), n) { + var o = this._tmpid(); + this._emitLine(", " + this._makeCallback(o)), this._emitLine(this.buffer + " += runtime.suppressValue(" + o + ", " + a + " && env.opts.autoescape);"), this._addScopeLevel() + } else this._emit(")"), this._emit(", " + a + " && env.opts.autoescape);\n") + }, i.compileCallExtensionAsync = function(e, t) { + this.compileCallExtension(e, t, !0) + }, i.compileNodeList = function(e, t) { + this._compileChildren(e, t) + }, i.compileLiteral = function(e) { + if ("string" == typeof e.value) { + var t = e.value.replace(/\\/g, "\\\\"); + t = (t = (t = (t = (t = t.replace(/"/g, '\\"')).replace(/\n/g, "\\n")).replace(/\r/g, "\\r")).replace(/\t/g, "\\t")).replace(/\u2028/g, "\\u2028"), this._emit('"' + t + '"') + } else null === e.value ? this._emit("null") : this._emit(e.value.toString()) + }, i.compileSymbol = function(e, t) { + var n = e.value, + r = t.lookup(n); + r ? this._emit(r) : this._emit('runtime.contextOrFrameLookup(context, frame, "' + n + '")') + }, i.compileGroup = function(e, t) { + this._compileAggregate(e, t, "(", ")") + }, i.compileArray = function(e, t) { + this._compileAggregate(e, t, "[", "]") + }, i.compileDict = function(e, t) { + this._compileAggregate(e, t, "{", "}") + }, i.compilePair = function(e, t) { + var n = e.key, + r = e.value; + n instanceof hr.Symbol ? n = new hr.Literal(n.lineno, n.colno, n.value) : n instanceof hr.Literal && "string" == typeof n.value || this.fail("compilePair: Dict keys must be strings or names", n.lineno, n.colno), this.compile(n, t), this._emit(": "), this._compileExpression(r, t) + }, i.compileInlineIf = function(e, t) { + this._emit("("), this.compile(e.cond, t), this._emit("?"), this.compile(e.body, t), this._emit(":"), null !== e.else_ ? this.compile(e.else_, t) : this._emit('""'), this._emit(")") + }, i.compileIn = function(e, t) { + this._emit("runtime.inOperator("), this.compile(e.left, t), this._emit(","), this.compile(e.right, t), this._emit(")") + }, i.compileIs = function(e, t) { + var n = e.right.name ? e.right.name.value : e.right.value; + this._emit('env.getTest("' + n + '").call(context, '), this.compile(e.left, t), e.right.args && (this._emit(","), this.compile(e.right.args, t)), this._emit(") === true") + }, i._binOpEmitter = function(e, t, n) { + this.compile(e.left, t), this._emit(n), this.compile(e.right, t) + }, i.compileOr = function(e, t) { + return this._binOpEmitter(e, t, " || ") + }, i.compileAnd = function(e, t) { + return this._binOpEmitter(e, t, " && ") + }, i.compileAdd = function(e, t) { + return this._binOpEmitter(e, t, " + ") + }, i.compileConcat = function(e, t) { + return this._binOpEmitter(e, t, ' + "" + ') + }, i.compileSub = function(e, t) { + return this._binOpEmitter(e, t, " - ") + }, i.compileMul = function(e, t) { + return this._binOpEmitter(e, t, " * ") + }, i.compileDiv = function(e, t) { + return this._binOpEmitter(e, t, " / ") + }, i.compileMod = function(e, t) { + return this._binOpEmitter(e, t, " % ") + }, i.compileNot = function(e, t) { + this._emit("!"), this.compile(e.target, t) + }, i.compileFloorDiv = function(e, t) { + this._emit("Math.floor("), this.compile(e.left, t), this._emit(" / "), this.compile(e.right, t), this._emit(")") + }, i.compilePow = function(e, t) { + this._emit("Math.pow("), this.compile(e.left, t), this._emit(", "), this.compile(e.right, t), this._emit(")") + }, i.compileNeg = function(e, t) { + this._emit("-"), this.compile(e.target, t) + }, i.compilePos = function(e, t) { + this._emit("+"), this.compile(e.target, t) + }, i.compileCompare = function(e, t) { + var n = this; + this.compile(e.expr, t), e.ops.forEach((function(e) { + n._emit(" " + Mr[e.type] + " "), n.compile(e.expr, t) + })) + }, i.compileLookupVal = function(e, t) { + this._emit("runtime.memberLookup(("), this._compileExpression(e.target, t), this._emit("),"), this._compileExpression(e.val, t), this._emit(")") + }, i._getNodeName = function(e) { + switch (e.typename) { + case "Symbol": + return e.value; + case "FunCall": + return "the return value of (" + this._getNodeName(e.name) + ")"; + case "LookupVal": + return this._getNodeName(e.target) + '["' + this._getNodeName(e.val) + '"]'; + case "Literal": + return e.value.toString(); + default: + return "--expression--" + } + }, i.compileFunCall = function(e, t) { + this._emit("(lineno = " + e.lineno + ", colno = " + e.colno + ", "), this._emit("runtime.callWrap("), this._compileExpression(e.name, t), this._emit(', "' + this._getNodeName(e.name).replace(/"/g, '\\"') + '", context, '), this._compileAggregate(e.args, t, "[", "])"), this._emit(")") + }, i.compileFilter = function(e, t) { + var n = e.name; + this.assertType(n, hr.Symbol), this._emit('env.getFilter("' + n.value + '").call(context, '), this._compileAggregate(e.args, t), this._emit(")") + }, i.compileFilterAsync = function(e, t) { + var n = e.name, + r = e.symbol.value; + this.assertType(n, hr.Symbol), t.set(r, r), this._emit('env.getFilter("' + n.value + '").call(context, '), this._compileAggregate(e.args, t), this._emitLine(", " + this._makeCallback(r)), this._addScopeLevel() + }, i.compileKeywordArgs = function(e, t) { + this._emit("runtime.makeKeywordArgs("), this.compileDict(e, t), this._emit(")") + }, i.compileSet = function(e, t) { + var n = this, + r = []; + e.targets.forEach((function(e) { + var i = e.value, + s = t.lookup(i); + null == s && (s = n._tmpid(), n._emitLine("var " + s + ";")), r.push(s) + })), e.value ? (this._emit(r.join(" = ") + " = "), this._compileExpression(e.value, t), this._emitLine(";")) : (this._emit(r.join(" = ") + " = "), this.compile(e.body, t), this._emitLine(";")), e.targets.forEach((function(e, t) { + var i = r[t], + s = e.value; + n._emitLine('frame.set("' + s + '", ' + i + ", true);"), n._emitLine("if(frame.topLevel) {"), n._emitLine('context.setVariable("' + s + '", ' + i + ");"), n._emitLine("}"), "_" !== s.charAt(0) && (n._emitLine("if(frame.topLevel) {"), n._emitLine('context.addExport("' + s + '", ' + i + ");"), n._emitLine("}")) + })) + }, i.compileSwitch = function(e, t) { + var n = this; + this._emit("switch ("), this.compile(e.expr, t), this._emit(") {"), e.cases.forEach((function(e, r) { + n._emit("case "), n.compile(e.cond, t), n._emit(": "), n.compile(e.body, t), e.body.children.length && n._emitLine("break;") + })), e.default && (this._emit("default:"), this.compile(e.default, t)), this._emit("}") + }, i.compileIf = function(e, t, n) { + var r = this; + this._emit("if("), this._compileExpression(e.cond, t), this._emitLine(") {"), this._withScopedSyntax((function() { + r.compile(e.body, t), n && r._emit("cb()") + })), e.else_ ? (this._emitLine("}\nelse {"), this._withScopedSyntax((function() { + r.compile(e.else_, t), n && r._emit("cb()") + }))) : n && (this._emitLine("}\nelse {"), this._emit("cb()")), this._emitLine("}") + }, i.compileIfAsync = function(e, t) { + this._emit("(function(cb) {"), this.compileIf(e, t, !0), this._emit("})(" + this._makeCallback()), this._addScopeLevel() + }, i._emitLoopBindings = function(e, t, n, r) { + var i = this; + [{ + name: "index", + val: n + " + 1" + }, { + name: "index0", + val: n + }, { + name: "revindex", + val: r + " - " + n + }, { + name: "revindex0", + val: r + " - " + n + " - 1" + }, { + name: "first", + val: n + " === 0" + }, { + name: "last", + val: n + " === " + r + " - 1" + }, { + name: "length", + val: r + }].forEach((function(e) { + i._emitLine('frame.set("loop.' + e.name + '", ' + e.val + ");") + })) + }, i.compileFor = function(e, t) { + var n = this, + r = this._tmpid(), + i = this._tmpid(), + s = this._tmpid(); + if (t = t.push(), this._emitLine("frame = frame.push();"), this._emit("var " + s + " = "), this._compileExpression(e.arr, t), this._emitLine(";"), this._emit("if(" + s + ") {"), this._emitLine(s + " = runtime.fromIterator(" + s + ");"), e.name instanceof hr.Array) { + this._emitLine("var " + r + ";"), this._emitLine("if(runtime.isArray(" + s + ")) {"), this._emitLine("var " + i + " = " + s + ".length;"), this._emitLine("for(" + r + "=0; " + r + " < " + s + ".length; " + r + "++) {"), e.name.children.forEach((function(i, a) { + var o = n._tmpid(); + n._emitLine("var " + o + " = " + s + "[" + r + "][" + a + "];"), n._emitLine('frame.set("' + i + '", ' + s + "[" + r + "][" + a + "]);"), t.set(e.name.children[a].value, o) + })), this._emitLoopBindings(e, s, r, i), this._withScopedSyntax((function() { + n.compile(e.body, t) + })), this._emitLine("}"), this._emitLine("} else {"); + var a = e.name.children, + o = a[0], + c = a[1], + l = this._tmpid(), + h = this._tmpid(); + t.set(o.value, l), t.set(c.value, h), this._emitLine(r + " = -1;"), this._emitLine("var " + i + " = runtime.keys(" + s + ").length;"), this._emitLine("for(var " + l + " in " + s + ") {"), this._emitLine(r + "++;"), this._emitLine("var " + h + " = " + s + "[" + l + "];"), this._emitLine('frame.set("' + o.value + '", ' + l + ");"), this._emitLine('frame.set("' + c.value + '", ' + h + ");"), this._emitLoopBindings(e, s, r, i), this._withScopedSyntax((function() { + n.compile(e.body, t) + })), this._emitLine("}"), this._emitLine("}") + } else { + var u = this._tmpid(); + t.set(e.name.value, u), this._emitLine("var " + i + " = " + s + ".length;"), this._emitLine("for(var " + r + "=0; " + r + " < " + s + ".length; " + r + "++) {"), this._emitLine("var " + u + " = " + s + "[" + r + "];"), this._emitLine('frame.set("' + e.name.value + '", ' + u + ");"), this._emitLoopBindings(e, s, r, i), this._withScopedSyntax((function() { + n.compile(e.body, t) + })), this._emitLine("}") + } + this._emitLine("}"), e.else_ && (this._emitLine("if (!" + i + ") {"), this.compile(e.else_, t), this._emitLine("}")), this._emitLine("frame = frame.pop();") + }, i._compileAsyncLoop = function(e, t, n) { + var r = this, + i = this._tmpid(), + s = this._tmpid(), + a = this._tmpid(), + o = n ? "asyncAll" : "asyncEach"; + if (t = t.push(), this._emitLine("frame = frame.push();"), this._emit("var " + a + " = runtime.fromIterator("), this._compileExpression(e.arr, t), this._emitLine(");"), e.name instanceof hr.Array) { + var c = e.name.children.length; + this._emit("runtime." + o + "(" + a + ", " + c + ", function("), e.name.children.forEach((function(e) { + r._emit(e.value + ",") + })), this._emit(i + "," + s + ",next) {"), e.name.children.forEach((function(e) { + var n = e.value; + t.set(n, n), r._emitLine('frame.set("' + n + '", ' + n + ");") + })) + } else { + var l = e.name.value; + this._emitLine("runtime." + o + "(" + a + ", 1, function(" + l + ", " + i + ", " + s + ",next) {"), this._emitLine('frame.set("' + l + '", ' + l + ");"), t.set(l, l) + } + this._emitLoopBindings(e, a, i, s), this._withScopedSyntax((function() { + var s; + n && (s = r._pushBuffer()), r.compile(e.body, t), r._emitLine("next(" + i + (s ? "," + s : "") + ");"), n && r._popBuffer() + })); + var h = this._tmpid(); + this._emitLine("}, " + this._makeCallback(h)), this._addScopeLevel(), n && this._emitLine(this.buffer + " += " + h + ";"), e.else_ && (this._emitLine("if (!" + a + ".length) {"), this.compile(e.else_, t), this._emitLine("}")), this._emitLine("frame = frame.pop();") + }, i.compileAsyncEach = function(e, t) { + this._compileAsyncLoop(e, t) + }, i.compileAsyncAll = function(e, t) { + this._compileAsyncLoop(e, t, !0) + }, i._compileMacro = function(e, t) { + var n = this, + r = [], + i = null, + s = "macro_" + this._tmpid(), + a = void 0 !== t; + e.args.children.forEach((function(t, s) { + s === e.args.children.length - 1 && t instanceof hr.Dict ? i = t : (n.assertType(t, hr.Symbol), r.push(t)) + })); + var o, c = [].concat(r.map((function(e) { + return "l_" + e.value + })), ["kwargs"]), + l = r.map((function(e) { + return '"' + e.value + '"' + })), + h = (i && i.children || []).map((function(e) { + return '"' + e.key.value + '"' + })); + o = a ? t.push(!0) : new Rr, this._emitLines("var " + s + " = runtime.makeMacro(", "[" + l.join(", ") + "], ", "[" + h.join(", ") + "], ", "function (" + c.join(", ") + ") {", "var callerFrame = frame;", "frame = " + (a ? "frame.push(true);" : "new runtime.Frame();"), "kwargs = kwargs || {};", 'if (Object.prototype.hasOwnProperty.call(kwargs, "caller")) {', 'frame.set("caller", kwargs.caller); }'), r.forEach((function(e) { + n._emitLine('frame.set("' + e.value + '", l_' + e.value + ");"), o.set(e.value, "l_" + e.value) + })), i && i.children.forEach((function(e) { + var t = e.key.value; + n._emit('frame.set("' + t + '", '), n._emit('Object.prototype.hasOwnProperty.call(kwargs, "' + t + '")'), n._emit(' ? kwargs["' + t + '"] : '), n._compileExpression(e.value, o), n._emit(");") + })); + var u = this._pushBuffer(); + return this._withScopedSyntax((function() { + n.compile(e.body, o) + })), this._emitLine("frame = " + (a ? "frame.pop();" : "callerFrame;")), this._emitLine("return new runtime.SafeString(" + u + ");"), this._emitLine("});"), this._popBuffer(), s + }, i.compileMacro = function(e, t) { + var n = this._compileMacro(e), + r = e.name.value; + t.set(r, n), t.parent ? this._emitLine('frame.set("' + r + '", ' + n + ");") : ("_" !== e.name.value.charAt(0) && this._emitLine('context.addExport("' + r + '");'), this._emitLine('context.setVariable("' + r + '", ' + n + ");")) + }, i.compileCaller = function(e, t) { + this._emit("(function (){"); + var n = this._compileMacro(e, t); + this._emit("return " + n + ";})()") + }, i._compileGetTemplate = function(e, t, n, r) { + var i = this._tmpid(), + s = this._templateName(), + a = this._makeCallback(i), + o = n ? "true" : "false", + c = r ? "true" : "false"; + return this._emit("env.getTemplate("), this._compileExpression(e.template, t), this._emitLine(", " + o + ", " + s + ", " + c + ", " + a), i + }, i.compileImport = function(e, t) { + var n = e.target.value, + r = this._compileGetTemplate(e, t, !1, !1); + this._addScopeLevel(), this._emitLine(r + ".getExported(" + (e.withContext ? "context.getVariables(), frame, " : "") + this._makeCallback(r)), this._addScopeLevel(), t.set(n, r), t.parent ? this._emitLine('frame.set("' + n + '", ' + r + ");") : this._emitLine('context.setVariable("' + n + '", ' + r + ");") + }, i.compileFromImport = function(e, t) { + var n = this, + r = this._compileGetTemplate(e, t, !1, !1); + this._addScopeLevel(), this._emitLine(r + ".getExported(" + (e.withContext ? "context.getVariables(), frame, " : "") + this._makeCallback(r)), this._addScopeLevel(), e.names.children.forEach((function(e) { + var i, s, a = n._tmpid(); + e instanceof hr.Pair ? (i = e.key.value, s = e.value.value) : s = i = e.value, n._emitLine("if(Object.prototype.hasOwnProperty.call(" + r + ', "' + i + '")) {'), n._emitLine("var " + a + " = " + r + "." + i + ";"), n._emitLine("} else {"), n._emitLine("cb(new Error(\"cannot import '" + i + "'\")); return;"), n._emitLine("}"), t.set(s, a), t.parent ? n._emitLine('frame.set("' + s + '", ' + a + ");") : n._emitLine('context.setVariable("' + s + '", ' + a + ");") + })) + }, i.compileBlock = function(e) { + var t = this._tmpid(); + this.inBlock || this._emit('(parentTemplate ? function(e, c, f, r, cb) { cb(""); } : '), this._emit('context.getBlock("' + e.name.value + '")'), this.inBlock || this._emit(")"), this._emitLine("(env, context, frame, runtime, " + this._makeCallback(t)), this._emitLine(this.buffer + " += " + t + ";"), this._addScopeLevel() + }, i.compileSuper = function(e, t) { + var n = e.blockName.value, + r = e.symbol.value, + i = this._makeCallback(r); + this._emitLine('context.getSuper(env, "' + n + '", b_' + n + ", frame, runtime, " + i), this._emitLine(r + " = runtime.markSafe(" + r + ");"), this._addScopeLevel(), t.set(r, r) + }, i.compileExtends = function(e, t) { + var n = this._tmpid(), + r = this._compileGetTemplate(e, t, !0, !1); + this._emitLine("parentTemplate = " + r), this._emitLine("for(var " + n + " in parentTemplate.blocks) {"), this._emitLine("context.addBlock(" + n + ", parentTemplate.blocks[" + n + "]);"), this._emitLine("}"), this._addScopeLevel() + }, i.compileInclude = function(e, t) { + this._emitLine("var tasks = [];"), this._emitLine("tasks.push("), this._emitLine("function(callback) {"); + var n = this._compileGetTemplate(e, t, !1, e.ignoreMissing); + this._emitLine("callback(null," + n + ");});"), this._emitLine("});"); + var r = this._tmpid(); + this._emitLine("tasks.push("), this._emitLine("function(template, callback){"), this._emitLine("template.render(context.getVariables(), frame, " + this._makeCallback(r)), this._emitLine("callback(null," + r + ");});"), this._emitLine("});"), this._emitLine("tasks.push("), this._emitLine("function(result, callback){"), this._emitLine(this.buffer + " += result;"), this._emitLine("callback(null);"), this._emitLine("});"), this._emitLine("env.waterfall(tasks, function(){"), this._addScopeLevel() + }, i.compileTemplateData = function(e, t) { + this.compileLiteral(e, t) + }, i.compileCapture = function(e, t) { + var n = this, + r = this.buffer; + this.buffer = "output", this._emitLine("(function() {"), this._emitLine('var output = "";'), this._withScopedSyntax((function() { + n.compile(e.body, t) + })), this._emitLine("return output;"), this._emitLine("})()"), this.buffer = r + }, i.compileOutput = function(e, t) { + var n = this; + e.children.forEach((function(r) { + r instanceof hr.TemplateData ? r.value && (n._emit(n.buffer + " += "), n.compileLiteral(r, t), n._emitLine(";")) : (n._emit(n.buffer + " += runtime.suppressValue("), n.throwOnUndefined && n._emit("runtime.ensureDefined("), n.compile(r, t), n.throwOnUndefined && n._emit("," + e.lineno + "," + e.colno + ")"), n._emit(", env.opts.autoescape);\n")) + })) + }, i.compileRoot = function(e, t) { + var n = this; + t && this.fail("compileRoot: root node can't have frame"), t = new Rr, this._emitFuncBegin(e, "root"), this._emitLine("var parentTemplate = null;"), this._compileChildren(e, t), this._emitLine("if(parentTemplate) {"), this._emitLine("parentTemplate.rootRenderFunc(env, context, frame, runtime, cb);"), this._emitLine("} else {"), this._emitLine("cb(null, " + this.buffer + ");"), this._emitLine("}"), this._emitFuncEnd(!0), this.inBlock = !0; + var r = [], + i = e.findAll(hr.Block); + i.forEach((function(e, t) { + var i = e.name.value; + if (-1 !== r.indexOf(i)) throw new Error('Block "' + i + '" defined more than once.'); + r.push(i), n._emitFuncBegin(e, "b_" + i); + var s = new Rr; + n._emitLine("var frame = frame.push(true);"), n.compile(e.body, s), n._emitFuncEnd() + })), this._emitLine("return {"), i.forEach((function(e, t) { + var r = "b_" + e.name.value; + n._emitLine(r + ": " + r + ",") + })), this._emitLine("root: root\n};") + }, i.compile = function(e, t) { + var n = this["compile" + e.typename]; + n ? n.call(this, e, t) : this.fail("compile: Cannot compile node: " + e.typename, e.lineno, e.colno) + }, i.getCode = function() { + return this.codebuf.join("") + }, r + }(en.Obj), + xr = { + compile: function(e, t, n, r, i) { + void 0 === i && (i = {}); + var s = new Pr(r, i.throwOnUndefined), + a = (n || []).map((function(e) { + return e.preprocess + })).filter((function(e) { + return !!e + })).reduce((function(e, t) { + return t(e) + }), e); + return s.compile(Nr.transform(fr.parse(a, n, i), t, r)), s.getCode() + }, + Compiler: Pr + }, + wr = Ke((function(e) { + var t = e.exports = {}; + + function n(e, t) { + return null == e || !1 === e ? t : e + } + + function r(e) { + return e != e + } + + function i(e) { + var t = (e = n(e, "")).toLowerCase(); + return kr.copySafeness(e, t.charAt(0).toUpperCase() + t.slice(1)) + } + + function s(e) { + if (je.isString(e)) return e.split(""); + if (je.isObject(e)) return je._entries(e || {}).map((function(e) { + return { + key: e[0], + value: e[1] + } + })); + if (je.isArray(e)) return e; + throw new je.TemplateError("list filter: type not iterable") + } + + function a(e) { + return function(t, n, r) { + void 0 === n && (n = "truthy"); + var i = this, + s = i.env.getTest(n); + return je.toArray(t).filter((function(t) { + return s.call(i, t, r) === e + })) + } + } + + function o(e) { + return kr.copySafeness(e, e.replace(/^\s*|\s*$/g, "")) + } + t.abs = Math.abs, t.batch = function(e, t, n) { + var r, i = [], + s = []; + for (r = 0; r < e.length; r++) r % t == 0 && s.length && (i.push(s), s = []), s.push(e[r]); + if (s.length) { + if (n) + for (r = s.length; r < t; r++) s.push(n); + i.push(s) + } + return i + }, t.capitalize = i, t.center = function(e, t) { + if (t = t || 80, (e = n(e, "")).length >= t) return e; + var r = t - e.length, + i = je.repeat(" ", r / 2 - r % 2), + s = je.repeat(" ", r / 2); + return kr.copySafeness(e, i + e + s) + }, t.default = function(e, t, n) { + return n ? e || t : void 0 !== e ? e : t + }, t.dictsort = function(e, t, n) { + if (!je.isObject(e)) throw new je.TemplateError("dictsort filter: val must be an object"); + var r, i = []; + for (var s in e) i.push([s, e[s]]); + if (void 0 === n || "key" === n) r = 0; + else { + if ("value" !== n) throw new je.TemplateError("dictsort filter: You can only sort by either key or value"); + r = 1 + } + return i.sort((function(e, n) { + var i = e[r], + s = n[r]; + return t || (je.isString(i) && (i = i.toUpperCase()), je.isString(s) && (s = s.toUpperCase())), i > s ? 1 : i === s ? 0 : -1 + })), i + }, t.dump = function(e, t) { + return JSON.stringify(e, null, t) + }, t.escape = function(e) { + return e instanceof kr.SafeString ? e : (e = null == e ? "" : e, kr.markSafe(je.escape(e.toString()))) + }, t.safe = function(e) { + return e instanceof kr.SafeString ? e : (e = null == e ? "" : e, kr.markSafe(e.toString())) + }, t.first = function(e) { + return e[0] + }, t.forceescape = function(e) { + return e = null == e ? "" : e, kr.markSafe(je.escape(e.toString())) + }, t.groupby = function(e, t) { + return je.groupBy(e, t, this.env.opts.throwOnUndefined) + }, t.indent = function(e, t, r) { + if ("" === (e = n(e, ""))) return ""; + t = t || 4; + var i = e.split("\n"), + s = je.repeat(" ", t), + a = i.map((function(e, t) { + return 0 !== t || r ? "" + s + e : e + })).join("\n"); + return kr.copySafeness(e, a) + }, t.join = function(e, t, n) { + return t = t || "", n && (e = je.map(e, (function(e) { + return e[n] + }))), e.join(t) + }, t.last = function(e) { + return e[e.length - 1] + }, t.length = function(e) { + var t = n(e, ""); + return void 0 !== t ? "function" == typeof Map && t instanceof Map || "function" == typeof Set && t instanceof Set ? t.size : !je.isObject(t) || t instanceof kr.SafeString ? t.length : je.keys(t).length : 0 + }, t.list = s, t.lower = function(e) { + return (e = n(e, "")).toLowerCase() + }, t.nl2br = function(e) { + return null == e ? "" : kr.copySafeness(e, e.replace(/\r\n|\n/g, "
\n")) + }, t.random = function(e) { + return e[Math.floor(Math.random() * e.length)] + }, t.reject = a(!1), t.rejectattr = function(e, t) { + return e.filter((function(e) { + return !e[t] + })) + }, t.select = a(!0), t.selectattr = function(e, t) { + return e.filter((function(e) { + return !!e[t] + })) + }, t.replace = function(e, t, n, r) { + var i = e; + if (t instanceof RegExp) return e.replace(t, n); + void 0 === r && (r = -1); + var s = ""; + if ("number" == typeof t) t = "" + t; + else if ("string" != typeof t) return e; + if ("number" == typeof e && (e = "" + e), "string" != typeof e && !(e instanceof kr.SafeString)) return e; + if ("" === t) return s = n + e.split("").join(n) + n, kr.copySafeness(e, s); + var a = e.indexOf(t); + if (0 === r || -1 === a) return e; + for (var o = 0, c = 0; a > -1 && (-1 === r || c < r);) s += e.substring(o, a) + n, o = a + t.length, c++, a = e.indexOf(t, o); + return o < e.length && (s += e.substring(o)), kr.copySafeness(i, s) + }, t.reverse = function(e) { + var t; + return (t = je.isString(e) ? s(e) : je.map(e, (function(e) { + return e + }))).reverse(), je.isString(e) ? kr.copySafeness(e, t.join("")) : t + }, t.round = function(e, t, n) { + t = t || 0; + var r = Math.pow(10, t); + return ("ceil" === n ? Math.ceil : "floor" === n ? Math.floor : Math.round)(e * r) / r + }, t.slice = function(e, t, n) { + for (var r = Math.floor(e.length / t), i = e.length % t, s = [], a = 0, o = 0; o < t; o++) { + var c = a + o * r; + o < i && a++; + var l = a + (o + 1) * r, + h = e.slice(c, l); + n && o >= i && h.push(n), s.push(h) + } + return s + }, t.sum = function(e, t, n) { + return void 0 === n && (n = 0), t && (e = je.map(e, (function(e) { + return e[t] + }))), n + e.reduce((function(e, t) { + return e + t + }), 0) + }, t.sort = kr.makeMacro(["value", "reverse", "case_sensitive", "attribute"], [], (function(e, t, n, r) { + var i = this, + s = je.map(e, (function(e) { + return e + })), + a = je.getAttrGetter(r); + return s.sort((function(e, s) { + var o = r ? a(e) : e, + c = r ? a(s) : s; + if (i.env.opts.throwOnUndefined && r && (void 0 === o || void 0 === c)) throw new TypeError('sort: attribute "' + r + '" resolved to undefined'); + return !n && je.isString(o) && je.isString(c) && (o = o.toLowerCase(), c = c.toLowerCase()), o < c ? t ? 1 : -1 : o > c ? t ? -1 : 1 : 0 + })), s + })), t.string = function(e) { + return kr.copySafeness(e, e) + }, t.striptags = function(e, t) { + var r = o((e = n(e, "")).replace(/<\/?([a-z][a-z0-9]*)\b[^>]*>|/gi, "")), + i = ""; + return i = t ? r.replace(/^ +| +$/gm, "").replace(/ +/g, " ").replace(/(\r\n)/g, "\n").replace(/\n\n\n+/g, "\n\n") : r.replace(/\s+/gi, " "), kr.copySafeness(e, i) + }, t.title = function(e) { + var t = (e = n(e, "")).split(" ").map((function(e) { + return i(e) + })); + return kr.copySafeness(e, t.join(" ")) + }, t.trim = o, t.truncate = function(e, t, r, i) { + var s = e; + if (t = t || 255, (e = n(e, "")).length <= t) return e; + if (r) e = e.substring(0, t); + else { + var a = e.lastIndexOf(" ", t); - 1 === a && (a = t), e = e.substring(0, a) + } + return e += null != i ? i : "...", kr.copySafeness(s, e) + }, t.upper = function(e) { + return (e = n(e, "")).toUpperCase() + }, t.urlencode = function(e) { + var t = encodeURIComponent; + return je.isString(e) ? t(e) : (je.isArray(e) ? e : je._entries(e)).map((function(e) { + var n = e[0], + r = e[1]; + return t(n) + "=" + t(r) + })).join("&") + }; + var c = /^(?:\(|<|<)?(.*?)(?:\.|,|\)|\n|>)?$/, + l = /^[\w.!#$%&'*+\-\/=?\^`{|}~]+@[a-z\d\-]+(\.[a-z\d\-]+)+$/i, + h = /^https?:\/\/.*$/, + u = /^www\./, + p = /\.(?:org|net|com)(?:\:|\/|$)/; + t.urlize = function(e, t, n) { + r(t) && (t = 1 / 0); + var i = !0 === n ? ' rel="nofollow"' : ""; + return e.split(/(\s+)/).filter((function(e) { + return e && e.length + })).map((function(e) { + var n = e.match(c), + r = n ? n[1] : e, + s = r.substr(0, t); + return h.test(r) ? '" + s + "" : u.test(r) ? '" + s + "" : l.test(r) ? '' + r + "" : p.test(r) ? '" + s + "" : e + })).join("") + }, t.wordcount = function(e) { + var t = (e = n(e, "")) ? e.match(/\w+/g) : null; + return t ? t.length : null + }, t.float = function(e, t) { + var n = parseFloat(e); + return r(n) ? t : n + }; + var f = kr.makeMacro(["value", "default", "base"], [], (function(e, t, n) { + void 0 === n && (n = 10); + var i = parseInt(e, n); + return r(i) ? t : i + })); + t.int = f, t.d = t.default, t.e = t.escape + })), + Br = {}; + +function Fr(e, t) { + for (var n = 0, r = e.length - 1; r >= 0; r--) { + var i = e[r]; + "." === i ? e.splice(r, 1) : ".." === i ? (e.splice(r, 1), n++) : n && (e.splice(r, 1), n--) + } + if (t) + for (; n--; n) e.unshift(".."); + return e +} +var Ur = /^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/, + Hr = function(e) { + return Ur.exec(e).slice(1) + }; + +function Gr() { + for (var e = "", t = !1, n = arguments.length - 1; n >= -1 && !t; n--) { + var r = n >= 0 ? arguments[n] : "/"; + if ("string" != typeof r) throw new TypeError("Arguments to path.resolve must be strings"); + r && (e = r + "/" + e, t = "/" === r.charAt(0)) + } + return (t ? "/" : "") + (e = Fr(jr(e.split("/"), (function(e) { + return !!e + })), !t).join("/")) || "." +} + +function Yr(e) { + var t = qr(e), + n = "/" === Vr(e, -1); + return (e = Fr(jr(e.split("/"), (function(e) { + return !!e + })), !t).join("/")) || t || (e = "."), e && n && (e += "/"), (t ? "/" : "") + e +} + +function qr(e) { + return "/" === e.charAt(0) +} +var Kr = { + extname: function(e) { + return Hr(e)[3] + }, + basename: function(e, t) { + var n = Hr(e)[2]; + return t && n.substr(-1 * t.length) === t && (n = n.substr(0, n.length - t.length)), n + }, + dirname: function(e) { + var t = Hr(e), + n = t[0], + r = t[1]; + return n || r ? (r && (r = r.substr(0, r.length - 1)), n + r) : "." + }, + sep: "/", + delimiter: ":", + relative: function(e, t) { + function n(e) { + for (var t = 0; t < e.length && "" === e[t]; t++); + for (var n = e.length - 1; n >= 0 && "" === e[n]; n--); + return t > n ? [] : e.slice(t, n - t + 1) + } + e = Gr(e).substr(1), t = Gr(t).substr(1); + for (var r = n(e.split("/")), i = n(t.split("/")), s = Math.min(r.length, i.length), a = s, o = 0; o < s; o++) + if (r[o] !== i[o]) { + a = o; + break + } var c = []; + for (o = a; o < r.length; o++) c.push(".."); + return (c = c.concat(i.slice(a))).join("/") + }, + join: function() { + var e = Array.prototype.slice.call(arguments, 0); + return Yr(jr(e, (function(e, t) { + if ("string" != typeof e) throw new TypeError("Arguments to path.join must be strings"); + return e + })).join("/")) + }, + isAbsolute: qr, + normalize: Yr, + resolve: Gr +}; + +function jr(e, t) { + if (e.filter) return e.filter(t); + for (var n = [], r = 0; r < e.length; r++) t(e[r], r, e) && n.push(e[r]); + return n +} +var Vr = "b" === "ab".substr(-1) ? function(e, t, n) { + return e.substr(t, n) +} : function(e, t, n) { + return t < 0 && (t = e.length + t), e.substr(t, n) +}; + +function Wr(e, t) { + return Wr = Object.setPrototypeOf || function(e, t) { + return e.__proto__ = t, e + }, Wr(e, t) +} +var Qr = function(e) { + var t, n; + + function r() { + return e.apply(this, arguments) || this + } + n = e, (t = r).prototype = Object.create(n.prototype), t.prototype.constructor = t, Wr(t, n); + var i = r.prototype; + return i.resolve = function(e, t) { + return Kr.resolve(Kr.dirname(e), t) + }, i.isRelative = function(e) { + return 0 === e.indexOf("./") || 0 === e.indexOf("../") + }, r +}(en.EmitterObj); + +function Xr(e, t) { + return Xr = Object.setPrototypeOf || function(e, t) { + return e.__proto__ = t, e + }, Xr(e, t) +} +var $r = function(e) { + var t, n; + + function r(t) { + var n; + return (n = e.call(this) || this).precompiled = t || {}, n + } + return n = e, (t = r).prototype = Object.create(n.prototype), t.prototype.constructor = t, Xr(t, n), r.prototype.getSource = function(e) { + return this.precompiled[e] ? { + src: { + type: "code", + obj: this.precompiled[e] + }, + path: e + } : null + }, r +}(Qr); + +function zr(e, t) { + e.prototype = Object.create(t.prototype), e.prototype.constructor = e, Jr(e, t) +} + +function Jr(e, t) { + return Jr = Object.setPrototypeOf || function(e, t) { + return e.__proto__ = t, e + }, Jr(e, t) +} +var Zr = { + PrecompiledLoader: $r + }.PrecompiledLoader, + ei = function(e) { + function t(t, n) { + var r; + return n = n || {}, (r = e.call(this) || this).pathsToNames = {}, r.noCache = !!n.noCache, t ? (t = Array.isArray(t) ? t : [t], r.searchPaths = t.map(Kr.normalize)) : r.searchPaths = ["."], r + } + return zr(t, e), t.prototype.getSource = function(e) { + for (var t = null, n = this.searchPaths, r = 0; r < n.length; r++) { + var i = Kr.resolve(n[r]), + s = Kr.resolve(n[r], e); + if (0 === s.indexOf(i) && Br.existsSync(s)) { + t = s; + break + } + } + if (!t) return null; + this.pathsToNames[t] = e; + var a = { + src: Br.readFileSync(t, "utf-8"), + path: t, + noCache: this.noCache + }; + return this.emit("load", e, a), a + }, t + }(Qr), + ti = { + FileSystemLoader: ei, + PrecompiledLoader: Zr, + NodeResolveLoader: function(e) { + function t(t) { + var n; + return t = t || {}, (n = e.call(this) || this).pathsToNames = {}, n.noCache = !!t.noCache, n + } + return zr(t, e), t.prototype.getSource = function(e) { + if (/^\.?\.?(\/|\\)/.test(e)) return null; + if (/^[A-Z]:/.test(e)) return null; + var t; + try { + t = Ye.resolve(e) + } catch (e) { + return null + } + this.pathsToNames[t] = e; + var n = { + src: Br.readFileSync(t, "utf-8"), + path: t, + noCache: this.noCache + }; + return this.emit("load", e, n), n + }, t + }(Qr) + }, + ni = Ke((function(e, t) { + var n = kr.SafeString; + t.callable = function(e) { + return "function" == typeof e + }, t.defined = function(e) { + return void 0 !== e + }, t.divisibleby = function(e, t) { + return e % t == 0 + }, t.escaped = function(e) { + return e instanceof n + }, t.equalto = function(e, t) { + return e === t + }, t.eq = t.equalto, t.sameas = t.equalto, t.even = function(e) { + return e % 2 == 0 + }, t.falsy = function(e) { + return !e + }, t.ge = function(e, t) { + return e >= t + }, t.greaterthan = function(e, t) { + return e > t + }, t.gt = t.greaterthan, t.le = function(e, t) { + return e <= t + }, t.lessthan = function(e, t) { + return e < t + }, t.lt = t.lessthan, t.lower = function(e) { + return e.toLowerCase() === e + }, t.ne = function(e, t) { + return e !== t + }, t.null = function(e) { + return null === e + }, t.number = function(e) { + return "number" == typeof e + }, t.odd = function(e) { + return e % 2 == 1 + }, t.string = function(e) { + return "string" == typeof e + }, t.truthy = function(e) { + return !!e + }, t.undefined = function(e) { + return void 0 === e + }, t.upper = function(e) { + return e.toUpperCase() === e + }, t.iterable = function(e) { + return "undefined" != typeof Symbol ? !!e[Symbol.iterator] : Array.isArray(e) || "string" == typeof e + }, t.mapping = function(e) { + var t = null != e && "object" == typeof e && !Array.isArray(e); + return Set ? t && !(e instanceof Set) : t + } + })); + +function ri(e) { + var t = -1; + return { + current: null, + reset: function() { + t = -1, this.current = null + }, + next: function() { + return ++t >= e.length && (t = 0), this.current = e[t], this.current + } + } +} +ni.callable, ni.defined, ni.divisibleby, ni.escaped, ni.equalto, ni.eq, ni.sameas, ni.even, ni.falsy, ni.ge, ni.greaterthan, ni.gt, ni.le, ni.lessthan, ni.lt, ni.lower, ni.ne, ni.number, ni.odd, ni.string, ni.truthy, ni.undefined, ni.upper, ni.iterable, ni.mapping; +var ii = function() { + return { + range: function(e, t, n) { + void 0 === t ? (t = e, e = 0, n = 1) : n || (n = 1); + var r = []; + if (n > 0) + for (var i = e; i < t; i += n) r.push(i); + else + for (var s = e; s > t; s += n) r.push(s); + return r + }, + cycler: function() { + return ri(Array.prototype.slice.call(arguments)) + }, + joiner: function(e) { + return function(e) { + e = e || ","; + var t = !0; + return function() { + var n = t ? "" : e; + return t = !1, n + } + }(e) + } + } +}; + +function si(e, t) { + e.prototype = Object.create(t.prototype), e.prototype.constructor = e, ai(e, t) +} + +function ai(e, t) { + return ai = Object.setPrototypeOf || function(e, t) { + return e.__proto__ = t, e + }, ai(e, t) +} +var oi = ti.FileSystemLoader, + ci = ti.WebLoader, + li = ti.PrecompiledLoader, + hi = en.Obj, + ui = en.EmitterObj, + pi = kr.handleError, + fi = kr.Frame; + +function di(e, t, n) { + Gt((function() { + e(t, n) + })) +} +var Ei = { + type: "code", + obj: { + root: function(e, t, n, r, i) { + try { + i(null, "") + } catch (e) { + i(pi(e, null, null)) + } + } + } + }, + mi = function(e) { + function t() { + return e.apply(this, arguments) || this + } + si(t, e); + var n = t.prototype; + return n.init = function(e, t) { + var n = this; + t = this.opts = t || {}, this.opts.dev = !!t.dev, this.opts.autoescape = null == t.autoescape || t.autoescape, this.opts.throwOnUndefined = !!t.throwOnUndefined, this.opts.trimBlocks = !!t.trimBlocks, this.opts.lstripBlocks = !!t.lstripBlocks, this.loaders = [], e ? this.loaders = je.isArray(e) ? e : [e] : oi ? this.loaders = [new oi("views")] : ci && (this.loaders = [new ci("/views")]), "undefined" != typeof window && window.jinja2Precompiled && this.loaders.unshift(new li(window.jinja2Precompiled)), this._initLoaders(), this.globals = ii(), this.filters = {}, this.tests = {}, this.asyncFilters = [], this.extensions = {}, this.extensionsList = [], je._entries(wr).forEach((function(e) { + var t = e[0], + r = e[1]; + return n.addFilter(t, r) + })), je._entries(ni).forEach((function(e) { + var t = e[0], + r = e[1]; + return n.addTest(t, r) + })) + }, n._initLoaders = function() { + var e = this; + this.loaders.forEach((function(t) { + t.cache = {}, "function" == typeof t.on && (t.on("update", (function(n, r) { + t.cache[n] = null, e.emit("update", n, r, t) + })), t.on("load", (function(n, r) { + e.emit("load", n, r, t) + }))) + })) + }, n.invalidateCache = function() { + this.loaders.forEach((function(e) { + e.cache = {} + })) + }, n.addExtension = function(e, t) { + return t.__name = e, this.extensions[e] = t, this.extensionsList.push(t), this + }, n.removeExtension = function(e) { + var t = this.getExtension(e); + t && (this.extensionsList = je.without(this.extensionsList, t), delete this.extensions[e]) + }, n.getExtension = function(e) { + return this.extensions[e] + }, n.hasExtension = function(e) { + return !!this.extensions[e] + }, n.addGlobal = function(e, t) { + return this.globals[e] = t, this + }, n.getGlobal = function(e) { + if (void 0 === this.globals[e]) throw new Error("global not found: " + e); + return this.globals[e] + }, n.addFilter = function(e, t, n) { + var r = t; + return n && this.asyncFilters.push(e), this.filters[e] = r, this + }, n.getFilter = function(e) { + if (!this.filters[e]) throw new Error("filter not found: " + e); + return this.filters[e] + }, n.addTest = function(e, t) { + return this.tests[e] = t, this + }, n.getTest = function(e) { + if (!this.tests[e]) throw new Error("test not found: " + e); + return this.tests[e] + }, n.resolveTemplate = function(e, t, n) { + return !(!e.isRelative || !t) && e.isRelative(n) && e.resolve ? e.resolve(t, n) : n + }, n.getTemplate = function(e, t, n, r, i) { + var s, a = this, + o = this, + c = null; + if (e && e.raw && (e = e.raw), je.isFunction(n) && (i = n, n = null, t = t || !1), je.isFunction(t) && (i = t, t = !1), e instanceof _i) c = e; + else { + if ("string" != typeof e) throw new Error("template names must be a string: " + e); + for (var l = 0; l < this.loaders.length; l++) { + var h = this.loaders[l]; + if (c = h.cache[this.resolveTemplate(h, n, e)]) break + } + } + if (c) return t && c.compile(), i ? void i(null, c) : c; + return je.asyncIter(this.loaders, (function(t, r, i, s) { + function a(e, n) { + e ? s(e) : n ? (n.loader = t, s(null, n)) : i() + } + e = o.resolveTemplate(t, n, e), t.async ? t.getSource(e, a) : a(null, t.getSource(e)) + }), (function(n, o) { + if (o || n || r || (n = new Error("template not found: " + e)), n) { + if (i) return void i(n); + throw n + } + var c; + o ? (c = new _i(o.src, a, o.path, t), o.noCache || (o.loader.cache[e] = c)) : c = new _i(Ei, a, "", t), i ? i(null, c) : s = c + })), s + }, n.express = function(e) { + return function(e, t) { + function n(e, t) { + if (this.name = e, this.path = e, this.defaultEngine = t.defaultEngine, this.ext = Kr.extname(e), !this.ext && !this.defaultEngine) throw new Error("No default engine was specified and no extension was provided."); + this.ext || (this.name += this.ext = ("." !== this.defaultEngine[0] ? "." : "") + this.defaultEngine) + } + return n.prototype.render = function(t, n) { + e.render(this.name, t, n) + }, t.set("view", n), t.set("jinja2Env", e), e + }(this, e) + }, n.render = function(e, t, n) { + je.isFunction(t) && (n = t, t = null); + var r = null; + return this.getTemplate(e, (function(e, i) { + if (e && n) di(n, e); + else { + if (e) throw e; + r = i.render(t, n) + } + })), r + }, n.renderString = function(e, t, n, r) { + return je.isFunction(n) && (r = n, n = {}), new _i(e, this, (n = n || {}).path).render(t, r) + }, n.waterfall = function(e, t, n) { + return qt(e, t, n) + }, t + }(ui), + Ti = function(e) { + function t() { + return e.apply(this, arguments) || this + } + si(t, e); + var n = t.prototype; + return n.init = function(e, t, n) { + var r = this; + this.env = n || new mi, this.ctx = je.extend({}, e), this.blocks = {}, this.exported = [], je.keys(t).forEach((function(e) { + r.addBlock(e, t[e]) + })) + }, n.lookup = function(e) { + return e in this.env.globals && !(e in this.ctx) ? this.env.globals[e] : this.ctx[e] + }, n.setVariable = function(e, t) { + this.ctx[e] = t + }, n.getVariables = function() { + return this.ctx + }, n.addBlock = function(e, t) { + return this.blocks[e] = this.blocks[e] || [], this.blocks[e].push(t), this + }, n.getBlock = function(e) { + if (!this.blocks[e]) throw new Error('unknown block "' + e + '"'); + return this.blocks[e][0] + }, n.getSuper = function(e, t, n, r, i, s) { + var a = je.indexOf(this.blocks[t] || [], n), + o = this.blocks[t][a + 1]; + if (-1 === a || !o) throw new Error('no super block available for "' + t + '"'); + o(e, this, r, i, s) + }, n.addExport = function(e) { + this.exported.push(e) + }, n.getExported = function() { + var e = this, + t = {}; + return this.exported.forEach((function(n) { + t[n] = e.ctx[n] + })), t + }, t + }(hi), + _i = function(e) { + function t() { + return e.apply(this, arguments) || this + } + si(t, e); + var n = t.prototype; + return n.init = function(e, t, n, r) { + if (this.env = t || new mi, je.isObject(e)) switch (e.type) { + case "code": + this.tmplProps = e.obj; + break; + case "string": + this.tmplStr = e.obj; + break; + default: + throw new Error("Unexpected template object type " + e.type + "; expected 'code', or 'string'") + } else { + if (!je.isString(e)) throw new Error("src must be a string or an object describing the source"); + this.tmplStr = e + } + if (this.path = n, r) try { + this._compile() + } catch (e) { + throw je._prettifyError(this.path, this.env.opts.dev, e) + } else this.compiled = !1 + }, n.render = function(e, t, n) { + var r = this; + "function" == typeof e ? (n = e, e = {}) : "function" == typeof t && (n = t, t = null); + var i = !t; + try { + this.compile() + } catch (e) { + var s = je._prettifyError(this.path, this.env.opts.dev, e); + if (n) return di(n, s); + throw s + } + var a = new Ti(e || {}, this.blocks, this.env), + o = t ? t.push(!0) : new fi; + o.topLevel = !0; + var c = null, + l = !1; + return this.rootRenderFunc(this.env, a, o, kr, (function(e, t) { + if (!l || !n || void 0 === t) + if (e && (e = je._prettifyError(r.path, r.env.opts.dev, e), l = !0), n) i ? di(n, e, t) : n(e, t); + else { + if (e) throw e; + c = t + } + })), c + }, n.getExported = function(e, t, n) { + "function" == typeof e && (n = e, e = {}), "function" == typeof t && (n = t, t = null); + try { + this.compile() + } catch (e) { + if (n) return n(e); + throw e + } + var r = t ? t.push() : new fi; + r.topLevel = !0; + var i = new Ti(e || {}, this.blocks, this.env); + this.rootRenderFunc(this.env, i, r, kr, (function(e) { + e ? n(e, null) : n(null, i.getExported()) + })) + }, n.compile = function() { + this.compiled || this._compile() + }, n._compile = function() { + var e; + if (this.tmplProps) e = this.tmplProps; + else { + var t = xr.compile(this.tmplStr, this.env.asyncFilters, this.env.extensionsList, this.path, this.env.opts); + e = new Function(t)() + } + this.blocks = this._getBlocks(e), this.rootRenderFunc = e.root, this.compiled = !0 + }, n._getBlocks = function(e) { + var t = {}; + return je.keys(e).forEach((function(n) { + "b_" === n.slice(0, 2) && (t[n.slice(2)] = e[n]) + })), t + }, t + }(hi), + Ai = { + Environment: mi, + Template: _i + }; +je._prettifyError; +var gi, Ni = Ai.Environment; + +function Ci(e, t) { + var n; + return t = t || {}, je.isObject(e) && (t = e, e = null), ti.FileSystemLoader ? n = new ti.FileSystemLoader(e, { + watch: t.watch, + noCache: t.noCache + }) : ti.WebLoader && (n = new ti.WebLoader(e, { + useCache: t.web && t.web.useCache, + async: t.web && t.web.async + })), gi = new Ni(n, t), t && t.express && gi.express(t.express), gi +} +ti.FileSystemLoader, ti.NodeResolveLoader, ti.PrecompiledLoader, ti.WebLoader; +var Ii = function(e, t, n) { + return gi || Ci(), gi.renderString(e, t, n) + }, + Si = function() { + return Si = Object.assign || function(e) { + for (var t, n = 1, r = arguments.length; n < r; n++) + for (var i in t = arguments[n]) Object.prototype.hasOwnProperty.call(t, i) && (e[i] = t[i]); + return e + }, Si.apply(this, arguments) + }; + +function bi(e, t, n) { + return e ? e(null != t ? t : e._root.children, null, void 0, n).toString() : "" +} + +function Oi(e, t) { + return bi(this, function(e, t) { + return !t && "object" == typeof e && null != e && !("length" in e) && !("type" in e) + }(e) ? void(t = e) : e, Si(Si(Si({}, n), null == this ? void 0 : this._options), i(null != t ? t : {}))) +} + +function yi(e) { + return bi(this, e, Si(Si({}, this._options), { + xmlMode: !0 + })) +} + +function Li(e) { + for (var t = e || (this ? this.root() : []), n = "", r = 0; r < t.length; r++) n += z(t[r]); + return n +} + +function ki(e, t, r) { + if (void 0 === r && (r = "boolean" == typeof t && t), !e || "string" != typeof e) return null; + "boolean" == typeof t && (r = t); + var i = this.load(e, n, !1); + return r || i("script").remove(), i.root()[0].children.slice() +} + +function vi() { + return this(this._root) +} + +function Di(e, t) { + if (t === e) return !1; + for (var n = t; n && n !== n.parent;) + if ((n = n.parent) === e) return !0; + return !1 +} + +function Ri(e, t) { + if (Mi(e) && Mi(t)) { + for (var n = e.length, r = +t.length, i = 0; i < r; i++) e[n++] = t[i]; + return e.length = n, e + } +} + +function Mi(e) { + if (Array.isArray(e)) return !0; + if ("object" != typeof e || !Object.prototype.hasOwnProperty.call(e, "length") || "number" != typeof e.length || e.length < 0) return !1; + for (var t = 0; t < e.length; t++) + if (!(t in e)) return !1; + return !0 +} +var Pi, xi = Object.freeze({ + __proto__: null, + html: Oi, + xml: yi, + text: Li, + parseHTML: ki, + root: vi, + contains: Di, + merge: Ri, + jp: function(e, t) { + return He({ + path: e, + json: t + }) + }, + jpo: function(e) { + return He(e) + }, + jinja2: function(e, t) { + return Ii(e, t) + } +}); + +function wi(e) { + return null != e.cheerio +} + +function Bi(e, t) { + for (var n = e.length, r = 0; r < n; r++) t(e[r], r); + return e +} + +function Fi(e) { + var t = "length" in e ? Array.prototype.map.call(e, (function(e) { + return v(e, !0) + })) : [v(e, !0)], + n = new N(t); + return t.forEach((function(e) { + e.parent = n + })), t +} + +function Ui(e) { + var t = e.indexOf("<"); + if (t < 0 || t > e.length - 3) return !1; + var n = e.charCodeAt(t + 1); + return (n >= Pi.LowerA && n <= Pi.LowerZ || n >= Pi.UpperA && n <= Pi.UpperZ || n === Pi.Exclamation) && e.includes(">", t + 2) +}! function(e) { + e[e.LowerA = 97] = "LowerA", e[e.LowerZ = 122] = "LowerZ", e[e.UpperA = 65] = "UpperA", e[e.UpperZ = 90] = "UpperZ", e[e.Exclamation = 33] = "Exclamation" +}(Pi || (Pi = {})); +var Hi = Object.prototype.hasOwnProperty, + Gi = /\s+/, + Yi = { + null: null, + true: !0, + false: !1 + }, + qi = /^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i, + Ki = /^{[^]*}$|^\[[^]*]$/; + +function ji(e, t, n) { + var r; + if (e && I(e)) return null !== (r = e.attribs) && void 0 !== r || (e.attribs = {}), t ? Hi.call(e.attribs, t) ? !n && qi.test(t) ? t : e.attribs[t] : "option" === e.name && "value" === t ? Li(e.children) : "input" !== e.name || "radio" !== e.attribs.type && "checkbox" !== e.attribs.type || "value" !== t ? void 0 : "on" : e.attribs +} + +function Vi(e, t, n) { + null === n ? zi(e, t) : e.attribs[t] = "".concat(n) +} + +function Wi(e, t, n) { + return t in e ? e[t] : !n && qi.test(t) ? void 0 !== ji(e, t, !1) : ji(e, t, n) +} + +function Qi(e, t, n, r) { + t in e ? e[t] = n : Vi(e, t, !r && qi.test(t) ? n ? "" : null : "".concat(n)) +} + +function Xi(e, t, n) { + var r, i = e; + null !== (r = i.data) && void 0 !== r || (i.data = {}), "object" == typeof t ? Object.assign(i.data, t) : "string" == typeof t && void 0 !== n && (i.data[t] = n) +} + +function $i(e, t) { + var n, r, i, s; + null == t ? r = (n = Object.keys(e.attribs).filter((function(e) { + return e.startsWith("data-") + }))).map((function(e) { + return e.slice("data-".length).replace(/[_.-](\w|$)/g, (function(e, t) { + return t.toUpperCase() + })) + })) : (n = ["data-" + (s = t, s.replace(/[A-Z]/g, "-$&").toLowerCase())], r = [t]); + for (var a = 0; a < n.length; ++a) { + var o = n[a], + c = r[a]; + if (Hi.call(e.attribs, o) && !Hi.call(e.data, c)) { + if (i = e.attribs[o], Hi.call(Yi, i)) i = Yi[i]; + else if (i === String(Number(i))) i = Number(i); + else if (Ki.test(i)) try { + i = JSON.parse(i) + } catch (e) {} + e.data[c] = i + } + } + return null == t ? e.data : i +} + +function zi(e, t) { + e.attribs && Hi.call(e.attribs, t) && delete e.attribs[t] +} + +function Ji(e) { + return e ? e.trim().split(Gi) : [] +} +var Zi, es, ts = Object.freeze({ + __proto__: null, + attr: function(e, t) { + if ("object" == typeof e || void 0 !== t) { + if ("function" == typeof t) { + if ("string" != typeof e) throw new Error("Bad combination of arguments."); + return Bi(this, (function(n, r) { + I(n) && Vi(n, e, t.call(n, r, n.attribs[e])) + })) + } + return Bi(this, (function(n) { + I(n) && ("object" == typeof e ? Object.keys(e).forEach((function(t) { + var r = e[t]; + Vi(n, t, r) + })) : Vi(n, e, t)) + })) + } + return arguments.length > 1 ? this : ji(this[0], e, this.options.xmlMode) + }, + prop: function(e, t) { + var n, r = this; + if ("string" == typeof e && void 0 === t) { + var i = this[0]; + if (!i || !I(i)) return; + switch (e) { + case "style": + var s = this.css(), + a = Object.keys(s); + return a.forEach((function(e, t) { + s[t] = e + })), s.length = a.length, s; + case "tagName": + case "nodeName": + return i.name.toUpperCase(); + case "href": + case "src": + var o = null === (n = i.attribs) || void 0 === n ? void 0 : n[e]; + return "undefined" == typeof URL || ("href" !== e || "a" !== i.tagName && "link" !== i.name) && ("src" !== e || "img" !== i.tagName && "iframe" !== i.tagName && "audio" !== i.tagName && "video" !== i.tagName && "source" !== i.tagName) || void 0 === o || !this.options.baseURI ? o : new URL(o, this.options.baseURI).href; + case "innerText": + return J(i); + case "textContent": + return z(i); + case "outerHTML": + return this.clone().wrap("").parent().html(); + case "innerHTML": + return this.html(); + default: + return Wi(i, e, this.options.xmlMode) + } + } + if ("object" == typeof e || void 0 !== t) { + if ("function" == typeof t) { + if ("object" == typeof e) throw new Error("Bad combination of arguments."); + return Bi(this, (function(n, i) { + I(n) && Qi(n, e, t.call(n, i, Wi(n, e, r.options.xmlMode)), r.options.xmlMode) + })) + } + return Bi(this, (function(n) { + I(n) && ("object" == typeof e ? Object.keys(e).forEach((function(t) { + var i = e[t]; + Qi(n, t, i, r.options.xmlMode) + })) : Qi(n, e, t, r.options.xmlMode)) + })) + } + }, + data: function(e, t) { + var n, r = this[0]; + if (r && I(r)) { + var i = r; + return null !== (n = i.data) && void 0 !== n || (i.data = {}), e ? "object" == typeof e || void 0 !== t ? (Bi(this, (function(n) { + I(n) && ("object" == typeof e ? Xi(n, e) : Xi(n, e, t)) + })), this) : Hi.call(i.data, e) ? i.data[e] : $i(i, e) : $i(i) + } + }, + val: function(e) { + var t = 0 === arguments.length, + n = this[0]; + if (!n || !I(n)) return t ? void 0 : this; + switch (n.name) { + case "textarea": + return this.text(e); + case "select": + var r = this.find("option:selected"); + if (!t) { + if (null == this.attr("multiple") && "object" == typeof e) return this; + this.find("option").removeAttr("selected"); + for (var i = "object" != typeof e ? [e] : e, s = 0; s < i.length; s++) this.find('option[value="'.concat(i[s], '"]')).attr("selected", ""); + return this + } + return this.attr("multiple") ? r.toArray().map((function(e) { + return Li(e.children) + })) : r.attr("value"); + case "input": + case "option": + return t ? this.attr("value") : this.attr("value", e) + } + }, + removeAttr: function(e) { + for (var t = Ji(e), n = function(e) { + Bi(r, (function(n) { + I(n) && zi(n, t[e]) + })) + }, r = this, i = 0; i < t.length; i++) n(i); + return this + }, + hasClass: function(e) { + return this.toArray().some((function(t) { + var n = I(t) && t.attribs.class, + r = -1; + if (n && e.length) + for (; + (r = n.indexOf(e, r + 1)) > -1;) { + var i = r + e.length; + if ((0 === r || Gi.test(n[r - 1])) && (i === n.length || Gi.test(n[i]))) return !0 + } + return !1 + })) + }, + addClass: function e(t) { + if ("function" == typeof t) return Bi(this, (function(n, r) { + if (I(n)) { + var i = n.attribs.class || ""; + e.call([n], t.call(n, r, i)) + } + })); + if (!t || "string" != typeof t) return this; + for (var n = t.split(Gi), r = this.length, i = 0; i < r; i++) { + var s = this[i]; + if (I(s)) { + var a = ji(s, "class", !1); + if (a) { + for (var o = " ".concat(a, " "), c = 0; c < n.length; c++) { + var l = "".concat(n[c], " "); + o.includes(" ".concat(l)) || (o += l) + } + Vi(s, "class", o.trim()) + } else Vi(s, "class", n.join(" ").trim()) + } + } + return this + }, + removeClass: function e(t) { + if ("function" == typeof t) return Bi(this, (function(n, r) { + I(n) && e.call([n], t.call(n, r, n.attribs.class || "")) + })); + var n = Ji(t), + r = n.length, + i = 0 === arguments.length; + return Bi(this, (function(e) { + if (I(e)) + if (i) e.attribs.class = ""; + else { + for (var t = Ji(e.attribs.class), s = !1, a = 0; a < r; a++) { + var o = t.indexOf(n[a]); + o >= 0 && (t.splice(o, 1), s = !0, a--) + } + s && (e.attribs.class = t.join(" ")) + } + })) + }, + toggleClass: function e(t, n) { + if ("function" == typeof t) return Bi(this, (function(r, i) { + I(r) && e.call([r], t.call(r, i, r.attribs.class || "", n), n) + })); + if (!t || "string" != typeof t) return this; + for (var r = t.split(Gi), i = r.length, s = "boolean" == typeof n ? n ? 1 : -1 : 0, a = this.length, o = 0; o < a; o++) { + var c = this[o]; + if (I(c)) { + for (var l = Ji(c.attribs.class), h = 0; h < i; h++) { + var u = l.indexOf(r[h]); + s >= 0 && u < 0 ? l.push(r[h]) : s <= 0 && u >= 0 && l.splice(u, 1) + } + c.attribs.class = l.join(" ") + } + } + return this + } +}); +! function(e) { + e.Attribute = "attribute", e.Pseudo = "pseudo", e.PseudoElement = "pseudo-element", e.Tag = "tag", e.Universal = "universal", e.Adjacent = "adjacent", e.Child = "child", e.Descendant = "descendant", e.Parent = "parent", e.Sibling = "sibling", e.ColumnCombinator = "column-combinator" +}(Zi || (Zi = {})), +function(e) { + e.Any = "any", e.Element = "element", e.End = "end", e.Equals = "equals", e.Exists = "exists", e.Hyphen = "hyphen", e.Not = "not", e.Start = "start" +}(es || (es = {})); +const ns = /^[^\\#]?(?:\\(?:[\da-f]{1,6}\s?|.)|[\w\-\u00b0-\uFFFF])+/, + rs = /\\([\da-f]{1,6}\s?|(\s)|.)/gi, + is = new Map([ + [126, es.Element], + [94, es.Start], + [36, es.End], + [42, es.Any], + [33, es.Not], + [124, es.Hyphen] + ]), + ss = new Set(["has", "not", "matches", "is", "where", "host", "host-context"]); + +function as(e) { + switch (e.type) { + case Zi.Adjacent: + case Zi.Child: + case Zi.Descendant: + case Zi.Parent: + case Zi.Sibling: + case Zi.ColumnCombinator: + return !0; + default: + return !1 + } +} +const os = new Set(["contains", "icontains"]); + +function cs(e, t, n) { + const r = parseInt(t, 16) - 65536; + return r != r || n ? t : r < 0 ? String.fromCharCode(r + 65536) : String.fromCharCode(r >> 10 | 55296, 1023 & r | 56320) +} + +function ls(e) { + return e.replace(rs, cs) +} + +function hs(e) { + return 39 === e || 34 === e +} + +function us(e) { + return 32 === e || 9 === e || 10 === e || 12 === e || 13 === e +} + +function ps(e) { + const t = [], + n = fs(t, `${e}`, 0); + if (n < e.length) throw new Error(`Unmatched selector: ${e.slice(n)}`); + return t +} + +function fs(e, t, n) { + let r = []; + + function i(e) { + const r = t.slice(n + e).match(ns); + if (!r) throw new Error(`Expected name, found ${t.slice(n)}`); + const [i] = r; + return n += e + i.length, ls(i) + } + + function s(e) { + for (n += e; n < t.length && us(t.charCodeAt(n));) n++ + } + + function a() { + const e = n += 1; + let r = 1; + for (; r > 0 && n < t.length; n++) 40 !== t.charCodeAt(n) || o(n) ? 41 !== t.charCodeAt(n) || o(n) || r-- : r++; + if (r) throw new Error("Parenthesis not matched"); + return ls(t.slice(e, n - 1)) + } + + function o(e) { + let n = 0; + for (; 92 === t.charCodeAt(--e);) n++; + return 1 == (1 & n) + } + + function c() { + if (r.length > 0 && as(r[r.length - 1])) throw new Error("Did not expect successive traversals.") + } + + function l(e) { + r.length > 0 && r[r.length - 1].type === Zi.Descendant ? r[r.length - 1].type = e : (c(), r.push({ + type: e + })) + } + + function h(e, t) { + r.push({ + type: Zi.Attribute, + name: e, + action: t, + value: i(1), + namespace: null, + ignoreCase: "quirks" + }) + } + + function u() { + if (r.length && r[r.length - 1].type === Zi.Descendant && r.pop(), 0 === r.length) throw new Error("Empty sub-selector"); + e.push(r) + } + if (s(0), t.length === n) return n; + e: for (; n < t.length;) { + const e = t.charCodeAt(n); + switch (e) { + case 32: + case 9: + case 10: + case 12: + case 13: + 0 !== r.length && r[0].type === Zi.Descendant || (c(), r.push({ + type: Zi.Descendant + })), s(1); + break; + case 62: + l(Zi.Child), s(1); + break; + case 60: + l(Zi.Parent), s(1); + break; + case 126: + l(Zi.Sibling), s(1); + break; + case 43: + l(Zi.Adjacent), s(1); + break; + case 46: + h("class", es.Element); + break; + case 35: + h("id", es.Equals); + break; + case 91: { + let e; + s(1); + let a = null; + 124 === t.charCodeAt(n) ? e = i(1) : t.startsWith("*|", n) ? (a = "*", e = i(2)) : (e = i(0), 124 === t.charCodeAt(n) && 61 !== t.charCodeAt(n + 1) && (a = e, e = i(1))), s(0); + let c = es.Exists; + const l = is.get(t.charCodeAt(n)); + if (l) { + if (c = l, 61 !== t.charCodeAt(n + 1)) throw new Error("Expected `=`"); + s(2) + } else 61 === t.charCodeAt(n) && (c = es.Equals, s(1)); + let h = "", + u = null; + if ("exists" !== c) { + if (hs(t.charCodeAt(n))) { + const e = t.charCodeAt(n); + let r = n + 1; + for (; r < t.length && (t.charCodeAt(r) !== e || o(r));) r += 1; + if (t.charCodeAt(r) !== e) throw new Error("Attribute value didn't end"); + h = ls(t.slice(n + 1, r)), n = r + 1 + } else { + const e = n; + for (; n < t.length && (!us(t.charCodeAt(n)) && 93 !== t.charCodeAt(n) || o(n));) n += 1; + h = ls(t.slice(e, n)) + } + s(0); + const e = 32 | t.charCodeAt(n); + 115 === e ? (u = !1, s(1)) : 105 === e && (u = !0, s(1)) + } + if (93 !== t.charCodeAt(n)) throw new Error("Attribute selector didn't terminate"); + n += 1; + const p = { + type: Zi.Attribute, + name: e, + action: c, + value: h, + namespace: a, + ignoreCase: u + }; + r.push(p); + break + } + case 58: { + if (58 === t.charCodeAt(n + 1)) { + r.push({ + type: Zi.PseudoElement, + name: i(2).toLowerCase(), + data: 40 === t.charCodeAt(n) ? a() : null + }); + continue + } + const e = i(1).toLowerCase(); + let s = null; + if (40 === t.charCodeAt(n)) + if (ss.has(e)) { + if (hs(t.charCodeAt(n + 1))) throw new Error(`Pseudo-selector ${e} cannot be quoted`); + if (s = [], n = fs(s, t, n + 1), 41 !== t.charCodeAt(n)) throw new Error(`Missing closing parenthesis in :${e} (${t})`); + n += 1 + } else { + if (s = a(), os.has(e)) { + const e = s.charCodeAt(0); + e === s.charCodeAt(s.length - 1) && hs(e) && (s = s.slice(1, -1)) + } + s = ls(s) + } r.push({ + type: Zi.Pseudo, + name: e, + data: s + }); + break + } + case 44: + u(), r = [], s(1); + break; + default: { + if (t.startsWith("/*", n)) { + const e = t.indexOf("*/", n + 2); + if (e < 0) throw new Error("Comment was not terminated"); + n = e + 2, 0 === r.length && s(0); + break + } + let a, o = null; + if (42 === e) n += 1, a = "*"; + else if (124 === e) { + if (a = "", 124 === t.charCodeAt(n + 1)) { + l(Zi.ColumnCombinator), s(2); + break + } + } else { + if (!ns.test(t.slice(n))) break e; + a = i(0) + } + 124 === t.charCodeAt(n) && 124 !== t.charCodeAt(n + 1) && (o = a, 42 === t.charCodeAt(n + 1) ? (a = "*", n += 2) : a = i(1)), r.push("*" === a ? { + type: Zi.Universal, + namespace: o + } : { + type: Zi.Tag, + name: a, + namespace: o + }) + } + } + } + return u(), n +} +var ds = { + trueFunc: function() { + return !0 + }, + falseFunc: function() { + return !1 + } + }, + Es = ds.trueFunc; +const ms = new Map([ + [Zi.Universal, 50], + [Zi.Tag, 30], + [Zi.Attribute, 1], + [Zi.Pseudo, 0] +]); + +function Ts(e) { + return !ms.has(e.type) +} +const _s = new Map([ + [es.Exists, 10], + [es.Equals, 8], + [es.Not, 7], + [es.Start, 6], + [es.End, 6], + [es.Any, 5] +]); + +function As(e) { + const t = e.map(gs); + for (let n = 1; n < e.length; n++) { + const r = t[n]; + if (!(r < 0)) + for (let i = n - 1; i >= 0 && r < t[i]; i--) { + const n = e[i + 1]; + e[i + 1] = e[i], e[i] = n, t[i + 1] = t[i], t[i] = r + } + } +} + +function gs(e) { + var t, n; + let r = null !== (t = ms.get(e.type)) && void 0 !== t ? t : -1; + return e.type === Zi.Attribute ? (r = null !== (n = _s.get(e.action)) && void 0 !== n ? n : 4, e.action === es.Equals && "id" === e.name && (r = 9), e.ignoreCase && (r >>= 1)) : e.type === Zi.Pseudo && (e.data ? "has" === e.name || "contains" === e.name ? r = 0 : Array.isArray(e.data) ? (r = Math.min(...e.data.map((e => Math.min(...e.map(gs))))), r < 0 && (r = 0)) : r = 2 : r = 3), r +} +const Ns = /[-[\]{}()*+?.,\\^$|#\s]/g; + +function Cs(e) { + return e.replace(Ns, "\\$&") +} +const Is = new Set(["accept", "accept-charset", "align", "alink", "axis", "bgcolor", "charset", "checked", "clear", "codetype", "color", "compact", "declare", "defer", "dir", "direction", "disabled", "enctype", "face", "frame", "hreflang", "http-equiv", "lang", "language", "link", "media", "method", "multiple", "nohref", "noresize", "noshade", "nowrap", "readonly", "rel", "rev", "rules", "scope", "scrolling", "selected", "shape", "target", "text", "type", "valign", "valuetype", "vlink"]); + +function Ss(e, t) { + return "boolean" == typeof e.ignoreCase ? e.ignoreCase : "quirks" === e.ignoreCase ? !!t.quirksMode : !t.xmlMode && Is.has(e.name) +} +const bs = { + equals(e, t, n) { + const { + adapter: r + } = n, { + name: i + } = t; + let { + value: s + } = t; + return Ss(t, n) ? (s = s.toLowerCase(), t => { + const n = r.getAttributeValue(t, i); + return null != n && n.length === s.length && n.toLowerCase() === s && e(t) + }) : t => r.getAttributeValue(t, i) === s && e(t) + }, + hyphen(e, t, n) { + const { + adapter: r + } = n, { + name: i + } = t; + let { + value: s + } = t; + const a = s.length; + return Ss(t, n) ? (s = s.toLowerCase(), function(t) { + const n = r.getAttributeValue(t, i); + return null != n && (n.length === a || "-" === n.charAt(a)) && n.substr(0, a).toLowerCase() === s && e(t) + }) : function(t) { + const n = r.getAttributeValue(t, i); + return null != n && (n.length === a || "-" === n.charAt(a)) && n.substr(0, a) === s && e(t) + } + }, + element(e, t, n) { + const { + adapter: r + } = n, { + name: i, + value: s + } = t; + if (/\s/.test(s)) return ds.falseFunc; + const a = new RegExp(`(?:^|\\s)${Cs(s)}(?:$|\\s)`, Ss(t, n) ? "i" : ""); + return function(t) { + const n = r.getAttributeValue(t, i); + return null != n && n.length >= s.length && a.test(n) && e(t) + } + }, + exists: (e, { + name: t + }, { + adapter: n + }) => r => n.hasAttrib(r, t) && e(r), + start(e, t, n) { + const { + adapter: r + } = n, { + name: i + } = t; + let { + value: s + } = t; + const a = s.length; + return 0 === a ? ds.falseFunc : Ss(t, n) ? (s = s.toLowerCase(), t => { + const n = r.getAttributeValue(t, i); + return null != n && n.length >= a && n.substr(0, a).toLowerCase() === s && e(t) + }) : t => { + var n; + return !!(null === (n = r.getAttributeValue(t, i)) || void 0 === n ? void 0 : n.startsWith(s)) && e(t) + } + }, + end(e, t, n) { + const { + adapter: r + } = n, { + name: i + } = t; + let { + value: s + } = t; + const a = -s.length; + return 0 === a ? ds.falseFunc : Ss(t, n) ? (s = s.toLowerCase(), t => { + var n; + return (null === (n = r.getAttributeValue(t, i)) || void 0 === n ? void 0 : n.substr(a).toLowerCase()) === s && e(t) + }) : t => { + var n; + return !!(null === (n = r.getAttributeValue(t, i)) || void 0 === n ? void 0 : n.endsWith(s)) && e(t) + } + }, + any(e, t, n) { + const { + adapter: r + } = n, { + name: i, + value: s + } = t; + if ("" === s) return ds.falseFunc; + if (Ss(t, n)) { + const t = new RegExp(Cs(s), "i"); + return function(n) { + const a = r.getAttributeValue(n, i); + return null != a && a.length >= s.length && t.test(a) && e(n) + } + } + return t => { + var n; + return !!(null === (n = r.getAttributeValue(t, i)) || void 0 === n ? void 0 : n.includes(s)) && e(t) + } + }, + not(e, t, n) { + const { + adapter: r + } = n, { + name: i + } = t; + let { + value: s + } = t; + return "" === s ? t => !!r.getAttributeValue(t, i) && e(t) : Ss(t, n) ? (s = s.toLowerCase(), t => { + const n = r.getAttributeValue(t, i); + return (null == n || n.length !== s.length || n.toLowerCase() !== s) && e(t) + }) : t => r.getAttributeValue(t, i) !== s && e(t) + } +}; +var Os = Ke((function(e, t) { + Object.defineProperty(t, "__esModule", { + value: !0 + }), t.parse = void 0; + var n = new Set([9, 10, 12, 13, 32]), + r = "0".charCodeAt(0), + i = "9".charCodeAt(0); + t.parse = function(e) { + if ("even" === (e = e.trim().toLowerCase())) return [2, 0]; + if ("odd" === e) return [2, 1]; + var t = 0, + s = 0, + a = c(), + o = l(); + if (t < e.length && "n" === e.charAt(t) && (t++, s = a * (null != o ? o : 1), h(), t < e.length ? (a = c(), h(), o = l()) : a = o = 0), null === o || t < e.length) throw new Error("n-th rule couldn't be parsed ('" + e + "')"); + return [s, a * o]; + + function c() { + return "-" === e.charAt(t) ? (t++, -1) : ("+" === e.charAt(t) && t++, 1) + } + + function l() { + for (var n = t, s = 0; t < e.length && e.charCodeAt(t) >= r && e.charCodeAt(t) <= i;) s = 10 * s + (e.charCodeAt(t) - r), t++; + return t === n ? null : s + } + + function h() { + for (; t < e.length && n.has(e.charCodeAt(t));) t++ + } + } +})); +qe(Os), Os.parse; +var ys = Ke((function(e, t) { + Object.defineProperty(t, "__esModule", { + value: !0 + }), t.compile = void 0, t.compile = function(e) { + var t = e[0], + n = e[1] - 1; + if (n < 0 && t <= 0) return ds.falseFunc; + if (-1 === t) return function(e) { + return e <= n + }; + if (0 === t) return function(e) { + return e === n + }; + if (1 === t) return n < 0 ? ds.trueFunc : function(e) { + return e >= n + }; + var r = Math.abs(t), + i = (n % r + r) % r; + return t > 1 ? function(e) { + return e >= n && e % r === i + } : function(e) { + return e <= n && e % r === i + } + } +})); +qe(ys), ys.compile; +var Ls = Os, + ks = ys, + vs = Ke((function(e, t) { + Object.defineProperty(t, "__esModule", { + value: !0 + }), t.compile = t.parse = void 0, Object.defineProperty(t, "parse", { + enumerable: !0, + get: function() { + return Ls.parse + } + }), Object.defineProperty(t, "compile", { + enumerable: !0, + get: function() { + return ks.compile + } + }), t.default = function(e) { + return (0, ks.compile)((0, Ls.parse)(e)) + } + })), + Ds = qe(vs); + +function Rs(e, t) { + return n => { + const r = t.getParent(n); + return null != r && t.isTag(r) && e(n) + } +} +vs.compile, vs.parse; +const Ms = { + contains: (e, t, { + adapter: n + }) => function(r) { + return e(r) && n.getText(r).includes(t) + }, + icontains(e, t, { + adapter: n + }) { + const r = t.toLowerCase(); + return function(t) { + return e(t) && n.getText(t).toLowerCase().includes(r) + } + }, + "nth-child"(e, t, { + adapter: n, + equals: r + }) { + const i = Ds(t); + return i === ds.falseFunc ? ds.falseFunc : i === ds.trueFunc ? Rs(e, n) : function(t) { + const s = n.getSiblings(t); + let a = 0; + for (let e = 0; e < s.length && !r(t, s[e]); e++) n.isTag(s[e]) && a++; + return i(a) && e(t) + } + }, + "nth-last-child"(e, t, { + adapter: n, + equals: r + }) { + const i = Ds(t); + return i === ds.falseFunc ? ds.falseFunc : i === ds.trueFunc ? Rs(e, n) : function(t) { + const s = n.getSiblings(t); + let a = 0; + for (let e = s.length - 1; e >= 0 && !r(t, s[e]); e--) n.isTag(s[e]) && a++; + return i(a) && e(t) + } + }, + "nth-of-type"(e, t, { + adapter: n, + equals: r + }) { + const i = Ds(t); + return i === ds.falseFunc ? ds.falseFunc : i === ds.trueFunc ? Rs(e, n) : function(t) { + const s = n.getSiblings(t); + let a = 0; + for (let e = 0; e < s.length; e++) { + const i = s[e]; + if (r(t, i)) break; + n.isTag(i) && n.getName(i) === n.getName(t) && a++ + } + return i(a) && e(t) + } + }, + "nth-last-of-type"(e, t, { + adapter: n, + equals: r + }) { + const i = Ds(t); + return i === ds.falseFunc ? ds.falseFunc : i === ds.trueFunc ? Rs(e, n) : function(t) { + const s = n.getSiblings(t); + let a = 0; + for (let e = s.length - 1; e >= 0; e--) { + const i = s[e]; + if (r(t, i)) break; + n.isTag(i) && n.getName(i) === n.getName(t) && a++ + } + return i(a) && e(t) + } + }, + root: (e, t, { + adapter: n + }) => t => { + const r = n.getParent(t); + return (null == r || !n.isTag(r)) && e(t) + }, + scope(e, t, n, r) { + const { + equals: i + } = n; + return r && 0 !== r.length ? 1 === r.length ? t => i(r[0], t) && e(t) : t => r.includes(t) && e(t) : Ms.root(e, t, n) + }, + hover: Ps("isHovered"), + visited: Ps("isVisited"), + active: Ps("isActive") +}; + +function Ps(e) { + return function(t, n, { + adapter: r + }) { + const i = r[e]; + return "function" != typeof i ? ds.falseFunc : function(e) { + return i(e) && t(e) + } + } +} +const xs = { + empty: (e, { + adapter: t + }) => !t.getChildren(e).some((e => t.isTag(e) || "" !== t.getText(e))), + "first-child"(e, { + adapter: t, + equals: n + }) { + if (t.prevElementSibling) return null == t.prevElementSibling(e); + const r = t.getSiblings(e).find((e => t.isTag(e))); + return null != r && n(e, r) + }, + "last-child"(e, { + adapter: t, + equals: n + }) { + const r = t.getSiblings(e); + for (let i = r.length - 1; i >= 0; i--) { + if (n(e, r[i])) return !0; + if (t.isTag(r[i])) break + } + return !1 + }, + "first-of-type"(e, { + adapter: t, + equals: n + }) { + const r = t.getSiblings(e), + i = t.getName(e); + for (let s = 0; s < r.length; s++) { + const a = r[s]; + if (n(e, a)) return !0; + if (t.isTag(a) && t.getName(a) === i) break + } + return !1 + }, + "last-of-type"(e, { + adapter: t, + equals: n + }) { + const r = t.getSiblings(e), + i = t.getName(e); + for (let s = r.length - 1; s >= 0; s--) { + const a = r[s]; + if (n(e, a)) return !0; + if (t.isTag(a) && t.getName(a) === i) break + } + return !1 + }, + "only-of-type"(e, { + adapter: t, + equals: n + }) { + const r = t.getName(e); + return t.getSiblings(e).every((i => n(e, i) || !t.isTag(i) || t.getName(i) !== r)) + }, + "only-child": (e, { + adapter: t, + equals: n + }) => t.getSiblings(e).every((r => n(e, r) || !t.isTag(r))) +}; + +function ws(e, t, n, r) { + if (null === n) { + if (e.length > r) throw new Error(`Pseudo-class :${t} requires an argument`) + } else if (e.length === r) throw new Error(`Pseudo-class :${t} doesn't have any arguments`) +} +const Bs = { + "any-link": ":is(a, area, link)[href]", + link: ":any-link:not(:visited)", + disabled: ":is(\n :is(button, input, select, textarea, optgroup, option)[disabled],\n optgroup[disabled] > option,\n fieldset[disabled]:not(fieldset[disabled] legend:first-of-type *)\n )", + enabled: ":not(:disabled)", + checked: ":is(:is(input[type=radio], input[type=checkbox])[checked], option:selected)", + required: ":is(input, select, textarea)[required]", + optional: ":is(input, select, textarea):not([required])", + selected: "option:is([selected], select:not([multiple]):not(:has(> option[selected])) > :first-of-type)", + checkbox: "[type=checkbox]", + file: "[type=file]", + password: "[type=password]", + radio: "[type=radio]", + reset: "[type=reset]", + image: "[type=image]", + submit: "[type=submit]", + parent: ":not(:empty)", + header: ":is(h1, h2, h3, h4, h5, h6)", + button: ":is(button, input[type=button])", + input: ":is(input, textarea, select, button)", + text: "input:is(:not([type!='']), [type=text])" + }, + Fs = {}; + +function Us(e, t) { + const n = t.getSiblings(e); + if (n.length <= 1) return []; + const r = n.indexOf(e); + return r < 0 || r === n.length - 1 ? [] : n.slice(r + 1).filter(t.isTag) +} + +function Hs(e) { + return { + xmlMode: !!e.xmlMode, + lowerCaseAttributeNames: !!e.lowerCaseAttributeNames, + lowerCaseTags: !!e.lowerCaseTags, + quirksMode: !!e.quirksMode, + cacheResults: !!e.cacheResults, + pseudos: e.pseudos, + adapter: e.adapter, + equals: e.equals + } +} +const Gs = (e, t, n, r, i) => { + const s = i(t, Hs(n), r); + return s === ds.trueFunc ? e : s === ds.falseFunc ? ds.falseFunc : t => s(t) && e(t) + }, + Ys = { + is: Gs, + matches: Gs, + where: Gs, + not(e, t, n, r, i) { + const s = i(t, Hs(n), r); + return s === ds.falseFunc ? e : s === ds.trueFunc ? ds.falseFunc : t => !s(t) && e(t) + }, + has(e, t, n, r, i) { + const { + adapter: s + } = n, a = Hs(n); + a.relativeSelector = !0; + const o = t.some((e => e.some(Ts))) ? [Fs] : void 0, + c = i(t, a, o); + if (c === ds.falseFunc) return ds.falseFunc; + const l = function(e, t) { + return e === ds.falseFunc ? ds.falseFunc : n => t.isTag(n) && e(n) + }(c, s); + if (o && c !== ds.trueFunc) { + const { + shouldTestNextSiblings: t = !1 + } = c; + return n => { + if (!e(n)) return !1; + o[0] = n; + const r = s.getChildren(n), + i = t ? [...r, ...Us(n, s)] : r; + return s.existsOne(l, i) + } + } + return t => e(t) && s.existsOne(l, s.getChildren(t)) + } + }; + +function qs(e, t) { + const n = t.getParent(e); + return n && t.isTag(n) ? n : null +} + +function Ks(e, t, n, r, i) { + const { + adapter: s, + equals: a + } = n; + switch (t.type) { + case Zi.PseudoElement: + throw new Error("Pseudo-elements are not supported by css-select"); + case Zi.ColumnCombinator: + throw new Error("Column combinators are not yet supported by css-select"); + case Zi.Attribute: + if (null != t.namespace) throw new Error("Namespaced attributes are not yet supported by css-select"); + return n.xmlMode && !n.lowerCaseAttributeNames || (t.name = t.name.toLowerCase()), bs[t.action](e, t, n); + case Zi.Pseudo: + return function(e, t, n, r, i) { + var s; + const { + name: a, + data: o + } = t; + if (Array.isArray(o)) { + if (!(a in Ys)) throw new Error(`Unknown pseudo-class :${a}(${o})`); + return Ys[a](e, o, n, r, i) + } + const c = null === (s = n.pseudos) || void 0 === s ? void 0 : s[a], + l = "string" == typeof c ? c : Bs[a]; + if ("string" == typeof l) { + if (null != o) throw new Error(`Pseudo ${a} doesn't have any arguments`); + const t = ps(l); + return Ys.is(e, t, n, r, i) + } + if ("function" == typeof c) return ws(c, a, o, 1), t => c(t, o) && e(t); + if (a in Ms) return Ms[a](e, o, n, r); + if (a in xs) { + const t = xs[a]; + return ws(t, a, o, 2), r => t(r, n, o) && e(r) + } + throw new Error(`Unknown pseudo-class :${a}`) + }(e, t, n, r, i); + case Zi.Tag: { + if (null != t.namespace) throw new Error("Namespaced tag names are not yet supported by css-select"); + let { + name: r + } = t; + return n.xmlMode && !n.lowerCaseTags || (r = r.toLowerCase()), + function(t) { + return s.getName(t) === r && e(t) + } + } + case Zi.Descendant: { + if (!1 === n.cacheResults || "undefined" == typeof WeakSet) return function(t) { + let n = t; + for (; n = qs(n, s);) + if (e(n)) return !0; + return !1 + }; + const t = new WeakSet; + return function(n) { + let r = n; + for (; r = qs(r, s);) + if (!t.has(r)) { + if (s.isTag(r) && e(r)) return !0; + t.add(r) + } return !1 + } + } + case "_flexibleDescendant": + return function(t) { + let n = t; + do { + if (e(n)) return !0 + } while (n = qs(n, s)); + return !1 + }; + case Zi.Parent: + return function(t) { + return s.getChildren(t).some((t => s.isTag(t) && e(t))) + }; + case Zi.Child: + return function(t) { + const n = s.getParent(t); + return null != n && s.isTag(n) && e(n) + }; + case Zi.Sibling: + return function(t) { + const n = s.getSiblings(t); + for (let r = 0; r < n.length; r++) { + const i = n[r]; + if (a(t, i)) break; + if (s.isTag(i) && e(i)) return !0 + } + return !1 + }; + case Zi.Adjacent: + return s.prevElementSibling ? function(t) { + const n = s.prevElementSibling(t); + return null != n && e(n) + } : function(t) { + const n = s.getSiblings(t); + let r; + for (let e = 0; e < n.length; e++) { + const i = n[e]; + if (a(t, i)) break; + s.isTag(i) && (r = i) + } + return !!r && e(r) + }; + case Zi.Universal: + if (null != t.namespace && "*" !== t.namespace) throw new Error("Namespaced universal selectors are not yet supported by css-select"); + return e + } +} + +function js(e) { + return e.type === Zi.Pseudo && ("scope" === e.name || Array.isArray(e.data) && e.data.some((e => e.some(js)))) +} +const Vs = { + type: Zi.Descendant + }, + Ws = { + type: "_flexibleDescendant" + }, + Qs = { + type: Zi.Pseudo, + name: "scope", + data: null + }; + +function Xs(e, t, n) { + var r; + e.forEach(As), n = null !== (r = t.context) && void 0 !== r ? r : n; + const i = Array.isArray(n), + s = n && (Array.isArray(n) ? n : [n]); + if (!1 !== t.relativeSelector) ! function(e, { + adapter: t + }, n) { + const r = !!(null == n ? void 0 : n.every((e => { + const n = t.isTag(e) && t.getParent(e); + return e === Fs || n && t.isTag(n) + }))); + for (const t of e) { + if (t.length > 0 && Ts(t[0]) && t[0].type !== Zi.Descendant); + else { + if (!r || t.some(js)) continue; + t.unshift(Vs) + } + t.unshift(Qs) + } + }(e, t, s); + else if (e.some((e => e.length > 0 && Ts(e[0])))) throw new Error("Relative selectors are not allowed when the `relativeSelector` option is disabled"); + let a = !1; + const o = e.map((e => { + if (e.length >= 2) { + const [t, n] = e; + t.type !== Zi.Pseudo || "scope" !== t.name || (i && n.type === Zi.Descendant ? e[1] = Ws : n.type !== Zi.Adjacent && n.type !== Zi.Sibling || (a = !0)) + } + return function(e, t, n) { + var r; + return e.reduce(((e, r) => e === ds.falseFunc ? ds.falseFunc : Ks(e, r, t, n, Xs)), null !== (r = t.rootFunc) && void 0 !== r ? r : ds.trueFunc) + }(e, t, s) + })).reduce($s, ds.falseFunc); + return o.shouldTestNextSiblings = a, o +} + +function $s(e, t) { + return t === ds.falseFunc || e === ds.trueFunc ? e : e === ds.falseFunc || t === ds.trueFunc ? t : function(n) { + return e(n) || t(n) + } +} +const zs = (e, t) => e === t, + Js = { + adapter: Se, + equals: zs + }; +const Zs = (ea = Xs, function(e, t, n) { + const r = function(e) { + var t, n, r, i; + const s = null != e ? e : Js; + return null !== (t = s.adapter) && void 0 !== t || (s.adapter = Se), null !== (n = s.equals) && void 0 !== n || (s.equals = null !== (i = null === (r = s.adapter) || void 0 === r ? void 0 : r.equals) && void 0 !== i ? i : zs), s + }(t); + return ea(e, r, n) +}); +var ea; + +function ta(e, t, n = !1) { + return n && (e = function(e, t) { + const n = Array.isArray(e) ? e.slice(0) : [e], + r = n.length; + for (let e = 0; e < r; e++) { + const r = Us(n[e], t); + n.push(...r) + } + return n + }(e, t)), Array.isArray(e) ? t.removeSubsets(e) : t.getChildren(e) +} +const na = new Set(["first", "last", "eq", "gt", "nth", "lt", "even", "odd"]); + +function ra(e) { + return "pseudo" === e.type && (!!na.has(e.name) || !("not" !== e.name || !Array.isArray(e.data)) && e.data.some((e => e.some(ra)))) +} + +function ia(e) { + const t = [], + n = []; + for (const r of e) r.some(ra) ? t.push(r) : n.push(r); + return [n, t] +} +const sa = { + type: Zi.Universal, + namespace: null + }, + aa = { + type: Zi.Pseudo, + name: "scope", + data: null + }; + +function oa(e, t, n = {}) { + return ca([e], t, n) +} + +function ca(e, t, n = {}) { + if ("function" == typeof t) return e.some(t); + const [r, i] = ia(ps(t)); + return r.length > 0 && e.some(Zs(r, n)) || i.some((t => ua(t, e, n).length > 0)) +} + +function la(e, t, n = {}) { + return ha(ps(e), t, n) +} + +function ha(e, t, n) { + if (0 === t.length) return []; + const [r, i] = ia(e); + let s; + if (r.length) { + const e = Ea(t, r, n); + if (0 === i.length) return e; + e.length && (s = new Set(e)) + } + for (let e = 0; e < i.length && (null == s ? void 0 : s.size) !== t.length; e++) { + const r = i[e], + a = s ? t.filter((e => I(e) && !s.has(e))) : t; + if (0 === a.length) break; + const o = ua(r, t, n); + if (o.length) + if (s) o.forEach((e => s.add(e))); + else { + if (e === i.length - 1) return o; + s = new Set(o) + } + } + return void 0 !== s ? s.size === t.length ? t : t.filter((e => s.has(e))) : [] +} + +function ua(e, t, n) { + var r; + if (e.some(as)) { + const i = null !== (r = n.root) && void 0 !== r ? r : function(e) { + for (; e.parent;) e = e.parent; + return e + }(t[0]), + s = { + ...n, + context: t, + relativeSelector: !1 + }; + return e.push(aa), pa(i, e, s, !0, t.length) + } + return pa(t, e, n, !1, t.length) +} + +function pa(e, t, n, r, i) { + const s = t.findIndex(ra), + a = t.slice(0, s), + o = t[s], + c = t.length - 1 === s ? i : 1 / 0, + l = function(e, t, n) { + const r = null != t ? parseInt(t, 10) : NaN; + switch (e) { + case "first": + return 1; + case "nth": + case "eq": + return isFinite(r) ? r >= 0 ? r + 1 : 1 / 0 : 0; + case "lt": + return isFinite(r) ? r >= 0 ? Math.min(r, n) : 1 / 0 : 0; + case "gt": + return isFinite(r) ? 1 / 0 : 0; + case "odd": + return 2 * n; + case "even": + return 2 * n - 1; + case "last": + case "not": + return 1 / 0 + } + }(o.name, o.data, c); + if (0 === l) return []; + const h = (0 !== a.length || Array.isArray(e) ? 0 === a.length ? (Array.isArray(e) ? e : [e]).filter(I) : r || a.some(as) ? fa(e, [a], n, l) : Ea(e, [a], n) : Z(e).filter(I)).slice(0, l); + let u = function(e, t, n, r) { + const i = "string" == typeof n ? parseInt(n, 10) : NaN; + switch (e) { + case "first": + case "lt": + return t; + case "last": + return t.length > 0 ? [t[t.length - 1]] : t; + case "nth": + case "eq": + return isFinite(i) && Math.abs(i) < t.length ? [i < 0 ? t[t.length + i] : t[i]] : []; + case "gt": + return isFinite(i) ? t.slice(i + 1) : []; + case "even": + return t.filter(((e, t) => t % 2 == 0)); + case "odd": + return t.filter(((e, t) => t % 2 == 1)); + case "not": { + const e = new Set(ha(n, t, r)); + return t.filter((t => !e.has(t))) + } + } + }(o.name, h, o.data, n); + if (0 === u.length || t.length === s + 1) return u; + const p = t.slice(s + 1), + f = p.some(as); + if (f) { + if (as(p[0])) { + const { + type: e + } = p[0]; + e !== Zi.Sibling && e !== Zi.Adjacent || (u = ta(u, Se, !0)), p.unshift(sa) + } + n = { + ...n, + relativeSelector: !1, + rootFunc: e => u.includes(e) + } + } else n.rootFunc && n.rootFunc !== Es && (n = { + ...n, + rootFunc: Es + }); + return p.some(ra) ? pa(u, p, n, !1, i) : f ? fa(u, [p], n, i) : Ea(u, [p], n) +} + +function fa(e, t, n, r) { + return da(e, Zs(t, n, e), r) +} + +function da(e, t, n = 1 / 0) { + return ae((e => I(e) && t(e)), ta(e, Se, t.shouldTestNextSiblings), !0, n) +} + +function Ea(e, t, n) { + const r = (Array.isArray(e) ? e : [e]).filter(I); + if (0 === r.length) return r; + const i = Zs(t, n); + return i === Es ? r : r.filter(i) +} +var ma = function(e, t, n) { + if (n || 2 === arguments.length) + for (var r, i = 0, s = t.length; i < s; i++) !r && i in t || (r || (r = Array.prototype.slice.call(t, 0, i)), r[i] = t[i]); + return e.concat(r || Array.prototype.slice.call(t)) + }, + Ta = /^\s*[~+]/; + +function _a(e) { + return function(t) { + for (var n = [], r = 1; r < arguments.length; r++) n[r - 1] = arguments[r]; + return function(r) { + var i, s = e(t, this); + return r && (s = xa(s, r, this.options.xmlMode, null === (i = this._root) || void 0 === i ? void 0 : i[0])), this._make(this.length > 1 && s.length > 1 ? n.reduce((function(e, t) { + return t(e) + }), s) : s) + } + } +} +var Aa = _a((function(e, t) { + for (var n, r = [], i = 0; i < t.length; i++) { + var s = e(t[i]); + r.push(s) + } + return (n = new Array).concat.apply(n, r) + })), + ga = _a((function(e, t) { + for (var n = [], r = 0; r < t.length; r++) { + var i = e(t[r]); + null !== i && n.push(i) + } + return n + })); + +function Na(e) { + for (var t = [], n = 1; n < arguments.length; n++) t[n - 1] = arguments[n]; + var r = null, + i = _a((function(e, t) { + var n = []; + return Bi(t, (function(t) { + for (var i; + (i = e(t)) && !(null == r ? void 0 : r(i, n.length)); t = i) n.push(i) + })), n + })).apply(void 0, ma([e], t, !1)); + return function(e, t) { + var n = this; + r = "string" == typeof e ? function(t) { + return oa(t, e, n.options) + } : e ? Pa(e) : null; + var s = i.call(this, t); + return r = null, s + } +} + +function Ca(e) { + return Array.from(new Set(e)) +} +var Ia = ga((function(e) { + var t = e.parent; + return t && !L(t) ? t : null + }), Ca), + Sa = Aa((function(e) { + for (var t = []; e.parent && !L(e.parent);) t.push(e.parent), e = e.parent; + return t + }), Ee, (function(e) { + return e.reverse() + })), + ba = Na((function(e) { + var t = e.parent; + return t && !L(t) ? t : null + }), Ee, (function(e) { + return e.reverse() + })); +var Oa = ga((function(e) { + return ne(e) + })), + ya = Aa((function(e) { + for (var t = []; e.next;) I(e = e.next) && t.push(e); + return t + }), Ca), + La = Na((function(e) { + return ne(e) + }), Ca), + ka = ga((function(e) { + return re(e) + })), + va = Aa((function(e) { + for (var t = []; e.prev;) I(e = e.prev) && t.push(e); + return t + }), Ca), + Da = Na((function(e) { + return re(e) + }), Ca), + Ra = Aa((function(e) { + return te(e).filter((function(t) { + return I(t) && t !== e + })) + }), Ee), + Ma = Aa((function(e) { + return Z(e).filter(I) + }), Ca); + +function Pa(e) { + return "function" == typeof e ? function(t, n) { + return e.call(t, n, t) + } : wi(e) ? function(t) { + return Array.prototype.includes.call(e, t) + } : function(t) { + return e === t + } +} + +function xa(e, t, n, r) { + return "string" == typeof t ? la(t, e, { + xmlMode: n, + root: r + }) : e.filter(Pa(t)) +} +var wa = Object.freeze({ + __proto__: null, + find: function(e) { + var t; + if (!e) return this._make([]); + var n = this.toArray(); + if ("string" != typeof e) { + var r = wi(e) ? e.toArray() : [e]; + return this._make(r.filter((function(e) { + return n.some((function(t) { + return Di(t, e) + })) + }))) + } + var i = Ta.test(e) ? n : this.children().toArray(), + s = { + context: n, + root: null === (t = this._root) || void 0 === t ? void 0 : t[0], + xmlMode: this.options.xmlMode, + lowerCaseTags: this.options.lowerCaseTags, + lowerCaseAttributeNames: this.options.lowerCaseAttributeNames, + pseudos: this.options.pseudos, + quirksMode: this.options.quirksMode + }; + return this._make(function(e, t, n = {}, r = 1 / 0) { + if ("function" == typeof e) return da(t, e); + const [i, s] = ia(ps(e)), a = s.map((e => pa(t, e, n, !0, r))); + return i.length && a.push(fa(t, i, n, r)), 0 === a.length ? [] : 1 === a.length ? a[0] : Ee(a.reduce(((e, t) => [...e, ...t]))) + }(e, i, s)) + }, + parent: Ia, + parents: Sa, + parentsUntil: ba, + closest: function(e) { + var t, n = []; + if (!e) return this._make(n); + var r = { + xmlMode: this.options.xmlMode, + root: null === (t = this._root) || void 0 === t ? void 0 : t[0] + }, + i = "string" == typeof e ? function(t) { + return oa(t, e, r) + } : Pa(e); + return Bi(this, (function(e) { + for (; e && I(e);) { + if (i(e, 0)) { + n.includes(e) || n.push(e); + break + } + e = e.parent + } + })), this._make(n) + }, + next: Oa, + nextAll: ya, + nextUntil: La, + prev: ka, + prevAll: va, + prevUntil: Da, + siblings: Ra, + children: Ma, + contents: function() { + var e = this.toArray().reduce((function(e, t) { + return k(t) ? e.concat(t.children) : e + }), []); + return this._make(e) + }, + each: function(e) { + for (var t = 0, n = this.length; t < n && !1 !== e.call(this[t], t, this[t]);) ++t; + return this + }, + map: function(e) { + for (var t = [], n = 0; n < this.length; n++) { + var r = this[n], + i = e.call(r, n, r); + null != i && (t = t.concat(i)) + } + return this._make(t) + }, + filter: function(e) { + var t; + return this._make(xa(this.toArray(), e, this.options.xmlMode, null === (t = this._root) || void 0 === t ? void 0 : t[0])) + }, + filterArray: xa, + is: function(e) { + var t = this.toArray(); + return "string" == typeof e ? ca(t.filter(I), e, this.options) : !!e && t.some(Pa(e)) + }, + not: function(e) { + var t = this.toArray(); + if ("string" == typeof e) { + var n = new Set(la(e, t, this.options)); + t = t.filter((function(e) { + return !n.has(e) + })) + } else { + var r = Pa(e); + t = t.filter((function(e, t) { + return !r(e, t) + })) + } + return this._make(t) + }, + has: function(e) { + var t = this; + return this.filter("string" == typeof e ? ":has(".concat(e, ")") : function(n, r) { + return t._make(r).find(e).length > 0 + }) + }, + first: function() { + return this.length > 1 ? this._make(this[0]) : this + }, + last: function() { + return this.length > 0 ? this._make(this[this.length - 1]) : this + }, + eq: function(e) { + var t; + return 0 === (e = +e) && this.length <= 1 ? this : (e < 0 && (e = this.length + e), this._make(null !== (t = this[e]) && void 0 !== t ? t : [])) + }, + get: function(e) { + return null == e ? this.toArray() : this[e < 0 ? this.length + e : e] + }, + toArray: function() { + return Array.prototype.slice.call(this) + }, + index: function(e) { + var t, n; + return null == e ? (t = this.parent().children(), n = this[0]) : "string" == typeof e ? (t = this._make(e), n = this[0]) : (t = this, n = wi(e) ? e[0] : e), Array.prototype.indexOf.call(t, n) + }, + slice: function(e, t) { + return this._make(Array.prototype.slice.call(this, e, t)) + }, + end: function() { + var e; + return null !== (e = this.prevObject) && void 0 !== e ? e : this._make([]) + }, + add: function(e, t) { + var n = this._make(e, t), + r = Ee(ma(ma([], this.get(), !0), n.get(), !0)); + return this._make(r) + }, + addBack: function(e) { + return this.prevObject ? this.add(e ? this.prevObject.filter(e) : this.prevObject) : this + } +}); + +function Ba(e, t) { + var n = Array.isArray(e) ? e : [e]; + t ? t.children = n : t = null; + for (var r = 0; r < n.length; r++) { + var i = n[r]; + i.parent && i.parent.children !== n && ie(i), t ? (i.prev = n[r - 1] || null, i.next = n[r + 1] || null) : i.prev = i.next = null, i.parent = t + } + return t +} +var Fa = function(e, t, n) { + if (n || 2 === arguments.length) + for (var r, i = 0, s = t.length; i < s; i++) !r && i in t || (r || (r = Array.prototype.slice.call(t, 0, i)), r[i] = t[i]); + return e.concat(r || Array.prototype.slice.call(t)) +}; + +function Ua(e) { + return function() { + for (var t = this, n = [], r = 0; r < arguments.length; r++) n[r] = arguments[r]; + var i = this.length - 1; + return Bi(this, (function(r, s) { + if (k(r)) { + var a = "function" == typeof n[0] ? n[0].call(r, s, t._render(r.children)) : n, + o = t._makeDomArray(a, s < i); + e(o, r.children, r) + } + })) + } +} + +function Ha(e, t, n, r, i) { + for (var s, a, o = Fa([t, n], r, !0), c = 0 === t ? null : e[t - 1], l = t + n >= e.length ? null : e[t + n], h = 0; h < r.length; ++h) { + var u = r[h], + p = u.parent; + if (p) { + var f = p.children.indexOf(u); + f > -1 && (p.children.splice(f, 1), i === p && t > f && o[0]--) + } + u.parent = i, u.prev && (u.prev.next = null !== (s = u.next) && void 0 !== s ? s : null), u.next && (u.next.prev = null !== (a = u.prev) && void 0 !== a ? a : null), u.prev = 0 === h ? c : r[h - 1], u.next = h === r.length - 1 ? l : r[h + 1] + } + return c && (c.next = r[0]), l && (l.prev = r[r.length - 1]), e.splice.apply(e, o) +} +var Ga = Ua((function(e, t, n) { + Ha(t, t.length, 0, e, n) + })), + Ya = Ua((function(e, t, n) { + Ha(t, 0, 0, e, n) + })); + +function qa(e) { + return function(t) { + for (var n = this.length - 1, r = this.parents().last(), i = 0; i < this.length; i++) { + var s = this[i], + a = "function" == typeof t ? t.call(s, i, s) : "string" != typeof t || Ui(t) ? t : r.find(t).clone(), + o = this._makeDomArray(a, i < n)[0]; + if (o && k(o)) { + for (var c = o, l = 0; l < c.children.length;) { + var h = c.children[l]; + I(h) ? (c = h, l = 0) : l++ + } + e(s, c, [o]) + } + } + return this + } +} +var Ka = qa((function(e, t, n) { + var r = e.parent; + if (r) { + var i = r.children, + s = i.indexOf(e); + Ba([e], t), Ha(i, s, 0, n, r) + } + })), + ja = qa((function(e, t, n) { + k(e) && (Ba(e.children, t), Ba(n, e)) + })); +var Va = Object.freeze({ + __proto__: null, + _makeDomArray: function(e, t) { + var n = this; + return null == e ? [] : wi(e) ? t ? Fi(e.get()) : e.get() : Array.isArray(e) ? e.reduce((function(e, r) { + return e.concat(n._makeDomArray(r, t)) + }), []) : "string" == typeof e ? this._parse(e, this.options, !1, null).children : t ? Fi([e]) : [e] + }, + appendTo: function(e) { + return (wi(e) ? e : this._make(e)).append(this), this + }, + prependTo: function(e) { + return (wi(e) ? e : this._make(e)).prepend(this), this + }, + append: Ga, + prepend: Ya, + wrap: Ka, + wrapInner: ja, + unwrap: function(e) { + var t = this; + return this.parent(e).not("body").each((function(e, n) { + t._make(n).replaceWith(n.children) + })), this + }, + wrapAll: function(e) { + var t = this[0]; + if (t) { + for (var n = this._make("function" == typeof e ? e.call(t, 0, t) : e).insertBefore(t), r = void 0, i = 0; i < n.length; i++) "tag" === n[i].type && (r = n[i]); + for (var s = 0; r && s < r.children.length;) { + var a = r.children[s]; + "tag" === a.type ? (r = a, s = 0) : s++ + } + r && this._make(r).append(this) + } + return this + }, + after: function() { + for (var e = this, t = [], n = 0; n < arguments.length; n++) t[n] = arguments[n]; + var r = this.length - 1; + return Bi(this, (function(n, i) { + var s = n.parent; + if (k(n) && s) { + var a = s.children, + o = a.indexOf(n); + if (!(o < 0)) { + var c = "function" == typeof t[0] ? t[0].call(n, i, e._render(n.children)) : t; + Ha(a, o + 1, 0, e._makeDomArray(c, i < r), s) + } + } + })) + }, + insertAfter: function(e) { + var t = this; + "string" == typeof e && (e = this._make(e)), this.remove(); + var n = []; + return this._makeDomArray(e).forEach((function(e) { + var r = t.clone().toArray(), + i = e.parent; + if (i) { + var s = i.children, + a = s.indexOf(e); + a < 0 || (Ha(s, a + 1, 0, r, i), n.push.apply(n, r)) + } + })), this._make(n) + }, + before: function() { + for (var e = this, t = [], n = 0; n < arguments.length; n++) t[n] = arguments[n]; + var r = this.length - 1; + return Bi(this, (function(n, i) { + var s = n.parent; + if (k(n) && s) { + var a = s.children, + o = a.indexOf(n); + if (!(o < 0)) { + var c = "function" == typeof t[0] ? t[0].call(n, i, e._render(n.children)) : t; + Ha(a, o, 0, e._makeDomArray(c, i < r), s) + } + } + })) + }, + insertBefore: function(e) { + var t = this, + n = this._make(e); + this.remove(); + var r = []; + return Bi(n, (function(e) { + var n = t.clone().toArray(), + i = e.parent; + if (i) { + var s = i.children, + a = s.indexOf(e); + a < 0 || (Ha(s, a, 0, n, i), r.push.apply(r, n)) + } + })), this._make(r) + }, + remove: function(e) { + return Bi(e ? this.filter(e) : this, (function(e) { + ie(e), e.prev = e.next = e.parent = null + })), this + }, + replaceWith: function(e) { + var t = this; + return Bi(this, (function(n, r) { + var i = n.parent; + if (i) { + var s = i.children, + a = "function" == typeof e ? e.call(n, r, n) : e, + o = t._makeDomArray(a); + Ba(o, null); + var c = s.indexOf(n); + Ha(s, c, 1, o, i), o.includes(n) || (n.parent = n.prev = n.next = null) + } + })) + }, + empty: function() { + return Bi(this, (function(e) { + k(e) && (e.children.forEach((function(e) { + e.next = e.prev = e.parent = null + })), e.children.length = 0) + })) + }, + html: function(e) { + var t = this; + if (void 0 === e) { + var n = this[0]; + return n && k(n) ? this._render(n.children) : null + } + return Bi(this, (function(n) { + k(n) && (n.children.forEach((function(e) { + e.next = e.prev = e.parent = null + })), Ba(wi(e) ? e.toArray() : t._parse("".concat(e), t.options, !1, n).children, n)) + })) + }, + toString: function() { + return this._render(this) + }, + text: function(e) { + var t = this; + return void 0 === e ? Li(this) : Bi(this, "function" == typeof e ? function(n, r) { + return t._make(n).text(e.call(n, r, Li([n]))) + } : function(t) { + k(t) && (t.children.forEach((function(e) { + e.next = e.prev = e.parent = null + })), Ba(new m("".concat(e)), t)) + }) + }, + clone: function() { + return this._make(Fi(this.get())) + } +}); + +function Wa(e, t, n, r) { + if ("string" == typeof t) { + var i = Qa(e), + s = "function" == typeof n ? n.call(e, r, i[t]) : n; + "" === s ? delete i[t] : null != s && (i[t] = s), e.attribs.style = (a = i, Object.keys(a).reduce((function(e, t) { + return "".concat(e).concat(e ? " " : "").concat(t, ": ").concat(a[t], ";") + }), "")) + } else "object" == typeof t && Object.keys(t).forEach((function(n, r) { + Wa(e, n, t[n], r) + })); + var a +} + +function Qa(e, t) { + if (e && I(e)) { + var n = function(e) { + if (!(e = (e || "").trim())) return {}; + for (var t, n = {}, r = 0, i = e.split(";"); r < i.length; r++) { + var s = i[r], + a = s.indexOf(":"); + if (a < 1 || a === s.length - 1) { + var o = s.trimEnd(); + o.length > 0 && void 0 !== t && (n[t] += ";".concat(o)) + } else n[t = s.slice(0, a).trim()] = s.slice(a + 1).trim() + } + return n + }(e.attribs.style); + if ("string" == typeof t) return n[t]; + if (Array.isArray(t)) { + var r = {}; + return t.forEach((function(e) { + null != n[e] && (r[e] = n[e]) + })), r + } + return n + } +} +var Xa = Object.freeze({ + __proto__: null, + css: function(e, t) { + return null != e && null != t || "object" == typeof e && !Array.isArray(e) ? Bi(this, (function(n, r) { + I(n) && Wa(n, e, t, r) + })) : 0 !== this.length ? Qa(this[0], e) : void 0 + } + }), + $a = /%20/g, + za = /\r?\n/g; +var Ja = Object.freeze({ + __proto__: null, + serialize: function() { + var e = this.serializeArray().map((function(e) { + return "".concat(encodeURIComponent(e.name), "=").concat(encodeURIComponent(e.value)) + })); + return e.join("&").replace($a, "+") + }, + serializeArray: function() { + var e = this; + return this.map((function(t, n) { + var r = e._make(n); + return I(n) && "form" === n.name ? r.find("input,select,textarea,keygen").toArray() : r.filter("input,select,textarea,keygen").toArray() + })).filter('[name!=""]:enabled:not(:submit, :button, :image, :reset, :file):matches([checked], :not(:checkbox, :radio))').map((function(t, n) { + var r, i = e._make(n), + s = i.attr("name"), + a = null !== (r = i.val()) && void 0 !== r ? r : ""; + return Array.isArray(a) ? a.map((function(e) { + return { + name: s, + value: e.replace(za, "\r\n") + } + })) : { + name: s, + value: a.replace(za, "\r\n") + } + })).toArray() + } + }), + Za = function(e, t, n) { + if (this.length = 0, this.options = n, this._root = t, e) { + for (var r = 0; r < e.length; r++) this[r] = e[r]; + this.length = e.length + } + }; +Za.prototype.cheerio = "[cheerio object]", Za.prototype.splice = Array.prototype.splice, Za.prototype[Symbol.iterator] = Array.prototype[Symbol.iterator], Object.assign(Za.prototype, ts, wa, Va, Xa, Ja); +var eo, to = (eo = function(e, t) { + return eo = Object.setPrototypeOf || { + __proto__: [] + } + instanceof Array && function(e, t) { + e.__proto__ = t + } || function(e, t) { + for (var n in t) Object.prototype.hasOwnProperty.call(t, n) && (e[n] = t[n]) + }, eo(e, t) + }, function(e, t) { + if ("function" != typeof t && null !== t) throw new TypeError("Class extends value " + String(t) + " is not a constructor or null"); + + function n() { + this.constructor = e + } + eo(e, t), e.prototype = null === t ? Object.create(t) : (n.prototype = t.prototype, new n) + }), + no = function() { + return no = Object.assign || function(e) { + for (var t, n = 1, r = arguments.length; n < r; n++) + for (var i in t = arguments[n]) Object.prototype.hasOwnProperty.call(t, i) && (e[i] = t[i]); + return e + }, no.apply(this, arguments) + }; +const ro = new Set([65534, 65535, 131070, 131071, 196606, 196607, 262142, 262143, 327678, 327679, 393214, 393215, 458750, 458751, 524286, 524287, 589822, 589823, 655358, 655359, 720894, 720895, 786430, 786431, 851966, 851967, 917502, 917503, 983038, 983039, 1048574, 1048575, 1114110, 1114111]); +var io; +! function(e) { + e[e.EOF = -1] = "EOF", e[e.NULL = 0] = "NULL", e[e.TABULATION = 9] = "TABULATION", e[e.CARRIAGE_RETURN = 13] = "CARRIAGE_RETURN", e[e.LINE_FEED = 10] = "LINE_FEED", e[e.FORM_FEED = 12] = "FORM_FEED", e[e.SPACE = 32] = "SPACE", e[e.EXCLAMATION_MARK = 33] = "EXCLAMATION_MARK", e[e.QUOTATION_MARK = 34] = "QUOTATION_MARK", e[e.NUMBER_SIGN = 35] = "NUMBER_SIGN", e[e.AMPERSAND = 38] = "AMPERSAND", e[e.APOSTROPHE = 39] = "APOSTROPHE", e[e.HYPHEN_MINUS = 45] = "HYPHEN_MINUS", e[e.SOLIDUS = 47] = "SOLIDUS", e[e.DIGIT_0 = 48] = "DIGIT_0", e[e.DIGIT_9 = 57] = "DIGIT_9", e[e.SEMICOLON = 59] = "SEMICOLON", e[e.LESS_THAN_SIGN = 60] = "LESS_THAN_SIGN", e[e.EQUALS_SIGN = 61] = "EQUALS_SIGN", e[e.GREATER_THAN_SIGN = 62] = "GREATER_THAN_SIGN", e[e.QUESTION_MARK = 63] = "QUESTION_MARK", e[e.LATIN_CAPITAL_A = 65] = "LATIN_CAPITAL_A", e[e.LATIN_CAPITAL_F = 70] = "LATIN_CAPITAL_F", e[e.LATIN_CAPITAL_X = 88] = "LATIN_CAPITAL_X", e[e.LATIN_CAPITAL_Z = 90] = "LATIN_CAPITAL_Z", e[e.RIGHT_SQUARE_BRACKET = 93] = "RIGHT_SQUARE_BRACKET", e[e.GRAVE_ACCENT = 96] = "GRAVE_ACCENT", e[e.LATIN_SMALL_A = 97] = "LATIN_SMALL_A", e[e.LATIN_SMALL_F = 102] = "LATIN_SMALL_F", e[e.LATIN_SMALL_X = 120] = "LATIN_SMALL_X", e[e.LATIN_SMALL_Z = 122] = "LATIN_SMALL_Z", e[e.REPLACEMENT_CHARACTER = 65533] = "REPLACEMENT_CHARACTER" +}(io = io || (io = {})); +const so = "--", + ao = "[CDATA[", + oo = "doctype", + co = "script", + lo = "public", + ho = "system"; + +function uo(e) { + return e >= 55296 && e <= 57343 +} + +function po(e) { + return 32 !== e && 10 !== e && 13 !== e && 9 !== e && 12 !== e && e >= 1 && e <= 31 || e >= 127 && e <= 159 +} + +function fo(e) { + return e >= 64976 && e <= 65007 || ro.has(e) +} +var Eo; +! function(e) { + e.controlCharacterInInputStream = "control-character-in-input-stream", e.noncharacterInInputStream = "noncharacter-in-input-stream", e.surrogateInInputStream = "surrogate-in-input-stream", e.nonVoidHtmlElementStartTagWithTrailingSolidus = "non-void-html-element-start-tag-with-trailing-solidus", e.endTagWithAttributes = "end-tag-with-attributes", e.endTagWithTrailingSolidus = "end-tag-with-trailing-solidus", e.unexpectedSolidusInTag = "unexpected-solidus-in-tag", e.unexpectedNullCharacter = "unexpected-null-character", e.unexpectedQuestionMarkInsteadOfTagName = "unexpected-question-mark-instead-of-tag-name", e.invalidFirstCharacterOfTagName = "invalid-first-character-of-tag-name", e.unexpectedEqualsSignBeforeAttributeName = "unexpected-equals-sign-before-attribute-name", e.missingEndTagName = "missing-end-tag-name", e.unexpectedCharacterInAttributeName = "unexpected-character-in-attribute-name", e.unknownNamedCharacterReference = "unknown-named-character-reference", e.missingSemicolonAfterCharacterReference = "missing-semicolon-after-character-reference", e.unexpectedCharacterAfterDoctypeSystemIdentifier = "unexpected-character-after-doctype-system-identifier", e.unexpectedCharacterInUnquotedAttributeValue = "unexpected-character-in-unquoted-attribute-value", e.eofBeforeTagName = "eof-before-tag-name", e.eofInTag = "eof-in-tag", e.missingAttributeValue = "missing-attribute-value", e.missingWhitespaceBetweenAttributes = "missing-whitespace-between-attributes", e.missingWhitespaceAfterDoctypePublicKeyword = "missing-whitespace-after-doctype-public-keyword", e.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers = "missing-whitespace-between-doctype-public-and-system-identifiers", e.missingWhitespaceAfterDoctypeSystemKeyword = "missing-whitespace-after-doctype-system-keyword", e.missingQuoteBeforeDoctypePublicIdentifier = "missing-quote-before-doctype-public-identifier", e.missingQuoteBeforeDoctypeSystemIdentifier = "missing-quote-before-doctype-system-identifier", e.missingDoctypePublicIdentifier = "missing-doctype-public-identifier", e.missingDoctypeSystemIdentifier = "missing-doctype-system-identifier", e.abruptDoctypePublicIdentifier = "abrupt-doctype-public-identifier", e.abruptDoctypeSystemIdentifier = "abrupt-doctype-system-identifier", e.cdataInHtmlContent = "cdata-in-html-content", e.incorrectlyOpenedComment = "incorrectly-opened-comment", e.eofInScriptHtmlCommentLikeText = "eof-in-script-html-comment-like-text", e.eofInDoctype = "eof-in-doctype", e.nestedComment = "nested-comment", e.abruptClosingOfEmptyComment = "abrupt-closing-of-empty-comment", e.eofInComment = "eof-in-comment", e.incorrectlyClosedComment = "incorrectly-closed-comment", e.eofInCdata = "eof-in-cdata", e.absenceOfDigitsInNumericCharacterReference = "absence-of-digits-in-numeric-character-reference", e.nullCharacterReference = "null-character-reference", e.surrogateCharacterReference = "surrogate-character-reference", e.characterReferenceOutsideUnicodeRange = "character-reference-outside-unicode-range", e.controlCharacterReference = "control-character-reference", e.noncharacterCharacterReference = "noncharacter-character-reference", e.missingWhitespaceBeforeDoctypeName = "missing-whitespace-before-doctype-name", e.missingDoctypeName = "missing-doctype-name", e.invalidCharacterSequenceAfterDoctypeName = "invalid-character-sequence-after-doctype-name", e.duplicateAttribute = "duplicate-attribute", e.nonConformingDoctype = "non-conforming-doctype", e.missingDoctype = "missing-doctype", e.misplacedDoctype = "misplaced-doctype", e.endTagWithoutMatchingOpenElement = "end-tag-without-matching-open-element", e.closingOfElementWithOpenChildElements = "closing-of-element-with-open-child-elements", e.disallowedContentInNoscriptInHead = "disallowed-content-in-noscript-in-head", e.openElementsLeftAfterEof = "open-elements-left-after-eof", e.abandonedHeadElementChild = "abandoned-head-element-child", e.misplacedStartTagForHeadElement = "misplaced-start-tag-for-head-element", e.nestedNoscriptInHead = "nested-noscript-in-head", e.eofInElementThatCanContainOnlyText = "eof-in-element-that-can-contain-only-text" +}(Eo = Eo || (Eo = {})); +class mo { + constructor(e) { + this.handler = e, this.html = "", this.pos = -1, this.lastGapPos = -2, this.gapStack = [], this.skipNextNewLine = !1, this.lastChunkWritten = !1, this.endOfChunkHit = !1, this.bufferWaterline = 65536, this.isEol = !1, this.lineStartPos = 0, this.droppedBufferSize = 0, this.line = 1, this.lastErrOffset = -1 + } + get col() { + return this.pos - this.lineStartPos + Number(this.lastGapPos !== this.pos) + } + get offset() { + return this.droppedBufferSize + this.pos + } + getError(e) { + const { + line: t, + col: n, + offset: r + } = this; + return { + code: e, + startLine: t, + endLine: t, + startCol: n, + endCol: n, + startOffset: r, + endOffset: r + } + } + _err(e) { + this.handler.onParseError && this.lastErrOffset !== this.offset && (this.lastErrOffset = this.offset, this.handler.onParseError(this.getError(e))) + } + _addGap() { + this.gapStack.push(this.lastGapPos), this.lastGapPos = this.pos + } + _processSurrogate(e) { + if (this.pos !== this.html.length - 1) { + const t = this.html.charCodeAt(this.pos + 1); + if (function(e) { + return e >= 56320 && e <= 57343 + }(t)) return this.pos++, this._addGap(), 1024 * (e - 55296) + 9216 + t + } else if (!this.lastChunkWritten) return this.endOfChunkHit = !0, io.EOF; + return this._err(Eo.surrogateInInputStream), e + } + willDropParsedChunk() { + return this.pos > this.bufferWaterline + } + dropParsedChunk() { + this.willDropParsedChunk() && (this.html = this.html.substring(this.pos), this.lineStartPos -= this.pos, this.droppedBufferSize += this.pos, this.pos = 0, this.lastGapPos = -2, this.gapStack.length = 0) + } + write(e, t) { + this.html.length > 0 ? this.html += e : this.html = e, this.endOfChunkHit = !1, this.lastChunkWritten = t + } + insertHtmlAtCurrentPos(e) { + this.html = this.html.substring(0, this.pos + 1) + e + this.html.substring(this.pos + 1), this.endOfChunkHit = !1 + } + startsWith(e, t) { + if (this.pos + e.length > this.html.length) return this.endOfChunkHit = !this.lastChunkWritten, !1; + if (t) return this.html.startsWith(e, this.pos); + for (let t = 0; t < e.length; t++) { + if ((32 | this.html.charCodeAt(this.pos + t)) !== e.charCodeAt(t)) return !1 + } + return !0 + } + peek(e) { + const t = this.pos + e; + return t >= this.html.length ? (this.endOfChunkHit = !this.lastChunkWritten, io.EOF) : this.html.charCodeAt(t) + } + advance() { + if (this.pos++, this.isEol && (this.isEol = !1, this.line++, this.lineStartPos = this.pos), this.pos >= this.html.length) return this.endOfChunkHit = !this.lastChunkWritten, io.EOF; + let e = this.html.charCodeAt(this.pos); + if (e === io.CARRIAGE_RETURN) return this.isEol = !0, this.skipNextNewLine = !0, io.LINE_FEED; + if (e === io.LINE_FEED && (this.isEol = !0, this.skipNextNewLine)) return this.line--, this.skipNextNewLine = !1, this._addGap(), this.advance(); + this.skipNextNewLine = !1, uo(e) && (e = this._processSurrogate(e)); + return null === this.handler.onParseError || e > 31 && e < 127 || e === io.LINE_FEED || e === io.CARRIAGE_RETURN || e > 159 && e < 64976 || this._checkForProblematicCharacters(e), e + } + _checkForProblematicCharacters(e) { + po(e) ? this._err(Eo.controlCharacterInInputStream) : fo(e) && this._err(Eo.noncharacterInInputStream) + } + retreat(e) { + for (this.pos -= e; this.pos < this.lastGapPos;) this.lastGapPos = this.gapStack.pop(), this.pos--; + this.isEol = !1 + } +} +var To; + +function _o(e, t) { + for (let n = e.attrs.length - 1; n >= 0; n--) + if (e.attrs[n].name === t) return e.attrs[n].value; + return null +}! function(e) { + e[e.CHARACTER = 0] = "CHARACTER", e[e.NULL_CHARACTER = 1] = "NULL_CHARACTER", e[e.WHITESPACE_CHARACTER = 2] = "WHITESPACE_CHARACTER", e[e.START_TAG = 3] = "START_TAG", e[e.END_TAG = 4] = "END_TAG", e[e.COMMENT = 5] = "COMMENT", e[e.DOCTYPE = 6] = "DOCTYPE", e[e.EOF = 7] = "EOF", e[e.HIBERNATION = 8] = "HIBERNATION" +}(To = To || (To = {})); +var Ao = Ke((function(e, t) { + Object.defineProperty(t, "__esModule", { + value: !0 + }), t.default = new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏ੊ઑඡ๭༉༦჊ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ὾⁠↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms„‹•˜¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲ΂ϏϢϸontourIntegraìȹoɴ͹\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՗՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲ׌y;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱cò׋؀JTabcdfgorstר׬ׯ׺؀ؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d׷׸䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇܎ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ޷޼߂ߐĀiyޱ޵rc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄΀HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶߻dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣ঳সে্਷ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗ࡜ࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४Ānrࢃ࢏gleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpw৔ਖਛgȀLRlr৞৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼੝੠੷੼અઋ઎p;椅y;䐜Ādl੥੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑ඗ඞcy;䐊cute;䅃ƀaey઴હાron;䅇dil;䅅;䐝ƀgswે૰଎ativeƀMTV૓૟૨ediumSpace;怋hiĀcn૦૘ë૙eryThiî૙tedĀGL૸ଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷ଺reak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪୼஡௫ఄ౞಄ದ೘ൡඅ櫬Āou୛୤ngruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊ஛ement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater΀;EFGLSTஶஷ஽௉௓௘௥扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲௽ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ೒拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨೹setĀ;E೰ೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂ෉෕ෛ෠෧෼ขภยา฿ไlig;䅒cute耻Ó䃓Āiy෎ීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲ෶cr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬื฼de耻Õ䃕es;樷ml耻Ö䃖erĀBP๋๠Āar๐๓r;怾acĀek๚๜;揞et;掴arenthesis;揜Ҁacfhilors๿ງຊຏຒດຝະ໼rtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ໠໤檻cedesȀ;EST່້໏໚扺qual;檯lantEqual;扼ilde;找me;怳Ādp໩໮uct;戏ortionĀ;aȥ໹l;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬؀BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁࿫࿳ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL࿜࿝࿡憒ar;懥eftArrow;懄eiling;按oǵ࿹\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»࿝pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄ቉ቕ቞ቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHc቎ቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗Āeiቻ኉Dzኀ\0ኇefore;戴a;䎘Ācn኎ኘkSpace;쀀  Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0᏿ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0጖y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻፿on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtè૙a;䎖r;愨pf;愤cr;쀀𝒵௡ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚΀;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒΀;Eaeiop዁ᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;e዁ᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;e዁ᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰ᜼ᝃᝈ᝸᝽០៦ᠹᡐᜍ᤽᥈ᥰot;櫭Ācrᛶ᜞kȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e᜚᜛戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;t፜᜷brk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓ᝛ᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯ᝱ᝳ;䎲;愶een;扬r;쀀𝔟g΀costuvwឍឝឳេ៕៛៞ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀako៭ᠦᠵĀcn៲ᠣkƀlst៺֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘᠝斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈؀DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬ᣿ᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教΀;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ᣷᣹᣻᣽;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ᤟;敛;敘;攘;攔΀;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģ᥂bar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;e᜚᜜lƀ;bhᥨᥩᥫ䁜;槅sub;柈Ŭᥴ᥾lĀ;e᥹᥺怢t»᥺pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭍᭒\0᯽\0ᰌƀcpr᦭ᦲ᧝ute;䄇̀;abcdsᦿᧀᧄ᧊᧕᧙戩nd;橄rcup;橉Āau᧏᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r΀;Ecefms᩟᩠ᩢᩫ᪤᪪᪮旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖᪚᪟»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇᫔᫺\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ᫙\0\0᫢aĀ;t᫞᫟䀬;䁀ƀ;fl᫨᫩᫫戁îᅠeĀmx᫱᫶ent»᫩eóɍǧ᫾\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯΀delprvw᭠᭬᭷ᮂᮬᯔ᯹arrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;p᭿ᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰸᰻᰿ᱝᱩᱵᲊᲞᲬᲷ᳻᳿ᴍᵻᶑᶫᶻ᷆᷍rò΁ar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂͸᳖᳜᳠mƀ;oș᳊᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄ὎὚ĀDoḆᴴoôᲉĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»Ṻƀaeiἒ἖Ἒls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙ῜ῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao‌⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧‪‬\0‮耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₟₥₰₴⃰⃵⃺⃿℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕ₝ute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽⃉ƀ;qsؾٌ⃄lanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqr׮ⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0↎proø₞r;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢␧␭␱␵␻ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀஀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼rò৆òΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonó྘quigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d྘➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ᠛旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐௏쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop඄⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roø඄urĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓΀;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨í஘istĀ;s஠டr;쀀𝔫ȀEest௅⩦⩹⩼ƀ;qs஼⩭௡ƀ;qs஼௅⩴lanô௢ií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚΀AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs఻⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs఻⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast୻⭕⭚⭟lleì୻l;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖ΀chimpqu⮽⯍⯙⬄୸⯤⯯Ȁ;cerല⯆ഷ⯉uå൅;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭å೸åഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñ೗Ā;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰⳴ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥ⵲ⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;c᪞ⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācr⵩⵭ir;榿;쀀𝔬ͯ⵹\0\0⵼\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕ⶘ⶥⶨrò᪀Āir⶝ⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔ⷗ǒr;榷rp;榹΀;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ⹞\0⹽\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ⹧⹲຅脀¶;l⹭⹮䂶leìЃɩ⹸\0\0⹻m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳⻴ᤈ⻹⻽⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp໬⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t໻⾴ï໻rel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⿚⋢⿟⿥⿫⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei⿾々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔઀ABHabcdefhilmnoprstux぀けさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤΀cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstw࿜ガクシスゼゾダッデナp;極Ā;f࿠ゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes㄂㄄;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ì࿲âヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘㇤㇮rrowĀ;t࿜ㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowó࿪arpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓rò࿪aòՑ;怏oustĀ;a㈞㈟掱che»㈟mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦΀Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼਴t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì⹯耻­䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;q኱ኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫ਩war;椪lig耻ß䃟௡㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rë๟ƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproø዁im»ኬsðኞĀas㚺㚮ð዁rn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈ΀adempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xô᝷headĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜΀eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roð໻tré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚΀cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜ៟tré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map((function(e) { + return e.charCodeAt(0) + }))) +})); +qe(Ao); +var go = Ke((function(e, t) { + Object.defineProperty(t, "__esModule", { + value: !0 + }), t.default = new Uint16Array("Ȁaglq\tɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map((function(e) { + return e.charCodeAt(0) + }))) +})); +qe(go); +var No = Ke((function(e, t) { + var n; + Object.defineProperty(t, "__esModule", { + value: !0 + }), t.replaceCodePoint = t.fromCodePoint = void 0; + var r = new Map([ + [0, 65533], + [128, 8364], + [130, 8218], + [131, 402], + [132, 8222], + [133, 8230], + [134, 8224], + [135, 8225], + [136, 710], + [137, 8240], + [138, 352], + [139, 8249], + [140, 338], + [142, 381], + [145, 8216], + [146, 8217], + [147, 8220], + [148, 8221], + [149, 8226], + [150, 8211], + [151, 8212], + [152, 732], + [153, 8482], + [154, 353], + [155, 8250], + [156, 339], + [158, 382], + [159, 376] + ]); + + function i(e) { + var t; + return e >= 55296 && e <= 57343 || e > 1114111 ? 65533 : null !== (t = r.get(e)) && void 0 !== t ? t : e + } + t.fromCodePoint = null !== (n = String.fromCodePoint) && void 0 !== n ? n : function(e) { + var t = ""; + return e > 65535 && (e -= 65536, t += String.fromCharCode(e >>> 10 & 1023 | 55296), e = 56320 | 1023 & e), t += String.fromCharCode(e) + }, t.replaceCodePoint = i, t.default = function(e) { + return (0, t.fromCodePoint)(i(e)) + } +})); +qe(No), No.replaceCodePoint, No.fromCodePoint; +var Co = Ao, + Io = go, + So = No, + bo = Ke((function(e, t) { + var n = Ge && Ge.__importDefault || function(e) { + return e && e.__esModule ? e : { + default: e + } + }; + Object.defineProperty(t, "__esModule", { + value: !0 + }), t.decodeXML = t.decodeHTMLStrict = t.decodeHTML = t.determineBranch = t.BinTrieFlags = t.fromCodePoint = t.replaceCodePoint = t.decodeCodePoint = t.xmlDecodeTree = t.htmlDecodeTree = void 0; + var r = n(Co); + t.htmlDecodeTree = r.default; + var i = n(Io); + t.xmlDecodeTree = i.default; + var s = n(So); + t.decodeCodePoint = s.default; + var a, o, c = So; + + function l(e) { + return function(t, n) { + for (var r = "", i = 0, c = 0; + (c = t.indexOf("&", c)) >= 0;) + if (r += t.slice(i, c), i = c, c += 1, t.charCodeAt(c) !== a.NUM) { + for (var l = 0, u = 1, p = 0, f = e[p]; c < t.length && !((p = h(e, f, p + 1, t.charCodeAt(c))) < 0); c++, u++) { + var d = (f = e[p]) & o.VALUE_LENGTH; + if (d) { + var E; + if (n && t.charCodeAt(c) !== a.SEMI || (l = p, u = 0), 0 === (E = (d >> 14) - 1)) break; + p += E + } + } + if (0 !== l) r += 1 === (E = (e[l] & o.VALUE_LENGTH) >> 14) ? String.fromCharCode(e[l] & ~o.VALUE_LENGTH) : 2 === E ? String.fromCharCode(e[l + 1]) : String.fromCharCode(e[l + 1], e[l + 2]), i = c - u + 1 + } else { + var m = c + 1, + T = 10, + _ = t.charCodeAt(m); + (_ | a.To_LOWER_BIT) === a.LOWER_X && (T = 16, c += 1, m += 1); + do { + _ = t.charCodeAt(++c) + } while (_ >= a.ZERO && _ <= a.NINE || 16 === T && (_ | a.To_LOWER_BIT) >= a.LOWER_A && (_ | a.To_LOWER_BIT) <= a.LOWER_F); + if (m !== c) { + var A = t.substring(m, c), + g = parseInt(A, T); + if (t.charCodeAt(c) === a.SEMI) c += 1; + else if (n) continue; + r += (0, s.default)(g), i = c + } + } return r + t.slice(i) + } + } + + function h(e, t, n, r) { + var i = (t & o.BRANCH_LENGTH) >> 7, + s = t & o.JUMP_TABLE; + if (0 === i) return 0 !== s && r === s ? n : -1; + if (s) { + var a = r - s; + return a < 0 || a >= i ? -1 : e[n + a] - 1 + } + for (var c = n, l = c + i - 1; c <= l;) { + var h = c + l >>> 1, + u = e[h]; + if (u < r) c = h + 1; + else { + if (!(u > r)) return e[h + i]; + l = h - 1 + } + } + return -1 + } + Object.defineProperty(t, "replaceCodePoint", { + enumerable: !0, + get: function() { + return c.replaceCodePoint + } + }), Object.defineProperty(t, "fromCodePoint", { + enumerable: !0, + get: function() { + return c.fromCodePoint + } + }), + function(e) { + e[e.NUM = 35] = "NUM", e[e.SEMI = 59] = "SEMI", e[e.ZERO = 48] = "ZERO", e[e.NINE = 57] = "NINE", e[e.LOWER_A = 97] = "LOWER_A", e[e.LOWER_F = 102] = "LOWER_F", e[e.LOWER_X = 120] = "LOWER_X", e[e.To_LOWER_BIT = 32] = "To_LOWER_BIT" + }(a || (a = {})), + function(e) { + e[e.VALUE_LENGTH = 49152] = "VALUE_LENGTH", e[e.BRANCH_LENGTH = 16256] = "BRANCH_LENGTH", e[e.JUMP_TABLE = 127] = "JUMP_TABLE" + }(o = t.BinTrieFlags || (t.BinTrieFlags = {})), t.determineBranch = h; + var u = l(r.default), + p = l(i.default); + t.decodeHTML = function(e) { + return u(e, !1) + }, t.decodeHTMLStrict = function(e) { + return u(e, !0) + }, t.decodeXML = function(e) { + return p(e, !0) + } + })); +qe(bo), bo.decodeXML, bo.decodeHTMLStrict, bo.decodeHTML; +var Oo = bo.determineBranch, + yo = bo.BinTrieFlags, + Lo = bo.fromCodePoint, + ko = bo.replaceCodePoint; +bo.decodeCodePoint; +var vo, Do, Ro, Mo, Po, xo = bo.xmlDecodeTree, + wo = bo.htmlDecodeTree; +! function(e) { + e.HTML = "http://www.w3.org/1999/xhtml", e.MATHML = "http://www.w3.org/1998/Math/MathML", e.SVG = "http://www.w3.org/2000/svg", e.XLINK = "http://www.w3.org/1999/xlink", e.XML = "http://www.w3.org/XML/1998/namespace", e.XMLNS = "http://www.w3.org/2000/xmlns/" +}(vo = vo || (vo = {})), +function(e) { + e.TYPE = "type", e.ACTION = "action", e.ENCODING = "encoding", e.PROMPT = "prompt", e.NAME = "name", e.COLOR = "color", e.FACE = "face", e.SIZE = "size" +}(Do = Do || (Do = {})), +function(e) { + e.NO_QUIRKS = "no-quirks", e.QUIRKS = "quirks", e.LIMITED_QUIRKS = "limited-quirks" +}(Ro = Ro || (Ro = {})), +function(e) { + e.A = "a", e.ADDRESS = "address", e.ANNOTATION_XML = "annotation-xml", e.APPLET = "applet", e.AREA = "area", e.ARTICLE = "article", e.ASIDE = "aside", e.B = "b", e.BASE = "base", e.BASEFONT = "basefont", e.BGSOUND = "bgsound", e.BIG = "big", e.BLOCKQUOTE = "blockquote", e.BODY = "body", e.BR = "br", e.BUTTON = "button", e.CAPTION = "caption", e.CENTER = "center", e.CODE = "code", e.COL = "col", e.COLGROUP = "colgroup", e.DD = "dd", e.DESC = "desc", e.DETAILS = "details", e.DIALOG = "dialog", e.DIR = "dir", e.DIV = "div", e.DL = "dl", e.DT = "dt", e.EM = "em", e.EMBED = "embed", e.FIELDSET = "fieldset", e.FIGCAPTION = "figcaption", e.FIGURE = "figure", e.FONT = "font", e.FOOTER = "footer", e.FOREIGN_OBJECT = "foreignObject", e.FORM = "form", e.FRAME = "frame", e.FRAMESET = "frameset", e.H1 = "h1", e.H2 = "h2", e.H3 = "h3", e.H4 = "h4", e.H5 = "h5", e.H6 = "h6", e.HEAD = "head", e.HEADER = "header", e.HGROUP = "hgroup", e.HR = "hr", e.HTML = "html", e.I = "i", e.IMG = "img", e.IMAGE = "image", e.INPUT = "input", e.IFRAME = "iframe", e.KEYGEN = "keygen", e.LABEL = "label", e.LI = "li", e.LINK = "link", e.LISTING = "listing", e.MAIN = "main", e.MALIGNMARK = "malignmark", e.MARQUEE = "marquee", e.MATH = "math", e.MENU = "menu", e.META = "meta", e.MGLYPH = "mglyph", e.MI = "mi", e.MO = "mo", e.MN = "mn", e.MS = "ms", e.MTEXT = "mtext", e.NAV = "nav", e.NOBR = "nobr", e.NOFRAMES = "noframes", e.NOEMBED = "noembed", e.NOSCRIPT = "noscript", e.OBJECT = "object", e.OL = "ol", e.OPTGROUP = "optgroup", e.OPTION = "option", e.P = "p", e.PARAM = "param", e.PLAINTEXT = "plaintext", e.PRE = "pre", e.RB = "rb", e.RP = "rp", e.RT = "rt", e.RTC = "rtc", e.RUBY = "ruby", e.S = "s", e.SCRIPT = "script", e.SECTION = "section", e.SELECT = "select", e.SOURCE = "source", e.SMALL = "small", e.SPAN = "span", e.STRIKE = "strike", e.STRONG = "strong", e.STYLE = "style", e.SUB = "sub", e.SUMMARY = "summary", e.SUP = "sup", e.TABLE = "table", e.TBODY = "tbody", e.TEMPLATE = "template", e.TEXTAREA = "textarea", e.TFOOT = "tfoot", e.TD = "td", e.TH = "th", e.THEAD = "thead", e.TITLE = "title", e.TR = "tr", e.TRACK = "track", e.TT = "tt", e.U = "u", e.UL = "ul", e.SVG = "svg", e.VAR = "var", e.WBR = "wbr", e.XMP = "xmp" +}(Mo = Mo || (Mo = {})), +function(e) { + e[e.UNKNOWN = 0] = "UNKNOWN", e[e.A = 1] = "A", e[e.ADDRESS = 2] = "ADDRESS", e[e.ANNOTATION_XML = 3] = "ANNOTATION_XML", e[e.APPLET = 4] = "APPLET", e[e.AREA = 5] = "AREA", e[e.ARTICLE = 6] = "ARTICLE", e[e.ASIDE = 7] = "ASIDE", e[e.B = 8] = "B", e[e.BASE = 9] = "BASE", e[e.BASEFONT = 10] = "BASEFONT", e[e.BGSOUND = 11] = "BGSOUND", e[e.BIG = 12] = "BIG", e[e.BLOCKQUOTE = 13] = "BLOCKQUOTE", e[e.BODY = 14] = "BODY", e[e.BR = 15] = "BR", e[e.BUTTON = 16] = "BUTTON", e[e.CAPTION = 17] = "CAPTION", e[e.CENTER = 18] = "CENTER", e[e.CODE = 19] = "CODE", e[e.COL = 20] = "COL", e[e.COLGROUP = 21] = "COLGROUP", e[e.DD = 22] = "DD", e[e.DESC = 23] = "DESC", e[e.DETAILS = 24] = "DETAILS", e[e.DIALOG = 25] = "DIALOG", e[e.DIR = 26] = "DIR", e[e.DIV = 27] = "DIV", e[e.DL = 28] = "DL", e[e.DT = 29] = "DT", e[e.EM = 30] = "EM", e[e.EMBED = 31] = "EMBED", e[e.FIELDSET = 32] = "FIELDSET", e[e.FIGCAPTION = 33] = "FIGCAPTION", e[e.FIGURE = 34] = "FIGURE", e[e.FONT = 35] = "FONT", e[e.FOOTER = 36] = "FOOTER", e[e.FOREIGN_OBJECT = 37] = "FOREIGN_OBJECT", e[e.FORM = 38] = "FORM", e[e.FRAME = 39] = "FRAME", e[e.FRAMESET = 40] = "FRAMESET", e[e.H1 = 41] = "H1", e[e.H2 = 42] = "H2", e[e.H3 = 43] = "H3", e[e.H4 = 44] = "H4", e[e.H5 = 45] = "H5", e[e.H6 = 46] = "H6", e[e.HEAD = 47] = "HEAD", e[e.HEADER = 48] = "HEADER", e[e.HGROUP = 49] = "HGROUP", e[e.HR = 50] = "HR", e[e.HTML = 51] = "HTML", e[e.I = 52] = "I", e[e.IMG = 53] = "IMG", e[e.IMAGE = 54] = "IMAGE", e[e.INPUT = 55] = "INPUT", e[e.IFRAME = 56] = "IFRAME", e[e.KEYGEN = 57] = "KEYGEN", e[e.LABEL = 58] = "LABEL", e[e.LI = 59] = "LI", e[e.LINK = 60] = "LINK", e[e.LISTING = 61] = "LISTING", e[e.MAIN = 62] = "MAIN", e[e.MALIGNMARK = 63] = "MALIGNMARK", e[e.MARQUEE = 64] = "MARQUEE", e[e.MATH = 65] = "MATH", e[e.MENU = 66] = "MENU", e[e.META = 67] = "META", e[e.MGLYPH = 68] = "MGLYPH", e[e.MI = 69] = "MI", e[e.MO = 70] = "MO", e[e.MN = 71] = "MN", e[e.MS = 72] = "MS", e[e.MTEXT = 73] = "MTEXT", e[e.NAV = 74] = "NAV", e[e.NOBR = 75] = "NOBR", e[e.NOFRAMES = 76] = "NOFRAMES", e[e.NOEMBED = 77] = "NOEMBED", e[e.NOSCRIPT = 78] = "NOSCRIPT", e[e.OBJECT = 79] = "OBJECT", e[e.OL = 80] = "OL", e[e.OPTGROUP = 81] = "OPTGROUP", e[e.OPTION = 82] = "OPTION", e[e.P = 83] = "P", e[e.PARAM = 84] = "PARAM", e[e.PLAINTEXT = 85] = "PLAINTEXT", e[e.PRE = 86] = "PRE", e[e.RB = 87] = "RB", e[e.RP = 88] = "RP", e[e.RT = 89] = "RT", e[e.RTC = 90] = "RTC", e[e.RUBY = 91] = "RUBY", e[e.S = 92] = "S", e[e.SCRIPT = 93] = "SCRIPT", e[e.SECTION = 94] = "SECTION", e[e.SELECT = 95] = "SELECT", e[e.SOURCE = 96] = "SOURCE", e[e.SMALL = 97] = "SMALL", e[e.SPAN = 98] = "SPAN", e[e.STRIKE = 99] = "STRIKE", e[e.STRONG = 100] = "STRONG", e[e.STYLE = 101] = "STYLE", e[e.SUB = 102] = "SUB", e[e.SUMMARY = 103] = "SUMMARY", e[e.SUP = 104] = "SUP", e[e.TABLE = 105] = "TABLE", e[e.TBODY = 106] = "TBODY", e[e.TEMPLATE = 107] = "TEMPLATE", e[e.TEXTAREA = 108] = "TEXTAREA", e[e.TFOOT = 109] = "TFOOT", e[e.TD = 110] = "TD", e[e.TH = 111] = "TH", e[e.THEAD = 112] = "THEAD", e[e.TITLE = 113] = "TITLE", e[e.TR = 114] = "TR", e[e.TRACK = 115] = "TRACK", e[e.TT = 116] = "TT", e[e.U = 117] = "U", e[e.UL = 118] = "UL", e[e.SVG = 119] = "SVG", e[e.VAR = 120] = "VAR", e[e.WBR = 121] = "WBR", e[e.XMP = 122] = "XMP" +}(Po = Po || (Po = {})); +const Bo = new Map([ + [Mo.A, Po.A], + [Mo.ADDRESS, Po.ADDRESS], + [Mo.ANNOTATION_XML, Po.ANNOTATION_XML], + [Mo.APPLET, Po.APPLET], + [Mo.AREA, Po.AREA], + [Mo.ARTICLE, Po.ARTICLE], + [Mo.ASIDE, Po.ASIDE], + [Mo.B, Po.B], + [Mo.BASE, Po.BASE], + [Mo.BASEFONT, Po.BASEFONT], + [Mo.BGSOUND, Po.BGSOUND], + [Mo.BIG, Po.BIG], + [Mo.BLOCKQUOTE, Po.BLOCKQUOTE], + [Mo.BODY, Po.BODY], + [Mo.BR, Po.BR], + [Mo.BUTTON, Po.BUTTON], + [Mo.CAPTION, Po.CAPTION], + [Mo.CENTER, Po.CENTER], + [Mo.CODE, Po.CODE], + [Mo.COL, Po.COL], + [Mo.COLGROUP, Po.COLGROUP], + [Mo.DD, Po.DD], + [Mo.DESC, Po.DESC], + [Mo.DETAILS, Po.DETAILS], + [Mo.DIALOG, Po.DIALOG], + [Mo.DIR, Po.DIR], + [Mo.DIV, Po.DIV], + [Mo.DL, Po.DL], + [Mo.DT, Po.DT], + [Mo.EM, Po.EM], + [Mo.EMBED, Po.EMBED], + [Mo.FIELDSET, Po.FIELDSET], + [Mo.FIGCAPTION, Po.FIGCAPTION], + [Mo.FIGURE, Po.FIGURE], + [Mo.FONT, Po.FONT], + [Mo.FOOTER, Po.FOOTER], + [Mo.FOREIGN_OBJECT, Po.FOREIGN_OBJECT], + [Mo.FORM, Po.FORM], + [Mo.FRAME, Po.FRAME], + [Mo.FRAMESET, Po.FRAMESET], + [Mo.H1, Po.H1], + [Mo.H2, Po.H2], + [Mo.H3, Po.H3], + [Mo.H4, Po.H4], + [Mo.H5, Po.H5], + [Mo.H6, Po.H6], + [Mo.HEAD, Po.HEAD], + [Mo.HEADER, Po.HEADER], + [Mo.HGROUP, Po.HGROUP], + [Mo.HR, Po.HR], + [Mo.HTML, Po.HTML], + [Mo.I, Po.I], + [Mo.IMG, Po.IMG], + [Mo.IMAGE, Po.IMAGE], + [Mo.INPUT, Po.INPUT], + [Mo.IFRAME, Po.IFRAME], + [Mo.KEYGEN, Po.KEYGEN], + [Mo.LABEL, Po.LABEL], + [Mo.LI, Po.LI], + [Mo.LINK, Po.LINK], + [Mo.LISTING, Po.LISTING], + [Mo.MAIN, Po.MAIN], + [Mo.MALIGNMARK, Po.MALIGNMARK], + [Mo.MARQUEE, Po.MARQUEE], + [Mo.MATH, Po.MATH], + [Mo.MENU, Po.MENU], + [Mo.META, Po.META], + [Mo.MGLYPH, Po.MGLYPH], + [Mo.MI, Po.MI], + [Mo.MO, Po.MO], + [Mo.MN, Po.MN], + [Mo.MS, Po.MS], + [Mo.MTEXT, Po.MTEXT], + [Mo.NAV, Po.NAV], + [Mo.NOBR, Po.NOBR], + [Mo.NOFRAMES, Po.NOFRAMES], + [Mo.NOEMBED, Po.NOEMBED], + [Mo.NOSCRIPT, Po.NOSCRIPT], + [Mo.OBJECT, Po.OBJECT], + [Mo.OL, Po.OL], + [Mo.OPTGROUP, Po.OPTGROUP], + [Mo.OPTION, Po.OPTION], + [Mo.P, Po.P], + [Mo.PARAM, Po.PARAM], + [Mo.PLAINTEXT, Po.PLAINTEXT], + [Mo.PRE, Po.PRE], + [Mo.RB, Po.RB], + [Mo.RP, Po.RP], + [Mo.RT, Po.RT], + [Mo.RTC, Po.RTC], + [Mo.RUBY, Po.RUBY], + [Mo.S, Po.S], + [Mo.SCRIPT, Po.SCRIPT], + [Mo.SECTION, Po.SECTION], + [Mo.SELECT, Po.SELECT], + [Mo.SOURCE, Po.SOURCE], + [Mo.SMALL, Po.SMALL], + [Mo.SPAN, Po.SPAN], + [Mo.STRIKE, Po.STRIKE], + [Mo.STRONG, Po.STRONG], + [Mo.STYLE, Po.STYLE], + [Mo.SUB, Po.SUB], + [Mo.SUMMARY, Po.SUMMARY], + [Mo.SUP, Po.SUP], + [Mo.TABLE, Po.TABLE], + [Mo.TBODY, Po.TBODY], + [Mo.TEMPLATE, Po.TEMPLATE], + [Mo.TEXTAREA, Po.TEXTAREA], + [Mo.TFOOT, Po.TFOOT], + [Mo.TD, Po.TD], + [Mo.TH, Po.TH], + [Mo.THEAD, Po.THEAD], + [Mo.TITLE, Po.TITLE], + [Mo.TR, Po.TR], + [Mo.TRACK, Po.TRACK], + [Mo.TT, Po.TT], + [Mo.U, Po.U], + [Mo.UL, Po.UL], + [Mo.SVG, Po.SVG], + [Mo.VAR, Po.VAR], + [Mo.WBR, Po.WBR], + [Mo.XMP, Po.XMP] +]); + +function Fo(e) { + var t; + return null !== (t = Bo.get(e)) && void 0 !== t ? t : Po.UNKNOWN +} +const Uo = Po, + Ho = { + [vo.HTML]: new Set([Uo.ADDRESS, Uo.APPLET, Uo.AREA, Uo.ARTICLE, Uo.ASIDE, Uo.BASE, Uo.BASEFONT, Uo.BGSOUND, Uo.BLOCKQUOTE, Uo.BODY, Uo.BR, Uo.BUTTON, Uo.CAPTION, Uo.CENTER, Uo.COL, Uo.COLGROUP, Uo.DD, Uo.DETAILS, Uo.DIR, Uo.DIV, Uo.DL, Uo.DT, Uo.EMBED, Uo.FIELDSET, Uo.FIGCAPTION, Uo.FIGURE, Uo.FOOTER, Uo.FORM, Uo.FRAME, Uo.FRAMESET, Uo.H1, Uo.H2, Uo.H3, Uo.H4, Uo.H5, Uo.H6, Uo.HEAD, Uo.HEADER, Uo.HGROUP, Uo.HR, Uo.HTML, Uo.IFRAME, Uo.IMG, Uo.INPUT, Uo.LI, Uo.LINK, Uo.LISTING, Uo.MAIN, Uo.MARQUEE, Uo.MENU, Uo.META, Uo.NAV, Uo.NOEMBED, Uo.NOFRAMES, Uo.NOSCRIPT, Uo.OBJECT, Uo.OL, Uo.P, Uo.PARAM, Uo.PLAINTEXT, Uo.PRE, Uo.SCRIPT, Uo.SECTION, Uo.SELECT, Uo.SOURCE, Uo.STYLE, Uo.SUMMARY, Uo.TABLE, Uo.TBODY, Uo.TD, Uo.TEMPLATE, Uo.TEXTAREA, Uo.TFOOT, Uo.TH, Uo.THEAD, Uo.TITLE, Uo.TR, Uo.TRACK, Uo.UL, Uo.WBR, Uo.XMP]), + [vo.MATHML]: new Set([Uo.MI, Uo.MO, Uo.MN, Uo.MS, Uo.MTEXT, Uo.ANNOTATION_XML]), + [vo.SVG]: new Set([Uo.TITLE, Uo.FOREIGN_OBJECT, Uo.DESC]), + [vo.XLINK]: new Set, + [vo.XML]: new Set, + [vo.XMLNS]: new Set + }; + +function Go(e) { + return e === Uo.H1 || e === Uo.H2 || e === Uo.H3 || e === Uo.H4 || e === Uo.H5 || e === Uo.H6 +} +const Yo = new Set([Mo.STYLE, Mo.SCRIPT, Mo.XMP, Mo.IFRAME, Mo.NOEMBED, Mo.NOFRAMES, Mo.PLAINTEXT]); +const qo = new Map([ + [128, 8364], + [130, 8218], + [131, 402], + [132, 8222], + [133, 8230], + [134, 8224], + [135, 8225], + [136, 710], + [137, 8240], + [138, 352], + [139, 8249], + [140, 338], + [142, 381], + [145, 8216], + [146, 8217], + [147, 8220], + [148, 8221], + [149, 8226], + [150, 8211], + [151, 8212], + [152, 732], + [153, 8482], + [154, 353], + [155, 8250], + [156, 339], + [158, 382], + [159, 376] +]); +var Ko; +! function(e) { + e[e.DATA = 0] = "DATA", e[e.RCDATA = 1] = "RCDATA", e[e.RAWTEXT = 2] = "RAWTEXT", e[e.SCRIPT_DATA = 3] = "SCRIPT_DATA", e[e.PLAINTEXT = 4] = "PLAINTEXT", e[e.TAG_OPEN = 5] = "TAG_OPEN", e[e.END_TAG_OPEN = 6] = "END_TAG_OPEN", e[e.TAG_NAME = 7] = "TAG_NAME", e[e.RCDATA_LESS_THAN_SIGN = 8] = "RCDATA_LESS_THAN_SIGN", e[e.RCDATA_END_TAG_OPEN = 9] = "RCDATA_END_TAG_OPEN", e[e.RCDATA_END_TAG_NAME = 10] = "RCDATA_END_TAG_NAME", e[e.RAWTEXT_LESS_THAN_SIGN = 11] = "RAWTEXT_LESS_THAN_SIGN", e[e.RAWTEXT_END_TAG_OPEN = 12] = "RAWTEXT_END_TAG_OPEN", e[e.RAWTEXT_END_TAG_NAME = 13] = "RAWTEXT_END_TAG_NAME", e[e.SCRIPT_DATA_LESS_THAN_SIGN = 14] = "SCRIPT_DATA_LESS_THAN_SIGN", e[e.SCRIPT_DATA_END_TAG_OPEN = 15] = "SCRIPT_DATA_END_TAG_OPEN", e[e.SCRIPT_DATA_END_TAG_NAME = 16] = "SCRIPT_DATA_END_TAG_NAME", e[e.SCRIPT_DATA_ESCAPE_START = 17] = "SCRIPT_DATA_ESCAPE_START", e[e.SCRIPT_DATA_ESCAPE_START_DASH = 18] = "SCRIPT_DATA_ESCAPE_START_DASH", e[e.SCRIPT_DATA_ESCAPED = 19] = "SCRIPT_DATA_ESCAPED", e[e.SCRIPT_DATA_ESCAPED_DASH = 20] = "SCRIPT_DATA_ESCAPED_DASH", e[e.SCRIPT_DATA_ESCAPED_DASH_DASH = 21] = "SCRIPT_DATA_ESCAPED_DASH_DASH", e[e.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN = 22] = "SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN", e[e.SCRIPT_DATA_ESCAPED_END_TAG_OPEN = 23] = "SCRIPT_DATA_ESCAPED_END_TAG_OPEN", e[e.SCRIPT_DATA_ESCAPED_END_TAG_NAME = 24] = "SCRIPT_DATA_ESCAPED_END_TAG_NAME", e[e.SCRIPT_DATA_DOUBLE_ESCAPE_START = 25] = "SCRIPT_DATA_DOUBLE_ESCAPE_START", e[e.SCRIPT_DATA_DOUBLE_ESCAPED = 26] = "SCRIPT_DATA_DOUBLE_ESCAPED", e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH = 27] = "SCRIPT_DATA_DOUBLE_ESCAPED_DASH", e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH = 28] = "SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH", e[e.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN = 29] = "SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN", e[e.SCRIPT_DATA_DOUBLE_ESCAPE_END = 30] = "SCRIPT_DATA_DOUBLE_ESCAPE_END", e[e.BEFORE_ATTRIBUTE_NAME = 31] = "BEFORE_ATTRIBUTE_NAME", e[e.ATTRIBUTE_NAME = 32] = "ATTRIBUTE_NAME", e[e.AFTER_ATTRIBUTE_NAME = 33] = "AFTER_ATTRIBUTE_NAME", e[e.BEFORE_ATTRIBUTE_VALUE = 34] = "BEFORE_ATTRIBUTE_VALUE", e[e.ATTRIBUTE_VALUE_DOUBLE_QUOTED = 35] = "ATTRIBUTE_VALUE_DOUBLE_QUOTED", e[e.ATTRIBUTE_VALUE_SINGLE_QUOTED = 36] = "ATTRIBUTE_VALUE_SINGLE_QUOTED", e[e.ATTRIBUTE_VALUE_UNQUOTED = 37] = "ATTRIBUTE_VALUE_UNQUOTED", e[e.AFTER_ATTRIBUTE_VALUE_QUOTED = 38] = "AFTER_ATTRIBUTE_VALUE_QUOTED", e[e.SELF_CLOSING_START_TAG = 39] = "SELF_CLOSING_START_TAG", e[e.BOGUS_COMMENT = 40] = "BOGUS_COMMENT", e[e.MARKUP_DECLARATION_OPEN = 41] = "MARKUP_DECLARATION_OPEN", e[e.COMMENT_START = 42] = "COMMENT_START", e[e.COMMENT_START_DASH = 43] = "COMMENT_START_DASH", e[e.COMMENT = 44] = "COMMENT", e[e.COMMENT_LESS_THAN_SIGN = 45] = "COMMENT_LESS_THAN_SIGN", e[e.COMMENT_LESS_THAN_SIGN_BANG = 46] = "COMMENT_LESS_THAN_SIGN_BANG", e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH = 47] = "COMMENT_LESS_THAN_SIGN_BANG_DASH", e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH = 48] = "COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH", e[e.COMMENT_END_DASH = 49] = "COMMENT_END_DASH", e[e.COMMENT_END = 50] = "COMMENT_END", e[e.COMMENT_END_BANG = 51] = "COMMENT_END_BANG", e[e.DOCTYPE = 52] = "DOCTYPE", e[e.BEFORE_DOCTYPE_NAME = 53] = "BEFORE_DOCTYPE_NAME", e[e.DOCTYPE_NAME = 54] = "DOCTYPE_NAME", e[e.AFTER_DOCTYPE_NAME = 55] = "AFTER_DOCTYPE_NAME", e[e.AFTER_DOCTYPE_PUBLIC_KEYWORD = 56] = "AFTER_DOCTYPE_PUBLIC_KEYWORD", e[e.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER = 57] = "BEFORE_DOCTYPE_PUBLIC_IDENTIFIER", e[e.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED = 58] = "DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED", e[e.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED = 59] = "DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED", e[e.AFTER_DOCTYPE_PUBLIC_IDENTIFIER = 60] = "AFTER_DOCTYPE_PUBLIC_IDENTIFIER", e[e.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS = 61] = "BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS", e[e.AFTER_DOCTYPE_SYSTEM_KEYWORD = 62] = "AFTER_DOCTYPE_SYSTEM_KEYWORD", e[e.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER = 63] = "BEFORE_DOCTYPE_SYSTEM_IDENTIFIER", e[e.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED = 64] = "DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED", e[e.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED = 65] = "DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED", e[e.AFTER_DOCTYPE_SYSTEM_IDENTIFIER = 66] = "AFTER_DOCTYPE_SYSTEM_IDENTIFIER", e[e.BOGUS_DOCTYPE = 67] = "BOGUS_DOCTYPE", e[e.CDATA_SECTION = 68] = "CDATA_SECTION", e[e.CDATA_SECTION_BRACKET = 69] = "CDATA_SECTION_BRACKET", e[e.CDATA_SECTION_END = 70] = "CDATA_SECTION_END", e[e.CHARACTER_REFERENCE = 71] = "CHARACTER_REFERENCE", e[e.NAMED_CHARACTER_REFERENCE = 72] = "NAMED_CHARACTER_REFERENCE", e[e.AMBIGUOUS_AMPERSAND = 73] = "AMBIGUOUS_AMPERSAND", e[e.NUMERIC_CHARACTER_REFERENCE = 74] = "NUMERIC_CHARACTER_REFERENCE", e[e.HEXADEMICAL_CHARACTER_REFERENCE_START = 75] = "HEXADEMICAL_CHARACTER_REFERENCE_START", e[e.HEXADEMICAL_CHARACTER_REFERENCE = 76] = "HEXADEMICAL_CHARACTER_REFERENCE", e[e.DECIMAL_CHARACTER_REFERENCE = 77] = "DECIMAL_CHARACTER_REFERENCE", e[e.NUMERIC_CHARACTER_REFERENCE_END = 78] = "NUMERIC_CHARACTER_REFERENCE_END" +}(Ko || (Ko = {})); +const jo = { + DATA: Ko.DATA, + RCDATA: Ko.RCDATA, + RAWTEXT: Ko.RAWTEXT, + SCRIPT_DATA: Ko.SCRIPT_DATA, + PLAINTEXT: Ko.PLAINTEXT, + CDATA_SECTION: Ko.CDATA_SECTION +}; + +function Vo(e) { + return e >= io.DIGIT_0 && e <= io.DIGIT_9 +} + +function Wo(e) { + return e >= io.LATIN_CAPITAL_A && e <= io.LATIN_CAPITAL_Z +} + +function Qo(e) { + return function(e) { + return e >= io.LATIN_SMALL_A && e <= io.LATIN_SMALL_Z + }(e) || Wo(e) +} + +function Xo(e) { + return Qo(e) || Vo(e) +} + +function $o(e) { + return e >= io.LATIN_CAPITAL_A && e <= io.LATIN_CAPITAL_F +} + +function zo(e) { + return e >= io.LATIN_SMALL_A && e <= io.LATIN_SMALL_F +} + +function Jo(e) { + return e + 32 +} + +function Zo(e) { + return e === io.SPACE || e === io.LINE_FEED || e === io.TABULATION || e === io.FORM_FEED +} + +function ec(e) { + return Zo(e) || e === io.SOLIDUS || e === io.GREATER_THAN_SIGN +} +class tc { + constructor(e, t) { + this.options = e, this.handler = t, this.paused = !1, this.inLoop = !1, this.inForeignNode = !1, this.lastStartTagName = "", this.active = !1, this.state = Ko.DATA, this.returnState = Ko.DATA, this.charRefCode = -1, this.consumedAfterSnapshot = -1, this.currentCharacterToken = null, this.currentToken = null, this.currentAttr = { + name: "", + value: "" + }, this.preprocessor = new mo(t), this.currentLocation = this.getCurrentLocation(-1) + } + _err(e) { + var t, n; + null === (n = (t = this.handler).onParseError) || void 0 === n || n.call(t, this.preprocessor.getError(e)) + } + getCurrentLocation(e) { + return this.options.sourceCodeLocationInfo ? { + startLine: this.preprocessor.line, + startCol: this.preprocessor.col - e, + startOffset: this.preprocessor.offset - e, + endLine: -1, + endCol: -1, + endOffset: -1 + } : null + } + _runParsingLoop() { + if (!this.inLoop) { + for (this.inLoop = !0; this.active && !this.paused;) { + this.consumedAfterSnapshot = 0; + const e = this._consume(); + this._ensureHibernation() || this._callState(e) + } + this.inLoop = !1 + } + } + pause() { + this.paused = !0 + } + resume(e) { + if (!this.paused) throw new Error("Parser was already resumed"); + this.paused = !1, this.inLoop || (this._runParsingLoop(), this.paused || null == e || e()) + } + write(e, t, n) { + this.active = !0, this.preprocessor.write(e, t), this._runParsingLoop(), this.paused || null == n || n() + } + insertHtmlAtCurrentPos(e) { + this.active = !0, this.preprocessor.insertHtmlAtCurrentPos(e), this._runParsingLoop() + } + _ensureHibernation() { + return !!this.preprocessor.endOfChunkHit && (this._unconsume(this.consumedAfterSnapshot), this.active = !1, !0) + } + _consume() { + return this.consumedAfterSnapshot++, this.preprocessor.advance() + } + _unconsume(e) { + this.consumedAfterSnapshot -= e, this.preprocessor.retreat(e) + } + _reconsumeInState(e, t) { + this.state = e, this._callState(t) + } + _advanceBy(e) { + this.consumedAfterSnapshot += e; + for (let t = 0; t < e; t++) this.preprocessor.advance() + } + _consumeSequenceIfMatch(e, t) { + return !!this.preprocessor.startsWith(e, t) && (this._advanceBy(e.length - 1), !0) + } + _createStartTagToken() { + this.currentToken = { + type: To.START_TAG, + tagName: "", + tagID: Po.UNKNOWN, + selfClosing: !1, + ackSelfClosing: !1, + attrs: [], + location: this.getCurrentLocation(1) + } + } + _createEndTagToken() { + this.currentToken = { + type: To.END_TAG, + tagName: "", + tagID: Po.UNKNOWN, + selfClosing: !1, + ackSelfClosing: !1, + attrs: [], + location: this.getCurrentLocation(2) + } + } + _createCommentToken(e) { + this.currentToken = { + type: To.COMMENT, + data: "", + location: this.getCurrentLocation(e) + } + } + _createDoctypeToken(e) { + this.currentToken = { + type: To.DOCTYPE, + name: e, + forceQuirks: !1, + publicId: null, + systemId: null, + location: this.currentLocation + } + } + _createCharacterToken(e, t) { + this.currentCharacterToken = { + type: e, + chars: t, + location: this.currentLocation + } + } + _createAttr(e) { + this.currentAttr = { + name: e, + value: "" + }, this.currentLocation = this.getCurrentLocation(0) + } + _leaveAttrName() { + var e, t; + const n = this.currentToken; + if (null === _o(n, this.currentAttr.name)) { + if (n.attrs.push(this.currentAttr), n.location && this.currentLocation) { + (null !== (e = (t = n.location).attrs) && void 0 !== e ? e : t.attrs = Object.create(null))[this.currentAttr.name] = this.currentLocation, this._leaveAttrValue() + } + } else this._err(Eo.duplicateAttribute) + } + _leaveAttrValue() { + this.currentLocation && (this.currentLocation.endLine = this.preprocessor.line, this.currentLocation.endCol = this.preprocessor.col, this.currentLocation.endOffset = this.preprocessor.offset) + } + prepareToken(e) { + this._emitCurrentCharacterToken(e.location), this.currentToken = null, e.location && (e.location.endLine = this.preprocessor.line, e.location.endCol = this.preprocessor.col + 1, e.location.endOffset = this.preprocessor.offset + 1), this.currentLocation = this.getCurrentLocation(-1) + } + emitCurrentTagToken() { + const e = this.currentToken; + this.prepareToken(e), e.tagID = Fo(e.tagName), e.type === To.START_TAG ? (this.lastStartTagName = e.tagName, this.handler.onStartTag(e)) : (e.attrs.length > 0 && this._err(Eo.endTagWithAttributes), e.selfClosing && this._err(Eo.endTagWithTrailingSolidus), this.handler.onEndTag(e)), this.preprocessor.dropParsedChunk() + } + emitCurrentComment(e) { + this.prepareToken(e), this.handler.onComment(e), this.preprocessor.dropParsedChunk() + } + emitCurrentDoctype(e) { + this.prepareToken(e), this.handler.onDoctype(e), this.preprocessor.dropParsedChunk() + } + _emitCurrentCharacterToken(e) { + if (this.currentCharacterToken) { + switch (e && this.currentCharacterToken.location && (this.currentCharacterToken.location.endLine = e.startLine, this.currentCharacterToken.location.endCol = e.startCol, this.currentCharacterToken.location.endOffset = e.startOffset), this.currentCharacterToken.type) { + case To.CHARACTER: + this.handler.onCharacter(this.currentCharacterToken); + break; + case To.NULL_CHARACTER: + this.handler.onNullCharacter(this.currentCharacterToken); + break; + case To.WHITESPACE_CHARACTER: + this.handler.onWhitespaceCharacter(this.currentCharacterToken) + } + this.currentCharacterToken = null + } + } + _emitEOFToken() { + const e = this.getCurrentLocation(0); + e && (e.endLine = e.startLine, e.endCol = e.startCol, e.endOffset = e.startOffset), this._emitCurrentCharacterToken(e), this.handler.onEof({ + type: To.EOF, + location: e + }), this.active = !1 + } + _appendCharToCurrentCharacterToken(e, t) { + if (this.currentCharacterToken) { + if (this.currentCharacterToken.type === e) return void(this.currentCharacterToken.chars += t); + this.currentLocation = this.getCurrentLocation(0), this._emitCurrentCharacterToken(this.currentLocation), this.preprocessor.dropParsedChunk() + } + this._createCharacterToken(e, t) + } + _emitCodePoint(e) { + const t = Zo(e) ? To.WHITESPACE_CHARACTER : e === io.NULL ? To.NULL_CHARACTER : To.CHARACTER; + this._appendCharToCurrentCharacterToken(t, String.fromCodePoint(e)) + } + _emitChars(e) { + this._appendCharToCurrentCharacterToken(To.CHARACTER, e) + } + _matchNamedCharacterReference(e) { + let t = null, + n = 0, + r = !1; + for (let s = 0, a = wo[0]; s >= 0 && (s = Oo(wo, a, s + 1, e), !(s < 0)); e = this._consume()) { + n += 1, a = wo[s]; + const o = a & yo.VALUE_LENGTH; + if (o) { + const a = (o >> 14) - 1; + if (e !== io.SEMICOLON && this._isCharacterReferenceInAttribute() && ((i = this.preprocessor.peek(1)) === io.EQUALS_SIGN || Xo(i)) ? (t = [io.AMPERSAND], s += a) : (t = 0 === a ? [wo[s] & ~yo.VALUE_LENGTH] : 1 === a ? [wo[++s]] : [wo[++s], wo[++s]], n = 0, r = e !== io.SEMICOLON), 0 === a) { + this._consume(); + break + } + } + } + var i; + return this._unconsume(n), r && !this.preprocessor.endOfChunkHit && this._err(Eo.missingSemicolonAfterCharacterReference), this._unconsume(1), t + } + _isCharacterReferenceInAttribute() { + return this.returnState === Ko.ATTRIBUTE_VALUE_DOUBLE_QUOTED || this.returnState === Ko.ATTRIBUTE_VALUE_SINGLE_QUOTED || this.returnState === Ko.ATTRIBUTE_VALUE_UNQUOTED + } + _flushCodePointConsumedAsCharacterReference(e) { + this._isCharacterReferenceInAttribute() ? this.currentAttr.value += String.fromCodePoint(e) : this._emitCodePoint(e) + } + _callState(e) { + switch (this.state) { + case Ko.DATA: + this._stateData(e); + break; + case Ko.RCDATA: + this._stateRcdata(e); + break; + case Ko.RAWTEXT: + this._stateRawtext(e); + break; + case Ko.SCRIPT_DATA: + this._stateScriptData(e); + break; + case Ko.PLAINTEXT: + this._statePlaintext(e); + break; + case Ko.TAG_OPEN: + this._stateTagOpen(e); + break; + case Ko.END_TAG_OPEN: + this._stateEndTagOpen(e); + break; + case Ko.TAG_NAME: + this._stateTagName(e); + break; + case Ko.RCDATA_LESS_THAN_SIGN: + this._stateRcdataLessThanSign(e); + break; + case Ko.RCDATA_END_TAG_OPEN: + this._stateRcdataEndTagOpen(e); + break; + case Ko.RCDATA_END_TAG_NAME: + this._stateRcdataEndTagName(e); + break; + case Ko.RAWTEXT_LESS_THAN_SIGN: + this._stateRawtextLessThanSign(e); + break; + case Ko.RAWTEXT_END_TAG_OPEN: + this._stateRawtextEndTagOpen(e); + break; + case Ko.RAWTEXT_END_TAG_NAME: + this._stateRawtextEndTagName(e); + break; + case Ko.SCRIPT_DATA_LESS_THAN_SIGN: + this._stateScriptDataLessThanSign(e); + break; + case Ko.SCRIPT_DATA_END_TAG_OPEN: + this._stateScriptDataEndTagOpen(e); + break; + case Ko.SCRIPT_DATA_END_TAG_NAME: + this._stateScriptDataEndTagName(e); + break; + case Ko.SCRIPT_DATA_ESCAPE_START: + this._stateScriptDataEscapeStart(e); + break; + case Ko.SCRIPT_DATA_ESCAPE_START_DASH: + this._stateScriptDataEscapeStartDash(e); + break; + case Ko.SCRIPT_DATA_ESCAPED: + this._stateScriptDataEscaped(e); + break; + case Ko.SCRIPT_DATA_ESCAPED_DASH: + this._stateScriptDataEscapedDash(e); + break; + case Ko.SCRIPT_DATA_ESCAPED_DASH_DASH: + this._stateScriptDataEscapedDashDash(e); + break; + case Ko.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN: + this._stateScriptDataEscapedLessThanSign(e); + break; + case Ko.SCRIPT_DATA_ESCAPED_END_TAG_OPEN: + this._stateScriptDataEscapedEndTagOpen(e); + break; + case Ko.SCRIPT_DATA_ESCAPED_END_TAG_NAME: + this._stateScriptDataEscapedEndTagName(e); + break; + case Ko.SCRIPT_DATA_DOUBLE_ESCAPE_START: + this._stateScriptDataDoubleEscapeStart(e); + break; + case Ko.SCRIPT_DATA_DOUBLE_ESCAPED: + this._stateScriptDataDoubleEscaped(e); + break; + case Ko.SCRIPT_DATA_DOUBLE_ESCAPED_DASH: + this._stateScriptDataDoubleEscapedDash(e); + break; + case Ko.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH: + this._stateScriptDataDoubleEscapedDashDash(e); + break; + case Ko.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN: + this._stateScriptDataDoubleEscapedLessThanSign(e); + break; + case Ko.SCRIPT_DATA_DOUBLE_ESCAPE_END: + this._stateScriptDataDoubleEscapeEnd(e); + break; + case Ko.BEFORE_ATTRIBUTE_NAME: + this._stateBeforeAttributeName(e); + break; + case Ko.ATTRIBUTE_NAME: + this._stateAttributeName(e); + break; + case Ko.AFTER_ATTRIBUTE_NAME: + this._stateAfterAttributeName(e); + break; + case Ko.BEFORE_ATTRIBUTE_VALUE: + this._stateBeforeAttributeValue(e); + break; + case Ko.ATTRIBUTE_VALUE_DOUBLE_QUOTED: + this._stateAttributeValueDoubleQuoted(e); + break; + case Ko.ATTRIBUTE_VALUE_SINGLE_QUOTED: + this._stateAttributeValueSingleQuoted(e); + break; + case Ko.ATTRIBUTE_VALUE_UNQUOTED: + this._stateAttributeValueUnquoted(e); + break; + case Ko.AFTER_ATTRIBUTE_VALUE_QUOTED: + this._stateAfterAttributeValueQuoted(e); + break; + case Ko.SELF_CLOSING_START_TAG: + this._stateSelfClosingStartTag(e); + break; + case Ko.BOGUS_COMMENT: + this._stateBogusComment(e); + break; + case Ko.MARKUP_DECLARATION_OPEN: + this._stateMarkupDeclarationOpen(e); + break; + case Ko.COMMENT_START: + this._stateCommentStart(e); + break; + case Ko.COMMENT_START_DASH: + this._stateCommentStartDash(e); + break; + case Ko.COMMENT: + this._stateComment(e); + break; + case Ko.COMMENT_LESS_THAN_SIGN: + this._stateCommentLessThanSign(e); + break; + case Ko.COMMENT_LESS_THAN_SIGN_BANG: + this._stateCommentLessThanSignBang(e); + break; + case Ko.COMMENT_LESS_THAN_SIGN_BANG_DASH: + this._stateCommentLessThanSignBangDash(e); + break; + case Ko.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH: + this._stateCommentLessThanSignBangDashDash(e); + break; + case Ko.COMMENT_END_DASH: + this._stateCommentEndDash(e); + break; + case Ko.COMMENT_END: + this._stateCommentEnd(e); + break; + case Ko.COMMENT_END_BANG: + this._stateCommentEndBang(e); + break; + case Ko.DOCTYPE: + this._stateDoctype(e); + break; + case Ko.BEFORE_DOCTYPE_NAME: + this._stateBeforeDoctypeName(e); + break; + case Ko.DOCTYPE_NAME: + this._stateDoctypeName(e); + break; + case Ko.AFTER_DOCTYPE_NAME: + this._stateAfterDoctypeName(e); + break; + case Ko.AFTER_DOCTYPE_PUBLIC_KEYWORD: + this._stateAfterDoctypePublicKeyword(e); + break; + case Ko.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER: + this._stateBeforeDoctypePublicIdentifier(e); + break; + case Ko.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED: + this._stateDoctypePublicIdentifierDoubleQuoted(e); + break; + case Ko.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED: + this._stateDoctypePublicIdentifierSingleQuoted(e); + break; + case Ko.AFTER_DOCTYPE_PUBLIC_IDENTIFIER: + this._stateAfterDoctypePublicIdentifier(e); + break; + case Ko.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS: + this._stateBetweenDoctypePublicAndSystemIdentifiers(e); + break; + case Ko.AFTER_DOCTYPE_SYSTEM_KEYWORD: + this._stateAfterDoctypeSystemKeyword(e); + break; + case Ko.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER: + this._stateBeforeDoctypeSystemIdentifier(e); + break; + case Ko.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED: + this._stateDoctypeSystemIdentifierDoubleQuoted(e); + break; + case Ko.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED: + this._stateDoctypeSystemIdentifierSingleQuoted(e); + break; + case Ko.AFTER_DOCTYPE_SYSTEM_IDENTIFIER: + this._stateAfterDoctypeSystemIdentifier(e); + break; + case Ko.BOGUS_DOCTYPE: + this._stateBogusDoctype(e); + break; + case Ko.CDATA_SECTION: + this._stateCdataSection(e); + break; + case Ko.CDATA_SECTION_BRACKET: + this._stateCdataSectionBracket(e); + break; + case Ko.CDATA_SECTION_END: + this._stateCdataSectionEnd(e); + break; + case Ko.CHARACTER_REFERENCE: + this._stateCharacterReference(e); + break; + case Ko.NAMED_CHARACTER_REFERENCE: + this._stateNamedCharacterReference(e); + break; + case Ko.AMBIGUOUS_AMPERSAND: + this._stateAmbiguousAmpersand(e); + break; + case Ko.NUMERIC_CHARACTER_REFERENCE: + this._stateNumericCharacterReference(e); + break; + case Ko.HEXADEMICAL_CHARACTER_REFERENCE_START: + this._stateHexademicalCharacterReferenceStart(e); + break; + case Ko.HEXADEMICAL_CHARACTER_REFERENCE: + this._stateHexademicalCharacterReference(e); + break; + case Ko.DECIMAL_CHARACTER_REFERENCE: + this._stateDecimalCharacterReference(e); + break; + case Ko.NUMERIC_CHARACTER_REFERENCE_END: + this._stateNumericCharacterReferenceEnd(e); + break; + default: + throw new Error("Unknown state") + } + } + _stateData(e) { + switch (e) { + case io.LESS_THAN_SIGN: + this.state = Ko.TAG_OPEN; + break; + case io.AMPERSAND: + this.returnState = Ko.DATA, this.state = Ko.CHARACTER_REFERENCE; + break; + case io.NULL: + this._err(Eo.unexpectedNullCharacter), this._emitCodePoint(e); + break; + case io.EOF: + this._emitEOFToken(); + break; + default: + this._emitCodePoint(e) + } + } + _stateRcdata(e) { + switch (e) { + case io.AMPERSAND: + this.returnState = Ko.RCDATA, this.state = Ko.CHARACTER_REFERENCE; + break; + case io.LESS_THAN_SIGN: + this.state = Ko.RCDATA_LESS_THAN_SIGN; + break; + case io.NULL: + this._err(Eo.unexpectedNullCharacter), this._emitChars("�"); + break; + case io.EOF: + this._emitEOFToken(); + break; + default: + this._emitCodePoint(e) + } + } + _stateRawtext(e) { + switch (e) { + case io.LESS_THAN_SIGN: + this.state = Ko.RAWTEXT_LESS_THAN_SIGN; + break; + case io.NULL: + this._err(Eo.unexpectedNullCharacter), this._emitChars("�"); + break; + case io.EOF: + this._emitEOFToken(); + break; + default: + this._emitCodePoint(e) + } + } + _stateScriptData(e) { + switch (e) { + case io.LESS_THAN_SIGN: + this.state = Ko.SCRIPT_DATA_LESS_THAN_SIGN; + break; + case io.NULL: + this._err(Eo.unexpectedNullCharacter), this._emitChars("�"); + break; + case io.EOF: + this._emitEOFToken(); + break; + default: + this._emitCodePoint(e) + } + } + _statePlaintext(e) { + switch (e) { + case io.NULL: + this._err(Eo.unexpectedNullCharacter), this._emitChars("�"); + break; + case io.EOF: + this._emitEOFToken(); + break; + default: + this._emitCodePoint(e) + } + } + _stateTagOpen(e) { + if (Qo(e)) this._createStartTagToken(), this.state = Ko.TAG_NAME, this._stateTagName(e); + else switch (e) { + case io.EXCLAMATION_MARK: + this.state = Ko.MARKUP_DECLARATION_OPEN; + break; + case io.SOLIDUS: + this.state = Ko.END_TAG_OPEN; + break; + case io.QUESTION_MARK: + this._err(Eo.unexpectedQuestionMarkInsteadOfTagName), this._createCommentToken(1), this.state = Ko.BOGUS_COMMENT, this._stateBogusComment(e); + break; + case io.EOF: + this._err(Eo.eofBeforeTagName), this._emitChars("<"), this._emitEOFToken(); + break; + default: + this._err(Eo.invalidFirstCharacterOfTagName), this._emitChars("<"), this.state = Ko.DATA, this._stateData(e) + } + } + _stateEndTagOpen(e) { + if (Qo(e)) this._createEndTagToken(), this.state = Ko.TAG_NAME, this._stateTagName(e); + else switch (e) { + case io.GREATER_THAN_SIGN: + this._err(Eo.missingEndTagName), this.state = Ko.DATA; + break; + case io.EOF: + this._err(Eo.eofBeforeTagName), this._emitChars(""); + break; + case io.NULL: + this._err(Eo.unexpectedNullCharacter), this.state = Ko.SCRIPT_DATA_ESCAPED, this._emitChars("�"); + break; + case io.EOF: + this._err(Eo.eofInScriptHtmlCommentLikeText), this._emitEOFToken(); + break; + default: + this.state = Ko.SCRIPT_DATA_ESCAPED, this._emitCodePoint(e) + } + } + _stateScriptDataEscapedLessThanSign(e) { + e === io.SOLIDUS ? this.state = Ko.SCRIPT_DATA_ESCAPED_END_TAG_OPEN : Qo(e) ? (this._emitChars("<"), this.state = Ko.SCRIPT_DATA_DOUBLE_ESCAPE_START, this._stateScriptDataDoubleEscapeStart(e)) : (this._emitChars("<"), this.state = Ko.SCRIPT_DATA_ESCAPED, this._stateScriptDataEscaped(e)) + } + _stateScriptDataEscapedEndTagOpen(e) { + Qo(e) ? (this.state = Ko.SCRIPT_DATA_ESCAPED_END_TAG_NAME, this._stateScriptDataEscapedEndTagName(e)) : (this._emitChars(""); + break; + case io.NULL: + this._err(Eo.unexpectedNullCharacter), this.state = Ko.SCRIPT_DATA_DOUBLE_ESCAPED, this._emitChars("�"); + break; + case io.EOF: + this._err(Eo.eofInScriptHtmlCommentLikeText), this._emitEOFToken(); + break; + default: + this.state = Ko.SCRIPT_DATA_DOUBLE_ESCAPED, this._emitCodePoint(e) + } + } + _stateScriptDataDoubleEscapedLessThanSign(e) { + e === io.SOLIDUS ? (this.state = Ko.SCRIPT_DATA_DOUBLE_ESCAPE_END, this._emitChars("/")) : (this.state = Ko.SCRIPT_DATA_DOUBLE_ESCAPED, this._stateScriptDataDoubleEscaped(e)) + } + _stateScriptDataDoubleEscapeEnd(e) { + if (this.preprocessor.startsWith(co, !1) && ec(this.preprocessor.peek(co.length))) { + this._emitCodePoint(e); + for (let e = 0; e < co.length; e++) this._emitCodePoint(this._consume()); + this.state = Ko.SCRIPT_DATA_ESCAPED + } else this._ensureHibernation() || (this.state = Ko.SCRIPT_DATA_DOUBLE_ESCAPED, this._stateScriptDataDoubleEscaped(e)) + } + _stateBeforeAttributeName(e) { + switch (e) { + case io.SPACE: + case io.LINE_FEED: + case io.TABULATION: + case io.FORM_FEED: + break; + case io.SOLIDUS: + case io.GREATER_THAN_SIGN: + case io.EOF: + this.state = Ko.AFTER_ATTRIBUTE_NAME, this._stateAfterAttributeName(e); + break; + case io.EQUALS_SIGN: + this._err(Eo.unexpectedEqualsSignBeforeAttributeName), this._createAttr("="), this.state = Ko.ATTRIBUTE_NAME; + break; + default: + this._createAttr(""), this.state = Ko.ATTRIBUTE_NAME, this._stateAttributeName(e) + } + } + _stateAttributeName(e) { + switch (e) { + case io.SPACE: + case io.LINE_FEED: + case io.TABULATION: + case io.FORM_FEED: + case io.SOLIDUS: + case io.GREATER_THAN_SIGN: + case io.EOF: + this._leaveAttrName(), this.state = Ko.AFTER_ATTRIBUTE_NAME, this._stateAfterAttributeName(e); + break; + case io.EQUALS_SIGN: + this._leaveAttrName(), this.state = Ko.BEFORE_ATTRIBUTE_VALUE; + break; + case io.QUOTATION_MARK: + case io.APOSTROPHE: + case io.LESS_THAN_SIGN: + this._err(Eo.unexpectedCharacterInAttributeName), this.currentAttr.name += String.fromCodePoint(e); + break; + case io.NULL: + this._err(Eo.unexpectedNullCharacter), this.currentAttr.name += "�"; + break; + default: + this.currentAttr.name += String.fromCodePoint(Wo(e) ? Jo(e) : e) + } + } + _stateAfterAttributeName(e) { + switch (e) { + case io.SPACE: + case io.LINE_FEED: + case io.TABULATION: + case io.FORM_FEED: + break; + case io.SOLIDUS: + this.state = Ko.SELF_CLOSING_START_TAG; + break; + case io.EQUALS_SIGN: + this.state = Ko.BEFORE_ATTRIBUTE_VALUE; + break; + case io.GREATER_THAN_SIGN: + this.state = Ko.DATA, this.emitCurrentTagToken(); + break; + case io.EOF: + this._err(Eo.eofInTag), this._emitEOFToken(); + break; + default: + this._createAttr(""), this.state = Ko.ATTRIBUTE_NAME, this._stateAttributeName(e) + } + } + _stateBeforeAttributeValue(e) { + switch (e) { + case io.SPACE: + case io.LINE_FEED: + case io.TABULATION: + case io.FORM_FEED: + break; + case io.QUOTATION_MARK: + this.state = Ko.ATTRIBUTE_VALUE_DOUBLE_QUOTED; + break; + case io.APOSTROPHE: + this.state = Ko.ATTRIBUTE_VALUE_SINGLE_QUOTED; + break; + case io.GREATER_THAN_SIGN: + this._err(Eo.missingAttributeValue), this.state = Ko.DATA, this.emitCurrentTagToken(); + break; + default: + this.state = Ko.ATTRIBUTE_VALUE_UNQUOTED, this._stateAttributeValueUnquoted(e) + } + } + _stateAttributeValueDoubleQuoted(e) { + switch (e) { + case io.QUOTATION_MARK: + this.state = Ko.AFTER_ATTRIBUTE_VALUE_QUOTED; + break; + case io.AMPERSAND: + this.returnState = Ko.ATTRIBUTE_VALUE_DOUBLE_QUOTED, this.state = Ko.CHARACTER_REFERENCE; + break; + case io.NULL: + this._err(Eo.unexpectedNullCharacter), this.currentAttr.value += "�"; + break; + case io.EOF: + this._err(Eo.eofInTag), this._emitEOFToken(); + break; + default: + this.currentAttr.value += String.fromCodePoint(e) + } + } + _stateAttributeValueSingleQuoted(e) { + switch (e) { + case io.APOSTROPHE: + this.state = Ko.AFTER_ATTRIBUTE_VALUE_QUOTED; + break; + case io.AMPERSAND: + this.returnState = Ko.ATTRIBUTE_VALUE_SINGLE_QUOTED, this.state = Ko.CHARACTER_REFERENCE; + break; + case io.NULL: + this._err(Eo.unexpectedNullCharacter), this.currentAttr.value += "�"; + break; + case io.EOF: + this._err(Eo.eofInTag), this._emitEOFToken(); + break; + default: + this.currentAttr.value += String.fromCodePoint(e) + } + } + _stateAttributeValueUnquoted(e) { + switch (e) { + case io.SPACE: + case io.LINE_FEED: + case io.TABULATION: + case io.FORM_FEED: + this._leaveAttrValue(), this.state = Ko.BEFORE_ATTRIBUTE_NAME; + break; + case io.AMPERSAND: + this.returnState = Ko.ATTRIBUTE_VALUE_UNQUOTED, this.state = Ko.CHARACTER_REFERENCE; + break; + case io.GREATER_THAN_SIGN: + this._leaveAttrValue(), this.state = Ko.DATA, this.emitCurrentTagToken(); + break; + case io.NULL: + this._err(Eo.unexpectedNullCharacter), this.currentAttr.value += "�"; + break; + case io.QUOTATION_MARK: + case io.APOSTROPHE: + case io.LESS_THAN_SIGN: + case io.EQUALS_SIGN: + case io.GRAVE_ACCENT: + this._err(Eo.unexpectedCharacterInUnquotedAttributeValue), this.currentAttr.value += String.fromCodePoint(e); + break; + case io.EOF: + this._err(Eo.eofInTag), this._emitEOFToken(); + break; + default: + this.currentAttr.value += String.fromCodePoint(e) + } + } + _stateAfterAttributeValueQuoted(e) { + switch (e) { + case io.SPACE: + case io.LINE_FEED: + case io.TABULATION: + case io.FORM_FEED: + this._leaveAttrValue(), this.state = Ko.BEFORE_ATTRIBUTE_NAME; + break; + case io.SOLIDUS: + this._leaveAttrValue(), this.state = Ko.SELF_CLOSING_START_TAG; + break; + case io.GREATER_THAN_SIGN: + this._leaveAttrValue(), this.state = Ko.DATA, this.emitCurrentTagToken(); + break; + case io.EOF: + this._err(Eo.eofInTag), this._emitEOFToken(); + break; + default: + this._err(Eo.missingWhitespaceBetweenAttributes), this.state = Ko.BEFORE_ATTRIBUTE_NAME, this._stateBeforeAttributeName(e) + } + } + _stateSelfClosingStartTag(e) { + switch (e) { + case io.GREATER_THAN_SIGN: + this.currentToken.selfClosing = !0, this.state = Ko.DATA, this.emitCurrentTagToken(); + break; + case io.EOF: + this._err(Eo.eofInTag), this._emitEOFToken(); + break; + default: + this._err(Eo.unexpectedSolidusInTag), this.state = Ko.BEFORE_ATTRIBUTE_NAME, this._stateBeforeAttributeName(e) + } + } + _stateBogusComment(e) { + const t = this.currentToken; + switch (e) { + case io.GREATER_THAN_SIGN: + this.state = Ko.DATA, this.emitCurrentComment(t); + break; + case io.EOF: + this.emitCurrentComment(t), this._emitEOFToken(); + break; + case io.NULL: + this._err(Eo.unexpectedNullCharacter), t.data += "�"; + break; + default: + t.data += String.fromCodePoint(e) + } + } + _stateMarkupDeclarationOpen(e) { + this._consumeSequenceIfMatch(so, !0) ? (this._createCommentToken(so.length + 1), this.state = Ko.COMMENT_START) : this._consumeSequenceIfMatch(oo, !1) ? (this.currentLocation = this.getCurrentLocation(oo.length + 1), this.state = Ko.DOCTYPE) : this._consumeSequenceIfMatch(ao, !0) ? this.inForeignNode ? this.state = Ko.CDATA_SECTION : (this._err(Eo.cdataInHtmlContent), this._createCommentToken(ao.length + 1), this.currentToken.data = "[CDATA[", this.state = Ko.BOGUS_COMMENT) : this._ensureHibernation() || (this._err(Eo.incorrectlyOpenedComment), this._createCommentToken(2), this.state = Ko.BOGUS_COMMENT, this._stateBogusComment(e)) + } + _stateCommentStart(e) { + switch (e) { + case io.HYPHEN_MINUS: + this.state = Ko.COMMENT_START_DASH; + break; + case io.GREATER_THAN_SIGN: { + this._err(Eo.abruptClosingOfEmptyComment), this.state = Ko.DATA; + const e = this.currentToken; + this.emitCurrentComment(e); + break + } + default: + this.state = Ko.COMMENT, this._stateComment(e) + } + } + _stateCommentStartDash(e) { + const t = this.currentToken; + switch (e) { + case io.HYPHEN_MINUS: + this.state = Ko.COMMENT_END; + break; + case io.GREATER_THAN_SIGN: + this._err(Eo.abruptClosingOfEmptyComment), this.state = Ko.DATA, this.emitCurrentComment(t); + break; + case io.EOF: + this._err(Eo.eofInComment), this.emitCurrentComment(t), this._emitEOFToken(); + break; + default: + t.data += "-", this.state = Ko.COMMENT, this._stateComment(e) + } + } + _stateComment(e) { + const t = this.currentToken; + switch (e) { + case io.HYPHEN_MINUS: + this.state = Ko.COMMENT_END_DASH; + break; + case io.LESS_THAN_SIGN: + t.data += "<", this.state = Ko.COMMENT_LESS_THAN_SIGN; + break; + case io.NULL: + this._err(Eo.unexpectedNullCharacter), t.data += "�"; + break; + case io.EOF: + this._err(Eo.eofInComment), this.emitCurrentComment(t), this._emitEOFToken(); + break; + default: + t.data += String.fromCodePoint(e) + } + } + _stateCommentLessThanSign(e) { + const t = this.currentToken; + switch (e) { + case io.EXCLAMATION_MARK: + t.data += "!", this.state = Ko.COMMENT_LESS_THAN_SIGN_BANG; + break; + case io.LESS_THAN_SIGN: + t.data += "<"; + break; + default: + this.state = Ko.COMMENT, this._stateComment(e) + } + } + _stateCommentLessThanSignBang(e) { + e === io.HYPHEN_MINUS ? this.state = Ko.COMMENT_LESS_THAN_SIGN_BANG_DASH : (this.state = Ko.COMMENT, this._stateComment(e)) + } + _stateCommentLessThanSignBangDash(e) { + e === io.HYPHEN_MINUS ? this.state = Ko.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH : (this.state = Ko.COMMENT_END_DASH, this._stateCommentEndDash(e)) + } + _stateCommentLessThanSignBangDashDash(e) { + e !== io.GREATER_THAN_SIGN && e !== io.EOF && this._err(Eo.nestedComment), this.state = Ko.COMMENT_END, this._stateCommentEnd(e) + } + _stateCommentEndDash(e) { + const t = this.currentToken; + switch (e) { + case io.HYPHEN_MINUS: + this.state = Ko.COMMENT_END; + break; + case io.EOF: + this._err(Eo.eofInComment), this.emitCurrentComment(t), this._emitEOFToken(); + break; + default: + t.data += "-", this.state = Ko.COMMENT, this._stateComment(e) + } + } + _stateCommentEnd(e) { + const t = this.currentToken; + switch (e) { + case io.GREATER_THAN_SIGN: + this.state = Ko.DATA, this.emitCurrentComment(t); + break; + case io.EXCLAMATION_MARK: + this.state = Ko.COMMENT_END_BANG; + break; + case io.HYPHEN_MINUS: + t.data += "-"; + break; + case io.EOF: + this._err(Eo.eofInComment), this.emitCurrentComment(t), this._emitEOFToken(); + break; + default: + t.data += "--", this.state = Ko.COMMENT, this._stateComment(e) + } + } + _stateCommentEndBang(e) { + const t = this.currentToken; + switch (e) { + case io.HYPHEN_MINUS: + t.data += "--!", this.state = Ko.COMMENT_END_DASH; + break; + case io.GREATER_THAN_SIGN: + this._err(Eo.incorrectlyClosedComment), this.state = Ko.DATA, this.emitCurrentComment(t); + break; + case io.EOF: + this._err(Eo.eofInComment), this.emitCurrentComment(t), this._emitEOFToken(); + break; + default: + t.data += "--!", this.state = Ko.COMMENT, this._stateComment(e) + } + } + _stateDoctype(e) { + switch (e) { + case io.SPACE: + case io.LINE_FEED: + case io.TABULATION: + case io.FORM_FEED: + this.state = Ko.BEFORE_DOCTYPE_NAME; + break; + case io.GREATER_THAN_SIGN: + this.state = Ko.BEFORE_DOCTYPE_NAME, this._stateBeforeDoctypeName(e); + break; + case io.EOF: { + this._err(Eo.eofInDoctype), this._createDoctypeToken(null); + const e = this.currentToken; + e.forceQuirks = !0, this.emitCurrentDoctype(e), this._emitEOFToken(); + break + } + default: + this._err(Eo.missingWhitespaceBeforeDoctypeName), this.state = Ko.BEFORE_DOCTYPE_NAME, this._stateBeforeDoctypeName(e) + } + } + _stateBeforeDoctypeName(e) { + if (Wo(e)) this._createDoctypeToken(String.fromCharCode(Jo(e))), this.state = Ko.DOCTYPE_NAME; + else switch (e) { + case io.SPACE: + case io.LINE_FEED: + case io.TABULATION: + case io.FORM_FEED: + break; + case io.NULL: + this._err(Eo.unexpectedNullCharacter), this._createDoctypeToken("�"), this.state = Ko.DOCTYPE_NAME; + break; + case io.GREATER_THAN_SIGN: { + this._err(Eo.missingDoctypeName), this._createDoctypeToken(null); + const e = this.currentToken; + e.forceQuirks = !0, this.emitCurrentDoctype(e), this.state = Ko.DATA; + break + } + case io.EOF: { + this._err(Eo.eofInDoctype), this._createDoctypeToken(null); + const e = this.currentToken; + e.forceQuirks = !0, this.emitCurrentDoctype(e), this._emitEOFToken(); + break + } + default: + this._createDoctypeToken(String.fromCodePoint(e)), this.state = Ko.DOCTYPE_NAME + } + } + _stateDoctypeName(e) { + const t = this.currentToken; + switch (e) { + case io.SPACE: + case io.LINE_FEED: + case io.TABULATION: + case io.FORM_FEED: + this.state = Ko.AFTER_DOCTYPE_NAME; + break; + case io.GREATER_THAN_SIGN: + this.state = Ko.DATA, this.emitCurrentDoctype(t); + break; + case io.NULL: + this._err(Eo.unexpectedNullCharacter), t.name += "�"; + break; + case io.EOF: + this._err(Eo.eofInDoctype), t.forceQuirks = !0, this.emitCurrentDoctype(t), this._emitEOFToken(); + break; + default: + t.name += String.fromCodePoint(Wo(e) ? Jo(e) : e) + } + } + _stateAfterDoctypeName(e) { + const t = this.currentToken; + switch (e) { + case io.SPACE: + case io.LINE_FEED: + case io.TABULATION: + case io.FORM_FEED: + break; + case io.GREATER_THAN_SIGN: + this.state = Ko.DATA, this.emitCurrentDoctype(t); + break; + case io.EOF: + this._err(Eo.eofInDoctype), t.forceQuirks = !0, this.emitCurrentDoctype(t), this._emitEOFToken(); + break; + default: + this._consumeSequenceIfMatch(lo, !1) ? this.state = Ko.AFTER_DOCTYPE_PUBLIC_KEYWORD : this._consumeSequenceIfMatch(ho, !1) ? this.state = Ko.AFTER_DOCTYPE_SYSTEM_KEYWORD : this._ensureHibernation() || (this._err(Eo.invalidCharacterSequenceAfterDoctypeName), t.forceQuirks = !0, this.state = Ko.BOGUS_DOCTYPE, this._stateBogusDoctype(e)) + } + } + _stateAfterDoctypePublicKeyword(e) { + const t = this.currentToken; + switch (e) { + case io.SPACE: + case io.LINE_FEED: + case io.TABULATION: + case io.FORM_FEED: + this.state = Ko.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER; + break; + case io.QUOTATION_MARK: + this._err(Eo.missingWhitespaceAfterDoctypePublicKeyword), t.publicId = "", this.state = Ko.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED; + break; + case io.APOSTROPHE: + this._err(Eo.missingWhitespaceAfterDoctypePublicKeyword), t.publicId = "", this.state = Ko.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED; + break; + case io.GREATER_THAN_SIGN: + this._err(Eo.missingDoctypePublicIdentifier), t.forceQuirks = !0, this.state = Ko.DATA, this.emitCurrentDoctype(t); + break; + case io.EOF: + this._err(Eo.eofInDoctype), t.forceQuirks = !0, this.emitCurrentDoctype(t), this._emitEOFToken(); + break; + default: + this._err(Eo.missingQuoteBeforeDoctypePublicIdentifier), t.forceQuirks = !0, this.state = Ko.BOGUS_DOCTYPE, this._stateBogusDoctype(e) + } + } + _stateBeforeDoctypePublicIdentifier(e) { + const t = this.currentToken; + switch (e) { + case io.SPACE: + case io.LINE_FEED: + case io.TABULATION: + case io.FORM_FEED: + break; + case io.QUOTATION_MARK: + t.publicId = "", this.state = Ko.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED; + break; + case io.APOSTROPHE: + t.publicId = "", this.state = Ko.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED; + break; + case io.GREATER_THAN_SIGN: + this._err(Eo.missingDoctypePublicIdentifier), t.forceQuirks = !0, this.state = Ko.DATA, this.emitCurrentDoctype(t); + break; + case io.EOF: + this._err(Eo.eofInDoctype), t.forceQuirks = !0, this.emitCurrentDoctype(t), this._emitEOFToken(); + break; + default: + this._err(Eo.missingQuoteBeforeDoctypePublicIdentifier), t.forceQuirks = !0, this.state = Ko.BOGUS_DOCTYPE, this._stateBogusDoctype(e) + } + } + _stateDoctypePublicIdentifierDoubleQuoted(e) { + const t = this.currentToken; + switch (e) { + case io.QUOTATION_MARK: + this.state = Ko.AFTER_DOCTYPE_PUBLIC_IDENTIFIER; + break; + case io.NULL: + this._err(Eo.unexpectedNullCharacter), t.publicId += "�"; + break; + case io.GREATER_THAN_SIGN: + this._err(Eo.abruptDoctypePublicIdentifier), t.forceQuirks = !0, this.emitCurrentDoctype(t), this.state = Ko.DATA; + break; + case io.EOF: + this._err(Eo.eofInDoctype), t.forceQuirks = !0, this.emitCurrentDoctype(t), this._emitEOFToken(); + break; + default: + t.publicId += String.fromCodePoint(e) + } + } + _stateDoctypePublicIdentifierSingleQuoted(e) { + const t = this.currentToken; + switch (e) { + case io.APOSTROPHE: + this.state = Ko.AFTER_DOCTYPE_PUBLIC_IDENTIFIER; + break; + case io.NULL: + this._err(Eo.unexpectedNullCharacter), t.publicId += "�"; + break; + case io.GREATER_THAN_SIGN: + this._err(Eo.abruptDoctypePublicIdentifier), t.forceQuirks = !0, this.emitCurrentDoctype(t), this.state = Ko.DATA; + break; + case io.EOF: + this._err(Eo.eofInDoctype), t.forceQuirks = !0, this.emitCurrentDoctype(t), this._emitEOFToken(); + break; + default: + t.publicId += String.fromCodePoint(e) + } + } + _stateAfterDoctypePublicIdentifier(e) { + const t = this.currentToken; + switch (e) { + case io.SPACE: + case io.LINE_FEED: + case io.TABULATION: + case io.FORM_FEED: + this.state = Ko.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS; + break; + case io.GREATER_THAN_SIGN: + this.state = Ko.DATA, this.emitCurrentDoctype(t); + break; + case io.QUOTATION_MARK: + this._err(Eo.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers), t.systemId = "", this.state = Ko.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED; + break; + case io.APOSTROPHE: + this._err(Eo.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers), t.systemId = "", this.state = Ko.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED; + break; + case io.EOF: + this._err(Eo.eofInDoctype), t.forceQuirks = !0, this.emitCurrentDoctype(t), this._emitEOFToken(); + break; + default: + this._err(Eo.missingQuoteBeforeDoctypeSystemIdentifier), t.forceQuirks = !0, this.state = Ko.BOGUS_DOCTYPE, this._stateBogusDoctype(e) + } + } + _stateBetweenDoctypePublicAndSystemIdentifiers(e) { + const t = this.currentToken; + switch (e) { + case io.SPACE: + case io.LINE_FEED: + case io.TABULATION: + case io.FORM_FEED: + break; + case io.GREATER_THAN_SIGN: + this.emitCurrentDoctype(t), this.state = Ko.DATA; + break; + case io.QUOTATION_MARK: + t.systemId = "", this.state = Ko.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED; + break; + case io.APOSTROPHE: + t.systemId = "", this.state = Ko.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED; + break; + case io.EOF: + this._err(Eo.eofInDoctype), t.forceQuirks = !0, this.emitCurrentDoctype(t), this._emitEOFToken(); + break; + default: + this._err(Eo.missingQuoteBeforeDoctypeSystemIdentifier), t.forceQuirks = !0, this.state = Ko.BOGUS_DOCTYPE, this._stateBogusDoctype(e) + } + } + _stateAfterDoctypeSystemKeyword(e) { + const t = this.currentToken; + switch (e) { + case io.SPACE: + case io.LINE_FEED: + case io.TABULATION: + case io.FORM_FEED: + this.state = Ko.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER; + break; + case io.QUOTATION_MARK: + this._err(Eo.missingWhitespaceAfterDoctypeSystemKeyword), t.systemId = "", this.state = Ko.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED; + break; + case io.APOSTROPHE: + this._err(Eo.missingWhitespaceAfterDoctypeSystemKeyword), t.systemId = "", this.state = Ko.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED; + break; + case io.GREATER_THAN_SIGN: + this._err(Eo.missingDoctypeSystemIdentifier), t.forceQuirks = !0, this.state = Ko.DATA, this.emitCurrentDoctype(t); + break; + case io.EOF: + this._err(Eo.eofInDoctype), t.forceQuirks = !0, this.emitCurrentDoctype(t), this._emitEOFToken(); + break; + default: + this._err(Eo.missingQuoteBeforeDoctypeSystemIdentifier), t.forceQuirks = !0, this.state = Ko.BOGUS_DOCTYPE, this._stateBogusDoctype(e) + } + } + _stateBeforeDoctypeSystemIdentifier(e) { + const t = this.currentToken; + switch (e) { + case io.SPACE: + case io.LINE_FEED: + case io.TABULATION: + case io.FORM_FEED: + break; + case io.QUOTATION_MARK: + t.systemId = "", this.state = Ko.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED; + break; + case io.APOSTROPHE: + t.systemId = "", this.state = Ko.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED; + break; + case io.GREATER_THAN_SIGN: + this._err(Eo.missingDoctypeSystemIdentifier), t.forceQuirks = !0, this.state = Ko.DATA, this.emitCurrentDoctype(t); + break; + case io.EOF: + this._err(Eo.eofInDoctype), t.forceQuirks = !0, this.emitCurrentDoctype(t), this._emitEOFToken(); + break; + default: + this._err(Eo.missingQuoteBeforeDoctypeSystemIdentifier), t.forceQuirks = !0, this.state = Ko.BOGUS_DOCTYPE, this._stateBogusDoctype(e) + } + } + _stateDoctypeSystemIdentifierDoubleQuoted(e) { + const t = this.currentToken; + switch (e) { + case io.QUOTATION_MARK: + this.state = Ko.AFTER_DOCTYPE_SYSTEM_IDENTIFIER; + break; + case io.NULL: + this._err(Eo.unexpectedNullCharacter), t.systemId += "�"; + break; + case io.GREATER_THAN_SIGN: + this._err(Eo.abruptDoctypeSystemIdentifier), t.forceQuirks = !0, this.emitCurrentDoctype(t), this.state = Ko.DATA; + break; + case io.EOF: + this._err(Eo.eofInDoctype), t.forceQuirks = !0, this.emitCurrentDoctype(t), this._emitEOFToken(); + break; + default: + t.systemId += String.fromCodePoint(e) + } + } + _stateDoctypeSystemIdentifierSingleQuoted(e) { + const t = this.currentToken; + switch (e) { + case io.APOSTROPHE: + this.state = Ko.AFTER_DOCTYPE_SYSTEM_IDENTIFIER; + break; + case io.NULL: + this._err(Eo.unexpectedNullCharacter), t.systemId += "�"; + break; + case io.GREATER_THAN_SIGN: + this._err(Eo.abruptDoctypeSystemIdentifier), t.forceQuirks = !0, this.emitCurrentDoctype(t), this.state = Ko.DATA; + break; + case io.EOF: + this._err(Eo.eofInDoctype), t.forceQuirks = !0, this.emitCurrentDoctype(t), this._emitEOFToken(); + break; + default: + t.systemId += String.fromCodePoint(e) + } + } + _stateAfterDoctypeSystemIdentifier(e) { + const t = this.currentToken; + switch (e) { + case io.SPACE: + case io.LINE_FEED: + case io.TABULATION: + case io.FORM_FEED: + break; + case io.GREATER_THAN_SIGN: + this.emitCurrentDoctype(t), this.state = Ko.DATA; + break; + case io.EOF: + this._err(Eo.eofInDoctype), t.forceQuirks = !0, this.emitCurrentDoctype(t), this._emitEOFToken(); + break; + default: + this._err(Eo.unexpectedCharacterAfterDoctypeSystemIdentifier), this.state = Ko.BOGUS_DOCTYPE, this._stateBogusDoctype(e) + } + } + _stateBogusDoctype(e) { + const t = this.currentToken; + switch (e) { + case io.GREATER_THAN_SIGN: + this.emitCurrentDoctype(t), this.state = Ko.DATA; + break; + case io.NULL: + this._err(Eo.unexpectedNullCharacter); + break; + case io.EOF: + this.emitCurrentDoctype(t), this._emitEOFToken() + } + } + _stateCdataSection(e) { + switch (e) { + case io.RIGHT_SQUARE_BRACKET: + this.state = Ko.CDATA_SECTION_BRACKET; + break; + case io.EOF: + this._err(Eo.eofInCdata), this._emitEOFToken(); + break; + default: + this._emitCodePoint(e) + } + } + _stateCdataSectionBracket(e) { + e === io.RIGHT_SQUARE_BRACKET ? this.state = Ko.CDATA_SECTION_END : (this._emitChars("]"), this.state = Ko.CDATA_SECTION, this._stateCdataSection(e)) + } + _stateCdataSectionEnd(e) { + switch (e) { + case io.GREATER_THAN_SIGN: + this.state = Ko.DATA; + break; + case io.RIGHT_SQUARE_BRACKET: + this._emitChars("]"); + break; + default: + this._emitChars("]]"), this.state = Ko.CDATA_SECTION, this._stateCdataSection(e) + } + } + _stateCharacterReference(e) { + e === io.NUMBER_SIGN ? this.state = Ko.NUMERIC_CHARACTER_REFERENCE : Xo(e) ? (this.state = Ko.NAMED_CHARACTER_REFERENCE, this._stateNamedCharacterReference(e)) : (this._flushCodePointConsumedAsCharacterReference(io.AMPERSAND), this._reconsumeInState(this.returnState, e)) + } + _stateNamedCharacterReference(e) { + const t = this._matchNamedCharacterReference(e); + if (this._ensureHibernation()); + else if (t) { + for (let e = 0; e < t.length; e++) this._flushCodePointConsumedAsCharacterReference(t[e]); + this.state = this.returnState + } else this._flushCodePointConsumedAsCharacterReference(io.AMPERSAND), this.state = Ko.AMBIGUOUS_AMPERSAND + } + _stateAmbiguousAmpersand(e) { + Xo(e) ? this._flushCodePointConsumedAsCharacterReference(e) : (e === io.SEMICOLON && this._err(Eo.unknownNamedCharacterReference), this._reconsumeInState(this.returnState, e)) + } + _stateNumericCharacterReference(e) { + this.charRefCode = 0, e === io.LATIN_SMALL_X || e === io.LATIN_CAPITAL_X ? this.state = Ko.HEXADEMICAL_CHARACTER_REFERENCE_START : Vo(e) ? (this.state = Ko.DECIMAL_CHARACTER_REFERENCE, this._stateDecimalCharacterReference(e)) : (this._err(Eo.absenceOfDigitsInNumericCharacterReference), this._flushCodePointConsumedAsCharacterReference(io.AMPERSAND), this._flushCodePointConsumedAsCharacterReference(io.NUMBER_SIGN), this._reconsumeInState(this.returnState, e)) + } + _stateHexademicalCharacterReferenceStart(e) { + ! function(e) { + return Vo(e) || $o(e) || zo(e) + }(e) ? (this._err(Eo.absenceOfDigitsInNumericCharacterReference), this._flushCodePointConsumedAsCharacterReference(io.AMPERSAND), this._flushCodePointConsumedAsCharacterReference(io.NUMBER_SIGN), this._unconsume(2), this.state = this.returnState) : (this.state = Ko.HEXADEMICAL_CHARACTER_REFERENCE, this._stateHexademicalCharacterReference(e)) + } + _stateHexademicalCharacterReference(e) { + $o(e) ? this.charRefCode = 16 * this.charRefCode + e - 55 : zo(e) ? this.charRefCode = 16 * this.charRefCode + e - 87 : Vo(e) ? this.charRefCode = 16 * this.charRefCode + e - 48 : e === io.SEMICOLON ? this.state = Ko.NUMERIC_CHARACTER_REFERENCE_END : (this._err(Eo.missingSemicolonAfterCharacterReference), this.state = Ko.NUMERIC_CHARACTER_REFERENCE_END, this._stateNumericCharacterReferenceEnd(e)) + } + _stateDecimalCharacterReference(e) { + Vo(e) ? this.charRefCode = 10 * this.charRefCode + e - 48 : e === io.SEMICOLON ? this.state = Ko.NUMERIC_CHARACTER_REFERENCE_END : (this._err(Eo.missingSemicolonAfterCharacterReference), this.state = Ko.NUMERIC_CHARACTER_REFERENCE_END, this._stateNumericCharacterReferenceEnd(e)) + } + _stateNumericCharacterReferenceEnd(e) { + if (this.charRefCode === io.NULL) this._err(Eo.nullCharacterReference), this.charRefCode = io.REPLACEMENT_CHARACTER; + else if (this.charRefCode > 1114111) this._err(Eo.characterReferenceOutsideUnicodeRange), this.charRefCode = io.REPLACEMENT_CHARACTER; + else if (uo(this.charRefCode)) this._err(Eo.surrogateCharacterReference), this.charRefCode = io.REPLACEMENT_CHARACTER; + else if (fo(this.charRefCode)) this._err(Eo.noncharacterCharacterReference); + else if (po(this.charRefCode) || this.charRefCode === io.CARRIAGE_RETURN) { + this._err(Eo.controlCharacterReference); + const e = qo.get(this.charRefCode); + void 0 !== e && (this.charRefCode = e) + } + this._flushCodePointConsumedAsCharacterReference(this.charRefCode), this._reconsumeInState(this.returnState, e) + } +} +const nc = new Set([Po.DD, Po.DT, Po.LI, Po.OPTGROUP, Po.OPTION, Po.P, Po.RB, Po.RP, Po.RT, Po.RTC]), + rc = new Set([...nc, Po.CAPTION, Po.COLGROUP, Po.TBODY, Po.TD, Po.TFOOT, Po.TH, Po.THEAD, Po.TR]), + ic = new Map([ + [Po.APPLET, vo.HTML], + [Po.CAPTION, vo.HTML], + [Po.HTML, vo.HTML], + [Po.MARQUEE, vo.HTML], + [Po.OBJECT, vo.HTML], + [Po.TABLE, vo.HTML], + [Po.TD, vo.HTML], + [Po.TEMPLATE, vo.HTML], + [Po.TH, vo.HTML], + [Po.ANNOTATION_XML, vo.MATHML], + [Po.MI, vo.MATHML], + [Po.MN, vo.MATHML], + [Po.MO, vo.MATHML], + [Po.MS, vo.MATHML], + [Po.MTEXT, vo.MATHML], + [Po.DESC, vo.SVG], + [Po.FOREIGN_OBJECT, vo.SVG], + [Po.TITLE, vo.SVG] + ]), + sc = [Po.H1, Po.H2, Po.H3, Po.H4, Po.H5, Po.H6], + ac = [Po.TR, Po.TEMPLATE, Po.HTML], + oc = [Po.TBODY, Po.TFOOT, Po.THEAD, Po.TEMPLATE, Po.HTML], + cc = [Po.TABLE, Po.TEMPLATE, Po.HTML], + lc = [Po.TD, Po.TH]; +class hc { + constructor(e, t, n) { + this.treeAdapter = t, this.handler = n, this.items = [], this.tagIDs = [], this.stackTop = -1, this.tmplCount = 0, this.currentTagId = Po.UNKNOWN, this.current = e + } + get currentTmplContentOrNode() { + return this._isInTemplate() ? this.treeAdapter.getTemplateContent(this.current) : this.current + } + _indexOf(e) { + return this.items.lastIndexOf(e, this.stackTop) + } + _isInTemplate() { + return this.currentTagId === Po.TEMPLATE && this.treeAdapter.getNamespaceURI(this.current) === vo.HTML + } + _updateCurrentElement() { + this.current = this.items[this.stackTop], this.currentTagId = this.tagIDs[this.stackTop] + } + push(e, t) { + this.stackTop++, this.items[this.stackTop] = e, this.current = e, this.tagIDs[this.stackTop] = t, this.currentTagId = t, this._isInTemplate() && this.tmplCount++, this.handler.onItemPush(e, t, !0) + } + pop() { + const e = this.current; + this.tmplCount > 0 && this._isInTemplate() && this.tmplCount--, this.stackTop--, this._updateCurrentElement(), this.handler.onItemPop(e, !0) + } + replace(e, t) { + const n = this._indexOf(e); + this.items[n] = t, n === this.stackTop && (this.current = t) + } + insertAfter(e, t, n) { + const r = this._indexOf(e) + 1; + this.items.splice(r, 0, t), this.tagIDs.splice(r, 0, n), this.stackTop++, r === this.stackTop && this._updateCurrentElement(), this.handler.onItemPush(this.current, this.currentTagId, r === this.stackTop) + } + popUntilTagNamePopped(e) { + let t = this.stackTop + 1; + do { + t = this.tagIDs.lastIndexOf(e, t - 1) + } while (t > 0 && this.treeAdapter.getNamespaceURI(this.items[t]) !== vo.HTML); + this.shortenToLength(t < 0 ? 0 : t) + } + shortenToLength(e) { + for (; this.stackTop >= e;) { + const t = this.current; + this.tmplCount > 0 && this._isInTemplate() && (this.tmplCount -= 1), this.stackTop--, this._updateCurrentElement(), this.handler.onItemPop(t, this.stackTop < e) + } + } + popUntilElementPopped(e) { + const t = this._indexOf(e); + this.shortenToLength(t < 0 ? 0 : t) + } + popUntilPopped(e, t) { + const n = this._indexOfTagNames(e, t); + this.shortenToLength(n < 0 ? 0 : n) + } + popUntilNumberedHeaderPopped() { + this.popUntilPopped(sc, vo.HTML) + } + popUntilTableCellPopped() { + this.popUntilPopped(lc, vo.HTML) + } + popAllUpToHtmlElement() { + this.tmplCount = 0, this.shortenToLength(1) + } + _indexOfTagNames(e, t) { + for (let n = this.stackTop; n >= 0; n--) + if (e.includes(this.tagIDs[n]) && this.treeAdapter.getNamespaceURI(this.items[n]) === t) return n; + return -1 + } + clearBackTo(e, t) { + const n = this._indexOfTagNames(e, t); + this.shortenToLength(n + 1) + } + clearBackToTableContext() { + this.clearBackTo(cc, vo.HTML) + } + clearBackToTableBodyContext() { + this.clearBackTo(oc, vo.HTML) + } + clearBackToTableRowContext() { + this.clearBackTo(ac, vo.HTML) + } + remove(e) { + const t = this._indexOf(e); + t >= 0 && (t === this.stackTop ? this.pop() : (this.items.splice(t, 1), this.tagIDs.splice(t, 1), this.stackTop--, this._updateCurrentElement(), this.handler.onItemPop(e, !1))) + } + tryPeekProperlyNestedBodyElement() { + return this.stackTop >= 1 && this.tagIDs[1] === Po.BODY ? this.items[1] : null + } + contains(e) { + return this._indexOf(e) > -1 + } + getCommonAncestor(e) { + const t = this._indexOf(e) - 1; + return t >= 0 ? this.items[t] : null + } + isRootHtmlElementCurrent() { + return 0 === this.stackTop && this.tagIDs[0] === Po.HTML + } + hasInScope(e) { + for (let t = this.stackTop; t >= 0; t--) { + const n = this.tagIDs[t], + r = this.treeAdapter.getNamespaceURI(this.items[t]); + if (n === e && r === vo.HTML) return !0; + if (ic.get(n) === r) return !1 + } + return !0 + } + hasNumberedHeaderInScope() { + for (let e = this.stackTop; e >= 0; e--) { + const t = this.tagIDs[e], + n = this.treeAdapter.getNamespaceURI(this.items[e]); + if (Go(t) && n === vo.HTML) return !0; + if (ic.get(t) === n) return !1 + } + return !0 + } + hasInListItemScope(e) { + for (let t = this.stackTop; t >= 0; t--) { + const n = this.tagIDs[t], + r = this.treeAdapter.getNamespaceURI(this.items[t]); + if (n === e && r === vo.HTML) return !0; + if ((n === Po.UL || n === Po.OL) && r === vo.HTML || ic.get(n) === r) return !1 + } + return !0 + } + hasInButtonScope(e) { + for (let t = this.stackTop; t >= 0; t--) { + const n = this.tagIDs[t], + r = this.treeAdapter.getNamespaceURI(this.items[t]); + if (n === e && r === vo.HTML) return !0; + if (n === Po.BUTTON && r === vo.HTML || ic.get(n) === r) return !1 + } + return !0 + } + hasInTableScope(e) { + for (let t = this.stackTop; t >= 0; t--) { + const n = this.tagIDs[t]; + if (this.treeAdapter.getNamespaceURI(this.items[t]) === vo.HTML) { + if (n === e) return !0; + if (n === Po.TABLE || n === Po.TEMPLATE || n === Po.HTML) return !1 + } + } + return !0 + } + hasTableBodyContextInTableScope() { + for (let e = this.stackTop; e >= 0; e--) { + const t = this.tagIDs[e]; + if (this.treeAdapter.getNamespaceURI(this.items[e]) === vo.HTML) { + if (t === Po.TBODY || t === Po.THEAD || t === Po.TFOOT) return !0; + if (t === Po.TABLE || t === Po.HTML) return !1 + } + } + return !0 + } + hasInSelectScope(e) { + for (let t = this.stackTop; t >= 0; t--) { + const n = this.tagIDs[t]; + if (this.treeAdapter.getNamespaceURI(this.items[t]) === vo.HTML) { + if (n === e) return !0; + if (n !== Po.OPTION && n !== Po.OPTGROUP) return !1 + } + } + return !0 + } + generateImpliedEndTags() { + for (; nc.has(this.currentTagId);) this.pop() + } + generateImpliedEndTagsThoroughly() { + for (; rc.has(this.currentTagId);) this.pop() + } + generateImpliedEndTagsWithExclusion(e) { + for (; this.currentTagId !== e && rc.has(this.currentTagId);) this.pop() + } +} +var uc; +! function(e) { + e[e.Marker = 0] = "Marker", e[e.Element = 1] = "Element" +}(uc = uc || (uc = {})); +const pc = { + type: uc.Marker +}; +class fc { + constructor(e) { + this.treeAdapter = e, this.entries = [], this.bookmark = null + } + _getNoahArkConditionCandidates(e, t) { + const n = [], + r = t.length, + i = this.treeAdapter.getTagName(e), + s = this.treeAdapter.getNamespaceURI(e); + for (let e = 0; e < this.entries.length; e++) { + const t = this.entries[e]; + if (t.type === uc.Marker) break; + const { + element: a + } = t; + if (this.treeAdapter.getTagName(a) === i && this.treeAdapter.getNamespaceURI(a) === s) { + const t = this.treeAdapter.getAttrList(a); + t.length === r && n.push({ + idx: e, + attrs: t + }) + } + } + return n + } + _ensureNoahArkCondition(e) { + if (this.entries.length < 3) return; + const t = this.treeAdapter.getAttrList(e), + n = this._getNoahArkConditionCandidates(e, t); + if (n.length < 3) return; + const r = new Map(t.map((e => [e.name, e.value]))); + let i = 0; + for (let e = 0; e < n.length; e++) { + const t = n[e]; + t.attrs.every((e => r.get(e.name) === e.value)) && (i += 1, i >= 3 && this.entries.splice(t.idx, 1)) + } + } + insertMarker() { + this.entries.unshift(pc) + } + pushElement(e, t) { + this._ensureNoahArkCondition(e), this.entries.unshift({ + type: uc.Element, + element: e, + token: t + }) + } + insertElementAfterBookmark(e, t) { + const n = this.entries.indexOf(this.bookmark); + this.entries.splice(n, 0, { + type: uc.Element, + element: e, + token: t + }) + } + removeEntry(e) { + const t = this.entries.indexOf(e); + t >= 0 && this.entries.splice(t, 1) + } + clearToLastMarker() { + const e = this.entries.indexOf(pc); + e >= 0 ? this.entries.splice(0, e + 1) : this.entries.length = 0 + } + getElementEntryInScopeWithTagName(e) { + const t = this.entries.find((t => t.type === uc.Marker || this.treeAdapter.getTagName(t.element) === e)); + return t && t.type === uc.Element ? t : null + } + getElementEntry(e) { + return this.entries.find((t => t.type === uc.Element && t.element === e)) + } +} + +function dc(e) { + return { + nodeName: "#text", + value: e, + parentNode: null + } +} +const Ec = { + createDocument: () => ({ + nodeName: "#document", + mode: Ro.NO_QUIRKS, + childNodes: [] + }), + createDocumentFragment: () => ({ + nodeName: "#document-fragment", + childNodes: [] + }), + createElement: (e, t, n) => ({ + nodeName: e, + tagName: e, + attrs: n, + namespaceURI: t, + childNodes: [], + parentNode: null + }), + createCommentNode: e => ({ + nodeName: "#comment", + data: e, + parentNode: null + }), + appendChild(e, t) { + e.childNodes.push(t), t.parentNode = e + }, + insertBefore(e, t, n) { + const r = e.childNodes.indexOf(n); + e.childNodes.splice(r, 0, t), t.parentNode = e + }, + setTemplateContent(e, t) { + e.content = t + }, + getTemplateContent: e => e.content, + setDocumentType(e, t, n, r) { + const i = e.childNodes.find((e => "#documentType" === e.nodeName)); + if (i) i.name = t, i.publicId = n, i.systemId = r; + else { + const i = { + nodeName: "#documentType", + name: t, + publicId: n, + systemId: r, + parentNode: null + }; + Ec.appendChild(e, i) + } + }, + setDocumentMode(e, t) { + e.mode = t + }, + getDocumentMode: e => e.mode, + detachNode(e) { + if (e.parentNode) { + const t = e.parentNode.childNodes.indexOf(e); + e.parentNode.childNodes.splice(t, 1), e.parentNode = null + } + }, + insertText(e, t) { + if (e.childNodes.length > 0) { + const n = e.childNodes[e.childNodes.length - 1]; + if (Ec.isTextNode(n)) return void(n.value += t) + } + Ec.appendChild(e, dc(t)) + }, + insertTextBefore(e, t, n) { + const r = e.childNodes[e.childNodes.indexOf(n) - 1]; + r && Ec.isTextNode(r) ? r.value += t : Ec.insertBefore(e, dc(t), n) + }, + adoptAttributes(e, t) { + const n = new Set(e.attrs.map((e => e.name))); + for (let r = 0; r < t.length; r++) n.has(t[r].name) || e.attrs.push(t[r]) + }, + getFirstChild: e => e.childNodes[0], + getChildNodes: e => e.childNodes, + getParentNode: e => e.parentNode, + getAttrList: e => e.attrs, + getTagName: e => e.tagName, + getNamespaceURI: e => e.namespaceURI, + getTextNodeContent: e => e.value, + getCommentNodeContent: e => e.data, + getDocumentTypeNodeName: e => e.name, + getDocumentTypeNodePublicId: e => e.publicId, + getDocumentTypeNodeSystemId: e => e.systemId, + isTextNode: e => "#text" === e.nodeName, + isCommentNode: e => "#comment" === e.nodeName, + isDocumentTypeNode: e => "#documentType" === e.nodeName, + isElementNode: e => Object.prototype.hasOwnProperty.call(e, "tagName"), + setNodeSourceCodeLocation(e, t) { + e.sourceCodeLocation = t + }, + getNodeSourceCodeLocation: e => e.sourceCodeLocation, + updateNodeSourceCodeLocation(e, t) { + e.sourceCodeLocation = { + ...e.sourceCodeLocation, + ...t + } + } + }, + mc = ["+//silmaril//dtd html pro v0r11 19970101//", "-//as//dtd html 3.0 aswedit + extensions//", "-//advasoft ltd//dtd html 3.0 aswedit + extensions//", "-//ietf//dtd html 2.0 level 1//", "-//ietf//dtd html 2.0 level 2//", "-//ietf//dtd html 2.0 strict level 1//", "-//ietf//dtd html 2.0 strict level 2//", "-//ietf//dtd html 2.0 strict//", "-//ietf//dtd html 2.0//", "-//ietf//dtd html 2.1e//", "-//ietf//dtd html 3.0//", "-//ietf//dtd html 3.2 final//", "-//ietf//dtd html 3.2//", "-//ietf//dtd html 3//", "-//ietf//dtd html level 0//", "-//ietf//dtd html level 1//", "-//ietf//dtd html level 2//", "-//ietf//dtd html level 3//", "-//ietf//dtd html strict level 0//", "-//ietf//dtd html strict level 1//", "-//ietf//dtd html strict level 2//", "-//ietf//dtd html strict level 3//", "-//ietf//dtd html strict//", "-//ietf//dtd html//", "-//metrius//dtd metrius presentational//", "-//microsoft//dtd internet explorer 2.0 html strict//", "-//microsoft//dtd internet explorer 2.0 html//", "-//microsoft//dtd internet explorer 2.0 tables//", "-//microsoft//dtd internet explorer 3.0 html strict//", "-//microsoft//dtd internet explorer 3.0 html//", "-//microsoft//dtd internet explorer 3.0 tables//", "-//netscape comm. corp.//dtd html//", "-//netscape comm. corp.//dtd strict html//", "-//o'reilly and associates//dtd html 2.0//", "-//o'reilly and associates//dtd html extended 1.0//", "-//o'reilly and associates//dtd html extended relaxed 1.0//", "-//sq//dtd html 2.0 hotmetal + extensions//", "-//softquad software//dtd hotmetal pro 6.0::19990601::extensions to html 4.0//", "-//softquad//dtd hotmetal pro 4.0::19971010::extensions to html 4.0//", "-//spyglass//dtd html 2.0 extended//", "-//sun microsystems corp.//dtd hotjava html//", "-//sun microsystems corp.//dtd hotjava strict html//", "-//w3c//dtd html 3 1995-03-24//", "-//w3c//dtd html 3.2 draft//", "-//w3c//dtd html 3.2 final//", "-//w3c//dtd html 3.2//", "-//w3c//dtd html 3.2s draft//", "-//w3c//dtd html 4.0 frameset//", "-//w3c//dtd html 4.0 transitional//", "-//w3c//dtd html experimental 19960712//", "-//w3c//dtd html experimental 970421//", "-//w3c//dtd w3 html//", "-//w3o//dtd w3 html 3.0//", "-//webtechs//dtd mozilla html 2.0//", "-//webtechs//dtd mozilla html//"], + Tc = [...mc, "-//w3c//dtd html 4.01 frameset//", "-//w3c//dtd html 4.01 transitional//"], + _c = new Set(["-//w3o//dtd w3 html strict 3.0//en//", "-/w3c/dtd html 4.0 transitional/en", "html"]), + Ac = ["-//w3c//dtd xhtml 1.0 frameset//", "-//w3c//dtd xhtml 1.0 transitional//"], + gc = [...Ac, "-//w3c//dtd html 4.01 frameset//", "-//w3c//dtd html 4.01 transitional//"]; + +function Nc(e, t) { + return t.some((t => e.startsWith(t))) +} +const Cc = "text/html", + Ic = "application/xhtml+xml", + Sc = new Map(["attributeName", "attributeType", "baseFrequency", "baseProfile", "calcMode", "clipPathUnits", "diffuseConstant", "edgeMode", "filterUnits", "glyphRef", "gradientTransform", "gradientUnits", "kernelMatrix", "kernelUnitLength", "keyPoints", "keySplines", "keyTimes", "lengthAdjust", "limitingConeAngle", "markerHeight", "markerUnits", "markerWidth", "maskContentUnits", "maskUnits", "numOctaves", "pathLength", "patternContentUnits", "patternTransform", "patternUnits", "pointsAtX", "pointsAtY", "pointsAtZ", "preserveAlpha", "preserveAspectRatio", "primitiveUnits", "refX", "refY", "repeatCount", "repeatDur", "requiredExtensions", "requiredFeatures", "specularConstant", "specularExponent", "spreadMethod", "startOffset", "stdDeviation", "stitchTiles", "surfaceScale", "systemLanguage", "tableValues", "targetX", "targetY", "textLength", "viewBox", "viewTarget", "xChannelSelector", "yChannelSelector", "zoomAndPan"].map((e => [e.toLowerCase(), e]))), + bc = new Map([ + ["xlink:actuate", { + prefix: "xlink", + name: "actuate", + namespace: vo.XLINK + }], + ["xlink:arcrole", { + prefix: "xlink", + name: "arcrole", + namespace: vo.XLINK + }], + ["xlink:href", { + prefix: "xlink", + name: "href", + namespace: vo.XLINK + }], + ["xlink:role", { + prefix: "xlink", + name: "role", + namespace: vo.XLINK + }], + ["xlink:show", { + prefix: "xlink", + name: "show", + namespace: vo.XLINK + }], + ["xlink:title", { + prefix: "xlink", + name: "title", + namespace: vo.XLINK + }], + ["xlink:type", { + prefix: "xlink", + name: "type", + namespace: vo.XLINK + }], + ["xml:base", { + prefix: "xml", + name: "base", + namespace: vo.XML + }], + ["xml:lang", { + prefix: "xml", + name: "lang", + namespace: vo.XML + }], + ["xml:space", { + prefix: "xml", + name: "space", + namespace: vo.XML + }], + ["xmlns", { + prefix: "", + name: "xmlns", + namespace: vo.XMLNS + }], + ["xmlns:xlink", { + prefix: "xmlns", + name: "xlink", + namespace: vo.XMLNS + }] + ]), + Oc = new Map(["altGlyph", "altGlyphDef", "altGlyphItem", "animateColor", "animateMotion", "animateTransform", "clipPath", "feBlend", "feColorMatrix", "feComponentTransfer", "feComposite", "feConvolveMatrix", "feDiffuseLighting", "feDisplacementMap", "feDistantLight", "feFlood", "feFuncA", "feFuncB", "feFuncG", "feFuncR", "feGaussianBlur", "feImage", "feMerge", "feMergeNode", "feMorphology", "feOffset", "fePointLight", "feSpecularLighting", "feSpotLight", "feTile", "feTurbulence", "foreignObject", "glyphRef", "linearGradient", "radialGradient", "textPath"].map((e => [e.toLowerCase(), e]))), + yc = new Set([Po.B, Po.BIG, Po.BLOCKQUOTE, Po.BODY, Po.BR, Po.CENTER, Po.CODE, Po.DD, Po.DIV, Po.DL, Po.DT, Po.EM, Po.EMBED, Po.H1, Po.H2, Po.H3, Po.H4, Po.H5, Po.H6, Po.HEAD, Po.HR, Po.I, Po.IMG, Po.LI, Po.LISTING, Po.MENU, Po.META, Po.NOBR, Po.OL, Po.P, Po.PRE, Po.RUBY, Po.S, Po.SMALL, Po.SPAN, Po.STRONG, Po.STRIKE, Po.SUB, Po.SUP, Po.TABLE, Po.TT, Po.U, Po.UL, Po.VAR]); + +function Lc(e) { + for (let t = 0; t < e.attrs.length; t++) + if ("definitionurl" === e.attrs[t].name) { + e.attrs[t].name = "definitionURL"; + break + } +} + +function kc(e) { + for (let t = 0; t < e.attrs.length; t++) { + const n = Sc.get(e.attrs[t].name); + null != n && (e.attrs[t].name = n) + } +} + +function vc(e) { + for (let t = 0; t < e.attrs.length; t++) { + const n = bc.get(e.attrs[t].name); + n && (e.attrs[t].prefix = n.prefix, e.attrs[t].name = n.name, e.attrs[t].namespace = n.namespace) + } +} + +function Dc(e, t, n, r) { + return (!r || r === vo.HTML) && function(e, t, n) { + if (t === vo.MATHML && e === Po.ANNOTATION_XML) + for (let e = 0; e < n.length; e++) + if (n[e].name === Do.ENCODING) { + const t = n[e].value.toLowerCase(); + return t === Cc || t === Ic + } return t === vo.SVG && (e === Po.FOREIGN_OBJECT || e === Po.DESC || e === Po.TITLE) + }(e, t, n) || (!r || r === vo.MATHML) && function(e, t) { + return t === vo.MATHML && (e === Po.MI || e === Po.MO || e === Po.MN || e === Po.MS || e === Po.MTEXT) + }(e, t) +} +var Rc; +! function(e) { + e[e.INITIAL = 0] = "INITIAL", e[e.BEFORE_HTML = 1] = "BEFORE_HTML", e[e.BEFORE_HEAD = 2] = "BEFORE_HEAD", e[e.IN_HEAD = 3] = "IN_HEAD", e[e.IN_HEAD_NO_SCRIPT = 4] = "IN_HEAD_NO_SCRIPT", e[e.AFTER_HEAD = 5] = "AFTER_HEAD", e[e.IN_BODY = 6] = "IN_BODY", e[e.TEXT = 7] = "TEXT", e[e.IN_TABLE = 8] = "IN_TABLE", e[e.IN_TABLE_TEXT = 9] = "IN_TABLE_TEXT", e[e.IN_CAPTION = 10] = "IN_CAPTION", e[e.IN_COLUMN_GROUP = 11] = "IN_COLUMN_GROUP", e[e.IN_TABLE_BODY = 12] = "IN_TABLE_BODY", e[e.IN_ROW = 13] = "IN_ROW", e[e.IN_CELL = 14] = "IN_CELL", e[e.IN_SELECT = 15] = "IN_SELECT", e[e.IN_SELECT_IN_TABLE = 16] = "IN_SELECT_IN_TABLE", e[e.IN_TEMPLATE = 17] = "IN_TEMPLATE", e[e.AFTER_BODY = 18] = "AFTER_BODY", e[e.IN_FRAMESET = 19] = "IN_FRAMESET", e[e.AFTER_FRAMESET = 20] = "AFTER_FRAMESET", e[e.AFTER_AFTER_BODY = 21] = "AFTER_AFTER_BODY", e[e.AFTER_AFTER_FRAMESET = 22] = "AFTER_AFTER_FRAMESET" +}(Rc || (Rc = {})); +const Mc = { + startLine: -1, + startCol: -1, + startOffset: -1, + endLine: -1, + endCol: -1, + endOffset: -1 + }, + Pc = new Set([Po.TABLE, Po.TBODY, Po.TFOOT, Po.THEAD, Po.TR]), + xc = { + scriptingEnabled: !0, + sourceCodeLocationInfo: !1, + treeAdapter: Ec, + onParseError: null + }; +class wc { + constructor(e, t, n = null, r = null) { + this.fragmentContext = n, this.scriptHandler = r, this.currentToken = null, this.stopped = !1, this.insertionMode = Rc.INITIAL, this.originalInsertionMode = Rc.INITIAL, this.headElement = null, this.formElement = null, this.currentNotInHTML = !1, this.tmplInsertionModeStack = [], this.pendingCharacterTokens = [], this.hasNonWhitespacePendingCharacterToken = !1, this.framesetOk = !0, this.skipNextNewLine = !1, this.fosterParentingEnabled = !1, this.options = { + ...xc, + ...e + }, this.treeAdapter = this.options.treeAdapter, this.onParseError = this.options.onParseError, this.onParseError && (this.options.sourceCodeLocationInfo = !0), this.document = null != t ? t : this.treeAdapter.createDocument(), this.tokenizer = new tc(this.options, this), this.activeFormattingElements = new fc(this.treeAdapter), this.fragmentContextID = n ? Fo(this.treeAdapter.getTagName(n)) : Po.UNKNOWN, this._setContextModes(null != n ? n : this.document, this.fragmentContextID), this.openElements = new hc(this.document, this.treeAdapter, this) + } + static parse(e, t) { + const n = new this(t); + return n.tokenizer.write(e, !0), n.document + } + static getFragmentParser(e, t) { + const n = { + ...xc, + ...t + }; + null != e || (e = n.treeAdapter.createElement(Mo.TEMPLATE, vo.HTML, [])); + const r = n.treeAdapter.createElement("documentmock", vo.HTML, []), + i = new this(n, r, e); + return i.fragmentContextID === Po.TEMPLATE && i.tmplInsertionModeStack.unshift(Rc.IN_TEMPLATE), i._initTokenizerForFragmentParsing(), i._insertFakeRootElement(), i._resetInsertionMode(), i._findFormInFragmentContext(), i + } + getFragment() { + const e = this.treeAdapter.getFirstChild(this.document), + t = this.treeAdapter.createDocumentFragment(); + return this._adoptNodes(e, t), t + } + _err(e, t, n) { + var r; + if (!this.onParseError) return; + const i = null !== (r = e.location) && void 0 !== r ? r : Mc, + s = { + code: t, + startLine: i.startLine, + startCol: i.startCol, + startOffset: i.startOffset, + endLine: n ? i.startLine : i.endLine, + endCol: n ? i.startCol : i.endCol, + endOffset: n ? i.startOffset : i.endOffset + }; + this.onParseError(s) + } + onItemPush(e, t, n) { + var r, i; + null === (i = (r = this.treeAdapter).onItemPush) || void 0 === i || i.call(r, e), n && this.openElements.stackTop > 0 && this._setContextModes(e, t) + } + onItemPop(e, t) { + var n, r; + if (this.options.sourceCodeLocationInfo && this._setEndLocation(e, this.currentToken), null === (r = (n = this.treeAdapter).onItemPop) || void 0 === r || r.call(n, e, this.openElements.current), t) { + let e, t; + 0 === this.openElements.stackTop && this.fragmentContext ? (e = this.fragmentContext, t = this.fragmentContextID) : ({ + current: e, + currentTagId: t + } = this.openElements), this._setContextModes(e, t) + } + } + _setContextModes(e, t) { + const n = e === this.document || this.treeAdapter.getNamespaceURI(e) === vo.HTML; + this.currentNotInHTML = !n, this.tokenizer.inForeignNode = !n && !this._isIntegrationPoint(t, e) + } + _switchToTextParsing(e, t) { + this._insertElement(e, vo.HTML), this.tokenizer.state = t, this.originalInsertionMode = this.insertionMode, this.insertionMode = Rc.TEXT + } + switchToPlaintextParsing() { + this.insertionMode = Rc.TEXT, this.originalInsertionMode = Rc.IN_BODY, this.tokenizer.state = jo.PLAINTEXT + } + _getAdjustedCurrentElement() { + return 0 === this.openElements.stackTop && this.fragmentContext ? this.fragmentContext : this.openElements.current + } + _findFormInFragmentContext() { + let e = this.fragmentContext; + for (; e;) { + if (this.treeAdapter.getTagName(e) === Mo.FORM) { + this.formElement = e; + break + } + e = this.treeAdapter.getParentNode(e) + } + } + _initTokenizerForFragmentParsing() { + if (this.fragmentContext && this.treeAdapter.getNamespaceURI(this.fragmentContext) === vo.HTML) switch (this.fragmentContextID) { + case Po.TITLE: + case Po.TEXTAREA: + this.tokenizer.state = jo.RCDATA; + break; + case Po.STYLE: + case Po.XMP: + case Po.IFRAME: + case Po.NOEMBED: + case Po.NOFRAMES: + case Po.NOSCRIPT: + this.tokenizer.state = jo.RAWTEXT; + break; + case Po.SCRIPT: + this.tokenizer.state = jo.SCRIPT_DATA; + break; + case Po.PLAINTEXT: + this.tokenizer.state = jo.PLAINTEXT + } + } + _setDocumentType(e) { + const t = e.name || "", + n = e.publicId || "", + r = e.systemId || ""; + if (this.treeAdapter.setDocumentType(this.document, t, n, r), e.location) { + const t = this.treeAdapter.getChildNodes(this.document).find((e => this.treeAdapter.isDocumentTypeNode(e))); + t && this.treeAdapter.setNodeSourceCodeLocation(t, e.location) + } + } + _attachElementToTree(e, t) { + if (this.options.sourceCodeLocationInfo) { + const n = t && { + ...t, + startTag: t + }; + this.treeAdapter.setNodeSourceCodeLocation(e, n) + } + if (this._shouldFosterParentOnInsertion()) this._fosterParentElement(e); + else { + const t = this.openElements.currentTmplContentOrNode; + this.treeAdapter.appendChild(t, e) + } + } + _appendElement(e, t) { + const n = this.treeAdapter.createElement(e.tagName, t, e.attrs); + this._attachElementToTree(n, e.location) + } + _insertElement(e, t) { + const n = this.treeAdapter.createElement(e.tagName, t, e.attrs); + this._attachElementToTree(n, e.location), this.openElements.push(n, e.tagID) + } + _insertFakeElement(e, t) { + const n = this.treeAdapter.createElement(e, vo.HTML, []); + this._attachElementToTree(n, null), this.openElements.push(n, t) + } + _insertTemplate(e) { + const t = this.treeAdapter.createElement(e.tagName, vo.HTML, e.attrs), + n = this.treeAdapter.createDocumentFragment(); + this.treeAdapter.setTemplateContent(t, n), this._attachElementToTree(t, e.location), this.openElements.push(t, e.tagID), this.options.sourceCodeLocationInfo && this.treeAdapter.setNodeSourceCodeLocation(n, null) + } + _insertFakeRootElement() { + const e = this.treeAdapter.createElement(Mo.HTML, vo.HTML, []); + this.options.sourceCodeLocationInfo && this.treeAdapter.setNodeSourceCodeLocation(e, null), this.treeAdapter.appendChild(this.openElements.current, e), this.openElements.push(e, Po.HTML) + } + _appendCommentNode(e, t) { + const n = this.treeAdapter.createCommentNode(e.data); + this.treeAdapter.appendChild(t, n), this.options.sourceCodeLocationInfo && this.treeAdapter.setNodeSourceCodeLocation(n, e.location) + } + _insertCharacters(e) { + let t, n; + if (this._shouldFosterParentOnInsertion() ? (({ + parent: t, + beforeElement: n + } = this._findFosterParentingLocation()), n ? this.treeAdapter.insertTextBefore(t, e.chars, n) : this.treeAdapter.insertText(t, e.chars)) : (t = this.openElements.currentTmplContentOrNode, this.treeAdapter.insertText(t, e.chars)), !e.location) return; + const r = this.treeAdapter.getChildNodes(t), + i = n ? r.lastIndexOf(n) : r.length, + s = r[i - 1]; + if (this.treeAdapter.getNodeSourceCodeLocation(s)) { + const { + endLine: t, + endCol: n, + endOffset: r + } = e.location; + this.treeAdapter.updateNodeSourceCodeLocation(s, { + endLine: t, + endCol: n, + endOffset: r + }) + } else this.options.sourceCodeLocationInfo && this.treeAdapter.setNodeSourceCodeLocation(s, e.location) + } + _adoptNodes(e, t) { + for (let n = this.treeAdapter.getFirstChild(e); n; n = this.treeAdapter.getFirstChild(e)) this.treeAdapter.detachNode(n), this.treeAdapter.appendChild(t, n) + } + _setEndLocation(e, t) { + if (this.treeAdapter.getNodeSourceCodeLocation(e) && t.location) { + const n = t.location, + r = this.treeAdapter.getTagName(e), + i = t.type === To.END_TAG && r === t.tagName ? { + endTag: { + ...n + }, + endLine: n.endLine, + endCol: n.endCol, + endOffset: n.endOffset + } : { + endLine: n.startLine, + endCol: n.startCol, + endOffset: n.startOffset + }; + this.treeAdapter.updateNodeSourceCodeLocation(e, i) + } + } + shouldProcessStartTagTokenInForeignContent(e) { + if (!this.currentNotInHTML) return !1; + let t, n; + return 0 === this.openElements.stackTop && this.fragmentContext ? (t = this.fragmentContext, n = this.fragmentContextID) : ({ + current: t, + currentTagId: n + } = this.openElements), (e.tagID !== Po.SVG || this.treeAdapter.getTagName(t) !== Mo.ANNOTATION_XML || this.treeAdapter.getNamespaceURI(t) !== vo.MATHML) && (this.tokenizer.inForeignNode || (e.tagID === Po.MGLYPH || e.tagID === Po.MALIGNMARK) && !this._isIntegrationPoint(n, t, vo.HTML)) + } + _processToken(e) { + switch (e.type) { + case To.CHARACTER: + this.onCharacter(e); + break; + case To.NULL_CHARACTER: + this.onNullCharacter(e); + break; + case To.COMMENT: + this.onComment(e); + break; + case To.DOCTYPE: + this.onDoctype(e); + break; + case To.START_TAG: + this._processStartTag(e); + break; + case To.END_TAG: + this.onEndTag(e); + break; + case To.EOF: + this.onEof(e); + break; + case To.WHITESPACE_CHARACTER: + this.onWhitespaceCharacter(e) + } + } + _isIntegrationPoint(e, t, n) { + return Dc(e, this.treeAdapter.getNamespaceURI(t), this.treeAdapter.getAttrList(t), n) + } + _reconstructActiveFormattingElements() { + const e = this.activeFormattingElements.entries.length; + if (e) { + const t = this.activeFormattingElements.entries.findIndex((e => e.type === uc.Marker || this.openElements.contains(e.element))); + for (let n = t < 0 ? e - 1 : t - 1; n >= 0; n--) { + const e = this.activeFormattingElements.entries[n]; + this._insertElement(e.token, this.treeAdapter.getNamespaceURI(e.element)), e.element = this.openElements.current + } + } + } + _closeTableCell() { + this.openElements.generateImpliedEndTags(), this.openElements.popUntilTableCellPopped(), this.activeFormattingElements.clearToLastMarker(), this.insertionMode = Rc.IN_ROW + } + _closePElement() { + this.openElements.generateImpliedEndTagsWithExclusion(Po.P), this.openElements.popUntilTagNamePopped(Po.P) + } + _resetInsertionMode() { + for (let e = this.openElements.stackTop; e >= 0; e--) switch (0 === e && this.fragmentContext ? this.fragmentContextID : this.openElements.tagIDs[e]) { + case Po.TR: + return void(this.insertionMode = Rc.IN_ROW); + case Po.TBODY: + case Po.THEAD: + case Po.TFOOT: + return void(this.insertionMode = Rc.IN_TABLE_BODY); + case Po.CAPTION: + return void(this.insertionMode = Rc.IN_CAPTION); + case Po.COLGROUP: + return void(this.insertionMode = Rc.IN_COLUMN_GROUP); + case Po.TABLE: + return void(this.insertionMode = Rc.IN_TABLE); + case Po.BODY: + return void(this.insertionMode = Rc.IN_BODY); + case Po.FRAMESET: + return void(this.insertionMode = Rc.IN_FRAMESET); + case Po.SELECT: + return void this._resetInsertionModeForSelect(e); + case Po.TEMPLATE: + return void(this.insertionMode = this.tmplInsertionModeStack[0]); + case Po.HTML: + return void(this.insertionMode = this.headElement ? Rc.AFTER_HEAD : Rc.BEFORE_HEAD); + case Po.TD: + case Po.TH: + if (e > 0) return void(this.insertionMode = Rc.IN_CELL); + break; + case Po.HEAD: + if (e > 0) return void(this.insertionMode = Rc.IN_HEAD) + } + this.insertionMode = Rc.IN_BODY + } + _resetInsertionModeForSelect(e) { + if (e > 0) + for (let t = e - 1; t > 0; t--) { + const e = this.openElements.tagIDs[t]; + if (e === Po.TEMPLATE) break; + if (e === Po.TABLE) return void(this.insertionMode = Rc.IN_SELECT_IN_TABLE) + } + this.insertionMode = Rc.IN_SELECT + } + _isElementCausesFosterParenting(e) { + return Pc.has(e) + } + _shouldFosterParentOnInsertion() { + return this.fosterParentingEnabled && this._isElementCausesFosterParenting(this.openElements.currentTagId) + } + _findFosterParentingLocation() { + for (let e = this.openElements.stackTop; e >= 0; e--) { + const t = this.openElements.items[e]; + switch (this.openElements.tagIDs[e]) { + case Po.TEMPLATE: + if (this.treeAdapter.getNamespaceURI(t) === vo.HTML) return { + parent: this.treeAdapter.getTemplateContent(t), + beforeElement: null + }; + break; + case Po.TABLE: { + const n = this.treeAdapter.getParentNode(t); + return n ? { + parent: n, + beforeElement: t + } : { + parent: this.openElements.items[e - 1], + beforeElement: null + } + } + } + } + return { + parent: this.openElements.items[0], + beforeElement: null + } + } + _fosterParentElement(e) { + const t = this._findFosterParentingLocation(); + t.beforeElement ? this.treeAdapter.insertBefore(t.parent, e, t.beforeElement) : this.treeAdapter.appendChild(t.parent, e) + } + _isSpecialElement(e, t) { + const n = this.treeAdapter.getNamespaceURI(e); + return Ho[n].has(t) + } + onCharacter(e) { + if (this.skipNextNewLine = !1, this.tokenizer.inForeignNode) ! function(e, t) { + e._insertCharacters(t), e.framesetOk = !1 + }(this, e); + else switch (this.insertionMode) { + case Rc.INITIAL: + Vc(this, e); + break; + case Rc.BEFORE_HTML: + Wc(this, e); + break; + case Rc.BEFORE_HEAD: + Qc(this, e); + break; + case Rc.IN_HEAD: + zc(this, e); + break; + case Rc.IN_HEAD_NO_SCRIPT: + Jc(this, e); + break; + case Rc.AFTER_HEAD: + Zc(this, e); + break; + case Rc.IN_BODY: + case Rc.IN_CAPTION: + case Rc.IN_CELL: + case Rc.IN_TEMPLATE: + nl(this, e); + break; + case Rc.TEXT: + case Rc.IN_SELECT: + case Rc.IN_SELECT_IN_TABLE: + this._insertCharacters(e); + break; + case Rc.IN_TABLE: + case Rc.IN_TABLE_BODY: + case Rc.IN_ROW: + ul(this, e); + break; + case Rc.IN_TABLE_TEXT: + ml(this, e); + break; + case Rc.IN_COLUMN_GROUP: + gl(this, e); + break; + case Rc.AFTER_BODY: + kl(this, e); + break; + case Rc.AFTER_AFTER_BODY: + vl(this, e) + } + } + onNullCharacter(e) { + if (this.skipNextNewLine = !1, this.tokenizer.inForeignNode) ! function(e, t) { + t.chars = "�", e._insertCharacters(t) + }(this, e); + else switch (this.insertionMode) { + case Rc.INITIAL: + Vc(this, e); + break; + case Rc.BEFORE_HTML: + Wc(this, e); + break; + case Rc.BEFORE_HEAD: + Qc(this, e); + break; + case Rc.IN_HEAD: + zc(this, e); + break; + case Rc.IN_HEAD_NO_SCRIPT: + Jc(this, e); + break; + case Rc.AFTER_HEAD: + Zc(this, e); + break; + case Rc.TEXT: + this._insertCharacters(e); + break; + case Rc.IN_TABLE: + case Rc.IN_TABLE_BODY: + case Rc.IN_ROW: + ul(this, e); + break; + case Rc.IN_COLUMN_GROUP: + gl(this, e); + break; + case Rc.AFTER_BODY: + kl(this, e); + break; + case Rc.AFTER_AFTER_BODY: + vl(this, e) + } + } + onComment(e) { + if (this.skipNextNewLine = !1, this.currentNotInHTML) Kc(this, e); + else switch (this.insertionMode) { + case Rc.INITIAL: + case Rc.BEFORE_HTML: + case Rc.BEFORE_HEAD: + case Rc.IN_HEAD: + case Rc.IN_HEAD_NO_SCRIPT: + case Rc.AFTER_HEAD: + case Rc.IN_BODY: + case Rc.IN_TABLE: + case Rc.IN_CAPTION: + case Rc.IN_COLUMN_GROUP: + case Rc.IN_TABLE_BODY: + case Rc.IN_ROW: + case Rc.IN_CELL: + case Rc.IN_SELECT: + case Rc.IN_SELECT_IN_TABLE: + case Rc.IN_TEMPLATE: + case Rc.IN_FRAMESET: + case Rc.AFTER_FRAMESET: + Kc(this, e); + break; + case Rc.IN_TABLE_TEXT: + Tl(this, e); + break; + case Rc.AFTER_BODY: + ! function(e, t) { + e._appendCommentNode(t, e.openElements.items[0]) + }(this, e); + break; + case Rc.AFTER_AFTER_BODY: + case Rc.AFTER_AFTER_FRAMESET: + ! function(e, t) { + e._appendCommentNode(t, e.document) + }(this, e) + } + } + onDoctype(e) { + switch (this.skipNextNewLine = !1, this.insertionMode) { + case Rc.INITIAL: + ! function(e, t) { + e._setDocumentType(t); + const n = t.forceQuirks ? Ro.QUIRKS : function(e) { + if ("html" !== e.name) return Ro.QUIRKS; + const { + systemId: t + } = e; + if (t && "http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd" === t.toLowerCase()) return Ro.QUIRKS; + let { + publicId: n + } = e; + if (null !== n) { + if (n = n.toLowerCase(), _c.has(n)) return Ro.QUIRKS; + let e = null === t ? Tc : mc; + if (Nc(n, e)) return Ro.QUIRKS; + if (e = null === t ? Ac : gc, Nc(n, e)) return Ro.LIMITED_QUIRKS + } + return Ro.NO_QUIRKS + }(t); + (function(e) { + return "html" === e.name && null === e.publicId && (null === e.systemId || "about:legacy-compat" === e.systemId) + })(t) || e._err(t, Eo.nonConformingDoctype); + e.treeAdapter.setDocumentMode(e.document, n), e.insertionMode = Rc.BEFORE_HTML + }(this, e); + break; + case Rc.BEFORE_HEAD: + case Rc.IN_HEAD: + case Rc.IN_HEAD_NO_SCRIPT: + case Rc.AFTER_HEAD: + this._err(e, Eo.misplacedDoctype); + break; + case Rc.IN_TABLE_TEXT: + Tl(this, e) + } + } + onStartTag(e) { + this.skipNextNewLine = !1, this.currentToken = e, this._processStartTag(e), e.selfClosing && !e.ackSelfClosing && this._err(e, Eo.nonVoidHtmlElementStartTagWithTrailingSolidus) + } + _processStartTag(e) { + this.shouldProcessStartTagTokenInForeignContent(e) ? function(e, t) { + if (function(e) { + const t = e.tagID; + return t === Po.FONT && e.attrs.some((({ + name: e + }) => e === Do.COLOR || e === Do.SIZE || e === Do.FACE)) || yc.has(t) + }(t)) Dl(e), e._startTagOutsideForeignContent(t); + else { + const n = e._getAdjustedCurrentElement(), + r = e.treeAdapter.getNamespaceURI(n); + r === vo.MATHML ? Lc(t) : r === vo.SVG && (! function(e) { + const t = Oc.get(e.tagName); + null != t && (e.tagName = t, e.tagID = Fo(e.tagName)) + }(t), kc(t)), vc(t), t.selfClosing ? e._appendElement(t, r) : e._insertElement(t, r), t.ackSelfClosing = !0 + } + }(this, e) : this._startTagOutsideForeignContent(e) + } + _startTagOutsideForeignContent(e) { + switch (this.insertionMode) { + case Rc.INITIAL: + Vc(this, e); + break; + case Rc.BEFORE_HTML: + ! function(e, t) { + t.tagID === Po.HTML ? (e._insertElement(t, vo.HTML), e.insertionMode = Rc.BEFORE_HEAD) : Wc(e, t) + }(this, e); + break; + case Rc.BEFORE_HEAD: + ! function(e, t) { + switch (t.tagID) { + case Po.HTML: + ol(e, t); + break; + case Po.HEAD: + e._insertElement(t, vo.HTML), e.headElement = e.openElements.current, e.insertionMode = Rc.IN_HEAD; + break; + default: + Qc(e, t) + } + }(this, e); + break; + case Rc.IN_HEAD: + Xc(this, e); + break; + case Rc.IN_HEAD_NO_SCRIPT: + ! function(e, t) { + switch (t.tagID) { + case Po.HTML: + ol(e, t); + break; + case Po.BASEFONT: + case Po.BGSOUND: + case Po.HEAD: + case Po.LINK: + case Po.META: + case Po.NOFRAMES: + case Po.STYLE: + Xc(e, t); + break; + case Po.NOSCRIPT: + e._err(t, Eo.nestedNoscriptInHead); + break; + default: + Jc(e, t) + } + }(this, e); + break; + case Rc.AFTER_HEAD: + ! function(e, t) { + switch (t.tagID) { + case Po.HTML: + ol(e, t); + break; + case Po.BODY: + e._insertElement(t, vo.HTML), e.framesetOk = !1, e.insertionMode = Rc.IN_BODY; + break; + case Po.FRAMESET: + e._insertElement(t, vo.HTML), e.insertionMode = Rc.IN_FRAMESET; + break; + case Po.BASE: + case Po.BASEFONT: + case Po.BGSOUND: + case Po.LINK: + case Po.META: + case Po.NOFRAMES: + case Po.SCRIPT: + case Po.STYLE: + case Po.TEMPLATE: + case Po.TITLE: + e._err(t, Eo.abandonedHeadElementChild), e.openElements.push(e.headElement, Po.HEAD), Xc(e, t), e.openElements.remove(e.headElement); + break; + case Po.HEAD: + e._err(t, Eo.misplacedStartTagForHeadElement); + break; + default: + Zc(e, t) + } + }(this, e); + break; + case Rc.IN_BODY: + ol(this, e); + break; + case Rc.IN_TABLE: + pl(this, e); + break; + case Rc.IN_TABLE_TEXT: + Tl(this, e); + break; + case Rc.IN_CAPTION: + ! function(e, t) { + const n = t.tagID; + _l.has(n) ? e.openElements.hasInTableScope(Po.CAPTION) && (e.openElements.generateImpliedEndTags(), e.openElements.popUntilTagNamePopped(Po.CAPTION), e.activeFormattingElements.clearToLastMarker(), e.insertionMode = Rc.IN_TABLE, pl(e, t)) : ol(e, t) + }(this, e); + break; + case Rc.IN_COLUMN_GROUP: + Al(this, e); + break; + case Rc.IN_TABLE_BODY: + Nl(this, e); + break; + case Rc.IN_ROW: + Il(this, e); + break; + case Rc.IN_CELL: + ! function(e, t) { + const n = t.tagID; + _l.has(n) ? (e.openElements.hasInTableScope(Po.TD) || e.openElements.hasInTableScope(Po.TH)) && (e._closeTableCell(), Il(e, t)) : ol(e, t) + }(this, e); + break; + case Rc.IN_SELECT: + bl(this, e); + break; + case Rc.IN_SELECT_IN_TABLE: + ! function(e, t) { + const n = t.tagID; + n === Po.CAPTION || n === Po.TABLE || n === Po.TBODY || n === Po.TFOOT || n === Po.THEAD || n === Po.TR || n === Po.TD || n === Po.TH ? (e.openElements.popUntilTagNamePopped(Po.SELECT), e._resetInsertionMode(), e._processStartTag(t)) : bl(e, t) + }(this, e); + break; + case Rc.IN_TEMPLATE: + ! function(e, t) { + switch (t.tagID) { + case Po.BASE: + case Po.BASEFONT: + case Po.BGSOUND: + case Po.LINK: + case Po.META: + case Po.NOFRAMES: + case Po.SCRIPT: + case Po.STYLE: + case Po.TEMPLATE: + case Po.TITLE: + Xc(e, t); + break; + case Po.CAPTION: + case Po.COLGROUP: + case Po.TBODY: + case Po.TFOOT: + case Po.THEAD: + e.tmplInsertionModeStack[0] = Rc.IN_TABLE, e.insertionMode = Rc.IN_TABLE, pl(e, t); + break; + case Po.COL: + e.tmplInsertionModeStack[0] = Rc.IN_COLUMN_GROUP, e.insertionMode = Rc.IN_COLUMN_GROUP, Al(e, t); + break; + case Po.TR: + e.tmplInsertionModeStack[0] = Rc.IN_TABLE_BODY, e.insertionMode = Rc.IN_TABLE_BODY, Nl(e, t); + break; + case Po.TD: + case Po.TH: + e.tmplInsertionModeStack[0] = Rc.IN_ROW, e.insertionMode = Rc.IN_ROW, Il(e, t); + break; + default: + e.tmplInsertionModeStack[0] = Rc.IN_BODY, e.insertionMode = Rc.IN_BODY, ol(e, t) + } + }(this, e); + break; + case Rc.AFTER_BODY: + ! function(e, t) { + t.tagID === Po.HTML ? ol(e, t) : kl(e, t) + }(this, e); + break; + case Rc.IN_FRAMESET: + ! function(e, t) { + switch (t.tagID) { + case Po.HTML: + ol(e, t); + break; + case Po.FRAMESET: + e._insertElement(t, vo.HTML); + break; + case Po.FRAME: + e._appendElement(t, vo.HTML), t.ackSelfClosing = !0; + break; + case Po.NOFRAMES: + Xc(e, t) + } + }(this, e); + break; + case Rc.AFTER_FRAMESET: + ! function(e, t) { + switch (t.tagID) { + case Po.HTML: + ol(e, t); + break; + case Po.NOFRAMES: + Xc(e, t) + } + }(this, e); + break; + case Rc.AFTER_AFTER_BODY: + ! function(e, t) { + t.tagID === Po.HTML ? ol(e, t) : vl(e, t) + }(this, e); + break; + case Rc.AFTER_AFTER_FRAMESET: + ! function(e, t) { + switch (t.tagID) { + case Po.HTML: + ol(e, t); + break; + case Po.NOFRAMES: + Xc(e, t) + } + }(this, e) + } + } + onEndTag(e) { + this.skipNextNewLine = !1, this.currentToken = e, this.currentNotInHTML ? function(e, t) { + if (t.tagID === Po.P || t.tagID === Po.BR) return Dl(e), void e._endTagOutsideForeignContent(t); + for (let n = e.openElements.stackTop; n > 0; n--) { + const r = e.openElements.items[n]; + if (e.treeAdapter.getNamespaceURI(r) === vo.HTML) { + e._endTagOutsideForeignContent(t); + break + } + const i = e.treeAdapter.getTagName(r); + if (i.toLowerCase() === t.tagName) { + t.tagName = i, e.openElements.shortenToLength(n); + break + } + } + }(this, e) : this._endTagOutsideForeignContent(e) + } + _endTagOutsideForeignContent(e) { + switch (this.insertionMode) { + case Rc.INITIAL: + Vc(this, e); + break; + case Rc.BEFORE_HTML: + ! function(e, t) { + const n = t.tagID; + n !== Po.HTML && n !== Po.HEAD && n !== Po.BODY && n !== Po.BR || Wc(e, t) + }(this, e); + break; + case Rc.BEFORE_HEAD: + ! function(e, t) { + const n = t.tagID; + n === Po.HEAD || n === Po.BODY || n === Po.HTML || n === Po.BR ? Qc(e, t) : e._err(t, Eo.endTagWithoutMatchingOpenElement) + }(this, e); + break; + case Rc.IN_HEAD: + ! function(e, t) { + switch (t.tagID) { + case Po.HEAD: + e.openElements.pop(), e.insertionMode = Rc.AFTER_HEAD; + break; + case Po.BODY: + case Po.BR: + case Po.HTML: + zc(e, t); + break; + case Po.TEMPLATE: + $c(e, t); + break; + default: + e._err(t, Eo.endTagWithoutMatchingOpenElement) + } + }(this, e); + break; + case Rc.IN_HEAD_NO_SCRIPT: + ! function(e, t) { + switch (t.tagID) { + case Po.NOSCRIPT: + e.openElements.pop(), e.insertionMode = Rc.IN_HEAD; + break; + case Po.BR: + Jc(e, t); + break; + default: + e._err(t, Eo.endTagWithoutMatchingOpenElement) + } + }(this, e); + break; + case Rc.AFTER_HEAD: + ! function(e, t) { + switch (t.tagID) { + case Po.BODY: + case Po.HTML: + case Po.BR: + Zc(e, t); + break; + case Po.TEMPLATE: + $c(e, t); + break; + default: + e._err(t, Eo.endTagWithoutMatchingOpenElement) + } + }(this, e); + break; + case Rc.IN_BODY: + ll(this, e); + break; + case Rc.TEXT: + ! function(e, t) { + var n; + t.tagID === Po.SCRIPT && (null === (n = e.scriptHandler) || void 0 === n || n.call(e, e.openElements.current)); + e.openElements.pop(), e.insertionMode = e.originalInsertionMode + }(this, e); + break; + case Rc.IN_TABLE: + fl(this, e); + break; + case Rc.IN_TABLE_TEXT: + Tl(this, e); + break; + case Rc.IN_CAPTION: + ! function(e, t) { + const n = t.tagID; + switch (n) { + case Po.CAPTION: + case Po.TABLE: + e.openElements.hasInTableScope(Po.CAPTION) && (e.openElements.generateImpliedEndTags(), e.openElements.popUntilTagNamePopped(Po.CAPTION), e.activeFormattingElements.clearToLastMarker(), e.insertionMode = Rc.IN_TABLE, n === Po.TABLE && fl(e, t)); + break; + case Po.BODY: + case Po.COL: + case Po.COLGROUP: + case Po.HTML: + case Po.TBODY: + case Po.TD: + case Po.TFOOT: + case Po.TH: + case Po.THEAD: + case Po.TR: + break; + default: + ll(e, t) + } + }(this, e); + break; + case Rc.IN_COLUMN_GROUP: + ! function(e, t) { + switch (t.tagID) { + case Po.COLGROUP: + e.openElements.currentTagId === Po.COLGROUP && (e.openElements.pop(), e.insertionMode = Rc.IN_TABLE); + break; + case Po.TEMPLATE: + $c(e, t); + break; + case Po.COL: + break; + default: + gl(e, t) + } + }(this, e); + break; + case Rc.IN_TABLE_BODY: + Cl(this, e); + break; + case Rc.IN_ROW: + Sl(this, e); + break; + case Rc.IN_CELL: + ! function(e, t) { + const n = t.tagID; + switch (n) { + case Po.TD: + case Po.TH: + e.openElements.hasInTableScope(n) && (e.openElements.generateImpliedEndTags(), e.openElements.popUntilTagNamePopped(n), e.activeFormattingElements.clearToLastMarker(), e.insertionMode = Rc.IN_ROW); + break; + case Po.TABLE: + case Po.TBODY: + case Po.TFOOT: + case Po.THEAD: + case Po.TR: + e.openElements.hasInTableScope(n) && (e._closeTableCell(), Sl(e, t)); + break; + case Po.BODY: + case Po.CAPTION: + case Po.COL: + case Po.COLGROUP: + case Po.HTML: + break; + default: + ll(e, t) + } + }(this, e); + break; + case Rc.IN_SELECT: + Ol(this, e); + break; + case Rc.IN_SELECT_IN_TABLE: + ! function(e, t) { + const n = t.tagID; + n === Po.CAPTION || n === Po.TABLE || n === Po.TBODY || n === Po.TFOOT || n === Po.THEAD || n === Po.TR || n === Po.TD || n === Po.TH ? e.openElements.hasInTableScope(n) && (e.openElements.popUntilTagNamePopped(Po.SELECT), e._resetInsertionMode(), e.onEndTag(t)) : Ol(e, t) + }(this, e); + break; + case Rc.IN_TEMPLATE: + ! function(e, t) { + t.tagID === Po.TEMPLATE && $c(e, t) + }(this, e); + break; + case Rc.AFTER_BODY: + Ll(this, e); + break; + case Rc.IN_FRAMESET: + ! function(e, t) { + t.tagID !== Po.FRAMESET || e.openElements.isRootHtmlElementCurrent() || (e.openElements.pop(), e.fragmentContext || e.openElements.currentTagId === Po.FRAMESET || (e.insertionMode = Rc.AFTER_FRAMESET)) + }(this, e); + break; + case Rc.AFTER_FRAMESET: + ! function(e, t) { + t.tagID === Po.HTML && (e.insertionMode = Rc.AFTER_AFTER_FRAMESET) + }(this, e); + break; + case Rc.AFTER_AFTER_BODY: + vl(this, e) + } + } + onEof(e) { + switch (this.insertionMode) { + case Rc.INITIAL: + Vc(this, e); + break; + case Rc.BEFORE_HTML: + Wc(this, e); + break; + case Rc.BEFORE_HEAD: + Qc(this, e); + break; + case Rc.IN_HEAD: + zc(this, e); + break; + case Rc.IN_HEAD_NO_SCRIPT: + Jc(this, e); + break; + case Rc.AFTER_HEAD: + Zc(this, e); + break; + case Rc.IN_BODY: + case Rc.IN_TABLE: + case Rc.IN_CAPTION: + case Rc.IN_COLUMN_GROUP: + case Rc.IN_TABLE_BODY: + case Rc.IN_ROW: + case Rc.IN_CELL: + case Rc.IN_SELECT: + case Rc.IN_SELECT_IN_TABLE: + hl(this, e); + break; + case Rc.TEXT: + ! function(e, t) { + e._err(t, Eo.eofInElementThatCanContainOnlyText), e.openElements.pop(), e.insertionMode = e.originalInsertionMode, e.onEof(t) + }(this, e); + break; + case Rc.IN_TABLE_TEXT: + Tl(this, e); + break; + case Rc.IN_TEMPLATE: + yl(this, e); + break; + case Rc.AFTER_BODY: + case Rc.IN_FRAMESET: + case Rc.AFTER_FRAMESET: + case Rc.AFTER_AFTER_BODY: + case Rc.AFTER_AFTER_FRAMESET: + jc(this, e) + } + } + onWhitespaceCharacter(e) { + if (this.skipNextNewLine && (this.skipNextNewLine = !1, e.chars.charCodeAt(0) === io.LINE_FEED)) { + if (1 === e.chars.length) return; + e.chars = e.chars.substr(1) + } + if (this.tokenizer.inForeignNode) this._insertCharacters(e); + else switch (this.insertionMode) { + case Rc.IN_HEAD: + case Rc.IN_HEAD_NO_SCRIPT: + case Rc.AFTER_HEAD: + case Rc.TEXT: + case Rc.IN_COLUMN_GROUP: + case Rc.IN_SELECT: + case Rc.IN_SELECT_IN_TABLE: + case Rc.IN_FRAMESET: + case Rc.AFTER_FRAMESET: + this._insertCharacters(e); + break; + case Rc.IN_BODY: + case Rc.IN_CAPTION: + case Rc.IN_CELL: + case Rc.IN_TEMPLATE: + case Rc.AFTER_BODY: + case Rc.AFTER_AFTER_BODY: + case Rc.AFTER_AFTER_FRAMESET: + tl(this, e); + break; + case Rc.IN_TABLE: + case Rc.IN_TABLE_BODY: + case Rc.IN_ROW: + ul(this, e); + break; + case Rc.IN_TABLE_TEXT: + El(this, e) + } + } +} + +function Bc(e, t) { + let n = e.activeFormattingElements.getElementEntryInScopeWithTagName(t.tagName); + return n ? e.openElements.contains(n.element) ? e.openElements.hasInScope(t.tagID) || (n = null) : (e.activeFormattingElements.removeEntry(n), n = null) : cl(e, t), n +} + +function Fc(e, t) { + let n = null, + r = e.openElements.stackTop; + for (; r >= 0; r--) { + const i = e.openElements.items[r]; + if (i === t.element) break; + e._isSpecialElement(i, e.openElements.tagIDs[r]) && (n = i) + } + return n || (e.openElements.shortenToLength(r < 0 ? 0 : r), e.activeFormattingElements.removeEntry(t)), n +} + +function Uc(e, t, n) { + let r = t, + i = e.openElements.getCommonAncestor(t); + for (let s = 0, a = i; a !== n; s++, a = i) { + i = e.openElements.getCommonAncestor(a); + const n = e.activeFormattingElements.getElementEntry(a), + o = n && s >= 3; + !n || o ? (o && e.activeFormattingElements.removeEntry(n), e.openElements.remove(a)) : (a = Hc(e, n), r === t && (e.activeFormattingElements.bookmark = n), e.treeAdapter.detachNode(r), e.treeAdapter.appendChild(a, r), r = a) + } + return r +} + +function Hc(e, t) { + const n = e.treeAdapter.getNamespaceURI(t.element), + r = e.treeAdapter.createElement(t.token.tagName, n, t.token.attrs); + return e.openElements.replace(t.element, r), t.element = r, r +} + +function Gc(e, t, n) { + const r = Fo(e.treeAdapter.getTagName(t)); + if (e._isElementCausesFosterParenting(r)) e._fosterParentElement(n); + else { + const i = e.treeAdapter.getNamespaceURI(t); + r === Po.TEMPLATE && i === vo.HTML && (t = e.treeAdapter.getTemplateContent(t)), e.treeAdapter.appendChild(t, n) + } +} + +function Yc(e, t, n) { + const r = e.treeAdapter.getNamespaceURI(n.element), + { + token: i + } = n, + s = e.treeAdapter.createElement(i.tagName, r, i.attrs); + e._adoptNodes(t, s), e.treeAdapter.appendChild(t, s), e.activeFormattingElements.insertElementAfterBookmark(s, i), e.activeFormattingElements.removeEntry(n), e.openElements.remove(n.element), e.openElements.insertAfter(t, s, i.tagID) +} + +function qc(e, t) { + for (let n = 0; n < 8; n++) { + const n = Bc(e, t); + if (!n) break; + const r = Fc(e, n); + if (!r) break; + e.activeFormattingElements.bookmark = n; + const i = Uc(e, r, n.element), + s = e.openElements.getCommonAncestor(n.element); + e.treeAdapter.detachNode(i), s && Gc(e, s, i), Yc(e, r, n) + } +} + +function Kc(e, t) { + e._appendCommentNode(t, e.openElements.currentTmplContentOrNode) +} + +function jc(e, t) { + if (e.stopped = !0, t.location) { + const n = e.fragmentContext ? 0 : 2; + for (let r = e.openElements.stackTop; r >= n; r--) e._setEndLocation(e.openElements.items[r], t); + if (!e.fragmentContext && e.openElements.stackTop >= 0) { + const n = e.openElements.items[0], + r = e.treeAdapter.getNodeSourceCodeLocation(n); + if (r && !r.endTag && (e._setEndLocation(n, t), e.openElements.stackTop >= 1)) { + const n = e.openElements.items[1], + r = e.treeAdapter.getNodeSourceCodeLocation(n); + r && !r.endTag && e._setEndLocation(n, t) + } + } + } +} + +function Vc(e, t) { + e._err(t, Eo.missingDoctype, !0), e.treeAdapter.setDocumentMode(e.document, Ro.QUIRKS), e.insertionMode = Rc.BEFORE_HTML, e._processToken(t) +} + +function Wc(e, t) { + e._insertFakeRootElement(), e.insertionMode = Rc.BEFORE_HEAD, e._processToken(t) +} + +function Qc(e, t) { + e._insertFakeElement(Mo.HEAD, Po.HEAD), e.headElement = e.openElements.current, e.insertionMode = Rc.IN_HEAD, e._processToken(t) +} + +function Xc(e, t) { + switch (t.tagID) { + case Po.HTML: + ol(e, t); + break; + case Po.BASE: + case Po.BASEFONT: + case Po.BGSOUND: + case Po.LINK: + case Po.META: + e._appendElement(t, vo.HTML), t.ackSelfClosing = !0; + break; + case Po.TITLE: + e._switchToTextParsing(t, jo.RCDATA); + break; + case Po.NOSCRIPT: + e.options.scriptingEnabled ? e._switchToTextParsing(t, jo.RAWTEXT) : (e._insertElement(t, vo.HTML), e.insertionMode = Rc.IN_HEAD_NO_SCRIPT); + break; + case Po.NOFRAMES: + case Po.STYLE: + e._switchToTextParsing(t, jo.RAWTEXT); + break; + case Po.SCRIPT: + e._switchToTextParsing(t, jo.SCRIPT_DATA); + break; + case Po.TEMPLATE: + e._insertTemplate(t), e.activeFormattingElements.insertMarker(), e.framesetOk = !1, e.insertionMode = Rc.IN_TEMPLATE, e.tmplInsertionModeStack.unshift(Rc.IN_TEMPLATE); + break; + case Po.HEAD: + e._err(t, Eo.misplacedStartTagForHeadElement); + break; + default: + zc(e, t) + } +} + +function $c(e, t) { + e.openElements.tmplCount > 0 ? (e.openElements.generateImpliedEndTagsThoroughly(), e.openElements.currentTagId !== Po.TEMPLATE && e._err(t, Eo.closingOfElementWithOpenChildElements), e.openElements.popUntilTagNamePopped(Po.TEMPLATE), e.activeFormattingElements.clearToLastMarker(), e.tmplInsertionModeStack.shift(), e._resetInsertionMode()) : e._err(t, Eo.endTagWithoutMatchingOpenElement) +} + +function zc(e, t) { + e.openElements.pop(), e.insertionMode = Rc.AFTER_HEAD, e._processToken(t) +} + +function Jc(e, t) { + const n = t.type === To.EOF ? Eo.openElementsLeftAfterEof : Eo.disallowedContentInNoscriptInHead; + e._err(t, n), e.openElements.pop(), e.insertionMode = Rc.IN_HEAD, e._processToken(t) +} + +function Zc(e, t) { + e._insertFakeElement(Mo.BODY, Po.BODY), e.insertionMode = Rc.IN_BODY, el(e, t) +} + +function el(e, t) { + switch (t.type) { + case To.CHARACTER: + nl(e, t); + break; + case To.WHITESPACE_CHARACTER: + tl(e, t); + break; + case To.COMMENT: + Kc(e, t); + break; + case To.START_TAG: + ol(e, t); + break; + case To.END_TAG: + ll(e, t); + break; + case To.EOF: + hl(e, t) + } +} + +function tl(e, t) { + e._reconstructActiveFormattingElements(), e._insertCharacters(t) +} + +function nl(e, t) { + e._reconstructActiveFormattingElements(), e._insertCharacters(t), e.framesetOk = !1 +} + +function rl(e, t) { + e._reconstructActiveFormattingElements(), e._appendElement(t, vo.HTML), e.framesetOk = !1, t.ackSelfClosing = !0 +} + +function il(e) { + const t = _o(e, Do.TYPE); + return null != t && "hidden" === t.toLowerCase() +} + +function sl(e, t) { + e._switchToTextParsing(t, jo.RAWTEXT) +} + +function al(e, t) { + e._reconstructActiveFormattingElements(), e._insertElement(t, vo.HTML) +} + +function ol(e, t) { + switch (t.tagID) { + case Po.I: + case Po.S: + case Po.B: + case Po.U: + case Po.EM: + case Po.TT: + case Po.BIG: + case Po.CODE: + case Po.FONT: + case Po.SMALL: + case Po.STRIKE: + case Po.STRONG: + ! function(e, t) { + e._reconstructActiveFormattingElements(), e._insertElement(t, vo.HTML), e.activeFormattingElements.pushElement(e.openElements.current, t) + }(e, t); + break; + case Po.A: + ! function(e, t) { + const n = e.activeFormattingElements.getElementEntryInScopeWithTagName(Mo.A); + n && (qc(e, t), e.openElements.remove(n.element), e.activeFormattingElements.removeEntry(n)), e._reconstructActiveFormattingElements(), e._insertElement(t, vo.HTML), e.activeFormattingElements.pushElement(e.openElements.current, t) + }(e, t); + break; + case Po.H1: + case Po.H2: + case Po.H3: + case Po.H4: + case Po.H5: + case Po.H6: + ! function(e, t) { + e.openElements.hasInButtonScope(Po.P) && e._closePElement(), Go(e.openElements.currentTagId) && e.openElements.pop(), e._insertElement(t, vo.HTML) + }(e, t); + break; + case Po.P: + case Po.DL: + case Po.OL: + case Po.UL: + case Po.DIV: + case Po.DIR: + case Po.NAV: + case Po.MAIN: + case Po.MENU: + case Po.ASIDE: + case Po.CENTER: + case Po.FIGURE: + case Po.FOOTER: + case Po.HEADER: + case Po.HGROUP: + case Po.DIALOG: + case Po.DETAILS: + case Po.ADDRESS: + case Po.ARTICLE: + case Po.SECTION: + case Po.SUMMARY: + case Po.FIELDSET: + case Po.BLOCKQUOTE: + case Po.FIGCAPTION: + ! function(e, t) { + e.openElements.hasInButtonScope(Po.P) && e._closePElement(), e._insertElement(t, vo.HTML) + }(e, t); + break; + case Po.LI: + case Po.DD: + case Po.DT: + ! function(e, t) { + e.framesetOk = !1; + const n = t.tagID; + for (let t = e.openElements.stackTop; t >= 0; t--) { + const r = e.openElements.tagIDs[t]; + if (n === Po.LI && r === Po.LI || (n === Po.DD || n === Po.DT) && (r === Po.DD || r === Po.DT)) { + e.openElements.generateImpliedEndTagsWithExclusion(r), e.openElements.popUntilTagNamePopped(r); + break + } + if (r !== Po.ADDRESS && r !== Po.DIV && r !== Po.P && e._isSpecialElement(e.openElements.items[t], r)) break + } + e.openElements.hasInButtonScope(Po.P) && e._closePElement(), e._insertElement(t, vo.HTML) + }(e, t); + break; + case Po.BR: + case Po.IMG: + case Po.WBR: + case Po.AREA: + case Po.EMBED: + case Po.KEYGEN: + rl(e, t); + break; + case Po.HR: + ! function(e, t) { + e.openElements.hasInButtonScope(Po.P) && e._closePElement(), e._appendElement(t, vo.HTML), e.framesetOk = !1, t.ackSelfClosing = !0 + }(e, t); + break; + case Po.RB: + case Po.RTC: + ! function(e, t) { + e.openElements.hasInScope(Po.RUBY) && e.openElements.generateImpliedEndTags(), e._insertElement(t, vo.HTML) + }(e, t); + break; + case Po.RT: + case Po.RP: + ! function(e, t) { + e.openElements.hasInScope(Po.RUBY) && e.openElements.generateImpliedEndTagsWithExclusion(Po.RTC), e._insertElement(t, vo.HTML) + }(e, t); + break; + case Po.PRE: + case Po.LISTING: + ! function(e, t) { + e.openElements.hasInButtonScope(Po.P) && e._closePElement(), e._insertElement(t, vo.HTML), e.skipNextNewLine = !0, e.framesetOk = !1 + }(e, t); + break; + case Po.XMP: + ! function(e, t) { + e.openElements.hasInButtonScope(Po.P) && e._closePElement(), e._reconstructActiveFormattingElements(), e.framesetOk = !1, e._switchToTextParsing(t, jo.RAWTEXT) + }(e, t); + break; + case Po.SVG: + ! function(e, t) { + e._reconstructActiveFormattingElements(), kc(t), vc(t), t.selfClosing ? e._appendElement(t, vo.SVG) : e._insertElement(t, vo.SVG), t.ackSelfClosing = !0 + }(e, t); + break; + case Po.HTML: + ! function(e, t) { + 0 === e.openElements.tmplCount && e.treeAdapter.adoptAttributes(e.openElements.items[0], t.attrs) + }(e, t); + break; + case Po.BASE: + case Po.LINK: + case Po.META: + case Po.STYLE: + case Po.TITLE: + case Po.SCRIPT: + case Po.BGSOUND: + case Po.BASEFONT: + case Po.TEMPLATE: + Xc(e, t); + break; + case Po.BODY: + ! function(e, t) { + const n = e.openElements.tryPeekProperlyNestedBodyElement(); + n && 0 === e.openElements.tmplCount && (e.framesetOk = !1, e.treeAdapter.adoptAttributes(n, t.attrs)) + }(e, t); + break; + case Po.FORM: + ! function(e, t) { + const n = e.openElements.tmplCount > 0; + e.formElement && !n || (e.openElements.hasInButtonScope(Po.P) && e._closePElement(), e._insertElement(t, vo.HTML), n || (e.formElement = e.openElements.current)) + }(e, t); + break; + case Po.NOBR: + ! function(e, t) { + e._reconstructActiveFormattingElements(), e.openElements.hasInScope(Po.NOBR) && (qc(e, t), e._reconstructActiveFormattingElements()), e._insertElement(t, vo.HTML), e.activeFormattingElements.pushElement(e.openElements.current, t) + }(e, t); + break; + case Po.MATH: + ! function(e, t) { + e._reconstructActiveFormattingElements(), Lc(t), vc(t), t.selfClosing ? e._appendElement(t, vo.MATHML) : e._insertElement(t, vo.MATHML), t.ackSelfClosing = !0 + }(e, t); + break; + case Po.TABLE: + ! function(e, t) { + e.treeAdapter.getDocumentMode(e.document) !== Ro.QUIRKS && e.openElements.hasInButtonScope(Po.P) && e._closePElement(), e._insertElement(t, vo.HTML), e.framesetOk = !1, e.insertionMode = Rc.IN_TABLE + }(e, t); + break; + case Po.INPUT: + ! function(e, t) { + e._reconstructActiveFormattingElements(), e._appendElement(t, vo.HTML), il(t) || (e.framesetOk = !1), t.ackSelfClosing = !0 + }(e, t); + break; + case Po.PARAM: + case Po.TRACK: + case Po.SOURCE: + ! function(e, t) { + e._appendElement(t, vo.HTML), t.ackSelfClosing = !0 + }(e, t); + break; + case Po.IMAGE: + ! function(e, t) { + t.tagName = Mo.IMG, t.tagID = Po.IMG, rl(e, t) + }(e, t); + break; + case Po.BUTTON: + ! function(e, t) { + e.openElements.hasInScope(Po.BUTTON) && (e.openElements.generateImpliedEndTags(), e.openElements.popUntilTagNamePopped(Po.BUTTON)), e._reconstructActiveFormattingElements(), e._insertElement(t, vo.HTML), e.framesetOk = !1 + }(e, t); + break; + case Po.APPLET: + case Po.OBJECT: + case Po.MARQUEE: + ! function(e, t) { + e._reconstructActiveFormattingElements(), e._insertElement(t, vo.HTML), e.activeFormattingElements.insertMarker(), e.framesetOk = !1 + }(e, t); + break; + case Po.IFRAME: + ! function(e, t) { + e.framesetOk = !1, e._switchToTextParsing(t, jo.RAWTEXT) + }(e, t); + break; + case Po.SELECT: + ! function(e, t) { + e._reconstructActiveFormattingElements(), e._insertElement(t, vo.HTML), e.framesetOk = !1, e.insertionMode = e.insertionMode === Rc.IN_TABLE || e.insertionMode === Rc.IN_CAPTION || e.insertionMode === Rc.IN_TABLE_BODY || e.insertionMode === Rc.IN_ROW || e.insertionMode === Rc.IN_CELL ? Rc.IN_SELECT_IN_TABLE : Rc.IN_SELECT + }(e, t); + break; + case Po.OPTION: + case Po.OPTGROUP: + ! function(e, t) { + e.openElements.currentTagId === Po.OPTION && e.openElements.pop(), e._reconstructActiveFormattingElements(), e._insertElement(t, vo.HTML) + }(e, t); + break; + case Po.NOEMBED: + sl(e, t); + break; + case Po.FRAMESET: + ! function(e, t) { + const n = e.openElements.tryPeekProperlyNestedBodyElement(); + e.framesetOk && n && (e.treeAdapter.detachNode(n), e.openElements.popAllUpToHtmlElement(), e._insertElement(t, vo.HTML), e.insertionMode = Rc.IN_FRAMESET) + }(e, t); + break; + case Po.TEXTAREA: + ! function(e, t) { + e._insertElement(t, vo.HTML), e.skipNextNewLine = !0, e.tokenizer.state = jo.RCDATA, e.originalInsertionMode = e.insertionMode, e.framesetOk = !1, e.insertionMode = Rc.TEXT + }(e, t); + break; + case Po.NOSCRIPT: + e.options.scriptingEnabled ? sl(e, t) : al(e, t); + break; + case Po.PLAINTEXT: + ! function(e, t) { + e.openElements.hasInButtonScope(Po.P) && e._closePElement(), e._insertElement(t, vo.HTML), e.tokenizer.state = jo.PLAINTEXT + }(e, t); + break; + case Po.COL: + case Po.TH: + case Po.TD: + case Po.TR: + case Po.HEAD: + case Po.FRAME: + case Po.TBODY: + case Po.TFOOT: + case Po.THEAD: + case Po.CAPTION: + case Po.COLGROUP: + break; + default: + al(e, t) + } +} + +function cl(e, t) { + const n = t.tagName, + r = t.tagID; + for (let t = e.openElements.stackTop; t > 0; t--) { + const i = e.openElements.items[t], + s = e.openElements.tagIDs[t]; + if (r === s && (r !== Po.UNKNOWN || e.treeAdapter.getTagName(i) === n)) { + e.openElements.generateImpliedEndTagsWithExclusion(r), e.openElements.stackTop >= t && e.openElements.shortenToLength(t); + break + } + if (e._isSpecialElement(i, s)) break + } +} + +function ll(e, t) { + switch (t.tagID) { + case Po.A: + case Po.B: + case Po.I: + case Po.S: + case Po.U: + case Po.EM: + case Po.TT: + case Po.BIG: + case Po.CODE: + case Po.FONT: + case Po.NOBR: + case Po.SMALL: + case Po.STRIKE: + case Po.STRONG: + qc(e, t); + break; + case Po.P: + ! function(e) { + e.openElements.hasInButtonScope(Po.P) || e._insertFakeElement(Mo.P, Po.P), e._closePElement() + }(e); + break; + case Po.DL: + case Po.UL: + case Po.OL: + case Po.DIR: + case Po.DIV: + case Po.NAV: + case Po.PRE: + case Po.MAIN: + case Po.MENU: + case Po.ASIDE: + case Po.BUTTON: + case Po.CENTER: + case Po.FIGURE: + case Po.FOOTER: + case Po.HEADER: + case Po.HGROUP: + case Po.DIALOG: + case Po.ADDRESS: + case Po.ARTICLE: + case Po.DETAILS: + case Po.SECTION: + case Po.SUMMARY: + case Po.LISTING: + case Po.FIELDSET: + case Po.BLOCKQUOTE: + case Po.FIGCAPTION: + ! function(e, t) { + const n = t.tagID; + e.openElements.hasInScope(n) && (e.openElements.generateImpliedEndTags(), e.openElements.popUntilTagNamePopped(n)) + }(e, t); + break; + case Po.LI: + ! function(e) { + e.openElements.hasInListItemScope(Po.LI) && (e.openElements.generateImpliedEndTagsWithExclusion(Po.LI), e.openElements.popUntilTagNamePopped(Po.LI)) + }(e); + break; + case Po.DD: + case Po.DT: + ! function(e, t) { + const n = t.tagID; + e.openElements.hasInScope(n) && (e.openElements.generateImpliedEndTagsWithExclusion(n), e.openElements.popUntilTagNamePopped(n)) + }(e, t); + break; + case Po.H1: + case Po.H2: + case Po.H3: + case Po.H4: + case Po.H5: + case Po.H6: + ! function(e) { + e.openElements.hasNumberedHeaderInScope() && (e.openElements.generateImpliedEndTags(), e.openElements.popUntilNumberedHeaderPopped()) + }(e); + break; + case Po.BR: + ! function(e) { + e._reconstructActiveFormattingElements(), e._insertFakeElement(Mo.BR, Po.BR), e.openElements.pop(), e.framesetOk = !1 + }(e); + break; + case Po.BODY: + ! function(e, t) { + if (e.openElements.hasInScope(Po.BODY) && (e.insertionMode = Rc.AFTER_BODY, e.options.sourceCodeLocationInfo)) { + const n = e.openElements.tryPeekProperlyNestedBodyElement(); + n && e._setEndLocation(n, t) + } + }(e, t); + break; + case Po.HTML: + ! function(e, t) { + e.openElements.hasInScope(Po.BODY) && (e.insertionMode = Rc.AFTER_BODY, Ll(e, t)) + }(e, t); + break; + case Po.FORM: + ! function(e) { + const t = e.openElements.tmplCount > 0, + { + formElement: n + } = e; + t || (e.formElement = null), (n || t) && e.openElements.hasInScope(Po.FORM) && (e.openElements.generateImpliedEndTags(), t ? e.openElements.popUntilTagNamePopped(Po.FORM) : n && e.openElements.remove(n)) + }(e); + break; + case Po.APPLET: + case Po.OBJECT: + case Po.MARQUEE: + ! function(e, t) { + const n = t.tagID; + e.openElements.hasInScope(n) && (e.openElements.generateImpliedEndTags(), e.openElements.popUntilTagNamePopped(n), e.activeFormattingElements.clearToLastMarker()) + }(e, t); + break; + case Po.TEMPLATE: + $c(e, t); + break; + default: + cl(e, t) + } +} + +function hl(e, t) { + e.tmplInsertionModeStack.length > 0 ? yl(e, t) : jc(e, t) +} + +function ul(e, t) { + if (Pc.has(e.openElements.currentTagId)) switch (e.pendingCharacterTokens.length = 0, e.hasNonWhitespacePendingCharacterToken = !1, e.originalInsertionMode = e.insertionMode, e.insertionMode = Rc.IN_TABLE_TEXT, t.type) { + case To.CHARACTER: + ml(e, t); + break; + case To.WHITESPACE_CHARACTER: + El(e, t) + } else dl(e, t) +} + +function pl(e, t) { + switch (t.tagID) { + case Po.TD: + case Po.TH: + case Po.TR: + ! function(e, t) { + e.openElements.clearBackToTableContext(), e._insertFakeElement(Mo.TBODY, Po.TBODY), e.insertionMode = Rc.IN_TABLE_BODY, Nl(e, t) + }(e, t); + break; + case Po.STYLE: + case Po.SCRIPT: + case Po.TEMPLATE: + Xc(e, t); + break; + case Po.COL: + ! function(e, t) { + e.openElements.clearBackToTableContext(), e._insertFakeElement(Mo.COLGROUP, Po.COLGROUP), e.insertionMode = Rc.IN_COLUMN_GROUP, Al(e, t) + }(e, t); + break; + case Po.FORM: + ! function(e, t) { + e.formElement || 0 !== e.openElements.tmplCount || (e._insertElement(t, vo.HTML), e.formElement = e.openElements.current, e.openElements.pop()) + }(e, t); + break; + case Po.TABLE: + ! function(e, t) { + e.openElements.hasInTableScope(Po.TABLE) && (e.openElements.popUntilTagNamePopped(Po.TABLE), e._resetInsertionMode(), e._processStartTag(t)) + }(e, t); + break; + case Po.TBODY: + case Po.TFOOT: + case Po.THEAD: + ! function(e, t) { + e.openElements.clearBackToTableContext(), e._insertElement(t, vo.HTML), e.insertionMode = Rc.IN_TABLE_BODY + }(e, t); + break; + case Po.INPUT: + ! function(e, t) { + il(t) ? e._appendElement(t, vo.HTML) : dl(e, t), t.ackSelfClosing = !0 + }(e, t); + break; + case Po.CAPTION: + ! function(e, t) { + e.openElements.clearBackToTableContext(), e.activeFormattingElements.insertMarker(), e._insertElement(t, vo.HTML), e.insertionMode = Rc.IN_CAPTION + }(e, t); + break; + case Po.COLGROUP: + ! function(e, t) { + e.openElements.clearBackToTableContext(), e._insertElement(t, vo.HTML), e.insertionMode = Rc.IN_COLUMN_GROUP + }(e, t); + break; + default: + dl(e, t) + } +} + +function fl(e, t) { + switch (t.tagID) { + case Po.TABLE: + e.openElements.hasInTableScope(Po.TABLE) && (e.openElements.popUntilTagNamePopped(Po.TABLE), e._resetInsertionMode()); + break; + case Po.TEMPLATE: + $c(e, t); + break; + case Po.BODY: + case Po.CAPTION: + case Po.COL: + case Po.COLGROUP: + case Po.HTML: + case Po.TBODY: + case Po.TD: + case Po.TFOOT: + case Po.TH: + case Po.THEAD: + case Po.TR: + break; + default: + dl(e, t) + } +} + +function dl(e, t) { + const n = e.fosterParentingEnabled; + e.fosterParentingEnabled = !0, el(e, t), e.fosterParentingEnabled = n +} + +function El(e, t) { + e.pendingCharacterTokens.push(t) +} + +function ml(e, t) { + e.pendingCharacterTokens.push(t), e.hasNonWhitespacePendingCharacterToken = !0 +} + +function Tl(e, t) { + let n = 0; + if (e.hasNonWhitespacePendingCharacterToken) + for (; n < e.pendingCharacterTokens.length; n++) dl(e, e.pendingCharacterTokens[n]); + else + for (; n < e.pendingCharacterTokens.length; n++) e._insertCharacters(e.pendingCharacterTokens[n]); + e.insertionMode = e.originalInsertionMode, e._processToken(t) +} +const _l = new Set([Po.CAPTION, Po.COL, Po.COLGROUP, Po.TBODY, Po.TD, Po.TFOOT, Po.TH, Po.THEAD, Po.TR]); + +function Al(e, t) { + switch (t.tagID) { + case Po.HTML: + ol(e, t); + break; + case Po.COL: + e._appendElement(t, vo.HTML), t.ackSelfClosing = !0; + break; + case Po.TEMPLATE: + Xc(e, t); + break; + default: + gl(e, t) + } +} + +function gl(e, t) { + e.openElements.currentTagId === Po.COLGROUP && (e.openElements.pop(), e.insertionMode = Rc.IN_TABLE, e._processToken(t)) +} + +function Nl(e, t) { + switch (t.tagID) { + case Po.TR: + e.openElements.clearBackToTableBodyContext(), e._insertElement(t, vo.HTML), e.insertionMode = Rc.IN_ROW; + break; + case Po.TH: + case Po.TD: + e.openElements.clearBackToTableBodyContext(), e._insertFakeElement(Mo.TR, Po.TR), e.insertionMode = Rc.IN_ROW, Il(e, t); + break; + case Po.CAPTION: + case Po.COL: + case Po.COLGROUP: + case Po.TBODY: + case Po.TFOOT: + case Po.THEAD: + e.openElements.hasTableBodyContextInTableScope() && (e.openElements.clearBackToTableBodyContext(), e.openElements.pop(), e.insertionMode = Rc.IN_TABLE, pl(e, t)); + break; + default: + pl(e, t) + } +} + +function Cl(e, t) { + const n = t.tagID; + switch (t.tagID) { + case Po.TBODY: + case Po.TFOOT: + case Po.THEAD: + e.openElements.hasInTableScope(n) && (e.openElements.clearBackToTableBodyContext(), e.openElements.pop(), e.insertionMode = Rc.IN_TABLE); + break; + case Po.TABLE: + e.openElements.hasTableBodyContextInTableScope() && (e.openElements.clearBackToTableBodyContext(), e.openElements.pop(), e.insertionMode = Rc.IN_TABLE, fl(e, t)); + break; + case Po.BODY: + case Po.CAPTION: + case Po.COL: + case Po.COLGROUP: + case Po.HTML: + case Po.TD: + case Po.TH: + case Po.TR: + break; + default: + fl(e, t) + } +} + +function Il(e, t) { + switch (t.tagID) { + case Po.TH: + case Po.TD: + e.openElements.clearBackToTableRowContext(), e._insertElement(t, vo.HTML), e.insertionMode = Rc.IN_CELL, e.activeFormattingElements.insertMarker(); + break; + case Po.CAPTION: + case Po.COL: + case Po.COLGROUP: + case Po.TBODY: + case Po.TFOOT: + case Po.THEAD: + case Po.TR: + e.openElements.hasInTableScope(Po.TR) && (e.openElements.clearBackToTableRowContext(), e.openElements.pop(), e.insertionMode = Rc.IN_TABLE_BODY, Nl(e, t)); + break; + default: + pl(e, t) + } +} + +function Sl(e, t) { + switch (t.tagID) { + case Po.TR: + e.openElements.hasInTableScope(Po.TR) && (e.openElements.clearBackToTableRowContext(), e.openElements.pop(), e.insertionMode = Rc.IN_TABLE_BODY); + break; + case Po.TABLE: + e.openElements.hasInTableScope(Po.TR) && (e.openElements.clearBackToTableRowContext(), e.openElements.pop(), e.insertionMode = Rc.IN_TABLE_BODY, Cl(e, t)); + break; + case Po.TBODY: + case Po.TFOOT: + case Po.THEAD: + (e.openElements.hasInTableScope(t.tagID) || e.openElements.hasInTableScope(Po.TR)) && (e.openElements.clearBackToTableRowContext(), e.openElements.pop(), e.insertionMode = Rc.IN_TABLE_BODY, Cl(e, t)); + break; + case Po.BODY: + case Po.CAPTION: + case Po.COL: + case Po.COLGROUP: + case Po.HTML: + case Po.TD: + case Po.TH: + break; + default: + fl(e, t) + } +} + +function bl(e, t) { + switch (t.tagID) { + case Po.HTML: + ol(e, t); + break; + case Po.OPTION: + e.openElements.currentTagId === Po.OPTION && e.openElements.pop(), e._insertElement(t, vo.HTML); + break; + case Po.OPTGROUP: + e.openElements.currentTagId === Po.OPTION && e.openElements.pop(), e.openElements.currentTagId === Po.OPTGROUP && e.openElements.pop(), e._insertElement(t, vo.HTML); + break; + case Po.INPUT: + case Po.KEYGEN: + case Po.TEXTAREA: + case Po.SELECT: + e.openElements.hasInSelectScope(Po.SELECT) && (e.openElements.popUntilTagNamePopped(Po.SELECT), e._resetInsertionMode(), t.tagID !== Po.SELECT && e._processStartTag(t)); + break; + case Po.SCRIPT: + case Po.TEMPLATE: + Xc(e, t) + } +} + +function Ol(e, t) { + switch (t.tagID) { + case Po.OPTGROUP: + e.openElements.stackTop > 0 && e.openElements.currentTagId === Po.OPTION && e.openElements.tagIDs[e.openElements.stackTop - 1] === Po.OPTGROUP && e.openElements.pop(), e.openElements.currentTagId === Po.OPTGROUP && e.openElements.pop(); + break; + case Po.OPTION: + e.openElements.currentTagId === Po.OPTION && e.openElements.pop(); + break; + case Po.SELECT: + e.openElements.hasInSelectScope(Po.SELECT) && (e.openElements.popUntilTagNamePopped(Po.SELECT), e._resetInsertionMode()); + break; + case Po.TEMPLATE: + $c(e, t) + } +} + +function yl(e, t) { + e.openElements.tmplCount > 0 ? (e.openElements.popUntilTagNamePopped(Po.TEMPLATE), e.activeFormattingElements.clearToLastMarker(), e.tmplInsertionModeStack.shift(), e._resetInsertionMode(), e.onEof(t)) : jc(e, t) +} + +function Ll(e, t) { + var n; + if (t.tagID === Po.HTML) { + if (e.fragmentContext || (e.insertionMode = Rc.AFTER_AFTER_BODY), e.options.sourceCodeLocationInfo && e.openElements.tagIDs[0] === Po.HTML) { + e._setEndLocation(e.openElements.items[0], t); + const r = e.openElements.items[1]; + r && !(null === (n = e.treeAdapter.getNodeSourceCodeLocation(r)) || void 0 === n ? void 0 : n.endTag) && e._setEndLocation(r, t) + } + } else kl(e, t) +} + +function kl(e, t) { + e.insertionMode = Rc.IN_BODY, el(e, t) +} + +function vl(e, t) { + e.insertionMode = Rc.IN_BODY, el(e, t) +} + +function Dl(e) { + for (; e.treeAdapter.getNamespaceURI(e.openElements.current) !== vo.HTML && !e._isIntegrationPoint(e.openElements.currentTagId, e.openElements.current);) e.openElements.pop() +} +var Rl = Ke((function(e, t) { + Object.defineProperty(t, "__esModule", { + value: !0 + }), t.escapeText = t.escapeAttribute = t.escapeUTF8 = t.escape = t.encodeXML = t.getCodePoint = t.xmlReplacer = void 0, t.xmlReplacer = /["&'<>$\x80-\uFFFF]/g; + var n = new Map([ + [34, """], + [38, "&"], + [39, "'"], + [60, "<"], + [62, ">"] + ]); + + function r(e) { + for (var r, i = "", s = 0; null !== (r = t.xmlReplacer.exec(e));) { + var a = r.index, + o = e.charCodeAt(a), + c = n.get(o); + void 0 !== c ? (i += e.substring(s, a) + c, s = a + 1) : (i += "".concat(e.substring(s, a), "&#x").concat((0, t.getCodePoint)(e, a).toString(16), ";"), s = t.xmlReplacer.lastIndex += Number(55296 == (64512 & o))) + } + return i + e.substr(s) + } + + function i(e, t) { + return function(n) { + for (var r, i = 0, s = ""; r = e.exec(n);) i !== r.index && (s += n.substring(i, r.index)), s += t.get(r[0].charCodeAt(0)), i = r.index + 1; + return s + n.substring(i) + } + } + t.getCodePoint = null != String.prototype.codePointAt ? function(e, t) { + return e.codePointAt(t) + } : function(e, t) { + return 55296 == (64512 & e.charCodeAt(t)) ? 1024 * (e.charCodeAt(t) - 55296) + e.charCodeAt(t + 1) - 56320 + 65536 : e.charCodeAt(t) + }, t.encodeXML = r, t.escape = r, t.escapeUTF8 = i(/[&<>'"]/g, n), t.escapeAttribute = i(/["&\u00A0]/g, new Map([ + [34, """], + [38, "&"], + [160, " "] + ])), t.escapeText = i(/[&<>\u00A0]/g, new Map([ + [38, "&"], + [60, "<"], + [62, ">"], + [160, " "] + ])) +})); +qe(Rl); +var Ml = Rl.escapeText, + Pl = Rl.escapeAttribute; +Rl.escapeUTF8, Rl.escape, Rl.encodeXML, Rl.getCodePoint, Rl.xmlReplacer; +const xl = new Set([Mo.AREA, Mo.BASE, Mo.BASEFONT, Mo.BGSOUND, Mo.BR, Mo.COL, Mo.EMBED, Mo.FRAME, Mo.HR, Mo.IMG, Mo.INPUT, Mo.KEYGEN, Mo.LINK, Mo.META, Mo.PARAM, Mo.SOURCE, Mo.TRACK, Mo.WBR]); +const wl = { + treeAdapter: Ec, + scriptingEnabled: !0 +}; + +function Bl(e, t) { + return Fl(e, { + ...wl, + ...t + }) +} + +function Fl(e, t) { + return t.treeAdapter.isElementNode(e) ? function(e, t) { + const n = t.treeAdapter.getTagName(e); + return `<${n}${function(e,{treeAdapter:t}){let n="";for(const r of t.getAttrList(e)){if(n+=" ",r.namespace)switch(r.namespace){case vo.XML:n+=` + xml: $ { + r.name + } + `;break;case vo.XMLNS:"xmlns"!==r.name&&(n+="xmlns:"),n+=r.name;break;case vo.XLINK:n+=` + xlink: $ { + r.name + } + `;break;default:n+=` + $ { + r.prefix + }: $ { + r.name + } + `}else n+=r.name;n+=` = "${Pl(r.value)}" + `}return n}(e,t)}>${function(e,t){return t.treeAdapter.isElementNode(e)&&t.treeAdapter.getNamespaceURI(e)===vo.HTML&&xl.has(t.treeAdapter.getTagName(e))}(e,t)?"":` + $ { + function(e, t) { + let n = ""; + const r = t.treeAdapter.isElementNode(e) && t.treeAdapter.getTagName(e) === Mo.TEMPLATE && t.treeAdapter.getNamespaceURI(e) === vo.HTML ? t.treeAdapter.getTemplateContent(e) : e, + i = t.treeAdapter.getChildNodes(r); + if (i) + for (const e of i) n += Fl(e, t); + return n + }(e, t) + } < /${n}>`}`}(e,t):t.treeAdapter.isTextNode(e)?function(e,t){const{treeAdapter:n}=t,r=n.getTextNodeContent(e),i=n.getParentNode(e),s=i&&n.isElementNode(i)&&n.getTagName(i);return s&&n.getNamespaceURI(i)===vo.HTML&&(a=s,o=t.scriptingEnabled,Yo.has(a)||o&&a===Mo.NOSCRIPT)?r:Ml(r);var a,o}(e,t):t.treeAdapter.isCommentNode(e)?function(e,{treeAdapter:t}){return`\x3c!--${t.getCommentNodeContent(e)}--\x3e`}(e,t):t.treeAdapter.isDocumentTypeNode(e)?function(e,{treeAdapter:t}){return``}(e,t):""}function Ul(e){return new m(e)}function Hl(e){const t=e.includes('"')?"'":'"';return t+e+t}const Gl={isCommentNode:O,isElementNode:I,isTextNode:b,createDocument(){const e=new N([]);return e["x-mode"]=Ro.NO_QUIRKS,e},createDocumentFragment:()=>new N([]),createElement(e,t,n){const r=Object.create(null),i=Object.create(null),s=Object.create(null);for(let e=0;enew T(e),appendChild(e,t){const n=e.children[e.children.length-1];n&&(n.next=t,t.prev=n),e.children.push(t),t.parent=e},insertBefore(e,t,n){const r=e.children.indexOf(n),{prev:i}=n;i&&(i.next=t,t.prev=i),n.prev=t,t.next=n,e.children.splice(r,0,t),t.parent=e},setTemplateContent(e,t){Gl.appendChild(e,t)},getTemplateContent:e=>e.children[0],setDocumentType(e,t,n,r){const i=function(e,t,n){let r="!DOCTYPE ";return e&&(r+=e),t?r+=` PUBLIC ${Hl(t)}`:n&&(r+=" SYSTEM"),n&&(r+=` ${Hl(n)}`),r}(t,n,r);let s=e.children.find((e=>y(e)&&"!doctype"===e.name));s?s.data=null!=i?i:null:(s=new _("!doctype",i),Gl.appendChild(e,s)),s["x-name"]=null!=t?t:void 0,s["x-publicId"]=null!=n?n:void 0,s["x-systemId"]=null!=r?r:void 0},setDocumentMode(e,t){e["x-mode"]=t},getDocumentMode:e=>e["x-mode"],detachNode(e){if(e.parent){const t=e.parent.children.indexOf(e),{prev:n,next:r}=e;e.prev=null,e.next=null,n&&(n.next=r),r&&(r.prev=n),e.parent.children.splice(t,1),e.parent=null}},insertText(e,t){const n=e.children[e.children.length-1];n&&b(n)?n.data+=t:Gl.appendChild(e,Ul(t))},insertTextBefore(e,t,n){const r=e.children[e.children.indexOf(n)-1];r&&b(r)?r.data+=t:Gl.insertBefore(e,Ul(t),n)},adoptAttributes(e,t){for(let n=0;ne.children[0],getChildNodes:e=>e.children,getParentNode:e=>e.parent,getAttrList:e=>e.attributes,getTagName:e=>e.name,getNamespaceURI:e=>e.namespace,getTextNodeContent:e=>e.data,getCommentNodeContent:e=>e.data,getDocumentTypeNodeName(e){var t;return null!==(t=e["x-name"])&&void 0!==t?t:""},getDocumentTypeNodePublicId(e){var t;return null!==(t=e["x-publicId"])&&void 0!==t?t:""},getDocumentTypeNodeSystemId(e){var t;return null!==(t=e["x-systemId"])&&void 0!==t?t:""},isDocumentTypeNode:e=>y(e)&&"!doctype"===e.name,setNodeSourceCodeLocation(e,t){t&&(e.startIndex=t.startOffset,e.endIndex=t.endOffset),e.sourceCodeLocation=t},getNodeSourceCodeLocation:e=>e.sourceCodeLocation,updateNodeSourceCodeLocation(e,t){null!=t.endOffset&&(e.endIndex=t.endOffset),e.sourceCodeLocation={...e.sourceCodeLocation,...t}}};var Yl=function(e,t,n){if(n||2===arguments.length)for(var r,i=0,s=t.length;i=Kl.Zero&&e<=Kl.Nine}!function(e){e[e.Tab=9]="Tab",e[e.NewLine=10]="NewLine",e[e.FormFeed=12]="FormFeed",e[e.CarriageReturn=13]="CarriageReturn",e[e.Space=32]="Space",e[e.ExclamationMark=33]="ExclamationMark",e[e.Num=35]="Num",e[e.Amp=38]="Amp",e[e.SingleQuote=39]="SingleQuote",e[e.DoubleQuote=34]="DoubleQuote",e[e.Dash=45]="Dash",e[e.Slash=47]="Slash",e[e.Zero=48]="Zero",e[e.Nine=57]="Nine",e[e.Semi=59]="Semi",e[e.Lt=60]="Lt",e[e.Eq=61]="Eq",e[e.Gt=62]="Gt",e[e.Questionmark=63]="Questionmark",e[e.UpperA=65]="UpperA",e[e.LowerA=97]="LowerA",e[e.UpperF=70]="UpperF",e[e.LowerF=102]="LowerF",e[e.UpperZ=90]="UpperZ",e[e.LowerZ=122]="LowerZ",e[e.LowerX=120]="LowerX",e[e.OpeningSquareBracket=91]="OpeningSquareBracket"}(Kl||(Kl={})),function(e){e[e.Text=1]="Text",e[e.BeforeTagName=2]="BeforeTagName",e[e.InTagName=3]="InTagName",e[e.InSelfClosingTag=4]="InSelfClosingTag",e[e.BeforeClosingTagName=5]="BeforeClosingTagName",e[e.InClosingTagName=6]="InClosingTagName",e[e.AfterClosingTagName=7]="AfterClosingTagName",e[e.BeforeAttributeName=8]="BeforeAttributeName",e[e.InAttributeName=9]="InAttributeName",e[e.AfterAttributeName=10]="AfterAttributeName",e[e.BeforeAttributeValue=11]="BeforeAttributeValue",e[e.InAttributeValueDq=12]="InAttributeValueDq",e[e.InAttributeValueSq=13]="InAttributeValueSq",e[e.InAttributeValueNq=14]="InAttributeValueNq",e[e.BeforeDeclaration=15]="BeforeDeclaration",e[e.InDeclaration=16]="InDeclaration",e[e.InProcessingInstruction=17]="InProcessingInstruction",e[e.BeforeComment=18]="BeforeComment",e[e.CDATASequence=19]="CDATASequence",e[e.InSpecialComment=20]="InSpecialComment",e[e.InCommentLike=21]="InCommentLike",e[e.BeforeSpecialS=22]="BeforeSpecialS",e[e.SpecialStartSequence=23]="SpecialStartSequence",e[e.InSpecialTag=24]="InSpecialTag",e[e.BeforeEntity=25]="BeforeEntity",e[e.BeforeNumericEntity=26]="BeforeNumericEntity",e[e.InNamedEntity=27]="InNamedEntity",e[e.InNumericEntity=28]="InNumericEntity",e[e.InHexEntity=29]="InHexEntity"}(jl||(jl={})),function(e){e[e.NoValue=0]="NoValue",e[e.Unquoted=1]="Unquoted",e[e.Single=2]="Single",e[e.Double=3]="Double"}(Vl||(Vl={}));const zl={Cdata:new Uint8Array([67,68,65,84,65,91]),CdataEnd:new Uint8Array([93,93,62]),CommentEnd:new Uint8Array([45,45,62]),ScriptEnd:new Uint8Array([60,47,115,99,114,105,112,116]),StyleEnd:new Uint8Array([60,47,115,116,121,108,101]),TitleEnd:new Uint8Array([60,47,116,105,116,108,101])};class Jl{constructor({xmlMode:e=!1,decodeEntities:t=!0},n){this.cbs=n,this.state=jl.Text,this.buffer="",this.sectionStart=0,this.index=0,this.baseState=jl.Text,this.isSpecial=!1,this.running=!0,this.offset=0,this.sequenceIndex=0,this.trieIndex=0,this.trieCurrent=0,this.entityResult=0,this.entityExcess=0,this.xmlMode=e,this.decodeEntities=t,this.entityTrie=e?xo:wo}reset(){this.state=jl.Text,this.buffer="",this.sectionStart=0,this.index=0,this.baseState=jl.Text,this.currentSequence=void 0,this.running=!0,this.offset=0}write(e){this.offset+=this.buffer.length,this.buffer=e,this.parse()}end(){this.running&&this.finish()}pause(){this.running=!1}resume(){this.running=!0,this.indexthis.sectionStart&&this.cbs.ontext(this.sectionStart,this.index),this.state=jl.BeforeTagName,this.sectionStart=this.index):this.decodeEntities&&e===Kl.Amp&&(this.state=jl.BeforeEntity)}stateSpecialStartSequence(e){const t=this.sequenceIndex===this.currentSequence.length;if(t?Xl(e):(32|e)===this.currentSequence[this.sequenceIndex]){if(!t)return void this.sequenceIndex++}else this.isSpecial=!1;this.sequenceIndex=0,this.state=jl.InTagName,this.stateInTagName(e)}stateInSpecialTag(e){if(this.sequenceIndex===this.currentSequence.length){if(e===Kl.Gt||Ql(e)){const t=this.index-this.currentSequence.length;if(this.sectionStart=Kl.LowerA&&e<=Kl.LowerZ||e>=Kl.UpperA&&e<=Kl.UpperZ}(e)}startSpecial(e,t){this.isSpecial=!0,this.currentSequence=e,this.sequenceIndex=t,this.state=jl.SpecialStartSequence}stateBeforeTagName(e){if(e===Kl.ExclamationMark)this.state=jl.BeforeDeclaration,this.sectionStart=this.index+1;else if(e===Kl.Questionmark)this.state=jl.InProcessingInstruction,this.sectionStart=this.index+1;else if(this.isTagStartChar(e)){const t=32|e;this.sectionStart=this.index,this.xmlMode||t!==zl.TitleEnd[2]?this.state=this.xmlMode||t!==zl.ScriptEnd[2]?jl.InTagName:jl.BeforeSpecialS:this.startSpecial(zl.TitleEnd,3)}else e===Kl.Slash?this.state=jl.BeforeClosingTagName:(this.state=jl.Text,this.stateText(e))}stateInTagName(e){Xl(e)&&(this.cbs.onopentagname(this.sectionStart,this.index),this.sectionStart=-1,this.state=jl.BeforeAttributeName,this.stateBeforeAttributeName(e))}stateBeforeClosingTagName(e){Ql(e)||(e===Kl.Gt?this.state=jl.Text:(this.state=this.isTagStartChar(e)?jl.InClosingTagName:jl.InSpecialComment,this.sectionStart=this.index))}stateInClosingTagName(e){(e===Kl.Gt||Ql(e))&&(this.cbs.onclosetag(this.sectionStart,this.index),this.sectionStart=-1,this.state=jl.AfterClosingTagName,this.stateAfterClosingTagName(e))}stateAfterClosingTagName(e){(e===Kl.Gt||this.fastForwardTo(Kl.Gt))&&(this.state=jl.Text,this.sectionStart=this.index+1)}stateBeforeAttributeName(e){e===Kl.Gt?(this.cbs.onopentagend(this.index),this.isSpecial?(this.state=jl.InSpecialTag,this.sequenceIndex=0):this.state=jl.Text,this.baseState=this.state,this.sectionStart=this.index+1):e===Kl.Slash?this.state=jl.InSelfClosingTag:Ql(e)||(this.state=jl.InAttributeName,this.sectionStart=this.index)}stateInSelfClosingTag(e){e===Kl.Gt?(this.cbs.onselfclosingtag(this.index),this.state=jl.Text,this.baseState=jl.Text,this.sectionStart=this.index+1,this.isSpecial=!1):Ql(e)||(this.state=jl.BeforeAttributeName,this.stateBeforeAttributeName(e))}stateInAttributeName(e){(e===Kl.Eq||Xl(e))&&(this.cbs.onattribname(this.sectionStart,this.index),this.sectionStart=-1,this.state=jl.AfterAttributeName,this.stateAfterAttributeName(e))}stateAfterAttributeName(e){e===Kl.Eq?this.state=jl.BeforeAttributeValue:e===Kl.Slash||e===Kl.Gt?(this.cbs.onattribend(Vl.NoValue,this.index),this.state=jl.BeforeAttributeName,this.stateBeforeAttributeName(e)):Ql(e)||(this.cbs.onattribend(Vl.NoValue,this.index),this.state=jl.InAttributeName,this.sectionStart=this.index)}stateBeforeAttributeValue(e){e===Kl.DoubleQuote?(this.state=jl.InAttributeValueDq,this.sectionStart=this.index+1):e===Kl.SingleQuote?(this.state=jl.InAttributeValueSq,this.sectionStart=this.index+1):Ql(e)||(this.sectionStart=this.index,this.state=jl.InAttributeValueNq,this.stateInAttributeValueNoQuotes(e))}handleInAttributeValue(e,t){e===t||!this.decodeEntities&&this.fastForwardTo(t)?(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(t===Kl.DoubleQuote?Vl.Double:Vl.Single,this.index),this.state=jl.BeforeAttributeName):this.decodeEntities&&e===Kl.Amp&&(this.baseState=this.state,this.state=jl.BeforeEntity)}stateInAttributeValueDoubleQuotes(e){this.handleInAttributeValue(e,Kl.DoubleQuote)}stateInAttributeValueSingleQuotes(e){this.handleInAttributeValue(e,Kl.SingleQuote)}stateInAttributeValueNoQuotes(e){Ql(e)||e===Kl.Gt?(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(Vl.Unquoted,this.index),this.state=jl.BeforeAttributeName,this.stateBeforeAttributeName(e)):this.decodeEntities&&e===Kl.Amp&&(this.baseState=this.state,this.state=jl.BeforeEntity)}stateBeforeDeclaration(e){e===Kl.OpeningSquareBracket?(this.state=jl.CDATASequence,this.sequenceIndex=0):this.state=e===Kl.Dash?jl.BeforeComment:jl.InDeclaration}stateInDeclaration(e){(e===Kl.Gt||this.fastForwardTo(Kl.Gt))&&(this.cbs.ondeclaration(this.sectionStart,this.index),this.state=jl.Text,this.sectionStart=this.index+1)}stateInProcessingInstruction(e){(e===Kl.Gt||this.fastForwardTo(Kl.Gt))&&(this.cbs.onprocessinginstruction(this.sectionStart,this.index),this.state=jl.Text,this.sectionStart=this.index+1)}stateBeforeComment(e){e===Kl.Dash?(this.state=jl.InCommentLike,this.currentSequence=zl.CommentEnd,this.sequenceIndex=2,this.sectionStart=this.index+1):this.state=jl.InDeclaration}stateInSpecialComment(e){(e===Kl.Gt||this.fastForwardTo(Kl.Gt))&&(this.cbs.oncomment(this.sectionStart,this.index,0),this.state=jl.Text,this.sectionStart=this.index+1)}stateBeforeSpecialS(e){const t=32|e;t===zl.ScriptEnd[3]?this.startSpecial(zl.ScriptEnd,4):t===zl.StyleEnd[3]?this.startSpecial(zl.StyleEnd,4):(this.state=jl.InTagName,this.stateInTagName(e))}stateBeforeEntity(e){this.entityExcess=1,this.entityResult=0,e===Kl.Num?this.state=jl.BeforeNumericEntity:e===Kl.Amp||(this.trieIndex=0,this.trieCurrent=this.entityTrie[0],this.state=jl.InNamedEntity,this.stateInNamedEntity(e))}stateInNamedEntity(e){if(this.entityExcess+=1,this.trieIndex=Oo(this.entityTrie,this.trieCurrent,this.trieIndex+1,e),this.trieIndex<0)return this.emitNamedEntity(),void this.index--;this.trieCurrent=this.entityTrie[this.trieIndex];const t=this.trieCurrent&yo.VALUE_LENGTH;if(t){const n=(t>>14)-1;if(this.allowLegacyEntity()||e===Kl.Semi){const e=this.index-this.entityExcess+1;e>this.sectionStart&&this.emitPartial(this.sectionStart,e),this.entityResult=this.trieIndex,this.trieIndex+=n,this.entityExcess=0,this.sectionStart=this.index+1,0===n&&this.emitNamedEntity()}else this.trieIndex+=n}}emitNamedEntity(){if(this.state=this.baseState,0===this.entityResult)return;switch((this.entityTrie[this.entityResult]&yo.VALUE_LENGTH)>>14){case 1:this.emitCodePoint(this.entityTrie[this.entityResult]&~yo.VALUE_LENGTH);break;case 2:this.emitCodePoint(this.entityTrie[this.entityResult+1]);break;case 3:this.emitCodePoint(this.entityTrie[this.entityResult+1]),this.emitCodePoint(this.entityTrie[this.entityResult+2])}}stateBeforeNumericEntity(e){(32|e)===Kl.LowerX?(this.entityExcess++,this.state=jl.InHexEntity):(this.state=jl.InNumericEntity,this.stateInNumericEntity(e))}emitNumericEntity(e){const t=this.index-this.entityExcess-1;t+2+Number(this.state===jl.InHexEntity)!==this.index&&(t>this.sectionStart&&this.emitPartial(this.sectionStart,t),this.sectionStart=this.index+Number(e),this.emitCodePoint(ko(this.entityResult))),this.state=this.baseState}stateInNumericEntity(e){e===Kl.Semi?this.emitNumericEntity(!0):$l(e)?(this.entityResult=10*this.entityResult+(e-Kl.Zero),this.entityExcess++):(this.allowLegacyEntity()?this.emitNumericEntity(!1):this.state=this.baseState,this.index--)}stateInHexEntity(e){e===Kl.Semi?this.emitNumericEntity(!0):$l(e)?(this.entityResult=16*this.entityResult+(e-Kl.Zero),this.entityExcess++):!function(e){return e>=Kl.UpperA&&e<=Kl.UpperF||e>=Kl.LowerA&&e<=Kl.LowerF}(e)?(this.allowLegacyEntity()?this.emitNumericEntity(!1):this.state=this.baseState,this.index--):(this.entityResult=16*this.entityResult+((32|e)-Kl.LowerA+10),this.entityExcess++)}allowLegacyEntity(){return!this.xmlMode&&(this.baseState===jl.Text||this.baseState===jl.InSpecialTag)}cleanup(){this.running&&this.sectionStart!==this.index&&(this.state===jl.Text||this.state===jl.InSpecialTag&&0===this.sequenceIndex?(this.cbs.ontext(this.sectionStart,this.index),this.sectionStart=this.index):this.state!==jl.InAttributeValueDq&&this.state!==jl.InAttributeValueSq&&this.state!==jl.InAttributeValueNq||(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=this.index))}shouldContinue(){return this.index0&&s.has(this.stack[this.stack.length-1]);){const e=this.stack.pop();null===(n=(t=this.cbs).onclosetag)||void 0===n||n.call(t,e,!0)}this.isVoidElement(e)||(this.stack.push(e),ah.has(e)?this.foreignContext.push(!0):oh.has(e)&&this.foreignContext.push(!1)),null===(i=(r=this.cbs).onopentagname)||void 0===i||i.call(r,e),this.cbs.onopentag&&(this.attribs={})}endOpenTag(e){var t,n;this.startIndex=this.openTagStart,this.attribs&&(null===(n=(t=this.cbs).onopentag)||void 0===n||n.call(t,this.tagname,this.attribs,e),this.attribs=null),this.cbs.onclosetag&&this.isVoidElement(this.tagname)&&this.cbs.onclosetag(this.tagname,!0),this.tagname=""}onopentagend(e){this.endIndex=e,this.endOpenTag(!1),this.startIndex=e+1}onclosetag(e,t){var n,r,i,s,a,o;this.endIndex=t;let c=this.getSlice(e,t);if(this.lowerCaseTagNames&&(c=c.toLowerCase()),(ah.has(c)||oh.has(c))&&this.foreignContext.pop(),this.isVoidElement(c))this.options.xmlMode||"br"!==c||(null===(r=(n=this.cbs).onopentagname)||void 0===r||r.call(n,"br"),null===(s=(i=this.cbs).onopentag)||void 0===s||s.call(i,"br",{},!0),null===(o=(a=this.cbs).onclosetag)||void 0===o||o.call(a,"br",!1));else{const e=this.stack.lastIndexOf(c);if(-1!==e)if(this.cbs.onclosetag){let t=this.stack.length-e;for(;t--;)this.cbs.onclosetag(this.stack.pop(),0!==t)}else this.stack.length=e;else this.options.xmlMode||"p"!==c||(this.emitOpenTag("p"),this.closeCurrentTag(!0))}this.startIndex=t+1}onselfclosingtag(e){this.endIndex=e,this.options.xmlMode||this.options.recognizeSelfClosing||this.foreignContext[this.foreignContext.length-1]?(this.closeCurrentTag(!1),this.startIndex=e+1):this.onopentagend(e)}closeCurrentTag(e){var t,n;const r=this.tagname;this.endOpenTag(e),this.stack[this.stack.length-1]===r&&(null===(n=(t=this.cbs).onclosetag)||void 0===n||n.call(t,r,!e),this.stack.pop())}onattribname(e,t){this.startIndex=e;const n=this.getSlice(e,t);this.attribname=this.lowerCaseAttributeNames?n.toLowerCase():n}onattribdata(e,t){this.attribvalue+=this.getSlice(e,t)}onattribentity(e){this.attribvalue+=Lo(e)}onattribend(e,t){var n,r;this.endIndex=t,null===(r=(n=this.cbs).onattribute)||void 0===r||r.call(n,this.attribname,this.attribvalue,e===Vl.Double?'"':e===Vl.Single?"'":e===Vl.NoValue?void 0:null),this.attribs&&!Object.prototype.hasOwnProperty.call(this.attribs,this.attribname)&&(this.attribs[this.attribname]=this.attribvalue),this.attribvalue=""}getInstructionName(e){const t=e.search(ch);let n=t<0?e:e.substr(0,t);return this.lowerCaseTagNames&&(n=n.toLowerCase()),n}ondeclaration(e,t){this.endIndex=t;const n=this.getSlice(e,t);if(this.cbs.onprocessinginstruction){const e=this.getInstructionName(n);this.cbs.onprocessinginstruction(`!${e}`,`!${n}`)}this.startIndex=t+1}onprocessinginstruction(e,t){this.endIndex=t;const n=this.getSlice(e,t);if(this.cbs.onprocessinginstruction){const e=this.getInstructionName(n);this.cbs.onprocessinginstruction(`?${e}`,`?${n}`)}this.startIndex=t+1}oncomment(e,t,n){var r,i,s,a;this.endIndex=t,null===(i=(r=this.cbs).oncomment)||void 0===i||i.call(r,this.getSlice(e,t-n)),null===(a=(s=this.cbs).oncommentend)||void 0===a||a.call(s),this.startIndex=t+1}oncdata(e,t,n){var r,i,s,a,o,c,l,h,u,p;this.endIndex=t;const f=this.getSlice(e,t-n);this.options.xmlMode||this.options.recognizeCDATA?(null===(i=(r=this.cbs).oncdatastart)||void 0===i||i.call(r),null===(a=(s=this.cbs).ontext)||void 0===a||a.call(s,f),null===(c=(o=this.cbs).oncdataend)||void 0===c||c.call(o)):(null===(h=(l=this.cbs).oncomment)||void 0===h||h.call(l,`[CDATA[${f}]]`),null===(p=(u=this.cbs).oncommentend)||void 0===p||p.call(u)),this.startIndex=t+1}onend(){var e,t;if(this.cbs.onclosetag){this.endIndex=this.startIndex;for(let e=this.stack.length;e>0;this.cbs.onclosetag(this.stack[--e],!0));}null===(t=(e=this.cbs).onend)||void 0===t||t.call(e)}reset(){var e,t,n,r;null===(t=(e=this.cbs).onreset)||void 0===t||t.call(e),this.tokenizer.reset(),this.tagname="",this.attribname="",this.attribs=null,this.stack.length=0,this.startIndex=0,this.endIndex=0,null===(r=(n=this.cbs).onparserinit)||void 0===r||r.call(n,this),this.buffers.length=0,this.bufferOffset=0,this.writeIndex=0,this.ended=!1}parseComplete(e){this.reset(),this.end(e)}getSlice(e,t){for(;e-this.bufferOffset>=this.buffers[0].length;)this.shiftBuffer();let n=this.buffers[0].slice(e-this.bufferOffset,t-this.bufferOffset);for(;t-this.bufferOffset>this.buffers[0].length;)this.shiftBuffer(),n+=this.buffers[0].slice(0,t-this.bufferOffset);return n}shiftBuffer(){this.bufferOffset+=this.buffers[0].length,this.writeIndex--,this.buffers.shift()}write(e){var t,n;this.ended?null===(n=(t=this.cbs).onerror)||void 0===n||n.call(t,new Error(".write() after done!")):(this.buffers.push(e),this.tokenizer.running&&(this.tokenizer.write(e),this.writeIndex++))}end(e){var t,n;this.ended?null===(n=(t=this.cbs).onerror)||void 0===n||n.call(t,Error(".end() after done!")):(e&&this.write(e),this.ended=!0,this.tokenizer.end())}pause(){this.tokenizer.pause()}resume(){for(this.tokenizer.resume();this.tokenizer.running&&this.writeIndex= 0x0000)); + } + return { + encode: function(str) { + return str.replace(/./g, function(a) { + var code = a.charCodeAt(0); + if (isAscii(code)) { + return encodeURIComponent(a); + } else { + var key = code.toString(16); + if (key.length != 4) key = ('000' + key).match(/....$/)[0]; + return U2Ghash[key] || a; + } + }); + }, + decode: function(str) { + return str.replace(/%[0-9A-F]{2}%[0-9A-F]{2}/g, function(a) { + if (a in G2Uhash) { + return String.fromCharCode('0x' + G2Uhash[a]); + } else { + return a; + } + }).replace(/%[\w]{2}/g, function(a) { + return decodeURIComponent(a); + + }); + } + }; +} \ No newline at end of file diff --git a/jtxtv09/drpy_libs/jinja.js b/jtxtv09/drpy_libs/jinja.js new file mode 100644 index 0000000..9a03ee5 --- /dev/null +++ b/jtxtv09/drpy_libs/jinja.js @@ -0,0 +1,607 @@ +/*! + * Jinja Templating for JavaScript v0.1.8 + * https://github.com/sstur/jinja-js + * + * This is a slimmed-down Jinja2 implementation [http://jinja.pocoo.org/] + * + * In the interest of simplicity, it deviates from Jinja2 as follows: + * - Line statements, cycle, super, macro tags and block nesting are not implemented + * - auto escapes html by default (the filter is "html" not "e") + * - Only "html" and "safe" filters are built in + * - Filters are not valid in expressions; `foo|length > 1` is not valid + * - Expression Tests (`if num is odd`) not implemented (`is` translates to `==` and `isnot` to `!=`) + * + * Notes: + * - if property is not found, but method '_get' exists, it will be called with the property name (and cached) + * - `{% for n in obj %}` iterates the object's keys; get the value with `{% for n in obj %}{{ obj[n] }}{% endfor %}` + * - subscript notation `a[0]` takes literals or simple variables but not `a[item.key]` + * - `.2` is not a valid number literal; use `0.2` + * + */ +/*global require, exports, module, define */ + +(function(global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : + typeof define === 'function' && define.amd ? define(['exports'], factory) : + (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.jinja = {})); +})(this, (function(jinja) { + "use strict"; + var STRINGS = /'(\\.|[^'])*'|"(\\.|[^"'"])*"/g; + var IDENTS_AND_NUMS = /([$_a-z][$\w]*)|([+-]?\d+(\.\d+)?)/g; + var NUMBER = /^[+-]?\d+(\.\d+)?$/; + //non-primitive literals (array and object literals) + var NON_PRIMITIVES = /\[[@#~](,[@#~])*\]|\[\]|\{([@i]:[@#~])(,[@i]:[@#~])*\}|\{\}/g; + //bare identifiers such as variables and in object literals: {foo: 'value'} + var IDENTIFIERS = /[$_a-z][$\w]*/ig; + var VARIABLES = /i(\.i|\[[@#i]\])*/g; + var ACCESSOR = /(\.i|\[[@#i]\])/g; + var OPERATORS = /(===?|!==?|>=?|<=?|&&|\|\||[+\-\*\/%])/g; + //extended (english) operators + var EOPS = /(^|[^$\w])(and|or|not|is|isnot)([^$\w]|$)/g; + var LEADING_SPACE = /^\s+/; + var TRAILING_SPACE = /\s+$/; + + var START_TOKEN = /\{\{\{|\{\{|\{%|\{#/; + var TAGS = { + '{{{': /^('(\\.|[^'])*'|"(\\.|[^"'"])*"|.)+?\}\}\}/, + '{{': /^('(\\.|[^'])*'|"(\\.|[^"'"])*"|.)+?\}\}/, + '{%': /^('(\\.|[^'])*'|"(\\.|[^"'"])*"|.)+?%\}/, + '{#': /^('(\\.|[^'])*'|"(\\.|[^"'"])*"|.)+?#\}/ + }; + + var delimeters = { + '{%': 'directive', + '{{': 'output', + '{#': 'comment' + }; + + var operators = { + and: '&&', + or: '||', + not: '!', + is: '==', + isnot: '!=' + }; + + var constants = { + 'true': true, + 'false': false, + 'null': null + }; + + function Parser() { + this.nest = []; + this.compiled = []; + this.childBlocks = 0; + this.parentBlocks = 0; + this.isSilent = false; + } + + Parser.prototype.push = function(line) { + if (!this.isSilent) { + this.compiled.push(line); + } + }; + + Parser.prototype.parse = function(src) { + this.tokenize(src); + return this.compiled; + }; + + Parser.prototype.tokenize = function(src) { + var lastEnd = 0, + parser = this, + trimLeading = false; + matchAll(src, START_TOKEN, function(open, index, src) { + //here we match the rest of the src against a regex for this tag + var match = src.slice(index + open.length).match(TAGS[open]); + match = (match ? match[0] : ''); + //here we sub out strings so we don't get false matches + var simplified = match.replace(STRINGS, '@'); + //if we don't have a close tag or there is a nested open tag + if (!match || ~simplified.indexOf(open)) { + return index + 1; + } + var inner = match.slice(0, 0 - open.length); + //check for white-space collapse syntax + if (inner.charAt(0) === '-') var wsCollapseLeft = true; + if (inner.slice(-1) === '-') var wsCollapseRight = true; + inner = inner.replace(/^-|-$/g, '').trim(); + //if we're in raw mode and we are not looking at an "endraw" tag, move along + if (parser.rawMode && (open + inner) !== '{%endraw') { + return index + 1; + } + var text = src.slice(lastEnd, index); + lastEnd = index + open.length + match.length; + if (trimLeading) text = trimLeft(text); + if (wsCollapseLeft) text = trimRight(text); + if (wsCollapseRight) trimLeading = true; + if (open === '{{{') { + //liquid-style: make {{{x}}} => {{x|safe}} + open = '{{'; + inner += '|safe'; + } + parser.textHandler(text); + parser.tokenHandler(open, inner); + }); + var text = src.slice(lastEnd); + if (trimLeading) text = trimLeft(text); + this.textHandler(text); + }; + + Parser.prototype.textHandler = function(text) { + this.push('write(' + JSON.stringify(text) + ');'); + }; + + Parser.prototype.tokenHandler = function(open, inner) { + var type = delimeters[open]; + if (type === 'directive') { + this.compileTag(inner); + } else if (type === 'output') { + var extracted = this.extractEnt(inner, STRINGS, '@'); + //replace || operators with ~ + extracted.src = extracted.src.replace(/\|\|/g, '~').split('|'); + //put back || operators + extracted.src = extracted.src.map(function(part) { + return part.split('~').join('||'); + }); + var parts = this.injectEnt(extracted, '@'); + if (parts.length > 1) { + var filters = parts.slice(1).map(this.parseFilter.bind(this)); + this.push('filter(' + this.parseExpr(parts[0]) + ',' + filters.join(',') + ');'); + } else { + this.push('filter(' + this.parseExpr(parts[0]) + ');'); + } + } + }; + + Parser.prototype.compileTag = function(str) { + var directive = str.split(' ')[0]; + var handler = tagHandlers[directive]; + if (!handler) { + throw new Error('Invalid tag: ' + str); + } + handler.call(this, str.slice(directive.length).trim()); + }; + + Parser.prototype.parseFilter = function(src) { + src = src.trim(); + var match = src.match(/[:(]/); + var i = match ? match.index : -1; + if (i < 0) return JSON.stringify([src]); + var name = src.slice(0, i); + var args = src.charAt(i) === ':' ? src.slice(i + 1) : src.slice(i + 1, -1); + args = this.parseExpr(args, { + terms: true + }); + return '[' + JSON.stringify(name) + ',' + args + ']'; + }; + + Parser.prototype.extractEnt = function(src, regex, placeholder) { + var subs = [], + isFunc = typeof placeholder == 'function'; + src = src.replace(regex, function(str) { + var replacement = isFunc ? placeholder(str) : placeholder; + if (replacement) { + subs.push(str); + return replacement; + } + return str; + }); + return { + src: src, + subs: subs + }; + }; + + Parser.prototype.injectEnt = function(extracted, placeholder) { + var src = extracted.src, + subs = extracted.subs, + isArr = Array.isArray(src); + var arr = (isArr) ? src : [src]; + var re = new RegExp('[' + placeholder + ']', 'g'), + i = 0; + arr.forEach(function(src, index) { + arr[index] = src.replace(re, function() { + return subs[i++]; + }); + }); + return isArr ? arr : arr[0]; + }; + + //replace complex literals without mistaking subscript notation with array literals + Parser.prototype.replaceComplex = function(s) { + var parsed = this.extractEnt(s, /i(\.i|\[[@#i]\])+/g, 'v'); + parsed.src = parsed.src.replace(NON_PRIMITIVES, '~'); + return this.injectEnt(parsed, 'v'); + }; + + //parse expression containing literals (including objects/arrays) and variables (including dot and subscript notation) + //valid expressions: `a + 1 > b.c or c == null`, `a and b[1] != c`, `(a < b) or (c < d and e)`, 'a || [1]` + Parser.prototype.parseExpr = function(src, opts) { + opts = opts || {}; + //extract string literals -> @ + var parsed1 = this.extractEnt(src, STRINGS, '@'); + //note: this will catch {not: 1} and a.is; could we replace temporarily and then check adjacent chars? + parsed1.src = parsed1.src.replace(EOPS, function(s, before, op, after) { + return (op in operators) ? before + operators[op] + after : s; + }); + //sub out non-string literals (numbers/true/false/null) -> # + // the distinction is necessary because @ can be object identifiers, # cannot + var parsed2 = this.extractEnt(parsed1.src, IDENTS_AND_NUMS, function(s) { + return (s in constants || NUMBER.test(s)) ? '#' : null; + }); + //sub out object/variable identifiers -> i + var parsed3 = this.extractEnt(parsed2.src, IDENTIFIERS, 'i'); + //remove white-space + parsed3.src = parsed3.src.replace(/\s+/g, ''); + + //the rest of this is simply to boil the expression down and check validity + var simplified = parsed3.src; + //sub out complex literals (objects/arrays) -> ~ + // the distinction is necessary because @ and # can be subscripts but ~ cannot + while (simplified !== (simplified = this.replaceComplex(simplified))); + //now @ represents strings, # represents other primitives and ~ represents non-primitives + //replace complex variables (those with dot/subscript accessors) -> v + while (simplified !== (simplified = simplified.replace(/i(\.i|\[[@#i]\])+/, 'v'))); + //empty subscript or complex variables in subscript, are not permitted + simplified = simplified.replace(/[iv]\[v?\]/g, 'x'); + //sub in "i" for @ and # and ~ and v (now "i" represents all literals, variables and identifiers) + simplified = simplified.replace(/[@#~v]/g, 'i'); + //sub out operators + simplified = simplified.replace(OPERATORS, '%'); + //allow 'not' unary operator + simplified = simplified.replace(/!+[i]/g, 'i'); + var terms = opts.terms ? simplified.split(',') : [simplified]; + terms.forEach(function(term) { + //simplify logical grouping + while (term !== (term = term.replace(/\(i(%i)*\)/g, 'i'))); + if (!term.match(/^i(%i)*/)) { + throw new Error('Invalid expression: ' + src + " " + term); + } + }); + parsed3.src = parsed3.src.replace(VARIABLES, this.parseVar.bind(this)); + parsed2.src = this.injectEnt(parsed3, 'i'); + parsed1.src = this.injectEnt(parsed2, '#'); + return this.injectEnt(parsed1, '@'); + }; + + Parser.prototype.parseVar = function(src) { + var args = Array.prototype.slice.call(arguments); + var str = args.pop(), + index = args.pop(); + //quote bare object identifiers (might be a reserved word like {while: 1}) + if (src === 'i' && str.charAt(index + 1) === ':') { + return '"i"'; + } + var parts = ['"i"']; + src.replace(ACCESSOR, function(part) { + if (part === '.i') { + parts.push('"i"'); + } else if (part === '[i]') { + parts.push('get("i")'); + } else { + parts.push(part.slice(1, -1)); + } + }); + return 'get(' + parts.join(',') + ')'; + }; + + //escapes a name to be used as a javascript identifier + Parser.prototype.escName = function(str) { + return str.replace(/\W/g, function(s) { + return '$' + s.charCodeAt(0).toString(16); + }); + }; + + Parser.prototype.parseQuoted = function(str) { + if (str.charAt(0) === "'") { + str = str.slice(1, -1).replace(/\\.|"/, function(s) { + if (s === "\\'") return "'"; + return s.charAt(0) === '\\' ? s : ('\\' + s); + }); + str = '"' + str + '"'; + } + //todo: try/catch or deal with invalid characters (linebreaks, control characters) + return JSON.parse(str); + }; + + + //the context 'this' inside tagHandlers is the parser instance + var tagHandlers = { + 'if': function(expr) { + this.push('if (' + this.parseExpr(expr) + ') {'); + this.nest.unshift('if'); + }, + 'else': function() { + if (this.nest[0] === 'for') { + this.push('}, function() {'); + } else { + this.push('} else {'); + } + }, + 'elseif': function(expr) { + this.push('} else if (' + this.parseExpr(expr) + ') {'); + }, + 'endif': function() { + this.nest.shift(); + this.push('}'); + }, + 'for': function(str) { + var i = str.indexOf(' in '); + var name = str.slice(0, i).trim(); + var expr = str.slice(i + 4).trim(); + this.push('each(' + this.parseExpr(expr) + ',' + JSON.stringify(name) + ',function() {'); + this.nest.unshift('for'); + }, + 'endfor': function() { + this.nest.shift(); + this.push('});'); + }, + 'raw': function() { + this.rawMode = true; + }, + 'endraw': function() { + this.rawMode = false; + }, + 'set': function(stmt) { + var i = stmt.indexOf('='); + var name = stmt.slice(0, i).trim(); + var expr = stmt.slice(i + 1).trim(); + this.push('set(' + JSON.stringify(name) + ',' + this.parseExpr(expr) + ');'); + }, + 'block': function(name) { + if (this.isParent) { + ++this.parentBlocks; + var blockName = 'block_' + (this.escName(name) || this.parentBlocks); + this.push('block(typeof ' + blockName + ' == "function" ? ' + blockName + ' : function() {'); + } else if (this.hasParent) { + this.isSilent = false; + ++this.childBlocks; + blockName = 'block_' + (this.escName(name) || this.childBlocks); + this.push('function ' + blockName + '() {'); + } + this.nest.unshift('block'); + }, + 'endblock': function() { + this.nest.shift(); + if (this.isParent) { + this.push('});'); + } else if (this.hasParent) { + this.push('}'); + this.isSilent = true; + } + }, + 'extends': function(name) { + name = this.parseQuoted(name); + var parentSrc = this.readTemplateFile(name); + this.isParent = true; + this.tokenize(parentSrc); + this.isParent = false; + this.hasParent = true; + //silence output until we enter a child block + this.isSilent = true; + }, + 'include': function(name) { + name = this.parseQuoted(name); + var incSrc = this.readTemplateFile(name); + this.isInclude = true; + this.tokenize(incSrc); + this.isInclude = false; + } + }; + + //liquid style + tagHandlers.assign = tagHandlers.set; + //python/django style + tagHandlers.elif = tagHandlers.elseif; + + var getRuntime = function runtime(data, opts) { + var defaults = { + autoEscape: 'toJson' + }; + var _toString = Object.prototype.toString; + var _hasOwnProperty = Object.prototype.hasOwnProperty; + var getKeys = Object.keys || function(obj) { + var keys = []; + for (var n in obj) + if (_hasOwnProperty.call(obj, n)) keys.push(n); + return keys; + }; + var isArray = Array.isArray || function(obj) { + return _toString.call(obj) === '[object Array]'; + }; + var create = Object.create || function(obj) { + function F() {} + + F.prototype = obj; + return new F(); + }; + var toString = function(val) { + if (val == null) return ''; + return (typeof val.toString == 'function') ? val.toString() : _toString.call(val); + }; + var extend = function(dest, src) { + var keys = getKeys(src); + for (var i = 0, len = keys.length; i < len; i++) { + var key = keys[i]; + dest[key] = src[key]; + } + return dest; + }; + //get a value, lexically, starting in current context; a.b -> get("a","b") + var get = function() { + var val, n = arguments[0], + c = stack.length; + while (c--) { + val = stack[c][n]; + if (typeof val != 'undefined') break; + } + for (var i = 1, len = arguments.length; i < len; i++) { + if (val == null) continue; + n = arguments[i]; + val = (_hasOwnProperty.call(val, n)) ? val[n] : (typeof val._get == 'function' ? (val[n] = val._get(n)) : null); + } + return (val == null) ? '' : val; + }; + var set = function(n, val) { + stack[stack.length - 1][n] = val; + }; + var push = function(ctx) { + stack.push(ctx || {}); + }; + var pop = function() { + stack.pop(); + }; + var write = function(str) { + output.push(str); + }; + var filter = function(val) { + for (var i = 1, len = arguments.length; i < len; i++) { + var arr = arguments[i], + name = arr[0], + filter = filters[name]; + if (filter) { + arr[0] = val; + //now arr looks like [val, arg1, arg2] + val = filter.apply(data, arr); + } else { + throw new Error('Invalid filter: ' + name); + } + } + if (opts.autoEscape && name !== opts.autoEscape && name !== 'safe') { + //auto escape if not explicitly safe or already escaped + val = filters[opts.autoEscape].call(data, val); + } + output.push(val); + }; + var each = function(obj, loopvar, fn1, fn2) { + if (obj == null) return; + var arr = isArray(obj) ? obj : getKeys(obj), + len = arr.length; + var ctx = { + loop: { + length: len, + first: arr[0], + last: arr[len - 1] + } + }; + push(ctx); + for (var i = 0; i < len; i++) { + extend(ctx.loop, { + index: i + 1, + index0: i + }); + fn1(ctx[loopvar] = arr[i]); + } + if (len === 0 && fn2) fn2(); + pop(); + }; + var block = function(fn) { + push(); + fn(); + pop(); + }; + var render = function() { + return output.join(''); + }; + data = data || {}; + opts = extend(defaults, opts || {}); + var filters = extend({ + html: function(val) { + return toString(val) + .split('&').join('&') + .split('<').join('<') + .split('>').join('>') + .split('"').join('"'); + }, + safe: function(val) { + return val; + }, + toJson: function(val) { + if (typeof val === 'object') { + return JSON.stringify(val); + } + return toString(val); + } + }, opts.filters || {}); + var stack = [create(data || {})], + output = []; + return { + get: get, + set: set, + push: push, + pop: pop, + write: write, + filter: filter, + each: each, + block: block, + render: render + }; + }; + + var runtime; + + jinja.compile = function(markup, opts) { + opts = opts || {}; + var parser = new Parser(); + parser.readTemplateFile = this.readTemplateFile; + var code = []; + code.push('function render($) {'); + code.push('var get = $.get, set = $.set, push = $.push, pop = $.pop, write = $.write, filter = $.filter, each = $.each, block = $.block;'); + code.push.apply(code, parser.parse(markup)); + code.push('return $.render();'); + code.push('}'); + code = code.join('\n'); + if (opts.runtime === false) { + var fn = new Function('data', 'options', 'return (' + code + ')(runtime(data, options))'); + } else { + runtime = runtime || (runtime = getRuntime.toString()); + fn = new Function('data', 'options', 'return (' + code + ')((' + runtime + ')(data, options))'); + } + return { + render: fn + }; + }; + + jinja.render = function(markup, data, opts) { + var tmpl = jinja.compile(markup); + return tmpl.render(data, opts); + }; + + jinja.templateFiles = []; + + jinja.readTemplateFile = function(name) { + var templateFiles = this.templateFiles || []; + var templateFile = templateFiles[name]; + if (templateFile == null) { + throw new Error('Template file not found: ' + name); + } + return templateFile; + }; + + + /*! + * Helpers + */ + + function trimLeft(str) { + return str.replace(LEADING_SPACE, ''); + } + + function trimRight(str) { + return str.replace(TRAILING_SPACE, ''); + } + + function matchAll(str, reg, fn) { + //copy as global + reg = new RegExp(reg.source, 'g' + (reg.ignoreCase ? 'i' : '') + (reg.multiline ? 'm' : '')); + var match; + while ((match = reg.exec(str))) { + var result = fn(match[0], match.index, str); + if (typeof result == 'number') { + reg.lastIndex = result; + } + } + } +})); \ No newline at end of file diff --git a/jtxtv09/drpy_libs/jsencrypt.js b/jtxtv09/drpy_libs/jsencrypt.js new file mode 100644 index 0000000..a7ea4e9 --- /dev/null +++ b/jtxtv09/drpy_libs/jsencrypt.js @@ -0,0 +1,360 @@ +/* + * ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development"). + * This devtool is neither made for production nor for readable output files. + * It uses "eval()" calls to create a separate source file in the browser devtools. + * If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/) + * or disable the default devtool with "devtool: false". + * If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/). + */ +(function webpackUniversalModuleDefinition(root, factory) { + if (typeof exports === 'object' && typeof module === 'object') { + // CommonJS + module.exports = exports = factory(); + } else if (typeof define === 'function' && define.amd) { + // AMD + define([], factory); + } else { + // Global (browser) + globalThis.JSEncrypt = factory(); + } +})(this, () => { + return /******/ (() => { // webpackBootstrap + /******/ + var __webpack_modules__ = ({ + + /***/ + "./lib/JSEncrypt.js": + /*!**************************!*\ + !*** ./lib/JSEncrypt.js ***! + \**************************/ + /***/ + ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + + "use strict"; + eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"JSEncrypt\": () => (/* binding */ JSEncrypt)\n/* harmony export */ });\n/* harmony import */ var _lib_jsbn_base64__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./lib/jsbn/base64 */ \"./lib/lib/jsbn/base64.js\");\n/* harmony import */ var _JSEncryptRSAKey__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./JSEncryptRSAKey */ \"./lib/JSEncryptRSAKey.js\");\n/* provided dependency */ var process = __webpack_require__(/*! process/browser */ \"./node_modules/process/browser.js\");\nvar _a;\n\n\nvar version = typeof process !== 'undefined'\n ? (_a = process.env) === null || _a === void 0 ? void 0 : \"3.3.2\"\n : undefined;\n/**\n *\n * @param {Object} [options = {}] - An object to customize JSEncrypt behaviour\n * possible parameters are:\n * - default_key_size {number} default: 1024 the key size in bit\n * - default_public_exponent {string} default: '010001' the hexadecimal representation of the public exponent\n * - log {boolean} default: false whether log warn/error or not\n * @constructor\n */\nvar JSEncrypt = /** @class */ (function () {\n function JSEncrypt(options) {\n if (options === void 0) { options = {}; }\n options = options || {};\n this.default_key_size = options.default_key_size\n ? parseInt(options.default_key_size, 10)\n : 1024;\n this.default_public_exponent = options.default_public_exponent || \"010001\"; // 65537 default openssl public exponent for rsa key type\n this.log = options.log || false;\n // The private and public key.\n this.key = null;\n }\n /**\n * Method to set the rsa key parameter (one method is enough to set both the public\n * and the private key, since the private key contains the public key paramenters)\n * Log a warning if logs are enabled\n * @param {Object|string} key the pem encoded string or an object (with or without header/footer)\n * @public\n */\n JSEncrypt.prototype.setKey = function (key) {\n if (this.log && this.key) {\n console.warn(\"A key was already set, overriding existing.\");\n }\n this.key = new _JSEncryptRSAKey__WEBPACK_IMPORTED_MODULE_1__.JSEncryptRSAKey(key);\n };\n /**\n * Proxy method for setKey, for api compatibility\n * @see setKey\n * @public\n */\n JSEncrypt.prototype.setPrivateKey = function (privkey) {\n // Create the key.\n this.setKey(privkey);\n };\n /**\n * Proxy method for setKey, for api compatibility\n * @see setKey\n * @public\n */\n JSEncrypt.prototype.setPublicKey = function (pubkey) {\n // Sets the public key.\n this.setKey(pubkey);\n };\n /**\n * Proxy method for RSAKey object's decrypt, decrypt the string using the private\n * components of the rsa key object. Note that if the object was not set will be created\n * on the fly (by the getKey method) using the parameters passed in the JSEncrypt constructor\n * @param {string} str base64 encoded crypted string to decrypt\n * @return {string} the decrypted string\n * @public\n */\n JSEncrypt.prototype.decrypt = function (str) {\n // Return the decrypted string.\n try {\n return this.getKey().decrypt((0,_lib_jsbn_base64__WEBPACK_IMPORTED_MODULE_0__.b64tohex)(str));\n }\n catch (ex) {\n return false;\n }\n };\n /**\n * Proxy method for RSAKey object's encrypt, encrypt the string using the public\n * components of the rsa key object. Note that if the object was not set will be created\n * on the fly (by the getKey method) using the parameters passed in the JSEncrypt constructor\n * @param {string} str the string to encrypt\n * @return {string} the encrypted string encoded in base64\n * @public\n */\n JSEncrypt.prototype.encrypt = function (str) {\n // Return the encrypted string.\n try {\n return (0,_lib_jsbn_base64__WEBPACK_IMPORTED_MODULE_0__.hex2b64)(this.getKey().encrypt(str));\n }\n catch (ex) {\n return false;\n }\n };\n /**\n * Proxy method for RSAKey object's sign.\n * @param {string} str the string to sign\n * @param {function} digestMethod hash method\n * @param {string} digestName the name of the hash algorithm\n * @return {string} the signature encoded in base64\n * @public\n */\n JSEncrypt.prototype.sign = function (str, digestMethod, digestName) {\n // return the RSA signature of 'str' in 'hex' format.\n try {\n return (0,_lib_jsbn_base64__WEBPACK_IMPORTED_MODULE_0__.hex2b64)(this.getKey().sign(str, digestMethod, digestName));\n }\n catch (ex) {\n return false;\n }\n };\n /**\n * Proxy method for RSAKey object's verify.\n * @param {string} str the string to verify\n * @param {string} signature the signature encoded in base64 to compare the string to\n * @param {function} digestMethod hash method\n * @return {boolean} whether the data and signature match\n * @public\n */\n JSEncrypt.prototype.verify = function (str, signature, digestMethod) {\n // Return the decrypted 'digest' of the signature.\n try {\n return this.getKey().verify(str, (0,_lib_jsbn_base64__WEBPACK_IMPORTED_MODULE_0__.b64tohex)(signature), digestMethod);\n }\n catch (ex) {\n return false;\n }\n };\n /**\n * Getter for the current JSEncryptRSAKey object. If it doesn't exists a new object\n * will be created and returned\n * @param {callback} [cb] the callback to be called if we want the key to be generated\n * in an async fashion\n * @returns {JSEncryptRSAKey} the JSEncryptRSAKey object\n * @public\n */\n JSEncrypt.prototype.getKey = function (cb) {\n // Only create new if it does not exist.\n if (!this.key) {\n // Get a new private key.\n this.key = new _JSEncryptRSAKey__WEBPACK_IMPORTED_MODULE_1__.JSEncryptRSAKey();\n if (cb && {}.toString.call(cb) === \"[object Function]\") {\n this.key.generateAsync(this.default_key_size, this.default_public_exponent, cb);\n return;\n }\n // Generate the key.\n this.key.generate(this.default_key_size, this.default_public_exponent);\n }\n return this.key;\n };\n /**\n * Returns the pem encoded representation of the private key\n * If the key doesn't exists a new key will be created\n * @returns {string} pem encoded representation of the private key WITH header and footer\n * @public\n */\n JSEncrypt.prototype.getPrivateKey = function () {\n // Return the private representation of this key.\n return this.getKey().getPrivateKey();\n };\n /**\n * Returns the pem encoded representation of the private key\n * If the key doesn't exists a new key will be created\n * @returns {string} pem encoded representation of the private key WITHOUT header and footer\n * @public\n */\n JSEncrypt.prototype.getPrivateKeyB64 = function () {\n // Return the private representation of this key.\n return this.getKey().getPrivateBaseKeyB64();\n };\n /**\n * Returns the pem encoded representation of the public key\n * If the key doesn't exists a new key will be created\n * @returns {string} pem encoded representation of the public key WITH header and footer\n * @public\n */\n JSEncrypt.prototype.getPublicKey = function () {\n // Return the private representation of this key.\n return this.getKey().getPublicKey();\n };\n /**\n * Returns the pem encoded representation of the public key\n * If the key doesn't exists a new key will be created\n * @returns {string} pem encoded representation of the public key WITHOUT header and footer\n * @public\n */\n JSEncrypt.prototype.getPublicKeyB64 = function () {\n // Return the private representation of this key.\n return this.getKey().getPublicBaseKeyB64();\n };\nvar b64map=\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\";var b64pad=\"=\";var base64DecodeChars=new Array(-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,62,-1,-1,-1,63,52,53,54,55,56,57,58,59,60,61,-1,-1,-1,-1,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,-1,-1,-1,-1,-1,-1,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,-1,-1,-1,-1,-1);function btoa(str){var out,i,len;var c1,c2,c3;len=str.length;i=0;out=\"\";while(i>2);out+=b64map.charAt((c1&3)<<4);out+=\"==\";break}c2=str.charCodeAt(i++);if(i==len){out+=b64map.charAt(c1>>2);out+=b64map.charAt((c1&3)<<4|(c2&240)>>4);out+=b64map.charAt((c2&15)<<2);out+=\"=\";break}c3=str.charCodeAt(i++);out+=b64map.charAt(c1>>2);out+=b64map.charAt((c1&3)<<4|(c2&240)>>4);out+=b64map.charAt((c2&15)<<2|(c3&192)>>6);out+=b64map.charAt(c3&63)}return out}function atob(str){var c1,c2,c3,c4;var i,len,out;len=str.length;i=0;out=\"\";while(i>4);do{c3=str.charCodeAt(i++)&255;if(c3==61)return out;c3=base64DecodeChars[c3]}while(i>2);do{c4=str.charCodeAt(i++)&255;if(c4==61)return out;c4=base64DecodeChars[c4]}while(i>6)+b64map.charAt(c&63)}if(i+1==h.length){c=parseInt(h.substring(i,i+1),16);ret+=b64map.charAt(c<<2)}else if(i+2==h.length){c=parseInt(h.substring(i,i+2),16);ret+=b64map.charAt(c>>2)+b64map.charAt((c&3)<<4)}while((ret.length&3)>0)ret+=b64pad;return ret}function hexToBytes(hex){for(var bytes=[],c=0;c>>4).toString(16));hex.push((bytes[i]&15).toString(16))}return hex.join(\"\")}function b64tohex(str){for(var i=0,bin=atob(str.replace(/[ \\r\\n]+$/,\"\")),hex=[];i>3};JSEncrypt.prototype.decryptUnicodeLong=function(string){var k=this.getKey();var maxLength=(k.n.bitLength()+7>>3)*2;try{var hexString=b64tohex(string);var decryptedString=\"\";var rexStr=\".{1,\"+maxLength+\"}\";var rex=new RegExp(rexStr,\"g\");var subStrArray=hexString.match(rex);if(subStrArray){subStrArray.forEach(function(entry){decryptedString+=k.decrypt(entry)});return decryptedString}}catch(ex){console.log(\"加密错误:\"+ex.message);return false}};JSEncrypt.prototype.encryptUnicodeLong=function(string){var k=this.getKey();var maxLength=(k.n.bitLength()+7>>3)-11;try{var subStr=\"\",encryptedString=\"\";var subStart=0,subEnd=0;var bitLen=0,tmpPoint=0;for(var i=0,len=string.length;imaxLength){subStr=string.substring(subStart,subEnd);encryptedString+=k.encrypt(subStr);subStart=subEnd;bitLen=bitLen-tmpPoint}else{subEnd=i;tmpPoint=bitLen}}subStr=string.substring(subStart,len);encryptedString+=k.encrypt(subStr);return hex2b64(encryptedString)}catch(ex){console.log(\"解密错误:\"+ex.message);return false}}; JSEncrypt.version = version;\n return JSEncrypt;\n}());\n\n\n\n//# sourceURL=webpack://JSEncrypt/./lib/JSEncrypt.js?"); + + /***/ + }), + + /***/ + "./lib/JSEncryptRSAKey.js": + /*!********************************!*\ + !*** ./lib/JSEncryptRSAKey.js ***! + \********************************/ + /***/ + ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + + "use strict"; + eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"JSEncryptRSAKey\": () => (/* binding */ JSEncryptRSAKey)\n/* harmony export */ });\n/* harmony import */ var _lib_jsbn_base64__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./lib/jsbn/base64 */ \"./lib/lib/jsbn/base64.js\");\n/* harmony import */ var _lib_asn1js_hex__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./lib/asn1js/hex */ \"./lib/lib/asn1js/hex.js\");\n/* harmony import */ var _lib_asn1js_base64__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./lib/asn1js/base64 */ \"./lib/lib/asn1js/base64.js\");\n/* harmony import */ var _lib_asn1js_asn1__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./lib/asn1js/asn1 */ \"./lib/lib/asn1js/asn1.js\");\n/* harmony import */ var _lib_jsbn_rsa__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./lib/jsbn/rsa */ \"./lib/lib/jsbn/rsa.js\");\n/* harmony import */ var _lib_jsbn_jsbn__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./lib/jsbn/jsbn */ \"./lib/lib/jsbn/jsbn.js\");\n/* harmony import */ var _lib_jsrsasign_asn1_1_0__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./lib/jsrsasign/asn1-1.0 */ \"./lib/lib/jsrsasign/asn1-1.0.js\");\nvar __extends = (undefined && undefined.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\n\n\n\n\n\n\n\n/**\n * Create a new JSEncryptRSAKey that extends Tom Wu's RSA key object.\n * This object is just a decorator for parsing the key parameter\n * @param {string|Object} key - The key in string format, or an object containing\n * the parameters needed to build a RSAKey object.\n * @constructor\n */\nvar JSEncryptRSAKey = /** @class */ (function (_super) {\n __extends(JSEncryptRSAKey, _super);\n function JSEncryptRSAKey(key) {\n var _this = _super.call(this) || this;\n // Call the super constructor.\n // RSAKey.call(this);\n // If a key key was provided.\n if (key) {\n // If this is a string...\n if (typeof key === \"string\") {\n _this.parseKey(key);\n }\n else if (JSEncryptRSAKey.hasPrivateKeyProperty(key) ||\n JSEncryptRSAKey.hasPublicKeyProperty(key)) {\n // Set the values for the key.\n _this.parsePropertiesFrom(key);\n }\n }\n return _this;\n }\n /**\n * Method to parse a pem encoded string containing both a public or private key.\n * The method will translate the pem encoded string in a der encoded string and\n * will parse private key and public key parameters. This method accepts public key\n * in the rsaencryption pkcs #1 format (oid: 1.2.840.113549.1.1.1).\n *\n * @todo Check how many rsa formats use the same format of pkcs #1.\n *\n * The format is defined as:\n * PublicKeyInfo ::= SEQUENCE {\n * algorithm AlgorithmIdentifier,\n * PublicKey BIT STRING\n * }\n * Where AlgorithmIdentifier is:\n * AlgorithmIdentifier ::= SEQUENCE {\n * algorithm OBJECT IDENTIFIER, the OID of the enc algorithm\n * parameters ANY DEFINED BY algorithm OPTIONAL (NULL for PKCS #1)\n * }\n * and PublicKey is a SEQUENCE encapsulated in a BIT STRING\n * RSAPublicKey ::= SEQUENCE {\n * modulus INTEGER, -- n\n * publicExponent INTEGER -- e\n * }\n * it's possible to examine the structure of the keys obtained from openssl using\n * an asn.1 dumper as the one used here to parse the components: http://lapo.it/asn1js/\n * @argument {string} pem the pem encoded string, can include the BEGIN/END header/footer\n * @private\n */\n JSEncryptRSAKey.prototype.parseKey = function (pem) {\n try {\n var modulus = 0;\n var public_exponent = 0;\n var reHex = /^\\s*(?:[0-9A-Fa-f][0-9A-Fa-f]\\s*)+$/;\n var der = reHex.test(pem) ? _lib_asn1js_hex__WEBPACK_IMPORTED_MODULE_1__.Hex.decode(pem) : _lib_asn1js_base64__WEBPACK_IMPORTED_MODULE_2__.Base64.unarmor(pem);\n var asn1 = _lib_asn1js_asn1__WEBPACK_IMPORTED_MODULE_3__.ASN1.decode(der);\n // Fixes a bug with OpenSSL 1.0+ private keys\n if (asn1.sub.length === 3) {\n asn1 = asn1.sub[2].sub[0];\n }\n if (asn1.sub.length === 9) {\n // Parse the private key.\n modulus = asn1.sub[1].getHexStringValue(); // bigint\n this.n = (0,_lib_jsbn_jsbn__WEBPACK_IMPORTED_MODULE_5__.parseBigInt)(modulus, 16);\n public_exponent = asn1.sub[2].getHexStringValue(); // int\n this.e = parseInt(public_exponent, 16);\n var private_exponent = asn1.sub[3].getHexStringValue(); // bigint\n this.d = (0,_lib_jsbn_jsbn__WEBPACK_IMPORTED_MODULE_5__.parseBigInt)(private_exponent, 16);\n var prime1 = asn1.sub[4].getHexStringValue(); // bigint\n this.p = (0,_lib_jsbn_jsbn__WEBPACK_IMPORTED_MODULE_5__.parseBigInt)(prime1, 16);\n var prime2 = asn1.sub[5].getHexStringValue(); // bigint\n this.q = (0,_lib_jsbn_jsbn__WEBPACK_IMPORTED_MODULE_5__.parseBigInt)(prime2, 16);\n var exponent1 = asn1.sub[6].getHexStringValue(); // bigint\n this.dmp1 = (0,_lib_jsbn_jsbn__WEBPACK_IMPORTED_MODULE_5__.parseBigInt)(exponent1, 16);\n var exponent2 = asn1.sub[7].getHexStringValue(); // bigint\n this.dmq1 = (0,_lib_jsbn_jsbn__WEBPACK_IMPORTED_MODULE_5__.parseBigInt)(exponent2, 16);\n var coefficient = asn1.sub[8].getHexStringValue(); // bigint\n this.coeff = (0,_lib_jsbn_jsbn__WEBPACK_IMPORTED_MODULE_5__.parseBigInt)(coefficient, 16);\n }\n else if (asn1.sub.length === 2) {\n if (asn1.sub[0].sub) {\n // Parse ASN.1 SubjectPublicKeyInfo type as defined by X.509\n var bit_string = asn1.sub[1];\n var sequence = bit_string.sub[0];\n modulus = sequence.sub[0].getHexStringValue();\n this.n = (0,_lib_jsbn_jsbn__WEBPACK_IMPORTED_MODULE_5__.parseBigInt)(modulus, 16);\n public_exponent = sequence.sub[1].getHexStringValue();\n this.e = parseInt(public_exponent, 16);\n }\n else {\n // Parse ASN.1 RSAPublicKey type as defined by PKCS #1\n modulus = asn1.sub[0].getHexStringValue();\n this.n = (0,_lib_jsbn_jsbn__WEBPACK_IMPORTED_MODULE_5__.parseBigInt)(modulus, 16);\n public_exponent = asn1.sub[1].getHexStringValue();\n this.e = parseInt(public_exponent, 16);\n }\n }\n else {\n return false;\n }\n return true;\n }\n catch (ex) {\n return false;\n }\n };\n /**\n * Translate rsa parameters in a hex encoded string representing the rsa key.\n *\n * The translation follow the ASN.1 notation :\n * RSAPrivateKey ::= SEQUENCE {\n * version Version,\n * modulus INTEGER, -- n\n * publicExponent INTEGER, -- e\n * privateExponent INTEGER, -- d\n * prime1 INTEGER, -- p\n * prime2 INTEGER, -- q\n * exponent1 INTEGER, -- d mod (p1)\n * exponent2 INTEGER, -- d mod (q-1)\n * coefficient INTEGER, -- (inverse of q) mod p\n * }\n * @returns {string} DER Encoded String representing the rsa private key\n * @private\n */\n JSEncryptRSAKey.prototype.getPrivateBaseKey = function () {\n var options = {\n array: [\n new _lib_jsrsasign_asn1_1_0__WEBPACK_IMPORTED_MODULE_6__.KJUR.asn1.DERInteger({ int: 0 }),\n new _lib_jsrsasign_asn1_1_0__WEBPACK_IMPORTED_MODULE_6__.KJUR.asn1.DERInteger({ bigint: this.n }),\n new _lib_jsrsasign_asn1_1_0__WEBPACK_IMPORTED_MODULE_6__.KJUR.asn1.DERInteger({ int: this.e }),\n new _lib_jsrsasign_asn1_1_0__WEBPACK_IMPORTED_MODULE_6__.KJUR.asn1.DERInteger({ bigint: this.d }),\n new _lib_jsrsasign_asn1_1_0__WEBPACK_IMPORTED_MODULE_6__.KJUR.asn1.DERInteger({ bigint: this.p }),\n new _lib_jsrsasign_asn1_1_0__WEBPACK_IMPORTED_MODULE_6__.KJUR.asn1.DERInteger({ bigint: this.q }),\n new _lib_jsrsasign_asn1_1_0__WEBPACK_IMPORTED_MODULE_6__.KJUR.asn1.DERInteger({ bigint: this.dmp1 }),\n new _lib_jsrsasign_asn1_1_0__WEBPACK_IMPORTED_MODULE_6__.KJUR.asn1.DERInteger({ bigint: this.dmq1 }),\n new _lib_jsrsasign_asn1_1_0__WEBPACK_IMPORTED_MODULE_6__.KJUR.asn1.DERInteger({ bigint: this.coeff }),\n ],\n };\n var seq = new _lib_jsrsasign_asn1_1_0__WEBPACK_IMPORTED_MODULE_6__.KJUR.asn1.DERSequence(options);\n return seq.getEncodedHex();\n };\n /**\n * base64 (pem) encoded version of the DER encoded representation\n * @returns {string} pem encoded representation without header and footer\n * @public\n */\n JSEncryptRSAKey.prototype.getPrivateBaseKeyB64 = function () {\n return (0,_lib_jsbn_base64__WEBPACK_IMPORTED_MODULE_0__.hex2b64)(this.getPrivateBaseKey());\n };\n /**\n * Translate rsa parameters in a hex encoded string representing the rsa public key.\n * The representation follow the ASN.1 notation :\n * PublicKeyInfo ::= SEQUENCE {\n * algorithm AlgorithmIdentifier,\n * PublicKey BIT STRING\n * }\n * Where AlgorithmIdentifier is:\n * AlgorithmIdentifier ::= SEQUENCE {\n * algorithm OBJECT IDENTIFIER, the OID of the enc algorithm\n * parameters ANY DEFINED BY algorithm OPTIONAL (NULL for PKCS #1)\n * }\n * and PublicKey is a SEQUENCE encapsulated in a BIT STRING\n * RSAPublicKey ::= SEQUENCE {\n * modulus INTEGER, -- n\n * publicExponent INTEGER -- e\n * }\n * @returns {string} DER Encoded String representing the rsa public key\n * @private\n */\n JSEncryptRSAKey.prototype.getPublicBaseKey = function () {\n var first_sequence = new _lib_jsrsasign_asn1_1_0__WEBPACK_IMPORTED_MODULE_6__.KJUR.asn1.DERSequence({\n array: [\n new _lib_jsrsasign_asn1_1_0__WEBPACK_IMPORTED_MODULE_6__.KJUR.asn1.DERObjectIdentifier({ oid: \"1.2.840.113549.1.1.1\" }),\n new _lib_jsrsasign_asn1_1_0__WEBPACK_IMPORTED_MODULE_6__.KJUR.asn1.DERNull(),\n ],\n });\n var second_sequence = new _lib_jsrsasign_asn1_1_0__WEBPACK_IMPORTED_MODULE_6__.KJUR.asn1.DERSequence({\n array: [\n new _lib_jsrsasign_asn1_1_0__WEBPACK_IMPORTED_MODULE_6__.KJUR.asn1.DERInteger({ bigint: this.n }),\n new _lib_jsrsasign_asn1_1_0__WEBPACK_IMPORTED_MODULE_6__.KJUR.asn1.DERInteger({ int: this.e }),\n ],\n });\n var bit_string = new _lib_jsrsasign_asn1_1_0__WEBPACK_IMPORTED_MODULE_6__.KJUR.asn1.DERBitString({\n hex: \"00\" + second_sequence.getEncodedHex(),\n });\n var seq = new _lib_jsrsasign_asn1_1_0__WEBPACK_IMPORTED_MODULE_6__.KJUR.asn1.DERSequence({\n array: [first_sequence, bit_string],\n });\n return seq.getEncodedHex();\n };\n /**\n * base64 (pem) encoded version of the DER encoded representation\n * @returns {string} pem encoded representation without header and footer\n * @public\n */\n JSEncryptRSAKey.prototype.getPublicBaseKeyB64 = function () {\n return (0,_lib_jsbn_base64__WEBPACK_IMPORTED_MODULE_0__.hex2b64)(this.getPublicBaseKey());\n };\n /**\n * wrap the string in block of width chars. The default value for rsa keys is 64\n * characters.\n * @param {string} str the pem encoded string without header and footer\n * @param {Number} [width=64] - the length the string has to be wrapped at\n * @returns {string}\n * @private\n */\n JSEncryptRSAKey.wordwrap = function (str, width) {\n width = width || 64;\n if (!str) {\n return str;\n }\n var regex = \"(.{1,\" + width + \"})( +|$\\n?)|(.{1,\" + width + \"})\";\n return str.match(RegExp(regex, \"g\")).join(\"\\n\");\n };\n /**\n * Retrieve the pem encoded private key\n * @returns {string} the pem encoded private key with header/footer\n * @public\n */\n JSEncryptRSAKey.prototype.getPrivateKey = function () {\n var key = \"-----BEGIN RSA PRIVATE KEY-----\\n\";\n key += JSEncryptRSAKey.wordwrap(this.getPrivateBaseKeyB64()) + \"\\n\";\n key += \"-----END RSA PRIVATE KEY-----\";\n return key;\n };\n /**\n * Retrieve the pem encoded public key\n * @returns {string} the pem encoded public key with header/footer\n * @public\n */\n JSEncryptRSAKey.prototype.getPublicKey = function () {\n var key = \"-----BEGIN PUBLIC KEY-----\\n\";\n key += JSEncryptRSAKey.wordwrap(this.getPublicBaseKeyB64()) + \"\\n\";\n key += \"-----END PUBLIC KEY-----\";\n return key;\n };\n /**\n * Check if the object contains the necessary parameters to populate the rsa modulus\n * and public exponent parameters.\n * @param {Object} [obj={}] - An object that may contain the two public key\n * parameters\n * @returns {boolean} true if the object contains both the modulus and the public exponent\n * properties (n and e)\n * @todo check for types of n and e. N should be a parseable bigInt object, E should\n * be a parseable integer number\n * @private\n */\n JSEncryptRSAKey.hasPublicKeyProperty = function (obj) {\n obj = obj || {};\n return obj.hasOwnProperty(\"n\") && obj.hasOwnProperty(\"e\");\n };\n /**\n * Check if the object contains ALL the parameters of an RSA key.\n * @param {Object} [obj={}] - An object that may contain nine rsa key\n * parameters\n * @returns {boolean} true if the object contains all the parameters needed\n * @todo check for types of the parameters all the parameters but the public exponent\n * should be parseable bigint objects, the public exponent should be a parseable integer number\n * @private\n */\n JSEncryptRSAKey.hasPrivateKeyProperty = function (obj) {\n obj = obj || {};\n return (obj.hasOwnProperty(\"n\") &&\n obj.hasOwnProperty(\"e\") &&\n obj.hasOwnProperty(\"d\") &&\n obj.hasOwnProperty(\"p\") &&\n obj.hasOwnProperty(\"q\") &&\n obj.hasOwnProperty(\"dmp1\") &&\n obj.hasOwnProperty(\"dmq1\") &&\n obj.hasOwnProperty(\"coeff\"));\n };\n /**\n * Parse the properties of obj in the current rsa object. Obj should AT LEAST\n * include the modulus and public exponent (n, e) parameters.\n * @param {Object} obj - the object containing rsa parameters\n * @private\n */\n JSEncryptRSAKey.prototype.parsePropertiesFrom = function (obj) {\n this.n = obj.n;\n this.e = obj.e;\n if (obj.hasOwnProperty(\"d\")) {\n this.d = obj.d;\n this.p = obj.p;\n this.q = obj.q;\n this.dmp1 = obj.dmp1;\n this.dmq1 = obj.dmq1;\n this.coeff = obj.coeff;\n }\n };\n return JSEncryptRSAKey;\n}(_lib_jsbn_rsa__WEBPACK_IMPORTED_MODULE_4__.RSAKey));\n\n\n\n//# sourceURL=webpack://JSEncrypt/./lib/JSEncryptRSAKey.js?"); + + /***/ + }), + + /***/ + "./lib/index.js": + /*!**********************!*\ + !*** ./lib/index.js ***! + \**********************/ + /***/ + ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + + "use strict"; + eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"JSEncrypt\": () => (/* reexport safe */ _JSEncrypt__WEBPACK_IMPORTED_MODULE_0__.JSEncrypt),\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _JSEncrypt__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./JSEncrypt */ \"./lib/JSEncrypt.js\");\n\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_JSEncrypt__WEBPACK_IMPORTED_MODULE_0__.JSEncrypt);\n\n\n//# sourceURL=webpack://JSEncrypt/./lib/index.js?"); + + /***/ + }), + + /***/ + "./lib/lib/asn1js/asn1.js": + /*!********************************!*\ + !*** ./lib/lib/asn1js/asn1.js ***! + \********************************/ + /***/ + ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + + "use strict"; + eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"ASN1\": () => (/* binding */ ASN1),\n/* harmony export */ \"ASN1Tag\": () => (/* binding */ ASN1Tag),\n/* harmony export */ \"Stream\": () => (/* binding */ Stream)\n/* harmony export */ });\n/* harmony import */ var _int10__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./int10 */ \"./lib/lib/asn1js/int10.js\");\n// ASN.1 JavaScript decoder\n// Copyright (c) 2008-2014 Lapo Luchini \n// Permission to use, copy, modify, and/or distribute this software for any\n// purpose with or without fee is hereby granted, provided that the above\n// copyright notice and this permission notice appear in all copies.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES\n// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF\n// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR\n// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES\n// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN\n// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF\n// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.\n/*jshint browser: true, strict: true, immed: true, latedef: true, undef: true, regexdash: false */\n/*global oids */\n\nvar ellipsis = \"\\u2026\";\nvar reTimeS = /^(\\d\\d)(0[1-9]|1[0-2])(0[1-9]|[12]\\d|3[01])([01]\\d|2[0-3])(?:([0-5]\\d)(?:([0-5]\\d)(?:[.,](\\d{1,3}))?)?)?(Z|[-+](?:[0]\\d|1[0-2])([0-5]\\d)?)?$/;\nvar reTimeL = /^(\\d\\d\\d\\d)(0[1-9]|1[0-2])(0[1-9]|[12]\\d|3[01])([01]\\d|2[0-3])(?:([0-5]\\d)(?:([0-5]\\d)(?:[.,](\\d{1,3}))?)?)?(Z|[-+](?:[0]\\d|1[0-2])([0-5]\\d)?)?$/;\nfunction stringCut(str, len) {\n if (str.length > len) {\n str = str.substring(0, len) + ellipsis;\n }\n return str;\n}\nvar Stream = /** @class */ (function () {\n function Stream(enc, pos) {\n this.hexDigits = \"0123456789ABCDEF\";\n if (enc instanceof Stream) {\n this.enc = enc.enc;\n this.pos = enc.pos;\n }\n else {\n // enc should be an array or a binary string\n this.enc = enc;\n this.pos = pos;\n }\n }\n Stream.prototype.get = function (pos) {\n if (pos === undefined) {\n pos = this.pos++;\n }\n if (pos >= this.enc.length) {\n throw new Error(\"Requesting byte offset \".concat(pos, \" on a stream of length \").concat(this.enc.length));\n }\n return (\"string\" === typeof this.enc) ? this.enc.charCodeAt(pos) : this.enc[pos];\n };\n Stream.prototype.hexByte = function (b) {\n return this.hexDigits.charAt((b >> 4) & 0xF) + this.hexDigits.charAt(b & 0xF);\n };\n Stream.prototype.hexDump = function (start, end, raw) {\n var s = \"\";\n for (var i = start; i < end; ++i) {\n s += this.hexByte(this.get(i));\n if (raw !== true) {\n switch (i & 0xF) {\n case 0x7:\n s += \" \";\n break;\n case 0xF:\n s += \"\\n\";\n break;\n default:\n s += \" \";\n }\n }\n }\n return s;\n };\n Stream.prototype.isASCII = function (start, end) {\n for (var i = start; i < end; ++i) {\n var c = this.get(i);\n if (c < 32 || c > 176) {\n return false;\n }\n }\n return true;\n };\n Stream.prototype.parseStringISO = function (start, end) {\n var s = \"\";\n for (var i = start; i < end; ++i) {\n s += String.fromCharCode(this.get(i));\n }\n return s;\n };\n Stream.prototype.parseStringUTF = function (start, end) {\n var s = \"\";\n for (var i = start; i < end;) {\n var c = this.get(i++);\n if (c < 128) {\n s += String.fromCharCode(c);\n }\n else if ((c > 191) && (c < 224)) {\n s += String.fromCharCode(((c & 0x1F) << 6) | (this.get(i++) & 0x3F));\n }\n else {\n s += String.fromCharCode(((c & 0x0F) << 12) | ((this.get(i++) & 0x3F) << 6) | (this.get(i++) & 0x3F));\n }\n }\n return s;\n };\n Stream.prototype.parseStringBMP = function (start, end) {\n var str = \"\";\n var hi;\n var lo;\n for (var i = start; i < end;) {\n hi = this.get(i++);\n lo = this.get(i++);\n str += String.fromCharCode((hi << 8) | lo);\n }\n return str;\n };\n Stream.prototype.parseTime = function (start, end, shortYear) {\n var s = this.parseStringISO(start, end);\n var m = (shortYear ? reTimeS : reTimeL).exec(s);\n if (!m) {\n return \"Unrecognized time: \" + s;\n }\n if (shortYear) {\n // to avoid querying the timer, use the fixed range [1970, 2069]\n // it will conform with ITU X.400 [-10, +40] sliding window until 2030\n m[1] = +m[1];\n m[1] += (+m[1] < 70) ? 2000 : 1900;\n }\n s = m[1] + \"-\" + m[2] + \"-\" + m[3] + \" \" + m[4];\n if (m[5]) {\n s += \":\" + m[5];\n if (m[6]) {\n s += \":\" + m[6];\n if (m[7]) {\n s += \".\" + m[7];\n }\n }\n }\n if (m[8]) {\n s += \" UTC\";\n if (m[8] != \"Z\") {\n s += m[8];\n if (m[9]) {\n s += \":\" + m[9];\n }\n }\n }\n return s;\n };\n Stream.prototype.parseInteger = function (start, end) {\n var v = this.get(start);\n var neg = (v > 127);\n var pad = neg ? 255 : 0;\n var len;\n var s = \"\";\n // skip unuseful bits (not allowed in DER)\n while (v == pad && ++start < end) {\n v = this.get(start);\n }\n len = end - start;\n if (len === 0) {\n return neg ? -1 : 0;\n }\n // show bit length of huge integers\n if (len > 4) {\n s = v;\n len <<= 3;\n while (((+s ^ pad) & 0x80) == 0) {\n s = +s << 1;\n --len;\n }\n s = \"(\" + len + \" bit)\\n\";\n }\n // decode the integer\n if (neg) {\n v = v - 256;\n }\n var n = new _int10__WEBPACK_IMPORTED_MODULE_0__.Int10(v);\n for (var i = start + 1; i < end; ++i) {\n n.mulAdd(256, this.get(i));\n }\n return s + n.toString();\n };\n Stream.prototype.parseBitString = function (start, end, maxLength) {\n var unusedBit = this.get(start);\n var lenBit = ((end - start - 1) << 3) - unusedBit;\n var intro = \"(\" + lenBit + \" bit)\\n\";\n var s = \"\";\n for (var i = start + 1; i < end; ++i) {\n var b = this.get(i);\n var skip = (i == end - 1) ? unusedBit : 0;\n for (var j = 7; j >= skip; --j) {\n s += (b >> j) & 1 ? \"1\" : \"0\";\n }\n if (s.length > maxLength) {\n return intro + stringCut(s, maxLength);\n }\n }\n return intro + s;\n };\n Stream.prototype.parseOctetString = function (start, end, maxLength) {\n if (this.isASCII(start, end)) {\n return stringCut(this.parseStringISO(start, end), maxLength);\n }\n var len = end - start;\n var s = \"(\" + len + \" byte)\\n\";\n maxLength /= 2; // we work in bytes\n if (len > maxLength) {\n end = start + maxLength;\n }\n for (var i = start; i < end; ++i) {\n s += this.hexByte(this.get(i));\n }\n if (len > maxLength) {\n s += ellipsis;\n }\n return s;\n };\n Stream.prototype.parseOID = function (start, end, maxLength) {\n var s = \"\";\n var n = new _int10__WEBPACK_IMPORTED_MODULE_0__.Int10();\n var bits = 0;\n for (var i = start; i < end; ++i) {\n var v = this.get(i);\n n.mulAdd(128, v & 0x7F);\n bits += 7;\n if (!(v & 0x80)) { // finished\n if (s === \"\") {\n n = n.simplify();\n if (n instanceof _int10__WEBPACK_IMPORTED_MODULE_0__.Int10) {\n n.sub(80);\n s = \"2.\" + n.toString();\n }\n else {\n var m = n < 80 ? n < 40 ? 0 : 1 : 2;\n s = m + \".\" + (n - m * 40);\n }\n }\n else {\n s += \".\" + n.toString();\n }\n if (s.length > maxLength) {\n return stringCut(s, maxLength);\n }\n n = new _int10__WEBPACK_IMPORTED_MODULE_0__.Int10();\n bits = 0;\n }\n }\n if (bits > 0) {\n s += \".incomplete\";\n }\n return s;\n };\n return Stream;\n}());\n\nvar ASN1 = /** @class */ (function () {\n function ASN1(stream, header, length, tag, sub) {\n if (!(tag instanceof ASN1Tag)) {\n throw new Error(\"Invalid tag value.\");\n }\n this.stream = stream;\n this.header = header;\n this.length = length;\n this.tag = tag;\n this.sub = sub;\n }\n ASN1.prototype.typeName = function () {\n switch (this.tag.tagClass) {\n case 0: // universal\n switch (this.tag.tagNumber) {\n case 0x00:\n return \"EOC\";\n case 0x01:\n return \"BOOLEAN\";\n case 0x02:\n return \"INTEGER\";\n case 0x03:\n return \"BIT_STRING\";\n case 0x04:\n return \"OCTET_STRING\";\n case 0x05:\n return \"NULL\";\n case 0x06:\n return \"OBJECT_IDENTIFIER\";\n case 0x07:\n return \"ObjectDescriptor\";\n case 0x08:\n return \"EXTERNAL\";\n case 0x09:\n return \"REAL\";\n case 0x0A:\n return \"ENUMERATED\";\n case 0x0B:\n return \"EMBEDDED_PDV\";\n case 0x0C:\n return \"UTF8String\";\n case 0x10:\n return \"SEQUENCE\";\n case 0x11:\n return \"SET\";\n case 0x12:\n return \"NumericString\";\n case 0x13:\n return \"PrintableString\"; // ASCII subset\n case 0x14:\n return \"TeletexString\"; // aka T61String\n case 0x15:\n return \"VideotexString\";\n case 0x16:\n return \"IA5String\"; // ASCII\n case 0x17:\n return \"UTCTime\";\n case 0x18:\n return \"GeneralizedTime\";\n case 0x19:\n return \"GraphicString\";\n case 0x1A:\n return \"VisibleString\"; // ASCII subset\n case 0x1B:\n return \"GeneralString\";\n case 0x1C:\n return \"UniversalString\";\n case 0x1E:\n return \"BMPString\";\n }\n return \"Universal_\" + this.tag.tagNumber.toString();\n case 1:\n return \"Application_\" + this.tag.tagNumber.toString();\n case 2:\n return \"[\" + this.tag.tagNumber.toString() + \"]\"; // Context\n case 3:\n return \"Private_\" + this.tag.tagNumber.toString();\n }\n };\n ASN1.prototype.content = function (maxLength) {\n if (this.tag === undefined) {\n return null;\n }\n if (maxLength === undefined) {\n maxLength = Infinity;\n }\n var content = this.posContent();\n var len = Math.abs(this.length);\n if (!this.tag.isUniversal()) {\n if (this.sub !== null) {\n return \"(\" + this.sub.length + \" elem)\";\n }\n return this.stream.parseOctetString(content, content + len, maxLength);\n }\n switch (this.tag.tagNumber) {\n case 0x01: // BOOLEAN\n return (this.stream.get(content) === 0) ? \"false\" : \"true\";\n case 0x02: // INTEGER\n return this.stream.parseInteger(content, content + len);\n case 0x03: // BIT_STRING\n return this.sub ? \"(\" + this.sub.length + \" elem)\" :\n this.stream.parseBitString(content, content + len, maxLength);\n case 0x04: // OCTET_STRING\n return this.sub ? \"(\" + this.sub.length + \" elem)\" :\n this.stream.parseOctetString(content, content + len, maxLength);\n // case 0x05: // NULL\n case 0x06: // OBJECT_IDENTIFIER\n return this.stream.parseOID(content, content + len, maxLength);\n // case 0x07: // ObjectDescriptor\n // case 0x08: // EXTERNAL\n // case 0x09: // REAL\n // case 0x0A: // ENUMERATED\n // case 0x0B: // EMBEDDED_PDV\n case 0x10: // SEQUENCE\n case 0x11: // SET\n if (this.sub !== null) {\n return \"(\" + this.sub.length + \" elem)\";\n }\n else {\n return \"(no elem)\";\n }\n case 0x0C: // UTF8String\n return stringCut(this.stream.parseStringUTF(content, content + len), maxLength);\n case 0x12: // NumericString\n case 0x13: // PrintableString\n case 0x14: // TeletexString\n case 0x15: // VideotexString\n case 0x16: // IA5String\n // case 0x19: // GraphicString\n case 0x1A: // VisibleString\n // case 0x1B: // GeneralString\n // case 0x1C: // UniversalString\n return stringCut(this.stream.parseStringISO(content, content + len), maxLength);\n case 0x1E: // BMPString\n return stringCut(this.stream.parseStringBMP(content, content + len), maxLength);\n case 0x17: // UTCTime\n case 0x18: // GeneralizedTime\n return this.stream.parseTime(content, content + len, (this.tag.tagNumber == 0x17));\n }\n return null;\n };\n ASN1.prototype.toString = function () {\n return this.typeName() + \"@\" + this.stream.pos + \"[header:\" + this.header + \",length:\" + this.length + \",sub:\" + ((this.sub === null) ? \"null\" : this.sub.length) + \"]\";\n };\n ASN1.prototype.toPrettyString = function (indent) {\n if (indent === undefined) {\n indent = \"\";\n }\n var s = indent + this.typeName() + \" @\" + this.stream.pos;\n if (this.length >= 0) {\n s += \"+\";\n }\n s += this.length;\n if (this.tag.tagConstructed) {\n s += \" (constructed)\";\n }\n else if ((this.tag.isUniversal() && ((this.tag.tagNumber == 0x03) || (this.tag.tagNumber == 0x04))) && (this.sub !== null)) {\n s += \" (encapsulates)\";\n }\n s += \"\\n\";\n if (this.sub !== null) {\n indent += \" \";\n for (var i = 0, max = this.sub.length; i < max; ++i) {\n s += this.sub[i].toPrettyString(indent);\n }\n }\n return s;\n };\n ASN1.prototype.posStart = function () {\n return this.stream.pos;\n };\n ASN1.prototype.posContent = function () {\n return this.stream.pos + this.header;\n };\n ASN1.prototype.posEnd = function () {\n return this.stream.pos + this.header + Math.abs(this.length);\n };\n ASN1.prototype.toHexString = function () {\n return this.stream.hexDump(this.posStart(), this.posEnd(), true);\n };\n ASN1.decodeLength = function (stream) {\n var buf = stream.get();\n var len = buf & 0x7F;\n if (len == buf) {\n return len;\n }\n // no reason to use Int10, as it would be a huge buffer anyways\n if (len > 6) {\n throw new Error(\"Length over 48 bits not supported at position \" + (stream.pos - 1));\n }\n if (len === 0) {\n return null;\n } // undefined\n buf = 0;\n for (var i = 0; i < len; ++i) {\n buf = (buf * 256) + stream.get();\n }\n return buf;\n };\n /**\n * Retrieve the hexadecimal value (as a string) of the current ASN.1 element\n * @returns {string}\n * @public\n */\n ASN1.prototype.getHexStringValue = function () {\n var hexString = this.toHexString();\n var offset = this.header * 2;\n var length = this.length * 2;\n return hexString.substr(offset, length);\n };\n ASN1.decode = function (str) {\n var stream;\n if (!(str instanceof Stream)) {\n stream = new Stream(str, 0);\n }\n else {\n stream = str;\n }\n var streamStart = new Stream(stream);\n var tag = new ASN1Tag(stream);\n var len = ASN1.decodeLength(stream);\n var start = stream.pos;\n var header = start - streamStart.pos;\n var sub = null;\n var getSub = function () {\n var ret = [];\n if (len !== null) {\n // definite length\n var end = start + len;\n while (stream.pos < end) {\n ret[ret.length] = ASN1.decode(stream);\n }\n if (stream.pos != end) {\n throw new Error(\"Content size is not correct for container starting at offset \" + start);\n }\n }\n else {\n // undefined length\n try {\n for (;;) {\n var s = ASN1.decode(stream);\n if (s.tag.isEOC()) {\n break;\n }\n ret[ret.length] = s;\n }\n len = start - stream.pos; // undefined lengths are represented as negative values\n }\n catch (e) {\n throw new Error(\"Exception while decoding undefined length content: \" + e);\n }\n }\n return ret;\n };\n if (tag.tagConstructed) {\n // must have valid content\n sub = getSub();\n }\n else if (tag.isUniversal() && ((tag.tagNumber == 0x03) || (tag.tagNumber == 0x04))) {\n // sometimes BitString and OctetString are used to encapsulate ASN.1\n try {\n if (tag.tagNumber == 0x03) {\n if (stream.get() != 0) {\n throw new Error(\"BIT STRINGs with unused bits cannot encapsulate.\");\n }\n }\n sub = getSub();\n for (var i = 0; i < sub.length; ++i) {\n if (sub[i].tag.isEOC()) {\n throw new Error(\"EOC is not supposed to be actual content.\");\n }\n }\n }\n catch (e) {\n // but silently ignore when they don't\n sub = null;\n }\n }\n if (sub === null) {\n if (len === null) {\n throw new Error(\"We can't skip over an invalid tag with undefined length at offset \" + start);\n }\n stream.pos = start + Math.abs(len);\n }\n return new ASN1(streamStart, header, len, tag, sub);\n };\n return ASN1;\n}());\n\nvar ASN1Tag = /** @class */ (function () {\n function ASN1Tag(stream) {\n var buf = stream.get();\n this.tagClass = buf >> 6;\n this.tagConstructed = ((buf & 0x20) !== 0);\n this.tagNumber = buf & 0x1F;\n if (this.tagNumber == 0x1F) { // long tag\n var n = new _int10__WEBPACK_IMPORTED_MODULE_0__.Int10();\n do {\n buf = stream.get();\n n.mulAdd(128, buf & 0x7F);\n } while (buf & 0x80);\n this.tagNumber = n.simplify();\n }\n }\n ASN1Tag.prototype.isUniversal = function () {\n return this.tagClass === 0x00;\n };\n ASN1Tag.prototype.isEOC = function () {\n return this.tagClass === 0x00 && this.tagNumber === 0x00;\n };\n return ASN1Tag;\n}());\n\n\n\n//# sourceURL=webpack://JSEncrypt/./lib/lib/asn1js/asn1.js?"); + + /***/ + }), + + /***/ + "./lib/lib/asn1js/base64.js": + /*!**********************************!*\ + !*** ./lib/lib/asn1js/base64.js ***! + \**********************************/ + /***/ + ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + + "use strict"; + eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"Base64\": () => (/* binding */ Base64)\n/* harmony export */ });\n// Base64 JavaScript decoder\n// Copyright (c) 2008-2013 Lapo Luchini \n// Permission to use, copy, modify, and/or distribute this software for any\n// purpose with or without fee is hereby granted, provided that the above\n// copyright notice and this permission notice appear in all copies.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES\n// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF\n// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR\n// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES\n// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN\n// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF\n// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.\n/*jshint browser: true, strict: true, immed: true, latedef: true, undef: true, regexdash: false */\nvar decoder;\nvar Base64 = {\n decode: function (a) {\n var i;\n if (decoder === undefined) {\n var b64 = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\";\n var ignore = \"= \\f\\n\\r\\t\\u00A0\\u2028\\u2029\";\n decoder = Object.create(null);\n for (i = 0; i < 64; ++i) {\n decoder[b64.charAt(i)] = i;\n }\n decoder['-'] = 62; //+\n decoder['_'] = 63; //-\n for (i = 0; i < ignore.length; ++i) {\n decoder[ignore.charAt(i)] = -1;\n }\n }\n var out = [];\n var bits = 0;\n var char_count = 0;\n for (i = 0; i < a.length; ++i) {\n var c = a.charAt(i);\n if (c == \"=\") {\n break;\n }\n c = decoder[c];\n if (c == -1) {\n continue;\n }\n if (c === undefined) {\n throw new Error(\"Illegal character at offset \" + i);\n }\n bits |= c;\n if (++char_count >= 4) {\n out[out.length] = (bits >> 16);\n out[out.length] = (bits >> 8) & 0xFF;\n out[out.length] = bits & 0xFF;\n bits = 0;\n char_count = 0;\n }\n else {\n bits <<= 6;\n }\n }\n switch (char_count) {\n case 1:\n throw new Error(\"Base64 encoding incomplete: at least 2 bits missing\");\n case 2:\n out[out.length] = (bits >> 10);\n break;\n case 3:\n out[out.length] = (bits >> 16);\n out[out.length] = (bits >> 8) & 0xFF;\n break;\n }\n return out;\n },\n re: /-----BEGIN [^-]+-----([A-Za-z0-9+\\/=\\s]+)-----END [^-]+-----|begin-base64[^\\n]+\\n([A-Za-z0-9+\\/=\\s]+)====/,\n unarmor: function (a) {\n var m = Base64.re.exec(a);\n if (m) {\n if (m[1]) {\n a = m[1];\n }\n else if (m[2]) {\n a = m[2];\n }\n else {\n throw new Error(\"RegExp out of sync\");\n }\n }\n return Base64.decode(a);\n }\n};\n\n\n//# sourceURL=webpack://JSEncrypt/./lib/lib/asn1js/base64.js?"); + + /***/ + }), + + /***/ + "./lib/lib/asn1js/hex.js": + /*!*******************************!*\ + !*** ./lib/lib/asn1js/hex.js ***! + \*******************************/ + /***/ + ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + + "use strict"; + eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"Hex\": () => (/* binding */ Hex)\n/* harmony export */ });\n// Hex JavaScript decoder\n// Copyright (c) 2008-2013 Lapo Luchini \n// Permission to use, copy, modify, and/or distribute this software for any\n// purpose with or without fee is hereby granted, provided that the above\n// copyright notice and this permission notice appear in all copies.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES\n// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF\n// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR\n// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES\n// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN\n// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF\n// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.\n/*jshint browser: true, strict: true, immed: true, latedef: true, undef: true, regexdash: false */\nvar decoder;\nvar Hex = {\n decode: function (a) {\n var i;\n if (decoder === undefined) {\n var hex = \"0123456789ABCDEF\";\n var ignore = \" \\f\\n\\r\\t\\u00A0\\u2028\\u2029\";\n decoder = {};\n for (i = 0; i < 16; ++i) {\n decoder[hex.charAt(i)] = i;\n }\n hex = hex.toLowerCase();\n for (i = 10; i < 16; ++i) {\n decoder[hex.charAt(i)] = i;\n }\n for (i = 0; i < ignore.length; ++i) {\n decoder[ignore.charAt(i)] = -1;\n }\n }\n var out = [];\n var bits = 0;\n var char_count = 0;\n for (i = 0; i < a.length; ++i) {\n var c = a.charAt(i);\n if (c == \"=\") {\n break;\n }\n c = decoder[c];\n if (c == -1) {\n continue;\n }\n if (c === undefined) {\n throw new Error(\"Illegal character at offset \" + i);\n }\n bits |= c;\n if (++char_count >= 2) {\n out[out.length] = bits;\n bits = 0;\n char_count = 0;\n }\n else {\n bits <<= 4;\n }\n }\n if (char_count) {\n throw new Error(\"Hex encoding incomplete: 4 bits missing\");\n }\n return out;\n }\n};\n\n\n//# sourceURL=webpack://JSEncrypt/./lib/lib/asn1js/hex.js?"); + + /***/ + }), + + /***/ + "./lib/lib/asn1js/int10.js": + /*!*********************************!*\ + !*** ./lib/lib/asn1js/int10.js ***! + \*********************************/ + /***/ + ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + + "use strict"; + eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"Int10\": () => (/* binding */ Int10)\n/* harmony export */ });\n// Big integer base-10 printing library\n// Copyright (c) 2014 Lapo Luchini \n// Permission to use, copy, modify, and/or distribute this software for any\n// purpose with or without fee is hereby granted, provided that the above\n// copyright notice and this permission notice appear in all copies.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES\n// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF\n// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR\n// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES\n// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN\n// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF\n// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.\n/*jshint browser: true, strict: true, immed: true, latedef: true, undef: true, regexdash: false */\nvar max = 10000000000000; // biggest integer that can still fit 2^53 when multiplied by 256\nvar Int10 = /** @class */ (function () {\n function Int10(value) {\n this.buf = [+value || 0];\n }\n Int10.prototype.mulAdd = function (m, c) {\n // assert(m <= 256)\n var b = this.buf;\n var l = b.length;\n var i;\n var t;\n for (i = 0; i < l; ++i) {\n t = b[i] * m + c;\n if (t < max) {\n c = 0;\n }\n else {\n c = 0 | (t / max);\n t -= c * max;\n }\n b[i] = t;\n }\n if (c > 0) {\n b[i] = c;\n }\n };\n Int10.prototype.sub = function (c) {\n // assert(m <= 256)\n var b = this.buf;\n var l = b.length;\n var i;\n var t;\n for (i = 0; i < l; ++i) {\n t = b[i] - c;\n if (t < 0) {\n t += max;\n c = 1;\n }\n else {\n c = 0;\n }\n b[i] = t;\n }\n while (b[b.length - 1] === 0) {\n b.pop();\n }\n };\n Int10.prototype.toString = function (base) {\n if ((base || 10) != 10) {\n throw new Error(\"only base 10 is supported\");\n }\n var b = this.buf;\n var s = b[b.length - 1].toString();\n for (var i = b.length - 2; i >= 0; --i) {\n s += (max + b[i]).toString().substring(1);\n }\n return s;\n };\n Int10.prototype.valueOf = function () {\n var b = this.buf;\n var v = 0;\n for (var i = b.length - 1; i >= 0; --i) {\n v = v * max + b[i];\n }\n return v;\n };\n Int10.prototype.simplify = function () {\n var b = this.buf;\n return (b.length == 1) ? b[0] : this;\n };\n return Int10;\n}());\n\n\n\n//# sourceURL=webpack://JSEncrypt/./lib/lib/asn1js/int10.js?"); + + /***/ + }), + + /***/ + "./lib/lib/jsbn/base64.js": + /*!********************************!*\ + !*** ./lib/lib/jsbn/base64.js ***! + \********************************/ + /***/ + ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + + "use strict"; + eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"b64toBA\": () => (/* binding */ b64toBA),\n/* harmony export */ \"b64tohex\": () => (/* binding */ b64tohex),\n/* harmony export */ \"hex2b64\": () => (/* binding */ hex2b64)\n/* harmony export */ });\n/* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./util */ \"./lib/lib/jsbn/util.js\");\n\nvar b64map = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\";\nvar b64pad = \"=\";\nfunction hex2b64(h) {\n var i;\n var c;\n var ret = \"\";\n for (i = 0; i + 3 <= h.length; i += 3) {\n c = parseInt(h.substring(i, i + 3), 16);\n ret += b64map.charAt(c >> 6) + b64map.charAt(c & 63);\n }\n if (i + 1 == h.length) {\n c = parseInt(h.substring(i, i + 1), 16);\n ret += b64map.charAt(c << 2);\n }\n else if (i + 2 == h.length) {\n c = parseInt(h.substring(i, i + 2), 16);\n ret += b64map.charAt(c >> 2) + b64map.charAt((c & 3) << 4);\n }\n while ((ret.length & 3) > 0) {\n ret += b64pad;\n }\n return ret;\n}\n// convert a base64 string to hex\nfunction b64tohex(s) {\n var ret = \"\";\n var i;\n var k = 0; // b64 state, 0-3\n var slop = 0;\n for (i = 0; i < s.length; ++i) {\n if (s.charAt(i) == b64pad) {\n break;\n }\n var v = b64map.indexOf(s.charAt(i));\n if (v < 0) {\n continue;\n }\n if (k == 0) {\n ret += (0,_util__WEBPACK_IMPORTED_MODULE_0__.int2char)(v >> 2);\n slop = v & 3;\n k = 1;\n }\n else if (k == 1) {\n ret += (0,_util__WEBPACK_IMPORTED_MODULE_0__.int2char)((slop << 2) | (v >> 4));\n slop = v & 0xf;\n k = 2;\n }\n else if (k == 2) {\n ret += (0,_util__WEBPACK_IMPORTED_MODULE_0__.int2char)(slop);\n ret += (0,_util__WEBPACK_IMPORTED_MODULE_0__.int2char)(v >> 2);\n slop = v & 3;\n k = 3;\n }\n else {\n ret += (0,_util__WEBPACK_IMPORTED_MODULE_0__.int2char)((slop << 2) | (v >> 4));\n ret += (0,_util__WEBPACK_IMPORTED_MODULE_0__.int2char)(v & 0xf);\n k = 0;\n }\n }\n if (k == 1) {\n ret += (0,_util__WEBPACK_IMPORTED_MODULE_0__.int2char)(slop << 2);\n }\n return ret;\n}\n// convert a base64 string to a byte/number array\nfunction b64toBA(s) {\n // piggyback on b64tohex for now, optimize later\n var h = b64tohex(s);\n var i;\n var a = [];\n for (i = 0; 2 * i < h.length; ++i) {\n a[i] = parseInt(h.substring(2 * i, 2 * i + 2), 16);\n }\n return a;\n}\n\n\n//# sourceURL=webpack://JSEncrypt/./lib/lib/jsbn/base64.js?"); + + /***/ + }), + + /***/ + "./lib/lib/jsbn/jsbn.js": + /*!******************************!*\ + !*** ./lib/lib/jsbn/jsbn.js ***! + \******************************/ + /***/ + ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + + "use strict"; + eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"BigInteger\": () => (/* binding */ BigInteger),\n/* harmony export */ \"intAt\": () => (/* binding */ intAt),\n/* harmony export */ \"nbi\": () => (/* binding */ nbi),\n/* harmony export */ \"nbits\": () => (/* binding */ nbits),\n/* harmony export */ \"nbv\": () => (/* binding */ nbv),\n/* harmony export */ \"parseBigInt\": () => (/* binding */ parseBigInt)\n/* harmony export */ });\n/* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./util */ \"./lib/lib/jsbn/util.js\");\n// Copyright (c) 2005 Tom Wu\n// All Rights Reserved.\n// See \"LICENSE\" for details.\n// Basic JavaScript BN library - subset useful for RSA encryption.\n\n// Bits per digit\nvar dbits;\n// JavaScript engine analysis\nvar canary = 0xdeadbeefcafe;\nvar j_lm = ((canary & 0xffffff) == 0xefcafe);\n//#region\nvar lowprimes = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277, 281, 283, 293, 307, 311, 313, 317, 331, 337, 347, 349, 353, 359, 367, 373, 379, 383, 389, 397, 401, 409, 419, 421, 431, 433, 439, 443, 449, 457, 461, 463, 467, 479, 487, 491, 499, 503, 509, 521, 523, 541, 547, 557, 563, 569, 571, 577, 587, 593, 599, 601, 607, 613, 617, 619, 631, 641, 643, 647, 653, 659, 661, 673, 677, 683, 691, 701, 709, 719, 727, 733, 739, 743, 751, 757, 761, 769, 773, 787, 797, 809, 811, 821, 823, 827, 829, 839, 853, 857, 859, 863, 877, 881, 883, 887, 907, 911, 919, 929, 937, 941, 947, 953, 967, 971, 977, 983, 991, 997];\nvar lplim = (1 << 26) / lowprimes[lowprimes.length - 1];\n//#endregion\n// (public) Constructor\nvar BigInteger = /** @class */ (function () {\n function BigInteger(a, b, c) {\n if (a != null) {\n if (\"number\" == typeof a) {\n this.fromNumber(a, b, c);\n }\n else if (b == null && \"string\" != typeof a) {\n this.fromString(a, 256);\n }\n else {\n this.fromString(a, b);\n }\n }\n }\n //#region PUBLIC\n // BigInteger.prototype.toString = bnToString;\n // (public) return string representation in given radix\n BigInteger.prototype.toString = function (b) {\n if (this.s < 0) {\n return \"-\" + this.negate().toString(b);\n }\n var k;\n if (b == 16) {\n k = 4;\n }\n else if (b == 8) {\n k = 3;\n }\n else if (b == 2) {\n k = 1;\n }\n else if (b == 32) {\n k = 5;\n }\n else if (b == 4) {\n k = 2;\n }\n else {\n return this.toRadix(b);\n }\n var km = (1 << k) - 1;\n var d;\n var m = false;\n var r = \"\";\n var i = this.t;\n var p = this.DB - (i * this.DB) % k;\n if (i-- > 0) {\n if (p < this.DB && (d = this[i] >> p) > 0) {\n m = true;\n r = (0,_util__WEBPACK_IMPORTED_MODULE_0__.int2char)(d);\n }\n while (i >= 0) {\n if (p < k) {\n d = (this[i] & ((1 << p) - 1)) << (k - p);\n d |= this[--i] >> (p += this.DB - k);\n }\n else {\n d = (this[i] >> (p -= k)) & km;\n if (p <= 0) {\n p += this.DB;\n --i;\n }\n }\n if (d > 0) {\n m = true;\n }\n if (m) {\n r += (0,_util__WEBPACK_IMPORTED_MODULE_0__.int2char)(d);\n }\n }\n }\n return m ? r : \"0\";\n };\n // BigInteger.prototype.negate = bnNegate;\n // (public) -this\n BigInteger.prototype.negate = function () {\n var r = nbi();\n BigInteger.ZERO.subTo(this, r);\n return r;\n };\n // BigInteger.prototype.abs = bnAbs;\n // (public) |this|\n BigInteger.prototype.abs = function () {\n return (this.s < 0) ? this.negate() : this;\n };\n // BigInteger.prototype.compareTo = bnCompareTo;\n // (public) return + if this > a, - if this < a, 0 if equal\n BigInteger.prototype.compareTo = function (a) {\n var r = this.s - a.s;\n if (r != 0) {\n return r;\n }\n var i = this.t;\n r = i - a.t;\n if (r != 0) {\n return (this.s < 0) ? -r : r;\n }\n while (--i >= 0) {\n if ((r = this[i] - a[i]) != 0) {\n return r;\n }\n }\n return 0;\n };\n // BigInteger.prototype.bitLength = bnBitLength;\n // (public) return the number of bits in \"this\"\n BigInteger.prototype.bitLength = function () {\n if (this.t <= 0) {\n return 0;\n }\n return this.DB * (this.t - 1) + nbits(this[this.t - 1] ^ (this.s & this.DM));\n };\n // BigInteger.prototype.mod = bnMod;\n // (public) this mod a\n BigInteger.prototype.mod = function (a) {\n var r = nbi();\n this.abs().divRemTo(a, null, r);\n if (this.s < 0 && r.compareTo(BigInteger.ZERO) > 0) {\n a.subTo(r, r);\n }\n return r;\n };\n // BigInteger.prototype.modPowInt = bnModPowInt;\n // (public) this^e % m, 0 <= e < 2^32\n BigInteger.prototype.modPowInt = function (e, m) {\n var z;\n if (e < 256 || m.isEven()) {\n z = new Classic(m);\n }\n else {\n z = new Montgomery(m);\n }\n return this.exp(e, z);\n };\n // BigInteger.prototype.clone = bnClone;\n // (public)\n BigInteger.prototype.clone = function () {\n var r = nbi();\n this.copyTo(r);\n return r;\n };\n // BigInteger.prototype.intValue = bnIntValue;\n // (public) return value as integer\n BigInteger.prototype.intValue = function () {\n if (this.s < 0) {\n if (this.t == 1) {\n return this[0] - this.DV;\n }\n else if (this.t == 0) {\n return -1;\n }\n }\n else if (this.t == 1) {\n return this[0];\n }\n else if (this.t == 0) {\n return 0;\n }\n // assumes 16 < DB < 32\n return ((this[1] & ((1 << (32 - this.DB)) - 1)) << this.DB) | this[0];\n };\n // BigInteger.prototype.byteValue = bnByteValue;\n // (public) return value as byte\n BigInteger.prototype.byteValue = function () {\n return (this.t == 0) ? this.s : (this[0] << 24) >> 24;\n };\n // BigInteger.prototype.shortValue = bnShortValue;\n // (public) return value as short (assumes DB>=16)\n BigInteger.prototype.shortValue = function () {\n return (this.t == 0) ? this.s : (this[0] << 16) >> 16;\n };\n // BigInteger.prototype.signum = bnSigNum;\n // (public) 0 if this == 0, 1 if this > 0\n BigInteger.prototype.signum = function () {\n if (this.s < 0) {\n return -1;\n }\n else if (this.t <= 0 || (this.t == 1 && this[0] <= 0)) {\n return 0;\n }\n else {\n return 1;\n }\n };\n // BigInteger.prototype.toByteArray = bnToByteArray;\n // (public) convert to bigendian byte array\n BigInteger.prototype.toByteArray = function () {\n var i = this.t;\n var r = [];\n r[0] = this.s;\n var p = this.DB - (i * this.DB) % 8;\n var d;\n var k = 0;\n if (i-- > 0) {\n if (p < this.DB && (d = this[i] >> p) != (this.s & this.DM) >> p) {\n r[k++] = d | (this.s << (this.DB - p));\n }\n while (i >= 0) {\n if (p < 8) {\n d = (this[i] & ((1 << p) - 1)) << (8 - p);\n d |= this[--i] >> (p += this.DB - 8);\n }\n else {\n d = (this[i] >> (p -= 8)) & 0xff;\n if (p <= 0) {\n p += this.DB;\n --i;\n }\n }\n if ((d & 0x80) != 0) {\n d |= -256;\n }\n if (k == 0 && (this.s & 0x80) != (d & 0x80)) {\n ++k;\n }\n if (k > 0 || d != this.s) {\n r[k++] = d;\n }\n }\n }\n return r;\n };\n // BigInteger.prototype.equals = bnEquals;\n BigInteger.prototype.equals = function (a) {\n return (this.compareTo(a) == 0);\n };\n // BigInteger.prototype.min = bnMin;\n BigInteger.prototype.min = function (a) {\n return (this.compareTo(a) < 0) ? this : a;\n };\n // BigInteger.prototype.max = bnMax;\n BigInteger.prototype.max = function (a) {\n return (this.compareTo(a) > 0) ? this : a;\n };\n // BigInteger.prototype.and = bnAnd;\n BigInteger.prototype.and = function (a) {\n var r = nbi();\n this.bitwiseTo(a, _util__WEBPACK_IMPORTED_MODULE_0__.op_and, r);\n return r;\n };\n // BigInteger.prototype.or = bnOr;\n BigInteger.prototype.or = function (a) {\n var r = nbi();\n this.bitwiseTo(a, _util__WEBPACK_IMPORTED_MODULE_0__.op_or, r);\n return r;\n };\n // BigInteger.prototype.xor = bnXor;\n BigInteger.prototype.xor = function (a) {\n var r = nbi();\n this.bitwiseTo(a, _util__WEBPACK_IMPORTED_MODULE_0__.op_xor, r);\n return r;\n };\n // BigInteger.prototype.andNot = bnAndNot;\n BigInteger.prototype.andNot = function (a) {\n var r = nbi();\n this.bitwiseTo(a, _util__WEBPACK_IMPORTED_MODULE_0__.op_andnot, r);\n return r;\n };\n // BigInteger.prototype.not = bnNot;\n // (public) ~this\n BigInteger.prototype.not = function () {\n var r = nbi();\n for (var i = 0; i < this.t; ++i) {\n r[i] = this.DM & ~this[i];\n }\n r.t = this.t;\n r.s = ~this.s;\n return r;\n };\n // BigInteger.prototype.shiftLeft = bnShiftLeft;\n // (public) this << n\n BigInteger.prototype.shiftLeft = function (n) {\n var r = nbi();\n if (n < 0) {\n this.rShiftTo(-n, r);\n }\n else {\n this.lShiftTo(n, r);\n }\n return r;\n };\n // BigInteger.prototype.shiftRight = bnShiftRight;\n // (public) this >> n\n BigInteger.prototype.shiftRight = function (n) {\n var r = nbi();\n if (n < 0) {\n this.lShiftTo(-n, r);\n }\n else {\n this.rShiftTo(n, r);\n }\n return r;\n };\n // BigInteger.prototype.getLowestSetBit = bnGetLowestSetBit;\n // (public) returns index of lowest 1-bit (or -1 if none)\n BigInteger.prototype.getLowestSetBit = function () {\n for (var i = 0; i < this.t; ++i) {\n if (this[i] != 0) {\n return i * this.DB + (0,_util__WEBPACK_IMPORTED_MODULE_0__.lbit)(this[i]);\n }\n }\n if (this.s < 0) {\n return this.t * this.DB;\n }\n return -1;\n };\n // BigInteger.prototype.bitCount = bnBitCount;\n // (public) return number of set bits\n BigInteger.prototype.bitCount = function () {\n var r = 0;\n var x = this.s & this.DM;\n for (var i = 0; i < this.t; ++i) {\n r += (0,_util__WEBPACK_IMPORTED_MODULE_0__.cbit)(this[i] ^ x);\n }\n return r;\n };\n // BigInteger.prototype.testBit = bnTestBit;\n // (public) true iff nth bit is set\n BigInteger.prototype.testBit = function (n) {\n var j = Math.floor(n / this.DB);\n if (j >= this.t) {\n return (this.s != 0);\n }\n return ((this[j] & (1 << (n % this.DB))) != 0);\n };\n // BigInteger.prototype.setBit = bnSetBit;\n // (public) this | (1< 1) {\n var g2 = nbi();\n z.sqrTo(g[1], g2);\n while (n <= km) {\n g[n] = nbi();\n z.mulTo(g2, g[n - 2], g[n]);\n n += 2;\n }\n }\n var j = e.t - 1;\n var w;\n var is1 = true;\n var r2 = nbi();\n var t;\n i = nbits(e[j]) - 1;\n while (j >= 0) {\n if (i >= k1) {\n w = (e[j] >> (i - k1)) & km;\n }\n else {\n w = (e[j] & ((1 << (i + 1)) - 1)) << (k1 - i);\n if (j > 0) {\n w |= e[j - 1] >> (this.DB + i - k1);\n }\n }\n n = k;\n while ((w & 1) == 0) {\n w >>= 1;\n --n;\n }\n if ((i -= n) < 0) {\n i += this.DB;\n --j;\n }\n if (is1) { // ret == 1, don't bother squaring or multiplying it\n g[w].copyTo(r);\n is1 = false;\n }\n else {\n while (n > 1) {\n z.sqrTo(r, r2);\n z.sqrTo(r2, r);\n n -= 2;\n }\n if (n > 0) {\n z.sqrTo(r, r2);\n }\n else {\n t = r;\n r = r2;\n r2 = t;\n }\n z.mulTo(r2, g[w], r);\n }\n while (j >= 0 && (e[j] & (1 << i)) == 0) {\n z.sqrTo(r, r2);\n t = r;\n r = r2;\n r2 = t;\n if (--i < 0) {\n i = this.DB - 1;\n --j;\n }\n }\n }\n return z.revert(r);\n };\n // BigInteger.prototype.modInverse = bnModInverse;\n // (public) 1/this % m (HAC 14.61)\n BigInteger.prototype.modInverse = function (m) {\n var ac = m.isEven();\n if ((this.isEven() && ac) || m.signum() == 0) {\n return BigInteger.ZERO;\n }\n var u = m.clone();\n var v = this.clone();\n var a = nbv(1);\n var b = nbv(0);\n var c = nbv(0);\n var d = nbv(1);\n while (u.signum() != 0) {\n while (u.isEven()) {\n u.rShiftTo(1, u);\n if (ac) {\n if (!a.isEven() || !b.isEven()) {\n a.addTo(this, a);\n b.subTo(m, b);\n }\n a.rShiftTo(1, a);\n }\n else if (!b.isEven()) {\n b.subTo(m, b);\n }\n b.rShiftTo(1, b);\n }\n while (v.isEven()) {\n v.rShiftTo(1, v);\n if (ac) {\n if (!c.isEven() || !d.isEven()) {\n c.addTo(this, c);\n d.subTo(m, d);\n }\n c.rShiftTo(1, c);\n }\n else if (!d.isEven()) {\n d.subTo(m, d);\n }\n d.rShiftTo(1, d);\n }\n if (u.compareTo(v) >= 0) {\n u.subTo(v, u);\n if (ac) {\n a.subTo(c, a);\n }\n b.subTo(d, b);\n }\n else {\n v.subTo(u, v);\n if (ac) {\n c.subTo(a, c);\n }\n d.subTo(b, d);\n }\n }\n if (v.compareTo(BigInteger.ONE) != 0) {\n return BigInteger.ZERO;\n }\n if (d.compareTo(m) >= 0) {\n return d.subtract(m);\n }\n if (d.signum() < 0) {\n d.addTo(m, d);\n }\n else {\n return d;\n }\n if (d.signum() < 0) {\n return d.add(m);\n }\n else {\n return d;\n }\n };\n // BigInteger.prototype.pow = bnPow;\n // (public) this^e\n BigInteger.prototype.pow = function (e) {\n return this.exp(e, new NullExp());\n };\n // BigInteger.prototype.gcd = bnGCD;\n // (public) gcd(this,a) (HAC 14.54)\n BigInteger.prototype.gcd = function (a) {\n var x = (this.s < 0) ? this.negate() : this.clone();\n var y = (a.s < 0) ? a.negate() : a.clone();\n if (x.compareTo(y) < 0) {\n var t = x;\n x = y;\n y = t;\n }\n var i = x.getLowestSetBit();\n var g = y.getLowestSetBit();\n if (g < 0) {\n return x;\n }\n if (i < g) {\n g = i;\n }\n if (g > 0) {\n x.rShiftTo(g, x);\n y.rShiftTo(g, y);\n }\n while (x.signum() > 0) {\n if ((i = x.getLowestSetBit()) > 0) {\n x.rShiftTo(i, x);\n }\n if ((i = y.getLowestSetBit()) > 0) {\n y.rShiftTo(i, y);\n }\n if (x.compareTo(y) >= 0) {\n x.subTo(y, x);\n x.rShiftTo(1, x);\n }\n else {\n y.subTo(x, y);\n y.rShiftTo(1, y);\n }\n }\n if (g > 0) {\n y.lShiftTo(g, y);\n }\n return y;\n };\n // BigInteger.prototype.isProbablePrime = bnIsProbablePrime;\n // (public) test primality with certainty >= 1-.5^t\n BigInteger.prototype.isProbablePrime = function (t) {\n var i;\n var x = this.abs();\n if (x.t == 1 && x[0] <= lowprimes[lowprimes.length - 1]) {\n for (i = 0; i < lowprimes.length; ++i) {\n if (x[0] == lowprimes[i]) {\n return true;\n }\n }\n return false;\n }\n if (x.isEven()) {\n return false;\n }\n i = 1;\n while (i < lowprimes.length) {\n var m = lowprimes[i];\n var j = i + 1;\n while (j < lowprimes.length && m < lplim) {\n m *= lowprimes[j++];\n }\n m = x.modInt(m);\n while (i < j) {\n if (m % lowprimes[i++] == 0) {\n return false;\n }\n }\n }\n return x.millerRabin(t);\n };\n //#endregion PUBLIC\n //#region PROTECTED\n // BigInteger.prototype.copyTo = bnpCopyTo;\n // (protected) copy this to r\n BigInteger.prototype.copyTo = function (r) {\n for (var i = this.t - 1; i >= 0; --i) {\n r[i] = this[i];\n }\n r.t = this.t;\n r.s = this.s;\n };\n // BigInteger.prototype.fromInt = bnpFromInt;\n // (protected) set from integer value x, -DV <= x < DV\n BigInteger.prototype.fromInt = function (x) {\n this.t = 1;\n this.s = (x < 0) ? -1 : 0;\n if (x > 0) {\n this[0] = x;\n }\n else if (x < -1) {\n this[0] = x + this.DV;\n }\n else {\n this.t = 0;\n }\n };\n // BigInteger.prototype.fromString = bnpFromString;\n // (protected) set from string and radix\n BigInteger.prototype.fromString = function (s, b) {\n var k;\n if (b == 16) {\n k = 4;\n }\n else if (b == 8) {\n k = 3;\n }\n else if (b == 256) {\n k = 8;\n /* byte array */\n }\n else if (b == 2) {\n k = 1;\n }\n else if (b == 32) {\n k = 5;\n }\n else if (b == 4) {\n k = 2;\n }\n else {\n this.fromRadix(s, b);\n return;\n }\n this.t = 0;\n this.s = 0;\n var i = s.length;\n var mi = false;\n var sh = 0;\n while (--i >= 0) {\n var x = (k == 8) ? (+s[i]) & 0xff : intAt(s, i);\n if (x < 0) {\n if (s.charAt(i) == \"-\") {\n mi = true;\n }\n continue;\n }\n mi = false;\n if (sh == 0) {\n this[this.t++] = x;\n }\n else if (sh + k > this.DB) {\n this[this.t - 1] |= (x & ((1 << (this.DB - sh)) - 1)) << sh;\n this[this.t++] = (x >> (this.DB - sh));\n }\n else {\n this[this.t - 1] |= x << sh;\n }\n sh += k;\n if (sh >= this.DB) {\n sh -= this.DB;\n }\n }\n if (k == 8 && ((+s[0]) & 0x80) != 0) {\n this.s = -1;\n if (sh > 0) {\n this[this.t - 1] |= ((1 << (this.DB - sh)) - 1) << sh;\n }\n }\n this.clamp();\n if (mi) {\n BigInteger.ZERO.subTo(this, this);\n }\n };\n // BigInteger.prototype.clamp = bnpClamp;\n // (protected) clamp off excess high words\n BigInteger.prototype.clamp = function () {\n var c = this.s & this.DM;\n while (this.t > 0 && this[this.t - 1] == c) {\n --this.t;\n }\n };\n // BigInteger.prototype.dlShiftTo = bnpDLShiftTo;\n // (protected) r = this << n*DB\n BigInteger.prototype.dlShiftTo = function (n, r) {\n var i;\n for (i = this.t - 1; i >= 0; --i) {\n r[i + n] = this[i];\n }\n for (i = n - 1; i >= 0; --i) {\n r[i] = 0;\n }\n r.t = this.t + n;\n r.s = this.s;\n };\n // BigInteger.prototype.drShiftTo = bnpDRShiftTo;\n // (protected) r = this >> n*DB\n BigInteger.prototype.drShiftTo = function (n, r) {\n for (var i = n; i < this.t; ++i) {\n r[i - n] = this[i];\n }\n r.t = Math.max(this.t - n, 0);\n r.s = this.s;\n };\n // BigInteger.prototype.lShiftTo = bnpLShiftTo;\n // (protected) r = this << n\n BigInteger.prototype.lShiftTo = function (n, r) {\n var bs = n % this.DB;\n var cbs = this.DB - bs;\n var bm = (1 << cbs) - 1;\n var ds = Math.floor(n / this.DB);\n var c = (this.s << bs) & this.DM;\n for (var i = this.t - 1; i >= 0; --i) {\n r[i + ds + 1] = (this[i] >> cbs) | c;\n c = (this[i] & bm) << bs;\n }\n for (var i = ds - 1; i >= 0; --i) {\n r[i] = 0;\n }\n r[ds] = c;\n r.t = this.t + ds + 1;\n r.s = this.s;\n r.clamp();\n };\n // BigInteger.prototype.rShiftTo = bnpRShiftTo;\n // (protected) r = this >> n\n BigInteger.prototype.rShiftTo = function (n, r) {\n r.s = this.s;\n var ds = Math.floor(n / this.DB);\n if (ds >= this.t) {\n r.t = 0;\n return;\n }\n var bs = n % this.DB;\n var cbs = this.DB - bs;\n var bm = (1 << bs) - 1;\n r[0] = this[ds] >> bs;\n for (var i = ds + 1; i < this.t; ++i) {\n r[i - ds - 1] |= (this[i] & bm) << cbs;\n r[i - ds] = this[i] >> bs;\n }\n if (bs > 0) {\n r[this.t - ds - 1] |= (this.s & bm) << cbs;\n }\n r.t = this.t - ds;\n r.clamp();\n };\n // BigInteger.prototype.subTo = bnpSubTo;\n // (protected) r = this - a\n BigInteger.prototype.subTo = function (a, r) {\n var i = 0;\n var c = 0;\n var m = Math.min(a.t, this.t);\n while (i < m) {\n c += this[i] - a[i];\n r[i++] = c & this.DM;\n c >>= this.DB;\n }\n if (a.t < this.t) {\n c -= a.s;\n while (i < this.t) {\n c += this[i];\n r[i++] = c & this.DM;\n c >>= this.DB;\n }\n c += this.s;\n }\n else {\n c += this.s;\n while (i < a.t) {\n c -= a[i];\n r[i++] = c & this.DM;\n c >>= this.DB;\n }\n c -= a.s;\n }\n r.s = (c < 0) ? -1 : 0;\n if (c < -1) {\n r[i++] = this.DV + c;\n }\n else if (c > 0) {\n r[i++] = c;\n }\n r.t = i;\n r.clamp();\n };\n // BigInteger.prototype.multiplyTo = bnpMultiplyTo;\n // (protected) r = this * a, r != this,a (HAC 14.12)\n // \"this\" should be the larger one if appropriate.\n BigInteger.prototype.multiplyTo = function (a, r) {\n var x = this.abs();\n var y = a.abs();\n var i = x.t;\n r.t = i + y.t;\n while (--i >= 0) {\n r[i] = 0;\n }\n for (i = 0; i < y.t; ++i) {\n r[i + x.t] = x.am(0, y[i], r, i, 0, x.t);\n }\n r.s = 0;\n r.clamp();\n if (this.s != a.s) {\n BigInteger.ZERO.subTo(r, r);\n }\n };\n // BigInteger.prototype.squareTo = bnpSquareTo;\n // (protected) r = this^2, r != this (HAC 14.16)\n BigInteger.prototype.squareTo = function (r) {\n var x = this.abs();\n var i = r.t = 2 * x.t;\n while (--i >= 0) {\n r[i] = 0;\n }\n for (i = 0; i < x.t - 1; ++i) {\n var c = x.am(i, x[i], r, 2 * i, 0, 1);\n if ((r[i + x.t] += x.am(i + 1, 2 * x[i], r, 2 * i + 1, c, x.t - i - 1)) >= x.DV) {\n r[i + x.t] -= x.DV;\n r[i + x.t + 1] = 1;\n }\n }\n if (r.t > 0) {\n r[r.t - 1] += x.am(i, x[i], r, 2 * i, 0, 1);\n }\n r.s = 0;\n r.clamp();\n };\n // BigInteger.prototype.divRemTo = bnpDivRemTo;\n // (protected) divide this by m, quotient and remainder to q, r (HAC 14.20)\n // r != q, this != m. q or r may be null.\n BigInteger.prototype.divRemTo = function (m, q, r) {\n var pm = m.abs();\n if (pm.t <= 0) {\n return;\n }\n var pt = this.abs();\n if (pt.t < pm.t) {\n if (q != null) {\n q.fromInt(0);\n }\n if (r != null) {\n this.copyTo(r);\n }\n return;\n }\n if (r == null) {\n r = nbi();\n }\n var y = nbi();\n var ts = this.s;\n var ms = m.s;\n var nsh = this.DB - nbits(pm[pm.t - 1]); // normalize modulus\n if (nsh > 0) {\n pm.lShiftTo(nsh, y);\n pt.lShiftTo(nsh, r);\n }\n else {\n pm.copyTo(y);\n pt.copyTo(r);\n }\n var ys = y.t;\n var y0 = y[ys - 1];\n if (y0 == 0) {\n return;\n }\n var yt = y0 * (1 << this.F1) + ((ys > 1) ? y[ys - 2] >> this.F2 : 0);\n var d1 = this.FV / yt;\n var d2 = (1 << this.F1) / yt;\n var e = 1 << this.F2;\n var i = r.t;\n var j = i - ys;\n var t = (q == null) ? nbi() : q;\n y.dlShiftTo(j, t);\n if (r.compareTo(t) >= 0) {\n r[r.t++] = 1;\n r.subTo(t, r);\n }\n BigInteger.ONE.dlShiftTo(ys, t);\n t.subTo(y, y); // \"negative\" y so we can replace sub with am later\n while (y.t < ys) {\n y[y.t++] = 0;\n }\n while (--j >= 0) {\n // Estimate quotient digit\n var qd = (r[--i] == y0) ? this.DM : Math.floor(r[i] * d1 + (r[i - 1] + e) * d2);\n if ((r[i] += y.am(0, qd, r, j, 0, ys)) < qd) { // Try it out\n y.dlShiftTo(j, t);\n r.subTo(t, r);\n while (r[i] < --qd) {\n r.subTo(t, r);\n }\n }\n }\n if (q != null) {\n r.drShiftTo(ys, q);\n if (ts != ms) {\n BigInteger.ZERO.subTo(q, q);\n }\n }\n r.t = ys;\n r.clamp();\n if (nsh > 0) {\n r.rShiftTo(nsh, r);\n } // Denormalize remainder\n if (ts < 0) {\n BigInteger.ZERO.subTo(r, r);\n }\n };\n // BigInteger.prototype.invDigit = bnpInvDigit;\n // (protected) return \"-1/this % 2^DB\"; useful for Mont. reduction\n // justification:\n // xy == 1 (mod m)\n // xy = 1+km\n // xy(2-xy) = (1+km)(1-km)\n // x[y(2-xy)] = 1-k^2m^2\n // x[y(2-xy)] == 1 (mod m^2)\n // if y is 1/x mod m, then y(2-xy) is 1/x mod m^2\n // should reduce x and y(2-xy) by m^2 at each step to keep size bounded.\n // JS multiply \"overflows\" differently from C/C++, so care is needed here.\n BigInteger.prototype.invDigit = function () {\n if (this.t < 1) {\n return 0;\n }\n var x = this[0];\n if ((x & 1) == 0) {\n return 0;\n }\n var y = x & 3; // y == 1/x mod 2^2\n y = (y * (2 - (x & 0xf) * y)) & 0xf; // y == 1/x mod 2^4\n y = (y * (2 - (x & 0xff) * y)) & 0xff; // y == 1/x mod 2^8\n y = (y * (2 - (((x & 0xffff) * y) & 0xffff))) & 0xffff; // y == 1/x mod 2^16\n // last step - calculate inverse mod DV directly;\n // assumes 16 < DB <= 32 and assumes ability to handle 48-bit ints\n y = (y * (2 - x * y % this.DV)) % this.DV; // y == 1/x mod 2^dbits\n // we really want the negative inverse, and -DV < y < DV\n return (y > 0) ? this.DV - y : -y;\n };\n // BigInteger.prototype.isEven = bnpIsEven;\n // (protected) true iff this is even\n BigInteger.prototype.isEven = function () {\n return ((this.t > 0) ? (this[0] & 1) : this.s) == 0;\n };\n // BigInteger.prototype.exp = bnpExp;\n // (protected) this^e, e < 2^32, doing sqr and mul with \"r\" (HAC 14.79)\n BigInteger.prototype.exp = function (e, z) {\n if (e > 0xffffffff || e < 1) {\n return BigInteger.ONE;\n }\n var r = nbi();\n var r2 = nbi();\n var g = z.convert(this);\n var i = nbits(e) - 1;\n g.copyTo(r);\n while (--i >= 0) {\n z.sqrTo(r, r2);\n if ((e & (1 << i)) > 0) {\n z.mulTo(r2, g, r);\n }\n else {\n var t = r;\n r = r2;\n r2 = t;\n }\n }\n return z.revert(r);\n };\n // BigInteger.prototype.chunkSize = bnpChunkSize;\n // (protected) return x s.t. r^x < DV\n BigInteger.prototype.chunkSize = function (r) {\n return Math.floor(Math.LN2 * this.DB / Math.log(r));\n };\n // BigInteger.prototype.toRadix = bnpToRadix;\n // (protected) convert to radix string\n BigInteger.prototype.toRadix = function (b) {\n if (b == null) {\n b = 10;\n }\n if (this.signum() == 0 || b < 2 || b > 36) {\n return \"0\";\n }\n var cs = this.chunkSize(b);\n var a = Math.pow(b, cs);\n var d = nbv(a);\n var y = nbi();\n var z = nbi();\n var r = \"\";\n this.divRemTo(d, y, z);\n while (y.signum() > 0) {\n r = (a + z.intValue()).toString(b).substr(1) + r;\n y.divRemTo(d, y, z);\n }\n return z.intValue().toString(b) + r;\n };\n // BigInteger.prototype.fromRadix = bnpFromRadix;\n // (protected) convert from radix string\n BigInteger.prototype.fromRadix = function (s, b) {\n this.fromInt(0);\n if (b == null) {\n b = 10;\n }\n var cs = this.chunkSize(b);\n var d = Math.pow(b, cs);\n var mi = false;\n var j = 0;\n var w = 0;\n for (var i = 0; i < s.length; ++i) {\n var x = intAt(s, i);\n if (x < 0) {\n if (s.charAt(i) == \"-\" && this.signum() == 0) {\n mi = true;\n }\n continue;\n }\n w = b * w + x;\n if (++j >= cs) {\n this.dMultiply(d);\n this.dAddOffset(w, 0);\n j = 0;\n w = 0;\n }\n }\n if (j > 0) {\n this.dMultiply(Math.pow(b, j));\n this.dAddOffset(w, 0);\n }\n if (mi) {\n BigInteger.ZERO.subTo(this, this);\n }\n };\n // BigInteger.prototype.fromNumber = bnpFromNumber;\n // (protected) alternate constructor\n BigInteger.prototype.fromNumber = function (a, b, c) {\n if (\"number\" == typeof b) {\n // new BigInteger(int,int,RNG)\n if (a < 2) {\n this.fromInt(1);\n }\n else {\n this.fromNumber(a, c);\n if (!this.testBit(a - 1)) {\n // force MSB set\n this.bitwiseTo(BigInteger.ONE.shiftLeft(a - 1), _util__WEBPACK_IMPORTED_MODULE_0__.op_or, this);\n }\n if (this.isEven()) {\n this.dAddOffset(1, 0);\n } // force odd\n while (!this.isProbablePrime(b)) {\n this.dAddOffset(2, 0);\n if (this.bitLength() > a) {\n this.subTo(BigInteger.ONE.shiftLeft(a - 1), this);\n }\n }\n }\n }\n else {\n // new BigInteger(int,RNG)\n var x = [];\n var t = a & 7;\n x.length = (a >> 3) + 1;\n b.nextBytes(x);\n if (t > 0) {\n x[0] &= ((1 << t) - 1);\n }\n else {\n x[0] = 0;\n }\n this.fromString(x, 256);\n }\n };\n // BigInteger.prototype.bitwiseTo = bnpBitwiseTo;\n // (protected) r = this op a (bitwise)\n BigInteger.prototype.bitwiseTo = function (a, op, r) {\n var i;\n var f;\n var m = Math.min(a.t, this.t);\n for (i = 0; i < m; ++i) {\n r[i] = op(this[i], a[i]);\n }\n if (a.t < this.t) {\n f = a.s & this.DM;\n for (i = m; i < this.t; ++i) {\n r[i] = op(this[i], f);\n }\n r.t = this.t;\n }\n else {\n f = this.s & this.DM;\n for (i = m; i < a.t; ++i) {\n r[i] = op(f, a[i]);\n }\n r.t = a.t;\n }\n r.s = op(this.s, a.s);\n r.clamp();\n };\n // BigInteger.prototype.changeBit = bnpChangeBit;\n // (protected) this op (1<>= this.DB;\n }\n if (a.t < this.t) {\n c += a.s;\n while (i < this.t) {\n c += this[i];\n r[i++] = c & this.DM;\n c >>= this.DB;\n }\n c += this.s;\n }\n else {\n c += this.s;\n while (i < a.t) {\n c += a[i];\n r[i++] = c & this.DM;\n c >>= this.DB;\n }\n c += a.s;\n }\n r.s = (c < 0) ? -1 : 0;\n if (c > 0) {\n r[i++] = c;\n }\n else if (c < -1) {\n r[i++] = this.DV + c;\n }\n r.t = i;\n r.clamp();\n };\n // BigInteger.prototype.dMultiply = bnpDMultiply;\n // (protected) this *= n, this >= 0, 1 < n < DV\n BigInteger.prototype.dMultiply = function (n) {\n this[this.t] = this.am(0, n - 1, this, 0, 0, this.t);\n ++this.t;\n this.clamp();\n };\n // BigInteger.prototype.dAddOffset = bnpDAddOffset;\n // (protected) this += n << w words, this >= 0\n BigInteger.prototype.dAddOffset = function (n, w) {\n if (n == 0) {\n return;\n }\n while (this.t <= w) {\n this[this.t++] = 0;\n }\n this[w] += n;\n while (this[w] >= this.DV) {\n this[w] -= this.DV;\n if (++w >= this.t) {\n this[this.t++] = 0;\n }\n ++this[w];\n }\n };\n // BigInteger.prototype.multiplyLowerTo = bnpMultiplyLowerTo;\n // (protected) r = lower n words of \"this * a\", a.t <= n\n // \"this\" should be the larger one if appropriate.\n BigInteger.prototype.multiplyLowerTo = function (a, n, r) {\n var i = Math.min(this.t + a.t, n);\n r.s = 0; // assumes a,this >= 0\n r.t = i;\n while (i > 0) {\n r[--i] = 0;\n }\n for (var j = r.t - this.t; i < j; ++i) {\n r[i + this.t] = this.am(0, a[i], r, i, 0, this.t);\n }\n for (var j = Math.min(a.t, n); i < j; ++i) {\n this.am(0, a[i], r, i, 0, n - i);\n }\n r.clamp();\n };\n // BigInteger.prototype.multiplyUpperTo = bnpMultiplyUpperTo;\n // (protected) r = \"this * a\" without lower n words, n > 0\n // \"this\" should be the larger one if appropriate.\n BigInteger.prototype.multiplyUpperTo = function (a, n, r) {\n --n;\n var i = r.t = this.t + a.t - n;\n r.s = 0; // assumes a,this >= 0\n while (--i >= 0) {\n r[i] = 0;\n }\n for (i = Math.max(n - this.t, 0); i < a.t; ++i) {\n r[this.t + i - n] = this.am(n - i, a[i], r, 0, 0, this.t + i - n);\n }\n r.clamp();\n r.drShiftTo(1, r);\n };\n // BigInteger.prototype.modInt = bnpModInt;\n // (protected) this % n, n < 2^26\n BigInteger.prototype.modInt = function (n) {\n if (n <= 0) {\n return 0;\n }\n var d = this.DV % n;\n var r = (this.s < 0) ? n - 1 : 0;\n if (this.t > 0) {\n if (d == 0) {\n r = this[0] % n;\n }\n else {\n for (var i = this.t - 1; i >= 0; --i) {\n r = (d * r + this[i]) % n;\n }\n }\n }\n return r;\n };\n // BigInteger.prototype.millerRabin = bnpMillerRabin;\n // (protected) true if probably prime (HAC 4.24, Miller-Rabin)\n BigInteger.prototype.millerRabin = function (t) {\n var n1 = this.subtract(BigInteger.ONE);\n var k = n1.getLowestSetBit();\n if (k <= 0) {\n return false;\n }\n var r = n1.shiftRight(k);\n t = (t + 1) >> 1;\n if (t > lowprimes.length) {\n t = lowprimes.length;\n }\n var a = nbi();\n for (var i = 0; i < t; ++i) {\n // Pick bases at random, instead of starting at 2\n a.fromInt(lowprimes[Math.floor(Math.random() * lowprimes.length)]);\n var y = a.modPow(r, this);\n if (y.compareTo(BigInteger.ONE) != 0 && y.compareTo(n1) != 0) {\n var j = 1;\n while (j++ < k && y.compareTo(n1) != 0) {\n y = y.modPowInt(2, this);\n if (y.compareTo(BigInteger.ONE) == 0) {\n return false;\n }\n }\n if (y.compareTo(n1) != 0) {\n return false;\n }\n }\n }\n return true;\n };\n // BigInteger.prototype.square = bnSquare;\n // (public) this^2\n BigInteger.prototype.square = function () {\n var r = nbi();\n this.squareTo(r);\n return r;\n };\n //#region ASYNC\n // Public API method\n BigInteger.prototype.gcda = function (a, callback) {\n var x = (this.s < 0) ? this.negate() : this.clone();\n var y = (a.s < 0) ? a.negate() : a.clone();\n if (x.compareTo(y) < 0) {\n var t = x;\n x = y;\n y = t;\n }\n var i = x.getLowestSetBit();\n var g = y.getLowestSetBit();\n if (g < 0) {\n callback(x);\n return;\n }\n if (i < g) {\n g = i;\n }\n if (g > 0) {\n x.rShiftTo(g, x);\n y.rShiftTo(g, y);\n }\n // Workhorse of the algorithm, gets called 200 - 800 times per 512 bit keygen.\n var gcda1 = function () {\n if ((i = x.getLowestSetBit()) > 0) {\n x.rShiftTo(i, x);\n }\n if ((i = y.getLowestSetBit()) > 0) {\n y.rShiftTo(i, y);\n }\n if (x.compareTo(y) >= 0) {\n x.subTo(y, x);\n x.rShiftTo(1, x);\n }\n else {\n y.subTo(x, y);\n y.rShiftTo(1, y);\n }\n if (!(x.signum() > 0)) {\n if (g > 0) {\n y.lShiftTo(g, y);\n }\n setTimeout(function () { callback(y); }, 0); // escape\n }\n else {\n setTimeout(gcda1, 0);\n }\n };\n setTimeout(gcda1, 10);\n };\n // (protected) alternate constructor\n BigInteger.prototype.fromNumberAsync = function (a, b, c, callback) {\n if (\"number\" == typeof b) {\n if (a < 2) {\n this.fromInt(1);\n }\n else {\n this.fromNumber(a, c);\n if (!this.testBit(a - 1)) {\n this.bitwiseTo(BigInteger.ONE.shiftLeft(a - 1), _util__WEBPACK_IMPORTED_MODULE_0__.op_or, this);\n }\n if (this.isEven()) {\n this.dAddOffset(1, 0);\n }\n var bnp_1 = this;\n var bnpfn1_1 = function () {\n bnp_1.dAddOffset(2, 0);\n if (bnp_1.bitLength() > a) {\n bnp_1.subTo(BigInteger.ONE.shiftLeft(a - 1), bnp_1);\n }\n if (bnp_1.isProbablePrime(b)) {\n setTimeout(function () { callback(); }, 0); // escape\n }\n else {\n setTimeout(bnpfn1_1, 0);\n }\n };\n setTimeout(bnpfn1_1, 0);\n }\n }\n else {\n var x = [];\n var t = a & 7;\n x.length = (a >> 3) + 1;\n b.nextBytes(x);\n if (t > 0) {\n x[0] &= ((1 << t) - 1);\n }\n else {\n x[0] = 0;\n }\n this.fromString(x, 256);\n }\n };\n return BigInteger;\n}());\n\n//#region REDUCERS\n//#region NullExp\nvar NullExp = /** @class */ (function () {\n function NullExp() {\n }\n // NullExp.prototype.convert = nNop;\n NullExp.prototype.convert = function (x) {\n return x;\n };\n // NullExp.prototype.revert = nNop;\n NullExp.prototype.revert = function (x) {\n return x;\n };\n // NullExp.prototype.mulTo = nMulTo;\n NullExp.prototype.mulTo = function (x, y, r) {\n x.multiplyTo(y, r);\n };\n // NullExp.prototype.sqrTo = nSqrTo;\n NullExp.prototype.sqrTo = function (x, r) {\n x.squareTo(r);\n };\n return NullExp;\n}());\n// Modular reduction using \"classic\" algorithm\nvar Classic = /** @class */ (function () {\n function Classic(m) {\n this.m = m;\n }\n // Classic.prototype.convert = cConvert;\n Classic.prototype.convert = function (x) {\n if (x.s < 0 || x.compareTo(this.m) >= 0) {\n return x.mod(this.m);\n }\n else {\n return x;\n }\n };\n // Classic.prototype.revert = cRevert;\n Classic.prototype.revert = function (x) {\n return x;\n };\n // Classic.prototype.reduce = cReduce;\n Classic.prototype.reduce = function (x) {\n x.divRemTo(this.m, null, x);\n };\n // Classic.prototype.mulTo = cMulTo;\n Classic.prototype.mulTo = function (x, y, r) {\n x.multiplyTo(y, r);\n this.reduce(r);\n };\n // Classic.prototype.sqrTo = cSqrTo;\n Classic.prototype.sqrTo = function (x, r) {\n x.squareTo(r);\n this.reduce(r);\n };\n return Classic;\n}());\n//#endregion\n//#region Montgomery\n// Montgomery reduction\nvar Montgomery = /** @class */ (function () {\n function Montgomery(m) {\n this.m = m;\n this.mp = m.invDigit();\n this.mpl = this.mp & 0x7fff;\n this.mph = this.mp >> 15;\n this.um = (1 << (m.DB - 15)) - 1;\n this.mt2 = 2 * m.t;\n }\n // Montgomery.prototype.convert = montConvert;\n // xR mod m\n Montgomery.prototype.convert = function (x) {\n var r = nbi();\n x.abs().dlShiftTo(this.m.t, r);\n r.divRemTo(this.m, null, r);\n if (x.s < 0 && r.compareTo(BigInteger.ZERO) > 0) {\n this.m.subTo(r, r);\n }\n return r;\n };\n // Montgomery.prototype.revert = montRevert;\n // x/R mod m\n Montgomery.prototype.revert = function (x) {\n var r = nbi();\n x.copyTo(r);\n this.reduce(r);\n return r;\n };\n // Montgomery.prototype.reduce = montReduce;\n // x = x/R mod m (HAC 14.32)\n Montgomery.prototype.reduce = function (x) {\n while (x.t <= this.mt2) {\n // pad x so am has enough room later\n x[x.t++] = 0;\n }\n for (var i = 0; i < this.m.t; ++i) {\n // faster way of calculating u0 = x[i]*mp mod DV\n var j = x[i] & 0x7fff;\n var u0 = (j * this.mpl + (((j * this.mph + (x[i] >> 15) * this.mpl) & this.um) << 15)) & x.DM;\n // use am to combine the multiply-shift-add into one call\n j = i + this.m.t;\n x[j] += this.m.am(0, u0, x, i, 0, this.m.t);\n // propagate carry\n while (x[j] >= x.DV) {\n x[j] -= x.DV;\n x[++j]++;\n }\n }\n x.clamp();\n x.drShiftTo(this.m.t, x);\n if (x.compareTo(this.m) >= 0) {\n x.subTo(this.m, x);\n }\n };\n // Montgomery.prototype.mulTo = montMulTo;\n // r = \"xy/R mod m\"; x,y != r\n Montgomery.prototype.mulTo = function (x, y, r) {\n x.multiplyTo(y, r);\n this.reduce(r);\n };\n // Montgomery.prototype.sqrTo = montSqrTo;\n // r = \"x^2/R mod m\"; x != r\n Montgomery.prototype.sqrTo = function (x, r) {\n x.squareTo(r);\n this.reduce(r);\n };\n return Montgomery;\n}());\n//#endregion Montgomery\n//#region Barrett\n// Barrett modular reduction\nvar Barrett = /** @class */ (function () {\n function Barrett(m) {\n this.m = m;\n // setup Barrett\n this.r2 = nbi();\n this.q3 = nbi();\n BigInteger.ONE.dlShiftTo(2 * m.t, this.r2);\n this.mu = this.r2.divide(m);\n }\n // Barrett.prototype.convert = barrettConvert;\n Barrett.prototype.convert = function (x) {\n if (x.s < 0 || x.t > 2 * this.m.t) {\n return x.mod(this.m);\n }\n else if (x.compareTo(this.m) < 0) {\n return x;\n }\n else {\n var r = nbi();\n x.copyTo(r);\n this.reduce(r);\n return r;\n }\n };\n // Barrett.prototype.revert = barrettRevert;\n Barrett.prototype.revert = function (x) {\n return x;\n };\n // Barrett.prototype.reduce = barrettReduce;\n // x = x mod m (HAC 14.42)\n Barrett.prototype.reduce = function (x) {\n x.drShiftTo(this.m.t - 1, this.r2);\n if (x.t > this.m.t + 1) {\n x.t = this.m.t + 1;\n x.clamp();\n }\n this.mu.multiplyUpperTo(this.r2, this.m.t + 1, this.q3);\n this.m.multiplyLowerTo(this.q3, this.m.t + 1, this.r2);\n while (x.compareTo(this.r2) < 0) {\n x.dAddOffset(1, this.m.t + 1);\n }\n x.subTo(this.r2, x);\n while (x.compareTo(this.m) >= 0) {\n x.subTo(this.m, x);\n }\n };\n // Barrett.prototype.mulTo = barrettMulTo;\n // r = x*y mod m; x,y != r\n Barrett.prototype.mulTo = function (x, y, r) {\n x.multiplyTo(y, r);\n this.reduce(r);\n };\n // Barrett.prototype.sqrTo = barrettSqrTo;\n // r = x^2 mod m; x != r\n Barrett.prototype.sqrTo = function (x, r) {\n x.squareTo(r);\n this.reduce(r);\n };\n return Barrett;\n}());\n//#endregion\n//#endregion REDUCERS\n// return new, unset BigInteger\nfunction nbi() { return new BigInteger(null); }\nfunction parseBigInt(str, r) {\n return new BigInteger(str, r);\n}\n// am: Compute w_j += (x*this_i), propagate carries,\n// c is initial carry, returns final carry.\n// c < 3*dvalue, x < 2*dvalue, this_i < dvalue\n// We need to select the fastest one that works in this environment.\nvar inBrowser = typeof navigator !== \"undefined\";\nif (inBrowser && j_lm && (navigator.appName == \"Microsoft Internet Explorer\")) {\n // am2 avoids a big mult-and-extract completely.\n // Max digit bits should be <= 30 because we do bitwise ops\n // on values up to 2*hdvalue^2-hdvalue-1 (< 2^31)\n BigInteger.prototype.am = function am2(i, x, w, j, c, n) {\n var xl = x & 0x7fff;\n var xh = x >> 15;\n while (--n >= 0) {\n var l = this[i] & 0x7fff;\n var h = this[i++] >> 15;\n var m = xh * l + h * xl;\n l = xl * l + ((m & 0x7fff) << 15) + w[j] + (c & 0x3fffffff);\n c = (l >>> 30) + (m >>> 15) + xh * h + (c >>> 30);\n w[j++] = l & 0x3fffffff;\n }\n return c;\n };\n dbits = 30;\n}\nelse if (inBrowser && j_lm && (navigator.appName != \"Netscape\")) {\n // am1: use a single mult and divide to get the high bits,\n // max digit bits should be 26 because\n // max internal value = 2*dvalue^2-2*dvalue (< 2^53)\n BigInteger.prototype.am = function am1(i, x, w, j, c, n) {\n while (--n >= 0) {\n var v = x * this[i++] + w[j] + c;\n c = Math.floor(v / 0x4000000);\n w[j++] = v & 0x3ffffff;\n }\n return c;\n };\n dbits = 26;\n}\nelse { // Mozilla/Netscape seems to prefer am3\n // Alternately, set max digit bits to 28 since some\n // browsers slow down when dealing with 32-bit numbers.\n BigInteger.prototype.am = function am3(i, x, w, j, c, n) {\n var xl = x & 0x3fff;\n var xh = x >> 14;\n while (--n >= 0) {\n var l = this[i] & 0x3fff;\n var h = this[i++] >> 14;\n var m = xh * l + h * xl;\n l = xl * l + ((m & 0x3fff) << 14) + w[j] + c;\n c = (l >> 28) + (m >> 14) + xh * h;\n w[j++] = l & 0xfffffff;\n }\n return c;\n };\n dbits = 28;\n}\nBigInteger.prototype.DB = dbits;\nBigInteger.prototype.DM = ((1 << dbits) - 1);\nBigInteger.prototype.DV = (1 << dbits);\nvar BI_FP = 52;\nBigInteger.prototype.FV = Math.pow(2, BI_FP);\nBigInteger.prototype.F1 = BI_FP - dbits;\nBigInteger.prototype.F2 = 2 * dbits - BI_FP;\n// Digit conversions\nvar BI_RC = [];\nvar rr;\nvar vv;\nrr = \"0\".charCodeAt(0);\nfor (vv = 0; vv <= 9; ++vv) {\n BI_RC[rr++] = vv;\n}\nrr = \"a\".charCodeAt(0);\nfor (vv = 10; vv < 36; ++vv) {\n BI_RC[rr++] = vv;\n}\nrr = \"A\".charCodeAt(0);\nfor (vv = 10; vv < 36; ++vv) {\n BI_RC[rr++] = vv;\n}\nfunction intAt(s, i) {\n var c = BI_RC[s.charCodeAt(i)];\n return (c == null) ? -1 : c;\n}\n// return bigint initialized to value\nfunction nbv(i) {\n var r = nbi();\n r.fromInt(i);\n return r;\n}\n// returns bit length of the integer x\nfunction nbits(x) {\n var r = 1;\n var t;\n if ((t = x >>> 16) != 0) {\n x = t;\n r += 16;\n }\n if ((t = x >> 8) != 0) {\n x = t;\n r += 8;\n }\n if ((t = x >> 4) != 0) {\n x = t;\n r += 4;\n }\n if ((t = x >> 2) != 0) {\n x = t;\n r += 2;\n }\n if ((t = x >> 1) != 0) {\n x = t;\n r += 1;\n }\n return r;\n}\n// \"constants\"\nBigInteger.ZERO = nbv(0);\nBigInteger.ONE = nbv(1);\n\n\n//# sourceURL=webpack://JSEncrypt/./lib/lib/jsbn/jsbn.js?"); + + /***/ + }), + + /***/ + "./lib/lib/jsbn/prng4.js": + /*!*******************************!*\ + !*** ./lib/lib/jsbn/prng4.js ***! + \*******************************/ + /***/ + ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + + "use strict"; + eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"Arcfour\": () => (/* binding */ Arcfour),\n/* harmony export */ \"prng_newstate\": () => (/* binding */ prng_newstate),\n/* harmony export */ \"rng_psize\": () => (/* binding */ rng_psize)\n/* harmony export */ });\n// prng4.js - uses Arcfour as a PRNG\nvar Arcfour = /** @class */ (function () {\n function Arcfour() {\n this.i = 0;\n this.j = 0;\n this.S = [];\n }\n // Arcfour.prototype.init = ARC4init;\n // Initialize arcfour context from key, an array of ints, each from [0..255]\n Arcfour.prototype.init = function (key) {\n var i;\n var j;\n var t;\n for (i = 0; i < 256; ++i) {\n this.S[i] = i;\n }\n j = 0;\n for (i = 0; i < 256; ++i) {\n j = (j + this.S[i] + key[i % key.length]) & 255;\n t = this.S[i];\n this.S[i] = this.S[j];\n this.S[j] = t;\n }\n this.i = 0;\n this.j = 0;\n };\n // Arcfour.prototype.next = ARC4next;\n Arcfour.prototype.next = function () {\n var t;\n this.i = (this.i + 1) & 255;\n this.j = (this.j + this.S[this.i]) & 255;\n t = this.S[this.i];\n this.S[this.i] = this.S[this.j];\n this.S[this.j] = t;\n return this.S[(t + this.S[this.i]) & 255];\n };\n return Arcfour;\n}());\n\n// Plug in your RNG constructor here\nfunction prng_newstate() {\n return new Arcfour();\n}\n// Pool size must be a multiple of 4 and greater than 32.\n// An array of bytes the size of the pool will be passed to init()\nvar rng_psize = 256;\n\n\n//# sourceURL=webpack://JSEncrypt/./lib/lib/jsbn/prng4.js?"); + + /***/ + }), + + /***/ + "./lib/lib/jsbn/rng.js": + /*!*****************************!*\ + !*** ./lib/lib/jsbn/rng.js ***! + \*****************************/ + /***/ + ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + + "use strict"; + eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"SecureRandom\": () => (/* binding */ SecureRandom)\n/* harmony export */ });\n/* harmony import */ var _prng4__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./prng4 */ \"./lib/lib/jsbn/prng4.js\");\n// Random number generator - requires a PRNG backend, e.g. prng4.js\n\nvar rng_state;\nvar rng_pool = null;\nvar rng_pptr;\n// Initialize the pool with junk if needed.\nif (rng_pool == null) {\n rng_pool = [];\n rng_pptr = 0;\n var t = void 0;\n if (typeof window !== 'undefined' && window.crypto && window.crypto.getRandomValues) {\n // Extract entropy (2048 bits) from RNG if available\n var z = new Uint32Array(256);\n window.crypto.getRandomValues(z);\n for (t = 0; t < z.length; ++t) {\n rng_pool[rng_pptr++] = z[t] & 255;\n }\n }\n // Use mouse events for entropy, if we do not have enough entropy by the time\n // we need it, entropy will be generated by Math.random.\n var count = 0;\n var onMouseMoveListener_1 = function (ev) {\n count = count || 0;\n if (count >= 256 || rng_pptr >= _prng4__WEBPACK_IMPORTED_MODULE_0__.rng_psize) {\n if (window.removeEventListener) {\n window.removeEventListener(\"mousemove\", onMouseMoveListener_1, false);\n }\n else if (window.detachEvent) {\n window.detachEvent(\"onmousemove\", onMouseMoveListener_1);\n }\n return;\n }\n try {\n var mouseCoordinates = ev.x + ev.y;\n rng_pool[rng_pptr++] = mouseCoordinates & 255;\n count += 1;\n }\n catch (e) {\n // Sometimes Firefox will deny permission to access event properties for some reason. Ignore.\n }\n };\n if (typeof window !== 'undefined') {\n if (window.addEventListener) {\n window.addEventListener(\"mousemove\", onMouseMoveListener_1, false);\n }\n else if (window.attachEvent) {\n window.attachEvent(\"onmousemove\", onMouseMoveListener_1);\n }\n }\n}\nfunction rng_get_byte() {\n if (rng_state == null) {\n rng_state = (0,_prng4__WEBPACK_IMPORTED_MODULE_0__.prng_newstate)();\n // At this point, we may not have collected enough entropy. If not, fall back to Math.random\n while (rng_pptr < _prng4__WEBPACK_IMPORTED_MODULE_0__.rng_psize) {\n var random = Math.floor(65536 * Math.random());\n rng_pool[rng_pptr++] = random & 255;\n }\n rng_state.init(rng_pool);\n for (rng_pptr = 0; rng_pptr < rng_pool.length; ++rng_pptr) {\n rng_pool[rng_pptr] = 0;\n }\n rng_pptr = 0;\n }\n // TODO: allow reseeding after first request\n return rng_state.next();\n}\nvar SecureRandom = /** @class */ (function () {\n function SecureRandom() {\n }\n SecureRandom.prototype.nextBytes = function (ba) {\n for (var i = 0; i < ba.length; ++i) {\n ba[i] = rng_get_byte();\n }\n };\n return SecureRandom;\n}());\n\n\n\n//# sourceURL=webpack://JSEncrypt/./lib/lib/jsbn/rng.js?"); + + /***/ + }), + + /***/ + "./lib/lib/jsbn/rsa.js": + /*!*****************************!*\ + !*** ./lib/lib/jsbn/rsa.js ***! + \*****************************/ + /***/ + ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + + "use strict"; + eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"RSAKey\": () => (/* binding */ RSAKey)\n/* harmony export */ });\n/* harmony import */ var _jsbn__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./jsbn */ \"./lib/lib/jsbn/jsbn.js\");\n/* harmony import */ var _rng__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./rng */ \"./lib/lib/jsbn/rng.js\");\n// Depends on jsbn.js and rng.js\n// Version 1.1: support utf-8 encoding in pkcs1pad2\n// convert a (hex) string to a bignum object\n\n\n// function linebrk(s,n) {\n// var ret = \"\";\n// var i = 0;\n// while(i + n < s.length) {\n// ret += s.substring(i,i+n) + \"\\n\";\n// i += n;\n// }\n// return ret + s.substring(i,s.length);\n// }\n// function byte2Hex(b) {\n// if(b < 0x10)\n// return \"0\" + b.toString(16);\n// else\n// return b.toString(16);\n// }\nfunction pkcs1pad1(s, n) {\n if (n < s.length + 22) {\n console.error(\"Message too long for RSA\");\n return null;\n }\n var len = n - s.length - 6;\n var filler = \"\";\n for (var f = 0; f < len; f += 2) {\n filler += \"ff\";\n }\n var m = \"0001\" + filler + \"00\" + s;\n return (0,_jsbn__WEBPACK_IMPORTED_MODULE_0__.parseBigInt)(m, 16);\n}\n// PKCS#1 (type 2, random) pad input string s to n bytes, and return a bigint\nfunction pkcs1pad2(s, n) {\n if (n < s.length + 11) { // TODO: fix for utf-8\n console.error(\"Message too long for RSA\");\n return null;\n }\n var ba = [];\n var i = s.length - 1;\n while (i >= 0 && n > 0) {\n var c = s.charCodeAt(i--);\n if (c < 128) { // encode using utf-8\n ba[--n] = c;\n }\n else if ((c > 127) && (c < 2048)) {\n ba[--n] = (c & 63) | 128;\n ba[--n] = (c >> 6) | 192;\n }\n else {\n ba[--n] = (c & 63) | 128;\n ba[--n] = ((c >> 6) & 63) | 128;\n ba[--n] = (c >> 12) | 224;\n }\n }\n ba[--n] = 0;\n var rng = new _rng__WEBPACK_IMPORTED_MODULE_1__.SecureRandom();\n var x = [];\n while (n > 2) { // random non-zero pad\n x[0] = 0;\n while (x[0] == 0) {\n rng.nextBytes(x);\n }\n ba[--n] = x[0];\n }\n ba[--n] = 2;\n ba[--n] = 0;\n return new _jsbn__WEBPACK_IMPORTED_MODULE_0__.BigInteger(ba);\n}\n// \"empty\" RSA key constructor\nvar RSAKey = /** @class */ (function () {\n function RSAKey() {\n this.n = null;\n this.e = 0;\n this.d = null;\n this.p = null;\n this.q = null;\n this.dmp1 = null;\n this.dmq1 = null;\n this.coeff = null;\n }\n //#region PROTECTED\n // protected\n // RSAKey.prototype.doPublic = RSADoPublic;\n // Perform raw public operation on \"x\": return x^e (mod n)\n RSAKey.prototype.doPublic = function (x) {\n return x.modPowInt(this.e, this.n);\n };\n // RSAKey.prototype.doPrivate = RSADoPrivate;\n // Perform raw private operation on \"x\": return x^d (mod n)\n RSAKey.prototype.doPrivate = function (x) {\n if (this.p == null || this.q == null) {\n return x.modPow(this.d, this.n);\n }\n // TODO: re-calculate any missing CRT params\n var xp = x.mod(this.p).modPow(this.dmp1, this.p);\n var xq = x.mod(this.q).modPow(this.dmq1, this.q);\n while (xp.compareTo(xq) < 0) {\n xp = xp.add(this.p);\n }\n return xp.subtract(xq).multiply(this.coeff).mod(this.p).multiply(this.q).add(xq);\n };\n //#endregion PROTECTED\n //#region PUBLIC\n // RSAKey.prototype.setPublic = RSASetPublic;\n // Set the public key fields N and e from hex strings\n RSAKey.prototype.setPublic = function (N, E) {\n if (N != null && E != null && N.length > 0 && E.length > 0) {\n this.n = (0,_jsbn__WEBPACK_IMPORTED_MODULE_0__.parseBigInt)(N, 16);\n this.e = parseInt(E, 16);\n }\n else {\n console.error(\"Invalid RSA public key\");\n }\n };\n // RSAKey.prototype.encrypt = RSAEncrypt;\n // Return the PKCS#1 RSA encryption of \"text\" as an even-length hex string\n RSAKey.prototype.encrypt = function (text) {\n var maxLength = (this.n.bitLength() + 7) >> 3;\n var m = pkcs1pad2(text, maxLength);\n if (m == null) {\n return null;\n }\n var c = this.doPublic(m);\n if (c == null) {\n return null;\n }\n var h = c.toString(16);\n var length = h.length;\n // fix zero before result\n for (var i = 0; i < maxLength * 2 - length; i++) {\n h = \"0\" + h;\n }\n return h;\n };\n // RSAKey.prototype.setPrivate = RSASetPrivate;\n // Set the private key fields N, e, and d from hex strings\n RSAKey.prototype.setPrivate = function (N, E, D) {\n if (N != null && E != null && N.length > 0 && E.length > 0) {\n this.n = (0,_jsbn__WEBPACK_IMPORTED_MODULE_0__.parseBigInt)(N, 16);\n this.e = parseInt(E, 16);\n this.d = (0,_jsbn__WEBPACK_IMPORTED_MODULE_0__.parseBigInt)(D, 16);\n }\n else {\n console.error(\"Invalid RSA private key\");\n }\n };\n // RSAKey.prototype.setPrivateEx = RSASetPrivateEx;\n // Set the private key fields N, e, d and CRT params from hex strings\n RSAKey.prototype.setPrivateEx = function (N, E, D, P, Q, DP, DQ, C) {\n if (N != null && E != null && N.length > 0 && E.length > 0) {\n this.n = (0,_jsbn__WEBPACK_IMPORTED_MODULE_0__.parseBigInt)(N, 16);\n this.e = parseInt(E, 16);\n this.d = (0,_jsbn__WEBPACK_IMPORTED_MODULE_0__.parseBigInt)(D, 16);\n this.p = (0,_jsbn__WEBPACK_IMPORTED_MODULE_0__.parseBigInt)(P, 16);\n this.q = (0,_jsbn__WEBPACK_IMPORTED_MODULE_0__.parseBigInt)(Q, 16);\n this.dmp1 = (0,_jsbn__WEBPACK_IMPORTED_MODULE_0__.parseBigInt)(DP, 16);\n this.dmq1 = (0,_jsbn__WEBPACK_IMPORTED_MODULE_0__.parseBigInt)(DQ, 16);\n this.coeff = (0,_jsbn__WEBPACK_IMPORTED_MODULE_0__.parseBigInt)(C, 16);\n }\n else {\n console.error(\"Invalid RSA private key\");\n }\n };\n // RSAKey.prototype.generate = RSAGenerate;\n // Generate a new random private key B bits long, using public expt E\n RSAKey.prototype.generate = function (B, E) {\n var rng = new _rng__WEBPACK_IMPORTED_MODULE_1__.SecureRandom();\n var qs = B >> 1;\n this.e = parseInt(E, 16);\n var ee = new _jsbn__WEBPACK_IMPORTED_MODULE_0__.BigInteger(E, 16);\n for (;;) {\n for (;;) {\n this.p = new _jsbn__WEBPACK_IMPORTED_MODULE_0__.BigInteger(B - qs, 1, rng);\n if (this.p.subtract(_jsbn__WEBPACK_IMPORTED_MODULE_0__.BigInteger.ONE).gcd(ee).compareTo(_jsbn__WEBPACK_IMPORTED_MODULE_0__.BigInteger.ONE) == 0 && this.p.isProbablePrime(10)) {\n break;\n }\n }\n for (;;) {\n this.q = new _jsbn__WEBPACK_IMPORTED_MODULE_0__.BigInteger(qs, 1, rng);\n if (this.q.subtract(_jsbn__WEBPACK_IMPORTED_MODULE_0__.BigInteger.ONE).gcd(ee).compareTo(_jsbn__WEBPACK_IMPORTED_MODULE_0__.BigInteger.ONE) == 0 && this.q.isProbablePrime(10)) {\n break;\n }\n }\n if (this.p.compareTo(this.q) <= 0) {\n var t = this.p;\n this.p = this.q;\n this.q = t;\n }\n var p1 = this.p.subtract(_jsbn__WEBPACK_IMPORTED_MODULE_0__.BigInteger.ONE);\n var q1 = this.q.subtract(_jsbn__WEBPACK_IMPORTED_MODULE_0__.BigInteger.ONE);\n var phi = p1.multiply(q1);\n if (phi.gcd(ee).compareTo(_jsbn__WEBPACK_IMPORTED_MODULE_0__.BigInteger.ONE) == 0) {\n this.n = this.p.multiply(this.q);\n this.d = ee.modInverse(phi);\n this.dmp1 = this.d.mod(p1);\n this.dmq1 = this.d.mod(q1);\n this.coeff = this.q.modInverse(this.p);\n break;\n }\n }\n };\n // RSAKey.prototype.decrypt = RSADecrypt;\n // Return the PKCS#1 RSA decryption of \"ctext\".\n // \"ctext\" is an even-length hex string and the output is a plain string.\n RSAKey.prototype.decrypt = function (ctext) {\n var c = (0,_jsbn__WEBPACK_IMPORTED_MODULE_0__.parseBigInt)(ctext, 16);\n var m = this.doPrivate(c);\n if (m == null) {\n return null;\n }\n return pkcs1unpad2(m, (this.n.bitLength() + 7) >> 3);\n };\n // Generate a new random private key B bits long, using public expt E\n RSAKey.prototype.generateAsync = function (B, E, callback) {\n var rng = new _rng__WEBPACK_IMPORTED_MODULE_1__.SecureRandom();\n var qs = B >> 1;\n this.e = parseInt(E, 16);\n var ee = new _jsbn__WEBPACK_IMPORTED_MODULE_0__.BigInteger(E, 16);\n var rsa = this;\n // These functions have non-descript names because they were originally for(;;) loops.\n // I don't know about cryptography to give them better names than loop1-4.\n var loop1 = function () {\n var loop4 = function () {\n if (rsa.p.compareTo(rsa.q) <= 0) {\n var t = rsa.p;\n rsa.p = rsa.q;\n rsa.q = t;\n }\n var p1 = rsa.p.subtract(_jsbn__WEBPACK_IMPORTED_MODULE_0__.BigInteger.ONE);\n var q1 = rsa.q.subtract(_jsbn__WEBPACK_IMPORTED_MODULE_0__.BigInteger.ONE);\n var phi = p1.multiply(q1);\n if (phi.gcd(ee).compareTo(_jsbn__WEBPACK_IMPORTED_MODULE_0__.BigInteger.ONE) == 0) {\n rsa.n = rsa.p.multiply(rsa.q);\n rsa.d = ee.modInverse(phi);\n rsa.dmp1 = rsa.d.mod(p1);\n rsa.dmq1 = rsa.d.mod(q1);\n rsa.coeff = rsa.q.modInverse(rsa.p);\n setTimeout(function () { callback(); }, 0); // escape\n }\n else {\n setTimeout(loop1, 0);\n }\n };\n var loop3 = function () {\n rsa.q = (0,_jsbn__WEBPACK_IMPORTED_MODULE_0__.nbi)();\n rsa.q.fromNumberAsync(qs, 1, rng, function () {\n rsa.q.subtract(_jsbn__WEBPACK_IMPORTED_MODULE_0__.BigInteger.ONE).gcda(ee, function (r) {\n if (r.compareTo(_jsbn__WEBPACK_IMPORTED_MODULE_0__.BigInteger.ONE) == 0 && rsa.q.isProbablePrime(10)) {\n setTimeout(loop4, 0);\n }\n else {\n setTimeout(loop3, 0);\n }\n });\n });\n };\n var loop2 = function () {\n rsa.p = (0,_jsbn__WEBPACK_IMPORTED_MODULE_0__.nbi)();\n rsa.p.fromNumberAsync(B - qs, 1, rng, function () {\n rsa.p.subtract(_jsbn__WEBPACK_IMPORTED_MODULE_0__.BigInteger.ONE).gcda(ee, function (r) {\n if (r.compareTo(_jsbn__WEBPACK_IMPORTED_MODULE_0__.BigInteger.ONE) == 0 && rsa.p.isProbablePrime(10)) {\n setTimeout(loop3, 0);\n }\n else {\n setTimeout(loop2, 0);\n }\n });\n });\n };\n setTimeout(loop2, 0);\n };\n setTimeout(loop1, 0);\n };\n RSAKey.prototype.sign = function (text, digestMethod, digestName) {\n var header = getDigestHeader(digestName);\n var digest = header + digestMethod(text).toString();\n var m = pkcs1pad1(digest, this.n.bitLength() / 4);\n if (m == null) {\n return null;\n }\n var c = this.doPrivate(m);\n if (c == null) {\n return null;\n }\n var h = c.toString(16);\n if ((h.length & 1) == 0) {\n return h;\n }\n else {\n return \"0\" + h;\n }\n };\n RSAKey.prototype.verify = function (text, signature, digestMethod) {\n var c = (0,_jsbn__WEBPACK_IMPORTED_MODULE_0__.parseBigInt)(signature, 16);\n var m = this.doPublic(c);\n if (m == null) {\n return null;\n }\n var unpadded = m.toString(16).replace(/^1f+00/, \"\");\n var digest = removeDigestHeader(unpadded);\n return digest == digestMethod(text).toString();\n };\n return RSAKey;\n}());\n\n// Undo PKCS#1 (type 2, random) padding and, if valid, return the plaintext\nfunction pkcs1unpad2(d, n) {\n var b = d.toByteArray();\n var i = 0;\n while (i < b.length && b[i] == 0) {\n ++i;\n }\n if (b.length - i != n - 1 || b[i] != 2) {\n return null;\n }\n ++i;\n while (b[i] != 0) {\n if (++i >= b.length) {\n return null;\n }\n }\n var ret = \"\";\n while (++i < b.length) {\n var c = b[i] & 255;\n if (c < 128) { // utf-8 decode\n ret += String.fromCharCode(c);\n }\n else if ((c > 191) && (c < 224)) {\n ret += String.fromCharCode(((c & 31) << 6) | (b[i + 1] & 63));\n ++i;\n }\n else {\n ret += String.fromCharCode(((c & 15) << 12) | ((b[i + 1] & 63) << 6) | (b[i + 2] & 63));\n i += 2;\n }\n }\n return ret;\n}\n// https://tools.ietf.org/html/rfc3447#page-43\nvar DIGEST_HEADERS = {\n md2: \"3020300c06082a864886f70d020205000410\",\n md5: \"3020300c06082a864886f70d020505000410\",\n sha1: \"3021300906052b0e03021a05000414\",\n sha224: \"302d300d06096086480165030402040500041c\",\n sha256: \"3031300d060960864801650304020105000420\",\n sha384: \"3041300d060960864801650304020205000430\",\n sha512: \"3051300d060960864801650304020305000440\",\n ripemd160: \"3021300906052b2403020105000414\"\n};\nfunction getDigestHeader(name) {\n return DIGEST_HEADERS[name] || \"\";\n}\nfunction removeDigestHeader(str) {\n for (var name_1 in DIGEST_HEADERS) {\n if (DIGEST_HEADERS.hasOwnProperty(name_1)) {\n var header = DIGEST_HEADERS[name_1];\n var len = header.length;\n if (str.substr(0, len) == header) {\n return str.substr(len);\n }\n }\n }\n return str;\n}\n// Return the PKCS#1 RSA encryption of \"text\" as a Base64-encoded string\n// function RSAEncryptB64(text) {\n// var h = this.encrypt(text);\n// if(h) return hex2b64(h); else return null;\n// }\n// public\n// RSAKey.prototype.encrypt_b64 = RSAEncryptB64;\n\n\n//# sourceURL=webpack://JSEncrypt/./lib/lib/jsbn/rsa.js?"); + + /***/ + }), + + /***/ + "./lib/lib/jsbn/util.js": + /*!******************************!*\ + !*** ./lib/lib/jsbn/util.js ***! + \******************************/ + /***/ + ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + + "use strict"; + eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"cbit\": () => (/* binding */ cbit),\n/* harmony export */ \"int2char\": () => (/* binding */ int2char),\n/* harmony export */ \"lbit\": () => (/* binding */ lbit),\n/* harmony export */ \"op_and\": () => (/* binding */ op_and),\n/* harmony export */ \"op_andnot\": () => (/* binding */ op_andnot),\n/* harmony export */ \"op_or\": () => (/* binding */ op_or),\n/* harmony export */ \"op_xor\": () => (/* binding */ op_xor)\n/* harmony export */ });\nvar BI_RM = \"0123456789abcdefghijklmnopqrstuvwxyz\";\nfunction int2char(n) {\n return BI_RM.charAt(n);\n}\n//#region BIT_OPERATIONS\n// (public) this & a\nfunction op_and(x, y) {\n return x & y;\n}\n// (public) this | a\nfunction op_or(x, y) {\n return x | y;\n}\n// (public) this ^ a\nfunction op_xor(x, y) {\n return x ^ y;\n}\n// (public) this & ~a\nfunction op_andnot(x, y) {\n return x & ~y;\n}\n// return index of lowest 1-bit in x, x < 2^31\nfunction lbit(x) {\n if (x == 0) {\n return -1;\n }\n var r = 0;\n if ((x & 0xffff) == 0) {\n x >>= 16;\n r += 16;\n }\n if ((x & 0xff) == 0) {\n x >>= 8;\n r += 8;\n }\n if ((x & 0xf) == 0) {\n x >>= 4;\n r += 4;\n }\n if ((x & 3) == 0) {\n x >>= 2;\n r += 2;\n }\n if ((x & 1) == 0) {\n ++r;\n }\n return r;\n}\n// return number of 1 bits in x\nfunction cbit(x) {\n var r = 0;\n while (x != 0) {\n x &= x - 1;\n ++r;\n }\n return r;\n}\n//#endregion BIT_OPERATIONS\n\n\n//# sourceURL=webpack://JSEncrypt/./lib/lib/jsbn/util.js?"); + + /***/ + }), + + /***/ + "./lib/lib/jsrsasign/asn1-1.0.js": + /*!***************************************!*\ + !*** ./lib/lib/jsrsasign/asn1-1.0.js ***! + \***************************************/ + /***/ + ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + + "use strict"; + eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"KJUR\": () => (/* binding */ KJUR)\n/* harmony export */ });\n/* harmony import */ var _jsbn_jsbn__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../jsbn/jsbn */ \"./lib/lib/jsbn/jsbn.js\");\n/* harmony import */ var _yahoo__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./yahoo */ \"./lib/lib/jsrsasign/yahoo.js\");\n/* asn1-1.0.13.js (c) 2013-2017 Kenji Urushima | kjur.github.com/jsrsasign/license\n */\n/*\n * asn1.js - ASN.1 DER encoder classes\n *\n * Copyright (c) 2013-2017 Kenji Urushima (kenji.urushima@gmail.com)\n *\n * This software is licensed under the terms of the MIT License.\n * https://kjur.github.io/jsrsasign/license\n *\n * The above copyright and license notice shall be\n * included in all copies or substantial portions of the Software.\n */\n\n\n/**\n * @fileOverview\n * @name asn1-1.0.js\n * @author Kenji Urushima kenji.urushima@gmail.com\n * @version asn1 1.0.13 (2017-Jun-02)\n * @since jsrsasign 2.1\n * @license MIT License\n */\n/**\n * kjur's class library name space\n *

\n * This name space provides following name spaces:\n *

    \n *
  • {@link KJUR.asn1} - ASN.1 primitive hexadecimal encoder
  • \n *
  • {@link KJUR.asn1.x509} - ASN.1 structure for X.509 certificate and CRL
  • \n *
  • {@link KJUR.crypto} - Java Cryptographic Extension(JCE) style MessageDigest/Signature\n * class and utilities
  • \n *
\n *

\n * NOTE: Please ignore method summary and document of this namespace. This caused by a bug of jsdoc2.\n * @name KJUR\n * @namespace kjur's class library name space\n */\nvar KJUR = {};\n/**\n * kjur's ASN.1 class library name space\n *

\n * This is ITU-T X.690 ASN.1 DER encoder class library and\n * class structure and methods is very similar to\n * org.bouncycastle.asn1 package of\n * well known BouncyCaslte Cryptography Library.\n *

PROVIDING ASN.1 PRIMITIVES

\n * Here are ASN.1 DER primitive classes.\n *
    \n *
  • 0x01 {@link KJUR.asn1.DERBoolean}
  • \n *
  • 0x02 {@link KJUR.asn1.DERInteger}
  • \n *
  • 0x03 {@link KJUR.asn1.DERBitString}
  • \n *
  • 0x04 {@link KJUR.asn1.DEROctetString}
  • \n *
  • 0x05 {@link KJUR.asn1.DERNull}
  • \n *
  • 0x06 {@link KJUR.asn1.DERObjectIdentifier}
  • \n *
  • 0x0a {@link KJUR.asn1.DEREnumerated}
  • \n *
  • 0x0c {@link KJUR.asn1.DERUTF8String}
  • \n *
  • 0x12 {@link KJUR.asn1.DERNumericString}
  • \n *
  • 0x13 {@link KJUR.asn1.DERPrintableString}
  • \n *
  • 0x14 {@link KJUR.asn1.DERTeletexString}
  • \n *
  • 0x16 {@link KJUR.asn1.DERIA5String}
  • \n *
  • 0x17 {@link KJUR.asn1.DERUTCTime}
  • \n *
  • 0x18 {@link KJUR.asn1.DERGeneralizedTime}
  • \n *
  • 0x30 {@link KJUR.asn1.DERSequence}
  • \n *
  • 0x31 {@link KJUR.asn1.DERSet}
  • \n *
\n *

OTHER ASN.1 CLASSES

\n *
    \n *
  • {@link KJUR.asn1.ASN1Object}
  • \n *
  • {@link KJUR.asn1.DERAbstractString}
  • \n *
  • {@link KJUR.asn1.DERAbstractTime}
  • \n *
  • {@link KJUR.asn1.DERAbstractStructured}
  • \n *
  • {@link KJUR.asn1.DERTaggedObject}
  • \n *
\n *

SUB NAME SPACES

\n *
    \n *
  • {@link KJUR.asn1.cades} - CAdES long term signature format
  • \n *
  • {@link KJUR.asn1.cms} - Cryptographic Message Syntax
  • \n *
  • {@link KJUR.asn1.csr} - Certificate Signing Request (CSR/PKCS#10)
  • \n *
  • {@link KJUR.asn1.tsp} - RFC 3161 Timestamping Protocol Format
  • \n *
  • {@link KJUR.asn1.x509} - RFC 5280 X.509 certificate and CRL
  • \n *
\n *

\n * NOTE: Please ignore method summary and document of this namespace.\n * This caused by a bug of jsdoc2.\n * @name KJUR.asn1\n * @namespace\n */\nif (typeof KJUR.asn1 == \"undefined\" || !KJUR.asn1)\n KJUR.asn1 = {};\n/**\n * ASN1 utilities class\n * @name KJUR.asn1.ASN1Util\n * @class ASN1 utilities class\n * @since asn1 1.0.2\n */\nKJUR.asn1.ASN1Util = new function () {\n this.integerToByteHex = function (i) {\n var h = i.toString(16);\n if ((h.length % 2) == 1)\n h = '0' + h;\n return h;\n };\n this.bigIntToMinTwosComplementsHex = function (bigIntegerValue) {\n var h = bigIntegerValue.toString(16);\n if (h.substr(0, 1) != '-') {\n if (h.length % 2 == 1) {\n h = '0' + h;\n }\n else {\n if (!h.match(/^[0-7]/)) {\n h = '00' + h;\n }\n }\n }\n else {\n var hPos = h.substr(1);\n var xorLen = hPos.length;\n if (xorLen % 2 == 1) {\n xorLen += 1;\n }\n else {\n if (!h.match(/^[0-7]/)) {\n xorLen += 2;\n }\n }\n var hMask = '';\n for (var i = 0; i < xorLen; i++) {\n hMask += 'f';\n }\n var biMask = new _jsbn_jsbn__WEBPACK_IMPORTED_MODULE_0__.BigInteger(hMask, 16);\n var biNeg = biMask.xor(bigIntegerValue).add(_jsbn_jsbn__WEBPACK_IMPORTED_MODULE_0__.BigInteger.ONE);\n h = biNeg.toString(16).replace(/^-/, '');\n }\n return h;\n };\n /**\n * get PEM string from hexadecimal data and header string\n * @name getPEMStringFromHex\n * @memberOf KJUR.asn1.ASN1Util\n * @function\n * @param {String} dataHex hexadecimal string of PEM body\n * @param {String} pemHeader PEM header string (ex. 'RSA PRIVATE KEY')\n * @return {String} PEM formatted string of input data\n * @description\n * This method converts a hexadecimal string to a PEM string with\n * a specified header. Its line break will be CRLF(\"\\r\\n\").\n * @example\n * var pem = KJUR.asn1.ASN1Util.getPEMStringFromHex('616161', 'RSA PRIVATE KEY');\n * // value of pem will be:\n * -----BEGIN PRIVATE KEY-----\n * YWFh\n * -----END PRIVATE KEY-----\n */\n this.getPEMStringFromHex = function (dataHex, pemHeader) {\n return hextopem(dataHex, pemHeader);\n };\n /**\n * generate ASN1Object specifed by JSON parameters\n * @name newObject\n * @memberOf KJUR.asn1.ASN1Util\n * @function\n * @param {Array} param JSON parameter to generate ASN1Object\n * @return {KJUR.asn1.ASN1Object} generated object\n * @since asn1 1.0.3\n * @description\n * generate any ASN1Object specified by JSON param\n * including ASN.1 primitive or structured.\n * Generally 'param' can be described as follows:\n *
\n * {TYPE-OF-ASNOBJ: ASN1OBJ-PARAMETER}\n *
\n * 'TYPE-OF-ASN1OBJ' can be one of following symbols:\n *
    \n *
  • 'bool' - DERBoolean
  • \n *
  • 'int' - DERInteger
  • \n *
  • 'bitstr' - DERBitString
  • \n *
  • 'octstr' - DEROctetString
  • \n *
  • 'null' - DERNull
  • \n *
  • 'oid' - DERObjectIdentifier
  • \n *
  • 'enum' - DEREnumerated
  • \n *
  • 'utf8str' - DERUTF8String
  • \n *
  • 'numstr' - DERNumericString
  • \n *
  • 'prnstr' - DERPrintableString
  • \n *
  • 'telstr' - DERTeletexString
  • \n *
  • 'ia5str' - DERIA5String
  • \n *
  • 'utctime' - DERUTCTime
  • \n *
  • 'gentime' - DERGeneralizedTime
  • \n *
  • 'seq' - DERSequence
  • \n *
  • 'set' - DERSet
  • \n *
  • 'tag' - DERTaggedObject
  • \n *
\n * @example\n * newObject({'prnstr': 'aaa'});\n * newObject({'seq': [{'int': 3}, {'prnstr': 'aaa'}]})\n * // ASN.1 Tagged Object\n * newObject({'tag': {'tag': 'a1',\n * 'explicit': true,\n * 'obj': {'seq': [{'int': 3}, {'prnstr': 'aaa'}]}}});\n * // more simple representation of ASN.1 Tagged Object\n * newObject({'tag': ['a1',\n * true,\n * {'seq': [\n * {'int': 3},\n * {'prnstr': 'aaa'}]}\n * ]});\n */\n this.newObject = function (param) {\n var _KJUR = KJUR, _KJUR_asn1 = _KJUR.asn1, _DERBoolean = _KJUR_asn1.DERBoolean, _DERInteger = _KJUR_asn1.DERInteger, _DERBitString = _KJUR_asn1.DERBitString, _DEROctetString = _KJUR_asn1.DEROctetString, _DERNull = _KJUR_asn1.DERNull, _DERObjectIdentifier = _KJUR_asn1.DERObjectIdentifier, _DEREnumerated = _KJUR_asn1.DEREnumerated, _DERUTF8String = _KJUR_asn1.DERUTF8String, _DERNumericString = _KJUR_asn1.DERNumericString, _DERPrintableString = _KJUR_asn1.DERPrintableString, _DERTeletexString = _KJUR_asn1.DERTeletexString, _DERIA5String = _KJUR_asn1.DERIA5String, _DERUTCTime = _KJUR_asn1.DERUTCTime, _DERGeneralizedTime = _KJUR_asn1.DERGeneralizedTime, _DERSequence = _KJUR_asn1.DERSequence, _DERSet = _KJUR_asn1.DERSet, _DERTaggedObject = _KJUR_asn1.DERTaggedObject, _newObject = _KJUR_asn1.ASN1Util.newObject;\n var keys = Object.keys(param);\n if (keys.length != 1)\n throw \"key of param shall be only one.\";\n var key = keys[0];\n if (\":bool:int:bitstr:octstr:null:oid:enum:utf8str:numstr:prnstr:telstr:ia5str:utctime:gentime:seq:set:tag:\".indexOf(\":\" + key + \":\") == -1)\n throw \"undefined key: \" + key;\n if (key == \"bool\")\n return new _DERBoolean(param[key]);\n if (key == \"int\")\n return new _DERInteger(param[key]);\n if (key == \"bitstr\")\n return new _DERBitString(param[key]);\n if (key == \"octstr\")\n return new _DEROctetString(param[key]);\n if (key == \"null\")\n return new _DERNull(param[key]);\n if (key == \"oid\")\n return new _DERObjectIdentifier(param[key]);\n if (key == \"enum\")\n return new _DEREnumerated(param[key]);\n if (key == \"utf8str\")\n return new _DERUTF8String(param[key]);\n if (key == \"numstr\")\n return new _DERNumericString(param[key]);\n if (key == \"prnstr\")\n return new _DERPrintableString(param[key]);\n if (key == \"telstr\")\n return new _DERTeletexString(param[key]);\n if (key == \"ia5str\")\n return new _DERIA5String(param[key]);\n if (key == \"utctime\")\n return new _DERUTCTime(param[key]);\n if (key == \"gentime\")\n return new _DERGeneralizedTime(param[key]);\n if (key == \"seq\") {\n var paramList = param[key];\n var a = [];\n for (var i = 0; i < paramList.length; i++) {\n var asn1Obj = _newObject(paramList[i]);\n a.push(asn1Obj);\n }\n return new _DERSequence({ 'array': a });\n }\n if (key == \"set\") {\n var paramList = param[key];\n var a = [];\n for (var i = 0; i < paramList.length; i++) {\n var asn1Obj = _newObject(paramList[i]);\n a.push(asn1Obj);\n }\n return new _DERSet({ 'array': a });\n }\n if (key == \"tag\") {\n var tagParam = param[key];\n if (Object.prototype.toString.call(tagParam) === '[object Array]' &&\n tagParam.length == 3) {\n var obj = _newObject(tagParam[2]);\n return new _DERTaggedObject({ tag: tagParam[0],\n explicit: tagParam[1],\n obj: obj });\n }\n else {\n var newParam = {};\n if (tagParam.explicit !== undefined)\n newParam.explicit = tagParam.explicit;\n if (tagParam.tag !== undefined)\n newParam.tag = tagParam.tag;\n if (tagParam.obj === undefined)\n throw \"obj shall be specified for 'tag'.\";\n newParam.obj = _newObject(tagParam.obj);\n return new _DERTaggedObject(newParam);\n }\n }\n };\n /**\n * get encoded hexadecimal string of ASN1Object specifed by JSON parameters\n * @name jsonToASN1HEX\n * @memberOf KJUR.asn1.ASN1Util\n * @function\n * @param {Array} param JSON parameter to generate ASN1Object\n * @return hexadecimal string of ASN1Object\n * @since asn1 1.0.4\n * @description\n * As for ASN.1 object representation of JSON object,\n * please see {@link newObject}.\n * @example\n * jsonToASN1HEX({'prnstr': 'aaa'});\n */\n this.jsonToASN1HEX = function (param) {\n var asn1Obj = this.newObject(param);\n return asn1Obj.getEncodedHex();\n };\n};\n/**\n * get dot noted oid number string from hexadecimal value of OID\n * @name oidHexToInt\n * @memberOf KJUR.asn1.ASN1Util\n * @function\n * @param {String} hex hexadecimal value of object identifier\n * @return {String} dot noted string of object identifier\n * @since jsrsasign 4.8.3 asn1 1.0.7\n * @description\n * This static method converts from hexadecimal string representation of\n * ASN.1 value of object identifier to oid number string.\n * @example\n * KJUR.asn1.ASN1Util.oidHexToInt('550406') → \"2.5.4.6\"\n */\nKJUR.asn1.ASN1Util.oidHexToInt = function (hex) {\n var s = \"\";\n var i01 = parseInt(hex.substr(0, 2), 16);\n var i0 = Math.floor(i01 / 40);\n var i1 = i01 % 40;\n var s = i0 + \".\" + i1;\n var binbuf = \"\";\n for (var i = 2; i < hex.length; i += 2) {\n var value = parseInt(hex.substr(i, 2), 16);\n var bin = (\"00000000\" + value.toString(2)).slice(-8);\n binbuf = binbuf + bin.substr(1, 7);\n if (bin.substr(0, 1) == \"0\") {\n var bi = new _jsbn_jsbn__WEBPACK_IMPORTED_MODULE_0__.BigInteger(binbuf, 2);\n s = s + \".\" + bi.toString(10);\n binbuf = \"\";\n }\n }\n ;\n return s;\n};\n/**\n * get hexadecimal value of object identifier from dot noted oid value\n * @name oidIntToHex\n * @memberOf KJUR.asn1.ASN1Util\n * @function\n * @param {String} oidString dot noted string of object identifier\n * @return {String} hexadecimal value of object identifier\n * @since jsrsasign 4.8.3 asn1 1.0.7\n * @description\n * This static method converts from object identifier value string.\n * to hexadecimal string representation of it.\n * @example\n * KJUR.asn1.ASN1Util.oidIntToHex(\"2.5.4.6\") → \"550406\"\n */\nKJUR.asn1.ASN1Util.oidIntToHex = function (oidString) {\n var itox = function (i) {\n var h = i.toString(16);\n if (h.length == 1)\n h = '0' + h;\n return h;\n };\n var roidtox = function (roid) {\n var h = '';\n var bi = new _jsbn_jsbn__WEBPACK_IMPORTED_MODULE_0__.BigInteger(roid, 10);\n var b = bi.toString(2);\n var padLen = 7 - b.length % 7;\n if (padLen == 7)\n padLen = 0;\n var bPad = '';\n for (var i = 0; i < padLen; i++)\n bPad += '0';\n b = bPad + b;\n for (var i = 0; i < b.length - 1; i += 7) {\n var b8 = b.substr(i, 7);\n if (i != b.length - 7)\n b8 = '1' + b8;\n h += itox(parseInt(b8, 2));\n }\n return h;\n };\n if (!oidString.match(/^[0-9.]+$/)) {\n throw \"malformed oid string: \" + oidString;\n }\n var h = '';\n var a = oidString.split('.');\n var i0 = parseInt(a[0]) * 40 + parseInt(a[1]);\n h += itox(i0);\n a.splice(0, 2);\n for (var i = 0; i < a.length; i++) {\n h += roidtox(a[i]);\n }\n return h;\n};\n// ********************************************************************\n// Abstract ASN.1 Classes\n// ********************************************************************\n// ********************************************************************\n/**\n * base class for ASN.1 DER encoder object\n * @name KJUR.asn1.ASN1Object\n * @class base class for ASN.1 DER encoder object\n * @property {Boolean} isModified flag whether internal data was changed\n * @property {String} hTLV hexadecimal string of ASN.1 TLV\n * @property {String} hT hexadecimal string of ASN.1 TLV tag(T)\n * @property {String} hL hexadecimal string of ASN.1 TLV length(L)\n * @property {String} hV hexadecimal string of ASN.1 TLV value(V)\n * @description\n */\nKJUR.asn1.ASN1Object = function () {\n var isModified = true;\n var hTLV = null;\n var hT = '00';\n var hL = '00';\n var hV = '';\n /**\n * get hexadecimal ASN.1 TLV length(L) bytes from TLV value(V)\n * @name getLengthHexFromValue\n * @memberOf KJUR.asn1.ASN1Object#\n * @function\n * @return {String} hexadecimal string of ASN.1 TLV length(L)\n */\n this.getLengthHexFromValue = function () {\n if (typeof this.hV == \"undefined\" || this.hV == null) {\n throw \"this.hV is null or undefined.\";\n }\n if (this.hV.length % 2 == 1) {\n throw \"value hex must be even length: n=\" + hV.length + \",v=\" + this.hV;\n }\n var n = this.hV.length / 2;\n var hN = n.toString(16);\n if (hN.length % 2 == 1) {\n hN = \"0\" + hN;\n }\n if (n < 128) {\n return hN;\n }\n else {\n var hNlen = hN.length / 2;\n if (hNlen > 15) {\n throw \"ASN.1 length too long to represent by 8x: n = \" + n.toString(16);\n }\n var head = 128 + hNlen;\n return head.toString(16) + hN;\n }\n };\n /**\n * get hexadecimal string of ASN.1 TLV bytes\n * @name getEncodedHex\n * @memberOf KJUR.asn1.ASN1Object#\n * @function\n * @return {String} hexadecimal string of ASN.1 TLV\n */\n this.getEncodedHex = function () {\n if (this.hTLV == null || this.isModified) {\n this.hV = this.getFreshValueHex();\n this.hL = this.getLengthHexFromValue();\n this.hTLV = this.hT + this.hL + this.hV;\n this.isModified = false;\n //alert(\"first time: \" + this.hTLV);\n }\n return this.hTLV;\n };\n /**\n * get hexadecimal string of ASN.1 TLV value(V) bytes\n * @name getValueHex\n * @memberOf KJUR.asn1.ASN1Object#\n * @function\n * @return {String} hexadecimal string of ASN.1 TLV value(V) bytes\n */\n this.getValueHex = function () {\n this.getEncodedHex();\n return this.hV;\n };\n this.getFreshValueHex = function () {\n return '';\n };\n};\n// == BEGIN DERAbstractString ================================================\n/**\n * base class for ASN.1 DER string classes\n * @name KJUR.asn1.DERAbstractString\n * @class base class for ASN.1 DER string classes\n * @param {Array} params associative array of parameters (ex. {'str': 'aaa'})\n * @property {String} s internal string of value\n * @extends KJUR.asn1.ASN1Object\n * @description\n *
\n * As for argument 'params' for constructor, you can specify one of\n * following properties:\n *
    \n *
  • str - specify initial ASN.1 value(V) by a string
  • \n *
  • hex - specify initial ASN.1 value(V) by a hexadecimal string
  • \n *
\n * NOTE: 'params' can be omitted.\n */\nKJUR.asn1.DERAbstractString = function (params) {\n KJUR.asn1.DERAbstractString.superclass.constructor.call(this);\n var s = null;\n var hV = null;\n /**\n * get string value of this string object\n * @name getString\n * @memberOf KJUR.asn1.DERAbstractString#\n * @function\n * @return {String} string value of this string object\n */\n this.getString = function () {\n return this.s;\n };\n /**\n * set value by a string\n * @name setString\n * @memberOf KJUR.asn1.DERAbstractString#\n * @function\n * @param {String} newS value by a string to set\n */\n this.setString = function (newS) {\n this.hTLV = null;\n this.isModified = true;\n this.s = newS;\n this.hV = stohex(this.s);\n };\n /**\n * set value by a hexadecimal string\n * @name setStringHex\n * @memberOf KJUR.asn1.DERAbstractString#\n * @function\n * @param {String} newHexString value by a hexadecimal string to set\n */\n this.setStringHex = function (newHexString) {\n this.hTLV = null;\n this.isModified = true;\n this.s = null;\n this.hV = newHexString;\n };\n this.getFreshValueHex = function () {\n return this.hV;\n };\n if (typeof params != \"undefined\") {\n if (typeof params == \"string\") {\n this.setString(params);\n }\n else if (typeof params['str'] != \"undefined\") {\n this.setString(params['str']);\n }\n else if (typeof params['hex'] != \"undefined\") {\n this.setStringHex(params['hex']);\n }\n }\n};\n_yahoo__WEBPACK_IMPORTED_MODULE_1__.YAHOO.lang.extend(KJUR.asn1.DERAbstractString, KJUR.asn1.ASN1Object);\n// == END DERAbstractString ================================================\n// == BEGIN DERAbstractTime ==================================================\n/**\n * base class for ASN.1 DER Generalized/UTCTime class\n * @name KJUR.asn1.DERAbstractTime\n * @class base class for ASN.1 DER Generalized/UTCTime class\n * @param {Array} params associative array of parameters (ex. {'str': '130430235959Z'})\n * @extends KJUR.asn1.ASN1Object\n * @description\n * @see KJUR.asn1.ASN1Object - superclass\n */\nKJUR.asn1.DERAbstractTime = function (params) {\n KJUR.asn1.DERAbstractTime.superclass.constructor.call(this);\n var s = null;\n var date = null;\n // --- PRIVATE METHODS --------------------\n this.localDateToUTC = function (d) {\n utc = d.getTime() + (d.getTimezoneOffset() * 60000);\n var utcDate = new Date(utc);\n return utcDate;\n };\n /*\n * format date string by Data object\n * @name formatDate\n * @memberOf KJUR.asn1.AbstractTime;\n * @param {Date} dateObject\n * @param {string} type 'utc' or 'gen'\n * @param {boolean} withMillis flag for with millisections or not\n * @description\n * 'withMillis' flag is supported from asn1 1.0.6.\n */\n this.formatDate = function (dateObject, type, withMillis) {\n var pad = this.zeroPadding;\n var d = this.localDateToUTC(dateObject);\n var year = String(d.getFullYear());\n if (type == 'utc')\n year = year.substr(2, 2);\n var month = pad(String(d.getMonth() + 1), 2);\n var day = pad(String(d.getDate()), 2);\n var hour = pad(String(d.getHours()), 2);\n var min = pad(String(d.getMinutes()), 2);\n var sec = pad(String(d.getSeconds()), 2);\n var s = year + month + day + hour + min + sec;\n if (withMillis === true) {\n var millis = d.getMilliseconds();\n if (millis != 0) {\n var sMillis = pad(String(millis), 3);\n sMillis = sMillis.replace(/[0]+$/, \"\");\n s = s + \".\" + sMillis;\n }\n }\n return s + \"Z\";\n };\n this.zeroPadding = function (s, len) {\n if (s.length >= len)\n return s;\n return new Array(len - s.length + 1).join('0') + s;\n };\n // --- PUBLIC METHODS --------------------\n /**\n * get string value of this string object\n * @name getString\n * @memberOf KJUR.asn1.DERAbstractTime#\n * @function\n * @return {String} string value of this time object\n */\n this.getString = function () {\n return this.s;\n };\n /**\n * set value by a string\n * @name setString\n * @memberOf KJUR.asn1.DERAbstractTime#\n * @function\n * @param {String} newS value by a string to set such like \"130430235959Z\"\n */\n this.setString = function (newS) {\n this.hTLV = null;\n this.isModified = true;\n this.s = newS;\n this.hV = stohex(newS);\n };\n /**\n * set value by a Date object\n * @name setByDateValue\n * @memberOf KJUR.asn1.DERAbstractTime#\n * @function\n * @param {Integer} year year of date (ex. 2013)\n * @param {Integer} month month of date between 1 and 12 (ex. 12)\n * @param {Integer} day day of month\n * @param {Integer} hour hours of date\n * @param {Integer} min minutes of date\n * @param {Integer} sec seconds of date\n */\n this.setByDateValue = function (year, month, day, hour, min, sec) {\n var dateObject = new Date(Date.UTC(year, month - 1, day, hour, min, sec, 0));\n this.setByDate(dateObject);\n };\n this.getFreshValueHex = function () {\n return this.hV;\n };\n};\n_yahoo__WEBPACK_IMPORTED_MODULE_1__.YAHOO.lang.extend(KJUR.asn1.DERAbstractTime, KJUR.asn1.ASN1Object);\n// == END DERAbstractTime ==================================================\n// == BEGIN DERAbstractStructured ============================================\n/**\n * base class for ASN.1 DER structured class\n * @name KJUR.asn1.DERAbstractStructured\n * @class base class for ASN.1 DER structured class\n * @property {Array} asn1Array internal array of ASN1Object\n * @extends KJUR.asn1.ASN1Object\n * @description\n * @see KJUR.asn1.ASN1Object - superclass\n */\nKJUR.asn1.DERAbstractStructured = function (params) {\n KJUR.asn1.DERAbstractString.superclass.constructor.call(this);\n var asn1Array = null;\n /**\n * set value by array of ASN1Object\n * @name setByASN1ObjectArray\n * @memberOf KJUR.asn1.DERAbstractStructured#\n * @function\n * @param {array} asn1ObjectArray array of ASN1Object to set\n */\n this.setByASN1ObjectArray = function (asn1ObjectArray) {\n this.hTLV = null;\n this.isModified = true;\n this.asn1Array = asn1ObjectArray;\n };\n /**\n * append an ASN1Object to internal array\n * @name appendASN1Object\n * @memberOf KJUR.asn1.DERAbstractStructured#\n * @function\n * @param {ASN1Object} asn1Object to add\n */\n this.appendASN1Object = function (asn1Object) {\n this.hTLV = null;\n this.isModified = true;\n this.asn1Array.push(asn1Object);\n };\n this.asn1Array = new Array();\n if (typeof params != \"undefined\") {\n if (typeof params['array'] != \"undefined\") {\n this.asn1Array = params['array'];\n }\n }\n};\n_yahoo__WEBPACK_IMPORTED_MODULE_1__.YAHOO.lang.extend(KJUR.asn1.DERAbstractStructured, KJUR.asn1.ASN1Object);\n// ********************************************************************\n// ASN.1 Object Classes\n// ********************************************************************\n// ********************************************************************\n/**\n * class for ASN.1 DER Boolean\n * @name KJUR.asn1.DERBoolean\n * @class class for ASN.1 DER Boolean\n * @extends KJUR.asn1.ASN1Object\n * @description\n * @see KJUR.asn1.ASN1Object - superclass\n */\nKJUR.asn1.DERBoolean = function () {\n KJUR.asn1.DERBoolean.superclass.constructor.call(this);\n this.hT = \"01\";\n this.hTLV = \"0101ff\";\n};\n_yahoo__WEBPACK_IMPORTED_MODULE_1__.YAHOO.lang.extend(KJUR.asn1.DERBoolean, KJUR.asn1.ASN1Object);\n// ********************************************************************\n/**\n * class for ASN.1 DER Integer\n * @name KJUR.asn1.DERInteger\n * @class class for ASN.1 DER Integer\n * @extends KJUR.asn1.ASN1Object\n * @description\n *
\n * As for argument 'params' for constructor, you can specify one of\n * following properties:\n *
    \n *
  • int - specify initial ASN.1 value(V) by integer value
  • \n *
  • bigint - specify initial ASN.1 value(V) by BigInteger object
  • \n *
  • hex - specify initial ASN.1 value(V) by a hexadecimal string
  • \n *
\n * NOTE: 'params' can be omitted.\n */\nKJUR.asn1.DERInteger = function (params) {\n KJUR.asn1.DERInteger.superclass.constructor.call(this);\n this.hT = \"02\";\n /**\n * set value by Tom Wu's BigInteger object\n * @name setByBigInteger\n * @memberOf KJUR.asn1.DERInteger#\n * @function\n * @param {BigInteger} bigIntegerValue to set\n */\n this.setByBigInteger = function (bigIntegerValue) {\n this.hTLV = null;\n this.isModified = true;\n this.hV = KJUR.asn1.ASN1Util.bigIntToMinTwosComplementsHex(bigIntegerValue);\n };\n /**\n * set value by integer value\n * @name setByInteger\n * @memberOf KJUR.asn1.DERInteger\n * @function\n * @param {Integer} integer value to set\n */\n this.setByInteger = function (intValue) {\n var bi = new _jsbn_jsbn__WEBPACK_IMPORTED_MODULE_0__.BigInteger(String(intValue), 10);\n this.setByBigInteger(bi);\n };\n /**\n * set value by integer value\n * @name setValueHex\n * @memberOf KJUR.asn1.DERInteger#\n * @function\n * @param {String} hexadecimal string of integer value\n * @description\n *
\n * NOTE: Value shall be represented by minimum octet length of\n * two's complement representation.\n * @example\n * new KJUR.asn1.DERInteger(123);\n * new KJUR.asn1.DERInteger({'int': 123});\n * new KJUR.asn1.DERInteger({'hex': '1fad'});\n */\n this.setValueHex = function (newHexString) {\n this.hV = newHexString;\n };\n this.getFreshValueHex = function () {\n return this.hV;\n };\n if (typeof params != \"undefined\") {\n if (typeof params['bigint'] != \"undefined\") {\n this.setByBigInteger(params['bigint']);\n }\n else if (typeof params['int'] != \"undefined\") {\n this.setByInteger(params['int']);\n }\n else if (typeof params == \"number\") {\n this.setByInteger(params);\n }\n else if (typeof params['hex'] != \"undefined\") {\n this.setValueHex(params['hex']);\n }\n }\n};\n_yahoo__WEBPACK_IMPORTED_MODULE_1__.YAHOO.lang.extend(KJUR.asn1.DERInteger, KJUR.asn1.ASN1Object);\n// ********************************************************************\n/**\n * class for ASN.1 DER encoded BitString primitive\n * @name KJUR.asn1.DERBitString\n * @class class for ASN.1 DER encoded BitString primitive\n * @extends KJUR.asn1.ASN1Object\n * @description\n *
\n * As for argument 'params' for constructor, you can specify one of\n * following properties:\n *
    \n *
  • bin - specify binary string (ex. '10111')
  • \n *
  • array - specify array of boolean (ex. [true,false,true,true])
  • \n *
  • hex - specify hexadecimal string of ASN.1 value(V) including unused bits
  • \n *
  • obj - specify {@link KJUR.asn1.ASN1Util.newObject}\n * argument for \"BitString encapsulates\" structure.
  • \n *
\n * NOTE1: 'params' can be omitted.
\n * NOTE2: 'obj' parameter have been supported since\n * asn1 1.0.11, jsrsasign 6.1.1 (2016-Sep-25).
\n * @example\n * // default constructor\n * o = new KJUR.asn1.DERBitString();\n * // initialize with binary string\n * o = new KJUR.asn1.DERBitString({bin: \"1011\"});\n * // initialize with boolean array\n * o = new KJUR.asn1.DERBitString({array: [true,false,true,true]});\n * // initialize with hexadecimal string (04 is unused bits)\n * o = new KJUR.asn1.DEROctetString({hex: \"04bac0\"});\n * // initialize with ASN1Util.newObject argument for encapsulated\n * o = new KJUR.asn1.DERBitString({obj: {seq: [{int: 3}, {prnstr: 'aaa'}]}});\n * // above generates a ASN.1 data like this:\n * // BIT STRING, encapsulates {\n * // SEQUENCE {\n * // INTEGER 3\n * // PrintableString 'aaa'\n * // }\n * // }\n */\nKJUR.asn1.DERBitString = function (params) {\n if (params !== undefined && typeof params.obj !== \"undefined\") {\n var o = KJUR.asn1.ASN1Util.newObject(params.obj);\n params.hex = \"00\" + o.getEncodedHex();\n }\n KJUR.asn1.DERBitString.superclass.constructor.call(this);\n this.hT = \"03\";\n /**\n * set ASN.1 value(V) by a hexadecimal string including unused bits\n * @name setHexValueIncludingUnusedBits\n * @memberOf KJUR.asn1.DERBitString#\n * @function\n * @param {String} newHexStringIncludingUnusedBits\n */\n this.setHexValueIncludingUnusedBits = function (newHexStringIncludingUnusedBits) {\n this.hTLV = null;\n this.isModified = true;\n this.hV = newHexStringIncludingUnusedBits;\n };\n /**\n * set ASN.1 value(V) by unused bit and hexadecimal string of value\n * @name setUnusedBitsAndHexValue\n * @memberOf KJUR.asn1.DERBitString#\n * @function\n * @param {Integer} unusedBits\n * @param {String} hValue\n */\n this.setUnusedBitsAndHexValue = function (unusedBits, hValue) {\n if (unusedBits < 0 || 7 < unusedBits) {\n throw \"unused bits shall be from 0 to 7: u = \" + unusedBits;\n }\n var hUnusedBits = \"0\" + unusedBits;\n this.hTLV = null;\n this.isModified = true;\n this.hV = hUnusedBits + hValue;\n };\n /**\n * set ASN.1 DER BitString by binary string
\n * @name setByBinaryString\n * @memberOf KJUR.asn1.DERBitString#\n * @function\n * @param {String} binaryString binary value string (i.e. '10111')\n * @description\n * Its unused bits will be calculated automatically by length of\n * 'binaryValue'.
\n * NOTE: Trailing zeros '0' will be ignored.\n * @example\n * o = new KJUR.asn1.DERBitString();\n * o.setByBooleanArray(\"01011\");\n */\n this.setByBinaryString = function (binaryString) {\n binaryString = binaryString.replace(/0+$/, '');\n var unusedBits = 8 - binaryString.length % 8;\n if (unusedBits == 8)\n unusedBits = 0;\n for (var i = 0; i <= unusedBits; i++) {\n binaryString += '0';\n }\n var h = '';\n for (var i = 0; i < binaryString.length - 1; i += 8) {\n var b = binaryString.substr(i, 8);\n var x = parseInt(b, 2).toString(16);\n if (x.length == 1)\n x = '0' + x;\n h += x;\n }\n this.hTLV = null;\n this.isModified = true;\n this.hV = '0' + unusedBits + h;\n };\n /**\n * set ASN.1 TLV value(V) by an array of boolean
\n * @name setByBooleanArray\n * @memberOf KJUR.asn1.DERBitString#\n * @function\n * @param {array} booleanArray array of boolean (ex. [true, false, true])\n * @description\n * NOTE: Trailing falses will be ignored in the ASN.1 DER Object.\n * @example\n * o = new KJUR.asn1.DERBitString();\n * o.setByBooleanArray([false, true, false, true, true]);\n */\n this.setByBooleanArray = function (booleanArray) {\n var s = '';\n for (var i = 0; i < booleanArray.length; i++) {\n if (booleanArray[i] == true) {\n s += '1';\n }\n else {\n s += '0';\n }\n }\n this.setByBinaryString(s);\n };\n /**\n * generate an array of falses with specified length
\n * @name newFalseArray\n * @memberOf KJUR.asn1.DERBitString\n * @function\n * @param {Integer} nLength length of array to generate\n * @return {array} array of boolean falses\n * @description\n * This static method may be useful to initialize boolean array.\n * @example\n * o = new KJUR.asn1.DERBitString();\n * o.newFalseArray(3) → [false, false, false]\n */\n this.newFalseArray = function (nLength) {\n var a = new Array(nLength);\n for (var i = 0; i < nLength; i++) {\n a[i] = false;\n }\n return a;\n };\n this.getFreshValueHex = function () {\n return this.hV;\n };\n if (typeof params != \"undefined\") {\n if (typeof params == \"string\" && params.toLowerCase().match(/^[0-9a-f]+$/)) {\n this.setHexValueIncludingUnusedBits(params);\n }\n else if (typeof params['hex'] != \"undefined\") {\n this.setHexValueIncludingUnusedBits(params['hex']);\n }\n else if (typeof params['bin'] != \"undefined\") {\n this.setByBinaryString(params['bin']);\n }\n else if (typeof params['array'] != \"undefined\") {\n this.setByBooleanArray(params['array']);\n }\n }\n};\n_yahoo__WEBPACK_IMPORTED_MODULE_1__.YAHOO.lang.extend(KJUR.asn1.DERBitString, KJUR.asn1.ASN1Object);\n// ********************************************************************\n/**\n * class for ASN.1 DER OctetString
\n * @name KJUR.asn1.DEROctetString\n * @class class for ASN.1 DER OctetString\n * @param {Array} params associative array of parameters (ex. {'str': 'aaa'})\n * @extends KJUR.asn1.DERAbstractString\n * @description\n * This class provides ASN.1 OctetString simple type.
\n * Supported \"params\" attributes are:\n *
    \n *
  • str - to set a string as a value
  • \n *
  • hex - to set a hexadecimal string as a value
  • \n *
  • obj - to set a encapsulated ASN.1 value by JSON object\n * which is defined in {@link KJUR.asn1.ASN1Util.newObject}
  • \n *
\n * NOTE: A parameter 'obj' have been supported\n * for \"OCTET STRING, encapsulates\" structure.\n * since asn1 1.0.11, jsrsasign 6.1.1 (2016-Sep-25).\n * @see KJUR.asn1.DERAbstractString - superclass\n * @example\n * // default constructor\n * o = new KJUR.asn1.DEROctetString();\n * // initialize with string\n * o = new KJUR.asn1.DEROctetString({str: \"aaa\"});\n * // initialize with hexadecimal string\n * o = new KJUR.asn1.DEROctetString({hex: \"616161\"});\n * // initialize with ASN1Util.newObject argument\n * o = new KJUR.asn1.DEROctetString({obj: {seq: [{int: 3}, {prnstr: 'aaa'}]}});\n * // above generates a ASN.1 data like this:\n * // OCTET STRING, encapsulates {\n * // SEQUENCE {\n * // INTEGER 3\n * // PrintableString 'aaa'\n * // }\n * // }\n */\nKJUR.asn1.DEROctetString = function (params) {\n if (params !== undefined && typeof params.obj !== \"undefined\") {\n var o = KJUR.asn1.ASN1Util.newObject(params.obj);\n params.hex = o.getEncodedHex();\n }\n KJUR.asn1.DEROctetString.superclass.constructor.call(this, params);\n this.hT = \"04\";\n};\n_yahoo__WEBPACK_IMPORTED_MODULE_1__.YAHOO.lang.extend(KJUR.asn1.DEROctetString, KJUR.asn1.DERAbstractString);\n// ********************************************************************\n/**\n * class for ASN.1 DER Null\n * @name KJUR.asn1.DERNull\n * @class class for ASN.1 DER Null\n * @extends KJUR.asn1.ASN1Object\n * @description\n * @see KJUR.asn1.ASN1Object - superclass\n */\nKJUR.asn1.DERNull = function () {\n KJUR.asn1.DERNull.superclass.constructor.call(this);\n this.hT = \"05\";\n this.hTLV = \"0500\";\n};\n_yahoo__WEBPACK_IMPORTED_MODULE_1__.YAHOO.lang.extend(KJUR.asn1.DERNull, KJUR.asn1.ASN1Object);\n// ********************************************************************\n/**\n * class for ASN.1 DER ObjectIdentifier\n * @name KJUR.asn1.DERObjectIdentifier\n * @class class for ASN.1 DER ObjectIdentifier\n * @param {Array} params associative array of parameters (ex. {'oid': '2.5.4.5'})\n * @extends KJUR.asn1.ASN1Object\n * @description\n *
\n * As for argument 'params' for constructor, you can specify one of\n * following properties:\n *
    \n *
  • oid - specify initial ASN.1 value(V) by a oid string (ex. 2.5.4.13)
  • \n *
  • hex - specify initial ASN.1 value(V) by a hexadecimal string
  • \n *
\n * NOTE: 'params' can be omitted.\n */\nKJUR.asn1.DERObjectIdentifier = function (params) {\n var itox = function (i) {\n var h = i.toString(16);\n if (h.length == 1)\n h = '0' + h;\n return h;\n };\n var roidtox = function (roid) {\n var h = '';\n var bi = new _jsbn_jsbn__WEBPACK_IMPORTED_MODULE_0__.BigInteger(roid, 10);\n var b = bi.toString(2);\n var padLen = 7 - b.length % 7;\n if (padLen == 7)\n padLen = 0;\n var bPad = '';\n for (var i = 0; i < padLen; i++)\n bPad += '0';\n b = bPad + b;\n for (var i = 0; i < b.length - 1; i += 7) {\n var b8 = b.substr(i, 7);\n if (i != b.length - 7)\n b8 = '1' + b8;\n h += itox(parseInt(b8, 2));\n }\n return h;\n };\n KJUR.asn1.DERObjectIdentifier.superclass.constructor.call(this);\n this.hT = \"06\";\n /**\n * set value by a hexadecimal string\n * @name setValueHex\n * @memberOf KJUR.asn1.DERObjectIdentifier#\n * @function\n * @param {String} newHexString hexadecimal value of OID bytes\n */\n this.setValueHex = function (newHexString) {\n this.hTLV = null;\n this.isModified = true;\n this.s = null;\n this.hV = newHexString;\n };\n /**\n * set value by a OID string
\n * @name setValueOidString\n * @memberOf KJUR.asn1.DERObjectIdentifier#\n * @function\n * @param {String} oidString OID string (ex. 2.5.4.13)\n * @example\n * o = new KJUR.asn1.DERObjectIdentifier();\n * o.setValueOidString(\"2.5.4.13\");\n */\n this.setValueOidString = function (oidString) {\n if (!oidString.match(/^[0-9.]+$/)) {\n throw \"malformed oid string: \" + oidString;\n }\n var h = '';\n var a = oidString.split('.');\n var i0 = parseInt(a[0]) * 40 + parseInt(a[1]);\n h += itox(i0);\n a.splice(0, 2);\n for (var i = 0; i < a.length; i++) {\n h += roidtox(a[i]);\n }\n this.hTLV = null;\n this.isModified = true;\n this.s = null;\n this.hV = h;\n };\n /**\n * set value by a OID name\n * @name setValueName\n * @memberOf KJUR.asn1.DERObjectIdentifier#\n * @function\n * @param {String} oidName OID name (ex. 'serverAuth')\n * @since 1.0.1\n * @description\n * OID name shall be defined in 'KJUR.asn1.x509.OID.name2oidList'.\n * Otherwise raise error.\n * @example\n * o = new KJUR.asn1.DERObjectIdentifier();\n * o.setValueName(\"serverAuth\");\n */\n this.setValueName = function (oidName) {\n var oid = KJUR.asn1.x509.OID.name2oid(oidName);\n if (oid !== '') {\n this.setValueOidString(oid);\n }\n else {\n throw \"DERObjectIdentifier oidName undefined: \" + oidName;\n }\n };\n this.getFreshValueHex = function () {\n return this.hV;\n };\n if (params !== undefined) {\n if (typeof params === \"string\") {\n if (params.match(/^[0-2].[0-9.]+$/)) {\n this.setValueOidString(params);\n }\n else {\n this.setValueName(params);\n }\n }\n else if (params.oid !== undefined) {\n this.setValueOidString(params.oid);\n }\n else if (params.hex !== undefined) {\n this.setValueHex(params.hex);\n }\n else if (params.name !== undefined) {\n this.setValueName(params.name);\n }\n }\n};\n_yahoo__WEBPACK_IMPORTED_MODULE_1__.YAHOO.lang.extend(KJUR.asn1.DERObjectIdentifier, KJUR.asn1.ASN1Object);\n// ********************************************************************\n/**\n * class for ASN.1 DER Enumerated\n * @name KJUR.asn1.DEREnumerated\n * @class class for ASN.1 DER Enumerated\n * @extends KJUR.asn1.ASN1Object\n * @description\n *
\n * As for argument 'params' for constructor, you can specify one of\n * following properties:\n *
    \n *
  • int - specify initial ASN.1 value(V) by integer value
  • \n *
  • hex - specify initial ASN.1 value(V) by a hexadecimal string
  • \n *
\n * NOTE: 'params' can be omitted.\n * @example\n * new KJUR.asn1.DEREnumerated(123);\n * new KJUR.asn1.DEREnumerated({int: 123});\n * new KJUR.asn1.DEREnumerated({hex: '1fad'});\n */\nKJUR.asn1.DEREnumerated = function (params) {\n KJUR.asn1.DEREnumerated.superclass.constructor.call(this);\n this.hT = \"0a\";\n /**\n * set value by Tom Wu's BigInteger object\n * @name setByBigInteger\n * @memberOf KJUR.asn1.DEREnumerated#\n * @function\n * @param {BigInteger} bigIntegerValue to set\n */\n this.setByBigInteger = function (bigIntegerValue) {\n this.hTLV = null;\n this.isModified = true;\n this.hV = KJUR.asn1.ASN1Util.bigIntToMinTwosComplementsHex(bigIntegerValue);\n };\n /**\n * set value by integer value\n * @name setByInteger\n * @memberOf KJUR.asn1.DEREnumerated#\n * @function\n * @param {Integer} integer value to set\n */\n this.setByInteger = function (intValue) {\n var bi = new _jsbn_jsbn__WEBPACK_IMPORTED_MODULE_0__.BigInteger(String(intValue), 10);\n this.setByBigInteger(bi);\n };\n /**\n * set value by integer value\n * @name setValueHex\n * @memberOf KJUR.asn1.DEREnumerated#\n * @function\n * @param {String} hexadecimal string of integer value\n * @description\n *
\n * NOTE: Value shall be represented by minimum octet length of\n * two's complement representation.\n */\n this.setValueHex = function (newHexString) {\n this.hV = newHexString;\n };\n this.getFreshValueHex = function () {\n return this.hV;\n };\n if (typeof params != \"undefined\") {\n if (typeof params['int'] != \"undefined\") {\n this.setByInteger(params['int']);\n }\n else if (typeof params == \"number\") {\n this.setByInteger(params);\n }\n else if (typeof params['hex'] != \"undefined\") {\n this.setValueHex(params['hex']);\n }\n }\n};\n_yahoo__WEBPACK_IMPORTED_MODULE_1__.YAHOO.lang.extend(KJUR.asn1.DEREnumerated, KJUR.asn1.ASN1Object);\n// ********************************************************************\n/**\n * class for ASN.1 DER UTF8String\n * @name KJUR.asn1.DERUTF8String\n * @class class for ASN.1 DER UTF8String\n * @param {Array} params associative array of parameters (ex. {'str': 'aaa'})\n * @extends KJUR.asn1.DERAbstractString\n * @description\n * @see KJUR.asn1.DERAbstractString - superclass\n */\nKJUR.asn1.DERUTF8String = function (params) {\n KJUR.asn1.DERUTF8String.superclass.constructor.call(this, params);\n this.hT = \"0c\";\n};\n_yahoo__WEBPACK_IMPORTED_MODULE_1__.YAHOO.lang.extend(KJUR.asn1.DERUTF8String, KJUR.asn1.DERAbstractString);\n// ********************************************************************\n/**\n * class for ASN.1 DER NumericString\n * @name KJUR.asn1.DERNumericString\n * @class class for ASN.1 DER NumericString\n * @param {Array} params associative array of parameters (ex. {'str': 'aaa'})\n * @extends KJUR.asn1.DERAbstractString\n * @description\n * @see KJUR.asn1.DERAbstractString - superclass\n */\nKJUR.asn1.DERNumericString = function (params) {\n KJUR.asn1.DERNumericString.superclass.constructor.call(this, params);\n this.hT = \"12\";\n};\n_yahoo__WEBPACK_IMPORTED_MODULE_1__.YAHOO.lang.extend(KJUR.asn1.DERNumericString, KJUR.asn1.DERAbstractString);\n// ********************************************************************\n/**\n * class for ASN.1 DER PrintableString\n * @name KJUR.asn1.DERPrintableString\n * @class class for ASN.1 DER PrintableString\n * @param {Array} params associative array of parameters (ex. {'str': 'aaa'})\n * @extends KJUR.asn1.DERAbstractString\n * @description\n * @see KJUR.asn1.DERAbstractString - superclass\n */\nKJUR.asn1.DERPrintableString = function (params) {\n KJUR.asn1.DERPrintableString.superclass.constructor.call(this, params);\n this.hT = \"13\";\n};\n_yahoo__WEBPACK_IMPORTED_MODULE_1__.YAHOO.lang.extend(KJUR.asn1.DERPrintableString, KJUR.asn1.DERAbstractString);\n// ********************************************************************\n/**\n * class for ASN.1 DER TeletexString\n * @name KJUR.asn1.DERTeletexString\n * @class class for ASN.1 DER TeletexString\n * @param {Array} params associative array of parameters (ex. {'str': 'aaa'})\n * @extends KJUR.asn1.DERAbstractString\n * @description\n * @see KJUR.asn1.DERAbstractString - superclass\n */\nKJUR.asn1.DERTeletexString = function (params) {\n KJUR.asn1.DERTeletexString.superclass.constructor.call(this, params);\n this.hT = \"14\";\n};\n_yahoo__WEBPACK_IMPORTED_MODULE_1__.YAHOO.lang.extend(KJUR.asn1.DERTeletexString, KJUR.asn1.DERAbstractString);\n// ********************************************************************\n/**\n * class for ASN.1 DER IA5String\n * @name KJUR.asn1.DERIA5String\n * @class class for ASN.1 DER IA5String\n * @param {Array} params associative array of parameters (ex. {'str': 'aaa'})\n * @extends KJUR.asn1.DERAbstractString\n * @description\n * @see KJUR.asn1.DERAbstractString - superclass\n */\nKJUR.asn1.DERIA5String = function (params) {\n KJUR.asn1.DERIA5String.superclass.constructor.call(this, params);\n this.hT = \"16\";\n};\n_yahoo__WEBPACK_IMPORTED_MODULE_1__.YAHOO.lang.extend(KJUR.asn1.DERIA5String, KJUR.asn1.DERAbstractString);\n// ********************************************************************\n/**\n * class for ASN.1 DER UTCTime\n * @name KJUR.asn1.DERUTCTime\n * @class class for ASN.1 DER UTCTime\n * @param {Array} params associative array of parameters (ex. {'str': '130430235959Z'})\n * @extends KJUR.asn1.DERAbstractTime\n * @description\n *
\n * As for argument 'params' for constructor, you can specify one of\n * following properties:\n *
    \n *
  • str - specify initial ASN.1 value(V) by a string (ex.'130430235959Z')
  • \n *
  • hex - specify initial ASN.1 value(V) by a hexadecimal string
  • \n *
  • date - specify Date object.
  • \n *
\n * NOTE: 'params' can be omitted.\n *

EXAMPLES

\n * @example\n * d1 = new KJUR.asn1.DERUTCTime();\n * d1.setString('130430125959Z');\n *\n * d2 = new KJUR.asn1.DERUTCTime({'str': '130430125959Z'});\n * d3 = new KJUR.asn1.DERUTCTime({'date': new Date(Date.UTC(2015, 0, 31, 0, 0, 0, 0))});\n * d4 = new KJUR.asn1.DERUTCTime('130430125959Z');\n */\nKJUR.asn1.DERUTCTime = function (params) {\n KJUR.asn1.DERUTCTime.superclass.constructor.call(this, params);\n this.hT = \"17\";\n /**\n * set value by a Date object
\n * @name setByDate\n * @memberOf KJUR.asn1.DERUTCTime#\n * @function\n * @param {Date} dateObject Date object to set ASN.1 value(V)\n * @example\n * o = new KJUR.asn1.DERUTCTime();\n * o.setByDate(new Date(\"2016/12/31\"));\n */\n this.setByDate = function (dateObject) {\n this.hTLV = null;\n this.isModified = true;\n this.date = dateObject;\n this.s = this.formatDate(this.date, 'utc');\n this.hV = stohex(this.s);\n };\n this.getFreshValueHex = function () {\n if (typeof this.date == \"undefined\" && typeof this.s == \"undefined\") {\n this.date = new Date();\n this.s = this.formatDate(this.date, 'utc');\n this.hV = stohex(this.s);\n }\n return this.hV;\n };\n if (params !== undefined) {\n if (params.str !== undefined) {\n this.setString(params.str);\n }\n else if (typeof params == \"string\" && params.match(/^[0-9]{12}Z$/)) {\n this.setString(params);\n }\n else if (params.hex !== undefined) {\n this.setStringHex(params.hex);\n }\n else if (params.date !== undefined) {\n this.setByDate(params.date);\n }\n }\n};\n_yahoo__WEBPACK_IMPORTED_MODULE_1__.YAHOO.lang.extend(KJUR.asn1.DERUTCTime, KJUR.asn1.DERAbstractTime);\n// ********************************************************************\n/**\n * class for ASN.1 DER GeneralizedTime\n * @name KJUR.asn1.DERGeneralizedTime\n * @class class for ASN.1 DER GeneralizedTime\n * @param {Array} params associative array of parameters (ex. {'str': '20130430235959Z'})\n * @property {Boolean} withMillis flag to show milliseconds or not\n * @extends KJUR.asn1.DERAbstractTime\n * @description\n *
\n * As for argument 'params' for constructor, you can specify one of\n * following properties:\n *
    \n *
  • str - specify initial ASN.1 value(V) by a string (ex.'20130430235959Z')
  • \n *
  • hex - specify initial ASN.1 value(V) by a hexadecimal string
  • \n *
  • date - specify Date object.
  • \n *
  • millis - specify flag to show milliseconds (from 1.0.6)
  • \n *
\n * NOTE1: 'params' can be omitted.\n * NOTE2: 'withMillis' property is supported from asn1 1.0.6.\n */\nKJUR.asn1.DERGeneralizedTime = function (params) {\n KJUR.asn1.DERGeneralizedTime.superclass.constructor.call(this, params);\n this.hT = \"18\";\n this.withMillis = false;\n /**\n * set value by a Date object\n * @name setByDate\n * @memberOf KJUR.asn1.DERGeneralizedTime#\n * @function\n * @param {Date} dateObject Date object to set ASN.1 value(V)\n * @example\n * When you specify UTC time, use 'Date.UTC' method like this:
\n * o1 = new DERUTCTime();\n * o1.setByDate(date);\n *\n * date = new Date(Date.UTC(2015, 0, 31, 23, 59, 59, 0)); #2015JAN31 23:59:59\n */\n this.setByDate = function (dateObject) {\n this.hTLV = null;\n this.isModified = true;\n this.date = dateObject;\n this.s = this.formatDate(this.date, 'gen', this.withMillis);\n this.hV = stohex(this.s);\n };\n this.getFreshValueHex = function () {\n if (this.date === undefined && this.s === undefined) {\n this.date = new Date();\n this.s = this.formatDate(this.date, 'gen', this.withMillis);\n this.hV = stohex(this.s);\n }\n return this.hV;\n };\n if (params !== undefined) {\n if (params.str !== undefined) {\n this.setString(params.str);\n }\n else if (typeof params == \"string\" && params.match(/^[0-9]{14}Z$/)) {\n this.setString(params);\n }\n else if (params.hex !== undefined) {\n this.setStringHex(params.hex);\n }\n else if (params.date !== undefined) {\n this.setByDate(params.date);\n }\n if (params.millis === true) {\n this.withMillis = true;\n }\n }\n};\n_yahoo__WEBPACK_IMPORTED_MODULE_1__.YAHOO.lang.extend(KJUR.asn1.DERGeneralizedTime, KJUR.asn1.DERAbstractTime);\n// ********************************************************************\n/**\n * class for ASN.1 DER Sequence\n * @name KJUR.asn1.DERSequence\n * @class class for ASN.1 DER Sequence\n * @extends KJUR.asn1.DERAbstractStructured\n * @description\n *
\n * As for argument 'params' for constructor, you can specify one of\n * following properties:\n *
    \n *
  • array - specify array of ASN1Object to set elements of content
  • \n *
\n * NOTE: 'params' can be omitted.\n */\nKJUR.asn1.DERSequence = function (params) {\n KJUR.asn1.DERSequence.superclass.constructor.call(this, params);\n this.hT = \"30\";\n this.getFreshValueHex = function () {\n var h = '';\n for (var i = 0; i < this.asn1Array.length; i++) {\n var asn1Obj = this.asn1Array[i];\n h += asn1Obj.getEncodedHex();\n }\n this.hV = h;\n return this.hV;\n };\n};\n_yahoo__WEBPACK_IMPORTED_MODULE_1__.YAHOO.lang.extend(KJUR.asn1.DERSequence, KJUR.asn1.DERAbstractStructured);\n// ********************************************************************\n/**\n * class for ASN.1 DER Set\n * @name KJUR.asn1.DERSet\n * @class class for ASN.1 DER Set\n * @extends KJUR.asn1.DERAbstractStructured\n * @description\n *
\n * As for argument 'params' for constructor, you can specify one of\n * following properties:\n *
    \n *
  • array - specify array of ASN1Object to set elements of content
  • \n *
  • sortflag - flag for sort (default: true). ASN.1 BER is not sorted in 'SET OF'.
  • \n *
\n * NOTE1: 'params' can be omitted.
\n * NOTE2: sortflag is supported since 1.0.5.\n */\nKJUR.asn1.DERSet = function (params) {\n KJUR.asn1.DERSet.superclass.constructor.call(this, params);\n this.hT = \"31\";\n this.sortFlag = true; // item shall be sorted only in ASN.1 DER\n this.getFreshValueHex = function () {\n var a = new Array();\n for (var i = 0; i < this.asn1Array.length; i++) {\n var asn1Obj = this.asn1Array[i];\n a.push(asn1Obj.getEncodedHex());\n }\n if (this.sortFlag == true)\n a.sort();\n this.hV = a.join('');\n return this.hV;\n };\n if (typeof params != \"undefined\") {\n if (typeof params.sortflag != \"undefined\" &&\n params.sortflag == false)\n this.sortFlag = false;\n }\n};\n_yahoo__WEBPACK_IMPORTED_MODULE_1__.YAHOO.lang.extend(KJUR.asn1.DERSet, KJUR.asn1.DERAbstractStructured);\n// ********************************************************************\n/**\n * class for ASN.1 DER TaggedObject\n * @name KJUR.asn1.DERTaggedObject\n * @class class for ASN.1 DER TaggedObject\n * @extends KJUR.asn1.ASN1Object\n * @description\n *
\n * Parameter 'tagNoNex' is ASN.1 tag(T) value for this object.\n * For example, if you find '[1]' tag in a ASN.1 dump,\n * 'tagNoHex' will be 'a1'.\n *
\n * As for optional argument 'params' for constructor, you can specify *ANY* of\n * following properties:\n *
    \n *
  • explicit - specify true if this is explicit tag otherwise false\n * (default is 'true').
  • \n *
  • tag - specify tag (default is 'a0' which means [0])
  • \n *
  • obj - specify ASN1Object which is tagged
  • \n *
\n * @example\n * d1 = new KJUR.asn1.DERUTF8String({'str':'a'});\n * d2 = new KJUR.asn1.DERTaggedObject({'obj': d1});\n * hex = d2.getEncodedHex();\n */\nKJUR.asn1.DERTaggedObject = function (params) {\n KJUR.asn1.DERTaggedObject.superclass.constructor.call(this);\n this.hT = \"a0\";\n this.hV = '';\n this.isExplicit = true;\n this.asn1Object = null;\n /**\n * set value by an ASN1Object\n * @name setString\n * @memberOf KJUR.asn1.DERTaggedObject#\n * @function\n * @param {Boolean} isExplicitFlag flag for explicit/implicit tag\n * @param {Integer} tagNoHex hexadecimal string of ASN.1 tag\n * @param {ASN1Object} asn1Object ASN.1 to encapsulate\n */\n this.setASN1Object = function (isExplicitFlag, tagNoHex, asn1Object) {\n this.hT = tagNoHex;\n this.isExplicit = isExplicitFlag;\n this.asn1Object = asn1Object;\n if (this.isExplicit) {\n this.hV = this.asn1Object.getEncodedHex();\n this.hTLV = null;\n this.isModified = true;\n }\n else {\n this.hV = null;\n this.hTLV = asn1Object.getEncodedHex();\n this.hTLV = this.hTLV.replace(/^../, tagNoHex);\n this.isModified = false;\n }\n };\n this.getFreshValueHex = function () {\n return this.hV;\n };\n if (typeof params != \"undefined\") {\n if (typeof params['tag'] != \"undefined\") {\n this.hT = params['tag'];\n }\n if (typeof params['explicit'] != \"undefined\") {\n this.isExplicit = params['explicit'];\n }\n if (typeof params['obj'] != \"undefined\") {\n this.asn1Object = params['obj'];\n this.setASN1Object(this.isExplicit, this.hT, this.asn1Object);\n }\n }\n};\n_yahoo__WEBPACK_IMPORTED_MODULE_1__.YAHOO.lang.extend(KJUR.asn1.DERTaggedObject, KJUR.asn1.ASN1Object);\n\n\n//# sourceURL=webpack://JSEncrypt/./lib/lib/jsrsasign/asn1-1.0.js?"); + + /***/ + }), + + /***/ + "./lib/lib/jsrsasign/yahoo.js": + /*!************************************!*\ + !*** ./lib/lib/jsrsasign/yahoo.js ***! + \************************************/ + /***/ + ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + + "use strict"; + eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"YAHOO\": () => (/* binding */ YAHOO)\n/* harmony export */ });\n/*!\nCopyright (c) 2011, Yahoo! Inc. All rights reserved.\nCode licensed under the BSD License:\nhttp://developer.yahoo.com/yui/license.html\nversion: 2.9.0\n*/\nvar YAHOO = {};\nYAHOO.lang = {\n /**\n * Utility to set up the prototype, constructor and superclass properties to\n * support an inheritance strategy that can chain constructors and methods.\n * Static members will not be inherited.\n *\n * @method extend\n * @static\n * @param {Function} subc the object to modify\n * @param {Function} superc the object to inherit\n * @param {Object} overrides additional properties/methods to add to the\n * subclass prototype. These will override the\n * matching items obtained from the superclass\n * if present.\n */\n extend: function (subc, superc, overrides) {\n if (!superc || !subc) {\n throw new Error(\"YAHOO.lang.extend failed, please check that \" +\n \"all dependencies are included.\");\n }\n var F = function () { };\n F.prototype = superc.prototype;\n subc.prototype = new F();\n subc.prototype.constructor = subc;\n subc.superclass = superc.prototype;\n if (superc.prototype.constructor == Object.prototype.constructor) {\n superc.prototype.constructor = superc;\n }\n if (overrides) {\n var i;\n for (i in overrides) {\n subc.prototype[i] = overrides[i];\n }\n /*\n * IE will not enumerate native functions in a derived object even if the\n * function was overridden. This is a workaround for specific functions\n * we care about on the Object prototype.\n * @property _IEEnumFix\n * @param {Function} r the object to receive the augmentation\n * @param {Function} s the object that supplies the properties to augment\n * @static\n * @private\n */\n var _IEEnumFix = function () { }, ADD = [\"toString\", \"valueOf\"];\n try {\n if (/MSIE/.test(navigator.userAgent)) {\n _IEEnumFix = function (r, s) {\n for (i = 0; i < ADD.length; i = i + 1) {\n var fname = ADD[i], f = s[fname];\n if (typeof f === 'function' && f != Object.prototype[fname]) {\n r[fname] = f;\n }\n }\n };\n }\n }\n catch (ex) { }\n ;\n _IEEnumFix(subc.prototype, overrides);\n }\n }\n};\n\n\n//# sourceURL=webpack://JSEncrypt/./lib/lib/jsrsasign/yahoo.js?"); + + /***/ + }), + + /***/ + "./node_modules/process/browser.js": + /*!*****************************************!*\ + !*** ./node_modules/process/browser.js ***! + \*****************************************/ + /***/ + ((module) => { + + eval("// shim for using process in browser\nvar process = module.exports = {};\n\n// cached from whatever global is present so that test runners that stub it\n// don't break things. But we need to wrap it in a try catch in case it is\n// wrapped in strict mode code which doesn't define any globals. It's inside a\n// function because try/catches deoptimize in certain engines.\n\nvar cachedSetTimeout;\nvar cachedClearTimeout;\n\nfunction defaultSetTimout() {\n throw new Error('setTimeout has not been defined');\n}\nfunction defaultClearTimeout () {\n throw new Error('clearTimeout has not been defined');\n}\n(function () {\n try {\n if (typeof setTimeout === 'function') {\n cachedSetTimeout = setTimeout;\n } else {\n cachedSetTimeout = defaultSetTimout;\n }\n } catch (e) {\n cachedSetTimeout = defaultSetTimout;\n }\n try {\n if (typeof clearTimeout === 'function') {\n cachedClearTimeout = clearTimeout;\n } else {\n cachedClearTimeout = defaultClearTimeout;\n }\n } catch (e) {\n cachedClearTimeout = defaultClearTimeout;\n }\n} ())\nfunction runTimeout(fun) {\n if (cachedSetTimeout === setTimeout) {\n //normal enviroments in sane situations\n return setTimeout(fun, 0);\n }\n // if setTimeout wasn't available but was latter defined\n if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n cachedSetTimeout = setTimeout;\n return setTimeout(fun, 0);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedSetTimeout(fun, 0);\n } catch(e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedSetTimeout.call(null, fun, 0);\n } catch(e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n return cachedSetTimeout.call(this, fun, 0);\n }\n }\n\n\n}\nfunction runClearTimeout(marker) {\n if (cachedClearTimeout === clearTimeout) {\n //normal enviroments in sane situations\n return clearTimeout(marker);\n }\n // if clearTimeout wasn't available but was latter defined\n if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n cachedClearTimeout = clearTimeout;\n return clearTimeout(marker);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedClearTimeout(marker);\n } catch (e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedClearTimeout.call(null, marker);\n } catch (e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n return cachedClearTimeout.call(this, marker);\n }\n }\n\n\n\n}\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n if (!draining || !currentQueue) {\n return;\n }\n draining = false;\n if (currentQueue.length) {\n queue = currentQueue.concat(queue);\n } else {\n queueIndex = -1;\n }\n if (queue.length) {\n drainQueue();\n }\n}\n\nfunction drainQueue() {\n if (draining) {\n return;\n }\n var timeout = runTimeout(cleanUpNextTick);\n draining = true;\n\n var len = queue.length;\n while(len) {\n currentQueue = queue;\n queue = [];\n while (++queueIndex < len) {\n if (currentQueue) {\n currentQueue[queueIndex].run();\n }\n }\n queueIndex = -1;\n len = queue.length;\n }\n currentQueue = null;\n draining = false;\n runClearTimeout(timeout);\n}\n\nprocess.nextTick = function (fun) {\n var args = new Array(arguments.length - 1);\n if (arguments.length > 1) {\n for (var i = 1; i < arguments.length; i++) {\n args[i - 1] = arguments[i];\n }\n }\n queue.push(new Item(fun, args));\n if (queue.length === 1 && !draining) {\n runTimeout(drainQueue);\n }\n};\n\n// v8 likes predictible objects\nfunction Item(fun, array) {\n this.fun = fun;\n this.array = array;\n}\nItem.prototype.run = function () {\n this.fun.apply(null, this.array);\n};\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\nprocess.version = ''; // empty string to avoid regexp issues\nprocess.versions = {};\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\nprocess.prependListener = noop;\nprocess.prependOnceListener = noop;\n\nprocess.listeners = function (name) { return [] }\n\nprocess.binding = function (name) {\n throw new Error('process.binding is not supported');\n};\n\nprocess.cwd = function () { return '/' };\nprocess.chdir = function (dir) {\n throw new Error('process.chdir is not supported');\n};\nprocess.umask = function() { return 0; };\n\n\n//# sourceURL=webpack://JSEncrypt/./node_modules/process/browser.js?"); + + /***/ + }) + + /******/ + }); + /************************************************************************/ + /******/ // The module cache + /******/ + var __webpack_module_cache__ = {}; + /******/ + /******/ // The require function + /******/ + function __webpack_require__(moduleId) { + /******/ // Check if module is in cache + /******/ + var cachedModule = __webpack_module_cache__[moduleId]; + /******/ + if (cachedModule !== undefined) { + /******/ + return cachedModule.exports; + /******/ + } + /******/ // Create a new module (and put it into the cache) + /******/ + var module = __webpack_module_cache__[moduleId] = { + /******/ // no module.id needed + /******/ // no module.loaded needed + /******/ + exports: {} + /******/ + }; + /******/ + /******/ // Execute the module function + /******/ + __webpack_modules__[moduleId](module, module.exports, __webpack_require__); + /******/ + /******/ // Return the exports of the module + /******/ + return module.exports; + /******/ + } + /******/ + /************************************************************************/ + /******/ + /* webpack/runtime/define property getters */ + /******/ + (() => { + /******/ // define getter functions for harmony exports + /******/ + __webpack_require__.d = (exports, definition) => { + /******/ + for (var key in definition) { + /******/ + if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { + /******/ + Object.defineProperty(exports, key, { + enumerable: true, + get: definition[key] + }); + /******/ + } + /******/ + } + /******/ + }; + /******/ + })(); + /******/ + /******/ + /* webpack/runtime/hasOwnProperty shorthand */ + /******/ + (() => { + /******/ + __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop)) + /******/ + })(); + /******/ + /******/ + /* webpack/runtime/make namespace object */ + /******/ + (() => { + /******/ // define __esModule on exports + /******/ + __webpack_require__.r = (exports) => { + /******/ + if (typeof Symbol !== 'undefined' && Symbol.toStringTag) { + /******/ + Object.defineProperty(exports, Symbol.toStringTag, { + value: 'Module' + }); + /******/ + } + /******/ + Object.defineProperty(exports, '__esModule', { + value: true + }); + /******/ + }; + /******/ + })(); + /******/ + /************************************************************************/ + /******/ + /******/ // startup + /******/ // Load entry module and return exports + /******/ // This entry module can't be inlined because the eval devtool is used. + /******/ + var __webpack_exports__ = __webpack_require__("./lib/index.js"); + /******/ + __webpack_exports__ = __webpack_exports__["default"]; + /******/ + /******/ + return __webpack_exports__; + /******/ + })(); +}); \ No newline at end of file