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ACA,sBACA,cACA,mBACA,oBACA,oBACA,iBACA,eACA,UACA,UACA,UACA,UACA,UACA,iBACA,UACA,UACA,cACA,eACA,WACA,eACA,qBACA,cACA,SACA,eACA,gBACA,WACA,iBACA,iBACA,YACFnd,KAAK4E,KAAQ,CAACA,IAAI0P,cAAe1P,QAC5B,MAAMoc,eAAiB,IAAI7D,IAAI,CAClC,gBACA,gBACA,gBACA,gBACA,cACA,WACA,gBACA,kBACA,WACA,cACA,WACA,oBACA,gBACA,eACA,mBACA,YACA,aACA,WACA,eACA,oBACA,eACA,cACA,cACA,mBACA,YACA,aACA,aACA,sBACA,mBACA,eACA,YACA,YACA,YACA,gBACA,sBACA,iBACA,OACA,OACA,cACA,YACA,qBACA,mBACA,mBACA,mBACA,eACA,cACA,eACA,cACA,eACA,iBACA,cACA,UACA,UACA,aACA,UACA,aACA,mBACA,mBACA,cACFnd,KAAK4E,KAAQ,CAACA,IAAI0P,cAAe1P;;;;;;;;;;;;;;;;;;;;;;GCvFnC,MAAMqc,kBAAoB,IAAIziB,IAAI,CAC9B,QACA,SACA,MACA,SACA,UACA,WACA,YACA,aAEJ,SAAS0iB,cAAcle,OACnB,OAAOA,MAAM8G,QAAQ,KAAM,SAC/B;;;GAIA,SAASqX,iBAAiB/D,WAAY7d,MAClC,IAAIH,GACJ,IAAKge,WACD,OACJ,MAAMgE,SAAWhiB,GAAKG,KAAK8hB,kBAAoB,MAAQjiB,UAAY,EAAIA,GAAKG,KAAK+hB,kBAAoB,MAC/FJ,cACA3hB,KAAKiD,SAAWjD,KAAK8hB,iBAAmB,OACpC,sCAAAE,UACA,sCAAAC,gBACV,OAAOzf,OAAOyB,KAAK4Z,YACdpd,KAAK2E,MACN,IAAIvF,GAAI2L,GACR,MAAM/H,OAAS5D,GAAKge,WAAWzY,QAAU,MAAQvF,UAAY,EAAIA,GAAK,GACtE,GAAIG,KAAKiD,UAAY;;AAEjBmC,KAAOoG,GAAK,8CAAAiW,eAAe5X,IAAIzE,QAAU,MA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C,aACAC,YACAC,eACAC,SACAE,WACA11B,OACA+2B,UAAW/2B,O","sources":["webpack://teddy/./node_modules/boolbase/index.js","webpack://teddy/./node_modules/cheerio-select/lib/esm/helpers.js","webpack://teddy/./node_modules/cheerio-select/lib/esm/index.js","webpack://teddy/./node_modules/cheerio-select/lib/esm/positionals.js","webpack://teddy/./node_modules/cheerio/dist/browser/api/attributes.js","webpack://teddy/./node_modules/cheerio/dist/browser/api/css.js","webpack://teddy/./node_modules/cheerio/dist/browser/api/extract.js","webpack://teddy/./node_modules/cheerio/dist/browser/api/forms.js","webpack://teddy/./node_modules/cheerio/dist/browser/api/manipulation.js","webpack://teddy/./node_modules/cheerio/dist/browser/api/traversing.js","webpack://teddy/./node_modules/cheerio/dist/browser/cheerio.js","webpack://teddy/./node_modules/cheerio/dist/browser/load.js","webpack://teddy/./node_modules/cheerio/dist/browser/options.js","webpack://teddy/./node_modules/cheerio/dist/browser/parse.js","webpack://teddy/./node_modules/cheerio/dist/browser/slim.js","webpack://teddy/./node_modules/cheerio/dist/browser/static.js","webpack://teddy/./node_modules/cheerio/dist/browser/utils.js","webpack://teddy/./node_modules/css-select/lib/esm/attributes.js","webpack://teddy/./node_modules/css-select/lib/esm/compile.js","webpack://teddy/./node_modules/css-select/lib/esm/general.js","webpack://teddy/./node_modules/css-select/lib/esm/index.js","webpack://teddy/./node_modules/css-select/lib/esm/pseudo-selectors/aliases.js","webpack://teddy/./node_modules/css-select/lib/esm/pseudo-selectors/filters.js","webpack://teddy/./node_modules/css-select/lib/esm/pseudo-selectors/index.js","webpack://teddy/./node_modules/css-select/lib/esm/pseudo-selectors/pseudos.js","webpack://teddy/./node_modules/css-select/lib/esm/pseudo-selectors/subselects.js","webpack://teddy/./node_modules/css-select/lib/esm/sort.js","webpack://teddy/./node_modules/css-what/lib/es/parse.js","webpack://teddy/./node_modules/css-what/lib/es/types.js","webpack://teddy/./node_modules/dom-serializer/lib/esm/foreignNames.js","webpack://teddy/./node_modules/dom-serializer/lib/esm/index.js","webpack://teddy/./node_modules/domelementtype/lib/esm/index.js","webpack://teddy/./node_modules/domhandler/lib/esm/index.js","webpack://teddy/./node_modules/domhandler/lib/esm/node.js","webpack://teddy/./node_modules/domutils/lib/esm/feeds.js","webpack://teddy/./node_modules/domutils/lib/esm/helpers.js","webpack://teddy/./node_modules/domutils/lib/esm/legacy.js","webpack://teddy/./node_modules/domutils/lib/esm/manipulation.js","webpack://teddy/./node_modules/domutils/lib/esm/querying.js","webpack://teddy/./node_modules/domutils/lib/esm/stringify.js","webpack://teddy/./node_modules/domutils/lib/esm/traversal.js","webpack://teddy/./node_modules/entities/lib/esm/decode.js","webpack://teddy/./node_modules/entities/lib/esm/decode_codepoint.js","webpack://teddy/./node_modules/entities/lib/esm/encode.js","webpack://teddy/./node_modules/entities/lib/esm/escape.js","webpack://teddy/./node_modules/entities/lib/esm/generated/decode-data-html.js","webpack://teddy/./node_modules/entities/lib/esm/generated/decode-data-xml.js","webpack://teddy/./node_modules/entities/lib/esm/generated/encode-html.js","webpack://teddy/./node_modules/entities/lib/esm/index.js","webpack://teddy/./node_modules/htmlparser2/lib/esm/Parser.js","webpack://teddy/./node_modules/htmlparser2/lib/esm/Tokenizer.js","webpack://teddy/./node_modules/htmlparser2/lib/esm/index.js","webpack://teddy/./node_modules/nth-check/lib/esm/compile.js","webpack://teddy/./node_modules/nth-check/lib/esm/index.js","webpack://teddy/./node_modules/nth-check/lib/esm/parse.js","webpack://teddy/webpack/bootstrap","webpack://teddy/webpack/runtime/define property getters","webpack://teddy/webpack/runtime/hasOwnProperty shorthand","webpack://teddy/webpack/runtime/make namespace object","webpack://teddy/./teddy.js"],"sourcesContent":["module.exports = {\n\ttrueFunc: function trueFunc(){\n\t\treturn true;\n\t},\n\tfalseFunc: function falseFunc(){\n\t\treturn false;\n\t}\n};","import { isFilter } from \"./positionals.js\";\nexport function getDocumentRoot(node) {\n    while (node.parent)\n        node = node.parent;\n    return node;\n}\nexport function groupSelectors(selectors) {\n    const filteredSelectors = [];\n    const plainSelectors = [];\n    for (const selector of selectors) {\n        if (selector.some(isFilter)) {\n            filteredSelectors.push(selector);\n        }\n        else {\n            plainSelectors.push(selector);\n        }\n    }\n    return [plainSelectors, filteredSelectors];\n}\n//# sourceMappingURL=helpers.js.map","import { parse, SelectorType, isTraversal } from \"css-what\";\nimport { _compileToken as compileToken, prepareContext, } from \"css-select\";\nimport * as DomUtils from \"domutils\";\nimport * as boolbase from \"boolbase\";\nimport { getDocumentRoot, groupSelectors } from \"./helpers.js\";\nimport { isFilter, getLimit, } from \"./positionals.js\";\n// Re-export pseudo extension points\nexport { filters, pseudos, aliases } from \"css-select\";\nconst UNIVERSAL_SELECTOR = {\n    type: SelectorType.Universal,\n    namespace: null,\n};\nconst SCOPE_PSEUDO = {\n    type: SelectorType.Pseudo,\n    name: \"scope\",\n    data: null,\n};\nexport function is(element, selector, options = {}) {\n    return some([element], selector, options);\n}\nexport function some(elements, selector, options = {}) {\n    if (typeof selector === \"function\")\n        return elements.some(selector);\n    const [plain, filtered] = groupSelectors(parse(selector));\n    return ((plain.length > 0 && elements.some(compileToken(plain, options))) ||\n        filtered.some((sel) => filterBySelector(sel, elements, options).length > 0));\n}\nfunction filterByPosition(filter, elems, data, options) {\n    const num = typeof data === \"string\" ? parseInt(data, 10) : NaN;\n    switch (filter) {\n        case \"first\":\n        case \"lt\":\n            // Already done in `getLimit`\n            return elems;\n        case \"last\":\n            return elems.length > 0 ? [elems[elems.length - 1]] : elems;\n        case \"nth\":\n        case \"eq\":\n            return isFinite(num) && Math.abs(num) < elems.length\n                ? [num < 0 ? elems[elems.length + num] : elems[num]]\n                : [];\n        case \"gt\":\n            return isFinite(num) ? elems.slice(num + 1) : [];\n        case \"even\":\n            return elems.filter((_, i) => i % 2 === 0);\n        case \"odd\":\n            return elems.filter((_, i) => i % 2 === 1);\n        case \"not\": {\n            const filtered = new Set(filterParsed(data, elems, options));\n            return elems.filter((e) => !filtered.has(e));\n        }\n    }\n}\nexport function filter(selector, elements, options = {}) {\n    return filterParsed(parse(selector), elements, options);\n}\n/**\n * Filter a set of elements by a selector.\n *\n * Will return elements in the original order.\n *\n * @param selector Selector to filter by.\n * @param elements Elements to filter.\n * @param options Options for selector.\n */\nfunction filterParsed(selector, elements, options) {\n    if (elements.length === 0)\n        return [];\n    const [plainSelectors, filteredSelectors] = groupSelectors(selector);\n    let found;\n    if (plainSelectors.length) {\n        const filtered = filterElements(elements, plainSelectors, options);\n        // If there are no filters, just return\n        if (filteredSelectors.length === 0) {\n            return filtered;\n        }\n        // Otherwise, we have to do some filtering\n        if (filtered.length) {\n            found = new Set(filtered);\n        }\n    }\n    for (let i = 0; i < filteredSelectors.length && (found === null || found === void 0 ? void 0 : found.size) !== elements.length; i++) {\n        const filteredSelector = filteredSelectors[i];\n        const missing = found\n            ? elements.filter((e) => DomUtils.isTag(e) && !found.has(e))\n            : elements;\n        if (missing.length === 0)\n            break;\n        const filtered = filterBySelector(filteredSelector, elements, options);\n        if (filtered.length) {\n            if (!found) {\n                /*\n                 * If we haven't found anything before the last selector,\n                 * just return what we found now.\n                 */\n                if (i === filteredSelectors.length - 1) {\n                    return filtered;\n                }\n                found = new Set(filtered);\n            }\n            else {\n                filtered.forEach((el) => found.add(el));\n            }\n        }\n    }\n    return typeof found !== \"undefined\"\n        ? (found.size === elements.length\n            ? elements\n            : // Filter elements to preserve order\n                elements.filter((el) => found.has(el)))\n        : [];\n}\nfunction filterBySelector(selector, elements, options) {\n    var _a;\n    if (selector.some(isTraversal)) {\n        /*\n         * Get root node, run selector with the scope\n         * set to all of our nodes.\n         */\n        const root = (_a = options.root) !== null && _a !== void 0 ? _a : getDocumentRoot(elements[0]);\n        const opts = { ...options, context: elements, relativeSelector: false };\n        selector.push(SCOPE_PSEUDO);\n        return findFilterElements(root, selector, opts, true, elements.length);\n    }\n    // Performance optimization: If we don't have to traverse, just filter set.\n    return findFilterElements(elements, selector, options, false, elements.length);\n}\nexport function select(selector, root, options = {}, limit = Infinity) {\n    if (typeof selector === \"function\") {\n        return find(root, selector);\n    }\n    const [plain, filtered] = groupSelectors(parse(selector));\n    const results = filtered.map((sel) => findFilterElements(root, sel, options, true, limit));\n    // Plain selectors can be queried in a single go\n    if (plain.length) {\n        results.push(findElements(root, plain, options, limit));\n    }\n    if (results.length === 0) {\n        return [];\n    }\n    // If there was only a single selector, just return the result\n    if (results.length === 1) {\n        return results[0];\n    }\n    // Sort results, filtering for duplicates\n    return DomUtils.uniqueSort(results.reduce((a, b) => [...a, ...b]));\n}\n/**\n *\n * @param root Element(s) to search from.\n * @param selector Selector to look for.\n * @param options Options for querying.\n * @param queryForSelector Query multiple levels deep for the initial selector, even if it doesn't contain a traversal.\n */\nfunction findFilterElements(root, selector, options, queryForSelector, totalLimit) {\n    const filterIndex = selector.findIndex(isFilter);\n    const sub = selector.slice(0, filterIndex);\n    const filter = selector[filterIndex];\n    // If we are at the end of the selector, we can limit the number of elements to retrieve.\n    const partLimit = selector.length - 1 === filterIndex ? totalLimit : Infinity;\n    /*\n     * Set the number of elements to retrieve.\n     * Eg. for :first, we only have to get a single element.\n     */\n    const limit = getLimit(filter.name, filter.data, partLimit);\n    if (limit === 0)\n        return [];\n    /*\n     * Skip `findElements` call if our selector starts with a positional\n     * pseudo.\n     */\n    const elemsNoLimit = sub.length === 0 && !Array.isArray(root)\n        ? DomUtils.getChildren(root).filter(DomUtils.isTag)\n        : sub.length === 0\n            ? (Array.isArray(root) ? root : [root]).filter(DomUtils.isTag)\n            : queryForSelector || sub.some(isTraversal)\n                ? findElements(root, [sub], options, limit)\n                : filterElements(root, [sub], options);\n    const elems = elemsNoLimit.slice(0, limit);\n    let result = filterByPosition(filter.name, elems, filter.data, options);\n    if (result.length === 0 || selector.length === filterIndex + 1) {\n        return result;\n    }\n    const remainingSelector = selector.slice(filterIndex + 1);\n    const remainingHasTraversal = remainingSelector.some(isTraversal);\n    if (remainingHasTraversal) {\n        if (isTraversal(remainingSelector[0])) {\n            const { type } = remainingSelector[0];\n            if (type === SelectorType.Sibling ||\n                type === SelectorType.Adjacent) {\n                // If we have a sibling traversal, we need to also look at the siblings.\n                result = prepareContext(result, DomUtils, true);\n            }\n            // Avoid a traversal-first selector error.\n            remainingSelector.unshift(UNIVERSAL_SELECTOR);\n        }\n        options = {\n            ...options,\n            // Avoid absolutizing the selector\n            relativeSelector: false,\n            /*\n             * Add a custom root func, to make sure traversals don't match elements\n             * that aren't a part of the considered tree.\n             */\n            rootFunc: (el) => result.includes(el),\n        };\n    }\n    else if (options.rootFunc && options.rootFunc !== boolbase.trueFunc) {\n        options = { ...options, rootFunc: boolbase.trueFunc };\n    }\n    /*\n     * If we have another filter, recursively call `findFilterElements`,\n     * with the `recursive` flag disabled. We only have to look for more\n     * elements when we see a traversal.\n     *\n     * Otherwise,\n     */\n    return remainingSelector.some(isFilter)\n        ? findFilterElements(result, remainingSelector, options, false, totalLimit)\n        : remainingHasTraversal\n            ? // Query existing elements to resolve traversal.\n                findElements(result, [remainingSelector], options, totalLimit)\n            : // If we don't have any more traversals, simply filter elements.\n                filterElements(result, [remainingSelector], options);\n}\nfunction findElements(root, sel, options, limit) {\n    const query = compileToken(sel, options, root);\n    return find(root, query, limit);\n}\nfunction find(root, query, limit = Infinity) {\n    const elems = prepareContext(root, DomUtils, query.shouldTestNextSiblings);\n    return DomUtils.find((node) => DomUtils.isTag(node) && query(node), elems, true, limit);\n}\nfunction filterElements(elements, sel, options) {\n    const els = (Array.isArray(elements) ? elements : [elements]).filter(DomUtils.isTag);\n    if (els.length === 0)\n        return els;\n    const query = compileToken(sel, options);\n    return query === boolbase.trueFunc ? els : els.filter(query);\n}\n//# sourceMappingURL=index.js.map","export const filterNames = new Set([\n    \"first\",\n    \"last\",\n    \"eq\",\n    \"gt\",\n    \"nth\",\n    \"lt\",\n    \"even\",\n    \"odd\",\n]);\nexport function isFilter(s) {\n    if (s.type !== \"pseudo\")\n        return false;\n    if (filterNames.has(s.name))\n        return true;\n    if (s.name === \"not\" && Array.isArray(s.data)) {\n        // Only consider `:not` with embedded filters\n        return s.data.some((s) => s.some(isFilter));\n    }\n    return false;\n}\nexport function getLimit(filter, data, partLimit) {\n    const num = data != null ? parseInt(data, 10) : NaN;\n    switch (filter) {\n        case \"first\":\n            return 1;\n        case \"nth\":\n        case \"eq\":\n            return isFinite(num) ? (num >= 0 ? num + 1 : Infinity) : 0;\n        case \"lt\":\n            return isFinite(num)\n                ? num >= 0\n                    ? Math.min(num, partLimit)\n                    : Infinity\n                : 0;\n        case \"gt\":\n            return isFinite(num) ? Infinity : 0;\n        case \"odd\":\n            return 2 * partLimit;\n        case \"even\":\n            return 2 * partLimit - 1;\n        case \"last\":\n        case \"not\":\n            return Infinity;\n    }\n}\n//# sourceMappingURL=positionals.js.map","/**\n * Methods for getting and modifying attributes.\n *\n * @module cheerio/attributes\n */\nimport { text } from '../static.js';\nimport { domEach, camelCase, cssCase } from '../utils.js';\nimport { isTag } from 'domhandler';\nimport { innerText, textContent } from 'domutils';\nconst hasOwn = Object.prototype.hasOwnProperty;\nconst rspace = /\\s+/;\nconst dataAttrPrefix = 'data-';\n// Attributes that are booleans\nconst rboolean = /^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i;\n// Matches strings that look like JSON objects or arrays\nconst rbrace = /^{[^]*}$|^\\[[^]*]$/;\nfunction getAttr(elem, name, xmlMode) {\n    var _a;\n    if (!elem || !isTag(elem))\n        return undefined;\n    (_a = elem.attribs) !== null && _a !== void 0 ? _a : (elem.attribs = {});\n    // Return the entire attribs object if no attribute specified\n    if (!name) {\n        return elem.attribs;\n    }\n    if (hasOwn.call(elem.attribs, name)) {\n        // Get the (decoded) attribute\n        return !xmlMode && rboolean.test(name) ? name : elem.attribs[name];\n    }\n    // Mimic the DOM and return text content as value for `option's`\n    if (elem.name === 'option' && name === 'value') {\n        return text(elem.children);\n    }\n    // Mimic DOM with default value for radios/checkboxes\n    if (elem.name === 'input' &&\n        (elem.attribs['type'] === 'radio' || elem.attribs['type'] === 'checkbox') &&\n        name === 'value') {\n        return 'on';\n    }\n    return undefined;\n}\n/**\n * Sets the value of an attribute. The attribute will be deleted if the value is\n * `null`.\n *\n * @private\n * @param el - The element to set the attribute on.\n * @param name - The attribute's name.\n * @param value - The attribute's value.\n */\nfunction setAttr(el, name, value) {\n    if (value === null) {\n        removeAttribute(el, name);\n    }\n    else {\n        el.attribs[name] = `${value}`;\n    }\n}\nexport function attr(name, value) {\n    // Set the value (with attr map support)\n    if (typeof name === 'object' || value !== undefined) {\n        if (typeof value === 'function') {\n            if (typeof name !== 'string') {\n                {\n                    throw new Error('Bad combination of arguments.');\n                }\n            }\n            return domEach(this, (el, i) => {\n                if (isTag(el))\n                    setAttr(el, name, value.call(el, i, el.attribs[name]));\n            });\n        }\n        return domEach(this, (el) => {\n            if (!isTag(el))\n                return;\n            if (typeof name === 'object') {\n                for (const objName of Object.keys(name)) {\n                    const objValue = name[objName];\n                    setAttr(el, objName, objValue);\n                }\n            }\n            else {\n                setAttr(el, name, value);\n            }\n        });\n    }\n    return arguments.length > 1\n        ? this\n        : getAttr(this[0], name, this.options.xmlMode);\n}\n/**\n * Gets a node's prop.\n *\n * @private\n * @category Attributes\n * @param el - Element to get the prop of.\n * @param name - Name of the prop.\n * @param xmlMode - Disable handling of special HTML attributes.\n * @returns The prop's value.\n */\nfunction getProp(el, name, xmlMode) {\n    return name in el\n        ? // @ts-expect-error TS doesn't like us accessing the value directly here.\n            el[name]\n        : !xmlMode && rboolean.test(name)\n            ? getAttr(el, name, false) !== undefined\n            : getAttr(el, name, xmlMode);\n}\n/**\n * Sets the value of a prop.\n *\n * @private\n * @param el - The element to set the prop on.\n * @param name - The prop's name.\n * @param value - The prop's value.\n * @param xmlMode - Disable handling of special HTML attributes.\n */\nfunction setProp(el, name, value, xmlMode) {\n    if (name in el) {\n        // @ts-expect-error Overriding value\n        el[name] = value;\n    }\n    else {\n        setAttr(el, name, !xmlMode && rboolean.test(name) ? (value ? '' : null) : `${value}`);\n    }\n}\nexport function prop(name, value) {\n    var _a;\n    if (typeof name === 'string' && value === undefined) {\n        const el = this[0];\n        if (!el || !isTag(el))\n            return undefined;\n        switch (name) {\n            case 'style': {\n                const property = this.css();\n                const keys = Object.keys(property);\n                for (let i = 0; i < keys.length; i++) {\n                    property[i] = keys[i];\n                }\n                property.length = keys.length;\n                return property;\n            }\n            case 'tagName':\n            case 'nodeName': {\n                return el.name.toUpperCase();\n            }\n            case 'href':\n            case 'src': {\n                const prop = (_a = el.attribs) === null || _a === void 0 ? void 0 : _a[name];\n                if (typeof URL !== 'undefined' &&\n                    ((name === 'href' && (el.tagName === 'a' || el.tagName === 'link')) ||\n                        (name === 'src' &&\n                            (el.tagName === 'img' ||\n                                el.tagName === 'iframe' ||\n                                el.tagName === 'audio' ||\n                                el.tagName === 'video' ||\n                                el.tagName === 'source'))) &&\n                    prop !== undefined &&\n                    this.options.baseURI) {\n                    return new URL(prop, this.options.baseURI).href;\n                }\n                return prop;\n            }\n            case 'innerText': {\n                return innerText(el);\n            }\n            case 'textContent': {\n                return textContent(el);\n            }\n            case 'outerHTML': {\n                return this.clone().wrap('<container />').parent().html();\n            }\n            case 'innerHTML': {\n                return this.html();\n            }\n            default: {\n                return getProp(el, name, this.options.xmlMode);\n            }\n        }\n    }\n    if (typeof name === 'object' || value !== undefined) {\n        if (typeof value === 'function') {\n            if (typeof name === 'object') {\n                throw new TypeError('Bad combination of arguments.');\n            }\n            return domEach(this, (el, i) => {\n                if (isTag(el)) {\n                    setProp(el, name, value.call(el, i, getProp(el, name, this.options.xmlMode)), this.options.xmlMode);\n                }\n            });\n        }\n        return domEach(this, (el) => {\n            if (!isTag(el))\n                return;\n            if (typeof name === 'object') {\n                for (const key of Object.keys(name)) {\n                    const val = name[key];\n                    setProp(el, key, val, this.options.xmlMode);\n                }\n            }\n            else {\n                setProp(el, name, value, this.options.xmlMode);\n            }\n        });\n    }\n    return undefined;\n}\n/**\n * Sets the value of a data attribute.\n *\n * @private\n * @param elem - The element to set the data attribute on.\n * @param name - The data attribute's name.\n * @param value - The data attribute's value.\n */\nfunction setData(elem, name, value) {\n    var _a;\n    (_a = elem.data) !== null && _a !== void 0 ? _a : (elem.data = {});\n    if (typeof name === 'object')\n        Object.assign(elem.data, name);\n    else if (typeof name === 'string' && value !== undefined) {\n        elem.data[name] = value;\n    }\n}\n/**\n * Read _all_ HTML5 `data-*` attributes from the equivalent HTML5 `data-*`\n * attribute, and cache the value in the node's internal data store.\n *\n * @private\n * @category Attributes\n * @param el - Element to get the data attribute of.\n * @returns A map with all of the data attributes.\n */\nfunction readAllData(el) {\n    for (const domName of Object.keys(el.attribs)) {\n        if (!domName.startsWith(dataAttrPrefix)) {\n            continue;\n        }\n        const jsName = camelCase(domName.slice(dataAttrPrefix.length));\n        if (!hasOwn.call(el.data, jsName)) {\n            el.data[jsName] = parseDataValue(el.attribs[domName]);\n        }\n    }\n    return el.data;\n}\n/**\n * Read the specified attribute from the equivalent HTML5 `data-*` attribute,\n * and (if present) cache the value in the node's internal data store.\n *\n * @private\n * @category Attributes\n * @param el - Element to get the data attribute of.\n * @param name - Name of the data attribute.\n * @returns The data attribute's value.\n */\nfunction readData(el, name) {\n    const domName = dataAttrPrefix + cssCase(name);\n    const data = el.data;\n    if (hasOwn.call(data, name)) {\n        return data[name];\n    }\n    if (hasOwn.call(el.attribs, domName)) {\n        return (data[name] = parseDataValue(el.attribs[domName]));\n    }\n    return undefined;\n}\n/**\n * Coerce string data-* attributes to their corresponding JavaScript primitives.\n *\n * @private\n * @category Attributes\n * @param value - The value to parse.\n * @returns The parsed value.\n */\nfunction parseDataValue(value) {\n    if (value === 'null')\n        return null;\n    if (value === 'true')\n        return true;\n    if (value === 'false')\n        return false;\n    const num = Number(value);\n    if (value === String(num))\n        return num;\n    if (rbrace.test(value)) {\n        try {\n            return JSON.parse(value);\n        }\n        catch {\n            /* Ignore */\n        }\n    }\n    return value;\n}\nexport function data(name, value) {\n    var _a;\n    const elem = this[0];\n    if (!elem || !isTag(elem))\n        return;\n    const dataEl = elem;\n    (_a = dataEl.data) !== null && _a !== void 0 ? _a : (dataEl.data = {});\n    // Return the entire data object if no data specified\n    if (name == null) {\n        return readAllData(dataEl);\n    }\n    // Set the value (with attr map support)\n    if (typeof name === 'object' || value !== undefined) {\n        domEach(this, (el) => {\n            if (isTag(el)) {\n                if (typeof name === 'object')\n                    setData(el, name);\n                else\n                    setData(el, name, value);\n            }\n        });\n        return this;\n    }\n    return readData(dataEl, name);\n}\nexport function val(value) {\n    const querying = arguments.length === 0;\n    const element = this[0];\n    if (!element || !isTag(element))\n        return querying ? undefined : this;\n    switch (element.name) {\n        case 'textarea': {\n            return this.text(value);\n        }\n        case 'select': {\n            const option = this.find('option:selected');\n            if (!querying) {\n                if (this.attr('multiple') == null && typeof value === 'object') {\n                    return this;\n                }\n                this.find('option').removeAttr('selected');\n                const values = typeof value === 'object' ? value : [value];\n                for (const val of values) {\n                    this.find(`option[value=\"${val}\"]`).attr('selected', '');\n                }\n                return this;\n            }\n            return this.attr('multiple')\n                ? option.toArray().map((el) => text(el.children))\n                : option.attr('value');\n        }\n        case 'input':\n        case 'option': {\n            return querying\n                ? this.attr('value')\n                : this.attr('value', value);\n        }\n    }\n    return undefined;\n}\n/**\n * Remove an attribute.\n *\n * @private\n * @param elem - Node to remove attribute from.\n * @param name - Name of the attribute to remove.\n */\nfunction removeAttribute(elem, name) {\n    if (!elem.attribs || !hasOwn.call(elem.attribs, name))\n        return;\n    delete elem.attribs[name];\n}\n/**\n * Splits a space-separated list of names to individual names.\n *\n * @category Attributes\n * @param names - Names to split.\n * @returns - Split names.\n */\nfunction splitNames(names) {\n    return names ? names.trim().split(rspace) : [];\n}\n/**\n * Method for removing attributes by `name`.\n *\n * @category Attributes\n * @example\n *\n * ```js\n * $('.pear').removeAttr('class').html();\n * //=> <li>Pear</li>\n *\n * $('.apple').attr('id', 'favorite');\n * $('.apple').removeAttr('id class').html();\n * //=> <li>Apple</li>\n * ```\n *\n * @param name - Name of the attribute.\n * @returns The instance itself.\n * @see {@link https://api.jquery.com/removeAttr/}\n */\nexport function removeAttr(name) {\n    const attrNames = splitNames(name);\n    for (const attrName of attrNames) {\n        domEach(this, (elem) => {\n            if (isTag(elem))\n                removeAttribute(elem, attrName);\n        });\n    }\n    return this;\n}\n/**\n * Check to see if _any_ of the matched elements have the given `className`.\n *\n * @category Attributes\n * @example\n *\n * ```js\n * $('.pear').hasClass('pear');\n * //=> true\n *\n * $('apple').hasClass('fruit');\n * //=> false\n *\n * $('li').hasClass('pear');\n * //=> true\n * ```\n *\n * @param className - Name of the class.\n * @returns Indicates if an element has the given `className`.\n * @see {@link https://api.jquery.com/hasClass/}\n */\nexport function hasClass(className) {\n    return this.toArray().some((elem) => {\n        const clazz = isTag(elem) && elem.attribs['class'];\n        let idx = -1;\n        if (clazz && className.length > 0) {\n            while ((idx = clazz.indexOf(className, idx + 1)) > -1) {\n                const end = idx + className.length;\n                if ((idx === 0 || rspace.test(clazz[idx - 1])) &&\n                    (end === clazz.length || rspace.test(clazz[end]))) {\n                    return true;\n                }\n            }\n        }\n        return false;\n    });\n}\n/**\n * Adds class(es) to all of the matched elements. Also accepts a `function`.\n *\n * @category Attributes\n * @example\n *\n * ```js\n * $('.pear').addClass('fruit').html();\n * //=> <li class=\"pear fruit\">Pear</li>\n *\n * $('.apple').addClass('fruit red').html();\n * //=> <li class=\"apple fruit red\">Apple</li>\n * ```\n *\n * @param value - Name of new class.\n * @returns The instance itself.\n * @see {@link https://api.jquery.com/addClass/}\n */\nexport function addClass(value) {\n    // Support functions\n    if (typeof value === 'function') {\n        return domEach(this, (el, i) => {\n            if (isTag(el)) {\n                const className = el.attribs['class'] || '';\n                addClass.call([el], value.call(el, i, className));\n            }\n        });\n    }\n    // Return if no value or not a string or function\n    if (!value || typeof value !== 'string')\n        return this;\n    const classNames = value.split(rspace);\n    const numElements = this.length;\n    for (let i = 0; i < numElements; i++) {\n        const el = this[i];\n        // If selected element isn't a tag, move on\n        if (!isTag(el))\n            continue;\n        // If we don't already have classes — always set xmlMode to false here, as it doesn't matter for classes\n        const className = getAttr(el, 'class', false);\n        if (className) {\n            let setClass = ` ${className} `;\n            // Check if class already exists\n            for (const cn of classNames) {\n                const appendClass = `${cn} `;\n                if (!setClass.includes(` ${appendClass}`))\n                    setClass += appendClass;\n            }\n            setAttr(el, 'class', setClass.trim());\n        }\n        else {\n            setAttr(el, 'class', classNames.join(' ').trim());\n        }\n    }\n    return this;\n}\n/**\n * Removes one or more space-separated classes from the selected elements. If no\n * `className` is defined, all classes will be removed. Also accepts a\n * `function`.\n *\n * @category Attributes\n * @example\n *\n * ```js\n * $('.pear').removeClass('pear').html();\n * //=> <li class=\"\">Pear</li>\n *\n * $('.apple').addClass('red').removeClass().html();\n * //=> <li class=\"\">Apple</li>\n * ```\n *\n * @param name - Name of the class. If not specified, removes all elements.\n * @returns The instance itself.\n * @see {@link https://api.jquery.com/removeClass/}\n */\nexport function removeClass(name) {\n    // Handle if value is a function\n    if (typeof name === 'function') {\n        return domEach(this, (el, i) => {\n            if (isTag(el)) {\n                removeClass.call([el], name.call(el, i, el.attribs['class'] || ''));\n            }\n        });\n    }\n    const classes = splitNames(name);\n    const numClasses = classes.length;\n    const removeAll = arguments.length === 0;\n    return domEach(this, (el) => {\n        if (!isTag(el))\n            return;\n        if (removeAll) {\n            // Short circuit the remove all case as this is the nice one\n            el.attribs['class'] = '';\n        }\n        else {\n            const elClasses = splitNames(el.attribs['class']);\n            let changed = false;\n            for (let j = 0; j < numClasses; j++) {\n                const index = elClasses.indexOf(classes[j]);\n                if (index >= 0) {\n                    elClasses.splice(index, 1);\n                    changed = true;\n                    /*\n                     * We have to do another pass to ensure that there are not duplicate\n                     * classes listed\n                     */\n                    j--;\n                }\n            }\n            if (changed) {\n                el.attribs['class'] = elClasses.join(' ');\n            }\n        }\n    });\n}\n/**\n * Add or remove class(es) from the matched elements, depending on either the\n * class's presence or the value of the switch argument. Also accepts a\n * `function`.\n *\n * @category Attributes\n * @example\n *\n * ```js\n * $('.apple.green').toggleClass('fruit green red').html();\n * //=> <li class=\"apple fruit red\">Apple</li>\n *\n * $('.apple.green').toggleClass('fruit green red', true).html();\n * //=> <li class=\"apple green fruit red\">Apple</li>\n * ```\n *\n * @param value - Name of the class. Can also be a function.\n * @param stateVal - If specified the state of the class.\n * @returns The instance itself.\n * @see {@link https://api.jquery.com/toggleClass/}\n */\nexport function toggleClass(value, stateVal) {\n    // Support functions\n    if (typeof value === 'function') {\n        return domEach(this, (el, i) => {\n            if (isTag(el)) {\n                toggleClass.call([el], value.call(el, i, el.attribs['class'] || '', stateVal), stateVal);\n            }\n        });\n    }\n    // Return if no value or not a string or function\n    if (!value || typeof value !== 'string')\n        return this;\n    const classNames = value.split(rspace);\n    const numClasses = classNames.length;\n    const state = typeof stateVal === 'boolean' ? (stateVal ? 1 : -1) : 0;\n    const numElements = this.length;\n    for (let i = 0; i < numElements; i++) {\n        const el = this[i];\n        // If selected element isn't a tag, move on\n        if (!isTag(el))\n            continue;\n        const elementClasses = splitNames(el.attribs['class']);\n        // Check if class already exists\n        for (let j = 0; j < numClasses; j++) {\n            // Check if the class name is currently defined\n            const index = elementClasses.indexOf(classNames[j]);\n            // Add if stateValue === true or we are toggling and there is no value\n            if (state >= 0 && index < 0) {\n                elementClasses.push(classNames[j]);\n            }\n            else if (state <= 0 && index >= 0) {\n                // Otherwise remove but only if the item exists\n                elementClasses.splice(index, 1);\n            }\n        }\n        el.attribs['class'] = elementClasses.join(' ');\n    }\n    return this;\n}\n//# sourceMappingURL=attributes.js.map","import { domEach } from '../utils.js';\nimport { isTag } from 'domhandler';\n/**\n * Set multiple CSS properties for every matched element.\n *\n * @category CSS\n * @param prop - The names of the properties.\n * @param val - The new values.\n * @returns The instance itself.\n * @see {@link https://api.jquery.com/css/}\n */\nexport function css(prop, val) {\n    if ((prop != null && val != null) ||\n        // When `prop` is a \"plain\" object\n        (typeof prop === 'object' && !Array.isArray(prop))) {\n        return domEach(this, (el, i) => {\n            if (isTag(el)) {\n                // `prop` can't be an array here anymore.\n                setCss(el, prop, val, i);\n            }\n        });\n    }\n    if (this.length === 0) {\n        return undefined;\n    }\n    return getCss(this[0], prop);\n}\n/**\n * Set styles of all elements.\n *\n * @private\n * @param el - Element to set style of.\n * @param prop - Name of property.\n * @param value - Value to set property to.\n * @param idx - Optional index within the selection.\n */\nfunction setCss(el, prop, value, idx) {\n    if (typeof prop === 'string') {\n        const styles = getCss(el);\n        const val = typeof value === 'function' ? value.call(el, idx, styles[prop]) : value;\n        if (val === '') {\n            delete styles[prop];\n        }\n        else if (val != null) {\n            styles[prop] = val;\n        }\n        el.attribs['style'] = stringify(styles);\n    }\n    else if (typeof prop === 'object') {\n        const keys = Object.keys(prop);\n        for (let i = 0; i < keys.length; i++) {\n            const k = keys[i];\n            setCss(el, k, prop[k], i);\n        }\n    }\n}\nfunction getCss(el, prop) {\n    if (!el || !isTag(el))\n        return;\n    const styles = parse(el.attribs['style']);\n    if (typeof prop === 'string') {\n        return styles[prop];\n    }\n    if (Array.isArray(prop)) {\n        const newStyles = {};\n        for (const item of prop) {\n            if (styles[item] != null) {\n                newStyles[item] = styles[item];\n            }\n        }\n        return newStyles;\n    }\n    return styles;\n}\n/**\n * Stringify `obj` to styles.\n *\n * @private\n * @category CSS\n * @param obj - Object to stringify.\n * @returns The serialized styles.\n */\nfunction stringify(obj) {\n    return Object.keys(obj).reduce((str, prop) => `${str}${str ? ' ' : ''}${prop}: ${obj[prop]};`, '');\n}\n/**\n * Parse `styles`.\n *\n * @private\n * @category CSS\n * @param styles - Styles to be parsed.\n * @returns The parsed styles.\n */\nfunction parse(styles) {\n    styles = (styles || '').trim();\n    if (!styles)\n        return {};\n    const obj = {};\n    let key;\n    for (const str of styles.split(';')) {\n        const n = str.indexOf(':');\n        // If there is no :, or if it is the first/last character, add to the previous item's value\n        if (n < 1 || n === str.length - 1) {\n            const trimmed = str.trimEnd();\n            if (trimmed.length > 0 && key !== undefined) {\n                obj[key] += `;${trimmed}`;\n            }\n        }\n        else {\n            key = str.slice(0, n).trim();\n            obj[key] = str.slice(n + 1).trim();\n        }\n    }\n    return obj;\n}\n//# sourceMappingURL=css.js.map","function getExtractDescr(descr) {\n    var _a;\n    if (typeof descr === 'string') {\n        return { selector: descr, value: 'textContent' };\n    }\n    return {\n        selector: descr.selector,\n        value: (_a = descr.value) !== null && _a !== void 0 ? _a : 'textContent',\n    };\n}\n/**\n * Extract multiple values from a document, and store them in an object.\n *\n * @param map - An object containing key-value pairs. The keys are the names of\n *   the properties to be created on the object, and the values are the\n *   selectors to be used to extract the values.\n * @returns An object containing the extracted values.\n */\nexport function extract(map) {\n    const ret = {};\n    for (const key in map) {\n        const descr = map[key];\n        const isArray = Array.isArray(descr);\n        const { selector, value } = getExtractDescr(isArray ? descr[0] : descr);\n        const fn = typeof value === 'function'\n            ? value\n            : typeof value === 'string'\n                ? (el) => this._make(el).prop(value)\n                : (el) => this._make(el).extract(value);\n        if (isArray) {\n            ret[key] = this._findBySelector(selector, Number.POSITIVE_INFINITY)\n                .map((_, el) => fn(el, key, ret))\n                .get();\n        }\n        else {\n            const $ = this._findBySelector(selector, 1);\n            ret[key] = $.length > 0 ? fn($[0], key, ret) : undefined;\n        }\n    }\n    return ret;\n}\n//# sourceMappingURL=extract.js.map","import { isTag } from 'domhandler';\n/*\n * https://github.com/jquery/jquery/blob/2.1.3/src/manipulation/var/rcheckableType.js\n * https://github.com/jquery/jquery/blob/2.1.3/src/serialize.js\n */\nconst submittableSelector = 'input,select,textarea,keygen';\nconst r20 = /%20/g;\nconst rCRLF = /\\r?\\n/g;\n/**\n * Encode a set of form elements as a string for submission.\n *\n * @category Forms\n * @example\n *\n * ```js\n * $('<form><input name=\"foo\" value=\"bar\" /></form>').serialize();\n * //=> 'foo=bar'\n * ```\n *\n * @returns The serialized form.\n * @see {@link https://api.jquery.com/serialize/}\n */\nexport function serialize() {\n    // Convert form elements into name/value objects\n    const arr = this.serializeArray();\n    // Serialize each element into a key/value string\n    const retArr = arr.map((data) => `${encodeURIComponent(data.name)}=${encodeURIComponent(data.value)}`);\n    // Return the resulting serialization\n    return retArr.join('&').replace(r20, '+');\n}\n/**\n * Encode a set of form elements as an array of names and values.\n *\n * @category Forms\n * @example\n *\n * ```js\n * $('<form><input name=\"foo\" value=\"bar\" /></form>').serializeArray();\n * //=> [ { name: 'foo', value: 'bar' } ]\n * ```\n *\n * @returns The serialized form.\n * @see {@link https://api.jquery.com/serializeArray/}\n */\nexport function serializeArray() {\n    // Resolve all form elements from either forms or collections of form elements\n    return this.map((_, elem) => {\n        const $elem = this._make(elem);\n        if (isTag(elem) && elem.name === 'form') {\n            return $elem.find(submittableSelector).toArray();\n        }\n        return $elem.filter(submittableSelector).toArray();\n    })\n        .filter(\n    // Verify elements have a name (`attr.name`) and are not disabled (`:enabled`)\n    '[name!=\"\"]:enabled' +\n        // And cannot be clicked (`[type=submit]`) or are used in `x-www-form-urlencoded` (`[type=file]`)\n        ':not(:submit, :button, :image, :reset, :file)' +\n        // And are either checked/don't have a checkable state\n        ':matches([checked], :not(:checkbox, :radio))')\n        .map((_, elem) => {\n        var _a;\n        const $elem = this._make(elem);\n        const name = $elem.attr('name'); // We have filtered for elements with a name before.\n        // If there is no value set (e.g. `undefined`, `null`), then default value to empty\n        const value = (_a = $elem.val()) !== null && _a !== void 0 ? _a : '';\n        // If we have an array of values (e.g. `<select multiple>`), return an array of key/value pairs\n        if (Array.isArray(value)) {\n            return value.map((val) => \n            /*\n             * We trim replace any line endings (e.g. `\\r` or `\\r\\n` with `\\r\\n`) to guarantee consistency across platforms\n             * These can occur inside of `<textarea>'s`\n             */\n            ({ name, value: val.replace(rCRLF, '\\r\\n') }));\n        }\n        // Otherwise (e.g. `<input type=\"text\">`, return only one key/value pair\n        return { name, value: value.replace(rCRLF, '\\r\\n') };\n    })\n        .toArray();\n}\n//# sourceMappingURL=forms.js.map","/**\n * Methods for modifying the DOM structure.\n *\n * @module cheerio/manipulation\n */\nimport { isTag, Text, hasChildren, cloneNode, Document, } from 'domhandler';\nimport { update as updateDOM } from '../parse.js';\nimport { text as staticText } from '../static.js';\nimport { domEach, isHtml, isCheerio } from '../utils.js';\nimport { removeElement } from 'domutils';\n/**\n * Create an array of nodes, recursing into arrays and parsing strings if\n * necessary.\n *\n * @private\n * @category Manipulation\n * @param elem - Elements to make an array of.\n * @param clone - Optionally clone nodes.\n * @returns The array of nodes.\n */\nexport function _makeDomArray(elem, clone) {\n    if (elem == null) {\n        return [];\n    }\n    if (typeof elem === 'string') {\n        return this._parse(elem, this.options, false, null).children.slice(0);\n    }\n    if ('length' in elem) {\n        if (elem.length === 1) {\n            return this._makeDomArray(elem[0], clone);\n        }\n        const result = [];\n        for (let i = 0; i < elem.length; i++) {\n            const el = elem[i];\n            if (typeof el === 'object') {\n                if (el == null) {\n                    continue;\n                }\n                if (!('length' in el)) {\n                    result.push(clone ? cloneNode(el, true) : el);\n                    continue;\n                }\n            }\n            result.push(...this._makeDomArray(el, clone));\n        }\n        return result;\n    }\n    return [clone ? cloneNode(elem, true) : elem];\n}\nfunction _insert(concatenator) {\n    return function (...elems) {\n        const lastIdx = this.length - 1;\n        return domEach(this, (el, i) => {\n            if (!hasChildren(el))\n                return;\n            const domSrc = typeof elems[0] === 'function'\n                ? elems[0].call(el, i, this._render(el.children))\n                : elems;\n            const dom = this._makeDomArray(domSrc, i < lastIdx);\n            concatenator(dom, el.children, el);\n        });\n    };\n}\n/**\n * Modify an array in-place, removing some number of elements and adding new\n * elements directly following them.\n *\n * @private\n * @category Manipulation\n * @param array - Target array to splice.\n * @param spliceIdx - Index at which to begin changing the array.\n * @param spliceCount - Number of elements to remove from the array.\n * @param newElems - Elements to insert into the array.\n * @param parent - The parent of the node.\n * @returns The spliced array.\n */\nfunction uniqueSplice(array, spliceIdx, spliceCount, newElems, parent) {\n    var _a, _b;\n    const spliceArgs = [\n        spliceIdx,\n        spliceCount,\n        ...newElems,\n    ];\n    const prev = spliceIdx === 0 ? null : array[spliceIdx - 1];\n    const next = spliceIdx + spliceCount >= array.length\n        ? null\n        : array[spliceIdx + spliceCount];\n    /*\n     * Before splicing in new elements, ensure they do not already appear in the\n     * current array.\n     */\n    for (let idx = 0; idx < newElems.length; ++idx) {\n        const node = newElems[idx];\n        const oldParent = node.parent;\n        if (oldParent) {\n            const oldSiblings = oldParent.children;\n            const prevIdx = oldSiblings.indexOf(node);\n            if (prevIdx > -1) {\n                oldParent.children.splice(prevIdx, 1);\n                if (parent === oldParent && spliceIdx > prevIdx) {\n                    spliceArgs[0]--;\n                }\n            }\n        }\n        node.parent = parent;\n        if (node.prev) {\n            node.prev.next = (_a = node.next) !== null && _a !== void 0 ? _a : null;\n        }\n        if (node.next) {\n            node.next.prev = (_b = node.prev) !== null && _b !== void 0 ? _b : null;\n        }\n        node.prev = idx === 0 ? prev : newElems[idx - 1];\n        node.next = idx === newElems.length - 1 ? next : newElems[idx + 1];\n    }\n    if (prev) {\n        prev.next = newElems[0];\n    }\n    if (next) {\n        next.prev = newElems[newElems.length - 1];\n    }\n    return array.splice(...spliceArgs);\n}\n/**\n * Insert every element in the set of matched elements to the end of the target.\n *\n * @category Manipulation\n * @example\n *\n * ```js\n * $('<li class=\"plum\">Plum</li>').appendTo('#fruits');\n * $.html();\n * //=>  <ul id=\"fruits\">\n * //      <li class=\"apple\">Apple</li>\n * //      <li class=\"orange\">Orange</li>\n * //      <li class=\"pear\">Pear</li>\n * //      <li class=\"plum\">Plum</li>\n * //    </ul>\n * ```\n *\n * @param target - Element to append elements to.\n * @returns The instance itself.\n * @see {@link https://api.jquery.com/appendTo/}\n */\nexport function appendTo(target) {\n    const appendTarget = isCheerio(target) ? target : this._make(target);\n    appendTarget.append(this);\n    return this;\n}\n/**\n * Insert every element in the set of matched elements to the beginning of the\n * target.\n *\n * @category Manipulation\n * @example\n *\n * ```js\n * $('<li class=\"plum\">Plum</li>').prependTo('#fruits');\n * $.html();\n * //=>  <ul id=\"fruits\">\n * //      <li class=\"plum\">Plum</li>\n * //      <li class=\"apple\">Apple</li>\n * //      <li class=\"orange\">Orange</li>\n * //      <li class=\"pear\">Pear</li>\n * //    </ul>\n * ```\n *\n * @param target - Element to prepend elements to.\n * @returns The instance itself.\n * @see {@link https://api.jquery.com/prependTo/}\n */\nexport function prependTo(target) {\n    const prependTarget = isCheerio(target) ? target : this._make(target);\n    prependTarget.prepend(this);\n    return this;\n}\n/**\n * Inserts content as the _last_ child of each of the selected elements.\n *\n * @category Manipulation\n * @example\n *\n * ```js\n * $('ul').append('<li class=\"plum\">Plum</li>');\n * $.html();\n * //=>  <ul id=\"fruits\">\n * //      <li class=\"apple\">Apple</li>\n * //      <li class=\"orange\">Orange</li>\n * //      <li class=\"pear\">Pear</li>\n * //      <li class=\"plum\">Plum</li>\n * //    </ul>\n * ```\n *\n * @see {@link https://api.jquery.com/append/}\n */\nexport const append = _insert((dom, children, parent) => {\n    uniqueSplice(children, children.length, 0, dom, parent);\n});\n/**\n * Inserts content as the _first_ child of each of the selected elements.\n *\n * @category Manipulation\n * @example\n *\n * ```js\n * $('ul').prepend('<li class=\"plum\">Plum</li>');\n * $.html();\n * //=>  <ul id=\"fruits\">\n * //      <li class=\"plum\">Plum</li>\n * //      <li class=\"apple\">Apple</li>\n * //      <li class=\"orange\">Orange</li>\n * //      <li class=\"pear\">Pear</li>\n * //    </ul>\n * ```\n *\n * @see {@link https://api.jquery.com/prepend/}\n */\nexport const prepend = _insert((dom, children, parent) => {\n    uniqueSplice(children, 0, 0, dom, parent);\n});\nfunction _wrap(insert) {\n    return function (wrapper) {\n        const lastIdx = this.length - 1;\n        const lastParent = this.parents().last();\n        for (let i = 0; i < this.length; i++) {\n            const el = this[i];\n            const wrap = typeof wrapper === 'function'\n                ? wrapper.call(el, i, el)\n                : typeof wrapper === 'string' && !isHtml(wrapper)\n                    ? lastParent.find(wrapper).clone()\n                    : wrapper;\n            const [wrapperDom] = this._makeDomArray(wrap, i < lastIdx);\n            if (!wrapperDom || !hasChildren(wrapperDom))\n                continue;\n            let elInsertLocation = wrapperDom;\n            /*\n             * Find the deepest child. Only consider the first tag child of each node\n             * (ignore text); stop if no children are found.\n             */\n            let j = 0;\n            while (j < elInsertLocation.children.length) {\n                const child = elInsertLocation.children[j];\n                if (isTag(child)) {\n                    elInsertLocation = child;\n                    j = 0;\n                }\n                else {\n                    j++;\n                }\n            }\n            insert(el, elInsertLocation, [wrapperDom]);\n        }\n        return this;\n    };\n}\n/**\n * The .wrap() function can take any string or object that could be passed to\n * the $() factory function to specify a DOM structure. This structure may be\n * nested several levels deep, but should contain only one inmost element. A\n * copy of this structure will be wrapped around each of the elements in the set\n * of matched elements. This method returns the original set of elements for\n * chaining purposes.\n *\n * @category Manipulation\n * @example\n *\n * ```js\n * const redFruit = $('<div class=\"red-fruit\"></div>');\n * $('.apple').wrap(redFruit);\n *\n * //=> <ul id=\"fruits\">\n * //     <div class=\"red-fruit\">\n * //      <li class=\"apple\">Apple</li>\n * //     </div>\n * //     <li class=\"orange\">Orange</li>\n * //     <li class=\"plum\">Plum</li>\n * //   </ul>\n *\n * const healthy = $('<div class=\"healthy\"></div>');\n * $('li').wrap(healthy);\n *\n * //=> <ul id=\"fruits\">\n * //     <div class=\"healthy\">\n * //       <li class=\"apple\">Apple</li>\n * //     </div>\n * //     <div class=\"healthy\">\n * //       <li class=\"orange\">Orange</li>\n * //     </div>\n * //     <div class=\"healthy\">\n * //        <li class=\"plum\">Plum</li>\n * //     </div>\n * //   </ul>\n * ```\n *\n * @param wrapper - The DOM structure to wrap around each element in the\n *   selection.\n * @see {@link https://api.jquery.com/wrap/}\n */\nexport const wrap = _wrap((el, elInsertLocation, wrapperDom) => {\n    const { parent } = el;\n    if (!parent)\n        return;\n    const siblings = parent.children;\n    const index = siblings.indexOf(el);\n    updateDOM([el], elInsertLocation);\n    /*\n     * The previous operation removed the current element from the `siblings`\n     * array, so the `dom` array can be inserted without removing any\n     * additional elements.\n     */\n    uniqueSplice(siblings, index, 0, wrapperDom, parent);\n});\n/**\n * The .wrapInner() function can take any string or object that could be passed\n * to the $() factory function to specify a DOM structure. This structure may be\n * nested several levels deep, but should contain only one inmost element. The\n * structure will be wrapped around the content of each of the elements in the\n * set of matched elements.\n *\n * @category Manipulation\n * @example\n *\n * ```js\n * const redFruit = $('<div class=\"red-fruit\"></div>');\n * $('.apple').wrapInner(redFruit);\n *\n * //=> <ul id=\"fruits\">\n * //     <li class=\"apple\">\n * //       <div class=\"red-fruit\">Apple</div>\n * //     </li>\n * //     <li class=\"orange\">Orange</li>\n * //     <li class=\"pear\">Pear</li>\n * //   </ul>\n *\n * const healthy = $('<div class=\"healthy\"></div>');\n * $('li').wrapInner(healthy);\n *\n * //=> <ul id=\"fruits\">\n * //     <li class=\"apple\">\n * //       <div class=\"healthy\">Apple</div>\n * //     </li>\n * //     <li class=\"orange\">\n * //       <div class=\"healthy\">Orange</div>\n * //     </li>\n * //     <li class=\"pear\">\n * //       <div class=\"healthy\">Pear</div>\n * //     </li>\n * //   </ul>\n * ```\n *\n * @param wrapper - The DOM structure to wrap around the content of each element\n *   in the selection.\n * @returns The instance itself, for chaining.\n * @see {@link https://api.jquery.com/wrapInner/}\n */\nexport const wrapInner = _wrap((el, elInsertLocation, wrapperDom) => {\n    if (!hasChildren(el))\n        return;\n    updateDOM(el.children, elInsertLocation);\n    updateDOM(wrapperDom, el);\n});\n/**\n * The .unwrap() function, removes the parents of the set of matched elements\n * from the DOM, leaving the matched elements in their place.\n *\n * @category Manipulation\n * @example <caption>without selector</caption>\n *\n * ```js\n * const $ = cheerio.load(\n *   '<div id=test>\\n  <div><p>Hello</p></div>\\n  <div><p>World</p></div>\\n</div>',\n * );\n * $('#test p').unwrap();\n *\n * //=> <div id=test>\n * //     <p>Hello</p>\n * //     <p>World</p>\n * //   </div>\n * ```\n *\n * @example <caption>with selector</caption>\n *\n * ```js\n * const $ = cheerio.load(\n *   '<div id=test>\\n  <p>Hello</p>\\n  <b><p>World</p></b>\\n</div>',\n * );\n * $('#test p').unwrap('b');\n *\n * //=> <div id=test>\n * //     <p>Hello</p>\n * //     <p>World</p>\n * //   </div>\n * ```\n *\n * @param selector - A selector to check the parent element against. If an\n *   element's parent does not match the selector, the element won't be\n *   unwrapped.\n * @returns The instance itself, for chaining.\n * @see {@link https://api.jquery.com/unwrap/}\n */\nexport function unwrap(selector) {\n    this.parent(selector)\n        .not('body')\n        .each((_, el) => {\n        this._make(el).replaceWith(el.children);\n    });\n    return this;\n}\n/**\n * The .wrapAll() function can take any string or object that could be passed to\n * the $() function to specify a DOM structure. This structure may be nested\n * several levels deep, but should contain only one inmost element. The\n * structure will be wrapped around all of the elements in the set of matched\n * elements, as a single group.\n *\n * @category Manipulation\n * @example <caption>With markup passed to `wrapAll`</caption>\n *\n * ```js\n * const $ = cheerio.load(\n *   '<div class=\"container\"><div class=\"inner\">First</div><div class=\"inner\">Second</div></div>',\n * );\n * $('.inner').wrapAll(\"<div class='new'></div>\");\n *\n * //=> <div class=\"container\">\n * //     <div class='new'>\n * //       <div class=\"inner\">First</div>\n * //       <div class=\"inner\">Second</div>\n * //     </div>\n * //   </div>\n * ```\n *\n * @example <caption>With an existing cheerio instance</caption>\n *\n * ```js\n * const $ = cheerio.load(\n *   '<span>Span 1</span><strong>Strong</strong><span>Span 2</span>',\n * );\n * const wrap = $('<div><p><em><b></b></em></p></div>');\n * $('span').wrapAll(wrap);\n *\n * //=> <div>\n * //     <p>\n * //       <em>\n * //         <b>\n * //           <span>Span 1</span>\n * //           <span>Span 2</span>\n * //         </b>\n * //       </em>\n * //     </p>\n * //   </div>\n * //   <strong>Strong</strong>\n * ```\n *\n * @param wrapper - The DOM structure to wrap around all matched elements in the\n *   selection.\n * @returns The instance itself.\n * @see {@link https://api.jquery.com/wrapAll/}\n */\nexport function wrapAll(wrapper) {\n    const el = this[0];\n    if (el) {\n        const wrap = this._make(typeof wrapper === 'function' ? wrapper.call(el, 0, el) : wrapper).insertBefore(el);\n        // If html is given as wrapper, wrap may contain text elements\n        let elInsertLocation;\n        for (let i = 0; i < wrap.length; i++) {\n            if (wrap[i].type === 'tag')\n                elInsertLocation = wrap[i];\n        }\n        let j = 0;\n        /*\n         * Find the deepest child. Only consider the first tag child of each node\n         * (ignore text); stop if no children are found.\n         */\n        while (elInsertLocation && j < elInsertLocation.children.length) {\n            const child = elInsertLocation.children[j];\n            if (child.type === 'tag') {\n                elInsertLocation = child;\n                j = 0;\n            }\n            else {\n                j++;\n            }\n        }\n        if (elInsertLocation)\n            this._make(elInsertLocation).append(this);\n    }\n    return this;\n}\n/**\n * Insert content next to each element in the set of matched elements.\n *\n * @category Manipulation\n * @example\n *\n * ```js\n * $('.apple').after('<li class=\"plum\">Plum</li>');\n * $.html();\n * //=>  <ul id=\"fruits\">\n * //      <li class=\"apple\">Apple</li>\n * //      <li class=\"plum\">Plum</li>\n * //      <li class=\"orange\">Orange</li>\n * //      <li class=\"pear\">Pear</li>\n * //    </ul>\n * ```\n *\n * @param elems - HTML string, DOM element, array of DOM elements or Cheerio to\n *   insert after each element in the set of matched elements.\n * @returns The instance itself.\n * @see {@link https://api.jquery.com/after/}\n */\nexport function after(...elems) {\n    const lastIdx = this.length - 1;\n    return domEach(this, (el, i) => {\n        if (!hasChildren(el) || !el.parent) {\n            return;\n        }\n        const siblings = el.parent.children;\n        const index = siblings.indexOf(el);\n        // If not found, move on\n        /* istanbul ignore next */\n        if (index < 0)\n            return;\n        const domSrc = typeof elems[0] === 'function'\n            ? elems[0].call(el, i, this._render(el.children))\n            : elems;\n        const dom = this._makeDomArray(domSrc, i < lastIdx);\n        // Add element after `this` element\n        uniqueSplice(siblings, index + 1, 0, dom, el.parent);\n    });\n}\n/**\n * Insert every element in the set of matched elements after the target.\n *\n * @category Manipulation\n * @example\n *\n * ```js\n * $('<li class=\"plum\">Plum</li>').insertAfter('.apple');\n * $.html();\n * //=>  <ul id=\"fruits\">\n * //      <li class=\"apple\">Apple</li>\n * //      <li class=\"plum\">Plum</li>\n * //      <li class=\"orange\">Orange</li>\n * //      <li class=\"pear\">Pear</li>\n * //    </ul>\n * ```\n *\n * @param target - Element to insert elements after.\n * @returns The set of newly inserted elements.\n * @see {@link https://api.jquery.com/insertAfter/}\n */\nexport function insertAfter(target) {\n    if (typeof target === 'string') {\n        target = this._make(target);\n    }\n    this.remove();\n    const clones = [];\n    for (const el of this._makeDomArray(target)) {\n        const clonedSelf = this.clone().toArray();\n        const { parent } = el;\n        if (!parent) {\n            continue;\n        }\n        const siblings = parent.children;\n        const index = siblings.indexOf(el);\n        // If not found, move on\n        /* istanbul ignore next */\n        if (index < 0)\n            continue;\n        // Add cloned `this` element(s) after target element\n        uniqueSplice(siblings, index + 1, 0, clonedSelf, parent);\n        clones.push(...clonedSelf);\n    }\n    return this._make(clones);\n}\n/**\n * Insert content previous to each element in the set of matched elements.\n *\n * @category Manipulation\n * @example\n *\n * ```js\n * $('.apple').before('<li class=\"plum\">Plum</li>');\n * $.html();\n * //=>  <ul id=\"fruits\">\n * //      <li class=\"plum\">Plum</li>\n * //      <li class=\"apple\">Apple</li>\n * //      <li class=\"orange\">Orange</li>\n * //      <li class=\"pear\">Pear</li>\n * //    </ul>\n * ```\n *\n * @param elems - HTML string, DOM element, array of DOM elements or Cheerio to\n *   insert before each element in the set of matched elements.\n * @returns The instance itself.\n * @see {@link https://api.jquery.com/before/}\n */\nexport function before(...elems) {\n    const lastIdx = this.length - 1;\n    return domEach(this, (el, i) => {\n        if (!hasChildren(el) || !el.parent) {\n            return;\n        }\n        const siblings = el.parent.children;\n        const index = siblings.indexOf(el);\n        // If not found, move on\n        /* istanbul ignore next */\n        if (index < 0)\n            return;\n        const domSrc = typeof elems[0] === 'function'\n            ? elems[0].call(el, i, this._render(el.children))\n            : elems;\n        const dom = this._makeDomArray(domSrc, i < lastIdx);\n        // Add element before `el` element\n        uniqueSplice(siblings, index, 0, dom, el.parent);\n    });\n}\n/**\n * Insert every element in the set of matched elements before the target.\n *\n * @category Manipulation\n * @example\n *\n * ```js\n * $('<li class=\"plum\">Plum</li>').insertBefore('.apple');\n * $.html();\n * //=>  <ul id=\"fruits\">\n * //      <li class=\"plum\">Plum</li>\n * //      <li class=\"apple\">Apple</li>\n * //      <li class=\"orange\">Orange</li>\n * //      <li class=\"pear\">Pear</li>\n * //    </ul>\n * ```\n *\n * @param target - Element to insert elements before.\n * @returns The set of newly inserted elements.\n * @see {@link https://api.jquery.com/insertBefore/}\n */\nexport function insertBefore(target) {\n    const targetArr = this._make(target);\n    this.remove();\n    const clones = [];\n    domEach(targetArr, (el) => {\n        const clonedSelf = this.clone().toArray();\n        const { parent } = el;\n        if (!parent) {\n            return;\n        }\n        const siblings = parent.children;\n        const index = siblings.indexOf(el);\n        // If not found, move on\n        /* istanbul ignore next */\n        if (index < 0)\n            return;\n        // Add cloned `this` element(s) after target element\n        uniqueSplice(siblings, index, 0, clonedSelf, parent);\n        clones.push(...clonedSelf);\n    });\n    return this._make(clones);\n}\n/**\n * Removes the set of matched elements from the DOM and all their children.\n * `selector` filters the set of matched elements to be removed.\n *\n * @category Manipulation\n * @example\n *\n * ```js\n * $('.pear').remove();\n * $.html();\n * //=>  <ul id=\"fruits\">\n * //      <li class=\"apple\">Apple</li>\n * //      <li class=\"orange\">Orange</li>\n * //    </ul>\n * ```\n *\n * @param selector - Optional selector for elements to remove.\n * @returns The instance itself.\n * @see {@link https://api.jquery.com/remove/}\n */\nexport function remove(selector) {\n    // Filter if we have selector\n    const elems = selector ? this.filter(selector) : this;\n    domEach(elems, (el) => {\n        removeElement(el);\n        el.prev = el.next = el.parent = null;\n    });\n    return this;\n}\n/**\n * Replaces matched elements with `content`.\n *\n * @category Manipulation\n * @example\n *\n * ```js\n * const plum = $('<li class=\"plum\">Plum</li>');\n * $('.pear').replaceWith(plum);\n * $.html();\n * //=> <ul id=\"fruits\">\n * //     <li class=\"apple\">Apple</li>\n * //     <li class=\"orange\">Orange</li>\n * //     <li class=\"plum\">Plum</li>\n * //   </ul>\n * ```\n *\n * @param content - Replacement for matched elements.\n * @returns The instance itself.\n * @see {@link https://api.jquery.com/replaceWith/}\n */\nexport function replaceWith(content) {\n    return domEach(this, (el, i) => {\n        const { parent } = el;\n        if (!parent) {\n            return;\n        }\n        const siblings = parent.children;\n        const cont = typeof content === 'function' ? content.call(el, i, el) : content;\n        const dom = this._makeDomArray(cont);\n        /*\n         * In the case that `dom` contains nodes that already exist in other\n         * structures, ensure those nodes are properly removed.\n         */\n        updateDOM(dom, null);\n        const index = siblings.indexOf(el);\n        // Completely remove old element\n        uniqueSplice(siblings, index, 1, dom, parent);\n        if (!dom.includes(el)) {\n            el.parent = el.prev = el.next = null;\n        }\n    });\n}\n/**\n * Removes all children from each item in the selection. Text nodes and comment\n * nodes are left as is.\n *\n * @category Manipulation\n * @example\n *\n * ```js\n * $('ul').empty();\n * $.html();\n * //=>  <ul id=\"fruits\"></ul>\n * ```\n *\n * @returns The instance itself.\n * @see {@link https://api.jquery.com/empty/}\n */\nexport function empty() {\n    return domEach(this, (el) => {\n        if (!hasChildren(el))\n            return;\n        for (const child of el.children) {\n            child.next = child.prev = child.parent = null;\n        }\n        el.children.length = 0;\n    });\n}\nexport function html(str) {\n    if (str === undefined) {\n        const el = this[0];\n        if (!el || !hasChildren(el))\n            return null;\n        return this._render(el.children);\n    }\n    return domEach(this, (el) => {\n        if (!hasChildren(el))\n            return;\n        for (const child of el.children) {\n            child.next = child.prev = child.parent = null;\n        }\n        const content = isCheerio(str)\n            ? str.toArray()\n            : this._parse(`${str}`, this.options, false, el).children;\n        updateDOM(content, el);\n    });\n}\n/**\n * Turns the collection to a string. Alias for `.html()`.\n *\n * @category Manipulation\n * @returns The rendered document.\n */\nexport function toString() {\n    return this._render(this);\n}\nexport function text(str) {\n    // If `str` is undefined, act as a \"getter\"\n    if (str === undefined) {\n        return staticText(this);\n    }\n    if (typeof str === 'function') {\n        // Function support\n        return domEach(this, (el, i) => this._make(el).text(str.call(el, i, staticText([el]))));\n    }\n    // Append text node to each selected elements\n    return domEach(this, (el) => {\n        if (!hasChildren(el))\n            return;\n        for (const child of el.children) {\n            child.next = child.prev = child.parent = null;\n        }\n        const textNode = new Text(`${str}`);\n        updateDOM(textNode, el);\n    });\n}\n/**\n * Clone the cheerio object.\n *\n * @category Manipulation\n * @example\n *\n * ```js\n * const moreFruit = $('#fruits').clone();\n * ```\n *\n * @returns The cloned object.\n * @see {@link https://api.jquery.com/clone/}\n */\nexport function clone() {\n    const clone = Array.prototype.map.call(this.get(), (el) => cloneNode(el, true));\n    // Add a root node around the cloned nodes\n    const root = new Document(clone);\n    for (const node of clone) {\n        node.parent = root;\n    }\n    return this._make(clone);\n}\n//# sourceMappingURL=manipulation.js.map","/**\n * Methods for traversing the DOM structure.\n *\n * @module cheerio/traversing\n */\nimport { isTag, hasChildren, isDocument, } from 'domhandler';\nimport * as select from 'cheerio-select';\nimport { domEach, isCheerio } from '../utils.js';\nimport { contains } from '../static.js';\nimport { getChildren, getSiblings, nextElementSibling, prevElementSibling, uniqueSort, } from 'domutils';\nconst reSiblingSelector = /^\\s*[+~]/;\n/**\n * Get the descendants of each element in the current set of matched elements,\n * filtered by a selector, jQuery object, or element.\n *\n * @category Traversing\n * @example\n *\n * ```js\n * $('#fruits').find('li').length;\n * //=> 3\n * $('#fruits').find($('.apple')).length;\n * //=> 1\n * ```\n *\n * @param selectorOrHaystack - Element to look for.\n * @returns The found elements.\n * @see {@link https://api.jquery.com/find/}\n */\nexport function find(selectorOrHaystack) {\n    if (!selectorOrHaystack) {\n        return this._make([]);\n    }\n    if (typeof selectorOrHaystack !== 'string') {\n        const haystack = isCheerio(selectorOrHaystack)\n            ? selectorOrHaystack.toArray()\n            : [selectorOrHaystack];\n        const context = this.toArray();\n        return this._make(haystack.filter((elem) => context.some((node) => contains(node, elem))));\n    }\n    return this._findBySelector(selectorOrHaystack, Number.POSITIVE_INFINITY);\n}\n/**\n * Find elements by a specific selector.\n *\n * @private\n * @category Traversing\n * @param selector - Selector to filter by.\n * @param limit - Maximum number of elements to match.\n * @returns The found elements.\n */\nexport function _findBySelector(selector, limit) {\n    var _a;\n    const context = this.toArray();\n    const elems = reSiblingSelector.test(selector)\n        ? context\n        : this.children().toArray();\n    const options = {\n        context,\n        root: (_a = this._root) === null || _a === void 0 ? void 0 : _a[0],\n        // Pass options that are recognized by `cheerio-select`\n        xmlMode: this.options.xmlMode,\n        lowerCaseTags: this.options.lowerCaseTags,\n        lowerCaseAttributeNames: this.options.lowerCaseAttributeNames,\n        pseudos: this.options.pseudos,\n        quirksMode: this.options.quirksMode,\n    };\n    return this._make(select.select(selector, elems, options, limit));\n}\n/**\n * Creates a matcher, using a particular mapping function. Matchers provide a\n * function that finds elements using a generating function, supporting\n * filtering.\n *\n * @private\n * @param matchMap - Mapping function.\n * @returns - Function for wrapping generating functions.\n */\nfunction _getMatcher(matchMap) {\n    return function (fn, ...postFns) {\n        return function (selector) {\n            var _a;\n            let matched = matchMap(fn, this);\n            if (selector) {\n                matched = filterArray(matched, selector, this.options.xmlMode, (_a = this._root) === null || _a === void 0 ? void 0 : _a[0]);\n            }\n            return this._make(\n            // Post processing is only necessary if there is more than one element.\n            this.length > 1 && matched.length > 1\n                ? postFns.reduce((elems, fn) => fn(elems), matched)\n                : matched);\n        };\n    };\n}\n/** Matcher that adds multiple elements for each entry in the input. */\nconst _matcher = _getMatcher((fn, elems) => {\n    let ret = [];\n    for (let i = 0; i < elems.length; i++) {\n        const value = fn(elems[i]);\n        if (value.length > 0)\n            ret = ret.concat(value);\n    }\n    return ret;\n});\n/** Matcher that adds at most one element for each entry in the input. */\nconst _singleMatcher = _getMatcher((fn, elems) => {\n    const ret = [];\n    for (let i = 0; i < elems.length; i++) {\n        const value = fn(elems[i]);\n        if (value !== null) {\n            ret.push(value);\n        }\n    }\n    return ret;\n});\n/**\n * Matcher that supports traversing until a condition is met.\n *\n * @param nextElem - Function that returns the next element.\n * @param postFns - Post processing functions.\n * @returns A function usable for `*Until` methods.\n */\nfunction _matchUntil(nextElem, ...postFns) {\n    // We use a variable here that is used from within the matcher.\n    let matches = null;\n    const innerMatcher = _getMatcher((nextElem, elems) => {\n        const matched = [];\n        domEach(elems, (elem) => {\n            for (let next; (next = nextElem(elem)); elem = next) {\n                // FIXME: `matched` might contain duplicates here and the index is too large.\n                if (matches === null || matches === void 0 ? void 0 : matches(next, matched.length))\n                    break;\n                matched.push(next);\n            }\n        });\n        return matched;\n    })(nextElem, ...postFns);\n    return function (selector, filterSelector) {\n        // Override `matches` variable with the new target.\n        matches =\n            typeof selector === 'string'\n                ? (elem) => select.is(elem, selector, this.options)\n                : selector\n                    ? getFilterFn(selector)\n                    : null;\n        const ret = innerMatcher.call(this, filterSelector);\n        // Set `matches` to `null`, so we don't waste memory.\n        matches = null;\n        return ret;\n    };\n}\nfunction _removeDuplicates(elems) {\n    return elems.length > 1 ? Array.from(new Set(elems)) : elems;\n}\n/**\n * Get the parent of each element in the current set of matched elements,\n * optionally filtered by a selector.\n *\n * @category Traversing\n * @example\n *\n * ```js\n * $('.pear').parent().attr('id');\n * //=> fruits\n * ```\n *\n * @param selector - If specified filter for parent.\n * @returns The parents.\n * @see {@link https://api.jquery.com/parent/}\n */\nexport const parent = _singleMatcher(({ parent }) => (parent && !isDocument(parent) ? parent : null), _removeDuplicates);\n/**\n * Get a set of parents filtered by `selector` of each element in the current\n * set of match elements.\n *\n * @category Traversing\n * @example\n *\n * ```js\n * $('.orange').parents().length;\n * //=> 2\n * $('.orange').parents('#fruits').length;\n * //=> 1\n * ```\n *\n * @param selector - If specified filter for parents.\n * @returns The parents.\n * @see {@link https://api.jquery.com/parents/}\n */\nexport const parents = _matcher((elem) => {\n    const matched = [];\n    while (elem.parent && !isDocument(elem.parent)) {\n        matched.push(elem.parent);\n        elem = elem.parent;\n    }\n    return matched;\n}, uniqueSort, (elems) => elems.reverse());\n/**\n * Get the ancestors of each element in the current set of matched elements, up\n * to but not including the element matched by the selector, DOM node, or\n * cheerio object.\n *\n * @category Traversing\n * @example\n *\n * ```js\n * $('.orange').parentsUntil('#food').length;\n * //=> 1\n * ```\n *\n * @param selector - Selector for element to stop at.\n * @param filterSelector - Optional filter for parents.\n * @returns The parents.\n * @see {@link https://api.jquery.com/parentsUntil/}\n */\nexport const parentsUntil = _matchUntil(({ parent }) => (parent && !isDocument(parent) ? parent : null), uniqueSort, (elems) => elems.reverse());\n/**\n * For each element in the set, get the first element that matches the selector\n * by testing the element itself and traversing up through its ancestors in the\n * DOM tree.\n *\n * @category Traversing\n * @example\n *\n * ```js\n * $('.orange').closest();\n * //=> []\n *\n * $('.orange').closest('.apple');\n * // => []\n *\n * $('.orange').closest('li');\n * //=> [<li class=\"orange\">Orange</li>]\n *\n * $('.orange').closest('#fruits');\n * //=> [<ul id=\"fruits\"> ... </ul>]\n * ```\n *\n * @param selector - Selector for the element to find.\n * @returns The closest nodes.\n * @see {@link https://api.jquery.com/closest/}\n */\nexport function closest(selector) {\n    var _a;\n    const set = [];\n    if (!selector) {\n        return this._make(set);\n    }\n    const selectOpts = {\n        xmlMode: this.options.xmlMode,\n        root: (_a = this._root) === null || _a === void 0 ? void 0 : _a[0],\n    };\n    const selectFn = typeof selector === 'string'\n        ? (elem) => select.is(elem, selector, selectOpts)\n        : getFilterFn(selector);\n    domEach(this, (elem) => {\n        if (elem && !isDocument(elem) && !isTag(elem)) {\n            elem = elem.parent;\n        }\n        while (elem && isTag(elem)) {\n            if (selectFn(elem, 0)) {\n                // Do not add duplicate elements to the set\n                if (!set.includes(elem)) {\n                    set.push(elem);\n                }\n                break;\n            }\n            elem = elem.parent;\n        }\n    });\n    return this._make(set);\n}\n/**\n * Gets the next sibling of each selected element, optionally filtered by a\n * selector.\n *\n * @category Traversing\n * @example\n *\n * ```js\n * $('.apple').next().hasClass('orange');\n * //=> true\n * ```\n *\n * @param selector - If specified filter for sibling.\n * @returns The next nodes.\n * @see {@link https://api.jquery.com/next/}\n */\nexport const next = _singleMatcher((elem) => nextElementSibling(elem));\n/**\n * Gets all the following siblings of the each selected element, optionally\n * filtered by a selector.\n *\n * @category Traversing\n * @example\n *\n * ```js\n * $('.apple').nextAll();\n * //=> [<li class=\"orange\">Orange</li>, <li class=\"pear\">Pear</li>]\n * $('.apple').nextAll('.orange');\n * //=> [<li class=\"orange\">Orange</li>]\n * ```\n *\n * @param selector - If specified filter for siblings.\n * @returns The next nodes.\n * @see {@link https://api.jquery.com/nextAll/}\n */\nexport const nextAll = _matcher((elem) => {\n    const matched = [];\n    while (elem.next) {\n        elem = elem.next;\n        if (isTag(elem))\n            matched.push(elem);\n    }\n    return matched;\n}, _removeDuplicates);\n/**\n * Gets all the following siblings up to but not including the element matched\n * by the selector, optionally filtered by another selector.\n *\n * @category Traversing\n * @example\n *\n * ```js\n * $('.apple').nextUntil('.pear');\n * //=> [<li class=\"orange\">Orange</li>]\n * ```\n *\n * @param selector - Selector for element to stop at.\n * @param filterSelector - If specified filter for siblings.\n * @returns The next nodes.\n * @see {@link https://api.jquery.com/nextUntil/}\n */\nexport const nextUntil = _matchUntil((el) => nextElementSibling(el), _removeDuplicates);\n/**\n * Gets the previous sibling of each selected element optionally filtered by a\n * selector.\n *\n * @category Traversing\n * @example\n *\n * ```js\n * $('.orange').prev().hasClass('apple');\n * //=> true\n * ```\n *\n * @param selector - If specified filter for siblings.\n * @returns The previous nodes.\n * @see {@link https://api.jquery.com/prev/}\n */\nexport const prev = _singleMatcher((elem) => prevElementSibling(elem));\n/**\n * Gets all the preceding siblings of each selected element, optionally filtered\n * by a selector.\n *\n * @category Traversing\n * @example\n *\n * ```js\n * $('.pear').prevAll();\n * //=> [<li class=\"orange\">Orange</li>, <li class=\"apple\">Apple</li>]\n *\n * $('.pear').prevAll('.orange');\n * //=> [<li class=\"orange\">Orange</li>]\n * ```\n *\n * @param selector - If specified filter for siblings.\n * @returns The previous nodes.\n * @see {@link https://api.jquery.com/prevAll/}\n */\nexport const prevAll = _matcher((elem) => {\n    const matched = [];\n    while (elem.prev) {\n        elem = elem.prev;\n        if (isTag(elem))\n            matched.push(elem);\n    }\n    return matched;\n}, _removeDuplicates);\n/**\n * Gets all the preceding siblings up to but not including the element matched\n * by the selector, optionally filtered by another selector.\n *\n * @category Traversing\n * @example\n *\n * ```js\n * $('.pear').prevUntil('.apple');\n * //=> [<li class=\"orange\">Orange</li>]\n * ```\n *\n * @param selector - Selector for element to stop at.\n * @param filterSelector - If specified filter for siblings.\n * @returns The previous nodes.\n * @see {@link https://api.jquery.com/prevUntil/}\n */\nexport const prevUntil = _matchUntil((el) => prevElementSibling(el), _removeDuplicates);\n/**\n * Get the siblings of each element (excluding the element) in the set of\n * matched elements, optionally filtered by a selector.\n *\n * @category Traversing\n * @example\n *\n * ```js\n * $('.pear').siblings().length;\n * //=> 2\n *\n * $('.pear').siblings('.orange').length;\n * //=> 1\n * ```\n *\n * @param selector - If specified filter for siblings.\n * @returns The siblings.\n * @see {@link https://api.jquery.com/siblings/}\n */\nexport const siblings = _matcher((elem) => getSiblings(elem).filter((el) => isTag(el) && el !== elem), uniqueSort);\n/**\n * Gets the element children of each element in the set of matched elements.\n *\n * @category Traversing\n * @example\n *\n * ```js\n * $('#fruits').children().length;\n * //=> 3\n *\n * $('#fruits').children('.pear').text();\n * //=> Pear\n * ```\n *\n * @param selector - If specified filter for children.\n * @returns The children.\n * @see {@link https://api.jquery.com/children/}\n */\nexport const children = _matcher((elem) => getChildren(elem).filter(isTag), _removeDuplicates);\n/**\n * Gets the children of each element in the set of matched elements, including\n * text and comment nodes.\n *\n * @category Traversing\n * @example\n *\n * ```js\n * $('#fruits').contents().length;\n * //=> 3\n * ```\n *\n * @returns The children.\n * @see {@link https://api.jquery.com/contents/}\n */\nexport function contents() {\n    const elems = this.toArray().reduce((newElems, elem) => hasChildren(elem) ? newElems.concat(elem.children) : newElems, []);\n    return this._make(elems);\n}\n/**\n * Iterates over a cheerio object, executing a function for each matched\n * element. When the callback is fired, the function is fired in the context of\n * the DOM element, so `this` refers to the current element, which is equivalent\n * to the function parameter `element`. To break out of the `each` loop early,\n * return with `false`.\n *\n * @category Traversing\n * @example\n *\n * ```js\n * const fruits = [];\n *\n * $('li').each(function (i, elem) {\n *   fruits[i] = $(this).text();\n * });\n *\n * fruits.join(', ');\n * //=> Apple, Orange, Pear\n * ```\n *\n * @param fn - Function to execute.\n * @returns The instance itself, useful for chaining.\n * @see {@link https://api.jquery.com/each/}\n */\nexport function each(fn) {\n    let i = 0;\n    const len = this.length;\n    while (i < len && fn.call(this[i], i, this[i]) !== false)\n        ++i;\n    return this;\n}\n/**\n * Pass each element in the current matched set through a function, producing a\n * new Cheerio object containing the return values. The function can return an\n * individual data item or an array of data items to be inserted into the\n * resulting set. If an array is returned, the elements inside the array are\n * inserted into the set. If the function returns null or undefined, no element\n * will be inserted.\n *\n * @category Traversing\n * @example\n *\n * ```js\n * $('li')\n *   .map(function (i, el) {\n *     // this === el\n *     return $(this).text();\n *   })\n *   .toArray()\n *   .join(' ');\n * //=> \"apple orange pear\"\n * ```\n *\n * @param fn - Function to execute.\n * @returns The mapped elements, wrapped in a Cheerio collection.\n * @see {@link https://api.jquery.com/map/}\n */\nexport function map(fn) {\n    let elems = [];\n    for (let i = 0; i < this.length; i++) {\n        const el = this[i];\n        const val = fn.call(el, i, el);\n        if (val != null) {\n            elems = elems.concat(val);\n        }\n    }\n    return this._make(elems);\n}\n/**\n * Creates a function to test if a filter is matched.\n *\n * @param match - A filter.\n * @returns A function that determines if a filter has been matched.\n */\nfunction getFilterFn(match) {\n    if (typeof match === 'function') {\n        return (el, i) => match.call(el, i, el);\n    }\n    if (isCheerio(match)) {\n        return (el) => Array.prototype.includes.call(match, el);\n    }\n    return function (el) {\n        return match === el;\n    };\n}\nexport function filter(match) {\n    var _a;\n    return this._make(filterArray(this.toArray(), match, this.options.xmlMode, (_a = this._root) === null || _a === void 0 ? void 0 : _a[0]));\n}\nexport function filterArray(nodes, match, xmlMode, root) {\n    return typeof match === 'string'\n        ? select.filter(match, nodes, { xmlMode, root })\n        : nodes.filter(getFilterFn(match));\n}\n/**\n * Checks the current list of elements and returns `true` if _any_ of the\n * elements match the selector. If using an element or Cheerio selection,\n * returns `true` if _any_ of the elements match. If using a predicate function,\n * the function is executed in the context of the selected element, so `this`\n * refers to the current element.\n *\n * @category Traversing\n * @param selector - Selector for the selection.\n * @returns Whether or not the selector matches an element of the instance.\n * @see {@link https://api.jquery.com/is/}\n */\nexport function is(selector) {\n    const nodes = this.toArray();\n    return typeof selector === 'string'\n        ? select.some(nodes.filter(isTag), selector, this.options)\n        : selector\n            ? nodes.some(getFilterFn(selector))\n            : false;\n}\n/**\n * Remove elements from the set of matched elements. Given a Cheerio object that\n * represents a set of DOM elements, the `.not()` method constructs a new\n * Cheerio object from a subset of the matching elements. The supplied selector\n * is tested against each element; the elements that don't match the selector\n * will be included in the result.\n *\n * The `.not()` method can take a function as its argument in the same way that\n * `.filter()` does. Elements for which the function returns `true` are excluded\n * from the filtered set; all other elements are included.\n *\n * @category Traversing\n * @example <caption>Selector</caption>\n *\n * ```js\n * $('li').not('.apple').length;\n * //=> 2\n * ```\n *\n * @example <caption>Function</caption>\n *\n * ```js\n * $('li').not(function (i, el) {\n *   // this === el\n *   return $(this).attr('class') === 'orange';\n * }).length; //=> 2\n * ```\n *\n * @param match - Value to look for, following the rules above.\n * @returns The filtered collection.\n * @see {@link https://api.jquery.com/not/}\n */\nexport function not(match) {\n    let nodes = this.toArray();\n    if (typeof match === 'string') {\n        const matches = new Set(select.filter(match, nodes, this.options));\n        nodes = nodes.filter((el) => !matches.has(el));\n    }\n    else {\n        const filterFn = getFilterFn(match);\n        nodes = nodes.filter((el, i) => !filterFn(el, i));\n    }\n    return this._make(nodes);\n}\n/**\n * Filters the set of matched elements to only those which have the given DOM\n * element as a descendant or which have a descendant that matches the given\n * selector. Equivalent to `.filter(':has(selector)')`.\n *\n * @category Traversing\n * @example <caption>Selector</caption>\n *\n * ```js\n * $('ul').has('.pear').attr('id');\n * //=> fruits\n * ```\n *\n * @example <caption>Element</caption>\n *\n * ```js\n * $('ul').has($('.pear')[0]).attr('id');\n * //=> fruits\n * ```\n *\n * @param selectorOrHaystack - Element to look for.\n * @returns The filtered collection.\n * @see {@link https://api.jquery.com/has/}\n */\nexport function has(selectorOrHaystack) {\n    return this.filter(typeof selectorOrHaystack === 'string'\n        ? // Using the `:has` selector here short-circuits searches.\n            `:has(${selectorOrHaystack})`\n        : (_, el) => this._make(el).find(selectorOrHaystack).length > 0);\n}\n/**\n * Will select the first element of a cheerio object.\n *\n * @category Traversing\n * @example\n *\n * ```js\n * $('#fruits').children().first().text();\n * //=> Apple\n * ```\n *\n * @returns The first element.\n * @see {@link https://api.jquery.com/first/}\n */\nexport function first() {\n    return this.length > 1 ? this._make(this[0]) : this;\n}\n/**\n * Will select the last element of a cheerio object.\n *\n * @category Traversing\n * @example\n *\n * ```js\n * $('#fruits').children().last().text();\n * //=> Pear\n * ```\n *\n * @returns The last element.\n * @see {@link https://api.jquery.com/last/}\n */\nexport function last() {\n    return this.length > 0 ? this._make(this[this.length - 1]) : this;\n}\n/**\n * Reduce the set of matched elements to the one at the specified index. Use\n * `.eq(-i)` to count backwards from the last selected element.\n *\n * @category Traversing\n * @example\n *\n * ```js\n * $('li').eq(0).text();\n * //=> Apple\n *\n * $('li').eq(-1).text();\n * //=> Pear\n * ```\n *\n * @param i - Index of the element to select.\n * @returns The element at the `i`th position.\n * @see {@link https://api.jquery.com/eq/}\n */\nexport function eq(i) {\n    var _a;\n    i = +i;\n    // Use the first identity optimization if possible\n    if (i === 0 && this.length <= 1)\n        return this;\n    if (i < 0)\n        i = this.length + i;\n    return this._make((_a = this[i]) !== null && _a !== void 0 ? _a : []);\n}\nexport function get(i) {\n    if (i == null) {\n        return this.toArray();\n    }\n    return this[i < 0 ? this.length + i : i];\n}\n/**\n * Retrieve all the DOM elements contained in the jQuery set as an array.\n *\n * @example\n *\n * ```js\n * $('li').toArray();\n * //=> [ {...}, {...}, {...} ]\n * ```\n *\n * @returns The contained items.\n */\nexport function toArray() {\n    return Array.prototype.slice.call(this);\n}\n/**\n * Search for a given element from among the matched elements.\n *\n * @category Traversing\n * @example\n *\n * ```js\n * $('.pear').index();\n * //=> 2 $('.orange').index('li');\n * //=> 1\n * $('.apple').index($('#fruit, li'));\n * //=> 1\n * ```\n *\n * @param selectorOrNeedle - Element to look for.\n * @returns The index of the element.\n * @see {@link https://api.jquery.com/index/}\n */\nexport function index(selectorOrNeedle) {\n    let $haystack;\n    let needle;\n    if (selectorOrNeedle == null) {\n        $haystack = this.parent().children();\n        needle = this[0];\n    }\n    else if (typeof selectorOrNeedle === 'string') {\n        $haystack = this._make(selectorOrNeedle);\n        needle = this[0];\n    }\n    else {\n        // eslint-disable-next-line @typescript-eslint/no-this-alias, unicorn/no-this-assignment\n        $haystack = this;\n        needle = isCheerio(selectorOrNeedle)\n            ? selectorOrNeedle[0]\n            : selectorOrNeedle;\n    }\n    return Array.prototype.indexOf.call($haystack, needle);\n}\n/**\n * Gets the elements matching the specified range (0-based position).\n *\n * @category Traversing\n * @example\n *\n * ```js\n * $('li').slice(1).eq(0).text();\n * //=> 'Orange'\n *\n * $('li').slice(1, 2).length;\n * //=> 1\n * ```\n *\n * @param start - A position at which the elements begin to be selected. If\n *   negative, it indicates an offset from the end of the set.\n * @param end - A position at which the elements stop being selected. If\n *   negative, it indicates an offset from the end of the set. If omitted, the\n *   range continues until the end of the set.\n * @returns The elements matching the specified range.\n * @see {@link https://api.jquery.com/slice/}\n */\nexport function slice(start, end) {\n    return this._make(Array.prototype.slice.call(this, start, end));\n}\n/**\n * End the most recent filtering operation in the current chain and return the\n * set of matched elements to its previous state.\n *\n * @category Traversing\n * @example\n *\n * ```js\n * $('li').eq(0).end().length;\n * //=> 3\n * ```\n *\n * @returns The previous state of the set of matched elements.\n * @see {@link https://api.jquery.com/end/}\n */\nexport function end() {\n    var _a;\n    return (_a = this.prevObject) !== null && _a !== void 0 ? _a : this._make([]);\n}\n/**\n * Add elements to the set of matched elements.\n *\n * @category Traversing\n * @example\n *\n * ```js\n * $('.apple').add('.orange').length;\n * //=> 2\n * ```\n *\n * @param other - Elements to add.\n * @param context - Optionally the context of the new selection.\n * @returns The combined set.\n * @see {@link https://api.jquery.com/add/}\n */\nexport function add(other, context) {\n    const selection = this._make(other, context);\n    const contents = uniqueSort([...this.get(), ...selection.get()]);\n    return this._make(contents);\n}\n/**\n * Add the previous set of elements on the stack to the current set, optionally\n * filtered by a selector.\n *\n * @category Traversing\n * @example\n *\n * ```js\n * $('li').eq(0).addBack('.orange').length;\n * //=> 2\n * ```\n *\n * @param selector - Selector for the elements to add.\n * @returns The combined set.\n * @see {@link https://api.jquery.com/addBack/}\n */\nexport function addBack(selector) {\n    return this.prevObject\n        ? this.add(selector ? this.prevObject.filter(selector) : this.prevObject)\n        : this;\n}\n//# sourceMappingURL=traversing.js.map","import * as Attributes from './api/attributes.js';\nimport * as Traversing from './api/traversing.js';\nimport * as Manipulation from './api/manipulation.js';\nimport * as Css from './api/css.js';\nimport * as Forms from './api/forms.js';\nimport * as Extract from './api/extract.js';\n/**\n * The cheerio class is the central class of the library. It wraps a set of\n * elements and provides an API for traversing, modifying, and interacting with\n * the set.\n *\n * Loading a document will return the Cheerio class bound to the root element of\n * the document. The class will be instantiated when querying the document (when\n * calling `$('selector')`).\n *\n * @example This is the HTML markup we will be using in all of the API examples:\n *\n * ```html\n * <ul id=\"fruits\">\n *   <li class=\"apple\">Apple</li>\n *   <li class=\"orange\">Orange</li>\n *   <li class=\"pear\">Pear</li>\n * </ul>\n * ```\n */\nexport class Cheerio {\n    /**\n     * Instance of cheerio. Methods are specified in the modules. Usage of this\n     * constructor is not recommended. Please use `$.load` instead.\n     *\n     * @private\n     * @param elements - The new selection.\n     * @param root - Sets the root node.\n     * @param options - Options for the instance.\n     */\n    constructor(elements, root, options) {\n        this.length = 0;\n        this.options = options;\n        this._root = root;\n        if (elements) {\n            for (let idx = 0; idx < elements.length; idx++) {\n                this[idx] = elements[idx];\n            }\n            this.length = elements.length;\n        }\n    }\n}\n/** Set a signature of the object. */\nCheerio.prototype.cheerio = '[cheerio object]';\n/*\n * Make cheerio an array-like object\n */\nCheerio.prototype.splice = Array.prototype.splice;\n// Support for (const element of $(...)) iteration:\nCheerio.prototype[Symbol.iterator] = Array.prototype[Symbol.iterator];\n// Plug in the API\nObject.assign(Cheerio.prototype, Attributes, Traversing, Manipulation, Css, Forms, Extract);\n//# sourceMappingURL=cheerio.js.map","import { flattenOptions, } from './options.js';\nimport * as staticMethods from './static.js';\nimport { Cheerio } from './cheerio.js';\nimport { isHtml, isCheerio } from './utils.js';\nexport function getLoad(parse, render) {\n    /**\n     * Create a querying function, bound to a document created from the provided\n     * markup.\n     *\n     * Note that similar to web browser contexts, this operation may introduce\n     * `<html>`, `<head>`, and `<body>` elements; set `isDocument` to `false` to\n     * switch to fragment mode and disable this.\n     *\n     * @param content - Markup to be loaded.\n     * @param options - Options for the created instance.\n     * @param isDocument - Allows parser to be switched to fragment mode.\n     * @returns The loaded document.\n     * @see {@link https://cheerio.js.org#loading} for additional usage information.\n     */\n    return function load(content, options, isDocument = true) {\n        if (content == null) {\n            throw new Error('cheerio.load() expects a string');\n        }\n        const internalOpts = flattenOptions(options);\n        const initialRoot = parse(content, internalOpts, isDocument, null);\n        /**\n         * Create an extended class here, so that extensions only live on one\n         * instance.\n         */\n        class LoadedCheerio extends Cheerio {\n            _make(selector, context) {\n                const cheerio = initialize(selector, context);\n                cheerio.prevObject = this;\n                return cheerio;\n            }\n            _parse(content, options, isDocument, context) {\n                return parse(content, options, isDocument, context);\n            }\n            _render(dom) {\n                return render(dom, this.options);\n            }\n        }\n        function initialize(selector, context, root = initialRoot, opts) {\n            // $($)\n            if (selector && isCheerio(selector))\n                return selector;\n            const options = flattenOptions(opts, internalOpts);\n            const r = typeof root === 'string'\n                ? [parse(root, options, false, null)]\n                : 'length' in root\n                    ? root\n                    : [root];\n            const rootInstance = isCheerio(r)\n                ? r\n                : new LoadedCheerio(r, null, options);\n            // Add a cyclic reference, so that calling methods on `_root` never fails.\n            rootInstance._root = rootInstance;\n            // $(), $(null), $(undefined), $(false)\n            if (!selector) {\n                return new LoadedCheerio(undefined, rootInstance, options);\n            }\n            const elements = typeof selector === 'string' && isHtml(selector)\n                ? // $(<html>)\n                    parse(selector, options, false, null).children\n                : isNode(selector)\n                    ? // $(dom)\n                        [selector]\n                    : Array.isArray(selector)\n                        ? // $([dom])\n                            selector\n                        : undefined;\n            const instance = new LoadedCheerio(elements, rootInstance, options);\n            if (elements) {\n                return instance;\n            }\n            if (typeof selector !== 'string') {\n                throw new TypeError('Unexpected type of selector');\n            }\n            // We know that our selector is a string now.\n            let search = selector;\n            const searchContext = context\n                ? // If we don't have a context, maybe we have a root, from loading\n                    typeof context === 'string'\n                        ? isHtml(context)\n                            ? // $('li', '<ul>...</ul>')\n                                new LoadedCheerio([parse(context, options, false, null)], rootInstance, options)\n                            : // $('li', 'ul')\n                                ((search = `${context} ${search}`), rootInstance)\n                        : isCheerio(context)\n                            ? // $('li', $)\n                                context\n                            : // $('li', node), $('li', [nodes])\n                                new LoadedCheerio(Array.isArray(context) ? context : [context], rootInstance, options)\n                : rootInstance;\n            // If we still don't have a context, return\n            if (!searchContext)\n                return instance;\n            /*\n             * #id, .class, tag\n             */\n            return searchContext.find(search);\n        }\n        // Add in static methods & properties\n        Object.assign(initialize, staticMethods, {\n            load,\n            // `_root` and `_options` are used in static methods.\n            _root: initialRoot,\n            _options: internalOpts,\n            // Add `fn` for plugins\n            fn: LoadedCheerio.prototype,\n            // Add the prototype here to maintain `instanceof` behavior.\n            prototype: LoadedCheerio.prototype,\n        });\n        return initialize;\n    };\n}\nfunction isNode(obj) {\n    return (!!obj.name ||\n        obj.type === 'root' ||\n        obj.type === 'text' ||\n        obj.type === 'comment');\n}\n//# sourceMappingURL=load.js.map","const defaultOpts = {\n    _useHtmlParser2: false,\n};\n/**\n * Flatten the options for Cheerio.\n *\n * This will set `_useHtmlParser2` to true if `xml` is set to true.\n *\n * @param options - The options to flatten.\n * @param baseOptions - The base options to use.\n * @returns The flattened options.\n */\nexport function flattenOptions(options, baseOptions) {\n    if (!options) {\n        return baseOptions !== null && baseOptions !== void 0 ? baseOptions : defaultOpts;\n    }\n    const opts = {\n        _useHtmlParser2: !!options.xmlMode,\n        ...baseOptions,\n        ...options,\n    };\n    if (options.xml) {\n        opts._useHtmlParser2 = true;\n        opts.xmlMode = true;\n        if (options.xml !== true) {\n            Object.assign(opts, options.xml);\n        }\n    }\n    else if (options.xmlMode) {\n        opts._useHtmlParser2 = true;\n    }\n    return opts;\n}\n//# sourceMappingURL=options.js.map","import { removeElement } from 'domutils';\nimport { Document, isDocument as checkIsDocument, } from 'domhandler';\n/**\n * Get the parse function with options.\n *\n * @param parser - The parser function.\n * @returns The parse function with options.\n */\nexport function getParse(parser) {\n    /**\n     * Parse a HTML string or a node.\n     *\n     * @param content - The HTML string or node.\n     * @param options - The parser options.\n     * @param isDocument - If `content` is a document.\n     * @param context - The context node in the DOM tree.\n     * @returns The parsed document node.\n     */\n    return function parse(content, options, isDocument, context) {\n        if (typeof Buffer !== 'undefined' && Buffer.isBuffer(content)) {\n            content = content.toString();\n        }\n        if (typeof content === 'string') {\n            return parser(content, options, isDocument, context);\n        }\n        const doc = content;\n        if (!Array.isArray(doc) && checkIsDocument(doc)) {\n            // If `doc` is already a root, just return it\n            return doc;\n        }\n        // Add conent to new root element\n        const root = new Document([]);\n        // Update the DOM using the root\n        update(doc, root);\n        return root;\n    };\n}\n/**\n * Update the dom structure, for one changed layer.\n *\n * @param newChilds - The new children.\n * @param parent - The new parent.\n * @returns The parent node.\n */\nexport function update(newChilds, parent) {\n    // Normalize\n    const arr = Array.isArray(newChilds) ? newChilds : [newChilds];\n    // Update parent\n    if (parent) {\n        parent.children = arr;\n    }\n    else {\n        parent = null;\n    }\n    // Update neighbors\n    for (let i = 0; i < arr.length; i++) {\n        const node = arr[i];\n        // Cleanly remove existing nodes from their previous structures.\n        if (node.parent && node.parent.children !== arr) {\n            removeElement(node);\n        }\n        if (parent) {\n            node.prev = arr[i - 1] || null;\n            node.next = arr[i + 1] || null;\n        }\n        else {\n            node.prev = node.next = null;\n        }\n        node.parent = parent;\n    }\n    return parent;\n}\n//# sourceMappingURL=parse.js.map","/**\n * @file Alternative entry point for Cheerio that always uses htmlparser2. This\n *   way, parse5 won't be loaded, saving some memory.\n */\nimport { getLoad } from './load.js';\nimport { getParse } from './parse.js';\nimport render from 'dom-serializer';\nimport { parseDocument } from 'htmlparser2';\nexport { contains, merge } from './static.js';\n/**\n * Create a querying function, bound to a document created from the provided\n * markup.\n *\n * @param content - Markup to be loaded.\n * @param options - Options for the created instance.\n * @param isDocument - Always `false` here, as we are always using\n *   `htmlparser2`.\n * @returns The loaded document.\n * @see {@link https://cheerio.js.org#loading} for additional usage information.\n */\nexport const load = getLoad(getParse(parseDocument), render);\n//# sourceMappingURL=slim.js.map","import { textContent } from 'domutils';\nimport { flattenOptions as flattenOptions, } from './options.js';\n/**\n * Helper function to render a DOM.\n *\n * @param that - Cheerio instance to render.\n * @param dom - The DOM to render. Defaults to `that`'s root.\n * @param options - Options for rendering.\n * @returns The rendered document.\n */\nfunction render(that, dom, options) {\n    if (!that)\n        return '';\n    return that(dom !== null && dom !== void 0 ? dom : that._root.children, null, undefined, options).toString();\n}\n/**\n * Checks if a passed object is an options object.\n *\n * @param dom - Object to check if it is an options object.\n * @param options - Options object.\n * @returns Whether the object is an options object.\n */\nfunction isOptions(dom, options) {\n    return (!options &&\n        typeof dom === 'object' &&\n        dom != null &&\n        !('length' in dom) &&\n        !('type' in dom));\n}\nexport function html(dom, options) {\n    /*\n     * Be flexible about parameters, sometimes we call html(),\n     * with options as only parameter\n     * check dom argument for dom element specific properties\n     * assume there is no 'length' or 'type' properties in the options object\n     */\n    const toRender = isOptions(dom) ? ((options = dom), undefined) : dom;\n    /*\n     * Sometimes `$.html()` is used without preloading html,\n     * so fallback non-existing options to the default ones.\n     */\n    const opts = {\n        ...this === null || this === void 0 ? void 0 : this._options,\n        ...flattenOptions(options),\n    };\n    return render(this, toRender, opts);\n}\n/**\n * Render the document as XML.\n *\n * @category Static\n * @param dom - Element to render.\n * @returns THe rendered document.\n */\nexport function xml(dom) {\n    const options = { ...this._options, xmlMode: true };\n    return render(this, dom, options);\n}\n/**\n * Render the document as text.\n *\n * This returns the `textContent` of the passed elements. The result will\n * include the contents of `<script>` and `<style>` elements. To avoid this, use\n * `.prop('innerText')` instead.\n *\n * @category Static\n * @param elements - Elements to render.\n * @returns The rendered document.\n */\nexport function text(elements) {\n    const elems = elements !== null && elements !== void 0 ? elements : (this ? this.root() : []);\n    let ret = '';\n    for (let i = 0; i < elems.length; i++) {\n        ret += textContent(elems[i]);\n    }\n    return ret;\n}\nexport function parseHTML(data, context, keepScripts = typeof context === 'boolean' ? context : false) {\n    if (!data || typeof data !== 'string') {\n        return null;\n    }\n    if (typeof context === 'boolean') {\n        keepScripts = context;\n    }\n    const parsed = this.load(data, this._options, false);\n    if (!keepScripts) {\n        parsed('script').remove();\n    }\n    /*\n     * The `children` array is used by Cheerio internally to group elements that\n     * share the same parents. When nodes created through `parseHTML` are\n     * inserted into previously-existing DOM structures, they will be removed\n     * from the `children` array. The results of `parseHTML` should remain\n     * constant across these operations, so a shallow copy should be returned.\n     */\n    return [...parsed.root()[0].children];\n}\n/**\n * Sometimes you need to work with the top-level root element. To query it, you\n * can use `$.root()`.\n *\n * @category Static\n * @example\n *\n * ```js\n * $.root().append('<ul id=\"vegetables\"></ul>').html();\n * //=> <ul id=\"fruits\">...</ul><ul id=\"vegetables\"></ul>\n * ```\n *\n * @returns Cheerio instance wrapping the root node.\n * @alias Cheerio.root\n */\nexport function root() {\n    return this(this._root);\n}\n/**\n * Checks to see if the `contained` DOM element is a descendant of the\n * `container` DOM element.\n *\n * @category Static\n * @param container - Potential parent node.\n * @param contained - Potential child node.\n * @returns Indicates if the nodes contain one another.\n * @alias Cheerio.contains\n * @see {@link https://api.jquery.com/jQuery.contains/}\n */\nexport function contains(container, contained) {\n    // According to the jQuery API, an element does not \"contain\" itself\n    if (contained === container) {\n        return false;\n    }\n    /*\n     * Step up the descendants, stopping when the root element is reached\n     * (signaled by `.parent` returning a reference to the same object)\n     */\n    let next = contained;\n    while (next && next !== next.parent) {\n        next = next.parent;\n        if (next === container) {\n            return true;\n        }\n    }\n    return false;\n}\n/**\n * Extract multiple values from a document, and store them in an object.\n *\n * @category Static\n * @param map - An object containing key-value pairs. The keys are the names of\n *   the properties to be created on the object, and the values are the\n *   selectors to be used to extract the values.\n * @returns An object containing the extracted values.\n */\nexport function extract(map) {\n    return this.root().extract(map);\n}\n/**\n * $.merge().\n *\n * @category Static\n * @param arr1 - First array.\n * @param arr2 - Second array.\n * @returns `arr1`, with elements of `arr2` inserted.\n * @alias Cheerio.merge\n * @see {@link https://api.jquery.com/jQuery.merge/}\n */\nexport function merge(arr1, arr2) {\n    if (!isArrayLike(arr1) || !isArrayLike(arr2)) {\n        return;\n    }\n    let newLength = arr1.length;\n    const len = +arr2.length;\n    for (let i = 0; i < len; i++) {\n        arr1[newLength++] = arr2[i];\n    }\n    arr1.length = newLength;\n    return arr1;\n}\n/**\n * Checks if an object is array-like.\n *\n * @category Static\n * @param item - Item to check.\n * @returns Indicates if the item is array-like.\n */\nfunction isArrayLike(item) {\n    if (Array.isArray(item)) {\n        return true;\n    }\n    if (typeof item !== 'object' ||\n        item === null ||\n        !('length' in item) ||\n        typeof item.length !== 'number' ||\n        item.length < 0) {\n        return false;\n    }\n    for (let i = 0; i < item.length; i++) {\n        if (!(i in item)) {\n            return false;\n        }\n    }\n    return true;\n}\n//# sourceMappingURL=static.js.map","/**\n * Checks if an object is a Cheerio instance.\n *\n * @category Utils\n * @param maybeCheerio - The object to check.\n * @returns Whether the object is a Cheerio instance.\n */\nexport function isCheerio(maybeCheerio) {\n    return maybeCheerio.cheerio != null;\n}\n/**\n * Convert a string to camel case notation.\n *\n * @private\n * @category Utils\n * @param str - The string to be converted.\n * @returns String in camel case notation.\n */\nexport function camelCase(str) {\n    return str.replace(/[._-](\\w|$)/g, (_, x) => x.toUpperCase());\n}\n/**\n * Convert a string from camel case to \"CSS case\", where word boundaries are\n * described by hyphens (\"-\") and all characters are lower-case.\n *\n * @private\n * @category Utils\n * @param str - The string to be converted.\n * @returns String in \"CSS case\".\n */\nexport function cssCase(str) {\n    return str.replace(/[A-Z]/g, '-$&').toLowerCase();\n}\n/**\n * Iterate over each DOM element without creating intermediary Cheerio\n * instances.\n *\n * This is indented for use internally to avoid otherwise unnecessary memory\n * pressure introduced by _make.\n *\n * @category Utils\n * @param array - The array to iterate over.\n * @param fn - Function to call.\n * @returns The original instance.\n */\nexport function domEach(array, fn) {\n    const len = array.length;\n    for (let i = 0; i < len; i++)\n        fn(array[i], i);\n    return array;\n}\nvar CharacterCodes;\n(function (CharacterCodes) {\n    CharacterCodes[CharacterCodes[\"LowerA\"] = 97] = \"LowerA\";\n    CharacterCodes[CharacterCodes[\"LowerZ\"] = 122] = \"LowerZ\";\n    CharacterCodes[CharacterCodes[\"UpperA\"] = 65] = \"UpperA\";\n    CharacterCodes[CharacterCodes[\"UpperZ\"] = 90] = \"UpperZ\";\n    CharacterCodes[CharacterCodes[\"Exclamation\"] = 33] = \"Exclamation\";\n})(CharacterCodes || (CharacterCodes = {}));\n/**\n * Check if string is HTML.\n *\n * Tests for a `<` within a string, immediate followed by a letter and\n * eventually followed by a `>`.\n *\n * @private\n * @category Utils\n * @param str - The string to check.\n * @returns Indicates if `str` is HTML.\n */\nexport function isHtml(str) {\n    const tagStart = str.indexOf('<');\n    if (tagStart < 0 || tagStart > str.length - 3)\n        return false;\n    const tagChar = str.charCodeAt(tagStart + 1);\n    return (((tagChar >= CharacterCodes.LowerA && tagChar <= CharacterCodes.LowerZ) ||\n        (tagChar >= CharacterCodes.UpperA && tagChar <= CharacterCodes.UpperZ) ||\n        tagChar === CharacterCodes.Exclamation) &&\n        str.includes('>', tagStart + 2));\n}\n//# sourceMappingURL=utils.js.map","import boolbase from \"boolbase\";\n/**\n * All reserved characters in a regex, used for escaping.\n *\n * Taken from XRegExp, (c) 2007-2020 Steven Levithan under the MIT license\n * https://github.com/slevithan/xregexp/blob/95eeebeb8fac8754d54eafe2b4743661ac1cf028/src/xregexp.js#L794\n */\nconst reChars = /[-[\\]{}()*+?.,\\\\^$|#\\s]/g;\nfunction escapeRegex(value) {\n    return value.replace(reChars, \"\\\\$&\");\n}\n/**\n * Attributes that are case-insensitive in HTML.\n *\n * @private\n * @see https://html.spec.whatwg.org/multipage/semantics-other.html#case-sensitivity-of-selectors\n */\nconst caseInsensitiveAttributes = new Set([\n    \"accept\",\n    \"accept-charset\",\n    \"align\",\n    \"alink\",\n    \"axis\",\n    \"bgcolor\",\n    \"charset\",\n    \"checked\",\n    \"clear\",\n    \"codetype\",\n    \"color\",\n    \"compact\",\n    \"declare\",\n    \"defer\",\n    \"dir\",\n    \"direction\",\n    \"disabled\",\n    \"enctype\",\n    \"face\",\n    \"frame\",\n    \"hreflang\",\n    \"http-equiv\",\n    \"lang\",\n    \"language\",\n    \"link\",\n    \"media\",\n    \"method\",\n    \"multiple\",\n    \"nohref\",\n    \"noresize\",\n    \"noshade\",\n    \"nowrap\",\n    \"readonly\",\n    \"rel\",\n    \"rev\",\n    \"rules\",\n    \"scope\",\n    \"scrolling\",\n    \"selected\",\n    \"shape\",\n    \"target\",\n    \"text\",\n    \"type\",\n    \"valign\",\n    \"valuetype\",\n    \"vlink\",\n]);\nfunction shouldIgnoreCase(selector, options) {\n    return typeof selector.ignoreCase === \"boolean\"\n        ? selector.ignoreCase\n        : selector.ignoreCase === \"quirks\"\n            ? !!options.quirksMode\n            : !options.xmlMode && caseInsensitiveAttributes.has(selector.name);\n}\n/**\n * Attribute selectors\n */\nexport const attributeRules = {\n    equals(next, data, options) {\n        const { adapter } = options;\n        const { name } = data;\n        let { value } = data;\n        if (shouldIgnoreCase(data, options)) {\n            value = value.toLowerCase();\n            return (elem) => {\n                const attr = adapter.getAttributeValue(elem, name);\n                return (attr != null &&\n                    attr.length === value.length &&\n                    attr.toLowerCase() === value &&\n                    next(elem));\n            };\n        }\n        return (elem) => adapter.getAttributeValue(elem, name) === value && next(elem);\n    },\n    hyphen(next, data, options) {\n        const { adapter } = options;\n        const { name } = data;\n        let { value } = data;\n        const len = value.length;\n        if (shouldIgnoreCase(data, options)) {\n            value = value.toLowerCase();\n            return function hyphenIC(elem) {\n                const attr = adapter.getAttributeValue(elem, name);\n                return (attr != null &&\n                    (attr.length === len || attr.charAt(len) === \"-\") &&\n                    attr.substr(0, len).toLowerCase() === value &&\n                    next(elem));\n            };\n        }\n        return function hyphen(elem) {\n            const attr = adapter.getAttributeValue(elem, name);\n            return (attr != null &&\n                (attr.length === len || attr.charAt(len) === \"-\") &&\n                attr.substr(0, len) === value &&\n                next(elem));\n        };\n    },\n    element(next, data, options) {\n        const { adapter } = options;\n        const { name, value } = data;\n        if (/\\s/.test(value)) {\n            return boolbase.falseFunc;\n        }\n        const regex = new RegExp(`(?:^|\\\\s)${escapeRegex(value)}(?:$|\\\\s)`, shouldIgnoreCase(data, options) ? \"i\" : \"\");\n        return function element(elem) {\n            const attr = adapter.getAttributeValue(elem, name);\n            return (attr != null &&\n                attr.length >= value.length &&\n                regex.test(attr) &&\n                next(elem));\n        };\n    },\n    exists(next, { name }, { adapter }) {\n        return (elem) => adapter.hasAttrib(elem, name) && next(elem);\n    },\n    start(next, data, options) {\n        const { adapter } = options;\n        const { name } = data;\n        let { value } = data;\n        const len = value.length;\n        if (len === 0) {\n            return boolbase.falseFunc;\n        }\n        if (shouldIgnoreCase(data, options)) {\n            value = value.toLowerCase();\n            return (elem) => {\n                const attr = adapter.getAttributeValue(elem, name);\n                return (attr != null &&\n                    attr.length >= len &&\n                    attr.substr(0, len).toLowerCase() === value &&\n                    next(elem));\n            };\n        }\n        return (elem) => {\n            var _a;\n            return !!((_a = adapter.getAttributeValue(elem, name)) === null || _a === void 0 ? void 0 : _a.startsWith(value)) &&\n                next(elem);\n        };\n    },\n    end(next, data, options) {\n        const { adapter } = options;\n        const { name } = data;\n        let { value } = data;\n        const len = -value.length;\n        if (len === 0) {\n            return boolbase.falseFunc;\n        }\n        if (shouldIgnoreCase(data, options)) {\n            value = value.toLowerCase();\n            return (elem) => {\n                var _a;\n                return ((_a = adapter\n                    .getAttributeValue(elem, name)) === null || _a === void 0 ? void 0 : _a.substr(len).toLowerCase()) === value && next(elem);\n            };\n        }\n        return (elem) => {\n            var _a;\n            return !!((_a = adapter.getAttributeValue(elem, name)) === null || _a === void 0 ? void 0 : _a.endsWith(value)) &&\n                next(elem);\n        };\n    },\n    any(next, data, options) {\n        const { adapter } = options;\n        const { name, value } = data;\n        if (value === \"\") {\n            return boolbase.falseFunc;\n        }\n        if (shouldIgnoreCase(data, options)) {\n            const regex = new RegExp(escapeRegex(value), \"i\");\n            return function anyIC(elem) {\n                const attr = adapter.getAttributeValue(elem, name);\n                return (attr != null &&\n                    attr.length >= value.length &&\n                    regex.test(attr) &&\n                    next(elem));\n            };\n        }\n        return (elem) => {\n            var _a;\n            return !!((_a = adapter.getAttributeValue(elem, name)) === null || _a === void 0 ? void 0 : _a.includes(value)) &&\n                next(elem);\n        };\n    },\n    not(next, data, options) {\n        const { adapter } = options;\n        const { name } = data;\n        let { value } = data;\n        if (value === \"\") {\n            return (elem) => !!adapter.getAttributeValue(elem, name) && next(elem);\n        }\n        else if (shouldIgnoreCase(data, options)) {\n            value = value.toLowerCase();\n            return (elem) => {\n                const attr = adapter.getAttributeValue(elem, name);\n                return ((attr == null ||\n                    attr.length !== value.length ||\n                    attr.toLowerCase() !== value) &&\n                    next(elem));\n            };\n        }\n        return (elem) => adapter.getAttributeValue(elem, name) !== value && next(elem);\n    },\n};\n//# sourceMappingURL=attributes.js.map","import { parse, SelectorType } from \"css-what\";\nimport boolbase from \"boolbase\";\nimport sortRules, { isTraversal } from \"./sort.js\";\nimport { compileGeneralSelector } from \"./general.js\";\nimport { ensureIsTag, PLACEHOLDER_ELEMENT, } from \"./pseudo-selectors/subselects.js\";\n/**\n * Compiles a selector to an executable function.\n *\n * @param selector Selector to compile.\n * @param options Compilation options.\n * @param context Optional context for the selector.\n */\nexport function compile(selector, options, context) {\n    const next = compileUnsafe(selector, options, context);\n    return ensureIsTag(next, options.adapter);\n}\nexport function compileUnsafe(selector, options, context) {\n    const token = typeof selector === \"string\" ? parse(selector) : selector;\n    return compileToken(token, options, context);\n}\nfunction includesScopePseudo(t) {\n    return (t.type === SelectorType.Pseudo &&\n        (t.name === \"scope\" ||\n            (Array.isArray(t.data) &&\n                t.data.some((data) => data.some(includesScopePseudo)))));\n}\nconst DESCENDANT_TOKEN = { type: SelectorType.Descendant };\nconst FLEXIBLE_DESCENDANT_TOKEN = {\n    type: \"_flexibleDescendant\",\n};\nconst SCOPE_TOKEN = {\n    type: SelectorType.Pseudo,\n    name: \"scope\",\n    data: null,\n};\n/*\n * CSS 4 Spec (Draft): 3.4.1. Absolutizing a Relative Selector\n * http://www.w3.org/TR/selectors4/#absolutizing\n */\nfunction absolutize(token, { adapter }, context) {\n    // TODO Use better check if the context is a document\n    const hasContext = !!(context === null || context === void 0 ? void 0 : context.every((e) => {\n        const parent = adapter.isTag(e) && adapter.getParent(e);\n        return e === PLACEHOLDER_ELEMENT || (parent && adapter.isTag(parent));\n    }));\n    for (const t of token) {\n        if (t.length > 0 &&\n            isTraversal(t[0]) &&\n            t[0].type !== SelectorType.Descendant) {\n            // Don't continue in else branch\n        }\n        else if (hasContext && !t.some(includesScopePseudo)) {\n            t.unshift(DESCENDANT_TOKEN);\n        }\n        else {\n            continue;\n        }\n        t.unshift(SCOPE_TOKEN);\n    }\n}\nexport function compileToken(token, options, context) {\n    var _a;\n    token.forEach(sortRules);\n    context = (_a = options.context) !== null && _a !== void 0 ? _a : context;\n    const isArrayContext = Array.isArray(context);\n    const finalContext = context && (Array.isArray(context) ? context : [context]);\n    // Check if the selector is relative\n    if (options.relativeSelector !== false) {\n        absolutize(token, options, finalContext);\n    }\n    else if (token.some((t) => t.length > 0 && isTraversal(t[0]))) {\n        throw new Error(\"Relative selectors are not allowed when the `relativeSelector` option is disabled\");\n    }\n    let shouldTestNextSiblings = false;\n    const query = token\n        .map((rules) => {\n        if (rules.length >= 2) {\n            const [first, second] = rules;\n            if (first.type !== SelectorType.Pseudo ||\n                first.name !== \"scope\") {\n                // Ignore\n            }\n            else if (isArrayContext &&\n                second.type === SelectorType.Descendant) {\n                rules[1] = FLEXIBLE_DESCENDANT_TOKEN;\n            }\n            else if (second.type === SelectorType.Adjacent ||\n                second.type === SelectorType.Sibling) {\n                shouldTestNextSiblings = true;\n            }\n        }\n        return compileRules(rules, options, finalContext);\n    })\n        .reduce(reduceRules, boolbase.falseFunc);\n    query.shouldTestNextSiblings = shouldTestNextSiblings;\n    return query;\n}\nfunction compileRules(rules, options, context) {\n    var _a;\n    return rules.reduce((previous, rule) => previous === boolbase.falseFunc\n        ? boolbase.falseFunc\n        : compileGeneralSelector(previous, rule, options, context, compileToken), (_a = options.rootFunc) !== null && _a !== void 0 ? _a : boolbase.trueFunc);\n}\nfunction reduceRules(a, b) {\n    if (b === boolbase.falseFunc || a === boolbase.trueFunc) {\n        return a;\n    }\n    if (a === boolbase.falseFunc || b === boolbase.trueFunc) {\n        return b;\n    }\n    return function combine(elem) {\n        return a(elem) || b(elem);\n    };\n}\n//# sourceMappingURL=compile.js.map","import { attributeRules } from \"./attributes.js\";\nimport { compilePseudoSelector } from \"./pseudo-selectors/index.js\";\nimport { SelectorType } from \"css-what\";\nfunction getElementParent(node, adapter) {\n    const parent = adapter.getParent(node);\n    if (parent && adapter.isTag(parent)) {\n        return parent;\n    }\n    return null;\n}\n/*\n * All available rules\n */\nexport function compileGeneralSelector(next, selector, options, context, compileToken) {\n    const { adapter, equals } = options;\n    switch (selector.type) {\n        case SelectorType.PseudoElement: {\n            throw new Error(\"Pseudo-elements are not supported by css-select\");\n        }\n        case SelectorType.ColumnCombinator: {\n            throw new Error(\"Column combinators are not yet supported by css-select\");\n        }\n        case SelectorType.Attribute: {\n            if (selector.namespace != null) {\n                throw new Error(\"Namespaced attributes are not yet supported by css-select\");\n            }\n            if (!options.xmlMode || options.lowerCaseAttributeNames) {\n                selector.name = selector.name.toLowerCase();\n            }\n            return attributeRules[selector.action](next, selector, options);\n        }\n        case SelectorType.Pseudo: {\n            return compilePseudoSelector(next, selector, options, context, compileToken);\n        }\n        // Tags\n        case SelectorType.Tag: {\n            if (selector.namespace != null) {\n                throw new Error(\"Namespaced tag names are not yet supported by css-select\");\n            }\n            let { name } = selector;\n            if (!options.xmlMode || options.lowerCaseTags) {\n                name = name.toLowerCase();\n            }\n            return function tag(elem) {\n                return adapter.getName(elem) === name && next(elem);\n            };\n        }\n        // Traversal\n        case SelectorType.Descendant: {\n            if (options.cacheResults === false ||\n                typeof WeakSet === \"undefined\") {\n                return function descendant(elem) {\n                    let current = elem;\n                    while ((current = getElementParent(current, adapter))) {\n                        if (next(current)) {\n                            return true;\n                        }\n                    }\n                    return false;\n                };\n            }\n            // @ts-expect-error `ElementNode` is not extending object\n            const isFalseCache = new WeakSet();\n            return function cachedDescendant(elem) {\n                let current = elem;\n                while ((current = getElementParent(current, adapter))) {\n                    if (!isFalseCache.has(current)) {\n                        if (adapter.isTag(current) && next(current)) {\n                            return true;\n                        }\n                        isFalseCache.add(current);\n                    }\n                }\n                return false;\n            };\n        }\n        case \"_flexibleDescendant\": {\n            // Include element itself, only used while querying an array\n            return function flexibleDescendant(elem) {\n                let current = elem;\n                do {\n                    if (next(current))\n                        return true;\n                } while ((current = getElementParent(current, adapter)));\n                return false;\n            };\n        }\n        case SelectorType.Parent: {\n            return function parent(elem) {\n                return adapter\n                    .getChildren(elem)\n                    .some((elem) => adapter.isTag(elem) && next(elem));\n            };\n        }\n        case SelectorType.Child: {\n            return function child(elem) {\n                const parent = adapter.getParent(elem);\n                return parent != null && adapter.isTag(parent) && next(parent);\n            };\n        }\n        case SelectorType.Sibling: {\n            return function sibling(elem) {\n                const siblings = adapter.getSiblings(elem);\n                for (let i = 0; i < siblings.length; i++) {\n                    const currentSibling = siblings[i];\n                    if (equals(elem, currentSibling))\n                        break;\n                    if (adapter.isTag(currentSibling) && next(currentSibling)) {\n                        return true;\n                    }\n                }\n                return false;\n            };\n        }\n        case SelectorType.Adjacent: {\n            if (adapter.prevElementSibling) {\n                return function adjacent(elem) {\n                    const previous = adapter.prevElementSibling(elem);\n                    return previous != null && next(previous);\n                };\n            }\n            return function adjacent(elem) {\n                const siblings = adapter.getSiblings(elem);\n                let lastElement;\n                for (let i = 0; i < siblings.length; i++) {\n                    const currentSibling = siblings[i];\n                    if (equals(elem, currentSibling))\n                        break;\n                    if (adapter.isTag(currentSibling)) {\n                        lastElement = currentSibling;\n                    }\n                }\n                return !!lastElement && next(lastElement);\n            };\n        }\n        case SelectorType.Universal: {\n            if (selector.namespace != null && selector.namespace !== \"*\") {\n                throw new Error(\"Namespaced universal selectors are not yet supported by css-select\");\n            }\n            return next;\n        }\n    }\n}\n//# sourceMappingURL=general.js.map","import * as DomUtils from \"domutils\";\nimport boolbase from \"boolbase\";\nimport { compile as compileRaw, compileUnsafe, compileToken, } from \"./compile.js\";\nimport { getNextSiblings } from \"./pseudo-selectors/subselects.js\";\nconst defaultEquals = (a, b) => a === b;\nconst defaultOptions = {\n    adapter: DomUtils,\n    equals: defaultEquals,\n};\nfunction convertOptionFormats(options) {\n    var _a, _b, _c, _d;\n    /*\n     * We force one format of options to the other one.\n     */\n    // @ts-expect-error Default options may have incompatible `Node` / `ElementNode`.\n    const opts = options !== null && options !== void 0 ? options : defaultOptions;\n    // @ts-expect-error Same as above.\n    (_a = opts.adapter) !== null && _a !== void 0 ? _a : (opts.adapter = DomUtils);\n    // @ts-expect-error `equals` does not exist on `Options`\n    (_b = opts.equals) !== null && _b !== void 0 ? _b : (opts.equals = (_d = (_c = opts.adapter) === null || _c === void 0 ? void 0 : _c.equals) !== null && _d !== void 0 ? _d : defaultEquals);\n    return opts;\n}\nfunction wrapCompile(func) {\n    return function addAdapter(selector, options, context) {\n        const opts = convertOptionFormats(options);\n        return func(selector, opts, context);\n    };\n}\n/**\n * Compiles the query, returns a function.\n */\nexport const compile = wrapCompile(compileRaw);\nexport const _compileUnsafe = wrapCompile(compileUnsafe);\nexport const _compileToken = wrapCompile(compileToken);\nfunction getSelectorFunc(searchFunc) {\n    return function select(query, elements, options) {\n        const opts = convertOptionFormats(options);\n        if (typeof query !== \"function\") {\n            query = compileUnsafe(query, opts, elements);\n        }\n        const filteredElements = prepareContext(elements, opts.adapter, query.shouldTestNextSiblings);\n        return searchFunc(query, filteredElements, opts);\n    };\n}\nexport function prepareContext(elems, adapter, shouldTestNextSiblings = false) {\n    /*\n     * Add siblings if the query requires them.\n     * See https://github.com/fb55/css-select/pull/43#issuecomment-225414692\n     */\n    if (shouldTestNextSiblings) {\n        elems = appendNextSiblings(elems, adapter);\n    }\n    return Array.isArray(elems)\n        ? adapter.removeSubsets(elems)\n        : adapter.getChildren(elems);\n}\nfunction appendNextSiblings(elem, adapter) {\n    // Order matters because jQuery seems to check the children before the siblings\n    const elems = Array.isArray(elem) ? elem.slice(0) : [elem];\n    const elemsLength = elems.length;\n    for (let i = 0; i < elemsLength; i++) {\n        const nextSiblings = getNextSiblings(elems[i], adapter);\n        elems.push(...nextSiblings);\n    }\n    return elems;\n}\n/**\n * @template Node The generic Node type for the DOM adapter being used.\n * @template ElementNode The Node type for elements for the DOM adapter being used.\n * @param elems Elements to query. If it is an element, its children will be queried..\n * @param query can be either a CSS selector string or a compiled query function.\n * @param [options] options for querying the document.\n * @see compile for supported selector queries.\n * @returns All matching elements.\n *\n */\nexport const selectAll = getSelectorFunc((query, elems, options) => query === boolbase.falseFunc || !elems || elems.length === 0\n    ? []\n    : options.adapter.findAll(query, elems));\n/**\n * @template Node The generic Node type for the DOM adapter being used.\n * @template ElementNode The Node type for elements for the DOM adapter being used.\n * @param elems Elements to query. If it is an element, its children will be queried..\n * @param query can be either a CSS selector string or a compiled query function.\n * @param [options] options for querying the document.\n * @see compile for supported selector queries.\n * @returns the first match, or null if there was no match.\n */\nexport const selectOne = getSelectorFunc((query, elems, options) => query === boolbase.falseFunc || !elems || elems.length === 0\n    ? null\n    : options.adapter.findOne(query, elems));\n/**\n * Tests whether or not an element is matched by query.\n *\n * @template Node The generic Node type for the DOM adapter being used.\n * @template ElementNode The Node type for elements for the DOM adapter being used.\n * @param elem The element to test if it matches the query.\n * @param query can be either a CSS selector string or a compiled query function.\n * @param [options] options for querying the document.\n * @see compile for supported selector queries.\n * @returns\n */\nexport function is(elem, query, options) {\n    const opts = convertOptionFormats(options);\n    return (typeof query === \"function\" ? query : compileRaw(query, opts))(elem);\n}\n/**\n * Alias for selectAll(query, elems, options).\n * @see [compile] for supported selector queries.\n */\nexport default selectAll;\n// Export filters, pseudos and aliases to allow users to supply their own.\n/** @deprecated Use the `pseudos` option instead. */\nexport { filters, pseudos, aliases } from \"./pseudo-selectors/index.js\";\n//# sourceMappingURL=index.js.map","/**\n * Aliases are pseudos that are expressed as selectors.\n */\nexport const aliases = {\n    // Links\n    \"any-link\": \":is(a, area, link)[href]\",\n    link: \":any-link:not(:visited)\",\n    // Forms\n    // https://html.spec.whatwg.org/multipage/scripting.html#disabled-elements\n    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    )`,\n    enabled: \":not(:disabled)\",\n    checked: \":is(:is(input[type=radio], input[type=checkbox])[checked], option:selected)\",\n    required: \":is(input, select, textarea)[required]\",\n    optional: \":is(input, select, textarea):not([required])\",\n    // JQuery extensions\n    // https://html.spec.whatwg.org/multipage/form-elements.html#concept-option-selectedness\n    selected: \"option:is([selected], select:not([multiple]):not(:has(> option[selected])) > :first-of-type)\",\n    checkbox: \"[type=checkbox]\",\n    file: \"[type=file]\",\n    password: \"[type=password]\",\n    radio: \"[type=radio]\",\n    reset: \"[type=reset]\",\n    image: \"[type=image]\",\n    submit: \"[type=submit]\",\n    parent: \":not(:empty)\",\n    header: \":is(h1, h2, h3, h4, h5, h6)\",\n    button: \":is(button, input[type=button])\",\n    input: \":is(input, textarea, select, button)\",\n    text: \"input:is(:not([type!='']), [type=text])\",\n};\n//# sourceMappingURL=aliases.js.map","import getNCheck from \"nth-check\";\nimport boolbase from \"boolbase\";\nfunction getChildFunc(next, adapter) {\n    return (elem) => {\n        const parent = adapter.getParent(elem);\n        return parent != null && adapter.isTag(parent) && next(elem);\n    };\n}\nexport const filters = {\n    contains(next, text, { adapter }) {\n        return function contains(elem) {\n            return next(elem) && adapter.getText(elem).includes(text);\n        };\n    },\n    icontains(next, text, { adapter }) {\n        const itext = text.toLowerCase();\n        return function icontains(elem) {\n            return (next(elem) &&\n                adapter.getText(elem).toLowerCase().includes(itext));\n        };\n    },\n    // Location specific methods\n    \"nth-child\"(next, rule, { adapter, equals }) {\n        const func = getNCheck(rule);\n        if (func === boolbase.falseFunc)\n            return boolbase.falseFunc;\n        if (func === boolbase.trueFunc)\n            return getChildFunc(next, adapter);\n        return function nthChild(elem) {\n            const siblings = adapter.getSiblings(elem);\n            let pos = 0;\n            for (let i = 0; i < siblings.length; i++) {\n                if (equals(elem, siblings[i]))\n                    break;\n                if (adapter.isTag(siblings[i])) {\n                    pos++;\n                }\n            }\n            return func(pos) && next(elem);\n        };\n    },\n    \"nth-last-child\"(next, rule, { adapter, equals }) {\n        const func = getNCheck(rule);\n        if (func === boolbase.falseFunc)\n            return boolbase.falseFunc;\n        if (func === boolbase.trueFunc)\n            return getChildFunc(next, adapter);\n        return function nthLastChild(elem) {\n            const siblings = adapter.getSiblings(elem);\n            let pos = 0;\n            for (let i = siblings.length - 1; i >= 0; i--) {\n                if (equals(elem, siblings[i]))\n                    break;\n                if (adapter.isTag(siblings[i])) {\n                    pos++;\n                }\n            }\n            return func(pos) && next(elem);\n        };\n    },\n    \"nth-of-type\"(next, rule, { adapter, equals }) {\n        const func = getNCheck(rule);\n        if (func === boolbase.falseFunc)\n            return boolbase.falseFunc;\n        if (func === boolbase.trueFunc)\n            return getChildFunc(next, adapter);\n        return function nthOfType(elem) {\n            const siblings = adapter.getSiblings(elem);\n            let pos = 0;\n            for (let i = 0; i < siblings.length; i++) {\n                const currentSibling = siblings[i];\n                if (equals(elem, currentSibling))\n                    break;\n                if (adapter.isTag(currentSibling) &&\n                    adapter.getName(currentSibling) === adapter.getName(elem)) {\n                    pos++;\n                }\n            }\n            return func(pos) && next(elem);\n        };\n    },\n    \"nth-last-of-type\"(next, rule, { adapter, equals }) {\n        const func = getNCheck(rule);\n        if (func === boolbase.falseFunc)\n            return boolbase.falseFunc;\n        if (func === boolbase.trueFunc)\n            return getChildFunc(next, adapter);\n        return function nthLastOfType(elem) {\n            const siblings = adapter.getSiblings(elem);\n            let pos = 0;\n            for (let i = siblings.length - 1; i >= 0; i--) {\n                const currentSibling = siblings[i];\n                if (equals(elem, currentSibling))\n                    break;\n                if (adapter.isTag(currentSibling) &&\n                    adapter.getName(currentSibling) === adapter.getName(elem)) {\n                    pos++;\n                }\n            }\n            return func(pos) && next(elem);\n        };\n    },\n    // TODO determine the actual root element\n    root(next, _rule, { adapter }) {\n        return (elem) => {\n            const parent = adapter.getParent(elem);\n            return (parent == null || !adapter.isTag(parent)) && next(elem);\n        };\n    },\n    scope(next, rule, options, context) {\n        const { equals } = options;\n        if (!context || context.length === 0) {\n            // Equivalent to :root\n            return filters[\"root\"](next, rule, options);\n        }\n        if (context.length === 1) {\n            // NOTE: can't be unpacked, as :has uses this for side-effects\n            return (elem) => equals(context[0], elem) && next(elem);\n        }\n        return (elem) => context.includes(elem) && next(elem);\n    },\n    hover: dynamicStatePseudo(\"isHovered\"),\n    visited: dynamicStatePseudo(\"isVisited\"),\n    active: dynamicStatePseudo(\"isActive\"),\n};\n/**\n * Dynamic state pseudos. These depend on optional Adapter methods.\n *\n * @param name The name of the adapter method to call.\n * @returns Pseudo for the `filters` object.\n */\nfunction dynamicStatePseudo(name) {\n    return function dynamicPseudo(next, _rule, { adapter }) {\n        const func = adapter[name];\n        if (typeof func !== \"function\") {\n            return boolbase.falseFunc;\n        }\n        return function active(elem) {\n            return func(elem) && next(elem);\n        };\n    };\n}\n//# sourceMappingURL=filters.js.map","import { parse } from \"css-what\";\nimport { filters } from \"./filters.js\";\nimport { pseudos, verifyPseudoArgs } from \"./pseudos.js\";\nimport { aliases } from \"./aliases.js\";\nimport { subselects } from \"./subselects.js\";\nexport { filters, pseudos, aliases };\nexport function compilePseudoSelector(next, selector, options, context, compileToken) {\n    var _a;\n    const { name, data } = selector;\n    if (Array.isArray(data)) {\n        if (!(name in subselects)) {\n            throw new Error(`Unknown pseudo-class :${name}(${data})`);\n        }\n        return subselects[name](next, data, options, context, compileToken);\n    }\n    const userPseudo = (_a = options.pseudos) === null || _a === void 0 ? void 0 : _a[name];\n    const stringPseudo = typeof userPseudo === \"string\" ? userPseudo : aliases[name];\n    if (typeof stringPseudo === \"string\") {\n        if (data != null) {\n            throw new Error(`Pseudo ${name} doesn't have any arguments`);\n        }\n        // The alias has to be parsed here, to make sure options are respected.\n        const alias = parse(stringPseudo);\n        return subselects[\"is\"](next, alias, options, context, compileToken);\n    }\n    if (typeof userPseudo === \"function\") {\n        verifyPseudoArgs(userPseudo, name, data, 1);\n        return (elem) => userPseudo(elem, data) && next(elem);\n    }\n    if (name in filters) {\n        return filters[name](next, data, options, context);\n    }\n    if (name in pseudos) {\n        const pseudo = pseudos[name];\n        verifyPseudoArgs(pseudo, name, data, 2);\n        return (elem) => pseudo(elem, options, data) && next(elem);\n    }\n    throw new Error(`Unknown pseudo-class :${name}`);\n}\n//# sourceMappingURL=index.js.map","// While filters are precompiled, pseudos get called when they are needed\nexport const pseudos = {\n    empty(elem, { adapter }) {\n        return !adapter.getChildren(elem).some((elem) => \n        // FIXME: `getText` call is potentially expensive.\n        adapter.isTag(elem) || adapter.getText(elem) !== \"\");\n    },\n    \"first-child\"(elem, { adapter, equals }) {\n        if (adapter.prevElementSibling) {\n            return adapter.prevElementSibling(elem) == null;\n        }\n        const firstChild = adapter\n            .getSiblings(elem)\n            .find((elem) => adapter.isTag(elem));\n        return firstChild != null && equals(elem, firstChild);\n    },\n    \"last-child\"(elem, { adapter, equals }) {\n        const siblings = adapter.getSiblings(elem);\n        for (let i = siblings.length - 1; i >= 0; i--) {\n            if (equals(elem, siblings[i]))\n                return true;\n            if (adapter.isTag(siblings[i]))\n                break;\n        }\n        return false;\n    },\n    \"first-of-type\"(elem, { adapter, equals }) {\n        const siblings = adapter.getSiblings(elem);\n        const elemName = adapter.getName(elem);\n        for (let i = 0; i < siblings.length; i++) {\n            const currentSibling = siblings[i];\n            if (equals(elem, currentSibling))\n                return true;\n            if (adapter.isTag(currentSibling) &&\n                adapter.getName(currentSibling) === elemName) {\n                break;\n            }\n        }\n        return false;\n    },\n    \"last-of-type\"(elem, { adapter, equals }) {\n        const siblings = adapter.getSiblings(elem);\n        const elemName = adapter.getName(elem);\n        for (let i = siblings.length - 1; i >= 0; i--) {\n            const currentSibling = siblings[i];\n            if (equals(elem, currentSibling))\n                return true;\n            if (adapter.isTag(currentSibling) &&\n                adapter.getName(currentSibling) === elemName) {\n                break;\n            }\n        }\n        return false;\n    },\n    \"only-of-type\"(elem, { adapter, equals }) {\n        const elemName = adapter.getName(elem);\n        return adapter\n            .getSiblings(elem)\n            .every((sibling) => equals(elem, sibling) ||\n            !adapter.isTag(sibling) ||\n            adapter.getName(sibling) !== elemName);\n    },\n    \"only-child\"(elem, { adapter, equals }) {\n        return adapter\n            .getSiblings(elem)\n            .every((sibling) => equals(elem, sibling) || !adapter.isTag(sibling));\n    },\n};\nexport function verifyPseudoArgs(func, name, subselect, argIndex) {\n    if (subselect === null) {\n        if (func.length > argIndex) {\n            throw new Error(`Pseudo-class :${name} requires an argument`);\n        }\n    }\n    else if (func.length === argIndex) {\n        throw new Error(`Pseudo-class :${name} doesn't have any arguments`);\n    }\n}\n//# sourceMappingURL=pseudos.js.map","import boolbase from \"boolbase\";\nimport { isTraversal } from \"../sort.js\";\n/** Used as a placeholder for :has. Will be replaced with the actual element. */\nexport const PLACEHOLDER_ELEMENT = {};\nexport function ensureIsTag(next, adapter) {\n    if (next === boolbase.falseFunc)\n        return boolbase.falseFunc;\n    return (elem) => adapter.isTag(elem) && next(elem);\n}\nexport function getNextSiblings(elem, adapter) {\n    const siblings = adapter.getSiblings(elem);\n    if (siblings.length <= 1)\n        return [];\n    const elemIndex = siblings.indexOf(elem);\n    if (elemIndex < 0 || elemIndex === siblings.length - 1)\n        return [];\n    return siblings.slice(elemIndex + 1).filter(adapter.isTag);\n}\nfunction copyOptions(options) {\n    // Not copied: context, rootFunc\n    return {\n        xmlMode: !!options.xmlMode,\n        lowerCaseAttributeNames: !!options.lowerCaseAttributeNames,\n        lowerCaseTags: !!options.lowerCaseTags,\n        quirksMode: !!options.quirksMode,\n        cacheResults: !!options.cacheResults,\n        pseudos: options.pseudos,\n        adapter: options.adapter,\n        equals: options.equals,\n    };\n}\nconst is = (next, token, options, context, compileToken) => {\n    const func = compileToken(token, copyOptions(options), context);\n    return func === boolbase.trueFunc\n        ? next\n        : func === boolbase.falseFunc\n            ? boolbase.falseFunc\n            : (elem) => func(elem) && next(elem);\n};\n/*\n * :not, :has, :is, :matches and :where have to compile selectors\n * doing this in src/pseudos.ts would lead to circular dependencies,\n * so we add them here\n */\nexport const subselects = {\n    is,\n    /**\n     * `:matches` and `:where` are aliases for `:is`.\n     */\n    matches: is,\n    where: is,\n    not(next, token, options, context, compileToken) {\n        const func = compileToken(token, copyOptions(options), context);\n        return func === boolbase.falseFunc\n            ? next\n            : func === boolbase.trueFunc\n                ? boolbase.falseFunc\n                : (elem) => !func(elem) && next(elem);\n    },\n    has(next, subselect, options, _context, compileToken) {\n        const { adapter } = options;\n        const opts = copyOptions(options);\n        opts.relativeSelector = true;\n        const context = subselect.some((s) => s.some(isTraversal))\n            ? // Used as a placeholder. Will be replaced with the actual element.\n                [PLACEHOLDER_ELEMENT]\n            : undefined;\n        const compiled = compileToken(subselect, opts, context);\n        if (compiled === boolbase.falseFunc)\n            return boolbase.falseFunc;\n        const hasElement = ensureIsTag(compiled, adapter);\n        // If `compiled` is `trueFunc`, we can skip this.\n        if (context && compiled !== boolbase.trueFunc) {\n            /*\n             * `shouldTestNextSiblings` will only be true if the query starts with\n             * a traversal (sibling or adjacent). That means we will always have a context.\n             */\n            const { shouldTestNextSiblings = false } = compiled;\n            return (elem) => {\n                if (!next(elem))\n                    return false;\n                context[0] = elem;\n                const childs = adapter.getChildren(elem);\n                const nextElements = shouldTestNextSiblings\n                    ? [...childs, ...getNextSiblings(elem, adapter)]\n                    : childs;\n                return adapter.existsOne(hasElement, nextElements);\n            };\n        }\n        return (elem) => next(elem) &&\n            adapter.existsOne(hasElement, adapter.getChildren(elem));\n    },\n};\n//# sourceMappingURL=subselects.js.map","import { AttributeAction, SelectorType } from \"css-what\";\nconst procedure = new Map([\n    [SelectorType.Universal, 50],\n    [SelectorType.Tag, 30],\n    [SelectorType.Attribute, 1],\n    [SelectorType.Pseudo, 0],\n]);\nexport function isTraversal(token) {\n    return !procedure.has(token.type);\n}\nconst attributes = new Map([\n    [AttributeAction.Exists, 10],\n    [AttributeAction.Equals, 8],\n    [AttributeAction.Not, 7],\n    [AttributeAction.Start, 6],\n    [AttributeAction.End, 6],\n    [AttributeAction.Any, 5],\n]);\n/**\n * Sort the parts of the passed selector,\n * as there is potential for optimization\n * (some types of selectors are faster than others)\n *\n * @param arr Selector to sort\n */\nexport default function sortByProcedure(arr) {\n    const procs = arr.map(getProcedure);\n    for (let i = 1; i < arr.length; i++) {\n        const procNew = procs[i];\n        if (procNew < 0)\n            continue;\n        for (let j = i - 1; j >= 0 && procNew < procs[j]; j--) {\n            const token = arr[j + 1];\n            arr[j + 1] = arr[j];\n            arr[j] = token;\n            procs[j + 1] = procs[j];\n            procs[j] = procNew;\n        }\n    }\n}\nfunction getProcedure(token) {\n    var _a, _b;\n    let proc = (_a = procedure.get(token.type)) !== null && _a !== void 0 ? _a : -1;\n    if (token.type === SelectorType.Attribute) {\n        proc = (_b = attributes.get(token.action)) !== null && _b !== void 0 ? _b : 4;\n        if (token.action === AttributeAction.Equals && token.name === \"id\") {\n            // Prefer ID selectors (eg. #ID)\n            proc = 9;\n        }\n        if (token.ignoreCase) {\n            /*\n             * IgnoreCase adds some overhead, prefer \"normal\" token\n             * this is a binary operation, to ensure it's still an int\n             */\n            proc >>= 1;\n        }\n    }\n    else if (token.type === SelectorType.Pseudo) {\n        if (!token.data) {\n            proc = 3;\n        }\n        else if (token.name === \"has\" || token.name === \"contains\") {\n            proc = 0; // Expensive in any case\n        }\n        else if (Array.isArray(token.data)) {\n            // Eg. :matches, :not\n            proc = Math.min(...token.data.map((d) => Math.min(...d.map(getProcedure))));\n            // If we have traversals, try to avoid executing this selector\n            if (proc < 0) {\n                proc = 0;\n            }\n        }\n        else {\n            proc = 2;\n        }\n    }\n    return proc;\n}\n//# sourceMappingURL=sort.js.map","import { SelectorType, AttributeAction, } from \"./types\";\nconst reName = /^[^\\\\#]?(?:\\\\(?:[\\da-f]{1,6}\\s?|.)|[\\w\\-\\u00b0-\\uFFFF])+/;\nconst reEscape = /\\\\([\\da-f]{1,6}\\s?|(\\s)|.)/gi;\nconst actionTypes = new Map([\n    [126 /* Tilde */, AttributeAction.Element],\n    [94 /* Circumflex */, AttributeAction.Start],\n    [36 /* Dollar */, AttributeAction.End],\n    [42 /* Asterisk */, AttributeAction.Any],\n    [33 /* ExclamationMark */, AttributeAction.Not],\n    [124 /* Pipe */, AttributeAction.Hyphen],\n]);\n// Pseudos, whose data property is parsed as well.\nconst unpackPseudos = new Set([\n    \"has\",\n    \"not\",\n    \"matches\",\n    \"is\",\n    \"where\",\n    \"host\",\n    \"host-context\",\n]);\n/**\n * Checks whether a specific selector is a traversal.\n * This is useful eg. in swapping the order of elements that\n * are not traversals.\n *\n * @param selector Selector to check.\n */\nexport function isTraversal(selector) {\n    switch (selector.type) {\n        case SelectorType.Adjacent:\n        case SelectorType.Child:\n        case SelectorType.Descendant:\n        case SelectorType.Parent:\n        case SelectorType.Sibling:\n        case SelectorType.ColumnCombinator:\n            return true;\n        default:\n            return false;\n    }\n}\nconst stripQuotesFromPseudos = new Set([\"contains\", \"icontains\"]);\n// Unescape function taken from https://github.com/jquery/sizzle/blob/master/src/sizzle.js#L152\nfunction funescape(_, escaped, escapedWhitespace) {\n    const high = parseInt(escaped, 16) - 0x10000;\n    // NaN means non-codepoint\n    return high !== high || escapedWhitespace\n        ? escaped\n        : high < 0\n            ? // BMP codepoint\n                String.fromCharCode(high + 0x10000)\n            : // Supplemental Plane codepoint (surrogate pair)\n                String.fromCharCode((high >> 10) | 0xd800, (high & 0x3ff) | 0xdc00);\n}\nfunction unescapeCSS(str) {\n    return str.replace(reEscape, funescape);\n}\nfunction isQuote(c) {\n    return c === 39 /* SingleQuote */ || c === 34 /* DoubleQuote */;\n}\nfunction isWhitespace(c) {\n    return (c === 32 /* Space */ ||\n        c === 9 /* Tab */ ||\n        c === 10 /* NewLine */ ||\n        c === 12 /* FormFeed */ ||\n        c === 13 /* CarriageReturn */);\n}\n/**\n * Parses `selector`, optionally with the passed `options`.\n *\n * @param selector Selector to parse.\n * @param options Options for parsing.\n * @returns Returns a two-dimensional array.\n * The first dimension represents selectors separated by commas (eg. `sub1, sub2`),\n * the second contains the relevant tokens for that selector.\n */\nexport function parse(selector) {\n    const subselects = [];\n    const endIndex = parseSelector(subselects, `${selector}`, 0);\n    if (endIndex < selector.length) {\n        throw new Error(`Unmatched selector: ${selector.slice(endIndex)}`);\n    }\n    return subselects;\n}\nfunction parseSelector(subselects, selector, selectorIndex) {\n    let tokens = [];\n    function getName(offset) {\n        const match = selector.slice(selectorIndex + offset).match(reName);\n        if (!match) {\n            throw new Error(`Expected name, found ${selector.slice(selectorIndex)}`);\n        }\n        const [name] = match;\n        selectorIndex += offset + name.length;\n        return unescapeCSS(name);\n    }\n    function stripWhitespace(offset) {\n        selectorIndex += offset;\n        while (selectorIndex < selector.length &&\n            isWhitespace(selector.charCodeAt(selectorIndex))) {\n            selectorIndex++;\n        }\n    }\n    function readValueWithParenthesis() {\n        selectorIndex += 1;\n        const start = selectorIndex;\n        let counter = 1;\n        for (; counter > 0 && selectorIndex < selector.length; selectorIndex++) {\n            if (selector.charCodeAt(selectorIndex) ===\n                40 /* LeftParenthesis */ &&\n                !isEscaped(selectorIndex)) {\n                counter++;\n            }\n            else if (selector.charCodeAt(selectorIndex) ===\n                41 /* RightParenthesis */ &&\n                !isEscaped(selectorIndex)) {\n                counter--;\n            }\n        }\n        if (counter) {\n            throw new Error(\"Parenthesis not matched\");\n        }\n        return unescapeCSS(selector.slice(start, selectorIndex - 1));\n    }\n    function isEscaped(pos) {\n        let slashCount = 0;\n        while (selector.charCodeAt(--pos) === 92 /* BackSlash */)\n            slashCount++;\n        return (slashCount & 1) === 1;\n    }\n    function ensureNotTraversal() {\n        if (tokens.length > 0 && isTraversal(tokens[tokens.length - 1])) {\n            throw new Error(\"Did not expect successive traversals.\");\n        }\n    }\n    function addTraversal(type) {\n        if (tokens.length > 0 &&\n            tokens[tokens.length - 1].type === SelectorType.Descendant) {\n            tokens[tokens.length - 1].type = type;\n            return;\n        }\n        ensureNotTraversal();\n        tokens.push({ type });\n    }\n    function addSpecialAttribute(name, action) {\n        tokens.push({\n            type: SelectorType.Attribute,\n            name,\n            action,\n            value: getName(1),\n            namespace: null,\n            ignoreCase: \"quirks\",\n        });\n    }\n    /**\n     * We have finished parsing the current part of the selector.\n     *\n     * Remove descendant tokens at the end if they exist,\n     * and return the last index, so that parsing can be\n     * picked up from here.\n     */\n    function finalizeSubselector() {\n        if (tokens.length &&\n            tokens[tokens.length - 1].type === SelectorType.Descendant) {\n            tokens.pop();\n        }\n        if (tokens.length === 0) {\n            throw new Error(\"Empty sub-selector\");\n        }\n        subselects.push(tokens);\n    }\n    stripWhitespace(0);\n    if (selector.length === selectorIndex) {\n        return selectorIndex;\n    }\n    loop: while (selectorIndex < selector.length) {\n        const firstChar = selector.charCodeAt(selectorIndex);\n        switch (firstChar) {\n            // Whitespace\n            case 32 /* Space */:\n            case 9 /* Tab */:\n            case 10 /* NewLine */:\n            case 12 /* FormFeed */:\n            case 13 /* CarriageReturn */: {\n                if (tokens.length === 0 ||\n                    tokens[0].type !== SelectorType.Descendant) {\n                    ensureNotTraversal();\n                    tokens.push({ type: SelectorType.Descendant });\n                }\n                stripWhitespace(1);\n                break;\n            }\n            // Traversals\n            case 62 /* GreaterThan */: {\n                addTraversal(SelectorType.Child);\n                stripWhitespace(1);\n                break;\n            }\n            case 60 /* LessThan */: {\n                addTraversal(SelectorType.Parent);\n                stripWhitespace(1);\n                break;\n            }\n            case 126 /* Tilde */: {\n                addTraversal(SelectorType.Sibling);\n                stripWhitespace(1);\n                break;\n            }\n            case 43 /* Plus */: {\n                addTraversal(SelectorType.Adjacent);\n                stripWhitespace(1);\n                break;\n            }\n            // Special attribute selectors: .class, #id\n            case 46 /* Period */: {\n                addSpecialAttribute(\"class\", AttributeAction.Element);\n                break;\n            }\n            case 35 /* Hash */: {\n                addSpecialAttribute(\"id\", AttributeAction.Equals);\n                break;\n            }\n            case 91 /* LeftSquareBracket */: {\n                stripWhitespace(1);\n                // Determine attribute name and namespace\n                let name;\n                let namespace = null;\n                if (selector.charCodeAt(selectorIndex) === 124 /* Pipe */) {\n                    // Equivalent to no namespace\n                    name = getName(1);\n                }\n                else if (selector.startsWith(\"*|\", selectorIndex)) {\n                    namespace = \"*\";\n                    name = getName(2);\n                }\n                else {\n                    name = getName(0);\n                    if (selector.charCodeAt(selectorIndex) === 124 /* Pipe */ &&\n                        selector.charCodeAt(selectorIndex + 1) !==\n                            61 /* Equal */) {\n                        namespace = name;\n                        name = getName(1);\n                    }\n                }\n                stripWhitespace(0);\n                // Determine comparison operation\n                let action = AttributeAction.Exists;\n                const possibleAction = actionTypes.get(selector.charCodeAt(selectorIndex));\n                if (possibleAction) {\n                    action = possibleAction;\n                    if (selector.charCodeAt(selectorIndex + 1) !==\n                        61 /* Equal */) {\n                        throw new Error(\"Expected `=`\");\n                    }\n                    stripWhitespace(2);\n                }\n                else if (selector.charCodeAt(selectorIndex) === 61 /* Equal */) {\n                    action = AttributeAction.Equals;\n                    stripWhitespace(1);\n                }\n                // Determine value\n                let value = \"\";\n                let ignoreCase = null;\n                if (action !== \"exists\") {\n                    if (isQuote(selector.charCodeAt(selectorIndex))) {\n                        const quote = selector.charCodeAt(selectorIndex);\n                        let sectionEnd = selectorIndex + 1;\n                        while (sectionEnd < selector.length &&\n                            (selector.charCodeAt(sectionEnd) !== quote ||\n                                isEscaped(sectionEnd))) {\n                            sectionEnd += 1;\n                        }\n                        if (selector.charCodeAt(sectionEnd) !== quote) {\n                            throw new Error(\"Attribute value didn't end\");\n                        }\n                        value = unescapeCSS(selector.slice(selectorIndex + 1, sectionEnd));\n                        selectorIndex = sectionEnd + 1;\n                    }\n                    else {\n                        const valueStart = selectorIndex;\n                        while (selectorIndex < selector.length &&\n                            ((!isWhitespace(selector.charCodeAt(selectorIndex)) &&\n                                selector.charCodeAt(selectorIndex) !==\n                                    93 /* RightSquareBracket */) ||\n                                isEscaped(selectorIndex))) {\n                            selectorIndex += 1;\n                        }\n                        value = unescapeCSS(selector.slice(valueStart, selectorIndex));\n                    }\n                    stripWhitespace(0);\n                    // See if we have a force ignore flag\n                    const forceIgnore = selector.charCodeAt(selectorIndex) | 0x20;\n                    // If the forceIgnore flag is set (either `i` or `s`), use that value\n                    if (forceIgnore === 115 /* LowerS */) {\n                        ignoreCase = false;\n                        stripWhitespace(1);\n                    }\n                    else if (forceIgnore === 105 /* LowerI */) {\n                        ignoreCase = true;\n                        stripWhitespace(1);\n                    }\n                }\n                if (selector.charCodeAt(selectorIndex) !==\n                    93 /* RightSquareBracket */) {\n                    throw new Error(\"Attribute selector didn't terminate\");\n                }\n                selectorIndex += 1;\n                const attributeSelector = {\n                    type: SelectorType.Attribute,\n                    name,\n                    action,\n                    value,\n                    namespace,\n                    ignoreCase,\n                };\n                tokens.push(attributeSelector);\n                break;\n            }\n            case 58 /* Colon */: {\n                if (selector.charCodeAt(selectorIndex + 1) === 58 /* Colon */) {\n                    tokens.push({\n                        type: SelectorType.PseudoElement,\n                        name: getName(2).toLowerCase(),\n                        data: selector.charCodeAt(selectorIndex) ===\n                            40 /* LeftParenthesis */\n                            ? readValueWithParenthesis()\n                            : null,\n                    });\n                    continue;\n                }\n                const name = getName(1).toLowerCase();\n                let data = null;\n                if (selector.charCodeAt(selectorIndex) ===\n                    40 /* LeftParenthesis */) {\n                    if (unpackPseudos.has(name)) {\n                        if (isQuote(selector.charCodeAt(selectorIndex + 1))) {\n                            throw new Error(`Pseudo-selector ${name} cannot be quoted`);\n                        }\n                        data = [];\n                        selectorIndex = parseSelector(data, selector, selectorIndex + 1);\n                        if (selector.charCodeAt(selectorIndex) !==\n                            41 /* RightParenthesis */) {\n                            throw new Error(`Missing closing parenthesis in :${name} (${selector})`);\n                        }\n                        selectorIndex += 1;\n                    }\n                    else {\n                        data = readValueWithParenthesis();\n                        if (stripQuotesFromPseudos.has(name)) {\n                            const quot = data.charCodeAt(0);\n                            if (quot === data.charCodeAt(data.length - 1) &&\n                                isQuote(quot)) {\n                                data = data.slice(1, -1);\n                            }\n                        }\n                        data = unescapeCSS(data);\n                    }\n                }\n                tokens.push({ type: SelectorType.Pseudo, name, data });\n                break;\n            }\n            case 44 /* Comma */: {\n                finalizeSubselector();\n                tokens = [];\n                stripWhitespace(1);\n                break;\n            }\n            default: {\n                if (selector.startsWith(\"/*\", selectorIndex)) {\n                    const endIndex = selector.indexOf(\"*/\", selectorIndex + 2);\n                    if (endIndex < 0) {\n                        throw new Error(\"Comment was not terminated\");\n                    }\n                    selectorIndex = endIndex + 2;\n                    // Remove leading whitespace\n                    if (tokens.length === 0) {\n                        stripWhitespace(0);\n                    }\n                    break;\n                }\n                let namespace = null;\n                let name;\n                if (firstChar === 42 /* Asterisk */) {\n                    selectorIndex += 1;\n                    name = \"*\";\n                }\n                else if (firstChar === 124 /* Pipe */) {\n                    name = \"\";\n                    if (selector.charCodeAt(selectorIndex + 1) === 124 /* Pipe */) {\n                        addTraversal(SelectorType.ColumnCombinator);\n                        stripWhitespace(2);\n                        break;\n                    }\n                }\n                else if (reName.test(selector.slice(selectorIndex))) {\n                    name = getName(0);\n                }\n                else {\n                    break loop;\n                }\n                if (selector.charCodeAt(selectorIndex) === 124 /* Pipe */ &&\n                    selector.charCodeAt(selectorIndex + 1) !== 124 /* Pipe */) {\n                    namespace = name;\n                    if (selector.charCodeAt(selectorIndex + 1) ===\n                        42 /* Asterisk */) {\n                        name = \"*\";\n                        selectorIndex += 2;\n                    }\n                    else {\n                        name = getName(1);\n                    }\n                }\n                tokens.push(name === \"*\"\n                    ? { type: SelectorType.Universal, namespace }\n                    : { type: SelectorType.Tag, name, namespace });\n            }\n        }\n    }\n    finalizeSubselector();\n    return selectorIndex;\n}\n","export var SelectorType;\n(function (SelectorType) {\n    SelectorType[\"Attribute\"] = \"attribute\";\n    SelectorType[\"Pseudo\"] = \"pseudo\";\n    SelectorType[\"PseudoElement\"] = \"pseudo-element\";\n    SelectorType[\"Tag\"] = \"tag\";\n    SelectorType[\"Universal\"] = \"universal\";\n    // Traversals\n    SelectorType[\"Adjacent\"] = \"adjacent\";\n    SelectorType[\"Child\"] = \"child\";\n    SelectorType[\"Descendant\"] = \"descendant\";\n    SelectorType[\"Parent\"] = \"parent\";\n    SelectorType[\"Sibling\"] = \"sibling\";\n    SelectorType[\"ColumnCombinator\"] = \"column-combinator\";\n})(SelectorType || (SelectorType = {}));\n/**\n * Modes for ignore case.\n *\n * This could be updated to an enum, and the object is\n * the current stand-in that will allow code to be updated\n * without big changes.\n */\nexport const IgnoreCaseMode = {\n    Unknown: null,\n    QuirksMode: \"quirks\",\n    IgnoreCase: true,\n    CaseSensitive: false,\n};\nexport var AttributeAction;\n(function (AttributeAction) {\n    AttributeAction[\"Any\"] = \"any\";\n    AttributeAction[\"Element\"] = \"element\";\n    AttributeAction[\"End\"] = \"end\";\n    AttributeAction[\"Equals\"] = \"equals\";\n    AttributeAction[\"Exists\"] = \"exists\";\n    AttributeAction[\"Hyphen\"] = \"hyphen\";\n    AttributeAction[\"Not\"] = \"not\";\n    AttributeAction[\"Start\"] = \"start\";\n})(AttributeAction || (AttributeAction = {}));\n","export const elementNames = new Map([\n    \"altGlyph\",\n    \"altGlyphDef\",\n    \"altGlyphItem\",\n    \"animateColor\",\n    \"animateMotion\",\n    \"animateTransform\",\n    \"clipPath\",\n    \"feBlend\",\n    \"feColorMatrix\",\n    \"feComponentTransfer\",\n    \"feComposite\",\n    \"feConvolveMatrix\",\n    \"feDiffuseLighting\",\n    \"feDisplacementMap\",\n    \"feDistantLight\",\n    \"feDropShadow\",\n    \"feFlood\",\n    \"feFuncA\",\n    \"feFuncB\",\n    \"feFuncG\",\n    \"feFuncR\",\n    \"feGaussianBlur\",\n    \"feImage\",\n    \"feMerge\",\n    \"feMergeNode\",\n    \"feMorphology\",\n    \"feOffset\",\n    \"fePointLight\",\n    \"feSpecularLighting\",\n    \"feSpotLight\",\n    \"feTile\",\n    \"feTurbulence\",\n    \"foreignObject\",\n    \"glyphRef\",\n    \"linearGradient\",\n    \"radialGradient\",\n    \"textPath\",\n].map((val) => [val.toLowerCase(), val]));\nexport const attributeNames = new Map([\n    \"definitionURL\",\n    \"attributeName\",\n    \"attributeType\",\n    \"baseFrequency\",\n    \"baseProfile\",\n    \"calcMode\",\n    \"clipPathUnits\",\n    \"diffuseConstant\",\n    \"edgeMode\",\n    \"filterUnits\",\n    \"glyphRef\",\n    \"gradientTransform\",\n    \"gradientUnits\",\n    \"kernelMatrix\",\n    \"kernelUnitLength\",\n    \"keyPoints\",\n    \"keySplines\",\n    \"keyTimes\",\n    \"lengthAdjust\",\n    \"limitingConeAngle\",\n    \"markerHeight\",\n    \"markerUnits\",\n    \"markerWidth\",\n    \"maskContentUnits\",\n    \"maskUnits\",\n    \"numOctaves\",\n    \"pathLength\",\n    \"patternContentUnits\",\n    \"patternTransform\",\n    \"patternUnits\",\n    \"pointsAtX\",\n    \"pointsAtY\",\n    \"pointsAtZ\",\n    \"preserveAlpha\",\n    \"preserveAspectRatio\",\n    \"primitiveUnits\",\n    \"refX\",\n    \"refY\",\n    \"repeatCount\",\n    \"repeatDur\",\n    \"requiredExtensions\",\n    \"requiredFeatures\",\n    \"specularConstant\",\n    \"specularExponent\",\n    \"spreadMethod\",\n    \"startOffset\",\n    \"stdDeviation\",\n    \"stitchTiles\",\n    \"surfaceScale\",\n    \"systemLanguage\",\n    \"tableValues\",\n    \"targetX\",\n    \"targetY\",\n    \"textLength\",\n    \"viewBox\",\n    \"viewTarget\",\n    \"xChannelSelector\",\n    \"yChannelSelector\",\n    \"zoomAndPan\",\n].map((val) => [val.toLowerCase(), val]));\n","/*\n * Module dependencies\n */\nimport * as ElementType from \"domelementtype\";\nimport { encodeXML, escapeAttribute, escapeText } from \"entities\";\n/**\n * Mixed-case SVG and MathML tags & attributes\n * recognized by the HTML parser.\n *\n * @see https://html.spec.whatwg.org/multipage/parsing.html#parsing-main-inforeign\n */\nimport { elementNames, attributeNames } from \"./foreignNames.js\";\nconst unencodedElements = new Set([\n    \"style\",\n    \"script\",\n    \"xmp\",\n    \"iframe\",\n    \"noembed\",\n    \"noframes\",\n    \"plaintext\",\n    \"noscript\",\n]);\nfunction replaceQuotes(value) {\n    return value.replace(/\"/g, \"&quot;\");\n}\n/**\n * Format attributes\n */\nfunction formatAttributes(attributes, opts) {\n    var _a;\n    if (!attributes)\n        return;\n    const encode = ((_a = opts.encodeEntities) !== null && _a !== void 0 ? _a : opts.decodeEntities) === false\n        ? replaceQuotes\n        : opts.xmlMode || opts.encodeEntities !== \"utf8\"\n            ? encodeXML\n            : escapeAttribute;\n    return Object.keys(attributes)\n        .map((key) => {\n        var _a, _b;\n        const value = (_a = attributes[key]) !== null && _a !== void 0 ? _a : \"\";\n        if (opts.xmlMode === \"foreign\") {\n            /* Fix up mixed-case attribute names */\n            key = (_b = attributeNames.get(key)) !== null && _b !== void 0 ? _b : key;\n        }\n        if (!opts.emptyAttrs && !opts.xmlMode && value === \"\") {\n            return key;\n        }\n        return `${key}=\"${encode(value)}\"`;\n    })\n        .join(\" \");\n}\n/**\n * Self-enclosing tags\n */\nconst singleTag = new Set([\n    \"area\",\n    \"base\",\n    \"basefont\",\n    \"br\",\n    \"col\",\n    \"command\",\n    \"embed\",\n    \"frame\",\n    \"hr\",\n    \"img\",\n    \"input\",\n    \"isindex\",\n    \"keygen\",\n    \"link\",\n    \"meta\",\n    \"param\",\n    \"source\",\n    \"track\",\n    \"wbr\",\n]);\n/**\n * Renders a DOM node or an array of DOM nodes to a string.\n *\n * Can be thought of as the equivalent of the `outerHTML` of the passed node(s).\n *\n * @param node Node to be rendered.\n * @param options Changes serialization behavior\n */\nexport function render(node, options = {}) {\n    const nodes = \"length\" in node ? node : [node];\n    let output = \"\";\n    for (let i = 0; i < nodes.length; i++) {\n        output += renderNode(nodes[i], options);\n    }\n    return output;\n}\nexport default render;\nfunction renderNode(node, options) {\n    switch (node.type) {\n        case ElementType.Root:\n            return render(node.children, options);\n        // @ts-expect-error We don't use `Doctype` yet\n        case ElementType.Doctype:\n        case ElementType.Directive:\n            return renderDirective(node);\n        case ElementType.Comment:\n            return renderComment(node);\n        case ElementType.CDATA:\n            return renderCdata(node);\n        case ElementType.Script:\n        case ElementType.Style:\n        case ElementType.Tag:\n            return renderTag(node, options);\n        case ElementType.Text:\n            return renderText(node, options);\n    }\n}\nconst foreignModeIntegrationPoints = new Set([\n    \"mi\",\n    \"mo\",\n    \"mn\",\n    \"ms\",\n    \"mtext\",\n    \"annotation-xml\",\n    \"foreignObject\",\n    \"desc\",\n    \"title\",\n]);\nconst foreignElements = new Set([\"svg\", \"math\"]);\nfunction renderTag(elem, opts) {\n    var _a;\n    // Handle SVG / MathML in HTML\n    if (opts.xmlMode === \"foreign\") {\n        /* Fix up mixed-case element names */\n        elem.name = (_a = elementNames.get(elem.name)) !== null && _a !== void 0 ? _a : elem.name;\n        /* Exit foreign mode at integration points */\n        if (elem.parent &&\n            foreignModeIntegrationPoints.has(elem.parent.name)) {\n            opts = { ...opts, xmlMode: false };\n        }\n    }\n    if (!opts.xmlMode && foreignElements.has(elem.name)) {\n        opts = { ...opts, xmlMode: \"foreign\" };\n    }\n    let tag = `<${elem.name}`;\n    const attribs = formatAttributes(elem.attribs, opts);\n    if (attribs) {\n        tag += ` ${attribs}`;\n    }\n    if (elem.children.length === 0 &&\n        (opts.xmlMode\n            ? // In XML mode or foreign mode, and user hasn't explicitly turned off self-closing tags\n                opts.selfClosingTags !== false\n            : // User explicitly asked for self-closing tags, even in HTML mode\n                opts.selfClosingTags && singleTag.has(elem.name))) {\n        if (!opts.xmlMode)\n            tag += \" \";\n        tag += \"/>\";\n    }\n    else {\n        tag += \">\";\n        if (elem.children.length > 0) {\n            tag += render(elem.children, opts);\n        }\n        if (opts.xmlMode || !singleTag.has(elem.name)) {\n            tag += `</${elem.name}>`;\n        }\n    }\n    return tag;\n}\nfunction renderDirective(elem) {\n    return `<${elem.data}>`;\n}\nfunction renderText(elem, opts) {\n    var _a;\n    let data = elem.data || \"\";\n    // If entities weren't decoded, no need to encode them back\n    if (((_a = opts.encodeEntities) !== null && _a !== void 0 ? _a : opts.decodeEntities) !== false &&\n        !(!opts.xmlMode &&\n            elem.parent &&\n            unencodedElements.has(elem.parent.name))) {\n        data =\n            opts.xmlMode || opts.encodeEntities !== \"utf8\"\n                ? encodeXML(data)\n                : escapeText(data);\n    }\n    return data;\n}\nfunction renderCdata(elem) {\n    return `<![CDATA[${elem.children[0].data}]]>`;\n}\nfunction renderComment(elem) {\n    return `<!--${elem.data}-->`;\n}\n","/** Types of elements found in htmlparser2's DOM */\nexport var ElementType;\n(function (ElementType) {\n    /** Type for the root element of a document */\n    ElementType[\"Root\"] = \"root\";\n    /** Type for Text */\n    ElementType[\"Text\"] = \"text\";\n    /** Type for <? ... ?> */\n    ElementType[\"Directive\"] = \"directive\";\n    /** Type for <!-- ... --> */\n    ElementType[\"Comment\"] = \"comment\";\n    /** Type for <script> tags */\n    ElementType[\"Script\"] = \"script\";\n    /** Type for <style> tags */\n    ElementType[\"Style\"] = \"style\";\n    /** Type for Any tag */\n    ElementType[\"Tag\"] = \"tag\";\n    /** Type for <![CDATA[ ... ]]> */\n    ElementType[\"CDATA\"] = \"cdata\";\n    /** Type for <!doctype ...> */\n    ElementType[\"Doctype\"] = \"doctype\";\n})(ElementType || (ElementType = {}));\n/**\n * Tests whether an element is a tag or not.\n *\n * @param elem Element to test\n */\nexport function isTag(elem) {\n    return (elem.type === ElementType.Tag ||\n        elem.type === ElementType.Script ||\n        elem.type === ElementType.Style);\n}\n// Exports for backwards compatibility\n/** Type for the root element of a document */\nexport const Root = ElementType.Root;\n/** Type for Text */\nexport const Text = ElementType.Text;\n/** Type for <? ... ?> */\nexport const Directive = ElementType.Directive;\n/** Type for <!-- ... --> */\nexport const Comment = ElementType.Comment;\n/** Type for <script> tags */\nexport const Script = ElementType.Script;\n/** Type for <style> tags */\nexport const Style = ElementType.Style;\n/** Type for Any tag */\nexport const Tag = ElementType.Tag;\n/** Type for <![CDATA[ ... ]]> */\nexport const CDATA = ElementType.CDATA;\n/** Type for <!doctype ...> */\nexport const Doctype = ElementType.Doctype;\n","import { ElementType } from \"domelementtype\";\nimport { Element, Text, Comment, CDATA, Document, ProcessingInstruction, } from \"./node.js\";\nexport * from \"./node.js\";\n// Default options\nconst defaultOpts = {\n    withStartIndices: false,\n    withEndIndices: false,\n    xmlMode: false,\n};\nexport class DomHandler {\n    /**\n     * @param callback Called once parsing has completed.\n     * @param options Settings for the handler.\n     * @param elementCB Callback whenever a tag is closed.\n     */\n    constructor(callback, options, elementCB) {\n        /** The elements of the DOM */\n        this.dom = [];\n        /** The root element for the DOM */\n        this.root = new Document(this.dom);\n        /** Indicated whether parsing has been completed. */\n        this.done = false;\n        /** Stack of open tags. */\n        this.tagStack = [this.root];\n        /** A data node that is still being written to. */\n        this.lastNode = null;\n        /** Reference to the parser instance. Used for location information. */\n        this.parser = null;\n        // Make it possible to skip arguments, for backwards-compatibility\n        if (typeof options === \"function\") {\n            elementCB = options;\n            options = defaultOpts;\n        }\n        if (typeof callback === \"object\") {\n            options = callback;\n            callback = undefined;\n        }\n        this.callback = callback !== null && callback !== void 0 ? callback : null;\n        this.options = options !== null && options !== void 0 ? options : defaultOpts;\n        this.elementCB = elementCB !== null && elementCB !== void 0 ? elementCB : null;\n    }\n    onparserinit(parser) {\n        this.parser = parser;\n    }\n    // Resets the handler back to starting state\n    onreset() {\n        this.dom = [];\n        this.root = new Document(this.dom);\n        this.done = false;\n        this.tagStack = [this.root];\n        this.lastNode = null;\n        this.parser = null;\n    }\n    // Signals the handler that parsing is done\n    onend() {\n        if (this.done)\n            return;\n        this.done = true;\n        this.parser = null;\n        this.handleCallback(null);\n    }\n    onerror(error) {\n        this.handleCallback(error);\n    }\n    onclosetag() {\n        this.lastNode = null;\n        const elem = this.tagStack.pop();\n        if (this.options.withEndIndices) {\n            elem.endIndex = this.parser.endIndex;\n        }\n        if (this.elementCB)\n            this.elementCB(elem);\n    }\n    onopentag(name, attribs) {\n        const type = this.options.xmlMode ? ElementType.Tag : undefined;\n        const element = new Element(name, attribs, undefined, type);\n        this.addNode(element);\n        this.tagStack.push(element);\n    }\n    ontext(data) {\n        const { lastNode } = this;\n        if (lastNode && lastNode.type === ElementType.Text) {\n            lastNode.data += data;\n            if (this.options.withEndIndices) {\n                lastNode.endIndex = this.parser.endIndex;\n            }\n        }\n        else {\n            const node = new Text(data);\n            this.addNode(node);\n            this.lastNode = node;\n        }\n    }\n    oncomment(data) {\n        if (this.lastNode && this.lastNode.type === ElementType.Comment) {\n            this.lastNode.data += data;\n            return;\n        }\n        const node = new Comment(data);\n        this.addNode(node);\n        this.lastNode = node;\n    }\n    oncommentend() {\n        this.lastNode = null;\n    }\n    oncdatastart() {\n        const text = new Text(\"\");\n        const node = new CDATA([text]);\n        this.addNode(node);\n        text.parent = node;\n        this.lastNode = text;\n    }\n    oncdataend() {\n        this.lastNode = null;\n    }\n    onprocessinginstruction(name, data) {\n        const node = new ProcessingInstruction(name, data);\n        this.addNode(node);\n    }\n    handleCallback(error) {\n        if (typeof this.callback === \"function\") {\n            this.callback(error, this.dom);\n        }\n        else if (error) {\n            throw error;\n        }\n    }\n    addNode(node) {\n        const parent = this.tagStack[this.tagStack.length - 1];\n        const previousSibling = parent.children[parent.children.length - 1];\n        if (this.options.withStartIndices) {\n            node.startIndex = this.parser.startIndex;\n        }\n        if (this.options.withEndIndices) {\n            node.endIndex = this.parser.endIndex;\n        }\n        parent.children.push(node);\n        if (previousSibling) {\n            node.prev = previousSibling;\n            previousSibling.next = node;\n        }\n        node.parent = parent;\n        this.lastNode = null;\n    }\n}\nexport default DomHandler;\n","import { ElementType, isTag as isTagRaw } from \"domelementtype\";\n/**\n * This object will be used as the prototype for Nodes when creating a\n * DOM-Level-1-compliant structure.\n */\nexport class Node {\n    constructor() {\n        /** Parent of the node */\n        this.parent = null;\n        /** Previous sibling */\n        this.prev = null;\n        /** Next sibling */\n        this.next = null;\n        /** The start index of the node. Requires `withStartIndices` on the handler to be `true. */\n        this.startIndex = null;\n        /** The end index of the node. Requires `withEndIndices` on the handler to be `true. */\n        this.endIndex = null;\n    }\n    // Read-write aliases for properties\n    /**\n     * Same as {@link parent}.\n     * [DOM spec](https://dom.spec.whatwg.org)-compatible alias.\n     */\n    get parentNode() {\n        return this.parent;\n    }\n    set parentNode(parent) {\n        this.parent = parent;\n    }\n    /**\n     * Same as {@link prev}.\n     * [DOM spec](https://dom.spec.whatwg.org)-compatible alias.\n     */\n    get previousSibling() {\n        return this.prev;\n    }\n    set previousSibling(prev) {\n        this.prev = prev;\n    }\n    /**\n     * Same as {@link next}.\n     * [DOM spec](https://dom.spec.whatwg.org)-compatible alias.\n     */\n    get nextSibling() {\n        return this.next;\n    }\n    set nextSibling(next) {\n        this.next = next;\n    }\n    /**\n     * Clone this node, and optionally its children.\n     *\n     * @param recursive Clone child nodes as well.\n     * @returns A clone of the node.\n     */\n    cloneNode(recursive = false) {\n        return cloneNode(this, recursive);\n    }\n}\n/**\n * A node that contains some data.\n */\nexport class DataNode extends Node {\n    /**\n     * @param data The content of the data node\n     */\n    constructor(data) {\n        super();\n        this.data = data;\n    }\n    /**\n     * Same as {@link data}.\n     * [DOM spec](https://dom.spec.whatwg.org)-compatible alias.\n     */\n    get nodeValue() {\n        return this.data;\n    }\n    set nodeValue(data) {\n        this.data = data;\n    }\n}\n/**\n * Text within the document.\n */\nexport class Text extends DataNode {\n    constructor() {\n        super(...arguments);\n        this.type = ElementType.Text;\n    }\n    get nodeType() {\n        return 3;\n    }\n}\n/**\n * Comments within the document.\n */\nexport class Comment extends DataNode {\n    constructor() {\n        super(...arguments);\n        this.type = ElementType.Comment;\n    }\n    get nodeType() {\n        return 8;\n    }\n}\n/**\n * Processing instructions, including doc types.\n */\nexport class ProcessingInstruction extends DataNode {\n    constructor(name, data) {\n        super(data);\n        this.name = name;\n        this.type = ElementType.Directive;\n    }\n    get nodeType() {\n        return 1;\n    }\n}\n/**\n * A `Node` that can have children.\n */\nexport class NodeWithChildren extends Node {\n    /**\n     * @param children Children of the node. Only certain node types can have children.\n     */\n    constructor(children) {\n        super();\n        this.children = children;\n    }\n    // Aliases\n    /** First child of the node. */\n    get firstChild() {\n        var _a;\n        return (_a = this.children[0]) !== null && _a !== void 0 ? _a : null;\n    }\n    /** Last child of the node. */\n    get lastChild() {\n        return this.children.length > 0\n            ? this.children[this.children.length - 1]\n            : null;\n    }\n    /**\n     * Same as {@link children}.\n     * [DOM spec](https://dom.spec.whatwg.org)-compatible alias.\n     */\n    get childNodes() {\n        return this.children;\n    }\n    set childNodes(children) {\n        this.children = children;\n    }\n}\nexport class CDATA extends NodeWithChildren {\n    constructor() {\n        super(...arguments);\n        this.type = ElementType.CDATA;\n    }\n    get nodeType() {\n        return 4;\n    }\n}\n/**\n * The root node of the document.\n */\nexport class Document extends NodeWithChildren {\n    constructor() {\n        super(...arguments);\n        this.type = ElementType.Root;\n    }\n    get nodeType() {\n        return 9;\n    }\n}\n/**\n * An element within the DOM.\n */\nexport class Element extends NodeWithChildren {\n    /**\n     * @param name Name of the tag, eg. `div`, `span`.\n     * @param attribs Object mapping attribute names to attribute values.\n     * @param children Children of the node.\n     */\n    constructor(name, attribs, children = [], type = name === \"script\"\n        ? ElementType.Script\n        : name === \"style\"\n            ? ElementType.Style\n            : ElementType.Tag) {\n        super(children);\n        this.name = name;\n        this.attribs = attribs;\n        this.type = type;\n    }\n    get nodeType() {\n        return 1;\n    }\n    // DOM Level 1 aliases\n    /**\n     * Same as {@link name}.\n     * [DOM spec](https://dom.spec.whatwg.org)-compatible alias.\n     */\n    get tagName() {\n        return this.name;\n    }\n    set tagName(name) {\n        this.name = name;\n    }\n    get attributes() {\n        return Object.keys(this.attribs).map((name) => {\n            var _a, _b;\n            return ({\n                name,\n                value: this.attribs[name],\n                namespace: (_a = this[\"x-attribsNamespace\"]) === null || _a === void 0 ? void 0 : _a[name],\n                prefix: (_b = this[\"x-attribsPrefix\"]) === null || _b === void 0 ? void 0 : _b[name],\n            });\n        });\n    }\n}\n/**\n * @param node Node to check.\n * @returns `true` if the node is a `Element`, `false` otherwise.\n */\nexport function isTag(node) {\n    return isTagRaw(node);\n}\n/**\n * @param node Node to check.\n * @returns `true` if the node has the type `CDATA`, `false` otherwise.\n */\nexport function isCDATA(node) {\n    return node.type === ElementType.CDATA;\n}\n/**\n * @param node Node to check.\n * @returns `true` if the node has the type `Text`, `false` otherwise.\n */\nexport function isText(node) {\n    return node.type === ElementType.Text;\n}\n/**\n * @param node Node to check.\n * @returns `true` if the node has the type `Comment`, `false` otherwise.\n */\nexport function isComment(node) {\n    return node.type === ElementType.Comment;\n}\n/**\n * @param node Node to check.\n * @returns `true` if the node has the type `ProcessingInstruction`, `false` otherwise.\n */\nexport function isDirective(node) {\n    return node.type === ElementType.Directive;\n}\n/**\n * @param node Node to check.\n * @returns `true` if the node has the type `ProcessingInstruction`, `false` otherwise.\n */\nexport function isDocument(node) {\n    return node.type === ElementType.Root;\n}\n/**\n * @param node Node to check.\n * @returns `true` if the node has children, `false` otherwise.\n */\nexport function hasChildren(node) {\n    return Object.prototype.hasOwnProperty.call(node, \"children\");\n}\n/**\n * Clone a node, and optionally its children.\n *\n * @param recursive Clone child nodes as well.\n * @returns A clone of the node.\n */\nexport function cloneNode(node, recursive = false) {\n    let result;\n    if (isText(node)) {\n        result = new Text(node.data);\n    }\n    else if (isComment(node)) {\n        result = new Comment(node.data);\n    }\n    else if (isTag(node)) {\n        const children = recursive ? cloneChildren(node.children) : [];\n        const clone = new Element(node.name, { ...node.attribs }, children);\n        children.forEach((child) => (child.parent = clone));\n        if (node.namespace != null) {\n            clone.namespace = node.namespace;\n        }\n        if (node[\"x-attribsNamespace\"]) {\n            clone[\"x-attribsNamespace\"] = { ...node[\"x-attribsNamespace\"] };\n        }\n        if (node[\"x-attribsPrefix\"]) {\n            clone[\"x-attribsPrefix\"] = { ...node[\"x-attribsPrefix\"] };\n        }\n        result = clone;\n    }\n    else if (isCDATA(node)) {\n        const children = recursive ? cloneChildren(node.children) : [];\n        const clone = new CDATA(children);\n        children.forEach((child) => (child.parent = clone));\n        result = clone;\n    }\n    else if (isDocument(node)) {\n        const children = recursive ? cloneChildren(node.children) : [];\n        const clone = new Document(children);\n        children.forEach((child) => (child.parent = clone));\n        if (node[\"x-mode\"]) {\n            clone[\"x-mode\"] = node[\"x-mode\"];\n        }\n        result = clone;\n    }\n    else if (isDirective(node)) {\n        const instruction = new ProcessingInstruction(node.name, node.data);\n        if (node[\"x-name\"] != null) {\n            instruction[\"x-name\"] = node[\"x-name\"];\n            instruction[\"x-publicId\"] = node[\"x-publicId\"];\n            instruction[\"x-systemId\"] = node[\"x-systemId\"];\n        }\n        result = instruction;\n    }\n    else {\n        throw new Error(`Not implemented yet: ${node.type}`);\n    }\n    result.startIndex = node.startIndex;\n    result.endIndex = node.endIndex;\n    if (node.sourceCodeLocation != null) {\n        result.sourceCodeLocation = node.sourceCodeLocation;\n    }\n    return result;\n}\nfunction cloneChildren(childs) {\n    const children = childs.map((child) => cloneNode(child, true));\n    for (let i = 1; i < children.length; i++) {\n        children[i].prev = children[i - 1];\n        children[i - 1].next = children[i];\n    }\n    return children;\n}\n","import { textContent } from \"./stringify.js\";\nimport { getElementsByTagName } from \"./legacy.js\";\n/**\n * Get the feed object from the root of a DOM tree.\n *\n * @category Feeds\n * @param doc - The DOM to to extract the feed from.\n * @returns The feed.\n */\nexport function getFeed(doc) {\n    const feedRoot = getOneElement(isValidFeed, doc);\n    return !feedRoot\n        ? null\n        : feedRoot.name === \"feed\"\n            ? getAtomFeed(feedRoot)\n            : getRssFeed(feedRoot);\n}\n/**\n * Parse an Atom feed.\n *\n * @param feedRoot The root of the feed.\n * @returns The parsed feed.\n */\nfunction getAtomFeed(feedRoot) {\n    var _a;\n    const childs = feedRoot.children;\n    const feed = {\n        type: \"atom\",\n        items: getElementsByTagName(\"entry\", childs).map((item) => {\n            var _a;\n            const { children } = item;\n            const entry = { media: getMediaElements(children) };\n            addConditionally(entry, \"id\", \"id\", children);\n            addConditionally(entry, \"title\", \"title\", children);\n            const href = (_a = getOneElement(\"link\", children)) === null || _a === void 0 ? void 0 : _a.attribs[\"href\"];\n            if (href) {\n                entry.link = href;\n            }\n            const description = fetch(\"summary\", children) || fetch(\"content\", children);\n            if (description) {\n                entry.description = description;\n            }\n            const pubDate = fetch(\"updated\", children);\n            if (pubDate) {\n                entry.pubDate = new Date(pubDate);\n            }\n            return entry;\n        }),\n    };\n    addConditionally(feed, \"id\", \"id\", childs);\n    addConditionally(feed, \"title\", \"title\", childs);\n    const href = (_a = getOneElement(\"link\", childs)) === null || _a === void 0 ? void 0 : _a.attribs[\"href\"];\n    if (href) {\n        feed.link = href;\n    }\n    addConditionally(feed, \"description\", \"subtitle\", childs);\n    const updated = fetch(\"updated\", childs);\n    if (updated) {\n        feed.updated = new Date(updated);\n    }\n    addConditionally(feed, \"author\", \"email\", childs, true);\n    return feed;\n}\n/**\n * Parse a RSS feed.\n *\n * @param feedRoot The root of the feed.\n * @returns The parsed feed.\n */\nfunction getRssFeed(feedRoot) {\n    var _a, _b;\n    const childs = (_b = (_a = getOneElement(\"channel\", feedRoot.children)) === null || _a === void 0 ? void 0 : _a.children) !== null && _b !== void 0 ? _b : [];\n    const feed = {\n        type: feedRoot.name.substr(0, 3),\n        id: \"\",\n        items: getElementsByTagName(\"item\", feedRoot.children).map((item) => {\n            const { children } = item;\n            const entry = { media: getMediaElements(children) };\n            addConditionally(entry, \"id\", \"guid\", children);\n            addConditionally(entry, \"title\", \"title\", children);\n            addConditionally(entry, \"link\", \"link\", children);\n            addConditionally(entry, \"description\", \"description\", children);\n            const pubDate = fetch(\"pubDate\", children) || fetch(\"dc:date\", children);\n            if (pubDate)\n                entry.pubDate = new Date(pubDate);\n            return entry;\n        }),\n    };\n    addConditionally(feed, \"title\", \"title\", childs);\n    addConditionally(feed, \"link\", \"link\", childs);\n    addConditionally(feed, \"description\", \"description\", childs);\n    const updated = fetch(\"lastBuildDate\", childs);\n    if (updated) {\n        feed.updated = new Date(updated);\n    }\n    addConditionally(feed, \"author\", \"managingEditor\", childs, true);\n    return feed;\n}\nconst MEDIA_KEYS_STRING = [\"url\", \"type\", \"lang\"];\nconst MEDIA_KEYS_INT = [\n    \"fileSize\",\n    \"bitrate\",\n    \"framerate\",\n    \"samplingrate\",\n    \"channels\",\n    \"duration\",\n    \"height\",\n    \"width\",\n];\n/**\n * Get all media elements of a feed item.\n *\n * @param where Nodes to search in.\n * @returns Media elements.\n */\nfunction getMediaElements(where) {\n    return getElementsByTagName(\"media:content\", where).map((elem) => {\n        const { attribs } = elem;\n        const media = {\n            medium: attribs[\"medium\"],\n            isDefault: !!attribs[\"isDefault\"],\n        };\n        for (const attrib of MEDIA_KEYS_STRING) {\n            if (attribs[attrib]) {\n                media[attrib] = attribs[attrib];\n            }\n        }\n        for (const attrib of MEDIA_KEYS_INT) {\n            if (attribs[attrib]) {\n                media[attrib] = parseInt(attribs[attrib], 10);\n            }\n        }\n        if (attribs[\"expression\"]) {\n            media.expression = attribs[\"expression\"];\n        }\n        return media;\n    });\n}\n/**\n * Get one element by tag name.\n *\n * @param tagName Tag name to look for\n * @param node Node to search in\n * @returns The element or null\n */\nfunction getOneElement(tagName, node) {\n    return getElementsByTagName(tagName, node, true, 1)[0];\n}\n/**\n * Get the text content of an element with a certain tag name.\n *\n * @param tagName Tag name to look for.\n * @param where Node to search in.\n * @param recurse Whether to recurse into child nodes.\n * @returns The text content of the element.\n */\nfunction fetch(tagName, where, recurse = false) {\n    return textContent(getElementsByTagName(tagName, where, recurse, 1)).trim();\n}\n/**\n * Adds a property to an object if it has a value.\n *\n * @param obj Object to be extended\n * @param prop Property name\n * @param tagName Tag name that contains the conditionally added property\n * @param where Element to search for the property\n * @param recurse Whether to recurse into child nodes.\n */\nfunction addConditionally(obj, prop, tagName, where, recurse = false) {\n    const val = fetch(tagName, where, recurse);\n    if (val)\n        obj[prop] = val;\n}\n/**\n * Checks if an element is a feed root node.\n *\n * @param value The name of the element to check.\n * @returns Whether an element is a feed root node.\n */\nfunction isValidFeed(value) {\n    return value === \"rss\" || value === \"feed\" || value === \"rdf:RDF\";\n}\n//# sourceMappingURL=feeds.js.map","import { hasChildren } from \"domhandler\";\n/**\n * Given an array of nodes, remove any member that is contained by another\n * member.\n *\n * @category Helpers\n * @param nodes Nodes to filter.\n * @returns Remaining nodes that aren't contained by other nodes.\n */\nexport function removeSubsets(nodes) {\n    let idx = nodes.length;\n    /*\n     * Check if each node (or one of its ancestors) is already contained in the\n     * array.\n     */\n    while (--idx >= 0) {\n        const node = nodes[idx];\n        /*\n         * Remove the node if it is not unique.\n         * We are going through the array from the end, so we only\n         * have to check nodes that preceed the node under consideration in the array.\n         */\n        if (idx > 0 && nodes.lastIndexOf(node, idx - 1) >= 0) {\n            nodes.splice(idx, 1);\n            continue;\n        }\n        for (let ancestor = node.parent; ancestor; ancestor = ancestor.parent) {\n            if (nodes.includes(ancestor)) {\n                nodes.splice(idx, 1);\n                break;\n            }\n        }\n    }\n    return nodes;\n}\n/**\n * @category Helpers\n * @see {@link http://dom.spec.whatwg.org/#dom-node-comparedocumentposition}\n */\nexport var DocumentPosition;\n(function (DocumentPosition) {\n    DocumentPosition[DocumentPosition[\"DISCONNECTED\"] = 1] = \"DISCONNECTED\";\n    DocumentPosition[DocumentPosition[\"PRECEDING\"] = 2] = \"PRECEDING\";\n    DocumentPosition[DocumentPosition[\"FOLLOWING\"] = 4] = \"FOLLOWING\";\n    DocumentPosition[DocumentPosition[\"CONTAINS\"] = 8] = \"CONTAINS\";\n    DocumentPosition[DocumentPosition[\"CONTAINED_BY\"] = 16] = \"CONTAINED_BY\";\n})(DocumentPosition || (DocumentPosition = {}));\n/**\n * Compare the position of one node against another node in any other document,\n * returning a bitmask with the values from {@link DocumentPosition}.\n *\n * Document order:\n * > There is an ordering, document order, defined on all the nodes in the\n * > document corresponding to the order in which the first character of the\n * > XML representation of each node occurs in the XML representation of the\n * > document after expansion of general entities. Thus, the document element\n * > node will be the first node. Element nodes occur before their children.\n * > Thus, document order orders element nodes in order of the occurrence of\n * > their start-tag in the XML (after expansion of entities). The attribute\n * > nodes of an element occur after the element and before its children. The\n * > relative order of attribute nodes is implementation-dependent.\n *\n * Source:\n * http://www.w3.org/TR/DOM-Level-3-Core/glossary.html#dt-document-order\n *\n * @category Helpers\n * @param nodeA The first node to use in the comparison\n * @param nodeB The second node to use in the comparison\n * @returns A bitmask describing the input nodes' relative position.\n *\n * See http://dom.spec.whatwg.org/#dom-node-comparedocumentposition for\n * a description of these values.\n */\nexport function compareDocumentPosition(nodeA, nodeB) {\n    const aParents = [];\n    const bParents = [];\n    if (nodeA === nodeB) {\n        return 0;\n    }\n    let current = hasChildren(nodeA) ? nodeA : nodeA.parent;\n    while (current) {\n        aParents.unshift(current);\n        current = current.parent;\n    }\n    current = hasChildren(nodeB) ? nodeB : nodeB.parent;\n    while (current) {\n        bParents.unshift(current);\n        current = current.parent;\n    }\n    const maxIdx = Math.min(aParents.length, bParents.length);\n    let idx = 0;\n    while (idx < maxIdx && aParents[idx] === bParents[idx]) {\n        idx++;\n    }\n    if (idx === 0) {\n        return DocumentPosition.DISCONNECTED;\n    }\n    const sharedParent = aParents[idx - 1];\n    const siblings = sharedParent.children;\n    const aSibling = aParents[idx];\n    const bSibling = bParents[idx];\n    if (siblings.indexOf(aSibling) > siblings.indexOf(bSibling)) {\n        if (sharedParent === nodeB) {\n            return DocumentPosition.FOLLOWING | DocumentPosition.CONTAINED_BY;\n        }\n        return DocumentPosition.FOLLOWING;\n    }\n    if (sharedParent === nodeA) {\n        return DocumentPosition.PRECEDING | DocumentPosition.CONTAINS;\n    }\n    return DocumentPosition.PRECEDING;\n}\n/**\n * Sort an array of nodes based on their relative position in the document,\n * removing any duplicate nodes. If the array contains nodes that do not belong\n * to the same document, sort order is unspecified.\n *\n * @category Helpers\n * @param nodes Array of DOM nodes.\n * @returns Collection of unique nodes, sorted in document order.\n */\nexport function uniqueSort(nodes) {\n    nodes = nodes.filter((node, i, arr) => !arr.includes(node, i + 1));\n    nodes.sort((a, b) => {\n        const relative = compareDocumentPosition(a, b);\n        if (relative & DocumentPosition.PRECEDING) {\n            return -1;\n        }\n        else if (relative & DocumentPosition.FOLLOWING) {\n            return 1;\n        }\n        return 0;\n    });\n    return nodes;\n}\n//# sourceMappingURL=helpers.js.map","import { isTag, isText } from \"domhandler\";\nimport { filter, findOne } from \"./querying.js\";\n/**\n * A map of functions to check nodes against.\n */\nconst Checks = {\n    tag_name(name) {\n        if (typeof name === \"function\") {\n            return (elem) => isTag(elem) && name(elem.name);\n        }\n        else if (name === \"*\") {\n            return isTag;\n        }\n        return (elem) => isTag(elem) && elem.name === name;\n    },\n    tag_type(type) {\n        if (typeof type === \"function\") {\n            return (elem) => type(elem.type);\n        }\n        return (elem) => elem.type === type;\n    },\n    tag_contains(data) {\n        if (typeof data === \"function\") {\n            return (elem) => isText(elem) && data(elem.data);\n        }\n        return (elem) => isText(elem) && elem.data === data;\n    },\n};\n/**\n * Returns a function to check whether a node has an attribute with a particular\n * value.\n *\n * @param attrib Attribute to check.\n * @param value Attribute value to look for.\n * @returns A function to check whether the a node has an attribute with a\n *   particular value.\n */\nfunction getAttribCheck(attrib, value) {\n    if (typeof value === \"function\") {\n        return (elem) => isTag(elem) && value(elem.attribs[attrib]);\n    }\n    return (elem) => isTag(elem) && elem.attribs[attrib] === value;\n}\n/**\n * Returns a function that returns `true` if either of the input functions\n * returns `true` for a node.\n *\n * @param a First function to combine.\n * @param b Second function to combine.\n * @returns A function taking a node and returning `true` if either of the input\n *   functions returns `true` for the node.\n */\nfunction combineFuncs(a, b) {\n    return (elem) => a(elem) || b(elem);\n}\n/**\n * Returns a function that executes all checks in `options` and returns `true`\n * if any of them match a node.\n *\n * @param options An object describing nodes to look for.\n * @returns A function that executes all checks in `options` and returns `true`\n *   if any of them match a node.\n */\nfunction compileTest(options) {\n    const funcs = Object.keys(options).map((key) => {\n        const value = options[key];\n        return Object.prototype.hasOwnProperty.call(Checks, key)\n            ? Checks[key](value)\n            : getAttribCheck(key, value);\n    });\n    return funcs.length === 0 ? null : funcs.reduce(combineFuncs);\n}\n/**\n * Checks whether a node matches the description in `options`.\n *\n * @category Legacy Query Functions\n * @param options An object describing nodes to look for.\n * @param node The element to test.\n * @returns Whether the element matches the description in `options`.\n */\nexport function testElement(options, node) {\n    const test = compileTest(options);\n    return test ? test(node) : true;\n}\n/**\n * Returns all nodes that match `options`.\n *\n * @category Legacy Query Functions\n * @param options An object describing nodes to look for.\n * @param nodes Nodes to search through.\n * @param recurse Also consider child nodes.\n * @param limit Maximum number of nodes to return.\n * @returns All nodes that match `options`.\n */\nexport function getElements(options, nodes, recurse, limit = Infinity) {\n    const test = compileTest(options);\n    return test ? filter(test, nodes, recurse, limit) : [];\n}\n/**\n * Returns the node with the supplied ID.\n *\n * @category Legacy Query Functions\n * @param id The unique ID attribute value to look for.\n * @param nodes Nodes to search through.\n * @param recurse Also consider child nodes.\n * @returns The node with the supplied ID.\n */\nexport function getElementById(id, nodes, recurse = true) {\n    if (!Array.isArray(nodes))\n        nodes = [nodes];\n    return findOne(getAttribCheck(\"id\", id), nodes, recurse);\n}\n/**\n * Returns all nodes with the supplied `tagName`.\n *\n * @category Legacy Query Functions\n * @param tagName Tag name to search for.\n * @param nodes Nodes to search through.\n * @param recurse Also consider child nodes.\n * @param limit Maximum number of nodes to return.\n * @returns All nodes with the supplied `tagName`.\n */\nexport function getElementsByTagName(tagName, nodes, recurse = true, limit = Infinity) {\n    return filter(Checks[\"tag_name\"](tagName), nodes, recurse, limit);\n}\n/**\n * Returns all nodes with the supplied `className`.\n *\n * @category Legacy Query Functions\n * @param className Class name to search for.\n * @param nodes Nodes to search through.\n * @param recurse Also consider child nodes.\n * @param limit Maximum number of nodes to return.\n * @returns All nodes with the supplied `className`.\n */\nexport function getElementsByClassName(className, nodes, recurse = true, limit = Infinity) {\n    return filter(getAttribCheck(\"class\", className), nodes, recurse, limit);\n}\n/**\n * Returns all nodes with the supplied `type`.\n *\n * @category Legacy Query Functions\n * @param type Element type to look for.\n * @param nodes Nodes to search through.\n * @param recurse Also consider child nodes.\n * @param limit Maximum number of nodes to return.\n * @returns All nodes with the supplied `type`.\n */\nexport function getElementsByTagType(type, nodes, recurse = true, limit = Infinity) {\n    return filter(Checks[\"tag_type\"](type), nodes, recurse, limit);\n}\n//# sourceMappingURL=legacy.js.map","/**\n * Remove an element from the dom\n *\n * @category Manipulation\n * @param elem The element to be removed\n */\nexport function removeElement(elem) {\n    if (elem.prev)\n        elem.prev.next = elem.next;\n    if (elem.next)\n        elem.next.prev = elem.prev;\n    if (elem.parent) {\n        const childs = elem.parent.children;\n        const childsIndex = childs.lastIndexOf(elem);\n        if (childsIndex >= 0) {\n            childs.splice(childsIndex, 1);\n        }\n    }\n    elem.next = null;\n    elem.prev = null;\n    elem.parent = null;\n}\n/**\n * Replace an element in the dom\n *\n * @category Manipulation\n * @param elem The element to be replaced\n * @param replacement The element to be added\n */\nexport function replaceElement(elem, replacement) {\n    const prev = (replacement.prev = elem.prev);\n    if (prev) {\n        prev.next = replacement;\n    }\n    const next = (replacement.next = elem.next);\n    if (next) {\n        next.prev = replacement;\n    }\n    const parent = (replacement.parent = elem.parent);\n    if (parent) {\n        const childs = parent.children;\n        childs[childs.lastIndexOf(elem)] = replacement;\n        elem.parent = null;\n    }\n}\n/**\n * Append a child to an element.\n *\n * @category Manipulation\n * @param parent The element to append to.\n * @param child The element to be added as a child.\n */\nexport function appendChild(parent, child) {\n    removeElement(child);\n    child.next = null;\n    child.parent = parent;\n    if (parent.children.push(child) > 1) {\n        const sibling = parent.children[parent.children.length - 2];\n        sibling.next = child;\n        child.prev = sibling;\n    }\n    else {\n        child.prev = null;\n    }\n}\n/**\n * Append an element after another.\n *\n * @category Manipulation\n * @param elem The element to append after.\n * @param next The element be added.\n */\nexport function append(elem, next) {\n    removeElement(next);\n    const { parent } = elem;\n    const currNext = elem.next;\n    next.next = currNext;\n    next.prev = elem;\n    elem.next = next;\n    next.parent = parent;\n    if (currNext) {\n        currNext.prev = next;\n        if (parent) {\n            const childs = parent.children;\n            childs.splice(childs.lastIndexOf(currNext), 0, next);\n        }\n    }\n    else if (parent) {\n        parent.children.push(next);\n    }\n}\n/**\n * Prepend a child to an element.\n *\n * @category Manipulation\n * @param parent The element to prepend before.\n * @param child The element to be added as a child.\n */\nexport function prependChild(parent, child) {\n    removeElement(child);\n    child.parent = parent;\n    child.prev = null;\n    if (parent.children.unshift(child) !== 1) {\n        const sibling = parent.children[1];\n        sibling.prev = child;\n        child.next = sibling;\n    }\n    else {\n        child.next = null;\n    }\n}\n/**\n * Prepend an element before another.\n *\n * @category Manipulation\n * @param elem The element to prepend before.\n * @param prev The element be added.\n */\nexport function prepend(elem, prev) {\n    removeElement(prev);\n    const { parent } = elem;\n    if (parent) {\n        const childs = parent.children;\n        childs.splice(childs.indexOf(elem), 0, prev);\n    }\n    if (elem.prev) {\n        elem.prev.next = prev;\n    }\n    prev.parent = parent;\n    prev.prev = elem.prev;\n    prev.next = elem;\n    elem.prev = prev;\n}\n//# sourceMappingURL=manipulation.js.map","import { isTag, hasChildren } from \"domhandler\";\n/**\n * Search a node and its children for nodes passing a test function. If `node` is not an array, it will be wrapped in one.\n *\n * @category Querying\n * @param test Function to test nodes on.\n * @param node Node to search. Will be included in the result set if it matches.\n * @param recurse Also consider child nodes.\n * @param limit Maximum number of nodes to return.\n * @returns All nodes passing `test`.\n */\nexport function filter(test, node, recurse = true, limit = Infinity) {\n    return find(test, Array.isArray(node) ? node : [node], recurse, limit);\n}\n/**\n * Search an array of nodes and their children for nodes passing a test function.\n *\n * @category Querying\n * @param test Function to test nodes on.\n * @param nodes Array of nodes to search.\n * @param recurse Also consider child nodes.\n * @param limit Maximum number of nodes to return.\n * @returns All nodes passing `test`.\n */\nexport function find(test, nodes, recurse, limit) {\n    const result = [];\n    /** Stack of the arrays we are looking at. */\n    const nodeStack = [Array.isArray(nodes) ? nodes : [nodes]];\n    /** Stack of the indices within the arrays. */\n    const indexStack = [0];\n    for (;;) {\n        // First, check if the current array has any more elements to look at.\n        if (indexStack[0] >= nodeStack[0].length) {\n            // If we have no more arrays to look at, we are done.\n            if (indexStack.length === 1) {\n                return result;\n            }\n            // Otherwise, remove the current array from the stack.\n            nodeStack.shift();\n            indexStack.shift();\n            // Loop back to the start to continue with the next array.\n            continue;\n        }\n        const elem = nodeStack[0][indexStack[0]++];\n        if (test(elem)) {\n            result.push(elem);\n            if (--limit <= 0)\n                return result;\n        }\n        if (recurse && hasChildren(elem) && elem.children.length > 0) {\n            /*\n             * Add the children to the stack. We are depth-first, so this is\n             * the next array we look at.\n             */\n            indexStack.unshift(0);\n            nodeStack.unshift(elem.children);\n        }\n    }\n}\n/**\n * Finds the first element inside of an array that matches a test function. This is an alias for `Array.prototype.find`.\n *\n * @category Querying\n * @param test Function to test nodes on.\n * @param nodes Array of nodes to search.\n * @returns The first node in the array that passes `test`.\n * @deprecated Use `Array.prototype.find` directly.\n */\nexport function findOneChild(test, nodes) {\n    return nodes.find(test);\n}\n/**\n * Finds one element in a tree that passes a test.\n *\n * @category Querying\n * @param test Function to test nodes on.\n * @param nodes Node or array of nodes to search.\n * @param recurse Also consider child nodes.\n * @returns The first node that passes `test`.\n */\nexport function findOne(test, nodes, recurse = true) {\n    const searchedNodes = Array.isArray(nodes) ? nodes : [nodes];\n    for (let i = 0; i < searchedNodes.length; i++) {\n        const node = searchedNodes[i];\n        if (isTag(node) && test(node)) {\n            return node;\n        }\n        if (recurse && hasChildren(node) && node.children.length > 0) {\n            const found = findOne(test, node.children, true);\n            if (found)\n                return found;\n        }\n    }\n    return null;\n}\n/**\n * Checks if a tree of nodes contains at least one node passing a test.\n *\n * @category Querying\n * @param test Function to test nodes on.\n * @param nodes Array of nodes to search.\n * @returns Whether a tree of nodes contains at least one node passing the test.\n */\nexport function existsOne(test, nodes) {\n    return (Array.isArray(nodes) ? nodes : [nodes]).some((node) => (isTag(node) && test(node)) ||\n        (hasChildren(node) && existsOne(test, node.children)));\n}\n/**\n * Search an array of nodes and their children for elements passing a test function.\n *\n * Same as `find`, but limited to elements and with less options, leading to reduced complexity.\n *\n * @category Querying\n * @param test Function to test nodes on.\n * @param nodes Array of nodes to search.\n * @returns All nodes passing `test`.\n */\nexport function findAll(test, nodes) {\n    const result = [];\n    const nodeStack = [Array.isArray(nodes) ? nodes : [nodes]];\n    const indexStack = [0];\n    for (;;) {\n        if (indexStack[0] >= nodeStack[0].length) {\n            if (nodeStack.length === 1) {\n                return result;\n            }\n            // Otherwise, remove the current array from the stack.\n            nodeStack.shift();\n            indexStack.shift();\n            // Loop back to the start to continue with the next array.\n            continue;\n        }\n        const elem = nodeStack[0][indexStack[0]++];\n        if (isTag(elem) && test(elem))\n            result.push(elem);\n        if (hasChildren(elem) && elem.children.length > 0) {\n            indexStack.unshift(0);\n            nodeStack.unshift(elem.children);\n        }\n    }\n}\n//# sourceMappingURL=querying.js.map","import { isTag, isCDATA, isText, hasChildren, isComment, } from \"domhandler\";\nimport renderHTML from \"dom-serializer\";\nimport { ElementType } from \"domelementtype\";\n/**\n * @category Stringify\n * @deprecated Use the `dom-serializer` module directly.\n * @param node Node to get the outer HTML of.\n * @param options Options for serialization.\n * @returns `node`'s outer HTML.\n */\nexport function getOuterHTML(node, options) {\n    return renderHTML(node, options);\n}\n/**\n * @category Stringify\n * @deprecated Use the `dom-serializer` module directly.\n * @param node Node to get the inner HTML of.\n * @param options Options for serialization.\n * @returns `node`'s inner HTML.\n */\nexport function getInnerHTML(node, options) {\n    return hasChildren(node)\n        ? node.children.map((node) => getOuterHTML(node, options)).join(\"\")\n        : \"\";\n}\n/**\n * Get a node's inner text. Same as `textContent`, but inserts newlines for `<br>` tags. Ignores comments.\n *\n * @category Stringify\n * @deprecated Use `textContent` instead.\n * @param node Node to get the inner text of.\n * @returns `node`'s inner text.\n */\nexport function getText(node) {\n    if (Array.isArray(node))\n        return node.map(getText).join(\"\");\n    if (isTag(node))\n        return node.name === \"br\" ? \"\\n\" : getText(node.children);\n    if (isCDATA(node))\n        return getText(node.children);\n    if (isText(node))\n        return node.data;\n    return \"\";\n}\n/**\n * Get a node's text content. Ignores comments.\n *\n * @category Stringify\n * @param node Node to get the text content of.\n * @returns `node`'s text content.\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/Node/textContent}\n */\nexport function textContent(node) {\n    if (Array.isArray(node))\n        return node.map(textContent).join(\"\");\n    if (hasChildren(node) && !isComment(node)) {\n        return textContent(node.children);\n    }\n    if (isText(node))\n        return node.data;\n    return \"\";\n}\n/**\n * Get a node's inner text, ignoring `<script>` and `<style>` tags. Ignores comments.\n *\n * @category Stringify\n * @param node Node to get the inner text of.\n * @returns `node`'s inner text.\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/Node/innerText}\n */\nexport function innerText(node) {\n    if (Array.isArray(node))\n        return node.map(innerText).join(\"\");\n    if (hasChildren(node) && (node.type === ElementType.Tag || isCDATA(node))) {\n        return innerText(node.children);\n    }\n    if (isText(node))\n        return node.data;\n    return \"\";\n}\n//# sourceMappingURL=stringify.js.map","import { isTag, hasChildren, } from \"domhandler\";\n/**\n * Get a node's children.\n *\n * @category Traversal\n * @param elem Node to get the children of.\n * @returns `elem`'s children, or an empty array.\n */\nexport function getChildren(elem) {\n    return hasChildren(elem) ? elem.children : [];\n}\n/**\n * Get a node's parent.\n *\n * @category Traversal\n * @param elem Node to get the parent of.\n * @returns `elem`'s parent node, or `null` if `elem` is a root node.\n */\nexport function getParent(elem) {\n    return elem.parent || null;\n}\n/**\n * Gets an elements siblings, including the element itself.\n *\n * Attempts to get the children through the element's parent first. If we don't\n * have a parent (the element is a root node), we walk the element's `prev` &\n * `next` to get all remaining nodes.\n *\n * @category Traversal\n * @param elem Element to get the siblings of.\n * @returns `elem`'s siblings, including `elem`.\n */\nexport function getSiblings(elem) {\n    const parent = getParent(elem);\n    if (parent != null)\n        return getChildren(parent);\n    const siblings = [elem];\n    let { prev, next } = elem;\n    while (prev != null) {\n        siblings.unshift(prev);\n        ({ prev } = prev);\n    }\n    while (next != null) {\n        siblings.push(next);\n        ({ next } = next);\n    }\n    return siblings;\n}\n/**\n * Gets an attribute from an element.\n *\n * @category Traversal\n * @param elem Element to check.\n * @param name Attribute name to retrieve.\n * @returns The element's attribute value, or `undefined`.\n */\nexport function getAttributeValue(elem, name) {\n    var _a;\n    return (_a = elem.attribs) === null || _a === void 0 ? void 0 : _a[name];\n}\n/**\n * Checks whether an element has an attribute.\n *\n * @category Traversal\n * @param elem Element to check.\n * @param name Attribute name to look for.\n * @returns Returns whether `elem` has the attribute `name`.\n */\nexport function hasAttrib(elem, name) {\n    return (elem.attribs != null &&\n        Object.prototype.hasOwnProperty.call(elem.attribs, name) &&\n        elem.attribs[name] != null);\n}\n/**\n * Get the tag name of an element.\n *\n * @category Traversal\n * @param elem The element to get the name for.\n * @returns The tag name of `elem`.\n */\nexport function getName(elem) {\n    return elem.name;\n}\n/**\n * Returns the next element sibling of a node.\n *\n * @category Traversal\n * @param elem The element to get the next sibling of.\n * @returns `elem`'s next sibling that is a tag, or `null` if there is no next\n * sibling.\n */\nexport function nextElementSibling(elem) {\n    let { next } = elem;\n    while (next !== null && !isTag(next))\n        ({ next } = next);\n    return next;\n}\n/**\n * Returns the previous element sibling of a node.\n *\n * @category Traversal\n * @param elem The element to get the previous sibling of.\n * @returns `elem`'s previous sibling that is a tag, or `null` if there is no\n * previous sibling.\n */\nexport function prevElementSibling(elem) {\n    let { prev } = elem;\n    while (prev !== null && !isTag(prev))\n        ({ prev } = prev);\n    return prev;\n}\n//# sourceMappingURL=traversal.js.map","import htmlDecodeTree from \"./generated/decode-data-html.js\";\nimport xmlDecodeTree from \"./generated/decode-data-xml.js\";\nimport decodeCodePoint, { replaceCodePoint, fromCodePoint, } from \"./decode_codepoint.js\";\n// Re-export for use by eg. htmlparser2\nexport { htmlDecodeTree, xmlDecodeTree, decodeCodePoint };\nexport { replaceCodePoint, fromCodePoint } from \"./decode_codepoint.js\";\nvar CharCodes;\n(function (CharCodes) {\n    CharCodes[CharCodes[\"NUM\"] = 35] = \"NUM\";\n    CharCodes[CharCodes[\"SEMI\"] = 59] = \"SEMI\";\n    CharCodes[CharCodes[\"EQUALS\"] = 61] = \"EQUALS\";\n    CharCodes[CharCodes[\"ZERO\"] = 48] = \"ZERO\";\n    CharCodes[CharCodes[\"NINE\"] = 57] = \"NINE\";\n    CharCodes[CharCodes[\"LOWER_A\"] = 97] = \"LOWER_A\";\n    CharCodes[CharCodes[\"LOWER_F\"] = 102] = \"LOWER_F\";\n    CharCodes[CharCodes[\"LOWER_X\"] = 120] = \"LOWER_X\";\n    CharCodes[CharCodes[\"LOWER_Z\"] = 122] = \"LOWER_Z\";\n    CharCodes[CharCodes[\"UPPER_A\"] = 65] = \"UPPER_A\";\n    CharCodes[CharCodes[\"UPPER_F\"] = 70] = \"UPPER_F\";\n    CharCodes[CharCodes[\"UPPER_Z\"] = 90] = \"UPPER_Z\";\n})(CharCodes || (CharCodes = {}));\n/** Bit that needs to be set to convert an upper case ASCII character to lower case */\nconst TO_LOWER_BIT = 0b100000;\nexport var BinTrieFlags;\n(function (BinTrieFlags) {\n    BinTrieFlags[BinTrieFlags[\"VALUE_LENGTH\"] = 49152] = \"VALUE_LENGTH\";\n    BinTrieFlags[BinTrieFlags[\"BRANCH_LENGTH\"] = 16256] = \"BRANCH_LENGTH\";\n    BinTrieFlags[BinTrieFlags[\"JUMP_TABLE\"] = 127] = \"JUMP_TABLE\";\n})(BinTrieFlags || (BinTrieFlags = {}));\nfunction isNumber(code) {\n    return code >= CharCodes.ZERO && code <= CharCodes.NINE;\n}\nfunction isHexadecimalCharacter(code) {\n    return ((code >= CharCodes.UPPER_A && code <= CharCodes.UPPER_F) ||\n        (code >= CharCodes.LOWER_A && code <= CharCodes.LOWER_F));\n}\nfunction isAsciiAlphaNumeric(code) {\n    return ((code >= CharCodes.UPPER_A && code <= CharCodes.UPPER_Z) ||\n        (code >= CharCodes.LOWER_A && code <= CharCodes.LOWER_Z) ||\n        isNumber(code));\n}\n/**\n * Checks if the given character is a valid end character for an entity in an attribute.\n *\n * Attribute values that aren't terminated properly aren't parsed, and shouldn't lead to a parser error.\n * See the example in https://html.spec.whatwg.org/multipage/parsing.html#named-character-reference-state\n */\nfunction isEntityInAttributeInvalidEnd(code) {\n    return code === CharCodes.EQUALS || isAsciiAlphaNumeric(code);\n}\nvar EntityDecoderState;\n(function (EntityDecoderState) {\n    EntityDecoderState[EntityDecoderState[\"EntityStart\"] = 0] = \"EntityStart\";\n    EntityDecoderState[EntityDecoderState[\"NumericStart\"] = 1] = \"NumericStart\";\n    EntityDecoderState[EntityDecoderState[\"NumericDecimal\"] = 2] = \"NumericDecimal\";\n    EntityDecoderState[EntityDecoderState[\"NumericHex\"] = 3] = \"NumericHex\";\n    EntityDecoderState[EntityDecoderState[\"NamedEntity\"] = 4] = \"NamedEntity\";\n})(EntityDecoderState || (EntityDecoderState = {}));\nexport var DecodingMode;\n(function (DecodingMode) {\n    /** Entities in text nodes that can end with any character. */\n    DecodingMode[DecodingMode[\"Legacy\"] = 0] = \"Legacy\";\n    /** Only allow entities terminated with a semicolon. */\n    DecodingMode[DecodingMode[\"Strict\"] = 1] = \"Strict\";\n    /** Entities in attributes have limitations on ending characters. */\n    DecodingMode[DecodingMode[\"Attribute\"] = 2] = \"Attribute\";\n})(DecodingMode || (DecodingMode = {}));\n/**\n * Token decoder with support of writing partial entities.\n */\nexport class EntityDecoder {\n    constructor(\n    /** The tree used to decode entities. */\n    decodeTree, \n    /**\n     * The function that is called when a codepoint is decoded.\n     *\n     * For multi-byte named entities, this will be called multiple times,\n     * with the second codepoint, and the same `consumed` value.\n     *\n     * @param codepoint The decoded codepoint.\n     * @param consumed The number of bytes consumed by the decoder.\n     */\n    emitCodePoint, \n    /** An object that is used to produce errors. */\n    errors) {\n        this.decodeTree = decodeTree;\n        this.emitCodePoint = emitCodePoint;\n        this.errors = errors;\n        /** The current state of the decoder. */\n        this.state = EntityDecoderState.EntityStart;\n        /** Characters that were consumed while parsing an entity. */\n        this.consumed = 1;\n        /**\n         * The result of the entity.\n         *\n         * Either the result index of a numeric entity, or the codepoint of a\n         * numeric entity.\n         */\n        this.result = 0;\n        /** The current index in the decode tree. */\n        this.treeIndex = 0;\n        /** The number of characters that were consumed in excess. */\n        this.excess = 1;\n        /** The mode in which the decoder is operating. */\n        this.decodeMode = DecodingMode.Strict;\n    }\n    /** Resets the instance to make it reusable. */\n    startEntity(decodeMode) {\n        this.decodeMode = decodeMode;\n        this.state = EntityDecoderState.EntityStart;\n        this.result = 0;\n        this.treeIndex = 0;\n        this.excess = 1;\n        this.consumed = 1;\n    }\n    /**\n     * Write an entity to the decoder. This can be called multiple times with partial entities.\n     * If the entity is incomplete, the decoder will return -1.\n     *\n     * Mirrors the implementation of `getDecoder`, but with the ability to stop decoding if the\n     * entity is incomplete, and resume when the next string is written.\n     *\n     * @param string The string containing the entity (or a continuation of the entity).\n     * @param offset The offset at which the entity begins. Should be 0 if this is not the first call.\n     * @returns The number of characters that were consumed, or -1 if the entity is incomplete.\n     */\n    write(str, offset) {\n        switch (this.state) {\n            case EntityDecoderState.EntityStart: {\n                if (str.charCodeAt(offset) === CharCodes.NUM) {\n                    this.state = EntityDecoderState.NumericStart;\n                    this.consumed += 1;\n                    return this.stateNumericStart(str, offset + 1);\n                }\n                this.state = EntityDecoderState.NamedEntity;\n                return this.stateNamedEntity(str, offset);\n            }\n            case EntityDecoderState.NumericStart: {\n                return this.stateNumericStart(str, offset);\n            }\n            case EntityDecoderState.NumericDecimal: {\n                return this.stateNumericDecimal(str, offset);\n            }\n            case EntityDecoderState.NumericHex: {\n                return this.stateNumericHex(str, offset);\n            }\n            case EntityDecoderState.NamedEntity: {\n                return this.stateNamedEntity(str, offset);\n            }\n        }\n    }\n    /**\n     * Switches between the numeric decimal and hexadecimal states.\n     *\n     * Equivalent to the `Numeric character reference state` in the HTML spec.\n     *\n     * @param str The string containing the entity (or a continuation of the entity).\n     * @param offset The current offset.\n     * @returns The number of characters that were consumed, or -1 if the entity is incomplete.\n     */\n    stateNumericStart(str, offset) {\n        if (offset >= str.length) {\n            return -1;\n        }\n        if ((str.charCodeAt(offset) | TO_LOWER_BIT) === CharCodes.LOWER_X) {\n            this.state = EntityDecoderState.NumericHex;\n            this.consumed += 1;\n            return this.stateNumericHex(str, offset + 1);\n        }\n        this.state = EntityDecoderState.NumericDecimal;\n        return this.stateNumericDecimal(str, offset);\n    }\n    addToNumericResult(str, start, end, base) {\n        if (start !== end) {\n            const digitCount = end - start;\n            this.result =\n                this.result * Math.pow(base, digitCount) +\n                    parseInt(str.substr(start, digitCount), base);\n            this.consumed += digitCount;\n        }\n    }\n    /**\n     * Parses a hexadecimal numeric entity.\n     *\n     * Equivalent to the `Hexademical character reference state` in the HTML spec.\n     *\n     * @param str The string containing the entity (or a continuation of the entity).\n     * @param offset The current offset.\n     * @returns The number of characters that were consumed, or -1 if the entity is incomplete.\n     */\n    stateNumericHex(str, offset) {\n        const startIdx = offset;\n        while (offset < str.length) {\n            const char = str.charCodeAt(offset);\n            if (isNumber(char) || isHexadecimalCharacter(char)) {\n                offset += 1;\n            }\n            else {\n                this.addToNumericResult(str, startIdx, offset, 16);\n                return this.emitNumericEntity(char, 3);\n            }\n        }\n        this.addToNumericResult(str, startIdx, offset, 16);\n        return -1;\n    }\n    /**\n     * Parses a decimal numeric entity.\n     *\n     * Equivalent to the `Decimal character reference state` in the HTML spec.\n     *\n     * @param str The string containing the entity (or a continuation of the entity).\n     * @param offset The current offset.\n     * @returns The number of characters that were consumed, or -1 if the entity is incomplete.\n     */\n    stateNumericDecimal(str, offset) {\n        const startIdx = offset;\n        while (offset < str.length) {\n            const char = str.charCodeAt(offset);\n            if (isNumber(char)) {\n                offset += 1;\n            }\n            else {\n                this.addToNumericResult(str, startIdx, offset, 10);\n                return this.emitNumericEntity(char, 2);\n            }\n        }\n        this.addToNumericResult(str, startIdx, offset, 10);\n        return -1;\n    }\n    /**\n     * Validate and emit a numeric entity.\n     *\n     * Implements the logic from the `Hexademical character reference start\n     * state` and `Numeric character reference end state` in the HTML spec.\n     *\n     * @param lastCp The last code point of the entity. Used to see if the\n     *               entity was terminated with a semicolon.\n     * @param expectedLength The minimum number of characters that should be\n     *                       consumed. Used to validate that at least one digit\n     *                       was consumed.\n     * @returns The number of characters that were consumed.\n     */\n    emitNumericEntity(lastCp, expectedLength) {\n        var _a;\n        // Ensure we consumed at least one digit.\n        if (this.consumed <= expectedLength) {\n            (_a = this.errors) === null || _a === void 0 ? void 0 : _a.absenceOfDigitsInNumericCharacterReference(this.consumed);\n            return 0;\n        }\n        // Figure out if this is a legit end of the entity\n        if (lastCp === CharCodes.SEMI) {\n            this.consumed += 1;\n        }\n        else if (this.decodeMode === DecodingMode.Strict) {\n            return 0;\n        }\n        this.emitCodePoint(replaceCodePoint(this.result), this.consumed);\n        if (this.errors) {\n            if (lastCp !== CharCodes.SEMI) {\n                this.errors.missingSemicolonAfterCharacterReference();\n            }\n            this.errors.validateNumericCharacterReference(this.result);\n        }\n        return this.consumed;\n    }\n    /**\n     * Parses a named entity.\n     *\n     * Equivalent to the `Named character reference state` in the HTML spec.\n     *\n     * @param str The string containing the entity (or a continuation of the entity).\n     * @param offset The current offset.\n     * @returns The number of characters that were consumed, or -1 if the entity is incomplete.\n     */\n    stateNamedEntity(str, offset) {\n        const { decodeTree } = this;\n        let current = decodeTree[this.treeIndex];\n        // The mask is the number of bytes of the value, including the current byte.\n        let valueLength = (current & BinTrieFlags.VALUE_LENGTH) >> 14;\n        for (; offset < str.length; offset++, this.excess++) {\n            const char = str.charCodeAt(offset);\n            this.treeIndex = determineBranch(decodeTree, current, this.treeIndex + Math.max(1, valueLength), char);\n            if (this.treeIndex < 0) {\n                return this.result === 0 ||\n                    // If we are parsing an attribute\n                    (this.decodeMode === DecodingMode.Attribute &&\n                        // We shouldn't have consumed any characters after the entity,\n                        (valueLength === 0 ||\n                            // And there should be no invalid characters.\n                            isEntityInAttributeInvalidEnd(char)))\n                    ? 0\n                    : this.emitNotTerminatedNamedEntity();\n            }\n            current = decodeTree[this.treeIndex];\n            valueLength = (current & BinTrieFlags.VALUE_LENGTH) >> 14;\n            // If the branch is a value, store it and continue\n            if (valueLength !== 0) {\n                // If the entity is terminated by a semicolon, we are done.\n                if (char === CharCodes.SEMI) {\n                    return this.emitNamedEntityData(this.treeIndex, valueLength, this.consumed + this.excess);\n                }\n                // If we encounter a non-terminated (legacy) entity while parsing strictly, then ignore it.\n                if (this.decodeMode !== DecodingMode.Strict) {\n                    this.result = this.treeIndex;\n                    this.consumed += this.excess;\n                    this.excess = 0;\n                }\n            }\n        }\n        return -1;\n    }\n    /**\n     * Emit a named entity that was not terminated with a semicolon.\n     *\n     * @returns The number of characters consumed.\n     */\n    emitNotTerminatedNamedEntity() {\n        var _a;\n        const { result, decodeTree } = this;\n        const valueLength = (decodeTree[result] & BinTrieFlags.VALUE_LENGTH) >> 14;\n        this.emitNamedEntityData(result, valueLength, this.consumed);\n        (_a = this.errors) === null || _a === void 0 ? void 0 : _a.missingSemicolonAfterCharacterReference();\n        return this.consumed;\n    }\n    /**\n     * Emit a named entity.\n     *\n     * @param result The index of the entity in the decode tree.\n     * @param valueLength The number of bytes in the entity.\n     * @param consumed The number of characters consumed.\n     *\n     * @returns The number of characters consumed.\n     */\n    emitNamedEntityData(result, valueLength, consumed) {\n        const { decodeTree } = this;\n        this.emitCodePoint(valueLength === 1\n            ? decodeTree[result] & ~BinTrieFlags.VALUE_LENGTH\n            : decodeTree[result + 1], consumed);\n        if (valueLength === 3) {\n            // For multi-byte values, we need to emit the second byte.\n            this.emitCodePoint(decodeTree[result + 2], consumed);\n        }\n        return consumed;\n    }\n    /**\n     * Signal to the parser that the end of the input was reached.\n     *\n     * Remaining data will be emitted and relevant errors will be produced.\n     *\n     * @returns The number of characters consumed.\n     */\n    end() {\n        var _a;\n        switch (this.state) {\n            case EntityDecoderState.NamedEntity: {\n                // Emit a named entity if we have one.\n                return this.result !== 0 &&\n                    (this.decodeMode !== DecodingMode.Attribute ||\n                        this.result === this.treeIndex)\n                    ? this.emitNotTerminatedNamedEntity()\n                    : 0;\n            }\n            // Otherwise, emit a numeric entity if we have one.\n            case EntityDecoderState.NumericDecimal: {\n                return this.emitNumericEntity(0, 2);\n            }\n            case EntityDecoderState.NumericHex: {\n                return this.emitNumericEntity(0, 3);\n            }\n            case EntityDecoderState.NumericStart: {\n                (_a = this.errors) === null || _a === void 0 ? void 0 : _a.absenceOfDigitsInNumericCharacterReference(this.consumed);\n                return 0;\n            }\n            case EntityDecoderState.EntityStart: {\n                // Return 0 if we have no entity.\n                return 0;\n            }\n        }\n    }\n}\n/**\n * Creates a function that decodes entities in a string.\n *\n * @param decodeTree The decode tree.\n * @returns A function that decodes entities in a string.\n */\nfunction getDecoder(decodeTree) {\n    let ret = \"\";\n    const decoder = new EntityDecoder(decodeTree, (str) => (ret += fromCodePoint(str)));\n    return function decodeWithTrie(str, decodeMode) {\n        let lastIndex = 0;\n        let offset = 0;\n        while ((offset = str.indexOf(\"&\", offset)) >= 0) {\n            ret += str.slice(lastIndex, offset);\n            decoder.startEntity(decodeMode);\n            const len = decoder.write(str, \n            // Skip the \"&\"\n            offset + 1);\n            if (len < 0) {\n                lastIndex = offset + decoder.end();\n                break;\n            }\n            lastIndex = offset + len;\n            // If `len` is 0, skip the current `&` and continue.\n            offset = len === 0 ? lastIndex + 1 : lastIndex;\n        }\n        const result = ret + str.slice(lastIndex);\n        // Make sure we don't keep a reference to the final string.\n        ret = \"\";\n        return result;\n    };\n}\n/**\n * Determines the branch of the current node that is taken given the current\n * character. This function is used to traverse the trie.\n *\n * @param decodeTree The trie.\n * @param current The current node.\n * @param nodeIdx The index right after the current node and its value.\n * @param char The current character.\n * @returns The index of the next node, or -1 if no branch is taken.\n */\nexport function determineBranch(decodeTree, current, nodeIdx, char) {\n    const branchCount = (current & BinTrieFlags.BRANCH_LENGTH) >> 7;\n    const jumpOffset = current & BinTrieFlags.JUMP_TABLE;\n    // Case 1: Single branch encoded in jump offset\n    if (branchCount === 0) {\n        return jumpOffset !== 0 && char === jumpOffset ? nodeIdx : -1;\n    }\n    // Case 2: Multiple branches encoded in jump table\n    if (jumpOffset) {\n        const value = char - jumpOffset;\n        return value < 0 || value >= branchCount\n            ? -1\n            : decodeTree[nodeIdx + value] - 1;\n    }\n    // Case 3: Multiple branches encoded in dictionary\n    // Binary search for the character.\n    let lo = nodeIdx;\n    let hi = lo + branchCount - 1;\n    while (lo <= hi) {\n        const mid = (lo + hi) >>> 1;\n        const midVal = decodeTree[mid];\n        if (midVal < char) {\n            lo = mid + 1;\n        }\n        else if (midVal > char) {\n            hi = mid - 1;\n        }\n        else {\n            return decodeTree[mid + branchCount];\n        }\n    }\n    return -1;\n}\nconst htmlDecoder = getDecoder(htmlDecodeTree);\nconst xmlDecoder = getDecoder(xmlDecodeTree);\n/**\n * Decodes an HTML string.\n *\n * @param str The string to decode.\n * @param mode The decoding mode.\n * @returns The decoded string.\n */\nexport function decodeHTML(str, mode = DecodingMode.Legacy) {\n    return htmlDecoder(str, mode);\n}\n/**\n * Decodes an HTML string in an attribute.\n *\n * @param str The string to decode.\n * @returns The decoded string.\n */\nexport function decodeHTMLAttribute(str) {\n    return htmlDecoder(str, DecodingMode.Attribute);\n}\n/**\n * Decodes an HTML string, requiring all entities to be terminated by a semicolon.\n *\n * @param str The string to decode.\n * @returns The decoded string.\n */\nexport function decodeHTMLStrict(str) {\n    return htmlDecoder(str, DecodingMode.Strict);\n}\n/**\n * Decodes an XML string, requiring all entities to be terminated by a semicolon.\n *\n * @param str The string to decode.\n * @returns The decoded string.\n */\nexport function decodeXML(str) {\n    return xmlDecoder(str, DecodingMode.Strict);\n}\n//# sourceMappingURL=decode.js.map","// Adapted from https://github.com/mathiasbynens/he/blob/36afe179392226cf1b6ccdb16ebbb7a5a844d93a/src/he.js#L106-L134\nvar _a;\nconst decodeMap = new Map([\n    [0, 65533],\n    // C1 Unicode control character reference replacements\n    [128, 8364],\n    [130, 8218],\n    [131, 402],\n    [132, 8222],\n    [133, 8230],\n    [134, 8224],\n    [135, 8225],\n    [136, 710],\n    [137, 8240],\n    [138, 352],\n    [139, 8249],\n    [140, 338],\n    [142, 381],\n    [145, 8216],\n    [146, 8217],\n    [147, 8220],\n    [148, 8221],\n    [149, 8226],\n    [150, 8211],\n    [151, 8212],\n    [152, 732],\n    [153, 8482],\n    [154, 353],\n    [155, 8250],\n    [156, 339],\n    [158, 382],\n    [159, 376],\n]);\n/**\n * Polyfill for `String.fromCodePoint`. It is used to create a string from a Unicode code point.\n */\nexport const fromCodePoint = \n// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition, node/no-unsupported-features/es-builtins\n(_a = String.fromCodePoint) !== null && _a !== void 0 ? _a : function (codePoint) {\n    let output = \"\";\n    if (codePoint > 0xffff) {\n        codePoint -= 0x10000;\n        output += String.fromCharCode(((codePoint >>> 10) & 0x3ff) | 0xd800);\n        codePoint = 0xdc00 | (codePoint & 0x3ff);\n    }\n    output += String.fromCharCode(codePoint);\n    return output;\n};\n/**\n * Replace the given code point with a replacement character if it is a\n * surrogate or is outside the valid range. Otherwise return the code\n * point unchanged.\n */\nexport function replaceCodePoint(codePoint) {\n    var _a;\n    if ((codePoint >= 0xd800 && codePoint <= 0xdfff) || codePoint > 0x10ffff) {\n        return 0xfffd;\n    }\n    return (_a = decodeMap.get(codePoint)) !== null && _a !== void 0 ? _a : codePoint;\n}\n/**\n * Replace the code point if relevant, then convert it to a string.\n *\n * @deprecated Use `fromCodePoint(replaceCodePoint(codePoint))` instead.\n * @param codePoint The code point to decode.\n * @returns The decoded code point.\n */\nexport default function decodeCodePoint(codePoint) {\n    return fromCodePoint(replaceCodePoint(codePoint));\n}\n//# sourceMappingURL=decode_codepoint.js.map","import htmlTrie from \"./generated/encode-html.js\";\nimport { xmlReplacer, getCodePoint } from \"./escape.js\";\nconst htmlReplacer = /[\\t\\n!-,./:-@[-`\\f{-}$\\x80-\\uFFFF]/g;\n/**\n * Encodes all characters in the input using HTML entities. This includes\n * characters that are valid ASCII characters in HTML documents, such as `#`.\n *\n * To get a more compact output, consider using the `encodeNonAsciiHTML`\n * function, which will only encode characters that are not valid in HTML\n * documents, as well as non-ASCII characters.\n *\n * If a character has no equivalent entity, a numeric hexadecimal reference\n * (eg. `&#xfc;`) will be used.\n */\nexport function encodeHTML(data) {\n    return encodeHTMLTrieRe(htmlReplacer, data);\n}\n/**\n * Encodes all non-ASCII characters, as well as characters not valid in HTML\n * documents using HTML entities. This function will not encode characters that\n * are valid in HTML documents, such as `#`.\n *\n * If a character has no equivalent entity, a numeric hexadecimal reference\n * (eg. `&#xfc;`) will be used.\n */\nexport function encodeNonAsciiHTML(data) {\n    return encodeHTMLTrieRe(xmlReplacer, data);\n}\nfunction encodeHTMLTrieRe(regExp, str) {\n    let ret = \"\";\n    let lastIdx = 0;\n    let match;\n    while ((match = regExp.exec(str)) !== null) {\n        const i = match.index;\n        ret += str.substring(lastIdx, i);\n        const char = str.charCodeAt(i);\n        let next = htmlTrie.get(char);\n        if (typeof next === \"object\") {\n            // We are in a branch. Try to match the next char.\n            if (i + 1 < str.length) {\n                const nextChar = str.charCodeAt(i + 1);\n                const value = typeof next.n === \"number\"\n                    ? next.n === nextChar\n                        ? next.o\n                        : undefined\n                    : next.n.get(nextChar);\n                if (value !== undefined) {\n                    ret += value;\n                    lastIdx = regExp.lastIndex += 1;\n                    continue;\n                }\n            }\n            next = next.v;\n        }\n        // We might have a tree node without a value; skip and use a numeric entity.\n        if (next !== undefined) {\n            ret += next;\n            lastIdx = i + 1;\n        }\n        else {\n            const cp = getCodePoint(str, i);\n            ret += `&#x${cp.toString(16)};`;\n            // Increase by 1 if we have a surrogate pair\n            lastIdx = regExp.lastIndex += Number(cp !== char);\n        }\n    }\n    return ret + str.substr(lastIdx);\n}\n//# sourceMappingURL=encode.js.map","export const xmlReplacer = /[\"&'<>$\\x80-\\uFFFF]/g;\nconst xmlCodeMap = new Map([\n    [34, \"&quot;\"],\n    [38, \"&amp;\"],\n    [39, \"&apos;\"],\n    [60, \"&lt;\"],\n    [62, \"&gt;\"],\n]);\n// For compatibility with node < 4, we wrap `codePointAt`\nexport const getCodePoint = \n// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\nString.prototype.codePointAt != null\n    ? (str, index) => str.codePointAt(index)\n    : // http://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae\n        (c, index) => (c.charCodeAt(index) & 0xfc00) === 0xd800\n            ? (c.charCodeAt(index) - 0xd800) * 0x400 +\n                c.charCodeAt(index + 1) -\n                0xdc00 +\n                0x10000\n            : c.charCodeAt(index);\n/**\n * Encodes all non-ASCII characters, as well as characters not valid in XML\n * documents using XML entities.\n *\n * If a character has no equivalent entity, a\n * numeric hexadecimal reference (eg. `&#xfc;`) will be used.\n */\nexport function encodeXML(str) {\n    let ret = \"\";\n    let lastIdx = 0;\n    let match;\n    while ((match = xmlReplacer.exec(str)) !== null) {\n        const i = match.index;\n        const char = str.charCodeAt(i);\n        const next = xmlCodeMap.get(char);\n        if (next !== undefined) {\n            ret += str.substring(lastIdx, i) + next;\n            lastIdx = i + 1;\n        }\n        else {\n            ret += `${str.substring(lastIdx, i)}&#x${getCodePoint(str, i).toString(16)};`;\n            // Increase by 1 if we have a surrogate pair\n            lastIdx = xmlReplacer.lastIndex += Number((char & 0xfc00) === 0xd800);\n        }\n    }\n    return ret + str.substr(lastIdx);\n}\n/**\n * Encodes all non-ASCII characters, as well as characters not valid in XML\n * documents using numeric hexadecimal reference (eg. `&#xfc;`).\n *\n * Have a look at `escapeUTF8` if you want a more concise output at the expense\n * of reduced transportability.\n *\n * @param data String to escape.\n */\nexport const escape = encodeXML;\n/**\n * Creates a function that escapes all characters matched by the given regular\n * expression using the given map of characters to escape to their entities.\n *\n * @param regex Regular expression to match characters to escape.\n * @param map Map of characters to escape to their entities.\n *\n * @returns Function that escapes all characters matched by the given regular\n * expression using the given map of characters to escape to their entities.\n */\nfunction getEscaper(regex, map) {\n    return function escape(data) {\n        let match;\n        let lastIdx = 0;\n        let result = \"\";\n        while ((match = regex.exec(data))) {\n            if (lastIdx !== match.index) {\n                result += data.substring(lastIdx, match.index);\n            }\n            // We know that this character will be in the map.\n            result += map.get(match[0].charCodeAt(0));\n            // Every match will be of length 1\n            lastIdx = match.index + 1;\n        }\n        return result + data.substring(lastIdx);\n    };\n}\n/**\n * Encodes all characters not valid in XML documents using XML entities.\n *\n * Note that the output will be character-set dependent.\n *\n * @param data String to escape.\n */\nexport const escapeUTF8 = getEscaper(/[&<>'\"]/g, xmlCodeMap);\n/**\n * Encodes all characters that have to be escaped in HTML attributes,\n * following {@link https://html.spec.whatwg.org/multipage/parsing.html#escapingString}.\n *\n * @param data String to escape.\n */\nexport const escapeAttribute = getEscaper(/[\"&\\u00A0]/g, new Map([\n    [34, \"&quot;\"],\n    [38, \"&amp;\"],\n    [160, \"&nbsp;\"],\n]));\n/**\n * Encodes all characters that have to be escaped in HTML text,\n * following {@link https://html.spec.whatwg.org/multipage/parsing.html#escapingString}.\n *\n * @param data String to escape.\n */\nexport const escapeText = getEscaper(/[&<>\\u00A0]/g, new Map([\n    [38, \"&amp;\"],\n    [60, \"&lt;\"],\n    [62, \"&gt;\"],\n    [160, \"&nbsp;\"],\n]));\n//# sourceMappingURL=escape.js.map","// Generated using scripts/write-decode-map.ts\nexport default new Uint16Array(\n// prettier-ignore\n\"\\u1d41<\\xd5\\u0131\\u028a\\u049d\\u057b\\u05d0\\u0675\\u06de\\u07a2\\u07d6\\u080f\\u0a4a\\u0a91\\u0da1\\u0e6d\\u0f09\\u0f26\\u10ca\\u1228\\u12e1\\u1415\\u149d\\u14c3\\u14df\\u1525\\0\\0\\0\\0\\0\\0\\u156b\\u16cd\\u198d\\u1c12\\u1ddd\\u1f7e\\u2060\\u21b0\\u228d\\u23c0\\u23fb\\u2442\\u2824\\u2912\\u2d08\\u2e48\\u2fce\\u3016\\u32ba\\u3639\\u37ac\\u38fe\\u3a28\\u3a71\\u3ae0\\u3b2e\\u0800EMabcfglmnoprstu\\\\bfms\\x7f\\x84\\x8b\\x90\\x95\\x98\\xa6\\xb3\\xb9\\xc8\\xcflig\\u803b\\xc6\\u40c6P\\u803b&\\u4026cute\\u803b\\xc1\\u40c1reve;\\u4102\\u0100iyx}rc\\u803b\\xc2\\u40c2;\\u4410r;\\uc000\\ud835\\udd04rave\\u803b\\xc0\\u40c0pha;\\u4391acr;\\u4100d;\\u6a53\\u0100gp\\x9d\\xa1on;\\u4104f;\\uc000\\ud835\\udd38plyFunction;\\u6061ing\\u803b\\xc5\\u40c5\\u0100cs\\xbe\\xc3r;\\uc000\\ud835\\udc9cign;\\u6254ilde\\u803b\\xc3\\u40c3ml\\u803b\\xc4\\u40c4\\u0400aceforsu\\xe5\\xfb\\xfe\\u0117\\u011c\\u0122\\u0127\\u012a\\u0100cr\\xea\\xf2kslash;\\u6216\\u0176\\xf6\\xf8;\\u6ae7ed;\\u6306y;\\u4411\\u0180crt\\u0105\\u010b\\u0114ause;\\u6235noullis;\\u612ca;\\u4392r;\\uc000\\ud835\\udd05pf;\\uc000\\ud835\\udd39eve;\\u42d8c\\xf2\\u0113mpeq;\\u624e\\u0700HOacdefhilorsu\\u014d\\u0151\\u0156\\u0180\\u019e\\u01a2\\u01b5\\u01b7\\u01ba\\u01dc\\u0215\\u0273\\u0278\\u027ecy;\\u4427PY\\u803b\\xa9\\u40a9\\u0180cpy\\u015d\\u0162\\u017aute;\\u4106\\u0100;i\\u0167\\u0168\\u62d2talDifferentialD;\\u6145leys;\\u612d\\u0200aeio\\u0189\\u018e\\u0194\\u0198ron;\\u410cdil\\u803b\\xc7\\u40c7rc;\\u4108nint;\\u6230ot;\\u410a\\u0100dn\\u01a7\\u01adilla;\\u40b8terDot;\\u40b7\\xf2\\u017fi;\\u43a7rcle\\u0200DMPT\\u01c7\\u01cb\\u01d1\\u01d6ot;\\u6299inus;\\u6296lus;\\u6295imes;\\u6297o\\u0100cs\\u01e2\\u01f8kwiseContourIntegral;\\u6232eCurly\\u0100DQ\\u0203\\u020foubleQuote;\\u601duote;\\u6019\\u0200lnpu\\u021e\\u0228\\u0247\\u0255on\\u0100;e\\u0225\\u0226\\u6237;\\u6a74\\u0180git\\u022f\\u0236\\u023aruent;\\u6261nt;\\u622fourIntegral;\\u622e\\u0100fr\\u024c\\u024e;\\u6102oduct;\\u6210nterClockwiseContourIntegral;\\u6233oss;\\u6a2fcr;\\uc000\\ud835\\udc9ep\\u0100;C\\u0284\\u0285\\u62d3ap;\\u624d\\u0580DJSZacefios\\u02a0\\u02ac\\u02b0\\u02b4\\u02b8\\u02cb\\u02d7\\u02e1\\u02e6\\u0333\\u048d\\u0100;o\\u0179\\u02a5trahd;\\u6911cy;\\u4402cy;\\u4405cy;\\u440f\\u0180grs\\u02bf\\u02c4\\u02c7ger;\\u6021r;\\u61a1hv;\\u6ae4\\u0100ay\\u02d0\\u02d5ron;\\u410e;\\u4414l\\u0100;t\\u02dd\\u02de\\u6207a;\\u4394r;\\uc000\\ud835\\udd07\\u0100af\\u02eb\\u0327\\u0100cm\\u02f0\\u0322ritical\\u0200ADGT\\u0300\\u0306\\u0316\\u031ccute;\\u40b4o\\u0174\\u030b\\u030d;\\u42d9bleAcute;\\u42ddrave;\\u4060ilde;\\u42dcond;\\u62c4ferentialD;\\u6146\\u0470\\u033d\\0\\0\\0\\u0342\\u0354\\0\\u0405f;\\uc000\\ud835\\udd3b\\u0180;DE\\u0348\\u0349\\u034d\\u40a8ot;\\u60dcqual;\\u6250ble\\u0300CDLRUV\\u0363\\u0372\\u0382\\u03cf\\u03e2\\u03f8ontourIntegra\\xec\\u0239o\\u0274\\u0379\\0\\0\\u037b\\xbb\\u0349nArrow;\\u61d3\\u0100eo\\u0387\\u03a4ft\\u0180ART\\u0390\\u0396\\u03a1rrow;\\u61d0ightArrow;\\u61d4e\\xe5\\u02cang\\u0100LR\\u03ab\\u03c4eft\\u0100AR\\u03b3\\u03b9rrow;\\u67f8ightArrow;\\u67faightArrow;\\u67f9ight\\u0100AT\\u03d8\\u03derrow;\\u61d2ee;\\u62a8p\\u0241\\u03e9\\0\\0\\u03efrrow;\\u61d1ownArrow;\\u61d5erticalBar;\\u6225n\\u0300ABLRTa\\u0412\\u042a\\u0430\\u045e\\u047f\\u037crrow\\u0180;BU\\u041d\\u041e\\u0422\\u6193ar;\\u6913pArrow;\\u61f5reve;\\u4311eft\\u02d2\\u043a\\0\\u0446\\0\\u0450ightVector;\\u6950eeVector;\\u695eector\\u0100;B\\u0459\\u045a\\u61bdar;\\u6956ight\\u01d4\\u0467\\0\\u0471eeVector;\\u695fector\\u0100;B\\u047a\\u047b\\u61c1ar;\\u6957ee\\u0100;A\\u0486\\u0487\\u62a4rrow;\\u61a7\\u0100ct\\u0492\\u0497r;\\uc000\\ud835\\udc9frok;\\u4110\\u0800NTacdfglmopqstux\\u04bd\\u04c0\\u04c4\\u04cb\\u04de\\u04e2\\u04e7\\u04ee\\u04f5\\u0521\\u052f\\u0536\\u0552\\u055d\\u0560\\u0565G;\\u414aH\\u803b\\xd0\\u40d0cute\\u803b\\xc9\\u40c9\\u0180aiy\\u04d2\\u04d7\\u04dcron;\\u411arc\\u803b\\xca\\u40ca;\\u442dot;\\u4116r;\\uc000\\ud835\\udd08rave\\u803b\\xc8\\u40c8ement;\\u6208\\u0100ap\\u04fa\\u04fecr;\\u4112ty\\u0253\\u0506\\0\\0\\u0512mallSquare;\\u65fberySmallSquare;\\u65ab\\u0100gp\\u0526\\u052aon;\\u4118f;\\uc000\\ud835\\udd3csilon;\\u4395u\\u0100ai\\u053c\\u0549l\\u0100;T\\u0542\\u0543\\u6a75ilde;\\u6242librium;\\u61cc\\u0100ci\\u0557\\u055ar;\\u6130m;\\u6a73a;\\u4397ml\\u803b\\xcb\\u40cb\\u0100ip\\u056a\\u056fsts;\\u6203onentialE;\\u6147\\u0280cfios\\u0585\\u0588\\u058d\\u05b2\\u05ccy;\\u4424r;\\uc000\\ud835\\udd09lled\\u0253\\u0597\\0\\0\\u05a3mallSquare;\\u65fcerySmallSquare;\\u65aa\\u0370\\u05ba\\0\\u05bf\\0\\0\\u05c4f;\\uc000\\ud835\\udd3dAll;\\u6200riertrf;\\u6131c\\xf2\\u05cb\\u0600JTabcdfgorst\\u05e8\\u05ec\\u05ef\\u05fa\\u0600\\u0612\\u0616\\u061b\\u061d\\u0623\\u066c\\u0672cy;\\u4403\\u803b>\\u403emma\\u0100;d\\u05f7\\u05f8\\u4393;\\u43dcreve;\\u411e\\u0180eiy\\u0607\\u060c\\u0610dil;\\u4122rc;\\u411c;\\u4413ot;\\u4120r;\\uc000\\ud835\\udd0a;\\u62d9pf;\\uc000\\ud835\\udd3eeater\\u0300EFGLST\\u0635\\u0644\\u064e\\u0656\\u065b\\u0666qual\\u0100;L\\u063e\\u063f\\u6265ess;\\u62dbullEqual;\\u6267reater;\\u6aa2ess;\\u6277lantEqual;\\u6a7eilde;\\u6273cr;\\uc000\\ud835\\udca2;\\u626b\\u0400Aacfiosu\\u0685\\u068b\\u0696\\u069b\\u069e\\u06aa\\u06be\\u06caRDcy;\\u442a\\u0100ct\\u0690\\u0694ek;\\u42c7;\\u405eirc;\\u4124r;\\u610clbertSpace;\\u610b\\u01f0\\u06af\\0\\u06b2f;\\u610dizontalLine;\\u6500\\u0100ct\\u06c3\\u06c5\\xf2\\u06a9rok;\\u4126mp\\u0144\\u06d0\\u06d8ownHum\\xf0\\u012fqual;\\u624f\\u0700EJOacdfgmnostu\\u06fa\\u06fe\\u0703\\u0707\\u070e\\u071a\\u071e\\u0721\\u0728\\u0744\\u0778\\u078b\\u078f\\u0795cy;\\u4415lig;\\u4132cy;\\u4401cute\\u803b\\xcd\\u40cd\\u0100iy\\u0713\\u0718rc\\u803b\\xce\\u40ce;\\u4418ot;\\u4130r;\\u6111rave\\u803b\\xcc\\u40cc\\u0180;ap\\u0720\\u072f\\u073f\\u0100cg\\u0734\\u0737r;\\u412ainaryI;\\u6148lie\\xf3\\u03dd\\u01f4\\u0749\\0\\u0762\\u0100;e\\u074d\\u074e\\u622c\\u0100gr\\u0753\\u0758ral;\\u622bsection;\\u62c2isible\\u0100CT\\u076c\\u0772omma;\\u6063imes;\\u6062\\u0180gpt\\u077f\\u0783\\u0788on;\\u412ef;\\uc000\\ud835\\udd40a;\\u4399cr;\\u6110ilde;\\u4128\\u01eb\\u079a\\0\\u079ecy;\\u4406l\\u803b\\xcf\\u40cf\\u0280cfosu\\u07ac\\u07b7\\u07bc\\u07c2\\u07d0\\u0100iy\\u07b1\\u07b5rc;\\u4134;\\u4419r;\\uc000\\ud835\\udd0dpf;\\uc000\\ud835\\udd41\\u01e3\\u07c7\\0\\u07ccr;\\uc000\\ud835\\udca5rcy;\\u4408kcy;\\u4404\\u0380HJacfos\\u07e4\\u07e8\\u07ec\\u07f1\\u07fd\\u0802\\u0808cy;\\u4425cy;\\u440cppa;\\u439a\\u0100ey\\u07f6\\u07fbdil;\\u4136;\\u441ar;\\uc000\\ud835\\udd0epf;\\uc000\\ud835\\udd42cr;\\uc000\\ud835\\udca6\\u0580JTaceflmost\\u0825\\u0829\\u082c\\u0850\\u0863\\u09b3\\u09b8\\u09c7\\u09cd\\u0a37\\u0a47cy;\\u4409\\u803b<\\u403c\\u0280cmnpr\\u0837\\u083c\\u0841\\u0844\\u084dute;\\u4139bda;\\u439bg;\\u67ealacetrf;\\u6112r;\\u619e\\u0180aey\\u0857\\u085c\\u0861ron;\\u413ddil;\\u413b;\\u441b\\u0100fs\\u0868\\u0970t\\u0500ACDFRTUVar\\u087e\\u08a9\\u08b1\\u08e0\\u08e6\\u08fc\\u092f\\u095b\\u0390\\u096a\\u0100nr\\u0883\\u088fgleBracket;\\u67e8row\\u0180;BR\\u0899\\u089a\\u089e\\u6190ar;\\u61e4ightArrow;\\u61c6eiling;\\u6308o\\u01f5\\u08b7\\0\\u08c3bleBracket;\\u67e6n\\u01d4\\u08c8\\0\\u08d2eeVector;\\u6961ector\\u0100;B\\u08db\\u08dc\\u61c3ar;\\u6959loor;\\u630aight\\u0100AV\\u08ef\\u08f5rrow;\\u6194ector;\\u694e\\u0100er\\u0901\\u0917e\\u0180;AV\\u0909\\u090a\\u0910\\u62a3rrow;\\u61a4ector;\\u695aiangle\\u0180;BE\\u0924\\u0925\\u0929\\u62b2ar;\\u69cfqual;\\u62b4p\\u0180DTV\\u0937\\u0942\\u094cownVector;\\u6951eeVector;\\u6960ector\\u0100;B\\u0956\\u0957\\u61bfar;\\u6958ector\\u0100;B\\u0965\\u0966\\u61bcar;\\u6952ight\\xe1\\u039cs\\u0300EFGLST\\u097e\\u098b\\u0995\\u099d\\u09a2\\u09adqualGreater;\\u62daullEqual;\\u6266reater;\\u6276ess;\\u6aa1lantEqual;\\u6a7dilde;\\u6272r;\\uc000\\ud835\\udd0f\\u0100;e\\u09bd\\u09be\\u62d8ftarrow;\\u61daidot;\\u413f\\u0180npw\\u09d4\\u0a16\\u0a1bg\\u0200LRlr\\u09de\\u09f7\\u0a02\\u0a10eft\\u0100AR\\u09e6\\u09ecrrow;\\u67f5ightArrow;\\u67f7ightArrow;\\u67f6eft\\u0100ar\\u03b3\\u0a0aight\\xe1\\u03bfight\\xe1\\u03caf;\\uc000\\ud835\\udd43er\\u0100LR\\u0a22\\u0a2ceftArrow;\\u6199ightArrow;\\u6198\\u0180cht\\u0a3e\\u0a40\\u0a42\\xf2\\u084c;\\u61b0rok;\\u4141;\\u626a\\u0400acefiosu\\u0a5a\\u0a5d\\u0a60\\u0a77\\u0a7c\\u0a85\\u0a8b\\u0a8ep;\\u6905y;\\u441c\\u0100dl\\u0a65\\u0a6fiumSpace;\\u605flintrf;\\u6133r;\\uc000\\ud835\\udd10nusPlus;\\u6213pf;\\uc000\\ud835\\udd44c\\xf2\\u0a76;\\u439c\\u0480Jacefostu\\u0aa3\\u0aa7\\u0aad\\u0ac0\\u0b14\\u0b19\\u0d91\\u0d97\\u0d9ecy;\\u440acute;\\u4143\\u0180aey\\u0ab4\\u0ab9\\u0aberon;\\u4147dil;\\u4145;\\u441d\\u0180gsw\\u0ac7\\u0af0\\u0b0eative\\u0180MTV\\u0ad3\\u0adf\\u0ae8ediumSpace;\\u600bhi\\u0100cn\\u0ae6\\u0ad8\\xeb\\u0ad9eryThi\\xee\\u0ad9ted\\u0100GL\\u0af8\\u0b06reaterGreate\\xf2\\u0673essLes\\xf3\\u0a48Line;\\u400ar;\\uc000\\ud835\\udd11\\u0200Bnpt\\u0b22\\u0b28\\u0b37\\u0b3areak;\\u6060BreakingSpace;\\u40a0f;\\u6115\\u0680;CDEGHLNPRSTV\\u0b55\\u0b56\\u0b6a\\u0b7c\\u0ba1\\u0beb\\u0c04\\u0c5e\\u0c84\\u0ca6\\u0cd8\\u0d61\\u0d85\\u6aec\\u0100ou\\u0b5b\\u0b64ngruent;\\u6262pCap;\\u626doubleVerticalBar;\\u6226\\u0180lqx\\u0b83\\u0b8a\\u0b9bement;\\u6209ual\\u0100;T\\u0b92\\u0b93\\u6260ilde;\\uc000\\u2242\\u0338ists;\\u6204reater\\u0380;EFGLST\\u0bb6\\u0bb7\\u0bbd\\u0bc9\\u0bd3\\u0bd8\\u0be5\\u626fqual;\\u6271ullEqual;\\uc000\\u2267\\u0338reater;\\uc000\\u226b\\u0338ess;\\u6279lantEqual;\\uc000\\u2a7e\\u0338ilde;\\u6275ump\\u0144\\u0bf2\\u0bfdownHump;\\uc000\\u224e\\u0338qual;\\uc000\\u224f\\u0338e\\u0100fs\\u0c0a\\u0c27tTriangle\\u0180;BE\\u0c1a\\u0c1b\\u0c21\\u62eaar;\\uc000\\u29cf\\u0338qual;\\u62ecs\\u0300;EGLST\\u0c35\\u0c36\\u0c3c\\u0c44\\u0c4b\\u0c58\\u626equal;\\u6270reater;\\u6278ess;\\uc000\\u226a\\u0338lantEqual;\\uc000\\u2a7d\\u0338ilde;\\u6274ested\\u0100GL\\u0c68\\u0c79reaterGreater;\\uc000\\u2aa2\\u0338essLess;\\uc000\\u2aa1\\u0338recedes\\u0180;ES\\u0c92\\u0c93\\u0c9b\\u6280qual;\\uc000\\u2aaf\\u0338lantEqual;\\u62e0\\u0100ei\\u0cab\\u0cb9verseElement;\\u620cghtTriangle\\u0180;BE\\u0ccb\\u0ccc\\u0cd2\\u62ebar;\\uc000\\u29d0\\u0338qual;\\u62ed\\u0100qu\\u0cdd\\u0d0cuareSu\\u0100bp\\u0ce8\\u0cf9set\\u0100;E\\u0cf0\\u0cf3\\uc000\\u228f\\u0338qual;\\u62e2erset\\u0100;E\\u0d03\\u0d06\\uc000\\u2290\\u0338qual;\\u62e3\\u0180bcp\\u0d13\\u0d24\\u0d4eset\\u0100;E\\u0d1b\\u0d1e\\uc000\\u2282\\u20d2qual;\\u6288ceeds\\u0200;EST\\u0d32\\u0d33\\u0d3b\\u0d46\\u6281qual;\\uc000\\u2ab0\\u0338lantEqual;\\u62e1ilde;\\uc000\\u227f\\u0338erset\\u0100;E\\u0d58\\u0d5b\\uc000\\u2283\\u20d2qual;\\u6289ilde\\u0200;EFT\\u0d6e\\u0d6f\\u0d75\\u0d7f\\u6241qual;\\u6244ullEqual;\\u6247ilde;\\u6249erticalBar;\\u6224cr;\\uc000\\ud835\\udca9ilde\\u803b\\xd1\\u40d1;\\u439d\\u0700Eacdfgmoprstuv\\u0dbd\\u0dc2\\u0dc9\\u0dd5\\u0ddb\\u0de0\\u0de7\\u0dfc\\u0e02\\u0e20\\u0e22\\u0e32\\u0e3f\\u0e44lig;\\u4152cute\\u803b\\xd3\\u40d3\\u0100iy\\u0dce\\u0dd3rc\\u803b\\xd4\\u40d4;\\u441eblac;\\u4150r;\\uc000\\ud835\\udd12rave\\u803b\\xd2\\u40d2\\u0180aei\\u0dee\\u0df2\\u0df6cr;\\u414cga;\\u43a9cron;\\u439fpf;\\uc000\\ud835\\udd46enCurly\\u0100DQ\\u0e0e\\u0e1aoubleQuote;\\u601cuote;\\u6018;\\u6a54\\u0100cl\\u0e27\\u0e2cr;\\uc000\\ud835\\udcaaash\\u803b\\xd8\\u40d8i\\u016c\\u0e37\\u0e3cde\\u803b\\xd5\\u40d5es;\\u6a37ml\\u803b\\xd6\\u40d6er\\u0100BP\\u0e4b\\u0e60\\u0100ar\\u0e50\\u0e53r;\\u603eac\\u0100ek\\u0e5a\\u0e5c;\\u63deet;\\u63b4arenthesis;\\u63dc\\u0480acfhilors\\u0e7f\\u0e87\\u0e8a\\u0e8f\\u0e92\\u0e94\\u0e9d\\u0eb0\\u0efcrtialD;\\u6202y;\\u441fr;\\uc000\\ud835\\udd13i;\\u43a6;\\u43a0usMinus;\\u40b1\\u0100ip\\u0ea2\\u0eadncareplan\\xe5\\u069df;\\u6119\\u0200;eio\\u0eb9\\u0eba\\u0ee0\\u0ee4\\u6abbcedes\\u0200;EST\\u0ec8\\u0ec9\\u0ecf\\u0eda\\u627aqual;\\u6aaflantEqual;\\u627cilde;\\u627eme;\\u6033\\u0100dp\\u0ee9\\u0eeeuct;\\u620fortion\\u0100;a\\u0225\\u0ef9l;\\u621d\\u0100ci\\u0f01\\u0f06r;\\uc000\\ud835\\udcab;\\u43a8\\u0200Ufos\\u0f11\\u0f16\\u0f1b\\u0f1fOT\\u803b\\\"\\u4022r;\\uc000\\ud835\\udd14pf;\\u611acr;\\uc000\\ud835\\udcac\\u0600BEacefhiorsu\\u0f3e\\u0f43\\u0f47\\u0f60\\u0f73\\u0fa7\\u0faa\\u0fad\\u1096\\u10a9\\u10b4\\u10bearr;\\u6910G\\u803b\\xae\\u40ae\\u0180cnr\\u0f4e\\u0f53\\u0f56ute;\\u4154g;\\u67ebr\\u0100;t\\u0f5c\\u0f5d\\u61a0l;\\u6916\\u0180aey\\u0f67\\u0f6c\\u0f71ron;\\u4158dil;\\u4156;\\u4420\\u0100;v\\u0f78\\u0f79\\u611cerse\\u0100EU\\u0f82\\u0f99\\u0100lq\\u0f87\\u0f8eement;\\u620builibrium;\\u61cbpEquilibrium;\\u696fr\\xbb\\u0f79o;\\u43a1ght\\u0400ACDFTUVa\\u0fc1\\u0feb\\u0ff3\\u1022\\u1028\\u105b\\u1087\\u03d8\\u0100nr\\u0fc6\\u0fd2gleBracket;\\u67e9row\\u0180;BL\\u0fdc\\u0fdd\\u0fe1\\u6192ar;\\u61e5eftArrow;\\u61c4eiling;\\u6309o\\u01f5\\u0ff9\\0\\u1005bleBracket;\\u67e7n\\u01d4\\u100a\\0\\u1014eeVector;\\u695dector\\u0100;B\\u101d\\u101e\\u61c2ar;\\u6955loor;\\u630b\\u0100er\\u102d\\u1043e\\u0180;AV\\u1035\\u1036\\u103c\\u62a2rrow;\\u61a6ector;\\u695biangle\\u0180;BE\\u1050\\u1051\\u1055\\u62b3ar;\\u69d0qual;\\u62b5p\\u0180DTV\\u1063\\u106e\\u1078ownVector;\\u694feeVector;\\u695cector\\u0100;B\\u1082\\u1083\\u61bear;\\u6954ector\\u0100;B\\u1091\\u1092\\u61c0ar;\\u6953\\u0100pu\\u109b\\u109ef;\\u611dndImplies;\\u6970ightarrow;\\u61db\\u0100ch\\u10b9\\u10bcr;\\u611b;\\u61b1leDelayed;\\u69f4\\u0680HOacfhimoqstu\\u10e4\\u10f1\\u10f7\\u10fd\\u1119\\u111e\\u1151\\u1156\\u1161\\u1167\\u11b5\\u11bb\\u11bf\\u0100Cc\\u10e9\\u10eeHcy;\\u4429y;\\u4428FTcy;\\u442ccute;\\u415a\\u0280;aeiy\\u1108\\u1109\\u110e\\u1113\\u1117\\u6abcron;\\u4160dil;\\u415erc;\\u415c;\\u4421r;\\uc000\\ud835\\udd16ort\\u0200DLRU\\u112a\\u1134\\u113e\\u1149ownArrow\\xbb\\u041eeftArrow\\xbb\\u089aightArrow\\xbb\\u0fddpArrow;\\u6191gma;\\u43a3allCircle;\\u6218pf;\\uc000\\ud835\\udd4a\\u0272\\u116d\\0\\0\\u1170t;\\u621aare\\u0200;ISU\\u117b\\u117c\\u1189\\u11af\\u65a1ntersection;\\u6293u\\u0100bp\\u118f\\u119eset\\u0100;E\\u1197\\u1198\\u628fqual;\\u6291erset\\u0100;E\\u11a8\\u11a9\\u6290qual;\\u6292nion;\\u6294cr;\\uc000\\ud835\\udcaear;\\u62c6\\u0200bcmp\\u11c8\\u11db\\u1209\\u120b\\u0100;s\\u11cd\\u11ce\\u62d0et\\u0100;E\\u11cd\\u11d5qual;\\u6286\\u0100ch\\u11e0\\u1205eeds\\u0200;EST\\u11ed\\u11ee\\u11f4\\u11ff\\u627bqual;\\u6ab0lantEqual;\\u627dilde;\\u627fTh\\xe1\\u0f8c;\\u6211\\u0180;es\\u1212\\u1213\\u1223\\u62d1rset\\u0100;E\\u121c\\u121d\\u6283qual;\\u6287et\\xbb\\u1213\\u0580HRSacfhiors\\u123e\\u1244\\u1249\\u1255\\u125e\\u1271\\u1276\\u129f\\u12c2\\u12c8\\u12d1ORN\\u803b\\xde\\u40deADE;\\u6122\\u0100Hc\\u124e\\u1252cy;\\u440by;\\u4426\\u0100bu\\u125a\\u125c;\\u4009;\\u43a4\\u0180aey\\u1265\\u126a\\u126fron;\\u4164dil;\\u4162;\\u4422r;\\uc000\\ud835\\udd17\\u0100ei\\u127b\\u1289\\u01f2\\u1280\\0\\u1287efore;\\u6234a;\\u4398\\u0100cn\\u128e\\u1298kSpace;\\uc000\\u205f\\u200aSpace;\\u6009lde\\u0200;EFT\\u12ab\\u12ac\\u12b2\\u12bc\\u623cqual;\\u6243ullEqual;\\u6245ilde;\\u6248pf;\\uc000\\ud835\\udd4bipleDot;\\u60db\\u0100ct\\u12d6\\u12dbr;\\uc000\\ud835\\udcafrok;\\u4166\\u0ae1\\u12f7\\u130e\\u131a\\u1326\\0\\u132c\\u1331\\0\\0\\0\\0\\0\\u1338\\u133d\\u1377\\u1385\\0\\u13ff\\u1404\\u140a\\u1410\\u0100cr\\u12fb\\u1301ute\\u803b\\xda\\u40dar\\u0100;o\\u1307\\u1308\\u619fcir;\\u6949r\\u01e3\\u1313\\0\\u1316y;\\u440eve;\\u416c\\u0100iy\\u131e\\u1323rc\\u803b\\xdb\\u40db;\\u4423blac;\\u4170r;\\uc000\\ud835\\udd18rave\\u803b\\xd9\\u40d9acr;\\u416a\\u0100di\\u1341\\u1369er\\u0100BP\\u1348\\u135d\\u0100ar\\u134d\\u1350r;\\u405fac\\u0100ek\\u1357\\u1359;\\u63dfet;\\u63b5arenthesis;\\u63ddon\\u0100;P\\u1370\\u1371\\u62c3lus;\\u628e\\u0100gp\\u137b\\u137fon;\\u4172f;\\uc000\\ud835\\udd4c\\u0400ADETadps\\u1395\\u13ae\\u13b8\\u13c4\\u03e8\\u13d2\\u13d7\\u13f3rrow\\u0180;BD\\u1150\\u13a0\\u13a4ar;\\u6912ownArrow;\\u61c5ownArrow;\\u6195quilibrium;\\u696eee\\u0100;A\\u13cb\\u13cc\\u62a5rrow;\\u61a5own\\xe1\\u03f3er\\u0100LR\\u13de\\u13e8eftArrow;\\u6196ightArrow;\\u6197i\\u0100;l\\u13f9\\u13fa\\u43d2on;\\u43a5ing;\\u416ecr;\\uc000\\ud835\\udcb0ilde;\\u4168ml\\u803b\\xdc\\u40dc\\u0480Dbcdefosv\\u1427\\u142c\\u1430\\u1433\\u143e\\u1485\\u148a\\u1490\\u1496ash;\\u62abar;\\u6aeby;\\u4412ash\\u0100;l\\u143b\\u143c\\u62a9;\\u6ae6\\u0100er\\u1443\\u1445;\\u62c1\\u0180bty\\u144c\\u1450\\u147aar;\\u6016\\u0100;i\\u144f\\u1455cal\\u0200BLST\\u1461\\u1465\\u146a\\u1474ar;\\u6223ine;\\u407ceparator;\\u6758ilde;\\u6240ThinSpace;\\u600ar;\\uc000\\ud835\\udd19pf;\\uc000\\ud835\\udd4dcr;\\uc000\\ud835\\udcb1dash;\\u62aa\\u0280cefos\\u14a7\\u14ac\\u14b1\\u14b6\\u14bcirc;\\u4174dge;\\u62c0r;\\uc000\\ud835\\udd1apf;\\uc000\\ud835\\udd4ecr;\\uc000\\ud835\\udcb2\\u0200fios\\u14cb\\u14d0\\u14d2\\u14d8r;\\uc000\\ud835\\udd1b;\\u439epf;\\uc000\\ud835\\udd4fcr;\\uc000\\ud835\\udcb3\\u0480AIUacfosu\\u14f1\\u14f5\\u14f9\\u14fd\\u1504\\u150f\\u1514\\u151a\\u1520cy;\\u442fcy;\\u4407cy;\\u442ecute\\u803b\\xdd\\u40dd\\u0100iy\\u1509\\u150drc;\\u4176;\\u442br;\\uc000\\ud835\\udd1cpf;\\uc000\\ud835\\udd50cr;\\uc000\\ud835\\udcb4ml;\\u4178\\u0400Hacdefos\\u1535\\u1539\\u153f\\u154b\\u154f\\u155d\\u1560\\u1564cy;\\u4416cute;\\u4179\\u0100ay\\u1544\\u1549ron;\\u417d;\\u4417ot;\\u417b\\u01f2\\u1554\\0\\u155boWidt\\xe8\\u0ad9a;\\u4396r;\\u6128pf;\\u6124cr;\\uc000\\ud835\\udcb5\\u0be1\\u1583\\u158a\\u1590\\0\\u15b0\\u15b6\\u15bf\\0\\0\\0\\0\\u15c6\\u15db\\u15eb\\u165f\\u166d\\0\\u1695\\u169b\\u16b2\\u16b9\\0\\u16becute\\u803b\\xe1\\u40e1reve;\\u4103\\u0300;Ediuy\\u159c\\u159d\\u15a1\\u15a3\\u15a8\\u15ad\\u623e;\\uc000\\u223e\\u0333;\\u623frc\\u803b\\xe2\\u40e2te\\u80bb\\xb4\\u0306;\\u4430lig\\u803b\\xe6\\u40e6\\u0100;r\\xb2\\u15ba;\\uc000\\ud835\\udd1erave\\u803b\\xe0\\u40e0\\u0100ep\\u15ca\\u15d6\\u0100fp\\u15cf\\u15d4sym;\\u6135\\xe8\\u15d3ha;\\u43b1\\u0100ap\\u15dfc\\u0100cl\\u15e4\\u15e7r;\\u4101g;\\u6a3f\\u0264\\u15f0\\0\\0\\u160a\\u0280;adsv\\u15fa\\u15fb\\u15ff\\u1601\\u1607\\u6227nd;\\u6a55;\\u6a5clope;\\u6a58;\\u6a5a\\u0380;elmrsz\\u1618\\u1619\\u161b\\u161e\\u163f\\u164f\\u1659\\u6220;\\u69a4e\\xbb\\u1619sd\\u0100;a\\u1625\\u1626\\u6221\\u0461\\u1630\\u1632\\u1634\\u1636\\u1638\\u163a\\u163c\\u163e;\\u69a8;\\u69a9;\\u69aa;\\u69ab;\\u69ac;\\u69ad;\\u69ae;\\u69aft\\u0100;v\\u1645\\u1646\\u621fb\\u0100;d\\u164c\\u164d\\u62be;\\u699d\\u0100pt\\u1654\\u1657h;\\u6222\\xbb\\xb9arr;\\u637c\\u0100gp\\u1663\\u1667on;\\u4105f;\\uc000\\ud835\\udd52\\u0380;Eaeiop\\u12c1\\u167b\\u167d\\u1682\\u1684\\u1687\\u168a;\\u6a70cir;\\u6a6f;\\u624ad;\\u624bs;\\u4027rox\\u0100;e\\u12c1\\u1692\\xf1\\u1683ing\\u803b\\xe5\\u40e5\\u0180cty\\u16a1\\u16a6\\u16a8r;\\uc000\\ud835\\udcb6;\\u402amp\\u0100;e\\u12c1\\u16af\\xf1\\u0288ilde\\u803b\\xe3\\u40e3ml\\u803b\\xe4\\u40e4\\u0100ci\\u16c2\\u16c8onin\\xf4\\u0272nt;\\u6a11\\u0800Nabcdefiklnoprsu\\u16ed\\u16f1\\u1730\\u173c\\u1743\\u1748\\u1778\\u177d\\u17e0\\u17e6\\u1839\\u1850\\u170d\\u193d\\u1948\\u1970ot;\\u6aed\\u0100cr\\u16f6\\u171ek\\u0200ceps\\u1700\\u1705\\u170d\\u1713ong;\\u624cpsilon;\\u43f6rime;\\u6035im\\u0100;e\\u171a\\u171b\\u623dq;\\u62cd\\u0176\\u1722\\u1726ee;\\u62bded\\u0100;g\\u172c\\u172d\\u6305e\\xbb\\u172drk\\u0100;t\\u135c\\u1737brk;\\u63b6\\u0100oy\\u1701\\u1741;\\u4431quo;\\u601e\\u0280cmprt\\u1753\\u175b\\u1761\\u1764\\u1768aus\\u0100;e\\u010a\\u0109ptyv;\\u69b0s\\xe9\\u170cno\\xf5\\u0113\\u0180ahw\\u176f\\u1771\\u1773;\\u43b2;\\u6136een;\\u626cr;\\uc000\\ud835\\udd1fg\\u0380costuvw\\u178d\\u179d\\u17b3\\u17c1\\u17d5\\u17db\\u17de\\u0180aiu\\u1794\\u1796\\u179a\\xf0\\u0760rc;\\u65efp\\xbb\\u1371\\u0180dpt\\u17a4\\u17a8\\u17adot;\\u6a00lus;\\u6a01imes;\\u6a02\\u0271\\u17b9\\0\\0\\u17becup;\\u6a06ar;\\u6605riangle\\u0100du\\u17cd\\u17d2own;\\u65bdp;\\u65b3plus;\\u6a04e\\xe5\\u1444\\xe5\\u14adarow;\\u690d\\u0180ako\\u17ed\\u1826\\u1835\\u0100cn\\u17f2\\u1823k\\u0180lst\\u17fa\\u05ab\\u1802ozenge;\\u69ebriangle\\u0200;dlr\\u1812\\u1813\\u1818\\u181d\\u65b4own;\\u65beeft;\\u65c2ight;\\u65b8k;\\u6423\\u01b1\\u182b\\0\\u1833\\u01b2\\u182f\\0\\u1831;\\u6592;\\u65914;\\u6593ck;\\u6588\\u0100eo\\u183e\\u184d\\u0100;q\\u1843\\u1846\\uc000=\\u20e5uiv;\\uc000\\u2261\\u20e5t;\\u6310\\u0200ptwx\\u1859\\u185e\\u1867\\u186cf;\\uc000\\ud835\\udd53\\u0100;t\\u13cb\\u1863om\\xbb\\u13cctie;\\u62c8\\u0600DHUVbdhmptuv\\u1885\\u1896\\u18aa\\u18bb\\u18d7\\u18db\\u18ec\\u18ff\\u1905\\u190a\\u1910\\u1921\\u0200LRlr\\u188e\\u1890\\u1892\\u1894;\\u6557;\\u6554;\\u6556;\\u6553\\u0280;DUdu\\u18a1\\u18a2\\u18a4\\u18a6\\u18a8\\u6550;\\u6566;\\u6569;\\u6564;\\u6567\\u0200LRlr\\u18b3\\u18b5\\u18b7\\u18b9;\\u655d;\\u655a;\\u655c;\\u6559\\u0380;HLRhlr\\u18ca\\u18cb\\u18cd\\u18cf\\u18d1\\u18d3\\u18d5\\u6551;\\u656c;\\u6563;\\u6560;\\u656b;\\u6562;\\u655fox;\\u69c9\\u0200LRlr\\u18e4\\u18e6\\u18e8\\u18ea;\\u6555;\\u6552;\\u6510;\\u650c\\u0280;DUdu\\u06bd\\u18f7\\u18f9\\u18fb\\u18fd;\\u6565;\\u6568;\\u652c;\\u6534inus;\\u629flus;\\u629eimes;\\u62a0\\u0200LRlr\\u1919\\u191b\\u191d\\u191f;\\u655b;\\u6558;\\u6518;\\u6514\\u0380;HLRhlr\\u1930\\u1931\\u1933\\u1935\\u1937\\u1939\\u193b\\u6502;\\u656a;\\u6561;\\u655e;\\u653c;\\u6524;\\u651c\\u0100ev\\u0123\\u1942bar\\u803b\\xa6\\u40a6\\u0200ceio\\u1951\\u1956\\u195a\\u1960r;\\uc000\\ud835\\udcb7mi;\\u604fm\\u0100;e\\u171a\\u171cl\\u0180;bh\\u1968\\u1969\\u196b\\u405c;\\u69c5sub;\\u67c8\\u016c\\u1974\\u197el\\u0100;e\\u1979\\u197a\\u6022t\\xbb\\u197ap\\u0180;Ee\\u012f\\u1985\\u1987;\\u6aae\\u0100;q\\u06dc\\u06db\\u0ce1\\u19a7\\0\\u19e8\\u1a11\\u1a15\\u1a32\\0\\u1a37\\u1a50\\0\\0\\u1ab4\\0\\0\\u1ac1\\0\\0\\u1b21\\u1b2e\\u1b4d\\u1b52\\0\\u1bfd\\0\\u1c0c\\u0180cpr\\u19ad\\u19b2\\u19ddute;\\u4107\\u0300;abcds\\u19bf\\u19c0\\u19c4\\u19ca\\u19d5\\u19d9\\u6229nd;\\u6a44rcup;\\u6a49\\u0100au\\u19cf\\u19d2p;\\u6a4bp;\\u6a47ot;\\u6a40;\\uc000\\u2229\\ufe00\\u0100eo\\u19e2\\u19e5t;\\u6041\\xee\\u0693\\u0200aeiu\\u19f0\\u19fb\\u1a01\\u1a05\\u01f0\\u19f5\\0\\u19f8s;\\u6a4don;\\u410ddil\\u803b\\xe7\\u40e7rc;\\u4109ps\\u0100;s\\u1a0c\\u1a0d\\u6a4cm;\\u6a50ot;\\u410b\\u0180dmn\\u1a1b\\u1a20\\u1a26il\\u80bb\\xb8\\u01adptyv;\\u69b2t\\u8100\\xa2;e\\u1a2d\\u1a2e\\u40a2r\\xe4\\u01b2r;\\uc000\\ud835\\udd20\\u0180cei\\u1a3d\\u1a40\\u1a4dy;\\u4447ck\\u0100;m\\u1a47\\u1a48\\u6713ark\\xbb\\u1a48;\\u43c7r\\u0380;Ecefms\\u1a5f\\u1a60\\u1a62\\u1a6b\\u1aa4\\u1aaa\\u1aae\\u65cb;\\u69c3\\u0180;el\\u1a69\\u1a6a\\u1a6d\\u42c6q;\\u6257e\\u0261\\u1a74\\0\\0\\u1a88rrow\\u0100lr\\u1a7c\\u1a81eft;\\u61baight;\\u61bb\\u0280RSacd\\u1a92\\u1a94\\u1a96\\u1a9a\\u1a9f\\xbb\\u0f47;\\u64c8st;\\u629birc;\\u629aash;\\u629dnint;\\u6a10id;\\u6aefcir;\\u69c2ubs\\u0100;u\\u1abb\\u1abc\\u6663it\\xbb\\u1abc\\u02ec\\u1ac7\\u1ad4\\u1afa\\0\\u1b0aon\\u0100;e\\u1acd\\u1ace\\u403a\\u0100;q\\xc7\\xc6\\u026d\\u1ad9\\0\\0\\u1ae2a\\u0100;t\\u1ade\\u1adf\\u402c;\\u4040\\u0180;fl\\u1ae8\\u1ae9\\u1aeb\\u6201\\xee\\u1160e\\u0100mx\\u1af1\\u1af6ent\\xbb\\u1ae9e\\xf3\\u024d\\u01e7\\u1afe\\0\\u1b07\\u0100;d\\u12bb\\u1b02ot;\\u6a6dn\\xf4\\u0246\\u0180fry\\u1b10\\u1b14\\u1b17;\\uc000\\ud835\\udd54o\\xe4\\u0254\\u8100\\xa9;s\\u0155\\u1b1dr;\\u6117\\u0100ao\\u1b25\\u1b29rr;\\u61b5ss;\\u6717\\u0100cu\\u1b32\\u1b37r;\\uc000\\ud835\\udcb8\\u0100bp\\u1b3c\\u1b44\\u0100;e\\u1b41\\u1b42\\u6acf;\\u6ad1\\u0100;e\\u1b49\\u1b4a\\u6ad0;\\u6ad2dot;\\u62ef\\u0380delprvw\\u1b60\\u1b6c\\u1b77\\u1b82\\u1bac\\u1bd4\\u1bf9arr\\u0100lr\\u1b68\\u1b6a;\\u6938;\\u6935\\u0270\\u1b72\\0\\0\\u1b75r;\\u62dec;\\u62dfarr\\u0100;p\\u1b7f\\u1b80\\u61b6;\\u693d\\u0300;bcdos\\u1b8f\\u1b90\\u1b96\\u1ba1\\u1ba5\\u1ba8\\u622arcap;\\u6a48\\u0100au\\u1b9b\\u1b9ep;\\u6a46p;\\u6a4aot;\\u628dr;\\u6a45;\\uc000\\u222a\\ufe00\\u0200alrv\\u1bb5\\u1bbf\\u1bde\\u1be3rr\\u0100;m\\u1bbc\\u1bbd\\u61b7;\\u693cy\\u0180evw\\u1bc7\\u1bd4\\u1bd8q\\u0270\\u1bce\\0\\0\\u1bd2re\\xe3\\u1b73u\\xe3\\u1b75ee;\\u62ceedge;\\u62cfen\\u803b\\xa4\\u40a4earrow\\u0100lr\\u1bee\\u1bf3eft\\xbb\\u1b80ight\\xbb\\u1bbde\\xe4\\u1bdd\\u0100ci\\u1c01\\u1c07onin\\xf4\\u01f7nt;\\u6231lcty;\\u632d\\u0980AHabcdefhijlorstuwz\\u1c38\\u1c3b\\u1c3f\\u1c5d\\u1c69\\u1c75\\u1c8a\\u1c9e\\u1cac\\u1cb7\\u1cfb\\u1cff\\u1d0d\\u1d7b\\u1d91\\u1dab\\u1dbb\\u1dc6\\u1dcdr\\xf2\\u0381ar;\\u6965\\u0200glrs\\u1c48\\u1c4d\\u1c52\\u1c54ger;\\u6020eth;\\u6138\\xf2\\u1133h\\u0100;v\\u1c5a\\u1c5b\\u6010\\xbb\\u090a\\u016b\\u1c61\\u1c67arow;\\u690fa\\xe3\\u0315\\u0100ay\\u1c6e\\u1c73ron;\\u410f;\\u4434\\u0180;ao\\u0332\\u1c7c\\u1c84\\u0100gr\\u02bf\\u1c81r;\\u61catseq;\\u6a77\\u0180glm\\u1c91\\u1c94\\u1c98\\u803b\\xb0\\u40b0ta;\\u43b4ptyv;\\u69b1\\u0100ir\\u1ca3\\u1ca8sht;\\u697f;\\uc000\\ud835\\udd21ar\\u0100lr\\u1cb3\\u1cb5\\xbb\\u08dc\\xbb\\u101e\\u0280aegsv\\u1cc2\\u0378\\u1cd6\\u1cdc\\u1ce0m\\u0180;os\\u0326\\u1cca\\u1cd4nd\\u0100;s\\u0326\\u1cd1uit;\\u6666amma;\\u43ddin;\\u62f2\\u0180;io\\u1ce7\\u1ce8\\u1cf8\\u40f7de\\u8100\\xf7;o\\u1ce7\\u1cf0ntimes;\\u62c7n\\xf8\\u1cf7cy;\\u4452c\\u026f\\u1d06\\0\\0\\u1d0arn;\\u631eop;\\u630d\\u0280lptuw\\u1d18\\u1d1d\\u1d22\\u1d49\\u1d55lar;\\u4024f;\\uc000\\ud835\\udd55\\u0280;emps\\u030b\\u1d2d\\u1d37\\u1d3d\\u1d42q\\u0100;d\\u0352\\u1d33ot;\\u6251inus;\\u6238lus;\\u6214quare;\\u62a1blebarwedg\\xe5\\xfan\\u0180adh\\u112e\\u1d5d\\u1d67ownarrow\\xf3\\u1c83arpoon\\u0100lr\\u1d72\\u1d76ef\\xf4\\u1cb4igh\\xf4\\u1cb6\\u0162\\u1d7f\\u1d85karo\\xf7\\u0f42\\u026f\\u1d8a\\0\\0\\u1d8ern;\\u631fop;\\u630c\\u0180cot\\u1d98\\u1da3\\u1da6\\u0100ry\\u1d9d\\u1da1;\\uc000\\ud835\\udcb9;\\u4455l;\\u69f6rok;\\u4111\\u0100dr\\u1db0\\u1db4ot;\\u62f1i\\u0100;f\\u1dba\\u1816\\u65bf\\u0100ah\\u1dc0\\u1dc3r\\xf2\\u0429a\\xf2\\u0fa6angle;\\u69a6\\u0100ci\\u1dd2\\u1dd5y;\\u445fgrarr;\\u67ff\\u0900Dacdefglmnopqrstux\\u1e01\\u1e09\\u1e19\\u1e38\\u0578\\u1e3c\\u1e49\\u1e61\\u1e7e\\u1ea5\\u1eaf\\u1ebd\\u1ee1\\u1f2a\\u1f37\\u1f44\\u1f4e\\u1f5a\\u0100Do\\u1e06\\u1d34o\\xf4\\u1c89\\u0100cs\\u1e0e\\u1e14ute\\u803b\\xe9\\u40e9ter;\\u6a6e\\u0200aioy\\u1e22\\u1e27\\u1e31\\u1e36ron;\\u411br\\u0100;c\\u1e2d\\u1e2e\\u6256\\u803b\\xea\\u40ealon;\\u6255;\\u444dot;\\u4117\\u0100Dr\\u1e41\\u1e45ot;\\u6252;\\uc000\\ud835\\udd22\\u0180;rs\\u1e50\\u1e51\\u1e57\\u6a9aave\\u803b\\xe8\\u40e8\\u0100;d\\u1e5c\\u1e5d\\u6a96ot;\\u6a98\\u0200;ils\\u1e6a\\u1e6b\\u1e72\\u1e74\\u6a99nters;\\u63e7;\\u6113\\u0100;d\\u1e79\\u1e7a\\u6a95ot;\\u6a97\\u0180aps\\u1e85\\u1e89\\u1e97cr;\\u4113ty\\u0180;sv\\u1e92\\u1e93\\u1e95\\u6205et\\xbb\\u1e93p\\u01001;\\u1e9d\\u1ea4\\u0133\\u1ea1\\u1ea3;\\u6004;\\u6005\\u6003\\u0100gs\\u1eaa\\u1eac;\\u414bp;\\u6002\\u0100gp\\u1eb4\\u1eb8on;\\u4119f;\\uc000\\ud835\\udd56\\u0180als\\u1ec4\\u1ece\\u1ed2r\\u0100;s\\u1eca\\u1ecb\\u62d5l;\\u69e3us;\\u6a71i\\u0180;lv\\u1eda\\u1edb\\u1edf\\u43b5on\\xbb\\u1edb;\\u43f5\\u0200csuv\\u1eea\\u1ef3\\u1f0b\\u1f23\\u0100io\\u1eef\\u1e31rc\\xbb\\u1e2e\\u0269\\u1ef9\\0\\0\\u1efb\\xed\\u0548ant\\u0100gl\\u1f02\\u1f06tr\\xbb\\u1e5dess\\xbb\\u1e7a\\u0180aei\\u1f12\\u1f16\\u1f1als;\\u403dst;\\u625fv\\u0100;D\\u0235\\u1f20D;\\u6a78parsl;\\u69e5\\u0100Da\\u1f2f\\u1f33ot;\\u6253rr;\\u6971\\u0180cdi\\u1f3e\\u1f41\\u1ef8r;\\u612fo\\xf4\\u0352\\u0100ah\\u1f49\\u1f4b;\\u43b7\\u803b\\xf0\\u40f0\\u0100mr\\u1f53\\u1f57l\\u803b\\xeb\\u40ebo;\\u60ac\\u0180cip\\u1f61\\u1f64\\u1f67l;\\u4021s\\xf4\\u056e\\u0100eo\\u1f6c\\u1f74ctatio\\xee\\u0559nential\\xe5\\u0579\\u09e1\\u1f92\\0\\u1f9e\\0\\u1fa1\\u1fa7\\0\\0\\u1fc6\\u1fcc\\0\\u1fd3\\0\\u1fe6\\u1fea\\u2000\\0\\u2008\\u205allingdotse\\xf1\\u1e44y;\\u4444male;\\u6640\\u0180ilr\\u1fad\\u1fb3\\u1fc1lig;\\u8000\\ufb03\\u0269\\u1fb9\\0\\0\\u1fbdg;\\u8000\\ufb00ig;\\u8000\\ufb04;\\uc000\\ud835\\udd23lig;\\u8000\\ufb01lig;\\uc000fj\\u0180alt\\u1fd9\\u1fdc\\u1fe1t;\\u666dig;\\u8000\\ufb02ns;\\u65b1of;\\u4192\\u01f0\\u1fee\\0\\u1ff3f;\\uc000\\ud835\\udd57\\u0100ak\\u05bf\\u1ff7\\u0100;v\\u1ffc\\u1ffd\\u62d4;\\u6ad9artint;\\u6a0d\\u0100ao\\u200c\\u2055\\u0100cs\\u2011\\u2052\\u03b1\\u201a\\u2030\\u2038\\u2045\\u2048\\0\\u2050\\u03b2\\u2022\\u2025\\u2027\\u202a\\u202c\\0\\u202e\\u803b\\xbd\\u40bd;\\u6153\\u803b\\xbc\\u40bc;\\u6155;\\u6159;\\u615b\\u01b3\\u2034\\0\\u2036;\\u6154;\\u6156\\u02b4\\u203e\\u2041\\0\\0\\u2043\\u803b\\xbe\\u40be;\\u6157;\\u615c5;\\u6158\\u01b6\\u204c\\0\\u204e;\\u615a;\\u615d8;\\u615el;\\u6044wn;\\u6322cr;\\uc000\\ud835\\udcbb\\u0880Eabcdefgijlnorstv\\u2082\\u2089\\u209f\\u20a5\\u20b0\\u20b4\\u20f0\\u20f5\\u20fa\\u20ff\\u2103\\u2112\\u2138\\u0317\\u213e\\u2152\\u219e\\u0100;l\\u064d\\u2087;\\u6a8c\\u0180cmp\\u2090\\u2095\\u209dute;\\u41f5ma\\u0100;d\\u209c\\u1cda\\u43b3;\\u6a86reve;\\u411f\\u0100iy\\u20aa\\u20aerc;\\u411d;\\u4433ot;\\u4121\\u0200;lqs\\u063e\\u0642\\u20bd\\u20c9\\u0180;qs\\u063e\\u064c\\u20c4lan\\xf4\\u0665\\u0200;cdl\\u0665\\u20d2\\u20d5\\u20e5c;\\u6aa9ot\\u0100;o\\u20dc\\u20dd\\u6a80\\u0100;l\\u20e2\\u20e3\\u6a82;\\u6a84\\u0100;e\\u20ea\\u20ed\\uc000\\u22db\\ufe00s;\\u6a94r;\\uc000\\ud835\\udd24\\u0100;g\\u0673\\u061bmel;\\u6137cy;\\u4453\\u0200;Eaj\\u065a\\u210c\\u210e\\u2110;\\u6a92;\\u6aa5;\\u6aa4\\u0200Eaes\\u211b\\u211d\\u2129\\u2134;\\u6269p\\u0100;p\\u2123\\u2124\\u6a8arox\\xbb\\u2124\\u0100;q\\u212e\\u212f\\u6a88\\u0100;q\\u212e\\u211bim;\\u62e7pf;\\uc000\\ud835\\udd58\\u0100ci\\u2143\\u2146r;\\u610am\\u0180;el\\u066b\\u214e\\u2150;\\u6a8e;\\u6a90\\u8300>;cdlqr\\u05ee\\u2160\\u216a\\u216e\\u2173\\u2179\\u0100ci\\u2165\\u2167;\\u6aa7r;\\u6a7aot;\\u62d7Par;\\u6995uest;\\u6a7c\\u0280adels\\u2184\\u216a\\u2190\\u0656\\u219b\\u01f0\\u2189\\0\\u218epro\\xf8\\u209er;\\u6978q\\u0100lq\\u063f\\u2196les\\xf3\\u2088i\\xed\\u066b\\u0100en\\u21a3\\u21adrtneqq;\\uc000\\u2269\\ufe00\\xc5\\u21aa\\u0500Aabcefkosy\\u21c4\\u21c7\\u21f1\\u21f5\\u21fa\\u2218\\u221d\\u222f\\u2268\\u227dr\\xf2\\u03a0\\u0200ilmr\\u21d0\\u21d4\\u21d7\\u21dbrs\\xf0\\u1484f\\xbb\\u2024il\\xf4\\u06a9\\u0100dr\\u21e0\\u21e4cy;\\u444a\\u0180;cw\\u08f4\\u21eb\\u21efir;\\u6948;\\u61adar;\\u610firc;\\u4125\\u0180alr\\u2201\\u220e\\u2213rts\\u0100;u\\u2209\\u220a\\u6665it\\xbb\\u220alip;\\u6026con;\\u62b9r;\\uc000\\ud835\\udd25s\\u0100ew\\u2223\\u2229arow;\\u6925arow;\\u6926\\u0280amopr\\u223a\\u223e\\u2243\\u225e\\u2263rr;\\u61fftht;\\u623bk\\u0100lr\\u2249\\u2253eftarrow;\\u61a9ightarrow;\\u61aaf;\\uc000\\ud835\\udd59bar;\\u6015\\u0180clt\\u226f\\u2274\\u2278r;\\uc000\\ud835\\udcbdas\\xe8\\u21f4rok;\\u4127\\u0100bp\\u2282\\u2287ull;\\u6043hen\\xbb\\u1c5b\\u0ae1\\u22a3\\0\\u22aa\\0\\u22b8\\u22c5\\u22ce\\0\\u22d5\\u22f3\\0\\0\\u22f8\\u2322\\u2367\\u2362\\u237f\\0\\u2386\\u23aa\\u23b4cute\\u803b\\xed\\u40ed\\u0180;iy\\u0771\\u22b0\\u22b5rc\\u803b\\xee\\u40ee;\\u4438\\u0100cx\\u22bc\\u22bfy;\\u4435cl\\u803b\\xa1\\u40a1\\u0100fr\\u039f\\u22c9;\\uc000\\ud835\\udd26rave\\u803b\\xec\\u40ec\\u0200;ino\\u073e\\u22dd\\u22e9\\u22ee\\u0100in\\u22e2\\u22e6nt;\\u6a0ct;\\u622dfin;\\u69dcta;\\u6129lig;\\u4133\\u0180aop\\u22fe\\u231a\\u231d\\u0180cgt\\u2305\\u2308\\u2317r;\\u412b\\u0180elp\\u071f\\u230f\\u2313in\\xe5\\u078ear\\xf4\\u0720h;\\u4131f;\\u62b7ed;\\u41b5\\u0280;cfot\\u04f4\\u232c\\u2331\\u233d\\u2341are;\\u6105in\\u0100;t\\u2338\\u2339\\u621eie;\\u69dddo\\xf4\\u2319\\u0280;celp\\u0757\\u234c\\u2350\\u235b\\u2361al;\\u62ba\\u0100gr\\u2355\\u2359er\\xf3\\u1563\\xe3\\u234darhk;\\u6a17rod;\\u6a3c\\u0200cgpt\\u236f\\u2372\\u2376\\u237by;\\u4451on;\\u412ff;\\uc000\\ud835\\udd5aa;\\u43b9uest\\u803b\\xbf\\u40bf\\u0100ci\\u238a\\u238fr;\\uc000\\ud835\\udcben\\u0280;Edsv\\u04f4\\u239b\\u239d\\u23a1\\u04f3;\\u62f9ot;\\u62f5\\u0100;v\\u23a6\\u23a7\\u62f4;\\u62f3\\u0100;i\\u0777\\u23aelde;\\u4129\\u01eb\\u23b8\\0\\u23bccy;\\u4456l\\u803b\\xef\\u40ef\\u0300cfmosu\\u23cc\\u23d7\\u23dc\\u23e1\\u23e7\\u23f5\\u0100iy\\u23d1\\u23d5rc;\\u4135;\\u4439r;\\uc000\\ud835\\udd27ath;\\u4237pf;\\uc000\\ud835\\udd5b\\u01e3\\u23ec\\0\\u23f1r;\\uc000\\ud835\\udcbfrcy;\\u4458kcy;\\u4454\\u0400acfghjos\\u240b\\u2416\\u2422\\u2427\\u242d\\u2431\\u2435\\u243bppa\\u0100;v\\u2413\\u2414\\u43ba;\\u43f0\\u0100ey\\u241b\\u2420dil;\\u4137;\\u443ar;\\uc000\\ud835\\udd28reen;\\u4138cy;\\u4445cy;\\u445cpf;\\uc000\\ud835\\udd5ccr;\\uc000\\ud835\\udcc0\\u0b80ABEHabcdefghjlmnoprstuv\\u2470\\u2481\\u2486\\u248d\\u2491\\u250e\\u253d\\u255a\\u2580\\u264e\\u265e\\u2665\\u2679\\u267d\\u269a\\u26b2\\u26d8\\u275d\\u2768\\u278b\\u27c0\\u2801\\u2812\\u0180art\\u2477\\u247a\\u247cr\\xf2\\u09c6\\xf2\\u0395ail;\\u691barr;\\u690e\\u0100;g\\u0994\\u248b;\\u6a8bar;\\u6962\\u0963\\u24a5\\0\\u24aa\\0\\u24b1\\0\\0\\0\\0\\0\\u24b5\\u24ba\\0\\u24c6\\u24c8\\u24cd\\0\\u24f9ute;\\u413amptyv;\\u69b4ra\\xee\\u084cbda;\\u43bbg\\u0180;dl\\u088e\\u24c1\\u24c3;\\u6991\\xe5\\u088e;\\u6a85uo\\u803b\\xab\\u40abr\\u0400;bfhlpst\\u0899\\u24de\\u24e6\\u24e9\\u24eb\\u24ee\\u24f1\\u24f5\\u0100;f\\u089d\\u24e3s;\\u691fs;\\u691d\\xeb\\u2252p;\\u61abl;\\u6939im;\\u6973l;\\u61a2\\u0180;ae\\u24ff\\u2500\\u2504\\u6aabil;\\u6919\\u0100;s\\u2509\\u250a\\u6aad;\\uc000\\u2aad\\ufe00\\u0180abr\\u2515\\u2519\\u251drr;\\u690crk;\\u6772\\u0100ak\\u2522\\u252cc\\u0100ek\\u2528\\u252a;\\u407b;\\u405b\\u0100es\\u2531\\u2533;\\u698bl\\u0100du\\u2539\\u253b;\\u698f;\\u698d\\u0200aeuy\\u2546\\u254b\\u2556\\u2558ron;\\u413e\\u0100di\\u2550\\u2554il;\\u413c\\xec\\u08b0\\xe2\\u2529;\\u443b\\u0200cqrs\\u2563\\u2566\\u256d\\u257da;\\u6936uo\\u0100;r\\u0e19\\u1746\\u0100du\\u2572\\u2577har;\\u6967shar;\\u694bh;\\u61b2\\u0280;fgqs\\u258b\\u258c\\u0989\\u25f3\\u25ff\\u6264t\\u0280ahlrt\\u2598\\u25a4\\u25b7\\u25c2\\u25e8rrow\\u0100;t\\u0899\\u25a1a\\xe9\\u24f6arpoon\\u0100du\\u25af\\u25b4own\\xbb\\u045ap\\xbb\\u0966eftarrows;\\u61c7ight\\u0180ahs\\u25cd\\u25d6\\u25derrow\\u0100;s\\u08f4\\u08a7arpoon\\xf3\\u0f98quigarro\\xf7\\u21f0hreetimes;\\u62cb\\u0180;qs\\u258b\\u0993\\u25falan\\xf4\\u09ac\\u0280;cdgs\\u09ac\\u260a\\u260d\\u261d\\u2628c;\\u6aa8ot\\u0100;o\\u2614\\u2615\\u6a7f\\u0100;r\\u261a\\u261b\\u6a81;\\u6a83\\u0100;e\\u2622\\u2625\\uc000\\u22da\\ufe00s;\\u6a93\\u0280adegs\\u2633\\u2639\\u263d\\u2649\\u264bppro\\xf8\\u24c6ot;\\u62d6q\\u0100gq\\u2643\\u2645\\xf4\\u0989gt\\xf2\\u248c\\xf4\\u099bi\\xed\\u09b2\\u0180ilr\\u2655\\u08e1\\u265asht;\\u697c;\\uc000\\ud835\\udd29\\u0100;E\\u099c\\u2663;\\u6a91\\u0161\\u2669\\u2676r\\u0100du\\u25b2\\u266e\\u0100;l\\u0965\\u2673;\\u696alk;\\u6584cy;\\u4459\\u0280;acht\\u0a48\\u2688\\u268b\\u2691\\u2696r\\xf2\\u25c1orne\\xf2\\u1d08ard;\\u696bri;\\u65fa\\u0100io\\u269f\\u26a4dot;\\u4140ust\\u0100;a\\u26ac\\u26ad\\u63b0che\\xbb\\u26ad\\u0200Eaes\\u26bb\\u26bd\\u26c9\\u26d4;\\u6268p\\u0100;p\\u26c3\\u26c4\\u6a89rox\\xbb\\u26c4\\u0100;q\\u26ce\\u26cf\\u6a87\\u0100;q\\u26ce\\u26bbim;\\u62e6\\u0400abnoptwz\\u26e9\\u26f4\\u26f7\\u271a\\u272f\\u2741\\u2747\\u2750\\u0100nr\\u26ee\\u26f1g;\\u67ecr;\\u61fdr\\xeb\\u08c1g\\u0180lmr\\u26ff\\u270d\\u2714eft\\u0100ar\\u09e6\\u2707ight\\xe1\\u09f2apsto;\\u67fcight\\xe1\\u09fdparrow\\u0100lr\\u2725\\u2729ef\\xf4\\u24edight;\\u61ac\\u0180afl\\u2736\\u2739\\u273dr;\\u6985;\\uc000\\ud835\\udd5dus;\\u6a2dimes;\\u6a34\\u0161\\u274b\\u274fst;\\u6217\\xe1\\u134e\\u0180;ef\\u2757\\u2758\\u1800\\u65cange\\xbb\\u2758ar\\u0100;l\\u2764\\u2765\\u4028t;\\u6993\\u0280achmt\\u2773\\u2776\\u277c\\u2785\\u2787r\\xf2\\u08a8orne\\xf2\\u1d8car\\u0100;d\\u0f98\\u2783;\\u696d;\\u600eri;\\u62bf\\u0300achiqt\\u2798\\u279d\\u0a40\\u27a2\\u27ae\\u27bbquo;\\u6039r;\\uc000\\ud835\\udcc1m\\u0180;eg\\u09b2\\u27aa\\u27ac;\\u6a8d;\\u6a8f\\u0100bu\\u252a\\u27b3o\\u0100;r\\u0e1f\\u27b9;\\u601arok;\\u4142\\u8400<;cdhilqr\\u082b\\u27d2\\u2639\\u27dc\\u27e0\\u27e5\\u27ea\\u27f0\\u0100ci\\u27d7\\u27d9;\\u6aa6r;\\u6a79re\\xe5\\u25f2mes;\\u62c9arr;\\u6976uest;\\u6a7b\\u0100Pi\\u27f5\\u27f9ar;\\u6996\\u0180;ef\\u2800\\u092d\\u181b\\u65c3r\\u0100du\\u2807\\u280dshar;\\u694ahar;\\u6966\\u0100en\\u2817\\u2821rtneqq;\\uc000\\u2268\\ufe00\\xc5\\u281e\\u0700Dacdefhilnopsu\\u2840\\u2845\\u2882\\u288e\\u2893\\u28a0\\u28a5\\u28a8\\u28da\\u28e2\\u28e4\\u0a83\\u28f3\\u2902Dot;\\u623a\\u0200clpr\\u284e\\u2852\\u2863\\u287dr\\u803b\\xaf\\u40af\\u0100et\\u2857\\u2859;\\u6642\\u0100;e\\u285e\\u285f\\u6720se\\xbb\\u285f\\u0100;s\\u103b\\u2868to\\u0200;dlu\\u103b\\u2873\\u2877\\u287bow\\xee\\u048cef\\xf4\\u090f\\xf0\\u13d1ker;\\u65ae\\u0100oy\\u2887\\u288cmma;\\u6a29;\\u443cash;\\u6014asuredangle\\xbb\\u1626r;\\uc000\\ud835\\udd2ao;\\u6127\\u0180cdn\\u28af\\u28b4\\u28c9ro\\u803b\\xb5\\u40b5\\u0200;acd\\u1464\\u28bd\\u28c0\\u28c4s\\xf4\\u16a7ir;\\u6af0ot\\u80bb\\xb7\\u01b5us\\u0180;bd\\u28d2\\u1903\\u28d3\\u6212\\u0100;u\\u1d3c\\u28d8;\\u6a2a\\u0163\\u28de\\u28e1p;\\u6adb\\xf2\\u2212\\xf0\\u0a81\\u0100dp\\u28e9\\u28eeels;\\u62a7f;\\uc000\\ud835\\udd5e\\u0100ct\\u28f8\\u28fdr;\\uc000\\ud835\\udcc2pos\\xbb\\u159d\\u0180;lm\\u2909\\u290a\\u290d\\u43bctimap;\\u62b8\\u0c00GLRVabcdefghijlmoprstuvw\\u2942\\u2953\\u297e\\u2989\\u2998\\u29da\\u29e9\\u2a15\\u2a1a\\u2a58\\u2a5d\\u2a83\\u2a95\\u2aa4\\u2aa8\\u2b04\\u2b07\\u2b44\\u2b7f\\u2bae\\u2c34\\u2c67\\u2c7c\\u2ce9\\u0100gt\\u2947\\u294b;\\uc000\\u22d9\\u0338\\u0100;v\\u2950\\u0bcf\\uc000\\u226b\\u20d2\\u0180elt\\u295a\\u2972\\u2976ft\\u0100ar\\u2961\\u2967rrow;\\u61cdightarrow;\\u61ce;\\uc000\\u22d8\\u0338\\u0100;v\\u297b\\u0c47\\uc000\\u226a\\u20d2ightarrow;\\u61cf\\u0100Dd\\u298e\\u2993ash;\\u62afash;\\u62ae\\u0280bcnpt\\u29a3\\u29a7\\u29ac\\u29b1\\u29ccla\\xbb\\u02deute;\\u4144g;\\uc000\\u2220\\u20d2\\u0280;Eiop\\u0d84\\u29bc\\u29c0\\u29c5\\u29c8;\\uc000\\u2a70\\u0338d;\\uc000\\u224b\\u0338s;\\u4149ro\\xf8\\u0d84ur\\u0100;a\\u29d3\\u29d4\\u666el\\u0100;s\\u29d3\\u0b38\\u01f3\\u29df\\0\\u29e3p\\u80bb\\xa0\\u0b37mp\\u0100;e\\u0bf9\\u0c00\\u0280aeouy\\u29f4\\u29fe\\u2a03\\u2a10\\u2a13\\u01f0\\u29f9\\0\\u29fb;\\u6a43on;\\u4148dil;\\u4146ng\\u0100;d\\u0d7e\\u2a0aot;\\uc000\\u2a6d\\u0338p;\\u6a42;\\u443dash;\\u6013\\u0380;Aadqsx\\u0b92\\u2a29\\u2a2d\\u2a3b\\u2a41\\u2a45\\u2a50rr;\\u61d7r\\u0100hr\\u2a33\\u2a36k;\\u6924\\u0100;o\\u13f2\\u13f0ot;\\uc000\\u2250\\u0338ui\\xf6\\u0b63\\u0100ei\\u2a4a\\u2a4ear;\\u6928\\xed\\u0b98ist\\u0100;s\\u0ba0\\u0b9fr;\\uc000\\ud835\\udd2b\\u0200Eest\\u0bc5\\u2a66\\u2a79\\u2a7c\\u0180;qs\\u0bbc\\u2a6d\\u0be1\\u0180;qs\\u0bbc\\u0bc5\\u2a74lan\\xf4\\u0be2i\\xed\\u0bea\\u0100;r\\u0bb6\\u2a81\\xbb\\u0bb7\\u0180Aap\\u2a8a\\u2a8d\\u2a91r\\xf2\\u2971rr;\\u61aear;\\u6af2\\u0180;sv\\u0f8d\\u2a9c\\u0f8c\\u0100;d\\u2aa1\\u2aa2\\u62fc;\\u62facy;\\u445a\\u0380AEadest\\u2ab7\\u2aba\\u2abe\\u2ac2\\u2ac5\\u2af6\\u2af9r\\xf2\\u2966;\\uc000\\u2266\\u0338rr;\\u619ar;\\u6025\\u0200;fqs\\u0c3b\\u2ace\\u2ae3\\u2aeft\\u0100ar\\u2ad4\\u2ad9rro\\xf7\\u2ac1ightarro\\xf7\\u2a90\\u0180;qs\\u0c3b\\u2aba\\u2aealan\\xf4\\u0c55\\u0100;s\\u0c55\\u2af4\\xbb\\u0c36i\\xed\\u0c5d\\u0100;r\\u0c35\\u2afei\\u0100;e\\u0c1a\\u0c25i\\xe4\\u0d90\\u0100pt\\u2b0c\\u2b11f;\\uc000\\ud835\\udd5f\\u8180\\xac;in\\u2b19\\u2b1a\\u2b36\\u40acn\\u0200;Edv\\u0b89\\u2b24\\u2b28\\u2b2e;\\uc000\\u22f9\\u0338ot;\\uc000\\u22f5\\u0338\\u01e1\\u0b89\\u2b33\\u2b35;\\u62f7;\\u62f6i\\u0100;v\\u0cb8\\u2b3c\\u01e1\\u0cb8\\u2b41\\u2b43;\\u62fe;\\u62fd\\u0180aor\\u2b4b\\u2b63\\u2b69r\\u0200;ast\\u0b7b\\u2b55\\u2b5a\\u2b5flle\\xec\\u0b7bl;\\uc000\\u2afd\\u20e5;\\uc000\\u2202\\u0338lint;\\u6a14\\u0180;ce\\u0c92\\u2b70\\u2b73u\\xe5\\u0ca5\\u0100;c\\u0c98\\u2b78\\u0100;e\\u0c92\\u2b7d\\xf1\\u0c98\\u0200Aait\\u2b88\\u2b8b\\u2b9d\\u2ba7r\\xf2\\u2988rr\\u0180;cw\\u2b94\\u2b95\\u2b99\\u619b;\\uc000\\u2933\\u0338;\\uc000\\u219d\\u0338ghtarrow\\xbb\\u2b95ri\\u0100;e\\u0ccb\\u0cd6\\u0380chimpqu\\u2bbd\\u2bcd\\u2bd9\\u2b04\\u0b78\\u2be4\\u2bef\\u0200;cer\\u0d32\\u2bc6\\u0d37\\u2bc9u\\xe5\\u0d45;\\uc000\\ud835\\udcc3ort\\u026d\\u2b05\\0\\0\\u2bd6ar\\xe1\\u2b56m\\u0100;e\\u0d6e\\u2bdf\\u0100;q\\u0d74\\u0d73su\\u0100bp\\u2beb\\u2bed\\xe5\\u0cf8\\xe5\\u0d0b\\u0180bcp\\u2bf6\\u2c11\\u2c19\\u0200;Ees\\u2bff\\u2c00\\u0d22\\u2c04\\u6284;\\uc000\\u2ac5\\u0338et\\u0100;e\\u0d1b\\u2c0bq\\u0100;q\\u0d23\\u2c00c\\u0100;e\\u0d32\\u2c17\\xf1\\u0d38\\u0200;Ees\\u2c22\\u2c23\\u0d5f\\u2c27\\u6285;\\uc000\\u2ac6\\u0338et\\u0100;e\\u0d58\\u2c2eq\\u0100;q\\u0d60\\u2c23\\u0200gilr\\u2c3d\\u2c3f\\u2c45\\u2c47\\xec\\u0bd7lde\\u803b\\xf1\\u40f1\\xe7\\u0c43iangle\\u0100lr\\u2c52\\u2c5ceft\\u0100;e\\u0c1a\\u2c5a\\xf1\\u0c26ight\\u0100;e\\u0ccb\\u2c65\\xf1\\u0cd7\\u0100;m\\u2c6c\\u2c6d\\u43bd\\u0180;es\\u2c74\\u2c75\\u2c79\\u4023ro;\\u6116p;\\u6007\\u0480DHadgilrs\\u2c8f\\u2c94\\u2c99\\u2c9e\\u2ca3\\u2cb0\\u2cb6\\u2cd3\\u2ce3ash;\\u62adarr;\\u6904p;\\uc000\\u224d\\u20d2ash;\\u62ac\\u0100et\\u2ca8\\u2cac;\\uc000\\u2265\\u20d2;\\uc000>\\u20d2nfin;\\u69de\\u0180Aet\\u2cbd\\u2cc1\\u2cc5rr;\\u6902;\\uc000\\u2264\\u20d2\\u0100;r\\u2cca\\u2ccd\\uc000<\\u20d2ie;\\uc000\\u22b4\\u20d2\\u0100At\\u2cd8\\u2cdcrr;\\u6903rie;\\uc000\\u22b5\\u20d2im;\\uc000\\u223c\\u20d2\\u0180Aan\\u2cf0\\u2cf4\\u2d02rr;\\u61d6r\\u0100hr\\u2cfa\\u2cfdk;\\u6923\\u0100;o\\u13e7\\u13e5ear;\\u6927\\u1253\\u1a95\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\u2d2d\\0\\u2d38\\u2d48\\u2d60\\u2d65\\u2d72\\u2d84\\u1b07\\0\\0\\u2d8d\\u2dab\\0\\u2dc8\\u2dce\\0\\u2ddc\\u2e19\\u2e2b\\u2e3e\\u2e43\\u0100cs\\u2d31\\u1a97ute\\u803b\\xf3\\u40f3\\u0100iy\\u2d3c\\u2d45r\\u0100;c\\u1a9e\\u2d42\\u803b\\xf4\\u40f4;\\u443e\\u0280abios\\u1aa0\\u2d52\\u2d57\\u01c8\\u2d5alac;\\u4151v;\\u6a38old;\\u69bclig;\\u4153\\u0100cr\\u2d69\\u2d6dir;\\u69bf;\\uc000\\ud835\\udd2c\\u036f\\u2d79\\0\\0\\u2d7c\\0\\u2d82n;\\u42dbave\\u803b\\xf2\\u40f2;\\u69c1\\u0100bm\\u2d88\\u0df4ar;\\u69b5\\u0200acit\\u2d95\\u2d98\\u2da5\\u2da8r\\xf2\\u1a80\\u0100ir\\u2d9d\\u2da0r;\\u69beoss;\\u69bbn\\xe5\\u0e52;\\u69c0\\u0180aei\\u2db1\\u2db5\\u2db9cr;\\u414dga;\\u43c9\\u0180cdn\\u2dc0\\u2dc5\\u01cdron;\\u43bf;\\u69b6pf;\\uc000\\ud835\\udd60\\u0180ael\\u2dd4\\u2dd7\\u01d2r;\\u69b7rp;\\u69b9\\u0380;adiosv\\u2dea\\u2deb\\u2dee\\u2e08\\u2e0d\\u2e10\\u2e16\\u6228r\\xf2\\u1a86\\u0200;efm\\u2df7\\u2df8\\u2e02\\u2e05\\u6a5dr\\u0100;o\\u2dfe\\u2dff\\u6134f\\xbb\\u2dff\\u803b\\xaa\\u40aa\\u803b\\xba\\u40bagof;\\u62b6r;\\u6a56lope;\\u6a57;\\u6a5b\\u0180clo\\u2e1f\\u2e21\\u2e27\\xf2\\u2e01ash\\u803b\\xf8\\u40f8l;\\u6298i\\u016c\\u2e2f\\u2e34de\\u803b\\xf5\\u40f5es\\u0100;a\\u01db\\u2e3as;\\u6a36ml\\u803b\\xf6\\u40f6bar;\\u633d\\u0ae1\\u2e5e\\0\\u2e7d\\0\\u2e80\\u2e9d\\0\\u2ea2\\u2eb9\\0\\0\\u2ecb\\u0e9c\\0\\u2f13\\0\\0\\u2f2b\\u2fbc\\0\\u2fc8r\\u0200;ast\\u0403\\u2e67\\u2e72\\u0e85\\u8100\\xb6;l\\u2e6d\\u2e6e\\u40b6le\\xec\\u0403\\u0269\\u2e78\\0\\0\\u2e7bm;\\u6af3;\\u6afdy;\\u443fr\\u0280cimpt\\u2e8b\\u2e8f\\u2e93\\u1865\\u2e97nt;\\u4025od;\\u402eil;\\u6030enk;\\u6031r;\\uc000\\ud835\\udd2d\\u0180imo\\u2ea8\\u2eb0\\u2eb4\\u0100;v\\u2ead\\u2eae\\u43c6;\\u43d5ma\\xf4\\u0a76ne;\\u660e\\u0180;tv\\u2ebf\\u2ec0\\u2ec8\\u43c0chfork\\xbb\\u1ffd;\\u43d6\\u0100au\\u2ecf\\u2edfn\\u0100ck\\u2ed5\\u2eddk\\u0100;h\\u21f4\\u2edb;\\u610e\\xf6\\u21f4s\\u0480;abcdemst\\u2ef3\\u2ef4\\u1908\\u2ef9\\u2efd\\u2f04\\u2f06\\u2f0a\\u2f0e\\u402bcir;\\u6a23ir;\\u6a22\\u0100ou\\u1d40\\u2f02;\\u6a25;\\u6a72n\\u80bb\\xb1\\u0e9dim;\\u6a26wo;\\u6a27\\u0180ipu\\u2f19\\u2f20\\u2f25ntint;\\u6a15f;\\uc000\\ud835\\udd61nd\\u803b\\xa3\\u40a3\\u0500;Eaceinosu\\u0ec8\\u2f3f\\u2f41\\u2f44\\u2f47\\u2f81\\u2f89\\u2f92\\u2f7e\\u2fb6;\\u6ab3p;\\u6ab7u\\xe5\\u0ed9\\u0100;c\\u0ece\\u2f4c\\u0300;acens\\u0ec8\\u2f59\\u2f5f\\u2f66\\u2f68\\u2f7eppro\\xf8\\u2f43urlye\\xf1\\u0ed9\\xf1\\u0ece\\u0180aes\\u2f6f\\u2f76\\u2f7approx;\\u6ab9qq;\\u6ab5im;\\u62e8i\\xed\\u0edfme\\u0100;s\\u2f88\\u0eae\\u6032\\u0180Eas\\u2f78\\u2f90\\u2f7a\\xf0\\u2f75\\u0180dfp\\u0eec\\u2f99\\u2faf\\u0180als\\u2fa0\\u2fa5\\u2faalar;\\u632eine;\\u6312urf;\\u6313\\u0100;t\\u0efb\\u2fb4\\xef\\u0efbrel;\\u62b0\\u0100ci\\u2fc0\\u2fc5r;\\uc000\\ud835\\udcc5;\\u43c8ncsp;\\u6008\\u0300fiopsu\\u2fda\\u22e2\\u2fdf\\u2fe5\\u2feb\\u2ff1r;\\uc000\\ud835\\udd2epf;\\uc000\\ud835\\udd62rime;\\u6057cr;\\uc000\\ud835\\udcc6\\u0180aeo\\u2ff8\\u3009\\u3013t\\u0100ei\\u2ffe\\u3005rnion\\xf3\\u06b0nt;\\u6a16st\\u0100;e\\u3010\\u3011\\u403f\\xf1\\u1f19\\xf4\\u0f14\\u0a80ABHabcdefhilmnoprstux\\u3040\\u3051\\u3055\\u3059\\u30e0\\u310e\\u312b\\u3147\\u3162\\u3172\\u318e\\u3206\\u3215\\u3224\\u3229\\u3258\\u326e\\u3272\\u3290\\u32b0\\u32b7\\u0180art\\u3047\\u304a\\u304cr\\xf2\\u10b3\\xf2\\u03ddail;\\u691car\\xf2\\u1c65ar;\\u6964\\u0380cdenqrt\\u3068\\u3075\\u3078\\u307f\\u308f\\u3094\\u30cc\\u0100eu\\u306d\\u3071;\\uc000\\u223d\\u0331te;\\u4155i\\xe3\\u116emptyv;\\u69b3g\\u0200;del\\u0fd1\\u3089\\u308b\\u308d;\\u6992;\\u69a5\\xe5\\u0fd1uo\\u803b\\xbb\\u40bbr\\u0580;abcfhlpstw\\u0fdc\\u30ac\\u30af\\u30b7\\u30b9\\u30bc\\u30be\\u30c0\\u30c3\\u30c7\\u30cap;\\u6975\\u0100;f\\u0fe0\\u30b4s;\\u6920;\\u6933s;\\u691e\\xeb\\u225d\\xf0\\u272el;\\u6945im;\\u6974l;\\u61a3;\\u619d\\u0100ai\\u30d1\\u30d5il;\\u691ao\\u0100;n\\u30db\\u30dc\\u6236al\\xf3\\u0f1e\\u0180abr\\u30e7\\u30ea\\u30eer\\xf2\\u17e5rk;\\u6773\\u0100ak\\u30f3\\u30fdc\\u0100ek\\u30f9\\u30fb;\\u407d;\\u405d\\u0100es\\u3102\\u3104;\\u698cl\\u0100du\\u310a\\u310c;\\u698e;\\u6990\\u0200aeuy\\u3117\\u311c\\u3127\\u3129ron;\\u4159\\u0100di\\u3121\\u3125il;\\u4157\\xec\\u0ff2\\xe2\\u30fa;\\u4440\\u0200clqs\\u3134\\u3137\\u313d\\u3144a;\\u6937dhar;\\u6969uo\\u0100;r\\u020e\\u020dh;\\u61b3\\u0180acg\\u314e\\u315f\\u0f44l\\u0200;ips\\u0f78\\u3158\\u315b\\u109cn\\xe5\\u10bbar\\xf4\\u0fa9t;\\u65ad\\u0180ilr\\u3169\\u1023\\u316esht;\\u697d;\\uc000\\ud835\\udd2f\\u0100ao\\u3177\\u3186r\\u0100du\\u317d\\u317f\\xbb\\u047b\\u0100;l\\u1091\\u3184;\\u696c\\u0100;v\\u318b\\u318c\\u43c1;\\u43f1\\u0180gns\\u3195\\u31f9\\u31fcht\\u0300ahlrst\\u31a4\\u31b0\\u31c2\\u31d8\\u31e4\\u31eerrow\\u0100;t\\u0fdc\\u31ada\\xe9\\u30c8arpoon\\u0100du\\u31bb\\u31bfow\\xee\\u317ep\\xbb\\u1092eft\\u0100ah\\u31ca\\u31d0rrow\\xf3\\u0feaarpoon\\xf3\\u0551ightarrows;\\u61c9quigarro\\xf7\\u30cbhreetimes;\\u62ccg;\\u42daingdotse\\xf1\\u1f32\\u0180ahm\\u320d\\u3210\\u3213r\\xf2\\u0feaa\\xf2\\u0551;\\u600foust\\u0100;a\\u321e\\u321f\\u63b1che\\xbb\\u321fmid;\\u6aee\\u0200abpt\\u3232\\u323d\\u3240\\u3252\\u0100nr\\u3237\\u323ag;\\u67edr;\\u61fer\\xeb\\u1003\\u0180afl\\u3247\\u324a\\u324er;\\u6986;\\uc000\\ud835\\udd63us;\\u6a2eimes;\\u6a35\\u0100ap\\u325d\\u3267r\\u0100;g\\u3263\\u3264\\u4029t;\\u6994olint;\\u6a12ar\\xf2\\u31e3\\u0200achq\\u327b\\u3280\\u10bc\\u3285quo;\\u603ar;\\uc000\\ud835\\udcc7\\u0100bu\\u30fb\\u328ao\\u0100;r\\u0214\\u0213\\u0180hir\\u3297\\u329b\\u32a0re\\xe5\\u31f8mes;\\u62cai\\u0200;efl\\u32aa\\u1059\\u1821\\u32ab\\u65b9tri;\\u69celuhar;\\u6968;\\u611e\\u0d61\\u32d5\\u32db\\u32df\\u332c\\u3338\\u3371\\0\\u337a\\u33a4\\0\\0\\u33ec\\u33f0\\0\\u3428\\u3448\\u345a\\u34ad\\u34b1\\u34ca\\u34f1\\0\\u3616\\0\\0\\u3633cute;\\u415bqu\\xef\\u27ba\\u0500;Eaceinpsy\\u11ed\\u32f3\\u32f5\\u32ff\\u3302\\u330b\\u330f\\u331f\\u3326\\u3329;\\u6ab4\\u01f0\\u32fa\\0\\u32fc;\\u6ab8on;\\u4161u\\xe5\\u11fe\\u0100;d\\u11f3\\u3307il;\\u415frc;\\u415d\\u0180Eas\\u3316\\u3318\\u331b;\\u6ab6p;\\u6abaim;\\u62e9olint;\\u6a13i\\xed\\u1204;\\u4441ot\\u0180;be\\u3334\\u1d47\\u3335\\u62c5;\\u6a66\\u0380Aacmstx\\u3346\\u334a\\u3357\\u335b\\u335e\\u3363\\u336drr;\\u61d8r\\u0100hr\\u3350\\u3352\\xeb\\u2228\\u0100;o\\u0a36\\u0a34t\\u803b\\xa7\\u40a7i;\\u403bwar;\\u6929m\\u0100in\\u3369\\xf0nu\\xf3\\xf1t;\\u6736r\\u0100;o\\u3376\\u2055\\uc000\\ud835\\udd30\\u0200acoy\\u3382\\u3386\\u3391\\u33a0rp;\\u666f\\u0100hy\\u338b\\u338fcy;\\u4449;\\u4448rt\\u026d\\u3399\\0\\0\\u339ci\\xe4\\u1464ara\\xec\\u2e6f\\u803b\\xad\\u40ad\\u0100gm\\u33a8\\u33b4ma\\u0180;fv\\u33b1\\u33b2\\u33b2\\u43c3;\\u43c2\\u0400;deglnpr\\u12ab\\u33c5\\u33c9\\u33ce\\u33d6\\u33de\\u33e1\\u33e6ot;\\u6a6a\\u0100;q\\u12b1\\u12b0\\u0100;E\\u33d3\\u33d4\\u6a9e;\\u6aa0\\u0100;E\\u33db\\u33dc\\u6a9d;\\u6a9fe;\\u6246lus;\\u6a24arr;\\u6972ar\\xf2\\u113d\\u0200aeit\\u33f8\\u3408\\u340f\\u3417\\u0100ls\\u33fd\\u3404lsetm\\xe9\\u336ahp;\\u6a33parsl;\\u69e4\\u0100dl\\u1463\\u3414e;\\u6323\\u0100;e\\u341c\\u341d\\u6aaa\\u0100;s\\u3422\\u3423\\u6aac;\\uc000\\u2aac\\ufe00\\u0180flp\\u342e\\u3433\\u3442tcy;\\u444c\\u0100;b\\u3438\\u3439\\u402f\\u0100;a\\u343e\\u343f\\u69c4r;\\u633ff;\\uc000\\ud835\\udd64a\\u0100dr\\u344d\\u0402es\\u0100;u\\u3454\\u3455\\u6660it\\xbb\\u3455\\u0180csu\\u3460\\u3479\\u349f\\u0100au\\u3465\\u346fp\\u0100;s\\u1188\\u346b;\\uc000\\u2293\\ufe00p\\u0100;s\\u11b4\\u3475;\\uc000\\u2294\\ufe00u\\u0100bp\\u347f\\u348f\\u0180;es\\u1197\\u119c\\u3486et\\u0100;e\\u1197\\u348d\\xf1\\u119d\\u0180;es\\u11a8\\u11ad\\u3496et\\u0100;e\\u11a8\\u349d\\xf1\\u11ae\\u0180;af\\u117b\\u34a6\\u05b0r\\u0165\\u34ab\\u05b1\\xbb\\u117car\\xf2\\u1148\\u0200cemt\\u34b9\\u34be\\u34c2\\u34c5r;\\uc000\\ud835\\udcc8tm\\xee\\xf1i\\xec\\u3415ar\\xe6\\u11be\\u0100ar\\u34ce\\u34d5r\\u0100;f\\u34d4\\u17bf\\u6606\\u0100an\\u34da\\u34edight\\u0100ep\\u34e3\\u34eapsilo\\xee\\u1ee0h\\xe9\\u2eafs\\xbb\\u2852\\u0280bcmnp\\u34fb\\u355e\\u1209\\u358b\\u358e\\u0480;Edemnprs\\u350e\\u350f\\u3511\\u3515\\u351e\\u3523\\u352c\\u3531\\u3536\\u6282;\\u6ac5ot;\\u6abd\\u0100;d\\u11da\\u351aot;\\u6ac3ult;\\u6ac1\\u0100Ee\\u3528\\u352a;\\u6acb;\\u628alus;\\u6abfarr;\\u6979\\u0180eiu\\u353d\\u3552\\u3555t\\u0180;en\\u350e\\u3545\\u354bq\\u0100;q\\u11da\\u350feq\\u0100;q\\u352b\\u3528m;\\u6ac7\\u0100bp\\u355a\\u355c;\\u6ad5;\\u6ad3c\\u0300;acens\\u11ed\\u356c\\u3572\\u3579\\u357b\\u3326ppro\\xf8\\u32faurlye\\xf1\\u11fe\\xf1\\u11f3\\u0180aes\\u3582\\u3588\\u331bppro\\xf8\\u331aq\\xf1\\u3317g;\\u666a\\u0680123;Edehlmnps\\u35a9\\u35ac\\u35af\\u121c\\u35b2\\u35b4\\u35c0\\u35c9\\u35d5\\u35da\\u35df\\u35e8\\u35ed\\u803b\\xb9\\u40b9\\u803b\\xb2\\u40b2\\u803b\\xb3\\u40b3;\\u6ac6\\u0100os\\u35b9\\u35bct;\\u6abeub;\\u6ad8\\u0100;d\\u1222\\u35c5ot;\\u6ac4s\\u0100ou\\u35cf\\u35d2l;\\u67c9b;\\u6ad7arr;\\u697bult;\\u6ac2\\u0100Ee\\u35e4\\u35e6;\\u6acc;\\u628blus;\\u6ac0\\u0180eiu\\u35f4\\u3609\\u360ct\\u0180;en\\u121c\\u35fc\\u3602q\\u0100;q\\u1222\\u35b2eq\\u0100;q\\u35e7\\u35e4m;\\u6ac8\\u0100bp\\u3611\\u3613;\\u6ad4;\\u6ad6\\u0180Aan\\u361c\\u3620\\u362drr;\\u61d9r\\u0100hr\\u3626\\u3628\\xeb\\u222e\\u0100;o\\u0a2b\\u0a29war;\\u692alig\\u803b\\xdf\\u40df\\u0be1\\u3651\\u365d\\u3660\\u12ce\\u3673\\u3679\\0\\u367e\\u36c2\\0\\0\\0\\0\\0\\u36db\\u3703\\0\\u3709\\u376c\\0\\0\\0\\u3787\\u0272\\u3656\\0\\0\\u365bget;\\u6316;\\u43c4r\\xeb\\u0e5f\\u0180aey\\u3666\\u366b\\u3670ron;\\u4165dil;\\u4163;\\u4442lrec;\\u6315r;\\uc000\\ud835\\udd31\\u0200eiko\\u3686\\u369d\\u36b5\\u36bc\\u01f2\\u368b\\0\\u3691e\\u01004f\\u1284\\u1281a\\u0180;sv\\u3698\\u3699\\u369b\\u43b8ym;\\u43d1\\u0100cn\\u36a2\\u36b2k\\u0100as\\u36a8\\u36aeppro\\xf8\\u12c1im\\xbb\\u12acs\\xf0\\u129e\\u0100as\\u36ba\\u36ae\\xf0\\u12c1rn\\u803b\\xfe\\u40fe\\u01ec\\u031f\\u36c6\\u22e7es\\u8180\\xd7;bd\\u36cf\\u36d0\\u36d8\\u40d7\\u0100;a\\u190f\\u36d5r;\\u6a31;\\u6a30\\u0180eps\\u36e1\\u36e3\\u3700\\xe1\\u2a4d\\u0200;bcf\\u0486\\u36ec\\u36f0\\u36f4ot;\\u6336ir;\\u6af1\\u0100;o\\u36f9\\u36fc\\uc000\\ud835\\udd65rk;\\u6ada\\xe1\\u3362rime;\\u6034\\u0180aip\\u370f\\u3712\\u3764d\\xe5\\u1248\\u0380adempst\\u3721\\u374d\\u3740\\u3751\\u3757\\u375c\\u375fngle\\u0280;dlqr\\u3730\\u3731\\u3736\\u3740\\u3742\\u65b5own\\xbb\\u1dbbeft\\u0100;e\\u2800\\u373e\\xf1\\u092e;\\u625cight\\u0100;e\\u32aa\\u374b\\xf1\\u105aot;\\u65ecinus;\\u6a3alus;\\u6a39b;\\u69cdime;\\u6a3bezium;\\u63e2\\u0180cht\\u3772\\u377d\\u3781\\u0100ry\\u3777\\u377b;\\uc000\\ud835\\udcc9;\\u4446cy;\\u445brok;\\u4167\\u0100io\\u378b\\u378ex\\xf4\\u1777head\\u0100lr\\u3797\\u37a0eftarro\\xf7\\u084fightarrow\\xbb\\u0f5d\\u0900AHabcdfghlmoprstuw\\u37d0\\u37d3\\u37d7\\u37e4\\u37f0\\u37fc\\u380e\\u381c\\u3823\\u3834\\u3851\\u385d\\u386b\\u38a9\\u38cc\\u38d2\\u38ea\\u38f6r\\xf2\\u03edar;\\u6963\\u0100cr\\u37dc\\u37e2ute\\u803b\\xfa\\u40fa\\xf2\\u1150r\\u01e3\\u37ea\\0\\u37edy;\\u445eve;\\u416d\\u0100iy\\u37f5\\u37farc\\u803b\\xfb\\u40fb;\\u4443\\u0180abh\\u3803\\u3806\\u380br\\xf2\\u13adlac;\\u4171a\\xf2\\u13c3\\u0100ir\\u3813\\u3818sht;\\u697e;\\uc000\\ud835\\udd32rave\\u803b\\xf9\\u40f9\\u0161\\u3827\\u3831r\\u0100lr\\u382c\\u382e\\xbb\\u0957\\xbb\\u1083lk;\\u6580\\u0100ct\\u3839\\u384d\\u026f\\u383f\\0\\0\\u384arn\\u0100;e\\u3845\\u3846\\u631cr\\xbb\\u3846op;\\u630fri;\\u65f8\\u0100al\\u3856\\u385acr;\\u416b\\u80bb\\xa8\\u0349\\u0100gp\\u3862\\u3866on;\\u4173f;\\uc000\\ud835\\udd66\\u0300adhlsu\\u114b\\u3878\\u387d\\u1372\\u3891\\u38a0own\\xe1\\u13b3arpoon\\u0100lr\\u3888\\u388cef\\xf4\\u382digh\\xf4\\u382fi\\u0180;hl\\u3899\\u389a\\u389c\\u43c5\\xbb\\u13faon\\xbb\\u389aparrows;\\u61c8\\u0180cit\\u38b0\\u38c4\\u38c8\\u026f\\u38b6\\0\\0\\u38c1rn\\u0100;e\\u38bc\\u38bd\\u631dr\\xbb\\u38bdop;\\u630eng;\\u416fri;\\u65f9cr;\\uc000\\ud835\\udcca\\u0180dir\\u38d9\\u38dd\\u38e2ot;\\u62f0lde;\\u4169i\\u0100;f\\u3730\\u38e8\\xbb\\u1813\\u0100am\\u38ef\\u38f2r\\xf2\\u38a8l\\u803b\\xfc\\u40fcangle;\\u69a7\\u0780ABDacdeflnoprsz\\u391c\\u391f\\u3929\\u392d\\u39b5\\u39b8\\u39bd\\u39df\\u39e4\\u39e8\\u39f3\\u39f9\\u39fd\\u3a01\\u3a20r\\xf2\\u03f7ar\\u0100;v\\u3926\\u3927\\u6ae8;\\u6ae9as\\xe8\\u03e1\\u0100nr\\u3932\\u3937grt;\\u699c\\u0380eknprst\\u34e3\\u3946\\u394b\\u3952\\u395d\\u3964\\u3996app\\xe1\\u2415othin\\xe7\\u1e96\\u0180hir\\u34eb\\u2ec8\\u3959op\\xf4\\u2fb5\\u0100;h\\u13b7\\u3962\\xef\\u318d\\u0100iu\\u3969\\u396dgm\\xe1\\u33b3\\u0100bp\\u3972\\u3984setneq\\u0100;q\\u397d\\u3980\\uc000\\u228a\\ufe00;\\uc000\\u2acb\\ufe00setneq\\u0100;q\\u398f\\u3992\\uc000\\u228b\\ufe00;\\uc000\\u2acc\\ufe00\\u0100hr\\u399b\\u399fet\\xe1\\u369ciangle\\u0100lr\\u39aa\\u39afeft\\xbb\\u0925ight\\xbb\\u1051y;\\u4432ash\\xbb\\u1036\\u0180elr\\u39c4\\u39d2\\u39d7\\u0180;be\\u2dea\\u39cb\\u39cfar;\\u62bbq;\\u625alip;\\u62ee\\u0100bt\\u39dc\\u1468a\\xf2\\u1469r;\\uc000\\ud835\\udd33tr\\xe9\\u39aesu\\u0100bp\\u39ef\\u39f1\\xbb\\u0d1c\\xbb\\u0d59pf;\\uc000\\ud835\\udd67ro\\xf0\\u0efbtr\\xe9\\u39b4\\u0100cu\\u3a06\\u3a0br;\\uc000\\ud835\\udccb\\u0100bp\\u3a10\\u3a18n\\u0100Ee\\u3980\\u3a16\\xbb\\u397en\\u0100Ee\\u3992\\u3a1e\\xbb\\u3990igzag;\\u699a\\u0380cefoprs\\u3a36\\u3a3b\\u3a56\\u3a5b\\u3a54\\u3a61\\u3a6airc;\\u4175\\u0100di\\u3a40\\u3a51\\u0100bg\\u3a45\\u3a49ar;\\u6a5fe\\u0100;q\\u15fa\\u3a4f;\\u6259erp;\\u6118r;\\uc000\\ud835\\udd34pf;\\uc000\\ud835\\udd68\\u0100;e\\u1479\\u3a66at\\xe8\\u1479cr;\\uc000\\ud835\\udccc\\u0ae3\\u178e\\u3a87\\0\\u3a8b\\0\\u3a90\\u3a9b\\0\\0\\u3a9d\\u3aa8\\u3aab\\u3aaf\\0\\0\\u3ac3\\u3ace\\0\\u3ad8\\u17dc\\u17dftr\\xe9\\u17d1r;\\uc000\\ud835\\udd35\\u0100Aa\\u3a94\\u3a97r\\xf2\\u03c3r\\xf2\\u09f6;\\u43be\\u0100Aa\\u3aa1\\u3aa4r\\xf2\\u03b8r\\xf2\\u09eba\\xf0\\u2713is;\\u62fb\\u0180dpt\\u17a4\\u3ab5\\u3abe\\u0100fl\\u3aba\\u17a9;\\uc000\\ud835\\udd69im\\xe5\\u17b2\\u0100Aa\\u3ac7\\u3acar\\xf2\\u03cer\\xf2\\u0a01\\u0100cq\\u3ad2\\u17b8r;\\uc000\\ud835\\udccd\\u0100pt\\u17d6\\u3adcr\\xe9\\u17d4\\u0400acefiosu\\u3af0\\u3afd\\u3b08\\u3b0c\\u3b11\\u3b15\\u3b1b\\u3b21c\\u0100uy\\u3af6\\u3afbte\\u803b\\xfd\\u40fd;\\u444f\\u0100iy\\u3b02\\u3b06rc;\\u4177;\\u444bn\\u803b\\xa5\\u40a5r;\\uc000\\ud835\\udd36cy;\\u4457pf;\\uc000\\ud835\\udd6acr;\\uc000\\ud835\\udcce\\u0100cm\\u3b26\\u3b29y;\\u444el\\u803b\\xff\\u40ff\\u0500acdefhiosw\\u3b42\\u3b48\\u3b54\\u3b58\\u3b64\\u3b69\\u3b6d\\u3b74\\u3b7a\\u3b80cute;\\u417a\\u0100ay\\u3b4d\\u3b52ron;\\u417e;\\u4437ot;\\u417c\\u0100et\\u3b5d\\u3b61tr\\xe6\\u155fa;\\u43b6r;\\uc000\\ud835\\udd37cy;\\u4436grarr;\\u61ddpf;\\uc000\\ud835\\udd6bcr;\\uc000\\ud835\\udccf\\u0100jn\\u3b85\\u3b87;\\u600dj;\\u600c\"\n    .split(\"\")\n    .map((c) => c.charCodeAt(0)));\n//# sourceMappingURL=decode-data-html.js.map","// Generated using scripts/write-decode-map.ts\nexport default new Uint16Array(\n// prettier-ignore\n\"\\u0200aglq\\t\\x15\\x18\\x1b\\u026d\\x0f\\0\\0\\x12p;\\u4026os;\\u4027t;\\u403et;\\u403cuot;\\u4022\"\n    .split(\"\")\n    .map((c) => c.charCodeAt(0)));\n//# sourceMappingURL=decode-data-xml.js.map","// Generated using scripts/write-encode-map.ts\nfunction restoreDiff(arr) {\n    for (let i = 1; i < arr.length; i++) {\n        arr[i][0] += arr[i - 1][0] + 1;\n    }\n    return arr;\n}\n// prettier-ignore\nexport default new Map(/* #__PURE__ */ restoreDiff([[9, \"&Tab;\"], [0, \"&NewLine;\"], [22, \"&excl;\"], [0, \"&quot;\"], [0, \"&num;\"], [0, \"&dollar;\"], [0, \"&percnt;\"], [0, \"&amp;\"], [0, \"&apos;\"], [0, \"&lpar;\"], [0, \"&rpar;\"], [0, \"&ast;\"], [0, \"&plus;\"], [0, \"&comma;\"], [1, \"&period;\"], [0, \"&sol;\"], [10, \"&colon;\"], [0, \"&semi;\"], [0, { v: \"&lt;\", n: 8402, o: \"&nvlt;\" }], [0, { v: \"&equals;\", n: 8421, o: \"&bne;\" }], [0, { v: \"&gt;\", n: 8402, o: \"&nvgt;\" }], [0, \"&quest;\"], [0, \"&commat;\"], [26, \"&lbrack;\"], [0, \"&bsol;\"], [0, \"&rbrack;\"], [0, \"&Hat;\"], [0, \"&lowbar;\"], [0, \"&DiacriticalGrave;\"], [5, { n: 106, o: \"&fjlig;\" }], [20, \"&lbrace;\"], [0, \"&verbar;\"], [0, \"&rbrace;\"], [34, \"&nbsp;\"], [0, \"&iexcl;\"], [0, \"&cent;\"], [0, \"&pound;\"], [0, \"&curren;\"], [0, \"&yen;\"], [0, \"&brvbar;\"], [0, \"&sect;\"], [0, \"&die;\"], [0, \"&copy;\"], [0, \"&ordf;\"], [0, \"&laquo;\"], [0, \"&not;\"], [0, \"&shy;\"], [0, \"&circledR;\"], [0, \"&macr;\"], [0, \"&deg;\"], [0, \"&PlusMinus;\"], [0, \"&sup2;\"], [0, \"&sup3;\"], [0, \"&acute;\"], [0, \"&micro;\"], [0, \"&para;\"], [0, \"&centerdot;\"], [0, \"&cedil;\"], [0, \"&sup1;\"], [0, \"&ordm;\"], [0, \"&raquo;\"], [0, \"&frac14;\"], [0, \"&frac12;\"], [0, \"&frac34;\"], [0, \"&iquest;\"], [0, \"&Agrave;\"], [0, \"&Aacute;\"], [0, \"&Acirc;\"], [0, \"&Atilde;\"], [0, \"&Auml;\"], [0, \"&angst;\"], [0, \"&AElig;\"], [0, \"&Ccedil;\"], [0, \"&Egrave;\"], [0, \"&Eacute;\"], [0, \"&Ecirc;\"], [0, \"&Euml;\"], [0, \"&Igrave;\"], [0, \"&Iacute;\"], [0, \"&Icirc;\"], [0, \"&Iuml;\"], [0, \"&ETH;\"], [0, \"&Ntilde;\"], [0, \"&Ograve;\"], [0, \"&Oacute;\"], [0, \"&Ocirc;\"], [0, \"&Otilde;\"], [0, \"&Ouml;\"], [0, \"&times;\"], [0, \"&Oslash;\"], [0, \"&Ugrave;\"], [0, \"&Uacute;\"], [0, \"&Ucirc;\"], [0, \"&Uuml;\"], [0, \"&Yacute;\"], [0, \"&THORN;\"], [0, \"&szlig;\"], [0, \"&agrave;\"], [0, \"&aacute;\"], [0, \"&acirc;\"], [0, \"&atilde;\"], [0, \"&auml;\"], [0, \"&aring;\"], [0, \"&aelig;\"], [0, \"&ccedil;\"], [0, \"&egrave;\"], [0, \"&eacute;\"], [0, \"&ecirc;\"], [0, \"&euml;\"], [0, \"&igrave;\"], [0, \"&iacute;\"], [0, \"&icirc;\"], [0, \"&iuml;\"], [0, \"&eth;\"], [0, \"&ntilde;\"], [0, \"&ograve;\"], [0, \"&oacute;\"], [0, \"&ocirc;\"], [0, \"&otilde;\"], [0, \"&ouml;\"], [0, \"&div;\"], [0, \"&oslash;\"], [0, \"&ugrave;\"], [0, \"&uacute;\"], [0, \"&ucirc;\"], [0, \"&uuml;\"], [0, \"&yacute;\"], [0, \"&thorn;\"], [0, \"&yuml;\"], [0, \"&Amacr;\"], [0, \"&amacr;\"], [0, \"&Abreve;\"], [0, \"&abreve;\"], [0, \"&Aogon;\"], [0, \"&aogon;\"], [0, \"&Cacute;\"], [0, \"&cacute;\"], [0, \"&Ccirc;\"], [0, \"&ccirc;\"], [0, \"&Cdot;\"], [0, \"&cdot;\"], [0, \"&Ccaron;\"], [0, \"&ccaron;\"], [0, \"&Dcaron;\"], [0, \"&dcaron;\"], [0, \"&Dstrok;\"], [0, \"&dstrok;\"], [0, \"&Emacr;\"], [0, \"&emacr;\"], [2, \"&Edot;\"], [0, \"&edot;\"], [0, \"&Eogon;\"], [0, \"&eogon;\"], [0, \"&Ecaron;\"], [0, \"&ecaron;\"], [0, \"&Gcirc;\"], [0, \"&gcirc;\"], [0, \"&Gbreve;\"], [0, \"&gbreve;\"], [0, \"&Gdot;\"], [0, \"&gdot;\"], [0, \"&Gcedil;\"], [1, \"&Hcirc;\"], [0, \"&hcirc;\"], [0, \"&Hstrok;\"], [0, \"&hstrok;\"], [0, \"&Itilde;\"], [0, \"&itilde;\"], [0, \"&Imacr;\"], [0, \"&imacr;\"], [2, \"&Iogon;\"], [0, \"&iogon;\"], [0, \"&Idot;\"], [0, \"&imath;\"], [0, \"&IJlig;\"], [0, \"&ijlig;\"], [0, \"&Jcirc;\"], [0, \"&jcirc;\"], [0, \"&Kcedil;\"], [0, \"&kcedil;\"], [0, \"&kgreen;\"], [0, \"&Lacute;\"], [0, \"&lacute;\"], [0, \"&Lcedil;\"], [0, \"&lcedil;\"], [0, \"&Lcaron;\"], [0, \"&lcaron;\"], [0, \"&Lmidot;\"], [0, \"&lmidot;\"], [0, \"&Lstrok;\"], [0, \"&lstrok;\"], [0, \"&Nacute;\"], [0, \"&nacute;\"], [0, \"&Ncedil;\"], [0, \"&ncedil;\"], [0, \"&Ncaron;\"], [0, \"&ncaron;\"], [0, \"&napos;\"], [0, \"&ENG;\"], [0, \"&eng;\"], [0, \"&Omacr;\"], [0, \"&omacr;\"], [2, \"&Odblac;\"], [0, \"&odblac;\"], [0, \"&OElig;\"], [0, \"&oelig;\"], [0, \"&Racute;\"], [0, \"&racute;\"], [0, \"&Rcedil;\"], [0, \"&rcedil;\"], [0, \"&Rcaron;\"], [0, \"&rcaron;\"], [0, \"&Sacute;\"], [0, \"&sacute;\"], [0, \"&Scirc;\"], [0, \"&scirc;\"], [0, \"&Scedil;\"], [0, \"&scedil;\"], [0, \"&Scaron;\"], [0, \"&scaron;\"], [0, \"&Tcedil;\"], [0, \"&tcedil;\"], [0, \"&Tcaron;\"], [0, \"&tcaron;\"], [0, \"&Tstrok;\"], [0, \"&tstrok;\"], [0, \"&Utilde;\"], [0, \"&utilde;\"], [0, \"&Umacr;\"], [0, \"&umacr;\"], [0, \"&Ubreve;\"], [0, \"&ubreve;\"], [0, \"&Uring;\"], [0, \"&uring;\"], [0, \"&Udblac;\"], [0, \"&udblac;\"], [0, \"&Uogon;\"], [0, \"&uogon;\"], [0, \"&Wcirc;\"], [0, \"&wcirc;\"], [0, \"&Ycirc;\"], [0, \"&ycirc;\"], [0, \"&Yuml;\"], [0, \"&Zacute;\"], [0, \"&zacute;\"], [0, \"&Zdot;\"], [0, \"&zdot;\"], [0, \"&Zcaron;\"], [0, \"&zcaron;\"], [19, \"&fnof;\"], [34, \"&imped;\"], [63, \"&gacute;\"], [65, \"&jmath;\"], [142, \"&circ;\"], [0, \"&caron;\"], [16, \"&breve;\"], [0, \"&DiacriticalDot;\"], [0, \"&ring;\"], [0, \"&ogon;\"], [0, \"&DiacriticalTilde;\"], [0, \"&dblac;\"], [51, \"&DownBreve;\"], [127, \"&Alpha;\"], [0, \"&Beta;\"], [0, \"&Gamma;\"], [0, \"&Delta;\"], [0, \"&Epsilon;\"], [0, \"&Zeta;\"], [0, \"&Eta;\"], [0, \"&Theta;\"], [0, \"&Iota;\"], [0, \"&Kappa;\"], [0, \"&Lambda;\"], [0, \"&Mu;\"], [0, \"&Nu;\"], [0, \"&Xi;\"], [0, \"&Omicron;\"], [0, \"&Pi;\"], [0, \"&Rho;\"], [1, \"&Sigma;\"], [0, \"&Tau;\"], [0, \"&Upsilon;\"], [0, \"&Phi;\"], [0, \"&Chi;\"], [0, \"&Psi;\"], [0, \"&ohm;\"], [7, \"&alpha;\"], [0, \"&beta;\"], [0, \"&gamma;\"], [0, \"&delta;\"], [0, \"&epsi;\"], [0, \"&zeta;\"], [0, \"&eta;\"], [0, \"&theta;\"], [0, \"&iota;\"], [0, \"&kappa;\"], [0, \"&lambda;\"], [0, \"&mu;\"], [0, \"&nu;\"], [0, \"&xi;\"], [0, \"&omicron;\"], [0, \"&pi;\"], [0, \"&rho;\"], [0, \"&sigmaf;\"], [0, \"&sigma;\"], [0, \"&tau;\"], [0, \"&upsi;\"], [0, \"&phi;\"], [0, \"&chi;\"], [0, \"&psi;\"], [0, \"&omega;\"], [7, \"&thetasym;\"], [0, \"&Upsi;\"], [2, \"&phiv;\"], [0, \"&piv;\"], [5, \"&Gammad;\"], [0, \"&digamma;\"], [18, \"&kappav;\"], [0, \"&rhov;\"], [3, \"&epsiv;\"], [0, \"&backepsilon;\"], [10, \"&IOcy;\"], [0, \"&DJcy;\"], [0, \"&GJcy;\"], [0, \"&Jukcy;\"], [0, \"&DScy;\"], [0, \"&Iukcy;\"], [0, \"&YIcy;\"], [0, \"&Jsercy;\"], [0, \"&LJcy;\"], [0, \"&NJcy;\"], [0, \"&TSHcy;\"], [0, \"&KJcy;\"], [1, \"&Ubrcy;\"], [0, \"&DZcy;\"], [0, \"&Acy;\"], [0, \"&Bcy;\"], [0, \"&Vcy;\"], [0, \"&Gcy;\"], [0, \"&Dcy;\"], [0, \"&IEcy;\"], [0, \"&ZHcy;\"], [0, \"&Zcy;\"], [0, \"&Icy;\"], [0, \"&Jcy;\"], [0, \"&Kcy;\"], [0, \"&Lcy;\"], [0, \"&Mcy;\"], [0, \"&Ncy;\"], [0, \"&Ocy;\"], [0, \"&Pcy;\"], [0, \"&Rcy;\"], [0, \"&Scy;\"], [0, \"&Tcy;\"], [0, \"&Ucy;\"], [0, \"&Fcy;\"], [0, \"&KHcy;\"], [0, \"&TScy;\"], [0, \"&CHcy;\"], [0, \"&SHcy;\"], [0, \"&SHCHcy;\"], [0, \"&HARDcy;\"], [0, \"&Ycy;\"], [0, \"&SOFTcy;\"], [0, \"&Ecy;\"], [0, \"&YUcy;\"], [0, \"&YAcy;\"], [0, \"&acy;\"], [0, \"&bcy;\"], [0, \"&vcy;\"], [0, \"&gcy;\"], [0, \"&dcy;\"], [0, \"&iecy;\"], [0, \"&zhcy;\"], [0, \"&zcy;\"], [0, \"&icy;\"], [0, \"&jcy;\"], [0, \"&kcy;\"], [0, \"&lcy;\"], [0, \"&mcy;\"], [0, \"&ncy;\"], [0, \"&ocy;\"], [0, \"&pcy;\"], [0, \"&rcy;\"], [0, \"&scy;\"], [0, \"&tcy;\"], [0, \"&ucy;\"], [0, \"&fcy;\"], [0, \"&khcy;\"], [0, \"&tscy;\"], [0, \"&chcy;\"], [0, \"&shcy;\"], [0, \"&shchcy;\"], [0, \"&hardcy;\"], [0, \"&ycy;\"], [0, \"&softcy;\"], [0, \"&ecy;\"], [0, \"&yucy;\"], [0, \"&yacy;\"], [1, \"&iocy;\"], [0, \"&djcy;\"], [0, \"&gjcy;\"], [0, \"&jukcy;\"], [0, \"&dscy;\"], [0, \"&iukcy;\"], [0, \"&yicy;\"], [0, \"&jsercy;\"], [0, \"&ljcy;\"], [0, \"&njcy;\"], [0, \"&tshcy;\"], [0, \"&kjcy;\"], [1, \"&ubrcy;\"], [0, \"&dzcy;\"], [7074, \"&ensp;\"], [0, \"&emsp;\"], [0, \"&emsp13;\"], [0, \"&emsp14;\"], [1, \"&numsp;\"], [0, \"&puncsp;\"], [0, \"&ThinSpace;\"], [0, \"&hairsp;\"], [0, \"&NegativeMediumSpace;\"], [0, \"&zwnj;\"], [0, \"&zwj;\"], [0, \"&lrm;\"], [0, \"&rlm;\"], [0, \"&dash;\"], [2, \"&ndash;\"], [0, \"&mdash;\"], [0, \"&horbar;\"], [0, \"&Verbar;\"], [1, \"&lsquo;\"], [0, \"&CloseCurlyQuote;\"], [0, \"&lsquor;\"], [1, \"&ldquo;\"], [0, \"&CloseCurlyDoubleQuote;\"], [0, \"&bdquo;\"], [1, \"&dagger;\"], [0, \"&Dagger;\"], [0, \"&bull;\"], [2, \"&nldr;\"], [0, \"&hellip;\"], [9, \"&permil;\"], [0, \"&pertenk;\"], [0, \"&prime;\"], [0, \"&Prime;\"], [0, \"&tprime;\"], [0, \"&backprime;\"], [3, \"&lsaquo;\"], [0, \"&rsaquo;\"], [3, \"&oline;\"], [2, \"&caret;\"], [1, \"&hybull;\"], [0, \"&frasl;\"], [10, \"&bsemi;\"], [7, \"&qprime;\"], [7, { v: \"&MediumSpace;\", n: 8202, o: \"&ThickSpace;\" }], [0, \"&NoBreak;\"], [0, \"&af;\"], [0, \"&InvisibleTimes;\"], [0, \"&ic;\"], [72, \"&euro;\"], [46, \"&tdot;\"], [0, \"&DotDot;\"], [37, \"&complexes;\"], [2, \"&incare;\"], [4, \"&gscr;\"], [0, \"&hamilt;\"], [0, \"&Hfr;\"], [0, \"&Hopf;\"], [0, \"&planckh;\"], [0, \"&hbar;\"], [0, \"&imagline;\"], [0, \"&Ifr;\"], [0, \"&lagran;\"], [0, \"&ell;\"], [1, \"&naturals;\"], [0, \"&numero;\"], [0, \"&copysr;\"], [0, \"&weierp;\"], [0, \"&Popf;\"], [0, \"&Qopf;\"], [0, \"&realine;\"], [0, \"&real;\"], [0, \"&reals;\"], [0, \"&rx;\"], [3, \"&trade;\"], [1, \"&integers;\"], [2, \"&mho;\"], [0, \"&zeetrf;\"], [0, \"&iiota;\"], [2, \"&bernou;\"], [0, \"&Cayleys;\"], [1, \"&escr;\"], [0, \"&Escr;\"], [0, \"&Fouriertrf;\"], [1, \"&Mellintrf;\"], [0, \"&order;\"], [0, \"&alefsym;\"], [0, \"&beth;\"], [0, \"&gimel;\"], [0, \"&daleth;\"], [12, \"&CapitalDifferentialD;\"], [0, \"&dd;\"], [0, \"&ee;\"], [0, \"&ii;\"], [10, \"&frac13;\"], [0, \"&frac23;\"], [0, \"&frac15;\"], [0, \"&frac25;\"], [0, \"&frac35;\"], [0, \"&frac45;\"], [0, \"&frac16;\"], [0, \"&frac56;\"], [0, \"&frac18;\"], [0, \"&frac38;\"], [0, \"&frac58;\"], [0, \"&frac78;\"], [49, \"&larr;\"], [0, \"&ShortUpArrow;\"], [0, \"&rarr;\"], [0, \"&darr;\"], [0, \"&harr;\"], [0, \"&updownarrow;\"], [0, \"&nwarr;\"], [0, \"&nearr;\"], [0, \"&LowerRightArrow;\"], [0, \"&LowerLeftArrow;\"], [0, \"&nlarr;\"], [0, \"&nrarr;\"], [1, { v: \"&rarrw;\", n: 824, o: \"&nrarrw;\" }], [0, \"&Larr;\"], [0, \"&Uarr;\"], [0, \"&Rarr;\"], [0, \"&Darr;\"], [0, \"&larrtl;\"], [0, \"&rarrtl;\"], [0, \"&LeftTeeArrow;\"], [0, \"&mapstoup;\"], [0, \"&map;\"], [0, \"&DownTeeArrow;\"], [1, \"&hookleftarrow;\"], [0, \"&hookrightarrow;\"], [0, \"&larrlp;\"], [0, \"&looparrowright;\"], [0, \"&harrw;\"], [0, \"&nharr;\"], [1, \"&lsh;\"], [0, \"&rsh;\"], [0, \"&ldsh;\"], [0, \"&rdsh;\"], [1, \"&crarr;\"], [0, \"&cularr;\"], [0, \"&curarr;\"], [2, \"&circlearrowleft;\"], [0, \"&circlearrowright;\"], [0, \"&leftharpoonup;\"], [0, \"&DownLeftVector;\"], [0, \"&RightUpVector;\"], [0, \"&LeftUpVector;\"], [0, \"&rharu;\"], [0, \"&DownRightVector;\"], [0, \"&dharr;\"], [0, \"&dharl;\"], [0, \"&RightArrowLeftArrow;\"], [0, \"&udarr;\"], [0, \"&LeftArrowRightArrow;\"], [0, \"&leftleftarrows;\"], [0, \"&upuparrows;\"], [0, \"&rightrightarrows;\"], [0, \"&ddarr;\"], [0, \"&leftrightharpoons;\"], [0, \"&Equilibrium;\"], [0, \"&nlArr;\"], [0, \"&nhArr;\"], [0, \"&nrArr;\"], [0, \"&DoubleLeftArrow;\"], [0, \"&DoubleUpArrow;\"], [0, \"&DoubleRightArrow;\"], [0, \"&dArr;\"], [0, \"&DoubleLeftRightArrow;\"], [0, \"&DoubleUpDownArrow;\"], [0, \"&nwArr;\"], [0, \"&neArr;\"], [0, \"&seArr;\"], [0, \"&swArr;\"], [0, \"&lAarr;\"], [0, \"&rAarr;\"], [1, \"&zigrarr;\"], [6, \"&larrb;\"], [0, \"&rarrb;\"], [15, \"&DownArrowUpArrow;\"], [7, \"&loarr;\"], [0, \"&roarr;\"], [0, \"&hoarr;\"], [0, \"&forall;\"], [0, \"&comp;\"], [0, { v: \"&part;\", n: 824, o: \"&npart;\" }], [0, \"&exist;\"], [0, \"&nexist;\"], [0, \"&empty;\"], [1, \"&Del;\"], [0, \"&Element;\"], [0, \"&NotElement;\"], [1, \"&ni;\"], [0, \"&notni;\"], [2, \"&prod;\"], [0, \"&coprod;\"], [0, \"&sum;\"], [0, \"&minus;\"], [0, \"&MinusPlus;\"], [0, \"&dotplus;\"], [1, \"&Backslash;\"], [0, \"&lowast;\"], [0, \"&compfn;\"], [1, \"&radic;\"], [2, \"&prop;\"], [0, \"&infin;\"], [0, \"&angrt;\"], [0, { v: \"&ang;\", n: 8402, o: \"&nang;\" }], [0, \"&angmsd;\"], [0, \"&angsph;\"], [0, \"&mid;\"], [0, \"&nmid;\"], [0, \"&DoubleVerticalBar;\"], [0, \"&NotDoubleVerticalBar;\"], [0, \"&and;\"], [0, \"&or;\"], [0, { v: \"&cap;\", n: 65024, o: \"&caps;\" }], [0, { v: \"&cup;\", n: 65024, o: \"&cups;\" }], [0, \"&int;\"], [0, \"&Int;\"], [0, \"&iiint;\"], [0, \"&conint;\"], [0, \"&Conint;\"], [0, \"&Cconint;\"], [0, \"&cwint;\"], [0, \"&ClockwiseContourIntegral;\"], [0, \"&awconint;\"], [0, \"&there4;\"], [0, \"&becaus;\"], [0, \"&ratio;\"], [0, \"&Colon;\"], [0, \"&dotminus;\"], [1, \"&mDDot;\"], [0, \"&homtht;\"], [0, { v: \"&sim;\", n: 8402, o: \"&nvsim;\" }], [0, { v: \"&backsim;\", n: 817, o: \"&race;\" }], [0, { v: \"&ac;\", n: 819, o: \"&acE;\" }], [0, \"&acd;\"], [0, \"&VerticalTilde;\"], [0, \"&NotTilde;\"], [0, { v: \"&eqsim;\", n: 824, o: \"&nesim;\" }], [0, \"&sime;\"], [0, \"&NotTildeEqual;\"], [0, \"&cong;\"], [0, \"&simne;\"], [0, \"&ncong;\"], [0, \"&ap;\"], [0, \"&nap;\"], [0, \"&ape;\"], [0, { v: \"&apid;\", n: 824, o: \"&napid;\" }], [0, \"&backcong;\"], [0, { v: \"&asympeq;\", n: 8402, o: \"&nvap;\" }], [0, { v: \"&bump;\", n: 824, o: \"&nbump;\" }], [0, { v: \"&bumpe;\", n: 824, o: \"&nbumpe;\" }], [0, { v: \"&doteq;\", n: 824, o: \"&nedot;\" }], [0, \"&doteqdot;\"], [0, \"&efDot;\"], [0, \"&erDot;\"], [0, \"&Assign;\"], [0, \"&ecolon;\"], [0, \"&ecir;\"], [0, \"&circeq;\"], [1, \"&wedgeq;\"], [0, \"&veeeq;\"], [1, \"&triangleq;\"], [2, \"&equest;\"], [0, \"&ne;\"], [0, { v: \"&Congruent;\", n: 8421, o: \"&bnequiv;\" }], [0, \"&nequiv;\"], [1, { v: \"&le;\", n: 8402, o: \"&nvle;\" }], [0, { v: \"&ge;\", n: 8402, o: \"&nvge;\" }], [0, { v: \"&lE;\", n: 824, o: \"&nlE;\" }], [0, { v: \"&gE;\", n: 824, o: \"&ngE;\" }], [0, { v: \"&lnE;\", n: 65024, o: \"&lvertneqq;\" }], [0, { v: \"&gnE;\", n: 65024, o: \"&gvertneqq;\" }], [0, { v: \"&ll;\", n: new Map(/* #__PURE__ */ restoreDiff([[824, \"&nLtv;\"], [7577, \"&nLt;\"]])) }], [0, { v: \"&gg;\", n: new Map(/* #__PURE__ */ restoreDiff([[824, \"&nGtv;\"], [7577, \"&nGt;\"]])) }], [0, \"&between;\"], [0, \"&NotCupCap;\"], [0, \"&nless;\"], [0, \"&ngt;\"], [0, \"&nle;\"], [0, \"&nge;\"], [0, \"&lesssim;\"], [0, \"&GreaterTilde;\"], [0, \"&nlsim;\"], [0, \"&ngsim;\"], [0, \"&LessGreater;\"], [0, \"&gl;\"], [0, \"&NotLessGreater;\"], [0, \"&NotGreaterLess;\"], [0, \"&pr;\"], [0, \"&sc;\"], [0, \"&prcue;\"], [0, \"&sccue;\"], [0, \"&PrecedesTilde;\"], [0, { v: \"&scsim;\", n: 824, o: \"&NotSucceedsTilde;\" }], [0, \"&NotPrecedes;\"], [0, \"&NotSucceeds;\"], [0, { v: \"&sub;\", n: 8402, o: \"&NotSubset;\" }], [0, { v: \"&sup;\", n: 8402, o: \"&NotSuperset;\" }], [0, \"&nsub;\"], [0, \"&nsup;\"], [0, \"&sube;\"], [0, \"&supe;\"], [0, \"&NotSubsetEqual;\"], [0, \"&NotSupersetEqual;\"], [0, { v: \"&subne;\", n: 65024, o: \"&varsubsetneq;\" }], [0, { v: \"&supne;\", n: 65024, o: \"&varsupsetneq;\" }], [1, \"&cupdot;\"], [0, \"&UnionPlus;\"], [0, { v: \"&sqsub;\", n: 824, o: \"&NotSquareSubset;\" }], [0, { v: \"&sqsup;\", n: 824, o: \"&NotSquareSuperset;\" }], [0, \"&sqsube;\"], [0, \"&sqsupe;\"], [0, { v: \"&sqcap;\", n: 65024, o: \"&sqcaps;\" }], [0, { v: \"&sqcup;\", n: 65024, o: \"&sqcups;\" }], [0, \"&CirclePlus;\"], [0, \"&CircleMinus;\"], [0, \"&CircleTimes;\"], [0, \"&osol;\"], [0, \"&CircleDot;\"], [0, \"&circledcirc;\"], [0, \"&circledast;\"], [1, \"&circleddash;\"], [0, \"&boxplus;\"], [0, \"&boxminus;\"], [0, \"&boxtimes;\"], [0, \"&dotsquare;\"], [0, \"&RightTee;\"], [0, \"&dashv;\"], [0, \"&DownTee;\"], [0, \"&bot;\"], [1, \"&models;\"], [0, \"&DoubleRightTee;\"], [0, \"&Vdash;\"], [0, \"&Vvdash;\"], [0, \"&VDash;\"], [0, \"&nvdash;\"], [0, \"&nvDash;\"], [0, \"&nVdash;\"], [0, \"&nVDash;\"], [0, \"&prurel;\"], [1, \"&LeftTriangle;\"], [0, \"&RightTriangle;\"], [0, { v: \"&LeftTriangleEqual;\", n: 8402, o: \"&nvltrie;\" }], [0, { v: \"&RightTriangleEqual;\", n: 8402, o: \"&nvrtrie;\" }], [0, \"&origof;\"], [0, \"&imof;\"], [0, \"&multimap;\"], [0, \"&hercon;\"], [0, \"&intcal;\"], [0, \"&veebar;\"], [1, \"&barvee;\"], [0, \"&angrtvb;\"], [0, \"&lrtri;\"], [0, \"&bigwedge;\"], [0, \"&bigvee;\"], [0, \"&bigcap;\"], [0, \"&bigcup;\"], [0, \"&diam;\"], [0, \"&sdot;\"], [0, \"&sstarf;\"], [0, \"&divideontimes;\"], [0, \"&bowtie;\"], [0, \"&ltimes;\"], [0, \"&rtimes;\"], [0, \"&leftthreetimes;\"], [0, \"&rightthreetimes;\"], [0, \"&backsimeq;\"], [0, \"&curlyvee;\"], [0, \"&curlywedge;\"], [0, \"&Sub;\"], [0, \"&Sup;\"], [0, \"&Cap;\"], [0, \"&Cup;\"], [0, \"&fork;\"], [0, \"&epar;\"], [0, \"&lessdot;\"], [0, \"&gtdot;\"], [0, { v: \"&Ll;\", n: 824, o: \"&nLl;\" }], [0, { v: \"&Gg;\", n: 824, o: \"&nGg;\" }], [0, { v: \"&leg;\", n: 65024, o: \"&lesg;\" }], [0, { v: \"&gel;\", n: 65024, o: \"&gesl;\" }], [2, \"&cuepr;\"], [0, \"&cuesc;\"], [0, \"&NotPrecedesSlantEqual;\"], [0, \"&NotSucceedsSlantEqual;\"], [0, \"&NotSquareSubsetEqual;\"], [0, \"&NotSquareSupersetEqual;\"], [2, \"&lnsim;\"], [0, \"&gnsim;\"], [0, \"&precnsim;\"], [0, \"&scnsim;\"], [0, \"&nltri;\"], [0, \"&NotRightTriangle;\"], [0, \"&nltrie;\"], [0, \"&NotRightTriangleEqual;\"], [0, \"&vellip;\"], [0, \"&ctdot;\"], [0, \"&utdot;\"], [0, \"&dtdot;\"], [0, \"&disin;\"], [0, \"&isinsv;\"], [0, \"&isins;\"], [0, { v: \"&isindot;\", n: 824, o: \"&notindot;\" }], [0, \"&notinvc;\"], [0, \"&notinvb;\"], [1, { v: \"&isinE;\", n: 824, o: \"&notinE;\" }], [0, \"&nisd;\"], [0, \"&xnis;\"], [0, \"&nis;\"], [0, \"&notnivc;\"], [0, \"&notnivb;\"], [6, \"&barwed;\"], [0, \"&Barwed;\"], [1, \"&lceil;\"], [0, \"&rceil;\"], [0, \"&LeftFloor;\"], [0, \"&rfloor;\"], [0, \"&drcrop;\"], [0, \"&dlcrop;\"], [0, \"&urcrop;\"], [0, \"&ulcrop;\"], [0, \"&bnot;\"], [1, \"&profline;\"], [0, \"&profsurf;\"], [1, \"&telrec;\"], [0, \"&target;\"], [5, \"&ulcorn;\"], [0, \"&urcorn;\"], [0, \"&dlcorn;\"], [0, \"&drcorn;\"], [2, \"&frown;\"], [0, \"&smile;\"], [9, \"&cylcty;\"], [0, \"&profalar;\"], [7, \"&topbot;\"], [6, \"&ovbar;\"], [1, \"&solbar;\"], [60, \"&angzarr;\"], [51, \"&lmoustache;\"], [0, \"&rmoustache;\"], [2, \"&OverBracket;\"], [0, \"&bbrk;\"], [0, \"&bbrktbrk;\"], [37, \"&OverParenthesis;\"], [0, \"&UnderParenthesis;\"], [0, \"&OverBrace;\"], [0, \"&UnderBrace;\"], [2, \"&trpezium;\"], [4, \"&elinters;\"], [59, \"&blank;\"], [164, \"&circledS;\"], [55, \"&boxh;\"], [1, \"&boxv;\"], [9, \"&boxdr;\"], [3, \"&boxdl;\"], [3, \"&boxur;\"], [3, \"&boxul;\"], [3, \"&boxvr;\"], [7, \"&boxvl;\"], [7, \"&boxhd;\"], [7, \"&boxhu;\"], [7, \"&boxvh;\"], [19, \"&boxH;\"], [0, \"&boxV;\"], [0, \"&boxdR;\"], [0, \"&boxDr;\"], [0, \"&boxDR;\"], [0, \"&boxdL;\"], [0, \"&boxDl;\"], [0, \"&boxDL;\"], [0, \"&boxuR;\"], [0, \"&boxUr;\"], [0, \"&boxUR;\"], [0, \"&boxuL;\"], [0, \"&boxUl;\"], [0, \"&boxUL;\"], [0, \"&boxvR;\"], [0, \"&boxVr;\"], [0, \"&boxVR;\"], [0, \"&boxvL;\"], [0, \"&boxVl;\"], [0, \"&boxVL;\"], [0, \"&boxHd;\"], [0, \"&boxhD;\"], [0, \"&boxHD;\"], [0, \"&boxHu;\"], [0, \"&boxhU;\"], [0, \"&boxHU;\"], [0, \"&boxvH;\"], [0, \"&boxVh;\"], [0, \"&boxVH;\"], [19, \"&uhblk;\"], [3, \"&lhblk;\"], [3, \"&block;\"], [8, \"&blk14;\"], [0, \"&blk12;\"], [0, \"&blk34;\"], [13, \"&square;\"], [8, \"&blacksquare;\"], [0, \"&EmptyVerySmallSquare;\"], [1, \"&rect;\"], [0, \"&marker;\"], [2, \"&fltns;\"], [1, \"&bigtriangleup;\"], [0, \"&blacktriangle;\"], [0, \"&triangle;\"], [2, \"&blacktriangleright;\"], [0, \"&rtri;\"], [3, \"&bigtriangledown;\"], [0, \"&blacktriangledown;\"], [0, \"&dtri;\"], [2, \"&blacktriangleleft;\"], [0, \"&ltri;\"], [6, \"&loz;\"], [0, \"&cir;\"], [32, \"&tridot;\"], [2, \"&bigcirc;\"], [8, \"&ultri;\"], [0, \"&urtri;\"], [0, \"&lltri;\"], [0, \"&EmptySmallSquare;\"], [0, \"&FilledSmallSquare;\"], [8, \"&bigstar;\"], [0, \"&star;\"], [7, \"&phone;\"], [49, \"&female;\"], [1, \"&male;\"], [29, \"&spades;\"], [2, \"&clubs;\"], [1, \"&hearts;\"], [0, \"&diamondsuit;\"], [3, \"&sung;\"], [2, \"&flat;\"], [0, \"&natural;\"], [0, \"&sharp;\"], [163, \"&check;\"], [3, \"&cross;\"], [8, \"&malt;\"], [21, \"&sext;\"], [33, \"&VerticalSeparator;\"], [25, \"&lbbrk;\"], [0, \"&rbbrk;\"], [84, \"&bsolhsub;\"], [0, \"&suphsol;\"], [28, \"&LeftDoubleBracket;\"], [0, \"&RightDoubleBracket;\"], [0, \"&lang;\"], [0, \"&rang;\"], [0, \"&Lang;\"], [0, \"&Rang;\"], [0, \"&loang;\"], [0, \"&roang;\"], [7, \"&longleftarrow;\"], [0, \"&longrightarrow;\"], [0, \"&longleftrightarrow;\"], [0, \"&DoubleLongLeftArrow;\"], [0, \"&DoubleLongRightArrow;\"], [0, \"&DoubleLongLeftRightArrow;\"], [1, \"&longmapsto;\"], [2, \"&dzigrarr;\"], [258, \"&nvlArr;\"], [0, \"&nvrArr;\"], [0, \"&nvHarr;\"], [0, \"&Map;\"], [6, \"&lbarr;\"], [0, \"&bkarow;\"], [0, \"&lBarr;\"], [0, \"&dbkarow;\"], [0, \"&drbkarow;\"], [0, \"&DDotrahd;\"], [0, \"&UpArrowBar;\"], [0, \"&DownArrowBar;\"], [2, \"&Rarrtl;\"], [2, \"&latail;\"], [0, \"&ratail;\"], [0, \"&lAtail;\"], [0, \"&rAtail;\"], [0, \"&larrfs;\"], [0, \"&rarrfs;\"], [0, \"&larrbfs;\"], [0, \"&rarrbfs;\"], [2, \"&nwarhk;\"], [0, \"&nearhk;\"], [0, \"&hksearow;\"], [0, \"&hkswarow;\"], [0, \"&nwnear;\"], [0, \"&nesear;\"], [0, \"&seswar;\"], [0, \"&swnwar;\"], [8, { v: \"&rarrc;\", n: 824, o: \"&nrarrc;\" }], [1, \"&cudarrr;\"], [0, \"&ldca;\"], [0, \"&rdca;\"], [0, \"&cudarrl;\"], [0, \"&larrpl;\"], [2, \"&curarrm;\"], [0, \"&cularrp;\"], [7, \"&rarrpl;\"], [2, \"&harrcir;\"], [0, \"&Uarrocir;\"], [0, \"&lurdshar;\"], [0, \"&ldrushar;\"], [2, \"&LeftRightVector;\"], [0, \"&RightUpDownVector;\"], [0, \"&DownLeftRightVector;\"], [0, \"&LeftUpDownVector;\"], [0, \"&LeftVectorBar;\"], [0, \"&RightVectorBar;\"], [0, \"&RightUpVectorBar;\"], [0, \"&RightDownVectorBar;\"], [0, \"&DownLeftVectorBar;\"], [0, \"&DownRightVectorBar;\"], [0, \"&LeftUpVectorBar;\"], [0, \"&LeftDownVectorBar;\"], [0, \"&LeftTeeVector;\"], [0, \"&RightTeeVector;\"], [0, \"&RightUpTeeVector;\"], [0, \"&RightDownTeeVector;\"], [0, \"&DownLeftTeeVector;\"], [0, \"&DownRightTeeVector;\"], [0, \"&LeftUpTeeVector;\"], [0, \"&LeftDownTeeVector;\"], [0, \"&lHar;\"], [0, \"&uHar;\"], [0, \"&rHar;\"], [0, \"&dHar;\"], [0, \"&luruhar;\"], [0, \"&ldrdhar;\"], [0, \"&ruluhar;\"], [0, \"&rdldhar;\"], [0, \"&lharul;\"], [0, \"&llhard;\"], [0, \"&rharul;\"], [0, \"&lrhard;\"], [0, \"&udhar;\"], [0, \"&duhar;\"], [0, \"&RoundImplies;\"], [0, \"&erarr;\"], [0, \"&simrarr;\"], [0, \"&larrsim;\"], [0, \"&rarrsim;\"], [0, \"&rarrap;\"], [0, \"&ltlarr;\"], [1, \"&gtrarr;\"], [0, \"&subrarr;\"], [1, \"&suplarr;\"], [0, \"&lfisht;\"], [0, \"&rfisht;\"], [0, \"&ufisht;\"], [0, \"&dfisht;\"], [5, \"&lopar;\"], [0, \"&ropar;\"], [4, \"&lbrke;\"], [0, \"&rbrke;\"], [0, \"&lbrkslu;\"], [0, \"&rbrksld;\"], [0, \"&lbrksld;\"], [0, \"&rbrkslu;\"], [0, \"&langd;\"], [0, \"&rangd;\"], [0, \"&lparlt;\"], [0, \"&rpargt;\"], [0, \"&gtlPar;\"], [0, \"&ltrPar;\"], [3, \"&vzigzag;\"], [1, \"&vangrt;\"], [0, \"&angrtvbd;\"], [6, \"&ange;\"], [0, \"&range;\"], [0, \"&dwangle;\"], [0, \"&uwangle;\"], [0, \"&angmsdaa;\"], [0, \"&angmsdab;\"], [0, \"&angmsdac;\"], [0, \"&angmsdad;\"], [0, \"&angmsdae;\"], [0, \"&angmsdaf;\"], [0, \"&angmsdag;\"], [0, \"&angmsdah;\"], [0, \"&bemptyv;\"], [0, \"&demptyv;\"], [0, \"&cemptyv;\"], [0, \"&raemptyv;\"], [0, \"&laemptyv;\"], [0, \"&ohbar;\"], [0, \"&omid;\"], [0, \"&opar;\"], [1, \"&operp;\"], [1, \"&olcross;\"], [0, \"&odsold;\"], [1, \"&olcir;\"], [0, \"&ofcir;\"], [0, \"&olt;\"], [0, \"&ogt;\"], [0, \"&cirscir;\"], [0, \"&cirE;\"], [0, \"&solb;\"], [0, \"&bsolb;\"], [3, \"&boxbox;\"], [3, \"&trisb;\"], [0, \"&rtriltri;\"], [0, { v: \"&LeftTriangleBar;\", n: 824, o: \"&NotLeftTriangleBar;\" }], [0, { v: \"&RightTriangleBar;\", n: 824, o: \"&NotRightTriangleBar;\" }], [11, \"&iinfin;\"], [0, \"&infintie;\"], [0, \"&nvinfin;\"], [4, \"&eparsl;\"], [0, \"&smeparsl;\"], [0, \"&eqvparsl;\"], [5, \"&blacklozenge;\"], [8, \"&RuleDelayed;\"], [1, \"&dsol;\"], [9, \"&bigodot;\"], [0, \"&bigoplus;\"], [0, \"&bigotimes;\"], [1, \"&biguplus;\"], [1, \"&bigsqcup;\"], [5, \"&iiiint;\"], [0, \"&fpartint;\"], [2, \"&cirfnint;\"], [0, \"&awint;\"], [0, \"&rppolint;\"], [0, \"&scpolint;\"], [0, \"&npolint;\"], [0, \"&pointint;\"], [0, \"&quatint;\"], [0, \"&intlarhk;\"], [10, \"&pluscir;\"], [0, \"&plusacir;\"], [0, \"&simplus;\"], [0, \"&plusdu;\"], [0, \"&plussim;\"], [0, \"&plustwo;\"], [1, \"&mcomma;\"], [0, \"&minusdu;\"], [2, \"&loplus;\"], [0, \"&roplus;\"], [0, \"&Cross;\"], [0, \"&timesd;\"], [0, \"&timesbar;\"], [1, \"&smashp;\"], [0, \"&lotimes;\"], [0, \"&rotimes;\"], [0, \"&otimesas;\"], [0, \"&Otimes;\"], [0, \"&odiv;\"], [0, \"&triplus;\"], [0, \"&triminus;\"], [0, \"&tritime;\"], [0, \"&intprod;\"], [2, \"&amalg;\"], [0, \"&capdot;\"], [1, \"&ncup;\"], [0, \"&ncap;\"], [0, \"&capand;\"], [0, \"&cupor;\"], [0, \"&cupcap;\"], [0, \"&capcup;\"], [0, \"&cupbrcap;\"], [0, \"&capbrcup;\"], [0, \"&cupcup;\"], [0, \"&capcap;\"], [0, \"&ccups;\"], [0, \"&ccaps;\"], [2, \"&ccupssm;\"], [2, \"&And;\"], [0, \"&Or;\"], [0, \"&andand;\"], [0, \"&oror;\"], [0, \"&orslope;\"], [0, \"&andslope;\"], [1, \"&andv;\"], [0, \"&orv;\"], [0, \"&andd;\"], [0, \"&ord;\"], [1, \"&wedbar;\"], [6, \"&sdote;\"], [3, \"&simdot;\"], [2, { v: \"&congdot;\", n: 824, o: \"&ncongdot;\" }], [0, \"&easter;\"], [0, \"&apacir;\"], [0, { v: \"&apE;\", n: 824, o: \"&napE;\" }], [0, \"&eplus;\"], [0, \"&pluse;\"], [0, \"&Esim;\"], [0, \"&Colone;\"], [0, \"&Equal;\"], [1, \"&ddotseq;\"], [0, \"&equivDD;\"], [0, \"&ltcir;\"], [0, \"&gtcir;\"], [0, \"&ltquest;\"], [0, \"&gtquest;\"], [0, { v: \"&leqslant;\", n: 824, o: \"&nleqslant;\" }], [0, { v: \"&geqslant;\", n: 824, o: \"&ngeqslant;\" }], [0, \"&lesdot;\"], [0, \"&gesdot;\"], [0, \"&lesdoto;\"], [0, \"&gesdoto;\"], [0, \"&lesdotor;\"], [0, \"&gesdotol;\"], [0, \"&lap;\"], [0, \"&gap;\"], [0, \"&lne;\"], [0, \"&gne;\"], [0, \"&lnap;\"], [0, \"&gnap;\"], [0, \"&lEg;\"], [0, \"&gEl;\"], [0, \"&lsime;\"], [0, \"&gsime;\"], [0, \"&lsimg;\"], [0, \"&gsiml;\"], [0, \"&lgE;\"], [0, \"&glE;\"], [0, \"&lesges;\"], [0, \"&gesles;\"], [0, \"&els;\"], [0, \"&egs;\"], [0, \"&elsdot;\"], [0, \"&egsdot;\"], [0, \"&el;\"], [0, \"&eg;\"], [2, \"&siml;\"], [0, \"&simg;\"], [0, \"&simlE;\"], [0, \"&simgE;\"], [0, { v: \"&LessLess;\", n: 824, o: \"&NotNestedLessLess;\" }], [0, { v: \"&GreaterGreater;\", n: 824, o: \"&NotNestedGreaterGreater;\" }], [1, \"&glj;\"], [0, \"&gla;\"], [0, \"&ltcc;\"], [0, \"&gtcc;\"], [0, \"&lescc;\"], [0, \"&gescc;\"], [0, \"&smt;\"], [0, \"&lat;\"], [0, { v: \"&smte;\", n: 65024, o: \"&smtes;\" }], [0, { v: \"&late;\", n: 65024, o: \"&lates;\" }], [0, \"&bumpE;\"], [0, { v: \"&PrecedesEqual;\", n: 824, o: \"&NotPrecedesEqual;\" }], [0, { v: \"&sce;\", n: 824, o: \"&NotSucceedsEqual;\" }], [2, \"&prE;\"], [0, \"&scE;\"], [0, \"&precneqq;\"], [0, \"&scnE;\"], [0, \"&prap;\"], [0, \"&scap;\"], [0, \"&precnapprox;\"], [0, \"&scnap;\"], [0, \"&Pr;\"], [0, \"&Sc;\"], [0, \"&subdot;\"], [0, \"&supdot;\"], [0, \"&subplus;\"], [0, \"&supplus;\"], [0, \"&submult;\"], [0, \"&supmult;\"], [0, \"&subedot;\"], [0, \"&supedot;\"], [0, { v: \"&subE;\", n: 824, o: \"&nsubE;\" }], [0, { v: \"&supE;\", n: 824, o: \"&nsupE;\" }], [0, \"&subsim;\"], [0, \"&supsim;\"], [2, { v: \"&subnE;\", n: 65024, o: \"&varsubsetneqq;\" }], [0, { v: \"&supnE;\", n: 65024, o: \"&varsupsetneqq;\" }], [2, \"&csub;\"], [0, \"&csup;\"], [0, \"&csube;\"], [0, \"&csupe;\"], [0, \"&subsup;\"], [0, \"&supsub;\"], [0, \"&subsub;\"], [0, \"&supsup;\"], [0, \"&suphsub;\"], [0, \"&supdsub;\"], [0, \"&forkv;\"], [0, \"&topfork;\"], [0, \"&mlcp;\"], [8, \"&Dashv;\"], [1, \"&Vdashl;\"], [0, \"&Barv;\"], [0, \"&vBar;\"], [0, \"&vBarv;\"], [1, \"&Vbar;\"], [0, \"&Not;\"], [0, \"&bNot;\"], [0, \"&rnmid;\"], [0, \"&cirmid;\"], [0, \"&midcir;\"], [0, \"&topcir;\"], [0, \"&nhpar;\"], [0, \"&parsim;\"], [9, { v: \"&parsl;\", n: 8421, o: \"&nparsl;\" }], [44343, { n: new Map(/* #__PURE__ */ restoreDiff([[56476, \"&Ascr;\"], [1, \"&Cscr;\"], [0, \"&Dscr;\"], [2, \"&Gscr;\"], [2, \"&Jscr;\"], [0, \"&Kscr;\"], [2, \"&Nscr;\"], [0, \"&Oscr;\"], [0, \"&Pscr;\"], [0, \"&Qscr;\"], [1, \"&Sscr;\"], [0, \"&Tscr;\"], [0, \"&Uscr;\"], [0, \"&Vscr;\"], [0, \"&Wscr;\"], [0, \"&Xscr;\"], [0, \"&Yscr;\"], [0, \"&Zscr;\"], [0, \"&ascr;\"], [0, \"&bscr;\"], [0, \"&cscr;\"], [0, \"&dscr;\"], [1, \"&fscr;\"], [1, \"&hscr;\"], [0, \"&iscr;\"], [0, \"&jscr;\"], [0, \"&kscr;\"], [0, \"&lscr;\"], [0, \"&mscr;\"], [0, \"&nscr;\"], [1, \"&pscr;\"], [0, \"&qscr;\"], [0, \"&rscr;\"], [0, \"&sscr;\"], [0, \"&tscr;\"], [0, \"&uscr;\"], [0, \"&vscr;\"], [0, \"&wscr;\"], [0, \"&xscr;\"], [0, \"&yscr;\"], [0, \"&zscr;\"], [52, \"&Afr;\"], [0, \"&Bfr;\"], [1, \"&Dfr;\"], [0, \"&Efr;\"], [0, \"&Ffr;\"], [0, \"&Gfr;\"], [2, \"&Jfr;\"], [0, \"&Kfr;\"], [0, \"&Lfr;\"], [0, \"&Mfr;\"], [0, \"&Nfr;\"], [0, \"&Ofr;\"], [0, \"&Pfr;\"], [0, \"&Qfr;\"], [1, \"&Sfr;\"], [0, \"&Tfr;\"], [0, \"&Ufr;\"], [0, \"&Vfr;\"], [0, \"&Wfr;\"], [0, \"&Xfr;\"], [0, \"&Yfr;\"], [1, \"&afr;\"], [0, \"&bfr;\"], [0, \"&cfr;\"], [0, \"&dfr;\"], [0, \"&efr;\"], [0, \"&ffr;\"], [0, \"&gfr;\"], [0, \"&hfr;\"], [0, \"&ifr;\"], [0, \"&jfr;\"], [0, \"&kfr;\"], [0, \"&lfr;\"], [0, \"&mfr;\"], [0, \"&nfr;\"], [0, \"&ofr;\"], [0, \"&pfr;\"], [0, \"&qfr;\"], [0, \"&rfr;\"], [0, \"&sfr;\"], [0, \"&tfr;\"], [0, \"&ufr;\"], [0, \"&vfr;\"], [0, \"&wfr;\"], [0, \"&xfr;\"], [0, \"&yfr;\"], [0, \"&zfr;\"], [0, \"&Aopf;\"], [0, \"&Bopf;\"], [1, \"&Dopf;\"], [0, \"&Eopf;\"], [0, \"&Fopf;\"], [0, \"&Gopf;\"], [1, \"&Iopf;\"], [0, \"&Jopf;\"], [0, \"&Kopf;\"], [0, \"&Lopf;\"], [0, \"&Mopf;\"], [1, \"&Oopf;\"], [3, \"&Sopf;\"], [0, \"&Topf;\"], [0, \"&Uopf;\"], [0, \"&Vopf;\"], [0, \"&Wopf;\"], [0, \"&Xopf;\"], [0, \"&Yopf;\"], [1, \"&aopf;\"], [0, \"&bopf;\"], [0, \"&copf;\"], [0, \"&dopf;\"], [0, \"&eopf;\"], [0, \"&fopf;\"], [0, \"&gopf;\"], [0, \"&hopf;\"], [0, \"&iopf;\"], [0, \"&jopf;\"], [0, \"&kopf;\"], [0, \"&lopf;\"], [0, \"&mopf;\"], [0, \"&nopf;\"], [0, \"&oopf;\"], [0, \"&popf;\"], [0, \"&qopf;\"], [0, \"&ropf;\"], [0, \"&sopf;\"], [0, \"&topf;\"], [0, \"&uopf;\"], [0, \"&vopf;\"], [0, \"&wopf;\"], [0, \"&xopf;\"], [0, \"&yopf;\"], [0, \"&zopf;\"]])) }], [8906, \"&fflig;\"], [0, \"&filig;\"], [0, \"&fllig;\"], [0, \"&ffilig;\"], [0, \"&ffllig;\"]]));\n//# sourceMappingURL=encode-html.js.map","import { decodeXML, decodeHTML, DecodingMode } from \"./decode.js\";\nimport { encodeHTML, encodeNonAsciiHTML } from \"./encode.js\";\nimport { encodeXML, escapeUTF8, escapeAttribute, escapeText, } from \"./escape.js\";\n/** The level of entities to support. */\nexport var EntityLevel;\n(function (EntityLevel) {\n    /** Support only XML entities. */\n    EntityLevel[EntityLevel[\"XML\"] = 0] = \"XML\";\n    /** Support HTML entities, which are a superset of XML entities. */\n    EntityLevel[EntityLevel[\"HTML\"] = 1] = \"HTML\";\n})(EntityLevel || (EntityLevel = {}));\nexport var EncodingMode;\n(function (EncodingMode) {\n    /**\n     * The output is UTF-8 encoded. Only characters that need escaping within\n     * XML will be escaped.\n     */\n    EncodingMode[EncodingMode[\"UTF8\"] = 0] = \"UTF8\";\n    /**\n     * The output consists only of ASCII characters. Characters that need\n     * escaping within HTML, and characters that aren't ASCII characters will\n     * be escaped.\n     */\n    EncodingMode[EncodingMode[\"ASCII\"] = 1] = \"ASCII\";\n    /**\n     * Encode all characters that have an equivalent entity, as well as all\n     * characters that are not ASCII characters.\n     */\n    EncodingMode[EncodingMode[\"Extensive\"] = 2] = \"Extensive\";\n    /**\n     * Encode all characters that have to be escaped in HTML attributes,\n     * following {@link https://html.spec.whatwg.org/multipage/parsing.html#escapingString}.\n     */\n    EncodingMode[EncodingMode[\"Attribute\"] = 3] = \"Attribute\";\n    /**\n     * Encode all characters that have to be escaped in HTML text,\n     * following {@link https://html.spec.whatwg.org/multipage/parsing.html#escapingString}.\n     */\n    EncodingMode[EncodingMode[\"Text\"] = 4] = \"Text\";\n})(EncodingMode || (EncodingMode = {}));\n/**\n * Decodes a string with entities.\n *\n * @param data String to decode.\n * @param options Decoding options.\n */\nexport function decode(data, options = EntityLevel.XML) {\n    const level = typeof options === \"number\" ? options : options.level;\n    if (level === EntityLevel.HTML) {\n        const mode = typeof options === \"object\" ? options.mode : undefined;\n        return decodeHTML(data, mode);\n    }\n    return decodeXML(data);\n}\n/**\n * Decodes a string with entities. Does not allow missing trailing semicolons for entities.\n *\n * @param data String to decode.\n * @param options Decoding options.\n * @deprecated Use `decode` with the `mode` set to `Strict`.\n */\nexport function decodeStrict(data, options = EntityLevel.XML) {\n    var _a;\n    const opts = typeof options === \"number\" ? { level: options } : options;\n    (_a = opts.mode) !== null && _a !== void 0 ? _a : (opts.mode = DecodingMode.Strict);\n    return decode(data, opts);\n}\n/**\n * Encodes a string with entities.\n *\n * @param data String to encode.\n * @param options Encoding options.\n */\nexport function encode(data, options = EntityLevel.XML) {\n    const opts = typeof options === \"number\" ? { level: options } : options;\n    // Mode `UTF8` just escapes XML entities\n    if (opts.mode === EncodingMode.UTF8)\n        return escapeUTF8(data);\n    if (opts.mode === EncodingMode.Attribute)\n        return escapeAttribute(data);\n    if (opts.mode === EncodingMode.Text)\n        return escapeText(data);\n    if (opts.level === EntityLevel.HTML) {\n        if (opts.mode === EncodingMode.ASCII) {\n            return encodeNonAsciiHTML(data);\n        }\n        return encodeHTML(data);\n    }\n    // ASCII and Extensive are equivalent\n    return encodeXML(data);\n}\nexport { encodeXML, escape, escapeUTF8, escapeAttribute, escapeText, } from \"./escape.js\";\nexport { encodeHTML, encodeNonAsciiHTML, \n// Legacy aliases (deprecated)\nencodeHTML as encodeHTML4, encodeHTML as encodeHTML5, } from \"./encode.js\";\nexport { EntityDecoder, DecodingMode, decodeXML, decodeHTML, decodeHTMLStrict, decodeHTMLAttribute, \n// Legacy aliases (deprecated)\ndecodeHTML as decodeHTML4, decodeHTML as decodeHTML5, decodeHTMLStrict as decodeHTML4Strict, decodeHTMLStrict as decodeHTML5Strict, decodeXML as decodeXMLStrict, } from \"./decode.js\";\n//# sourceMappingURL=index.js.map","import Tokenizer, { QuoteType } from \"./Tokenizer.js\";\nimport { fromCodePoint } from \"entities/lib/decode.js\";\nconst formTags = new Set([\n    \"input\",\n    \"option\",\n    \"optgroup\",\n    \"select\",\n    \"button\",\n    \"datalist\",\n    \"textarea\",\n]);\nconst pTag = new Set([\"p\"]);\nconst tableSectionTags = new Set([\"thead\", \"tbody\"]);\nconst ddtTags = new Set([\"dd\", \"dt\"]);\nconst rtpTags = new Set([\"rt\", \"rp\"]);\nconst openImpliesClose = new Map([\n    [\"tr\", new Set([\"tr\", \"th\", \"td\"])],\n    [\"th\", new Set([\"th\"])],\n    [\"td\", new Set([\"thead\", \"th\", \"td\"])],\n    [\"body\", new Set([\"head\", \"link\", \"script\"])],\n    [\"li\", new Set([\"li\"])],\n    [\"p\", pTag],\n    [\"h1\", pTag],\n    [\"h2\", pTag],\n    [\"h3\", pTag],\n    [\"h4\", pTag],\n    [\"h5\", pTag],\n    [\"h6\", pTag],\n    [\"select\", formTags],\n    [\"input\", formTags],\n    [\"output\", formTags],\n    [\"button\", formTags],\n    [\"datalist\", formTags],\n    [\"textarea\", formTags],\n    [\"option\", new Set([\"option\"])],\n    [\"optgroup\", new Set([\"optgroup\", \"option\"])],\n    [\"dd\", ddtTags],\n    [\"dt\", ddtTags],\n    [\"address\", pTag],\n    [\"article\", pTag],\n    [\"aside\", pTag],\n    [\"blockquote\", pTag],\n    [\"details\", pTag],\n    [\"div\", pTag],\n    [\"dl\", pTag],\n    [\"fieldset\", pTag],\n    [\"figcaption\", pTag],\n    [\"figure\", pTag],\n    [\"footer\", pTag],\n    [\"form\", pTag],\n    [\"header\", pTag],\n    [\"hr\", pTag],\n    [\"main\", pTag],\n    [\"nav\", pTag],\n    [\"ol\", pTag],\n    [\"pre\", pTag],\n    [\"section\", pTag],\n    [\"table\", pTag],\n    [\"ul\", pTag],\n    [\"rt\", rtpTags],\n    [\"rp\", rtpTags],\n    [\"tbody\", tableSectionTags],\n    [\"tfoot\", tableSectionTags],\n]);\nconst voidElements = new Set([\n    \"area\",\n    \"base\",\n    \"basefont\",\n    \"br\",\n    \"col\",\n    \"command\",\n    \"embed\",\n    \"frame\",\n    \"hr\",\n    \"img\",\n    \"input\",\n    \"isindex\",\n    \"keygen\",\n    \"link\",\n    \"meta\",\n    \"param\",\n    \"source\",\n    \"track\",\n    \"wbr\",\n]);\nconst foreignContextElements = new Set([\"math\", \"svg\"]);\nconst htmlIntegrationElements = new Set([\n    \"mi\",\n    \"mo\",\n    \"mn\",\n    \"ms\",\n    \"mtext\",\n    \"annotation-xml\",\n    \"foreignobject\",\n    \"desc\",\n    \"title\",\n]);\nconst reNameEnd = /\\s|\\//;\nexport class Parser {\n    constructor(cbs, options = {}) {\n        var _a, _b, _c, _d, _e, _f;\n        this.options = options;\n        /** The start index of the last event. */\n        this.startIndex = 0;\n        /** The end index of the last event. */\n        this.endIndex = 0;\n        /**\n         * Store the start index of the current open tag,\n         * so we can update the start index for attributes.\n         */\n        this.openTagStart = 0;\n        this.tagname = \"\";\n        this.attribname = \"\";\n        this.attribvalue = \"\";\n        this.attribs = null;\n        this.stack = [];\n        this.buffers = [];\n        this.bufferOffset = 0;\n        /** The index of the last written buffer. Used when resuming after a `pause()`. */\n        this.writeIndex = 0;\n        /** Indicates whether the parser has finished running / `.end` has been called. */\n        this.ended = false;\n        this.cbs = cbs !== null && cbs !== void 0 ? cbs : {};\n        this.htmlMode = !this.options.xmlMode;\n        this.lowerCaseTagNames = (_a = options.lowerCaseTags) !== null && _a !== void 0 ? _a : this.htmlMode;\n        this.lowerCaseAttributeNames =\n            (_b = options.lowerCaseAttributeNames) !== null && _b !== void 0 ? _b : this.htmlMode;\n        this.recognizeSelfClosing =\n            (_c = options.recognizeSelfClosing) !== null && _c !== void 0 ? _c : !this.htmlMode;\n        this.tokenizer = new ((_d = options.Tokenizer) !== null && _d !== void 0 ? _d : Tokenizer)(this.options, this);\n        this.foreignContext = [!this.htmlMode];\n        (_f = (_e = this.cbs).onparserinit) === null || _f === void 0 ? void 0 : _f.call(_e, this);\n    }\n    // Tokenizer event handlers\n    /** @internal */\n    ontext(start, endIndex) {\n        var _a, _b;\n        const data = this.getSlice(start, endIndex);\n        this.endIndex = endIndex - 1;\n        (_b = (_a = this.cbs).ontext) === null || _b === void 0 ? void 0 : _b.call(_a, data);\n        this.startIndex = endIndex;\n    }\n    /** @internal */\n    ontextentity(cp, endIndex) {\n        var _a, _b;\n        this.endIndex = endIndex - 1;\n        (_b = (_a = this.cbs).ontext) === null || _b === void 0 ? void 0 : _b.call(_a, fromCodePoint(cp));\n        this.startIndex = endIndex;\n    }\n    /**\n     * Checks if the current tag is a void element. Override this if you want\n     * to specify your own additional void elements.\n     */\n    isVoidElement(name) {\n        return this.htmlMode && voidElements.has(name);\n    }\n    /** @internal */\n    onopentagname(start, endIndex) {\n        this.endIndex = endIndex;\n        let name = this.getSlice(start, endIndex);\n        if (this.lowerCaseTagNames) {\n            name = name.toLowerCase();\n        }\n        this.emitOpenTag(name);\n    }\n    emitOpenTag(name) {\n        var _a, _b, _c, _d;\n        this.openTagStart = this.startIndex;\n        this.tagname = name;\n        const impliesClose = this.htmlMode && openImpliesClose.get(name);\n        if (impliesClose) {\n            while (this.stack.length > 0 && impliesClose.has(this.stack[0])) {\n                const element = this.stack.shift();\n                (_b = (_a = this.cbs).onclosetag) === null || _b === void 0 ? void 0 : _b.call(_a, element, true);\n            }\n        }\n        if (!this.isVoidElement(name)) {\n            this.stack.unshift(name);\n            if (this.htmlMode) {\n                if (foreignContextElements.has(name)) {\n                    this.foreignContext.unshift(true);\n                }\n                else if (htmlIntegrationElements.has(name)) {\n                    this.foreignContext.unshift(false);\n                }\n            }\n        }\n        (_d = (_c = this.cbs).onopentagname) === null || _d === void 0 ? void 0 : _d.call(_c, name);\n        if (this.cbs.onopentag)\n            this.attribs = {};\n    }\n    endOpenTag(isImplied) {\n        var _a, _b;\n        this.startIndex = this.openTagStart;\n        if (this.attribs) {\n            (_b = (_a = this.cbs).onopentag) === null || _b === void 0 ? void 0 : _b.call(_a, this.tagname, this.attribs, isImplied);\n            this.attribs = null;\n        }\n        if (this.cbs.onclosetag && this.isVoidElement(this.tagname)) {\n            this.cbs.onclosetag(this.tagname, true);\n        }\n        this.tagname = \"\";\n    }\n    /** @internal */\n    onopentagend(endIndex) {\n        this.endIndex = endIndex;\n        this.endOpenTag(false);\n        // Set `startIndex` for next node\n        this.startIndex = endIndex + 1;\n    }\n    /** @internal */\n    onclosetag(start, endIndex) {\n        var _a, _b, _c, _d, _e, _f, _g, _h;\n        this.endIndex = endIndex;\n        let name = this.getSlice(start, endIndex);\n        if (this.lowerCaseTagNames) {\n            name = name.toLowerCase();\n        }\n        if (this.htmlMode &&\n            (foreignContextElements.has(name) ||\n                htmlIntegrationElements.has(name))) {\n            this.foreignContext.shift();\n        }\n        if (!this.isVoidElement(name)) {\n            const pos = this.stack.indexOf(name);\n            if (pos !== -1) {\n                for (let index = 0; index <= pos; index++) {\n                    const element = this.stack.shift();\n                    // We know the stack has sufficient elements.\n                    (_b = (_a = this.cbs).onclosetag) === null || _b === void 0 ? void 0 : _b.call(_a, element, index !== pos);\n                }\n            }\n            else if (this.htmlMode && name === \"p\") {\n                // Implicit open before close\n                this.emitOpenTag(\"p\");\n                this.closeCurrentTag(true);\n            }\n        }\n        else if (this.htmlMode && name === \"br\") {\n            // We can't use `emitOpenTag` for implicit open, as `br` would be implicitly closed.\n            (_d = (_c = this.cbs).onopentagname) === null || _d === void 0 ? void 0 : _d.call(_c, \"br\");\n            (_f = (_e = this.cbs).onopentag) === null || _f === void 0 ? void 0 : _f.call(_e, \"br\", {}, true);\n            (_h = (_g = this.cbs).onclosetag) === null || _h === void 0 ? void 0 : _h.call(_g, \"br\", false);\n        }\n        // Set `startIndex` for next node\n        this.startIndex = endIndex + 1;\n    }\n    /** @internal */\n    onselfclosingtag(endIndex) {\n        this.endIndex = endIndex;\n        if (this.recognizeSelfClosing || this.foreignContext[0]) {\n            this.closeCurrentTag(false);\n            // Set `startIndex` for next node\n            this.startIndex = endIndex + 1;\n        }\n        else {\n            // Ignore the fact that the tag is self-closing.\n            this.onopentagend(endIndex);\n        }\n    }\n    closeCurrentTag(isOpenImplied) {\n        var _a, _b;\n        const name = this.tagname;\n        this.endOpenTag(isOpenImplied);\n        // Self-closing tags will be on the top of the stack\n        if (this.stack[0] === name) {\n            // If the opening tag isn't implied, the closing tag has to be implied.\n            (_b = (_a = this.cbs).onclosetag) === null || _b === void 0 ? void 0 : _b.call(_a, name, !isOpenImplied);\n            this.stack.shift();\n        }\n    }\n    /** @internal */\n    onattribname(start, endIndex) {\n        this.startIndex = start;\n        const name = this.getSlice(start, endIndex);\n        this.attribname = this.lowerCaseAttributeNames\n            ? name.toLowerCase()\n            : name;\n    }\n    /** @internal */\n    onattribdata(start, endIndex) {\n        this.attribvalue += this.getSlice(start, endIndex);\n    }\n    /** @internal */\n    onattribentity(cp) {\n        this.attribvalue += fromCodePoint(cp);\n    }\n    /** @internal */\n    onattribend(quote, endIndex) {\n        var _a, _b;\n        this.endIndex = endIndex;\n        (_b = (_a = this.cbs).onattribute) === null || _b === void 0 ? void 0 : _b.call(_a, this.attribname, this.attribvalue, quote === QuoteType.Double\n            ? '\"'\n            : quote === QuoteType.Single\n                ? \"'\"\n                : quote === QuoteType.NoValue\n                    ? undefined\n                    : null);\n        if (this.attribs &&\n            !Object.prototype.hasOwnProperty.call(this.attribs, this.attribname)) {\n            this.attribs[this.attribname] = this.attribvalue;\n        }\n        this.attribvalue = \"\";\n    }\n    getInstructionName(value) {\n        const index = value.search(reNameEnd);\n        let name = index < 0 ? value : value.substr(0, index);\n        if (this.lowerCaseTagNames) {\n            name = name.toLowerCase();\n        }\n        return name;\n    }\n    /** @internal */\n    ondeclaration(start, endIndex) {\n        this.endIndex = endIndex;\n        const value = this.getSlice(start, endIndex);\n        if (this.cbs.onprocessinginstruction) {\n            const name = this.getInstructionName(value);\n            this.cbs.onprocessinginstruction(`!${name}`, `!${value}`);\n        }\n        // Set `startIndex` for next node\n        this.startIndex = endIndex + 1;\n    }\n    /** @internal */\n    onprocessinginstruction(start, endIndex) {\n        this.endIndex = endIndex;\n        const value = this.getSlice(start, endIndex);\n        if (this.cbs.onprocessinginstruction) {\n            const name = this.getInstructionName(value);\n            this.cbs.onprocessinginstruction(`?${name}`, `?${value}`);\n        }\n        // Set `startIndex` for next node\n        this.startIndex = endIndex + 1;\n    }\n    /** @internal */\n    oncomment(start, endIndex, offset) {\n        var _a, _b, _c, _d;\n        this.endIndex = endIndex;\n        (_b = (_a = this.cbs).oncomment) === null || _b === void 0 ? void 0 : _b.call(_a, this.getSlice(start, endIndex - offset));\n        (_d = (_c = this.cbs).oncommentend) === null || _d === void 0 ? void 0 : _d.call(_c);\n        // Set `startIndex` for next node\n        this.startIndex = endIndex + 1;\n    }\n    /** @internal */\n    oncdata(start, endIndex, offset) {\n        var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;\n        this.endIndex = endIndex;\n        const value = this.getSlice(start, endIndex - offset);\n        if (!this.htmlMode || this.options.recognizeCDATA) {\n            (_b = (_a = this.cbs).oncdatastart) === null || _b === void 0 ? void 0 : _b.call(_a);\n            (_d = (_c = this.cbs).ontext) === null || _d === void 0 ? void 0 : _d.call(_c, value);\n            (_f = (_e = this.cbs).oncdataend) === null || _f === void 0 ? void 0 : _f.call(_e);\n        }\n        else {\n            (_h = (_g = this.cbs).oncomment) === null || _h === void 0 ? void 0 : _h.call(_g, `[CDATA[${value}]]`);\n            (_k = (_j = this.cbs).oncommentend) === null || _k === void 0 ? void 0 : _k.call(_j);\n        }\n        // Set `startIndex` for next node\n        this.startIndex = endIndex + 1;\n    }\n    /** @internal */\n    onend() {\n        var _a, _b;\n        if (this.cbs.onclosetag) {\n            // Set the end index for all remaining tags\n            this.endIndex = this.startIndex;\n            for (let index = 0; index < this.stack.length; index++) {\n                this.cbs.onclosetag(this.stack[index], true);\n            }\n        }\n        (_b = (_a = this.cbs).onend) === null || _b === void 0 ? void 0 : _b.call(_a);\n    }\n    /**\n     * Resets the parser to a blank state, ready to parse a new HTML document\n     */\n    reset() {\n        var _a, _b, _c, _d;\n        (_b = (_a = this.cbs).onreset) === null || _b === void 0 ? void 0 : _b.call(_a);\n        this.tokenizer.reset();\n        this.tagname = \"\";\n        this.attribname = \"\";\n        this.attribs = null;\n        this.stack.length = 0;\n        this.startIndex = 0;\n        this.endIndex = 0;\n        (_d = (_c = this.cbs).onparserinit) === null || _d === void 0 ? void 0 : _d.call(_c, this);\n        this.buffers.length = 0;\n        this.foreignContext.length = 0;\n        this.foreignContext.unshift(!this.htmlMode);\n        this.bufferOffset = 0;\n        this.writeIndex = 0;\n        this.ended = false;\n    }\n    /**\n     * Resets the parser, then parses a complete document and\n     * pushes it to the handler.\n     *\n     * @param data Document to parse.\n     */\n    parseComplete(data) {\n        this.reset();\n        this.end(data);\n    }\n    getSlice(start, end) {\n        while (start - this.bufferOffset >= this.buffers[0].length) {\n            this.shiftBuffer();\n        }\n        let slice = this.buffers[0].slice(start - this.bufferOffset, end - this.bufferOffset);\n        while (end - this.bufferOffset > this.buffers[0].length) {\n            this.shiftBuffer();\n            slice += this.buffers[0].slice(0, end - this.bufferOffset);\n        }\n        return slice;\n    }\n    shiftBuffer() {\n        this.bufferOffset += this.buffers[0].length;\n        this.writeIndex--;\n        this.buffers.shift();\n    }\n    /**\n     * Parses a chunk of data and calls the corresponding callbacks.\n     *\n     * @param chunk Chunk to parse.\n     */\n    write(chunk) {\n        var _a, _b;\n        if (this.ended) {\n            (_b = (_a = this.cbs).onerror) === null || _b === void 0 ? void 0 : _b.call(_a, new Error(\".write() after done!\"));\n            return;\n        }\n        this.buffers.push(chunk);\n        if (this.tokenizer.running) {\n            this.tokenizer.write(chunk);\n            this.writeIndex++;\n        }\n    }\n    /**\n     * Parses the end of the buffer and clears the stack, calls onend.\n     *\n     * @param chunk Optional final chunk to parse.\n     */\n    end(chunk) {\n        var _a, _b;\n        if (this.ended) {\n            (_b = (_a = this.cbs).onerror) === null || _b === void 0 ? void 0 : _b.call(_a, new Error(\".end() after done!\"));\n            return;\n        }\n        if (chunk)\n            this.write(chunk);\n        this.ended = true;\n        this.tokenizer.end();\n    }\n    /**\n     * Pauses parsing. The parser won't emit events until `resume` is called.\n     */\n    pause() {\n        this.tokenizer.pause();\n    }\n    /**\n     * Resumes parsing after `pause` was called.\n     */\n    resume() {\n        this.tokenizer.resume();\n        while (this.tokenizer.running &&\n            this.writeIndex < this.buffers.length) {\n            this.tokenizer.write(this.buffers[this.writeIndex++]);\n        }\n        if (this.ended)\n            this.tokenizer.end();\n    }\n    /**\n     * Alias of `write`, for backwards compatibility.\n     *\n     * @param chunk Chunk to parse.\n     * @deprecated\n     */\n    parseChunk(chunk) {\n        this.write(chunk);\n    }\n    /**\n     * Alias of `end`, for backwards compatibility.\n     *\n     * @param chunk Optional final chunk to parse.\n     * @deprecated\n     */\n    done(chunk) {\n        this.end(chunk);\n    }\n}\n//# sourceMappingURL=Parser.js.map","import { EntityDecoder, DecodingMode, htmlDecodeTree, xmlDecodeTree, } from \"entities/lib/decode.js\";\nvar CharCodes;\n(function (CharCodes) {\n    CharCodes[CharCodes[\"Tab\"] = 9] = \"Tab\";\n    CharCodes[CharCodes[\"NewLine\"] = 10] = \"NewLine\";\n    CharCodes[CharCodes[\"FormFeed\"] = 12] = \"FormFeed\";\n    CharCodes[CharCodes[\"CarriageReturn\"] = 13] = \"CarriageReturn\";\n    CharCodes[CharCodes[\"Space\"] = 32] = \"Space\";\n    CharCodes[CharCodes[\"ExclamationMark\"] = 33] = \"ExclamationMark\";\n    CharCodes[CharCodes[\"Number\"] = 35] = \"Number\";\n    CharCodes[CharCodes[\"Amp\"] = 38] = \"Amp\";\n    CharCodes[CharCodes[\"SingleQuote\"] = 39] = \"SingleQuote\";\n    CharCodes[CharCodes[\"DoubleQuote\"] = 34] = \"DoubleQuote\";\n    CharCodes[CharCodes[\"Dash\"] = 45] = \"Dash\";\n    CharCodes[CharCodes[\"Slash\"] = 47] = \"Slash\";\n    CharCodes[CharCodes[\"Zero\"] = 48] = \"Zero\";\n    CharCodes[CharCodes[\"Nine\"] = 57] = \"Nine\";\n    CharCodes[CharCodes[\"Semi\"] = 59] = \"Semi\";\n    CharCodes[CharCodes[\"Lt\"] = 60] = \"Lt\";\n    CharCodes[CharCodes[\"Eq\"] = 61] = \"Eq\";\n    CharCodes[CharCodes[\"Gt\"] = 62] = \"Gt\";\n    CharCodes[CharCodes[\"Questionmark\"] = 63] = \"Questionmark\";\n    CharCodes[CharCodes[\"UpperA\"] = 65] = \"UpperA\";\n    CharCodes[CharCodes[\"LowerA\"] = 97] = \"LowerA\";\n    CharCodes[CharCodes[\"UpperF\"] = 70] = \"UpperF\";\n    CharCodes[CharCodes[\"LowerF\"] = 102] = \"LowerF\";\n    CharCodes[CharCodes[\"UpperZ\"] = 90] = \"UpperZ\";\n    CharCodes[CharCodes[\"LowerZ\"] = 122] = \"LowerZ\";\n    CharCodes[CharCodes[\"LowerX\"] = 120] = \"LowerX\";\n    CharCodes[CharCodes[\"OpeningSquareBracket\"] = 91] = \"OpeningSquareBracket\";\n})(CharCodes || (CharCodes = {}));\n/** All the states the tokenizer can be in. */\nvar State;\n(function (State) {\n    State[State[\"Text\"] = 1] = \"Text\";\n    State[State[\"BeforeTagName\"] = 2] = \"BeforeTagName\";\n    State[State[\"InTagName\"] = 3] = \"InTagName\";\n    State[State[\"InSelfClosingTag\"] = 4] = \"InSelfClosingTag\";\n    State[State[\"BeforeClosingTagName\"] = 5] = \"BeforeClosingTagName\";\n    State[State[\"InClosingTagName\"] = 6] = \"InClosingTagName\";\n    State[State[\"AfterClosingTagName\"] = 7] = \"AfterClosingTagName\";\n    // Attributes\n    State[State[\"BeforeAttributeName\"] = 8] = \"BeforeAttributeName\";\n    State[State[\"InAttributeName\"] = 9] = \"InAttributeName\";\n    State[State[\"AfterAttributeName\"] = 10] = \"AfterAttributeName\";\n    State[State[\"BeforeAttributeValue\"] = 11] = \"BeforeAttributeValue\";\n    State[State[\"InAttributeValueDq\"] = 12] = \"InAttributeValueDq\";\n    State[State[\"InAttributeValueSq\"] = 13] = \"InAttributeValueSq\";\n    State[State[\"InAttributeValueNq\"] = 14] = \"InAttributeValueNq\";\n    // Declarations\n    State[State[\"BeforeDeclaration\"] = 15] = \"BeforeDeclaration\";\n    State[State[\"InDeclaration\"] = 16] = \"InDeclaration\";\n    // Processing instructions\n    State[State[\"InProcessingInstruction\"] = 17] = \"InProcessingInstruction\";\n    // Comments & CDATA\n    State[State[\"BeforeComment\"] = 18] = \"BeforeComment\";\n    State[State[\"CDATASequence\"] = 19] = \"CDATASequence\";\n    State[State[\"InSpecialComment\"] = 20] = \"InSpecialComment\";\n    State[State[\"InCommentLike\"] = 21] = \"InCommentLike\";\n    // Special tags\n    State[State[\"BeforeSpecialS\"] = 22] = \"BeforeSpecialS\";\n    State[State[\"BeforeSpecialT\"] = 23] = \"BeforeSpecialT\";\n    State[State[\"SpecialStartSequence\"] = 24] = \"SpecialStartSequence\";\n    State[State[\"InSpecialTag\"] = 25] = \"InSpecialTag\";\n    State[State[\"InEntity\"] = 26] = \"InEntity\";\n})(State || (State = {}));\nfunction isWhitespace(c) {\n    return (c === CharCodes.Space ||\n        c === CharCodes.NewLine ||\n        c === CharCodes.Tab ||\n        c === CharCodes.FormFeed ||\n        c === CharCodes.CarriageReturn);\n}\nfunction isEndOfTagSection(c) {\n    return c === CharCodes.Slash || c === CharCodes.Gt || isWhitespace(c);\n}\nfunction isASCIIAlpha(c) {\n    return ((c >= CharCodes.LowerA && c <= CharCodes.LowerZ) ||\n        (c >= CharCodes.UpperA && c <= CharCodes.UpperZ));\n}\nexport var QuoteType;\n(function (QuoteType) {\n    QuoteType[QuoteType[\"NoValue\"] = 0] = \"NoValue\";\n    QuoteType[QuoteType[\"Unquoted\"] = 1] = \"Unquoted\";\n    QuoteType[QuoteType[\"Single\"] = 2] = \"Single\";\n    QuoteType[QuoteType[\"Double\"] = 3] = \"Double\";\n})(QuoteType || (QuoteType = {}));\n/**\n * Sequences used to match longer strings.\n *\n * We don't have `Script`, `Style`, or `Title` here. Instead, we re-use the *End\n * sequences with an increased offset.\n */\nconst Sequences = {\n    Cdata: new Uint8Array([0x43, 0x44, 0x41, 0x54, 0x41, 0x5b]), // CDATA[\n    CdataEnd: new Uint8Array([0x5d, 0x5d, 0x3e]), // ]]>\n    CommentEnd: new Uint8Array([0x2d, 0x2d, 0x3e]), // `-->`\n    ScriptEnd: new Uint8Array([0x3c, 0x2f, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74]), // `</script`\n    StyleEnd: new Uint8Array([0x3c, 0x2f, 0x73, 0x74, 0x79, 0x6c, 0x65]), // `</style`\n    TitleEnd: new Uint8Array([0x3c, 0x2f, 0x74, 0x69, 0x74, 0x6c, 0x65]), // `</title`\n    TextareaEnd: new Uint8Array([\n        0x3c, 0x2f, 0x74, 0x65, 0x78, 0x74, 0x61, 0x72, 0x65, 0x61,\n    ]), // `</textarea`\n};\nexport default class Tokenizer {\n    constructor({ xmlMode = false, decodeEntities = true, }, cbs) {\n        this.cbs = cbs;\n        /** The current state the tokenizer is in. */\n        this.state = State.Text;\n        /** The read buffer. */\n        this.buffer = \"\";\n        /** The beginning of the section that is currently being read. */\n        this.sectionStart = 0;\n        /** The index within the buffer that we are currently looking at. */\n        this.index = 0;\n        /** The start of the last entity. */\n        this.entityStart = 0;\n        /** Some behavior, eg. when decoding entities, is done while we are in another state. This keeps track of the other state type. */\n        this.baseState = State.Text;\n        /** For special parsing behavior inside of script and style tags. */\n        this.isSpecial = false;\n        /** Indicates whether the tokenizer has been paused. */\n        this.running = true;\n        /** The offset of the current buffer. */\n        this.offset = 0;\n        this.currentSequence = undefined;\n        this.sequenceIndex = 0;\n        this.xmlMode = xmlMode;\n        this.decodeEntities = decodeEntities;\n        this.entityDecoder = new EntityDecoder(xmlMode ? xmlDecodeTree : htmlDecodeTree, (cp, consumed) => this.emitCodePoint(cp, consumed));\n    }\n    reset() {\n        this.state = State.Text;\n        this.buffer = \"\";\n        this.sectionStart = 0;\n        this.index = 0;\n        this.baseState = State.Text;\n        this.currentSequence = undefined;\n        this.running = true;\n        this.offset = 0;\n    }\n    write(chunk) {\n        this.offset += this.buffer.length;\n        this.buffer = chunk;\n        this.parse();\n    }\n    end() {\n        if (this.running)\n            this.finish();\n    }\n    pause() {\n        this.running = false;\n    }\n    resume() {\n        this.running = true;\n        if (this.index < this.buffer.length + this.offset) {\n            this.parse();\n        }\n    }\n    stateText(c) {\n        if (c === CharCodes.Lt ||\n            (!this.decodeEntities && this.fastForwardTo(CharCodes.Lt))) {\n            if (this.index > this.sectionStart) {\n                this.cbs.ontext(this.sectionStart, this.index);\n            }\n            this.state = State.BeforeTagName;\n            this.sectionStart = this.index;\n        }\n        else if (this.decodeEntities && c === CharCodes.Amp) {\n            this.startEntity();\n        }\n    }\n    stateSpecialStartSequence(c) {\n        const isEnd = this.sequenceIndex === this.currentSequence.length;\n        const isMatch = isEnd\n            ? // If we are at the end of the sequence, make sure the tag name has ended\n                isEndOfTagSection(c)\n            : // Otherwise, do a case-insensitive comparison\n                (c | 0x20) === this.currentSequence[this.sequenceIndex];\n        if (!isMatch) {\n            this.isSpecial = false;\n        }\n        else if (!isEnd) {\n            this.sequenceIndex++;\n            return;\n        }\n        this.sequenceIndex = 0;\n        this.state = State.InTagName;\n        this.stateInTagName(c);\n    }\n    /** Look for an end tag. For <title> tags, also decode entities. */\n    stateInSpecialTag(c) {\n        if (this.sequenceIndex === this.currentSequence.length) {\n            if (c === CharCodes.Gt || isWhitespace(c)) {\n                const endOfText = this.index - this.currentSequence.length;\n                if (this.sectionStart < endOfText) {\n                    // Spoof the index so that reported locations match up.\n                    const actualIndex = this.index;\n                    this.index = endOfText;\n                    this.cbs.ontext(this.sectionStart, endOfText);\n                    this.index = actualIndex;\n                }\n                this.isSpecial = false;\n                this.sectionStart = endOfText + 2; // Skip over the `</`\n                this.stateInClosingTagName(c);\n                return; // We are done; skip the rest of the function.\n            }\n            this.sequenceIndex = 0;\n        }\n        if ((c | 0x20) === this.currentSequence[this.sequenceIndex]) {\n            this.sequenceIndex += 1;\n        }\n        else if (this.sequenceIndex === 0) {\n            if (this.currentSequence === Sequences.TitleEnd) {\n                // We have to parse entities in <title> tags.\n                if (this.decodeEntities && c === CharCodes.Amp) {\n                    this.startEntity();\n                }\n            }\n            else if (this.fastForwardTo(CharCodes.Lt)) {\n                // Outside of <title> tags, we can fast-forward.\n                this.sequenceIndex = 1;\n            }\n        }\n        else {\n            // If we see a `<`, set the sequence index to 1; useful for eg. `<</script>`.\n            this.sequenceIndex = Number(c === CharCodes.Lt);\n        }\n    }\n    stateCDATASequence(c) {\n        if (c === Sequences.Cdata[this.sequenceIndex]) {\n            if (++this.sequenceIndex === Sequences.Cdata.length) {\n                this.state = State.InCommentLike;\n                this.currentSequence = Sequences.CdataEnd;\n                this.sequenceIndex = 0;\n                this.sectionStart = this.index + 1;\n            }\n        }\n        else {\n            this.sequenceIndex = 0;\n            this.state = State.InDeclaration;\n            this.stateInDeclaration(c); // Reconsume the character\n        }\n    }\n    /**\n     * When we wait for one specific character, we can speed things up\n     * by skipping through the buffer until we find it.\n     *\n     * @returns Whether the character was found.\n     */\n    fastForwardTo(c) {\n        while (++this.index < this.buffer.length + this.offset) {\n            if (this.buffer.charCodeAt(this.index - this.offset) === c) {\n                return true;\n            }\n        }\n        /*\n         * We increment the index at the end of the `parse` loop,\n         * so set it to `buffer.length - 1` here.\n         *\n         * TODO: Refactor `parse` to increment index before calling states.\n         */\n        this.index = this.buffer.length + this.offset - 1;\n        return false;\n    }\n    /**\n     * Comments and CDATA end with `-->` and `]]>`.\n     *\n     * Their common qualities are:\n     * - Their end sequences have a distinct character they start with.\n     * - That character is then repeated, so we have to check multiple repeats.\n     * - All characters but the start character of the sequence can be skipped.\n     */\n    stateInCommentLike(c) {\n        if (c === this.currentSequence[this.sequenceIndex]) {\n            if (++this.sequenceIndex === this.currentSequence.length) {\n                if (this.currentSequence === Sequences.CdataEnd) {\n                    this.cbs.oncdata(this.sectionStart, this.index, 2);\n                }\n                else {\n                    this.cbs.oncomment(this.sectionStart, this.index, 2);\n                }\n                this.sequenceIndex = 0;\n                this.sectionStart = this.index + 1;\n                this.state = State.Text;\n            }\n        }\n        else if (this.sequenceIndex === 0) {\n            // Fast-forward to the first character of the sequence\n            if (this.fastForwardTo(this.currentSequence[0])) {\n                this.sequenceIndex = 1;\n            }\n        }\n        else if (c !== this.currentSequence[this.sequenceIndex - 1]) {\n            // Allow long sequences, eg. --->, ]]]>\n            this.sequenceIndex = 0;\n        }\n    }\n    /**\n     * HTML only allows ASCII alpha characters (a-z and A-Z) at the beginning of a tag name.\n     *\n     * XML allows a lot more characters here (@see https://www.w3.org/TR/REC-xml/#NT-NameStartChar).\n     * We allow anything that wouldn't end the tag.\n     */\n    isTagStartChar(c) {\n        return this.xmlMode ? !isEndOfTagSection(c) : isASCIIAlpha(c);\n    }\n    startSpecial(sequence, offset) {\n        this.isSpecial = true;\n        this.currentSequence = sequence;\n        this.sequenceIndex = offset;\n        this.state = State.SpecialStartSequence;\n    }\n    stateBeforeTagName(c) {\n        if (c === CharCodes.ExclamationMark) {\n            this.state = State.BeforeDeclaration;\n            this.sectionStart = this.index + 1;\n        }\n        else if (c === CharCodes.Questionmark) {\n            this.state = State.InProcessingInstruction;\n            this.sectionStart = this.index + 1;\n        }\n        else if (this.isTagStartChar(c)) {\n            const lower = c | 0x20;\n            this.sectionStart = this.index;\n            if (this.xmlMode) {\n                this.state = State.InTagName;\n            }\n            else if (lower === Sequences.ScriptEnd[2]) {\n                this.state = State.BeforeSpecialS;\n            }\n            else if (lower === Sequences.TitleEnd[2]) {\n                this.state = State.BeforeSpecialT;\n            }\n            else {\n                this.state = State.InTagName;\n            }\n        }\n        else if (c === CharCodes.Slash) {\n            this.state = State.BeforeClosingTagName;\n        }\n        else {\n            this.state = State.Text;\n            this.stateText(c);\n        }\n    }\n    stateInTagName(c) {\n        if (isEndOfTagSection(c)) {\n            this.cbs.onopentagname(this.sectionStart, this.index);\n            this.sectionStart = -1;\n            this.state = State.BeforeAttributeName;\n            this.stateBeforeAttributeName(c);\n        }\n    }\n    stateBeforeClosingTagName(c) {\n        if (isWhitespace(c)) {\n            // Ignore\n        }\n        else if (c === CharCodes.Gt) {\n            this.state = State.Text;\n        }\n        else {\n            this.state = this.isTagStartChar(c)\n                ? State.InClosingTagName\n                : State.InSpecialComment;\n            this.sectionStart = this.index;\n        }\n    }\n    stateInClosingTagName(c) {\n        if (c === CharCodes.Gt || isWhitespace(c)) {\n            this.cbs.onclosetag(this.sectionStart, this.index);\n            this.sectionStart = -1;\n            this.state = State.AfterClosingTagName;\n            this.stateAfterClosingTagName(c);\n        }\n    }\n    stateAfterClosingTagName(c) {\n        // Skip everything until \">\"\n        if (c === CharCodes.Gt || this.fastForwardTo(CharCodes.Gt)) {\n            this.state = State.Text;\n            this.sectionStart = this.index + 1;\n        }\n    }\n    stateBeforeAttributeName(c) {\n        if (c === CharCodes.Gt) {\n            this.cbs.onopentagend(this.index);\n            if (this.isSpecial) {\n                this.state = State.InSpecialTag;\n                this.sequenceIndex = 0;\n            }\n            else {\n                this.state = State.Text;\n            }\n            this.sectionStart = this.index + 1;\n        }\n        else if (c === CharCodes.Slash) {\n            this.state = State.InSelfClosingTag;\n        }\n        else if (!isWhitespace(c)) {\n            this.state = State.InAttributeName;\n            this.sectionStart = this.index;\n        }\n    }\n    stateInSelfClosingTag(c) {\n        if (c === CharCodes.Gt) {\n            this.cbs.onselfclosingtag(this.index);\n            this.state = State.Text;\n            this.sectionStart = this.index + 1;\n            this.isSpecial = false; // Reset special state, in case of self-closing special tags\n        }\n        else if (!isWhitespace(c)) {\n            this.state = State.BeforeAttributeName;\n            this.stateBeforeAttributeName(c);\n        }\n    }\n    stateInAttributeName(c) {\n        if (c === CharCodes.Eq || isEndOfTagSection(c)) {\n            this.cbs.onattribname(this.sectionStart, this.index);\n            this.sectionStart = this.index;\n            this.state = State.AfterAttributeName;\n            this.stateAfterAttributeName(c);\n        }\n    }\n    stateAfterAttributeName(c) {\n        if (c === CharCodes.Eq) {\n            this.state = State.BeforeAttributeValue;\n        }\n        else if (c === CharCodes.Slash || c === CharCodes.Gt) {\n            this.cbs.onattribend(QuoteType.NoValue, this.sectionStart);\n            this.sectionStart = -1;\n            this.state = State.BeforeAttributeName;\n            this.stateBeforeAttributeName(c);\n        }\n        else if (!isWhitespace(c)) {\n            this.cbs.onattribend(QuoteType.NoValue, this.sectionStart);\n            this.state = State.InAttributeName;\n            this.sectionStart = this.index;\n        }\n    }\n    stateBeforeAttributeValue(c) {\n        if (c === CharCodes.DoubleQuote) {\n            this.state = State.InAttributeValueDq;\n            this.sectionStart = this.index + 1;\n        }\n        else if (c === CharCodes.SingleQuote) {\n            this.state = State.InAttributeValueSq;\n            this.sectionStart = this.index + 1;\n        }\n        else if (!isWhitespace(c)) {\n            this.sectionStart = this.index;\n            this.state = State.InAttributeValueNq;\n            this.stateInAttributeValueNoQuotes(c); // Reconsume token\n        }\n    }\n    handleInAttributeValue(c, quote) {\n        if (c === quote ||\n            (!this.decodeEntities && this.fastForwardTo(quote))) {\n            this.cbs.onattribdata(this.sectionStart, this.index);\n            this.sectionStart = -1;\n            this.cbs.onattribend(quote === CharCodes.DoubleQuote\n                ? QuoteType.Double\n                : QuoteType.Single, this.index + 1);\n            this.state = State.BeforeAttributeName;\n        }\n        else if (this.decodeEntities && c === CharCodes.Amp) {\n            this.startEntity();\n        }\n    }\n    stateInAttributeValueDoubleQuotes(c) {\n        this.handleInAttributeValue(c, CharCodes.DoubleQuote);\n    }\n    stateInAttributeValueSingleQuotes(c) {\n        this.handleInAttributeValue(c, CharCodes.SingleQuote);\n    }\n    stateInAttributeValueNoQuotes(c) {\n        if (isWhitespace(c) || c === CharCodes.Gt) {\n            this.cbs.onattribdata(this.sectionStart, this.index);\n            this.sectionStart = -1;\n            this.cbs.onattribend(QuoteType.Unquoted, this.index);\n            this.state = State.BeforeAttributeName;\n            this.stateBeforeAttributeName(c);\n        }\n        else if (this.decodeEntities && c === CharCodes.Amp) {\n            this.startEntity();\n        }\n    }\n    stateBeforeDeclaration(c) {\n        if (c === CharCodes.OpeningSquareBracket) {\n            this.state = State.CDATASequence;\n            this.sequenceIndex = 0;\n        }\n        else {\n            this.state =\n                c === CharCodes.Dash\n                    ? State.BeforeComment\n                    : State.InDeclaration;\n        }\n    }\n    stateInDeclaration(c) {\n        if (c === CharCodes.Gt || this.fastForwardTo(CharCodes.Gt)) {\n            this.cbs.ondeclaration(this.sectionStart, this.index);\n            this.state = State.Text;\n            this.sectionStart = this.index + 1;\n        }\n    }\n    stateInProcessingInstruction(c) {\n        if (c === CharCodes.Gt || this.fastForwardTo(CharCodes.Gt)) {\n            this.cbs.onprocessinginstruction(this.sectionStart, this.index);\n            this.state = State.Text;\n            this.sectionStart = this.index + 1;\n        }\n    }\n    stateBeforeComment(c) {\n        if (c === CharCodes.Dash) {\n            this.state = State.InCommentLike;\n            this.currentSequence = Sequences.CommentEnd;\n            // Allow short comments (eg. <!-->)\n            this.sequenceIndex = 2;\n            this.sectionStart = this.index + 1;\n        }\n        else {\n            this.state = State.InDeclaration;\n        }\n    }\n    stateInSpecialComment(c) {\n        if (c === CharCodes.Gt || this.fastForwardTo(CharCodes.Gt)) {\n            this.cbs.oncomment(this.sectionStart, this.index, 0);\n            this.state = State.Text;\n            this.sectionStart = this.index + 1;\n        }\n    }\n    stateBeforeSpecialS(c) {\n        const lower = c | 0x20;\n        if (lower === Sequences.ScriptEnd[3]) {\n            this.startSpecial(Sequences.ScriptEnd, 4);\n        }\n        else if (lower === Sequences.StyleEnd[3]) {\n            this.startSpecial(Sequences.StyleEnd, 4);\n        }\n        else {\n            this.state = State.InTagName;\n            this.stateInTagName(c); // Consume the token again\n        }\n    }\n    stateBeforeSpecialT(c) {\n        const lower = c | 0x20;\n        if (lower === Sequences.TitleEnd[3]) {\n            this.startSpecial(Sequences.TitleEnd, 4);\n        }\n        else if (lower === Sequences.TextareaEnd[3]) {\n            this.startSpecial(Sequences.TextareaEnd, 4);\n        }\n        else {\n            this.state = State.InTagName;\n            this.stateInTagName(c); // Consume the token again\n        }\n    }\n    startEntity() {\n        this.baseState = this.state;\n        this.state = State.InEntity;\n        this.entityStart = this.index;\n        this.entityDecoder.startEntity(this.xmlMode\n            ? DecodingMode.Strict\n            : this.baseState === State.Text ||\n                this.baseState === State.InSpecialTag\n                ? DecodingMode.Legacy\n                : DecodingMode.Attribute);\n    }\n    stateInEntity() {\n        const length = this.entityDecoder.write(this.buffer, this.index - this.offset);\n        // If `length` is positive, we are done with the entity.\n        if (length >= 0) {\n            this.state = this.baseState;\n            if (length === 0) {\n                this.index = this.entityStart;\n            }\n        }\n        else {\n            // Mark buffer as consumed.\n            this.index = this.offset + this.buffer.length - 1;\n        }\n    }\n    /**\n     * Remove data that has already been consumed from the buffer.\n     */\n    cleanup() {\n        // If we are inside of text or attributes, emit what we already have.\n        if (this.running && this.sectionStart !== this.index) {\n            if (this.state === State.Text ||\n                (this.state === State.InSpecialTag && this.sequenceIndex === 0)) {\n                this.cbs.ontext(this.sectionStart, this.index);\n                this.sectionStart = this.index;\n            }\n            else if (this.state === State.InAttributeValueDq ||\n                this.state === State.InAttributeValueSq ||\n                this.state === State.InAttributeValueNq) {\n                this.cbs.onattribdata(this.sectionStart, this.index);\n                this.sectionStart = this.index;\n            }\n        }\n    }\n    shouldContinue() {\n        return this.index < this.buffer.length + this.offset && this.running;\n    }\n    /**\n     * Iterates through the buffer, calling the function corresponding to the current state.\n     *\n     * States that are more likely to be hit are higher up, as a performance improvement.\n     */\n    parse() {\n        while (this.shouldContinue()) {\n            const c = this.buffer.charCodeAt(this.index - this.offset);\n            switch (this.state) {\n                case State.Text: {\n                    this.stateText(c);\n                    break;\n                }\n                case State.SpecialStartSequence: {\n                    this.stateSpecialStartSequence(c);\n                    break;\n                }\n                case State.InSpecialTag: {\n                    this.stateInSpecialTag(c);\n                    break;\n                }\n                case State.CDATASequence: {\n                    this.stateCDATASequence(c);\n                    break;\n                }\n                case State.InAttributeValueDq: {\n                    this.stateInAttributeValueDoubleQuotes(c);\n                    break;\n                }\n                case State.InAttributeName: {\n                    this.stateInAttributeName(c);\n                    break;\n                }\n                case State.InCommentLike: {\n                    this.stateInCommentLike(c);\n                    break;\n                }\n                case State.InSpecialComment: {\n                    this.stateInSpecialComment(c);\n                    break;\n                }\n                case State.BeforeAttributeName: {\n                    this.stateBeforeAttributeName(c);\n                    break;\n                }\n                case State.InTagName: {\n                    this.stateInTagName(c);\n                    break;\n                }\n                case State.InClosingTagName: {\n                    this.stateInClosingTagName(c);\n                    break;\n                }\n                case State.BeforeTagName: {\n                    this.stateBeforeTagName(c);\n                    break;\n                }\n                case State.AfterAttributeName: {\n                    this.stateAfterAttributeName(c);\n                    break;\n                }\n                case State.InAttributeValueSq: {\n                    this.stateInAttributeValueSingleQuotes(c);\n                    break;\n                }\n                case State.BeforeAttributeValue: {\n                    this.stateBeforeAttributeValue(c);\n                    break;\n                }\n                case State.BeforeClosingTagName: {\n                    this.stateBeforeClosingTagName(c);\n                    break;\n                }\n                case State.AfterClosingTagName: {\n                    this.stateAfterClosingTagName(c);\n                    break;\n                }\n                case State.BeforeSpecialS: {\n                    this.stateBeforeSpecialS(c);\n                    break;\n                }\n                case State.BeforeSpecialT: {\n                    this.stateBeforeSpecialT(c);\n                    break;\n                }\n                case State.InAttributeValueNq: {\n                    this.stateInAttributeValueNoQuotes(c);\n                    break;\n                }\n                case State.InSelfClosingTag: {\n                    this.stateInSelfClosingTag(c);\n                    break;\n                }\n                case State.InDeclaration: {\n                    this.stateInDeclaration(c);\n                    break;\n                }\n                case State.BeforeDeclaration: {\n                    this.stateBeforeDeclaration(c);\n                    break;\n                }\n                case State.BeforeComment: {\n                    this.stateBeforeComment(c);\n                    break;\n                }\n                case State.InProcessingInstruction: {\n                    this.stateInProcessingInstruction(c);\n                    break;\n                }\n                case State.InEntity: {\n                    this.stateInEntity();\n                    break;\n                }\n            }\n            this.index++;\n        }\n        this.cleanup();\n    }\n    finish() {\n        if (this.state === State.InEntity) {\n            this.entityDecoder.end();\n            this.state = this.baseState;\n        }\n        this.handleTrailingData();\n        this.cbs.onend();\n    }\n    /** Handle any trailing data. */\n    handleTrailingData() {\n        const endIndex = this.buffer.length + this.offset;\n        // If there is no remaining data, we are done.\n        if (this.sectionStart >= endIndex) {\n            return;\n        }\n        if (this.state === State.InCommentLike) {\n            if (this.currentSequence === Sequences.CdataEnd) {\n                this.cbs.oncdata(this.sectionStart, endIndex, 0);\n            }\n            else {\n                this.cbs.oncomment(this.sectionStart, endIndex, 0);\n            }\n        }\n        else if (this.state === State.InTagName ||\n            this.state === State.BeforeAttributeName ||\n            this.state === State.BeforeAttributeValue ||\n            this.state === State.AfterAttributeName ||\n            this.state === State.InAttributeName ||\n            this.state === State.InAttributeValueSq ||\n            this.state === State.InAttributeValueDq ||\n            this.state === State.InAttributeValueNq ||\n            this.state === State.InClosingTagName) {\n            /*\n             * If we are currently in an opening or closing tag, us not calling the\n             * respective callback signals that the tag should be ignored.\n             */\n        }\n        else {\n            this.cbs.ontext(this.sectionStart, endIndex);\n        }\n    }\n    emitCodePoint(cp, consumed) {\n        if (this.baseState !== State.Text &&\n            this.baseState !== State.InSpecialTag) {\n            if (this.sectionStart < this.entityStart) {\n                this.cbs.onattribdata(this.sectionStart, this.entityStart);\n            }\n            this.sectionStart = this.entityStart + consumed;\n            this.index = this.sectionStart - 1;\n            this.cbs.onattribentity(cp);\n        }\n        else {\n            if (this.sectionStart < this.entityStart) {\n                this.cbs.ontext(this.sectionStart, this.entityStart);\n            }\n            this.sectionStart = this.entityStart + consumed;\n            this.index = this.sectionStart - 1;\n            this.cbs.ontextentity(cp, this.sectionStart);\n        }\n    }\n}\n//# sourceMappingURL=Tokenizer.js.map","import { Parser } from \"./Parser.js\";\nexport { Parser } from \"./Parser.js\";\nimport { DomHandler, } from \"domhandler\";\nexport { DomHandler, \n// Old name for DomHandler\nDomHandler as DefaultHandler, } from \"domhandler\";\n// Helper methods\n/**\n * Parses the data, returns the resulting document.\n *\n * @param data The data that should be parsed.\n * @param options Optional options for the parser and DOM handler.\n */\nexport function parseDocument(data, options) {\n    const handler = new DomHandler(undefined, options);\n    new Parser(handler, options).end(data);\n    return handler.root;\n}\n/**\n * Parses data, returns an array of the root nodes.\n *\n * Note that the root nodes still have a `Document` node as their parent.\n * Use `parseDocument` to get the `Document` node instead.\n *\n * @param data The data that should be parsed.\n * @param options Optional options for the parser and DOM handler.\n * @deprecated Use `parseDocument` instead.\n */\nexport function parseDOM(data, options) {\n    return parseDocument(data, options).children;\n}\n/**\n * Creates a parser instance, with an attached DOM handler.\n *\n * @param callback A callback that will be called once parsing has been completed, with the resulting document.\n * @param options Optional options for the parser and DOM handler.\n * @param elementCallback An optional callback that will be called every time a tag has been completed inside of the DOM.\n */\nexport function createDocumentStream(callback, options, elementCallback) {\n    const handler = new DomHandler((error) => callback(error, handler.root), options, elementCallback);\n    return new Parser(handler, options);\n}\n/**\n * Creates a parser instance, with an attached DOM handler.\n *\n * @param callback A callback that will be called once parsing has been completed, with an array of root nodes.\n * @param options Optional options for the parser and DOM handler.\n * @param elementCallback An optional callback that will be called every time a tag has been completed inside of the DOM.\n * @deprecated Use `createDocumentStream` instead.\n */\nexport function createDomStream(callback, options, elementCallback) {\n    const handler = new DomHandler(callback, options, elementCallback);\n    return new Parser(handler, options);\n}\nexport { default as Tokenizer, QuoteType, } from \"./Tokenizer.js\";\n/*\n * All of the following exports exist for backwards-compatibility.\n * They should probably be removed eventually.\n */\nexport * as ElementType from \"domelementtype\";\nimport { getFeed } from \"domutils\";\nexport { getFeed } from \"domutils\";\nconst parseFeedDefaultOptions = { xmlMode: true };\n/**\n * Parse a feed.\n *\n * @param feed The feed that should be parsed, as a string.\n * @param options Optionally, options for parsing. When using this, you should set `xmlMode` to `true`.\n */\nexport function parseFeed(feed, options = parseFeedDefaultOptions) {\n    return getFeed(parseDOM(feed, options));\n}\nexport * as DomUtils from \"domutils\";\n//# sourceMappingURL=index.js.map","import boolbase from \"boolbase\";\n/**\n * Returns a function that checks if an elements index matches the given rule\n * highly optimized to return the fastest solution.\n *\n * @param parsed A tuple [a, b], as returned by `parse`.\n * @returns A highly optimized function that returns whether an index matches the nth-check.\n * @example\n *\n * ```js\n * const check = nthCheck.compile([2, 3]);\n *\n * check(0); // `false`\n * check(1); // `false`\n * check(2); // `true`\n * check(3); // `false`\n * check(4); // `true`\n * check(5); // `false`\n * check(6); // `true`\n * ```\n */\nexport function compile(parsed) {\n    const a = parsed[0];\n    // Subtract 1 from `b`, to convert from one- to zero-indexed.\n    const b = parsed[1] - 1;\n    /*\n     * When `b <= 0`, `a * n` won't be lead to any matches for `a < 0`.\n     * Besides, the specification states that no elements are\n     * matched when `a` and `b` are 0.\n     *\n     * `b < 0` here as we subtracted 1 from `b` above.\n     */\n    if (b < 0 && a <= 0)\n        return boolbase.falseFunc;\n    // When `a` is in the range -1..1, it matches any element (so only `b` is checked).\n    if (a === -1)\n        return (index) => index <= b;\n    if (a === 0)\n        return (index) => index === b;\n    // When `b <= 0` and `a === 1`, they match any element.\n    if (a === 1)\n        return b < 0 ? boolbase.trueFunc : (index) => index >= b;\n    /*\n     * Otherwise, modulo can be used to check if there is a match.\n     *\n     * Modulo doesn't care about the sign, so let's use `a`s absolute value.\n     */\n    const absA = Math.abs(a);\n    // Get `b mod a`, + a if this is negative.\n    const bMod = ((b % absA) + absA) % absA;\n    return a > 1\n        ? (index) => index >= b && index % absA === bMod\n        : (index) => index <= b && index % absA === bMod;\n}\n/**\n * Returns a function that produces a monotonously increasing sequence of indices.\n *\n * If the sequence has an end, the returned function will return `null` after\n * the last index in the sequence.\n *\n * @param parsed A tuple [a, b], as returned by `parse`.\n * @returns A function that produces a sequence of indices.\n * @example <caption>Always increasing (2n+3)</caption>\n *\n * ```js\n * const gen = nthCheck.generate([2, 3])\n *\n * gen() // `1`\n * gen() // `3`\n * gen() // `5`\n * gen() // `8`\n * gen() // `11`\n * ```\n *\n * @example <caption>With end value (-2n+10)</caption>\n *\n * ```js\n *\n * const gen = nthCheck.generate([-2, 5]);\n *\n * gen() // 0\n * gen() // 2\n * gen() // 4\n * gen() // null\n * ```\n */\nexport function generate(parsed) {\n    const a = parsed[0];\n    // Subtract 1 from `b`, to convert from one- to zero-indexed.\n    let b = parsed[1] - 1;\n    let n = 0;\n    // Make sure to always return an increasing sequence\n    if (a < 0) {\n        const aPos = -a;\n        // Get `b mod a`\n        const minValue = ((b % aPos) + aPos) % aPos;\n        return () => {\n            const val = minValue + aPos * n++;\n            return val > b ? null : val;\n        };\n    }\n    if (a === 0)\n        return b < 0\n            ? // There are no result — always return `null`\n                () => null\n            : // Return `b` exactly once\n                () => (n++ === 0 ? b : null);\n    if (b < 0) {\n        b += a * Math.ceil(-b / a);\n    }\n    return () => a * n++ + b;\n}\n//# sourceMappingURL=compile.js.map","import { parse } from \"./parse.js\";\nimport { compile, generate } from \"./compile.js\";\nexport { parse, compile, generate };\n/**\n * Parses and compiles a formula to a highly optimized function.\n * Combination of {@link parse} and {@link compile}.\n *\n * If the formula doesn't match any elements,\n * it returns [`boolbase`](https://github.com/fb55/boolbase)'s `falseFunc`.\n * Otherwise, a function accepting an _index_ is returned, which returns\n * whether or not the passed _index_ matches the formula.\n *\n * Note: The nth-rule starts counting at `1`, the returned function at `0`.\n *\n * @param formula The formula to compile.\n * @example\n * const check = nthCheck(\"2n+3\");\n *\n * check(0); // `false`\n * check(1); // `false`\n * check(2); // `true`\n * check(3); // `false`\n * check(4); // `true`\n * check(5); // `false`\n * check(6); // `true`\n */\nexport default function nthCheck(formula) {\n    return compile(parse(formula));\n}\n/**\n * Parses and compiles a formula to a generator that produces a sequence of indices.\n * Combination of {@link parse} and {@link generate}.\n *\n * @param formula The formula to compile.\n * @returns A function that produces a sequence of indices.\n * @example <caption>Always increasing</caption>\n *\n * ```js\n * const gen = nthCheck.sequence('2n+3')\n *\n * gen() // `1`\n * gen() // `3`\n * gen() // `5`\n * gen() // `8`\n * gen() // `11`\n * ```\n *\n * @example <caption>With end value</caption>\n *\n * ```js\n *\n * const gen = nthCheck.sequence('-2n+5');\n *\n * gen() // 0\n * gen() // 2\n * gen() // 4\n * gen() // null\n * ```\n */\nexport function sequence(formula) {\n    return generate(parse(formula));\n}\n//# sourceMappingURL=index.js.map","// Following http://www.w3.org/TR/css3-selectors/#nth-child-pseudo\n// Whitespace as per https://www.w3.org/TR/selectors-3/#lex is \" \\t\\r\\n\\f\"\nconst whitespace = new Set([9, 10, 12, 13, 32]);\nconst ZERO = \"0\".charCodeAt(0);\nconst NINE = \"9\".charCodeAt(0);\n/**\n * Parses an expression.\n *\n * @throws An `Error` if parsing fails.\n * @returns An array containing the integer step size and the integer offset of the nth rule.\n * @example nthCheck.parse(\"2n+3\"); // returns [2, 3]\n */\nexport function parse(formula) {\n    formula = formula.trim().toLowerCase();\n    if (formula === \"even\") {\n        return [2, 0];\n    }\n    else if (formula === \"odd\") {\n        return [2, 1];\n    }\n    // Parse [ ['-'|'+']? INTEGER? {N} [ S* ['-'|'+'] S* INTEGER ]?\n    let idx = 0;\n    let a = 0;\n    let sign = readSign();\n    let number = readNumber();\n    if (idx < formula.length && formula.charAt(idx) === \"n\") {\n        idx++;\n        a = sign * (number !== null && number !== void 0 ? number : 1);\n        skipWhitespace();\n        if (idx < formula.length) {\n            sign = readSign();\n            skipWhitespace();\n            number = readNumber();\n        }\n        else {\n            sign = number = 0;\n        }\n    }\n    // Throw if there is anything else\n    if (number === null || idx < formula.length) {\n        throw new Error(`n-th rule couldn't be parsed ('${formula}')`);\n    }\n    return [a, sign * number];\n    function readSign() {\n        if (formula.charAt(idx) === \"-\") {\n            idx++;\n            return -1;\n        }\n        if (formula.charAt(idx) === \"+\") {\n            idx++;\n        }\n        return 1;\n    }\n    function readNumber() {\n        const start = idx;\n        let value = 0;\n        while (idx < formula.length &&\n            formula.charCodeAt(idx) >= ZERO &&\n            formula.charCodeAt(idx) <= NINE) {\n            value = value * 10 + (formula.charCodeAt(idx) - ZERO);\n            idx++;\n        }\n        // Return `null` if we didn't read anything.\n        return idx === start ? null : value;\n    }\n    function skipWhitespace() {\n        while (idx < formula.length &&\n            whitespace.has(formula.charCodeAt(idx))) {\n            idx++;\n        }\n    }\n}\n//# sourceMappingURL=parse.js.map","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","// #region globals\n\nimport fs from 'fs' // node filesystem module\nimport path from 'path' // node path module\nimport { load as cheerioLoad } from 'cheerio/slim' // dom parser\n\nconst cheerioOptions = { xml: { xmlMode: false, lowerCaseAttributeNames: false, decodeEntities: false } }\nconst browser = cheerioLoad.isCheerioPolyfill // true if we are executing in the browser context\nconst params = {} // teddy parameters\nsetDefaultParams() // set params to the defaults\nlet templates = {} // loaded templates are stored as object collections, e.g. { \"myTemplate.html\": \"<p>some markup</p>\"}\nconst caches = {} // a place to store cached portions of templates\nconst templateCaches = {} // a place to store cached full templates\n\n// #endregion\n\n// #region private methods\n\n// loads the template from the filesystem\nfunction loadTemplate (template) {\n  // ensure template is a string\n  if (typeof template !== 'string') {\n    if (params.verbosity > 1) console.warn('teddy.loadTemplate attempted to load a template which is not a string.')\n    return ''\n  }\n  const name = template\n  let register = false\n  if (!templates[template] && template.indexOf('<') === -1 && fs && fs.readFileSync) {\n    // template is not found, it is not code, and we're in the node.js context\n    register = true\n    // append extension if not present\n    if (template.slice(-5) !== '.html') template += '.html'\n    try {\n      template = fs.readFileSync(template, 'utf8')\n    } catch (e) {\n      try {\n        template = fs.readFileSync(params.templateRoot + template, 'utf8')\n      } catch (e) {\n        try {\n          template = fs.readFileSync(params.templateRoot + '/' + template, 'utf8')\n        } catch (e) {\n          // do nothing, attempt to render it as code\n          register = false\n        }\n      }\n    }\n  } else {\n    if (templates[template]) {\n      template = templates[template]\n      register = true\n    } else {\n      // didn't find it; append extension if not present and check it again\n      if (template.slice(-5) !== '.html') {\n        template += '.html'\n      }\n      if (templates[template]) {\n        template = templates[template]\n        register = true\n      }\n      template = removeTeddyComments(template)\n    }\n  }\n  if (register) {\n    // register the new template and return the code\n    template = removeTeddyComments(template)\n    templates[name] = template\n    return template\n  } else {\n    // return the template name which is presumed to be code\n    return template.slice(-5) === '.html' ? template.substring(0, template.length - 5) : template\n  }\n}\n\n// remove teddy {! comments !} and <!--! comments -->; also replace <escape>tags</escape> and <!--# content -->\nfunction removeTeddyComments (renderedTemplate) {\n  let oldTemplate\n  do {\n    oldTemplate = renderedTemplate\n    let vars\n\n    // server-side comments\n    try {\n      vars = matchByDelimiter(renderedTemplate, '{!', '!}')\n    } catch (e) {\n      return renderedTemplate // it will match {! comments {! with comments in them !} !} but if there are unbalanced brackets, just return the original text\n    }\n    for (let i = 0; i < vars.length; i++) renderedTemplate = renderedTemplate.replace(`{!${vars[i]}!}`, '')\n\n    try {\n      vars = matchByDelimiter(renderedTemplate, '<!--!', '-->')\n    } catch (e) {\n      return renderedTemplate\n    }\n    for (let i = 0; i < vars.length; i++) renderedTemplate = renderedTemplate.replace(`<!--!${vars[i]}-->`, '')\n\n    // <!--# escape --> blocks and <escape> tags\n    let firstMatch\n    try {\n      firstMatch = getFirstMatchByDelimiters(renderedTemplate, [['<!--#', '-->'], ['<escape>', '</escape>']])\n    } catch (e) {\n      return renderedTemplate\n    }\n    let newContent = firstMatch\n    if (firstMatch) {\n      if (firstMatch.startsWith('<!--#')) {\n        newContent = newContent.substring(0, newContent.length - 3).slice(5)\n        renderedTemplate = renderedTemplate.replace(firstMatch, escapeEntities(newContent.trim()))\n      } else {\n        newContent = newContent.substring(0, newContent.length - 9).slice(8)\n        renderedTemplate = renderedTemplate.replace(firstMatch, escapeEntities(newContent.trim()))\n      }\n    }\n  } while (oldTemplate !== renderedTemplate)\n  return renderedTemplate\n}\n\n// find all cache elements and replace them with the rendered contents of their cache, then remove the cache element\nfunction replaceCacheElements (dom, model) {\n  let parsedTags\n  do {\n    parsedTags = 0\n    const tags = dom('cache:not([defer])')\n    if (tags.length > 0) {\n      for (const el of tags) {\n        if (browser) el.attribs = getAttribs(el)\n        const name = el.attribs.name\n        if (name.includes('{')) continue\n        const key = el.attribs.key || 'none'\n        if (key.includes('{')) continue\n        const cache = caches[name]\n        if (cache && cache.entries) {\n          const keyVal = el.attribs.key ? getOrSetObjectByDotNotation(model, key) : 'none'\n          if (cache.entries[keyVal]) {\n            const now = Date.now()\n            // if max age is not set, then there is no max age and the cache content is still valid\n            // or if last accessed + max age > now then the cache is not stale and the cache is still valid\n            if (!(cache.maxAge && !cache.maxage) || cache.entries[keyVal].lastAccessed + (cache.maxAge || cache.maxage) > now) {\n              const cacheContent = cache.entries[keyVal].markup\n              cache.entries[keyVal].lastAccessed = now\n              dom(el).replaceWith(cacheContent)\n            } else {\n              // if last accessed + max age <= now then the cache is stale and the cache is no longer valid\n              delete caches[name].entries[keyVal]\n              dom(el).attr('defer', 'true') // create a new cache\n            }\n          } else dom(el).attr('defer', 'true') // no cache exists for this yet; create after the template renders\n        } else dom(el).attr('defer', 'true') // no cache exists for this yet; create after the template renders\n        parsedTags++\n      }\n    }\n  } while (parsedTags)\n  return dom\n}\n\n// add an id to all <noteddy> or <noparse> tags, then remove their content temporarily until the template is fully parsed\nfunction tagNoParseBlocks (dom, model) {\n  let parsedTags\n  do {\n    parsedTags = 0\n    let tags = dom('noteddy:not([id]), noparse:not([id])')\n    if (tags.length > 0) {\n      for (const el of tags) {\n        const id = model._noTeddyBlocks.push(dom(el).html()) - 1\n        dom(el).replaceWith(`<noteddy id=\"${id}\"></noteddy>`)\n        parsedTags++\n      }\n    }\n    tags = dom('pre:not([id]):not([parse])')\n    if (tags.length > 0) {\n      for (const el of tags) {\n        const id = model._noTeddyBlocks.push(dom(el).toString()) - 1\n        dom(el).replaceWith(`<noteddy id=\"${id}\" pre=\"true\"></noteddy>`)\n        parsedTags++\n      }\n    }\n  } while (parsedTags)\n  return dom\n}\n\n// parse <include> tags\nfunction parseIncludes (dom, model, dynamic) {\n  let parsedTags\n  let passes = 0\n  do {\n    passes++\n    if (passes > params.maxPasses) throw new Error(`teddy could not finish rendering the template because the max number of passes over the template (${params.maxPasses}) was exceeded; there may be an infinite loop in your template logic.`)\n    parsedTags = 0\n    let tags\n    // dynamic includes are includes like <include src=\"{sourcedFromVariable}\"></include>\n    if (dynamic) tags = dom('include') // parse all includes\n    else tags = dom('include:not([teddydeferreddynamicinclude])') // parse only includes that aren't dynamic\n    if (tags.length > 0) {\n      for (const el of tags) {\n        // ensure this isn't the child of a no parse block\n        let foundBody = false\n        let next = false\n        let parent = el.parent || el.parentNode\n        while (!foundBody) {\n          let parentName\n          if (!parent) parentName = 'body'\n          else parentName = parent.nodeName?.toLowerCase() || parent.name\n          if (parentName === 'noparse' || parentName === 'noteddy') {\n            next = true\n            break\n          } else if (parentName === 'body') foundBody = true\n          else parent = parent.parent || parent.parentNode\n        }\n        if (next) continue\n        // get attributes\n        if (browser) el.attribs = getAttribs(el)\n        const src = el.attribs.src\n        if (!src) {\n          if (params.verbosity > 1) console.warn('teddy encountered an include tag with no src attribute.')\n          continue\n        }\n        if (src.startsWith('{')) {\n          dom(el).attr('teddydeferreddynamicinclude', 'true') // mark it dynamic and then skip it\n          continue\n        }\n        loadTemplate(src) // load the partial into the template list\n        let contents = templates[src] || ''\n        if (typeof templates[src] !== 'string' && params.includeNotFoundBehavior === 'display') {\n          contents = `Template \"${src}\" not found!`\n          if (params.verbosity > 1) console.warn(`teddy encountered an include tag with a src set to a template that could not be found: ${src}`)\n        }\n        const localModel = Object.assign({}, model)\n        for (const arg of dom(el).children()) {\n          const argName = browser ? arg.nodeName?.toLowerCase() : arg.name\n          if (argName === 'arg') {\n            if (browser) arg.attribs = getAttribs(arg)\n            const argval = Object.keys(arg.attribs)[0]\n            getOrSetObjectByDotNotation(localModel, argval, dom(arg).html())\n          }\n        }\n        const hasNoteddy = contents.includes('</noteddy>')\n        const hasNoparse = contents.includes('</noparse>')\n        const hasPre = contents.includes('</pre>')\n        const hasIf = contents.includes('</if>')\n        const hasUnless = contents.includes('</unless>')\n        const hasTrue = contents.includes(' true=')\n        const hasFalse = contents.includes(' false=')\n        const hasLoop = contents.includes('</loop>')\n        const hasInline = contents.includes('</inline>')\n        const hasSelected = contents.includes(' selected-value=') || contents.includes(' checked-value=')\n        let localDom\n        if (hasNoteddy || hasNoparse || hasPre) {\n          localDom = cheerioLoad(contents, cheerioOptions)\n          localDom = tagNoParseBlocks(localDom, localModel)\n          contents = localDom.html()\n        }\n        localDom = cheerioLoad(parseVars(contents, localModel), cheerioOptions)\n        if (hasIf || hasUnless) localDom = parseConditionals(localDom, localModel)\n        if (hasTrue || hasFalse) localDom = parseOneLineConditionals(localDom, localModel)\n        if (hasLoop) localDom = parseLoops(localDom, localModel)\n        if (hasInline) localDom = parseInlines(localDom, localModel)\n        if (hasSelected) localDom = parseSelectedAttributeValues(localDom, localModel)\n        dom(el).replaceWith(localDom.html())\n        parsedTags++\n      }\n    }\n  } while (parsedTags)\n  return dom\n}\n\n// parse <if>, <elseif>, <unless>, <elseunless>, and <else> tags\nfunction parseConditionals (dom, model) {\n  let parsedTags\n  do {\n    parsedTags = 0\n    const tags = dom('if, unless')\n    if (tags.length > 0) {\n      for (const el of tags) {\n        // ensure this isn't the child of a loop or a no parse block\n        let foundBody = false\n        let next = false\n        let parent = el.parent || el.parentNode\n        while (!foundBody) {\n          let parentName\n          if (!parent) parentName = 'body'\n          else parentName = parent.nodeName?.toLowerCase() || parent.name\n          if (parentName === 'loop' || parentName === 'noparse' || parentName === 'noteddy') {\n            next = true\n            break\n          } else if (parentName === 'body') foundBody = true\n          else parent = parent.parent || parent.parentNode\n        }\n        if (next) continue\n        // get conditions\n        let args = []\n        if (browser) el.attribs = getAttribs(el)\n        for (let attr in el.attribs) {\n          if (attr.includes('-teddyduplicate')) attr = attr.split('-teddyduplicate')[0] // the condition is a duplicate, so remove the `-teddyduplicate1` from `conditionName-teddyduplicate1`, `conditionName-teddyduplicate2`, etc\n          let val = el.attribs[attr]\n          if (val) {\n            if (val.startsWith('{')) val = parseVars(val, model)\n            args.push(`${attr}=${val}`)\n          } else args.push(attr)\n        }\n        // check if it's an if tag and not an unless tag\n        let isIf = true\n        const elName = browser ? el.nodeName?.toLowerCase() : el.name\n        if (elName === 'unless') isIf = false\n        // evaluate conditional\n        const condResult = evaluateConditional(args, model)\n        if ((isIf && condResult) || ((!isIf && !condResult))) {\n          // render the true block and discard the elseif, elseunless, and else blocks\n          let nextSibling = el.nextSibling\n          const removeStack = []\n          while (nextSibling) {\n            const nextSiblingName = browser ? nextSibling.nodeName?.toLowerCase() : nextSibling.name\n            switch (nextSiblingName) {\n              case 'elseif':\n              case 'elseunless':\n              case 'else':\n                removeStack.push(nextSibling)\n                nextSibling = nextSibling.nextSibling\n                break\n              case 'if':\n              case 'unless':\n                nextSibling = false\n                break\n              default:\n                nextSibling = nextSibling.nextSibling\n            }\n          }\n          for (const element of removeStack) dom(element).replaceWith('')\n          dom(el).replaceWith(el.childNodes || el.children)\n          parsedTags++\n        } else {\n          // true block is false; find the next elseif, elseunless, or else tag to evaluate\n          let nextSibling = el.nextSibling\n          while (nextSibling) {\n            const nextSiblingName = browser ? nextSibling.nodeName?.toLowerCase() : nextSibling.name\n            switch (nextSiblingName) {\n              case 'elseif':\n                // get conditions\n                args = []\n                if (browser) nextSibling.attribs = getAttribs(nextSibling)\n                for (const attr in nextSibling.attribs) {\n                  const val = nextSibling.attribs[attr]\n                  if (val) args.push(`${attr}=${val}`)\n                  else args.push(attr)\n                }\n                if (evaluateConditional(args, model)) {\n                  // render the true block and discard the elseif, elseunless, and else blocks\n                  const replaceSibling = nextSibling\n                  dom(replaceSibling).replaceWith(replaceSibling.childNodes || replaceSibling.children)\n                  nextSibling = el.nextSibling\n                  const removeStack = []\n                  while (nextSibling) {\n                    const nextSiblingName = browser ? nextSibling.nodeName?.toLowerCase() : nextSibling.name\n                    switch (nextSiblingName) {\n                      case 'elseif':\n                      case 'elseunless':\n                      case 'else':\n                        removeStack.push(nextSibling)\n                        nextSibling = nextSibling.nextSibling\n                        break\n                      case 'if':\n                      case 'unless':\n                        nextSibling = false\n                        break\n                      default:\n                        nextSibling = nextSibling.nextSibling\n                    }\n                  }\n                  for (const element of removeStack) dom(element).replaceWith('')\n                  nextSibling = false\n                  parsedTags++\n                } else {\n                  // true block is false; find the next elseif, elseunless, or else tag to evaluate\n                  const siblingToWipe = nextSibling\n                  nextSibling = nextSibling.nextSibling\n                  dom(siblingToWipe).replaceWith('')\n                }\n                break\n              case 'elseunless':\n                // get conditions\n                args = []\n                if (browser) nextSibling.attribs = getAttribs(nextSibling)\n                for (const attr in nextSibling.attribs) {\n                  const val = nextSibling.attribs[attr]\n                  if (val) args.push(`${attr}=${val}`)\n                  else args.push(attr)\n                }\n                if (!evaluateConditional(args, model)) {\n                  // render the true block and discard the elseif, elseunless, and else blocks\n                  const replaceSibling = nextSibling\n                  dom(replaceSibling).replaceWith(replaceSibling.childNodes || replaceSibling.children)\n                  nextSibling = el.nextSibling\n                  const removeStack = []\n                  while (nextSibling) {\n                    const nextSiblingName = browser ? nextSibling.nodeName?.toLowerCase() : nextSibling.name\n                    switch (nextSiblingName) {\n                      case 'elseif':\n                      case 'elseunless':\n                      case 'else':\n                        removeStack.push(nextSibling)\n                        nextSibling = nextSibling.nextSibling\n                        break\n                      case 'if':\n                      case 'unless':\n                        nextSibling = false\n                        break\n                      default:\n                        nextSibling = nextSibling.nextSibling\n                    }\n                  }\n                  for (const element of removeStack) dom(element).replaceWith('')\n                  nextSibling = false\n                  parsedTags++\n                } else {\n                  // true block is false; find the next elseif, elseunless, or else tag to evaluate\n                  const siblingToWipe = nextSibling\n                  nextSibling = nextSibling.nextSibling\n                  dom(siblingToWipe).replaceWith('')\n                }\n                break\n              case 'else':\n                // else is always true, so if we've gotten here, then there's nothing to evaluate and we've reached the end of the conditional blocks\n                dom(nextSibling).replaceWith(nextSibling.childNodes || nextSibling.children)\n                nextSibling = false\n                parsedTags++\n                break\n              case 'if':\n              case 'unless':\n                // if we encounter another fresh if statement or unless statement, then there's nothing left to evaluate and we've reached the end of this conditional's blocks\n                nextSibling = false\n                break\n              default:\n                // if we encounter any other element or a text node we assume there could still be more elseif, elseunless, or else tags ahead so we keep going\n                nextSibling = nextSibling.nextSibling\n            }\n          }\n          dom(el).replaceWith('') // remove the original if statement once done with finding its siblings\n        }\n      }\n    }\n  } while (parsedTags)\n  return dom\n}\n\n// evaluates a single <if> or <unless> tag\nfunction evaluateConditional (conditions, model) {\n  const conditionsLength = conditions.length\n  // loop through conditions and reduce them to booleans\n  for (let i = 0; i < conditionsLength; i++) {\n    const condition = conditions[i]\n    if (typeof condition === 'boolean') continue // if the condition is already a boolean then we don't need to reduce it to a boolean to evaluate it\n    // reject conditions with invalid formatting\n    if (condition.startsWith('=') || condition.endsWith('=')) {\n      if (params.verbosity > 1) console.warn('teddy encountered a conditional statement with \"=\" at the beginning or end of a condition.')\n      return false\n    }\n    if (condition.includes(':') && !condition.startsWith('not:')) {\n      if (params.verbosity > 1) console.warn('teddy encountered a conditional statement with a \"not:\" that isn\\'t at the beginning of a condition.')\n      return false\n    }\n    // deal with boolean logic\n    if (condition === 'and') {\n      if (conditions[i - 1] && evaluateCondition(conditions[i + 1], model)) {\n        // if both sides of an and are true, then reduce all 3 condition blocks to true\n        conditions[i - 1] = true\n        conditions[i] = true\n        conditions[i + 1] = true\n      } else {\n        // if either side of an and is false, then reduce all 3 condition blocks to false\n        conditions[i - 1] = false\n        conditions[i] = false\n        conditions[i + 1] = false\n      }\n    } else if (condition === 'or') {\n      if (conditions[i - 1] || evaluateCondition(conditions[i + 1], model)) {\n        // if either side of an or is true, then reduce all 3 condition blocks to true, as well as all condition blocks that precded this or\n        conditions.fill(true, 0, i + 2)\n      } else {\n        // if both sides of an or are false, then reduce all 3 condition blocks to false\n        conditions[i - 1] = false\n        conditions[i] = false\n        conditions[i + 1] = false\n      }\n    } else if (condition === 'xor') {\n      if (!!conditions[i - 1] === !!evaluateCondition(conditions[i + 1], model)) {\n        // if both sides of an xor are equal to each other, then reduce all 3 condition blocks to false\n        conditions[i - 1] = false\n        conditions[i] = false\n        conditions[i + 1] = false\n      } else {\n        // if the two sides of an xor are not equal to each other, then reduce all 3 condition blocks to true\n        conditions[i - 1] = true\n        conditions[i] = true\n        conditions[i + 1] = true\n      }\n    } else conditions[i] = evaluateCondition(condition, model)\n  }\n  return conditions.every(item => item === true) || false // if any of the booleans are false, then return false. otherwise return true\n}\n\n// determines whether a single condition in a teddy conditional is true or false\nfunction evaluateCondition (condition, model) {\n  let not // stores whether the :not modifier is present\n  if (typeof condition === 'string' && condition.includes('=')) { // it's an equality check condition\n    not = !!condition.startsWith('not:') // true if \"not:\" is present\n    if (not) condition = condition.slice(4) // remove the :not prefix\n    const parts = condition.split('=') // something=\"Some content\"\n    const cond = parts[0] // something\n    delete parts[0] // remove the something=\n    const val = parts.join('') // \"Some content\" — the path.join method ensures the string gets rebuilt even if it contains another = character\n    const lookup = getOrSetObjectByDotNotation(model, cond)\n    // the == is necessary because teddy does type-insensitive equality checks\n    if (lookup == val) return !not // eslint-disable-line\n    else return not // false\n  } else { // it's a presence check\n    not = typeof condition === 'string' ? !!condition.startsWith('not:') : false // true if \"not:\" is present\n    if (not) condition = condition.slice(4) // remove the :not prefix\n    const lookup = getOrSetObjectByDotNotation(model, condition)\n    if (lookup) {\n      if (typeof lookup === 'object' && Object.keys(lookup).length === 0) return not // false; empty object or array\n      return !not // true; var is present\n    } else return not // false; var is not present\n  }\n}\n\n// render one-line if attributes, e.g. <p if-something=\"value\" true=\"class='class-applied-if-true'\" false=\"class='class-applied-if-false'\">hello</p>\nfunction parseOneLineConditionals (dom, model) {\n  let parsedTags\n  do {\n    parsedTags = 0\n    const tags = dom('[true], [false]')\n    if (tags.length > 0) {\n      for (const el of tags) {\n        // skip parsing this if it uses variables as part of its conditions; it will get caught in the next pass after parseVars runs\n        let defer = false\n        if (browser) el.attribs = getAttribs(el)\n        for (const attr in el.attribs) {\n          const val = el.attribs[attr]\n          if (val.startsWith('{')) {\n            defer = true\n            break\n          }\n        }\n        if (defer) {\n          dom(el).attr('teddydeferredonelineconditional', 'true')\n          continue\n        }\n        // ensure this isn't the child of a loop or a no parse block\n        let foundBody = false\n        let next = false\n        let parent = el.parent || el.parentNode\n        while (!foundBody) {\n          let parentName\n          if (!parent) parentName = 'body'\n          else parentName = parent.nodeName?.toLowerCase() || parent.name\n          if (parentName === 'loop' || parentName === 'noparse' || parentName === 'noteddy') {\n            next = true\n            break\n          } else if (parentName === 'body') foundBody = true\n          else parent = parent.parent || parent.parentNode\n        }\n        if (next) continue\n        // get conditions\n        let ifTrue\n        let ifFalse\n        if (browser) el.attribs = getAttribs(el)\n        const args = []\n        for (const origAttr in el.attribs) {\n          let attr = origAttr\n          let val = el.attribs[attr]\n          if (attr.includes('-teddyduplicate')) attr = attr.split('-teddyduplicate')[0] // the condition is a duplicate, so remove the `-teddyduplicate1` from `conditionName-teddyduplicate1`, `conditionName-teddyduplicate2`, etc\n          if (val?.startsWith('{')) val = parseVars(val, model)\n          if (attr.startsWith('if-')) {\n            const parts = attr.split('if-')\n            if (val) args.push(`${parts[1]}=${val}`)\n            else args.push(parts[1])\n            dom(el).removeAttr(origAttr)\n          } else if (attr === 'true') {\n            ifTrue = val.replaceAll('&quot;', '\"') // true=\"class='blah'\"\n            dom(el).removeAttr(origAttr)\n          } else if (attr === 'false') {\n            ifFalse = val.replaceAll('&quot;', '\"') // false=\"class='blah'\"\n            dom(el).removeAttr(origAttr)\n          } else if (attr === 'and' || attr === 'or' || attr === 'xor') {\n            args.push(attr)\n            dom(el).removeAttr(origAttr)\n          }\n        }\n        // evaluate conditional\n        if (evaluateConditional(args, model)) {\n          if (ifTrue) {\n            const parts = ifTrue.split('=')\n            dom(el).attr(parts[0], parts[1] ? parts[1].replace(/[\"']/g, '') : '')\n          }\n          parsedTags++\n        } else if (ifFalse) {\n          if (ifFalse) {\n            const parts = ifFalse.split('=')\n            dom(el).attr(parts[0], parts[1] ? parts[1].replace(/[\"']/g, '') : '')\n          }\n          parsedTags++\n        }\n      }\n    }\n  } while (parsedTags)\n  return dom\n}\n\n// render <loop> tags\nfunction parseLoops (dom, model) {\n  let parsedTags\n  do {\n    parsedTags = 0\n    const tags = dom('loop')\n    if (tags.length > 0) {\n      for (const el of tags) {\n        // get attributes\n        let loopThrough\n        let keyName\n        let valName\n        if (browser) el.attribs = getAttribs(el)\n        for (const attr in el.attribs) {\n          if (attr === 'through') {\n            let attrVal = el.attribs[attr]\n            if (attrVal.startsWith('{')) attrVal = parseVars(attrVal, model)\n            loopThrough = getOrSetObjectByDotNotation(model, attrVal)\n          } else if (attr === 'key') keyName = el.attribs[attr]\n          else if (attr === 'val') valName = el.attribs[attr]\n        }\n        // reject the loop if it has invalid attributes\n        if (!loopThrough) {\n          if (params.verbosity > 1) console.warn('teddy encountered a loop without a through attribute.')\n          dom(el).replaceWith('')\n          continue\n        }\n        if (!keyName && !valName) {\n          if (params.verbosity > 1) console.warn('teddy encountered a loop without a key or a val attribute.')\n          dom(el).replaceWith('')\n          continue\n        }\n        // loop through model[loopThrough] and parse teddy tags within the loop's iteration against the local model\n        let newMarkup = ''\n        let loopContents = dom(el).html()\n        if (loopThrough instanceof Set) loopThrough = [...loopThrough] // convert Sets to arrays\n        for (const key in loopThrough) {\n          const val = loopThrough[key]\n          const localModel = Object.assign({}, model)\n          getOrSetObjectByDotNotation(localModel, keyName, key)\n          getOrSetObjectByDotNotation(localModel, valName, val)\n          const hasNoteddyLoopContents = loopContents.includes('</noteddy>')\n          const hasNoparseLoopContents = loopContents.includes('</noparse>')\n          const hasPreLoopContents = loopContents.includes('</pre>')\n          if (hasNoteddyLoopContents || hasNoparseLoopContents || hasPreLoopContents) {\n            let localDom = cheerioLoad(loopContents, cheerioOptions)\n            localDom = tagNoParseBlocks(localDom, localModel)\n            loopContents = localDom.html()\n          }\n          const localMarkup = parseVars(loopContents, localModel) || ''\n          const hasNoteddy = localMarkup.includes('</noteddy>')\n          const hasNoparse = localMarkup.includes('</noparse>')\n          const hasIf = localMarkup.includes('</if>')\n          const hasUnless = localMarkup.includes('</unless>')\n          const hasTrue = localMarkup.includes(' true=')\n          const hasFalse = localMarkup.includes(' false=')\n          const hasLoop = localMarkup.includes('</loop>')\n          const hasInline = localMarkup.includes('</inline>')\n          const hasSelected = localMarkup.includes(' selected-value=') || localMarkup.includes(' checked-value=')\n          let localDom = cheerioLoad(localMarkup || '', cheerioOptions)\n          if (hasNoteddy || hasNoparse) localDom = tagNoParseBlocks(localDom, localModel)\n          if (hasIf || hasUnless) localDom = parseConditionals(localDom, localModel)\n          if (hasTrue || hasFalse) localDom = parseOneLineConditionals(localDom, localModel)\n          if (hasLoop) localDom = parseLoops(localDom, localModel)\n          if (hasInline) localDom = parseInlines(localDom, localModel)\n          if (hasSelected) localDom = parseSelectedAttributeValues(localDom, localModel)\n          newMarkup += localDom.html()\n        }\n        const newDom = cheerioLoad(newMarkup || '', cheerioOptions)\n        dom(el).replaceWith(newDom.html())\n        parsedTags++\n      }\n    }\n  } while (parsedTags)\n  return dom\n}\n\n// render <inline> tags\nfunction parseInlines (dom, model) {\n  let parsedTags\n  do {\n    parsedTags = 0\n    const tags = dom('inline')\n    if (tags.length > 0) {\n      for (const el of tags) {\n        // get attributes\n        let css\n        let js\n        if (browser) el.attribs = getAttribs(el)\n        for (const attr in el.attribs) {\n          if (attr === 'css') css = getOrSetObjectByDotNotation(model, el.attribs[attr])\n          else if (attr === 'js') js = getOrSetObjectByDotNotation(model, el.attribs[attr])\n        }\n        // reject if it has invalid attributes\n        if (!css && !js) {\n          if (params.verbosity > 1) console.warn('teddy encountered an <inline> element without a css or js attribute.')\n          dom(el).replaceWith('')\n          continue\n        }\n        let replaceWith = ''\n        if (css) replaceWith = `<style>${css}</style>`\n        else replaceWith = `<script>${js}</script>`\n        dom(el).replaceWith(replaceWith)\n        parsedTags++\n      }\n    }\n  } while (parsedTags)\n  return dom\n}\n\n// render `selected-value` and `checked-value` attributes\nfunction parseSelectedAttributeValues (dom, model) {\n  let parsedTags\n  do {\n    parsedTags = 0\n    const tags = dom('select[selected-value], [checked-value]')\n    if (tags.length > 0) {\n      for (const el of tags) {\n        // get attributes\n        if (browser) el.attribs = getAttribs(el)\n        for (let attr in el.attribs) {\n          const origAttr = attr\n          if (attr.includes('-teddyduplicate')) attr = attr.split('-teddyduplicate')[0]\n          if (attr === 'selected-value') {\n            const val = parseVars(el.attribs[origAttr], model) || el.attribs[origAttr]\n            const children = dom(el).find('option[value]')\n            for (const opt of children) {\n              if (browser) opt.attribs = getAttribs(opt)\n              if (opt.attribs.value === val) dom(opt).attr('selected', 'selected')\n            }\n            dom(el).removeAttr(origAttr)\n          } else if (attr === 'checked-value') {\n            const val = parseVars(el.attribs[origAttr], model) || el.attribs[origAttr]\n            const children = dom(el).find('input[type=\"checkbox\"][value], input[type=\"radio\"][value]')\n            for (const opt of children) {\n              if (browser) opt.attribs = getAttribs(opt)\n              if (opt.attribs.value === val) dom(opt).attr('checked', 'checked')\n            }\n            dom(el).removeAttr(origAttr)\n          }\n        }\n        parsedTags++\n      }\n    }\n  } while (parsedTags)\n  return dom\n}\n\n// render {variables}\nfunction parseVars (templateString, model) {\n  let vars\n  try {\n    vars = matchByDelimiter(templateString, '{', '}')\n  } catch (e) {\n    return templateString // it will match {vars{withVarsInThem}} but if there are unbalanced brackets, just return the original text\n  }\n  for (let i = 0; i < vars.length; i++) {\n    let match = vars[i]\n    if (match === '') continue // empty {}\n    if (!/^(\\d+|[a-zA-Z_$][a-zA-Z0-9_$|{}.-]*(\\.[a-zA-Z_$][a-zA-Z0-9_$|{}.-]*)*)$/.test(match)) {\n      if (params.verbosity > 2) console.warn(`teddy.parseVars encountered a {variable} that could not be parsed: {${match}}`)\n      continue // skip invalid variables\n    }\n    if (match.includes('{')) {\n      // there's a variable inside the variable name\n      const originalMatch = match\n      match = parseVars(match, model)\n      try {\n        templateString = templateString.replace(new RegExp(`\\${${originalMatch}}`, 'i'), () => `\\${${match}}`)\n        templateString = templateString.replace(new RegExp(`{${originalMatch}}`, 'i'), () => `{${match}}`)\n      } catch (e) {\n        if (params.verbosity > 2) console.warn(`teddy.parseVars encountered a {variable} that could not be parsed: {${originalMatch}}`)\n      }\n    }\n    const lastSixChars = match.slice(-6)\n    if (lastSixChars.includes('|p')) { // no parse flag is set\n      const originalMatch = match\n      match = match.substring(0, match.length - (lastSixChars.split('|').length - 1) * 2) // remove last 2-n chars\n      let parsed = getOrSetObjectByDotNotation(model, match)\n      if (!parsed && !lastSixChars.includes('|d') && (params.emptyVarBehavior === 'hide' || lastSixChars.includes('|h'))) parsed = '' // display empty string instead of the variable text verbatim if this setting is set\n      if (typeof parsed === 'string' && parsed.startsWith('{') && parsed.includes('|d')) parsed = parsed.replace('|d', '')\n      if (parsed || parsed === '') {\n        const id = model._noTeddyBlocks.push(parsed) - 1\n        try {\n          try {\n            templateString = templateString.replace(new RegExp(`\\${${originalMatch}}`.replace(/[|\\\\{}()[\\]^$+*?.]/g, '\\\\$&').replace(/-/g, '\\\\x2d'), 'i'), `<noteddy id=\"${id}\"></noteddy>`)\n            templateString = templateString.replace(new RegExp(`{${originalMatch}}`.replace(/[|\\\\{}()[\\]^$+*?.]/g, '\\\\$&').replace(/-/g, '\\\\x2d'), 'i'), `<noteddy id=\"${id}\"></noteddy>`)\n          } catch (e) {\n            if (params.verbosity > 2) console.warn(`teddy.parseVars encountered a {variable} that could not be parsed: {${originalMatch}}`)\n          }\n        } catch (e) {\n          return templateString\n        }\n      }\n    } else if (lastSixChars.includes('|s')) { // no escape flag is set\n      const originalMatch = match\n      match = match.substring(0, match.length - (lastSixChars.split('|').length - 1) * 2) // remove last 2-n chars\n      let parsed = getOrSetObjectByDotNotation(model, match)\n      let skipTemplateLiteralReplacement = false\n      if (!parsed && !lastSixChars.includes('|d') && (params.emptyVarBehavior === 'hide' || lastSixChars.includes('|h'))) parsed = '' // display empty string instead of the variable text verbatim if this setting is set\n      else if (!parsed && parsed !== '') {\n        skipTemplateLiteralReplacement = true\n        parsed = `{${originalMatch}}`\n      }\n      if (typeof parsed === 'string' && parsed.startsWith('{') && parsed.includes('|d')) parsed = parsed.replace('|d', '')\n      try {\n        if (!skipTemplateLiteralReplacement) templateString = templateString.replace(new RegExp(`\\${${originalMatch}}`.replace(/[|\\\\{}()[\\]^$+*?.]/g, '\\\\$&').replace(/-/g, '\\\\x2d'), 'i'), () => parsed)\n        templateString = templateString.replace(new RegExp(`{${originalMatch}}`.replace(/[|\\\\{}()[\\]^$+*?.]/g, '\\\\$&').replace(/-/g, '\\\\x2d'), 'i'), () => parsed)\n      } catch (e) {\n        return templateString\n      }\n    } else { // no flags are set\n      let parsed = getOrSetObjectByDotNotation(model, match)\n      let skipTemplateLiteralReplacement = false\n      if (!parsed && !lastSixChars.includes('|d') && (params.emptyVarBehavior === 'hide' || lastSixChars.includes('|h'))) parsed = '' // display empty string instead of the variable text verbatim if this setting is set\n      else if (parsed || parsed === '') parsed = escapeEntities(parsed)\n      else if (parsed === 0) parsed = '0'\n      else {\n        skipTemplateLiteralReplacement = true\n        parsed = `{${match}}`\n      }\n      if (typeof parsed === 'string' && parsed.startsWith('{') && parsed.includes('|d')) parsed = parsed.replace('|d', '')\n      try {\n        if (!skipTemplateLiteralReplacement) templateString = templateString.replace(new RegExp(`\\${${match}}`.replace(/[|\\\\{}()[\\]^$+*?.]/g, '\\\\$&').replace(/-/g, '\\\\x2d'), 'i'), () => parsed)\n        templateString = templateString.replace(new RegExp(`{${match}}`.replace(/[|\\\\{}()[\\]^$+*?.]/g, '\\\\$&').replace(/-/g, '\\\\x2d'), 'i'), () => parsed)\n      } catch (e) {\n        return templateString\n      }\n    }\n  }\n  return templateString\n}\n\n// once the template is fully rendered, find all cache elements that still exist and cache their contents\nfunction defineNewCaches (dom, model) {\n  let parsedTags\n  do {\n    parsedTags = 0\n    const tags = dom('cache[defer]')\n    if (tags.length > 0) {\n      for (const el of tags) {\n        if (browser) el.attribs = getAttribs(el)\n        const name = el.attribs.name\n        const key = el.attribs.key || 'none'\n        const maxAge = parseInt(el.attribs.maxAge || el.attribs.maxage) || 0\n        const maxCaches = parseInt(el.attribs.maxCaches || el.attribs.maxcaches) || 1000\n        const timestamp = Date.now()\n        const markup = dom(el).html()\n        if (!caches[name]) {\n          caches[name] = {\n            key,\n            maxAge,\n            maxCaches,\n            entries: {}\n          }\n        }\n        caches[name].entries[el.attribs.key ? getOrSetObjectByDotNotation(model, key) : 'none'] = {\n          lastAccessed: timestamp,\n          created: timestamp,\n          markup\n        }\n        // invalidate oldest cache if we've reached max caches limit\n        if (Object.keys(caches[name].entries).length > maxCaches) {\n          const lowestKeyVal = Object.keys(caches[name].entries).reduce((a, b) => caches[name].entries[a].lastAccessed < caches[name].entries[b].lastAccessed ? a : b)\n          delete caches[name].entries[lowestKeyVal]\n        }\n        dom(el).replaceWith(markup)\n        parsedTags++\n      }\n    }\n  } while (parsedTags)\n  return dom\n}\n\n// removes any remaining teddy tags from the dom before returning the parsed html to the user\nfunction cleanupStrayTeddyTags (dom) {\n  let parsedTags\n  do {\n    parsedTags = 0\n    const tags = dom('[teddydeferredonelineconditional], pre[parse], include, arg, if, unless, elseif, elseunless, else, loop, cache')\n    if (tags.length > 0) {\n      for (const el of tags) {\n        const tagName = browser ? el.nodeName?.toLowerCase() : el.name\n        if (tagName === 'include' || tagName === 'arg' || tagName === 'if' || tagName === 'unless' || tagName === 'elseif' || tagName === 'elseunless' || tagName === 'else' || tagName === 'loop' || tagName === 'cache') {\n          dom(el).remove()\n        }\n        if (browser) el.attribs = getAttribs(el)\n        for (const attr in el.attribs) {\n          if (attr === 'true' || attr === 'false' || attr === 'parse' || attr === 'teddydeferredonelineconditional' || attr.startsWith('if-')) {\n            dom(el).removeAttr(attr)\n          }\n        }\n      }\n    }\n  } while (parsedTags)\n  return dom\n}\n\n// escapes sensitive characters to prevent xss\nconst escapeHtmlEntities = {\n  '&': '&amp;',\n  '<': '&lt;',\n  '>': '&gt;',\n  '\"': '&#34;',\n  \"'\": '&#39;'\n}\nconst entityKeys = Object.keys(escapeHtmlEntities)\nconst ekl = entityKeys.length\nfunction escapeEntities (value) {\n  let escapedEntity = false\n  let newValue = ''\n  let i\n  let j\n\n  if (typeof value === 'object') { // cannot escape on this value\n    if (!value) return false // it is falsey to return false\n    else if (Array.isArray(value)) {\n      if (value.length === 0) return false // empty arrays are falsey\n      else return '[Array]' // print that it is an array with content in it, but do not print the contents\n    }\n    return '[Object]' // just print that it is an object, do not print the contents\n  } else if (value === undefined) return false // cannot escape on this value; undefined is falsey\n  else if (typeof value === 'boolean' || typeof value === 'number') return value // cannot escape on these values; if it's already a boolean or a number just return it\n  else {\n    // loop through value to find html entities\n    for (i = 0; i < value.length; i++) {\n      escapedEntity = false\n\n      // loop through list of html entities to escape\n      for (j = 0; j < ekl; j++) {\n        if (value[i] === entityKeys[j]) { // alter value to show escaped html entities\n          newValue += escapeHtmlEntities[entityKeys[j]]\n          escapedEntity = true\n          break\n        }\n      }\n\n      if (!escapedEntity) newValue += value[i]\n    }\n  }\n\n  return newValue\n}\n\n// if an entity is double-encoded, this will fix that\nfunction reverseDoubleEncodedEntities (str) {\n  return str.replace(/&amp;(#\\d+;|#x[0-9A-Fa-f]+;|[A-Za-z]+;)/g, '&$1')\n}\n\n// match strings by a custom delimiter\nfunction matchByDelimiter (input, openDelimiter, closeDelimiter) {\n  const stack = []\n  const result = []\n  const openLength = openDelimiter.length\n  const closeLength = closeDelimiter.length\n  for (let i = 0; i < input.length; i++) {\n    if (input.substring(i, i + openLength) === openDelimiter) {\n      stack.push(i + openLength)\n      i += openLength - 1\n    } else if (input.substring(i, i + closeLength) === closeDelimiter) {\n      const start = stack.pop()\n      if (stack.length === 0) result.push(input.substring(start, i))\n      i += closeLength - 1\n    }\n  }\n\n  return result\n}\n\nfunction getFirstMatchByDelimiters (str, delimiters) {\n  const openers = []\n  const closers = []\n  for (const delimiter of delimiters) {\n    openers.push(delimiter[0])\n    closers.push(delimiter[1])\n  }\n  const currentlyOpenBrackets = {}\n  let currentDelimiter = -1\n  let match = ''\n\n  for (let charIndex = 0; charIndex < str.length; charIndex++) {\n    for (let delimiterIndex = 0; delimiterIndex < openers.length; delimiterIndex++) {\n      if (currentDelimiter < 0 || currentDelimiter === delimiterIndex) {\n        const opener = openers[delimiterIndex]\n        const openerLength = opener.length\n        const closer = closers[delimiterIndex]\n        const closerLength = closer.length\n        let chunk = str.substring(charIndex, charIndex + openerLength)\n        if (chunk === opener) {\n          if (!currentlyOpenBrackets[opener]) {\n            match = opener.slice(0, -1)\n            currentlyOpenBrackets[opener] = 1\n            currentDelimiter = delimiterIndex\n            charIndex = charIndex + openerLength - 1 // move the loop ahead beyond the delimiter\n          } else {\n            currentlyOpenBrackets[opener]++\n          }\n        } else {\n          chunk = str.substring(charIndex, charIndex + closerLength)\n          if (chunk === closer) {\n            if (currentlyOpenBrackets[opener]) {\n              if (currentlyOpenBrackets[opener] > 1) currentlyOpenBrackets[opener]-- // they're nested; keep going\n              else if (currentlyOpenBrackets[opener] === 1) {\n                match += closer\n                return match\n              }\n            }\n          }\n        }\n        if (currentlyOpenBrackets[opener]) match += str.charAt(charIndex)\n      }\n    }\n  }\n\n  return match\n}\n\n// gets or sets an object by dot notation, e.g. thing.nestedThing.furtherNestedThing: two arguments gets, three arguments sets\nfunction getOrSetObjectByDotNotation (obj, dotNotation, value) {\n  if (!obj) return false\n  if (!dotNotation || typeof dotNotation === 'boolean' || typeof dotNotation === 'number') return dotNotation\n  if (typeof dotNotation === 'string') return getOrSetObjectByDotNotation(obj, dotNotation.split('.'), value)\n  else if (dotNotation.length === 1 && value !== undefined) {\n    obj[dotNotation[0]] = value\n    return obj[dotNotation[0]]\n  } else if (dotNotation.length === 0) return obj\n  else if (dotNotation.length === 1) {\n    if (obj) return caseInsensitiveLookup(obj, dotNotation[0])\n    return false\n  } else return getOrSetObjectByDotNotation(caseInsensitiveLookup(obj, dotNotation[0]), dotNotation.slice(1), value)\n  function caseInsensitiveLookup (obj, key) {\n    if (key === 'length') return obj.length\n    const lowerCaseKey = key.toLowerCase()\n    const normalizedObj = Object.keys(obj).reduce((acc, k) => {\n      acc[k.toLowerCase()] = obj[k]\n      return acc\n    }, {})\n    return normalizedObj[lowerCaseKey]\n  }\n}\n\n// cheerio polyfill\nfunction getAttribs (element) {\n  const attributes = element.attributes\n  const attributesObject = {}\n  for (let i = 0; i < attributes.length; i++) {\n    const attr = attributes[i]\n    attributesObject[attr.name] = attr.value\n  }\n  return attributesObject\n}\n\n// #endregion\n\n// #region public methods\n\n// set params to the defaults\nfunction setDefaultParams () {\n  params.verbosity = 1\n  params.templateRoot = './'\n  params.maxPasses = 1000\n  params.emptyVarBehavior = 'display' // or 'hide'\n  params.includeNotFoundBehavior = 'display' // or 'hide'\n}\n\n// mutator method to set verbosity param. takes human-readable string argument and converts it to an integer for more efficient checks against the setting\nfunction setVerbosity (v) {\n  switch (v) {\n    case 'none':\n    case 0:\n      v = 0\n      break\n    case 'verbose':\n    case 2:\n      v = 2\n      break\n    case 'debug':\n    case 'DEBUG':\n    case 3:\n      v = 3\n      break\n    default: // concise\n      v = 1\n  }\n  params.verbosity = v\n}\n\n// mutator method to set template root param; must be a string\nfunction setTemplateRoot (v) {\n  params.templateRoot = String(v)\n}\n\n// mutator method to set max passes param: the number of times the parser can iterate over the template\nfunction setMaxPasses (v) {\n  params.maxPasses = Number(v)\n}\n\n// mutator method to set empty var behavior param: whether to display {variables} that don't resolve as text ('display') or as an empty string ('hide')\nfunction setEmptyVarBehavior (v) {\n  if (v === 'hide') params.emptyVarBehavior = 'hide'\n  else params.emptyVarBehavior = 'display'\n}\n\n// mutator method to set include tag not found param: whether to display an error when an <include> tag src can't be found\nfunction setIncludeNotFoundBehavior (v) {\n  if (v === 'hide') params.includeNotFoundBehavior = 'hide'\n  else params.includeNotFoundBehavior = 'display'\n}\n\n// access templates\nfunction getTemplates () {\n  return templates\n}\n\n// takes in a template string and outputs a function which when given data will render out html\nfunction compile (templateString) {\n  return function (model) {\n    return render(templateString, model)\n  }\n}\n\n// mutator method to cache template\nfunction setTemplate (file, template) {\n  templates[file] = template\n}\n\n// mutator method to clear template cache entirely\nfunction clearTemplates () {\n  templates = {}\n}\n\nfunction setCache (params) {\n  if (!templateCaches[params.template]) templateCaches[params.template] = {}\n  if (params.key) {\n    templateCaches[params.template][params.key] = {\n      maxAge: params.maxAge || params.maxage,\n      maxCaches: (params.maxCaches || params.maxcaches) || 1000,\n      entries: {}\n    }\n  } else {\n    templateCaches[params.template].none = {\n      maxAge: params.maxAge || params.maxage,\n      markup: null,\n      created: null\n    }\n  }\n}\n\n// delete one or more cached templates\n// 1 string argument deletes the whole cache at that name for template partial caches\n// 2 arguments deletes just the value at that keyVal for template partial caches\n// 1 object argument assumes we're clearing whole template level cache\nfunction clearCache (name, keyVal) {\n  if (typeof name === 'string') {\n    if (keyVal) delete caches[name].entries[keyVal]\n    else delete caches[name]\n  } else if (typeof name === 'object') {\n    const params = name\n    if (params.key) delete templateCaches[params.template][params.key]\n    else delete templateCaches[params.template]\n  } else if (params.verbosity > 0) console.error('teddy: invalid params passed to clearCache.')\n}\n\n// parses a template\nfunction render (template, model, callback) {\n  // ensure template is a string\n  if (typeof template !== 'string') {\n    if (params.verbosity > 1) console.warn('teddy.render attempted to render a template which is not a string.')\n    if (typeof callback === 'function') return callback(null, '')\n    else return ''\n  }\n\n  // ensure model is an object\n  if (typeof model !== 'object') {\n    if (params.verbosity > 1) console.warn('teddy.render was passed an invalid model.')\n    model = {} // allow the template to render if an invalid model is supplied, but it will have an empty model\n  }\n\n  // declare vars\n  let dom\n  let renderedTemplate\n  model._noTeddyBlocks = [] // will store code blocks exempt from teddy parsing\n\n  // express.js support\n  if (model.settings && model.settings.views && path) params.templateRoot = path.resolve(model.settings.views)\n\n  // remove templateRoot from template name if necessary\n  if (template.slice(params.templateRoot.length) === params.templateRoot) template = template.replace(params.templateRoot, '')\n\n  // whole template caching\n  const templateCache = templateCaches[template]\n  let cacheKey = null\n  let cacheKeyModelVal = null\n  if (templateCache) {\n    const singletonCache = templateCache.none\n    if (singletonCache) {\n      // check if the timestamp exceeds max age\n      if (!singletonCache.created) cacheKey = 'none'\n      else if (!singletonCache.maxAge && singletonCache.maxage) {\n        // if no max age is set, then this cache doesn't expire\n        if (typeof callback === 'function') return callback(null, singletonCache.markup)\n        else return singletonCache.markup\n      } else if (singletonCache.created + (singletonCache.maxAge || singletonCache.maxage) < Date.now()) cacheKey = 'none' // if yes re-render the template and cache it again\n      else {\n        // if no return the cached markup and skip the template render\n        if (typeof callback === 'function') return callback(null, singletonCache.markup)\n        else return singletonCache.markup\n      }\n    } else {\n      // loop through its keys\n      for (const key in templateCache) {\n        // if there's a model value for that key name\n        cacheKeyModelVal = getOrSetObjectByDotNotation(model, key)\n        if (cacheKeyModelVal) {\n          // loop through its entries\n          const templateCacheAtThisKey = templateCache[key]\n          for (const entryKey in templateCacheAtThisKey.entries) {\n            // if any entry keys match the model value for that key name\n            if (entryKey === cacheKeyModelVal) {\n              // check if the timestamp exceeds max age\n              const entry = templateCacheAtThisKey.entries[entryKey]\n              if (!templateCacheAtThisKey.maxAge && !templateCacheAtThisKey.maxage) {\n                // if no max age is set, then this cache doesn't expire\n                if (typeof callback === 'function') return callback(null, entry.markup)\n                else return entry.markup\n              } else if (entry.created + (templateCacheAtThisKey.maxAge || templateCacheAtThisKey.maxage) < Date.now()) {\n                // if yes re-render the template and cache it again\n                cacheKey = key\n                break\n              } else {\n                // if no return the cached markup and skip the template render\n                if (typeof callback === 'function') return callback(null, entry.markup)\n                else return entry.markup\n              }\n            }\n          }\n          // this is a new model value so it needs a new entry\n          cacheKey = key\n          break\n        }\n      }\n    }\n  }\n\n  // start the render\n  renderedTemplate = loadTemplate(template)\n\n  // replace duplicate attributes with temporary unique names before loading into cheerio\n  if (!browser) {\n    renderedTemplate = renderedTemplate.replace(/<([a-zA-Z][a-zA-Z0-9-]*)([^>]*)>/g, (match, tagName, attributes) => {\n      const attrRegex = /([a-zA-Z0-9-:._]+)(?:=([\"'])(.*?)\\2|([^>\\s]+))?/g\n      const attrMap = new Map()\n      let count = 1\n      const processedAttributes = attributes.replace(attrRegex, (attrMatch, attrName, quote, attrValue) => {\n        if (attrMap.has(attrName)) {\n          const newAttrName = `${attrName}-teddyduplicate${count++}`\n          return attrMatch.replace(attrName, newAttrName)\n        } else {\n          attrMap.set(attrName, true)\n          return attrMatch\n        }\n      })\n      return `<${tagName}${processedAttributes}>`\n    })\n  }\n\n  dom = cheerioLoad(renderedTemplate || '', cheerioOptions)\n  let oldTemplate\n  let passes = 0\n  let parseDynamicIncludes = false\n  do {\n    passes++\n    if (passes > params.maxPasses) {\n      if (params.verbosity > 0) console.error(`teddy could not finish rendering the template because the max number of passes over the template (${params.maxPasses}) was exceeded; there may be an infinite loop in your template logic.`)\n      break\n    }\n    const hasCache = renderedTemplate.includes('</cache>')\n    const hasNoteddy = renderedTemplate.includes('</noteddy>')\n    const hasNoparse = renderedTemplate.includes('</noparse>')\n    const hasPre = renderedTemplate.includes('</pre>')\n    const hasIf = renderedTemplate.includes('</if>')\n    const hasUnless = renderedTemplate.includes('</unless>')\n    const hasTrue = renderedTemplate.includes(' true=')\n    const hasFalse = renderedTemplate.includes(' false=')\n    const hasInclude = renderedTemplate.includes('</include>')\n    const hasLoop = renderedTemplate.includes('</loop>')\n    const hasInline = renderedTemplate.includes('</inline>')\n    const hasSelected = renderedTemplate.includes(' selected-value=') || renderedTemplate.includes(' checked-value=')\n    oldTemplate = renderedTemplate || ''\n    if (passes > 1) {\n      dom = cheerioLoad(renderedTemplate || '', cheerioOptions)\n      if (parseDynamicIncludes) dom = parseIncludes(dom, model, true)\n    }\n    if (hasCache) dom = replaceCacheElements(dom, model)\n    if (hasNoteddy || hasNoparse || hasPre) dom = tagNoParseBlocks(dom, model)\n    if (hasIf || hasUnless) dom = parseConditionals(dom, model)\n    if (hasTrue || hasFalse) dom = parseOneLineConditionals(dom, model)\n    if (hasInclude) dom = parseIncludes(dom, model)\n    if (hasLoop) dom = parseLoops(dom, model)\n    if (hasInline) dom = parseInlines(dom, model)\n    if (hasSelected) dom = parseSelectedAttributeValues(dom, model)\n    const cachesStillPresent = renderedTemplate.includes('</cache>')\n    renderedTemplate = dom.html()\n    renderedTemplate = parseVars(renderedTemplate, model)\n    if (parseDynamicIncludes) {\n      renderedTemplate = removeTeddyComments(renderedTemplate)\n      parseDynamicIncludes = false\n    }\n    if (renderedTemplate.includes('teddydeferreddynamicinclude=\"true\"')) {\n      oldTemplate = '' // reset old template to force another pass\n      parseDynamicIncludes = true\n    }\n    if (oldTemplate === renderedTemplate && cachesStillPresent) {\n      dom = cheerioLoad(renderedTemplate || '', cheerioOptions)\n      dom = defineNewCaches(dom, model)\n      renderedTemplate = dom.html()\n    }\n  } while (oldTemplate !== renderedTemplate)\n\n  // remove stray teddy tags if any exist\n  if (renderedTemplate.includes('teddydeferredonelineconditional=\"true\"') || renderedTemplate.includes('</include>') || renderedTemplate.includes('</arg>') || renderedTemplate.includes('</if>') || renderedTemplate.includes('</unless>') || renderedTemplate.includes('</elseif>') || renderedTemplate.includes('</elseunless>') || renderedTemplate.includes('</else>') || renderedTemplate.includes('</loop>') || renderedTemplate.includes('</cache>') || renderedTemplate.includes('</pre>')) {\n    dom = cheerioLoad(renderedTemplate || '', cheerioOptions)\n    dom = cleanupStrayTeddyTags(dom)\n    renderedTemplate = dom.html()\n  }\n\n  // replace <noteddy> blocks with the hidden code\n  for (const blockId in model._noTeddyBlocks) {\n    renderedTemplate = renderedTemplate.replace(`<noteddy id=\"${blockId}\"></noteddy>`, () => model._noTeddyBlocks[blockId])\n    renderedTemplate = renderedTemplate.replace(`<noteddy id=\"${blockId}\" pre=\"true\"></noteddy>`, () => model._noTeddyBlocks[blockId])\n  }\n\n  if (browser) {\n    // fix double-encoding html entity bug in client-side mode\n    renderedTemplate = reverseDoubleEncodedEntities(renderedTemplate)\n\n    // now that we're done with the render, reset data-teddy-defer-attr-src and data-teddy-defer-attr-href to native attributes\n    renderedTemplate = renderedTemplate.replaceAll('data-teddy-defer-attr-src', 'src').replaceAll('data-teddy-defer-attr-href', 'href')\n  }\n\n  // cache the template\n  if (cacheKey === 'none') {\n    templateCaches[template].none.markup = renderedTemplate\n    templateCaches[template].none.created = Date.now()\n  } else if (cacheKey) {\n    if (!templateCaches[template][cacheKey].entries[cacheKeyModelVal]) templateCaches[template][cacheKey].entries[cacheKeyModelVal] = {}\n    templateCaches[template][cacheKey].entries[cacheKeyModelVal].markup = renderedTemplate\n    templateCaches[template][cacheKey].entries[cacheKeyModelVal].created = Date.now()\n    // invalidate oldest cache if we've reached max caches limit\n    if (Object.keys(templateCaches[template][cacheKey].entries).length > templateCaches[template][cacheKey].maxCaches) {\n      const lowestKeyVal = Object.keys(templateCaches[template][cacheKey].entries).reduce((a, b) => templateCaches[template][cacheKey].entries[a].created < templateCaches[template][cacheKey].entries[b].created ? a : b)\n      delete templateCaches[template][cacheKey].entries[lowestKeyVal]\n    }\n  }\n\n  if (typeof callback === 'function') return callback(null, renderedTemplate)\n  else return renderedTemplate\n}\n\n// #endregion\n\nexport default {\n  params,\n  caches,\n  templateCaches,\n\n  // functions\n  compile,\n  setDefaultParams,\n  setVerbosity,\n  setTemplateRoot,\n  setMaxPasses,\n  setEmptyVarBehavior,\n  setIncludeNotFoundBehavior,\n  getTemplates,\n  setTemplate,\n  clearTemplates,\n  setCache,\n  clearCache,\n  render,\n  __express: render\n}\n"],"names":["module","exports","trueFunc","falseFunc","getDocumentRoot","node","parent","groupSelectors","selectors","filteredSelectors","plainSelectors","selector","some","isFilter","push","UNIVERSAL_SELECTOR","type","SelectorType","Universal","namespace","SCOPE_PSEUDO","Pseudo","name","data","is","element","options","elements","plain","filtered","parse","length","sel","filterBySelector","filterByPosition","filter","elems","num","parseInt","NaN","isFinite","Math","abs","slice","_","i","Set","filterParsed","e","has","found","filterElements","size","filteredSelector","missing","forEach","el","add","_a","isTraversal","root","opts","context","relativeSelector","findFilterElements","select","limit","Infinity","find","results","map","findElements","reduce","a","b","queryForSelector","totalLimit","filterIndex","findIndex","sub","partLimit","getLimit","elemsNoLimit","Array","isArray","result","remainingSelector","remainingHasTraversal","Sibling","Adjacent","prepareContext","unshift","rootFunc","includes","query","shouldTestNextSiblings","els","filterNames","s","min","hasOwn","Object","prototype","hasOwnProperty","rspace","dataAttrPrefix","rboolean","rbrace","getAttr","elem","xmlMode","isTag","attribs","call","test","text","children","setAttr","value","removeAttribute","attr","undefined","Error","domEach","this","objName","keys","objValue","arguments","getProp","setProp","prop","property","css","toUpperCase","URL","tagName","baseURI","href","innerText","textContent","clone","wrap","html","TypeError","key","val","setData","assign","readAllData","domName","startsWith","jsName","camelCase","parseDataValue","readData","cssCase","Number","String","JSON","dataEl","querying","option","removeAttr","values","toArray","splitNames","names","trim","split","attrNames","attrName","hasClass","className","clazz","idx","indexOf","end","addClass","classNames","numElements","setClass","cn","appendClass","join","removeClass","classes","numClasses","removeAll","elClasses","changed","j","index","splice","toggleClass","stateVal","state","elementClasses","setCss","getCss","styles","stringify","k","newStyles","item","obj","str","n","trimmed","trimEnd","getExtractDescr","descr","extract","ret","fn","_make","_findBySelector","POSITIVE_INFINITY","get","$","submittableSelector","r20","rCRLF","serialize","arr","serializeArray","retArr","encodeURIComponent","replace","$elem","_makeDomArray","_parse","cloneNode","_insert","concatenator","lastIdx","hasChildren","domSrc","_render","dom","uniqueSplice","array","spliceIdx","spliceCount","newElems","_b","spliceArgs","prev","next","oldParent","oldSiblings","prevIdx","appendTo","target","appendTarget","isCheerio","append","prependTo","prependTarget","prepend","_wrap","insert","wrapper","lastParent","parents","last","isHtml","wrapperDom","elInsertLocation","child","siblings","update","wrapInner","unwrap","not","each","replaceWith","wrapAll","insertBefore","after","insertAfter","remove","clones","clonedSelf","before","targetArr","removeElement","content","cont","empty","toString","textNode","Text","Document","reSiblingSelector","selectorOrHaystack","haystack","contains","_root","lowerCaseTags","lowerCaseAttributeNames","pseudos","quirksMode","_getMatcher","matchMap","postFns","matched","filterArray","_matcher","concat","_singleMatcher","_matchUntil","nextElem","matches","innerMatcher","filterSelector","getFilterFn","_removeDuplicates","from","isDocument","uniqueSort","reverse","parentsUntil","closest","set","selectOpts","selectFn","nextElementSibling","nextAll","nextUntil","prevElementSibling","prevAll","prevUntil","getSiblings","getChildren","contents","len","match","nodes","filterFn","first","eq","selectorOrNeedle","$haystack","needle","start","prevObject","other","selection","addBack","Cheerio","constructor","cheerio","Symbol","iterator","getLoad","render","load","internalOpts","flattenOptions","initialRoot","LoadedCheerio","initialize","r","rootInstance","isNode","instance","search","searchContext","_options","defaultOpts","_useHtmlParser2","baseOptions","xml","getParse","parser","Buffer","isBuffer","doc","newChilds","parseDocument","that","isOptions","toRender","parseHTML","keepScripts","parsed","container","contained","merge","arr1","arr2","isArrayLike","newLength","maybeCheerio","x","toLowerCase","CharacterCodes","tagStart","tagChar","charCodeAt","LowerA","LowerZ","UpperA","UpperZ","Exclamation","reChars","escapeRegex","caseInsensitiveAttributes","shouldIgnoreCase","ignoreCase","attributeRules","equals","adapter","getAttributeValue","hyphen","charAt","substr","regex","RegExp","exists","hasAttrib","endsWith","any","compile","compileUnsafe","ensureIsTag","token","compileToken","includesScopePseudo","t","DESCENDANT_TOKEN","Descendant","FLEXIBLE_DESCENDANT_TOKEN","SCOPE_TOKEN","absolutize","hasContext","every","getParent","PLACEHOLDER_ELEMENT","isArrayContext","finalContext","rules","second","compileRules","reduceRules","previous","rule","compileGeneralSelector","getElementParent","PseudoElement","ColumnCombinator","Attribute","action","compilePseudoSelector","Tag","getName","cacheResults","WeakSet","current","isFalseCache","Parent","Child","currentSibling","lastElement","defaultEquals","defaultOptions","convertOptionFormats","_c","_d","wrapCompile","func","_compileUnsafe","_compileToken","getSelectorFunc","searchFunc","filteredElements","appendNextSiblings","removeSubsets","elemsLength","nextSiblings","getNextSiblings","selectAll","findAll","selectOne","findOne","aliases","link","disabled","enabled","checked","required","optional","selected","checkbox","file","password","radio","reset","image","submit","header","button","input","getChildFunc","filters","getText","icontains","itext","pos","_rule","scope","hover","dynamicStatePseudo","visited","active","subselects","userPseudo","stringPseudo","alias","verifyPseudoArgs","pseudo","firstChild","elemName","sibling","subselect","argIndex","elemIndex","copyOptions","where","_context","compiled","hasElement","childs","nextElements","existsOne","procedure","Map","attributes","AttributeAction","Exists","Equals","Not","Start","End","Any","sortByProcedure","procs","getProcedure","procNew","proc","d","reName","reEscape","actionTypes","Element","Hyphen","unpackPseudos","stripQuotesFromPseudos","funescape","escaped","escapedWhitespace","high","fromCharCode","unescapeCSS","isQuote","c","isWhitespace","endIndex","parseSelector","selectorIndex","tokens","offset","stripWhitespace","readValueWithParenthesis","counter","isEscaped","slashCount","ensureNotTraversal","addTraversal","addSpecialAttribute","finalizeSubselector","pop","loop","firstChar","possibleAction","quote","sectionEnd","valueStart","forceIgnore","attributeSelector","quot","IgnoreCaseMode","Unknown","QuirksMode","IgnoreCase","CaseSensitive","elementNames","attributeNames","unencodedElements","replaceQuotes","formatAttributes","encode","encodeEntities","decodeEntities","encodeXML","escapeAttribute","emptyAttrs","singleTag","output","renderNode","renderDirective","renderComment","renderCdata","renderTag","renderText","foreignModeIntegrationPoints","foreignElements","tag","selfClosingTags","escapeText","ElementType","Script","Style","Root","Directive","Comment","CDATA","Doctype","withStartIndices","withEndIndices","DomHandler","callback","elementCB","done","tagStack","lastNode","onparserinit","onreset","onend","handleCallback","onerror","error","onclosetag","onopentag","addNode","ontext","oncomment","oncommentend","oncdatastart","oncdataend","onprocessinginstruction","ProcessingInstruction","previousSibling","startIndex","Node","parentNode","nextSibling","recursive","DataNode","super","nodeValue","nodeType","NodeWithChildren","lastChild","childNodes","prefix","isCDATA","isText","isComment","isDirective","cloneChildren","instruction","sourceCodeLocation","getFeed","feedRoot","getOneElement","isValidFeed","getAtomFeed","getRssFeed","feed","items","getElementsByTagName","entry","media","getMediaElements","addConditionally","description","fetch","pubDate","Date","updated","id","MEDIA_KEYS_STRING","MEDIA_KEYS_INT","medium","isDefault","attrib","expression","recurse","lastIndexOf","ancestor","DocumentPosition","compareDocumentPosition","nodeA","nodeB","aParents","bParents","maxIdx","DISCONNECTED","sharedParent","aSibling","bSibling","FOLLOWING","CONTAINED_BY","PRECEDING","CONTAINS","sort","relative","Checks","tag_name","tag_type","tag_contains","getAttribCheck","combineFuncs","compileTest","funcs","testElement","getElements","getElementById","getElementsByClassName","getElementsByTagType","childsIndex","replaceElement","replacement","appendChild","currNext","prependChild","nodeStack","indexStack","shift","findOneChild","searchedNodes","getOuterHTML","getInnerHTML","CharCodes","TO_LOWER_BIT","BinTrieFlags","isNumber","code","ZERO","NINE","isHexadecimalCharacter","UPPER_A","UPPER_F","LOWER_A","LOWER_F","isAsciiAlphaNumeric","UPPER_Z","LOWER_Z","isEntityInAttributeInvalidEnd","EQUALS","EntityDecoderState","DecodingMode","EntityDecoder","decodeTree","emitCodePoint","errors","EntityStart","consumed","treeIndex","excess","decodeMode","Strict","startEntity","write","NUM","NumericStart","stateNumericStart","NamedEntity","stateNamedEntity","NumericDecimal","stateNumericDecimal","NumericHex","stateNumericHex","LOWER_X","addToNumericResult","base","digitCount","pow","startIdx","char","emitNumericEntity","lastCp","expectedLength","absenceOfDigitsInNumericCharacterReference","SEMI","replaceCodePoint","missingSemicolonAfterCharacterReference","validateNumericCharacterReference","valueLength","VALUE_LENGTH","determineBranch","max","emitNotTerminatedNamedEntity","emitNamedEntityData","getDecoder","decoder","fromCodePoint","lastIndex","nodeIdx","branchCount","BRANCH_LENGTH","jumpOffset","JUMP_TABLE","lo","hi","mid","midVal","htmlDecoder","xmlDecoder","decodeHTML","mode","Legacy","decodeHTMLAttribute","decodeHTMLStrict","decodeXML","decodeMap","codePoint","decodeCodePoint","htmlReplacer","encodeHTML","encodeHTMLTrieRe","encodeNonAsciiHTML","xmlReplacer","regExp","exec","substring","nextChar","o","v","cp","getCodePoint","xmlCodeMap","codePointAt","escape","getEscaper","escapeUTF8","Uint16Array","restoreDiff","EntityLevel","EncodingMode","decode","XML","level","HTML","decodeStrict","UTF8","ASCII","formTags","pTag","tableSectionTags","ddtTags","rtpTags","openImpliesClose","voidElements","foreignContextElements","htmlIntegrationElements","reNameEnd","Parser","cbs","_e","_f","openTagStart","tagname","attribname","attribvalue","stack","buffers","bufferOffset","writeIndex","ended","htmlMode","lowerCaseTagNames","recognizeSelfClosing","tokenizer","Tokenizer","foreignContext","getSlice","ontextentity","isVoidElement","onopentagname","emitOpenTag","impliesClose","endOpenTag","isImplied","onopentagend","_g","_h","closeCurrentTag","onselfclosingtag","isOpenImplied","onattribname","onattribdata","onattribentity","onattribend","onattribute","QuoteType","Double","Single","NoValue","getInstructionName","ondeclaration","oncdata","_j","_k","recognizeCDATA","parseComplete","shiftBuffer","chunk","running","pause","resume","parseChunk","State","Space","NewLine","Tab","FormFeed","CarriageReturn","isEndOfTagSection","Slash","Gt","isASCIIAlpha","Sequences","Cdata","Uint8Array","CdataEnd","CommentEnd","ScriptEnd","StyleEnd","TitleEnd","TextareaEnd","buffer","sectionStart","entityStart","baseState","isSpecial","currentSequence","sequenceIndex","entityDecoder","xmlDecodeTree","htmlDecodeTree","finish","stateText","Lt","fastForwardTo","BeforeTagName","Amp","stateSpecialStartSequence","isEnd","isMatch","InTagName","stateInTagName","stateInSpecialTag","endOfText","actualIndex","stateInClosingTagName","stateCDATASequence","InCommentLike","InDeclaration","stateInDeclaration","stateInCommentLike","isTagStartChar","startSpecial","sequence","SpecialStartSequence","stateBeforeTagName","ExclamationMark","BeforeDeclaration","Questionmark","InProcessingInstruction","lower","BeforeSpecialS","BeforeSpecialT","BeforeClosingTagName","BeforeAttributeName","stateBeforeAttributeName","stateBeforeClosingTagName","InClosingTagName","InSpecialComment","AfterClosingTagName","stateAfterClosingTagName","InSpecialTag","InSelfClosingTag","InAttributeName","stateInSelfClosingTag","stateInAttributeName","Eq","AfterAttributeName","stateAfterAttributeName","BeforeAttributeValue","stateBeforeAttributeValue","DoubleQuote","InAttributeValueDq","SingleQuote","InAttributeValueSq","InAttributeValueNq","stateInAttributeValueNoQuotes","handleInAttributeValue","stateInAttributeValueDoubleQuotes","stateInAttributeValueSingleQuotes","Unquoted","stateBeforeDeclaration","OpeningSquareBracket","CDATASequence","Dash","BeforeComment","stateInProcessingInstruction","stateBeforeComment","stateInSpecialComment","stateBeforeSpecialS","stateBeforeSpecialT","InEntity","stateInEntity","cleanup","shouldContinue","handleTrailingData","handler","parseDOM","createDocumentStream","elementCallback","createDomStream","parseFeedDefaultOptions","parseFeed","absA","bMod","generate","aPos","minValue","ceil","nthCheck","formula","whitespace","sign","readSign","number","readNumber","skipWhitespace","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","definition","defineProperty","enumerable","toStringTag","cheerioOptions","browser","isCheerioPolyfill","params","setDefaultParams","templates","caches","templateCaches","loadTemplate","template","verbosity","console","warn","register","templateRoot","removeTeddyComments","renderedTemplate","oldTemplate","vars","matchByDelimiter","firstMatch","getFirstMatchByDelimiters","newContent","escapeEntities","replaceCacheElements","model","parsedTags","tags","getAttribs","cache","entries","keyVal","getOrSetObjectByDotNotation","now","maxAge","maxage","lastAccessed","cacheContent","markup","tagNoParseBlocks","_noTeddyBlocks","parseIncludes","dynamic","passes","maxPasses","foundBody","parentName","nodeName","src","includeNotFoundBehavior","localModel","arg","argName","argval","hasNoteddy","hasNoparse","hasPre","hasIf","hasUnless","hasTrue","hasFalse","hasLoop","hasInline","hasSelected","localDom","parseVars","parseConditionals","parseOneLineConditionals","parseLoops","parseInlines","parseSelectedAttributeValues","args","isIf","elName","condResult","evaluateConditional","removeStack","nextSiblingName","replaceSibling","siblingToWipe","conditions","conditionsLength","condition","evaluateCondition","fill","parts","cond","lookup","defer","ifTrue","ifFalse","origAttr","replaceAll","loopThrough","keyName","valName","attrVal","newMarkup","loopContents","hasNoteddyLoopContents","hasNoparseLoopContents","hasPreLoopContents","localMarkup","newDom","js","opt","templateString","originalMatch","lastSixChars","emptyVarBehavior","skipTemplateLiteralReplacement","defineNewCaches","maxCaches","maxcaches","timestamp","created","lowestKeyVal","cleanupStrayTeddyTags","escapeHtmlEntities","entityKeys","ekl","escapedEntity","newValue","reverseDoubleEncodedEntities","openDelimiter","closeDelimiter","openLength","closeLength","delimiters","openers","closers","delimiter","currentlyOpenBrackets","currentDelimiter","charIndex","delimiterIndex","opener","openerLength","closer","closerLength","dotNotation","caseInsensitiveLookup","lowerCaseKey","normalizedObj","acc","attributesObject","setVerbosity","setTemplateRoot","setMaxPasses","setEmptyVarBehavior","setIncludeNotFoundBehavior","getTemplates","setTemplate","clearTemplates","setCache","none","clearCache","settings","views","templateCache","cacheKey","cacheKeyModelVal","singletonCache","templateCacheAtThisKey","entryKey","attrRegex","attrMap","count","processedAttributes","attrMatch","attrValue","newAttrName","parseDynamicIncludes","hasCache","hasInclude","cachesStillPresent","blockId","__express"],"sourceRoot":""}