{"version":3,"file":"domhandler-5bfd46b4.js","sources":["../../node_modules/domhandler/lib/esm/node.js","../../node_modules/domhandler/lib/esm/index.js"],"sourcesContent":["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 { 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"],"names":["Node","parent","prev","next","recursive","cloneNode","DataNode","data","Text","ElementType","Comment","ProcessingInstruction","name","NodeWithChildren","children","_a","CDATA","Document","Element","attribs","type","_b","isTag","node","isTagRaw","isCDATA","isText","isComment","isDirective","isDocument","result","cloneChildren","clone","child","instruction","childs","i","defaultOpts","DomHandler","callback","options","elementCB","parser","error","elem","element","lastNode","text","previousSibling"],"mappings":"wDAKO,MAAMA,CAAK,CACd,aAAc,CAEV,KAAK,OAAS,KAEd,KAAK,KAAO,KAEZ,KAAK,KAAO,KAEZ,KAAK,WAAa,KAElB,KAAK,SAAW,IACnB,CAMD,IAAI,YAAa,CACb,OAAO,KAAK,MACf,CACD,IAAI,WAAWC,EAAQ,CACnB,KAAK,OAASA,CACjB,CAKD,IAAI,iBAAkB,CAClB,OAAO,KAAK,IACf,CACD,IAAI,gBAAgBC,EAAM,CACtB,KAAK,KAAOA,CACf,CAKD,IAAI,aAAc,CACd,OAAO,KAAK,IACf,CACD,IAAI,YAAYC,EAAM,CAClB,KAAK,KAAOA,CACf,CAOD,UAAUC,EAAY,GAAO,CACzB,OAAOC,EAAU,KAAMD,CAAS,CACnC,CACL,CAIO,MAAME,UAAiBN,CAAK,CAI/B,YAAYO,EAAM,CACd,QACA,KAAK,KAAOA,CACf,CAKD,IAAI,WAAY,CACZ,OAAO,KAAK,IACf,CACD,IAAI,UAAUA,EAAM,CAChB,KAAK,KAAOA,CACf,CACL,CAIO,MAAMC,UAAaF,CAAS,CAC/B,aAAc,CACV,MAAM,GAAG,SAAS,EAClB,KAAK,KAAOG,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