6/18/ds/18js/lib/cat.js

15158 lines
709 KiB
JavaScript
Raw Normal View History

2024-07-12 09:44:07 +03:00
var e, pe, 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
}).apply(this, arguments)
}, n = {xml: !1, decodeEntities: !0}, r = {_useHtmlParser2: !0, xmlMode: !0};
function i(e) {
return null != e && 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, u = e.Script, l = e.Style, h = e.Tag, f = e.CDATA,
p = 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 L(this, e)
}
}
class m extends d {
constructor(e) {
super(), this.data = e
}
get nodeValue() {
return this.data
}
set nodeValue(e) {
this.data = e
}
}
class _ extends m {
constructor() {
super(...arguments), this.type = e.Text
}
get nodeType() {
return 3
}
}
class E extends m {
constructor() {
super(...arguments), this.type = e.Comment
}
get nodeType() {
return 8
}
}
class T extends m {
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]) ? e : null
}
get lastChild() {
return 0 < this.children.length ? 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 v extends A {
constructor() {
super(...arguments), this.type = e.Root
}
get nodeType() {
return 9
}
}
class y 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;
return {
name: e,
value: this.attribs[e],
namespace: null == (t = this["x-attribsNamespace"]) ? void 0 : t[e],
prefix: null == (t = this["x-attribsPrefix"]) ? void 0 : t[e]
}
})
}
}
function S(t) {
return t.type === e.Tag || t.type === e.Script || t.type === e.Style
}
function C(t) {
return t.type === e.CDATA
}
function N(t) {
return t.type === e.Text
}
function b(t) {
return t.type === e.Comment
}
function I(t) {
return t.type === e.Directive
}
function O(t) {
return t.type === e.Root
}
function k(e) {
return Object.prototype.hasOwnProperty.call(e, "children")
}
function L(e, t = !1) {
let n;
if (N(e)) n = new _(e.data); else if (b(e)) n = new E(e.data); else if (S(e)) {
const r = t ? D(e.children) : [], i = new y(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 (C(e)) {
const r = t ? D(e.children) : [], i = new g(r);
r.forEach(e => e.parent = i), n = i
} else if (O(e)) {
const r = t ? D(e.children) : [], i = new v(r);
r.forEach(e => e.parent = i), e["x-mode"] && (i["x-mode"] = e["x-mode"]), n = i
} else {
if (!I(e)) throw new Error("Not implemented yet: " + e.type);
{
const t = new T(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) {
var t = e.map(e => L(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 w {
constructor(e, t, n) {
this.dom = [], this.root = new v(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 v(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;
var e = this.tagStack.pop();
this.options.withEndIndices && (e.endIndex = this.parser.endIndex), this.elementCB && this.elementCB(e)
}
onopentag(t, n) {
var r = this.options.xmlMode ? e.Tag : void 0, t = new y(t, n, void 0, r);
this.addNode(t), this.tagStack.push(t)
}
ontext(t) {
var n = this.lastNode;
if (n && n.type === e.Text) n.data += t, this.options.withEndIndices && (n.endIndex = this.parser.endIndex); else {
const e = new _(t);
this.addNode(e), this.lastNode = e
}
}
oncomment(t) {
this.lastNode && this.lastNode.type === e.Comment ? this.lastNode.data += t : (t = new E(t), this.addNode(t), this.lastNode = t)
}
oncommentend() {
this.lastNode = null
}
oncdatastart() {
var e = new _(""), t = new g([e]);
this.addNode(t), e.parent = t, this.lastNode = e
}
oncdataend() {
this.lastNode = null
}
onprocessinginstruction(e, t) {
e = new T(e, t), this.addNode(e)
}
handleCallback(e) {
if ("function" == typeof this.callback) this.callback(e, this.dom); else if (e) throw e
}
addNode(e) {
var 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).next = e), e.parent = t, this.lastNode = null
}
}
const x = /["&'<>$\x80-\uFFFF]/g,
M = new Map([[34, "&quot;"], [38, "&amp;"], [39, "&apos;"], [60, "&lt;"], [62, "&gt;"]]),
P = 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 = x.exec(e));) {
var i = t.index, s = e.charCodeAt(i), a = M.get(s);
r = void 0 !== a ? (n += e.substring(r, i) + a, i + 1) : (n += `${e.substring(r, i)}&#x${P(e, i).toString(16)};`, x.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, "&quot;"], [38, "&amp;"], [160, "&nbsp;"]])),
H = F(/[&<>\u00A0]/g, new Map([[38, "&amp;"], [60, "&lt;"], [62, "&gt;"], [160, "&nbsp;"]])),
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])),
j = 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 Y(e) {
return e.replace(/"/g, "&quot;")
}
const K = new Set(["area", "base", "basefont", "br", "col", "command", "embed", "frame", "hr", "img", "input", "isindex", "keygen", "link", "meta", "param", "source", "track", "wbr"]);
function W(e, t = {}) {
var n = "length" in e ? e : [e];
let r = "";
for (let e = 0; e < n.length; e++) r += V(n[e], t);
return r
}
function V(e, t) {
switch (e.type) {
case s:
return W(e.children, t);
case p:
case o:
return `<${e.data}>`;
case c:
return `<!--${e.data}-->`;
case f:
return `<![CDATA[${e.children[0].data}]]>`;
case u:
case l:
case h:
return function (e, t) {
!(t = "foreign" === t.xmlMode && (e.name = null != (n = G.get(e.name)) ? n : e.name, e.parent) && $.has(e.parent.name) ? {
...t,
xmlMode: !1
} : t).xmlMode && Q.has(e.name) && (t = {...t, xmlMode: "foreign"});
let r = "<" + e.name;
var n = function (e, t) {
var n;
if (e) {
const r = !1 === (null != (n = t.encodeEntities) ? n : t.decodeEntities) ? Y : t.xmlMode || "utf8" !== t.encodeEntities ? B : U;
return Object.keys(e).map(n => {
var s, i = null != (i = e[n]) ? i : "";
return "foreign" === t.xmlMode && (n = null != (s = j.get(n)) ? s : n), t.emptyAttrs || t.xmlMode || "" !== i ? `${n}="${r(i)}"` : n
}).join(" ")
}
}(e.attribs, t);
return n && (r += " " + n), 0 === e.children.length && (t.xmlMode ? !1 !== t.selfClosingTags : t.selfClosingTags && K.has(e.name)) ? (t.xmlMode || (r += " "), r += "/>") : (r += ">", 0 < e.children.length && (r += W(e.children, t)), !t.xmlMode && K.has(e.name) || (r += `</${e.name}>`)), r
}(e, t);
case a:
return function (e, t) {
var n, r = e.data || "";
return !1 === (null != (n = t.encodeEntities) ? n : t.decodeEntities) || !t.xmlMode && e.parent && q.has(e.parent.name) ? r : (t.xmlMode || "utf8" !== t.encodeEntities ? B : H)(r)
}(e, t)
}
}
const $ = new Set(["mi", "mo", "mn", "ms", "mtext", "annotation-xml", "foreignObject", "desc", "title"]),
Q = new Set(["svg", "math"]);
function z(e, t) {
return W(e, t)
}
function X(e) {
return Array.isArray(e) ? e.map(X).join("") : k(e) && !b(e) ? X(e.children) : N(e) ? e.data : ""
}
function Z(t) {
return Array.isArray(t) ? t.map(Z).join("") : k(t) && (t.type === e.Tag || C(t)) ? Z(t.children) : N(t) ? t.data : ""
}
function J(e) {
return k(e) ? e.children : []
}
function ee(e) {
return e.parent || null
}
function te(e) {
var t = ee(e);
if (null != t) return J(t);
var 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 t = e.next;
for (; null !== t && !S(t);) ({next: t} = t);
return t
}
function re(e) {
let t = e.prev;
for (; null !== t && !S(t);) ({prev: t} = t);
return t
}
function ie(e) {
var t, n;
e.prev && (e.prev.next = e.next), e.next && (e.next.prev = e.prev), e.parent && 0 <= (n = (t = e.parent.children).lastIndexOf(e)) && t.splice(n, 1), e.next = null, e.prev = null, e.parent = null
}
function se(e, t, n = !0, r = 1 / 0) {
return ae(e, Array.isArray(t) ? t : [t], n, r)
}
function ae(e, t, n, r) {
for (var i = [], s = [t], a = [0]; ;) if (a[0] >= s[0].length) {
if (1 === a.length) return i;
s.shift(), a.shift()
} else {
const t = s[0][a[0]++];
if (e(t) && (i.push(t), --r <= 0)) return i;
n && k(t) && 0 < t.children.length && (a.unshift(0), s.unshift(t.children))
}
}
function oe(e, t, n = !0) {
let r = null;
for (let i = 0; i < t.length && !r; i++) {
var s = t[i];
S(s) && (e(s) ? r = s : n && 0 < s.children.length && (r = oe(e, s.children, !0)))
}
return r
}
const ce = {
tag_name: e => "function" == typeof e ? t => S(t) && e(t.name) : "*" === e ? S : t => S(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 => N(t) && e(t.data) : t => N(t) && t.data === e
};
function ue(e, t) {
return "function" == typeof t ? n => S(n) && t(n.attribs[e]) : n => S(n) && n.attribs[e] === t
}
function le(e, t) {
return n => e(n) || t(n)
}
function he(e) {
var t = Object.keys(e).map(t => {
var n = e[t];
return Object.prototype.hasOwnProperty.call(ce, t) ? ce[t](n) : ue(t, n)
});
return 0 === t.length ? null : t.reduce(le)
}
function fe(e, t, n = !0, r = 1 / 0) {
return se(ce.tag_name(e), t, n, r)
}
function de(e, t) {
var 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;
var o, c, u, l, s = Math.min(n.length, r.length);
let a = 0;
for (; a < s && n[a] === r[a];) a++;
return 0 === a ? pe.DISCONNECTED : (c = (o = n[a - 1]).children, u = n[a], l = r[a], c.indexOf(u) > c.indexOf(l) ? o === t ? pe.FOLLOWING | pe.CONTAINED_BY : pe.FOLLOWING : o === e ? pe.PRECEDING | pe.CONTAINS : pe.PRECEDING)
}
function me(e) {
return (e = e.filter((e, t, n) => !n.includes(e, t + 1))).sort((e, t) => (e = de(e, t)) & pe.PRECEDING ? -1 : e & pe.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"
}(pe = pe || {});
const _e = ["url", "type", "lang"],
Ee = ["fileSize", "bitrate", "framerate", "samplingrate", "channels", "duration", "height", "width"];
function Te(e) {
return fe("media:content", e).map(e => {
var t = e.attribs, n = {medium: t.medium, isDefault: !!t.isDefault};
for (const e of _e) t[e] && (n[e] = t[e]);
for (const e of Ee) t[e] && (n[e] = parseInt(t[e], 10));
return t.expression && (n.expression = t.expression), n
})
}
function Ae(e, t) {
return fe(e, t, !0, 1)[0]
}
function ge(e, t, n = !1) {
return X(fe(e, t, n, 1)).trim()
}
function ve(e, t, n, r, i = !1) {
(n = ge(n, r, i)) && (e[t] = n)
}
function ye(e) {
return "rss" === e || "feed" === e || "rdf:RDF" === e
}
var Se = Object.freeze({
__proto__: null,
isTag: S,
isCDATA: C,
isText: N,
isComment: b,
isDocument: O,
hasChildren: k,
getOuterHTML: z,
getInnerHTML: function (e, t) {
return k(e) ? e.children.map(e => z(e, t)).join("") : ""
},
getText: function e(t) {
return Array.isArray(t) ? t.map(e).join("") : S(t) ? "br" === t.name ? "\n" : e(t.children) : C(t) ? e(t.children) : N(t) ? t.data : ""
},
textContent: X,
innerText: Z,
getChildren: J,
getParent: ee,
getSiblings: te,
getAttributeValue: function (e, t) {
return null == (e = e.attribs) ? void 0 : e[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);
var r = t.next = e.next;
if (r && (r.prev = t), r = t.parent = e.parent) {
const n = r.children;
n[n.lastIndexOf(e)] = t, e.parent = null
}
},
appendChild: function (e, t) {
ie(t), t.next = null, 1 < (t.parent = e).children.push(t) ? ((e = e.children[e.children.length - 2]).next = t).prev = e : t.prev = null
},
append: function (e, t) {
ie(t);
var n = e.parent, r = e.next;
if (t.next = r, ((t.prev = e).next = 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) {
ie(t), t.parent = e, t.prev = null, 1 !== e.children.unshift(t) ? ((e = e.children[1]).prev = t).next = e : t.next = null
},
prepend: function (e, t) {
ie(t);
var r, n = e.parent;
n && (r = n.children).splice(r.indexOf(e), 0, t), e.prev && (e.prev.next = t), t.parent = n, t.prev = e.prev, (t.next = 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 => S(n) && (t(n) || e(t, n.children)))
},
findAll: function (e, t) {
for (var n = [], r = [t], i = [0]; ;) if (i[0] >= r[0].length) {
if (1 === r.length) return n;
r.shift(), i.shift()
} else {
const t = r[0][i[0]++];
S(t) && (e(t) && n.push(t), 0 < t.children.length) && (i.unshift(0), r.unshift(t.children))
}
},
testElement: function (e, t) {
return !(e = he(e)) || e(t)
},
getElements: function (e, t, n, r = 1 / 0) {
return (e = he(e)) ? se(e, t, n, r) : []
},
getElementById: function (e, t, n = !0) {
return Array.isArray(t) || (t = [t]), oe(ue("id", e), t, n)
},
getElementsByTagName: fe,
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 (; 0 <= --t;) {
var n = e[t];
if (0 < t && 0 <= e.lastIndexOf(n, t - 1)) 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 pe
},
compareDocumentPosition: de,
uniqueSort: me,
getFeed: function (e) {
return (e = Ae(ye, e)) ? ("feed" === e.name ? function (e) {
var r = {
type: "atom", items: fe("entry", e = e.children).map(e => {
var r = {media: Te(e = e.children)},
t = (ve(r, "id", "id", e), ve(r, "title", "title", e), null == (t = Ae("link", e)) ? void 0 : t.attribs.href);
return t && (r.link = t), (t = ge("summary", e) || ge("content", e)) && (r.description = t), (t = ge("updated", e)) && (r.pubDate = new Date(t)), r
})
},
t = (ve(r, "id", "id", e), ve(r, "title", "title", e), null == (t = Ae("link", e)) ? void 0 : t.attribs.href);
return t && (r.link = t), ve(r, "description", "subtitle", e), (t = ge("updated", e)) && (r.updated = new Date(t)), ve(r, "author", "email", e, !0), r
} : function (e) {
var t = null != (t = null == (t = Ae("channel", e.children)) ? void 0 : t.children) ? t : [], e = {
type: e.name.substr(0, 3), id: "", items: fe("item", e.children).map(e => {
var n = {media: Te(e = e.children)};
return ve(n, "id", "guid", e), ve(n, "title", "title", e), ve(n, "link", "link", e), ve(n, "description", "description", e), (e = ge("pubDate", e) || ge("dc:date", e)) && (n.pubDate = new Date(e)), n
})
},
s = (ve(e, "title", "title", t), ve(e, "link", "link", t), ve(e, "description", "description", t), ge("lastBuildDate", t));
return s && (e.updated = new Date(s)), ve(e, "author", "managingEditor", t, !0), e
})(e) : null
}
}), Ce = function () {
return (Ce = 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
}).apply(this, arguments)
};
function Ne(e, t, n) {
return e ? e(null != t ? t : e._root.children, null, void 0, n).toString() : ""
}
function be(e, t) {
return Ne(this, function (e) {
return !("object" != typeof e || null == e || "length" in e || "type" in e)
}(e) ? void (t = e) : e, Ce(Ce(Ce({}, n), null == this ? void 0 : this._options), i(null != t ? t : {})))
}
function Ie(e) {
return Ne(this, e, Ce(Ce({}, this._options), {xmlMode: !0}))
}
function Oe(e) {
for (var t = e || (this ? this.root() : []), n = "", r = 0; r < t.length; r++) n += X(t[r]);
return n
}
function ke(e, t, r) {
return void 0 === r && (r = "boolean" == typeof t && t), e && "string" == typeof e ? ("boolean" == typeof t && (r = t), t = this.load(e, n, !1), r || t("script").remove(), t.root()[0].children.slice()) : null
}
function Le() {
return this(this._root)
}
function De(e, t) {
if (t !== e) for (var n = t; n && n !== n.parent;) if ((n = n.parent) === e) return !0;
return !1
}
function Re(e, t) {
if (we(e) && we(t)) {
for (var n = e.length, r = +t.length, i = 0; i < r; i++) e[n++] = t[i];
return e.length = n, e
}
}
function we(e) {
if (!Array.isArray(e)) {
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 xe, Me = Object.freeze({
__proto__: null,
html: be,
xml: Ie,
text: Oe,
parseHTML: ke,
root: Le,
contains: De,
merge: Re
});
function Pe(e) {
return null != e.cheerio
}
function Be(e, t) {
for (var n = e.length, r = 0; r < n; r++) t(e[r], r);
return e
}
function Fe(e) {
var e = "length" in e ? Array.prototype.map.call(e, function (e) {
return L(e, !0)
}) : [L(e, !0)], n = new v(e);
return e.forEach(function (e) {
e.parent = n
}), e
}
function Ue(e) {
var n, t = e.indexOf("<");
return !(t < 0 || t > e.length - 3) && ((n = e.charCodeAt(t + 1)) >= xe.LowerA && n <= xe.LowerZ || n >= xe.UpperA && n <= xe.UpperZ || n === xe.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"
}(xe = xe || {});
var He = Object.prototype.hasOwnProperty, Ge = /\s+/, je = "data-", qe = {null: null, true: !0, false: !1},
Ye = /^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,
Ke = /^{[^]*}$|^\[[^]*]$/;
function We(e, t, n) {
if (e && S(e)) return null == e.attribs && (e.attribs = {}), t ? He.call(e.attribs, t) ? !n && Ye.test(t) ? t : e.attribs[t] : "option" === e.name && "value" === t ? Oe(e.children) : "input" !== e.name || "radio" !== e.attribs.type && "checkbox" !== e.attribs.type || "value" !== t ? void 0 : "on" : e.attribs
}
function Ve(e, t, n) {
null === n ? Ze(e, t) : e.attribs[t] = "".concat(n)
}
function $e(e, t, n) {
return t in e ? e[t] : !n && Ye.test(t) ? void 0 !== We(e, t, !1) : We(e, t, n)
}
function Qe(e, t, n, r) {
t in e ? e[t] = n : Ve(e, t, !r && Ye.test(t) ? n ? "" : null : "".concat(n))
}
function ze(e, t, n) {
null == e.data && (e.data = {}), "object" == typeof t ? Object.assign(e.data, t) : "string" == typeof t && void 0 !== n && (e.data[t] = n)
}
function Xe(e, t) {
for (var n, i, r = null == t ? (n = Object.keys(e.attribs).filter(function (e) {
return e.startsWith(je)
})).map(function (e) {
return e.slice(je.length).replace(/[_.-](\w|$)/g, function (e, t) {
return t.toUpperCase()
})
}) : (n = [je + t.replace(/[A-Z]/g, "-$&").toLowerCase()], [t]), a = 0; a < n.length; ++a) {
var o = n[a], c = r[a];
if (He.call(e.attribs, o) && !He.call(e.data, c)) {
if (i = e.attribs[o], He.call(qe, i)) i = qe[i]; else if (i === String(Number(i))) i = Number(i); else if (Ke.test(i)) try {
i = JSON.parse(i)
} catch (e) {
}
e.data[c] = i
}
}
return null == t ? e.data : i
}
function Ze(e, t) {
e.attribs && He.call(e.attribs, t) && delete e.attribs[t]
}
function Je(e) {
return e ? e.trim().split(Ge) : []
}
var et, tt, nt = Object.freeze({
__proto__: null, attr: function (e, t) {
if ("object" != typeof e && void 0 === t) return 1 < arguments.length ? this : We(this[0], e, this.options.xmlMode);
if ("function" != typeof t) return Be(this, function (n) {
S(n) && ("object" == typeof e ? Object.keys(e).forEach(function (t) {
var r = e[t];
Ve(n, t, r)
}) : Ve(n, e, t))
});
if ("string" != typeof e) throw new Error("Bad combination of arguments.");
return Be(this, function (n, r) {
S(n) && Ve(n, e, t.call(n, r, n.attribs[e]))
})
}, prop: function (e, t) {
var r = this;
if ("string" == typeof e && void 0 === t) {
var i = this[0];
if (!i || !S(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":
return a = null == (a = i.attribs) ? void 0 : a[e], "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 === a || !this.options.baseURI ? a : new URL(a, this.options.baseURI).href;
case"innerText":
return Z(i);
case"textContent":
return X(i);
case"outerHTML":
return this.clone().wrap("<container />").parent().html();
case"innerHTML":
return this.html();
default:
return $e(i, e, this.options.xmlMode)
}
}
if ("object" == typeof e || void 0 !== t) {
if ("function" != typeof t) return Be(this, function (n) {
S(n) && ("object" == typeof e ? Object.keys(e).forEach(function (t) {
var i = e[t];
Qe(n, t, i, r.options.xmlMode)
}) : Qe(n, e, t, r.options.xmlMode))
});
if ("object" == typeof e) throw new Error("Bad combination of arguments.");
return Be(this, function (n, i) {
S(n) && Qe(n, e, t.call(n, i, $e(n, e, r.options.xmlMode)), r.options.xmlMode)
})
}
}, data: function (e, t) {
var r = this[0];
if (r && S(r)) return null == r.data && (r.data = {}), e ? "object" == typeof e || void 0 !== t ? (Be(this, function (n) {
S(n) && ("object" == typeof e ? ze(n, e) : ze(n, e, t))
}), this) : He.call(r.data, e) ? r.data[e] : Xe(r, e) : Xe(r)
}, val: function (e) {
var t = 0 === arguments.length, n = this[0];
if (!n || !S(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) return this.attr("multiple") ? r.toArray().map(function (e) {
return Oe(e.children)
}) : r.attr("value");
if (null != this.attr("multiple") || "object" != typeof e) {
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;
case"input":
case"option":
return t ? this.attr("value") : this.attr("value", e)
}
}, removeAttr: function (e) {
for (var t = Je(e), r = this, i = 0; i < t.length; i++) !function (e) {
Be(r, function (n) {
S(n) && Ze(n, t[e])
})
}(i);
return this
}, hasClass: function (e) {
return this.toArray().some(function (t) {
var n = S(t) && t.attribs.class, r = -1;
if (n && e.length) for (; -1 < (r = n.indexOf(e, r + 1));) {
var i = r + e.length;
if ((0 === r || Ge.test(n[r - 1])) && (i === n.length || Ge.test(n[i]))) return !0
}
return !1
})
}, addClass: function e(t) {
if ("function" == typeof t) return Be(this, function (n, r) {
var i;
S(n) && (i = n.attribs.class || "", e.call([n], t.call(n, r, i)))
});
if (t && "string" == typeof t) for (var n = t.split(Ge), r = this.length, i = 0; i < r; i++) {
var s = this[i];
if (S(s)) {
var a = We(s, "class", !1);
if (a) {
for (var o = " ".concat(a, " "), c = 0; c < n.length; c++) {
var u = "".concat(n[c], " ");
o.includes(" ".concat(u)) || (o += u)
}
Ve(s, "class", o.trim())
} else Ve(s, "class", n.join(" ").trim())
}
}
return this
}, removeClass: function e(t) {
var n, r, i;
return "function" == typeof t ? Be(this, function (n, r) {
S(n) && e.call([n], t.call(n, r, n.attribs.class || ""))
}) : (n = Je(t), r = n.length, i = 0 === arguments.length, Be(this, function (e) {
if (S(e)) if (i) e.attribs.class = ""; else {
for (var t = Je(e.attribs.class), s = !1, a = 0; a < r; a++) {
var o = t.indexOf(n[a]);
0 <= o && (t.splice(o, 1), s = !0, a--)
}
s && (e.attribs.class = t.join(" "))
}
}))
}, toggleClass: function e(t, n) {
if ("function" == typeof t) return Be(this, function (r, i) {
S(r) && e.call([r], t.call(r, i, r.attribs.class || "", n), n)
});
if (t && "string" == typeof t) for (var r = t.split(Ge), i = r.length, s = "boolean" == typeof n ? n ? 1 : -1 : 0, a = this.length, o = 0; o < a; o++) {
var c = this[o];
if (S(c)) {
for (var u = Je(c.attribs.class), l = 0; l < i; l++) {
var h = u.indexOf(r[l]);
0 <= s && h < 0 ? u.push(r[l]) : s <= 0 && 0 <= h && u.splice(h, 1)
}
c.attribs.class = u.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"
}(et = et || {}), 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"
}(tt = tt || {});
const rt = /^[^\\#]?(?:\\(?:[\da-f]{1,6}\s?|.)|[\w\-\u00b0-\uFFFF])+/, it = /\\([\da-f]{1,6}\s?|(\s)|.)/gi,
st = new Map([[126, tt.Element], [94, tt.Start], [36, tt.End], [42, tt.Any], [33, tt.Not], [124, tt.Hyphen]]),
at = new Set(["has", "not", "matches", "is", "where", "host", "host-context"]);
function ot(e) {
switch (e.type) {
case et.Adjacent:
case et.Child:
case et.Descendant:
case et.Parent:
case et.Sibling:
case et.ColumnCombinator:
return !0;
default:
return !1
}
}
const ct = new Set(["contains", "icontains"]);
function ut(e, t, n) {
var r = parseInt(t, 16) - 65536;
return r != r || n ? t : r < 0 ? String.fromCharCode(65536 + r) : String.fromCharCode(r >> 10 | 55296, 1023 & r | 56320)
}
function lt(e) {
return e.replace(it, ut)
}
function ht(e) {
return 39 === e || 34 === e
}
function ft(e) {
return 32 === e || 9 === e || 10 === e || 12 === e || 13 === e
}
function pt(e) {
var t = [], n = dt(t, "" + e, 0);
if (n < e.length) throw new Error("Unmatched selector: " + e.slice(n));
return t
}
function dt(e, t, n) {
let r = [];
function i(e) {
var r = t.slice(n + e).match(rt);
if (r) return [r] = r, n += e + r.length, lt(r);
throw new Error("Expected name, found " + t.slice(n))
}
function s(e) {
for (n += e; n < t.length && ft(t.charCodeAt(n));) n++
}
function a() {
var e = n += 1;
let r = 1;
for (; 0 < r && 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 lt(t.slice(e, n - 1))
}
function o(e) {
let n = 0;
for (; 92 === t.charCodeAt(--e);) n++;
return 1 == (1 & n)
}
function c() {
if (0 < r.length && ot(r[r.length - 1])) throw new Error("Did not expect successive traversals.")
}
function u(e) {
0 < r.length && r[r.length - 1].type === et.Descendant ? r[r.length - 1].type = e : (c(), r.push({type: e}))
}
function l(e, t) {
r.push({type: et.Attribute, name: e, action: t, value: i(1), namespace: null, ignoreCase: "quirks"})
}
function h() {
if (r.length && r[r.length - 1].type === et.Descendant && r.pop(), 0 === r.length) throw new Error("Empty sub-selector");
e.push(r)
}
if (s(0), t.length !== 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 === et.Descendant || (c(), r.push({type: et.Descendant})), s(1);
break;
case 62:
u(et.Child), s(1);
break;
case 60:
u(et.Parent), s(1);
break;
case 126:
u(et.Sibling), s(1);
break;
case 43:
u(et.Adjacent), s(1);
break;
case 46:
l("class", tt.Element);
break;
case 35:
l("id", tt.Equals);
break;
case 91: {
let e, a = (s(1), null),
c = (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), tt.Exists);
const u = st.get(t.charCodeAt(n));
if (u) {
if (c = u, 61 !== t.charCodeAt(n + 1)) throw new Error("Expected `=`");
s(2)
} else 61 === t.charCodeAt(n) && (c = tt.Equals, s(1));
let l = "", h = null;
if ("exists" !== c) {
if (ht(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");
l = lt(t.slice(n + 1, r)), n = r + 1
} else {
const e = n;
for (; n < t.length && (!ft(t.charCodeAt(n)) && 93 !== t.charCodeAt(n) || o(n));) n += 1;
l = lt(t.slice(e, n))
}
s(0);
const e = 32 | t.charCodeAt(n);
115 == e ? (h = !1, s(1)) : 105 == e && (h = !0, s(1))
}
if (93 !== t.charCodeAt(n)) throw new Error("Attribute selector didn't terminate");
n += 1;
var f = {type: et.Attribute, name: e, action: c, value: l, namespace: a, ignoreCase: h};
r.push(f);
break
}
case 58: {
if (58 === t.charCodeAt(n + 1)) {
r.push({
type: et.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 (at.has(e)) {
if (ht(t.charCodeAt(n + 1))) throw new Error(`Pseudo-selector ${e} cannot be quoted`);
if (s = [], n = dt(s, t, n + 1), 41 !== t.charCodeAt(n)) throw new Error(`Missing closing parenthesis in :${e} (${t})`);
n += 1
} else {
if (s = a(), ct.has(e)) {
const e = s.charCodeAt(0);
e === s.charCodeAt(s.length - 1) && ht(e) && (s = s.slice(1, -1))
}
s = lt(s)
}
r.push({type: et.Pseudo, name: e, data: s});
break
}
case 44:
h(), 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)
} else {
let a, o = null;
if (42 === e) n += 1, a = "*"; else if (124 === e) {
if (a = "", 124 === t.charCodeAt(n + 1)) {
u(et.ColumnCombinator), s(2);
break
}
} else {
if (!rt.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: et.Universal,
namespace: o
} : {type: et.Tag, name: a, namespace: o})
}
}
}
h()
}
return n
}
var Jt, mt = {
trueFunc: function () {
return !0
}, falseFunc: function () {
return !1
}
}, _t = mt.trueFunc;
const Et = new Map([[et.Universal, 50], [et.Tag, 30], [et.Attribute, 1], [et.Pseudo, 0]]);
function Tt(e) {
return !Et.has(e.type)
}
const At = new Map([[tt.Exists, 10], [tt.Equals, 8], [tt.Not, 7], [tt.Start, 6], [tt.End, 6], [tt.Any, 5]]);
function gt(e) {
var t = e.map(vt);
for (let n = 1; n < e.length; n++) {
var r = t[n];
if (!(r < 0)) for (let i = n - 1; 0 <= i && 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 vt(e) {
var t;
let r = null != (t = Et.get(e.type)) ? t : -1;
return e.type === et.Attribute ? (r = null != (t = At.get(e.action)) ? t : 4, e.action === tt.Equals && "id" === e.name && (r = 9), e.ignoreCase && (r >>= 1)) : e.type === et.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(vt))))) < 0 && (r = 0) : r = 2 : r = 3), r
}
const yt = /[-[\]{}()*+?.,\\^$|#\s]/g;
function St(e) {
return e.replace(yt, "\\$&")
}
const Ct = 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 Nt(e, t) {
return "boolean" == typeof e.ignoreCase ? e.ignoreCase : "quirks" === e.ignoreCase ? !!t.quirksMode : !t.xmlMode && Ct.has(e.name)
}
const bt = {
equals(e, t, n) {
const r = n.adapter, i = t.name;
let s = t.value;
return Nt(t, n) ? (s = s.toLowerCase(), t => {
var 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 r = n.adapter, i = t.name;
let s = t.value;
const a = s.length;
return Nt(t, n) ? (s = s.toLowerCase(), function (t) {
var n = r.getAttributeValue(t, i);
return null != n && (n.length === a || "-" === n.charAt(a)) && n.substr(0, a).toLowerCase() === s && e(t)
}) : function (t) {
var 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 r = n.adapter, {name: i, value: s} = t;
if (/\s/.test(s)) return mt.falseFunc;
const a = new RegExp(`(?:^|\\s)${St(s)}(?:$|\\s)`, Nt(t, n) ? "i" : "");
return function (t) {
var 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 r = n.adapter, i = t.name;
let s = t.value;
const a = s.length;
return 0 === a ? mt.falseFunc : Nt(t, n) ? (s = s.toLowerCase(), t => {
var 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)) || !n.startsWith(s)) && e(t)
}
}, end(e, t, n) {
const r = n.adapter, i = t.name;
let s = t.value;
const a = -s.length;
return 0 == a ? mt.falseFunc : Nt(t, n) ? (s = s.toLowerCase(), t => {
var n;
return (null == (n = r.getAttributeValue(t, i)) ? void 0 : n.substr(a).toLowerCase()) === s && e(t)
}) : t => {
var n;
return !(null == (n = r.getAttributeValue(t, i)) || !n.endsWith(s)) && e(t)
}
}, any(e, t, n) {
const r = n.adapter, {name: i, value: s} = t;
if ("" === s) return mt.falseFunc;
if (Nt(t, n)) {
const t = new RegExp(St(s), "i");
return function (n) {
var 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)) || !n.includes(s)) && e(t)
}
}, not(e, t, n) {
const r = n.adapter, i = t.name;
let s = t.value;
return "" === s ? t => !!r.getAttributeValue(t, i) && e(t) : Nt(t, n) ? (s = s.toLowerCase(), t => {
var 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)
}
}, It = new Set([9, 10, 12, 13, 32]), Ot = "0".charCodeAt(0), kt = "9".charCodeAt(0);
function Lt(e) {
return function (e) {
const t = e[0], n = e[1] - 1;
if (n < 0 && t <= 0) return mt.falseFunc;
if (-1 === t) return e => e <= n;
if (0 === t) return e => e === n;
if (1 === t) return n < 0 ? mt.trueFunc : e => e >= n;
const r = Math.abs(t), i = (n % r + r) % r;
return 1 < t ? e => e >= n && e % r == i : e => e <= n && e % r == i
}(function (e) {
if ("even" === (e = e.trim().toLowerCase())) return [2, 0];
if ("odd" === e) return [2, 1];
let t = 0, n = 0, r = s(), i = a();
if (t < e.length && "n" === e.charAt(t) && (t++, n = r * (null != i ? i : 1), o(), t < e.length ? (r = s(), o(), i = a()) : r = i = 0), null === i || t < e.length) throw new Error(`n-th rule couldn't be parsed ('${e}')`);
return [n, r * i];
function s() {
return "-" === e.charAt(t) ? (t++, -1) : ("+" === e.charAt(t) && t++, 1)
}
function a() {
var n = t;
let r = 0;
for (; t < e.length && e.charCodeAt(t) >= Ot && e.charCodeAt(t) <= kt;) r = 10 * r + (e.charCodeAt(t) - Ot), t++;
return t === n ? null : r
}
function o() {
for (; t < e.length && It.has(e.charCodeAt(t));) t++
}
}(e))
}
function Dt(e, t) {
return n => {
var r = t.getParent(n);
return null != r && t.isTag(r) && e(n)
}
}
const Rt = {
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 = Lt(t);
return i === mt.falseFunc ? mt.falseFunc : i === mt.trueFunc ? Dt(e, n) : function (t) {
var 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 = Lt(t);
return i === mt.falseFunc ? mt.falseFunc : i === mt.trueFunc ? Dt(e, n) : function (t) {
var s = n.getSiblings(t);
let a = 0;
for (let e = s.length - 1; 0 <= e && !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 = Lt(t);
return i === mt.falseFunc ? mt.falseFunc : i === mt.trueFunc ? Dt(e, n) : function (t) {
var 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 = Lt(t);
return i === mt.falseFunc ? mt.falseFunc : i === mt.trueFunc ? Dt(e, n) : function (t) {
var s = n.getSiblings(t);
let a = 0;
for (let e = s.length - 1; 0 <= e; 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 => {
var r = n.getParent(t);
return (null == r || !n.isTag(r)) && e(t)
}, scope(e, t, n, r) {
const i = n.equals;
return r && 0 !== r.length ? 1 === r.length ? t => i(r[0], t) && e(t) : t => r.includes(t) && e(t) : Rt.root(e, t, n)
}, hover: wt("isHovered"), visited: wt("isVisited"), active: wt("isActive")
};
function wt(e) {
return function (t, n, {adapter: r}) {
const i = r[e];
return "function" != typeof i ? mt.falseFunc : function (e) {
return i(e) && t(e)
}
}
}
const xt = {
empty: (e, {adapter: t}) => !t.getChildren(e).some(e => t.isTag(e) || "" !== t.getText(e)),
"first-child"(e, {adapter: t, equals: n}) {
var r;
return t.prevElementSibling ? null == t.prevElementSibling(e) : null != (r = t.getSiblings(e).find(e => t.isTag(e))) && n(e, r)
},
"last-child"(e, {adapter: t, equals: n}) {
var r = t.getSiblings(e);
for (let i = r.length - 1; 0 <= i; i--) {
if (n(e, r[i])) return !0;
if (t.isTag(r[i])) break
}
return !1
},
"first-of-type"(e, {adapter: t, equals: n}) {
var r = t.getSiblings(e), i = t.getName(e);
for (let s = 0; s < r.length; s++) {
var 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}) {
var r = t.getSiblings(e), i = t.getName(e);
for (let s = r.length - 1; 0 <= s; s--) {
var 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 Mt(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 Pt = {
"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])"
}, Bt = {};
function Ft(e, t) {
var n = t.getSiblings(e);
return n.length <= 1 || (e = n.indexOf(e)) < 0 || e === n.length - 1 ? [] : n.slice(e + 1).filter(t.isTag)
}
function Ut(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 Ht = (e, t, n, r, i) => {
const s = i(t, Ut(n), r);
return s === mt.trueFunc ? e : s === mt.falseFunc ? mt.falseFunc : t => s(t) && e(t)
}, Gt = {
is: Ht, matches: Ht, where: Ht, not(e, t, n, r, i) {
const s = i(t, Ut(n), r);
return s === mt.falseFunc ? e : s === mt.trueFunc ? mt.falseFunc : t => !s(t) && e(t)
}, has(e, t, n, r, i) {
const s = n.adapter, a = Ut(n), o = (a.relativeSelector = !0, t.some(e => e.some(Tt)) ? [Bt] : void 0),
c = i(t, a, o);
if (c === mt.falseFunc) return mt.falseFunc;
const u = function (e, t) {
return e === mt.falseFunc ? mt.falseFunc : n => t.isTag(n) && e(n)
}(c, s);
if (o && c !== mt.trueFunc) {
const {shouldTestNextSiblings: t = !1} = c;
return n => {
if (!e(n)) return !1;
o[0] = n;
var r = s.getChildren(n), n = t ? [...r, ...Ft(n, s)] : r;
return s.existsOne(u, n)
}
}
return t => e(t) && s.existsOne(u, s.getChildren(t))
}
};
function jt(e, t) {
return (e = t.getParent(e)) && t.isTag(e) ? e : null
}
function qt(e, t, n, r, i) {
const {adapter: s, equals: a} = n;
switch (t.type) {
case et.PseudoElement:
throw new Error("Pseudo-elements are not supported by css-select");
case et.ColumnCombinator:
throw new Error("Column combinators are not yet supported by css-select");
case et.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()), bt[t.action](e, t, n);
case et.Pseudo:
return function (e, t, n, r, i) {
const {name: a, data: o} = t;
if (Array.isArray(o)) {
if (a in Gt) return Gt[a](e, o, n, r, i);
throw new Error(`Unknown pseudo-class :${a}(${o})`)
}
const c = null == (t = n.pseudos) ? void 0 : t[a], u = "string" == typeof c ? c : Pt[a];
if ("string" == typeof u) {
if (null != o) throw new Error(`Pseudo ${a} doesn't have any arguments`);
const t = pt(u);
return Gt.is(e, t, n, r, i)
}
if ("function" == typeof c) return Mt(c, a, o, 1), t => c(t, o) && e(t);
if (a in Rt) return Rt[a](e, o, n, r);
if (a in xt) {
const t = xt[a];
return Mt(t, a, o, 2), r => t(r, n, o) && e(r)
}
throw new Error("Unknown pseudo-class :" + a)
}(e, t, n, r, i);
case et.Tag: {
if (null != t.namespace) throw new Error("Namespaced tag names are not yet supported by css-select");
let r = t.name;
return n.xmlMode && !n.lowerCaseTags || (r = r.toLowerCase()), function (t) {
return s.getName(t) === r && e(t)
}
}
case et.Descendant: {
if (!1 === n.cacheResults || "undefined" == typeof WeakSet) return function (t) {
let n = t;
for (; n = jt(n, s);) if (e(n)) return !0;
return !1
};
const t = new WeakSet;
return function (n) {
let r = n;
for (; r = jt(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 = jt(n, s));
return !1
};
case et.Parent:
return function (t) {
return s.getChildren(t).some(t => s.isTag(t) && e(t))
};
case et.Child:
return function (t) {
return null != (t = s.getParent(t)) && s.isTag(t) && e(t)
};
case et.Sibling:
return function (t) {
var n = s.getSiblings(t);
for (let r = 0; r < n.length; r++) {
var i = n[r];
if (a(t, i)) break;
if (s.isTag(i) && e(i)) return !0
}
return !1
};
case et.Adjacent:
return s.prevElementSibling ? function (t) {
return null != (t = s.prevElementSibling(t)) && e(t)
} : function (t) {
var n = s.getSiblings(t);
let r;
for (let e = 0; e < n.length; e++) {
var i = n[e];
if (a(t, i)) break;
s.isTag(i) && (r = i)
}
return !!r && e(r)
};
case et.Universal:
if (null != t.namespace && "*" !== t.namespace) throw new Error("Namespaced universal selectors are not yet supported by css-select");
return e
}
}
function Yt(e) {
return e.type === et.Pseudo && ("scope" === e.name || Array.isArray(e.data) && e.data.some(e => e.some(Yt)))
}
const Kt = {type: et.Descendant}, Wt = {type: "_flexibleDescendant"}, Vt = {type: et.Pseudo, name: "scope", data: null};
function $t(e, t, n) {
e.forEach(gt), n = null != (r = t.context) ? r : n;
const i = Array.isArray(n), s = n && (Array.isArray(n) ? n : [n]);
if (!1 !== t.relativeSelector) !function (e, {adapter: t}, n) {
var r = !(null == n || !n.every(e => {
var n = t.isTag(e) && t.getParent(e);
return e === Bt || n && t.isTag(n)
}));
for (const t of e) {
if (!(0 < t.length && Tt(t[0]) && t[0].type !== et.Descendant)) {
if (!r || t.some(Yt)) continue;
t.unshift(Kt)
}
t.unshift(Vt)
}
}(e, t, s); else if (e.some(e => 0 < e.length && Tt(e[0]))) throw new Error("Relative selectors are not allowed when the `relativeSelector` option is disabled");
let a = !1;
var r = e.map(e => {
if (2 <= e.length) {
const [t, n] = e;
t.type === et.Pseudo && "scope" === t.name && (i && n.type === et.Descendant ? e[1] = Wt : n.type !== et.Adjacent && n.type !== et.Sibling || (a = !0))
}
return function (e, t, n) {
return e.reduce((e, r) => e === mt.falseFunc ? mt.falseFunc : qt(e, r, t, n, $t), null != (e = t.rootFunc) ? e : mt.trueFunc)
}(e, t, s)
}).reduce(Qt, mt.falseFunc);
return r.shouldTestNextSiblings = a, r
}
function Qt(e, t) {
return t === mt.falseFunc || e === mt.trueFunc ? e : e === mt.falseFunc || t === mt.trueFunc ? t : function (n) {
return e(n) || t(n)
}
}
const zt = (e, t) => e === t, Xt = {adapter: Se, equals: zt}, Zt = (Jt = $t, function (e, t, n) {
return t = function (e) {
var r;
return null == (e = null != e ? e : Xt).adapter && (e.adapter = Se), null == e.equals && (e.equals = null != (r = null == (r = e.adapter) ? void 0 : r.equals) ? r : zt), e
}(t), Jt(e, t, n)
});
function en(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 = Ft(n[e], t);
n.push(...r)
}
return n
}(e, t)), Array.isArray(e) ? t.removeSubsets(e) : t.getChildren(e)
}
const tn = new Set(["first", "last", "eq", "gt", "nth", "lt", "even", "odd"]);
function nn(e) {
return "pseudo" === e.type && (!!tn.has(e.name) || !("not" !== e.name || !Array.isArray(e.data)) && e.data.some(e => e.some(nn)))
}
function rn(e) {
var t = [], n = [];
for (const r of e) (r.some(nn) ? t : n).push(r);
return [n, t]
}
const sn = {type: et.Universal, namespace: null}, an = {type: et.Pseudo, name: "scope", data: null};
function on(e, t, n = {}) {
return cn([e], t, n)
}
function cn(e, t, n = {}) {
var i;
return "function" == typeof t ? e.some(t) : ([t, i] = rn(pt(t)), 0 < t.length && e.some(Zt(t, n)) || i.some(t => 0 < hn(t, e, n).length))
}
function un(e, t, n = {}) {
return ln(pt(e), t, n)
}
function ln(e, t, n) {
if (0 === t.length) return [];
const [r, i] = rn(e);
let s;
if (r.length) {
const e = mn(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 => S(e) && !s.has(e)) : t;
if (0 === a.length) break;
var o = hn(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 hn(e, t, n) {
var r, s;
return e.some(ot) ? (r = null != (r = n.root) ? r : function (e) {
for (; e.parent;) e = e.parent;
return e
}(t[0]), s = {
...n,
context: t,
relativeSelector: !1
}, e.push(an), fn(r, e, s, !0, t.length)) : fn(t, e, n, !1, t.length)
}
function fn(e, t, n, r, i) {
var s = t.findIndex(nn), a = t.slice(0, s), o = t[s], c = t.length - 1 === s ? i : 1 / 0;
if (0 === (c = function (e, t, n) {
var r = null != t ? parseInt(t, 10) : NaN;
switch (e) {
case"first":
return 1;
case"nth":
case"eq":
return isFinite(r) ? 0 <= r ? r + 1 : 1 / 0 : 0;
case"lt":
return isFinite(r) ? 0 <= r ? 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))) return [];
r = (0 !== a.length || Array.isArray(e) ? 0 === a.length ? (Array.isArray(e) ? e : [e]).filter(S) : r || a.some(ot) ? pn(e, [a], n, c) : mn(e, [a], n) : J(e).filter(S)).slice(0, c);
let h = function (e, t, n, r) {
var i = "string" == typeof n ? parseInt(n, 10) : NaN;
switch (e) {
case"first":
case"lt":
return t;
case"last":
return 0 < t.length ? [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(ln(n, t, r));
return t.filter(t => !e.has(t))
}
}
}(o.name, r, o.data, n);
if (0 === h.length || t.length === s + 1) return h;
if (e = (a = t.slice(s + 1)).some(ot)) {
if (ot(a[0])) {
const e = a[0].type;
e !== et.Sibling && e !== et.Adjacent || (h = en(h, Se, !0)), a.unshift(sn)
}
n = {...n, relativeSelector: !1, rootFunc: e => h.includes(e)}
} else n.rootFunc && n.rootFunc !== _t && (n = {...n, rootFunc: _t});
return a.some(nn) ? fn(h, a, n, !1, i) : e ? pn(h, [a], n, i) : mn(h, [a], n)
}
function pn(e, t, n, r) {
return dn(e, Zt(t, n, e), r)
}
function dn(e, t, n = 1 / 0) {
return ae(e => S(e) && t(e), en(e, Se, t.shouldTestNextSiblings), !0, n)
}
function mn(e, t, n) {
return 0 === (e = (Array.isArray(e) ? e : [e]).filter(S)).length || (t = Zt(t, n)) === _t ? e : e.filter(t)
}
var _n = 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))[i] = t[i]);
return e.concat(r || Array.prototype.slice.call(t))
}, En = /^\s*[~+]/;
function Tn(e) {
return function (t) {
for (var n = [], r = 1; r < arguments.length; r++) n[r - 1] = arguments[r];
return function (r) {
var s = e(t, this);
return r && (s = Mn(s, r, this.options.xmlMode, null == (r = this._root) ? void 0 : r[0])), this._make(1 < this.length && 1 < s.length ? n.reduce(function (e, t) {
return t(e)
}, s) : s)
}
}
}
var An = Tn(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)
}), gn = Tn(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 vn(e) {
for (var t = [], n = 1; n < arguments.length; n++) t[n - 1] = arguments[n];
var r = null, i = Tn(function (e, t) {
var n = [];
return Be(t, function (t) {
for (var i; (i = e(t)) && (null == r || !r(i, n.length)); t = i) n.push(i)
}), n
}).apply(void 0, _n([e], t, !1));
return function (e, t) {
var n = this, t = (r = "string" == typeof e ? function (t) {
return on(t, e, n.options)
} : e ? xn(e) : null, i.call(this, t));
return r = null, t
}
}
function yn(e) {
return Array.from(new Set(e))
}
var Sn = gn(function (e) {
return (e = e.parent) && !O(e) ? e : null
}, yn), Cn = An(function (e) {
for (var t = []; e.parent && !O(e.parent);) t.push(e.parent), e = e.parent;
return t
}, me, function (e) {
return e.reverse()
}), Nn = vn(function (e) {
return (e = e.parent) && !O(e) ? e : null
}, me, function (e) {
return e.reverse()
}), bn = gn(function (e) {
return ne(e)
}), In = An(function (e) {
for (var t = []; e.next;) S(e = e.next) && t.push(e);
return t
}, yn), On = vn(function (e) {
return ne(e)
}, yn), kn = gn(function (e) {
return re(e)
}), Ln = An(function (e) {
for (var t = []; e.prev;) S(e = e.prev) && t.push(e);
return t
}, yn), Dn = vn(function (e) {
return re(e)
}, yn), Rn = An(function (e) {
return te(e).filter(function (t) {
return S(t) && t !== e
})
}, me), wn = An(function (e) {
return J(e).filter(S)
}, yn);
function xn(e) {
return "function" == typeof e ? function (t, n) {
return e.call(t, n, t)
} : Pe(e) ? function (t) {
return Array.prototype.includes.call(e, t)
} : function (t) {
return e === t
}
}
function Mn(e, t, n, r) {
return "string" == typeof t ? un(t, e, {xmlMode: n, root: r}) : e.filter(xn(t))
}
var Pn = Object.freeze({
__proto__: null,
find: function (e) {
var n, r, t;
return e ? (n = this.toArray(), "string" != typeof e ? (r = Pe(e) ? e.toArray() : [e], this._make(r.filter(function (e) {
return n.some(function (t) {
return De(t, e)
})
}))) : (r = En.test(e) ? n : this.children().toArray(), t = {
context: n,
root: null == (t = this._root) ? void 0 : t[0],
xmlMode: this.options.xmlMode,
lowerCaseTags: this.options.lowerCaseTags,
lowerCaseAttributeNames: this.options.lowerCaseAttributeNames,
pseudos: this.options.pseudos,
quirksMode: this.options.quirksMode
}, this._make(function (e, t, n) {
var s;
return "function" == typeof e ? dn(t, e) : ([e, s] = rn(pt(e)), s = s.map(e => fn(t, e, n, !0, 1 / 0)), e.length && s.push(pn(t, e, n, 1 / 0)), 0 === s.length ? [] : 1 === s.length ? s[0] : me(s.reduce((e, t) => [...e, ...t])))
}(e, r, t)))) : this._make([])
},
parent: Sn,
parents: Cn,
parentsUntil: Nn,
closest: function (e) {
var t, r, i, n = [];
return e && (r = {
xmlMode: this.options.xmlMode,
root: null == (t = this._root) ? void 0 : t[0]
}, i = "string" == typeof e ? function (t) {
return on(t, e, r)
} : xn(e), Be(this, function (e) {
for (; e && S(e);) {
if (i(e, 0)) {
n.includes(e) || n.push(e);
break
}
e = e.parent
}
})), this._make(n)
},
next: bn,
nextAll: In,
nextUntil: On,
prev: kn,
prevAll: Ln,
prevUntil: Dn,
siblings: Rn,
children: wn,
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];
null != (r = e.call(r, n, r)) && (t = t.concat(r))
}
return this._make(t)
},
filter: function (e) {
return this._make(Mn(this.toArray(), e, this.options.xmlMode, null == (e = this._root) ? void 0 : e[0]))
},
filterArray: Mn,
is: function (e) {
var t = this.toArray();
return "string" == typeof e ? cn(t.filter(S), e, this.options) : !!e && t.some(xn(e))
},
not: function (e) {
var n, r, t = this.toArray(),
t = "string" == typeof e ? (n = new Set(un(e, t, this.options)), t.filter(function (e) {
return !n.has(e)
})) : (r = xn(e), 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 0 < t._make(r).find(e).length
})
},
first: function () {
return 1 < this.length ? this._make(this[0]) : this
},
last: function () {
return 0 < this.length ? this._make(this[this.length - 1]) : this
},
eq: function (e) {
return 0 == (e = +e) && this.length <= 1 ? this : (e < 0 && (e = this.length + e), this._make(null != (e = this[e]) ? e : []))
},
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,
e = null == e ? (t = this.parent().children(), this[0]) : "string" == typeof e ? (t = this._make(e), this[0]) : (t = this, Pe(e) ? e[0] : e);
return Array.prototype.indexOf.call(t, e)
},
slice: function (e, t) {
return this._make(Array.prototype.slice.call(this, e, t))
},
end: function () {
var e;
return null != (e = this.prevObject) ? e : this._make([])
},
add: function (e, t) {
return e = this._make(e, t), t = me(_n(_n([], this.get(), !0), e.get(), !0)), this._make(t)
},
addBack: function (e) {
return this.prevObject ? this.add(e ? this.prevObject.filter(e) : this.prevObject) : this
}
});
function Bn(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 Fn = 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))[i] = t[i]);
return e.concat(r || Array.prototype.slice.call(t))
};
function Un(e) {
return function () {
for (var t = this, n = [], r = 0; r < arguments.length; r++) n[r] = arguments[r];
var i = this.length - 1;
return Be(this, function (r, s) {
var a;
k(r) && (a = "function" == typeof n[0] ? n[0].call(r, s, t._render(r.children)) : n, a = t._makeDomArray(a, s < i), e(a, r.children, r))
})
}
}
function Hn(e, t, n, r, i) {
for (var o = Fn([t, n], r, !0), c = 0 === t ? null : e[t - 1], u = t + n >= e.length ? null : e[t + n], l = 0; l < r.length; ++l) {
var p, h = r[l], f = h.parent;
f && -1 < (p = f.children.indexOf(h)) && (f.children.splice(p, 1), i === f) && p < t && o[0]--, h.parent = i, h.prev && (h.prev.next = null != (f = h.next) ? f : null), h.next && (h.next.prev = null != (p = h.prev) ? p : null), h.prev = 0 === l ? c : r[l - 1], h.next = l === r.length - 1 ? u : r[l + 1]
}
return c && (c.next = r[0]), u && (u.prev = r[r.length - 1]), e.splice.apply(e, o)
}
var Gn = Un(function (e, t, n) {
Hn(t, t.length, 0, e, n)
}), jn = Un(function (e, t, n) {
Hn(t, 0, 0, e, n)
});
function qn(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 || Ue(t) ? t : r.find(t).clone();
if ((a = this._makeDomArray(a, i < n)[0]) && k(a)) {
for (var c = a, u = 0; u < c.children.length;) {
var l = c.children[u];
S(l) ? (c = l, u = 0) : u++
}
e(s, c, [a])
}
}
return this
}
}
var Yn = qn(function (e, t, n) {
var i, s, r = e.parent;
r && (s = (i = r.children).indexOf(e), Bn([e], t), Hn(i, s, 0, n, r))
}), Kn = qn(function (e, t, n) {
k(e) && (Bn(e.children, t), Bn(n, e))
}), Wn = Object.freeze({
__proto__: null, _makeDomArray: function (e, t) {
var n = this;
return null == e ? [] : Pe(e) ? t ? Fe(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 ? Fe([e]) : [e]
}, appendTo: function (e) {
return (Pe(e) ? e : this._make(e)).append(this), this
}, prependTo: function (e) {
return (Pe(e) ? e : this._make(e)).prepend(this), this
}, append: Gn, prepend: jn, wrap: Yn, wrapInner: Kn, 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 Be(this, function (n, i) {
var a, o, s = n.parent;
k(n) && s && ((o = (a = s.children).indexOf(n)) < 0 || (n = "function" == typeof t[0] ? t[0].call(n, i, e._render(n.children)) : t, Hn(a, o + 1, 0, e._makeDomArray(n, i < r), s)))
})
}, insertAfter: function (e) {
var t = this, n = ("string" == typeof e && (e = this._make(e)), this.remove(), []);
return this._makeDomArray(e).forEach(function (e) {
var s, r = t.clone().toArray(), i = e.parent;
!i || (e = (s = i.children).indexOf(e)) < 0 || (Hn(s, e + 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 Be(this, function (n, i) {
var a, o, s = n.parent;
k(n) && s && ((o = (a = s.children).indexOf(n)) < 0 || (n = "function" == typeof t[0] ? t[0].call(n, i, e._render(n.children)) : t, Hn(a, o, 0, e._makeDomArray(n, i < r), s)))
})
}, insertBefore: function (e) {
var t = this, e = this._make(e), r = (this.remove(), []);
return Be(e, function (e) {
var s, n = t.clone().toArray(), i = e.parent;
!i || (e = (s = i.children).indexOf(e)) < 0 || (Hn(s, e, 0, n, i), r.push.apply(r, n))
}), this._make(r)
}, remove: function (e) {
return Be(e ? this.filter(e) : this, function (e) {
ie(e), e.prev = e.next = e.parent = null
}), this
}, replaceWith: function (e) {
var t = this;
return Be(this, function (n, r) {
var s, c, i = n.parent;
i && (s = i.children, r = "function" == typeof e ? e.call(n, r, n) : e, Bn(r = t._makeDomArray(r), null), c = s.indexOf(n), Hn(s, c, 1, r, i), r.includes(n) || (n.parent = n.prev = n.next = null))
})
}, empty: function () {
return Be(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 n, t = this;
return void 0 === e ? (n = this[0]) && k(n) ? this._render(n.children) : null : Be(this, function (n) {
k(n) && (n.children.forEach(function (e) {
e.next = e.prev = e.parent = null
}), Bn(Pe(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 ? Oe(this) : Be(this, "function" == typeof e ? function (n, r) {
return t._make(n).text(e.call(n, r, Oe([n])))
} : function (t) {
k(t) && (t.children.forEach(function (e) {
e.next = e.prev = e.parent = null
}), Bn(new _("".concat(e)), t))
})
}, clone: function () {
return this._make(Fe(this.get()))
}
});
function Vn(e, t, n, r) {
var i, a;
"string" == typeof t ? (i = $n(e), "" === (r = "function" == typeof n ? n.call(e, r, i[t]) : n) ? delete i[t] : null != r && (i[t] = r), e.attribs.style = (a = i, Object.keys(a).reduce(function (e, t) {
return "".concat(e).concat(e ? " " : "").concat(t, ": ").concat(a[t], ";")
}, ""))) : "object" == typeof t && Object.keys(t).forEach(function (n, r) {
Vn(e, n, t[n], r)
})
}
function $n(e, t) {
var n, r;
if (e && S(e)) return n = function (e) {
if (!(e = (e || "").trim())) return {};
for (var t, n = {}, r = 0, i = e.split(";"); r < i.length; r++) {
var o, s = i[r], a = s.indexOf(":");
a < 1 || a === s.length - 1 ? 0 < (o = s.trimEnd()).length && void 0 !== t && (n[t] += ";".concat(o)) : n[t = s.slice(0, a).trim()] = s.slice(a + 1).trim()
}
return n
}(e.attribs.style), "string" == typeof t ? n[t] : Array.isArray(t) ? (r = {}, t.forEach(function (e) {
null != n[e] && (r[e] = n[e])
}), r) : n
}
var tr, ar, _r, Tr, Qn = Object.freeze({
__proto__: null, css: function (e, t) {
return null != e && null != t || "object" == typeof e && !Array.isArray(e) ? Be(this, function (n, r) {
S(n) && Vn(n, e, t, r)
}) : 0 !== this.length ? $n(this[0], e) : void 0
}
}), zn = "input,select,textarea,keygen", Xn = /%20/g, Zn = /\r?\n/g, Jn = Object.freeze({
__proto__: null, serialize: function () {
return this.serializeArray().map(function (e) {
return "".concat(encodeURIComponent(e.name), "=").concat(encodeURIComponent(e.value))
}).join("&").replace(Xn, "+")
}, serializeArray: function () {
var e = this;
return this.map(function (t, n) {
var r = e._make(n);
return (S(n) && "form" === n.name ? r.find(zn) : r.filter(zn)).toArray()
}).filter('[name!=""]:enabled:not(:submit, :button, :image, :reset, :file):matches([checked], :not(:checkbox, :radio))').map(function (t, n) {
var s = (n = e._make(n)).attr("name"), n = null != (n = n.val()) ? n : "";
return Array.isArray(n) ? n.map(function (e) {
return {name: s, value: e.replace(Zn, "\r\n")}
}) : {name: s, value: n.replace(Zn, "\r\n")}
}).toArray()
}
}), er = 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
}
},
tr = (er.prototype.cheerio = "[cheerio object]", er.prototype.splice = Array.prototype.splice, er.prototype[Symbol.iterator] = Array.prototype[Symbol.iterator], Object.assign(er.prototype, nt, Pn, Wn, Qn, Jn), function (e, t) {
return (tr = 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])
}))(e, t)
}), nr = 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
}
tr(e, t), e.prototype = null === t ? Object.create(t) : (n.prototype = t.prototype, new n)
}, rr = function () {
return (rr = 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
}).apply(this, arguments)
};
const ir = 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]),
sr = "<22>", or = (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"
}(ar = ar || {}), "--"), cr = "[CDATA[", ur = "doctype", lr = "script", hr = "public", fr = "system";
function pr(e) {
return 55296 <= e && e <= 57343
}
function dr(e) {
return 32 !== e && 10 !== e && 13 !== e && 9 !== e && 12 !== e && 1 <= e && e <= 31 || 127 <= e && e <= 159
}
function mr(e) {
return 64976 <= e && e <= 65007 || ir.has(e)
}
!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.eofInElementThatCanConta
}(_r = _r || {});
class Er {
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) {
var {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) {
var t = this.html.charCodeAt(this.pos + 1);
if (56320 <= t && t <= 57343) return this.pos++, this._addGap(), 1024 * (e - 55296) + 9216 + t
} else if (!this.lastChunkWritten) return this.endOfChunkHit = !0, ar.EOF;
return this._err(_r.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) {
0 < this.html.length ? 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) {
return (e = this.pos + e) >= this.html.length ? (this.endOfChunkHit = !this.lastChunkWritten, ar.EOF) : (e = this.html.charCodeAt(e)) === ar.CARRIAGE_RETURN ? ar.LINE_FEED : e
}
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, ar.EOF;
let e = this.html.charCodeAt(this.pos);
return e === ar.CARRIAGE_RETURN ? (this.isEol = !0, this.skipNextNewLine = !0, ar.LINE_FEED) : e === ar.LINE_FEED && (this.isEol = !0, this.skipNextNewLine) ? (this.line--, this.skipNextNewLine = !1, this._addGap(), this.advance()) : (this.skipNextNewLine = !1, pr(e) && (e = this._processSurrogate(e)), null === this.handler.onParseError || 31 < e && e < 127 || e === ar.LINE_FEED || e === ar.CARRIAGE_RETURN || 159 < e && e < 64976 || this._checkForProblematicCharacters(e), e)
}
_checkForProblematicCharacters(e) {
dr(e) ? this._err(_r.controlCharacterInInputStream) : mr(e) && this._err(_r.noncharacterInInputStream)
}
retreat(e) {
for (this.pos -= e; this.pos < this.lastGapPos;) this.lastGapPos = this.gapStack.pop(), this.pos--;
this.isEol = !1
}
}
function Ar(e, t) {
for (let n = e.attrs.length - 1; 0 <= n; 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"
}(Tr = Tr || {});
var gr = "undefined" != typeof globalThis ? globalThis : "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : {};
function vr() {
throw new Error("Dynamic requires are not currently supported by rollup-plugin-commonjs")
}
function yr(e) {
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e
}
function Sr(e, t) {
return e(t = {exports: {}}, t.exports), t.exports
}
var Cr = Sr(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;쀀𝒞;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ǔࣈ\0eeVector;楡ectorĀ;B懃ar;楙loor;挊ightĀAVrrow;憔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;;扪Ѐacefios
return e.charCodeAt(0)
}))
}), Nr = (yr(Cr), Sr(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)
}))
})), br = (yr(Nr), Sr(function (e, t) {
Object.defineProperty(t, "__esModule", {value: !0}), t.replaceCodePoint = t.fromCodePoint = void 0;
var n,
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 55296 <= e && e <= 57343 || 1114111 < e ? 65533 : null != (t = r.get(e)) ? t : e
}
t.fromCodePoint = null != (n = String.fromCodePoint) ? n : function (e) {
var t = "";
return 65535 < e && (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))
}
})), Ir = (yr(br), br.replaceCodePoint, br.fromCodePoint, Cr), Or = Nr, kr = br, Lr = Sr(function (e, t) {
var n = gr && gr.__createBinding || (Object.create ? function (e, t, n, r) {
void 0 === r && (r = n);
var i = Object.getOwnPropertyDescriptor(t, n);
i && !("get" in i ? !t.__esModule : i.writable || i.configurable) || (i = {
enumerable: !0, get: function () {
return t[n]
}
}), Object.defineProperty(e, r, i)
} : function (e, t, n, r) {
e[r = void 0 === r ? n : r] = t[n]
}), r = gr && gr.__setModuleDefault || (Object.create ? function (e, t) {
Object.defineProperty(e, "default", {enumerable: !0, value: t})
} : function (e, t) {
e.default = t
}), i = gr && gr.__importStar || function (e) {
if (e && e.__esModule) return e;
var t = {};
if (null != e) for (var i in e) "default" !== i && Object.prototype.hasOwnProperty.call(e, i) && n(t, e, i);
return r(t, e), t
}, s = gr && gr.__importDefault || function (e) {
return e && e.__esModule ? e : {default: e}
},
a = (Object.defineProperty(t, "__esModule", {value: !0}), t.decodeXML = t.decodeHTMLStrict = t.decodeHTMLAttribute = t.decodeHTML = t.determineBranch = t.EntityDecoder = t.DecodingMode = t.BinTrieFlags = t.fromCodePoint = t.replaceCodePoint = t.decodeCodePoint = t.xmlDecodeTree = t.htmlDecodeTree = void 0, s(Ir)),
s = (t.htmlDecodeTree = a.default, s(Or)), c = (t.xmlDecodeTree = s.default, i(kr));
t.decodeCodePoint = c.default;
var u, h, f, p, l = kr;
function d(e) {
return e >= u.ZERO && e <= u.NINE
}
Object.defineProperty(t, "replaceCodePoint", {
enumerable: !0, get: function () {
return l.replaceCodePoint
}
}), Object.defineProperty(t, "fromCodePoint", {
enumerable: !0, get: function () {
return l.fromCodePoint
}
}), function (e) {
e[e.NUM = 35] = "NUM", e[e.SEMI = 59] = "SEMI", e[e.EQUALS = 61] = "EQUALS", 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.LOWER_Z = 122] = "LOWER_Z", e[e.UPPER_A = 65] = "UPPER_A", e[e.UPPER_F = 70] = "UPPER_F", e[e.UPPER_Z = 90] = "UPPER_Z"
}(u = {}), function (e) {
e[e.VALUE_LENGTH = 49152] = "VALUE_LENGTH", e[e.BRANCH_LENGTH = 16256] = "BRANCH_LENGTH", e[e.JUMP_TABLE = 127] = "JUMP_TABLE"
}(h = t.BinTrieFlags || (t.BinTrieFlags = {})), function (e) {
e[e.EntityStart = 0] = "EntityStart", e[e.NumericStart = 1] = "NumericStart", e[e.NumericDecimal = 2] = "NumericDecimal", e[e.NumericHex = 3] = "NumericHex", e[e.NamedEntity = 4] = "NamedEntity"
}(f = {}), function (e) {
e[e.Legacy = 0] = "Legacy", e[e.Strict = 1] = "Strict", e[e.Attribute = 2] = "Attribute"
}(p = t.DecodingMode || (t.DecodingMode = {}));
var _ = function () {
function e(e, t, n) {
this.decodeTree = e, this.emitCodePoint = t, this.errors = n, this.state = f.EntityStart, this.consumed = 1, this.result = 0, this.treeIndex = 0, this.excess = 1, this.decodeMode = p.Strict
}
return e.prototype.startEntity = function (e) {
this.decodeMode = e, this.state = f.EntityStart, this.result = 0, this.treeIndex = 0, this.excess = 1, this.consumed = 1
}, e.prototype.write = function (e, t) {
switch (this.state) {
case f.EntityStart:
return e.charCodeAt(t) === u.NUM ? (this.state = f.NumericStart, this.consumed += 1, this.stateNumericStart(e, t + 1)) : (this.state = f.NamedEntity, this.stateNamedEntity(e, t));
case f.NumericStart:
return this.stateNumericStart(e, t);
case f.NumericDecimal:
return this.stateNumericDecimal(e, t);
case f.NumericHex:
return this.stateNumericHex(e, t);
case f.NamedEntity:
return this.stateNamedEntity(e, t)
}
}, e.prototype.stateNumericStart = function (e, t) {
return t >= e.length ? -1 : (32 | e.charCodeAt(t)) === u.LOWER_X ? (this.state = f.NumericHex, this.consumed += 1, this.stateNumericHex(e, t + 1)) : (this.state = f.NumericDecimal, this.stateNumericDecimal(e, t))
}, e.prototype.addToNumericResult = function (e, t, n, r) {
t !== n && (n -= t, this.result = this.result * Math.pow(r, n) + parseInt(e.substr(t, n), r), this.consumed += n)
}, e.prototype.stateNumericHex = function (e, t) {
for (var r = t; t < e.length;) {
var i = e.charCodeAt(t);
if (!(d(i) || i >= u.UPPER_A && i <= u.UPPER_F || u.LOWER_A <= i && i <= u.LOWER_F)) return this.addToNumericResult(e, r, t, 16), this.emitNumericEntity(i, 3);
t += 1
}
return this.addToNumericResult(e, r, t, 16), -1
}, e.prototype.stateNumericDecimal = function (e, t) {
for (var n = t; t < e.length;) {
var r = e.charCodeAt(t);
if (!d(r)) return this.addToNumericResult(e, n, t, 10), this.emitNumericEntity(r, 2);
t += 1
}
return this.addToNumericResult(e, n, t, 10), -1
}, e.prototype.emitNumericEntity = function (e, t) {
if (this.consumed <= t) return null != (t = this.errors) && t.absenceOfDigitsInNumericCharacterReference(this.consumed), 0;
if (e === u.SEMI) this.consumed += 1; else if (this.decodeMode === p.Strict) return 0;
return this.emitCodePoint((0, c.replaceCodePoint)(this.result), this.consumed), this.errors && (e !== u.SEMI && this.errors.missingSemicolonAfterCharacterReference(), this.errors.validateNumericCharacterReference(this.result)), this.consumed
}, e.prototype.stateNamedEntity = function (e, t) {
for (var n = this.decodeTree, r = n[this.treeIndex], i = (r & h.VALUE_LENGTH) >> 14; t < e.length; t++, this.excess++) {
var s = e.charCodeAt(t);
if (this.treeIndex = T(n, r, this.treeIndex + Math.max(1, i), s), this.treeIndex < 0) return 0 === this.result || this.decodeMode === p.Attribute && (0 === i || s === u.EQUALS || function (e) {
return u.UPPER_A <= e && e <= u.UPPER_Z || u.LOWER_A <= e && e <= u.LOWER_Z || d(e)
}(s)) ? 0 : this.emitNotTerminatedNamedEntity();
if (0 != (i = ((r = n[this.treeIndex]) & h.VALUE_LENGTH) >> 14)) {
if (s === u.SEMI) return this.emitNamedEntityData(this.treeIndex, i, this.consumed + this.excess);
this.decodeMode !== p.Strict && (this.result = this.treeIndex, this.consumed += this.excess, this.excess = 0)
}
}
return -1
}, e.prototype.emitNotTerminatedNamedEntity = function () {
var t = this.result, n = (this.decodeTree[t] & h.VALUE_LENGTH) >> 14;
return this.emitNamedEntityData(t, n, this.consumed), null != (t = this.errors) && t.missingSemicolonAfterCharacterReference(), this.consumed
}, e.prototype.emitNamedEntityData = function (e, t, n) {
var r = this.decodeTree;
return this.emitCodePoint(1 === t ? r[e] & ~h.VALUE_LENGTH : r[e + 1], n), 3 === t && this.emitCodePoint(r[e + 2], n), n
}, e.prototype.end = function () {
var e;
switch (this.state) {
case f.NamedEntity:
return 0 === this.result || this.decodeMode === p.Attribute && this.result !== this.treeIndex ? 0 : this.emitNotTerminatedNamedEntity();
case f.NumericDecimal:
return this.emitNumericEntity(0, 2);
case f.NumericHex:
return this.emitNumericEntity(0, 3);
case f.NumericStart:
return null != (e = this.errors) && e.absenceOfDigitsInNumericCharacterReference(this.consumed), 0;
case f.EntityStart:
return 0
}
}, e
}();
function E(e) {
var t = "", n = new _(e, function (e) {
return t += (0, c.fromCodePoint)(e)
});
return function (e, r) {
for (var i = 0, s = 0; 0 <= (s = e.indexOf("&", s));) {
t += e.slice(i, s), n.startEntity(r);
var a = n.write(e, s + 1);
if (a < 0) {
i = s + n.end();
break
}
i = s + a, s = 0 === a ? i + 1 : i
}
var o = t + e.slice(i);
return t = "", o
}
}
function T(e, t, n, r) {
var i = (t & h.BRANCH_LENGTH) >> 7, t = t & h.JUMP_TABLE;
if (0 == i) return 0 != t && r === t ? n : -1;
if (t) return (t = r - t) < 0 || i <= t ? -1 : e[n + t] - 1;
for (var o = n, c = o + i - 1; o <= c;) {
var u = o + c >>> 1, l = e[u];
if (l < r) o = 1 + u; else {
if (!(r < l)) return e[u + i];
c = u - 1
}
}
return -1
}
t.EntityDecoder = _, t.determineBranch = T;
var A = E(a.default), g = E(s.default);
t.decodeHTML = function (e, t) {
return void 0 === t && (t = p.Legacy), A(e, t)
}, t.decodeHTMLAttribute = function (e) {
return A(e, p.Attribute)
}, t.decodeHTMLStrict = function (e) {
return A(e, p.Strict)
}, t.decodeXML = function (e) {
return g(e, p.Strict)
}
}), Dr = (yr(Lr), Lr.decodeXML, Lr.decodeHTMLStrict, Lr.decodeHTMLAttribute, Lr.decodeHTML, Lr.determineBranch),
Rr = (Lr.EntityDecoder, Lr.DecodingMode, Lr.BinTrieFlags), wr = Lr.fromCodePoint, xr = Lr.replaceCodePoint;
Lr.decodeCodePoint;
var Mr, Pr, Br, Fr, Ur, Qr, _i, Yi, Hr = Lr.xmlDecodeTree, Gr = Lr.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/"
}(Mr = Mr || {}), 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"
}(Pr = Pr || {}), function (e) {
e.NO_QUIRKS = "no-quirks", e.QUIRKS = "quirks", e.LIMITED_QUIRKS = "limited-quirks"
}(Br = Br || {}), 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"
}(Fr = Fr || {}), 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"
}(Ur = Ur || {});
const jr = new Map([[Fr.A, Ur.A], [Fr.ADDRESS, Ur.ADDRESS], [Fr.ANNOTATION_XML, Ur.ANNOTATION_XML], [Fr.APPLET, Ur.APPLET], [Fr.AREA, Ur.AREA], [Fr.ARTICLE, Ur.ARTICLE], [Fr.ASIDE, Ur.ASIDE], [Fr.B, Ur.B], [Fr.BASE, Ur.BASE], [Fr.BASEFONT, Ur.BASEFONT], [Fr.BGSOUND, Ur.BGSOUND], [Fr.BIG, Ur.BIG], [Fr.BLOCKQUOTE, Ur.BLOCKQUOTE], [Fr.BODY, Ur.BODY], [Fr.BR, Ur.BR], [Fr.BUTTON, Ur.BUTTON], [Fr.CAPTION, Ur.CAPTION], [Fr.CENTER, Ur.CENTER], [Fr.CODE, Ur.CODE], [Fr.COL, Ur.COL], [Fr.COLGROUP, Ur.COLGROUP], [Fr.DD, Ur.DD], [Fr.DESC, Ur.DESC], [Fr.DETAILS, Ur.DETAILS], [Fr.DIALOG, Ur.DIALOG], [Fr.DIR, Ur.DIR], [Fr.DIV, Ur.DIV], [Fr.DL, Ur.DL], [Fr.DT, Ur.DT], [Fr.EM, Ur.EM], [Fr.EMBED, Ur.EMBED], [Fr.FIELDSET, Ur.FIELDSET], [Fr.FIGCAPTION, Ur.FIGCAPTION], [Fr.FIGURE, Ur.FIGURE], [Fr.FONT, Ur.FONT], [Fr.FOOTER, Ur.FOOTER], [Fr.FOREIGN_OBJECT, Ur.FOREIGN_OBJECT], [Fr.FORM, Ur.FORM], [Fr.FRAME, Ur.FRAME], [Fr.FRAMESET, Ur.FRAMESET], [Fr.H1, Ur.H1], [Fr.H2, Ur.H2], [Fr.H3, Ur.H3], [Fr.H4, Ur.H4], [Fr.H5, Ur.H5], [Fr.H6, Ur.H6], [Fr.HEAD, Ur.HEAD], [Fr.HEADER, Ur.HEADER], [Fr.HGROUP, Ur.HGROUP], [Fr.HR, Ur.HR], [Fr.HTML, Ur.HTML], [Fr.I, Ur.I], [Fr.IMG, Ur.IMG], [Fr.IMAGE, Ur.IMAGE], [Fr.INPUT, Ur.INPUT], [Fr.IFRAME, Ur.IFRAME], [Fr.KEYGEN, Ur.KEYGEN], [Fr.LABEL, Ur.LABEL], [Fr.LI, Ur.LI], [Fr.LINK, Ur.LINK], [Fr.LISTING, Ur.LISTING], [Fr.MAIN, Ur.MAIN], [Fr.MALIGNMARK, Ur.MALIGNMARK], [Fr.MARQUEE, Ur.MARQUEE], [Fr.MATH, Ur.MATH], [Fr.MENU, Ur.MENU], [Fr.META, Ur.META], [Fr.MGLYPH, Ur.MGLYPH], [Fr.MI, Ur.MI], [Fr.MO, Ur.MO], [Fr.MN, Ur.MN], [Fr.MS, Ur.MS], [Fr.MTEXT, Ur.MTEXT], [Fr.NAV, Ur.NAV], [Fr.NOBR, Ur.NOBR], [Fr.NOFRAMES, Ur.NOFRAMES], [Fr.NOEMBED, Ur.NOEMBED], [Fr.NOSCRIPT, Ur.NOSCRIPT], [Fr.OBJECT, Ur.OBJECT], [Fr.OL, Ur.OL], [Fr.OPTGROUP, Ur.OPTGROUP], [Fr.OPTION, Ur.OPTION], [Fr.P, Ur.P], [Fr.PARAM, Ur.PARAM], [Fr.PLAINTEXT, Ur.PLAINTEXT], [Fr.PRE, Ur.PRE], [Fr.RB, Ur.RB], [Fr.RP, Ur.RP], [Fr.RT, Ur.RT], [Fr.RTC, Ur.RTC], [Fr.RUBY, Ur.RUBY], [Fr.S, Ur.S], [Fr.SCRIPT, Ur.SCRIPT], [Fr.SECTION, Ur.SECTION], [Fr.SELECT, Ur.SELECT], [Fr.SOURCE, Ur.SOURCE], [Fr.SMALL, Ur.SMALL], [Fr.SPAN, Ur.SPAN], [Fr.STRIKE, Ur.STRIKE], [Fr.STRONG, Ur.STRONG], [Fr.STYLE, Ur.STYLE], [Fr.SUB, Ur.SUB], [Fr.SUMMARY, Ur.SUMMARY], [Fr.SUP, Ur.SUP], [Fr.TABLE, Ur.TABLE], [Fr.TBODY, Ur.TBODY], [Fr.TEMPLATE, Ur.TEMPLATE], [Fr.TEXTAREA, Ur.TEXTAREA], [Fr.TFOOT, Ur.TFOOT], [Fr.TD, Ur.TD], [Fr.TH, Ur.TH], [Fr.THEAD, Ur.THEAD], [Fr.TITLE, Ur.TITLE], [Fr.TR, Ur.TR], [Fr.TRACK, Ur.TRACK], [Fr.TT, Ur.TT], [Fr.U, Ur.U], [Fr.UL, Ur.UL], [Fr.SVG, Ur.SVG], [Fr.VAR, Ur.VAR], [Fr.WBR, Ur.WBR], [Fr.XMP, Ur.XMP]]);
function qr(e) {
return null != (e = jr.get(e)) ? e : Ur.UNKNOWN
}
const Yr = Ur, Kr = {
[Mr.HTML]: new Set([Yr.ADDRESS, Yr.APPLET, Yr.AREA, Yr.ARTICLE, Yr.ASIDE, Yr.BASE, Yr.BASEFONT, Yr.BGSOUND, Yr.BLOCKQUOTE, Yr.BODY, Yr.BR, Yr.BUTTON, Yr.CAPTION, Yr.CENTER, Yr.COL, Yr.COLGROUP, Yr.DD, Yr.DETAILS, Yr.DIR, Yr.DIV, Yr.DL, Yr.DT, Yr.EMBED, Yr.FIELDSET, Yr.FIGCAPTION, Yr.FIGURE, Yr.FOOTER, Yr.FORM, Yr.FRAME, Yr.FRAMESET, Yr.H1, Yr.H2, Yr.H3, Yr.H4, Yr.H5, Yr.H6, Yr.HEAD, Yr.HEADER, Yr.HGROUP, Yr.HR, Yr.HTML, Yr.IFRAME, Yr.IMG, Yr.INPUT, Yr.LI, Yr.LINK, Yr.LISTING, Yr.MAIN, Yr.MARQUEE, Yr.MENU, Yr.META, Yr.NAV, Yr.NOEMBED, Yr.NOFRAMES, Yr.NOSCRIPT, Yr.OBJECT, Yr.OL, Yr.P, Yr.PARAM, Yr.PLAINTEXT, Yr.PRE, Yr.SCRIPT, Yr.SECTION, Yr.SELECT, Yr.SOURCE, Yr.STYLE, Yr.SUMMARY, Yr.TABLE, Yr.TBODY, Yr.TD, Yr.TEMPLATE, Yr.TEXTAREA, Yr.TFOOT, Yr.TH, Yr.THEAD, Yr.TITLE, Yr.TR, Yr.TRACK, Yr.UL, Yr.WBR, Yr.XMP]),
[Mr.MATHML]: new Set([Yr.MI, Yr.MO, Yr.MN, Yr.MS, Yr.MTEXT, Yr.ANNOTATION_XML]),
[Mr.SVG]: new Set([Yr.TITLE, Yr.FOREIGN_OBJECT, Yr.DESC]),
[Mr.XLINK]: new Set,
[Mr.XML]: new Set,
[Mr.XMLNS]: new Set
};
function Wr(e) {
return e === Yr.H1 || e === Yr.H2 || e === Yr.H3 || e === Yr.H4 || e === Yr.H5 || e === Yr.H6
}
const Vr = new Set([Fr.STYLE, Fr.SCRIPT, Fr.XMP, Fr.IFRAME, Fr.NOEMBED, Fr.NOFRAMES, Fr.PLAINTEXT]),
$r = 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]]),
zr = (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_
}(Qr = Qr || {}), {
DATA: Qr.DATA,
RCDATA: Qr.RCDATA,
RAWTEXT: Qr.RAWTEXT,
SCRIPT_DATA: Qr.SCRIPT_DATA,
PLAINTEXT: Qr.PLAINTEXT,
CDATA_SECTION: Qr.CDATA_SECTION
});
function Xr(e) {
return e >= ar.DIGIT_0 && e <= ar.DIGIT_9
}
function Zr(e) {
return e >= ar.LATIN_CAPITAL_A && e <= ar.LATIN_CAPITAL_Z
}
function Jr(e) {
return function (e) {
return e >= ar.LATIN_SMALL_A && e <= ar.LATIN_SMALL_Z
}(e) || Zr(e)
}
function ei(e) {
return Jr(e) || Xr(e)
}
function ti(e) {
return e >= ar.LATIN_CAPITAL_A && e <= ar.LATIN_CAPITAL_F
}
function ni(e) {
return e >= ar.LATIN_SMALL_A && e <= ar.LATIN_SMALL_F
}
function ri(e) {
return e + 32
}
function ii(e) {
return e === ar.SPACE || e === ar.LINE_FEED || e === ar.TABULATION || e === ar.FORM_FEED
}
function si(e) {
return ii(e) || e === ar.SOLIDUS || e === ar.GREATER_THAN_SIGN
}
class ai {
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 = Qr.DATA, this.returnState = Qr.DATA, this.charRefCode = -1, this.consumedAfterSnapshot = -1, this.currentCharacterToken = null, this.currentToken = null, this.currentAttr = {
name: "",
value: ""
}, this.preprocessor = new Er(t), this.currentLocation = this.getCurrentLocation(-1)
}
_err(e) {
var t, n;
null != (n = (t = this.handler).onParseError) && 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;
var 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))
}
_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: Tr.START_TAG,
tagName: "",
tagID: Ur.UNKNOWN,
selfClosing: !1,
ackSelfClosing: !1,
attrs: [],
location: this.getCurrentLocation(1)
}
}
_createEndTagToken() {
this.currentToken = {
type: Tr.END_TAG,
tagName: "",
tagID: Ur.UNKNOWN,
selfClosing: !1,
ackSelfClosing: !1,
attrs: [],
location: this.getCurrentLocation(2)
}
}
_createCommentToken(e) {
this.currentToken = {type: Tr.COMMENT, data: "", location: this.getCurrentLocation(e)}
}
_createDoctypeToken(e) {
this.currentToken = {
type: Tr.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, n = this.currentToken;
null === Ar(n, this.currentAttr.name) ? (n.attrs.push(this.currentAttr), n.location && this.currentLocation && ((null != (e = (n = n.location).attrs) ? e : n.attrs = Object.create(null))[this.currentAttr.name] = this.currentLocation, this._leaveAttrValue())) : this._err(_r.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() {
var e = this.currentToken;
this.prepareToken(e), e.tagID = qr(e.tagName), e.type === Tr.START_TAG ? (this.lastStartTagName = e.tagName, this.handler.onStartTag(e)) : (0 < e.attrs.length && this._err(_r.endTagWithAttributes), e.selfClosing && this._err(_r.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 Tr.CHARACTER:
this.handler.onCharacter(this.currentCharacterToken);
break;
case Tr.NULL_CHARACTER:
this.handler.onNullCharacter(this.currentCharacterToken);
break;
case Tr.WHITESPACE_CHARACTER:
this.handler.onWhitespaceCharacter(this.currentCharacterToken)
}
this.currentCharacterToken = null
}
}
_emitEOFToken() {
var e = this.getCurrentLocation(0);
e && (e.endLine = e.startLine, e.endCol = e.startCol, e.endOffset = e.startOffset), this._emitCurrentCharacterToken(e), this.handler.onEof({
type: Tr.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) {
var t = ii(e) ? Tr.WHITESPACE_CHARACTER : e === ar.NULL ? Tr.NULL_CHARACTER : Tr.CHARACTER;
this._appendCharToCurrentCharacterToken(t, String.fromCodePoint(e))
}
_emitChars(e) {
this._appendCharToCurrentCharacterToken(Tr.CHARACTER, e)
}
_matchNamedCharacterReference(e) {
let t = null, n = 0, r = !1;
for (let s = 0, a = Gr[0]; 0 <= s && !((s = Dr(Gr, a, s + 1, e)) < 0); e = this._consume()) {
n += 1;
var o = (a = Gr[s]) & Rr.VALUE_LENGTH;
if (o) {
const a = (o >> 14) - 1;
if (e !== ar.SEMICOLON && this._isCharacterReferenceInAttribute() && ((o = this.preprocessor.peek(1)) === ar.EQUALS_SIGN || ei(o)) ? (t = [ar.AMPERSAND], s += a) : (t = 0 == a ? [Gr[s] & ~Rr.VALUE_LENGTH] : 1 == a ? [Gr[++s]] : [Gr[++s], Gr[++s]], n = 0, r = e !== ar.SEMICOLON), 0 == a) {
this._consume();
break
}
}
}
return this._unconsume(n), r && !this.preprocessor.endOfChunkHit && this._err(_r.missingSemicolonAfterCharacterReference), this._unconsume(1), t
}
_isCharacterReferenceInAttribute() {
return this.returnState === Qr.ATTRIBUTE_VALUE_DOUBLE_QUOTED || this.returnState === Qr.ATTRIBUTE_VALUE_SINGLE_QUOTED || this.returnState === Qr.ATTRIBUTE_VALUE_UNQUOTED
}
_flushCodePointConsumedAsCharacterReference(e) {
this._isCharacterReferenceInAttribute() ? this.currentAttr.value += String.fromCodePoint(e) : this._emitCodePoint(e)
}
_callState(e) {
switch (this.state) {
case Qr.DATA:
this._stateData(e);
break;
case Qr.RCDATA:
this._stateRcdata(e);
break;
case Qr.RAWTEXT:
this._stateRawtext(e);
break;
case Qr.SCRIPT_DATA:
this._stateScriptData(e);
break;
case Qr.PLAINTEXT:
this._statePlaintext(e);
break;
case Qr.TAG_OPEN:
this._stateTagOpen(e);
break;
case Qr.END_TAG_OPEN:
this._stateEndTagOpen(e);
break;
case Qr.TAG_NAME:
this._stateTagName(e);
break;
case Qr.RCDATA_LESS_THAN_SIGN:
this._stateRcdataLessThanSign(e);
break;
case Qr.RCDATA_END_TAG_OPEN:
this._stateRcdataEndTagOpen(e);
break;
case Qr.RCDATA_END_TAG_NAME:
this._stateRcdataEndTagName(e);
break;
case Qr.RAWTEXT_LESS_THAN_SIGN:
this._stateRawtextLessThanSign(e);
break;
case Qr.RAWTEXT_END_TAG_OPEN:
this._stateRawtextEndTagOpen(e);
break;
case Qr.RAWTEXT_END_TAG_NAME:
this._stateRawtextEndTagName(e);
break;
case Qr.SCRIPT_DATA_LESS_THAN_SIGN:
this._stateScriptDataLessThanSign(e);
break;
case Qr.SCRIPT_DATA_END_TAG_OPEN:
this._stateScriptDataEndTagOpen(e);
break;
case Qr.SCRIPT_DATA_END_TAG_NAME:
this._stateScriptDataEndTagName(e);
break;
case Qr.SCRIPT_DATA_ESCAPE_START:
this._stateScriptDataEscapeStart(e);
break;
case Qr.SCRIPT_DATA_ESCAPE_START_DASH:
this._stateScriptDataEscapeStartDash(e);
break;
case Qr.SCRIPT_DATA_ESCAPED:
this._stateScriptDataEscaped(e);
break;
case Qr.SCRIPT_DATA_ESCAPED_DASH:
this._stateScriptDataEscapedDash(e);
break;
case Qr.SCRIPT_DATA_ESCAPED_DASH_DASH:
this._stateScriptDataEscapedDashDash(e);
break;
case Qr.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:
this._stateScriptDataEscapedLessThanSign(e);
break;
case Qr.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:
this._stateScriptDataEscapedEndTagOpen(e);
break;
case Qr.SCRIPT_DATA_ESCAPED_END_TAG_NAME:
this._stateScriptDataEscapedEndTagName(e);
break;
case Qr.SCRIPT_DATA_DOUBLE_ESCAPE_START:
this._stateScriptDataDoubleEscapeStart(e);
break;
case Qr.SCRIPT_DATA_DOUBLE_ESCAPED:
this._stateScriptDataDoubleEscaped(e);
break;
case Qr.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:
this._stateScriptDataDoubleEscapedDash(e);
break;
case Qr.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:
this._stateScriptDataDoubleEscapedDashDash(e);
break;
case Qr.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:
this._stateScriptDataDoubleEscapedLessThanSign(e);
break;
case Qr.SCRIPT_DATA_DOUBLE_ESCAPE_END:
this._stateScriptDataDoubleEscapeEnd(e);
break;
case Qr.BEFORE_ATTRIBUTE_NAME:
this._stateBeforeAttributeName(e);
break;
case Qr.ATTRIBUTE_NAME:
this._stateAttributeName(e);
break;
case Qr.AFTER_ATTRIBUTE_NAME:
this._stateAfterAttributeName(e);
break;
case Qr.BEFORE_ATTRIBUTE_VALUE:
this._stateBeforeAttributeValue(e);
break;
case Qr.ATTRIBUTE_VALUE_DOUBLE_QUOTED:
this._stateAttributeValueDoubleQuoted(e);
break;
case Qr.ATTRIBUTE_VALUE_SINGLE_QUOTED:
this._stateAttributeValueSingleQuoted(e);
break;
case Qr.ATTRIBUTE_VALUE_UNQUOTED:
this._stateAttributeValueUnquoted(e);
break;
case Qr.AFTER_ATTRIBUTE_VALUE_QUOTED:
this._stateAfterAttributeValueQuoted(e);
break;
case Qr.SELF_CLOSING_START_TAG:
this._stateSelfClosingStartTag(e);
break;
case Qr.BOGUS_COMMENT:
this._stateBogusComment(e);
break;
case Qr.MARKUP_DECLARATION_OPEN:
this._stateMarkupDeclarationOpen(e);
break;
case Qr.COMMENT_START:
this._stateCommentStart(e);
break;
case Qr.COMMENT_START_DASH:
this._stateCommentStartDash(e);
break;
case Qr.COMMENT:
this._stateComment(e);
break;
case Qr.COMMENT_LESS_THAN_SIGN:
this._stateCommentLessThanSign(e);
break;
case Qr.COMMENT_LESS_THAN_SIGN_BANG:
this._stateCommentLessThanSignBang(e);
break;
case Qr.COMMENT_LESS_THAN_SIGN_BANG_DASH:
this._stateCommentLessThanSignBangDash(e);
break;
case Qr.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:
this._stateCommentLessThanSignBangDashDash(e);
break;
case Qr.COMMENT_END_DASH:
this._stateCommentEndDash(e);
break;
case Qr.COMMENT_END:
this._stateCommentEnd(e);
break;
case Qr.COMMENT_END_BANG:
this._stateCommentEndBang(e);
break;
case Qr.DOCTYPE:
this._stateDoctype(e);
break;
case Qr.BEFORE_DOCTYPE_NAME:
this._stateBeforeDoctypeName(e);
break;
case Qr.DOCTYPE_NAME:
this._stateDoctypeName(e);
break;
case Qr.AFTER_DOCTYPE_NAME:
this._stateAfterDoctypeName(e);
break;
case Qr.AFTER_DOCTYPE_PUBLIC_KEYWORD:
this._stateAfterDoctypePublicKeyword(e);
break;
case Qr.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:
this._stateBeforeDoctypePublicIdentifier(e);
break;
case Qr.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:
this._stateDoctypePublicIdentifierDoubleQuoted(e);
break;
case Qr.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:
this._stateDoctypePublicIdentifierSingleQuoted(e);
break;
case Qr.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:
this._stateAfterDoctypePublicIdentifier(e);
break;
case Qr.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:
this._stateBetweenDoctypePublicAndSystemIdentifiers(e);
break;
case Qr.AFTER_DOCTYPE_SYSTEM_KEYWORD:
this._stateAfterDoctypeSystemKeyword(e);
break;
case Qr.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:
this._stateBeforeDoctypeSystemIdentifier(e);
break;
case Qr.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:
this._stateDoctypeSystemIdentifierDoubleQuoted(e);
break;
case Qr.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:
this._stateDoctypeSystemIdentifierSingleQuoted(e);
break;
case Qr.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:
this._stateAfterDoctypeSystemIdentifier(e);
break;
case Qr.BOGUS_DOCTYPE:
this._stateBogusDoctype(e);
break;
case Qr.CDATA_SECTION:
this._stateCdataSection(e);
break;
case Qr.CDATA_SECTION_BRACKET:
this._stateCdataSectionBracket(e);
break;
case Qr.CDATA_SECTION_END:
this._stateCdataSectionEnd(e);
break;
case Qr.CHARACTER_REFERENCE:
this._stateCharacterReference(e);
break;
case Qr.NAMED_CHARACTER_REFERENCE:
this._stateNamedCharacterReference(e);
break;
case Qr.AMBIGUOUS_AMPERSAND:
this._stateAmbiguousAmpersand(e);
break;
case Qr.NUMERIC_CHARACTER_REFERENCE:
this._stateNumericCharacterReference(e);
break;
case Qr.HEXADEMICAL_CHARACTER_REFERENCE_START:
this._stateHexademicalCharacterReferenceStart(e);
break;
case Qr.HEXADEMICAL_CHARACTER_REFERENCE:
this._stateHexademicalCharacterReference(e);
break;
case Qr.DECIMAL_CHARACTER_REFERENCE:
this._stateDecimalCharacterReference(e);
break;
case Qr.NUMERIC_CHARACTER_REFERENCE_END:
this._stateNumericCharacterReferenceEnd(e);
break;
default:
throw new Error("Unknown state")
}
}
_stateData(e) {
switch (e) {
case ar.LESS_THAN_SIGN:
this.state = Qr.TAG_OPEN;
break;
case ar.AMPERSAND:
this.returnState = Qr.DATA, this.state = Qr.CHARACTER_REFERENCE;
break;
case ar.NULL:
this._err(_r.unexpectedNullCharacter), this._emitCodePoint(e);
break;
case ar.EOF:
this._emitEOFToken();
break;
default:
this._emitCodePoint(e)
}
}
_stateRcdata(e) {
switch (e) {
case ar.AMPERSAND:
this.returnState = Qr.RCDATA, this.state = Qr.CHARACTER_REFERENCE;
break;
case ar.LESS_THAN_SIGN:
this.state = Qr.RCDATA_LESS_THAN_SIGN;
break;
case ar.NULL:
this._err(_r.unexpectedNullCharacter), this._emitChars(sr);
break;
case ar.EOF:
this._emitEOFToken();
break;
default:
this._emitCodePoint(e)
}
}
_stateRawtext(e) {
switch (e) {
case ar.LESS_THAN_SIGN:
this.state = Qr.RAWTEXT_LESS_THAN_SIGN;
break;
case ar.NULL:
this._err(_r.unexpectedNullCharacter), this._emitChars(sr);
break;
case ar.EOF:
this._emitEOFToken();
break;
default:
this._emitCodePoint(e)
}
}
_stateScriptData(e) {
switch (e) {
case ar.LESS_THAN_SIGN:
this.state = Qr.SCRIPT_DATA_LESS_THAN_SIGN;
break;
case ar.NULL:
this._err(_r.unexpectedNullCharacter), this._emitChars(sr);
break;
case ar.EOF:
this._emitEOFToken();
break;
default:
this._emitCodePoint(e)
}
}
_statePlaintext(e) {
switch (e) {
case ar.NULL:
this._err(_r.unexpectedNullCharacter), this._emitChars(sr);
break;
case ar.EOF:
this._emitEOFToken();
break;
default:
this._emitCodePoint(e)
}
}
_stateTagOpen(e) {
if (Jr(e)) this._createStartTagToken(), this.state = Qr.TAG_NAME, this._stateTagName(e); else switch (e) {
case ar.EXCLAMATION_MARK:
this.state = Qr.MARKUP_DECLARATION_OPEN;
break;
case ar.SOLIDUS:
this.state = Qr.END_TAG_OPEN;
break;
case ar.QUESTION_MARK:
this._err(_r.unexpectedQuestionMarkInsteadOfTagName), this._createCommentToken(1), this.state = Qr.BOGUS_COMMENT, this._stateBogusComment(e);
break;
case ar.EOF:
this._err(_r.eofBeforeTagName), this._emitChars("<"), this._emitEOFToken();
break;
default:
this._err(_r.invalidFirstCharacterOfTagName), this._emitChars("<"), this.state = Qr.DATA, this._stateData(e)
}
}
_stateEndTagOpen(e) {
if (Jr(e)) this._createEndTagToken(), this.state = Qr.TAG_NAME, this._stateTagName(e); else switch (e) {
case ar.GREATER_THAN_SIGN:
this._err(_r.missingEndTagName), this.state = Qr.DATA;
break;
case ar.EOF:
this._err(_r.eofBeforeTagName), this._emitChars("</"), this._emitEOFToken();
break;
default:
this._err(_r.invalidFirstCharacterOfTagName), this._createCommentToken(2), this.state = Qr.BOGUS_COMMENT, this._stateBogusComment(e)
}
}
_stateTagName(e) {
var t = this.currentToken;
switch (e) {
case ar.SPACE:
case ar.LINE_FEED:
case ar.TABULATION:
case ar.FORM_FEED:
this.state = Qr.BEFORE_ATTRIBUTE_NAME;
break;
case ar.SOLIDUS:
this.state = Qr.SELF_CLOSING_START_TAG;
break;
case ar.GREATER_THAN_SIGN:
this.state = Qr.DATA, this.emitCurrentTagToken();
break;
case ar.NULL:
this._err(_r.unexpectedNullCharacter), t.tagName += sr;
break;
case ar.EOF:
this._err(_r.eofInTag), this._emitEOFToken();
break;
default:
t.tagName += String.fromCodePoint(Zr(e) ? ri(e) : e)
}
}
_stateRcdataLessThanSign(e) {
e === ar.SOLIDUS ? this.state = Qr.RCDATA_END_TAG_OPEN : (this._emitChars("<"), this.state = Qr.RCDATA, this._stateRcdata(e))
}
_stateRcdataEndTagOpen(e) {
Jr(e) ? (this.state = Qr.RCDATA_END_TAG_NAME, this._stateRcdataEndTagName(e)) : (this._emitChars("</"), this.state = Qr.RCDATA, this._stateRcdata(e))
}
handleSpecialEndTag(e) {
if (!this.preprocessor.startsWith(this.lastStartTagName, !1)) return !this._ensureHibernation();
switch (this._createEndTagToken(), this.currentToken.tagName = this.lastStartTagName, this.preprocessor.peek(this.lastStartTagName.length)) {
case ar.SPACE:
case ar.LINE_FEED:
case ar.TABULATION:
case ar.FORM_FEED:
return this._advanceBy(this.lastStartTagName.length), this.state = Qr.BEFORE_ATTRIBUTE_NAME, !1;
case ar.SOLIDUS:
return this._advanceBy(this.lastStartTagName.length), this.state = Qr.SELF_CLOSING_START_TAG, !1;
case ar.GREATER_THAN_SIGN:
return this._advanceBy(this.lastStartTagName.length), this.emitCurrentTagToken(), this.state = Qr.DATA, !1;
default:
return !this._ensureHibernation()
}
}
_stateRcdataEndTagName(e) {
this.handleSpecialEndTag(e) && (this._emitChars("</"), this.state = Qr.RCDATA, this._stateRcdata(e))
}
_stateRawtextLessThanSign(e) {
e === ar.SOLIDUS ? this.state = Qr.RAWTEXT_END_TAG_OPEN : (this._emitChars("<"), this.state = Qr.RAWTEXT, this._stateRawtext(e))
}
_stateRawtextEndTagOpen(e) {
Jr(e) ? (this.state = Qr.RAWTEXT_END_TAG_NAME, this._stateRawtextEndTagName(e)) : (this._emitChars("</"), this.state = Qr.RAWTEXT, this._stateRawtext(e))
}
_stateRawtextEndTagName(e) {
this.handleSpecialEndTag(e) && (this._emitChars("</"), this.state = Qr.RAWTEXT, this._stateRawtext(e))
}
_stateScriptDataLessThanSign(e) {
switch (e) {
case ar.SOLIDUS:
this.state = Qr.SCRIPT_DATA_END_TAG_OPEN;
break;
case ar.EXCLAMATION_MARK:
this.state = Qr.SCRIPT_DATA_ESCAPE_START, this._emitChars("<!");
break;
default:
this._emitChars("<"), this.state = Qr.SCRIPT_DATA, this._stateScriptData(e)
}
}
_stateScriptDataEndTagOpen(e) {
Jr(e) ? (this.state = Qr.SCRIPT_DATA_END_TAG_NAME, this._stateScriptDataEndTagName(e)) : (this._emitChars("</"), this.state = Qr.SCRIPT_DATA, this._stateScriptData(e))
}
_stateScriptDataEndTagName(e) {
this.handleSpecialEndTag(e) && (this._emitChars("</"), this.state = Qr.SCRIPT_DATA, this._stateScriptData(e))
}
_stateScriptDataEscapeStart(e) {
e === ar.HYPHEN_MINUS ? (this.state = Qr.SCRIPT_DATA_ESCAPE_START_DASH, this._emitChars("-")) : (this.state = Qr.SCRIPT_DATA, this._stateScriptData(e))
}
_stateScriptDataEscapeStartDash(e) {
e === ar.HYPHEN_MINUS ? (this.state = Qr.SCRIPT_DATA_ESCAPED_DASH_DASH, this._emitChars("-")) : (this.state = Qr.SCRIPT_DATA, this._stateScriptData(e))
}
_stateScriptDataEscaped(e) {
switch (e) {
case ar.HYPHEN_MINUS:
this.state = Qr.SCRIPT_DATA_ESCAPED_DASH, this._emitChars("-");
break;
case ar.LESS_THAN_SIGN:
this.state = Qr.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;
break;
case ar.NULL:
this._err(_r.unexpectedNullCharacter), this._emitChars(sr);
break;
case ar.EOF:
this._err(_r.eofInScriptHtmlCommentLikeText), this._emitEOFToken();
break;
default:
this._emitCodePoint(e)
}
}
_stateScriptDataEscapedDash(e) {
switch (e) {
case ar.HYPHEN_MINUS:
this.state = Qr.SCRIPT_DATA_ESCAPED_DASH_DASH, this._emitChars("-");
break;
case ar.LESS_THAN_SIGN:
this.state = Qr.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;
break;
case ar.NULL:
this._err(_r.unexpectedNullCharacter), this.state = Qr.SCRIPT_DATA_ESCAPED, this._emitChars(sr);
break;
case ar.EOF:
this._err(_r.eofInScriptHtmlCommentLikeText), this._emitEOFToken();
break;
default:
this.state = Qr.SCRIPT_DATA_ESCAPED, this._emitCodePoint(e)
}
}
_stateScriptDataEscapedDashDash(e) {
switch (e) {
case ar.HYPHEN_MINUS:
this._emitChars("-");
break;
case ar.LESS_THAN_SIGN:
this.state = Qr.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;
break;
case ar.GREATER_THAN_SIGN:
this.state = Qr.SCRIPT_DATA, this._emitChars(">");
break;
case ar.NULL:
this._err(_r.unexpectedNullCharacter), this.state = Qr.SCRIPT_DATA_ESCAPED, this._emitChars(sr);
break;
case ar.EOF:
this._err(_r.eofInScriptHtmlCommentLikeText), this._emitEOFToken();
break;
default:
this.state = Qr.SCRIPT_DATA_ESCAPED, this._emitCodePoint(e)
}
}
_stateScriptDataEscapedLessThanSign(e) {
e === ar.SOLIDUS ? this.state = Qr.SCRIPT_DATA_ESCAPED_END_TAG_OPEN : Jr(e) ? (this._emitChars("<"), this.state = Qr.SCRIPT_DATA_DOUBLE_ESCAPE_START, this._stateScriptDataDoubleEscapeStart(e)) : (this._emitChars("<"), this.state = Qr.SCRIPT_DATA_ESCAPED, this._stateScriptDataEscaped(e))
}
_stateScriptDataEscapedEndTagOpen(e) {
Jr(e) ? (this.state = Qr.SCRIPT_DATA_ESCAPED_END_TAG_NAME, this._stateScriptDataEscapedEndTagName(e)) : (this._emitChars("</"), this.state = Qr.SCRIPT_DATA_ESCAPED, this._stateScriptDataEscaped(e))
}
_stateScriptDataEscapedEndTagName(e) {
this.handleSpecialEndTag(e) && (this._emitChars("</"), this.state = Qr.SCRIPT_DATA_ESCAPED, this._stateScriptDataEscaped(e))
}
_stateScriptDataDoubleEscapeStart(e) {
if (this.preprocessor.startsWith(lr, !1) && si(this.preprocessor.peek(lr.length))) {
this._emitCodePoint(e);
for (let e = 0; e < lr.length; e++) this._emitCodePoint(this._consume());
this.state = Qr.SCRIPT_DATA_DOUBLE_ESCAPED
} else this._ensureHibernation() || (this.state = Qr.SCRIPT_DATA_ESCAPED, this._stateScriptDataEscaped(e))
}
_stateScriptDataDoubleEscaped(e) {
switch (e) {
case ar.HYPHEN_MINUS:
this.state = Qr.SCRIPT_DATA_DOUBLE_ESCAPED_DASH, this._emitChars("-");
break;
case ar.LESS_THAN_SIGN:
this.state = Qr.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN, this._emitChars("<");
break;
case ar.NULL:
this._err(_r.unexpectedNullCharacter), this._emitChars(sr);
break;
case ar.EOF:
this._err(_r.eofInScriptHtmlCommentLikeText), this._emitEOFToken();
break;
default:
this._emitCodePoint(e)
}
}
_stateScriptDataDoubleEscapedDash(e) {
switch (e) {
case ar.HYPHEN_MINUS:
this.state = Qr.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH, this._emitChars("-");
break;
case ar.LESS_THAN_SIGN:
this.state = Qr.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN, this._emitChars("<");
break;
case ar.NULL:
this._err(_r.unexpectedNullCharacter), this.state = Qr.SCRIPT_DATA_DOUBLE_ESCAPED, this._emitChars(sr);
break;
case ar.EOF:
this._err(_r.eofInScriptHtmlCommentLikeText), this._emitEOFToken();
break;
default:
this.state = Qr.SCRIPT_DATA_DOUBLE_ESCAPED, this._emitCodePoint(e)
}
}
_stateScriptDataDoubleEscapedDashDash(e) {
switch (e) {
case ar.HYPHEN_MINUS:
this._emitChars("-");
break;
case ar.LESS_THAN_SIGN:
this.state = Qr.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN, this._emitChars("<");
break;
case ar.GREATER_THAN_SIGN:
this.state = Qr.SCRIPT_DATA, this._emitChars(">");
break;
case ar.NULL:
this._err(_r.unexpectedNullCharacter), this.state = Qr.SCRIPT_DATA_DOUBLE_ESCAPED, this._emitChars(sr);
break;
case ar.EOF:
this._err(_r.eofInScriptHtmlCommentLikeText), this._emitEOFToken();
break;
default:
this.state = Qr.SCRIPT_DATA_DOUBLE_ESCAPED, this._emitCodePoint(e)
}
}
_stateScriptDataDoubleEscapedLessThanSign(e) {
e === ar.SOLIDUS ? (this.state = Qr.SCRIPT_DATA_DOUBLE_ESCAPE_END, this._emitChars("/")) : (this.state = Qr.SCRIPT_DATA_DOUBLE_ESCAPED, this._stateScriptDataDoubleEscaped(e))
}
_stateScriptDataDoubleEscapeEnd(e) {
if (this.preprocessor.startsWith(lr, !1) && si(this.preprocessor.peek(lr.length))) {
this._emitCodePoint(e);
for (let e = 0; e < lr.length; e++) this._emitCodePoint(this._consume());
this.state = Qr.SCRIPT_DATA_ESCAPED
} else this._ensureHibernation() || (this.state = Qr.SCRIPT_DATA_DOUBLE_ESCAPED, this._stateScriptDataDoubleEscaped(e))
}
_stateBeforeAttributeName(e) {
switch (e) {
case ar.SPACE:
case ar.LINE_FEED:
case ar.TABULATION:
case ar.FORM_FEED:
break;
case ar.SOLIDUS:
case ar.GREATER_THAN_SIGN:
case ar.EOF:
this.state = Qr.AFTER_ATTRIBUTE_NAME, this._stateAfterAttributeName(e);
break;
case ar.EQUALS_SIGN:
this._err(_r.unexpectedEqualsSignBeforeAttributeName), this._createAttr("="), this.state = Qr.ATTRIBUTE_NAME;
break;
default:
this._createAttr(""), this.state = Qr.ATTRIBUTE_NAME, this._stateAttributeName(e)
}
}
_stateAttributeName(e) {
switch (e) {
case ar.SPACE:
case ar.LINE_FEED:
case ar.TABULATION:
case ar.FORM_FEED:
case ar.SOLIDUS:
case ar.GREATER_THAN_SIGN:
case ar.EOF:
this._leaveAttrName(), this.state = Qr.AFTER_ATTRIBUTE_NAME, this._stateAfterAttributeName(e);
break;
case ar.EQUALS_SIGN:
this._leaveAttrName(), this.state = Qr.BEFORE_ATTRIBUTE_VALUE;
break;
case ar.QUOTATION_MARK:
case ar.APOSTROPHE:
case ar.LESS_THAN_SIGN:
this._err(_r.unexpectedCharacterInAttributeName), this.currentAttr.name += String.fromCodePoint(e);
break;
case ar.NULL:
this._err(_r.unexpectedNullCharacter), this.currentAttr.name += sr;
break;
default:
this.currentAttr.name += String.fromCodePoint(Zr(e) ? ri(e) : e)
}
}
_stateAfterAttributeName(e) {
switch (e) {
case ar.SPACE:
case ar.LINE_FEED:
case ar.TABULATION:
case ar.FORM_FEED:
break;
case ar.SOLIDUS:
this.state = Qr.SELF_CLOSING_START_TAG;
break;
case ar.EQUALS_SIGN:
this.state = Qr.BEFORE_ATTRIBUTE_VALUE;
break;
case ar.GREATER_THAN_SIGN:
this.state = Qr.DATA, this.emitCurrentTagToken();
break;
case ar.EOF:
this._err(_r.eofInTag), this._emitEOFToken();
break;
default:
this._createAttr(""), this.state = Qr.ATTRIBUTE_NAME, this._stateAttributeName(e)
}
}
_stateBeforeAttributeValue(e) {
switch (e) {
case ar.SPACE:
case ar.LINE_FEED:
case ar.TABULATION:
case ar.FORM_FEED:
break;
case ar.QUOTATION_MARK:
this.state = Qr.ATTRIBUTE_VALUE_DOUBLE_QUOTED;
break;
case ar.APOSTROPHE:
this.state = Qr.ATTRIBUTE_VALUE_SINGLE_QUOTED;
break;
case ar.GREATER_THAN_SIGN:
this._err(_r.missingAttributeValue), this.state = Qr.DATA, this.emitCurrentTagToken();
break;
default:
this.state = Qr.ATTRIBUTE_VALUE_UNQUOTED, this._stateAttributeValueUnquoted(e)
}
}
_stateAttributeValueDoubleQuoted(e) {
switch (e) {
case ar.QUOTATION_MARK:
this.state = Qr.AFTER_ATTRIBUTE_VALUE_QUOTED;
break;
case ar.AMPERSAND:
this.returnState = Qr.ATTRIBUTE_VALUE_DOUBLE_QUOTED, this.state = Qr.CHARACTER_REFERENCE;
break;
case ar.NULL:
this._err(_r.unexpectedNullCharacter), this.currentAttr.value += sr;
break;
case ar.EOF:
this._err(_r.eofInTag), this._emitEOFToken();
break;
default:
this.currentAttr.value += String.fromCodePoint(e)
}
}
_stateAttributeValueSingleQuoted(e) {
switch (e) {
case ar.APOSTROPHE:
this.state = Qr.AFTER_ATTRIBUTE_VALUE_QUOTED;
break;
case ar.AMPERSAND:
this.returnState = Qr.ATTRIBUTE_VALUE_SINGLE_QUOTED, this.state = Qr.CHARACTER_REFERENCE;
break;
case ar.NULL:
this._err(_r.unexpectedNullCharacter), this.currentAttr.value += sr;
break;
case ar.EOF:
this._err(_r.eofInTag), this._emitEOFToken();
break;
default:
this.currentAttr.value += String.fromCodePoint(e)
}
}
_stateAttributeValueUnquoted(e) {
switch (e) {
case ar.SPACE:
case ar.LINE_FEED:
case ar.TABULATION:
case ar.FORM_FEED:
this._leaveAttrValue(), this.state = Qr.BEFORE_ATTRIBUTE_NAME;
break;
case ar.AMPERSAND:
this.returnState = Qr.ATTRIBUTE_VALUE_UNQUOTED, this.state = Qr.CHARACTER_REFERENCE;
break;
case ar.GREATER_THAN_SIGN:
this._leaveAttrValue(), this.state = Qr.DATA, this.emitCurrentTagToken();
break;
case ar.NULL:
this._err(_r.unexpectedNullCharacter), this.currentAttr.value += sr;
break;
case ar.QUOTATION_MARK:
case ar.APOSTROPHE:
case ar.LESS_THAN_SIGN:
case ar.EQUALS_SIGN:
case ar.GRAVE_ACCENT:
this._err(_r.unexpectedCharacterInUnquotedAttributeValue), this.currentAttr.value += String.fromCodePoint(e);
break;
case ar.EOF:
this._err(_r.eofInTag), this._emitEOFToken();
break;
default:
this.currentAttr.value += String.fromCodePoint(e)
}
}
_stateAfterAttributeValueQuoted(e) {
switch (e) {
case ar.SPACE:
case ar.LINE_FEED:
case ar.TABULATION:
case ar.FORM_FEED:
this._leaveAttrValue(), this.state = Qr.BEFORE_ATTRIBUTE_NAME;
break;
case ar.SOLIDUS:
this._leaveAttrValue(), this.state = Qr.SELF_CLOSING_START_TAG;
break;
case ar.GREATER_THAN_SIGN:
this._leaveAttrValue(), this.state = Qr.DATA, this.emitCurrentTagToken();
break;
case ar.EOF:
this._err(_r.eofInTag), this._emitEOFToken();
break;
default:
this._err(_r.missingWhitespaceBetweenAttributes), this.state = Qr.BEFORE_ATTRIBUTE_NAME, this._stateBeforeAttributeName(e)
}
}
_stateSelfClosingStartTag(e) {
switch (e) {
case ar.GREATER_THAN_SIGN:
this.currentToken.selfClosing = !0, this.state = Qr.DATA, this.emitCurrentTagToken();
break;
case ar.EOF:
this._err(_r.eofInTag), this._emitEOFToken();
break;
default:
this._err(_r.unexpectedSolidusInTag), this.state = Qr.BEFORE_ATTRIBUTE_NAME, this._stateBeforeAttributeName(e)
}
}
_stateBogusComment(e) {
var t = this.currentToken;
switch (e) {
case ar.GREATER_THAN_SIGN:
this.state = Qr.DATA, this.emitCurrentComment(t);
break;
case ar.EOF:
this.emitCurrentComment(t), this._emitEOFToken();
break;
case ar.NULL:
this._err(_r.unexpectedNullCharacter), t.data += sr;
break;
default:
t.data += String.fromCodePoint(e)
}
}
_stateMarkupDeclarationOpen(e) {
this._consumeSequenceIfMatch(or, !0) ? (this._createCommentToken(or.length + 1), this.state = Qr.COMMENT_START) : this._consumeSequenceIfMatch(ur, !1) ? (this.currentLocation = this.getCurrentLocation(ur.length + 1), this.state = Qr.DOCTYPE) : this._consumeSequenceIfMatch(cr, !0) ? this.inForeignNode ? this.state = Qr.CDATA_SECTION : (this._err(_r.cdataInHtmlContent), this._createCommentToken(cr.length + 1), this.currentToken.data = "[CDATA[", this.state = Qr.BOGUS_COMMENT) : this._ensureHibernation() || (this._err(_r.incorrectlyOpenedComment), this._createCommentToken(2), this.state = Qr.BOGUS_COMMENT, this._stateBogusComment(e))
}
_stateCommentStart(e) {
switch (e) {
case ar.HYPHEN_MINUS:
this.state = Qr.COMMENT_START_DASH;
break;
case ar.GREATER_THAN_SIGN: {
this._err(_r.abruptClosingOfEmptyComment), this.state = Qr.DATA;
const e = this.currentToken;
this.emitCurrentComment(e);
break
}
default:
this.state = Qr.COMMENT, this._stateComment(e)
}
}
_stateCommentStartDash(e) {
var t = this.currentToken;
switch (e) {
case ar.HYPHEN_MINUS:
this.state = Qr.COMMENT_END;
break;
case ar.GREATER_THAN_SIGN:
this._err(_r.abruptClosingOfEmptyComment), this.state = Qr.DATA, this.emitCurrentComment(t);
break;
case ar.EOF:
this._err(_r.eofInComment), this.emitCurrentComment(t), this._emitEOFToken();
break;
default:
t.data += "-", this.state = Qr.COMMENT, this._stateComment(e)
}
}
_stateComment(e) {
var t = this.currentToken;
switch (e) {
case ar.HYPHEN_MINUS:
this.state = Qr.COMMENT_END_DASH;
break;
case ar.LESS_THAN_SIGN:
t.data += "<", this.state = Qr.COMMENT_LESS_THAN_SIGN;
break;
case ar.NULL:
this._err(_r.unexpectedNullCharacter), t.data += sr;
break;
case ar.EOF:
this._err(_r.eofInComment), this.emitCurrentComment(t), this._emitEOFToken();
break;
default:
t.data += String.fromCodePoint(e)
}
}
_stateCommentLessThanSign(e) {
var t = this.currentToken;
switch (e) {
case ar.EXCLAMATION_MARK:
t.data += "!", this.state = Qr.COMMENT_LESS_THAN_SIGN_BANG;
break;
case ar.LESS_THAN_SIGN:
t.data += "<";
break;
default:
this.state = Qr.COMMENT, this._stateComment(e)
}
}
_stateCommentLessThanSignBang(e) {
e === ar.HYPHEN_MINUS ? this.state = Qr.COMMENT_LESS_THAN_SIGN_BANG_DASH : (this.state = Qr.COMMENT, this._stateComment(e))
}
_stateCommentLessThanSignBangDash(e) {
e === ar.HYPHEN_MINUS ? this.state = Qr.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH : (this.state = Qr.COMMENT_END_DASH, this._stateCommentEndDash(e))
}
_stateCommentLessThanSignBangDashDash(e) {
e !== ar.GREATER_THAN_SIGN && e !== ar.EOF && this._err(_r.nestedComment), this.state = Qr.COMMENT_END, this._stateCommentEnd(e)
}
_stateCommentEndDash(e) {
var t = this.currentToken;
switch (e) {
case ar.HYPHEN_MINUS:
this.state = Qr.COMMENT_END;
break;
case ar.EOF:
this._err(_r.eofInComment), this.emitCurrentComment(t), this._emitEOFToken();
break;
default:
t.data += "-", this.state = Qr.COMMENT, this._stateComment(e)
}
}
_stateCommentEnd(e) {
var t = this.currentToken;
switch (e) {
case ar.GREATER_THAN_SIGN:
this.state = Qr.DATA, this.emitCurrentComment(t);
break;
case ar.EXCLAMATION_MARK:
this.state = Qr.COMMENT_END_BANG;
break;
case ar.HYPHEN_MINUS:
t.data += "-";
break;
case ar.EOF:
this._err(_r.eofInComment), this.emitCurrentComment(t), this._emitEOFToken();
break;
default:
t.data += "--", this.state = Qr.COMMENT, this._stateComment(e)
}
}
_stateCommentEndBang(e) {
var t = this.currentToken;
switch (e) {
case ar.HYPHEN_MINUS:
t.data += "--!", this.state = Qr.COMMENT_END_DASH;
break;
case ar.GREATER_THAN_SIGN:
this._err(_r.incorrectlyClosedComment), this.state = Qr.DATA, this.emitCurrentComment(t);
break;
case ar.EOF:
this._err(_r.eofInComment), this.emitCurrentComment(t), this._emitEOFToken();
break;
default:
t.data += "--!", this.state = Qr.COMMENT, this._stateComment(e)
}
}
_stateDoctype(e) {
switch (e) {
case ar.SPACE:
case ar.LINE_FEED:
case ar.TABULATION:
case ar.FORM_FEED:
this.state = Qr.BEFORE_DOCTYPE_NAME;
break;
case ar.GREATER_THAN_SIGN:
this.state = Qr.BEFORE_DOCTYPE_NAME, this._stateBeforeDoctypeName(e);
break;
case ar.EOF: {
this._err(_r.eofInDoctype), this._createDoctypeToken(null);
const e = this.currentToken;
e.forceQuirks = !0, this.emitCurrentDoctype(e), this._emitEOFToken();
break
}
default:
this._err(_r.missingWhitespaceBeforeDoctypeName), this.state = Qr.BEFORE_DOCTYPE_NAME, this._stateBeforeDoctypeName(e)
}
}
_stateBeforeDoctypeName(e) {
if (Zr(e)) this._createDoctypeToken(String.fromCharCode(ri(e))), this.state = Qr.DOCTYPE_NAME; else switch (e) {
case ar.SPACE:
case ar.LINE_FEED:
case ar.TABULATION:
case ar.FORM_FEED:
break;
case ar.NULL:
this._err(_r.unexpectedNullCharacter), this._createDoctypeToken(sr), this.state = Qr.DOCTYPE_NAME;
break;
case ar.GREATER_THAN_SIGN: {
this._err(_r.missingDoctypeName), this._createDoctypeToken(null);
const e = this.currentToken;
e.forceQuirks = !0, this.emitCurrentDoctype(e), this.state = Qr.DATA;
break
}
case ar.EOF: {
this._err(_r.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 = Qr.DOCTYPE_NAME
}
}
_stateDoctypeName(e) {
var t = this.currentToken;
switch (e) {
case ar.SPACE:
case ar.LINE_FEED:
case ar.TABULATION:
case ar.FORM_FEED:
this.state = Qr.AFTER_DOCTYPE_NAME;
break;
case ar.GREATER_THAN_SIGN:
this.state = Qr.DATA, this.emitCurrentDoctype(t);
break;
case ar.NULL:
this._err(_r.unexpectedNullCharacter), t.name += sr;
break;
case ar.EOF:
this._err(_r.eofInDoctype), t.forceQuirks = !0, this.emitCurrentDoctype(t), this._emitEOFToken();
break;
default:
t.name += String.fromCodePoint(Zr(e) ? ri(e) : e)
}
}
_stateAfterDoctypeName(e) {
var t = this.currentToken;
switch (e) {
case ar.SPACE:
case ar.LINE_FEED:
case ar.TABULATION:
case ar.FORM_FEED:
break;
case ar.GREATER_THAN_SIGN:
this.state = Qr.DATA, this.emitCurrentDoctype(t);
break;
case ar.EOF:
this._err(_r.eofInDoctype), t.forceQuirks = !0, this.emitCurrentDoctype(t), this._emitEOFToken();
break;
default:
this._consumeSequenceIfMatch(hr, !1) ? this.state = Qr.AFTER_DOCTYPE_PUBLIC_KEYWORD : this._consumeSequenceIfMatch(fr, !1) ? this.state = Qr.AFTER_DOCTYPE_SYSTEM_KEYWORD : this._ensureHibernation() || (this._err(_r.invalidCharacterSequenceAfterDoctypeName), t.forceQuirks = !0, this.state = Qr.BOGUS_DOCTYPE, this._stateBogusDoctype(e))
}
}
_stateAfterDoctypePublicKeyword(e) {
var t = this.currentToken;
switch (e) {
case ar.SPACE:
case ar.LINE_FEED:
case ar.TABULATION:
case ar.FORM_FEED:
this.state = Qr.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;
break;
case ar.QUOTATION_MARK:
this._err(_r.missingWhitespaceAfterDoctypePublicKeyword), t.publicId = "", this.state = Qr.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;
break;
case ar.APOSTROPHE:
this._err(_r.missingWhitespaceAfterDoctypePublicKeyword), t.publicId = "", this.state = Qr.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;
break;
case ar.GREATER_THAN_SIGN:
this._err(_r.missingDoctypePublicIdentifier), t.forceQuirks = !0, this.state = Qr.DATA, this.emitCurrentDoctype(t);
break;
case ar.EOF:
this._err(_r.eofInDoctype), t.forceQuirks = !0, this.emitCurrentDoctype(t), this._emitEOFToken();
break;
default:
this._err(_r.missingQuoteBeforeDoctypePublicIdentifier), t.forceQuirks = !0, this.state = Qr.BOGUS_DOCTYPE, this._stateBogusDoctype(e)
}
}
_stateBeforeDoctypePublicIdentifier(e) {
var t = this.currentToken;
switch (e) {
case ar.SPACE:
case ar.LINE_FEED:
case ar.TABULATION:
case ar.FORM_FEED:
break;
case ar.QUOTATION_MARK:
t.publicId = "", this.state = Qr.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;
break;
case ar.APOSTROPHE:
t.publicId = "", this.state = Qr.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;
break;
case ar.GREATER_THAN_SIGN:
this._err(_r.missingDoctypePublicIdentifier), t.forceQuirks = !0, this.state = Qr.DATA, this.emitCurrentDoctype(t);
break;
case ar.EOF:
this._err(_r.eofInDoctype), t.forceQuirks = !0, this.emitCurrentDoctype(t), this._emitEOFToken();
break;
default:
this._err(_r.missingQuoteBeforeDoctypePublicIdentifier), t.forceQuirks = !0, this.state = Qr.BOGUS_DOCTYPE, this._stateBogusDoctype(e)
}
}
_stateDoctypePublicIdentifierDoubleQuoted(e) {
var t = this.currentToken;
switch (e) {
case ar.QUOTATION_MARK:
this.state = Qr.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;
break;
case ar.NULL:
this._err(_r.unexpectedNullCharacter), t.publicId += sr;
break;
case ar.GREATER_THAN_SIGN:
this._err(_r.abruptDoctypePublicIdentifier), t.forceQuirks = !0, this.emitCurrentDoctype(t), this.state = Qr.DATA;
break;
case ar.EOF:
this._err(_r.eofInDoctype), t.forceQuirks = !0, this.emitCurrentDoctype(t), this._emitEOFToken();
break;
default:
t.publicId += String.fromCodePoint(e)
}
}
_stateDoctypePublicIdentifierSingleQuoted(e) {
var t = this.currentToken;
switch (e) {
case ar.APOSTROPHE:
this.state = Qr.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;
break;
case ar.NULL:
this._err(_r.unexpectedNullCharacter), t.publicId += sr;
break;
case ar.GREATER_THAN_SIGN:
this._err(_r.abruptDoctypePublicIdentifier), t.forceQuirks = !0, this.emitCurrentDoctype(t), this.state = Qr.DATA;
break;
case ar.EOF:
this._err(_r.eofInDoctype), t.forceQuirks = !0, this.emitCurrentDoctype(t), this._emitEOFToken();
break;
default:
t.publicId += String.fromCodePoint(e)
}
}
_stateAfterDoctypePublicIdentifier(e) {
var t = this.currentToken;
switch (e) {
case ar.SPACE:
case ar.LINE_FEED:
case ar.TABULATION:
case ar.FORM_FEED:
this.state = Qr.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;
break;
case ar.GREATER_THAN_SIGN:
this.state = Qr.DATA, this.emitCurrentDoctype(t);
break;
case ar.QUOTATION_MARK:
this._err(_r.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers), t.systemId = "", this.state = Qr.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;
break;
case ar.APOSTROPHE:
this._err(_r.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers), t.systemId = "", this.state = Qr.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;
break;
case ar.EOF:
this._err(_r.eofInDoctype), t.forceQuirks = !0, this.emitCurrentDoctype(t), this._emitEOFToken();
break;
default:
this._err(_r.missingQuoteBeforeDoctypeSystemIdentifier), t.forceQuirks = !0, this.state = Qr.BOGUS_DOCTYPE, this._stateBogusDoctype(e)
}
}
_stateBetweenDoctypePublicAndSystemIdentifiers(e) {
var t = this.currentToken;
switch (e) {
case ar.SPACE:
case ar.LINE_FEED:
case ar.TABULATION:
case ar.FORM_FEED:
break;
case ar.GREATER_THAN_SIGN:
this.emitCurrentDoctype(t), this.state = Qr.DATA;
break;
case ar.QUOTATION_MARK:
t.systemId = "", this.state = Qr.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;
break;
case ar.APOSTROPHE:
t.systemId = "", this.state = Qr.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;
break;
case ar.EOF:
this._err(_r.eofInDoctype), t.forceQuirks = !0, this.emitCurrentDoctype(t), this._emitEOFToken();
break;
default:
this._err(_r.missingQuoteBeforeDoctypeSystemIdentifier), t.forceQuirks = !0, this.state = Qr.BOGUS_DOCTYPE, this._stateBogusDoctype(e)
}
}
_stateAfterDoctypeSystemKeyword(e) {
var t = this.currentToken;
switch (e) {
case ar.SPACE:
case ar.LINE_FEED:
case ar.TABULATION:
case ar.FORM_FEED:
this.state = Qr.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;
break;
case ar.QUOTATION_MARK:
this._err(_r.missingWhitespaceAfterDoctypeSystemKeyword), t.systemId = "", this.state = Qr.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;
break;
case ar.APOSTROPHE:
this._err(_r.missingWhitespaceAfterDoctypeSystemKeyword), t.systemId = "", this.state = Qr.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;
break;
case ar.GREATER_THAN_SIGN:
this._err(_r.missingDoctypeSystemIdentifier), t.forceQuirks = !0, this.state = Qr.DATA, this.emitCurrentDoctype(t);
break;
case ar.EOF:
this._err(_r.eofInDoctype), t.forceQuirks = !0, this.emitCurrentDoctype(t), this._emitEOFToken();
break;
default:
this._err(_r.missingQuoteBeforeDoctypeSystemIdentifier), t.forceQuirks = !0, this.state = Qr.BOGUS_DOCTYPE, this._stateBogusDoctype(e)
}
}
_stateBeforeDoctypeSystemIdentifier(e) {
var t = this.currentToken;
switch (e) {
case ar.SPACE:
case ar.LINE_FEED:
case ar.TABULATION:
case ar.FORM_FEED:
break;
case ar.QUOTATION_MARK:
t.systemId = "", this.state = Qr.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;
break;
case ar.APOSTROPHE:
t.systemId = "", this.state = Qr.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;
break;
case ar.GREATER_THAN_SIGN:
this._err(_r.missingDoctypeSystemIdentifier), t.forceQuirks = !0, this.state = Qr.DATA, this.emitCurrentDoctype(t);
break;
case ar.EOF:
this._err(_r.eofInDoctype), t.forceQuirks = !0, this.emitCurrentDoctype(t), this._emitEOFToken();
break;
default:
this._err(_r.missingQuoteBeforeDoctypeSystemIdentifier), t.forceQuirks = !0, this.state = Qr.BOGUS_DOCTYPE, this._stateBogusDoctype(e)
}
}
_stateDoctypeSystemIdentifierDoubleQuoted(e) {
var t = this.currentToken;
switch (e) {
case ar.QUOTATION_MARK:
this.state = Qr.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;
break;
case ar.NULL:
this._err(_r.unexpectedNullCharacter), t.systemId += sr;
break;
case ar.GREATER_THAN_SIGN:
this._err(_r.abruptDoctypeSystemIdentifier), t.forceQuirks = !0, this.emitCurrentDoctype(t), this.state = Qr.DATA;
break;
case ar.EOF:
this._err(_r.eofInDoctype), t.forceQuirks = !0, this.emitCurrentDoctype(t), this._emitEOFToken();
break;
default:
t.systemId += String.fromCodePoint(e)
}
}
_stateDoctypeSystemIdentifierSingleQuoted(e) {
var t = this.currentToken;
switch (e) {
case ar.APOSTROPHE:
this.state = Qr.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;
break;
case ar.NULL:
this._err(_r.unexpectedNullCharacter), t.systemId += sr;
break;
case ar.GREATER_THAN_SIGN:
this._err(_r.abruptDoctypeSystemIdentifier), t.forceQuirks = !0, this.emitCurrentDoctype(t), this.state = Qr.DATA;
break;
case ar.EOF:
this._err(_r.eofInDoctype), t.forceQuirks = !0, this.emitCurrentDoctype(t), this._emitEOFToken();
break;
default:
t.systemId += String.fromCodePoint(e)
}
}
_stateAfterDoctypeSystemIdentifier(e) {
var t = this.currentToken;
switch (e) {
case ar.SPACE:
case ar.LINE_FEED:
case ar.TABULATION:
case ar.FORM_FEED:
break;
case ar.GREATER_THAN_SIGN:
this.emitCurrentDoctype(t), this.state = Qr.DATA;
break;
case ar.EOF:
this._err(_r.eofInDoctype), t.forceQuirks = !0, this.emitCurrentDoctype(t), this._emitEOFToken();
break;
default:
this._err(_r.unexpectedCharacterAfterDoctypeSystemIdentifier), this.state = Qr.BOGUS_DOCTYPE, this._stateBogusDoctype(e)
}
}
_stateBogusDoctype(e) {
var t = this.currentToken;
switch (e) {
case ar.GREATER_THAN_SIGN:
this.emitCurrentDoctype(t), this.state = Qr.DATA;
break;
case ar.NULL:
this._err(_r.unexpectedNullCharacter);
break;
case ar.EOF:
this.emitCurrentDoctype(t), this._emitEOFToken()
}
}
_stateCdataSection(e) {
switch (e) {
case ar.RIGHT_SQUARE_BRACKET:
this.state = Qr.CDATA_SECTION_BRACKET;
break;
case ar.EOF:
this._err(_r.eofInCdata), this._emitEOFToken();
break;
default:
this._emitCodePoint(e)
}
}
_stateCdataSectionBracket(e) {
e === ar.RIGHT_SQUARE_BRACKET ? this.state = Qr.CDATA_SECTION_END : (this._emitChars("]"), this.state = Qr.CDATA_SECTION, this._stateCdataSection(e))
}
_stateCdataSectionEnd(e) {
switch (e) {
case ar.GREATER_THAN_SIGN:
this.state = Qr.DATA;
break;
case ar.RIGHT_SQUARE_BRACKET:
this._emitChars("]");
break;
default:
this._emitChars("]]"), this.state = Qr.CDATA_SECTION, this._stateCdataSection(e)
}
}
_stateCharacterReference(e) {
e === ar.NUMBER_SIGN ? this.state = Qr.NUMERIC_CHARACTER_REFERENCE : ei(e) ? (this.state = Qr.NAMED_CHARACTER_REFERENCE, this._stateNamedCharacterReference(e)) : (this._flushCodePointConsumedAsCharacterReference(ar.AMPERSAND), this._reconsumeInState(this.returnState, e))
}
_stateNamedCharacterReference(e) {
var t = this._matchNamedCharacterReference(e);
if (!this._ensureHibernation()) if (t) {
for (let e = 0; e < t.length; e++) this._flushCodePointConsumedAsCharacterReference(t[e]);
this.state = this.returnState
} else this._flushCodePointConsumedAsCharacterReference(ar.AMPERSAND), this.state = Qr.AMBIGUOUS_AMPERSAND
}
_stateAmbiguousAmpersand(e) {
ei(e) ? this._flushCodePointConsumedAsCharacterReference(e) : (e === ar.SEMICOLON && this._err(_r.unknownNamedCharacterReference), this._reconsumeInState(this.returnState, e))
}
_stateNumericCharacterReference(e) {
this.charRefCode = 0, e === ar.LATIN_SMALL_X || e === ar.LATIN_CAPITAL_X ? this.state = Qr.HEXADEMICAL_CHARACTER_REFERENCE_START : Xr(e) ? (this.state = Qr.DECIMAL_CHARACTER_REFERENCE, this._stateDecimalCharacterReference(e)) : (this._err(_r.absenceOfDigitsInNumericCharacterReference), this._flushCodePointConsumedAsCharacterReference(ar.AMPERSAND), this._flushCodePointConsumedAsCharacterReference(ar.NUMBER_SIGN), this._reconsumeInState(this.returnState, e))
}
_stateHexademicalCharacterReferenceStart(e) {
!function (e) {
return Xr(e) || ti(e) || ni(e)
}(e) ? (this._err(_r.absenceOfDigitsInNumericCharacterReference), this._flushCodePointConsumedAsCharacterReference(ar.AMPERSAND), this._flushCodePointConsumedAsCharacterReference(ar.NUMBER_SIGN), this._unconsume(2), this.state = this.returnState) : (this.state = Qr.HEXADEMICAL_CHARACTER_REFERENCE, this._stateHexademicalCharacterReference(e))
}
_stateHexademicalCharacterReference(e) {
ti(e) ? this.charRefCode = 16 * this.charRefCode + e - 55 : ni(e) ? this.charRefCode = 16 * this.charRefCode + e - 87 : Xr(e) ? this.charRefCode = 16 * this.charRefCode + e - 48 : e === ar.SEMICOLON ? this.state = Qr.NUMERIC_CHARACTER_REFERENCE_END : (this._err(_r.missingSemicolonAfterCharacterReference), this.state = Qr.NUMERIC_CHARACTER_REFERENCE_END, this._stateNumericCharacterReferenceEnd(e))
}
_stateDecimalCharacterReference(e) {
Xr(e) ? this.charRefCode = 10 * this.charRefCode + e - 48 : e === ar.SEMICOLON ? this.state = Qr.NUMERIC_CHARACTER_REFERENCE_END : (this._err(_r.missingSemicolonAfterCharacterReference), this.state = Qr.NUMERIC_CHARACTER_REFERENCE_END, this._stateNumericCharacterReferenceEnd(e))
}
_stateNumericCharacterReferenceEnd(e) {
if (this.charRefCode === ar.NULL) this._err(_r.nullCharacterReference), this.charRefCode = ar.REPLACEMENT_CHARACTER; else if (1114111 < this.charRefCode) this._err(_r.characterReferenceOutsideUnicodeRange), this.charRefCode = ar.REPLACEMENT_CHARACTER; else if (pr(this.charRefCode)) this._err(_r.surrogateCharacterReference), this.charRefCode = ar.REPLACEMENT_CHARACTER; else if (mr(this.charRefCode)) this._err(_r.noncharacterCharacterReference); else if (dr(this.charRefCode) || this.charRefCode === ar.CARRIAGE_RETURN) {
this._err(_r.controlCharacterReference);
const e = $r.get(this.charRefCode);
void 0 !== e && (this.charRefCode = e)
}
this._flushCodePointConsumedAsCharacterReference(this.charRefCode), this._reconsumeInState(this.returnState, e)
}
}
const oi = new Set([Ur.DD, Ur.DT, Ur.LI, Ur.OPTGROUP, Ur.OPTION, Ur.P, Ur.RB, Ur.RP, Ur.RT, Ur.RTC]),
ci = new Set([...oi, Ur.CAPTION, Ur.COLGROUP, Ur.TBODY, Ur.TD, Ur.TFOOT, Ur.TH, Ur.THEAD, Ur.TR]),
ui = new Map([[Ur.APPLET, Mr.HTML], [Ur.CAPTION, Mr.HTML], [Ur.HTML, Mr.HTML], [Ur.MARQUEE, Mr.HTML], [Ur.OBJECT, Mr.HTML], [Ur.TABLE, Mr.HTML], [Ur.TD, Mr.HTML], [Ur.TEMPLATE, Mr.HTML], [Ur.TH, Mr.HTML], [Ur.ANNOTATION_XML, Mr.MATHML], [Ur.MI, Mr.MATHML], [Ur.MN, Mr.MATHML], [Ur.MO, Mr.MATHML], [Ur.MS, Mr.MATHML], [Ur.MTEXT, Mr.MATHML], [Ur.DESC, Mr.SVG], [Ur.FOREIGN_OBJECT, Mr.SVG], [Ur.TITLE, Mr.SVG]]),
li = [Ur.H1, Ur.H2, Ur.H3, Ur.H4, Ur.H5, Ur.H6], hi = [Ur.TR, Ur.TEMPLATE, Ur.HTML],
fi = [Ur.TBODY, Ur.TFOOT, Ur.THEAD, Ur.TEMPLATE, Ur.HTML], pi = [Ur.TABLE, Ur.TEMPLATE, Ur.HTML],
di = [Ur.TD, Ur.TH];
class mi {
get currentTmplContentOrNode() {
return this._isInTemplate() ? this.treeAdapter.getTemplateContent(this.current) : this.current
}
constructor(e, t, n) {
this.treeAdapter = t, this.handler = n, this.items = [], this.tagIDs = [], this.stackTop = -1, this.tmplCount = 0, this.currentTagId = Ur.UNKNOWN, this.current = e
}
_indexOf(e) {
return this.items.lastIndexOf(e, this.stackTop)
}
_isInTemplate() {
return this.currentTagId === Ur.TEMPLATE && this.treeAdapter.getNamespaceURI(this.current) === Mr.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() {
var e = this.current;
0 < this.tmplCount && this._isInTemplate() && this.tmplCount--, this.stackTop--, this._updateCurrentElement(), this.handler.onItemPop(e, !0)
}
replace(e, t) {
e = this._indexOf(e), this.items[e] = t, e === this.stackTop && (this.current = t)
}
insertAfter(e, t, n) {
e = this._indexOf(e) + 1, this.items.splice(e, 0, t), this.tagIDs.splice(e, 0, n), this.stackTop++, e === this.stackTop && this._updateCurrentElement(), this.handler.onItemPush(this.current, this.currentTagId, e === this.stackTop)
}
popUntilTagNamePopped(e) {
let t = this.stackTop + 1;
for (; 0 < (t = this.tagIDs.lastIndexOf(e, t - 1)) && this.treeAdapter.getNamespaceURI(this.items[t]) !== Mr.HTML;) ;
this.shortenToLength(t < 0 ? 0 : t)
}
shortenToLength(e) {
for (; this.stackTop >= e;) {
var t = this.current;
0 < this.tmplCount && this._isInTemplate() && --this.tmplCount, this.stackTop--, this._updateCurrentElement(), this.handler.onItemPop(t, this.stackTop < e)
}
}
popUntilElementPopped(e) {
e = this._indexOf(e), this.shortenToLength(e < 0 ? 0 : e)
}
popUntilPopped(e, t) {
e = this._indexOfTagNames(e, t), this.shortenToLength(e < 0 ? 0 : e)
}
popUntilNumberedHeaderPopped() {
this.popUntilPopped(li, Mr.HTML)
}
popUntilTableCellPopped() {
this.popUntilPopped(di, Mr.HTML)
}
popAllUpToHtmlElement() {
this.tmplCount = 0, this.shortenToLength(1)
}
_indexOfTagNames(e, t) {
for (let n = this.stackTop; 0 <= n; n--) if (e.includes(this.tagIDs[n]) && this.treeAdapter.getNamespaceURI(this.items[n]) === t) return n;
return -1
}
clearBackTo(e, t) {
e = this._indexOfTagNames(e, t), this.shortenToLength(e + 1)
}
clearBackToTableContext() {
this.clearBackTo(pi, Mr.HTML)
}
clearBackToTableBodyContext() {
this.clearBackTo(fi, Mr.HTML)
}
clearBackToTableRowContext() {
this.clearBackTo(hi, Mr.HTML)
}
remove(e) {
var t = this._indexOf(e);
0 <= t && (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 1 <= this.stackTop && this.tagIDs[1] === Ur.BODY ? this.items[1] : null
}
contains(e) {
return -1 < this._indexOf(e)
}
getCommonAncestor(e) {
return 0 <= (e = this._indexOf(e) - 1) ? this.items[e] : null
}
isRootHtmlElementCurrent() {
return 0 === this.stackTop && this.tagIDs[0] === Ur.HTML
}
hasInScope(e) {
for (let t = this.stackTop; 0 <= t; t--) {
var n = this.tagIDs[t], r = this.treeAdapter.getNamespaceURI(this.items[t]);
if (n === e && r === Mr.HTML) return !0;
if (ui.get(n) === r) return !1
}
return !0
}
hasNumberedHeaderInScope() {
for (let e = this.stackTop; 0 <= e; e--) {
var t = this.tagIDs[e], n = this.treeAdapter.getNamespaceURI(this.items[e]);
if (Wr(t) && n === Mr.HTML) return !0;
if (ui.get(t) === n) return !1
}
return !0
}
hasInListItemScope(e) {
for (let t = this.stackTop; 0 <= t; t--) {
var n = this.tagIDs[t], r = this.treeAdapter.getNamespaceURI(this.items[t]);
if (n === e && r === Mr.HTML) return !0;
if ((n === Ur.UL || n === Ur.OL) && r === Mr.HTML || ui.get(n) === r) return !1
}
return !0
}
hasInButtonScope(e) {
for (let t = this.stackTop; 0 <= t; t--) {
var n = this.tagIDs[t], r = this.treeAdapter.getNamespaceURI(this.items[t]);
if (n === e && r === Mr.HTML) return !0;
if (n === Ur.BUTTON && r === Mr.HTML || ui.get(n) === r) return !1
}
return !0
}
hasInTableScope(e) {
for (let t = this.stackTop; 0 <= t; t--) {
var n = this.tagIDs[t];
if (this.treeAdapter.getNamespaceURI(this.items[t]) === Mr.HTML) {
if (n === e) return !0;
if (n === Ur.TABLE || n === Ur.TEMPLATE || n === Ur.HTML) return !1
}
}
return !0
}
hasTableBodyContextInTableScope() {
for (let e = this.stackTop; 0 <= e; e--) {
var t = this.tagIDs[e];
if (this.treeAdapter.getNamespaceURI(this.items[e]) === Mr.HTML) {
if (t === Ur.TBODY || t === Ur.THEAD || t === Ur.TFOOT) return !0;
if (t === Ur.TABLE || t === Ur.HTML) return !1
}
}
return !0
}
hasInSelectScope(e) {
for (let t = this.stackTop; 0 <= t; t--) {
var n = this.tagIDs[t];
if (this.treeAdapter.getNamespaceURI(this.items[t]) === Mr.HTML) {
if (n === e) return !0;
if (n !== Ur.OPTION && n !== Ur.OPTGROUP) return !1
}
}
return !0
}
generateImpliedEndTags() {
for (; oi.has(this.currentTagId);) this.pop()
}
generateImpliedEndTagsThoroughly() {
for (; ci.has(this.currentTagId);) this.pop()
}
generateImpliedEndTagsWithExclusion(e) {
for (; this.currentTagId !== e && ci.has(this.currentTagId);) this.pop()
}
}
!function (e) {
e[e.Marker = 0] = "Marker", e[e.Element = 1] = "Element"
}(_i = _i || {});
const Ei = {type: _i.Marker};
class Ti {
constructor(e) {
this.treeAdapter = e, this.entries = [], this.bookmark = null
}
_getNoahArkConditionCandidates(e, t) {
var 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 === _i.Marker) break;
var a = t.element;
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)) {
var t = this.treeAdapter.getAttrList(e), n = this._getNoahArkConditionCandidates(e, t);
if (!(n.length < 3)) {
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) && 3 <= (i += 1) && this.entries.splice(t.idx, 1)
}
}
}
}
insertMarker() {
this.entries.unshift(Ei)
}
pushElement(e, t) {
this._ensureNoahArkCondition(e), this.entries.unshift({type: _i.Element, element: e, token: t})
}
insertElementAfterBookmark(e, t) {
var n = this.entries.indexOf(this.bookmark);
this.entries.splice(n, 0, {type: _i.Element, element: e, token: t})
}
removeEntry(e) {
0 <= (e = this.entries.indexOf(e)) && this.entries.splice(e, 1)
}
clearToLastMarker() {
var e = this.entries.indexOf(Ei);
0 <= e ? this.entries.splice(0, e + 1) : this.entries.length = 0
}
getElementEntryInScopeWithTagName(e) {
var t = this.entries.find(t => t.type === _i.Marker || this.treeAdapter.getTagName(t.element) === e);
return t && t.type === _i.Element ? t : null
}
getElementEntry(e) {
return this.entries.find(t => t.type === _i.Element && t.element === e)
}
}
function Ai(e) {
return {nodeName: "#text", value: e, parentNode: null}
}
const gi = {
createDocument: () => ({nodeName: "#document", mode: Br.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) {
n = e.childNodes.indexOf(n), e.childNodes.splice(n, 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};
gi.appendChild(e, i)
}
},
setDocumentMode(e, t) {
e.mode = t
},
getDocumentMode: e => e.mode,
detachNode(e) {
var t;
e.parentNode && (t = e.parentNode.childNodes.indexOf(e), e.parentNode.childNodes.splice(t, 1), e.parentNode = null)
},
insertText(e, t) {
if (0 < e.childNodes.length) {
var n = e.childNodes[e.childNodes.length - 1];
if (gi.isTextNode(n)) return void (n.value += t)
}
gi.appendChild(e, Ai(t))
},
insertTextBefore(e, t, n) {
var r = e.childNodes[e.childNodes.indexOf(n) - 1];
r && gi.isTextNode(r) ? r.value += t : gi.insertBefore(e, Ai(t), n)
},
adoptAttributes(e, t) {
var 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}
}
}, vi = "html", yi = "about:legacy-compat", Si = "http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",
Ci = ["+//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//"],
Ni = [...Ci, "-//w3c//dtd html 4.01 frameset//", "-//w3c//dtd html 4.01 transitional//"],
bi = new Set(["-//w3o//dtd w3 html strict 3.0//en//", "-/w3c/dtd html 4.0 transitional/en", "html"]),
Ii = ["-//w3c//dtd xhtml 1.0 frameset//", "-//w3c//dtd xhtml 1.0 transitional//"],
Oi = [...Ii, "-//w3c//dtd html 4.01 frameset//", "-//w3c//dtd html 4.01 transitional//"];
function ki(e, t) {
return t.some(t => e.startsWith(t))
}
const Li = {TEXT_HTML: "text/html", APPLICATION_XML: "application/xhtml+xml"}, Di = "definitionurl",
Ri = "definitionURL",
wi = 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])),
xi = new Map([["xlink:actuate", {
prefix: "xlink",
name: "actuate",
namespace: Mr.XLINK
}], ["xlink:arcrole", {prefix: "xlink", name: "arcrole", namespace: Mr.XLINK}], ["xlink:href", {
prefix: "xlink",
name: "href",
namespace: Mr.XLINK
}], ["xlink:role", {prefix: "xlink", name: "role", namespace: Mr.XLINK}], ["xlink:show", {
prefix: "xlink",
name: "show",
namespace: Mr.XLINK
}], ["xlink:title", {prefix: "xlink", name: "title", namespace: Mr.XLINK}], ["xlink:type", {
prefix: "xlink",
name: "type",
namespace: Mr.XLINK
}], ["xml:base", {prefix: "xml", name: "base", namespace: Mr.XML}], ["xml:lang", {
prefix: "xml",
name: "lang",
namespace: Mr.XML
}], ["xml:space", {prefix: "xml", name: "space", namespace: Mr.XML}], ["xmlns", {
prefix: "",
name: "xmlns",
namespace: Mr.XMLNS
}], ["xmlns:xlink", {prefix: "xmlns", name: "xlink", namespace: Mr.XMLNS}]]),
Mi = 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])),
Pi = new Set([Ur.B, Ur.BIG, Ur.BLOCKQUOTE, Ur.BODY, Ur.BR, Ur.CENTER, Ur.CODE, Ur.DD, Ur.DIV, Ur.DL, Ur.DT, Ur.EM, Ur.EMBED, Ur.H1, Ur.H2, Ur.H3, Ur.H4, Ur.H5, Ur.H6, Ur.HEAD, Ur.HR, Ur.I, Ur.IMG, Ur.LI, Ur.LISTING, Ur.MENU, Ur.META, Ur.NOBR, Ur.OL, Ur.P, Ur.PRE, Ur.RUBY, Ur.S, Ur.SMALL, Ur.SPAN, Ur.STRONG, Ur.STRIKE, Ur.SUB, Ur.SUP, Ur.TABLE, Ur.TT, Ur.U, Ur.UL, Ur.VAR]);
function Bi(e) {
for (let t = 0; t < e.attrs.length; t++) if (e.attrs[t].name === Di) {
e.attrs[t].name = Ri;
break
}
}
function Fi(e) {
for (let t = 0; t < e.attrs.length; t++) {
var n = wi.get(e.attrs[t].name);
null != n && (e.attrs[t].name = n)
}
}
function Ui(e) {
for (let t = 0; t < e.attrs.length; t++) {
var n = xi.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 Hi(e, t, n, r) {
return (!r || r === Mr.HTML) && function (e, t, n) {
if (t === Mr.MATHML && e === Ur.ANNOTATION_XML) for (let e = 0; e < n.length; e++) if (n[e].name === Pr.ENCODING) {
const t = n[e].value.toLowerCase();
return t === Li.TEXT_HTML || t === Li.APPLICATION_XML
}
return t === Mr.SVG && (e === Ur.FOREIGN_OBJECT || e === Ur.DESC || e === Ur.TITLE)
}(e, t, n) || (!r || r === Mr.MATHML) && function (e, t) {
return t === Mr.MATHML && (e === Ur.MI || e === Ur.MO || e === Ur.MN || e === Ur.MS || e === Ur.MTEXT)
}(e, t)
}
const Gi = "hidden", ji = 8, qi = 3, Ki = (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"
}(Yi = Yi || {}), {startLine: -1, startCol: -1, startOffset: -1, endLine: -1, endCol: -1, endOffset: -1}),
Wi = new Set([Ur.TABLE, Ur.TBODY, Ur.TFOOT, Ur.THEAD, Ur.TR]),
Vi = {scriptingEnabled: !0, sourceCodeLocationInfo: !1, treeAdapter: gi, onParseError: null};
class $i {
constructor(e, t, n = null, r = null) {
this.fragmentContext = n, this.scriptHandler = r, this.currentToken = null, this.stopped = !1, this.insertionMode = Yi.INITIAL, this.originalInsertionMode = Yi.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 = {...Vi, ...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 ai(this.options, this), this.activeFormattingElements = new Ti(this.treeAdapter), this.fragmentContextID = n ? qr(this.treeAdapter.getTagName(n)) : Ur.UNKNOWN, this._setContextModes(null != n ? n : this.document, this.fragmentContextID), this.openElements = new mi(this.document, this.treeAdapter, this)
}
static parse(e, t) {
return (t = new this(t)).tokenizer.write(e, !0), t.document
}
static getFragmentParser(e, t) {
var t = {...Vi, ...t},
r = (null == e && (e = t.treeAdapter.createElement(Fr.TEMPLATE, Mr.HTML, [])), t.treeAdapter.createElement("documentmock", Mr.HTML, []));
return (t = new this(t, r, e)).fragmentContextID === Ur.TEMPLATE && t.tmplInsertionModeStack.unshift(Yi.IN_TEMPLATE), t._initTokenizerForFragmentParsing(), t._insertFakeRootElement(), t._resetInsertionMode(), t._findFormInFragmentContext(), t
}
getFragment() {
var e = this.treeAdapter.getFirstChild(this.document), t = this.treeAdapter.createDocumentFragment();
return this._adoptNodes(e, t), t
}
_err(e, t, n) {
this.onParseError && (t = {
code: t,
startLine: (e = null != (t = e.location) ? t : Ki).startLine,
startCol: e.startCol,
startOffset: e.startOffset,
endLine: n ? e.startLine : e.endLine,
endCol: n ? e.startCol : e.endCol,
endOffset: n ? e.startOffset : e.endOffset
}, this.onParseError(t))
}
onItemPush(e, t, n) {
var r, i;
null != (i = (r = this.treeAdapter).onItemPush) && i.call(r, e), n && 0 < this.openElements.stackTop && 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) && 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) {
var n = e === this.document || this.treeAdapter.getNamespaceURI(e) === Mr.HTML;
this.currentNotInHTML = !n, this.tokenizer.inForeignNode = !n && !this._isIntegrationPoint(t, e)
}
_switchToTextParsing(e, t) {
this._insertElement(e, Mr.HTML), this.tokenizer.state = t, this.originalInsertionMode = this.insertionMode, this.insertionMode = Yi.TEXT
}
switchToPlaintextParsing() {
this.insertionMode = Yi.TEXT, this.originalInsertionMode = Yi.IN_BODY, this.tokenizer.state = zr.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) === Fr.FORM) {
this.formElement = e;
break
}
e = this.treeAdapter.getParentNode(e)
}
}
_initTokenizerForFragmentParsing() {
if (this.fragmentContext && this.treeAdapter.getNamespaceURI(this.fragmentContext) === Mr.HTML) switch (this.fragmentContextID) {
case Ur.TITLE:
case Ur.TEXTAREA:
this.tokenizer.state = zr.RCDATA;
break;
case Ur.STYLE:
case Ur.XMP:
case Ur.IFRAME:
case Ur.NOEMBED:
case Ur.NOFRAMES:
case Ur.NOSCRIPT:
this.tokenizer.state = zr.RAWTEXT;
break;
case Ur.SCRIPT:
this.tokenizer.state = zr.SCRIPT_DATA;
break;
case Ur.PLAINTEXT:
this.tokenizer.state = zr.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 && (t = t && {
...t,
startTag: t
}, this.treeAdapter.setNodeSourceCodeLocation(e, t)), this._shouldFosterParentOnInsertion()) this._fosterParentElement(e); else {
const t = this.openElements.currentTmplContentOrNode;
this.treeAdapter.appendChild(t, e)
}
}
_appendElement(e, t) {
t = this.treeAdapter.createElement(e.tagName, t, e.attrs), this._attachElementToTree(t, e.location)
}
_insertElement(e, t) {
t = this.treeAdapter.createElement(e.tagName, t, e.attrs), this._attachElementToTree(t, e.location), this.openElements.push(t, e.tagID)
}
_insertFakeElement(e, t) {
e = this.treeAdapter.createElement(e, Mr.HTML, []), this._attachElementToTree(e, null), this.openElements.push(e, t)
}
_insertTemplate(e) {
var t = this.treeAdapter.createElement(e.tagName, Mr.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() {
var e = this.treeAdapter.createElement(Fr.HTML, Mr.HTML, []);
this.options.sourceCodeLocationInfo && this.treeAdapter.setNodeSourceCodeLocation(e, null), this.treeAdapter.appendChild(this.openElements.current, e), this.openElements.push(e, Ur.HTML)
}
_appendCommentNode(e, t) {
var 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) {
var r = this.treeAdapter.getChildNodes(t), i = n ? r.lastIndexOf(n) : r.length, i = r[i - 1];
if (this.treeAdapter.getNodeSourceCodeLocation(i)) {
const {endLine: t, endCol: n, endOffset: r} = e.location;
this.treeAdapter.updateNodeSourceCodeLocation(i, {endLine: t, endCol: n, endOffset: r})
} else this.options.sourceCodeLocationInfo && this.treeAdapter.setNodeSourceCodeLocation(i, 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) {
var n, r;
this.treeAdapter.getNodeSourceCodeLocation(e) && t.location && (n = t.location, r = this.treeAdapter.getTagName(e), r = t.type === Tr.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, r))
}
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 !== Ur.SVG || this.treeAdapter.getTagName(t) !== Fr.ANNOTATION_XML || this.treeAdapter.getNamespaceURI(t) !== Mr.MATHML) && (this.tokenizer.inForeignNode || (e.tagID === Ur.MGLYPH || e.tagID === Ur.MALIGNMARK) && !this._isIntegrationPoint(n, t, Mr.HTML))
}
_processToken(e) {
switch (e.type) {
case Tr.CHARACTER:
this.onCharacter(e);
break;
case Tr.NULL_CHARACTER:
this.onNullCharacter(e);
break;
case Tr.COMMENT:
this.onComment(e);
break;
case Tr.DOCTYPE:
this.onDoctype(e);
break;
case Tr.START_TAG:
this._processStartTag(e);
break;
case Tr.END_TAG:
this.onEndTag(e);
break;
case Tr.EOF:
this.onEof(e);
break;
case Tr.WHITESPACE_CHARACTER:
this.onWhitespaceCharacter(e)
}
}
_isIntegrationPoint(e, t, n) {
return Hi(e, this.treeAdapter.getNamespaceURI(t), this.treeAdapter.getAttrList(t), n)
}
_reconstructActiveFormattingElements() {
const e = this.activeFormattingElements.entries.length;
if (e) {
var t = this.activeFormattingElements.entries.findIndex(e => e.type === _i.Marker || this.openElements.contains(e.element));
for (let n = t < 0 ? e - 1 : t - 1; 0 <= n; 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 = Yi.IN_ROW
}
_closePElement() {
this.openElements.generateImpliedEndTagsWithExclusion(Ur.P), this.openElements.popUntilTagNamePopped(Ur.P)
}
_resetInsertionMode() {
for (let e = this.openElements.stackTop; 0 <= e; e--) switch (0 === e && this.fragmentContext ? this.fragmentContextID : this.openElements.tagIDs[e]) {
case Ur.TR:
return void (this.insertionMode = Yi.IN_ROW);
case Ur.TBODY:
case Ur.THEAD:
case Ur.TFOOT:
return void (this.insertionMode = Yi.IN_TABLE_BODY);
case Ur.CAPTION:
return void (this.insertionMode = Yi.IN_CAPTION);
case Ur.COLGROUP:
return void (this.insertionMode = Yi.IN_COLUMN_GROUP);
case Ur.TABLE:
return void (this.insertionMode = Yi.IN_TABLE);
case Ur.BODY:
return void (this.insertionMode = Yi.IN_BODY);
case Ur.FRAMESET:
return void (this.insertionMode = Yi.IN_FRAMESET);
case Ur.SELECT:
return void this._resetInsertionModeForSelect(e);
case Ur.TEMPLATE:
return void (this.insertionMode = this.tmplInsertionModeStack[0]);
case Ur.HTML:
return void (this.insertionMode = this.headElement ? Yi.AFTER_HEAD : Yi.BEFORE_HEAD);
case Ur.TD:
case Ur.TH:
if (0 < e) return void (this.insertionMode = Yi.IN_CELL);
break;
case Ur.HEAD:
if (0 < e) return void (this.insertionMode = Yi.IN_HEAD)
}
this.insertionMode = Yi.IN_BODY
}
_resetInsertionModeForSelect(e) {
if (0 < e) for (let t = e - 1; 0 < t; t--) {
const e = this.openElements.tagIDs[t];
if (e === Ur.TEMPLATE) break;
if (e === Ur.TABLE) return void (this.insertionMode = Yi.IN_SELECT_IN_TABLE)
}
this.insertionMode = Yi.IN_SELECT
}
_isElementCausesFosterParenting(e) {
return Wi.has(e)
}
_shouldFosterParentOnInsertion() {
return this.fosterParentingEnabled && this._isElementCausesFosterParenting(this.openElements.currentTagId)
}
_findFosterParentingLocation() {
for (let e = this.openElements.stackTop; 0 <= e; e--) {
var t = this.openElements.items[e];
switch (this.openElements.tagIDs[e]) {
case Ur.TEMPLATE:
if (this.treeAdapter.getNamespaceURI(t) === Mr.HTML) return {
parent: this.treeAdapter.getTemplateContent(t),
beforeElement: null
};
break;
case Ur.TABLE:
var 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) {
var t = this._findFosterParentingLocation();
t.beforeElement ? this.treeAdapter.insertBefore(t.parent, e, t.beforeElement) : this.treeAdapter.appendChild(t.parent, e)
}
_isSpecialElement(e, t) {
return e = this.treeAdapter.getNamespaceURI(e), Kr[e].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 Yi.INITIAL:
is(this, e);
break;
case Yi.BEFORE_HTML:
ss(this, e);
break;
case Yi.BEFORE_HEAD:
as(this, e);
break;
case Yi.IN_HEAD:
us(this, e);
break;
case Yi.IN_HEAD_NO_SCRIPT:
ls(this, e);
break;
case Yi.AFTER_HEAD:
hs(this, e);
break;
case Yi.IN_BODY:
case Yi.IN_CAPTION:
case Yi.IN_CELL:
case Yi.IN_TEMPLATE:
ds(this, e);
break;
case Yi.TEXT:
case Yi.IN_SELECT:
case Yi.IN_SELECT_IN_TABLE:
this._insertCharacters(e);
break;
case Yi.IN_TABLE:
case Yi.IN_TABLE_BODY:
case Yi.IN_ROW:
Ss(this, e);
break;
case Yi.IN_TABLE_TEXT:
Os(this, e);
break;
case Yi.IN_COLUMN_GROUP:
Rs(this, e);
break;
case Yi.AFTER_BODY:
Gs(this, e);
break;
case Yi.AFTER_AFTER_BODY:
js(this, e)
}
}
onNullCharacter(e) {
if (this.skipNextNewLine = !1, this.tokenizer.inForeignNode) !function (e, t) {
t.chars = sr, e._insertCharacters(t)
}(this, e); else switch (this.insertionMode) {
case Yi.INITIAL:
is(this, e);
break;
case Yi.BEFORE_HTML:
ss(this, e);
break;
case Yi.BEFORE_HEAD:
as(this, e);
break;
case Yi.IN_HEAD:
us(this, e);
break;
case Yi.IN_HEAD_NO_SCRIPT:
ls(this, e);
break;
case Yi.AFTER_HEAD:
hs(this, e);
break;
case Yi.TEXT:
this._insertCharacters(e);
break;
case Yi.IN_TABLE:
case Yi.IN_TABLE_BODY:
case Yi.IN_ROW:
Ss(this, e);
break;
case Yi.IN_COLUMN_GROUP:
Rs(this, e);
break;
case Yi.AFTER_BODY:
Gs(this, e);
break;
case Yi.AFTER_AFTER_BODY:
js(this, e)
}
}
onComment(e) {
if (this.skipNextNewLine = !1, this.currentNotInHTML) ns(this, e); else switch (this.insertionMode) {
case Yi.INITIAL:
case Yi.BEFORE_HTML:
case Yi.BEFORE_HEAD:
case Yi.IN_HEAD:
case Yi.IN_HEAD_NO_SCRIPT:
case Yi.AFTER_HEAD:
case Yi.IN_BODY:
case Yi.IN_TABLE:
case Yi.IN_CAPTION:
case Yi.IN_COLUMN_GROUP:
case Yi.IN_TABLE_BODY:
case Yi.IN_ROW:
case Yi.IN_CELL:
case Yi.IN_SELECT:
case Yi.IN_SELECT_IN_TABLE:
case Yi.IN_TEMPLATE:
case Yi.IN_FRAMESET:
case Yi.AFTER_FRAMESET:
ns(this, e);
break;
case Yi.IN_TABLE_TEXT:
ks(this, e);
break;
case Yi.AFTER_BODY:
!function (e, t) {
e._appendCommentNode(t, e.openElements.items[0])
}(this, e);
break;
case Yi.AFTER_AFTER_BODY:
case Yi.AFTER_AFTER_FRAMESET:
!function (e, t) {
e._appendCommentNode(t, e.document)
}(this, e)
}
}
onDoctype(e) {
switch (this.skipNextNewLine = !1, this.insertionMode) {
case Yi.INITIAL:
!function (e, t) {
e._setDocumentType(t);
var n = t.forceQuirks ? Br.QUIRKS : function (e) {
if (e.name !== vi) return Br.QUIRKS;
var t = e.systemId;
if (t && t.toLowerCase() === Si) return Br.QUIRKS;
let n = e.publicId;
if (null !== n) {
if (n = n.toLowerCase(), bi.has(n)) return Br.QUIRKS;
let e = null === t ? Ni : Ci;
if (ki(n, e)) return Br.QUIRKS;
if (e = null === t ? Ii : Oi, ki(n, e)) return Br.LIMITED_QUIRKS
}
return Br.NO_QUIRKS
}(t);
!function (e) {
return e.name === vi && null === e.publicId && (null === e.systemId || e.systemId === yi)
}(t) && e._err(t, _r.nonConformingDoctype), e.treeAdapter.setDocumentMode(e.document, n), e.insertionMode = Yi.BEFORE_HTML
}(this, e);
break;
case Yi.BEFORE_HEAD:
case Yi.IN_HEAD:
case Yi.IN_HEAD_NO_SCRIPT:
case Yi.AFTER_HEAD:
this._err(e, _r.misplacedDoctype);
break;
case Yi.IN_TABLE_TEXT:
ks(this, e)
}
}
onStartTag(e) {
this.skipNextNewLine = !1, this.currentToken = e, this._processStartTag(e), e.selfClosing && !e.ackSelfClosing && this._err(e, _r.nonVoidHtmlElementStartTagWithTrailingSolidus)
}
_processStartTag(e) {
this.shouldProcessStartTagTokenInForeignContent(e) ? function (e, t) {
var n;
!function (e) {
var t = e.tagID;
return t === Ur.FONT && e.attrs.some(({name: e}) => e === Pr.COLOR || e === Pr.SIZE || e === Pr.FACE) || Pi.has(t)
}(t) ? (n = e._getAdjustedCurrentElement(), (n = e.treeAdapter.getNamespaceURI(n)) === Mr.MATHML ? Bi(t) : n === Mr.SVG && (function (e) {
var t = Mi.get(e.tagName);
null != t && (e.tagName = t, e.tagID = qr(e.tagName))
}(t), Fi(t)), Ui(t), t.selfClosing ? e._appendElement(t, n) : e._insertElement(t, n), t.ackSelfClosing = !0) : (qs(e), e._startTagOutsideForeignContent(t))
}(this, e) : this._startTagOutsideForeignContent(e)
}
_startTagOutsideForeignContent(e) {
switch (this.insertionMode) {
case Yi.INITIAL:
is(this, e);
break;
case Yi.BEFORE_HTML:
!function (e, t) {
t.tagID === Ur.HTML ? (e._insertElement(t, Mr.HTML), e.insertionMode = Yi.BEFORE_HEAD) : ss(e, t)
}(this, e);
break;
case Yi.BEFORE_HEAD:
!function (e, t) {
switch (t.tagID) {
case Ur.HTML:
As(e, t);
break;
case Ur.HEAD:
e._insertElement(t, Mr.HTML), e.headElement = e.openElements.current, e.insertionMode = Yi.IN_HEAD;
break;
default:
as(e, t)
}
}(this, e);
break;
case Yi.IN_HEAD:
os(this, e);
break;
case Yi.IN_HEAD_NO_SCRIPT:
!function (e, t) {
switch (t.tagID) {
case Ur.HTML:
As(e, t);
break;
case Ur.BASEFONT:
case Ur.BGSOUND:
case Ur.HEAD:
case Ur.LINK:
case Ur.META:
case Ur.NOFRAMES:
case Ur.STYLE:
os(e, t);
break;
case Ur.NOSCRIPT:
e._err(t, _r.nestedNoscriptInHead);
break;
default:
ls(e, t)
}
}(this, e);
break;
case Yi.AFTER_HEAD:
!function (e, t) {
switch (t.tagID) {
case Ur.HTML:
As(e, t);
break;
case Ur.BODY:
e._insertElement(t, Mr.HTML), e.framesetOk = !1, e.insertionMode = Yi.IN_BODY;
break;
case Ur.FRAMESET:
e._insertElement(t, Mr.HTML), e.insertionMode = Yi.IN_FRAMESET;
break;
case Ur.BASE:
case Ur.BASEFONT:
case Ur.BGSOUND:
case Ur.LINK:
case Ur.META:
case Ur.NOFRAMES:
case Ur.SCRIPT:
case Ur.STYLE:
case Ur.TEMPLATE:
case Ur.TITLE:
e._err(t, _r.abandonedHeadElementChild), e.openElements.push(e.headElement, Ur.HEAD), os(e, t), e.openElements.remove(e.headElement);
break;
case Ur.HEAD:
e._err(t, _r.misplacedStartTagForHeadElement);
break;
default:
hs(e, t)
}
}(this, e);
break;
case Yi.IN_BODY:
As(this, e);
break;
case Yi.IN_TABLE:
Cs(this, e);
break;
case Yi.IN_TABLE_TEXT:
ks(this, e);
break;
case Yi.IN_CAPTION:
!function (e, t) {
var n = t.tagID;
Ls.has(n) ? e.openElements.hasInTableScope(Ur.CAPTION) && (e.openElements.generateImpliedEndTags(), e.openElements.popUntilTagNamePopped(Ur.CAPTION), e.activeFormattingElements.clearToLastMarker(), e.insertionMode = Yi.IN_TABLE, Cs(e, t)) : As(e, t)
}(this, e);
break;
case Yi.IN_COLUMN_GROUP:
Ds(this, e);
break;
case Yi.IN_TABLE_BODY:
ws(this, e);
break;
case Yi.IN_ROW:
Ms(this, e);
break;
case Yi.IN_CELL:
!function (e, t) {
var n = t.tagID;
Ls.has(n) ? (e.openElements.hasInTableScope(Ur.TD) || e.openElements.hasInTableScope(Ur.TH)) && (e._closeTableCell(), Ms(e, t)) : As(e, t)
}(this, e);
break;
case Yi.IN_SELECT:
Bs(this, e);
break;
case Yi.IN_SELECT_IN_TABLE:
!function (e, t) {
var n = t.tagID;
n === Ur.CAPTION || n === Ur.TABLE || n === Ur.TBODY || n === Ur.TFOOT || n === Ur.THEAD || n === Ur.TR || n === Ur.TD || n === Ur.TH ? (e.openElements.popUntilTagNamePopped(Ur.SELECT), e._resetInsertionMode(), e._processStartTag(t)) : Bs(e, t)
}(this, e);
break;
case Yi.IN_TEMPLATE:
!function (e, t) {
switch (t.tagID) {
case Ur.BASE:
case Ur.BASEFONT:
case Ur.BGSOUND:
case Ur.LINK:
case Ur.META:
case Ur.NOFRAMES:
case Ur.SCRIPT:
case Ur.STYLE:
case Ur.TEMPLATE:
case Ur.TITLE:
os(e, t);
break;
case Ur.CAPTION:
case Ur.COLGROUP:
case Ur.TBODY:
case Ur.TFOOT:
case Ur.THEAD:
e.tmplInsertionModeStack[0] = Yi.IN_TABLE, e.insertionMode = Yi.IN_TABLE, Cs(e, t);
break;
case Ur.COL:
e.tmplInsertionModeStack[0] = Yi.IN_COLUMN_GROUP, e.insertionMode = Yi.IN_COLUMN_GROUP, Ds(e, t);
break;
case Ur.TR:
e.tmplInsertionModeStack[0] = Yi.IN_TABLE_BODY, e.insertionMode = Yi.IN_TABLE_BODY, ws(e, t);
break;
case Ur.TD:
case Ur.TH:
e.tmplInsertionModeStack[0] = Yi.IN_ROW, e.insertionMode = Yi.IN_ROW, Ms(e, t);
break;
default:
e.tmplInsertionModeStack[0] = Yi.IN_BODY, e.insertionMode = Yi.IN_BODY, As(e, t)
}
}(this, e);
break;
case Yi.AFTER_BODY:
!function (e, t) {
(t.tagID === Ur.HTML ? As : Gs)(e, t)
}(this, e);
break;
case Yi.IN_FRAMESET:
!function (e, t) {
switch (t.tagID) {
case Ur.HTML:
As(e, t);
break;
case Ur.FRAMESET:
e._insertElement(t, Mr.HTML);
break;
case Ur.FRAME:
e._appendElement(t, Mr.HTML), t.ackSelfClosing = !0;
break;
case Ur.NOFRAMES:
os(e, t)
}
}(this, e);
break;
case Yi.AFTER_FRAMESET:
!function (e, t) {
switch (t.tagID) {
case Ur.HTML:
As(e, t);
break;
case Ur.NOFRAMES:
os(e, t)
}
}(this, e);
break;
case Yi.AFTER_AFTER_BODY:
!function (e, t) {
(t.tagID === Ur.HTML ? As : js)(e, t)
}(this, e);
break;
case Yi.AFTER_AFTER_FRAMESET:
!function (e, t) {
switch (t.tagID) {
case Ur.HTML:
As(e, t);
break;
case Ur.NOFRAMES:
os(e, t)
}
}(this, e)
}
}
onEndTag(e) {
this.skipNextNewLine = !1, this.currentToken = e, this.currentNotInHTML ? function (e, t) {
if (t.tagID === Ur.P || t.tagID === Ur.BR) return qs(e), e._endTagOutsideForeignContent(t);
for (let n = e.openElements.stackTop; 0 < n; n--) {
var r = e.openElements.items[n];
if (e.treeAdapter.getNamespaceURI(r) === Mr.HTML) {
e._endTagOutsideForeignContent(t);
break
}
if ((r = e.treeAdapter.getTagName(r)).toLowerCase() === t.tagName) {
t.tagName = r, e.openElements.shortenToLength(n);
break
}
}
}(this, e) : this._endTagOutsideForeignContent(e)
}
_endTagOutsideForeignContent(e) {
switch (this.insertionMode) {
case Yi.INITIAL:
is(this, e);
break;
case Yi.BEFORE_HTML:
!function (e, t) {
var n = t.tagID;
n !== Ur.HTML && n !== Ur.HEAD && n !== Ur.BODY && n !== Ur.BR || ss(e, t)
}(this, e);
break;
case Yi.BEFORE_HEAD:
!function (e, t) {
var n = t.tagID;
n === Ur.HEAD || n === Ur.BODY || n === Ur.HTML || n === Ur.BR ? as(e, t) : e._err(t, _r.endTagWithoutMatchingOpenElement)
}(this, e);
break;
case Yi.IN_HEAD:
!function (e, t) {
switch (t.tagID) {
case Ur.HEAD:
e.openElements.pop(), e.insertionMode = Yi.AFTER_HEAD;
break;
case Ur.BODY:
case Ur.BR:
case Ur.HTML:
us(e, t);
break;
case Ur.TEMPLATE:
cs(e, t);
break;
default:
e._err(t, _r.endTagWithoutMatchingOpenElement)
}
}(this, e);
break;
case Yi.IN_HEAD_NO_SCRIPT:
!function (e, t) {
switch (t.tagID) {
case Ur.NOSCRIPT:
e.openElements.pop(), e.insertionMode = Yi.IN_HEAD;
break;
case Ur.BR:
ls(e, t);
break;
default:
e._err(t, _r.endTagWithoutMatchingOpenElement)
}
}(this, e);
break;
case Yi.AFTER_HEAD:
!function (e, t) {
switch (t.tagID) {
case Ur.BODY:
case Ur.HTML:
case Ur.BR:
hs(e, t);
break;
case Ur.TEMPLATE:
cs(e, t);
break;
default:
e._err(t, _r.endTagWithoutMatchingOpenElement)
}
}(this, e);
break;
case Yi.IN_BODY:
vs(this, e);
break;
case Yi.TEXT:
!function (e, t) {
t.tagID === Ur.SCRIPT && null != (t = e.scriptHandler) && t.call(e, e.openElements.current), e.openElements.pop(), e.insertionMode = e.originalInsertionMode
}(this, e);
break;
case Yi.IN_TABLE:
Ns(this, e);
break;
case Yi.IN_TABLE_TEXT:
ks(this, e);
break;
case Yi.IN_CAPTION:
!function (e, t) {
var n = t.tagID;
switch (n) {
case Ur.CAPTION:
case Ur.TABLE:
e.openElements.hasInTableScope(Ur.CAPTION) && (e.openElements.generateImpliedEndTags(), e.openElements.popUntilTagNamePopped(Ur.CAPTION), e.activeFormattingElements.clearToLastMarker(), e.insertionMode = Yi.IN_TABLE, n === Ur.TABLE) && Ns(e, t);
break;
case Ur.BODY:
case Ur.COL:
case Ur.COLGROUP:
case Ur.HTML:
case Ur.TBODY:
case Ur.TD:
case Ur.TFOOT:
case Ur.TH:
case Ur.THEAD:
case Ur.TR:
break;
default:
vs(e, t)
}
}(this, e);
break;
case Yi.IN_COLUMN_GROUP:
!function (e, t) {
switch (t.tagID) {
case Ur.COLGROUP:
e.openElements.currentTagId === Ur.COLGROUP && (e.openElements.pop(), e.insertionMode = Yi.IN_TABLE);
break;
case Ur.TEMPLATE:
cs(e, t);
break;
case Ur.COL:
break;
default:
Rs(e, t)
}
}(this, e);
break;
case Yi.IN_TABLE_BODY:
xs(this, e);
break;
case Yi.IN_ROW:
Ps(this, e);
break;
case Yi.IN_CELL:
!function (e, t) {
var n = t.tagID;
switch (n) {
case Ur.TD:
case Ur.TH:
e.openElements.hasInTableScope(n) && (e.openElements.generateImpliedEndTags(), e.openElements.popUntilTagNamePopped(n), e.activeFormattingElements.clearToLastMarker(), e.insertionMode = Yi.IN_ROW);
break;
case Ur.TABLE:
case Ur.TBODY:
case Ur.TFOOT:
case Ur.THEAD:
case Ur.TR:
e.openElements.hasInTableScope(n) && (e._closeTableCell(), Ps(e, t));
break;
case Ur.BODY:
case Ur.CAPTION:
case Ur.COL:
case Ur.COLGROUP:
case Ur.HTML:
break;
default:
vs(e, t)
}
}(this, e);
break;
case Yi.IN_SELECT:
Fs(this, e);
break;
case Yi.IN_SELECT_IN_TABLE:
!function (e, t) {
var n = t.tagID;
n === Ur.CAPTION || n === Ur.TABLE || n === Ur.TBODY || n === Ur.TFOOT || n === Ur.THEAD || n === Ur.TR || n === Ur.TD || n === Ur.TH ? e.openElements.hasInTableScope(n) && (e.openElements.popUntilTagNamePopped(Ur.SELECT), e._resetInsertionMode(), e.onEndTag(t)) : Fs(e, t)
}(this, e);
break;
case Yi.IN_TEMPLATE:
!function (e, t) {
t.tagID === Ur.TEMPLATE && cs(e, t)
}(this, e);
break;
case Yi.AFTER_BODY:
Hs(this, e);
break;
case Yi.IN_FRAMESET:
!function (e, t) {
t.tagID !== Ur.FRAMESET || e.openElements.isRootHtmlElementCurrent() || (e.openElements.pop(), e.fragmentContext) || e.openElements.currentTagId === Ur.FRAMESET || (e.insertionMode = Yi.AFTER_FRAMESET)
}(this, e);
break;
case Yi.AFTER_FRAMESET:
!function (e, t) {
t.tagID === Ur.HTML && (e.insertionMode = Yi.AFTER_AFTER_FRAMESET)
}(this, e);
break;
case Yi.AFTER_AFTER_BODY:
js(this, e)
}
}
onEof(e) {
switch (this.insertionMode) {
case Yi.INITIAL:
is(this, e);
break;
case Yi.BEFORE_HTML:
ss(this, e);
break;
case Yi.BEFORE_HEAD:
as(this, e);
break;
case Yi.IN_HEAD:
us(this, e);
break;
case Yi.IN_HEAD_NO_SCRIPT:
ls(this, e);
break;
case Yi.AFTER_HEAD:
hs(this, e);
break;
case Yi.IN_BODY:
case Yi.IN_TABLE:
case Yi.IN_CAPTION:
case Yi.IN_COLUMN_GROUP:
case Yi.IN_TABLE_BODY:
case Yi.IN_ROW:
case Yi.IN_CELL:
case Yi.IN_SELECT:
case Yi.IN_SELECT_IN_TABLE:
ys(this, e);
break;
case Yi.TEXT:
!function (e, t) {
e._err(t, _r.eofInElementThatCanContainOnlyText), e.openElements.pop(), e.insertionMode = e.originalInsertionMode, e.onEof(t)
}(this, e);
break;
case Yi.IN_TABLE_TEXT:
ks(this, e);
break;
case Yi.IN_TEMPLATE:
Us(this, e);
break;
case Yi.AFTER_BODY:
case Yi.IN_FRAMESET:
case Yi.AFTER_FRAMESET:
case Yi.AFTER_AFTER_BODY:
case Yi.AFTER_AFTER_FRAMESET:
rs(this, e)
}
}
onWhitespaceCharacter(e) {
if (this.skipNextNewLine && (this.skipNextNewLine = !1, e.chars.charCodeAt(0) === ar.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 Yi.IN_HEAD:
case Yi.IN_HEAD_NO_SCRIPT:
case Yi.AFTER_HEAD:
case Yi.TEXT:
case Yi.IN_COLUMN_GROUP:
case Yi.IN_SELECT:
case Yi.IN_SELECT_IN_TABLE:
case Yi.IN_FRAMESET:
case Yi.AFTER_FRAMESET:
this._insertCharacters(e);
break;
case Yi.IN_BODY:
case Yi.IN_CAPTION:
case Yi.IN_CELL:
case Yi.IN_TEMPLATE:
case Yi.AFTER_BODY:
case Yi.AFTER_AFTER_BODY:
case Yi.AFTER_AFTER_FRAMESET:
ps(this, e);
break;
case Yi.IN_TABLE:
case Yi.IN_TABLE_BODY:
case Yi.IN_ROW:
Ss(this, e);
break;
case Yi.IN_TABLE_TEXT:
Is(this, e)
}
}
}
function Qi(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) : gs(e, t), n
}
function zi(e, t) {
let n = null, r = e.openElements.stackTop;
for (; 0 <= r; r--) {
var 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 Xi(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 >= qi;
!n || o ? (o && e.activeFormattingElements.removeEntry(n), e.openElements.remove(a)) : (a = Zi(e, n), r === t && (e.activeFormattingElements.bookmark = n), e.treeAdapter.detachNode(r), e.treeAdapter.appendChild(a, r), r = a)
}
return r
}
function Zi(e, t) {
var n = e.treeAdapter.getNamespaceURI(t.element),
n = e.treeAdapter.createElement(t.token.tagName, n, t.token.attrs);
return e.openElements.replace(t.element, n), t.element = n
}
function Ji(e, t, n) {
var i, r = qr(e.treeAdapter.getTagName(t));
e._isElementCausesFosterParenting(r) ? e._fosterParentElement(n) : (i = e.treeAdapter.getNamespaceURI(t), r === Ur.TEMPLATE && i === Mr.HTML && (t = e.treeAdapter.getTemplateContent(t)), e.treeAdapter.appendChild(t, n))
}
function es(e, t, n) {
var r = e.treeAdapter.getNamespaceURI(n.element), i = n.token,
r = e.treeAdapter.createElement(i.tagName, r, i.attrs);
e._adoptNodes(t, r), e.treeAdapter.appendChild(t, r), e.activeFormattingElements.insertElementAfterBookmark(r, i), e.activeFormattingElements.removeEntry(n), e.openElements.remove(n.element), e.openElements.insertAfter(t, r, i.tagID)
}
function ts(e, t) {
for (let n = 0; n < ji; n++) {
const n = Qi(e, t);
if (!n) break;
var r = zi(e, n);
if (!r) break;
e.activeFormattingElements.bookmark = n;
var i = Xi(e, r, n.element), s = e.openElements.getCommonAncestor(n.element);
e.treeAdapter.detachNode(i), s && Ji(e, s, i), es(e, r, n)
}
}
function ns(e, t) {
e._appendCommentNode(t, e.openElements.currentTmplContentOrNode)
}
function rs(e, t) {
if (e.stopped = !0, t.location) {
var n = e.fragmentContext ? 0 : 2;
for (let r = e.openElements.stackTop; r >= n; r--) e._setEndLocation(e.openElements.items[r], t);
if (!e.fragmentContext && 0 <= e.openElements.stackTop) {
const n = e.openElements.items[0], r = e.treeAdapter.getNodeSourceCodeLocation(n);
if (r && !r.endTag && (e._setEndLocation(n, t), 1 <= e.openElements.stackTop)) {
const n = e.openElements.items[1], r = e.treeAdapter.getNodeSourceCodeLocation(n);
r && !r.endTag && e._setEndLocation(n, t)
}
}
}
}
function is(e, t) {
e._err(t, _r.missingDoctype, !0), e.treeAdapter.setDocumentMode(e.document, Br.QUIRKS), e.insertionMode = Yi.BEFORE_HTML, e._processToken(t)
}
function ss(e, t) {
e._insertFakeRootElement(), e.insertionMode = Yi.BEFORE_HEAD, e._processToken(t)
}
function as(e, t) {
e._insertFakeElement(Fr.HEAD, Ur.HEAD), e.headElement = e.openElements.current, e.insertionMode = Yi.IN_HEAD, e._processToken(t)
}
function os(e, t) {
switch (t.tagID) {
case Ur.HTML:
As(e, t);
break;
case Ur.BASE:
case Ur.BASEFONT:
case Ur.BGSOUND:
case Ur.LINK:
case Ur.META:
e._appendElement(t, Mr.HTML), t.ackSelfClosing = !0;
break;
case Ur.TITLE:
e._switchToTextParsing(t, zr.RCDATA);
break;
case Ur.NOSCRIPT:
e.options.scriptingEnabled ? e._switchToTextParsing(t, zr.RAWTEXT) : (e._insertElement(t, Mr.HTML), e.insertionMode = Yi.IN_HEAD_NO_SCRIPT);
break;
case Ur.NOFRAMES:
case Ur.STYLE:
e._switchToTextParsing(t, zr.RAWTEXT);
break;
case Ur.SCRIPT:
e._switchToTextParsing(t, zr.SCRIPT_DATA);
break;
case Ur.TEMPLATE:
e._insertTemplate(t), e.activeFormattingElements.insertMarker(), e.framesetOk = !1, e.insertionMode = Yi.IN_TEMPLATE, e.tmplInsertionModeStack.unshift(Yi.IN_TEMPLATE);
break;
case Ur.HEAD:
e._err(t, _r.misplacedStartTagForHeadElement);
break;
default:
us(e, t)
}
}
function cs(e, t) {
0 < e.openElements.tmplCount ? (e.openElements.generateImpliedEndTagsThoroughly(), e.openElements.currentTagId !== Ur.TEMPLATE && e._err(t, _r.closingOfElementWithOpenChildElements), e.openElements.popUntilTagNamePopped(Ur.TEMPLATE), e.activeFormattingElements.clearToLastMarker(), e.tmplInsertionModeStack.shift(), e._resetInsertionMode()) : e._err(t, _r.endTagWithoutMatchingOpenElement)
}
function us(e, t) {
e.openElements.pop(), e.insertionMode = Yi.AFTER_HEAD, e._processToken(t)
}
function ls(e, t) {
var n = t.type === Tr.EOF ? _r.openElementsLeftAfterEof : _r.disallowedContentInNoscriptInHead;
e._err(t, n), e.openElements.pop(), e.insertionMode = Yi.IN_HEAD, e._processToken(t)
}
function hs(e, t) {
e._insertFakeElement(Fr.BODY, Ur.BODY), e.insertionMode = Yi.IN_BODY, fs(e, t)
}
function fs(e, t) {
switch (t.type) {
case Tr.CHARACTER:
ds(e, t);
break;
case Tr.WHITESPACE_CHARACTER:
ps(e, t);
break;
case Tr.COMMENT:
ns(e, t);
break;
case Tr.START_TAG:
As(e, t);
break;
case Tr.END_TAG:
vs(e, t);
break;
case Tr.EOF:
ys(e, t)
}
}
function ps(e, t) {
e._reconstructActiveFormattingElements(), e._insertCharacters(t)
}
function ds(e, t) {
e._reconstructActiveFormattingElements(), e._insertCharacters(t), e.framesetOk = !1
}
function ms(e, t) {
e._reconstructActiveFormattingElements(), e._appendElement(t, Mr.HTML), e.framesetOk = !1, t.ackSelfClosing = !0
}
function _s(e) {
return null != (e = Ar(e, Pr.TYPE)) && e.toLowerCase() === Gi
}
function Es(e, t) {
e._switchToTextParsing(t, zr.RAWTEXT)
}
function Ts(e, t) {
e._reconstructActiveFormattingElements(), e._insertElement(t, Mr.HTML)
}
function As(e, t) {
switch (t.tagID) {
case Ur.I:
case Ur.S:
case Ur.B:
case Ur.U:
case Ur.EM:
case Ur.TT:
case Ur.BIG:
case Ur.CODE:
case Ur.FONT:
case Ur.SMALL:
case Ur.STRIKE:
case Ur.STRONG:
!function (e, t) {
e._reconstructActiveFormattingElements(), e._insertElement(t, Mr.HTML), e.activeFormattingElements.pushElement(e.openElements.current, t)
}(e, t);
break;
case Ur.A:
!function (e, t) {
var n = e.activeFormattingElements.getElementEntryInScopeWithTagName(Fr.A);
n && (ts(e, t), e.openElements.remove(n.element), e.activeFormattingElements.removeEntry(n)), e._reconstructActiveFormattingElements(), e._insertElement(t, Mr.HTML), e.activeFormattingElements.pushElement(e.openElements.current, t)
}(e, t);
break;
case Ur.H1:
case Ur.H2:
case Ur.H3:
case Ur.H4:
case Ur.H5:
case Ur.H6:
!function (e, t) {
e.openElements.hasInButtonScope(Ur.P) && e._closePElement(), Wr(e.openElements.currentTagId) && e.openElements.pop(), e._insertElement(t, Mr.HTML)
}(e, t);
break;
case Ur.P:
case Ur.DL:
case Ur.OL:
case Ur.UL:
case Ur.DIV:
case Ur.DIR:
case Ur.NAV:
case Ur.MAIN:
case Ur.MENU:
case Ur.ASIDE:
case Ur.CENTER:
case Ur.FIGURE:
case Ur.FOOTER:
case Ur.HEADER:
case Ur.HGROUP:
case Ur.DIALOG:
case Ur.DETAILS:
case Ur.ADDRESS:
case Ur.ARTICLE:
case Ur.SECTION:
case Ur.SUMMARY:
case Ur.FIELDSET:
case Ur.BLOCKQUOTE:
case Ur.FIGCAPTION:
!function (e, t) {
e.openElements.hasInButtonScope(Ur.P) && e._closePElement(), e._insertElement(t, Mr.HTML)
}(e, t);
break;
case Ur.LI:
case Ur.DD:
case Ur.DT:
!function (e, t) {
e.framesetOk = !1;
var n = t.tagID;
for (let t = e.openElements.stackTop; 0 <= t; t--) {
var r = e.openElements.tagIDs[t];
if (n === Ur.LI && r === Ur.LI || (n === Ur.DD || n === Ur.DT) && (r === Ur.DD || r === Ur.DT)) {
e.openElements.generateImpliedEndTagsWithExclusion(r), e.openElements.popUntilTagNamePopped(r);
break
}
if (r !== Ur.ADDRESS && r !== Ur.DIV && r !== Ur.P && e._isSpecialElement(e.openElements.items[t], r)) break
}
e.openElements.hasInButtonScope(Ur.P) && e._closePElement(), e._insertElement(t, Mr.HTML)
}(e, t);
break;
case Ur.BR:
case Ur.IMG:
case Ur.WBR:
case Ur.AREA:
case Ur.EMBED:
case Ur.KEYGEN:
ms(e, t);
break;
case Ur.HR:
!function (e, t) {
e.openElements.hasInButtonScope(Ur.P) && e._closePElement(), e._appendElement(t, Mr.HTML), e.framesetOk = !1, t.ackSelfClosing = !0
}(e, t);
break;
case Ur.RB:
case Ur.RTC:
!function (e, t) {
e.openElements.hasInScope(Ur.RUBY) && e.openElements.generateImpliedEndTags(), e._insertElement(t, Mr.HTML)
}(e, t);
break;
case Ur.RT:
case Ur.RP:
!function (e, t) {
e.openElements.hasInScope(Ur.RUBY) && e.openElements.generateImpliedEndTagsWithExclusion(Ur.RTC), e._insertElement(t, Mr.HTML)
}(e, t);
break;
case Ur.PRE:
case Ur.LISTING:
!function (e, t) {
e.openElements.hasInButtonScope(Ur.P) && e._closePElement(), e._insertElement(t, Mr.HTML), e.skipNextNewLine = !0, e.framesetOk = !1
}(e, t);
break;
case Ur.XMP:
!function (e, t) {
e.openElements.hasInButtonScope(Ur.P) && e._closePElement(), e._reconstructActiveFormattingElements(), e.framesetOk = !1, e._switchToTextParsing(t, zr.RAWTEXT)
}(e, t);
break;
case Ur.SVG:
!function (e, t) {
e._reconstructActiveFormattingElements(), Fi(t), Ui(t), t.selfClosing ? e._appendElement(t, Mr.SVG) : e._insertElement(t, Mr.SVG), t.ackSelfClosing = !0
}(e, t);
break;
case Ur.HTML:
!function (e, t) {
0 === e.openElements.tmplCount && e.treeAdapter.adoptAttributes(e.openElements.items[0], t.attrs)
}(e, t);
break;
case Ur.BASE:
case Ur.LINK:
case Ur.META:
case Ur.STYLE:
case Ur.TITLE:
case Ur.SCRIPT:
case Ur.BGSOUND:
case Ur.BASEFONT:
case Ur.TEMPLATE:
os(e, t);
break;
case Ur.BODY:
!function (e, t) {
var n = e.openElements.tryPeekProperlyNestedBodyElement();
n && 0 === e.openElements.tmplCount && (e.framesetOk = !1, e.treeAdapter.adoptAttributes(n, t.attrs))
}(e, t);
break;
case Ur.FORM:
!function (e, t) {
var n = 0 < e.openElements.tmplCount;
e.formElement && !n || (e.openElements.hasInButtonScope(Ur.P) && e._closePElement(), e._insertElement(t, Mr.HTML), n) || (e.formElement = e.openElements.current)
}(e, t);
break;
case Ur.NOBR:
!function (e, t) {
e._reconstructActiveFormattingElements(), e.openElements.hasInScope(Ur.NOBR) && (ts(e, t), e._reconstructActiveFormattingElements()), e._insertElement(t, Mr.HTML), e.activeFormattingElements.pushElement(e.openElements.current, t)
}(e, t);
break;
case Ur.MATH:
!function (e, t) {
e._reconstructActiveFormattingElements(), Bi(t), Ui(t), t.selfClosing ? e._appendElement(t, Mr.MATHML) : e._insertElement(t, Mr.MATHML), t.ackSelfClosing = !0
}(e, t);
break;
case Ur.TABLE:
!function (e, t) {
e.treeAdapter.getDocumentMode(e.document) !== Br.QUIRKS && e.openElements.hasInButtonScope(Ur.P) && e._closePElement(), e._insertElement(t, Mr.HTML), e.framesetOk = !1, e.insertionMode = Yi.IN_TABLE
}(e, t);
break;
case Ur.INPUT:
!function (e, t) {
e._reconstructActiveFormattingElements(), e._appendElement(t, Mr.HTML), _s(t) || (e.framesetOk = !1), t.ackSelfClosing = !0
}(e, t);
break;
case Ur.PARAM:
case Ur.TRACK:
case Ur.SOURCE:
!function (e, t) {
e._appendElement(t, Mr.HTML), t.ackSelfClosing = !0
}(e, t);
break;
case Ur.IMAGE:
!function (e, t) {
t.tagName = Fr.IMG, t.tagID = Ur.IMG, ms(e, t)
}(e, t);
break;
case Ur.BUTTON:
!function (e, t) {
e.openElements.hasInScope(Ur.BUTTON) && (e.openElements.generateImpliedEndTags(), e.openElements.popUntilTagNamePopped(Ur.BUTTON)), e._reconstructActiveFormattingElements(), e._insertElement(t, Mr.HTML), e.framesetOk = !1
}(e, t);
break;
case Ur.APPLET:
case Ur.OBJECT:
case Ur.MARQUEE:
!function (e, t) {
e._reconstructActiveFormattingElements(), e._insertElement(t, Mr.HTML), e.activeFormattingElements.insertMarker(), e.framesetOk = !1
}(e, t);
break;
case Ur.IFRAME:
!function (e, t) {
e.framesetOk = !1, e._switchToTextParsing(t, zr.RAWTEXT)
}(e, t);
break;
case Ur.SELECT:
!function (e, t) {
e._reconstructActiveFormattingElements(), e._insertElement(t, Mr.HTML), e.framesetOk = !1, e.insertionMode = e.insertionMode === Yi.IN_TABLE || e.insertionMode === Yi.IN_CAPTION || e.insertionMode === Yi.IN_TABLE_BODY || e.insertionMode === Yi.IN_ROW || e.insertionMode === Yi.IN_CELL ? Yi.IN_SELECT_IN_TABLE : Yi.IN_SELECT
}(e, t);
break;
case Ur.OPTION:
case Ur.OPTGROUP:
!function (e, t) {
e.openElements.currentTagId === Ur.OPTION && e.openElements.pop(), e._reconstructActiveFormattingElements(), e._insertElement(t, Mr.HTML)
}(e, t);
break;
case Ur.NOEMBED:
Es(e, t);
break;
case Ur.FRAMESET:
!function (e, t) {
var n = e.openElements.tryPeekProperlyNestedBodyElement();
e.framesetOk && n && (e.treeAdapter.detachNode(n), e.openElements.popAllUpToHtmlElement(), e._insertElement(t, Mr.HTML), e.insertionMode = Yi.IN_FRAMESET)
}(e, t);
break;
case Ur.TEXTAREA:
!function (e, t) {
e._insertElement(t, Mr.HTML), e.skipNextNewLine = !0, e.tokenizer.state = zr.RCDATA, e.originalInsertionMode = e.insertionMode, e.framesetOk = !1, e.insertionMode = Yi.TEXT
}(e, t);
break;
case Ur.NOSCRIPT:
(e.options.scriptingEnabled ? Es : Ts)(e, t);
break;
case Ur.PLAINTEXT:
!function (e, t) {
e.openElements.hasInButtonScope(Ur.P) && e._closePElement(), e._insertElement(t, Mr.HTML), e.tokenizer.state = zr.PLAINTEXT
}(e, t);
break;
case Ur.COL:
case Ur.TH:
case Ur.TD:
case Ur.TR:
case Ur.HEAD:
case Ur.FRAME:
case Ur.TBODY:
case Ur.TFOOT:
case Ur.THEAD:
case Ur.CAPTION:
case Ur.COLGROUP:
break;
default:
Ts(e, t)
}
}
function gs(e, t) {
var n = t.tagName, r = t.tagID;
for (let t = e.openElements.stackTop; 0 < t; t--) {
var i = e.openElements.items[t], s = e.openElements.tagIDs[t];
if (r === s && (r !== Ur.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 vs(e, t) {
switch (t.tagID) {
case Ur.A:
case Ur.B:
case Ur.I:
case Ur.S:
case Ur.U:
case Ur.EM:
case Ur.TT:
case Ur.BIG:
case Ur.CODE:
case Ur.FONT:
case Ur.NOBR:
case Ur.SMALL:
case Ur.STRIKE:
case Ur.STRONG:
ts(e, t);
break;
case Ur.P:
!function (e) {
e.openElements.hasInButtonScope(Ur.P) || e._insertFakeElement(Fr.P, Ur.P), e._closePElement()
}(e);
break;
case Ur.DL:
case Ur.UL:
case Ur.OL:
case Ur.DIR:
case Ur.DIV:
case Ur.NAV:
case Ur.PRE:
case Ur.MAIN:
case Ur.MENU:
case Ur.ASIDE:
case Ur.BUTTON:
case Ur.CENTER:
case Ur.FIGURE:
case Ur.FOOTER:
case Ur.HEADER:
case Ur.HGROUP:
case Ur.DIALOG:
case Ur.ADDRESS:
case Ur.ARTICLE:
case Ur.DETAILS:
case Ur.SECTION:
case Ur.SUMMARY:
case Ur.LISTING:
case Ur.FIELDSET:
case Ur.BLOCKQUOTE:
case Ur.FIGCAPTION:
!function (e, t) {
t = t.tagID, e.openElements.hasInScope(t) && (e.openElements.generateImpliedEndTags(), e.openElements.popUntilTagNamePopped(t))
}(e, t);
break;
case Ur.LI:
!function (e) {
e.openElements.hasInListItemScope(Ur.LI) && (e.openElements.generateImpliedEndTagsWithExclusion(Ur.LI), e.openElements.popUntilTagNamePopped(Ur.LI))
}(e);
break;
case Ur.DD:
case Ur.DT:
!function (e, t) {
t = t.tagID, e.openElements.hasInScope(t) && (e.openElements.generateImpliedEndTagsWithExclusion(t), e.openElements.popUntilTagNamePopped(t))
}(e, t);
break;
case Ur.H1:
case Ur.H2:
case Ur.H3:
case Ur.H4:
case Ur.H5:
case Ur.H6:
!function (e) {
e.openElements.hasNumberedHeaderInScope() && (e.openElements.generateImpliedEndTags(), e.openElements.popUntilNumberedHeaderPopped())
}(e);
break;
case Ur.BR:
!function (e) {
e._reconstructActiveFormattingElements(), e._insertFakeElement(Fr.BR, Ur.BR), e.openElements.pop(), e.framesetOk = !1
}(e);
break;
case Ur.BODY:
!function (e, t) {
var n;
e.openElements.hasInScope(Ur.BODY) && (e.insertionMode = Yi.AFTER_BODY, e.options.sourceCodeLocationInfo) && ((n = e.openElements.tryPeekProperlyNestedBodyElement()) && e._setEndLocation(n, t))
}(e, t);
break;
case Ur.HTML:
!function (e, t) {
e.openElements.hasInScope(Ur.BODY) && (e.insertionMode = Yi.AFTER_BODY, Hs(e, t))
}(e, t);
break;
case Ur.FORM:
!function (e) {
var t = 0 < e.openElements.tmplCount, n = e.formElement;
t || (e.formElement = null), (n || t) && e.openElements.hasInScope(Ur.FORM) && (e.openElements.generateImpliedEndTags(), t ? e.openElements.popUntilTagNamePopped(Ur.FORM) : n && e.openElements.remove(n))
}(e);
break;
case Ur.APPLET:
case Ur.OBJECT:
case Ur.MARQUEE:
!function (e, t) {
t = t.tagID, e.openElements.hasInScope(t) && (e.openElements.generateImpliedEndTags(), e.openElements.popUntilTagNamePopped(t), e.activeFormattingElements.clearToLastMarker())
}(e, t);
break;
case Ur.TEMPLATE:
cs(e, t);
break;
default:
gs(e, t)
}
}
function ys(e, t) {
(0 < e.tmplInsertionModeStack.length ? Us : rs)(e, t)
}
function Ss(e, t) {
if (Wi.has(e.openElements.currentTagId)) switch (e.pendingCharacterTokens.length = 0, e.hasNonWhitespacePendingCharacterToken = !1, e.originalInsertionMode = e.insertionMode, e.insertionMode = Yi.IN_TABLE_TEXT, t.type) {
case Tr.CHARACTER:
Os(e, t);
break;
case Tr.WHITESPACE_CHARACTER:
Is(e, t)
} else bs(e, t)
}
function Cs(e, t) {
switch (t.tagID) {
case Ur.TD:
case Ur.TH:
case Ur.TR:
!function (e, t) {
e.openElements.clearBackToTableContext(), e._insertFakeElement(Fr.TBODY, Ur.TBODY), e.insertionMode = Yi.IN_TABLE_BODY, ws(e, t)
}(e, t);
break;
case Ur.STYLE:
case Ur.SCRIPT:
case Ur.TEMPLATE:
os(e, t);
break;
case Ur.COL:
!function (e, t) {
e.openElements.clearBackToTableContext(), e._insertFakeElement(Fr.COLGROUP, Ur.COLGROUP), e.insertionMode = Yi.IN_COLUMN_GROUP, Ds(e, t)
}(e, t);
break;
case Ur.FORM:
!function (e, t) {
e.formElement || 0 !== e.openElements.tmplCount || (e._insertElement(t, Mr.HTML), e.formElement = e.openElements.current, e.openElements.pop())
}(e, t);
break;
case Ur.TABLE:
!function (e, t) {
e.openElements.hasInTableScope(Ur.TABLE) && (e.openElements.popUntilTagNamePopped(Ur.TABLE), e._resetInsertionMode(), e._processStartTag(t))
}(e, t);
break;
case Ur.TBODY:
case Ur.TFOOT:
case Ur.THEAD:
!function (e, t) {
e.openElements.clearBackToTableContext(), e._insertElement(t, Mr.HTML), e.insertionMode = Yi.IN_TABLE_BODY
}(e, t);
break;
case Ur.INPUT:
!function (e, t) {
_s(t) ? e._appendElement(t, Mr.HTML) : bs(e, t), t.ackSelfClosing = !0
}(e, t);
break;
case Ur.CAPTION:
!function (e, t) {
e.openElements.clearBackToTableContext(), e.activeFormattingElements.insertMarker(), e._insertElement(t, Mr.HTML), e.insertionMode = Yi.IN_CAPTION
}(e, t);
break;
case Ur.COLGROUP:
!function (e, t) {
e.openElements.clearBackToTableContext(), e._insertElement(t, Mr.HTML), e.insertionMode = Yi.IN_COLUMN_GROUP
}(e, t);
break;
default:
bs(e, t)
}
}
function Ns(e, t) {
switch (t.tagID) {
case Ur.TABLE:
e.openElements.hasInTableScope(Ur.TABLE) && (e.openElements.popUntilTagNamePopped(Ur.TABLE), e._resetInsertionMode());
break;
case Ur.TEMPLATE:
cs(e, t);
break;
case Ur.BODY:
case Ur.CAPTION:
case Ur.COL:
case Ur.COLGROUP:
case Ur.HTML:
case Ur.TBODY:
case Ur.TD:
case Ur.TFOOT:
case Ur.TH:
case Ur.THEAD:
case Ur.TR:
break;
default:
bs(e, t)
}
}
function bs(e, t) {
var n = e.fosterParentingEnabled;
e.fosterParentingEnabled = !0, fs(e, t), e.fosterParentingEnabled = n
}
function Is(e, t) {
e.pendingCharacterTokens.push(t)
}
function Os(e, t) {
e.pendingCharacterTokens.push(t), e.hasNonWhitespacePendingCharacterToken = !0
}
function ks(e, t) {
let n = 0;
if (e.hasNonWhitespacePendingCharacterToken) for (; n < e.pendingCharacterTokens.length; n++) bs(e, e.pendingCharacterTokens[n]); else for (; n < e.pendingCharacterTokens.length; n++) e._insertCharacters(e.pendingCharacterTokens[n]);
e.insertionMode = e.originalInsertionMode, e._processToken(t)
}
const Ls = new Set([Ur.CAPTION, Ur.COL, Ur.COLGROUP, Ur.TBODY, Ur.TD, Ur.TFOOT, Ur.TH, Ur.THEAD, Ur.TR]);
function Ds(e, t) {
switch (t.tagID) {
case Ur.HTML:
As(e, t);
break;
case Ur.COL:
e._appendElement(t, Mr.HTML), t.ackSelfClosing = !0;
break;
case Ur.TEMPLATE:
os(e, t);
break;
default:
Rs(e, t)
}
}
function Rs(e, t) {
e.openElements.currentTagId === Ur.COLGROUP && (e.openElements.pop(), e.insertionMode = Yi.IN_TABLE, e._processToken(t))
}
function ws(e, t) {
switch (t.tagID) {
case Ur.TR:
e.openElements.clearBackToTableBodyContext(), e._insertElement(t, Mr.HTML), e.insertionMode = Yi.IN_ROW;
break;
case Ur.TH:
case Ur.TD:
e.openElements.clearBackToTableBodyContext(), e._insertFakeElement(Fr.TR, Ur.TR), e.insertionMode = Yi.IN_ROW, Ms(e, t);
break;
case Ur.CAPTION:
case Ur.COL:
case Ur.COLGROUP:
case Ur.TBODY:
case Ur.TFOOT:
case Ur.THEAD:
e.openElements.hasTableBodyContextInTableScope() && (e.openElements.clearBackToTableBodyContext(), e.openElements.pop(), e.insertionMode = Yi.IN_TABLE, Cs(e, t));
break;
default:
Cs(e, t)
}
}
function xs(e, t) {
var n = t.tagID;
switch (t.tagID) {
case Ur.TBODY:
case Ur.TFOOT:
case Ur.THEAD:
e.openElements.hasInTableScope(n) && (e.openElements.clearBackToTableBodyContext(), e.openElements.pop(), e.insertionMode = Yi.IN_TABLE);
break;
case Ur.TABLE:
e.openElements.hasTableBodyContextInTableScope() && (e.openElements.clearBackToTableBodyContext(), e.openElements.pop(), e.insertionMode = Yi.IN_TABLE, Ns(e, t));
break;
case Ur.BODY:
case Ur.CAPTION:
case Ur.COL:
case Ur.COLGROUP:
case Ur.HTML:
case Ur.TD:
case Ur.TH:
case Ur.TR:
break;
default:
Ns(e, t)
}
}
function Ms(e, t) {
switch (t.tagID) {
case Ur.TH:
case Ur.TD:
e.openElements.clearBackToTableRowContext(), e._insertElement(t, Mr.HTML), e.insertionMode = Yi.IN_CELL, e.activeFormattingElements.insertMarker();
break;
case Ur.CAPTION:
case Ur.COL:
case Ur.COLGROUP:
case Ur.TBODY:
case Ur.TFOOT:
case Ur.THEAD:
case Ur.TR:
e.openElements.hasInTableScope(Ur.TR) && (e.openElements.clearBackToTableRowContext(), e.openElements.pop(), e.insertionMode = Yi.IN_TABLE_BODY, ws(e, t));
break;
default:
Cs(e, t)
}
}
function Ps(e, t) {
switch (t.tagID) {
case Ur.TR:
e.openElements.hasInTableScope(Ur.TR) && (e.openElements.clearBackToTableRowContext(), e.openElements.pop(), e.insertionMode = Yi.IN_TABLE_BODY);
break;
case Ur.TABLE:
e.openElements.hasInTableScope(Ur.TR) && (e.openElements.clearBackToTableRowContext(), e.openElements.pop(), e.insertionMode = Yi.IN_TABLE_BODY, xs(e, t));
break;
case Ur.TBODY:
case Ur.TFOOT:
case Ur.THEAD:
(e.openElements.hasInTableScope(t.tagID) || e.openElements.hasInTableScope(Ur.TR)) && (e.openElements.clearBackToTableRowContext(), e.openElements.pop(), e.insertionMode = Yi.IN_TABLE_BODY, xs(e, t));
break;
case Ur.BODY:
case Ur.CAPTION:
case Ur.COL:
case Ur.COLGROUP:
case Ur.HTML:
case Ur.TD:
case Ur.TH:
break;
default:
Ns(e, t)
}
}
function Bs(e, t) {
switch (t.tagID) {
case Ur.HTML:
As(e, t);
break;
case Ur.OPTION:
e.openElements.currentTagId === Ur.OPTION && e.openElements.pop(), e._insertElement(t, Mr.HTML);
break;
case Ur.OPTGROUP:
e.openElements.currentTagId === Ur.OPTION && e.openElements.pop(), e.openElements.currentTagId === Ur.OPTGROUP && e.openElements.pop(), e._insertElement(t, Mr.HTML);
break;
case Ur.INPUT:
case Ur.KEYGEN:
case Ur.TEXTAREA:
case Ur.SELECT:
e.openElements.hasInSelectScope(Ur.SELECT) && (e.openElements.popUntilTagNamePopped(Ur.SELECT), e._resetInsertionMode(), t.tagID !== Ur.SELECT) && e._processStartTag(t);
break;
case Ur.SCRIPT:
case Ur.TEMPLATE:
os(e, t)
}
}
function Fs(e, t) {
switch (t.tagID) {
case Ur.OPTGROUP:
0 < e.openElements.stackTop && e.openElements.currentTagId === Ur.OPTION && e.openElements.tagIDs[e.openElements.stackTop - 1] === Ur.OPTGROUP && e.openElements.pop(), e.openElements.currentTagId === Ur.OPTGROUP && e.openElements.pop();
break;
case Ur.OPTION:
e.openElements.currentTagId === Ur.OPTION && e.openElements.pop();
break;
case Ur.SELECT:
e.openElements.hasInSelectScope(Ur.SELECT) && (e.openElements.popUntilTagNamePopped(Ur.SELECT), e._resetInsertionMode());
break;
case Ur.TEMPLATE:
cs(e, t)
}
}
function Us(e, t) {
0 < e.openElements.tmplCount ? (e.openElements.popUntilTagNamePopped(Ur.TEMPLATE), e.activeFormattingElements.clearToLastMarker(), e.tmplInsertionModeStack.shift(), e._resetInsertionMode(), e.onEof(t)) : rs(e, t)
}
function Hs(e, t) {
var n, r;
t.tagID === Ur.HTML ? (e.fragmentContext || (e.insertionMode = Yi.AFTER_AFTER_BODY), e.options.sourceCodeLocationInfo && e.openElements.tagIDs[0] === Ur.HTML && (e._setEndLocation(e.openElements.items[0], t), !(r = e.openElements.items[1]) || null != (n = e.treeAdapter.getNodeSourceCodeLocation(r)) && n.endTag || e._setEndLocation(r, t))) : Gs(e, t)
}
function Gs(e, t) {
e.insertionMode = Yi.IN_BODY, fs(e, t)
}
function js(e, t) {
e.insertionMode = Yi.IN_BODY, fs(e, t)
}
function qs(e) {
for (; e.treeAdapter.getNamespaceURI(e.openElements.current) !== Mr.HTML && !e._isIntegrationPoint(e.openElements.currentTagId, e.openElements.current);) e.openElements.pop()
}
var Ys = Sr(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, "&quot;"], [38, "&amp;"], [39, "&apos;"], [60, "&lt;"], [62, "&gt;"]]);
function r(e) {
for (var i = "", s = 0; null !== (r = t.xmlReplacer.exec(e));) var r = r.index, o = e.charCodeAt(r), c = n.get(o), s = void 0 !== c ? (i += e.substring(s, r) + c, r + 1) : (i += "".concat(e.substring(s, r), "&#x").concat((0, t.getCodePoint)(e, r).toString(16), ";"), 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, "&quot;"], [38, "&amp;"], [160, "&nbsp;"]])), t.escapeText = i(/[&<>\u00A0]/g, new Map([[38, "&amp;"], [60, "&lt;"], [62, "&gt;"], [160, "&nbsp;"]]))
}), Ks = (yr(Ys), Ys.escapeText), Ws = Ys.escapeAttribute;
Ys.escapeUTF8, Ys.escape, Ys.encodeXML, Ys.getCodePoint, Ys.xmlReplacer;
const Vs = new Set([Fr.AREA, Fr.BASE, Fr.BASEFONT, Fr.BGSOUND, Fr.BR, Fr.COL, Fr.EMBED, Fr.FRAME, Fr.HR, Fr.IMG, Fr.INPUT, Fr.KEYGEN, Fr.LINK, Fr.META, Fr.PARAM, Fr.SOURCE, Fr.TRACK, Fr.WBR]),
$s = {treeAdapter: gi, scriptingEnabled: !0};
function Qs(e, t) {
return zs(e, {...$s, ...t})
}
function zs(e, t) {
return t.treeAdapter.isElementNode(e) ? function (e, t) {
var 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 Mr.XML:
n += "xml:" + r.name;
break;
case Mr.XMLNS:
"xmlns" !== r.name && (n += "xmlns:"), n += r.name;
break;
case Mr.XLINK:
n += "xlink:" + r.name;
break;
default:
n += r.prefix + ":" + r.name
} else n += r.name;
n += `="${Ws(r.value)}"`
}
return n
}(e, t)}>` + (function (e, t) {
return t.treeAdapter.isElementNode(e) && t.treeAdapter.getNamespaceURI(e) === Mr.HTML && Vs.has(t.treeAdapter.getTagName(e))
}(e, t) ? "" : function (e, t) {
let n = "";
var e = t.treeAdapter.isElementNode(e) && t.treeAdapter.getTagName(e) === Fr.TEMPLATE && t.treeAdapter.getNamespaceURI(e) === Mr.HTML ? t.treeAdapter.getTemplateContent(e) : e,
i = t.treeAdapter.getChildNodes(e);
if (i) for (const e of i) n += zs(e, t);
return n
}(e, t) + `</${n}>`)
}(e, t) : t.treeAdapter.isTextNode(e) ? function (e, t) {
var n = t.treeAdapter, r = n.getTextNodeContent(e),
s = (e = n.getParentNode(e)) && n.isElementNode(e) && n.getTagName(e);
return s && n.getNamespaceURI(e) === Mr.HTML && (n = s, e = t.scriptingEnabled, Vr.has(n) || e && n === Fr.NOSCRIPT) ? r : Ks(r)
}(e, t) : t.treeAdapter.isCommentNode(e) ? function (e, {treeAdapter: t}) {
return `<!--${t.getCommentNodeContent(e)}-->`
}(e, t) : t.treeAdapter.isDocumentTypeNode(e) ? function (e, {treeAdapter: t}) {
return `<!DOCTYPE ${t.getDocumentTypeNodeName(e)}>`
}(e, t) : ""
}
function Xs(e) {
return new _(e)
}
function Zs(e) {
var t = e.includes('"') ? "'" : '"';
return t + e + t
}
const Js = {
isCommentNode: b,
isElementNode: S,
isTextNode: N,
createDocument() {
var e = new v([]);
return e["x-mode"] = Br.NO_QUIRKS, e
},
createDocumentFragment: () => new v([]),
createElement(e, t, n) {
var r = Object.create(null), i = Object.create(null), s = Object.create(null);
for (let e = 0; e < n.length; e++) {
const t = n[e].name;
r[t] = n[e].value, i[t] = n[e].namespace, s[t] = n[e].prefix
}
return (e = new y(e, r, [])).namespace = t, e["x-attribsNamespace"] = i, e["x-attribsPrefix"] = s, e
},
createCommentNode: e => new E(e),
appendChild(e, t) {
var n = e.children[e.children.length - 1];
n && ((n.next = t).prev = n), e.children.push(t), t.parent = e
},
insertBefore(e, t, n) {
var r = e.children.indexOf(n), i = n.prev;
i && ((i.next = t).prev = i), (n.prev = t).next = n, e.children.splice(r, 0, t), t.parent = e
},
setTemplateContent(e, t) {
Js.appendChild(e, t)
},
getTemplateContent: e => e.children[0],
setDocumentType(e, t, n, r) {
var i = function (e, t, n) {
let r = "!DOCTYPE ";
return e && (r += e), t ? r += " PUBLIC " + Zs(t) : n && (r += " SYSTEM"), n && (r += " " + Zs(n)), r
}(t, n, r);
let s = e.children.find(e => I(e) && "!doctype" === e.name);
s ? s.data = null != i ? i : null : (s = new T("!doctype", i), Js.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) {
var t, n, r;
e.parent && (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) {
var n = e.children[e.children.length - 1];
n && N(n) ? n.data += t : Js.appendChild(e, Xs(t))
},
insertTextBefore(e, t, n) {
var r = e.children[e.children.indexOf(n) - 1];
r && N(r) ? r.data += t : Js.insertBefore(e, Xs(t), n)
},
adoptAttributes(e, t) {
for (let n = 0; n < t.length; n++) {
var r = t[n].name;
void 0 === e.attribs[r] && (e.attribs[r] = t[n].value, e["x-attribsNamespace"][r] = t[n].namespace, e["x-attribsPrefix"][r] = t[n].prefix)
}
},
getFirstChild: e => e.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) {
return null != (e = e["x-name"]) ? e : ""
},
getDocumentTypeNodePublicId(e) {
return null != (e = e["x-publicId"]) ? e : ""
},
getDocumentTypeNodeSystemId(e) {
return null != (e = e["x-systemId"]) ? e : ""
},
isDocumentTypeNode: e => I(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 ea = 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))[i] = t[i]);
return e.concat(r || Array.prototype.slice.call(t))
};
function ta(e, t, n, r) {
return t = {
scriptingEnabled: "boolean" != typeof t.scriptingEnabled || t.scriptingEnabled,
treeAdapter: Js,
sourceCodeLocationInfo: t.sourceCodeLocationInfo
}, n ? function (e, t) {
return $i.parse(e, t)
}(e, t) : function (e, t, n) {
return "string" == typeof e && (n = t, t = e, e = null), (e = $i.getFragmentParser(e, n)).tokenizer.write(t, !0), e.getFragment()
}(r, e, t)
}
var na, ra, ia, sa = {treeAdapter: Js};
function aa(e) {
return e === na.Space || e === na.NewLine || e === na.Tab || e === na.FormFeed || e === na.CarriageReturn
}
function oa(e) {
return e === na.Slash || e === na.Gt || aa(e)
}
function ca(e) {
return e >= na.Zero && e <= na.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.Number = 35] = "Number", 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"
}(na = na || {}), 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"
}(ra = ra || {}), function (e) {
e[e.NoValue = 0] = "NoValue", e[e.Unquoted = 1] = "Unquoted", e[e.Single = 2] = "Single", e[e.Double = 3] = "Double"
}(ia = ia || {});
const ua = {
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 la {
constructor({xmlMode: e = !1, decodeEntities: t = !0}, n) {
this.cbs = n, this.state = ra.Text, this.buffer = "", this.sectionStart = 0, this.index = 0, this.baseState = ra.Text, this.isSpecial = !1, this.running = !0, this.offset = 0, this.currentSequence = void 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 ? Hr : Gr
}
reset() {
this.state = ra.Text, this.buffer = "", this.sectionStart = 0, this.index = 0, this.baseState = ra.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.index < this.buffer.length + this.offset && this.parse()
}
getIndex() {
return this.index
}
getSectionStart() {
return this.sectionStart
}
stateText(e) {
e === na.Lt || !this.decodeEntities && this.fastForwardTo(na.Lt) ? (this.index > this.sectionStart && this.cbs.ontext(this.sectionStart, this.index), this.state = ra.BeforeTagName, this.sectionStart = this.index) : this.decodeEntities && e === na.Amp && (this.state = ra.BeforeEntity)
}
stateSpecialStartSequence(e) {
var t = this.sequenceIndex === this.currentSequence.length;
if (t ? oa(e) : (32 | e) === this.currentSequence[this.sequenceIndex]) {
if (!t) return void this.sequenceIndex++
} else this.isSpecial = !1;
this.sequenceIndex = 0, this.state = ra.InTagName, this.stateInTagName(e)
}
stateInSpecialTag(e) {
if (this.sequenceIndex === this.currentSequence.length) {
if (e === na.Gt || aa(e)) {
var t = this.index - this.currentSequence.length;
if (this.sectionStart < t) {
const e = this.index;
this.index = t, this.cbs.ontext(this.sectionStart, t), this.index = e
}
return this.isSpecial = !1, this.sectionStart = 2 + t, void this.stateInClosingTagName(e)
}
this.sequenceIndex = 0
}
(32 | e) === this.currentSequence[this.sequenceIndex] ? this.sequenceIndex += 1 : 0 === this.sequenceIndex ? this.currentSequence === ua.TitleEnd ? this.decodeEntities && e === na.Amp && (this.state = ra.BeforeEntity) : this.fastForwardTo(na.Lt) && (this.sequenceIndex = 1) : this.sequenceIndex = Number(e === na.Lt)
}
stateCDATASequence(e) {
e === ua.Cdata[this.sequenceIndex] ? ++this.sequenceIndex === ua.Cdata.length && (this.state = ra.InCommentLike, this.currentSequence = ua.CdataEnd, this.sequenceIndex = 0, this.sectionStart = this.index + 1) : (this.sequenceIndex = 0, this.state = ra.InDeclaration, this.stateInDeclaration(e))
}
fastForwardTo(e) {
for (; ++this.index < this.buffer.length + this.offset;) if (this.buffer.charCodeAt(this.index - this.offset) === e) return !0;
return this.index = this.buffer.length + this.offset - 1, !1
}
stateInCommentLike(e) {
e === this.currentSequence[this.sequenceIndex] ? ++this.sequenceIndex === this.currentSequence.length && (this.currentSequence === ua.CdataEnd ? this.cbs.oncdata(this.sectionStart, this.index, 2) : this.cbs.oncomment(this.sectionStart, this.index, 2), this.sequenceIndex = 0, this.sectionStart = this.index + 1, this.state = ra.Text) : 0 === this.sequenceIndex ? this.fastForwardTo(this.currentSequence[0]) && (this.sequenceIndex = 1) : e !== this.currentSequence[this.sequenceIndex - 1] && (this.sequenceIndex = 0)
}
isTagStartChar(e) {
return this.xmlMode ? !oa(e) : function (e) {
return e >= na.LowerA && e <= na.LowerZ || e >= na.UpperA && e <= na.UpperZ
}(e)
}
startSpecial(e, t) {
this.isSpecial = !0, this.currentSequence = e, this.sequenceIndex = t, this.state = ra.SpecialStartSequence
}
stateBeforeTagName(e) {
var t;
e === na.ExclamationMark ? (this.state = ra.BeforeDeclaration, this.sectionStart = this.index + 1) : e === na.Questionmark ? (this.state = ra.InProcessingInstruction, this.sectionStart = this.index + 1) : this.isTagStartChar(e) ? (t = 32 | e, this.sectionStart = this.index, this.xmlMode || t !== ua.TitleEnd[2] ? this.state = this.xmlMode || t !== ua.ScriptEnd[2] ? ra.InTagName : ra.BeforeSpecialS : this.startSpecial(ua.TitleEnd, 3)) : e === na.Slash ? this.state = ra.BeforeClosingTagName : (this.state = ra.Text, this.stateText(e))
}
stateInTagName(e) {
oa(e) && (this.cbs.onopentagname(this.sectionStart, this.index), this.sectionStart = -1, this.state = ra.BeforeAttributeName, this.stateBeforeAttributeName(e))
}
stateBeforeClosingTagName(e) {
aa(e) || (e === na.Gt ? this.state = ra.Text : (this.state = this.isTagStartChar(e) ? ra.InClosingTagName : ra.InSpecialComment, this.sectionStart = this.index))
}
stateInClosingTagName(e) {
e !== na.Gt && !aa(e) || (this.cbs.onclosetag(this.sectionStart, this.index), this.sectionStart = -1, this.state = ra.AfterClosingTagName, this.stateAfterClosingTagName(e))
}
stateAfterClosingTagName(e) {
e !== na.Gt && !this.fastForwardTo(na.Gt) || (this.state = ra.Text, this.baseState = ra.Text, this.sectionStart = this.index + 1)
}
stateBeforeAttributeName(e) {
e === na.Gt ? (this.cbs.onopentagend(this.index), this.isSpecial ? (this.state = ra.InSpecialTag, this.sequenceIndex = 0) : this.state = ra.Text, this.baseState = this.state, this.sectionStart = this.index + 1) : e === na.Slash ? this.state = ra.InSelfClosingTag : aa(e) || (this.state = ra.InAttributeName, this.sectionStart = this.index)
}
stateInSelfClosingTag(e) {
e === na.Gt ? (this.cbs.onselfclosingtag(this.index), this.state = ra.Text, this.baseState = ra.Text, this.sectionStart = this.index + 1, this.isSpecial = !1) : aa(e) || (this.state = ra.BeforeAttributeName, this.stateBeforeAttributeName(e))
}
stateInAttributeName(e) {
e !== na.Eq && !oa(e) || (this.cbs.onattribname(this.sectionStart, this.index), this.sectionStart = -1, this.state = ra.AfterAttributeName, this.stateAfterAttributeName(e))
}
stateAfterAttributeName(e) {
e === na.Eq ? this.state = ra.BeforeAttributeValue : e === na.Slash || e === na.Gt ? (this.cbs.onattribend(ia.NoValue, this.index), this.state = ra.BeforeAttributeName, this.stateBeforeAttributeName(e)) : aa(e) || (this.cbs.onattribend(ia.NoValue, this.index), this.state = ra.InAttributeName, this.sectionStart = this.index)
}
stateBeforeAttributeValue(e) {
e === na.DoubleQuote ? (this.state = ra.InAttributeValueDq, this.sectionStart = this.index + 1) : e === na.SingleQuote ? (this.state = ra.InAttributeValueSq, this.sectionStart = this.index + 1) : aa(e) || (this.sectionStart = this.index, this.state = ra.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 === na.DoubleQuote ? ia.Double : ia.Single, this.index), this.state = ra.BeforeAttributeName) : this.decodeEntities && e === na.Amp && (this.baseState = this.state, this.state = ra.BeforeEntity)
}
stateInAttributeValueDoubleQuotes(e) {
this.handleInAttributeValue(e, na.DoubleQuote)
}
stateInAttributeValueSingleQuotes(e) {
this.handleInAttributeValue(e, na.SingleQuote)
}
stateInAttributeValueNoQuotes(e) {
aa(e) || e === na.Gt ? (this.cbs.onattribdata(this.sectionStart, this.index), this.sectionStart = -1, this.cbs.onattribend(ia.Unquoted, this.index), this.state = ra.BeforeAttributeName, this.stateBeforeAttributeName(e)) : this.decodeEntities && e === na.Amp && (this.baseState = this.state, this.state = ra.BeforeEntity)
}
stateBeforeDeclaration(e) {
e === na.OpeningSquareBracket ? (this.state = ra.CDATASequence, this.sequenceIndex = 0) : this.state = e === na.Dash ? ra.BeforeComment : ra.InDeclaration
}
stateInDeclaration(e) {
e !== na.Gt && !this.fastForwardTo(na.Gt) || (this.cbs.ondeclaration(this.sectionStart, this.index), this.state = ra.Text, this.sectionStart = this.index + 1)
}
stateInProcessingInstruction(e) {
e !== na.Gt && !this.fastForwardTo(na.Gt) || (this.cbs.onprocessinginstruction(this.sectionStart, this.index), this.state = ra.Text, this.sectionStart = this.index + 1)
}
stateBeforeComment(e) {
e === na.Dash ? (this.state = ra.InCommentLike, this.currentSequence = ua.CommentEnd, this.sequenceIndex = 2, this.sectionStart = this.index + 1) : this.state = ra.InDeclaration
}
stateInSpecialComment(e) {
e !== na.Gt && !this.fastForwardTo(na.Gt) || (this.cbs.oncomment(this.sectionStart, this.index, 0), this.state = ra.Text, this.sectionStart = this.index + 1)
}
stateBeforeSpecialS(e) {
var t = 32 | e;
t === ua.ScriptEnd[3] ? this.startSpecial(ua.ScriptEnd, 4) : t === ua.StyleEnd[3] ? this.startSpecial(ua.StyleEnd, 4) : (this.state = ra.InTagName, this.stateInTagName(e))
}
stateBeforeEntity(e) {
this.entityExcess = 1, this.entityResult = 0, e === na.Number ? this.state = ra.BeforeNumericEntity : e !== na.Amp && (this.trieIndex = 0, this.trieCurrent = this.entityTrie[0], this.state = ra.InNamedEntity, this.stateInNamedEntity(e))
}
stateInNamedEntity(e) {
if (this.entityExcess += 1, this.trieIndex = Dr(this.entityTrie, this.trieCurrent, this.trieIndex + 1, e), this.trieIndex < 0) this.emitNamedEntity(), this.index--; else {
this.trieCurrent = this.entityTrie[this.trieIndex];
var t = this.trieCurrent & Rr.VALUE_LENGTH;
if (t) if (t = (t >> 14) - 1, this.allowLegacyEntity() || e === na.Semi) {
const e = this.index - this.entityExcess + 1;
e > this.sectionStart && this.emitPartial(this.sectionStart, e), this.entityResult = this.trieIndex, this.trieIndex += t, this.entityExcess = 0, this.sectionStart = this.index + 1, 0 == t && this.emitNamedEntity()
} else this.trieIndex += t
}
}
emitNamedEntity() {
if (this.state = this.baseState, 0 !== this.entityResult) switch ((this.entityTrie[this.entityResult] & Rr.VALUE_LENGTH) >> 14) {
case 1:
this.emitCodePoint(this.entityTrie[this.entityResult] & ~Rr.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) === na.LowerX ? (this.entityExcess++, this.state = ra.InHexEntity) : (this.state = ra.InNumericEntity, this.stateInNumericEntity(e))
}
emitNumericEntity(e) {
var t = this.index - this.entityExcess - 1;
2 + t + Number(this.state === ra.InHexEntity) !== this.index && (t > this.sectionStart && this.emitPartial(this.sectionStart, t), this.sectionStart = this.index + Number(e), this.emitCodePoint(xr(this.entityResult))), this.state = this.baseState
}
stateInNumericEntity(e) {
e === na.Semi ? this.emitNumericEntity(!0) : ca(e) ? (this.entityResult = 10 * this.entityResult + (e - na.Zero), this.entityExcess++) : (this.allowLegacyEntity() ? this.emitNumericEntity(!1) : this.state = this.baseState, this.index--)
}
stateInHexEntity(e) {
e === na.Semi ? this.emitNumericEntity(!0) : ca(e) ? (this.entityResult = 16 * this.entityResult + (e - na.Zero), this.entityExcess++) : function (e) {
return e >= na.UpperA && e <= na.UpperF || e >= na.LowerA && e <= na.LowerF
}(e) ? (this.entityResult = 16 * this.entityResult + ((32 | e) - na.LowerA + 10), this.entityExcess++) : (this.allowLegacyEntity() ? this.emitNumericEntity(!1) : this.state = this.baseState, this.index--)
}
allowLegacyEntity() {
return !this.xmlMode && (this.baseState === ra.Text || this.baseState === ra.InSpecialTag)
}
cleanup() {
this.running && this.sectionStart !== this.index && (this.state === ra.Text || this.state === ra.InSpecialTag && 0 === this.sequenceIndex ? (this.cbs.ontext(this.sectionStart, this.index), this.sectionStart = this.index) : this.state !== ra.InAttributeValueDq && this.state !== ra.InAttributeValueSq && this.state !== ra.InAttributeValueNq || (this.cbs.onattribdata(this.sectionStart, this.index), this.sectionStart = this.index))
}
shouldContinue() {
return this.index < this.buffer.length + this.offset && this.running
}
parse() {
for (; this.shouldContinue();) {
var e = this.buffer.charCodeAt(this.index - this.offset);
switch (this.state) {
case ra.Text:
this.stateText(e);
break;
case ra.SpecialStartSequence:
this.stateSpecialStartSequence(e);
break;
case ra.InSpecialTag:
this.stateInSpecialTag(e);
break;
case ra.CDATASequence:
this.stateCDATASequence(e);
break;
case ra.InAttributeValueDq:
this.stateInAttributeValueDoubleQuotes(e);
break;
case ra.InAttributeName:
this.stateInAttributeName(e);
break;
case ra.InCommentLike:
this.stateInCommentLike(e);
break;
case ra.InSpecialComment:
this.stateInSpecialComment(e);
break;
case ra.BeforeAttributeName:
this.stateBeforeAttributeName(e);
break;
case ra.InTagName:
this.stateInTagName(e);
break;
case ra.InClosingTagName:
this.stateInClosingTagName(e);
break;
case ra.BeforeTagName:
this.stateBeforeTagName(e);
break;
case ra.AfterAttributeName:
this.stateAfterAttributeName(e);
break;
case ra.InAttributeValueSq:
this.stateInAttributeValueSingleQuotes(e);
break;
case ra.BeforeAttributeValue:
this.stateBeforeAttributeValue(e);
break;
case ra.BeforeClosingTagName:
this.stateBeforeClosingTagName(e);
break;
case ra.AfterClosingTagName:
this.stateAfterClosingTagName(e);
break;
case ra.BeforeSpecialS:
this.stateBeforeSpecialS(e);
break;
case ra.InAttributeValueNq:
this.stateInAttributeValueNoQuotes(e);
break;
case ra.InSelfClosingTag:
this.stateInSelfClosingTag(e);
break;
case ra.InDeclaration:
this.stateInDeclaration(e);
break;
case ra.BeforeDeclaration:
this.stateBeforeDeclaration(e);
break;
case ra.BeforeComment:
this.stateBeforeComment(e);
break;
case ra.InProcessingInstruction:
this.stateInProcessingInstruction(e);
break;
case ra.InNamedEntity:
this.stateInNamedEntity(e);
break;
case ra.BeforeEntity:
this.stateBeforeEntity(e);
break;
case ra.InHexEntity:
this.stateInHexEntity(e);
break;
case ra.InNumericEntity:
this.stateInNumericEntity(e);
break;
default:
this.stateBeforeNumericEntity(e)
}
this.index++
}
this.cleanup()
}
finish() {
this.state === ra.InNamedEntity && this.emitNamedEntity(), this.sectionStart < this.index && this.handleTrailingData(), this.cbs.onend()
}
handleTrailingData() {
var e = this.buffer.length + this.offset;
this.state === ra.InCommentLike ? this.currentSequence === ua.CdataEnd ? this.cbs.oncdata(this.sectionStart, e, 0) : this.cbs.oncomment(this.sectionStart, e, 0) : this.state === ra.InNumericEntity && this.allowLegacyEntity() || this.state === ra.InHexEntity && this.allowLegacyEntity() ? this.emitNumericEntity(!1) : this.state !== ra.InTagName && this.state !== ra.BeforeAttributeName && this.state !== ra.BeforeAttributeValue && this.state !== ra.AfterAttributeName && this.state !== ra.InAttributeName && this.state !== ra.InAttributeValueSq && this.state !== ra.InAttributeValueDq && this.state !== ra.InAttributeValueNq && this.state !== ra.InClosingTagName && this.cbs.ontext(this.sectionStart, e)
}
emitPartial(e, t) {
this.baseState !== ra.Text && this.baseState !== ra.InSpecialTag ? this.cbs.onattribdata(e, t) : this.cbs.ontext(e, t)
}
emitCodePoint(e) {
this.baseState !== ra.Text && this.baseState !== ra.InSpecialTag ? this.cbs.onattribentity(e) : this.cbs.ontextentity(e)
}
}
const ha = new Set(["input", "option", "optgroup", "select", "button", "datalist", "textarea"]), fa = new Set(["p"]),
pa = new Set(["thead", "tbody"]), da = new Set(["dd", "dt"]), ma = new Set(["rt", "rp"]),
_a = new Map([["tr", new Set(["tr", "th", "td"])], ["th", new Set(["th"])], ["td", new Set(["thead", "th", "td"])], ["body", new Set(["head", "link", "script"])], ["li", new Set(["li"])], ["p", fa], ["h1", fa], ["h2", fa], ["h3", fa], ["h4", fa], ["h5", fa], ["h6", fa], ["select", ha], ["input", ha], ["output", ha], ["button", ha], ["datalist", ha], ["textarea", ha], ["option", new Set(["option"])], ["optgroup", new Set(["optgroup", "option"])], ["dd", da], ["dt", da], ["address", fa], ["article", fa], ["aside", fa], ["blockquote", fa], ["details", fa], ["div", fa], ["dl", fa], ["fieldset", fa], ["figcaption", fa], ["figure", fa], ["footer", fa], ["form", fa], ["header", fa], ["hr", fa], ["main", fa], ["nav", fa], ["ol", fa], ["pre", fa], ["section", fa], ["table", fa], ["ul", fa], ["rt", ma], ["rp", ma], ["tbody", pa], ["tfoot", pa]]),
Ea = new Set(["area", "base", "basefont", "br", "col", "command", "embed", "frame", "hr", "img", "input", "isindex", "keygen", "link", "meta", "param", "source", "track", "wbr"]),
Ta = new Set(["math", "svg"]),
Aa = new Set(["mi", "mo", "mn", "ms", "mtext", "annotation-xml", "foreignobject", "desc", "title"]), ga = /\s|\//;
class va {
constructor(e, t = {}) {
this.options = t, this.startIndex = 0, this.endIndex = 0, this.openTagStart = 0, this.tagname = "", this.attribname = "", this.attribvalue = "", this.attribs = null, this.stack = [], this.foreignContext = [], this.buffers = [], this.bufferOffset = 0, this.writeIndex = 0, this.ended = !1, this.cbs = null != e ? e : {}, this.lowerCaseTagNames = null != (e = t.lowerCaseTags) ? e : !t.xmlMode, this.lowerCaseAttributeNames = null != (e = t.lowerCaseAttributeNames) ? e : !t.xmlMode, this.tokenizer = new (null != (e = t.Tokenizer) ? e : la)(this.options, this), null != (e = (t = this.cbs).onparserinit) && e.call(t, this)
}
ontext(e, t) {
var n, r, e = this.getSlice(e, t);
this.endIndex = t - 1, null != (r = (n = this.cbs).ontext) && r.call(n, e), this.startIndex = t
}
ontextentity(e) {
var t, n, r = this.tokenizer.getSectionStart();
this.endIndex = r - 1, null != (n = (t = this.cbs).ontext) && n.call(t, wr(e)), this.startIndex = r
}
isVoidElement(e) {
return !this.options.xmlMode && Ea.has(e)
}
onopentagname(e, t) {
this.endIndex = t;
let n = this.getSlice(e, t);
this.lowerCaseTagNames && (n = n.toLowerCase()), this.emitOpenTag(n)
}
emitOpenTag(e) {
this.openTagStart = this.startIndex, this.tagname = e;
var t, n, r, i, s = !this.options.xmlMode && _a.get(e);
if (s) for (; 0 < this.stack.length && s.has(this.stack[this.stack.length - 1]);) {
const e = this.stack.pop();
null != (n = (t = this.cbs).onclosetag) && n.call(t, e, !0)
}
this.isVoidElement(e) || (this.stack.push(e), Ta.has(e) ? this.foreignContext.push(!0) : Aa.has(e) && this.foreignContext.push(!1)), null != (i = (r = this.cbs).onopentagname) && 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) && 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 r;
this.endIndex = t;
let c = this.getSlice(e, t);
if (this.lowerCaseTagNames && (c = c.toLowerCase()), (Ta.has(c) || Aa.has(c)) && this.foreignContext.pop(), this.isVoidElement(c)) this.options.xmlMode || "br" !== c || (null != (r = (e = this.cbs).onopentagname) && r.call(e, "br"), null != (e = (r = this.cbs).onopentag) && e.call(r, "br", {}, !0), null == (r = (e = this.cbs).onclosetag)) || r.call(e, "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, r = this.tagname;
this.endOpenTag(e), this.stack[this.stack.length - 1] === r && (null != (n = (t = this.cbs).onclosetag) && n.call(t, r, !e), this.stack.pop())
}
onattribname(e, t) {
this.startIndex = e, e = this.getSlice(e, t), this.attribname = this.lowerCaseAttributeNames ? e.toLowerCase() : e
}
onattribdata(e, t) {
this.attribvalue += this.getSlice(e, t)
}
onattribentity(e) {
this.attribvalue += wr(e)
}
onattribend(e, t) {
var r;
this.endIndex = t, null != (r = (t = this.cbs).onattribute) && r.call(t, this.attribname, this.attribvalue, e === ia.Double ? '"' : e === ia.Single ? "'" : e === ia.NoValue ? void 0 : null), this.attribs && !Object.prototype.hasOwnProperty.call(this.attribs, this.attribname) && (this.attribs[this.attribname] = this.attribvalue), this.attribvalue = ""
}
getInstructionName(e) {
var t = e.search(ga);
let n = t < 0 ? e : e.substr(0, t);
return n = this.lowerCaseTagNames ? n.toLowerCase() : n
}
ondeclaration(e, t) {
this.endIndex = t;
var 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;
var 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 i, r;
this.endIndex = t, null != (i = (r = this.cbs).oncomment) && i.call(r, this.getSlice(e, t - n)), null != (r = (i = this.cbs).oncommentend) && r.call(i), this.startIndex = t + 1
}
oncdata(e, t, n) {
this.endIndex = t;
var i, e = this.getSlice(e, t - n);
this.options.xmlMode || this.options.recognizeCDATA ? (null != (i = (n = this.cbs).oncdatastart) && i.call(n), null != (n = (i = this.cbs).ontext) && n.call(i, e), null != (i = (n = this.cbs).oncdataend) && i.call(n)) : (null != (n = (i = this.cbs).oncomment) && n.call(i, `[CDATA[${e}]]`), null != (i = (n = this.cbs).oncommentend) && i.call(n)), this.startIndex = t + 1
}
onend() {
var e, t;
if (this.cbs.onclosetag) {
this.endIndex = this.startIndex;
for (let e = this.stack.length; 0 < e; this.cbs.onclosetag(this.stack[--e], !0)) ;
}
null != (t = (e = this.cbs).onend) && t.call(e)
}
reset() {
var t, e;
null != (t = (e = this.cbs).onreset) && t.call(e), this.tokenizer.reset(), this.tagname = "", this.attribname = "", this.attribs = null, this.stack.length = 0, this.startIndex = 0, this.endIndex = 0, null != (e = (t = this.cbs).onparserinit) && e.call(t, 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) && 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) && n.call(t, new 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 < this.buffers.length;) this.tokenizer.write(this.buffers[this.writeIndex++]);
this.ended && this.tokenizer.end()
}
parseChunk(e) {
this.write(e)
}
done(e) {
this.end(e)
}
}
var ya,
Sa = "undefined" != typeof global ? global : "undefined" != typeof self ? self : "undefined" != typeof window ? window : {};
function Ca(e) {
if (Object.keys) return Object.keys(e);
var n, t = [];
for (n in e) t.push(n);
return t
}
function Na(e, t) {
if (e.forEach) return e.forEach(t);
for (var n = 0; n < e.length; n++) t(e[n], n, e)
}
function ba() {
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 Ia = ["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 Oa() {
}
function ka(e) {
if (!(this instanceof ka)) return new ka(e);
this.code = e
}
function La(e) {
var t;
return Da(e) ? e : (t = new Oa, "object" == typeof e && Na(Ca(e), function (n) {
t[n] = e[n]
}), t)
}
function Da(e) {
return e instanceof Oa
}
Oa.prototype = {}, ka.prototype.runInContext = function (e) {
var t, n, r, s, i;
if (e instanceof Oa) return Sa.document ? ((t = Sa.document.createElement("iframe")).style || (t.style = {}), t.style.display = "none", Sa.document.body.appendChild(t), r = (n = t.contentWindow).eval, i = n.execScript, !r && i && (i.call(n, "null"), r = n.eval), Na(Ca(e), function (t) {
n[t] = e[t]
}), Na(Ia, function (t) {
e[t] && (n[t] = e[t])
}), s = Ca(n), i = r.call(n, this.code), Na(Ca(n), function (t) {
(t in e || -1 === function (e, t) {
if (wa) 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])
}), Na(Ia, function (t) {
var s;
t in e || (s = n[t], (ya = "function" != typeof ya ? ba : ya)(e, t, s))
}), Sa.document.body.removeChild(t), i) : function (e, t) {
var n = Ca(Sa);
return n.push("with (this.__ctx__){return eval(this.__code__)}"), Function.apply(null, n).apply({
__code__: e,
__ctx__: t
})
}(this.code, e);
throw new TypeError("needs a 'context' argument.")
}, ka.prototype.runInThisContext = function () {
return new Function("code", "return eval(code);").call(Sa, this.code)
}, ka.prototype.runInNewContext = function (e) {
var t = La(e), n = this.runInContext(t);
return e && Na(Ca(t), function (n) {
e[n] = t[n]
}), n
};
var Ra = {
runInContext: function (e, t, n) {
return new ka(e).runInContext(t, n)
}, isContext: Da, createContext: La, createScript: function (e) {
return new ka(e)
}, Script: ka, runInThisContext: function (e, t) {
return new ka(e).runInThisContext(t)
}, runInNewContext: function (e, t, n) {
return new ka(e).runInNewContext(t, n)
}
}, wa = [].indexOf;
const xa = Object.prototype.hasOwnProperty;
function Ma(e, t) {
return (e = e.slice()).push(t), e
}
function Pa(e, t) {
return (t = t.slice()).unshift(e), t
}
class Ba 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 Fa(e, t, n, r, i) {
if (!(this instanceof Fa)) try {
return new Fa(e, t, n, r, i)
} catch (e) {
if (e.avoidNew) return e.value;
throw e
}
"string" == typeof e && (i = r, r = n, n = t, t = e, e = null);
var s = e && "object" == typeof e;
if (this.json = (e = e || {}).json || n, this.path = e.path || t, this.resultType = e.resultType || "value", this.flatten = e.flatten || !1, this.wrap = !xa.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}, i = (s ? "json" in e && (r.json = e.json) : r.json = n, this.evaluate(r));
if (i && "object" == typeof i) return i;
throw new Ba(i)
}
}
Fa.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 (!xa.call(e, "json")) throw new TypeError('You must supply a "json" property when providing an object argument to JSONPath.evaluate().');
t = e.json, a = xa.call(e, "flatten") ? e.flatten : a, this.currResultType = xa.call(e, "resultType") ? e.resultType : this.currResultType, this.currSandbox = xa.call(e, "sandbox") ? e.sandbox : this.currSandbox, o = xa.call(e, "wrap") ? e.wrap : o, this.currPreventEval = xa.call(e, "preventEval") ? e.preventEval : this.currPreventEval, n = xa.call(e, "callback") ? e.callback : n, this.currOtherTypeCallback = xa.call(e, "otherTypeCallback") ? e.otherTypeCallback : this.currOtherTypeCallback, i = xa.call(e, "parent") ? e.parent : i, s = xa.call(e, "parentProperty") ? e.parentProperty : s, e = e.path
}
if (i = i || null, s = s || null, ((e = Array.isArray(e) ? Fa.toPathString(e) : e) || "" === e) && t) return "$" === (r = Fa.toPathArray(e))[0] && 1 < r.length && r.shift(), this._hasParentSelector = null, (e = this._trace(r, t, ["$"], i, s, n).filter(function (e) {
return e && !e.isParentSelector
})).length ? o || 1 !== e.length || e[0].hasArrExpr ? e.reduce((e, t) => (t = this._getPreferredOutput(t), a && Array.isArray(t) ? e = e.concat(t) : e.push(t), e), []) : this._getPreferredOutput(e[0]) : o ? [] : void 0
}, Fa.prototype._getPreferredOutput = function (e) {
const t = this.currResultType;
switch (t) {
case"all": {
const t = Array.isArray(e.path) ? e.path : Fa.toPathArray(e.path);
return e.pointer = Fa.toPointer(t), e.path = "string" == typeof e.path ? e.path : Fa.toPathString(e.path), e
}
case"value":
case"parent":
case"parentProperty":
return e[t];
case"path":
return Fa.toPathString(e[t]);
case"pointer":
return Fa.toPointer(e.path);
default:
throw new TypeError("Unknown result type")
}
}, Fa.prototype._handleCallback = function (e, t, n) {
var r;
t && (r = this._getPreferredOutput(e), e.path = "string" == typeof e.path ? e.path : Fa.toPathString(e.path), t(r, n, e))
}, Fa.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 u = e[0], l = e.slice(1), h = [];
function f(e) {
Array.isArray(e) ? e.forEach(e => {
h.push(e)
}) : h.push(e)
}
if (("string" != typeof u || o) && t && xa.call(t, u)) f(this._trace(l, t[u], Ma(n, u), t, u, s, a)); else if ("*" === u) this._walk(t, e => {
f(this._trace(l, t[e], Ma(n, e), t, e, s, !0, !0))
}); else if (".." === u) f(this._trace(l, t, n, r, i, s, a)), this._walk(t, r => {
"object" == typeof t[r] && f(this._trace(e.slice(), t[r], Ma(n, r), t, r, s, !0))
}); else {
if ("^" === u) return this._hasParentSelector = !0, {path: n.slice(0, -1), expr: l, isParentSelector: !0};
if ("~" === u) return c = {
path: Ma(n, u),
value: i,
parent: r,
parentProperty: null
}, this._handleCallback(c, s, "property"), c;
if ("$" === u) f(this._trace(l, t, n, null, null, s, a)); else if (/^(-?\d*):(-?\d*):?(\d*)$/u.test(u)) f(this._slice(u, l, t, n, r, i, s)); else if (0 === u.indexOf("?(")) {
if (this.currPreventEval) throw new Error("Eval [?(expr)] prevented in JSONPath expression.");
const e = u.replace(/^\?\((.*?)\)$/u, "$1");
this._walk(t, a => {
this._eval(e, t[a], a, n, r, i) && f(this._trace(l, t[a], Ma(n, a), t, a, s, !0))
})
} else if ("(" === u[0]) {
if (this.currPreventEval) throw new Error("Eval [(expr)] prevented in JSONPath expression.");
f(this._trace(Pa(this._eval(u, t, n[n.length - 1], n.slice(0, -1), r, i), l), t, n, r, i, s, a))
} else if ("@" === u[0]) {
let e = !1;
const a = u.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 ("`" === u[0] && t && xa.call(t, u.slice(1))) {
const e = u.slice(1);
f(this._trace(l, t[e], Ma(n, e), t, e, s, a, !0))
} else if (u.includes(",")) {
const e = u.split(",");
for (const a of e) f(this._trace(Pa(a, l), t, n, r, i, s, !0))
} else !o && t && xa.call(t, u) && f(this._trace(l, t[u], Ma(n, u), t, u, s, a, !0))
}
if (this._hasParentSelector) for (let e = 0; e < h.length; e++) {
const n = h[e];
if (n && n.isParentSelector) {
const o = this._trace(n.expr, t, n.path, r, i, s, a);
if (Array.isArray(o)) {
h[e] = o[0];
const t = o.length;
for (let n = 1; n < t; n++) e++, h.splice(e, 0, o[n])
} else h[e] = o
}
}
return h
}, Fa.prototype._walk = function (e, t) {
if (Array.isArray(e)) {
var n = e.length;
for (let e = 0; e < n; e++) t(e)
} else e && "object" == typeof e && Object.keys(e).forEach(e => {
t(e)
})
}, Fa.prototype._slice = function (e, t, n, r, i, s, a) {
if (Array.isArray(n)) {
var o = n.length, u = (e = e.split(":"))[2] && Number.parseInt(e[2]) || 1,
l = e[0] && Number.parseInt(e[0]) || 0, h = e[1] && Number.parseInt(e[1]) || o,
l = l < 0 ? Math.max(0, l + o) : Math.min(o, l), h = h < 0 ? Math.max(0, h + o) : Math.min(o, h);
const f = [];
for (let e = l; e < h; e += u) this._trace(Pa(e, t), n, r, i, s, a, !0).forEach(e => {
f.push(e)
});
return f
}
}, Fa.prototype._eval = function (e, t, n, r, i, s) {
if (this.currSandbox._$_parentProperty = s, this.currSandbox._$_parent = i, this.currSandbox._$_property = n, this.currSandbox._$_root = this.json, this.currSandbox._$_v = t, (s = e.includes("@path")) && (this.currSandbox._$_path = Fa.toPathString(r.concat([n]))), !Fa.cache[i = "script:" + e]) {
let t = e.replace(/@parentProperty/gu, "_$_parentProperty").replace(/@parent/gu, "_$_parent").replace(/@property/gu, "_$_property").replace(/@root/gu, "_$_root").replace(/@([.\s)[])/gu, "_$_v$1");
s && (t = t.replace(/@path/gu, "_$_path")), Fa.cache[i] = new this.vm.Script(t)
}
try {
return Fa.cache[i].runInNewContext(this.currSandbox)
} catch (t) {
throw new Error("jsonPath: " + t.message + ": " + e)
}
}, Fa.cache = {}, Fa.toPathString = function (e) {
var 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
}, Fa.toPointer = function (e) {
var 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
}, Fa.toPathArray = function (e) {
var t = Fa.cache;
if (!t[e]) {
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) {
var t = e.match(/#(\d+)/u);
return t && t[1] ? n[t[1]] : e
});
t[e] = i
}
return t[e].concat()
}, Fa.prototype.vm = Ra;
var Ua = Sr(function (e) {
var t = Array.prototype, n = Object.prototype,
r = {"&": "&amp;", '"': "&quot;", "'": "&#39;", "<": "&lt;", ">": "&gt;"}, 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, a, s, o;
return 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), s = i ? (a = Object.getOwnPropertyDescriptor(i, "stack")) && (a.get || function () {
return a.value
}) || function () {
return i.stack
} : (o = new Error(e).stack, function () {
return o
}), 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) {
return e = "(" + (e || "unknown path") + ")", this.firstUpdate && (this.lineno && this.colno ? e += " [Line " + this.lineno + ", Column " + this.colno + "]" : this.lineno && (e += " [Line " + this.lineno + "]")), e += "\n ", this.firstUpdate && (e += " "), this.message = e + (this.message || ""), this.firstUpdate = !1, this
}, r
}
function u(e) {
return "[object Function]" === n.toString.call(e)
}
function l(e) {
return "[object Array]" === n.toString.call(e)
}
function h(e) {
return "[object String]" === n.toString.call(e)
}
function f(e) {
return "[object Object]" === n.toString.call(e)
}
function p(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 m(e, t, n) {
return Array.prototype.indexOf.call(e || [], t, n)
}
function _(e) {
var n, t = [];
for (n in e) a(e, n) && t.push(n);
return t
}
s.hasOwnProp = a, s._prettifyError = function (e, t, n) {
return (n = n.Update ? n : new s.TemplateError(n)).Update(e), t || (e = n, (n = new Error(e.message)).name = e.name), 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 = u, s.isArray = l, s.isString = h, s.isObject = f, s.getAttrGetter = p, s.groupBy = function (e, t, n) {
for (var r = {}, i = u(t) ? t : p(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) for (var n = e.length, r = d(arguments).slice(1), i = -1; ++i < n;) -1 === m(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) {
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);
e.length === +e.length && (r.length = e.length)
}
return 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 = _(e || {}), i = r.length, s = -1;
!function a() {
var o = r[++s];
s < i ? t(o, e[o], s, i, a) : n()
}()
}, s.indexOf = m, s.keys = _, s._entries = function (e) {
return _(e).map(function (t) {
return [t, e[t]]
})
}, s._values = function (e) {
return _(e).map(function (t) {
return e[t]
})
}, s._assign = s.extend = function (e, t) {
return e = e || {}, _(t).forEach(function (n) {
e[n] = t[n]
}), e
}, s.inOperator = function (e, t) {
if (l(t) || h(t)) return -1 !== t.indexOf(e);
if (f(t)) return e in t;
throw new Error('Cannot use "in" operator to search for "' + e + '" in unexpected types.')
}
});
function Ha() {
throw new Error("setTimeout has not been defined")
}
function Ga() {
throw new Error("clearTimeout has not been defined")
}
var ja = Ha, qa = Ga;
function Ya(e) {
if (ja === setTimeout) return setTimeout(e, 0);
if ((ja === Ha || !ja) && setTimeout) return (ja = setTimeout)(e, 0);
try {
return ja(e, 0)
} catch (t) {
try {
return ja.call(null, e, 0)
} catch (t) {
return ja.call(this, e, 0)
}
}
}
"function" == typeof Sa.setTimeout && (ja = setTimeout), "function" == typeof Sa.clearTimeout && (qa = clearTimeout);
var Ka, Wa = [], Va = !1, $a = -1;
function Qa() {
Va && Ka && (Va = !1, Ka.length ? Wa = Ka.concat(Wa) : $a = -1, Wa.length) && za()
}
function za() {
if (!Va) {
var e = Ya(Qa);
Va = !0;
for (var t = Wa.length; t;) {
for (Ka = Wa, Wa = []; ++$a < t;) Ka && Ka[$a].run();
$a = -1, t = Wa.length
}
Ka = null, Va = !1, function (e) {
if (qa === clearTimeout) return clearTimeout(e);
if ((qa === Ga || !qa) && clearTimeout) return (qa = clearTimeout)(e);
try {
qa(e)
} catch (t) {
try {
return qa.call(null, e)
} catch (t) {
return qa.call(this, e)
}
}
}(e)
}
}
function Xa(e, t) {
this.fun = e, this.array = t
}
function Za() {
}
Xa.prototype.run = function () {
this.fun.apply(null, this.array)
};
var Ja = Za, eo = Za, to = Za, no = Za, ro = Za, io = Za, so = Za, ao = Sa.performance || {},
oo = ao.now || ao.mozNow || ao.msNow || ao.oNow || ao.webkitNow || function () {
return (new Date).getTime()
}, co = new Date, uo = {
nextTick: function (e) {
var t = new Array(arguments.length - 1);
if (1 < arguments.length) for (var n = 1; n < arguments.length; n++) t[n - 1] = arguments[n];
Wa.push(new Xa(e, t)), 1 !== Wa.length || Va || Ya(za)
},
title: "browser",
browser: !0,
env: {},
argv: [],
version: "",
versions: {},
on: Ja,
addListener: eo,
once: to,
off: no,
removeListener: ro,
removeAllListeners: io,
emit: so,
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 * oo.call(ao), n = Math.floor(t), t = Math.floor(t % 1 * 1e9);
return e && (n -= e[0], (t -= e[1]) < 0) && (n--, t += 1e9), [n, t]
},
platform: "browser",
release: {},
config: {},
uptime: function () {
return (new Date - co) / 1e3
}
};
function lo() {
}
function ho() {
ho.init.call(this)
}
function fo(e) {
return void 0 === e._maxListeners ? ho.defaultMaxListeners : e._maxListeners
}
function po(e, t, n, r) {
var s, a;
if ("function" != typeof n) throw new TypeError('"listener" argument must be a function');
return (s = e._events) ? (s.newListener && (e.emit("newListener", t, n.listener || n), s = e._events), a = s[t]) : (s = e._events = new lo, e._eventsCount = 0), a ? ("function" == typeof a ? a = s[t] = r ? [n, a] : [a, n] : r ? a.unshift(n) : a.push(n), !a.warned && (r = fo(e)) && 0 < r && a.length > r && (a.warned = !0, (r = new Error("Possible EventEmitter memory leak detected. " + a.length + " " + t + " listeners added. Use emitter.setMaxListeners() to increase limit")).name = "MaxListenersExceededWarning", r.emitter = e, r.type = t, r.count = a.length, function (e) {
"function" == typeof console.warn ? console.warn(e) : console.log(e)
}(r))) : (a = s[t] = n, ++e._eventsCount), e
}
function mo(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 _o(e) {
var t = this._events;
if (t) {
if ("function" == typeof (t = t[e])) return 1;
if (t) return t.length
}
return 0
}
function Eo(e, t) {
for (var n = new Array(t); t--;) n[t] = e[t];
return n
}
function To() {
var e;
ho.call(this), this.__emitError = (e = this, function (t) {
e.emit("error", t)
})
}
function Ao() {
return new To
}
lo.prototype = Object.create(null), (ho.EventEmitter = ho).usingDomains = !1, ho.prototype.domain = void 0, ho.prototype._events = void 0, ho.prototype._maxListeners = void 0, ho.defaultMaxListeners = 10, ho.init = function () {
this.domain = null, ho.usingDomains && (void 0).active, this._events && this._events !== Object.getPrototypeOf(this)._events || (this._events = new lo, this._eventsCount = 0), this._maxListeners = this._maxListeners || void 0
}, ho.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
}, ho.prototype.getMaxListeners = function () {
return fo(this)
}, ho.prototype.emit = function (e) {
var n, r, i, s, a, c = "error" === e;
if (a = this._events) c = c && null == a.error; else if (!c) return !1;
if (o = this.domain, c) {
if (c = arguments[1], o) return (c = c || new Error('Uncaught, unspecified "error" event')).domainEmitter = this, c.domain = o, c.domainThrown = !1, o.emit("error", c), !1;
if (c instanceof Error) throw c;
var o = new Error('Uncaught, unspecified "error" event. (' + c + ")");
throw o.context = c, o
}
if (!(n = a[e])) return !1;
var l = "function" == typeof n;
switch (r = arguments.length) {
case 1:
!function (e, n) {
if (l) e.call(n); else for (var r = e.length, i = Eo(e, r), s = 0; s < r; ++s) i[s].call(n)
}(n, this);
break;
case 2:
!function (e, t, n, r) {
if (t) e.call(n, r); else for (var i = e.length, s = Eo(e, i), a = 0; a < i; ++a) s[a].call(n, r)
}(n, l, this, arguments[1]);
break;
case 3:
!function (e, t, n, r, i) {
if (t) e.call(n, r, i); else for (var s = e.length, a = Eo(e, s), o = 0; o < s; ++o) a[o].call(n, r, i)
}(n, l, this, arguments[1], arguments[2]);
break;
case 4:
!function (e, t, n, r, i, s) {
if (t) e.call(n, r, i, s); else for (var a = e.length, o = Eo(e, a), c = 0; c < a; ++c) o[c].call(n, r, i, s)
}(n, l, 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];
!function (e, n, r) {
if (l) e.apply(n, r); else for (var i = e.length, s = Eo(e, i), a = 0; a < i; ++a) s[a].apply(n, r)
}(n, this, i)
}
return !0
}, ho.prototype.addListener = function (e, t) {
return po(this, e, t, !1)
}, ho.prototype.on = ho.prototype.addListener, ho.prototype.prependListener = function (e, t) {
return po(this, e, t, !0)
}, ho.prototype.once = function (e, t) {
if ("function" != typeof t) throw new TypeError('"listener" argument must be a function');
return this.on(e, mo(this, e, t)), this
}, ho.prototype.prependOnceListener = function (e, t) {
if ("function" != typeof t) throw new TypeError('"listener" argument must be a function');
return this.prependListener(e, mo(this, e, t)), this
}, ho.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) && (n = r[e])) if (n === t || n.listener && n.listener === t) 0 == --this._eventsCount ? this._events = new lo : (delete r[e], r.removeListener && this.emit("removeListener", e, n.listener || t)); else if ("function" != typeof n) {
for (i = -1, s = n.length; 0 < s--;) 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 lo, 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
}, ho.prototype.removeAllListeners = function (e) {
var t, n;
if (n = this._events) if (n.removeListener) {
if (0 === arguments.length) {
for (var r, i = Object.keys(n), s = 0; s < i.length; ++s) "removeListener" !== (r = i[s]) && this.removeAllListeners(r);
this.removeAllListeners("removeListener"), this._events = new lo, this._eventsCount = 0
} else if ("function" == typeof (t = n[e])) this.removeListener(e, t); else if (t) for (; this.removeListener(e, t[t.length - 1]), t[0];) ;
} else 0 === arguments.length ? (this._events = new lo, this._eventsCount = 0) : n[e] && (0 == --this._eventsCount ? this._events = new lo : delete n[e]);
return this
}, ho.prototype.listeners = function (e) {
var n = this._events;
return (n = n && n[e]) ? "function" == typeof n ? [n.listener || n] : function (e) {
for (var t = new Array(e.length), n = 0; n < t.length; ++n) t[n] = e[n].listener || e[n];
return t
}(n) : []
}, ho.listenerCount = function (e, t) {
return "function" == typeof e.listenerCount ? e.listenerCount(t) : _o.call(e, t)
}, ho.prototype.listenerCount = _o, ho.prototype.eventNames = function () {
return 0 < this._eventsCount ? 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) {
function n() {
}
e.super_ = t, n.prototype = t.prototype, e.prototype = new n, e.prototype.constructor = e
})(To, ho), To.prototype.add = function (e) {
e.on("error", this.__emitError)
}, To.prototype.remove = function (e) {
e.removeListener("error", this.__emitError)
}, To.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)
}
}
}, To.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)
}
}
}
}, To.prototype.run = function (e) {
var t = this.__emitError;
try {
e()
} catch (e) {
t(e)
}
return this
}, To.prototype.dispose = function () {
return this.removeAllListeners(), this
}, To.prototype.enter = To.prototype.exit = function () {
return this
};
var go, vo = {Domain: To, createDomain: Ao, create: Ao}, yo = "function" == typeof setImmediate, So = Co;
function Co(e) {
No.length || (Lo(), bo = !0), No[No.length] = e
}
var No = [], bo = !1, Io = 0, Oo = 1024;
function ko() {
for (; Io < No.length;) {
var e = Io;
if (Io += 1, No[e].call(), Oo < Io) {
for (var t = 0, n = No.length - Io; t < n; t++) No[t] = No[t + Io];
No.length -= Io, Io = 0
}
}
No.length = 0, Io = 0, bo = !1
}
function Lo() {
var e = uo.domain;
e && ((go = go || vo).active = uo.domain = null), bo && yo ? setImmediate(ko) : uo.nextTick(ko), e && (go.active = uo.domain = e)
}
Co.requestFlush = Lo;
var Do = [], Ro = function (e) {
var t = Do.length ? Do.pop() : new wo;
t.task = e, t.domain = uo.domain, So(t)
};
function wo() {
this.task = null, this.domain = null
}
wo.prototype.call = function () {
this.domain && this.domain.enter();
var e = !0;
try {
this.task.call(), e = !1, this.domain && this.domain.exit()
} finally {
e && So.requestFlush(), this.task = null, this.domain = null, Do.push(this)
}
};
var xo = Sr(function (e) {
function n() {
var e = Array.prototype.slice.call(arguments);
"function" == typeof e[0] && e[0].apply(null, e.splice(1))
}
function r(e) {
"function" == typeof setImmediate ? setImmediate(e) : void 0 !== uo && uo.nextTick ? uo.nextTick(e) : setTimeout(e, 0)
}
function s(e, t, s) {
var c, a = s ? r : n;
return t = t || function () {
}, i(e) ? e.length ? void (c = function (e) {
return function (n) {
var r, i;
n ? (t.apply(null, arguments), t = function () {
}) : (r = Array.prototype.slice.call(arguments, 1), (i = e.next()) ? r.push(c(i)) : r.push(t), a(function () {
e.apply(null, r)
}))
}
})(function (e) {
var t = function (n) {
function r() {
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))() : t() : (s = new Error("First argument to waterfall must be an array of functions"), t(s))
}
var t = gr, i = Array.isArray || function (e) {
return "[object Array]" === Object.prototype.toString.call(e)
};
e.exports ? e.exports = s : t.waterfall = s
}), Mo = " \n\t\r ", Po = "()[]{}%*-+~/#,:|.<>=!", Bo = "string", Fo = "whitespace", Uo = "data", Ho = "block-start",
Go = "block-end", jo = "variable-start", qo = "variable-end", Yo = "comment", Ko = "left-paren", Wo = "right-paren",
Vo = "left-bracket", $o = "right-bracket", Qo = "left-curly", zo = "right-curly", Xo = "operator", Zo = "comma",
Jo = "colon", ec = "tilde", tc = "pipe", nc = "float", rc = "boolean", ic = "none", sc = "symbol", ac = "regex";
function oc(e, t, n, r) {
return {type: e, value: t, lineno: n, colno: r}
}
var cc = 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, e = (t = t || {}).tags || {}, this.tags = {
BLOCK_START: e.blockStart || "{%",
BLOCK_END: e.blockEnd || "%}",
VARIABLE_START: e.variableStart || "{{",
VARIABLE_END: e.variableEnd || "}}",
COMMENT_START: e.commentStart || "{#",
COMMENT_END: e.commentEnd || "#}"
}, this.trimBlocks = !!t.trimBlocks, this.lstripBlocks = !!t.lstripBlocks
}
var t = e.prototype;
return t.nextToken = function () {
var t = this.lineno, n = this.colno;
if (this.in_code) {
var r = this.current();
if (this.isFinished()) return null;
if ('"' === r || "'" === r) return oc(Bo, this._parseString(r), t, n);
if (e = this._extract(Mo)) return oc(Fo, e, t, n);
if (e = (e = this._extractString(this.tags.BLOCK_END)) || 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())), oc(Go, e, t, n);
if (e = (e = this._extractString(this.tags.VARIABLE_END)) || this._extractString("-" + this.tags.VARIABLE_END)) return this.in_code = !1, oc(qo, 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() && -1 !== s.indexOf(this.current());) a += this.current(), this.forward();
return oc(ac, {body: i, flags: a}, t, n)
}
if (-1 !== Po.indexOf(r)) {
this.forward();
var o, c = ["==", "===", "!=", "!==", "<=", ">=", "//", "**"], u = r + this.current();
switch (-1 !== Ua.indexOf(c, u) && (this.forward(), -1 !== Ua.indexOf(c, (r = u) + this.current())) && (r = u + this.current(), this.forward()), r) {
case"(":
o = Ko;
break;
case")":
o = Wo;
break;
case"[":
o = Vo;
break;
case"]":
o = $o;
break;
case"{":
o = Qo;
break;
case"}":
o = zo;
break;
case",":
o = Zo;
break;
case":":
o = Jo;
break;
case"~":
o = ec;
break;
case"|":
o = tc;
break;
default:
o = Xo
}
return oc(o, r, t, n)
}
if ((e = this._extractUntil(Mo + Po)).match(/^[-+]?[0-9]+$/)) return "." === this.current() ? (this.forward(), c = this._extract("0123456789"), oc(nc, e + "." + c, t, n)) : oc("int", e, t, n);
if (e.match(/^(true|false)$/)) return oc(rc, e, t, n);
if ("none" === e) return oc(ic, e, t, n);
if ("null" === e) return oc(ic, e, t, n);
if (e) return oc(sc, e, t, n);
throw new Error("Unexpected value while parsing: " + e)
}
var h,
f = 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 = (e = this._extractString(this.tags.BLOCK_START + "-")) || this._extractString(this.tags.BLOCK_START)) return this.in_code = !0, oc(Ho, e, t, n);
if (e = (e = this._extractString(this.tags.VARIABLE_START + "-")) || this._extractString(this.tags.VARIABLE_START)) return this.in_code = !0, oc(jo, e, t, n);
var e = "", p = !1;
for (this._matches(this.tags.COMMENT_START) && (p = !0, e = this._extractString(this.tags.COMMENT_START)); null !== (h = this._extractUntil(f));) {
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) && 0 < this.colno && this.colno <= e.length) {
var d = e.slice(-this.colno);
if (/^\s+$/.test(d) && !(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 oc(p ? Yo : Uo, 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()
} 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) {
return (e = this.currentStr().match(e)) ? (this.forwardN(e[0].length), e) : 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 () {
var e;
this.index--, "\n" === this.current() ? (this.lineno--, e = this.src.lastIndexOf("\n", this.index - 1), this.colno = -1 === e ? this.index : this.index - e) : 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
}(), uc = {
lex: function (e, t) {
return new cc(e, t)
},
TOKEN_STRING: Bo,
TOKEN_WHITESPACE: Fo,
TOKEN_DATA: Uo,
TOKEN_BLOCK_START: Ho,
TOKEN_BLOCK_END: Go,
TOKEN_VARIABLE_START: jo,
TOKEN_VARIABLE_END: qo,
TOKEN_COMMENT: Yo,
TOKEN_LEFT_PAREN: Ko,
TOKEN_RIGHT_PAREN: Wo,
TOKEN_LEFT_BRACKET: Vo,
TOKEN_RIGHT_BRACKET: $o,
TOKEN_LEFT_CURLY: Qo,
TOKEN_RIGHT_CURLY: zo,
TOKEN_OPERATOR: Xo,
TOKEN_COMMA: Zo,
TOKEN_COLON: Jo,
TOKEN_TILDE: ec,
TOKEN_PIPE: tc,
TOKEN_INT: "int",
TOKEN_FLOAT: nc,
TOKEN_BOOLEAN: rc,
TOKEN_NONE: ic,
TOKEN_SYMBOL: sc,
TOKEN_SPECIAL: "special",
TOKEN_REGEX: ac
};
function lc(e, t) {
for (var s, 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, "symbol" == typeof (s = function (e) {
if ("object" != typeof e || null === e) return e;
var n = e[Symbol.toPrimitive];
if (void 0 === n) return String(e);
if ("object" != typeof (n = n.call(e, "string"))) return n;
throw new TypeError("@@toPrimitive must return a primitive value.")
}(r.key)) ? s : String(s), r)
}
}
function hc(e, t, n) {
return t && lc(e.prototype, t), n && lc(e, n), Object.defineProperty(e, "prototype", {writable: !1}), e
}
function fc(e, t) {
e.prototype = Object.create(t.prototype), pc(e.prototype.constructor = e, t)
}
function pc(e, t) {
return (pc = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (e, t) {
return e.__proto__ = t, e
})(e, t)
}
function dc(e, t, n) {
n = n || {}, Ua.keys(n).forEach(function (t) {
n[t] = function (e, t) {
return "function" != typeof e || "function" != typeof t ? t : function () {
var n = this.parent, r = (this.parent = e, 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 fc(n, e), hc(n, [{
key: "typename", get: function () {
return t
}
}]), n
}(e);
return Ua._assign(r.prototype, n), r
}
var mc = 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"), dc(this, e, t)
}, hc(e, [{
key: "typename", get: function () {
return this.constructor.name
}
}]), e
}(), _c = function (e) {
function t() {
var n;
return (n = e.call(this) || this).init.apply(n, arguments), n
}
return fc(t, e), t.prototype.init = function () {
}, t.extend = function (e, t) {
return "object" == typeof e && (t = e, e = "anonymous"), dc(this, e, t)
}, hc(t, [{
key: "typename", get: function () {
return this.constructor.name
}
}]), t
}(ho), Ec = {Obj: mc, EmitterObj: _c};
function Tc(e, t) {
for (var s, 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, "symbol" == typeof (s = function (e) {
if ("object" != typeof e || null === e) return e;
var n = e[Symbol.toPrimitive];
if (void 0 === n) return String(e);
if ("object" != typeof (n = n.call(e, "string"))) return n;
throw new TypeError("@@toPrimitive must return a primitive value.")
}(r.key)) ? s : String(s), r)
}
}
function Ac(e, t, n) {
return t && Tc(e.prototype, t), n && Tc(e, n), Object.defineProperty(e, "prototype", {writable: !1}), e
}
function gc(e, t) {
e.prototype = Object.create(t.prototype), vc(e.prototype.constructor = e, t)
}
function vc(e, t) {
return (vc = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (e, t) {
return e.__proto__ = t, e
})(e, t)
}
function yc(e, t, n) {
e instanceof t && n.push(e), e instanceof Sc && e.findAll(t, n)
}
var Sc = function (e) {
function t() {
return e.apply(this, arguments) || this
}
gc(t, e);
var n = t.prototype;
return n.init = function (e, t) {
for (var n = arguments, r = this, i = arguments.length, s = new Array(2 < i ? 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) {
r[e] = t = void 0 === (t = n[t + 2]) ? null : t
})
}, n.findAll = function (e, t) {
var n = this;
return t = t || [], this instanceof Nc ? this.children.forEach(function (n) {
return yc(n, e, t)
}) : this.fields.forEach(function (r) {
return yc(n[r], e, t)
}), t
}, n.iterFields = function (e) {
var t = this;
this.fields.forEach(function (n) {
e(t[n], n)
})
}, t
}(Ec.Obj), Cc = function (e) {
function t() {
return e.apply(this, arguments) || this
}
return gc(t, e), Ac(t, [{
key: "typename", get: function () {
return "Value"
}
}, {
key: "fields", get: function () {
return ["value"]
}
}]), t
}(Sc), Nc = function (e) {
function t() {
return e.apply(this, arguments) || this
}
gc(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)
}, Ac(t, [{
key: "typename", get: function () {
return "NodeList"
}
}, {
key: "fields", get: function () {
return ["children"]
}
}]), t
}(Sc), bc = Nc.extend("Root"), Ic = Cc.extend("Literal"), Oc = Cc.extend("Symbol"), kc = Nc.extend("Group"),
Lc = Nc.extend("Array"), Dc = Sc.extend("Pair", {fields: ["key", "value"]}), Rc = Nc.extend("Dict"),
wc = Sc.extend("LookupVal", {fields: ["target", "val"]}), xc = Sc.extend("If", {fields: ["cond", "body", "else_"]}),
Mc = xc.extend("IfAsync"), Pc = Sc.extend("InlineIf", {fields: ["cond", "body", "else_"]}),
Bc = Sc.extend("For", {fields: ["arr", "name", "body", "else_"]}), Fc = Bc.extend("AsyncEach"),
Uc = Bc.extend("AsyncAll"), Hc = Sc.extend("Macro", {fields: ["name", "args", "body"]}), Gc = Hc.extend("Caller"),
jc = Sc.extend("Import", {fields: ["template", "target", "withContext"]}), qc = function (e) {
function t() {
return e.apply(this, arguments) || this
}
return gc(t, e), t.prototype.init = function (t, n, r, i, s) {
e.prototype.init.call(this, t, n, r, i || new Nc, s)
}, Ac(t, [{
key: "typename", get: function () {
return "FromImport"
}
}, {
key: "fields", get: function () {
return ["template", "names", "withContext"]
}
}]), t
}(Sc), Yc = Sc.extend("FunCall", {fields: ["name", "args"]}), Kc = Yc.extend("Filter"),
Wc = Kc.extend("FilterAsync", {fields: ["name", "args", "symbol"]}), Vc = Rc.extend("KeywordArgs"),
$c = Sc.extend("Block", {fields: ["name", "body"]}), Qc = Sc.extend("Super", {fields: ["blockName", "symbol"]}),
zc = Sc.extend("TemplateRef", {fields: ["template"]}).extend("Extends"),
Xc = Sc.extend("Include", {fields: ["template", "ignoreMissing"]}),
Zc = Sc.extend("Set", {fields: ["targets", "value"]}),
Jc = Sc.extend("Switch", {fields: ["expr", "cases", "default"]}),
eu = Sc.extend("Case", {fields: ["cond", "body"]}), tu = Nc.extend("Output"),
nu = Sc.extend("Capture", {fields: ["body"]}), ru = Ic.extend("TemplateData"),
iu = Sc.extend("UnaryOp", {fields: ["target"]}), su = Sc.extend("BinOp", {fields: ["left", "right"]}),
au = su.extend("In"), ou = su.extend("Is"), cu = su.extend("Or"), uu = su.extend("And"), lu = iu.extend("Not"),
hu = su.extend("Add"), fu = su.extend("Concat"), pu = su.extend("Sub"), du = su.extend("Mul"),
mu = su.extend("Div"), _u = su.extend("FloorDiv"), Eu = su.extend("Mod"), Tu = su.extend("Pow"),
Au = iu.extend("Neg"), gu = iu.extend("Pos"), vu = Sc.extend("Compare", {fields: ["expr", "ops"]}),
yu = Sc.extend("CompareOperand", {fields: ["expr", "type"]}), Su = Sc.extend("CallExtension", {
init: function (e, t, n, r) {
this.parent(), this.extName = e.__name || e, this.prop = t, this.args = n || new Nc, this.contentArgs = r || [], this.autoescape = e.autoescape
}, fields: ["extName", "prop", "args", "contentArgs"]
}), Cu = Su.extend("CallExtensionAsync");
function Nu(e, t, n) {
var r = e.split("\n");
r.forEach(function (e, i) {
e && (n && 0 < i || !n) && process.stdout.write(" ".repeat(t)), i = i === r.length - 1 ? "" : "\n", process.stdout.write(e + i)
})
}
var bu = {
Node: Sc,
Root: bc,
NodeList: Nc,
Value: Cc,
Literal: Ic,
Symbol: Oc,
Group: kc,
Array: Lc,
Pair: Dc,
Dict: Rc,
Output: tu,
Capture: nu,
TemplateData: ru,
If: xc,
IfAsync: Mc,
InlineIf: Pc,
For: Bc,
AsyncEach: Fc,
AsyncAll: Uc,
Macro: Hc,
Caller: Gc,
Import: jc,
FromImport: qc,
FunCall: Yc,
Filter: Kc,
FilterAsync: Wc,
KeywordArgs: Vc,
Block: $c,
Super: Qc,
Extends: zc,
Include: Xc,
Set: Zc,
Switch: Jc,
Case: eu,
LookupVal: wc,
BinOp: su,
In: au,
Is: ou,
Or: cu,
And: uu,
Not: lu,
Add: hu,
Concat: fu,
Sub: pu,
Mul: du,
Div: mu,
FloorDiv: _u,
Mod: Eu,
Pow: Tu,
Neg: Au,
Pos: gu,
Compare: vu,
CompareOperand: yu,
CallExtension: Su,
CallExtensionAsync: Cu,
printNodes: function e(t, n) {
var r, i;
n = n || 0, Nu(t.typename + ": ", n), t instanceof Nc ? (Nu("\n"), t.children.forEach(function (t) {
e(t, n + 2)
})) : t instanceof Su ? (Nu(t.extName + "." + t.prop + "\n"), t.args && e(t.args, n + 2), t.contentArgs && t.contentArgs.forEach(function (t) {
e(t, n + 2)
})) : (r = [], i = null, t.iterFields(function (e, t) {
e instanceof Sc ? r.push([t, e]) : (i = i || {})[t] = e
}), i ? Nu(JSON.stringify(i, null, 2) + "\n", null, !0) : Nu("\n"), r.forEach(function (t) {
var r = t[0], t = t[1];
Nu("[" + r + "] =>", n + 2), e(t, n + 4)
}))
}
};
function Iu(e, t) {
return (Iu = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (e, t) {
return e.__proto__ = t, e
})(e, t)
}
bu.Node, bu.Root, bu.NodeList, bu.Value, bu.Literal, bu.Group, bu.Pair, bu.Dict, bu.Output, bu.Capture, bu.TemplateData, bu.If, bu.IfAsync, bu.InlineIf, bu.For, bu.AsyncEach, bu.AsyncAll, bu.Macro, bu.Caller, bu.Import, bu.FromImport, bu.FunCall, bu.Filter, bu.FilterAsync, bu.KeywordArgs, bu.Block, bu.Super, bu.Extends, bu.Include, bu.Switch, bu.Case, bu.LookupVal, bu.BinOp, bu.In, bu.Is, bu.Or, bu.And, bu.Not, bu.Add, bu.Concat, bu.Sub, bu.Mul, bu.Div, bu.FloorDiv, bu.Mod, bu.Pow, bu.Neg, bu.Pos, bu.Compare, bu.CompareOperand, bu.CallExtension, bu.CallExtensionAsync, bu.printNodes;
var Ou = function (e) {
var n;
function r() {
return e.apply(this, arguments) || this
}
n = e, (t = r).prototype = Object.create(n.prototype), Iu(t.prototype.constructor = t, n);
var t = r.prototype;
return t.init = function (e) {
this.tokens = e, this.peeked = null, this.breakOnBlocks = null, this.dropLeadingWhitespace = !1, this.extensions = []
}, t.nextToken = function (e) {
var t;
if (this.peeked) {
if (e || this.peeked.type !== uc.TOKEN_WHITESPACE) return t = this.peeked, this.peeked = null, t;
this.peeked = null
}
if (t = this.tokens.nextToken(), !e) for (; t && t.type === uc.TOKEN_WHITESPACE;) t = this.tokens.nextToken();
return t
}, t.peekToken = function () {
return this.peeked = this.peeked || this.nextToken(), this.peeked
}, t.pushToken = function (e) {
if (this.peeked) throw new Error("pushToken: can only push one token on between reads");
this.peeked = e
}, t.error = function (e, t, n) {
var r;
return void 0 !== t && void 0 !== n || (t = (r = this.peekToken() || {}).lineno, n = r.colno), void 0 !== t && (t += 1), void 0 !== n && (n += 1), new Ua.TemplateError(e, t, n)
}, t.fail = function (e, t, n) {
throw this.error(e, t, n)
}, t.skip = function (e) {
var t = this.nextToken();
return !(!t || t.type !== e) || (this.pushToken(t), !1)
}, t.expect = function (e) {
var t = this.nextToken();
return t.type !== e && this.fail("expected " + e + ", got " + t.type, t.lineno, t.colno), t
}, t.skipValue = function (e, t) {
var n = this.nextToken();
return !(!n || n.type !== e || n.value !== t) || (this.pushToken(n), !1)
}, t.skipSymbol = function (e) {
return this.skipValue(uc.TOKEN_SYMBOL, e)
}, t.advanceAfterBlockEnd = function (e) {
var t;
return e || ((t = this.peekToken()) || this.fail("unexpected end of file"), t.type !== uc.TOKEN_SYMBOL && this.fail("advanceAfterBlockEnd: expected symbol token or explicit name to be passed"), e = this.nextToken().value), (t = this.nextToken()) && t.type === uc.TOKEN_BLOCK_END ? "-" === t.value.charAt(0) && (this.dropLeadingWhitespace = !0) : this.fail("expected block end in " + e + " statement"), t
}, t.advanceAfterVariableEnd = function () {
var e = this.nextToken();
e && e.type === uc.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"))
}, t.parseFor = function () {
var e, t, n = this.peekToken();
if (this.skipSymbol("for") ? (e = new bu.For(n.lineno, n.colno), t = "endfor") : this.skipSymbol("asyncEach") ? (e = new bu.AsyncEach(n.lineno, n.colno), t = "endeach") : this.skipSymbol("asyncAll") ? (e = new bu.AsyncAll(n.lineno, n.colno), t = "endall") : this.fail("parseFor: expected for{Async}", n.lineno, n.colno), e.name = this.parsePrimary(), e.name instanceof bu.Symbol || this.fail("parseFor: variable name expected for loop"), this.peekToken().type === uc.TOKEN_COMMA) {
var r = e.name;
for (e.name = new bu.Array(r.lineno, r.colno), e.name.addChild(r); this.skip(uc.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
}, t.parseMacro = function () {
var e = this.peekToken(), t = (this.skipSymbol("macro") || this.fail("expected macro"), this.parsePrimary(!0)),
n = this.parseSignature(), t = new bu.Macro(e.lineno, e.colno, t, n);
return this.advanceAfterBlockEnd(e.value), t.body = this.parseUntilBlocks("endmacro"), this.advanceAfterBlockEnd(), t
}, t.parseCall = function () {
var e = this.peekToken(),
t = (this.skipSymbol("call") || this.fail("expected call"), this.parseSignature(!0) || new bu.NodeList),
n = this.parsePrimary(), r = (this.advanceAfterBlockEnd(e.value), this.parseUntilBlocks("endcall")),
i = (this.advanceAfterBlockEnd(), new bu.Symbol(e.lineno, e.colno, "caller")),
t = new bu.Caller(e.lineno, e.colno, i, t, r);
return (r = n.args.children)[r.length - 1] instanceof bu.KeywordArgs || r.push(new bu.KeywordArgs), r[r.length - 1].addChild(new bu.Pair(e.lineno, e.colno, i, t)), new bu.Output(e.lineno, e.colno, [n])
}, t.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
}, t.parseImport = function () {
var e = this.peekToken(),
t = (this.skipSymbol("import") || this.fail("parseImport: expected import", e.lineno, e.colno), this.parseExpression()),
n = (this.skipSymbol("as") || this.fail('parseImport: expected "as" keyword', e.lineno, e.colno), this.parseExpression()),
r = this.parseWithContext(), t = new bu.Import(e.lineno, e.colno, t, n, r);
return this.advanceAfterBlockEnd(e.value), t
}, t.parseFrom = function () {
var e = this.peekToken(),
t = (this.skipSymbol("from") || this.fail("parseFrom: expected from"), this.parseExpression());
this.skipSymbol("import") || this.fail("parseFrom: expected import", e.lineno, e.colno);
for (var n, r = new bu.NodeList; ;) {
var a, i = this.peekToken();
if (i.type === uc.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
}
0 < r.children.length && !this.skip(uc.TOKEN_COMMA) && this.fail("parseFrom: expected comma", e.lineno, e.colno), "_" === (i = this.parsePrimary()).value.charAt(0) && this.fail("parseFrom: names starting with an underscore cannot be imported", i.lineno, i.colno), this.skipSymbol("as") ? (a = this.parsePrimary(), r.addChild(new bu.Pair(i.lineno, i.colno, i, a))) : r.addChild(i), n = this.parseWithContext()
}
return new bu.FromImport(e.lineno, e.colno, t, r, n)
}, t.parseBlock = function () {
var e = this.peekToken(),
t = (this.skipSymbol("block") || this.fail("parseBlock: expected block", e.lineno, e.colno), new bu.Block(e.lineno, e.colno));
return t.name = this.parsePrimary(), t.name instanceof bu.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), (e = this.peekToken()) || this.fail("parseBlock: expected endblock, got end of file"), this.advanceAfterBlockEnd(e.value), t
}, t.parseExtends = function () {
var e = "extends", t = this.peekToken();
return this.skipSymbol(e) || this.fail("parseTemplateRef: expected " + e), (e = new bu.Extends(t.lineno, t.colno)).template = this.parseExpression(), this.advanceAfterBlockEnd(t.value), e
}, t.parseInclude = function () {
var e = "include", t = this.peekToken();
return this.skipSymbol(e) || this.fail("parseInclude: expected " + e), (e = new bu.Include(t.lineno, t.colno)).template = this.parseExpression(), this.skipSymbol("ignore") && this.skipSymbol("missing") && (e.ignoreMissing = !0), this.advanceAfterBlockEnd(t.value), e
}, t.parseIf = function () {
var e, t = this.peekToken();
switch (this.skipSymbol("if") || this.skipSymbol("elif") || this.skipSymbol("elseif") ? e = new bu.If(t.lineno, t.colno) : this.skipSymbol("ifAsync") ? e = new bu.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"), (t = this.peekToken()) && t.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
}, t.parseSet = function () {
var e = this.peekToken();
this.skipSymbol("set") || this.fail("parseSet: expected set", e.lineno, e.colno);
for (var t, n = new bu.Set(e.lineno, e.colno, []); (t = this.parsePrimary()) && (n.targets.push(t), this.skip(uc.TOKEN_COMMA));) ;
return this.skipValue(uc.TOKEN_OPERATOR, "=") ? (n.value = this.parseExpression(), this.advanceAfterBlockEnd(e.value)) : this.skip(uc.TOKEN_BLOCK_END) ? (n.body = new bu.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
}, t.parseSwitch = function () {
var e = "switch", t = "endswitch", n = "case", r = "default", i = this.peekToken(),
s = (this.skipSymbol(e) || this.skipSymbol(n) || this.skipSymbol(r) || this.fail('parseSwitch: expected "switch," "case" or "default"', i.lineno, i.colno), this.parseExpression());
this.advanceAfterBlockEnd(e), this.parseUntilBlocks(n, r, t);
var a, o = this.peekToken(), c = [];
do {
this.skipSymbol(n);
var u = this.parseExpression(), l = (this.advanceAfterBlockEnd(e), this.parseUntilBlocks(n, r, t))
} while (c.push(new bu.Case(o.line, o.col, u, l)), (o = this.peekToken()) && 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 bu.Switch(i.lineno, i.colno, s, c, a)
}, t.parseStatement = function () {
var e = this.peekToken();
if (e.type !== uc.TOKEN_SYMBOL && this.fail("tag name expected", e.lineno, e.colno), this.breakOnBlocks && -1 !== Ua.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 !== Ua.indexOf(n.tags || [], e.value)) return n.parse(this, bu, uc)
}
this.fail("unknown block tag: " + e.value, e.lineno, e.colno)
}
}, t.parseRaw = function (e) {
for (var t = "end" + (e = e || "raw"), n = new RegExp("([\\s\\S]*?){%\\s*(" + e + "|" + t + ")\\s*(?=%})%}"), r = 1, i = "", a = this.advanceAfterBlockEnd(); (s = this.tokens._extractRegex(n)) && 0 < r;) {
var o = s[0], c = s[1], s = s[2];
s === e ? r += 1 : s === t && --r, 0 === r ? (i += c, this.tokens.backN(o.length - c.length)) : i += o
}
return new bu.Output(a.lineno, a.colno, [new bu.TemplateData(a.lineno, a.colno, i)])
}, t.parsePostfix = function (e) {
for (var t, n = this.peekToken(); n;) {
if (n.type === uc.TOKEN_LEFT_PAREN) e = new bu.FunCall(n.lineno, n.colno, e, this.parseSignature()); else if (n.type === uc.TOKEN_LEFT_BRACKET) 1 < (t = this.parseAggregate()).children.length && this.fail("invalid index"), e = new bu.LookupVal(n.lineno, n.colno, e, t.children[0]); else {
if (n.type !== uc.TOKEN_OPERATOR || "." !== n.value) break;
this.nextToken();
var r = this.nextToken();
r.type !== uc.TOKEN_SYMBOL && this.fail("expected name as lookup value, got " + r.value, r.lineno, r.colno), t = new bu.Literal(r.lineno, r.colno, r.value), e = new bu.LookupVal(n.lineno, n.colno, e, t)
}
n = this.peekToken()
}
return e
}, t.parseExpression = function () {
return this.parseInlineIf()
}, t.parseInlineIf = function () {
var t, n, e = this.parseOr();
return this.skipSymbol("if") && (t = this.parseOr(), n = e, (e = new bu.InlineIf(e.lineno, e.colno)).body = n, e.cond = t, this.skipSymbol("else") ? e.else_ = this.parseOr() : e.else_ = null), e
}, t.parseOr = function () {
for (var e = this.parseAnd(); this.skipSymbol("or");) var t = this.parseAnd(), e = new bu.Or(e.lineno, e.colno, e, t);
return e
}, t.parseAnd = function () {
for (var e = this.parseNot(); this.skipSymbol("and");) var t = this.parseNot(), e = new bu.And(e.lineno, e.colno, e, t);
return e
}, t.parseNot = function () {
var e = this.peekToken();
return this.skipSymbol("not") ? new bu.Not(e.lineno, e.colno, this.parseNot()) : this.parseIn()
}, t.parseIn = function () {
for (var e = this.parseIs(); ;) {
var t = this.nextToken();
if (!t) break;
var n = t.type === uc.TOKEN_SYMBOL && "not" === t.value;
if (n || this.pushToken(t), !this.skipSymbol("in")) {
n && this.pushToken(t);
break
}
t = this.parseIs(), e = new bu.In(e.lineno, e.colno, e, t), n && (e = new bu.Not(e.lineno, e.colno, e))
}
return e
}, t.parseIs = function () {
var t, n, e = this.parseCompare();
return this.skipSymbol("is") && (t = this.skipSymbol("not"), n = this.parseCompare(), e = new bu.Is(e.lineno, e.colno, e, n), t) ? new bu.Not(e.lineno, e.colno, e) : e
}, t.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 bu.CompareOperand(r.lineno, r.colno, this.parseConcat(), r.value))
}
return n.length ? new bu.Compare(n[0].lineno, n[0].colno, t, n) : t
}, t.parseConcat = function () {
for (var e = this.parseAdd(); this.skipValue(uc.TOKEN_TILDE, "~");) var t = this.parseAdd(), e = new bu.Concat(e.lineno, e.colno, e, t);
return e
}, t.parseAdd = function () {
for (var e = this.parseSub(); this.skipValue(uc.TOKEN_OPERATOR, "+");) var t = this.parseSub(), e = new bu.Add(e.lineno, e.colno, e, t);
return e
}, t.parseSub = function () {
for (var e = this.parseMul(); this.skipValue(uc.TOKEN_OPERATOR, "-");) var t = this.parseMul(), e = new bu.Sub(e.lineno, e.colno, e, t);
return e
}, t.parseMul = function () {
for (var e = this.parseDiv(); this.skipValue(uc.TOKEN_OPERATOR, "*");) var t = this.parseDiv(), e = new bu.Mul(e.lineno, e.colno, e, t);
return e
}, t.parseDiv = function () {
for (var e = this.parseFloorDiv(); this.skipValue(uc.TOKEN_OPERATOR, "/");) var t = this.parseFloorDiv(), e = new bu.Div(e.lineno, e.colno, e, t);
return e
}, t.parseFloorDiv = function () {
for (var e = this.parseMod(); this.skipValue(uc.TOKEN_OPERATOR, "//");) var t = this.parseMod(), e = new bu.FloorDiv(e.lineno, e.colno, e, t);
return e
}, t.parseMod = function () {
for (var e = this.parsePow(); this.skipValue(uc.TOKEN_OPERATOR, "%");) var t = this.parsePow(), e = new bu.Mod(e.lineno, e.colno, e, t);
return e
}, t.parsePow = function () {
for (var e = this.parseUnary(); this.skipValue(uc.TOKEN_OPERATOR, "**");) var t = this.parseUnary(), e = new bu.Pow(e.lineno, e.colno, e, t);
return e
}, t.parseUnary = function (e) {
var n = this.peekToken(),
n = this.skipValue(uc.TOKEN_OPERATOR, "-") ? new bu.Neg(n.lineno, n.colno, this.parseUnary(!0)) : this.skipValue(uc.TOKEN_OPERATOR, "+") ? new bu.Pos(n.lineno, n.colno, this.parseUnary(!0)) : this.parsePrimary();
return e ? n : this.parseFilter(n)
}, t.parsePrimary = function (e) {
var t, n = this.nextToken();
if (n ? n.type === uc.TOKEN_STRING ? t = n.value : n.type === uc.TOKEN_INT ? t = parseInt(n.value, 10) : n.type === uc.TOKEN_FLOAT ? t = parseFloat(n.value) : n.type === uc.TOKEN_BOOLEAN ? "true" === n.value ? t = !0 : "false" === n.value ? t = !1 : this.fail("invalid boolean: " + n.value, n.lineno, n.colno) : n.type === uc.TOKEN_NONE ? t = null : n.type === uc.TOKEN_REGEX && (t = new RegExp(n.value.body, n.value.flags)) : this.fail("expected expression, got end of file"), t = void 0 !== t ? new bu.Literal(n.lineno, n.colno, t) : n.type === uc.TOKEN_SYMBOL ? new bu.Symbol(n.lineno, n.colno, n.value) : (this.pushToken(n), this.parseAggregate()), t = e ? t : this.parsePostfix(t)) return t;
throw this.error("unexpected token: " + n.value, n.lineno, n.colno)
}, t.parseFilterName = function () {
for (var e = this.expect(uc.TOKEN_SYMBOL), t = e.value; this.skipValue(uc.TOKEN_OPERATOR, ".");) t += "." + this.expect(uc.TOKEN_SYMBOL).value;
return new bu.Symbol(e.lineno, e.colno, t)
}, t.parseFilterArgs = function (e) {
return this.peekToken().type === uc.TOKEN_LEFT_PAREN ? this.parsePostfix(e).args.children : []
}, t.parseFilter = function (e) {
for (; this.skip(uc.TOKEN_PIPE);) {
var t = this.parseFilterName();
e = new bu.Filter(t.lineno, t.colno, t, new bu.NodeList(t.lineno, t.colno, [e].concat(this.parseFilterArgs(e))))
}
return e
}, t.parseFilterStatement = function () {
var e = this.peekToken(),
t = (this.skipSymbol("filter") || this.fail("parseFilterStatement: expected filter"), this.parseFilterName()),
n = this.parseFilterArgs(t),
e = (this.advanceAfterBlockEnd(e.value), new bu.Capture(t.lineno, t.colno, this.parseUntilBlocks("endfilter"))),
e = (this.advanceAfterBlockEnd(), new bu.Filter(t.lineno, t.colno, t, new bu.NodeList(t.lineno, t.colno, [e].concat(n))));
return new bu.Output(t.lineno, t.colno, [e])
}, t.parseAggregate = function () {
var e, t = this.nextToken();
switch (t.type) {
case uc.TOKEN_LEFT_PAREN:
e = new bu.Group(t.lineno, t.colno);
break;
case uc.TOKEN_LEFT_BRACKET:
e = new bu.Array(t.lineno, t.colno);
break;
case uc.TOKEN_LEFT_CURLY:
e = new bu.Dict(t.lineno, t.colno);
break;
default:
return null
}
for (; ;) {
var i, n = this.peekToken().type;
if (n === uc.TOKEN_RIGHT_PAREN || n === uc.TOKEN_RIGHT_BRACKET || n === uc.TOKEN_RIGHT_CURLY) {
this.nextToken();
break
}
0 < e.children.length && (this.skip(uc.TOKEN_COMMA) || this.fail("parseAggregate: expected comma after expression", t.lineno, t.colno)), e instanceof bu.Dict ? (n = this.parsePrimary(), this.skip(uc.TOKEN_COLON) || this.fail("parseAggregate: expected colon after dict key", t.lineno, t.colno), i = this.parseExpression(), e.addChild(new bu.Pair(n.lineno, n.colno, n, i))) : (n = this.parseExpression(), e.addChild(n))
}
return e
}, t.parseSignature = function (e, t) {
var n = this.peekToken();
if (!t && n.type !== uc.TOKEN_LEFT_PAREN) {
if (e) return null;
this.fail("expected arguments", n.lineno, n.colno)
}
n.type === uc.TOKEN_LEFT_PAREN && (n = this.nextToken());
for (var a, r = new bu.NodeList(n.lineno, n.colno), i = new bu.KeywordArgs(n.lineno, n.colno), s = !1; ;) {
if (n = this.peekToken(), !t && n.type === uc.TOKEN_RIGHT_PAREN) {
this.nextToken();
break
}
if (t && n.type === uc.TOKEN_BLOCK_END) break;
s && !this.skip(uc.TOKEN_COMMA) ? this.fail("parseSignature: expected comma after expression", n.lineno, n.colno) : (a = this.parseExpression(), this.skipValue(uc.TOKEN_OPERATOR, "=") ? i.addChild(new bu.Pair(a.lineno, a.colno, a, this.parseExpression())) : r.addChild(a)), s = !0
}
return i.children.length && r.addChild(i), r
}, t.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
}, t.parseNodes = function () {
for (var e, t = []; e = this.nextToken();) if (e.type === uc.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 === uc.TOKEN_BLOCK_START && "-" === i.charAt(i.length - 1) || r.type === uc.TOKEN_VARIABLE_START && "-" === i.charAt(this.tokens.tags.VARIABLE_START.length) || r.type === uc.TOKEN_COMMENT && "-" === i.charAt(this.tokens.tags.COMMENT_START.length)) && (n = n.replace(/\s*$/, "")), t.push(new bu.Output(e.lineno, e.colno, [new bu.TemplateData(e.lineno, e.colno, n)]))
} else if (e.type === uc.TOKEN_BLOCK_START) {
if (this.dropLeadingWhitespace = !1, !(r = this.parseStatement())) break;
t.push(r)
} else e.type === uc.TOKEN_VARIABLE_START ? (i = this.parseExpression(), this.dropLeadingWhitespace = !1, this.advanceAfterVariableEnd(), t.push(new bu.Output(e.lineno, e.colno, [i]))) : e.type === uc.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
}, t.parse = function () {
return new bu.NodeList(0, 0, this.parseNodes())
}, t.parseAsRoot = function () {
return new bu.Root(0, 0, this.parseNodes())
}, r
}(Ec.Obj), ku = {
parse: function (e, t, n) {
return e = new Ou(uc.lex(e, n)), void 0 !== t && (e.extensions = t), e.parseAsRoot()
}, Parser: Ou
}, Lu = 0;
function Du() {
return "hole_" + Lu++
}
function Ru(e, t) {
for (var n = null, r = 0; r < e.length; r++) {
var i = t(e[r]);
i !== e[r] && ((n = n || e.slice())[r] = i)
}
return n || e
}
function wu(e, t, n) {
if (!(e instanceof bu.Node)) return e;
if (!n) {
var r = t(e);
if (r && r !== e) return r
}
var a;
return e instanceof bu.NodeList ? (r = Ru(e.children, function (e) {
return wu(e, t, n)
})) !== e.children && (e = new bu[e.typename](e.lineno, e.colno, r)) : e instanceof bu.CallExtension ? (r = wu(e.args, t, n), a = Ru(e.contentArgs, function (e) {
return wu(e, t, n)
}), r === e.args && a === e.contentArgs || (e = new bu[e.typename](e.extName, e.prop, r, a))) : (a = Ru(r = e.fields.map(function (t) {
return e[t]
}), function (e) {
return wu(e, t, n)
})) !== r && (e = new bu[e.typename](e.lineno, e.colno), a.forEach(function (t, n) {
e[e.fields[n]] = t
})), n && t(e) || e
}
function xu(e, t) {
return wu(e, t, !0)
}
function Mu(e, t, n) {
var r = [], i = xu(n ? e[n] : e, function (e) {
var n;
return e instanceof bu.Block ? e : ((e instanceof bu.Filter && -1 !== Ua.indexOf(t, e.name.value) || e instanceof bu.CallExtensionAsync) && (n = new bu.Symbol(e.lineno, e.colno, Du()), r.push(new bu.FilterAsync(e.lineno, e.colno, e.name, e.args, n))), n)
});
return n ? e[n] = i : e = i, r.length ? (r.push(e), new bu.NodeList(e.lineno, e.colno, r)) : e
}
function Pu(e, t) {
return function (e) {
return xu(e, function (e) {
if (e instanceof bu.If || e instanceof bu.For) {
var t = !1;
if (wu(e, function (e) {
if (e instanceof bu.FilterAsync || e instanceof bu.IfAsync || e instanceof bu.AsyncEach || e instanceof bu.AsyncAll || e instanceof bu.CallExtensionAsync) return t = !0, e
}), t) return e instanceof bu.If ? new bu.IfAsync(e.lineno, e.colno, e.cond, e.body, e.else_) : e instanceof bu.For && !(e instanceof bu.AsyncAll) ? new bu.AsyncEach(e.lineno, e.colno, e.arr, e.name, e.body, e.else_) : void 0
}
})
}(function (e) {
return wu(e, function (e) {
var t, n;
e instanceof bu.Block && (t = !1, n = Du(), e.body = wu(e.body, function (e) {
if (e instanceof bu.FunCall && "super" === e.name.value) return t = !0, new bu.Symbol(e.lineno, e.colno, n)
}), t) && e.body.children.unshift(new bu.Super(0, 0, e.name, new bu.Symbol(0, 0, n)))
})
}(function (e, t) {
return xu(e, function (e) {
return e instanceof bu.Output ? Mu(e, t) : e instanceof bu.Set ? Mu(e, t, "value") : e instanceof bu.For ? Mu(e, t, "arr") : e instanceof bu.If ? Mu(e, t, "cond") : e instanceof bu.CallExtension ? Mu(e, t, "args") : void 0
})
}(e, t)))
}
var Bu = {
transform: function (e, t) {
return Pu(e, t || [])
}
}, Fu = Array.from, Uu = "function" == typeof Symbol && Symbol.iterator && "function" == typeof Fu, Hu = 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) {
return void 0 !== (e = this.variables[e]) ? e : 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) {
return t = t && this.isolateWrites ? void 0 : this.parent, void 0 !== this.variables[e] ? this : t && t.resolve(e)
}, t.push = function (t) {
return new e(this, t)
}, t.pop = function () {
return this.parent
}, e
}();
function Gu(e) {
return e && Object.prototype.hasOwnProperty.call(e, "__keywords")
}
function ju(e) {
var t = e.length;
return 0 === t ? 0 : Gu(e[t - 1]) ? t - 1 : t
}
function qu(e) {
if ("string" != typeof e) return e;
this.val = e, this.val = e, Object.defineProperty(this, "length", {writable: !0, configurable: !0, value: e.length})
}
qu.prototype = Object.create(String.prototype, {
length: {
writable: !0,
configurable: !0,
value: 0
}
}), qu.prototype.valueOf = function () {
return this.val
}, qu.prototype.toString = function () {
return this.val
};
var Yu = {
Frame: Hu, 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 o = ju(i), c = function () {
var t = i.length;
return t && Gu(t = i[t - 1]) ? t : {}
}();
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) {
for (var a = i.slice(0, o), u = o; u < e.length; u++) {
var l = e[u];
a.push(c[l]), delete c[l]
}
a.push(c)
} else a = i;
return n.apply(this, a)
}
}, makeKeywordArgs: function (e) {
return e.__keywords = !0, e
}, numArgs: ju, suppressValue: function (e, t) {
return e = null != e ? e : "", !t || e instanceof qu ? e : Ua.escape(e.toString())
}, ensureDefined: function (e, t, n) {
if (null == e) throw new Ua.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) {
return void 0 !== (t = t.lookup(n)) ? t : 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 Ua.TemplateError(e, t, n)
}, isArray: Ua.isArray, keys: Ua.keys, SafeString: qu, copySafeness: function (e, t) {
return e instanceof qu ? new qu(t) : t.toString()
}, markSafe: function (e) {
var t = typeof e;
return "string" == t ? new qu(e) : "function" != t ? e : function (t) {
var n = e.apply(this, arguments);
return "string" == typeof n ? new qu(n) : n
}
}, asyncEach: function (e, t, n, r) {
var i;
Ua.isArray(e) ? (i = e.length, Ua.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)) : Ua.asyncFor(e, function (e, t, r, i, s) {
n(e, t, r, i, s)
}, r)
}, asyncAll: function (e, t, n, r) {
var a = 0;
function o(e, t) {
a++, s[e] = t, a === i && r(null, s.join(""))
}
if (Ua.isArray(e)) if (i = e.length, s = new Array(i), 0 === i) r(null, ""); else for (var c = 0; c < e.length; c++) {
var u = e[c];
switch (t) {
case 1:
n(u, c, i, o);
break;
case 2:
n(u[0], u[1], c, i, o);
break;
case 3:
n(u[0], u[1], u[2], c, i, o);
break;
default:
u.push(c, i, o), n.apply(this, u)
}
} else {
var l = Ua.keys(e || {}), i = l.length, s = new Array(i);
if (0 === i) r(null, ""); else for (var h = 0; h < l.length; h++) {
var f = l[h];
n(f, e[f], h, i, o)
}
}
}, inOperator: Ua.inOperator, fromIterator: function (e) {
return "object" == typeof e && null !== e && !Ua.isArray(e) && Uu && Symbol.iterator in e ? Fu(e) : e
}
};
function Ku(e, t) {
return (Ku = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (e, t) {
return e.__proto__ = t, e
})(e, t)
}
Yu.Frame, Yu.makeMacro, Yu.makeKeywordArgs, Yu.numArgs, Yu.suppressValue, Yu.ensureDefined, Yu.memberLookup, Yu.contextOrFrameLookup, Yu.callWrap, Yu.handleError, Yu.isArray, Yu.keys, Yu.SafeString, Yu.copySafeness, Yu.markSafe, Yu.asyncEach, Yu.asyncAll, Yu.inOperator, Yu.fromIterator;
var Wu = Ua.TemplateError, Vu = Yu.Frame,
$u = {"==": "==", "===": "===", "!=": "!=", "!==": "!==", "<": "<", ">": ">", "<=": "<=", ">=": ">="},
Qu = function (e) {
var n;
function r() {
return e.apply(this, arguments) || this
}
n = e, (t = r).prototype = Object.create(n.prototype), Ku(t.prototype.constructor = t, n);
var t = r.prototype;
return t.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
}, t.fail = function (e, t, n) {
throw void 0 !== t && (t += 1), void 0 !== n && (n += 1), new Wu(e, t, n)
}, t._pushBuffer = function () {
var e = this._tmpid();
return this.bufferStack.push(this.buffer), this.buffer = e, this._emit("var " + this.buffer + ' = "";'), e
}, t._popBuffer = function () {
this.buffer = this.bufferStack.pop()
}, t._emit = function (e) {
this.codebuf.push(e)
}, t._emitLine = function (e) {
this._emit(e + "\n")
}, t._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)
})
}, t._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 {")
}, t._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
}, t._addScopeLevel = function () {
this._scopeClosers += "})"
}, t._closeScopeLevels = function () {
this._emitLine(this._scopeClosers + ";"), this._scopeClosers = ""
}, t._withScopedSyntax = function (e) {
var t = this._scopeClosers;
this._scopeClosers = "", e.call(this), this._closeScopeLevels(), this._scopeClosers = t
}, t._makeCallback = function (e) {
var t = this._tmpid();
return "function(" + t + (e ? "," + e : "") + ") {\nif(" + t + ") { cb(" + t + "); return; }"
}, t._tmpid = function () {
return this.lastId++, "t_" + this.lastId
}, t._templateName = function () {
return null == this.templateName ? "undefined" : JSON.stringify(this.templateName)
}, t._compileChildren = function (e, t) {
var n = this;
e.children.forEach(function (e) {
n.compile(e, t)
})
}, t._compileAggregate = function (e, t, n, r) {
var i = this;
n && this._emit(n), e.children.forEach(function (e, n) {
0 < n && i._emit(","), i.compile(e, t)
}), r && this._emit(r)
}, t._compileExpression = function (e, t) {
this.assertType(e, bu.Literal, bu.Symbol, bu.Group, bu.Array, bu.Dict, bu.FunCall, bu.Caller, bu.Filter, bu.LookupVal, bu.Compare, bu.InlineIf, bu.In, bu.Is, bu.And, bu.Or, bu.Not, bu.Add, bu.Concat, bu.Sub, bu.Mul, bu.Div, bu.FloorDiv, bu.Mod, bu.Pow, bu.Neg, bu.Pos, bu.Compare, bu.NodeList), this.compile(e, t)
}, t.assertType = function (e) {
for (var t = arguments.length, n = new Array(1 < t ? 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)
}, t.compileCallExtension = function (e, t, n) {
var r = this, i = e.args, s = e.contentArgs, a = "boolean" != typeof e.autoescape || e.autoescape;
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 bu.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) {
var i;
0 < n && r._emit(","), e ? (r._emitLine("function(cb) {"), r._emitLine("if(!cb) { cb = function(err) { if(err) { throw err; }}}"), i = r._pushBuffer(), r._withScopedSyntax(function () {
r.compile(e, t), r._emitLine("cb(null, " + i + ");")
}), r._popBuffer(), r._emitLine("return " + i + ";"), r._emitLine("}")) : r._emit("null")
}), n ? (e = this._tmpid(), this._emitLine(", " + this._makeCallback(e)), this._emitLine(this.buffer + " += runtime.suppressValue(" + e + ", " + a + " && env.opts.autoescape);"), this._addScopeLevel()) : (this._emit(")"), this._emit(", " + a + " && env.opts.autoescape);\n"))
}, t.compileCallExtensionAsync = function (e, t) {
this.compileCallExtension(e, t, !0)
}, t.compileNodeList = function (e, t) {
this._compileChildren(e, t)
}, t.compileLiteral = function (e) {
var t;
"string" == typeof e.value ? (t = (t = (t = (t = (t = (t = e.value.replace(/\\/g, "\\\\")).replace(/"/g, '\\"')).replace(/\n/g, "\\n")).replace(/\r/g, "\\r")).replace(/\t/g, "\\t")).replace(/\u2028/g, "\\u2028"), this._emit('"' + t + '"')) : null === e.value ? this._emit("null") : this._emit(e.value.toString())
}, t.compileSymbol = function (e, t) {
e = e.value, (t = t.lookup(e)) ? this._emit(t) : this._emit('runtime.contextOrFrameLookup(context, frame, "' + e + '")')
}, t.compileGroup = function (e, t) {
this._compileAggregate(e, t, "(", ")")
}, t.compileArray = function (e, t) {
this._compileAggregate(e, t, "[", "]")
}, t.compileDict = function (e, t) {
this._compileAggregate(e, t, "{", "}")
}, t.compilePair = function (e, t) {
var n = e.key, e = e.value;
n instanceof bu.Symbol ? n = new bu.Literal(n.lineno, n.colno, n.value) : n instanceof bu.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(e, t)
}, t.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(")")
}, t.compileIn = function (e, t) {
this._emit("runtime.inOperator("), this.compile(e.left, t), this._emit(","), this.compile(e.right, t), this._emit(")")
}, t.compileIs = function (e, t) {
var n = (e.right.name || 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")
}, t._binOpEmitter = function (e, t, n) {
this.compile(e.left, t), this._emit(n), this.compile(e.right, t)
}, t.compileOr = function (e, t) {
return this._binOpEmitter(e, t, " || ")
}, t.compileAnd = function (e, t) {
return this._binOpEmitter(e, t, " && ")
}, t.compileAdd = function (e, t) {
return this._binOpEmitter(e, t, " + ")
}, t.compileConcat = function (e, t) {
return this._binOpEmitter(e, t, ' + "" + ')
}, t.compileSub = function (e, t) {
return this._binOpEmitter(e, t, " - ")
}, t.compileMul = function (e, t) {
return this._binOpEmitter(e, t, " * ")
}, t.compileDiv = function (e, t) {
return this._binOpEmitter(e, t, " / ")
}, t.compileMod = function (e, t) {
return this._binOpEmitter(e, t, " % ")
}, t.compileNot = function (e, t) {
this._emit("!"), this.compile(e.target, t)
}, t.compileFloorDiv = function (e, t) {
this._emit("Math.floor("), this.compile(e.left, t), this._emit(" / "), this.compile(e.right, t), this._emit(")")
}, t.compilePow = function (e, t) {
this._emit("Math.pow("), this.compile(e.left, t), this._emit(", "), this.compile(e.right, t), this._emit(")")
}, t.compileNeg = function (e, t) {
this._emit("-"), this.compile(e.target, t)
}, t.compilePos = function (e, t) {
this._emit("+"), this.compile(e.target, t)
}, t.compileCompare = function (e, t) {
var n = this;
this.compile(e.expr, t), e.ops.forEach(function (e) {
n._emit(" " + $u[e.type] + " "), n.compile(e.expr, t)
})
}, t.compileLookupVal = function (e, t) {
this._emit("runtime.memberLookup(("), this._compileExpression(e.target, t), this._emit("),"), this._compileExpression(e.val, t), this._emit(")")
}, t._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--"
}
}, t.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(")")
}, t.compileFilter = function (e, t) {
var n = e.name;
this.assertType(n, bu.Symbol), this._emit('env.getFilter("' + n.value + '").call(context, '), this._compileAggregate(e.args, t), this._emit(")")
}, t.compileFilterAsync = function (e, t) {
var n = e.name, r = e.symbol.value;
this.assertType(n, bu.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()
}, t.compileKeywordArgs = function (e, t) {
this._emit("runtime.makeKeywordArgs("), this.compileDict(e, t), this._emit(")")
}, t.compileSet = function (e, t) {
var n = this, r = [];
e.targets.forEach(function (e) {
e = e.value, null == (e = t.lookup(e)) && (e = n._tmpid(), n._emitLine("var " + e + ";")), r.push(e)
}), e.value ? (this._emit(r.join(" = ") + " = "), this._compileExpression(e.value, t)) : (this._emit(r.join(" = ") + " = "), this.compile(e.body, t)), this._emitLine(";"), e.targets.forEach(function (e, t) {
e = e.value, n._emitLine('frame.set("' + e + '", ' + (t = r[t]) + ", true);"), n._emitLine("if(frame.topLevel) {"), n._emitLine('context.setVariable("' + e + '", ' + t + ");"), n._emitLine("}"), "_" !== e.charAt(0) && (n._emitLine("if(frame.topLevel) {"), n._emitLine('context.addExport("' + e + '", ' + t + ");"), n._emitLine("}"))
})
}, t.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("}")
}, t.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("}")
}, t.compileIfAsync = function (e, t) {
this._emit("(function(cb) {"), this.compileIf(e, t, !0), this._emit("})(" + this._makeCallback()), this._addScopeLevel()
}, t._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 + ");")
})
}, t.compileFor = function (e, t) {
var a, u, l, o, n = this, r = this._tmpid(), i = this._tmpid(), s = this._tmpid();
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 bu.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 {"), o = (a = e.name.children)[0], a = a[1], u = this._tmpid(), l = this._tmpid(), t.set(o.value, u), t.set(a.value, l), this._emitLine(r + " = -1;"), this._emitLine("var " + i + " = runtime.keys(" + s + ").length;"), this._emitLine("for(var " + u + " in " + s + ") {"), this._emitLine(r + "++;"), this._emitLine("var " + l + " = " + s + "[" + u + "];"), this._emitLine('frame.set("' + o.value + '", ' + u + ");"), this._emitLine('frame.set("' + a.value + '", ' + l + ");"), this._emitLoopBindings(e, s, r, i), this._withScopedSyntax(function () {
n.compile(e.body, t)
}), this._emitLine("}")) : (o = this._tmpid(), t.set(e.name.value, o), this._emitLine("var " + i + " = " + s + ".length;"), this._emitLine("for(var " + r + "=0; " + r + " < " + s + ".length; " + r + "++) {"), this._emitLine("var " + o + " = " + s + "[" + r + "];"), this._emitLine('frame.set("' + e.name.value + '", ' + o + ");"), 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();")
}, t._compileAsyncLoop = function (e, t, n) {
var c, r = this, i = this._tmpid(), s = this._tmpid(), a = this._tmpid(), o = n ? "asyncAll" : "asyncEach",
o = (t = t.push(), this._emitLine("frame = frame.push();"), this._emit("var " + a + " = runtime.fromIterator("), this._compileExpression(e.arr, t), this._emitLine(");"), e.name instanceof bu.Array ? (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) {
e = e.value, t.set(e, e), r._emitLine('frame.set("' + e + '", ' + e + ");")
})) : (c = e.name.value, this._emitLine("runtime." + o + "(" + a + ", 1, function(" + c + ", " + i + ", " + s + ",next) {"), this._emitLine('frame.set("' + c + '", ' + c + ");"), t.set(c, c)), 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()
}), this._tmpid());
this._emitLine("}, " + this._makeCallback(o)), this._addScopeLevel(), n && this._emitLine(this.buffer + " += " + o + ";"), e.else_ && (this._emitLine("if (!" + a + ".length) {"), this.compile(e.else_, t), this._emitLine("}")), this._emitLine("frame = frame.pop();")
}, t.compileAsyncEach = function (e, t) {
this._compileAsyncLoop(e, t)
}, t.compileAsyncAll = function (e, t) {
this._compileAsyncLoop(e, t, !0)
}, t._compileMacro = function (e, t) {
var n = this, r = [], i = null, s = "macro_" + this._tmpid(), a = void 0 !== t,
c = (e.args.children.forEach(function (t, s) {
s === e.args.children.length - 1 && t instanceof bu.Dict ? i = t : (n.assertType(t, bu.Symbol), r.push(t))
}), [].concat(r.map(function (e) {
return "l_" + e.value
}), ["kwargs"])), u = r.map(function (e) {
return '"' + e.value + '"'
}), l = (i && i.children || []).map(function (e) {
return '"' + e.key.value + '"'
}), o = a ? t.push(!0) : new Vu,
t = (this._emitLines("var " + s + " = runtime.makeMacro(", "[" + u.join(", ") + "], ", "[" + l.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(");")
}), this._pushBuffer());
return this._withScopedSyntax(function () {
n.compile(e.body, o)
}), this._emitLine("frame = " + (a ? "frame.pop();" : "callerFrame;")), this._emitLine("return new runtime.SafeString(" + t + ");"), this._emitLine("});"), this._popBuffer(), s
}, t.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 + ");"))
}, t.compileCaller = function (e, t) {
this._emit("(function (){"), e = this._compileMacro(e, t), this._emit("return " + e + ";})()")
}, t._compileGetTemplate = function (e, t, n, r) {
var i = this._tmpid(), s = this._templateName(), a = this._makeCallback(i), n = n ? "true" : "false",
r = r ? "true" : "false";
return this._emit("env.getTemplate("), this._compileExpression(e.template, t), this._emitLine(", " + n + ", " + s + ", " + r + ", " + a), i
}, t.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 + ");")
}, t.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, a = n._tmpid(), e = e instanceof bu.Pair ? (i = e.key.value, e.value.value) : 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(e, a), t.parent ? n._emitLine('frame.set("' + e + '", ' + a + ");") : n._emitLine('context.setVariable("' + e + '", ' + a + ");")
})
}, t.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()
}, t.compileSuper = function (e, t) {
var n = e.blockName.value, e = e.symbol.value, i = this._makeCallback(e);
this._emitLine('context.getSuper(env, "' + n + '", b_' + n + ", frame, runtime, " + i), this._emitLine(e + " = runtime.markSafe(" + e + ");"), this._addScopeLevel(), t.set(e, e)
}, t.compileExtends = function (e, t) {
var n = this._tmpid(), e = this._compileGetTemplate(e, t, !0, !1);
this._emitLine("parentTemplate = " + e), this._emitLine("for(var " + n + " in parentTemplate.blocks) {"), this._emitLine("context.addBlock(" + n + ", parentTemplate.blocks[" + n + "]);"), this._emitLine("}"), this._addScopeLevel()
}, t.compileInclude = function (e, t) {
this._emitLine("var tasks = [];"), this._emitLine("tasks.push("), this._emitLine("function(callback) {"), t = this._compileGetTemplate(e, t, !1, e.ignoreMissing), this._emitLine("callback(null," + t + ");});"), this._emitLine("});"), e = this._tmpid(), this._emitLine("tasks.push("), this._emitLine("function(template, callback){"), this._emitLine("template.render(context.getVariables(), frame, " + this._makeCallback(e)), this._emitLine("callback(null," + e + ");});"), 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()
}, t.compileTemplateData = function (e, t) {
this.compileLiteral(e, t)
}, t.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
}, t.compileOutput = function (e, t) {
var n = this;
e.children.forEach(function (r) {
r instanceof bu.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"))
})
}, t.compileRoot = function (e, t) {
var n = this,
r = (t && this.fail("compileRoot: root node can't have frame"), t = new Vu, 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, []);
(t = e.findAll(bu.Block)).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), i = new Vu, n._emitLine("var frame = frame.push(true);"), n.compile(e.body, i), n._emitFuncEnd()
}), this._emitLine("return {"), t.forEach(function (e, t) {
e = "b_" + e.name.value, n._emitLine(e + ": " + e + ",")
}), this._emitLine("root: root\n};")
}, t.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)
}, t.getCode = function () {
return this.codebuf.join("")
}, r
}(Ec.Obj), zu = {
compile: function (e, t, n, r, i) {
var s = new Qu(r, (i = void 0 === i ? {} : i).throwOnUndefined), e = (n || []).map(function (e) {
return e.preprocess
}).filter(function (e) {
return !!e
}).reduce(function (e, t) {
return t(e)
}, e);
return s.compile(Bu.transform(ku.parse(e, n, i), t, r)), s.getCode()
}, Compiler: Qu
}, Xu = Sr(function (e) {
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 Yu.copySafeness(e, t.charAt(0).toUpperCase() + t.slice(1))
}
function s(e) {
if (Ua.isString(e)) return e.split("");
if (Ua.isObject(e)) return Ua._entries(e || {}).map(function (e) {
return {key: e[0], value: e[1]}
});
if (Ua.isArray(e)) return e;
throw new Ua.TemplateError("list filter: type not iterable")
}
function a(e) {
return function (t, n, r) {
var i = this, s = i.env.getTest(n = void 0 === n ? "truthy" : n);
return Ua.toArray(t).filter(function (t) {
return s.call(i, t, r) === e
})
}
}
function o(e) {
return Yu.copySafeness(e, e.replace(/^\s*|\s*$/g, ""))
}
(e = e.exports = {}).abs = Math.abs, e.batch = function (e, t, n) {
for (var i = [], s = [], 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
}, e.capitalize = i, e.center = function (e, t) {
var i;
return (e = n(e, "")).length >= (t = t || 80) ? e : (t -= e.length, i = Ua.repeat(" ", t / 2 - t % 2), t = Ua.repeat(" ", t / 2), Yu.copySafeness(e, i + e + t))
}, e.default = function (e, t, n) {
return n ? e || t : void 0 !== e ? e : t
}, e.dictsort = function (e, t, n) {
if (!Ua.isObject(e)) throw new Ua.TemplateError("dictsort filter: val must be an object");
var r, s, i = [];
for (s in e) i.push([s, e[s]]);
if (void 0 === n || "key" === n) r = 0; else {
if ("value" !== n) throw new Ua.TemplateError("dictsort filter: You can only sort by either key or value");
r = 1
}
return i.sort(function (e, n) {
return e = e[r], n = n[r], t || (Ua.isString(e) && (e = e.toUpperCase()), Ua.isString(n) && (n = n.toUpperCase())), n < e ? 1 : e === n ? 0 : -1
}), i
}, e.dump = function (e, t) {
return JSON.stringify(e, null, t)
}, e.escape = function (e) {
return e instanceof Yu.SafeString ? e : Yu.markSafe(Ua.escape((e = null == e ? "" : e).toString()))
}, e.safe = function (e) {
return e instanceof Yu.SafeString ? e : Yu.markSafe((e = null == e ? "" : e).toString())
}, e.first = function (e) {
return e[0]
}, e.forceescape = function (e) {
return Yu.markSafe(Ua.escape((e = null == e ? "" : e).toString()))
}, e.groupby = function (e, t) {
return Ua.groupBy(e, t, this.env.opts.throwOnUndefined)
}, e.indent = function (e, t, r) {
if ("" === (e = n(e, ""))) return "";
t = t || 4;
var i = e.split("\n"), s = Ua.repeat(" ", t), t = i.map(function (e, t) {
return 0 !== t || r ? "" + s + e : e
}).join("\n");
return Yu.copySafeness(e, t)
}, e.join = function (e, t, n) {
return t = t || "", (e = n ? Ua.map(e, function (e) {
return e[n]
}) : e).join(t)
}, e.last = function (e) {
return e[e.length - 1]
}, e.length = function (e) {
return void 0 !== (e = n(e, "")) ? "function" == typeof Map && e instanceof Map || "function" == typeof Set && e instanceof Set ? e.size : (!Ua.isObject(e) || e instanceof Yu.SafeString ? e : Ua.keys(e)).length : 0
}, e.list = s, e.lower = function (e) {
return (e = n(e, "")).toLowerCase()
}, e.nl2br = function (e) {
return null == e ? "" : Yu.copySafeness(e, e.replace(/\r\n|\n/g, "<br />\n"))
}, e.random = function (e) {
return e[Math.floor(Math.random() * e.length)]
}, e.reject = a(!1), e.rejectattr = function (e, t) {
return e.filter(function (e) {
return !e[t]
})
}, e.select = a(!0), e.selectattr = function (e, t) {
return e.filter(function (e) {
return !!e[t]
})
}, e.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 ("string" != typeof (e = "number" == typeof e ? "" + e : e) && !(e instanceof Yu.SafeString)) return e;
if ("" === t) return s = n + e.split("").join(n) + n, Yu.copySafeness(e, s);
var a = e.indexOf(t);
if (0 === r || -1 === a) return e;
for (var o = 0, c = 0; -1 < a && (-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)), Yu.copySafeness(i, s)
}, e.reverse = function (e) {
var t;
return (t = Ua.isString(e) ? s(e) : Ua.map(e, function (e) {
return e
})).reverse(), Ua.isString(e) ? Yu.copySafeness(e, t.join("")) : t
}, e.round = function (e, t, n) {
return t = t || 0, t = Math.pow(10, t), ("ceil" === n ? Math.ceil : "floor" === n ? Math.floor : Math.round)(e * t) / t
}, e.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++, c = e.slice(c, a + (o + 1) * r), n && i <= o && c.push(n), s.push(c)
}
return s
}, e.sum = function (e, t, n) {
return (n = void 0 === n ? 0 : n) + (e = t ? Ua.map(e, function (e) {
return e[t]
}) : e).reduce(function (e, t) {
return e + t
}, 0)
}, e.sort = Yu.makeMacro(["value", "reverse", "case_sensitive", "attribute"], [], function (e, t, n, r) {
var i = this, e = Ua.map(e, function (e) {
return e
}), a = Ua.getAttrGetter(r);
return e.sort(function (e, s) {
if (e = r ? a(e) : e, s = r ? a(s) : s, i.env.opts.throwOnUndefined && r && (void 0 === e || void 0 === s)) throw new TypeError('sort: attribute "' + r + '" resolved to undefined');
return !n && Ua.isString(e) && Ua.isString(s) && (e = e.toLowerCase(), s = s.toLowerCase()), e < s ? t ? 1 : -1 : s < e ? t ? -1 : 1 : 0
}), e
}), e.string = function (e) {
return Yu.copySafeness(e, e)
}, e.striptags = function (e, t) {
var r = o((e = n(e, "")).replace(/<\/?([a-z][a-z0-9]*)\b[^>]*>|<!--[\s\S]*?-->/gi, "")),
t = t ? r.replace(/^ +| +$/gm, "").replace(/ +/g, " ").replace(/(\r\n)/g, "\n").replace(/\n\n\n+/g, "\n\n") : r.replace(/\s+/gi, " ");
return Yu.copySafeness(e, t)
}, e.title = function (e) {
var t = (e = n(e, "")).split(" ").map(i);
return Yu.copySafeness(e, t.join(" "))
}, e.trim = o, e.truncate = function (e, t, r, i) {
var s = e;
return (e = n(e, "")).length <= (t = t || 255) ? e : (e = r ? e.substring(0, t) : (-1 === (r = e.lastIndexOf(" ", t)) && (r = t), e.substring(0, r)), Yu.copySafeness(s, e += null != i ? i : "..."))
}, e.upper = function (e) {
return (e = n(e, "")).toUpperCase()
}, e.urlencode = function (e) {
var t = encodeURIComponent;
return Ua.isString(e) ? t(e) : (Ua.isArray(e) ? e : Ua._entries(e)).map(function (e) {
var n = e[0], e = e[1];
return t(n) + "=" + t(e)
}).join("&")
};
var c = /^(?:\(|<|&lt;)?(.*?)(?:\.|,|\)|\n|&gt;)?$/, u = /^[\w.!#$%&'*+\-\/=?\^`{|}~]+@[a-z\d\-]+(\.[a-z\d\-]+)+$/i,
l = /^https?:\/\/.*$/, h = /^www\./, f = /\.(?:org|net|com)(?:\:|\/|$)/, p = (e.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), s = (n = n ? n[1] : e).substr(0, t);
return l.test(n) ? '<a href="' + n + '"' + i + ">" + s + "</a>" : h.test(n) ? '<a href="http://' + n + '"' + i + ">" + s + "</a>" : u.test(n) ? '<a href="mailto:' + n + '">' + n + "</a>" : f.test(n) ? '<a href="http://' + n + '"' + i + ">" + s + "</a>" : e
}).join("")
}, e.wordcount = function (e) {
return (e = (e = n(e, "")) ? e.match(/\w+/g) : null) ? e.length : null
}, e.float = function (e, t) {
return r(e = parseFloat(e)) ? t : e
}, Yu.makeMacro(["value", "default", "base"], [], function (e, t, n) {
return void 0 === n && (n = 10), r(e = parseInt(e, n)) ? t : e
}));
e.int = p, e.d = e.default, e.e = e.escape
}), Zu = {};
function Ju(e, t) {
for (var n = 0, r = e.length - 1; 0 <= r; 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--;) e.unshift("..");
return e
}
var el = /^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/, tl = function (e) {
return el.exec(e).slice(1)
};
function nl() {
for (var e = "", t = !1, n = arguments.length - 1; -1 <= n && !t; n--) {
var r = 0 <= n ? 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 ? "/" : "") + Ju(al(e.split("/"), function (e) {
return !!e
}), !t).join("/") || "."
}
function rl(e) {
var t = il(e), n = "/" === ol(e, -1);
return (e = (e = Ju(al(e.split("/"), function (e) {
return !!e
}), !t).join("/")) || t ? e : ".") && n && (e += "/"), (t ? "/" : "") + e
}
function il(e) {
return "/" === e.charAt(0)
}
var sl = {
extname: function (e) {
return tl(e)[3]
}, basename: function (e, t) {
return e = tl(e)[2], t && e.substr(-1 * t.length) === t ? e.substr(0, e.length - t.length) : e
}, dirname: function (e) {
var n = (e = tl(e))[0], e = e[1];
return n || e ? n + (e && e.substr(0, e.length - 1)) : "."
}, 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; 0 <= n && "" === e[n]; n--) ;
return n < t ? [] : e.slice(t, n - t + 1)
}
e = nl(e).substr(1), t = nl(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
}
for (var c = [], o = a; o < r.length; o++) c.push("..");
return (c = c.concat(i.slice(a))).join("/")
}, join: function () {
return rl(al(Array.prototype.slice.call(arguments, 0), function (e, t) {
if ("string" != typeof e) throw new TypeError("Arguments to path.join must be strings");
return e
}).join("/"))
}, isAbsolute: il, normalize: rl, resolve: nl
};
function al(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 ol = "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 cl(e, t) {
return (cl = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (e, t) {
return e.__proto__ = t, e
})(e, t)
}
var ul = function (e) {
var n;
function r() {
return e.apply(this, arguments) || this
}
n = e, (t = r).prototype = Object.create(n.prototype), cl(t.prototype.constructor = t, n);
var t = r.prototype;
return t.resolve = function (e, t) {
return sl.resolve(sl.dirname(e), t)
}, t.isRelative = function (e) {
return 0 === e.indexOf("./") || 0 === e.indexOf("../")
}, r
}(Ec.EmitterObj);
function ll(e, t) {
return (ll = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (e, t) {
return e.__proto__ = t, e
})(e, t)
}
var hl = 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), ll(t.prototype.constructor = t, n), r.prototype.getSource = function (e) {
return this.precompiled[e] ? {src: {type: "code", obj: this.precompiled[e]}, path: e} : null
}, r
}(ul);
function fl(e, t) {
e.prototype = Object.create(t.prototype), pl(e.prototype.constructor = e, t)
}
function pl(e, t) {
return (pl = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (e, t) {
return e.__proto__ = t, e
})(e, t)
}
var dl = hl, ml = function (e) {
function t(t, n) {
var r = e.call(this) || this;
return "boolean" == typeof n && console.log("[nunjucks] Warning: you passed a boolean as the second argument to FileSystemLoader, but it now takes an options object. See http://mozilla.github.io/nunjucks/api.html#filesystemloader"), n = n || {}, r.pathsToNames = {}, r.noCache = !!n.noCache, t ? (t = Array.isArray(t) ? t : [t], r.searchPaths = t.map(sl.normalize)) : r.searchPaths = ["."], n.watch, r
}
return fl(t, e), t.prototype.getSource = function (e) {
for (var t = null, n = this.searchPaths, r = 0; r < n.length; r++) {
var i = sl.resolve(n[r]), s = sl.resolve(n[r], e);
if (0 === s.indexOf(i) && Zu.existsSync(s)) {
t = s;
break
}
}
if (!t) return null;
this.pathsToNames[t] = e;
var a = {src: Zu.readFileSync(t, "utf-8"), path: t, noCache: this.noCache};
return this.emit("load", e, a), a
}, t
}(ul), _l = {
FileSystemLoader: ml, PrecompiledLoader: dl, NodeResolveLoader: function (e) {
function t(t) {
var n;
return t = t || {}, (n = e.call(this) || this).pathsToNames = {}, n.noCache = !!t.noCache, t.watch, n
}
return fl(t, e), t.prototype.getSource = function (e) {
if (/^\.?\.?(\/|\\)/.test(e)) return null;
if (/^[A-Z]:/.test(e)) return null;
try {
t = vr.resolve(e)
} catch (e) {
return null
}
this.pathsToNames[t] = e;
var t = {src: Zu.readFileSync(t, "utf-8"), path: t, noCache: this.noCache};
return this.emit("load", e, t), t
}, t
}(ul)
}, El = Sr(function (e, t) {
var n = Yu.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 t <= e
}, t.greaterthan = function (e, t) {
return t < e
}, 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
}
}),
Tl = (El.callable, El.defined, El.divisibleby, El.escaped, El.equalto, El.eq, El.sameas, El.even, El.falsy, El.ge, El.greaterthan, El.gt, El.le, El.lessthan, El.lt, El.lower, El.ne, El.number, El.odd, El.string, El.truthy, El.undefined, El.upper, El.iterable, El.mapping, function () {
return {
range: function (e, t, n) {
var r = [];
if (0 < (n = void 0 === t ? (t = e, e = 0, 1) : n || 1)) for (var i = e; i < t; i += n) r.push(i); else for (var s = e; t < s; s += n) r.push(s);
return r
}, cycler: function () {
return e = Array.prototype.slice.call(arguments), t = -1, {
current: null, reset: function () {
t = -1, this.current = null
}, next: function () {
return ++t >= e.length && (t = 0), this.current = e[t], this.current
}
};
var e, t
}, joiner: function (e) {
e = e || ",";
var t = !0;
return function () {
var n = t ? "" : e;
return t = !1, n
}
}
}
});
function Al(e, t) {
e.prototype = Object.create(t.prototype), gl(e.prototype.constructor = e, t)
}
function gl(e, t) {
return (gl = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (e, t) {
return e.__proto__ = t, e
})(e, t)
}
var vl = _l.FileSystemLoader, yl = _l.WebLoader, Sl = _l.PrecompiledLoader, Cl = Ec.Obj, Nl = Ec.EmitterObj,
bl = Yu.handleError, Il = Yu.Frame;
function Ol(e, t, n) {
Ro(function () {
e(t, n)
})
}
var kl = {
type: "code", obj: {
root: function (e, t, n, r, i) {
try {
i(null, "")
} catch (e) {
i(bl(e, null, null))
}
}
}
}, Ll = function (e) {
function t() {
return e.apply(this, arguments) || this
}
Al(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 = Ua.isArray(e) ? e : [e] : vl ? this.loaders = [new vl("views")] : yl && (this.loaders = [new yl("/views")]), "undefined" != typeof window && window.nunjucksPrecompiled && this.loaders.unshift(new Sl(window.nunjucksPrecompiled)), this._initLoaders(), this.globals = Tl(), this.filters = {}, this.tests = {}, this.asyncFilters = [], this.extensions = {}, this.extensionsList = [], Ua._entries(Xu).forEach(function (e) {
var t = e[0], e = e[1];
return n.addFilter(t, e)
}), Ua._entries(El).forEach(function (e) {
var t = e[0], e = e[1];
return n.addTest(t, e)
})
}, 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 = Ua.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) {
return n && this.asyncFilters.push(e), this.filters[e] = t, this
}, n.getFilter = function (e) {
if (this.filters[e]) return this.filters[e];
throw new Error("filter not found: " + e)
}, n.addTest = function (e, t) {
return this.tests[e] = t, this
}, n.getTest = function (e) {
if (this.tests[e]) return this.tests[e];
throw new Error("test not found: " + 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), Ua.isFunction(n) && (i = n, n = null, t = t || !1), Ua.isFunction(t) && (i = t, t = !1), e instanceof Rl) c = e; else {
if ("string" != typeof e) throw new Error("template names must be a string: " + e);
for (var u = 0; u < this.loaders.length; u++) {
var l = this.loaders[u];
if (c = l.cache[this.resolveTemplate(l, n, e)]) break
}
}
return c ? (t && c.compile(), i ? void i(null, c) : c) : (Ua.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 (n = o || n || r ? n : new Error("template not found: " + e)) {
if (i) return void i(n);
throw n
}
var c;
o ? (c = new Rl(o.src, a, o.path, t), o.noCache || (o.loader.cache[e] = c)) : c = new Rl(kl, 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 = sl.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("nunjucksEnv", e), e
}(this, e)
}, n.render = function (e, t, n) {
Ua.isFunction(t) && (n = t, t = null);
var r = null;
return this.getTemplate(e, function (e, i) {
if (e && n) Ol(n, e); else {
if (e) throw e;
r = i.render(t, n)
}
}), r
}, n.renderString = function (e, t, n, r) {
return Ua.isFunction(n) && (r = n, n = {}), new Rl(e, this, (n = n || {}).path).render(t, r)
}, n.waterfall = function (e, t, n) {
return xo(e, t, n)
}, t
}(Nl), Dl = function (e) {
function t() {
return e.apply(this, arguments) || this
}
Al(t, e);
var n = t.prototype;
return n.init = function (e, t, n) {
var r = this;
this.env = n || new Ll, this.ctx = Ua.extend({}, e), this.blocks = {}, this.exported = [], Ua.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 : 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]) return this.blocks[e][0];
throw new Error('unknown block "' + e + '"')
}, n.getSuper = function (e, t, n, r, i, s) {
var n = Ua.indexOf(this.blocks[t] || [], n), o = this.blocks[t][n + 1];
if (-1 === n || !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
}(Cl), Rl = function (e) {
function t() {
return e.apply(this, arguments) || this
}
Al(t, e);
var n = t.prototype;
return n.init = function (e, t, n, r) {
if (this.env = t || new Ll, Ua.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 (!Ua.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 Ua._prettifyError(this.path, this.env.opts.dev, e)
} else this.compiled = !1
}, n.render = function (e, t, n) {
var r = this, i = ("function" == typeof e ? (n = e, e = {}) : "function" == typeof t && (n = t, t = null), !t);
try {
this.compile()
} catch (e) {
var s = Ua._prettifyError(this.path, this.env.opts.dev, e);
if (n) return Ol(n, s);
throw s
}
var s = new Dl(e || {}, this.blocks, this.env), c = ((t = t ? t.push(!0) : new Il).topLevel = !0, null), u = !1;
return this.rootRenderFunc(this.env, s, t, Yu, function (e, t) {
if (!u || !n || void 0 === t) if (e && (e = Ua._prettifyError(r.path, r.env.opts.dev, e), u = !0), n) i ? Ol(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
}
(t = t ? t.push() : new Il).topLevel = !0;
var i = new Dl(e || {}, this.blocks, this.env);
this.rootRenderFunc(this.env, i, t, Yu, function (e) {
e ? n(e, null) : n(null, i.getExported())
})
}, n.compile = function () {
this.compiled || this._compile()
}, n._compile = function () {
var t = this.tmplProps || (t = zu.compile(this.tmplStr, this.env.asyncFilters, this.env.extensionsList, this.path, this.env.opts), new Function(t)());
this.blocks = this._getBlocks(t), this.rootRenderFunc = t.root, this.compiled = !0
}, n._getBlocks = function (e) {
var t = {};
return Ua.keys(e).forEach(function (n) {
"b_" === n.slice(0, 2) && (t[n.slice(2)] = e[n])
}), t
}, t
}(Cl), wl = {Environment: Ll, Template: Rl};
Ua._prettifyError;
var xl, Ml = wl.Environment;
function Pl(e, t) {
var n;
return t = t || {}, Ua.isObject(e) && (t = e, e = null), _l.FileSystemLoader ? n = new _l.FileSystemLoader(e, {
watch: t.watch,
noCache: t.noCache
}) : _l.WebLoader && (n = new _l.WebLoader(e, {
useCache: t.web && t.web.useCache,
async: t.web && t.web.async
})), xl = new Ml(n, t), t && t.express && xl.express(t.express), xl
}
_l.FileSystemLoader, _l.NodeResolveLoader, _l.PrecompiledLoader, _l.WebLoader;
var Bl = function (e, t, n) {
return xl || Pl(), xl.renderString(e, t, n)
};
const Fl = 1e3, Ul = 6e4, Hl = 36e5, Gl = "millisecond", jl = "second", ql = "minute", Yl = "hour", Kl = "day",
Wl = "week", Vl = "month", $l = "quarter", Ql = "year", zl = "date", Xl = "Invalid Date",
Zl = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,
Jl = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g;
var eh = {
name: "en",
weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),
months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"),
ordinal: e => {
var t = ["th", "st", "nd", "rd"], n = e % 100;
return `[${e}${t[(n - 20) % 10] || t[n] || t[0]}]`
}
};
const th = (e, t, n) => {
var r = String(e);
return !r || r.length >= t ? e : "" + Array(t + 1 - r.length).join(n) + e
}, nh = (e, t) => {
var n, r, i;
return e.date() < t.date() ? -nh(t, e) : (n = 12 * (t.year() - e.year()) + (t.month() - e.month()), i = t - (r = e.clone().add(n, Vl)) < 0, e = e.clone().add(n + (i ? -1 : 1), Vl), +(-(n + (t - r) / (i ? r - e : e - r)) || 0))
};
var rh = {
s: th,
z: e => {
var e = -e.utcOffset(), n = Math.abs(e), r = Math.floor(n / 60), n = n % 60;
return (e <= 0 ? "+" : "-") + th(r, 2, "0") + ":" + th(n, 2, "0")
},
m: nh,
a: e => e < 0 ? Math.ceil(e) || 0 : Math.floor(e),
p: e => ({
M: Vl,
y: Ql,
w: Wl,
d: Kl,
D: zl,
h: Yl,
m: ql,
s: jl,
ms: Gl,
Q: $l
})[e] || String(e || "").toLowerCase().replace(/s$/, ""),
u: e => void 0 === e
};
let ih = "en";
const sh = {}, ah = (sh[ih] = eh, e => e instanceof lh), oh = (e, t, n) => {
let r;
if (!e) return ih;
if ("string" == typeof e) {
const n = e.toLowerCase();
if (sh[n] && (r = n), t && (sh[n] = t, r = n), t = e.split("-"), !r && 1 < t.length) return oh(t[0])
} else {
const t = e.name;
sh[t] = e, r = t
}
return !n && r && (ih = r), r || !n && ih
}, ch = function (e, t) {
var n;
return ah(e) ? e.clone() : ((n = "object" == typeof t ? t : {}).date = e, n.args = arguments, new lh(n))
}, uh = rh;
uh.l = oh, uh.i = ah, uh.w = (e, t) => ch(e, {locale: t.$L, utc: t.$u, x: t.$x, $offset: t.$offset});
class lh {
constructor(e) {
this.$L = oh(e.locale, null, !0), this.parse(e)
}
parse(e) {
this.$d = (e => {
const {date: t, utc: n} = e;
if (null === t) return new Date(NaN);
if (uh.u(t)) return new Date;
if (!(t instanceof Date || "string" != typeof t || /Z$/i.test(t))) {
const e = t.match(Zl);
if (e) {
const t = e[2] - 1 || 0, r = (e[7] || "0").substring(0, 3);
return n ? new Date(Date.UTC(e[1], t, e[3] || 1, e[4] || 0, e[5] || 0, e[6] || 0, r)) : new Date(e[1], t, e[3] || 1, e[4] || 0, e[5] || 0, e[6] || 0, r)
}
}
return new Date(t)
})(e), this.$x = e.x || {}, this.init()
}
init() {
var e = this.$d;
this.$y = e.getFullYear(), this.$M = e.getMonth(), this.$D = e.getDate(), this.$W = e.getDay(), this.$H = e.getHours(), this.$m = e.getMinutes(), this.$s = e.getSeconds(), this.$ms = e.getMilliseconds()
}
$utils() {
return uh
}
isValid() {
return !(this.$d.toString() === Xl)
}
isSame(e, t) {
return e = ch(e), this.startOf(t) <= e && e <= this.endOf(t)
}
isAfter(e, t) {
return ch(e) < this.startOf(t)
}
isBefore(e, t) {
return this.endOf(t) < ch(e)
}
$g(e, t, n) {
return uh.u(e) ? this[t] : this.set(n, e)
}
unix() {
return Math.floor(this.valueOf() / 1e3)
}
valueOf() {
return this.$d.getTime()
}
startOf(e, t) {
const n = !!uh.u(t) || t, r = uh.p(e),
i = (e, t) => (t = uh.w(this.$u ? Date.UTC(this.$y, t, e) : new Date(this.$y, t, e), this), n ? t : t.endOf(Kl)),
s = (e, t) => uh.w(this.toDate()[e].apply(this.toDate("s"), (n ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(t)), this), {
$W: a,
$M: o,
$D: c
} = this, u = "set" + (this.$u ? "UTC" : "");
switch (r) {
case Ql:
return n ? i(1, 0) : i(31, 11);
case Vl:
return n ? i(1, o) : i(0, o + 1);
case Wl: {
const e = this.$locale().weekStart || 0, t = (a < e ? a + 7 : a) - e;
return i(n ? c - t : c + (6 - t), o)
}
case Kl:
case zl:
return s(u + "Hours", 0);
case Yl:
return s(u + "Minutes", 1);
case ql:
return s(u + "Seconds", 2);
case jl:
return s(u + "Milliseconds", 3);
default:
return this.clone()
}
}
endOf(e) {
return this.startOf(e, !1)
}
$set(e, t) {
var e = uh.p(e), r = "set" + (this.$u ? "UTC" : ""), r = {
[Kl]: r + "Date",
[zl]: r + "Date",
[Vl]: r + "Month",
[Ql]: r + "FullYear",
[Yl]: r + "Hours",
[ql]: r + "Minutes",
[jl]: r + "Seconds",
[Gl]: r + "Milliseconds"
}[e], t = e === Kl ? this.$D + (t - this.$W) : t;
if (e === Vl || e === Ql) {
const e = this.clone().set(zl, 1);
e.$d[r](t), e.init(), this.$d = e.set(zl, Math.min(this.$D, e.daysInMonth())).$d
} else r && this.$d[r](t);
return this.init(), this
}
set(e, t) {
return this.clone().$set(e, t)
}
get(e) {
return this[uh.p(e)]()
}
add(e, t) {
e = Number(e);
var r = t => {
var n = ch(this);
return uh.w(n.date(n.date() + Math.round(t * e)), this)
};
return (t = uh.p(t)) === Vl ? this.set(Vl, this.$M + e) : t === Ql ? this.set(Ql, this.$y + e) : t === Kl ? r(1) : t === Wl ? r(7) : (r = {
[ql]: Ul,
[Yl]: Hl,
[jl]: Fl
}[t] || 1, t = this.$d.getTime() + e * r, uh.w(t, this))
}
subtract(e, t) {
return this.add(-1 * e, t)
}
format(e) {
var t = this.$locale();
if (!this.isValid()) return t.invalidDate || Xl;
const n = e || "YYYY-MM-DDTHH:mm:ssZ", r = uh.z(this), {$H: i, $m: s, $M: a} = this, {
weekdays: o,
months: c,
meridiem: u
} = t, l = (e, t, r, i) => e && (e[t] || e(this, n)) || r[t].slice(0, i), h = e => uh.s(i % 12 || 12, e, "0"),
f = u || ((e, t, n) => (e = e < 12 ? "AM" : "PM", n ? e.toLowerCase() : e)), p = {
YY: String(this.$y).slice(-2),
YYYY: this.$y,
M: a + 1,
MM: uh.s(a + 1, 2, "0"),
MMM: l(t.monthsShort, a, c, 3),
MMMM: l(c, a),
D: this.$D,
DD: uh.s(this.$D, 2, "0"),
d: String(this.$W),
dd: l(t.weekdaysMin, this.$W, o, 2),
ddd: l(t.weekdaysShort, this.$W, o, 3),
dddd: o[this.$W],
H: String(i),
HH: uh.s(i, 2, "0"),
h: h(1),
hh: h(2),
a: f(i, s, !0),
A: f(i, s, !1),
m: String(s),
mm: uh.s(s, 2, "0"),
s: String(this.$s),
ss: uh.s(this.$s, 2, "0"),
SSS: uh.s(this.$ms, 3, "0"),
Z: r
};
return n.replace(Jl, (e, t) => t || p[e] || r.replace(":", ""))
}
utcOffset() {
return 15 * -Math.round(this.$d.getTimezoneOffset() / 15)
}
diff(e, t, n) {
var t = uh.p(t), s = ((e = ch(e)).utcOffset() - this.utcOffset()) * Ul, a = this - e, e = uh.m(this, e), e = {
[Ql]: e / 12,
[Vl]: e,
[$l]: e / 3,
[Wl]: (a - s) / 6048e5,
[Kl]: (a - s) / 864e5,
[Yl]: a / Hl,
[ql]: a / Ul,
[jl]: a / Fl
}[t] || a;
return n ? e : uh.a(e)
}
daysInMonth() {
return this.endOf(Vl).$D
}
$locale() {
return sh[this.$L]
}
locale(e, t) {
var n;
return e ? (n = this.clone(), (e = oh(e, t, !0)) && (n.$L = e), n) : this.$L
}
clone() {
return uh.w(this.$d, this)
}
toDate() {
return new Date(this.valueOf())
}
toJSON() {
return this.isValid() ? this.toISOString() : null
}
toISOString() {
return this.$d.toISOString()
}
toString() {
return this.$d.toUTCString()
}
}
const hh = lh.prototype;
ch.prototype = hh, [["$ms", Gl], ["$s", jl], ["$m", ql], ["$H", Yl], ["$W", Kl], ["$M", Vl], ["$y", Ql], ["$D", zl]].forEach(e => {
hh[e[1]] = function (t) {
return this.$g(t, e[0], e[1])
}
}), ch.extend = (e, t) => (e.$i || (e(t, lh, ch), e.$i = !0), ch), ch.locale = oh, ch.isDayjs = ah, ch.unix = e => ch(1e3 * e), ch.en = sh[ih], ch.Ls = sh, ch.p = {};
var fh = Sr(function (e) {
function r(e) {
return e && (e = e.toString().replace(n.pluses, "%20"), e = decodeURIComponent(e)), e
}
function i(e) {
var t, i, s, a, o, c, u, l = [];
if (null != e && "" !== e) for (u = (i = (e = (t = 0) === e.indexOf("?") ? e.substring(1) : e).toString().split(n.query_separator)).length; t < u; t++) 0 !== (a = (s = i[t]).indexOf("=")) && (o = r(s.substring(0, a)), c = r(s.substring(a + 1)), l.push(-1 === a ? [s, null] : [o, c]));
return l
}
function s(e) {
this.uriParts = function (e) {
var t = n.uri_parser.exec(e || ""), r = {};
return ["source", "protocol", "authority", "userInfo", "user", "password", "host", "port", "isColonUri", "relative", "path", "directory", "file", "query", "anchor"].forEach(function (e, n) {
r[e] = t[n] || ""
}), r
}(e), this.queryPairs = i(this.uriParts.query), this.hasAuthorityPrefixUserPref = null
}
var n = {
starts_with_slashes: /^\/+/,
ends_with_slashes: /\/+$/,
pluses: /\+/g,
query_separator: /[&;]/,
uri_parser: /^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@\/]*)(?::([^:@\/]*))?)?@)?(\[[0-9a-fA-F:.]+\]|[^:\/?#]*)(?::(\d+|(?=:)))?(:)?)((((?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/
};
Array.prototype.forEach || (Array.prototype.forEach = function (e, t) {
var n, r;
if (null == this) throw new TypeError(" this is null or not defined");
var a, i = Object(this), s = i.length >>> 0;
if ("function" != typeof e) throw new TypeError(e + " is not a function");
for (1 < arguments.length && (n = t), r = 0; r < s;) r in i && (a = i[r], e.call(n, a, r, i)), r++
}), ["protocol", "userInfo", "host", "port", "path", "anchor"].forEach(function (e) {
s.prototype[e] = function (t) {
return void 0 !== t && (this.uriParts[e] = t), this.uriParts[e]
}
}), s.prototype.hasAuthorityPrefix = function (e) {
return void 0 !== e && (this.hasAuthorityPrefixUserPref = e), null === this.hasAuthorityPrefixUserPref ? -1 !== this.uriParts.source.indexOf("//") : this.hasAuthorityPrefixUserPref
}, s.prototype.isColonUri = function (e) {
if (void 0 === e) return !!this.uriParts.isColonUri;
this.uriParts.isColonUri = !!e
}, s.prototype.query = function (e, t) {
var n, r, s, a = "", o = void 0 === t || t;
for (void 0 !== e && (this.queryPairs = i(e)), n = 0, s = this.queryPairs.length; n < s; n++) r = this.queryPairs[n], 0 < a.length && (a += "&"), null === r[1] ? a += r[0] : (a = a + r[0] + "=", void 0 !== r[1] && (a += o ? encodeURIComponent(r[1]) : r[1]));
return 0 < a.length ? "?" + a : a
}, s.prototype.getQueryParamValue = function (e) {
for (var t, n = 0, r = this.queryPairs.length; n < r; n++) if (e === (t = this.queryPairs[n])[0]) return t[1]
}, s.prototype.getQueryParamValues = function (e) {
for (var n, i = [], t = 0, r = this.queryPairs.length; t < r; t++) e === (n = this.queryPairs[t])[0] && i.push(n[1]);
return i
}, s.prototype.deleteQueryParam = function (e, t) {
for (var i, s, a, c = [], n = 0, o = this.queryPairs.length; n < o; n++) s = r((i = this.queryPairs[n])[0]) === r(e), a = i[1] === t, (1 !== arguments.length || s) && (2 !== arguments.length || s && a) || c.push(i);
return this.queryPairs = c, this
}, s.prototype.addQueryParam = function (e, t, n) {
return 3 === arguments.length && -1 !== n ? (n = Math.min(n, this.queryPairs.length), this.queryPairs.splice(n, 0, [e, t])) : 0 < arguments.length && this.queryPairs.push([e, t]), this
}, s.prototype.hasQueryParam = function (e) {
for (var n = this.queryPairs.length, t = 0; t < n; t++) if (this.queryPairs[t][0] == e) return !0;
return !1
}, s.prototype.replaceQueryParam = function (e, t, n) {
var i, s, a = -1, o = this.queryPairs.length;
if (3 === arguments.length) {
for (i = 0; i < o; i++) if (r((s = this.queryPairs[i])[0]) === r(e) && decodeURIComponent(s[1]) === r(n)) {
a = i;
break
}
0 <= a && this.deleteQueryParam(e, r(n)).addQueryParam(e, t, a)
} else {
for (i = 0; i < o; i++) if (r((s = this.queryPairs[i])[0]) === r(e)) {
a = i;
break
}
this.deleteQueryParam(e), this.addQueryParam(e, t, a)
}
return this
}, ["protocol", "hasAuthorityPrefix", "isColonUri", "userInfo", "host", "port", "path", "query", "anchor"].forEach(function (e) {
var t = "set" + e.charAt(0).toUpperCase() + e.slice(1);
s.prototype[t] = function (t) {
return this[e](t), this
}
}), s.prototype.scheme = function () {
var e = "";
return this.protocol() ? (e += this.protocol(), this.protocol().indexOf(":") !== this.protocol().length - 1 && (e += ":"), e += "//") : this.hasAuthorityPrefix() && this.host() && (e += "//"), e
}, s.prototype.origin = function () {
var e = this.scheme();
return this.userInfo() && this.host() && (e += this.userInfo(), this.userInfo().indexOf("@") !== this.userInfo().length - 1) && (e += "@"), this.host() && (e += this.host(), this.port() || this.path() && this.path().substr(0, 1).match(/[0-9]/)) && (e += ":" + this.port()), e
}, s.prototype.addTrailingSlash = function () {
var e = this.path() || "";
return "/" !== e.substr(-1) && this.path(e + "/"), this
}, s.prototype.toString = function (e) {
var t, r = this.origin();
return this.isColonUri() ? this.path() && (r += ":" + this.path()) : this.path() ? (t = this.path(), n.ends_with_slashes.test(r) || n.starts_with_slashes.test(t) ? (r && r.replace(n.ends_with_slashes, "/"), t = t.replace(n.starts_with_slashes, "/")) : r += "/", r += t) : this.host() && (this.query(void 0, e).toString() || this.anchor()) && (r += "/"), this.query(void 0, e).toString() && (r += this.query(void 0, e).toString()), this.anchor() && (0 !== this.anchor().indexOf("#") && (r += "#"), r += this.anchor()), r
}, s.prototype.clone = function () {
return new s(this.toString())
}, e.exports = s
}), ph = Sr(function (e, t) {
!function () {
var n, r = "Expected a function", i = "__lodash_hash_undefined__", s = "__lodash_placeholder__", o = 32,
u = 128, h = 1 / 0, f = 9007199254740991, p = NaN, d = 4294967295,
m = [["ary", u], ["bind", 1], ["bindKey", 2], ["curry", 8], ["curryRight", 16], ["flip", 512], ["partial", o], ["partialRight", 64], ["rearg", 256]],
_ = "[object Arguments]", E = "[object Array]", T = "[object Boolean]", A = "[object Date]",
g = "[object Error]", v = "[object Function]", y = "[object GeneratorFunction]", S = "[object Map]",
C = "[object Number]", N = "[object Object]", b = "[object Promise]", I = "[object RegExp]",
O = "[object Set]", k = "[object String]", L = "[object Symbol]", D = "[object WeakMap]",
R = "[object ArrayBuffer]", w = "[object DataView]", x = "[object Float32Array]",
M = "[object Float64Array]", P = "[object Int8Array]", B = "[object Int16Array]", F = "[object Int32Array]",
U = "[object Uint8Array]", H = "[object Uint8ClampedArray]", G = "[object Uint16Array]",
j = "[object Uint32Array]", q = /\b__p \+= '';/g, Y = /\b(__p \+=) '' \+/g,
K = /(__e\(.*?\)|\b__t\)) \+\n'';/g, W = /&(?:amp|lt|gt|quot|#39);/g, V = /[&<>"']/g, $ = RegExp(W.source),
Q = RegExp(V.source), z = /<%-([\s\S]+?)%>/g, X = /<%([\s\S]+?)%>/g, Z = /<%=([\s\S]+?)%>/g,
J = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, ee = /^\w*$/,
te = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,
ne = /[\\^$.*+?()[\]{}|]/g, re = RegExp(ne.source), ie = /^\s+/, se = /\s/,
ae = /\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/, oe = /\{\n\/\* \[wrapped with (.+)\] \*/, ce = /,? & /,
ue = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g, le = /[()=,{}\[\]\/\s]/, he = /\\(\\)?/g,
fe = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g, pe = /\w*$/, de = /^[-+]0x[0-9a-f]+$/i, me = /^0b[01]+$/i,
_e = /^\[object .+?Constructor\]$/, Ee = /^0o[0-7]+$/i, Te = /^(?:0|[1-9]\d*)$/,
Ae = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g, ge = /($^)/, ve = /['\n\r\u2028\u2029\\]/g,
ye = "\\ud800-\\udfff", Se = "\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff", Ce = "\\u2700-\\u27bf",
be = "A-Z\\xc0-\\xd6\\xd8-\\xde", Ie = "\\ufe0e\\ufe0f", Le = "[" + ye + "]",
De = "[" + (Oe = "\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000") + "]",
Re = "[" + Se + "]", xe = "[" + Ce + "]", Me = "[" + (Ne = "a-z\\xdf-\\xf6\\xf8-\\xff") + "]",
He = "[\\ud800-\\udbff][\\udc00-\\udfff]", je = "\\u200d",
qe = "(?:" + Me + "|" + (Oe = "[^" + ye + Oe + "\\d+" + Ce + Ne + be + "]") + ")",
Oe = "(?:" + (be = "[" + be + "]") + "|" + Oe + ")", Ke = "(?:['](?:d|ll|m|re|s|t|ve))?",
We = "(?:['](?:D|LL|M|RE|S|T|VE))?",
$e = ($e = "[" + Ie + "]?") + (Ve = "(?:" + Re + "|" + (Ce = "\\ud83c[\\udffb-\\udfff]") + ")?") + "(?:" + je + "(?:" + [Ne = "[^" + ye + "]", Ue = "(?:\\ud83c[\\udde6-\\uddff]){2}", He].join("|") + ")" + $e + Ve + ")*",
Ve = "(?:" + [xe, Ue, He].join("|") + ")" + $e,
xe = "(?:" + [Ne + Re + "?", Re, Ue, He, Le].join("|") + ")", Ze = RegExp("[']", "g"),
Je = RegExp(Re, "g"), et = RegExp(Ce + "(?=" + Ce + ")|" + xe + $e, "g"),
tt = RegExp([be + "?" + Me + "+" + Ke + "(?=" + [De, be, "$"].join("|") + ")", Oe + "+" + We + "(?=" + [De, be + qe, "$"].join("|") + ")", be + "?" + qe + "+" + Ke, be + "+" + We, "\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])", "\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])", "\\d+", Ve].join("|"), "g"),
nt = RegExp("[" + je + ye + Se + Ie + "]"),
rt = /[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,
it = ["Array", "Buffer", "DataView", "Date", "Error", "Float32Array", "Float64Array", "Function", "Int8Array", "Int16Array", "Int32Array", "Map", "Math", "Object", "Promise", "RegExp", "Set", "String", "Symbol", "TypeError", "Uint8Array", "Uint8ClampedArray", "Uint16Array", "Uint32Array", "WeakMap", "_", "clearTimeout", "isFinite", "parseInt", "setTimeout"],
st = -1, at = {},
ot = (at[x] = at[M] = at[P] = at[B] = at[F] = at[U] = at[H] = at[G] = at[j] = !0, at[_] = at[E] = at[R] = at[T] = at[w] = at[A] = at[g] = at[v] = at[S] = at[C] = at[N] = at[I] = at[O] = at[k] = at[D] = !1, {}),
ct = (ot[_] = ot[E] = ot[R] = ot[w] = ot[T] = ot[A] = ot[x] = ot[M] = ot[P] = ot[B] = ot[F] = ot[S] = ot[C] = ot[N] = ot[I] = ot[O] = ot[k] = ot[L] = ot[U] = ot[H] = ot[G] = ot[j] = !0, ot[g] = ot[v] = ot[D] = !1, {
"\\": "\\",
"'": "'",
"\n": "n",
"\r": "r",
"\u2028": "u2028",
"\u2029": "u2029"
}), ut = parseFloat, lt = parseInt, Ne = "object" == typeof gr && gr && gr.Object === Object && gr,
Ue = "object" == typeof self && self && self.Object === Object && self,
pt = Ne || Ue || Function("return this")(), mt = (He = t && !t.nodeType && t) && e && !e.nodeType && e,
_t = mt && mt.exports === He, Et = _t && Ne.process, At = (Le = function () {
try {
return mt && mt.require && mt.require("util").types || Et && Et.binding && Et.binding("util")
} catch (e) {
}
}()) && Le.isArrayBuffer, gt = Le && Le.isDate, vt = Le && Le.isMap, yt = Le && Le.isRegExp,
St = Le && Le.isSet, Ct = Le && Le.isTypedArray;
function Nt(e, t, n) {
switch (n.length) {
case 0:
return e.call(t);
case 1:
return e.call(t, n[0]);
case 2:
return e.call(t, n[0], n[1]);
case 3:
return e.call(t, n[0], n[1], n[2])
}
return e.apply(t, n)
}
function bt(e, t, n, r) {
for (var i = -1, s = null == e ? 0 : e.length; ++i < s;) {
var a = e[i];
t(r, a, n(a), e)
}
return r
}
function It(e, t) {
for (var n = -1, r = null == e ? 0 : e.length; ++n < r && !1 !== t(e[n], n, e);) ;
return e
}
function kt(e, t) {
for (var n = -1, r = null == e ? 0 : e.length; ++n < r;) if (!t(e[n], n, e)) return !1;
return !0
}
function Lt(e, t) {
for (var n = -1, r = null == e ? 0 : e.length, i = 0, s = []; ++n < r;) {
var a = e[n];
t(a, n, e) && (s[i++] = a)
}
return s
}
function Dt(e, t) {
return !(null == e || !e.length) && -1 < Gt(e, t, 0)
}
function Rt(e, t, n) {
for (var r = -1, i = null == e ? 0 : e.length; ++r < i;) if (n(t, e[r])) return !0;
return !1
}
function wt(e, t) {
for (var n = -1, r = null == e ? 0 : e.length, i = Array(r); ++n < r;) i[n] = t(e[n], n, e);
return i
}
function xt(e, t) {
for (var n = -1, r = t.length, i = e.length; ++n < r;) e[i + n] = t[n];
return e
}
function Mt(e, t, n, r) {
var i = -1, s = null == e ? 0 : e.length;
for (r && s && (n = e[++i]); ++i < s;) n = t(n, e[i], i, e);
return n
}
function Pt(e, t, n, r) {
var i = null == e ? 0 : e.length;
for (r && i && (n = e[--i]); i--;) n = t(n, e[i], i, e);
return n
}
function Bt(e, t) {
for (var n = -1, r = null == e ? 0 : e.length; ++n < r;) if (t(e[n], n, e)) return !0;
return !1
}
var Ft = Kt("length");
function Ut(e, t, n) {
var r;
return n(e, function (e, n, i) {
if (t(e, n, i)) return r = n, !1
}), r
}
function Ht(e, t, n, r) {
for (var i = e.length, s = n + (r ? 1 : -1); r ? s-- : ++s < i;) if (t(e[s], s, e)) return s;
return -1
}
function Gt(e, t, n) {
return t == t ? function (e, t, n) {
for (var r = n - 1, i = e.length; ++r < i;) if (e[r] === t) return r;
return -1
}(e, t, n) : Ht(e, qt, n)
}
function jt(e, t, n, r) {
for (var i = n - 1, s = e.length; ++i < s;) if (r(e[i], t)) return i;
return -1
}
function qt(e) {
return e != e
}
function Yt(e, t) {
var n = null == e ? 0 : e.length;
return n ? $t(e, t) / n : p
}
function Kt(e) {
return function (t) {
return null == t ? n : t[e]
}
}
function Wt(e) {
return function (t) {
return null == e ? n : e[t]
}
}
function Vt(e, t, n, r, i) {
return i(e, function (e, i, s) {
n = r ? (r = !1, e) : t(n, e, i, s)
}), n
}
function $t(e, t) {
for (var r, i = -1, s = e.length; ++i < s;) {
var a = t(e[i]);
a !== n && (r = r === n ? a : r + a)
}
return r
}
function Qt(e, t) {
for (var n = -1, r = Array(e); ++n < e;) r[n] = t(n);
return r
}
function zt(e) {
return e && e.slice(0, dn(e) + 1).replace(ie, "")
}
function Xt(e) {
return function (t) {
return e(t)
}
}
function Zt(e, t) {
return wt(t, function (t) {
return e[t]
})
}
function Jt(e, t) {
return e.has(t)
}
function en(e, t) {
for (var n = -1, r = e.length; ++n < r && -1 < Gt(t, e[n], 0);) ;
return n
}
function tn(e, t) {
for (var n = e.length; n-- && -1 < Gt(t, e[n], 0);) ;
return n
}
var nn = Wt({
"À": "A",
"Á": "A",
"Â": "A",
"Ã": "A",
"Ä": "A",
"Å": "A",
"à": "a",
"á": "a",
"â": "a",
"ã": "a",
"ä": "a",
"å": "a",
"Ç": "C",
"ç": "c",
"Ð": "D",
"ð": "d",
"È": "E",
"É": "E",
"Ê": "E",
"Ë": "E",
"è": "e",
"é": "e",
"ê": "e",
"ë": "e",
"Ì": "I",
"Í": "I",
"Î": "I",
"Ï": "I",
"ì": "i",
"í": "i",
"î": "i",
"ï": "i",
"Ñ": "N",
"ñ": "n",
"Ò": "O",
"Ó": "O",
"Ô": "O",
"Õ": "O",
"Ö": "O",
"Ø": "O",
"ò": "o",
"ó": "o",
"ô": "o",
"õ": "o",
"ö": "o",
"ø": "o",
"Ù": "U",
"Ú": "U",
"Û": "U",
"Ü": "U",
"ù": "u",
"ú": "u",
"û": "u",
"ü": "u",
"Ý": "Y",
"ý": "y",
"ÿ": "y",
"Æ": "Ae",
"æ": "ae",
"Þ": "Th",
"þ": "th",
"ß": "ss",
"Ā": "A",
"Ă": "A",
"Ą": "A",
"ā": "a",
"ă": "a",
"ą": "a",
"Ć": "C",
"Ĉ": "C",
"Ċ": "C",
"Č": "C",
"ć": "c",
"ĉ": "c",
"ċ": "c",
"č": "c",
"Ď": "D",
"Đ": "D",
"ď": "d",
"đ": "d",
"Ē": "E",
"Ĕ": "E",
"Ė": "E",
"Ę": "E",
"Ě": "E",
"ē": "e",
"ĕ": "e",
"ė": "e",
"ę": "e",
"ě": "e",
"Ĝ": "G",
"Ğ": "G",
"Ġ": "G",
"Ģ": "G",
"ĝ": "g",
"ğ": "g",
"ġ": "g",
"ģ": "g",
"Ĥ": "H",
"Ħ": "H",
"ĥ": "h",
"ħ": "h",
"Ĩ": "I",
"Ī": "I",
"Ĭ": "I",
"Į": "I",
"İ": "I",
"ĩ": "i",
"ī": "i",
"ĭ": "i",
"į": "i",
"ı": "i",
"Ĵ": "J",
"ĵ": "j",
"Ķ": "K",
"ķ": "k",
"ĸ": "k",
"Ĺ": "L",
"Ļ": "L",
"Ľ": "L",
"Ŀ": "L",
"Ł": "L",
"ĺ": "l",
"ļ": "l",
"ľ": "l",
"ŀ": "l",
"ł": "l",
"Ń": "N",
"Ņ": "N",
"Ň": "N",
"Ŋ": "N",
"ń": "n",
"ņ": "n",
"ň": "n",
"ŋ": "n",
"Ō": "O",
"Ŏ": "O",
"Ő": "O",
"ō": "o",
"ŏ": "o",
"ő": "o",
"Ŕ": "R",
"Ŗ": "R",
"Ř": "R",
"ŕ": "r",
"ŗ": "r",
"ř": "r",
"Ś": "S",
"Ŝ": "S",
"Ş": "S",
"Š": "S",
"ś": "s",
"ŝ": "s",
"ş": "s",
"š": "s",
"Ţ": "T",
"Ť": "T",
"Ŧ": "T",
"ţ": "t",
"ť": "t",
"ŧ": "t",
"Ũ": "U",
"Ū": "U",
"Ŭ": "U",
"Ů": "U",
"Ű": "U",
"Ų": "U",
"ũ": "u",
"ū": "u",
"ŭ": "u",
"ů": "u",
"ű": "u",
"ų": "u",
"Ŵ": "W",
"ŵ": "w",
"Ŷ": "Y",
"ŷ": "y",
"Ÿ": "Y",
"Ź": "Z",
"Ż": "Z",
"Ž": "Z",
"ź": "z",
"ż": "z",
"ž": "z",
"IJ": "IJ",
"ij": "ij",
"Œ": "Oe",
"œ": "oe",
"ʼn": "'n",
"ſ": "s"
}), rn = Wt({"&": "&amp;", "<": "&lt;", ">": "&gt;", '"': "&quot;", "'": "&#39;"});
function sn(e) {
return "\\" + ct[e]
}
function an(e) {
return nt.test(e)
}
function on(e) {
var t = -1, n = Array(e.size);
return e.forEach(function (e, r) {
n[++t] = [r, e]
}), n
}
function cn(e, t) {
return function (n) {
return e(t(n))
}
}
function un(e, t) {
for (var n = -1, r = e.length, i = 0, a = []; ++n < r;) {
var o = e[n];
o !== t && o !== s || (e[n] = s, a[i++] = n)
}
return a
}
function ln(e) {
var t = -1, n = Array(e.size);
return e.forEach(function (e) {
n[++t] = e
}), n
}
function fn(e) {
return (an(e) ? function (e) {
for (var t = et.lastIndex = 0; et.test(e);) ++t;
return t
} : Ft)(e)
}
function pn(e) {
return an(e) ? function (e) {
return e.match(et) || []
}(e) : e.split("")
}
function dn(e) {
for (var t = e.length; t-- && se.test(e.charAt(t));) ;
return t
}
var mn = Wt({"&amp;": "&", "&lt;": "<", "&gt;": ">", "&quot;": '"', "&#39;": "'"}), _n = function e(t) {
var ye = (t = null == t ? pt : _n.defaults(pt.Object(), t, _n.pick(pt, it))).Array, Se = t.Date,
Ce = t.Error, Ne = t.Function, be = t.Math, Ie = t.Object, Oe = t.RegExp, ke = t.String,
Le = t.TypeError, De = ye.prototype, Re = Ne.prototype, we = Ie.prototype, xe = t["__core-js_shared__"],
Me = Re.toString, Pe = we.hasOwnProperty, Be = 0,
Fe = (Re = /[^.]+$/.exec(xe && xe.keys && xe.keys.IE_PROTO || "")) ? "Symbol(src)_1." + Re : "",
Ue = we.toString, He = Me.call(Ie), Ge = pt._,
je = Oe("^" + Me.call(Pe).replace(ne, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"),
Re = _t ? t.Buffer : n, Ye = t.Symbol, Ke = t.Uint8Array, We = Re ? Re.allocUnsafe : n,
Ve = cn(Ie.getPrototypeOf, Ie), $e = Ie.create, Qe = we.propertyIsEnumerable, ze = De.splice,
Xe = Ye ? Ye.isConcatSpreadable : n, et = Ye ? Ye.iterator : n, nt = Ye ? Ye.toStringTag : n,
ct = function () {
try {
var e = fs(Ie, "defineProperty");
return e({}, "", {}), e
} catch (e) {
}
}(), ht = t.clearTimeout !== pt.clearTimeout && t.clearTimeout,
ft = Se && Se.now !== pt.Date.now && Se.now, dt = t.setTimeout !== pt.setTimeout && t.setTimeout,
mt = be.ceil, Et = be.floor, Tt = Ie.getOwnPropertySymbols, Re = Re ? Re.isBuffer : n, Wt = t.isFinite,
En = De.join, Tn = cn(Ie.keys, Ie), An = be.max, gn = be.min, vn = Se.now, yn = t.parseInt,
Sn = be.random, Cn = De.reverse, Se = fs(t, "DataView"), bn = fs(t, "Map"), In = fs(t, "Promise"),
On = fs(t, "Set"), t = fs(t, "WeakMap"), Ln = fs(Ie, "create"), Dn = t && new t, Rn = {}, wn = Fs(Se),
xn = Fs(bn), Mn = Fs(In), Pn = Fs(On), Bn = Fs(t), Un = (Ye = Ye ? Ye.prototype : n) ? Ye.valueOf : n,
Hn = Ye ? Ye.toString : n;
function Gn(e) {
if (to(e) && !Ya(e) && !(e instanceof Kn)) {
if (e instanceof Yn) return e;
if (Pe.call(e, "__wrapped__")) return Us(e)
}
return new Yn(e)
}
var jn = function () {
function e() {
}
return function (t) {
return eo(t) ? $e ? $e(t) : (e.prototype = t, t = new e, e.prototype = n, t) : {}
}
}();
function qn() {
}
function Yn(e, t) {
this.__wrapped__ = e, this.__actions__ = [], this.__chain__ = !!t, this.__index__ = 0, this.__values__ = n
}
function Kn(e) {
this.__wrapped__ = e, this.__actions__ = [], this.__dir__ = 1, this.__filtered__ = !1, this.__iteratees__ = [], this.__takeCount__ = d, this.__views__ = []
}
function Wn(e) {
var t = -1, n = null == e ? 0 : e.length;
for (this.clear(); ++t < n;) {
var r = e[t];
this.set(r[0], r[1])
}
}
function Vn(e) {
var t = -1, n = null == e ? 0 : e.length;
for (this.clear(); ++t < n;) {
var r = e[t];
this.set(r[0], r[1])
}
}
function $n(e) {
var t = -1, n = null == e ? 0 : e.length;
for (this.clear(); ++t < n;) {
var r = e[t];
this.set(r[0], r[1])
}
}
function Qn(e) {
var t = -1, n = null == e ? 0 : e.length;
for (this.__data__ = new $n; ++t < n;) this.add(e[t])
}
function zn(e) {
e = this.__data__ = new Vn(e), this.size = e.size
}
function Xn(e, t) {
var u, n = Ya(e), r = !n && qa(e), i = !n && !r && $a(e), s = !n && !r && !i && uo(e),
a = n || r || i || s, o = a ? Qt(e.length, ke) : [], c = o.length;
for (u in e) !t && !Pe.call(e, u) || a && ("length" == u || i && ("offset" == u || "parent" == u) || s && ("buffer" == u || "byteLength" == u || "byteOffset" == u) || As(u, c)) || o.push(u);
return o
}
function Zn(e) {
var t = e.length;
return t ? e[Qr(0, t - 1)] : n
}
function tr(e, t, r) {
(r === n || Ha(e[t], r)) && (r !== n || t in e) || ar(e, t, r)
}
function nr(e, t, r) {
var i = e[t];
Pe.call(e, t) && Ha(i, r) && (r !== n || t in e) || ar(e, t, r)
}
function rr(e, t) {
for (var n = e.length; n--;) if (Ha(e[n][0], t)) return n;
return -1
}
function ir(e, t, n, r) {
return pr(e, function (e, i, s) {
t(r, e, n(e), s)
}), r
}
function sr(e, t) {
return e && Di(t, Ro(t), e)
}
function ar(e, t, n) {
"__proto__" == t && ct ? ct(e, t, {configurable: !0, enumerable: !0, value: n, writable: !0}) : e[t] = n
}
function or(e, t) {
for (var r = -1, i = t.length, s = ye(i), a = null == e; ++r < i;) s[r] = a ? n : Io(e, t[r]);
return s
}
function cr(e, t, r) {
return e != e || (r !== n && (e = e <= r ? e : r), t === n) || t <= e ? e : t
}
function ur(e, t, r, i, s, a) {
var o, c = 1 & t, u = 2 & t, l = 4 & t;
if ((o = r ? s ? r(e, i, s, a) : r(e) : o) === n) {
if (!eo(e)) return e;
if (i = Ya(e)) {
if (o = function (e) {
var t = e.length, n = new e.constructor(t);
return t && "string" == typeof e[0] && Pe.call(e, "index") && (n.index = e.index, n.input = e.input), n
}(e), !c) return Li(e, o)
} else {
var f = ms(e), p = f == v || f == y;
if ($a(e)) return Ci(e, c);
if (f == N || f == _ || p && !s) {
if (o = u || p ? {} : Es(e), !c) return u ? function (e, t) {
return Di(e, ds(e), t)
}(e, function (e, t) {
return e && Di(t, wo(t), e)
}(o, e)) : function (e, t) {
return Di(e, ps(e), t)
}(e, sr(o, e))
} else {
if (!ot[f]) return s ? e : {};
o = function (e, n) {
var r = e.constructor;
switch (f) {
case R:
return Ni(e);
case T:
case A:
return new r(+e);
case w:
return function (e, t) {
return t = n ? Ni(e.buffer) : e.buffer, new e.constructor(t, e.byteOffset, e.byteLength)
}(e);
case x:
case M:
case P:
case B:
case F:
case U:
case H:
case G:
case j:
return bi(e, n);
case S:
return new r;
case C:
case k:
return new r(e);
case I:
return function (e) {
var t = new e.constructor(e.source, pe.exec(e));
return t.lastIndex = e.lastIndex, t
}(e);
case O:
return new r;
case L:
return Un ? Ie(Un.call(e)) : {}
}
}(e, c)
}
}
if (p = (a = a || new zn).get(e)) return p;
a.set(e, o), ao(e) ? e.forEach(function (n) {
o.add(ur(n, t, r, n, e, a))
}) : no(e) && e.forEach(function (n, i) {
o.set(i, ur(n, t, r, i, e, a))
});
var m = i ? n : (l ? u ? ss : is : u ? wo : Ro)(e);
It(m || e, function (n, i) {
m && (n = e[i = n]), nr(o, i, ur(n, t, r, i, e, a))
})
}
return o
}
function lr(e, t, r) {
var i = r.length;
if (null == e) return !i;
for (e = Ie(e); i--;) {
var s = r[i], a = t[s], o = e[s];
if (o === n && !(s in e) || !a(o)) return !1
}
return !0
}
function hr(e, t, i) {
if ("function" != typeof e) throw new Le(r);
return Ds(function () {
e.apply(n, i)
}, t)
}
function fr(e, t, n, r) {
var i = -1, s = Dt, a = !0, o = e.length, c = [], u = t.length;
if (o) {
n && (t = wt(t, Xt(n))), r ? (s = Rt, a = !1) : 200 <= t.length && (s = Jt, a = !1, t = new Qn(t));
e:for (; ++i < o;) {
var l = e[i], h = null == n ? l : n(l), l = r || 0 !== l ? l : 0;
if (a && h == h) {
for (var f = u; f--;) if (t[f] === h) continue e;
c.push(l)
} else s(t, h, r) || c.push(l)
}
}
return c
}
Gn.templateSettings = {
escape: z,
evaluate: X,
interpolate: Z,
variable: "",
imports: {_: Gn}
}, (Gn.prototype = qn.prototype).constructor = Gn, (Yn.prototype = jn(qn.prototype)).constructor = Yn, (Kn.prototype = jn(qn.prototype)).constructor = Kn, Wn.prototype.clear = function () {
this.__data__ = Ln ? Ln(null) : {}, this.size = 0
}, Wn.prototype.delete = function (e) {
return e = this.has(e) && delete this.__data__[e], this.size -= e ? 1 : 0, e
}, Wn.prototype.get = function (e) {
var r, t = this.__data__;
return Ln ? (r = t[e]) === i ? n : r : Pe.call(t, e) ? t[e] : n
}, Wn.prototype.has = function (e) {
var t = this.__data__;
return Ln ? t[e] !== n : Pe.call(t, e)
}, Wn.prototype.set = function (e, t) {
var r = this.__data__;
return this.size += this.has(e) ? 0 : 1, r[e] = Ln && t === n ? i : t, this
}, Vn.prototype.clear = function () {
this.__data__ = [], this.size = 0
}, Vn.prototype.delete = function (e) {
var t = this.__data__;
return !((e = rr(t, e)) < 0 || (e == t.length - 1 ? t.pop() : ze.call(t, e, 1), --this.size, 0))
}, Vn.prototype.get = function (e) {
var t = this.__data__;
return (e = rr(t, e)) < 0 ? n : t[e][1]
}, Vn.prototype.has = function (e) {
return -1 < rr(this.__data__, e)
}, Vn.prototype.set = function (e, t) {
var n = this.__data__, r = rr(n, e);
return r < 0 ? (++this.size, n.push([e, t])) : n[r][1] = t, this
}, $n.prototype.clear = function () {
this.size = 0, this.__data__ = {hash: new Wn, map: new (bn || Vn), string: new Wn}
}, $n.prototype.delete = function (e) {
return e = ls(this, e).delete(e), this.size -= e ? 1 : 0, e
}, $n.prototype.get = function (e) {
return ls(this, e).get(e)
}, $n.prototype.has = function (e) {
return ls(this, e).has(e)
}, $n.prototype.set = function (e, t) {
var n = ls(this, e), r = n.size;
return n.set(e, t), this.size += n.size == r ? 0 : 1, this
}, Qn.prototype.add = Qn.prototype.push = function (e) {
return this.__data__.set(e, i), this
}, Qn.prototype.has = function (e) {
return this.__data__.has(e)
}, zn.prototype.clear = function () {
this.__data__ = new Vn, this.size = 0
}, zn.prototype.delete = function (e) {
var t = this.__data__, e = t.delete(e);
return this.size = t.size, e
}, zn.prototype.get = function (e) {
return this.__data__.get(e)
}, zn.prototype.has = function (e) {
return this.__data__.has(e)
}, zn.prototype.set = function (e, t) {
var n = this.__data__;
if (n instanceof Vn) {
var r = n.__data__;
if (!bn || r.length < 199) return r.push([e, t]), this.size = ++n.size, this;
n = this.__data__ = new $n(r)
}
return n.set(e, t), this.size = n.size, this
};
var pr = xi(vr), dr = xi(yr, !0);
function _r(e, t, r) {
for (var i = -1, s = e.length; ++i < s;) {
var c, u, a = e[i], o = t(a);
null != o && (c === n ? o == o && !co(o) : r(o, c)) && (c = o, u = a)
}
return u
}
function Er(e, t) {
var n = [];
return pr(e, function (e, r, i) {
t(e, r, i) && n.push(e)
}), n
}
function Tr(e, t, n, r, i) {
var s = -1, a = e.length;
for (n = n || Ts, i = i || []; ++s < a;) {
var o = e[s];
0 < t && n(o) ? 1 < t ? Tr(o, t - 1, n, r, i) : xt(i, o) : r || (i[i.length] = o)
}
return i
}
var Ar = Mi(), gr = Mi(!0);
function vr(e, t) {
return e && Ar(e, t, Ro)
}
function yr(e, t) {
return e && gr(e, t, Ro)
}
function Sr(e, t) {
return Lt(t, function (t) {
return Xa(e[t])
})
}
function Cr(e, t) {
for (var r = 0, i = (t = gi(t, e)).length; null != e && r < i;) e = e[Bs(t[r++])];
return r && r == i ? e : n
}
function Nr(e, t, n) {
return t = t(e), Ya(e) ? t : xt(t, n(e))
}
function br(e) {
return null == e ? e === n ? "[object Undefined]" : "[object Null]" : (nt && nt in Ie(e) ? function (e) {
var t = Pe.call(e, nt), r = e[nt];
try {
e[nt] = n;
var i = !0
} catch (e) {
}
var s = Ue.call(e);
return i && (t ? e[nt] = r : delete e[nt]), s
} : function (e) {
return Ue.call(e)
})(e)
}
function Ir(e, t) {
return t < e
}
function Or(e, t) {
return null != e && Pe.call(e, t)
}
function kr(e, t) {
return null != e && t in Ie(e)
}
function Lr(e, t, r) {
for (var i = r ? Rt : Dt, s = e[0].length, a = e.length, o = a, c = ye(a), u = 1 / 0, l = []; o--;) {
var h = e[o];
o && t && (h = wt(h, Xt(t))), u = gn(h.length, u), c[o] = !r && (t || 120 <= s && 120 <= h.length) ? new Qn(o && h) : n
}
var h = e[0], f = -1, p = c[0];
e:for (; ++f < s && l.length < u;) {
var d = h[f], m = t ? t(d) : d, d = r || 0 !== d ? d : 0;
if (!(p ? Jt(p, m) : i(l, m, r))) {
for (o = a; --o;) {
var _ = c[o];
if (!(_ ? Jt(_, m) : i(e[o], m, r))) continue e
}
p && p.push(m), l.push(d)
}
}
return l
}
function Dr(e, t, r) {
return null == (t = null == (e = Os(e, t = gi(t, e))) ? e : e[Bs(zs(t))]) ? n : Nt(t, e, r)
}
function Rr(e) {
return to(e) && br(e) == _
}
function wr(e, t, r, i, s) {
return e === t || (null == e || null == t || !to(e) && !to(t) ? e != e && t != t : function (e, t, r, i, s, a) {
var o = Ya(e), c = Ya(t), u = o ? E : ms(e), c = c ? E : ms(t), h = (u = u == _ ? N : u) == N,
f = (c = c == _ ? N : c) == N;
if ((c = u == c) && $a(e)) {
if (!$a(t)) return !1;
h = !(o = !0)
}
return c && !h ? (a = a || new zn, o || uo(e) ? ns(e, t, r, i, s, a) : function (e, t, n, r, i, s, a) {
switch (n) {
case w:
if (e.byteLength != t.byteLength || e.byteOffset != t.byteOffset) return !1;
e = e.buffer, t = t.buffer;
case R:
return !(e.byteLength != t.byteLength || !s(new Ke(e), new Ke(t)));
case T:
case A:
case C:
return Ha(+e, +t);
case g:
return e.name == t.name && e.message == t.message;
case I:
case k:
return e == t + "";
case S:
var o = on;
case O:
var u, o = o || ln;
return e.size == t.size || 1 & r ? (u = a.get(e)) ? u == t : (r |= 2, a.set(e, t), u = ns(o(e), o(t), r, i, s, a), a.delete(e), u) : !1;
case L:
if (Un) return Un.call(e) == Un.call(t)
}
return !1
}(e, t, u, r, i, s, a)) : 1 & r || (o = h && Pe.call(e, "__wrapped__"), u = f && Pe.call(t, "__wrapped__"), !o && !u) ? c && function (e, t, r, i, s, a) {
var o = 1 & r, c = is(e), u = c.length;
if (u != is(t).length && !o) return !1;
for (var f = u; f--;) {
var p = c[f];
if (!(o ? p in t : Pe.call(t, p))) return !1
}
var d = a.get(e), m = a.get(t);
if (d && m) return d == t && m == e;
for (var _ = !0, E = (a.set(e, t), a.set(t, e), o); ++f < u;) {
var g, T = e[p = c[f]], A = t[p];
if (!((g = i ? o ? i(A, T, p, t, e, a) : i(T, A, p, e, t, a) : g) === n ? T === A || s(T, A, r, i, a) : g)) {
_ = !1;
break
}
E = E || "constructor" == p
}
return _ && !E && (d = e.constructor) != (m = t.constructor) && "constructor" in e && "constructor" in t && !("function" == typeof d && d instanceof d && "function" == typeof m && m instanceof m) && (_ = !1), a.delete(e), a.delete(t), _
}(e, t, r, i, s, a = a || new zn) : s(o ? e.value() : e, u ? t.value() : t, r, i, a = a || new zn)
}(e, t, r, i, wr, s))
}
function xr(e, t, r, i) {
var s = r.length, a = s, o = !i;
if (null == e) return !a;
for (e = Ie(e); s--;) {
var c = r[s];
if (o && c[2] ? c[1] !== e[c[0]] : !(c[0] in e)) return !1
}
for (; ++s < a;) {
var u = (c = r[s])[0], l = e[u], h = c[1];
if (o && c[2]) {
if (l === n && !(u in e)) return !1
} else {
var p, f = new zn;
if (!((p = i ? i(l, h, u, e, t, f) : p) === n ? wr(h, l, 3, i, f) : p)) return !1
}
}
return !0
}
function Mr(e) {
return !(!eo(e) || function (e) {
return Fe && Fe in e
}(e)) && (Xa(e) ? je : _e).test(Fs(e))
}
function Pr(e) {
return "function" == typeof e ? e : null == e ? ic : "object" == typeof e ? Ya(e) ? jr(e[0], e[1]) : Gr(e) : pc(e)
}
function Br(e) {
if (!Cs(e)) return Tn(e);
var n, t = [];
for (n in Ie(e)) Pe.call(e, n) && "constructor" != n && t.push(n);
return t
}
function Ur(e, t) {
return e < t
}
function Hr(e, t) {
var n = -1, r = Wa(e) ? ye(e.length) : [];
return pr(e, function (e, i, s) {
r[++n] = t(e, i, s)
}), r
}
function Gr(e) {
var t = hs(e);
return 1 == t.length && t[0][2] ? bs(t[0][0], t[0][1]) : function (n) {
return n === e || xr(n, e, t)
}
}
function jr(e, t) {
return vs(e) && Ns(t) ? bs(Bs(e), t) : function (r) {
var i = Io(r, e);
return i === n && i === t ? Oo(r, e) : wr(t, i, 3)
}
}
function qr(e, t, r, i, s) {
e !== t && Ar(t, function (a, o) {
var c;
s = s || new zn, eo(a) ? function (e, t, r, i, s, a, o) {
var p, d, m, c = ks(e, r), u = ks(t, r), l = o.get(u);
l || ((t = (l = a ? a(c, u, r + "", e, t, o) : n) === n) && (d = !(p = Ya(u)) && $a(u), m = !p && !d && uo(u), l = u, p || d || m ? l = Ya(c) ? c : Va(c) ? Li(c) : d ? Ci(u, !(t = !1)) : m ? bi(u, !(t = !1)) : [] : io(u) || qa(u) ? qa(l = c) ? l = To(c) : eo(c) && !Xa(c) || (l = Es(u)) : t = !1), t && (o.set(u, l), s(l, u, i, a, o), o.delete(u))), tr(e, r, l)
}(e, t, o, r, qr, i, s) : (c = i ? i(ks(e, o), a, o + "", e, t, s) : n, tr(e, o, c === n ? a : c))
}, wo)
}
function Yr(e, t) {
var r = e.length;
if (r) return As(t += t < 0 ? r : 0, r) ? e[t] : n
}
function Kr(e, t, n) {
t = t.length ? wt(t, function (e) {
return Ya(e) ? function (t) {
return Cr(t, 1 === e.length ? e[0] : e)
} : e
}) : [ic];
var r = -1;
return t = wt(t, Xt(us())), function (e, t) {
var n = e.length;
for (e.sort(t); n--;) e[n] = e[n].value;
return e
}(Hr(e, function (e, n, i) {
return {
criteria: wt(t, function (t) {
return t(e)
}), index: ++r, value: e
}
}), function (e, t) {
return function (e, t, n) {
for (var r = -1, i = e.criteria, s = t.criteria, a = i.length, o = n.length; ++r < a;) {
var c = Ii(i[r], s[r]);
if (c) return o <= r ? c : c * ("desc" == n[r] ? -1 : 1)
}
return e.index - t.index
}(e, t, n)
})
}
function Wr(e, t, n) {
for (var r = -1, i = t.length, s = {}; ++r < i;) {
var a = t[r], o = Cr(e, a);
n(o, a) && ei(s, gi(a, e), o)
}
return s
}
function Vr(e, t, n, r) {
var i = r ? jt : Gt, s = -1, a = t.length, o = e;
for (e === t && (t = Li(t)), n && (o = wt(e, Xt(n))); ++s < a;) for (var c = 0, u = t[s], l = n ? n(u) : u; -1 < (c = i(o, l, c, r));) o !== e && ze.call(o, c, 1), ze.call(e, c, 1);
return e
}
function $r(e, t) {
for (var n = e ? t.length : 0, r = n - 1; n--;) {
var s, i = t[n];
n != r && i === s || (As(s = i) ? ze.call(e, i, 1) : fi(e, i))
}
}
function Qr(e, t) {
return e + Et(Sn() * (t - e + 1))
}
function zr(e, t) {
var n = "";
if (!(!e || t < 1 || f < t)) for (; t % 2 && (n += e), (t = Et(t / 2)) && (e += e), t;) ;
return n
}
function Xr(e, t) {
return Rs(Is(e, t, ic), e + "")
}
function ei(e, t, r, i) {
if (eo(e)) for (var s = -1, a = (t = gi(t, e)).length, o = a - 1, c = e; null != c && ++s < a;) {
var h, u = Bs(t[s]), l = r;
if ("__proto__" === u || "constructor" === u || "prototype" === u) return e;
nr(c, u, l = s != o && (h = c[u], (l = i ? i(h, u, c) : n) === n) ? eo(h) ? h : As(t[s + 1]) ? [] : {} : l), c = c[u]
}
return e
}
var ti = Dn ? function (e, t) {
return Dn.set(e, t), e
} : ic, Ye = ct ? function (e, t) {
return ct(e, "toString", {configurable: !0, enumerable: !1, value: tc(t), writable: !0})
} : ic;
function ii(e, t, n) {
var r = -1, i = e.length;
(n = i < n ? i : n) < 0 && (n += i), i = n < (t = t < 0 ? i < -t ? 0 : i + t : t) ? 0 : n - t >>> 0, t >>>= 0;
for (var s = ye(i); ++r < i;) s[r] = e[r + t];
return s
}
function ai(e, t, n) {
var r = 0, i = null == e ? r : e.length;
if ("number" == typeof t && t == t && i <= 2147483647) {
for (; r < i;) {
var s = r + i >>> 1, a = e[s];
null !== a && !co(a) && (n ? a <= t : a < t) ? r = 1 + s : i = s
}
return i
}
return oi(e, t, ic, n)
}
function oi(e, t, r, i) {
var s = 0, a = null == e ? 0 : e.length;
if (0 === a) return 0;
for (var o = (t = r(t)) != t, c = null === t, u = co(t), l = t === n; s < a;) {
var h = Et((s + a) / 2), f = r(e[h]), p = f !== n, d = null === f, m = f == f, _ = co(f);
(o ? i || m : l ? m && (i || p) : c ? m && p && (i || !d) : u ? m && p && !d && (i || !_) : !d && !_ && (i ? f <= t : f < t)) ? s = h + 1 : a = h
}
return gn(a, 4294967294)
}
function ci(e, t) {
for (var n = -1, r = e.length, i = 0, s = []; ++n < r;) {
var c, a = e[n], o = t ? t(a) : a;
n && Ha(o, c) || (c = o, s[i++] = 0 === a ? 0 : a)
}
return s
}
function ui(e) {
return "number" == typeof e ? e : co(e) ? p : +e
}
function li(e) {
var t;
return "string" == typeof e ? e : Ya(e) ? wt(e, li) + "" : co(e) ? Hn ? Hn.call(e) : "" : "0" == (t = e + "") && 1 / e == -1 / 0 ? "-0" : t
}
function hi(e, t, n) {
var r = -1, i = Dt, s = e.length, a = !0, o = [], c = o;
if (n) a = !1, i = Rt; else if (200 <= s) {
var u = t ? null : zi(e);
if (u) return ln(u);
a = !1, i = Jt, c = new Qn
} else c = t ? [] : o;
e:for (; ++r < s;) {
var l = e[r], h = t ? t(l) : l, l = n || 0 !== l ? l : 0;
if (a && h == h) {
for (var f = c.length; f--;) if (c[f] === h) continue e;
t && c.push(h), o.push(l)
} else i(c, h, n) || (c !== o && c.push(h), o.push(l))
}
return o
}
function fi(e, t) {
return null == (e = Os(e, t = gi(t, e))) || delete e[Bs(zs(t))]
}
function pi(e, t, n, r) {
return ei(e, t, n(Cr(e, t)), r)
}
function di(e, t, n, r) {
for (var i = e.length, s = r ? i : -1; (r ? s-- : ++s < i) && t(e[s], s, e);) ;
return n ? ii(e, r ? 0 : s, r ? s + 1 : i) : ii(e, r ? s + 1 : 0, r ? i : s)
}
function mi(e, t) {
var n = e;
return Mt(t, function (e, t) {
return t.func.apply(t.thisArg, xt([e], t.args))
}, e instanceof Kn ? e.value() : n)
}
function _i(e, t, n) {
var r = e.length;
if (r < 2) return r ? hi(e[0]) : [];
for (var i = -1, s = ye(r); ++i < r;) for (var a = e[i], o = -1; ++o < r;) o != i && (s[i] = fr(s[i] || a, e[o], t, n));
return hi(Tr(s, 1), t, n)
}
function Ei(e, t, r) {
for (var i = -1, s = e.length, a = t.length, o = {}; ++i < s;) {
var c = i < a ? t[i] : n;
r(o, e[i], c)
}
return o
}
function Ti(e) {
return Va(e) ? e : []
}
function Ai(e) {
return "function" == typeof e ? e : ic
}
function gi(e, t) {
return Ya(e) ? e : vs(e, t) ? [e] : Ps(Ao(e))
}
var vi = Xr;
function yi(e, t, r) {
var i = e.length;
return r = r === n ? i : r, !t && i <= r ? e : ii(e, t, r)
}
var Si = ht || function (e) {
return pt.clearTimeout(e)
};
function Ci(e, t) {
return t ? e.slice() : (t = e.length, t = We ? We(t) : new e.constructor(t), e.copy(t), t)
}
function Ni(e) {
var t = new e.constructor(e.byteLength);
return new Ke(t).set(new Ke(e)), t
}
function bi(e, t) {
return t = t ? Ni(e.buffer) : e.buffer, new e.constructor(t, e.byteOffset, e.length)
}
function Ii(e, t) {
if (e !== t) {
var r = e !== n, i = null === e, s = e == e, a = co(e), o = t !== n, c = null === t, u = t == t,
l = co(t);
if (!c && !l && !a && t < e || a && o && u && !c && !l || i && o && u || !r && u || !s) return 1;
if (!i && !a && !l && e < t || l && r && s && !i && !a || c && r && s || !o && s || !u) return -1
}
return 0
}
function Oi(e, t, n, r) {
for (var i = -1, s = e.length, a = n.length, o = -1, c = t.length, u = An(s - a, 0), l = ye(c + u), h = !r; ++o < c;) l[o] = t[o];
for (; ++i < a;) (h || i < s) && (l[n[i]] = e[i]);
for (; u--;) l[o++] = e[i++];
return l
}
function ki(e, t, n, r) {
for (var i = -1, s = e.length, a = -1, o = n.length, c = -1, u = t.length, l = An(s - o, 0), h = ye(l + u), f = !r; ++i < l;) h[i] = e[i];
for (var p = i; ++c < u;) h[p + c] = t[c];
for (; ++a < o;) (f || i < s) && (h[p + n[a]] = e[i++]);
return h
}
function Li(e, t) {
var n = -1, r = e.length;
for (t = t || ye(r); ++n < r;) t[n] = e[n];
return t
}
function Di(e, t, r, i) {
var s = !r;
r = r || {};
for (var a = -1, o = t.length; ++a < o;) {
var c = t[a], u = i ? i(r[c], e[c], c, r, e) : n;
(s ? ar : nr)(r, c, u === n ? e[c] : u)
}
return r
}
function Ri(e, t) {
return function (n, r) {
var i = Ya(n) ? bt : ir, s = t ? t() : {};
return i(n, e, us(r, 2), s)
}
}
function wi(e) {
return Xr(function (t, r) {
var i = -1, s = r.length, a = 1 < s ? r[s - 1] : n, o = 2 < s ? r[2] : n,
a = 3 < e.length && "function" == typeof a ? (s--, a) : n;
for (o && gs(r[0], r[1], o) && (a = s < 3 ? n : a, s = 1), t = Ie(t); ++i < s;) {
var c = r[i];
c && e(t, c, i, a)
}
return t
})
}
function xi(e, t) {
return function (n, r) {
if (null != n) {
if (!Wa(n)) return e(n, r);
for (var i = n.length, s = t ? i : -1, a = Ie(n); (t ? s-- : ++s < i) && !1 !== r(a[s], s, a);) ;
}
return n
}
}
function Mi(e) {
return function (t, n, r) {
for (var i = -1, s = Ie(t), a = r(t), o = a.length; o--;) {
var c = a[e ? o : ++i];
if (!1 === n(s[c], c, s)) break
}
return t
}
}
function Pi(e) {
return function (t) {
var i = (r = an(t = Ao(t)) ? pn(t) : n) ? r[0] : t.charAt(0),
r = r ? yi(r, 1).join("") : t.slice(1);
return i[e]() + r
}
}
function Bi(e) {
return function (t) {
return Mt(Zo(Yo(t).replace(Ze, "")), e, "")
}
}
function Fi(e) {
return function () {
var t = arguments;
switch (t.length) {
case 0:
return new e;
case 1:
return new e(t[0]);
case 2:
return new e(t[0], t[1]);
case 3:
return new e(t[0], t[1], t[2]);
case 4:
return new e(t[0], t[1], t[2], t[3]);
case 5:
return new e(t[0], t[1], t[2], t[3], t[4]);
case 6:
return new e(t[0], t[1], t[2], t[3], t[4], t[5]);
case 7:
return new e(t[0], t[1], t[2], t[3], t[4], t[5], t[6])
}
var n = jn(e.prototype), r = e.apply(n, t);
return eo(r) ? r : n
}
}
function Ui(e) {
return function (t, r, i) {
var a, s = Ie(t);
return Wa(t) || (a = us(r, 3), t = Ro(t), r = function (e) {
return a(s[e], e, s)
}), -1 < (r = e(t, r, i)) ? s[a ? t[r] : r] : n
}
}
function Hi(e) {
return rs(function (t) {
var i = t.length, s = i, a = Yn.prototype.thru;
for (e && t.reverse(); s--;) {
var o = t[s];
if ("function" != typeof o) throw new Le(r);
a && !c && "wrapper" == os(o) && (c = new Yn([], !0))
}
for (s = c ? s : i; ++s < i;) var u = os(o = t[s]), l = "wrapper" == u ? as(o) : n, c = l && ys(l[0]) && 424 == l[1] && !l[4].length && 1 == l[9] ? c[os(l[0])].apply(c, l[3]) : 1 == o.length && ys(o) ? c[u]() : c.thru(o);
return function () {
var e = arguments, n = e[0];
if (c && 1 == e.length && Ya(n)) return c.plant(n).value();
for (var r = 0, s = i ? t[r].apply(this, e) : n; ++r < i;) s = t[r].call(this, s);
return s
}
})
}
function Gi(e, t, r, i, s, a, o, c, l, h) {
var f = t & u, p = 1 & t, d = 2 & t, m = 24 & t, _ = 512 & t, E = d ? n : Fi(e);
return function u() {
for (var v, y, T = arguments.length, A = ye(T), g = T; g--;) A[g] = arguments[g];
return m && (y = function (e, t) {
for (var n = e.length, r = 0; n--;) e[n] === t && ++r;
return r
}(A, v = cs(u))), i && (A = Oi(A, i, s, m)), a && (A = ki(A, a, o, m)), T -= y, m && T < h ? (y = un(A, v), $i(e, t, Gi, u.placeholder, r, A, y, c, l, h - T)) : (v = p ? r : this, y = d ? v[e] : e, T = A.length, c ? A = function (e, t) {
for (var r = e.length, i = gn(t.length, r), s = Li(e); i--;) {
var a = t[i];
e[i] = As(a, r) ? s[a] : n
}
return e
}(A, c) : _ && 1 < T && A.reverse(), f && l < T && (A.length = l), (y = this && this !== pt && this instanceof u ? E || Fi(y) : y).apply(v, A))
}
}
function ji(e, t) {
return function (n, r) {
return function (e, t, n, r) {
return vr(e, function (e, i, s) {
t(r, n(e), i, s)
}), r
}(n, e, t(r), {})
}
}
function qi(e, t) {
return function (r, i) {
var s;
if (r === n && i === n) return t;
if (r !== n && (s = r), i !== n) {
if (s === n) return i;
i = ("string" == typeof r || "string" == typeof i ? (r = li(r), li) : (r = ui(r), ui))(i), s = e(r, i)
}
return s
}
}
function Yi(e) {
return rs(function (t) {
return t = wt(t, Xt(us())), Xr(function (n) {
var r = this;
return e(t, function (e) {
return Nt(e, r, n)
})
})
})
}
function Ki(e, t) {
var r = (t = t === n ? " " : li(t)).length;
return r < 2 ? r ? zr(t, e) : t : (r = zr(t, mt(e / fn(t))), an(t) ? yi(pn(r), 0, e).join("") : r.slice(0, e))
}
function Wi(e) {
return function (t, r, i) {
return i && "number" != typeof i && gs(t, r, i) && (r = i = n), t = po(t), r === n ? (r = t, t = 0) : r = po(r), function (e, t, n, r) {
for (var i = -1, s = An(mt((t - e) / (n || 1)), 0), a = ye(s); s--;) a[r ? s : ++i] = e, e += n;
return a
}(t, r, i = i === n ? t < r ? 1 : -1 : po(i), e)
}
}
function Vi(e) {
return function (t, n) {
return "string" == typeof t && "string" == typeof n || (t = Eo(t), n = Eo(n)), e(t, n)
}
}
function $i(e, t, r, i, s, a, u, l, h, f) {
var p = 8 & t,
s = (4 & (t = (t | (p ? o : 64)) & ~(p ? 64 : o)) || (t &= -4), [e, t, s, p ? a : n, p ? u : n, p ? n : a, p ? n : u, l, h, f]),
a = r.apply(n, s);
return ys(e) && Ls(a, s), a.placeholder = i, ws(a, e, t)
}
function Qi(e) {
var t = be[e];
return function (e, n) {
var r;
return e = Eo(e), (n = null == n ? 0 : gn(mo(n), 292)) && Wt(e) ? (r = (Ao(e) + "e").split("e"), +((r = (Ao(t(r[0] + "e" + (+r[1] + n))) + "e").split("e"))[0] + "e" + (+r[1] - n))) : t(e)
}
}
var zi = On && 1 / ln(new On([, -0]))[1] == h ? function (e) {
return new On(e)
} : uc;
function Xi(e) {
return function (t) {
var n = ms(t);
return n == S ? on(t) : n == O ? function (e) {
var t = -1, n = Array(e.size);
return e.forEach(function (e) {
n[++t] = [e, e]
}), n
}(t) : function (e, t) {
return wt(t, function (t) {
return [t, e[t]]
})
}(t, e(t))
}
}
function Zi(e, t, i, h, f, p, d, m) {
var E, A, T, _ = 2 & t;
if (_ || "function" == typeof e) return (E = h ? h.length : 0) || (t &= -97, h = f = n), d = d === n ? d : An(mo(d), 0), m = m === n ? m : mo(m), E -= f ? f.length : 0, 64 & t && (T = h, A = f, h = f = n), T = [e, t, i, h, f, T, A, p, d, m], (A = _ ? n : as(e)) && function (e, t) {
var h, n = e[1], r = t[1], i = n | r,
o = r == u && 8 == n || r == u && 256 == n && e[7].length <= t[8] || 384 == r && t[7].length <= t[8] && 8 == n;
(i < 131 || o) && (1 & r && (e[2] = t[2], i |= 1 & n ? 0 : 4), (o = t[3]) && (h = e[3], e[3] = h ? Oi(h, o, t[4]) : o, e[4] = h ? un(e[3], s) : t[4]), (o = t[5]) && (h = e[5], e[5] = h ? ki(h, o, t[6]) : o, e[6] = h ? un(e[5], s) : t[6]), (o = t[7]) && (e[7] = o), r & u && (e[8] = null == e[8] ? t[8] : gn(e[8], t[8])), null == e[9] && (e[9] = t[9]), e[0] = t[0], e[1] = i)
}(T, A), e = T[0], t = T[1], i = T[2], h = T[3], f = T[4], !(m = T[9] = T[9] === n ? _ ? 0 : e.length : An(T[9] - E, 0)) && 24 & t && (t &= -25), p = t && 1 != t ? 8 == t || 16 == t ? function (e, t, r) {
var i = Fi(e);
return function s() {
for (var a = arguments.length, o = ye(a), c = a, u = cs(s); c--;) o[c] = arguments[c];
return (a -= (u = a < 3 && o[0] !== u && o[a - 1] !== u ? [] : un(o, u)).length) < r ? $i(e, t, Gi, s.placeholder, n, o, u, n, n, r - a) : Nt(this && this !== pt && this instanceof s ? i : e, this, o)
}
}(e, t, m) : t != o && 33 != t || f.length ? Gi.apply(n, T) : function (e, t, n, r) {
var i = 1 & t, s = Fi(e);
return function t() {
for (var a = -1, o = arguments.length, c = -1, u = r.length, l = ye(u + o), h = this && this !== pt && this instanceof t ? s : e; ++c < u;) l[c] = r[c];
for (; o--;) l[c++] = arguments[++a];
return Nt(h, i ? n : this, l)
}
}(e, t, i, h) : function (e, t, n) {
var r = 1 & t, i = Fi(e);
return function t() {
return (this && this !== pt && this instanceof t ? i : e).apply(r ? n : this, arguments)
}
}(e, t, i), ws((A ? ti : Ls)(p, T), e, t);
throw new Le(r)
}
function Ji(e, t, r, i) {
return e === n || Ha(e, we[r]) && !Pe.call(i, r) ? t : e
}
function es(e, t, r, i, s, a) {
return eo(e) && eo(t) && (a.set(t, e), qr(e, t, n, es, a), a.delete(t)), e
}
function ts(e) {
return io(e) ? n : e
}
function ns(e, t, r, i, s, a) {
var o = 1 & r, c = e.length;
if (c != (u = t.length) && !(o && c < u)) return !1;
var u = a.get(e), h = a.get(t);
if (u && h) return u == t && h == e;
var f = -1, p = !0, d = 2 & r ? new Qn : n;
for (a.set(e, t), a.set(t, e); ++f < c;) {
var E, m = e[f], _ = t[f];
if ((E = i ? o ? i(_, m, f, t, e, a) : i(m, _, f, e, t, a) : E) !== n) {
if (E) continue;
p = !1;
break
}
if (d) {
if (!Bt(t, function (e, t) {
return !Jt(d, t) && (m === e || s(m, e, r, i, a)) && d.push(t)
})) {
p = !1;
break
}
} else if (m !== _ && !s(m, _, r, i, a)) {
p = !1;
break
}
}
return a.delete(e), a.delete(t), p
}
function rs(e) {
return Rs(Is(e, n, Ks), e + "")
}
function is(e) {
return Nr(e, Ro, ps)
}
function ss(e) {
return Nr(e, wo, ds)
}
var as = Dn ? function (e) {
return Dn.get(e)
} : uc;
function os(e) {
for (var t = e.name + "", n = Rn[t], r = Pe.call(Rn, t) ? n.length : 0; r--;) {
var i = n[r], s = i.func;
if (null == s || s == e) return i.name
}
return t
}
function cs(e) {
return (Pe.call(Gn, "placeholder") ? Gn : e).placeholder
}
function us() {
var e = (e = Gn.iteratee || sc) === sc ? Pr : e;
return arguments.length ? e(arguments[0], arguments[1]) : e
}
function ls(e, t) {
var r, e = e.__data__;
return ("string" == (r = typeof t) || "number" == r || "symbol" == r || "boolean" == r ? "__proto__" !== t : null === t) ? e["string" == typeof t ? "string" : "hash"] : e.map
}
function hs(e) {
for (var t = Ro(e), n = t.length; n--;) {
var r = t[n], i = e[r];
t[n] = [r, i, Ns(i)]
}
return t
}
function fs(e, t) {
return Mr(e = function (e, t) {
return null == e ? n : e[t]
}(e, t)) ? e : n
}
var ps = Tt ? function (e) {
return null == e ? [] : (e = Ie(e), Lt(Tt(e), function (t) {
return Qe.call(e, t)
}))
} : _c, ds = Tt ? function (e) {
for (var t = []; e;) xt(t, ps(e)), e = Ve(e);
return t
} : _c, ms = br;
function _s(e, t, n) {
for (var r = -1, i = (t = gi(t, e)).length, s = !1; ++r < i;) {
var a = Bs(t[r]);
if (!(s = null != e && n(e, a))) break;
e = e[a]
}
return s || ++r != i ? s : !!(i = null == e ? 0 : e.length) && Ja(i) && As(a, i) && (Ya(e) || qa(e))
}
function Es(e) {
return "function" != typeof e.constructor || Cs(e) ? {} : jn(Ve(e))
}
function Ts(e) {
return Ya(e) || qa(e) || !!(Xe && e && e[Xe])
}
function As(e, t) {
var n = typeof e;
return !!(t = null == t ? f : t) && ("number" == n || "symbol" != n && Te.test(e)) && -1 < e && e % 1 == 0 && e < t
}
function gs(e, t, n) {
var r;
return !!eo(n) && !!("number" == (r = typeof t) ? Wa(n) && As(t, n.length) : "string" == r && t in n) && Ha(n[t], e)
}
function vs(e, t) {
var n;
return !Ya(e) && ("number" == (n = typeof e) || "symbol" == n || "boolean" == n || null == e || co(e) || ee.test(e) || !J.test(e) || null != t && e in Ie(t))
}
function ys(e) {
var t = os(e), n = Gn[t];
return "function" == typeof n && t in Kn.prototype && (e === n || (t = as(n)) && e === t[0])
}
(Se && ms(new Se(new ArrayBuffer(1))) != w || bn && ms(new bn) != S || In && ms(In.resolve()) != b || On && ms(new On) != O || t && ms(new t) != D) && (ms = function (e) {
var t = br(e);
if (e = (e = t == N ? e.constructor : n) ? Fs(e) : "") switch (e) {
case wn:
return w;
case xn:
return S;
case Mn:
return b;
case Pn:
return O;
case Bn:
return D
}
return t
});
var Ss = xe ? Xa : Ec;
function Cs(e) {
var t = e && e.constructor;
return e === ("function" == typeof t && t.prototype || we)
}
function Ns(e) {
return e == e && !eo(e)
}
function bs(e, t) {
return function (r) {
return null != r && r[e] === t && (t !== n || e in Ie(r))
}
}
function Is(e, t, r) {
return t = An(t === n ? e.length - 1 : t, 0), function () {
for (var n = arguments, i = -1, s = An(n.length - t, 0), a = ye(s); ++i < s;) a[i] = n[t + i];
for (var i = -1, o = ye(t + 1); ++i < t;) o[i] = n[i];
return o[t] = r(a), Nt(e, this, o)
}
}
function Os(e, t) {
return t.length < 2 ? e : Cr(e, ii(t, 0, -1))
}
function ks(e, t) {
if (("constructor" !== t || "function" != typeof e[t]) && "__proto__" != t) return e[t]
}
var Ls = xs(ti), Ds = dt || function (e, t) {
return pt.setTimeout(e, t)
}, Rs = xs(Ye);
function ws(e, t, n) {
var r = t + "";
return Rs(e, function (e, t) {
var r, n = t.length;
return n ? (t[r = n - 1] = (1 < n ? "& " : "") + t[r], t = t.join(2 < n ? ", " : " "), e.replace(ae, "{\n/* [wrapped with " + t + "] */\n")) : e
}(r, function (e, t) {
return It(m, function (n) {
var r = "_." + n[0];
t & n[1] && !Dt(e, r) && e.push(r)
}), e.sort()
}(function () {
var t = r.match(oe);
return t ? t[1].split(ce) : []
}(), n)))
}
function xs(e) {
var t = 0, r = 0;
return function () {
var i = vn(), s = 16 - (i - r);
if (r = i, 0 < s) {
if (800 <= ++t) return arguments[0]
} else t = 0;
return e.apply(n, arguments)
}
}
function Ms(e, t) {
var r = -1, i = e.length, s = i - 1;
for (t = t === n ? i : t; ++r < t;) {
var a = Qr(r, s), o = e[a];
e[a] = e[r], e[r] = o
}
return e.length = t, e
}
var Ps = function () {
var t = xa(function (e) {
var t = [];
return 46 === e.charCodeAt(0) && t.push(""), e.replace(te, function (e, n, r, i) {
t.push(r ? i.replace(he, "$1") : n || e)
}), t
}, function (e) {
return 500 === n.size && n.clear(), e
}), n = t.cache;
return t
}();
function Bs(e) {
var t;
return "string" == typeof e || co(e) ? e : "0" == (t = e + "") && 1 / e == -1 / 0 ? "-0" : t
}
function Fs(e) {
if (null != e) {
try {
return Me.call(e)
} catch (e) {
}
try {
return e + ""
} catch (e) {
}
}
return ""
}
function Us(e) {
var t;
return e instanceof Kn ? e.clone() : ((t = new Yn(e.__wrapped__, e.__chain__)).__actions__ = Li(e.__actions__), t.__index__ = e.__index__, t.__values__ = e.__values__, t)
}
function qs(e, t, n) {
var r = null == e ? 0 : e.length;
return r ? ((n = null == n ? 0 : mo(n)) < 0 && (n = An(r + n, 0)), Ht(e, us(t, 3), n)) : -1
}
function Ys(e, t, r) {
var s, i = null == e ? 0 : e.length;
return i ? (s = i - 1, r !== n && (s = mo(r), s = r < 0 ? An(i + s, 0) : gn(s, i - 1)), Ht(e, us(t, 3), s, !0)) : -1
}
function Ks(e) {
return null != e && e.length ? Tr(e, 1) : []
}
function Ws(e) {
return e && e.length ? e[0] : n
}
function zs(e) {
var t = null == e ? 0 : e.length;
return t ? e[t - 1] : n
}
function Zs(e, t) {
return e && e.length && t && t.length ? Vr(e, t) : e
}
ht = Xr(function (e, t) {
return Va(e) ? fr(e, Tr(t, 1, Va, !0)) : []
}), Se = Xr(function (e, t) {
var r = zs(t);
return Va(r) && (r = n), Va(e) ? fr(e, Tr(t, 1, Va, !0), us(r, 2)) : []
}), In = Xr(function (e, t) {
var r = zs(t);
return Va(r) && (r = n), Va(e) ? fr(e, Tr(t, 1, Va, !0), n, r) : []
}), t = Xr(function (e) {
var t = wt(e, Ti);
return t.length && t[0] === e[0] ? Lr(t) : []
}), xe = Xr(function (e) {
var t = zs(e), r = wt(e, Ti);
return t === zs(r) ? t = n : r.pop(), r.length && r[0] === e[0] ? Lr(r, us(t, 2)) : []
}), dt = Xr(function (e) {
var t = zs(e), r = wt(e, Ti);
return (t = "function" == typeof t ? t : n) && r.pop(), r.length && r[0] === e[0] ? Lr(r, n, t) : []
}), Ye = Xr(Zs);
var Js = rs(function (e, t) {
var n = null == e ? 0 : e.length, r = or(e, t);
return $r(e, wt(t, function (e) {
return As(e, n) ? +e : e
}).sort(Ii)), r
});
function ea(e) {
return null == e ? e : Cn.call(e)
}
var ta = Xr(function (e) {
return hi(Tr(e, 1, Va, !0))
}), na = Xr(function (e) {
var t = zs(e);
return Va(t) && (t = n), hi(Tr(e, 1, Va, !0), us(t, 2))
}), ra = Xr(function (e) {
var t = "function" == typeof (t = zs(e)) ? t : n;
return hi(Tr(e, 1, Va, !0), n, t)
});
function ia(e) {
var t;
return e && e.length ? (t = 0, e = Lt(e, function (e) {
if (Va(e)) return t = An(e.length, t), !0
}), Qt(t, function (t) {
return wt(e, Kt(t))
})) : []
}
function sa(e, t) {
return e && e.length ? (e = ia(e), null == t ? e : wt(e, function (e) {
return Nt(t, n, e)
})) : []
}
var aa = Xr(function (e, t) {
return Va(e) ? fr(e, t) : []
}), oa = Xr(function (e) {
return _i(Lt(e, Va))
}), ca = Xr(function (e) {
var t = zs(e);
return Va(t) && (t = n), _i(Lt(e, Va), us(t, 2))
}), ua = Xr(function (e) {
var t = "function" == typeof (t = zs(e)) ? t : n;
return _i(Lt(e, Va), n, t)
}), la = Xr(ia), ha = Xr(function (e) {
var t = "function" == typeof (t = 1 < (t = e.length) ? e[t - 1] : n) ? (e.pop(), t) : n;
return sa(e, t)
});
function fa(e) {
return (e = Gn(e)).__chain__ = !0, e
}
function pa(e, t) {
return t(e)
}
var da = rs(function (e) {
function s(t) {
return or(t, e)
}
var t = e.length, r = t ? e[0] : 0, i = this.__wrapped__;
return !(1 < t || this.__actions__.length) && i instanceof Kn && As(r) ? ((i = i.slice(r, +r + (t ? 1 : 0))).__actions__.push({
func: pa,
args: [s],
thisArg: n
}), new Yn(i, this.__chain__).thru(function (e) {
return t && !e.length && e.push(n), e
})) : this.thru(s)
}), ma = Ri(function (e, t, n) {
Pe.call(e, n) ? ++e[n] : ar(e, n, 1)
}), _a = Ui(qs), Ea = Ui(Ys);
function Ta(e, t) {
return (Ya(e) ? It : pr)(e, us(t, 3))
}
function Aa(e, t) {
return (Ya(e) ? function (e, t) {
for (var n = null == e ? 0 : e.length; n-- && !1 !== t(e[n], n, e);) ;
return e
} : dr)(e, us(t, 3))
}
var ga = Ri(function (e, t, n) {
Pe.call(e, n) ? e[n].push(t) : ar(e, n, [t])
}), va = Xr(function (e, t, n) {
var r = -1, i = "function" == typeof t, s = Wa(e) ? ye(e.length) : [];
return pr(e, function (e) {
s[++r] = i ? Nt(t, e, n) : Dr(e, t, n)
}), s
}), ya = Ri(function (e, t, n) {
ar(e, n, t)
});
function Sa(e, t) {
return (Ya(e) ? wt : Hr)(e, us(t, 3))
}
var Ca = Ri(function (e, t, n) {
e[n ? 0 : 1].push(t)
}, function () {
return [[], []]
}), Na = Xr(function (e, t) {
var n;
return null == e ? [] : (1 < (n = t.length) && gs(e, t[0], t[1]) ? t = [] : 2 < n && gs(t[0], t[1], t[2]) && (t = [t[0]]), Kr(e, Tr(t, 1), []))
}), ba = ft || function () {
return pt.Date.now()
};
function Ia(e, t, r) {
return t = r ? n : t, t = e && null == t ? e.length : t, Zi(e, u, n, n, n, n, t)
}
function Oa(e, t) {
var i;
if ("function" != typeof t) throw new Le(r);
return e = mo(e), function () {
return 0 < --e && (i = t.apply(this, arguments)), e <= 1 && (t = n), i
}
}
var ka = Xr(function (e, t, n) {
var i, r = 1;
return n.length && (i = un(n, cs(ka)), r |= o), Zi(e, r, t, n, i)
}), La = Xr(function (e, t, n) {
var i, r = 3;
return n.length && (i = un(n, cs(La)), r |= o), Zi(t, r, e, n, i)
});
function Da(e, t, i) {
var s, a, o, c, u, l, h = 0, f = !1, p = !1, d = !0;
if ("function" != typeof e) throw new Le(r);
function m(t) {
var r = s, i = a;
return s = a = n, h = t, c = e.apply(i, r)
}
function _(e) {
var r = e - l;
return l === n || t <= r || r < 0 || p && o <= e - h
}
function E() {
var e = ba();
if (_(e)) return T(e);
u = Ds(E, function (e) {
var n = t - (e - l);
return p ? gn(n, o - (e - h)) : n
}(e))
}
function T(e) {
return u = n, d && s ? m(e) : (s = a = n, c)
}
function A() {
var e = ba(), r = _(e);
if (s = arguments, a = this, l = e, r) {
if (u === n) return function (e) {
return h = e, u = Ds(E, t), f ? m(e) : c
}(l);
if (p) return Si(u), u = Ds(E, t), m(l)
}
return u === n && (u = Ds(E, t)), c
}
return t = Eo(t) || 0, eo(i) && (f = !!i.leading, o = (p = "maxWait" in i) ? An(Eo(i.maxWait) || 0, t) : o, d = "trailing" in i ? !!i.trailing : d), A.cancel = function () {
u !== n && Si(u), h = 0, s = l = a = u = n
}, A.flush = function () {
return u === n ? c : T(ba())
}, A
}
var ft = Xr(function (e, t) {
return hr(e, 1, t)
}), wa = Xr(function (e, t, n) {
return hr(e, Eo(t) || 0, n)
});
function xa(e, t) {
if ("function" != typeof e || null != t && "function" != typeof t) throw new Le(r);
function n() {
var r = arguments, i = t ? t.apply(this, r) : r[0], s = n.cache;
return s.has(i) ? s.get(i) : (r = e.apply(this, r), n.cache = s.set(i, r) || s, r)
}
return n.cache = new (xa.Cache || $n), n
}
function Ma(e) {
if ("function" != typeof e) throw new Le(r);
return function () {
var t = arguments;
switch (t.length) {
case 0:
return !e.call(this);
case 1:
return !e.call(this, t[0]);
case 2:
return !e.call(this, t[0], t[1]);
case 3:
return !e.call(this, t[0], t[1], t[2])
}
return !e.apply(this, t)
}
}
xa.Cache = $n;
var vi = vi(function (e, t) {
var n = (t = 1 == t.length && Ya(t[0]) ? wt(t[0], Xt(us())) : wt(Tr(t, 1), Xt(us()))).length;
return Xr(function (r) {
for (var i = -1, s = gn(r.length, n); ++i < s;) r[i] = t[i].call(this, r[i]);
return Nt(e, this, r)
})
}), Ba = Xr(function (e, t) {
var r = un(t, cs(Ba));
return Zi(e, o, n, t, r)
}), Fa = Xr(function (e, t) {
var r = un(t, cs(Fa));
return Zi(e, 64, n, t, r)
}), Ua = rs(function (e, t) {
return Zi(e, 256, n, n, n, t)
});
function Ha(e, t) {
return e === t || e != e && t != t
}
var Ga = Vi(Ir), ja = Vi(function (e, t) {
return t <= e
}), qa = Rr(function () {
return arguments
}()) ? Rr : function (e) {
return to(e) && Pe.call(e, "callee") && !Qe.call(e, "callee")
}, Ya = ye.isArray, Ka = At ? Xt(At) : function (e) {
return to(e) && br(e) == R
};
function Wa(e) {
return null != e && Ja(e.length) && !Xa(e)
}
function Va(e) {
return to(e) && Wa(e)
}
var $a = Re || Ec, Re = gt ? Xt(gt) : function (e) {
return to(e) && br(e) == A
};
function za(e) {
var t;
return !!to(e) && ((t = br(e)) == g || "[object DOMException]" == t || "string" == typeof e.message && "string" == typeof e.name && !io(e))
}
function Xa(e) {
return !!eo(e) && ((e = br(e)) == v || e == y || "[object AsyncFunction]" == e || "[object Proxy]" == e)
}
function Za(e) {
return "number" == typeof e && e == mo(e)
}
function Ja(e) {
return "number" == typeof e && -1 < e && e % 1 == 0 && e <= f
}
function eo(e) {
var t = typeof e;
return null != e && ("object" == t || "function" == t)
}
function to(e) {
return null != e && "object" == typeof e
}
var no = vt ? Xt(vt) : function (e) {
return to(e) && ms(e) == S
};
function ro(e) {
return "number" == typeof e || to(e) && br(e) == C
}
function io(e) {
return !(!to(e) || br(e) != N) && (null === (e = Ve(e)) || "function" == typeof (e = Pe.call(e, "constructor") && e.constructor) && e instanceof e && Me.call(e) == He)
}
var so = yt ? Xt(yt) : function (e) {
return to(e) && br(e) == I
}, ao = St ? Xt(St) : function (e) {
return to(e) && ms(e) == O
};
function oo(e) {
return "string" == typeof e || !Ya(e) && to(e) && br(e) == k
}
function co(e) {
return "symbol" == typeof e || to(e) && br(e) == L
}
var uo = Ct ? Xt(Ct) : function (e) {
return to(e) && Ja(e.length) && !!at[br(e)]
}, lo = Vi(Ur), ho = Vi(function (e, t) {
return e <= t
});
function fo(e) {
var t;
return e ? Wa(e) ? (oo(e) ? pn : Li)(e) : et && e[et] ? function (e) {
for (var t, n = []; !(t = e.next()).done;) n.push(t.value);
return n
}(e[et]()) : ((t = ms(e)) == S ? on : t == O ? ln : Go)(e) : []
}
function po(e) {
return e ? (e = Eo(e)) === h || e === -1 / 0 ? 17976931348623157e292 * (e < 0 ? -1 : 1) : e == e ? e : 0 : 0 === e ? e : 0
}
function mo(e) {
var n = (e = po(e)) % 1;
return e == e ? n ? e - n : e : 0
}
function _o(e) {
return e ? cr(mo(e), 0, d) : 0
}
function Eo(e) {
if ("number" == typeof e) return e;
if (co(e)) return p;
if ("string" != typeof (e = eo(e) ? eo(t = "function" == typeof e.valueOf ? e.valueOf() : e) ? t + "" : t : e)) return 0 === e ? e : +e;
e = zt(e);
var t = me.test(e);
return t || Ee.test(e) ? lt(e.slice(2), t ? 2 : 8) : de.test(e) ? p : +e
}
function To(e) {
return Di(e, wo(e))
}
function Ao(e) {
return null == e ? "" : li(e)
}
var go = wi(function (e, t) {
if (Cs(t) || Wa(t)) Di(t, Ro(t), e); else for (var n in t) Pe.call(t, n) && nr(e, n, t[n])
}), vo = wi(function (e, t) {
Di(t, wo(t), e)
}), yo = wi(function (e, t, n, r) {
Di(t, wo(t), e, r)
}), So = wi(function (e, t, n, r) {
Di(t, Ro(t), e, r)
}), Co = rs(or), No = Xr(function (e, t) {
e = Ie(e);
var r = -1, i = t.length, s = 2 < i ? t[2] : n;
for (s && gs(t[0], t[1], s) && (i = 1); ++r < i;) for (var a = t[r], o = wo(a), c = -1, u = o.length; ++c < u;) {
var l = o[c], h = e[l];
(h === n || Ha(h, we[l]) && !Pe.call(e, l)) && (e[l] = a[l])
}
return e
}), bo = Xr(function (e) {
return e.push(n, es), Nt(Mo, n, e)
});
function Io(e, t, r) {
return (e = null == e ? n : Cr(e, t)) === n ? r : e
}
function Oo(e, t) {
return null != e && _s(e, t, kr)
}
var ko = ji(function (e, t, n) {
e[t = null != t && "function" != typeof t.toString ? Ue.call(t) : t] = n
}, tc(ic)), Lo = ji(function (e, t, n) {
null != t && "function" != typeof t.toString && (t = Ue.call(t)), Pe.call(e, t) ? e[t].push(n) : e[t] = [n]
}, us), Do = Xr(Dr);
function Ro(e) {
return (Wa(e) ? Xn : Br)(e)
}
function wo(e) {
return Wa(e) ? Xn(e, !0) : function (e) {
if (!eo(e)) return function (e) {
var t = [];
if (null != e) for (var n in Ie(e)) t.push(n);
return t
}(e);
var r, t = Cs(e), n = [];
for (r in e) ("constructor" != r || !t && Pe.call(e, r)) && n.push(r);
return n
}(e)
}
var xo = wi(function (e, t, n) {
qr(e, t, n)
}), Mo = wi(function (e, t, n, r) {
qr(e, t, n, r)
}), Po = rs(function (e, t) {
var n = {};
if (null != e) {
var r = !1;
t = wt(t, function (t) {
return t = gi(t, e), r = r || 1 < t.length, t
}), Di(e, ss(e), n), r && (n = ur(n, 7, ts));
for (var i = t.length; i--;) fi(n, t[i])
}
return n
}), Bo = rs(function (e, t) {
return null == e ? {} : function (e, t) {
return Wr(e, t, function (t, n) {
return Oo(e, n)
})
}(e, t)
});
function Fo(e, t) {
var n;
return null == e ? {} : (n = wt(ss(e), function (e) {
return [e]
}), t = us(t), Wr(e, n, function (e, n) {
return t(e, n[0])
}))
}
var Uo = Xi(Ro), Ho = Xi(wo);
function Go(e) {
return null == e ? [] : Zt(e, Ro(e))
}
var jo = Bi(function (e, t, n) {
return t = t.toLowerCase(), e + (n ? qo(t) : t)
});
function qo(e) {
return Xo(Ao(e).toLowerCase())
}
function Yo(e) {
return (e = Ao(e)) && e.replace(Ae, nn).replace(Je, "")
}
var Ko = Bi(function (e, t, n) {
return e + (n ? "-" : "") + t.toLowerCase()
}), Wo = Bi(function (e, t, n) {
return e + (n ? " " : "") + t.toLowerCase()
}), Vo = Pi("toLowerCase"), $o = Bi(function (e, t, n) {
return e + (n ? "_" : "") + t.toLowerCase()
}), Qo = Bi(function (e, t, n) {
return e + (n ? " " : "") + Xo(t)
}), zo = Bi(function (e, t, n) {
return e + (n ? " " : "") + t.toUpperCase()
}), Xo = Pi("toUpperCase");
function Zo(e, t, r) {
return e = Ao(e), (t = r ? n : t) === n ? (function (e) {
return rt.test(e)
}(e) ? function (e) {
return e.match(tt) || []
} : function (e) {
return e.match(ue) || []
})(e) : e.match(t) || []
}
var Jo = Xr(function (e, t) {
try {
return Nt(e, n, t)
} catch (e) {
return za(e) ? e : new Ce(e)
}
}), ec = rs(function (e, t) {
return It(t, function (t) {
t = Bs(t), ar(e, t, ka(e[t], e))
}), e
});
function tc(e) {
return function () {
return e
}
}
var nc = Hi(), rc = Hi(!0);
function ic(e) {
return e
}
function sc(e) {
return Pr("function" == typeof e ? e : ur(e, 1))
}
var ac = Xr(function (e, t) {
return function (n) {
return Dr(n, e, t)
}
}), oc = Xr(function (e, t) {
return function (n) {
return Dr(e, n, t)
}
});
function cc(e, t, n) {
var r = Ro(t), i = Sr(t, r),
s = (null != n || eo(t) && (i.length || !r.length) || (n = t, t = e, e = this, i = Sr(t, Ro(t))), !(eo(n) && "chain" in n && !n.chain)),
a = Xa(e);
return It(i, function (n) {
var r = t[n];
e[n] = r, a && (e.prototype[n] = function () {
var n, t = this.__chain__;
return s || t ? (((n = e(this.__wrapped__)).__actions__ = Li(this.__actions__)).push({
func: r,
args: arguments,
thisArg: e
}), n.__chain__ = t, n) : r.apply(e, xt([this.value()], arguments))
})
}), e
}
function uc() {
}
var lc = Yi(wt), hc = Yi(kt), fc = Yi(Bt);
function pc(e) {
return vs(e) ? Kt(Bs(e)) : function (e) {
return function (t) {
return Cr(t, e)
}
}(e)
}
var dc = Wi(), mc = Wi(!0);
function _c() {
return []
}
function Ec() {
return !1
}
var yc, Tc = qi(function (e, t) {
return e + t
}, 0), Ac = Qi("ceil"), gc = qi(function (e, t) {
return e / t
}, 1), vc = Qi("floor"), Sc = qi(function (e, t) {
return e * t
}, 1), Cc = Qi("round"), Nc = qi(function (e, t) {
return e - t
}, 0);
return Gn.after = function (e, t) {
if ("function" != typeof t) throw new Le(r);
return e = mo(e), function () {
if (--e < 1) return t.apply(this, arguments)
}
}, Gn.ary = Ia, Gn.assign = go, Gn.assignIn = vo, Gn.assignInWith = yo, Gn.assignWith = So, Gn.at = Co, Gn.before = Oa, Gn.bind = ka, Gn.bindAll = ec, Gn.bindKey = La, Gn.castArray = function () {
var e;
return arguments.length ? Ya(e = arguments[0]) ? e : [e] : []
}, Gn.chain = fa, Gn.chunk = function (e, t, r) {
t = (r ? gs(e, t, r) : t === n) ? 1 : An(mo(t), 0);
var i = null == e ? 0 : e.length;
if (!i || t < 1) return [];
for (var s = 0, a = 0, o = ye(mt(i / t)); s < i;) o[a++] = ii(e, s, s += t);
return o
}, Gn.compact = function (e) {
for (var t = -1, n = null == e ? 0 : e.length, r = 0, i = []; ++t < n;) {
var s = e[t];
s && (i[r++] = s)
}
return i
}, Gn.concat = function () {
var e = arguments.length;
if (!e) return [];
for (var t = ye(e - 1), n = arguments[0], r = e; r--;) t[r - 1] = arguments[r];
return xt(Ya(n) ? Li(n) : [n], Tr(t, 1))
}, Gn.cond = function (e) {
var t = null == e ? 0 : e.length, n = us();
return e = t ? wt(e, function (e) {
if ("function" != typeof e[1]) throw new Le(r);
return [n(e[0]), e[1]]
}) : [], Xr(function (n) {
for (var r = -1; ++r < t;) {
var i = e[r];
if (Nt(i[0], this, n)) return Nt(i[1], this, n)
}
})
}, Gn.conforms = function (e) {
return function (e) {
var t = Ro(e);
return function (n) {
return lr(n, e, t)
}
}(ur(e, 1))
}, Gn.constant = tc, Gn.countBy = ma, Gn.create = function (e, t) {
return e = jn(e), null == t ? e : sr(e, t)
}, Gn.curry = function e(t, r, i) {
return (t = Zi(t, 8, n, n, n, n, n, r = i ? n : r)).placeholder = e.placeholder, t
}, Gn.curryRight = function e(t, r, i) {
return (t = Zi(t, 16, n, n, n, n, n, r = i ? n : r)).placeholder = e.placeholder, t
}, Gn.debounce = Da, Gn.defaults = No, Gn.defaultsDeep = bo, Gn.defer = ft, Gn.delay = wa, Gn.difference = ht, Gn.differenceBy = Se, Gn.differenceWith = In, Gn.drop = function (e, t, r) {
var i = null == e ? 0 : e.length;
return i ? ii(e, (t = r || t === n ? 1 : mo(t)) < 0 ? 0 : t, i) : []
}, Gn.dropRight = function (e, t, r) {
var i = null == e ? 0 : e.length;
return i ? ii(e, 0, (t = i - (r || t === n ? 1 : mo(t))) < 0 ? 0 : t) : []
}, Gn.dropRightWhile = function (e, t) {
return e && e.length ? di(e, us(t, 3), !0, !0) : []
}, Gn.dropWhile = function (e, t) {
return e && e.length ? di(e, us(t, 3), !0) : []
}, Gn.fill = function (e, t, r, i) {
var s = null == e ? 0 : e.length;
return s ? (r && "number" != typeof r && gs(e, t, r) && (r = 0, i = s), function (e, t, r, i) {
var s = e.length;
for ((r = mo(r)) < 0 && (r = s < -r ? 0 : s + r), (i = i === n || s < i ? s : mo(i)) < 0 && (i += s), i = i < r ? 0 : _o(i); r < i;) e[r++] = t;
return e
}(e, t, r, i)) : []
}, Gn.filter = function (e, t) {
return (Ya(e) ? Lt : Er)(e, us(t, 3))
}, Gn.flatMap = function (e, t) {
return Tr(Sa(e, t), 1)
}, Gn.flatMapDeep = function (e, t) {
return Tr(Sa(e, t), h)
}, Gn.flatMapDepth = function (e, t, r) {
return r = r === n ? 1 : mo(r), Tr(Sa(e, t), r)
}, Gn.flatten = Ks, Gn.flattenDeep = function (e) {
return null != e && e.length ? Tr(e, h) : []
}, Gn.flattenDepth = function (e, t) {
return null != e && e.length ? Tr(e, t = t === n ? 1 : mo(t)) : []
}, Gn.flip = function (e) {
return Zi(e, 512)
}, Gn.flow = nc, Gn.flowRight = rc, Gn.fromPairs = function (e) {
for (var t = -1, n = null == e ? 0 : e.length, r = {}; ++t < n;) {
var i = e[t];
r[i[0]] = i[1]
}
return r
}, Gn.functions = function (e) {
return null == e ? [] : Sr(e, Ro(e))
}, Gn.functionsIn = function (e) {
return null == e ? [] : Sr(e, wo(e))
}, Gn.groupBy = ga, Gn.initial = function (e) {
return null != e && e.length ? ii(e, 0, -1) : []
}, Gn.intersection = t, Gn.intersectionBy = xe, Gn.intersectionWith = dt, Gn.invert = ko, Gn.invertBy = Lo, Gn.invokeMap = va, Gn.iteratee = sc, Gn.keyBy = ya, Gn.keys = Ro, Gn.keysIn = wo, Gn.map = Sa, Gn.mapKeys = function (e, t) {
var n = {};
return t = us(t, 3), vr(e, function (e, r, i) {
ar(n, t(e, r, i), e)
}), n
}, Gn.mapValues = function (e, t) {
var n = {};
return t = us(t, 3), vr(e, function (e, r, i) {
ar(n, r, t(e, r, i))
}), n
}, Gn.matches = function (e) {
return Gr(ur(e, 1))
}, Gn.matchesProperty = function (e, t) {
return jr(e, ur(t, 1))
}, Gn.memoize = xa, Gn.merge = xo, Gn.mergeWith = Mo, Gn.method = ac, Gn.methodOf = oc, Gn.mixin = cc, Gn.negate = Ma, Gn.nthArg = function (e) {
return e = mo(e), Xr(function (t) {
return Yr(t, e)
})
}, Gn.omit = Po, Gn.omitBy = function (e, t) {
return Fo(e, Ma(us(t)))
}, Gn.once = function (e) {
return Oa(2, e)
}, Gn.orderBy = function (e, t, r, i) {
return null == e ? [] : Kr(e, t = Ya(t) ? t : null == t ? [] : [t], r = Ya(r = i ? n : r) ? r : null == r ? [] : [r])
}, Gn.over = lc, Gn.overArgs = vi, Gn.overEvery = hc, Gn.overSome = fc, Gn.partial = Ba, Gn.partialRight = Fa, Gn.partition = Ca, Gn.pick = Bo, Gn.pickBy = Fo, Gn.property = pc, Gn.propertyOf = function (e) {
return function (t) {
return null == e ? n : Cr(e, t)
}
}, Gn.pull = Ye, Gn.pullAll = Zs, Gn.pullAllBy = function (e, t, n) {
return e && e.length && t && t.length ? Vr(e, t, us(n, 2)) : e
}, Gn.pullAllWith = function (e, t, r) {
return e && e.length && t && t.length ? Vr(e, t, n, r) : e
}, Gn.pullAt = Js, Gn.range = dc, Gn.rangeRight = mc, Gn.rearg = Ua, Gn.reject = function (e, t) {
return (Ya(e) ? Lt : Er)(e, Ma(us(t, 3)))
}, Gn.remove = function (e, t) {
var n = [];
if (e && e.length) {
var r = -1, i = [], s = e.length;
for (t = us(t, 3); ++r < s;) {
var a = e[r];
t(a, r, e) && (n.push(a), i.push(r))
}
$r(e, i)
}
return n
}, Gn.rest = function (e, t) {
if ("function" != typeof e) throw new Le(r);
return Xr(e, t = t === n ? t : mo(t))
}, Gn.reverse = ea,Gn.sampleSize = function (e, t, r) {
return t = (r ? gs(e, t, r) : t === n) ? 1 : mo(t), (Ya(e) ? function (e, t) {
return Ms(Li(e), cr(t, 0, e.length))
} : function (e, t) {
return Ms(e = Go(e), cr(t, 0, e.length))
})(e, t)
},Gn.set = function (e, t, n) {
return null == e ? e : ei(e, t, n)
},Gn.setWith = function (e, t, r, i) {
return i = "function" == typeof i ? i : n, null == e ? e : ei(e, t, r, i)
},Gn.shuffle = function (e) {
return (Ya(e) ? function (e) {
return Ms(Li(e))
} : function (e) {
return Ms(Go(e))
})(e)
},Gn.slice = function (e, t, r) {
var i = null == e ? 0 : e.length;
return i ? (r = r && "number" != typeof r && gs(e, t, r) ? (t = 0, i) : (t = null == t ? 0 : mo(t), r === n ? i : mo(r)), ii(e, t, r)) : []
},Gn.sortBy = Na,Gn.sortedUniq = function (e) {
return e && e.length ? ci(e) : []
},Gn.sortedUniqBy = function (e, t) {
return e && e.length ? ci(e, us(t, 2)) : []
},Gn.split = function (e, t, r) {
return r && "number" != typeof r && gs(e, t, r) && (t = r = n), (r = r === n ? d : r >>> 0) ? (e = Ao(e)) && ("string" == typeof t || null != t && !so(t)) && !(t = li(t)) && an(e) ? yi(pn(e), 0, r) : e.split(t, r) : []
},Gn.spread = function (e, t) {
if ("function" != typeof e) throw new Le(r);
return t = null == t ? 0 : An(mo(t), 0), Xr(function (n) {
var r = n[t], n = yi(n, 0, t);
return r && xt(n, r), Nt(e, this, n)
})
},Gn.tail = function (e) {
var t = null == e ? 0 : e.length;
return t ? ii(e, 1, t) : []
},Gn.take = function (e, t, r) {
return e && e.length ? ii(e, 0, (t = r || t === n ? 1 : mo(t)) < 0 ? 0 : t) : []
},Gn.takeRight = function (e, t, r) {
var i = null == e ? 0 : e.length;
return i ? ii(e, (t = i - (r || t === n ? 1 : mo(t))) < 0 ? 0 : t, i) : []
},Gn.takeRightWhile = function (e, t) {
return e && e.length ? di(e, us(t, 3), !1, !0) : []
},Gn.takeWhile = function (e, t) {
return e && e.length ? di(e, us(t, 3)) : []
},Gn.tap = function (e, t) {
return t(e), e
},Gn.throttle = function (e, t, n) {
var i = !0, s = !0;
if ("function" != typeof e) throw new Le(r);
return eo(n) && (i = "leading" in n ? !!n.leading : i, s = "trailing" in n ? !!n.trailing : s), Da(e, t, {
leading: i,
maxWait: t,
trailing: s
})
},Gn.thru = pa,Gn.toArray = fo,Gn.toPairs = Uo,Gn.toPairsIn = Ho,Gn.toPath = function (e) {
return Ya(e) ? wt(e, Bs) : co(e) ? [e] : Li(Ps(Ao(e)))
},Gn.toPlainObject = To,Gn.transform = function (e, t, n) {
var s, r = Ya(e), i = r || $a(e) || uo(e);
return t = us(t, 4), null == n && (s = e && e.constructor, n = i ? r ? new s : [] : eo(e) && Xa(s) ? jn(Ve(e)) : {}), (i ? It : vr)(e, function (e, r, i) {
return t(n, e, r, i)
}), n
},Gn.unary = function (e) {
return Ia(e, 1)
},Gn.union = ta,Gn.unionBy = na,Gn.unionWith = ra,Gn.uniq = function (e) {
return e && e.length ? hi(e) : []
},Gn.uniqBy = function (e, t) {
return e && e.length ? hi(e, us(t, 2)) : []
},Gn.uniqWith = function (e, t) {
return t = "function" == typeof t ? t : n, e && e.length ? hi(e, n, t) : []
},Gn.unset = function (e, t) {
return null == e || fi(e, t)
},Gn.unzip = ia,Gn.unzipWith = sa,Gn.update = function (e, t, n) {
return null == e ? e : pi(e, t, Ai(n))
},Gn.updateWith = function (e, t, r, i) {
return i = "function" == typeof i ? i : n, null == e ? e : pi(e, t, Ai(r), i)
},Gn.values = Go,Gn.valuesIn = function (e) {
return null == e ? [] : Zt(e, wo(e))
},Gn.without = aa,Gn.words = Zo,Gn.wrap = function (e, t) {
return Ba(Ai(t), e)
},Gn.xor = oa,Gn.xorBy = ca,Gn.xorWith = ua,Gn.zip = la,Gn.zipObject = function (e, t) {
return Ei(e || [], t || [], nr)
},Gn.zipObjectDeep = function (e, t) {
return Ei(e || [], t || [], ei)
},Gn.zipWith = ha,Gn.entries = Uo,Gn.entriesIn = Ho,Gn.extend = vo,Gn.extendWith = yo,cc(Gn, Gn),Gn.add = Tc,Gn.attempt = Jo,Gn.camelCase = jo,Gn.capitalize = qo,Gn.ceil = Ac,Gn.clamp = function (e, t, r) {
return r === n && (r = t, t = n), r !== n && (r = (r = Eo(r)) == r ? r : 0), t !== n && (t = (t = Eo(t)) == t ? t : 0), cr(Eo(e), t, r)
},Gn.clone = function (e) {
return ur(e, 4)
},Gn.cloneDeep = function (e) {
return ur(e, 5)
},Gn.cloneDeepWith = function (e, t) {
return ur(e, 5, t = "function" == typeof t ? t : n)
},Gn.cloneWith = function (e, t) {
return ur(e, 4, t = "function" == typeof t ? t : n)
},Gn.conformsTo = function (e, t) {
return null == t || lr(e, t, Ro(t))
},Gn.deburr = Yo,Gn.defaultTo = function (e, t) {
return null == e || e != e ? t : e
},Gn.divide = gc,Gn.endsWith = function (e, t, r) {
e = Ao(e), t = li(t);
var i = e.length, i = r = r === n ? i : cr(mo(r), 0, i);
return 0 <= (r -= t.length) && e.slice(r, i) == t
},Gn.eq = Ha,Gn.escape = function (e) {
return (e = Ao(e)) && Q.test(e) ? e.replace(V, rn) : e
},Gn.escapeRegExp = function (e) {
return (e = Ao(e)) && re.test(e) ? e.replace(ne, "\\$&") : e
},Gn.every = function (e, t, r) {
return (Ya(e) ? kt : function (e, t) {
var n = !0;
return pr(e, function (e, r, i) {
return n = !!t(e, r, i)
}), n
})(e, us(t = r && gs(e, t, r) ? n : t, 3))
},Gn.find = _a,Gn.findIndex = qs,Gn.findKey = function (e, t) {
return Ut(e, us(t, 3), vr)
},Gn.findLast = Ea,Gn.findLastIndex = Ys,Gn.findLastKey = function (e, t) {
return Ut(e, us(t, 3), yr)
},Gn.floor = vc,Gn.forEach = Ta,Gn.forEachRight = Aa,Gn.forIn = function (e, t) {
return null == e ? e : Ar(e, us(t, 3), wo)
},Gn.forInRight = function (e, t) {
return null == e ? e : gr(e, us(t, 3), wo)
},Gn.forOwn = function (e, t) {
return e && vr(e, us(t, 3))
},Gn.forOwnRight = function (e, t) {
return e && yr(e, us(t, 3))
},Gn.get = Io,Gn.gt = Ga,Gn.gte = ja,Gn.has = function (e, t) {
return null != e && _s(e, t, Or)
},Gn.hasIn = Oo,Gn.head = Ws,Gn.identity = ic,Gn.includes = function (e, t, n, r) {
return e = Wa(e) ? e : Go(e), n = n && !r ? mo(n) : 0, r = e.length, n < 0 && (n = An(r + n, 0)), oo(e) ? n <= r && -1 < e.indexOf(t, n) : !!r && -1 < Gt(e, t, n)
},Gn.indexOf = function (e, t, n) {
var r = null == e ? 0 : e.length;
return r ? Gt(e, t, e = (e = null == n ? 0 : mo(n)) < 0 ? An(r + e, 0) : e) : -1
},Gn.inRange = function (e, t, r) {
return t = po(t), r === n ? (r = t, t = 0) : r = po(r), function (e, t, n) {
return e >= gn(t, n) && e < An(t, n)
}(e = Eo(e), t, r)
},Gn.invoke = Do,Gn.isArguments = qa,Gn.isArray = Ya,Gn.isArrayBuffer = Ka,Gn.isArrayLike = Wa,Gn.isArrayLikeObject = Va,Gn.isBoolean = function (e) {
return !0 === e || !1 === e || to(e) && br(e) == T
},Gn.isBuffer = $a,Gn.isDate = Re,Gn.isElement = function (e) {
return to(e) && 1 === e.nodeType && !io(e)
},Gn.isEmpty = function (e) {
if (null != e) {
if (Wa(e) && (Ya(e) || "string" == typeof e || "function" == typeof e.splice || $a(e) || uo(e) || qa(e))) return !e.length;
var n, t = ms(e);
if (t == S || t == O) return !e.size;
if (Cs(e)) return !Br(e).length;
for (n in e) if (Pe.call(e, n)) return !1
}
return !0
},Gn.isEqual = function (e, t) {
return wr(e, t)
},Gn.isEqualWith = function (e, t, r) {
var i = (r = "function" == typeof r ? r : n) ? r(e, t) : n;
return i === n ? wr(e, t, n, r) : !!i
},Gn.isError = za,Gn.isFinite = function (e) {
return "number" == typeof e && Wt(e)
},Gn.isFunction = Xa,Gn.isInteger = Za,Gn.isLength = Ja,Gn.isMap = no,Gn.isMatch = function (e, t) {
return e === t || xr(e, t, hs(t))
},Gn.isMatchWith = function (e, t, r) {
return r = "function" == typeof r ? r : n, xr(e, t, hs(t), r)
},Gn.isNaN = function (e) {
return ro(e) && e != +e
},Gn.isNative = function (e) {
if (Ss(e)) throw new Ce("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");
return Mr(e)
},Gn.isNil = function (e) {
return null == e
},Gn.isNull = function (e) {
return null === e
},Gn.isNumber = ro,Gn.isObject = eo,Gn.isObjectLike = to,Gn.isPlainObject = io,Gn.isRegExp = so,Gn.isSafeInteger = function (e) {
return Za(e) && -9007199254740991 <= e && e <= f
},Gn.isSet = ao,Gn.isString = oo,Gn.isSymbol = co,Gn.isTypedArray = uo,Gn.isUndefined = function (e) {
return e === n
},Gn.isWeakMap = function (e) {
return to(e) && ms(e) == D
},Gn.isWeakSet = function (e) {
return to(e) && "[object WeakSet]" == br(e)
},Gn.join = function (e, t) {
return null == e ? "" : En.call(e, t)
},Gn.kebabCase = Ko,Gn.last = zs,Gn.lastIndexOf = function (e, t, r) {
var s, i = null == e ? 0 : e.length;
return i ? (s = i, r !== n && (s = (s = mo(r)) < 0 ? An(i + s, 0) : gn(s, i - 1)), t == t ? function (e, t) {
for (var r = s + 1; r--;) if (e[r] === t) return r;
return r
}(e, t) : Ht(e, qt, s, !0)) : -1
},Gn.lowerCase = Wo,Gn.lowerFirst = Vo,Gn.lt = lo,Gn.lte = ho,Gn.max = function (e) {
return e && e.length ? _r(e, ic, Ir) : n
},Gn.maxBy = function (e, t) {
return e && e.length ? _r(e, us(t, 2), Ir) : n
},Gn.mean = function (e) {
return Yt(e, ic)
},Gn.meanBy = function (e, t) {
return Yt(e, us(t, 2))
},Gn.min = function (e) {
return e && e.length ? _r(e, ic, Ur) : n
},Gn.minBy = function (e, t) {
return e && e.length ? _r(e, us(t, 2), Ur) : n
},Gn.stubArray = _c,Gn.stubFalse = Ec,Gn.stubObject = function () {
return {}
},Gn.stubString = function () {
return ""
},Gn.stubTrue = function () {
return !0
},Gn.multiply = Sc,Gn.nth = function (e, t) {
return e && e.length ? Yr(e, mo(t)) : n
},Gn.noConflict = function () {
return pt._ === this && (pt._ = Ge), this
},Gn.noop = uc,Gn.now = ba,Gn.pad = function (e, t, n) {
e = Ao(e);
var r = (t = mo(t)) ? fn(e) : 0;
return !t || t <= r ? e : Ki(Et(t = (t - r) / 2), n) + e + Ki(mt(t), n)
},Gn.padEnd = function (e, t, n) {
e = Ao(e);
var r = (t = mo(t)) ? fn(e) : 0;
return t && r < t ? e + Ki(t - r, n) : e
},Gn.padStart = function (e, t, n) {
e = Ao(e);
var r = (t = mo(t)) ? fn(e) : 0;
return t && r < t ? Ki(t - r, n) + e : e
},Gn.parseInt = function (e, t, n) {
return t = n || null == t ? 0 : t && +t, yn(Ao(e).replace(ie, ""), t || 0)
},Gn.random = function (e, t, r) {
var i;
return r && "boolean" != typeof r && gs(e, t, r) && (t = r = n), r === n && ("boolean" == typeof t ? (r = t, t = n) : "boolean" == typeof e && (r = e, e = n)), e === n && t === n ? (e = 0, t = 1) : (e = po(e), t === n ? (t = e, e = 0) : t = po(t)), t < e && (i = e, e = t, t = i), r || e % 1 || t % 1 ? (i = Sn(), gn(e + i * (t - e + ut("1e-" + ((i + "").length - 1))), t)) : Qr(e, t)
},Gn.reduce = function (e, t, n) {
var r = Ya(e) ? Mt : Vt, i = arguments.length < 3;
return r(e, us(t, 4), n, i, pr)
},Gn.reduceRight = function (e, t, n) {
var r = Ya(e) ? Pt : Vt, i = arguments.length < 3;
return r(e, us(t, 4), n, i, dr)
},Gn.repeat = function (e, t, r) {
return t = (r ? gs(e, t, r) : t === n) ? 1 : mo(t), zr(Ao(e), t)
},Gn.replace = function () {
var e = arguments, t = Ao(e[0]);
return e.length < 3 ? t : t.replace(e[1], e[2])
},Gn.result = function (e, t, r) {
var i = -1, s = (t = gi(t, e)).length;
for (s || (s = 1, e = n); ++i < s;) {
var a = null == e ? n : e[Bs(t[i])];
a === n && (i = s, a = r), e = Xa(a) ? a.call(e) : a
}
return e
},Gn.round = Cc,Gn.runInContext = e,Gn.sample = function (e) {
return (Ya(e) ? Zn : function (e) {
return Zn(Go(e))
})(e)
},Gn.size = function (e) {
var t;
return null == e ? 0 : Wa(e) ? oo(e) ? fn(e) : e.length : (t = ms(e)) == S || t == O ? e.size : Br(e).length
},Gn.snakeCase = $o,Gn.some = function (e, t, r) {
return (Ya(e) ? Bt : function (e, t) {
var n;
return pr(e, function (e, r, i) {
return !(n = t(e, r, i))
}), !!n
})(e, us(t = r && gs(e, t, r) ? n : t, 3))
},Gn.sortedIndex = function (e, t) {
return ai(e, t)
},Gn.sortedIndexBy = function (e, t, n) {
return oi(e, t, us(n, 2))
},Gn.sortedIndexOf = function (e, t) {
var n = null == e ? 0 : e.length;
if (n) {
var r = ai(e, t);
if (r < n && Ha(e[r], t)) return r
}
return -1
},Gn.sortedLastIndex = function (e, t) {
return ai(e, t, !0)
},Gn.sortedLastIndexBy = function (e, t, n) {
return oi(e, t, us(n, 2), !0)
},Gn.sortedLastIndexOf = function (e, t) {
if (null != e && e.length) {
var n = ai(e, t, !0) - 1;
if (Ha(e[n], t)) return n
}
return -1
},Gn.startCase = Qo,Gn.startsWith = function (e, t, n) {
return e = Ao(e), n = null == n ? 0 : cr(mo(n), 0, e.length), t = li(t), e.slice(n, n + t.length) == t
},Gn.subtract = Nc,Gn.sum = function (e) {
return e && e.length ? $t(e, ic) : 0
},Gn.sumBy = function (e, t) {
return e && e.length ? $t(e, us(t, 2)) : 0
},Gn.template = function (e, t, r) {
var i = Gn.templateSettings;
r && gs(e, t, r) && (t = n), e = Ao(e), t = yo({}, t, i, Ji);
var s, a, c = Ro(r = yo({}, t.imports, i.imports, Ji)), u = Zt(r, c), l = 0, i = t.interpolate || ge,
f = "__p += '",
r = Oe((t.escape || ge).source + "|" + i.source + "|" + (i === Z ? fe : ge).source + "|" + (t.evaluate || ge).source + "|$", "g"),
d = "//# sourceURL=" + (Pe.call(t, "sourceURL") ? (t.sourceURL + "").replace(/\s/g, " ") : "lodash.templateSources[" + ++st + "]") + "\n";
if (e.replace(r, function (t, n, r, i, o, c) {
return r = r || i, f += e.slice(l, c).replace(ve, sn), n && (s = !0, f += "' +\n__e(" + n + ") +\n'"), o && (a = !0, f += "';\n" + o + ";\n__p += '"), r && (f += "' +\n((__t = (" + r + ")) == null ? '' : __t) +\n'"), l = c + t.length, t
}), f += "';\n", i = Pe.call(t, "variable") && t.variable) {
if (le.test(i)) throw new Ce("Invalid `variable` option passed into `_.template`")
} else f = "with (obj) {\n" + f + "\n}\n";
if (f = (a ? f.replace(q, "") : f).replace(Y, "$1").replace(K, "$1;"), f = "function(" + (i || "obj") + ") {\n" + (i ? "" : "obj || (obj = {});\n") + "var __t, __p = ''" + (s ? ", __e = _.escape" : "") + (a ? ", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n" : ";\n") + f + "return __p\n}", (r = Jo(function () {
return Ne(c, d + "return " + f).apply(n, u)
})).source = f, za(r)) throw r;
return r
},Gn.times = function (e, t) {
if ((e = mo(e)) < 1 || f < e) return [];
var n = d, r = gn(e, d);
for (t = us(t), e -= d, r = Qt(r, t); ++n < e;) t(n);
return r
},Gn.toFinite = po,Gn.toInteger = mo,Gn.toLength = _o,Gn.toLower = function (e) {
return Ao(e).toLowerCase()
},Gn.toNumber = Eo,Gn.toSafeInteger = function (e) {
return e ? cr(mo(e), -9007199254740991, f) : 0 === e ? e : 0
},Gn.toString = Ao,Gn.toUpper = function (e) {
return Ao(e).toUpperCase()
},Gn.trim = function (e, t, r) {
return (e = Ao(e)) && (r || t === n) ? zt(e) : e && (t = li(t)) ? yi(r = pn(e), en(r, t = pn(t)), tn(r, t) + 1).join("") : e
},Gn.trimEnd = function (e, t, r) {
return (e = Ao(e)) && (r || t === n) ? e.slice(0, dn(e) + 1) : e && (t = li(t)) ? yi(r = pn(e), 0, tn(r, pn(t)) + 1).join("") : e
},Gn.trimStart = function (e, t, r) {
return (e = Ao(e)) && (r || t === n) ? e.replace(ie, "") : e && (t = li(t)) ? yi(r = pn(e), en(r, pn(t))).join("") : e
},Gn.truncate = function (e, t) {
var s, r = 30, i = "...",
t = (eo(t) && (s = "separator" in t ? t.separator : s, r = "length" in t ? mo(t.length) : r, i = "omission" in t ? li(t.omission) : i), (e = Ao(e)).length);
if ((t = an(e) ? (o = pn(e)).length : t) <= r) return e;
if ((t = r - fn(i)) < 1) return i;
var o, r = o ? yi(o, 0, t).join("") : e.slice(0, t);
if (s !== n) if (o && (t += r.length - t), so(s)) {
if (e.slice(t).search(s)) {
var l, h = r;
for ((s = s.global ? s : Oe(s.source, Ao(pe.exec(s)) + "g")).lastIndex = 0; l = s.exec(h);) var f = l.index;
r = r.slice(0, f === n ? t : f)
}
} else e.indexOf(li(s), t) != t && -1 < (o = r.lastIndexOf(s)) && (r = r.slice(0, o));
return r + i
},Gn.unescape = function (e) {
return (e = Ao(e)) && $.test(e) ? e.replace(W, mn) : e
},Gn.uniqueId = function (e) {
var t = ++Be;
return Ao(e) + t
},Gn.upperCase = zo,Gn.upperFirst = Xo,Gn.each = Ta,Gn.eachRight = Aa,Gn.first = Ws,cc(Gn, (yc = {}, vr(Gn, function (e, t) {
Pe.call(Gn.prototype, t) || (yc[t] = e)
}), yc), {chain: !1}),Gn.VERSION = "4.17.21",It(["bind", "bindKey", "curry", "curryRight", "partial", "partialRight"], function (e) {
Gn[e].placeholder = Gn
}),It(["drop", "take"], function (e, t) {
Kn.prototype[e] = function (r) {
r = r === n ? 1 : An(mo(r), 0);
var i = this.__filtered__ && !t ? new Kn(this) : this.clone();
return i.__filtered__ ? i.__takeCount__ = gn(r, i.__takeCount__) : i.__views__.push({
size: gn(r, d),
type: e + (i.__dir__ < 0 ? "Right" : "")
}), i
}, Kn.prototype[e + "Right"] = function (t) {
return this.reverse()[e](t).reverse()
}
}),It(["filter", "map", "takeWhile"], function (e, t) {
var n = t + 1, r = 1 == n || 3 == n;
Kn.prototype[e] = function (e) {
var t = this.clone();
return t.__iteratees__.push({iteratee: us(e, 3), type: n}), t.__filtered__ = t.__filtered__ || r, t
}
}),It(["head", "last"], function (e, t) {
var n = "take" + (t ? "Right" : "");
Kn.prototype[e] = function () {
return this[n](1).value()[0]
}
}),It(["initial", "tail"], function (e, t) {
var n = "drop" + (t ? "" : "Right");
Kn.prototype[e] = function () {
return this.__filtered__ ? new Kn(this) : this[n](1)
}
}),Kn.prototype.compact = function () {
return this.filter(ic)
},Kn.prototype.find = function (e) {
return this.filter(e).head()
},Kn.prototype.findLast = function (e) {
return this.reverse().find(e)
},Kn.prototype.invokeMap = Xr(function (e, t) {
return "function" == typeof e ? new Kn(this) : this.map(function (n) {
return Dr(n, e, t)
})
}),Kn.prototype.reject = function (e) {
return this.filter(Ma(us(e)))
},Kn.prototype.slice = function (e, t) {
e = mo(e);
var r = this;
return r.__filtered__ && (0 < e || t < 0) ? new Kn(r) : (e < 0 ? r = r.takeRight(-e) : e && (r = r.drop(e)), t !== n ? (t = mo(t)) < 0 ? r.dropRight(-t) : r.take(t - e) : r)
},Kn.prototype.takeRightWhile = function (e) {
return this.reverse().takeWhile(e).reverse()
},Kn.prototype.toArray = function () {
return this.take(d)
},vr(Kn.prototype, function (e, t) {
var r = /^(?:filter|find|map|reject)|While$/.test(t), i = /^(?:head|last)$/.test(t),
s = Gn[i ? "take" + ("last" == t ? "Right" : "") : t], a = i || /^find/.test(t);
s && (Gn.prototype[t] = function () {
function h(e) {
return e = s.apply(Gn, xt([e], o)), i && f ? e[0] : e
}
var _, t = this.__wrapped__, o = i ? [1] : arguments, c = t instanceof Kn, u = o[0], l = c || Ya(t),
f = (l && r && "function" == typeof u && 1 != u.length && (c = l = !1), this.__chain__),
u = !!this.__actions__.length, d = a && !f, c = c && !u;
return !a && l ? (t = c ? t : new Kn(this), (_ = e.apply(t, o)).__actions__.push({
func: pa,
args: [h],
thisArg: n
}), new Yn(_, f)) : d && c ? e.apply(this, o) : (_ = this.thru(h), d ? i ? _.value()[0] : _.value() : _)
})
}),It(["pop", "push", "shift", "sort", "splice", "unshift"], function (e) {
var t = De[e], n = /^(?:push|sort|unshift)$/.test(e) ? "tap" : "thru", r = /^(?:pop|shift)$/.test(e);
Gn.prototype[e] = function () {
var i, e = arguments;
return r && !this.__chain__ ? (i = this.value(), t.apply(Ya(i) ? i : [], e)) : this[n](function (n) {
return t.apply(Ya(n) ? n : [], e)
})
}
}),vr(Kn.prototype, function (e, t) {
var r, n = Gn[t];
n && (r = n.name + "", Pe.call(Rn, r) || (Rn[r] = []), Rn[r].push({name: t, func: n}))
}),Rn[Gi(n, 2).name] = [{name: "wrapper", func: n}],Kn.prototype.clone = function () {
var e = new Kn(this.__wrapped__);
return e.__actions__ = Li(this.__actions__), e.__dir__ = this.__dir__, e.__filtered__ = this.__filtered__, e.__iteratees__ = Li(this.__iteratees__), e.__takeCount__ = this.__takeCount__, e.__views__ = Li(this.__views__), e
},Kn.prototype.reverse = function () {
var e;
return this.__filtered__ ? ((e = new Kn(this)).__dir__ = -1, e.__filtered__ = !0) : (e = this.clone()).__dir__ *= -1, e
},Kn.prototype.value = function () {
var e = this.__wrapped__.value(), t = this.__dir__, n = Ya(e), r = t < 0, i = n ? e.length : 0,
s = function (e, t, n) {
for (var r = -1, i = n.length; ++r < i;) {
var s = n[r], a = s.size;
switch (s.type) {
case"drop":
e += a;
break;
case"dropRight":
t -= a;
break;
case"take":
t = gn(t, e + a);
break;
case"takeRight":
e = An(e, t - a)
}
}
return {start: e, end: t}
}(0, i, this.__views__), a = s.start, c = (s = s.end) - a, u = r ? s : a - 1,
l = this.__iteratees__, h = l.length, f = 0, p = gn(c, this.__takeCount__);
if (!n || !r && i == c && p == c) return mi(e, this.__actions__);
var d = [];
e:for (; c-- && f < p;) {
for (var m = -1, _ = e[u += t]; ++m < h;) {
var T = (E = l[m]).iteratee, E = E.type, T = T(_);
if (2 == E) _ = T; else if (!T) {
if (1 == E) continue e;
break e
}
}
d[f++] = _
}
return d
},Gn.prototype.at = da,Gn.prototype.chain = function () {
return fa(this)
},Gn.prototype.commit = function () {
return new Yn(this.value(), this.__chain__)
},Gn.prototype.next = function () {
this.__values__ === n && (this.__values__ = fo(this.value()));
var e = this.__index__ >= this.__values__.length;
return {done: e, value: e ? n : this.__values__[this.__index__++]}
},Gn.prototype.plant = function (e) {
for (var t, r = this; r instanceof qn;) var i = Us(r), s = (i.__index__ = 0, i.__values__ = n, t ? s.__wrapped__ = i : t = i, i), r = r.__wrapped__;
return s.__wrapped__ = e, t
},Gn.prototype.reverse = function () {
var e = this.__wrapped__;
return e instanceof Kn ? ((e = (e = this.__actions__.length ? new Kn(this) : e).reverse()).__actions__.push({
func: pa,
args: [ea],
thisArg: n
}), new Yn(e, this.__chain__)) : this.thru(ea)
},Gn.prototype.toJSON = Gn.prototype.valueOf = Gn.prototype.value = function () {
return mi(this.__wrapped__, this.__actions__)
},Gn.prototype.first = Gn.prototype.head,et && (Gn.prototype[et] = function () {
return this
}),Gn
}();
mt ? ((mt.exports = _n)._ = _n, He._ = _n) : pt._ = _n
}.call(gr)
}), dh = Sr(function (e, t) {
e.exports = function (e) {
var n;
if ("undefined" != typeof window && window.crypto && (n = window.crypto), "undefined" != typeof self && self.crypto && (n = self.crypto), !(n = !(n = !(n = "undefined" != typeof globalThis && globalThis.crypto ? globalThis.crypto : n) && "undefined" != typeof window && window.msCrypto ? window.msCrypto : n) && void 0 !== gr && gr.crypto ? gr.crypto : n)) try {
n = Zu
} catch (e) {
}
function r() {
if (n) {
if ("function" == typeof n.getRandomValues) try {
return n.getRandomValues(new Uint32Array(1))[0]
} catch (e) {
}
if ("function" == typeof n.randomBytes) try {
return n.randomBytes(4).readInt32LE()
} catch (e) {
}
}
throw new Error("Native crypto module could not be used to get secure random number.")
}
var i = Object.create || function () {
function e() {
}
return function (t) {
return e.prototype = t, t = new e, e.prototype = null, t
}
}(), s = {}, a = s.lib = {}, o = a.Base = {
extend: function (e) {
var t = i(this);
return e && t.mixIn(e), t.hasOwnProperty("init") && this.init !== t.init || (t.init = function () {
t.$super.init.apply(this, arguments)
}), (t.init.prototype = t).$super = this, t
}, create: function () {
var e = this.extend();
return e.init.apply(e, arguments), e
}, init: function () {
}, mixIn: function (e) {
for (var t in e) e.hasOwnProperty(t) && (this[t] = e[t]);
e.hasOwnProperty("toString") && (this.toString = e.toString)
}, clone: function () {
return this.init.prototype.extend(this)
}
}, c = a.WordArray = o.extend({
init: function (e, n) {
e = this.words = e || [], this.sigBytes = null != n ? n : 4 * e.length
}, toString: function (e) {
return (e || l).stringify(this)
}, concat: function (e) {
var t = this.words, n = e.words, r = this.sigBytes, i = e.sigBytes;
if (this.clamp(), r % 4) for (var s = 0; s < i; s++) {
var a = n[s >>> 2] >>> 24 - s % 4 * 8 & 255;
t[r + s >>> 2] |= a << 24 - (r + s) % 4 * 8
} else for (var o = 0; o < i; o += 4) t[r + o >>> 2] = n[o >>> 2];
return this.sigBytes += i, this
}, clamp: function () {
var t = this.words, n = this.sigBytes;
t[n >>> 2] &= 4294967295 << 32 - n % 4 * 8, t.length = e.ceil(n / 4)
}, clone: function () {
var e = o.clone.call(this);
return e.words = this.words.slice(0), e
}, random: function (e) {
for (var t = [], n = 0; n < e; n += 4) t.push(r());
return new c.init(t, e)
}
}), u = s.enc = {}, l = u.Hex = {
stringify: function (e) {
for (var t = e.words, n = e.sigBytes, r = [], i = 0; i < n; i++) {
var s = t[i >>> 2] >>> 24 - i % 4 * 8 & 255;
r.push((s >>> 4).toString(16)), r.push((15 & s).toString(16))
}
return r.join("")
}, parse: function (e) {
for (var t = e.length, n = [], r = 0; r < t; r += 2) n[r >>> 3] |= parseInt(e.substr(r, 2), 16) << 24 - r % 8 * 4;
return new c.init(n, t / 2)
}
}, h = u.Latin1 = {
stringify: function (e) {
for (var t = e.words, n = e.sigBytes, r = [], i = 0; i < n; i++) {
var s = t[i >>> 2] >>> 24 - i % 4 * 8 & 255;
r.push(String.fromCharCode(s))
}
return r.join("")
}, parse: function (e) {
for (var t = e.length, n = [], r = 0; r < t; r++) n[r >>> 2] |= (255 & e.charCodeAt(r)) << 24 - r % 4 * 8;
return new c.init(n, t)
}
}, f = u.Utf8 = {
stringify: function (e) {
try {
return decodeURIComponent(escape(h.stringify(e)))
} catch (e) {
throw new Error("Malformed UTF-8 data")
}
}, parse: function (e) {
return h.parse(unescape(encodeURIComponent(e)))
}
}, p = a.BufferedBlockAlgorithm = o.extend({
reset: function () {
this._data = new c.init, this._nDataBytes = 0
}, _append: function (e) {
"string" == typeof e && (e = f.parse(e)), this._data.concat(e), this._nDataBytes += e.sigBytes
}, _process: function (t) {
var n, r = this._data, i = r.words, s = r.sigBytes, a = this.blockSize, o = s / (4 * a),
u = (t ? e.ceil(o) : e.max((0 | o) - this._minBufferSize, 0)) * a, t = e.min(4 * u, s);
if (u) {
for (var h = 0; h < u; h += a) this._doProcessBlock(i, h);
n = i.splice(0, u), r.sigBytes -= t
}
return new c.init(n, t)
}, clone: function () {
var e = o.clone.call(this);
return e._data = this._data.clone(), e
}, _minBufferSize: 0
}), d = (a.Hasher = p.extend({
cfg: o.extend(), init: function (e) {
this.cfg = this.cfg.extend(e), this.reset()
}, reset: function () {
p.reset.call(this), this._doReset()
}, update: function (e) {
return this._append(e), this._process(), this
}, finalize: function (e) {
return e && this._append(e), this._doFinalize()
}, blockSize: 16, _createHelper: function (e) {
return function (t, n) {
return new e.init(n).finalize(t)
}
}, _createHmacHelper: function (e) {
return function (t, n) {
return new d.HMAC.init(e, n).finalize(t)
}
}
}), s.algo = {});
return s
}(Math)
}), mh = (Sr(function (e, t) {
var s, a, i;
e.exports = (i = (e = dh).lib, s = i.Base, a = i.WordArray, (i = e.x64 = {}).Word = s.extend({
init: function (e, t) {
this.high = e, this.low = t
}
}), i.WordArray = s.extend({
init: function (e, t) {
e = this.words = e || [], this.sigBytes = null != t ? t : 8 * e.length
}, toX32: function () {
for (var e = this.words, t = e.length, n = [], r = 0; r < t; r++) {
var i = e[r];
n.push(i.high), n.push(i.low)
}
return a.create(n, this.sigBytes)
}, clone: function () {
for (var e = s.clone.call(this), t = e.words = this.words.slice(0), n = t.length, r = 0; r < n; r++) t[r] = t[r].clone();
return e
}
}), e)
}), Sr(function (e, t) {
var n;
e.exports = (n = dh, function () {
var e, t;
"function" == typeof ArrayBuffer && (e = n.lib.WordArray, t = e.init, (e.init = function (e) {
if ((e = (e = e instanceof ArrayBuffer ? new Uint8Array(e) : e) instanceof Int8Array || "undefined" != typeof Uint8ClampedArray && e instanceof Uint8ClampedArray || e instanceof Int16Array || e instanceof Uint16Array || e instanceof Int32Array || e instanceof Uint32Array || e instanceof Float32Array || e instanceof Float64Array ? new Uint8Array(e.buffer, e.byteOffset, e.byteLength) : e) instanceof Uint8Array) {
for (var n = e.byteLength, r = [], i = 0; i < n; i++) r[i >>> 2] |= e[i] << 24 - i % 4 * 8;
t.call(this, r, n)
} else t.apply(this, arguments)
}).prototype = e)
}(), n.lib.WordArray)
}), Sr(function (e, t) {
var n;
e.exports = (n = dh, function () {
var t = n.lib.WordArray, r = n.enc;
function i(e) {
return e << 8 & 4278255360 | e >>> 8 & 16711935
}
r.Utf16 = r.Utf16BE = {
stringify: function (e) {
for (var t = e.words, n = e.sigBytes, r = [], i = 0; i < n; i += 2) {
var s = t[i >>> 2] >>> 16 - i % 4 * 8 & 65535;
r.push(String.fromCharCode(s))
}
return r.join("")
}, parse: function (e) {
for (var n = e.length, r = [], i = 0; i < n; i++) r[i >>> 1] |= e.charCodeAt(i) << 16 - i % 2 * 16;
return t.create(r, 2 * n)
}
}, r.Utf16LE = {
stringify: function (e) {
for (var t = e.words, n = e.sigBytes, r = [], s = 0; s < n; s += 2) {
var a = i(t[s >>> 2] >>> 16 - s % 4 * 8 & 65535);
r.push(String.fromCharCode(a))
}
return r.join("")
}, parse: function (e) {
for (var n = e.length, r = [], s = 0; s < n; s++) r[s >>> 1] |= i(e.charCodeAt(s) << 16 - s % 2 * 16);
return t.create(r, 2 * n)
}
}
}(), n.enc.Utf16)
}), Sr(function (e, t) {
var n;
e.exports = (n = dh, function () {
var e = n, t = e.lib.WordArray;
function r(e, n, r) {
for (var o, i = [], s = 0, a = 0; a < n; a++) a % 4 && (o = r[e.charCodeAt(a - 1)] << a % 4 * 2 | r[e.charCodeAt(a)] >>> 6 - a % 4 * 2, i[s >>> 2] |= o << 24 - s % 4 * 8, s++);
return t.create(i, s)
}
e.enc.Base64 = {
stringify: function (e) {
var t = e.words, n = e.sigBytes, r = this._map;
e.clamp();
for (var i = [], s = 0; s < n; s += 3) for (var a = (t[s >>> 2] >>> 24 - s % 4 * 8 & 255) << 16 | (t[s + 1 >>> 2] >>> 24 - (s + 1) % 4 * 8 & 255) << 8 | t[s + 2 >>> 2] >>> 24 - (s + 2) % 4 * 8 & 255, o = 0; o < 4 && s + .75 * o < n; o++) i.push(r.charAt(a >>> 6 * (3 - o) & 63));
var c = r.charAt(64);
if (c) for (; i.length % 4;) i.push(c);
return i.join("")
}, parse: function (e) {
var t = e.length, n = this._map;
if (!(i = this._reverseMap)) for (var i = this._reverseMap = [], s = 0; s < n.length; s++) i[n.charCodeAt(s)] = s;
var a = n.charAt(64);
return a && -1 !== (a = e.indexOf(a)) && (t = a), r(e, t, i)
}, _map: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="
}
}(), n.enc.Base64)
}), Sr(function (e, t) {
var n;
e.exports = (n = dh, function () {
var e = n, t = e.lib.WordArray;
function r(e, n, r) {
for (var o, i = [], s = 0, a = 0; a < n; a++) a % 4 && (o = r[e.charCodeAt(a - 1)] << a % 4 * 2 | r[e.charCodeAt(a)] >>> 6 - a % 4 * 2, i[s >>> 2] |= o << 24 - s % 4 * 8, s++);
return t.create(i, s)
}
e.enc.Base64url = {
stringify: function (e, t = !0) {
var n = e.words, r = e.sigBytes, i = t ? this._safe_map : this._map;
e.clamp();
for (var s = [], a = 0; a < r; a += 3) for (var o = (n[a >>> 2] >>> 24 - a % 4 * 8 & 255) << 16 | (n[a + 1 >>> 2] >>> 24 - (a + 1) % 4 * 8 & 255) << 8 | n[a + 2 >>> 2] >>> 24 - (a + 2) % 4 * 8 & 255, c = 0; c < 4 && a + .75 * c < r; c++) s.push(i.charAt(o >>> 6 * (3 - c) & 63));
var u = i.charAt(64);
if (u) for (; s.length % 4;) s.push(u);
return s.join("")
},
parse: function (e, t = !0) {
var n = e.length, i = t ? this._safe_map : this._map;
if (!(s = this._reverseMap)) for (var s = this._reverseMap = [], a = 0; a < i.length; a++) s[i.charCodeAt(a)] = a;
return (t = i.charAt(64)) && -1 !== (t = e.indexOf(t)) && (n = t), r(e, n, s)
},
_map: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",
_safe_map: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"
}
}(), n.enc.Base64url)
}), Sr(function (e, t) {
var n;
e.exports = (n = dh, function (e) {
var t = n, i = (r = t.lib).WordArray, s = r.Hasher, r = t.algo, o = [], r = (function () {
for (var t = 0; t < 64; t++) o[t] = 4294967296 * e.abs(e.sin(t + 1)) | 0
}(), r.MD5 = s.extend({
_doReset: function () {
this._hash = new i.init([1732584193, 4023233417, 2562383102, 271733878])
}, _doProcessBlock: function (e, t) {
for (var n = 0; n < 16; n++) {
var r = t + n, i = e[r];
e[r] = 16711935 & (i << 8 | i >>> 24) | 4278255360 & (i << 24 | i >>> 8)
}
var s = this._hash.words, a = e[t + 0], c = e[t + 1], p = e[t + 2], d = e[t + 3], m = e[t + 4],
_ = e[t + 5], E = e[t + 6], T = e[t + 7], A = e[t + 8], g = e[t + 9], v = e[t + 10], y = e[t + 11],
S = e[t + 12], C = e[t + 13], N = e[t + 14], b = e[t + 15],
I = u(s[0], O = s[1], k = s[2], L = s[3], a, 7, o[0]), L = u(L, I, O, k, c, 12, o[1]),
k = u(k, L, I, O, p, 17, o[2]), O = u(O, k, L, I, d, 22, o[3]), I = u(I, O, k, L, m, 7, o[4]),
L = u(L, I, O, k, _, 12, o[5]), k = u(k, L, I, O, E, 17, o[6]), O = u(O, k, L, I, T, 22, o[7]);
I = u(I, O, k, L, A, 7, o[8]), L = u(L, I, O, k, g, 12, o[9]), k = u(k, L, I, O, v, 17, o[10]), O = u(O, k, L, I, y, 22, o[11]), I = u(I, O, k, L, S, 7, o[12]), L = u(L, I, O, k, C, 12, o[13]), k = u(k, L, I, O, N, 17, o[14]), I = l(I, O = u(O, k, L, I, b, 22, o[15]), k, L, c, 5, o[16]), L = l(L, I, O, k, E, 9, o[17]), k = l(k, L, I, O, y, 14, o[18]), O = l(O, k, L, I, a, 20, o[19]), I = l(I, O, k, L, _, 5, o[20]), L = l(L, I, O, k, v, 9, o[21]), k = l(k, L, I, O, b, 14, o[22]), O = l(O, k, L, I, m, 20, o[23]), I = l(I, O, k, L, g, 5, o[24]), L = l(L, I, O, k, N, 9, o[25]), k = l(k, L, I, O, d, 14, o[26]), O = l(O, k, L, I, A, 20, o[27]), I = l(I, O, k, L, C, 5, o[28]), L = l(L, I, O, k, p, 9, o[29]), k = l(k, L, I, O, T, 14, o[30]), I = h(I, O = l(O, k, L, I, S, 20, o[31]), k, L, _, 4, o[32]), L = h(L, I, O, k, A, 11, o[33]), k = h(k, L, I, O, y, 16, o[34]), O = h(O, k, L, I, N, 23, o[35]), I = h(I, O, k, L, c, 4, o[36]), L = h(L, I, O, k, m, 11, o[37]), k = h(k, L, I, O, T, 16, o[38]), O = h(O, k, L, I, v, 23, o[39]), I = h(I, O, k, L, C, 4, o[40]), L = h(L, I, O, k, a, 11, o[41]), k = h(k, L, I, O, d, 16, o[42]), O = h(O, k, L, I, E, 23, o[43]), I = h(I, O, k, L, g, 4, o[44]), L = h(L, I, O, k, S, 11, o[45]), k = h(k, L, I, O, b, 16, o[46]), I = f(I, O = h(O, k, L, I, p, 23, o[47]), k, L, a, 6, o[48]), L = f(L, I, O, k, T, 10, o[49]), k = f(k, L, I, O, N, 15, o[50]), O = f(O, k, L, I, _, 21, o[51]), I = f(I, O, k, L, S, 6, o[52]), L = f(L, I, O, k, d, 10, o[53]), k = f(k, L, I, O, v, 15, o[54]), O = f(O, k, L, I, c, 21, o[55]), I = f(I, O, k, L, A, 6, o[56]), L = f(L, I, O, k, b, 10, o[57]), k = f(k, L, I, O, E, 15, o[58]), O = f(O, k, L, I, C, 21, o[59]), I = f(I, O, k, L, m, 6, o[60]), L = f(L, I, O, k, y, 10, o[61]), k = f(k, L, I, O, p, 15, o[62]), O = f(O, k, L, I, g, 21, o[63]), s[0] = s[0] + I | 0, s[1] = s[1] + O | 0, s[2] = s[2] + k | 0, s[3] = s[3] + L | 0
}, _doFinalize: function () {
var t = this._data, n = t.words, r = 8 * this._nDataBytes, i = 8 * t.sigBytes,
s = (n[i >>> 5] |= 128 << 24 - i % 32, e.floor(r / 4294967296));
n[15 + (64 + i >>> 9 << 4)] = 16711935 & (s << 8 | s >>> 24) | 4278255360 & (s << 24 | s >>> 8), n[14 + (64 + i >>> 9 << 4)] = 16711935 & (r << 8 | r >>> 24) | 4278255360 & (r << 24 | r >>> 8), t.sigBytes = 4 * (n.length + 1), this._process();
for (var c = (s = this._hash).words, u = 0; u < 4; u++) {
var l = c[u];
c[u] = 16711935 & (l << 8 | l >>> 24) | 4278255360 & (l << 24 | l >>> 8)
}
return s
}, clone: function () {
var e = s.clone.call(this);
return e._hash = this._hash.clone(), e
}
}));
function u(e, t, n, r, i, s, a) {
return ((e = e + (t & n | ~t & r) + i + a) << s | e >>> 32 - s) + t
}
function l(e, t, n, r, i, s, a) {
return ((e = e + (t & r | n & ~r) + i + a) << s | e >>> 32 - s) + t
}
function h(e, t, n, r, i, s, a) {
return ((e = e + (t ^ n ^ r) + i + a) << s | e >>> 32 - s) + t
}
function f(e, t, n, r, i, s, a) {
return ((e = e + (n ^ (t | ~r)) + i + a) << s | e >>> 32 - s) + t
}
t.MD5 = s._createHelper(r), t.HmacMD5 = s._createHmacHelper(r)
}(Math), n.MD5)
}), Sr(function (e, t) {
var n;
e.exports = (n = dh, function () {
var e = n, r = (t = e.lib).WordArray, i = t.Hasher, t = e.algo, a = [], t = t.SHA1 = i.extend({
_doReset: function () {
this._hash = new r.init([1732584193, 4023233417, 2562383102, 271733878, 3285377520])
}, _doProcessBlock: function (e, t) {
for (var n = this._hash.words, r = n[0], i = n[1], s = n[2], o = n[3], c = n[4], u = 0; u < 80; u++) {
a[u] = u < 16 ? 0 | e[t + u] : (l = a[u - 3] ^ a[u - 8] ^ a[u - 14] ^ a[u - 16]) << 1 | l >>> 31;
var l = (r << 5 | r >>> 27) + c + a[u];
l += u < 20 ? 1518500249 + (i & s | ~i & o) : u < 40 ? 1859775393 + (i ^ s ^ o) : u < 60 ? (i & s | i & o | s & o) - 1894007588 : (i ^ s ^ o) - 899497514, c = o, o = s, s = i << 30 | i >>> 2, i = r, r = l
}
n[0] = n[0] + r | 0, n[1] = n[1] + i | 0, n[2] = n[2] + s | 0, n[3] = n[3] + o | 0, n[4] = n[4] + c | 0
}, _doFinalize: function () {
var e = this._data, t = e.words, n = 8 * this._nDataBytes, r = 8 * e.sigBytes;
return t[r >>> 5] |= 128 << 24 - r % 32, t[14 + (64 + r >>> 9 << 4)] = Math.floor(n / 4294967296), t[15 + (64 + r >>> 9 << 4)] = n, e.sigBytes = 4 * t.length, this._process(), this._hash
}, clone: function () {
var e = i.clone.call(this);
return e._hash = this._hash.clone(), e
}
});
e.SHA1 = i._createHelper(t), e.HmacSHA1 = i._createHmacHelper(t)
}(), n.SHA1)
}), Sr(function (e, t) {
var n;
e.exports = (n = dh, function (e) {
var t = n, i = (r = t.lib).WordArray, s = r.Hasher, r = t.algo, o = [], c = [], u = (function () {
function n(e) {
return 4294967296 * (e - (0 | e)) | 0
}
for (var r = 2, i = 0; i < 64;) !function (t) {
for (var n = e.sqrt(t), r = 2; r <= n; r++) if (!(t % r)) return;
return 1
}(r) || (i < 8 && (o[i] = n(e.pow(r, .5))), c[i] = n(e.pow(r, 1 / 3)), i++), r++
}(), []), r = r.SHA256 = s.extend({
_doReset: function () {
this._hash = new i.init(o.slice(0))
}, _doProcessBlock: function (e, t) {
for (var n = this._hash.words, r = n[0], i = n[1], s = n[2], a = n[3], o = n[4], l = n[5], h = n[6], f = n[7], p = 0; p < 64; p++) {
u[p] = p < 16 ? 0 | e[t + p] : (((d = u[p - 15]) << 25 | d >>> 7) ^ (d << 14 | d >>> 18) ^ d >>> 3) + u[p - 7] + (((d = u[p - 2]) << 15 | d >>> 17) ^ (d << 13 | d >>> 19) ^ d >>> 10) + u[p - 16];
var d = r & i ^ r & s ^ i & s,
g = f + ((o << 26 | o >>> 6) ^ (o << 21 | o >>> 11) ^ (o << 7 | o >>> 25)) + (o & l ^ ~o & h) + c[p] + u[p],
f = h, h = l, l = o, o = a + g | 0, a = s, s = i, i = r,
r = g + (((r << 30 | r >>> 2) ^ (r << 19 | r >>> 13) ^ (r << 10 | r >>> 22)) + d) | 0
}
n[0] = n[0] + r | 0, n[1] = n[1] + i | 0, n[2] = n[2] + s | 0, n[3] = n[3] + a | 0, n[4] = n[4] + o | 0, n[5] = n[5] + l | 0, n[6] = n[6] + h | 0, n[7] = n[7] + f | 0
}, _doFinalize: function () {
var t = this._data, n = t.words, r = 8 * this._nDataBytes, i = 8 * t.sigBytes;
return n[i >>> 5] |= 128 << 24 - i % 32, n[14 + (64 + i >>> 9 << 4)] = e.floor(r / 4294967296), n[15 + (64 + i >>> 9 << 4)] = r, t.sigBytes = 4 * n.length, this._process(), this._hash
}, clone: function () {
var e = s.clone.call(this);
return e._hash = this._hash.clone(), e
}
});
t.SHA256 = s._createHelper(r), t.HmacSHA256 = s._createHmacHelper(r)
}(Math), n.SHA256)
}), Sr(function (e, t) {
var n, r, s, i;
e.exports = (r = (n = e = dh).lib.WordArray, i = n.algo, s = i.SHA256, i = i.SHA224 = s.extend({
_doReset: function () {
this._hash = new r.init([3238371032, 914150663, 812702999, 4144912697, 4290775857, 1750603025, 1694076839, 3204075428])
}, _doFinalize: function () {
var e = s._doFinalize.call(this);
return e.sigBytes -= 4, e
}
}), n.SHA224 = s._createHelper(i), n.HmacSHA224 = s._createHmacHelper(i), e.SHA224)
}), Sr(function (e, t) {
var n;
e.exports = (n = dh, function () {
var e = n, t = e.lib.Hasher, i = (r = e.x64).Word, s = r.WordArray, r = e.algo;
function o() {
return i.create.apply(i, arguments)
}
var c = [o(1116352408, 3609767458), o(1899447441, 602891725), o(3049323471, 3964484399), o(3921009573, 2173295548), o(961987163, 4081628472), o(1508970993, 3053834265), o(2453635748, 2937671579), o(2870763221, 3664609560), o(3624381080, 2734883394), o(310598401, 1164996542), o(607225278, 1323610764), o(1426881987, 3590304994), o(1925078388, 4068182383), o(2162078206, 991336113), o(2614888103, 633803317), o(3248222580, 3479774868), o(3835390401, 2666613458), o(4022224774, 944711139), o(264347078, 2341262773), o(604807628, 2007800933), o(770255983, 1495990901), o(1249150122, 1856431235), o(1555081692, 3175218132), o(1996064986, 2198950837), o(2554220882, 3999719339), o(2821834349, 766784016), o(2952996808, 2566594879), o(3210313671, 3203337956), o(3336571891, 1034457026), o(3584528711, 2466948901), o(113926993, 3758326383), o(338241895, 168717936), o(666307205, 1188179964), o(773529912, 1546045734), o(1294757372, 1522805485), o(1396182291, 2643833823), o(1695183700, 2343527390), o(1986661051, 1014477480), o(2177026350, 1206759142), o(2456956037, 344077627), o(2730485921, 1290863460), o(2820302411, 3158454273), o(3259730800, 3505952657), o(3345764771, 106217008), o(3516065817, 3606008344), o(3600352804, 1432725776), o(4094571909, 1467031594), o(275423344, 851169720), o(430227734, 3100823752), o(506948616, 1363258195), o(659060556, 3750685593), o(883997877, 3785050280), o(958139571, 3318307427), o(1322822218, 3812723403), o(1537002063, 2003034995), o(1747873779, 3602036899), o(1955562222, 1575990012), o(2024104815, 1125592928), o(2227730452, 2716904306), o(2361852424, 442776044), o(2428436474, 593698344), o(2756734187, 3733110249), o(3204031479, 2999351573), o(3329325298, 3815920427), o(3391569614, 3928383900), o(3515267271, 566280711), o(3940187606, 3454069534), o(4118630271, 4000239992), o(116418474, 1914138554), o(174292421, 2731055270), o(289380356, 3203993006), o(460393269, 320620315), o(685471733, 587496836), o(852142971, 1086792851), o(1017036298, 365543100), o(1126000580, 2618297676), o(1288033470, 3409855158), o(1501505948, 4234509866), o(1607167915, 987167468), o(1816402316, 1246189591)],
u = [], r = (function () {
for (var e = 0; e < 80; e++) u[e] = o()
}(), r.SHA512 = t.extend({
_doReset: function () {
this._hash = new s.init([new i.init(1779033703, 4089235720), new i.init(3144134277, 2227873595), new i.init(1013904242, 4271175723), new i.init(2773480762, 1595750129), new i.init(1359893119, 2917565137), new i.init(2600822924, 725511199), new i.init(528734635, 4215389547), new i.init(1541459225, 327033209)])
}, _doProcessBlock: function (e, t) {
for (var r = (n = this._hash.words)[0], i = n[1], s = n[2], a = n[3], o = n[4], l = n[5], h = n[6], n = n[7], p = r.high, d = r.low, m = i.high, _ = i.low, E = s.high, T = s.low, A = a.high, g = a.low, v = o.high, y = o.low, S = l.high, C = l.low, N = h.high, b = h.low, I = n.high, O = n.low, k = p, L = d, D = m, R = _, w = E, x = T, M = A, P = g, B = v, F = y, U = S, H = C, G = N, j = b, q = I, Y = O, K = 0; K < 80; K++) {
var W, V, $ = u[K];
K < 16 ? (V = $.high = 0 | e[t + 2 * K], W = $.low = 0 | e[t + 2 * K + 1]) : (z = (Q = u[K - 15]).high, Q = Q.low, te = (ee = u[K - 2]).high, ee = ee.low, V = (V = (V = ((z >>> 1 | Q << 31) ^ (z >>> 8 | Q << 24) ^ z >>> 7) + (se = u[K - 7]).high + ((W = (Q = (Q >>> 1 | z << 31) ^ (Q >>> 8 | z << 24) ^ (Q >>> 7 | z << 25)) + se.low) >>> 0 < Q >>> 0 ? 1 : 0)) + ((te >>> 19 | ee << 13) ^ (te << 3 | ee >>> 29) ^ te >>> 6) + ((W += z = (ee >>> 19 | te << 13) ^ (ee << 3 | te >>> 29) ^ (ee >>> 6 | te << 26)) >>> 0 < z >>> 0 ? 1 : 0)) + (se = u[K - 16]).high + ((W += Q = se.low) >>> 0 < Q >>> 0 ? 1 : 0), $.high = V, $.low = W);
var he, ee = B & U ^ ~B & G, te = F & H ^ ~F & j, z = k & D ^ k & w ^ D & w,
se = (L >>> 28 | k << 4) ^ (L << 30 | k >>> 2) ^ (L << 25 | k >>> 7), Q = c[K], $ = Q.high,
ye = Q.low,
Se = q + ((B >>> 14 | F << 18) ^ (B >>> 18 | F << 14) ^ (B << 23 | F >>> 9)) + ((he = Y + ((F >>> 14 | B << 18) ^ (F >>> 18 | B << 14) ^ (F << 23 | B >>> 9))) >>> 0 < Y >>> 0 ? 1 : 0),
Ce = se + (L & R ^ L & x ^ R & x), q = G, Y = j, G = U, j = H, U = B, H = F,
B = M + (Se = Se + ee + ((he += te) >>> 0 < te >>> 0 ? 1 : 0) + $ + ((he += ye) >>> 0 < ye >>> 0 ? 1 : 0) + V + ((he += W) >>> 0 < W >>> 0 ? 1 : 0)) + ((F = P + he | 0) >>> 0 < P >>> 0 ? 1 : 0) | 0,
M = w, P = x, w = D, x = R, D = k, R = L,
k = Se + (((k >>> 28 | L << 4) ^ (k << 30 | L >>> 2) ^ (k << 25 | L >>> 7)) + z + (Ce >>> 0 < se >>> 0 ? 1 : 0)) + ((L = he + Ce | 0) >>> 0 < he >>> 0 ? 1 : 0) | 0
}
d = r.low = d + L, r.high = p + k + (d >>> 0 < L >>> 0 ? 1 : 0), _ = i.low = _ + R, i.high = m + D + (_ >>> 0 < R >>> 0 ? 1 : 0), T = s.low = T + x, s.high = E + w + (T >>> 0 < x >>> 0 ? 1 : 0), g = a.low = g + P, a.high = A + M + (g >>> 0 < P >>> 0 ? 1 : 0), y = o.low = y + F, o.high = v + B + (y >>> 0 < F >>> 0 ? 1 : 0), C = l.low = C + H, l.high = S + U + (C >>> 0 < H >>> 0 ? 1 : 0), b = h.low = b + j, h.high = N + G + (b >>> 0 < j >>> 0 ? 1 : 0), O = n.low = O + Y, n.high = I + q + (O >>> 0 < Y >>> 0 ? 1 : 0)
}, _doFinalize: function () {
var e = this._data, t = e.words, n = 8 * this._nDataBytes, r = 8 * e.sigBytes;
return t[r >>> 5] |= 128 << 24 - r % 32, t[30 + (128 + r >>> 10 << 5)] = Math.floor(n / 4294967296), t[31 + (128 + r >>> 10 << 5)] = n, e.sigBytes = 4 * t.length, this._process(), this._hash.toX32()
}, clone: function () {
var e = t.clone.call(this);
return e._hash = this._hash.clone(), e
}, blockSize: 32
}));
e.SHA512 = t._createHelper(r), e.HmacSHA512 = t._createHmacHelper(r)
}(), n.SHA512)
}), Sr(function (e, t) {
var n, i, s, o, r;
e.exports = (r = (n = e = dh).x64, i = r.Word, s = r.WordArray, r = n.algo, o = r.SHA512, r = r.SHA384 = o.extend({
_doReset: function () {
this._hash = new s.init([new i.init(3418070365, 3238371032), new i.init(1654270250, 914150663), new i.init(2438529370, 812702999), new i.init(355462360, 4144912697), new i.init(1731405415, 4290775857), new i.init(2394180231, 1750603025), new i.init(3675008525, 1694076839), new i.init(1203062813, 3204075428)])
}, _doFinalize: function () {
var e = o._doFinalize.call(this);
return e.sigBytes -= 16, e
}
}), n.SHA384 = o._createHelper(r), n.HmacSHA384 = o._createHmacHelper(r), e.SHA384)
}), Sr(function (e, t) {
var n;
e.exports = (n = dh, function (e) {
var t = n, i = (r = t.lib).WordArray, s = r.Hasher, a = t.x64.Word, r = t.algo, c = [], u = [], l = [],
h = (function () {
for (var e = 1, t = 0, n = 0; n < 24; n++) {
c[e + 5 * t] = (n + 1) * (n + 2) / 2 % 64;
var r = (2 * e + 3 * t) % 5, e = t % 5, t = r
}
for (e = 0; e < 5; e++) for (t = 0; t < 5; t++) u[e + 5 * t] = t + (2 * e + 3 * t) % 5 * 5;
for (var i = 1, s = 0; s < 24; s++) {
for (var p, o = 0, h = 0, f = 0; f < 7; f++) 1 & i && ((p = (1 << f) - 1) < 32 ? h ^= 1 << p : o ^= 1 << p - 32), 128 & i ? i = i << 1 ^ 113 : i <<= 1;
l[s] = a.create(o, h)
}
}(), []), r = (function () {
for (var e = 0; e < 25; e++) h[e] = a.create()
}(), r.SHA3 = s.extend({
cfg: s.cfg.extend({outputLength: 512}), _doReset: function () {
for (var e = this._state = [], t = 0; t < 25; t++) e[t] = new a.init;
this.blockSize = (1600 - 2 * this.cfg.outputLength) / 32
}, _doProcessBlock: function (e, t) {
for (var n = this._state, r = this.blockSize / 2, i = 0; i < r; i++) {
var s = e[t + 2 * i], a = e[t + 2 * i + 1],
s = 16711935 & (s << 8 | s >>> 24) | 4278255360 & (s << 24 | s >>> 8);
(O = n[i]).high ^= 16711935 & (a << 8 | a >>> 24) | 4278255360 & (a << 24 | a >>> 8), O.low ^= s
}
for (var o = 0; o < 24; o++) {
for (var f = 0; f < 5; f++) {
for (var p = 0, d = 0, m = 0; m < 5; m++) p ^= (O = n[f + 5 * m]).high, d ^= O.low;
var _ = h[f];
_.high = p, _.low = d
}
for (f = 0; f < 5; f++) for (var E = h[(f + 4) % 5], A = (T = h[(f + 1) % 5]).high, T = T.low, p = E.high ^ (A << 1 | T >>> 31), d = E.low ^ (T << 1 | A >>> 31), m = 0; m < 5; m++) (O = n[f + 5 * m]).high ^= p, O.low ^= d;
for (var v = 1; v < 25; v++) {
var y = (O = n[v]).high, S = O.low, C = c[v];
d = C < 32 ? (p = y << C | S >>> 32 - C, S << C | y >>> 32 - C) : (p = S << C - 32 | y >>> 64 - C, y << C - 32 | S >>> 64 - C), (y = h[u[v]]).high = p, y.low = d
}
var b = h[0], I = n[0];
for (b.high = I.high, b.low = I.low, f = 0; f < 5; f++) for (m = 0; m < 5; m++) {
var O = n[v = f + 5 * m], k = h[v], L = h[(f + 1) % 5 + 5 * m], D = h[(f + 2) % 5 + 5 * m];
O.high = k.high ^ ~L.high & D.high, O.low = k.low ^ ~L.low & D.low
}
(O = n[0]).high ^= (b = l[o]).high, O.low ^= b.low
}
}, _doFinalize: function () {
var t = this._data, n = t.words, r = (this._nDataBytes, 8 * t.sigBytes), s = 32 * this.blockSize;
n[r >>> 5] |= 1 << 24 - r % 32, n[(e.ceil((1 + r) / s) * s >>> 5) - 1] |= 128, t.sigBytes = 4 * n.length, this._process();
for (var a = this._state, c = (r = this.cfg.outputLength / 8) / 8, u = [], l = 0; l < c; l++) {
var f = (h = a[l]).high, h = h.low,
f = 16711935 & (f << 8 | f >>> 24) | 4278255360 & (f << 24 | f >>> 8);
u.push(16711935 & (h << 8 | h >>> 24) | 4278255360 & (h << 24 | h >>> 8)), u.push(f)
}
return new i.init(u, r)
}, clone: function () {
for (var e = s.clone.call(this), t = e._state = this._state.slice(0), n = 0; n < 25; n++) t[n] = t[n].clone();
return e
}
}));
t.SHA3 = s._createHelper(r), t.HmacSHA3 = s._createHmacHelper(r)
}(Math), n.SHA3)
}), Sr(function (e, t) {
var n;
e.exports = (n = dh, function () {
var t = n, i = (r = t.lib).WordArray, s = r.Hasher, r = t.algo,
o = i.create([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 7, 4, 13, 1, 10, 6, 15, 3, 12, 0, 9, 5, 2, 14, 11, 8, 3, 10, 14, 4, 9, 15, 8, 1, 2, 7, 0, 6, 13, 11, 5, 12, 1, 9, 11, 10, 0, 8, 12, 4, 13, 3, 7, 15, 14, 5, 6, 2, 4, 0, 5, 9, 7, 12, 2, 10, 14, 1, 3, 8, 11, 6, 15, 13]),
c = i.create([5, 14, 7, 0, 9, 2, 11, 4, 13, 6, 15, 8, 1, 10, 3, 12, 6, 11, 3, 7, 0, 13, 5, 10, 14, 15, 8, 12, 4, 9, 1, 2, 15, 5, 1, 3, 7, 14, 6, 9, 11, 8, 12, 2, 10, 0, 4, 13, 8, 6, 4, 1, 3, 11, 15, 0, 5, 12, 2, 13, 9, 7, 10, 14, 12, 15, 10, 4, 1, 5, 8, 7, 6, 2, 13, 14, 0, 3, 9, 11]),
u = i.create([11, 14, 15, 12, 5, 8, 7, 9, 11, 13, 14, 15, 6, 7, 9, 8, 7, 6, 8, 13, 11, 9, 7, 15, 7, 12, 15, 9, 11, 7, 13, 12, 11, 13, 6, 7, 14, 9, 13, 15, 14, 8, 13, 6, 5, 12, 7, 5, 11, 12, 14, 15, 14, 15, 9, 8, 9, 14, 5, 6, 8, 6, 5, 12, 9, 15, 5, 11, 6, 8, 13, 12, 5, 12, 13, 14, 11, 8, 5, 6]),
l = i.create([8, 9, 9, 11, 13, 15, 15, 5, 7, 7, 8, 11, 14, 14, 12, 6, 9, 13, 15, 7, 12, 8, 9, 11, 7, 7, 12, 7, 6, 15, 13, 11, 9, 7, 15, 11, 8, 6, 6, 14, 12, 13, 5, 14, 13, 13, 7, 5, 15, 5, 8, 11, 14, 14, 6, 14, 6, 9, 12, 9, 12, 5, 15, 8, 8, 5, 12, 9, 12, 5, 14, 6, 8, 13, 6, 5, 15, 13, 11, 11]),
h = i.create([0, 1518500249, 1859775393, 2400959708, 2840853838]),
f = i.create([1352829926, 1548603684, 1836072691, 2053994217, 0]), r = r.RIPEMD160 = s.extend({
_doReset: function () {
this._hash = i.create([1732584193, 4023233417, 2562383102, 271733878, 3285377520])
}, _doProcessBlock: function (e, t) {
for (var n = 0; n < 16; n++) {
var r = t + n, i = e[r];
e[r] = 16711935 & (i << 8 | i >>> 24) | 4278255360 & (i << 24 | i >>> 8)
}
for (var s, a, p, g, v, I, O = this._hash.words, k = h.words, L = f.words, D = o.words, R = c.words, w = u.words, x = l.words, y = s = O[0], S = a = O[1], C = p = O[2], N = g = O[3], b = v = O[4], n = 0; n < 80; n += 1) I = (I = A(I = (I = s + e[t + D[n]] | 0) + (n < 16 ? (a ^ p ^ g) + k[0] : n < 32 ? m(a, p, g) + k[1] : n < 48 ? ((a | ~p) ^ g) + k[2] : n < 64 ? E(a, p, g) + k[3] : (a ^ (p | ~g)) + k[4]) | 0, w[n])) + v | 0, s = v, v = g, g = A(p, 10), p = a, a = I, I = (I = A(I = (I = y + e[t + R[n]] | 0) + (n < 16 ? (S ^ (C | ~N)) + L[0] : n < 32 ? E(S, C, N) + L[1] : n < 48 ? ((S | ~C) ^ N) + L[2] : n < 64 ? m(S, C, N) + L[3] : (S ^ C ^ N) + L[4]) | 0, x[n])) + b | 0, y = b, b = N, N = A(C, 10), C = S, S = I;
I = O[1] + p + N | 0, O[1] = O[2] + g + b | 0, O[2] = O[3] + v + y | 0, O[3] = O[4] + s + S | 0, O[4] = O[0] + a + C | 0, O[0] = I
}, _doFinalize: function () {
var e = this._data, t = e.words, n = 8 * this._nDataBytes, r = 8 * e.sigBytes;
t[r >>> 5] |= 128 << 24 - r % 32, t[14 + (64 + r >>> 9 << 4)] = 16711935 & (n << 8 | n >>> 24) | 4278255360 & (n << 24 | n >>> 8), e.sigBytes = 4 * (t.length + 1), this._process();
for (var s = (r = this._hash).words, a = 0; a < 5; a++) {
var o = s[a];
s[a] = 16711935 & (o << 8 | o >>> 24) | 4278255360 & (o << 24 | o >>> 8)
}
return r
}, clone: function () {
var e = s.clone.call(this);
return e._hash = this._hash.clone(), e
}
});
function m(e, t, n) {
return e & t | ~e & n
}
function E(e, t, n) {
return e & n | t & ~n
}
function A(e, t) {
return e << t | e >>> 32 - t
}
t.RIPEMD160 = s._createHelper(r), t.HmacRIPEMD160 = s._createHmacHelper(r)
}(), n.RIPEMD160)
}), Sr(function (e, t) {
var i;
e.exports = (e = dh.lib.Base, i = dh.enc.Utf8, void (dh.algo.HMAC = e.extend({
init: function (e, t) {
e = this._hasher = new e.init, "string" == typeof t && (t = i.parse(t));
var n = e.blockSize, r = 4 * n;
(t = t.sigBytes > r ? e.finalize(t) : t).clamp();
for (var e = this._oKey = t.clone(), t = this._iKey = t.clone(), o = e.words, c = t.words, u = 0; u < n; u++) o[u] ^= 1549556828, c[u] ^= 909522486;
e.sigBytes = t.sigBytes = r, this.reset()
}, reset: function () {
var e = this._hasher;
e.reset(), e.update(this._iKey)
}, update: function (e) {
return this._hasher.update(e), this
}, finalize: function (e) {
var t = this._hasher, e = t.finalize(e);
return t.reset(), t.finalize(this._oKey.clone().concat(e))
}
})))
}), Sr(function (e, t) {
var n, i, s, r, o, c, u;
e.exports = (i = (r = (n = e = dh).lib).Base, s = r.WordArray, o = (r = n.algo).SHA1, c = r.HMAC, u = r.PBKDF2 = i.extend({
cfg: i.extend({
keySize: 4,
hasher: o,
iterations: 1
}), init: function (e) {
this.cfg = this.cfg.extend(e)
}, compute: function (e, t) {
for (var n = this.cfg, r = c.create(n.hasher, e), i = s.create(), a = s.create([1]), o = i.words, u = a.words, l = n.keySize, h = n.iterations; o.length < l;) {
var f = r.update(t).finalize(a);
r.reset();
for (var p = f.words, d = p.length, m = f, _ = 1; _ < h; _++) {
m = r.finalize(m), r.reset();
for (var E = m.words, T = 0; T < d; T++) p[T] ^= E[T]
}
i.concat(f), u[0]++
}
return i.sigBytes = 4 * l, i
}
}), n.PBKDF2 = function (e, t, n) {
return u.create(n).compute(e, t)
}, e.PBKDF2)
}), Sr(function (e, t) {
var n, i, s, r, o, c;
e.exports = (i = (r = (n = e = dh).lib).Base, s = r.WordArray, o = (r = n.algo).MD5, c = r.EvpKDF = i.extend({
cfg: i.extend({
keySize: 4,
hasher: o,
iterations: 1
}), init: function (e) {
this.cfg = this.cfg.extend(e)
}, compute: function (e, t) {
for (var n, r = this.cfg, i = r.hasher.create(), a = s.create(), o = a.words, c = r.keySize, u = r.iterations; o.length < c;) {
n && i.update(n), n = i.update(e).finalize(t), i.reset();
for (var l = 1; l < u; l++) n = i.finalize(n), i.reset();
a.concat(n)
}
return a.sigBytes = 4 * c, a
}
}), n.EvpKDF = function (e, t, n) {
return c.create(n).compute(e, t)
}, e.EvpKDF)
}), Sr(function (e, t) {
var n;
e.exports = void ((n = dh).lib.Cipher || function () {
var t = n, r = t.lib, i = r.Base, s = r.WordArray, a = r.BufferedBlockAlgorithm,
c = ((o = t.enc).Utf8, o.Base64), u = t.algo.EvpKDF, l = r.Cipher = a.extend({
cfg: i.extend(), createEncryptor: function (e, t) {
return this.create(this._ENC_XFORM_MODE, e, t)
}, createDecryptor: function (e, t) {
return this.create(this._DEC_XFORM_MODE, e, t)
}, init: function (e, t, n) {
this.cfg = this.cfg.extend(n), this._xformMode = e, this._key = t, this.reset()
}, reset: function () {
a.reset.call(this), this._doReset()
}, process: function (e) {
return this._append(e), this._process()
}, finalize: function (e) {
return e && this._append(e), this._doFinalize()
}, keySize: 4, ivSize: 4, _ENC_XFORM_MODE: 1, _DEC_XFORM_MODE: 2, _createHelper: function (t) {
return {
encrypt: function (n, r, i) {
return e(r).encrypt(t, n, r, i)
}, decrypt: function (n, r, i) {
return e(r).decrypt(t, n, r, i)
}
}
}
}), o = (r.StreamCipher = l.extend({
_doFinalize: function () {
return this._process(!0)
}, blockSize: 1
}), t.mode = {}), f = r.BlockCipherMode = i.extend({
createEncryptor: function (e, t) {
return this.Encryptor.create(e, t)
}, createDecryptor: function (e, t) {
return this.Decryptor.create(e, t)
}, init: function (e, t) {
this._cipher = e, this._iv = t
}
}), o = o.CBC = function () {
var t = f.extend();
function n(t, n, r) {
var i, s = this._iv;
s ? (i = s, this._iv = void 0) : i = this._prevBlock;
for (var a = 0; a < r; a++) t[n + a] ^= i[a]
}
return t.Encryptor = t.extend({
processBlock: function (e, t) {
var r = this._cipher, i = r.blockSize;
n.call(this, e, t, i), r.encryptBlock(e, t), this._prevBlock = e.slice(t, t + i)
}
}), t.Decryptor = t.extend({
processBlock: function (e, t) {
var r = this._cipher, i = r.blockSize, s = e.slice(t, t + i);
r.decryptBlock(e, t), n.call(this, e, t, i), this._prevBlock = s
}
}), t
}(), d = (t.pad = {}).Pkcs7 = {
pad: function (e, t) {
for (var r = (t = 4 * t) - e.sigBytes % t, i = r << 24 | r << 16 | r << 8 | r, a = [], o = 0; o < r; o += 4) a.push(i);
t = s.create(a, r), e.concat(t)
}, unpad: function (e) {
var t = 255 & e.words[e.sigBytes - 1 >>> 2];
e.sigBytes -= t
}
}, m = (r.BlockCipher = l.extend({
cfg: l.cfg.extend({mode: o, padding: d}), reset: function () {
l.reset.call(this);
var e, n = (t = this.cfg).iv, t = t.mode;
this._xformMode == this._ENC_XFORM_MODE ? e = t.createEncryptor : (e = t.createDecryptor, this._minBufferSize = 1), this._mode && this._mode.__creator == e ? this._mode.init(this, n && n.words) : (this._mode = e.call(t, this, n && n.words), this._mode.__creator = e)
}, _doProcessBlock: function (e, t) {
this._mode.processBlock(e, t)
}, _doFinalize: function () {
var e, t = this.cfg.padding;
return this._xformMode == this._ENC_XFORM_MODE ? (t.pad(this._data, this.blockSize), e = this._process(!0)) : (e = this._process(!0), t.unpad(e)), e
}, blockSize: 4
}), r.CipherParams = i.extend({
init: function (e) {
this.mixIn(e)
}, toString: function (e) {
return (e || this.formatter).stringify(this)
}
})), o = (t.format = {}).OpenSSL = {
stringify: function (e) {
var t = e.ciphertext;
return ((e = e.salt) ? s.create([1398893684, 1701076831]).concat(e).concat(t) : t).toString(c)
}, parse: function (e) {
var t, r = (e = c.parse(e)).words;
return 1398893684 == r[0] && 1701076831 == r[1] && (t = s.create(r.slice(2, 4)), r.splice(0, 4), e.sigBytes -= 16), m.create({
ciphertext: e,
salt: t
})
}
}, E = r.SerializableCipher = i.extend({
cfg: i.extend({format: o}), encrypt: function (e, t, n, r) {
r = this.cfg.extend(r);
var t = (i = e.createEncryptor(n, r)).finalize(t), i = i.cfg;
return m.create({
ciphertext: t,
key: n,
iv: i.iv,
algorithm: e,
mode: i.mode,
padding: i.padding,
blockSize: e.blockSize,
formatter: r.format
})
}, decrypt: function (e, t, n, r) {
return r = this.cfg.extend(r), t = this._parse(t, r.format), e.createDecryptor(n, r).finalize(t.ciphertext)
}, _parse: function (e, t) {
return "string" == typeof e ? t.parse(e, this) : e
}
}), d = (t.kdf = {}).OpenSSL = {
execute: function (e, t, n, r) {
return r = r || s.random(8), e = u.create({keySize: t + n}).compute(e, r), n = s.create(e.words.slice(t), 4 * n), e.sigBytes = 4 * t, m.create({
key: e,
iv: n,
salt: r
})
}
}, A = r.PasswordBasedCipher = E.extend({
cfg: E.cfg.extend({kdf: d}), encrypt: function (e, t, n, r) {
return n = (r = this.cfg.extend(r)).kdf.execute(n, e.keySize, e.ivSize), r.iv = n.iv, (e = E.encrypt.call(this, e, t, n.key, r)).mixIn(n), e
}, decrypt: function (e, t, n, r) {
return r = this.cfg.extend(r), t = this._parse(t, r.format), n = r.kdf.execute(n, e.keySize, e.ivSize, t.salt), r.iv = n.iv, E.decrypt.call(this, e, t, n.key, r)
}
});
function e(e) {
return "string" == typeof e ? A : E
}
}())
}), Sr(function (e, t) {
var n;
e.exports = ((n = dh).mode.CFB = function () {
var e = n.lib.BlockCipherMode.extend();
function t(e, t, n, r) {
var i, s = this._iv;
s ? (i = s.slice(0), this._iv = void 0) : i = this._prevBlock, r.encryptBlock(i, 0);
for (var a = 0; a < n; a++) e[t + a] ^= i[a]
}
return e.Encryptor = e.extend({
processBlock: function (e, n) {
var r = this._cipher, i = r.blockSize;
t.call(this, e, n, i, r), this._prevBlock = e.slice(n, n + i)
}
}), e.Decryptor = e.extend({
processBlock: function (e, n) {
var r = this._cipher, i = r.blockSize, s = e.slice(n, n + i);
t.call(this, e, n, i, r), this._prevBlock = s
}
}), e
}(), n.mode.CFB)
}), Sr(function (e, t) {
var n, r;
e.exports = ((e = dh).mode.CTR = (r = (n = e.lib.BlockCipherMode.extend()).Encryptor = n.extend({
processBlock: function (e, t) {
var n = this._cipher, r = n.blockSize, i = this._iv, s = this._counter,
a = (i && (s = this._counter = i.slice(0), this._iv = void 0), s.slice(0));
n.encryptBlock(a, 0), s[r - 1] = s[r - 1] + 1 | 0;
for (var o = 0; o < r; o++) e[t + o] ^= a[o]
}
}), n.Decryptor = r, n), e.mode.CTR)
}), Sr(function (e, t) {
var n;
e.exports = ((n = dh).mode.CTRGladman = function () {
var e = n.lib.BlockCipherMode.extend();
function t(e) {
var t, n, r;
return 255 == (e >> 24 & 255) ? (n = e >> 8 & 255, r = 255 & e, 255 == (t = e >> 16 & 255) ? (t = 0, 255 === n ? (n = 0, 255 === r ? r = 0 : ++r) : ++n) : ++t, e = 0, e = (e += t << 16) + (n << 8) + r) : e += 1 << 24, e
}
function r(e) {
0 === (e[0] = t(e[0])) && (e[1] = t(e[1]))
}
var i = e.Encryptor = e.extend({
processBlock: function (e, t) {
var n = this._cipher, i = n.blockSize, s = this._iv, a = this._counter,
o = (s && (a = this._counter = s.slice(0), this._iv = void 0), r(a), a.slice(0));
n.encryptBlock(o, 0);
for (var c = 0; c < i; c++) e[t + c] ^= o[c]
}
});
return e.Decryptor = i, e
}(), n.mode.CTRGladman)
}), Sr(function (e, t) {
var n, r;
e.exports = ((e = dh).mode.OFB = (r = (n = e.lib.BlockCipherMode.extend()).Encryptor = n.extend({
processBlock: function (e, t) {
var n = this._cipher, r = n.blockSize, i = this._iv, s = this._keystream;
i && (s = this._keystream = i.slice(0), this._iv = void 0), n.encryptBlock(s, 0);
for (var a = 0; a < r; a++) e[t + a] ^= s[a]
}
}), n.Decryptor = r, n), e.mode.OFB)
}), Sr(function (e, t) {
var n;
e.exports = ((e = dh).mode.ECB = ((n = e.lib.BlockCipherMode.extend()).Encryptor = n.extend({
processBlock: function (e, t) {
this._cipher.encryptBlock(e, t)
}
}), n.Decryptor = n.extend({
processBlock: function (e, t) {
this._cipher.decryptBlock(e, t)
}
}), n), e.mode.ECB)
}), Sr(function (e, t) {
e.exports = (dh.pad.AnsiX923 = {
pad: function (e, t) {
var n = (n = e.sigBytes) + (t = (t = 4 * t) - n % t) - 1;
e.clamp(), e.words[n >>> 2] |= t << 24 - n % 4 * 8, e.sigBytes += t
}, unpad: function (e) {
var t = 255 & e.words[e.sigBytes - 1 >>> 2];
e.sigBytes -= t
}
}, dh.pad.Ansix923)
}), Sr(function (e, t) {
var n;
e.exports = ((n = dh).pad.Iso10126 = {
pad: function (e, t) {
t = (t *= 4) - e.sigBytes % t, e.concat(n.lib.WordArray.random(t - 1)).concat(n.lib.WordArray.create([t << 24], 1))
}, unpad: function (e) {
var t = 255 & e.words[e.sigBytes - 1 >>> 2];
e.sigBytes -= t
}
}, n.pad.Iso10126)
}), Sr(function (e, t) {
var n;
e.exports = ((n = dh).pad.Iso97971 = {
pad: function (e, t) {
e.concat(n.lib.WordArray.create([2147483648], 1)), n.pad.ZeroPadding.pad(e, t)
}, unpad: function (e) {
n.pad.ZeroPadding.unpad(e), e.sigBytes--
}
}, n.pad.Iso97971)
}), Sr(function (e, t) {
e.exports = (dh.pad.ZeroPadding = {
pad: function (e, t) {
t *= 4, e.clamp(), e.sigBytes += t - (e.sigBytes % t || t)
}, unpad: function (e) {
for (var t = e.words, n = e.sigBytes - 1, n = e.sigBytes - 1; 0 <= n; n--) if (t[n >>> 2] >>> 24 - n % 4 * 8 & 255) {
e.sigBytes = n + 1;
break
}
}
}, dh.pad.ZeroPadding)
}), Sr(function (e, t) {
e.exports = (dh.pad.NoPadding = {
pad: function () {
}, unpad: function () {
}
}, dh.pad.NoPadding)
}), Sr(function (e, t) {
var r, i;
e.exports = (r = (e = dh).lib.CipherParams, i = e.enc.Hex, e.format.Hex = {
stringify: function (e) {
return e.ciphertext.toString(i)
}, parse: function (e) {
return e = i.parse(e), r.create({ciphertext: e})
}
}, e.format.Hex)
}), Sr(function (e, t) {
var n;
e.exports = (n = dh, function () {
var e = n, t = e.lib.BlockCipher, r = e.algo, i = [], s = [], a = [], o = [], c = [], u = [], l = [], h = [],
f = [], p = [], d = (function () {
for (var e = [], t = 0; t < 256; t++) e[t] = t < 128 ? t << 1 : t << 1 ^ 283;
for (var n = 0, r = 0, t = 0; t < 256; t++) {
var d = r ^ r << 1 ^ r << 2 ^ r << 3 ^ r << 4, m = (i[n] = d = d >>> 8 ^ 255 & d ^ 99, e[s[d] = n]),
_ = e[m], E = e[_], T = 257 * e[d] ^ 16843008 * d;
a[n] = T << 24 | T >>> 8, o[n] = T << 16 | T >>> 16, c[n] = T << 8 | T >>> 24, u[n] = T, l[d] = (T = 16843009 * E ^ 65537 * _ ^ 257 * m ^ 16843008 * n) << 24 | T >>> 8, h[d] = T << 16 | T >>> 16, f[d] = T << 8 | T >>> 24, p[d] = T, n ? (n = m ^ e[e[e[E ^ m]]], r ^= e[e[r]]) : n = r = 1
}
}(), [0, 1, 2, 4, 8, 16, 32, 64, 128, 27, 54]), r = r.AES = t.extend({
_doReset: function () {
if (!this._nRounds || this._keyPriorReset !== this._key) {
for (var e = this._keyPriorReset = this._key, t = e.words, n = e.sigBytes / 4, r = 4 * (1 + (this._nRounds = 6 + n)), s = this._keySchedule = [], a = 0; a < r; a++) a < n ? s[a] = t[a] : (u = s[a - 1], a % n ? 6 < n && a % n == 4 && (u = i[u >>> 24] << 24 | i[u >>> 16 & 255] << 16 | i[u >>> 8 & 255] << 8 | i[255 & u]) : (u = i[(u = u << 8 | u >>> 24) >>> 24] << 24 | i[u >>> 16 & 255] << 16 | i[u >>> 8 & 255] << 8 | i[255 & u], u ^= d[a / n | 0] << 24), s[a] = s[a - n] ^ u);
for (var o = this._invKeySchedule = [], c = 0; c < r; c++) {
var a = r - c, u = c % 4 ? s[a] : s[a - 4];
o[c] = c < 4 || a <= 4 ? u : l[i[u >>> 24]] ^ h[i[u >>> 16 & 255]] ^ f[i[u >>> 8 & 255]] ^ p[i[255 & u]]
}
}
}, encryptBlock: function (e, t) {
this._doCryptBlock(e, t, this._keySchedule, a, o, c, u, i)
}, decryptBlock: function (e, t) {
var n = e[t + 1];
e[t + 1] = e[t + 3], e[t + 3] = n, this._doCryptBlock(e, t, this._invKeySchedule, l, h, f, p, s), n = e[t + 1], e[t + 1] = e[t + 3], e[t + 3] = n
}, _doCryptBlock: function (e, t, n, r, i, s, a, o) {
for (var c = this._nRounds, u = e[t] ^ n[0], l = e[t + 1] ^ n[1], h = e[t + 2] ^ n[2], f = e[t + 3] ^ n[3], p = 4, d = 1; d < c; d++) var m = r[u >>> 24] ^ i[l >>> 16 & 255] ^ s[h >>> 8 & 255] ^ a[255 & f] ^ n[p++], _ = r[l >>> 24] ^ i[h >>> 16 & 255] ^ s[f >>> 8 & 255] ^ a[255 & u] ^ n[p++], E = r[h >>> 24] ^ i[f >>> 16 & 255] ^ s[u >>> 8 & 255] ^ a[255 & l] ^ n[p++], T = r[f >>> 24] ^ i[u >>> 16 & 255] ^ s[l >>> 8 & 255] ^ a[255 & h] ^ n[p++], u = m, l = _, h = E, f = T;
m = (o[u >>> 24] << 24 | o[l >>> 16 & 255] << 16 | o[h >>> 8 & 255] << 8 | o[255 & f]) ^ n[p++], _ = (o[l >>> 24] << 24 | o[h >>> 16 & 255] << 16 | o[f >>> 8 & 255] << 8 | o[255 & u]) ^ n[p++], E = (o[h >>> 24] << 24 | o[f >>> 16 & 255] << 16 | o[u >>> 8 & 255] << 8 | o[255 & l]) ^ n[p++], T = (o[f >>> 24] << 24 | o[u >>> 16 & 255] << 16 | o[l >>> 8 & 255] << 8 | o[255 & h]) ^ n[p++], e[t] = m, e[t + 1] = _, e[t + 2] = E, e[t + 3] = T
}, keySize: 8
});
e.AES = t._createHelper(r)
}(), n.AES)
}), Sr(function (e, t) {
var n;
e.exports = (n = dh, function () {
var e = n, r = (t = e.lib).WordArray, t = t.BlockCipher, s = e.algo,
a = [57, 49, 41, 33, 25, 17, 9, 1, 58, 50, 42, 34, 26, 18, 10, 2, 59, 51, 43, 35, 27, 19, 11, 3, 60, 52, 44, 36, 63, 55, 47, 39, 31, 23, 15, 7, 62, 54, 46, 38, 30, 22, 14, 6, 61, 53, 45, 37, 29, 21, 13, 5, 28, 20, 12, 4],
o = [14, 17, 11, 24, 1, 5, 3, 28, 15, 6, 21, 10, 23, 19, 12, 4, 26, 8, 16, 7, 27, 20, 13, 2, 41, 52, 31, 37, 47, 55, 30, 40, 51, 45, 33, 48, 44, 49, 39, 56, 34, 53, 46, 42, 50, 36, 29, 32],
c = [1, 2, 4, 6, 8, 10, 12, 14, 15, 17, 19, 21, 23, 25, 27, 28], u = [{
0: 8421888,
268435456: 32768,
536870912: 8421378,
805306368: 2,
1073741824: 512,
1342177280: 8421890,
1610612736: 8389122,
1879048192: 8388608,
2147483648: 514,
2415919104: 8389120,
2684354560: 33280,
2952790016: 8421376,
3221225472: 32770,
3489660928: 8388610,
3758096384: 0,
4026531840: 33282,
134217728: 0,
402653184: 8421890,
671088640: 33282,
939524096: 32768,
1207959552: 8421888,
1476395008: 512,
1744830464: 8421378,
2013265920: 2,
2281701376: 8389120,
2550136832: 33280,
2818572288: 8421376,
3087007744: 8389122,
3355443200: 8388610,
3623878656: 32770,
3892314112: 514,
4160749568: 8388608,
1: 32768,
268435457: 2,
536870913: 8421888,
805306369: 8388608,
1073741825: 8421378,
1342177281: 33280,
1610612737: 512,
1879048193: 8389122,
2147483649: 8421890,
2415919105: 8421376,
2684354561: 8388610,
2952790017: 33282,
3221225473: 514,
3489660929: 8389120,
3758096385: 32770,
4026531841: 0,
134217729: 8421890,
402653185: 8421376,
671088641: 8388608,
939524097: 512,
1207959553: 32768,
1476395009: 8388610,
1744830465: 2,
2013265921: 33282,
2281701377: 32770,
2550136833: 8389122,
2818572289: 514,
3087007745: 8421888,
3355443201: 8389120,
3623878657: 0,
3892314113: 33280,
4160749569: 8421378
}, {
0: 1074282512,
16777216: 16384,
33554432: 524288,
50331648: 1074266128,
67108864: 1073741840,
83886080: 1074282496,
100663296: 1073758208,
117440512: 16,
134217728: 540672,
150994944: 1073758224,
167772160: 1073741824,
184549376: 540688,
201326592: 524304,
218103808: 0,
234881024: 16400,
251658240: 1074266112,
8388608: 1073758208,
25165824: 540688,
41943040: 16,
58720256: 1073758224,
75497472: 1074282512,
92274688: 1073741824,
109051904: 524288,
125829120: 1074266128,
142606336: 524304,
159383552: 0,
176160768: 16384,
192937984: 1074266112,
209715200: 1073741840,
226492416: 540672,
243269632: 1074282496,
260046848: 16400,
268435456: 0,
285212672: 1074266128,
301989888: 1073758224,
318767104: 1074282496,
335544320: 1074266112,
352321536: 16,
369098752: 540688,
385875968: 16384,
402653184: 16400,
419430400: 524288,
436207616: 524304,
452984832: 1073741840,
469762048: 540672,
486539264: 1073758208,
503316480: 1073741824,
520093696: 1074282512,
276824064: 540688,
293601280: 524288,
310378496: 1074266112,
327155712: 16384,
343932928: 1073758208,
360710144: 1074282512,
377487360: 16,
394264576: 1073741824,
411041792: 1074282496,
427819008: 1073741840,
444596224: 1073758224,
461373440: 524304,
478150656: 0,
494927872: 16400,
511705088: 1074266128,
528482304: 540672
}, {
0: 260,
1048576: 0,
2097152: 67109120,
3145728: 65796,
4194304: 65540,
5242880: 67108868,
6291456: 67174660,
7340032: 67174400,
8388608: 67108864,
9437184: 67174656,
10485760: 65792,
11534336: 67174404,
12582912: 67109124,
13631488: 65536,
14680064: 4,
15728640: 256,
524288: 67174656,
1572864: 67174404,
2621440: 0,
3670016: 67109120,
4718592: 67108868,
5767168: 65536,
6815744: 65540,
7864320: 260,
8912896: 4,
9961472: 256,
11010048: 67174400,
12058624: 65796,
13107200: 65792,
14155776: 67109124,
15204352: 67174660,
16252928: 67108864,
16777216: 67174656,
17825792: 65540,
18874368: 65536,
19922944: 67109120,
20971520: 256,
22020096: 67174660,
23068672: 67108868,
24117248: 0,
25165824: 67109124,
26214400: 67108864,
27262976: 4,
28311552: 65792,
29360128: 67174400,
30408704: 260,
31457280: 65796,
32505856: 67174404,
17301504: 67108864,
18350080: 260,
19398656: 67174656,
20447232: 0,
21495808: 65540,
22544384: 67109120,
23592960: 256,
24641536: 67174404,
25690112: 65536,
26738688: 67174660,
27787264: 65796,
28835840: 67108868,
29884416: 67109124,
30932992: 67174400,
31981568: 4,
33030144: 65792
}, {
0: 2151682048,
65536: 2147487808,
131072: 4198464,
196608: 2151677952,
262144: 0,
327680: 4198400,
393216: 2147483712,
458752: 4194368,
524288: 2147483648,
589824: 4194304,
655360: 64,
720896: 2147487744,
786432: 2151678016,
851968: 4160,
917504: 4096,
983040: 2151682112,
32768: 2147487808,
98304: 64,
163840: 2151678016,
229376: 2147487744,
294912: 4198400,
360448: 2151682112,
425984: 0,
491520: 2151677952,
557056: 4096,
622592: 2151682048,
688128: 4194304,
753664: 4160,
819200: 2147483648,
884736: 4194368,
950272: 4198464,
1015808: 2147483712,
1048576: 4194368,
1114112: 4198400,
1179648: 2147483712,
1245184: 0,
1310720: 4160,
1376256: 2151678016,
1441792: 2151682048,
1507328: 2147487808,
1572864: 2151682112,
1638400: 2147483648,
1703936: 2151677952,
1769472: 4198464,
1835008: 2147487744,
1900544: 4194304,
1966080: 64,
2031616: 4096,
1081344: 2151677952,
1146880: 2151682112,
1212416: 0,
1277952: 4198400,
1343488: 4194368,
1409024: 2147483648,
1474560: 2147487808,
1540096: 64,
1605632: 2147483712,
1671168: 4096,
1736704: 2147487744,
1802240: 2151678016,
1867776: 4160,
1933312: 2151682048,
1998848: 4194304,
2064384: 4198464
}, {
0: 128,
4096: 17039360,
8192: 262144,
12288: 536870912,
16384: 537133184,
20480: 16777344,
24576: 553648256,
28672: 262272,
32768: 16777216,
36864: 537133056,
40960: 536871040,
45056: 553910400,
49152: 553910272,
53248: 0,
57344: 17039488,
61440: 553648128,
2048: 17039488,
6144: 553648256,
10240: 128,
14336: 17039360,
18432: 262144,
22528: 537133184,
26624: 553910272,
30720: 536870912,
34816: 537133056,
38912: 0,
43008: 553910400,
47104: 16777344,
51200: 536871040,
55296: 553648128,
59392: 16777216,
63488: 262272,
65536: 262144,
69632: 128,
73728: 536870912,
77824: 553648256,
81920: 16777344,
86016: 553910272,
90112: 537133184,
94208: 16777216,
98304: 553910400,
102400: 553648128,
106496: 17039360,
110592: 537133056,
114688: 262272,
118784: 536871040,
122880: 0,
126976: 17039488,
67584: 553648256,
71680: 16777216,
75776: 17039360,
79872: 537133184,
83968: 536870912,
88064: 17039488,
92160: 128,
96256: 553910272,
100352: 262272,
104448: 553910400,
108544: 0,
112640: 553648128,
116736: 16777344,
120832: 262144,
124928: 537133056,
129024: 536871040
}, {
0: 268435464,
256: 8192,
512: 270532608,
768: 270540808,
1024: 268443648,
1280: 2097152,
1536: 2097160,
1792: 268435456,
2048: 0,
2304: 268443656,
2560: 2105344,
2816: 8,
3072: 270532616,
3328: 2105352,
3584: 8200,
3840: 270540800,
128: 270532608,
384: 270540808,
640: 8,
896: 2097152,
1152: 2105352,
1408: 268435464,
1664: 268443648,
1920: 8200,
2176: 2097160,
2432: 8192,
2688: 268443656,
2944: 270532616,
3200: 0,
3456: 270540800,
3712: 2105344,
3968: 268435456,
4096: 268443648,
4352: 270532616,
4608: 270540808,
4864: 8200,
5120: 2097152,
5376: 268435456,
5632: 268435464,
5888: 2105344,
6144: 2105352,
6400: 0,
6656: 8,
6912: 270532608,
7168: 8192,
7424: 268443656,
7680: 270540800,
7936: 2097160,
4224: 8,
4480: 2105344,
4736: 2097152,
4992: 268435464,
5248: 268443648,
5504: 8200,
5760: 270540808,
6016: 270532608,
6272: 270540800,
6528: 270532616,
6784: 8192,
7040: 2105352,
7296: 2097160,
7552: 0,
7808: 268435456,
8064: 268443656
}, {
0: 1048576,
16: 33555457,
32: 1024,
48: 1049601,
64: 34604033,
80: 0,
96: 1,
112: 34603009,
128: 33555456,
144: 1048577,
160: 33554433,
176: 34604032,
192: 34603008,
208: 1025,
224: 1049600,
240: 33554432,
8: 34603009,
24: 0,
40: 33555457,
56: 34604032,
72: 1048576,
88: 33554433,
104: 33554432,
120: 1025,
136: 1049601,
152: 33555456,
168: 34603008,
184: 1048577,
200: 1024,
216: 34604033,
232: 1,
248: 1049600,
256: 33554432,
272: 1048576,
288: 33555457,
304: 34603009,
320: 1048577,
336: 33555456,
352: 34604032,
368: 1049601,
384: 1025,
400: 34604033,
416: 1049600,
432: 1,
448: 0,
464: 34603008,
480: 33554433,
496: 1024,
264: 1049600,
280: 33555457,
296: 34603009,
312: 1,
328: 33554432,
344: 1048576,
360: 1025,
376: 34604032,
392: 33554433,
408: 34603008,
424: 0,
440: 34604033,
456: 1049601,
472: 1024,
488: 33555456,
504: 1048577
}, {
0: 134219808,
1: 131072,
2: 134217728,
3: 32,
4: 131104,
5: 134350880,
6: 134350848,
7: 2048,
8: 134348800,
9: 134219776,
10: 133120,
11: 134348832,
12: 2080,
13: 0,
14: 134217760,
15: 133152,
2147483648: 2048,
2147483649: 134350880,
2147483650: 134219808,
2147483651: 134217728,
2147483652: 134348800,
2147483653: 133120,
2147483654: 133152,
2147483655: 32,
2147483656: 134217760,
2147483657: 2080,
2147483658: 131104,
2147483659: 134350848,
2147483660: 0,
2147483661: 134348832,
2147483662: 134219776,
2147483663: 131072,
16: 133152,
17: 134350848,
18: 32,
19: 2048,
20: 134219776,
21: 134217760,
22: 134348832,
23: 131072,
24: 0,
25: 131104,
26: 134348800,
27: 134219808,
28: 134350880,
29: 133120,
30: 2080,
31: 134217728,
2147483664: 131072,
2147483665: 2048,
2147483666: 134348832,
2147483667: 133152,
2147483668: 32,
2147483669: 134348800,
2147483670: 134217728,
2147483671: 134219808,
2147483672: 134350880,
2147483673: 134217760,
2147483674: 134219776,
2147483675: 0,
2147483676: 133120,
2147483677: 2080,
2147483678: 131104,
2147483679: 134350848
}], l = [4160749569, 528482304, 33030144, 2064384, 129024, 8064, 504, 2147483679], h = s.DES = t.extend({
_doReset: function () {
for (var e = this._key.words, t = [], n = 0; n < 56; n++) {
var r = a[n] - 1;
t[n] = e[r >>> 5] >>> 31 - r % 32 & 1
}
for (var i = this._subKeys = [], s = 0; s < 16; s++) {
for (var u = i[s] = [], l = c[s], n = 0; n < 24; n++) u[n / 6 | 0] |= t[(o[n] - 1 + l) % 28] << 31 - n % 6, u[4 + (n / 6 | 0)] |= t[28 + (o[n + 24] - 1 + l) % 28] << 31 - n % 6;
for (u[0] = u[0] << 1 | u[0] >>> 31, n = 1; n < 7; n++) u[n] = u[n] >>> 4 * (n - 1) + 3;
u[7] = u[7] << 5 | u[7] >>> 27
}
var h = this._invSubKeys = [];
for (n = 0; n < 16; n++) h[n] = i[15 - n]
}, encryptBlock: function (e, t) {
this._doCryptBlock(e, t, this._subKeys)
}, decryptBlock: function (e, t) {
this._doCryptBlock(e, t, this._invSubKeys)
}, _doCryptBlock: function (e, t, n) {
this._lBlock = e[t], this._rBlock = e[t + 1], f.call(this, 4, 252645135), f.call(this, 16, 65535), p.call(this, 2, 858993459), p.call(this, 8, 16711935), f.call(this, 1, 1431655765);
for (var r = 0; r < 16; r++) {
for (var i = n[r], s = this._lBlock, a = this._rBlock, o = 0, c = 0; c < 8; c++) o |= u[c][((a ^ i[c]) & l[c]) >>> 0];
this._lBlock = a, this._rBlock = s ^ o
}
var h = this._lBlock;
this._lBlock = this._rBlock, this._rBlock = h, f.call(this, 1, 1431655765), p.call(this, 8, 16711935), p.call(this, 2, 858993459), f.call(this, 16, 65535), f.call(this, 4, 252645135), e[t] = this._lBlock, e[t + 1] = this._rBlock
}, keySize: 2, ivSize: 2, blockSize: 2
});
function f(e, t) {
t = (this._lBlock >>> e ^ this._rBlock) & t, this._rBlock ^= t, this._lBlock ^= t << e
}
function p(e, t) {
t = (this._rBlock >>> e ^ this._lBlock) & t, this._lBlock ^= t, this._rBlock ^= t << e
}
e.DES = t._createHelper(h), s = s.TripleDES = t.extend({
_doReset: function () {
if (2 !== (e = this._key.words).length && 4 !== e.length && e.length < 6) throw new Error("Invalid key length - 3DES requires the key length to be 64, 128, 192 or >192.");
var t = e.slice(0, 2), n = e.length < 4 ? e.slice(0, 2) : e.slice(2, 4),
e = e.length < 6 ? e.slice(0, 2) : e.slice(4, 6);
this._des1 = h.createEncryptor(r.create(t)), this._des2 = h.createEncryptor(r.create(n)), this._des3 = h.createEncryptor(r.create(e))
}, encryptBlock: function (e, t) {
this._des1.encryptBlock(e, t), this._des2.decryptBlock(e, t), this._des3.encryptBlock(e, t)
}, decryptBlock: function (e, t) {
this._des3.decryptBlock(e, t), this._des2.encryptBlock(e, t), this._des1.decryptBlock(e, t)
}, keySize: 6, ivSize: 2, blockSize: 2
}), e.TripleDES = t._createHelper(s)
}(), n.TripleDES)
}), Sr(function (e, t) {
var n;
e.exports = (n = dh, function () {
var e = n, t = e.lib.StreamCipher, r = e.algo, i = r.RC4 = t.extend({
_doReset: function () {
for (var e = this._key, t = e.words, n = e.sigBytes, r = this._S = [], i = 0; i < 256; i++) r[i] = i;
for (var i = 0, s = 0; i < 256; i++) {
var a = t[(a = i % n) >>> 2] >>> 24 - a % 4 * 8 & 255, s = (s + r[i] + a) % 256, a = r[i];
r[i] = r[s], r[s] = a
}
this._i = this._j = 0
}, _doProcessBlock: function (e, t) {
e[t] ^= s.call(this)
}, keySize: 8, ivSize: 0
});
function s() {
for (var e = this._S, t = this._i, n = this._j, r = 0, i = 0; i < 4; i++) {
var n = (n + e[t = (t + 1) % 256]) % 256, s = e[t];
e[t] = e[n], e[n] = s, r |= e[(e[t] + e[n]) % 256] << 24 - 8 * i
}
return this._i = t, this._j = n, r
}
e.RC4 = t._createHelper(i), r = r.RC4Drop = i.extend({
cfg: i.cfg.extend({drop: 192}), _doReset: function () {
i._doReset.call(this);
for (var e = this.cfg.drop; 0 < e; e--) s.call(this)
}
}), e.RC4Drop = t._createHelper(r)
}(), n.RC4)
}), Sr(function (e, t) {
var n;
e.exports = (n = dh, function () {
var e = n, t = e.lib.StreamCipher, r = e.algo, i = [], s = [], a = [], r = r.Rabbit = t.extend({
_doReset: function () {
for (var e = this._key.words, t = this.cfg.iv, n = 0; n < 4; n++) e[n] = 16711935 & (e[n] << 8 | e[n] >>> 24) | 4278255360 & (e[n] << 24 | e[n] >>> 8);
for (var r = this._X = [e[0], e[3] << 16 | e[2] >>> 16, e[1], e[0] << 16 | e[3] >>> 16, e[2], e[1] << 16 | e[0] >>> 16, e[3], e[2] << 16 | e[1] >>> 16], i = this._C = [e[2] << 16 | e[2] >>> 16, 4294901760 & e[0] | 65535 & e[1], e[3] << 16 | e[3] >>> 16, 4294901760 & e[1] | 65535 & e[2], e[0] << 16 | e[0] >>> 16, 4294901760 & e[2] | 65535 & e[3], e[1] << 16 | e[1] >>> 16, 4294901760 & e[3] | 65535 & e[0]], n = this._b = 0; n < 4; n++) c.call(this);
for (n = 0; n < 8; n++) i[n] ^= r[n + 4 & 7];
if (t) {
var a = (t = t.words)[0],
h = (a = 16711935 & (a << 8 | a >>> 24) | 4278255360 & (a << 24 | a >>> 8)) >>> 16 | 4294901760 & (t = 16711935 & ((t = t[1]) << 8 | t >>> 24) | 4278255360 & (t << 24 | t >>> 8)),
f = t << 16 | 65535 & a;
for (i[0] ^= a, i[1] ^= h, i[2] ^= t, i[3] ^= f, i[4] ^= a, i[5] ^= h, i[6] ^= t, i[7] ^= f, n = 0; n < 4; n++) c.call(this)
}
}, _doProcessBlock: function (e, t) {
var n = this._X;
c.call(this), i[0] = n[0] ^ n[5] >>> 16 ^ n[3] << 16, i[1] = n[2] ^ n[7] >>> 16 ^ n[5] << 16, i[2] = n[4] ^ n[1] >>> 16 ^ n[7] << 16, i[3] = n[6] ^ n[3] >>> 16 ^ n[1] << 16;
for (var r = 0; r < 4; r++) i[r] = 16711935 & (i[r] << 8 | i[r] >>> 24) | 4278255360 & (i[r] << 24 | i[r] >>> 8), e[t + r] ^= i[r]
}, blockSize: 4, ivSize: 2
});
function c() {
for (var e = this._X, t = this._C, n = 0; n < 8; n++) s[n] = t[n];
for (t[0] = t[0] + 1295307597 + this._b | 0, t[1] = t[1] + 3545052371 + (t[0] >>> 0 < s[0] >>> 0 ? 1 : 0) | 0, t[2] = t[2] + 886263092 + (t[1] >>> 0 < s[1] >>> 0 ? 1 : 0) | 0, t[3] = t[3] + 1295307597 + (t[2] >>> 0 < s[2] >>> 0 ? 1 : 0) | 0, t[4] = t[4] + 3545052371 + (t[3] >>> 0 < s[3] >>> 0 ? 1 : 0) | 0, t[5] = t[5] + 886263092 + (t[4] >>> 0 < s[4] >>> 0 ? 1 : 0) | 0, t[6] = t[6] + 1295307597 + (t[5] >>> 0 < s[5] >>> 0 ? 1 : 0) | 0, t[7] = t[7] + 3545052371 + (t[6] >>> 0 < s[6] >>> 0 ? 1 : 0) | 0, this._b = t[7] >>> 0 < s[7] >>> 0 ? 1 : 0, n = 0; n < 8; n++) {
var r = e[n] + t[n], i = 65535 & r, o = r >>> 16;
a[n] = ((i * i >>> 17) + i * o >>> 15) + o * o ^ ((4294901760 & r) * r | 0) + ((65535 & r) * r | 0)
}
e[0] = a[0] + (a[7] << 16 | a[7] >>> 16) + (a[6] << 16 | a[6] >>> 16) | 0, e[1] = a[1] + (a[0] << 8 | a[0] >>> 24) + a[7] | 0, e[2] = a[2] + (a[1] << 16 | a[1] >>> 16) + (a[0] << 16 | a[0] >>> 16) | 0, e[3] = a[3] + (a[2] << 8 | a[2] >>> 24) + a[1] | 0, e[4] = a[4] + (a[3] << 16 | a[3] >>> 16) + (a[2] << 16 | a[2] >>> 16) | 0, e[5] = a[5] + (a[4] << 8 | a[4] >>> 24) + a[3] | 0, e[6] = a[6] + (a[5] << 16 | a[5] >>> 16) + (a[4] << 16 | a[4] >>> 16) | 0, e[7] = a[7] + (a[6] << 8 | a[6] >>> 24) + a[5] | 0
}
e.Rabbit = t._createHelper(r)
}(), n.Rabbit)
}), Sr(function (e, t) {
var n;
e.exports = (n = dh, function () {
var e = n, t = e.lib.StreamCipher, r = e.algo, i = [], s = [], a = [], r = r.RabbitLegacy = t.extend({
_doReset: function () {
for (var e = this._key.words, t = this.cfg.iv, n = this._X = [e[0], e[3] << 16 | e[2] >>> 16, e[1], e[0] << 16 | e[3] >>> 16, e[2], e[1] << 16 | e[0] >>> 16, e[3], e[2] << 16 | e[1] >>> 16], r = this._C = [e[2] << 16 | e[2] >>> 16, 4294901760 & e[0] | 65535 & e[1], e[3] << 16 | e[3] >>> 16, 4294901760 & e[1] | 65535 & e[2], e[0] << 16 | e[0] >>> 16, 4294901760 & e[2] | 65535 & e[3], e[1] << 16 | e[1] >>> 16, 4294901760 & e[3] | 65535 & e[0]], i = this._b = 0; i < 4; i++) c.call(this);
for (i = 0; i < 8; i++) r[i] ^= n[i + 4 & 7];
if (t) {
var h = (t = 16711935 & ((t = (e = t.words)[0]) << 8 | t >>> 24) | 4278255360 & (t << 24 | t >>> 8)) >>> 16 | 4294901760 & (e = 16711935 & ((e = e[1]) << 8 | e >>> 24) | 4278255360 & (e << 24 | e >>> 8)),
f = e << 16 | 65535 & t;
for (r[0] ^= t, r[1] ^= h, r[2] ^= e, r[3] ^= f, r[4] ^= t, r[5] ^= h, r[6] ^= e, r[7] ^= f, i = 0; i < 4; i++) c.call(this)
}
}, _doProcessBlock: function (e, t) {
var n = this._X;
c.call(this), i[0] = n[0] ^ n[5] >>> 16 ^ n[3] << 16, i[1] = n[2] ^ n[7] >>> 16 ^ n[5] << 16, i[2] = n[4] ^ n[1] >>> 16 ^ n[7] << 16, i[3] = n[6] ^ n[3] >>> 16 ^ n[1] << 16;
for (var r = 0; r < 4; r++) i[r] = 16711935 & (i[r] << 8 | i[r] >>> 24) | 4278255360 & (i[r] << 24 | i[r] >>> 8), e[t + r] ^= i[r]
}, blockSize: 4, ivSize: 2
});
function c() {
for (var e = this._X, t = this._C, n = 0; n < 8; n++) s[n] = t[n];
for (t[0] = t[0] + 1295307597 + this._b | 0, t[1] = t[1] + 3545052371 + (t[0] >>> 0 < s[0] >>> 0 ? 1 : 0) | 0, t[2] = t[2] + 886263092 + (t[1] >>> 0 < s[1] >>> 0 ? 1 : 0) | 0, t[3] = t[3] + 1295307597 + (t[2] >>> 0 < s[2] >>> 0 ? 1 : 0) | 0, t[4] = t[4] + 3545052371 + (t[3] >>> 0 < s[3] >>> 0 ? 1 : 0) | 0, t[5] = t[5] + 886263092 + (t[4] >>> 0 < s[4] >>> 0 ? 1 : 0) | 0, t[6] = t[6] + 1295307597 + (t[5] >>> 0 < s[5] >>> 0 ? 1 : 0) | 0, t[7] = t[7] + 3545052371 + (t[6] >>> 0 < s[6] >>> 0 ? 1 : 0) | 0, this._b = t[7] >>> 0 < s[7] >>> 0 ? 1 : 0, n = 0; n < 8; n++) {
var r = e[n] + t[n], i = 65535 & r, o = r >>> 16;
a[n] = ((i * i >>> 17) + i * o >>> 15) + o * o ^ ((4294901760 & r) * r | 0) + ((65535 & r) * r | 0)
}
e[0] = a[0] + (a[7] << 16 | a[7] >>> 16) + (a[6] << 16 | a[6] >>> 16) | 0, e[1] = a[1] + (a[0] << 8 | a[0] >>> 24) + a[7] | 0, e[2] = a[2] + (a[1] << 16 | a[1] >>> 16) + (a[0] << 16 | a[0] >>> 16) | 0, e[3] = a[3] + (a[2] << 8 | a[2] >>> 24) + a[1] | 0, e[4] = a[4] + (a[3] << 16 | a[3] >>> 16) + (a[2] << 16 | a[2] >>> 16) | 0, e[5] = a[5] + (a[4] << 8 | a[4] >>> 24) + a[3] | 0, e[6] = a[6] + (a[5] << 16 | a[5] >>> 16) + (a[4] << 16 | a[4] >>> 16) | 0, e[7] = a[7] + (a[6] << 8 | a[6] >>> 24) + a[5] | 0
}
e.RabbitLegacy = t._createHelper(r)
}(), n.RabbitLegacy)
}), Sr(function (e, t) {
e.exports = dh
})), _h = function (t, n, r, i) {
return "string" == typeof (t = "undefined" != typeof Buffer && Buffer.isBuffer(t) ? t.toString() : t) ? function (e, t, n, r) {
return t.xmlMode || t._useHtmlParser2 ? function (e, t) {
var n = new w(void 0, t);
return new va(n, t).end(e), n.root
}(e, t) : ta(e, t, n, r)
}(t, n, r, i) : (n = t, !Array.isArray(n) && O(n) ? n : (Bn(n, r = new v([])), r))
}, Eh = function (e) {
return function r(s, a, o) {
if (void 0 === o && (o = !0), null == s) throw new Error("cheerio.load() expects a string");
var c = rr(rr({}, n), i(a)), u = e(s, c, o, null), l = function (n) {
function r() {
return null !== n && n.apply(this, arguments) || this
}
return nr(r, n), r.prototype._make = function (e, t) {
return (e = h(e, t)).prevObject = this, e
}, r.prototype._parse = function (t, n, r, i) {
return e(t, n, r, i)
}, r.prototype._render = function (e) {
return function (e, t) {
return t.xmlMode || t._useHtmlParser2 ? W(e, t) : function (e) {
for (var t, n = ("length" in e ? e : [e]), r = 0; r < n.length; r += 1) O(s = n[r]) && (t = Array.prototype.splice).call.apply(t, ea([n, r, 1], s.children, !1));
for (var s, i = "", r = 0; r < n.length; r += 1) i += Qs(s = n[r], sa);
return i
}(e)
}(e, this.options)
}, r
}(er);
function h(t, n, r, s) {
if (void 0 === r && (r = u), t && Pe(t)) return t;
if (s = rr(rr({}, c), i(s)), (r = Pe(r = "string" == typeof r ? [e(r, s, !1, null)] : "length" in r ? r : [r]) ? r : new l(r, null, s))._root = r, !t) return new l(void 0, r, s);
var p = "string" == typeof t && Ue(t) ? e(t, s, !1, null).children : t.name || "root" === t.type || "text" === t.type || "comment" === t.type ? [t] : Array.isArray(t) ? t : void 0,
d = new l(p, r, s);
if (p) return d;
if ("string" != typeof t) throw new Error("Unexpected type of selector");
return p = t, (t = n ? "string" == typeof n ? Ue(n) ? new l([e(n, s, !1, null)], r, s) : (p = "".concat(n, " ").concat(p), r) : Pe(n) ? n : new l(Array.isArray(n) ? n : [n], r, s) : r) ? t.find(p) : d
}
return Object.assign(h, Me, {load: r, _root: u, _options: c, fn: l.prototype, prototype: l.prototype}), h
}
}(_h);
function Th(e, t) {
return Fa({path: e, json: t})
}
function Ah(e) {
return Fa(e)
}
function gh(e, t) {
return Bl(e, t)
}
var vh = ch, yh = fh, Sh = ph, Ch = mh, Nh = Eh([]), bh = De, Ih = Re, Oh = ke, kh = Le;
export {
Ch as Crypto,
yh as Uri,
Sh as _,
Nh as cheerio,
bh as contains,
vh as dayjs,
be as html,
gh as jinja2,
Th as jp,
Ah as jpo,
Eh as load,
Ih as merge,
Oh as parseHTML,
kh as root,
Oe as text,
Ie as xml
};