{"version":3,"file":"domutils-945e93d1.js","sources":["../../node_modules/domutils/lib/esm/stringify.js","../../node_modules/domutils/lib/esm/traversal.js","../../node_modules/domutils/lib/esm/manipulation.js","../../node_modules/domutils/lib/esm/querying.js","../../node_modules/domutils/lib/esm/legacy.js","../../node_modules/domutils/lib/esm/helpers.js","../../node_modules/domutils/lib/esm/feeds.js"],"sourcesContent":["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 `
` 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 `